commit 6995e2de6891c724bfeb2db33d7b87775f913ad1 Author: Linus Torvalds Date: Sun Jun 25 16:29:58 2023 -0700 Linux 6.4 commit e3b2e2c14bcc12da2c463a7179db39139f682573 Merge: 547cc9be86f4c e69b9bc170c6d Author: Linus Torvalds Date: Sun Jun 25 15:36:01 2023 -0700 Merge tag 'i2c-for-6.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Nothing fancy. Two driver and one DT binding fix" * tag 'i2c-for-6.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle i2c: qup: Add missing unwind goto in qup_i2c_probe() dt-bindings: i2c: opencores: Add missing type for "regstep" commit 547cc9be86f4c51c51fd429ace6c2e1ef9050d15 Merge: 300edd751b102 a6742cb90b567 Author: Linus Torvalds Date: Sun Jun 25 10:13:17 2023 -0700 Merge tag 'perf_urgent_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Borislav Petkov: - Drop the __weak attribute from a function prototype as it otherwise leads to the function getting replaced by a dummy stub - Fix the umask value setup of the frontend event as former is different on two Intel cores * tag 'perf_urgent_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Fix the FRONTEND encoding on GNR and MTL perf/core: Drop __weak attribute from arch_perf_update_userpage() prototype commit 300edd751b102715dda0fe44b4bf8442f6ccf9db Merge: 661e723b6fc72 b9f174c811e3a Author: Linus Torvalds Date: Sun Jun 25 10:00:17 2023 -0700 Merge tag 'objtool_urgent_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fix from Borislav Petkov: - Add a ORC format hash to vmlinux and modules in order for other tools which use it, to detect changes to it and adapt accordingly * tag 'objtool_urgent_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/unwind/orc: Add ELF section with ORC version identifier commit 661e723b6fc7247e8aa6704651c49cd25c559f75 Merge: a92b7d26c743b 85d38d5810e28 Author: Linus Torvalds Date: Sun Jun 25 09:47:04 2023 -0700 Merge tag 'x86_urgent_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Do not use set_pgd() when updating the KASLR trampoline pgd entry because that updates the user PGD too on KPTI builds, resulting in memory corruption - Prevent a panic in the IO-APIC setup code due to conflicting command line parameters * tag 'x86_urgent_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apic: Fix kernel panic when booting with intremap=off and x2apic_phys x86/mm: Avoid using set_pgd() outside of real PGD pages commit a92b7d26c743b9dc06d520f863d624e94978a1d9 Merge: 0f56e657488fe 9bd9be5cbaf8a Author: Linus Torvalds Date: Fri Jun 23 16:33:26 2023 -0700 Merge tag 'drm-fixes-2023-06-23' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Very quiet last week, just two misc fixes, one dp-mst and one qaic: qaic: - dma-buf import fix dp-mst: - fix NULL ptr deref" [ It turns out it was a quiet week because Alex Deucher hadn't sent in his pending AMD changes. So they are coming next - Linus ] * tag 'drm-fixes-2023-06-23' of git://anongit.freedesktop.org/drm/drm: drm: use mgr->dev in drm_dbg_kms in drm_dp_add_payload_part2 accel/qaic: Call DRM helper function to destroy prime GEM commit 0f56e657488fe35e543fc17bc192fb7c7ac07ac6 Merge: 569fa9392d2d4 ed8ff046eddd9 Author: Linus Torvalds Date: Fri Jun 23 16:21:59 2023 -0700 Merge tag 'arm-fixes-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "The final bug fixes for Qualcomm and Rockchips came in, all of them for devicetree files: - Devices on Qualcomm SC7180/SC7280 that are cache coherent are now marked so correctly to fix a regression after a change in kernel behavior - Rockchips has a few minor changes for correctness of regulator and cache properties, as well as fixes for incorrect behavior of the RK3568 PCI controller and reset pins on two boards" * tag 'arm-fixes-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: arm64: dts: qcom: sc7280: Mark SCM as dma-coherent for chrome devices arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for trogdor arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for IDP dt-bindings: firmware: qcom,scm: Document that SCM can be dma-coherent arm64: dts: rockchip: Fix rk356x PCIe register and range mappings arm64: dts: rockchip: fix button reset pin for nanopi r5c arm64: dts: rockchip: fix nEXTRST on SOQuartz arm64: dts: rockchip: add missing cache properties arm64: dts: rockchip: fix USB regulator on ROCK64 commit 569fa9392d2d48e35955b69775d11507ea96b36a Merge: 9cb38381bac9f cb091225a5380 Author: Linus Torvalds Date: Fri Jun 23 16:09:53 2023 -0700 Merge tag 'for-6.4-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "Unfortunately the recent u32 overflow fix was not complete, there was one conversion left, assertion not triggered by my tests but caught by Qu's fstests case. The "cleanup for later" has been promoted to a proper fix and wraps all uses of the stripe left shift so the diffstat has grown but leaves no potentially problematic uses. We should have done it that way before, sorry" * tag 'for-6.4-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix remaining u32 overflows when left shifting stripe_nr commit 9cb38381bac9f629fd4e7eafef27066c23c3eaf9 Merge: 917b3c7c0bcf8 9c39b7a905d84 Author: Linus Torvalds Date: Fri Jun 23 16:04:35 2023 -0700 Merge tag 'block-6.4-2023-06-23' of git://git.kernel.dk/linux Pull block fix from Jens Axboe: "It's apparently the week of 'fixup something from last week', because the same is true for this block pull request. Fix up a lock grab that needs to be IRQ saving, rather than just IRQ disabling, in the block cgroup code" * tag 'block-6.4-2023-06-23' of git://git.kernel.dk/linux: block: make sure local irq is disabled when calling __blkcg_rstat_flush commit 917b3c7c0bcf82f62afc1d046352933bd68db931 Merge: 61dabacdad4e7 5b00369fcf6d1 Author: Linus Torvalds Date: Fri Jun 23 15:56:44 2023 -0700 Merge tag 'iommu-fix-v6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fix from Joerg Roedel: - Fix potential memory leak in AMD IOMMU domain allocation path * tag 'iommu-fix-v6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: Fix possible memory leak of 'domain' commit 61dabacdad4e7d464c11f715ae6b065151a73078 Merge: 6edecb9986eef 6f9441f4e3ebf Author: Linus Torvalds Date: Fri Jun 23 15:43:01 2023 -0700 Merge tag 'sound-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Three oneliner fixes: one for a thinko in SOF SoundWire code and two HD-audio quirks for ASUS laptops. All device-specific and should be safe to apply" * tag 'sound-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Add quirk for ASUS ROG GV601V ALSA: hda/realtek: Add quirk for ASUS ROG G634Z ASoC: intel: sof_sdw: Fixup typo in device link checking commit 6edecb9986eeffbf67e89aa510bc07835067cf60 Merge: afa4bb778e48d ff7a1790fbf92 Author: Linus Torvalds Date: Fri Jun 23 15:24:09 2023 -0700 Merge tag 'gpio-fixes-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix IRQ initialization in gpiochip_irqchip_add_domain() - add a missing return value check for platform_get_irq() in gpio-sifive - don't free irq_domains which GPIOLIB does not manage * tag 'gpio-fixes-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpiolib: Fix irq_domain resource tracking for gpiochip_irqchip_add_domain() gpio: sifive: add missing check for platform_get_irq gpiolib: Fix GPIO chip IRQ initialization restriction commit ed8ff046eddd916627e1e9a549eacd9c043fde7d Merge: 5b017b5ed2bcc 7b59e8ae92fe0 Author: Arnd Bergmann Date: Fri Jun 23 22:13:22 2023 +0200 Merge tag 'qcom-arm64-fixes-for-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes One last Qualcomm ARM64 DeviceTree fix for v6.4 Changes related to cache management for DMA memory caused WiFi to stop work on SC7180 and SC7280 based products, using TF-A. These changes marks the relevant device dma-coherent to correct the behavior. * tag 'qcom-arm64-fixes-for-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: dts: qcom: sc7280: Mark SCM as dma-coherent for chrome devices arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for trogdor arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for IDP dt-bindings: firmware: qcom,scm: Document that SCM can be dma-coherent Link: https://lore.kernel.org/r/20230622203248.106422-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit afa4bb778e48d79e4a642ed41e3b4e0de7489a6c Author: Linus Torvalds Date: Fri Jun 23 12:08:14 2023 -0700 workqueue: clean up WORK_* constant types, clarify masking Dave Airlie reports that gcc-13.1.1 has started complaining about some of the workqueue code in 32-bit arm builds: kernel/workqueue.c: In function ‘get_work_pwq’: kernel/workqueue.c:713:24: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 713 | return (void *)(data & WORK_STRUCT_WQ_DATA_MASK); | ^ [ ... a couple of other cases ... ] and while it's not immediately clear exactly why gcc started complaining about it now, I suspect it's some C23-induced enum type handlign fixup in gcc-13 is the cause. Whatever the reason for starting to complain, the code and data types are indeed disgusting enough that the complaint is warranted. The wq code ends up creating various "helper constants" (like that WORK_STRUCT_WQ_DATA_MASK) using an enum type, which is all kinds of confused. The mask needs to be 'unsigned long', not some unspecified enum type. To make matters worse, the actual "mask and cast to a pointer" is repeated a couple of times, and the cast isn't even always done to the right pointer, but - as the error case above - to a 'void *' with then the compiler finishing the job. That's now how we roll in the kernel. So create the masks using the proper types rather than some ambiguous enumeration, and use a nice helper that actually does the type conversion in one well-defined place. Incidentally, this magically makes clang generate better code. That, admittedly, is really just a sign of clang having been seriously confused before, and cleaning up the typing unconfuses the compiler too. Reported-by: Dave Airlie Link: https://lore.kernel.org/lkml/CAPM=9twNnV4zMCvrPkw3H-ajZOH-01JVh_kDrxdPYQErz8ZTdA@mail.gmail.com/ Cc: Arnd Bergmann Cc: Tejun Heo Cc: Nick Desaulniers Cc: Nathan Chancellor Signed-off-by: Linus Torvalds commit e69b9bc170c6d93ee375a5cbfd15f74c0fb59bdd Author: Clark Wang Date: Mon May 29 16:02:51 2023 +0800 i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle Claim clkhi and clklo as integer type to avoid possible calculation errors caused by data overflow. Fixes: a55fa9d0e42e ("i2c: imx-lpi2c: add low power i2c bus driver") Signed-off-by: Clark Wang Signed-off-by: Carlos Song Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang commit cd9489623c29aa2f8cc07088168afb6e0d5ef06d Author: Shuai Jiang Date: Tue Apr 18 21:56:12 2023 +0800 i2c: qup: Add missing unwind goto in qup_i2c_probe() Smatch Warns: drivers/i2c/busses/i2c-qup.c:1784 qup_i2c_probe() warn: missing unwind goto? The goto label "fail_runtime" and "fail" will disable qup->pclk, but here qup->pclk failed to obtain, in order to be consistent, change the direct return to goto label "fail_dma". Fixes: 9cedf3b2f099 ("i2c: qup: Add bam dma capabilities") Signed-off-by: Shuai Jiang Reviewed-by: Dongliang Mu Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang Cc: # v4.6+ commit bd5c7104d41b62a2ae5d7f11d07e7c5f232eee42 Author: Rob Herring Date: Tue Jun 13 14:11:04 2023 -0600 dt-bindings: i2c: opencores: Add missing type for "regstep" "regstep" may be deprecated, but it still needs a type. Fixes: 8ad69f490516 ("dt-bindings: i2c: convert ocores binding to yaml") Signed-off-by: Rob Herring Reviewed-by: Andrew Lunn Reviewed-by: Peter Korsgaard Reviewed-by: Conor Dooley Acked-by: Andi Shyti Signed-off-by: Wolfram Sang commit 9bd9be5cbaf8a8faa175ef4fba04a5623281debe Merge: 45a3e24f65e90 54d217406afe2 Author: Dave Airlie Date: Fri Jun 23 12:16:47 2023 +1000 Merge tag 'drm-misc-fixes-2023-06-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v6.4: - Qaic imported dma-buf fix. - Fix null pointer deref when printing a dp-mst message. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/e96b1965-ba67-7cc5-2358-826eb5b9b998@lankhorst.se commit 8a28a0b6f1a1dcbf5a834600a9acfbe2ba51e5eb Merge: 412d070b31c3e 2ba7e7ebb6a71 Author: Linus Torvalds Date: Thu Jun 22 17:59:51 2023 -0700 Merge tag 'net-6.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from ipsec, bpf, mptcp and netfilter. Current release - regressions: - netfilter: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain - eth: mlx5e: - fix scheduling of IPsec ASO query while in atomic - free IRQ rmap and notifier on kernel shutdown Current release - new code bugs: - phy: manual remove LEDs to ensure correct ordering Previous releases - regressions: - mptcp: fix possible divide by zero in recvmsg() - dsa: revert "net: phy: dp83867: perform soft reset and retain established link" Previous releases - always broken: - sched: netem: acquire qdisc lock in netem_change() - bpf: - fix verifier id tracking of scalars on spill - fix NULL dereference on exceptions - accept function names that contain dots - netfilter: disallow element updates of bound anonymous sets - mptcp: ensure listener is unhashed before updating the sk status - xfrm: - add missed call to delete offloaded policies - fix inbound ipv4/udp/esp packets to UDPv6 dualstack sockets - selftests: fixes for FIPS mode - dsa: mt7530: fix multiple CPU ports, BPDU and LLDP handling - eth: sfc: use budget for TX completions Misc: - wifi: iwlwifi: add support for SO-F device with PCI id 0x7AF0" * tag 'net-6.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (74 commits) revert "net: align SO_RCVMARK required privileges with SO_MARK" net: wwan: iosm: Convert single instance struct member to flexible array sch_netem: acquire qdisc lock in netem_change() selftests: forwarding: Fix race condition in mirror installation wifi: mac80211: report all unusable beacon frames mptcp: ensure listener is unhashed before updating the sk status mptcp: drop legacy code around RX EOF mptcp: consolidate fallback and non fallback state machine mptcp: fix possible list corruption on passive MPJ mptcp: fix possible divide by zero in recvmsg() mptcp: handle correctly disconnect() failures bpf: Force kprobe multi expected_attach_type for kprobe_multi link bpf/btf: Accept function names that contain dots Revert "net: phy: dp83867: perform soft reset and retain established link" net: mdio: fix the wrong parameters netfilter: nf_tables: Fix for deleting base chains with payload netfilter: nfnetlink_osf: fix module autoload netfilter: nf_tables: drop module reference after updating chain netfilter: nf_tables: disallow timeout for anonymous sets netfilter: nf_tables: disallow updates of anonymous sets ... commit 412d070b31c3e4018afc6bb1712709df0464da48 Merge: e7758c0ddbc48 2623b3dc875a3 Author: Linus Torvalds Date: Thu Jun 22 17:54:10 2023 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM: - Correctly save/restore PMUSERNR_EL0 when host userspace is using PMU counters directly - Fix GICv2 emulation on GICv3 after the locking rework - Don't use smp_processor_id() in kvm_pmu_probe_armpmu(), and document why Generic: - Avoid setting page table entries pointing to a deleted memslot if a host page table entry is changed concurrently with the deletion" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: Avoid illegal stage2 mapping on invalid memory slot KVM: arm64: Use raw_smp_processor_id() in kvm_pmu_probe_armpmu() KVM: arm64: Restore GICv2-on-GICv3 functionality KVM: arm64: PMU: Don't overwrite PMUSERENR with vcpu loaded KVM: arm64: PMU: Restore the host's PMUSERENR_EL0 commit e7758c0ddbc48fec149baea667d2abc85229a997 Merge: 4a426aa1a2967 dfaed3e1fa709 Author: Linus Torvalds Date: Thu Jun 22 17:49:40 2023 -0700 Merge tag 'powerpc-6.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fix from Michael Ellerman: - Disable IRQs when switching mm in exit_lazy_flush_tlb() called from exit_mmap() Thanks to Nicholas Piggin and Sachin Sant. * tag 'powerpc-6.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s/radix: Fix exit lazy tlb mm switch with irqs enabled commit 4a426aa1a2967e4963a77bddaeab143f1d1f821f Merge: 937650021171f 40994ce0ea010 Author: Linus Torvalds Date: Thu Jun 22 17:47:07 2023 -0700 Merge tag 'pci-v6.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci fix from Bjorn Helgaas: - Transfer Intel LGM GW PCIe maintenance from Rahul Tanwar to Chuanhua Lei (Zhu YiXin) * tag 'pci-v6.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: MAINTAINERS: Add Chuanhua Lei as Intel LGM GW PCIe maintainer commit 937650021171f20e3fc743ef34fb4792f111946d Merge: 65d48989f81b9 413db49973024 Author: Linus Torvalds Date: Thu Jun 22 17:42:07 2023 -0700 Merge tag 'mmc-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: - Fix support for deferred probing for several host drivers - litex_mmc: Use async probe as it's common for all mmc hosts - meson-gx: Fix bug when scheduling while atomic - mmci_stm32: Fix max busy timeout calculation - sdhci-msm: Disable broken 64-bit DMA on MSM8916 * tag 'mmc-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: usdhi60rol0: fix deferred probing mmc: sunxi: fix deferred probing mmc: sh_mmcif: fix deferred probing mmc: sdhci-spear: fix deferred probing mmc: sdhci-acpi: fix deferred probing mmc: owl: fix deferred probing mmc: omap_hsmmc: fix deferred probing mmc: omap: fix deferred probing mmc: mvsdio: fix deferred probing mmc: mtk-sd: fix deferred probing mmc: meson-gx: fix deferred probing mmc: bcm2835: fix deferred probing mmc: litex_mmc: set PROBE_PREFER_ASYNCHRONOUS mmc: meson-gx: remove redundant mmc_request_done() call from irq context mmc: mmci: stm32: fix max busy timeout calculation mmc: sdhci-msm: Disable broken 64-bit DMA on MSM8916 commit 65d48989f81b976b43c8b42c050f157900f61321 Merge: c213de632f7ae 146b6f6855e76 Author: Linus Torvalds Date: Thu Jun 22 17:38:11 2023 -0700 Merge tag 'platform-drivers-x86-v6.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fix from Hans de Goede: "One small fix for an AMD PMF driver issue which is causing issues for users of just released AMD laptop models" * tag 'platform-drivers-x86-v6.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86/amd/pmf: Register notify handler only if SPS is enabled commit c213de632f7ae293409051733d24c7c6afc15292 Merge: 5950a0066f415 26fed83653d01 Author: Linus Torvalds Date: Thu Jun 22 17:32:34 2023 -0700 Merge tag 'io_uring-6.4-2023-06-21' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: "A fix for a race condition with poll removal and linked timeouts, and then a few followup fixes/tweaks for the msg_control patch from last week. Not super important, particularly the sparse fixup, as it was broken before that recent commit. But let's get it sorted for real for this release, rather than just have it broken a bit differently" * tag 'io_uring-6.4-2023-06-21' of git://git.kernel.dk/linux: io_uring/net: use the correct msghdr union member in io_sendmsg_copy_hdr io_uring/net: disable partial retries for recvmsg with cmsg io_uring/net: clear msg_controllen on partial sendmsg retry io_uring/poll: serialize poll linked timer start with poll removal commit 5950a0066f415e4409a3b39ed6c5de1a04131894 Merge: dad9774deaf1c 6f363f5aa8455 Author: Linus Torvalds Date: Thu Jun 22 17:27:16 2023 -0700 Merge tag 'cgroup-for-6.4-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "It's late but here are two bug fixes. Both fix problems which can be severe but are very confined in scope. The risk to most use cases should be minimal. - Fix for an old bug which triggers if a cgroup subsystem is remounted to a different hierarchy while someone is reading its cgroup.procs/tasks file. The risk is pretty low given how seldom cgroup subsystems are moved across hierarchies. - We moved cpus_read_lock() outside of cgroup internal locks a while ago but forgot to update the legacy_freezer leading to lockdep triggers. Fixed" * tag 'cgroup-for-6.4-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: Do not corrupt task iteration when rebinding subsystem cgroup,freezer: hold cpu_hotplug_lock before freezer_mutex in freezer_css_{online,offline}() commit 2623b3dc875a3c92dd0e0775cd19fbaeef0574ca Merge: 2230f9e1171a2 30c60dda219dd Author: Paolo Bonzini Date: Thu Jun 22 15:28:26 2023 -0400 Merge tag 'kvmarm-fixes-6.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.4, take #4 - Correctly save/restore PMUSERNR_EL0 when host userspace is using PMU counters directly - Fix GICv2 emulation on GICv3 after the locking rework - Don't use smp_processor_id() in kvm_pmu_probe_armpmu(), and document why... commit 7b59e8ae92fe089fed8ff1b23e53442ae5b204c9 Author: Douglas Anderson Date: Fri Jun 16 08:14:41 2023 -0700 arm64: dts: qcom: sc7280: Mark SCM as dma-coherent for chrome devices Just like for sc7180 devices using the Chrome bootflow (AKA trogdor and IDP), sc7280 devices using the Chrome bootflow also need their firmware marked dma-coherent. On sc7280 this wasn't causing WiFi to fail to startup, since WiFi works differently there. However, on sc7280 devices we were still getting the message at bootup after commit 7bd6680b47fa ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()"""): qcom_scm firmware:scm: Assign memory protection call failed -22 qcom_rmtfs_mem 9c900000.memory: assign memory failed qcom_rmtfs_mem: probe of 9c900000.memory failed with error -22 We should mark SCM properly just like we did for trogdor. Fixes: 7bd6680b47fa ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()""") Fixes: 7a1f4e7f740d ("arm64: dts: qcom: sc7280: Add basic dts/dtsi files for sc7280 soc") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230616081440.v2.4.I21dc14a63327bf81c6bb58fe8ed91dbdc9849ee2@changeid Signed-off-by: Bjorn Andersson commit a54b7fa6b9ab6b4ecb7d9aba6b1a0ce1bcc961e3 Author: Douglas Anderson Date: Fri Jun 16 08:14:40 2023 -0700 arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for trogdor Trogdor devices use firmware backed by TF-A instead of Qualcomm's normal TZ. On TF-A we end up mapping memory as cacheable. Specifically, you can see in Trogdor's TF-A code [1] in qti_sip_mem_assign() that we call qti_mmap_add_dynamic_region() with MT_RO_DATA. This translates down to MT_MEMORY instead of MT_NON_CACHEABLE or MT_DEVICE. Apparently Qualcomm's normal TZ implementation maps the memory as non-cacheable. Let's add the "dma-coherent" attribute to the SCM for trogdor. Adding "dma-coherent" like this fixes WiFi on sc7180-trogdor devices. WiFi was broken as of commit 7bd6680b47fa ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()"""). Specifically at bootup we'd get: qcom_scm firmware:scm: Assign memory protection call failed -22 qcom_rmtfs_mem 94600000.memory: assign memory failed qcom_rmtfs_mem: probe of 94600000.memory failed with error -22 From discussion on the mailing lists [2] and over IRC [3], it was determined that we should always have been tagging the SCM as dma-coherent on trogdor but that the old "invalidate" happened to make things work most of the time. Tagging it properly like this is a much more robust solution. [1] https://chromium.googlesource.com/chromiumos/third_party/arm-trusted-firmware/+/refs/heads/firmware-trogdor-13577.B/plat/qti/common/src/qti_syscall.c [2] https://lore.kernel.org/r/20230614165904.1.I279773c37e2c1ed8fbb622ca6d1397aea0023526@changeid [3] https://oftc.irclog.whitequark.org/linux-msm/2023-06-15 Fixes: 7bd6680b47fa ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()""") Fixes: 7ec3e67307f8 ("arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt") Reviewed-by: Konrad Dybcio Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230616081440.v2.3.Ic62daa649b47b656b313551d646c4de9a7da4bd4@changeid Signed-off-by: Bjorn Andersson commit 9a5f0b11e49e27f0a01a73c31d05df4a95bea3fa Author: Douglas Anderson Date: Fri Jun 16 08:14:39 2023 -0700 arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for IDP sc7180-idp is, for most intents and purposes, a trogdor device. Specifically, sc7180-idp is designed to run the same style of firmware as trogdor devices. This can be seen from the fact that IDP has the same "Reserved memory changes" in its device tree that trogdor has. Recently it was realized that we need to mark SCM as dma-coherent to match what trogdor's style of firmware (based on TF-A) does [1]. That means we need this dma-coherent tag on IDP as well. Without this, on newer versions of Linux, specifically those with commit 7bd6680b47fa ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()"""), WiFi will fail to work. At bootup you'll see: qcom_scm firmware:scm: Assign memory protection call failed -22 qcom_rmtfs_mem 94600000.memory: assign memory failed qcom_rmtfs_mem: probe of 94600000.memory failed with error -22 [1] https://lore.kernel.org/r/20230615145253.1.Ic62daa649b47b656b313551d646c4de9a7da4bd4@changeid Fixes: 7bd6680b47fa ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()""") Fixes: f5ab220d162c ("arm64: dts: qcom: sc7180: Add remoteproc enablers") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230616081440.v2.2.I3c17d546d553378aa8a0c68c3fe04bccea7cba17@changeid Signed-off-by: Bjorn Andersson commit c0877829ada0406233aee5bd54f6813db79d5f1f Author: Douglas Anderson Date: Fri Jun 16 08:14:38 2023 -0700 dt-bindings: firmware: qcom,scm: Document that SCM can be dma-coherent Trogdor devices use firmware backed by TF-A instead of Qualcomm's normal TZ. On TF-A we end up mapping memory as cacheable. Specifically, you can see in Trogdor's TF-A code [1] in qti_sip_mem_assign() that we call qti_mmap_add_dynamic_region() with MT_RO_DATA. This translates down to MT_MEMORY instead of MT_NON_CACHEABLE or MT_DEVICE. Let's allow devices like trogdor to be described properly by allowing "dma-coherent" in the SCM node. Signed-off-by: Douglas Anderson Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230616081440.v2.1.Ie79b5f0ed45739695c9970df121e11d724909157@changeid Signed-off-by: Bjorn Andersson commit 2230f9e1171a2e9731422a14d1bbc313c0b719d1 Author: Gavin Shan Date: Thu Jun 15 15:42:59 2023 +1000 KVM: Avoid illegal stage2 mapping on invalid memory slot We run into guest hang in edk2 firmware when KSM is kept as running on the host. The edk2 firmware is waiting for status 0x80 from QEMU's pflash device (TYPE_PFLASH_CFI01) during the operation of sector erasing or buffered write. The status is returned by reading the memory region of the pflash device and the read request should have been forwarded to QEMU and emulated by it. Unfortunately, the read request is covered by an illegal stage2 mapping when the guest hang issue occurs. The read request is completed with QEMU bypassed and wrong status is fetched. The edk2 firmware runs into an infinite loop with the wrong status. The illegal stage2 mapping is populated due to same page sharing by KSM at (C) even the associated memory slot has been marked as invalid at (B) when the memory slot is requested to be deleted. It's notable that the active and inactive memory slots can't be swapped when we're in the middle of kvm_mmu_notifier_change_pte() because kvm->mn_active_invalidate_count is elevated, and kvm_swap_active_memslots() will busy loop until it reaches to zero again. Besides, the swapping from the active to the inactive memory slots is also avoided by holding &kvm->srcu in __kvm_handle_hva_range(), corresponding to synchronize_srcu_expedited() in kvm_swap_active_memslots(). CPU-A CPU-B ----- ----- ioctl(kvm_fd, KVM_SET_USER_MEMORY_REGION) kvm_vm_ioctl_set_memory_region kvm_set_memory_region __kvm_set_memory_region kvm_set_memslot(kvm, old, NULL, KVM_MR_DELETE) kvm_invalidate_memslot kvm_copy_memslot kvm_replace_memslot kvm_swap_active_memslots (A) kvm_arch_flush_shadow_memslot (B) same page sharing by KSM kvm_mmu_notifier_invalidate_range_start : kvm_mmu_notifier_change_pte kvm_handle_hva_range __kvm_handle_hva_range kvm_set_spte_gfn (C) : kvm_mmu_notifier_invalidate_range_end Fix the issue by skipping the invalid memory slot at (C) to avoid the illegal stage2 mapping so that the read request for the pflash's status is forwarded to QEMU and emulated by it. In this way, the correct pflash's status can be returned from QEMU to break the infinite loop in the edk2 firmware. We tried a git-bisect and the first problematic commit is cd4c71835228 (" KVM: arm64: Convert to the gfn-based MMU notifier callbacks"). With this, clean_dcache_guest_page() is called after the memory slots are iterated in kvm_mmu_notifier_change_pte(). clean_dcache_guest_page() is called before the iteration on the memory slots before this commit. This change literally enlarges the racy window between kvm_mmu_notifier_change_pte() and memory slot removal so that we're able to reproduce the issue in a practical test case. However, the issue exists since commit d5d8184d35c9 ("KVM: ARM: Memory virtualization setup"). Cc: stable@vger.kernel.org # v3.9+ Fixes: d5d8184d35c9 ("KVM: ARM: Memory virtualization setup") Reported-by: Shuai Hu Reported-by: Zhenyu Zhang Signed-off-by: Gavin Shan Reviewed-by: David Hildenbrand Reviewed-by: Oliver Upton Reviewed-by: Peter Xu Reviewed-by: Sean Christopherson Reviewed-by: Shaoqin Huang Message-Id: <20230615054259.14911-1-gshan@redhat.com> Signed-off-by: Paolo Bonzini commit cb091225a538005965b7c59c7c33ebe5358a5815 Author: Qu Wenruo Date: Thu Jun 22 14:42:40 2023 +0800 btrfs: fix remaining u32 overflows when left shifting stripe_nr There was regression caused by a97699d1d610 ("btrfs: replace map_lookup->stripe_len by BTRFS_STRIPE_LEN") and supposedly fixed by a7299a18a179 ("btrfs: fix u32 overflows when left shifting stripe_nr"). To avoid code churn the fix was open coding the type casts but unfortunately missed one which was still possible to hit [1]. The missing place was assignment of bioc->full_stripe_logical inside btrfs_map_block(). Fix it by adding a helper that does the safe calculation of the offset and use it everywhere even though it may not be strictly necessary due to already using u64 types. This replaces all remaining "<< BTRFS_STRIPE_LEN_SHIFT" calls. [1] https://lore.kernel.org/linux-btrfs/20230622065438.86402-1-wqu@suse.com/ Fixes: a7299a18a179 ("btrfs: fix u32 overflows when left shifting stripe_nr") Signed-off-by: Qu Wenruo Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit 9c39b7a905d84b7da5f59d80f2e455853fea7217 Author: Ming Lei Date: Thu Jun 22 16:42:49 2023 +0800 block: make sure local irq is disabled when calling __blkcg_rstat_flush When __blkcg_rstat_flush() is called from cgroup_rstat_flush*() code path, interrupt is always disabled. When we start to flush blkcg per-cpu stats list in __blkg_release() for avoiding to leak blkcg_gq's reference in commit 20cb1c2fb756 ("blk-cgroup: Flush stats before releasing blkcg_gq"), local irq isn't disabled yet, then lockdep warning may be triggered because the dependent cgroup locks may be acquired from irq(soft irq) handler. Fix the issue by disabling local irq always. Fixes: 20cb1c2fb756 ("blk-cgroup: Flush stats before releasing blkcg_gq") Reported-by: Shinichiro Kawasaki Closes: https://lore.kernel.org/linux-block/pz2wzwnmn5tk3pwpskmjhli6g3qly7eoknilb26of376c7kwxy@qydzpvt6zpis/T/#u Cc: stable@vger.kernel.org Cc: Jay Shin Cc: Tejun Heo Cc: Waiman Long Signed-off-by: Ming Lei Reviewed-by: Waiman Long Link: https://lore.kernel.org/r/20230622084249.1208005-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 2ba7e7ebb6a71407cbe25cd349c9b05d40520bf0 Merge: a9628e88776eb 42e344f016884 Author: Paolo Abeni Date: Thu Jun 22 14:39:06 2023 +0200 Merge tag 'nf-23-06-21' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS fixes for net This is v3, including a crash fix for patch 01/14. The following patchset contains Netfilter/IPVS fixes for net: 1) Fix UDP segmentation with IPVS tunneled traffic, from Terin Stock. 2) Fix chain binding transaction logic, add a bound flag to rule transactions. Remove incorrect logic in nft_data_hold() and nft_data_release(). 3) Add a NFT_TRANS_PREPARE_ERROR deactivate state to deal with releasing the set/chain as a follow up to 1240eb93f061 ("netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE") 4) Drop map element references from preparation phase instead of set destroy path, otherwise bogus EBUSY with transactions such as: flush chain ip x y delete chain ip x w where chain ip x y contains jump/goto from set elements. 5) Pipapo set type does not regard generation mask from the walk iteration. 6) Fix reference count underflow in set element reference to stateful object. 7) Several patches to tighten the nf_tables API: - disallow set element updates of bound anonymous set - disallow unbound anonymous set/chain at the end of transaction. - disallow updates of anonymous set. - disallow timeout configuration for anonymous sets. 8) Fix module reference leak in chain updates. 9) Fix nfnetlink_osf module autoload. 10) Fix deletion of basechain when NFTA_CHAIN_HOOK is specified as in iptables-nft. This Netfilter batch is larger than usual at this stage, I am aware we are fairly late in the -rc cycle, if you prefer to route them through net-next, please let me know. netfilter pull request 23-06-21 * tag 'nf-23-06-21' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_tables: Fix for deleting base chains with payload netfilter: nfnetlink_osf: fix module autoload netfilter: nf_tables: drop module reference after updating chain netfilter: nf_tables: disallow timeout for anonymous sets netfilter: nf_tables: disallow updates of anonymous sets netfilter: nf_tables: reject unbound chain set before commit phase netfilter: nf_tables: reject unbound anonymous set before commit phase netfilter: nf_tables: disallow element updates of bound anonymous sets netfilter: nf_tables: fix underflow in object reference counter netfilter: nft_set_pipapo: .walk does not deal with generations netfilter: nf_tables: drop map element references from preparation phase netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain netfilter: nf_tables: fix chain binding transaction logic ipvs: align inner_mac_header for encapsulation ==================== Link: https://lore.kernel.org/r/20230621100731.68068-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit a9628e88776eb7d045cf46467f1afdd0f7fe72ea Author: Maciej Żenczykowski Date: Sun Jun 18 03:31:30 2023 -0700 revert "net: align SO_RCVMARK required privileges with SO_MARK" This reverts commit 1f86123b9749 ("net: align SO_RCVMARK required privileges with SO_MARK") because the reasoning in the commit message is not really correct: SO_RCVMARK is used for 'reading' incoming skb mark (via cmsg), as such it is more equivalent to 'getsockopt(SO_MARK)' which has no priv check and retrieves the socket mark, rather than 'setsockopt(SO_MARK) which sets the socket mark and does require privs. Additionally incoming skb->mark may already be visible if sysctl_fwmark_reflect and/or sysctl_tcp_fwmark_accept are enabled. Furthermore, it is easier to block the getsockopt via bpf (either cgroup setsockopt hook, or via syscall filters) then to unblock it if it requires CAP_NET_RAW/ADMIN. On Android the socket mark is (among other things) used to store the network identifier a socket is bound to. Setting it is privileged, but retrieving it is not. We'd like unprivileged userspace to be able to read the network id of incoming packets (where mark is set via iptables [to be moved to bpf])... An alternative would be to add another sysctl to control whether setting SO_RCVMARK is privilged or not. (or even a MASK of which bits in the mark can be exposed) But this seems like over-engineering... Note: This is a non-trivial revert, due to later merged commit e42c7beee71d ("bpf: net: Consider has_current_bpf_ctx() when testing capable() in sk_setsockopt()") which changed both 'ns_capable' into 'sockopt_ns_capable' calls. Fixes: 1f86123b9749 ("net: align SO_RCVMARK required privileges with SO_MARK") Cc: Larysa Zaremba Cc: Simon Horman Cc: Paolo Abeni Cc: Eyal Birger Cc: Jakub Kicinski Cc: Eric Dumazet Cc: Patrick Rohr Signed-off-by: Maciej Żenczykowski Reviewed-by: Simon Horman Reviewed-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20230618103130.51628-1-maze@google.com Signed-off-by: Paolo Abeni commit dec24b3b339487e58ce2da2875e9ee0316cc7e70 Author: Kees Cook Date: Tue Jun 20 12:42:38 2023 -0700 net: wwan: iosm: Convert single instance struct member to flexible array struct mux_adth actually ends with multiple struct mux_adth_dg members. This is seen both in the comments about the member: /** * struct mux_adth - Structure of the Aggregated Datagram Table Header. ... * @dg: datagramm table with variable length */ and in the preparation for populating it: adth_dg_size = offsetof(struct mux_adth, dg) + ul_adb->dg_count[i] * sizeof(*dg); ... adth_dg_size -= offsetof(struct mux_adth, dg); memcpy(&adth->dg, ul_adb->dg[i], adth_dg_size); This was reported as a run-time false positive warning: memcpy: detected field-spanning write (size 16) of single field "&adth->dg" at drivers/net/wwan/iosm/iosm_ipc_mux_codec.c:852 (size 8) Adjust the struct mux_adth definition and associated sizeof() math; no binary output differences are observed in the resulting object file. Reported-by: Florian Klink Closes: https://lore.kernel.org/lkml/dbfa25f5-64c8-5574-4f5d-0151ba95d232@gmail.com/ Fixes: 1f52d7b62285 ("net: wwan: iosm: Enable M.2 7360 WWAN card support") Cc: M Chetan Kumar Cc: Bagas Sanjaya Cc: Intel Corporation Cc: Loic Poulain Cc: Sergey Ryazanov Cc: Johannes Berg Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: "Gustavo A. R. Silva" Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230620194234.never.023-kees@kernel.org Signed-off-by: Paolo Abeni commit 2174a08db80d1efeea382e25ac41c4e7511eb6d6 Author: Eric Dumazet Date: Tue Jun 20 18:44:25 2023 +0000 sch_netem: acquire qdisc lock in netem_change() syzbot managed to trigger a divide error [1] in netem. It could happen if q->rate changes while netem_enqueue() is running, since q->rate is read twice. It turns out netem_change() always lacked proper synchronization. [1] divide error: 0000 [#1] SMP KASAN CPU: 1 PID: 7867 Comm: syz-executor.1 Not tainted 6.1.30-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 RIP: 0010:div64_u64 include/linux/math64.h:69 [inline] RIP: 0010:packet_time_ns net/sched/sch_netem.c:357 [inline] RIP: 0010:netem_enqueue+0x2067/0x36d0 net/sched/sch_netem.c:576 Code: 89 e2 48 69 da 00 ca 9a 3b 42 80 3c 28 00 4c 8b a4 24 88 00 00 00 74 0d 4c 89 e7 e8 c3 4f 3b fd 48 8b 4c 24 18 48 89 d8 31 d2 <49> f7 34 24 49 01 c7 4c 8b 64 24 48 4d 01 f7 4c 89 e3 48 c1 eb 03 RSP: 0018:ffffc9000dccea60 EFLAGS: 00010246 RAX: 000001a442624200 RBX: 000001a442624200 RCX: ffff888108a4f000 RDX: 0000000000000000 RSI: 000000000000070d RDI: 000000000000070d RBP: ffffc9000dcceb90 R08: ffffffff849c5e26 R09: fffffbfff10e1297 R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888108a4f358 R13: dffffc0000000000 R14: 0000001a8cd9a7ec R15: 0000000000000000 FS: 00007fa73fe18700(0000) GS:ffff8881f6b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa73fdf7718 CR3: 000000011d36e000 CR4: 0000000000350ee0 Call Trace: [] __dev_xmit_skb net/core/dev.c:3931 [inline] [] __dev_queue_xmit+0xcf5/0x3370 net/core/dev.c:4290 [] dev_queue_xmit include/linux/netdevice.h:3030 [inline] [] neigh_hh_output include/net/neighbour.h:531 [inline] [] neigh_output include/net/neighbour.h:545 [inline] [] ip_finish_output2+0xb92/0x10d0 net/ipv4/ip_output.c:235 [] __ip_finish_output+0xc3/0x2b0 [] ip_finish_output+0x31/0x2a0 net/ipv4/ip_output.c:323 [] NF_HOOK_COND include/linux/netfilter.h:298 [inline] [] ip_output+0x224/0x2a0 net/ipv4/ip_output.c:437 [] dst_output include/net/dst.h:444 [inline] [] ip_local_out net/ipv4/ip_output.c:127 [inline] [] __ip_queue_xmit+0x1425/0x2000 net/ipv4/ip_output.c:542 [] ip_queue_xmit+0x4c/0x70 net/ipv4/ip_output.c:556 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Stephen Hemminger Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Reviewed-by: Jamal Hadi Salim Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230620184425.1179809-1-edumazet@google.com Signed-off-by: Paolo Abeni commit 146b6f6855e7656e8329910606595220c761daac Author: Shyam Sundar S K Date: Thu Jun 22 11:33:09 2023 +0530 platform/x86/amd/pmf: Register notify handler only if SPS is enabled Power source notify handler is getting registered even when none of the PMF feature in enabled leading to a crash. ... [ 22.592162] Call Trace: [ 22.592164] [ 22.592164] ? rcu_note_context_switch+0x5e0/0x660 [ 22.592166] ? __warn+0x81/0x130 [ 22.592171] ? rcu_note_context_switch+0x5e0/0x660 [ 22.592172] ? report_bug+0x171/0x1a0 [ 22.592175] ? prb_read_valid+0x1b/0x30 [ 22.592177] ? handle_bug+0x3c/0x80 [ 22.592178] ? exc_invalid_op+0x17/0x70 [ 22.592179] ? asm_exc_invalid_op+0x1a/0x20 [ 22.592182] ? rcu_note_context_switch+0x5e0/0x660 [ 22.592183] ? acpi_ut_delete_object_desc+0x86/0xb0 [ 22.592186] ? acpi_ut_update_ref_count.part.0+0x22d/0x930 [ 22.592187] __schedule+0xc0/0x1410 [ 22.592189] ? ktime_get+0x3c/0xa0 [ 22.592191] ? lapic_next_event+0x1d/0x30 [ 22.592193] ? hrtimer_start_range_ns+0x25b/0x350 [ 22.592196] schedule+0x5e/0xd0 [ 22.592197] schedule_hrtimeout_range_clock+0xbe/0x140 [ 22.592199] ? __pfx_hrtimer_wakeup+0x10/0x10 [ 22.592200] usleep_range_state+0x64/0x90 [ 22.592203] amd_pmf_send_cmd+0x106/0x2a0 [amd_pmf bddfe0fe3712aaa99acce3d5487405c5213c6616] [ 22.592207] amd_pmf_update_slider+0x56/0x1b0 [amd_pmf bddfe0fe3712aaa99acce3d5487405c5213c6616] [ 22.592210] amd_pmf_set_sps_power_limits+0x72/0x80 [amd_pmf bddfe0fe3712aaa99acce3d5487405c5213c6616] [ 22.592213] amd_pmf_pwr_src_notify_call+0x49/0x90 [amd_pmf bddfe0fe3712aaa99acce3d5487405c5213c6616] [ 22.592216] notifier_call_chain+0x5a/0xd0 [ 22.592218] atomic_notifier_call_chain+0x32/0x50 ... Fix this by moving the registration of source change notify handler only when SPS(Static Slider) is advertised as supported. Reported-by: Allen Zhong Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217571 Fixes: 4c71ae414474 ("platform/x86/amd/pmf: Add support SPS PMF feature") Tested-by: Patil Rajesh Reddy Reviewed-by: Mario Limonciello Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20230622060309.310001-1-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit c7c059fba6fb19c3bc924925c984772e733cb594 Author: Danielle Ratson Date: Tue Jun 20 14:45:15 2023 +0200 selftests: forwarding: Fix race condition in mirror installation When mirroring to a gretap in hardware the device expects to be programmed with the egress port and all the encapsulating headers. This requires the driver to resolve the path the packet will take in the software data path and program the device accordingly. If the path cannot be resolved (in this case because of an unresolved neighbor), then mirror installation fails until the path is resolved. This results in a race that causes the test to sometimes fail. Fix this by setting the neighbor's state to permanent in a couple of tests, so that it is always valid. Fixes: 35c31d5c323f ("selftests: forwarding: Test mirror-to-gretap w/ UL 802.1d") Fixes: 239e754af854 ("selftests: forwarding: Test mirror-to-gretap w/ UL 802.1q") Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Petr Machata Link: https://lore.kernel.org/r/268816ac729cb6028c7a34d4dda6f4ec7af55333.1687264607.git.petrm@nvidia.com Signed-off-by: Paolo Abeni commit 7f4e09700bdc13ce9aafa279bc999051e9bcda35 Author: Benjamin Berg Date: Wed Jun 21 14:05:44 2023 +0200 wifi: mac80211: report all unusable beacon frames Properly check for RX_DROP_UNUSABLE now that the new drop reason infrastructure is used. Without this change, the comparison will always be false as a more specific reason is given in the lower bits of result. Fixes: baa951a1c177 ("mac80211: use the new drop reasons infrastructure") Signed-off-by: Benjamin Berg Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20230621120543.412920-2-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 533aa0baaa1fe1f9f7f3ae0a368c22df8f3cf127 Merge: 59bb14bda2f86 57fc0f1ceaa40 Author: Jakub Kicinski Date: Wed Jun 21 22:44:59 2023 -0700 Merge branch 'mptcp-fixes-for-6-4' Matthieu Baerts says: ==================== mptcp: fixes for 6.4 Patch 1 correctly handles disconnect() failures that can happen in some specific cases: now the socket state is set as unconnected as expected. That fixes an issue introduced in v6.2. Patch 2 fixes a divide by zero bug in mptcp_recvmsg() with a fix similar to a recent one from Eric Dumazet for TCP introducing sk_wait_pending flag. It should address an issue present in MPTCP from almost the beginning, from v5.9. Patch 3 fixes a possible list corruption on passive MPJ even if the race seems very unlikely, better be safe than sorry. The possible issue is present from v5.17. Patch 4 consolidates fallback and non fallback state machines to avoid leaking some MPTCP sockets. The fix is likely needed for versions from v5.11. Patch 5 drops code that is no longer used after the introduction of patch 4/6. This is not really a fix but this patch can probably land in the -net tree as well not to leave unused code. Patch 6 ensures listeners are unhashed before updating their sk status to avoid possible deadlocks when diag info are going to be retrieved with a lock. Even if it should not be visible with the way we are currently getting diag info, the issue is present from v5.17. ==================== Link: https://lore.kernel.org/r/20230620-upstream-net-20230620-misc-fixes-for-v6-4-v1-0-f36aa5eae8b9@tessares.net Signed-off-by: Jakub Kicinski commit 57fc0f1ceaa4016354cf6f88533e20b56190e41a Author: Paolo Abeni Date: Tue Jun 20 18:24:23 2023 +0200 mptcp: ensure listener is unhashed before updating the sk status The MPTCP protocol access the listener subflow in a lockless manner in a couple of places (poll, diag). That works only if the msk itself leaves the listener status only after that the subflow itself has been closed/disconnected. Otherwise we risk deadlock in diag, as reported by Christoph. Address the issue ensuring that the first subflow (the listener one) is always disconnected before updating the msk socket status. Reported-by: Christoph Paasch Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/407 Fixes: b29fcfb54cd7 ("mptcp: full disconnect implementation") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit b7535cfed223a9f02f9530853616f197b386d775 Author: Paolo Abeni Date: Tue Jun 20 18:24:22 2023 +0200 mptcp: drop legacy code around RX EOF Thanks to the previous patch -- "mptcp: consolidate fallback and non fallback state machine" -- we can finally drop the "temporary hack" used to detect rx eof. Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 81c1d029016001f994ce1c46849c5e9900d8eab8 Author: Paolo Abeni Date: Tue Jun 20 18:24:21 2023 +0200 mptcp: consolidate fallback and non fallback state machine An orphaned msk releases the used resources via the worker, when the latter first see the msk in CLOSED status. If the msk status transitions to TCP_CLOSE in the release callback invoked by the worker's final release_sock(), such instance of the workqueue will not take any action. Additionally the MPTCP code prevents scheduling the worker once the socket reaches the CLOSE status: such msk resources will be leaked. The only code path that can trigger the above scenario is the __mptcp_check_send_data_fin() in fallback mode. Address the issue removing the special handling of fallback socket in __mptcp_check_send_data_fin(), consolidating the state machine for fallback and non fallback socket. Since non-fallback sockets do not send and do not receive data_fin, the mptcp code can update the msk internal status to match the next step in the SM every time data fin (ack) should be generated or received. As a consequence we can remove a bunch of checks for fallback from the fastpath. Fixes: 6e628cd3a8f7 ("mptcp: use mptcp release_cb for delayed tasks") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 56a666c48b038e91b76471289e2cf60c79d326b9 Author: Paolo Abeni Date: Tue Jun 20 18:24:20 2023 +0200 mptcp: fix possible list corruption on passive MPJ At passive MPJ time, if the msk socket lock is held by the user, the new subflow is appended to the msk->join_list under the msk data lock. In mptcp_release_cb()/__mptcp_flush_join_list(), the subflows in that list are moved from the join_list into the conn_list under the msk socket lock. Append and removal could race, possibly corrupting such list. Address the issue splicing the join list into a temporary one while still under the msk data lock. Found by code inspection, the race itself should be almost impossible to trigger in practice. Fixes: 3e5014909b56 ("mptcp: cleanup MPJ subflow list handling") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 0ad529d9fd2bfa3fc619552a8d2fb2f2ef0bce2e Author: Paolo Abeni Date: Tue Jun 20 18:24:19 2023 +0200 mptcp: fix possible divide by zero in recvmsg() Christoph reported a divide by zero bug in mptcp_recvmsg(): divide error: 0000 [#1] PREEMPT SMP CPU: 1 PID: 19978 Comm: syz-executor.6 Not tainted 6.4.0-rc2-gffcc7899081b #20 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.el7 04/01/2014 RIP: 0010:__tcp_select_window+0x30e/0x420 net/ipv4/tcp_output.c:3018 Code: 11 ff 0f b7 cd c1 e9 0c b8 ff ff ff ff d3 e0 89 c1 f7 d1 01 cb 21 c3 eb 17 e8 2e 83 11 ff 31 db eb 0e e8 25 83 11 ff 89 d8 99 7c 24 04 29 d3 65 48 8b 04 25 28 00 00 00 48 3b 44 24 10 75 60 RSP: 0018:ffffc90000a07a18 EFLAGS: 00010246 RAX: 000000000000ffd7 RBX: 000000000000ffd7 RCX: 0000000000040000 RDX: 0000000000000000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: 000000000000ffd7 R08: ffffffff820cf297 R09: 0000000000000001 R10: 0000000000000000 R11: ffffffff8103d1a0 R12: 0000000000003f00 R13: 0000000000300000 R14: ffff888101cf3540 R15: 0000000000180000 FS: 00007f9af4c09640(0000) GS:ffff88813bd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b33824000 CR3: 000000012f241001 CR4: 0000000000170ee0 Call Trace: __tcp_cleanup_rbuf+0x138/0x1d0 net/ipv4/tcp.c:1611 mptcp_recvmsg+0xcb8/0xdd0 net/mptcp/protocol.c:2034 inet_recvmsg+0x127/0x1f0 net/ipv4/af_inet.c:861 ____sys_recvmsg+0x269/0x2b0 net/socket.c:1019 ___sys_recvmsg+0xe6/0x260 net/socket.c:2764 do_recvmmsg+0x1a5/0x470 net/socket.c:2858 __do_sys_recvmmsg net/socket.c:2937 [inline] __se_sys_recvmmsg net/socket.c:2953 [inline] __x64_sys_recvmmsg+0xa6/0x130 net/socket.c:2953 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x47/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f9af58fc6a9 Code: 5c c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 4f 37 0d 00 f7 d8 64 89 01 48 RSP: 002b:00007f9af4c08cd8 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00000000006bc050 RCX: 00007f9af58fc6a9 RDX: 0000000000000001 RSI: 0000000020000140 RDI: 0000000000000004 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000f00 R11: 0000000000000246 R12: 00000000006bc05c R13: fffffffffffffea8 R14: 00000000006bc050 R15: 000000000001fe40 mptcp_recvmsg is allowed to release the msk socket lock when blocking, and before re-acquiring it another thread could have switched the sock to TCP_LISTEN status - with a prior connect(AF_UNSPEC) - also clearing icsk_ack.rcv_mss. Address the issue preventing the disconnect if some other process is concurrently performing a blocking syscall on the same socket, alike commit 4faeee0cf8a5 ("tcp: deny tcp_disconnect() when threads are waiting"). Fixes: a6b118febbab ("mptcp: add receive buffer auto-tuning") Cc: stable@vger.kernel.org Reported-by: Christoph Paasch Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/404 Signed-off-by: Paolo Abeni Tested-by: Christoph Paasch Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit c2b2ae3925b65070adb27d5a31a31c376f26dec7 Author: Paolo Abeni Date: Tue Jun 20 18:24:18 2023 +0200 mptcp: handle correctly disconnect() failures Currently the mptcp code has assumes that disconnect() can fail only at mptcp_sendmsg_fastopen() time - to avoid a deadlock scenario - and don't even bother returning an error code. Soon mptcp_disconnect() will handle more error conditions: let's track them explicitly. As a bonus, explicitly annotate TCP-level disconnect as not failing: the mptcp code never blocks for event on the subflows. Fixes: 7d803344fdc3 ("mptcp: fix deadlock in fastopen error path") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Tested-by: Christoph Paasch Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 59bb14bda2f86550d10e65c9091ba442a0ac4b45 Merge: a129b41fe0a8b db8eae6bc5c70 Author: Jakub Kicinski Date: Wed Jun 21 13:59:46 2023 -0700 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2023-06-21 We've added 7 non-merge commits during the last 14 day(s) which contain a total of 7 files changed, 181 insertions(+), 15 deletions(-). The main changes are: 1) Fix a verifier id tracking issue with scalars upon spill, from Maxim Mikityanskiy. 2) Fix NULL dereference if an exception is generated while a BPF subprogram is running, from Krister Johansen. 3) Fix a BTF verification failure when compiling kernel with LLVM_IAS=0, from Florent Revest. 4) Fix expected_attach_type enforcement for kprobe_multi link, from Jiri Olsa. 5) Fix a bpf_jit_dump issue for x86_64 to pick the correct JITed image, from Yonghong Song. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf: Force kprobe multi expected_attach_type for kprobe_multi link bpf/btf: Accept function names that contain dots selftests/bpf: add a test for subprogram extables bpf: ensure main program has an extable bpf: Fix a bpf_jit_dump issue for x86_64 with sysctl bpf_jit_enable. selftests/bpf: Add test cases to assert proper ID tracking on spill bpf: Fix verifier id tracking of scalars on spill ==================== Link: https://lore.kernel.org/r/20230621101116.16122-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit dad9774deaf1cf8e8f7483310dfb2690310193d2 Merge: 007034977130b 13bb06f8dd420 Author: Linus Torvalds Date: Wed Jun 21 12:36:34 2023 -0700 Merge tag 'timers-urgent-2023-06-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "A single regression fix for a regression fix: For a long time the tick was aligned to clock MONOTONIC so that the tick event happened at a multiple of nanoseconds per tick starting from clock MONOTONIC = 0. At some point this changed as the refined jiffies clocksource which is used during boot before the TSC or other clocksources becomes usable, was adjusted with a boot offset, so that time 0 is closer to the point where the kernel starts. This broke the assumption in the tick code that when the tick setup happens early on ktime_get() will return a multiple of nanoseconds per tick. As a consequence applications which aligned their periodic execution so that it does not collide with the tick were not longer guaranteed that the tick period starts from time 0. The fix for this regression was to realign the tick when it is initially set up to a multiple of tick periods. That works as long as the underlying tick device supports periodic mode, but breaks under certain conditions when the tick device supports only one shot mode. Depending on the offset, the alignment delta to clock MONOTONIC can get in a range where the minimal programming delta of the underlying clock event device is larger than the calculated delta to the next tick. This results in a boot hang as the tick code tries to play catch up, but as the tick never fires jiffies are not advanced so it keeps trying for ever. Solve this by moving the tick alignement into the NOHZ / HIGHRES enablement code because at that point it is guaranteed that the underlying clocksource is high resolution capable and not longer depending on the tick. This is far before user space starts, so at the point where applications try to align their timers, the old behaviour of the tick happening at a multiple of nanoseconds per tick starting from clock MONOTONIC = 0 is restored" * tag 'timers-urgent-2023-06-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tick/common: Align tick period during sched_timer setup commit 007034977130b49b618a5206aad54f634d9f169c Merge: 69cbeb61ff909 afd384f0dbea2 Author: Linus Torvalds Date: Wed Jun 21 11:10:40 2023 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fix from Michael Tsirkin: "A last minute revert to fix a regression" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: Revert "virtio-blk: support completion batching for the IRQ path" commit 69cbeb61ff9093a9155cb19a36d633033f71093a Author: Linus Torvalds Date: Wed Jun 21 10:58:46 2023 -0700 Revert "efi: random: refresh non-volatile random seed when RNG is initialized" This reverts commit e7b813b32a42a3a6281a4fd9ae7700a0257c1d50 (and the subsequent fix for it: 41a15855c1ee "efi: random: fix NULL-deref when refreshing seed"). It turns otu to cause non-deterministic boot stalls on at least a HP 6730b laptop. Reported-and-bisected-by: Sami Korkalainen Link: https://lore.kernel.org/all/GQUnKz2al3yke5mB2i1kp3SzNHjK8vi6KJEh7rnLrOQ24OrlljeCyeWveLW9pICEmB9Qc8PKdNt3w1t_g3-Uvxq1l8Wj67PpoMeWDoH8PKk=@proton.me/ Cc: Jason A. Donenfeld Cc: Bagas Sanjaya Cc: stable@kernel.org Signed-off-by: Linus Torvalds commit 2214170caabbff673935eb046a7edf4621213931 Merge: 6e6fb54de1ef3 9d7054fb3ac2e Author: Linus Torvalds Date: Wed Jun 21 10:32:42 2023 -0700 Merge tag 'spi-fix-v6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fix from Mark Brown: "One last fix for SPI, just a simple fix for incorrect handling of probe deferral for DMA in the Qualcomm GENI driver" * tag 'spi-fix-v6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi-geni-qcom: correctly handle -EPROBE_DEFER from dma_request_chan() commit 6e6fb54de1ef34fd20a0bdd99ce72a657814391b Merge: e075d681a27ee 7257d930aadcd Author: Linus Torvalds Date: Wed Jun 21 10:29:42 2023 -0700 Merge tag 'regulator-fix-v6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "One simple fix for v6.4, some incorrectly specified bitfield masks in the PCA9450 driver" * tag 'regulator-fix-v6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: pca9450: Fix LDO3OUT and LDO4OUT MASK commit e075d681a27eea6e3722749dda10cf3c4ddfc9fc Merge: 8ba90f5cc7170 c8e796895e231 Author: Linus Torvalds Date: Wed Jun 21 10:25:43 2023 -0700 Merge tag 'regmap-fix-v6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fix from Mark Brown: "One more fix for v6.4 The earlier fix to take account of the register data size when limiting raw register writes exposed the fact that the Intel AVMM bus was incorrectly specifying too low a limit on the maximum data transfer, it is only capable of transmitting one register so had set a transfer size limit that couldn't fit both the value and the the register address into a single message" * tag 'regmap-fix-v6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: spi-avmm: Fix regmap_bus max_raw_write commit 26fed83653d0154704cadb7afc418f315c7ac1f0 Author: Jens Axboe Date: Tue Jun 20 16:11:51 2023 -0600 io_uring/net: use the correct msghdr union member in io_sendmsg_copy_hdr Rather than assign the user pointer to msghdr->msg_control, assign it to msghdr->msg_control_user to make sparse happy. They are in a union so the end result is the same, but let's avoid new sparse warnings and squash this one. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202306210654.mDMcyMuB-lkp@intel.com/ Fixes: cac9e4418f4c ("io_uring/net: save msghdr->msg_control for retries") Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 78d0d2063bab954d19a1696feae4c7706a626d48 Author: Jens Axboe Date: Mon Jun 19 09:41:05 2023 -0600 io_uring/net: disable partial retries for recvmsg with cmsg We cannot sanely handle partial retries for recvmsg if we have cmsg attached. If we don't, then we'd just be overwriting the initial cmsg header on retries. Alternatively we could increment and handle this appropriately, but it doesn't seem worth the complication. Move the MSG_WAITALL check into the non-multishot case while at it, since MSG_WAITALL is explicitly disabled for multishot anyway. Link: https://lore.kernel.org/io-uring/0b0d4411-c8fd-4272-770b-e030af6919a0@kernel.dk/ Cc: stable@vger.kernel.org # 5.10+ Reported-by: Stefan Metzmacher Reviewed-by: Stefan Metzmacher Signed-off-by: Jens Axboe commit b1dc492087db0f2e5a45f1072a743d04618dd6be Author: Jens Axboe Date: Mon Jun 19 09:35:34 2023 -0600 io_uring/net: clear msg_controllen on partial sendmsg retry If we have cmsg attached AND we transferred partial data at least, clear msg_controllen on retry so we don't attempt to send that again. Cc: stable@vger.kernel.org # 5.10+ Fixes: cac9e4418f4c ("io_uring/net: save msghdr->msg_control for retries") Reported-by: Stefan Metzmacher Reviewed-by: Stefan Metzmacher Signed-off-by: Jens Axboe commit 6f9441f4e3ebf86b8a0427f14ee1753f2183a3cf Merge: 82edd1bd7f985 1f1ef7e5bbe2d Author: Takashi Iwai Date: Wed Jun 21 15:23:23 2023 +0200 Merge tag 'asoc-fix-v6.4-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fix for v6.4 A fix for a typoed iterator in the Intel Soundwire driver, fairly simple on inspection though not reviewed by Intel. commit 82edd1bd7f98567928871e2a2a317724d35f0085 Author: Luke D. Jones Date: Wed Jun 21 20:57:15 2023 +1200 ALSA: hda/realtek: Add quirk for ASUS ROG GV601V Adds the required quirk to enable the Cirrus amp and correct pins on the ASUS ROG GV601V series. While this works if the related _DSD properties are made available, these aren't included in the ACPI of these laptops (yet). Signed-off-by: Luke D. Jones Link: https://lore.kernel.org/r/20230621085715.5382-1-luke@ljones.dev Signed-off-by: Takashi Iwai commit db8eae6bc5c702d8e3ab2d0c6bb5976c131576eb Author: Jiri Olsa Date: Sun Jun 18 15:14:14 2023 +0200 bpf: Force kprobe multi expected_attach_type for kprobe_multi link We currently allow to create perf link for program with expected_attach_type == BPF_TRACE_KPROBE_MULTI. This will cause crash when we call helpers like get_attach_cookie or get_func_ip in such program, because it will call the kprobe_multi's version (current->bpf_ctx context setup) of those helpers while it expects perf_link's current->bpf_ctx context setup. Making sure that we use BPF_TRACE_KPROBE_MULTI expected_attach_type only for programs attaching through kprobe_multi link. Fixes: ca74823c6e16 ("bpf: Add cookie support to programs attached with kprobe multi link") Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230618131414.75649-1-jolsa@kernel.org commit 9724160b3942b0a967b91a59f81da5593f28b8ba Author: Florent Revest Date: Thu Jun 15 16:56:07 2023 +0200 bpf/btf: Accept function names that contain dots When building a kernel with LLVM=1, LLVM_IAS=0 and CONFIG_KASAN=y, LLVM leaves DWARF tags for the "asan.module_ctor" & co symbols. In turn, pahole creates BTF_KIND_FUNC entries for these and this makes the BTF metadata validation fail because they contain a dot. In a dramatic turn of event, this BTF verification failure can cause the netfilter_bpf initialization to fail, causing netfilter_core to free the netfilter_helper hashmap and netfilter_ftp to trigger a use-after-free. The risk of u-a-f in netfilter will be addressed separately but the existence of "asan.module_ctor" debug info under some build conditions sounds like a good enough reason to accept functions that contain dots in BTF. Although using only LLVM=1 is the recommended way to compile clang-based kernels, users can certainly do LLVM=1, LLVM_IAS=0 as well and we still try to support that combination according to Nick. To clarify: - > v5.10 kernel, LLVM=1 (LLVM_IAS=0 is not the default) is recommended, but user can still have LLVM=1, LLVM_IAS=0 to trigger the issue - <= 5.10 kernel, LLVM=1 (LLVM_IAS=0 is the default) is recommended in which case GNU as will be used Fixes: 1dc92851849c ("bpf: kernel side support for BTF Var and DataSec") Signed-off-by: Florent Revest Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Cc: Yonghong Song Cc: Nick Desaulniers Link: https://lore.kernel.org/bpf/20230615145607.3469985-1-revest@chromium.org commit afd384f0dbea2229fd11159efb86a5b41051c4a9 Author: Michael S. Tsirkin Date: Thu Jun 8 17:42:53 2023 -0400 Revert "virtio-blk: support completion batching for the IRQ path" This reverts commit 07b679f70d73483930e8d3c293942416d9cd5c13. This change appears to have broken things... We now see applications hanging during disk accesses. e.g. multi-port virtio-blk device running in h/w (FPGA) Host running a simple 'fio' test. [global] thread=1 direct=1 ioengine=libaio norandommap=1 group_reporting=1 bs=4K rw=read iodepth=128 runtime=1 numjobs=4 time_based [job0] filename=/dev/vda [job1] filename=/dev/vdb [job2] filename=/dev/vdc ... [job15] filename=/dev/vdp i.e. 16 disks; 4 queues per disk; simple burst of 4KB reads This is repeatedly run in a loop. After a few, normally <10 seconds, fio hangs. With 64 queues (16 disks), failure occurs within a few seconds; with 8 queues (2 disks) it may take ~hour before hanging. Last message: fio-3.19 Starting 8 threads Jobs: 1 (f=1): [_(7),R(1)][68.3%][eta 03h:11m:06s] I think this means at the end of the run 1 queue was left incomplete. 'diskstats' (run while fio is hung) shows no outstanding transactions. e.g. $ cat /proc/diskstats ... 252 0 vda 1843140071 0 14745120568 712568645 0 0 0 0 0 3117947 712568645 0 0 0 0 0 0 252 16 vdb 1816291511 0 14530332088 704905623 0 0 0 0 0 3117711 704905623 0 0 0 0 0 0 ... Other stats (in the h/w, and added to the virtio-blk driver ([a]virtio_queue_rq(), [b]virtblk_handle_req(), [c]virtblk_request_done()) all agree, and show every request had a completion, and that virtblk_request_done() never gets called. e.g. PF= 0 vq=0 1 2 3 [a]request_count - 839416590 813148916 105586179 84988123 [b]completion1_count - 839416590 813148916 105586179 84988123 [c]completion2_count - 0 0 0 0 PF= 1 vq=0 1 2 3 [a]request_count - 823335887 812516140 104582672 75856549 [b]completion1_count - 823335887 812516140 104582672 75856549 [c]completion2_count - 0 0 0 0 i.e. the issue is after the virtio-blk driver. This change was introduced in kernel 6.3.0. I am seeing this using 6.3.3. If I run with an earlier kernel (5.15), it does not occur. If I make a simple patch to the 6.3.3 virtio-blk driver, to skip the blk_mq_add_to_batch()call, it does not fail. e.g. kernel 5.15 - this is OK virtio_blk.c,virtblk_done() [irq handler] if (likely(!blk_should_fake_timeout(req->q))) { blk_mq_complete_request(req); } kernel 6.3.3 - this fails virtio_blk.c,virtblk_handle_req() [irq handler] if (likely(!blk_should_fake_timeout(req->q))) { if (!blk_mq_complete_request_remote(req)) { if (!blk_mq_add_to_batch(req, iob, virtblk_vbr_status(vbr), virtblk_complete_batch)) { virtblk_request_done(req); //this never gets called... so blk_mq_add_to_batch() must always succeed } } } If I do, kernel 6.3.3 - this is OK virtio_blk.c,virtblk_handle_req() [irq handler] if (likely(!blk_should_fake_timeout(req->q))) { if (!blk_mq_complete_request_remote(req)) { virtblk_request_done(req); //force this here... if (!blk_mq_add_to_batch(req, iob, virtblk_vbr_status(vbr), virtblk_complete_batch)) { virtblk_request_done(req); //this never gets called... so blk_mq_add_to_batch() must always succeed } } } Perhaps you might like to fix/test/revert this change... Martin Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202306090826.C1fZmdMe-lkp@intel.com/ Cc: Suwan Kim Tested-by: edliaw@google.com Reported-by: "Roberts, Martin" Message-Id: <336455b4f630f329380a8f53ee8cad3868764d5c.1686295549.git.mst@redhat.com> Signed-off-by: Michael S. Tsirkin commit a129b41fe0a8b4da828c46b10f5244ca07a3fec3 Author: Francesco Dolcini Date: Mon Jun 19 17:44:35 2023 +0200 Revert "net: phy: dp83867: perform soft reset and retain established link" This reverts commit da9ef50f545f86ffe6ff786174d26500c4db737a. This fixes a regression in which the link would come up, but no communication was possible. The reverted commit was also removing a comment about DP83867_PHYCR_FORCE_LINK_GOOD, this is not added back in this commits since it seems that this is unrelated to the original code change. Closes: https://lore.kernel.org/all/ZGuDJos8D7N0J6Z2@francesco-nb.int.toradex.com/ Fixes: da9ef50f545f ("net: phy: dp83867: perform soft reset and retain established link") Signed-off-by: Francesco Dolcini Reviewed-by: Andrew Lunn Reviewed-by: Praneeth Bajjuri Link: https://lore.kernel.org/r/20230619154435.355485-1-francesco@dolcini.it Signed-off-by: Jakub Kicinski commit 408c090002c8ca5da3da1417d1d675583379fae6 Author: Jiawen Wu Date: Mon Jun 19 17:49:48 2023 +0800 net: mdio: fix the wrong parameters PHY address and device address are passed in the wrong order. Cc: stable@vger.kernel.org Fixes: 4e4aafcddbbf ("net: mdio: Add dedicated C45 API to MDIO bus drivers") Signed-off-by: Jiawen Wu Reviewed-by: Andrew Lunn Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/20230619094948.84452-1-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski commit 8ba90f5cc71701aa262f222effead02206b04227 Merge: e660abd551f11 0518dbe97fe62 Author: Linus Torvalds Date: Tue Jun 20 17:20:22 2023 -0700 Merge tag 'mm-hotfixes-stable-2023-06-20-12-31' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull hotfixes from Andrew Morton: "19 hotfixes. 8 of these are cc:stable. This includes a wholesale reversion of the post-6.4 series 'make slab shrink lockless'. After input from Dave Chinner it has been decided that we should go a different way [1]" Link: https://lkml.kernel.org/r/ZH6K0McWBeCjaf16@dread.disaster.area [1] * tag 'mm-hotfixes-stable-2023-06-20-12-31' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: selftests/mm: fix cross compilation with LLVM mailmap: add entries for Ben Dooks nilfs2: prevent general protection fault in nilfs_clear_dirty_page() Revert "mm: vmscan: make global slab shrink lockless" Revert "mm: vmscan: make memcg slab shrink lockless" Revert "mm: vmscan: add shrinker_srcu_generation" Revert "mm: shrinkers: make count and scan in shrinker debugfs lockless" Revert "mm: vmscan: hold write lock to reparent shrinker nr_deferred" Revert "mm: vmscan: remove shrinker_rwsem from synchronize_shrinkers()" Revert "mm: shrinkers: convert shrinker_rwsem to mutex" nilfs2: fix buffer corruption due to concurrent device reads scripts/gdb: fix SB_* constants parsing scripts: fix the gfp flags header path in gfp-translate udmabuf: revert 'Add support for mapping hugepages (v4)' mm/khugepaged: fix iteration in collapse_file memfd: check for non-NULL file_seals in memfd_create() syscall mm/vmalloc: do not output a spurious warning when huge vmalloc() fails mm/mprotect: fix do_mprotect_pkey() limit check writeback: fix dereferencing NULL mapping->host on writeback_page_template commit e660abd551f1172e428b4e4003de887176a8a1fd Merge: c74e2ac2383fd 22db06337f590 Author: Linus Torvalds Date: Tue Jun 20 15:45:34 2023 -0700 Merge tag 'acpi-6.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Fix a kernel crash during early resume from ACPI S3 that has been present since the 5.15 cycle when might_sleep() was added to down_timeout(), which in some configurations of the kernel caused an implicit preemption point to trigger at a wrong time" * tag 'acpi-6.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: sleep: Avoid breaking S3 wakeup due to might_sleep() commit c74e2ac2383fd687bf2f8dd3f29f674cbd0cdaea Merge: 2e30b9734398a 0bb619f9227aa Author: Linus Torvalds Date: Tue Jun 20 15:39:41 2023 -0700 Merge tag 'thermal-6.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fix from Rafael Wysocki: "Fix a regression introduced during the 6.3 cycle causing intel_soc_dts_iosf to report incorrect temperature values due to a coding mistake (Hans de Goede)" * tag 'thermal-6.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal/intel/intel_soc_dts_iosf: Fix reporting wrong temperatures commit 2e30b9734398ad8f29432da63a97728326050536 Merge: 4b0c7a1ba0938 0113d4615dbf0 Author: Linus Torvalds Date: Tue Jun 20 15:01:08 2023 -0700 Merge tag 'trace-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: - Fix MAINTAINERS file to point to proper mailing list for rtla and rv The mailing list pointed to linux-trace-devel instead of linux-trace-kernel. The former is for the tracing libraries and the latter is for anything in the Linux kernel tree. The wrong mailing list was used because linux-trace-kernel did not exist when rtla and rv were created. - User events: - Fix matching of dynamic events to their user events When user writes to dynamic_events file, a lookup of the registered dynamic events is made, but there were some cases that a match could be incorrectly made. - Add auto cleanup of user events Have the user events automatically get removed when the last reference (file descriptor) is closed. This was asked for to prevent leaks of user events hanging around needing admins to clean them up. - Add persistent logic (but not let user space use it yet) In some cases, having a persistent user event (one that does not get cleaned up automatically) is useful. But there's still debates about how to expose this to user space. The infrastructure is added, but the API is not. - Update the selftests Update the user event selftests to reflect the above changes" * tag 'trace-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing/user_events: Document auto-cleanup and remove dyn_event refs selftests/user_events: Adapt dyn_test to non-persist events selftests/user_events: Ensure auto cleanup works as expected tracing/user_events: Add auto cleanup and future persist flag tracing/user_events: Track refcount consistently via put/get tracing/user_events: Store register flags on events tracing/user_events: Remove user_ns walk for groups selftests/user_events: Add perf self-test for empty arguments events selftests/user_events: Clear the events after perf self-test selftests/user_events: Add ftrace self-test for empty arguments events tracing/user_events: Fix the incorrect trace record for empty arguments events tracing: Modify print_fields() for fields output order tracing/user_events: Handle matching arguments that is null from dyn_events tracing/user_events: Prevent same name but different args event tracing/rv/rtla: Update MAINTAINERS file to point to proper mailing list commit 4b0c7a1ba09386e26cf9e55cd375af8e0f48662e Merge: 99ec1ed7c2ed3 a7299a18a179a Author: Linus Torvalds Date: Tue Jun 20 14:38:21 2023 -0700 Merge tag 'for-6.4-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "One more regression fix for an assertion failure that uncovered a nasty problem with stripe calculations. This is caused by a u32 overflow when there are enough devices. The fstests require 6 so this hasn't been caught, I was able to hit it with 8. The fix is minimal and only adds u64 casts, we'll clean that up later. I did various additional tests to be sure" * tag 'for-6.4-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix u32 overflows when left shifting stripe_nr commit 42e344f01688490cdac4bed8f5ba21817cad26ee Author: Phil Sutter Date: Fri Jun 16 17:56:11 2023 +0200 netfilter: nf_tables: Fix for deleting base chains with payload When deleting a base chain, iptables-nft simply submits the whole chain to the kernel, including the NFTA_CHAIN_HOOK attribute. The new code added by fixed commit then turned this into a chain update, destroying the hook but not the chain itself. Detect the situation by checking if the chain type is either netdev or inet/ingress. Fixes: 7d937b107108f ("netfilter: nf_tables: support for deleting devices in an existing netdev chain") Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 62f9a68a36d4441a6c412b81faed102594bc6670 Author: Pablo Neira Ayuso Date: Thu Jun 15 10:14:25 2023 +0200 netfilter: nfnetlink_osf: fix module autoload Move the alias from xt_osf to nfnetlink_osf. Fixes: f9324952088f ("netfilter: nfnetlink_osf: extract nfnetlink_subsystem code from xt_osf.c") Signed-off-by: Pablo Neira Ayuso commit 043d2acf57227db1fdaaa620b2a420acfaa56d6e Author: Pablo Neira Ayuso Date: Wed Jun 14 23:20:18 2023 +0200 netfilter: nf_tables: drop module reference after updating chain Otherwise the module reference counter is leaked. Fixes b9703ed44ffb ("netfilter: nf_tables: support for adding new devices to an existing netdev chain") Signed-off-by: Pablo Neira Ayuso commit e26d3009efda338f19016df4175f354a9bd0a4ab Author: Pablo Neira Ayuso Date: Fri Jun 16 15:22:18 2023 +0200 netfilter: nf_tables: disallow timeout for anonymous sets Never used from userspace, disallow these parameters. Signed-off-by: Pablo Neira Ayuso commit b770283c98e0eee9133c47bc03b6cc625dc94723 Author: Pablo Neira Ayuso Date: Fri Jun 16 15:22:01 2023 +0200 netfilter: nf_tables: disallow updates of anonymous sets Disallow updates of set timeout and garbage collection parameters for anonymous sets. Fixes: 123b99619cca ("netfilter: nf_tables: honor set timeout and garbage collection updates") Signed-off-by: Pablo Neira Ayuso commit 62e1e94b246e685d89c3163aaef4b160e42ceb02 Author: Pablo Neira Ayuso Date: Fri Jun 16 15:21:39 2023 +0200 netfilter: nf_tables: reject unbound chain set before commit phase Use binding list to track set transaction and to check for unbound chains before entering the commit phase. Bail out if chain binding remain unused before entering the commit step. Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Signed-off-by: Pablo Neira Ayuso commit 938154b93be8cd611ddfd7bafc1849f3c4355201 Author: Pablo Neira Ayuso Date: Fri Jun 16 15:21:33 2023 +0200 netfilter: nf_tables: reject unbound anonymous set before commit phase Add a new list to track set transaction and to check for unbound anonymous sets before entering the commit phase. Bail out at the end of the transaction handling if an anonymous set remains unbound. Fixes: 96518518cc41 ("netfilter: add nftables") Signed-off-by: Pablo Neira Ayuso commit c88c535b592d3baeee74009f3eceeeaf0fdd5e1b Author: Pablo Neira Ayuso Date: Fri Jun 16 15:20:16 2023 +0200 netfilter: nf_tables: disallow element updates of bound anonymous sets Anonymous sets come with NFT_SET_CONSTANT from userspace. Although API allows to create anonymous sets without NFT_SET_CONSTANT, it makes no sense to allow to add and to delete elements for bound anonymous sets. Fixes: 96518518cc41 ("netfilter: add nftables") Signed-off-by: Pablo Neira Ayuso commit d6b478666ffa6d2c25386d78bf1c4640d4da305e Author: Pablo Neira Ayuso Date: Fri Jun 16 15:20:08 2023 +0200 netfilter: nf_tables: fix underflow in object reference counter Since ("netfilter: nf_tables: drop map element references from preparation phase"), integration with commit protocol is better, therefore drop the workaround that b91d90368837 ("netfilter: nf_tables: fix leaking object reference count") provides. Signed-off-by: Pablo Neira Ayuso commit 2b84e215f87443c74ac0aa7f76bb172d43a87033 Author: Pablo Neira Ayuso Date: Fri Jun 16 15:20:04 2023 +0200 netfilter: nft_set_pipapo: .walk does not deal with generations The .walk callback iterates over the current active set, but it might be useful to iterate over the next generation set. Use the generation mask to determine what set view (either current or next generation) is use for the walk iteration. Fixes: 3c4287f62044 ("nf_tables: Add set type for arbitrary concatenation of ranges") Signed-off-by: Pablo Neira Ayuso commit 628bd3e49cba1c066228e23d71a852c23e26da73 Author: Pablo Neira Ayuso Date: Fri Jun 16 14:51:49 2023 +0200 netfilter: nf_tables: drop map element references from preparation phase set .destroy callback releases the references to other objects in maps. This is very late and it results in spurious EBUSY errors. Drop refcount from the preparation phase instead, update set backend not to drop reference counter from set .destroy path. Exceptions: NFT_TRANS_PREPARE_ERROR does not require to drop the reference counter because the transaction abort path releases the map references for each element since the set is unbound. The abort path also deals with releasing reference counter for new elements added to unbound sets. Fixes: 591054469b3e ("netfilter: nf_tables: revisit chain/object refcounting from elements") Signed-off-by: Pablo Neira Ayuso commit 26b5a5712eb85e253724e56a54c17f8519bd8e4e Author: Pablo Neira Ayuso Date: Fri Jun 16 14:45:26 2023 +0200 netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain Add a new state to deal with rule expressions deactivation from the newrule error path, otherwise the anonymous set remains in the list in inactive state for the next generation. Mark the set/chain transaction as unbound so the abort path releases this object, set it as inactive in the next generation so it is not reachable anymore from this transaction and reference counter is dropped. Fixes: 1240eb93f061 ("netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE") Signed-off-by: Pablo Neira Ayuso commit 4bedf9eee016286c835e3d8fa981ddece5338795 Author: Pablo Neira Ayuso Date: Fri Jun 16 14:45:22 2023 +0200 netfilter: nf_tables: fix chain binding transaction logic Add bound flag to rule and chain transactions as in 6a0a8d10a366 ("netfilter: nf_tables: use-after-free in failing rule with bound set") to skip them in case that the chain is already bound from the abort path. This patch fixes an imbalance in the chain use refcnt that triggers a WARN_ON on the table and chain destroy path. This patch also disallows nested chain bindings, which is not supported from userspace. The logic to deal with chain binding in nft_data_hold() and nft_data_release() is not correct. The NFT_TRANS_PREPARE state needs a special handling in case a chain is bound but next expressions in the same rule fail to initialize as described by 1240eb93f061 ("netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE"). The chain is left bound if rule construction fails, so the objects stored in this chain (and the chain itself) are released by the transaction records from the abort path, follow up patch ("netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain") completes this error handling. When deleting an existing rule, chain bound flag is set off so the rule expression .destroy path releases the objects. Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Signed-off-by: Pablo Neira Ayuso commit c8e796895e2310b6130e7577248da1d771431a77 Author: Russ Weight Date: Tue Jun 20 13:28:24 2023 -0700 regmap: spi-avmm: Fix regmap_bus max_raw_write The max_raw_write member of the regmap_spi_avmm_bus structure is defined as: .max_raw_write = SPI_AVMM_VAL_SIZE * MAX_WRITE_CNT SPI_AVMM_VAL_SIZE == 4 and MAX_WRITE_CNT == 1 so this results in a maximum write transfer size of 4 bytes which provides only enough space to transfer the address of the target register. It provides no space for the value to be transferred. This bug became an issue (divide-by-zero in _regmap_raw_write()) after the following was accepted into mainline: commit 3981514180c9 ("regmap: Account for register length when chunking") Change max_raw_write to include space (4 additional bytes) for both the register address and value: .max_raw_write = SPI_AVMM_REG_SIZE + SPI_AVMM_VAL_SIZE * MAX_WRITE_CNT Fixes: 7f9fb67358a2 ("regmap: add Intel SPI Slave to AVMM Bus Bridge support") Reviewed-by: Matthew Gerlach Signed-off-by: Russ Weight Link: https://lore.kernel.org/r/20230620202824.380313-1-russell.h.weight@intel.com Signed-off-by: Mark Brown commit 54d217406afe250d7a768783baaa79a035f21d38 Author: Jeff Layton Date: Wed Apr 19 07:24:46 2023 -0400 drm: use mgr->dev in drm_dbg_kms in drm_dp_add_payload_part2 I've been experiencing some intermittent crashes down in the display driver code. The symptoms are ususally a line like this in dmesg: amdgpu 0000:30:00.0: [drm] Failed to create MST payload for port 000000006d3a3885: -5 ...followed by an Oops due to a NULL pointer dereference. Switch to using mgr->dev instead of state->dev since "state" can be NULL in some cases. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2184855 Suggested-by: Jani Nikula Signed-off-by: Jeff Layton Reviewed-by: Jani Nikula Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20230419112447.18471-1-jlayton@kernel.org commit 4e9f0ec38852c18faa9689322e758575af33e5d4 Author: Mukesh Sisodiya Date: Mon Jun 19 17:02:34 2023 +0200 wifi: iwlwifi: pcie: Handle SO-F device for PCI id 0x7AF0 Add support for AX1690i and AX1690s devices with PCIE id 0x7AF0. Cc: stable@vger.kernel.org # 6.1+ Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20230619150233.461290-2-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 7580e0a78eb29e7bb1a772eba4088250bbb70d41 Author: Ross Lagerwall Date: Fri Jun 16 17:45:49 2023 +0100 be2net: Extend xmit workaround to BE3 chip We have seen a bug where the NIC incorrectly changes the length in the IP header of a padded packet to include the padding bytes. The driver already has a workaround for this so do the workaround for this NIC too. This resolves the issue. The NIC in question identifies itself as follows: [ 8.828494] be2net 0000:02:00.0: FW version is 10.7.110.31 [ 8.834759] be2net 0000:02:00.0: Emulex OneConnect(be3): PF FLEX10 port 1 02:00.0 Ethernet controller: Emulex Corporation OneConnect 10Gb NIC (be3) (rev 01) Fixes: ca34fe38f06d ("be2net: fix wrong usage of adapter->generation") Signed-off-by: Ross Lagerwall Link: https://lore.kernel.org/r/20230616164549.2863037-1-ross.lagerwall@citrix.com Signed-off-by: Jakub Kicinski commit 99ec1ed7c2ed358280588ab1d013387e8c7a9333 Merge: 692b7dc87ca6d 5005bcb421915 Author: Linus Torvalds Date: Tue Jun 20 11:50:40 2023 -0700 Merge tag '6.4-rc6-smb3-server-fixes' of git://git.samba.org/ksmbd Pull smb server fixes from Steve French: "Four smb3 server fixes, all also for stable: - fix potential oops in parsing compounded requests - fix various paths (mkdir, create etc) where mnt_want_write was not checked first - fix slab out of bounds in check_message and write" * tag '6.4-rc6-smb3-server-fixes' of git://git.samba.org/ksmbd: ksmbd: validate session id and tree id in the compound request ksmbd: fix out-of-bound read in smb2_write ksmbd: add mnt_want_write to ksmbd vfs functions ksmbd: validate command payload size commit a7299a18a179a9713651fce9ad00972a633c14a9 Author: Qu Wenruo Date: Tue Jun 20 17:57:31 2023 +0800 btrfs: fix u32 overflows when left shifting stripe_nr [BUG] David reported an ASSERT() get triggered during fio load on 8 devices with data/raid6 and metadata/raid1c3: fio --rw=randrw --randrepeat=1 --size=3000m \ --bsrange=512b-64k --bs_unaligned \ --ioengine=libaio --fsync=1024 \ --name=job0 --name=job1 \ The ASSERT() is from rbio_add_bio() of raid56.c: ASSERT(orig_logical >= full_stripe_start && orig_logical + orig_len <= full_stripe_start + rbio->nr_data * BTRFS_STRIPE_LEN); Which is checking if the target rbio is crossing the full stripe boundary. [100.789] 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:1622 [100.795] ------------[ cut here ]------------ [100.796] kernel BUG at fs/btrfs/raid56.c:1622! [100.797] invalid opcode: 0000 [#1] PREEMPT SMP KASAN [100.798] CPU: 1 PID: 100 Comm: kworker/u8:4 Not tainted 6.4.0-rc6-default+ #124 [100.799] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552-rebuilt.opensuse.org 04/01/2014 [100.802] Workqueue: writeback wb_workfn (flush-btrfs-1) [100.803] RIP: 0010:rbio_add_bio+0x204/0x210 [btrfs] [100.806] RSP: 0018:ffff888104a8f300 EFLAGS: 00010246 [100.808] RAX: 00000000000000a1 RBX: ffff8881075907e0 RCX: ffffed1020951e01 [100.809] RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000001 [100.811] RBP: 0000000141d20000 R08: 0000000000000001 R09: ffff888104a8f04f [100.813] R10: ffffed1020951e09 R11: 0000000000000003 R12: ffff88810e87f400 [100.815] R13: 0000000041d20000 R14: 0000000144529000 R15: ffff888101524000 [100.817] FS: 0000000000000000(0000) GS:ffff88811ac00000(0000) knlGS:0000000000000000 [100.821] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [100.822] CR2: 000055d54e44c270 CR3: 000000010a9a1006 CR4: 00000000003706a0 [100.824] Call Trace: [100.825] [100.825] ? die+0x32/0x80 [100.826] ? do_trap+0x12d/0x160 [100.827] ? rbio_add_bio+0x204/0x210 [btrfs] [100.827] ? rbio_add_bio+0x204/0x210 [btrfs] [100.829] ? do_error_trap+0x90/0x130 [100.830] ? rbio_add_bio+0x204/0x210 [btrfs] [100.831] ? handle_invalid_op+0x2c/0x30 [100.833] ? rbio_add_bio+0x204/0x210 [btrfs] [100.835] ? exc_invalid_op+0x29/0x40 [100.836] ? asm_exc_invalid_op+0x16/0x20 [100.837] ? rbio_add_bio+0x204/0x210 [btrfs] [100.837] raid56_parity_write+0x64/0x270 [btrfs] [100.838] btrfs_submit_chunk+0x26e/0x800 [btrfs] [100.840] ? btrfs_bio_init+0x80/0x80 [btrfs] [100.841] ? release_pages+0x503/0x6d0 [100.842] ? folio_unlock+0x2f/0x60 [100.844] ? __folio_put+0x60/0x60 [100.845] ? btrfs_do_readpage+0xae0/0xae0 [btrfs] [100.847] btrfs_submit_bio+0x21/0x60 [btrfs] [100.847] submit_one_bio+0x6a/0xb0 [btrfs] [100.849] extent_write_cache_pages+0x395/0x680 [btrfs] [100.850] ? __extent_writepage+0x520/0x520 [btrfs] [100.851] ? mark_usage+0x190/0x190 [100.852] extent_writepages+0xdb/0x130 [btrfs] [100.853] ? extent_write_locked_range+0x480/0x480 [btrfs] [100.854] ? mark_usage+0x190/0x190 [100.854] ? attach_extent_buffer_page+0x220/0x220 [btrfs] [100.855] ? reacquire_held_locks+0x178/0x280 [100.856] ? writeback_sb_inodes+0x245/0x7f0 [100.857] do_writepages+0x102/0x2e0 [100.858] ? page_writeback_cpu_online+0x10/0x10 [100.859] ? __lock_release.isra.0+0x14a/0x4d0 [100.860] ? reacquire_held_locks+0x280/0x280 [100.861] ? __lock_acquired+0x1e9/0x3d0 [100.862] ? do_raw_spin_lock+0x1b0/0x1b0 [100.863] __writeback_single_inode+0x94/0x450 [100.864] writeback_sb_inodes+0x372/0x7f0 [100.864] ? lock_sync+0xd0/0xd0 [100.865] ? do_raw_spin_unlock+0x93/0xf0 [100.866] ? sync_inode_metadata+0xc0/0xc0 [100.867] ? rwsem_optimistic_spin+0x340/0x340 [100.868] __writeback_inodes_wb+0x70/0x130 [100.869] wb_writeback+0x2d1/0x530 [100.869] ? __writeback_inodes_wb+0x130/0x130 [100.870] ? lockdep_hardirqs_on_prepare.part.0+0xf1/0x1c0 [100.870] wb_do_writeback+0x3eb/0x480 [100.871] ? wb_writeback+0x530/0x530 [100.871] ? mark_lock_irq+0xcd0/0xcd0 [100.872] wb_workfn+0xe0/0x3f0< [CAUSE] Commit a97699d1d610 ("btrfs: replace map_lookup->stripe_len by BTRFS_STRIPE_LEN") changes how we calculate the map length, to reduce u64 division. Function btrfs_max_io_len() is to get the length to the stripe boundary. It calculates the full stripe start offset (inside the chunk) by the following code: *full_stripe_start = rounddown(*stripe_nr, nr_data_stripes(map)) << BTRFS_STRIPE_LEN_SHIFT; The calculation itself is fine, but the value returned by rounddown() is dependent on both @stripe_nr (which is u32) and nr_data_stripes() (which returned int). Thus the result is also u32, then we do the left shift, which can overflow u32. If such overflow happens, @full_stripe_start will be a value way smaller than @offset, causing later "full_stripe_len - (offset - *full_stripe_start)" to underflow, thus make later length calculation to have no stripe boundary limit, resulting a write bio to exceed stripe boundary. There are some other locations like this, with a u32 @stripe_nr got left shift, which can lead to a similar overflow. [FIX] Fix all @stripe_nr with left shift with a type cast to u64 before the left shift. Those involved @stripe_nr or similar variables are recording the stripe number inside the chunk, which is small enough to be contained by u32, but their offset inside the chunk can not fit into u32. Thus for those specific left shifts, a type cast to u64 is necessary so this patch does not touch them and the code will be cleaned up in the future to keep the fix minimal. Reported-by: David Sterba Fixes: a97699d1d610 ("btrfs: replace map_lookup->stripe_len by BTRFS_STRIPE_LEN") Tested-by: David Sterba Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 8d0d16a3ef44c60d66f937c21f32fa2cf8f2c9ed Author: Pranjal Ramajor Asha Kanojiya Date: Wed Jun 14 10:15:28 2023 -0600 accel/qaic: Call DRM helper function to destroy prime GEM smatch warning: drivers/accel/qaic/qaic_data.c:620 qaic_free_object() error: dereferencing freed memory 'obj->import_attach' obj->import_attach is detached and freed using dma_buf_detach(). But used after free to decrease the dmabuf ref count using dma_buf_put(). drm_prime_gem_destroy() handles this issue and performs the proper clean up instead of open coding it in the driver. Fixes: ff13be830333 ("accel/qaic: Add datapath") Reported-by: Sukrut Bellary Closes: https://lore.kernel.org/all/20230610021200.377452-1-sukrut.bellary@linux.com/ Suggested-by: Christian König Signed-off-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Carl Vanderlip Reviewed-by: Jeffrey Hugo Signed-off-by: Jeffrey Hugo Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230614161528.11710-1-quic_jhugo@quicinc.com commit e438edaae26ce80c3fcc498fbba0c8f7e78497e5 Merge: 440d71e2edf28 f015b900bc328 Author: David S. Miller Date: Tue Jun 20 13:33:50 2023 +0100 Merge tag 'ipsec-2023-06-20' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec ipsec-2023-06-20 commit 440d71e2edf283465c7a9ed151efd589d71b6307 Merge: 9a43827e876c9 94d12d88b4a84 Author: David S. Miller Date: Tue Jun 20 09:40:26 2023 +0100 Merge branch 'dsa-mt7530-fixes' Arınç ÜNAL says: ==================== net: dsa: mt7530: fix multiple CPU ports, BPDU and LLDP handling This patch series fixes all non-theoretical issues regarding multiple CPU ports and the handling of LLDP frames and BPDUs. I am adding me as a maintainer, I've got some code improvements on the way. I will keep an eye on this driver and the patches submitted for it in the future. Arınç v6: - Change a small portion of the comment in the diff on "net: dsa: mt7530: set all CPU ports in MT7531_CPU_PMAP" with Russell's suggestion. - Change the patch log of "net: dsa: mt7530: fix trapping frames on non-MT7621 SoC MT7530 switch" with Vladimir's suggestion. - Group the code for trapping frames into a common function and call that. - Add Vladimir and Russell's reviewed-by tags to where they're given. v5: - Change the comment in the diff on the first patch with Russell's words. - Change the patch log of the first patch to state that the patch is just preparatory work for change "net: dsa: introduce preferred_default_local_cpu_port and use on MT7530" and not a fix to an existing problem on the code base. - Remove the "net: dsa: mt7530: fix trapping frames with multiple CPU ports on MT7530" patch. It fixes a theoretical issue, therefore it is net-next material. - Remove unnecessary information from the patch logs. Remove the enum renaming change. - Strengthen the point of the "net: dsa: introduce preferred_default_local_cpu_port and use on MT7530" patch. v4: Make the patch logs and my comments in the code easier to understand. v3: Fix the from header on the patches. Write a cover letter. v2: Add patches to fix the handling of LLDP frames and BPDUs. ==================== Signed-off-by: David S. Miller commit 94d12d88b4a849765bf7185c876c6c672ad4714e Author: Arınç ÜNAL Date: Sat Jun 17 09:26:49 2023 +0300 MAINTAINERS: add me as maintainer of MEDIATEK SWITCH DRIVER Add me as a maintainer of the MediaTek MT7530 DSA subdriver. List maintainers in alphabetical order by first name. Signed-off-by: Arınç ÜNAL Reviewed-by: Vladimir Oltean Reviewed-by: Matthias Brugger Reviewed-by: Matthias Brugger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit b79d7c14f48083abb3fb061370c0c64a569edf4c Author: Vladimir Oltean Date: Sat Jun 17 09:26:48 2023 +0300 net: dsa: introduce preferred_default_local_cpu_port and use on MT7530 Since the introduction of the OF bindings, DSA has always had a policy that in case multiple CPU ports are present in the device tree, the numerically smallest one is always chosen. The MT7530 switch family, except the switch on the MT7988 SoC, has 2 CPU ports, 5 and 6, where port 6 is preferable on the MT7531BE switch because it has higher bandwidth. The MT7530 driver developers had 3 options: - to modify DSA when the MT7531 switch support was introduced, such as to prefer the better port - to declare both CPU ports in device trees as CPU ports, and live with the sub-optimal performance resulting from not preferring the better port - to declare just port 6 in the device tree as a CPU port Of course they chose the path of least resistance (3rd option), kicking the can down the road. The hardware description in the device tree is supposed to be stable - developers are not supposed to adopt the strategy of piecemeal hardware description, where the device tree is updated in lockstep with the features that the kernel currently supports. Now, as a result of the fact that they did that, any attempts to modify the device tree and describe both CPU ports as CPU ports would make DSA change its default selection from port 6 to 5, effectively resulting in a performance degradation visible to users with the MT7531BE switch as can be seen below. Without preferring port 6: [ ID][Role] Interval Transfer Bitrate Retr [ 5][TX-C] 0.00-20.00 sec 374 MBytes 157 Mbits/sec 734 sender [ 5][TX-C] 0.00-20.00 sec 373 MBytes 156 Mbits/sec receiver [ 7][RX-C] 0.00-20.00 sec 1.81 GBytes 778 Mbits/sec 0 sender [ 7][RX-C] 0.00-20.00 sec 1.81 GBytes 777 Mbits/sec receiver With preferring port 6: [ ID][Role] Interval Transfer Bitrate Retr [ 5][TX-C] 0.00-20.00 sec 1.99 GBytes 856 Mbits/sec 273 sender [ 5][TX-C] 0.00-20.00 sec 1.99 GBytes 855 Mbits/sec receiver [ 7][RX-C] 0.00-20.00 sec 1.72 GBytes 737 Mbits/sec 15 sender [ 7][RX-C] 0.00-20.00 sec 1.71 GBytes 736 Mbits/sec receiver Using one port for WAN and the other ports for LAN is a very popular use case which is what this test emulates. As such, this change proposes that we retroactively modify stable kernels (which don't support the modification of the CPU port assignments, so as to let user space fix the problem and restore the throughput) to keep the mt7530 driver preferring port 6 even with device trees where the hardware is more fully described. Fixes: c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch") Signed-off-by: Vladimir Oltean Signed-off-by: Arınç ÜNAL Reviewed-by: Russell King (Oracle) Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 8332cf6fd7c7087dbc2067115b33979c9851bbc4 Author: Arınç ÜNAL Date: Sat Jun 17 09:26:47 2023 +0300 net: dsa: mt7530: fix handling of LLDP frames LLDP frames are link-local frames, therefore they must be trapped to the CPU port. Currently, the MT753X switches treat LLDP frames as regular multicast frames, therefore flooding them to user ports. To fix this, set LLDP frames to be trapped to the CPU port(s). Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") Signed-off-by: Arınç ÜNAL Reviewed-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d7c66073559386b836bded7cdc8b66ee5c049129 Author: Arınç ÜNAL Date: Sat Jun 17 09:26:46 2023 +0300 net: dsa: mt7530: fix handling of BPDUs on MT7530 switch BPDUs are link-local frames, therefore they must be trapped to the CPU port. Currently, the MT7530 switch treats BPDUs as regular multicast frames, therefore flooding them to user ports. To fix this, set BPDUs to be trapped to the CPU port. Group this on mt7530_setup() and mt7531_setup_common() into mt753x_trap_frames() and call that. Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") Signed-off-by: Arınç ÜNAL Reviewed-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 4ae90f90e4909e3014e2dc6a0627964617a7b824 Author: Arınç ÜNAL Date: Sat Jun 17 09:26:45 2023 +0300 net: dsa: mt7530: fix trapping frames on non-MT7621 SoC MT7530 switch All MT7530 switch IP variants share the MT7530_MFC register, but the current driver only writes it for the switch variant that is integrated in the MT7621 SoC. Modify the code to include all MT7530 derivatives. Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") Suggested-by: Vladimir Oltean Signed-off-by: Arınç ÜNAL Reviewed-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit ff221029a51fd54cacac66e193e0c75e4de940e7 Author: Arınç ÜNAL Date: Sat Jun 17 09:26:44 2023 +0300 net: dsa: mt7530: set all CPU ports in MT7531_CPU_PMAP MT7531_CPU_PMAP represents the destination port mask for trapped-to-CPU frames (further restricted by PCR_MATRIX). Currently the driver sets the first CPU port as the single port in this bit mask, which works fine regardless of whether the device tree defines port 5, 6 or 5+6 as CPU ports. This is because the logic coincides with DSA's logic of picking the first CPU port as the CPU port that all user ports are affine to, by default. An upcoming change would like to influence DSA's selection of the default CPU port to no longer be the first one, and in that case, this logic needs adaptation. Since there is no observed leakage or duplication of frames if all CPU ports are defined in this bit mask, simply include them all. Suggested-by: Russell King (Oracle) Suggested-by: Vladimir Oltean Signed-off-by: Arınç ÜNAL Reviewed-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 9a43827e876c9a071826cc81783aa2222b020f1d Author: Josua Mayer Date: Fri Jun 16 14:14:14 2023 +0300 net: dpaa2-mac: add 25gbase-r support Layerscape MACs support 25Gbps network speed with dpmac "CAUI" mode. Add the mappings between DPMAC_ETH_IF_* and HY_INTERFACE_MODE_*, as well as the 25000 mac capability. Tested on SolidRun LX2162a Clearfog, serdes 1 protocol 18. Signed-off-by: Josua Mayer Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit 8340eef98d45c8822eb6e982b500460371171ee0 Merge: 0dbcac3a6dbb3 cd9125030689d Author: David S. Miller Date: Tue Jun 20 09:32:33 2023 +0100 Merge tag 'ieee802154-for-net-2023-06-19' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan Stefan Schmidt says: ==================== An update from ieee802154 for your *net* tree: Two small fixes and MAINTAINERS update this time. Azeem Shaikh ensured consistent use of strscpy through the tree and fixed the usage in our trace.h. Chen Aotian fixed a potential memory leak in the hwsim simulator for ieee802154. Miquel Raynal updated the MAINATINERS file with the new team git tree locations and patchwork URLs. ==================== Signed-off-by: David S. Miller commit 692b7dc87ca6d55ab254f8259e6f970171dc9d01 Merge: dbad9ce9397ef 067d6ec7ed5b4 Author: Linus Torvalds Date: Mon Jun 19 17:05:43 2023 -0700 Merge tag 'hyperv-fixes-signed-20230619' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv fixes from Wei Liu: - Fix races in Hyper-V PCI controller (Dexuan Cui) - Fix handling of hyperv_pcpu_input_arg (Michael Kelley) - Fix vmbus_wait_for_unload to scan present CPUs (Michael Kelley) - Call hv_synic_free in the failure path of hv_synic_alloc (Dexuan Cui) - Add noop for real mode handlers for virtual trust level code (Saurabh Sengar) * tag 'hyperv-fixes-signed-20230619' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: PCI: hv: Add a per-bus mutex state_lock Revert "PCI: hv: Fix a timing issue which causes kdump to fail occasionally" PCI: hv: Remove the useless hv_pcichild_state from struct hv_pci_dev PCI: hv: Fix a race condition in hv_irq_unmask() that can cause panic PCI: hv: Fix a race condition bug in hv_pci_query_relations() arm64/hyperv: Use CPUHP_AP_HYPERV_ONLINE state to fix CPU online sequencing x86/hyperv: Fix hyperv_pcpu_input_arg handling when CPUs go online/offline Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs Drivers: hv: vmbus: Call hv_synic_free() if hv_synic_alloc() fails x86/hyperv/vtl: Add noop for realmode pointers commit 0518dbe97fe629fea255318841cf3ef1b4532d66 Author: Mark Brown Date: Wed Jun 14 22:18:58 2023 +0100 selftests/mm: fix cross compilation with LLVM Currently the MM selftests attempt to work out the target architecture by using CROSS_COMPILE or otherwise querying the host machine, storing the target architecture in a variable called MACHINE rather than the usual ARCH though as far as I can tell (including for x86_64) the value is the same as we would use for architecture. When cross compiling with LLVM we don't need a CROSS_COMPILE as LLVM can support many target architectures in a single build so this logic does not work, CROSS_COMPILE is not set and we end up selecting tests for the host rather than target architecture. Fix this by using the more standard ARCH to describe the architecture, taking it from the environment if specified. Link: https://lkml.kernel.org/r/20230614-kselftest-mm-llvm-v1-1-180523f277d3@kernel.org Signed-off-by: Mark Brown Cc: Nick Desaulniers Cc: Albert Ou Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Shuah Khan Cc: Tom Rix Signed-off-by: Andrew Morton commit 823b37e8a7104ca2bcf1945be77f33d4d5740f55 Author: Ben Dooks Date: Thu Jun 15 09:18:20 2023 +0100 mailmap: add entries for Ben Dooks I am going to be losing my sifive.com address soon and I also realised my old Simtec address (from >10 years ago) is also not been updates so update .mailmap for both. Link: https://lkml.kernel.org/r/20230615081820.79485-1-ben.dooks@codethink.co.uk Signed-off-by: Ben Dooks Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton commit 782e53d0c14420858dbf0f8f797973c150d3b6d7 Author: Ryusuke Konishi Date: Mon Jun 12 11:14:56 2023 +0900 nilfs2: prevent general protection fault in nilfs_clear_dirty_page() In a syzbot stress test that deliberately causes file system errors on nilfs2 with a corrupted disk image, it has been reported that nilfs_clear_dirty_page() called from nilfs_clear_dirty_pages() can cause a general protection fault. In nilfs_clear_dirty_pages(), when looking up dirty pages from the page cache and calling nilfs_clear_dirty_page() for each dirty page/folio retrieved, the back reference from the argument page to "mapping" may have been changed to NULL (and possibly others). It is necessary to check this after locking the page/folio. So, fix this issue by not calling nilfs_clear_dirty_page() on a page/folio after locking it in nilfs_clear_dirty_pages() if the back reference "mapping" from the page/folio is different from the "mapping" that held the page/folio just before. Link: https://lkml.kernel.org/r/20230612021456.3682-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Reported-by: syzbot+53369d11851d8f26735c@syzkaller.appspotmail.com Closes: https://lkml.kernel.org/r/000000000000da4f6b05eb9bf593@google.com Tested-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton commit 71c3ad65fabec9620d3f548b2da948c79c7ad9d5 Author: Qi Zheng Date: Fri Jun 9 08:15:18 2023 +0000 Revert "mm: vmscan: make global slab shrink lockless" This reverts commit f95bdb700bc6bb74e1199b1f5f90c613e152cfa7. Kernel test robot reports -88.8% regression in stress-ng.ramfs.ops_per_sec test case [1], which is caused by commit f95bdb700bc6 ("mm: vmscan: make global slab shrink lockless"). The root cause is that SRCU has to be careful to not frequently check for SRCU read-side critical section exits. Therefore, even if no one is currently in the SRCU read-side critical section, synchronize_srcu() cannot return quickly. That's why unregister_shrinker() has become slower. After discussion, we will try to use the refcount+RCU method [2] proposed by Dave Chinner to continue to re-implement the lockless slab shrink. So revert the shrinker_srcu related changes first. [1]. https://lore.kernel.org/lkml/202305230837.db2c233f-yujie.liu@intel.com/ [2]. https://lore.kernel.org/lkml/ZIJhou1d55d4H1s0@dread.disaster.area/ Link: https://lkml.kernel.org/r/20230609081518.3039120-8-qi.zheng@linux.dev Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202305230837.db2c233f-yujie.liu@intel.com Signed-off-by: Qi Zheng Cc: Dave Chinner Cc: Kirill Tkhai Cc: Muchun Song Cc: Roman Gushchin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 7cee3603192a198b23c034a7372b599081cbee88 Author: Qi Zheng Date: Fri Jun 9 08:15:17 2023 +0000 Revert "mm: vmscan: make memcg slab shrink lockless" This reverts commit caa05325c9126c77ebf114edce51536a0d0a9a08. Kernel test robot reports -88.8% regression in stress-ng.ramfs.ops_per_sec test case [1], which is caused by commit f95bdb700bc6 ("mm: vmscan: make global slab shrink lockless"). The root cause is that SRCU has to be careful to not frequently check for SRCU read-side critical section exits. Therefore, even if no one is currently in the SRCU read-side critical section, synchronize_srcu() cannot return quickly. That's why unregister_shrinker() has become slower. After discussion, we will try to use the refcount+RCU method [2] proposed by Dave Chinner to continue to re-implement the lockless slab shrink. So revert the shrinker_srcu related changes first. [1]. https://lore.kernel.org/lkml/202305230837.db2c233f-yujie.liu@intel.com/ [2]. https://lore.kernel.org/lkml/ZIJhou1d55d4H1s0@dread.disaster.area/ Link: https://lkml.kernel.org/r/20230609081518.3039120-7-qi.zheng@linux.dev Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202305230837.db2c233f-yujie.liu@intel.com Signed-off-by: Qi Zheng Cc: Dave Chinner Cc: Kirill Tkhai Cc: Muchun Song Cc: Roman Gushchin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit d6ecbcd70fffcffe79d45f3be7b8fcf5d8e04a3d Author: Qi Zheng Date: Fri Jun 9 08:15:16 2023 +0000 Revert "mm: vmscan: add shrinker_srcu_generation" This reverts commit 475733dda5aedba9e086379aafe6b5ffd53e8f5e. Kernel test robot reports -88.8% regression in stress-ng.ramfs.ops_per_sec test case [1], which is caused by commit f95bdb700bc6 ("mm: vmscan: make global slab shrink lockless"). The root cause is that SRCU has to be careful to not frequently check for SRCU read-side critical section exits. Therefore, even if no one is currently in the SRCU read-side critical section, synchronize_srcu() cannot return quickly. That's why unregister_shrinker() has become slower. We will try to use the refcount+RCU method [2] proposed by Dave Chinner to continue to re-implement the lockless slab shrink. So revert the shrinker_srcu related changes first. [1]. https://lore.kernel.org/lkml/202305230837.db2c233f-yujie.liu@intel.com/ [2]. https://lore.kernel.org/lkml/ZIJhou1d55d4H1s0@dread.disaster.area/ Link: https://lkml.kernel.org/r/20230609081518.3039120-6-qi.zheng@linux.dev Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202305230837.db2c233f-yujie.liu@intel.com Signed-off-by: Qi Zheng Cc: Dave Chinner Cc: Kirill Tkhai Cc: Muchun Song Cc: Roman Gushchin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 1a554ecc971406e291cea867112f7f2e377e810e Author: Qi Zheng Date: Fri Jun 9 08:15:15 2023 +0000 Revert "mm: shrinkers: make count and scan in shrinker debugfs lockless" This reverts commit 20cd1892fcc3efc10a7ac327cc3790494bec46b5. Kernel test robot reports -88.8% regression in stress-ng.ramfs.ops_per_sec test case [1], which is caused by commit f95bdb700bc6 ("mm: vmscan: make global slab shrink lockless"). The root cause is that SRCU has to be careful to not frequently check for SRCU read-side critical section exits. Therefore, even if no one is currently in the SRCU read-side critical section, synchronize_srcu() cannot return quickly. That's why unregister_shrinker() has become slower. We will try to use the refcount+RCU method [2] proposed by Dave Chinner to continue to re-implement the lockless slab shrink. So revert the shrinker_srcu related changes first. [1]. https://lore.kernel.org/lkml/202305230837.db2c233f-yujie.liu@intel.com/ [2]. https://lore.kernel.org/lkml/ZIJhou1d55d4H1s0@dread.disaster.area/ Link: https://lkml.kernel.org/r/20230609081518.3039120-5-qi.zheng@linux.dev Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202305230837.db2c233f-yujie.liu@intel.com Signed-off-by: Qi Zheng Cc: Dave Chinner Cc: Kirill Tkhai Cc: Muchun Song Cc: Roman Gushchin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit c534f7cca6b9b1c0dc97d6e9c5587858d4330cd9 Author: Qi Zheng Date: Fri Jun 9 08:15:14 2023 +0000 Revert "mm: vmscan: hold write lock to reparent shrinker nr_deferred" This reverts commit b3cabea3c9153fd42fe5cb851ac58b51ea2b32b8. Kernel test robot reports -88.8% regression in stress-ng.ramfs.ops_per_sec test case [1], which is caused by commit f95bdb700bc6 ("mm: vmscan: make global slab shrink lockless"). The root cause is that SRCU has to be careful to not frequently check for SRCU read-side critical section exits. Therefore, even if no one is currently in the SRCU read-side critical section, synchronize_srcu() cannot return quickly. That's why unregister_shrinker() has become slower. We will try to use the refcount+RCU method [2] proposed by Dave Chinner to continue to re-implement the lockless slab shrink. Because there will be other readers after reverting the shrinker_srcu related changes, so it is better to restore to hold read lock to reparent shrinker nr_deferred. [1]. https://lore.kernel.org/lkml/202305230837.db2c233f-yujie.liu@intel.com/ [2]. https://lore.kernel.org/lkml/ZIJhou1d55d4H1s0@dread.disaster.area/ Link: https://lkml.kernel.org/r/20230609081518.3039120-4-qi.zheng@linux.dev Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202305230837.db2c233f-yujie.liu@intel.com Signed-off-by: Qi Zheng Cc: Dave Chinner Cc: Kirill Tkhai Cc: Muchun Song Cc: Roman Gushchin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 07252b0f97150b03050f74f42250f275566d70b9 Author: Qi Zheng Date: Fri Jun 9 08:15:13 2023 +0000 Revert "mm: vmscan: remove shrinker_rwsem from synchronize_shrinkers()" This reverts commit 1643db98d9b314e0a592d152603094fbf7ab906e. Kernel test robot reports -88.8% regression in stress-ng.ramfs.ops_per_sec test case [1], which is caused by commit f95bdb700bc6 ("mm: vmscan: make global slab shrink lockless"). The root cause is that SRCU has to be careful to not frequently check for SRCU read-side critical section exits. Therefore, even if no one is currently in the SRCU read-side critical section, synchronize_srcu() cannot return quickly. That's why unregister_shrinker() has become slower. We will try to use the refcount+RCU method [2] proposed by Dave Chinner to continue to re-implement the lockless slab shrink. So we still need shrinker_rwsem in synchronize_shrinkers() after reverting the shrinker_srcu related changes. [1]. https://lore.kernel.org/lkml/202305230837.db2c233f-yujie.liu@intel.com/ [2]. https://lore.kernel.org/lkml/ZIJhou1d55d4H1s0@dread.disaster.area/ Link: https://lkml.kernel.org/r/20230609081518.3039120-3-qi.zheng@linux.dev Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202305230837.db2c233f-yujie.liu@intel.com Signed-off-by: Qi Zheng Cc: Dave Chinner Cc: Kirill Tkhai Cc: Muchun Song Cc: Roman Gushchin Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 47a7c01c3efc6581f5dcca40928baeb38e1e40c2 Author: Qi Zheng Date: Fri Jun 9 08:15:12 2023 +0000 Revert "mm: shrinkers: convert shrinker_rwsem to mutex" Patch series "revert shrinker_srcu related changes". This patch (of 7): This reverts commit cf2e309ebca7bb0916771839f9b580b06c778530. Kernel test robot reports -88.8% regression in stress-ng.ramfs.ops_per_sec test case [1], which is caused by commit f95bdb700bc6 ("mm: vmscan: make global slab shrink lockless"). The root cause is that SRCU has to be careful to not frequently check for SRCU read-side critical section exits. Therefore, even if no one is currently in the SRCU read-side critical section, synchronize_srcu() cannot return quickly. That's why unregister_shrinker() has become slower. After discussion, we will try to use the refcount+RCU method [2] proposed by Dave Chinner to continue to re-implement the lockless slab shrink. So revert the shrinker_mutex back to shrinker_rwsem first. [1]. https://lore.kernel.org/lkml/202305230837.db2c233f-yujie.liu@intel.com/ [2]. https://lore.kernel.org/lkml/ZIJhou1d55d4H1s0@dread.disaster.area/ Link: https://lkml.kernel.org/r/20230609081518.3039120-1-qi.zheng@linux.dev Link: https://lkml.kernel.org/r/20230609081518.3039120-2-qi.zheng@linux.dev Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202305230837.db2c233f-yujie.liu@intel.com Signed-off-by: Qi Zheng Cc: Dave Chinner Cc: Kirill Tkhai Cc: Muchun Song Cc: Roman Gushchin Cc: Vlastimil Babka Cc: Yujie Liu Signed-off-by: Andrew Morton commit 679bd7ebdd315bf457a4740b306ae99f1d0a403d Author: Ryusuke Konishi Date: Fri Jun 9 12:57:32 2023 +0900 nilfs2: fix buffer corruption due to concurrent device reads As a result of analysis of a syzbot report, it turned out that in three cases where nilfs2 allocates block device buffers directly via sb_getblk, concurrent reads to the device can corrupt the allocated buffers. Nilfs2 uses sb_getblk for segment summary blocks, that make up a log header, and the super root block, that is the trailer, and when moving and writing the second super block after fs resize. In any of these, since the uptodate flag is not set when storing metadata to be written in the allocated buffers, the stored metadata will be overwritten if a device read of the same block occurs concurrently before the write. This causes metadata corruption and misbehavior in the log write itself, causing warnings in nilfs_btree_assign() as reported. Fix these issues by setting an uptodate flag on the buffer head on the first or before modifying each buffer obtained with sb_getblk, and clearing the flag on failure. When setting the uptodate flag, the lock_buffer/unlock_buffer pair is used to perform necessary exclusive control, and the buffer is filled to ensure that uninitialized bytes are not mixed into the data read from others. As for buffers for segment summary blocks, they are filled incrementally, so if the uptodate flag was unset on their allocation, set the flag and zero fill the buffer once at that point. Also, regarding the superblock move routine, the starting point of the memset call to zerofill the block is incorrectly specified, which can cause a buffer overflow on file systems with block sizes greater than 4KiB. In addition, if the superblock is moved within a large block, it is necessary to assume the possibility that the data in the superblock will be destroyed by zero-filling before copying. So fix these potential issues as well. Link: https://lkml.kernel.org/r/20230609035732.20426-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Reported-by: syzbot+31837fe952932efc8fb9@syzkaller.appspotmail.com Closes: https://lkml.kernel.org/r/00000000000030000a05e981f475@google.com Tested-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton commit 6a59cb5158bff13b80f116305155fbe4967a5010 Author: Florian Fainelli Date: Wed Jun 7 15:13:35 2023 -0700 scripts/gdb: fix SB_* constants parsing --0000000000009a0c9905fd9173ad Content-Transfer-Encoding: 8bit After f15afbd34d8f ("fs: fix undefined behavior in bit shift for SB_NOUSER") the constants were changed from plain integers which LX_VALUE() can parse to constants using the BIT() macro which causes the following: Reading symbols from build/linux-custom/vmlinux...done. Traceback (most recent call last): File "/home/fainelli/work/buildroot/output/arm64/build/linux-custom/vmlinux-gdb.py", line 25, in import linux.constants File "/home/fainelli/work/buildroot/output/arm64/build/linux-custom/scripts/gdb/linux/constants.py", line 5 LX_SB_RDONLY = ((((1UL))) << (0)) Use LX_GDBPARSED() which does not suffer from that issue. f15afbd34d8f ("fs: fix undefined behavior in bit shift for SB_NOUSER") Link: https://lkml.kernel.org/r/20230607221337.2781730-1-florian.fainelli@broadcom.com Signed-off-by: Florian Fainelli Acked-by: Christian Brauner Cc: Hao Ge Cc: Jan Kiszka Cc: Kieran Bingham Cc: Luis Chamberlain Cc: Pankaj Raghav Signed-off-by: Andrew Morton commit 2049a7d0cbc6ac8e370e836ed68597be04a7dc49 Author: Prathu Baronia Date: Thu Jun 8 21:14:49 2023 +0530 scripts: fix the gfp flags header path in gfp-translate Since gfp flags have been shifted to gfp_types.h so update the path in the gfp-translate script. Link: https://lkml.kernel.org/r/20230608154450.21758-1-prathubaronia2011@gmail.com Fixes: cb5a065b4ea9c ("headers/deps: mm: Split out of ") Signed-off-by: Prathu Baronia Reviewed-by: David Hildenbrand Cc: Masahiro Yamada Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Ingo Molnar Cc: Yury Norov Cc: Signed-off-by: Andrew Morton commit b7cb3821905b79b6ed474fd5ba34d1e187649139 Author: Mike Kravetz Date: Thu Jun 8 13:49:27 2023 -0700 udmabuf: revert 'Add support for mapping hugepages (v4)' This effectively reverts commit 16c243e99d33 ("udmabuf: Add support for mapping hugepages (v4)"). Recently, Junxiao Chang found a BUG with page map counting as described here [1]. This issue pointed out that the udmabuf driver was making direct use of subpages of hugetlb pages. This is not a good idea, and no other mm code attempts such use. In addition to the mapcount issue, this also causes issues with hugetlb vmemmap optimization and page poisoning. For now, remove hugetlb support. If udmabuf wants to be used on hugetlb mappings, it should be changed to only use complete hugetlb pages. This will require different alignment and size requirements on the UDMABUF_CREATE API. [1] https://lore.kernel.org/linux-mm/20230512072036.1027784-1-junxiao.chang@intel.com/ Link: https://lkml.kernel.org/r/20230608204927.88711-1-mike.kravetz@oracle.com Fixes: 16c243e99d33 ("udmabuf: Add support for mapping hugepages (v4)") Signed-off-by: Mike Kravetz Acked-by: Greg Kroah-Hartman Acked-by: Vivek Kasireddy Acked-by: Gerd Hoffmann Cc: David Hildenbrand Cc: Dongwon Kim Cc: James Houghton Cc: Jerome Marchand Cc: Junxiao Chang Cc: Kirill A. Shutemov Cc: Michal Hocko Cc: Muchun Song Cc: Signed-off-by: Andrew Morton commit c8a8f3b4a95ace7683b615ad9c9aa0eac59013ae Author: David Stevens Date: Wed Jun 7 14:31:35 2023 +0900 mm/khugepaged: fix iteration in collapse_file Remove an unnecessary call to xas_set(index) when iterating over the target range in collapse_file. The extra call to xas_set reset the xas cursor to the top of the tree, causing the xas_next call on the next iteration to walk the tree to index instead of advancing to index+1. This returned the same page again, which would cause collapse_file to fail because the page is already locked. This bug was hidden when CONFIG_DEBUG_VM was set. When that config was used, the xas_load in a subsequent VM_BUG_ON assert would walk xas from the top of the tree to index, causing the xas_next call on the next loop iteration to advance the cursor as expected. Link: https://lkml.kernel.org/r/20230607053135.2087354-1-stevensd@google.com Fixes: a2e17cc2efc7 ("mm/khugepaged: maintain page cache uptodate flag") Signed-off-by: David Stevens Reviewed-by: Peter Xu Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jiaqi Yan Cc: Kirill A . Shutemov Cc: Matthew Wilcox Cc: Yang Shi Cc: Mike Kravetz Signed-off-by: Andrew Morton commit 935d44acf621aa0688fef8312dec3e5940f38f4e Author: Roberto Sassu Date: Wed Jun 7 15:24:27 2023 +0200 memfd: check for non-NULL file_seals in memfd_create() syscall Ensure that file_seals is non-NULL before using it in the memfd_create() syscall. One situation in which memfd_file_seals_ptr() could return a NULL pointer when CONFIG_SHMEM=n, oopsing the kernel. Link: https://lkml.kernel.org/r/20230607132427.2867435-1-roberto.sassu@huaweicloud.com Fixes: 47b9012ecdc7 ("shmem: add sealing support to hugetlb-backed memfd") Signed-off-by: Roberto Sassu Cc: Marc-Andr Lureau Cc: Mike Kravetz Cc: Signed-off-by: Andrew Morton commit 95a301eefa82057571207edd06ea36218985a75e Author: Lorenzo Stoakes Date: Mon Jun 5 21:11:07 2023 +0100 mm/vmalloc: do not output a spurious warning when huge vmalloc() fails In __vmalloc_area_node() we always warn_alloc() when an allocation performed by vm_area_alloc_pages() fails unless it was due to a pending fatal signal. However, huge page allocations instigated either by vmalloc_huge() or __vmalloc_node_range() (or a caller that invokes this like kvmalloc() or kvmalloc_node()) always falls back to order-0 allocations if the huge page allocation fails. This renders the warning useless and noisy, especially as all callers appear to be aware that this may fallback. This has already resulted in at least one bug report from a user who was confused by this (see link). Therefore, simply update the code to only output this warning for order-0 pages when no fatal signal is pending. Link: https://bugzilla.suse.com/show_bug.cgi?id=1211410 Link: https://lkml.kernel.org/r/20230605201107.83298-1-lstoakes@gmail.com Fixes: 80b1d8fdfad1 ("mm: vmalloc: correct use of __GFP_NOWARN mask in __vmalloc_area_node()") Signed-off-by: Lorenzo Stoakes Acked-by: Vlastimil Babka Reviewed-by: Baoquan He Acked-by: Michal Hocko Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: David Hildenbrand Cc: Christoph Hellwig Cc: Signed-off-by: Andrew Morton commit 77795f900e2a07c1cbedc375789aefb43843b6c2 Author: Liam R. Howlett Date: Tue Jun 6 14:29:12 2023 -0400 mm/mprotect: fix do_mprotect_pkey() limit check The return of do_mprotect_pkey() can still be incorrectly returned as success if there is a gap that spans to or beyond the end address passed in. Update the check to ensure that the end address has indeed been seen. Link: https://lore.kernel.org/all/CABi2SkXjN+5iFoBhxk71t3cmunTk-s=rB4T7qo0UQRh17s49PQ@mail.gmail.com/ Link: https://lkml.kernel.org/r/20230606182912.586576-1-Liam.Howlett@oracle.com Fixes: 82f951340f25 ("mm/mprotect: fix do_mprotect_pkey() return on error") Signed-off-by: Liam R. Howlett Reported-by: Jeff Xu Reviewed-by: Lorenzo Stoakes Acked-by: David Hildenbrand Acked-by: Vlastimil Babka Cc: Signed-off-by: Andrew Morton commit 54abe19e00cfcc5a72773d15cd00ed19ab763439 Author: Rafael Aquini Date: Tue Jun 6 19:36:13 2023 -0400 writeback: fix dereferencing NULL mapping->host on writeback_page_template When commit 19343b5bdd16 ("mm/page-writeback: introduce tracepoint for wait_on_page_writeback()") repurposed the writeback_dirty_page trace event as a template to create its new wait_on_page_writeback trace event, it ended up opening a window to NULL pointer dereference crashes due to the (infrequent) occurrence of a race where an access to a page in the swap-cache happens concurrently with the moment this page is being written to disk and the tracepoint is enabled: BUG: kernel NULL pointer dereference, address: 0000000000000040 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 800000010ec0a067 P4D 800000010ec0a067 PUD 102353067 PMD 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 1 PID: 1320 Comm: shmem-worker Kdump: loaded Not tainted 6.4.0-rc5+ #13 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS edk2-20230301gitf80f052277c8-1.fc37 03/01/2023 RIP: 0010:trace_event_raw_event_writeback_folio_template+0x76/0xf0 Code: 4d 85 e4 74 5c 49 8b 3c 24 e8 06 98 ee ff 48 89 c7 e8 9e 8b ee ff ba 20 00 00 00 48 89 ef 48 89 c6 e8 fe d4 1a 00 49 8b 04 24 <48> 8b 40 40 48 89 43 28 49 8b 45 20 48 89 e7 48 89 43 30 e8 a2 4d RSP: 0000:ffffaad580b6fb60 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff90e38035c01c RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff90e38035c044 RBP: ffff90e38035c024 R08: 0000000000000002 R09: 0000000000000006 R10: ffff90e38035c02e R11: 0000000000000020 R12: ffff90e380bac000 R13: ffffe3a7456d9200 R14: 0000000000001b81 R15: ffffe3a7456d9200 FS: 00007f2e4e8a15c0(0000) GS:ffff90e3fbc80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000040 CR3: 00000001150c6003 CR4: 0000000000170ee0 Call Trace: ? __die+0x20/0x70 ? page_fault_oops+0x76/0x170 ? kernelmode_fixup_or_oops+0x84/0x110 ? exc_page_fault+0x65/0x150 ? asm_exc_page_fault+0x22/0x30 ? trace_event_raw_event_writeback_folio_template+0x76/0xf0 folio_wait_writeback+0x6b/0x80 shmem_swapin_folio+0x24a/0x500 ? filemap_get_entry+0xe3/0x140 shmem_get_folio_gfp+0x36e/0x7c0 ? find_busiest_group+0x43/0x1a0 shmem_fault+0x76/0x2a0 ? __update_load_avg_cfs_rq+0x281/0x2f0 __do_fault+0x33/0x130 do_read_fault+0x118/0x160 do_pte_missing+0x1ed/0x2a0 __handle_mm_fault+0x566/0x630 handle_mm_fault+0x91/0x210 do_user_addr_fault+0x22c/0x740 exc_page_fault+0x65/0x150 asm_exc_page_fault+0x22/0x30 This problem arises from the fact that the repurposed writeback_dirty_page trace event code was written assuming that every pointer to mapping (struct address_space) would come from a file-mapped page-cache object, thus mapping->host would always be populated, and that was a valid case before commit 19343b5bdd16. The swap-cache address space (swapper_spaces), however, doesn't populate its ->host (struct inode) pointer, thus leading to the crashes in the corner-case aforementioned. commit 19343b5bdd16 ended up breaking the assignment of __entry->name and __entry->ino for the wait_on_page_writeback tracepoint -- both dependent on mapping->host carrying a pointer to a valid inode. The assignment of __entry->name was fixed by commit 68f23b89067f ("memcg: fix a crash in wb_workfn when a device disappears"), and this commit fixes the remaining case, for __entry->ino. Link: https://lkml.kernel.org/r/20230606233613.1290819-1-aquini@redhat.com Fixes: 19343b5bdd16 ("mm/page-writeback: introduce tracepoint for wait_on_page_writeback()") Signed-off-by: Rafael Aquini Reviewed-by: Yafang Shao Cc: Aristeu Rozanski Cc: Signed-off-by: Andrew Morton commit 85d38d5810e285d5aec7fb5283107d1da70c12a9 Author: Dheeraj Kumar Srivastava Date: Sat Jun 17 02:52:36 2023 +0530 x86/apic: Fix kernel panic when booting with intremap=off and x2apic_phys When booting with "intremap=off" and "x2apic_phys" on the kernel command line, the physical x2APIC driver ends up being used even when x2APIC mode is disabled ("intremap=off" disables x2APIC mode). This happens because the first compound condition check in x2apic_phys_probe() is false due to x2apic_mode == 0 and so the following one returns true after default_acpi_madt_oem_check() having already selected the physical x2APIC driver. This results in the following panic: kernel BUG at arch/x86/kernel/apic/io_apic.c:2409! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.4.0-rc2-ver4.1rc2 #2 Hardware name: Dell Inc. PowerEdge R6515/07PXPY, BIOS 2.3.6 07/06/2021 RIP: 0010:setup_IO_APIC+0x9c/0xaf0 Call Trace: ? native_read_msr apic_intr_mode_init x86_late_time_init start_kernel x86_64_start_reservations x86_64_start_kernel secondary_startup_64_no_verify which is: setup_IO_APIC: apic_printk(APIC_VERBOSE, "ENABLING IO-APIC IRQs\n"); for_each_ioapic(ioapic) BUG_ON(mp_irqdomain_create(ioapic)); Return 0 to denote that x2APIC has not been enabled when probing the physical x2APIC driver. [ bp: Massage commit message heavily. ] Fixes: 9ebd680bd029 ("x86, apic: Use probe routines to simplify apic selection") Signed-off-by: Dheeraj Kumar Srivastava Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Kishon Vijay Abraham I Reviewed-by: Vasant Hegde Reviewed-by: Cyrill Gorcunov Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230616212236.1389-1-dheerajkumar.srivastava@amd.com commit dbad9ce9397ef7f891b4ff44bad694add673c1a1 Merge: 45a3e24f65e90 819da022dd007 Author: Linus Torvalds Date: Mon Jun 19 11:22:46 2023 -0700 Merge tag 'afs-fixes-20230719' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS writeback fixes from David Howells: - release the acquired batch before returning if we got >=5 skips - retry a page we had to wait for rather than skipping over it after the wait * tag 'afs-fixes-20230719' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Fix waiting for writeback then skipping folio afs: Fix dangling folio ref counts in writeback commit 7257d930aadcd62d1c7971ab14f3b1126356abdc Author: Teresa Remmet Date: Wed Jun 14 14:52:40 2023 +0200 regulator: pca9450: Fix LDO3OUT and LDO4OUT MASK L3_OUT and L4_OUT Bit fields range from Bit 0:4 and thus the mask should be 0x1F instead of 0x0F. Fixes: 0935ff5f1f0a ("regulator: pca9450: add pca9450 pmic driver") Signed-off-by: Teresa Remmet Reviewed-by: Frieder Schrempf Link: https://lore.kernel.org/r/20230614125240.3946519-1-t.remmet@phytec.de Signed-off-by: Mark Brown commit d7fce52fdf96663ddc2eb21afecff3775588612a Author: Terin Stock Date: Fri Jun 9 22:58:42 2023 +0200 ipvs: align inner_mac_header for encapsulation When using encapsulation the original packet's headers are copied to the inner headers. This preserves the space for an inner mac header, which is not used by the inner payloads for the encapsulation types supported by IPVS. If a packet is using GUE or GRE encapsulation and needs to be segmented, flow can be passed to __skb_udp_tunnel_segment() which calculates a negative tunnel header length. A negative tunnel header length causes pskb_may_pull() to fail, dropping the packet. This can be observed by attaching probes to ip_vs_in_hook(), __dev_queue_xmit(), and __skb_udp_tunnel_segment(): perf probe --add '__dev_queue_xmit skb->inner_mac_header \ skb->inner_network_header skb->mac_header skb->network_header' perf probe --add '__skb_udp_tunnel_segment:7 tnl_hlen' perf probe -m ip_vs --add 'ip_vs_in_hook skb->inner_mac_header \ skb->inner_network_header skb->mac_header skb->network_header' These probes the headers and tunnel header length for packets which traverse the IPVS encapsulation path. A TCP packet can be forced into the segmentation path by being smaller than a calculated clamped MSS, but larger than the advertised MSS. probe:ip_vs_in_hook: inner_mac_header=0x0 inner_network_header=0x0 mac_header=0x44 network_header=0x52 probe:ip_vs_in_hook: inner_mac_header=0x44 inner_network_header=0x52 mac_header=0x44 network_header=0x32 probe:dev_queue_xmit: inner_mac_header=0x44 inner_network_header=0x52 mac_header=0x44 network_header=0x32 probe:__skb_udp_tunnel_segment_L7: tnl_hlen=-2 When using veth-based encapsulation, the interfaces are set to be mac-less, which does not preserve space for an inner mac header. This prevents this issue from occurring. In our real-world testing of sending a 32KB file we observed operation time increasing from ~75ms for veth-based encapsulation to over 1.5s using IPVS encapsulation due to retries from dropped packets. This changeset modifies the packet on the encapsulation path in ip_vs_tunnel_xmit() and ip_vs_tunnel_xmit_v6() to remove the inner mac header offset. This fixes UDP segmentation for both encapsulation types, and corrects the inner headers for any IPIP flows that may use it. Fixes: 84c0d5e96f3a ("ipvs: allow tunneling with gue encapsulation") Signed-off-by: Terin Stock Acked-by: Julian Anastasov Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit 819da022dd007398d0c42ebcd8dbb1b681acea53 Author: Vishal Moola (Oracle) Date: Wed Jun 7 13:41:20 2023 -0700 afs: Fix waiting for writeback then skipping folio Commit acc8d8588cb7 converted afs_writepages_region() to write back a folio batch. The function waits for writeback to a folio, but then proceeds to the rest of the batch without trying to write that folio again. This patch fixes has it attempt to write the folio again. [DH: Also remove an 'else' that adding a goto makes redundant] Fixes: acc8d8588cb7 ("afs: convert afs_writepages_region() to use filemap_get_folios_tag()") Signed-off-by: Vishal Moola (Oracle) Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/20230607204120.89416-2-vishal.moola@gmail.com/ commit a2b6f2ab3e144f8e23666aafeba0e4d9ea4b7975 Author: Vishal Moola (Oracle) Date: Wed Jun 7 13:41:19 2023 -0700 afs: Fix dangling folio ref counts in writeback Commit acc8d8588cb7 converted afs_writepages_region() to write back a folio batch. If writeback needs rescheduling, the function exits without dropping the references to the folios in fbatch. This patch fixes that. [DH: Moved the added line before the _leave()] Fixes: acc8d8588cb7 ("afs: convert afs_writepages_region() to use filemap_get_folios_tag()") Signed-off-by: Vishal Moola (Oracle) Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/20230607204120.89416-1-vishal.moola@gmail.com/ commit ff7a1790fbf92f1bdd0966d3f0da3ea808ede876 Author: Michael Walle Date: Mon Jun 19 10:56:07 2023 +0200 gpiolib: Fix irq_domain resource tracking for gpiochip_irqchip_add_domain() Up until commit 6a45b0e2589f ("gpiolib: Introduce gpiochip_irqchip_add_domain()") all irq_domains were allocated by gpiolib itself and thus gpiolib also takes care of freeing it. With gpiochip_irqchip_add_domain() a user of gpiolib can associate an irq_domain with the gpio_chip. This irq_domain is not managed by gpiolib and therefore must not be freed by gpiolib. Fixes: 6a45b0e2589f ("gpiolib: Introduce gpiochip_irqchip_add_domain()") Reported-by: Jiawen Wu Signed-off-by: Michael Walle Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 555434fd5c6b3589d9511ab6e88faf50346e19da Author: Luke D. Jones Date: Mon Jun 19 18:03:20 2023 +1200 ALSA: hda/realtek: Add quirk for ASUS ROG G634Z Adds the required quirk to enable the Cirrus amp and correct pins on the ASUS ROG G634Z series. While this works if the related _DSD properties are made available, these aren't included in the ACPI of these laptops (yet). Signed-off-by: Luke D. Jones Link: https://lore.kernel.org/r/20230619060320.1336455-1-luke@ljones.dev Signed-off-by: Takashi Iwai commit 1f1ef7e5bbe2de125da413e238915f6047ea4ba2 Author: Charles Keepax Date: Wed Jun 14 15:21:16 2023 +0100 ASoC: intel: sof_sdw: Fixup typo in device link checking The loop checking for multiple different devices on a single sdw link contains a typo accidentally using i twice instead of j. Correct to the correct index variable. Fixes: dc5a3e60a4b5 ("ASoC: Intel: sof_sdw: append codec type to dai link name") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20230614142116.1059677-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 413db499730248431c1005b392e8ed82c4fa19bf Author: Sergey Shtylyov Date: Sat Jun 17 23:36:22 2023 +0300 mmc: usdhi60rol0: fix deferred probing The driver overrides the error codes returned by platform_get_irq_byname() to -ENODEV, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating error codes upstream. Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/20230617203622.6812-13-s.shtylyov@omp.ru Signed-off-by: Ulf Hansson commit c2df53c5806cfd746dae08e07bc8c4ad247c3b70 Author: Sergey Shtylyov Date: Sat Jun 17 23:36:21 2023 +0300 mmc: sunxi: fix deferred probing The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Since commit ce753ad1549c ("platform: finally disallow IRQ0 in platform_get_irq() and its ilk") IRQ0 is no longer returned by those APIs, so we now can safely ignore it... Fixes: 2408a08583d2 ("mmc: sunxi-mmc: Handle return value of platform_get_irq") Cc: stable@vger.kernel.org # v5.19+ Signed-off-by: Sergey Shtylyov Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230617203622.6812-12-s.shtylyov@omp.ru Signed-off-by: Ulf Hansson commit 5b067d7f855c61df7f8e2e8ccbcee133c282415e Author: Sergey Shtylyov Date: Sat Jun 17 23:36:20 2023 +0300 mmc: sh_mmcif: fix deferred probing The driver overrides the error codes returned by platform_get_irq() to -ENXIO, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/20230617203622.6812-11-s.shtylyov@omp.ru Signed-off-by: Ulf Hansson commit 8d0caeedcd05a721f3cc2537b0ea212ec4027307 Author: Sergey Shtylyov Date: Sat Jun 17 23:36:19 2023 +0300 mmc: sdhci-spear: fix deferred probing The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Since commit ce753ad1549c ("platform: finally disallow IRQ0 in platform_get_irq() and its ilk") IRQ0 is no longer returned by those APIs, so we now can safely ignore it... Fixes: 682798a596a6 ("mmc: sdhci-spear: Handle return value of platform_get_irq") Cc: stable@vger.kernel.org # v5.19+ Signed-off-by: Sergey Shtylyov Acked-by: Viresh Kumar Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230617203622.6812-10-s.shtylyov@omp.ru Signed-off-by: Ulf Hansson commit b465dea5e1540c7d7b5211adaf94926980d3014b Author: Sergey Shtylyov Date: Sat Jun 17 23:36:18 2023 +0300 mmc: sdhci-acpi: fix deferred probing The driver overrides the error codes returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: 1b7ba57ecc86 ("mmc: sdhci-acpi: Handle return value of platform_get_irq") Signed-off-by: Sergey Shtylyov Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230617203622.6812-9-s.shtylyov@omp.ru Signed-off-by: Ulf Hansson commit 3c482e1e830d79b9be8afb900a965135c01f7893 Author: Sergey Shtylyov Date: Sat Jun 17 23:36:17 2023 +0300 mmc: owl: fix deferred probing The driver overrides the error codes returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: ff65ffe46d28 ("mmc: Add Actions Semi Owl SoCs SD/MMC driver") Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/20230617203622.6812-8-s.shtylyov@omp.ru Signed-off-by: Ulf Hansson commit fb51b74a57859b707c3e8055ed0c25a7ca4f6a29 Author: Sergey Shtylyov Date: Sat Jun 17 23:36:16 2023 +0300 mmc: omap_hsmmc: fix deferred probing The driver overrides the error codes returned by platform_get_irq() to -ENXIO, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/20230617203622.6812-7-s.shtylyov@omp.ru Signed-off-by: Ulf Hansson commit aedf4ba1ad00aaa94c1b66c73ecaae95e2564b95 Author: Sergey Shtylyov Date: Sat Jun 17 23:36:15 2023 +0300 mmc: omap: fix deferred probing The driver overrides the error codes returned by platform_get_irq() to -ENXIO, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/20230617203622.6812-6-s.shtylyov@omp.ru Signed-off-by: Ulf Hansson commit 8d84064da0d4672e74f984e8710f27881137472c Author: Sergey Shtylyov Date: Sat Jun 17 23:36:14 2023 +0300 mmc: mvsdio: fix deferred probing The driver overrides the error codes returned by platform_get_irq() to -ENXIO, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/20230617203622.6812-5-s.shtylyov@omp.ru Signed-off-by: Ulf Hansson commit 0c4dc0f054891a2cbde0426b0c0fdf232d89f47f Author: Sergey Shtylyov Date: Sat Jun 17 23:36:13 2023 +0300 mmc: mtk-sd: fix deferred probing The driver overrides the error codes returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Fixes: 208489032bdd ("mmc: mediatek: Add Mediatek MMC driver") Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/20230617203622.6812-4-s.shtylyov@omp.ru Signed-off-by: Ulf Hansson commit b8ada54fa1b83f3b6480d4cced71354301750153 Author: Sergey Shtylyov Date: Sat Jun 17 23:36:12 2023 +0300 mmc: meson-gx: fix deferred probing The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Since commit ce753ad1549c ("platform: finally disallow IRQ0 in platform_get_irq() and its ilk") IRQ0 is no longer returned by those APIs, so we now can safely ignore it... Fixes: cbcaac6d7dd2 ("mmc: meson-gx-mmc: Fix platform_get_irq's error checking") Cc: stable@vger.kernel.org # v5.19+ Signed-off-by: Sergey Shtylyov Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230617203622.6812-3-s.shtylyov@omp.ru Signed-off-by: Ulf Hansson commit 71150ac12558bcd9d75e6e24cf7c872c2efd80f3 Author: Sergey Shtylyov Date: Sat Jun 17 23:36:11 2023 +0300 mmc: bcm2835: fix deferred probing The driver overrides the error codes and IRQ0 returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream. Since commit ce753ad1549c ("platform: finally disallow IRQ0 in platform_get_irq() and its ilk") IRQ0 is no longer returned by those APIs, so we now can safely ignore it... Fixes: 660fc733bd74 ("mmc: bcm2835: Add new driver for the sdhost controller.") Cc: stable@vger.kernel.org # v5.19+ Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/20230617203622.6812-2-s.shtylyov@omp.ru Signed-off-by: Ulf Hansson commit f334ad47683606b682b4166b800d8b372d315436 Author: Jisheng Zhang Date: Sat Jun 17 16:53:19 2023 +0800 mmc: litex_mmc: set PROBE_PREFER_ASYNCHRONOUS mmc host drivers should have enabled the asynchronous probe option, but it seems like we didn't set it for litex_mmc when introducing litex mmc support, so let's set it now. Tested with linux-on-litex-vexriscv on sipeed tang nano 20K fpga. Signed-off-by: Jisheng Zhang Acked-by: Gabriel Somlo Fixes: 92e099104729 ("mmc: Add driver for LiteX's LiteSDCard interface") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230617085319.2139-1-jszhang@kernel.org Signed-off-by: Ulf Hansson commit 0dbcac3a6dbb32c1de53ebebfd28452965e12950 Merge: 92717c2356cb6 a128f9d4c1227 Author: David S. Miller Date: Mon Jun 19 10:28:56 2023 +0100 Merge tag 'mlx5-fixes-2023-06-16' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-fixes-2023-06-16 This series provides bug fixes to mlx5 driver. Please pull and let me know if there is any problem. ==================== Signed-off-by: David S. Miller commit 92717c2356cb62c89e8a3dc37cbbab2502562524 Author: Stefan Wahren Date: Wed Jun 14 23:06:56 2023 +0200 net: qca_spi: Avoid high load if QCA7000 is not available In case the QCA7000 is not available via SPI (e.g. in reset), the driver will cause a high load. The reason for this is that the synchronization is never finished and schedule() is never called. Since the synchronization is not timing critical, it's safe to drop this from the scheduling condition. Signed-off-by: Stefan Wahren Fixes: 291ab06ecf67 ("net: qualcomm: new Ethernet over SPI driver for QCA7000") Signed-off-by: David S. Miller commit 45a3e24f65e90a047bef86f927ebdc4c710edaa1 Author: Linus Torvalds Date: Sun Jun 18 14:06:27 2023 -0700 Linux 6.4-rc7 commit 8c1f0c38b31025f60437215dd27fffc293565fa4 Merge: ecbcffe3b7edc 9cefd6e7e0a77 Author: Linus Torvalds Date: Sun Jun 18 09:55:33 2023 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Four fixes, all in drivers: three fairly obvious small ones and a large one in aacraid to add block queue completion mapping and fix a CPU offline hang" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: lpfc: Fix incorrect big endian type assignment in bsg loopback path scsi: target: core: Fix error path in target_setup_session() scsi: storvsc: Always set no_report_opcodes scsi: aacraid: Reply queue mapping to CPUs based on IRQ affinity commit ecbcffe3b7edc9a42b4e29ed8dafd56855ee675c Merge: 1dbbfe254d236 6aa0365a3c851 Author: Linus Torvalds Date: Sun Jun 18 09:48:39 2023 -0700 Merge tag 'ata-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata Pull ata fix from Damien Le Moal: - Avoid deadlocks on resume from sleep by delaying scsi rescan until the scsi device is also fully resumed. * tag 'ata-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: ata: libata-scsi: Avoid deadlock on rescan after device resume commit 1dbbfe254d2360993e79a10ca42aeec407e13b34 Merge: 606c812eb1d5b b5b2a02bcaac7 Author: Linus Torvalds Date: Sun Jun 18 09:41:39 2023 -0700 Merge tag 'parisc-for-6.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fix from Helge Deller: - Drop redundant register definitions to fix build with latest binutils * tag 'parisc-for-6.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Delete redundant register definitions in commit c938ab4da0eb1620ae3243b0b24c572ddfc318fc Author: Andrew Lunn Date: Sat Jun 17 17:55:00 2023 +0200 net: phy: Manual remove LEDs to ensure correct ordering If the core is left to remove the LEDs via devm_, it is performed too late, after the PHY driver is removed from the PHY. This results in dereferencing a NULL pointer when the LED core tries to turn the LED off before destroying the LED. Manually unregister the LEDs at a safe point in phy_remove. Cc: stable@vger.kernel.org Reported-by: Florian Fainelli Suggested-by: Florian Fainelli Fixes: 01e5b728e9e4 ("net: phy: Add a binding for PHY LEDs") Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 606c812eb1d5b5fb0dd9e330ca94b52d7c227830 Author: Liam R. Howlett Date: Sat Jun 17 20:47:08 2023 -0400 mm/mmap: Fix error path in do_vmi_align_munmap() The error unrolling was leaving the VMAs detached in many cases and leaving the locked_vm statistic altered, and skipping the unrolling entirely in the case of the vma tree write failing. Fix the error path by re-attaching the detached VMAs and adding the necessary goto for the failed vma tree write, and fix the locked_vm statistic by only updating after the vma tree write succeeds. Fixes: 763ecb035029 ("mm: remove the vma linked list") Reported-by: Vegard Nossum Signed-off-by: Liam R. Howlett Signed-off-by: Linus Torvalds commit eb09fc2d14163c0c217846cfabec3d0cce7c8f8c Author: Juerg Haefliger Date: Fri Jun 16 14:22:18 2023 +0200 nfc: fdp: Add MODULE_FIRMWARE macros The module loads firmware so add MODULE_FIRMWARE macros to provide that information via modinfo. Signed-off-by: Juerg Haefliger Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit f593a94b530aee4c7f2511c9e48eb495dff03991 Author: Juerg Haefliger Date: Fri Jun 16 14:18:07 2023 +0200 ieee802154/adf7242: Add MODULE_FIRMWARE macro The module loads firmware so add a MODULE_FIRMWARE macro to provide that information via modinfo. Signed-off-by: Juerg Haefliger Signed-off-by: David S. Miller commit 067d6ec7ed5b49380688e06c1e5f883a71bef4fe Author: Dexuan Cui Date: Wed Jun 14 21:44:51 2023 -0700 PCI: hv: Add a per-bus mutex state_lock In the case of fast device addition/removal, it's possible that hv_eject_device_work() can start to run before create_root_hv_pci_bus() starts to run; as a result, the pci_get_domain_bus_and_slot() in hv_eject_device_work() can return a 'pdev' of NULL, and hv_eject_device_work() can remove the 'hpdev', and immediately send a message PCI_EJECTION_COMPLETE to the host, and the host immediately unassigns the PCI device from the guest; meanwhile, create_root_hv_pci_bus() and the PCI device driver can be probing the dead PCI device and reporting timeout errors. Fix the issue by adding a per-bus mutex 'state_lock' and grabbing the mutex before powering on the PCI bus in hv_pci_enter_d0(): when hv_eject_device_work() starts to run, it's able to find the 'pdev' and call pci_stop_and_remove_bus_device(pdev): if the PCI device driver has loaded, the PCI device driver's probe() function is already called in create_root_hv_pci_bus() -> pci_bus_add_devices(), and now hv_eject_device_work() -> pci_stop_and_remove_bus_device() is able to call the PCI device driver's remove() function and remove the device reliably; if the PCI device driver hasn't loaded yet, the function call hv_eject_device_work() -> pci_stop_and_remove_bus_device() is able to remove the PCI device reliably and the PCI device driver's probe() function won't be called; if the PCI device driver's probe() is already running (e.g., systemd-udev is loading the PCI device driver), it must be holding the per-device lock, and after the probe() finishes and releases the lock, hv_eject_device_work() -> pci_stop_and_remove_bus_device() is able to proceed to remove the device reliably. Fixes: 4daace0d8ce8 ("PCI: hv: Add paravirtual PCI front-end for Microsoft Hyper-V VMs") Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Acked-by: Lorenzo Pieralisi Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230615044451.5580-6-decui@microsoft.com Signed-off-by: Wei Liu commit a847234e24d03d01a9566d1d9dcce018cc018d67 Author: Dexuan Cui Date: Wed Jun 14 21:44:50 2023 -0700 Revert "PCI: hv: Fix a timing issue which causes kdump to fail occasionally" This reverts commit d6af2ed29c7c1c311b96dac989dcb991e90ee195. The statement "the hv_pci_bus_exit() call releases structures of all its child devices" in commit d6af2ed29c7c is not true: in the path hv_pci_probe() -> hv_pci_enter_d0() -> hv_pci_bus_exit(hdev, true): the parameter "keep_devs" is true, so hv_pci_bus_exit() does *not* release the child "struct hv_pci_dev *hpdev" that is created earlier in pci_devices_present_work() -> new_pcichild_device(). The commit d6af2ed29c7c was originally made in July 2020 for RHEL 7.7, where the old version of hv_pci_bus_exit() was used; when the commit was rebased and merged into the upstream, people didn't notice that it's not really necessary. The commit itself doesn't cause any issue, but it makes hv_pci_probe() more complicated. Revert it to facilitate some upcoming changes to hv_pci_probe(). Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Acked-by: Wei Hu Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230615044451.5580-5-decui@microsoft.com Signed-off-by: Wei Liu commit add9195e69c94b32e96f78c2f9cea68f0e850b3f Author: Dexuan Cui Date: Wed Jun 14 21:44:49 2023 -0700 PCI: hv: Remove the useless hv_pcichild_state from struct hv_pci_dev The hpdev->state is never really useful. The only use in hv_pci_eject_device() and hv_eject_device_work() is not really necessary. Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Acked-by: Lorenzo Pieralisi Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230615044451.5580-4-decui@microsoft.com Signed-off-by: Wei Liu commit 2738d5ab7929a845b654cd171a1e275c37eb428e Author: Dexuan Cui Date: Wed Jun 14 21:44:48 2023 -0700 PCI: hv: Fix a race condition in hv_irq_unmask() that can cause panic When the host tries to remove a PCI device, the host first sends a PCI_EJECT message to the guest, and the guest is supposed to gracefully remove the PCI device and send a PCI_EJECTION_COMPLETE message to the host; the host then sends a VMBus message CHANNELMSG_RESCIND_CHANNELOFFER to the guest (when the guest receives this message, the device is already unassigned from the guest) and the guest can do some final cleanup work; if the guest fails to respond to the PCI_EJECT message within one minute, the host sends the VMBus message CHANNELMSG_RESCIND_CHANNELOFFER and removes the PCI device forcibly. In the case of fast device addition/removal, it's possible that the PCI device driver is still configuring MSI-X interrupts when the guest receives the PCI_EJECT message; the channel callback calls hv_pci_eject_device(), which sets hpdev->state to hv_pcichild_ejecting, and schedules a work hv_eject_device_work(); if the PCI device driver is calling pci_alloc_irq_vectors() -> ... -> hv_compose_msi_msg(), we can break the while loop in hv_compose_msi_msg() due to the updated hpdev->state, and leave data->chip_data with its default value of NULL; later, when the PCI device driver calls request_irq() -> ... -> hv_irq_unmask(), the guest crashes in hv_arch_irq_unmask() due to data->chip_data being NULL. Fix the issue by not testing hpdev->state in the while loop: when the guest receives PCI_EJECT, the device is still assigned to the guest, and the guest has one minute to finish the device removal gracefully. We don't really need to (and we should not) test hpdev->state in the loop. Fixes: de0aa7b2f97d ("PCI: hv: Fix 2 hang issues in hv_compose_msi_msg()") Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230615044451.5580-3-decui@microsoft.com Signed-off-by: Wei Liu commit 440b5e3663271b0ffbd4908115044a6a51fb938b Author: Dexuan Cui Date: Wed Jun 14 21:44:47 2023 -0700 PCI: hv: Fix a race condition bug in hv_pci_query_relations() Since day 1 of the driver, there has been a race between hv_pci_query_relations() and survey_child_resources(): during fast device hotplug, hv_pci_query_relations() may error out due to device-remove and the stack variable 'comp' is no longer valid; however, pci_devices_present_work() -> survey_child_resources() -> complete() may be running on another CPU and accessing the no-longer-valid 'comp'. Fix the race by flushing the workqueue before we exit from hv_pci_query_relations(). Fixes: 4daace0d8ce8 ("PCI: hv: Add paravirtual PCI front-end for Microsoft Hyper-V VMs") Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Acked-by: Lorenzo Pieralisi Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230615044451.5580-2-decui@microsoft.com Signed-off-by: Wei Liu commit 6aa0365a3c8512587fffd42fe438768709ddef8e Author: Damien Le Moal Date: Thu Jun 15 17:18:53 2023 +0900 ata: libata-scsi: Avoid deadlock on rescan after device resume When an ATA port is resumed from sleep, the port is reset and a power management request issued to libata EH to reset the port and rescanning the device(s) attached to the port. Device rescanning is done by scheduling an ata_scsi_dev_rescan() work, which will execute scsi_rescan_device(). However, scsi_rescan_device() takes the generic device lock, which is also taken by dpm_resume() when the SCSI device is resumed as well. If a device rescan execution starts before the completion of the SCSI device resume, the rcu locking used to refresh the cached VPD pages of the device, combined with the generic device locking from scsi_rescan_device() and from dpm_resume() can cause a deadlock. Avoid this situation by changing struct ata_port scsi_rescan_task to be a delayed work instead of a simple work_struct. ata_scsi_dev_rescan() is modified to check if the SCSI device associated with the ATA device that must be rescanned is not suspended. If the SCSI device is still suspended, ata_scsi_dev_rescan() returns early and reschedule itself for execution after an arbitrary delay of 5ms. Reported-by: Kai-Heng Feng Reported-by: Joe Breuer Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217530 Fixes: a19a93e4c6a9 ("scsi: core: pm: Rely on the device driver core for async power management") Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke Tested-by: Kai-Heng Feng Tested-by: Joe Breuer commit ef7dfac51d8ed961b742218f526bd589f3900a59 Author: Jens Axboe Date: Sat Jun 17 19:50:24 2023 -0600 io_uring/poll: serialize poll linked timer start with poll removal We selectively grab the ctx->uring_lock for poll update/removal, but we really should grab it from the start to fully synchronize with linked timeouts. Normally this is indeed the case, but if requests are forced async by the application, we don't fully cover removal and timer disarm within the uring_lock. Make this simpler by having consistent locking state for poll removal. Cc: stable@vger.kernel.org # 6.1+ Reported-by: Querijn Voet Signed-off-by: Jens Axboe commit 52ae076c3a9b366b6fa9f7c7e67aed8b28716ed9 Author: Michael Kelley Date: Tue May 23 10:14:22 2023 -0700 arm64/hyperv: Use CPUHP_AP_HYPERV_ONLINE state to fix CPU online sequencing State CPUHP_AP_HYPERV_ONLINE has been introduced to correctly sequence the initialization of hyperv_pcpu_input_arg. Use this new state for Hyper-V initialization so that hyperv_pcpu_input_arg is allocated early enough. Signed-off-by: Michael Kelley Reviewed-by: Dexuan Cui Link: https://lore.kernel.org/r/1684862062-51576-2-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 9636be85cc5bdd8b7a7f6a53405cbcc52161c93c Author: Michael Kelley Date: Tue May 23 10:14:21 2023 -0700 x86/hyperv: Fix hyperv_pcpu_input_arg handling when CPUs go online/offline These commits a494aef23dfc ("PCI: hv: Replace retarget_msi_interrupt_params with hyperv_pcpu_input_arg") 2c6ba4216844 ("PCI: hv: Enable PCI pass-thru devices in Confidential VMs") update the Hyper-V virtual PCI driver to use the hyperv_pcpu_input_arg because that memory will be correctly marked as decrypted or encrypted for all VM types (CoCo or normal). But problems ensue when CPUs in the VM go online or offline after virtual PCI devices have been configured. When a CPU is brought online, the hyperv_pcpu_input_arg for that CPU is initialized by hv_cpu_init() running under state CPUHP_AP_ONLINE_DYN. But this state occurs after state CPUHP_AP_IRQ_AFFINITY_ONLINE, which may call the virtual PCI driver and fault trying to use the as yet uninitialized hyperv_pcpu_input_arg. A similar problem occurs in a CoCo VM if the MMIO read and write hypercalls are used from state CPUHP_AP_IRQ_AFFINITY_ONLINE. When a CPU is taken offline, IRQs may be reassigned in state CPUHP_TEARDOWN_CPU. Again, the virtual PCI driver may fault trying to use the hyperv_pcpu_input_arg that has already been freed by a higher state. Fix the onlining problem by adding state CPUHP_AP_HYPERV_ONLINE immediately after CPUHP_AP_ONLINE_IDLE (similar to CPUHP_AP_KVM_ONLINE) and before CPUHP_AP_IRQ_AFFINITY_ONLINE. Use this new state for Hyper-V initialization so that hyperv_pcpu_input_arg is allocated early enough. Fix the offlining problem by not freeing hyperv_pcpu_input_arg when a CPU goes offline. Retain the allocated memory, and reuse it if the CPU comes back online later. Signed-off-by: Michael Kelley Reviewed-by: Vitaly Kuznetsov Acked-by: Borislav Petkov (AMD) Reviewed-by: Dexuan Cui Link: https://lore.kernel.org/r/1684862062-51576-1-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 1b29d271614abd97cc39782daa9d6dd70e98609f Merge: 670062e7e4199 b3dad076a0589 Author: Linus Torvalds Date: Sat Jun 17 11:04:10 2023 -0700 Merge tag 'staging-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fix from Greg KH: "Here is a single staging driver "fix" for 6.4-rc7. I've been sitting on it in my tree for many weeks as it is just a simple documentation update, with the hope that maybe some other staging driver fixes would need to be merged for 6.4-final, but that does not seem to be the case. So please, pull in this one documentation update so that Aaro doesn't get emails going forward that he can't do anything about" * tag 'staging-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: octeon: delete my name from TODO contact commit 670062e7e4199b13980cd1d46796beb05c4a8699 Merge: 3c0eb44233122 286d9975a838d Author: Linus Torvalds Date: Sat Jun 17 10:57:34 2023 -0700 Merge tag 'usb-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt fixes from Greg KH: "Here are some small USB and Thunderbolt driver fixes and new device ids for 6.4-rc7 to resolve some reported problems. Included in here are: - new USB serial device ids - USB gadget core fixes for long-dissussed problems - dwc3 bugfixes for reported issues. - typec driver fixes - thunderbolt driver fixes All of these have been in linux-next this week with no reported issues" * tag 'usb-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: gadget: udc: core: Prevent soft_connect_store() race usb: gadget: udc: core: Offload usb_udc_vbus_handler processing usb: typec: Fix fast_role_swap_current show function usb: typec: ucsi: Fix command cancellation USB: dwc3: fix use-after-free on core driver unbind USB: dwc3: qcom: fix NULL-deref on suspend usb: dwc3: gadget: Reset num TRBs before giving back the request usb: gadget: udc: renesas_usb3: Fix RZ/V2M {modprobe,bind} error USB: serial: option: add Quectel EM061KGL series thunderbolt: Mask ring interrupt on Intel hardware as well thunderbolt: Do not touch CL state configuration during discovery thunderbolt: Increase DisplayPort Connection Manager handshake timeout thunderbolt: dma_test: Use correct value for absent rings when creating paths commit 3c0eb44233122d076ca5c1ddf57807c82ecfb991 Merge: c6cf6be9dfb80 a82c3df955f8c Author: Linus Torvalds Date: Sat Jun 17 10:51:35 2023 -0700 Merge tag 'tty-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull serial driver fixes from Greg KH: "Here are two small serial driver fixes for 6.4-rc7 that resolve some reported problems: - lantiq serial driver irq fix - fsl_lpuart serial driver watermark fix Both of these have been in linux-next this week with no reported issues" * tag 'tty-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: serial: fsl_lpuart: reduce RX watermark to 0 on LS1028A serial: lantiq: add missing interrupt ack commit 4aaf2c52834b7f95acdf9fb0211a1b60adbf421b Author: Íñigo Huguet Date: Thu Jun 15 10:49:29 2023 +0200 sfc: use budget for TX completions When running workloads heavy unbalanced towards TX (high TX, low RX traffic), sfc driver can retain the CPU during too long times. Although in many cases this is not enough to be visible, it can affect performance and system responsiveness. A way to reproduce it is to use a debug kernel and run some parallel netperf TX tests. In some systems, this will lead to this message being logged: kernel:watchdog: BUG: soft lockup - CPU#12 stuck for 22s! The reason is that sfc driver doesn't account any NAPI budget for the TX completion events work. With high-TX/low-RX traffic, this makes that the CPU is held for long time for NAPI poll. Documentations says "drivers can process completions for any number of Tx packets but should only process up to budget number of Rx packets". However, many drivers do limit the amount of TX completions that they process in a single NAPI poll. In the same way, this patch adds a limit for the TX work in sfc. With the patch applied, the watchdog warning never appears. Tested with netperf in different combinations: single process / parallel processes, TCP / UDP and different sizes of UDP messages. Repeated the tests before and after the patch, without any noticeable difference in network or CPU performance. Test hardware: Intel(R) Xeon(R) CPU E5-1620 v4 @ 3.50GHz (4 cores, 2 threads/core) Solarflare Communications XtremeScale X2522-25G Network Adapter Fixes: 5227ecccea2d ("sfc: remove tx and MCDI handling from NAPI budget consideration") Fixes: d19a53721863 ("sfc_ef100: TX path for EF100 NICs") Reported-by: Fei Liu Signed-off-by: Íñigo Huguet Acked-by: Martin Habets Link: https://lore.kernel.org/r/20230615084929.10506-1-ihuguet@redhat.com Signed-off-by: Jakub Kicinski commit b5b2a02bcaac7c287694aa0db4837a07bf178626 Author: Ben Hutchings Date: Thu Jun 15 00:00:02 2023 +0200 parisc: Delete redundant register definitions in We define sp and ipsw in using ".reg", and when using current binutils (snapshot 2.40.50.20230611) the definitions in using "=" conflict with those: arch/parisc/include/asm/assembly.h: Assembler messages: arch/parisc/include/asm/assembly.h:93: Error: symbol `sp' is already defined arch/parisc/include/asm/assembly.h:95: Error: symbol `ipsw' is already defined Delete the duplicate definitions in . Also delete the definition of gp, which isn't used anywhere. Signed-off-by: Ben Hutchings Cc: stable@vger.kernel.org # v6.0+ Signed-off-by: Helge Deller commit c6cf6be9dfb8098f2c2d26ebe53ad80843cdd2bc Merge: 1639fae5132bc 23200a4c8ac28 Author: Linus Torvalds Date: Fri Jun 16 21:38:50 2023 -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 handful of clk driver fixes: - Fix an OOB issue in the Mediatek mt8365 driver where arrays of clks are mismatched in size - Use the proper clk_ops for a few clks in the Mediatek mt8365 driver - Stop using abs() in clk_composite_determine_rate() because 64-bit math goes wrong on large unsigned long numbers that are subtracted and passed into abs() - Zero initialize a struct clk_init_data in clk-loongson2 to avoid stack junk confusing clk_hw_register() - Actually use a pointer to __iomem for writel() in pxa3xx_clk_update_accr() so we don't oops" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: pxa: fix NULL pointer dereference in pxa3xx_clk_update_accr clk: clk-loongson2: Zero init clk_init_data clk: mediatek: mt8365: Fix inverted topclk operations clk: composite: Fix handling of high clock rates clk: mediatek: mt8365: Fix index issue commit 5005bcb4219156f1bf7587b185080ec1da08518e Author: Namjae Jeon Date: Thu Jun 15 22:05:29 2023 +0900 ksmbd: validate session id and tree id in the compound request This patch validate session id and tree id in compound request. If first operation in the compound is SMB2 ECHO request, ksmbd bypass session and tree validation. So work->sess and work->tcon could be NULL. If secound request in the compound access work->sess or tcon, It cause NULL pointer dereferecing error. Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-21165 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 5fe7f7b78290638806211046a99f031ff26164e1 Author: Namjae Jeon Date: Thu Jun 15 22:04:40 2023 +0900 ksmbd: fix out-of-bound read in smb2_write ksmbd_smb2_check_message doesn't validate hdr->NextCommand. If ->NextCommand is bigger than Offset + Length of smb2 write, It will allow oversized smb2 write length. It will cause OOB read in smb2_write. Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-21164 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 40b268d384a22276dca1450549f53eed60e21deb Author: Namjae Jeon Date: Thu Jun 15 15:56:32 2023 +0900 ksmbd: add mnt_want_write to ksmbd vfs functions ksmbd is doing write access using vfs helpers. There are the cases that mnt_want_write() is not called in vfs helper. This patch add missing mnt_want_write() to ksmbd vfs functions. Cc: stable@vger.kernel.org Cc: Amir Goldstein Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 2b9b8f3b68edb3d67d79962f02e26dbb5ae3808d Author: Namjae Jeon Date: Mon Jun 5 01:57:34 2023 +0900 ksmbd: validate command payload size ->StructureSize2 indicates command payload size. ksmbd should validate this size with rfc1002 length before accessing it. This patch remove unneeded check and add the validation for this. [ 8.912583] BUG: KASAN: slab-out-of-bounds in ksmbd_smb2_check_message+0x12a/0xc50 [ 8.913051] Read of size 2 at addr ffff88800ac7d92c by task kworker/0:0/7 ... [ 8.914967] Call Trace: [ 8.915126] [ 8.915267] dump_stack_lvl+0x33/0x50 [ 8.915506] print_report+0xcc/0x620 [ 8.916558] kasan_report+0xae/0xe0 [ 8.917080] kasan_check_range+0x35/0x1b0 [ 8.917334] ksmbd_smb2_check_message+0x12a/0xc50 [ 8.917935] ksmbd_verify_smb_message+0xae/0xd0 [ 8.918223] handle_ksmbd_work+0x192/0x820 [ 8.918478] process_one_work+0x419/0x760 [ 8.918727] worker_thread+0x2a2/0x6f0 [ 8.919222] kthread+0x187/0x1d0 [ 8.919723] ret_from_fork+0x1f/0x30 [ 8.919954] Cc: stable@vger.kernel.org Reported-by: Chih-Yen Chang Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 1639fae5132bc8a904af28d97cea0bedb3af802e Merge: ba00b19067080 9930f518b6a82 Author: Linus Torvalds Date: Fri Jun 16 14:57:48 2023 -0700 Merge tag 'drm-fixes-2023-06-17' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "A bunch of misc fixes across the board. amdgpu is the usual bulk with a revert and other fixes, nouveau has a race fix that was causing a UAF that was hard hanging systems, otherwise some qaic, bridge and radeon. amdgpu: - GFX9 preemption fixes - Add missing radeon secondary PCI ID - vblflash fixes - SMU 13 fix - VCN 4.0 fix - Re-enable TOPDOWN flag for large BAR systems to fix regression - eDP fix - PSR hang fix - DPIA fix radeon: - fbdev client warning fix qaic: - leak fix - null ptr deref fix nouveau: - use-after-free caused by fence race fix - runtime pm fix - NULL ptr checks bridge: - ti-sn65dsi86: Avoid possible buffer overflow" * tag 'drm-fixes-2023-06-17' of git://anongit.freedesktop.org/drm/drm: (21 commits) nouveau: fix client work fence deletion race drm/amd/display: limit DPIA link rate to HBR3 drm/amd/display: fix the system hang while disable PSR drm/amd/display: edp do not add non-edid timings Revert "drm/amdgpu: remove TOPDOWN flags when allocating VRAM in large bar system" drm/amdgpu: vcn_4_0 set instance 0 init sched score to 1 drm/radeon: Disable outputs when releasing fbdev client drm/amd/pm: workaround for compute workload type on some skus drm/amd: Tighten permissions on VBIOS flashing attributes drm/amd: Make sure image is written to trigger VBIOS image update flow drm/amdgpu: add missing radeon secondary PCI ID drm/amdgpu: Implement gfx9 patch functions for resubmission drm/amdgpu: Modify indirect buffer packages for resubmission drm/amdgpu: Program gds backup address as zero if no gds allocated drm/nouveau: add nv_encoder pointer check for NULL drm/amdgpu: Reset CP_VMID_PREEMPT after trailing fence signaled drm/nouveau/dp: check for NULL nv_connector->native_mode drm/bridge: ti-sn65dsi86: Avoid possible buffer overflow drm/nouveau: don't detect DSM for non-NVIDIA device accel/qaic: Fix NULL pointer deref in qaic_destroy_drm_device() ... commit ba00b190670809c1a89326d80de96d714f6004f2 Author: David Howells Date: Fri Jun 16 22:39:39 2023 +0100 afs: Fix vlserver probe RTT handling In the same spirit as commit ca57f02295f1 ("afs: Fix fileserver probe RTT handling"), don't rule out using a vlserver just because there haven't been enough packets yet to calculate a real rtt. Always set the server's probe rtt from the estimate provided by rxrpc_kernel_get_srtt, which is capped at 1 second. This could lead to EDESTADDRREQ errors when accessing a cell for the first time, even though the vl servers are known and have responded to a probe. Fixes: 1d4adfaf6574 ("rxrpc: Make rxrpc_kernel_get_srtt() indicate validity") Signed-off-by: Marc Dionne Signed-off-by: David Howells cc: linux-afs@lists.infradead.org Link: http://lists.infradead.org/pipermail/linux-afs/2023-June/006746.html Signed-off-by: Linus Torvalds commit 5b017b5ed2bccfdb9a26c8ddb89f093fb8f8a94c Merge: 858fd168a95c5 568a67e742dfa Author: Arnd Bergmann Date: Fri Jun 16 23:11:18 2023 +0200 Merge tag 'v6.4-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes Fixes for the reset pin on nanopi r5c, a reset line on SOQuartz, a duplicate usb regulator on rock64 and PCIe register mappings on rk356x. Also some missing cache properties. * tag 'v6.4-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Fix rk356x PCIe register and range mappings arm64: dts: rockchip: fix button reset pin for nanopi r5c arm64: dts: rockchip: fix nEXTRST on SOQuartz arm64: dts: rockchip: add missing cache properties arm64: dts: rockchip: fix USB regulator on ROCK64 Link: https://lore.kernel.org/r/2885657.e9J7NaK4W3@phil Signed-off-by: Arnd Bergmann commit cd9125030689dda69f73f6c2843d63135cb383f0 Author: Azeem Shaikh Date: Tue Jun 13 00:33:25 2023 +0000 ieee802154: Replace strlcpy with strscpy strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated [1]. In an effort to remove strlcpy() completely [2], replace strlcpy() here with strscpy(). Direct replacement is safe here since the return values from the helper macros are ignored by the callers. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [2] https://github.com/KSPP/linux/issues/89 Signed-off-by: Azeem Shaikh Reviewed-by: Kees Cook Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230613003326.3538391-1-azeemshaikh38@gmail.com Signed-off-by: Stefan Schmidt commit 9930f518b6a82ff10a3d13e0cbde05cce04f5930 Merge: c8a5d5ea3ba6a 55b94bb8c4246 Author: Dave Airlie Date: Sat Jun 17 06:11:59 2023 +1000 Merge tag 'drm-misc-fixes-2023-06-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes maybe in time for v6.4-rc7: - qaic leak and null deref fix. - Fix runtime pm in nouveau. - Fix array overflow in ti-sn65dsi86 pwm chip handling. - Assorted null check fixes in nouveau. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/641eb8a8-fbd7-90ad-0805-310b7fec9344@lankhorst.se commit a128f9d4c1227dfcf7f2328070760cb7ed1ec08d Author: Leon Romanovsky Date: Mon Jun 5 11:09:52 2023 +0300 net/mlx5e: Fix scheduling of IPsec ASO query while in atomic ASO query can be scheduled in atomic context as such it can't use usleep. Use udelay as recommended in Documentation/timers/timers-howto.rst. Fixes: 76e463f6508b ("net/mlx5e: Overcome slow response for first IPsec ASO WQE") Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Signed-off-by: Saeed Mahameed commit c75b94255aaa45d9e531df2763baa67020bb6fa9 Author: Leon Romanovsky Date: Mon Jun 5 11:09:51 2023 +0300 net/mlx5e: Drop XFRM state lock when modifying flow steering XFRM state which is changed to be XFRM_STATE_EXPIRED doesn't really need to hold lock while modifying flow steering rules to drop traffic. That state can be deleted only and as such mlx5e_ipsec_handle_tx_limit() work will be canceled anyway and won't run in parallel. Fixes: b2f7b01d36a9 ("net/mlx5e: Simulate missing IPsec TX limits hardware functionality") Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Signed-off-by: Saeed Mahameed commit fef06678931ff67b158d337b581e5cf5ca40a3a3 Author: Patrisious Haddad Date: Mon Jun 5 11:09:50 2023 +0300 net/mlx5e: Fix ESN update kernel panic Previously during mlx5e_ipsec_handle_event the driver tried to execute an operation that could sleep, while holding a spinlock, which caused the kernel panic mentioned below. Move the function call that can sleep outside of the spinlock context. Call Trace: dump_stack_lvl+0x49/0x6c __schedule_bug.cold+0x42/0x4e schedule_debug.constprop.0+0xe0/0x118 __schedule+0x59/0x58a ? __mod_timer+0x2a1/0x3ef schedule+0x5e/0xd4 schedule_timeout+0x99/0x164 ? __pfx_process_timeout+0x10/0x10 __wait_for_common+0x90/0x1da ? __pfx_schedule_timeout+0x10/0x10 wait_func+0x34/0x142 [mlx5_core] mlx5_cmd_invoke+0x1f3/0x313 [mlx5_core] cmd_exec+0x1fe/0x325 [mlx5_core] mlx5_cmd_do+0x22/0x50 [mlx5_core] mlx5_cmd_exec+0x1c/0x40 [mlx5_core] mlx5_modify_ipsec_obj+0xb2/0x17f [mlx5_core] mlx5e_ipsec_update_esn_state+0x69/0xf0 [mlx5_core] ? wake_affine+0x62/0x1f8 mlx5e_ipsec_handle_event+0xb1/0xc0 [mlx5_core] process_one_work+0x1e2/0x3e6 ? __pfx_worker_thread+0x10/0x10 worker_thread+0x54/0x3ad ? __pfx_worker_thread+0x10/0x10 kthread+0xda/0x101 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x29/0x37 BUG: workqueue leaked lock or atomic: kworker/u256:4/0x7fffffff/189754#012 last function: mlx5e_ipsec_handle_event [mlx5_core] CPU: 66 PID: 189754 Comm: kworker/u256:4 Kdump: loaded Tainted: G W 6.2.0-2596.20230309201517_5.el8uek.rc1.x86_64 #2 Hardware name: Oracle Corporation ORACLE SERVER X9-2/ASMMBX9-2, BIOS 61070300 08/17/2022 Workqueue: mlx5e_ipsec: eth%d mlx5e_ipsec_handle_event [mlx5_core] Call Trace: dump_stack_lvl+0x49/0x6c process_one_work.cold+0x2b/0x3c ? __pfx_worker_thread+0x10/0x10 worker_thread+0x54/0x3ad ? __pfx_worker_thread+0x10/0x10 kthread+0xda/0x101 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x29/0x37 BUG: scheduling while atomic: kworker/u256:4/189754/0x00000000 Fixes: cee137a63431 ("net/mlx5e: Handle ESN update events") Signed-off-by: Patrisious Haddad Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Signed-off-by: Saeed Mahameed commit cf5bb02320d4c4cf4e827efc0314b6ca4082799c Author: Leon Romanovsky Date: Mon Jun 5 11:09:49 2023 +0300 net/mlx5e: Don't delay release of hardware objects XFRM core provides two callbacks to release resources, one is .xdo_dev_policy_delete() and another is .xdo_dev_policy_free(). This separation allows delayed release so "ip xfrm policy free" commands won't starve. Unfortunately, mlx5 command interface can't run in .xdo_dev_policy_free() callbacks as the latter runs in ATOMIC context. BUG: scheduling while atomic: swapper/7/0/0x00000100 Modules linked in: act_mirred act_tunnel_key cls_flower sch_ingress vxlan mlx5_vdpa vringh vhost_iotlb vdpa rpcrdma rdma_ucm ib_iser libiscsi ib_umad scsi_transport_iscsi rdma_cm ib_ipoib iw_cm ib_cm mlx5_ib ib_uverbs ib_core xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter rpcsec_gss_krb5 auth_rpcgss oid_registry overlay mlx5_core zram zsmalloc fuse CPU: 7 PID: 0 Comm: swapper/7 Not tainted 6.3.0+ #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x33/0x50 __schedule_bug+0x4e/0x60 __schedule+0x5d5/0x780 ? __mod_timer+0x286/0x3d0 schedule+0x50/0x90 schedule_timeout+0x7c/0xf0 ? __bpf_trace_tick_stop+0x10/0x10 __wait_for_common+0x88/0x190 ? usleep_range_state+0x90/0x90 cmd_exec+0x42e/0xb40 [mlx5_core] mlx5_cmd_do+0x1e/0x40 [mlx5_core] mlx5_cmd_exec+0x18/0x30 [mlx5_core] mlx5_cmd_delete_fte+0xa8/0xd0 [mlx5_core] del_hw_fte+0x60/0x120 [mlx5_core] mlx5_del_flow_rules+0xec/0x270 [mlx5_core] ? default_send_IPI_single_phys+0x26/0x30 mlx5e_accel_ipsec_fs_del_pol+0x1a/0x60 [mlx5_core] mlx5e_xfrm_free_policy+0x15/0x20 [mlx5_core] xfrm_policy_destroy+0x5a/0xb0 xfrm4_dst_destroy+0x7b/0x100 dst_destroy+0x37/0x120 rcu_core+0x2d6/0x540 __do_softirq+0xcd/0x273 irq_exit_rcu+0x82/0xb0 sysvec_apic_timer_interrupt+0x72/0x90 asm_sysvec_apic_timer_interrupt+0x16/0x20 RIP: 0010:default_idle+0x13/0x20 Code: c0 08 00 00 00 4d 29 c8 4c 01 c7 4c 29 c2 e9 72 ff ff ff cc cc cc cc 8b 05 7a 4d ee 00 85 c0 7e 07 0f 00 2d 2f 98 2e 00 fb f4 c3 66 66 2e 0f 1f 84 00 00 00 00 00 65 48 8b 04 25 40 b4 02 00 RSP: 0018:ffff888100843ee0 EFLAGS: 00000242 RAX: 0000000000000001 RBX: ffff888100812b00 RCX: 4000000000000000 RDX: 0000000000000001 RSI: 0000000000000083 RDI: 000000000002d2ec RBP: 0000000000000007 R08: 00000021daeded59 R09: 0000000000000001 R10: 0000000000000000 R11: 000000000000000f R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 default_idle_call+0x30/0xb0 do_idle+0x1c1/0x1d0 cpu_startup_entry+0x19/0x20 start_secondary+0xfe/0x120 secondary_startup_64_no_verify+0xf3/0xfb bad: scheduling from the idle thread! Fixes: a5b8ca9471d3 ("net/mlx5e: Add XFRM policy offload logic") Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Signed-off-by: Saeed Mahameed commit 314ded538e5f22e7610b1bf621402024a180ec80 Author: Saeed Mahameed Date: Thu Jun 8 12:00:54 2023 -0700 net/mlx5: Free IRQ rmap and notifier on kernel shutdown The kernel IRQ system needs the irq affinity notifier to be clear before attempting to free the irq, see WARN_ON log below. On a normal driver unload we don't have this issue since we do the complete cleanup of the irq resources. To fix this, put the important resources cleanup in a helper function and use it in both normal driver unload and shutdown flows. [ 4497.498434] ------------[ cut here ]------------ [ 4497.498726] WARNING: CPU: 0 PID: 9 at kernel/irq/manage.c:2034 free_irq+0x295/0x340 [ 4497.499193] Modules linked in: [ 4497.499386] CPU: 0 PID: 9 Comm: kworker/0:1 Tainted: G W 6.4.0-rc4+ #10 [ 4497.499876] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-1.fc38 04/01/2014 [ 4497.500518] Workqueue: events do_poweroff [ 4497.500849] RIP: 0010:free_irq+0x295/0x340 [ 4497.501132] Code: 85 c0 0f 84 1d ff ff ff 48 89 ef ff d0 0f 1f 00 e9 10 ff ff ff 0f 0b e9 72 ff ff ff 49 8d 7f 28 ff d0 0f 1f 00 e9 df fd ff ff <0f> 0b 48 c7 80 c0 008 [ 4497.502269] RSP: 0018:ffffc90000053da0 EFLAGS: 00010282 [ 4497.502589] RAX: ffff888100949600 RBX: ffff88810330b948 RCX: 0000000000000000 [ 4497.503035] RDX: ffff888100949600 RSI: ffff888100400490 RDI: 0000000000000023 [ 4497.503472] RBP: ffff88810330c7e0 R08: ffff8881004005d0 R09: ffffffff8273a260 [ 4497.503923] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8881009ae000 [ 4497.504359] R13: ffff8881009ae148 R14: 0000000000000000 R15: ffff888100949600 [ 4497.504804] FS: 0000000000000000(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000 [ 4497.505302] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4497.505671] CR2: 00007fce98806298 CR3: 000000000262e005 CR4: 0000000000370ef0 [ 4497.506104] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 4497.506540] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 4497.507002] Call Trace: [ 4497.507158] [ 4497.507299] ? free_irq+0x295/0x340 [ 4497.507522] ? __warn+0x7c/0x130 [ 4497.507740] ? free_irq+0x295/0x340 [ 4497.507963] ? report_bug+0x171/0x1a0 [ 4497.508197] ? handle_bug+0x3c/0x70 [ 4497.508417] ? exc_invalid_op+0x17/0x70 [ 4497.508662] ? asm_exc_invalid_op+0x1a/0x20 [ 4497.508926] ? free_irq+0x295/0x340 [ 4497.509146] mlx5_irq_pool_free_irqs+0x48/0x90 [ 4497.509421] mlx5_irq_table_free_irqs+0x38/0x50 [ 4497.509714] mlx5_core_eq_free_irqs+0x27/0x40 [ 4497.509984] shutdown+0x7b/0x100 [ 4497.510184] pci_device_shutdown+0x30/0x60 [ 4497.510440] device_shutdown+0x14d/0x240 [ 4497.510698] kernel_power_off+0x30/0x70 [ 4497.510938] process_one_work+0x1e6/0x3e0 [ 4497.511183] worker_thread+0x49/0x3b0 [ 4497.511407] ? __pfx_worker_thread+0x10/0x10 [ 4497.511679] kthread+0xe0/0x110 [ 4497.511879] ? __pfx_kthread+0x10/0x10 [ 4497.512114] ret_from_fork+0x29/0x50 [ 4497.512342] Fixes: 9c2d08010963 ("net/mlx5: Free irqs only on shutdown callback") Signed-off-by: Saeed Mahameed Reviewed-by: Shay Drory commit ef4c5afc783dc3d47640270a9b94713229c697e8 Author: Yevgeny Kliteynik Date: Sun Jun 4 21:07:04 2023 +0300 net/mlx5: DR, Fix wrong action data allocation in decap action When TUNNEL_L3_TO_L2 decap action was created, a pointer to a local variable was passed as its HW action data, resulting in attempt to free invalid address: BUG: KASAN: invalid-free in mlx5dr_action_destroy+0x318/0x410 [mlx5_core] Fixes: 4781df92f4da ("net/mlx5: DR, Move STEv0 modify header logic") Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 87cd0649176c0588daf2cad53058143f808b0905 Author: Yevgeny Kliteynik Date: Mon Jun 12 01:05:48 2023 +0300 net/mlx5: DR, Support SW created encap actions for FW table In some cases, steering might need to use SW-created action in FW table, which results in wrong packet reformat being used: mlx5_core 0000:81:00.1: mlx5_cmd_check:756:(pid 1154): SET_FLOW_TABLE_ENTRY(0×936) op_mod(0×0) failed, status bad resource(0×5), syndrome (0xf2ff71) This patch adds support for usage of SW-created packet reformat (encap) actions in FW tables, and adds clear error flow for attempt to use SW-created modify header on FW tables. Fixes: 6a48faeeca10 ("net/mlx5: Add direct rule fs_cmd implementation") Signed-off-by: Yevgeny Kliteynik Reviewed-by: Erez Shitrit Signed-off-by: Saeed Mahameed commit fb7be476ab7e797b18c6f0047041635c41b3b5a4 Author: Chris Mi Date: Thu Apr 6 09:38:09 2023 +0300 net/mlx5e: TC, Cleanup ct resources for nic flow The cited commit removes special handling of CT action. But it removes too much. Pre ct/ct_nat tables and some other resources are not destroyed due to the cited commit. Fix it by adding it back. Fixes: 08fe94ec5f77 ("net/mlx5e: TC, Remove special handling of CT action") Signed-off-by: Chris Mi Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit b100573ab76ee5b0cb8f9129b568d9e7da795f76 Author: Chris Mi Date: Tue Apr 11 11:17:35 2023 +0300 net/mlx5e: TC, Add null pointer check for hardware miss support The cited commits add hardware miss support to tc action. But if the rules can't be offloaded, the pointers are null and system will panic when accessing them. Fix it by checking null pointer. Fixes: 08fe94ec5f77 ("net/mlx5e: TC, Remove special handling of CT action") Fixes: 6702782845a5 ("net/mlx5e: TC, Set CT miss to the specific ct action instance") Signed-off-by: Chris Mi Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit 0ab999d4a1bfe8251538be1e7e495c50433475a8 Author: Eli Cohen Date: Wed May 3 15:10:05 2023 +0300 net/mlx5: Fix driver load with single msix vector When a PCI device has just one msix vector available, we want to share this vector between async and completion events. Current code fails to do that assuming it will always have at least one dedicated vector for completion events. Fix this by detecting when the pool contains just a single vector. Fixes: 3354822cde5a ("net/mlx5: Use dynamic msix vectors allocation") Signed-off-by: Eli Cohen Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed commit 62a522d3354d81a86dd56feeb40e5ced36d72737 Author: Maxim Mikityanskiy Date: Wed Jun 14 12:00:06 2023 +0300 net/mlx5e: xsk: Set napi_id to support busy polling on XSK RQ The cited commit missed setting napi_id on XSK RQs, it only affected regular RQs. Add the missing part to support socket busy polling on XSK RQs. Fixes: a2740f529da2 ("net/mlx5e: xsk: Set napi_id to support busy polling") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 4e7401fc8c8d048a813e0221a706be84182a76c1 Author: Maxim Mikityanskiy Date: Wed Jun 14 12:00:05 2023 +0300 net/mlx5e: XDP, Allow growing tail for XDP multi buffer The cited commits missed passing frag_size to __xdp_rxq_info_reg, which is required by bpf_xdp_adjust_tail to support growing the tail pointer in fragmented packets. Pass the missing parameter when the current RQ mode allows XDP multi buffer. Fixes: ea5d49bdae8b ("net/mlx5e: Add XDP multi buffer support to the non-linear legacy RQ") Fixes: 9cb9482ef10e ("net/mlx5e: Use fragments of the same size in non-linear legacy RQ with XDP") Signed-off-by: Maxim Mikityanskiy Cc: Tariq Toukan Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 4973ca29552864a7a047ab8a15611a585827412f Merge: b9c1133a44a9b b50f2d048ecf1 Author: Linus Torvalds Date: Fri Jun 16 12:41:56 2023 -0700 Merge tag 'for-6.4-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Two fixes for NOCOW files, a regression fix in scrub and an assertion fix: - NOCOW fixes: - keep length of iomap direct io request in case of a failure - properly pass mode of extent reference checking, this can break some cases for swapfile - fix error value confusion when scrubbing a stripe - convert assertion to a proper error handling when loading global roots, reported by syzbot" * tag 'for-6.4-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: scrub: fix a return value overwrite in scrub_stripe() btrfs: do not ASSERT() on duplicated global roots btrfs: can_nocow_file_extent should pass down args->strict from callers btrfs: fix iomap_begin length for nocow writes commit b9c1133a44a9b1dc485c79c64c8dee51e8869229 Merge: 3a12faba95f99 20cb1c2fb7568 Author: Linus Torvalds Date: Fri Jun 16 12:32:32 2023 -0700 Merge tag 'block-6.4-2023-06-15' of git://git.kernel.dk/linux Pull block fix from Jens Axboe: "Just a single fix for blk-cg stats flushing" * tag 'block-6.4-2023-06-15' of git://git.kernel.dk/linux: blk-cgroup: Flush stats before releasing blkcg_gq commit 3a12faba95f99d166a18588fa9b2b2df99eb1146 Merge: b4af682124c5b adeaa3f290ecf Author: Linus Torvalds Date: Fri Jun 16 12:27:20 2023 -0700 Merge tag 'io_uring-6.4-2023-06-15' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: "A fix for sendmsg with CMSG, and the followup fix discussed for avoiding touching task->worker_private after the worker has started exiting" * tag 'io_uring-6.4-2023-06-15' of git://git.kernel.dk/linux: io_uring/io-wq: clear current->worker_private on exit io_uring/net: save msghdr->msg_control for retries commit b4af682124c5b892f554d7fa4d21216530d8da4b Merge: b73056e9f82eb 227d2c3154a93 Author: Linus Torvalds Date: Fri Jun 16 12:18:35 2023 -0700 Merge tag 'sound-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Just a few small fixes. The only change to the core code is for a minor race in ALSA OSS sequencer, and the rest are all device-specific fixes (regression fixes and a usual quirk)" * tag 'sound-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Add quirk flag for HEM devices to enable native DSD playback ALSA: usb-audio: Fix broken resume due to UAC3 power state ALSA: seq: oss: Fix racy open/close of MIDI devices ASoC: tegra: Fix Master Volume Control ALSA: hda/realtek: Add a quirk for Compaq N14JP6 firmware: cs_dsp: Log correct region name in bin error messages commit d082d48737c75d2b3cc1f972b8c8674c25131534 Author: Lee Jones Date: Wed Jun 14 17:38:54 2023 +0100 x86/mm: Avoid using set_pgd() outside of real PGD pages KPTI keeps around two PGDs: one for userspace and another for the kernel. Among other things, set_pgd() contains infrastructure to ensure that updates to the kernel PGD are reflected in the user PGD as well. One side-effect of this is that set_pgd() expects to be passed whole pages. Unfortunately, init_trampoline_kaslr() passes in a single entry: 'trampoline_pgd_entry'. When KPTI is on, set_pgd() will update 'trampoline_pgd_entry' (an 8-Byte globally stored [.bss] variable) and will then proceed to replicate that value into the non-existent neighboring user page (located +4k away), leading to the corruption of other global [.bss] stored variables. Fix it by directly assigning 'trampoline_pgd_entry' and avoiding set_pgd(). [ dhansen: tweak subject and changelog ] Fixes: 0925dda5962e ("x86/mm/KASLR: Use only one PUD entry for real mode trampoline") Suggested-by: Dave Hansen Signed-off-by: Lee Jones Signed-off-by: Dave Hansen Cc: Link: https://lore.kernel.org/all/20230614163859.924309-1-lee@kernel.org/g commit 13bb06f8dd42071cb9a49f6e21099eea05d4b856 Author: Thomas Gleixner Date: Thu Jun 15 11:18:30 2023 +0200 tick/common: Align tick period during sched_timer setup The tick period is aligned very early while the first clock_event_device is registered. At that point the system runs in periodic mode and switches later to one-shot mode if possible. The next wake-up event is programmed based on the aligned value (tick_next_period) but the delta value, that is used to program the clock_event_device, is computed based on ktime_get(). With the subtracted offset, the device fires earlier than the exact time frame. With a large enough offset the system programs the timer for the next wake-up and the remaining time left is too small to make any boot progress. The system hangs. Move the alignment later to the setup of tick_sched timer. At this point the system switches to oneshot mode and a high resolution clocksource is available. At this point it is safe to align tick_next_period because ktime_get() will now return accurate (not jiffies based) time. [bigeasy: Patch description + testing]. Fixes: e9523a0d81899 ("tick/common: Align tick period with the HZ tick.") Reported-by: Mathias Krause Reported-by: "Bhatnagar, Rishabh" Suggested-by: Mathias Krause Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Tested-by: Richard W.M. Jones Tested-by: Mathias Krause Acked-by: SeongJae Park Cc: stable@vger.kernel.org Link: https://lore.kernel.org/5a56290d-806e-b9a5-f37c-f21958b5a8c0@grsecurity.net Link: https://lore.kernel.org/12c6f9a3-d087-b824-0d05-0d18c9bc1bf3@amazon.com Link: https://lore.kernel.org/r/20230615091830.RxMV2xf_@linutronix.de commit b73056e9f82ebdf9f5dbcd378e5e51ae95d5000c Merge: f4fd69a325510 de29a96acceae Author: Linus Torvalds Date: Fri Jun 16 11:43:15 2023 -0700 Merge tag 'urgent-rcu.2023.06.11a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU fix from Paul McKenney: "This fixes a spinlock-initialization regression in SRCU that causes the SRCU notifier to fail. The fix simply adds the initialization, but introduces a #ifdef because there is no spinlock to initialize for the Tiny SRCU used in !SMP builds. Yes, it would be nice to abstract this somehow in order to hide it in SRCU, but I still don't see a good way of doing this" * tag 'urgent-rcu.2023.06.11a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: notifier: Initialize new struct srcu_usage field commit f4fd69a32551036ac84bf4487b680167df77477d Merge: 40f71e7cd3c6a b104dbedbe61d Author: Linus Torvalds Date: Fri Jun 16 11:27:34 2023 -0700 Merge tag 'riscv-for-linus-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fix from Palmer Dabbelt: - A documentation patch describing how we use patchwork * tag 'riscv-for-linus-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: Documentation: RISC-V: patch-acceptance: mention patchwork's role commit b9f174c811e3ae4ae8959dc57e6adb9990e913f4 Author: Omar Sandoval Date: Tue Jun 13 14:14:56 2023 -0700 x86/unwind/orc: Add ELF section with ORC version identifier Commits ffb1b4a41016 ("x86/unwind/orc: Add 'signal' field to ORC metadata") and fb799447ae29 ("x86,objtool: Split UNWIND_HINT_EMPTY in two") changed the ORC format. Although ORC is internal to the kernel, it's the only way for external tools to get reliable kernel stack traces on x86-64. In particular, the drgn debugger [1] uses ORC for stack unwinding, and these format changes broke it [2]. As the drgn maintainer, I don't care how often or how much the kernel changes the ORC format as long as I have a way to detect the change. It suffices to store a version identifier in the vmlinux and kernel module ELF files (to use when parsing ORC sections from ELF), and in kernel memory (to use when parsing ORC from a core dump+symbol table). Rather than hard-coding a version number that needs to be manually bumped, Peterz suggested hashing the definitions from orc_types.h. If there is a format change that isn't caught by this, the hashing script can be updated. This patch adds an .orc_header allocated ELF section containing the 20-byte hash to vmlinux and kernel modules, along with the corresponding __start_orc_header and __stop_orc_header symbols in vmlinux. 1: https://github.com/osandov/drgn 2: https://github.com/osandov/drgn/issues/303 Fixes: ffb1b4a41016 ("x86/unwind/orc: Add 'signal' field to ORC metadata") Fixes: fb799447ae29 ("x86,objtool: Split UNWIND_HINT_EMPTY in two") Signed-off-by: Omar Sandoval Signed-off-by: Peter Zijlstra (Intel) Acked-by: Josh Poimboeuf Link: https://lkml.kernel.org/r/aef9c8dc43915b886a8c48509a12ec1b006ca1ca.1686690801.git.osandov@osandov.com commit a6742cb90b567f952a95efa27dee345748d09fc7 Author: Kan Liang Date: Thu Jun 15 10:32:42 2023 -0700 perf/x86/intel: Fix the FRONTEND encoding on GNR and MTL When counting a FRONTEND event, the MSR_PEBS_FRONTEND is not correctly set on GNR and MTL p-core. The umask value for the FRONTEND events is changed on GNR and MTL. The new umask is missing in the extra_regs[] table. Add a dedicated intel_gnr_extra_regs[] for GNR and MTL p-core. Fixes: bc4000fdb009 ("perf/x86/intel: Add Granite Rapids") Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20230615173242.3726364-1-kan.liang@linux.intel.com commit b50f26a44887f3f71ff5457135ee1d5f1d542d7d Author: Marc Zyngier Date: Fri Jun 16 12:48:31 2023 +0100 perf/core: Drop __weak attribute from arch_perf_update_userpage() prototype Reiji reports that the arm64 implementation of arch_perf_update_userpage() is now ignored and replaced by the dummy stub in core code. This seems to happen since the PMUv3 driver was moved to driver/perf. As it turns out, dropping the __weak attribute from the *prototype* of the function solves the problem. You're right, this doesn't seem to make much sense. And yet... It appears that both symbols get flagged as weak, and that the first one to appear in the link order wins: $ nm drivers/perf/arm_pmuv3.o|grep arch_perf_update_userpage 0000000000001db0 W arch_perf_update_userpage Dropping the attribute from the prototype restores the expected behaviour, and arm64 is able to enjoy arch_perf_update_userpage() again. Fixes: 7755cec63ade ("arm64: perf: Move PMUv3 driver to drivers/perf") Fixes: f1ec3a517b43 ("kernel/events: Add a missing prototype for arch_perf_update_userpage()") Reported-by: Reiji Watanabe Signed-off-by: Marc Zyngier Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Tested-by: Reiji Watanabe Link: https://lkml.kernel.org/r/20230616114831.3186980-1-maz@kernel.org commit 5b00369fcf6d1ff9050b94800dc596925ff3623f Author: Su Hui Date: Thu Jun 8 10:19:34 2023 +0800 iommu/amd: Fix possible memory leak of 'domain' Move allocation code down to avoid memory leak. Fixes: 29f54745f245 ("iommu/amd: Add missing domain type checks") Signed-off-by: Su Hui Reviewed-by: Jason Gunthorpe Reviewed-by: Jerry Snitselaar Reviewed-by: Vasant Hegde Link: https://lore.kernel.org/r/20230608021933.856045-1-suhui@nfschina.com Signed-off-by: Joerg Roedel commit f015b900bc3285322029b4a7d132d6aeb0e51857 Author: Sebastian Andrzej Siewior Date: Wed Jun 14 12:02:02 2023 +0200 xfrm: Linearize the skb after offloading if needed. With offloading enabled, esp_xmit() gets invoked very late, from within validate_xmit_xfrm() which is after validate_xmit_skb() validates and linearizes the skb if the underlying device does not support fragments. esp_output_tail() may add a fragment to the skb while adding the auth tag/ IV. Devices without the proper support will then send skb->data points to with the correct length so the packet will have garbage at the end. A pcap sniffer will claim that the proper data has been sent since it parses the skb properly. It is not affected with INET_ESP_OFFLOAD disabled. Linearize the skb after offloading if the sending hardware requires it. It was tested on v4, v6 has been adopted. Fixes: 7785bba299a8d ("esp: Add a software GRO codepath") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Steffen Klassert commit 227d2c3154a93f424503d3e4b7e157288848cf1b Merge: 122e2cb7e1a30 f9fd804aa0a36 Author: Takashi Iwai Date: Fri Jun 16 09:28:27 2023 +0200 Merge tag 'asoc-fix-v6.4-rc6-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.4 A couple more fixes for v6.4, one fixing a misleading error log and another stopping us seeing spurious failures setting the master volume on some Tegra systems introduced by a change to how we calculate delay times. commit 122e2cb7e1a30438cc0e8bf70d4279db245d7d5b Author: Lukasz Tyl Date: Wed Jun 14 14:25:24 2023 +0200 ALSA: usb-audio: Add quirk flag for HEM devices to enable native DSD playback This commit adds new DEVICE_FLG with QUIRK_FLAG_DSD_RAW and Vendor Id for HEM devices which supports native DSD. Prior to this change Linux kernel was not enabling native DSD playback for HEM devices, and as a result, DSD audio was being converted to PCM "on the fly". HEM devices, when connected to the system, would only play audio in PCM format, even if the source material was in DSD format. With the addition of new VENDOR_FLG in the quircks.c file, the devices are now correctly recognized, and raw DSD data is transmitted to the device, allowing for native DSD playback. Signed-off-by: Lukasz Tyl Cc: Link: https://lore.kernel.org/r/20230614122524.30271-1-ltyl@hem-e.com Signed-off-by: Takashi Iwai commit 8ba61c9f6c9bdfbf9d197b0282641d24ae909778 Author: Takashi Iwai Date: Mon Jun 12 15:28:18 2023 +0200 ALSA: usb-audio: Fix broken resume due to UAC3 power state As reported in the bugzilla below, the PM resume of a UAC3 device may fail due to the incomplete power state change, stuck at D1. The reason is that the driver expects the full D0 power state change only at hw_params, while the normal PCM resume procedure doesn't call hw_params. For fixing the bug, we add the same power state update to D0 at the prepare callback, which is certainly called by the resume procedure. Note that, with this change, the power state change in the hw_params becomes almost redundant, since snd_usb_hw_params() doesn't touch the parameters (at least it tires so). But dropping it is still a bit risky (e.g. we have the media-driver binding), so I leave the D0 power state change in snd_usb_hw_params() as is for now. Fixes: a0a4959eb4e9 ("ALSA: usb-audio: Operate UAC3 Power Domains in PCM callbacks") Cc: Link: https://bugzilla.kernel.org/show_bug.cgi?id=217539 Link: https://lore.kernel.org/r/20230612132818.29486-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 297224fc0922e7385573a30c29ffdabb67f27b7d Author: Takashi Iwai Date: Mon Jun 12 14:55:33 2023 +0200 ALSA: seq: oss: Fix racy open/close of MIDI devices Although snd_seq_oss_midi_open() and snd_seq_oss_midi_close() can be called concurrently from different code paths, we have no proper data protection against races. Introduce open_mutex to each seq_oss_midi object for avoiding the races. Reported-by: "Gong, Sishuai" Closes: https://lore.kernel.org/r/7DC9AF71-F481-4ABA-955F-76C535661E33@purdue.edu Link: https://lore.kernel.org/r/20230612125533.27461-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit d4e067287b41b9eba278533d32afda35b25fbdd5 Merge: 40f71e7cd3c6a d7a2fc1437f71 Author: Jakub Kicinski Date: Thu Jun 15 22:24:03 2023 -0700 Merge branch 'check-if-fips-mode-is-enabled-when-running-selftests' Magali Lemes says: ==================== Check if FIPS mode is enabled when running selftests Some test cases from net/tls, net/fcnal-test and net/vrf-xfrm-tests that rely on cryptographic functions to work and use non-compliant FIPS algorithms fail in FIPS mode. In order to allow these tests to pass in a wider set of kernels, - for net/tls, skip the test variants that use the ChaCha20-Poly1305 and SM4 algorithms, when FIPS mode is enabled; - for net/fcnal-test, skip the MD5 tests, when FIPS mode is enabled; - for net/vrf-xfrm-tests, replace the algorithms that are not FIPS-compliant with compliant ones. v1: https://lore.kernel.org/netdev/20230607174302.19542-1-magali.lemes@canonical.com/ v2: https://lore.kernel.org/netdev/20230609164324.497813-1-magali.lemes@canonical.com/ v3: https://lore.kernel.org/netdev/20230612125107.73795-1-magali.lemes@canonical.com/ ==================== Link: https://lore.kernel.org/r/20230613123222.631897-1-magali.lemes@canonical.com Signed-off-by: Jakub Kicinski commit d7a2fc1437f71cb058c7b11bc33dfc19e4bf277a Author: Magali Lemes Date: Tue Jun 13 09:32:22 2023 -0300 selftests: net: fcnal-test: check if FIPS mode is enabled There are some MD5 tests which fail when the kernel is in FIPS mode, since MD5 is not FIPS compliant. Add a check and only run those tests if FIPS mode is not enabled. Fixes: f0bee1ebb5594 ("fcnal-test: Add TCP MD5 tests") Fixes: 5cad8bce26e01 ("fcnal-test: Add TCP MD5 tests for VRF") Reviewed-by: David Ahern Signed-off-by: Magali Lemes Signed-off-by: Jakub Kicinski commit cb43c60e64ca67fcc9d23bd08f51d2ab8209d9d7 Author: Magali Lemes Date: Tue Jun 13 09:32:21 2023 -0300 selftests: net: vrf-xfrm-tests: change authentication and encryption algos The vrf-xfrm-tests tests use the hmac(md5) and cbc(des3_ede) algorithms for performing authentication and encryption, respectively. This causes the tests to fail when fips=1 is set, since these algorithms are not allowed in FIPS mode. Therefore, switch from hmac(md5) and cbc(des3_ede) to hmac(sha1) and cbc(aes), which are FIPS compliant. Fixes: 3f251d741150 ("selftests: Add tests for vrf and xfrms") Reviewed-by: David Ahern Signed-off-by: Magali Lemes Signed-off-by: Jakub Kicinski commit d113c395c67b62fc0d3f2004c0afc406aca0a2b7 Author: Magali Lemes Date: Tue Jun 13 09:32:20 2023 -0300 selftests: net: tls: check if FIPS mode is enabled TLS selftests use the ChaCha20-Poly1305 and SM4 algorithms, which are not FIPS compliant. When fips=1, this set of tests fails. Add a check and only run these tests if not in FIPS mode. Fixes: 4f336e88a870 ("selftests/tls: add CHACHA20-POLY1305 to tls selftests") Fixes: e506342a03c7 ("selftests/tls: add SM4 GCM/CCM to tls selftests") Reviewed-by: Jakub Kicinski Signed-off-by: Magali Lemes Signed-off-by: Jakub Kicinski commit 372b304c1e517c4d3e5b6ca6c9cfb20f027c3b03 Author: Magali Lemes Date: Tue Jun 13 09:32:19 2023 -0300 selftests/harness: allow tests to be skipped during setup Before executing each test from a fixture, FIXTURE_SETUP is run once. When SKIP is used in FIXTURE_SETUP, the setup function returns early but the test still proceeds to run, unless another SKIP macro is used within the test definition, leading to some code repetition. Therefore, allow tests to be skipped directly from the setup function. Suggested-by: Jakub Kicinski Signed-off-by: Magali Lemes Signed-off-by: Jakub Kicinski commit 40f71e7cd3c6ac04293556ab0504a372393838ff Merge: 627d858674f54 8f0e3703571fe Author: Linus Torvalds Date: Thu Jun 15 21:11:17 2023 -0700 Merge tag 'net-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from wireless, and netfilter. Selftests excluded - we have 58 patches and diff of +442/-199, which isn't really small but perhaps with the exception of the WiFi locking change it's old(ish) bugs. We have no known problems with v6.4. The selftest changes are rather large as MPTCP folks try to apply Greg's guidance that selftest from torvalds/linux should be able to run against stable kernels. Last thing I should call out is the DCCP/UDP-lite deprecation notices. We are fairly sure those are dead, but if we're wrong reverting them back in won't be fun. Current release - regressions: - wifi: - cfg80211: fix double lock bug in reg_wdev_chan_valid() - iwlwifi: mvm: spin_lock_bh() to fix lockdep regression Current release - new code bugs: - handshake: remove fput() that causes use-after-free Previous releases - regressions: - sched: cls_u32: fix reference counter leak leading to overflow - sched: cls_api: fix lockup on flushing explicitly created chain Previous releases - always broken: - nf_tables: integrate pipapo into commit protocol - nf_tables: incorrect error path handling with NFT_MSG_NEWRULE, fix dangling pointer on failure - ping6: fix send to link-local addresses with VRF - sched: act_pedit: parse L3 header for L4 offset, the skb may not have the offset saved - sched: act_ct: fix promotion of offloaded unreplied tuple - sched: refuse to destroy an ingress and clsact Qdiscs if there are lockless change operations in flight - wifi: mac80211: fix handful of bugs in multi-link operation - ipvlan: fix bound dev checking for IPv6 l3s mode - eth: enetc: correct the indexes of highest and 2nd highest TCs - eth: ice: fix XDP memory leak when NIC is brought up and down Misc: - add deprecation notices for UDP-lite and DCCP - selftests: mptcp: skip tests not supported by old kernels - sctp: handle invalid error codes without calling BUG()" * tag 'net-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (91 commits) dccp: Print deprecation notice. udplite: Print deprecation notice. octeon_ep: Add missing check for ioremap selftests/ptp: Fix timestamp printf format for PTP_SYS_OFFSET net: ethernet: stmicro: stmmac: fix possible memory leak in __stmmac_open net: tipc: resize nlattr array to correct size sfc: fix XDP queues mode with legacy IRQ net: macsec: fix double free of percpu stats net: lapbether: only support ethernet devices MAINTAINERS: add reviewers for SMC Sockets s390/ism: Fix trying to free already-freed IRQ by repeated ism_dev_exit() net: dsa: felix: fix taprio guard band overflow at 10Mbps with jumbo frames net/sched: cls_api: Fix lockup on flushing explicitly created chain ice: Fix ice module unload net/handshake: remove fput() that causes use-after-free selftests: forwarding: hw_stats_l3: Set addrgenmode in a separate step net/sched: qdisc_destroy() old ingress and clsact Qdiscs before grafting net/sched: Refactor qdisc_graft() for ingress and clsact Qdiscs net/sched: act_ct: Fix promotion of offloaded unreplied tuple wifi: iwlwifi: mvm: spin_lock_bh() to fix lockdep regression ... commit 627d858674f54f585b5dc82529f629fb8d0f85b4 Merge: 0e306952d7151 41efbb682de12 Author: Linus Torvalds Date: Thu Jun 15 20:56:39 2023 -0700 Merge tag 'loongarch-fixes-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch fixes from Huacai Chen: "Some trivial bug fixes for v6.4-rc7" * tag 'loongarch-fixes-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: Fix debugfs_create_dir() error checking LoongArch: Avoid uninitialized alignment_mask LoongArch: Fix perf event id calculation LoongArch: Fix the write_fcsr() macro LoongArch: Let pmd_present() return true when splitting pmd commit 0e306952d7151afdaa16e9acf280a739d1fe7b29 Merge: 93fd8eb053800 be04c14a1bd26 Author: Linus Torvalds Date: Thu Jun 15 20:19:21 2023 -0700 Merge tag 'for-6.4/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - Fix DM thinp discard performance regression introduced during this merge window where DM core was splitting large discards every 128K (max_sectors_kb) rather than every 64M (discard_max_bytes). - Extend DM core LOCKFS fix, made during 6.4 merge, to also fix race between do_mount and dm's do_suspend (in addition to the earlier fix's do_mount race with dm's do_resume). - Fix DM thin metadata operations to first check if the thin-pool is in "fail_io" mode; otherwise UAF can occur. - Fix DM thinp's call to __blkdev_issue_discard to use GFP_NOIO rather than GFP_NOWAIT (__blkdev_issue_discard cannot handle NULL return from bio_alloc). * tag 'for-6.4/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm: use op specific max_sectors when splitting abnormal io dm thin: fix issue_discard to pass GFP_NOIO to __blkdev_issue_discard dm thin metadata: check fail_io before using data_sm dm: don't lock fs when the map is NULL during suspend or resume commit 93fd8eb053800a241d09c00ef075cae0b5b03ecf Merge: b7feaa490b3dd 0c7e314a63526 Author: Linus Torvalds Date: Thu Jun 15 20:13:56 2023 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "This is an unusually large bunch of bug fixes for the later rc cycle, rxe and mlx5 both dumped a lot of things at once. rxe continues to fix itself, and mlx5 is fixing a bunch of "queue counters" related bugs. There is one highly notable bug fix regarding the qkey. This small security check was missed in the original 2005 implementation and it allows some significant issues. Summary: - Two rtrs bug fixes for error unwind bugs - Several rxe bug fixes: * Incorrect Rx packet validation * Using memory without a refcount * Syzkaller found use before initialization * Regression fix for missing locking with the tasklet conversion from this merge window - Have bnxt report the correct link properties to userspace, this was a regression in v6.3 - Several mlx5 bug fixes: * Kernel crash triggerable by userspace for the RAW ethernet profile * Defend against steering refcounting issues created by userspace * Incorrect change of QP port affinity parameters in some LAG configurations - Fix mlx5 Q counters: * Do not over allocate Q counters to allow userspace to use the full port capacity * Kernel crash triggered by eswitch due to mis-use of Q counters * Incorrect mlx5_device for Q counters in some LAG configurations - Properly implement the IBA spec restricting privileged qkeys to root - Always an error when reading from a disassociated device's event queue - isert bug fixes: * Avoid a deadlock with the CM handler and CM ID destruction * Correct list corruption due to incorrect locking * Fix a use after free around connection tear down" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/rxe: Fix rxe_cq_post IB/isert: Fix incorrect release of isert connection IB/isert: Fix possible list corruption in CMA handler IB/isert: Fix dead lock in ib_isert RDMA/mlx5: Fix affinity assignment IB/uverbs: Fix to consider event queue closing also upon non-blocking mode RDMA/uverbs: Restrict usage of privileged QKEYs RDMA/cma: Always set static rate to 0 for RoCE RDMA/mlx5: Fix Q-counters query in LAG mode RDMA/mlx5: Remove vport Q-counters dependency on normal Q-counters RDMA/mlx5: Fix Q-counters per vport allocation RDMA/mlx5: Create an indirect flow table for steering anchor RDMA/mlx5: Initiate dropless RQ for RAW Ethernet functions RDMA/rxe: Fix the use-before-initialization error of resp_pkts RDMA/bnxt_re: Fix reporting active_{speed,width} attributes RDMA/rxe: Fix ref count error in check_rkey() RDMA/rxe: Fix packet length checks RDMA/rtrs: Fix rxe_dealloc_pd warning RDMA/rtrs: Fix the last iu->buf leak in err path commit b7feaa490b3ddeed8801ead5e92e647439ce9e65 Merge: eee71c3473e68 eee4369921750 Author: Linus Torvalds Date: Thu Jun 15 20:03:15 2023 -0700 Merge tag 'spi-fix-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A few more driver specific fixes. The DesignWare fix is for an issue introduced by conversion to the chip select accessor functions and is pretty important but the other two are less severe" * tag 'spi-fix-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: dw: Replace incorrect spi_get_chipselect with set spi: fsl-dspi: avoid SCK glitches with continuous transfers spi: cadence-quadspi: Add missing check for dma_set_mask commit eee71c3473e6830e8e20017b2429bcd83e1fce9b Merge: 231a1e31574e3 b00de0000a695 Author: Linus Torvalds Date: Thu Jun 15 19:54:58 2023 -0700 Merge tag 'regulator-fix-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "The set of regulators described for the Qualcomm PM8550 just seems to have been completely wrong and would likely not have worked at all if anything tried to actually configure anything except for enabling and disabling at runtime" * tag 'regulator-fix-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: qcom-rpmh: Fix regulators for PM8550 commit 231a1e31574e3584cd2c297c98a5afb364715b3a Merge: c926a55f650ce 44e46572f0bae Author: Linus Torvalds Date: Thu Jun 15 19:50:57 2023 -0700 Merge tag 'regmap-fix-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fix from Mark Brown: "Another fix for the maple tree cache, Takashi noticed that unlike other caches the maple tree cache didn't check for read only registers before trying to sync which would result in spurious syncs for read only registers where we don't have a default. This was due to the check being open coded in the caches, we now check in the shared 'does this register need sync' function so that is fixed for this and future caches" * tag 'regmap-fix-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: regcache: Don't sync read-only registers commit c926a55f650ce58eae33cda504d50ac1837d53fd Merge: 62d8779610bb7 ec21a38df77a5 Author: Linus Torvalds Date: Thu Jun 15 19:13:45 2023 -0700 Merge tag 'media/v6.4-6' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "A fix for dvb-core to avoid a race condition during DVB board registration" * tag 'media/v6.4-6' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: Revert "media: dvb-core: Fix use-after-free on race condition at dvb_frontend" commit c8a5d5ea3ba6a18958f8d76430e4cd68eea33943 Author: Dave Airlie Date: Thu Jun 15 12:22:11 2023 +1000 nouveau: fix client work fence deletion race This seems to have existed for ever but is now more apparant after commit 9bff18d13473 ("drm/ttm: use per BO cleanup workers") My analysis: two threads are running, one in the irq signalling the fence, in dma_fence_signal_timestamp_locked, it has done the DMA_FENCE_FLAG_SIGNALLED_BIT setting, but hasn't yet reached the callbacks. The second thread in nouveau_cli_work_ready, where it sees the fence is signalled, so then puts the fence, cleanups the object and frees the work item, which contains the callback. Thread one goes again and tries to call the callback and causes the use-after-free. Proposed fix: lock the fence signalled check in nouveau_cli_work_ready, so either the callbacks are done or the memory is freed. Reviewed-by: Karol Herbst Fixes: 11e451e74050 ("drm/nouveau: remove fence wait code from deferred client work handler") Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie Link: https://lore.kernel.org/dri-devel/20230615024008.1600281-1-airlied@gmail.com/ commit c8ac109e21e12a25dd127a426c813d771ff90b1e Merge: 858fd168a95c5 7c5835bcb9176 Author: Dave Airlie Date: Fri Jun 16 09:08:13 2023 +1000 Merge tag 'amd-drm-fixes-6.4-2023-06-14' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.4-2023-06-14: amdgpu: - GFX9 preemption fixes - Add missing radeon secondary PCI ID - vblflash fixes - SMU 13 fix - VCN 4.0 fix - Re-enable TOPDOWN flag for large BAR systems to fix regression - eDP fix - PSR hang fix - DPIA fix radeon: - fbdev client warning fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230615024011.7773-1-alexander.deucher@amd.com commit 62d8779610bb7a7b8f9c7ab8bf317193ebe76d93 Merge: 7a043feb6cc02 f451fd97dd2b7 Author: Linus Torvalds Date: Thu Jun 15 15:40:58 2023 -0700 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Fix two regressions in ext4, one report by syzkaller[1], and reported by multiple users (and tracked by regzbot[2])" [1] https://syzkaller.appspot.com/bug?extid=4acc7d910e617b360859 [2] https://linux-regtracking.leemhuis.info/regzbot/regression/ZIauBR7YiV3rVAHL@glitch/ * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: drop the call to ext4_error() from ext4_get_group_info() Revert "ext4: remove unnecessary check in ext4_bg_num_gdb_nometa" commit 7a043feb6cc02c9273c34392c41d17e08804a323 Merge: b6dad5178ceaf e4645cc2f1e2d Author: Linus Torvalds Date: Thu Jun 15 15:24:33 2023 -0700 Merge tag '6.4-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: "Eight, mostly small, smb3 client fixes: - important fix for deferred close oops (race with unmount) found with xfstest generic/098 to some servers - important reconnect fix - fix problem with max_credits mount option - two multichannel (interface related) fixes - one trivial removal of confusing comment - two small debugging improvements (to better spot crediting problems)" * tag '6.4-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: add a warning when the in-flight count goes negative cifs: fix lease break oops in xfstest generic/098 cifs: fix max_credits implementation cifs: fix sockaddr comparison in iface_cmp smb/client: print "Unknown" instead of bogus link speed value cifs: print all credit counters in DebugData cifs: fix status checks in cifs_tree_connect smb: remove obsolete comment commit 8f0e3703571fe771d06235870ccbbf4ad41e63e8 Merge: 9a36e2d44d122 b144fcaf46d43 Author: Jakub Kicinski Date: Thu Jun 15 15:09:00 2023 -0700 Merge branch 'udplite-dccp-print-deprecation-notice' Kuniyuki Iwashima says: ==================== udplite/dccp: Print deprecation notice. UDP-Lite is assumed to have no users for 7 years, and DCCP is orphaned for 7 years too. Let's add deprecation notice and see if anyone responds to it. ==================== Link: https://lore.kernel.org/r/20230614194705.90673-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit b144fcaf46d43b1471ad6e4de66235b8cebb3c87 Author: Kuniyuki Iwashima Date: Wed Jun 14 12:47:05 2023 -0700 dccp: Print deprecation notice. DCCP was marked as Orphan in the MAINTAINERS entry 2 years ago in commit 054c4610bd05 ("MAINTAINERS: dccp: move Gerrit Renker to CREDITS"). It says we haven't heard from the maintainer for five years, so DCCP is not well maintained for 7 years now. Recently DCCP only receives updates for bugs, and major distros disable it by default. Removing DCCP would allow for better organisation of TCP fields to reduce the number of cache lines hit in the fast path. Let's add a deprecation notice when DCCP socket is created and schedule its removal to 2025. Signed-off-by: Kuniyuki Iwashima Signed-off-by: Jakub Kicinski commit be28c14ac8bbe1ff0b2a18a06cd10981f90fc741 Author: Kuniyuki Iwashima Date: Wed Jun 14 12:47:04 2023 -0700 udplite: Print deprecation notice. Recently syzkaller reported a 7-year-old null-ptr-deref [0] that occurs when a UDP-Lite socket tries to allocate a buffer under memory pressure. Someone should have stumbled on the bug much earlier if UDP-Lite had been used in a real app. Also, we do not always need a large UDP-Lite workload to hit the bug since UDP and UDP-Lite share the same memory accounting limit. Removing UDP-Lite would simplify UDP code removing a bunch of conditionals in fast path. Let's add a deprecation notice when UDP-Lite socket is created and schedule its removal to 2025. Link: https://lore.kernel.org/netdev/20230523163305.66466-1-kuniyu@amazon.com/ [0] Signed-off-by: Kuniyuki Iwashima Signed-off-by: Jakub Kicinski commit 9a36e2d44d122fe73a2a76ba73f1d50a65cf8210 Author: Jiasheng Jiang Date: Thu Jun 15 11:34:00 2023 +0800 octeon_ep: Add missing check for ioremap Add check for ioremap() and return the error if it fails in order to guarantee the success of ioremap(). Fixes: 862cd659a6fb ("octeon_ep: Add driver framework and device initialization") Signed-off-by: Jiasheng Jiang Reviewed-by: Kalesh AP Link: https://lore.kernel.org/r/20230615033400.2971-1-jiasheng@iscas.ac.cn Signed-off-by: Jakub Kicinski commit 76a4c8b82938bc5020b67663db41f451684bf327 Author: Alex Maftei Date: Thu Jun 15 09:34:04 2023 +0100 selftests/ptp: Fix timestamp printf format for PTP_SYS_OFFSET Previously, timestamps were printed using "%lld.%u" which is incorrect for nanosecond values lower than 100,000,000 as they're fractional digits, therefore leading zeros are meaningful. This patch changes the format strings to "%lld.%09u" in order to add leading zeros to the nanosecond value. Fixes: 568ebc5985f5 ("ptp: add the PTP_SYS_OFFSET ioctl to the testptp program") Fixes: 4ec54f95736f ("ptp: Fix compiler warnings in the testptp utility") Fixes: 6ab0e475f1f3 ("Documentation: fix misc. warnings") Signed-off-by: Alex Maftei Acked-by: Richard Cochran Link: https://lore.kernel.org/r/20230615083404.57112-1-alex.maftei@amd.com Signed-off-by: Jakub Kicinski commit 30134b7c47bd28fdb4db4d12aef824e0579cfee4 Author: Christian Marangi Date: Wed Jun 14 11:17:14 2023 +0200 net: ethernet: stmicro: stmmac: fix possible memory leak in __stmmac_open Fix a possible memory leak in __stmmac_open when stmmac_init_phy fails. It's also needed to free everything allocated by stmmac_setup_dma_desc and not just the dma_conf struct. Drop free_dma_desc_resources from __stmmac_open and correctly call free_dma_desc_resources on each user of __stmmac_open on error. Reported-by: Jose Abreu Fixes: ba39b344e924 ("net: ethernet: stmicro: stmmac: generate stmmac dma conf before open") Signed-off-by: Christian Marangi Cc: stable@vger.kernel.org Reviewed-by: Simon Horman Reviewed-by: Jose Abreu Link: https://lore.kernel.org/r/20230614091714.15912-1-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit 44194cb1b6045dea33ae9a0d54fb7e7cd93a2e09 Author: Lin Ma Date: Wed Jun 14 20:06:04 2023 +0800 net: tipc: resize nlattr array to correct size According to nla_parse_nested_deprecated(), the tb[] is supposed to the destination array with maxtype+1 elements. In current tipc_nl_media_get() and __tipc_nl_media_set(), a larger array is used which is unnecessary. This patch resize them to a proper size. Fixes: 1e55417d8fc6 ("tipc: add media set to new netlink api") Fixes: 46f15c6794fb ("tipc: add media get/dump to new netlink api") Signed-off-by: Lin Ma Reviewed-by: Florian Westphal Reviewed-by: Tung Nguyen Link: https://lore.kernel.org/r/20230614120604.1196377-1-linma@zju.edu.cn Signed-off-by: Jakub Kicinski commit be04c14a1bd262a49e5764e5cf864259b7e740fd Author: Mike Snitzer Date: Wed Jun 14 21:47:46 2023 -0400 dm: use op specific max_sectors when splitting abnormal io Split abnormal IO in terms of the corresponding operation specific max_sectors (max_discard_sectors, max_secure_erase_sectors or max_write_zeroes_sectors). This fixes a significant dm-thinp discard performance regression that was introduced with commit e2dd8aca2d76 ("dm bio prison v1: improve concurrent IO performance"). Relative to discard: max_discard_sectors is used instead of max_sectors; which fixes excessive discard splitting (e.g. max_sectors=128K vs max_discard_sectors=64M). Tested by discarding an 1 Petabyte dm-thin device: lvcreate -V 1125899906842624B -T test/pool -n thin time blkdiscard /dev/test/thin Before this fix (splitting discards every 128K): ~116m After this fix (splitting discards every 64M) : 0m33.460s Reported-by: Zorro Lang Fixes: 06961c487a33 ("dm: split discards further if target sets max_discard_granularity") Requires: 13f6facf3fae ("dm: allow targets to require splitting WRITE_ZEROES and SECURE_ERASE") Fixes: e2dd8aca2d76 ("dm bio prison v1: improve concurrent IO performance") Signed-off-by: Mike Snitzer commit 722d90822321497e2837cfc9000202e256e6b32f Author: Mike Snitzer Date: Tue Jun 13 20:05:34 2023 -0400 dm thin: fix issue_discard to pass GFP_NOIO to __blkdev_issue_discard issue_discard() passes GFP_NOWAIT to __blkdev_issue_discard() despite its code assuming bio_alloc() always succeeds. Commit 3dba53a958a75 ("dm thin: use __blkdev_issue_discard for async discard support") clearly shows where things went bad: Before commit 3dba53a958a75, dm-thin.c's open-coded __blkdev_issue_discard_async() properly handled using GFP_NOWAIT. Unfortunately __blkdev_issue_discard() doesn't and it was missed during review. Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit cb65b282c9640c27d3129e2e04b711ce1b352838 Author: Li Lingfeng Date: Tue Jun 6 20:20:24 2023 +0800 dm thin metadata: check fail_io before using data_sm Must check pmd->fail_io before using pmd->data_sm since pmd->data_sm may be destroyed by other processes. P1(kworker) P2(message) do_worker process_prepared process_prepared_discard_passdown_pt2 dm_pool_dec_data_range pool_message commit dm_pool_commit_metadata ↓ // commit failed metadata_operation_failed abort_transaction dm_pool_abort_metadata __open_or_format_metadata ↓ dm_sm_disk_open ↓ // open failed // pmd->data_sm is NULL dm_sm_dec_blocks ↓ // try to access pmd->data_sm --> UAF As shown above, if dm_pool_commit_metadata() and dm_pool_abort_metadata() fail in pool_message process, kworker may trigger UAF. Fixes: be500ed721a6 ("dm space maps: improve performance with inc/dec on ranges of blocks") Cc: stable@vger.kernel.org Signed-off-by: Li Lingfeng Signed-off-by: Mike Snitzer commit 2760904d895279f87196f0fa9ec570c79fe6a2e4 Author: Li Lingfeng Date: Thu Jun 1 14:14:23 2023 +0800 dm: don't lock fs when the map is NULL during suspend or resume As described in commit 38d11da522aa ("dm: don't lock fs when the map is NULL in process of resume"), a deadlock may be triggered between do_resume() and do_mount(). This commit preserves the fix from commit 38d11da522aa but moves it to where it also serves to fix a similar deadlock between do_suspend() and do_mount(). It does so, if the active map is NULL, by clearing DM_SUSPEND_LOCKFS_FLAG in dm_suspend() which is called by both do_suspend() and do_resume(). Fixes: 38d11da522aa ("dm: don't lock fs when the map is NULL in process of resume") Signed-off-by: Li Lingfeng Signed-off-by: Mike Snitzer commit 0bb619f9227aa370330d2b309733d74750705053 Author: Hans de Goede Date: Wed Jun 14 12:07:56 2023 +0200 thermal/intel/intel_soc_dts_iosf: Fix reporting wrong temperatures Since commit 955fb8719efb ("thermal/intel/intel_soc_dts_iosf: Use Intel TCC library") intel_soc_dts_iosf is reporting the wrong temperature. The driver expects tj_max to be in milli-degrees-celcius but after the switch to the TCC library this is now in degrees celcius so instead of e.g. 90000 it is set to 90 causing a temperature 45 degrees below tj_max to be reported as -44910 milli-degrees instead of as 45000 milli-degrees. Fix this by adding back the lost factor of 1000. Fixes: 955fb8719efb ("thermal/intel/intel_soc_dts_iosf: Use Intel TCC library") Reported-by: Bernhard Krug Signed-off-by: Hans de Goede Acked-by: Zhang Rui Cc: 6.3+ # 6.3+ Signed-off-by: Rafael J. Wysocki commit 22db06337f590d01d79f60f181d8dfe5a9ef9085 Author: Rafael J. Wysocki Date: Wed Jun 14 17:29:21 2023 +0200 ACPI: sleep: Avoid breaking S3 wakeup due to might_sleep() The addition of might_sleep() to down_timeout() caused the latter to enable interrupts unconditionally in some cases, which in turn broke the ACPI S3 wakeup path in acpi_suspend_enter(), where down_timeout() is called by acpi_disable_all_gpes() via acpi_ut_acquire_mutex(). Namely, if CONFIG_DEBUG_ATOMIC_SLEEP is set, might_sleep() causes might_resched() to be used and if CONFIG_PREEMPT_VOLUNTARY is set, this triggers __cond_resched() which may call preempt_schedule_common(), so __schedule() gets invoked and it ends up with enabled interrupts (in the prev == next case). Now, enabling interrupts early in the S3 wakeup path causes the kernel to crash. Address this by modifying acpi_suspend_enter() to disable GPEs without attempting to acquire the sleeping lock which is not needed in that code path anyway. Fixes: 99409b935c9a ("locking/semaphore: Add might_sleep() to down_*() family") Reported-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki Acked-by: Peter Zijlstra (Intel) Cc: 5.15+ # 5.15+ commit 9d7054fb3ac2e8d252aae1268f20623f244e644f Author: Neil Armstrong Date: Thu Jun 15 14:51:45 2023 +0200 spi: spi-geni-qcom: correctly handle -EPROBE_DEFER from dma_request_chan() Now spi_geni_grab_gpi_chan() errors are correctly reported, the -EPROBE_DEFER error should be returned from probe in case the GPI dma driver is built as module and/or not probed yet. Fixes: b59c122484ec ("spi: spi-geni-qcom: Add support for GPI dma") Fixes: 6532582c353f ("spi: spi-geni-qcom: fix error handling in spi_geni_grab_gpi_chan()") Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20230615-topic-sm8550-upstream-fix-spi-geni-qcom-probe-v2-1-670c3d9e8c9c@linaro.org Signed-off-by: Mark Brown commit e84a1e1e683f3558e30f437d7c99df35afb8b52c Author: Íñigo Huguet Date: Tue Jun 13 15:38:54 2023 +0200 sfc: fix XDP queues mode with legacy IRQ In systems without MSI-X capabilities, xdp_txq_queues_mode is calculated in efx_allocate_msix_channels, but when enabling MSI-X fails, it was not changed to a proper default value. This was leading to the driver thinking that it has dedicated XDP queues, when it didn't. Fix it by setting xdp_txq_queues_mode to the correct value if the driver fallbacks to MSI or legacy IRQ mode. The correct value is EFX_XDP_TX_QUEUES_BORROWED because there are no XDP dedicated queues. The issue can be easily visible if the kernel is started with pci=nomsi, then a call trace is shown. It is not shown only with sfc's modparam interrupt_mode=2. Call trace example: WARNING: CPU: 2 PID: 663 at drivers/net/ethernet/sfc/efx_channels.c:828 efx_set_xdp_channels+0x124/0x260 [sfc] [...skip...] Call Trace: efx_set_channels+0x5c/0xc0 [sfc] efx_probe_nic+0x9b/0x15a [sfc] efx_probe_all+0x10/0x1a2 [sfc] efx_pci_probe_main+0x12/0x156 [sfc] efx_pci_probe_post_io+0x18/0x103 [sfc] efx_pci_probe.cold+0x154/0x257 [sfc] local_pci_probe+0x42/0x80 Fixes: 6215b608a8c4 ("sfc: last resort fallback for lack of xdp tx queues") Reported-by: Yanghang Liu Signed-off-by: Íñigo Huguet Acked-by: Martin Habets Signed-off-by: David S. Miller commit 0c0cf3db83f8c7c9bb141c2771a34043bcf952ef Author: Fedor Pchelkin Date: Tue Jun 13 22:22:20 2023 +0300 net: macsec: fix double free of percpu stats Inside macsec_add_dev() we free percpu macsec->secy.tx_sc.stats and macsec->stats on some of the memory allocation failure paths. However, the net_device is already registered to that moment: in macsec_newlink(), just before calling macsec_add_dev(). This means that during unregister process its priv_destructor - macsec_free_netdev() - will be called and will free the stats again. Remove freeing percpu stats inside macsec_add_dev() because macsec_free_netdev() will correctly free the already allocated ones. The pointers to unallocated stats stay NULL, and free_percpu() treats that correctly. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 0a28bfd4971f ("net/macsec: Add MACsec skb_metadata_dst Tx Data path support") Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Signed-off-by: Fedor Pchelkin Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit 9eed321cde22fc1afd76eac563ce19d899e0d6b2 Author: Eric Dumazet Date: Wed Jun 14 16:18:02 2023 +0000 net: lapbether: only support ethernet devices It probbaly makes no sense to support arbitrary network devices for lapbether. syzbot reported: skbuff: skb_under_panic: text:ffff80008934c100 len:44 put:40 head:ffff0000d18dd200 data:ffff0000d18dd1ea tail:0x16 end:0x140 dev:bond1 kernel BUG at net/core/skbuff.c:200 ! Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 5643 Comm: dhcpcd Not tainted 6.4.0-rc5-syzkaller-g4641cff8e810 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : skb_panic net/core/skbuff.c:196 [inline] pc : skb_under_panic+0x13c/0x140 net/core/skbuff.c:210 lr : skb_panic net/core/skbuff.c:196 [inline] lr : skb_under_panic+0x13c/0x140 net/core/skbuff.c:210 sp : ffff8000973b7260 x29: ffff8000973b7270 x28: ffff8000973b7360 x27: dfff800000000000 x26: ffff0000d85d8150 x25: 0000000000000016 x24: ffff0000d18dd1ea x23: ffff0000d18dd200 x22: 000000000000002c x21: 0000000000000140 x20: 0000000000000028 x19: ffff80008934c100 x18: ffff8000973b68a0 x17: 0000000000000000 x16: ffff80008a43bfbc x15: 0000000000000202 x14: 0000000000000000 x13: 0000000000000001 x12: 0000000000000001 x11: 0000000000000201 x10: 0000000000000000 x9 : f22f7eb937cced00 x8 : f22f7eb937cced00 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff8000973b6b78 x4 : ffff80008df9ee80 x3 : ffff8000805974f4 x2 : 0000000000000001 x1 : 0000000100000201 x0 : 0000000000000086 Call trace: skb_panic net/core/skbuff.c:196 [inline] skb_under_panic+0x13c/0x140 net/core/skbuff.c:210 skb_push+0xf0/0x108 net/core/skbuff.c:2409 ip6gre_header+0xbc/0x738 net/ipv6/ip6_gre.c:1383 dev_hard_header include/linux/netdevice.h:3137 [inline] lapbeth_data_transmit+0x1c4/0x298 drivers/net/wan/lapbether.c:257 lapb_data_transmit+0x8c/0xb0 net/lapb/lapb_iface.c:447 lapb_transmit_buffer+0x178/0x204 net/lapb/lapb_out.c:149 lapb_send_control+0x220/0x320 net/lapb/lapb_subr.c:251 lapb_establish_data_link+0x94/0xec lapb_device_event+0x348/0x4e0 notifier_call_chain+0x1a4/0x510 kernel/notifier.c:93 raw_notifier_call_chain+0x3c/0x50 kernel/notifier.c:461 __dev_notify_flags+0x2bc/0x544 dev_change_flags+0xd0/0x15c net/core/dev.c:8643 devinet_ioctl+0x858/0x17e4 net/ipv4/devinet.c:1150 inet_ioctl+0x2ac/0x4d8 net/ipv4/af_inet.c:979 sock_do_ioctl+0x134/0x2dc net/socket.c:1201 sock_ioctl+0x4ec/0x858 net/socket.c:1318 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x244 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:191 el0_svc+0x4c/0x160 arch/arm64/kernel/entry-common.c:647 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:665 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Code: aa1803e6 aa1903e7 a90023f5 947730f5 (d4210000) Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Martin Schiller Signed-off-by: David S. Miller commit 7d03646d77cf837598b11c645ed2a79f29319111 Author: Jan Karcher Date: Wed Jun 14 08:54:56 2023 +0200 MAINTAINERS: add reviewers for SMC Sockets adding three people from Alibaba as reviewers for SMC. They are currently working on improving SMC on other architectures than s390 and help with reviewing patches on top. Thank you D. Wythe, Tony Lu and Wen Gu for your contributions and collaboration and welcome on board as reviewers! Reviewed-by: Wenjia Zhang Signed-off-by: Jan Karcher Acked-by: Tony Lu Acked-by: Wen Gu Signed-off-by: David S. Miller commit 78d0f94902afce8ec2c7a60f600cc0e3729d7412 Author: Julian Ruess Date: Tue Jun 13 14:25:37 2023 +0200 s390/ism: Fix trying to free already-freed IRQ by repeated ism_dev_exit() This patch prevents the system from crashing when unloading the ISM module. How to reproduce: Attach an ISM device and execute 'rmmod ism'. Error-Log: - Trying to free already-free IRQ 0 - WARNING: CPU: 1 PID: 966 at kernel/irq/manage.c:1890 free_irq+0x140/0x540 After calling ism_dev_exit() for each ISM device in the exit routine, pci_unregister_driver() will execute ism_remove() for each ISM device. Because ism_remove() also calls ism_dev_exit(), free_irq(pci_irq_vector(pdev, 0), ism) is called twice for each ISM device. This results in a crash with the error 'Trying to free already-free IRQ'. In the exit routine, it is enough to call pci_unregister_driver() because it ensures that ism_dev_exit() is called once per ISM device. Cc: # 6.3+ Fixes: 89e7d2ba61b7 ("net/ism: Add new API for client registration") Reviewed-by: Niklas Schnelle Signed-off-by: Julian Ruess Signed-off-by: David S. Miller commit 41efbb682de1231c3f6361039f46ad149e3ff5b9 Author: Immad Mir Date: Thu Jun 15 14:35:56 2023 +0800 LoongArch: Fix debugfs_create_dir() error checking The debugfs_create_dir() returns ERR_PTR in case of an error and the correct way of checking it is using the IS_ERR_OR_NULL inline function rather than the simple null comparision. This patch fixes the issue. Cc: stable@vger.kernel.org Suggested-By: Ivan Orlov Signed-off-by: Immad Mir Signed-off-by: Huacai Chen commit 0246d0aaf0a634a65135050011767b56ba351a8f Author: Qing Zhang Date: Thu Jun 15 14:35:52 2023 +0800 LoongArch: Avoid uninitialized alignment_mask The hardware monitoring points for instruction fetching and load/store operations need to align 4 bytes and 1/2/4/8 bytes respectively. Reported-by: Colin King Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen commit 962369120d750cbc9c4dc492f32b4304669ff6aa Author: Huacai Chen Date: Thu Jun 15 14:35:52 2023 +0800 LoongArch: Fix perf event id calculation LoongArch PMCFG has 10bit event id rather than 8 bit, so fix it. Cc: stable@vger.kernel.org Signed-off-by: Jun Yi Signed-off-by: Huacai Chen commit 346dc929623cef70ff7832a4fa0ffd1b696e312a Author: Qi Hu Date: Thu Jun 15 14:35:52 2023 +0800 LoongArch: Fix the write_fcsr() macro The "write_fcsr()" macro uses wrong the positions for val and dest in asm. Fix it! Reported-by: Miao HAO Signed-off-by: Qi Hu Signed-off-by: Huacai Chen commit ddc1729b07cc84bb29f577698b8d2e74a4004a6e Author: Hongchen Zhang Date: Thu Jun 15 14:35:52 2023 +0800 LoongArch: Let pmd_present() return true when splitting pmd When we split a pmd into ptes, pmd_present() and pmd_trans_huge() should return true, otherwise it would be treated as a swap pmd. This is the same as arm64 does in commit b65399f6111b ("arm64/mm: Change THP helpers to comply with generic MM semantics"), we also add a new bit named _PAGE_PRESENT_INVALID for LoongArch. Signed-off-by: Hongchen Zhang Signed-off-by: Huacai Chen commit 6ac7a27a8b07588497ed53dfd885df9c72bc67e0 Author: Vladimir Oltean Date: Tue Jun 13 20:09:07 2023 +0300 net: dsa: felix: fix taprio guard band overflow at 10Mbps with jumbo frames The DEV_MAC_MAXLEN_CFG register contains a 16-bit value - up to 65535. Plus 2 * VLAN_HLEN (4), that is up to 65543. The picos_per_byte variable is the largest when "speed" is lowest - SPEED_10 = 10. In that case it is (1000000L * 8) / 10 = 800000. Their product - 52434400000 - exceeds 32 bits, which is a problem, because apparently, a multiplication between two 32-bit factors is evaluated as 32-bit before being assigned to a 64-bit variable. In fact it's a problem for any MTU value larger than 5368. Cast one of the factors of the multiplication to u64 to force the multiplication to take place on 64 bits. Issue found by Coverity. Fixes: 55a515b1f5a9 ("net: dsa: felix: drop oversized frames with tc-taprio instead of hanging the port") Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230613170907.2413559-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit c9a82bec02c339cdda99b37c5e62b3b71fc4209c Author: Vlad Buslov Date: Mon Jun 12 11:34:26 2023 +0200 net/sched: cls_api: Fix lockup on flushing explicitly created chain Mingshuai Ren reports: When a new chain is added by using tc, one soft lockup alarm will be generated after delete the prio 0 filter of the chain. To reproduce the problem, perform the following steps: (1) tc qdisc add dev eth0 root handle 1: htb default 1 (2) tc chain add dev eth0 (3) tc filter del dev eth0 chain 0 parent 1: prio 0 (4) tc filter add dev eth0 chain 0 parent 1: Fix the issue by accounting for additional reference to chains that are explicitly created by RTM_NEWCHAIN message as opposed to implicitly by RTM_NEWTFILTER message. Fixes: 726d061286ce ("net: sched: prevent insertion of new classifiers during chain flush") Reported-by: Mingshuai Ren Closes: https://lore.kernel.org/lkml/87legswvi3.fsf@nvidia.com/T/ Signed-off-by: Vlad Buslov Link: https://lore.kernel.org/r/20230612093426.2867183-1-vladbu@nvidia.com Signed-off-by: Jakub Kicinski commit 24b454bc354ab7b1aa918a4fe3d7696516f592d4 Author: Jakub Buchocki Date: Mon Jun 12 10:14:21 2023 -0700 ice: Fix ice module unload Clearing the interrupt scheme before PFR reset, during the removal routine, could cause the hardware errors and possibly lead to system reboot, as the PF reset can cause the interrupt to be generated. Place the call for PFR reset inside ice_deinit_dev(), wait until reset and all pending transactions are done, then call ice_clear_interrupt_scheme(). This introduces a PFR reset to multiple error paths. Additionally, remove the call for the reset from ice_load() - it will be a part of ice_unload() now. Error example: [ 75.229328] ice 0000:ca:00.1: Failed to read Tx Scheduler Tree - User Selection data from flash [ 77.571315] {1}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1 [ 77.571418] {1}[Hardware Error]: event severity: recoverable [ 77.571459] {1}[Hardware Error]: Error 0, type: recoverable [ 77.571500] {1}[Hardware Error]: section_type: PCIe error [ 77.571540] {1}[Hardware Error]: port_type: 4, root port [ 77.571580] {1}[Hardware Error]: version: 3.0 [ 77.571615] {1}[Hardware Error]: command: 0x0547, status: 0x4010 [ 77.571661] {1}[Hardware Error]: device_id: 0000:c9:02.0 [ 77.571703] {1}[Hardware Error]: slot: 25 [ 77.571736] {1}[Hardware Error]: secondary_bus: 0xca [ 77.571773] {1}[Hardware Error]: vendor_id: 0x8086, device_id: 0x347a [ 77.571821] {1}[Hardware Error]: class_code: 060400 [ 77.571858] {1}[Hardware Error]: bridge: secondary_status: 0x2800, control: 0x0013 [ 77.572490] pcieport 0000:c9:02.0: AER: aer_status: 0x00200000, aer_mask: 0x00100020 [ 77.572870] pcieport 0000:c9:02.0: [21] ACSViol (First) [ 77.573222] pcieport 0000:c9:02.0: AER: aer_layer=Transaction Layer, aer_agent=Receiver ID [ 77.573554] pcieport 0000:c9:02.0: AER: aer_uncor_severity: 0x00463010 [ 77.691273] {2}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1 [ 77.691738] {2}[Hardware Error]: event severity: recoverable [ 77.691971] {2}[Hardware Error]: Error 0, type: recoverable [ 77.692192] {2}[Hardware Error]: section_type: PCIe error [ 77.692403] {2}[Hardware Error]: port_type: 4, root port [ 77.692616] {2}[Hardware Error]: version: 3.0 [ 77.692825] {2}[Hardware Error]: command: 0x0547, status: 0x4010 [ 77.693032] {2}[Hardware Error]: device_id: 0000:c9:02.0 [ 77.693238] {2}[Hardware Error]: slot: 25 [ 77.693440] {2}[Hardware Error]: secondary_bus: 0xca [ 77.693641] {2}[Hardware Error]: vendor_id: 0x8086, device_id: 0x347a [ 77.693853] {2}[Hardware Error]: class_code: 060400 [ 77.694054] {2}[Hardware Error]: bridge: secondary_status: 0x0800, control: 0x0013 [ 77.719115] pci 0000:ca:00.1: AER: can't recover (no error_detected callback) [ 77.719140] pcieport 0000:c9:02.0: AER: device recovery failed [ 77.719216] pcieport 0000:c9:02.0: AER: aer_status: 0x00200000, aer_mask: 0x00100020 [ 77.719390] pcieport 0000:c9:02.0: [21] ACSViol (First) [ 77.719557] pcieport 0000:c9:02.0: AER: aer_layer=Transaction Layer, aer_agent=Receiver ID [ 77.719723] pcieport 0000:c9:02.0: AER: aer_uncor_severity: 0x00463010 Fixes: 5b246e533d01 ("ice: split probe into smaller functions") Signed-off-by: Jakub Buchocki Reviewed-by: Przemek Kitszel Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230612171421.21570-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit d6858e190425db1da92f3131b1f3411480c356aa Merge: 361b6889ae636 48a821fd58837 Author: Jakub Kicinski Date: Wed Jun 14 22:36:53 2023 -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 2023-06-12 (igc, igb) This series contains updates to igc and igb drivers. Husaini clears Tx rings when interface is brought down for igc. Vinicius disables PTM and PCI busmaster when removing igc driver. Alex adds error check and path for NVM read error on igb. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: igb: fix nvm.ops.read() error handling igc: Fix possible system crash when loading module igc: Clean the TX buffer and TX descriptor ring ==================== Link: https://lore.kernel.org/r/20230612205208.115292-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 361b6889ae636926cdff517add240c3c8e24593a Author: Lin Ma Date: Wed Jun 14 09:52:49 2023 +0800 net/handshake: remove fput() that causes use-after-free A reference underflow is found in TLS handshake subsystem that causes a direct use-after-free. Part of the crash log is like below: [ 2.022114] ------------[ cut here ]------------ [ 2.022193] refcount_t: underflow; use-after-free. [ 2.022288] WARNING: CPU: 0 PID: 60 at lib/refcount.c:28 refcount_warn_saturate+0xbe/0x110 [ 2.022432] Modules linked in: [ 2.022848] RIP: 0010:refcount_warn_saturate+0xbe/0x110 [ 2.023231] RSP: 0018:ffffc900001bfe18 EFLAGS: 00000286 [ 2.023325] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00000000ffffdfff [ 2.023438] RDX: 0000000000000000 RSI: 00000000ffffffea RDI: 0000000000000001 [ 2.023555] RBP: ffff888004c20098 R08: ffffffff82b392c8 R09: 00000000ffffdfff [ 2.023693] R10: ffffffff82a592e0 R11: ffffffff82b092e0 R12: ffff888004c200d8 [ 2.023813] R13: 0000000000000000 R14: ffff888004c20000 R15: ffffc90000013ca8 [ 2.023930] FS: 0000000000000000(0000) GS:ffff88807dc00000(0000) knlGS:0000000000000000 [ 2.024062] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.024161] CR2: ffff888003601000 CR3: 0000000002a2e000 CR4: 00000000000006f0 [ 2.024275] Call Trace: [ 2.024322] [ 2.024367] ? __warn+0x7f/0x130 [ 2.024430] ? refcount_warn_saturate+0xbe/0x110 [ 2.024513] ? report_bug+0x199/0x1b0 [ 2.024585] ? handle_bug+0x3c/0x70 [ 2.024676] ? exc_invalid_op+0x18/0x70 [ 2.024750] ? asm_exc_invalid_op+0x1a/0x20 [ 2.024830] ? refcount_warn_saturate+0xbe/0x110 [ 2.024916] ? refcount_warn_saturate+0xbe/0x110 [ 2.024998] __tcp_close+0x2f4/0x3d0 [ 2.025065] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 2.025168] tcp_close+0x1f/0x70 [ 2.025231] inet_release+0x33/0x60 [ 2.025297] sock_release+0x1f/0x80 [ 2.025361] handshake_req_cancel_test2+0x100/0x2d0 [ 2.025457] kunit_try_run_case+0x4c/0xa0 [ 2.025532] kunit_generic_run_threadfn_adapter+0x15/0x20 [ 2.025644] kthread+0xe1/0x110 [ 2.025708] ? __pfx_kthread+0x10/0x10 [ 2.025780] ret_from_fork+0x2c/0x50 One can enable CONFIG_NET_HANDSHAKE_KUNIT_TEST config to reproduce above crash. The root cause of this bug is that the commit 1ce77c998f04 ("net/handshake: Unpin sock->file if a handshake is cancelled") adds one additional fput() function. That patch claims that the fput() is used to enable sock->file to be freed even when user space never calls DONE. However, it seems that the intended DONE routine will never give an additional fput() of ths sock->file. The existing two of them are just used to balance the reference added in sockfd_lookup(). This patch revert the mentioned commit to avoid the use-after-free. The patched kernel could successfully pass the KUNIT test and boot to shell. [ 0.733613] # Subtest: Handshake API tests [ 0.734029] 1..11 [ 0.734255] KTAP version 1 [ 0.734542] # Subtest: req_alloc API fuzzing [ 0.736104] ok 1 handshake_req_alloc NULL proto [ 0.736114] ok 2 handshake_req_alloc CLASS_NONE [ 0.736559] ok 3 handshake_req_alloc CLASS_MAX [ 0.737020] ok 4 handshake_req_alloc no callbacks [ 0.737488] ok 5 handshake_req_alloc no done callback [ 0.737988] ok 6 handshake_req_alloc excessive privsize [ 0.738529] ok 7 handshake_req_alloc all good [ 0.739036] # req_alloc API fuzzing: pass:7 fail:0 skip:0 total:7 [ 0.739444] ok 1 req_alloc API fuzzing [ 0.740065] ok 2 req_submit NULL req arg [ 0.740436] ok 3 req_submit NULL sock arg [ 0.740834] ok 4 req_submit NULL sock->file [ 0.741236] ok 5 req_lookup works [ 0.741621] ok 6 req_submit max pending [ 0.741974] ok 7 req_submit multiple [ 0.742382] ok 8 req_cancel before accept [ 0.742764] ok 9 req_cancel after accept [ 0.743151] ok 10 req_cancel after done [ 0.743510] ok 11 req_destroy works [ 0.743882] # Handshake API tests: pass:11 fail:0 skip:0 total:11 [ 0.744205] # Totals: pass:17 fail:0 skip:0 total:17 Acked-by: Chuck Lever Fixes: 1ce77c998f04 ("net/handshake: Unpin sock->file if a handshake is cancelled") Signed-off-by: Lin Ma Link: https://lore.kernel.org/r/20230613083204.633896-1-linma@zju.edu.cn Link: https://lore.kernel.org/r/20230614015249.987448-1-linma@zju.edu.cn Signed-off-by: Jakub Kicinski commit 37cec6ed8dc5f626ec08ec7c4e20d4dc65a95a46 Merge: bef68e201e538 f1a0898b5d6a7 Author: Jakub Kicinski Date: Wed Jun 14 21:28:59 2023 -0700 Merge tag 'wireless-2023-06-14' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== A couple of straggler fixes, mostly in the stack: - fix fragmentation for multi-link related elements - fix callback copy/paste error - fix multi-link locking - remove double-locking of wiphy mutex - transmit only on active links, not all - activate links in the correct order - don't remove links that weren't added - disable soft-IRQs for LQ lock in iwlwifi * tag 'wireless-2023-06-14' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: iwlwifi: mvm: spin_lock_bh() to fix lockdep regression wifi: mac80211: fragment per STA profile correctly wifi: mac80211: Use active_links instead of valid_links in Tx wifi: cfg80211: remove links only on AP wifi: mac80211: take lock before setting vif links wifi: cfg80211: fix link del callback to call correct handler wifi: mac80211: fix link activation settings order wifi: cfg80211: fix double lock bug in reg_wdev_chan_valid() ==================== Link: https://lore.kernel.org/r/20230614075502.11765-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit f451fd97dd2b78f286379203a47d9d295c467255 Author: Fabio M. De Francesco Date: Wed Jun 14 12:02:55 2023 +0200 ext4: drop the call to ext4_error() from ext4_get_group_info() A recent patch added a call to ext4_error() which is problematic since some callers of the ext4_get_group_info() function may be holding a spinlock, whereas ext4_error() must never be called in atomic context. This triggered a report from Syzbot: "BUG: sleeping function called from invalid context in ext4_update_super" (see the link below). Therefore, drop the call to ext4_error() from ext4_get_group_info(). In the meantime use eight characters tabs instead of nine characters ones. Reported-by: syzbot+4acc7d910e617b360859@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/00000000000070575805fdc6cdb2@google.com/ Fixes: 5354b2af3406 ("ext4: allow ext4_get_group_info() to fail") Suggested-by: Theodore Ts'o Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20230614100446.14337-1-fmdefrancesco@gmail.com commit 19482792113fa1dc419f9bc7b04b9dbdaa5256fd Author: Kemeng Shi Date: Wed Jun 14 06:50:25 2023 +0800 Revert "ext4: remove unnecessary check in ext4_bg_num_gdb_nometa" This reverts commit ad3f09be6cfe332be8ff46c78e6ec0f8839107aa. The reverted commit was intended to simpfy the code to get group descriptor block number in non-meta block group by assuming s_gdb_count is block number used for all non-meta block group descriptors. However s_gdb_count is block number used for all meta *and* non-meta group descriptors. So s_gdb_group will be > actual group descriptor block number used for all non-meta block group which should be "total non-meta block group" / "group descriptors per block", e.g. s_first_meta_bg. Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230613225025.3859522-1-shikemeng@huaweicloud.com Fixes: ad3f09be6cfe ("ext4: remove unnecessary check in ext4_bg_num_gdb_nometa") Cc: stable@kernel.org Signed-off-by: Theodore Ts'o commit 9cefd6e7e0a77b0fbca5c793f6fb6821b0962775 Author: Justin Tee Date: Wed Jun 14 10:59:44 2023 -0700 scsi: lpfc: Fix incorrect big endian type assignment in bsg loopback path The kernel test robot reported sparse warnings regarding incorrect type assignment for __be16 variables in bsg loopback path. Change the flagged lines to use the be16_to_cpu() and cpu_to_be16() macros appropriately. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20230614175944.3577-1-justintee8345@gmail.com Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202306110819.sDIKiGgg-lkp@intel.com/ Signed-off-by: Martin K. Petersen commit 91271699228bfc66f1bc8abc0327169dc156d854 Author: Bob Pearson Date: Tue Jun 13 09:43:00 2023 -0500 scsi: target: core: Fix error path in target_setup_session() In the error exits in target_setup_session(), if a branch is taken to free_sess: transport_free_session() may call to target_free_cmd_counter() and then fall through to call target_free_cmd_counter() a second time. This can, and does, sometimes cause seg faults since the data field in cmd_cnt->refcnt has been freed in the first call. Fix this problem by simply returning after the call to transport_free_session(). The second call is redundant for those cases. Fixes: 4edba7e4a8f3 ("scsi: target: Move cmd counter allocation") Signed-off-by: Bob Pearson Link: https://lore.kernel.org/r/20230613144259.12890-1-rpearsonhpe@gmail.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit 31d16e712bdcaee769de4780f72ff8d6cd3f0589 Author: Michael Kelley Date: Fri Jun 9 13:38:21 2023 -0700 scsi: storvsc: Always set no_report_opcodes Hyper-V synthetic SCSI devices do not support the MAINTENANCE_IN SCSI command, so scsi_report_opcode() always fails, resulting in messages like this: hv_storvsc : tag#205 cmd 0xa3 status: scsi 0x2 srb 0x86 hv 0xc0000001 The recently added support for command duration limits calls scsi_report_opcode() four times as each device comes online, which significantly increases the number of messages logged in a system with many disks. Fix the problem by always marking Hyper-V synthetic SCSI devices as not supporting scsi_report_opcode(). With this setting, the MAINTENANCE_IN SCSI command is not issued and no messages are logged. Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/1686343101-18930-1-git-send-email-mikelley@microsoft.com Signed-off-by: Martin K. Petersen commit 9dc704dcc09eae7d21b5da0615eb2ed79278f63e Author: Sagar Biradar Date: Fri May 19 16:08:34 2023 -0700 scsi: aacraid: Reply queue mapping to CPUs based on IRQ affinity Fix the I/O hang that arises because of the MSIx vector not having a mapped online CPU upon receiving completion. SCSI cmds take the blk_mq route, which is setup during init. Reserved cmds fetch the vector_no from mq_map after init is complete. Before init, they have to use 0 - as per the norm. Reviewed-by: Gilbert Wu Signed-off-by: Sagar Biradar Reviewed-by: John Garry Link: https://lore.kernel.org/r/20230519230834.27436-1-sagar.biradar@microchip.com Signed-off-by: Martin K. Petersen commit 23200a4c8ac284f8b4263d7cecaefecaa3ad6732 Author: Arnd Bergmann Date: Thu May 11 12:58:33 2023 +0200 clk: pxa: fix NULL pointer dereference in pxa3xx_clk_update_accr sparse points out an embarrasing bug in an older patch of mine, which uses the register offset instead of an __iomem pointer: drivers/clk/pxa/clk-pxa3xx.c:167:9: sparse: sparse: Using plain integer as NULL pointer Unlike sparse, gcc and clang ignore this bug and fail to warn because a literal '0' is considered a valid representation of a NULL pointer. Fixes: 3c816d950a49 ("ARM: pxa: move clk register definitions to driver") Cc: stable@vger.kernel.org Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202305111301.RAHohdob-lkp@intel.com/ Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230511105845.299859-1-arnd@kernel.org Signed-off-by: Stephen Boyd commit ec21a38df77a5aefbd2f70c48127003b6f259cf3 Author: Mauro Carvalho Chehab Date: Fri Jun 9 09:16:21 2023 +0100 Revert "media: dvb-core: Fix use-after-free on race condition at dvb_frontend" As reported by Thomas Voegtle , sometimes a DVB card does not initialize properly booting Linux 6.4-rc4. This is not always, maybe in 3 out of 4 attempts. After double-checking, the root cause seems to be related to the UAF fix, which is causing a race issue: [ 26.332149] tda10071 7-0005: found a 'NXP TDA10071' in cold state, will try to load a firmware [ 26.340779] tda10071 7-0005: downloading firmware from file 'dvb-fe-tda10071.fw' [ 989.277402] INFO: task vdr:743 blocked for more than 491 seconds. [ 989.283504] Not tainted 6.4.0-rc5-i5 #249 [ 989.288036] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 989.295860] task:vdr state:D stack:0 pid:743 ppid:711 flags:0x00004002 [ 989.295865] Call Trace: [ 989.295867] [ 989.295869] __schedule+0x2ea/0x12d0 [ 989.295877] ? asm_sysvec_apic_timer_interrupt+0x16/0x20 [ 989.295881] schedule+0x57/0xc0 [ 989.295884] schedule_preempt_disabled+0xc/0x20 [ 989.295887] __mutex_lock.isra.16+0x237/0x480 [ 989.295891] ? dvb_get_property.isra.10+0x1bc/0xa50 [ 989.295898] ? dvb_frontend_stop+0x36/0x180 [ 989.338777] dvb_frontend_stop+0x36/0x180 [ 989.338781] dvb_frontend_open+0x2f1/0x470 [ 989.338784] dvb_device_open+0x81/0xf0 [ 989.338804] ? exact_lock+0x20/0x20 [ 989.338808] chrdev_open+0x7f/0x1c0 [ 989.338811] ? generic_permission+0x1a2/0x230 [ 989.338813] ? link_path_walk.part.63+0x340/0x380 [ 989.338815] ? exact_lock+0x20/0x20 [ 989.338817] do_dentry_open+0x18e/0x450 [ 989.374030] path_openat+0xca5/0xe00 [ 989.374031] ? terminate_walk+0xec/0x100 [ 989.374034] ? path_lookupat+0x93/0x140 [ 989.374036] do_filp_open+0xc0/0x140 [ 989.374038] ? __call_rcu_common.constprop.91+0x92/0x240 [ 989.374041] ? __check_object_size+0x147/0x260 [ 989.374043] ? __check_object_size+0x147/0x260 [ 989.374045] ? alloc_fd+0xbb/0x180 [ 989.374048] ? do_sys_openat2+0x243/0x310 [ 989.374050] do_sys_openat2+0x243/0x310 [ 989.374052] do_sys_open+0x52/0x80 [ 989.374055] do_syscall_64+0x5b/0x80 [ 989.421335] ? __task_pid_nr_ns+0x92/0xa0 [ 989.421337] ? syscall_exit_to_user_mode+0x20/0x40 [ 989.421339] ? do_syscall_64+0x67/0x80 [ 989.421341] ? syscall_exit_to_user_mode+0x20/0x40 [ 989.421343] ? do_syscall_64+0x67/0x80 [ 989.421345] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 989.421348] RIP: 0033:0x7fe895d067e3 [ 989.421349] RSP: 002b:00007fff933c2ba0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 [ 989.421351] RAX: ffffffffffffffda RBX: 00007fff933c2c10 RCX: 00007fe895d067e3 [ 989.421352] RDX: 0000000000000802 RSI: 00005594acdce160 RDI: 00000000ffffff9c [ 989.421353] RBP: 0000000000000802 R08: 0000000000000000 R09: 0000000000000000 [ 989.421353] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000001 [ 989.421354] R13: 00007fff933c2ca0 R14: 00000000ffffffff R15: 00007fff933c2c90 [ 989.421355] This reverts commit 6769a0b7ee0c3b31e1b22c3fadff2bfb642de23f. Fixes: 6769a0b7ee0c ("media: dvb-core: Fix use-after-free on race condition at dvb_frontend") Link: https://lore.kernel.org/all/da5382ad-09d6-20ac-0d53-611594b30861@lio96.de/ Signed-off-by: Mauro Carvalho Chehab commit adeaa3f290ecf7f6a6a5c53219a4686cbdff5fbd Author: Jens Axboe Date: Tue Jun 13 19:26:55 2023 -0600 io_uring/io-wq: clear current->worker_private on exit A recent fix stopped clearing PF_IO_WORKER from current->flags on exit, which meant that we can now call inc/dec running on the worker after it has been removed if it ends up scheduling in/out as part of exit. If this happens after an RCU grace period has passed, then the struct pointed to by current->worker_private may have been freed, and we can now be accessing memory that is freed. Ensure this doesn't happen by clearing the task worker_private field. Both io_wq_worker_running() and io_wq_worker_sleeping() check this field before going any further, and we don't need any accounting etc done after this worker has exited. Fixes: fd37b884003c ("io_uring/io-wq: don't clear PF_IO_WORKER on exit") Reported-by: Zorro Lang Signed-off-by: Jens Axboe commit 0113d4615dbf053ae9a7a1e0acbc6652713af01f Author: Beau Belgrave Date: Wed Jun 14 09:33:36 2023 -0700 tracing/user_events: Document auto-cleanup and remove dyn_event refs Now user_events auto-cleanup upon the last reference by default. This makes it not possible to use the dynamics event file via tracefs. Document that auto-cleanup is enabled by default and remove the refernce to /sys/kernel/tracing/dynamic_events file to make this clear. Link: https://lkml.kernel.org/r/20230614163336.5797-7-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 61701242e86f0b509a0f5f9deb226bedfc8dfab7 Author: Beau Belgrave Date: Wed Jun 14 09:33:35 2023 -0700 selftests/user_events: Adapt dyn_test to non-persist events Now that user_events does not honor persist events the dynamic_events file cannot be easily used to test parsing and matching cases. Update dyn_test to use the direct ABI file instead of dynamic_events so that we still have testing coverage until persist events and dynamic_events file integration has been decided. Link: https://lkml.kernel.org/r/20230614163336.5797-6-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 216a137e3eadac888cece141bd2c940785e235a2 Author: Beau Belgrave Date: Wed Jun 14 09:33:34 2023 -0700 selftests/user_events: Ensure auto cleanup works as expected User events now auto cleanup upon the last reference put. Update ftrace_test to ensure this works as expected. Ensure EBUSY delays while event is being deleted do not cause transient failures by waiting and re-attempting. Link: https://lkml.kernel.org/r/20230614163336.5797-5-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit a65442edb47a6d9c974b50049296ac9ddb378fee Author: Beau Belgrave Date: Wed Jun 14 09:33:33 2023 -0700 tracing/user_events: Add auto cleanup and future persist flag Currently user events need to be manually deleted via the delete IOCTL call or via the dynamic_events file. Most operators and processes wish to have these events auto cleanup when they are no longer used by anything to prevent them piling without manual maintenance. However, some operators may not want this, such as pre-registering events via the dynamic_events tracefs file. Update user_event_put() to attempt an auto delete of the event if it's the last reference. The auto delete must run in a work queue to ensure proper behavior of class->reg() invocations that don't expect the call to go away from underneath them during the unregister. Add work_struct to user_event struct to ensure we can do this reliably. Add a persist flag, that is not yet exposed, to ensure we can toggle between auto-cleanup and leaving the events existing in the future. When a non-zero flag is seen during register, return -EINVAL to ensure ABI is clear for the user processes while we work out the best approach for persistent events. Link: https://lkml.kernel.org/r/20230614163336.5797-4-beaub@linux.microsoft.com Link: https://lore.kernel.org/linux-trace-kernel/20230518093600.3f119d68@rorschach.local.home/ Suggested-by: Steven Rostedt Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit f0dbf6fd0bddb9290c89fdd7afc53dad5051030e Author: Beau Belgrave Date: Wed Jun 14 09:33:32 2023 -0700 tracing/user_events: Track refcount consistently via put/get Various parts of the code today track user_event's refcnt field directly via a refcount_add/dec. This makes it hard to modify the behavior of the last reference decrement in all code paths consistently. For example, in the future we will auto-delete events upon the last reference going away. This last reference could happen in many places, but we want it to be consistently handled. Add user_event_get() and user_event_put() for the add/dec. Update all places where direct refcounts are being used to utilize these new functions. In each location pass if event_mutex is locked or not. This allows us to drop events automatically in future patches clearly. Ensure when caller states the lock is held, it really is (or is not) held. Link: https://lkml.kernel.org/r/20230614163336.5797-3-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit b08d72580584ab89c41d6fc0f15cd1cf4ce2ed93 Author: Beau Belgrave Date: Wed Jun 14 09:33:31 2023 -0700 tracing/user_events: Store register flags on events Currently we don't have any available flags for user processes to use to indicate options for user_events. We will soon have a flag to indicate the event should or should not auto-delete once it's not being used by anyone. Add a reg_flags field to user_events and parameters to existing functions to allow for this in future patches. Link: https://lkml.kernel.org/r/20230614163336.5797-2-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 0c7e314a6352664e12ec465f576cf039e95f8369 Author: Bob Pearson Date: Mon Jun 12 10:50:33 2023 -0500 RDMA/rxe: Fix rxe_cq_post A recent patch replaced a tasklet execution of cq->comp_handler by a direct call. While this made sense it let changes to cq->notify state be unprotected and assumed that the cq completion machinery and the ulp done callbacks were reentrant. The result is that in some cases completion events can be lost. This patch moves the cq->comp_handler call inside of the spinlock in rxe_cq_post which solves both issues. This is compatible with the matching code in the request notify verb. Fixes: 78b26a335310 ("RDMA/rxe: Remove tasklet call from rxe_cq.c") Link: https://lore.kernel.org/r/20230612155032.17036-1-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit ed0e0ae0c932188654422d01f4e0ea14ff97c063 Author: Beau Belgrave Date: Thu Jun 1 15:49:28 2023 -0700 tracing/user_events: Remove user_ns walk for groups During discussions it was suggested that user_ns is not a good place to try to attach a tracing namespace. The current code has stubs to enable that work that are very likely to change and incur a performance cost. Remove the user_ns walk when creating a group and determining the system name to use, since it's unlikely user_ns will be used in the future. Link: https://lore.kernel.org/all/20230601-urenkel-holzofen-cd9403b9cadd@brauner/ Link: https://lore.kernel.org/linux-trace-kernel/20230601224928.301-1-beaub@linux.microsoft.com Suggested-by: Christian Brauner Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 42187bdc3ca45435bec96c66a90276315b2db1cb Author: sunliming Date: Tue Jun 6 14:20:27 2023 +0800 selftests/user_events: Add perf self-test for empty arguments events Tests to ensure events that has empty arguments can input trace record correctly when using perf. Link: https://lkml.kernel.org/r/20230606062027.1008398-5-sunliming@kylinos.cn Acked-by: Beau Belgrave Acked-by: Masami Hiramatsu (Google) Signed-off-by: sunliming Signed-off-by: Steven Rostedt (Google) commit 4b56c21b11dcd2c6e4c6ee81bde77bea05e64db0 Author: sunliming Date: Tue Jun 6 14:20:26 2023 +0800 selftests/user_events: Clear the events after perf self-test When the self test is completed, perf self-test left the user events not to be cleared. Clear the events by unregister and delete the event. Link: https://lkml.kernel.org/r/20230606062027.1008398-4-sunliming@kylinos.cn Acked-by: Beau Belgrave Acked-by: Masami Hiramatsu (Google) Signed-off-by: sunliming Signed-off-by: Steven Rostedt (Google) commit 3e7269dd5fd5e77c215829e80fc1f29c989c9c42 Author: sunliming Date: Tue Jun 6 14:20:25 2023 +0800 selftests/user_events: Add ftrace self-test for empty arguments events Tests to ensure events that has empty arguments can input trace record correctly when using ftrace. Link: https://lkml.kernel.org/r/20230606062027.1008398-3-sunliming@kylinos.cn Acked-by: Beau Belgrave Acked-by: Masami Hiramatsu (Google) Signed-off-by: sunliming Signed-off-by: Steven Rostedt (Google) commit 6f05dcabe5c241d066ec472cf38ac8b84f8c9c6f Author: sunliming Date: Tue Jun 6 14:20:24 2023 +0800 tracing/user_events: Fix the incorrect trace record for empty arguments events The user_events support events that has empty arguments. But the trace event is discarded and not really committed when the arguments is empty. Fix this by not attempting to copy in zero-length data. Link: https://lkml.kernel.org/r/20230606062027.1008398-2-sunliming@kylinos.cn Acked-by: Beau Belgrave Acked-by: Masami Hiramatsu (Google) Signed-off-by: sunliming Signed-off-by: Steven Rostedt (Google) commit e70bb54d7a51299e7feca9169c07d79f9a3fc01d Author: sunliming Date: Thu May 25 16:52:32 2023 +0800 tracing: Modify print_fields() for fields output order Now the print_fields() print trace event fields in reverse order. Modify it to the positive sequence. Example outputs for a user event: test0 u32 count1; u32 count2 Output before: example-2547 [000] ..... 325.666387: test0: count2=0x2 (2) count1=0x1 (1) Output after: example-2742 [002] ..... 429.769370: test0: count1=0x1 (1) count2=0x2 (2) Link: https://lore.kernel.org/linux-trace-kernel/20230525085232.5096-1-sunliming@kylinos.cn Fixes: 80a76994b2d88 ("tracing: Add "fields" option to show raw trace event fields") Signed-off-by: sunliming Signed-off-by: Steven Rostedt (Google) commit cfac4ed7279d056df6167bd665e460787dc9e0c4 Author: sunliming Date: Mon May 29 14:51:10 2023 +0800 tracing/user_events: Handle matching arguments that is null from dyn_events When A registering user event from dyn_events has no argments, it will pass the matching check, regardless of whether there is a user event with the same name and arguments. Add the matching check when the arguments of registering user event is null. Link: https://lore.kernel.org/linux-trace-kernel/20230529065110.303440-1-sunliming@kylinos.cn Signed-off-by: sunliming Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit ba470eebc2f6c2f704872955a715b9555328e7d0 Author: sunliming Date: Mon May 29 11:21:00 2023 +0800 tracing/user_events: Prevent same name but different args event User processes register name_args for events. If the same name but different args event are registered. The trace outputs of second event are printed as the first event. This is incorrect. Return EADDRINUSE back to the user process if the same name but different args event has being registered. Link: https://lore.kernel.org/linux-trace-kernel/20230529032100.286534-1-sunliming@kylinos.cn Signed-off-by: sunliming Reviewed-by: Masami Hiramatsu (Google) Acked-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit b50f2d048ecf1512ff85128ea4153bceb0e60590 Author: Qu Wenruo Date: Wed Jun 14 14:49:35 2023 +0800 btrfs: scrub: fix a return value overwrite in scrub_stripe() [RETURN VALUE OVERWRITE] Inside scrub_stripe(), we would submit all the remaining stripes after iterating all extents. But since flush_scrub_stripes() can return error, we need to avoid overwriting the existing @ret if there is any error. However the existing check is doing the wrong check: ret2 = flush_scrub_stripes(); if (!ret2) ret = ret2; This would overwrite the existing @ret to 0 as long as the final flush detects no critical errors. [FIX] We should check @ret other than @ret2 in that case. Fixes: 8eb3dd17eadd ("btrfs: dev-replace: error out if we have unrepaired metadata error during") Reviewed-by: Christoph Hellwig Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit e4645cc2f1e2d6f268bb8dcfac40997c52432aed Author: Shyam Prasad N Date: Fri Jun 9 17:46:56 2023 +0000 cifs: add a warning when the in-flight count goes negative We've seen the in-flight count go into negative with some internal stress testing in Microsoft. Adding a WARN when this happens, in hope of understanding why this happens when it happens. Signed-off-by: Shyam Prasad N Reviewed-by: Bharath SM Signed-off-by: Steve French commit c774e6779f38bf36f0cce65e30793704bab4b0d7 Author: Steve French Date: Sun Jun 11 11:23:32 2023 -0500 cifs: fix lease break oops in xfstest generic/098 umount can race with lease break so need to check if tcon->ses->server is still valid to send the lease break response. Reviewed-by: Bharath SM Reviewed-by: Shyam Prasad N Fixes: 59a556aebc43 ("SMB3: drop reference to cfile before sending oplock break") Signed-off-by: Steve French commit b104dbedbe61d89a933479f8effce6409037ef73 Author: Conor Dooley Date: Tue Jun 6 07:59:19 2023 +0100 Documentation: RISC-V: patch-acceptance: mention patchwork's role Palmer suggested at some point, not sure if it was in one of the weekly linux-riscv syncs, or a conversation at FOSDEM, that we should document the role of the automation running on our patchwork instance plays in patch acceptance. Add a short note to the patch-acceptance document to that end. Signed-off-by: Conor Dooley Reviewed-by: Björn Töpel Link: https://lore.kernel.org/r/20230606-rehab-monsoon-12c17bbe08e3@wendy Signed-off-by: Palmer Dabbelt commit bef68e201e538eaa3a91f97aae8161eb2d0a8ed7 Author: Danielle Ratson Date: Mon Jun 12 16:34:58 2023 +0200 selftests: forwarding: hw_stats_l3: Set addrgenmode in a separate step Setting the IPv6 address generation mode of a net device during its creation never worked, but after commit b0ad3c179059 ("rtnetlink: call validate_linkmsg in rtnl_create_link") it explicitly fails [1]. The failure is caused by the fact that validate_linkmsg() is called before the net device is registered, when it still does not have an 'inet6_dev'. Likewise, raising the net device before setting the address generation mode is meaningless, because by the time the mode is set, the address has already been generated. Therefore, fix the test to first create the net device, then set its IPv6 address generation mode and finally bring it up. [1] # ip link add name mydev addrgenmode eui64 type dummy RTNETLINK answers: Address family not supported by protocol Fixes: ba95e7930957 ("selftests: forwarding: hw_stats_l3: Add a new test") Signed-off-by: Danielle Ratson Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Link: https://lore.kernel.org/r/f3b05d85b2bc0c3d6168fe8f7207c6c8365703db.1686580046.git.petrm@nvidia.com Signed-off-by: Paolo Abeni commit 3c40eb8145325b0f5b93b8a169146078cb2c49d6 Author: Martin Hundebøll Date: Wed Jun 7 10:27:12 2023 +0200 mmc: meson-gx: remove redundant mmc_request_done() call from irq context The call to mmc_request_done() can schedule, so it must not be called from irq context. Wake the irq thread if it needs to be called, and let its existing logic do its work. Fixes the following kernel bug, which appears when running an RT patched kernel on the AmLogic Meson AXG A113X SoC: [ 11.111407] BUG: scheduling while atomic: kworker/0:1H/75/0x00010001 [ 11.111438] Modules linked in: [ 11.111451] CPU: 0 PID: 75 Comm: kworker/0:1H Not tainted 6.4.0-rc3-rt2-rtx-00081-gfd07f41ed6b4-dirty #1 [ 11.111461] Hardware name: RTX AXG A113X Linux Platform Board (DT) [ 11.111469] Workqueue: kblockd blk_mq_run_work_fn [ 11.111492] Call trace: [ 11.111497] dump_backtrace+0xac/0xe8 [ 11.111510] show_stack+0x18/0x28 [ 11.111518] dump_stack_lvl+0x48/0x60 [ 11.111530] dump_stack+0x18/0x24 [ 11.111537] __schedule_bug+0x4c/0x68 [ 11.111548] __schedule+0x80/0x574 [ 11.111558] schedule_loop+0x2c/0x50 [ 11.111567] schedule_rtlock+0x14/0x20 [ 11.111576] rtlock_slowlock_locked+0x468/0x730 [ 11.111587] rt_spin_lock+0x40/0x64 [ 11.111596] __wake_up_common_lock+0x5c/0xc4 [ 11.111610] __wake_up+0x18/0x24 [ 11.111620] mmc_blk_mq_req_done+0x68/0x138 [ 11.111633] mmc_request_done+0x104/0x118 [ 11.111644] meson_mmc_request_done+0x38/0x48 [ 11.111654] meson_mmc_irq+0x128/0x1f0 [ 11.111663] __handle_irq_event_percpu+0x70/0x114 [ 11.111674] handle_irq_event_percpu+0x18/0x4c [ 11.111683] handle_irq_event+0x80/0xb8 [ 11.111691] handle_fasteoi_irq+0xa4/0x120 [ 11.111704] handle_irq_desc+0x20/0x38 [ 11.111712] generic_handle_domain_irq+0x1c/0x28 [ 11.111721] gic_handle_irq+0x8c/0xa8 [ 11.111735] call_on_irq_stack+0x24/0x4c [ 11.111746] do_interrupt_handler+0x88/0x94 [ 11.111757] el1_interrupt+0x34/0x64 [ 11.111769] el1h_64_irq_handler+0x18/0x24 [ 11.111779] el1h_64_irq+0x64/0x68 [ 11.111786] __add_wait_queue+0x0/0x4c [ 11.111795] mmc_blk_rw_wait+0x84/0x118 [ 11.111804] mmc_blk_mq_issue_rq+0x5c4/0x654 [ 11.111814] mmc_mq_queue_rq+0x194/0x214 [ 11.111822] blk_mq_dispatch_rq_list+0x3ac/0x528 [ 11.111834] __blk_mq_sched_dispatch_requests+0x340/0x4d0 [ 11.111847] blk_mq_sched_dispatch_requests+0x38/0x70 [ 11.111858] blk_mq_run_work_fn+0x3c/0x70 [ 11.111865] process_one_work+0x17c/0x1f0 [ 11.111876] worker_thread+0x1d4/0x26c [ 11.111885] kthread+0xe4/0xf4 [ 11.111894] ret_from_fork+0x10/0x20 Fixes: 51c5d8447bd7 ("MMC: meson: initial support for GX platforms") Cc: stable@vger.kernel.org Signed-off-by: Martin Hundebøll Link: https://lore.kernel.org/r/20230607082713.517157-1-martin@geanix.com Signed-off-by: Ulf Hansson commit 3b0d2819522235d003df8da68caadc5d226d4c1d Merge: 41f2c7c342d3a 84ad0af0bccd3 Author: Paolo Abeni Date: Wed Jun 14 10:31:42 2023 +0200 Merge branch 'net-sched-fix-race-conditions-in-mini_qdisc_pair_swap' Peilin Ye says: ==================== net/sched: Fix race conditions in mini_qdisc_pair_swap() These 2 patches fix race conditions for ingress and clsact Qdiscs as reported [1] by syzbot, split out from another [2] series (last 2 patches of it). Per-patch changelog omitted. Patch 1 hasn't been touched since last version; I just included everybody's tag. Patch 2 bases on patch 6 v1 of [2], with comments and commit log slightly changed. We also need rtnl_dereference() to load ->qdisc_sleeping since commit d636fc5dd692 ("net: sched: add rcu annotations around qdisc->qdisc_sleeping"), so I changed that; please take yet another look, thanks! Patch 2 has been tested with the new reproducer Pedro posted [3]. [1] https://syzkaller.appspot.com/bug?extid=b53a9c0d1ea4ad62da8b [2] https://lore.kernel.org/r/cover.1684887977.git.peilin.ye@bytedance.com/ [3] https://lore.kernel.org/r/7879f218-c712-e9cc-57ba-665990f5f4c9@mojatatu.com/ ==================== Link: https://lore.kernel.org/r/cover.1686355297.git.peilin.ye@bytedance.com Signed-off-by: Paolo Abeni commit 84ad0af0bccd3691cb951c2974c5cb2c10594d4a Author: Peilin Ye Date: Sat Jun 10 20:30:25 2023 -0700 net/sched: qdisc_destroy() old ingress and clsact Qdiscs before grafting mini_Qdisc_pair::p_miniq is a double pointer to mini_Qdisc, initialized in ingress_init() to point to net_device::miniq_ingress. ingress Qdiscs access this per-net_device pointer in mini_qdisc_pair_swap(). Similar for clsact Qdiscs and miniq_egress. Unfortunately, after introducing RTNL-unlocked RTM_{NEW,DEL,GET}TFILTER requests (thanks Hillf Danton for the hint), when replacing ingress or clsact Qdiscs, for example, the old Qdisc ("@old") could access the same miniq_{in,e}gress pointer(s) concurrently with the new Qdisc ("@new"), causing race conditions [1] including a use-after-free bug in mini_qdisc_pair_swap() reported by syzbot: BUG: KASAN: slab-use-after-free in mini_qdisc_pair_swap+0x1c2/0x1f0 net/sched/sch_generic.c:1573 Write of size 8 at addr ffff888045b31308 by task syz-executor690/14901 ... Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:319 print_report mm/kasan/report.c:430 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:536 mini_qdisc_pair_swap+0x1c2/0x1f0 net/sched/sch_generic.c:1573 tcf_chain_head_change_item net/sched/cls_api.c:495 [inline] tcf_chain0_head_change.isra.0+0xb9/0x120 net/sched/cls_api.c:509 tcf_chain_tp_insert net/sched/cls_api.c:1826 [inline] tcf_chain_tp_insert_unique net/sched/cls_api.c:1875 [inline] tc_new_tfilter+0x1de6/0x2290 net/sched/cls_api.c:2266 ... @old and @new should not affect each other. In other words, @old should never modify miniq_{in,e}gress after @new, and @new should not update @old's RCU state. Fixing without changing sch_api.c turned out to be difficult (please refer to Closes: for discussions). Instead, make sure @new's first call always happen after @old's last call (in {ingress,clsact}_destroy()) has finished: In qdisc_graft(), return -EBUSY if @old has any ongoing filter requests, and call qdisc_destroy() for @old before grafting @new. Introduce qdisc_refcount_dec_if_one() as the counterpart of qdisc_refcount_inc_nz() used for filter requests. Introduce a non-static version of qdisc_destroy() that does a TCQ_F_BUILTIN check, just like qdisc_put() etc. Depends on patch "net/sched: Refactor qdisc_graft() for ingress and clsact Qdiscs". [1] To illustrate, the syzkaller reproducer adds ingress Qdiscs under TC_H_ROOT (no longer possible after commit c7cfbd115001 ("net/sched: sch_ingress: Only create under TC_H_INGRESS")) on eth0 that has 8 transmission queues: Thread 1 creates ingress Qdisc A (containing mini Qdisc a1 and a2), then adds a flower filter X to A. Thread 2 creates another ingress Qdisc B (containing mini Qdisc b1 and b2) to replace A, then adds a flower filter Y to B. Thread 1 A's refcnt Thread 2 RTM_NEWQDISC (A, RTNL-locked) qdisc_create(A) 1 qdisc_graft(A) 9 RTM_NEWTFILTER (X, RTNL-unlocked) __tcf_qdisc_find(A) 10 tcf_chain0_head_change(A) mini_qdisc_pair_swap(A) (1st) | | RTM_NEWQDISC (B, RTNL-locked) RCU sync 2 qdisc_graft(B) | 1 notify_and_destroy(A) | tcf_block_release(A) 0 RTM_NEWTFILTER (Y, RTNL-unlocked) qdisc_destroy(A) tcf_chain0_head_change(B) tcf_chain0_head_change_cb_del(A) mini_qdisc_pair_swap(B) (2nd) mini_qdisc_pair_swap(A) (3rd) | ... ... Here, B calls mini_qdisc_pair_swap(), pointing eth0->miniq_ingress to its mini Qdisc, b1. Then, A calls mini_qdisc_pair_swap() again during ingress_destroy(), setting eth0->miniq_ingress to NULL, so ingress packets on eth0 will not find filter Y in sch_handle_ingress(). This is just one of the possible consequences of concurrently accessing miniq_{in,e}gress pointers. Fixes: 7a096d579e8e ("net: sched: ingress: set 'unlocked' flag for Qdisc ops") Fixes: 87f373921c4e ("net: sched: ingress: set 'unlocked' flag for clsact Qdisc ops") Reported-by: syzbot+b53a9c0d1ea4ad62da8b@syzkaller.appspotmail.com Closes: https://lore.kernel.org/r/0000000000006cf87705f79acf1a@google.com/ Cc: Hillf Danton Cc: Vlad Buslov Signed-off-by: Peilin Ye Acked-by: Jamal Hadi Salim Signed-off-by: Paolo Abeni commit 2d5f6a8d7aef7852a9ecc555f88c673a1c91754f Author: Peilin Ye Date: Sat Jun 10 20:30:15 2023 -0700 net/sched: Refactor qdisc_graft() for ingress and clsact Qdiscs Grafting ingress and clsact Qdiscs does not need a for-loop in qdisc_graft(). Refactor it. No functional changes intended. Tested-by: Pedro Tammela Acked-by: Jamal Hadi Salim Reviewed-by: Jamal Hadi Salim Reviewed-by: Vlad Buslov Signed-off-by: Peilin Ye Signed-off-by: Paolo Abeni commit 41f2c7c342d3adb1c4dd5f2e3dd831adff16a669 Author: Paul Blakey Date: Fri Jun 9 15:22:59 2023 +0300 net/sched: act_ct: Fix promotion of offloaded unreplied tuple Currently UNREPLIED and UNASSURED connections are added to the nf flow table. This causes the following connection packets to be processed by the flow table which then skips conntrack_in(), and thus such the connections will remain UNREPLIED and UNASSURED even if reply traffic is then seen. Even still, the unoffloaded reply packets are the ones triggering hardware update from new to established state, and if there aren't any to triger an update and/or previous update was missed, hardware can get out of sync with sw and still mark packets as new. Fix the above by: 1) Not skipping conntrack_in() for UNASSURED packets, but still refresh for hardware, as before the cited patch. 2) Try and force a refresh by reply-direction packets that update the hardware rules from new to established state. 3) Remove any bidirectional flows that didn't failed to update in hardware for re-insertion as bidrectional once any new packet arrives. Fixes: 6a9bad0069cf ("net/sched: act_ct: offload UDP NEW connections") Co-developed-by: Vlad Buslov Signed-off-by: Vlad Buslov Signed-off-by: Paul Blakey Reviewed-by: Florian Westphal Link: https://lore.kernel.org/r/1686313379-117663-1-git-send-email-paulb@nvidia.com Signed-off-by: Paolo Abeni commit f1a0898b5d6a77d332d036da03bad6fa9770de5b Author: Hugh Dickins Date: Fri Jun 9 14:29:39 2023 -0700 wifi: iwlwifi: mvm: spin_lock_bh() to fix lockdep regression Lockdep on 6.4-rc on ThinkPad X1 Carbon 5th says ===================================================== WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected 6.4.0-rc5 #1 Not tainted ----------------------------------------------------- kworker/3:1/49 [HC0[0]:SC0[4]:HE1:SE0] is trying to acquire: ffff8881066fa368 (&mvm_sta->deflink.lq_sta.rs_drv.pers.lock){+.+.}-{2:2}, at: rs_drv_get_rate+0x46/0xe7 and this task is already holding: ffff8881066f80a8 (&sta->rate_ctrl_lock){+.-.}-{2:2}, at: rate_control_get_rate+0xbd/0x126 which would create a new lock dependency: (&sta->rate_ctrl_lock){+.-.}-{2:2} -> (&mvm_sta->deflink.lq_sta.rs_drv.pers.lock){+.+.}-{2:2} but this new dependency connects a SOFTIRQ-irq-safe lock: (&sta->rate_ctrl_lock){+.-.}-{2:2} etc. etc. etc. Changing the spin_lock() in rs_drv_get_rate() to spin_lock_bh() was not enough to pacify lockdep, but changing them all on pers.lock has worked. Fixes: a8938bc881d2 ("wifi: iwlwifi: mvm: Add locking to the rate read flow") Signed-off-by: Hugh Dickins Link: https://lore.kernel.org/r/79ffcc22-9775-cb6d-3ffd-1a517c40beef@google.com Signed-off-by: Johannes Berg commit 07b1cc841b4f283f3bc34d228690f88b17e57008 Merge: 374283a100127 11b8b2e70a9b4 Author: Jakub Kicinski Date: Tue Jun 13 20:49:16 2023 -0700 Merge branch 'fix-small-bugs-and-annoyances-in-tc-testing' Vlad Buslov says: ==================== Fix small bugs and annoyances in tc-testing ==================== Link: https://lore.kernel.org/r/20230612075712.2861848-1-vladbu@nvidia.com Signed-off-by: Jakub Kicinski commit 11b8b2e70a9b4a1b60eefc0cd79cd2d3c08545f1 Author: Vlad Buslov Date: Mon Jun 12 09:57:12 2023 +0200 selftests/tc-testing: Remove configs that no longer exist Some qdiscs and classifiers have recently been retired from kernel. However, tc-testing config is still cluttered with them which causes noise when using merge_config.sh script to update existing config for tc-testing compatibility. Remove the config settings for affected qdiscs and classifiers. Fixes: fb38306ceb9e ("net/sched: Retire ATM qdisc") Fixes: 051d44209842 ("net/sched: Retire CBQ qdisc") Fixes: bbe77c14ee61 ("net/sched: Retire dsmark qdisc") Fixes: 265b4da82dbf ("net/sched: Retire rsvp classifier") Fixes: 8c710f75256b ("net/sched: Retire tcindex classifier") Signed-off-by: Vlad Buslov Reviewed-by: Pedro Tammela Signed-off-by: Jakub Kicinski commit b39d8c41c7a8336ce85c376b5d4906089524a0ae Author: Vlad Buslov Date: Mon Jun 12 09:57:11 2023 +0200 selftests/tc-testing: Fix SFB db test Setting very small value of db like 10ms introduces rounding errors when converting to/from jiffies on some kernel configs. For example, on 250hz the actual value will be set to 12ms which causes the test to fail: # $ sudo ./tdc.py -d eth2 -e 3410 # -- ns/SubPlugin.__init__ # Test 3410: Create SFB with db setting # # All test results: # # 1..1 # not ok 1 3410 - Create SFB with db setting # Could not match regex pattern. Verify command output: # qdisc sfb 1: root refcnt 2 rehash 600s db 12ms limit 1000p max 25p target 20p increment 0.000503548 decrement 4.57771e-05 penalty_rate 10pps penalty_burst 20p Set the value to 100ms instead which currently seem to work on 100hz, 250hz, 300hz and 1000hz kernel configs. Fixes: 6ad92dc56fca ("selftests/tc-testing: add selftests for sfb qdisc") Signed-off-by: Vlad Buslov Reviewed-by: Pedro Tammela Signed-off-by: Jakub Kicinski commit b849c566ee9c6ed78288a522278dcaf419f8e239 Author: Vlad Buslov Date: Mon Jun 12 09:57:10 2023 +0200 selftests/tc-testing: Fix Error: failed to find target LOG Add missing netfilter config dependency. Fixes following example error when running tests via tdc.sh for all XT tests: # $ sudo ./tdc.py -d eth2 -e 2029 # Test 2029: Add xt action with log-prefix # exit: 255 # exit: 0 # failed to find target LOG # # bad action parsing # parse_action: bad value (7:xt)! # Illegal "action" # # -----> teardown stage *** Could not execute: "$TC actions flush action xt" # # -----> teardown stage *** Error message: "Error: Cannot flush unknown TC action. # We have an error flushing # " # returncode 1; expected [0] # # -----> teardown stage *** Aborting test run. # # <_io.BufferedReader name=3> *** stdout *** # # <_io.BufferedReader name=5> *** stderr *** # "-----> teardown stage" did not complete successfully # Exception ('teardown', ' failed to find target LOG\n\nbad action parsing\nparse_action: bad value (7:xt)!\nIllegal "action"\n', '"-----> teardown stage" did not complete successfully') (caught in test_runner, running test 2 2029 Add xt action with log-prefix stage teardown) # --------------- # traceback # File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 495, in test_runner # res = run_one_test(pm, args, index, tidx) # File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 434, in run_one_test # prepare_env(args, pm, 'teardown', '-----> teardown stage', tidx['teardown'], procout) # File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 245, in prepare_env # raise PluginMgrTestFail( # --------------- # accumulated output for this test: # failed to find target LOG # # bad action parsing # parse_action: bad value (7:xt)! # Illegal "action" # # --------------- # # All test results: # # 1..1 # ok 1 2029 - Add xt action with log-prefix # skipped - "-----> teardown stage" did not complete successfully Fixes: 910d504bc187 ("selftests/tc-testings: add selftests for xt action") Signed-off-by: Vlad Buslov Reviewed-by: Pedro Tammela Signed-off-by: Jakub Kicinski commit aef6e908b54200d04f2d77dab31509fcff2e60ae Author: Vlad Buslov Date: Mon Jun 12 09:57:09 2023 +0200 selftests/tc-testing: Fix Error: Specified qdisc kind is unknown. All TEQL tests assume that sch_teql module is loaded. Load module in tdc.sh before running qdisc tests. Fixes following example error when running tests via tdc.sh for all TEQL tests: # $ sudo ./tdc.py -d eth2 -e 84a0 # -- ns/SubPlugin.__init__ # Test 84a0: Create TEQL with default setting # exit: 2 # exit: 0 # Error: Specified qdisc kind is unknown. # # -----> teardown stage *** Could not execute: "$TC qdisc del dev $DUMMY handle 1: root" # # -----> teardown stage *** Error message: "Error: Invalid handle. # " # returncode 2; expected [0] # # -----> teardown stage *** Aborting test run. # # <_io.BufferedReader name=3> *** stdout *** # # <_io.BufferedReader name=5> *** stderr *** # "-----> teardown stage" did not complete successfully # Exception ('teardown', 'Error: Specified qdisc kind is unknown.\n', '"-----> teardown stage" did not complete successfully') (caught in test_runner, running test 2 84a0 Create TEQL with default setting stage teardown) # --------------- # traceback # File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 495, in test_runner # res = run_one_test(pm, args, index, tidx) # File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 434, in run_one_test # prepare_env(args, pm, 'teardown', '-----> teardown stage', tidx['teardown'], procout) # File "/images/src/linux/tools/testing/selftests/tc-testing/./tdc.py", line 245, in prepare_env # raise PluginMgrTestFail( # --------------- # accumulated output for this test: # Error: Specified qdisc kind is unknown. # # --------------- # # All test results: # # 1..1 # ok 1 84a0 - Create TEQL with default setting # skipped - "-----> teardown stage" did not complete successfully Fixes: cc62fbe114c9 ("selftests/tc-testing: add selftests for teql qdisc") Signed-off-by: Vlad Buslov Reviewed-by: Victor Nogueira Reviewed-by: Pedro Tammela Signed-off-by: Jakub Kicinski commit 374283a1001277e4d07491387aac1fad5aa08d43 Author: Dan Carpenter Date: Mon Jun 12 10:18:50 2023 +0300 net: ethernet: ti: am65-cpsw: Call of_node_put() on error path This code returns directly but it should instead call of_node_put() to drop some reference counts. Fixes: dab2b265dd23 ("net: ethernet: ti: am65-cpsw: Add support for SERDES configuration") Signed-off-by: Dan Carpenter Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/e3012f0c-1621-40e6-bf7d-03c276f6e07f@kili.mountain Signed-off-by: Jakub Kicinski commit cac9e4418f4cbd548ccb065b3adcafe073f7f7d2 Author: Jens Axboe Date: Mon Jun 12 13:51:36 2023 -0600 io_uring/net: save msghdr->msg_control for retries If the application sets ->msg_control and we have to later retry this command, or if it got queued with IOSQE_ASYNC to begin with, then we need to retain the original msg_control value. This is due to the net stack overwriting this field with an in-kernel pointer, to copy it in. Hitting that path for the second time will now fail the copy from user, as it's attempting to copy from a non-user address. Cc: stable@vger.kernel.org # 5.10+ Link: https://github.com/axboe/liburing/issues/880 Reported-and-tested-by: Marek Majkowski Signed-off-by: Jens Axboe commit b6dad5178ceaf23f369c3711062ce1f2afc33644 Merge: 15adb51c04ccf 85041e12418fd Author: Linus Torvalds Date: Tue Jun 13 17:00:33 2023 -0700 Merge tag 'nios2_fix_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux Pull NIOS2 dts fix from Dinh Nguyen: - Fix tse_mac "max-frame-size" property * tag 'nios2_fix_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: nios2: dts: Fix tse_mac "max-frame-size" property commit b78b34c6043ec811ab03bf77a7808a2df522d549 Merge: ad96f1c9138e0 84a62b445c86d Author: Alexei Starovoitov Date: Tue Jun 13 15:13:52 2023 -0700 Merge branch 'bpf: fix NULL dereference during extable search' Krister Johansen says: ==================== Hi, Enclosed are a pair of patches for an oops that can occur if an exception is generated while a bpf subprogram is running. One of the bpf_prog_aux entries for the subprograms are missing an extable. This can lead to an exception that would otherwise be handled turning into a NULL pointer bug. These changes were tested via the verifier and progs selftests and no regressions were observed. Changes from v4: - Ensure that num_exentries is copied to prog->aux from func[0] (Feedback from Ilya Leoshkevich) Changes from v3: - Selftest style fixups (Feedback from Yonghong Song) - Selftest needs to assert that test bpf program executed (Feedback from Yonghong Song) - Selftest should combine open and load using open_and_load (Feedback from Yonghong Song) Changes from v2: - Insert only the main program's kallsyms (Feedback from Yonghong Song and Alexei Starovoitov) - Selftest should use ASSERT instead of CHECK (Feedback from Yonghong Song) - Selftest needs some cleanup (Feedback from Yonghong Song) - Switch patch order (Feedback from Alexei Starovoitov) Changes from v1: - Add a selftest (Feedback From Alexei Starovoitov) - Move to a 1-line verifier change instead of searching multiple extables ==================== Signed-off-by: Alexei Starovoitov commit 84a62b445c86d0f2c9831290ffecee7269f18254 Author: Krister Johansen Date: Mon Jun 12 17:44:54 2023 -0700 selftests/bpf: add a test for subprogram extables In certain situations a program with subprograms may have a NULL extable entry. This should not happen, and when it does, it turns a single trap into multiple. Add a test case for further debugging and to prevent regressions. The test-case contains three essentially identical versions of the same test because just one program may not be sufficient to trigger the oops. This is due to the fact that the items are stored in a binary tree and have identical values so it's possible to sometimes find the ksym with the extable. With 3 copies, this has been reliable on this author's test systems. When triggered out of this test case, the oops looks like this: BUG: kernel NULL pointer dereference, address: 000000000000000c #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: 1132 Comm: test_progs Tainted: G OE 6.4.0-rc3+ #2 RIP: 0010:cmp_ex_search+0xb/0x30 Code: cc cc cc cc e8 36 cb 03 00 66 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 55 48 89 e5 48 8b 07 <48> 63 0e 48 01 f1 31 d2 48 39 c8 19 d2 48 39 c8 b8 01 00 00 00 0f RSP: 0018:ffffb30c4291f998 EFLAGS: 00010006 RAX: ffffffffc00b49da RBX: 0000000000000002 RCX: 000000000000000c RDX: 0000000000000002 RSI: 000000000000000c RDI: ffffb30c4291f9e8 RBP: ffffb30c4291f998 R08: ffffffffab1a42d0 R09: 0000000000000001 R10: 0000000000000000 R11: ffffffffab1a42d0 R12: ffffb30c4291f9e8 R13: 000000000000000c R14: 000000000000000c R15: 0000000000000000 FS: 00007fb5d9e044c0(0000) GS:ffff92e95ee00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000000c CR3: 000000010c3a2005 CR4: 00000000007706f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: bsearch+0x41/0x90 ? __pfx_cmp_ex_search+0x10/0x10 ? bpf_prog_45a7907e7114d0ff_handle_fexit_ret_subprogs3+0x2a/0x6c search_extable+0x3b/0x60 ? bpf_prog_45a7907e7114d0ff_handle_fexit_ret_subprogs3+0x2a/0x6c search_bpf_extables+0x10d/0x190 ? bpf_prog_45a7907e7114d0ff_handle_fexit_ret_subprogs3+0x2a/0x6c search_exception_tables+0x5d/0x70 fixup_exception+0x3f/0x5b0 ? look_up_lock_class+0x61/0x110 ? __lock_acquire+0x6b8/0x3560 ? __lock_acquire+0x6b8/0x3560 ? __lock_acquire+0x6b8/0x3560 kernelmode_fixup_or_oops+0x46/0x110 __bad_area_nosemaphore+0x68/0x2b0 ? __lock_acquire+0x6b8/0x3560 bad_area_nosemaphore+0x16/0x20 do_kern_addr_fault+0x81/0xa0 exc_page_fault+0xd6/0x210 asm_exc_page_fault+0x2b/0x30 RIP: 0010:bpf_prog_45a7907e7114d0ff_handle_fexit_ret_subprogs3+0x2a/0x6c Code: f3 0f 1e fa 0f 1f 44 00 00 66 90 55 48 89 e5 f3 0f 1e fa 48 8b 7f 08 49 bb 00 00 00 00 00 80 00 00 4c 39 df 73 04 31 f6 eb 04 <48> 8b 77 00 49 bb 00 00 00 00 00 80 00 00 48 81 c7 7c 00 00 00 4c RSP: 0018:ffffb30c4291fcb8 EFLAGS: 00010282 RAX: 0000000000000001 RBX: 0000000000000001 RCX: 0000000000000000 RDX: 00000000cddf1af1 RSI: 000000005315a00d RDI: ffffffffffffffea RBP: ffffb30c4291fcb8 R08: ffff92e644bf38a8 R09: 0000000000000000 R10: 0000000000000000 R11: 0000800000000000 R12: ffff92e663652690 R13: 00000000000001c8 R14: 00000000000001c8 R15: 0000000000000003 bpf_trampoline_251255721842_2+0x63/0x1000 bpf_testmod_return_ptr+0x9/0xb0 [bpf_testmod] ? bpf_testmod_test_read+0x43/0x2d0 [bpf_testmod] sysfs_kf_bin_read+0x60/0x90 kernfs_fop_read_iter+0x143/0x250 vfs_read+0x240/0x2a0 ksys_read+0x70/0xe0 __x64_sys_read+0x1f/0x30 do_syscall_64+0x68/0xa0 ? syscall_exit_to_user_mode+0x77/0x1f0 ? do_syscall_64+0x77/0xa0 ? irqentry_exit+0x35/0xa0 ? sysvec_apic_timer_interrupt+0x4d/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7fb5da00a392 Code: ac 00 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb be 0f 1f 80 00 00 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:00007ffc5b3cab68 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 000055bee7b8b100 RCX: 00007fb5da00a392 RDX: 00000000000001c8 RSI: 0000000000000000 RDI: 0000000000000009 RBP: 00007ffc5b3caba0 R08: 0000000000000000 R09: 0000000000000037 R10: 000055bee7b8c2a7 R11: 0000000000000246 R12: 000055bee78f1f60 R13: 00007ffc5b3cae90 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: bpf_testmod(OE) nls_iso8859_1 dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua intel_rapl_msr intel_rapl_common intel_uncore_frequency_common ppdev nfit crct10dif_pclmul crc32_pclmul psmouse ghash_clmulni_intel sha512_ssse3 aesni_intel parport_pc crypto_simd cryptd input_leds parport rapl ena i2c_piix4 mac_hid serio_raw ramoops reed_solomon pstore_blk drm pstore_zone efi_pstore autofs4 [last unloaded: bpf_testmod(OE)] CR2: 000000000000000c Though there may be some variation, depending on which suprogram triggers the bug. Signed-off-by: Krister Johansen Acked-by: Yonghong Song Link: https://lore.kernel.org/r/4ebf95ec857cd785b81db69f3e408c039ad8408b.1686616663.git.kjlx@templeofstupid.com Signed-off-by: Alexei Starovoitov commit 0108a4e9f3584a7a2c026d1601b0682ff7335d95 Author: Krister Johansen Date: Mon Jun 12 17:44:40 2023 -0700 bpf: ensure main program has an extable When subprograms are in use, the main program is not jit'd after the subprograms because jit_subprogs sets a value for prog->bpf_func upon success. Subsequent calls to the JIT are bypassed when this value is non-NULL. This leads to a situation where the main program and its func[0] counterpart are both in the bpf kallsyms tree, but only func[0] has an extable. Extables are only created during JIT. Now there are two nearly identical program ksym entries in the tree, but only one has an extable. Depending upon how the entries are placed, there's a chance that a fault will call search_extable on the aux with the NULL entry. Since jit_subprogs already copies state from func[0] to the main program, include the extable pointer in this state duplication. Additionally, ensure that the copy of the main program in func[0] is not added to the bpf_prog_kallsyms table. Instead, let the main program get added later in bpf_prog_load(). This ensures there is only a single copy of the main program in the kallsyms table, and that its tag matches the tag observed by tooling like bpftool. Cc: stable@vger.kernel.org Fixes: 1c2a088a6626 ("bpf: x64: add JIT support for multi-function programs") Signed-off-by: Krister Johansen Acked-by: Yonghong Song Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/6de9b2f4b4724ef56efbb0339daaa66c8b68b1e7.1686616663.git.kjlx@templeofstupid.com Signed-off-by: Alexei Starovoitov commit 85041e12418fd0c08ff972b7729f7971afb361f8 Author: Janne Grunau Date: Sun Feb 12 13:16:32 2023 +0100 nios2: dts: Fix tse_mac "max-frame-size" property The given value of 1518 seems to refer to the layer 2 ethernet frame size without 802.1Q tag. Actual use of the "max-frame-size" including in the consumer of the "altr,tse-1.0" compatible is the MTU. Fixes: 95acd4c7b69c ("nios2: Device tree support") Fixes: 61c610ec61bb ("nios2: Add Max10 device tree") Cc: Signed-off-by: Janne Grunau Signed-off-by: Dinh Nguyen commit 7c5835bcb9176df94683396f1c0e5df6bf5094b3 Author: Peichen Huang Date: Wed May 31 13:36:14 2023 +0800 drm/amd/display: limit DPIA link rate to HBR3 [Why] DPIA doesn't support UHBR, driver should not enable UHBR for dp tunneling [How] limit DPIA link rate to HBR3 Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Acked-by: Stylon Wang Signed-off-by: Peichen Huang Reviewed-by: Mustapha Ghaddar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ea2062dd1f0384ae1b136d333ee4ced15bedae38 Author: Tom Chung Date: Mon May 29 18:00:09 2023 +0800 drm/amd/display: fix the system hang while disable PSR [Why] When the PSR enabled. If you try to adjust the timing parameters, it may cause system hang. Because the timing mismatch with the DMCUB settings. [How] Disable the PSR before adjusting timing parameters. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Acked-by: Stylon Wang Signed-off-by: Tom Chung Reviewed-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e749dd10e5f292061ad63d2b030194bf7d7d452c Author: Hersen Wu Date: Thu May 25 08:37:40 2023 -0400 drm/amd/display: edp do not add non-edid timings [Why] most edp support only timings from edid. applying non-edid timings, especially those timings out of edp bandwidth, may damage edp. [How] do not add non-edid timings for edp. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Acked-by: Stylon Wang Signed-off-by: Hersen Wu Reviewed-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 34e5a54327dce5033582f3609eb54812a8c61b90 Author: Arunpravin Paneer Selvam Date: Fri Jun 9 06:18:41 2023 -0700 Revert "drm/amdgpu: remove TOPDOWN flags when allocating VRAM in large bar system" This reverts commit c105518679b6e87232874ffc989ec403bee59664. This patch disables the TOPDOWN flag for APU and few dGPU cards which has the VRAM size equal to the BAR size. When we enable the TOPDOWN flag, we get the free blocks at the highest available memory region and we don't split the lower order blocks. This change is required to keep off the fragmentation related issues particularly in ASIC which has VRAM space <= 500MiB Hence, we are reverting this patch. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2270 Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 9db5ec1ceb5303398ec4f899d691073d531257c3 Author: Sonny Jiang Date: Tue Jun 6 17:18:52 2023 -0400 drm/amdgpu: vcn_4_0 set instance 0 init sched score to 1 Only vcn0 can process AV1 codecx. In order to use both vcn0 and vcn1 in h264/265 transcode to AV1 cases, set vcn0 sched score to 1 at initialization time. Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.1.x commit 7ac9be96b0113a34c33110b32912642bdc8ff33d Author: Thomas Zimmermann Date: Fri Jun 9 16:03:56 2023 +0200 drm/radeon: Disable outputs when releasing fbdev client Disable the modesetting pipeline before release the radeon's fbdev client. Fixes the following error: [ 17.217408] WARNING: CPU: 5 PID: 1464 at drivers/gpu/drm/ttm/ttm_bo.c:326 ttm_bo_release+0x27e/0x2d0 [ttm] [ 17.217418] Modules linked in: edac_mce_amd radeon(+) drm_ttm_helper ttm video drm_suballoc_helper drm_display_helper kvm irqbypass drm_kms_helper syscopyarea crc32_pclmul sysfillrect sha512_ssse3 sysimgblt sha512_generic cfbfillrect cfbimgblt wmi_bmof aesni_intel cfbcopyarea crypto_simd cryptd k10temp acpi_cpufreq wmi dm_mod [ 17.217432] CPU: 5 PID: 1464 Comm: systemd-udevd Not tainted 6.4.0-rc4+ #1 [ 17.217436] Hardware name: Micro-Star International Co., Ltd. MS-7A38/B450M PRO-VDH MAX (MS-7A38), BIOS B.G0 07/26/2022 [ 17.217438] RIP: 0010:ttm_bo_release+0x27e/0x2d0 [ttm] [ 17.217444] Code: 48 89 43 38 48 89 43 40 48 8b 5c 24 30 48 8b b5 40 08 00 00 48 8b 6c 24 38 48 83 c4 58 e9 7a 49 f7 e0 48 89 ef e9 6c fe ff ff <0f> 0b 48 83 7b 20 00 0f 84 b7 fd ff ff 0f 0b 0f 1f 00 e9 ad fd ff [ 17.217448] RSP: 0018:ffffc9000095fbb0 EFLAGS: 00010202 [ 17.217451] RAX: 0000000000000001 RBX: ffff8881052c8de0 RCX: 0000000000000000 [ 17.217453] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8881052c8de0 [ 17.217455] RBP: ffff888104a66e00 R08: ffff8881052c8de0 R09: ffff888104a7cf08 [ 17.217457] R10: ffffc9000095fbe0 R11: ffffc9000095fbe8 R12: ffff8881052c8c78 [ 17.217458] R13: ffff8881052c8c78 R14: dead000000000100 R15: ffff88810528b108 [ 17.217460] FS: 00007f319fcbb8c0(0000) GS:ffff88881a540000(0000) knlGS:0000000000000000 [ 17.217463] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 17.217464] CR2: 000055dc8b0224a0 CR3: 000000010373d000 CR4: 0000000000750ee0 [ 17.217466] PKRU: 55555554 [ 17.217468] Call Trace: [ 17.217470] [ 17.217472] ? __warn+0x97/0x160 [ 17.217476] ? ttm_bo_release+0x27e/0x2d0 [ttm] [ 17.217481] ? report_bug+0x1ec/0x200 [ 17.217487] ? handle_bug+0x3c/0x70 [ 17.217490] ? exc_invalid_op+0x1f/0x90 [ 17.217493] ? preempt_count_sub+0xb5/0x100 [ 17.217496] ? asm_exc_invalid_op+0x16/0x20 [ 17.217500] ? ttm_bo_release+0x27e/0x2d0 [ttm] [ 17.217505] ? ttm_resource_move_to_lru_tail+0x1ab/0x1d0 [ttm] [ 17.217511] radeon_bo_unref+0x1a/0x30 [radeon] [ 17.217547] radeon_gem_object_free+0x20/0x30 [radeon] [ 17.217579] radeon_fbdev_fb_destroy+0x57/0x90 [radeon] [ 17.217616] unregister_framebuffer+0x72/0x110 [ 17.217620] drm_client_dev_unregister+0x6d/0xe0 [ 17.217623] drm_dev_unregister+0x2e/0x90 [ 17.217626] drm_put_dev+0x26/0x90 [ 17.217628] pci_device_remove+0x44/0xc0 [ 17.217631] really_probe+0x257/0x340 [ 17.217635] __driver_probe_device+0x73/0x120 [ 17.217638] driver_probe_device+0x2c/0xb0 [ 17.217641] __driver_attach+0xa0/0x150 [ 17.217643] ? __pfx___driver_attach+0x10/0x10 [ 17.217646] bus_for_each_dev+0x67/0xa0 [ 17.217649] bus_add_driver+0x10e/0x210 [ 17.217651] driver_register+0x5c/0x120 [ 17.217653] ? __pfx_radeon_module_init+0x10/0x10 [radeon] [ 17.217681] do_one_initcall+0x44/0x220 [ 17.217684] ? kmalloc_trace+0x37/0xc0 [ 17.217688] do_init_module+0x64/0x240 [ 17.217691] __do_sys_finit_module+0xb2/0x100 [ 17.217694] do_syscall_64+0x3b/0x90 [ 17.217697] entry_SYSCALL_64_after_hwframe+0x72/0xdc [ 17.217700] RIP: 0033:0x7f319feaa5a9 [ 17.217702] 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 27 08 0d 00 f7 d8 64 89 01 48 [ 17.217706] RSP: 002b:00007ffc6bf3e7f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 17.217709] RAX: ffffffffffffffda RBX: 00005607204f3170 RCX: 00007f319feaa5a9 [ 17.217710] RDX: 0000000000000000 RSI: 00007f31a002eefd RDI: 0000000000000018 [ 17.217712] RBP: 00007f31a002eefd R08: 0000000000000000 R09: 00005607204f1860 [ 17.217714] R10: 0000000000000018 R11: 0000000000000246 R12: 0000000000020000 [ 17.217716] R13: 0000000000000000 R14: 0000560720522450 R15: 0000560720255899 [ 17.217718] [ 17.217719] ---[ end trace 0000000000000000 ]--- The buffer object backing the fbdev emulation got pinned twice: by the fb_probe helper radeon_fbdev_create_pinned_object() and the modesetting code when the framebuffer got displayed. It only got unpinned once by the fbdev helper radeon_fbdev_destroy_pinned_object(). Hence TTM's BO- release function complains about the pin counter. Forcing the outputs off also undoes the modesettings pin increment. Tested-by: Borislav Petkov (AMD) Reported-by: Borislav Petkov Closes: https://lore.kernel.org/dri-devel/20230603174814.GCZHt83pN+wNjf63sC@fat_crate.local/ Signed-off-by: Thomas Zimmermann Fixes: e317a69fe891 ("drm/radeon: Implement client-based fbdev emulation") Cc: Alex Deucher Cc: Thomas Zimmermann Cc: "Christian König" Cc: "Pan, Xinhui" Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Alex Deucher commit 7ca302d488f80cf4529620acc1c545f9022d8bb8 Author: Kenneth Feng Date: Thu Jun 8 22:07:11 2023 +0800 drm/amd/pm: workaround for compute workload type on some skus On smu 13.0.0, the compute workload type cannot be set on all the skus due to some other problems. This workaround is to make sure compute workload type can also run on some specific skus. v2: keep the variable consistent Signed-off-by: Kenneth Feng Acked-by: Lijo Lazar Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.1.x commit 7ab1a4913d0051cf5196ef7987b5fa42c25e13b6 Author: Mario Limonciello Date: Wed Jun 7 01:45:20 2023 -0500 drm/amd: Tighten permissions on VBIOS flashing attributes Non-root users shouldn't be able to try to trigger a VBIOS flash or query the flashing status. This should be reserved for users with the appropriate permissions. Cc: stable@vger.kernel.org Fixes: 8424f2ccb3c0 ("drm/amdgpu/psp: Add vbflash sysfs interface support") Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 3eb1a3a04056ba3df3205e169b8acc9da0c65a94 Author: Mario Limonciello Date: Wed Jun 7 01:41:22 2023 -0500 drm/amd: Make sure image is written to trigger VBIOS image update flow The VBIOS image update flow requires userspace to: 1) Write the image to `psp_vbflash` 2) Read `psp_vbflash` 3) Poll `psp_vbflash_status` to check for completion If userspace reads `psp_vbflash` before writing an image, it's possible that it causes problems that can put the dGPU into an invalid state. Explicitly check that an image has been written before letting a read succeed. Cc: stable@vger.kernel.org Fixes: 8424f2ccb3c0 ("drm/amdgpu/psp: Add vbflash sysfs interface support") Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit e61f67749b351c19455ce3085af2ae9af80023bc Author: Alex Deucher Date: Tue Jun 6 11:14:04 2023 -0400 drm/amdgpu: add missing radeon secondary PCI ID 0x5b70 is a missing RV370 secondary id. Add it so we don't try and probe it with amdgpu. Cc: michel@daenzer.net Reviewed-by: Michel Dänzer Tested-by: Michel Dänzer Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 5b711e7f9c73e5ff44d6ac865711d9a05c2a0360 Author: Jiadong Zhu Date: Thu May 25 18:42:15 2023 +0800 drm/amdgpu: Implement gfx9 patch functions for resubmission Patch the packages including CONTEXT_CONTROL and WRITE_DATA for gfx9 during the resubmission scenario. Signed-off-by: Jiadong Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.3.x commit 87af86ae89963c227a3beb4d914f3dc7959a690e Author: Jiadong Zhu Date: Thu May 25 16:52:55 2023 +0800 drm/amdgpu: Modify indirect buffer packages for resubmission When the preempted IB frame resubmitted to cp, we need to modify the frame data including: 1. set PRE_RESUME 1 in CONTEXT_CONTROL. 2. use meta data(DE and CE) read from CSA in WRITE_DATA. Add functions to save the location the first time IBs emitted and callback to patch the package when resubmission happens. Signed-off-by: Jiadong Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.3.x commit 94034b306ddde4a4a9c1a597ae7f61f04b710dc7 Author: Jiadong Zhu Date: Wed May 24 16:51:32 2023 +0800 drm/amdgpu: Program gds backup address as zero if no gds allocated It is firmware requirement to set gds_backup_addrlo and gds_backup_addrhi of DE meta both zero if no gds partition is allocated for the frame. Signed-off-by: Jiadong Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.3.x commit 55b94bb8c42464bad3d2217f6874aa1a85664eac Author: Natalia Petrova Date: Fri May 12 13:33:20 2023 +0300 drm/nouveau: add nv_encoder pointer check for NULL Pointer nv_encoder could be dereferenced at nouveau_connector.c in case it's equal to NULL by jumping to goto label. This patch adds a NULL-check to avoid it. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 3195c5f9784a ("drm/nouveau: set encoder for lvds") Signed-off-by: Natalia Petrova Reviewed-by: Lyude Paul [Fixed patch title] Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20230512103320.82234-1-n.petrova@fintech.ru commit 1dbcf770cc2d15baf8a1e8174d6fd014a68b45ca Author: Jiadong Zhu Date: Wed May 24 11:42:19 2023 +0800 drm/amdgpu: Reset CP_VMID_PREEMPT after trailing fence signaled When MEC executes unmap_queue for mid command buffer preemption, it will kick the write pointer of the gfx ring, set CP_VMID_PREEMPT to trigger the preemption and wait for CP_VMID_PREEMPT becomes zero after the preemption done. There is a race condition that PFP may excute the resetting command before MEC set CP_VMID_PREEMPT. As a result, hang happens as CP_VMID_PREEMPT is always 0xffff. To avoid this, we send resetting CP_VMID_PREEMPT command after the trailing fence is siganled and update gfx write pointer explicitly. Signed-off-by: Jiadong Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.3.x Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2535 commit 20a2ce87fbaf81e4c3dcb631d738e423959eb320 Author: Natalia Petrova Date: Fri May 12 14:15:26 2023 +0300 drm/nouveau/dp: check for NULL nv_connector->native_mode Add checking for NULL before calling nouveau_connector_detect_depth() in nouveau_connector_get_modes() function because nv_connector->native_mode could be dereferenced there since connector pointer passed to nouveau_connector_detect_depth() and the same value of nv_connector->native_mode is used there. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: d4c2c99bdc83 ("drm/nouveau/dp: remove broken display depth function, use the improved one") Signed-off-by: Natalia Petrova Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20230512111526.82408-1-n.petrova@fintech.ru commit eee43699217504ba69cadefc85c6992df555e33f Author: Abe Kohandel Date: Tue Jun 13 09:21:03 2023 -0700 spi: dw: Replace incorrect spi_get_chipselect with set Commit 445164e8c136 ("spi: dw: Replace spi->chip_select references with function calls") replaced direct access to spi.chip_select with spi_*_chipselect calls but incorrectly replaced a set instance with a get instance, replace the incorrect instance. Fixes: 445164e8c136 ("spi: dw: Replace spi->chip_select references with function calls") Signed-off-by: Abe Kohandel Reviewed-by: Andy Shevchenko Acked-by: Serge Semin Link: https://lore.kernel.org/r/20230613162103.569812-1-abe.kohandel@intel.com Signed-off-by: Mark Brown commit 95011f267c44a4d1f9ca1769e8a29ab2c559e004 Author: Su Hui Date: Thu Jun 8 09:24:43 2023 +0800 drm/bridge: ti-sn65dsi86: Avoid possible buffer overflow Smatch error:buffer overflow 'ti_sn_bridge_refclk_lut' 5 <= 5. Fixes: cea86c5bb442 ("drm/bridge: ti-sn65dsi86: Implement the pwm_chip") Signed-off-by: Su Hui Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20230608012443.839372-1-suhui@nfschina.com commit 15adb51c04ccfcf58ac3eec7464a2768fe175fcc Merge: fb054096aea05 c7753ed71c160 Author: Linus Torvalds Date: Tue Jun 13 10:27:56 2023 -0700 Merge tag 'devicetree-fixes-for-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Fix missing of_node_put() in init_overlay_changeset() - Fix schema for qcom,pmic-mpp "qcom,paired" property - Fix 'additionalProperties' in silvaco,i3c-master binding - usage-model.rst: Use documented "arm,primecell" compatible string - Update Damien Le Moal's email address - Fixes in Realtek Bluetooth binding * tag 'devicetree-fixes-for-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: pinctrl: qcom,pmic-mpp: Fix schema for "qcom,paired" dt-bindings: i3c: silvaco,i3c-master: fix missing schema restriction of: overlay: Fix missing of_node_put() in error case of init_overlay_changeset() docs: zh_CN/devicetree: sync usage-model fix docs: dt: fix documented Primecell compatible string dt-bindings: Change Damien Le Moal's contact email dt-bindings: net: realtek-bluetooth: Fix double RTL8723CS in desc dt-bindings: net: realtek-bluetooth: Fix RTL8821CS binding commit c1bcb976d8feb107ff2c12caaf12ac5e70f44d5f Author: Jiasheng Jiang Date: Tue Jun 6 11:11:59 2023 +0800 gpio: sifive: add missing check for platform_get_irq Add the missing check for platform_get_irq() and return error code if it fails. The returned error code will be dealed with in builtin_platform_driver(sifive_gpio_driver) and the driver will not be registered. Fixes: f52d6d8b43e5 ("gpio: sifive: To get gpio irq offset from device tree data") Signed-off-by: Jiasheng Jiang Signed-off-by: Bartosz Golaszewski commit 47b3ad6b7842f49d374a01b054a4b1461a621bdc Author: Christophe Kerello Date: Tue Jun 13 15:41:46 2023 +0200 mmc: mmci: stm32: fix max busy timeout calculation The way that the timeout is currently calculated could lead to a u64 timeout value in mmci_start_command(). This value is then cast in a u32 register that leads to mmc erase failed issue with some SD cards. Fixes: 8266c585f489 ("mmc: mmci: add hardware busy timeout feature") Signed-off-by: Yann Gautier Signed-off-by: Christophe Kerello Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230613134146.418016-1-yann.gautier@foss.st.com Signed-off-by: Ulf Hansson commit c7753ed71c160f75f92ff5679e9fc22526e56fc5 Author: Rob Herring Date: Tue Apr 18 10:06:06 2023 -0500 dt-bindings: pinctrl: qcom,pmic-mpp: Fix schema for "qcom,paired" The "qcom,paired" schema is all wrong. First, it's a list rather than an object(dictionary). Second, it is missing a required type. The meta-schema normally catches this, but schemas under "$defs" was not getting checked. A fix for that is pending. Fixes: f9a06b810951 ("dt-bindings: pinctrl: qcom,pmic-mpp: Convert qcom pmic mpp bindings to YAML") Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230418150606.1528107-1-robh@kernel.org Signed-off-by: Rob Herring commit 8c00914e5438e3636f26b4f814b3297ae2a1b9ee Author: Jiawen Wu Date: Wed Jun 7 16:18:03 2023 +0800 gpiolib: Fix GPIO chip IRQ initialization restriction In case of gpio-regmap, IRQ chip is added by regmap-irq and associated with GPIO chip by gpiochip_irqchip_add_domain(). The initialization flag was not added in gpiochip_irqchip_add_domain(), causing gpiochip_to_irq() to return -EPROBE_DEFER. Fixes: 5467801f1fcb ("gpio: Restrict usage of GPIO chip irq members before initialization") Signed-off-by: Jiawen Wu Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 44e46572f0bae431a6092e3cfd2f47bff8b8d18c Author: Takashi Iwai Date: Tue Jun 13 13:22:40 2023 +0200 regmap: regcache: Don't sync read-only registers regcache_maple_sync() tries to sync all cached values no matter whether it's writable or not. OTOH, regache_sync_val() does care the wrtability and returns -EIO for a read-only register. This results in an error message like: snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2f0009. -5 and the sync loop is aborted incompletely. This patch adds the writable register check to regcache_sync_val() for addressing the bug above. Note that, although we may add the check in the caller side (regcache_maple_sync()), here we put in regcache_sync_val(), so that a similar case like this can be avoided in future. Fixes: f033c26de5a5 ("regmap: Add maple tree based register cache") Link: https://lore.kernel.org/r/877cs7g6f1.wl-tiwai@suse.de Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20230613112240.3361-1-tiwai@suse.de Signed-off-by: Mark Brown commit f9fd804aa0a36f15a35ca070ec4c52650876cc29 Author: Jon Hunter Date: Tue Jun 13 10:34:53 2023 +0100 ASoC: tegra: Fix Master Volume Control Commit 3ed2b549b39f ("ALSA: pcm: fix wait_time calculations") corrected the PCM wait_time calculations and in doing so reduced the calculated wait_time. This exposed an issue with the Tegra Master Volume Control (MVC) device where the reduced wait_time caused the MVC to fail. For now fix this by setting the default wait_time for Tegra to be 500ms. Fixes: 3ed2b549b39f ("ALSA: pcm: fix wait_time calculations") Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20230613093453.13927-1-jonathanh@nvidia.com Signed-off-by: Mark Brown commit a82c3df955f8c1c726e4976527aa6ae924a67dd9 Author: Robert Hodaszi Date: Fri Jun 9 14:13:34 2023 +0200 tty: serial: fsl_lpuart: reduce RX watermark to 0 on LS1028A LS1028A is using DMA with LPUART. Having RX watermark set to 1, means DMA transactions are started only after receiving the second character. On other platforms with newer LPUART IP, Receiver Idle Empty function initiates the DMA request after the receiver is idling for 4 characters. But this feature is missing on LS1028A, which is causing a 1-character delay in the RX direction on this platform. Set RX watermark to 0 to initiate RX DMA after each character. Link: https://lore.kernel.org/linux-serial/20230607103459.1222426-1-robert.hodaszi@digi.com/ Fixes: 9ad9df844754 ("tty: serial: fsl_lpuart: Fix the wrong RXWATER setting for rx dma case") Cc: stable Signed-off-by: Robert Hodaszi Message-ID: <20230609121334.1878626-1-robert.hodaszi@digi.com> Signed-off-by: Greg Kroah-Hartman commit 11d24327c2d7ad7f24fcc44fb00e1fa91ebf6525 Author: Ratchanan Srirattanamet Date: Wed May 24 04:11:56 2023 +0700 drm/nouveau: don't detect DSM for non-NVIDIA device The call site of nouveau_dsm_pci_probe() uses single set of output variables for all invocations. So, we must not write anything to them unless it's an NVIDIA device. Otherwise, if we are called with another device after the NVIDIA device, we'll clober the result of the NVIDIA device. For example, if the other device doesn't have _PR3 resources, the detection later would miss the presence of power resource support, and the rest of the code will keep using Optimus DSM, breaking power management for that machine. Also, because we're detecting NVIDIA's DSM, it doesn't make sense to run this detection on a non-NVIDIA device anyway. Thus, check at the beginning of the detection code if this is an NVIDIA card, and just return if it isn't. This, together with commit d22915d22ded ("drm/nouveau/devinit/tu102-: wait for GFW_BOOT_PROGRESS == COMPLETED") developed independently and landed earlier, fixes runtime power management of the NVIDIA card in Lenovo Legion 5-15ARH05. Without this patch, the GPU resumption code will "timeout", sometimes hanging userspace. As a bonus, we'll also stop preventing _PR3 usage from the bridge for unrelated devices, which is always nice, I guess. Fixes: ccfc2d5cdb02 ("drm/nouveau: Use generic helper to check _PR3 presence") Signed-off-by: Ratchanan Srirattanamet Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/79 Reviewed-by: Karol Herbst Signed-off-by: Karol Herbst Link: https://patchwork.freedesktop.org/patch/msgid/DM6PR19MB2780805D4BE1E3F9B3AC96D0BC409@DM6PR19MB2780.namprd19.prod.outlook.com commit 286d9975a838d0a54da049765fa1d1fb96b89682 Author: Badhri Jagan Sridharan Date: Fri Jun 9 01:02:27 2023 +0000 usb: gadget: udc: core: Prevent soft_connect_store() race usb_udc_connect_control(), soft_connect_store() and usb_gadget_deactivate() can potentially race against each other to invoke usb_gadget_connect()/usb_gadget_disconnect(). To prevent this, guard udc->started, gadget->allow_connect, gadget->deactivate and gadget->connect with connect_lock so that ->pullup() is only invoked when the gadget is bound, started and not deactivated. The routines usb_gadget_connect_locked(), usb_gadget_disconnect_locked(), usb_udc_connect_control_locked(), usb_gadget_udc_start_locked(), usb_gadget_udc_stop_locked() are called with this lock held. An earlier version of this commit was reverted due to the crash reported in https://lore.kernel.org/all/ZF4BvgsOyoKxdPFF@francesco-nb.int.toradex.com/. commit 16737e78d190 ("usb: gadget: udc: core: Offload usb_udc_vbus_handler processing") addresses the crash reported. Cc: stable@vger.kernel.org Fixes: 628ef0d273a6 ("usb: udc: add usb_udc_vbus_handler") Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Alan Stern Message-ID: <20230609010227.978661-2-badhri@google.com> Signed-off-by: Greg Kroah-Hartman commit 50966da807c81c5eb3bdfd392990fe0bba94d1ee Author: Badhri Jagan Sridharan Date: Fri Jun 9 01:02:26 2023 +0000 usb: gadget: udc: core: Offload usb_udc_vbus_handler processing usb_udc_vbus_handler() can be invoked from interrupt context by irq handlers of the gadget drivers, however, usb_udc_connect_control() has to run in non-atomic context due to the following: a. Some of the gadget driver implementations expect the ->pullup callback to be invoked in non-atomic context. b. usb_gadget_disconnect() acquires udc_lock which is a mutex. Hence offload invocation of usb_udc_connect_control() to workqueue. UDC should not be pulled up unless gadget driver is bound. The new flag "allow_connect" is now set by gadget_bind_driver() and cleared by gadget_unbind_driver(). This prevents work item to pull up the gadget even if queued when the gadget driver is already unbound. Cc: stable@vger.kernel.org Fixes: 1016fc0c096c ("USB: gadget: Fix obscure lockdep violation for udc_mutex") Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Alan Stern Message-ID: <20230609010227.978661-1-badhri@google.com> Signed-off-by: Greg Kroah-Hartman commit 92c9c3baad6b1fd584fbabeaa4756f9b77926cb5 Author: Pavan Holla Date: Wed Jun 7 19:33:26 2023 +0000 usb: typec: Fix fast_role_swap_current show function The current implementation mistakenly performs a & operation on the output of sysfs_emit. This patch performs the & operation before calling sysfs_emit. Fixes: 662a60102c12 ("usb: typec: Separate USB Power Delivery from USB Type-C") Cc: stable Reported-by: Benson Leung Signed-off-by: Pavan Holla Reviewed-by: Heikki Krogerus Reviewed-by: Benson Leung Message-ID: <20230607193328.3359487-1-pholla@chromium.org> Signed-off-by: Greg Kroah-Hartman commit c4a8bfabefed706bb9150867db528ceefd5cb5fe Author: Heikki Krogerus Date: Tue Jun 6 14:58:02 2023 +0300 usb: typec: ucsi: Fix command cancellation The Cancel command was passed to the write callback as the offset instead of as the actual command which caused NULL pointer dereference. Reported-by: Stephan Bolten Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217517 Fixes: 094902bc6a3c ("usb: typec: ucsi: Always cancel the command if PPM reports BUSY condition") Cc: stable@vger.kernel.org Signed-off-by: Heikki Krogerus Message-ID: <20230606115802.79339-1-heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman commit e3dbb657571509044be15184a13134fa7c1fdca1 Author: Johan Hovold Date: Wed Jun 7 12:05:40 2023 +0200 USB: dwc3: fix use-after-free on core driver unbind Some dwc3 glue drivers are currently accessing the driver data of the child core device directly, which is clearly a bad idea as the child may not have probed yet or may have been unbound from its driver. As a workaround until the glue drivers have been fixed, clear the driver data pointer before allowing the glue parent device to runtime suspend to prevent its driver from accessing data that has been freed during unbind. Fixes: 6dd2565989b4 ("usb: dwc3: add imx8mp dwc3 glue layer driver") Fixes: 6895ea55c385 ("usb: dwc3: qcom: Configure wakeup interrupts during suspend") Cc: stable@vger.kernel.org # 5.12 Cc: Li Jun Cc: Sandeep Maheswaram Cc: Krishna Kurapati Signed-off-by: Johan Hovold Acked-by: Thinh Nguyen Reviewed-by: Manivannan Sadhasivam Message-ID: <20230607100540.31045-3-johan+linaro@kernel.org> Signed-off-by: Greg Kroah-Hartman commit d2d69354226de0b333d4405981f3d9c41ba8430a Author: Johan Hovold Date: Wed Jun 7 12:05:39 2023 +0200 USB: dwc3: qcom: fix NULL-deref on suspend The Qualcomm dwc3 glue driver is currently accessing the driver data of the child core device during suspend and on wakeup interrupts. This is clearly a bad idea as the child may not have probed yet or could have been unbound from its driver. The first such layering violation was part of the initial version of the driver, but this was later made worse when the hack that accesses the driver data of the grand child xhci device to configure the wakeup interrupts was added. Fixing this properly is not that easily done, so add a sanity check to make sure that the child driver data is non-NULL before dereferencing it for now. Note that this relies on subtleties like the fact that driver core is making sure that the parent is not suspended while the child is probing. Reported-by: Manivannan Sadhasivam Link: https://lore.kernel.org/all/20230325165217.31069-4-manivannan.sadhasivam@linaro.org/ Fixes: d9152161b4bf ("usb: dwc3: Add Qualcomm DWC3 glue layer driver") Fixes: 6895ea55c385 ("usb: dwc3: qcom: Configure wakeup interrupts during suspend") Cc: stable@vger.kernel.org # 3.18: a872ab303d5d: "usb: dwc3: qcom: fix use-after-free on runtime-PM wakeup" Cc: Sandeep Maheswaram Cc: Krishna Kurapati Signed-off-by: Johan Hovold Acked-by: Thinh Nguyen Reviewed-by: Manivannan Sadhasivam Message-ID: <20230607100540.31045-2-johan+linaro@kernel.org> Signed-off-by: Greg Kroah-Hartman commit 00f8205ffcf112dcef14f8151d78075d38d22c08 Author: Elson Roy Serrao Date: Thu Jun 1 14:27:30 2023 -0700 usb: dwc3: gadget: Reset num TRBs before giving back the request Consider a scenario where cable disconnect happens when there is an active usb reqest queued to the UDC. As part of the disconnect we would issue an end transfer with no interrupt-on-completion before giving back this request. Since we are giving back the request without skipping TRBs the num_trbs field of dwc3_request still holds the stale value previously used. Function drivers re-use same request for a given bind-unbind session and hence their dwc3_request context gets preserved across cable disconnect/connect. When such a request gets re-queued after cable connect, we would increase the num_trbs field on top of the previous stale value thus incorrectly representing the number of TRBs used. Fix this by resetting num_trbs field before giving back the request. Fixes: 09fe1f8d7e2f ("usb: dwc3: gadget: track number of TRBs per request") Cc: stable Signed-off-by: Elson Roy Serrao Acked-by: Thinh Nguyen Message-ID: <1685654850-8468-1-git-send-email-quic_eserrao@quicinc.com> Signed-off-by: Greg Kroah-Hartman commit 3e6ac852fbc71a234de24b5455086f6b98d3d958 Author: Biju Das Date: Tue May 30 17:17:20 2023 +0100 usb: gadget: udc: renesas_usb3: Fix RZ/V2M {modprobe,bind} error Currently {modprobe, bind} after {rmmod, unbind} results in probe failure. genirq: Flags mismatch irq 22. 00000004 (85070400.usb3drd) vs. 00000004 (85070400.usb3drd) renesas_usb3: probe of 85070000.usb3peri failed with error -16 The reason is, it is trying to register an interrupt handler for the same IRQ twice. The devm_request_irq() was called with the parent device. So the interrupt handler won't be unregistered when the usb3-peri device is unbound. Fix this issue by replacing "parent dev"->"dev" as the irq resource is managed by this driver. Fixes: 9cad72dfc556 ("usb: gadget: Add support for RZ/V2M USB3DRD driver") Cc: stable Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Message-ID: <20230530161720.179927-1-biju.das.jz@bp.renesas.com> Signed-off-by: Greg Kroah-Hartman commit 2a809ddca08d0d1b9ac961815ce04305814e179b Author: Binbin Zhou Date: Wed May 24 09:49:24 2023 +0800 clk: clk-loongson2: Zero init clk_init_data As clk_core_populate_parent_map() checks clk_init_data.num_parents first, and checks clk_init_data.parent_names[] before clk_init_data.parent_data[] and clk_init_data.parent_hws[]. Therefore the clk_init_data structure needs to be explicitly initialised to prevent an unexpected crash if clk_init_data.parent_names[] is a random value. CPU 0 Unable to handle kernel paging request at virtual address 0000000000000dc0, era == 9000000002986290, ra == 900000000298624c Oops[#1]: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.4.0-rc2+ #4582 pc 9000000002986290 ra 900000000298624c tp 9000000100094000 sp 9000000100097a60 a0 9000000104541e00 a1 0000000000000000 a2 0000000000000dc0 a3 0000000000000001 a4 90000001000979f0 a5 90000001800977d7 a6 0000000000000000 a7 900000000362a000 t0 90000000034f3548 t1 6f8c2a9cb5ab5f64 t2 0000000000011340 t3 90000000031cf5b0 t4 0000000000000dc0 t5 0000000000000004 t6 0000000000011300 t7 9000000104541e40 t8 000000000005a4f8 u0 9000000104541e00 s9 9000000104541e00 s0 9000000104bc4700 s1 9000000104541da8 s2 0000000000000001 s3 900000000356f9d8 s4 ffffffffffffffff s5 0000000000000000 s6 0000000000000dc0 s7 90000000030d0a88 s8 0000000000000000 ra: 900000000298624c __clk_register+0x228/0x84c ERA: 9000000002986290 __clk_register+0x26c/0x84c CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE) PRMD: 00000004 (PPLV0 +PIE -PWE) EUEN: 00000000 (-FPE -SXE -ASXE -BTE) ECFG: 00071c1c (LIE=2-4,10-12 VS=7) ESTAT: 00010000 [PIL] (IS= ECode=1 EsubCode=0) BADV: 0000000000000dc0 PRID: 0014a000 (Loongson-64bit, ) Modules linked in: Process swapper/0 (pid: 1, threadinfo=(____ptrval____), task=(____ptrval____)) Stack : 90000000031c1810 90000000030d0a88 900000000325bac0 90000000034f3548 90000001002ab410 9000000104541e00 0000000000000dc0 9000000003150098 90000000031c1810 90000000031a0460 900000000362a000 90000001002ab410 900000000362a000 9000000104541da8 9000000104541de8 90000001002ab410 900000000362a000 9000000002986a68 90000000034f3ed8 90000000030d0aa8 9000000104541da8 900000000298d3b8 90000000031c1810 0000000000000000 90000000034f3ed8 90000000030d0aa8 0000000000000dc0 90000000030d0a88 90000001002ab410 900000000298d401 0000000000000000 6f8c2a9cb5ab5f64 90000000034f4000 90000000030d0a88 9000000003a48a58 90000001002ab410 9000000104bd81a8 900000000298d484 9000000100020260 0000000000000000 ... Call Trace: [<9000000002986290>] __clk_register+0x26c/0x84c [<9000000002986a68>] devm_clk_hw_register+0x5c/0xe0 [<900000000298d3b8>] loongson2_clk_register.constprop.0+0xdc/0x10c [<900000000298d484>] loongson2_clk_probe+0x9c/0x4ac [<9000000002a4eba4>] platform_probe+0x68/0xc8 [<9000000002a4bf80>] really_probe+0xbc/0x2f0 [<9000000002a4c23c>] __driver_probe_device+0x88/0x128 [<9000000002a4c318>] driver_probe_device+0x3c/0x11c [<9000000002a4c5dc>] __driver_attach+0x98/0x18c [<9000000002a49ca0>] bus_for_each_dev+0x80/0xe0 [<9000000002a4b0dc>] bus_add_driver+0xfc/0x1ec [<9000000002a4d4a8>] driver_register+0x68/0x134 [<90000000020f0110>] do_one_initcall+0x50/0x188 [<9000000003150f00>] kernel_init_freeable+0x224/0x294 [<90000000030240fc>] kernel_init+0x20/0x110 [<90000000020f1568>] ret_from_kernel_thread+0xc/0xa4 Fixes: acc0ccffec50 ("clk: clk-loongson2: add clock controller driver support") Cc: stable@vger.kernel.org Cc: Yinbo Zhu Signed-off-by: Binbin Zhou Link: https://lore.kernel.org/r/20230524014924.2869051-1-zhoubinbin@loongson.cn Signed-off-by: Stephen Boyd commit a1043fbc8f99c7df2d70993eecad3baee07dc180 Author: Markus Schneider-Pargmann Date: Thu May 11 15:32:26 2023 +0200 clk: mediatek: mt8365: Fix inverted topclk operations The given operations are inverted for the wrong registers which makes multiple of the mt8365 hardware units unusable. In my setup at least usb did not work. Fixed by swapping the operations with the inverted ones. Reported-by: Alexandre Mergnat Fixes: 905b7430d3cc ("clk: mediatek: mt8365: Convert simple_gate to mtk_gate clocks") Signed-off-by: Markus Schneider-Pargmann Link: https://lore.kernel.org/r/20230511133226.913600-1-msp@baylibre.com Tested-by: Alexandre Mergnat Reviewed-by: Alexandre Mergnat Reviewed-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Stephen Boyd commit d54fb4b25a0261bf2f2bb7093fdf11a36718bf25 Author: Sebastian Reichel Date: Fri May 26 19:10:56 2023 +0200 clk: composite: Fix handling of high clock rates ULONG_MAX is used by a few drivers to figure out the highest available clock rate via clk_round_rate(clk, ULONG_MAX). Since abs() takes a signed value as input, the current logic effectively calculates with ULONG_MAX = -1, which results in the worst parent clock being chosen instead of the best one. For example on Rockchip RK3588 the eMMC driver tries to figure out the highest available clock rate. There are three parent clocks available resulting in the following rate diffs with the existing logic: GPLL: abs(18446744073709551615 - 1188000000) = 1188000001 CPLL: abs(18446744073709551615 - 1500000000) = 1500000001 XIN24M: abs(18446744073709551615 - 24000000) = 24000001 As a result the clock framework will promote a maximum supported clock rate of 24 MHz, even though 1.5GHz are possible. With the updated logic any casting between signed and unsigned is avoided and the numbers look like this instead: GPLL: 18446744073709551615 - 1188000000 = 18446744072521551615 CPLL: 18446744073709551615 - 1500000000 = 18446744072209551615 XIN24M: 18446744073709551615 - 24000000 = 18446744073685551615 As a result the parent with the highest acceptable rate is chosen instead of the parent clock with the lowest one. Cc: stable@vger.kernel.org Fixes: 49502408007b ("mmc: sdhci-of-dwcmshc: properly determine max clock on Rockchip") Tested-by: Christopher Obbard Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20230526171057.66876-2-sebastian.reichel@collabora.com Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Stephen Boyd commit fbf6f482b65da72744b4a82be412e53a94fd7c9c Merge: 4d17beb66b918 6673851be0fc1 Author: Jakub Kicinski Date: Mon Jun 12 16:55:45 2023 -0700 Merge branch 'mptcp-fixes' Matthieu Baerts says: ==================== selftests: mptcp: skip tests not supported by old kernels (part 3) After a few years of increasing test coverage in the MPTCP selftests, we realised [1] the last version of the selftests is supposed to run on old kernels without issues. Supporting older versions is not that easy for this MPTCP case: these selftests are often validating the internals by checking packets that are exchanged, when some MIB counters are incremented after some actions, how connections are getting opened and closed in some cases, etc. In other words, it is not limited to the socket interface between the userspace and the kernelspace. In addition to that, the current MPTCP selftests run a lot of different sub-tests but the TAP13 protocol used in the selftests don't support sub-tests: one failure in sub-tests implies that the whole selftest is seen as failed at the end because sub-tests are not tracked. It is then important to skip sub-tests not supported by old kernels. To minimise the modifications and reduce the complexity to support old versions, the idea is to look at external signs and skip the whole selftest or just some sub-tests before starting them. This cannot be applied in all cases. Similar to the second part, this third one focuses on marking different sub-tests as skipped if some MPTCP features are not supported. This time, only in "mptcp_join.sh" selftest, the remaining one, is modified. Several techniques are used here to achieve this task: - Before starting some tests: - Check if a file (sysctl knob) is present: that's what patch 12/17 is doing for the userspace PM feature. - Check if a required kernel symbol is present in /proc/kallsyms: patches 9, 10, 14 and 15/17 are using this technique. - Check if it is possible to setup a particular network environment requiring Netfilter or TC: if the preparation step fail, the linked sub-test is marked as skipped. Patch 5/17 is doing that. - Check if a MIB counter is available: patches 7 and 13/17 do that. - Check if the kernel version is newer than a specific one: patch 1/17 adds some helpers in mptcp_lib.sh to ease its use. That's not ideal and it is only used as last resort but as mentioned above, it is important to skip tests if they are not supported not to have the whole selftest always being marked as failed on old kernels. Patches 11 and 17/17 are checking the kernel version. An alternative would be to ignore the results for some sub-tests but that's not ideal too. Note that SELFTESTS_MPTCP_LIB_NO_KVERSION_CHECK env var can be set to 1 not to skip these tests if the running kernel doesn't have a supported version. - After having launched the tests: - Adapt the expectations depending on the presence of a kernel symbol (patch 6/17) or a kernel version (patch 8/17). - Check is a MIB counter is available and skip the verification if not. Patch 4/17 is using this technique. Before skipping tests, SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES env var value is checked: if it is set to 1, the test is marked as "failed" instead of "skipped". MPTCP public CI expects to have all features supported and it sets this env var to 1 to catch regressions in these new checks. Patch 2/17 uses 'iptables-legacy' if available because it might be needed when using an older kernel not supporting iptables-nft. Patch 3/17 adds some helpers used in the other patches mentioned to easily mark sub-tests as skipped. Patch 16/17 uniforms MPTCP Join "listener" tests: it was imported code from userspace_pm.sh but without using the "code style" and ways of using tools and printing messages from MPTCP Join selftest. Link: https://lore.kernel.org/stable/CA+G9fYtDGpgT4dckXD-y-N92nqUxuvue_7AtDdBcHrbOMsDZLg@mail.gmail.com/ [1] Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 ==================== Link: https://lore.kernel.org/r/20230609-upstream-net-20230610-mptcp-selftests-support-old-kernels-part-3-v1-0-2896fe2ee8a3@tessares.net Signed-off-by: Jakub Kicinski commit 6673851be0fc1bfc3353ffb52ff26ae5468f12c9 Author: Matthieu Baerts Date: Sat Jun 10 18:11:52 2023 +0200 selftests: mptcp: join: skip mixed tests if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the support of a mix of subflows in v4 and v6 by the in-kernel PM introduced by commit b9d69db87fb7 ("mptcp: let the in-kernel PM use mixed IPv4 and IPv6 addresses"). It looks like there is no external sign we can use to predict the expected behaviour. Instead of accepting different behaviours and thus not really checking for the expected behaviour, we are looking here for a specific kernel version. That's not ideal but it looks better than removing the test because it cannot support older kernel versions. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: ad3493746ebe ("selftests: mptcp: add test-cases for mixed v4/v6 subflows") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 96b84195df61d374d8028cf426a115ae085031ec Author: Matthieu Baerts Date: Sat Jun 10 18:11:51 2023 +0200 selftests: mptcp: join: uniform listener tests The alignment was different from the other tests because tabs were used instead of spaces. While at it, also use 'echo' instead of 'printf' to print the result to keep the same style as done in the other sub-tests. And, even if it should be better with, also remove 'stdbuf' and sed's '--unbuffered' option because they are not used in the other subtests and they are not available when using a minimal environment with busybox. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 178d023208eb ("selftests: mptcp: listener test for in-kernel PM") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 0471bb479af03874b09350fcfe51d3743a5608de Author: Matthieu Baerts Date: Sat Jun 10 18:11:50 2023 +0200 selftests: mptcp: join: skip PM listener tests if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the support of PM listener events introduced by commit f8c9dfbd875b ("mptcp: add pm listener events"). It is possible to look for "mptcp_event_pm_listener" in kallsyms to know in advance if the kernel supports this feature. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 178d023208eb ("selftests: mptcp: listener test for in-kernel PM") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 632978f0a961b4591a05ba9e39eab24541d83e84 Author: Matthieu Baerts Date: Sat Jun 10 18:11:49 2023 +0200 selftests: mptcp: join: skip MPC backups tests if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the support of sending an MP_PRIO signal for the initial subflow, introduced by commit c157bbe776b7 ("mptcp: allow the in kernel PM to set MPC subflow priority"). It is possible to look for "mptcp_subflow_send_ack" in kallsyms because it was needed to introduce the mentioned feature. So we can know in advance if the feature is supported instead of trying and accepting any results. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 914f6a59b10f ("selftests: mptcp: add MPC backup tests") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit ff8897b5189495b47895ca247b860a29dc04b36b Author: Matthieu Baerts Date: Sat Jun 10 18:11:48 2023 +0200 selftests: mptcp: join: skip fail tests if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the support of the MP_FAIL / infinite mapping introduced by commit 1e39e5a32ad7 ("mptcp: infinite mapping sending") and the following ones. It is possible to look for one of the infinite mapping counters to know in advance if the this feature is available. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: b6e074e171bc ("selftests: mptcp: add infinite map testcase") Cc: stable@vger.kernel.org Fixes: 2ba18161d407 ("selftests: mptcp: add MP_FAIL reset testcase") Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit f2b492b04a167261e1c38eb76f78fb4294473a49 Author: Matthieu Baerts Date: Sat Jun 10 18:11:47 2023 +0200 selftests: mptcp: join: skip userspace PM tests if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the support of the userspace PM introduced by commit 4638de5aefe5 ("mptcp: handle local addrs announced by userspace PMs") and the following ones. It is possible to look for the MPTCP pm_type's sysctl knob to know in advance if the userspace PM is available. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 5ac1d2d63451 ("selftests: mptcp: Add tests for userspace PM type") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 9db34c4294af9999edc773d96744e2d2d4eb5060 Author: Matthieu Baerts Date: Sat Jun 10 18:11:46 2023 +0200 selftests: mptcp: join: skip fullmesh flag tests if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the support of the fullmesh flag for the in-kernel PM introduced by commit 2843ff6f36db ("mptcp: remote addresses fullmesh") and commit 1a0d6136c5f0 ("mptcp: local addresses fullmesh"). It looks like there is no easy external sign we can use to predict the expected behaviour. We could add the flag and then check if it has been added but for that, and for each fullmesh test, we would need to setup a new environment, do the checks, clean it and then only start the test from yet another clean environment. To keep it simple and avoid introducing new issues, we look for a specific kernel version. That's not ideal but an acceptable solution for this case. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 6a0653b96f5d ("selftests: mptcp: add fullmesh setting tests") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 07216a3c5d926bf1b6b360a0073747228a1f9b7f Author: Matthieu Baerts Date: Sat Jun 10 18:11:45 2023 +0200 selftests: mptcp: join: skip backup if set flag on ID not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. Commit bccefb762439 ("selftests: mptcp: simplify pm_nl_change_endpoint") has simplified the way the backup flag is set on an endpoint. Instead of doing: ./pm_nl_ctl set 10.0.2.1 flags backup Now we do: ./pm_nl_ctl set id 1 flags backup The new way is easier to maintain but it is also incompatible with older kernels not supporting the implicit endpoints putting in place the infrastructure to set flags per ID, hence the second Fixes tag. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: bccefb762439 ("selftests: mptcp: simplify pm_nl_change_endpoint") Cc: stable@vger.kernel.org Fixes: 4cf86ae84c71 ("mptcp: strict local address ID selection") Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 36c4127ae8dd0ebac6d56d8a1b272dd483471c40 Author: Matthieu Baerts Date: Sat Jun 10 18:11:44 2023 +0200 selftests: mptcp: join: skip implicit tests if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the support of the implicit endpoints introduced by commit d045b9eb95a9 ("mptcp: introduce implicit endpoints"). It is possible to look for "mptcp_subflow_send_ack" in kallsyms because it was needed to introduce the mentioned feature. So we can know in advance if the feature is supported instead of trying and accepting any results. Note that here and in the following commits, we re-do the same check for each sub-test of the same function for a few reasons. The main one is not to break the ID assign to each test in order to be able to easily compare results between different kernel versions. Also, we can still run a specific test even if it is skipped. Another reason is that it makes it clear during the review that a specific subtest will be skipped or not under certain conditions. At the end, it looks OK to call the exact same helper multiple times: it is not a critical path and it is the same code that is executed, not really more cases to maintain. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 69c6ce7b6eca ("selftests: mptcp: add implicit endpoint test case") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 425ba803124b90cb9124d99f13b372a89dc151d9 Author: Matthieu Baerts Date: Sat Jun 10 18:11:43 2023 +0200 selftests: mptcp: join: support RM_ADDR for used endpoints or not Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. At some points, a new feature caused internal behaviour changes we are verifying in the selftests, see the Fixes tag below. It was not a UAPI change but because in these selftests, we check some internal behaviours, it is normal we have to adapt them from time to time after having added some features. It looks like there is no external sign we can use to predict the expected behaviour. Instead of accepting different behaviours and thus not really checking for the expected behaviour, we are looking here for a specific kernel version. That's not ideal but it looks better than removing the test because it cannot support older kernel versions. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 6fa0174a7c86 ("mptcp: more careful RM_ADDR generation") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit ae947bb2c253ff5f395bb70cb9db8700543bf398 Author: Matthieu Baerts Date: Sat Jun 10 18:11:42 2023 +0200 selftests: mptcp: join: skip Fastclose tests if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the support of MP_FASTCLOSE introduced in commit f284c0c77321 ("mptcp: implement fastclose xmit path"). If the MIB counter is not available, the test cannot be verified and the behaviour will not be the expected one. So we can skip the test if the counter is missing. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 01542c9bf9ab ("selftests: mptcp: add fastclose testcase") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit d4c81bbb8600257fd3076d0196cb08bd2e5bdf24 Author: Matthieu Baerts Date: Sat Jun 10 18:11:41 2023 +0200 selftests: mptcp: join: support local endpoint being tracked or not Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. At some points, a new feature caused internal behaviour changes we are verifying in the selftests, see the Fixes tag below. It was not a uAPI change but because in these selftests, we check some internal behaviours, it is normal we have to adapt them from time to time after having added some features. It is possible to look for "mptcp_pm_subflow_check_next" in kallsyms because it was needed to introduce the mentioned feature. So we can know in advance what the behaviour we are expecting here instead of supporting the two behaviours. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 86e39e04482b ("mptcp: keep track of local endpoint still available for each msk") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 4a0b866a3f7d3c22033f40e93e94befc6fe51bce Author: Matthieu Baerts Date: Sat Jun 10 18:11:40 2023 +0200 selftests: mptcp: join: skip test if iptables/tc cmds fail Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. Some tests are using IPTables and/or TC commands to force some behaviours. If one of these commands fails -- likely because some features are not available due to missing kernel config -- we should intercept the error and skip the tests requiring these features. Note that if we expect to have these features available and if SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES env var is set to 1, the tests will be marked as failed instead of skipped. This patch also replaces the 'exit 1' by 'return 1' not to stop the selftest in the middle without the conclusion if there is an issue with NF or TC. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 8d014eaa9254 ("selftests: mptcp: add ADD_ADDR timeout test case") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 47867f0a7e831e24e5eab3330667ce9682d50fb1 Author: Matthieu Baerts Date: Sat Jun 10 18:11:39 2023 +0200 selftests: mptcp: join: skip check if MIB counter not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the MPTCP MIB counters introduced in commit fc518953bc9c ("mptcp: add and use MIB counter infrastructure") and more later. The MPTCP Join selftest heavily relies on these counters. If a counter is not supported by the kernel, it is not displayed when using 'nstat -z'. We can then detect that and skip the verification. A new helper (get_counter()) has been added to do the required checks and return an error if the counter is not available. Note that if we expect to have these features available and if SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES env var is set to 1, the tests will be marked as failed instead of skipped. This new helper also makes sure we get the exact counter we want to avoid issues we had in the past, e.g. with MPTcpExtRmAddr and MPTcpExtRmAddrDrop sharing the same prefix. While at it, we uniform the way we fetch a MIB counter. Note for the backports: we rarely change these modified blocks so if there is are conflicts, it is very likely because a counter is not used in the older kernels and we don't need that chunk. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: b08fbf241064 ("selftests: add test-cases for MPTCP MP_JOIN") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit cdb50525345cf5a8359ee391032ef606a7826f08 Author: Matthieu Baerts Date: Sat Jun 10 18:11:38 2023 +0200 selftests: mptcp: join: helpers to skip tests Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. Here are some helpers that will be used to mark subtests as skipped if a feature is not supported. Marking as a fix for the commit introducing this selftest to help with the backports. While at it, also check if kallsyms feature is available as it will also be used in the following commits to check if MPTCP features are available before starting a test. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: b08fbf241064 ("selftests: add test-cases for MPTCP MP_JOIN") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 0c4cd3f86a40028845ad6f8af5b37165666404cd Author: Matthieu Baerts Date: Sat Jun 10 18:11:37 2023 +0200 selftests: mptcp: join: use 'iptables-legacy' if available IPTables commands using 'iptables-nft' fail on old kernels, at least 5.15 because it doesn't see the default IPTables chains: $ iptables -L iptables/1.8.2 Failed to initialize nft: Protocol not supported As a first step before switching to NFTables, we can use iptables-legacy if available. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 8d014eaa9254 ("selftests: mptcp: add ADD_ADDR timeout test case") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit b1a6a38ab8a633546cefae890da842f19e006c74 Author: Matthieu Baerts Date: Sat Jun 10 18:11:36 2023 +0200 selftests: mptcp: lib: skip if not below kernel version Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. A new function is now available to easily detect if a feature is missing by looking at the kernel version. That's clearly not ideal and this kind of check should be avoided as soon as possible. But sometimes, there are no external sign that a "feature" is available or not: internal behaviours can change without modifying the uAPI and these selftests are verifying the internal behaviours. Sometimes, the only (easy) way to verify if the feature is present is to run the test but then the validation cannot determine if there is a failure with the feature or if the feature is missing. Then it looks better to check the kernel version instead of having tests that can never fail. In any case, we need a solution not to have a whole selftest being marked as failed just because one sub-test has failed. Note that this env var car be set to 1 not to do such check and run the linked sub-test: SELFTESTS_MPTCP_LIB_NO_KVERSION_CHECK. This new helper is going to be used in the following commits. In order to ease the backport of such future patches, it would be good if this patch is backported up to the introduction of MPTCP selftests, hence the Fixes tag below: this type of check was supposed to be done from the beginning. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 048d19d444be ("mptcp: add basic kselftest for mptcp") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 4d17beb66b918c01e9ff5e2d623218889aa02295 Merge: 75e6def3b2673 923454c0368b8 Author: Jakub Kicinski Date: Mon Jun 12 16:51:22 2023 -0700 Merge branch 'fixes-for-q-usgmii-speeds-and-autoneg' Maxime Chevallier says: ==================== fixes for Q-USGMII speeds and autoneg This is the second version of a small changeset for QUSGMII support, fixing inconsistencies in reported max speed and control word parsing. As reported here [1], there are some inconsistencies for the Q-USGMII mode speeds and configuration. The first patch in this fixup series makes so that we correctly report the max speed of 1Gbps for this mode. The second patch uses a dedicated helper to decode the control word. This is necessary as although USGMII control words are close to USXGMII, they don't support the same speeds. [1] : https://lore.kernel.org/netdev/ZHnd+6FUO77XFJvQ@shell.armlinux.org.uk/ ==================== Link: https://lore.kernel.org/r/20230609080305.546028-1-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski commit 923454c0368b8092e9d05c020f50abca577e7290 Author: Maxime Chevallier Date: Fri Jun 9 10:03:05 2023 +0200 net: phylink: use a dedicated helper to parse usgmii control word Q-USGMII is a derivative of USGMII, that uses a specific formatting for the control word. The layout is close to the USXGMII control word, but doesn't support speeds over 1Gbps. Use a dedicated decoding logic for the USGMII control word, re-using USXGMII definitions but only considering 10/100/1000Mbps speeds Fixes: 5e61fe157a27 ("net: phy: Introduce QUSGMII PHY mode") Signed-off-by: Maxime Chevallier Reviewed-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski commit b9dc1046edfeb7d9dbc2272c8d9ad5a8c47f3199 Author: Maxime Chevallier Date: Fri Jun 9 10:03:04 2023 +0200 net: phylink: report correct max speed for QUSGMII Q-USGMII is the quad port version of USGMII, and supports a max speed of 1Gbps on each line. Make so that phylink_interface_max_speed() reports this information correctly. Fixes: ae0e4bb2a0e0 ("net: phylink: Adjust link settings based on rate matching") Signed-off-by: Maxime Chevallier Reviewed-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski commit 745806fb4554f334e6406fa82b328562aa48f08f Author: Qu Wenruo Date: Sun Jun 11 08:09:13 2023 +0800 btrfs: do not ASSERT() on duplicated global roots [BUG] Syzbot reports a reproducible ASSERT() when using rescue=usebackuproot mount option on a corrupted fs. The full report can be found here: https://syzkaller.appspot.com/bug?extid=c4614eae20a166c25bf0 BTRFS error (device loop0: state C): failed to load root csum assertion failed: !tmp, in fs/btrfs/disk-io.c:1103 ------------[ cut here ]------------ kernel BUG at fs/btrfs/ctree.h:3664! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 3608 Comm: syz-executor356 Not tainted 6.0.0-rc7-syzkaller-00029-g3800a713b607 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 RIP: 0010:assertfail+0x1a/0x1c fs/btrfs/ctree.h:3663 RSP: 0018:ffffc90003aaf250 EFLAGS: 00010246 RAX: 0000000000000032 RBX: 0000000000000000 RCX: f21c13f886638400 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: ffff888021c640a0 R08: ffffffff816bd38d R09: ffffed10173667f1 R10: ffffed10173667f1 R11: 1ffff110173667f0 R12: dffffc0000000000 R13: ffff8880229c21f7 R14: ffff888021c64060 R15: ffff8880226c0000 FS: 0000555556a73300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055a2637d7a00 CR3: 00000000709c4000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_global_root_insert+0x1a7/0x1b0 fs/btrfs/disk-io.c:1103 load_global_roots_objectid+0x482/0x8c0 fs/btrfs/disk-io.c:2467 load_global_roots fs/btrfs/disk-io.c:2501 [inline] btrfs_read_roots fs/btrfs/disk-io.c:2528 [inline] init_tree_roots+0xccb/0x203c fs/btrfs/disk-io.c:2939 open_ctree+0x1e53/0x33df fs/btrfs/disk-io.c:3574 btrfs_fill_super+0x1c6/0x2d0 fs/btrfs/super.c:1456 btrfs_mount_root+0x885/0x9a0 fs/btrfs/super.c:1824 legacy_get_tree+0xea/0x180 fs/fs_context.c:610 vfs_get_tree+0x88/0x270 fs/super.c:1530 fc_mount fs/namespace.c:1043 [inline] vfs_kern_mount+0xc9/0x160 fs/namespace.c:1073 btrfs_mount+0x3d3/0xbb0 fs/btrfs/super.c:1884 [CAUSE] Since the introduction of global roots, we handle csum/extent/free-space-tree roots as global roots, even if no extent-tree-v2 feature is enabled. So for regular csum/extent/fst roots, we load them into fs_info::global_root_tree rb tree. And we should not expect any conflicts in that rb tree, thus we have an ASSERT() inside btrfs_global_root_insert(). But rescue=usebackuproot can break the assumption, as we will try to load those trees again and again as long as we have bad roots and have backup roots slot remaining. So in that case we can have conflicting roots in the rb tree, and triggering the ASSERT() crash. [FIX] We can safely remove that ASSERT(), as the caller will properly put the offending root. To make further debugging easier, also add two explicit error messages: - Error message for conflicting global roots - Error message when using backup roots slot Reported-by: syzbot+a694851c6ab28cbcfb9c@syzkaller.appspotmail.com Fixes: abed4aaae4f7 ("btrfs: track the csum, extent, and free space trees in a rb tree") CC: stable@vger.kernel.org # 6.1+ Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit fb054096aea0576f0c0a61c598e5e9676443ee86 Merge: fd37b884003c7 0bdf0efa180a9 Author: Linus Torvalds Date: Mon Jun 12 16:14:34 2023 -0700 Merge tag 'mm-hotfixes-stable-2023-06-12-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "19 hotfixes. 14 are cc:stable and the remainder address issues which were introduced during this development cycle or which were considered inappropriate for a backport" * tag 'mm-hotfixes-stable-2023-06-12-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: zswap: do not shrink if cgroup may not zswap page cache: fix page_cache_next/prev_miss off by one ocfs2: check new file size on fallocate call mailmap: add entry for John Keeping mm/damon/core: fix divide error in damon_nr_accesses_to_accesses_bp() epoll: ep_autoremove_wake_function should use list_del_init_careful mm/gup_test: fix ioctl fail for compat task nilfs2: reject devices with insufficient block count ocfs2: fix use-after-free when unmounting read-only filesystem lib/test_vmalloc.c: avoid garbage in page array nilfs2: fix possible out-of-bounds segment allocation in resize ioctl riscv/purgatory: remove PGO flags powerpc/purgatory: remove PGO flags x86/purgatory: remove PGO flags kexec: support purgatories with .text.hot sections mm/uffd: allow vma to merge as much as possible mm/uffd: fix vma operation where start addr cuts part of vma radix-tree: move declarations to header nilfs2: fix incomplete buffer cleanup in nilfs_btnode_abort_change_key() commit deccae40e4b30f98837e44225194d80c8baf2233 Author: Chris Mason Date: Fri Jun 9 10:53:41 2023 -0700 btrfs: can_nocow_file_extent should pass down args->strict from callers Commit 619104ba453ad0 ("btrfs: move common NOCOW checks against a file extent into a helper") changed our call to btrfs_cross_ref_exist() to always pass false for the 'strict' parameter. We're passing this down through the stack so that we can do a full check for cross references during swapfile activation. With strict always false, this test fails: btrfs subvol create swappy chattr +C swappy fallocate -l1G swappy/swapfile chmod 600 swappy/swapfile mkswap swappy/swapfile btrfs subvol snap swappy swapsnap btrfs subvol del -C swapsnap btrfs fi sync / sync;sync;sync swapon swappy/swapfile The fix is to just use args->strict, and everyone except swapfile activation is passing false. Fixes: 619104ba453ad0 ("btrfs: move common NOCOW checks against a file extent into a helper") CC: stable@vger.kernel.org # 6.1+ Reviewed-by: Filipe Manana Signed-off-by: Chris Mason Signed-off-by: David Sterba commit 7833b865953c8e62abc76a3261c04132b2fb69de Author: Christoph Hellwig Date: Thu Jun 8 11:10:25 2023 +0200 btrfs: fix iomap_begin length for nocow writes can_nocow_extent can reduce the len passed in, which needs to be propagated to btrfs_dio_iomap_begin so that iomap does not submit more data then is mapped. This problems exists since the btrfs_get_blocks_direct helper was added in commit c5794e51784a ("btrfs: Factor out write portion of btrfs_get_blocks_direct"), but the ordered_extent splitting added in commit b73a6fd1b1ef ("btrfs: split partial dio bios before submit") added a WARN_ON that made a syzkaller test fail. Reported-by: syzbot+ee90502d5c8fd1d0dd93@syzkaller.appspotmail.com Fixes: c5794e51784a ("btrfs: Factor out write portion of btrfs_get_blocks_direct") CC: stable@vger.kernel.org # 6.1+ Tested-by: syzbot+ee90502d5c8fd1d0dd93@syzkaller.appspotmail.com Reviewed-by: Filipe Manana Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 48a821fd58837800750ec1b3962f0f799630a844 Author: Aleksandr Loktionov Date: Tue Apr 25 17:44:14 2023 +0200 igb: fix nvm.ops.read() error handling Add error handling into igb_set_eeprom() function, in case nvm.ops.read() fails just quit with error code asap. Fixes: 9d5c824399de ("igb: PCI-Express 82575 Gigabit Ethernet driver") Signed-off-by: Aleksandr Loktionov Signed-off-by: Tony Nguyen commit c080fe262f9e73a00934b70c16b1479cf40cd2bd Author: Vinicius Costa Gomes Date: Mon Apr 17 15:18:39 2023 -0700 igc: Fix possible system crash when loading module Guarantee that when probe() is run again, PTM and PCI busmaster will be in the same state as it was if the driver was never loaded. Avoid an i225/i226 hardware issue that PTM requests can be made even though PCI bus mastering is not enabled. These unexpected PTM requests can crash some systems. So, "force" disable PTM and busmastering before removing the driver, so they can be re-enabled in the right order during probe(). This is more like a workaround and should be applicable for i225 and i226, in any platform. Fixes: 1b5d73fb8624 ("igc: Enable PCIe PTM") Signed-off-by: Vinicius Costa Gomes Reviewed-by: Muhammad Husaini Zulkifli Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit e43516f5978d11d36511ce63d31d1da4db916510 Author: Muhammad Husaini Zulkifli Date: Mon May 15 23:49:36 2023 +0800 igc: Clean the TX buffer and TX descriptor ring There could be a race condition during link down where interrupt being generated and igc_clean_tx_irq() been called to perform the TX completion. Properly clear the TX buffer/descriptor ring and disable the TX Queue ring in igc_free_tx_resources() to avoid that. Kernel trace: [ 108.237177] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLIFUI1.R00.4204.A00.2105270302 05/27/2021 [ 108.237178] RIP: 0010:refcount_warn_saturate+0x55/0x110 [ 108.242143] RSP: 0018:ffff9e7980003db0 EFLAGS: 00010286 [ 108.245555] Code: 84 bc 00 00 00 c3 cc cc cc cc 85 f6 74 46 80 3d 20 8c 4d 01 00 75 ee 48 c7 c7 88 f4 03 ab c6 05 10 8c 4d 01 01 e8 0b 10 96 ff <0f> 0b c3 cc cc cc cc 80 3d fc 8b 4d 01 00 75 cb 48 c7 c7 b0 f4 03 [ 108.250434] [ 108.250434] RSP: 0018:ffff9e798125f910 EFLAGS: 00010286 [ 108.254358] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 108.259325] [ 108.259325] RAX: 0000000000000000 RBX: ffff8ddb935b8000 RCX: 0000000000000027 [ 108.261868] RDX: ffff8de250a28800 RSI: ffff8de250a1c580 RDI: ffff8de250a1c580 [ 108.265538] RDX: 0000000000000027 RSI: 0000000000000002 RDI: ffff8de250a9c588 [ 108.265539] RBP: ffff8ddb935b8000 R08: ffffffffab2655a0 R09: ffff9e798125f898 [ 108.267914] RBP: ffff8ddb8a5b8d80 R08: 0000005648eba354 R09: 0000000000000000 [ 108.270196] R10: 0000000000000001 R11: 000000002d2d2d2d R12: ffff9e798125f948 [ 108.270197] R13: ffff9e798125fa1c R14: ffff8ddb8a5b8d80 R15: 7fffffffffffffff [ 108.273001] R10: 000000002d2d2d2d R11: 000000002d2d2d2d R12: ffff8ddb8a5b8ed4 [ 108.276410] FS: 00007f605851b740(0000) GS:ffff8de250a80000(0000) knlGS:0000000000000000 [ 108.280597] R13: 00000000000002ac R14: 00000000ffffff99 R15: ffff8ddb92561b80 [ 108.282966] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 108.282967] CR2: 00007f053c039248 CR3: 0000000185850003 CR4: 0000000000f70ee0 [ 108.286206] FS: 0000000000000000(0000) GS:ffff8de250a00000(0000) knlGS:0000000000000000 [ 108.289701] PKRU: 55555554 [ 108.289702] Call Trace: [ 108.289704] [ 108.293977] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 108.297562] sock_alloc_send_pskb+0x20c/0x240 [ 108.301494] CR2: 00007f053c03a168 CR3: 0000000184394002 CR4: 0000000000f70ef0 [ 108.301495] PKRU: 55555554 [ 108.306464] __ip_append_data.isra.0+0x96f/0x1040 [ 108.309441] Call Trace: [ 108.309443] ? __pfx_ip_generic_getfrag+0x10/0x10 [ 108.314927] [ 108.314928] sock_wfree+0x1c7/0x1d0 [ 108.318078] ? __pfx_ip_generic_getfrag+0x10/0x10 [ 108.320276] skb_release_head_state+0x32/0x90 [ 108.324812] ip_make_skb+0xf6/0x130 [ 108.327188] skb_release_all+0x16/0x40 [ 108.330775] ? udp_sendmsg+0x9f3/0xcb0 [ 108.332626] napi_consume_skb+0x48/0xf0 [ 108.334134] ? xfrm_lookup_route+0x23/0xb0 [ 108.344285] igc_poll+0x787/0x1620 [igc] [ 108.346659] udp_sendmsg+0x9f3/0xcb0 [ 108.360010] ? ttwu_do_activate+0x40/0x220 [ 108.365237] ? __pfx_ip_generic_getfrag+0x10/0x10 [ 108.366744] ? try_to_wake_up+0x289/0x5e0 [ 108.376987] ? sock_sendmsg+0x81/0x90 [ 108.395698] ? __pfx_process_timeout+0x10/0x10 [ 108.395701] sock_sendmsg+0x81/0x90 [ 108.409052] __napi_poll+0x29/0x1c0 [ 108.414279] ____sys_sendmsg+0x284/0x310 [ 108.419507] net_rx_action+0x257/0x2d0 [ 108.438216] ___sys_sendmsg+0x7c/0xc0 [ 108.439723] __do_softirq+0xc1/0x2a8 [ 108.444950] ? finish_task_switch+0xb4/0x2f0 [ 108.452077] irq_exit_rcu+0xa9/0xd0 [ 108.453584] ? __schedule+0x372/0xd00 [ 108.460713] common_interrupt+0x84/0xa0 [ 108.467840] ? clockevents_program_event+0x95/0x100 [ 108.474968] [ 108.482096] ? do_nanosleep+0x88/0x130 [ 108.489224] [ 108.489225] asm_common_interrupt+0x26/0x40 [ 108.496353] ? __rseq_handle_notify_resume+0xa9/0x4f0 [ 108.503478] RIP: 0010:cpu_idle_poll+0x2c/0x100 [ 108.510607] __sys_sendmsg+0x5d/0xb0 [ 108.518687] Code: 05 e1 d9 c8 00 65 8b 15 de 64 85 55 85 c0 7f 57 e8 b9 ef ff ff fb 65 48 8b 1c 25 00 cc 02 00 48 8b 03 a8 08 74 0b eb 1c f3 90 <48> 8b 03 a8 08 75 13 8b 05 77 63 cd 00 85 c0 75 ed e8 ce ec ff ff [ 108.525817] do_syscall_64+0x44/0xa0 [ 108.531563] RSP: 0018:ffffffffab203e70 EFLAGS: 00000202 [ 108.538693] entry_SYSCALL_64_after_hwframe+0x72/0xdc [ 108.546775] [ 108.546777] RIP: 0033:0x7f605862b7f7 [ 108.549495] RAX: 0000000000000001 RBX: ffffffffab20c940 RCX: 000000000000003b [ 108.551955] Code: 0e 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b9 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10 [ 108.554068] RDX: 4000000000000000 RSI: 000000002da97f6a RDI: 00000000002b8ff4 [ 108.559816] RSP: 002b:00007ffc99264058 EFLAGS: 00000246 [ 108.564178] RBP: 0000000000000000 R08: 00000000002b8ff4 R09: ffff8ddb01554c80 [ 108.571302] ORIG_RAX: 000000000000002e [ 108.571303] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f605862b7f7 [ 108.574023] R10: 000000000000015b R11: 000000000000000f R12: ffffffffab20c940 [ 108.574024] R13: 0000000000000000 R14: ffff8de26fbeef40 R15: ffffffffab20c940 [ 108.578727] RDX: 0000000000000000 RSI: 00007ffc992640a0 RDI: 0000000000000003 [ 108.578728] RBP: 00007ffc99264110 R08: 0000000000000000 R09: 175f48ad1c3a9c00 [ 108.581187] do_idle+0x62/0x230 [ 108.585890] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc992642d8 [ 108.585891] R13: 00005577814ab2ba R14: 00005577814addf0 R15: 00007f605876d000 [ 108.587920] cpu_startup_entry+0x1d/0x20 [ 108.591422] [ 108.596127] rest_init+0xc5/0xd0 [ 108.600490] ---[ end trace 0000000000000000 ]--- Test Setup: DUT: - Change mac address on DUT Side. Ensure NIC not having same MAC Address - Running udp_tai on DUT side. Let udp_tai running throughout the test Example: ./udp_tai -i enp170s0 -P 100000 -p 90 -c 1 -t 0 -u 30004 Host: - Perform link up/down every 5 second. Result: Kernel panic will happen on DUT Side. Fixes: 13b5b7fd6a4a ("igc: Add support for Tx/Rx rings") Signed-off-by: Muhammad Husaini Zulkifli Tested-by: Naama Meir Reviewed-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen commit 3d6f6d2b584e7a629158be8a3f44f5de00b337ee Author: Alexandre Mergnat Date: Fri May 26 15:10:43 2023 +0200 clk: mediatek: mt8365: Fix index issue Before the patch [1], the clock probe was done directly in the clk-mt8365 driver. In this probe function, the array which stores the data clocks is sized using the higher defined numbers (*_NR_CLOCK) in the clock lists [2]. Currently, with the patch [1], the specific clk-mt8365 probe function is replaced by the mtk generic one [3], which size the clock data array by adding all the clock descriptor array size provided by the clk-mt8365 driver. Actually, all clock indexes come from the header file [2], that mean, if there are more clock (then more index) in the header file [2] than the number of clock declared in the clock descriptor arrays (which is the case currently), the clock data array will be undersized and then the generic probe function will overflow when it will try to write in "clk_data[CLK_INDEX]". Actually, instead of crashing at boot, the probe function returns an error in the log which looks like: "of_clk_hw_onecell_get: invalid index 135", then this clock isn't enabled. Solve this issue by adding in the driver the missing clocks declared in the header clock file [2]. [1]: Commit ffe91cb28f6a ("clk: mediatek: mt8365: Convert to mtk_clk_simple_{probe,remove}()") [2]: include/dt-bindings/clock/mediatek,mt8365-clk.h [3]: drivers/clk/mediatek/clk-mtk.c Fixes: ffe91cb28f6a ("clk: mediatek: mt8365: Convert to mtk_clk_simple_{probe,remove}()") Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20230517-fix-clk-index-v3-1-be4df46065c4@baylibre.com Tested-by: Markus Schneider-Pargmann Reviewed-by: Markus Schneider-Pargmann Signed-off-by: Stephen Boyd commit 0bdf0efa180a9cb1361cbded4e2260a49306ac89 Author: Nhat Pham Date: Tue May 30 15:24:40 2023 -0700 zswap: do not shrink if cgroup may not zswap Before storing a page, zswap first checks if the number of stored pages exceeds the limit specified by memory.zswap.max, for each cgroup in the hierarchy. If this limit is reached or exceeded, then zswap shrinking is triggered and short-circuits the store attempt. However, since the zswap's LRU is not memcg-aware, this can create the following pathological behavior: the cgroup whose zswap limit is 0 will evict pages from other cgroups continually, without lowering its own zswap usage. This means the shrinking will continue until the need for swap ceases or the pool becomes empty. As a result of this, we observe a disproportionate amount of zswap writeback and a perpetually small zswap pool in our experiments, even though the pool limit is never hit. More generally, a cgroup might unnecessarily evict pages from other cgroups before we drive the memcg back below its limit. This patch fixes the issue by rejecting zswap store attempt without shrinking the pool when obj_cgroup_may_zswap() returns false. [akpm@linux-foundation.org: fix return of unintialized value] [akpm@linux-foundation.org: s/ENOSPC/ENOMEM/] Link: https://lkml.kernel.org/r/20230530222440.2777700-1-nphamcs@gmail.com Link: https://lkml.kernel.org/r/20230530232435.3097106-1-nphamcs@gmail.com Fixes: f4840ccfca25 ("zswap: memcg accounting") Signed-off-by: Nhat Pham Cc: Dan Streetman Cc: Domenico Cerasuolo Cc: Johannes Weiner Cc: Seth Jennings Cc: Vitaly Wool Cc: Yosry Ahmed Cc: Signed-off-by: Andrew Morton commit 9425c591e06a9ab27a145ba655fb50532cf0bcc9 Author: Mike Kravetz Date: Fri Jun 2 15:57:47 2023 -0700 page cache: fix page_cache_next/prev_miss off by one Ackerley Tng reported an issue with hugetlbfs fallocate here[1]. The issue showed up after the conversion of hugetlb page cache lookup code to use page_cache_next_miss. Code in hugetlb fallocate, userfaultfd and GUP is now using page_cache_next_miss to determine if a page is present the page cache. The following statement is used. present = page_cache_next_miss(mapping, index, 1) != index; There are two issues with page_cache_next_miss when used in this way. 1) If the passed value for index is equal to the 'wrap-around' value, the same index will always be returned. This wrap-around value is 0, so 0 will be returned even if page is present at index 0. 2) If there is no gap in the range passed, the last index in the range will be returned. When passed a range of 1 as above, the passed index value will be returned even if the page is present. The end result is the statement above will NEVER indicate a page is present in the cache, even if it is. As noted by Ackerley in [1], users can see this by hugetlb fallocate incorrectly returning EEXIST if pages are already present in the file. In addition, hugetlb pages will not be included in core dumps if they need to be brought in via GUP. userfaultfd UFFDIO_COPY also uses this code and will not notice pages already present in the cache. It may try to allocate a new page and potentially return ENOMEM as opposed to EEXIST. Both page_cache_next_miss and page_cache_prev_miss have similar issues. Fix by: - Check for index equal to 'wrap-around' value and do not exit early. - If no gap is found in range, return index outside range. - Update function description to say 'wrap-around' value could be returned if passed as index. [1] https://lore.kernel.org/linux-mm/cover.1683069252.git.ackerleytng@google.com/ Link: https://lkml.kernel.org/r/20230602225747.103865-2-mike.kravetz@oracle.com Fixes: d0ce0e47b323 ("mm/hugetlb: convert hugetlb fault paths to use alloc_hugetlb_folio()") Signed-off-by: Mike Kravetz Reported-by: Ackerley Tng Reviewed-by: Ackerley Tng Tested-by: Ackerley Tng Cc: Erdem Aktas Cc: Matthew Wilcox (Oracle) Cc: Mike Kravetz Cc: Muchun Song Cc: Sidhartha Kumar Cc: Vishal Annapurve Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton commit 26a6ffff7de5dd369cdb12e38ba11db682f1dec0 Author: Luís Henriques Date: Mon May 29 16:26:45 2023 +0100 ocfs2: check new file size on fallocate call When changing a file size with fallocate() the new size isn't being checked. In particular, the FSIZE ulimit isn't being checked, which makes fstest generic/228 fail. Simply adding a call to inode_newsize_ok() fixes this issue. Link: https://lkml.kernel.org/r/20230529152645.32680-1-lhenriques@suse.de Signed-off-by: Luís Henriques Reviewed-by: Mark Fasheh Reviewed-by: Joseph Qi Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Cc: Signed-off-by: Andrew Morton commit 0e4d4ef972aaa237025f994911c370a0e8e07d27 Author: John Keeping Date: Wed May 31 15:48:39 2023 +0100 mailmap: add entry for John Keeping Map my corporate address to my personal one, as I am leaving the company. Link: https://lkml.kernel.org/r/20230531144839.1157112-1-john@keeping.me.uk Signed-off-by: John Keeping Signed-off-by: Andrew Morton commit 5ff6e2fff88ef9bf110c5e85a48e7b557bfc64c1 Author: Kefeng Wang Date: Sat May 27 11:21:01 2023 +0800 mm/damon/core: fix divide error in damon_nr_accesses_to_accesses_bp() If 'aggr_interval' is smaller than 'sample_interval', max_nr_accesses in damon_nr_accesses_to_accesses_bp() becomes zero which leads to divide error, let's validate the values of them in damon_set_attrs() to fix it, which similar to others attrs check. Link: https://lkml.kernel.org/r/20230527032101.167788-1-wangkefeng.wang@huawei.com Fixes: 2f5bef5a590b ("mm/damon/core: update monitoring results for new monitoring attributes") Reported-by: syzbot+841a46899768ec7bec67@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=841a46899768ec7bec67 Link: https://lore.kernel.org/damon/00000000000055fc4e05fc975bc2@google.com/ Reviewed-by: SeongJae Park Signed-off-by: Kefeng Wang Cc: Signed-off-by: Andrew Morton commit 2192bba03d80f829233bfa34506b428f71e531e7 Author: Benjamin Segall Date: Tue May 30 11:32:28 2023 -0700 epoll: ep_autoremove_wake_function should use list_del_init_careful autoremove_wake_function uses list_del_init_careful, so should epoll's more aggressive variant. It only doesn't because it was copied from an older wait.c rather than the most recent. [bsegall@google.com: add comment] Link: https://lkml.kernel.org/r/xm26bki0ulsr.fsf_-_@google.com Link: https://lkml.kernel.org/r/xm26pm6hvfer.fsf@google.com Fixes: a16ceb139610 ("epoll: autoremove wakers even more aggressively") Signed-off-by: Ben Segall Cc: Al Viro Cc: Christian Brauner Cc: Signed-off-by: Andrew Morton commit 4f572f0074b8be8a70bd150d96a749aa94c8d85f Author: Haibo Li Date: Fri May 26 10:21:25 2023 +0800 mm/gup_test: fix ioctl fail for compat task When tools/testing/selftests/mm/gup_test.c is compiled as 32bit, then run on arm64 kernel, it reports "ioctl: Inappropriate ioctl for device". Fix it by filling compat_ioctl in gup_test_fops Link: https://lkml.kernel.org/r/20230526022125.175728-1-haibo.li@mediatek.com Signed-off-by: Haibo Li Acked-by: David Hildenbrand Cc: AngeloGioacchino Del Regno Cc: Matthias Brugger Cc: John Hubbard Cc: Signed-off-by: Andrew Morton commit 92c5d1b860e9581d64baca76779576c0ab0d943d Author: Ryusuke Konishi Date: Fri May 26 11:13:32 2023 +0900 nilfs2: reject devices with insufficient block count The current sanity check for nilfs2 geometry information lacks checks for the number of segments stored in superblocks, so even for device images that have been destructively truncated or have an unusually high number of segments, the mount operation may succeed. This causes out-of-bounds block I/O on file system block reads or log writes to the segments, the latter in particular causing "a_ops->writepages" to repeatedly fail, resulting in sync_inodes_sb() to hang. Fix this issue by checking the number of segments stored in the superblock and avoiding mounting devices that can cause out-of-bounds accesses. To eliminate the possibility of overflow when calculating the number of blocks required for the device from the number of segments, this also adds a helper function to calculate the upper bound on the number of segments and inserts a check using it. Link: https://lkml.kernel.org/r/20230526021332.3431-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Reported-by: syzbot+7d50f1e54a12ba3aeae2@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=7d50f1e54a12ba3aeae2 Tested-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton commit 50d927880e0f90d5cb25e897e9d03e5edacc79a8 Author: Luís Henriques Date: Mon May 22 11:21:12 2023 +0100 ocfs2: fix use-after-free when unmounting read-only filesystem It's trivial to trigger a use-after-free bug in the ocfs2 quotas code using fstest generic/452. After a read-only remount, quotas are suspended and ocfs2_mem_dqinfo is freed through ->ocfs2_local_free_info(). When unmounting the filesystem, an UAF access to the oinfo will eventually cause a crash. BUG: KASAN: slab-use-after-free in timer_delete+0x54/0xc0 Read of size 8 at addr ffff8880389a8208 by task umount/669 ... Call Trace: ... timer_delete+0x54/0xc0 try_to_grab_pending+0x31/0x230 __cancel_work_timer+0x6c/0x270 ocfs2_disable_quotas.isra.0+0x3e/0xf0 [ocfs2] ocfs2_dismount_volume+0xdd/0x450 [ocfs2] generic_shutdown_super+0xaa/0x280 kill_block_super+0x46/0x70 deactivate_locked_super+0x4d/0xb0 cleanup_mnt+0x135/0x1f0 ... Allocated by task 632: kasan_save_stack+0x1c/0x40 kasan_set_track+0x21/0x30 __kasan_kmalloc+0x8b/0x90 ocfs2_local_read_info+0xe3/0x9a0 [ocfs2] dquot_load_quota_sb+0x34b/0x680 dquot_load_quota_inode+0xfe/0x1a0 ocfs2_enable_quotas+0x190/0x2f0 [ocfs2] ocfs2_fill_super+0x14ef/0x2120 [ocfs2] mount_bdev+0x1be/0x200 legacy_get_tree+0x6c/0xb0 vfs_get_tree+0x3e/0x110 path_mount+0xa90/0xe10 __x64_sys_mount+0x16f/0x1a0 do_syscall_64+0x43/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc Freed by task 650: kasan_save_stack+0x1c/0x40 kasan_set_track+0x21/0x30 kasan_save_free_info+0x2a/0x50 __kasan_slab_free+0xf9/0x150 __kmem_cache_free+0x89/0x180 ocfs2_local_free_info+0x2ba/0x3f0 [ocfs2] dquot_disable+0x35f/0xa70 ocfs2_susp_quotas.isra.0+0x159/0x1a0 [ocfs2] ocfs2_remount+0x150/0x580 [ocfs2] reconfigure_super+0x1a5/0x3a0 path_mount+0xc8a/0xe10 __x64_sys_mount+0x16f/0x1a0 do_syscall_64+0x43/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc Link: https://lkml.kernel.org/r/20230522102112.9031-1-lhenriques@suse.de Signed-off-by: Luís Henriques Reviewed-by: Joseph Qi Tested-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Cc: Signed-off-by: Andrew Morton commit 9f6c6ad161f1af37548a6b80fb15710998ccfd1e Author: Lorenzo Stoakes Date: Wed May 24 09:24:24 2023 +0100 lib/test_vmalloc.c: avoid garbage in page array It turns out that alloc_pages_bulk_array() does not treat the page_array parameter as an output parameter, but rather reads the array and skips any entries that have already been allocated. This is somewhat unexpected and breaks this test, as we allocate the pages array uninitialised on the assumption it will be overwritten. As a result, the test was referencing uninitialised data and causing the PFN to not be valid and thus a WARN_ON() followed by a null pointer deref and panic. In addition, this is an array of pointers not of struct page objects, so we need only allocate an array with elements of pointer size. We solve both problems by simply using kcalloc() and referencing sizeof(struct page *) rather than sizeof(struct page). Link: https://lkml.kernel.org/r/20230524082424.10022-1-lstoakes@gmail.com Fixes: 869cb29a61a1 ("lib/test_vmalloc.c: add vm_map_ram()/vm_unmap_ram() test case") Signed-off-by: Lorenzo Stoakes Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: Baoquan He Cc: Christoph Hellwig Signed-off-by: Andrew Morton commit fee5eaecca86afa544355569b831c1f90f334b85 Author: Ryusuke Konishi Date: Wed May 24 18:43:48 2023 +0900 nilfs2: fix possible out-of-bounds segment allocation in resize ioctl Syzbot reports that in its stress test for resize ioctl, the log writing function nilfs_segctor_do_construct hits a WARN_ON in nilfs_segctor_truncate_segments(). It turned out that there is a problem with the current implementation of the resize ioctl, which changes the writable range on the device (the range of allocatable segments) at the end of the resize process. This order is necessary for file system expansion to avoid corrupting the superblock at trailing edge. However, in the case of a file system shrink, if log writes occur after truncating out-of-bounds trailing segments and before the resize is complete, segments may be allocated from the truncated space. The userspace resize tool was fine as it limits the range of allocatable segments before performing the resize, but it can run into this issue if the resize ioctl is called alone. Fix this issue by changing nilfs_sufile_resize() to update the range of allocatable segments immediately after successful truncation of segment space in case of file system shrink. Link: https://lkml.kernel.org/r/20230524094348.3784-1-konishi.ryusuke@gmail.com Fixes: 4e33f9eab07e ("nilfs2: implement resize ioctl") Signed-off-by: Ryusuke Konishi Reported-by: syzbot+33494cd0df2ec2931851@syzkaller.appspotmail.com Closes: https://lkml.kernel.org/r/0000000000005434c405fbbafdc5@google.com Tested-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton commit 88ac3bbcf73853880a9b2a65c67e6854390741cc Author: Ricardo Ribalda Date: Fri May 19 16:47:39 2023 +0200 riscv/purgatory: remove PGO flags If profile-guided optimization is enabled, the purgatory ends up with multiple .text sections. This is not supported by kexec and crashes the system. Link: https://lkml.kernel.org/r/20230321-kexec_clang16-v7-4-b05c520b7296@chromium.org Fixes: 930457057abe ("kernel/kexec_file.c: split up __kexec_load_puragory") Signed-off-by: Ricardo Ribalda Acked-by: Palmer Dabbelt Cc: Cc: Albert Ou Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: Eric W. Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Michael Ellerman Cc: Nathan Chancellor Cc: Nicholas Piggin Cc: Nick Desaulniers Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Philipp Rudo Cc: Ross Zwisler Cc: Simon Horman Cc: Steven Rostedt (Google) Cc: Thomas Gleixner Cc: Tom Rix Signed-off-by: Andrew Morton commit 20188baceb7a1463dc0bcb0c8678b69c2f447df6 Author: Ricardo Ribalda Date: Fri May 19 16:47:38 2023 +0200 powerpc/purgatory: remove PGO flags If profile-guided optimization is enabled, the purgatory ends up with multiple .text sections. This is not supported by kexec and crashes the system. Link: https://lkml.kernel.org/r/20230321-kexec_clang16-v7-3-b05c520b7296@chromium.org Fixes: 930457057abe ("kernel/kexec_file.c: split up __kexec_load_puragory") Signed-off-by: Ricardo Ribalda Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Cc: Albert Ou Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: Dave Young Cc: Eric W. Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Palmer Dabbelt Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Philipp Rudo Cc: Ross Zwisler Cc: Simon Horman Cc: Steven Rostedt (Google) Cc: Thomas Gleixner Cc: Tom Rix Signed-off-by: Andrew Morton commit 97b6b9cbba40a21c1d9a344d5c1991f8cfbf136e Author: Ricardo Ribalda Date: Fri May 19 16:47:37 2023 +0200 x86/purgatory: remove PGO flags If profile-guided optimization is enabled, the purgatory ends up with multiple .text sections. This is not supported by kexec and crashes the system. Link: https://lkml.kernel.org/r/20230321-kexec_clang16-v7-2-b05c520b7296@chromium.org Fixes: 930457057abe ("kernel/kexec_file.c: split up __kexec_load_puragory") Signed-off-by: Ricardo Ribalda Cc: Cc: Albert Ou Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: Eric W. Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Michael Ellerman Cc: Nathan Chancellor Cc: Nicholas Piggin Cc: Nick Desaulniers Cc: Palmer Dabbelt Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Philipp Rudo Cc: Ross Zwisler Cc: Simon Horman Cc: Steven Rostedt (Google) Cc: Thomas Gleixner Cc: Tom Rix Signed-off-by: Andrew Morton commit 8652d44f466ad5772e7d1756e9457046189b0dfc Author: Ricardo Ribalda Date: Fri May 19 16:47:36 2023 +0200 kexec: support purgatories with .text.hot sections Patch series "kexec: Fix kexec_file_load for llvm16 with PGO", v7. When upreving llvm I realised that kexec stopped working on my test platform. The reason seems to be that due to PGO there are multiple .text sections on the purgatory, and kexec does not supports that. This patch (of 4): Clang16 links the purgatory text in two sections when PGO is in use: [ 1] .text PROGBITS 0000000000000000 00000040 00000000000011a1 0000000000000000 AX 0 0 16 [ 2] .rela.text RELA 0000000000000000 00003498 0000000000000648 0000000000000018 I 24 1 8 ... [17] .text.hot. PROGBITS 0000000000000000 00003220 000000000000020b 0000000000000000 AX 0 0 1 [18] .rela.text.hot. RELA 0000000000000000 00004428 0000000000000078 0000000000000018 I 24 17 8 And both of them have their range [sh_addr ... sh_addr+sh_size] on the area pointed by `e_entry`. This causes that image->start is calculated twice, once for .text and another time for .text.hot. The second calculation leaves image->start in a random location. Because of this, the system crashes immediately after: kexec_core: Starting new kernel Link: https://lkml.kernel.org/r/20230321-kexec_clang16-v7-0-b05c520b7296@chromium.org Link: https://lkml.kernel.org/r/20230321-kexec_clang16-v7-1-b05c520b7296@chromium.org Fixes: 930457057abe ("kernel/kexec_file.c: split up __kexec_load_puragory") Signed-off-by: Ricardo Ribalda Reviewed-by: Ross Zwisler Reviewed-by: Steven Rostedt (Google) Reviewed-by: Philipp Rudo Cc: Albert Ou Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Christophe Leroy Cc: Dave Hansen Cc: Dave Young Cc: Eric W. Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Michael Ellerman Cc: Nathan Chancellor Cc: Nicholas Piggin Cc: Nick Desaulniers Cc: Palmer Dabbelt Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Simon Horman Cc: Thomas Gleixner Cc: Tom Rix Cc: Signed-off-by: Andrew Morton commit 5543d3c43c41a8501f2a4946d0fd39ce36b5a641 Author: Peter Xu Date: Wed May 17 15:09:16 2023 -0400 mm/uffd: allow vma to merge as much as possible We used to not pass in the pgoff correctly when register/unregister uffd regions, it caused incorrect behavior on vma merging and can cause mergeable vmas being separate after ioctls return. For example, when we have: vma1(range 0-9, with uffd), vma2(range 10-19, no uffd) Then someone unregisters uffd on range (5-9), it should logically become: vma1(range 0-4, with uffd), vma2(range 5-19, no uffd) But with current code we'll have: vma1(range 0-4, with uffd), vma3(range 5-9, no uffd), vma2(range 10-19, no uffd) This patch allows such merge to happen correctly before ioctl returns. This behavior seems to have existed since the 1st day of uffd. Since pgoff for vma_merge() is only used to identify the possibility of vma merging, meanwhile here what we did was always passing in a pgoff smaller than what we should, so there should have no other side effect besides not merging it. Let's still tentatively copy stable for this, even though I don't see anything will go wrong besides vma being split (which is mostly not user visible). Link: https://lkml.kernel.org/r/20230517190916.3429499-3-peterx@redhat.com Fixes: 86039bd3b4e6 ("userfaultfd: add new syscall to provide memory externalization") Signed-off-by: Peter Xu Reported-by: Lorenzo Stoakes Acked-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Cc: Andrea Arcangeli Cc: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit 270aa010620697fb27b8f892cc4e194bc2b7d134 Author: Peter Xu Date: Wed May 17 15:09:15 2023 -0400 mm/uffd: fix vma operation where start addr cuts part of vma Patch series "mm/uffd: Fix vma merge/split", v2. This series contains two patches that fix vma merge/split for userfaultfd on two separate issues. Patch 1 fixes a regression since 6.1+ due to something we overlooked when converting to maple tree apis. The plan is we use patch 1 to replace the commit "2f628010799e (mm: userfaultfd: avoid passing an invalid range to vma_merge())" in mm-hostfixes-unstable tree if possible, so as to bring uffd vma operations back aligned with the rest code again. Patch 2 fixes a long standing issue that vma can be left unmerged even if we can for either uffd register or unregister. Many thanks to Lorenzo on either noticing this issue from the assert movement patch, looking at this problem, and also provided a reproducer on the unmerged vma issue [1]. [1] https://gist.github.com/lorenzo-stoakes/a11a10f5f479e7a977fc456331266e0e This patch (of 2): It seems vma merging with uffd paths is broken with either register/unregister, where right now we can feed wrong parameters to vma_merge() and it's found by recent patch which moved asserts upwards in vma_merge() by Lorenzo Stoakes: https://lore.kernel.org/all/ZFunF7DmMdK05MoF@FVFF77S0Q05N.cambridge.arm.com/ It's possible that "start" is contained within vma but not clamped to its start. We need to convert this into either "cannot merge" case or "can merge" case 4 which permits subdivision of prev by assigning vma to prev. As we loop, each subsequent VMA will be clamped to the start. This patch will eliminate the report and make sure vma_merge() calls will become legal again. One thing to mention is that the "Fixes: 29417d292bd0" below is there only to help explain where the warning can start to trigger, the real commit to fix should be 69dbe6daf104. Commit 29417d292bd0 helps us to identify the issue, but unfortunately we may want to keep it in Fixes too just to ease kernel backporters for easier tracking. Link: https://lkml.kernel.org/r/20230517190916.3429499-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20230517190916.3429499-2-peterx@redhat.com Fixes: 69dbe6daf104 ("userfaultfd: use maple tree iterator to iterate VMAs") Signed-off-by: Peter Xu Reported-by: Mark Rutland Reviewed-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Closes: https://lore.kernel.org/all/ZFunF7DmMdK05MoF@FVFF77S0Q05N.cambridge.arm.com/ Cc: Lorenzo Stoakes Cc: Mike Rapoport (IBM) Cc: Liam R. Howlett Cc: Signed-off-by: Andrew Morton commit bde1597d0f045149a254b0c2ec6f029c82e459d5 Author: Arnd Bergmann Date: Tue May 16 21:41:54 2023 +0200 radix-tree: move declarations to header The xarray.c file contains the only call to radix_tree_node_rcu_free(), and it comes with its own extern declaration for it. This means the function definition causes a missing-prototype warning: lib/radix-tree.c:288:6: error: no previous prototype for 'radix_tree_node_rcu_free' [-Werror=missing-prototypes] Instead, move the declaration for this function to a new header that can be included by both, and do the same for the radix_tree_node_cachep variable that has the same underlying problem but does not cause a warning with gcc. [zhangpeng.00@bytedance.com: fix building radix tree test suite] Link: https://lkml.kernel.org/r/20230521095450.21332-1-zhangpeng.00@bytedance.com Link: https://lkml.kernel.org/r/20230516194212.548910-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Peng Zhang Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 2f012f2baca140c488e43d27a374029c1e59098d Author: Ryusuke Konishi Date: Sat May 13 19:24:28 2023 +0900 nilfs2: fix incomplete buffer cleanup in nilfs_btnode_abort_change_key() A syzbot fault injection test reported that nilfs_btnode_create_block, a helper function that allocates a new node block for b-trees, causes a kernel BUG for disk images where the file system block size is smaller than the page size. This was due to unexpected flags on the newly allocated buffer head, and it turned out to be because the buffer flags were not cleared by nilfs_btnode_abort_change_key() after an error occurred during a b-tree update operation and the buffer was later reused in that state. Fix this issue by using nilfs_btnode_delete() to abandon the unused preallocated buffer in nilfs_btnode_abort_change_key(). Link: https://lkml.kernel.org/r/20230513102428.10223-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Reported-by: syzbot+b0a35a5c1f7e846d3b09@syzkaller.appspotmail.com Closes: https://lkml.kernel.org/r/000000000000d1d6c205ebc4d512@google.com Tested-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton commit fd37b884003c7e46a0337b6e9212326d3ee1f40d Author: Jens Axboe Date: Mon Jun 12 12:11:57 2023 -0600 io_uring/io-wq: don't clear PF_IO_WORKER on exit A recent commit gated the core dumping task exit logic on current->flags remaining consistent in terms of PF_{IO,USER}_WORKER at task exit time. This exposed a problem with the io-wq handling of that, which explicitly clears PF_IO_WORKER before calling do_exit(). The reasons for this manual clear of PF_IO_WORKER is historical, where io-wq used to potentially trigger a sleep on exit. As the io-wq thread is exiting, it should not participate any further accounting. But these days we don't need to rely on current->flags anymore, so we can safely remove the PF_IO_WORKER clearing. Reported-by: Zorro Lang Reported-by: Dave Chinner Link: https://lore.kernel.org/all/ZIZSPyzReZkGBEFy@dread.disaster.area/ Fixes: f9010dbdce91 ("fork, vhost: Use CLONE_THREAD to fix freezer/ps regression") Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds commit ace9e12da2f09faf85cd1904c14e1ab3ca49a590 Merge: 858fd168a95c5 79b8ee702c918 Author: Linus Torvalds Date: Mon Jun 12 10:53:35 2023 -0700 Merge tag 'for-6.4-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A more fixes and regression fixes: - in subpage mode, fix crash when repairing metadata at the end of a stripe - properly enable async discard when remounting from read-only to read-write - scrub regression fixes: - respect read-only scrub when attempting to do a repair - fix reporting of found errors, the stats don't get properly accounted after a stripe repair" * tag 'for-6.4-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: scrub: also report errors hit during the initial read btrfs: scrub: respect the read-only flag during repair btrfs: properly enable async discard when switching from RO->RW btrfs: subpage: fix a crash in metadata repair path commit 6f363f5aa845561f7ea496d8b1175e3204470486 Author: Xiu Jianfeng Date: Sat Jun 10 17:26:43 2023 +0800 cgroup: Do not corrupt task iteration when rebinding subsystem We found a refcount UAF bug as follows: refcount_t: addition on 0; use-after-free. WARNING: CPU: 1 PID: 342 at lib/refcount.c:25 refcount_warn_saturate+0xa0/0x148 Workqueue: events cpuset_hotplug_workfn Call trace: refcount_warn_saturate+0xa0/0x148 __refcount_add.constprop.0+0x5c/0x80 css_task_iter_advance_css_set+0xd8/0x210 css_task_iter_advance+0xa8/0x120 css_task_iter_next+0x94/0x158 update_tasks_root_domain+0x58/0x98 rebuild_root_domains+0xa0/0x1b0 rebuild_sched_domains_locked+0x144/0x188 cpuset_hotplug_workfn+0x138/0x5a0 process_one_work+0x1e8/0x448 worker_thread+0x228/0x3e0 kthread+0xe0/0xf0 ret_from_fork+0x10/0x20 then a kernel panic will be triggered as below: Unable to handle kernel paging request at virtual address 00000000c0000010 Call trace: cgroup_apply_control_disable+0xa4/0x16c rebind_subsystems+0x224/0x590 cgroup_destroy_root+0x64/0x2e0 css_free_rwork_fn+0x198/0x2a0 process_one_work+0x1d4/0x4bc worker_thread+0x158/0x410 kthread+0x108/0x13c ret_from_fork+0x10/0x18 The race that cause this bug can be shown as below: (hotplug cpu) | (umount cpuset) mutex_lock(&cpuset_mutex) | mutex_lock(&cgroup_mutex) cpuset_hotplug_workfn | rebuild_root_domains | rebind_subsystems update_tasks_root_domain | spin_lock_irq(&css_set_lock) css_task_iter_start | list_move_tail(&cset->e_cset_node[ss->id] while(css_task_iter_next) | &dcgrp->e_csets[ss->id]); css_task_iter_end | spin_unlock_irq(&css_set_lock) mutex_unlock(&cpuset_mutex) | mutex_unlock(&cgroup_mutex) Inside css_task_iter_start/next/end, css_set_lock is hold and then released, so when iterating task(left side), the css_set may be moved to another list(right side), then it->cset_head points to the old list head and it->cset_pos->next points to the head node of new list, which can't be used as struct css_set. To fix this issue, switch from all css_sets to only scgrp's css_sets to patch in-flight iterators to preserve correct iteration, and then update it->cset_head as well. Reported-by: Gaosheng Cui Link: https://www.spinics.net/lists/cgroups/msg37935.html Suggested-by: Michal Koutný Link: https://lore.kernel.org/all/20230526114139.70274-1-xiujianfeng@huaweicloud.com/ Signed-off-by: Xiu Jianfeng Fixes: 2d8f243a5e6e ("cgroup: implement cgroup->e_csets[]") Cc: stable@vger.kernel.org # v3.16+ Signed-off-by: Tejun Heo commit f0cc749254d12c78e93dae3b27b21dc9546843d0 Author: Tetsuo Handa Date: Sun Jun 11 22:48:12 2023 +0900 cgroup,freezer: hold cpu_hotplug_lock before freezer_mutex in freezer_css_{online,offline}() syzbot is again reporting circular locking dependency between cpu_hotplug_lock and freezer_mutex. Do like what we did with commit 57dcd64c7e036299 ("cgroup,freezer: hold cpu_hotplug_lock before freezer_mutex"). Reported-by: syzbot Closes: https://syzkaller.appspot.com/bug?extid=2ab700fe1829880a2ec6 Signed-off-by: Tetsuo Handa Tested-by: syzbot Fixes: f5d39b020809 ("freezer,sched: Rewrite core freezer logic") Cc: stable@vger.kernel.org # v6.1+ Signed-off-by: Tejun Heo commit ad96f1c9138e0897bee7f7c5e54b3e24f8b62f57 Author: Yonghong Song Date: Thu Jun 8 17:54:39 2023 -0700 bpf: Fix a bpf_jit_dump issue for x86_64 with sysctl bpf_jit_enable. The sysctl net/core/bpf_jit_enable does not work now due to commit 1022a5498f6f ("bpf, x86_64: Use bpf_jit_binary_pack_alloc"). The commit saved the jitted insns into 'rw_image' instead of 'image' which caused bpf_jit_dump not dumping proper content. With 'echo 2 > /proc/sys/net/core/bpf_jit_enable', run './test_progs -t fentry_test'. Without this patch, one of jitted image for one particular prog is: flen=17 proglen=92 pass=4 image=0000000014c64883 from=test_progs pid=1807 00000000: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 00000010: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 00000020: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 00000030: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 00000040: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 00000050: cc cc cc cc cc cc cc cc cc cc cc cc With this patch, the jitte image for the same prog is: flen=17 proglen=92 pass=4 image=00000000b90254b7 from=test_progs pid=1809 00000000: f3 0f 1e fa 0f 1f 44 00 00 66 90 55 48 89 e5 f3 00000010: 0f 1e fa 31 f6 48 8b 57 00 48 83 fa 07 75 2b 48 00000020: 8b 57 10 83 fa 09 75 22 48 8b 57 08 48 81 e2 ff 00000030: 00 00 00 48 83 fa 08 75 11 48 8b 7f 18 be 01 00 00000040: 00 00 48 83 ff 0a 74 02 31 f6 48 bf 18 d0 14 00 00000050: 00 c9 ff ff 48 89 77 00 31 c0 c9 c3 Fixes: 1022a5498f6f ("bpf, x86_64: Use bpf_jit_binary_pack_alloc") Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20230609005439.3173569-1-yhs@fb.com commit e6f9e590b72e12bbb86b1b8be7e1981f357392ad Author: Stephan Gerhold Date: Thu May 18 11:39:36 2023 +0200 mmc: sdhci-msm: Disable broken 64-bit DMA on MSM8916 While SDHCI claims to support 64-bit DMA on MSM8916 it does not seem to be properly functional. It is not immediately obvious because SDHCI is usually used with IOMMU bypassed on this SoC, and all physical memory has 32-bit addresses. But when trying to enable the IOMMU it quickly fails with an error such as the following: arm-smmu 1e00000.iommu: Unhandled context fault: fsr=0x402, iova=0xfffff200, fsynr=0xe0000, cbfrsynra=0x140, cb=3 mmc1: ADMA error: 0x02000000 mmc1: sdhci: ============ SDHCI REGISTER DUMP =========== mmc1: sdhci: Sys addr: 0x00000000 | Version: 0x00002e02 mmc1: sdhci: Blk size: 0x00000008 | Blk cnt: 0x00000000 mmc1: sdhci: Argument: 0x00000000 | Trn mode: 0x00000013 mmc1: sdhci: Present: 0x03f80206 | Host ctl: 0x00000019 mmc1: sdhci: Power: 0x0000000f | Blk gap: 0x00000000 mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x00000007 mmc1: sdhci: Timeout: 0x0000000a | Int stat: 0x00000001 mmc1: sdhci: Int enab: 0x03ff900b | Sig enab: 0x03ff100b mmc1: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000 mmc1: sdhci: Caps: 0x322dc8b2 | Caps_1: 0x00008007 mmc1: sdhci: Cmd: 0x0000333a | Max curr: 0x00000000 mmc1: sdhci: Resp[0]: 0x00000920 | Resp[1]: 0x5b590000 mmc1: sdhci: Resp[2]: 0xe6487f80 | Resp[3]: 0x0a404094 mmc1: sdhci: Host ctl2: 0x00000008 mmc1: sdhci: ADMA Err: 0x00000001 | ADMA Ptr: 0x0000000ffffff224 mmc1: sdhci_msm: ----------- VENDOR REGISTER DUMP ----------- mmc1: sdhci_msm: DLL sts: 0x00000000 | DLL cfg: 0x60006400 | DLL cfg2: 0x00000000 mmc1: sdhci_msm: DLL cfg3: 0x00000000 | DLL usr ctl: 0x00000000 | DDR cfg: 0x00000000 mmc1: sdhci_msm: Vndr func: 0x00018a9c | Vndr func2 : 0xf88018a8 Vndr func3: 0x00000000 mmc1: sdhci: ============================================ mmc1: sdhci: fffffffff200: DMA 0x0000ffffffffe100, LEN 0x0008, Attr=0x21 mmc1: sdhci: fffffffff20c: DMA 0x0000000000000000, LEN 0x0000, Attr=0x03 Looking closely it's obvious that only the 32-bit part of the address (0xfffff200) arrives at the SMMU, the higher 16-bit (0xffff...) get lost somewhere. This might not be a limitation of the SDHCI itself but perhaps the bus/interconnect it is connected to, or even the connection to the SMMU. Work around this by setting SDHCI_QUIRK2_BROKEN_64_BIT_DMA to avoid using 64-bit addresses. Signed-off-by: Stephan Gerhold Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230518-msm8916-64bit-v1-1-5694b0f35211@gerhold.net Signed-off-by: Ulf Hansson commit 842665a9008a53ff13ac22a4e4b8ae2f10e92aca Author: Herbert Xu Date: Wed Jun 7 16:38:47 2023 +0800 xfrm: Use xfrm_state selector for BEET input For BEET the inner address and therefore family is stored in the xfrm_state selector. Use that when decapsulating an input packet instead of incorrectly relying on a non-existent tunnel protocol. Fixes: 5f24f41e8ea6 ("xfrm: Remove inner/outer modes from input path") Reported-by: Steffen Klassert Signed-off-by: Herbert Xu Signed-off-by: Steffen Klassert commit 75e6def3b26736e7ff80639810098c9074229737 Author: Dan Carpenter Date: Fri Jun 9 14:05:19 2023 +0300 sctp: fix an error code in sctp_sf_eat_auth() The sctp_sf_eat_auth() function is supposed to enum sctp_disposition values and returning a kernel error code will cause issues in the caller. Change -ENOMEM to SCTP_DISPOSITION_NOMEM. Fixes: 65b07e5d0d09 ("[SCTP]: API updates to suport SCTP-AUTH extensions.") Signed-off-by: Dan Carpenter Acked-by: Xin Long Signed-off-by: David S. Miller commit a0067dfcd9418fd3b0632bc59210d120d038a9c6 Author: Dan Carpenter Date: Fri Jun 9 14:04:43 2023 +0300 sctp: handle invalid error codes without calling BUG() The sctp_sf_eat_auth() function is supposed to return enum sctp_disposition values but if the call to sctp_ulpevent_make_authkey() fails, it returns -ENOMEM. This results in calling BUG() inside the sctp_side_effects() function. Calling BUG() is an over reaction and not helpful. Call WARN_ON_ONCE() instead. This code predates git. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit ce57adc222aba32431c42632b396e9213d0eb0b8 Author: Hangbin Liu Date: Fri Jun 9 17:15:02 2023 +0800 ipvlan: fix bound dev checking for IPv6 l3s mode The commit 59a0b022aa24 ("ipvlan: Make skb->skb_iif track skb->dev for l3s mode") fixed ipvlan bonded dev checking by updating skb skb_iif. This fix works for IPv4, as in raw_v4_input() the dif is from inet_iif(skb), which is skb->skb_iif when there is no route. But for IPv6, the fix is not enough, because in ipv6_raw_deliver() -> raw_v6_match(), the dif is inet6_iif(skb), which is returns IP6CB(skb)->iif instead of skb->skb_iif if it's not a l3_slave. To fix the IPv6 part issue. Let's set IP6CB(skb)->iif to correct ifindex. BTW, ipvlan handles NS/NA specifically. Since it works fine, I will not reset IP6CB(skb)->iif when addr->atype is IPVL_ICMPV6. Fixes: c675e06a98a4 ("ipvlan: decouple l3s mode dependencies from other modes") Link: https://bugzilla.redhat.com/show_bug.cgi?id=2196710 Signed-off-by: Hangbin Liu Reviewed-by: Larysa Zaremba Signed-off-by: David S. Miller commit d094482c9974a543851a18a1c587a7d132a81659 Author: Benjamin Berg Date: Sun Jun 11 12:14:29 2023 +0300 wifi: mac80211: fragment per STA profile correctly When fragmenting the ML per STA profile, the element ID should be IEEE80211_MLE_SUBELEM_PER_STA_PROFILE rather than WLAN_EID_FRAGMENT. Change the helper function to take the to be used element ID and pass the appropriate value for each of the fragmentation levels. Fixes: 81151ce462e5 ("wifi: mac80211: support MLO authentication/association with one link") Signed-off-by: Benjamin Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230611121219.9b5c793d904b.I7dad952bea8e555e2f3139fbd415d0cd2b3a08c3@changeid Signed-off-by: Johannes Berg commit 52f79609c0c5b25fddb88e85f25ce08aa7e3fb42 Author: Jakub Kicinski Date: Thu Jun 8 09:23:44 2023 -0700 net: ethtool: correct MAX attribute value for stats When compiling YNL generated code compiler complains about array-initializer-out-of-bounds. Turns out the MAX value for STATS_GRP uses the value for STATS. This may lead to random corruptions in user space (kernel itself doesn't use this value as it never parses stats). Fixes: f09ea6fb1272 ("ethtool: add a new command for reading standard stats") Signed-off-by: Jakub Kicinski Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 5e90aa21eb1372736e08cee0c0bf47735c5c4b95 Author: Shyam Prasad N Date: Fri Jun 9 17:46:58 2023 +0000 cifs: fix max_credits implementation The current implementation of max_credits on the client does not work because the CreditRequest logic for several commands does not take max_credits into account. Still, we can end up asking the server for more credits, depending on the number of credits in flight. For this, we need to limit the credits while parsing the responses too. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 2991b77409891e14a10b96899755c004b0c07edb Author: Shyam Prasad N Date: Fri Jun 9 17:46:59 2023 +0000 cifs: fix sockaddr comparison in iface_cmp iface_cmp used to simply do a memcmp of the two provided struct sockaddrs. The comparison needs to do more based on the address family. Similar logic was already present in cifs_match_ipaddr. Doing something similar now. Signed-off-by: Shyam Prasad N Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Steve French commit 50e63d6db6fd30a6dd9a33c49aa5b0bba36e1a92 Author: Enzo Matsumiya Date: Fri Jun 9 18:29:59 2023 -0300 smb/client: print "Unknown" instead of bogus link speed value The virtio driver for Linux guests will not set a link speed to its paravirtualized NICs. This will be seen as -1 in the ethernet layer, and when some servers (e.g. samba) fetches it, it's converted to an unsigned value (and multiplied by 1000 * 1000), so in client side we end up with: 1) Speed: 4294967295000000 bps in DebugData. This patch introduces a helper that returns a speed string (in Mbps or Gbps) if interface speed is valid (>= SPEED_10 and <= SPEED_800000), or "Unknown" otherwise. The reason to not change the value in iface->speed is because we don't know the real speed of the HW backing the server NIC, so let's keep considering these as the fastest NICs available. Also print "Capabilities: None" when the interface doesn't support any. Signed-off-by: Enzo Matsumiya Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 2a44b389664c193dc06cb37d9663d3c5a2a2b743 Author: Shyam Prasad N Date: Fri Jun 9 17:46:55 2023 +0000 cifs: print all credit counters in DebugData Output of /proc/fs/cifs/DebugData shows only the per-connection counter for the number of credits of regular type. i.e. the credits reserved for echo and oplocks are not displayed. There have been situations recently where having this info would have been useful. This change prints the credit counters of all three types: regular, echo, oplocks. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 91f4480c41f56f7c723323cf7f581f1d95d9ffbc Author: Shyam Prasad N Date: Fri Jun 9 17:46:54 2023 +0000 cifs: fix status checks in cifs_tree_connect The ordering of status checks at the beginning of cifs_tree_connect is wrong. As a result, a tcon which is good may stay marked as needing reconnect infinitely. Fixes: 2f0e4f034220 ("cifs: check only tcon status on tcon related functions") Cc: stable@vger.kernel.org # 6.3 Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit a5998a9ec3c03297a5b7f3df5c1979cd469a0da3 Author: 鑫华 Date: Tue Jun 6 23:34:56 2023 +0800 smb: remove obsolete comment Because do_gettimeofday has been removed and replaced by ktime_get_real_ts64, So just remove the comment as it's not needed now. Signed-off-by: 鑫华 Signed-off-by: Steve French commit 20cb1c2fb7568a6054c55defe044311397e01ddb Author: Ming Lei Date: Sat Jun 10 07:42:49 2023 +0800 blk-cgroup: Flush stats before releasing blkcg_gq As noted by Michal, the blkg_iostat_set's in the lockless list hold reference to blkg's to protect against their removal. Those blkg's hold reference to blkcg. When a cgroup is being destroyed, cgroup_rstat_flush() is only called at css_release_work_fn() which is called when the blkcg reference count reaches 0. This circular dependency will prevent blkcg and some blkgs from being freed after they are made offline. It is less a problem if the cgroup to be destroyed also has other controllers like memory that will call cgroup_rstat_flush() which will clean up the reference count. If block is the only controller that uses rstat, these offline blkcg and blkgs may never be freed leaking more and more memory over time. To prevent this potential memory leak: - flush blkcg per-cpu stats list in __blkg_release(), when no new stat can be added - add global blkg_stat_lock for covering concurrent parent blkg stat update - don't grab bio->bi_blkg reference when adding the stats into blkcg's per-cpu stat list since all stats are guaranteed to be consumed before releasing blkg instance, and grabbing blkg reference for stats was the most fragile part of original patch Based on Waiman's patch: https://lore.kernel.org/linux-block/20221215033132.230023-3-longman@redhat.com/ Fixes: 3b8cc6298724 ("blk-cgroup: Optimize blkcg_rstat_flush()") Cc: stable@vger.kernel.org Reported-by: Jay Shin Acked-by: Tejun Heo Cc: Waiman Long Cc: mkoutny@suse.com Cc: Yosry Ahmed Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230609234249.1412858-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 858fd168a95c5b9669aac8db6c14a9aeab446375 Author: Linus Torvalds Date: Sun Jun 11 14:35:30 2023 -0700 Linux 6.4-rc6 commit 699826f4e30ab76a62c238c86fbef7e826639c8d Author: Saravanan Vajravel Date: Tue Jun 6 03:25:31 2023 -0700 IB/isert: Fix incorrect release of isert connection The ib_isert module is releasing the isert connection both in isert_wait_conn() handler as well as isert_free_conn() handler. In isert_wait_conn() handler, it is expected to wait for iSCSI session logout operation to complete. It should free the isert connection only in isert_free_conn() handler. When a bunch of iSER target is cleared, this issue can lead to use-after-free memory issue as isert conn is twice released Fixes: b02efbfc9a05 ("iser-target: Fix implicit termination of connections") Reviewed-by: Sagi Grimberg Signed-off-by: Saravanan Vajravel Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/20230606102531.162967-4-saravanan.vajravel@broadcom.com Signed-off-by: Leon Romanovsky commit 7651e2d6c5b359a28c2d4c904fec6608d1021ca8 Author: Saravanan Vajravel Date: Tue Jun 6 03:25:30 2023 -0700 IB/isert: Fix possible list corruption in CMA handler When ib_isert module receives connection error event, it is releasing the isert session and removes corresponding list node but it doesn't take appropriate mutex lock to remove the list node. This can lead to linked list corruption Fixes: bd3792205aae ("iser-target: Fix pending connections handling in target stack shutdown sequnce") Signed-off-by: Selvin Xavier Signed-off-by: Saravanan Vajravel Link: https://lore.kernel.org/r/20230606102531.162967-3-saravanan.vajravel@broadcom.com Signed-off-by: Leon Romanovsky commit 691b0480933f0ce88a81ed1d1a0aff340ff6293a Author: Saravanan Vajravel Date: Tue Jun 6 03:25:29 2023 -0700 IB/isert: Fix dead lock in ib_isert - When a iSER session is released, ib_isert module is taking a mutex lock and releasing all pending connections. As part of this, ib_isert is destroying rdma cm_id. To destroy cm_id, rdma_cm module is sending CM events to CMA handler of ib_isert. This handler is taking same mutex lock. Hence it leads to deadlock between ib_isert & rdma_cm modules. - For fix, created local list of pending connections and release the connection outside of mutex lock. Calltrace: --------- [ 1229.791410] INFO: task kworker/10:1:642 blocked for more than 120 seconds. [ 1229.791416] Tainted: G OE --------- - - 4.18.0-372.9.1.el8.x86_64 #1 [ 1229.791418] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1229.791419] task:kworker/10:1 state:D stack: 0 pid: 642 ppid: 2 flags:0x80004000 [ 1229.791424] Workqueue: ib_cm cm_work_handler [ib_cm] [ 1229.791436] Call Trace: [ 1229.791438] __schedule+0x2d1/0x830 [ 1229.791445] ? select_idle_sibling+0x23/0x6f0 [ 1229.791449] schedule+0x35/0xa0 [ 1229.791451] schedule_preempt_disabled+0xa/0x10 [ 1229.791453] __mutex_lock.isra.7+0x310/0x420 [ 1229.791456] ? select_task_rq_fair+0x351/0x990 [ 1229.791459] isert_cma_handler+0x224/0x330 [ib_isert] [ 1229.791463] ? ttwu_queue_wakelist+0x159/0x170 [ 1229.791466] cma_cm_event_handler+0x25/0xd0 [rdma_cm] [ 1229.791474] cma_ib_handler+0xa7/0x2e0 [rdma_cm] [ 1229.791478] cm_process_work+0x22/0xf0 [ib_cm] [ 1229.791483] cm_work_handler+0xf4/0xf30 [ib_cm] [ 1229.791487] ? move_linked_works+0x6e/0xa0 [ 1229.791490] process_one_work+0x1a7/0x360 [ 1229.791491] ? create_worker+0x1a0/0x1a0 [ 1229.791493] worker_thread+0x30/0x390 [ 1229.791494] ? create_worker+0x1a0/0x1a0 [ 1229.791495] kthread+0x10a/0x120 [ 1229.791497] ? set_kthread_struct+0x40/0x40 [ 1229.791499] ret_from_fork+0x1f/0x40 [ 1229.791739] INFO: task targetcli:28666 blocked for more than 120 seconds. [ 1229.791740] Tainted: G OE --------- - - 4.18.0-372.9.1.el8.x86_64 #1 [ 1229.791741] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1229.791742] task:targetcli state:D stack: 0 pid:28666 ppid: 5510 flags:0x00004080 [ 1229.791743] Call Trace: [ 1229.791744] __schedule+0x2d1/0x830 [ 1229.791746] schedule+0x35/0xa0 [ 1229.791748] schedule_preempt_disabled+0xa/0x10 [ 1229.791749] __mutex_lock.isra.7+0x310/0x420 [ 1229.791751] rdma_destroy_id+0x15/0x20 [rdma_cm] [ 1229.791755] isert_connect_release+0x115/0x130 [ib_isert] [ 1229.791757] isert_free_np+0x87/0x140 [ib_isert] [ 1229.791761] iscsit_del_np+0x74/0x120 [iscsi_target_mod] [ 1229.791776] lio_target_np_driver_store+0xe9/0x140 [iscsi_target_mod] [ 1229.791784] configfs_write_file+0xb2/0x110 [ 1229.791788] vfs_write+0xa5/0x1a0 [ 1229.791792] ksys_write+0x4f/0xb0 [ 1229.791794] do_syscall_64+0x5b/0x1a0 [ 1229.791798] entry_SYSCALL_64_after_hwframe+0x65/0xca Fixes: bd3792205aae ("iser-target: Fix pending connections handling in target stack shutdown sequnce") Reviewed-by: Sagi Grimberg Signed-off-by: Selvin Xavier Signed-off-by: Saravanan Vajravel Link: https://lore.kernel.org/r/20230606102531.162967-2-saravanan.vajravel@broadcom.com Signed-off-by: Leon Romanovsky commit 4c605260bc60347d3d5601900704cb22b0b2efec Merge: 65d7ca5987f29 a37f2699c36a7 Author: Linus Torvalds Date: Sun Jun 11 10:14:02 2023 -0700 Merge tag 'x86_urgent_for_v6.4_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Borislav Petkov: - Set up the kernel CS earlier in the boot process in case EFI boots the kernel after bypassing the decompressor and the CS descriptor used ends up being the EFI one which is not mapped in the identity page table, leading to early SEV/SNP guest communication exceptions resulting in the guest crashing * tag 'x86_urgent_for_v6.4_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/head/64: Switch to KERNEL_CS as soon as new GDT is installed commit 65d7ca5987f29f4c3d5c0889d2f046bb246d18d4 Merge: 022ce8862dff8 1c1bcf2d3ea06 Author: Linus Torvalds Date: Sun Jun 11 10:07:35 2023 -0700 Merge tag '6.4-rc5-smb3-server-fixes' of git://git.samba.org/ksmbd Pull smb server fixes from Steve French: "Five smb3 server fixes, all also for stable: - Fix four slab out of bounds warnings: improve checks for protocol id, and for small packet length, and for create context parsing, and for negotiate context parsing - Fix for incorrect dereferencing POSIX ACLs" * tag '6.4-rc5-smb3-server-fixes' of git://git.samba.org/ksmbd: ksmbd: validate smb request protocol id ksmbd: check the validation of pdu_size in ksmbd_conn_handler_loop ksmbd: fix posix_acls and acls dereferencing possible ERR_PTR() ksmbd: fix out-of-bound read in parse_lease_state() ksmbd: fix out-of-bound read in deassemble_neg_contexts() commit 617f5db1a626f18d5cbb7c7faf7bf8f9ea12be78 Author: Mark Bloch Date: Mon Jun 5 13:33:26 2023 +0300 RDMA/mlx5: Fix affinity assignment The cited commit aimed to ensure that Virtual Functions (VFs) assign a queue affinity to a Queue Pair (QP) to distribute traffic when the LAG master creates a hardware LAG. If the affinity was set while the hardware was not in LAG, the firmware would ignore the affinity value. However, this commit unintentionally assigned an affinity to QPs on the LAG master's VPORT even if the RDMA device was not marked as LAG-enabled. In most cases, this was not an issue because when the hardware entered hardware LAG configuration, the RDMA device of the LAG master would be destroyed and a new one would be created, marked as LAG-enabled. The problem arises when a user configures Equal-Cost Multipath (ECMP). In ECMP mode, traffic can be directed to different physical ports based on the queue affinity, which is intended for use by VPORTS other than the E-Switch manager. ECMP mode is supported only if both E-Switch managers are in switchdev mode and the appropriate route is configured via IP. In this configuration, the RDMA device is not destroyed, and we retain the RDMA device that is not marked as LAG-enabled. To ensure correct behavior, Send Queues (SQs) opened by the E-Switch manager through verbs should be assigned strict affinity. This means they will only be able to communicate through the native physical port associated with the E-Switch manager. This will prevent the firmware from assigning affinity and will not allow the SQs to be remapped in case of failover. Fixes: 802dcc7fc5ec ("RDMA/mlx5: Support TX port affinity for VF drivers in LAG mode") Reviewed-by: Maor Gottlieb Signed-off-by: Mark Bloch Link: https://lore.kernel.org/r/425b05f4da840bc684b0f7e8ebf61aeb5cef09b0.1685960567.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 62fab312fa1683e812e605db20d4f22de3e3fb2f Author: Yishai Hadas Date: Mon Jun 5 13:33:25 2023 +0300 IB/uverbs: Fix to consider event queue closing also upon non-blocking mode Fix ib_uverbs_event_read() to consider event queue closing also upon non-blocking mode. Once the queue is closed (e.g. hot-plug flow) all the existing events are cleaned-up as part of ib_uverbs_free_event_queue(). An application that uses the non-blocking FD mode should get -EIO in that case to let it knows that the device was removed already. Otherwise, it can loose the indication that the device was removed and won't recover. As part of that, refactor the code to have a single flow with regards to 'is_closed' for both blocking and non-blocking modes. Fixes: 14e23bd6d221 ("RDMA/core: Fix locking in ib_uverbs_event_read") Reviewed-by: Maor Gottlieb Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/97b00116a1e1e13f8dc4ec38a5ea81cf8c030210.1685960567.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 0cadb4db79e1d9eea66711c4031e435c2191907e Author: Edward Srouji Date: Mon Jun 5 13:33:24 2023 +0300 RDMA/uverbs: Restrict usage of privileged QKEYs According to the IB specification rel-1.6, section 3.5.3: "QKEYs with the most significant bit set are considered controlled QKEYs, and a HCA does not allow a consumer to arbitrarily specify a controlled QKEY." Thus, block non-privileged users from setting such a QKEY. Cc: stable@vger.kernel.org Fixes: bc38a6abdd5a ("[PATCH] IB uverbs: core implementation") Signed-off-by: Edward Srouji Link: https://lore.kernel.org/r/c00c809ddafaaf87d6f6cb827978670989a511b3.1685960567.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 58030c76cce473b6cfd630bbecb97215def0dff8 Author: Mark Zhang Date: Mon Jun 5 13:33:23 2023 +0300 RDMA/cma: Always set static rate to 0 for RoCE Set static rate to 0 as it should be discovered by path query and has no meaning for RoCE. This also avoid of using the rtnl lock and ethtool API, which is a bottleneck when try to setup many rdma-cm connections at the same time, especially with multiple processes. Fixes: 3c86aa70bf67 ("RDMA/cm: Add RDMA CM support for IBoE devices") Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/f72a4f8b667b803aee9fa794069f61afb5839ce4.1685960567.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 2de43f5b5137e03ef64a2c3f064a01992830c67f Author: Patrisious Haddad Date: Mon Jun 5 13:33:21 2023 +0300 RDMA/mlx5: Fix Q-counters query in LAG mode Previously we used the core device associated to the IB device in order to do the Q-counters query to the FW, but in LAG mode it is possible that the core device isn't the one that created this VF. Hence instead of using the core device to query the Q-counters we use the ESW core device which is guaranteed to be that of the VF. Fixes: d22467a71ebe ("RDMA/mlx5: Expand switchdev Q-counters to expose representor statistics") Signed-off-by: Patrisious Haddad Reviewed-by: Mark Zhang Link: https://lore.kernel.org/r/778d7d7a24892348d0bdef17d2e5f9e044717e86.1685960567.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit e80ef139488fb4f481c877a81f6ba54f1f0ee416 Author: Patrisious Haddad Date: Mon Jun 5 13:33:20 2023 +0300 RDMA/mlx5: Remove vport Q-counters dependency on normal Q-counters Previously the Q-counters initialization assumed that the vport Q-counters structures and the normal Q-counters structures are identical in size, and hence when a Q-counter was added to normal Q-counters structure but not to the vport Q-counters struct it would lead to that counter name being NULL in switchdev mode, which could cause the kernel crash below. Currently break the dependency between those two structure and always use the appropriate struct size, in order to remove the assumption that both structure sizes are equal. BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 20c64a067 P4D 20c64a067 PUD 20152b067 PMD 0 Oops: 0000 [#1] SMP CPU: 19 PID: 11717 Comm: devlink Tainted: G OE 6.2.0_mlnx #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:strlen+0x0/0x20 Code: 66 2e 0f 1f 84 00 00 00 00 00 48 01 fe eb 0f 0f b6 07 38 d0 74 10 48 83 c7 01 84 c0 74 05 48 39 f7 75 ec 31 c0 c3 48 89 f8 c3 <80> 3f 00 48 89 f8 74 10 48 83 c7 01 80 3f 00 75 f7 48 29 c7 48 89 RSP: 0018:ffffc9000318b618 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000002c00 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffff888211918110 R09: ffff888211918000 R10: 000000000000001e R11: ffff888211918000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: ffff8881038ec250 FS: 00007fa53342fe80(0000) GS:ffff88885fcc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000002042b2003 CR4: 0000000000770ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: kernfs_name_hash+0x12/0x80 kernfs_find_ns+0x35/0xb0 kernfs_remove_by_name_ns+0x46/0xc0 remove_files.isra.1+0x30/0x70 internal_create_group+0x253/0x380 internal_create_groups.part.4+0x3e/0xa0 setup_port+0x27a/0x8c0 [ib_core] ib_setup_port_attrs+0x9d/0x300 [ib_core] ib_register_device+0x48e/0x550 [ib_core] __mlx5_ib_add+0x2b/0x80 [mlx5_ib] mlx5_ib_vport_rep_load+0x141/0x360 [mlx5_ib] mlx5_esw_offloads_rep_load+0x48/0xa0 [mlx5_core] esw_offloads_enable+0x41e/0xd10 [mlx5_core] mlx5_eswitch_enable_locked+0x1e3/0x340 [mlx5_core] ? __cond_resched+0x15/0x30 mlx5_devlink_eswitch_mode_set+0x204/0x3c0 [mlx5_core] devlink_nl_cmd_eswitch_set_doit+0x8d/0x100 genl_family_rcv_msg_doit.isra.19+0xea/0x110 genl_rcv_msg+0x19b/0x290 ? devlink_nl_cmd_region_read_dumpit+0x760/0x760 ? devlink_nl_cmd_port_param_get_doit+0x30/0x30 ? devlink_put+0x50/0x50 ? genl_get_cmd_both+0x60/0x60 netlink_rcv_skb+0x54/0x100 genl_rcv+0x24/0x40 netlink_unicast+0x1be/0x2a0 netlink_sendmsg+0x361/0x4d0 sock_sendmsg+0x30/0x40 __sys_sendto+0x11a/0x150 ? handle_mm_fault+0x101/0x2b0 ? do_user_addr_fault+0x21d/0x720 __x64_sys_sendto+0x24/0x30 do_syscall_64+0x34/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fa533611cba Code: d8 64 89 02 48 c7 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 15 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 76 c3 0f 1f 44 00 00 55 48 83 ec 30 44 89 4c RSP: 002b:00007ffdb6a898a8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000daab00 RCX: 00007fa533611cba RDX: 0000000000000038 RSI: 0000000000daab00 RDI: 0000000000000003 RBP: 0000000000daa910 R08: 00007fa533822000 R09: 000000000000000c R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001 Modules linked in: rdma_ucm(OE) rdma_cm(OE) iw_cm(OE) ib_ipoib(OE) ib_cm(OE) ib_umad(OE) mlx5_ib(OE) mlx5_core(OE) mlxdevm(OE) ib_uverbs(OE) ib_core(OE) mlx_compat(OE) mlxfw(OE) memtrack(OE) pci_hyperv_intf nfsv3 nfs_acl rpcsec_gss_krb5 auth_rpcgss nfsv4 xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_filter iptable_nat dns_resolver nf_nat br_netfilter nfs bridge stp llc lockd grace fscache netfs rfkill overlay iTCO_wdt iTCO_vendor_support kvm_intel kvm irqbypass crc32_pclmul ghash_clmulni_intel i2c_i801 sunrpc lpc_ich sha512_ssse3 pcspkr i2c_smbus mfd_core drm sch_fq_codel i2c_core ip_tables fuse crc32c_intel serio_raw virtio_net net_failover failover [last unloaded: mlxfw] CR2: 0000000000000000 ---[ end trace 0000000000000000 ]--- RIP: 0010:strlen+0x0/0x20 Code: 66 2e 0f 1f 84 00 00 00 00 00 48 01 fe eb 0f 0f b6 07 38 d0 74 10 48 83 c7 01 84 c0 74 05 48 39 f7 75 ec 31 c0 c3 48 89 f8 c3 <80> 3f 00 48 89 f8 74 10 48 83 c7 01 80 3f 00 75 f7 48 29 c7 48 89 RSP: 0018:ffffc9000318b618 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000002c00 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffff888211918110 R09: ffff888211918000 R10: 000000000000001e R11: ffff888211918000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: ffff8881038ec250 FS: 00007fa53342fe80(0000) GS:ffff88885fcc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000002042b2003 CR4: 0000000000770ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Kernel panic - not syncing: Fatal exception Kernel Offset: disabled ---[ end Kernel panic - not syncing: Fatal exception ]--- Fixes: d22467a71ebe ("RDMA/mlx5: Expand switchdev Q-counters to expose representor statistics") Signed-off-by: Patrisious Haddad Reviewed-by: Mark Zhang Link: https://lore.kernel.org/r/016777b7f16eb6bb178999ff59097d0c0f91f68a.1685960567.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit c2ea687e5e0e29802714a981a1ccdc17c2c4b2be Author: Patrisious Haddad Date: Mon Jun 5 13:33:19 2023 +0300 RDMA/mlx5: Fix Q-counters per vport allocation Previously Q-counters data was being allocated over the PF for all of the available vports, however that isn't necessary. Since each VF or SF has a Q-counter allocated for itself. So we only need to allocate two counters data structures, one for the device counters, and one for all the other vports to expose the representors, since they only need to read from it in order to determine mainly counters numbers and names, so they can all share. This in turn also solves a bug we previously had where we couldn't switch the device to switchdev mode when there were more than 128 SF/VFs configured, since that is the maximum amount of Q-counters available for a single port Fixes: d22467a71ebe ("RDMA/mlx5: Expand switchdev Q-counters to expose representor statistics") Signed-off-by: Patrisious Haddad Reviewed-by: Mark Zhang Link: https://lore.kernel.org/r/f54671df16e2227a069b229b33b62cd9ee24c475.1685960567.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit e1f4a52ac171dd863fe89055e749ef5e0a0bc5ce Author: Mark Bloch Date: Mon Jun 5 13:33:18 2023 +0300 RDMA/mlx5: Create an indirect flow table for steering anchor A misbehaved user can create a steering anchor that points to a kernel flow table and then destroy the anchor without freeing the associated STC. This creates a problem as the kernel can't destroy the flow table since there is still a reference to it. As a result, this can exhaust all available flow table resources, preventing other users from using the RDMA device. To prevent this problem, a solution is implemented where a special flow table with two steering rules is created when a user creates a steering anchor for the first time. The rules include one that drops all traffic and another that points to the kernel flow table. If the steering anchor is destroyed, only the rule pointing to the kernel's flow table is removed. Any traffic reaching the special flow table after that is dropped. Since the special flow table is not destroyed when the steering anchor is destroyed, any issues are prevented from occurring. The remaining resources are only destroyed when the RDMA device is destroyed, which happens after all DEVX objects are freed, including the STCs, thus mitigating the issue. Fixes: 0c6ab0ca9a66 ("RDMA/mlx5: Expose steering anchor to userspace") Signed-off-by: Mark Bloch Reviewed-by: Maor Gottlieb Link: https://lore.kernel.org/r/b4a88a871d651fa4e8f98d552553c1cfe9ba2cd6.1685960567.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit ee4d269eccfea6c17b18281bef482700d898e86f Author: Maher Sanalla Date: Mon Jun 5 13:33:17 2023 +0300 RDMA/mlx5: Initiate dropless RQ for RAW Ethernet functions Delay drop data is initiated for PFs that have the capability of rq_delay_drop and are in roce profile. However, PFs with RAW ethernet profile do not initiate delay drop data on function load, causing kernel panic if delay drop struct members are accessed later on in case a dropless RQ is created. Thus, stage the delay drop initialization as part of RAW ethernet PF loading process. Fixes: b5ca15ad7e61 ("IB/mlx5: Add proper representors support") Signed-off-by: Maher Sanalla Reviewed-by: Maor Gottlieb Link: https://lore.kernel.org/r/2e9d386785043d48c38711826eb910315c1de141.1685960567.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 022ce8862dff83c859089cd14bc4dca0733e2f90 Merge: 6be5e47b69d8b 33f36147be36c Author: Linus Torvalds Date: Sat Jun 10 13:36:07 2023 -0700 Merge tag 'i2c-for-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Biggest news is that Andi Shyti steps in for maintaining the controller drivers. Thank you very much! Other than that, one new driver maintainer and the rest is usual driver bugfixes. at24 has a Kconfig dependecy fix" * tag 'i2c-for-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: MAINTAINERS: Add entries for Renesas RZ/V2M I2C driver eeprom: at24: also select REGMAP i2c: sprd: Delete i2c adapter in .remove's error path i2c: mv64xxx: Fix reading invalid status value in atomic mode i2c: designware: fix idx_write_cnt in read loop i2c: mchp-pci1xxxx: Avoid cast to incompatible function type i2c: img-scb: Fix spelling mistake "innacurate" -> "inaccurate" MAINTAINERS: Add myself as I2C host drivers maintainer commit 6be5e47b69d8bb7c3dba8d84807624954243c23a Merge: 859c74595156f 58d95889f3c20 Author: Linus Torvalds Date: Sat Jun 10 13:21:04 2023 -0700 Merge tag 'soundwire-6.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire Pull soundwire fixes from Vinod Koul: "Core fix for missing flag clear, error patch handling in qcom driver and BIOS quirk for HP Spectre x360: - HP Spectre x360 soundwire DMI quirk - Error path handling for qcom driver - Core fix for missing clear of alloc_slave_rt" * tag 'soundwire-6.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: stream: Add missing clear of alloc_slave_rt soundwire: qcom: add proper error paths in qcom_swrm_startup() soundwire: dmi-quirks: add new mapping for HP Spectre x360 commit 859c74595156f894c4e8edd523c6d1c4a1899127 Merge: 64569520920a3 5cdd5ec176544 Author: Linus Torvalds Date: Sat Jun 10 13:01:09 2023 -0700 Merge tag 'arm-fixes-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "Most of the changes this time are for the Qualcomm Snapdragon platforms. There are bug fixes for error handling in Qualcomm icc-bwmon, rpmh-rsc, ramp_controller and rmtfs driver as well as the AMD tee firmware driver and a missing initialization in the Arm ff-a firmware driver. The Qualcomm RPMh and EDAC drivers need some rework to work correctly on all supported chips. The DT fixes include: - i.MX8 fixes for gpio, pinmux and clock settings - ADS touchscreen gpio polarity settings in several machines - Address dtb warnings for caches, panel and input-enable properties on Qualcomm platforms - Incorrect data on qualcomm platforms fir SA8155P power domains, SM8550 LLCC, SC7180-lite SDRAM frequencies and SM8550 soundwire - Remoteproc firmware paths are corrected for Sony Xperia 10 IV" * tag 'arm-fixes-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (36 commits) firmware: arm_ffa: Set handle field to zero in memory descriptor ARM: dts: Fix erroneous ADS touchscreen polarities arm64: dts: imx8mn-beacon: Fix SPI CS pinmux arm64: dts: imx8-ss-dma: assign default clock rate for lpuarts arm64: dts: imx8qm-mek: correct GPIOs for USDHC2 CD and WP signals EDAC/qcom: Get rid of hardcoded register offsets EDAC/qcom: Remove superfluous return variable assignment in qcom_llcc_core_setup() arm64: dts: qcom: sm8550: Use the correct LLCC register scheme dt-bindings: cache: qcom,llcc: Fix SM8550 description arm64: dts: qcom: sc7180-lite: Fix SDRAM freq for misidentified sc7180-lite boards arm64: dts: qcom: sm8550: use uint16 for Soundwire interval soc: qcom: rpmhpd: Add SA8155P power domains arm64: dts: qcom: Split out SA8155P and use correct RPMh power domains dt-bindings: power: qcom,rpmpd: Add SA8155P soc: qcom: Rename ice to qcom_ice to avoid module name conflict soc: qcom: rmtfs: Fix error code in probe() soc: qcom: ramp_controller: Fix an error handling path in qcom_ramp_controller_probe() ARM: dts: at91: sama7g5ek: fix debounce delay property for shdwc ARM: at91: pm: fix imbalanced reference counter for ethernet devices arm64: dts: qcom: sm6375-pdx225: Fix remoteproc firmware paths ... commit 7ebe4eda4265642859507d1b3ca330d8c196cfe5 Author: David Christensen Date: Thu Jun 8 16:01:43 2023 -0400 bnx2x: fix page fault following EEH recovery In the last step of the EEH recovery process, the EEH driver calls into bnx2x_io_resume() to re-initialize the NIC hardware via the function bnx2x_nic_load(). If an error occurs during bnx2x_nic_load(), OS and hardware resources are released and an error code is returned to the caller. When called from bnx2x_io_resume(), the return code is ignored and the network interface is brought up unconditionally. Later attempts to send a packet via this interface result in a page fault due to a null pointer reference. This patch checks the return code of bnx2x_nic_load(), prints an error message if necessary, and does not enable the interface. Signed-off-by: David Christensen Reviewed-by: Sridhar Samudrala Signed-off-by: David S. Miller commit 65d8bd81aa15c36d9703f4393651d10edf1f030c Merge: b403643d154d1 1240eb93f0616 Author: David S. Miller Date: Sat Jun 10 19:57:03 2023 +0100 Merge tag 'nf-23-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf netfilter pull request 23-06-08 Pablo Neira Ayuso says: ==================== The following patchset contains Netfilter fixes for net: 1) Add commit and abort set operation to pipapo set abort path. 2) Bail out immediately in case of ENOMEM in nfnetlink batch. 3) Incorrect error path handling when creating a new rule leads to dangling pointer in set transaction list. ==================== Signed-off-by: David S. Miller commit b403643d154d15176b060b82f7fc605210033edd Author: Dmitry Mastykin Date: Thu Jun 8 16:57:54 2023 +0300 netlabel: fix shift wrapping bug in netlbl_catmap_setlong() There is a shift wrapping bug in this code on 32-bit architectures. NETLBL_CATMAP_MAPTYPE is u64, bitmap is unsigned long. Every second 32-bit word of catmap becomes corrupted. Signed-off-by: Dmitry Mastykin Acked-by: Paul Moore Signed-off-by: David S. Miller commit 14df9526046d2a6d2b3e002e952714ce04fc9bd7 Merge: 1b8975f30abff 87e12a17eef47 Author: David S. Miller Date: Sat Jun 10 19:53:02 2023 +0100 Merge branch 'octeontx2-af-fixes' Naveen Mamindlapalli says: ==================== RVU NIX AF driver fixes This patch series contains few fixes to the RVU NIX AF driver. The first patch modifies the driver check to validate whether the req count for contiguous and non-contiguous arrays is less than the maximum limit. The second patch fixes HW lbk interface link credit programming. ==================== Signed-off-by: David S. Miller commit 87e12a17eef476bbf768dc3a74419ad461f36fbc Author: Nithin Dabilpuram Date: Thu Jun 8 17:12:01 2023 +0530 octeontx2-af: fix lbk link credits on cn10k Fix LBK link credits on CN10K to be same as CN9K i.e 16 * MAX_LBK_DATA_RATE instead of current scheme of calculation based on LBK buf length / FIFO size. Fixes: 6e54e1c5399a ("octeontx2-af: cn10K: Add MTU configuration") Signed-off-by: Nithin Dabilpuram Signed-off-by: Naveen Mamindlapalli Reviewed-by: Sridhar Samudrala Signed-off-by: David S. Miller commit 4e635f9d86165e47f5440196f2ebdb258efb8341 Author: Satha Rao Date: Thu Jun 8 17:12:00 2023 +0530 octeontx2-af: fixed resource availability check txschq_alloc response have two different arrays to store continuous and non-continuous schedulers of each level. Requested count should be checked for each array separately. Fixes: 5d9b976d4480 ("octeontx2-af: Support fixed transmit scheduler topology") Signed-off-by: Satha Rao Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Naveen Mamindlapalli Reviewed-by: Sridhar Samudrala Signed-off-by: David S. Miller commit 1b8975f30abffc4f74f1ba049f9042e7d8f646cc Merge: c37cf54c12cfa 78c50d6961fc0 Author: Jakub Kicinski Date: Sat Jun 10 00:11:18 2023 -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 2023-06-08 (ice) This series contains updates to ice driver only. Simon Horman stops null pointer dereference for GNSS error path. Kamil fixes memory leak when downing interface when XDP is enabled. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: Fix XDP memory leak when NIC is brought up and down ice: Don't dereference NULL in ice_gnss_read error path ==================== Link: https://lore.kernel.org/r/20230608200051.451752-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit c37cf54c12cfaa51e7aaf88708167b0d3259e64e Author: Ahmed Zaki Date: Thu Jun 8 13:02:26 2023 -0700 iavf: remove mask from iavf_irq_enable_queues() Enable more than 32 IRQs by removing the u32 bit mask in iavf_irq_enable_queues(). There is no need for the mask as there are no callers that select individual IRQs through the bitmask. Also, if the PF allocates more than 32 IRQs, this mask will prevent us from using all of them. Modify the comment in iavf_register.h to show that the maximum number allowed for the IRQ index is 63 as per the iAVF standard 1.0 [1]. link: [1] https://www.intel.com/content/dam/www/public/us/en/documents/product-specifications/ethernet-adaptive-virtual-function-hardware-spec.pdf Fixes: 5eae00c57f5e ("i40evf: main driver core") Signed-off-by: Ahmed Zaki Tested-by: Rafal Romanowski Reviewed-by: Simon Horman Reviewed-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20230608200226.451861-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit bc51d371bc9ab7f153e387b7d63a13cc7d8c5ac0 Merge: 04c55383fa568 626cb7a5f6b89 Author: Jakub Kicinski Date: Sat Jun 10 00:02:17 2023 -0700 Merge branch 'selftests-mptcp-skip-tests-not-supported-by-old-kernels-part-2' Matthieu Baerts says: ==================== selftests: mptcp: skip tests not supported by old kernels (part 2) After a few years of increasing test coverage in the MPTCP selftests, we realised [1] the last version of the selftests is supposed to run on old kernels without issues. Supporting older versions is not that easy for this MPTCP case: these selftests are often validating the internals by checking packets that are exchanged, when some MIB counters are incremented after some actions, how connections are getting opened and closed in some cases, etc. In other words, it is not limited to the socket interface between the userspace and the kernelspace. In addition to that, the current MPTCP selftests run a lot of different sub-tests but the TAP13 protocol used in the selftests don't support sub-tests: one failure in sub-tests implies that the whole selftest is seen as failed at the end because sub-tests are not tracked. It is then important to skip sub-tests not supported by old kernels. To minimise the modifications and reduce the complexity to support old versions, the idea is to look at external signs and skip the whole selftests or just some sub-tests before starting them. This cannot be applied in all cases. This second part focuses on marking different sub-tests as skipped if some MPTCP features are not supported. A few techniques are used here: - Before starting some tests: - Check if a file (sysctl knob) is present: that's what patch 13/14 is doing for the userspace PM feature. - Check if a symbol is present in /proc/kallsyms: patch 1/14 adds some helpers in mptcp_lib.sh to ease its use. Then these helpers are used in patches 2, 3, 4, 10, 11 and 14/14. - Set a flag and get the status to check if a feature is supported: patch 8/14 is doing that with the 'fullmesh' flag. - After having launched the tests: - Retrieve the counters after a test and check if they are different than 0. Similar to the check with the flag, that's not ideal but in this case, the counters were already present before the introduction of MPTCP but they have been supported by MPTCP sockets only later. Patches 5 and 6/14 are using this technique. Before skipping tests, SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES env var value is checked: if it is set to 1, the test is marked as "failed" instead of "skipped". MPTCP public CI expects to have all features supported and it sets this env var to 1 to catch regressions in these new checks. Patches 7/14 and 9/14 are a bit different because they don't skip tests: - Patch 7/14 retrieves the default values instead of using hardcoded ones because these default values have been modified at some points. Then the comparisons are done with the default values. - patch 9/14 relaxes the expected returned size from MPTCP's getsockopt because the different structures gathering various info can get new fields and get bigger over time. We cannot expect that the userspace is using the same structure as the kernel. Patch 12/14 marks the test as "skipped" instead of "failed" if the "ip" tool is not available. In this second part, the "mptcp_join" selftest is not modified yet. This will come soon after in the third part with quite a few patches. Link: https://lore.kernel.org/stable/CA+G9fYtDGpgT4dckXD-y-N92nqUxuvue_7AtDdBcHrbOMsDZLg@mail.gmail.com/ [1] Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 ==================== Link: https://lore.kernel.org/r/20230608-upstream-net-20230608-mptcp-selftests-support-old-kernels-part-2-v1-0-20997a6fd841@tessares.net Signed-off-by: Jakub Kicinski commit 626cb7a5f6b892e48f27a76d11af040c538e03dc Author: Matthieu Baerts Date: Thu Jun 8 18:38:56 2023 +0200 selftests: mptcp: userspace pm: skip PM listener events tests if unavailable Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the new listener events linked to the path-manager introduced by commit f8c9dfbd875b ("mptcp: add pm listener events"). It is possible to look for "mptcp_event_pm_listener" in kallsyms to know in advance if the kernel supports this feature and skip these sub-tests if the feature is not supported. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 6c73008aa301 ("selftests: mptcp: listener test for userspace PM") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit f90adb033891d418c5dafef34a9aa49f3c860991 Author: Matthieu Baerts Date: Thu Jun 8 18:38:55 2023 +0200 selftests: mptcp: userspace pm: skip if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the MPTCP Userspace PM introduced by commit 4638de5aefe5 ("mptcp: handle local addrs announced by userspace PMs"). We can skip all these tests if the feature is not supported simply by looking for the MPTCP pm_type's sysctl knob. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 259a834fadda ("selftests: mptcp: functional tests for the userspace PM type") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 723d6b9b12338c1caf06bf6fe269962ef04e2c71 Author: Matthieu Baerts Date: Thu Jun 8 18:38:54 2023 +0200 selftests: mptcp: userspace pm: skip if 'ip' tool is unavailable When a required tool is missing, the return code 4 (SKIP) should be returned instead of 1 (FAIL). Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 259a834fadda ("selftests: mptcp: functional tests for the userspace PM type") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit b631e3a4e94c77c9007d60b577a069c203ce9594 Author: Matthieu Baerts Date: Thu Jun 8 18:38:53 2023 +0200 selftests: mptcp: sockopt: skip TCP_INQ checks if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is TCP_INQ cmsg support introduced in commit 2c9e77659a0c ("mptcp: add TCP_INQ cmsg support"). It is possible to look for "mptcp_ioctl" in kallsyms because it was needed to introduce the mentioned feature. We can skip these tests and not set TCPINQ option if the feature is not supported. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 5cbd886ce2a9 ("selftests: mptcp: add TCP_INQ support") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit c6f7eccc519837ebde1d099d9610c4f1d5bd975e Author: Matthieu Baerts Date: Thu Jun 8 18:38:52 2023 +0200 selftests: mptcp: sockopt: skip getsockopt checks if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the getsockopt(SOL_MPTCP) to get info about the MPTCP connections introduced by commit 55c42fa7fa33 ("mptcp: add MPTCP_INFO getsockopt") and the following ones. It is possible to look for "mptcp_diag_fill_info" in kallsyms because it is introduced by the mentioned feature. So we can know in advance if the feature is supported and skip the sub-test if not. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: ce9979129a0b ("selftests: mptcp: add mptcp getsockopt test cases") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 8dee6ca2ac1e5630a7bb6a98bc0b686916fc2000 Author: Matthieu Baerts Date: Thu Jun 8 18:38:51 2023 +0200 selftests: mptcp: sockopt: relax expected returned size Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the getsockopt(SOL_MPTCP) to get info about the MPTCP connections introduced by commit 55c42fa7fa33 ("mptcp: add MPTCP_INFO getsockopt") and the following ones. We cannot guess in advance which sizes the kernel will returned: older kernel can returned smaller sizes, e.g. recently the tcp_info structure has been modified in commit 71fc704768f6 ("tcp: add rcv_wnd and plb_rehash to TCP_INFO") where a new field has been added. The userspace can also expect a smaller size if it is compiled with old uAPI kernel headers. So for these sizes, we can only check if they are above a certain threshold, 0 for the moment. We can also only compared sizes with the ones set by the kernel. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: ce9979129a0b ("selftests: mptcp: add mptcp getsockopt test cases") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit f3761b50b8e4cb4807b5d41e02144c8c8a0f2512 Author: Matthieu Baerts Date: Thu Jun 8 18:38:50 2023 +0200 selftests: mptcp: pm nl: skip fullmesh flag checks if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the fullmesh flag that can be given to the MPTCP in-kernel path-manager and introduced in commit 2843ff6f36db ("mptcp: remote addresses fullmesh"). If the flag is not visible in the dump after having set it, we don't check the content. Note that if we expect to have this feature and SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES env var is set to 1, we always check the content to avoid regressions. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 6da1dfdd037e ("selftests: mptcp: add set_flags tests in pm_netlink.sh") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 2177d0b08e421971e035672b70f3228d9485c650 Author: Matthieu Baerts Date: Thu Jun 8 18:38:49 2023 +0200 selftests: mptcp: pm nl: remove hardcoded default limits Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the checks of the default limits returned by the MPTCP in-kernel path-manager. The default values have been modified by commit 72bcbc46a5c3 ("mptcp: increase default max additional subflows to 2"). Instead of comparing with hardcoded values, we can get the default one and compare with them. Note that if we expect to have the latest version, we continue to check the hardcoded values to avoid unexpected behaviour changes. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: eedbc685321b ("selftests: add PM netlink functional tests") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit dc93086aff040349b5b2a4608c71ea01286dc2cc Author: Matthieu Baerts Date: Thu Jun 8 18:38:48 2023 +0200 selftests: mptcp: diag: skip inuse tests if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the reporting of the MPTCP sockets being used, introduced by commit c558246ee73e ("mptcp: add statistics for mptcp socket in use"). Similar to the parent commit, it looks like there is no good pre-check to do here, i.e. dedicated function available in kallsyms. Instead, we try to get info and if nothing is returned, the test is marked as skipped. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: e04a30f78809 ("selftest: mptcp: add test for mptcp socket in use") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit dc97251bf0b70549c76ba261516c01b8096771c5 Author: Matthieu Baerts Date: Thu Jun 8 18:38:47 2023 +0200 selftests: mptcp: diag: skip listen tests if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the listen diag dump support introduced by commit 4fa39b701ce9 ("mptcp: listen diag dump support"). It looks like there is no good pre-check to do here, i.e. dedicated function available in kallsyms. Instead, we try to get info if nothing is returned, the test is marked as skipped. That's not ideal because something could be wrong with the feature and instead of reporting an error, the test could be marked as skipped. If we know in advanced that the feature is supposed to be supported, the tester can set SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES env var to 1: in this case the test will report an error instead of marking the test as skipped if nothing is returned. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: f2ae0fa68e28 ("selftests/mptcp: add diag listen tests") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 06b03083158e90d57866fa220de92c8dd8b9598b Author: Matthieu Baerts Date: Thu Jun 8 18:38:46 2023 +0200 selftests: mptcp: connect: skip TFO tests if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the support of TCP_FASTOPEN socket option with MPTCP connections introduced by commit 4ffb0a02346c ("mptcp: add TCP_FASTOPEN sock option"). It is possible to look for "mptcp_fastopen_" in kallsyms to know if the feature is supported or not. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: ca7ae8916043 ("selftests: mptcp: mptfo Initiator/Listener") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 4ad39a42da2e9770c8e4c37fe632ed8898419129 Author: Matthieu Baerts Date: Thu Jun 8 18:38:45 2023 +0200 selftests: mptcp: connect: skip disconnect tests if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the full support of disconnections from the userspace introduced by commit b29fcfb54cd7 ("mptcp: full disconnect implementation"). It is possible to look for "mptcp_pm_data_reset" in kallsyms because a preparation patch added it to ease the introduction of the mentioned feature. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 05be5e273c84 ("selftests: mptcp: add disconnect tests") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 07bf49401909264a38fa3427c3cce43e8304436a Author: Matthieu Baerts Date: Thu Jun 8 18:38:44 2023 +0200 selftests: mptcp: connect: skip transp tests if not supported Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. One of them is the support of IP(V6)_TRANSPARENT socket option with MPTCP connections introduced by commit c9406a23c116 ("mptcp: sockopt: add SOL_IP freebind & transparent options"). It is possible to look for "__ip_sock_set_tos" in kallsyms because IP(V6)_TRANSPARENT socket option support has been added after TOS support which came with the required infrastructure in MPTCP sockopt code. To support TOS, the following function has been exported (T). Not great but better than checking for a specific kernel version. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 5fb62e9cd3ad ("selftests: mptcp: add tproxy test case") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 673004821ab98c6645bd21af56a290854e88f533 Author: Matthieu Baerts Date: Thu Jun 8 18:38:43 2023 +0200 selftests: mptcp: lib: skip if missing symbol Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. New functions are now available to easily detect if a certain feature is missing by looking at kallsyms. These new helpers are going to be used in the following commits. In order to ease the backport of such future patches, it would be good if this patch is backported up to the introduction of MPTCP selftests, hence the Fixes tag below: this type of check was supposed to be done from the beginning. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 048d19d444be ("mptcp: add basic kselftest for mptcp") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit a2a871483161014f1bcc4e9a04354b01aa77cedb Author: Edson Juliano Drosdeck Date: Fri Jun 9 17:10:58 2023 -0300 ALSA: hda/realtek: Add a quirk for Compaq N14JP6 Add a quirk for Compaq N14JP6 to fixup ALC897 headset MIC no sound. Signed-off-by: Edson Juliano Drosdeck Cc: Link: https://lore.kernel.org/r/20230609201058.523499-1-edson.drosdeck@gmail.com Signed-off-by: Takashi Iwai commit 5b47f56b6a0fe5752f0827d26037a809ec0080bc Author: Krzysztof Kozlowski Date: Fri Jun 9 16:11:07 2023 +0200 dt-bindings: i3c: silvaco,i3c-master: fix missing schema restriction Each device schema must end with unevaluatedProperties: false, if it references other common schema. Otherwise it would allow any properties to be listed. Fixes: b8b0446f1f1a ("dt-bindings: i3c: Describe Silvaco master binding") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230609141107.66128-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 39affd1fdf65983904fafc07cf607cff737eaf30 Author: Kunihiko Hayashi Date: Fri Jun 2 11:05:02 2023 +0900 of: overlay: Fix missing of_node_put() in error case of init_overlay_changeset() In init_overlay_changeset(), the variable "node" is from of_get_child_by_name(), and the "node" should be discarded in error case. Fixes: d1651b03c2df ("of: overlay: add overlay symbols to live device tree") Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230602020502.11693-1-hayashi.kunihiko@socionext.com Signed-off-by: Rob Herring commit 64569520920a3ca5d456ddd9f4f95fc6ea9b8b45 Merge: dbfa18c5d7695 ccc45cb4e7271 Author: Linus Torvalds Date: Fri Jun 9 14:21:20 2023 -0700 Merge tag 'block-6.4-2023-06-09' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - Fix an issue with the hardware queue nr_active, causing it to become imbalanced (Tian) - Fix an issue with null_blk not releasing pages if configured as memory backed (Nitesh) - Fix a locking issue in dasd (Jan) * tag 'block-6.4-2023-06-09' of git://git.kernel.dk/linux: s390/dasd: Use correct lock while counting channel queue length null_blk: Fix: memory release when memory_backed=1 blk-mq: fix blk_mq_hw_ctx active request accounting commit dbfa18c5d7695766f24c0c140204e1f8c921fb95 Merge: 7e8c948b3f09b 07496eeab577e Author: Linus Torvalds Date: Fri Jun 9 11:04:08 2023 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio bug fixes from Michael Tsirkin: "A bunch of fixes all over the place" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: tools/virtio: use canonical ftrace path vhost_vdpa: support PACKED when setting-getting vring_base vhost: support PACKED when setting-getting vring_base vhost: Fix worker hangs due to missed wake up calls vhost: Fix crash during early vhost_transport_send_pkt calls vhost_net: revert upend_idx only on retriable error vhost_vdpa: tell vqs about the negotiated vdpa/mlx5: Fix hang when cvq commands are triggered during device unregister tools/virtio: Add .gitignore for ringtest tools/virtio: Fix arm64 ringtest compilation error vduse: avoid empty string for dev name vhost: use kzalloc() instead of kmalloc() followed by memset() commit 7e8c948b3f09b19e3883517e10a3d5ffa9899f84 Merge: 0f506c7f7d3d8 409e873ea3c1f Author: Linus Torvalds Date: Fri Jun 9 10:53:58 2023 -0700 Merge tag 'ceph-for-6.4-rc6' of https://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "A fix for a potential data corruption in differential backup and snapshot-based mirroring scenarios in RBD and a reference counting fixup to avoid use-after-free in CephFS, all marked for stable" * tag 'ceph-for-6.4-rc6' of https://github.com/ceph/ceph-client: ceph: fix use-after-free bug for inodes when flushing capsnaps rbd: get snapshot context after exclusive lock is ensured to be held rbd: move RBD_OBJ_FLAG_COPYUP_ENABLED flag setting commit ccc45cb4e7271c74dbb27776ae8f73d84557f5c6 Author: Jan Höppner Date: Fri Jun 9 17:37:50 2023 +0200 s390/dasd: Use correct lock while counting channel queue length The lock around counting the channel queue length in the BIODASDINFO ioctl was incorrectly changed to the dasd_block->queue_lock with commit 583d6535cb9d ("dasd: remove dead code"). This can lead to endless list iterations and a subsequent crash. The queue_lock is supposed to be used only for queue lists belonging to dasd_block. For dasd_device related queue lists the ccwdev lock must be used. Fix the mentioned issues by correctly using the ccwdev lock instead of the queue lock. Fixes: 583d6535cb9d ("dasd: remove dead code") Cc: stable@vger.kernel.org # v5.0+ Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Signed-off-by: Stefan Haberland Link: https://lore.kernel.org/r/20230609153750.1258763-2-sth@linux.ibm.com Signed-off-by: Jens Axboe commit 61d8cdb7872c82d8a4d5e5251b0010332c316a67 Author: Jeffrey Hugo Date: Fri Jun 2 15:04:40 2023 -0600 accel/qaic: Fix NULL pointer deref in qaic_destroy_drm_device() If qaic_destroy_drm_device() is called before the device has fully initialized it will cause a NULL pointer dereference as the drm device has not yet been created. Fix this with a NULL check. Fixes: c501ca23a6a3 ("accel/qaic: Add uapi and core driver file") Signed-off-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya Link: https://patchwork.freedesktop.org/patch/msgid/20230602210440.8411-3-quic_jhugo@quicinc.com commit 3e1b9b2d81901b3ceeb5ec1f1b4c41cd1cff53ba Author: Carl Vanderlip Date: Fri Jun 2 15:04:39 2023 -0600 accel/qaic: Free user handle on interrupted mutex After user handle is allocated, if mutex is interrupted, we do not free the user handle and return an error. Kref had been initialized, but not added to users list, so device teardown would also not call free_usr. Fixes: c501ca23a6a3 ("accel/qaic: Add uapi and core driver file") Signed-off-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Jeffrey Hugo Signed-off-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20230602210440.8411-2-quic_jhugo@quicinc.com commit 0f506c7f7d3d8d68a1a020c3d914390b3ffc30d0 Merge: 87aceaa7f083c 99a670b2069c7 Author: Linus Torvalds Date: Fri Jun 9 09:36:17 2023 -0700 Merge tag 'riscv-for-linus-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A fix to avoid ISA-disallowed privilege mappings that can result from WRITE+EXEC mmap requests from userspace. - A fix for kfence to handle the huge pages. - A fix to avoid converting misaligned VAs to huge pages. - ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE has been selected so kprobe can understand user pointers. * tag 'riscv-for-linus-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: fix kprobe __user string arg print fault issue riscv: Check the virtual alignment before choosing a map size riscv: Fix kfence now that the linear mapping can be backed by PUD/P4D/PGD riscv: mm: Ensure prot of VM_WRITE and VM_EXEC must be readable commit 87aceaa7f083cd4e77e28943bc5535ef34ead498 Merge: 92d22212c090b 03c5c83b70dca Author: Linus Torvalds Date: Fri Jun 9 09:29:51 2023 -0700 Merge tag 's390-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Alexander Gordeev: - Avoid linker error for randomly generated config file that has CONFIG_BRANCH_PROFILE_NONE enabled and make it similar to riscv, x86 and also to commit 4bf3ec384edf ("s390: disable branch profiling for vdso"). - Currently, if the device is offline and all the channel paths are either configured or varied offline, the associated subchannel gets unregistered. Don't unregister the subchannel, instead unregister offline device. * tag 's390-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/purgatory: disable branch profiling s390/cio: unregister device when the only path is gone commit 2a62b6210ce876c596086ab8fd4c8a0c3d10611a Author: Zhu Yanjun Date: Fri Jun 2 11:54:08 2023 +0800 RDMA/rxe: Fix the use-before-initialization error of resp_pkts In the following: Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 assign_lock_key kernel/locking/lockdep.c:982 [inline] register_lock_class+0xdb6/0x1120 kernel/locking/lockdep.c:1295 __lock_acquire+0x10a/0x5df0 kernel/locking/lockdep.c:4951 lock_acquire kernel/locking/lockdep.c:5691 [inline] lock_acquire+0x1b1/0x520 kernel/locking/lockdep.c:5656 __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:3639 drain_resp_pkts drivers/infiniband/sw/rxe/rxe_comp.c:555 [inline] rxe_completer+0x250d/0x3cc0 drivers/infiniband/sw/rxe/rxe_comp.c:652 rxe_qp_do_cleanup+0x1be/0x820 drivers/infiniband/sw/rxe/rxe_qp.c:761 execute_in_process_context+0x3b/0x150 kernel/workqueue.c:3473 __rxe_cleanup+0x21e/0x370 drivers/infiniband/sw/rxe/rxe_pool.c:233 rxe_create_qp+0x3f6/0x5f0 drivers/infiniband/sw/rxe/rxe_verbs.c:583 This is a use-before-initialization problem. It happens because rxe_qp_do_cleanup is called during error unwind before the struct has been fully initialized. Move the initialization of the skb earlier. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20230602035408.741534-1-yanjun.zhu@intel.com Reported-by: syzbot+eba589d8f49c73d356da@syzkaller.appspotmail.com Signed-off-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe commit 92d22212c090b4afbb7d7e8f91d72988c7586aa6 Merge: 333a396d71ce4 d1f11f41eb746 Author: Linus Torvalds Date: Fri Jun 9 09:17:25 2023 -0700 Merge tag 'gpio-fixes-for-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: "Two fixes for the GPIO testing module and one commit making Andy a reviewer for the GPIO subsystem: - fix a memory corruption bug in gpio-sim - fix inconsistencies in user-space configuration of gpio-sim - make Andy Shevchenko a reviewer for the GPIO subsystem" * tag 'gpio-fixes-for-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: MAINTAINERS: add Andy Shevchenko as reviewer for the GPIO subsystem gpio: sim: quietly ignore configured lines outside the bank gpio: sim: fix memory corruption when adding named lines and unnamed hogs commit 07496eeab577eef1d4912b3e1b502a2b52002ac3 Author: Ross Zwisler Date: Wed Feb 15 15:33:49 2023 -0700 tools/virtio: use canonical ftrace path The canonical location for the tracefs filesystem is at /sys/kernel/tracing. But, from Documentation/trace/ftrace.rst: Before 4.1, all ftrace tracing control files were within the debugfs file system, which is typically located at /sys/kernel/debug/tracing. For backward compatibility, when mounting the debugfs file system, the tracefs file system will be automatically mounted at: /sys/kernel/debug/tracing A few spots in tools/virtio still refer to this older debugfs path, so let's update them to avoid confusion. Signed-off-by: Ross Zwisler Message-Id: <20230215223350.2658616-6-zwisler@google.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Mukesh Ojha commit beee7fdb5b56a46415a4992d28dd4c2d06eb52df Author: Shannon Nelson Date: Mon Apr 24 15:50:31 2023 -0700 vhost_vdpa: support PACKED when setting-getting vring_base Use the right structs for PACKED or split vqs when setting and getting the vring base. Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend") Signed-off-by: Shannon Nelson Message-Id: <20230424225031.18947-4-shannon.nelson@amd.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 55d8122f5cd62d5aaa225d7167dcd14a44c850b9 Author: Shannon Nelson Date: Mon Apr 24 15:50:30 2023 -0700 vhost: support PACKED when setting-getting vring_base Use the right structs for PACKED or split vqs when setting and getting the vring base. Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend") Signed-off-by: Shannon Nelson Message-Id: <20230424225031.18947-3-shannon.nelson@amd.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 333a396d71ce4083da31ccbf30772bf2da1509b4 Merge: 697fa9b586ef3 5b10ff013e8a5 Author: Linus Torvalds Date: Fri Jun 9 09:02:56 2023 -0700 Merge tag 'pinctrl-v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fix from Linus Walleij: "A single fix for the Meson driver, nothing else has surfaced so far this cycle" * tag 'pinctrl-v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: meson-axg: add missing GPIOA_18 gpio group commit 697fa9b586ef3032b5e09b33cbfba9035d1466f1 Merge: 8fc1c596c2ccd b752a385b584d Author: Linus Torvalds Date: Fri Jun 9 08:38:22 2023 -0700 Merge tag 'sound-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Lots of small fixes, and almost all are device-specific. A few of them are the fixes for the old regressions by the fast kctl lookups (introduced around 5.19). Others are ASoC simple-card fixes, selftest compile warning fixes, ASoC AMD quirks, various ASoC codec fixes as well as usual HD-audio quirks" * tag 'sound-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (26 commits) ALSA: hda/realtek: Enable 4 amplifiers instead of 2 on a HP platform ALSA: hda: Fix kctl->id initialization ALSA: gus: Fix kctl->id initialization ALSA: cmipci: Fix kctl->id initialization ALSA: ymfpci: Fix kctl->id initialization ALSA: ice1712,ice1724: fix the kcontrol->id initialization ALSA: hda/realtek: Add quirk for Clevo NS50AU ALSA: hda/realtek: Add quirks for Asus ROG 2024 laptops using CS35L41 ALSA: hda/realtek: Add "Intel Reference board" and "NUC 13" SSID in the ALC256 ALSA: hda/realtek: Add Lenovo P3 Tower platform ALSA: hda/realtek: Add a quirk for HP Slim Desktop S01 selftests: alsa: pcm-test: Fix compiler warnings about the format ASoC: fsl_sai: Enable BCI bit if SAI works on synchronous mode with BYP asserted ASoC: simple-card-utils: fix PCM constraint error check ASoC: cs35l56: Remove NULL check from cs35l56_sdw_dai_set_stream() ASoC: max98363: limit the number of channel to 1 ASoC: max98363: Removed 32bit support ASoC: mediatek: mt8195: fix use-after-free in driver remove path ASoC: mediatek: mt8188: fix use-after-free in driver remove path ASoC: amd: yc: Add Thinkpad Neo14 to quirks list for acp6x ... commit 8fc1c596c2ccd951b089b6b6d54c58a74a137764 Merge: 33f2b5785a2b6 dea9d8f7643fa Author: Linus Torvalds Date: Fri Jun 9 08:23:01 2023 -0700 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fix from Ted Ts'o: "Fix an ext4 regression which breaks remounting r/w file systems that have the quota feature enabled" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: only check dquot_initialize_needed() when debugging Revert "ext4: don't clear SB_RDONLY when remounting r/w until quota is re-enabled" commit 33f36147be36c5fa0919d32d20d501ca97981d9a Merge: 8d38800a762c8 7f3c782b3914e Author: Wolfram Sang Date: Fri Jun 9 17:14:33 2023 +0200 Merge tag 'at24-fixes-for-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-current at24 fixes for v6.4-rc6 - fix a Kconfig issue (we need to select REGMAP, not only REGMAP_I2C) commit 5cdd5ec176544a3f5b18591577cfab2fcdc13c79 Merge: abd649fdf91ad 9bf2e534313fc Author: Arnd Bergmann Date: Fri Jun 9 14:15:18 2023 +0200 Merge tag 'imx-fixes-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 6.4, round 2: - Fix SPI CS pinmux for the final production version of imx8mn-beacon board. - Fix GPIOs for USDHC2 CD and WP signals on imx8qm-mek board. - Assign default clock rate for i.MX8 LPUARTs to fix UART failure. * tag 'imx-fixes-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: imx8mn-beacon: Fix SPI CS pinmux arm64: dts: imx8-ss-dma: assign default clock rate for lpuarts arm64: dts: imx8qm-mek: correct GPIOs for USDHC2 CD and WP signals Link: https://lore.kernel.org/r/20230607141312.GU4199@dragon Signed-off-by: Arnd Bergmann commit 7b3b9ac899b54f53f7c9fc07e1c562f56b2187fa Author: Ilan Peer Date: Thu Jun 8 16:36:07 2023 +0300 wifi: mac80211: Use active_links instead of valid_links in Tx Fix few places on the Tx path where the valid_links were used instead of active links. Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230608163202.e24832691fc8.I9ac10dc246d7798a8d26b1a94933df5668df63fc@changeid Signed-off-by: Johannes Berg commit 34d4e3eb67fed9c19719bedb748e5a8b6ccc97a5 Author: Johannes Berg Date: Thu Jun 8 16:36:04 2023 +0300 wifi: cfg80211: remove links only on AP Since links are only controlled by userspace via cfg80211 in AP mode, also only remove them from the driver in that case. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230608163202.ed65b94916fa.I2458c46888284cc5ce30715fe642bc5fc4340c8f@changeid Signed-off-by: Johannes Berg commit 15846f95ab01b71fdb1cef8df73680aad41edf70 Author: Benjamin Berg Date: Thu Jun 8 16:36:02 2023 +0300 wifi: mac80211: take lock before setting vif links ieee80211_vif_set_links requires the sdata->local->mtx lock to be held. Add the appropriate locking around the calls in both the link add and remove handlers. This causes a warning when e.g. ieee80211_link_release_channel is called via ieee80211_link_stop from ieee80211_vif_update_links. Fixes: 0d8c4a3c8688 ("wifi: mac80211: implement add/del interface link callbacks") Signed-off-by: Benjamin Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230608163202.fa0c6597fdad.I83dd70359f6cda30f86df8418d929c2064cf4995@changeid Signed-off-by: Johannes Berg commit 1ff56684fa8682bdfbbce4e12cf67ab23cb1db05 Author: Benjamin Berg Date: Thu Jun 8 16:36:01 2023 +0300 wifi: cfg80211: fix link del callback to call correct handler The wrapper function was incorrectly calling the add handler instead of the del handler. This had no negative side effect as the default handlers are essentially identical. Fixes: f2a0290b2df2 ("wifi: cfg80211: add optional link add/remove callbacks") Signed-off-by: Benjamin Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230608163202.ebd00e000459.Iaff7dc8d1cdecf77f53ea47a0e5080caa36ea02a@changeid Signed-off-by: Johannes Berg commit 01605ad6c3e8608d7e147c9b75d67eb8a3d27d88 Author: Johannes Berg Date: Thu Jun 8 16:35:59 2023 +0300 wifi: mac80211: fix link activation settings order In the normal MLME code we always call ieee80211_mgd_set_link_qos_params() before ieee80211_link_info_change_notify() and some drivers, notably iwlwifi, rely on that as they don't do anything (but store the data) in their conf_tx. Fix the order here to be the same as in the normal code paths, so this isn't broken. Fixes: 3d9011029227 ("wifi: mac80211: implement link switching") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230608163202.a2a86bba2f80.Iac97e04827966d22161e63bb6e201b4061e9651b@changeid Signed-off-by: Johannes Berg commit 996c3117dae4c02b38a3cb68e5c2aec9d907ec15 Author: Dan Carpenter Date: Fri Jun 9 13:48:44 2023 +0300 wifi: cfg80211: fix double lock bug in reg_wdev_chan_valid() The locking was changed recently so now the caller holds the wiphy_lock() lock. Taking the lock inside the reg_wdev_chan_valid() function will lead to a deadlock. Fixes: f7e60032c661 ("wifi: cfg80211: fix locking in regulatory disconnect") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/40c4114a-6cb4-4abf-b013-300b598aba65@moroto.mountain Signed-off-by: Johannes Berg commit 04c55383fa5689357bcdd2c8036725a55ed632bc Author: Lee Jones Date: Thu Jun 8 08:29:03 2023 +0100 net/sched: cls_u32: Fix reference counter leak leading to overflow In the event of a failure in tcf_change_indev(), u32_set_parms() will immediately return without decrementing the recently incremented reference counter. If this happens enough times, the counter will rollover and the reference freed, leading to a double free which can be used to do 'bad things'. In order to prevent this, move the point of possible failure above the point where the reference counter is incremented. Also save any meaningful return values to be applied to the return data at the appropriate point in time. This issue was caught with KASAN. Fixes: 705c7091262d ("net: sched: cls_u32: no need to call tcf_exts_change for newly allocated struct") Suggested-by: Eric Dumazet Signed-off-by: Lee Jones Reviewed-by: Eric Dumazet Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit be3618d9651002cd5ff190dbfc6cf78f03e34e27 Author: Zhengchao Shao Date: Thu Jun 8 14:27:56 2023 +0800 net/sched: taprio: fix slab-out-of-bounds Read in taprio_dequeue_from_txq As shown in [1], out-of-bounds access occurs in two cases: 1)when the qdisc of the taprio type is used to replace the previously configured taprio, count and offset in tc_to_txq can be set to 0. In this case, the value of *txq in taprio_next_tc_txq() will increases continuously. When the number of accessed queues exceeds the number of queues on the device, out-of-bounds access occurs. 2)When packets are dequeued, taprio can be deleted. In this case, the tc rule of dev is cleared. The count and offset values are also set to 0. In this case, out-of-bounds access is also caused. Now the restriction on the queue number is added. [1] https://groups.google.com/g/syzkaller-bugs/c/_lYOKgkBVMg Fixes: 2f530df76c8c ("net/sched: taprio: give higher priority to higher TCs in software dequeue mode") Reported-by: syzbot+04afcb3d2c840447559a@syzkaller.appspotmail.com Signed-off-by: Zhengchao Shao Tested-by: Pedro Tammela Signed-off-by: David S. Miller commit c0e489372a294044feea650b38f38c888eff57a4 Author: Ratheesh Kannoth Date: Thu Jun 8 10:46:25 2023 +0530 octeontx2-af: Fix promiscuous mode CN10KB silicon introduced a new exact match feature, which is used for DMAC filtering. The state of installed DMAC filters in this exact match table is getting corrupted when promiscuous mode is toggled. Fix this by not touching Exact match related config when promiscuous mode is toggled. Fixes: 2dba9459d2c9 ("octeontx2-af: Wrapper functions for MAC addr add/del/update/reset") Signed-off-by: Ratheesh Kannoth Signed-off-by: David S. Miller commit 0ad4982c520ed87ea7ebfc9381ea1f617ed75364 Author: Yoshihiro Shimoda Date: Thu Jun 8 10:57:27 2023 +0900 net: renesas: rswitch: Fix timestamp feature after all descriptors are used The timestamp descriptors were intended to act cyclically. Descriptors from index 0 through gq->ring_size - 1 contain actual information, and the last index (gq->ring_size) should have LINKFIX to indicate the first index 0 descriptor. However, the LINKFIX value is missing, causing the timestamp feature to stop after all descriptors are used. To resolve this issue, set the LINKFIX to the timestamp descritors. Reported-by: Phong Hoang Fixes: 33f5d733b589 ("net: renesas: rswitch: Improve TX timestamp accuracy") Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 6c02568fd1ae53099b4ab86365c5be1ff15f586b Author: Max Tottenham Date: Wed Jun 7 12:23:54 2023 -0400 net/sched: act_pedit: Parse L3 Header for L4 offset Instead of relying on skb->transport_header being set correctly, opt instead to parse the L3 header length out of the L3 headers for both IPv4/IPv6 when the Extended Layer Op for tcp/udp is used. This fixes a bug if GRO is disabled, when GRO is disabled skb->transport_header is set by __netif_receive_skb_core() to point to the L3 header, it's later fixed by the upper protocol layers, but act_pedit will receive the SKB before the fixups are completed. The existing behavior causes the following to edit the L3 header if GRO is disabled instead of the UDP header: tc filter add dev eth0 ingress protocol ip flower ip_proto udp \ dst_ip 192.168.1.3 action pedit ex munge udp set dport 18053 Also re-introduce a rate-limited warning if we were unable to extract the header offset when using the 'ex' interface. Fixes: 71d0ed7079df ("net/act_pedit: Support using offset relative to the conventional network headers") Signed-off-by: Max Tottenham Reviewed-by: Josh Hunt Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202305261541.N165u9TZ-lkp@intel.com/ Reviewed-by: Pedro Tammela Signed-off-by: David S. Miller commit 4b0a5014ee2b0984f2410d657dc582a8387585ae Merge: 899e373ef0b0d 9561de3a55bed Author: Mauro Carvalho Chehab Date: Fri Jun 9 09:24:21 2023 +0100 Merge tag 'v6.4-rc5' into v4l_for_linus Linux 6.4-rc5 * tag 'v6.4-rc5': (303 commits) Linux 6.4-rc5 leds: qcom-lpg: Fix PWM period limits selftests/ftrace: Choose target function for filter test from samples KVM: selftests: Add test for race in kvm_recalculate_apic_map() KVM: x86: Bail from kvm_recalculate_phys_map() if x2APIC ID is out-of-bounds KVM: x86: Account fastpath-only VM-Exits in vCPU stats KVM: SVM: vNMI pending bit is V_NMI_PENDING_MASK not V_NMI_BLOCKING_MASK KVM: x86/mmu: Grab memslot for correct address space in NX recovery worker tpm, tpm_tis: correct tpm_tis_flags enumeration values Revert "ext4: remove ac->ac_found > sbi->s_mb_min_to_scan dead check in ext4_mb_check_limits" riscv: Implement missing huge_ptep_get riscv: Fix huge_ptep_set_wrprotect when PTE is a NAPOT module/decompress: Fix error checking on zstd decompression fork, vhost: Use CLONE_THREAD to fix freezer/ps regression dt-bindings: serial: 8250_omap: add rs485-rts-active-high selinux: don't use make's grouped targets feature yet riscv: perf: Fix callchain parse error with kernel tracepoint events mptcp: fix active subflow finalization mptcp: add annotations around sk->sk_shutdown accesses mptcp: fix data race around msk->first access ... commit dfaed3e1fa7099de8de4e89cbe7eb9c1bca27dfe Author: Nicholas Piggin Date: Wed Jun 7 10:56:00 2023 +1000 powerpc/64s/radix: Fix exit lazy tlb mm switch with irqs enabled Switching mm and tinkering with current->active_mm should be done with irqs disabled. There is a path where exit_lazy_flush_tlb can be called with irqs enabled: exit_lazy_flush_tlb flush_type_needed __flush_all_mm tlb_finish_mmu exit_mmap Which results in the switching being done with irqs enabled, which is incorrect. Fixes: a665eec0a22e ("powerpc/64s/radix: Fix mm_cpumask trimming race vs kthread_use_mm") Cc: stable@vger.kernel.org # v5.10+ Reported-by: Sachin Sant Link: https://lore.kernel.org/linuxppc-dev/A9A5D83D-BA70-47A4-BCB4-30C1AE19BC22@linux.ibm.com/ Tested-by: Sachin Sant Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230607005601.583293-1-npiggin@gmail.com commit 1166a530a84758bb9e6b448fc8c195ed413f5ded Author: Maciej Żenczykowski Date: Mon Jun 5 04:06:54 2023 -0700 xfrm: fix inbound ipv4/udp/esp packets to UDPv6 dualstack sockets Before Linux v5.8 an AF_INET6 SOCK_DGRAM (udp/udplite) socket with SOL_UDP, UDP_ENCAP, UDP_ENCAP_ESPINUDP{,_NON_IKE} enabled would just unconditionally use xfrm4_udp_encap_rcv(), afterwards such a socket would use the newly added xfrm6_udp_encap_rcv() which only handles IPv6 packets. Cc: Sabrina Dubroca Cc: Steffen Klassert Cc: Jakub Kicinski Cc: Benedict Wong Cc: Yan Yan Fixes: 0146dca70b87 ("xfrm: add support for UDPv6 encapsulation of ESP") Signed-off-by: Maciej Żenczykowski Reviewed-by: Simon Horman Reviewed-by: Sabrina Dubroca Signed-off-by: Steffen Klassert commit 863199199713908afaa47ba09332b87621c12496 Author: Wes Huang Date: Thu Jun 8 11:01:42 2023 +0800 net: usb: qmi_wwan: add support for Compal RXM-G1 Add support for Compal RXM-G1 which is based on Qualcomm SDX55 chip. This patch adds support for two compositions: 0x9091: DIAG + MODEM + QMI_RMNET + ADB 0x90db: DIAG + DUN + RMNET + DPL + QDSS(Trace) + ADB T: Bus=03 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=05c6 ProdID=9091 Rev= 4.14 S: Manufacturer=QCOM S: Product=SDXPRAIRIE-MTP _SN:719AB680 S: SerialNumber=719ab680 C:* #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=896mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=(none) 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=00 Prot=00 Driver=(none) 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=ff Driver=qmi_wwan E: Ad=84(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 I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) E: Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=85(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms T: Bus=03 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=05c6 ProdID=90db Rev= 4.14 S: Manufacturer=QCOM S: Product=SDXPRAIRIE-MTP _SN:719AB680 S: SerialNumber=719ab680 C:* #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=896mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=(none) 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=00 Prot=00 Driver=(none) 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=ff Driver=qmi_wwan E: Ad=84(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 I:* If#= 3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=8f(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=85(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) E: Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=86(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms Cc: stable@vger.kernel.org Signed-off-by: Wes Huang Acked-by: Bjørn Mork Link: https://lore.kernel.org/r/20230608030141.3546-1-wes.huang@moxa.com Signed-off-by: Jakub Kicinski commit 33f2b5785a2b6b0ed1948aafee60d3abb12f1e3a Merge: 9cd6357f100b3 986c34b495810 Author: Linus Torvalds Date: Thu Jun 8 19:14:10 2023 -0700 Merge tag 'drm-fixes-2023-06-09' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Bit busier and a bit more scattered than usual. amdgpu is the main one, with ivpu and msm having a few fixes, then i915, exynos, ast, lima, radeon with some misc bits, but overall nothing standing out. fb-helper: - Fill in fb-helper vars more correctly amdgpu: - S0ix fixes - GPU reset fixes - SMU13 fixes - SMU11 fixes - Misc Display fixes - Revert RV/RV2/PCO clock counter changes - Fix Stoney xclk value - Fix reserved vram debug info radeon: - Fix a potential use after free i915: - CDCLK voltage fix for ADL-P - eDP wake sync pulse fix - Two error handling fixes to selftests exynos: - Fix wrong return in Exynos vidi driver - Fix use-after-free issue to Exynos g2d driver ast: - resume and modeset fixes for ast ivpu: - Assorted ivpu fixes lima: - lima context destroy fix msm: - Fix max segment size to address splat on newer a6xx - Disable PSR by default w/ modparam to re-enable, since there still seems to be a lingering issue - Fix HPD issue - Fix issue with unitialized GMU mutex" * tag 'drm-fixes-2023-06-09' of git://anongit.freedesktop.org/drm/drm: (32 commits) drm/msm/a6xx: initialize GMU mutex earlier drm/msm/dp: enable HDP plugin/unplugged interrupts at hpd_enable/disable accel/ivpu: Fix sporadic VPU boot failure accel/ivpu: Do not use mutex_lock_interruptible accel/ivpu: Do not trigger extra VPU reset if the VPU is idle drm/amd/display: Reduce sdp bw after urgent to 90% drm/amdgpu: change reserved vram info print drm/amdgpu: fix xclk freq on CHIP_STONEY drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl Revert "drm/amdgpu: switch to golden tsc registers for raven/raven2" Revert "drm/amdgpu: Differentiate between Raven2 and Raven/Picasso according to revision id" Revert "drm/amdgpu: change the reference clock for raven/raven2" drm/amd/display: add ODM case when looking for first split pipe drm/amd: Make lack of `ACPI_FADT_LOW_POWER_S0` or `CONFIG_AMD_PMC` louder during suspend path drm/amd/pm: conditionally disable pcie lane switching for some sienna_cichlid SKUs drm/amd/pm: Fix power context allocation in SMU13 drm/amdgpu: fix Null pointer dereference error in amdgpu_device_recover_vram drm/amd: Disallow s0ix without BIOS support again drm/i915/selftests: Add some missing error propagation drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl ... commit 6292d7436cf2f0a2ea8800a1d2cbb155d237818a Author: Yuezhen Luan Date: Wed Jun 7 09:41:16 2023 -0700 igb: Fix extts capture value format for 82580/i354/i350 82580/i354/i350 features circle-counter-like timestamp registers that are different with newer i210. The EXTTS capture value in AUXTSMPx should be converted from raw circle counter value to timestamp value in resolution of 1 nanosec by the driver. This issue can be reproduced on i350 nics, connecting an 1PPS signal to a SDP pin, and run 'ts2phc' command to read external 1PPS timestamp value. On i210 this works fine, but on i350 the extts is not correctly converted. The i350/i354/82580's SYSTIM and other timestamp registers are 40bit counters, presenting time range of 2^40 ns, that means these registers overflows every about 1099s. This causes all these regs can't be used directly in contrast to the newer i210/i211s. The igb driver needs to convert these raw register values to valid time stamp format by using kernel timecounter apis for i350s families. Here the igb_extts() just forgot to do the convert. Fixes: 38970eac41db ("igb: support EXTTS on 82580/i354/i350") Signed-off-by: Yuezhen Luan Reviewed-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230607164116.3768175-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 91ffd1bae1dafbb9e34b46813f5b058581d9144d Author: Guillaume Nault Date: Wed Jun 7 18:05:02 2023 +0200 ping6: Fix send to link-local addresses with VRF. Ping sockets can't send packets when they're bound to a VRF master device and the output interface is set to a slave device. For example, when net.ipv4.ping_group_range is properly set, so that ping6 can use ping sockets, the following kind of commands fails: $ ip vrf exec red ping6 fe80::854:e7ff:fe88:4bf1%eth1 What happens is that sk->sk_bound_dev_if is set to the VRF master device, but 'oif' is set to the real output device. Since both are set but different, ping_v6_sendmsg() sees their value as inconsistent and fails. Fix this by allowing 'oif' to be a slave device of ->sk_bound_dev_if. This fixes the following kselftest failure: $ ./fcnal-test.sh -t ipv6_ping [...] TEST: ping out, vrf device+address bind - ns-B IPv6 LLA [FAIL] Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/b6191f90-ffca-dbca-7d06-88a9788def9c@alu.unizg.hr/ Tested-by: Mirsad Todorovac Fixes: 5e457896986e ("net: ipv6: Fix ping to link-local addresses.") Signed-off-by: Guillaume Nault Reviewed-by: David Ahern Link: https://lore.kernel.org/r/6c8b53108816a8d0d5705ae37bdc5a8322b5e3d9.1686153846.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit 9cd6357f100b3eb0f5027b1ff1a5eebb9f785145 Merge: 8d15d5e1851b1 5647e53f7856b Author: Linus Torvalds Date: Thu Jun 8 18:52:54 2023 -0700 Merge tag 'cgroup-for-6.4-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: - Fix css_set reference leaks on fork failures - Fix CPU hotplug locking in cgroup_transfer_tasks() which is used by cgroup1 cpuset - Doc update * tag 'cgroup-for-6.4-rc5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: Documentation: Clarify usage of memory limits cgroup: always put cset in cgroup_css_set_put_fork cgroup: fix missing cpus_read_{lock,unlock}() in cgroup_transfer_tasks() commit 986c34b495810b38f365bb71665b77de60f15b2c Merge: bcd84301a33b7 12abd735f0300 Author: Dave Airlie Date: Fri Jun 9 11:20:22 2023 +1000 Merge tag 'drm-msm-fixes-2023-06-08' of https://gitlab.freedesktop.org/drm/msm into drm-fixes A few more late fixes for v6.4-rc6 + Fix max segment size to address splat on newer a6xx + Disable PSR by default w/ modparam to re-enable, since there still seems to be a lingering issue + Fix HPD issue + Fix issue with unitialized GMU mutex Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGufjVZRNT6YfQ7YUXFC7Cz95wdLF7QHAYkiGfp+3Xc3DQ@mail.gmail.com commit 12abd735f0300600bfc01b2a3832b966312df205 Author: Dmitry Baryshkov Date: Mon Apr 10 19:59:08 2023 +0300 drm/msm/a6xx: initialize GMU mutex earlier Move GMU mutex initialization earlier to make sure that it is always initialized. a6xx_destroy can be called from ther failure path before GMU initialization. This fixes the following backtrace: ------------[ cut here ]------------ DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 0 PID: 58 at kernel/locking/mutex.c:582 __mutex_lock+0x1ec/0x3d0 Modules linked in: CPU: 0 PID: 58 Comm: kworker/u16:1 Not tainted 6.3.0-rc5-00155-g187c06436519 #565 Hardware name: Qualcomm Technologies, Inc. SM8350 HDK (DT) Workqueue: events_unbound deferred_probe_work_func pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __mutex_lock+0x1ec/0x3d0 lr : __mutex_lock+0x1ec/0x3d0 sp : ffff800008993620 x29: ffff800008993620 x28: 0000000000000002 x27: ffff47b253c52800 x26: 0000000001000606 x25: ffff47b240bb2810 x24: fffffffffffffff4 x23: 0000000000000000 x22: ffffc38bba15ac14 x21: 0000000000000002 x20: ffff800008993690 x19: ffff47b2430cc668 x18: fffffffffffe98f0 x17: 6f74616c75676572 x16: 20796d6d75642067 x15: 0000000000000038 x14: 0000000000000000 x13: ffffc38bbba050b8 x12: 0000000000000666 x11: 0000000000000222 x10: ffffc38bbba603e8 x9 : ffffc38bbba050b8 x8 : 00000000ffffefff x7 : ffffc38bbba5d0b8 x6 : 0000000000000222 x5 : 000000000000bff4 x4 : 40000000fffff222 x3 : 0000000000000000 x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff47b240cb1880 Call trace: __mutex_lock+0x1ec/0x3d0 mutex_lock_nested+0x2c/0x38 a6xx_destroy+0xa0/0x138 a6xx_gpu_init+0x41c/0x618 adreno_bind+0x188/0x290 component_bind_all+0x118/0x248 msm_drm_bind+0x1c0/0x670 try_to_bring_up_aggregate_device+0x164/0x1d0 __component_add+0xa8/0x16c component_add+0x14/0x20 dsi_dev_attach+0x20/0x2c dsi_host_attach+0x9c/0x144 devm_mipi_dsi_attach+0x34/0xac lt9611uxc_attach_dsi.isra.0+0x84/0xfc lt9611uxc_probe+0x5b8/0x67c i2c_device_probe+0x1ac/0x358 really_probe+0x148/0x2ac __driver_probe_device+0x78/0xe0 driver_probe_device+0x3c/0x160 __device_attach_driver+0xb8/0x138 bus_for_each_drv+0x84/0xe0 __device_attach+0x9c/0x188 device_initial_probe+0x14/0x20 bus_probe_device+0xac/0xb0 deferred_probe_work_func+0x8c/0xc8 process_one_work+0x2bc/0x594 worker_thread+0x228/0x438 kthread+0x108/0x10c ret_from_fork+0x10/0x20 irq event stamp: 299345 hardirqs last enabled at (299345): [] put_cpu_partial+0x1c8/0x22c hardirqs last disabled at (299344): [] put_cpu_partial+0x1c0/0x22c softirqs last enabled at (296752): [] _stext+0x434/0x4e8 softirqs last disabled at (296741): [] ____do_softirq+0x10/0x1c ---[ end trace 0000000000000000 ]--- Fixes: 4cd15a3e8b36 ("drm/msm/a6xx: Make GPU destroy a bit safer") Cc: Douglas Anderson Signed-off-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson Patchwork: https://patchwork.freedesktop.org/patch/531540/ Signed-off-by: Rob Clark commit a8e981ac2d0eb9dd53a4c173e29ca0c99c88abe2 Author: Kuogee Hsieh Date: Tue May 23 14:52:36 2023 -0700 drm/msm/dp: enable HDP plugin/unplugged interrupts at hpd_enable/disable The internal_hpd flag is set to true by dp_bridge_hpd_enable() and set to false by dp_bridge_hpd_disable() to handle GPIO pinmuxed into DP controller case. HDP related interrupts can not be enabled until internal_hpd is set to true. At current implementation dp_display_config_hpd() will initialize DP host controller first followed by enabling HDP related interrupts if internal_hpd was true at that time. Enable HDP related interrupts depends on internal_hpd status may leave system with DP driver host is in running state but without HDP related interrupts being enabled. This will prevent external display from being detected. Eliminated this dependency by moving HDP related interrupts enable/disable be done at dp_bridge_hpd_enable/disable() directly regardless of internal_hpd status. Changes in V3: -- dp_catalog_ctrl_hpd_enable() and dp_catalog_ctrl_hpd_disable() -- rewording ocmmit text Changes in V4: -- replace dp_display_config_hpd() with dp_display_host_start() -- move enable_irq() at dp_display_host_start(); Changes in V5: -- replace dp_display_host_start() with dp_display_host_init() Changes in V6: -- squash remove enable_irq() and disable_irq() Fixes: cd198caddea7 ("drm/msm/dp: Rely on hpd_enable/disable callbacks") Signed-off-by: Kuogee Hsieh Tested-by: Leonard Lausen # on sc7180 lazor Reviewed-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Tested-by: Bjorn Andersson Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/1684878756-17830-1-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Rob Clark commit bcd84301a33b7434a506fdb1a9076b7a234817a7 Merge: 02b8f0b75518b a3efabee5878b Author: Dave Airlie Date: Fri Jun 9 11:10:09 2023 +1000 Merge tag 'drm-misc-fixes-2023-06-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v6.4-rc6: - resume and modeset fixes for ast. - Fill in fb-helper vars more correctly. - Assorted ivpu fixes. - lima context destroy fix. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/ea6b88ec-b653-3781-0b68-cd0275c27923@linux.intel.com commit 02b8f0b75518b9a20a9142eec31588509c8da030 Merge: d6d4f0a118931 48bfd02569f5d Author: Dave Airlie Date: Fri Jun 9 11:02:04 2023 +1000 Merge tag 'exynos-drm-fixes-for-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Two fixups - Fix wrong return in Exynos vidi driver. - Fix use-after-free issue to Exynos g2d driver. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20230607043148.43303-1-inki.dae@samsung.com commit d6d4f0a1189313310d77f1d5a2bb6277f3afa13f Merge: b1913ff4d86b8 79d0150d2d983 Author: Dave Airlie Date: Fri Jun 9 10:57:26 2023 +1000 Merge tag 'drm-intel-fixes-2023-06-08' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes CDCLK voltage fix for ADL-P and eDP wake sync pulse fix. Two error handling fixes to selftests (to appease static checkers) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZIGUHBz7+LsqN2nm@jlahtine-mobl.ger.corp.intel.com commit b1913ff4d86b811758a788a3301032731ce41db4 Merge: 9561de3a55bed e1a600208286c Author: Dave Airlie Date: Fri Jun 9 09:19:56 2023 +1000 Merge tag 'amd-drm-fixes-6.4-2023-06-07' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.4-2023-06-07: amdgpu: - S0ix fixes - GPU reset fixes - SMU13 fixes - SMU11 fixes - Misc Display fixes - Revert RV/RV2/PCO clock counter changes - Fix Stoney xclk value - Fix reserved vram debug info radeon: - Fix a potential use after free Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230607213740.7723-1-alexander.deucher@amd.com commit 8d15d5e1851b1bbb9cd3289b84c7f32399e06ac5 Merge: 25041a4c02c7c 0e2aba694866b Author: Linus Torvalds Date: Thu Jun 8 13:54:26 2023 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Two tiny arm64 fixes for -rc6. One fixes a build breakage when MAX_ORDER can be nonsensical if CONFIG_EXPERT=y and the other fixes the address masking for perf's page fault software events so that it is consistent amongst them: - Fix build breakage due to bogus MAX_ORDER definitions on !4k pages - Avoid masking fault address for perf software events" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mm: pass original fault address to handle_mm_fault() in PER_VMA_LOCK block arm64: Remove the ARCH_FORCE_MAX_ORDER config input prompt commit 21225873be1472b7c59ed3650396af0e40578112 Author: Wei Fang Date: Wed Jun 7 17:10:48 2023 +0800 net: enetc: correct the indexes of highest and 2nd highest TCs For ENETC hardware, the TCs are numbered from 0 to N-1, where N is the number of TCs. Numerically higher TC has higher priority. It's obvious that the highest priority TC index should be N-1 and the 2nd highest priority TC index should be N-2. However, the previous logic uses netdev_get_prio_tc_map() to get the indexes of highest priority and 2nd highest priority TCs, it does not make sense and is incorrect to give a "tc" argument to netdev_get_prio_tc_map(). So the driver may get the wrong indexes of the two highest priotiry TCs which would lead to failed to set the CBS for the two highest priotiry TCs. e.g. $ tc qdisc add dev eno0 parent root handle 100: mqprio num_tc 6 \ map 0 0 1 1 2 3 4 5 queues 1@0 1@1 1@2 1@3 2@4 2@6 hw 1 $ tc qdisc replace dev eno0 parent 100:6 cbs idleslope 100000 \ sendslope -900000 hicredit 12 locredit -113 offload 1 $ Error: Specified device failed to setup cbs hardware offload. ^^^^^ In this example, the previous logic deems the indexes of the two highest priotiry TCs should be 3 and 2. Actually, the indexes are 5 and 4, because the number of TCs is 6. So it would be failed to configure the CBS for the two highest priority TCs. Fixes: c431047c4efe ("enetc: add support Credit Based Shaper(CBS) for hardware offload") Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Reviewed-by: Maciej Fijalkowski Signed-off-by: David S. Miller commit 1240eb93f0616b21c675416516ff3d74798fdc97 Author: Pablo Neira Ayuso Date: Thu Jun 8 02:32:02 2023 +0200 netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE In case of error when adding a new rule that refers to an anonymous set, deactivate expressions via NFT_TRANS_PREPARE state, not NFT_TRANS_RELEASE. Thus, the lookup expression marks anonymous sets as inactive in the next generation to ensure it is not reachable in this transaction anymore and decrement the set refcount as introduced by c1592a89942e ("netfilter: nf_tables: deactivate anonymous set from preparation phase"). The abort step takes care of undoing the anonymous set. This is also consistent with rule deletion, where NFT_TRANS_PREPARE is used. Note that this error path is exercised in the preparation step of the commit protocol. This patch replaces nf_tables_rule_release() by the deactivate and destroy calls, this time with NFT_TRANS_PREPARE. Due to this incorrect error handling, it is possible to access a dangling pointer to the anonymous set that remains in the transaction list. [1009.379054] BUG: KASAN: use-after-free in nft_set_lookup_global+0x147/0x1a0 [nf_tables] [1009.379106] Read of size 8 at addr ffff88816c4c8020 by task nft-rule-add/137110 [1009.379116] CPU: 7 PID: 137110 Comm: nft-rule-add Not tainted 6.4.0-rc4+ #256 [1009.379128] Call Trace: [1009.379132] [1009.379135] dump_stack_lvl+0x33/0x50 [1009.379146] ? nft_set_lookup_global+0x147/0x1a0 [nf_tables] [1009.379191] print_address_description.constprop.0+0x27/0x300 [1009.379201] kasan_report+0x107/0x120 [1009.379210] ? nft_set_lookup_global+0x147/0x1a0 [nf_tables] [1009.379255] nft_set_lookup_global+0x147/0x1a0 [nf_tables] [1009.379302] nft_lookup_init+0xa5/0x270 [nf_tables] [1009.379350] nf_tables_newrule+0x698/0xe50 [nf_tables] [1009.379397] ? nf_tables_rule_release+0xe0/0xe0 [nf_tables] [1009.379441] ? kasan_unpoison+0x23/0x50 [1009.379450] nfnetlink_rcv_batch+0x97c/0xd90 [nfnetlink] [1009.379470] ? nfnetlink_rcv_msg+0x480/0x480 [nfnetlink] [1009.379485] ? __alloc_skb+0xb8/0x1e0 [1009.379493] ? __alloc_skb+0xb8/0x1e0 [1009.379502] ? entry_SYSCALL_64_after_hwframe+0x46/0xb0 [1009.379509] ? unwind_get_return_address+0x2a/0x40 [1009.379517] ? write_profile+0xc0/0xc0 [1009.379524] ? avc_lookup+0x8f/0xc0 [1009.379532] ? __rcu_read_unlock+0x43/0x60 Fixes: 958bee14d071 ("netfilter: nf_tables: use new transaction infrastructure to handle sets") Signed-off-by: Pablo Neira Ayuso commit 4b13cbef797048fbb525f8c635a5279e9d209d93 Author: Mike Christie Date: Wed Jun 7 14:23:38 2023 -0500 vhost: Fix worker hangs due to missed wake up calls We can race where we have added work to the work_list, but vhost_task_fn has passed that check but not yet set us into TASK_INTERRUPTIBLE. wake_up_process will see us in TASK_RUNNING and just return. This bug was intoduced in commit f9010dbdce91 ("fork, vhost: Use CLONE_THREAD to fix freezer/ps regression") when I moved the setting of TASK_INTERRUPTIBLE to simplfy the code and avoid get_signal from logging warnings about being in the wrong state. This moves the setting of TASK_INTERRUPTIBLE back to before we test if we need to stop the task to avoid a possible race there as well. We then have vhost_worker set TASK_RUNNING if it finds work similar to before. Fixes: f9010dbdce91 ("fork, vhost: Use CLONE_THREAD to fix freezer/ps regression") Signed-off-by: Mike Christie Message-Id: <20230607192338.6041-3-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin commit a284f09effea1908db7985dbfb5458c9100038d8 Author: Mike Christie Date: Wed Jun 7 14:23:37 2023 -0500 vhost: Fix crash during early vhost_transport_send_pkt calls If userspace does VHOST_VSOCK_SET_GUEST_CID before VHOST_SET_OWNER we can race where: 1. thread0 calls vhost_transport_send_pkt -> vhost_work_queue 2. thread1 does VHOST_SET_OWNER which calls vhost_worker_create. 3. vhost_worker_create will set the dev->worker pointer before setting the worker->vtsk pointer. 4. thread0's vhost_work_queue will see the dev->worker pointer is set and try to call vhost_task_wake using not yet set worker->vtsk pointer. 5. We then crash since vtsk is NULL. Before commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), we only had the worker pointer so we could just check it to see if VHOST_SET_OWNER has been done. After that commit we have the vhost_worker and vhost_task pointer, so we can now hit the bug above. This patch embeds the vhost_worker in the vhost_dev and moves the work list initialization back to vhost_dev_init, so we can just check the worker.vtsk pointer to check if VHOST_SET_OWNER has been done like before. Fixes: 6e890c5d5021 ("vhost: use vhost_tasks for worker threads") Signed-off-by: Mike Christie Message-Id: <20230607192338.6041-2-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin Reported-by: syzbot+d0d442c22fa8db45ff0e@syzkaller.appspotmail.com Reviewed-by: Stefano Garzarella commit 1f5d2e3bab16369d5d4b4020a25db4ab1f4f082c Author: Andrey Smetanin Date: Mon Apr 24 23:44:11 2023 +0300 vhost_net: revert upend_idx only on retriable error Fix possible virtqueue used buffers leak and corresponding stuck in case of temporary -EIO from sendmsg() which is produced by tun driver while backend device is not up. In case of no-retriable error and zcopy do not revert upend_idx to pass packet data (that is update used_idx in corresponding vhost_zerocopy_signal_used()) as if packet data has been transferred successfully. v2: set vq->heads[ubuf->desc].len equal to VHOST_DMA_DONE_LEN in case of fake successful transmit. Signed-off-by: Andrey Smetanin Message-Id: <20230424204411.24888-1-asmetanin@yandex-team.ru> Signed-off-by: Michael S. Tsirkin Signed-off-by: Andrey Smetanin Acked-by: Jason Wang commit 376daf317753ccb6b1ecbdece66018f7f6313a7f Author: Shannon Nelson Date: Mon Apr 24 15:50:29 2023 -0700 vhost_vdpa: tell vqs about the negotiated As is done in the net, iscsi, and vsock vhost support, let the vdpa vqs know about the features that have been negotiated. This allows vhost to more safely make decisions based on the features, such as when using PACKED vs split queues. Signed-off-by: Shannon Nelson Acked-by: Jason Wang Message-Id: <20230424225031.18947-2-shannon.nelson@amd.com> Signed-off-by: Michael S. Tsirkin commit 73790bdfba076c0886f0f14fd46ff2c70ee31ce9 Author: Dragos Tatulea Date: Tue May 16 12:58:01 2023 +0300 vdpa/mlx5: Fix hang when cvq commands are triggered during device unregister Currently the vdpa device is unregistered after the workqueue that processes vq commands is disabled. However, the device unregister process can still send commands to the cvq (a vlan delete for example) which leads to a hang because the handing workqueue has been disabled and the command never finishes: [ 2263.095764] rcu: INFO: rcu_sched self-detected stall on CPU [ 2263.096307] rcu: 9-....: (5250 ticks this GP) idle=dac4/1/0x4000000000000000 softirq=111009/111009 fqs=2544 [ 2263.097154] rcu: (t=5251 jiffies g=393549 q=347 ncpus=10) [ 2263.097648] CPU: 9 PID: 94300 Comm: kworker/u20:2 Not tainted 6.3.0-rc6_for_upstream_min_debug_2023_04_14_00_02 #1 [ 2263.098535] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 2263.099481] Workqueue: mlx5_events mlx5_vhca_state_work_handler [mlx5_core] [ 2263.100143] RIP: 0010:virtnet_send_command+0x109/0x170 [ 2263.100621] Code: 1d df f5 ff 85 c0 78 5c 48 8b 7b 08 e8 d0 c5 f5 ff 84 c0 75 11 eb 22 48 8b 7b 08 e8 01 b7 f5 ff 84 c0 75 15 f3 90 48 8b 7b 08 <48> 8d 74 24 04 e8 8d c5 f5 ff 48 85 c0 74 de 48 8b 83 f8 00 00 00 [ 2263.102148] RSP: 0018:ffff888139cf36e8 EFLAGS: 00000246 [ 2263.102624] RAX: 0000000000000000 RBX: ffff888166bea940 RCX: 0000000000000001 [ 2263.103244] RDX: 0000000000000000 RSI: ffff888139cf36ec RDI: ffff888146763800 [ 2263.103864] RBP: ffff888139cf3710 R08: ffff88810d201000 R09: 0000000000000000 [ 2263.104473] R10: 0000000000000002 R11: 0000000000000003 R12: 0000000000000002 [ 2263.105082] R13: 0000000000000002 R14: ffff888114528400 R15: ffff888166bea000 [ 2263.105689] FS: 0000000000000000(0000) GS:ffff88852cc80000(0000) knlGS:0000000000000000 [ 2263.106404] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2263.106925] CR2: 00007f31f394b000 CR3: 000000010615b006 CR4: 0000000000370ea0 [ 2263.107542] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2263.108163] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2263.108769] Call Trace: [ 2263.109059] [ 2263.109320] ? check_preempt_wakeup+0x11f/0x230 [ 2263.109750] virtnet_vlan_rx_kill_vid+0x5a/0xa0 [ 2263.110180] vlan_vid_del+0x9c/0x170 [ 2263.110546] vlan_device_event+0x351/0x760 [8021q] [ 2263.111004] raw_notifier_call_chain+0x41/0x60 [ 2263.111426] dev_close_many+0xcb/0x120 [ 2263.111808] unregister_netdevice_many_notify+0x130/0x770 [ 2263.112297] ? wq_worker_running+0xa/0x30 [ 2263.112688] unregister_netdevice_queue+0x89/0xc0 [ 2263.113128] unregister_netdev+0x18/0x20 [ 2263.113512] virtnet_remove+0x4f/0x230 [ 2263.113885] virtio_dev_remove+0x31/0x70 [ 2263.114273] device_release_driver_internal+0x18f/0x1f0 [ 2263.114746] bus_remove_device+0xc6/0x130 [ 2263.115146] device_del+0x173/0x3c0 [ 2263.115502] ? kernfs_find_ns+0x35/0xd0 [ 2263.115895] device_unregister+0x1a/0x60 [ 2263.116279] unregister_virtio_device+0x11/0x20 [ 2263.116706] device_release_driver_internal+0x18f/0x1f0 [ 2263.117182] bus_remove_device+0xc6/0x130 [ 2263.117576] device_del+0x173/0x3c0 [ 2263.117929] ? vdpa_dev_remove+0x20/0x20 [vdpa] [ 2263.118364] device_unregister+0x1a/0x60 [ 2263.118752] mlx5_vdpa_dev_del+0x4c/0x80 [mlx5_vdpa] [ 2263.119232] vdpa_match_remove+0x21/0x30 [vdpa] [ 2263.119663] bus_for_each_dev+0x71/0xc0 [ 2263.120054] vdpa_mgmtdev_unregister+0x57/0x70 [vdpa] [ 2263.120520] mlx5v_remove+0x12/0x20 [mlx5_vdpa] [ 2263.120953] auxiliary_bus_remove+0x18/0x30 [ 2263.121356] device_release_driver_internal+0x18f/0x1f0 [ 2263.121830] bus_remove_device+0xc6/0x130 [ 2263.122223] device_del+0x173/0x3c0 [ 2263.122581] ? devl_param_driverinit_value_get+0x29/0x90 [ 2263.123070] mlx5_rescan_drivers_locked+0xc4/0x2d0 [mlx5_core] [ 2263.123633] mlx5_unregister_device+0x54/0x80 [mlx5_core] [ 2263.124169] mlx5_uninit_one+0x54/0x150 [mlx5_core] [ 2263.124656] mlx5_sf_dev_remove+0x45/0x90 [mlx5_core] [ 2263.125153] auxiliary_bus_remove+0x18/0x30 [ 2263.125560] device_release_driver_internal+0x18f/0x1f0 [ 2263.126052] bus_remove_device+0xc6/0x130 [ 2263.126451] device_del+0x173/0x3c0 [ 2263.126815] mlx5_sf_dev_remove+0x39/0xf0 [mlx5_core] [ 2263.127318] mlx5_sf_dev_state_change_handler+0x178/0x270 [mlx5_core] [ 2263.127920] blocking_notifier_call_chain+0x5a/0x80 [ 2263.128379] mlx5_vhca_state_work_handler+0x151/0x200 [mlx5_core] [ 2263.128951] process_one_work+0x1bb/0x3c0 [ 2263.129355] ? process_one_work+0x3c0/0x3c0 [ 2263.129766] worker_thread+0x4d/0x3c0 [ 2263.130140] ? process_one_work+0x3c0/0x3c0 [ 2263.130548] kthread+0xb9/0xe0 [ 2263.130895] ? kthread_complete_and_exit+0x20/0x20 [ 2263.131349] ret_from_fork+0x1f/0x30 [ 2263.131717] The fix is to disable and destroy the workqueue after the device unregister. It is expected that vhost will not trigger kicks after the unregister. But even if it would, the wq is disabled already by setting the pointer to NULL (done so in the referenced commit). Fixes: ad6dc1daaf29 ("vdpa/mlx5: Avoid processing works if workqueue was destroyed") Signed-off-by: Dragos Tatulea Message-Id: <20230516095800.3549932-1-dtatulea@nvidia.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Tariq Toukan Acked-by: Jason Wang commit c66dbc39a7104c5a9f033c0450dfa6f697a71f94 Author: Rong Tao Date: Thu May 25 16:37:28 2023 +0800 tools/virtio: Add .gitignore for ringtest Ignore executables for ringtest. Signed-off-by: Rong Tao Message-Id: Signed-off-by: Michael S. Tsirkin commit 57380fd1249b20ef772549af2c58ef57b21faba7 Author: Rong Tao Date: Wed May 24 20:31:24 2023 +0800 tools/virtio: Fix arm64 ringtest compilation error Add cpu_relax() for arm64 instead of directly assert(), and add assert.h header file. Also, add smp_wmb and smp_mb for arm64. Compilation error as follows, avoid __always_inline undefined. $ make cc -Wall -pthread -O2 -ggdb -flto -fwhole-program -c -o ring.o ring.c In file included from ring.c:10: main.h: In function ‘busy_wait’: main.h:99:21: warning: implicit declaration of function ‘assert’ [-Wimplicit-function-declaration] 99 | #define cpu_relax() assert(0) | ^~~~~~ main.h:107:17: note: in expansion of macro ‘cpu_relax’ 107 | cpu_relax(); | ^~~~~~~~~ main.h:12:1: note: ‘assert’ is defined in header ‘’; did you forget to ‘#include ’? 11 | #include +++ |+#include 12 | main.h: At top level: main.h:143:23: error: expected ‘;’ before ‘void’ 143 | static __always_inline | ^ | ; 144 | void __read_once_size(const volatile void *p, void *res, int size) | ~~~~ main.h:158:23: error: expected ‘;’ before ‘void’ 158 | static __always_inline void __write_once_size(volatile void *p, void *res, int size) | ^~~~~ | ; make: *** [: ring.o] Error 1 Signed-off-by: Rong Tao Message-Id: Signed-off-by: Michael S. Tsirkin commit a90e8608eb0ed93d31ac0feb055f77ce59512542 Author: Sheng Zhao Date: Tue May 30 11:36:26 2023 +0800 vduse: avoid empty string for dev name Syzkaller hits a kernel WARN when the first character of the dev name provided is NULL. Solution is to add a NULL check before calling cdev_device_add() in vduse_create_dev(). kobject: (0000000072042169): attempted to be registered with empty name! WARNING: CPU: 0 PID: 112695 at lib/kobject.c:236 Call Trace: kobject_add_varg linux/src/lib/kobject.c:390 [inline] kobject_add+0xf6/0x150 linux/src/lib/kobject.c:442 device_add+0x28f/0xc20 linux/src/drivers/base/core.c:2167 cdev_device_add+0x83/0xc0 linux/src/fs/char_dev.c:546 vduse_create_dev linux/src/drivers/vdpa/vdpa_user/vduse_dev.c:2254 [inline] vduse_ioctl+0x7b5/0xf30 linux/src/drivers/vdpa/vdpa_user/vduse_dev.c:2316 vfs_ioctl linux/src/fs/ioctl.c:47 [inline] file_ioctl linux/src/fs/ioctl.c:510 [inline] do_vfs_ioctl+0x14b/0xa80 linux/src/fs/ioctl.c:697 ksys_ioctl+0x7c/0xa0 linux/src/fs/ioctl.c:714 __do_sys_ioctl linux/src/fs/ioctl.c:721 [inline] __se_sys_ioctl linux/src/fs/ioctl.c:719 [inline] __x64_sys_ioctl+0x42/0x50 linux/src/fs/ioctl.c:719 do_syscall_64+0x94/0x330 linux/src/arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: c8a6153b6c59 ("vduse: Introduce VDUSE - vDPA Device in Userspace") Cc: "Xie Yongji" Reported-by: Xianjun Zeng Signed-off-by: Sheng Zhao Message-Id: <20230530033626.1266794-1-sheng.zhao@bytedance.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Reviewed-by: Xie Yongji Cc: "Michael S. Tsirkin", "Jason Wang", Reviewed-by: Xie Yongji commit 8d38800a762c880244f3df87abbc9f34e276e955 Author: Biju Das Date: Wed Jun 7 18:07:29 2023 +0100 MAINTAINERS: Add entries for Renesas RZ/V2M I2C driver Add the MAINTAINERS entries for the Renesas RZ/V2M I2C driver. Signed-off-by: Biju Das Acked-by: Fabrizio Castro Signed-off-by: Wolfram Sang commit 78c50d6961fc05491ebbc71c35d87324b1a4f49a Author: Kamil Maziarz Date: Tue Jun 6 12:33:58 2023 +0200 ice: Fix XDP memory leak when NIC is brought up and down Fix the buffer leak that occurs while switching the port up and down with traffic and XDP by checking for an active XDP program and freeing all empty TX buffers. Fixes: efc2214b6047 ("ice: Add support for XDP") Signed-off-by: Kamil Maziarz Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Acked-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen commit 99a670b2069c725a7b50318aa681d9cae8f89325 Author: Ruan Jinjie Date: Thu May 4 15:29:10 2023 +0800 riscv: fix kprobe __user string arg print fault issue On riscv qemu platform, when add kprobe event on do_sys_open() to show filename string arg, it just print fault as follow: echo 'p:myprobe do_sys_open dfd=$arg1 filename=+0($arg2):string flags=$arg3 mode=$arg4' > kprobe_events bash-166 [000] ...1. 360.195367: myprobe: (do_sys_open+0x0/0x84) dfd=0xffffffffffffff9c filename=(fault) flags=0x8241 mode=0x1b6 bash-166 [000] ...1. 360.219369: myprobe: (do_sys_open+0x0/0x84) dfd=0xffffffffffffff9c filename=(fault) flags=0x8241 mode=0x1b6 bash-191 [000] ...1. 360.378827: myprobe: (do_sys_open+0x0/0x84) dfd=0xffffffffffffff9c filename=(fault) flags=0x98800 mode=0x0 As riscv do not select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE, the +0($arg2) addr is processed as a kernel address though it is a userspace address, cause the above filename=(fault) print. So select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE to avoid the issue, after that the kprobe trace is ok as below: bash-166 [000] ...1. 96.767641: myprobe: (do_sys_open+0x0/0x84) dfd=0xffffffffffffff9c filename="/dev/null" flags=0x8241 mode=0x1b6 bash-166 [000] ...1. 96.793751: myprobe: (do_sys_open+0x0/0x84) dfd=0xffffffffffffff9c filename="/dev/null" flags=0x8241 mode=0x1b6 bash-177 [000] ...1. 96.962354: myprobe: (do_sys_open+0x0/0x84) dfd=0xffffffffffffff9c filename="/sys/kernel/debug/tracing/events/kprobes/" flags=0x98800 mode=0x0 Signed-off-by: Ruan Jinjie Acked-by: Björn Töpel Fixes: 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}() only to archs where they work") Link: https://lore.kernel.org/r/20230504072910.3742842-1-ruanjinjie@huawei.com Signed-off-by: Palmer Dabbelt commit 25041a4c02c7cf774d8b6ed60586fd64f1cdaa81 Merge: 79b6fad54683c 6c0ec7ab5aaff Author: Linus Torvalds Date: Thu Jun 8 09:27:19 2023 -0700 Merge tag 'net-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from can, wifi, netfilter, bluetooth and ebpf. Current release - regressions: - bpf: sockmap: avoid potential NULL dereference in sk_psock_verdict_data_ready() - wifi: iwlwifi: fix -Warray-bounds bug in iwl_mvm_wait_d3_notif() - phylink: actually fix ksettings_set() ethtool call - eth: dwmac-qcom-ethqos: fix a regression on EMAC < 3 Current release - new code bugs: - wifi: mt76: fix possible NULL pointer dereference in mt7996_mac_write_txwi() Previous releases - regressions: - netfilter: fix NULL pointer dereference in nf_confirm_cthelper - wifi: rtw88/rtw89: correct PS calculation for SUPPORTS_DYNAMIC_PS - openvswitch: fix upcall counter access before allocation - bluetooth: - fix use-after-free in hci_remove_ltk/hci_remove_irk - fix l2cap_disconnect_req deadlock - nic: bnxt_en: prevent kernel panic when receiving unexpected PHC_UPDATE event Previous releases - always broken: - core: annotate rfs lockless accesses - sched: fq_pie: ensure reasonable TCA_FQ_PIE_QUANTUM values - netfilter: add null check for nla_nest_start_noflag() in nft_dump_basechain_hook() - bpf: fix UAF in task local storage - ipv4: ping_group_range: allow GID from 2147483648 to 4294967294 - ipv6: rpl: fix route of death. - tcp: gso: really support BIG TCP - mptcp: fixes for user-space PM address advertisement - smc: avoid to access invalid RMBs' MRs in SMCRv1 ADD LINK CONT - can: avoid possible use-after-free when j1939_can_rx_register fails - batman-adv: fix UaF while rescheduling delayed work - eth: qede: fix scheduling while atomic - eth: ice: make writes to /dev/gnssX synchronous" * tag 'net-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (83 commits) bnxt_en: Implement .set_port / .unset_port UDP tunnel callbacks bnxt_en: Prevent kernel panic when receiving unexpected PHC_UPDATE event bnxt_en: Skip firmware fatal error recovery if chip is not accessible bnxt_en: Query default VLAN before VNIC setup on a VF bnxt_en: Don't issue AP reset during ethtool's reset operation bnxt_en: Fix bnxt_hwrm_update_rss_hash_cfg() net: bcmgenet: Fix EEE implementation eth: ixgbe: fix the wake condition eth: bnxt: fix the wake condition lib: cpu_rmap: Fix potential use-after-free in irq_cpu_rmap_release() bpf: Add extra path pointer check to d_path helper net: sched: fix possible refcount leak in tc_chain_tmplt_add() net: sched: act_police: fix sparse errors in tcf_police_dump() net: openvswitch: fix upcall counter access before allocation net: sched: move rtm_tca_policy declaration to include file ice: make writes to /dev/gnssX synchronous net: sched: add rcu annotations around qdisc->qdisc_sleeping rfs: annotate lockless accesses to RFS sock flow table rfs: annotate lockless accesses to sk->sk_rxhash virtio_net: use control_buf for coalesce params ... commit 79b6fad54683c28cc7e40d806e409abd65ed241a Merge: 5f63595ebd82f d4d12c02bf5f7 Author: Linus Torvalds Date: Thu Jun 8 08:46:58 2023 -0700 Merge tag 'xfs-6.4-rc5-fixes' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Dave Chinner: "These are a set of regression fixes discovered on recent kernels. I was hoping to send this to you a week and half ago, but events out of my control delayed finalising the changes until early this week. Whilst the diffstat looks large for this stage of the merge window, a large chunk of it comes from moving the guts of one function from one file to another i.e. it's the same code, it is just run in a different context where it is safe to hold a specific lock. Otherwise the individual changes are relatively small and straigtht forward. Summary: - Propagate unlinked inode list corruption back up to log recovery (regression fix) - improve corruption detection for AGFL entries, AGFL indexes and XEFI extents (syzkaller fuzzer oops report) - Avoid double perag reference release (regression fix) - Improve extent merging detection in scrub (regression fix) - Fix a new undefined high bit shift (regression fix) - Fix for AGF vs inode cluster buffer deadlock (regression fix)" * tag 'xfs-6.4-rc5-fixes' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: collect errors from inodegc for unlinked inode recovery xfs: validate block number being freed before adding to xefi xfs: validity check agbnos on the AGFL xfs: fix agf/agfl verification on v4 filesystems xfs: fix double xfs_perag_rele() in xfs_filestream_pick_ag() xfs: fix broken logic when detecting mergeable bmap records xfs: Fix undefined behavior of shift into sign bit xfs: fix AGF vs inode cluster buffer deadlock xfs: defered work could create precommits xfs: restore allocation trylock iteration xfs: buffer pins need to hold a buffer reference commit 05a1308a2e08e4a375bf60eb4c6c057a201d81fc Author: Simon Horman Date: Thu May 25 12:52:58 2023 +0200 ice: Don't dereference NULL in ice_gnss_read error path If pf is NULL in ice_gnss_read() then it will be dereferenced in the error path by a call to dev_dbg(ice_pf_to_dev(pf), ...). Avoid this by simply returning in this case. If logging is desired an alternate approach might be to use pr_err() before returning. Flagged by Smatch as: .../ice_gnss.c:196 ice_gnss_read() error: we previously assumed 'pf' could be null (see line 131) Fixes: 43113ff73453 ("ice: add TTY for GNSS module for E810T device") Signed-off-by: Simon Horman Reviewed-by: Tariq Toukan Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit dea9d8f7643fab07bf89a1155f1f94f37d096a5e Author: Theodore Ts'o Date: Thu Jun 8 10:06:40 2023 -0400 ext4: only check dquot_initialize_needed() when debugging ext4_xattr_block_set() relies on its caller to call dquot_initialize() on the inode. To assure that this has happened there are WARN_ON checks. Unfortunately, this is subject to false positives if there is an antagonist thread which is flipping the file system at high rates between r/o and rw. So only do the check if EXT4_XATTR_DEBUG is enabled. Link: https://lore.kernel.org/r/20230608044056.GA1418535@mit.edu Signed-off-by: Theodore Ts'o commit 1b29243933098cdbc31b579b5616e183b4275e2f Author: Theodore Ts'o Date: Thu Jun 8 09:57:04 2023 -0400 Revert "ext4: don't clear SB_RDONLY when remounting r/w until quota is re-enabled" This reverts commit a44be64bbecb15a452496f60db6eacfee2b59c79. Link: https://lore.kernel.org/r/653b3359-2005-21b1-039d-c55ca4cffdcc@gmail.com Signed-off-by: Theodore Ts'o commit b0b4a63f38d7cae3c57588592556481aedcae8b1 Author: Baruch Siach Date: Mon Apr 24 13:52:54 2023 +0300 docs: zh_CN/devicetree: sync usage-model fix Sync compatibly string fix from the English document. Signed-off-by: Baruch Siach Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/b39560250cb58f8cdcfe95791ce5af7455c6e8e3.1682333574.git.baruch@tkos.co.il Signed-off-by: Rob Herring commit c44e0503e5fd90c5ccbf81bcff7b6b70e9e2655b Author: Baruch Siach Date: Mon Apr 24 13:52:53 2023 +0300 docs: dt: fix documented Primecell compatible string Only arm,primecell is documented as compatible string for Primecell peripherals. Current code agrees with that. Signed-off-by: Baruch Siach Link: https://lore.kernel.org/r/9e137548c4e76e0d8deef6d49460cb37897934ca.1682333574.git.baruch@tkos.co.il Signed-off-by: Rob Herring commit f7efdf5e4dc10756ad632b1863b54b1b42a07530 Author: Damien Le Moal Date: Mon May 15 07:26:14 2023 +0900 dt-bindings: Change Damien Le Moal's contact email Change my email address to dlemoal@kernel.org. Signed-off-by: Damien Le Moal Link: https://lore.kernel.org/r/20230514222614.115299-1-dlemoal@kernel.org Signed-off-by: Rob Herring commit 79b8ee702c918f1936e17cc53e14bec388ce1045 Author: Qu Wenruo Date: Tue Jun 6 15:08:28 2023 +0800 btrfs: scrub: also report errors hit during the initial read [BUG] After the recent scrub rework introduced in commit e02ee89baa66 ("btrfs: scrub: switch scrub_simple_mirror() to scrub_stripe infrastructure"), btrfs scrub no longer reports repaired errors any more: # mkfs.btrfs -f $dev -d DUP # mount $dev $mnt # xfs_io -f -d -c "pwrite -b 64K -S 0xaa 0 64" $mnt/file # umount $dev # xfs_io -f -c "pwrite -S 0xff $phy1 64K" $dev # Corrupt the first mirror # mount $dev $mnt # btrfs scrub start -BR $mnt scrub done for 725e7cb7-8a4a-4c77-9f2a-86943619e218 Scrub started: Tue Jun 6 14:56:50 2023 Status: finished Duration: 0:00:00 data_extents_scrubbed: 2 tree_extents_scrubbed: 18 data_bytes_scrubbed: 131072 tree_bytes_scrubbed: 294912 read_errors: 0 csum_errors: 0 <<< No errors here verify_errors: 0 [...] uncorrectable_errors: 0 unverified_errors: 0 corrected_errors: 16 <<< Only corrected errors last_physical: 2723151872 This can confuse btrfs-progs, as it relies on the csum_errors to determine if there is anything wrong. While on v6.3.x kernels, the report is different: csum_errors: 16 <<< verify_errors: 0 [...] uncorrectable_errors: 0 unverified_errors: 0 corrected_errors: 16 <<< [CAUSE] In the reworked scrub, we update the scrub progress inside scrub_stripe_report_errors(), using various bitmaps to update the result. For example for csum_errors, we use bitmap_weight() of stripe->csum_error_bitmap. Unfortunately at that stage, all error bitmaps (except init_error_bitmap) are the result of the latest repair attempt, thus if the stripe is fully repaired, those error bitmaps will all be empty, resulting the above output mismatch. To fix this, record the number of errors into stripe->init_nr_*_errors. Since we don't really care about where those errors are, we only need to record the number of errors. Then in scrub_stripe_report_errors(), use those initial numbers to update the progress other than using the latest error bitmaps. Fixes: e02ee89baa66 ("btrfs: scrub: switch scrub_simple_mirror() to scrub_stripe infrastructure") Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1f2030ff6e4958780af9e65a22c39fa8082f292b Author: Qu Wenruo Date: Tue Jun 6 10:05:04 2023 +0800 btrfs: scrub: respect the read-only flag during repair [BUG] With recent scrub rework, the scrub operation no longer respects the read-only flag passed by "-r" option of "btrfs scrub start" command. # mkfs.btrfs -f -d raid1 $dev1 $dev2 # mount $dev1 $mnt # xfs_io -f -d -c "pwrite -b 128K -S 0xaa 0 128k" $mnt/file # sync # xfs_io -c "pwrite -S 0xff $phy1 64k" $dev1 # xfs_io -c "pwrite -S 0xff $((phy2 + 65536)) 64k" $dev2 # mount $dev1 $mnt -o ro # btrfs scrub start -BrRd $mnt Scrub device $dev1 (id 1) done Scrub started: Tue Jun 6 09:59:14 2023 Status: finished Duration: 0:00:00 [...] corrected_errors: 16 <<< Still has corrupted sectors last_physical: 1372585984 Scrub device $dev2 (id 2) done Scrub started: Tue Jun 6 09:59:14 2023 Status: finished Duration: 0:00:00 [...] corrected_errors: 16 <<< Still has corrupted sectors last_physical: 1351614464 # btrfs scrub start -BrRd $mnt Scrub device $dev1 (id 1) done Scrub started: Tue Jun 6 10:00:17 2023 Status: finished Duration: 0:00:00 [...] corrected_errors: 0 <<< No more errors last_physical: 1372585984 Scrub device $dev2 (id 2) done [...] corrected_errors: 0 <<< No more errors last_physical: 1372585984 [CAUSE] In the newly reworked scrub code, repair is always submitted no matter if we're doing a read-only scrub. [FIX] Fix it by skipping the write submission if the scrub is a read-only one. Unfortunately for the report part, even for a read-only scrub we will still report it as corrected errors, as we know it's repairable, even we won't really submit the write. Fixes: e02ee89baa66 ("btrfs: scrub: switch scrub_simple_mirror() to scrub_stripe infrastructure") Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 58d95889f3c2064c6139ee94bb0e4d86e1ad4eab Author: Charles Keepax Date: Fri Jun 2 11:11:36 2023 +0100 soundwire: stream: Add missing clear of alloc_slave_rt The current path that skips allocating the slave runtime does not clear the alloc_slave_rt flag, this is clearly incorrect. Add the missing clear, so the runtime won't be erroneously cleaned up. Fixes: f3016b891c8c ("soundwire: stream: sdw_stream_add_ functions can be called multiple times") Reviewed-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20230602101140.2040141-1-ckeepax@opensource.cirrus.com Signed-off-by: Vinod Koul commit 7b672f282cf4712cb392ef798f0305cc4de32454 Merge: 592295e61b5c5 f1832e2b5e498 Author: Greg Kroah-Hartman Date: Thu Jun 8 11:06:30 2023 +0200 Merge tag 'usb-serial-6.4-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial device ids for 6.4-rc6 Here are some new modem device ids. Everything has been in linux-next with no reported issues. * tag 'usb-serial-6.4-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add Quectel EM061KGL series commit 6c0ec7ab5aaff3706657dd4946798aed483b9471 Merge: 182620ab3660c 1eb4ef1259134 Author: Paolo Abeni Date: Thu Jun 8 10:52:48 2023 +0200 Merge branch 'bnxt_en-bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes This patchset has the following fixes for bnxt_en: 1. Add missing VNIC ID parameter in the FW message when getting an updated RSS configuration from the FW. 2. Fix a warning when doing ethtool reset on newer chips. 3. Fix VLAN issue on a VF when a default VLAN is assigned. 4. Fix a problem during DPC (Downstream Port containment) scenario. 5. Fix a NULL pointer dereference when receiving a PTP event from FW. 6. Fix VXLAN/Geneve UDP port delete/add with newer FW. ==================== Link: https://lore.kernel.org/r/20230607075409.228450-1-michael.chan@broadcom.com Signed-off-by: Paolo Abeni commit 1eb4ef12591348c440ac9d6efcf7521e73cf2b10 Author: Somnath Kotur Date: Wed Jun 7 00:54:09 2023 -0700 bnxt_en: Implement .set_port / .unset_port UDP tunnel callbacks As per the new udp tunnel framework, drivers which need to know the details of a port entry (i.e. port type) when it gets deleted should use the .set_port / .unset_port callbacks. Implementing the current .udp_tunnel_sync callback would mean that the deleted tunnel port entry would be all zeros. This used to work on older firmware because it would not check the input when deleting a tunnel port. With newer firmware, the delete will now fail and subsequent tunnel port allocation will fail as a result. Fixes: 442a35a5a7aa ("bnxt: convert to new udp_tunnel_nic infra") Reviewed-by: Kalesh Anakkur Purayil Signed-off-by: Somnath Kotur Signed-off-by: Michael Chan Signed-off-by: Paolo Abeni commit 319a7827df9784048abe072afe6b4fb4501d8de4 Author: Pavan Chebbi Date: Wed Jun 7 00:54:08 2023 -0700 bnxt_en: Prevent kernel panic when receiving unexpected PHC_UPDATE event The firmware can send PHC_RTC_UPDATE async event on a PF that may not have PTP registered. In such a case, there will be a null pointer deference for bp->ptp_cfg when we try to handle the event. Fix it by not registering for this event with the firmware if !bp->ptp_cfg. Also, check that bp->ptp_cfg is valid before proceeding when we receive the event. Fixes: 8bcf6f04d4a5 ("bnxt_en: Handle async event when the PHC is updated in RTC mode") Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: Paolo Abeni commit 83474a9b252ab23e6003865c2775024344cb9c09 Author: Vikas Gupta Date: Wed Jun 7 00:54:07 2023 -0700 bnxt_en: Skip firmware fatal error recovery if chip is not accessible Driver starts firmware fatal error recovery by detecting heartbeat failure or fw reset count register changing. But these checks are not reliable if the device is not accessible. This can happen while DPC (Downstream Port containment) is in progress. Skip firmware fatal recovery if pci_device_is_present() returns false. Fixes: acfb50e4e773 ("bnxt_en: Add FW fatal devlink_health_reporter.") Reviewed-by: Somnath Kotur Reviewed-by: Pavan Chebbi Signed-off-by: Vikas Gupta Signed-off-by: Michael Chan Signed-off-by: Paolo Abeni commit 1a9e4f501bc6ff1b6ecb60df54fbf2b54db43bfe Author: Somnath Kotur Date: Wed Jun 7 00:54:06 2023 -0700 bnxt_en: Query default VLAN before VNIC setup on a VF We need to call bnxt_hwrm_func_qcfg() on a VF to query the default VLAN that may be setup by the PF. If a default VLAN is enabled, the VF cannot support VLAN acceleration on the receive side and the VNIC must be setup to strip out the default VLAN tag. If a default VLAN is not enabled, the VF can support VLAN acceleration on the receive side. The VNIC should be set up to strip or not strip the VLAN based on the RX VLAN acceleration setting. Without this call to determine the default VLAN before calling bnxt_setup_vnic(), the VNIC may not be set up correctly. For example, bnxt_setup_vnic() may set up to strip the VLAN tag based on stale default VLAN information. If RX VLAN acceleration is not enabled, the VLAN tag will be incorrectly stripped and the RX data path will not work correctly. Fixes: cf6645f8ebc6 ("bnxt_en: Add function for VF driver to query default VLAN.") Reviewed-by: Pavan Chebbi Signed-off-by: Somnath Kotur Signed-off-by: Michael Chan Signed-off-by: Paolo Abeni commit 1d997801c7cc6a7f542e46d5a6bf16f893ad3fe9 Author: Sreekanth Reddy Date: Wed Jun 7 00:54:05 2023 -0700 bnxt_en: Don't issue AP reset during ethtool's reset operation Only older NIC controller's firmware uses the PROC AP reset type. Firmware on 5731X/5741X and newer chips does not support this reset type. When bnxt_reset() issues a series of resets, this PROC AP reset may actually fail on these newer chips because the firmware is not ready to accept this unsupported command yet. Avoid this unnecessary error by skipping this reset type on chips that don't support it. Fixes: 7a13240e3718 ("bnxt_en: fix ethtool_reset_flags ABI violations") Reviewed-by: Pavan Chebbi Signed-off-by: Sreekanth Reddy Signed-off-by: Michael Chan Signed-off-by: Paolo Abeni commit 095d5dc0c1d9f3284e3c575ccf4c0e8b04b548f8 Author: Pavan Chebbi Date: Wed Jun 7 00:54:04 2023 -0700 bnxt_en: Fix bnxt_hwrm_update_rss_hash_cfg() We must specify the vnic id of the vnic in the input structure of this firmware message. Otherwise we will get an error from the firmware. Fixes: 98a4322b70e8 ("bnxt_en: update RSS config using difference algorithm") Reviewed-by: Kalesh Anakkur Purayil Reviewed-by: Somnath Kotur Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: Paolo Abeni commit f57ade27fc3eae16eab0f1edba1248ced429b2f0 Author: Maxim Mikityanskiy Date: Wed Jun 7 15:39:51 2023 +0300 selftests/bpf: Add test cases to assert proper ID tracking on spill The previous commit fixed a verifier bypass by ensuring that ID is not preserved on narrowing spills. Add the test cases to check the problematic patterns. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20230607123951.558971-3-maxtram95@gmail.com commit 713274f1f2c896d37017efee333fd44149710119 Author: Maxim Mikityanskiy Date: Wed Jun 7 15:39:50 2023 +0300 bpf: Fix verifier id tracking of scalars on spill The following scenario describes a bug in the verifier where it incorrectly concludes about equivalent scalar IDs which could lead to verifier bypass in privileged mode: 1. Prepare a 32-bit rogue number. 2. Put the rogue number into the upper half of a 64-bit register, and roll a random (unknown to the verifier) bit in the lower half. The rest of the bits should be zero (although variations are possible). 3. Assign an ID to the register by MOVing it to another arbitrary register. 4. Perform a 32-bit spill of the register, then perform a 32-bit fill to another register. Due to a bug in the verifier, the ID will be preserved, although the new register will contain only the lower 32 bits, i.e. all zeros except one random bit. At this point there are two registers with different values but the same ID, which means the integrity of the verifier state has been corrupted. 5. Compare the new 32-bit register with 0. In the branch where it's equal to 0, the verifier will believe that the original 64-bit register is also 0, because it has the same ID, but its actual value still contains the rogue number in the upper half. Some optimizations of the verifier prevent the actual bypass, so extra care is needed: the comparison must be between two registers, and both branches must be reachable (this is why one random bit is needed). Both branches are still suitable for the bypass. 6. Right shift the original register by 32 bits to pop the rogue number. 7. Use the rogue number as an offset with any pointer. The verifier will believe that the offset is 0, while in reality it's the given number. The fix is similar to the 32-bit BPF_MOV handling in check_alu_op for SCALAR_VALUE. If the spill is narrowing the actual register value, don't keep the ID, make sure it's reset to 0. Fixes: 354e8f1970f8 ("bpf: Support <8-byte scalar spill and refill") Signed-off-by: Maxim Mikityanskiy Signed-off-by: Daniel Borkmann Tested-by: Andrii Nakryiko # Checked veristat delta Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20230607123951.558971-2-maxtram95@gmail.com commit 7f3c782b3914e510b646a77aedc3adeac2e4a63b Author: Randy Dunlap Date: Wed Jun 7 19:54:24 2023 -0700 eeprom: at24: also select REGMAP Selecting only REGMAP_I2C can leave REGMAP unset, causing build errors, so also select REGMAP to prevent the build errors. ../drivers/misc/eeprom/at24.c:540:42: warning: 'struct regmap_config' declared inside parameter list will not be visible outside of this definition or declaration 540 | struct regmap_config *regmap_config) ../drivers/misc/eeprom/at24.c: In function 'at24_make_dummy_client': ../drivers/misc/eeprom/at24.c:552:18: error: implicit declaration of function 'devm_regmap_init_i2c' [-Werror=implicit-function-declaration] 552 | regmap = devm_regmap_init_i2c(dummy_client, regmap_config); ../drivers/misc/eeprom/at24.c:552:16: warning: assignment to 'struct regmap *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 552 | regmap = devm_regmap_init_i2c(dummy_client, regmap_config); ../drivers/misc/eeprom/at24.c: In function 'at24_probe': ../drivers/misc/eeprom/at24.c:586:16: error: variable 'regmap_config' has initializer but incomplete type 586 | struct regmap_config regmap_config = { }; ../drivers/misc/eeprom/at24.c:586:30: error: storage size of 'regmap_config' isn't known 586 | struct regmap_config regmap_config = { }; ../drivers/misc/eeprom/at24.c:586:30: warning: unused variable 'regmap_config' [-Wunused-variable] Fixes: 5c015258478e ("eeprom: at24: add basic regmap_i2c support") Signed-off-by: Randy Dunlap Signed-off-by: Bartosz Golaszewski commit 409e873ea3c1fd3079909718bbeb06ac1ec7f38b Author: Xiubo Li Date: Thu Jun 1 08:59:31 2023 +0800 ceph: fix use-after-free bug for inodes when flushing capsnaps There is a race between capsnaps flush and removing the inode from 'mdsc->snap_flush_list' list: == Thread A == == Thread B == ceph_queue_cap_snap() -> allocate 'capsnapA' ->ihold('&ci->vfs_inode') ->add 'capsnapA' to 'ci->i_cap_snaps' ->add 'ci' to 'mdsc->snap_flush_list' ... == Thread C == ceph_flush_snaps() ->__ceph_flush_snaps() ->__send_flush_snap() handle_cap_flushsnap_ack() ->iput('&ci->vfs_inode') this also will release 'ci' ... == Thread D == ceph_handle_snap() ->flush_snaps() ->iterate 'mdsc->snap_flush_list' ->get the stale 'ci' ->remove 'ci' from ->ihold(&ci->vfs_inode) this 'mdsc->snap_flush_list' will WARNING To fix this we will increase the inode's i_count ref when adding 'ci' to the 'mdsc->snap_flush_list' list. [ idryomov: need_put int -> bool ] Cc: stable@vger.kernel.org Link: https://bugzilla.redhat.com/show_bug.cgi?id=2209299 Signed-off-by: Xiubo Li Reviewed-by: Milind Changire Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit a3efabee5878b8d7b1863debb78cb7129d07a346 Author: Andrzej Kacprowski Date: Wed Jun 7 11:45:02 2023 +0200 accel/ivpu: Fix sporadic VPU boot failure Wait for AON bit in HOST_SS_CPR_RST_CLR to return 0 before starting VPUIP power up sequence, otherwise the VPU device may sporadically fail to boot. An error in power up sequence is propagated to the runtime power management - the device will be in an error state until the VPU driver is reloaded. Fixes: 35b137630f08 ("accel/ivpu: Introduce a new DRM driver for Intel VPU") Cc: stable@vger.kernel.org # 6.3.x Signed-off-by: Andrzej Kacprowski Reviewed-by: Krystian Pradzynski Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20230607094502.388489-1-stanislaw.gruszka@linux.intel.com commit b563e47957af4ff71736c5cc4120a59b055ab583 Author: Stanislaw Gruszka Date: Thu May 25 12:38:18 2023 +0200 accel/ivpu: Do not use mutex_lock_interruptible If we get signal when waiting for the mmu->lock we do not invalidate current MMU configuration that might result in undefined behavior. Additionally there is little or no benefit on break waiting for ipc->lock. In current code base, we keep this lock for short periods. Fixes: 263b2ba5fc93 ("accel/ivpu: Add Intel VPU MMU support") Reviewed-by: Krystian Pradzynski Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20230525103818.877590-2-stanislaw.gruszka@linux.intel.com commit 9f7e3611f6c828fcb6001c39d8e7a523a4f31525 Author: Andrzej Kacprowski Date: Thu May 25 12:38:17 2023 +0200 accel/ivpu: Do not trigger extra VPU reset if the VPU is idle Turning off the PLL and entering D0i3 will reset the VPU so an explicit IP reset is redundant. But if the VPU is active, it may interfere with PLL disabling and to avoid that, we have to issue an additional IP reset to silence the VPU before turning off the PLL. Fixes: a8fed6d1e0b9 ("accel/ivpu: Fix power down sequence") Cc: stable@vger.kernel.org # 6.3.x Signed-off-by: Andrzej Kacprowski Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20230525103818.877590-1-stanislaw.gruszka@linux.intel.com commit 182620ab3660c5a9098ffaa0e8a898e41b164987 Merge: a9f31047baca5 abac3ac97fe87 Author: Jakub Kicinski Date: Wed Jun 7 21:56:01 2023 -0700 Merge tag 'batadv-net-pullrequest-20230607' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here is a batman-adv bugfix: - fix a broken sync while rescheduling delayed work, by Vladislav Efanov * tag 'batadv-net-pullrequest-20230607' of git://git.open-mesh.org/linux-merge: batman-adv: Broken sync while rescheduling delayed work ==================== Link: https://lore.kernel.org/r/20230607155515.548120-1-sw@simonwunderlich.de Signed-off-by: Jakub Kicinski commit a9f31047baca57d47440c879cf259b86f900260c Author: Florian Fainelli Date: Tue Jun 6 14:43:47 2023 -0700 net: bcmgenet: Fix EEE implementation We had a number of short comings: - EEE must be re-evaluated whenever the state machine detects a link change as wight be switching from a link partner with EEE enabled/disabled - tx_lpi_enabled controls whether EEE should be enabled/disabled for the transmit path, which applies to the TBUF block - We do not need to forcibly enable EEE upon system resume, as the PHY state machine will trigger a link event that will do that, too Fixes: 6ef398ea60d9 ("net: bcmgenet: add EEE support") Signed-off-by: Florian Fainelli Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/20230606214348.2408018-1-florian.fainelli@broadcom.com Signed-off-by: Jakub Kicinski commit f0d751973f739feb3742d4e5f4c0914e8b84e7c7 Author: Jakub Kicinski Date: Tue Jun 6 18:08:26 2023 -0700 eth: ixgbe: fix the wake condition Flip the netif_carrier_ok() condition in queue wake logic. When I moved it to inside __netif_txq_completed_wake() I missed negating it. This made the condition ineffective and could probably lead to crashes. Fixes: 301f227fc860 ("net: piggy back on the memory barrier in bql when waking queues") Reviewed-by: Tony Nguyen Link: https://lore.kernel.org/r/20230607010826.960226-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 649c3fed36730a53447d8f479c14e431363563b6 Author: Jakub Kicinski Date: Tue Jun 6 18:08:25 2023 -0700 eth: bnxt: fix the wake condition The down condition should be the negation of the wake condition, IOW when I moved it from: if (cond && wake()) to if (__netif_txq_completed_wake(cond)) Cond should have been negated. Flip it now. This bug leads to occasional crashes with netconsole. It may also lead to queue never waking up in case BQL is not enabled. Reported-by: David Wei Fixes: 08a096780d92 ("bnxt: use new queue try_stop/try_wake macros") Reviewed-by: Michael Chan Link: https://lore.kernel.org/r/20230607010826.960226-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit c9d99cfa66dfff4350e064adb98367cb922accf8 Merge: 7c5d4801ecf05 f46fab0e36e61 Author: Jakub Kicinski Date: Wed Jun 7 21:47:11 2023 -0700 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2023-06-07 We've added 7 non-merge commits during the last 7 day(s) which contain a total of 12 files changed, 112 insertions(+), 7 deletions(-). The main changes are: 1) Fix a use-after-free in BPF's task local storage, from KP Singh. 2) Make struct path handling more robust in bpf_d_path, from Jiri Olsa. 3) Fix a syzbot NULL-pointer dereference in sockmap, from Eric Dumazet. 4) UAPI fix for BPF_NETFILTER before final kernel ships, from Florian Westphal. 5) Fix map-in-map array_map_gen_lookup code generation where elem_size was not being set for inner maps, from Rhys Rustad-Elliott. 6) Fix sockopt_sk selftest's NETLINK_LIST_MEMBERSHIPS assertion, from Yonghong Song. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf: Add extra path pointer check to d_path helper selftests/bpf: Fix sockopt_sk selftest bpf: netfilter: Add BPF_NETFILTER bpf_attach_type selftests/bpf: Add access_inner_map selftest bpf: Fix elem_size not being set for inner maps bpf: Fix UAF in task local storage bpf, sockmap: Avoid potential NULL dereference in sk_psock_verdict_data_ready() ==================== Link: https://lore.kernel.org/r/20230607220514.29698-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 7c5d4801ecf0564c860033d89726b99723c55146 Author: Ben Hutchings Date: Fri Jun 2 20:28:15 2023 +0200 lib: cpu_rmap: Fix potential use-after-free in irq_cpu_rmap_release() irq_cpu_rmap_release() calls cpu_rmap_put(), which may free the rmap. So we need to clear the pointer to our glue structure in rmap before doing that, not after. Fixes: 4e0473f1060a ("lib: cpu_rmap: Avoid use after free on rmap->obj array entries") Signed-off-by: Ben Hutchings Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/ZHo0vwquhOy3FaXc@decadent.org.uk Signed-off-by: Jakub Kicinski commit a1a64a151dae8ac3581c1cbde44b672045cb658b Author: Pablo Neira Ayuso Date: Thu Jun 8 00:19:12 2023 +0200 netfilter: nfnetlink: skip error delivery on batch in case of ENOMEM If caller reports ENOMEM, then stop iterating over the batch and send a single netlink message to userspace to report OOM. Fixes: cbb8125eb40b ("netfilter: nfnetlink: deliver netlink errors on batch completion") Signed-off-by: Pablo Neira Ayuso commit 212ed75dc5fb9d1423b3942c8f872a868cda3466 Author: Pablo Neira Ayuso Date: Wed Jun 7 11:55:42 2023 +0200 netfilter: nf_tables: integrate pipapo into commit protocol The pipapo set backend follows copy-on-update approach, maintaining one clone of the existing datastructure that is being updated. The clone and current datastructures are swapped via rcu from the commit step. The existing integration with the commit protocol is flawed because there is no operation to clean up the clone if the transaction is aborted. Moreover, the datastructure swap happens on set element activation. This patch adds two new operations for sets: commit and abort, these new operations are invoked from the commit and abort steps, after the transactions have been digested, and it updates the pipapo set backend to use it. This patch adds a new ->pending_update field to sets to maintain a list of sets that require this new commit and abort operations. Fixes: 3c4287f62044 ("nf_tables: Add set type for arbitrary concatenation of ranges") Signed-off-by: Pablo Neira Ayuso commit e1a600208286c197c2696e51fc313e49889315bd Author: Alvin Lee Date: Fri May 19 11:38:15 2023 -0400 drm/amd/display: Reduce sdp bw after urgent to 90% [Description] Reduce expected SDP bandwidth due to poor QoS and arbitration issues on high bandwidth configs Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Acked-by: Stylon Wang Signed-off-by: Alvin Lee Reviewed-by: Nevenko Stupar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dac652220ba0e5a2ef2da2a47a60b60aea333fdb Author: YiPeng Chai Date: Wed May 24 17:14:15 2023 +0800 drm/amdgpu: change reserved vram info print The link object of mgr->reserved_pages is the blocks variable in struct amdgpu_vram_reservation, not the link variable in struct drm_buddy_block. Signed-off-by: YiPeng Chai Reviewed-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit b447b079cf3a9971ea4d31301e673f49612ccc18 Author: Chia-I Wu Date: Thu Jun 1 14:48:08 2023 -0700 drm/amdgpu: fix xclk freq on CHIP_STONEY According to Alex, most APUs from that time seem to have the same issue (vbios says 48Mhz, actual is 100Mhz). I only have a CHIP_STONEY so I limit the fixup to CHIP_STONEY Signed-off-by: Chia-I Wu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 982b173a6c6d9472730c3116051977e05d17c8c5 Author: Min Li Date: Sat Jun 3 15:43:45 2023 +0800 drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl Userspace can race to free the gobj(robj converted from), robj should not be accessed again after drm_gem_object_put, otherwith it will result in use-after-free. Reviewed-by: Christian König Signed-off-by: Min Li Signed-off-by: Alex Deucher commit 73c12de8bee258b51bd418f33dc59f2c6e5fb5f6 Author: Alex Deucher Date: Fri Jun 2 14:37:13 2023 -0400 Revert "drm/amdgpu: switch to golden tsc registers for raven/raven2" This reverts commit f03eb1d26c2739b75580f58bbab4ab2d5d3eba46. This results in inconsistent timing reported via asynchronous GPU queries. Link: https://lists.freedesktop.org/archives/amd-gfx/2023-May/093731.html Cc: Jesse.Zhang@amd.com Cc: michel@daenzer.net Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher commit d511f95938bf9e75ab73ace0ab1cebbe9a13df4b Author: Alex Deucher Date: Fri Jun 2 14:34:12 2023 -0400 Revert "drm/amdgpu: Differentiate between Raven2 and Raven/Picasso according to revision id" This reverts commit 9d2d1827af295fd6971786672c41c4dba3657154. This results in inconsistent timing reported via asynchronous GPU queries. Link: https://lists.freedesktop.org/archives/amd-gfx/2023-May/093731.html Cc: Jesse.Zhang@amd.com Cc: michel@daenzer.net Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher commit 3b3ffd729e7e3ad706ddba4bb84358df5d43a647 Author: Alex Deucher Date: Fri Jun 2 14:32:55 2023 -0400 Revert "drm/amdgpu: change the reference clock for raven/raven2" This reverts commit fbc24293ca16b3b9ef891fe32ccd04735a6f8dc1. This results in inconsistent timing reported via asynchronous GPU queries. Link: https://lists.freedesktop.org/archives/amd-gfx/2023-May/093731.html Cc: Jesse.Zhang@amd.com Cc: michel@daenzer.net Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher commit 59de751e3845d699e02dc4da47322b92d83a41e2 Author: Samson Tam Date: Tue May 9 16:40:19 2023 -0400 drm/amd/display: add ODM case when looking for first split pipe [Why] When going from ODM 2:1 single display case to max displays, second odm pipe needs to be repurposed for one of the new single displays. However, acquire_first_split_pipe() only handles MPC case and not ODM case [How] Add ODM conditions in acquire_first_split_pipe() Add commit_minimal_transition_state() in commit_streams() to handle odm 2:1 exit first, and then process new streams Handle ODM condition in commit_minimal_transition_state() Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Acked-by: Stylon Wang Signed-off-by: Samson Tam Reviewed-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 99b3886f8674502e967b1d050e40aa669c9098c1 Author: Mario Limonciello Date: Tue May 30 12:44:30 2023 -0500 drm/amd: Make lack of `ACPI_FADT_LOW_POWER_S0` or `CONFIG_AMD_PMC` louder during suspend path Users have reported that s2idle wasn't working on OEM Phoenix systems, but it was root caused to be because `CONFIG_AMD_PMC` wasn't set in the distribution kernel config. To make this more apparent, raise the messaging to err instead of warn. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217497 Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 38e4ced804796c5725e2a52ec3601951552c4a97 Author: Evan Quan Date: Thu Apr 6 12:08:21 2023 +0800 drm/amd/pm: conditionally disable pcie lane switching for some sienna_cichlid SKUs Disable the pcie lane switching for some sienna_cichlid SKUs since it might not work well on some platforms. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 1d13c49cf4e246b218d71873f1bb1bbd376aa10e Author: Lijo Lazar Date: Fri Mar 31 16:30:01 2023 +0530 drm/amd/pm: Fix power context allocation in SMU13 Use the right data structure for allocation. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 2a1eb1a343208ce7d6839b73d62aece343e693ff Author: Horatio Zhang Date: Mon May 29 14:23:37 2023 -0400 drm/amdgpu: fix Null pointer dereference error in amdgpu_device_recover_vram Use the function of amdgpu_bo_vm_destroy to handle the resource release of shadow bo. During the amdgpu_mes_self_test, shadow bo released, but vmbo->shadow_list was not, which caused a null pointer reference error in amdgpu_device_recover_vram when GPU reset. Fixes: 6c032c37ac3e ("drm/amdgpu: Fix vram recover doesn't work after whole GPU reset (v2)") Signed-off-by: xinhui pan Signed-off-by: Horatio Zhang Acked-by: Feifei Xu Signed-off-by: Alex Deucher commit 30c3d3b70aba2464ee8c91025e91428f92464077 Author: Mario Limonciello Date: Tue May 30 11:57:59 2023 -0500 drm/amd: Disallow s0ix without BIOS support again commit cf488dcd0ab7 ("drm/amd: Allow s0ix without BIOS support") showed improvements to power consumption over suspend when s0ix wasn't enabled in BIOS and the system didn't support S3. This patch however was misguided because the reason the system didn't support S3 was because SMT was disabled in OEM BIOS setup. This prevented the BIOS from allowing S3. Also allowing GPUs to use the s2idle path actually causes problems if they're invoked on systems that may not support s2idle in the platform firmware. `systemd` has a tendency to try to use `s2idle` if `deep` fails for any reason, which could lead to unexpected flows. The original commit also fixed a problem during resume from suspend to idle without hardware support, but this is no longer necessary with commit ca4751866397 ("drm/amd: Don't allow s0ix on APUs older than Raven") Revert commit cf488dcd0ab7 ("drm/amd: Allow s0ix without BIOS support") to make it match the expected behavior again. Cc: Rafael Ávila de Espíndola Link: https://github.com/torvalds/linux/blob/v6.1/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c#L1060 Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2599 Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 5f63595ebd82f56a2dd36ca013dd7f5ff2e2416a Merge: 25bda386c3d52 feee70f456865 Author: Linus Torvalds Date: Wed Jun 7 13:49:42 2023 -0700 Merge tag 'input-for-v6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - a fix for unbalanced open count for inhibited input devices - fixups in Elantech PS/2 and Cyppress TTSP v5 drivers - a quirk to soc_button_array driver to make it work with Lenovo Yoga Book X90F / X90L - a removal of erroneous entry from xpad driver * tag 'input-for-v6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: xpad - delete a Razer DeathAdder mouse VID/PID entry Input: psmouse - fix OOB access in Elantech protocol Input: soc_button_array - add invalid acpi_index DMI quirk handling Input: fix open count when closing inhibited device Input: cyttsp5 - fix array length commit de29a96acceae732c68a4094d08dc49079eefa02 Author: Chen-Yu Tsai Date: Fri May 26 15:35:37 2023 +0800 notifier: Initialize new struct srcu_usage field In commit 95433f726301 ("srcu: Begin offloading srcu_struct fields to srcu_update"), a new struct srcu_usage field was added, but was not properly initialized. This led to a "spinlock bad magic" BUG when the SRCU notifier was ever used. This was observed in the MediaTek CCI devfreq driver on next-20230525. The trimmed stack trace is as follows: BUG: spinlock bad magic on CPU#4, swapper/0/1 lock: 0xffffff80ff529ac0, .magic: 00000000, .owner: /-1, .owner_cpu: 0 Call trace: spin_bug+0xa4/0xe8 do_raw_spin_lock+0xec/0x120 _raw_spin_lock_irqsave+0x78/0xb8 synchronize_srcu+0x3c/0x168 srcu_notifier_chain_unregister+0x5c/0xa0 cpufreq_unregister_notifier+0x94/0xe0 devfreq_passive_event_handler+0x7c/0x3e0 devfreq_remove_device+0x48/0xe8 Add __SRCU_USAGE_INIT() to SRCU_NOTIFIER_INIT() so that srcu_usage gets initialized properly. Reported-by: Jon Hunter Fixes: 95433f726301 ("srcu: Begin offloading srcu_struct fields to srcu_update") Signed-off-by: Chen-Yu Tsai Tested-by: AngeloGioacchino Del Regno Cc: Matthias Brugger Cc: "Rafael J. Wysocki" Cc: "Michał Mirosław" Cc: Dmitry Osipenko Cc: Sachin Sant Cc: Joel Fernandes (Google) Acked-by: Zqiang Signed-off-by: Paul E. McKenney commit 4d8df0f5f79f747d75a7d356d9b9ea40a4e4c8a9 Author: Prathu Baronia Date: Mon May 22 14:20:19 2023 +0530 vhost: use kzalloc() instead of kmalloc() followed by memset() Use kzalloc() to allocate new zeroed out msg node instead of memsetting a node allocated with kmalloc(). Signed-off-by: Prathu Baronia Message-Id: <20230522085019.42914-1-prathubaronia2011@gmail.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella commit 25bda386c3d526b48dd22186324570fc8e191a52 Author: Thomas Gleixner Date: Wed Jun 7 01:14:05 2023 +0200 MAINTAINERS: Add entry for debug objects This is overdue and an oversight. Add myself to this file deespite the fact that I'm trying to reduce the number of entries in this file which have my name attached, but in the hope that patches wont get picked up elsewhere completely unreviewed and unnoticed. Signed-off-by: Thomas Gleixner Signed-off-by: Linus Torvalds commit 2a567c1e29301495affa220543f156dd6dad50a9 Author: Diederik de Haas Date: Tue May 9 16:15:01 2023 +0200 dt-bindings: net: realtek-bluetooth: Fix double RTL8723CS in desc The description says 'RTL8723CS/RTL8723CS/...' whereas the title and other places reference 'RTL8723BS/RTL8723CS/...'. Signed-off-by: Diederik de Haas Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230509141500.275887-1-didi.debian@cknow.org Signed-off-by: Rob Herring commit 44b902e935be111fc98eb2a2d8e3d08196fd52ac Author: Chris Morgan Date: Mon May 8 11:08:10 2023 -0500 dt-bindings: net: realtek-bluetooth: Fix RTL8821CS binding Update the fallback string for the RTL8821CS from realtek,rtl8822cs-bt to realtek,rtl8723bs-bt. The difference between these two strings is that the 8822cs enables power saving features that the 8723bs does not, and in testing the 8821cs seems to have issues with these power saving modes enabled. Fixes: 95ee3a93239e ("dt-bindings: net: realtek-bluetooth: Add RTL8821CS") Signed-off-by: Chris Morgan Acked-by: Krzysztof Kozlowski Acked-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230508160811.3568213-2-macroalpha82@gmail.com Signed-off-by: Rob Herring commit a27648c742104a833a01c54becc24429898d85bf Author: David Howells Date: Wed Jun 7 09:47:13 2023 +0100 afs: Fix setting of mtime when creating a file/dir/symlink kafs incorrectly passes a zero mtime (ie. 1st Jan 1970) to the server when creating a file, dir or symlink because the mtime recorded in the afs_operation struct gets passed to the server by the marshalling routines, but the afs_mkdir(), afs_create() and afs_symlink() functions don't set it. This gets masked if a file or directory is subsequently modified. Fix this by filling in op->mtime before calling the create op. Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept") Signed-off-by: David Howells Reviewed-by: Jeffrey Altman Reviewed-by: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Linus Torvalds commit 30c60dda219ddda0bc6ff6ac55d493d9db8be4fa Author: Oliver Upton Date: Tue Jun 6 18:48:14 2023 +0000 KVM: arm64: Use raw_smp_processor_id() in kvm_pmu_probe_armpmu() Sebastian reports that commit 1c913a1c35aa ("KVM: arm64: Iterate arm_pmus list to probe for default PMU") introduced the following splat with CONFIG_DEBUG_PREEMPT enabled: [70506.110187] BUG: using smp_processor_id() in preemptible [00000000] code: qemu-system-aar/3078242 [70506.119077] caller is debug_smp_processor_id+0x20/0x30 [70506.124229] CPU: 129 PID: 3078242 Comm: qemu-system-aar Tainted: G W 6.4.0-rc5 #25 [70506.133176] Hardware name: GIGABYTE R181-T92-00/MT91-FS4-00, BIOS F34 08/13/2020 [70506.140559] Call trace: [70506.142993] dump_backtrace+0xa4/0x130 [70506.146737] show_stack+0x20/0x38 [70506.150040] dump_stack_lvl+0x48/0x60 [70506.153704] dump_stack+0x18/0x28 [70506.157007] check_preemption_disabled+0xe4/0x108 [70506.161701] debug_smp_processor_id+0x20/0x30 [70506.166046] kvm_arm_pmu_v3_set_attr+0x460/0x628 [70506.170662] kvm_arm_vcpu_arch_set_attr+0x88/0xd8 [70506.175363] kvm_arch_vcpu_ioctl+0x258/0x4a8 [70506.179632] kvm_vcpu_ioctl+0x32c/0x6b8 [70506.183465] __arm64_sys_ioctl+0xb4/0x100 [70506.187467] invoke_syscall+0x78/0x108 [70506.191205] el0_svc_common.constprop.0+0x4c/0x100 [70506.195984] do_el0_svc+0x34/0x50 [70506.199287] el0_svc+0x34/0x108 [70506.202416] el0t_64_sync_handler+0xf4/0x120 [70506.206674] el0t_64_sync+0x194/0x198 Fix the issue by using the raw variant that bypasses the debug assertion. While at it, stick all of the nuance and UAPI baggage into a comment for posterity. Fixes: 1c913a1c35aa ("KVM: arm64: Iterate arm_pmus list to probe for default PMU") Reported-by: Sebastian Ott Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230606184814.456743-1-oliver.upton@linux.dev commit 1caa71a7a600f7781ce05ef1e84701c459653663 Author: Marc Zyngier Date: Wed Jun 7 15:38:44 2023 +0100 KVM: arm64: Restore GICv2-on-GICv3 functionality When reworking the vgic locking, the vgic distributor registration got simplified, which was a very good cleanup. But just a tad too radical, as we now register the *native* vgic only, ignoring the GICv2-on-GICv3 that allows pre-historic VMs (or so I thought) to run. As it turns out, QEMU still defaults to GICv2 in some cases, and this breaks Nathan's setup! Fix it by propagating the *requested* vgic type rather than the host's version. Fixes: 59112e9c390b ("KVM: arm64: vgic: Fix a circular locking issue") Reported-by: Nathan Chancellor Tested-by: Nathan Chancellor Signed-off-by: Marc Zyngier link: https://lore.kernel.org/r/20230606221525.GA2269598@dev-arch.thelio-3990X commit 49a0a3731596fc004db6eec3fc674d92a09ef383 Author: Alexandre Ghiti Date: Wed Jun 7 14:58:51 2023 +0200 riscv: Check the virtual alignment before choosing a map size We used to only check the alignment of the physical address to decide which mapping would fit for a certain region of the linear mapping, but it is not enough since the virtual address must also be aligned, so check that too. Fixes: 3335068f8721 ("riscv: Use PUD/P4D/PGD pages for the linear mapping") Reported-by: Song Shuai Link: https://lore.kernel.org/linux-riscv/tencent_7C3B580B47C1B17C16488EC1@qq.com/ Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20230607125851.63370-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 25abe0db92437fde463204c3e4eb5a71b62d6e5d Author: Alexandre Ghiti Date: Tue Jun 6 15:04:44 2023 +0200 riscv: Fix kfence now that the linear mapping can be backed by PUD/P4D/PGD RISC-V Kfence implementation used to rely on the fact the linear mapping was backed by at most PMD hugepages, which is not true anymore since commit 3335068f8721 ("riscv: Use PUD/P4D/PGD pages for the linear mapping"). Instead of splitting PUD/P4D/PGD mappings afterwards, directly map the kfence pool region using PTE mappings by allocating this region before setup_vm_final(). Reported-by: syzbot+a74d57bddabbedd75135@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=a74d57bddabbedd75135 Fixes: 3335068f8721 ("riscv: Use PUD/P4D/PGD pages for the linear mapping") Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20230606130444.25090-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 6569fc12e442ea973d96db39e542aa19a7bc3a79 Author: Hsieh-Tseng Shen Date: Tue Apr 25 18:28:28 2023 +0800 riscv: mm: Ensure prot of VM_WRITE and VM_EXEC must be readable Commit 8aeb7b17f04e ("RISC-V: Make mmap() with PROT_WRITE imply PROT_READ") allows riscv to use mmap with PROT_WRITE only, and meanwhile mmap with w+x is also permitted. However, when userspace tries to access this page with PROT_WRITE|PROT_EXEC, which causes infinite loop at load page fault as well as it triggers soft lockup. According to riscv privileged spec, "Writable pages must also be marked readable". The fix to drop the `PAGE_COPY_READ_EXEC` and then `PAGE_COPY_EXEC` would be just used instead. This aligns the other arches (i.e arm64) for protection_map. Fixes: 8aeb7b17f04e ("RISC-V: Make mmap() with PROT_WRITE imply PROT_READ") Signed-off-by: Hsieh-Tseng Shen Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20230425102828.1616812-1-woodrow.shen@sifive.com Signed-off-by: Palmer Dabbelt commit b00de0000a69579f4d730077fe3ea8ca31404255 Author: Abel Vesa Date: Mon Jun 5 14:56:07 2023 +0300 regulator: qcom-rpmh: Fix regulators for PM8550 The PM8550 uses only NLDOs 515 and the LDO 6 through 8 are low voltage type, so fix accordingly. Fixes: e6e3776d682d ("regulator: qcom-rpmh: Add support for PM8550 regulators") Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230605115607.921308-1-abel.vesa@linaro.org Signed-off-by: Mark Brown commit f46fab0e36e611a2389d3843f34658c849b6bd60 Author: Jiri Olsa Date: Tue Jun 6 11:17:14 2023 -0700 bpf: Add extra path pointer check to d_path helper Anastasios reported crash on stable 5.15 kernel with following BPF attached to lsm hook: SEC("lsm.s/bprm_creds_for_exec") int BPF_PROG(bprm_creds_for_exec, struct linux_binprm *bprm) { struct path *path = &bprm->executable->f_path; char p[128] = { 0 }; bpf_d_path(path, p, 128); return 0; } But bprm->executable can be NULL, so bpf_d_path call will crash: BUG: kernel NULL pointer dereference, address: 0000000000000018 #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 ... RIP: 0010:d_path+0x22/0x280 ... Call Trace: bpf_d_path+0x21/0x60 bpf_prog_db9cf176e84498d9_bprm_creds_for_exec+0x94/0x99 bpf_trampoline_6442506293_0+0x55/0x1000 bpf_lsm_bprm_creds_for_exec+0x5/0x10 security_bprm_creds_for_exec+0x29/0x40 bprm_execve+0x1c1/0x900 do_execveat_common.isra.0+0x1af/0x260 __x64_sys_execve+0x32/0x40 It's problem for all stable trees with bpf_d_path helper, which was added in 5.9. This issue is fixed in current bpf code, where we identify and mark trusted pointers, so the above code would fail even to load. For the sake of the stable trees and to workaround potentially broken verifier in the future, adding the code that reads the path object from the passed pointer and verifies it's valid in kernel space. Fixes: 6e22ab9da793 ("bpf: Add d_path helper") Reported-by: Anastasios Papagiannis Suggested-by: Alexei Starovoitov Signed-off-by: Jiri Olsa Signed-off-by: Daniel Borkmann Acked-by: Stanislav Fomichev Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20230606181714.532998-1-jolsa@kernel.org commit d1f11f41eb746a33816695f1b6b6719826cc532c Author: Bartosz Golaszewski Date: Mon Jun 5 16:53:08 2023 +0200 MAINTAINERS: add Andy Shevchenko as reviewer for the GPIO subsystem Andy has been a de-facto reviewer for all things GPIO for a long time so let's make it official. Signed-off-by: Bartosz Golaszewski Acked-by: Andy Shevchenko Reviewed-by: Linus Walleij commit d7459efc9276a715fe9def401bc30045aeb9668a Author: Kent Gibson Date: Wed Jun 7 14:50:04 2023 +0800 gpio: sim: quietly ignore configured lines outside the bank The user-space policy of the gpio-sim is that configuration for lines with offsets outside the bounds of the corresponding bank is ignored, but gpio-sim is still using that configuration when constructing the sim. In the case of named lines this results in temporarily allocating space for names that are not used, and for hogs results in errors being logged when the gpio-sim attempts to register the out of range hog with gpiolib: gpiochip_machine_hog: unable to get GPIO desc: -22 Add checks to filter out any line configuration outside the bounds of the bank when constructing the sim. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 44f8baaf230c655c249467ca415b570deca8df77 Author: Hangyu Hua Date: Wed Jun 7 10:23:01 2023 +0800 net: sched: fix possible refcount leak in tc_chain_tmplt_add() try_module_get will be called in tcf_proto_lookup_ops. So module_put needs to be called to drop the refcount if ops don't implement the required function. Fixes: 9f407f1768d3 ("net: sched: introduce chain templates") Signed-off-by: Hangyu Hua Reviewed-by: Larysa Zaremba Signed-off-by: David S. Miller commit 682881ee45c81daa883dcd4fe613b0b0d988bb22 Author: Eric Dumazet Date: Tue Jun 6 13:13:04 2023 +0000 net: sched: act_police: fix sparse errors in tcf_police_dump() Fixes following sparse errors: net/sched/act_police.c:360:28: warning: dereference of noderef expression net/sched/act_police.c:362:45: warning: dereference of noderef expression net/sched/act_police.c:362:45: warning: dereference of noderef expression net/sched/act_police.c:368:28: warning: dereference of noderef expression net/sched/act_police.c:370:45: warning: dereference of noderef expression net/sched/act_police.c:370:45: warning: dereference of noderef expression net/sched/act_police.c:376:45: warning: dereference of noderef expression net/sched/act_police.c:376:45: warning: dereference of noderef expression Fixes: d1967e495a8d ("net_sched: act_police: add 2 new attributes to support police 64bit rate and peakrate") Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit de9df6c6b27e22d7bdd20107947ef3a20e687de5 Author: Eelco Chaudron Date: Tue Jun 6 13:56:35 2023 +0200 net: openvswitch: fix upcall counter access before allocation Currently, the per cpu upcall counters are allocated after the vport is created and inserted into the system. This could lead to the datapath accessing the counters before they are allocated resulting in a kernel Oops. Here is an example: PID: 59693 TASK: ffff0005f4f51500 CPU: 0 COMMAND: "ovs-vswitchd" #0 [ffff80000a39b5b0] __switch_to at ffffb70f0629f2f4 #1 [ffff80000a39b5d0] __schedule at ffffb70f0629f5cc #2 [ffff80000a39b650] preempt_schedule_common at ffffb70f0629fa60 #3 [ffff80000a39b670] dynamic_might_resched at ffffb70f0629fb58 #4 [ffff80000a39b680] mutex_lock_killable at ffffb70f062a1388 #5 [ffff80000a39b6a0] pcpu_alloc at ffffb70f0594460c #6 [ffff80000a39b750] __alloc_percpu_gfp at ffffb70f05944e68 #7 [ffff80000a39b760] ovs_vport_cmd_new at ffffb70ee6961b90 [openvswitch] ... PID: 58682 TASK: ffff0005b2f0bf00 CPU: 0 COMMAND: "kworker/0:3" #0 [ffff80000a5d2f40] machine_kexec at ffffb70f056a0758 #1 [ffff80000a5d2f70] __crash_kexec at ffffb70f057e2994 #2 [ffff80000a5d3100] crash_kexec at ffffb70f057e2ad8 #3 [ffff80000a5d3120] die at ffffb70f0628234c #4 [ffff80000a5d31e0] die_kernel_fault at ffffb70f062828a8 #5 [ffff80000a5d3210] __do_kernel_fault at ffffb70f056a31f4 #6 [ffff80000a5d3240] do_bad_area at ffffb70f056a32a4 #7 [ffff80000a5d3260] do_translation_fault at ffffb70f062a9710 #8 [ffff80000a5d3270] do_mem_abort at ffffb70f056a2f74 #9 [ffff80000a5d32a0] el1_abort at ffffb70f06297dac #10 [ffff80000a5d32d0] el1h_64_sync_handler at ffffb70f06299b24 #11 [ffff80000a5d3410] el1h_64_sync at ffffb70f056812dc #12 [ffff80000a5d3430] ovs_dp_upcall at ffffb70ee6963c84 [openvswitch] #13 [ffff80000a5d3470] ovs_dp_process_packet at ffffb70ee6963fdc [openvswitch] #14 [ffff80000a5d34f0] ovs_vport_receive at ffffb70ee6972c78 [openvswitch] #15 [ffff80000a5d36f0] netdev_port_receive at ffffb70ee6973948 [openvswitch] #16 [ffff80000a5d3720] netdev_frame_hook at ffffb70ee6973a28 [openvswitch] #17 [ffff80000a5d3730] __netif_receive_skb_core.constprop.0 at ffffb70f06079f90 We moved the per cpu upcall counter allocation to the existing vport alloc and free functions to solve this. Fixes: 95637d91fefd ("net: openvswitch: release vport resources on failure") Fixes: 1933ea365aa7 ("net: openvswitch: Add support to count upcall packets") Signed-off-by: Eelco Chaudron Reviewed-by: Simon Horman Acked-by: Aaron Conole Signed-off-by: David S. Miller commit 886bc7d6ed3357975c5f1d3c784da96000d4bbb4 Author: Eric Dumazet Date: Tue Jun 6 11:42:33 2023 +0000 net: sched: move rtm_tca_policy declaration to include file rtm_tca_policy is used from net/sched/sch_api.c and net/sched/cls_api.c, thus should be declared in an include file. This fixes the following sparse warning: net/sched/sch_api.c:1434:25: warning: symbol 'rtm_tca_policy' was not declared. Should it be static? Fixes: e331473fee3d ("net/sched: cls_api: add missing validation of netlink attributes") Signed-off-by: Eric Dumazet Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit abd649fdf91adf44c5bb46891b6d8741a14f90a5 Merge: 08425abbab998 436eeae0411ac Author: Arnd Bergmann Date: Wed Jun 7 12:58:22 2023 +0200 Merge tag 'amdtee-fix-for-v6.5' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes AMDTEE add return origin to load TA command * tag 'amdtee-fix-for-v6.5' of https://git.linaro.org/people/jens.wiklander/linux-tee: tee: amdtee: Add return_origin to 'struct tee_cmd_load_ta' Link: https://lore.kernel.org/r/20230606075843.GA2792442@rayden Signed-off-by: Arnd Bergmann commit ca0aa17f2db3468fd017038d23a78e17388e2f67 Author: Uwe Kleine-König Date: Thu Mar 9 10:58:19 2023 +0100 i2c: sprd: Delete i2c adapter in .remove's error path If pm runtime resume fails the .remove callback used to exit early. This resulted in an error message by the driver core but the device gets removed anyhow. This lets the registered i2c adapter stay around with an unbound parent device. So only skip clk disabling if resume failed, but do delete the adapter. Fixes: 8b9ec0719834 ("i2c: Add Spreadtrum I2C controller driver") Signed-off-by: Uwe Kleine-König Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang commit bf15bb38ec7f4ff522da5c20e1673dbda7159938 Author: Michal Schmidt Date: Tue Jun 6 10:12:53 2023 -0700 ice: make writes to /dev/gnssX synchronous The current ice driver's GNSS write implementation buffers writes and works through them asynchronously in a kthread. That's bad because: - The GNSS write_raw operation is supposed to be synchronous[1][2]. - There is no upper bound on the number of pending writes. Userspace can submit writes much faster than the driver can process, consuming unlimited amounts of kernel memory. A patch that's currently on review[3] ("[v3,net] ice: Write all GNSS buffers instead of first one") would add one more problem: - The possibility of waiting for a very long time to flush the write work when doing rmmod, softlockups. To fix these issues, simplify the implementation: Drop the buffering, the write_work, and make the writes synchronous. I tested this with gpsd and ubxtool. [1] https://events19.linuxfoundation.org/wp-content/uploads/2017/12/The-GNSS-Subsystem-Johan-Hovold-Hovold-Consulting-AB.pdf "User interface" slide. [2] A comment in drivers/gnss/core.c:gnss_write(): /* Ignoring O_NONBLOCK, write_raw() is synchronous. */ [3] https://patchwork.ozlabs.org/project/intel-wired-lan/patch/20230217120541.16745-1-karol.kolacinski@intel.com/ Fixes: d6b98c8d242a ("ice: add write functionality for GNSS TTY") Signed-off-by: Michal Schmidt Reviewed-by: Simon Horman Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Signed-off-by: David S. Miller commit 79d0150d2d983a4f6efee676cea06027f586fcd0 Author: Tvrtko Ursulin Date: Mon Jun 5 14:11:35 2023 +0100 drm/i915/selftests: Add some missing error propagation Add some missing error propagation in live_parallel_switch. To avoid needlessly burdening the various backport processes, note I am not marking it as a fix against any patches and not copying stable since it is debug/selftests only code. Signed-off-by: Tvrtko Ursulin Reported-by: Dan Carpenter Cc: Andi Shyti Reviewed-by: Andi Shyti Fixes: 50d16d44cce4 ("drm/i915/selftests: Exercise context switching in parallel") Fixes: 6407cf533217 ("drm/i915/selftests: Stop using kthread_stop()") Link: https://patchwork.freedesktop.org/patch/msgid/20230605131135.396854-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit 412fa1f097f48c8c1321806dd25e46618e0da147) Signed-off-by: Joonas Lahtinen commit d636fc5dd692c8f4e00ae6e0359c0eceeb5d9bdb Author: Eric Dumazet Date: Tue Jun 6 11:19:29 2023 +0000 net: sched: add rcu annotations around qdisc->qdisc_sleeping syzbot reported a race around qdisc->qdisc_sleeping [1] It is time we add proper annotations to reads and writes to/from qdisc->qdisc_sleeping. [1] BUG: KCSAN: data-race in dev_graft_qdisc / qdisc_lookup_rcu read to 0xffff8881286fc618 of 8 bytes by task 6928 on cpu 1: qdisc_lookup_rcu+0x192/0x2c0 net/sched/sch_api.c:331 __tcf_qdisc_find+0x74/0x3c0 net/sched/cls_api.c:1174 tc_get_tfilter+0x18f/0x990 net/sched/cls_api.c:2547 rtnetlink_rcv_msg+0x7af/0x8c0 net/core/rtnetlink.c:6386 netlink_rcv_skb+0x126/0x220 net/netlink/af_netlink.c:2546 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6413 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x56f/0x640 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x665/0x770 net/netlink/af_netlink.c:1913 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] ____sys_sendmsg+0x375/0x4c0 net/socket.c:2503 ___sys_sendmsg net/socket.c:2557 [inline] __sys_sendmsg+0x1e3/0x270 net/socket.c:2586 __do_sys_sendmsg net/socket.c:2595 [inline] __se_sys_sendmsg net/socket.c:2593 [inline] __x64_sys_sendmsg+0x46/0x50 net/socket.c:2593 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd write to 0xffff8881286fc618 of 8 bytes by task 6912 on cpu 0: dev_graft_qdisc+0x4f/0x80 net/sched/sch_generic.c:1115 qdisc_graft+0x7d0/0xb60 net/sched/sch_api.c:1103 tc_modify_qdisc+0x712/0xf10 net/sched/sch_api.c:1693 rtnetlink_rcv_msg+0x807/0x8c0 net/core/rtnetlink.c:6395 netlink_rcv_skb+0x126/0x220 net/netlink/af_netlink.c:2546 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6413 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x56f/0x640 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x665/0x770 net/netlink/af_netlink.c:1913 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] ____sys_sendmsg+0x375/0x4c0 net/socket.c:2503 ___sys_sendmsg net/socket.c:2557 [inline] __sys_sendmsg+0x1e3/0x270 net/socket.c:2586 __do_sys_sendmsg net/socket.c:2595 [inline] __se_sys_sendmsg net/socket.c:2593 [inline] __x64_sys_sendmsg+0x46/0x50 net/socket.c:2593 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 6912 Comm: syz-executor.5 Not tainted 6.4.0-rc3-syzkaller-00190-g0d85b27b0cc6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Fixes: 3a7d0d07a386 ("net: sched: extend Qdisc with rcu") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Vlad Buslov Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit e3144ff52f7d2c884eef352cec9b9ff9acd2eb2f Merge: ab39b113e7475 5c3b74a92aa28 Author: David S. Miller Date: Wed Jun 7 10:09:05 2023 +0100 Merge branch 'rfs-lockless-annotate' Eric Dumazet says: ==================== rfs: annotate lockless accesses rfs runs without locks held, so we should annotate read and writes to shared variables. It should prevent compilers forcing writes in the following situation: if (var != val) var = val; A compiler could indeed simply avoid the conditional: var = val; This matters if var is shared between many cpus. v2: aligns one closing bracket (Simon) adds Fixes: tags (Jakub) ==================== Signed-off-by: David S. Miller commit 5c3b74a92aa285a3df722bf6329ba7ccf70346d6 Author: Eric Dumazet Date: Tue Jun 6 07:41:15 2023 +0000 rfs: annotate lockless accesses to RFS sock flow table Add READ_ONCE()/WRITE_ONCE() on accesses to the sock flow table. This also prevents a (smart ?) compiler to remove the condition in: if (table->ents[index] != newval) table->ents[index] = newval; We need the condition to avoid dirtying a shared cache line. Fixes: fec5e652e58f ("rfs: Receive Flow Steering") Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Reviewed-by: Kuniyuki Iwashima Signed-off-by: David S. Miller commit 1e5c647c3f6d4f8497dedcd226204e1880e0ffb3 Author: Eric Dumazet Date: Tue Jun 6 07:41:14 2023 +0000 rfs: annotate lockless accesses to sk->sk_rxhash Add READ_ONCE()/WRITE_ONCE() on accesses to sk->sk_rxhash. This also prevents a (smart ?) compiler to remove the condition in: if (sk->sk_rxhash != newval) sk->sk_rxhash = newval; We need the condition to avoid dirtying a shared cache line. Fixes: fec5e652e58f ("rfs: Receive Flow Steering") Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Reviewed-by: Kuniyuki Iwashima Signed-off-by: David S. Miller commit bf06fcf4be0feefebd27deb8b60ad262f4230489 Author: Leon Romanovsky Date: Mon Jun 5 10:36:15 2023 +0300 xfrm: add missed call to delete offloaded policies Offloaded policies are deleted through two flows: netdev is going down and policy flush. In both cases, the code lacks relevant call to delete offloaded policy. Fixes: 919e43fad516 ("xfrm: add an interface to offload policy") Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Signed-off-by: Steffen Klassert commit ab39b113e74751958aac1b125a14ee42bd7d3efd Merge: 20c47646a2602 75767213f3d9b Author: Jakub Kicinski Date: Tue Jun 6 21:36:57 2023 -0700 Merge tag 'for-net-2023-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - Fixes to debugfs registration - Fix use-after-free in hci_remove_ltk/hci_remove_irk - Fixes to ISO channel support - Fix missing checks for invalid L2CAP DCID - Fix l2cap_disconnect_req deadlock - Add lock to protect HCI_UNREGISTER * tag 'for-net-2023-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: L2CAP: Add missing checks for invalid DCID Bluetooth: ISO: use correct CIS order in Set CIG Parameters event Bluetooth: ISO: don't try to remove CIG if there are bound CIS left Bluetooth: Fix l2cap_disconnect_req deadlock Bluetooth: hci_qca: fix debugfs registration Bluetooth: fix debugfs registration Bluetooth: hci_sync: add lock to protect HCI_UNREGISTER Bluetooth: Fix use-after-free in hci_remove_ltk/hci_remove_irk Bluetooth: ISO: Fix CIG auto-allocation to select configurable CIG Bluetooth: ISO: consider right CIS when removing CIG at cleanup ==================== Link: https://lore.kernel.org/r/20230606003454.2392552-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 20c47646a26026aa7d1a820eb5ebb4e1980cf552 Merge: e684ab76afebc 08e42a0d3ad30 Author: Jakub Kicinski Date: Tue Jun 6 21:23:49 2023 -0700 Merge tag 'nf-23-06-07' 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) Missing nul-check in basechain hook netlink dump path, from Gavrilov Ilia. 2) Fix bitwise register tracking, from Jeremy Sowden. 3) Null pointer dereference when accessing conntrack helper, from Tijs Van Buggenhout. 4) Add schedule point to ipset's call_ad, from Kuniyuki Iwashima. 5) Incorrect boundary check when building chain blob. * tag 'nf-23-06-07' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_tables: out-of-bound check in chain blob netfilter: ipset: Add schedule point in call_ad(). netfilter: conntrack: fix NULL pointer dereference in nf_confirm_cthelper netfilter: nft_bitwise: fix register tracking netfilter: nf_tables: Add null check for nla_nest_start_noflag() in nft_dump_basechain_hook() ==================== Link: https://lore.kernel.org/r/20230606225851.67394-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit e684ab76afebcaccd428f7d55361d5669ccc3e2d Merge: accc1bf23068c f7e60032c6618 Author: Jakub Kicinski Date: Tue Jun 6 21:16:52 2023 -0700 Merge tag 'wireless-2023-06-06' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.4 Both rtw88 and rtw89 have a 802.11 powersave fix for a regression introduced in v6.0. mt76 fixes a race and a null pointer dereference. iwlwifi fixes an issue where not enough memory was allocated for a firmware event. And finally the stack has several smaller fixes all over. * tag 'wireless-2023-06-06' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: cfg80211: fix locking in regulatory disconnect wifi: cfg80211: fix locking in sched scan stop work wifi: iwlwifi: mvm: Fix -Warray-bounds bug in iwl_mvm_wait_d3_notif() wifi: mac80211: fix switch count in EMA beacons wifi: mac80211: don't translate beacon/presp addrs wifi: mac80211: mlme: fix non-inheritence element wifi: cfg80211: reject bad AP MLD address wifi: mac80211: use correct iftype HE cap wifi: mt76: mt7996: fix possible NULL pointer dereference in mt7996_mac_write_txwi() wifi: rtw89: remove redundant check of entering LPS wifi: rtw89: correct PS calculation for SUPPORTS_DYNAMIC_PS wifi: rtw88: correct PS calculation for SUPPORTS_DYNAMIC_PS wifi: mt76: mt7615: fix possible race in mt7615_mac_sta_poll ==================== Link: https://lore.kernel.org/r/20230606150817.EC133C433D2@smtp.kernel.org Signed-off-by: Jakub Kicinski commit accc1bf23068c1cdc4c2b015320ba856e210dd98 Author: Brett Creeley Date: Mon Jun 5 12:59:25 2023 -0700 virtio_net: use control_buf for coalesce params Commit 699b045a8e43 ("net: virtio_net: notifications coalescing support") added coalescing command support for virtio_net. However, the coalesce commands are using buffers on the stack, which is causing the device to see DMA errors. There should also be a complaint from check_for_stack() in debug_dma_map_xyz(). Fix this by adding and using coalesce params from the control_buf struct, which aligns with other commands. Cc: stable@vger.kernel.org Fixes: 699b045a8e43 ("net: virtio_net: notifications coalescing support") Reviewed-by: Shannon Nelson Signed-off-by: Allen Hubbe Signed-off-by: Brett Creeley Acked-by: Jason Wang Reviewed-by: Xuan Zhuo Acked-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/20230605195925.51625-1-brett.creeley@amd.com Signed-off-by: Jakub Kicinski commit 4f48c30312b7af5365878ab191bb41e7b899e09b Author: Brett Creeley Date: Mon Jun 5 12:51:16 2023 -0700 pds_core: Fix FW recovery detection Commit 523847df1b37 ("pds_core: add devcmd device interfaces") included initial support for FW recovery detection. Unfortunately, the ordering in pdsc_is_fw_good() was incorrect, which was causing FW recovery to be undetected by the driver. Fix this by making sure to update the cached fw_status by calling pdsc_is_fw_running() before setting the local FW gen. Fixes: 523847df1b37 ("pds_core: add devcmd device interfaces") Signed-off-by: Shannon Nelson Signed-off-by: Brett Creeley Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230605195116.49653-1-brett.creeley@amd.com Signed-off-by: Jakub Kicinski commit 82a01ab35bd02ba4b0b4e12bc95c5b69240eb7b0 Author: Eric Dumazet Date: Mon Jun 5 16:16:47 2023 +0000 tcp: gso: really support BIG TCP We missed that tcp_gso_segment() was assuming skb->len was smaller than 65535 : oldlen = (u16)~skb->len; This part came with commit 0718bcc09b35 ("[NET]: Fix CHECKSUM_HW GSO problems.") This leads to wrong TCP checksum. Adapt the code to accept arbitrary packet length. v2: - use two csum_add() instead of csum_fold() (Alexander Duyck) - Change delta type to __wsum to reduce casts (Alexander Duyck) Fixes: 09f3d1a3a52c ("ipv6/gso: remove temporary HBH/jumbo header") Signed-off-by: Eric Dumazet Reviewed-by: Alexander Duyck Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230605161647.3624428-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 48bfd02569f5db49cc033f259e66d57aa6efc9a3 Author: Min Li Date: Fri May 26 21:01:31 2023 +0800 drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl If it is async, runqueue_node is freed in g2d_runqueue_worker on another worker thread. So in extreme cases, if g2d_runqueue_worker runs first, and then executes the following if statement, there will be use-after-free. Signed-off-by: Min Li Reviewed-by: Andi Shyti Signed-off-by: Inki Dae commit 4a059559809fd1ddbf16f847c4d2237309c08edf Author: Inki Dae Date: Fri May 19 08:55:05 2023 +0900 drm/exynos: vidi: fix a wrong error return Fix a wrong error return by dropping an error return. When vidi driver is remvoed, if ctx->raw_edid isn't same as fake_edid_info then only what we have to is to free ctx->raw_edid so that driver removing can work correctly - it's not an error case. Signed-off-by: Inki Dae Reviewed-by: Andi Shyti commit a2f4c143d76b1a47c91ef9bc46907116b111da0b Author: Kuniyuki Iwashima Date: Mon Jun 5 11:06:17 2023 -0700 ipv6: rpl: Fix Route of Death. A remote DoS vulnerability of RPL Source Routing is assigned CVE-2023-2156. The Source Routing Header (SRH) has the following format: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | Routing Type | Segments Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CmprI | CmprE | Pad | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . Addresses[1..n] . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The originator of an SRH places the first hop's IPv6 address in the IPv6 header's IPv6 Destination Address and the second hop's IPv6 address as the first address in Addresses[1..n]. The CmprI and CmprE fields indicate the number of prefix octets that are shared with the IPv6 Destination Address. When CmprI or CmprE is not 0, Addresses[1..n] are compressed as follows: 1..n-1 : (16 - CmprI) bytes n : (16 - CmprE) bytes Segments Left indicates the number of route segments remaining. When the value is not zero, the SRH is forwarded to the next hop. Its address is extracted from Addresses[n - Segment Left + 1] and swapped with IPv6 Destination Address. When Segment Left is greater than or equal to 2, the size of SRH is not changed because Addresses[1..n-1] are decompressed and recompressed with CmprI. OTOH, when Segment Left changes from 1 to 0, the new SRH could have a different size because Addresses[1..n-1] are decompressed with CmprI and recompressed with CmprE. Let's say CmprI is 15 and CmprE is 0. When we receive SRH with Segment Left >= 2, Addresses[1..n-1] have 1 byte for each, and Addresses[n] has 16 bytes. When Segment Left is 1, Addresses[1..n-1] is decompressed to 16 bytes and not recompressed. Finally, the new SRH will need more room in the header, and the size is (16 - 1) * (n - 1) bytes. Here the max value of n is 255 as Segment Left is u8, so in the worst case, we have to allocate 3825 bytes in the skb headroom. However, now we only allocate a small fixed buffer that is IPV6_RPL_SRH_WORST_SWAP_SIZE (16 + 7 bytes). If the decompressed size overflows the room, skb_push() hits BUG() below [0]. Instead of allocating the fixed buffer for every packet, let's allocate enough headroom only when we receive SRH with Segment Left 1. [0]: skbuff: skb_under_panic: text:ffffffff81c9f6e2 len:576 put:576 head:ffff8880070b5180 data:ffff8880070b4fb0 tail:0x70 end:0x140 dev:lo kernel BUG at net/core/skbuff.c:200! invalid opcode: 0000 [#1] PREEMPT SMP PTI CPU: 0 PID: 154 Comm: python3 Not tainted 6.4.0-rc4-00190-gc308e9ec0047 #7 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:skb_panic (net/core/skbuff.c:200) Code: 4f 70 50 8b 87 bc 00 00 00 50 8b 87 b8 00 00 00 50 ff b7 c8 00 00 00 4c 8b 8f c0 00 00 00 48 c7 c7 80 6e 77 82 e8 ad 8b 60 ff <0f> 0b 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc90000003da0 EFLAGS: 00000246 RAX: 0000000000000085 RBX: ffff8880058a6600 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff88807dc1c540 RDI: ffff88807dc1c540 RBP: ffffc90000003e48 R08: ffffffff82b392c8 R09: 00000000ffffdfff R10: ffffffff82a592e0 R11: ffffffff82b092e0 R12: ffff888005b1c800 R13: ffff8880070b51b8 R14: ffff888005b1ca18 R15: ffff8880070b5190 FS: 00007f4539f0b740(0000) GS:ffff88807dc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055670baf3000 CR3: 0000000005b0e000 CR4: 00000000007506f0 PKRU: 55555554 Call Trace: skb_push (net/core/skbuff.c:210) ipv6_rthdr_rcv (./include/linux/skbuff.h:2880 net/ipv6/exthdrs.c:634 net/ipv6/exthdrs.c:718) ip6_protocol_deliver_rcu (net/ipv6/ip6_input.c:437 (discriminator 5)) ip6_input_finish (./include/linux/rcupdate.h:805 net/ipv6/ip6_input.c:483) __netif_receive_skb_one_core (net/core/dev.c:5494) process_backlog (./include/linux/rcupdate.h:805 net/core/dev.c:5934) __napi_poll (net/core/dev.c:6496) net_rx_action (net/core/dev.c:6565 net/core/dev.c:6696) __do_softirq (./arch/x86/include/asm/jump_label.h:27 ./include/linux/jump_label.h:207 ./include/trace/events/irq.h:142 kernel/softirq.c:572) do_softirq (kernel/softirq.c:472 kernel/softirq.c:459) __local_bh_enable_ip (kernel/softirq.c:396) __dev_queue_xmit (net/core/dev.c:4272) ip6_finish_output2 (./include/net/neighbour.h:544 net/ipv6/ip6_output.c:134) rawv6_sendmsg (./include/net/dst.h:458 ./include/linux/netfilter.h:303 net/ipv6/raw.c:656 net/ipv6/raw.c:914) sock_sendmsg (net/socket.c:724 net/socket.c:747) __sys_sendto (net/socket.c:2144) __x64_sys_sendto (net/socket.c:2156 net/socket.c:2152 net/socket.c:2152) do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120) RIP: 0033:0x7f453a138aea Code: d8 64 89 02 48 c7 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 15 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 7e c3 0f 1f 44 00 00 41 54 48 83 ec 30 44 89 RSP: 002b:00007ffcc212a1c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007ffcc212a288 RCX: 00007f453a138aea RDX: 0000000000000060 RSI: 00007f4539084c20 RDI: 0000000000000003 RBP: 00007f4538308e80 R08: 00007ffcc212a300 R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: ffffffffc4653600 R14: 0000000000000001 R15: 00007f4539712d1b Modules linked in: Fixes: 8610c7c6e3bd ("net: ipv6: add support for rpl sr exthdr") Reported-by: Max VA Closes: https://www.interruptlabs.co.uk/articles/linux-ipv6-route-of-death Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20230605180617.67284-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 6eea63c7090b20ee41032d3e478e617b219d69aa Author: Erico Nunes Date: Tue Jun 6 16:32:47 2023 +0200 drm/lima: fix sched context destroy The drm sched entity must be flushed before finishing, to account for jobs potentially still in flight at that time. Lima did not do this flush until now, so switch the destroy call to the drm_sched_entity_destroy() wrapper which will take care of that. This fixes a regression on lima which started since the rework in commit 2fdb8a8f07c2 ("drm/scheduler: rework entity flush, kill and fini") where some specific types of applications may hang indefinitely. Fixes: 2fdb8a8f07c2 ("drm/scheduler: rework entity flush, kill and fini") Reviewed-by: Vasily Khoruzhick Signed-off-by: Erico Nunes Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20230606143247.433018-1-nunes.erico@gmail.com commit f6ca5baf2a86d0eaff3859844da9e4e29ff750a7 Author: Jakub Kicinski Date: Mon Jun 5 16:32:57 2023 -0700 netlink: specs: ethtool: fix random typos Working on the code gen for C reveals typos in the ethtool spec as the compiler tries to find the names in the existing uAPI header. Fix the mistakes. Fixes: a353318ebf24 ("tools: ynl: populate most of the ethtool spec") Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230605233257.843977-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 08e42a0d3ad30f276f9597b591f975971a1b0fcf Author: Pablo Neira Ayuso Date: Tue Jun 6 16:32:44 2023 +0200 netfilter: nf_tables: out-of-bound check in chain blob Add current size of rule expressions to the boundary check. Fixes: 2c865a8a28a1 ("netfilter: nf_tables: add rule blob layout") Signed-off-by: Pablo Neira Ayuso commit 24e227896bbf003165e006732dccb3516f87f88e Author: Kuniyuki Iwashima Date: Thu May 18 10:33:00 2023 -0700 netfilter: ipset: Add schedule point in call_ad(). syzkaller found a repro that causes Hung Task [0] with ipset. The repro first creates an ipset and then tries to delete a large number of IPs from the ipset concurrently: IPSET_ATTR_IPADDR_IPV4 : 172.20.20.187 IPSET_ATTR_CIDR : 2 The first deleting thread hogs a CPU with nfnl_lock(NFNL_SUBSYS_IPSET) held, and other threads wait for it to be released. Previously, the same issue existed in set->variant->uadt() that could run so long under ip_set_lock(set). Commit 5e29dc36bd5e ("netfilter: ipset: Rework long task execution when adding/deleting entries") tried to fix it, but the issue still exists in the caller with another mutex. While adding/deleting many IPs, we should release the CPU periodically to prevent someone from abusing ipset to hang the system. Note we need to increment the ipset's refcnt to prevent the ipset from being destroyed while rescheduling. [0]: INFO: task syz-executor174:268 blocked for more than 143 seconds. Not tainted 6.4.0-rc1-00145-gba79e9a73284 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor174 state:D stack:0 pid:268 ppid:260 flags:0x0000000d Call trace: __switch_to+0x308/0x714 arch/arm64/kernel/process.c:556 context_switch kernel/sched/core.c:5343 [inline] __schedule+0xd84/0x1648 kernel/sched/core.c:6669 schedule+0xf0/0x214 kernel/sched/core.c:6745 schedule_preempt_disabled+0x58/0xf0 kernel/sched/core.c:6804 __mutex_lock_common kernel/locking/mutex.c:679 [inline] __mutex_lock+0x6fc/0xdb0 kernel/locking/mutex.c:747 __mutex_lock_slowpath+0x14/0x20 kernel/locking/mutex.c:1035 mutex_lock+0x98/0xf0 kernel/locking/mutex.c:286 nfnl_lock net/netfilter/nfnetlink.c:98 [inline] nfnetlink_rcv_msg+0x480/0x70c net/netfilter/nfnetlink.c:295 netlink_rcv_skb+0x1c0/0x350 net/netlink/af_netlink.c:2546 nfnetlink_rcv+0x18c/0x199c net/netfilter/nfnetlink.c:658 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x664/0x8cc net/netlink/af_netlink.c:1365 netlink_sendmsg+0x6d0/0xa4c net/netlink/af_netlink.c:1913 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] ____sys_sendmsg+0x4b8/0x810 net/socket.c:2503 ___sys_sendmsg net/socket.c:2557 [inline] __sys_sendmsg+0x1f8/0x2a4 net/socket.c:2586 __do_sys_sendmsg net/socket.c:2595 [inline] __se_sys_sendmsg net/socket.c:2593 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2593 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x84/0x270 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x134/0x24c arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x2c/0x7c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Reported-by: syzkaller Fixes: a7b4f989a629 ("netfilter: ipset: IP set core support") Signed-off-by: Kuniyuki Iwashima Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit e1f543dc660b44618a1bd72ddb4ca0828a95f7ad Author: Tijs Van Buggenhout Date: Thu May 25 12:25:26 2023 +0200 netfilter: conntrack: fix NULL pointer dereference in nf_confirm_cthelper An nf_conntrack_helper from nf_conn_help may become NULL after DNAT. Observed when TCP port 1720 (Q931_PORT), associated with h323 conntrack helper, is DNAT'ed to another destination port (e.g. 1730), while nfqueue is being used for final acceptance (e.g. snort). This happenned after transition from kernel 4.14 to 5.10.161. Workarounds: * keep the same port (1720) in DNAT * disable nfqueue * disable/unload h323 NAT helper $ linux-5.10/scripts/decode_stacktrace.sh vmlinux < /tmp/kernel.log BUG: kernel NULL pointer dereference, address: 0000000000000084 [..] RIP: 0010:nf_conntrack_update (net/netfilter/nf_conntrack_core.c:2080 net/netfilter/nf_conntrack_core.c:2134) nf_conntrack [..] nfqnl_reinject (net/netfilter/nfnetlink_queue.c:237) nfnetlink_queue nfqnl_recv_verdict (net/netfilter/nfnetlink_queue.c:1230) nfnetlink_queue nfnetlink_rcv_msg (net/netfilter/nfnetlink.c:241) nfnetlink [..] Fixes: ee04805ff54a ("netfilter: conntrack: make conntrack userspace helpers work again") Signed-off-by: Tijs Van Buggenhout Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 14e8b293903785590a0ef168745ac84250cb1f4c Author: Jeremy Sowden Date: Thu May 25 15:07:24 2023 +0100 netfilter: nft_bitwise: fix register tracking At the end of `nft_bitwise_reduce`, there is a loop which is intended to update the bitwise expression associated with each tracked destination register. However, currently, it just updates the first register repeatedly. Fix it. Fixes: 34cc9e52884a ("netfilter: nf_tables: cancel tracking for clobbered destination registers") Signed-off-by: Jeremy Sowden Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit bd058763a624a1fb5c20f3c46e632d623c043676 Author: Gavrilov Ilia Date: Wed May 24 12:25:27 2023 +0000 netfilter: nf_tables: Add null check for nla_nest_start_noflag() in nft_dump_basechain_hook() The nla_nest_start_noflag() function may fail and return NULL; the return value needs to be checked. Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with SVACE. Fixes: d54725cd11a5 ("netfilter: nf_tables: support for multiple devices per netdev hook") Signed-off-by: Gavrilov Ilia Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 69844e335d8c22454746c7903776533d8b4ab8fa Author: Yonghong Song Date: Tue Jun 6 10:22:02 2023 -0700 selftests/bpf: Fix sockopt_sk selftest Commit f4e4534850a9 ("net/netlink: fix NETLINK_LIST_MEMBERSHIPS length report") fixed NETLINK_LIST_MEMBERSHIPS length report which caused selftest sockopt_sk failure. The failure log looks like test_sockopt_sk:PASS:join_cgroup /sockopt_sk 0 nsec run_test:PASS:skel_load 0 nsec run_test:PASS:setsockopt_link 0 nsec run_test:PASS:getsockopt_link 0 nsec getsetsockopt:FAIL:Unexpected NETLINK_LIST_MEMBERSHIPS value unexpected Unexpected NETLINK_LIST_MEMBERSHIPS value: actual 8 != expected 4 run_test:PASS:getsetsockopt 0 nsec #201 sockopt_sk:FAIL In net/netlink/af_netlink.c, function netlink_getsockopt(), for NETLINK_LIST_MEMBERSHIPS, nlk->ngroups equals to 36. Before Commit f4e4534850a9, the optlen is calculated as ALIGN(nlk->ngroups / 8, sizeof(u32)) = 4 After that commit, the optlen is ALIGN(BITS_TO_BYTES(nlk->ngroups), sizeof(u32)) = 8 Fix the test by setting the expected optlen to be 8. Fixes: f4e4534850a9 ("net/netlink: fix NETLINK_LIST_MEMBERSHIPS length report") Signed-off-by: Yonghong Song Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230606172202.1606249-1-yhs@fb.com commit 981a37bab5e5f16137266d3f00cf2bd018af36ef Author: Chris Mason Date: Mon Jun 5 12:03:15 2023 -0700 btrfs: properly enable async discard when switching from RO->RW The async discard uses the BTRFS_FS_DISCARD_RUNNING bit in the fs_info to force discards off when the filesystem has aborted or we're generally not able to run discards. This gets flipped on when we're mounted rw, and also when we go from ro->rw. Commit 63a7cb13071842 ("btrfs: auto enable discard=async when possible") enabled async discard by default, and this meant "mount -o ro /dev/xxx /yyy" had async discards turned on. Unfortunately, this meant our check in btrfs_remount_cleanup() would see that discards are already on: /* If we toggled discard async */ if (!btrfs_raw_test_opt(old_opts, DISCARD_ASYNC) && btrfs_test_opt(fs_info, DISCARD_ASYNC)) btrfs_discard_resume(fs_info); So, we'd never call btrfs_discard_resume() when remounting the root filesystem from ro->rw. drgn shows this really nicely: import os import sys from drgn.helpers.linux.fs import path_lookup from drgn import NULL, Object, Type, cast def btrfs_sb(sb): return cast("struct btrfs_fs_info *", sb.s_fs_info) if len(sys.argv) == 1: path = "/" else: path = sys.argv[1] fs_info = cast("struct btrfs_fs_info *", path_lookup(prog, path).mnt.mnt_sb.s_fs_info) BTRFS_FS_DISCARD_RUNNING = 1 << prog['BTRFS_FS_DISCARD_RUNNING'] if fs_info.flags & BTRFS_FS_DISCARD_RUNNING: print("discard running flag is on") else: print("discard running flag is off") [root]# mount | grep nvme /dev/nvme0n1p3 on / type btrfs (rw,relatime,compress-force=zstd:3,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/) [root]# ./discard_running.drgn discard running flag is off [root]# mount -o remount,discard=sync / [root]# mount -o remount,discard=async / [root]# ./discard_running.drgn discard running flag is on The fix is to call btrfs_discard_resume() when we're going from ro->rw. It already checks to make sure the async discard flag is on, so it'll do the right thing. Fixes: 63a7cb13071842 ("btrfs: auto enable discard=async when possible") CC: stable@vger.kernel.org # 6.3+ Reviewed-by: Boris Burkov Signed-off-by: Chris Mason Reviewed-by: David Sterba Signed-off-by: David Sterba commit 568a67e742dfa90b19a23305317164c5c350b71e Author: Andrew Powers-Holmes Date: Thu Jun 1 15:25:16 2023 +0200 arm64: dts: rockchip: Fix rk356x PCIe register and range mappings The register and range mappings for the PCIe controller in Rockchip's RK356x SoCs are incorrect. Replace them with corrected values from the vendor BSP sources, updated to match current DT schema. These values are also used in u-boot. Fixes: 66b51ea7d70f ("arm64: dts: rockchip: Add rk3568 PCIe2x1 controller") Cc: stable@vger.kernel.org Signed-off-by: Andrew Powers-Holmes Signed-off-by: Jonas Karlman Signed-off-by: Nicolas Frattaroli Tested-by: Diederik de Haas Link: https://lore.kernel.org/r/20230601132516.153934-1-frattaroli.nicolas@gmail.com Signed-off-by: Heiko Stuebner commit c5c31fb71f16ba75bad4ade208abbae225305b65 Author: Vladimir Oltean Date: Tue May 30 01:34:02 2023 +0300 spi: fsl-dspi: avoid SCK glitches with continuous transfers The DSPI controller has configurable timing for (a) tCSC: the interval between the assertion of the chip select and the first clock edge (b) tASC: the interval between the last clock edge and the deassertion of the chip select What is a bit surprising, but is documented in the figure "Example of continuous transfer (CPHA=1, CONT=1)" in the datasheet, is that when the chip select stays asserted between multiple TX FIFO writes, the tCSC and tASC times still apply. With CONT=1, chip select remains asserted, but SCK takes a break and goes to the idle state for tASC + tCSC ns. In other words, the default values (of 0 and 0 ns) result in SCK glitches where the SCK transition to the idle state, as well as the SCK transition from the idle state, will have no delay in between, and it may appear that a SCK cycle has simply gone missing. The resulting timing violation might cause data corruption in many peripherals, as their chip select is asserted. The driver has device tree bindings for tCSC ("fsl,spi-cs-sck-delay") and tASC ("fsl,spi-sck-cs-delay"), but these are only specified to apply when the chip select toggles in the first place, and this timing characteristic depends on each peripheral. Many peripherals do not have explicit timing requirements, so many device trees do not have these properties present at all. Nonetheless, the lack of SCK glitches is a common sense requirement, and since the SCK stays in the idle state during transfers for tCSC+tASC ns, and that in itself should look like half a cycle, then let's ensure that tCSC and tASC are at least a quarter of a SCK period, such that their sum is at least half of one. Fixes: 95bf15f38641 ("spi: fsl-dspi: Add ~50ns delay between cs and sck") Reported-by: Lisa Chen (陈敏捷) Debugged-by: Lisa Chen (陈敏捷) Tested-by: Lisa Chen (陈敏捷) Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20230529223402.1199503-1-vladimir.oltean@nxp.com Signed-off-by: Mark Brown commit b752a385b584d385683c65cb76a1298f1379a88c Author: Chris Chiu Date: Tue Jun 6 22:57:47 2023 +0800 ALSA: hda/realtek: Enable 4 amplifiers instead of 2 on a HP platform In the commit 7bb62340951a ("ALSA: hda/realtek: fix speaker, mute/micmute LEDs not work on a HP platform"), speakers and LEDs are fixed but only 2 CS35L41 amplifiers on SPI bus connected to Realtek codec are enabled. Need the ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED to get all amplifiers working. Signed-off-by: Chris Chiu Fixes: 7bb62340951a ("ALSA: hda/realtek: fix speaker, mute/micmute LEDs not work on a HP platform") Cc: Link: https://lore.kernel.org/r/20230606145747.135966-1-chris.chiu@canonical.com Signed-off-by: Takashi Iwai commit 95ae9979bfe3174c2ee8d64409c44532f2881907 Author: Kent Gibson Date: Tue Jun 6 20:00:34 2023 +0800 gpio: sim: fix memory corruption when adding named lines and unnamed hogs When constructing the sim, gpio-sim constructs an array of named lines, sized based on the largest offset of any named line, and then initializes that array with the names of all lines, including unnamed hogs with higher offsets. In doing so it writes NULLs beyond the extent of the array. Add a check that only named lines are used to initialize the array. Fixes: cb8c474e79be ("gpio: sim: new testing module") Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit a4d7d701121981e3c3fe69ade376fe9f26324161 Merge: 0bdd0f0bf17c5 0c331fd1dccfb Author: Linus Torvalds Date: Tue Jun 6 06:18:28 2023 -0700 Merge tag 'spi-fix-v6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A small collection of driver specific fixes, none of them particularly remarkable or severe" * tag 'spi-fix-v6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: qup: Request DMA before enabling clocks spi: mt65xx: make sure operations completed before unloading spi: lpspi: disable lpspi module irq in DMA mode commit 08c9aa7c58e933787fa443389d540221ed9ed5cd Merge: 5c219a3408502 32cf0046a6521 Author: Takashi Iwai Date: Tue Jun 6 15:09:42 2023 +0200 Merge tag 'asoc-fix-v6.4-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.4 A lot of routine driver specific fixes here, nothing in the core though there are a couple of fixes for the generic cards. There's also a few new quirks for x86 platforms. commit 08425abbab9987ec48c78f418e61130b5dc9d22d Merge: 4a672d500bfd6 3aa0519a4780f Author: Arnd Bergmann Date: Tue Jun 6 15:05:30 2023 +0200 Merge tag 'ffa-fix-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes Arm FF-A fix for v6.4 A single fix addressing another MBZ field being non-zero and non-compliant resulting in the rejection of certain memory interface transmissions by the receivers(secure partitions). The issue was addressed before but missed to address this one field which is part of this change. * tag 'ffa-fix-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_ffa: Set handle field to zero in memory descriptor Link: https://lore.kernel.org/r/20230606125720.2816923-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 947c70a213769f60e9d5aca2bc88b50a1cfaf5a6 Author: Jiasheng Jiang Date: Tue Jun 6 17:38:59 2023 +0800 spi: cadence-quadspi: Add missing check for dma_set_mask Add check for dma_set_mask() and return the error if it fails. Fixes: 1a6f854f7daa ("spi: cadence-quadspi: Add Xilinx Versal external DMA support") Signed-off-by: Jiasheng Jiang Link: https://lore.kernel.org/r/20230606093859.27818-1-jiasheng@iscas.ac.cn Signed-off-by: Mark Brown commit f7e60032c6618dfd643c7210d5cba2789e2de2e2 Author: Johannes Berg Date: Tue Jun 6 14:34:48 2023 +0200 wifi: cfg80211: fix locking in regulatory disconnect This should use wiphy_lock() now instead of requiring the RTNL, since __cfg80211_leave() via cfg80211_leave() is now requiring that lock to be held. Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") Signed-off-by: Johannes Berg commit 3e54ed8247c94c8bdf370bd872bd9dfe72b1b12b Author: Johannes Berg Date: Tue Jun 6 14:34:47 2023 +0200 wifi: cfg80211: fix locking in sched scan stop work This should use wiphy_lock() now instead of acquiring the RTNL, since cfg80211_stop_sched_scan_req() now needs that. Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") Signed-off-by: Johannes Berg commit 0bdd0f0bf17c5aac16f348ee4b1ebf23d1ec1649 Merge: 846b065da6460 fa58cc888d67e Author: Linus Torvalds Date: Tue Jun 6 05:49:06 2023 -0700 Merge tag 'gfs2-v6.4-rc4-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fix from Andreas Gruenbacher: - Don't get stuck writing page onto itself under direct I/O * tag 'gfs2-v6.4-rc4-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Don't get stuck writing page onto itself under direct I/O commit 306320034e8fbe7ee1cc4f5269c55658b4612048 Author: Bernhard Seibold Date: Fri Jun 2 15:30:29 2023 +0200 serial: lantiq: add missing interrupt ack Currently, the error interrupt is never acknowledged, so once active it will stay active indefinitely, causing the handler to be called in an infinite loop. Fixes: 2f0fc4159a6a ("SERIAL: Lantiq: Add driver for MIPS Lantiq SOCs.") Cc: Signed-off-by: Bernhard Seibold Reviewed-by: Ilpo Järvinen Message-ID: <20230602133029.546-1-mail@bernhard-seibold.de> Signed-off-by: Greg Kroah-Hartman commit 411360257c1f4fccaa20143098b6d3fcc9d4e4dc Author: Stanislaw Gruszka Date: Thu Apr 13 08:38:10 2023 +0200 accel/ivpu: Reserve all non-command bo's using DMA_RESV_USAGE_BOOKKEEP Use DMA_RESV_USAGE_BOOKKEEP reservation for buffer objects, except for command buffers for which we use DMA_RESV_USAGE_WRITE (since VPU can write to command buffer context save area). Fixes: 0ec8671837a6 ("accel/ivpu: Fix S3 system suspend when not idle") Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20230413063810.3167511-1-stanislaw.gruszka@linux.intel.com commit 846b065da6460a4ac9d927e5511ce24901bf43ad Merge: fa56e0e44f658 fb109fba72840 Author: Linus Torvalds Date: Tue Jun 6 05:42:21 2023 -0700 Merge tag 'platform-drivers-x86-v6.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: - various Microsoft Surface support fixes - one fix for the INT3472 driver * tag 'platform-drivers-x86-v6.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: int3472: Avoid crash in unregistering regulator gpio platform/surface: aggregator_tabletsw: Add support for book mode in POS subsystem platform/surface: aggregator_tabletsw: Add support for book mode in KIP subsystem platform/surface: aggregator: Allow completion work-items to be executed in parallel platform/surface: aggregator: Make to_ssam_device_driver() respect constness commit 3aa0519a4780f1b8e11966bd879d4a2934ba455f Author: Balint Dobszay Date: Thu Jun 1 16:07:49 2023 +0200 firmware: arm_ffa: Set handle field to zero in memory descriptor As described in the commit 111a833dc5cb ("firmware: arm_ffa: Set reserved/MBZ fields to zero in the memory descriptors") some fields in the memory descriptor have to be zeroed explicitly. The handle field is one of these, but it was left out from that change, fix this now. Fixes: 111a833dc5cb ("firmware: arm_ffa: Set reserved/MBZ fields to zero in the memory descriptors") Reported-by: Imre Kis Signed-off-by: Balint Dobszay Link: https://lore.kernel.org/r/20230601140749.93812-1-balint.dobszay@arm.com Signed-off-by: Sudeep Holla commit 5c219a340850233aecbb444af964653ecd3d1370 Author: Takashi Iwai Date: Tue Jun 6 11:38:55 2023 +0200 ALSA: hda: Fix kctl->id initialization HD-audio core code replaces the kctl->id.index of SPDIF-related controls after assigning via snd_ctl_add(). This doesn't work any longer with the new Xarray lookup change. The change of the kctl->id content has to be done via snd_ctl_rename_id() helper, instead. Fixes: c27e1efb61c5 ("ALSA: control: Use xarray for faster lookups") Cc: Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230606093855.14685-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit c5ae57b1bb99bd6f50b90428fabde397c2aeba0f Author: Takashi Iwai Date: Tue Jun 6 11:38:54 2023 +0200 ALSA: gus: Fix kctl->id initialization GUS driver replaces the kctl->id.index after assigning the kctl via snd_ctl_add(). This doesn't work any longer with the new Xarray lookup change. It has to be set before snd_ctl_add() call instead. Fixes: c27e1efb61c5 ("ALSA: control: Use xarray for faster lookups") Cc: Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230606093855.14685-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit f2f312ad88c68a7f4a7789b9269ae33af3c7c7e9 Author: Takashi Iwai Date: Tue Jun 6 11:38:53 2023 +0200 ALSA: cmipci: Fix kctl->id initialization cmipci driver replaces the kctl->id.device after assigning the kctl via snd_ctl_add(). This doesn't work any longer with the new Xarray lookup change. It has to be set before snd_ctl_add() call instead. Fixes: c27e1efb61c5 ("ALSA: control: Use xarray for faster lookups") Cc: Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230606093855.14685-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit c9b83ae4a1609b1914ba7fc70826a3f3a8b234db Author: Takashi Iwai Date: Tue Jun 6 11:38:52 2023 +0200 ALSA: ymfpci: Fix kctl->id initialization ymfpci driver replaces the kctl->id.device after assigning the kctl via snd_ctl_add(). This doesn't work any longer with the new Xarray lookup change. It has to be set before snd_ctl_add() call instead. Fixes: c27e1efb61c5 ("ALSA: control: Use xarray for faster lookups") Cc: Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230606093855.14685-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 50d30040eb856ff6b0382b4d9dc332dc15597729 Author: Randy Dunlap Date: Thu May 25 21:45:19 2023 -0700 accel/ivpu: ivpu_ipc needs GENERIC_ALLOCATOR Drivers that use the gen_pool*() family of functions should select GENERIC_ALLOCATOR to prevent build errors like these: ld: drivers/accel/ivpu/ivpu_ipc.o: in function `gen_pool_free': include/linux/genalloc.h:172: undefined reference to `gen_pool_free_owner' ld: drivers/accel/ivpu/ivpu_ipc.o: in function `gen_pool_alloc_algo': include/linux/genalloc.h:138: undefined reference to `gen_pool_alloc_algo_owner' ld: drivers/accel/ivpu/ivpu_ipc.o: in function `gen_pool_free': include/linux/genalloc.h:172: undefined reference to `gen_pool_free_owner' ld: drivers/accel/ivpu/ivpu_ipc.o: in function `ivpu_ipc_init': drivers/accel/ivpu/ivpu_ipc.c:441: undefined reference to `devm_gen_pool_create' ld: drivers/accel/ivpu/ivpu_ipc.o: in function `gen_pool_add_virt': include/linux/genalloc.h:104: undefined reference to `gen_pool_add_owner' Fixes: 5d7422cfb498 ("accel/ivpu: Add IPC driver and JSM messages") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Link: https://lore.kernel.org/all/202305221206.1TaugDKP-lkp@intel.com/ Cc: Oded Gabbay Cc: dri-devel@lists.freedesktop.org Cc: Jacek Lawrynowicz Cc: Stanislaw Gruszka Cc: Andrzej Kacprowski Cc: Krystian Pradzynski Cc: Jeffrey Hugo Cc: Daniel Vetter Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20230526044519.13441-1-rdunlap@infradead.org commit 42510dffd0e2c27046905f742172ed6662af5557 Author: Manish Chopra Date: Mon Jun 5 16:56:00 2023 +0530 qed/qede: Fix scheduling while atomic Statistics read through bond interface via sysfs causes below bug and traces as it triggers the bonding module to collect the slave device statistics while holding the spinlock, beneath that qede->qed driver statistics flow gets scheduled out due to usleep_range() used in PTT acquire logic [ 3673.988874] Hardware name: HPE ProLiant DL365 Gen10 Plus/ProLiant DL365 Gen10 Plus, BIOS A42 10/29/2021 [ 3673.988878] Call Trace: [ 3673.988891] dump_stack_lvl+0x34/0x44 [ 3673.988908] __schedule_bug.cold+0x47/0x53 [ 3673.988918] __schedule+0x3fb/0x560 [ 3673.988929] schedule+0x43/0xb0 [ 3673.988932] schedule_hrtimeout_range_clock+0xbf/0x1b0 [ 3673.988937] ? __hrtimer_init+0xc0/0xc0 [ 3673.988950] usleep_range+0x5e/0x80 [ 3673.988955] qed_ptt_acquire+0x2b/0xd0 [qed] [ 3673.988981] _qed_get_vport_stats+0x141/0x240 [qed] [ 3673.989001] qed_get_vport_stats+0x18/0x80 [qed] [ 3673.989016] qede_fill_by_demand_stats+0x37/0x400 [qede] [ 3673.989028] qede_get_stats64+0x19/0xe0 [qede] [ 3673.989034] dev_get_stats+0x5c/0xc0 [ 3673.989045] netstat_show.constprop.0+0x52/0xb0 [ 3673.989055] dev_attr_show+0x19/0x40 [ 3673.989065] sysfs_kf_seq_show+0x9b/0xf0 [ 3673.989076] seq_read_iter+0x120/0x4b0 [ 3673.989087] new_sync_read+0x118/0x1a0 [ 3673.989095] vfs_read+0xf3/0x180 [ 3673.989099] ksys_read+0x5f/0xe0 [ 3673.989102] do_syscall_64+0x3b/0x90 [ 3673.989109] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 3673.989115] RIP: 0033:0x7f8467d0b082 [ 3673.989119] Code: c0 e9 b2 fe ff ff 50 48 8d 3d ca 05 08 00 e8 35 e7 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 [ 3673.989121] RSP: 002b:00007ffffb21fd08 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [ 3673.989127] RAX: ffffffffffffffda RBX: 000000000100eca0 RCX: 00007f8467d0b082 [ 3673.989128] RDX: 00000000000003ff RSI: 00007ffffb21fdc0 RDI: 0000000000000003 [ 3673.989130] RBP: 00007f8467b96028 R08: 0000000000000010 R09: 00007ffffb21ec00 [ 3673.989132] R10: 00007ffffb27b170 R11: 0000000000000246 R12: 00000000000000f0 [ 3673.989134] R13: 0000000000000003 R14: 00007f8467b92000 R15: 0000000000045a05 [ 3673.989139] CPU: 30 PID: 285188 Comm: read_all Kdump: loaded Tainted: G W OE Fix this by collecting the statistics asynchronously from a periodic delayed work scheduled at default stats coalescing interval and return the recent copy of statisitcs from .ndo_get_stats64(), also add ability to configure/retrieve stats coalescing interval using below commands - ethtool -C ethx stats-block-usecs ethtool -c ethx Fixes: 133fac0eedc3 ("qede: Add basic ethtool support") Cc: Sudarsana Kalluru Cc: David Miller Signed-off-by: Manish Chopra Link: https://lore.kernel.org/r/20230605112600.48238-1-manishc@marvell.com Signed-off-by: Paolo Abeni commit fa56e0e44f658085262f536bbfdfff3374b8828d Merge: f8dba31b0a826 7c28afd5512e3 Author: Linus Torvalds Date: Tue Jun 6 04:36:02 2023 -0700 Merge tag 'for-linus-2023060501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fix from Jiri Kosina: - Final, confirmed fix for regression causing some devices connected via Logitech HID++ Unifying receiver take too long to initialize (Benjamin Tissoires) * tag 'for-linus-2023060501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: hidpp: terminate retry loop on success commit 7a4615b9a9da5225b22b36a20508555dd133ac24 Author: Gustavo A. R. Silva Date: Fri Jun 2 13:42:47 2023 -0600 wifi: iwlwifi: mvm: Fix -Warray-bounds bug in iwl_mvm_wait_d3_notif() kmemdup() at line 2735 is not duplicating enough memory for notif->tid_tear_down and notif->station_id. As it only duplicates 612 bytes: up to offsetofend(struct iwl_wowlan_info_notif, received_beacons), this is the range of [0, 612) bytes. 2735 notif = kmemdup(notif_v1, 2736 offsetofend(struct iwl_wowlan_info_notif, 2737 received_beacons), 2738 GFP_ATOMIC); which evidently does not cover bytes 612 and 613 for members tid_tear_down and station_id in struct iwl_wowlan_info_notif. See below: $ pahole -C iwl_wowlan_info_notif drivers/net/wireless/intel/iwlwifi/mvm/d3.o struct iwl_wowlan_info_notif { struct iwl_wowlan_gtk_status_v3 gtk[2]; /* 0 488 */ /* --- cacheline 7 boundary (448 bytes) was 40 bytes ago --- */ struct iwl_wowlan_igtk_status igtk[2]; /* 488 80 */ /* --- cacheline 8 boundary (512 bytes) was 56 bytes ago --- */ __le64 replay_ctr; /* 568 8 */ /* --- cacheline 9 boundary (576 bytes) --- */ __le16 pattern_number; /* 576 2 */ __le16 reserved1; /* 578 2 */ __le16 qos_seq_ctr[8]; /* 580 16 */ __le32 wakeup_reasons; /* 596 4 */ __le32 num_of_gtk_rekeys; /* 600 4 */ __le32 transmitted_ndps; /* 604 4 */ __le32 received_beacons; /* 608 4 */ u8 tid_tear_down; /* 612 1 */ u8 station_id; /* 613 1 */ u8 reserved2[2]; /* 614 2 */ /* size: 616, cachelines: 10, members: 13 */ /* last cacheline: 40 bytes */ }; Therefore, when the following assignments take place, actually no memory has been allocated for those objects: 2743 notif->tid_tear_down = notif_v1->tid_tear_down; 2744 notif->station_id = notif_v1->station_id; Fix this by allocating space for the whole notif object and zero out the remaining space in memory after member station_id. This also fixes the following -Warray-bounds issues: CC drivers/net/wireless/intel/iwlwifi/mvm/d3.o drivers/net/wireless/intel/iwlwifi/mvm/d3.c: In function ‘iwl_mvm_wait_d3_notif’: drivers/net/wireless/intel/iwlwifi/mvm/d3.c:2743:30: warning: array subscript ‘struct iwl_wowlan_info_notif[0]’ is partly outside array bounds of ‘unsigned char[612]’ [-Warray-bounds=] 2743 | notif->tid_tear_down = notif_v1->tid_tear_down; | from drivers/net/wireless/intel/iwlwifi/mvm/d3.c:7: In function ‘kmemdup’, inlined from ‘iwl_mvm_wait_d3_notif’ at drivers/net/wireless/intel/iwlwifi/mvm/d3.c:2735:12: include/linux/fortify-string.h:765:16: note: object of size 612 allocated by ‘__real_kmemdup’ 765 | return __real_kmemdup(p, size, gfp); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/mvm/d3.c: In function ‘iwl_mvm_wait_d3_notif’: drivers/net/wireless/intel/iwlwifi/mvm/d3.c:2744:30: warning: array subscript ‘struct iwl_wowlan_info_notif[0]’ is partly outside array bounds of ‘unsigned char[612]’ [-Warray-bounds=] 2744 | notif->station_id = notif_v1->station_id; | ^~ In function ‘kmemdup’, inlined from ‘iwl_mvm_wait_d3_notif’ at drivers/net/wireless/intel/iwlwifi/mvm/d3.c:2735:12: include/linux/fortify-string.h:765:16: note: object of size 612 allocated by ‘__real_kmemdup’ 765 | return __real_kmemdup(p, size, gfp); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Link: https://github.com/KSPP/linux/issues/306 Fixes: 905d50ddbc83 ("wifi: iwlwifi: mvm: support wowlan info notification version 2") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Acked-by: Gregory Greenman Link: https://lore.kernel.org/r/ZHpGN555FwAKGduH@work Signed-off-by: Johannes Berg commit 1afa18e9e72396d1e1aedd6dbb34681f2413316b Author: Aditya Kumar Singh Date: Wed May 31 11:50:12 2023 +0530 wifi: mac80211: fix switch count in EMA beacons Currently, whenever an EMA beacon is formed, due to is_template argument being false from the caller, the switch count is always decremented once which is wrong. Also if switch count is equal to profile periodicity, this makes the switch count to reach till zero which triggers a WARN_ON_ONCE. [ 261.593915] CPU: 1 PID: 800 Comm: kworker/u8:3 Not tainted 5.4.213 #0 [ 261.616143] Hardware name: Qualcomm Technologies, Inc. IPQ9574 [ 261.622666] Workqueue: phy0 ath12k_get_link_bss_conf [ath12k] [ 261.629771] pstate: 60400005 (nZCv daif +PAN -UAO) [ 261.635595] pc : ieee80211_next_txq+0x1ac/0x1b8 [mac80211] [ 261.640282] lr : ieee80211_beacon_update_cntdwn+0x64/0xb4 [mac80211] [...] [ 261.729683] Call trace: [ 261.734986] ieee80211_next_txq+0x1ac/0x1b8 [mac80211] [ 261.737156] ieee80211_beacon_cntdwn_is_complete+0xa28/0x1194 [mac80211] [ 261.742365] ieee80211_beacon_cntdwn_is_complete+0xef4/0x1194 [mac80211] [ 261.749224] ieee80211_beacon_get_template_ema_list+0x38/0x5c [mac80211] [ 261.755908] ath12k_get_link_bss_conf+0xf8/0x33b4 [ath12k] [ 261.762590] ath12k_get_link_bss_conf+0x390/0x33b4 [ath12k] [ 261.767881] process_one_work+0x194/0x270 [ 261.773346] worker_thread+0x200/0x314 [ 261.777514] kthread+0x140/0x150 [ 261.781158] ret_from_fork+0x10/0x18 Fix this issue by making the is_template argument as true when fetching the EMA beacons. Fixes: bd54f3c29077 ("wifi: mac80211: generate EMA beacons in AP mode") Signed-off-by: Aditya Kumar Singh Link: https://lore.kernel.org/r/20230531062012.4537-1-quic_adisi@quicinc.com Signed-off-by: Johannes Berg commit 47c171a426e305f2225b92ed7b5e0a990c95f6d4 Author: Johannes Berg Date: Sun Jun 4 12:11:15 2023 +0300 wifi: mac80211: don't translate beacon/presp addrs Don't do link address translation for beacons and probe responses, this leads to reporting multiple scan list entries for the same AP (one with the MLD address) which just breaks things. We might need to extend this in the future for some other (action) frames that aren't MLD addressed. Fixes: 42fb9148c078 ("wifi: mac80211: do link->MLD address translation on RX") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230604120651.62adead1b43a.Ifc25eed26ebf3b269f60b1ec10060156d0e7ec0d@changeid Signed-off-by: Johannes Berg commit 68c228557d52616cf040651abefda9839de7086a Author: Johannes Berg Date: Sun Jun 4 12:11:16 2023 +0300 wifi: mac80211: mlme: fix non-inheritence element There were two bugs when creating the non-inheritence element: 1) 'at_extension' needs to be declared outside the loop, otherwise the value resets every iteration and we can never really switch properly 2) 'added' never got set to true, so we always cut off the extension element again at the end of the function This shows another issue that we might add a list but no extension list, but we need to make the extension list a zero-length one in that case. Fix all these issues. While at it, add a comment explaining the trim. Fixes: 81151ce462e5 ("wifi: mac80211: support MLO authentication/association with one link") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230604120651.3addaa5c4782.If3a78f9305997ad7ef4ba7ffc17a8234c956f613@changeid Signed-off-by: Johannes Berg commit 727073ca5e55ab6a07df316250be8a12606e8677 Author: Johannes Berg Date: Sun Jun 4 12:11:18 2023 +0300 wifi: cfg80211: reject bad AP MLD address When trying to authenticate, if the AP MLD address isn't a valid address, mac80211 can throw a warning. Avoid that by rejecting such addresses. Fixes: d648c23024bd ("wifi: nl80211: support MLO in auth/assoc") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230604120651.89188912bd1d.I8dbc6c8ee0cb766138803eec59508ef4ce477709@changeid Signed-off-by: Johannes Berg commit c37ab22bb1a43cdca8bf69cc0a22f1ccfc449e68 Author: Johannes Berg Date: Sun Jun 4 12:11:23 2023 +0300 wifi: mac80211: use correct iftype HE cap We already check that the right iftype capa exists, but then don't use it. Assign it to a variable so we can actually use it, and then do that. Fixes: bac2fd3d7534 ("mac80211: remove use of ieee80211_get_he_sta_cap()") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230604120651.0e908e5c5fdd.Iac142549a6144ac949ebd116b921a59ae5282735@changeid Signed-off-by: Johannes Berg commit 870611e4877eff1e8413c3fb92a585e45d5291f6 Author: Ilya Dryomov Date: Mon Jun 5 16:33:35 2023 +0200 rbd: get snapshot context after exclusive lock is ensured to be held Move capturing the snapshot context into the image request state machine, after exclusive lock is ensured to be held for the duration of dealing with the image request. This is needed to ensure correctness of fast-diff states (OBJECT_EXISTS vs OBJECT_EXISTS_CLEAN) and object deltas computed based off of them. Otherwise the object map that is forked for the snapshot isn't guaranteed to accurately reflect the contents of the snapshot when the snapshot is taken under I/O. This breaks differential backup and snapshot-based mirroring use cases with fast-diff enabled: since some object deltas may be incomplete, the destination image may get corrupted. Cc: stable@vger.kernel.org Link: https://tracker.ceph.com/issues/61472 Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang commit 09fe05c57b5aaf23e2c35036c98ea9f282b19a77 Author: Ilya Dryomov Date: Mon Jun 5 16:33:35 2023 +0200 rbd: move RBD_OBJ_FLAG_COPYUP_ENABLED flag setting Move RBD_OBJ_FLAG_COPYUP_ENABLED flag setting into the object request state machine to allow for the snapshot context to be captured in the image request state machine rather than in rbd_queue_workfn(). Cc: stable@vger.kernel.org Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang commit b9a4efd61b6b9f62f83752959e75a5dae20624fa Author: Jaroslav Kysela Date: Tue Jun 6 09:31:22 2023 +0200 ALSA: ice1712,ice1724: fix the kcontrol->id initialization The new xarray lookup code requires to know complete kcontrol->id before snd_ctl_add() call. Reorder the code to make the initialization properly. Cc: stable@kernel.org # v5.19+ Reported-by: Martin Zidek Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230606073122.597491-1-perex@perex.cz Signed-off-by: Takashi Iwai commit 75767213f3d9b97f63694d02260b6a49a2271876 Author: Sungwoo Kim Date: Sat Jun 3 08:28:09 2023 -0400 Bluetooth: L2CAP: Add missing checks for invalid DCID When receiving a connect response we should make sure that the DCID is within the valid range and that we don't already have another channel allocated for the same DCID. Missing checks may violate the specification (BLUETOOTH CORE SPECIFICATION Version 5.4 | Vol 3, Part A, Page 1046). Fixes: 40624183c202 ("Bluetooth: L2CAP: Add missing checks for invalid LE DCID") Signed-off-by: Sungwoo Kim Signed-off-by: Luiz Augusto von Dentz commit 71e9588435c38112d6a8686d3d8e7cc1de8fe22c Author: Pauli Virtanen Date: Thu Jun 1 09:34:45 2023 +0300 Bluetooth: ISO: use correct CIS order in Set CIG Parameters event The order of CIS handle array in Set CIG Parameters response shall match the order of the CIS_ID array in the command (Core v5.3 Vol 4 Part E Sec 7.8.97). We send CIS_IDs mainly in the order of increasing CIS_ID (but with "last" CIS first if it has fixed CIG_ID). In handling of the reply, we currently assume this is also the same as the order of hci_conn in hdev->conn_hash, but that is not true. Match the correct hci_conn to the correct handle by matching them based on the CIG+CIS combination. The CIG+CIS combination shall be unique for ISO_LINK hci_conn at state >= BT_BOUND, which we maintain in hci_le_set_cig_params. Fixes: 26afbd826ee3 ("Bluetooth: Add initial implementation of CIS connections") Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz commit 6c242c64a09e78349fb0a5f0a6f8076a3d7c0bb4 Author: Pauli Virtanen Date: Thu Jun 1 09:34:44 2023 +0300 Bluetooth: ISO: don't try to remove CIG if there are bound CIS left Consider existing BOUND & CONNECT state CIS to block CIG removal. Otherwise, under suitable timing conditions we may attempt to remove CIG while Create CIS is pending, which fails. Fixes: 26afbd826ee3 ("Bluetooth: Add initial implementation of CIS connections") Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz commit 02c5ea5246a44d6ffde0fddebfc1d56188052976 Author: Ying Hsu Date: Wed May 31 03:44:56 2023 +0000 Bluetooth: Fix l2cap_disconnect_req deadlock L2CAP assumes that the locks conn->chan_lock and chan->lock are acquired in the order conn->chan_lock, chan->lock to avoid potential deadlock. For example, l2sock_shutdown acquires these locks in the order: mutex_lock(&conn->chan_lock) l2cap_chan_lock(chan) However, l2cap_disconnect_req acquires chan->lock in l2cap_get_chan_by_scid first and then acquires conn->chan_lock before calling l2cap_chan_del. This means that these locks are acquired in unexpected order, which leads to potential deadlock: l2cap_chan_lock(c) mutex_lock(&conn->chan_lock) This patch releases chan->lock before acquiring the conn_chan_lock to avoid the potential deadlock. Fixes: a2a9339e1c9d ("Bluetooth: L2CAP: Fix use-after-free in l2cap_disconnect_{req,rsp}") Signed-off-by: Ying Hsu Signed-off-by: Luiz Augusto von Dentz commit 47c5d829a3e326b7395352a10fc8a6effe7afa15 Author: Johan Hovold Date: Wed May 31 10:57:59 2023 +0200 Bluetooth: hci_qca: fix debugfs registration Since commit 3e4be65eb82c ("Bluetooth: hci_qca: Add poweroff support during hci down for wcn3990"), the setup callback which registers the debugfs interface can be called multiple times. This specifically leads to the following error when powering on the controller: debugfs: Directory 'ibs' with parent 'hci0' already present! Add a driver flag to avoid trying to register the debugfs interface more than once. Fixes: 3e4be65eb82c ("Bluetooth: hci_qca: Add poweroff support during hci down for wcn3990") Cc: stable@vger.kernel.org # 4.20 Signed-off-by: Johan Hovold Signed-off-by: Luiz Augusto von Dentz commit fe2ccc6c29d53e14d3c8b3ddf8ad965a92e074ee Author: Johan Hovold Date: Wed May 31 10:57:58 2023 +0200 Bluetooth: fix debugfs registration Since commit ec6cef9cd98d ("Bluetooth: Fix SMP channel registration for unconfigured controllers") the debugfs interface for unconfigured controllers will be created when the controller is configured. There is however currently nothing preventing a controller from being configured multiple time (e.g. setting the device address using btmgmt) which results in failed attempts to register the already registered debugfs entries: debugfs: File 'features' in directory 'hci0' already present! debugfs: File 'manufacturer' in directory 'hci0' already present! debugfs: File 'hci_version' in directory 'hci0' already present! ... debugfs: File 'quirk_simultaneous_discovery' in directory 'hci0' already present! Add a controller flag to avoid trying to register the debugfs interface more than once. Fixes: ec6cef9cd98d ("Bluetooth: Fix SMP channel registration for unconfigured controllers") Cc: stable@vger.kernel.org # 4.0 Signed-off-by: Johan Hovold Signed-off-by: Luiz Augusto von Dentz commit 1857c19941c87eb36ad47f22a406be5dfe5eff9f Author: Zhengping Jiang Date: Wed May 24 17:11:58 2023 -0700 Bluetooth: hci_sync: add lock to protect HCI_UNREGISTER When the HCI_UNREGISTER flag is set, no jobs should be scheduled. Fix potential race when HCI_UNREGISTER is set after the flag is tested in hci_cmd_sync_queue. Fixes: 0b94f2651f56 ("Bluetooth: hci_sync: Fix queuing commands when HCI_UNREGISTER is set") Signed-off-by: Zhengping Jiang Signed-off-by: Luiz Augusto von Dentz commit c5d2b6fa26b5b8386a9cc902cdece3a46bef2bd2 Author: Luiz Augusto von Dentz Date: Tue May 30 13:48:44 2023 -0700 Bluetooth: Fix use-after-free in hci_remove_ltk/hci_remove_irk Similar to commit 0f7d9b31ce7a ("netfilter: nf_tables: fix use-after-free in nft_set_catchall_destroy()"). We can not access k after kfree_rcu() call. Cc: stable@vger.kernel.org Signed-off-by: Min Li Signed-off-by: Luiz Augusto von Dentz commit e6a7a46b8636efe95c75bed63a57fc05c13feba4 Author: Pauli Virtanen Date: Sun May 21 15:48:29 2023 +0000 Bluetooth: ISO: Fix CIG auto-allocation to select configurable CIG Make CIG auto-allocation to select the first CIG_ID that is still configurable. Also use correct CIG_ID range (see Core v5.3 Vol 4 Part E Sec 7.8.97 p.2553). Previously, it would always select CIG_ID 0 regardless of anything, because cis_list with data.cis == 0xff (BT_ISO_QOS_CIS_UNSET) would not count any CIS. Since we are not adding CIS here, use find_cis instead. Fixes: 26afbd826ee3 ("Bluetooth: Add initial implementation of CIS connections") Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz commit 31c5f9164949347c9cb34f041a7e04fdc08b1b85 Author: Pauli Virtanen Date: Sun May 21 15:48:28 2023 +0000 Bluetooth: ISO: consider right CIS when removing CIG at cleanup When looking for CIS blocking CIG removal, consider only the CIS with the right CIG ID. Don't try to remove CIG with unset CIG ID. Fixes: 26afbd826ee3 ("Bluetooth: Add initial implementation of CIS connections") Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz commit 5647e53f7856bb39dae781fe26aa65a699e2fc9f Author: Dan Schatzberg Date: Thu Jun 1 11:38:19 2023 -0700 cgroup: Documentation: Clarify usage of memory limits The existing documentation refers to memory.high as the "main mechanism to control memory usage." This seems incorrect to me - memory.high can result in reclaim pressure which simply leads to stalls unless some external component observes and actions on it (e.g. systemd-oomd can be used for this purpose). While this is feasible, users are unaware of this interaction and are led to believe that memory.high alone is an effective mechanism for limiting memory. The documentation should recommend the use of memory.max as the effective way to enforce memory limits - it triggers reclaim and results in OOM kills by itself. Signed-off-by: Dan Schatzberg Acked-by: Johannes Weiner Acked-by: Chris Down Signed-off-by: Tejun Heo commit 8cfb98196cceec35416041c6b91212d2b99392e4 Author: Nitesh Shetty Date: Mon Jun 5 11:53:53 2023 +0530 null_blk: Fix: memory release when memory_backed=1 Memory/pages are not freed, when unloading nullblk driver. Steps to reproduce issue 1.free -h total used free shared buff/cache available Mem: 7.8Gi 260Mi 7.1Gi 3.0Mi 395Mi 7.3Gi Swap: 0B 0B 0B 2.modprobe null_blk memory_backed=1 3.dd if=/dev/urandom of=/dev/nullb0 oflag=direct bs=1M count=1000 4.modprobe -r null_blk 5.free -h total used free shared buff/cache available Mem: 7.8Gi 1.2Gi 6.1Gi 3.0Mi 398Mi 6.3Gi Swap: 0B 0B 0B Signed-off-by: Anuj Gupta Signed-off-by: Nitesh Shetty Link: https://lore.kernel.org/r/20230605062354.24785-1-nj.shetty@samsung.com Signed-off-by: Jens Axboe commit 132328e8e85174ea788faf8f627c33258c88fbad Author: Florian Westphal Date: Mon Jun 5 15:14:45 2023 +0200 bpf: netfilter: Add BPF_NETFILTER bpf_attach_type Andrii Nakryiko writes: And we currently don't have an attach type for NETLINK BPF link. Thankfully it's not too late to add it. I see that link_create() in kernel/bpf/syscall.c just bypasses attach_type check. We shouldn't have done that. Instead we need to add BPF_NETLINK attach type to enum bpf_attach_type. And wire all that properly throughout the kernel and libbpf itself. This adds BPF_NETFILTER and uses it. This breaks uabi but this wasn't in any non-rc release yet, so it should be fine. v2: check link_attack prog type in link_create too Fixes: 84601d6ee68a ("bpf: add bpf_link support for BPF_NETFILTER programs") Suggested-by: Andrii Nakryiko Signed-off-by: Florian Westphal Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/CAEf4BzZ69YgrQW7DHCJUT_X+GqMq_ZQQPBwopaJJVGFD5=d5Vg@mail.gmail.com/ Link: https://lore.kernel.org/bpf/20230605131445.32016-1-fw@strlen.de commit 7c28afd5512e371773dbb2bf95a31ed5625651d9 Author: Benjamin Tissoires Date: Mon Jun 5 18:56:36 2023 +0200 HID: hidpp: terminate retry loop on success It seems we forgot the normal case to terminate the retry loop, making us asking 3 times each command, which is probably a little bit too much. And remove the ugly "goto exit" that can be replaced by a simpler "break" Fixes: 586e8fede795 ("HID: logitech-hidpp: Retry commands when device is busy") Suggested-by: Mark Lord Tested-by: Mark Lord Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 917ac77846b907dfdbd878688a9a61236ad6c51e Author: Qu Wenruo Date: Fri May 26 20:30:20 2023 +0800 btrfs: subpage: fix a crash in metadata repair path [BUG] Test case btrfs/027 would crash with subpage (64K page size, 4K sectorsize) with the following dying messages: debug: map_length=16384 length=65536 type=metadata|raid6(0x104) assertion failed: map_length >= length, in fs/btrfs/volumes.c:8093 ------------[ cut here ]------------ kernel BUG at fs/btrfs/messages.c:259! Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 Call trace: btrfs_assertfail+0x28/0x2c [btrfs] btrfs_map_repair_block+0x150/0x2b8 [btrfs] btrfs_repair_io_failure+0xd4/0x31c [btrfs] btrfs_read_extent_buffer+0x150/0x16c [btrfs] read_tree_block+0x38/0xbc [btrfs] read_tree_root_path+0xfc/0x1bc [btrfs] btrfs_get_root_ref.part.0+0xd4/0x3a8 [btrfs] open_ctree+0xa30/0x172c [btrfs] btrfs_mount_root+0x3c4/0x4a4 [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xec vfs_kern_mount.part.0+0x90/0xd4 vfs_kern_mount+0x14/0x28 btrfs_mount+0x114/0x418 [btrfs] legacy_get_tree+0x30/0x60 vfs_get_tree+0x28/0xec path_mount+0x3e0/0xb64 __arm64_sys_mount+0x200/0x2d8 invoke_syscall+0x48/0x114 el0_svc_common.constprop.0+0x60/0x11c do_el0_svc+0x38/0x98 el0_svc+0x40/0xa8 el0t_64_sync_handler+0xf4/0x120 el0t_64_sync+0x190/0x194 Code: aa0403e2 b0fff060 91010000 959c2024 (d4210000) [CAUSE] In btrfs/027 we test RAID6 with missing devices, in this particular case, we're repairing a metadata at the end of a data stripe. But at btrfs_repair_io_failure(), we always pass a full PAGE for repair, and for subpage case this can cross stripe boundary and lead to the above BUG_ON(). This metadata repair code is always there, since the introduction of subpage support, but this can trigger BUG_ON() after the bio split ability at btrfs_map_bio(). [FIX] Instead of passing the old PAGE_SIZE, we calculate the correct length based on the eb size and page size for both regular and subpage cases. CC: stable@vger.kernel.org # 6.3+ Reviewed-by: Christoph Hellwig Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit da209f7a80dd633a32cbcbafe9e9f778933119c1 Author: Tim Crawford Date: Mon Jun 5 10:38:34 2023 -0600 ALSA: hda/realtek: Add quirk for Clevo NS50AU Fixes headset detection on Clevo NS50AU. Signed-off-by: Tim Crawford Cc: Link: https://lore.kernel.org/r/20230605163834.24653-1-tcrawford@system76.com Signed-off-by: Takashi Iwai commit 811dd426a9b16cf61a86fdb12d5f5b983cbfb130 Author: Stefan Binding Date: Mon Jun 5 16:33:08 2023 +0100 ALSA: hda/realtek: Add quirks for Asus ROG 2024 laptops using CS35L41 Add support for Asus ROG 2024 models using CS35L41 SPI with Internal Boost. Signed-off-by: Stefan Binding Cc: Link: https://lore.kernel.org/r/20230605153308.448550-1-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 4a672d500bfd6bb87092c33d5a2572c3d0a1cf83 Author: Linus Walleij Date: Wed May 10 12:51:56 2023 +0200 ARM: dts: Fix erroneous ADS touchscreen polarities Several device tree files get the polarity of the pendown-gpios wrong: this signal is active low. Fix up all incorrect flags, so that operating systems can rely on the flag being correctly set. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230510105156.1134320-1-linus.walleij@linaro.org Signed-off-by: Arnd Bergmann commit eeda0b71a7003aa13ef4f2720edc01f6783a909e Merge: 44b5814fbab41 6b0db163ff920 Author: Arnd Bergmann Date: Mon Jun 5 17:38:51 2023 +0200 Merge tag 'at91-fixes-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/fixes AT91 fixes for 6.4 It contains: - fix imbalanced reference counter for ethernet devices; without it system hangs after consecutive suspend/resume cycles; - fix debounce delay property for shutdown controller; the initial DT property is not what the driver expects. * tag 'at91-fixes-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sama7g5ek: fix debounce delay property for shdwc ARM: at91: pm: fix imbalanced reference counter for ethernet devices Link: https://lore.kernel.org/r/20230530105930.11621-1-claudiu.beznea@microchip.com Signed-off-by: Arnd Bergmann commit 44b5814fbab412a34b350480b10110754f25e094 Merge: be02e1fc71d22 661a4f089317c Author: Arnd Bergmann Date: Mon Jun 5 17:37:28 2023 +0200 Merge tag 'qcom-arm64-fixes-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes Qualcomm ARM64 DeviceTree fixes for 6.4 Register scheme for SM8550 LLCC is corrected to avoid using the wrong register offsets. SDRAM frequency for misidentified SC7180-lite boards is handled. The datatype for Soundwire interval on SM8550 is corrected. The resource controller on SC8280XP is added to the CPU cluster power-domain to get notified to send cached sleep and wake votes before going entering the lower power states. SA8155P power-domains that differ from what's inherited from the SM8150 DeviceTree are adjusted to make the platform boot again. Remoteproc firmware paths are corrected for Sony Xperia 10 IV. Cache properties are adjusted across a range of platforms, to meet changes in the binding. Panel compatibles are corrected for Xiaomi Mi Pad 5 Pro, to match binding. Invalid dai-cells are dropped from SC7280 devices, to match binding. The incorrect removal of "input-enable" from the LPASS pinctrl node of SC8280XP was reverted, to get dmic pins in the correct state again. The incorrect input-enable property is dropped from a msm8974, mdm9615 and apq8026 to resolve a range of DT validation warnings, incorrectly picked up through the ARM64 tree. * tag 'qcom-arm64-fixes-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: dts: qcom: sm8550: Use the correct LLCC register scheme arm64: dts: qcom: sc7180-lite: Fix SDRAM freq for misidentified sc7180-lite boards arm64: dts: qcom: sm8550: use uint16 for Soundwire interval arm64: dts: qcom: Split out SA8155P and use correct RPMh power domains arm64: dts: qcom: sm6375-pdx225: Fix remoteproc firmware paths arm64: dts: qcom: add missing cache properties arm64: dts: qcom: use decimal for cache level arm64: dts: qcom: fix indentation ARM: dts: qcom: msm8974: remove superfluous "input-enable" ARM: dts: qcom: mdm9615: remove superfluous "input-enable" ARM: dts: qcom: apq8026: remove superfluous "input-enable" arm64: dts: qcom: sm8250-xiaomi-elish-csot: fix panel compatible arm64: dts: qcom: sm8250-xiaomi-elish-boe: fix panel compatible arm64: dts: qcom: sc7280-qcard: drop incorrect dai-cells from WCD938x SDW arm64: dts: qcom: sc7280-idp: drop incorrect dai-cells from WCD938x SDW arm64: dts: qcom: sc8280xp: Flush RSC sleep & wake votes arm64: dts: qcom: sc8280xp: Revert "arm64: dts: qcom: sc8280xp: remove superfluous "input-enable"" Link: https://lore.kernel.org/r/20230601142659.2246348-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit be02e1fc71d2256f4657eb4ac9aadcee4354bc36 Merge: 1c278f8eba9b6 cbd77119b6355 Author: Arnd Bergmann Date: Mon Jun 5 17:35:28 2023 +0200 Merge tag 'qcom-driver-fixes-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes Qualcomm driver fixes for 6.4 Error paths is corrected across icc-bwmon, rpmh-rsc, ramp_controller and rmtfs. The ice module is renamed qcom_ice, to avoid clashing with existing "ice" driver. SA8155P-specific RPMh power-domains are introduced to avoid the code trying to access resources that exists on SM8150, but not on SA8155P. Lastly, changes to the EDAC driver to fix an issue where the driver performs mmio based on the wrong register map. * tag 'qcom-driver-fixes-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: EDAC/qcom: Get rid of hardcoded register offsets EDAC/qcom: Remove superfluous return variable assignment in qcom_llcc_core_setup() dt-bindings: cache: qcom,llcc: Fix SM8550 description soc: qcom: rpmhpd: Add SA8155P power domains dt-bindings: power: qcom,rpmpd: Add SA8155P soc: qcom: Rename ice to qcom_ice to avoid module name conflict soc: qcom: rmtfs: Fix error code in probe() soc: qcom: ramp_controller: Fix an error handling path in qcom_ramp_controller_probe() soc: qcom: rpmh-rsc: drop redundant unsigned >=0 comparision soc: qcom: icc-bwmon: fix incorrect error code passed to dev_err_probe() Link: https://lore.kernel.org/r/20230601141058.2246039-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 1c278f8eba9b6fed8290beb5c4aa8d90619c782f Merge: 7877cb91f1081 925a80af6106a Author: Arnd Bergmann Date: Mon Jun 5 17:34:35 2023 +0200 Merge tag 'qcom-dts-fixes-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes Qualcomm ARM32 fix for 6.4 A range of 32-bit Qualcomm platforms are missing cache-unified, which is now required by the binding, this is now corrected. * tag 'qcom-dts-fixes-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: add missing cache properties Link: https://lore.kernel.org/r/20230601140347.2245680-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit f8dba31b0a826e691949cd4fdfa5c30defaac8c5 Merge: 9561de3a55bed c3d03e8e35e00 Author: Linus Torvalds Date: Mon Jun 5 11:31:36 2023 -0400 Merge tag 'asym-keys-fix-for-linus-v6.4-rc5' of https://github.com/robertosassu/linux Pull asymmetric keys fix from Roberto Sassu: "Here is a small fix to make an unconditional copy of the buffer passed to crypto operations, to take into account the case of the stack not in the linear mapping area. It has been tested and verified to fix the bug" Acked-by: Herbert Xu Acked-by: David Howells * tag 'asym-keys-fix-for-linus-v6.4-rc5' of https://github.com/robertosassu/linux: KEYS: asymmetric: Copy sig and digest in public_key_verify_signature() commit ad24919540fb4df83981d469b5253cc1aecca939 Author: Richard Fitzgerald Date: Mon Jun 5 15:32:38 2023 +0100 firmware: cs_dsp: Log correct region name in bin error messages In cs_dsp_load_coeff() region_name should be set in the XM/YM/ZM cases otherwise any errors will log the region as "Unknown". While doing this also change one error message that logged the region type ID to log the region_name instead. This makes it consistent with other messages in the same function. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230605143238.4001982-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit fb928170e32ebf4f983db7ea64901b1ea19ceadf Merge: 9bc0097347745 77e4b94a3de69 Author: David S. Miller Date: Mon Jun 5 15:15:57 2023 +0100 Merge branch 'mptcp-addr-adv-fixes' Mat Martineau says: ==================== mptcp: Fixes for address advertisement Patches 1 and 2 allow address advertisements to be removed without affecting current connected subflows, and updates associated self tests. Patches 3 and 4 correctly track (and allow removal of) addresses that were implicitly announced as part of subflow creation. Also updates associated self tests. Patch 5 makes subflow and address announcement counters work consistently between the userspace and in-kernel path managers. ==================== Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 77e4b94a3de692a09b79945ecac5b8e6b77f10c1 Author: Geliang Tang Date: Sun Jun 4 20:25:21 2023 -0700 mptcp: update userspace pm infos Increase pm subflows counter on both server side and client side when userspace pm creates a new subflow, and decrease the counter when it closes a subflow. Increase add_addr_signaled counter in mptcp_nl_cmd_announce() when the address is announced by userspace PM. This modification is similar to how the in-kernel PM is updating the counter: when additional subflows are created/removed. Fixes: 9ab4807c84a4 ("mptcp: netlink: Add MPTCP_PM_CMD_ANNOUNCE") Fixes: 702c2f646d42 ("mptcp: netlink: allow userspace-driven subflow establishment") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/329 Cc: stable@vger.kernel.org Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 6c160b636c91e71e50c39134f78257cc35305ff0 Author: Geliang Tang Date: Sun Jun 4 20:25:20 2023 -0700 selftests: mptcp: update userspace pm subflow tests To align with what is done by the in-kernel PM, update userspace pm subflow selftests, by sending the a remove_addrs command together before the remove_subflows command. This will get a RM_ADDR in chk_rm_nr(). Fixes: d9a4594edabf ("mptcp: netlink: Add MPTCP_PM_CMD_REMOVE") Fixes: 5e986ec46874 ("selftests: mptcp: userspace pm subflow tests") Link: https://github.com/multipath-tcp/mptcp_net-next/issues/379 Cc: stable@vger.kernel.org Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 24430f8bf51655c5ab7ddc2fafe939dd3cd0dd47 Author: Geliang Tang Date: Sun Jun 4 20:25:19 2023 -0700 mptcp: add address into userspace pm list Add the address into userspace_pm_local_addr_list when the subflow is created. Make sure it can be found in mptcp_nl_cmd_remove(). And delete it in the new helper mptcp_userspace_pm_delete_local_addr(). By doing this, the "REMOVE" command also works with subflows that have been created via the "SUB_CREATE" command instead of restricting to the addresses that have been announced via the "ANNOUNCE" command. Fixes: d9a4594edabf ("mptcp: netlink: Add MPTCP_PM_CMD_REMOVE") Link: https://github.com/multipath-tcp/mptcp_net-next/issues/379 Cc: stable@vger.kernel.org Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 48d73f609dcceeb563b0d960e59bf0362581e39c Author: Geliang Tang Date: Sun Jun 4 20:25:18 2023 -0700 selftests: mptcp: update userspace pm addr tests This patch is linked to the previous commit ("mptcp: only send RM_ADDR in nl_cmd_remove"). To align with what is done by the in-kernel PM, update userspace pm addr selftests, by sending a remove_subflows command together after the remove_addrs command. Fixes: d9a4594edabf ("mptcp: netlink: Add MPTCP_PM_CMD_REMOVE") Fixes: 97040cf9806e ("selftests: mptcp: userspace pm address tests") Cc: stable@vger.kernel.org Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 8b1c94da1e481090f24127b2c420b0c0b0421ce3 Author: Geliang Tang Date: Sun Jun 4 20:25:17 2023 -0700 mptcp: only send RM_ADDR in nl_cmd_remove The specifications from [1] about the "REMOVE" command say: Announce that an address has been lost to the peer It was then only supposed to send a RM_ADDR and not trying to delete associated subflows. A new helper mptcp_pm_remove_addrs() is then introduced to do just that, compared to mptcp_pm_remove_addrs_and_subflows() also removing subflows. To delete a subflow, the userspace daemon can use the "SUB_DESTROY" command, see mptcp_nl_cmd_sf_destroy(). Fixes: d9a4594edabf ("mptcp: netlink: Add MPTCP_PM_CMD_REMOVE") Link: https://github.com/multipath-tcp/mptcp/blob/mptcp_v0.96/include/uapi/linux/mptcp.h [1] Cc: stable@vger.kernel.org Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 2d6f2f79e06571d41eb1223abebe9097511c9544 Author: Jouni Högander Date: Tue May 30 13:16:49 2023 +0300 drm/i915: Use 18 fast wake AUX sync len HW default for wake sync pulses is 18. 10 precharge and 8 preamble. There is no reason to change this especially as it is causing problems with certain eDP panels. v3: Change "Fixes:" commit v2: Remove "fast wake" repeat from subject Signed-off-by: Jouni Högander Fixes: e1c71f8f9180 ("drm/i915: Fix fast wake AUX sync len") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8475 Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20230530101649.2549949-1-jouni.hogander@intel.com (cherry picked from commit b29a20f7c4995a059ed764ce42389857426397c7) Signed-off-by: Joonas Lahtinen commit cb2e701305f4ffe3a107c1d97f8588b4ed48ccb3 Author: Chaitanya Kumar Borah Date: Mon May 29 11:37:47 2023 +0530 drm/i915/display: Set correct voltage level for 480MHz CDCLK According to Bspec, the voltage level for 480MHz is to be set as 1 instead of 2. BSpec: 49208 Fixes: 06f1b06dc5b7 ("drm/i915/display: Add 480 MHz CDCLK steps for RPL-U") v2: rebase Signed-off-by: Chaitanya Kumar Borah Reviewed-by: Mika Kahola Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230529060747.3972259-1-chaitanya.kumar.borah@intel.com (cherry picked from commit 5a3c46b809d09f8ef59e2fbf2463b1c102aecbaa) Signed-off-by: Joonas Lahtinen commit 40023959dbab3c6ad56fa7213770e63d197b69fb Author: Andi Shyti Date: Fri May 26 14:41:38 2023 +0200 drm/i915/gt: Use the correct error value when kernel_context() fails kernel_context() returns an error pointer. Use pointer-error conversion functions to evaluate its return value, rather than checking for a '0' return. Fixes: eb5c10cbbc2f ("drm/i915: Remove I915_USER_PRIORITY_SHIFT") Reported-by: Dan Carpenter Signed-off-by: Andi Shyti Cc: Chris Wilson Cc: # v5.13+ Reviewed-by: Andrzej Hajda Acked-by: Tejas Upadhyay Link: https://patchwork.freedesktop.org/patch/msgid/20230526124138.2006110-1-andi.shyti@linux.intel.com (cherry picked from commit edad9ee94f17adc75d3b13ab51bbe3d615ce1e7e) Signed-off-by: Joonas Lahtinen commit 592295e61b5c51ea89fd1959932fd0f121f08c46 Merge: 9561de3a55bed 9f9666e65359d Author: Greg Kroah-Hartman Date: Mon Jun 5 12:55:06 2023 +0200 Merge tag 'thunderbolt-for-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fixes for v6.4-rc6 This includes following fixes for v6.4-rc6: - Fix DMA test driver to pass correct values when only RX or TX ring is used - Increase timeout when DisplayPort tunnel is established to cope with a VGA/DVI dongle connected to a dock - Do not enable CL states when BIOS connnection manager already created the tunnels - Correct the ring interrupt masking to work again in Intel hardware on resume from system sleep states. All these have been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Mask ring interrupt on Intel hardware as well thunderbolt: Do not touch CL state configuration during discovery thunderbolt: Increase DisplayPort Connection Manager handshake timeout thunderbolt: dma_test: Use correct value for absent rings when creating paths commit 9bc009734774549f8bb8d7e526ba10e70d751a7c Author: Bartosz Golaszewski Date: Fri Jun 2 21:04:55 2023 +0200 net: stmmac: dwmac-qcom-ethqos: fix a regression on EMAC < 3 We must not assign plat_dat->dwmac4_addrs unconditionally as for structures which don't set them, this will result in the core driver using zeroes everywhere and breaking the driver for older HW. On EMAC < 2 the address should remain NULL. Fixes: b68376191c69 ("net: stmmac: dwmac-qcom-ethqos: Add EMAC3 support") Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Halaney Reviewed-by: Siddharth Vadapalli Reviewed-by: Vinod Koul Signed-off-by: David S. Miller commit 5578d0a79b6430fa1543640dd6f2d397d0886ce7 Author: Marek Behún Date: Sun May 21 14:19:40 2023 +0200 i2c: mv64xxx: Fix reading invalid status value in atomic mode There seems to be a bug within the mv64xxx I2C controller, wherein the status register may not necessarily contain valid value immediately after the IFLG flag is set in the control register. My theory is that the controller: - first sets the IFLG in control register - then updates the status register - then raises an interrupt This may sometime cause weird bugs when in atomic mode, since in this mode we do not wait for an interrupt, but instead we poll the control register for IFLG and read status register immediately after. I encountered -ENXIO from mv64xxx_i2c_fsm() due to this issue when using this driver in atomic mode. Note that I've only seen this issue on Armada 385, I don't know whether other SOCs with this controller are also affected. Also note that this fix has been in U-Boot for over 4 years [1] without anybody complaining, so it should not cause regressions. [1] https://source.denx.de/u-boot/u-boot/-/commit/d50e29662f78 Fixes: 544a8d75f3d6 ("i2c: mv64xxx: Add atomic_xfer method to driver") Signed-off-by: Marek Behún Signed-off-by: Wolfram Sang commit d753693101881b9c17f04edc365cf6685c475ff1 Merge: cd2b8113c2e8b 628f725d3b090 Author: David S. Miller Date: Mon Jun 5 11:21:10 2023 +0100 Merge tag 'linux-can-fixes-for-6.4-20230605' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== this is a pull request of 3 patches for net/master. All 3 patches target the j1939 stack. The 1st patch is by Oleksij Rempel and fixes the error queue handling for (E)TP sessions that run into timeouts. The last 2 patches are by Fedor Pchelkin and fix a potential use-after-free in j1939_netdev_start() if j1939_can_rx_register() fails. ==================== Signed-off-by: David S. Miller commit 1acfc6e753ed978b36d722f54e57fe4d1e8a6ffa Author: David Zheng Date: Wed May 24 11:14:59 2023 -0700 i2c: designware: fix idx_write_cnt in read loop With IC_INTR_RX_FULL slave interrupt handler reads data in a loop until RX FIFO is empty. When testing with the slave-eeprom, each transaction has 2 bytes for address/index and 1 byte for value, the address byte can be written as data byte due to dropping STOP condition. In the test below, the master continuously writes to the slave, first 2 bytes are index, 3rd byte is value and follow by a STOP condition. i2c_write: i2c-3 #0 a=04b f=0000 l=3 [00-D1-D1] i2c_write: i2c-3 #0 a=04b f=0000 l=3 [00-D2-D2] i2c_write: i2c-3 #0 a=04b f=0000 l=3 [00-D3-D3] Upon receiving STOP condition slave eeprom would reset `idx_write_cnt` so next 2 bytes can be treated as buffer index for upcoming transaction. Supposedly the slave eeprom buffer would be written as EEPROM[0x00D1] = 0xD1 EEPROM[0x00D2] = 0xD2 EEPROM[0x00D3] = 0xD3 When CPU load is high the slave irq handler may not read fast enough, the interrupt status can be seen as 0x204 with both DW_IC_INTR_STOP_DET (0x200) and DW_IC_INTR_RX_FULL (0x4) bits. The slave device may see the transactions below. 0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x1594 : INTR_STAT=0x4 0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x1594 : INTR_STAT=0x4 0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x1594 : INTR_STAT=0x4 0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x1794 : INTR_STAT=0x204 0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x1790 : INTR_STAT=0x200 0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x1594 : INTR_STAT=0x4 0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x1594 : INTR_STAT=0x4 0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x1594 : INTR_STAT=0x4 After `D1` is received, read loop continues to read `00` which is the first bype of next index. Since STOP condition is ignored by the loop, eeprom buffer index increased to `D2` and `00` is written as value. So the slave eeprom buffer becomes EEPROM[0x00D1] = 0xD1 EEPROM[0x00D2] = 0x00 EEPROM[0x00D3] = 0xD3 The fix is to use `FIRST_DATA_BYTE` (bit 11) in `IC_DATA_CMD` to split the transactions. The first index byte in this case would have bit 11 set. Check this indication to inject I2C_SLAVE_WRITE_REQUESTED event which will reset `idx_write_cnt` in slave eeprom. Signed-off-by: David Zheng Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang commit cd2b8113c2e8b9f5a88a942e1eaca61eba401b85 Author: Eric Dumazet Date: Fri Jun 2 12:37:47 2023 +0000 net/sched: fq_pie: ensure reasonable TCA_FQ_PIE_QUANTUM values We got multiple syzbot reports, all duplicates of the following [1] syzbot managed to install fq_pie with a zero TCA_FQ_PIE_QUANTUM, thus triggering infinite loops. Use limits similar to sch_fq, with commits 3725a269815b ("pkt_sched: fq: avoid hang when quantum 0") and d9e15a273306 ("pkt_sched: fq: do not accept silly TCA_FQ_QUANTUM") [1] watchdog: BUG: soft lockup - CPU#0 stuck for 26s! [swapper/0:0] Modules linked in: irq event stamp: 172817 hardirqs last enabled at (172816): [] __el1_irq arch/arm64/kernel/entry-common.c:476 [inline] hardirqs last enabled at (172816): [] el1_interrupt+0x58/0x68 arch/arm64/kernel/entry-common.c:486 hardirqs last disabled at (172817): [] __el1_irq arch/arm64/kernel/entry-common.c:468 [inline] hardirqs last disabled at (172817): [] el1_interrupt+0x24/0x68 arch/arm64/kernel/entry-common.c:486 softirqs last enabled at (167634): [] softirq_handle_end kernel/softirq.c:414 [inline] softirqs last enabled at (167634): [] __do_softirq+0xac0/0xd54 kernel/softirq.c:600 softirqs last disabled at (167701): [] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.4.0-rc3-syzkaller-geb0f1697d729 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : fq_pie_qdisc_dequeue+0x10c/0x8ac net/sched/sch_fq_pie.c:246 lr : fq_pie_qdisc_dequeue+0xe4/0x8ac net/sched/sch_fq_pie.c:240 sp : ffff800008007210 x29: ffff800008007280 x28: ffff0000c86f7890 x27: ffff0000cb20c2e8 x26: ffff0000cb20c2f0 x25: dfff800000000000 x24: ffff0000cb20c2e0 x23: ffff0000c86f7880 x22: 0000000000000040 x21: 1fffe000190def10 x20: ffff0000cb20c2e0 x19: ffff0000cb20c2e0 x18: ffff800008006e60 x17: 0000000000000000 x16: ffff80000850af6c x15: 0000000000000302 x14: 0000000000000100 x13: 0000000000000000 x12: 0000000000000001 x11: 0000000000000302 x10: 0000000000000100 x9 : 0000000000000000 x8 : 0000000000000000 x7 : ffff80000841c468 x6 : 0000000000000000 x5 : 0000000000000001 x4 : 0000000000000001 x3 : 0000000000000000 x2 : ffff0000cb20c2e0 x1 : ffff0000cb20c2e0 x0 : 0000000000000001 Call trace: fq_pie_qdisc_dequeue+0x10c/0x8ac net/sched/sch_fq_pie.c:246 dequeue_skb net/sched/sch_generic.c:292 [inline] qdisc_restart net/sched/sch_generic.c:397 [inline] __qdisc_run+0x1fc/0x231c net/sched/sch_generic.c:415 __dev_xmit_skb net/core/dev.c:3868 [inline] __dev_queue_xmit+0xc80/0x3318 net/core/dev.c:4210 dev_queue_xmit include/linux/netdevice.h:3085 [inline] neigh_connected_output+0x2f8/0x38c net/core/neighbour.c:1581 neigh_output include/net/neighbour.h:544 [inline] ip6_finish_output2+0xd60/0x1a1c net/ipv6/ip6_output.c:134 __ip6_finish_output net/ipv6/ip6_output.c:195 [inline] ip6_finish_output+0x538/0x8c8 net/ipv6/ip6_output.c:206 NF_HOOK_COND include/linux/netfilter.h:292 [inline] ip6_output+0x270/0x594 net/ipv6/ip6_output.c:227 dst_output include/net/dst.h:458 [inline] NF_HOOK include/linux/netfilter.h:303 [inline] ndisc_send_skb+0xc30/0x1790 net/ipv6/ndisc.c:508 ndisc_send_rs+0x47c/0x5d4 net/ipv6/ndisc.c:718 addrconf_rs_timer+0x300/0x58c net/ipv6/addrconf.c:3936 call_timer_fn+0x19c/0x8cc kernel/time/timer.c:1700 expire_timers kernel/time/timer.c:1751 [inline] __run_timers+0x55c/0x734 kernel/time/timer.c:2022 run_timer_softirq+0x7c/0x114 kernel/time/timer.c:2035 __do_softirq+0x2d0/0xd54 kernel/softirq.c:571 ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:882 do_softirq_own_stack+0x20/0x2c arch/arm64/kernel/irq.c:85 invoke_softirq kernel/softirq.c:452 [inline] __irq_exit_rcu+0x28c/0x534 kernel/softirq.c:650 irq_exit_rcu+0x14/0x84 kernel/softirq.c:662 __el1_irq arch/arm64/kernel/entry-common.c:472 [inline] el1_interrupt+0x38/0x68 arch/arm64/kernel/entry-common.c:486 el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:491 el1h_64_irq+0x64/0x68 arch/arm64/kernel/entry.S:587 __daif_local_irq_enable arch/arm64/include/asm/irqflags.h:33 [inline] arch_local_irq_enable+0x8/0xc arch/arm64/include/asm/irqflags.h:55 cpuidle_idle_call kernel/sched/idle.c:170 [inline] do_idle+0x1f0/0x4e8 kernel/sched/idle.c:282 cpu_startup_entry+0x24/0x28 kernel/sched/idle.c:379 rest_init+0x2dc/0x2f4 init/main.c:735 start_kernel+0x0/0x55c init/main.c:834 start_kernel+0x3f0/0x55c init/main.c:1088 __primary_switched+0xb8/0xc0 arch/arm64/kernel/head.S:523 Fixes: ec97ecf1ebe4 ("net: sched: add Flow Queue PIE packet scheduler") Reported-by: syzbot Signed-off-by: Eric Dumazet Reviewed-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 7ebfd881abe9e0ea9557b29dab6aa28d294fabb4 Author: Simon Horman Date: Wed May 10 14:32:17 2023 +0200 i2c: mchp-pci1xxxx: Avoid cast to incompatible function type Rather than casting pci1xxxx_i2c_shutdown to an incompatible function type, update the type to match that expected by __devm_add_action. Reported by clang-16 with W-1: .../i2c-mchp-pci1xxxx.c:1159:29: error: cast from 'void (*)(struct pci1xxxx_i2c *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] ret = devm_add_action(dev, (void (*)(void *))pci1xxxx_i2c_shutdown, i2c); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/linux/device.h:251:29: note: expanded from macro 'devm_add_action' __devm_add_action(release, action, data, #action) ^~~~~~ No functional change intended. Compile tested only. Signed-off-by: Simon Horman Reviewed-by: Horatiu Vultur Reviewed-by: Andi Shyti Reviewed-by: Tharun Kumar P Signed-off-by: Wolfram Sang commit 8110bf24c82d08aa2ed1d09a2b996d06c41f2e67 Author: Christian Heusel Date: Mon May 8 16:18:01 2023 +0200 i2c: img-scb: Fix spelling mistake "innacurate" -> "inaccurate" There is a spelling mistake in a comment. Fix it. Signed-off-by: Christian Heusel Signed-off-by: Wolfram Sang commit 63b679a962acc49a9e412d5c511da8e25bda598f Author: Andi Shyti Date: Fri Jun 2 03:21:00 2023 +0200 MAINTAINERS: Add myself as I2C host drivers maintainer I will help Wolfram out with the i2c controllers patches. Signed-off-by: Andi Shyti Acked-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit 1a93f10c5b12bd766a537b24a50fca5373467303 Author: Sayed, Karimuddin Date: Fri Jun 2 14:38:12 2023 -0500 ALSA: hda/realtek: Add "Intel Reference board" and "NUC 13" SSID in the ALC256 Add "Intel Reference boad" and "Intel NUC 13" SSID in the alc256. Enable jack headset volume buttons Reviewed-by: Kai Vehmanen Signed-off-by: Sayed, Karimuddin Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230602193812.66768-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 7ca4c8d4d3f41c2cd9b4cf22bb829bf03dac0956 Author: RenHai Date: Fri Jun 2 08:36:04 2023 +0800 ALSA: hda/realtek: Add Lenovo P3 Tower platform Headset microphone on this platform does not work without ALC897_FIXUP_HEADSET_MIC_PIN fixup. Signed-off-by: RenHai Cc: Link: https://lore.kernel.org/r/20230602003604.975892-1-kean0048@gmail.com Signed-off-by: Takashi Iwai commit 527c356b51f3ddee02c9ed5277538f85e30a2cdc Author: Ai Chao Date: Fri May 26 17:47:04 2023 +0800 ALSA: hda/realtek: Add a quirk for HP Slim Desktop S01 Add a quirk for HP Slim Desktop S01 to fixup headset MIC no presence. Signed-off-by: Ai Chao Cc: Link: https://lore.kernel.org/r/20230526094704.14597-1-aichao@kylinos.cn Signed-off-by: Takashi Iwai commit bd574889c25d2ed7e3d61d784c59a539a95f0167 Author: Mirsad Goran Todorovac Date: Wed May 24 21:15:29 2023 +0200 selftests: alsa: pcm-test: Fix compiler warnings about the format GCC 11.3.0 issues warnings in this module about wrong sizes of format specifiers: pcm-test.c: In function ‘test_pcm_time’: pcm-test.c:384:68: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 \ has type ‘unsigned int’ [-Wformat=] 384 | snprintf(msg, sizeof(msg), "rate mismatch %ld != %ld", rate, rrate); pcm-test.c:455:53: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has \ type ‘long int’ [-Wformat=] 455 | "expected %d, wrote %li", rate, frames); pcm-test.c:462:53: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has \ type ‘long int’ [-Wformat=] 462 | "expected %d, wrote %li", rate, frames); pcm-test.c:467:53: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has \ type ‘long int’ [-Wformat=] 467 | "expected %d, wrote %li", rate, frames); Simple fix according to compiler's suggestion removed the warnings. Signed-off-by: Mirsad Goran Todorovac Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230524191528.13203-1-mirsad.todorovac@alu.unizg.hr Signed-off-by: Takashi Iwai commit 628f725d3b090fadcc3735aaf4332e778335188e Merge: 2a84aea80e925 9f16eb106aa5f Author: Marc Kleine-Budde Date: Mon Jun 5 08:27:23 2023 +0200 Merge patch series "can: j1939: avoid possible use-after-free when j1939_can_rx_register fails" Fedor Pchelkin says: The patch series fixes a possible racy use-after-free scenario described in 2/2: if j1939_can_rx_register() fails then the concurrent thread may have already read the invalid priv structure. The 1/2 makes j1939_netdev_lock a mutex so that access to j1939_can_rx_register() can be serialized without changing GFP_KERNEL to GFP_ATOMIC inside can_rx_register(). This seems to be safe. Note that the patch series has been tested only via Syzkaller and not with a real device. Link: https://lore.kernel.org/r/20230526171910.227615-1-pchelkin@ispras.ru Signed-off-by: Marc Kleine-Budde commit 9f16eb106aa5fce15904625661312623ec783ed3 Author: Fedor Pchelkin Date: Fri May 26 20:19:10 2023 +0300 can: j1939: avoid possible use-after-free when j1939_can_rx_register fails Syzkaller reports the following failure: BUG: KASAN: use-after-free in kref_put include/linux/kref.h:64 [inline] BUG: KASAN: use-after-free in j1939_priv_put+0x25/0xa0 net/can/j1939/main.c:172 Write of size 4 at addr ffff888141c15058 by task swapper/3/0 CPU: 3 PID: 0 Comm: swapper/3 Not tainted 5.10.144-syzkaller #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x167 lib/dump_stack.c:118 print_address_description.constprop.0+0x1c/0x220 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562 check_memory_region_inline mm/kasan/generic.c:186 [inline] check_memory_region+0x145/0x190 mm/kasan/generic.c:192 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_fetch_sub_release include/asm-generic/atomic-instrumented.h:220 [inline] __refcount_sub_and_test include/linux/refcount.h:272 [inline] __refcount_dec_and_test include/linux/refcount.h:315 [inline] refcount_dec_and_test include/linux/refcount.h:333 [inline] kref_put include/linux/kref.h:64 [inline] j1939_priv_put+0x25/0xa0 net/can/j1939/main.c:172 j1939_sk_sock_destruct+0x44/0x90 net/can/j1939/socket.c:374 __sk_destruct+0x4e/0x820 net/core/sock.c:1784 rcu_do_batch kernel/rcu/tree.c:2485 [inline] rcu_core+0xb35/0x1a30 kernel/rcu/tree.c:2726 __do_softirq+0x289/0x9a3 kernel/softirq.c:298 asm_call_irq_on_stack+0x12/0x20 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline] do_softirq_own_stack+0xaa/0xe0 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:393 [inline] __irq_exit_rcu kernel/softirq.c:423 [inline] irq_exit_rcu+0x136/0x200 kernel/softirq.c:435 sysvec_apic_timer_interrupt+0x4d/0x100 arch/x86/kernel/apic/apic.c:1095 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:635 Allocated by task 1141: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc9/0xd0 mm/kasan/common.c:461 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:664 [inline] j1939_priv_create net/can/j1939/main.c:131 [inline] j1939_netdev_start+0x111/0x860 net/can/j1939/main.c:268 j1939_sk_bind+0x8ea/0xd30 net/can/j1939/socket.c:485 __sys_bind+0x1f2/0x260 net/socket.c:1645 __do_sys_bind net/socket.c:1656 [inline] __se_sys_bind net/socket.c:1654 [inline] __x64_sys_bind+0x6f/0xb0 net/socket.c:1654 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xc6 Freed by task 1141: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0x112/0x170 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1542 [inline] slab_free_freelist_hook+0xad/0x190 mm/slub.c:1576 slab_free mm/slub.c:3149 [inline] kfree+0xd9/0x3b0 mm/slub.c:4125 j1939_netdev_start+0x5ee/0x860 net/can/j1939/main.c:300 j1939_sk_bind+0x8ea/0xd30 net/can/j1939/socket.c:485 __sys_bind+0x1f2/0x260 net/socket.c:1645 __do_sys_bind net/socket.c:1656 [inline] __se_sys_bind net/socket.c:1654 [inline] __x64_sys_bind+0x6f/0xb0 net/socket.c:1654 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xc6 It can be caused by this scenario: CPU0 CPU1 j1939_sk_bind(socket0, ndev0, ...) j1939_netdev_start() j1939_sk_bind(socket1, ndev0, ...) j1939_netdev_start() mutex_lock(&j1939_netdev_lock) j1939_priv_set(ndev0, priv) mutex_unlock(&j1939_netdev_lock) if (priv_new) kref_get(&priv_new->rx_kref) return priv_new; /* inside j1939_sk_bind() */ jsk->priv = priv j1939_can_rx_register(priv) // fails j1939_priv_set(ndev, NULL) kfree(priv) j1939_sk_sock_destruct() j1939_priv_put() // <- uaf To avoid this, call j1939_can_rx_register() under j1939_netdev_lock so that a concurrent thread cannot process j1939_priv before j1939_can_rx_register() returns. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Fedor Pchelkin Tested-by: Oleksij Rempel Acked-by: Oleksij Rempel Link: https://lore.kernel.org/r/20230526171910.227615-3-pchelkin@ispras.ru Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde commit cd9c790de2088b0d797dc4d244b4f174f9962554 Author: Fedor Pchelkin Date: Fri May 26 20:19:09 2023 +0300 can: j1939: change j1939_netdev_lock type to mutex It turns out access to j1939_can_rx_register() needs to be serialized, otherwise j1939_priv can be corrupted when parallel threads call j1939_netdev_start() and j1939_can_rx_register() fails. This issue is thoroughly covered in other commit which serializes access to j1939_can_rx_register(). Change j1939_netdev_lock type to mutex so that we do not need to remove GFP_KERNEL from can_rx_register(). j1939_netdev_lock seems to be used in normal contexts where mutex usage is not prohibited. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Suggested-by: Alexey Khoroshilov Signed-off-by: Fedor Pchelkin Tested-by: Oleksij Rempel Acked-by: Oleksij Rempel Link: https://lore.kernel.org/r/20230526171910.227615-2-pchelkin@ispras.ru Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde commit 2a84aea80e925ecba6349090559754f8e8eb68ef Author: Oleksij Rempel Date: Fri May 26 10:19:46 2023 +0200 can: j1939: j1939_sk_send_loop_abort(): improved error queue handling in J1939 Socket This patch addresses an issue within the j1939_sk_send_loop_abort() function in the j1939/socket.c file, specifically in the context of Transport Protocol (TP) sessions. Without this patch, when a TP session is initiated and a Clear To Send (CTS) frame is received from the remote side requesting one data packet, the kernel dispatches the first Data Transport (DT) frame and then waits for the next CTS. If the remote side doesn't respond with another CTS, the kernel aborts due to a timeout. This leads to the user-space receiving an EPOLLERR on the socket, and the socket becomes active. However, when trying to read the error queue from the socket with sock.recvmsg(, , socket.MSG_ERRQUEUE), it returns -EAGAIN, given that the socket is non-blocking. This situation results in an infinite loop: the user-space repeatedly calls epoll(), epoll() returns the socket file descriptor with EPOLLERR, but the socket then blocks on the recv() of ERRQUEUE. This patch introduces an additional check for the J1939_SOCK_ERRQUEUE flag within the j1939_sk_send_loop_abort() function. If the flag is set, it indicates that the application has subscribed to receive error queue messages. In such cases, the kernel can communicate the current transfer state via the error queue. This allows for the function to return early, preventing the unnecessary setting of the socket into an error state, and breaking the infinite loop. It is crucial to note that a socket error is only needed if the application isn't using the error queue, as, without it, the application wouldn't be aware of transfer issues. Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Reported-by: David Jander Tested-by: David Jander Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20230526081946.715190-1-o.rempel@pengutronix.de Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde commit d4d12c02bf5f768f1b423c7ae2909c5afdfe0d5f Author: Dave Chinner Date: Mon Jun 5 14:48:15 2023 +1000 xfs: collect errors from inodegc for unlinked inode recovery Unlinked list recovery requires errors removing the inode the from the unlinked list get fed back to the main recovery loop. Now that we offload the unlinking to the inodegc work, we don't get errors being fed back when we trip over a corruption that prevents the inode from being removed from the unlinked list. This means we never clear the corrupt unlinked list bucket, resulting in runtime operations eventually tripping over it and shutting down. Fix this by collecting inodegc worker errors and feed them back to the flush caller. This is largely best effort - the only context that really cares is log recovery, and it only flushes a single inode at a time so we don't need complex synchronised handling. Essentially the inodegc workers will capture the first error that occurs and the next flush will gather them and clear them. The flush itself will only report the first gathered error. In the cases where callers can return errors, propagate the collected inodegc flush error up the error handling chain. In the case of inode unlinked list recovery, there are several superfluous calls to flush queued unlinked inodes - xlog_recover_iunlink_bucket() guarantees that it has flushed the inodegc and collected errors before it returns. Hence nothing in the calling path needs to run a flush, even when an error is returned. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 7dfee17b13e5024c5c0ab1911859ded4182de3e5 Author: Dave Chinner Date: Mon Jun 5 14:48:15 2023 +1000 xfs: validate block number being freed before adding to xefi Bad things happen in defered extent freeing operations if it is passed a bad block number in the xefi. This can come from a bogus agno/agbno pair from deferred agfl freeing, or just a bad fsbno being passed to __xfs_free_extent_later(). Either way, it's very difficult to diagnose where a null perag oops in EFI creation is coming from when the operation that queued the xefi has already been completed and there's no longer any trace of it around.... Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 3148ebf2c0782340946732bfaf3073d23ac833fa Author: Dave Chinner Date: Mon Jun 5 14:48:15 2023 +1000 xfs: validity check agbnos on the AGFL If the agfl or the indexing in the AGF has been corrupted, getting a block form the AGFL could return an invalid block number. If this happens, bad things happen. Check the agbno we pull off the AGFL and return -EFSCORRUPTED if we find somethign bad. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner commit e0a8de7da35e5b22b44fa1013ccc0716e17b0c14 Author: Dave Chinner Date: Mon Jun 5 14:48:15 2023 +1000 xfs: fix agf/agfl verification on v4 filesystems When a v4 filesystem has fl_last - fl_first != fl_count, we do not not detect the corruption and allow the AGF to be used as it if was fully valid. On V5 filesystems, we reset the AGFL to empty in these cases and avoid the corruption at a small cost of leaked blocks. If we don't catch the corruption on V4 filesystems, bad things happen later when an allocation attempts to trim the free list and either double-frees stale entries in the AGFl or tries to free NULLAGBNO entries. Either way, this is bad. Prevent this from happening by using the AGFL_NEED_RESET logic for v4 filesysetms, too. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 1e473279f492faf33ed3fbb3ecf8eec9f56b951c Author: Dave Chinner Date: Mon Jun 5 14:48:15 2023 +1000 xfs: fix double xfs_perag_rele() in xfs_filestream_pick_ag() xfs_bmap_longest_free_extent() can return an error when accessing the AGF fails. In this case, the behaviour of xfs_filestream_pick_ag() is conditional on the error. We may continue the loop, or break out of it. The error handling after the loop cleans up the perag reference held when the break occurs. If we continue, the next loop iteration handles cleaning up the perag reference. EIther way, we don't need to release the active perag reference when xfs_bmap_longest_free_extent() fails. Doing so means we do a double decrement on the active reference count, and this causes tha active reference count to fall to zero. At this point, new active references will fail. This leads to unmount hanging because it tries to grab active references to that perag, only for it to fail. This happens inside a loop that retries until a inode tree radix tree tag is cleared, which cannot happen because we can't get an active reference to the perag. The unmount livelocks in this path: xfs_reclaim_inodes+0x80/0xc0 xfs_unmount_flush_inodes+0x5b/0x70 xfs_unmountfs+0x5b/0x1a0 xfs_fs_put_super+0x49/0x110 generic_shutdown_super+0x7c/0x1a0 kill_block_super+0x27/0x50 deactivate_locked_super+0x30/0x90 deactivate_super+0x3c/0x50 cleanup_mnt+0xc2/0x160 __cleanup_mnt+0x12/0x20 task_work_run+0x5e/0xa0 exit_to_user_mode_prepare+0x1bc/0x1c0 syscall_exit_to_user_mode+0x16/0x40 do_syscall_64+0x40/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Reported-by: Pengfei Xu Fixes: eb70aa2d8ed9 ("xfs: use for_each_perag_wrap in xfs_filestream_pick_ag") Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 6be73cecb5a241309008d7fc4c47749e5324bfb0 Author: Darrick J. Wong Date: Mon Jun 5 14:48:12 2023 +1000 xfs: fix broken logic when detecting mergeable bmap records Commit 6bc6c99a944c was a well-intentioned effort to initiate consolidation of adjacent bmbt mapping records by setting the PREEN flag. Consolidation can only happen if the length of the combined record doesn't overflow the 21-bit blockcount field of the bmbt recordset. Unfortunately, the length test is inverted, leading to it triggering on data forks like these: EXT: FILE-OFFSET BLOCK-RANGE AG AG-OFFSET TOTAL 0: [0..16777207]: 76110848..92888055 0 (76110848..92888055) 16777208 1: [16777208..20639743]: 92888056..96750591 0 (92888056..96750591) 3862536 Note that record 0 has a length of 16777208 512b blocks. This corresponds to 2097151 4k fsblocks, which is the maximum. Hence the two records cannot be merged. However, the logic is still wrong even if we change the in-loop comparison, because the scope of our examination isn't broad enough inside the loop to detect mappings like this: 0: [0..9]: 76110838..76110847 0 (76110838..76110847) 10 1: [10..16777217]: 76110848..92888055 0 (76110848..92888055) 16777208 2: [16777218..20639753]: 92888056..96750591 0 (92888056..96750591) 3862536 These three records could be merged into two, but one cannot determine this purely from looking at records 0-1 or 1-2 in isolation. Hoist the mergability detection outside the loop, and base its decision making on whether or not a merged mapping could be expressed in fewer bmbt records. While we're at it, fix the incorrect return type of the iter function. Fixes: 336642f79283 ("xfs: alert the user about data/attr fork mappings that could be merged") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 4320f34666363e202f8c290869c2d78c1ce9f3f1 Author: Geert Uytterhoeven Date: Mon Jun 5 04:09:27 2023 +1000 xfs: Fix undefined behavior of shift into sign bit With gcc-5: In file included from ./include/trace/define_trace.h:102:0, from ./fs/xfs/scrub/trace.h:988, from fs/xfs/scrub/trace.c:40: ./fs/xfs/./scrub/trace.h: In function ‘trace_raw_output_xchk_fsgate_class’: ./fs/xfs/scrub/scrub.h:111:28: error: initializer element is not constant #define XREP_ALREADY_FIXED (1 << 31) /* checking our repair work */ ^ Shifting the (signed) value 1 into the sign bit is undefined behavior. Fix this for all definitions in the file by shifting "1U" instead of "1". This was exposed by the first user added in commit 466c525d6d35e691 ("xfs: minimize overhead of drain wakeups by using jump labels"). Fixes: 160b5a784525e8a4 ("xfs: hoist the already_fixed variable to the scrub context") Signed-off-by: Geert Uytterhoeven Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 82842fee6e5979ca7e2bf4d839ef890c22ffb7aa Author: Dave Chinner Date: Mon Jun 5 04:08:27 2023 +1000 xfs: fix AGF vs inode cluster buffer deadlock Lock order in XFS is AGI -> AGF, hence for operations involving inode unlinked list operations we always lock the AGI first. Inode unlinked list operations operate on the inode cluster buffer, so the lock order there is AGI -> inode cluster buffer. For O_TMPFILE operations, this now means the lock order set down in xfs_rename and xfs_link is AGI -> inode cluster buffer -> AGF as the unlinked ops are done before the directory modifications that may allocate space and lock the AGF. Unfortunately, we also now lock the inode cluster buffer when logging an inode so that we can attach the inode to the cluster buffer and pin it in memory. This creates a lock order of AGF -> inode cluster buffer in directory operations as we have to log the inode after we've allocated new space for it. This creates a lock inversion between the AGF and the inode cluster buffer. Because the inode cluster buffer is shared across multiple inodes, the inversion is not specific to individual inodes but can occur when inodes in the same cluster buffer are accessed in different orders. To fix this we need move all the inode log item cluster buffer interactions to the end of the current transaction. Unfortunately, xfs_trans_log_inode() calls are littered throughout the transactions with no thought to ordering against other items or locking. This makes it difficult to do anything that involves changing the call sites of xfs_trans_log_inode() to change locking orders. However, we do now have a mechanism that allows is to postpone dirty item processing to just before we commit the transaction: the ->iop_precommit method. This will be called after all the modifications are done and high level objects like AGI and AGF buffers have been locked and modified, thereby providing a mechanism that guarantees we don't lock the inode cluster buffer before those high level objects are locked. This change is largely moving the guts of xfs_trans_log_inode() to xfs_inode_item_precommit() and providing an extra flag context in the inode log item to track the dirty state of the inode in the current transaction. This also means we do a lot less repeated work in xfs_trans_log_inode() by only doing it once per transaction when all the work is done. Fixes: 298f7bec503f ("xfs: pin inode backing buffer to the inode log item") Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner commit cb042117488dbf0b3b38b05771639890fada9a52 Author: Dave Chinner Date: Mon Jun 5 04:07:27 2023 +1000 xfs: defered work could create precommits To fix a AGI-AGF-inode cluster buffer deadlock, we need to move inode cluster buffer operations to the ->iop_precommit() method. However, this means that deferred operations can require precommits to be run on the final transaction that the deferred ops pass back to xfs_trans_commit() context. This will be exposed by attribute handling, in that the last changes to the inode in the attr set state machine "disappear" because the precommit operation is not run. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner commit 00dcd17cfa7f103f7d640ffd34645a2ddab96330 Author: Dave Chinner Date: Mon Jun 5 04:06:27 2023 +1000 xfs: restore allocation trylock iteration It was accidentally dropped when refactoring the allocation code, resulting in the AG iteration always doing blocking AG iteration. This results in a small performance regression for a specific fsmark test that runs more user data writer threads than there are AGs. Reported-by: kernel test robot Fixes: 2edf06a50f5b ("xfs: factor xfs_alloc_vextent_this_ag() for _iterate_ags()") Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner commit 89a4bf0dc3857569a77061d3d5ea2ac85f7e13c6 Author: Dave Chinner Date: Mon Jun 5 04:05:27 2023 +1000 xfs: buffer pins need to hold a buffer reference When a buffer is unpinned by xfs_buf_item_unpin(), we need to access the buffer after we've dropped the buffer log item reference count. This opens a window where we can have two racing unpins for the buffer item (e.g. shutdown checkpoint context callback processing racing with journal IO iclog completion processing) and both attempt to access the buffer after dropping the BLI reference count. If we are unlucky, the "BLI freed" context wins the race and frees the buffer before the "BLI still active" case checks the buffer pin count. This results in a use after free that can only be triggered in active filesystem shutdown situations. To fix this, we need to ensure that buffer existence extends beyond the BLI reference count checks and until the unpin processing is complete. This implies that a buffer pin operation must also take a buffer reference to ensure that the buffer cannot be freed until the buffer unpin processing is complete. Reported-by: yangerkun Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner commit 9561de3a55bed6bdd44a12820ba81ec416e705a7 Author: Linus Torvalds Date: Sun Jun 4 14:04:27 2023 -0400 Linux 6.4-rc5 commit 0c2f9acf6ae74118385f7a7d48f4b2d93637b628 Author: Reiji Watanabe Date: Fri Jun 2 19:50:35 2023 -0700 KVM: arm64: PMU: Don't overwrite PMUSERENR with vcpu loaded Currently, with VHE, KVM sets ER, CR, SW and EN bits of PMUSERENR_EL0 to 1 on vcpu_load(), and saves and restores the register value for the host on vcpu_load() and vcpu_put(). If the value of those bits are cleared on a pCPU with a vCPU loaded (armv8pmu_start() would do that when PMU counters are programmed for the guest), PMU access from the guest EL0 might be trapped to the guest EL1 directly regardless of the current PMUSERENR_EL0 value of the vCPU. Fix this by not letting armv8pmu_start() overwrite PMUSERENR_EL0 on the pCPU where PMUSERENR_EL0 for the guest is loaded, and instead updating the saved shadow register value for the host so that the value can be restored on vcpu_put() later. While vcpu_{put,load}() are manipulating PMUSERENR_EL0, disable IRQs to prevent a race condition between these processes and IPIs that attempt to update PMUSERENR_EL0 for the host EL0. Suggested-by: Mark Rutland Suggested-by: Marc Zyngier Fixes: 83a7a4d643d3 ("arm64: perf: Enable PMU counter userspace access for perf event") Signed-off-by: Reiji Watanabe Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230603025035.3781797-3-reijiw@google.com commit 8681f71759010503892f9e3ddb05f65c0f21b690 Author: Reiji Watanabe Date: Fri Jun 2 19:50:34 2023 -0700 KVM: arm64: PMU: Restore the host's PMUSERENR_EL0 Restore the host's PMUSERENR_EL0 value instead of clearing it, before returning back to userspace, as the host's EL0 might have a direct access to PMU registers (some bits of PMUSERENR_EL0 for might not be zero for the host EL0). Fixes: 83a7a4d643d3 ("arm64: perf: Enable PMU counter userspace access for perf event") Signed-off-by: Reiji Watanabe Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230603025035.3781797-2-reijiw@google.com commit 6f64a5ebe1dc64add6e1d8ed3113200909988c02 Merge: 5e89d62ec1014 2d5b205dfa32b Author: Linus Torvalds Date: Sun Jun 4 11:57:38 2023 -0400 Merge tag 'irq_urgent_for_v6.4_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Borislav Petkov: - Fix open firmware quirks validation so that they don't get applied wrongly * tag 'irq_urgent_for_v6.4_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gic: Correctly validate OF quirk descriptors commit 8cde87b007dad2e461015ff70352af56ceb02c75 Author: Min-Hua Chen Date: Sat Jun 3 07:52:09 2023 +0800 net: sched: wrap tc_skip_wrapper with CONFIG_RETPOLINE This patch fixes the following sparse warning: net/sched/sch_api.c:2305:1: sparse: warning: symbol 'tc_skip_wrapper' was not declared. Should it be static? No functional change intended. Signed-off-by: Min-Hua Chen Acked-by: Pedro Tammela Signed-off-by: David S. Miller commit 3d5f4d29f6a8c1f248ea652daddc9c4701370120 Merge: c308e9ec00472 fdebd850cc065 Author: David S. Miller Date: Sun Jun 4 15:43:45 2023 +0100 Merge branch 'enetc-fixes' Wei Fang says: ==================== net: enetc: correct the statistics of rx bytes The purpose of this patch set is to fix the issue of rx bytes statistics. The first patch corrects the rx bytes statistics of normal kernel protocol stack path, and the second patch is used to correct the rx bytes statistics of XDP. ==================== Signed-off-by: David S. Miller commit fdebd850cc065495abf1d64756496050bb22db67 Author: Wei Fang Date: Fri Jun 2 17:46:59 2023 +0800 net: enetc: correct rx_bytes statistics of XDP The rx_bytes statistics of XDP are always zero, because rx_byte_cnt is not updated after it is initialized to 0. So fix it. Fixes: d1b15102dd16 ("net: enetc: add support for XDP_DROP and XDP_PASS") Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7190d0ff0e17690a9b1279d84a06473600ba2060 Author: Wei Fang Date: Fri Jun 2 17:46:58 2023 +0800 net: enetc: correct the statistics of rx bytes The rx_bytes of struct net_device_stats should count the length of ethernet frames excluding the FCS. However, there are two problems with the rx_bytes statistics of the current enetc driver. one is that the length of VLAN header is not counted if the VLAN extraction feature is enabled. The other is that the length of L2 header is not counted, because eth_type_trans() is invoked before updating rx_bytes which will subtract the length of L2 header from skb->len. BTW, the rx_bytes statistics of XDP path also have similar problem, I will fix it in another patch. Fixes: a800abd3ecb9 ("net: enetc: move skb creation into enetc_build_skb") Signed-off-by: Wei Fang Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5e89d62ec1014800e411868b8d750f9d631bdd01 Merge: 209835e8ecb01 81f3affa19d6a Author: Linus Torvalds Date: Sun Jun 4 09:10:43 2023 -0400 Merge tag 'media/v6.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Some driver fixes: - a regression fix for the verisilicon driver - uvcvideo: don't expose unsupported video formats to userspace - camss-video: don't zero subdev format after init - mediatek: some fixes for 4K decoder formats - fix a Sphinx build warning (missing doc for client_caps) - some fixes for imx and atomisp staging drivers And two CEC core fixes: - don't set last_initiator if TX in progress - disable adapter in cec_devnode_unregister" * tag 'media/v6.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: uvcvideo: Don't expose unsupported formats to userspace media: v4l2-subdev: Fix missing kerneldoc for client_caps media: staging: media: imx: initialize hs_settle to avoid warning media: v4l2-mc: Drop subdev check in v4l2_create_fwnode_links_to_pad() media: staging: media: atomisp: init high & low vars media: cec: core: don't set last_initiator if tx in progress media: cec: core: disable adapter in cec_devnode_unregister media: mediatek: vcodec: Only apply 4K frame sizes on decoder formats media: camss: camss-video: Don't zero subdev format again after initialization media: verisilicon: Additional fix for the crash when opening the driver commit 899e373ef0b0d3f1c2712a849f019de4f46bfa02 Merge: 81f3affa19d6a 7877cb91f1081 Author: Mauro Carvalho Chehab Date: Sun Jun 4 13:50:38 2023 +0100 Merge tag 'v6.4-rc4' into v4l_for_linus Linux 6.4-rc4 * tag 'v6.4-rc4': (606 commits) Linux 6.4-rc4 cxl: Explicitly initialize resources when media is not ready x86: re-introduce support for ERMS copies for user space accesses NVMe: Add MAXIO 1602 to bogus nid list. module: error out early on concurrent load of the same module file x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms cpufreq: amd-pstate: Update policy->cur in amd_pstate_adjust_perf() io_uring: unlock sqd->lock before sq thread release CPU MAINTAINERS: update arm64 Microchip entries udplite: Fix NULL pointer dereference in __sk_mem_raise_allocated(). net: phy: mscc: enable VSC8501/2 RGMII RX clock net: phy: mscc: remove unnecessary phydev locking net: phy: mscc: add support for VSC8501 net: phy: mscc: add VSC8502 to MODULE_DEVICE_TABLE net/handshake: Enable the SNI extension to work properly net/handshake: Unpin sock->file if a handshake is cancelled net/handshake: handshake_genl_notify() shouldn't ignore @flags net/handshake: Fix uninitialized local variable net/handshake: Fix handshake_dup() ref counting net/handshake: Remove unneeded check from handshake_dup() ... commit 209835e8ecb01a2f60b7da153d223ba182447197 Merge: 41f3ab2d5ded5 48e156023059e Author: Linus Torvalds Date: Sun Jun 4 08:32:30 2023 -0400 Merge tag 'char-misc-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are a bunch of tiny char/misc/other driver fixes for 6.4-rc5 that resolve a number of reported issues. Included in here are: - iio driver fixes - fpga driver fixes - test_firmware bugfixes - fastrpc driver tiny bugfixes - MAINTAINERS file updates for some subsystems All of these have been in linux-next this past week with no reported issues" * tag 'char-misc-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (34 commits) test_firmware: fix the memory leak of the allocated firmware buffer test_firmware: fix a memory leak with reqs buffer test_firmware: prevent race conditions by a correct implementation of locking firmware_loader: Fix a NULL vs IS_ERR() check MAINTAINERS: Vaibhav Gupta is the new ipack maintainer dt-bindings: fpga: replace Ivan Bornyakov maintainership MAINTAINERS: update Microchip MPF FPGA reviewers misc: fastrpc: reject new invocations during device removal misc: fastrpc: return -EPIPE to invocations on device removal misc: fastrpc: Reassign memory ownership only for remote heap misc: fastrpc: Pass proper scm arguments for secure map request iio: imu: inv_icm42600: fix timestamp reset iio: adc: ad_sigma_delta: Fix IRQ issue by setting IRQ_DISABLE_UNLAZY flag dt-bindings: iio: adc: renesas,rcar-gyroadc: Fix adi,ad7476 compatible value iio: dac: mcp4725: Fix i2c_master_send() return value handling iio: accel: kx022a fix irq getting iio: bu27034: Ensure reset is written iio: dac: build ad5758 driver when AD5758 is selected iio: addac: ad74413: fix resistance input processing iio: light: vcnl4035: fixed chip ID check ... commit 9bf2e534313fcf420367668cc1f30e10469901dc Author: Adam Ford Date: Sun May 28 06:22:54 2023 -0500 arm64: dts: imx8mn-beacon: Fix SPI CS pinmux The final production baseboard had a different chip select than earlier prototype boards. When the newer board was released, the SPI stopped working because the wrong pin was used in the device tree and conflicted with the UART RTS. Fix the pinmux for production boards. Fixes: 36ca3c8ccb53 ("arm64: dts: imx: Add Beacon i.MX8M Nano development kit") Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 41f3ab2d5ded530f2b2c19cd3d27f072f908c12d Merge: 12c2f77b32b5d c26fabe73330d Author: Linus Torvalds Date: Sun Jun 4 08:02:25 2023 -0400 Merge tag 'driver-core-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are two small driver core cacheinfo fixes for 6.4-rc5 that resolve a number of reported issues with that file. These changes have been in linux-next this past week with no reported problems" * tag 'driver-core-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: drivers: base: cacheinfo: Update cpu_map_populated during CPU Hotplug drivers: base: cacheinfo: Fix shared_cpu_map changes in event of CPU hotplug commit 12c2f77b32b5de3f5cc4a9ae2eb2b1f68f86df31 Merge: 8b435e40256f5 403e97d6ab2cb Author: Linus Torvalds Date: Sun Jun 4 07:51:33 2023 -0400 Merge tag 'tty-6.4-rc5' 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/serial driver fixes for 6.4-rc5 that have all been in linux-next this past week with no reported problems. Included in here are: - 8250_tegra driver bugfix - fsl uart driver bugfixes - Kconfig fix for dependancy issue - dt-bindings fix for the 8250_omap driver" * tag 'tty-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: dt-bindings: serial: 8250_omap: add rs485-rts-active-high serial: cpm_uart: Fix a COMPILE_TEST dependency soc: fsl: cpm1: Fix TSA and QMC dependencies in case of COMPILE_TEST tty: serial: fsl_lpuart: use UARTCTRL_TXINV to send break instead of UARTCTRL_SBK serial: 8250_tegra: Fix an error handling path in tegra_uart_probe() commit 8b435e40256f51f4576c8ab22b88398d21acb149 Merge: b066935bf8337 fcfe84236ec09 Author: Linus Torvalds Date: Sun Jun 4 07:31:48 2023 -0400 Merge tag 'usb-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some USB driver and core fixes for 6.4-rc5. Most of these are tiny driver fixes, including: - udc driver bugfix - f_fs gadget driver bugfix - cdns3 driver bugfix - typec bugfixes But the "big" thing in here is a fix yet-again for how the USB buffers are handled from userspace when dealing with DMA issues. The changes were discussed a lot, and tested a lot, on the list, and acked by the relevant mm maintainers and have been in linux-next all this past week with no reported problems" * tag 'usb-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: typec: tps6598x: Fix broken polling mode after system suspend/resume mm: page_table_check: Ensure user pages are not slab pages mm: page_table_check: Make it dependent on EXCLUSIVE_SYSTEM_RAM usb: usbfs: Use consistent mmap functions usb: usbfs: Enforce page requirements for mmap dt-bindings: usb: snps,dwc3: Fix "snps,hsphy_interface" type usb: gadget: udc: fix NULL dereference in remove() usb: gadget: f_fs: Add unbind event before functionfs_unbind usb: cdns3: fix NCM gadget RX speed 20x slow than expection at iMX8QM commit b066935bf83371c34ab8ba3b15f4232536e2786f Merge: 9455b4b6db1e9 f211b45057d8b Author: Linus Torvalds Date: Sun Jun 4 07:16:53 2023 -0400 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM: - Address some fallout of the locking rework, this time affecting the way the vgic is configured - Fix an issue where the page table walker frees a subtree and then proceeds with walking what it has just freed... - Check that a given PA donated to the guest is actually memory (only affecting pKVM) - Correctly handle MTE CMOs by Set/Way - Fix the reported address of a watchpoint forwarded to userspace - Fix the freeing of the root of stage-2 page tables - Stop creating spurious PMU events to perform detection of the default PMU and use the existing PMU list instead x86: - Fix a memslot lookup bug in the NX recovery thread that could theoretically let userspace bypass the NX hugepage mitigation - Fix a s/BLOCKING/PENDING bug in SVM's vNMI support - Account exit stats for fastpath VM-Exits that never leave the super tight run-loop - Fix an out-of-bounds bug in the optimized APIC map code, and add a regression test for the race" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: selftests: Add test for race in kvm_recalculate_apic_map() KVM: x86: Bail from kvm_recalculate_phys_map() if x2APIC ID is out-of-bounds KVM: x86: Account fastpath-only VM-Exits in vCPU stats KVM: SVM: vNMI pending bit is V_NMI_PENDING_MASK not V_NMI_BLOCKING_MASK KVM: x86/mmu: Grab memslot for correct address space in NX recovery worker KVM: arm64: Document default vPMU behavior on heterogeneous systems KVM: arm64: Iterate arm_pmus list to probe for default PMU KVM: arm64: Drop last page ref in kvm_pgtable_stage2_free_removed() KVM: arm64: Populate fault info for watchpoint KVM: arm64: Reload PTE after invoking walker callback on preorder traversal KVM: arm64: Handle trap of tagged Set/Way CMOs arm64: Add missing Set/Way CMO encodings KVM: arm64: Prevent unconditional donation of unmapped regions from the host KVM: arm64: vgic: Fix a comment KVM: arm64: vgic: Fix locking comment KVM: arm64: vgic: Wrap vgic_its_create() with config_lock KVM: arm64: vgic: Fix a circular locking issue commit 9455b4b6db1e9b11d242595cc968332ecdd3cc91 Merge: e5282a7d8f6b6 719dfd5925e18 Author: Linus Torvalds Date: Sun Jun 4 07:11:13 2023 -0400 Merge tag 'powerpc-6.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix link errors in new aes-gcm-p10 code when built-in with other drivers - Limit number of TCEs passed to H_STUFF_TCE hcall as per spec - Use KSYM_NAME_LEN in xmon array size to avoid possible OOB write Thanks to Gaurav Batra and Maninder Singh Vishal Chourasia. * tag 'powerpc-6.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/xmon: Use KSYM_NAME_LEN in array size powerpc/iommu: Limit number of TCEs to 512 for H_STUFF_TCE hcall powerpc/crypto: Fix aes-gcm-p10 link errors commit ddad59331a4e16088468ca0ad228a9fe32d7955a Author: Tian Lan Date: Sat May 13 18:12:27 2023 -0400 blk-mq: fix blk_mq_hw_ctx active request accounting The nr_active counter continues to increase over time which causes the blk_mq_get_tag to hang until the thread is rescheduled to a different core despite there are still tags available. kernel-stack INFO: task inboundIOReacto:3014879 blocked for more than 2 seconds Not tainted 6.1.15-amd64 #1 Debian 6.1.15~debian11 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:inboundIOReacto state:D stack:0 pid:3014879 ppid:4557 flags:0x00000000 Call Trace: __schedule+0x351/0xa20 scheduler+0x5d/0xe0 io_schedule+0x42/0x70 blk_mq_get_tag+0x11a/0x2a0 ? dequeue_task_stop+0x70/0x70 __blk_mq_alloc_requests+0x191/0x2e0 kprobe output showing RQF_MQ_INFLIGHT bit is not cleared before __blk_mq_free_request being called. 320 320 kworker/29:1H __blk_mq_free_request rq_flags 0x220c0 in-flight 1 b'__blk_mq_free_request+0x1 [kernel]' b'bt_iter+0x50 [kernel]' b'blk_mq_queue_tag_busy_iter+0x318 [kernel]' b'blk_mq_timeout_work+0x7c [kernel]' b'process_one_work+0x1c4 [kernel]' b'worker_thread+0x4d [kernel]' b'kthread+0xe6 [kernel]' b'ret_from_fork+0x1f [kernel]' Signed-off-by: Tian Lan Fixes: 2e315dc07df0 ("blk-mq: grab rq->refcount before calling ->fn in blk_mq_tagset_busy_iter") Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20230513221227.497327-1-tilan7663@gmail.com Signed-off-by: Jens Axboe commit c308e9ec004721a656c193243eab61a8be324657 Author: Wen Gu Date: Thu Jun 1 16:41:52 2023 +0800 net/smc: Avoid to access invalid RMBs' MRs in SMCRv1 ADD LINK CONT SMCRv1 has a similar issue to SMCRv2 (see link below) that may access invalid MRs of RMBs when construct LLC ADD LINK CONT messages. BUG: kernel NULL pointer dereference, address: 0000000000000014 #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: 5 PID: 48 Comm: kworker/5:0 Kdump: loaded Tainted: G W E 6.4.0-rc3+ #49 Workqueue: events smc_llc_add_link_work [smc] RIP: 0010:smc_llc_add_link_cont+0x160/0x270 [smc] RSP: 0018:ffffa737801d3d50 EFLAGS: 00010286 RAX: ffff964f82144000 RBX: ffffa737801d3dd8 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff964f81370c30 RBP: ffffa737801d3dd4 R08: ffff964f81370000 R09: ffffa737801d3db0 R10: 0000000000000001 R11: 0000000000000060 R12: ffff964f82e70000 R13: ffff964f81370c38 R14: ffffa737801d3dd3 R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff9652bfd40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000014 CR3: 000000008fa20004 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: smc_llc_srv_rkey_exchange+0xa7/0x190 [smc] smc_llc_srv_add_link+0x3ae/0x5a0 [smc] smc_llc_add_link_work+0xb8/0x140 [smc] process_one_work+0x1e5/0x3f0 worker_thread+0x4d/0x2f0 ? __pfx_worker_thread+0x10/0x10 kthread+0xe5/0x120 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2c/0x50 When an alernate RNIC is available in system, SMC will try to add a new link based on the RNIC for resilience. All the RMBs in use will be mapped to the new link. Then the RMBs' MRs corresponding to the new link will be filled into LLC messages. For SMCRv1, they are ADD LINK CONT messages. However smc_llc_add_link_cont() may mistakenly access to unused RMBs which haven't been mapped to the new link and have no valid MRs, thus causing a crash. So this patch fixes it. Fixes: 87f88cda2128 ("net/smc: rkey processing for a new link as SMC client") Link: https://lore.kernel.org/r/1685101741-74826-3-git-send-email-guwen@linux.alibaba.com Signed-off-by: Wen Gu Reviewed-by: Wenjia Zhang Reviewed-by: Tony Lu Signed-off-by: David S. Miller commit 02a7eee1ebf213dda4d517b9ed09fae4c1734312 Author: Weihao Gao Date: Fri Jun 2 19:54:50 2023 +0000 Fix gitignore for recently added usptream self tests This resolves the issue that generated binary is showing up as an untracked git file after every build on the kernel. Signed-off-by: Weihao Gao Signed-off-by: David S. Miller commit f211b45057d8b0264b494f1acebf2e8d7f9432c9 Merge: 49661a52a4b8c 47d2804bc99ca Author: Paolo Bonzini Date: Sat Jun 3 15:16:58 2023 -0400 Merge tag 'kvm-x86-fixes-6.4' of https://github.com/kvm-x86/linux into HEAD KVM x86 fixes for 6.4 - Fix a memslot lookup bug in the NX recovery thread that could theoretically let userspace bypass the NX hugepage mitigation - Fix a s/BLOCKING/PENDING bug in SVM's vNMI support - Account exit stats for fastpath VM-Exits that never leave the super tight run-loop - Fix an out-of-bounds bug in the optimized APIC map code, and add a regression test for the race. commit 49661a52a4b8c6c4e67cf69831c9a88b62c6ebcf Merge: 26f314988091d 40e54cad45407 Author: Paolo Bonzini Date: Sat Jun 3 15:15:49 2023 -0400 Merge tag 'kvmarm-fixes-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.4, take #3 - Fix the reported address of a watchpoint forwarded to userspace - Fix the freeing of the root of stage-2 page tables - Stop creating spurious PMU events to perform detection of the default PMU and use the existing PMU list instead. commit 26f314988091de60949f7d69f2764c98d48a7a90 Merge: b9846a698c9af a9f0e3d5a089d Author: Paolo Bonzini Date: Sat Jun 3 15:14:18 2023 -0400 Merge tag 'kvmarm-fixes-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.4, take #2 - Address some fallout of the locking rework, this time affecting the way the vgic is configured - Fix an issue where the page table walker frees a subtree and then proceeds with walking what it has just freed... - Check that a given PA donated to the gues is actually memory (only affecting pKVM) - Correctly handle MTE CMOs by Set/Way commit e5282a7d8f6b604f2bb6a06457734b8cf1e2f8f2 Merge: d1b65edf4d1e6 6d074ce231772 Author: Linus Torvalds Date: Sat Jun 3 13:52:24 2023 -0400 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Five fixes, all in drivers. The most extensive is the target change to fix the hang in the login code, which involves changing timers from per login to per connection" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: stex: Fix gcc 13 warnings scsi: qla2xxx: Fix NULL pointer dereference in target mode scsi: target: iscsi: Prevent login threads from racing between each other scsi: target: iscsi: Remove unused transport_timer scsi: target: iscsi: Fix hang in the iSCSI login code commit d1b65edf4d1e6506349196a2f665185eeca2a114 Merge: 51f269a6ecc70 b05d39466ba11 Author: Linus Torvalds Date: Sat Jun 3 13:46:11 2023 -0400 Merge tag 'leds-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/linux Pull LED fix from Johan Hovold: "Here's a fix for a regression in 6.4-rc1 which broke the backlight on machines such as the Lenovo ThinkPad X13s" Acked-by: Lee Jones Link: https://lore.kernel.org/lkml/20230602091928.GR449117@google.com/ * tag 'leds-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/linux: leds: qcom-lpg: Fix PWM period limits commit b05d39466ba111fc3775d5d46180b73c34ebe8f7 Author: Bjorn Andersson Date: Mon May 15 09:26:04 2023 -0700 leds: qcom-lpg: Fix PWM period limits The introduction of high resolution PWM support changed the order of the operations in the calculation of min and max period. The result in both divisions is in most cases a truncation to 0, which limits the period to the range of [0, 0]. Both numerators (and denominators) are within 64 bits, so the whole expression can be put directly into the div64_u64, instead of doing it partially. Fixes: b00d2ed37617 ("leds: rgb: leds-qcom-lpg: Add support for high resolution PWM") Reviewed-by: Caleb Connolly Tested-by: Steev Klimaszewski Signed-off-by: Bjorn Andersson Acked-by: Lee Jones Tested-by: Johan Hovold Tested-by: Neil Armstrong # on SM8550-QRD Link: https://lore.kernel.org/r/20230515162604.649203-1-quic_bjorande@quicinc.com Signed-off-by: Johan Hovold commit 51f269a6ecc701f9932eff5b253a1f89746be6bd Merge: 4ecd704a4c51f eb50d0f250e96 Author: Linus Torvalds Date: Sat Jun 3 08:23:16 2023 -0400 Merge tag 'probes-fixes-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull probes fixes from Masami Hiramatsu: - Return NULL if the trace_probe list on trace_probe_event is empty - selftests/ftrace: Choose testing symbol name for filtering feature from sample data instead of fixed symbol * tag 'probes-fixes-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: selftests/ftrace: Choose target function for filter test from samples tracing/probe: trace_probe_primary_from_call(): checked list_first_entry commit 03c44a21d0333a2f469680bc9caaf96a9bfaea87 Author: Russell King (Oracle) Date: Thu Jun 1 10:12:06 2023 +0100 net: phylink: actually fix ksettings_set() ethtool call Raju Lakkaraju reported that the below commit caused a regression with Lan743x drivers and a 2.5G SFP. Sadly, this is because the commit was utterly wrong. Let's fix this properly by not moving the linkmode_and(), but instead copying the link ksettings and then modifying the advertising mask before passing the modified link ksettings to phylib. Fixes: df0acdc59b09 ("net: phylink: fix ksettings_set() ethtool call") Signed-off-by: Russell King (Oracle) Link: https://lore.kernel.org/r/E1q4eLm-00Ayxk-GZ@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit eb50d0f250e96ede9192d936d220cd97adc93b89 Author: Masami Hiramatsu (Google) Date: Sun Mar 19 11:53:32 2023 +0900 selftests/ftrace: Choose target function for filter test from samples Since the event-filter-function.tc expects the 'exit_mmap()' directly calls 'kmem_cache_free()', this is vulnerable to code modifications. Choose the target function for the filter test from the sample event data so that it can keep test running correctly even if the caller function name will be changed. Link: https://lore.kernel.org/linux-trace-kernel/167919441260.1922645.18355804179347364057.stgit@mhiramat.roam.corp.google.com/ Link: https://lore.kernel.org/all/CA+G9fYtF-XEKi9YNGgR=Kf==7iRb2FrmEC7qtwAeQbfyah-UhA@mail.gmail.com/ Reported-by: Linux Kernel Functional Testing Fixes: 7f09d639b8c4 ("tracing/selftests: Add test for event filtering on function name") Signed-off-by: Masami Hiramatsu (Google) Acked-by: Steven Rostedt (Google) commit 3696e140c25f5a2af763505aff99d14c0661cede Merge: 37a826d86ff74 ef62c0ae6db11 Author: Jakub Kicinski Date: Fri Jun 2 22:55:45 2023 -0700 Merge branch 'net-ipv6-skip_notify_on_dev_down-fix' Eric Dumazet says: ==================== net/ipv6: skip_notify_on_dev_down fix While reviewing Matthieu Baerts recent patch [1], I found it copied/pasted an existing bug around skip_notify_on_dev_down. First patch is a stable candidate, and second one can simply land in net tree. https://lore.kernel.org/lkml/20230601-net-next-skip_print_link_becomes_ready-v1-1-c13e64c14095@tessares.net/ ==================== Link: https://lore.kernel.org/r/20230601160445.1480257-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit ef62c0ae6db11c095880e473db9f846132d7eba8 Author: Eric Dumazet Date: Thu Jun 1 16:04:45 2023 +0000 net/ipv6: convert skip_notify_on_dev_down sysctl to u8 Save a bit a space, and could help future sysctls to use the same pattern. Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Acked-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit edf2e1d2019b2730d6076dbe4c040d37d7c10bbe Author: Eric Dumazet Date: Thu Jun 1 16:04:44 2023 +0000 net/ipv6: fix bool/int mismatch for skip_notify_on_dev_down skip_notify_on_dev_down ctl table expects this field to be an int (4 bytes), not a bool (1 byte). Because proc_dou8vec_minmax() was added in 5.13, this patch converts skip_notify_on_dev_down to an int. Following patch then converts the field to u8 and use proc_dou8vec_minmax(). Fixes: 7c6bb7d2faaf ("net/ipv6: Add knob to skip DELROUTE message on device down") Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Acked-by: Matthieu Baerts Signed-off-by: Jakub Kicinski commit 47d2804bc99ca873470df17c20737b28225a320d Author: Michal Luczaj Date: Fri Jun 2 16:32:50 2023 -0700 KVM: selftests: Add test for race in kvm_recalculate_apic_map() Keep switching between LAPIC_MODE_X2APIC and LAPIC_MODE_DISABLED during APIC map construction to hunt for TOCTOU bugs in KVM. KVM's optimized map recalc makes multiple passes over the list of vCPUs, and the calculations ignore vCPU's whose APIC is hardware-disabled, i.e. there's a window where toggling LAPIC_MODE_DISABLED is quite interesting. Signed-off-by: Michal Luczaj Co-developed-by: Sean Christopherson Link: https://lore.kernel.org/r/20230602233250.1014316-4-seanjc@google.com Signed-off-by: Sean Christopherson commit 4364b287982bd05bfafa461c80650c732001974b Author: Sean Christopherson Date: Fri Jun 2 16:32:48 2023 -0700 KVM: x86: Bail from kvm_recalculate_phys_map() if x2APIC ID is out-of-bounds Bail from kvm_recalculate_phys_map() and disable the optimized map if the target vCPU's x2APIC ID is out-of-bounds, i.e. if the vCPU was added and/or enabled its local APIC after the map was allocated. This fixes an out-of-bounds access bug in the !x2apic_format path where KVM would write beyond the end of phys_map. Check the x2APIC ID regardless of whether or not x2APIC is enabled, as KVM's hardcodes x2APIC ID to be the vCPU ID, i.e. it can't change, and the map allocation in kvm_recalculate_apic_map() doesn't check for x2APIC being enabled, i.e. the check won't get false postivies. Note, this also affects the x2apic_format path, which previously just ignored the "x2apic_id > new->max_apic_id" case. That too is arguably a bug fix, as ignoring the vCPU meant that KVM would not send interrupts to the vCPU until the next map recalculation. In practice, that "bug" is likely benign as a newly present vCPU/APIC would immediately trigger a recalc. But, there's no functional downside to disabling the map, and a future patch will gracefully handle the -E2BIG case by retrying instead of simply disabling the optimized map. Opportunistically add a sanity check on the xAPIC ID size, along with a comment explaining why the xAPIC ID is guaranteed to be "good". Reported-by: Michal Luczaj Fixes: 5b84b0291702 ("KVM: x86: Honor architectural behavior for aliased 8-bit APIC IDs") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230602233250.1014316-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 23509e92cf13ed22c17d160efac7d0f0602d0bcb Merge: b0fd1852bcc21 1022b67b89ce5 Author: Martin KaFai Lau Date: Fri Jun 2 16:22:13 2023 -0700 Merge branch 'Fix elem_size not being set for inner maps' Rhys Rustad-Elliott says: ==================== Commit d937bc3449fa ("bpf: make uniform use of array->elem_size everywhere in arraymap.c") changed array_map_gen_lookup to use array->elem_size instead of round_up(map->value_size, 8) as the element size when generating code to access a value in an array map. array->elem_size, however, is not set by bpf_map_meta_alloc when initializing an BPF_MAP_TYPE_ARRAY_OF_MAPS or BPF_MAP_TYPE_HASH_OF_MAPS. This results in array_map_gen_lookup incorrectly outputting code that always accesses index 0 in the array (as the index will be calculated via a multiplication with the element size, which is incorrectly set to 0). This patchset sets elem_size on the bpf_array object when allocating an array or hash of maps to fix this and adds a selftest that accesses an array map nested within a hash of maps at a nonzero index to prevent regressions. v1: https://lore.kernel.org/bpf/95b5da7c-ee52-3ecb-0a4e-f6a7a114f269@linux.dev/ Changelog: v1 -> v2: Address comments by Martin KaFai Lau: - Directly use inner_array->elem_size instead of using round_up - Move selftests to a new patch - Use ASSERT_* macros instead of CHECK and remove duration - Remove unnecessary usleep - Shorten selftest name ==================== Signed-off-by: Martin KaFai Lau commit 1022b67b89ce5b92906fec6447f02acf6ba018e4 Author: Rhys Rustad-Elliott Date: Fri Jun 2 19:02:24 2023 +0000 selftests/bpf: Add access_inner_map selftest Add a selftest that accesses a BPF_MAP_TYPE_ARRAY (at a nonzero index) nested within a BPF_MAP_TYPE_HASH_OF_MAPS to flex a previously buggy case. Signed-off-by: Rhys Rustad-Elliott Link: https://lore.kernel.org/r/20230602190110.47068-3-me@rhysre.net Signed-off-by: Martin KaFai Lau commit a37f2699c36a7f6606ba3300f243227856c5ad6b Author: Tom Lendacky Date: Wed May 17 11:26:41 2023 -0500 x86/head/64: Switch to KERNEL_CS as soon as new GDT is installed The call to startup_64_setup_env() will install a new GDT but does not actually switch to using the KERNEL_CS entry until returning from the function call. Commit bcce82908333 ("x86/sev: Detect/setup SEV/SME features earlier in boot") moved the call to sme_enable() earlier in the boot process and in between the call to startup_64_setup_env() and the switch to KERNEL_CS. An SEV-ES or an SEV-SNP guest will trigger #VC exceptions during the call to sme_enable() and if the CS pushed on the stack as part of the exception and used by IRETQ is not mapped by the new GDT, then problems occur. Today, the current CS when entering startup_64 is the kernel CS value because it was set up by the decompressor code, so no issue is seen. However, a recent patchset that looked to avoid using the legacy decompressor during an EFI boot exposed this bug. At entry to startup_64, the CS value is that of EFI and is not mapped in the new kernel GDT. So when a #VC exception occurs, the CS value used by IRETQ is not valid and the guest boot crashes. Fix this issue by moving the block that switches to the KERNEL_CS value to be done immediately after returning from startup_64_setup_env(). Fixes: bcce82908333 ("x86/sev: Detect/setup SEV/SME features earlier in boot") Signed-off-by: Tom Lendacky Signed-off-by: Dave Hansen Reviewed-by: Joerg Roedel Link: https://lore.kernel.org/all/6ff1f28af2829cc9aea357ebee285825f90a431f.1684340801.git.thomas.lendacky%40amd.com commit 8b703a49c9df5e74870381ad7ba9c85d8a74ed2c Author: Sean Christopherson Date: Thu Jun 1 18:19:19 2023 -0700 KVM: x86: Account fastpath-only VM-Exits in vCPU stats Increment vcpu->stat.exits when handling a fastpath VM-Exit without going through any part of the "slow" path. Not bumping the exits stat can result in wildly misleading exit counts, e.g. if the primary reason the guest is exiting is to program the TSC deadline timer. Fixes: 404d5d7bff0d ("KVM: X86: Introduce more exit_fastpath_completion enum values") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230602011920.787844-2-seanjc@google.com Signed-off-by: Sean Christopherson commit b2ce89978889b848a6dd652695dd1887e416f9d2 Author: Maciej S. Szmigiero Date: Fri May 19 13:26:18 2023 +0200 KVM: SVM: vNMI pending bit is V_NMI_PENDING_MASK not V_NMI_BLOCKING_MASK While testing Hyper-V enabled Windows Server 2019 guests on Zen4 hardware I noticed that with vCPU count large enough (> 16) they sometimes froze at boot. With vCPU count of 64 they never booted successfully - suggesting some kind of a race condition. Since adding "vnmi=0" module parameter made these guests boot successfully it was clear that the problem is most likely (v)NMI-related. Running kvm-unit-tests quickly showed failing NMI-related tests cases, like "multiple nmi" and "pending nmi" from apic-split, x2apic and xapic tests and the NMI parts of eventinj test. The issue was that once one NMI was being serviced no other NMI was allowed to be set pending (NMI limit = 0), which was traced to svm_is_vnmi_pending() wrongly testing for the "NMI blocked" flag rather than for the "NMI pending" flag. Fix this by testing for the right flag in svm_is_vnmi_pending(). Once this is done, the NMI-related kvm-unit-tests pass successfully and the Windows guest no longer freezes at boot. Fixes: fa4c027a7956 ("KVM: x86: Add support for SVM's Virtual NMI") Signed-off-by: Maciej S. Szmigiero Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/be4ca192eb0c1e69a210db3009ca984e6a54ae69.1684495380.git.maciej.szmigiero@oracle.com Signed-off-by: Sean Christopherson commit 817fa998362d6ea9fabd5e97af8e9e2eb5f0e6f2 Author: Sean Christopherson Date: Thu Jun 1 18:01:37 2023 -0700 KVM: x86/mmu: Grab memslot for correct address space in NX recovery worker Factor in the address space (non-SMM vs. SMM) of the target shadow page when recovering potential NX huge pages, otherwise KVM will retrieve the wrong memslot when zapping shadow pages that were created for SMM. The bug most visibly manifests as a WARN on the memslot being non-NULL, but the worst case scenario is that KVM could unaccount the shadow page without ensuring KVM won't install a huge page, i.e. if the non-SMM slot is being dirty logged, but the SMM slot is not. ------------[ cut here ]------------ WARNING: CPU: 1 PID: 3911 at arch/x86/kvm/mmu/mmu.c:7015 kvm_nx_huge_page_recovery_worker+0x38c/0x3d0 [kvm] CPU: 1 PID: 3911 Comm: kvm-nx-lpage-re RIP: 0010:kvm_nx_huge_page_recovery_worker+0x38c/0x3d0 [kvm] RSP: 0018:ffff99b284f0be68 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff99b284edd000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff9271397024e0 R08: 0000000000000000 R09: ffff927139702450 R10: 0000000000000000 R11: 0000000000000001 R12: ffff99b284f0be98 R13: 0000000000000000 R14: ffff9270991fcd80 R15: 0000000000000003 FS: 0000000000000000(0000) GS:ffff927f9f640000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f0aacad3ae0 CR3: 000000088fc2c005 CR4: 00000000003726e0 Call Trace: __pfx_kvm_nx_huge_page_recovery_worker+0x10/0x10 [kvm] kvm_vm_worker_thread+0x106/0x1c0 [kvm] kthread+0xd9/0x100 ret_from_fork+0x2c/0x50 ---[ end trace 0000000000000000 ]--- This bug was exposed by commit edbdb43fc96b ("KVM: x86: Preserve TDP MMU roots until they are explicitly invalidated"), which allowed KVM to retain SMM TDP MMU roots effectively indefinitely. Before commit edbdb43fc96b, KVM would zap all SMM TDP MMU roots and thus all SMM TDP MMU shadow pages once all vCPUs exited SMM, which made the window where this bug (recovering an SMM NX huge page) could be encountered quite tiny. To hit the bug, the NX recovery thread would have to run while at least one vCPU was in SMM. Most VMs typically only use SMM during boot, and so the problematic shadow pages were gone by the time the NX recovery thread ran. Now that KVM preserves TDP MMU roots until they are explicitly invalidated (e.g. by a memslot deletion), the window to trigger the bug is effectively never closed because most VMMs don't delete memslots after boot (except for a handful of special scenarios). Fixes: eb298605705a ("KVM: x86/mmu: Do not recover dirty-tracked NX Huge Pages") Reported-by: Fabio Coatti Closes: https://lore.kernel.org/all/CADpTngX9LESCdHVu_2mQkNGena_Ng2CphWNwsRGSMxzDsTjU2A@mail.gmail.com Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230602010137.784664-1-seanjc@google.com Signed-off-by: Sean Christopherson commit cba41bb78d70aad98d8e61e019fd48c561f7f396 Author: Rhys Rustad-Elliott Date: Fri Jun 2 19:02:02 2023 +0000 bpf: Fix elem_size not being set for inner maps Commit d937bc3449fa ("bpf: make uniform use of array->elem_size everywhere in arraymap.c") changed array_map_gen_lookup to use array->elem_size instead of round_up(map->value_size, 8) as the element size when generating code to access a value in an array map. array->elem_size, however, is not set by bpf_map_meta_alloc when initializing an BPF_MAP_TYPE_ARRAY_OF_MAPS or BPF_MAP_TYPE_HASH_OF_MAPS. This results in array_map_gen_lookup incorrectly outputting code that always accesses index 0 in the array (as the index will be calculated via a multiplication with the element size, which is incorrectly set to 0). Set elem_size on the bpf_array object when allocating an array or hash of maps to fix this. Fixes: d937bc3449fa ("bpf: make uniform use of array->elem_size everywhere in arraymap.c") Signed-off-by: Rhys Rustad-Elliott Link: https://lore.kernel.org/r/20230602190110.47068-2-me@rhysre.net Signed-off-by: Martin KaFai Lau commit 4ecd704a4c51fd95973fcc3a60444e0e24eb9439 Author: Lino Sanfilippo Date: Tue May 30 18:41:16 2023 +0200 tpm, tpm_tis: correct tpm_tis_flags enumeration values With commit 858e8b792d06 ("tpm, tpm_tis: Avoid cache incoherency in test for interrupts") bit accessor functions are used to access flags in tpm_tis_data->flags. However these functions expect bit numbers, while the flags are defined as bit masks in enum tpm_tis_flag. Fix this inconsistency by using numbers instead of masks also for the flags in the enum. Reported-by: Pavel Machek Fixes: 858e8b792d06 ("tpm, tpm_tis: Avoid cache incoherency in test for interrupts") Signed-off-by: Lino Sanfilippo Cc: stable@vger.kernel.org Reviewed-by: Pavel Machek Signed-off-by: Linus Torvalds commit 6d7d0603ca7c397a07efc88e314e38b4242a3a8d Merge: e0178b546d24f 3582e74599d37 Author: Linus Torvalds Date: Fri Jun 2 17:25:22 2023 -0400 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fix from Ted Ts'o: "Fix an ext4 regression which landed during the 6.4 merge window" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: Revert "ext4: remove ac->ac_found > sbi->s_mb_min_to_scan dead check in ext4_mb_check_limits" commit e0178b546d24f42a85f4d4da080fb801e0d49107 Merge: 5321d1b1afb9a b675df0257bb7 Author: Linus Torvalds Date: Fri Jun 2 17:16:19 2023 -0400 Merge tag 'for-6.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "One regression fix. The rewrite of scrub code in 6.4 broke device replace in zoned mode, some of the writes could happen out of order so this had to be adjusted for all cases" * tag 'for-6.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: zoned: fix dev-replace after the scrub rework commit 3582e74599d376bc18cae123045cd295360d885b Author: Ojaswin Mujoo Date: Tue May 30 18:03:39 2023 +0530 Revert "ext4: remove ac->ac_found > sbi->s_mb_min_to_scan dead check in ext4_mb_check_limits" This reverts commit 32c0869370194ae5ac9f9f501953ef693040f6a1. The reverted commit was intended to remove a dead check however it was observed that this check was actually being used to exit early instead of looping sbi->s_mb_max_to_scan times when we are able to find a free extent bigger than the goal extent. Due to this, a my performance tests (fsmark, parallel file writes in a highly fragmented FS) were seeing a 2x-3x regression. Example, the default value of the following variables is: sbi->s_mb_max_to_scan = 200 sbi->s_mb_min_to_scan = 10 In ext4_mb_check_limits() if we find an extent smaller than goal, then we return early and try again. This loop will go on until we have processed sbi->s_mb_max_to_scan(=200) number of free extents at which point we exit and just use whatever we have even if it is smaller than goal extent. Now, the regression comes when we find an extent bigger than goal. Earlier, in this case we would loop only sbi->s_mb_min_to_scan(=10) times and then just use the bigger extent. However with commit 32c08693 that check was removed and hence we would loop sbi->s_mb_max_to_scan(=200) times even though we have a big enough free extent to satisfy the request. The only time we would exit early would be when the free extent is *exactly* the size of our goal, which is pretty uncommon occurrence and so we would almost always end up looping 200 times. Hence, revert the commit by adding the check back to fix the regression. Also add a comment to outline this policy. Fixes: 32c086937019 ("ext4: remove ac->ac_found > sbi->s_mb_min_to_scan dead check in ext4_mb_check_limits") Signed-off-by: Ojaswin Mujoo Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Kemeng Shi Link: https://lore.kernel.org/r/ddcae9658e46880dfec2fb0aa61d01fb3353d202.1685449706.git.ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o commit 81f3affa19d6ab0c32aef46b053838219eef7e71 Author: Laurent Pinchart Date: Thu Apr 20 10:45:59 2023 +0100 media: uvcvideo: Don't expose unsupported formats to userspace When the uvcvideo driver encounters a format descriptor with an unknown format GUID, it creates a corresponding struct uvc_format instance with the fcc field set to 0. Since commit 50459f103edf ("media: uvcvideo: Remove format descriptions"), the driver relies on the V4L2 core to provide the format description string, which the V4L2 core can't do without a valid 4CC. This triggers a WARN_ON. As a format with a zero 4CC can't be selected, it is unusable for applications. Ignore the format completely without creating a uvc_format instance, which fixes the warning. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217252 Link: https://bugzilla.redhat.com/show_bug.cgi?id=2180107 Fixes: 50459f103edf ("media: uvcvideo: Remove format descriptions") Signed-off-by: Laurent Pinchart Reviewed-by: Ricardo Ribalda Signed-off-by: Mauro Carvalho Chehab commit 5321d1b1afb9a17302c6cec79f0cbf823eb0d3fc Merge: a746ca666a848 6966d7988c4fb Author: Linus Torvalds Date: Fri Jun 2 13:47:36 2023 -0400 Merge tag 'riscv-for-linus-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A build warning fix for BUILTIN_DTB=y - Hibernation support is hidden behind NONPORTABLE, as it depends on some undocumented early boot behavior and breaks on most platforms - A fix for relocatable kernels on systems with early boot errata - A fix to properly handle perf callchains for kernel tracepoints - A pair of fixes for NAPOT to avoid inconsistencies between PTEs and handle hardware that sets arbitrary A/D bits * tag 'riscv-for-linus-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Implement missing huge_ptep_get riscv: Fix huge_ptep_set_wrprotect when PTE is a NAPOT riscv: perf: Fix callchain parse error with kernel tracepoint events riscv: Fix relocatable kernels with early alternatives using -fno-pie RISC-V: mark hibernation as nonportable riscv: Fix unused variable warning when BUILTIN_DTB is set commit b37a356df86b9e56d30cef4673cba2621c7b7a1e Author: Tomi Valkeinen Date: Mon May 22 11:52:45 2023 +0100 media: v4l2-subdev: Fix missing kerneldoc for client_caps Add missing kernel doc for the new 'client_caps' field in struct v4l2_subdev_fh. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Fixes: f57fa2959244 ("media: v4l2-subdev: Add new ioctl for client capabilities") Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6970888d38be0a960673e3d203e8517a5c300ae5 Author: Hans Verkuil Date: Tue Apr 18 08:46:52 2023 +0100 media: staging: media: imx: initialize hs_settle to avoid warning Initialize hs_settle to 0 to avoid this compiler warning: imx8mq-mipi-csi2.c: In function 'imx8mq_mipi_csi_start_stream.part.0': imx8mq-mipi-csi2.c:91:55: warning: 'hs_settle' may be used uninitialized [-Wmaybe-uninitialized] 91 | #define GPR_CSI2_1_S_PRG_RXHS_SETTLE(x) (((x) & 0x3f) << 2) | ^~ imx8mq-mipi-csi2.c:357:13: note: 'hs_settle' was declared here 357 | u32 hs_settle; | ^~~~~~~~~ It's a false positive, but it is too complicated for the compiler to detect that. Signed-off-by: Hans Verkuil Reviewed-by: Martin Kepplinger Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3a4cdef13fa389ffe8f74c22581155688c827d18 Author: Vaishnav Achath Date: Fri Apr 21 11:04:30 2023 +0100 media: v4l2-mc: Drop subdev check in v4l2_create_fwnode_links_to_pad() While updating v4l2_create_fwnode_links_to_pad() to accept non-subdev sinks, the check is_media_entity_v4l2_subdev() was not removed which prevented the function from being used with non-subdev sinks, Drop the unnecessary check. Fixes: bd5a03bc5be8 ("media: Accept non-subdev sinks in v4l2_create_fwnode_links_to_pad()") Signed-off-by: Vaishnav Achath Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a746ca666a8486a04b6c0584966bfce16f6b1e1a Merge: 2b7497739fc8b c034203b6a9da Author: Linus Torvalds Date: Fri Jun 2 13:38:55 2023 -0400 Merge tag 'nfsd-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: - Two minor bug fixes * tag 'nfsd-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: nfsd: fix double fget() bug in __write_ports_addfd() nfsd: make a copy of struct iattr before calling notify_change commit 1c1bcf2d3ea061613119b534f57507c377df20f9 Author: Namjae Jeon Date: Wed May 31 17:59:32 2023 +0900 ksmbd: validate smb request protocol id This patch add the validation for smb request protocol id. If it is not one of the four ids(SMB1_PROTO_NUMBER, SMB2_PROTO_NUMBER, SMB2_TRANSFORM_PROTO_NUM, SMB2_COMPRESSION_TRANSFORM_ID), don't allow processing the request. And this will fix the following KASAN warning also. [ 13.905265] BUG: KASAN: slab-out-of-bounds in init_smb2_rsp_hdr+0x1b9/0x1f0 [ 13.905900] Read of size 16 at addr ffff888005fd2f34 by task kworker/0:2/44 ... [ 13.908553] Call Trace: [ 13.908793] [ 13.908995] dump_stack_lvl+0x33/0x50 [ 13.909369] print_report+0xcc/0x620 [ 13.910870] kasan_report+0xae/0xe0 [ 13.911519] kasan_check_range+0x35/0x1b0 [ 13.911796] init_smb2_rsp_hdr+0x1b9/0x1f0 [ 13.912492] handle_ksmbd_work+0xe5/0x820 Cc: stable@vger.kernel.org Reported-by: Chih-Yen Chang Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 368ba06881c395f1c9a7ba22203cf8d78b4addc0 Author: Namjae Jeon Date: Tue May 30 23:10:31 2023 +0900 ksmbd: check the validation of pdu_size in ksmbd_conn_handler_loop The length field of netbios header must be greater than the SMB header sizes(smb1 or smb2 header), otherwise the packet is an invalid SMB packet. If `pdu_size` is 0, ksmbd allocates a 4 bytes chunk to `conn->request_buf`. In the function `get_smb2_cmd_val` ksmbd will read cmd from `rcv_hdr->Command`, which is `conn->request_buf + 12`, causing the KASAN detector to print the following error message: [ 7.205018] BUG: KASAN: slab-out-of-bounds in get_smb2_cmd_val+0x45/0x60 [ 7.205423] Read of size 2 at addr ffff8880062d8b50 by task ksmbd:42632/248 ... [ 7.207125] [ 7.209191] get_smb2_cmd_val+0x45/0x60 [ 7.209426] ksmbd_conn_enqueue_request+0x3a/0x100 [ 7.209712] ksmbd_server_process_request+0x72/0x160 [ 7.210295] ksmbd_conn_handler_loop+0x30c/0x550 [ 7.212280] kthread+0x160/0x190 [ 7.212762] ret_from_fork+0x1f/0x30 [ 7.212981] Cc: stable@vger.kernel.org Reported-by: Chih-Yen Chang Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 25933573ef48f3586f559c2cac6c436c62dcf63f Author: Namjae Jeon Date: Tue May 30 21:42:34 2023 +0900 ksmbd: fix posix_acls and acls dereferencing possible ERR_PTR() Dan reported the following error message: fs/smb/server/smbacl.c:1296 smb_check_perm_dacl() error: 'posix_acls' dereferencing possible ERR_PTR() fs/smb/server/vfs.c:1323 ksmbd_vfs_make_xattr_posix_acl() error: 'posix_acls' dereferencing possible ERR_PTR() fs/smb/server/vfs.c:1830 ksmbd_vfs_inherit_posix_acl() error: 'acls' dereferencing possible ERR_PTR() __get_acl() returns a mix of error pointers and NULL. This change it with IS_ERR_OR_NULL(). Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org Reported-by: Dan Carpenter Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit fc6c6a3c324c1b3e93a03d0cfa3749c781f23de0 Author: Namjae Jeon Date: Sun May 28 00:23:41 2023 +0900 ksmbd: fix out-of-bound read in parse_lease_state() This bug is in parse_lease_state, and it is caused by the missing check of `struct create_context`. When the ksmbd traverses the create_contexts, it doesn't check if the field of `NameOffset` and `Next` is valid, The KASAN message is following: [ 6.664323] BUG: KASAN: slab-out-of-bounds in parse_lease_state+0x7d/0x280 [ 6.664738] Read of size 2 at addr ffff888005c08988 by task kworker/0:3/103 ... [ 6.666644] Call Trace: [ 6.666796] [ 6.666933] dump_stack_lvl+0x33/0x50 [ 6.667167] print_report+0xcc/0x620 [ 6.667903] kasan_report+0xae/0xe0 [ 6.668374] kasan_check_range+0x35/0x1b0 [ 6.668621] parse_lease_state+0x7d/0x280 [ 6.668868] smb2_open+0xbe8/0x4420 [ 6.675137] handle_ksmbd_work+0x282/0x820 Use smb2_find_context_vals() to find smb2 create request lease context. smb2_find_context_vals validate create context fields. Cc: stable@vger.kernel.org Reported-by: Chih-Yen Chang Tested-by: Chih-Yen Chang Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit f1a411873c85b642f13b01f21b534c2bab81fc1b Author: Namjae Jeon Date: Sun May 28 00:23:09 2023 +0900 ksmbd: fix out-of-bound read in deassemble_neg_contexts() The check in the beginning is `clen + sizeof(struct smb2_neg_context) <= len_of_ctxts`, but in the end of loop, `len_of_ctxts` will subtract `((clen + 7) & ~0x7) + sizeof(struct smb2_neg_context)`, which causes integer underflow when clen does the 8 alignment. We should use `(clen + 7) & ~0x7` in the check to avoid underflow from happening. Then there are some variables that need to be declared unsigned instead of signed. [ 11.671070] BUG: KASAN: slab-out-of-bounds in smb2_handle_negotiate+0x799/0x1610 [ 11.671533] Read of size 2 at addr ffff888005e86cf2 by task kworker/0:0/7 ... [ 11.673383] Call Trace: [ 11.673541] [ 11.673679] dump_stack_lvl+0x33/0x50 [ 11.673913] print_report+0xcc/0x620 [ 11.674671] kasan_report+0xae/0xe0 [ 11.675171] kasan_check_range+0x35/0x1b0 [ 11.675412] smb2_handle_negotiate+0x799/0x1610 [ 11.676217] ksmbd_smb_negotiate_common+0x526/0x770 [ 11.676795] handle_ksmbd_work+0x274/0x810 ... Cc: stable@vger.kernel.org Signed-off-by: Chih-Yen Chang Tested-by: Chih-Yen Chang Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit b0fd1852bcc21accca6260ef245356d5c141ff66 Author: KP Singh Date: Fri Jun 2 02:26:12 2023 +0200 bpf: Fix UAF in task local storage When task local storage was generalized for tracing programs, the bpf_task_local_storage callback was moved from a BPF LSM hook callback for security_task_free LSM hook to it's own callback. But a failure case in bad_fork_cleanup_security was missed which, when triggered, led to a dangling task owner pointer and a subsequent use-after-free. Move the bpf_task_storage_free to the very end of free_task to handle all failure cases. This issue was noticed when a BPF LSM program was attached to the task_alloc hook on a kernel with KASAN enabled. The program used bpf_task_storage_get to copy the task local storage from the current task to the new task being created. Fixes: a10787e6d58c ("bpf: Enable task local storage for tracing programs") Reported-by: Kuba Piecuch Signed-off-by: KP Singh Acked-by: Song Liu Link: https://lore.kernel.org/r/20230602002612.1117381-1-kpsingh@kernel.org Signed-off-by: Martin KaFai Lau commit 2b7497739fc8b4f411b70b78044a9fc21d34d18d Merge: 26d147799001e 2e45a49531fef Author: Linus Torvalds Date: Fri Jun 2 13:13:50 2023 -0400 Merge tag 'block-6.4-2023-06-02' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: "Just an NVMe pull request with (mostly) KATO fixes, a regression fix for zoned device revalidation, and a fix for an md raid5 regression" * tag 'block-6.4-2023-06-02' of git://git.kernel.dk/linux: nvme: fix the name of Zone Append for verbose logging nvme: improve handling of long keep alives nvme: check IO start time when deciding to defer KA nvme: double KA polling frequency to avoid KATO with TBKAS on nvme: fix miss command type check block: fix revalidate performance regression md/raid5: fix miscalculation of 'end_sector' in raid5_read_one_chunk() commit 26d147799001edfe479c0b015ba1cb038def5ae7 Merge: 921bdc72a0d68 4ea0bf4b98d66 Author: Linus Torvalds Date: Fri Jun 2 13:08:27 2023 -0400 Merge tag 'io_uring-6.4-2023-06-02' of git://git.kernel.dk/linux Pull io_uring fix from Jens Axboe: "Just a single revert in here, removing the warning on the epoll ctl opcode. We originally deprecated this a few releases ago, but I've since had two people report that it's being used. Which isn't the biggest deal, obviously this is why we out in the deprecation notice in the first place, but it also means that we should just kill this warning again and abandon the deprecation plans. Since it's only a few handfuls of code to support epoll ctl, not worth going any further with this imho" * tag 'io_uring-6.4-2023-06-02' of git://git.kernel.dk/linux: io_uring: undeprecate epoll_ctl support commit c3d03e8e35e005e1a614e51bb59053eeb5857f76 Author: Roberto Sassu Date: Thu Dec 8 10:56:46 2022 +0100 KEYS: asymmetric: Copy sig and digest in public_key_verify_signature() Commit ac4e97abce9b8 ("scatterlist: sg_set_buf() argument must be in linear mapping") checks that both the signature and the digest reside in the linear mapping area. However, more recently commit ba14a194a434c ("fork: Add generic vmalloced stack support") made it possible to move the stack in the vmalloc area, which is not contiguous, and thus not suitable for sg_set_buf() which needs adjacent pages. Always make a copy of the signature and digest in the same buffer used to store the key and its parameters, and pass them to sg_init_one(). Prefer it to conditionally doing the copy if necessary, to keep the code simple. The buffer allocated with kmalloc() is in the linear mapping area. Cc: stable@vger.kernel.org # 4.9.x Fixes: ba14a194a434 ("fork: Add generic vmalloced stack support") Link: https://lore.kernel.org/linux-integrity/Y4pIpxbjBdajymBJ@sol.localdomain/ Suggested-by: Eric Biggers Signed-off-by: Roberto Sassu Reviewed-by: Eric Biggers Tested-by: Stefan Berger commit 921bdc72a0d68977092d6a64855a1b8967acc1d9 Merge: 7bdecc2672271 0b5d5c436a5c5 Author: Linus Torvalds Date: Fri Jun 2 08:35:13 2023 -0400 Merge tag 'mmc-v6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Fix pwrseq for WILC1000/WILC3000 SDIO card MMC host: - vub300: Fix invalid response handling" * tag 'mmc-v6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: pwrseq: sd8787: Fix WILC CHIP_EN and RESETN toggling order mmc: vub300: fix invalid response handling commit 7bdecc26722710bad806bc583a92881a2fa51c73 Merge: e99a74673a196 b3fc95709c54f Author: Linus Torvalds Date: Fri Jun 2 08:21:18 2023 -0400 Merge tag 'iommu-fixes-v6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: "AMD IOMMU fixes: - Fix domain type and size checks - IOTLB flush fix for invalidating ranges - Guest IRQ handling fixes and GALOG overflow fix Rockchip IOMMU: - Error handling fix Mediatek IOMMU: - IOTLB flushing fix Renesas IOMMU: - Fix Kconfig dependencies to avoid build errors on RiscV" * tag 'iommu-fixes-v6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/mediatek: Flush IOTLB completely only if domain has been attached iommu/amd/pgtbl_v2: Fix domain max address iommu/amd: Fix domain flush size when syncing iotlb iommu/amd: Add missing domain type checks iommu/amd: Fix up merge conflict resolution iommu/amd: Handle GALog overflows iommu/amd: Don't block updates to GATag if guest mode is on iommu/rockchip: Fix unwind goto issue iommu: Make IPMMU_VMSA dependencies more strict commit 0e2aba694866b451db0932a6706683c48379134c Author: Jisheng Zhang Date: Wed May 24 21:13:05 2023 +0800 arm64: mm: pass original fault address to handle_mm_fault() in PER_VMA_LOCK block When reading the arm64's PER_VMA_LOCK support code, I found a bit difference between arm64 and other arch when calling handle_mm_fault() during VMA lock-based page fault handling: the fault address is masked before passing to handle_mm_fault(). This is also different from the usage in mmap_lock-based handling. I think we need to pass the original fault address to handle_mm_fault() as we did in commit 84c5e23edecd ("arm64: mm: Pass original fault address to handle_mm_fault()"). If we go through the code path further, we can find that the "masked" fault address can cause mismatched fault address between perf sw major/minor page fault sw event and perf page fault sw event: do_page_fault perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, ..., addr) // orig addr handle_mm_fault mm_account_fault perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, ...) // masked addr Fixes: cd7f176aea5f ("arm64/mm: try VMA lock-based page fault handling first") Signed-off-by: Jisheng Zhang Reviewed-by: Suren Baghdasaryan Reviewed-by: Anshuman Khandual Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20230524131305.2808-1-jszhang@kernel.org Signed-off-by: Will Deacon commit f3c3762178fad5cf5dc108fb061ba010818323b4 Author: Catalin Marinas Date: Fri May 19 18:14:40 2023 +0100 arm64: Remove the ARCH_FORCE_MAX_ORDER config input prompt Commit 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER") dropped the ranges from the config entry and introduced an EXPERT condition on the input prompt instead. However, starting with defconfig (ARCH_FORCE_MAX_ORDER of 10) and setting ARM64_64K_PAGES together with EXPERT leaves MAX_ORDER 10 which fails to build in this configuration. Drop the input prompt for ARCH_FORCE_MAX_ORDER completely so that it's no longer configurable. People requiring a higher MAX_ORDER should send a patch changing the default, together with proper justification. Fixes: 34affcd7577a ("arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER") Signed-off-by: Catalin Marinas Reported-by: Marc Zyngier Cc: Will Deacon Cc: Mike Rapoport Cc: Andrew Morton Cc: Justin M. Forbes Reviewed-by: Anshuman Khandual Acked-by: Marc Zyngier Acked-by: Mike Rapoport (IBM) Link: https://lore.kernel.org/r/20230519171440.1941213-1-catalin.marinas@arm.com Signed-off-by: Will Deacon commit 32cf0046a652116d6a216d575f3049a9ff9dd80d Author: Chancel Liu Date: Tue May 30 18:30:12 2023 +0800 ASoC: fsl_sai: Enable BCI bit if SAI works on synchronous mode with BYP asserted There's an issue on SAI synchronous mode that TX/RX side can't get BCLK from RX/TX it sync with if BYP bit is asserted. It's a workaround to fix it that enable SION of IOMUX pad control and assert BCI. For example if TX sync with RX which means both TX and RX are using clk form RX and BYP=1. TX can get BCLK only if the following two conditions are valid: 1. SION of RX BCLK IOMUX pad is set to 1 2. BCI of TX is set to 1 Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20230530103012.3448838-1-chancel.liu@nxp.com Signed-off-by: Mark Brown commit 635071f5fee31550e921644b2becc42b3ff1036c Author: Robert Hancock Date: Thu Jun 1 19:19:35 2023 -0600 ASoC: simple-card-utils: fix PCM constraint error check The code in asoc_simple_startup was treating any non-zero return from snd_pcm_hw_constraint_minmax as an error, when this can return 1 in some normal cases and only negative values indicate an error. When this happened, it caused asoc_simple_startup to disable the clocks it just enabled and return 1, which was not treated as an error by the calling code which only checks for negative return values. Then when the PCM is eventually shut down, it causes the clock framework to complain about disabling clocks that were not enabled. Fix the check for snd_pcm_hw_constraint_minmax return value to only treat negative values as an error. Fixes: 5ca2ab459817 ("ASoC: simple-card-utils: Add new system-clock-fixed flag") Signed-off-by: Robert Hancock Link: https://lore.kernel.org/r/20230602011936.231931-1-robert.hancock@calian.com Signed-off-by: Mark Brown commit e99a74673a19631d4a23c7e1fe2f21c55471a5d1 Merge: 1419c3ba31446 b6ccf213d95e9 Author: Linus Torvalds Date: Fri Jun 2 07:42:22 2023 -0400 Merge tag 'drm-fixes-2023-06-02' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Quiet enough week, though the misc fixes tree didn't get to me when I was sending this, so maybe it'll be a bit bigger next week, just one i915 fix and some scattered amdgpu fixes: amdgpu: - Fix mclk and fclk output ordering on some APUs - Fix display regression with 5K VRR - VCN, JPEG spurious interrupt warning fixes - Fix SI DPM on some ARM64 platforms - Fix missing TMZ enablement on GC 11.0.1 i915: - Fix for OA reporting to allow detecting non-power-of-two reports" * tag 'drm-fixes-2023-06-02' of git://anongit.freedesktop.org/drm/drm: drm/i915/perf: Clear out entire reports after reading if not power of 2 size drm/amdgpu: enable tmz by default for GC 11.0.1 drm/amd/pm: resolve reboot exception for si oland drm/amdgpu: add RAS POISON interrupt funcs for jpeg_v4_0 drm/amdgpu: add RAS POISON interrupt funcs for jpeg_v2_6 drm/amdgpu: separate ras irq from jpeg instance irq for UVD_POISON drm/amdgpu: add RAS POISON interrupt funcs for vcn_v4_0 drm/amdgpu: add RAS POISON interrupt funcs for vcn_v2_6 drm/amdgpu: separate ras irq from vcn instance irq for UVD_POISON Revert "drm/amd/display: Do not set drr on pipe commit" Revert "drm/amd/display: Block optimize on consecutive FAMS enables" drm/amd/pm: reverse mclk and fclk clocks levels for renoir drm/amd/pm: reverse mclk and fclk clocks levels for vangogh drm/amd/pm: reverse mclk and fclk clocks levels for yellow carp drm/amd/pm: reverse mclk clocks levels for SMU v13.0.5 drm/amd/pm: reverse mclk and fclk clocks levels for SMU v13.0.4 commit 1419c3ba31446feecb728f49820ff2730d6deaed Merge: c43a6ff9f93f2 42c4e97e06a83 Author: Linus Torvalds Date: Fri Jun 2 07:30:27 2023 -0400 Merge tag 'selinux-pr-20230601' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux fix from Paul Moore: "A small SELinux Makefile fix to resolve a problem seen when building the kernel with older versions of make. The fix is pretty trivial and effectively reverts a patch that was merged during the last merge window" * tag 'selinux-pr-20230601' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: don't use make's grouped targets feature yet commit 37a826d86ff746c4eac8bd3415af19f3c9598206 Author: Arnd Bergmann Date: Thu Jun 1 23:31:04 2023 +0200 net: dsa: qca8k: add CONFIG_LEDS_TRIGGERS dependency Without LED triggers, the driver now fails to build: drivers/net/dsa/qca/qca8k-leds.c: In function 'qca8k_parse_port_leds': drivers/net/dsa/qca/qca8k-leds.c:403:31: error: 'struct led_classdev' has no member named 'hw_control_is_supported' 403 | port_led->cdev.hw_control_is_supported = qca8k_cled_hw_control_is_supported; | ^ There is a mix of 'depends on' and 'select' for LEDS_TRIGGERS, so it's not clear what we should use here, but in general using 'depends on' causes fewer problems, so use that. Fixes: e0256648c831a ("net: dsa: qca8k: implement hw_control ops") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit f1832e2b5e498e258b090af3b065b85cf8cc5161 Author: Jerry Meng Date: Wed May 31 11:51:16 2023 +0800 USB: serial: option: add Quectel EM061KGL series Add support for Quectel EM061KGL series which are based on Qualcomm SDX12 chip: EM061KGL_LTA(0x2c7c / 0x0123): MBIM + GNSS + DIAG + NMEA + AT + QDSS + DPL EM061KGL_LMS(0x2c7c / 0x0124): MBIM + GNSS + DIAG + NMEA + AT + QDSS + DPL EM061KGL_LWW(0x2c7c / 0x6008): MBIM + GNSS + DIAG + NMEA + AT + QDSS + DPL EM061KGL_LCN(0x2c7c / 0x6009): MBIM + GNSS + DIAG + NMEA + AT + QDSS + DPL Above products use the exact same interface layout and option driver is for interfaces DIAG, NMEA and AT. T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 5 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=6008 Rev= 5.04 S: Manufacturer=Quectel S: Product=Quectel EM061K-GL S: SerialNumber=f6fa08b6 C:* #Ifs= 8 Cfg#= 1 Atr=a0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00 I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=82(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) E: Ad=8f(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Jerry Meng Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit f93b30e50a81a16cefa262b68bde5c4096ea9235 Author: Jiasheng Jiang Date: Thu Jun 1 11:30:02 2023 +0800 net: systemport: Replace platform_get_irq with platform_get_irq_optional Replace platform_get_irq with platform_get_irq_optional because wol_irq is optional. Signed-off-by: Jiasheng Jiang Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e209fee4118fe9a449d4d805361eb2de6796be39 Author: Akihiro Suda Date: Thu Jun 1 12:13:05 2023 +0900 net/ipv4: ping_group_range: allow GID from 2147483648 to 4294967294 With this commit, all the GIDs ("0 4294967294") can be written to the "net.ipv4.ping_group_range" sysctl. Note that 4294967295 (0xffffffff) is an invalid GID (see gid_valid() in include/linux/uidgid.h), and an attempt to register this number will cause -EINVAL. Prior to this commit, only up to GID 2147483647 could be covered. Documentation/networking/ip-sysctl.rst had "0 4294967295" as an example value, but this example was wrong and causing -EINVAL. Fixes: c319b4d76b9e ("net: ipv4: add IPPROTO_ICMP socket kind") Co-developed-by: Kuniyuki Iwashima Signed-off-by: Kuniyuki Iwashima Signed-off-by: Akihiro Suda Signed-off-by: David S. Miller commit 5a59a58ec25d44f853c26bdbfda47d73b3067435 Author: Alexander Sverdlin Date: Wed May 31 16:38:26 2023 +0200 net: dsa: lan9303: allow vid != 0 in port_fdb_{add|del} methods LAN9303 doesn't associate FDB (ALR) entries with VLANs, it has just one global Address Logic Resolution table [1]. Ignore VID in port_fdb_{add|del} methods, go on with the global table. This is the same semantics as hellcreek or RZ/N1 implement. Visible symptoms: LAN9303_MDIO 5b050000.ethernet-1:00: port 2 failed to delete 00:xx:xx:xx:xx:cf vid 1 from fdb: -2 LAN9303_MDIO 5b050000.ethernet-1:00: port 2 failed to add 00:xx:xx:xx:xx:cf vid 1 to fdb: -95 [1] https://ww1.microchip.com/downloads/en/DeviceDoc/00002308A.pdf Fixes: 0620427ea0d6 ("net: dsa: lan9303: Add fdb/mdb manipulation") Signed-off-by: Alexander Sverdlin Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20230531143826.477267-1-alexander.sverdlin@siemens.com Signed-off-by: Jakub Kicinski commit ed779fe4c9b5a20b4ab4fd6f3e19807445bb78c7 Author: Qingfang DENG Date: Thu Jun 1 09:54:32 2023 +0800 neighbour: fix unaligned access to pneigh_entry After the blamed commit, the member key is longer 4-byte aligned. On platforms that do not support unaligned access, e.g., MIPS32R2 with unaligned_action set to 1, this will trigger a crash when accessing an IPv6 pneigh_entry, as the key is cast to an in6_addr pointer. Change the type of the key to u32 to make it aligned. Fixes: 62dd93181aaa ("[IPV6] NDISC: Set per-entry is_router flag in Proxy NA.") Signed-off-by: Qingfang DENG Link: https://lore.kernel.org/r/20230601015432.159066-1-dqfext@gmail.com Signed-off-by: Jakub Kicinski commit 6966d7988c4fb6af3e395868e9800c07f9e98a30 Author: Alexandre Ghiti Date: Fri Apr 28 14:01:20 2023 +0200 riscv: Implement missing huge_ptep_get huge_ptep_get must be reimplemented in order to go through all the PTEs of a NAPOT region: this is needed because the HW can update the A/D bits of any of the PTE that constitutes the NAPOT region. Fixes: 82a1a1f3bfb6 ("riscv: mm: support Svnapot in hugetlb page") Signed-off-by: Alexandre Ghiti Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230428120120.21620-2-alexghiti@rivosinc.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 835e5ac3f98e78eca5c512bd48bd1880b90c4eb1 Author: Alexandre Ghiti Date: Fri Apr 28 14:01:19 2023 +0200 riscv: Fix huge_ptep_set_wrprotect when PTE is a NAPOT We need to avoid inconsistencies across the PTEs that form a NAPOT region, so when we write protect such a region, we should clear and flush all the PTEs to make sure that any of those PTEs is not cached which would result in such inconsistencies (arm64 does the same). Fixes: 82a1a1f3bfb6 ("riscv: mm: support Svnapot in hugetlb page") Signed-off-by: Alexandre Ghiti Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230428120120.21620-1-alexghiti@rivosinc.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit c43a6ff9f93f230cc0f448ebb5d86d277ad7771e Merge: 792fc92140366 fadb74f9f2f60 Author: Linus Torvalds Date: Thu Jun 1 20:48:16 2023 -0400 Merge tag 'modules-6.4-rc5-second-pull' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull modules fix from Luis Chamberlain: "A zstd fix by lucas as he tested zstd decompression support" * tag 'modules-6.4-rc5-second-pull' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: module/decompress: Fix error checking on zstd decompression commit 792fc9214036633f2c26fe551cd26d5d7abdecfb Merge: 9e87b63ed37e2 36e4fc57fc161 Author: Linus Torvalds Date: Thu Jun 1 20:43:11 2023 -0400 Merge tag 'efi-fixes-for-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI fixes from Ard Biesheuvel: "A few minor fixes for EFI, one of which fixes the reported boot regression when booting x86 kernels using the BIOS based loader built into the hypervisor framework on macOS. - fix harmless warning in zboot code on 'make clean' - add some missing prototypes - fix boot regressions triggered by PE/COFF header image minor version bump" * tag 'efi-fixes-for-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi: Bump stub image version for macOS HVF compatibility efi: fix missing prototype warnings efi/libstub: zboot: Avoid eager evaluation of objcopy flags commit b6ccf213d95e9373ac1f7fbcb5de3b52eec0ddb3 Merge: f9e94d6c85e90 62fe398761cd0 Author: Dave Airlie Date: Fri Jun 2 10:33:29 2023 +1000 Merge tag 'drm-intel-fixes-2023-06-01' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix for OA reporting to allow detecting non-power-of-two reports Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZHimf55x/DyXYar1@jlahtine-mobl.ger.corp.intel.com commit f9e94d6c85e9083466fef9a1ccd5b6b46f13af32 Merge: 7877cb91f1081 663b930e24842 Author: Dave Airlie Date: Fri Jun 2 09:52:47 2023 +1000 Merge tag 'amd-drm-fixes-6.4-2023-05-31' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.4-2023-05-31: amdgpu: - Fix mclk and fclk output ordering on some APUs - Fix display regression with 5K VRR - VCN, JPEG spurious interrupt warning fixes - Fix SI DPM on some ARM64 platforms - Fix missing TMZ enablement on GC 11.0.1 Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230601033846.7628-1-alexander.deucher@amd.com commit 18e7e3e4217083a682e2c7282011c70c8a1ba070 Author: Kamal Heib Date: Mon May 29 11:35:26 2023 -0400 RDMA/bnxt_re: Fix reporting active_{speed,width} attributes After commit 6d758147c7b8 ("RDMA/bnxt_re: Use auxiliary driver interface") the active_{speed, width} attributes are reported incorrectly, This is happening because ib_get_eth_speed() is called only once from bnxt_re_ib_init() - Fix this issue by calling ib_get_eth_speed() from bnxt_re_query_port(). Fixes: 6d758147c7b8 ("RDMA/bnxt_re: Use auxiliary driver interface") Link: https://lore.kernel.org/r/20230529153525.87254-1-kheib@redhat.com Signed-off-by: Kamal Heib Acked-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 9e87b63ed37e202c77aa17d4112da6ae0c7c097c Merge: b0e78154c0876 d19663edc91de Author: Linus Torvalds Date: Thu Jun 1 17:50:22 2023 -0400 Merge tag 'fbdev-for-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev fixes from Helge Deller: "Most notable is a fix for a null-ptr-deref in fbcon's soft_cursor function which was found by syzbot. - Fix null-ptr-deref in soft_cursor - various remove callback conversions - error path fixes in imsttfb" * tag 'fbdev-for-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: bw2: Convert to platform remove callback returning void fbdev: broadsheetfb: Convert to platform remove callback returning void fbdev: au1200fb: Convert to platform remove callback returning void fbdev: au1100fb: Convert to platform remove callback returning void fbdev: arcfb: Convert to platform remove callback returning void fbdev: au1100fb: Drop if with an always false condition fbcon: Fix null-ptr-deref in soft_cursor fbdev: imsttfb: Fix error path of imsttfb_probe() fbdev: imsttfb: Release framebuffer and dealloc cmap on error path fbdev: matroxfb ssd1307fb: Switch i2c drivers back to use .probe() commit fadb74f9f2f609238070c7ca1b04933dc9400e4a Author: Lucas De Marchi Date: Thu Jun 1 14:23:31 2023 -0700 module/decompress: Fix error checking on zstd decompression While implementing support for in-kernel decompression in kmod, finit_module() was returning a very suspicious value: finit_module(3, "", MODULE_INIT_COMPRESSED_FILE) = 18446744072717407296 It turns out the check for module_get_next_page() failing is wrong, and hence the decompression was not really taking place. Invert the condition to fix it. Fixes: 169a58ad824d ("module/decompress: Support zstd in-kernel decompression") Cc: stable@kernel.org Cc: Luis Chamberlain Cc: Dmitry Torokhov Cc: Stephen Boyd Signed-off-by: Lucas De Marchi Signed-off-by: Luis Chamberlain commit b0e78154c0876a46ec874615262bd3ea58b80788 Merge: 714069daa5d34 c4d28e30a8d0b Author: Linus Torvalds Date: Thu Jun 1 17:35:17 2023 -0400 Merge tag 'mtd/fixes-for-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd fixes from Miquel Raynal: "MTD core: - MAINTAINERS: Add Michal as reviewer instead of Naga - mtdchar: Mark bits of ioctl handler noinline NAND controller drivers: - marvell: - Don't set the NAND frequency select - Ensure timing values are written - ingenic: Fix empty stub helper definitions SPI-NOR core: - Fix divide by zero for spi-nor-generic flashes SPI-NOR manufacturer driver: - spansion: make sure local struct does not contain garbage" * tag 'mtd/fixes-for-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: rawnand: marvell: don't set the NAND frequency select mtd: rawnand: marvell: ensure timing values are written mtdchar: mark bits of ioctl handler noinline MAINTAINERS: Add myself as reviewer instead of Naga mtd: spi-nor: Fix divide by zero for spi-nor-generic flashes mtd: rawnand: ingenic: fix empty stub helper definitions mtd: spi-nor: spansion: make sure local struct does not contain garbage commit 714069daa5d345483578e2ff77fb6f06f4dcba6a Merge: f9010dbdce911 a451b8eb96e52 Author: Linus Torvalds Date: Thu Jun 1 17:29:18 2023 -0400 Merge tag 'net-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Happy Wear a Dress Day. Fairly standard-sized batch of fixes, accounting for the lack of sub-tree submissions this week. The mlx5 IRQ fixes are notable, people were complaining about that. No fires burning. Current release - regressions: - eth: mlx5e: - multiple fixes for dynamic IRQ allocation - prevent encap offload when neigh update is running - eth: mana: fix perf regression: remove rx_cqes, tx_cqes counters Current release - new code bugs: - eth: mlx5e: DR, add missing mutex init/destroy in pattern manager Previous releases - always broken: - tcp: deny tcp_disconnect() when threads are waiting - sched: prevent ingress Qdiscs from getting installed in random locations in the hierarchy and moving around - sched: flower: fix possible OOB write in fl_set_geneve_opt() - netlink: fix NETLINK_LIST_MEMBERSHIPS length report - udp6: fix race condition in udp6_sendmsg & connect - tcp: fix mishandling when the sack compression is deferred - rtnetlink: validate link attributes set at creation time - mptcp: fix connect timeout handling - eth: stmmac: fix call trace when stmmac_xdp_xmit() is invoked - eth: amd-xgbe: fix the false linkup in xgbe_phy_status - eth: mlx5e: - fix corner cases in internal buffer configuration - drain health before unregistering devlink - usb: qmi_wwan: set DTR quirk for BroadMobi BM818 Misc: - tcp: return user_mss for TCP_MAXSEG in CLOSE/LISTEN state if user_mss set" * tag 'net-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (71 commits) mptcp: fix active subflow finalization mptcp: add annotations around sk->sk_shutdown accesses mptcp: fix data race around msk->first access mptcp: consolidate passive msk socket initialization mptcp: add annotations around msk->subflow accesses mptcp: fix connect timeout handling rtnetlink: add the missing IFLA_GRO_ tb check in validate_linkmsg rtnetlink: move IFLA_GSO_ tb check to validate_linkmsg rtnetlink: call validate_linkmsg in rtnl_create_link ice: recycle/free all of the fragments from multi-buffer frame net: phy: mxl-gpy: extend interrupt fix to all impacted variants net: renesas: rswitch: Fix return value in error path of xmit net: dsa: mv88e6xxx: Increase wait after reset deactivation net: ipa: Use correct value for IPA_STATUS_SIZE tcp: fix mishandling when the sack compression is deferred. net/sched: flower: fix possible OOB write in fl_set_geneve_opt() sfc: fix error unwinds in TC offload net/mlx5: Read embedded cpu after init bit cleared net/mlx5e: Fix error handling in mlx5e_refresh_tirs net/mlx5: Ensure af_desc.mask is properly initialized ... commit f9010dbdce911ee1f1af1398a24b1f9f992e0080 Author: Mike Christie Date: Thu Jun 1 13:32:32 2023 -0500 fork, vhost: Use CLONE_THREAD to fix freezer/ps regression When switching from kthreads to vhost_tasks two bugs were added: 1. The vhost worker tasks's now show up as processes so scripts doing ps or ps a would not incorrectly detect the vhost task as another process. 2. kthreads disabled freeze by setting PF_NOFREEZE, but vhost tasks's didn't disable or add support for them. To fix both bugs, this switches the vhost task to be thread in the process that does the VHOST_SET_OWNER ioctl, and has vhost_worker call get_signal to support SIGKILL/SIGSTOP and freeze signals. Note that SIGKILL/STOP support is required because CLONE_THREAD requires CLONE_SIGHAND which requires those 2 signals to be supported. This is a modified version of the patch written by Mike Christie which was a modified version of patch originally written by Linus. Much of what depended upon PF_IO_WORKER now depends on PF_USER_WORKER. Including ignoring signals, setting up the register state, and having get_signal return instead of calling do_group_exit. Tidied up the vhost_task abstraction so that the definition of vhost_task only needs to be visible inside of vhost_task.c. Making it easier to review the code and tell what needs to be done where. As part of this the main loop has been moved from vhost_worker into vhost_task_fn. vhost_worker now returns true if work was done. The main loop has been updated to call get_signal which handles SIGSTOP, freezing, and collects the message that tells the thread to exit as part of process exit. This collection clears __fatal_signal_pending. This collection is not guaranteed to clear signal_pending() so clear that explicitly so the schedule() sleeps. For now the vhost thread continues to exist and run work until the last file descriptor is closed and the release function is called as part of freeing struct file. To avoid hangs in the coredump rendezvous and when killing threads in a multi-threaded exec. The coredump code and de_thread have been modified to ignore vhost threads. Remvoing the special case for exec appears to require teaching vhost_dev_flush how to directly complete transactions in case the vhost thread is no longer running. Removing the special case for coredump rendezvous requires either the above fix needed for exec or moving the coredump rendezvous into get_signal. Fixes: 6e890c5d5021 ("vhost: use vhost_tasks for worker threads") Signed-off-by: Eric W. Biederman Co-developed-by: Mike Christie Signed-off-by: Mike Christie Acked-by: Michael S. Tsirkin Signed-off-by: Linus Torvalds commit 403e97d6ab2cb6fd0ac1ff968cd7b691771f1613 Author: Francesco Dolcini Date: Wed May 31 13:10:38 2023 +0200 dt-bindings: serial: 8250_omap: add rs485-rts-active-high Add rs485-rts-active-high property, this was removed by mistake. In general we just use rs485-rts-active-low property, however the OMAP UART for legacy reason uses the -high one. Fixes: 767d3467eb60 ("dt-bindings: serial: 8250_omap: drop rs485 properties") Closes: https://lore.kernel.org/all/ZGefR4mTHHo1iQ7H@francesco-nb.int.toradex.com/ Signed-off-by: Francesco Dolcini Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230531111038.6302-1-francesco@dolcini.it Signed-off-by: Greg Kroah-Hartman commit 42c4e97e06a839b07d834f640a10911ad84ec8b3 Author: Paul Moore Date: Thu Jun 1 10:21:21 2023 -0400 selinux: don't use make's grouped targets feature yet The Linux Kernel currently only requires make v3.82 while the grouped target functionality requires make v4.3. Removed the grouped target introduced in 4ce1f694eb5d ("selinux: ensure av_permissions.h is built when needed") as well as the multiple header file targets in the make rule. This effectively reverts the problem commit. We will revisit this change when make >= 4.3 is required by the rest of the kernel. Cc: stable@vger.kernel.org Fixes: 4ce1f694eb5d ("selinux: ensure av_permissions.h is built when needed") Reported-by: Erwan Velu Reported-by: Luiz Capitulino Tested-by: Luiz Capitulino Signed-off-by: Paul Moore commit b00683422fd79dd07c9b75efdce1660e5e19150e Author: Bob Pearson Date: Wed May 17 16:15:10 2023 -0500 RDMA/rxe: Fix ref count error in check_rkey() There is a reference count error in error path code and a potential race in check_rkey() in rxe_resp.c. When looking up the rkey for a memory window the reference to the mw from rxe_lookup_mw() is dropped before a reference is taken on the mr referenced by the mw. If the mr is destroyed immediately after the call to rxe_put(mw) the mr pointer is unprotected and may end up pointing at freed memory. The rxe_get(mr) call should take place before the rxe_put(mw) call. All errors in check_rkey() call rxe_put(mw) if mw is not NULL but it was already called after the above. The mw pointer should be set to NULL after the rxe_put(mw) call to prevent this from happening. Fixes: cdd0b85675ae ("RDMA/rxe: Implement memory access through MWs") Link: https://lore.kernel.org/r/20230517211509.1819998-1-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 9a3763e87379c97a78b7c6c6f40720b1e877174f Author: Bob Pearson Date: Wed May 17 12:22:42 2023 -0500 RDMA/rxe: Fix packet length checks In rxe_net.c a received packet, from udp or loopback, is passed to rxe_rcv() in rxe_recv.c as a udp packet. I.e. skb->data is pointing at the udp header. But rxe_rcv() makes length checks to verify the packet is long enough to hold the roce headers as if it were a roce packet. I.e. skb->data pointing at the bth header. A runt packet would appear to have 8 more bytes than it actually does which may lead to incorrect behavior. This patch calls skb_pull() to adjust the skb to point at the bth header before calling rxe_rcv() which fixes this error. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20230517172242.1806340-1-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit a451b8eb96e521ebabc9c53fefa2bcfad6f80f25 Merge: 66dd101487305 bbfa4b58997e3 Author: Jakub Kicinski Date: Thu Jun 1 10:15:43 2023 -0700 Merge tag 'mlx5-fixes-2023-05-31' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2023-05-31 This series provides bug fixes to mlx5 driver. * tag 'mlx5-fixes-2023-05-31' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: Read embedded cpu after init bit cleared net/mlx5e: Fix error handling in mlx5e_refresh_tirs net/mlx5: Ensure af_desc.mask is properly initialized net/mlx5: Fix setting of irq->map.index for static IRQ case net/mlx5: Remove rmap also in case dynamic MSIX not supported ==================== Link: https://lore.kernel.org/r/20230601031051.131529-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 2e45a49531fef55f4abbd6738c052545f53f43d4 Merge: 47fe1c3064c6b 856303797724d Author: Jens Axboe Date: Thu Jun 1 11:12:46 2023 -0600 Merge tag 'nvme-6.4-2023-06-01' of git://git.infradead.org/nvme into block-6.4 Pull NVMe fixes from Keith: "nvme fixes for Linux 6.4 - Fixes for spurious Keep Alive timeouts (Uday) - Fix for command type check on passthrough actions (Min) - Fix for nvme command name for error logging (Christoph)" * tag 'nvme-6.4-2023-06-01' of git://git.infradead.org/nvme: nvme: fix the name of Zone Append for verbose logging nvme: improve handling of long keep alives nvme: check IO start time when deciding to defer KA nvme: double KA polling frequency to avoid KATO with TBKAS on nvme: fix miss command type check commit 9a7e8ec0d4cc64870ea449b4fce5779b77496cbb Author: Ism Hong Date: Thu Jun 1 17:53:55 2023 +0800 riscv: perf: Fix callchain parse error with kernel tracepoint events For RISC-V, when tracing with tracepoint events, the IP and status are set to 0, preventing the perf code parsing the callchain and resolving the symbols correctly. ./ply 'tracepoint:kmem/kmem_cache_alloc { @[stack]=count(); }' @: { }: 1 The fix is to implement perf_arch_fetch_caller_regs for riscv, which fills several necessary registers used for callchain unwinding, including epc, sp, s0 and status. It's similar to commit b3eac0265bf6 ("arm: perf: Fix callchain parse error with kernel tracepoint events") and commit 5b09a094f2fb ("arm64: perf: Fix callchain parse error with kernel tracepoint events"). With this patch, callchain can be parsed correctly as: ./ply 'tracepoint:kmem/kmem_cache_alloc { @[stack]=count(); }' @: { __traceiter_kmem_cache_alloc+68 __traceiter_kmem_cache_alloc+68 kmem_cache_alloc+354 __sigqueue_alloc+94 __send_signal_locked+646 send_signal_locked+154 do_send_sig_info+84 __kill_pgrp_info+130 kill_pgrp+60 isig+150 n_tty_receive_signal_char+36 n_tty_receive_buf_standard+2214 n_tty_receive_buf_common+280 n_tty_receive_buf2+26 tty_ldisc_receive_buf+34 tty_port_default_receive_buf+62 flush_to_ldisc+158 process_one_work+458 worker_thread+138 kthread+178 riscv_cpufeature_patch_func+832 }: 1 Signed-off-by: Ism Hong Link: https://lore.kernel.org/r/20230601095355.1168910-1-ism.hong@gmail.com Fixes: 178e9fc47aae ("perf: riscv: preliminary RISC-V support") Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 66dd101487305345fefb359de07ab3101e03eb08 Merge: 3021dbfe3ef0a 55b47ca7d8081 Author: Jakub Kicinski Date: Thu Jun 1 10:04:06 2023 -0700 Merge branch 'mptcp-fixes-for-connect-timeout-access-annotations-and-subflow-init' Mat Martineau says: ==================== mptcp: Fixes for connect timeout, access annotations, and subflow init Patch 1 allows the SO_SNDTIMEO sockopt to correctly change the connect timeout on MPTCP sockets. Patches 2-5 add READ_ONCE()/WRITE_ONCE() annotations to fix KCSAN issues. Patch 6 correctly initializes some subflow fields on outgoing connections. ==================== Link: https://lore.kernel.org/r/20230531-send-net-20230531-v1-0-47750c420571@kernel.org Signed-off-by: Jakub Kicinski commit 55b47ca7d80814ceb63d64e032e96cd6777811e5 Author: Paolo Abeni Date: Wed May 31 12:37:08 2023 -0700 mptcp: fix active subflow finalization Active subflow are inserted into the connection list at creation time. When the MPJ handshake completes successfully, a new subflow creation netlink event is generated correctly, but the current code wrongly avoid initializing a couple of subflow data. The above will cause misbehavior on a few exceptional events: unneeded mptcp-level retransmission on msk-level sequence wrap-around and infinite mapping fallback even when a MPJ socket is present. Address the issue factoring out the needed initialization in a new helper and invoking the latter from __mptcp_finish_join() time for passive subflow and from mptcp_finish_join() for active ones. Fixes: 0530020a7c8f ("mptcp: track and update contiguous data status") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 6b9831bfd9322b297eb6d44257808cc055fdc586 Author: Paolo Abeni Date: Wed May 31 12:37:07 2023 -0700 mptcp: add annotations around sk->sk_shutdown accesses Christoph reported the mptcp variant of a recently addressed plain TCP issue. Similar to commit e14cadfd80d7 ("tcp: add annotations around sk->sk_shutdown accesses") add READ/WRITE ONCE annotations to silence KCSAN reports around lockless sk_shutdown access. Fixes: 71ba088ce0aa ("mptcp: cleanup accept and poll") Reported-by: Christoph Paasch Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/401 Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 1b1b43ee7a208096ecd79e626f2fc90d4a321111 Author: Paolo Abeni Date: Wed May 31 12:37:06 2023 -0700 mptcp: fix data race around msk->first access The first subflow socket is accessed outside the msk socket lock by mptcp_subflow_fail(), we need to annotate each write access with WRITE_ONCE, but a few spots still lacks it. Fixes: 76a13b315709 ("mptcp: invoke MP_FAIL response when needed") Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 7e8b88ec35eef363040e08d99536d2bebef83774 Author: Paolo Abeni Date: Wed May 31 12:37:05 2023 -0700 mptcp: consolidate passive msk socket initialization When the msk socket is cloned at MPC handshake time, a few fields are initialized in a racy way outside mptcp_sk_clone() and the msk socket lock. The above is due historical reasons: before commit a88d0092b24b ("mptcp: simplify subflow_syn_recv_sock()") as the first subflow socket carrying all the needed date was not available yet at msk creation time We can now refactor the code moving the missing initialization bit under the socket lock, removing the init race and avoiding some code duplication. This will also simplify the next patch, as all msk->first write access are now under the msk socket lock. Fixes: 0397c6d85f9c ("mptcp: keep unaccepted MPC subflow into join list") Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 5b825727d0871b23e8867f6371183e61628b4a26 Author: Paolo Abeni Date: Wed May 31 12:37:04 2023 -0700 mptcp: add annotations around msk->subflow accesses The MPTCP can access the first subflow socket in a few spots outside the socket lock scope. That is actually safe, as MPTCP will delete the socket itself only after the msk sock close(). Still the such accesses causes a few KCSAN splats, as reported by Christoph. Silence the harmless warning adding a few annotation around the relevant accesses. Fixes: 71ba088ce0aa ("mptcp: cleanup accept and poll") Reported-by: Christoph Paasch Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/402 Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 786fc12457268cc9b555dde6c22ae7300d4b40e1 Author: Paolo Abeni Date: Wed May 31 12:37:03 2023 -0700 mptcp: fix connect timeout handling Ondrej reported a functional issue WRT timeout handling on connect with a nice reproducer. The problem is that the current mptcp connect waits for both the MPTCP socket level timeout, and the first subflow socket timeout. The latter is not influenced/touched by the exposed setsockopt(). Overall the above makes the SO_SNDTIMEO a no-op on connect. Since mptcp_connect is invoked via inet_stream_connect and the latter properly handle the MPTCP level timeout, we can address the issue making the nested subflow level connect always unblocking. This also allow simplifying a bit the code, dropping an ugly hack to handle the fastopen and custom proto_ops connect. The issues predates the blamed commit below, but the current resolution requires the infrastructure introduced there. Fixes: 54f1944ed6d2 ("mptcp: factor out mptcp_connect()") Reported-by: Ondrej Mosnacek Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/399 Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 3021dbfe3ef0aae502347f62824b292697f55f88 Merge: abaf8d51b0ced 65d6914e253f3 Author: Jakub Kicinski Date: Thu Jun 1 09:59:45 2023 -0700 Merge branch 'rtnetlink-a-couple-of-fixes-in-linkmsg-validation' Xin Long says: ==================== rtnetlink: a couple of fixes in linkmsg validation validate_linkmsg() was introduced to do linkmsg validation for existing links. However, the new created links also need this linkmsg validation. Add validate_linkmsg() check for link creating in Patch 1, and add more tb checks into validate_linkmsg() in Patch 2 and 3. ==================== Link: https://lore.kernel.org/r/cover.1685548598.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski commit 65d6914e253f3d83b724a9bbfc889ae95711e512 Author: Xin Long Date: Wed May 31 12:01:44 2023 -0400 rtnetlink: add the missing IFLA_GRO_ tb check in validate_linkmsg This fixes the issue that dev gro_max_size and gso_ipv4_max_size can be set to a huge value: # ip link add dummy1 type dummy # ip link set dummy1 gro_max_size 4294967295 # ip -d link show dummy1 dummy addrgenmode eui64 ... gro_max_size 4294967295 Fixes: 0fe79f28bfaf ("net: allow gro_max_size to exceed 65536") Fixes: 9eefedd58ae1 ("net: add gso_ipv4_max_size and gro_ipv4_max_size per device") Reported-by: Xiumei Mu Signed-off-by: Xin Long Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit fef5b228dd38378148bc850f7e69a7783f3b95a4 Author: Xin Long Date: Wed May 31 12:01:43 2023 -0400 rtnetlink: move IFLA_GSO_ tb check to validate_linkmsg These IFLA_GSO_* tb check should also be done for the new created link, otherwise, they can be set to a huge value when creating links: # ip link add dummy1 gso_max_size 4294967295 type dummy # ip -d link show dummy1 dummy addrgenmode eui64 ... gso_max_size 4294967295 Fixes: 46e6b992c250 ("rtnetlink: allow GSO maximums to be set on device creation") Fixes: 9eefedd58ae1 ("net: add gso_ipv4_max_size and gro_ipv4_max_size per device") Signed-off-by: Xin Long Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit b0ad3c179059089d809b477a1d445c1183a7b8fe Author: Xin Long Date: Wed May 31 12:01:42 2023 -0400 rtnetlink: call validate_linkmsg in rtnl_create_link validate_linkmsg() was introduced by commit 1840bb13c22f5b ("[RTNL]: Validate hardware and broadcast address attribute for RTM_NEWLINK") to validate tb[IFLA_ADDRESS/BROADCAST] for existing links. The same check should also be done for newly created links. This patch adds validate_linkmsg() call in rtnl_create_link(), to avoid the invalid address set when creating some devices like: # ip link add dummy0 type dummy # ip link add link dummy0 name mac0 address 01:02 type macsec Fixes: 0e06877c6fdb ("[RTNETLINK]: rtnl_link: allow specifying initial device address") Signed-off-by: Xin Long Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit abaf8d51b0cedb16af51fb6b2189370d7515977c Author: Maciej Fijalkowski Date: Wed May 31 08:44:57 2023 -0700 ice: recycle/free all of the fragments from multi-buffer frame The ice driver caches next_to_clean value at the beginning of ice_clean_rx_irq() in order to remember the first buffer that has to be freed/recycled after main Rx processing loop. The end boundary is indicated by first descriptor of frame that Rx processing loop has ended its duties. Note that if mentioned loop ended in the middle of gathering multi-buffer frame, next_to_clean would be pointing to the descriptor in the middle of the frame BUT freeing/recycling stage will stop at the first descriptor. This means that next iteration of ice_clean_rx_irq() will miss the (first_desc, next_to_clean - 1) entries. When running various 9K MTU workloads, such splats were observed: [ 540.780716] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 540.787787] #PF: supervisor read access in kernel mode [ 540.793002] #PF: error_code(0x0000) - not-present page [ 540.798218] PGD 0 P4D 0 [ 540.800801] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 540.805231] CPU: 18 PID: 3984 Comm: xskxceiver Tainted: G W 6.3.0-rc7+ #96 [ 540.813619] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0008.031920191559 03/19/2019 [ 540.824209] RIP: 0010:ice_clean_rx_irq+0x2b6/0xf00 [ice] [ 540.829678] Code: 74 24 10 e9 aa 00 00 00 8b 55 78 41 31 57 10 41 09 c4 4d 85 ff 0f 84 83 00 00 00 49 8b 57 08 41 8b 4f 1c 65 8b 35 1a fa 4b 3f <48> 8b 02 48 c1 e8 3a 39 c6 0f 85 a2 00 00 00 f6 42 08 02 0f 85 98 [ 540.848717] RSP: 0018:ffffc9000f42fc50 EFLAGS: 00010282 [ 540.854029] RAX: 0000000000000004 RBX: 0000000000000002 RCX: 000000000000fffe [ 540.861272] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00000000ffffffff [ 540.868519] RBP: ffff88984a05ac00 R08: 0000000000000000 R09: dead000000000100 [ 540.875760] R10: ffff88983fffcd00 R11: 000000000010f2b8 R12: 0000000000000004 [ 540.883008] R13: 0000000000000003 R14: 0000000000000800 R15: ffff889847a10040 [ 540.890253] FS: 00007f6ddf7fe640(0000) GS:ffff88afdf800000(0000) knlGS:0000000000000000 [ 540.898465] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 540.904299] CR2: 0000000000000000 CR3: 000000010d3da001 CR4: 00000000007706e0 [ 540.911542] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 540.918789] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 540.926032] PKRU: 55555554 [ 540.928790] Call Trace: [ 540.931276] [ 540.933418] ice_napi_poll+0x4ca/0x6d0 [ice] [ 540.937804] ? __pfx_ice_napi_poll+0x10/0x10 [ice] [ 540.942716] napi_busy_loop+0xd7/0x320 [ 540.946537] xsk_recvmsg+0x143/0x170 [ 540.950178] sock_recvmsg+0x99/0xa0 [ 540.953729] __sys_recvfrom+0xa8/0x120 [ 540.957543] ? do_futex+0xbd/0x1d0 [ 540.961008] ? __x64_sys_futex+0x73/0x1d0 [ 540.965083] __x64_sys_recvfrom+0x20/0x30 [ 540.969155] do_syscall_64+0x38/0x90 [ 540.972796] entry_SYSCALL_64_after_hwframe+0x72/0xdc [ 540.977934] RIP: 0033:0x7f6de5f27934 To fix this, set cached_ntc to first_desc so that at the end, when freeing/recycling buffers, descriptors from first to ntc are not missed. Fixes: 2fba7dc5157b ("ice: Add support for XDP multi-buffer on Rx side") Signed-off-by: Maciej Fijalkowski Reviewed-by: Simon Horman Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20230531154457.3216621-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 519d6487640835d19461817c75907e6308074a73 Author: Xu Liang Date: Wed May 31 15:48:22 2023 +0800 net: phy: mxl-gpy: extend interrupt fix to all impacted variants The interrupt fix in commit 97a89ed101bb should be applied on all variants of GPY2xx PHY and GPY115C. Fixes: 97a89ed101bb ("net: phy: mxl-gpy: disable interrupts on GPY215 by default") Signed-off-by: Xu Liang Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230531074822.39136-1-lxu@maxlinear.com Signed-off-by: Jakub Kicinski commit a60caf039e96d806b1ced893242bae82ba3ccf0d Author: Yoshihiro Shimoda Date: Mon May 29 16:38:17 2023 +0900 net: renesas: rswitch: Fix return value in error path of xmit Fix return value in the error path of rswitch_start_xmit(). If TX queues are full, this function should return NETDEV_TX_BUSY. Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"") Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20230529073817.1145208-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Jakub Kicinski commit 9c29c8c7df0688f358d2df5ddd16c97c2f7292b4 Author: Li Zhijian Date: Tue Apr 25 01:02:43 2023 +0000 RDMA/rtrs: Fix rxe_dealloc_pd warning In current design: 1. PD and clt_path->s.dev are shared among connections. 2. every con[n]'s cleanup phase will call destroy_con_cq_qp() 3. clt_path->s.dev will be always decreased in destroy_con_cq_qp(), and when clt_path->s.dev become zero, it will destroy PD. 4. when con[1] failed to create, con[1] will not take clt_path->s.dev, but it try to decreased clt_path->s.dev So, in case create_cm(con[0]) succeeds but create_cm(con[1]) fails, destroy_con_cq_qp(con[1]) will be called first which will destroy the PD while this PD is still taken by con[0]. Here, we refactor the error path of create_cm() and init_conns(), so that we do the cleanup in the order they are created. The warning occurs when destroying RXE PD whose reference count is not zero. rnbd_client L597: Mapping device /dev/nvme0n1 on session client, (access_mode: rw, nr_poll_queues: 0) ------------[ cut here ]------------ WARNING: CPU: 0 PID: 26407 at drivers/infiniband/sw/rxe/rxe_pool.c:256 __rxe_cleanup+0x13a/0x170 [rdma_rxe] Modules linked in: rpcrdma rdma_ucm ib_iser rnbd_client libiscsi rtrs_client scsi_transport_iscsi rtrs_core rdma_cm iw_cm ib_cm crc32_generic rdma_rxe udp_tunnel ib_uverbs ib_core kmem device_dax nd_pmem dax_pmem nd_vme crc32c_intel fuse nvme_core nfit libnvdimm dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua dm_mirror dm_region_hash dm_log dm_mod CPU: 0 PID: 26407 Comm: rnbd-client.sh Kdump: loaded Not tainted 6.2.0-rc6-roce-flush+ #53 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:__rxe_cleanup+0x13a/0x170 [rdma_rxe] Code: 45 84 e4 0f 84 5a ff ff ff 48 89 ef e8 5f 18 71 f9 84 c0 75 90 be c8 00 00 00 48 89 ef e8 be 89 1f fa 85 c0 0f 85 7b ff ff ff <0f> 0b 41 bc ea ff ff ff e9 71 ff ff ff e8 84 7f 1f fa e9 d0 fe ff RSP: 0018:ffffb09880b6f5f0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff99401f15d6a8 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffffbac8234b RDI: 00000000ffffffff RBP: ffff99401f15d6d0 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000002d82 R11: 0000000000000000 R12: 0000000000000001 R13: ffff994101eff208 R14: ffffb09880b6f6a0 R15: 00000000fffffe00 FS: 00007fe113904740(0000) GS:ffff99413bc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ff6cde656c8 CR3: 000000001f108004 CR4: 00000000001706f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rxe_dealloc_pd+0x16/0x20 [rdma_rxe] ib_dealloc_pd_user+0x4b/0x80 [ib_core] rtrs_ib_dev_put+0x79/0xd0 [rtrs_core] destroy_con_cq_qp+0x8a/0xa0 [rtrs_client] init_path+0x1e7/0x9a0 [rtrs_client] ? __pfx_autoremove_wake_function+0x10/0x10 ? lock_is_held_type+0xd7/0x130 ? rcu_read_lock_sched_held+0x43/0x80 ? pcpu_alloc+0x3dd/0x7d0 ? rtrs_clt_init_stats+0x18/0x40 [rtrs_client] rtrs_clt_open+0x24f/0x5a0 [rtrs_client] ? __pfx_rnbd_clt_link_ev+0x10/0x10 [rnbd_client] rnbd_clt_map_device+0x6a5/0xe10 [rnbd_client] Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Link: https://lore.kernel.org/r/1682384563-2-4-git-send-email-lizhijian@fujitsu.com Signed-off-by: Li Zhijian Acked-by: Jack Wang Tested-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 3bf3a7c6985c625f64e73baefdaa36f1c2045a29 Author: Li Zhijian Date: Tue Apr 25 01:02:42 2023 +0000 RDMA/rtrs: Fix the last iu->buf leak in err path The last iu->buf will leak if ib_dma_mapping_error() fails. Fixes: c0894b3ea69d ("RDMA/rtrs: core: lib functions shared between client and server modules") Link: https://lore.kernel.org/r/1682384563-2-3-git-send-email-lizhijian@fujitsu.com Signed-off-by: Li Zhijian Acked-by: Guoqing Jiang Acked-by: Jack Wang Signed-off-by: Jason Gunthorpe commit c4d28e30a8d0b979e4029465ab8f312ab6ce2644 Author: Chris Packham Date: Thu May 25 12:31:53 2023 +1200 mtd: rawnand: marvell: don't set the NAND frequency select marvell_nfc_setup_interface() uses the frequency retrieved from the clock associated with the nand interface to determine the timings that will be used. By changing the NAND frequency select without reflecting this in the clock configuration this means that the timings calculated don't correctly meet the requirements of the NAND chip. This hasn't been an issue up to now because of a different bug that was stopping the timings being updated after they were initially set. Fixes: b25251414f6e ("mtd: rawnand: marvell: Stop implementing ->select_chip()") Signed-off-by: Chris Packham Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230525003154.2303012-2-chris.packham@alliedtelesis.co.nz commit 8a6f4d346f3bad9c68b4a87701eb3f7978542d57 Author: Chris Packham Date: Thu May 25 12:31:52 2023 +1200 mtd: rawnand: marvell: ensure timing values are written When new timing values are calculated in marvell_nfc_setup_interface() ensure that they will be applied in marvell_nfc_select_target() by clearing the selected_chip pointer. Fixes: b25251414f6e ("mtd: rawnand: marvell: Stop implementing ->select_chip()") Suggested-by: Miquel Raynal Signed-off-by: Chris Packham Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230525003154.2303012-1-chris.packham@alliedtelesis.co.nz commit 0ea923f443350c8c5cca6eef5b748d52b903f46c Author: Arnd Bergmann Date: Mon Apr 17 22:56:50 2023 +0200 mtdchar: mark bits of ioctl handler noinline The addition of the mtdchar_read_ioctl() function caused the stack usage of mtdchar_ioctl() to grow beyond the warning limit on 32-bit architectures with gcc-13: drivers/mtd/mtdchar.c: In function 'mtdchar_ioctl': drivers/mtd/mtdchar.c:1229:1: error: the frame size of 1488 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Mark both the read and write portions as noinline_for_stack to ensure they don't get inlined and use separate stack slots to reduce the maximum usage, both in the mtdchar_ioctl() and combined with any of its callees. Fixes: 095bb6e44eb1 ("mtdchar: add MEMREAD ioctl") Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Reviewed-by: Richard Weinberger Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230417205654.1982368-1-arnd@kernel.org commit 444c17cfbc855bf6c1524f3813f6f667d9b708ff Author: Michal Simek Date: Fri May 26 19:41:54 2023 +0200 MAINTAINERS: Add myself as reviewer instead of Naga Naga no longer works for AMD/Xilinx and there is no activity from him to continue to maintain Xilinx related drivers. Add myself instead to be kept in loop if there is any need for testing. Signed-off-by: Michal Simek Signed-off-by: Miquel Raynal [: Manually apply on top of the latest -rc which where the MAINTAINERS file got sorted] Link: https://lore.kernel.org/linux-mtd/06df49c300c53a27423260e99acc217b06d4e588.1684827820.git.michal.simek@amd.com commit ce789307107e5344546ad196e3631c007b39b243 Merge: 524306c376427 dc93f0dcb436d Author: Mark Brown Date: Thu Jun 1 16:43:38 2023 +0100 ASoC: mediatek: fix use-after-free in driver remove Merge series from Trevor Wu : These patches concern modifications made in mt8186[1]. The clock unregistration mechanism used in mt8188 and mt8195 is similar with mt8186, resulting in the same problem existing within the driver. Therefore, the solution has also been applied to these two platforms. [1] https://lore.kernel.org/all/20230511092437.1.I31cceffc8c45bb1af16eb613e197b3df92cdc19e@changeid/ commit 1874a42a7d74ea85a63673875f4242722a9f624b Merge: cd69bf361e180 4420528254153 Author: Linus Torvalds Date: Thu Jun 1 11:18:20 2023 -0400 Merge tag 'firewire-fixes-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire fix from Takashi Sakamoto: "A single patch to use a flexible array rather than a zero-length one" * tag 'firewire-fixes-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: Replace zero-length array with flexible-array member commit cd69bf361e18091bff20c6f80670911682803650 Merge: f39dda98bc7c3 8fe72b76db79d Author: Linus Torvalds Date: Thu Jun 1 11:13:10 2023 -0400 Merge tag 'mailbox-fixes-6.4-rc5' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox fix from Jassi Brar: "Fix missing mutex unlock in mailbox-test" * tag 'mailbox-fixes-6.4-rc5' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: mailbox-test: fix a locking issue in mbox_test_message_write() commit 03c5c83b70dca3729a3eb488e668e5044bd9a5ea Author: Alexander Gordeev Date: Thu May 25 19:41:45 2023 +0200 s390/purgatory: disable branch profiling Avoid linker error for randomly generated config file that has CONFIG_BRANCH_PROFILE_NONE enabled and make it similar to riscv, x86 and also to commit 4bf3ec384edf ("s390: disable branch profiling for vdso"). Reviewed-by: Vasily Gorbik Signed-off-by: Alexander Gordeev commit 3c27f3d53d588618d81d30d6712459a3cc9489b8 Author: Andreas Svensson Date: Tue May 30 16:52:23 2023 +0200 net: dsa: mv88e6xxx: Increase wait after reset deactivation A switch held in reset by default needs to wait longer until we can reliably detect it. An issue was observed when testing on the Marvell 88E6393X (Link Street). The driver failed to detect the switch on some upstarts. Increasing the wait time after reset deactivation solves this issue. The updated wait time is now also the same as the wait time in the mv88e6xxx_hardware_reset function. Fixes: 7b75e49de424 ("net: dsa: mv88e6xxx: wait after reset deactivation") Signed-off-by: Andreas Svensson Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230530145223.1223993-1-andreas.svensson@axis.com Signed-off-by: Paolo Abeni commit 4420528254153189c70b6267593e445dc8654e37 Author: Gustavo A. R. Silva Date: Mon May 29 12:52:07 2023 -0600 firewire: Replace zero-length array with flexible-array member Zero-length and one-element arrays are deprecated, and we are moving towards adopting C99 flexible-array members, instead. Address the following warnings found with GCC-13 and -fstrict-flex-arrays=3 enabled: sound/firewire/amdtp-stream.c: In function ‘build_it_pkt_header’: sound/firewire/amdtp-stream.c:694:17: warning: ‘generate_cip_header’ accessing 8 bytes in a region of size 0 [-Wstringop-overflow=] 694 | generate_cip_header(s, cip_header, data_block_counter, syt); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/firewire/amdtp-stream.c:694:17: note: referencing argument 2 of type ‘__be32[2]’ {aka ‘unsigned int[2]’} sound/firewire/amdtp-stream.c:667:13: note: in a call to function ‘generate_cip_header’ 667 | static void generate_cip_header(struct amdtp_stream *s, __be32 cip_header[2], | ^~~~~~~~~~~~~~~~~~~ This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/303 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/ZHT0V3SpvHyxCv5W@work Signed-off-by: Takashi Sakamoto commit ead449023d3acb1424886d7b8cc672ed69bdd27e Author: Lorenzo Bianconi Date: Sun May 28 12:28:49 2023 +0200 wifi: mt76: mt7996: fix possible NULL pointer dereference in mt7996_mac_write_txwi() Fix possible NULL pointer dereference on mvif pointer in mt7996_mac_write_txwi routine. Fixes: 15ee62e73705 ("wifi: mt76: mt7996: enable BSS_CHANGED_BASIC_RATES support") Signed-off-by: Lorenzo Bianconi Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/2637628a84f42ad6d7b774e706f041d5b45c8cb5.1685269638.git.lorenzo@kernel.org commit b408f33b35a4de606bfbd0de33b8f971bc5488ba Author: Ping-Ke Shih Date: Sat May 27 16:29:39 2023 +0800 wifi: rtw89: remove redundant check of entering LPS Originally, add this check rule to prevent entering LPS if more than one vif (in station mode) connect to AP. Since we have checked this by previous commit, remove this redundant check. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230527082939.11206-4-pkshih@realtek.com commit 26a125f550a3bf86ac91d38752f4d446426dfe1c Author: Ping-Ke Shih Date: Sat May 27 16:29:38 2023 +0800 wifi: rtw89: correct PS calculation for SUPPORTS_DYNAMIC_PS This driver relies on IEEE80211_CONF_PS of hw->conf.flags to turn off PS or turn on dynamic PS controlled by driver and firmware. Though this would be incorrect, it did work before because the flag is always recalculated until the commit 28977e790b5d ("wifi: mac80211: skip powersave recalc if driver SUPPORTS_DYNAMIC_PS") is introduced by kernel 5.20 to skip to recalculate IEEE80211_CONF_PS of hw->conf.flags if driver sets SUPPORTS_DYNAMIC_PS. Correct this by doing recalculation while BSS_CHANGED_PS is changed and interface is added or removed. For now, it is allowed to enter PS only if single one station vif is working, and it could possible to have PS per vif after firmware can support it. Without this fix, driver doesn't enter PS anymore that causes higher power consumption. Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver") Cc: stable@vger.kernel.org # 6.1+ Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230527082939.11206-3-pkshih@realtek.com commit 3918dd0177ee08970683a2c22a3388825d82fd79 Author: Ping-Ke Shih Date: Sat May 27 16:29:37 2023 +0800 wifi: rtw88: correct PS calculation for SUPPORTS_DYNAMIC_PS This driver relies on IEEE80211_CONF_PS of hw->conf.flags to turn off PS or turn on dynamic PS controlled by driver and firmware. Though this would be incorrect, it did work before because the flag is always recalculated until the commit 28977e790b5d ("wifi: mac80211: skip powersave recalc if driver SUPPORTS_DYNAMIC_PS") is introduced by kernel 5.20 to skip to recalculate IEEE80211_CONF_PS of hw->conf.flags if driver sets SUPPORTS_DYNAMIC_PS. Correct this by doing recalculation while BSS_CHANGED_PS is changed and interface is added or removed. It is allowed to enter PS only if single one station vif is working. Without this fix, driver doesn't enter PS anymore that causes higher power consumption. Fixes: bcde60e599fb ("rtw88: remove misleading module parameter rtw_fw_support_lps") Cc: stable@vger.kernel.org # 6.1+ Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230527082939.11206-2-pkshih@realtek.com commit b675df0257bb717082f592626da3ddfc5bdc2b6b Author: Qu Wenruo Date: Thu Jun 1 18:51:34 2023 +0800 btrfs: zoned: fix dev-replace after the scrub rework [BUG] After commit e02ee89baa66 ("btrfs: scrub: switch scrub_simple_mirror() to scrub_stripe infrastructure"), scrub no longer works for zoned device at all. Even an empty zoned btrfs cannot be replaced: # mkfs.btrfs -f /dev/nvme0n1 # mount /dev/nvme0n1 /mnt/btrfs # btrfs replace start -Bf 1 /dev/nvme0n2 /mnt/btrfs Resetting device zones /dev/nvme1n1 (160 zones) ... ERROR: ioctl(DEV_REPLACE_START) failed on "/mnt/btrfs/": Input/output error And we can hit kernel crash related to that: BTRFS info (device nvme1n1): host-managed zoned block device /dev/nvme3n1, 160 zones of 134217728 bytes BTRFS info (device nvme1n1): dev_replace from /dev/nvme2n1 (devid 2) to /dev/nvme3n1 started nvme3n1: Zone Management Append(0x7d) @ LBA 65536, 4 blocks, Zone Is Full (sct 0x1 / sc 0xb9) DNR I/O error, dev nvme3n1, sector 786432 op 0xd:(ZONE_APPEND) flags 0x4000 phys_seg 3 prio class 2 BTRFS error (device nvme1n1): bdev /dev/nvme3n1 errs: wr 1, rd 0, flush 0, corrupt 0, gen 0 BUG: kernel NULL pointer dereference, address: 00000000000000a8 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:_raw_spin_lock_irqsave+0x1e/0x40 Call Trace: btrfs_lookup_ordered_extent+0x31/0x190 btrfs_record_physical_zoned+0x18/0x40 btrfs_simple_end_io+0xaf/0xc0 blk_update_request+0x153/0x4c0 blk_mq_end_request+0x15/0xd0 nvme_poll_cq+0x1d3/0x360 nvme_irq+0x39/0x80 __handle_irq_event_percpu+0x3b/0x190 handle_irq_event+0x2f/0x70 handle_edge_irq+0x7c/0x210 __common_interrupt+0x34/0xa0 common_interrupt+0x7d/0xa0 asm_common_interrupt+0x22/0x40 [CAUSE] Dev-replace reuses scrub code to iterate all extents and write the existing content back to the new device. And for zoned devices, we call fill_writer_pointer_gap() to make sure all the writes into the zoned device is sequential, even if there may be some gaps between the writes. However we have several different bugs all related to zoned dev-replace: - We are using ZONE_APPEND operation for metadata style write back For zoned devices, btrfs has two ways to write data: * ZONE_APPEND for data This allows higher queue depth, but will not be able to know where the write would land. Thus needs to grab the real on-disk physical location in it's endio. * WRITE for metadata This requires single queue depth (new writes can only be submitted after previous one finished), and all writes must be sequential. For scrub, we go single queue depth, but still goes with ZONE_APPEND, which requires btrfs_bio::inode being populated. This is the cause of that crash. - No correct tracing of write_pointer After a write finished, we should forward sctx->write_pointer, or fill_writer_pointer_gap() would not work properly and cause more than necessary zero out, and fill the whole zone prematurely. - Incorrect physical bytenr passed to fill_writer_pointer_gap() In scrub_write_sectors(), one call site passes logical address, which is completely wrong. The other call site passes physical address of current sector, but we should pass the physical address of the btrfs_bio we're submitting. This is the cause of the -EIO errors. [FIX] - Do not use ZONE_APPEND for btrfs_submit_repair_write(). - Manually forward sctx->write_pointer after successful writeback - Use the physical address of the to-be-submitted btrfs_bio for fill_writer_pointer_gap() Now zoned device replace would work as expected. Reported-by: Christoph Hellwig Fixes: e02ee89baa66 ("btrfs: scrub: switch scrub_simple_mirror() to scrub_stripe infrastructure") Reviewed-by: Christoph Hellwig Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 524306c3764276ce6cc7509908934982ce167039 Author: Richard Fitzgerald Date: Thu Jun 1 13:49:07 2023 +0100 ASoC: cs35l56: Remove NULL check from cs35l56_sdw_dai_set_stream() The dma pointer must be set to the passed stream pointer, even if that pointer is NULL. Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230601124907.3128170-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 3a67ad17b47ed111bda692238b6a19420e6934c8 Author: Ryan Lee Date: Thu Jun 1 06:06:00 2023 -0700 ASoC: max98363: limit the number of channel to 1 MAX98363 is a mono amplifier. The number of channel needs to be always 1. Signed-off-by: Ryan Lee Link: https://lore.kernel.org/r/20230601130600.25344-2-ryan.lee.analog@gmail.com Signed-off-by: Mark Brown commit 0e2ee345856454632dcd2f3ee2ba4bb3f8632f74 Author: Ryan Lee Date: Thu Jun 1 06:05:59 2023 -0700 ASoC: max98363: Removed 32bit support MAX98363 does not support 32bit depth audio. Removed 32bit from the supported format list. Instead, added 16bit and 24bit to the list. Signed-off-by: Ryan Lee Link: https://lore.kernel.org/r/20230601130600.25344-1-ryan.lee.analog@gmail.com Signed-off-by: Mark Brown commit f39dda98bc7c30c42a0c2c6a51ac726437524583 Merge: ba059590ec97d 6199d23c91ce5 Author: Linus Torvalds Date: Thu Jun 1 09:02:04 2023 -0400 Merge tag 'for-linus-2023060101' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - Regression fix for overlong long timeouts during initialization on some Logitech Unifying devices (Bastien Nocera) - error handling and overflow fixes for Wacom driver (Denis Arefev, Jason Gerecke, Nikita Zhandarovich) * tag 'for-linus-2023060101' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: logitech-hidpp: Handle timeout differently from busy HID: wacom: Add error check to wacom_parse_and_register() HID: google: add jewel USB id HID: wacom: avoid integer overflow in wacom_intuos_inout() HID: wacom: Check for string overflow from strscpy calls commit fa58cc888d67e640e354d8b3ceef877ea167b0cf Author: Andreas Gruenbacher Date: Wed May 31 21:08:26 2023 +0200 gfs2: Don't get stuck writing page onto itself under direct I/O When a direct I/O write is performed, iomap_dio_rw() invalidates the part of the page cache which the write is going to before carrying out the write. In the odd case, the direct I/O write will be reading from the same page it is writing to. gfs2 carries out writes with page faults disabled, so it should have been obvious that this page invalidation can cause iomap_dio_rw() to never make any progress. Currently, gfs2 will end up in an endless retry loop in gfs2_file_direct_write() instead, though. Break this endless loop by limiting the number of retries and falling back to buffered I/O after that. Also simplify should_fault_in_pages() sightly and add a comment to make the above case easier to understand. Reported-by: Jan Kara Signed-off-by: Andreas Gruenbacher commit b320a45638296b63be8d9a901ca8bc43716b1ae1 Author: Eric Dumazet Date: Tue May 30 19:51:49 2023 +0000 bpf, sockmap: Avoid potential NULL dereference in sk_psock_verdict_data_ready() syzbot found sk_psock(sk) could return NULL when called from sk_psock_verdict_data_ready(). Just make sure to handle this case. [1] general protection fault, probably for non-canonical address 0xdffffc000000005c: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x00000000000002e0-0x00000000000002e7] CPU: 0 PID: 15 Comm: ksoftirqd/0 Not tainted 6.4.0-rc3-syzkaller-00588-g4781e965e655 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 RIP: 0010:sk_psock_verdict_data_ready+0x19f/0x3c0 net/core/skmsg.c:1213 Code: 4c 89 e6 e8 63 70 5e f9 4d 85 e4 75 75 e8 19 74 5e f9 48 8d bb e0 02 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 07 02 00 00 48 89 ef ff 93 e0 02 00 00 e8 29 fd RSP: 0018:ffffc90000147688 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000100 RDX: 000000000000005c RSI: ffffffff8825ceb7 RDI: 00000000000002e0 RBP: ffff888076518c40 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000008000 R15: ffff888076518c40 FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f901375bab0 CR3: 000000004bf26000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tcp_data_ready+0x10a/0x520 net/ipv4/tcp_input.c:5006 tcp_data_queue+0x25d3/0x4c50 net/ipv4/tcp_input.c:5080 tcp_rcv_established+0x829/0x1f90 net/ipv4/tcp_input.c:6019 tcp_v4_do_rcv+0x65a/0x9c0 net/ipv4/tcp_ipv4.c:1726 tcp_v4_rcv+0x2cbf/0x3340 net/ipv4/tcp_ipv4.c:2148 ip_protocol_deliver_rcu+0x9f/0x480 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x2ec/0x520 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:303 [inline] NF_HOOK include/linux/netfilter.h:297 [inline] ip_local_deliver+0x1ae/0x200 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:468 [inline] ip_rcv_finish+0x1cf/0x2f0 net/ipv4/ip_input.c:449 NF_HOOK include/linux/netfilter.h:303 [inline] NF_HOOK include/linux/netfilter.h:297 [inline] ip_rcv+0xae/0xd0 net/ipv4/ip_input.c:569 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5491 __netif_receive_skb+0x1f/0x1c0 net/core/dev.c:5605 process_backlog+0x101/0x670 net/core/dev.c:5933 __napi_poll+0xb7/0x6f0 net/core/dev.c:6499 napi_poll net/core/dev.c:6566 [inline] net_rx_action+0x8a9/0xcb0 net/core/dev.c:6699 __do_softirq+0x1d4/0x905 kernel/softirq.c:571 run_ksoftirqd kernel/softirq.c:939 [inline] run_ksoftirqd+0x31/0x60 kernel/softirq.c:931 smpboot_thread_fn+0x659/0x9e0 kernel/smpboot.c:164 kthread+0x344/0x440 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Fixes: 6df7f764cd3c ("bpf, sockmap: Wake up polling after data copy") Reported-by: syzbot Signed-off-by: Eric Dumazet Signed-off-by: Daniel Borkmann Reviewed-by: John Fastabend Link: https://lore.kernel.org/bpf/20230530195149.68145-1-edumazet@google.com commit ba059590ec97ddf137ac7f200bfc5c8ce90c0237 Merge: 8828003759391 7f875850f20a4 Author: Linus Torvalds Date: Thu Jun 1 08:41:33 2023 -0400 Merge tag 'ata-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata Pull ata fix from Damien Le Moal: - Fix ata_find_dev() use of the device number to find a struct ata_device for a port. This addresses issues with some passthrough commands with libsas managed devices. * tag 'ata-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: ata: libata-scsi: Use correct device no in ata_find_dev() commit 8828003759391029fc45c15ac346622cdae19b6d Merge: 929ed21dfdb6e 6fe55c2799bc2 Author: Linus Torvalds Date: Thu Jun 1 08:27:34 2023 -0400 Merge tag '6.4-rc4-smb3-server-fixes' of git://git.samba.org/ksmbd Pull smb server fixes from Steve French: "Eight server fixes (most also for stable): - Two fixes for uninitialized pointer reads (rename and link) - Fix potential UAF in oplock break - Two fixes for potential out of bound reads in negotiate - Fix crediting bug - Two fixes for xfstests (allocation size fix for test 694 and lookup issue shown by test 464)" * tag '6.4-rc4-smb3-server-fixes' of git://git.samba.org/ksmbd: ksmbd: call putname after using the last component ksmbd: fix incorrect AllocationSize set in smb2_get_info ksmbd: fix UAF issue from opinfo->conn ksmbd: fix multiple out-of-bounds read during context decoding ksmbd: fix slab-out-of-bounds read in smb2_handle_negotiate ksmbd: fix credit count leakage ksmbd: fix uninitialized pointer read in smb2_create_link() ksmbd: fix uninitialized pointer read in ksmbd_vfs_rename() commit dc93f0dcb436dfd24a06c5b3c0f4c5cd9296e8e5 Author: Trevor Wu Date: Thu Jun 1 11:33:18 2023 +0800 ASoC: mediatek: mt8195: fix use-after-free in driver remove path During mt8195_afe_init_clock(), mt8195_audsys_clk_register() was called followed by several other devm functions. At mt8195_afe_deinit_clock() located at mt8195_afe_pcm_dev_remove(), mt8195_audsys_clk_unregister() was called. However, there was an issue with the order in which these functions were called. Specifically, the remove callback of platform_driver was called before devres released the resource, resulting in a use-after-free issue during remove time. At probe time, the order of calls was: 1. mt8195_audsys_clk_register 2. afe_priv->clk = devm_kcalloc 3. afe_priv->clk[i] = devm_clk_get At remove time, the order of calls was: 1. mt8195_audsys_clk_unregister 3. free afe_priv->clk[i] 2. free afe_priv->clk To resolve the problem, we can utilize devm_add_action_or_reset() in mt8195_audsys_clk_register() so that the remove order can be changed to 3->2->1. Fixes: 6746cc858259 ("ASoC: mediatek: mt8195: add platform driver") Signed-off-by: Trevor Wu Reviewed-by: Douglas Anderson Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230601033318.10408-3-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit fd67a7a1a22ce47fcbc094c4b6e164c34c652cbe Author: Trevor Wu Date: Thu Jun 1 11:33:17 2023 +0800 ASoC: mediatek: mt8188: fix use-after-free in driver remove path During mt8188_afe_init_clock(), mt8188_audsys_clk_register() was called followed by several other devm functions. The caller of mt8188_afe_init_clock() utilized devm_add_action_or_reset() to call mt8188_afe_deinit_clock(). However, the order was incorrect, causing a use-after-free issue during remove time. At probe time, the order of calls was: 1. mt8188_audsys_clk_register 2. afe_priv->clk = devm_kcalloc 3. afe_priv->clk[i] = devm_clk_get At remove time, the order of calls was: 1. mt8188_audsys_clk_unregister 3. free afe_priv->clk[i] 2. free afe_priv->clk To resolve the problem, it's necessary to move devm_add_action_or_reset() to the appropriate position so that the remove order can be 3->2->1. Fixes: f6b026479b13 ("ASoC: mediatek: mt8188: support audio clock control") Signed-off-by: Trevor Wu Reviewed-by: Douglas Anderson Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230601033318.10408-2-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit be7f8012a513f5099916ee2da28420156cbb8cf3 Author: Bert Karwatzki Date: Wed May 31 12:36:19 2023 +0200 net: ipa: Use correct value for IPA_STATUS_SIZE IPA_STATUS_SIZE was introduced in commit b8dc7d0eea5a as a replacement for the size of the removed struct ipa_status which had size sizeof(__le32[8]). Use this value as IPA_STATUS_SIZE. Fixes: b8dc7d0eea5a ("net: ipa: stop using sizeof(status)") Signed-off-by: Bert Karwatzki Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230531103618.102608-1-spasswolf@web.de Signed-off-by: Paolo Abeni commit 30c6f0bf9579debce27e45fac34fdc97e46acacc Author: fuyuanli Date: Wed May 31 16:01:50 2023 +0800 tcp: fix mishandling when the sack compression is deferred. In this patch, we mainly try to handle sending a compressed ack correctly if it's deferred. Here are more details in the old logic: When sack compression is triggered in the tcp_compressed_ack_kick(), if the sock is owned by user, it will set TCP_DELACK_TIMER_DEFERRED and then defer to the release cb phrase. Later once user releases the sock, tcp_delack_timer_handler() should send a ack as expected, which, however, cannot happen due to lack of ICSK_ACK_TIMER flag. Therefore, the receiver would not sent an ack until the sender's retransmission timeout. It definitely increases unnecessary latency. Fixes: 5d9f4262b7ea ("tcp: add SACK compression") Suggested-by: Eric Dumazet Signed-off-by: fuyuanli Signed-off-by: Jason Xing Link: https://lore.kernel.org/netdev/20230529113804.GA20300@didi-ThinkCentre-M920t-N000/ Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20230531080150.GA20424@didi-ThinkCentre-M920t-N000 Signed-off-by: Paolo Abeni commit 4d56304e5827c8cc8cc18c75343d283af7c4825c Author: Hangyu Hua Date: Wed May 31 18:28:04 2023 +0800 net/sched: flower: fix possible OOB write in fl_set_geneve_opt() If we send two TCA_FLOWER_KEY_ENC_OPTS_GENEVE packets and their total size is 252 bytes(key->enc_opts.len = 252) then key->enc_opts.len = opt->length = data_len / 4 = 0 when the third TCA_FLOWER_KEY_ENC_OPTS_GENEVE packet enters fl_set_geneve_opt. This bypasses the next bounds check and results in an out-of-bounds. Fixes: 0a6e77784f49 ("net/sched: allow flower to match tunnel options") Signed-off-by: Hangyu Hua Reviewed-by: Simon Horman Reviewed-by: Pieter Jansen van Vuuren Link: https://lore.kernel.org/r/20230531102805.27090-1-hbh25y@gmail.com Signed-off-by: Paolo Abeni commit b3fc95709c54ffbe80f16801e0a792a4d2b3d55e Author: Chen-Yu Tsai Date: Fri May 26 16:53:59 2023 +0800 iommu/mediatek: Flush IOTLB completely only if domain has been attached If an IOMMU domain was never attached, it lacks any linkage to the actual IOMMU hardware. Attempting to do flush_iotlb_all() on it will result in a NULL pointer dereference. This seems to happen after the recent IOMMU core rework in v6.4-rc1. Unable to handle kernel read from unreadable memory at virtual address 0000000000000018 Call trace: mtk_iommu_flush_iotlb_all+0x20/0x80 iommu_create_device_direct_mappings.part.0+0x13c/0x230 iommu_setup_default_domain+0x29c/0x4d0 iommu_probe_device+0x12c/0x190 of_iommu_configure+0x140/0x208 of_dma_configure_id+0x19c/0x3c0 platform_dma_configure+0x38/0x88 really_probe+0x78/0x2c0 Check if the "bank" field has been filled in before actually attempting the IOTLB flush to avoid it. The IOTLB is also flushed when the device comes out of runtime suspend, so it should have a clean initial state. Fixes: 08500c43d4f7 ("iommu/mediatek: Adjust the structure") Signed-off-by: Chen-Yu Tsai Reviewed-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230526085402.394239-1-wenst@chromium.org Signed-off-by: Joerg Roedel commit 3692ababa322b4d9ffbd973865bc88018e896fcd Author: Jammy Huang Date: Thu Jun 1 08:48:47 2023 +0800 drm/ast: Fix modeset failed on DisplayPort If we switch display and update cursor together, it could lead to modeset failed because of concurrent access to IO registers. Add lock protection in DP's edid access to avoid this problem. Reviewed-by: Thomas Zimmermann Signed-off-by: Jammy Huang Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230601004847.1115-1-jammy_huang@aspeedtech.com commit 62fe398761cd06a428e6f367aba84732a2f1c268 Author: Ashutosh Dixit Date: Tue May 23 13:40:42 2023 -0700 drm/i915/perf: Clear out entire reports after reading if not power of 2 size Clearing out report id and timestamp as means to detect unlanded reports only works if report size is power of 2. That is, only when report size is a sub-multiple of the OA buffer size can we be certain that reports will land at the same place each time in the OA buffer (after rewind). If report size is not a power of 2, we need to zero out the entire report to be able to detect unlanded reports reliably. v2: Add Fixes tag (Umesh) Fixes: 1cc064dce4ed ("drm/i915/perf: Add support for OA media units") Reviewed-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin Signed-off-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20230523204042.4180641-1-ashutosh.dixit@intel.com (cherry picked from commit 09a36015d9a0940214c080f95afc605c47648bbd) Signed-off-by: Joonas Lahtinen commit 622ab656344a288acf4fb03d628c3bb5dd241f34 Author: Edward Cree Date: Tue May 30 21:25:27 2023 +0100 sfc: fix error unwinds in TC offload Failure ladders weren't exactly unwinding what the function had done up to that point; most seriously, when we encountered an already offloaded rule, the failure path tried to remove the new rule from the hashtable, which would in fact remove the already-present 'old' rule (since it has the same key) from the table, and leak its resources. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202305200745.xmIlkqjH-lkp@intel.com/ Fixes: d902e1a737d4 ("sfc: bare bones TC offload on EF100") Fixes: 17654d84b47c ("sfc: add offloading of 'foreign' TC (decap) rules") Signed-off-by: Edward Cree Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230530202527.53115-1-edward.cree@amd.com Signed-off-by: Jakub Kicinski commit bbfa4b58997e3d38ba629c9f6fc0bd1c163aaf43 Author: Moshe Shemesh Date: Fri Apr 28 13:48:13 2023 +0300 net/mlx5: Read embedded cpu after init bit cleared During driver load it reads embedded_cpu bit from initialization segment, but the initialization segment is readable only after initialization bit is cleared. Move the call to mlx5_read_embedded_cpu() right after initialization bit cleared. Signed-off-by: Moshe Shemesh Fixes: 591905ba9679 ("net/mlx5: Introduce Mellanox SmartNIC and modify page management logic") Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed commit b6193d7030e3c59f1d4c75648c9c8fa40cad2bcd Author: Saeed Mahameed Date: Sat May 27 23:07:08 2023 -0700 net/mlx5e: Fix error handling in mlx5e_refresh_tirs Allocation failure is outside the critical lock section and should return immediately rather than jumping to the unlock section. Also unlock as soon as required and remove the now redundant jump label. Fixes: 80a2a9026b24 ("net/mlx5e: Add a lock on tir list") Signed-off-by: Saeed Mahameed commit 368591995d010e639ad8f28b27f1b721f0872342 Author: Chuck Lever Date: Wed May 31 15:48:25 2023 -0400 net/mlx5: Ensure af_desc.mask is properly initialized [ 9.837087] mlx5_core 0000:02:00.0: firmware version: 16.35.2000 [ 9.843126] mlx5_core 0000:02:00.0: 126.016 Gb/s available PCIe bandwidth (8.0 GT/s PCIe x16 link) [ 10.311515] mlx5_core 0000:02:00.0: Rate limit: 127 rates are supported, range: 0Mbps to 97656Mbps [ 10.321948] mlx5_core 0000:02:00.0: E-Switch: Total vports 2, per vport: max uc(128) max mc(2048) [ 10.344324] mlx5_core 0000:02:00.0: mlx5_pcie_event:301:(pid 88): PCIe slot advertised sufficient power (27W). [ 10.354339] BUG: unable to handle page fault for address: ffffffff8ff0ade0 [ 10.361206] #PF: supervisor read access in kernel mode [ 10.366335] #PF: error_code(0x0000) - not-present page [ 10.371467] PGD 81ec39067 P4D 81ec39067 PUD 81ec3a063 PMD 114b07063 PTE 800ffff7e10f5062 [ 10.379544] Oops: 0000 [#1] PREEMPT SMP PTI [ 10.383721] CPU: 0 PID: 117 Comm: kworker/0:6 Not tainted 6.3.0-13028-g7222f123c983 #1 [ 10.391625] Hardware name: Supermicro X10SRA-F/X10SRA-F, BIOS 2.0b 06/12/2017 [ 10.398750] Workqueue: events work_for_cpu_fn [ 10.403108] RIP: 0010:__bitmap_or+0x10/0x26 [ 10.407286] Code: 85 c0 0f 95 c0 c3 cc cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 89 c9 31 c0 48 83 c1 3f 48 c1 e9 06 39 c> [ 10.426024] RSP: 0000:ffffb45a0078f7b0 EFLAGS: 00010097 [ 10.431240] RAX: 0000000000000000 RBX: ffffffff8ff0adc0 RCX: 0000000000000004 [ 10.438365] RDX: ffff9156801967d0 RSI: ffffffff8ff0ade0 RDI: ffff9156801967b0 [ 10.445489] RBP: ffffb45a0078f7e8 R08: 0000000000000030 R09: 0000000000000000 [ 10.452613] R10: 0000000000000000 R11: 0000000000000000 R12: 00000000000000ec [ 10.459737] R13: ffffffff8ff0ade0 R14: 0000000000000001 R15: 0000000000000020 [ 10.466862] FS: 0000000000000000(0000) GS:ffff9165bfc00000(0000) knlGS:0000000000000000 [ 10.474936] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 10.480674] CR2: ffffffff8ff0ade0 CR3: 00000001011ae003 CR4: 00000000003706f0 [ 10.487800] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 10.494922] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 10.502046] Call Trace: [ 10.504493] [ 10.506589] ? matrix_alloc_area.constprop.0+0x43/0x9a [ 10.511729] ? prepare_namespace+0x84/0x174 [ 10.515914] irq_matrix_reserve_managed+0x56/0x10c [ 10.520699] x86_vector_alloc_irqs+0x1d2/0x31e [ 10.525146] irq_domain_alloc_irqs_hierarchy+0x39/0x3f [ 10.530284] irq_domain_alloc_irqs_parent+0x1a/0x2a [ 10.535155] intel_irq_remapping_alloc+0x59/0x5e9 [ 10.539859] ? kmem_cache_debug_flags+0x11/0x26 [ 10.544383] ? __radix_tree_lookup+0x39/0xb9 [ 10.548649] irq_domain_alloc_irqs_hierarchy+0x39/0x3f [ 10.553779] irq_domain_alloc_irqs_parent+0x1a/0x2a [ 10.558650] msi_domain_alloc+0x8c/0x120 [ 10.567697] irq_domain_alloc_irqs_locked+0x11d/0x286 [ 10.572741] __irq_domain_alloc_irqs+0x72/0x93 [ 10.577179] __msi_domain_alloc_irqs+0x193/0x3f1 [ 10.581789] ? __xa_alloc+0xcf/0xe2 [ 10.585273] msi_domain_alloc_irq_at+0xa8/0xfe [ 10.589711] pci_msix_alloc_irq_at+0x47/0x5c The crash is due to matrix_alloc_area() attempting to access per-CPU memory for CPUs that are not present on the system. The CPU mask passed into reserve_managed_vector() via it's @irqd parameter is corrupted because it contains uninitialized stack data. Fixes: bbac70c74183 ("net/mlx5: Use newer affinity descriptor") Reviewed-by: Thomas Gleixner Signed-off-by: Chuck Lever Signed-off-by: Saeed Mahameed commit 8764bd0fa5d402c51b136f6aeaba20fc16961ba1 Author: Niklas Schnelle Date: Wed May 31 10:48:56 2023 +0200 net/mlx5: Fix setting of irq->map.index for static IRQ case When dynamic IRQ allocation is not supported all IRQs are allocated up front in mlx5_irq_table_create() instead of dynamically as part of mlx5_irq_alloc(). In the latter dynamic case irq->map.index is set via the mapping returned by pci_msix_alloc_irq_at(). In the static case and prior to commit 1da438c0ae02 ("net/mlx5: Fix indexing of mlx5_irq") irq->map.index was set in mlx5_irq_alloc() twice once initially to 0 and then to the requested index before storing in the xarray. After this commit it is only set to 0 which breaks all other IRQ mappings. Fix this by setting irq->map.index to the requested index together with irq->map.virq and improve the related comment to make it clearer which cases it deals with. Cc: Chuck Lever III Tested-by: Mark Brown Reviewed-by: Mark Brown Reviewed-by: Simon Horman Reviewed-by: Eli Cohen Fixes: 1da438c0ae02 ("net/mlx5: Fix indexing of mlx5_irq") Signed-off-by: Niklas Schnelle Tested-by: Cédric Le Goater Signed-off-by: Saeed Mahameed commit 1c4c769cdf682c63d3b10cb241f4a96ebad2f215 Author: Shay Drory Date: Tue May 30 11:59:34 2023 +0300 net/mlx5: Remove rmap also in case dynamic MSIX not supported mlx5 add IRQs to rmap upon MSIX request, and mlx5 remove rmap from MSIX only if msi_map.index is populated. However, msi_map.index is populated only when dynamic MSIX is supported. This results in freeing IRQs without removing them from rmap, which triggers the bellow WARN_ON[1]. rmap is a feature which have no relation to dynamic MSIX. Hence, remove the check of msi_map.index when removing IRQ from rmap. [1] [ 200.307160 ] WARNING: CPU: 20 PID: 1702 at kernel/irq/manage.c:2034 free_irq+0x2ac/0x358 [ 200.316990 ] CPU: 20 PID: 1702 Comm: modprobe Not tainted 6.4.0-rc3_for_upstream_min_debug_2023_05_24_14_02 #1 [ 200.318939 ] Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 [ 200.321659 ] pc : free_irq+0x2ac/0x358 [ 200.322400 ] lr : free_irq+0x20/0x358 [ 200.337865 ] Call trace: [ 200.338360 ] free_irq+0x2ac/0x358 [ 200.339029 ] irq_release+0x58/0xd0 [mlx5_core] [ 200.340093 ] mlx5_irqs_release_vectors+0x80/0xb0 [mlx5_core] [ 200.341344 ] destroy_comp_eqs+0x120/0x170 [mlx5_core] [ 200.342469 ] mlx5_eq_table_destroy+0x1c/0x38 [mlx5_core] [ 200.343645 ] mlx5_unload+0x8c/0xc8 [mlx5_core] [ 200.344652 ] mlx5_uninit_one+0x78/0x118 [mlx5_core] [ 200.345745 ] remove_one+0x80/0x108 [mlx5_core] [ 200.346752 ] pci_device_remove+0x40/0xd8 [ 200.347554 ] device_remove+0x50/0x88 [ 200.348272 ] device_release_driver_internal+0x1c4/0x228 [ 200.349312 ] driver_detach+0x54/0xa0 [ 200.350030 ] bus_remove_driver+0x74/0x100 [ 200.350833 ] driver_unregister+0x34/0x68 [ 200.351619 ] pci_unregister_driver+0x28/0xa0 [ 200.352476 ] mlx5_cleanup+0x14/0x2210 [mlx5_core] [ 200.353536 ] __arm64_sys_delete_module+0x190/0x2e8 [ 200.354495 ] el0_svc_common.constprop.0+0x6c/0x1d0 [ 200.355455 ] do_el0_svc+0x38/0x98 [ 200.356122 ] el0_svc+0x1c/0x80 [ 200.356739 ] el0t_64_sync_handler+0xb4/0x130 [ 200.357604 ] el0t_64_sync+0x174/0x178 [ 200.358345 ] ---[ end trace 0000000000000000 ]--- Fixes: 3354822cde5a ("net/mlx5: Use dynamic msix vectors allocation") Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 663b930e24842f3d3bb79418bb5cd8d01b40c559 Author: Ikshwaku Chauhan Date: Thu May 25 10:57:26 2023 +0530 drm/amdgpu: enable tmz by default for GC 11.0.1 Add IP GC 11.0.1 in the list of target to have tmz enabled by default. Signed-off-by: Ikshwaku Chauhan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.1.x commit 929ed21dfdb6ee94391db51c9eedb63314ef6847 Merge: 884fe9da1b7cc fdd7d1fff4e3b Author: Linus Torvalds Date: Wed May 31 19:24:01 2023 -0400 Merge tag '6.4-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: "Four small smb3 client fixes: - two small fixes suggested by kernel test robot - small cleanup fix - update Paulo's email address in the maintainer file" * tag '6.4-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: address unused variable warning smb: delete an unnecessary statement smb3: missing null check in SMB2_change_notify smb3: update a reviewer email in MAINTAINERS file commit e490d60a2f76bff636c68ce4fe34c1b6c34bbd86 Author: Guchun Chen Date: Wed May 24 15:03:02 2023 +0800 drm/amd/pm: resolve reboot exception for si oland During reboot test on arm64 platform, it may failure on boot. The error message are as follows: [ 1.706570][ 3] [ T273] [drm:si_thermal_enable_alert [amdgpu]] *ERROR* Could not enable thermal interrupts. [ 1.716547][ 3] [ T273] [drm:amdgpu_device_ip_late_init [amdgpu]] *ERROR* late_init of IP block failed -22 [ 1.727064][ 3] [ T273] amdgpu 0000:02:00.0: amdgpu_device_ip_late_init failed [ 1.734367][ 3] [ T273] amdgpu 0000:02:00.0: Fatal error during GPU init v2: squash in built warning fix (Alex) Signed-off-by: Zhenneng Li Reviewed-by: Guchun Chen Signed-off-by: Guchun Chen Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit bc3e1d60f933f823599376f830eb99451afb995a Author: Horatio Zhang Date: Mon May 15 23:02:10 2023 -0400 drm/amdgpu: add RAS POISON interrupt funcs for jpeg_v4_0 Add ras_poison_irq and functions. And fix the amdgpu_irq_put call trace in jpeg_v4_0_hw_fini. [ 50.497562] RIP: 0010:amdgpu_irq_put+0xa4/0xc0 [amdgpu] [ 50.497619] RSP: 0018:ffffaa2400fcfcb0 EFLAGS: 00010246 [ 50.497620] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000 [ 50.497621] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 50.497621] RBP: ffffaa2400fcfcd0 R08: 0000000000000000 R09: 0000000000000000 [ 50.497622] R10: 0000000000000000 R11: 0000000000000000 R12: ffff99b2105242d8 [ 50.497622] R13: 0000000000000000 R14: ffff99b210500000 R15: ffff99b210500000 [ 50.497623] FS: 0000000000000000(0000) GS:ffff99b518480000(0000) knlGS:0000000000000000 [ 50.497623] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 50.497624] CR2: 00007f9d32aa91e8 CR3: 00000001ba210000 CR4: 0000000000750ee0 [ 50.497624] PKRU: 55555554 [ 50.497625] Call Trace: [ 50.497625] [ 50.497627] jpeg_v4_0_hw_fini+0x43/0xc0 [amdgpu] [ 50.497693] jpeg_v4_0_suspend+0x13/0x30 [amdgpu] [ 50.497751] amdgpu_device_ip_suspend_phase2+0x240/0x470 [amdgpu] [ 50.497802] amdgpu_device_ip_suspend+0x41/0x80 [amdgpu] [ 50.497854] amdgpu_device_pre_asic_reset+0xd9/0x4a0 [amdgpu] [ 50.497905] amdgpu_device_gpu_recover.cold+0x548/0xcf1 [amdgpu] [ 50.498005] amdgpu_debugfs_reset_work+0x4c/0x80 [amdgpu] [ 50.498060] process_one_work+0x21f/0x400 [ 50.498063] worker_thread+0x200/0x3f0 [ 50.498064] ? process_one_work+0x400/0x400 [ 50.498065] kthread+0xee/0x120 [ 50.498067] ? kthread_complete_and_exit+0x20/0x20 [ 50.498068] ret_from_fork+0x22/0x30 Suggested-by: Hawking Zhang Signed-off-by: Horatio Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 30b2d778f629d51e2ff30beb6d060a0bd7f70104 Author: Horatio Zhang Date: Mon May 15 22:59:54 2023 -0400 drm/amdgpu: add RAS POISON interrupt funcs for jpeg_v2_6 Add ras_poison_irq and functions. Suggested-by: Hawking Zhang Signed-off-by: Horatio Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit ce784421a3e15fd89d5fc1b9da7d846dd8309661 Author: Horatio Zhang Date: Mon May 15 22:57:19 2023 -0400 drm/amdgpu: separate ras irq from jpeg instance irq for UVD_POISON Separate jpegbRAS poison consumption handling from the instance irq, and register dedicated ras_poison_irq src and funcs for UVD_POISON. v2: - Separate ras irq from jpeg instance irq - Improve the subject and code comments v3: - Split the patch into three parts - Improve the code comments Suggested-by: Hawking Zhang Signed-off-by: Horatio Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 020c76d983151f6f6c9493a3bbe83c1ec927617a Author: Horatio Zhang Date: Mon May 15 22:09:43 2023 -0400 drm/amdgpu: add RAS POISON interrupt funcs for vcn_v4_0 Add ras_poison_irq and functions. And fix the amdgpu_irq_put call trace in vcn_v4_0_hw_fini. [ 44.563572] RIP: 0010:amdgpu_irq_put+0xa4/0xc0 [amdgpu] [ 44.563629] RSP: 0018:ffffb36740edfc90 EFLAGS: 00010246 [ 44.563630] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000 [ 44.563630] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 44.563631] RBP: ffffb36740edfcb0 R08: 0000000000000000 R09: 0000000000000000 [ 44.563631] R10: 0000000000000000 R11: 0000000000000000 R12: ffff954c568e2ea8 [ 44.563631] R13: 0000000000000000 R14: ffff954c568c0000 R15: ffff954c568e2ea8 [ 44.563632] FS: 0000000000000000(0000) GS:ffff954f584c0000(0000) knlGS:0000000000000000 [ 44.563632] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 44.563633] CR2: 00007f028741ba70 CR3: 000000026ca10000 CR4: 0000000000750ee0 [ 44.563633] PKRU: 55555554 [ 44.563633] Call Trace: [ 44.563634] [ 44.563634] vcn_v4_0_hw_fini+0x62/0x160 [amdgpu] [ 44.563700] vcn_v4_0_suspend+0x13/0x30 [amdgpu] [ 44.563755] amdgpu_device_ip_suspend_phase2+0x240/0x470 [amdgpu] [ 44.563806] amdgpu_device_ip_suspend+0x41/0x80 [amdgpu] [ 44.563858] amdgpu_device_pre_asic_reset+0xd9/0x4a0 [amdgpu] [ 44.563909] amdgpu_device_gpu_recover.cold+0x548/0xcf1 [amdgpu] [ 44.564006] amdgpu_debugfs_reset_work+0x4c/0x80 [amdgpu] [ 44.564061] process_one_work+0x21f/0x400 [ 44.564062] worker_thread+0x200/0x3f0 [ 44.564063] ? process_one_work+0x400/0x400 [ 44.564064] kthread+0xee/0x120 [ 44.564065] ? kthread_complete_and_exit+0x20/0x20 [ 44.564066] ret_from_fork+0x22/0x30 Suggested-by: Hawking Zhang Signed-off-by: Horatio Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 6889f28c736c357700f5755fed852a2badc15a7b Author: Horatio Zhang Date: Mon May 15 21:52:00 2023 -0400 drm/amdgpu: add RAS POISON interrupt funcs for vcn_v2_6 Add ras_poison_irq and functions. Suggested-by: Hawking Zhang Signed-off-by: Horatio Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit ac1d8e2f074d9bffc2d368ad0720cdbb4c938fa5 Author: Horatio Zhang Date: Mon May 15 21:45:51 2023 -0400 drm/amdgpu: separate ras irq from vcn instance irq for UVD_POISON Separate vcn RAS poison consumption handling from the instance irq, and register dedicated ras_poison_irq src and funcs for UVD_POISON. v2: - Separate ras irq from vcn instance irq - Improve the subject and code comments v3: - Split the patch into three parts - Improve the code comments Suggested-by: Hawking Zhang Signed-off-by: Horatio Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 8e1b45c578b799510f9a01a9745a737e74f43cb1 Author: Michel Dänzer Date: Mon May 22 15:08:23 2023 +0200 Revert "drm/amd/display: Do not set drr on pipe commit" This reverts commit 474f01015ffdb74e01c2eb3584a2822c64e7b2be. Caused a regression: Samsung Odyssey Neo G9, running at 5120x1440@240/VRR, connected to Navi 21 via DisplayPort, blanks and the GPU hangs while starting the Steam game Assetto Corsa Competizione (via Proton 7.0). Example dmesg excerpt: amdgpu 0000:0c:00.0: [drm] ERROR [CRTC:82:crtc-0] flip_done timed out NMI watchdog: Watchdog detected hard LOCKUP on cpu 6 [...] RIP: 0010:amdgpu_device_rreg.part.0+0x2f/0xf0 [amdgpu] Code: 41 54 44 8d 24 b5 00 00 00 00 55 89 f5 53 48 89 fb 4c 3b a7 60 0b 00 00 73 6a 83 e2 02 74 29 4c 03 a3 68 0b 00 00 45 8b 24 24 <48> 8b 43 08 0f b7 70 3e 66 90 44 89 e0 5b 5d 41 5c 31 d2 31 c9 31 RSP: 0000:ffffb39a119dfb88 EFLAGS: 00000086 RAX: ffffffffc0eb96a0 RBX: ffff9e7963dc0000 RCX: 0000000000007fff RDX: 0000000000000000 RSI: 0000000000004ff6 RDI: ffff9e7963dc0000 RBP: 0000000000004ff6 R08: ffffb39a119dfc40 R09: 0000000000000010 R10: ffffb39a119dfc40 R11: ffffb39a119dfc44 R12: 00000000000e05ae R13: 0000000000000000 R14: ffff9e7963dc0010 R15: 0000000000000000 FS: 000000001012f6c0(0000) GS:ffff9e805eb80000(0000) knlGS:000000007fd40000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000461ca000 CR3: 00000002a8a20000 CR4: 0000000000350ee0 Call Trace: dm_read_reg_func+0x37/0xc0 [amdgpu] generic_reg_get2+0x22/0x60 [amdgpu] optc1_get_crtc_scanoutpos+0x6a/0xc0 [amdgpu] dc_stream_get_scanoutpos+0x74/0x90 [amdgpu] dm_crtc_get_scanoutpos+0x82/0xf0 [amdgpu] amdgpu_display_get_crtc_scanoutpos+0x91/0x190 [amdgpu] ? dm_read_reg_func+0x37/0xc0 [amdgpu] amdgpu_get_vblank_counter_kms+0xb4/0x1a0 [amdgpu] dm_pflip_high_irq+0x213/0x2f0 [amdgpu] amdgpu_dm_irq_handler+0x8a/0x200 [amdgpu] amdgpu_irq_dispatch+0xd4/0x220 [amdgpu] amdgpu_ih_process+0x7f/0x110 [amdgpu] amdgpu_irq_handler+0x1f/0x70 [amdgpu] __handle_irq_event_percpu+0x46/0x1b0 handle_irq_event+0x34/0x80 handle_edge_irq+0x9f/0x240 __common_interrupt+0x66/0x110 common_interrupt+0x5c/0xd0 asm_common_interrupt+0x22/0x40 Reviewed-by: Aurabindo Pillai Acked-by: Alex Deucher Signed-off-by: Michel Dänzer Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit c14fb01c4629b96b64ab54caea7e543a0239f14e Author: Michel Dänzer Date: Mon May 22 15:08:22 2023 +0200 Revert "drm/amd/display: Block optimize on consecutive FAMS enables" This reverts commit ce560ac40272a5c8b5b68a9d63a75edd9e66aed2. It depends on its parent commit, which we want to revert. Acked-by: Alex Deucher Signed-off-by: Michel Dänzer [Hamza: fix a whitespace issue in dcn30_prepare_bandwidth()] Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 55e02c14f9b5fd973ba32a16a715baa42617f9c6 Author: Tim Huang Date: Mon May 22 23:17:28 2023 +0800 drm/amd/pm: reverse mclk and fclk clocks levels for renoir This patch reverses the DPM clocks levels output of pp_dpm_mclk and pp_dpm_fclk for renoir. On dGPUs and older APUs we expose the levels from lowest clocks to highest clocks. But for some APUs, the clocks levels are given the reversed orders by PMFW. Like the memory DPM clocks that are exposed by pp_dpm_mclk. It's not intuitive that they are reversed on these APUs. All tools and software that talks to the driver then has to know different ways to interpret the data depending on the asic. So we need to reverse them to expose the clocks levels from the driver consistently. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit bfc03568d9d81332382c73a1985a90c4506bd36c Author: Tim Huang Date: Sun May 21 11:10:19 2023 +0800 drm/amd/pm: reverse mclk and fclk clocks levels for vangogh This patch reverses the DPM clocks levels output of pp_dpm_mclk and pp_dpm_fclk. On dGPUs and older APUs we expose the levels from lowest clocks to highest clocks. But for some APUs, the clocks levels that from the DFPstateTable are given the reversed orders by PMFW. Like the memory DPM clocks that are exposed by pp_dpm_mclk. It's not intuitive that they are reversed on these APUs. All tools and software that talks to the driver then has to know different ways to interpret the data depending on the asic. So we need to reverse them to expose the clocks levels from the driver consistently. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit f1373a97a41f429e0095d4be388092ffa3c1a157 Author: Tim Huang Date: Sun May 21 10:35:59 2023 +0800 drm/amd/pm: reverse mclk and fclk clocks levels for yellow carp This patch reverses the DPM clocks levels output of pp_dpm_mclk and pp_dpm_fclk. On dGPUs and older APUs we expose the levels from lowest clocks to highest clocks. But for some APUs, the clocks levels that from the DFPstateTable are given the reversed orders by PMFW. Like the memory DPM clocks that are exposed by pp_dpm_mclk. It's not intuitive that they are reversed on these APUs. All tools and software that talks to the driver then has to know different ways to interpret the data depending on the asic. So we need to reverse them to expose the clocks levels from the driver consistently. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit c1d35412b3e826ae8119e3fb5f51dd0fa5b6b567 Author: Tim Huang Date: Sun May 21 10:28:05 2023 +0800 drm/amd/pm: reverse mclk clocks levels for SMU v13.0.5 This patch reverses the DPM clocks levels output of pp_dpm_mclk. On dGPUs and older APUs we expose the levels from lowest clocks to highest clocks. But for some APUs, the clocks levels that from the DFPstateTable are given the reversed orders by PMFW. Like the memory DPM clocks that are exposed by pp_dpm_mclk. It's not intuitive that they are reversed on these APUs. All tools and software that talks to the driver then has to know different ways to interpret the data depending on the asic. So we need to reverse them to expose the clocks levels from the driver consistently. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 6a07826f2057b5fa1c479ba56460195882464270 Author: Tim Huang Date: Sun May 21 09:24:00 2023 +0800 drm/amd/pm: reverse mclk and fclk clocks levels for SMU v13.0.4 This patch reverses the DPM clocks levels output of pp_dpm_mclk and pp_dpm_fclk. On dGPUs and older APUs we expose the levels from lowest clocks to highest clocks. But for some APUs, the clocks levels that from the DFPstateTable are given the reversed orders by PMFW. Like the memory DPM clocks that are exposed by pp_dpm_mclk. It's not intuitive that they are reversed on these APUs. All tools and software that talks to the driver then has to know different ways to interpret the data depending on the asic. So we need to reverse them to expose the clocks levels from the driver consistently. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit c26fabe73330d983c7ce822c6b6ec0879b4da61f Author: K Prateek Nayak Date: Mon May 8 14:11:15 2023 +0530 drivers: base: cacheinfo: Update cpu_map_populated during CPU Hotplug Until commit 5c2712387d48 ("cacheinfo: Fix LLC is not exported through sysfs"), cacheinfo called populate_cache_leaves() for CPU coming online which let the arch specific functions handle (at least on x86) populating the shared_cpu_map. However, with the changes in the aforementioned commit, populate_cache_leaves() is not called when a CPU comes online as a result of hotplug since last_level_cache_is_valid() returns true as the cacheinfo data is not discarded. The CPU coming online is not present in shared_cpu_map, however, it will not be added since the cpu_cacheinfo->cpu_map_populated flag is set (it is set in populate_cache_leaves() when cacheinfo is first populated for x86) This can lead to inconsistencies in the shared_cpu_map when an offlined CPU comes online again. Example below depicts the inconsistency in the shared_cpu_list in cacheinfo when CPU8 is offlined and onlined again on a 3rd Generation EPYC processor: # for i in /sys/devices/system/cpu/cpu8/cache/index*/shared_cpu_list; do echo -n "$i: "; cat $i; done /sys/devices/system/cpu/cpu8/cache/index0/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu8/cache/index1/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu8/cache/index2/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu8/cache/index3/shared_cpu_list: 8-15,136-143 # echo 0 > /sys/devices/system/cpu/cpu8/online # echo 1 > /sys/devices/system/cpu/cpu8/online # for i in /sys/devices/system/cpu/cpu8/cache/index*/shared_cpu_list; do echo -n "$i: "; cat $i; done /sys/devices/system/cpu/cpu8/cache/index0/shared_cpu_list: 8 /sys/devices/system/cpu/cpu8/cache/index1/shared_cpu_list: 8 /sys/devices/system/cpu/cpu8/cache/index2/shared_cpu_list: 8 /sys/devices/system/cpu/cpu8/cache/index3/shared_cpu_list: 8 # cat /sys/devices/system/cpu/cpu136/cache/index0/shared_cpu_list 136 # cat /sys/devices/system/cpu/cpu136/cache/index3/shared_cpu_list 9-15,136-143 Clear the flag when the CPU is removed from shared_cpu_map when cache_shared_cpu_map_remove() is called during CPU hotplug. This will allow cache_shared_cpu_map_setup() to add the CPU coming back online in the shared_cpu_map. Set the flag again when the shared_cpu_map is setup. Following are results of performing the same test as described above with the changes: # for i in /sys/devices/system/cpu/cpu8/cache/index*/shared_cpu_list; do echo -n "$i: "; cat $i; done /sys/devices/system/cpu/cpu8/cache/index0/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu8/cache/index1/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu8/cache/index2/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu8/cache/index3/shared_cpu_list: 8-15,136-143 # echo 0 > /sys/devices/system/cpu/cpu8/online # echo 1 > /sys/devices/system/cpu/cpu8/online # for i in /sys/devices/system/cpu/cpu8/cache/index*/shared_cpu_list; do echo -n "$i: "; cat $i; done /sys/devices/system/cpu/cpu8/cache/index0/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu8/cache/index1/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu8/cache/index2/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu8/cache/index3/shared_cpu_list: 8-15,136-143 # cat /sys/devices/system/cpu/cpu136/cache/index0/shared_cpu_list 8,136 # cat /sys/devices/system/cpu/cpu136/cache/index3/shared_cpu_list 8-15,136-143 Fixes: 5c2712387d48 ("cacheinfo: Fix LLC is not exported through sysfs") Signed-off-by: K Prateek Nayak Reviewed-by: Yicong Yang Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20230508084115.1157-3-kprateek.nayak@amd.com Signed-off-by: Greg Kroah-Hartman commit 126310c9f669c9a8c875a3e5c2292299ca90225d Author: K Prateek Nayak Date: Mon May 8 14:11:14 2023 +0530 drivers: base: cacheinfo: Fix shared_cpu_map changes in event of CPU hotplug While building the shared_cpu_map, check if the cache level and cache type matches. On certain systems that build the cache topology based on the instance ID, there are cases where the same ID may repeat across multiple cache levels, leading inaccurate topology. In event of CPU offlining, the cache_shared_cpu_map_remove() does not consider if IDs at same level are being compared. As a result, when same IDs repeat across different cache levels, the CPU going offline is not removed from all the shared_cpu_map. Below is the output of cache topology of CPU8 and it's SMT sibling after CPU8 is offlined on a dual socket 3rd Generation AMD EPYC processor (2 x 64C/128T) running kernel release v6.3: # for i in /sys/devices/system/cpu/cpu8/cache/index*/shared_cpu_list; do echo -n "$i: "; cat $i; done /sys/devices/system/cpu/cpu8/cache/index0/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu8/cache/index1/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu8/cache/index2/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu8/cache/index3/shared_cpu_list: 8-15,136-143 # echo 0 > /sys/devices/system/cpu/cpu8/online # for i in /sys/devices/system/cpu/cpu136/cache/index*/shared_cpu_list; do echo -n "$i: "; cat $i; done /sys/devices/system/cpu/cpu136/cache/index0/shared_cpu_list: 136 /sys/devices/system/cpu/cpu136/cache/index1/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu136/cache/index2/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu136/cache/index3/shared_cpu_list: 9-15,136-143 CPU8 is removed from index0 (L1i) but remains in the shared_cpu_list of index1 (L1d) and index2 (L2). Since L1i, L1d, and L2 are shared by the SMT siblings, and they have the same cache instance ID, CPU 2 is only removed from the first index with matching ID which is index1 (L1i) in this case. With this fix, the results are as expected when performing the same experiment on the same system: # for i in /sys/devices/system/cpu/cpu8/cache/index*/shared_cpu_list; do echo -n "$i: "; cat $i; done /sys/devices/system/cpu/cpu8/cache/index0/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu8/cache/index1/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu8/cache/index2/shared_cpu_list: 8,136 /sys/devices/system/cpu/cpu8/cache/index3/shared_cpu_list: 8-15,136-143 # echo 0 > /sys/devices/system/cpu/cpu8/online # for i in /sys/devices/system/cpu/cpu136/cache/index*/shared_cpu_list; do echo -n "$i: "; cat $i; done /sys/devices/system/cpu/cpu136/cache/index0/shared_cpu_list: 136 /sys/devices/system/cpu/cpu136/cache/index1/shared_cpu_list: 136 /sys/devices/system/cpu/cpu136/cache/index2/shared_cpu_list: 136 /sys/devices/system/cpu/cpu136/cache/index3/shared_cpu_list: 9-15,136-143 When rebuilding topology, the same problem appears as cache_shared_cpu_map_setup() implements a similar logic. Consider the same 3rd Generation EPYC processor: CPUs in Core 1, that share the L1 and L2 caches, have L1 and L2 instance ID as 1. For all the CPUs on the second chiplet, the L3 ID is also 1 leading to grouping on CPUs from Core 1 (1, 17) and the entire second chiplet (8-15, 24-31) as CPUs sharing one cache domain. This went undetected since x86 processors depended on arch specific populate_cache_leaves() method to repopulate the shared_cpus_map when CPU came back online until kernel release v6.3-rc5. Fixes: 198102c9103f ("cacheinfo: Fix shared_cpu_map to handle shared caches at different levels") Signed-off-by: K Prateek Nayak Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20230508084115.1157-2-kprateek.nayak@amd.com Signed-off-by: Greg Kroah-Hartman commit 48e156023059e57a8fc68b498439832f7600ffff Author: Mirsad Goran Todorovac Date: Tue May 9 10:47:49 2023 +0200 test_firmware: fix the memory leak of the allocated firmware buffer The following kernel memory leak was noticed after running tools/testing/selftests/firmware/fw_run_tests.sh: [root@pc-mtodorov firmware]# cat /sys/kernel/debug/kmemleak . . . unreferenced object 0xffff955389bc3400 (size 1024): comm "test_firmware-0", pid 5451, jiffies 4294944822 (age 65.652s) hex dump (first 32 bytes): 47 48 34 35 36 37 0a 00 00 00 00 00 00 00 00 00 GH4567.......... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] slab_post_alloc_hook+0x8c/0x3c0 [] __kmem_cache_alloc_node+0x184/0x240 [] kmalloc_trace+0x2e/0xc0 [] test_fw_run_batch_request+0x9d/0x180 [] kthread+0x10b/0x140 [] ret_from_fork+0x29/0x50 unreferenced object 0xffff9553c334b400 (size 1024): comm "test_firmware-1", pid 5452, jiffies 4294944822 (age 65.652s) hex dump (first 32 bytes): 47 48 34 35 36 37 0a 00 00 00 00 00 00 00 00 00 GH4567.......... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] slab_post_alloc_hook+0x8c/0x3c0 [] __kmem_cache_alloc_node+0x184/0x240 [] kmalloc_trace+0x2e/0xc0 [] test_fw_run_batch_request+0x9d/0x180 [] kthread+0x10b/0x140 [] ret_from_fork+0x29/0x50 unreferenced object 0xffff9553c334f000 (size 1024): comm "test_firmware-2", pid 5453, jiffies 4294944822 (age 65.652s) hex dump (first 32 bytes): 47 48 34 35 36 37 0a 00 00 00 00 00 00 00 00 00 GH4567.......... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] slab_post_alloc_hook+0x8c/0x3c0 [] __kmem_cache_alloc_node+0x184/0x240 [] kmalloc_trace+0x2e/0xc0 [] test_fw_run_batch_request+0x9d/0x180 [] kthread+0x10b/0x140 [] ret_from_fork+0x29/0x50 unreferenced object 0xffff9553c3348400 (size 1024): comm "test_firmware-3", pid 5454, jiffies 4294944822 (age 65.652s) hex dump (first 32 bytes): 47 48 34 35 36 37 0a 00 00 00 00 00 00 00 00 00 GH4567.......... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] slab_post_alloc_hook+0x8c/0x3c0 [] __kmem_cache_alloc_node+0x184/0x240 [] kmalloc_trace+0x2e/0xc0 [] test_fw_run_batch_request+0x9d/0x180 [] kthread+0x10b/0x140 [] ret_from_fork+0x29/0x50 [root@pc-mtodorov firmware]# Note that the size 1024 corresponds to the size of the test firmware buffer. The actual number of the buffers leaked is around 70-110, depending on the test run. The cause of the leak is the following: request_partial_firmware_into_buf() and request_firmware_into_buf() provided firmware buffer isn't released on release_firmware(), we have allocated it and we are responsible for deallocating it manually. This is introduced in a number of context where previously only release_firmware() was called, which was insufficient. Reported-by: Mirsad Goran Todorovac Fixes: 7feebfa487b92 ("test_firmware: add support for request_firmware_into_buf") Cc: Greg Kroah-Hartman Cc: Dan Carpenter Cc: Takashi Iwai Cc: Luis Chamberlain Cc: Russ Weight Cc: Tianfei zhang Cc: Christophe JAILLET Cc: Zhengchao Shao Cc: Colin Ian King Cc: linux-kernel@vger.kernel.org Cc: Kees Cook Cc: Scott Branden Cc: Luis R. Rodriguez Cc: linux-kselftest@vger.kernel.org Cc: stable@vger.kernel.org # v5.4 Signed-off-by: Mirsad Goran Todorovac Link: https://lore.kernel.org/r/20230509084746.48259-3-mirsad.todorovac@alu.unizg.hr Signed-off-by: Greg Kroah-Hartman commit be37bed754ed90b2655382f93f9724b3c1aae847 Author: Mirsad Goran Todorovac Date: Tue May 9 10:47:47 2023 +0200 test_firmware: fix a memory leak with reqs buffer Dan Carpenter spotted that test_fw_config->reqs will be leaked if trigger_batched_requests_store() is called two or more times. The same appears with trigger_batched_requests_async_store(). This bug wasn't trigger by the tests, but observed by Dan's visual inspection of the code. The recommended workaround was to return -EBUSY if test_fw_config->reqs is already allocated. Fixes: 7feebfa487b92 ("test_firmware: add support for request_firmware_into_buf") Cc: Luis Chamberlain Cc: Greg Kroah-Hartman Cc: Russ Weight Cc: Tianfei Zhang Cc: Shuah Khan Cc: Colin Ian King Cc: Randy Dunlap Cc: linux-kselftest@vger.kernel.org Cc: stable@vger.kernel.org # v5.4 Suggested-by: Dan Carpenter Suggested-by: Takashi Iwai Signed-off-by: Mirsad Goran Todorovac Reviewed-by: Dan Carpenter Acked-by: Luis Chamberlain Link: https://lore.kernel.org/r/20230509084746.48259-2-mirsad.todorovac@alu.unizg.hr Signed-off-by: Greg Kroah-Hartman commit 4acfe3dfde685a5a9eaec5555351918e2d7266a1 Author: Mirsad Goran Todorovac Date: Tue May 9 10:47:45 2023 +0200 test_firmware: prevent race conditions by a correct implementation of locking Dan Carpenter spotted a race condition in a couple of situations like these in the test_firmware driver: static int test_dev_config_update_u8(const char *buf, size_t size, u8 *cfg) { u8 val; int ret; ret = kstrtou8(buf, 10, &val); if (ret) return ret; mutex_lock(&test_fw_mutex); *(u8 *)cfg = val; mutex_unlock(&test_fw_mutex); /* Always return full write size even if we didn't consume all */ return size; } static ssize_t config_num_requests_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { int rc; mutex_lock(&test_fw_mutex); if (test_fw_config->reqs) { pr_err("Must call release_all_firmware prior to changing config\n"); rc = -EINVAL; mutex_unlock(&test_fw_mutex); goto out; } mutex_unlock(&test_fw_mutex); rc = test_dev_config_update_u8(buf, count, &test_fw_config->num_requests); out: return rc; } static ssize_t config_read_fw_idx_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { return test_dev_config_update_u8(buf, count, &test_fw_config->read_fw_idx); } The function test_dev_config_update_u8() is called from both the locked and the unlocked context, function config_num_requests_store() and config_read_fw_idx_store() which can both be called asynchronously as they are driver's methods, while test_dev_config_update_u8() and siblings change their argument pointed to by u8 *cfg or similar pointer. To avoid deadlock on test_fw_mutex, the lock is dropped before calling test_dev_config_update_u8() and re-acquired within test_dev_config_update_u8() itself, but alas this creates a race condition. Having two locks wouldn't assure a race-proof mutual exclusion. This situation is best avoided by the introduction of a new, unlocked function __test_dev_config_update_u8() which can be called from the locked context and reducing test_dev_config_update_u8() to: static int test_dev_config_update_u8(const char *buf, size_t size, u8 *cfg) { int ret; mutex_lock(&test_fw_mutex); ret = __test_dev_config_update_u8(buf, size, cfg); mutex_unlock(&test_fw_mutex); return ret; } doing the locking and calling the unlocked primitive, which enables both locked and unlocked versions without duplication of code. The similar approach was applied to all functions called from the locked and the unlocked context, which safely mitigates both deadlocks and race conditions in the driver. __test_dev_config_update_bool(), __test_dev_config_update_u8() and __test_dev_config_update_size_t() unlocked versions of the functions were introduced to be called from the locked contexts as a workaround without releasing the main driver's lock and thereof causing a race condition. The test_dev_config_update_bool(), test_dev_config_update_u8() and test_dev_config_update_size_t() locked versions of the functions are being called from driver methods without the unnecessary multiplying of the locking and unlocking code for each method, and complicating the code with saving of the return value across lock. Fixes: 7feebfa487b92 ("test_firmware: add support for request_firmware_into_buf") Cc: Luis Chamberlain Cc: Greg Kroah-Hartman Cc: Russ Weight Cc: Takashi Iwai Cc: Tianfei Zhang Cc: Shuah Khan Cc: Colin Ian King Cc: Randy Dunlap Cc: linux-kselftest@vger.kernel.org Cc: stable@vger.kernel.org # v5.4 Suggested-by: Dan Carpenter Signed-off-by: Mirsad Goran Todorovac Link: https://lore.kernel.org/r/20230509084746.48259-1-mirsad.todorovac@alu.unizg.hr Signed-off-by: Greg Kroah-Hartman commit ffa28312e2837ae788855840e126fa6f8a1ac35d Author: Dan Carpenter Date: Tue May 16 11:12:51 2023 +0300 firmware_loader: Fix a NULL vs IS_ERR() check The crypto_alloc_shash() function doesn't return NULL, it returns error pointers. Update the check accordingly. Fixes: 02fe26f25325 ("firmware_loader: Add debug message with checksum for FW file") Signed-off-by: Dan Carpenter Reviewed-by: Cezary Rojewski Acked-by: Luis Chamberlain Link: https://lore.kernel.org/r/36ef6042-ce74-4e8e-9e2c-5b5c28940610@kili.mountain Signed-off-by: Greg Kroah-Hartman commit 8fe72b76db79d694858e872370df49676bc3be8c Author: Dan Carpenter Date: Fri May 5 12:22:09 2023 +0300 mailbox: mailbox-test: fix a locking issue in mbox_test_message_write() There was a bug where this code forgot to unlock the tdev->mutex if the kzalloc() failed. Fix this issue, by moving the allocation outside the lock. Fixes: 2d1e952a2b8e ("mailbox: mailbox-test: Fix potential double-free in mbox_test_message_write()") Signed-off-by: Dan Carpenter Reviewed-by: Lee Jones Signed-off-by: Jassi Brar commit 884fe9da1b7ccbea31b118f902fbc78f58366b4a Merge: fd2186d1c708f 5842d1d9c1b0d Author: Linus Torvalds Date: Wed May 31 14:13:09 2023 -0400 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: - Fix 64K ARM page size support in bnxt_re and efa - bnxt_re fixes for a memory leak, incorrect error handling and a remove a bogus FW failure when running on a VF - Update MAINTAINERS for hns and efa - Fix two rxe regressions added this merge window in error unwind and incorrect spinlock primitives - hns gets a better algorithm for allocating page tables to avoid running out of resources, and a timeout adjustment - Fix a text case failure in hns - Use after free in irdma and fix incorrect construction of a WQE causing mis-execution * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/irdma: Fix Local Invalidate fencing RDMA/irdma: Prevent QP use after free MAINTAINERS: Update maintainer of Amazon EFA driver RDMA/bnxt_re: Do not enable congestion control on VFs RDMA/bnxt_re: Fix return value of bnxt_re_process_raw_qp_pkt_rx RDMA/bnxt_re: Fix a possible memory leak RDMA/hns: Modify the value of long message loopback slice RDMA/hns: Fix base address table allocation RDMA/hns: Fix timeout attr in query qp for HIP08 RDMA/efa: Fix unsupported page sizes in device RDMA/rxe: Convert spin_{lock_bh,unlock_bh} to spin_{lock_irqsave,unlock_irqrestore} RDMA/rxe: Fix double unlock in rxe_qp.c MAINTAINERS: Update maintainers of HiSilicon RoCE RDMA/bnxt_re: Fix the page_size used during the MR creation commit fd2186d1c708fa0ec64291da5aa6b26fb44197c3 Merge: 48b1320a674e1 eb1f822c76bee Author: Linus Torvalds Date: Wed May 31 14:06:01 2023 -0400 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Fix two regressions in ext4 and a number of issues reported by syzbot" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: enable the lazy init thread when remounting read/write ext4: fix fsync for non-directories ext4: add lockdep annotations for i_data_sem for ea_inode's ext4: disallow ea_inodes with extended attributes ext4: set lockdep subclass for the ea_inode in ext4_xattr_inode_cache_find() ext4: add EA_INODE checking to ext4_iget() commit 2d5b205dfa32b5f0f357ebc9db73931d2186391e Merge: 4115af49d2c24 91539341a3b6e Author: Thomas Gleixner Date: Wed May 31 19:42:53 2023 +0200 Merge tag 'irqchip-fixes-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull an irqchip fix from Marc Zyngier: - Fix regression introduced by the Mediatek workaround. Link: https://lore.kernel.org/lkml/20230531160549.433528-1-maz@kernel.org commit 40994ce0ea010b1843e620bacc26d29ddebfc08d Author: Zhu YiXin Date: Fri May 19 12:45:55 2023 +0800 MAINTAINERS: Add Chuanhua Lei as Intel LGM GW PCIe maintainer Rahul Tanwar is no longer at Maxlinear, so update the MAINTAINERS entry for the PCIe driver for Intel LGM GW SoC. Link: https://lore.kernel.org/r/20230519044555.3750-2-yzhu@maxlinear.com Signed-off-by: Zhu YiXin Signed-off-by: Bjorn Helgaas Acked-by: Rahul Tanwar Acked-by: Lei Chuanhua commit 856303797724d28f1d65b702f0eadcee1ea7abf5 Author: Christoph Hellwig Date: Wed May 31 14:54:54 2023 +0200 nvme: fix the name of Zone Append for verbose logging No Management involved in Zone Appened. Fixes: bd83fe6f2cd2 ("nvme: add verbose error logging") Signed-off-by: Christoph Hellwig Reviewed-by: Alan Adamson Signed-off-by: Keith Busch commit 6d074ce231772c66e648a61f6bd2245e7129d1f5 Author: Bart Van Assche Date: Mon May 29 12:50:34 2023 -0700 scsi: stex: Fix gcc 13 warnings gcc 13 may assign another type to enumeration constants than gcc 12. Split the large enum at the top of source file stex.c such that the type of the constants used in time expressions is changed back to the same type chosen by gcc 12. This patch suppresses compiler warnings like this one: In file included from ./include/linux/bitops.h:7, from ./include/linux/kernel.h:22, from drivers/scsi/stex.c:13: drivers/scsi/stex.c: In function ‘stex_common_handshake’: ./include/linux/typecheck.h:12:25: error: comparison of distinct pointer types lacks a cast [-Werror] 12 | (void)(&__dummy == &__dummy2); \ | ^~ ./include/linux/jiffies.h:106:10: note: in expansion of macro ‘typecheck’ 106 | typecheck(unsigned long, b) && \ | ^~~~~~~~~ drivers/scsi/stex.c:1035:29: note: in expansion of macro ‘time_after’ 1035 | if (time_after(jiffies, before + MU_MAX_DELAY * HZ)) { | ^~~~~~~~~~ See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107405. Cc: stable@vger.kernel.org Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230529195034.3077-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 6199d23c91ce53bfed455f09a8c5ed170d516824 Author: Bastien Nocera Date: Wed May 31 10:24:28 2023 +0200 HID: logitech-hidpp: Handle timeout differently from busy If an attempt at contacting a receiver or a device fails because the receiver or device never responds, don't restart the communication, only restart it if the receiver or device answers that it's busy, as originally intended. This was the behaviour on communication timeout before commit 586e8fede795 ("HID: logitech-hidpp: Retry commands when device is busy"). This fixes some overly long waits in a critical path on boot, when checking whether the device is connected by getting its HID++ version. Signed-off-by: Bastien Nocera Suggested-by: Mark Lord Fixes: 586e8fede795 ("HID: logitech-hidpp: Retry commands when device is busy") Link: https://bugzilla.kernel.org/show_bug.cgi?id=217412 Signed-off-by: Jiri Kosina commit 8dc2a7e8027fbeca0c7df81d4c82e735a59b5741 Author: Alexandre Ghiti Date: Fri May 26 17:46:30 2023 +0200 riscv: Fix relocatable kernels with early alternatives using -fno-pie Early alternatives are called with the mmu disabled, and then should not access any global symbols through the GOT since it requires relocations, relocations that we do before but *virtually*. So only use medany code model for this early code. Signed-off-by: Alexandre Ghiti Tested-by: Conor Dooley # booted on nezha & unmatched Fixes: 39b33072941f ("riscv: Introduce CONFIG_RELOCATABLE") Link: https://lore.kernel.org/r/20230526154630.289374-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit c034203b6a9dae6751ef4371c18cb77983e30c28 Author: Dan Carpenter Date: Mon May 29 14:35:55 2023 +0300 nfsd: fix double fget() bug in __write_ports_addfd() The bug here is that you cannot rely on getting the same socket from multiple calls to fget() because userspace can influence that. This is a kind of double fetch bug. The fix is to delete the svc_alien_sock() function and instead do the checking inside the svc_addsock() function. Fixes: 3064639423c4 ("nfsd: check passed socket's net matches NFSd superblock's one") Signed-off-by: Dan Carpenter Reviewed-by: NeilBrown Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 57d1e8900495cf1751cec74db16fe1a0fe47efbb Author: Sicong Jiang Date: Wed May 31 21:06:35 2023 +1200 ASoC: amd: yc: Add Thinkpad Neo14 to quirks list for acp6x Thinkpad Neo14 Ryzen Edition uses Ryzen 6800H processor, and adding to quirks list for acp6x will enable internal mic. Signed-off-by: Sicong Jiang Link: https://lore.kernel.org/r/20230531090635.89565-1-kevin.jiangsc@gmail.com Signed-off-by: Mark Brown commit bed61c8fc7ba17d0f259c674137a5198fd2e3334 Author: Jammy Huang Date: Tue May 30 12:12:40 2023 +0800 drm/ast: Fix long time waiting on s3/s4 resume In resume, DP's launch function, ast_dp_launch, could wait at most 30 seconds before timeout to check if DP is enabled. It could lead to 'DPM device timeout' and trigger unrecoverable kernel panic. To avoid this problem, we check if DP enable or not at driver probe only. Reported-and-tested-by: Wendy Wang Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217278 Acked-by: Thomas Zimmermann Signed-off-by: Jammy Huang Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230530041240.13427-1-jammy_huang@aspeedtech.com commit 81d0fa4cb4fc0e1a49c2b22f92c43d9fe972ebcf Author: Pietro Borrello Date: Sat Jan 28 16:23:41 2023 +0000 tracing/probe: trace_probe_primary_from_call(): checked list_first_entry All callers of trace_probe_primary_from_call() check the return value to be non NULL. However, the function returns list_first_entry(&tpe->probes, ...) which can never be NULL. Additionally, it does not check for the list being possibly empty, possibly causing a type confusion on empty lists. Use list_first_entry_or_null() which solves both problems. Link: https://lore.kernel.org/linux-trace-kernel/20230128-list-entry-null-check-v1-1-8bde6a3da2ef@diag.uniroma1.it/ Fixes: 60d53e2c3b75 ("tracing/probe: Split trace_event related data from trace_probe") Signed-off-by: Pietro Borrello Reviewed-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) Acked-by: Mukesh Ojha Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) commit 448a5ce1120c5bdbce1f1ccdabcd31c7d029f328 Author: Vladislav Efanov Date: Tue May 30 14:39:41 2023 +0300 udp6: Fix race condition in udp6_sendmsg & connect Syzkaller got the following report: BUG: KASAN: use-after-free in sk_setup_caps+0x621/0x690 net/core/sock.c:2018 Read of size 8 at addr ffff888027f82780 by task syz-executor276/3255 The function sk_setup_caps (called by ip6_sk_dst_store_flow-> ip6_dst_store) referenced already freed memory as this memory was freed by parallel task in udpv6_sendmsg->ip6_sk_dst_lookup_flow-> sk_dst_check. task1 (connect) task2 (udp6_sendmsg) sk_setup_caps->sk_dst_set | | sk_dst_check-> | sk_dst_set | dst_release sk_setup_caps references | to already freed dst_entry| The reason for this race condition is: sk_setup_caps() keeps using the dst after transferring the ownership to the dst cache. Found by Linux Verification Center (linuxtesting.org) with syzkaller. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Vladislav Efanov Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 40e54cad454076172cc3e2bca60aa924650a3e4b Author: Oliver Upton Date: Thu May 25 21:27:22 2023 +0000 KVM: arm64: Document default vPMU behavior on heterogeneous systems KVM maintains a mask of supported CPUs when a vPMU type is explicitly selected by userspace and is used to reject any attempt to run the vCPU on an unsupported CPU. This is great, but we're still beholden to the default behavior where vCPUs can be scheduled anywhere and guest counters may silently stop working. Avoid confusing the next poor sod to look at this code and document the intended behavior. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230525212723.3361524-3-oliver.upton@linux.dev commit 1c913a1c35aa61cf280173b2bcc133c3953c38fc Author: Oliver Upton Date: Thu May 25 21:27:21 2023 +0000 KVM: arm64: Iterate arm_pmus list to probe for default PMU To date KVM has relied on using a perf event to probe the core PMU at the time of vPMU initialization. Behind the scenes perf_event_init() would iteratively walk the PMUs of the system and return the PMU that could handle the event. However, an upcoming change in perf core will drop the iterative walk, thereby breaking the fragile dance we do on the KVM side. Avoid the problem altogether by iterating over the list of supported PMUs maintained in KVM, returning the core PMU that matches the CPU we were called on. Tested-by: Nathan Chancellor Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230525212723.3361524-2-oliver.upton@linux.dev commit 9f9666e65359d5047089aef97ac87c50f624ecb0 Author: Mika Westerberg Date: Tue May 30 08:48:29 2023 +0300 thunderbolt: Mask ring interrupt on Intel hardware as well When resuming from system sleep states the driver issues following warning on Intel hardware: thunderbolt 0000:07:00.0: interrupt for TX ring 0 is already enabled The reason for this is that the commit in question did not mask the ring interrupt on Intel hardware leaving the interrupt active. Fix this by masking it also in Intel hardware. Reported-by: beld zhang Tested-by: beld zhang Closes: https://lore.kernel.org/linux-usb/ZHKW5NeabmfhgLbY@debian.me/ Fixes: c4af8e3fecd0 ("thunderbolt: Clear registers properly when auto clear isn't in use") Cc: stable@vger.kernel.org Reviewed-by: Mario Limonciello Signed-off-by: Mika Westerberg commit f4e4534850a9d18c250a93f8d7fbb51310828110 Author: Pedro Tammela Date: Mon May 29 12:33:35 2023 -0300 net/netlink: fix NETLINK_LIST_MEMBERSHIPS length report The current code for the length calculation wrongly truncates the reported length of the groups array, causing an under report of the subscribed groups. To fix this, use 'BITS_TO_BYTES()' which rounds up the division by 8. Fixes: b42be38b2778 ("netlink: add API to retrieve all group memberships") Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230529153335.389815-1-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit f6a27d6dc51b288106adaf053cff9c9b9cc12c4e Author: Oliver Upton Date: Tue May 30 19:32:13 2023 +0000 KVM: arm64: Drop last page ref in kvm_pgtable_stage2_free_removed() The reference count on page table allocations is increased for every 'counted' PTE (valid or donated) in the table in addition to the initial reference from ->zalloc_page(). kvm_pgtable_stage2_free_removed() fails to drop the last reference on the root of the table walk, meaning we leak memory. Fix it by dropping the last reference after the free walker returns, at which point all references for 'counted' PTEs have been released. Cc: stable@vger.kernel.org Fixes: 5c359cca1faf ("KVM: arm64: Tear down unlinked stage-2 subtree after break-before-make") Reported-by: Yu Zhao Signed-off-by: Oliver Upton Tested-by: Yu Zhao Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230530193213.1663411-1-oliver.upton@linux.dev commit 36eec020fab668719b541f34d97f44e232ffa165 Author: Zhengchao Shao Date: Sat May 27 17:37:47 2023 +0800 net: sched: fix NULL pointer dereference in mq_attach When use the following command to test: 1)ip link add bond0 type bond 2)ip link set bond0 up 3)tc qdisc add dev bond0 root handle ffff: mq 4)tc qdisc replace dev bond0 parent ffff:fff1 handle ffff: mq The kernel reports NULL pointer dereference issue. The stack information is as follows: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 Internal error: Oops: 0000000096000006 [#1] SMP Modules linked in: pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : mq_attach+0x44/0xa0 lr : qdisc_graft+0x20c/0x5cc sp : ffff80000e2236a0 x29: ffff80000e2236a0 x28: ffff0000c0e59d80 x27: ffff0000c0be19c0 x26: ffff0000cae3e800 x25: 0000000000000010 x24: 00000000fffffff1 x23: 0000000000000000 x22: ffff0000cae3e800 x21: ffff0000c9df4000 x20: ffff0000c9df4000 x19: 0000000000000000 x18: ffff80000a934000 x17: ffff8000f5b56000 x16: ffff80000bb08000 x15: 0000000000000000 x14: 0000000000000000 x13: 6b6b6b6b6b6b6b6b x12: 6b6b6b6b00000001 x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000 x8 : ffff0000c0be0730 x7 : bbbbbbbbbbbbbbbb x6 : 0000000000000008 x5 : ffff0000cae3e864 x4 : 0000000000000000 x3 : 0000000000000001 x2 : 0000000000000001 x1 : ffff8000090bc23c x0 : 0000000000000000 Call trace: mq_attach+0x44/0xa0 qdisc_graft+0x20c/0x5cc tc_modify_qdisc+0x1c4/0x664 rtnetlink_rcv_msg+0x354/0x440 netlink_rcv_skb+0x64/0x144 rtnetlink_rcv+0x28/0x34 netlink_unicast+0x1e8/0x2a4 netlink_sendmsg+0x308/0x4a0 sock_sendmsg+0x64/0xac ____sys_sendmsg+0x29c/0x358 ___sys_sendmsg+0x90/0xd0 __sys_sendmsg+0x7c/0xd0 __arm64_sys_sendmsg+0x2c/0x38 invoke_syscall+0x54/0x114 el0_svc_common.constprop.1+0x90/0x174 do_el0_svc+0x3c/0xb0 el0_svc+0x24/0xec el0t_64_sync_handler+0x90/0xb4 el0t_64_sync+0x174/0x178 This is because when mq is added for the first time, qdiscs in mq is set to NULL in mq_attach(). Therefore, when replacing mq after adding mq, we need to initialize qdiscs in the mq before continuing to graft. Otherwise, it will couse NULL pointer dereference issue in mq_attach(). And the same issue will occur in the attach functions of mqprio, taprio and htb. ffff:fff1 means that the repalce qdisc is ingress. Ingress does not allow any qdisc to be attached. Therefore, ffff:fff1 is incorrectly used, and the command should be dropped. Fixes: 6ec1c69a8f64 ("net_sched: add classful multiqueue dummy scheduler") Signed-off-by: Zhengchao Shao Tested-by: Peilin Ye Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20230527093747.3583502-1-shaozhengchao@huawei.com Signed-off-by: Jakub Kicinski commit bb50f12c69030c9a1aa5dfa26ea947f38c4c99f9 Merge: 7ba0732c805fd 9de95df5d15ba Author: Jakub Kicinski Date: Tue May 30 23:31:06 2023 -0700 Merge branch 'net-sched-fixes-for-sch_ingress-and-sch_clsact' Peilin Ye says: ==================== net/sched: Fixes for sch_ingress and sch_clsact These are v6 fixes for ingress and clsact Qdiscs, including only first 4 patches (already tested and reviewed) from v5. Patch 5 and 6 from previous versions are still under discussion and will be sent separately. [a] https://syzkaller.appspot.com/bug?extid=b53a9c0d1ea4ad62da8b Link to v5: https://lore.kernel.org/r/cover.1684887977.git.peilin.ye@bytedance.com/ Link to v4: https://lore.kernel.org/r/cover.1684825171.git.peilin.ye@bytedance.com/ Link to v3 (incomplete): https://lore.kernel.org/r/cover.1684821877.git.peilin.ye@bytedance.com/ Link to v2: https://lore.kernel.org/r/cover.1684796705.git.peilin.ye@bytedance.com/ Link to v1: https://lore.kernel.org/r/cover.1683326865.git.peilin.ye@bytedance.com/ ==================== Link: https://lore.kernel.org/r/cover.1685388545.git.peilin.ye@bytedance.com Signed-off-by: Jakub Kicinski commit 9de95df5d15baa956c2b70b9e794842e790a8a13 Author: Peilin Ye Date: Mon May 29 12:54:26 2023 -0700 net/sched: Prohibit regrafting ingress or clsact Qdiscs Currently, after creating an ingress (or clsact) Qdisc and grafting it under TC_H_INGRESS (TC_H_CLSACT), it is possible to graft it again under e.g. a TBF Qdisc: $ ip link add ifb0 type ifb $ tc qdisc add dev ifb0 handle 1: root tbf rate 20kbit buffer 1600 limit 3000 $ tc qdisc add dev ifb0 clsact $ tc qdisc link dev ifb0 handle ffff: parent 1:1 $ tc qdisc show dev ifb0 qdisc tbf 1: root refcnt 2 rate 20Kbit burst 1600b lat 560.0ms qdisc clsact ffff: parent ffff:fff1 refcnt 2 ^^^^^^^^ clsact's refcount has increased: it is now grafted under both TC_H_CLSACT and 1:1. ingress and clsact Qdiscs should only be used under TC_H_INGRESS (TC_H_CLSACT). Prohibit regrafting them. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Fixes: 1f211a1b929c ("net, sched: add clsact qdisc") Tested-by: Pedro Tammela Acked-by: Jamal Hadi Salim Reviewed-by: Jamal Hadi Salim Reviewed-by: Vlad Buslov Signed-off-by: Peilin Ye Signed-off-by: Jakub Kicinski commit f85fa45d4a9408d98c46c8fa45ba2e3b2f4bf219 Author: Peilin Ye Date: Mon May 29 12:54:03 2023 -0700 net/sched: Reserve TC_H_INGRESS (TC_H_CLSACT) for ingress (clsact) Qdiscs Currently it is possible to add e.g. an HTB Qdisc under ffff:fff1 (TC_H_INGRESS, TC_H_CLSACT): $ ip link add name ifb0 type ifb $ tc qdisc add dev ifb0 parent ffff:fff1 htb $ tc qdisc add dev ifb0 clsact Error: Exclusivity flag on, cannot modify. $ drgn ... >>> ifb0 = netdev_get_by_name(prog, "ifb0") >>> qdisc = ifb0.ingress_queue.qdisc_sleeping >>> print(qdisc.ops.id.string_().decode()) htb >>> qdisc.flags.value_() # TCQ_F_INGRESS 2 Only allow ingress and clsact Qdiscs under ffff:fff1. Return -EINVAL for everything else. Make TCQ_F_INGRESS a static flag of ingress and clsact Qdiscs. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Fixes: 1f211a1b929c ("net, sched: add clsact qdisc") Tested-by: Pedro Tammela Acked-by: Jamal Hadi Salim Reviewed-by: Jamal Hadi Salim Reviewed-by: Vlad Buslov Signed-off-by: Peilin Ye Signed-off-by: Jakub Kicinski commit 5eeebfe6c493192b10d516abfd72742900f2a162 Author: Peilin Ye Date: Mon May 29 12:53:21 2023 -0700 net/sched: sch_clsact: Only create under TC_H_CLSACT clsact Qdiscs are only supposed to be created under TC_H_CLSACT (which equals TC_H_INGRESS). Return -EOPNOTSUPP if 'parent' is not TC_H_CLSACT. Fixes: 1f211a1b929c ("net, sched: add clsact qdisc") Tested-by: Pedro Tammela Acked-by: Jamal Hadi Salim Reviewed-by: Jamal Hadi Salim Reviewed-by: Vlad Buslov Signed-off-by: Peilin Ye Signed-off-by: Jakub Kicinski commit c7cfbd115001f94de9e4053657946a383147e803 Author: Peilin Ye Date: Mon May 29 12:52:55 2023 -0700 net/sched: sch_ingress: Only create under TC_H_INGRESS ingress Qdiscs are only supposed to be created under TC_H_INGRESS. Return -EOPNOTSUPP if 'parent' is not TC_H_INGRESS, similar to mq_init(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+b53a9c0d1ea4ad62da8b@syzkaller.appspotmail.com Closes: https://lore.kernel.org/r/0000000000006cf87705f79acf1a@google.com/ Tested-by: Pedro Tammela Acked-by: Jamal Hadi Salim Reviewed-by: Jamal Hadi Salim Reviewed-by: Vlad Buslov Signed-off-by: Peilin Ye Signed-off-by: Jakub Kicinski commit c7275ce6a5fd32ca9f5a6294ed89cf0523181af9 Author: Uday Shankar Date: Thu May 25 12:22:04 2023 -0600 nvme: improve handling of long keep alives Upon keep alive completion, nvme_keep_alive_work is scheduled with the same delay every time. If keep alive commands are completing slowly, this may cause a keep alive timeout. The following trace illustrates the issue, taking KATO = 8 and TBKAS off for simplicity: 1. t = 0: run nvme_keep_alive_work, send keep alive 2. t = ε: keep alive reaches controller, controller restarts its keep alive timer 3. t = 4: host receives keep alive completion, schedules nvme_keep_alive_work with delay 4 4. t = 8: run nvme_keep_alive_work, send keep alive Here, a keep alive having RTT of 4 causes a delay of at least 8 - ε between the controller receiving successive keep alives. With ε small, the controller is likely to detect a keep alive timeout. Fix this by calculating the RTT of the keep alive command, and adjusting the scheduling delay of the next keep alive work accordingly. Reported-by: Costa Sapuntzakis Reported-by: Randy Jennings Signed-off-by: Uday Shankar Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 48b1320a674e1ff5de2fad8606bee38f724594dc Merge: afead42fdfcae 5ad9b4719fc9b Author: Linus Torvalds Date: Tue May 30 17:23:50 2023 -0400 Merge tag 'for-6.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "One bug fix and two build warning fixes: - call proper end bio callback for metadata RAID0 in a rare case of an unaligned block - fix uninitialized variable (reported by gcc 10.2) - fix warning about potential access beyond array bounds on mips64 with 64k pages (runtime check would not allow that)" * tag 'for-6.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix csum_tree_block page iteration to avoid tripping on -Werror=array-bounds btrfs: fix an uninitialized variable warning in btrfs_log_inode btrfs: call btrfs_orig_bbio_end_io in btrfs_end_bio_work commit afead42fdfcae714fb6ac41a5c323629cdb6f9ee Merge: 1683c329b6a2e c041d33bf7ec7 Author: Linus Torvalds Date: Tue May 30 17:12:13 2023 -0400 Merge tag 'perf-tools-fixes-for-v6.4-2-2023-05-30' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix BPF CO-RE naming convention for checking the availability of fields on 'union perf_mem_data_src' on the running kernel - Remove the use of llvm-strip on BPF skel object files, not needed, fixes a build breakage when the llvm package, that contains it in most distros, isn't installed - Fix tools that use both evsel->{bpf_counter_list,bpf_filters}, removing them from a union - Remove extra "--" from the 'perf ftrace latency' --use-nsec option, previously it was working only when using the '-n' alternative - Don't stop building when both binutils-devel and a C++ compiler isn't available to compile the alternative C++ demangle support code, disable that feature instead - Sync the linux/in.h and coresight-pmu.h header copies with the kernel sources - Fix relative include path to cs-etm.h * tag 'perf-tools-fixes-for-v6.4-2-2023-05-30' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf evsel: Separate bpf_counter_list and bpf_filters, can be used at the same time tools headers UAPI: Sync the linux/in.h with the kernel sources perf cs-etm: Copy kernel coresight-pmu.h header perf bpf: Do not use llvm-strip on BPF binary perf build: Don't compile demangle-cxx.cpp if not necessary perf arm: Fix include path to cs-etm.h perf bpf filter: Fix a broken perf sample data naming for BPF CO-RE perf ftrace latency: Remove unnecessary "--" from --use-nsec option commit 1683c329b6a2ee54989811089854a8ac2d5b5fc1 Merge: 6d86b56f54533 0cc6578048e09 Author: Linus Torvalds Date: Tue May 30 17:07:25 2023 -0400 Merge tag 'regmap-fix-v6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fixes from Mark Brown: "The most important fix here is for missing dropping of the RCU read lock when syncing maple tree register caches, the physical devices I have that use the code don't do any syncing so I'd only ever tested this with virtual devices and missed the fact that we need to drop the lock in order to write to buses that need to sleep. Otherwise there's a fix for an edge case when splitting up large batch writes which has been lurking for a long time, a check to make sure nobody writes new drivers with a bug that was found in several SoundWire drivers and a tweak to the way the new kunit tests are enabled to ensure they don't cause regmap to be enabled when it wouldn't otherwise be" * tag 'regmap-fix-v6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: maple: Drop the RCU read lock while syncing registers regmap: sdw: check for invalid multi-register writes config regmap: Account for register length when chunking regmap: REGMAP_KUNIT should not select REGMAP commit 6d86b56f54533025d94df25d77ed324344e02337 Merge: 8b817fded42d8 db3e33dd8bd95 Author: Linus Torvalds Date: Tue May 30 15:49:40 2023 -0400 Merge tag 'modules-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull modules fix from Luis Chamberlain: "A fix is provided for ia64. Even though ia64 is on life support it helps to fix issues if we can. Thanks to Linus for doing tons of the ia64 debugging" * tag 'modules-6.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: module: fix module load for ia64 commit eb1f822c76beeaa76ab8b6737ab9dc9f9798408c Author: Theodore Ts'o Date: Fri May 26 23:57:29 2023 -0400 ext4: enable the lazy init thread when remounting read/write In commit a44be64bbecb ("ext4: don't clear SB_RDONLY when remounting r/w until quota is re-enabled") we defer clearing tyhe SB_RDONLY flag in struct super. However, we didn't defer when we checked sb_rdonly() to determine the lazy itable init thread should be enabled, with the next result that the lazy inode table initialization would not be properly started. This can cause generic/231 to fail in ext4's nojournal mode. Fix this by moving when we decide to start or stop the lazy itable init thread to after we clear the SB_RDONLY flag when we are remounting the file system read/write. Fixes a44be64bbecb ("ext4: don't clear SB_RDONLY when remounting r/w until...") Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230527035729.1001605-1-tytso@mit.edu Signed-off-by: Theodore Ts'o commit 1077b2d53ef53629c14106aecf633bebd286c04c Author: Jan Kara Date: Wed May 24 12:44:53 2023 +0200 ext4: fix fsync for non-directories Commit e360c6ed7274 ("ext4: Drop special handling of journalled data from ext4_sync_file()") simplified ext4_sync_file() by dropping special handling of journalled data mode as it was not needed anymore. However that branch was also used for directories and symlinks and since the fastcommit code does not track metadata changes to non-regular files, the change has caused e.g. fsync(2) on directories to not commit transaction as it should. Fix the problem by adding handling for non-regular files. Fixes: e360c6ed7274 ("ext4: Drop special handling of journalled data from ext4_sync_file()") Reported-by: Eric Whitney Link: https://lore.kernel.org/all/ZFqO3xVnmhL7zv1x@debian-BULLSEYE-live-builder-AMD64 Signed-off-by: Jan Kara Tested-by: Eric Whitney Link: https://lore.kernel.org/r/20230524104453.8734-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit aff3bea95388299eec63440389b4545c8041b357 Author: Theodore Ts'o Date: Tue May 23 23:49:51 2023 -0400 ext4: add lockdep annotations for i_data_sem for ea_inode's Treat i_data_sem for ea_inodes as being in their own lockdep class to avoid lockdep complaints about ext4_setattr's use of inode_lock() on normal inodes potentially causing lock ordering with i_data_sem on ea_inodes in ext4_xattr_inode_write(). However, ea_inodes will be operated on by ext4_setattr(), so this isn't a problem. Cc: stable@kernel.org Link: https://syzkaller.appspot.com/bug?extid=298c5d8fb4a128bc27b0 Reported-by: syzbot+298c5d8fb4a128bc27b0@syzkaller.appspotmail.com Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230524034951.779531-5-tytso@mit.edu Signed-off-by: Theodore Ts'o commit 2bc7e7c1a3bc9bd0cbf0f71006f6fe7ef24a00c2 Author: Theodore Ts'o Date: Tue May 23 23:49:50 2023 -0400 ext4: disallow ea_inodes with extended attributes An ea_inode stores the value of an extended attribute; it can not have extended attributes itself, or this will cause recursive nightmares. Add a check in ext4_iget() to make sure this is the case. Cc: stable@kernel.org Reported-by: syzbot+e44749b6ba4d0434cd47@syzkaller.appspotmail.com Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230524034951.779531-4-tytso@mit.edu Signed-off-by: Theodore Ts'o commit b928dfdcb27d8fa59917b794cfba53052a2f050f Author: Theodore Ts'o Date: Tue May 23 23:49:49 2023 -0400 ext4: set lockdep subclass for the ea_inode in ext4_xattr_inode_cache_find() If the ea_inode has been pushed out of the inode cache while there is still a reference in the mb_cache, the lockdep subclass will not be set on the inode, which can lead to some lockdep false positives. Fixes: 33d201e0277b ("ext4: fix lockdep warning about recursive inode locking") Cc: stable@kernel.org Reported-by: syzbot+d4b971e744b1f5439336@syzkaller.appspotmail.com Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230524034951.779531-3-tytso@mit.edu Signed-off-by: Theodore Ts'o commit d19663edc91de65ae85eea9902addc9d04b0ceb6 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:43 2023 +0100 fbdev: bw2: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit a3ce8c8ffb6fdee842b703da78bd81eac0f16d71 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:42 2023 +0100 fbdev: broadsheetfb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 4b88b6e1c4ec832b02a65b51489692b58d2c6f84 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:41 2023 +0100 fbdev: au1200fb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit bf76544d4515ac543cb9e5c666eebf3866e662a7 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:40 2023 +0100 fbdev: au1100fb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 4369e38a6f1978b48f9200d2a69ce4658db76047 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:39 2023 +0100 fbdev: arcfb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit d00394e1395be9e27f58d58a61642a2a5df10405 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:38 2023 +0100 fbdev: au1100fb: Drop if with an always false condition The driver core never calls a remove callback with the platform_device pointer being NULL. So the check for this condition can just be dropped. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit db3e33dd8bd956f165436afdbdbf1c653fb3c8e6 Author: Song Liu Date: Sun May 28 16:00:41 2023 -0700 module: fix module load for ia64 Frank reported boot regression in ia64 as: ELILO v3.16 for EFI/IA-64 .. Uncompressing Linux... done Loading file AC100221.initrd.img...done [ 0.000000] Linux version 6.4.0-rc3 (root@x4270) (ia64-linux-gcc (GCC) 12.2.0, GNU ld (GNU Binutils) 2.39) #1 SMP Thu May 25 15:52:20 CEST 2023 [ 0.000000] efi: EFI v1.1 by HP [ 0.000000] efi: SALsystab=0x3ee7a000 ACPI 2.0=0x3fe2a000 ESI=0x3ee7b000 SMBIOS=0x3ee7c000 HCDP=0x3fe28000 [ 0.000000] PCDP: v3 at 0x3fe28000 [ 0.000000] earlycon: uart8250 at MMIO 0x00000000f4050000 (options '9600n8') [ 0.000000] printk: bootconsole [uart8250] enabled [ 0.000000] ACPI: Early table checksum verification disabled [ 0.000000] ACPI: RSDP 0x000000003FE2A000 000028 (v02 HP ) [ 0.000000] ACPI: XSDT 0x000000003FE2A02C 0000CC (v01 HP rx2620 00000000 HP 00000000) [...] [ 3.793350] Run /init as init process Loading, please wait... Starting systemd-udevd version 252.6-1 [ 3.951100] ------------[ cut here ]------------ [ 3.951100] WARNING: CPU: 6 PID: 140 at kernel/module/main.c:1547 __layout_sections+0x370/0x3c0 [ 3.949512] Unable to handle kernel paging request at virtual address 1000000000000000 [ 3.951100] Modules linked in: [ 3.951100] CPU: 6 PID: 140 Comm: (udev-worker) Not tainted 6.4.0-rc3 #1 [ 3.956161] (udev-worker)[142]: Oops 11003706212352 [1] [ 3.951774] Hardware name: hp server rx2620 , BIOS 04.29 11/30/2007 [ 3.951774] [ 3.951774] Call Trace: [ 3.958339] Unable to handle kernel paging request at virtual address 1000000000000000 [ 3.956161] Modules linked in: [ 3.951774] [] show_stack.part.0+0x30/0x60 [ 3.951774] sp=e000000183a67b20 bsp=e000000183a61628 [ 3.956161] [ 3.956161] which bisect to module_memory change [1]. Debug showed that ia64 uses some special sections: __layout_sections: section .got (sh_flags 10000002) matched to MOD_INVALID __layout_sections: section .sdata (sh_flags 10000003) matched to MOD_INVALID __layout_sections: section .sbss (sh_flags 10000003) matched to MOD_INVALID All these sections are loaded to module core memory before [1]. Fix ia64 boot by loading these sections to MOD_DATA (core rw data). [1] commit ac3b43283923 ("module: replace module_layout with module_memory") Fixes: ac3b43283923 ("module: replace module_layout with module_memory") Reported-by: Frank Scheiner Closes: https://lists.debian.org/debian-ia64/2023/05/msg00010.html Closes: https://marc.info/?l=linux-ia64&m=168509859125505 Cc: Linus Torvalds Signed-off-by: Song Liu Tested-by: John Paul Adrian Glaubitz Signed-off-by: Luis Chamberlain commit 774a9636514764ddc0d072ae0d1d1c01a47e6ddd Author: Uday Shankar Date: Thu May 25 12:22:03 2023 -0600 nvme: check IO start time when deciding to defer KA When a command completes, we set a flag which will skip sending a keep alive at the next run of nvme_keep_alive_work when TBKAS is on. However, if the command was submitted long ago, it's possible that the controller may have also restarted its keep alive timer (as a result of receiving the command) long ago. The following trace demonstrates the issue, assuming TBKAS is on and KATO = 8 for simplicity: 1. t = 0: submit I/O commands A, B, C, D, E 2. t = 0.5: commands A, B, C, D, E reach controller, restart its keep alive timer 3. t = 1: A completes 4. t = 2: run nvme_keep_alive_work, see recent completion, do nothing 5. t = 3: B completes 6. t = 4: run nvme_keep_alive_work, see recent completion, do nothing 7. t = 5: C completes 8. t = 6: run nvme_keep_alive_work, see recent completion, do nothing 9. t = 7: D completes 10. t = 8: run nvme_keep_alive_work, see recent completion, do nothing 11. t = 9: E completes At this point, 8.5 seconds have passed without restarting the controller's keep alive timer, so the controller will detect a keep alive timeout. Fix this by checking the IO start time when deciding to defer sending a keep alive command. Only set comp_seen if the command started after the most recent run of nvme_keep_alive_work. With this change, the completions of B, C, and D will not set comp_seen and the run of nvme_keep_alive_work at t = 4 will send a keep alive. Reported-by: Costa Sapuntzakis Reported-by: Randy Jennings Signed-off-by: Uday Shankar Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit ea4d453b9ec9ea279c39744cd0ecb47ef48ede35 Author: Uday Shankar Date: Thu May 25 12:22:02 2023 -0600 nvme: double KA polling frequency to avoid KATO with TBKAS on With TBKAS on, the completion of one command can defer sending a keep alive for up to twice the delay between successive runs of nvme_keep_alive_work. The current delay of KATO / 2 thus makes it possible for one command to defer sending a keep alive for up to KATO, which can result in the controller detecting a KATO. The following trace demonstrates the issue, taking KATO = 8 for simplicity: 1. t = 0: run nvme_keep_alive_work, no keep-alive sent 2. t = ε: I/O completion seen, set comp_seen = true 3. t = 4: run nvme_keep_alive_work, see comp_seen == true, skip sending keep-alive, set comp_seen = false 4. t = 8: run nvme_keep_alive_work, see comp_seen == false, send a keep-alive command. Here, there is a delay of 8 - ε between receiving a command completion and sending the next command. With ε small, the controller is likely to detect a keep alive timeout. Fix this by running nvme_keep_alive_work with a delay of KATO / 4 whenever TBKAS is on. Going through the above trace now gives us a worst-case delay of 4 - ε, which is in line with the recommendation of sending a command every KATO / 2 in the NVMe specification. Reported-by: Costa Sapuntzakis Reported-by: Randy Jennings Signed-off-by: Uday Shankar Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 31a5978243d24d77be4bacca56c78a0fbc43b00d Author: min15.li Date: Fri May 26 17:06:56 2023 +0000 nvme: fix miss command type check In the function nvme_passthru_end(), only the value of the command opcode is checked, without checking the command type (IO command or Admin command). When we send a Dataset Management command (The opcode of the Dataset Management command is the same as the Set Feature command), kernel thinks it is a set feature command, then sets the controller's keep alive interval, and calls nvme_keep_alive_work(). Signed-off-by: min15.li Reviewed-by: Kanchan Joshi Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit fcfe84236ec0974fe92f0578d1d58ed805c4b70f Author: Roger Quadros Date: Tue May 30 09:59:26 2023 +0300 usb: typec: tps6598x: Fix broken polling mode after system suspend/resume During system resume we need to resume the polling workqueue if client->irq is not set else polling will no longer work. Fixes: 0d6a119cecd7 ("usb: typec: tps6598x: Add support for polling interrupts status") Signed-off-by: Roger Quadros Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230530065926.6161-1-rogerq@kernel.org Signed-off-by: Greg Kroah-Hartman commit 0c331fd1dccfba657129380ee084b95c1cedfbef Author: Stephan Gerhold Date: Thu May 18 15:04:25 2023 +0200 spi: qup: Request DMA before enabling clocks It is usually better to request all necessary resources (clocks, regulators, ...) before starting to make use of them. That way they do not change state in case one of the resources is not available yet and probe deferral (-EPROBE_DEFER) is necessary. This is particularly important for DMA channels and IOMMUs which are not enforced by fw_devlink yet (unless you use fw_devlink.strict=1). spi-qup does this in the wrong order, the clocks are enabled and disabled again when the DMA channels are not available yet. This causes issues in some cases: On most SoCs one of the SPI QUP clocks is shared with the UART controller. When using earlycon UART is actively used during boot but might not have probed yet, usually for the same reason (waiting for the DMA controller). In this case, the brief enable/disable cycle ends up gating the clock and further UART console output will halt the system completely. Avoid this by requesting the DMA channels before changing the clock state. Fixes: 612762e82ae6 ("spi: qup: Add DMA capabilities") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20230518-spi-qup-clk-defer-v1-1-f49fc9ca4e02@gerhold.net Signed-off-by: Mark Brown commit e384dba03e3294ce7ea69e4da558e9bf8f0e8946 Author: Edson Juliano Drosdeck Date: Mon May 29 15:19:11 2023 -0300 ASoC: nau8824: Add quirk to active-high jack-detect Add entries for Positivo laptops: CW14Q01P, K1424G, N14ZP74G to the DMI table, so that active-high jack-detect will work properly on these laptops. Signed-off-by: Edson Juliano Drosdeck Link: https://lore.kernel.org/r/20230529181911.632851-1-edson.drosdeck@gmail.com Signed-off-by: Mark Brown commit b6b5c6426efe27cbd954409a50604d99c79bd42b Author: Vijendar Mukunda Date: Thu May 25 16:59:55 2023 +0530 ASoC: amd: ps: fix for acp_lock access in pdm driver Sending the mutex address(acp_lock) as platform data during ACP PDM platform driver register sequence, its creating copy of the platform data. Referencing this platform data in ACP PDM driver results incorrect reference to the common lock usage. Instead of directly passing the lock address as platform data, retrieve it from parent driver data structure and use the same lock reference in ACP PDM driver. Fixes: 45aa83cb9388 ("ASoC: amd: ps: use acp_lock to protect common registers in pdm driver") Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20230525113000.1290758-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 7183c37fd53eee1e795206e625da12a5d7ec1e1a Author: Herve Codina Date: Tue May 23 10:59:02 2023 +0200 serial: cpm_uart: Fix a COMPILE_TEST dependency In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is set. Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configuration that needs SERIAL_CPM without enabling CPM2. This lead to: depends on CPM2 || CPM1 || (PPC32 && CPM2 && COMPILE_TEST) This dependency does not make sense anymore and can be simplified removing all the COMPILE_TEST part. Signed-off-by: Herve Codina Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202305160221.9XgweObz-lkp@intel.com/ Fixes: e3e7b13bffae ("serial: allow COMPILE_TEST for some drivers") Cc: stable Link: https://lore.kernel.org/r/20230523085902.75837-3-herve.codina@bootlin.com Signed-off-by: Greg Kroah-Hartman commit 192d43e91e0fdbd51b64ba36e773cbdf38dda505 Author: Herve Codina Date: Tue May 23 10:59:01 2023 +0200 soc: fsl: cpm1: Fix TSA and QMC dependencies in case of COMPILE_TEST In order to compile tsa.c and qmc.c, CONFIG_CPM must be set. Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configurations that need QMC without enabling CPM. Signed-off-by: Herve Codina Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202305160221.9XgweObz-lkp@intel.com/ Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/20230523085902.75837-2-herve.codina@bootlin.com Signed-off-by: Greg Kroah-Hartman commit 2474e05467c00f7d51af3039b664de6886325257 Author: Sherry Sun Date: Fri May 19 17:47:51 2023 +0800 tty: serial: fsl_lpuart: use UARTCTRL_TXINV to send break instead of UARTCTRL_SBK LPUART IP now has two known bugs, one is that CTS has higher priority than the break signal, which causes the break signal sending through UARTCTRL_SBK may impacted by the CTS input if the HW flow control is enabled. It exists on all platforms we support in this driver. So we add a workaround patch for this issue: commit c4c81db5cf8b ("tty: serial: fsl_lpuart: disable the CTS when send break signal"). Another IP bug is i.MX8QM LPUART may have an additional break character being sent after SBK was cleared. It may need to add some delay between clearing SBK and re-enabling CTS to ensure that the SBK latch are completely cleared. But we found that during the delay period before CTS is enabled, there is still a risk that Bluetooth data in TX FIFO may be sent out during this period because of break off and CTS disabled(even if BT sets CTS line deasserted, data is still sent to BT). Due to this risk, we have to drop the CTS-disabling workaround for SBK bugs, use TXINV seems to be a better way to replace SBK feature and avoid above risk. Also need to disable the transmitter to prevent any data from being sent out during break, then invert the TX line to send break. Then disable the TXINV when turn off break and re-enable transmitter. Fixes: c4c81db5cf8b ("tty: serial: fsl_lpuart: disable the CTS when send break signal") Cc: stable Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20230519094751.28948-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 134f49dec0b6aca3259cd8259de4c572048bd207 Author: Christophe JAILLET Date: Sun May 14 13:25:42 2023 +0200 serial: 8250_tegra: Fix an error handling path in tegra_uart_probe() If an error occurs after reset_control_deassert(), it must be re-asserted, as already done in the .remove() function. Fixes: c6825c6395b7 ("serial: 8250_tegra: Create Tegra specific 8250 driver") Cc: stable Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/f8130f35339cc80edc6b9aac4bb2a60b60a226bf.1684063511.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 7ba0732c805fdc623494ff36245d84222ba893e3 Merge: 1919b39fc6eab 63212608a92a1 Author: Paolo Abeni Date: Tue May 30 13:21:05 2023 +0200 Merge branch 'selftests-mptcp-skip-tests-not-supported-by-old-kernels-part-1' Matthieu Baerts says: ==================== selftests: mptcp: skip tests not supported by old kernels (part 1) After a few years of increasing test coverage in the MPTCP selftests, we realised [1] the last version of the selftests is supposed to run on old kernels without issues. Supporting older versions is not that easy for this MPTCP case: these selftests are often validating the internals by checking packets that are exchanged, when some MIB counters are incremented after some actions, how connections are getting opened and closed in some cases, etc. In other words, it is not limited to the socket interface between the userspace and the kernelspace. In addition, the current selftests run a lot of different sub-tests but the TAP13 protocol used in the selftests don't support sub-tests: in other words, one failure in sub-tests implies that the whole selftest is seen as failed at the end because sub-tests are not tracked. It is then important to skip sub-tests not supported by old kernels. To minimise the modifications and reduce the complexity to support old versions, the idea is to look at external signs and skip the whole selftests or just some sub-tests before starting them. This first part focuses on marking the different selftests as skipped if MPTCP is not even supported. That's what is done in patches 2 to 8. Patch 2/8 introduces a new file (mptcp_lib.sh) to be able to re-use some helpers in the different selftests. The first MPTCP selftest has been introduced in v5.6. Patch 1/8 is a bit different but still linked: it modifies mptcp_join.sh selftest not to use 'cmp --bytes' which is not supported by the BusyBox implementation. It is apparently quite common to use BusyBox in CI environments. This tool is needed for a subtest introduced in v6.1. Link: https://lore.kernel.org/stable/CA+G9fYtDGpgT4dckXD-y-N92nqUxuvue_7AtDdBcHrbOMsDZLg@mail.gmail.com/ [1] Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 ==================== Link: https://lore.kernel.org/r/20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-v1-0-a32d85577fc6@tessares.net Signed-off-by: Paolo Abeni commit 63212608a92a1ff10ae56dbb14e9fb685f7e4ffa Author: Matthieu Baerts Date: Sun May 28 19:35:33 2023 +0200 selftests: mptcp: userspace pm: skip if MPTCP is not supported Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 259a834fadda ("selftests: mptcp: functional tests for the userspace PM type") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit cf6f0fda7af7e8e016070bfee6b189e671a0c776 Author: Matthieu Baerts Date: Sun May 28 19:35:32 2023 +0200 selftests: mptcp: sockopt: skip if MPTCP is not supported Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: dc65fe82fb07 ("selftests: mptcp: add packet mark test case") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit 9161f21c74a1a0e7bb39eb84ea0c86b23c92fc87 Author: Matthieu Baerts Date: Sun May 28 19:35:31 2023 +0200 selftests: mptcp: simult flows: skip if MPTCP is not supported Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 1a418cb8e888 ("mptcp: simult flow self-tests") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit 46565acdd29facbf418a11e4a3791b3c8967308d Author: Matthieu Baerts Date: Sun May 28 19:35:30 2023 +0200 selftests: mptcp: diag: skip if MPTCP is not supported Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit 715c78a82e00f848f99ef76e6f6b89216ccba268 Author: Matthieu Baerts Date: Sun May 28 19:35:29 2023 +0200 selftests: mptcp: join: skip if MPTCP is not supported Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: b08fbf241064 ("selftests: add test-cases for MPTCP MP_JOIN") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit 0f4955a40dafe18a1122e3714d8173e4b018e869 Author: Matthieu Baerts Date: Sun May 28 19:35:28 2023 +0200 selftests: mptcp: pm nl: skip if MPTCP is not supported Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: eedbc685321b ("selftests: add PM netlink functional tests") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit d83013bdf90a7994a474b0e650a7fc94b0d4ded6 Author: Matthieu Baerts Date: Sun May 28 19:35:27 2023 +0200 selftests: mptcp: connect: skip if MPTCP is not supported Selftests are supposed to run on any kernels, including the old ones not supporting MPTCP. A new check is then added to make sure MPTCP is supported. If not, the test stops and is marked as "skipped". Note that this check can also mark the test as failed if 'SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES' env var is set to 1: by doing that, we can make sure a test is not being skipped by mistake. A new shared file is added here to be able to re-used the same check in the different selftests we have. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Fixes: 048d19d444be ("mptcp: add basic kselftest for mptcp") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit d328fe87067480cf2bd0b58dab428a98d31dbb7e Author: Matthieu Baerts Date: Sun May 28 19:35:26 2023 +0200 selftests: mptcp: join: avoid using 'cmp --bytes' BusyBox's 'cmp' command doesn't support the '--bytes' parameter. Some CIs -- i.e. LKFT -- use BusyBox and have the mptcp_join.sh test failing [1] because their 'cmp' command doesn't support this '--bytes' option: cmp: unrecognized option '--bytes=1024' BusyBox v1.35.0 () multi-call binary. Usage: cmp [-ls] [-n NUM] FILE1 [FILE2] Instead, 'head --bytes' can be used as this option is supported by BusyBox. A temporary file is needed for this operation. Because it is apparently quite common to use BusyBox, it is certainly better to backport this fix to impacted kernels. Fixes: 6bf41020b72b ("selftests: mptcp: update and extend fastclose test-cases") Cc: stable@vger.kernel.org Link: https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.3-rc5-5-g148341f0a2f5/testrun/16088933/suite/kselftest-net-mptcp/test/net_mptcp_userspace_pm_sh/log [1] Suggested-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni commit fb109fba728407fa4a84d659b5cb87cd8399d7b3 Author: Hao Yao Date: Wed May 24 11:51:33 2023 +0800 platform/x86: int3472: Avoid crash in unregistering regulator gpio When int3472 is loaded before GPIO driver, acpi_get_and_request_gpiod() failed but the returned gpio descriptor is not NULL, it will cause panic in later gpiod_put(), so set the gpio_desc to NULL in register error handling to avoid such crash. Signed-off-by: Hao Yao Signed-off-by: Bingbu Cao Link: https://lore.kernel.org/r/20230524035135.90315-1-bingbu.cao@intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 1919b39fc6eabb9a6f9a51706ff6d03865f5df29 Author: Haiyang Zhang Date: Fri May 26 08:38:57 2023 -0700 net: mana: Fix perf regression: remove rx_cqes, tx_cqes counters The apc->eth_stats.rx_cqes is one per NIC (vport), and it's on the frequent and parallel code path of all queues. So, r/w into this single shared variable by many threads on different CPUs creates a lot caching and memory overhead, hence perf regression. And, it's not accurate due to the high volume concurrent r/w. For example, a workload is iperf with 128 threads, and with RPS enabled. We saw perf regression of 25% with the previous patch adding the counters. And this patch eliminates the regression. Since the error path of mana_poll_rx_cq() already has warnings, so keeping the counter and convert it to a per-queue variable is not necessary. So, just remove this counter from this high frequency code path. Also, remove the tx_cqes counter for the same reason. We have warnings & other counters for errors on that path, and don't need to count every normal cqe processing. Cc: stable@vger.kernel.org Fixes: bd7fc6e1957c ("net: mana: Add new MANA VF performance counters for easier troubleshooting") Signed-off-by: Haiyang Zhang Reviewed-by: Horatiu Vultur Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/1685115537-31675-1-git-send-email-haiyangz@microsoft.com Signed-off-by: Paolo Abeni commit 91539341a3b6e9c868024a4292455dae36e6f58c Author: Marc Zyngier Date: Tue May 30 11:01:22 2023 +0100 irqchip/gic: Correctly validate OF quirk descriptors When checking for OF quirks, make sure either 'compatible' or 'property' is set, and give up otherwise. This avoids non-OF quirks being randomly applied as they don't have any of the OF data that need checking. Cc: Douglas Anderson Reported-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Fixes: 44bd78dd2b88 ("irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware issues") Signed-off-by: Marc Zyngier commit 71698da37ce70c457751baea507a122851a2d481 Author: Samuel Iglesias Gonsálvez Date: Tue May 30 10:35:46 2023 +0200 MAINTAINERS: Vaibhav Gupta is the new ipack maintainer I have no longer access to the HW, nor time to properly maintain it. Adding Vaibhav as maintainer as he currently has access to the HW, he is working at CERN (user of these drivers) and he is maintaining them internally there. Signed-off-by: Samuel Iglesias Gonsálvez Acked-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20230530083546.4831-1-vaibhavgupta40@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9da6225bc7377941acff4476493d515b9fdfea48 Author: Ivan Bornyakov Date: Tue May 30 21:49:36 2023 +0800 dt-bindings: fpga: replace Ivan Bornyakov maintainership As I'm leaving Metrotek, hand over Lattice Slave SPI sysCONFIG FPGA manager and Microchip Polarfire FPGA manager maintainership duties to Vladimir. Signed-off-by: Ivan Bornyakov Acked-by: Conor Dooley Acked-by: Vladimir Georgiev Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230429104838.5064-3-i.bornyakov@metrotek.ru Signed-off-by: Xu Yilun Link: https://lore.kernel.org/r/20230530134936.634370-3-yilun.xu@intel.com Signed-off-by: Greg Kroah-Hartman commit 929f4e7c06ca40c8e58b418c94708d880518d9b4 Author: Ivan Bornyakov Date: Tue May 30 21:49:35 2023 +0800 MAINTAINERS: update Microchip MPF FPGA reviewers As I'm leaving Metrotek, hand over reviewing duty of Microchip MPF FPGA driver to Vladimir. Signed-off-by: Ivan Bornyakov Acked-by: Conor Dooley Acked-by: Vladimir Georgiev Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20230429104838.5064-2-i.bornyakov@metrotek.ru Signed-off-by: Xu Yilun Link: https://lore.kernel.org/r/20230530134936.634370-2-yilun.xu@intel.com Signed-off-by: Greg Kroah-Hartman commit 111d467485e647843d0ac9862cb290a8445c7167 Merge: 020c69c1a793e 71c6aa0305e3d Author: Paolo Abeni Date: Tue May 30 11:26:33 2023 +0200 Merge branch 'two-fixes-for-smcrv2' Wen Gu says: ==================== Two fixes for SMCRv2 This patch set includes two bugfix for SMCRv2. ==================== Link: https://lore.kernel.org/r/1685101741-74826-1-git-send-email-guwen@linux.alibaba.com Signed-off-by: Paolo Abeni commit 71c6aa0305e3d2365d3bfd0134b4025d9e7ba388 Author: Wen Gu Date: Fri May 26 19:49:01 2023 +0800 net/smc: Don't use RMBs not mapped to new link in SMCRv2 ADD LINK We encountered a crash when using SMCRv2. It is caused by a logical error in smc_llc_fill_ext_v2(). BUG: kernel NULL pointer dereference, address: 0000000000000014 #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: 7 PID: 453 Comm: kworker/7:4 Kdump: loaded Tainted: G W E 6.4.0-rc3+ #44 Workqueue: events smc_llc_add_link_work [smc] RIP: 0010:smc_llc_fill_ext_v2+0x117/0x280 [smc] RSP: 0018:ffffacb5c064bd88 EFLAGS: 00010282 RAX: ffff9a6bc1c3c02c RBX: ffff9a6be3558000 RCX: 0000000000000000 RDX: 0000000000000002 RSI: 0000000000000002 RDI: 000000000000000a RBP: ffffacb5c064bdb8 R08: 0000000000000040 R09: 000000000000000c R10: ffff9a6bc0910300 R11: 0000000000000002 R12: 0000000000000000 R13: 0000000000000002 R14: ffff9a6bc1c3c02c R15: ffff9a6be3558250 FS: 0000000000000000(0000) GS:ffff9a6eefdc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000014 CR3: 000000010b078003 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: smc_llc_send_add_link+0x1ae/0x2f0 [smc] smc_llc_srv_add_link+0x2c9/0x5a0 [smc] ? cc_mkenc+0x40/0x60 smc_llc_add_link_work+0xb8/0x140 [smc] process_one_work+0x1e5/0x3f0 worker_thread+0x4d/0x2f0 ? __pfx_worker_thread+0x10/0x10 kthread+0xe5/0x120 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2c/0x50 When an alernate RNIC is available in system, SMC will try to add a new link based on the RNIC for resilience. All the RMBs in use will be mapped to the new link. Then the RMBs' MRs corresponding to the new link will be filled into SMCRv2 LLC ADD LINK messages. However, smc_llc_fill_ext_v2() mistakenly accesses to unused RMBs which haven't been mapped to the new link and have no valid MRs, thus causing a crash. So this patch fixes the logic. Fixes: b4ba4652b3f8 ("net/smc: extend LLC layer for SMC-Rv2") Signed-off-by: Wen Gu Signed-off-by: Paolo Abeni commit b24aa141c2ff26c919237aee61ea1818fc6780d9 Author: Wen Gu Date: Fri May 26 19:49:00 2023 +0800 net/smc: Scan from current RMB list when no position specified When finding the first RMB of link group, it should start from the current RMB list whose index is 0. So fix it. Fixes: b4ba4652b3f8 ("net/smc: extend LLC layer for SMC-Rv2") Signed-off-by: Wen Gu Signed-off-by: Paolo Abeni commit 061c228967f0e3f7aecdd32ee370ee745d96168d Author: Maximilian Luz Date: Thu May 25 23:32:18 2023 +0200 platform/surface: aggregator_tabletsw: Add support for book mode in POS subsystem Devices with a type-cover have an additional "book" mode, deactivating type-cover input and turning off its backlight. This is currently unsupported, leading to the warning surface_aggregator_tablet_mode_switch 01:26:01:00:01: unknown device posture for type-cover: 6 Therefore, add support for this state and map it to enable tablet-mode. Fixes: 37ff64cd81ff ("platform/surface: aggregator_tabletsw: Add support for Type-Cover posture source") Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20230525213218.2797480-3-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 9bed667033e66083d363a11e9414ad401ecc242c Author: Maximilian Luz Date: Thu May 25 23:32:17 2023 +0200 platform/surface: aggregator_tabletsw: Add support for book mode in KIP subsystem Devices with a type-cover have an additional "book" mode, deactivating type-cover input and turning off its backlight. This is currently unsupported, leading to the warning surface_aggregator_tablet_mode_switch 01:0e:01:00:01: unknown KIP cover state: 6 Therefore, add support for this state and map it to enable tablet-mode. Fixes: 9f794056db5b ("platform/surface: Add KIP/POS tablet-mode switch driver") Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20230525213218.2797480-2-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 539e0a7f9105d19c00629c3f4da00330488e8c60 Author: Maximilian Luz Date: Thu May 25 23:01:10 2023 +0200 platform/surface: aggregator: Allow completion work-items to be executed in parallel Currently, event completion work-items are restricted to be run strictly in non-parallel fashion by the respective workqueue. However, this has lead to some problems: In some instances, the event notifier function called inside this completion workqueue takes a non-negligible amount of time to execute. One such example is the battery event handling code (surface_battery.c), which can result in a full battery information refresh, involving further synchronous communication with the EC inside the event handler. This is made worse if the communication fails spuriously, generally incurring a multi-second timeout. Since the event completions are run strictly non-parallel, this blocks other events from being propagated to the respective subsystems. This becomes especially noticeable for keyboard and touchpad input, which also funnel their events through this system. Here, users have reported occasional multi-second "freezes". Note, however, that the event handling system was never intended to run purely sequentially. Instead, we have one work struct per EC/SAM subsystem, processing the event queue for that subsystem. These work structs were intended to run in parallel, allowing sequential processing of work items for each subsystem but parallel processing of work items across subsystems. The only restriction to this is the way the workqueue is created. Therefore, replace create_workqueue() with alloc_workqueue() and do not restrict the maximum number of parallel work items to be executed on that queue, resolving any cross-subsystem blockage. Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem") Link: https://github.com/linux-surface/linux-surface/issues/1026 Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20230525210110.2785470-1-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit ed08d937eaa4f18aa26e47fe6b937205a4745045 Author: Maximilian Luz Date: Thu May 25 22:50:41 2023 +0200 platform/surface: aggregator: Make to_ssam_device_driver() respect constness Make to_ssam_device_driver() a bit safer by replacing container_of() with container_of_const() to respect the constness of the passed in pointer, instead of silently discarding any const specifications. This change also makes it more similar to to_ssam_device(), which already uses container_of_const(). Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20230525205041.2774947-1-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit aafbb1eeabdc4e9241b400146f77369f041ec11b Author: Steven Rostedt (Google) Date: Mon May 29 04:40:02 2023 -0400 tracing/rv/rtla: Update MAINTAINERS file to point to proper mailing list The mailing list that goes to linux-trace-devel is for the tracing libraries, and the patchwork associated to the tracing libraries keys off of that mailing list. For anything that lives in the Linux kernel proper (including the tools directory) must go through linux-trace-kernel, as the patchwork to that list keys off of the Linux kernel proper. Update the MAINTAINERS file to reflect the proper mailing lists. Link: https://lore.kernel.org/linux-trace-kernel/20230529044002.0481452b@rorschach.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) Acked-by: Daniel Bristot de Oliveira commit 020c69c1a793ed29d28793808eddd75210c858dd Author: David Howells Date: Fri May 26 12:34:54 2023 +0100 rxrpc: Truncate UTS_RELEASE for rxrpc version UTS_RELEASE has a maximum length of 64 which can cause rxrpc_version to exceed the 65 byte message limit. Per the rx spec[1]: "If a server receives a packet with a type value of 13, and the client-initiated flag set, it should respond with a 65-byte payload containing a string that identifies the version of AFS software it is running." The current implementation causes a compile error when WERROR is turned on and/or UTS_RELEASE exceeds the length of 49 (making the version string more than 64 characters). Fix this by generating the string during module initialisation and limiting the UTS_RELEASE segment of the string does not exceed 49 chars. We need to make sure that the 64 bytes includes "linux-" at the front and " AF_RXRPC" at the back as this may be used in pattern matching. Fixes: 44ba06987c0b ("RxRPC: Handle VERSION Rx protocol packets") Reported-by: Kenny Ho Link: https://lore.kernel.org/r/20230523223944.691076-1-Kenny.Ho@amd.com/ Signed-off-by: David Howells Acked-by: Kenny Ho cc: Marc Dionne cc: Andrew Lunn cc: David Laight cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org Link: https://web.mit.edu/kolya/afs/rx/rx-spec [1] Reviewed-by: Simon Horman Reviewed-by: Jeffrey Altman Link: https://lore.kernel.org/r/654974.1685100894@warthog.procyon.org.uk Signed-off-by: Paolo Abeni commit 811154e234db72f0a11557a84ba9640f8b3bc823 Author: Akihiko Odaki Date: Tue May 30 11:46:51 2023 +0900 KVM: arm64: Populate fault info for watchpoint When handling ESR_ELx_EC_WATCHPT_LOW, far_el2 member of struct kvm_vcpu_fault_info will be copied to far member of struct kvm_debug_exit_arch and exposed to the userspace. The userspace will see stale values from older faults if the fault info does not get populated. Fixes: 8fb2046180a0 ("KVM: arm64: Move early handlers to per-EC handlers") Suggested-by: Marc Zyngier Signed-off-by: Akihiko Odaki Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230530024651.10014-1-akihiko.odaki@daynix.com Cc: stable@vger.kernel.org commit 719dfd5925e186e09a2a6f23016936ac436f3d78 Author: Maninder Singh Date: Mon May 29 16:43:37 2023 +0530 powerpc/xmon: Use KSYM_NAME_LEN in array size kallsyms_lookup() which in turn calls kallsyms_lookup_buildid() writes to index "KSYM_NAME_LEN - 1". Thus the array passed as namebuf to kallsyms_lookup() should be KSYM_NAME_LEN in size. In xmon.c the array was defined to be "128" bytes directly, without using KSYM_NAME_LEN. Commit b8a94bfb3395 ("kallsyms: increase maximum kernel symbol length to 512") changed the value to 512, but missed updating the xmon code. Fixes: b8a94bfb3395 ("kallsyms: increase maximum kernel symbol length to 512") Cc: stable@vger.kernel.org # v6.1+ Co-developed-by: Onkarnath Signed-off-by: Onkarnath Signed-off-by: Maninder Singh [mpe: Tweak change log wording and fix commit reference] Signed-off-by: Michael Ellerman Link: https://msgid.link/20230529111337.352990-2-maninder1.s@samsung.com commit 9d2ccf00bddc268045e3d65a8108d61ada0e4b4e Author: Gaurav Batra Date: Thu May 25 09:34:54 2023 -0500 powerpc/iommu: Limit number of TCEs to 512 for H_STUFF_TCE hcall Currently in tce_freemulti_pSeriesLP() there is no limit on how many TCEs are passed to the H_STUFF_TCE hcall. This has not caused an issue until now, but newer firmware releases have started enforcing a limit of 512 TCEs per call. The limit is correct per the specification (PAPR v2.12 § 14.5.4.2.3). The code has been in it's current form since it was initially merged. Cc: stable@vger.kernel.org Signed-off-by: Gaurav Batra Reviewed-by: Brian King [mpe: Tweak change log wording & add PAPR reference] Signed-off-by: Michael Ellerman Link: https://msgid.link/20230525143454.56878-1-gbatra@linux.vnet.ibm.com commit 81d358b118dc364bd147432db569d4d400a5a4f2 Author: Michael Ellerman Date: Thu May 25 12:43:21 2023 +1000 powerpc/crypto: Fix aes-gcm-p10 link errors The recently added P10 AES/GCM code added some files containing CRYPTOGAMS perl-asm code which are near duplicates of the p8 files found in drivers/crypto/vmx. In particular the newly added files produce functions with identical names to the existing code. When the kernel is built with CONFIG_CRYPTO_AES_GCM_P10=y and CONFIG_CRYPTO_DEV_VMX_ENCRYPT=y that leads to link errors, eg: ld: drivers/crypto/vmx/aesp8-ppc.o: in function `aes_p8_set_encrypt_key': (.text+0xa0): multiple definition of `aes_p8_set_encrypt_key'; arch/powerpc/crypto/aesp8-ppc.o:(.text+0xa0): first defined here ... ld: drivers/crypto/vmx/ghashp8-ppc.o: in function `gcm_ghash_p8': (.text+0x140): multiple definition of `gcm_ghash_p8'; arch/powerpc/crypto/ghashp8-ppc.o:(.text+0x2e4): first defined here Fix it for now by renaming the newly added files and functions to use "p10" instead of "p8" in the names. Fixes: 45a4672b9a6e ("crypto: p10-aes-gcm - Update Kconfig and Makefile") Tested-by: Vishal Chourasia Signed-off-by: Michael Ellerman Link: https://msgid.link/20230525150501.37081-1-mpe@ellerman.id.au commit 34dfde4ad87b84d21278a7e19d92b5b2c68e6c4d Author: Cambda Zhu Date: Sat May 27 12:03:17 2023 +0800 tcp: Return user_mss for TCP_MAXSEG in CLOSE/LISTEN state if user_mss set This patch replaces the tp->mss_cache check in getting TCP_MAXSEG with tp->rx_opt.user_mss check for CLOSE/LISTEN sock. Since tp->mss_cache is initialized with TCP_MSS_DEFAULT, checking if it's zero is probably a bug. With this change, getting TCP_MAXSEG before connecting will return default MSS normally, and return user_mss if user_mss is set. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Jack Yang Suggested-by: Eric Dumazet Link: https://lore.kernel.org/netdev/CANn89i+3kL9pYtkxkwxwNMzvC_w3LNUum_2=3u+UyLBmGmifHA@mail.gmail.com/#t Signed-off-by: Cambda Zhu Link: https://lore.kernel.org/netdev/14D45862-36EA-4076-974C-EA67513C92F6@linux.alibaba.com/ Reviewed-by: Jason Xing Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20230527040317.68247-1-cambda@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 4faeee0cf8a5d88d63cdbc3bab124fb0e6aed08c Author: Eric Dumazet Date: Fri May 26 16:34:58 2023 +0000 tcp: deny tcp_disconnect() when threads are waiting Historically connect(AF_UNSPEC) has been abused by syzkaller and other fuzzers to trigger various bugs. A recent one triggers a divide-by-zero [1], and Paolo Abeni was able to diagnose the issue. tcp_recvmsg_locked() has tests about sk_state being not TCP_LISTEN and TCP REPAIR mode being not used. Then later if socket lock is released in sk_wait_data(), another thread can call connect(AF_UNSPEC), then make this socket a TCP listener. When recvmsg() is resumed, it can eventually call tcp_cleanup_rbuf() and attempt a divide by 0 in tcp_rcv_space_adjust() [1] This patch adds a new socket field, counting number of threads blocked in sk_wait_event() and inet_wait_for_connect(). If this counter is not zero, tcp_disconnect() returns an error. This patch adds code in blocking socket system calls, thus should not hurt performance of non blocking ones. Note that we probably could revert commit 499350a5a6e7 ("tcp: initialize rcv_mss to TCP_MIN_MSS instead of 0") to restore original tcpi_rcv_mss meaning (was 0 if no payload was ever received on a socket) [1] divide error: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 13832 Comm: syz-executor.5 Not tainted 6.3.0-rc4-syzkaller-00224-g00c7b5f4ddc5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 RIP: 0010:tcp_rcv_space_adjust+0x36e/0x9d0 net/ipv4/tcp_input.c:740 Code: 00 00 00 00 fc ff df 4c 89 64 24 48 8b 44 24 04 44 89 f9 41 81 c7 80 03 00 00 c1 e1 04 44 29 f0 48 63 c9 48 01 e9 48 0f af c1 <49> f7 f6 48 8d 04 41 48 89 44 24 40 48 8b 44 24 30 48 c1 e8 03 48 RSP: 0018:ffffc900033af660 EFLAGS: 00010206 RAX: 4a66b76cbade2c48 RBX: ffff888076640cc0 RCX: 00000000c334e4ac RDX: 0000000000000000 RSI: dffffc0000000000 RDI: 0000000000000001 RBP: 00000000c324e86c R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880766417f8 R13: ffff888028fbb980 R14: 0000000000000000 R15: 0000000000010344 FS: 00007f5bffbfe700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b32f25000 CR3: 000000007ced0000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tcp_recvmsg_locked+0x100e/0x22e0 net/ipv4/tcp.c:2616 tcp_recvmsg+0x117/0x620 net/ipv4/tcp.c:2681 inet6_recvmsg+0x114/0x640 net/ipv6/af_inet6.c:670 sock_recvmsg_nosec net/socket.c:1017 [inline] sock_recvmsg+0xe2/0x160 net/socket.c:1038 ____sys_recvmsg+0x210/0x5a0 net/socket.c:2720 ___sys_recvmsg+0xf2/0x180 net/socket.c:2762 do_recvmmsg+0x25e/0x6e0 net/socket.c:2856 __sys_recvmmsg net/socket.c:2935 [inline] __do_sys_recvmmsg net/socket.c:2958 [inline] __se_sys_recvmmsg net/socket.c:2951 [inline] __x64_sys_recvmmsg+0x20f/0x260 net/socket.c:2951 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f5c0108c0f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5bffbfe168 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007f5c011ac050 RCX: 00007f5c0108c0f9 RDX: 0000000000000001 RSI: 0000000020000bc0 RDI: 0000000000000003 RBP: 00007f5c010e7b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000122 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5c012cfb1f R14: 00007f5bffbfe300 R15: 0000000000022000 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot Reported-by: Paolo Abeni Diagnosed-by: Paolo Abeni Signed-off-by: Eric Dumazet Tested-by: Paolo Abeni Link: https://lore.kernel.org/r/20230526163458.2880232-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 6ffc57ea004234d9373c57b204fd10370a69f392 Author: Eric Dumazet Date: Fri May 26 15:43:42 2023 +0000 af_packet: do not use READ_ONCE() in packet_bind() A recent patch added READ_ONCE() in packet_bind() and packet_bind_spkt() This is better handled by reading pkt_sk(sk)->num later in packet_do_bind() while appropriate lock is held. READ_ONCE() in writers are often an evidence of something being wrong. Fixes: 822b5a1c17df ("af_packet: Fix data-races of pkt_sk(sk)->num.") Signed-off-by: Eric Dumazet Reviewed-by: Willem de Bruijn Reviewed-by: Jiri Pirko Reviewed-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20230526154342.2533026-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 0684f29a89e58944a9bfae3a8b5c1a217e44c960 Author: Jakub Kicinski Date: Fri May 26 15:06:53 2023 -0700 netlink: specs: correct types of legacy arrays ethtool has some attrs which dump multiple scalars into an attribute. The spec currently expects one attr per entry. Fixes: a353318ebf24 ("tools: ynl: populate most of the ethtool spec") Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230526220653.65538-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 36936a56e1814f6c526fe71fbf980beab4f5577a Author: Sebastian Krzyszkowiak Date: Fri May 26 16:38:11 2023 +0200 net: usb: qmi_wwan: Set DTR quirk for BroadMobi BM818 BM818 is based on Qualcomm MDM9607 chipset. Fixes: 9a07406b00cd ("net: usb: qmi_wwan: Add the BroadMobi BM818 card") Cc: stable@vger.kernel.org Signed-off-by: Sebastian Krzyszkowiak Acked-by: Bjørn Mork Link: https://lore.kernel.org/r/20230526-bm818-dtr-v1-1-64bbfa6ba8af@puri.sm Signed-off-by: Jakub Kicinski commit 7f875850f20a42f488840c9df7af91ef7db2d576 Author: Damien Le Moal Date: Mon May 22 20:09:57 2023 +0900 ata: libata-scsi: Use correct device no in ata_find_dev() For devices not attached to a port multiplier and managed directly by libata, the device number passed to ata_find_dev() must always be lower than the maximum number of devices returned by ata_link_max_devices(). That is 1 for SATA devices or 2 for an IDE link with master+slave devices. This device number is the SCSI device ID which matches these constraints as the IDs are generated per port and so never exceed the maximum number of devices for the link being used. However, for libsas managed devices, SCSI device IDs are assigned per struct scsi_host, leading to device IDs for SATA devices that can be well in excess of libata per-link maximum number of devices. This results in ata_find_dev() to always return NULL for libsas managed devices except for the first device of the target scsi_host with ID (device number) equal to 0. This issue is visible by executing the hdparm utility, which fails. E.g.: hdparm -i /dev/sdX /dev/sdX: HDIO_GET_IDENTITY failed: No message of desired type Fix this by rewriting ata_find_dev() to ignore the device number for non-PMP attached devices with a link with at most 1 device, that is SATA devices. For these, the device number 0 is always used to return the correct pointer to the struct ata_device of the port link. This change excludes IDE master/slave setups (maximum number of devices per link is 2) and port-multiplier attached devices. Also, to be consistant with the fact that SCSI device IDs and channel numbers used as device numbers are both unsigned int, change the devno argument of ata_find_dev() to unsigned int. Reported-by: Xingui Yang Fixes: 41bda9c98035 ("libata-link: update hotplug to handle PMP links") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Jason Yan commit 5842d1d9c1b0d17e0c29eae65ae1f245f83682dd Author: Mustafa Ismail Date: Mon May 22 10:56:54 2023 -0500 RDMA/irdma: Fix Local Invalidate fencing If the local invalidate fence is indicated in the WR, only the read fence is currently being set in WQE. Fix this to set both the read and local fence in the WQE. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Link: https://lore.kernel.org/r/20230522155654.1309-4-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit c8f304d75f6c6cc679a73f89591f9a915da38f09 Author: Mustafa Ismail Date: Mon May 22 10:56:53 2023 -0500 RDMA/irdma: Prevent QP use after free There is a window where the poll cq may use a QP that has been freed. This can happen if a CQE is polled before irdma_clean_cqes() can clear the CQE's related to the QP and the destroy QP races to free the QP memory. then the QP structures are used in irdma_poll_cq. Fix this by moving the clearing of CQE's before the reference is removed and the QP is destroyed. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Link: https://lore.kernel.org/r/20230522155654.1309-3-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit ffe14de983252862c91ad23bd5ca72fd9398d0e6 Author: Michael Margolin Date: Thu May 25 09:44:44 2023 +0000 MAINTAINERS: Update maintainer of Amazon EFA driver Change EFA driver maintainer from Gal Pressman to myself. Keep Gal as a reviewer at his request. Link: https://lore.kernel.org/r/20230525094444.12570-1-mrgolin@amazon.com Signed-off-by: Michael Margolin Acked-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 44d0fb387b53e56c8a050bac5c7d460e21eb226f Author: Ruihan Li Date: Mon May 15 21:09:58 2023 +0800 mm: page_table_check: Ensure user pages are not slab pages The current uses of PageAnon in page table check functions can lead to type confusion bugs between struct page and slab [1], if slab pages are accidentally mapped into the user space. This is because slab reuses the bits in struct page to store its internal states, which renders PageAnon ineffective on slab pages. Since slab pages are not expected to be mapped into the user space, this patch adds BUG_ON(PageSlab(page)) checks to make sure that slab pages are not inadvertently mapped. Otherwise, there must be some bugs in the kernel. Reported-by: syzbot+fcf1a817ceb50935ce99@syzkaller.appspotmail.com Closes: https://lore.kernel.org/lkml/000000000000258e5e05fae79fc1@google.com/ [1] Fixes: df4e817b7108 ("mm: page table check") Cc: # 5.17 Signed-off-by: Ruihan Li Acked-by: Pasha Tatashin Link: https://lore.kernel.org/r/20230515130958.32471-5-lrh2000@pku.edu.cn Signed-off-by: Greg Kroah-Hartman commit 81a31a860bb61d54eb688af2568d9332ed9b8942 Author: Ruihan Li Date: Mon May 15 21:09:57 2023 +0800 mm: page_table_check: Make it dependent on EXCLUSIVE_SYSTEM_RAM Without EXCLUSIVE_SYSTEM_RAM, users are allowed to map arbitrary physical memory regions into the userspace via /dev/mem. At the same time, pages may change their properties (e.g., from anonymous pages to named pages) while they are still being mapped in the userspace, leading to "corruption" detected by the page table check. To avoid these false positives, this patch makes PAGE_TABLE_CHECK depends on EXCLUSIVE_SYSTEM_RAM. This dependency is understandable because PAGE_TABLE_CHECK is a hardening technique but /dev/mem without STRICT_DEVMEM (i.e., !EXCLUSIVE_SYSTEM_RAM) is itself a security problem. Even with EXCLUSIVE_SYSTEM_RAM, I/O pages may be still allowed to be mapped via /dev/mem. However, these pages are always considered as named pages, so they won't break the logic used in the page table check. Cc: # 5.17 Signed-off-by: Ruihan Li Acked-by: David Hildenbrand Acked-by: Pasha Tatashin Link: https://lore.kernel.org/r/20230515130958.32471-4-lrh2000@pku.edu.cn Signed-off-by: Greg Kroah-Hartman commit d0b861653f8c16839c3035875b556afc4472f941 Author: Ruihan Li Date: Mon May 15 21:09:56 2023 +0800 usb: usbfs: Use consistent mmap functions When hcd->localmem_pool is non-null, localmem_pool is used to allocate DMA memory. In this case, the dma address will be properly returned (in dma_handle), and dma_mmap_coherent should be used to map this memory into the user space. However, the current implementation uses pfn_remap_range, which is supposed to map normal pages. Instead of repeating the logic in the memory allocation function, this patch introduces a more robust solution. Here, the type of allocated memory is checked by testing whether dma_handle is properly set. If dma_handle is properly returned, it means some DMA pages are allocated and dma_mmap_coherent should be used to map them. Otherwise, normal pages are allocated and pfn_remap_range should be called. This ensures that the correct mmap functions are used consistently, independently with logic details that determine which type of memory gets allocated. Fixes: a0e710a7def4 ("USB: usbfs: fix mmap dma mismatch") Cc: stable@vger.kernel.org Signed-off-by: Ruihan Li Link: https://lore.kernel.org/r/20230515130958.32471-3-lrh2000@pku.edu.cn Signed-off-by: Greg Kroah-Hartman commit 0143d148d1e882fb1538dc9974c94d63961719b9 Author: Ruihan Li Date: Mon May 15 21:09:55 2023 +0800 usb: usbfs: Enforce page requirements for mmap The current implementation of usbdev_mmap uses usb_alloc_coherent to allocate memory pages that will later be mapped into the user space. Meanwhile, usb_alloc_coherent employs three different methods to allocate memory, as outlined below: * If hcd->localmem_pool is non-null, it uses gen_pool_dma_alloc to allocate memory; * If DMA is not available, it uses kmalloc to allocate memory; * Otherwise, it uses dma_alloc_coherent. However, it should be noted that gen_pool_dma_alloc does not guarantee that the resulting memory will be page-aligned. Furthermore, trying to map slab pages (i.e., memory allocated by kmalloc) into the user space is not resonable and can lead to problems, such as a type confusion bug when PAGE_TABLE_CHECK=y [1]. To address these issues, this patch introduces hcd_alloc_coherent_pages, which addresses the above two problems. Specifically, hcd_alloc_coherent_pages uses gen_pool_dma_alloc_align instead of gen_pool_dma_alloc to ensure that the memory is page-aligned. To replace kmalloc, hcd_alloc_coherent_pages directly allocates pages by calling __get_free_pages. Reported-by: syzbot+fcf1a817ceb50935ce99@syzkaller.appspotmail.comm Closes: https://lore.kernel.org/lkml/000000000000258e5e05fae79fc1@google.com/ [1] Fixes: f7d34b445abc ("USB: Add support for usbfs zerocopy.") Fixes: ff2437befd8f ("usb: host: Fix excessive alignment restriction for local memory allocations") Cc: stable@vger.kernel.org Signed-off-by: Ruihan Li Acked-by: Alan Stern Link: https://lore.kernel.org/r/20230515130958.32471-2-lrh2000@pku.edu.cn Signed-off-by: Greg Kroah-Hartman commit 7b32040f6d7f885ffc09a6df7c17992d56d2eab8 Author: Marek Vasut Date: Mon May 15 19:24:56 2023 +0200 dt-bindings: usb: snps,dwc3: Fix "snps,hsphy_interface" type The "snps,hsphy_interface" is string, not u8. Fix the type. Fixes: 389d77658801 ("dt-bindings: usb: Convert DWC USB3 bindings to DT schema") Cc: stable Reviewed-by: Krzysztof Kozlowski Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20230515172456.179049-1-marex@denx.de Signed-off-by: Greg Kroah-Hartman commit 47fe1c3064c6bc1bfa3c032ff78e603e5dd6e5bc Author: Damien Le Moal Date: Mon May 29 16:32:37 2023 +0900 block: fix revalidate performance regression The scsi driver function sd_read_block_characteristics() always calls disk_set_zoned() to a disk zoned model correctly, in case the device model changed. This is done even for regular disks to set the zoned model to BLK_ZONED_NONE and free any zone related resources if the drive previously was zoned. This behavior significantly impact the time it takes to revalidate disks on a large system as the call to disk_clear_zone_settings() done from disk_set_zoned() for the BLK_ZONED_NONE case results in the device request queued to be frozen, even if there are no zone resources to free. Avoid this overhead for non-zoned devices by not calling disk_clear_zone_settings() in disk_set_zoned() if the device model was already set to BLK_ZONED_NONE, which is always the case for regular devices. Reported by: Brian Bunker Fixes: 508aebb80527 ("block: introduce blk_queue_clear_zone_settings()") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20230529073237.1339862-1-dlemoal@kernel.org Signed-off-by: Jens Axboe commit 016da9c65fec9f0e78c4909ed9a0f2d567af6775 Author: Dan Carpenter Date: Thu May 25 18:38:37 2023 +0300 usb: gadget: udc: fix NULL dereference in remove() The "udc" pointer was never set in the probe() function so it will lead to a NULL dereference in udc_pci_remove() when we do: usb_del_gadget_udc(&udc->gadget); Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/ZG+A/dNpFWAlCChk@kili Signed-off-by: Greg Kroah-Hartman commit efb6b535207395a5c7317993602e2503ca8cb4b3 Author: Uttkarsh Aggarwal Date: Thu May 25 14:58:54 2023 +0530 usb: gadget: f_fs: Add unbind event before functionfs_unbind While exercising the unbind path, with the current implementation the functionfs_unbind would be calling which waits for the ffs->mutex to be available, however within the same time ffs_ep0_read is invoked & if no setup packets are pending, it will invoke function wait_event_interruptible_exclusive_locked_irq which by definition waits for the ev.count to be increased inside the same mutex for which functionfs_unbind is waiting. This creates deadlock situation because the functionfs_unbind won't get the lock until ev.count is increased which can only happen if the caller ffs_func_unbind can proceed further. Following is the illustration: CPU1 CPU2 ffs_func_unbind() ffs_ep0_read() mutex_lock(ffs->mutex) wait_event(ffs->ev.count) functionfs_unbind() mutex_lock(ffs->mutex) mutex_unlock(ffs->mutex) ffs_event_add() Fix this by moving the event unbind before functionfs_unbind to ensure the ev.count is incrased properly. Fixes: 6a19da111057 ("usb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait") Cc: stable Signed-off-by: Uttkarsh Aggarwal Link: https://lore.kernel.org/r/20230525092854.7992-1-quic_uaggarwa@quicinc.com Signed-off-by: Greg Kroah-Hartman commit dbe678f6192f27879ac9ff6bc7a1036aad85aae9 Author: Frank Li Date: Thu May 18 11:49:45 2023 -0400 usb: cdns3: fix NCM gadget RX speed 20x slow than expection at iMX8QM At iMX8QM platform, enable NCM gadget and run 'iperf3 -s'. At host, run 'iperf3 -V -c fe80::6863:98ff:feef:3e0%enxc6e147509498' [ 5] 0.00-1.00 sec 1.55 MBytes 13.0 Mbits/sec 90 4.18 KBytes [ 5] 1.00-2.00 sec 1.44 MBytes 12.0 Mbits/sec 75 4.18 KBytes [ 5] 2.00-3.00 sec 1.48 MBytes 12.4 Mbits/sec 75 4.18 KBytes Expected speed should be bigger than 300Mbits/sec. The root cause of this performance drop was found to be data corruption happening at 4K borders in some Ethernet packets, leading to TCP checksum errors. This corruption occurs from the position (4K - (address & 0x7F)) to 4K. The u_ether function's allocation of skb_buff reserves 64B, meaning all RX addresses resemble 0xXXXX0040. Force trb_burst_size to 16 can fix this problem. Cc: stable@vger.kernel.org Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20230518154946.3666662-1-Frank.Li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 46248400d81e2aa0b65cd659d6f40188192a58b6 Author: Richard Acayan Date: Tue May 23 16:25:50 2023 +0100 misc: fastrpc: reject new invocations during device removal The channel's rpmsg object allows new invocations to be made. After old invocations are already interrupted, the driver shouldn't try to invoke anymore. Invalidating the rpmsg at the end of the driver removal function makes it easy to cause a race condition in userspace. Even closing a file descriptor before the driver finishes its cleanup can cause an invocation via fastrpc_release_current_dsp_process() and subsequent timeout. Invalidate the channel before the invocations are interrupted to make sure that no invocations can be created to hang after the device closes. Fixes: c68cfb718c8f ("misc: fastrpc: Add support for context Invoke method") Cc: stable Signed-off-by: Richard Acayan Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230523152550.438363-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit b6a062853ddf6b4f653af2d8b75ba45bb9a036ad Author: Richard Acayan Date: Tue May 23 16:25:49 2023 +0100 misc: fastrpc: return -EPIPE to invocations on device removal The return value is initialized as -1, or -EPERM. The completion of an invocation implies that the return value is set appropriately, but "Permission denied" does not accurately describe the outcome of the invocation. Set the invocation's return value to a more appropriate "Broken pipe", as the cleanup breaks the driver's connection with rpmsg. Fixes: c68cfb718c8f ("misc: fastrpc: Add support for context Invoke method") Cc: stable Signed-off-by: Richard Acayan Reviewed-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230523152550.438363-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3c7d0079a1831118ef232bd9c2f34d058a1f31c2 Author: Ekansh Gupta Date: Tue May 23 16:25:48 2023 +0100 misc: fastrpc: Reassign memory ownership only for remote heap The userspace map request for remote heap allocates CMA memory. The ownership of this memory needs to be reassigned to proper owners to allow access from the protection domain running on DSP. This reassigning of ownership is not correct if done for any other supported flags. When any other flag is requested from userspace, fastrpc is trying to reassign the ownership of memory and this reassignment is getting skipped for remote heap request which is incorrect. Add proper flag check to reassign the memory only if remote heap is requested. Fixes: 532ad70c6d44 ("misc: fastrpc: Add mmap request assigning for static PD pool") Cc: stable Tested-by: Ekansh Gupta Signed-off-by: Ekansh Gupta Reviewed-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230523152550.438363-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit a6e766dea0a22918735176e4af862d535962f11e Author: Ekansh Gupta Date: Tue May 23 16:25:47 2023 +0100 misc: fastrpc: Pass proper scm arguments for secure map request If a map request is made with securemap attribute, the memory ownership needs to be reassigned to new VMID to allow access from protection domain. Currently only DSP VMID is passed to the reassign call which is incorrect as only a combination of HLOS and DSP VMID is allowed for memory ownership reassignment and passing only DSP VMID will cause assign call failure. Also pass proper restoring permissions to HLOS as the source permission will now carry both HLOS and DSP VMID permission. Change is also made to get valid physical address from scatter/gather for this allocation request. Fixes: e90d91190619 ("misc: fastrpc: Add support to secure memory map") Cc: stable Tested-by: Ekansh Gupta Signed-off-by: Ekansh Gupta Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230523152550.438363-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit ed309ce522185583b163bd0c74f0d9f299fe1826 Author: Conor Dooley Date: Fri May 26 11:59:08 2023 +0100 RISC-V: mark hibernation as nonportable Hibernation support depends on firmware marking its reserved/PMP protected regions as not accessible from Linux. The latest versions of the de-facto SBI implementation (OpenSBI) do not do this, having dropped the no-map property to enable 1 GiB huge page mappings by the kernel. This was exposed by commit 3335068f8721 ("riscv: Use PUD/P4D/PGD pages for the linear mapping"), which made the first 2 MiB of DRAM (where SBI typically resides) accessible by the kernel. Attempting to hibernate with either OpenSBI, or other implementations following its lead, will lead to a kernel panic ([1], [2]) as the hibernation process will attempt to save/restore any mapped regions, including the PMP protected regions in use by the SBI implementation. Mark hibernation as depending on "NONPORTABLE", as only a small subset of systems are capable of supporting it, until such time that an SBI implementation independent way to communicate what regions are in use has been agreed on. As hibernation support landed in v6.4-rc1, disabling it for most platforms does not constitute a regression. The alternative would have been reverting commit 3335068f8721 ("riscv: Use PUD/P4D/PGD pages for the linear mapping"). Doing so would permit hibernation on platforms with these SBI implementations, but would limit the options we have to solve the protection of the region without causing a regression in hibernation support. Reported-by: Song Shuai Link: https://lore.kernel.org/all/CAAYs2=gQvkhTeioMmqRDVGjdtNF_vhB+vm_1dHJxPNi75YDQ_Q@mail.gmail.com/ [1] Reported-by: JeeHeng Sia Link: https://groups.google.com/a/groups.riscv.org/g/sw-dev/c/ITXwaKfA6z8 [2] Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20230526-astride-detonator-9ae120051159@wendy Signed-off-by: Palmer Dabbelt commit 8b817fded42d8fe3a0eb47b1149d907851a3c942 Merge: 7a6c8e512fa07 a2d910f02231f Author: Linus Torvalds Date: Mon May 29 07:20:13 2023 -0400 Merge tag 'trace-v6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: "User events: - Use long instead of int for storing the enable set/clear bit, as it was found that big endian machines could end up using the wrong bits. - Split allocating mm and attaching it. This keeps the allocation separate from the registration and avoids various races. - Remove RCU locking around pin_user_pages_remote() as that can schedule. The RCU protection is no longer needed with the above split of mm allocation and attaching. - Rename the "link" fields of the various structs to something more meaningful. - Add comments around user_event_mm struct usage and locking requirements. Timerlat tracer: - Fix missed wakeup of timerlat thread caused by the timerlat interrupt triggering when tracing is off. The timer interrupt handler needs to always wake up the timerlat thread regardless if tracing is enabled or not, otherwise, it will never wake up. Histograms: - Fix regression of breaking the "stacktrace" modifier for variables. That modifier cannot be used for values, but can be used for variables that are passed from one histogram to the next. This was broken when adding the restriction to values as the variable logic used the same code. - Rename the special field "stacktrace" to "common_stacktrace". Special fields (that are not actually part of the event, but can act just like event fields, like 'comm' and 'timestamp') should be prefixed with 'common_' for consistency. To keep backward compatibility, 'stacktrace' can still be used (as with the special field 'cpu'), but can be overridden if the event has a field called 'stacktrace'. - Update the synthetic event selftests to use the new name (synthetic events are created by histograms) Tracing bootup selftests: - Reorganize the code to keep artifacts of the selftests not compiled in when selftests are not configured. - Add various cond_resched() around the selftest code, as the softlock watchdog was triggering much more often. It appears that the kernel runs slower now with full debugging enabled. - While debugging ftrace with ftrace (using an instance ring buffer instead of the top level one), I found that the selftests were disabling prints to the debug instance. This should not happen, as the selftests only disable printing to the main buffer as the selftests examine the main buffer to see if it has what it expects, and prints can make the tests fail. Make the selftests only disable printing to the toplevel buffer, and leave the instance buffers alone" * tag 'trace-v6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Have function_graph selftest call cond_resched() tracing: Only make selftest conditionals affect the global_trace tracing: Make tracing_selftest_running/delete nops when not used tracing: Have tracer selftests call cond_resched() before running tracing: Move setting of tracing_selftest_running out of register_tracer() tracing/selftests: Update synthetic event selftest to use common_stacktrace tracing: Rename stacktrace field to common_stacktrace tracing/histograms: Allow variables to have some modifiers tracing/user_events: Document user_event_mm one-shot list usage tracing/user_events: Rename link fields for clarity tracing/user_events: Remove RCU lock while pinning pages tracing/user_events: Split up mm alloc and attach tracing/timerlat: Always wakeup the timerlat thread tracing/user_events: Use long vs int for atomic bit ops commit 7a6c8e512fa072cfe8ad7a3b26666b6f26435870 Merge: ac2263b588dff 6ab39f99927ee Author: Linus Torvalds Date: Mon May 29 07:05:49 2023 -0400 Merge tag 'v6.4-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "Fix an alignment crash in x86/aria" * tag 'v6.4-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: x86/aria - Use 16 byte alignment for GFNI constant vectors commit ac2263b588dffd3a1efd7ed0b156ea6c5aea200d Author: Linus Torvalds Date: Mon May 29 06:40:33 2023 -0400 Revert "module: error out early on concurrent load of the same module file" This reverts commit 9828ed3f695a138f7add89fa2a186ababceb8006. Sadly, it does seem to cause failures to load modules. Johan Hovold reports: "This change breaks module loading during boot on the Lenovo Thinkpad X13s (aarch64). Specifically it results in indefinite probe deferral of the display and USB (ethernet) which makes it a pain to debug. Typing in the dark to acquire some logs reveals that other modules are missing as well" Since this was applied late as a "let's try this", I'm reverting it asap, and we can try to figure out what goes wrong later. The excessive parallel module loading problem is annoying, but not noticeable in normal situations, and this was only meant as an optimistic workaround for a user-space bug. One possible solution may be to do the optimistic exclusive open first, and then use a lock to serialize loading if that fails. Reported-by: Johan Hovold Link: https://lore.kernel.org/lkml/ZHRpH-JXAxA6DnzR@hovoldconsulting.com/ Signed-off-by: Linus Torvalds commit 3fe95742af29b8b4eccab2ba94bc521805c6e10c Author: Mika Westerberg Date: Wed May 24 13:47:04 2023 +0300 thunderbolt: Do not touch CL state configuration during discovery If the boot firmware has already established tunnels, especially ones that have special requirements from the link such as DisplayPort, we should not blindly enable CL states (nor change the TMU configuration). Otherwise the existing tunnels may not work as expected. For this reason, skip the CL state enabling when we go over the existing topology. This will also keep the TMU settings untouched because we do not change the TMU configuration when CL states are not enabled. Reported-by: Koba Ko Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7831 Cc: stable@vger.kernel.org # v6.0+ Acked-By: Yehezkel Bernat Signed-off-by: Mika Westerberg commit b6d572aeb58a5e0be86bd51ea514c4feba996cc4 Author: Mika Westerberg Date: Wed May 24 10:41:57 2023 +0300 thunderbolt: Increase DisplayPort Connection Manager handshake timeout It turns out that when plugging in VGA cable through USB-C to VGA/DVI dongle the Connection Manager handshake can take longer time, at least on Intel Titan Ridge based docks such as Dell WD91TB. This leads to following error in the dmesg: thunderbolt 0000:00:0d.3: 3:10: DP tunnel activation failed, aborting and the display stays blank (because we failed to establish the tunnel). For this reason increase the timeout to 3s. Reported-by: Koba Ko Cc: stable@vger.kernel.org Acked-By: Yehezkel Bernat Signed-off-by: Mika Westerberg commit a2d910f02231f33118647fc438157ae69c073f89 Author: Steven Rostedt (Google) Date: Sun May 28 01:17:42 2023 -0400 tracing: Have function_graph selftest call cond_resched() When all kernel debugging is enabled (lockdep, KSAN, etc), the function graph enabling and disabling can take several seconds to complete. The function_graph selftest enables and disables function graph tracing several times. With full debugging enabled, the soft lockup watchdog was triggering because the selftest was running without ever scheduling. Add cond_resched() throughout the test to make sure it does not trigger the soft lockup detector. Link: https://lkml.kernel.org/r/20230528051742.1325503-6-rostedt@goodmis.org Signed-off-by: Steven Rostedt (Google) commit ac9d2cb1d5f8e22235c399338504dadc87d14e74 Author: Steven Rostedt (Google) Date: Sun May 28 01:17:41 2023 -0400 tracing: Only make selftest conditionals affect the global_trace The tracing_selftest_running and tracing_selftest_disabled variables were to keep trace_printk() and other writes from affecting the tracing selftests, as the tracing selftests would examine the ring buffer to see if it contained what it expected or not. trace_printk() and friends could add to the ring buffer and cause the selftests to fail (and then disable the tracer that was being tested). To keep that from happening, these variables were added and would keep trace_printk() and friends from writing to the ring buffer while the tests were going on. But this was only the top level ring buffer (owned by the global_trace instance). There is no reason to prevent writing into ring buffers of other instances via the trace_array_printk() and friends. For the functions that could be used by other instances, check if the global_trace is the tracer instance that is being written to before deciding to not allow the write. Link: https://lkml.kernel.org/r/20230528051742.1325503-5-rostedt@goodmis.org Signed-off-by: Steven Rostedt (Google) commit a3ae76d7ff781208100e6acc58eb09afb7b4b177 Author: Steven Rostedt (Google) Date: Sun May 28 01:17:40 2023 -0400 tracing: Make tracing_selftest_running/delete nops when not used There's no reason to test the condition variables tracing_selftest_running or tracing_selftest_delete when tracing selftests are not enabled. Make them define 0s when not the selftests are not configured in. Link: https://lkml.kernel.org/r/20230528051742.1325503-4-rostedt@goodmis.org Signed-off-by: Steven Rostedt (Google) commit 9da705d432a07927526005a0688d81fbbf30e349 Author: Steven Rostedt (Google) Date: Sun May 28 01:17:39 2023 -0400 tracing: Have tracer selftests call cond_resched() before running As there are more and more internal selftests being added to the Linux kernel (KSAN, lockdep, etc) the selftests are taking longer to run when these are enabled. Add a cond_resched() to the calling of do_run_tracer_selftest() to force a schedule if NEED_RESCHED is set, otherwise the soft lockup watchdog may trigger on boot up. Link: https://lkml.kernel.org/r/20230528051742.1325503-3-rostedt@goodmis.org Signed-off-by: Steven Rostedt (Google) commit e8352cf5778c53b80fdcee086278b2048ddb8f98 Author: Steven Rostedt (Google) Date: Sun May 28 01:17:38 2023 -0400 tracing: Move setting of tracing_selftest_running out of register_tracer() The variables tracing_selftest_running and tracing_selftest_disabled are only used for when CONFIG_FTRACE_STARTUP_TEST is enabled. Make them only visible within the selftest code. The setting of those variables are in the register_tracer() call, and set in a location where they do not need to be. Create a wrapper around run_tracer_selftest() called do_run_tracer_selftest() which sets those variables, and have register_tracer() call that instead. Having those variables only set within the CONFIG_FTRACE_STARTUP_TEST scope gets rid of them (and also the ability to remove testing against them) when the startup tests are not enabled (most cases). Link: https://lkml.kernel.org/r/20230528051742.1325503-2-rostedt@goodmis.org Signed-off-by: Steven Rostedt (Google) commit e338142b39cf40155054f95daa28d210d2ee1b2d Merge: dca389eb958f9 2a881183dc5ab Author: Linus Torvalds Date: Sun May 28 20:05:07 2023 -0400 Merge tag 'phy-fixes-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy fixes from Vinod Koul: - init count imbalance fix in qcom-qmp-pcie and combo drivers - kernel doc header fix for qcom-snps driver - mediatek floating point comparison fix - amlogic fix register value * tag 'phy-fixes-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: qcom-snps: correct struct qcom_snps_hsphy kerneldoc phy: amlogic: phy-meson-g12a-mipi-dphy-analog: fix CNTL2_DIF_TX_CTL0 value phy: mediatek: rework the floating point comparisons to fixed point phy: qcom-qmp-pcie-msm8996: fix init-count imbalance phy: qcom-qmp-combo: fix init-count imbalance commit dca389eb958f982406df8199af40fefe1b881b84 Merge: 7877cb91f1081 e14fd2af7a1d6 Author: Linus Torvalds Date: Sun May 28 19:59:08 2023 -0400 Merge tag 'dmaengine-fix-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: "Driver fixes for the at-hdmac, pl330, TI and IDXD drivers: - AT HDMAC driver fixes for Flow Controller bitfield, peripheral ID handling and potential NULL dereference check - PL330 function rename to avoid conflicts - build warning fix for pm function in TI driver - IDXD driver fix for passing freed memory" * tag 'dmaengine-fix-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine: at_hdmac: Extend the Flow Controller bitfield to three bits dmaengine: at_hdmac: Repair bitfield macros for peripheral ID handling dmaengine: pl330: rename _start to prevent build error dmaengine: at_xdmac: fix potential Oops in at_xdmac_prep_interleaved() dmaengine: ti: k3-udma: annotate pm function with __maybe_unused dmaengine: idxd: Fix passing freed memory in idxd_cdev_open() commit bca7a46336e38667f7670aacd2098dc45b8b7868 Merge: 7877cb91f1081 bbaae0c79ebd4 Author: Greg Kroah-Hartman Date: Sun May 28 20:03:33 2023 +0100 Merge tag 'iio-fixes-for-6.4a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus Jonathan writes: 1st set of IIO fixes for the 6.4 cycle. Usual mixed bag of issues in new code for this cycle and old issues that have surfaced in the last few weeks. - adi,ad_sigma_delta * Ensure irq lazy disable handing is not used as it breaks completion detection. - adi,ad4130 * Fix failure to remove clock provider. - adi,ad5758 * Wrong CONFIG variable used to control driver build. - adi,ad7192 * Fix repeated channel index by just expressing shorted channels as differential channel between a channel and itself. - adi,ad74413 * Fix error handling for resistance input processing to not fail in case of success. - rohm,bu27034 * Fix integration time in wrong units (should be seconds not usecs) * Ensure reset is actually written not detected as already set from regcache. - gts helper * Fix wrong parameter docs. * Fix integration time in wrong units (should be seconds not usecs) - fsl,imx8qxp-adc * Add missing vref-supply to binding doc (already used by driver) - fsl,imx93 * Fix sign bug in read_raw() so that error check didn't work. - inv,icm42600 * Fix reset of timestamp to work even if a particular sensor is off when the chip is first enabled. - kionix,kx022a * Fix irq get form fw node to not include the 0 value. - microchip,mcp4725 * Fix return value from i2c_master_send() handling to nto assume 0 on success. - mediatek,mt6370 * Fix incorrect scaling of a few currents on devices with particular vendor IDs. - fsl,mxs-lradc * Cleanup ordering issue fix. - renesas,rcar-adc bindings * Fix missing vendor prefix for adi,ad7476 - st,st_accel * Fix handling when no ACPI _ONT method present. - st,stm32-adc * Handle no adc-diff-channel present case (all single ended) * Handle no adc-channels present case (all differential) - ti,palmas * Fix off by one bug that could allow out of bounds read if callers provided wrong value. - ti,tmag5273 * Fix a runtime PM leak on measurement error - vishay,vcnl4035 * Correctly mask chip ID so devices with different addresses don't fail the test. * tag 'iio-fixes-for-6.4a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (23 commits) iio: imu: inv_icm42600: fix timestamp reset iio: adc: ad_sigma_delta: Fix IRQ issue by setting IRQ_DISABLE_UNLAZY flag dt-bindings: iio: adc: renesas,rcar-gyroadc: Fix adi,ad7476 compatible value iio: dac: mcp4725: Fix i2c_master_send() return value handling iio: accel: kx022a fix irq getting iio: bu27034: Ensure reset is written iio: dac: build ad5758 driver when AD5758 is selected iio: addac: ad74413: fix resistance input processing iio: light: vcnl4035: fixed chip ID check dt-bindings: iio: imx8qxp-adc: add missing vref-supply iio: adc: stm32-adc: skip adc-channels setup if none is present iio: adc: stm32-adc: skip adc-diff-channels setup if none is present iio: adc: ad7192: Change "shorted" channels to differential iio: accel: st_accel: Fix invalid mount_matrix on devices without ACPI _ONT method iio: gts-helpers: fix integration time units iio: bu27034: Fix integration time iio: fix doc for iio_gts_find_sel_by_int_time iio: adc: palmas: fix off by one bugs iio: adc: mxs-lradc: fix the order of two cleanup operations iio: ad4130: Make sure clock provider gets removed ... commit 36e4fc57fc1619f462e669e939209c45763bc8f5 Author: Akihiro Suda Date: Sun May 28 19:36:02 2023 +0200 efi: Bump stub image version for macOS HVF compatibility The macOS hypervisor framework includes a host-side VMM called VZLinuxBootLoader [1] which implements native support for booting the Linux kernel inside a guest directly (instead of, e.g., via GRUB installed inside the guest). On x86, it incorporates a BIOS style loader that does not implement or expose EFI to the loaded kernel. However, this loader appears to fail when the 'image minor version' field in the kernel image's PE/COFF header (which is generally only used by EFI based bootloaders) is set to any value other than 0x0. [2] Commit e346bebbd36b1576 ("efi: libstub: Always enable initrd command line loader and bump version") incremented the EFI stub image minor version to convey that all EFI stub kernels now implement support for the initrd= command line option, and do so in a way where it can load initrd images from any filesystem known to the EFI firmware (as opposed to prior implementations that could only load initrds from the same volume that the kernel image was loaded from). Unfortunately, bumping the version to v1.1 triggers this issue in VZLinuxBootLoader, breaking the boot on x86. So let's keep the image minor version at 0x0, and bump the image major version instead. While at it, convert this field to a bit field, so that individual features are discoverable from it, as suggested by Linus. So let's bump the major version to v3, and document the initrd= command line loading feature as being represented by bit 1 in the mask. Note that, due to the prior interpretation as a monotonically increasing version field, loaders are still permitted to assume that the LoadFile2 initrd loading feature is supported for any major version value >= 1, even if bit 0 is not set. [1] https://developer.apple.com/documentation/virtualization/vzlinuxbootloader [2] https://lore.kernel.org/linux-efi/CAG8fp8Teu4G9JuenQrqGndFt2Gy+V4YgJ=hN1xX7AD940YKf3A@mail.gmail.com/ Fixes: e346bebbd36b1576 ("efi: libstub: Always enable initrd command ...") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217485 Signed-off-by: Akihiro Suda [ardb: rewrite comment and commit log] Signed-off-by: Ard Biesheuvel commit b3e6bcb94590dea45396b9481e47b809b1be4afa Author: Theodore Ts'o Date: Tue May 23 23:49:48 2023 -0400 ext4: add EA_INODE checking to ext4_iget() Add a new flag, EXT4_IGET_EA_INODE which indicates whether the inode is expected to have the EA_INODE flag or not. If the flag is not set/clear as expected, then fail the iget() operation and mark the file system as corrupted. This commit also makes the ext4_iget() always perform the is_bad_inode() check even when the inode is already inode cache. This allows us to remove the is_bad_inode() check from the callers of ext4_iget() in the ea_inode code. Reported-by: syzbot+cbb68193bdb95af4340a@syzkaller.appspotmail.com Reported-by: syzbot+62120febbd1ee3c3c860@syzkaller.appspotmail.com Reported-by: syzbot+edce54daffee36421b4c@syzkaller.appspotmail.com Cc: stable@kernel.org Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230524034951.779531-2-tytso@mit.edu Signed-off-by: Theodore Ts'o commit 7877cb91f1081754a1487c144d85dc0d2e2e7fc4 Author: Linus Torvalds Date: Sun May 28 07:49:00 2023 -0400 Linux 6.4-rc4 commit f8b2507c263d6c1478d179c7c260064a61f14542 Merge: 2d5438f4c6fda edc0a2b595765 Author: Linus Torvalds Date: Sun May 28 07:42:05 2023 -0400 Merge tag 'x86-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu fix from Thomas Gleixner: "A single fix for x86: - Prevent a bogus setting for the number of HT siblings, which is caused by the CPUID evaluation trainwreck of X86. That recomputes the value for each CPU, so the last CPU "wins". That can cause completely bogus sibling values" * tag 'x86-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms commit 2d5438f4c6fdaa34c5d7de89a5331b8dbcd920af Merge: abbf7fa15b7c1 38776cc45eb76 Author: Linus Torvalds Date: Sun May 28 07:37:23 2023 -0400 Merge tag 'perf-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "A small set of perf fixes: - Make the MSR-readout based CHA discovery work around broken discovery tables in some SPR firmwares. - Prevent saving PEBS configuration which has software bits set that cause a crash when restored into the relevant MSR" * tag 'perf-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/uncore: Correct the number of CHAs on SPR perf/x86/intel: Save/restore cpuc->active_pebs_data_cfg when using guest PEBS commit abbf7fa15b7c140da7893f9c910b4762ac99ae7a Merge: d8f14b84fefd8 2e4be0d011f21 Author: Linus Torvalds Date: Sun May 28 07:33:29 2023 -0400 Merge tag 'objtool-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull unwinder fixes from Thomas Gleixner: "A set of unwinder and tooling fixes: - Ensure that the stack pointer on x86 is aligned again so that the unwinder does not read past the end of the stack - Discard .note.gnu.property section which has a pointlessly different alignment than the other note sections. That confuses tooling of all sorts including readelf, libbpf and pahole" * tag 'objtool-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/show_trace_log_lvl: Ensure stack pointer is aligned, again vmlinux.lds.h: Discard .note.gnu.property section commit d8f14b84fefd8669cbcbe4fee3f61a44be904993 Merge: 9bd5386c653f6 eb799279fb1f9 Author: Linus Torvalds Date: Sun May 28 07:15:33 2023 -0400 Merge tag 'core-debugobjects-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull debugobjects fixes from Thomas Gleixner: "Two fixes for debugobjects: - Prevent the allocation path from waking up kswapd. That's a long standing issue due to the GFP_ATOMIC allocation flag. As debug objects can be invoked from pretty much any context waking kswapd can end up in arbitrary lock chains versus the waitqueue lock - Correct the explicit lockdep wait-type violation in debug_object_fill_pool()" * tag 'core-debugobjects-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Don't wake up kswapd from fill_pool() debugobjects,locking: Annotate debug_object_fill_pool() wait type violation commit 9bd5386c653f64755dc33f77793273ef0763fe63 Merge: 045049cb38193 4115af49d2c24 Author: Linus Torvalds Date: Sun May 28 07:12:21 2023 -0400 Merge tag 'irq-urgent-2023-05-28' 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: - Prevent loss of state in the MIPS GIC interrupt controller - Disable pseudo NMIs on Mediatek based Chromebooks as they have firmware issues which cause instantenous chrashes and freezes wen pseudo NMIs are used - Fix the error handling path in the MBIGEN driver and a defined but not used warning in the meson-gpio interrupt chip driver" * tag 'irq-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/mbigen: Unify the error handling in mbigen_of_create_domain() irqchip/meson-gpio: Mark OF related data as maybe unused irqchip/mips-gic: Use raw spinlock for gic_lock irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware issues dt-bindings: interrupt-controller: arm,gic-v3: Add quirk for Mediatek SoCs w/ broken FW commit 045049cb3819341fb83f807967a70c22fdddbd96 Merge: 416839029e385 4897a898a2160 Author: Linus Torvalds Date: Sun May 28 07:08:52 2023 -0400 Merge tag 'mips-fixes_6.4_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: - fixes to get alchemy platform back in shape - fix for initrd detection * tag 'mips-fixes_6.4_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: mips: Move initrd_start check after initrd address sanitisation. MIPS: Alchemy: fix dbdma2 MIPS: Restore Au1300 support MIPS: unhide PATA_PLATFORM commit 416839029e3858f61dc7dd346559c03e74ed8380 Merge: 4e893b5aa4ac2 358e526a1648c Author: Linus Torvalds Date: Sat May 27 18:09:18 2023 -0700 Merge tag 'powerpc-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fix from Michael Ellerman: - Reinstate ARCH_FORCE_MAX_ORDER ranges to fix various breakage * tag 'powerpc-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm: Reinstate ARCH_FORCE_MAX_ORDER ranges commit d78bd6cc68276bd57f766f7cb98bfe32c23ab327 Author: Helge Deller Date: Sat May 27 08:41:09 2023 +0200 fbcon: Fix null-ptr-deref in soft_cursor syzbot repored this bug in the softcursor code: BUG: KASAN: null-ptr-deref in soft_cursor+0x384/0x6b4 drivers/video/fbdev/core/softcursor.c:70 Read of size 16 at addr 0000000000000200 by task kworker/u4:1/12 CPU: 0 PID: 12 Comm: kworker/u4:1 Not tainted 6.4.0-rc3-syzkaller-geb0f1697d729 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 Workqueue: events_power_efficient fb_flashcursor Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_report+0xe4/0x514 mm/kasan/report.c:465 kasan_report+0xd4/0x130 mm/kasan/report.c:572 kasan_check_range+0x264/0x2a4 mm/kasan/generic.c:187 __asan_memcpy+0x3c/0x84 mm/kasan/shadow.c:105 soft_cursor+0x384/0x6b4 drivers/video/fbdev/core/softcursor.c:70 bit_cursor+0x113c/0x1a64 drivers/video/fbdev/core/bitblit.c:377 fb_flashcursor+0x35c/0x54c drivers/video/fbdev/core/fbcon.c:380 process_one_work+0x788/0x12d4 kernel/workqueue.c:2405 worker_thread+0x8e0/0xfe8 kernel/workqueue.c:2552 kthread+0x288/0x310 kernel/kthread.c:379 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:853 This fix let bit_cursor() bail out early when a font bitmap isn't available yet. Signed-off-by: Helge Deller Reported-by: syzbot+d910bd780e6efac35869@syzkaller.appspotmail.com Acked-by: Sam Ravnborg Cc: stable@kernel.org commit 518ecb6a209f6ff678aeadf9f2bf870c0982ca85 Author: Helge Deller Date: Sat May 27 11:37:29 2023 +0200 fbdev: imsttfb: Fix error path of imsttfb_probe() Release ressources when init_imstt() returns failure. Signed-off-by: Helge Deller commit 5cf9a090a39c97f4506b7b53739d469b1c05a7e9 Author: Helge Deller Date: Sat May 27 11:28:36 2023 +0200 fbdev: imsttfb: Release framebuffer and dealloc cmap on error path Add missing cleanups in error path. Signed-off-by: Helge Deller commit 4e893b5aa4ac2c8a56a40d18fe87e9d2295e5dcf Merge: 957f3f8e53430 335b4223466dd Author: Linus Torvalds Date: Sat May 27 09:42:56 2023 -0700 Merge tag 'for-linus-6.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - a double free fix in the Xen pvcalls backend driver - a fix for a regression causing the MSI related sysfs entries to not being created in Xen PV guests - a fix in the Xen blkfront driver for handling insane input data better * tag 'for-linus-6.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: x86/pci/xen: populate MSI sysfs entries xen/pvcalls-back: fix double frees with pvcalls_new_active_socket() xen/blkfront: Only check REQ_FUA for writes commit 957f3f8e5343041ddb9a1265ab661db259cc712e Merge: 49572d5361298 d1d8875c8c135 Author: Linus Torvalds Date: Sat May 27 09:14:43 2023 -0700 Merge tag 'char-misc-6.4-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 driver fixes for 6.4-rc4. They are just two different types: - binder fixes and reverts for reported problems and regressions in the binder "driver". - coresight driver fixes for reported problems. All of these have been in linux-next for over a week with no reported problems" * tag 'char-misc-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: binder: fix UAF of alloc->vma in race with munmap() binder: add lockless binder_alloc_(set|get)_vma() Revert "android: binder: stop saving a pointer to the VMA" Revert "binder_alloc: add missing mmap_lock calls when using the VMA" binder: fix UAF caused by faulty buffer cleanup coresight: perf: Release Coresight path when alloc trace id failed coresight: Fix signedness bug in tmc_etr_buf_insert_barrier_packet() commit ca50d7765587fe0a8351a6e8d9742cfd4811d925 Author: Shenwei Wang Date: Fri May 26 10:38:54 2023 -0500 arm64: dts: imx8-ss-dma: assign default clock rate for lpuarts Add the assigned-clocks and assigned-clock-rates properties for the LPUARTx nodes. Without these properties, the default clock rate used would be 0, which can cause the UART ports to fail when open. Fixes: 35f4e9d7530f ("arm64: dts: imx8: split adma ss into dma and audio ss") Signed-off-by: Shenwei Wang Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 2b28fc688cdff225c41cdd22857500e187453ed7 Author: Shenwei Wang Date: Thu May 18 08:54:21 2023 -0500 arm64: dts: imx8qm-mek: correct GPIOs for USDHC2 CD and WP signals The USDHC2 CD and WP sginal should be on LSIO_GPIO5. Fixes: 307fd14d4b14 ("arm64: dts: imx: add imx8qm mek support") Signed-off-by: Shenwei Wang Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 99e09b9c0ab43346c52f2787ca4e5c4b1798362e Author: Krzysztof Kozlowski Date: Wed May 17 18:37:36 2023 +0200 soundwire: qcom: add proper error paths in qcom_swrm_startup() Reverse actions in qcom_swrm_startup() error paths to avoid leaking stream memory and keeping runtime PM unbalanced. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230517163736.997553-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 700581ede41d029403feec935df4616309696fd7 Author: Pierre-Louis Bossart Date: Mon May 15 15:48:59 2023 +0800 soundwire: dmi-quirks: add new mapping for HP Spectre x360 A BIOS/DMI update seems to have broken some devices, let's add a new mapping. Link: https://github.com/thesofproject/linux/issues/4323 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230515074859.3097-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit fdd7d1fff4e3b97c4706f4c0e000a38b134b7ae5 Author: Steve French Date: Sat May 27 03:33:23 2023 -0500 cifs: address unused variable warning Fix trivial unused variable warning (when SMB1 support disabled) "ioctl.c:324:17: warning: variable 'caps' set but not used [-Wunused-but-set-variable]" Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202305250056.oZhsJmdD-lkp@intel.com/ Signed-off-by: Steve French commit 30bc32c7c1f975cc3c14e1c7dc437266311282cf Author: Lorenzo Bianconi Date: Wed May 24 16:39:32 2023 +0200 wifi: mt76: mt7615: fix possible race in mt7615_mac_sta_poll Grab sta_poll_lock spinlock in mt7615_mac_sta_poll routine in order to avoid possible races with mt7615_mac_add_txs() or mt7615_mac_fill_rx() removing msta pointer from sta_poll_list. Fixes: a621372a04ac ("mt76: mt7615: rework mt7615_mac_sta_poll for usb code") Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/48b23404b759de4f1db2ef85975c72a4aeb1097c.1684938695.git.lorenzo@kernel.org commit 780328abc0cbde7398d3c04be56fbb5f89ed10b8 Author: Uwe Kleine-König Date: Fri May 26 07:41:23 2023 +0200 fbdev: matroxfb ssd1307fb: Switch i2c drivers back to use .probe() After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_driver. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit cbd77119b6355872cd308a60e99f9ca678435d15 Author: Manivannan Sadhasivam Date: Wed May 17 17:16:35 2023 +0530 EDAC/qcom: Get rid of hardcoded register offsets The LLCC EDAC register offsets varies between each SoC. Hardcoding the register offsets won't work and will often result in crash due to accessing the wrong locations. Hence, get the register offsets from the LLCC driver matching the individual SoCs. Cc: # 6.0: 5365cea199c7 ("soc: qcom: llcc: Rename reg_offset structs to reflect LLCC version") Cc: # 6.0: c13d7d261e36 ("soc: qcom: llcc: Pass LLCC version based register offsets to EDAC driver") Cc: # 6.0 Fixes: a6e9d7ef252c ("soc: qcom: llcc: Add configuration data for SM8450 SoC") Acked-by: Borislav Petkov (AMD) Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230517114635.76358-3-manivannan.sadhasivam@linaro.org commit 3d49f7406b5d9822c1411c6658bac2ae55ba19a2 Author: Manivannan Sadhasivam Date: Wed May 17 17:16:34 2023 +0530 EDAC/qcom: Remove superfluous return variable assignment in qcom_llcc_core_setup() "ret" variable will be assigned on both success and failure cases. So there is no need to initialize it during start of qcom_llcc_core_setup(). Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230517114635.76358-2-manivannan.sadhasivam@linaro.org commit 4ea0bf4b98d66a7a790abb285539f395596bae92 Author: Ben Noordhuis Date: Sat May 6 11:55:02 2023 +0200 io_uring: undeprecate epoll_ctl support Libuv recently started using it so there is at least one consumer now. Cc: stable@vger.kernel.org Fixes: 61a2732af4b0 ("io_uring: deprecate epoll_ctl support") Link: https://github.com/libuv/libuv/pull/3979 Signed-off-by: Ben Noordhuis Link: https://lore.kernel.org/r/20230506095502.13401-1-info@bnoordhuis.nl Signed-off-by: Jens Axboe commit 396ac4c982f6d6cd7c0293a546a0ba5d77fe7f90 Author: Dan Carpenter Date: Fri May 26 15:01:33 2023 +0300 smb: delete an unnecessary statement We don't need to set the list iterators to NULL before a list_for_each_entry() loop because they are assigned inside the macro. Signed-off-by: Dan Carpenter Reviewed-by: Mukesh Ojha Signed-off-by: Steve French commit 6fe55c2799bc29624770c26f98ba7b06214f43e0 Author: Namjae Jeon Date: Thu May 25 00:13:38 2023 +0900 ksmbd: call putname after using the last component last component point filename struct. Currently putname is called after vfs_path_parent_lookup(). And then last component is used for lookup_one_qstr_excl(). name in last component is freed by previous calling putname(). And It cause file lookup failure when testing generic/464 test of xfstest. Fixes: 74d7970febf7 ("ksmbd: fix racy issue from using ->d_parent and ->d_name") Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 6cc2268f5647cbfde3d4fc2e4ee005070ea3a8d2 Author: Namjae Jeon Date: Fri May 19 23:11:33 2023 +0900 ksmbd: fix incorrect AllocationSize set in smb2_get_info If filesystem support sparse file, ksmbd should return allocated size using ->i_blocks instead of stat->size. This fix generic/694 xfstests. Cc: stable@vger.kernel.org Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 36322523dddb11107e9f7f528675a0dec2536103 Author: Namjae Jeon Date: Fri May 19 23:09:48 2023 +0900 ksmbd: fix UAF issue from opinfo->conn If opinfo->conn is another connection and while ksmbd send oplock break request to cient on current connection, The connection for opinfo->conn can be disconnect and conn could be freed. When sending oplock break request, this ksmbd_conn can be used and cause user-after-free issue. When getting opinfo from the list, ksmbd check connection is being released. If it is not released, Increase ->r_count to wait that connection is freed. Cc: stable@vger.kernel.org Reported-by: Per Forlin Tested-by: Per Forlin Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 0512a5f89e1fae74251fde6893ff634f1c96c6fb Author: Kuan-Ting Chen Date: Fri May 19 23:00:24 2023 +0900 ksmbd: fix multiple out-of-bounds read during context decoding Check the remaining data length before accessing the context structure to ensure that the entire structure is contained within the packet. Additionally, since the context data length `ctxt_len` has already been checked against the total packet length `len_of_ctxts`, update the comparison to use `ctxt_len`. Cc: stable@vger.kernel.org Signed-off-by: Kuan-Ting Chen Acked-by: Namjae Jeon Signed-off-by: Steve French commit d738950f112c8f40f0515fe967db998e8235a175 Author: Kuan-Ting Chen Date: Fri May 19 22:59:28 2023 +0900 ksmbd: fix slab-out-of-bounds read in smb2_handle_negotiate Check request_buf length first to avoid out-of-bounds read by req->DialectCount. [ 3350.990282] BUG: KASAN: slab-out-of-bounds in smb2_handle_negotiate+0x35d7/0x3e60 [ 3350.990282] Read of size 2 at addr ffff88810ad61346 by task kworker/5:0/276 [ 3351.000406] Workqueue: ksmbd-io handle_ksmbd_work [ 3351.003499] Call Trace: [ 3351.006473] [ 3351.006473] dump_stack_lvl+0x8d/0xe0 [ 3351.006473] print_report+0xcc/0x620 [ 3351.006473] kasan_report+0x92/0xc0 [ 3351.006473] smb2_handle_negotiate+0x35d7/0x3e60 [ 3351.014760] ksmbd_smb_negotiate_common+0x7a7/0xf00 [ 3351.014760] handle_ksmbd_work+0x3f7/0x12d0 [ 3351.014760] process_one_work+0xa85/0x1780 Cc: stable@vger.kernel.org Signed-off-by: Kuan-Ting Chen Acked-by: Namjae Jeon Signed-off-by: Steve French commit 84c5aa47925a1f40d698b6a6a2bf67e99617433d Author: Namjae Jeon Date: Fri May 12 23:29:12 2023 +0900 ksmbd: fix credit count leakage This patch fix the failure from smb2.credits.single_req_credits_granted test. When client send 8192 credit request, ksmbd return 8191 credit granted. ksmbd should give maximum possible credits that must be granted within the range of not exceeding the max credit to client. Cc: stable@vger.kernel.org Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit df14afeed2e6c1bbadef7d2f9c46887bbd6d8d94 Author: Namjae Jeon Date: Sun May 14 10:02:27 2023 +0900 ksmbd: fix uninitialized pointer read in smb2_create_link() There is a case that file_present is true and path is uninitialized. This patch change file_present is set to false by default and set to true when patch is initialized. Fixes: 74d7970febf7 ("ksmbd: fix racy issue from using ->d_parent and ->d_name") Reported-by: Coverity Scan Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 48b47f0caaa8a9f05ed803cb4f335fa3a7bfc622 Author: Namjae Jeon Date: Fri May 12 17:05:41 2023 +0900 ksmbd: fix uninitialized pointer read in ksmbd_vfs_rename() Uninitialized rd.delegated_inode can be used in vfs_rename(). Fix this by setting rd.delegated_inode to NULL to avoid the uninitialized read. Fixes: 74d7970febf7 ("ksmbd: fix racy issue from using ->d_parent and ->d_name") Reported-by: Coverity Scan Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 49572d5361298711207ab387a6c318407deb963a Merge: 18713e8a68937 793a539ac7884 Author: Linus Torvalds Date: Fri May 26 17:45:24 2023 -0700 Merge tag 'cxl-fixes-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull compute express link fixes from Dan Williams: "The 'media ready' series prevents the driver from acting on bad capacity information, and it moves some checks earlier in the init sequence which impacts topics in the queue for 6.5. Additional hotplug testing uncovered a missing enable for memory decode. A debug crash fix is also included. Summary: - Stop trusting capacity data before the "media ready" indication - Add missing HDM decoder capability enable for the cold-plug case - Fix a debug message induced crash" * tag 'cxl-fixes-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: cxl: Explicitly initialize resources when media is not ready cxl/port: Fix NULL pointer access in devm_cxl_add_port() cxl: Move cxl_await_media_ready() to before capacity info retrieval cxl: Wait Memory_Info_Valid before access memory related info cxl/port: Enable the HDM decoder capability for switch ports commit 18713e8a689377386f639d9317f958244825bd7b Merge: 96f15fc6cc020 abf5422e821f0 Author: Linus Torvalds Date: Fri May 26 16:17:56 2023 -0700 Merge tag 'arm-fixes-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "There have not been a lot of fixes for for the soc tree in 6.4, but these have been sitting here for too long. For the devicetree side, there is one minor warning fix for vexpress, the rest all all for the the NXP i.MX platforms: SoC specific bugfixes for the iMX8 clocks and its USB-3.0 gadget device, as well as board specific fixes for regulators and the phy on some of the i.MX boards. The microchip risc-v and arm32 maintainers now also add a shared maintainer file entry for the arm64 parts. The remaining fixes are all for firmware drivers, addressing mistakes in the optee, scmi and ff-a firmware driver implementation, mostly in the error handling code, incorrect use of the alloc_workqueue() interface in SCMI, and compatibility with corner cases of the firmware implementation" * tag 'arm-fixes-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: MAINTAINERS: update arm64 Microchip entries arm64: dts: imx8: fix USB 3.0 Gadget Failure in QM & QXPB0 at super speed dt-binding: cdns,usb3: Fix cdns,on-chip-buff-size type arm64: dts: colibri-imx8x: delete adc1 and dsp arm64: dts: colibri-imx8x: fix iris pinctrl configuration arm64: dts: colibri-imx8x: move pinctrl property from SoM to eval board arm64: dts: colibri-imx8x: fix eval board pin configuration arm64: dts: imx8mp: Fix video clock parents ARM: dts: imx6qdl-mba6: Add missing pvcie-supply regulator ARM: dts: imx6ull-dhcor: Set and limit the mode for PMIC buck 1, 2 and 3 arm64: dts: imx8mn-var-som: fix PHY detection bug by adding deassert delay arm64: dts: imx8mn: Fix video clock parents firmware: arm_ffa: Set reserved/MBZ fields to zero in the memory descriptors firmware: arm_ffa: Fix FFA device names for logical partitions firmware: arm_ffa: Fix usage of partition info get count flag firmware: arm_ffa: Check if ffa_driver remove is present before executing arm64: dts: arm: add missing cache properties ARM: dts: vexpress: add missing cache properties firmware: arm_scmi: Fix incorrect alloc_workqueue() invocation optee: fix uninited async notif value commit 96f15fc6cc020f68ea23e099da34858678060002 Merge: 8846af7547b52 3b8803494a061 Author: Linus Torvalds Date: Fri May 26 16:06:57 2023 -0700 Merge tag 'pci-v6.4-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull PCI fix from Bjorn Helgaas: - Quirk Ice Lake Root Ports to work around DPC log size issue (Mika Westerberg) * tag 'pci-v6.4-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI/DPC: Quirk PIO log size for Intel Ice Lake Root Ports commit 8846af7547b52704cc50b76eecb5fe5a5128fda9 Merge: a92c9ab69f669 4752354af7104 Author: Linus Torvalds Date: Fri May 26 15:57:14 2023 -0700 Merge tag 'vfio-v6.4-rc4' of https://github.com/awilliam/linux-vfio Pull VFIO fix from Alex Williamson: - Test for and return error for invalid pfns through the pin pages interface (Yan Zhao) * tag 'vfio-v6.4-rc4' of https://github.com/awilliam/linux-vfio: vfio/type1: check pfn valid before converting to struct page commit f270f8582353b70b8c6626252c8de3328ab45097 Merge: 9491d01fbc550 8557dc2712694 Author: Jens Axboe Date: Fri May 26 16:37:42 2023 -0600 Merge tag 'md-fixes-2023-05-24' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-6.4 Pull MD fix from Song: "This change fixes a raid5 regression since 5.12 kernels." * tag 'md-fixes-2023-05-24' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid5: fix miscalculation of 'end_sector' in raid5_read_one_chunk() commit a92c9ab69f6696b26ef0c1ca3e8b922d1fc82e86 Merge: 6fae9129b1c70 9491d01fbc550 Author: Linus Torvalds Date: Fri May 26 15:04:54 2023 -0700 Merge tag 'block-6.4-2023-05-26' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: "A few fixes for the storage side of things: - Fix bio caching condition for passthrough IO (Anuj) - end-of-device check fix for zero sized devices (Christoph) - Update Paolo's email address - NVMe pull request via Keith with a single quirk addition - Fix regression in how wbt enablement is done (Yu) - Fix race in active queue accounting (Tian)" * tag 'block-6.4-2023-05-26' of git://git.kernel.dk/linux: NVMe: Add MAXIO 1602 to bogus nid list. block: make bio_check_eod work for zero sized devices block: fix bio-cache for passthru IO block, bfq: update Paolo's address in maintainer list blk-mq: fix race condition in active queue accounting blk-wbt: fix that wbt can't be disabled by default commit 6fae9129b1c70bd6b7677b808c03bc96e83460fc Merge: 77af1f2b9a246 533ab73f5b5c9 Author: Linus Torvalds Date: Fri May 26 15:00:04 2023 -0700 Merge tag 'io_uring-6.4-2023-05-26' of git://git.kernel.dk/linux Pull io_uring fix from Jens Axboe: "Just a single fix for the conditional schedule with the SQPOLL thread, dropping the uring_lock if we do need to reschedule" * tag 'io_uring-6.4-2023-05-26' of git://git.kernel.dk/linux: io_uring: unlock sqd->lock before sq thread release CPU commit 5ad9b4719fc9bc4715c7e19875a962095b0577e7 Author: pengfuyuan Date: Tue May 23 15:09:55 2023 +0800 btrfs: fix csum_tree_block page iteration to avoid tripping on -Werror=array-bounds When compiling on a MIPS 64-bit machine we get these warnings: In file included from ./arch/mips/include/asm/cacheflush.h:13, from ./include/linux/cacheflush.h:5, from ./include/linux/highmem.h:8, from ./include/linux/bvec.h:10, from ./include/linux/blk_types.h:10, from ./include/linux/blkdev.h:9, from fs/btrfs/disk-io.c:7: fs/btrfs/disk-io.c: In function ‘csum_tree_block’: fs/btrfs/disk-io.c:100:34: error: array subscript 1 is above array bounds of ‘struct page *[1]’ [-Werror=array-bounds] 100 | kaddr = page_address(buf->pages[i]); | ~~~~~~~~~~^~~ ./include/linux/mm.h:2135:48: note: in definition of macro ‘page_address’ 2135 | #define page_address(page) lowmem_page_address(page) | ^~~~ cc1: all warnings being treated as errors We can check if i overflows to solve the problem. However, this doesn't make much sense, since i == 1 and num_pages == 1 doesn't execute the body of the loop. In addition, i < num_pages can also ensure that buf->pages[i] will not cross the boundary. Unfortunately, this doesn't help with the problem observed here: gcc still complains. To fix this add a compile-time condition for the extent buffer page array size limit, which would eventually lead to eliminating the whole for loop. CC: stable@vger.kernel.org # 5.10+ Signed-off-by: pengfuyuan Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8fd9f4232d8152c650fd15127f533a0f6d0a4b2b Author: Shida Zhang Date: Tue May 16 09:34:30 2023 +0800 btrfs: fix an uninitialized variable warning in btrfs_log_inode This fixes the following warning reported by gcc 10.2.1 under x86_64: ../fs/btrfs/tree-log.c: In function ‘btrfs_log_inode’: ../fs/btrfs/tree-log.c:6211:9: error: ‘last_range_start’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 6211 | ret = insert_dir_log_key(trans, log, path, key.objectid, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6212 | first_dir_index, last_dir_index); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../fs/btrfs/tree-log.c:6161:6: note: ‘last_range_start’ was declared here 6161 | u64 last_range_start; | ^~~~~~~~~~~~~~~~ This might be a false positive fixed in later compiler versions but we want to have it fixed. Reported-by: k2ci Reviewed-by: Anand Jain Signed-off-by: Shida Zhang Reviewed-by: David Sterba Signed-off-by: David Sterba commit 45c2f36871955b51b4ce083c447388d8c72d6b91 Author: Christoph Hellwig Date: Mon May 15 11:18:21 2023 +0200 btrfs: call btrfs_orig_bbio_end_io in btrfs_end_bio_work When I implemented the storage layer bio splitting, I was under the assumption that we'll never split metadata bios. But Qu reminded me that this can actually happen with very old file systems with unaligned metadata chunks and RAID0. I still haven't seen such a case in practice, but we better handled this case, especially as it is fairly easily to do not calling the ->end_іo method directly in btrfs_end_io_work, and using the proper btrfs_orig_bbio_end_io helper instead. In addition to the old file system with unaligned metadata chunks case documented in the commit log, the combination of the new scrub code with Johannes pending raid-stripe-tree also triggers this case. We spent some time debugging it and found that this patch solves the problem. Fixes: 103c19723c80 ("btrfs: split the bio submission path into a separate file") CC: stable@vger.kernel.org # 6.3+ Reviewed-by: Johannes Thumshirn Tested-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit abac3ac97fe8734b620e7322a116450d7f90aa43 Author: Vladislav Efanov Date: Fri May 26 19:16:32 2023 +0300 batman-adv: Broken sync while rescheduling delayed work Syzkaller got a lot of crashes like: KASAN: use-after-free Write in *_timers* All of these crashes point to the same memory area: The buggy address belongs to the object at ffff88801f870000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 5320 bytes inside of 8192-byte region [ffff88801f870000, ffff88801f872000) This area belongs to : batadv_priv->batadv_priv_dat->delayed_work->timer_list The reason for these issues is the lack of synchronization. Delayed work (batadv_dat_purge) schedules new timer/work while the device is being deleted. As the result new timer/delayed work is set after cancel_delayed_work_sync() was called. So after the device is freed the timer list contains pointer to already freed memory. Found by Linux Verification Center (linuxtesting.org) with syzkaller. Cc: stable@kernel.org Fixes: 2f1dfbe18507 ("batman-adv: Distributed ARP Table - implement local storage") Signed-off-by: Vladislav Efanov Acked-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 77af1f2b9a2464e4bce20cfd32bfb2390c67de7c Merge: c551afcdc373e 5f7fdb0f25575 Author: Linus Torvalds Date: Fri May 26 13:55:46 2023 -0700 Merge tag 'thermal-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fix from Rafael Wysocki: "Fix a regression introduced inadvertently during the 6.3 cycle by a commit making the Intel int340x thermal driver use sysfs_emit_at() instead of scnprintf() (Srinivas Pandruvada)" * tag 'thermal-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: intel: int340x: Add new line for UUID display commit c551afcdc373eb66d12e08ed0434711c9a10ca2b Merge: 91a304340a227 3bf8c6307bad5 Author: Linus Torvalds Date: Fri May 26 13:45:43 2023 -0700 Merge tag 'pm-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Fix three issues related to the ->fast_switch callback in the AMD P-state cpufreq driver (Gautham R. Shenoy and Wyes Karny)" * tag 'pm-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: amd-pstate: Update policy->cur in amd_pstate_adjust_perf() cpufreq: amd-pstate: Remove fast_switch_possible flag from active driver cpufreq: amd-pstate: Add ->fast_switch() callback commit 793a539ac78843ef9378bb42a44edfbc552a67d5 Author: Dave Jiang Date: Thu May 25 17:33:01 2023 -0700 cxl: Explicitly initialize resources when media is not ready When media is not ready do not assume that the capacity information from the identify command is valid, i.e. ->total_bytes ->partition_align_bytes ->{volatile,persistent}_only_bytes. Explicitly zero out the capacity resources and exit early. Given zero-init of those fields this patch is functionally equivalent to the prior state, but it improves readability and robustness going forward. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/168506118166.3004974.13523455340007852589.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 91a304340a2272b1941c9ac81d57c68f97e6260d Merge: b158dd941b4f2 3002b8642f016 Author: Linus Torvalds Date: Fri May 26 13:29:16 2023 -0700 Merge tag 'gpio-fixes-for-v6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix incorrect output in in-tree gpio tools - fix a shell coding issue in gpio-sim selftests - correctly set the permissions for debugfs attributes exposed by gpio-mockup - fix chip name and pin count in gpio-f7188x for one of the supported models - fix numberspace pollution when using dynamically and statically allocated GPIOs together * tag 'gpio-fixes-for-v6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio-f7188x: fix chip name and pin count on Nuvoton chip gpiolib: fix allocation of mixed dynamic/static GPIOs gpio: mockup: Fix mode of debugfs files selftests: gpio: gpio-sim: Fix BUG: test FAILED due to recent change tools: gpio: fix debounce_period_us output of lsgpio commit b158dd941b4f28e12c4f956caf2352febe09fe4e Merge: b83ac44e02986 597441b3436a4 Author: Linus Torvalds Date: Fri May 26 13:21:38 2023 -0700 Merge tag 'for-6.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - handle memory allocation error in checksumming helper (reported by syzbot) - fix lockdep splat when aborting a transaction, add NOFS protection around invalidate_inode_pages2 that could allocate with GFP_KERNEL - reduce chances to hit an ENOSPC during scrub with RAID56 profiles * tag 'for-6.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: use nofs when cleaning up aborted transactions btrfs: handle memory allocation failure in btrfs_csum_one_bio btrfs: scrub: try harder to mark RAID56 block groups read-only commit b83ac44e02986e640ee954e187ba414cb94453e2 Merge: 47ee3f1dd93bc 5502d1fab09df Author: Linus Torvalds Date: Fri May 26 13:11:41 2023 -0700 Merge tag 'drm-fixes-2023-05-26' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "This week's collection is pretty spread out, accel/qaic has a bunch of fixes, amdgpu, then lots of single fixes across a bunch of places. core: - fix drmm_mutex_init lock class mgag200: - fix gamma lut initialisation pl111: - fix FB depth on IMPD-1 framebuffer amdgpu: - Fix missing BO unlocking in KIQ error path - Avoid spurious secure display error messages - SMU13 fix - Fix an OD regression - GPU reset display IRQ warning fix - MST fix radeon: - Fix a DP regression i915: - PIPEDMC disabling fix for bigjoiner config panel: - fix aya neo air plus quirk sched: - remove redundant NULL check qaic: - fix NNC message corruption - Grab ch_lock during QAIC_ATTACH_SLICE_BO - Flush the transfer list again - Validate if BO is sliced before slicing - Validate user data before grabbing any lock - initialize ret variable to 0 - silence some uninitialized variable warnings" * tag 'drm-fixes-2023-05-26' of git://anongit.freedesktop.org/drm/drm: drm/amd/display: Have Payload Properly Created After Resume drm/amd/display: Fix warning in disabling vblank irq drm/amd/pm: Fix output of pp_od_clk_voltage drm/amd/pm: add missing NotifyPowerSource message mapping for SMU13.0.7 drm/radeon: reintroduce radeon_dp_work_func content drm/amdgpu: don't enable secure display on incompatible platforms drm:amd:amdgpu: Fix missing buffer object unlock in failure path accel/qaic: Fix NNC message corruption accel/qaic: Grab ch_lock during QAIC_ATTACH_SLICE_BO accel/qaic: Flush the transfer list again accel/qaic: Validate if BO is sliced before slicing accel/qaic: Validate user data before grabbing any lock accel/qaic: initialize ret variable to 0 drm/i915: Fix PIPEDMC disabling for a bigjoiner configuration drm: fix drmm_mutex_init() drm/sched: Remove redundant check drm: panel-orientation-quirks: Change Air's quirk to support Air Plus accel/qaic: silence some uninitialized variable warnings drm/pl111: Fix FB depth on IMPD-1 framebuffer drm/mgag200: Fix gamma lut not initialized. commit 47ee3f1dd93bcbe031539b1ecdaafb44b661c772 Author: Linus Torvalds Date: Fri May 26 12:34:20 2023 -0700 x86: re-introduce support for ERMS copies for user space accesses I tried to streamline our user memory copy code fairly aggressively in commit adfcf4231b8c ("x86: don't use REP_GOOD or ERMS for user memory copies"), in order to then be able to clean up the code and inline the modern FSRM case in commit 577e6a7fd50d ("x86: inline the 'rep movs' in user copies for the FSRM case"). We had reports [1] of that causing regressions earlier with blogbench, but that turned out to be a horrible benchmark for that case, and not a sufficient reason for re-instating "rep movsb" on older machines. However, now Eric Dumazet reported [2] a regression in performance that seems to be a rather more real benchmark, where due to the removal of "rep movs" a TCP stream over a 100Gbps network no longer reaches line speed. And it turns out that with the simplified the calling convention for the non-FSRM case in commit 427fda2c8a49 ("x86: improve on the non-rep 'copy_user' function"), re-introducing the ERMS case is actually fairly simple. Of course, that "fairly simple" is glossing over several missteps due to having to fight our assembler alternative code. This code really wanted to rewrite a conditional branch to have two different targets, but that made objtool sufficiently unhappy that this instead just ended up doing a choice between "jump to the unrolled loop, or use 'rep movsb' directly". Let's see if somebody finds a case where the kernel memory copies also care (see commit 68674f94ffc9: "x86: don't use REP_GOOD or ERMS for small memory copies"). But Eric does argue that the user copies are special because networking tries to copy up to 32KB at a time, if order-3 pages allocations are possible. In-kernel memory copies are typically small, unless they are the special "copy pages at a time" kind that still use "rep movs". Link: https://lore.kernel.org/lkml/202305041446.71d46724-yujie.liu@intel.com/ [1] Link: https://lore.kernel.org/lkml/CANn89iKUbyrJ=r2+_kK+sb2ZSSHifFZ7QkPLDpAtkJ8v4WUumA@mail.gmail.com/ [2] Reported-and-tested-by: Eric Dumazet Fixes: adfcf4231b8c ("x86: don't use REP_GOOD or ERMS for user memory copies") Signed-off-by: Linus Torvalds commit c041d33bf7ec731bb71f47e4d45a7aec9e40b1b9 Author: Song Liu Date: Fri May 19 16:57:57 2023 -0700 perf evsel: Separate bpf_counter_list and bpf_filters, can be used at the same time 'struct evsel' uses a union for the two lists. This turned out to be error prone. For example: [root@quaco ~]# perf stat --bpf-prog 5246 Error: cpu-clock event does not have sample flags 66c660 failed to set filter "(null)" on event cpu-clock with 2 (No such file or directory) [root@quaco ~]# perf stat --bpf-prog 5246 Fix this issue by separating the two lists. Fixes: 56ec9457a4a20c5e ("perf bpf filter: Implement event sample filtering") Signed-off-by: Song Liu Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Namhyung Kim Cc: kernel-team@meta.com Link: https://lore.kernel.org/r/20230519235757.3613719-1-song@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c8268a9b91055c992909a0845cfa59c624908da8 Author: Arnaldo Carvalho de Melo Date: Fri May 26 15:45:03 2023 -0300 tools headers UAPI: Sync the linux/in.h with the kernel sources Picking the changes from: 3632679d9e4f879f ("ipv{4,6}/raw: fix output xfrm lookup wrt protocol") That includes a define (IP_PROTOCOL) that isn't being used in generating any id -> string table used by 'perf trace'. Addresses this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/in.h' differs from latest version at 'include/uapi/linux/in.h' diff -u tools/include/uapi/linux/in.h include/uapi/linux/in.h Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Nicolas Dichtel Cc: Paolo Abeni Link: https://lore.kernel.org/lkml/ZHD/Ms0DMq7viaq+@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 15d4371bac978bb96b36c37e822cdae24c0dcd77 Author: James Clark Date: Mon May 22 11:26:04 2023 +0100 perf cs-etm: Copy kernel coresight-pmu.h header Copy the kernel version of the header to fix the header diff build warning. Some new definitions were only added to the tools side header, but these are only used in Perf so move them to a different header. Signed-off-by: James Clark Reviewed-by: Mike Leach Link: https://lore.kernel.org/r/20230522102604.1081416-1-james.clark@arm.com Cc: Mark Rutland Cc: Suzuki K Poulose Cc: Ian Rogers Cc: Peter Zijlstra Cc: Adrian Hunter Cc: acme@kernel.org Cc: Jiri Olsa Cc: Namhyung Kim Cc: Will Deacon Cc: Leo Yan Cc: Alexander Shishkin Cc: linux-arm-kernel@lists.infradead.org Cc: coresight@lists.linaro.org Cc: siyanteng@loongson.cn Cc: John Garry Cc: Ingo Molnar Cc: linux-kernel@vger.kernel.org Cc: linux-perf-users@vger.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 251c01e27feee83ff8fa294d33277616c9032dd0 Author: Song Liu Date: Fri May 26 15:30:23 2023 -0300 perf bpf: Do not use llvm-strip on BPF binary llvm-strip is not really required. Remove this dependency to make it easier to build perf with BUILD_BPF_SKEL=1. Committer notes: This removes the need for the 'llvm' package just to get llvm-strip. Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Song Liu Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 65cd8e5534f873b76b55fb17e942c512ee3699d9 Author: Ian Rogers Date: Mon Apr 17 12:25:46 2023 -0700 perf build: Don't compile demangle-cxx.cpp if not necessary demangle-cxx.cpp requires a C++ compiler, but feature checks may fail because of the absence of this. Add a CONFIG_CXX_DEMANGLE so that the source isn't built if not supported. Copy libbfd and cplus demangle variants to a weak symbol-elf.c version so they aren't dependent on C++. These variants are only built with the build option BUILD_NONDISTRO=1. Committer note: This also handles this build break when a C++ compiler isn't available: CXX /tmp/build/perf/util/demangle-cxx.o /bin/sh: g++: command not found Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Qi Liu Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20230417192546.99923-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit a0c2f92d36d20d72efb27cbe8669037321e92f22 Author: Ian Rogers Date: Mon May 15 09:50:39 2023 -0700 perf arm: Fix include path to cs-etm.h Change "../cs-etm.h" to just "../../../util/cs-etm.h" as ../cs-etm.h doesn't exist. Suggested-by: Leo Yan Reviewed-by: Leo Yan Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230515165039.544045-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 690917c647e245da76183656400d4926427a8b93 Author: Namhyung Kim Date: Wed May 24 17:03:07 2023 -0700 perf bpf filter: Fix a broken perf sample data naming for BPF CO-RE BPF CO-RE requires 3 underscores for the ignored suffix rule but it mistakenly used only 2. Let's fix it. Fixes: 3a8b8fc3174891c4 ("perf bpf filter: Support pre-5.16 kernels where 'mem_hops' isn't in 'union perf_mem_data_src'") Signed-off-by: Namhyung Kim Acked-by: Andrii Nakryiko Acked-by: John Fastabend Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230525000307.3202449-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4095f4d9225a64921a6ee4bb8dbc94c6edc2df08 Author: Tudor Ambarus Date: Thu May 18 08:54:40 2023 +0000 mtd: spi-nor: Fix divide by zero for spi-nor-generic flashes We failed to initialize n_banks for spi-nor-generic flashes, which caused a devide by zero when computing the bank_size. By default we consider that all chips have a single bank. Initialize the default number of banks for spi-nor-generic flashes. Even if the bug is fixed with this simple initialization, check the n_banks value before dividing so that we make sure this kind of bug won't occur again if some other struct instance is created uninitialized. Suggested-by: Todd Brandt Reported-by: Todd Brandt Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217448 Fixes: 9d6c5d64f028 ("mtd: spi-nor: Introduce the concept of bank") Link: https://lore.kernel.org/all/20230516225108.29194-1-todd.e.brandt@intel.com/ Signed-off-by: Tudor Ambarus Tested-by: Todd Brandt Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230518085440.2363676-1-tudor.ambarus@linaro.org commit 650a8884a364ff2568b51cde9009cfd43cdae6ad Author: Arnd Bergmann Date: Tue May 16 22:21:24 2023 +0200 mtd: rawnand: ingenic: fix empty stub helper definitions A few functions provide an empty interface definition when CONFIG_MTD_NAND_INGENIC_ECC is disabled, but they are accidentally defined as global functions in the header: drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:39:5: error: no previous prototype for 'ingenic_ecc_calculate' drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:46:5: error: no previous prototype for 'ingenic_ecc_correct' drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:53:6: error: no previous prototype for 'ingenic_ecc_release' drivers/mtd/nand/raw/ingenic/ingenic_ecc.h:57:21: error: no previous prototype for 'of_ingenic_ecc_get' Turn them into 'static inline' definitions instead. Fixes: 15de8c6efd0e ("mtd: rawnand: ingenic: Separate top-level and SoC specific code") Signed-off-by: Arnd Bergmann Reviewed-by: Paul Cercueil Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230516202133.559488-1-arnd@kernel.org commit 420c4495b5e56cc11e6802ce98400544f698b393 Author: Tudor Ambarus Date: Tue May 9 19:39:00 2023 +0000 mtd: spi-nor: spansion: make sure local struct does not contain garbage Following errors were seen with um-x86_64-gcc12/um-allyesconfig: + /kisskb/src/drivers/mtd/spi-nor/spansion.c: error: 'op' is used uninitialized [-Werror=uninitialized]: => 495:27, 364:27 Initialise local struct spi_mem_op with all zeros at declaration in order to avoid using garbage data for fields that are not explicitly set afterwards. Reported-by: Geert Uytterhoeven Fixes: c87c9b11c53ce ("mtd: spi-nor: spansion: Determine current address mode") Fixes: 6afcc84080c41 ("mtd: spi-nor: spansion: Add support for Infineon S25FS256T") Signed-off-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230509193900.948753-1-tudor.ambarus@linaro.org commit 9491d01fbc550d123d72bf1cd7a0985508a9c469 Merge: 3eb96946f0be6 a3a9d63dcd155 Author: Jens Axboe Date: Fri May 26 09:46:01 2023 -0600 Merge tag 'nvme-6.4-2023-05-26' of git://git.infradead.org/nvme into block-6.4 Pull NVMe fix from Keith: "nvme fixes for 6.4 One nvme quirk (Tatsuki)" * tag 'nvme-6.4-2023-05-26' of git://git.infradead.org/nvme: NVMe: Add MAXIO 1602 to bogus nid list. commit 8938f75a5e35c597a647c28984a0304da7a33d63 Author: Herve Codina Date: Tue May 23 17:12:22 2023 +0200 ASoC: simple-card: Add missing of_node_put() in case of error In the error path, a of_node_put() for platform is missing. Just add it. Signed-off-by: Herve Codina Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20230523151223.109551-9-herve.codina@bootlin.com Signed-off-by: Mark Brown commit a3a9d63dcd15535e7fdf4c7c1b32bfaed762973a Author: Tatsuki Sugiura Date: Sat May 20 21:23:50 2023 +0900 NVMe: Add MAXIO 1602 to bogus nid list. HIKSEMI FUTURE M.2 SSD uses the same dummy nguid and eui64. I confirmed it with my two devices. This patch marks the controller as NVME_QUIRK_BOGUS_NID. --------------------------------------------------------- sugi@tempest:~% sudo nvme id-ctrl /dev/nvme0 NVME Identify Controller: vid : 0x1e4b ssvid : 0x1e4b sn : 30096022612 mn : HS-SSD-FUTURE 2048G fr : SN10542 rab : 0 ieee : 000000 cmic : 0 mdts : 7 cntlid : 0 ver : 0x10400 rtd3r : 0x7a120 rtd3e : 0x1e8480 oaes : 0x200 ctratt : 0x2 rrls : 0 cntrltype : 1 fguid : 00000000-0000-0000-0000-000000000000 --------------------------------------------------------- --------------------------------------------------------- sugi@tempest:~% sudo nvme id-ns /dev/nvme0n1 NVME Identify Namespace 1: nguid : 00000000000000000000000000000000 eui64 : 0000000000000002 lbaf 0 : ms:0 lbads:9 rp:0 (in use) --------------------------------------------------------- Signed-off-by: Tatsuki Sugiura Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit abf5422e821f0f321e95cb728f013f143ca4655c Merge: 51bba254edc79 111a833dc5cbe Author: Arnd Bergmann Date: Fri May 26 16:49:05 2023 +0200 Merge tag 'ffa-fixes-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes Arm FF-A fixes for v6.4 Quite a few fixes to address set of assorted issues: 1. NULL pointer dereference if the ffa driver doesn't provide remove() callback as it is currently executed unconditionally 2. FF-A core probe failure on systems with v1.0 firmware as the new partition info get count flag is used unconditionally 3. Failure to register more than one logical partition or service within the same physical partition as the device name contains only VM ID which will be same for all but each will have unique UUID. 4. Rejection of certain memory interface transmissions by the receivers (secure partitions) as few MBZ fields are non-zero due to lack of explicit re-initialization of those fields * tag 'ffa-fixes-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_ffa: Set reserved/MBZ fields to zero in the memory descriptors firmware: arm_ffa: Fix FFA device names for logical partitions firmware: arm_ffa: Fix usage of partition info get count flag firmware: arm_ffa: Check if ffa_driver remove is present before executing Link: https://lore.kernel.org/r/20230509143453.1188753-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 8d73259ef23f449329294dc187932f7470268126 Author: Namhyung Kim Date: Thu May 25 14:20:38 2023 -0700 perf ftrace latency: Remove unnecessary "--" from --use-nsec option The option name should not have the dashes. Current version shows four dashes for the option. $ perf ftrace latency -h Usage: perf ftrace [] [] or: perf ftrace [] -- [] [] or: perf ftrace {trace|latency} [] [] or: perf ftrace {trace|latency} [] -- [] [] -b, --use-bpf Use BPF to measure function latency -n, ----use-nsec Use nano-second histogram -T, --trace-funcs Show latency of given function Fixes: 84005bb6148618cc ("perf ftrace latency: Add -n/--use-nsec option") Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Changbin Du Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230525212038.3535851-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9b9e46aa07273ceb96866b2e812b46f1ee0b8d2f Author: Osama Muhammad Date: Thu May 25 22:27:46 2023 +0500 nfcsim.c: Fix error checking for debugfs_create_dir This patch fixes the error checking in nfcsim.c. The DebugFS kernel API is developed in a way that the caller can safely ignore the errors that occur during the creation of DebugFS nodes. Signed-off-by: Osama Muhammad Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit a05e9aabd9dc27fc8888678391e3bf78624f8253 Author: Hans Verkuil Date: Wed Apr 19 08:06:02 2023 +0100 media: staging: media: atomisp: init high & low vars Fix a compiler warning: include/linux/dev_printk.h: In function 'ov2680_probe': include/linux/dev_printk.h:144:31: warning: 'high' may be used uninitialized [-Wmaybe-uninitialized] 144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~ In function 'ov2680_detect', inlined from 'ov2680_s_config' at drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:468:8, inlined from 'ov2680_probe' at drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:647:8: drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:376:13: note: 'high' was declared here 376 | u32 high, low; | ^~~~ 'high' is indeed uninitialized after the ov_read_reg8() call failed, so there is no point showing the value. Just say that the read failed. But low can also be used uninitialized later, so just make it more robust and properly zero the high and low variables. Signed-off-by: Hans Verkuil Reviewed-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 73af6c7511038249cad3d5f3b44bf8d78ac0f499 Author: Hans Verkuil Date: Mon Apr 24 16:07:28 2023 +0100 media: cec: core: don't set last_initiator if tx in progress When a message was received the last_initiator is set to 0xff. This will force the signal free time for the next transmit to that for a new initiator. However, if a new transmit is already in progress, then don't set last_initiator, since that's the initiator of the current transmit. Overwriting this would cause the signal free time of a following transmit to be that of the new initiator instead of a next transmit. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fe4526d99e2e06b08bb80316c3a596ea6a807b75 Author: Hans Verkuil Date: Thu Apr 20 08:26:53 2023 +0100 media: cec: core: disable adapter in cec_devnode_unregister Explicitly disable the CEC adapter in cec_devnode_unregister() Usually this does not really do anything important, but for drivers that use the CEC pin framework this is needed to properly stop the hrtimer. Without this a crash would happen when such a driver is unloaded with rmmod. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ed17f89e9502f03af493e130620a9bb74c07cf28 Author: Pin-yen Lin Date: Sat Apr 22 11:39:05 2023 +0100 media: mediatek: vcodec: Only apply 4K frame sizes on decoder formats When VCODEC_CAPABILITY_4K_DISABLED is not set in dec_capability, skip formats that are not MTK_FMT_DEC so only decoder formats is updated in mtk_init_vdec_params. Fixes: e25528e1dbe5 ("media: mediatek: vcodec: Use 4K frame size when supported by stateful decoder") Signed-off-by: Pin-yen Lin Reviewed-by: Chen-Yu Tsai Reviewed-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 76743b29f4802afdf81d7ff1228c11e697850235 Author: Yassine Oudjana Date: Wed May 3 08:53:40 2023 +0100 media: camss: camss-video: Don't zero subdev format again after initialization In an earlier commit, setting the which field of the subdev format struct in video_get_subdev_format was moved to a designated initializer that also zeroes all other fields. However, the memset call that was zeroing the fields earlier was left in place, causing the which field to be cleared after being set in the initializer. Remove the memset call from video_get_subdev_format to avoid clearing the initialized which field. Fixes: ecefa105cc44 ("media: Zero-initialize all structures passed to subdev pad operations") Signed-off-by: Yassine Oudjana Acked-by: Bryan O'Donoghue Tested-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 14b4bd01f8e5d663a41ef8cec5857db874b66e88 Author: Benjamin Gaignard Date: Tue May 23 17:25:15 2023 +0100 media: verisilicon: Additional fix for the crash when opening the driver This fixes the following issue observed on Odroid-M1 board: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 Mem abort info: ... Modules linked in: crct10dif_ce hantro_vpu snd_soc_simple_card snd_soc_simple_card_utils v4l2_vp9 v4l2_h264 rockchip_saradc v4l2_mem2mem videobuf2_dma_contig videobuf2_memops rtc_rk808 videobuf2_v4l2 industrialio_triggered_buffer rockchip_thermal dwmac_rk stmmac_platform stmmac videodev kfifo_buf display_connector videobuf2_common pcs_xpcs mc rockchipdrm analogix_dp dw_mipi_dsi dw_hdmi drm_display_helper panfrost drm_shmem_helper gpu_sched ip_tables x_tables ipv6 CPU: 3 PID: 176 Comm: v4l_id Not tainted 6.3.0-rc7-next-20230420 #13481 Hardware name: Hardkernel ODROID-M1 (DT) pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : hantro_try_fmt+0xa0/0x278 [hantro_vpu] lr : hantro_try_fmt+0x94/0x278 [hantro_vpu] ... Call trace: hantro_try_fmt+0xa0/0x278 [hantro_vpu] hantro_set_fmt_out+0x3c/0x298 [hantro_vpu] hantro_reset_raw_fmt+0x98/0x128 [hantro_vpu] hantro_set_fmt_cap+0x240/0x254 [hantro_vpu] hantro_reset_encoded_fmt+0x94/0xcc [hantro_vpu] hantro_reset_fmts+0x18/0x38 [hantro_vpu] hantro_open+0xd4/0x20c [hantro_vpu] v4l2_open+0x80/0x120 [videodev] chrdev_open+0xc0/0x22c do_dentry_open+0x13c/0x48c vfs_open+0x2c/0x38 path_openat+0x550/0x934 do_filp_open+0x80/0x12c do_sys_openat2+0xb4/0x168 __arm64_sys_openat+0x64/0xac invoke_syscall+0x48/0x114 el0_svc_common+0x100/0x120 do_el0_svc+0x3c/0xa8 el0_svc+0x40/0xa8 el0t_64_sync_handler+0xb8/0xbc el0t_64_sync+0x190/0x194 Code: 97fc8a7f f940aa80 52864a61 72a686c1 (b9400800) ---[ end trace 0000000000000000 ]--- Fixes: db6f68b51e5c ("media: verisilicon: Do not set context src/dst formats in reset functions") Signed-off-by: Benjamin Gaignard Tested-by: Michael Tretter Tested-by: Diederik de Haas Tested-by: Marek Szyprowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dc362e20cd6ab7a93d1b09669730c406f0910c35 Author: Raju Rangoju Date: Thu May 25 23:56:12 2023 +0530 amd-xgbe: fix the false linkup in xgbe_phy_status In the event of a change in XGBE mode, the current auto-negotiation needs to be reset and the AN cycle needs to be re-triggerred. However, the current code ignores the return value of xgbe_set_mode(), leading to false information as the link is declared without checking the status register. Fix this by propagating the mode switch status information to xgbe_phy_status(). Fixes: e57f7a3feaef ("amd-xgbe: Prepare for working with more than one type of phy") Co-developed-by: Sudheesh Mavila Signed-off-by: Sudheesh Mavila Reviewed-by: Simon Horman Acked-by: Shyam Sundar S K Signed-off-by: Raju Rangoju Signed-off-by: David S. Miller commit 8a0d57df8938e9fd2e99d47a85b7f37d86f91097 Author: Jakub Kicinski Date: Wed May 24 22:17:41 2023 -0700 tls: improve lockless access safety of tls_err_abort() Most protos' poll() methods insert a memory barrier between writes to sk_err and sk_error_report(). This dates back to commit a4d258036ed9 ("tcp: Fix race in tcp_poll"). I guess we should do the same thing in TLS, tcp_poll() does not hold the socket lock. Fixes: 3c4d7559159b ("tls: kernel TLS support") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 5502d1fab09df791a8b1208dea9defc418b9bbf7 Merge: 13aa38f86eea7 e997c218ad736 Author: Dave Airlie Date: Fri May 26 15:38:27 2023 +1000 Merge tag 'drm-misc-fixes-2023-05-24' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v6.4-rc4: - A few non-trivial fixes to qaic. - Fix drmm_mutex_init always using same lock class. - Fix pl111 fb depth. - Fix uninitialised gamma lut in mgag200. - Add Aya Neo Air Plus quirk. - Trivial null check removal in scheduler. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/d19f748c-2c5b-8140-5b05-a8282dfef73e@linux.intel.com commit 13aa38f86eea7f95eca4909c075b3b511dc3f500 Merge: 94d39d01287b8 482e6ad9adde6 Author: Dave Airlie Date: Fri May 26 15:30:08 2023 +1000 Merge tag 'amd-drm-fixes-6.4-2023-05-24' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.4-2023-05-24: amdgpu: - Fix missing BO unlocking in KIQ error path - Avoid spurious secure display error messages - SMU13 fix - Fix an OD regression - GPU reset display IRQ warning fix - MST fix radeon: - Fix a DP regression Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230524211238.7749-1-alexander.deucher@amd.com commit 94d39d01287b8e28cf4b914908a9fef5201954a8 Merge: 44c026a73be80 45dfbd992923f Author: Dave Airlie Date: Fri May 26 14:36:50 2023 +1000 Merge tag 'drm-intel-fixes-2023-05-25' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes PIPEDMC disabling fix for bigjoiner config Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZG9aROGyc947/J1l@jlahtine-mobl.ger.corp.intel.com commit aa866ee4b15162ef92a567512f85c4357ca8e97f Merge: 822b5a1c17df7 bb72b94c659f5 Author: Jakub Kicinski Date: Thu May 25 21:09:40 2023 -0700 Merge tag 'mlx5-fixes-2023-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2023-05-24 This series includes bug fixes for the mlx5 driver. * tag 'mlx5-fixes-2023-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: Documentation: net/mlx5: Wrap notes in admonition blocks Documentation: net/mlx5: Add blank line separator before numbered lists Documentation: net/mlx5: Use bullet and definition lists for vnic counters description Documentation: net/mlx5: Wrap vnic reporter devlink commands in code blocks net/mlx5: Fix check for allocation failure in comp_irqs_request_pci() net/mlx5: DR, Add missing mutex init/destroy in pattern manager net/mlx5e: Move Ethernet driver debugfs to profile init callback net/mlx5e: Don't attach netdev profile while handling internal error net/mlx5: Fix post parse infra to only parse every action once net/mlx5e: Use query_special_contexts cmd only once per mdev net/mlx5: fw_tracer, Fix event handling net/mlx5: SF, Drain health before removing device net/mlx5: Drain health before unregistering devlink net/mlx5e: Do not update SBCM when prio2buffer command is invalid net/mlx5e: Consider internal buffers size in port buffer calculations net/mlx5e: Prevent encap offload when neigh update is running net/mlx5e: Extract remaining tunnel encap code to dedicated file ==================== Link: https://lore.kernel.org/r/20230525034847.99268-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 822b5a1c17df7e338b9f05d1cfe5764e37c7f74f Author: Kuniyuki Iwashima Date: Wed May 24 16:29:34 2023 -0700 af_packet: Fix data-races of pkt_sk(sk)->num. syzkaller found a data race of pkt_sk(sk)->num. The value is changed under lock_sock() and po->bind_lock, so we need READ_ONCE() to access pkt_sk(sk)->num without these locks in packet_bind_spkt(), packet_bind(), and sk_diag_fill(). Note that WRITE_ONCE() is already added by commit c7d2ef5dd4b0 ("net/packet: annotate accesses to po->bind"). BUG: KCSAN: data-race in packet_bind / packet_do_bind write (marked) to 0xffff88802ffd1cee of 2 bytes by task 7322 on cpu 0: packet_do_bind+0x446/0x640 net/packet/af_packet.c:3236 packet_bind+0x99/0xe0 net/packet/af_packet.c:3321 __sys_bind+0x19b/0x1e0 net/socket.c:1803 __do_sys_bind net/socket.c:1814 [inline] __se_sys_bind net/socket.c:1812 [inline] __x64_sys_bind+0x40/0x50 net/socket.c:1812 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x72/0xdc read to 0xffff88802ffd1cee of 2 bytes by task 7318 on cpu 1: packet_bind+0xbf/0xe0 net/packet/af_packet.c:3322 __sys_bind+0x19b/0x1e0 net/socket.c:1803 __do_sys_bind net/socket.c:1814 [inline] __se_sys_bind net/socket.c:1812 [inline] __x64_sys_bind+0x40/0x50 net/socket.c:1812 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x72/0xdc value changed: 0x0300 -> 0x0000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 7318 Comm: syz-executor.4 Not tainted 6.3.0-13380-g7fddb5b5300c #4 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Fixes: 96ec6327144e ("packet: Diag core and basic socket info dumping") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzkaller Signed-off-by: Kuniyuki Iwashima Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20230524232934.50950-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 081e8df6819997eae236f75dd52f0c147c4be939 Author: Jakub Kicinski Date: Wed May 24 10:07:12 2023 -0700 tools: ynl: avoid dict errors on older Python versions Python 3.9.0 or newer supports combining dicts() with |, but older versions of Python are still used in the wild (e.g. on CentOS 8, which goes EoL May 31, 2024). With Python 3.6.8 we get: TypeError: unsupported operand type(s) for |: 'dict' and 'dict' Use older syntax. Tested with non-legacy families only. Fixes: f036d936ca57 ("tools: ynl: Add fixed-header support to ynl") Reviewed-by: Simon Horman Reviewed-by: Donald Hunter Tested-by: Donald Hunter Link: https://lore.kernel.org/r/20230524170712.2036128-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 31642e7089df8fd3f54ca7843f7ee2952978cad1 Author: Eric Dumazet Date: Wed May 24 14:14:56 2023 +0000 netrom: fix info-leak in nr_write_internal() Simon Kapadia reported the following issue: The Online Amateur Radio Community (OARC) has recently been experimenting with building a nationwide packet network in the UK. As part of our experimentation, we have been testing out packet on 300bps HF, and playing with net/rom. For HF packet at this baud rate you really need to make sure that your MTU is relatively low; AX.25 suggests a PACLEN of 60, and a net/rom PACLEN of 40 to go with that. However the Linux net/rom support didn't work with a low PACLEN; the mkiss module would truncate packets if you set the PACLEN below about 200 or so, e.g.: Apr 19 14:00:51 radio kernel: [12985.747310] mkiss: ax1: truncating oversized transmit packet! This didn't make any sense to me (if the packets are smaller why would they be truncated?) so I started investigating. I looked at the packets using ethereal, and found that many were just huge compared to what I would expect. A simple net/rom connection request packet had the request and then a bunch of what appeared to be random data following it: Simon provided a patch that I slightly revised: Not only we must not use skb_tailroom(), we also do not want to count NR_NETWORK_LEN twice. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Co-Developed-by: Simon Kapadia Signed-off-by: Simon Kapadia Signed-off-by: Eric Dumazet Tested-by: Simon Kapadia Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230524141456.1045467-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit ffb3322181d9e8db880202e4f00991764a35d812 Author: Wei Fang Date: Wed May 24 20:57:14 2023 +0800 net: stmmac: fix call trace when stmmac_xdp_xmit() is invoked We encountered a kernel call trace issue which was related to ndo_xdp_xmit callback on our i.MX8MP platform. The reproduce steps show as follows. 1. The FEC port (eth0) connects to a PC port, and the PC uses pktgen_sample03_burst_single_flow.sh to generate packets and send these packets to the FEC port. Notice that the script must be executed before step 2. 2. Run the "./xdp_redirect eth0 eth1" command on i.MX8MP, the eth1 interface is the dwmac. Then there will be a call trace issue soon. Please see the log for more details. The root cause is that the NETDEV_XDP_ACT_NDO_XMIT feature is enabled by default, so when the step 2 command is exexcuted and packets have already been sent to eth0, the stmmac_xdp_xmit() starts running before the stmmac_xdp_set_prog() finishes. To resolve this issue, we disable the NETDEV_XDP_ACT_NDO_XMIT feature by default and turn on/off this feature when the bpf program is installed/uninstalled which just like the other ethernet drivers. Call Trace log: [ 306.311271] ------------[ cut here ]------------ [ 306.315910] WARNING: CPU: 0 PID: 15 at lib/timerqueue.c:55 timerqueue_del+0x68/0x70 [ 306.323590] Modules linked in: [ 306.326654] CPU: 0 PID: 15 Comm: ksoftirqd/0 Not tainted 6.4.0-rc1+ #37 [ 306.333277] Hardware name: NXP i.MX8MPlus EVK board (DT) [ 306.338591] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 306.345561] pc : timerqueue_del+0x68/0x70 [ 306.349577] lr : __remove_hrtimer+0x5c/0xa0 [ 306.353777] sp : ffff80000b7c3920 [ 306.357094] x29: ffff80000b7c3920 x28: 0000000000000000 x27: 0000000000000001 [ 306.364244] x26: ffff80000a763a40 x25: ffff0000d0285a00 x24: 0000000000000001 [ 306.371390] x23: 0000000000000001 x22: ffff000179389a40 x21: 0000000000000000 [ 306.378537] x20: ffff000179389aa0 x19: ffff0000d2951308 x18: 0000000000001000 [ 306.385686] x17: f1d3000000000000 x16: 00000000c39c1000 x15: 55e99bbe00001a00 [ 306.392835] x14: 09000900120aa8c0 x13: e49af1d300000000 x12: 000000000000c39c [ 306.399987] x11: 100055e99bbe0000 x10: ffff8000090b1048 x9 : ffff8000081603fc [ 306.407133] x8 : 000000000000003c x7 : 000000000000003c x6 : 0000000000000001 [ 306.414284] x5 : ffff0000d2950980 x4 : 0000000000000000 x3 : 0000000000000000 [ 306.421432] x2 : 0000000000000001 x1 : ffff0000d2951308 x0 : ffff0000d2951308 [ 306.428585] Call trace: [ 306.431035] timerqueue_del+0x68/0x70 [ 306.434706] __remove_hrtimer+0x5c/0xa0 [ 306.438549] hrtimer_start_range_ns+0x2bc/0x370 [ 306.443089] stmmac_xdp_xmit+0x174/0x1b0 [ 306.447021] bq_xmit_all+0x194/0x4b0 [ 306.450612] __dev_flush+0x4c/0x98 [ 306.454024] xdp_do_flush+0x18/0x38 [ 306.457522] fec_enet_rx_napi+0x6c8/0xc68 [ 306.461539] __napi_poll+0x40/0x220 [ 306.465038] net_rx_action+0xf8/0x240 [ 306.468707] __do_softirq+0x128/0x3a8 [ 306.472378] run_ksoftirqd+0x40/0x58 [ 306.475961] smpboot_thread_fn+0x1c4/0x288 [ 306.480068] kthread+0x124/0x138 [ 306.483305] ret_from_fork+0x10/0x20 [ 306.486889] ---[ end trace 0000000000000000 ]--- Fixes: 66c0e13ad236 ("drivers: net: turn on XDP features") Signed-off-by: Wei Fang Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230524125714.357337-1-wei.fang@nxp.com Signed-off-by: Jakub Kicinski commit d68cb7cf1fd0ef4287bc0ecd1ed0b6ae8e05fc70 Author: Thomas Bogendoerfer Date: Wed May 24 21:49:08 2023 +0200 net: mellanox: mlxbf_gige: Fix skb_panic splat under memory pressure Do skb_put() after a new skb has been successfully allocated otherwise the reused skb leads to skb_panics or incorrect packet sizes. Fixes: f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver") Signed-off-by: Thomas Bogendoerfer Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230524194908.147145-1-tbogendoerfer@suse.de Signed-off-by: Jakub Kicinski commit b535cc796a4b4942cd189652588e8d37c1f5925a Author: Steve French Date: Thu May 25 18:53:28 2023 -0500 smb3: missing null check in SMB2_change_notify If plen is null when passed in, we only checked for null in one of the two places where it could be used. Although plen is always valid (not null) for current callers of the SMB2_change_notify function, this change makes it more consistent. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/202305251831.3V1gbbFs-lkp@intel.com/ Signed-off-by: Steve French commit 1dd5483af494216e91c9a12f11992bcba483f944 Author: Steve French Date: Wed May 24 15:12:29 2023 -0500 smb3: update a reviewer email in MAINTAINERS file Paulo has a new email address so update maintainers files. Signed-off-by: Steve French commit 0d85b27b0cc6b5cf54567c5ad913a247a71583ce Merge: 192fe71ce5d17 ab6cacf833ba3 Author: Linus Torvalds Date: Thu May 25 19:23:18 2023 -0700 Merge tag '6.4-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb directory moves and client fixes from Steve French: "Four smb3 client fixes (three of which marked for stable) and three patches to move of fs/cifs and fs/ksmbd to a new common "fs/smb" parent directory - Move the client and server source directories to a common parent directory: fs/cifs -> fs/smb/client fs/ksmbd -> fs/smb/server fs/smbfs_common -> fs/smb/common - important readahead fix - important fix for SMB1 regression - fix for missing mount option ("mapchars") in mount API conversion - minor debugging improvement" * tag '6.4-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: smb3: move Documentation/filesystems/cifs to Documentation/filesystems/smb cifs: correct references in Documentation to old fs/cifs path smb: move client and server files to common directory fs/smb cifs: mapchars mount option ignored smb3: display debug information better for encryption cifs: fix smb1 mount regression cifs: Fix cifs_limit_bvec_subset() to correctly check the maxmimum size commit 192fe71ce5d17b184423b96d76ce648e1b848db4 Merge: 9828ed3f695a1 61e150fb31072 Author: Linus Torvalds Date: Thu May 25 18:50:18 2023 -0700 Merge tag 'parisc-for-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc architecture fixes from Helge Deller: "Quite a bunch of real bugfixes in here and most of them are tagged for backporting: A fix for cache flushing from irq context, a kprobes & kgdb breakpoint handling fix, and a fix in the alternative code patching function to take care of CPU hotplugging. parisc now provides LOCKDEP support and comes with a lightweight spinlock check. Both features helped me to find the cache flush bug. Additionally writing the AGP gatt has been fixed, the machine allows the user to reboot after a system halt and arch_sync_dma_for_cpu() has been optimized for PCXL PCUs. Summary: - Fix flush_dcache_page() for usage from irq context - Handle kprobes breakpoints only in kernel context - Handle kgdb breakpoints only in kernel context - Use num_present_cpus() in alternative patching code - Enable LOCKDEP support - Add lightweight spinlock checks - Flush AGP gatt writes and adjust gatt mask in parisc_agp_mask_memory() - Allow to reboot machine after system halt - Improve cache flushing for PCXL in arch_sync_dma_for_cpu()" * tag 'parisc-for-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix flush_dcache_page() for usage from irq context parisc: Handle kgdb breakpoints only in kernel context parisc: Handle kprobes breakpoints only in kernel context parisc: Allow to reboot machine after system halt parisc: Enable LOCKDEP support parisc: Add lightweight spinlock checks parisc: Use num_present_cpus() in alternative patching code parisc: Flush gatt writes and adjust gatt mask in parisc_agp_mask_memory() parisc: Improve cache flushing for PCXL in arch_sync_dma_for_cpu() commit 9828ed3f695a138f7add89fa2a186ababceb8006 Author: Linus Torvalds Date: Thu May 25 09:32:25 2023 -0700 module: error out early on concurrent load of the same module file It turns out that udev under certain circumstances will concurrently try to load the same modules over-and-over excessively. This isn't a kernel bug, but it ends up affecting the kernel, to the point that under certain circumstances we can fail to boot, because the kernel uses a lot of memory to read all the module data all at once. Note that it isn't a memory leak, it's just basically a thundering herd problem happening at bootup with a lot of CPUs, with the worst cases then being pretty bad. Admittedly the worst situations are somewhat contrived: lots and lots of CPUs, not a lot of memory, and KASAN enabled to make it all slower and as such (unintentionally) exacerbate the problem. Luis explains: [1] "My best assessment of the situation is that each CPU in udev ends up triggering a load of duplicate set of modules, not just one, but *a lot*. Not sure what heuristics udev uses to load a set of modules per CPU." Petr Pavlu chimes in: [2] "My understanding is that udev workers are forked. An initial kmod context is created by the main udevd process but no sharing happens after the fork. It means that the mentioned memory pool logic doesn't really kick in. Multiple parallel load requests come from multiple udev workers, for instance, each handling an udev event for one CPU device and making the exactly same requests as all others are doing at the same time. The optimization idea would be to recognize these duplicate requests at the udevd/kmod level and converge them" Note that module loading has tried to mitigate this issue before, see for example commit 064f4536d139 ("module: avoid allocation if module is already present and ready"), which has a few ASCII graphs on memory use due to this same issue. However, while that noticed that the module was already loaded, and exited with an error early before spending any more time on setting up the module, it didn't handle the case of multiple concurrent module loads all being active - but not complete - at the same time. Yes, one of them will eventually win the race and finalize its copy, and the others will then notice that the module already exists and error out, but while this all happens, we have tons of unnecessary concurrent work being done. Again, the real fix is for udev to not do that (maybe it should use threads instead of fork, and have actual shared data structures and not cause duplicate work). That real fix is apparently not trivial. But it turns out that the kernel already has a pretty good model for dealing with concurrent access to the same file: the i_writecount of the inode. In fact, the module loading already indirectly uses 'i_writecount' , because 'kernel_file_read()' will in fact do ret = deny_write_access(file); if (ret) return ret; ... allow_write_access(file); around the read of the file data. We do not allow concurrent writes to the file, and return -ETXTBUSY if the file was open for writing at the same time as the module data is loaded from it. And the solution to the reader concurrency problem is to simply extend this "no concurrent writers" logic to simply be "exclusive access". Note that "exclusive" in this context isn't really some absolute thing: it's only exclusion from writers and from other "special readers" that do this writer denial. So we simply introduce a variation of that "deny_write_access()" logic that not only denies write access, but also requires that this is the _only_ such access that denies write access. Which means that you can't start loading a module that is already being loaded as a module by somebody else, or you will get the same -ETXTBSY error that you would get if there were writers around. [ It also means that you can't try to load a currently executing executable as a module, for the same reason: executables do that same "deny_write_access()" thing, and that's obviously where the whole ETXTBSY logic traditionally came from. This is not a problem for kernel modules, since the set of normal executable files and kernel module files is entirely disjoint. ] This new function is called "exclusive_deny_write_access()", and the implementation is trivial, in that it's just an atomic decrement of i_writecount if it was 0 before. To use that new exclusivity check, all we then do is wrap the module loading with that exclusive_deny_write_access()() / allow_write_access() pair. The actual patch is a bit bigger than that, because we want to surround not just the "load file data" part, but the whole module setup, to get maximum exclusion. So this ends up splitting up "finit_module()" into a few helper functions to make it all very clear and legible. In Luis' test-case (bringing up 255 vcpu's in a virtual machine [3]), the "wasted vmalloc" space (ie module data read into a vmalloc'ed area in order to be loaded as a module, but then discarded because somebody else loaded the same module instead) dropped from 1.8GiB to 474kB. Yes, that's gigabytes to kilobytes. It doesn't drop completely to zero, because even with this change, you can still end up having completely serial pointless module loads, where one udev process has loaded a module fully (and thus the kernel has released that exclusive lock on the module file), and then another udev process tries to load the same module again. So while we cannot fully get rid of the fundamental bug in user space, we _can_ get rid of the excessive concurrent thundering herd effect. A couple of final side notes on this all: - This tweak only affects the "finit_module()" system call, which gives the kernel a file descriptor with the module data. You can also just feed the module data as raw data from user space with "init_module()" (note the lack of 'f' at the beginning), and obviously for that case we do _not_ have any "exclusive read" logic. So if you absolutely want to do things wrong in user space, and try to load the same module multiple times, and error out only later when the kernel ends up saying "you can't load the same module name twice", you can still do that. And in fact, some distros will do exactly that, because they will uncompress the kernel module data in user space before feeding it to the kernel (mainly because they haven't started using the new kernel side decompression yet). So this is not some absolute "you can't do concurrent loads of the same module". It's literally just a very simple heuristic that will catch it early in case you try to load the exact same module file at the same time, and in that case avoid a potentially nasty situation. - There is another user of "deny_write_access()": the verity code that enables fs-verity on a file (the FS_IOC_ENABLE_VERITY ioctl). If you use fs-verity and you care about verifying the kernel modules (which does make sense), you should do it *before* loading said kernel module. That may sound obvious, but now the implementation basically requires it. Because if you try to do it concurrently, the kernel may refuse to load the module file that is being set up by the fs-verity code. - This all will obviously mean that if you insist on loading the same module in parallel, only one module load will succeed, and the others will return with an error. That was true before too, but what is different is that the -ETXTBSY error can be returned *before* the success case of another process fully loading and instantiating the module. Again, that might sound obvious, and it is indeed the whole point of the whole change: we are much quicker to notice the whole "you're already in the process of loading this module". So it's very much intentional, but it does mean that if you just spray the kernel with "finit_module()", and expect that the module is immediately loaded afterwards without checking the return value, you are doing something horribly horribly wrong. I'd like to say that that would never happen, but the whole _reason_ for this commit is that udev is currently doing something horribly horribly wrong, so ... Link: https://lore.kernel.org/all/ZEGopJ8VAYnE7LQ2@bombadil.infradead.org/ [1] Link: https://lore.kernel.org/all/23bd0ce6-ef78-1cd8-1f21-0e706a00424a@suse.com/ [2] Link: https://lore.kernel.org/lkml/ZG%2Fa+nrt4%2FAAUi5z@bombadil.infradead.org/ [3] Cc: Greg Kroah-Hartman Cc: Lucas De Marchi Cc: Petr Pavlu Tested-by: Luis Chamberlain Signed-off-by: Linus Torvalds commit 9db898594c541444e19b2d20fb8a06262cf8fcd9 Merge: 50fb587e6a56d 48524463f807e Author: Linus Torvalds Date: Thu May 25 11:03:58 2023 -0700 Merge tag 'vfs/v6.4-rc3/misc.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: - During the acl rework we merged this cycle the generic_listxattr() helper had to be modified in a way that in principle it would allow for POSIX ACLs to be reported. At least that was the impression we had initially. Because before the acl rework POSIX ACLs would be reported if the filesystem did have POSIX ACL xattr handlers in sb->s_xattr. That logic changed and now we can simply check whether the superblock has SB_POSIXACL set and if the inode has inode->i_{default_}acl set report the appropriate POSIX ACL name. However, we didn't realize that generic_listxattr() was only ever used by two filesystems. Both of them don't support POSIX ACLs via sb->s_xattr handlers and so never reported POSIX ACLs via generic_listxattr() even if they raised SB_POSIXACL and did contain inodes which had acls set. The example here is nfs4. As a result, generic_listxattr() suddenly started reporting POSIX ACLs when it wouldn't have before. Since SB_POSIXACL implies that the umask isn't stripped in the VFS nfs4 can't just drop SB_POSIXACL from the superblock as it would also alter umask handling for them. So just have generic_listxattr() not report POSIX ACLs as it never did anyway. It's documented as such. - Our SB_* flags currently use a signed integer and we shift the last bit causing UBSAN to complain about undefined behavior. Switch to using unsigned. While the original patch used an explicit unsigned bitshift it's now pretty common to rely on the BIT() macro in a lot of headers nowadays. So the patch has been adjusted to use that. - Add Namjae as ntfs reviewer. They're already active this cycle so let's make it explicit right now. * tag 'vfs/v6.4-rc3/misc.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: ntfs: Add myself as a reviewer fs: don't call posix_acl_listxattr in generic_listxattr fs: fix undefined behavior in bit shift for SB_NOUSER commit 50fb587e6a56dba74c3c56a7a09c48bff25cc5fa Merge: eb03e31813541 ad42a35bdfc6d Author: Linus Torvalds Date: Thu May 25 10:55:26 2023 -0700 Merge tag 'net-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from bluetooth and bpf. Current release - regressions: - net: fix skb leak in __skb_tstamp_tx() - eth: mtk_eth_soc: fix QoS on DSA MAC on non MTK_NETSYS_V2 SoCs Current release - new code bugs: - handshake: - fix sock->file allocation - fix handshake_dup() ref counting - bluetooth: - fix potential double free caused by hci_conn_unlink - fix UAF in hci_conn_hash_flush Previous releases - regressions: - core: fix stack overflow when LRO is disabled for virtual interfaces - tls: fix strparser rx issues - bpf: - fix many sockmap/TCP related issues - fix a memory leak in the LRU and LRU_PERCPU hash maps - init the offload table earlier - eth: mlx5e: - do as little as possible in napi poll when budget is 0 - fix using eswitch mapping in nic mode - fix deadlock in tc route query code Previous releases - always broken: - udplite: fix NULL pointer dereference in __sk_mem_raise_allocated() - raw: fix output xfrm lookup wrt protocol - smc: reset connection when trying to use SMCRv2 fails - phy: mscc: enable VSC8501/2 RGMII RX clock - eth: octeontx2-pf: fix TSOv6 offload - eth: cdc_ncm: deal with too low values of dwNtbOutMaxSize" * tag 'net-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (79 commits) udplite: Fix NULL pointer dereference in __sk_mem_raise_allocated(). net: phy: mscc: enable VSC8501/2 RGMII RX clock net: phy: mscc: remove unnecessary phydev locking net: phy: mscc: add support for VSC8501 net: phy: mscc: add VSC8502 to MODULE_DEVICE_TABLE net/handshake: Enable the SNI extension to work properly net/handshake: Unpin sock->file if a handshake is cancelled net/handshake: handshake_genl_notify() shouldn't ignore @flags net/handshake: Fix uninitialized local variable net/handshake: Fix handshake_dup() ref counting net/handshake: Remove unneeded check from handshake_dup() ipv6: Fix out-of-bounds access in ipv6_find_tlv() net: ethernet: mtk_eth_soc: fix QoS on DSA MAC on non MTK_NETSYS_V2 SoCs docs: netdev: document the existence of the mail bot net: fix skb leak in __skb_tstamp_tx() r8169: Use a raw_spinlock_t for the register locks. page_pool: fix inconsistency for page_pool_ring_[un]lock() bpf, sockmap: Test progs verifier error with latest clang bpf, sockmap: Test FIONREAD returns correct bytes in rx buffer with drops bpf, sockmap: Test FIONREAD returns correct bytes in rx buffer ... commit edc0a2b5957652f4685ef3516f519f84807087db Author: Zhang Rui Date: Thu Mar 23 09:56:40 2023 +0800 x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms Traditionally, all CPUs in a system have identical numbers of SMT siblings. That changes with hybrid processors where some logical CPUs have a sibling and others have none. Today, the CPU boot code sets the global variable smp_num_siblings when every CPU thread is brought up. The last thread to boot will overwrite it with the number of siblings of *that* thread. That last thread to boot will "win". If the thread is a Pcore, smp_num_siblings == 2. If it is an Ecore, smp_num_siblings == 1. smp_num_siblings describes if the *system* supports SMT. It should specify the maximum number of SMT threads among all cores. Ensure that smp_num_siblings represents the system-wide maximum number of siblings by always increasing its value. Never allow it to decrease. On MeteorLake-P platform, this fixes a problem that the Ecore CPUs are not updated in any cpu sibling map because the system is treated as an UP system when probing Ecore CPUs. Below shows part of the CPU topology information before and after the fix, for both Pcore and Ecore CPU (cpu0 is Pcore, cpu 12 is Ecore). ... -/sys/devices/system/cpu/cpu0/topology/package_cpus:000fff -/sys/devices/system/cpu/cpu0/topology/package_cpus_list:0-11 +/sys/devices/system/cpu/cpu0/topology/package_cpus:3fffff +/sys/devices/system/cpu/cpu0/topology/package_cpus_list:0-21 ... -/sys/devices/system/cpu/cpu12/topology/package_cpus:001000 -/sys/devices/system/cpu/cpu12/topology/package_cpus_list:12 +/sys/devices/system/cpu/cpu12/topology/package_cpus:3fffff +/sys/devices/system/cpu/cpu12/topology/package_cpus_list:0-21 Notice that the "before" 'package_cpus_list' has only one CPU. This means that userspace tools like lscpu will see a little laptop like an 11-socket system: -Core(s) per socket: 1 -Socket(s): 11 +Core(s) per socket: 16 +Socket(s): 1 This is also expected to make the scheduler do rather wonky things too. [ dhansen: remove CPUID detail from changelog, add end user effects ] CC: stable@kernel.org Fixes: bbb65d2d365e ("x86: use cpuid vector 0xb when available for detecting cpu topology") Fixes: 95f3d39ccf7a ("x86/cpu/topology: Provide detect_extended_topology_early()") Suggested-by: Len Brown Signed-off-by: Zhang Rui Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20230323015640.27906-1-rui.zhang%40intel.com commit 3bf8c6307bad5c0cc09cde982e146d847859b651 Author: Wyes Karny Date: Thu May 18 05:58:19 2023 +0000 cpufreq: amd-pstate: Update policy->cur in amd_pstate_adjust_perf() Driver should update policy->cur after updating the frequency. Currently amd_pstate doesn't update policy->cur when `adjust_perf` is used. Which causes /proc/cpuinfo to show wrong cpu frequency. Fix this by updating policy->cur with correct frequency value in adjust_perf function callback. - Before the fix: (setting min freq to 1.5 MHz) [root@amd]# cat /proc/cpuinfo | grep "cpu MHz" | sort | uniq --count 1 cpu MHz : 1777.016 1 cpu MHz : 1797.160 1 cpu MHz : 1797.270 189 cpu MHz : 400.000 - After the fix: (setting min freq to 1.5 MHz) [root@amd]# cat /proc/cpuinfo | grep "cpu MHz" | sort | uniq --count 1 cpu MHz : 1753.353 1 cpu MHz : 1756.838 1 cpu MHz : 1776.466 1 cpu MHz : 1776.873 1 cpu MHz : 1777.308 1 cpu MHz : 1779.900 183 cpu MHz : 1805.231 1 cpu MHz : 1956.815 1 cpu MHz : 2246.203 1 cpu MHz : 2259.984 Fixes: 1d215f0319c2 ("cpufreq: amd-pstate: Add fast switch function for AMD P-State") Signed-off-by: Wyes Karny [ rjw: Subject edits ] Cc: 5.17+ # 5.17+ Signed-off-by: Rafael J. Wysocki commit b78c77273a5648eddc02f275f582b681a5127711 Author: Abhinav Kumar Date: Thu Apr 27 16:28:47 2023 -0700 drm/msm/dp: add module parameter for PSR On sc7280 where eDP is the primary display, PSR is causing IGT breakage even for basic test cases like kms_atomic and kms_atomic_transition. Most often the issue starts with below stack so providing that as reference Call trace: dpu_encoder_assign_crtc+0x64/0x6c dpu_crtc_enable+0x188/0x204 drm_atomic_helper_commit_modeset_enables+0xc0/0x274 msm_atomic_commit_tail+0x1a8/0x68c commit_tail+0xb0/0x160 drm_atomic_helper_commit+0x11c/0x124 drm_atomic_commit+0xb0/0xdc drm_atomic_connector_commit_dpms+0xf4/0x110 drm_mode_obj_set_property_ioctl+0x16c/0x3b0 drm_connector_property_set_ioctl+0x4c/0x74 drm_ioctl_kernel+0xec/0x15c drm_ioctl+0x264/0x408 __arm64_sys_ioctl+0x9c/0xd4 invoke_syscall+0x4c/0x110 el0_svc_common+0x94/0xfc do_el0_svc+0x3c/0xb0 el0_svc+0x2c/0x7c el0t_64_sync_handler+0x48/0x114 el0t_64_sync+0x190/0x194 ---[ end trace 0000000000000000 ]--- [drm-dp] dp_ctrl_push_idle: PUSH_IDLE pattern timedout Other basic use-cases still seem to work fine hence add a a module parameter to allow toggling psr enable/disable till PSR related issues are hashed out with IGT. Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Acked-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/534420/ Link: https://lore.kernel.org/r/20230427232848.5200-1-quic_abhinavk@quicinc.com Signed-off-by: Rob Clark commit 173d42721b4661327bf4dd8301714417695506c2 Author: Rob Clark Date: Mon May 1 13:44:41 2023 -0700 drm/msm: Set max segment size earlier Fixes the following splat on a6xx gen2+ (a640, a650, a660 families), a6xx gen1 has smaller GMU allocations so they fit under the default 64K max segment size. ------------[ cut here ]------------ DMA-API: msm_dpu ae01000.display-controller: mapping sg segment longer than device claims to support [len=126976] [max=65536] WARNING: CPU: 5 PID: 9 at kernel/dma/debug.c:1160 debug_dma_map_sg+0x288/0x314 Modules linked in: CPU: 5 PID: 9 Comm: kworker/u16:0 Not tainted 6.3.0-rc2-debug+ #629 Hardware name: Google Villager (rev1+) with LTE (DT) Workqueue: events_unbound deferred_probe_work_func pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : debug_dma_map_sg+0x288/0x314 lr : debug_dma_map_sg+0x288/0x314 sp : ffffffc00809b560 x29: ffffffc00809b560 x28: 0000000000000060 x27: 0000000000000000 x26: 0000000000010000 x25: 0000000000000004 x24: 0000000000000004 x23: ffffffffffffffff x22: ffffffdb31693cc0 x21: ffffff8080935800 x20: ffffff8087417400 x19: ffffff8087a45010 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000010000 x14: 0000000000000001 x13: ffffffffffffffff x12: ffffffffffffffff x11: 0000000000000000 x10: 000000000000000a x9 : ffffffdb2ff05e14 x8 : ffffffdb31275000 x7 : ffffffdb2ff08908 x6 : 0000000000000000 x5 : 0000000000000001 x4 : ffffffdb2ff08a74 x3 : ffffffdb31275008 x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffffff80803a9a80 Call trace: debug_dma_map_sg+0x288/0x314 __dma_map_sg_attrs+0x80/0xe4 dma_map_sgtable+0x30/0x4c get_pages+0x1d4/0x1e4 msm_gem_pin_pages_locked+0xbc/0xf8 msm_gem_pin_vma_locked+0x58/0xa0 msm_gem_get_and_pin_iova_range+0x98/0xac a6xx_gmu_memory_alloc+0x7c/0x128 a6xx_gmu_init+0x16c/0x9b0 a6xx_gpu_init+0x38c/0x3e4 adreno_bind+0x214/0x264 component_bind_all+0x128/0x1f8 msm_drm_bind+0x2b8/0x608 try_to_bring_up_aggregate_device+0x88/0x1a4 __component_add+0xec/0x13c component_add+0x1c/0x28 dp_display_probe+0x3f8/0x43c platform_probe+0x70/0xc4 really_probe+0x148/0x280 __driver_probe_device+0xc8/0xe0 driver_probe_device+0x44/0x100 __device_attach_driver+0x64/0xdc bus_for_each_drv+0xb0/0xd8 __device_attach+0xd8/0x168 device_initial_probe+0x1c/0x28 bus_probe_device+0x44/0xb0 deferred_probe_work_func+0xc8/0xe0 process_one_work+0x2e0/0x488 process_scheduled_works+0x4c/0x50 worker_thread+0x218/0x274 kthread+0xf0/0x100 ret_from_fork+0x10/0x20 irq event stamp: 293712 hardirqs last enabled at (293711): [] vprintk_emit+0x160/0x25c hardirqs last disabled at (293712): [] el1_dbg+0x24/0x80 softirqs last enabled at (279520): [] __do_softirq+0x21c/0x4bc softirqs last disabled at (279515): [] ____do_softirq+0x18/0x24 ---[ end trace 0000000000000000 ]--- Signed-off-by: Rob Clark Fixes: db735fc4036b ("drm/msm: Set dma maximum segment size for mdss") Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/534892/ Link: https://lore.kernel.org/r/20230501204441.1642741-1-robdclark@gmail.com commit eb03e318135419b8b781f83cdfa7dbb9252afad6 Merge: 029c77f89a15e 95339f40a8b65 Author: Linus Torvalds Date: Thu May 25 10:26:36 2023 -0700 Merge tag 'for-v6.4-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply fixes from Sebastian Reichel: - Fix power_supply_get_battery_info for devices without parent devices resulting in NULL pointer dereference - Fix desktop systems reporting to run on battery once a power-supply device with device scope appears (e.g. a HID keyboard with a battery) - Ratelimit debug print about driver not providing data - Fix race condition related to external_power_changed in multiple drivers (ab8500, axp288, bq25890, sc27xx, bq27xxx) - Fix LED trigger switching from blinking to solid-on when charging finishes - Fix multiple races in bq27xxx battery driver - mt6360: handle potential ENOMEM from devm_work_autocancel - sbs-charger: Fix SBS_CHARGER_STATUS_CHARGE_INHIBITED bit - rt9467: avoid passing 0 to dev_err_probe * tag 'for-v6.4-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (21 commits) power: supply: Fix logic checking if system is running from battery power: supply: mt6360: add a check of devm_work_autocancel in mt6360_charger_probe power: supply: sbs-charger: Fix INHIBITED bit for Status reg power: supply: rt9467: Fix passing zero to 'dev_err_probe' power: supply: Ratelimit no data debug output power: supply: Fix power_supply_get_battery_info() if parent is NULL power: supply: bq24190: Call power_supply_changed() after updating input current power: supply: bq25890: Call power_supply_changed() after updating input current or voltage power: supply: bq27xxx: Use mod_delayed_work() instead of cancel() + schedule() power: supply: bq27xxx: After charger plug in/out wait 0.5s for things to stabilize power: supply: bq27xxx: Ensure power_supply_changed() is called on current sign changes power: supply: bq27xxx: Move bq27xxx_battery_update() down power: supply: bq27xxx: Add cache parameter to bq27xxx_battery_current_and_status() power: supply: bq27xxx: Fix poll_interval handling and races on remove power: supply: bq27xxx: Fix I2C IRQ race on remove power: supply: bq27xxx: Fix bq27xxx_battery_update() race condition power: supply: leds: Fix blink to LED on transition power: supply: sc27xx: Fix external_power_changed race power: supply: bq25890: Fix external_power_changed race power: supply: axp288_fuel_gauge: Fix external_power_changed race ... commit 029c77f89a15e0e2f209ac5be9ec1d9672b8b09a Merge: ecea3ba2fba21 4ca110cab4656 Author: Linus Torvalds Date: Thu May 25 09:48:23 2023 -0700 Merge tag 'sound-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes: - HD-audio runtime PM bug fix - A couple of HD-audio quirks - Fix series of ASoC Intel AVS drivers - ASoC DPCM fix for a bug found on new Intel systems - A few other ASoC device-specific small fixes" * tag 'sound-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Enable headset onLenovo M70/M90 ASoC: dwc: move DMA init to snd_soc_dai_driver probe() ASoC: cs35l41: Fix default regmap values for some registers ALSA: hda: Fix unhandled register update during auto-suspend period ASoC: dt-bindings: tlv320aic32x4: Fix supply names ASoC: Intel: avs: Add missing checks on FE startup ASoC: Intel: avs: Fix avs_path_module::instance_id size ASoC: Intel: avs: Account for UID of ACPI device ASoC: Intel: avs: Fix declaration of enum avs_channel_config ASoC: Intel: Skylake: Fix declaration of enum skl_ch_cfg ASoC: Intel: avs: Access path components under lock ASoC: Intel: avs: Fix module lookup ALSA: hda/ca0132: add quirk for EVGA X299 DARK ASoC: soc-pcm: test if a BE can be prepared ASoC: rt5682: Disable jack detection interrupt during suspend ASoC: lpass: Fix for KASAN use_after_free out of bounds commit ecea3ba2fba2124c8bdc87b27b3829a6015ff854 Merge: 5566051fa6735 3279decb2c3c8 Author: Linus Torvalds Date: Thu May 25 09:42:15 2023 -0700 Merge tag 'platform-drivers-x86-v6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: "Nothing special to report just a few small fixes" * tag 'platform-drivers-x86-v6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86/intel/ifs: Annotate work queue on stack so object debug does not complain platform/x86: ISST: Remove 8 socket limit platform/mellanox: mlxbf-pmc: fix sscanf() error checking platform/x86/amd/pmf: Fix CnQF and auto-mode after resume platform/x86: asus-wmi: Ignore WMI events with codes 0x7B, 0xC0 commit 5566051fa67352af069e0eb4b047f2b832b9a1cc Merge: 933174ae28ba7 b845b574f86dc Author: Linus Torvalds Date: Thu May 25 09:33:03 2023 -0700 Merge tag 'm68k-for-v6.4-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k fix from Geert Uytterhoeven: - Fix signal frame issue causing user-space crashes on 68020/68030 * tag 'm68k-for-v6.4-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Move signal frame following exception on 68020/030 commit 533ab73f5b5c95dcb4152b52d5482abcc824c690 Author: Wenwen Chen Date: Thu May 25 16:26:26 2023 +0800 io_uring: unlock sqd->lock before sq thread release CPU The sq thread actively releases CPU resources by calling the cond_resched() and schedule() interfaces when it is idle. Therefore, more resources are available for other threads to run. There exists a problem in sq thread: it does not unlock sqd->lock before releasing CPU resources every time. This makes other threads pending on sqd->lock for a long time. For example, the following interfaces all require sqd->lock: io_sq_offload_create(), io_register_iowq_max_workers() and io_ring_exit_work(). Before the sq thread releases CPU resources, unlocking sqd->lock will provide the user a better experience because it can respond quickly to user requests. Signed-off-by: Kanchan Joshi Signed-off-by: Wenwen Chen Link: https://lore.kernel.org/r/20230525082626.577862-1-wenwen.chen@samsung.com Signed-off-by: Jens Axboe commit 51bba254edc79fbb1b04e207e036c0c68576f1a4 Author: Conor Dooley Date: Mon May 22 10:37:01 2023 +0100 MAINTAINERS: update arm64 Microchip entries Krzysztof noticed that patches for arch/arm64/boot/dts/microchip were getting lost & the listed tree was inactive. Nicolas and I are willing to shepherd patches to Arnd, using the existing at91 tree, so add a new entry covering arch/arm64/boot/dts/microchip, listing us as maintainers. Drop the tree from the existing sparx5 entry & narrow the devicetree pattern to just sparx devices, leaving Lars, Steen and Daniel looking after support for their SoCs. CC: Rob Herring CC: Krzysztof Kozlowski CC: Conor Dooley CC: Nicolas Ferre CC: Claudiu Beznea CC: soc@kernel.org CC: Lars Povlsen CC: Steen Hegelund CC: Daniel Machon Signed-off-by: Conor Dooley Acked-by: Nicolas Ferre Acked-by: Steen Hegelund Acked-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230522-wagon-stencil-a164ec39322a@wendy Signed-off-by: Arnd Bergmann commit 66bbb329788c5e3dd79b73292536edf8b55558d9 Merge: 0bfa36f9bc665 0f554e37dad41 Author: Arnd Bergmann Date: Thu May 25 17:22:37 2023 +0200 Merge tag 'imx-fixes-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 6.4: - A couple of i.MX8MN/P video clock changes from Adam Ford to fix issue with clock re-parenting. - Add missing pvcie-supply regulator for imx6qdl-mba6 board. - A series of colibri-imx8x board fixes on pin configuration. - Set and limit the mode for PMIC bucks for imx6ull-dhcor board to fix stability problems. - A couple of changes from Frank Li to correct cdns,usb3 bindings cdns,on-chip-buff-size property and fix USB 3.0 gadget failure on i.MX8QM & QXPB0. - Add a required PHY deassert delay for imx8mn-var-som board to fix PHY detection failure. * tag 'imx-fixes-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: imx8: fix USB 3.0 Gadget Failure in QM & QXPB0 at super speed dt-binding: cdns,usb3: Fix cdns,on-chip-buff-size type arm64: dts: colibri-imx8x: delete adc1 and dsp arm64: dts: colibri-imx8x: fix iris pinctrl configuration arm64: dts: colibri-imx8x: move pinctrl property from SoM to eval board arm64: dts: colibri-imx8x: fix eval board pin configuration arm64: dts: imx8mp: Fix video clock parents ARM: dts: imx6qdl-mba6: Add missing pvcie-supply regulator ARM: dts: imx6ull-dhcor: Set and limit the mode for PMIC buck 1, 2 and 3 arm64: dts: imx8mn-var-som: fix PHY detection bug by adding deassert delay arm64: dts: imx8mn: Fix video clock parents Link: https://lore.kernel.org/r/20230516133625.GI767028@dragon Signed-off-by: Arnd Bergmann commit 0bfa36f9bc6651806f57d7fb8513d9b2448a1ad1 Merge: d14b555c3354c 44e8d5ad2dc01 Author: Arnd Bergmann Date: Thu May 25 17:21:36 2023 +0200 Merge tag 'scmi-fix-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes Arm SCMI fix for v6.4 Single fix for incorrect invocation of alloc_workqueue() where WQ_SYSFS flag is passed as @max_active parameter instead of OR'ing with the other flags in the @flags parameter. * tag 'scmi-fix-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Fix incorrect alloc_workqueue() invocation Link: https://lore.kernel.org/r/20230509143529.1188812-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit d14b555c3354c4b2b305cc005a1f1626f6c02b07 Merge: 9bafc2bb469ce 55b37d9c8ba23 Author: Arnd Bergmann Date: Thu May 25 17:19:06 2023 +0200 Merge tag 'juno-fixes-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes Arm FVP/Vexpress fixes for v6.4 Couple of fixes to address the missing required 'cache-unified' property in the level 2 and 3 caches on some of the FVP/vexpress platforms. * tag 'juno-fixes-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: arm: add missing cache properties ARM: dts: vexpress: add missing cache properties Link: https://lore.kernel.org/r/20230509143508.1188786-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 9bafc2bb469ce62de611adf4eb37ca68786453e7 Merge: 44c026a73be80 654d031000714 Author: Arnd Bergmann Date: Thu May 25 17:16:45 2023 +0200 Merge tag 'optee-async-notif-fix-for-v6.3' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes Fixes an uninitialized variable in OP-TEE driver * tag 'optee-async-notif-fix-for-v6.3' of https://git.linaro.org/people/jens.wiklander/linux-tee: optee: fix uninited async notif value Link: https://lore.kernel.org/r/20230421075443.GA3136581@rayden Signed-off-by: Arnd Bergmann commit ad42a35bdfc6d3c0fc4cb4027d7b2757ce665665 Author: Kuniyuki Iwashima Date: Tue May 23 09:33:05 2023 -0700 udplite: Fix NULL pointer dereference in __sk_mem_raise_allocated(). syzbot reported [0] a null-ptr-deref in sk_get_rmem0() while using IPPROTO_UDPLITE (0x88): 14:25:52 executing program 1: r0 = socket$inet6(0xa, 0x80002, 0x88) We had a similar report [1] for probably sk_memory_allocated_add() in __sk_mem_raise_allocated(), and commit c915fe13cbaa ("udplite: fix NULL pointer dereference") fixed it by setting .memory_allocated for udplite_prot and udplitev6_prot. To fix the variant, we need to set either .sysctl_wmem_offset or .sysctl_rmem. Now UDP and UDPLITE share the same value for .memory_allocated, so we use the same .sysctl_wmem_offset for UDP and UDPLITE. [0]: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 0 PID: 6829 Comm: syz-executor.1 Not tainted 6.4.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 RIP: 0010:sk_get_rmem0 include/net/sock.h:2907 [inline] RIP: 0010:__sk_mem_raise_allocated+0x806/0x17a0 net/core/sock.c:3006 Code: c1 ea 03 80 3c 02 00 0f 85 23 0f 00 00 48 8b 44 24 08 48 8b 98 38 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 <0f> b6 14 02 48 89 d8 83 e0 07 83 c0 03 38 d0 0f 8d 6f 0a 00 00 8b RSP: 0018:ffffc90005d7f450 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffc90004d92000 RDX: 0000000000000000 RSI: ffffffff88066482 RDI: ffffffff8e2ccbb8 RBP: ffff8880173f7000 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000030000 R13: 0000000000000001 R14: 0000000000000340 R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff8880b9800000(0063) knlGS:00000000f7f1cb40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 000000002e82f000 CR3: 0000000034ff0000 CR4: 00000000003506f0 Call Trace: __sk_mem_schedule+0x6c/0xe0 net/core/sock.c:3077 udp_rmem_schedule net/ipv4/udp.c:1539 [inline] __udp_enqueue_schedule_skb+0x776/0xb30 net/ipv4/udp.c:1581 __udpv6_queue_rcv_skb net/ipv6/udp.c:666 [inline] udpv6_queue_rcv_one_skb+0xc39/0x16c0 net/ipv6/udp.c:775 udpv6_queue_rcv_skb+0x194/0xa10 net/ipv6/udp.c:793 __udp6_lib_mcast_deliver net/ipv6/udp.c:906 [inline] __udp6_lib_rcv+0x1bda/0x2bd0 net/ipv6/udp.c:1013 ip6_protocol_deliver_rcu+0x2e7/0x1250 net/ipv6/ip6_input.c:437 ip6_input_finish+0x150/0x2f0 net/ipv6/ip6_input.c:482 NF_HOOK include/linux/netfilter.h:303 [inline] NF_HOOK include/linux/netfilter.h:297 [inline] ip6_input+0xa0/0xd0 net/ipv6/ip6_input.c:491 ip6_mc_input+0x40b/0xf50 net/ipv6/ip6_input.c:585 dst_input include/net/dst.h:468 [inline] ip6_rcv_finish net/ipv6/ip6_input.c:79 [inline] NF_HOOK include/linux/netfilter.h:303 [inline] NF_HOOK include/linux/netfilter.h:297 [inline] ipv6_rcv+0x250/0x380 net/ipv6/ip6_input.c:309 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5491 __netif_receive_skb+0x1f/0x1c0 net/core/dev.c:5605 netif_receive_skb_internal net/core/dev.c:5691 [inline] netif_receive_skb+0x133/0x7a0 net/core/dev.c:5750 tun_rx_batched+0x4b3/0x7a0 drivers/net/tun.c:1553 tun_get_user+0x2452/0x39c0 drivers/net/tun.c:1989 tun_chr_write_iter+0xdf/0x200 drivers/net/tun.c:2035 call_write_iter include/linux/fs.h:1868 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x945/0xd50 fs/read_write.c:584 ksys_write+0x12b/0x250 fs/read_write.c:637 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 RIP: 0023:0xf7f21579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f7f1c590 EFLAGS: 00000282 ORIG_RAX: 0000000000000004 RAX: ffffffffffffffda RBX: 00000000000000c8 RCX: 0000000020000040 RDX: 0000000000000083 RSI: 00000000f734e000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: Link: https://lore.kernel.org/netdev/CANaxB-yCk8hhP68L4Q2nFOJht8sqgXGGQO2AftpHs0u1xyGG5A@mail.gmail.com/ [1] Fixes: 850cbaddb52d ("udp: use it's own memory accounting schema") Reported-by: syzbot+444ca0907e96f7c5e48b@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=444ca0907e96f7c5e48b Signed-off-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20230523163305.66466-1-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit fd936fd8ac105ba3eb764185e8ba483c789c893e Author: Arnd Bergmann Date: Tue May 23 21:01:30 2023 +0200 efi: fix missing prototype warnings The cper.c file needs to include an extra header, and efi_zboot_entry needs an extern declaration to avoid these 'make W=1' warnings: drivers/firmware/efi/libstub/zboot.c:65:1: error: no previous prototype for 'efi_zboot_entry' [-Werror=missing-prototypes] drivers/firmware/efi/efi.c:176:16: error: no previous prototype for 'efi_attr_is_visible' [-Werror=missing-prototypes] drivers/firmware/efi/cper.c:626:6: error: no previous prototype for 'cper_estatus_print' [-Werror=missing-prototypes] drivers/firmware/efi/cper.c:649:5: error: no previous prototype for 'cper_estatus_check_header' [-Werror=missing-prototypes] drivers/firmware/efi/cper.c:662:5: error: no previous prototype for 'cper_estatus_check' [-Werror=missing-prototypes] To make this easier, move the cper specific declarations to include/linux/cper.h. Signed-off-by: Arnd Bergmann Acked-by: Rafael J. Wysocki Signed-off-by: Ard Biesheuvel commit 095aabe338d166f3a9c87bcc9b9b84ba80fdaddf Author: Ard Biesheuvel Date: Mon May 22 08:24:49 2023 +0200 efi/libstub: zboot: Avoid eager evaluation of objcopy flags The Make variable containing the objcopy flags may be constructed from the output of build tools operating on build artifacts, and these may not exist when doing a make clean. So avoid evaluating them eagerly, to prevent spurious build warnings. Suggested-by: Pedro Falcato Tested-by: Alan Bartlett Signed-off-by: Ard Biesheuvel commit aa015a204b6094f909ee9863cd41e50b426dea7d Merge: 1de5900c816a9 71460c9ec5c74 Author: Jakub Kicinski Date: Wed May 24 22:14:29 2023 -0700 Merge branch 'net-phy-mscc-support-vsc8501' David Epping says: ==================== net: phy: mscc: support VSC8501 this updated series of patches adds support for the VSC8501 Ethernet PHY and fixes support for the VSC8502 PHY in cases where no other software (like U-Boot) has initialized the PHY after power up. The first patch simply adds the VSC8502 to the MODULE_DEVICE_TABLE, where I guess it was unintentionally missing. I have no hardware to test my change. The second patch adds the VSC8501 PHY with exactly the same driver implementation as the existing VSC8502. The (new) third patch removes phydev locking from vsc85xx_rgmii_set_skews(), as discussed for v2 of the patch set. The (now) fourth patch fixes the initialization for VSC8501 and VSC8502. I have tested this patch with VSC8501 on hardware in RGMII mode only. https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/DataSheets/VSC8501-03_Datasheet_60001741A.PDF https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/DataSheets/VSC8502-03_Datasheet_60001742B.pdf Table 4-42 "RGMII CONTROL, ADDRESS 20E2 (0X14)" Bit 11 for each of them. By default the RX_CLK is disabled for these PHYs. In cases where no other software, like U-Boot, enabled the clock, this results in no received packets being handed to the MAC. The patch enables this clock output. According to Microchip support (case number 01268776) this applies to all modes (RGMII, GMII, and MII). Other PHYs sharing the same register map and code, like VSC8530/31/40/41 have the clock enabled and the relevant bit 11 is reserved and read-only for them. As per previous discussion the patch still clears the bit on these PHYs, too, possibly more easily supporting other future PHYs implementing this functionality. For the VSC8572 family of PHYs, having a different register map, no such changes are applied. ==================== Link: https://lore.kernel.org/r/20230523153108.18548-1-david.epping@missinglinkelectronics.com Signed-off-by: Jakub Kicinski commit 71460c9ec5c743e9ffffca3c874d66267c36345e Author: David Epping Date: Tue May 23 17:31:08 2023 +0200 net: phy: mscc: enable VSC8501/2 RGMII RX clock By default the VSC8501 and VSC8502 RGMII/GMII/MII RX_CLK output is disabled. To allow packet forwarding towards the MAC it needs to be enabled. For other PHYs supported by this driver the clock output is enabled by default. Fixes: d3169863310d ("net: phy: mscc: add support for VSC8502") Signed-off-by: David Epping Reviewed-by: Russell King (Oracle) Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 7df0b33d7993338a06e4039ec025bb67851ee41d Author: David Epping Date: Tue May 23 17:31:07 2023 +0200 net: phy: mscc: remove unnecessary phydev locking Holding the struct phy_device (phydev) lock is unnecessary when accessing phydev->interface in the PHY driver .config_init method, which is the only place that vsc85xx_rgmii_set_skews() is called from. The phy_modify_paged() function implements required MDIO bus level locking, which can not be achieved by a phydev lock. Signed-off-by: David Epping Reviewed-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski commit fb055ce4a9e3a115f5dc42011a97cf0cfc7820e4 Author: David Epping Date: Tue May 23 17:31:06 2023 +0200 net: phy: mscc: add support for VSC8501 The VSC8501 PHY can use the same driver implementation as the VSC8502. Adding the PHY ID and copying the handler functions of VSC8502 is sufficient to operate it. Signed-off-by: David Epping Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 57fb54ab9f6945e204740b696bd4cee61ee04e5e Author: David Epping Date: Tue May 23 17:31:05 2023 +0200 net: phy: mscc: add VSC8502 to MODULE_DEVICE_TABLE The mscc driver implements support for VSC8502, so its ID should be in the MODULE_DEVICE_TABLE for automatic loading. Signed-off-by: David Epping Fixes: d3169863310d ("net: phy: mscc: add support for VSC8502") Reviewed-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 1de5900c816a9535cf2e18a6bb19832facff8275 Merge: 0c615f1cc3b33 26fb5480a27d3 Author: Jakub Kicinski Date: Wed May 24 22:05:25 2023 -0700 Merge branch 'bug-fixes-for-net-handshake' Chuck Lever says: ==================== Bug fixes for net/handshake Paolo observed that there is a possible leak of sock->file. I haven't looked into that yet, but it seems to be separate from the fixes in this series, so no need to hold these up. ==================== The submissions mentions net-next but it means netdev (perhaps merge window left over when trees are converged). In any case, it should have gone into net, but was instead applied to net-next as commit deb2e484baf9 ("Merge branch 'net-handshake-fixes'"). These are fixes tho, and Chuck needs them to make progress with the client so double-merging them into net... it is what it is :( Link: https://lore.kernel.org/r/168381978252.84244.1933636428135211300.stgit@91.116.238.104.host.secureserver.net Signed-off-by: Jakub Kicinski commit 26fb5480a27d34975cc2b680b77af189620dd740 Author: Chuck Lever Date: Thu May 11 11:49:50 2023 -0400 net/handshake: Enable the SNI extension to work properly Enable the upper layer protocol to specify the SNI peername. This avoids the need for tlshd to use a DNS lookup, which can return a hostname that doesn't match the incoming certificate's SubjectName. Fixes: 2fd5532044a8 ("net/handshake: Add a kernel API for requesting a TLSv1.3 handshake") Reviewed-by: Simon Horman Signed-off-by: Chuck Lever Signed-off-by: Jakub Kicinski commit 1ce77c998f0415d7d9d91cb9bd7665e25c8f75f1 Author: Chuck Lever Date: Thu May 11 11:49:17 2023 -0400 net/handshake: Unpin sock->file if a handshake is cancelled If user space never calls DONE, sock->file's reference count remains elevated. Enable sock->file to be freed eventually in this case. Reported-by: Jakub Kacinski Fixes: 3b3009ea8abb ("net/handshake: Create a NETLINK service for handling handshake requests") Signed-off-by: Chuck Lever Signed-off-by: Jakub Kicinski commit fc490880e39d86c65ab2bcbd357af1950fa55e48 Author: Chuck Lever Date: Thu May 11 11:48:45 2023 -0400 net/handshake: handshake_genl_notify() shouldn't ignore @flags Reported-by: Dan Carpenter Fixes: 3b3009ea8abb ("net/handshake: Create a NETLINK service for handling handshake requests") Reviewed-by: Simon Horman Signed-off-by: Chuck Lever Signed-off-by: Jakub Kicinski commit 7afc6d0a107ffbd448c96eb2458b9e64a5af7860 Author: Chuck Lever Date: Thu May 11 11:48:13 2023 -0400 net/handshake: Fix uninitialized local variable trace_handshake_cmd_done_err() simply records the pointer in @req, so initializing it to NULL is sufficient and safe. Reported-by: Dan Carpenter Fixes: 3b3009ea8abb ("net/handshake: Create a NETLINK service for handling handshake requests") Reviewed-by: Simon Horman Signed-off-by: Chuck Lever Signed-off-by: Jakub Kicinski commit 7ea9c1ec66bc099b0bfba961a8a46dfe25d7d8e4 Author: Chuck Lever Date: Thu May 11 11:47:40 2023 -0400 net/handshake: Fix handshake_dup() ref counting If get_unused_fd_flags() fails, we ended up calling fput(sock->file) twice. Reported-by: Dan Carpenter Suggested-by: Paolo Abeni Fixes: 3b3009ea8abb ("net/handshake: Create a NETLINK service for handling handshake requests") Signed-off-by: Chuck Lever Signed-off-by: Jakub Kicinski commit a095326e2c0f33743ce8e887d5b90edf3f36cced Author: Chuck Lever Date: Thu May 11 11:47:09 2023 -0400 net/handshake: Remove unneeded check from handshake_dup() handshake_req_submit() now verifies that the socket has a file. Fixes: 3b3009ea8abb ("net/handshake: Create a NETLINK service for handling handshake requests") Reviewed-by: Simon Horman Signed-off-by: Chuck Lever Signed-off-by: Jakub Kicinski commit 0c615f1cc3b333775b9c0b56e369f8dbca1e0226 Merge: 878ecb0897f47 f726e03564ef4 Author: Jakub Kicinski Date: Wed May 24 21:57:57 2023 -0700 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2023-05-24 We've added 19 non-merge commits during the last 10 day(s) which contain a total of 20 files changed, 738 insertions(+), 448 deletions(-). The main changes are: 1) Batch of BPF sockmap fixes found when running against NGINX TCP tests, from John Fastabend. 2) Fix a memleak in the LRU{,_PERCPU} hash map when bucket locking fails, from Anton Protopopov. 3) Init the BPF offload table earlier than just late_initcall, from Jakub Kicinski. 4) Fix ctx access mask generation for 32-bit narrow loads of 64-bit fields, from Will Deacon. 5) Remove a now unsupported __fallthrough in BPF samples, from Andrii Nakryiko. 6) Fix a typo in pkg-config call for building sign-file, from Jeremy Sowden. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf, sockmap: Test progs verifier error with latest clang bpf, sockmap: Test FIONREAD returns correct bytes in rx buffer with drops bpf, sockmap: Test FIONREAD returns correct bytes in rx buffer bpf, sockmap: Test shutdown() correctly exits epoll and recv()=0 bpf, sockmap: Build helper to create connected socket pair bpf, sockmap: Pull socket helpers out of listen test for general use bpf, sockmap: Incorrectly handling copied_seq bpf, sockmap: Wake up polling after data copy bpf, sockmap: TCP data stall on recv before accept bpf, sockmap: Handle fin correctly bpf, sockmap: Improved check for empty queue bpf, sockmap: Reschedule is now done through backlog bpf, sockmap: Convert schedule_work into delayed_work bpf, sockmap: Pass skb ownership through read_skb bpf: fix a memory leak in the LRU and LRU_PERCPU hash maps bpf: Fix mask generation for 32-bit narrow loads of 64-bit fields samples/bpf: Drop unnecessary fallthrough bpf: netdev: init the offload table earlier selftests/bpf: Fix pkg-config call building sign-file ==================== Link: https://lore.kernel.org/r/20230524170839.13905-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 661a4f089317c877aecd598fb70cd46510cc8d29 Author: Konrad Dybcio Date: Wed May 17 04:18:50 2023 +0200 arm64: dts: qcom: sm8550: Use the correct LLCC register scheme During the ABI-breaking (for good reasons) conversion of the LLCC register description, SM8550 was not taken into account, resulting in LLCC being broken on any kernel containing the patch referenced in the fixes tag. Fix it by describing the regions properly. Fixes: ee13b5008707 ("qcom: llcc/edac: Fix the base address used for accessing LLCC banks") Signed-off-by: Konrad Dybcio Acked-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230517-topic-kailua-llcc-v1-2-d57bd860c43e@linaro.org commit b317cebff59d9994ba041240654acb3c06b2f1f0 Author: Konrad Dybcio Date: Wed May 17 04:18:49 2023 +0200 dt-bindings: cache: qcom,llcc: Fix SM8550 description SM8550 (LLCCv4.1) has 4 register regions, this was not described between its addition and the restructurization that happened in the commit referenced in the fixes tag. Fix it. Fixes: 43aa006e074c ("dt-bindings: arm: msm: Fix register regions used for LLCC banks") Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Acked-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230517-topic-kailua-llcc-v1-1-d57bd860c43e@linaro.org commit 3a735530c159b75e1402c08abe1ba4eb99a1f7a3 Author: Douglas Anderson Date: Mon May 15 17:19:29 2023 -0700 arm64: dts: qcom: sc7180-lite: Fix SDRAM freq for misidentified sc7180-lite boards In general, the three SKUs of sc7180 (lite, normal, and pro) are handled dynamically. The cpufreq table in sc7180.dtsi includes the superset of all CPU frequencies. The "qcom-cpufreq-hw" driver in Linux shows that we can dynamically detect which frequencies are actually available on the currently running CPU and then we can just enable those ones. The GPU is similarly dynamic. The nvmem has a fuse in it (see "gpu_speed_bin" in sc7180.dtsi) that the GPU driver can use to figure out which frequencies to enable. There is one part, however, that is not so dynamic. The way SDRAM frequency works in sc7180 is that it's tied to cpufreq. At the busiest cpufreq operating points we'll pick the top supported SDRAM frequency. They ramp down together. For the "pro" SKU of sc7180, we only enable one extra cpufreq step. That extra cpufreq step runs SDRAM at the same speed as the step below. Thus, for normal and pro things are OK. There is no sc7180-pro device tree snippet. For the "lite" SKU if sc7180, however, things aren't so easy. The "lite" SKU drops 3 cpufreq entries but can still run SDRAM at max frequency. That messed things up with the whole scheme. This is why we added the "sc7180-lite" fragment in commit 8fd01e01fd6f ("arm64: dts: qcom: sc7180-lite: Tweak DDR/L3 scaling on SC7180-lite"). When the lite scheme came about, it was agreed that the WiFi SKUs of lazor would _always_ be "lite" and would, in fact, be the only "lite" devices. Unfortunately, this decision changed and folks didn't realize that it would be a problem. Specifically, some later lazor WiFi-only devices were built with "pro" CPUs. Building WiFi-only lazor with "pro" CPUs isn't the end of the world. The SDRAM will ramp up a little sooner than it otherwise would, but aside from a small power hit things work OK. One problem, though, is that the SDRAM scaling becomes a bit quirky. Specifically, with the current tables we'll max out SDRAM frequency at 2.1GHz but then _lower_ it at 2.2GHz / 2.3GHz only to raise it back to max for 2.4GHz and 2.55GHz. Let's at least fix this so that the SDRAM frequency doesn't go down in that quirky way. On true "lite" SKUs this change will be a no-op because the operating points we're touching are disabled. This change is only useful when a board that thinks it has a "lite" CPU actually has a "normal" or "pro" one stuffed. Fixes: 8fd01e01fd6f ("arm64: dts: qcom: sc7180-lite: Tweak DDR/L3 scaling on SC7180-lite") Signed-off-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230515171929.1.Ic8dee2cb79ce39ffc04eab2a344dde47b2f9459f@changeid commit bb72b94c659f5032850e9ab070d850bc743e3a0e Author: Bagas Sanjaya Date: Wed May 10 10:54:15 2023 +0700 Documentation: net/mlx5: Wrap notes in admonition blocks Wrap note paragraphs in note:: directive as it better fit for the purpose of noting devlink commands. Fixes: f2d51e579359b7 ("net/mlx5: Separate mlx5 driver documentation into multiple pages") Fixes: cf14af140a5ad0 ("net/mlx5e: Add vnic devlink health reporter to representors") Reviewed-by: Leon Romanovsky Signed-off-by: Bagas Sanjaya Signed-off-by: Saeed Mahameed commit 92059da65d84227fcc7cabbd96c0cca19880f4ff Author: Bagas Sanjaya Date: Wed May 10 10:54:14 2023 +0700 Documentation: net/mlx5: Add blank line separator before numbered lists The doc forgets to add separator before numbered lists, which causes the lists to be appended to previous paragraph inline instead. Add the missing separator. Fixes: f2d51e579359b7 ("net/mlx5: Separate mlx5 driver documentation into multiple pages") Reviewed-by: Leon Romanovsky Signed-off-by: Bagas Sanjaya Reviewed-by: Simon Horman Signed-off-by: Saeed Mahameed commit 565b8c60e90f7f2d4763f5979c7aaa43697ab950 Author: Bagas Sanjaya Date: Wed May 10 10:54:13 2023 +0700 Documentation: net/mlx5: Use bullet and definition lists for vnic counters description "vnic reporter" section contains unformatted description for vnic counters, which is rendered as one long paragraph instead of list. Use bullet and definition lists to match other lists. Fixes: b0bc615df488ab ("net/mlx5: Add vnic devlink health reporter to PFs/VFs") Reviewed-by: Leon Romanovsky Signed-off-by: Bagas Sanjaya Reviewed-by: Simon Horman Reviewed-by: Daniel Machon Signed-off-by: Saeed Mahameed commit c3acc46c602f1aa0449ea687057758e5224ae3da Author: Bagas Sanjaya Date: Wed May 10 10:54:12 2023 +0700 Documentation: net/mlx5: Wrap vnic reporter devlink commands in code blocks Sphinx reports htmldocs warnings: Documentation/networking/device_drivers/ethernet/mellanox/mlx5/devlink.rst:287: WARNING: Unexpected indentation. Documentation/networking/device_drivers/ethernet/mellanox/mlx5/devlink.rst:288: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/networking/device_drivers/ethernet/mellanox/mlx5/devlink.rst:290: WARNING: Unexpected indentation. Fix above warnings by wrapping diagnostic devlink commands in "vnic reporter" section in code blocks to be consistent with other devlink command snippets. Fixes: b0bc615df488ab ("net/mlx5: Add vnic devlink health reporter to PFs/VFs") Fixes: cf14af140a5ad0 ("net/mlx5e: Add vnic devlink health reporter to representors") Reviewed-by: Leon Romanovsky Signed-off-by: Bagas Sanjaya Reviewed-by: Simon Horman Signed-off-by: Saeed Mahameed commit d5972f1000c1e6b5185ded0fc194f21984f26e14 Author: Dan Carpenter Date: Fri May 19 22:43:03 2023 +0300 net/mlx5: Fix check for allocation failure in comp_irqs_request_pci() This function accidentally dereferences "cpus" instead of returning directly. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202305200354.KV3jU94w-lkp@intel.com/ Fixes: b48a0f72bc3e ("net/mlx5: Refactor completion irq request/release code") Signed-off-by: Dan Carpenter Reviewed-by: Simon Horman Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit fe5c2d3aef9352ac36a6acbc2bff5f732211ce3b Author: Yevgeny Kliteynik Date: Wed May 17 17:54:30 2023 +0300 net/mlx5: DR, Add missing mutex init/destroy in pattern manager Add missing mutex init/destroy as caught by the lock's debug warning: DEBUG_LOCKS_WARN_ON(lock->magic != lock) Fixes: da5d0027d666 ("net/mlx5: DR, Add cache for modify header pattern") Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit c4c24fc30cc417ace332ceceaba4f70f81dcd521 Author: Jianbo Liu Date: Tue May 16 02:28:02 2023 +0000 net/mlx5e: Move Ethernet driver debugfs to profile init callback As priv->dfs_root is cleared, and therefore missed, when change eswitch mode, move the creation of the root debugfs to the init callback of mlx5e_nic_profile and mlx5e_uplink_rep_profile, and the destruction to the cleanup callback for symmeter. Fixes: 288eca60cc31 ("net/mlx5e: Add Ethernet driver debugfs") Signed-off-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit bdf274750fca17b289404ef03453c4070725302c Author: Dmytro Linkin Date: Wed Oct 13 14:39:24 2021 +0300 net/mlx5e: Don't attach netdev profile while handling internal error As part of switchdev mode disablement, driver changes port netdevice profile from uplink to nic. If this process is triggered by health recovery flow (PCI reset, for ex.) profile attach would fail because all fw commands aborted when internal error flag is set. As a result, nic netdevice profile is not attached and driver fails to rollback to uplink profile, which leave driver in broken state and cause crash later. To handle broken state do netdevice profile initialization only instead of full attachment and release mdev resources on driver suspend as expected. Actual netdevice attachment is done during driver load. Fixes: c4d7eb57687f ("net/mxl5e: Add change profile method") Signed-off-by: Dmytro Linkin Signed-off-by: Saeed Mahameed commit 5d862ec631f3d3cc3b4f8cdb5b9fc5879663f1d3 Author: Vlad Buslov Date: Mon May 22 14:48:52 2023 +0200 net/mlx5: Fix post parse infra to only parse every action once Caller of mlx5e_tc_act_post_parse() needs it to parse only the subset of actions starting after previous split and ending at the current action. However, that range is not provided as arguments and mlx5e_tc_act_post_parse() uses generic flow_action_for_each() that iterates over all flow actions. Not only this is redundant, it also causes a bug when mlx5e_tc_act->post_parse() callback is not idempotent since it will be called for every split. For example, ct action tc_act_post_parse_ct() callback obtains a reference to mlx5_ct_ft instance and calling it several times during parsing stage will cause reference counter imbalance. Fix the issue by providing a proper action range of the current split subset to mlx5e_tc_act_post_parse() and only calling mlx5e_tc_act->post_parse() for actions inside the subset range. Fixes: 8300f225268b ("net/mlx5e: Create new flow attr for multi table actions") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 1db1f21caebbb1b6e9b1e7657df613616be3fb49 Author: Dragos Tatulea Date: Thu Apr 13 15:48:30 2023 +0300 net/mlx5e: Use query_special_contexts cmd only once per mdev Don't query the firmware so many times (num rqs * num wqes * wqe frags) because it slows down linearly the interface creation time when the product is larger. Do it only once per mdev and store the result in mlx5e_param. Due to helper function being called from different files, move it to an appropriate location. Rename the function with a proper prefix and add a small cleanup. This fix applies only for legacy rq. Fixes: 1b1e4868836a ("net/mlx5e: Use query_special_contexts for mkeys") Signed-off-by: Dragos Tatulea Reviewed-by: Or Har-Toov Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 341a80de2468f481b1f771683709b5649cbfe513 Author: Shay Drory Date: Sat Apr 29 20:41:41 2023 +0300 net/mlx5: fw_tracer, Fix event handling mlx5 driver needs to parse traces with event_id inside the range of first_string_trace and num_string_trace. However, mlx5 is parsing all events with event_id >= first_string_trace. Fix it by checking for the correct range. Fixes: c71ad41ccb0c ("net/mlx5: FW tracer, events handling") Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit b4646da0573fae9dfa2b8f1f10936cb6eedd7230 Author: Shay Drory Date: Mon Apr 24 12:46:06 2023 +0300 net/mlx5: SF, Drain health before removing device There is no point in recovery during device removal. Also, if health work started need to wait for it to avoid races and NULL pointer access. Hence, drain health WQ before removing device. Fixes: 1958fc2f0712 ("net/mlx5: SF, Add auxiliary device driver") Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 824c8dc4a470040bf0e56ba716543839c2498d49 Author: Shay Drory Date: Mon Apr 24 12:31:59 2023 +0300 net/mlx5: Drain health before unregistering devlink mlx5 health mechanism is using devlink APIs, which are using devlink notify APIs. After the cited patch, using devlink notify APIs after devlink is unregistered triggers a WARN_ON(). Hence, drain health WQ before devlink is unregistered. Fixes: cf530217408e ("devlink: Notify users when objects are accessible") Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 623efc4cbd6115db36716e31037cb6d1f3ce6754 Author: Maher Sanalla Date: Tue May 9 17:56:01 2023 +0300 net/mlx5e: Do not update SBCM when prio2buffer command is invalid The shared buffer pools configuration which are stored in the SBCM register are updated when the user changes the prio2buffer mapping. However, in case the user desired prio2buffer change is invalid, which can occur due to mapping a lossless priority to a not large enough buffer, the SBCM update should not be performed, as the user command is failed. Thus, Perform the SBCM update only after xoff threshold calculation is performed and the user prio2buffer mapping is validated. Fixes: a440030d8946 ("net/mlx5e: Update shared buffer along with device buffer changes") Signed-off-by: Maher Sanalla Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 81fe2be062915e2a2fdc494c3cd90e946e946c25 Author: Maher Sanalla Date: Mon May 1 17:31:40 2023 +0300 net/mlx5e: Consider internal buffers size in port buffer calculations Currently, when a user triggers a change in port buffer headroom (buffers 0-7), the driver checks that the requested headroom does not exceed the total port buffer size. However, this check does not take into account the internal buffers (buffers 8-9), which are also part of the total port buffer. This can result in treating invalid port buffer change requests as valid, causing unintended changes to the shared buffer. To address this, include the internal buffers size in the calculation of available port buffer space which ensures that port buffer requests do not exceed the correct limit. Furthermore, remove internal buffers (8-9) size from the total_size calculation as these buffers are reserved for internal use and are not exposed to the user. While at it, add verbosity to the debug prints in mlx5e_port_query_buffer() function to ease future debugging. Fixes: ecdf2dadee8e ("net/mlx5e: Receive buffer support for DCBX") Signed-off-by: Maher Sanalla Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 37c3b9fa7ccf5caad6d87ba4d42bf00be46be1cf Author: Chris Mi Date: Tue Feb 21 04:41:41 2023 +0200 net/mlx5e: Prevent encap offload when neigh update is running The cited commit adds a compeletion to remove dependency on rtnl lock. But it causes a deadlock for multiple encapsulations: crash> bt ffff8aece8a64000 PID: 1514557 TASK: ffff8aece8a64000 CPU: 3 COMMAND: "tc" #0 [ffffa6d14183f368] __schedule at ffffffffb8ba7f45 #1 [ffffa6d14183f3f8] schedule at ffffffffb8ba8418 #2 [ffffa6d14183f418] schedule_preempt_disabled at ffffffffb8ba8898 #3 [ffffa6d14183f428] __mutex_lock at ffffffffb8baa7f8 #4 [ffffa6d14183f4d0] mutex_lock_nested at ffffffffb8baabeb #5 [ffffa6d14183f4e0] mlx5e_attach_encap at ffffffffc0f48c17 [mlx5_core] #6 [ffffa6d14183f628] mlx5e_tc_add_fdb_flow at ffffffffc0f39680 [mlx5_core] #7 [ffffa6d14183f688] __mlx5e_add_fdb_flow at ffffffffc0f3b636 [mlx5_core] #8 [ffffa6d14183f6f0] mlx5e_tc_add_flow at ffffffffc0f3bcdf [mlx5_core] #9 [ffffa6d14183f728] mlx5e_configure_flower at ffffffffc0f3c1d1 [mlx5_core] #10 [ffffa6d14183f790] mlx5e_rep_setup_tc_cls_flower at ffffffffc0f3d529 [mlx5_core] #11 [ffffa6d14183f7a0] mlx5e_rep_setup_tc_cb at ffffffffc0f3d714 [mlx5_core] #12 [ffffa6d14183f7b0] tc_setup_cb_add at ffffffffb8931bb8 #13 [ffffa6d14183f810] fl_hw_replace_filter at ffffffffc0dae901 [cls_flower] #14 [ffffa6d14183f8d8] fl_change at ffffffffc0db5c57 [cls_flower] #15 [ffffa6d14183f970] tc_new_tfilter at ffffffffb8936047 #16 [ffffa6d14183fac8] rtnetlink_rcv_msg at ffffffffb88c7c31 #17 [ffffa6d14183fb50] netlink_rcv_skb at ffffffffb8942853 #18 [ffffa6d14183fbc0] rtnetlink_rcv at ffffffffb88c1835 #19 [ffffa6d14183fbd0] netlink_unicast at ffffffffb8941f27 #20 [ffffa6d14183fc18] netlink_sendmsg at ffffffffb8942245 #21 [ffffa6d14183fc98] sock_sendmsg at ffffffffb887d482 #22 [ffffa6d14183fcb8] ____sys_sendmsg at ffffffffb887d81a #23 [ffffa6d14183fd38] ___sys_sendmsg at ffffffffb88806e2 #24 [ffffa6d14183fe90] __sys_sendmsg at ffffffffb88807a2 #25 [ffffa6d14183ff28] __x64_sys_sendmsg at ffffffffb888080f #26 [ffffa6d14183ff38] do_syscall_64 at ffffffffb8b9b6a8 #27 [ffffa6d14183ff50] entry_SYSCALL_64_after_hwframe at ffffffffb8c0007c crash> bt 0xffff8aeb07544000 PID: 1110766 TASK: ffff8aeb07544000 CPU: 0 COMMAND: "kworker/u20:9" #0 [ffffa6d14e6b7bd8] __schedule at ffffffffb8ba7f45 #1 [ffffa6d14e6b7c68] schedule at ffffffffb8ba8418 #2 [ffffa6d14e6b7c88] schedule_timeout at ffffffffb8baef88 #3 [ffffa6d14e6b7d10] wait_for_completion at ffffffffb8ba968b #4 [ffffa6d14e6b7d60] mlx5e_take_all_encap_flows at ffffffffc0f47ec4 [mlx5_core] #5 [ffffa6d14e6b7da0] mlx5e_rep_update_flows at ffffffffc0f3e734 [mlx5_core] #6 [ffffa6d14e6b7df8] mlx5e_rep_neigh_update at ffffffffc0f400bb [mlx5_core] #7 [ffffa6d14e6b7e50] process_one_work at ffffffffb80acc9c #8 [ffffa6d14e6b7ed0] worker_thread at ffffffffb80ad012 #9 [ffffa6d14e6b7f10] kthread at ffffffffb80b615d #10 [ffffa6d14e6b7f50] ret_from_fork at ffffffffb8001b2f After the first encap is attached, flow will be added to encap entry's flows list. If neigh update is running at this time, the following encaps of the flow can't hold the encap_tbl_lock and sleep. If neigh update thread is waiting for that flow's init_done, deadlock happens. Fix it by holding lock outside of the for loop. If neigh update is running, prevent encap flows from offloading. Since the lock is held outside of the for loop, concurrent creation of encap entries is not allowed. So remove unnecessary wait_for_completion call for res_ready. Fixes: 95435ad7999b ("net/mlx5e: Only access fully initialized flows in neigh update") Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit e2ab5aa11f191b54514f063a5b5c29f3559f4ab7 Author: Chris Mi Date: Wed Mar 1 10:50:53 2023 +0200 net/mlx5e: Extract remaining tunnel encap code to dedicated file Move set_encap_dests() and clean_encap_dests() to the tunnel encap dedicated file. And rename them to mlx5e_tc_tun_encap_dests_set() and mlx5e_tc_tun_encap_dests_unset(). No functional change in this patch. It is needed in the next patch. Signed-off-by: Chris Mi Signed-off-by: Saeed Mahameed commit 4c8bb2d567588ccbfbf374c079f291a1402c4454 Author: Krzysztof Kozlowski Date: Tue Apr 18 11:57:34 2023 +0200 arm64: dts: qcom: sm8550: use uint16 for Soundwire interval The Soundwire bindings changed during review, after the SM8550 DTS Soundwire nodes were merged. Switch to uint16 for Soundwire qcom,ports-sinterval property, to match with current bindings. Fixes: 61b006389bb7 ("arm64: dts: qcom: sm8550: add Soundwire controllers") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230418095734.669858-1-krzysztof.kozlowski@linaro.org commit 4a08af2f22ba3c2fb26287dc27fa07bf298acb34 Author: Konrad Dybcio Date: Tue Apr 11 15:47:16 2023 +0200 soc: qcom: rpmhpd: Add SA8155P power domains Add the power domains exposed by RPMh in the Qualcomm SA8155P platform. Turns out they differ from SM8150. Signed-off-by: Konrad Dybcio Tested-by: Bartosz Golaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230411-topic-hanaau-v2-2-fd3d70844b31@linaro.org commit 52ebee922b638c828d427345fadacc936fd2807f Merge: 47820d3263a4a 672b584c68de3 Author: Bjorn Andersson Date: Wed May 24 20:39:16 2023 -0700 Merge branch '20230411-topic-hanaau-v2-1-fd3d70844b31@linaro.org' into drivers-fixes-for-6.4 Merge the RPMPD DeviceTree binding update through a topic branch, so make the constants available to both driver and DeviceTree source branches. Keep the two parts on separate branches to allow merge-back if necessary towards v6.5. commit 8c67e554754ca669911625412ae9a6cd8cee1c82 Author: Konrad Dybcio Date: Tue Apr 11 15:47:17 2023 +0200 arm64: dts: qcom: Split out SA8155P and use correct RPMh power domains The RPMhPD setup on SA8155P is different compared to SM8150. Correct it to ensure the platform will not try accessing forbidden/missing RPMh entries at boot, as a bad vote will hang the machine. Signed-off-by: Konrad Dybcio Tested-by: Bartosz Golaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230411-topic-hanaau-v2-3-fd3d70844b31@linaro.org commit 57a9d4bdb49a7d811140aba591295659c86aa5b8 Merge: a14da6144d16e 672b584c68de3 Author: Bjorn Andersson Date: Wed May 24 20:37:20 2023 -0700 Merge branch '20230411-topic-hanaau-v2-1-fd3d70844b31@linaro.org' into arm64-fixes-for-6.4 Merge the RPMPD DeviceTree binding update through a topic branch, so make the constants available to both driver and DeviceTree source branches. Keep the two parts on separate branches to allow merge-back if necessary towards v6.5. commit 672b584c68de309017cd2ce8938856c9b7c1b70e Author: Konrad Dybcio Date: Tue Apr 11 15:47:15 2023 +0200 dt-bindings: power: qcom,rpmpd: Add SA8155P Add a compatible for SA8155P platforms and relevant defines to the include file. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Tested-by: Bartosz Golaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230411-topic-hanaau-v2-1-fd3d70844b31@linaro.org commit 47820d3263a4a7ba258fe2efe26ae5afb5b83036 Author: Abel Vesa Date: Tue May 16 11:28:56 2023 +0300 soc: qcom: Rename ice to qcom_ice to avoid module name conflict The following error was reported when building x86_64 allmodconfig: error: the following would cause module name conflict: drivers/soc/qcom/ice.ko drivers/net/ethernet/intel/ice/ice.ko Seems the 'ice' module name is already used by some Intel ethernet driver, so lets rename the Qualcomm Inline Crypto Engine (ICE) module from 'ice' to 'qcom_ice' to avoid any kind of errors/confusions. Reported-by: Stephen Rothwell Fixes: 2afbf43a4aec ("soc: qcom: Make the Qualcomm UFS/SDCC ICE a dedicated driver") Acked-by: Mukesh Ojha Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230516082856.150214-1-abel.vesa@linaro.org commit 7b374a2fc8665bfb8a0d93b617463cc0732f533a Author: Dan Carpenter Date: Fri Apr 21 13:44:21 2023 +0300 soc: qcom: rmtfs: Fix error code in probe() Return an error code if of_property_count_u32_elems() fails. Don't return success. Fixes: e656cd0bcf3d ("soc: qcom: rmtfs: Optionally map RMTFS to more VMs") Signed-off-by: Dan Carpenter Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/76b21a14-70ff-4ca9-927d-587543c6699c@kili.mountain commit b3d0dcc8e359cf5d57fb6308bc9750af5da574b3 Author: Christophe JAILLET Date: Mon Apr 17 00:29:35 2023 +0200 soc: qcom: ramp_controller: Fix an error handling path in qcom_ramp_controller_probe() 'qrc' is known to be non-NULL at this point. Checking for 'qrc->desc' was expected instead, so use it. Fixes: a723c95fa137 ("soc: qcom: Add Qualcomm Ramp Controller driver") Signed-off-by: Christophe JAILLET Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/84727a79d0261b4112411aec23b553504015c02c.1681684138.git.christophe.jaillet@wanadoo.fr commit ab6cacf833ba337b41700ee193d2c8936f1d049e Author: Steve French Date: Mon May 22 09:50:33 2023 -0500 smb3: move Documentation/filesystems/cifs to Documentation/filesystems/smb Documentation/filesystems/cifs contains both server and client information so its pathname is misleading. In addition, the directory fs/smb now contains both server and client, so move Documentation/filesystems/cifs to Documentation/filesystems/smb Suggested-by: Namjae Jeon Acked-by: Namjae Jeon Signed-off-by: Steve French commit bf8a352d4997147b1e63020ed17cb4ee94392608 Author: Steve French Date: Sun May 21 22:52:04 2023 -0500 cifs: correct references in Documentation to old fs/cifs path The fs/cifs directory has moved to fs/smb/client, correct mentions of this in Documentation and comments. Acked-by: Namjae Jeon Signed-off-by: Steve French commit 38c8a9a52082579090e34c033d439ed2cd1a462d Author: Steve French Date: Sun May 21 20:46:30 2023 -0500 smb: move client and server files to common directory fs/smb Move CIFS/SMB3 related client and server files (cifs.ko and ksmbd.ko and helper modules) to new fs/smb subdirectory: fs/cifs --> fs/smb/client fs/ksmbd --> fs/smb/server fs/smbfs_common --> fs/smb/common Suggested-by: Linus Torvalds Acked-by: Namjae Jeon Signed-off-by: Steve French commit cb8b02fd6343228966324528adf920bfb8b8e681 Author: Steve French Date: Wed May 24 03:26:19 2023 -0500 cifs: mapchars mount option ignored There are two ways that special characters (not allowed in some other operating systems like Windows, but allowed in POSIX) have been mapped in the past ("SFU" and "SFM" mappings) to allow them to be stored in a range reserved for special chars. The default for Linux has been to use "mapposix" (ie the SFM mapping) but the conversion to the new mount API in the 5.11 kernel broke the ability to override the default mapping of the reserved characters (like '?' and '*' and '\') via "mapchars" mount option. This patch fixes that - so can now mount with "mapchars" mount option to override the default ("mapposix" ie SFM) mapping. Reported-by: Tyler Spivey Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api") Signed-off-by: Steve French commit 8b4dd44f9b4702d42362b97b81c91b33a6dcea58 Author: Steve French Date: Tue May 23 20:25:47 2023 -0500 smb3: display debug information better for encryption Fix /proc/fs/cifs/DebugData to use the same case for "encryption" (ie "Encryption" with init capital letter was used in one place). In addition, if gcm256 encryption (intead of gcm128) is used on a connection to a server, note that in the DebugData as well. It now displays (when gcm256 negotiated): Security type: RawNTLMSSP SessionId: 0x86125800bc000b0d encrypted(gcm256) Acked-by: Ronnie Sahlberg Signed-off-by: Steve French commit 72a7804a667eeac98888610521179f0418883158 Author: Paulo Alcantara Date: Tue May 23 17:38:38 2023 -0300 cifs: fix smb1 mount regression cifs.ko maps NT_STATUS_NOT_FOUND to -EIO when SMB1 servers couldn't resolve referral paths. Proceed to tree connect when we get -EIO from dfs_get_referral() as well. Reported-by: Kris Karas (Bug Reporting) Tested-by: Woody Suwalski Fixes: 8e3554150d6c ("cifs: fix sharing of DFS connections") Cc: stable@vger.kernel.org # v6.2+ Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 482e6ad9adde69d9da08864b4ccf4dfd53edb2f0 Author: Fangzhi Zuo Date: Wed May 10 16:43:30 2023 -0400 drm/amd/display: Have Payload Properly Created After Resume At drm suspend sequence, MST dc_sink is removed. When commit cached MST stream back in drm resume sequence, the MST stream payload is not properly created and added into the payload table. After resume, topology change is reprobed by removing existing streams first. That leads to no payload is found in the existing payload table as below error "[drm] ERROR No payload for [MST PORT:] found in mst state" 1. In encoder .atomic_check routine, remove check existance of dc_sink 2. Bypass MST by checking existence of MST root port. dc_link_type cannot differentiate MST port before topology is rediscovered. Reviewed-by: Wayne Lin Acked-by: Tom Chung Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 137f9cee113df91107cf91c130d5c414c4b191f0 Author: Alan Liu Date: Tue May 2 17:54:50 2023 +0800 drm/amd/display: Fix warning in disabling vblank irq [Why] During gpu-reset, we toggle vblank irq by calling dc_interrupt_set() instead of amdgpu_irq_get/put() because we don't want to change the irq source's refcount. However, we see the warning when vblank irq is enabled by dc_interrupt_set() during gpu-reset but disabled by amdgpu_irq_put() after gpu-reset. [How] Only in dm_gpureset_toggle_interrupts() we toggle vblank interrupts by calling dc_interrupt_set(). Apart from this we call dm_set_vblank() which uses amdgpu_irq_get/put() to operate vblank irq. Reviewed-by: Bhawanpreet Lakha Acked-by: Tom Chung Signed-off-by: Alan Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 38776cc45eb7603df4735a0410f42cffff8e71a1 Author: Kan Liang Date: Mon May 8 07:02:06 2023 -0700 perf/x86/uncore: Correct the number of CHAs on SPR The number of CHAs from the discovery table on some SPR variants is incorrect, because of a firmware issue. An accurate number can be read from the MSR UNC_CBO_CONFIG. Fixes: 949b11381f81 ("perf/x86/intel/uncore: Add Sapphire Rapids server CHA support") Reported-by: Stephane Eranian Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Stephane Eranian Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230508140206.283708-1-kan.liang@linux.intel.com commit 40baba5693b9af586dc1063af603d05a79e57a6b Author: Jonatas Esteves Date: Sat May 20 10:39:52 2023 -0300 drm/amd/pm: Fix output of pp_od_clk_voltage Printing the other clock types should not be conditioned on being able to print OD_SCLK. Some GPUs currently have limited capability of only printing a subset of these. Since this condition was introduced in v5.18-rc1, reading from `pp_od_clk_voltage` has been returning empty on the Asus ROG Strix G15 (2021). Fixes: 79c65f3fcbb1 ("drm/amd/pm: do not expose power implementation details to amdgpu_pm.c") Reviewed-by: Evan Quan Signed-off-by: Jonatas Esteves Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 0d2dd02d74e6377268f56b90261de0fae8f0d2cb Author: Evan Quan Date: Fri May 19 14:20:17 2023 +0800 drm/amd/pm: add missing NotifyPowerSource message mapping for SMU13.0.7 Otherwise, the power source switching will fail due to message unavailable. Fixes: bf4823267a81 ("drm/amd/pm: fix possible power mode mismatch between driver and PMFW") Signed-off-by: Evan Quan Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit a34fc1bcd2c4d8b09dcfc0b95ac65bca1e579bd7 Author: Alex Deucher Date: Thu May 18 12:38:22 2023 -0400 drm/radeon: reintroduce radeon_dp_work_func content Put back the radeon_dp_work_func logic. It seems that handling DP RX interrupts is necessary to make some panels work. This was removed with the MST support, but it regresses some systems so add it back. While we are here, add the proper mutex locking. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2567 Fixes: 01ad1d9c2888 ("drm/radeon: Drop legacy MST support") Reviewed-by: Lyude Paul Signed-off-by: Alex Deucher Cc: Lyude Paul Cc: stable@vger.kernel.org commit 7fc602dbfd548045862df096910b7d21e6d300bf Author: Jesse Zhang Date: Thu May 18 09:46:22 2023 +0800 drm/amdgpu: don't enable secure display on incompatible platforms [why] [drm] psp gfx command LOAD_TA(0x1) failed and response status is (0x7) [drm] psp gfx command INVOKE_CMD(0x3) failed and response status is (0x4) amdgpu 0000:04:00.0: amdgpu: Secure display: Generic Failure. [how] don't enable secure display on incompatible platforms Suggested-by: Aaron Liu Signed-off-by: Jesse zhang Reviewed-by: Aaron Liu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 60ecaaf54886b0642d5c4744f7fbf1ff0d6b3e42 Author: Sukrut Bellary Date: Wed May 3 16:15:07 2023 -0700 drm:amd:amdgpu: Fix missing buffer object unlock in failure path smatch warning - 1) drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:3615 gfx_v9_0_kiq_resume() warn: inconsistent returns 'ring->mqd_obj->tbo.base.resv'. 2) drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:6901 gfx_v10_0_kiq_resume() warn: inconsistent returns 'ring->mqd_obj->tbo.base.resv'. Signed-off-by: Sukrut Bellary Signed-off-by: Alex Deucher commit 933174ae28ba72ab8de5b35cb7c98fc211235096 Merge: f767b330d8d7c 6afe2ae8dc48e Author: Linus Torvalds Date: Wed May 24 11:43:08 2023 -0700 Merge tag 'spi-fix-v6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A collection of fixes that came in since the merge window, plus an update to MAINTAINERS. The Cadence fixes are coming from the addition of device mode support, they required a couple of incremental updates in order to get something that works robustly for both device and controller modes" * tag 'spi-fix-v6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi-cadence: Interleave write of TX and read of RX FIFO spi: dw: Replace spi->chip_select references with function calls spi: MAINTAINERS: drop Krzysztof Kozlowski from Samsung SPI spi: spi-cadence: Only overlap FIFO transactions in slave mode spi: spi-cadence: Avoid read of RX FIFO before its ready spi: spi-geni-qcom: Select FIFO mode for chip select commit f767b330d8d7c27d6cc0abe594c0ab24e7f6e429 Merge: 203fc3177dd74 a511637502b1c Author: Linus Torvalds Date: Wed May 24 11:37:03 2023 -0700 Merge tag 'regulator-fix-v6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "Some fixes that came in since the merge window, nothing terribly exciting - a couple of driver specific fixes and a fix for the error handling when setting up the debugfs for the devices" * tag 'regulator-fix-v6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: mt6359: add read check for PMIC MT6359 regulator: Fix error checking for debugfs_create_dir regulator: pca9450: Fix BUCK2 enable_mask commit 203fc3177dd7427a1f87ec33de201c6d67b5c5cb Merge: 9d646009f65d6 81dce1490e284 Author: Linus Torvalds Date: Wed May 24 11:31:37 2023 -0700 Merge tag 'mmc-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Fix error propagation for the non-block-device I/O paths MMC host: - sdhci-cadence: Fix an error path during probe - sdhci-esdhc-imx: Fix support for the 'no-mmc-hs400' DT property" * tag 'mmc-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-esdhc-imx: make "no-mmc-hs400" works mmc: sdhci-cadence: Fix an error handling path in sdhci_cdns_probe() mmc: block: ensure error propagation for non-blk commit 5f7fdb0f255756b594cc45c2c08b0140bc4a1761 Author: Srinivas Pandruvada Date: Mon May 22 15:38:44 2023 -0700 thermal: intel: int340x: Add new line for UUID display Prior to the commit "763bd29fd3d1 ("thermal: int340x_thermal: Use sysfs_emit_at() instead of scnprintf()", there was a new line after each UUID string. With the newline removed, existing user space like "thermald" fails to compare each supported UUID as it is using getline() to read UUID and apply correct thermal table. To avoid breaking existing user space, add newline after each UUID string. Signed-off-by: Srinivas Pandruvada Fixes: 763bd29fd3d1 ("thermal: int340x_thermal: Use sysfs_emit_at() instead of scnprintf()") Cc: 6.3+ # 6.3+ Signed-off-by: Rafael J. Wysocki commit 8557dc27126949c702bd3aafe8a7e0b7e4fcb44c Author: Yu Kuai Date: Wed May 24 09:41:18 2023 +0800 md/raid5: fix miscalculation of 'end_sector' in raid5_read_one_chunk() 'end_sector' is compared to 'rdev->recovery_offset', which is offset to rdev, however, commit e82ed3a4fbb5 ("md/raid6: refactor raid5_read_one_chunk") changes the calculation of 'end_sector' to offset to the array. Fix this miscalculation. Fixes: e82ed3a4fbb5 ("md/raid6: refactor raid5_read_one_chunk") Cc: stable@vger.kernel.org # v5.12+ Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230524014118.3172781-1-yukuai1@huaweicloud.com commit 249b62c448de7117c18531d626aed6e153cdfd75 Author: Wyes Karny Date: Wed May 17 16:28:16 2023 +0000 cpufreq: amd-pstate: Remove fast_switch_possible flag from active driver amd_pstate active mode driver is only compatible with static governors. Therefore it doesn't need fast_switch functionality. Remove fast_switch_possible flag from amd_pstate active mode driver. Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors") Signed-off-by: Wyes Karny Signed-off-by: Rafael J. Wysocki commit 4badf2eb1e986bdbf34dd2f5d4c979553a86fe54 Author: Gautham R. Shenoy Date: Wed May 17 16:28:15 2023 +0000 cpufreq: amd-pstate: Add ->fast_switch() callback Schedutil normally calls the adjust_perf callback for drivers with adjust_perf callback available and fast_switch_possible flag set. However, when frequency invariance is disabled and schedutil tries to invoke fast_switch. So, there is a chance of kernel crash if this function pointer is not set. To protect against this scenario add fast_switch callback to amd_pstate driver. Fixes: 1d215f0319c2 ("cpufreq: amd-pstate: Add fast switch function for AMD P-State") Signed-off-by: Gautham R. Shenoy Signed-off-by: Wyes Karny Signed-off-by: Rafael J. Wysocki commit 61e150fb310729c98227a5edf6e4a3619edc3702 Author: Helge Deller Date: Wed May 24 17:07:07 2023 +0200 parisc: Fix flush_dcache_page() for usage from irq context Since at least kernel 6.1, flush_dcache_page() is called with IRQs disabled, e.g. from aio_complete(). But the current implementation for flush_dcache_page() on parisc unintentionally re-enables IRQs, which may lead to deadlocks. Fix it by using xa_lock_irqsave() and xa_unlock_irqrestore() for the flush_dcache_mmap_*lock() macros instead. Cc: linux-parisc@vger.kernel.org Cc: stable@kernel.org # 5.18+ Signed-off-by: Helge Deller commit 335b4223466dd75f9f3ea4918187afbadd22e5c8 Author: Maximilian Heyne Date: Wed May 3 13:16:53 2023 +0000 x86/pci/xen: populate MSI sysfs entries Commit bf5e758f02fc ("genirq/msi: Simplify sysfs handling") reworked the creation of sysfs entries for MSI IRQs. The creation used to be in msi_domain_alloc_irqs_descs_locked after calling ops->domain_alloc_irqs. Then it moved into __msi_domain_alloc_irqs which is an implementation of domain_alloc_irqs. However, Xen comes with the only other implementation of domain_alloc_irqs and hence doesn't run the sysfs population code anymore. Commit 6c796996ee70 ("x86/pci/xen: Fixup fallout from the PCI/MSI overhaul") set the flag MSI_FLAG_DEV_SYSFS for the xen msi_domain_info but that doesn't actually have an effect because Xen uses it's own domain_alloc_irqs implementation. Fix this by making use of the fallback functions for sysfs population. Fixes: bf5e758f02fc ("genirq/msi: Simplify sysfs handling") Signed-off-by: Maximilian Heyne Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20230503131656.15928-1-mheyne@amazon.de Signed-off-by: Juergen Gross commit 8fafac202d18230bb9926bda48e563fd2cce2a4f Author: Dan Carpenter Date: Wed May 3 18:11:35 2023 +0300 xen/pvcalls-back: fix double frees with pvcalls_new_active_socket() In the pvcalls_new_active_socket() function, most error paths call pvcalls_back_release_active(fedata->dev, fedata, map) which calls sock_release() on "sock". The bug is that the caller also frees sock. Fix this by making every error path in pvcalls_new_active_socket() release the sock, and don't free it in the caller. Fixes: 5db4d286a8ef ("xen/pvcalls: implement connect command") Signed-off-by: Dan Carpenter Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/e5f98dc2-0305-491f-a860-71bbd1398a2f@kili.mountain Signed-off-by: Juergen Gross commit b6ebaa8100090092aa602530d7e8316816d0c98d Author: Ross Lagerwall Date: Wed Apr 26 17:40:05 2023 +0100 xen/blkfront: Only check REQ_FUA for writes The existing code silently converts read operations with the REQ_FUA bit set into write-barrier operations. This results in data loss as the backend scribbles zeroes over the data instead of returning it. While the REQ_FUA bit doesn't make sense on a read operation, at least one well-known out-of-tree kernel module does set it and since it results in data loss, let's be safe here and only look at REQ_FUA for writes. Signed-off-by: Ross Lagerwall Acked-by: Juergen Gross Link: https://lore.kernel.org/r/20230426164005.2213139-1-ross.lagerwall@citrix.com Signed-off-by: Juergen Gross commit 3eb96946f0be6bf447cbdf219aba22bc42672f92 Author: Christoph Hellwig Date: Wed May 24 08:05:38 2023 +0200 block: make bio_check_eod work for zero sized devices Since the dawn of time bio_check_eod has a check for a non-zero size of the device. This doesn't really make any sense as we never want to send I/O to a device that's been set to zero size, or never moved out of that. I am a bit surprised we haven't caught this for a long time, but the removal of the extra validation inside of zram caused syzbot to trip over this issue recently. I've added a Fixes tag for that commit, but the issue really goes back way before git history. Fixes: 9fe95babc742 ("zram: remove valid_io_request") Reported-by: syzbot+b8d61a58b7c7ebd2c8e0@syzkaller.appspotmail.com Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230524060538.1593686-1-hch@lst.de Signed-off-by: Jens Axboe commit 33d418da6f476b15e4510e0a590062583f63cd36 Author: Alexandre Ghiti Date: Fri May 19 15:13:11 2023 +0200 riscv: Fix unused variable warning when BUILTIN_DTB is set commit ef69d2559fe9 ("riscv: Move early dtb mapping into the fixmap region") wrongly moved the #ifndef CONFIG_BUILTIN_DTB surrounding the pa variable definition in create_fdt_early_page_table(), so move it back to its right place to quiet the following warning: ../arch/riscv/mm/init.c: In function ‘create_fdt_early_page_table’: ../arch/riscv/mm/init.c:925:12: warning: unused variable ‘pa’ [-Wunused-variable] 925 | uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1); Fixes: ef69d2559fe9 ("riscv: Move early dtb mapping into the fixmap region") Signed-off-by: Alexandre Ghiti Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230519131311.391960-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 6888ff04e37d01295620a73f3f7efbc79f6ef152 Author: Helge Deller Date: Wed May 24 14:34:58 2023 +0200 parisc: Handle kgdb breakpoints only in kernel context The kernel kgdb break instructions should only be handled when running in kernel context. Cc: # v5.4+ Signed-off-by: Helge Deller commit df419492e428b6a2bce98d0f613c58a13da6666c Author: Helge Deller Date: Wed May 24 14:31:14 2023 +0200 parisc: Handle kprobes breakpoints only in kernel context The kernel kprobes break instructions should only be handled when running in kernel context. Cc: # v5.18+ Signed-off-by: Helge Deller commit 2028315cf59bb899a5ac7e87dc48ecb8fac7ac24 Author: Helge Deller Date: Mon May 22 22:57:30 2023 +0200 parisc: Allow to reboot machine after system halt In case a machine can't power-off itself on system shutdown, allow the user to reboot it by pressing the RETURN key. Cc: # v4.14+ Signed-off-by: Helge Deller commit a9f0e3d5a089d0844abb679a5e99f15010d53e25 Author: Fuad Tabba Date: Mon May 22 11:32:58 2023 +0100 KVM: arm64: Reload PTE after invoking walker callback on preorder traversal The preorder callback on the kvm_pgtable_stage2_map() path can replace a table with a block, then recursively free the detached table. The higher-level walking logic stashes the old page table entry and then walks the freed table, invoking the leaf callback and potentially freeing pgtable pages prematurely. In normal operation, the call to tear down the detached stage-2 is indirected and uses an RCU callback to trigger the freeing. RCU is not available to pKVM, which is where this bug is triggered. Change the behavior of the walker to reload the page table entry after invoking the walker callback on preorder traversal, as it does for leaf entries. Tested on Pixel 6. Fixes: 5c359cca1faf ("KVM: arm64: Tear down unlinked stage-2 subtree after break-before-make") Suggested-by: Oliver Upton Signed-off-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230522103258.402272-1-tabba@google.com commit d282fa3c5ccb7a0029c418f358143689553b6447 Author: Marc Zyngier Date: Mon May 15 21:46:01 2023 +0100 KVM: arm64: Handle trap of tagged Set/Way CMOs We appear to have missed the Set/Way CMOs when adding MTE support. Not that we really expect anyone to use them, but you never know what stupidity some people can come up with... Treat these mostly like we deal with the classic S/W CMOs, only with an additional check that MTE really is enabled. Signed-off-by: Marc Zyngier Reviewed-by: Cornelia Huck Reviewed-by: Steven Price Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20230515204601.1270428-3-maz@kernel.org commit 8d0f019e4c4f2ee2de81efd9bf1c27e9fb3c0460 Author: Marc Zyngier Date: Mon May 15 21:46:00 2023 +0100 arm64: Add missing Set/Way CMO encodings Add the missing Set/Way CMOs that apply to tagged memory. Signed-off-by: Marc Zyngier Reviewed-by: Cornelia Huck Reviewed-by: Steven Price Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20230515204601.1270428-2-maz@kernel.org commit 0b5d5c436a5c572a45f976cfd34a6741e143e5d9 Author: Marek Vasut Date: Sat May 13 21:23:52 2023 +0200 mmc: pwrseq: sd8787: Fix WILC CHIP_EN and RESETN toggling order Chapter "5.3 Power-Up/Down Sequence" of WILC1000 [1] and WILC3000 [2] states that CHIP_EN must be pulled HIGH first, RESETN second. Fix the order of these signals in the driver. Use the mmc_pwrseq_ops as driver data as the delay between signals is specific to SDIO card type anyway. [1] https://ww1.microchip.com/downloads/aemDocuments/documents/WSG/ProductDocuments/DataSheets/ATWILC1000-MR110XB-IEEE-802.11-b-g-n-Link-Controller-Module-DS70005326E.pdf [2] https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/IEEE-802.11-b-g-n-Link-Controller-Module-with-Integrated-Bluetooth-5.0-DS70005327B.pdf Fixes: b2832b96fcf5 ("mmc: pwrseq: sd8787: add support for wilc1000") Signed-off-by: Marek Vasut Reviewed-by: Claudiu Beznea Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230513192352.479627-1-marex@denx.de Signed-off-by: Ulf Hansson commit a99d21cefd351c8aaa20b83a3c942340e5789d45 Author: Deren Wu Date: Sat May 13 22:48:15 2023 +0800 mmc: vub300: fix invalid response handling We may get an empty response with zero length at the beginning of the driver start and get following UBSAN error. Since there is no content(SDRT_NONE) for the response, just return and skip the response handling to avoid this problem. Test pass : SDIO wifi throughput test with this patch [ 126.980684] UBSAN: array-index-out-of-bounds in drivers/mmc/host/vub300.c:1719:12 [ 126.980709] index -1 is out of range for type 'u32 [4]' [ 126.980729] CPU: 4 PID: 9 Comm: kworker/u16:0 Tainted: G E 6.3.0-rc4-mtk-local-202304272142 #1 [ 126.980754] Hardware name: Intel(R) Client Systems NUC8i7BEH/NUC8BEB, BIOS BECFL357.86A.0081.2020.0504.1834 05/04/2020 [ 126.980770] Workqueue: kvub300c vub300_cmndwork_thread [vub300] [ 126.980833] Call Trace: [ 126.980845] [ 126.980860] dump_stack_lvl+0x48/0x70 [ 126.980895] dump_stack+0x10/0x20 [ 126.980916] ubsan_epilogue+0x9/0x40 [ 126.980944] __ubsan_handle_out_of_bounds+0x70/0x90 [ 126.980979] vub300_cmndwork_thread+0x58e7/0x5e10 [vub300] [ 126.981018] ? _raw_spin_unlock+0x18/0x40 [ 126.981042] ? finish_task_switch+0x175/0x6f0 [ 126.981070] ? __switch_to+0x42e/0xda0 [ 126.981089] ? __switch_to_asm+0x3a/0x80 [ 126.981129] ? __pfx_vub300_cmndwork_thread+0x10/0x10 [vub300] [ 126.981174] ? __kasan_check_read+0x11/0x20 [ 126.981204] process_one_work+0x7ee/0x13d0 [ 126.981246] worker_thread+0x53c/0x1240 [ 126.981291] kthread+0x2b8/0x370 [ 126.981312] ? __pfx_worker_thread+0x10/0x10 [ 126.981336] ? __pfx_kthread+0x10/0x10 [ 126.981359] ret_from_fork+0x29/0x50 [ 126.981400] Fixes: 88095e7b473a ("mmc: Add new VUB300 USB-to-SD/SDIO/MMC driver") Signed-off-by: Deren Wu Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/048cd6972c50c33c2e8f81d5228fed928519918b.1683987673.git.deren.wu@mediatek.com Signed-off-by: Ulf Hansson commit adf8e96a7ea670d45b5de7594acc67e8f4787ae6 Author: Helge Deller Date: Tue May 23 09:06:40 2023 +0200 parisc: Enable LOCKDEP support Cc: # v6.0+ Signed-off-by: Helge Deller commit 15e64ef6520ea8702998db05b87fa5c3d3d40710 Author: Helge Deller Date: Mon May 22 15:11:16 2023 +0200 parisc: Add lightweight spinlock checks Add a lightweight spinlock check which uses only two instructions per spinlock call. It detects if a spinlock has been trashed by some memory corruption and then halts the kernel. It will not detect uninitialized spinlocks, for which CONFIG_DEBUG_SPINLOCK needs to be enabled. This lightweight spinlock check shouldn't influence runtime, so it's safe to enable it by default. The __ARCH_SPIN_LOCK_UNLOCKED_VAL constant has been choosen small enough to be able to be loaded by one LDI assembler statement. Signed-off-by: Helge Deller commit 4ca110cab46561cd74a2acd9b447435acb4bec5f Author: Bin Li Date: Wed May 24 19:37:55 2023 +0800 ALSA: hda/realtek: Enable headset onLenovo M70/M90 Lenovo M70/M90 Gen4 are equipped with ALC897, and they need ALC897_FIXUP_HEADSET_MIC_PIN quirk to make its headset mic work. The previous quirk for M70/M90 is for Gen3. Signed-off-by: Bin Li Cc: Link: https://lore.kernel.org/r/20230524113755.1346928-1-bin.li@canonical.com Signed-off-by: Takashi Iwai commit e79d85c6c217221ea32354a5ac0587a7ccea02b9 Author: Geert Uytterhoeven Date: Tue May 23 17:06:20 2023 +0200 drm/fb-helper: Fix height, width, and accel_flags in fb_var Fbtest contains some very simple validation of the fbdev userspace API contract. When used with shmob-drm, it reports the following warnings and errors: height changed from 68 to 0 height was rounded down width changed from 111 to 0 width was rounded down accel_flags changed from 0 to 1 The first part happens because __fill_var() resets the physical dimensions of the first connector, as filled in by drm_setup_crtcs_fb(). Fix this by retaining the original values. The last part happens because __fill_var() forces the FB_ACCELF_TEXT flag on, while fbtest disables all acceleration on purpose, so it can draw safely to the frame buffer. Fix this by setting accel_flags to zero, as DRM does not implement any text console acceleration. Note that this issue can also be seen in the output of fbset, which reports "accel true". Fixes: ee4cce0a8f03a333 ("drm/fb-helper: fix input validation gaps in check_var") Signed-off-by: Geert Uytterhoeven Reviewed-by: Daniel Vetter Tested-by: Sui Jingfeng Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/57e6b334dae8148b1b8ae6ef308ce9a83810a850.1684854344.git.geert+renesas@glider.be commit 0cc6578048e0980d254aee345130cced4912f723 Author: Mark Brown Date: Tue May 23 23:18:19 2023 +0100 regmap: maple: Drop the RCU read lock while syncing registers Unfortunately the maple tree requires us to explicitly lock it so we need to take the RCU read lock while iterating. When syncing this means that we end up trying to write out register values while holding the RCU read lock which triggers lockdep issues since that is an atomic context but most buses can't be used in atomic context. Pause the iteration and drop the lock for each register we check to avoid this. Reported-by: Pierre-Louis Bossart Tested-by: Pierre-Louis Bossart Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230523-regcache-maple-sync-lock-v1-1-530e4d68dfab@kernel.org Signed-off-by: Mark Brown commit 95856d1f3c223c015780fffb8373a827fc4efd2e Author: Srinivas Kandagatla Date: Tue May 23 16:47:47 2023 +0100 regmap: sdw: check for invalid multi-register writes config SoundWire code as it is only supports Bulk register writes and it does not support multi-register writes. Any drivers that set can_multi_write and use regmap_multi_reg_write() will easily endup with programming the hardware incorrectly without any errors. So, add this check in bus code to be able to validate the drivers config. Fixes: 522272047dc6 ("regmap: sdw: Remove 8-bit value size restriction") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230523154747.5429-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 2d7c2f9272de6347a9cec0fc07708913692c0ae3 Author: Srinivas Kandagatla Date: Tue May 23 17:54:14 2023 +0100 ASoC: codecs: wcd938x-sdw: do not set can_multi_write flag regmap-sdw does not support multi register writes, so there is no point in setting this flag. This also leads to incorrect programming of WSA codecs with regmap_multi_reg_write() call. This invalid configuration should have been rejected by regmap-sdw. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230523165414.14560-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 6e7a6d4797ef521c0762914610ed682e102b9d36 Author: Srinivas Kandagatla Date: Tue May 23 16:46:05 2023 +0100 ASoC: codecs: wsa881x: do not set can_multi_write flag regmap-sdw does not support multi register writes, so there is no point in setting this flag. This also leads to incorrect programming of WSA codecs with regmap_multi_reg_write() call. This invalid configuration should have been rejected by regmap-sdw. Fixes: a0aab9e1404a ("ASoC: codecs: add wsa881x amplifier support") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230523154605.4284-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 40ba0411074485e2cf1bf8ee0f3db27bdff88394 Author: Srinivas Kandagatla Date: Tue May 23 16:46:04 2023 +0100 ASoC: codecs: wsa883x: do not set can_multi_write flag regmap-sdw does not support multi register writes, so there is no point in setting this flag. This also leads to incorrect programming of WSA codecs with regmap_multi_reg_write() call. This invalid configuration should have been rejected by regmap-sdw. Fixes: 43b8c7dc85a1 ("ASoC: codecs: add wsa883x amplifier support") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230523154605.4284-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit bac4d8220b7227e317caeadf5ed05c61cd5dc21c Merge: 81302b1c7c997 011a8719d6105 Author: Takashi Iwai Date: Wed May 24 12:14:24 2023 +0200 Merge tag 'asoc-fix-v6.4-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.4 A collection of fixes for v6.4, mostly driver specific but there's also one fix for DPCM to avoid incorrectly repeated calls to prepare() which can trigger issues on some systems. commit 6ab39f99927eed605728b02d512438d828183c97 Author: Ard Biesheuvel Date: Tue May 16 20:14:19 2023 +0200 crypto: x86/aria - Use 16 byte alignment for GFNI constant vectors The GFNI routines in the AVX version of the ARIA implementation now use explicit VMOVDQA instructions to load the constant input vectors, which means they must be 16 byte aligned. So ensure that this is the case, by dropping the section split and the incorrect .align 8 directive, and emitting the constants into the 16-byte aligned section instead. Note that the AVX2 version of this code deviates from this pattern, and does not require a similar fix, given that it loads these contants as 8-byte memory operands, for which AVX2 permits any alignment. Cc: Taehee Yoo Fixes: 8b84475318641c2b ("crypto: x86/aria-avx - Do not use avx2 instructions") Reported-by: syzbot+a6abcf08bad8b18fd198@syzkaller.appspotmail.com Tested-by: syzbot+a6abcf08bad8b18fd198@syzkaller.appspotmail.com Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 6b0db163ff9200a55dc77a652dad1d4b0a853f63 Author: Claudiu Beznea Date: Tue May 23 08:27:50 2023 +0300 ARM: dts: at91: sama7g5ek: fix debounce delay property for shdwc There is no atmel,shdwc-debouncer property for SHDWC. The right DT property is debounce-delay-us. Use it. Fixes: 16b161bcf5d4 ("ARM: dts: at91: sama7g5: add shdwc node") Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230523052750.184223-1-claudiu.beznea@microchip.com commit ccd4923d18d5698a5910d516646ce125b9155d47 Author: Claudiu Beznea Date: Thu May 18 09:25:11 2023 +0300 ARM: at91: pm: fix imbalanced reference counter for ethernet devices The of_find_device_by_node() function is returning a struct platform_device object with the embedded struct device member's reference counter incremented. This needs to be dropped when done with the platform device returned by of_find_device_by_node(). at91_pm_eth_quirk_is_valid() calls of_find_device_by_node() on suspend and resume path. On suspend it calls of_find_device_by_node() and on resume and failure paths it drops the counter of struct platform_device::dev. In case ethernet device may not wakeup there is a put_device() on at91_pm_eth_quirk_is_valid() which is wrong as it colides with put_device() on resume path leading to the reference counter of struct device embedded in struct platform_device to be messed, stack trace to be displayed (after 5 consecutive suspend/resume cycles) and execution to hang. Along with this the error path of at91_pm_config_quirks() had been also adapted to decrement propertly the reference counter of struct device embedded in struct platform_device. Fixes: b7fc72c63399 ("ARM: at91: pm: add quirks for pm") Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230518062511.2988500-1-claudiu.beznea@microchip.com commit 878ecb0897f4737a4c9401f3523fd49589025671 Author: Gavrilov Ilia Date: Tue May 23 08:29:44 2023 +0000 ipv6: Fix out-of-bounds access in ipv6_find_tlv() optlen is fetched without checking whether there is more than one byte to parse. It can lead to out-of-bounds access. Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with SVACE. Fixes: c61a40432509 ("[IPV6]: Find option offset by type.") Signed-off-by: Gavrilov Ilia Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller commit ba46c96db93905f93ebee8ed824cae6790a5ce34 Merge: 04910d8cbfed6 1da438c0ae023 Author: David S. Miller Date: Wed May 24 08:40:14 2023 +0100 Merge tag 'mlx5-fixes-2023-05-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-fixes-2023-05-22 This series provides bug fixes for the mlx5 driver. Please pull and let me know if there is any problem. ==================== Signed-off-by: David S. Miller commit 04910d8cbfed65dad21c31723c6c1a8d9f990fb6 Author: Arınç ÜNAL Date: Mon May 22 13:57:43 2023 +0300 net: ethernet: mtk_eth_soc: fix QoS on DSA MAC on non MTK_NETSYS_V2 SoCs The commit c6d96df9fa2c ("net: ethernet: mtk_eth_soc: drop generic vlan rx offload, only use DSA untagging") makes VLAN RX offloading to be only used on the SoCs without the MTK_NETSYS_V2 ability (which are not just MT7621 and MT7622). The commit disables the proper handling of special tagged (DSA) frames, added with commit 87e3df4961f4 ("net-next: ethernet: mediatek: add CDM able to recognize the tag for DSA"), for non MTK_NETSYS_V2 SoCs when it finds a MAC that does not use DSA. So if the other MAC uses DSA, the CDMQ component transmits DSA tagged frames to the CPU improperly. This issue can be observed on frames with TCP, for example, a TCP speed test using iperf3 won't work. The commit disables the proper handling of special tagged (DSA) frames because it assumes that these SoCs don't use more than one MAC, which is wrong. Although I made Frank address this false assumption on the patch log when they sent the patch on behalf of Felix, the code still made changes with this assumption. Therefore, the proper handling of special tagged (DSA) frames must be kept enabled in all circumstances as it doesn't affect non DSA tagged frames. Hardware DSA untagging, introduced with the commit 2d7605a72906 ("net: ethernet: mtk_eth_soc: enable hardware DSA untagging"), and VLAN RX offloading are operations on the two CDM components of the frame engine, CDMP and CDMQ, which connect to Packet DMA (PDMA) and QoS DMA (QDMA) and are between the MACs and the CPU. These operations apply to all MACs of the SoC so if one MAC uses DSA and the other doesn't, the hardware DSA untagging operation will cause the CDMP component to transmit non DSA tagged frames to the CPU improperly. Since the VLAN RX offloading feature configuration was dropped, VLAN RX offloading can only be used along with hardware DSA untagging. So, for the case above, we need to disable both features and leave it to the CPU, therefore software, to untag the DSA and VLAN tags. So the correct way to handle this is: For all SoCs: Enable the proper handling of special tagged (DSA) frames (MTK_CDMQ_IG_CTRL). For non MTK_NETSYS_V2 SoCs: Enable hardware DSA untagging (MTK_CDMP_IG_CTRL). Enable VLAN RX offloading (MTK_CDMP_EG_CTRL). When a non MTK_NETSYS_V2 SoC MAC does not use DSA: Disable hardware DSA untagging (MTK_CDMP_IG_CTRL). Disable VLAN RX offloading (MTK_CDMP_EG_CTRL). Fixes: c6d96df9fa2c ("net: ethernet: mtk_eth_soc: drop generic vlan rx offload, only use DSA untagging") Signed-off-by: Arınç ÜNAL Signed-off-by: David S. Miller commit e14fd2af7a1d621c167dad761f729135a7a76ff4 Author: Peter Rosin Date: Tue May 23 19:20:47 2023 +0200 dmaengine: at_hdmac: Extend the Flow Controller bitfield to three bits Some chips have two bits (e.g SAMA5D3), and some have three (e.g. SAM9G45). A field width of three is compatible as long as valid values are used for the different chips. There is no current use of any value needing three bits, so the fixed bug is relatively benign. Fixes: d8840a7edcf0 ("dmaengine: at_hdmac: Use bitfield access macros") Cc: stable@vger.kernel.org Reviewed-by: Tudor Ambarus Signed-off-by: Peter Rosin Link: https://lore.kernel.org/r/e2c898ba-c3a3-5dd3-384b-0585661c79f2@axentia.se Signed-off-by: Vinod Koul commit 2a6c7e8cc74e58ba94b8c897035a8ef7f7349f76 Author: Peter Rosin Date: Tue May 23 19:20:37 2023 +0200 dmaengine: at_hdmac: Repair bitfield macros for peripheral ID handling The MSB part of the peripheral IDs need to go into the ATC_SRC_PER_MSB and ATC_DST_PER_MSB fields. Not the LSB part. This fixes a severe regression for TSE-850 devices (compatible axentia,tse850v3) where output to the audio I2S codec (the main purpose of the device) simply do not work. Fixes: d8840a7edcf0 ("dmaengine: at_hdmac: Use bitfield access macros") Cc: stable@vger.kernel.org Signed-off-by: Peter Rosin Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/01e5dae1-d4b0-cf31-516b-423b11b077f1@axentia.se Signed-off-by: Vinod Koul commit a1a5f2c887252dec161c1e12e04303ca9ba56fa9 Author: Randy Dunlap Date: Tue May 23 21:53:10 2023 -0700 dmaengine: pl330: rename _start to prevent build error "_start" is used in several arches and proably should be reserved for ARCH usage. Using it in a driver for a private symbol can cause a build error when it conflicts with ARCH usage of the same symbol. Therefore rename pl330's "_start" to "pl330_start_thread" so that there is no conflict and no build error. drivers/dma/pl330.c:1053:13: error: '_start' redeclared as different kind of symbol 1053 | static bool _start(struct pl330_thread *thrd) | ^~~~~~ In file included from ../include/linux/interrupt.h:21, from ../drivers/dma/pl330.c:18: arch/riscv/include/asm/sections.h:11:13: note: previous declaration of '_start' with type 'char[]' 11 | extern char _start[]; | ^~~~~~ Fixes: b7d861d93945 ("DMA: PL330: Merge PL330 driver into drivers/dma/") Fixes: ae43b3289186 ("ARM: 8202/1: dmaengine: pl330: Add runtime Power Management support v12") Signed-off-by: Randy Dunlap Cc: Jaswinder Singh Cc: Boojin Kim Cc: Krzysztof Kozlowski Cc: Russell King Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Cc: linux-riscv@lists.infradead.org Link: https://lore.kernel.org/r/20230524045310.27923-1-rdunlap@infradead.org Signed-off-by: Vinod Koul commit 7e7b3b097a9d95cd76fb462f83dc740b71bd73c0 Author: Jakub Kicinski Date: Mon May 22 16:09:03 2023 -0700 docs: netdev: document the existence of the mail bot We had a good run, but after 4 weeks of use we heard someone asking about pw-bot commands. Let's explain its existence in the docs. It's not a complete documentation but hopefully it's enough for the casual contributor. The project and scope are in flux so the details would likely become out of date, if we were to document more in depth. Link: https://lore.kernel.org/all/20230522140057.GB18381@nucnuc.mle/ Reviewed-by: Andrew Lunn Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230522230903.1853151-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 8a02fb71d7192ff1a9a47c9d937624966c6e09af Author: Pratyush Yadav Date: Mon May 22 17:30:20 2023 +0200 net: fix skb leak in __skb_tstamp_tx() Commit 50749f2dd685 ("tcp/udp: Fix memleaks of sk and zerocopy skbs with TX timestamp.") added a call to skb_orphan_frags_rx() to fix leaks with zerocopy skbs. But it ended up adding a leak of its own. When skb_orphan_frags_rx() fails, the function just returns, leaking the skb it just cloned. Free it before returning. This bug was discovered and resolved using Coverity Static Analysis Security Testing (SAST) by Synopsys, Inc. Fixes: 50749f2dd685 ("tcp/udp: Fix memleaks of sk and zerocopy skbs with TX timestamp.") Signed-off-by: Pratyush Yadav Reviewed-by: Kuniyuki Iwashima Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20230522153020.32422-1-ptyadav@amazon.de Signed-off-by: Jakub Kicinski commit f1aab363438cd1c55a3c5420db2a17c0e29ef625 Author: Steven Rostedt (Google) Date: Tue May 23 22:54:29 2023 -0400 tracing/selftests: Update synthetic event selftest to use common_stacktrace With the rename of the stacktrace field to common_stacktrace, update the selftests to reflect this change. Copy the current selftest to test the backward compatibility "stacktrace" keyword. Also the "requires" of that test was incorrect, so it would never actually ran before. That is fixed now. Link: https://lore.kernel.org/linux-trace-kernel/20230523225402.55951f2f@rorschach.local.home Cc: Masami Hiramatsu Cc: Tom Zanussi Cc: Mark Rutland Cc: Shuah Khan Cc: Shuah Khan Signed-off-by: Steven Rostedt (Google) commit 4b512860bdbdddcf41467ebd394f27cb8dfb528c Author: Steven Rostedt (Google) Date: Tue May 23 23:09:13 2023 -0400 tracing: Rename stacktrace field to common_stacktrace The histogram and synthetic events can use a pseudo event called "stacktrace" that will create a stacktrace at the time of the event and use it just like it was a normal field. We have other pseudo events such as "common_cpu" and "common_timestamp". To stay consistent with that, convert "stacktrace" to "common_stacktrace". As this was used in older kernels, to keep backward compatibility, this will act just like "common_cpu" did with "cpu". That is, "cpu" will be the same as "common_cpu" unless the event has a "cpu" field. In which case, the event's field is used. The same is true with "stacktrace". Also update the documentation to reflect this change. Link: https://lore.kernel.org/linux-trace-kernel/20230523230913.6860e28d@rorschach.local.home Cc: Masami Hiramatsu Cc: Tom Zanussi Cc: Mark Rutland Signed-off-by: Steven Rostedt (Google) commit d6c36cbc5e533f48bd89a7b5f339bd82b8b4378a Author: Sebastian Andrzej Siewior Date: Mon May 22 15:41:21 2023 +0200 r8169: Use a raw_spinlock_t for the register locks. The driver's interrupt service routine is requested with the IRQF_NO_THREAD if MSI is available. This means that the routine is invoked in hardirq context even on PREEMPT_RT. The routine itself is relatively short and schedules a worker, performs register access and schedules NAPI. On PREEMPT_RT, scheduling NAPI from hardirq results in waking ksoftirqd for further processing so using NAPI threads with this driver is highly recommended since it NULL routes the threaded-IRQ efforts. Adding rtl_hw_aspm_clkreq_enable() to the ISR is problematic on PREEMPT_RT because the function uses spinlock_t locks which become sleeping locks on PREEMPT_RT. The locks are only used to protect register access and don't nest into other functions or locks. They are also not used for unbounded period of time. Therefore it looks okay to convert them to raw_spinlock_t. Convert the three locks which are used from the interrupt service routine to raw_spinlock_t. Fixes: e1ed3e4d9111 ("r8169: disable ASPM during NAPI poll") Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Heiner Kallweit Link: https://lore.kernel.org/r/20230522134121.uxjax0F5@linutronix.de Signed-off-by: Jakub Kicinski commit 368d3cb406cdd074d1df2ad9ec06d1bfcb664882 Author: Yunsheng Lin Date: Mon May 22 11:17:14 2023 +0800 page_pool: fix inconsistency for page_pool_ring_[un]lock() page_pool_ring_[un]lock() use in_softirq() to decide which spin lock variant to use, and when they are called in the context with in_softirq() being false, spin_lock_bh() is called in page_pool_ring_lock() while spin_unlock() is called in page_pool_ring_unlock(), because spin_lock_bh() has disabled the softirq in page_pool_ring_lock(), which causes inconsistency for spin lock pair calling. This patch fixes it by returning in_softirq state from page_pool_producer_lock(), and use it to decide which spin lock variant to use in page_pool_producer_unlock(). As pool->ring has both producer and consumer lock, so rename it to page_pool_producer_[un]lock() to reflect the actual usage. Also move them to page_pool.c as they are only used there, and remove the 'inline' as the compiler may have better idea to do inlining or not. Fixes: 7886244736a4 ("net: page_pool: Add bulk support for ptr_ring") Signed-off-by: Yunsheng Lin Acked-by: Jesper Dangaard Brouer Acked-by: Ilias Apalodimas Link: https://lore.kernel.org/r/20230522031714.5089-1-linyunsheng@huawei.com Signed-off-by: Jakub Kicinski commit e30fbc618e97b38dbb49f1d44dcd0778d3f23b8c Author: Steven Rostedt (Google) Date: Tue May 23 22:11:08 2023 -0400 tracing/histograms: Allow variables to have some modifiers Modifiers are used to change the behavior of keys. For instance, they can grouped into buckets, converted to syscall names (from the syscall identifier), show task->comm of the current pid, be an array of longs that represent a stacktrace, and more. It was found that nothing stopped a value from taking a modifier. As values are simple counters. If this happened, it would call code that was not expecting a modifier and crash the kernel. This was fixed by having the ___create_val_field() function test if a modifier was present and fail if one was. This fixed the crash. Now there's a problem with variables. Variables are used to pass fields from one event to another. Variables are allowed to have some modifiers, as the processing may need to happen at the time of the event (like stacktraces and comm names of the current pid). The issue is that it too uses __create_val_field(). Now that fails on modifiers, variables can no longer use them (this is a regression). As not all modifiers are for variables, have them use a separate check. Link: https://lore.kernel.org/linux-trace-kernel/20230523221108.064a5d82@rorschach.local.home Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Tom Zanussi Cc: Mark Rutland Fixes: e0213434fe3e4 ("tracing: Do not let histogram values have some modifiers") Signed-off-by: Steven Rostedt (Google) commit 9d646009f65d62d32815f376465a3b92d8d9b046 Merge: 27e462c8fad4b 95a9359ee22ff Author: Linus Torvalds Date: Tue May 23 19:18:06 2023 -0700 Merge tag 'tpmdd-v6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm fix from Jarkko Sakkinen: "A fix to add a new entry to the deny for list for tpm_tis interrupts" * tag 'tpmdd-v6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm: tpm_tis: Disable interrupts for AEON UPX-i11 commit ff9e1632d69e596d8ca256deb07433a8f3565038 Author: Beau Belgrave Date: Fri May 19 16:07:41 2023 -0700 tracing/user_events: Document user_event_mm one-shot list usage During 6.4 development it became clear that the one-shot list used by the user_event_mm's next field was confusing to others. It is not clear how this list is protected or what the next field usage is for unless you are familiar with the code. Add comments into the user_event_mm struct indicating lock requirement and usage. Also document how and why this approach was used via comments in both user_event_enabler_update() and user_event_mm_get_all() and the rules to properly use it. Link: https://lkml.kernel.org/r/20230519230741.669-5-beaub@linux.microsoft.com Link: https://lore.kernel.org/linux-trace-kernel/CAHk-=wicngggxVpbnrYHjRTwGE0WYscPRM+L2HO2BF8ia1EXgQ@mail.gmail.com/ Suggested-by: Linus Torvalds Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit dcbd1ac2668b5fa02069ea96d581ca3f70a7543c Author: Beau Belgrave Date: Fri May 19 16:07:40 2023 -0700 tracing/user_events: Rename link fields for clarity Currently most list_head fields of various structs within user_events are simply named link. This causes folks to keep additional context in their head when working with the code, which can be confusing. Instead of using link, describe what the actual link is, for example: list_del_rcu(&mm->link); Changes into: list_del_rcu(&mm->mms_link); The reader now is given a hint the link is to the mms global list instead of having to remember or spot check within the code. Link: https://lkml.kernel.org/r/20230519230741.669-4-beaub@linux.microsoft.com Link: https://lore.kernel.org/linux-trace-kernel/CAHk-=wicngggxVpbnrYHjRTwGE0WYscPRM+L2HO2BF8ia1EXgQ@mail.gmail.com/ Suggested-by: Linus Torvalds Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit aaecdaf922835ed9a8ce56cdd9a8d40fe630257a Author: Linus Torvalds Date: Fri May 19 16:07:39 2023 -0700 tracing/user_events: Remove RCU lock while pinning pages pin_user_pages_remote() can reschedule which means we cannot hold any RCU lock while using it. Now that enablers are not exposed out to the tracing register callbacks during fork(), there is clearly no need to require the RCU lock as event_mutex is enough to protect changes. Remove unneeded RCU usages when pinning pages and walking enablers with event_mutex held. Cleanup a misleading "safe" list walk that is not needed. During fork() duplication, remove unneeded RCU list add, since the list is not exposed yet. Link: https://lkml.kernel.org/r/20230519230741.669-3-beaub@linux.microsoft.com Link: https://lore.kernel.org/linux-trace-kernel/CAHk-=wiiBfT4zNS29jA0XEsy8EmbqTH1hAPdRJCDAJMD8Gxt5A@mail.gmail.com/ Fixes: 7235759084a4 ("tracing/user_events: Use remote writes for event enablement") Signed-off-by: Linus Torvalds [ change log written by Beau Belgrave ] Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 3e0fea09b17fa2255f6cb0108bbffd4a505f8925 Author: Linus Torvalds Date: Fri May 19 16:07:38 2023 -0700 tracing/user_events: Split up mm alloc and attach When a new mm is being created in a fork() path it currently is allocated and then attached in one go. This leaves the mm exposed out to the tracing register callbacks while any parent enabler locations are copied in. This should not happen. Split up mm alloc and attach as unique operations. When duplicating enablers, first alloc, then duplicate, and only upon success, attach. This prevents any timing window outside of the event_reg mutex for enablement walking. This allows for dropping RCU requirement for enablement walking in later patches. Link: https://lkml.kernel.org/r/20230519230741.669-2-beaub@linux.microsoft.com Link: https://lore.kernel.org/linux-trace-kernel/CAHk-=whTBvXJuoi_kACo3qi5WZUmRrhyA-_=rRFsycTytmB6qw@mail.gmail.com/ Signed-off-by: Linus Torvalds [ change log written by Beau Belgrave ] Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 95a9359ee22ff2efbad6b090fcfa3a97f5902f95 Author: Peter Ujfalusi Date: Wed May 17 15:29:31 2023 +0300 tpm: tpm_tis: Disable interrupts for AEON UPX-i11 Interrupts got recently enabled for tpm_tis. The interrupts initially works on the device but they will stop arriving after circa ~200 interrupts. On system reboot/shutdown this will cause a long wait (120000 jiffies). [jarkko@kernel.org: fix a merge conflict and adjust the commit message] Fixes: e644b2f498d2 ("tpm, tpm_tis: Enable interrupt test") Signed-off-by: Peter Ujfalusi Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 27e462c8fad4bf04ec4f81f8539ce6fa947ead3a Merge: 5fe326b446768 034f4a7877c32 Author: Linus Torvalds Date: Tue May 23 15:21:34 2023 -0700 Merge tag 'xtensa-20230523' of https://github.com/jcmvbkbc/linux-xtensa Pull Xtensa fixes from Max Filippov: - fix signal delivery to FDPIC process - add __bswap{si,di}2 helpers * tag 'xtensa-20230523' of https://github.com/jcmvbkbc/linux-xtensa: xtensa: add __bswap{si,di}2 helpers xtensa: fix signal delivery to FDPIC process commit 4be47a5d59cbc9396a6ffd327913eb4c8d67a32f Author: Daniel Golle Date: Mon May 1 19:33:14 2023 +0100 spi: mt65xx: make sure operations completed before unloading When unloading the spi-mt65xx kernel module during an ongoing spi-mem operation the kernel will Oops shortly after unloading the module. This is because wait_for_completion_timeout was still running and returning into the no longer loaded module: Internal error: Oops: 0000000096000005 [#1] SMP Modules linked in: [many, but spi-mt65xx is no longer there] CPU: 0 PID: 2578 Comm: block Tainted: G W O 6.3.0-next-20230428+ #0 Hardware name: Bananapi BPI-R3 (DT) pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __lock_acquire+0x18c/0x20e8 lr : __lock_acquire+0x9b8/0x20e8 sp : ffffffc009ec3400 x29: ffffffc009ec3400 x28: 0000000000000001 x27: 0000000000000004 x26: ffffff80082888c8 x25: 0000000000000000 x24: 0000000000000000 x23: ffffffc009609da8 x22: ffffff8008288000 x21: ffffff8008288968 x20: 00000000000003c2 x19: ffffff8008be7990 x18: 00000000000002af x17: 0000000000000000 x16: 0000000000000000 x15: ffffffc008d78970 x14: 000000000000080d x13: 00000000000002af x12: 00000000ffffffea x11: 00000000ffffefff x10: ffffffc008dd0970 x9 : ffffffc008d78918 x8 : 0000000000017fe8 x7 : 0000000000000001 x6 : 0000000000000000 x5 : ffffff807fb53910 x4 : 0000000000000000 x3 : 0000000000000027 x2 : 0000000000000027 x1 : 0000000000000000 x0 : 00000000000c03c2 Call trace: __lock_acquire+0x18c/0x20e8 lock_acquire+0x100/0x2a4 _raw_spin_lock_irq+0x58/0x74 __wait_for_common+0xe0/0x1b4 wait_for_completion_timeout+0x1c/0x24 0xffffffc000acc8a4 <--- used to be mtk_spi_transfer_wait spi_mem_exec_op+0x390/0x3ec spi_mem_no_dirmap_read+0x6c/0x88 spi_mem_dirmap_read+0xcc/0x12c spinand_read_page+0xf8/0x1dc spinand_mtd_read+0x1b4/0x2fc mtd_read_oob_std+0x58/0x7c mtd_read_oob+0x8c/0x148 mtd_read+0x50/0x6c ... Prevent this by completing in mtk_spi_remove if needed. Fixes: 9f763fd20da7 ("spi: mediatek: add spi memory support for ipm design") Signed-off-by: Daniel Golle Link: https://lore.kernel.org/r/ZFAF6pJxMu1z6k4w@makrotopia.org Signed-off-by: Mark Brown commit feee70f4568650cf44c573488798ffc0a2faeea3 Author: Ismael Ferreras Morezuelas Date: Tue May 23 14:45:10 2023 -0700 Input: xpad - delete a Razer DeathAdder mouse VID/PID entry While doing my research to improve the xpad device names I noticed that the 1532:0037 VID/PID seems to be used by the DeathAdder 2013, so that Razer Sabertooth instance looked wrong and very suspect to me. I didn't see any mention in the official drivers, either. After doing more research, it turns out that the xpad list is used by many other projects (like Steam) as-is [1], this issue was reported [2] and Valve/Sam Lantinga fixed it [3]: [1]: https://github.com/libsdl-org/SDL/blob/dcc5eef0e2395854b254ea2873a4899edab347c6/src/joystick/controller_type.h#L251 [2]: https://steamcommunity.com/app/353380/discussions/0/1743392486228754770/ [3]: https://hg.libsdl.org/SDL/rev/29809f6f0271 (With multiple Internet users reporting similar issues, not linked here) After not being able to find the correct VID/PID combination anywhere on the Internet and not receiving any reply from Razer support I did some additional detective work, it seems like it presents itself as "Razer Sabertooth Gaming Controller (XBOX360)", code 1689:FE00. Leaving us with this: * Razer Sabertooth (1689:fe00) * Razer Sabertooth Elite (24c6:5d04) * Razer DeathAdder 2013 (1532:0037) [note: not a gamepad] So, to sum things up; remove this conflicting/duplicate entry: { 0x1532, 0x0037, "Razer Sabertooth", 0, XTYPE_XBOX360 }, As the real/correct one is already present there, even if the Internet as a whole insists on presenting it as the Razer Sabertooth Elite, which (by all accounts) is not: { 0x1689, 0xfe00, "Razer Sabertooth", 0, XTYPE_XBOX360 }, Actual change in SDL2 referencing this kernel issue: https://github.com/libsdl-org/SDL/commit/e5e54169754ca5d3e86339d968b20126d9da0a15 For more information of the device, take a look here: https://github.com/xboxdrv/xboxdrv/pull/59 You can see a lsusb dump here: https://github.com/xboxdrv/xboxdrv/files/76581/Qa6dBcrv.txt Fixes: f554f619b70 ("Input: xpad - sync device IDs with xboxdrv") Signed-off-by: Ismael Ferreras Morezuelas Reviewed-by: Cameron Gutman Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/5c12dbdb-5774-fc68-5c58-ca596383663e@gmail.com Signed-off-by: Dmitry Torokhov commit 011a8719d6105dcb48077ea7a6a88ac019d4aa50 Author: Maxim Kochetkov Date: Fri May 12 14:03:42 2023 +0300 ASoC: dwc: move DMA init to snd_soc_dai_driver probe() When using DMA mode we are facing with Oops: [ 396.458157] Unable to handle kernel access to user memory without uaccess routines at virtual address 000000000000000c [ 396.469374] Oops [#1] [ 396.471839] Modules linked in: [ 396.475144] CPU: 0 PID: 114 Comm: arecord Not tainted 6.0.0-00164-g9a8eccdaf2be-dirty #68 [ 396.483619] Hardware name: YMP ELCT FPGA (DT) [ 396.488156] epc : dmaengine_pcm_open+0x1d2/0x342 [ 396.493227] ra : dmaengine_pcm_open+0x1d2/0x342 [ 396.498140] epc : ffffffff807fe346 ra : ffffffff807fe346 sp : ffffffc804e138f0 [ 396.505602] gp : ffffffff817bf730 tp : ffffffd8042c8ac0 t0 : 6500000000000000 [ 396.513045] t1 : 0000000000000064 t2 : 656e69676e65616d s0 : ffffffc804e13990 [ 396.520477] s1 : ffffffd801b86a18 a0 : 0000000000000026 a1 : ffffffff816920f8 [ 396.527897] a2 : 0000000000000010 a3 : fffffffffffffffe a4 : 0000000000000000 [ 396.535319] a5 : 0000000000000000 a6 : ffffffd801b87040 a7 : 0000000000000038 [ 396.542740] s2 : ffffffd801b94a00 s3 : 0000000000000000 s4 : ffffffd80427f5e8 [ 396.550153] s5 : ffffffd80427f5e8 s6 : ffffffd801b44410 s7 : fffffffffffffff5 [ 396.557569] s8 : 0000000000000800 s9 : 0000000000000001 s10: ffffffff8066d254 [ 396.564978] s11: ffffffd8059cf768 t3 : ffffffff817d5577 t4 : ffffffff817d5577 [ 396.572391] t5 : ffffffff817d5578 t6 : ffffffc804e136e8 [ 396.577876] status: 0000000200000120 badaddr: 000000000000000c cause: 000000000000000d [ 396.586007] [] snd_soc_component_open+0x1a/0x68 [ 396.592439] [] __soc_pcm_open+0xf0/0x502 [ 396.598217] [] soc_pcm_open+0x2e/0x4e [ 396.603741] [] snd_pcm_open_substream+0x442/0x68e [ 396.610313] [] snd_pcm_open+0xfa/0x212 [ 396.615868] [] snd_pcm_capture_open+0x3a/0x60 [ 396.622048] [] snd_open+0xa8/0x17a [ 396.627421] [] chrdev_open+0xa0/0x218 [ 396.632893] [] do_dentry_open+0x17c/0x2a6 [ 396.638713] [] vfs_open+0x1e/0x26 [ 396.643850] [] path_openat+0x96e/0xc96 [ 396.649518] [] do_filp_open+0x7c/0xf6 [ 396.655034] [] do_sys_openat2+0x8a/0x11e [ 396.660765] [] sys_openat+0x50/0x7c [ 396.666068] [] ret_from_syscall+0x0/0x2 [ 396.674964] ---[ end trace 0000000000000000 ]--- It happens because of play_dma_data/capture_dma_data pointers are NULL. Current implementation assigns these pointers at snd_soc_dai_driver startup() callback and reset them back to NULL at shutdown(). But soc_pcm_open() sequence uses DMA pointers in dmaengine_pcm_open() before snd_soc_dai_driver startup(). Most generic DMA capable I2S drivers use snd_soc_dai_driver probe() callback to init DMA pointers only once at probe. So move DMA init to dw_i2s_dai_probe and drop shutdown() and startup() callbacks. Signed-off-by: Maxim Kochetkov Link: https://lore.kernel.org/r/20230512110343.66664-1-fido_max@inbox.ru Signed-off-by: Mark Brown commit 4ef4aee67eed640064fff95a693c0184cedb7bec Author: David Howells Date: Tue May 23 13:48:41 2023 +0100 cifs: Fix cifs_limit_bvec_subset() to correctly check the maxmimum size Fix cifs_limit_bvec_subset() so that it limits the span to the maximum specified and won't return with a size greater than max_size. Fixes: d08089f649a0 ("cifs: Change the I/O paths to use an iterator rather than a page list") Cc: stable@vger.kernel.org # 6.3 Reported-by: Shyam Prasad N Reviewed-by: Shyam Prasad N Signed-off-by: David Howells cc: Steve French cc: Rohith Surabattula cc: Paulo Alcantara cc: Tom Talpey cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Steve French commit 4752354af71043e6fd72ef5490ed6da39e6cab4a Author: Yan Zhao Date: Fri May 19 14:58:43 2023 +0800 vfio/type1: check pfn valid before converting to struct page Check physical PFN is valid before converting the PFN to a struct page pointer to be returned to caller of vfio_pin_pages(). vfio_pin_pages() pins user pages with contiguous IOVA. If the IOVA of a user page to be pinned belongs to vma of vm_flags VM_PFNMAP, pin_user_pages_remote() will return -EFAULT without returning struct page address for this PFN. This is because usually this kind of PFN (e.g. MMIO PFN) has no valid struct page address associated. Upon this error, vaddr_get_pfns() will obtain the physical PFN directly. While previously vfio_pin_pages() returns to caller PFN arrays directly, after commit 34a255e67615 ("vfio: Replace phys_pfn with pages for vfio_pin_pages()"), PFNs will be converted to "struct page *" unconditionally and therefore the returned "struct page *" array may contain invalid struct page addresses. Given current in-tree users of vfio_pin_pages() only expect "struct page * returned, check PFN validity and return -EINVAL to let the caller be aware of IOVAs to be pinned containing PFN not able to be returned in "struct page *" array. So that, the caller will not consume the returned pointer (e.g. test PageReserved()) and avoid error like "supervisor read access in kernel mode". Fixes: 34a255e67615 ("vfio: Replace phys_pfn with pages for vfio_pin_pages()") Cc: Sean Christopherson Reviewed-by: Jason Gunthorpe Signed-off-by: Yan Zhao Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20230519065843.10653-1-yan.y.zhao@intel.com Signed-off-by: Alex Williamson commit 320805ab61e5f1e2a5729ae266e16bec2904050c Author: Michael Kelley Date: Thu May 18 08:13:52 2023 -0700 Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs vmbus_wait_for_unload() may be called in the panic path after other CPUs are stopped. vmbus_wait_for_unload() currently loops through online CPUs looking for the UNLOAD response message. But the values of CONFIG_KEXEC_CORE and crash_kexec_post_notifiers affect the path used to stop the other CPUs, and in one of the paths the stopped CPUs are removed from cpu_online_mask. This removal happens in both x86/x64 and arm64 architectures. In such a case, vmbus_wait_for_unload() only checks the panic'ing CPU, and misses the UNLOAD response message except when the panic'ing CPU is CPU 0. vmbus_wait_for_unload() eventually times out, but only after waiting 100 seconds. Fix this by looping through *present* CPUs in vmbus_wait_for_unload(). The cpu_present_mask is not modified by stopping the other CPUs in the panic path, nor should it be. Also, in a CoCo VM the synic_message_page is not allocated in hv_synic_alloc(), but is set and cleared in hv_synic_enable_regs() and hv_synic_disable_regs() such that it is set only when the CPU is online. If not all present CPUs are online when vmbus_wait_for_unload() is called, the synic_message_page might be NULL. Add a check for this. Fixes: cd95aad55793 ("Drivers: hv: vmbus: handle various crash scenarios") Cc: stable@vger.kernel.org Reported-by: John Starks Signed-off-by: Michael Kelley Reviewed-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/1684422832-38476-1-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 9728fb3ce11729aa8c276825ddf504edeb00611d Author: Clark Wang Date: Fri May 5 14:35:57 2023 +0800 spi: lpspi: disable lpspi module irq in DMA mode When all bits of IER are set to 0, we still can observe the lpspi irq events when using DMA mode to transfer data. So disable irq to avoid the too much irq events. Signed-off-by: Clark Wang Link: https://lore.kernel.org/r/20230505063557.3962220-1-xiaoning.wang@nxp.com Signed-off-by: Mark Brown commit e2d035f5a7d597bbabc268e236ec6c0408c4af0e Author: Stefan Binding Date: Fri Apr 14 16:25:51 2023 +0100 ASoC: cs35l41: Fix default regmap values for some registers Several values do not match the defaults of CS35L41, fix them. Signed-off-by: Stefan Binding Acked-by: Mark Brown Link: https://lore.kernel.org/r/20230414152552.574502-4-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown commit 5fe326b4467689ef3690491ee2ad25ff4d81fe59 Merge: ae8373a5add4e cf7f2732b4b83 Author: Linus Torvalds Date: Tue May 23 10:47:32 2023 -0700 Merge tag 'erofs-for-6.4-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs fixes from Gao Xiang: "One patch addresses a null-ptr-deref issue reported by syzbot weeks ago, which is caused by the new long xattr name prefix feature and needs to be fixed. The remaining two patches are minor cleanups to avoid unnecessary compilation and adjust per-cpu kworker configuration. Summary: - Fix null-ptr-deref related to long xattr name prefixes - Avoid pcpubuf compilation if CONFIG_EROFS_FS_ZIP is off - Use high priority kthreads by default if per-cpu kthread workers are enabled" * tag 'erofs-for-6.4-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: use HIPRI by default if per-cpu kthreads are enabled erofs: avoid pcpubuf.c inclusion if CONFIG_EROFS_FS_ZIP is off erofs: fix null-ptr-deref caused by erofs_xattr_prefixes_init commit 46930b7cc7727271c9c27aac1fdc97a8645e2d00 Author: Anuj Gupta Date: Tue May 23 16:47:09 2023 +0530 block: fix bio-cache for passthru IO commit <8af870aa5b847> ("block: enable bio caching use for passthru IO") introduced bio-cache for passthru IO. In case when nr_vecs are greater than BIO_INLINE_VECS, bio and bvecs are allocated from mempool (instead of percpu cache) and REQ_ALLOC_CACHE is cleared. This causes the side effect of not freeing bio/bvecs into mempool on completion. This patch lets the passthru IO fallback to allocation using bio_kmalloc when nr_vecs are greater than BIO_INLINE_VECS. The corresponding bio is freed during call to blk_mq_map_bio_put during completion. Cc: stable@vger.kernel.org # 6.1 fixes <8af870aa5b847> ("block: enable bio caching use for passthru IO") Signed-off-by: Anuj Gupta Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20230523111709.145676-1-anuj20.g@samsung.com Signed-off-by: Jens Axboe commit da8d2fe717db06c9cf36b51e4628b2c0ece35b43 Author: Paolo Valente Date: Tue May 23 11:17:24 2023 +0200 block, bfq: update Paolo's address in maintainer list Current email address of Paolo Valente is no longer valid, use a good one. Signed-off-by: Paolo Valente Link: https://lore.kernel.org/r/20230523091724.26636-1-paolo.valente@unimore.it Signed-off-by: Jens Axboe commit 3e94d54e83cafd2b562bb6d15bb2f72d76200fb5 Author: Tian Lan Date: Mon May 22 17:05:55 2023 -0400 blk-mq: fix race condition in active queue accounting If multiple CPUs are sharing the same hardware queue, it can cause leak in the active queue counter tracking when __blk_mq_tag_busy() is executed simultaneously. Fixes: ee78ec1077d3 ("blk-mq: blk_mq_tag_busy is no need to return a value") Signed-off-by: Tian Lan Reviewed-by: Ming Lei Reviewed-by: Damien Le Moal Reviewed-by: John Garry Link: https://lore.kernel.org/r/20230522210555.794134-1-tilan7663@gmail.com Signed-off-by: Jens Axboe commit 8a2b20a997a3779ae9fcae268f2959eb82ec05a1 Author: Yu Kuai Date: Mon May 22 20:18:54 2023 +0800 blk-wbt: fix that wbt can't be disabled by default commit b11d31ae01e6 ("blk-wbt: remove unnecessary check in wbt_enable_default()") removes the checking of CONFIG_BLK_WBT_MQ by mistake, which is used to control enable or disable wbt by default. Fix the problem by adding back the checking. This patch also do a litter cleanup to make related code more readable. Fixes: b11d31ae01e6 ("blk-wbt: remove unnecessary check in wbt_enable_default()") Reported-by: Lukas Bulwahn Link: https://lore.kernel.org/lkml/CAKXUXMzfKq_J9nKHGyr5P5rvUETY4B-fxoQD4sO+NYjFOfVtZA@mail.gmail.com/t/ Signed-off-by: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230522121854.2928880-1-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe commit b6405f0829d7b1dd926ba3ca5f691cab835abfaa Author: Helge Deller Date: Fri May 19 12:12:06 2023 +0200 parisc: Use num_present_cpus() in alternative patching code When patching the kernel code some alternatives depend on SMP vs. !SMP. Use the value of num_present_cpus() instead of num_online_cpus() to decide, otherwise we may run into issues if and additional CPU is enabled after having loaded a module while only one CPU was enabled. Signed-off-by: Helge Deller Cc: # v6.1+ commit 632478a05821bc1c9b55c3a1dd0fb1be7bfa1acc Author: Daniel Bristot de Oliveira Date: Thu May 11 18:32:01 2023 +0200 tracing/timerlat: Always wakeup the timerlat thread While testing rtla timerlat auto analysis, I reach a condition where the interface was not receiving tracing data. I was able to manually reproduce the problem with these steps: # echo 0 > tracing_on # disable trace # echo 1 > osnoise/stop_tracing_us # stop trace if timerlat irq > 1 us # echo timerlat > current_tracer # enable timerlat tracer # sleep 1 # wait... that is the time when rtla # apply configs like prio or cgroup # echo 1 > tracing_on # start tracing # cat trace # tracer: timerlat # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / _-=> migrate-disable # |||| / delay # ||||| ACTIVATION # TASK-PID CPU# ||||| TIMESTAMP ID CONTEXT LATENCY # | | | ||||| | | | | NOTHING! Then, trying to enable tracing again with echo 1 > tracing_on resulted in no change: the trace was still not tracing. This problem happens because the timerlat IRQ hits the stop tracing condition while tracing is off, and do not wake up the timerlat thread, so the timerlat threads are kept sleeping forever, resulting in no trace, even after re-enabling the tracer. Avoid this condition by always waking up the threads, even after stopping tracing, allowing the tracer to return to its normal operating after a new tracing on. Link: https://lore.kernel.org/linux-trace-kernel/1ed8f830638b20a39d535d27d908e319a9a3c4e2.1683822622.git.bristot@kernel.org Cc: Juri Lelli Cc: stable@vger.kernel.org Fixes: a955d7eac177 ("trace: Add timerlat tracer") Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit e997c218ad736fd6f524d73a987bad9d94128d3d Author: Jeffrey Hugo Date: Wed May 17 13:35:40 2023 -0600 accel/qaic: Fix NNC message corruption If msg_xfer() is unable to queue part of a NNC message because the MHI ring is full, it will attempt to give the QSM some time to drain the queue. However, if QSM fails to make any room, msg_xfer() will fail and tell the caller to try again. This is problematic because part of the message may have been committed to the ring and there is no mechanism to revoke that content. This will cause QSM to receive a corrupt message. The better way to do this is to check if the ring has enough space for the entire message before committing any of the message. Since msg_xfer() is under the cntl_mutex no one else can come in and consume the space. Fixes: 129776ac2e38 ("accel/qaic: Add control path") Signed-off-by: Jeffrey Hugo Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Carl Vanderlip Link: https://patchwork.freedesktop.org/patch/msgid/20230517193540.14323-6-quic_jhugo@quicinc.com commit 75af0a585af93183ba68bb1b45d0d7a61e963712 Author: Pranjal Ramajor Asha Kanojiya Date: Wed May 17 13:35:39 2023 -0600 accel/qaic: Grab ch_lock during QAIC_ATTACH_SLICE_BO During QAIC_ATTACH_SLICE_BO, we associate a BO to its DBC. We need to grab the dbc->ch_lock to make sure that DBC does not goes away while QAIC_ATTACH_SLICE_BO is still running. Fixes: ff13be830333 ("accel/qaic: Add datapath") Signed-off-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Carl Vanderlip Reviewed-by: Jeffrey Hugo Signed-off-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20230517193540.14323-5-quic_jhugo@quicinc.com commit faa7c4eee412ca14dd6a107cb6122d31c4277cbe Author: Pranjal Ramajor Asha Kanojiya Date: Wed May 17 13:35:38 2023 -0600 accel/qaic: Flush the transfer list again Before calling synchronize_srcu() we clear the transfer list, this is to allow all the QAIC_WAIT_BO callers to exit otherwise the system could deadlock. There could be a corner case where more elements get added to transfer list after we have flushed it. Re-flush the transfer list once all the holders of dbc->ch_lock have completed execution i.e. synchronize_srcu() is complete. Fixes: ff13be830333 ("accel/qaic: Add datapath") Signed-off-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Carl Vanderlip Reviewed-by: Jeffrey Hugo Signed-off-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20230517193540.14323-4-quic_jhugo@quicinc.com commit 2e0904efc945ed5b04a9b251b9cefdd6754f5e15 Author: Pranjal Ramajor Asha Kanojiya Date: Wed May 17 13:35:37 2023 -0600 accel/qaic: Validate if BO is sliced before slicing QAIC_ATTACH_SLICE_BO attaches slicing configuration to a BO. Validate if given BO is already sliced. An already sliced BO cannot be sliced again. Fixes: ff13be830333 ("accel/qaic: Add datapath") Signed-off-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Carl Vanderlip Reviewed-by: Jeffrey Hugo Signed-off-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20230517193540.14323-3-quic_jhugo@quicinc.com commit d3b277b7aa1c74a65c84019b8fbe7856f841841a Author: Pranjal Ramajor Asha Kanojiya Date: Wed May 17 13:35:36 2023 -0600 accel/qaic: Validate user data before grabbing any lock Validating user data does not need to be protected by any lock and it is safe to move it out of critical region. Fixes: ff13be830333 ("accel/qaic: Add datapath") Fixes: 129776ac2e38 ("accel/qaic: Add control path") Signed-off-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Carl Vanderlip Reviewed-by: Jeffrey Hugo Signed-off-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20230517193540.14323-2-quic_jhugo@quicinc.com commit 0e163e54c34c12369ccf6562e74e8f0a800f4aad Author: Tom Rix Date: Wed May 17 10:56:05 2023 -0600 accel/qaic: initialize ret variable to 0 clang static analysis reports drivers/accel/qaic/qaic_data.c:610:2: warning: Undefined or garbage value returned to caller [core.uninitialized.UndefReturn] return ret; ^~~~~~~~~~ From a code analysis of the function, the ret variable is only set some of the time but is always returned. This suggests ret can return uninitialized garbage. However BO allocation will ensure ret is always set in reality. Initialize ret to 0 to silence the warning. Fixes: ff13be830333 ("accel/qaic: Add datapath") Signed-off-by: Tom Rix [jhugo: Reword commit text] Signed-off-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya Link: https://patchwork.freedesktop.org/patch/msgid/20230517165605.16770-1-quic_jhugo@quicinc.com commit ee7751b564a90f337330efc1221df40647d68756 Author: Beau Belgrave Date: Fri May 5 13:58:55 2023 -0700 tracing/user_events: Use long vs int for atomic bit ops Each event stores a int to track which bit to set/clear when enablement changes. On big endian 64-bit configurations, it's possible this could cause memory corruption when it's used for atomic bit operations. Use unsigned long for enablement values to ensure any possible corruption cannot occur. Downcast to int after mask for the bit target. Link: https://lore.kernel.org/all/6f758683-4e5e-41c3-9b05-9efc703e827c@kili.mountain/ Link: https://lore.kernel.org/linux-trace-kernel/20230505205855.6407-1-beaub@linux.microsoft.com Fixes: dcb8177c1395 ("tracing/user_events: Add ioctl for disabling addresses") Reported-by: Dan Carpenter Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit f726e03564ef4e754dd93beb54303e2e1671049e Author: John Fastabend Date: Mon May 22 19:56:18 2023 -0700 bpf, sockmap: Test progs verifier error with latest clang With a relatively recent clang (7090c10273119) and with this commit to fix warnings in selftests (c8ed668593972) that uses __sink(err) to resolve unused variables. We get the following verifier error. root@6e731a24b33a:/host/tools/testing/selftests/bpf# ./test_sockmap libbpf: prog 'bpf_sockmap': BPF program load failed: Permission denied libbpf: prog 'bpf_sockmap': -- BEGIN PROG LOAD LOG -- 0: R1=ctx(off=0,imm=0) R10=fp0 ; op = (int) skops->op; 0: (61) r2 = *(u32 *)(r1 +0) ; R1=ctx(off=0,imm=0) R2_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) ; switch (op) { 1: (16) if w2 == 0x4 goto pc+5 ; R2_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) 2: (56) if w2 != 0x5 goto pc+15 ; R2_w=5 ; lport = skops->local_port; 3: (61) r2 = *(u32 *)(r1 +68) ; R1=ctx(off=0,imm=0) R2_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) ; if (lport == 10000) { 4: (56) if w2 != 0x2710 goto pc+13 18: R1=ctx(off=0,imm=0) R2=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) R10=fp0 ; __sink(err); 18: (bc) w1 = w0 R0 !read_ok processed 18 insns (limit 1000000) max_states_per_insn 0 total_states 2 peak_states 2 mark_read 1 -- END PROG LOAD LOG -- libbpf: prog 'bpf_sockmap': failed to load: -13 libbpf: failed to load object 'test_sockmap_kern.bpf.o' load_bpf_file: (-1) No such file or directory ERROR: (-1) load bpf failed libbpf: prog 'bpf_sockmap': BPF program load failed: Permission denied libbpf: prog 'bpf_sockmap': -- BEGIN PROG LOAD LOG -- 0: R1=ctx(off=0,imm=0) R10=fp0 ; op = (int) skops->op; 0: (61) r2 = *(u32 *)(r1 +0) ; R1=ctx(off=0,imm=0) R2_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) ; switch (op) { 1: (16) if w2 == 0x4 goto pc+5 ; R2_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) 2: (56) if w2 != 0x5 goto pc+15 ; R2_w=5 ; lport = skops->local_port; 3: (61) r2 = *(u32 *)(r1 +68) ; R1=ctx(off=0,imm=0) R2_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) ; if (lport == 10000) { 4: (56) if w2 != 0x2710 goto pc+13 18: R1=ctx(off=0,imm=0) R2=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) R10=fp0 ; __sink(err); 18: (bc) w1 = w0 R0 !read_ok processed 18 insns (limit 1000000) max_states_per_insn 0 total_states 2 peak_states 2 mark_read 1 -- END PROG LOAD LOG -- libbpf: prog 'bpf_sockmap': failed to load: -13 libbpf: failed to load object 'test_sockhash_kern.bpf.o' load_bpf_file: (-1) No such file or directory ERROR: (-1) load bpf failed libbpf: prog 'bpf_sockmap': BPF program load failed: Permission denied libbpf: prog 'bpf_sockmap': -- BEGIN PROG LOAD LOG -- 0: R1=ctx(off=0,imm=0) R10=fp0 ; op = (int) skops->op; 0: (61) r2 = *(u32 *)(r1 +0) ; R1=ctx(off=0,imm=0) R2_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) ; switch (op) { 1: (16) if w2 == 0x4 goto pc+5 ; R2_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) 2: (56) if w2 != 0x5 goto pc+15 ; R2_w=5 ; lport = skops->local_port; 3: (61) r2 = *(u32 *)(r1 +68) ; R1=ctx(off=0,imm=0) R2_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) ; if (lport == 10000) { 4: (56) if w2 != 0x2710 goto pc+13 18: R1=ctx(off=0,imm=0) R2=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) R10=fp0 ; __sink(err); 18: (bc) w1 = w0 R0 !read_ok processed 18 insns (limit 1000000) max_states_per_insn 0 total_states 2 peak_states 2 mark_read 1 -- END PROG LOAD LOG -- To fix simply remove the err value because its not actually used anywhere in the testing. We can investigate the root cause later. Future patch should probably actually test the err value as well. Although if the map updates fail they will get caught eventually by userspace. Fixes: c8ed668593972 ("selftests/bpf: fix lots of silly mistakes pointed out by compiler") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20230523025618.113937-15-john.fastabend@gmail.com commit 80e24d22267597b2ace54686735e3c4cb26a523f Author: John Fastabend Date: Mon May 22 19:56:17 2023 -0700 bpf, sockmap: Test FIONREAD returns correct bytes in rx buffer with drops When BPF program drops pkts the sockmap logic 'eats' the packet and updates copied_seq. In the PASS case where the sk_buff is accepted we update copied_seq from recvmsg path so we need a new test to handle the drop case. Original patch series broke this resulting in test_sockmap_skb_verdict_fionread:PASS:ioctl(FIONREAD) error 0 nsec test_sockmap_skb_verdict_fionread:FAIL:ioctl(FIONREAD) unexpected ioctl(FIONREAD): actual 1503041772 != expected 256 After updated patch with fix. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20230523025618.113937-14-john.fastabend@gmail.com commit bb516f98c731cafe27900f43c0ef0aa7b5a9a44b Author: John Fastabend Date: Mon May 22 19:56:16 2023 -0700 bpf, sockmap: Test FIONREAD returns correct bytes in rx buffer A bug was reported where ioctl(FIONREAD) returned zero even though the socket with a SK_SKB verdict program attached had bytes in the msg queue. The result is programs may hang or more likely try to recover, but use suboptimal buffer sizes. Add a test to check that ioctl(FIONREAD) returns the correct number of bytes. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20230523025618.113937-13-john.fastabend@gmail.com commit 1fa1fe8ff161cc34620e31295235dc1e6d0dce77 Author: John Fastabend Date: Mon May 22 19:56:15 2023 -0700 bpf, sockmap: Test shutdown() correctly exits epoll and recv()=0 When session gracefully shutdowns epoll needs to wake up and any recv() readers should return 0 not the -EAGAIN they previously returned. Note we use epoll instead of select to test the epoll wake on shutdown event as well. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20230523025618.113937-12-john.fastabend@gmail.com commit 298970c8af9d73a9f3df4ac871a4456f87fd4cab Author: John Fastabend Date: Mon May 22 19:56:14 2023 -0700 bpf, sockmap: Build helper to create connected socket pair A common operation for testing is to spin up a pair of sockets that are connected. Then we can use these to run specific tests that need to send data, check BPF programs and so on. The sockmap_listen programs already have this logic lets move it into the new sockmap_helpers header file for general use. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20230523025618.113937-11-john.fastabend@gmail.com commit 4e02588d9a95b21f8d25d66cb6c24f9df1532f6b Author: John Fastabend Date: Mon May 22 19:56:13 2023 -0700 bpf, sockmap: Pull socket helpers out of listen test for general use No functional change here we merely pull the helpers in sockmap_listen.c into a header file so we can use these in other programs. The tests we are about to add aren't really _listen tests so doesn't make sense to add them here. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20230523025618.113937-10-john.fastabend@gmail.com commit e5c6de5fa025882babf89cecbed80acf49b987fa Author: John Fastabend Date: Mon May 22 19:56:12 2023 -0700 bpf, sockmap: Incorrectly handling copied_seq The read_skb() logic is incrementing the tcp->copied_seq which is used for among other things calculating how many outstanding bytes can be read by the application. This results in application errors, if the application does an ioctl(FIONREAD) we return zero because this is calculated from the copied_seq value. To fix this we move tcp->copied_seq accounting into the recv handler so that we update these when the recvmsg() hook is called and data is in fact copied into user buffers. This gives an accurate FIONREAD value as expected and improves ACK handling. Before we were calling the tcp_rcv_space_adjust() which would update 'number of bytes copied to user in last RTT' which is wrong for programs returning SK_PASS. The bytes are only copied to the user when recvmsg is handled. Doing the fix for recvmsg is straightforward, but fixing redirect and SK_DROP pkts is a bit tricker. Build a tcp_psock_eat() helper and then call this from skmsg handlers. This fixes another issue where a broken socket with a BPF program doing a resubmit could hang the receiver. This happened because although read_skb() consumed the skb through sock_drop() it did not update the copied_seq. Now if a single reccv socket is redirecting to many sockets (for example for lb) the receiver sk will be hung even though we might expect it to continue. The hang comes from not updating the copied_seq numbers and memory pressure resulting from that. We have a slight layer problem of calling tcp_eat_skb even if its not a TCP socket. To fix we could refactor and create per type receiver handlers. I decided this is more work than we want in the fix and we already have some small tweaks depending on caller that use the helper skb_bpf_strparser(). So we extend that a bit and always set the strparser bit when it is in use and then we can gate the seq_copied updates on this. Fixes: 04919bed948dc ("tcp: Introduce tcp_read_skb()") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20230523025618.113937-9-john.fastabend@gmail.com commit 6df7f764cd3cf5a03a4a47b23be47e57e41fcd85 Author: John Fastabend Date: Mon May 22 19:56:11 2023 -0700 bpf, sockmap: Wake up polling after data copy When TCP stack has data ready to read sk_data_ready() is called. Sockmap overwrites this with its own handler to call into BPF verdict program. But, the original TCP socket had sock_def_readable that would additionally wake up any user space waiters with sk_wake_async(). Sockmap saved the callback when the socket was created so call the saved data ready callback and then we can wake up any epoll() logic waiting on the read. Note we call on 'copied >= 0' to account for returning 0 when a FIN is received because we need to wake up user for this as well so they can do the recvmsg() -> 0 and detect the shutdown. Fixes: 04919bed948dc ("tcp: Introduce tcp_read_skb()") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20230523025618.113937-8-john.fastabend@gmail.com commit ea444185a6bf7da4dd0df1598ee953e4f7174858 Author: John Fastabend Date: Mon May 22 19:56:10 2023 -0700 bpf, sockmap: TCP data stall on recv before accept A common mechanism to put a TCP socket into the sockmap is to hook the BPF_SOCK_OPS_{ACTIVE_PASSIVE}_ESTABLISHED_CB event with a BPF program that can map the socket info to the correct BPF verdict parser. When the user adds the socket to the map the psock is created and the new ops are assigned to ensure the verdict program will 'see' the sk_buffs as they arrive. Part of this process hooks the sk_data_ready op with a BPF specific handler to wake up the BPF verdict program when data is ready to read. The logic is simple enough (posted here for easy reading) static void sk_psock_verdict_data_ready(struct sock *sk) { struct socket *sock = sk->sk_socket; if (unlikely(!sock || !sock->ops || !sock->ops->read_skb)) return; sock->ops->read_skb(sk, sk_psock_verdict_recv); } The oversight here is sk->sk_socket is not assigned until the application accepts() the new socket. However, its entirely ok for the peer application to do a connect() followed immediately by sends. The socket on the receiver is sitting on the backlog queue of the listening socket until its accepted and the data is queued up. If the peer never accepts the socket or is slow it will eventually hit data limits and rate limit the session. But, important for BPF sockmap hooks when this data is received TCP stack does the sk_data_ready() call but the read_skb() for this data is never called because sk_socket is missing. The data sits on the sk_receive_queue. Then once the socket is accepted if we never receive more data from the peer there will be no further sk_data_ready calls and all the data is still on the sk_receive_queue(). Then user calls recvmsg after accept() and for TCP sockets in sockmap we use the tcp_bpf_recvmsg_parser() handler. The handler checks for data in the sk_msg ingress queue expecting that the BPF program has already run from the sk_data_ready hook and enqueued the data as needed. So we are stuck. To fix do an unlikely check in recvmsg handler for data on the sk_receive_queue and if it exists wake up data_ready. We have the sock locked in both read_skb and recvmsg so should avoid having multiple runners. Fixes: 04919bed948dc ("tcp: Introduce tcp_read_skb()") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20230523025618.113937-7-john.fastabend@gmail.com commit 901546fd8f9ca4b5c481ce00928ab425ce9aacc0 Author: John Fastabend Date: Mon May 22 19:56:09 2023 -0700 bpf, sockmap: Handle fin correctly The sockmap code is returning EAGAIN after a FIN packet is received and no more data is on the receive queue. Correct behavior is to return 0 to the user and the user can then close the socket. The EAGAIN causes many apps to retry which masks the problem. Eventually the socket is evicted from the sockmap because its released from sockmap sock free handling. The issue creates a delay and can cause some errors on application side. To fix this check on sk_msg_recvmsg side if length is zero and FIN flag is set then set return to zero. A selftest will be added to check this condition. Fixes: 04919bed948dc ("tcp: Introduce tcp_read_skb()") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Tested-by: William Findlay Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20230523025618.113937-6-john.fastabend@gmail.com commit 405df89dd52cbcd69a3cd7d9a10d64de38f854b2 Author: John Fastabend Date: Mon May 22 19:56:08 2023 -0700 bpf, sockmap: Improved check for empty queue We noticed some rare sk_buffs were stepping past the queue when system was under memory pressure. The general theory is to skip enqueueing sk_buffs when its not necessary which is the normal case with a system that is properly provisioned for the task, no memory pressure and enough cpu assigned. But, if we can't allocate memory due to an ENOMEM error when enqueueing the sk_buff into the sockmap receive queue we push it onto a delayed workqueue to retry later. When a new sk_buff is received we then check if that queue is empty. However, there is a problem with simply checking the queue length. When a sk_buff is being processed from the ingress queue but not yet on the sockmap msg receive queue its possible to also recv a sk_buff through normal path. It will check the ingress queue which is zero and then skip ahead of the pkt being processed. Previously we used sock lock from both contexts which made the problem harder to hit, but not impossible. To fix instead of popping the skb from the queue entirely we peek the skb from the queue and do the copy there. This ensures checks to the queue length are non-zero while skb is being processed. Then finally when the entire skb has been copied to user space queue or another socket we pop it off the queue. This way the queue length check allows bypassing the queue only after the list has been completely processed. To reproduce issue we run NGINX compliance test with sockmap running and observe some flakes in our testing that we attributed to this issue. Fixes: 04919bed948dc ("tcp: Introduce tcp_read_skb()") Suggested-by: Jakub Sitnicki Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Tested-by: William Findlay Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20230523025618.113937-5-john.fastabend@gmail.com commit bce22552f92ea7c577f49839b8e8f7d29afaf880 Author: John Fastabend Date: Mon May 22 19:56:07 2023 -0700 bpf, sockmap: Reschedule is now done through backlog Now that the backlog manages the reschedule() logic correctly we can drop the partial fix to reschedule from recvmsg hook. Rescheduling on recvmsg hook was added to address a corner case where we still had data in the backlog state but had nothing to kick it and reschedule the backlog worker to run and finish copying data out of the state. This had a couple limitations, first it required user space to kick it introducing an unnecessary EBUSY and retry. Second it only handled the ingress case and egress redirects would still be hung. With the correct fix, pushing the reschedule logic down to where the enomem error occurs we can drop this fix. Fixes: bec217197b412 ("skmsg: Schedule psock work if the cached skb exists on the psock") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20230523025618.113937-4-john.fastabend@gmail.com commit 29173d07f79883ac94f5570294f98af3d4287382 Author: John Fastabend Date: Mon May 22 19:56:06 2023 -0700 bpf, sockmap: Convert schedule_work into delayed_work Sk_buffs are fed into sockmap verdict programs either from a strparser (when the user might want to decide how framing of skb is done by attaching another parser program) or directly through tcp_read_sock. The tcp_read_sock is the preferred method for performance when the BPF logic is a stream parser. The flow for Cilium's common use case with a stream parser is, tcp_read_sock() sk_psock_verdict_recv ret = bpf_prog_run_pin_on_cpu() sk_psock_verdict_apply(sock, skb, ret) // if system is under memory pressure or app is slow we may // need to queue skb. Do this queuing through ingress_skb and // then kick timer to wake up handler skb_queue_tail(ingress_skb, skb) schedule_work(work); The work queue is wired up to sk_psock_backlog(). This will then walk the ingress_skb skb list that holds our sk_buffs that could not be handled, but should be OK to run at some later point. However, its possible that the workqueue doing this work still hits an error when sending the skb. When this happens the skbuff is requeued on a temporary 'state' struct kept with the workqueue. This is necessary because its possible to partially send an skbuff before hitting an error and we need to know how and where to restart when the workqueue runs next. Now for the trouble, we don't rekick the workqueue. This can cause a stall where the skbuff we just cached on the state variable might never be sent. This happens when its the last packet in a flow and no further packets come along that would cause the system to kick the workqueue from that side. To fix we could do simple schedule_work(), but while under memory pressure it makes sense to back off some instead of continue to retry repeatedly. So instead to fix convert schedule_work to schedule_delayed_work and add backoff logic to reschedule from backlog queue on errors. Its not obvious though what a good backoff is so use '1'. To test we observed some flakes whil running NGINX compliance test with sockmap we attributed these failed test to this bug and subsequent issue. >From on list discussion. This commit bec217197b41("skmsg: Schedule psock work if the cached skb exists on the psock") was intended to address similar race, but had a couple cases it missed. Most obvious it only accounted for receiving traffic on the local socket so if redirecting into another socket we could still get an sk_buff stuck here. Next it missed the case where copied=0 in the recv() handler and then we wouldn't kick the scheduler. Also its sub-optimal to require userspace to kick the internal mechanisms of sockmap to wake it up and copy data to user. It results in an extra syscall and requires the app to actual handle the EAGAIN correctly. Fixes: 04919bed948dc ("tcp: Introduce tcp_read_skb()") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Tested-by: William Findlay Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20230523025618.113937-3-john.fastabend@gmail.com commit 78fa0d61d97a728d306b0c23d353c0e340756437 Author: John Fastabend Date: Mon May 22 19:56:05 2023 -0700 bpf, sockmap: Pass skb ownership through read_skb The read_skb hook calls consume_skb() now, but this means that if the recv_actor program wants to use the skb it needs to inc the ref cnt so that the consume_skb() doesn't kfree the sk_buff. This is problematic because in some error cases under memory pressure we may need to linearize the sk_buff from sk_psock_skb_ingress_enqueue(). Then we get this, skb_linearize() __pskb_pull_tail() pskb_expand_head() BUG_ON(skb_shared(skb)) Because we incremented users refcnt from sk_psock_verdict_recv() we hit the bug on with refcnt > 1 and trip it. To fix lets simply pass ownership of the sk_buff through the skb_read call. Then we can drop the consume from read_skb handlers and assume the verdict recv does any required kfree. Bug found while testing in our CI which runs in VMs that hit memory constraints rather regularly. William tested TCP read_skb handlers. [ 106.536188] ------------[ cut here ]------------ [ 106.536197] kernel BUG at net/core/skbuff.c:1693! [ 106.536479] invalid opcode: 0000 [#1] PREEMPT SMP PTI [ 106.536726] CPU: 3 PID: 1495 Comm: curl Not tainted 5.19.0-rc5 #1 [ 106.537023] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ArchLinux 1.16.0-1 04/01/2014 [ 106.537467] RIP: 0010:pskb_expand_head+0x269/0x330 [ 106.538585] RSP: 0018:ffffc90000138b68 EFLAGS: 00010202 [ 106.538839] RAX: 000000000000003f RBX: ffff8881048940e8 RCX: 0000000000000a20 [ 106.539186] RDX: 0000000000000002 RSI: 0000000000000000 RDI: ffff8881048940e8 [ 106.539529] RBP: ffffc90000138be8 R08: 00000000e161fd1a R09: 0000000000000000 [ 106.539877] R10: 0000000000000018 R11: 0000000000000000 R12: ffff8881048940e8 [ 106.540222] R13: 0000000000000003 R14: 0000000000000000 R15: ffff8881048940e8 [ 106.540568] FS: 00007f277dde9f00(0000) GS:ffff88813bd80000(0000) knlGS:0000000000000000 [ 106.540954] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 106.541227] CR2: 00007f277eeede64 CR3: 000000000ad3e000 CR4: 00000000000006e0 [ 106.541569] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 106.541915] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 106.542255] Call Trace: [ 106.542383] [ 106.542487] __pskb_pull_tail+0x4b/0x3e0 [ 106.542681] skb_ensure_writable+0x85/0xa0 [ 106.542882] sk_skb_pull_data+0x18/0x20 [ 106.543084] bpf_prog_b517a65a242018b0_bpf_skskb_http_verdict+0x3a9/0x4aa9 [ 106.543536] ? migrate_disable+0x66/0x80 [ 106.543871] sk_psock_verdict_recv+0xe2/0x310 [ 106.544258] ? sk_psock_write_space+0x1f0/0x1f0 [ 106.544561] tcp_read_skb+0x7b/0x120 [ 106.544740] tcp_data_queue+0x904/0xee0 [ 106.544931] tcp_rcv_established+0x212/0x7c0 [ 106.545142] tcp_v4_do_rcv+0x174/0x2a0 [ 106.545326] tcp_v4_rcv+0xe70/0xf60 [ 106.545500] ip_protocol_deliver_rcu+0x48/0x290 [ 106.545744] ip_local_deliver_finish+0xa7/0x150 Fixes: 04919bed948dc ("tcp: Introduce tcp_read_skb()") Reported-by: William Findlay Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Tested-by: William Findlay Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20230523025618.113937-2-john.fastabend@gmail.com commit d53d70084d27f56bcdf5074328f2c9ec861be596 Author: Jeff Layton Date: Wed May 17 12:26:44 2023 -0400 nfsd: make a copy of struct iattr before calling notify_change notify_change can modify the iattr structure. In particular it can end up setting ATTR_MODE when ATTR_KILL_SUID is already set, causing a BUG() if the same iattr is passed to notify_change more than once. Make a copy of the struct iattr before calling notify_change. Reported-by: Zhi Li Link: https://bugzilla.redhat.com/show_bug.cgi?id=2207969 Tested-by: Zhi Li Fixes: 34b91dda7124 ("NFSD: Make nfsd4_setattr() wait before returning NFS4ERR_DELAY") Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 3632679d9e4f879f49949bb5b050e0de553e4739 Author: Nicolas Dichtel Date: Mon May 22 14:08:20 2023 +0200 ipv{4,6}/raw: fix output xfrm lookup wrt protocol With a raw socket bound to IPPROTO_RAW (ie with hdrincl enabled), the protocol field of the flow structure, build by raw_sendmsg() / rawv6_sendmsg()), is set to IPPROTO_RAW. This breaks the ipsec policy lookup when some policies are defined with a protocol in the selector. For ipv6, the sin6_port field from 'struct sockaddr_in6' could be used to specify the protocol. Just accept all values for IPPROTO_RAW socket. For ipv4, the sin_port field of 'struct sockaddr_in' could not be used without breaking backward compatibility (the value of this field was never checked). Let's add a new kind of control message, so that the userland could specify which protocol is used. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") CC: stable@vger.kernel.org Signed-off-by: Nicolas Dichtel Link: https://lore.kernel.org/r/20230522120820.1319391-1-nicolas.dichtel@6wind.com Signed-off-by: Paolo Abeni commit 16a9c24f24fbe4564284eb575b18cc20586b9270 Author: Denis Arefev Date: Thu Apr 27 14:47:45 2023 +0300 HID: wacom: Add error check to wacom_parse_and_register() Added a variable check and transition in case of an error Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina commit ed84c4517a5bc536e8572a01dfa11bc22a280d06 Author: Sung-Chi Li Date: Mon Apr 24 10:37:36 2023 +0800 HID: google: add jewel USB id Add 1 additional hammer-like device. Signed-off-by: Sung-Chi Li Signed-off-by: Jiri Kosina commit bd249b91977b768ea02bf84d04625d2690ad2b98 Author: Nikita Zhandarovich Date: Mon Apr 17 09:01:48 2023 -0700 HID: wacom: avoid integer overflow in wacom_intuos_inout() If high bit is set to 1 in ((data[3] & 0x0f << 28), after all arithmetic operations and integer promotions are done, high bits in wacom->serial[idx] will be filled with 1s as well. Avoid this, albeit unlikely, issue by specifying left operand's __u64 type for the right operand. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: 3bea733ab212 ("USB: wacom tablet driver reorganization") Signed-off-by: Nikita Zhandarovich Reviewed-by: Ping Cheng Cc: stable@vger.kernel.org Signed-off-by: Jiri Kosina commit d9eef346b601afb0bd74b49e0db06f6a5cebd030 Author: Jason Gerecke Date: Fri Apr 14 11:22:10 2023 -0700 HID: wacom: Check for string overflow from strscpy calls The strscpy function is able to return an error code when a copy would overflow the size of the destination. The copy is stopped and the buffer terminated before overflow actually occurs so it is safe to continue execution, but we should still produce a warning should this occur. Signed-off-by: Jason Gerecke Reviewed-by: Ping Cheng Reviewed-by: Peter Hutterer Signed-off-by: Jiri Kosina commit 600761245952d7f70280add6ce02894f1528992b Author: Horatiu Vultur Date: Mon May 22 14:00:38 2023 +0200 lan966x: Fix unloading/loading of the driver It was noticing that after a while when unloading/loading the driver and sending traffic through the switch, it would stop working. It would stop forwarding any traffic and the only way to get out of this was to do a power cycle of the board. The root cause seems to be that the switch core is initialized twice. Apparently initializing twice the switch core disturbs the pointers in the queue systems in the HW, so after a while it would stop sending the traffic. Unfortunetly, it is not possible to use a reset of the switch here, because the reset line is connected to multiple devices like MDIO, SGPIO, FAN, etc. So then all the devices will get reseted when the network driver will be loaded. So the fix is to check if the core is initialized already and if that is the case don't initialize it again. Fixes: db8bcaad5393 ("net: lan966x: add the basic lan966x driver") Signed-off-by: Horatiu Vultur Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230522120038.3749026-1-horatiu.vultur@microchip.com Signed-off-by: Paolo Abeni commit 3279decb2c3c8d58cb0b70ed5235c480735a36ee Author: David Arcari Date: Tue May 23 06:54:00 2023 -0400 platform/x86/intel/ifs: Annotate work queue on stack so object debug does not complain Object Debug results in the following warning while attempting to load ifs firmware: [ 220.007422] ODEBUG: object 000000003bf952db is on stack 00000000e843994b, but NOT annotated. [ 220.007459] ------------[ cut here ]------------ [ 220.007461] WARNING: CPU: 0 PID: 11774 at lib/debugobjects.c:548 __debug_object_init.cold+0x22e/0x2d5 [ 220.137476] RIP: 0010:__debug_object_init.cold+0x22e/0x2d5 [ 220.254774] Call Trace: [ 220.257641] [ 220.265606] scan_chunks_sanity_check+0x368/0x5f0 [intel_ifs] [ 220.288292] ifs_load_firmware+0x2a3/0x400 [intel_ifs] [ 220.332793] current_batch_store+0xea/0x160 [intel_ifs] [ 220.357947] kernfs_fop_write_iter+0x355/0x530 [ 220.363048] new_sync_write+0x28e/0x4a0 [ 220.381226] vfs_write+0x62a/0x920 [ 220.385160] ksys_write+0xf9/0x1d0 [ 220.399421] do_syscall_64+0x59/0x90 [ 220.440635] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 220.566845] ---[ end trace 3a01b299db142b41 ]--- Correct this by calling INIT_WORK_ONSTACK instead of INIT_WORK. Fixes: 684ec215706d ("platform/x86/intel/ifs: Authenticate and copy to secured memory") Signed-off-by: David Arcari Cc: Jithu Joseph Cc: Ashok Raj Cc: Tony Luck Cc: Hans de Goede Cc: Mark Gross Cc: Greg Kroah-Hartman Cc: Thomas Gleixner Cc: Dan Williams Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230523105400.674152-1-darcari@redhat.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit bbb320bfe2c3e9740fe89cfa0a7089b4e8bfc4ff Author: Steve Wahl Date: Fri May 19 11:04:20 2023 -0500 platform/x86: ISST: Remove 8 socket limit Stop restricting the PCI search to a range of PCI domains fed to pci_get_domain_bus_and_slot(). Instead, use for_each_pci_dev() and look at all PCI domains in one pass. On systems with more than 8 sockets, this avoids error messages like "Information: Invalid level, Can't get TDP control information at specified levels on cpu 480" from the intel speed select utility. Fixes: aa2ddd242572 ("platform/x86: ISST: Use numa node id for cpu pci dev mapping") Signed-off-by: Steve Wahl Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230519160420.2588475-1-steve.wahl@hpe.com Signed-off-by: Hans de Goede commit 4897a898a216058dec55e5e5902534e6e224fcdf Author: Liviu Dudau Date: Tue May 9 18:29:21 2023 +0100 mips: Move initrd_start check after initrd address sanitisation. PAGE_OFFSET is technically a virtual address so when checking the value of initrd_start against it we should make sure that it has been sanitised from the values passed by the bootloader. Without this change, even with a bootloader that passes correct addresses for an initrd, we are failing to load it on MT7621 boards, for example. Signed-off-by: Liviu Dudau Signed-off-by: Thomas Bogendoerfer commit 2d645604f69f3a772d58ead702f9a8e84ab2b342 Author: Manuel Lauss Date: Thu May 11 17:30:10 2023 +0200 MIPS: Alchemy: fix dbdma2 Various fixes for the Au1200/Au1550/Au1300 DBDMA2 code: - skip cache invalidation if chip has working coherency circuitry. - invalidate KSEG0-portion of the (physical) data address. - force the dma channel doorbell write out to bus immediately with a sync. Signed-off-by: Thomas Bogendoerfer commit f2041708dee30a3425f680265c337acd28293782 Author: Manuel Lauss Date: Wed May 10 12:33:23 2023 +0200 MIPS: Restore Au1300 support The Au1300, at least the one I have to test, uses the NetLogic vendor ID, but commit 95b8a5e0111a ("MIPS: Remove NETLOGIC support") also dropped Au1300 detection. Restore Au1300 detection. Tested on DB1300 with Au1380 chip. Signed-off-by: Manuel Lauss Signed-off-by: Thomas Bogendoerfer commit 75b18aac6fa39a1720677970cfcb52ecea1eb44c Author: Manuel Lauss Date: Tue May 9 20:57:44 2023 +0200 MIPS: unhide PATA_PLATFORM Alchemy DB1200/DB1300 boards can use the pata_platform driver. Unhide the config entry in all of MIPS. Signed-off-by: Manuel Lauss Signed-off-by: Thomas Bogendoerfer commit cf7f2732b4b83026842832e7e4e04bf862108ac2 Author: Gao Xiang Date: Mon May 22 17:21:41 2023 +0800 erofs: use HIPRI by default if per-cpu kthreads are enabled As Sandeep shown [1], high priority RT per-cpu kthreads are typically helpful for Android scenarios to minimize the scheduling latencies. Switch EROFS_FS_PCPU_KTHREAD_HIPRI on by default if EROFS_FS_PCPU_KTHREAD is on since it's the typical use cases for EROFS_FS_PCPU_KTHREAD. Also clean up unneeded sched_set_normal(). [1] https://lore.kernel.org/r/CAB=BE-SBtO6vcoyLNA9F-9VaN5R0t3o_Zn+FW8GbO6wyUqFneQ@mail.gmail.com Reviewed-by: Yue Hu Reviewed-by: Sandeep Dhavale Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20230522092141.124290-1-hsiangkao@linux.alibaba.com commit 285d0f85dae6510aea31416c72670ded54fc4b0c Author: Yue Hu Date: Mon May 15 17:57:58 2023 +0800 erofs: avoid pcpubuf.c inclusion if CONFIG_EROFS_FS_ZIP is off The function of pcpubuf.c is just for low-latency decompression algorithms (e.g. lz4). Signed-off-by: Yue Hu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230515095758.10391-1-zbestahu@gmail.com Signed-off-by: Gao Xiang commit 0a17567b4a85243ac1620886b75b3813acde41fc Author: Jingbo Xu Date: Mon May 15 18:39:41 2023 +0800 erofs: fix null-ptr-deref caused by erofs_xattr_prefixes_init Fragments and dedupe share one feature bit, and thus packed inode may not exist when fragment feature bit (dedupe feature bit exactly) is set, e.g. when deduplication feature is in use while fragments feature is not. In this case, sbi->packed_inode could be NULL while fragments feature bit is set. Fix this by accessing packed inode only when it exists. Reported-by: syzbot+902d5a9373ae8f748a94@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=902d5a9373ae8f748a94 Reported-and-tested-by: syzbot+bbb353775d51424087f2@syzkaller.appspotmail.com Fixes: 9e382914617c ("erofs: add helpers to load long xattr name prefixes") Fixes: 6a318ccd7e08 ("erofs: enable long extended attribute name prefixes") Signed-off-by: Jingbo Xu Reviewed-by: Yue Hu Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230515103941.129784-1-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang commit 3002b8642f016d7fe3ff56240dacea1075f6b877 Author: Henning Schild Date: Thu Apr 27 17:20:55 2023 +0200 gpio-f7188x: fix chip name and pin count on Nuvoton chip In fact the device with chip id 0xD283 is called NCT6126D, and that is the chip id the Nuvoton code was written for. Correct that name to avoid confusion, because a NCT6116D in fact exists as well but has another chip id, and is currently not supported. The look at the spec also revealed that GPIO group7 in fact has 8 pins, so correct the pin count in that group as well. Fixes: d0918a84aff0 ("gpio-f7188x: Add GPIO support for Nuvoton NCT6116") Reported-by: Xing Tong Wu Signed-off-by: Henning Schild Acked-by: Simon Guinot Signed-off-by: Bartosz Golaszewski commit 3c845304d2d723f20d5b91fef5d133ff94825d76 Author: Like Xu Date: Wed May 17 21:38:08 2023 +0800 perf/x86/intel: Save/restore cpuc->active_pebs_data_cfg when using guest PEBS After commit b752ea0c28e3 ("perf/x86/intel/ds: Flush PEBS DS when changing PEBS_DATA_CFG"), the cpuc->pebs_data_cfg may save some bits that are not supported by real hardware, such as PEBS_UPDATE_DS_SW. This would cause the VMX hardware MSR switching mechanism to save/restore invalid values for PEBS_DATA_CFG MSR, thus crashing the host when PEBS is used for guest. Fix it by using the active host value from cpuc->active_pebs_data_cfg. Fixes: b752ea0c28e3 ("perf/x86/intel/ds: Flush PEBS DS when changing PEBS_DATA_CFG") Signed-off-by: Like Xu Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20230517133808.67885-1-likexu@tencent.com commit 11c439a19466e7feaccdbce148a75372fddaf4e9 Author: Vasant Hegde Date: Thu May 18 05:43:51 2023 +0000 iommu/amd/pgtbl_v2: Fix domain max address IOMMU v2 page table supports 4 level (47 bit) or 5 level (56 bit) virtual address space. Current code assumes it can support 64bit IOVA address space. If IOVA allocator allocates virtual address > 47/56 bit (depending on page table level) then it will do wrong mapping and cause invalid translation. Hence adjust aperture size to use max address supported by the page table. Reported-by: Jerry Snitselaar Fixes: aaac38f61487 ("iommu/amd: Initial support for AMD IOMMU v2 page table") Cc: # v6.0+ Cc: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20230518054351.9626-1-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit 1da438c0ae02396dc5018b63237492cb5908608d Author: Shay Drory Date: Mon Apr 17 10:57:50 2023 +0300 net/mlx5: Fix indexing of mlx5_irq After the cited patch, mlx5_irq xarray index can be different then mlx5_irq MSIX table index. Fix it by storing both mlx5_irq xarray index and MSIX table index. Fixes: 3354822cde5a ("net/mlx5: Use dynamic msix vectors allocation") Signed-off-by: Shay Drory Reviewed-by: Eli Cohen Signed-off-by: Saeed Mahameed commit ef8c063cf88e1a3d99ab4ada1cbab5ba7248a4f2 Author: Shay Drory Date: Sun Apr 16 08:54:04 2023 +0300 net/mlx5: Fix irq affinity management The cited patch deny the user of changing the affinity of mlx5 irqs, which break backward compatibility. Hence, allow the user to change the affinity of mlx5 irqs. Fixes: bbac70c74183 ("net/mlx5: Use newer affinity descriptor") Signed-off-by: Shay Drory Reviewed-by: Eli Cohen Signed-off-by: Saeed Mahameed commit 9c2d08010963a61a171e8cb2852d3ce015b60cb4 Author: Shay Drory Date: Thu Apr 13 22:15:31 2023 +0300 net/mlx5: Free irqs only on shutdown callback Whenever a shutdown is invoked, free irqs only and keep mlx5_irq synthetic wrapper intact in order to avoid use-after-free on system shutdown. for example: ================================================================== BUG: KASAN: use-after-free in _find_first_bit+0x66/0x80 Read of size 8 at addr ffff88823fc0d318 by task kworker/u192:0/13608 CPU: 25 PID: 13608 Comm: kworker/u192:0 Tainted: G B W O 6.1.21-cloudflare-kasan-2023.3.21 #1 Hardware name: GIGABYTE R162-R2-GEN0/MZ12-HD2-CD, BIOS R14 05/03/2021 Workqueue: mlx5e mlx5e_tx_timeout_work [mlx5_core] Call Trace: dump_stack_lvl+0x34/0x48 print_report+0x170/0x473 ? _find_first_bit+0x66/0x80 kasan_report+0xad/0x130 ? _find_first_bit+0x66/0x80 _find_first_bit+0x66/0x80 mlx5e_open_channels+0x3c5/0x3a10 [mlx5_core] ? console_unlock+0x2fa/0x430 ? _raw_spin_lock_irqsave+0x8d/0xf0 ? _raw_spin_unlock_irqrestore+0x42/0x80 ? preempt_count_add+0x7d/0x150 ? __wake_up_klogd.part.0+0x7d/0xc0 ? vprintk_emit+0xfe/0x2c0 ? mlx5e_trigger_napi_sched+0x40/0x40 [mlx5_core] ? dev_attr_show.cold+0x35/0x35 ? devlink_health_do_dump.part.0+0x174/0x340 ? devlink_health_report+0x504/0x810 ? mlx5e_reporter_tx_timeout+0x29d/0x3a0 [mlx5_core] ? mlx5e_tx_timeout_work+0x17c/0x230 [mlx5_core] ? process_one_work+0x680/0x1050 mlx5e_safe_switch_params+0x156/0x220 [mlx5_core] ? mlx5e_switch_priv_channels+0x310/0x310 [mlx5_core] ? mlx5_eq_poll_irq_disabled+0xb6/0x100 [mlx5_core] mlx5e_tx_reporter_timeout_recover+0x123/0x240 [mlx5_core] ? __mutex_unlock_slowpath.constprop.0+0x2b0/0x2b0 devlink_health_reporter_recover+0xa6/0x1f0 devlink_health_report+0x2f7/0x810 ? vsnprintf+0x854/0x15e0 mlx5e_reporter_tx_timeout+0x29d/0x3a0 [mlx5_core] ? mlx5e_reporter_tx_err_cqe+0x1a0/0x1a0 [mlx5_core] ? mlx5e_tx_reporter_timeout_dump+0x50/0x50 [mlx5_core] ? mlx5e_tx_reporter_dump_sq+0x260/0x260 [mlx5_core] ? newidle_balance+0x9b7/0xe30 ? psi_group_change+0x6a7/0xb80 ? mutex_lock+0x96/0xf0 ? __mutex_lock_slowpath+0x10/0x10 mlx5e_tx_timeout_work+0x17c/0x230 [mlx5_core] process_one_work+0x680/0x1050 worker_thread+0x5a0/0xeb0 ? process_one_work+0x1050/0x1050 kthread+0x2a2/0x340 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x22/0x30 Freed by task 1: kasan_save_stack+0x23/0x50 kasan_set_track+0x21/0x30 kasan_save_free_info+0x2a/0x40 ____kasan_slab_free+0x169/0x1d0 slab_free_freelist_hook+0xd2/0x190 __kmem_cache_free+0x1a1/0x2f0 irq_pool_free+0x138/0x200 [mlx5_core] mlx5_irq_table_destroy+0xf6/0x170 [mlx5_core] mlx5_core_eq_free_irqs+0x74/0xf0 [mlx5_core] shutdown+0x194/0x1aa [mlx5_core] pci_device_shutdown+0x75/0x120 device_shutdown+0x35c/0x620 kernel_restart+0x60/0xa0 __do_sys_reboot+0x1cb/0x2c0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x4b/0xb5 The buggy address belongs to the object at ffff88823fc0d300 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 24 bytes inside of 192-byte region [ffff88823fc0d300, ffff88823fc0d3c0) The buggy address belongs to the physical page: page:0000000010139587 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23fc0c head:0000000010139587 order:1 compound_mapcount:0 compound_pincount:0 flags: 0x2ffff800010200(slab|head|node=0|zone=2|lastcpupid=0x1ffff) raw: 002ffff800010200 0000000000000000 dead000000000122 ffff88810004ca00 raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88823fc0d200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88823fc0d280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88823fc0d300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88823fc0d380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88823fc0d400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== general protection fault, probably for non-canonical address 0xdffffc005c40d7ac: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: probably user-memory-access in range [0x00000002e206bd60-0x00000002e206bd67] CPU: 25 PID: 13608 Comm: kworker/u192:0 Tainted: G B W O 6.1.21-cloudflare-kasan-2023.3.21 #1 Hardware name: GIGABYTE R162-R2-GEN0/MZ12-HD2-CD, BIOS R14 05/03/2021 Workqueue: mlx5e mlx5e_tx_timeout_work [mlx5_core] RIP: 0010:__alloc_pages+0x141/0x5c0 Call Trace: ? sysvec_apic_timer_interrupt+0xa0/0xc0 ? asm_sysvec_apic_timer_interrupt+0x16/0x20 ? __alloc_pages_slowpath.constprop.0+0x1ec0/0x1ec0 ? _raw_spin_unlock_irqrestore+0x3d/0x80 __kmalloc_large_node+0x80/0x120 ? kvmalloc_node+0x4e/0x170 __kmalloc_node+0xd4/0x150 kvmalloc_node+0x4e/0x170 mlx5e_open_channels+0x631/0x3a10 [mlx5_core] ? console_unlock+0x2fa/0x430 ? _raw_spin_lock_irqsave+0x8d/0xf0 ? _raw_spin_unlock_irqrestore+0x42/0x80 ? preempt_count_add+0x7d/0x150 ? __wake_up_klogd.part.0+0x7d/0xc0 ? vprintk_emit+0xfe/0x2c0 ? mlx5e_trigger_napi_sched+0x40/0x40 [mlx5_core] ? dev_attr_show.cold+0x35/0x35 ? devlink_health_do_dump.part.0+0x174/0x340 ? devlink_health_report+0x504/0x810 ? mlx5e_reporter_tx_timeout+0x29d/0x3a0 [mlx5_core] ? mlx5e_tx_timeout_work+0x17c/0x230 [mlx5_core] ? process_one_work+0x680/0x1050 mlx5e_safe_switch_params+0x156/0x220 [mlx5_core] ? mlx5e_switch_priv_channels+0x310/0x310 [mlx5_core] ? mlx5_eq_poll_irq_disabled+0xb6/0x100 [mlx5_core] mlx5e_tx_reporter_timeout_recover+0x123/0x240 [mlx5_core] ? __mutex_unlock_slowpath.constprop.0+0x2b0/0x2b0 devlink_health_reporter_recover+0xa6/0x1f0 devlink_health_report+0x2f7/0x810 ? vsnprintf+0x854/0x15e0 mlx5e_reporter_tx_timeout+0x29d/0x3a0 [mlx5_core] ? mlx5e_reporter_tx_err_cqe+0x1a0/0x1a0 [mlx5_core] ? mlx5e_tx_reporter_timeout_dump+0x50/0x50 [mlx5_core] ? mlx5e_tx_reporter_dump_sq+0x260/0x260 [mlx5_core] ? newidle_balance+0x9b7/0xe30 ? psi_group_change+0x6a7/0xb80 ? mutex_lock+0x96/0xf0 ? __mutex_lock_slowpath+0x10/0x10 mlx5e_tx_timeout_work+0x17c/0x230 [mlx5_core] process_one_work+0x680/0x1050 worker_thread+0x5a0/0xeb0 ? process_one_work+0x1050/0x1050 kthread+0x2a2/0x340 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x22/0x30 ---[ end trace 0000000000000000 ]--- RIP: 0010:__alloc_pages+0x141/0x5c0 Code: e0 39 a3 96 89 e9 b8 22 01 32 01 83 e1 0f 48 89 fa 01 c9 48 c1 ea 03 d3 f8 83 e0 03 89 44 24 6c 48 b8 00 00 00 00 00 fc ff df <80> 3c 02 00 0f 85 fc 03 00 00 89 e8 4a 8b 14 f5 e0 39 a3 96 4c 89 RSP: 0018:ffff888251f0f438 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 1ffff1104a3e1e8b RCX: 0000000000000000 RDX: 000000005c40d7ac RSI: 0000000000000003 RDI: 00000002e206bd60 RBP: 0000000000052dc0 R08: ffff8882b0044218 R09: ffff8882b0045e8a R10: fffffbfff300fefc R11: ffff888167af4000 R12: 0000000000000003 R13: 0000000000000000 R14: 00000000696c7070 R15: ffff8882373f4380 FS: 0000000000000000(0000) GS:ffff88bf2be80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005641d031eee8 CR3: 0000002e7ca14000 CR4: 0000000000350ee0 Kernel panic - not syncing: Fatal exception Kernel Offset: 0x11000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) ---[ end Kernel panic - not syncing: Fatal exception ]---] Reported-by: Frederick Lawler Link: https://lore.kernel.org/netdev/be5b9271-7507-19c5-ded1-fa78f1980e69@cloudflare.com Signed-off-by: Shay Drory Signed-off-by: Saeed Mahameed commit 1f893f57a3bf9fe1f4bcb25b55aea7f7f9712fe7 Author: Shay Drory Date: Tue May 2 13:36:42 2023 +0300 net/mlx5: Devcom, serialize devcom registration From one hand, mlx5 driver is allowing to probe PFs in parallel. From the other hand, devcom, which is a share resource between PFs, is registered without any lock. This might resulted in memory problems. Hence, use the global mlx5_dev_list_lock in order to serialize devcom registration. Fixes: fadd59fc50d0 ("net/mlx5: Introduce inter-device communication mechanism") Signed-off-by: Shay Drory Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit af87194352cad882d787d06fb7efa714acd95427 Author: Shay Drory Date: Tue May 2 13:35:11 2023 +0300 net/mlx5: Devcom, fix error flow in mlx5_devcom_register_device In case devcom allocation is failed, mlx5 is always freeing the priv. However, this priv might have been allocated by a different thread, and freeing it might lead to use-after-free bugs. Fix it by freeing the priv only in case it was allocated by the running thread. Fixes: fadd59fc50d0 ("net/mlx5: Introduce inter-device communication mechanism") Signed-off-by: Shay Drory Signed-off-by: Saeed Mahameed commit 8c253dfc89efde6b5faddf9e7400e5d17884e042 Author: Shay Drory Date: Mon Feb 6 11:52:02 2023 +0200 net/mlx5: E-switch, Devcom, sync devcom events and devcom comp register devcom events are sent to all registered component. Following the cited patch, it is possible for two components, e.g.: two eswitches, to send devcom events, while both components are registered. This means eswitch layer will do double un/pairing, which is double allocation and free of resources, even though only one un/pairing is needed. flow example: cpu0 cpu1 ---- ---- mlx5_devlink_eswitch_mode_set(dev0) esw_offloads_devcom_init() mlx5_devcom_register_component(esw0) mlx5_devlink_eswitch_mode_set(dev1) esw_offloads_devcom_init() mlx5_devcom_register_component(esw1) mlx5_devcom_send_event() mlx5_devcom_send_event() Hence, check whether the eswitches are already un/paired before free/allocation of resources. Fixes: 09b278462f16 ("net: devlink: enable parallel ops on netlink interface") Signed-off-by: Shay Drory Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit dfa1e46d6093831b9d49f0f350227a1d13644a2f Author: Paul Blakey Date: Wed Apr 26 16:04:48 2023 +0300 net/mlx5e: TC, Fix using eswitch mapping in nic mode Cited patch is using the eswitch object mapping pool while in nic mode where it isn't initialized. This results in the trace below [0]. Fix that by using either nic or eswitch object mapping pool depending if eswitch is enabled or not. [0]: [ 826.446057] ================================================================== [ 826.446729] BUG: KASAN: slab-use-after-free in mlx5_add_flow_rules+0x30/0x490 [mlx5_core] [ 826.447515] Read of size 8 at addr ffff888194485830 by task tc/6233 [ 826.448243] CPU: 16 PID: 6233 Comm: tc Tainted: G W 6.3.0-rc6+ #1 [ 826.448890] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 826.449785] Call Trace: [ 826.450052] [ 826.450302] dump_stack_lvl+0x33/0x50 [ 826.450650] print_report+0xc2/0x610 [ 826.450998] ? __virt_addr_valid+0xb1/0x130 [ 826.451385] ? mlx5_add_flow_rules+0x30/0x490 [mlx5_core] [ 826.451935] kasan_report+0xae/0xe0 [ 826.452276] ? mlx5_add_flow_rules+0x30/0x490 [mlx5_core] [ 826.452829] mlx5_add_flow_rules+0x30/0x490 [mlx5_core] [ 826.453368] ? __kmalloc_node+0x5a/0x120 [ 826.453733] esw_add_restore_rule+0x20f/0x270 [mlx5_core] [ 826.454288] ? mlx5_eswitch_add_send_to_vport_meta_rule+0x260/0x260 [mlx5_core] [ 826.455011] ? mutex_unlock+0x80/0xd0 [ 826.455361] ? __mutex_unlock_slowpath.constprop.0+0x210/0x210 [ 826.455862] ? mapping_add+0x2cb/0x440 [mlx5_core] [ 826.456425] mlx5e_tc_action_miss_mapping_get+0x139/0x180 [mlx5_core] [ 826.457058] ? mlx5e_tc_update_skb_nic+0xb0/0xb0 [mlx5_core] [ 826.457636] ? __kasan_kmalloc+0x77/0x90 [ 826.458000] ? __kmalloc+0x57/0x120 [ 826.458336] mlx5_tc_ct_flow_offload+0x325/0xe40 [mlx5_core] [ 826.458916] ? ct_kernel_enter.constprop.0+0x48/0xa0 [ 826.459360] ? mlx5_tc_ct_parse_action+0xf0/0xf0 [mlx5_core] [ 826.459933] ? mlx5e_mod_hdr_attach+0x491/0x520 [mlx5_core] [ 826.460507] ? mlx5e_mod_hdr_get+0x12/0x20 [mlx5_core] [ 826.461046] ? mlx5e_tc_attach_mod_hdr+0x154/0x170 [mlx5_core] [ 826.461635] mlx5e_configure_flower+0x969/0x2110 [mlx5_core] [ 826.462217] ? _raw_spin_lock_bh+0x85/0xe0 [ 826.462597] ? __mlx5e_add_fdb_flow+0x750/0x750 [mlx5_core] [ 826.463163] ? kasan_save_stack+0x2e/0x40 [ 826.463534] ? down_read+0x115/0x1b0 [ 826.463878] ? down_write_killable+0x110/0x110 [ 826.464288] ? tc_setup_action.part.0+0x9f/0x3b0 [ 826.464701] ? mlx5e_is_uplink_rep+0x4c/0x90 [mlx5_core] [ 826.465253] ? mlx5e_tc_reoffload_flows_work+0x130/0x130 [mlx5_core] [ 826.465878] tc_setup_cb_add+0x112/0x250 [ 826.466247] fl_hw_replace_filter+0x230/0x310 [cls_flower] [ 826.466724] ? fl_hw_destroy_filter+0x1a0/0x1a0 [cls_flower] [ 826.467212] fl_change+0x14e1/0x2030 [cls_flower] [ 826.467636] ? sock_def_readable+0x89/0x120 [ 826.468019] ? fl_tmplt_create+0x2d0/0x2d0 [cls_flower] [ 826.468509] ? kasan_unpoison+0x23/0x50 [ 826.468873] ? get_random_u16+0x180/0x180 [ 826.469244] ? __radix_tree_lookup+0x2b/0x130 [ 826.469640] ? fl_get+0x7b/0x140 [cls_flower] [ 826.470042] ? fl_mask_put+0x200/0x200 [cls_flower] [ 826.470478] ? __mutex_unlock_slowpath.constprop.0+0x210/0x210 [ 826.470973] ? fl_tmplt_create+0x2d0/0x2d0 [cls_flower] [ 826.471427] tc_new_tfilter+0x644/0x1050 [ 826.471795] ? tc_get_tfilter+0x860/0x860 [ 826.472170] ? __thaw_task+0x130/0x130 [ 826.472525] ? arch_stack_walk+0x98/0xf0 [ 826.472892] ? cap_capable+0x9f/0xd0 [ 826.473235] ? security_capable+0x47/0x60 [ 826.473608] rtnetlink_rcv_msg+0x1d5/0x550 [ 826.473985] ? rtnl_calcit.isra.0+0x1f0/0x1f0 [ 826.474383] ? __stack_depot_save+0x35/0x4c0 [ 826.474779] ? kasan_save_stack+0x2e/0x40 [ 826.475149] ? kasan_save_stack+0x1e/0x40 [ 826.475518] ? __kasan_record_aux_stack+0x9f/0xb0 [ 826.475939] ? task_work_add+0x77/0x1c0 [ 826.476305] netlink_rcv_skb+0xe0/0x210 [ 826.476661] ? rtnl_calcit.isra.0+0x1f0/0x1f0 [ 826.477057] ? netlink_ack+0x7c0/0x7c0 [ 826.477412] ? rhashtable_jhash2+0xef/0x150 [ 826.477796] ? _copy_from_iter+0x105/0x770 [ 826.484386] netlink_unicast+0x346/0x490 [ 826.484755] ? netlink_attachskb+0x400/0x400 [ 826.485145] ? kernel_text_address+0xc2/0xd0 [ 826.485535] netlink_sendmsg+0x3b0/0x6c0 [ 826.485902] ? kernel_text_address+0xc2/0xd0 [ 826.486296] ? netlink_unicast+0x490/0x490 [ 826.486671] ? iovec_from_user.part.0+0x7a/0x1a0 [ 826.487083] ? netlink_unicast+0x490/0x490 [ 826.487461] sock_sendmsg+0x73/0xc0 [ 826.487803] ____sys_sendmsg+0x364/0x380 [ 826.488186] ? import_iovec+0x7/0x10 [ 826.488531] ? kernel_sendmsg+0x30/0x30 [ 826.488893] ? __copy_msghdr+0x180/0x180 [ 826.489258] ? kasan_save_stack+0x2e/0x40 [ 826.489629] ? kasan_save_stack+0x1e/0x40 [ 826.490002] ? __kasan_record_aux_stack+0x9f/0xb0 [ 826.490424] ? __call_rcu_common.constprop.0+0x46/0x580 [ 826.490876] ___sys_sendmsg+0xdf/0x140 [ 826.491231] ? copy_msghdr_from_user+0x110/0x110 [ 826.491649] ? fget_raw+0x120/0x120 [ 826.491988] ? ___sys_recvmsg+0xd9/0x130 [ 826.492355] ? folio_batch_add_and_move+0x80/0xa0 [ 826.492776] ? _raw_spin_lock+0x7a/0xd0 [ 826.493137] ? _raw_spin_lock+0x7a/0xd0 [ 826.493500] ? _raw_read_lock_irq+0x30/0x30 [ 826.493880] ? kasan_set_track+0x21/0x30 [ 826.494249] ? kasan_save_free_info+0x2a/0x40 [ 826.494650] ? do_sys_openat2+0xff/0x270 [ 826.495016] ? __fget_light+0x1b5/0x200 [ 826.495377] ? __virt_addr_valid+0xb1/0x130 [ 826.495763] __sys_sendmsg+0xb2/0x130 [ 826.496118] ? __sys_sendmsg_sock+0x20/0x20 [ 826.496501] ? __x64_sys_rseq+0x2e0/0x2e0 [ 826.496874] ? do_user_addr_fault+0x276/0x820 [ 826.497273] ? fpregs_assert_state_consistent+0x52/0x60 [ 826.497727] ? exit_to_user_mode_prepare+0x30/0x120 [ 826.498158] do_syscall_64+0x3d/0x90 [ 826.498502] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 826.498949] RIP: 0033:0x7f9b67f4f887 [ 826.499294] Code: 0a 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b9 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10 [ 826.500742] RSP: 002b:00007fff5d1a5498 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 826.501395] RAX: ffffffffffffffda RBX: 0000000064413ce6 RCX: 00007f9b67f4f887 [ 826.501975] RDX: 0000000000000000 RSI: 00007fff5d1a5500 RDI: 0000000000000003 [ 826.502556] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001 [ 826.503135] R10: 00007f9b67e08708 R11: 0000000000000246 R12: 0000000000000001 [ 826.503714] R13: 0000000000000001 R14: 00007fff5d1a9800 R15: 0000000000485400 [ 826.504304] [ 826.504753] Allocated by task 3764: [ 826.505090] kasan_save_stack+0x1e/0x40 [ 826.505453] kasan_set_track+0x21/0x30 [ 826.505810] __kasan_kmalloc+0x77/0x90 [ 826.506164] __mlx5_create_flow_table+0x16d/0xbb0 [mlx5_core] [ 826.506742] esw_offloads_enable+0x60d/0xfb0 [mlx5_core] [ 826.507292] mlx5_eswitch_enable_locked+0x4d3/0x680 [mlx5_core] [ 826.507885] mlx5_devlink_eswitch_mode_set+0x2a3/0x580 [mlx5_core] [ 826.508513] devlink_nl_cmd_eswitch_set_doit+0xdf/0x1f0 [ 826.508969] genl_family_rcv_msg_doit.isra.0+0x146/0x1c0 [ 826.509427] genl_rcv_msg+0x28d/0x3e0 [ 826.509772] netlink_rcv_skb+0xe0/0x210 [ 826.510133] genl_rcv+0x24/0x40 [ 826.510448] netlink_unicast+0x346/0x490 [ 826.510810] netlink_sendmsg+0x3b0/0x6c0 [ 826.511179] sock_sendmsg+0x73/0xc0 [ 826.511519] __sys_sendto+0x18d/0x220 [ 826.511867] __x64_sys_sendto+0x72/0x80 [ 826.512232] do_syscall_64+0x3d/0x90 [ 826.512576] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 826.513220] Freed by task 5674: [ 826.513535] kasan_save_stack+0x1e/0x40 [ 826.513893] kasan_set_track+0x21/0x30 [ 826.514245] kasan_save_free_info+0x2a/0x40 [ 826.514629] ____kasan_slab_free+0x11a/0x1b0 [ 826.515021] __kmem_cache_free+0x14d/0x280 [ 826.515399] tree_put_node+0x109/0x1c0 [mlx5_core] [ 826.515907] mlx5_destroy_flow_table+0x119/0x630 [mlx5_core] [ 826.516481] esw_offloads_steering_cleanup+0xe7/0x150 [mlx5_core] [ 826.517084] esw_offloads_disable+0xe0/0x160 [mlx5_core] [ 826.517632] mlx5_eswitch_disable_locked+0x26c/0x290 [mlx5_core] [ 826.518225] mlx5_devlink_eswitch_mode_set+0x128/0x580 [mlx5_core] [ 826.518834] devlink_nl_cmd_eswitch_set_doit+0xdf/0x1f0 [ 826.519286] genl_family_rcv_msg_doit.isra.0+0x146/0x1c0 [ 826.519748] genl_rcv_msg+0x28d/0x3e0 [ 826.520101] netlink_rcv_skb+0xe0/0x210 [ 826.520458] genl_rcv+0x24/0x40 [ 826.520771] netlink_unicast+0x346/0x490 [ 826.521137] netlink_sendmsg+0x3b0/0x6c0 [ 826.521505] sock_sendmsg+0x73/0xc0 [ 826.521842] __sys_sendto+0x18d/0x220 [ 826.522191] __x64_sys_sendto+0x72/0x80 [ 826.522554] do_syscall_64+0x3d/0x90 [ 826.522894] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 826.523540] Last potentially related work creation: [ 826.523969] kasan_save_stack+0x1e/0x40 [ 826.524331] __kasan_record_aux_stack+0x9f/0xb0 [ 826.524739] insert_work+0x30/0x130 [ 826.525078] __queue_work+0x34b/0x690 [ 826.525426] queue_work_on+0x48/0x50 [ 826.525766] __rhashtable_remove_fast_one+0x4af/0x4d0 [mlx5_core] [ 826.526365] del_sw_flow_group+0x1b5/0x270 [mlx5_core] [ 826.526898] tree_put_node+0x109/0x1c0 [mlx5_core] [ 826.527407] esw_offloads_steering_cleanup+0xd3/0x150 [mlx5_core] [ 826.528009] esw_offloads_disable+0xe0/0x160 [mlx5_core] [ 826.528616] mlx5_eswitch_disable_locked+0x26c/0x290 [mlx5_core] [ 826.529218] mlx5_devlink_eswitch_mode_set+0x128/0x580 [mlx5_core] [ 826.529823] devlink_nl_cmd_eswitch_set_doit+0xdf/0x1f0 [ 826.530276] genl_family_rcv_msg_doit.isra.0+0x146/0x1c0 [ 826.530733] genl_rcv_msg+0x28d/0x3e0 [ 826.531079] netlink_rcv_skb+0xe0/0x210 [ 826.531439] genl_rcv+0x24/0x40 [ 826.531755] netlink_unicast+0x346/0x490 [ 826.532123] netlink_sendmsg+0x3b0/0x6c0 [ 826.532487] sock_sendmsg+0x73/0xc0 [ 826.532825] __sys_sendto+0x18d/0x220 [ 826.533175] __x64_sys_sendto+0x72/0x80 [ 826.533533] do_syscall_64+0x3d/0x90 [ 826.533877] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 826.534521] The buggy address belongs to the object at ffff888194485800 which belongs to the cache kmalloc-512 of size 512 [ 826.535506] The buggy address is located 48 bytes inside of freed 512-byte region [ffff888194485800, ffff888194485a00) [ 826.536666] The buggy address belongs to the physical page: [ 826.537138] page:00000000d75841dd refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x194480 [ 826.537915] head:00000000d75841dd order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 826.538595] flags: 0x200000000010200(slab|head|node=0|zone=2) [ 826.539089] raw: 0200000000010200 ffff888100042c80 ffffea0004523800 dead000000000002 [ 826.539755] raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000 [ 826.540417] page dumped because: kasan: bad access detected [ 826.541095] Memory state around the buggy address: [ 826.541519] ffff888194485700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 826.542149] ffff888194485780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 826.542773] >ffff888194485800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 826.543400] ^ [ 826.543822] ffff888194485880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 826.544452] ffff888194485900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 826.545079] ================================================================== Fixes: 6702782845a5 ("net/mlx5e: TC, Set CT miss to the specific ct action instance") Signed-off-by: Paul Blakey Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit 7aa50380191635e5897a773f272829cc961a2be5 Author: Rahul Rameshbabu Date: Tue Feb 21 16:18:48 2023 -0800 net/mlx5e: Fix SQ wake logic in ptp napi_poll context Check in the mlx5e_ptp_poll_ts_cq context if the ptp tx sq should be woken up. Before change, the ptp tx sq may never wake up if the ptp tx ts skb fifo is full when mlx5e_poll_tx_cq checks if the queue should be woken up. Fixes: 1880bc4e4a96 ("net/mlx5e: Add TX port timestamp support") Signed-off-by: Rahul Rameshbabu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 691c041bf20899fc13c793f92ba61ab660fa3a30 Author: Vlad Buslov Date: Fri Mar 31 14:20:51 2023 +0200 net/mlx5e: Fix deadlock in tc route query code Cited commit causes ABBA deadlock[0] when peer flows are created while holding the devcom rw semaphore. Due to peer flows offload implementation the lock is taken much higher up the call chain and there is no obvious way to easily fix the deadlock. Instead, since tc route query code needs the peer eswitch structure only to perform a lookup in xarray and doesn't perform any sleeping operations with it, refactor the code for lockless execution in following ways: - RCUify the devcom 'data' pointer. When resetting the pointer synchronously wait for RCU grace period before returning. This is fine since devcom is currently only used for synchronization of pairing/unpairing of eswitches which is rare and already expensive as-is. - Wrap all usages of 'paired' boolean in {READ|WRITE}_ONCE(). The flag has already been used in some unlocked contexts without proper annotations (e.g. users of mlx5_devcom_is_paired() function), but it wasn't an issue since all relevant code paths checked it again after obtaining the devcom semaphore. Now it is also used by mlx5_devcom_get_peer_data_rcu() as "best effort" check to return NULL when devcom is being unpaired. Note that while RCU read lock doesn't prevent the unpaired flag from being changed concurrently it still guarantees that reader can continue to use 'data'. - Refactor mlx5e_tc_query_route_vport() function to use new mlx5_devcom_get_peer_data_rcu() API which fixes the deadlock. [0]: [ 164.599612] ====================================================== [ 164.600142] WARNING: possible circular locking dependency detected [ 164.600667] 6.3.0-rc3+ #1 Not tainted [ 164.601021] ------------------------------------------------------ [ 164.601557] handler1/3456 is trying to acquire lock: [ 164.601998] ffff88811f1714b0 (&esw->offloads.encap_tbl_lock){+.+.}-{3:3}, at: mlx5e_attach_encap+0xd8/0x8b0 [mlx5_core] [ 164.603078] but task is already holding lock: [ 164.603617] ffff88810137fc98 (&comp->sem){++++}-{3:3}, at: mlx5_devcom_get_peer_data+0x37/0x80 [mlx5_core] [ 164.604459] which lock already depends on the new lock. [ 164.605190] the existing dependency chain (in reverse order) is: [ 164.605848] -> #1 (&comp->sem){++++}-{3:3}: [ 164.606380] down_read+0x39/0x50 [ 164.606772] mlx5_devcom_get_peer_data+0x37/0x80 [mlx5_core] [ 164.607336] mlx5e_tc_query_route_vport+0x86/0xc0 [mlx5_core] [ 164.607914] mlx5e_tc_tun_route_lookup+0x1a4/0x1d0 [mlx5_core] [ 164.608495] mlx5e_attach_decap_route+0xc6/0x1e0 [mlx5_core] [ 164.609063] mlx5e_tc_add_fdb_flow+0x1ea/0x360 [mlx5_core] [ 164.609627] __mlx5e_add_fdb_flow+0x2d2/0x430 [mlx5_core] [ 164.610175] mlx5e_configure_flower+0x952/0x1a20 [mlx5_core] [ 164.610741] tc_setup_cb_add+0xd4/0x200 [ 164.611146] fl_hw_replace_filter+0x14c/0x1f0 [cls_flower] [ 164.611661] fl_change+0xc95/0x18a0 [cls_flower] [ 164.612116] tc_new_tfilter+0x3fc/0xd20 [ 164.612516] rtnetlink_rcv_msg+0x418/0x5b0 [ 164.612936] netlink_rcv_skb+0x54/0x100 [ 164.613339] netlink_unicast+0x190/0x250 [ 164.613746] netlink_sendmsg+0x245/0x4a0 [ 164.614150] sock_sendmsg+0x38/0x60 [ 164.614522] ____sys_sendmsg+0x1d0/0x1e0 [ 164.614934] ___sys_sendmsg+0x80/0xc0 [ 164.615320] __sys_sendmsg+0x51/0x90 [ 164.615701] do_syscall_64+0x3d/0x90 [ 164.616083] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 164.616568] -> #0 (&esw->offloads.encap_tbl_lock){+.+.}-{3:3}: [ 164.617210] __lock_acquire+0x159e/0x26e0 [ 164.617638] lock_acquire+0xc2/0x2a0 [ 164.618018] __mutex_lock+0x92/0xcd0 [ 164.618401] mlx5e_attach_encap+0xd8/0x8b0 [mlx5_core] [ 164.618943] post_process_attr+0x153/0x2d0 [mlx5_core] [ 164.619471] mlx5e_tc_add_fdb_flow+0x164/0x360 [mlx5_core] [ 164.620021] __mlx5e_add_fdb_flow+0x2d2/0x430 [mlx5_core] [ 164.620564] mlx5e_configure_flower+0xe33/0x1a20 [mlx5_core] [ 164.621125] tc_setup_cb_add+0xd4/0x200 [ 164.621531] fl_hw_replace_filter+0x14c/0x1f0 [cls_flower] [ 164.622047] fl_change+0xc95/0x18a0 [cls_flower] [ 164.622500] tc_new_tfilter+0x3fc/0xd20 [ 164.622906] rtnetlink_rcv_msg+0x418/0x5b0 [ 164.623324] netlink_rcv_skb+0x54/0x100 [ 164.623727] netlink_unicast+0x190/0x250 [ 164.624138] netlink_sendmsg+0x245/0x4a0 [ 164.624544] sock_sendmsg+0x38/0x60 [ 164.624919] ____sys_sendmsg+0x1d0/0x1e0 [ 164.625340] ___sys_sendmsg+0x80/0xc0 [ 164.625731] __sys_sendmsg+0x51/0x90 [ 164.626117] do_syscall_64+0x3d/0x90 [ 164.626502] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 164.626995] other info that might help us debug this: [ 164.627725] Possible unsafe locking scenario: [ 164.628268] CPU0 CPU1 [ 164.628683] ---- ---- [ 164.629098] lock(&comp->sem); [ 164.629421] lock(&esw->offloads.encap_tbl_lock); [ 164.630066] lock(&comp->sem); [ 164.630555] lock(&esw->offloads.encap_tbl_lock); [ 164.630993] *** DEADLOCK *** [ 164.631575] 3 locks held by handler1/3456: [ 164.631962] #0: ffff888124b75130 (&block->cb_lock){++++}-{3:3}, at: tc_setup_cb_add+0x5b/0x200 [ 164.632703] #1: ffff888116e512b8 (&esw->mode_lock){++++}-{3:3}, at: mlx5_esw_hold+0x39/0x50 [mlx5_core] [ 164.633552] #2: ffff88810137fc98 (&comp->sem){++++}-{3:3}, at: mlx5_devcom_get_peer_data+0x37/0x80 [mlx5_core] [ 164.634435] stack backtrace: [ 164.634883] CPU: 17 PID: 3456 Comm: handler1 Not tainted 6.3.0-rc3+ #1 [ 164.635431] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 164.636340] Call Trace: [ 164.636616] [ 164.636863] dump_stack_lvl+0x47/0x70 [ 164.637217] check_noncircular+0xfe/0x110 [ 164.637601] __lock_acquire+0x159e/0x26e0 [ 164.637977] ? mlx5_cmd_set_fte+0x5b0/0x830 [mlx5_core] [ 164.638472] lock_acquire+0xc2/0x2a0 [ 164.638828] ? mlx5e_attach_encap+0xd8/0x8b0 [mlx5_core] [ 164.639339] ? lock_is_held_type+0x98/0x110 [ 164.639728] __mutex_lock+0x92/0xcd0 [ 164.640074] ? mlx5e_attach_encap+0xd8/0x8b0 [mlx5_core] [ 164.640576] ? __lock_acquire+0x382/0x26e0 [ 164.640958] ? mlx5e_attach_encap+0xd8/0x8b0 [mlx5_core] [ 164.641468] ? mlx5e_attach_encap+0xd8/0x8b0 [mlx5_core] [ 164.641965] mlx5e_attach_encap+0xd8/0x8b0 [mlx5_core] [ 164.642454] ? lock_release+0xbf/0x240 [ 164.642819] post_process_attr+0x153/0x2d0 [mlx5_core] [ 164.643318] mlx5e_tc_add_fdb_flow+0x164/0x360 [mlx5_core] [ 164.643835] __mlx5e_add_fdb_flow+0x2d2/0x430 [mlx5_core] [ 164.644340] mlx5e_configure_flower+0xe33/0x1a20 [mlx5_core] [ 164.644862] ? lock_acquire+0xc2/0x2a0 [ 164.645219] tc_setup_cb_add+0xd4/0x200 [ 164.645588] fl_hw_replace_filter+0x14c/0x1f0 [cls_flower] [ 164.646067] fl_change+0xc95/0x18a0 [cls_flower] [ 164.646488] tc_new_tfilter+0x3fc/0xd20 [ 164.646861] ? tc_del_tfilter+0x810/0x810 [ 164.647236] rtnetlink_rcv_msg+0x418/0x5b0 [ 164.647621] ? rtnl_setlink+0x160/0x160 [ 164.647982] netlink_rcv_skb+0x54/0x100 [ 164.648348] netlink_unicast+0x190/0x250 [ 164.648722] netlink_sendmsg+0x245/0x4a0 [ 164.649090] sock_sendmsg+0x38/0x60 [ 164.649434] ____sys_sendmsg+0x1d0/0x1e0 [ 164.649804] ? copy_msghdr_from_user+0x6d/0xa0 [ 164.650213] ___sys_sendmsg+0x80/0xc0 [ 164.650563] ? lock_acquire+0xc2/0x2a0 [ 164.650926] ? lock_acquire+0xc2/0x2a0 [ 164.651286] ? __fget_files+0x5/0x190 [ 164.651644] ? find_held_lock+0x2b/0x80 [ 164.652006] ? __fget_files+0xb9/0x190 [ 164.652365] ? lock_release+0xbf/0x240 [ 164.652723] ? __fget_files+0xd3/0x190 [ 164.653079] __sys_sendmsg+0x51/0x90 [ 164.653435] do_syscall_64+0x3d/0x90 [ 164.653784] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 164.654229] RIP: 0033:0x7f378054f8bd [ 164.654577] Code: 28 89 54 24 1c 48 89 74 24 10 89 7c 24 08 e8 6a c3 f4 ff 8b 54 24 1c 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 33 44 89 c7 48 89 44 24 08 e8 be c3 f4 ff 48 [ 164.656041] RSP: 002b:00007f377fa114b0 EFLAGS: 00000293 ORIG_RAX: 000000000000002e [ 164.656701] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f378054f8bd [ 164.657297] RDX: 0000000000000000 RSI: 00007f377fa11540 RDI: 0000000000000014 [ 164.657885] RBP: 00007f377fa12278 R08: 0000000000000000 R09: 000000000000015c [ 164.658472] R10: 00007f377fa123d0 R11: 0000000000000293 R12: 0000560962d99bd0 [ 164.665317] R13: 0000000000000000 R14: 0000560962d99bd0 R15: 00007f377fa11540 Fixes: f9d196bd632b ("net/mlx5e: Use correct eswitch for stack devices with lag") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Reviewed-by: Shay Drory Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit a65735148e0328f80c0f72f9f8d2f609bfcf4aff Author: Roi Dayan Date: Mon May 1 14:37:56 2023 +0300 net/mlx5: Fix error message when failing to allocate device memory Fix spacing for the error and also the correct error code pointer. Fixes: c9b9dcb430b3 ("net/mlx5: Move device memory management to mlx5_core") Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit be071cdb167fc3e25fe81922166b3d499d23e8ac Author: Vlad Buslov Date: Mon Apr 3 22:26:00 2023 +0200 net/mlx5e: Use correct encap attribute during invalidation With introduction of post action infrastructure most of the users of encap attribute had been modified in order to obtain the correct attribute by calling mlx5e_tc_get_encap_attr() helper instead of assuming encap action is always on default attribute. However, the cited commit didn't modify mlx5e_invalidate_encap() which prevents it from destroying correct modify header action which leads to a warning [0]. Fix the issue by using correct attribute. [0]: Feb 21 09:47:35 c-237-177-40-045 kernel: WARNING: CPU: 17 PID: 654 at drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:684 mlx5e_tc_attach_mod_hdr+0x1cc/0x230 [mlx5_core] Feb 21 09:47:35 c-237-177-40-045 kernel: RIP: 0010:mlx5e_tc_attach_mod_hdr+0x1cc/0x230 [mlx5_core] Feb 21 09:47:35 c-237-177-40-045 kernel: Call Trace: Feb 21 09:47:35 c-237-177-40-045 kernel: Feb 21 09:47:35 c-237-177-40-045 kernel: mlx5e_tc_fib_event_work+0x8e3/0x1f60 [mlx5_core] Feb 21 09:47:35 c-237-177-40-045 kernel: ? mlx5e_take_all_encap_flows+0xe0/0xe0 [mlx5_core] Feb 21 09:47:35 c-237-177-40-045 kernel: ? lock_downgrade+0x6d0/0x6d0 Feb 21 09:47:35 c-237-177-40-045 kernel: ? lockdep_hardirqs_on_prepare+0x273/0x3f0 Feb 21 09:47:35 c-237-177-40-045 kernel: ? lockdep_hardirqs_on_prepare+0x273/0x3f0 Feb 21 09:47:35 c-237-177-40-045 kernel: process_one_work+0x7c2/0x1310 Feb 21 09:47:35 c-237-177-40-045 kernel: ? lockdep_hardirqs_on_prepare+0x3f0/0x3f0 Feb 21 09:47:35 c-237-177-40-045 kernel: ? pwq_dec_nr_in_flight+0x230/0x230 Feb 21 09:47:35 c-237-177-40-045 kernel: ? rwlock_bug.part.0+0x90/0x90 Feb 21 09:47:35 c-237-177-40-045 kernel: worker_thread+0x59d/0xec0 Feb 21 09:47:35 c-237-177-40-045 kernel: ? __kthread_parkme+0xd9/0x1d0 Fixes: 8300f225268b ("net/mlx5e: Create new flow attr for multi table actions") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit c7dd225bc224726c22db08e680bf787f60ebdee3 Author: Yevgeny Kliteynik Date: Sun Apr 2 17:14:10 2023 +0300 net/mlx5: DR, Check force-loopback RC QP capability independently from RoCE SW Steering uses RC QP for writing STEs to ICM. This writingis done in LB (loopback), and FL (force-loopback) QP is preferred for performance. FL is available when RoCE is enabled or disabled based on RoCE caps. This patch adds reading of FL capability from HCA caps in addition to the existing reading from RoCE caps, thus fixing the case where we didn't have loopback enabled when RoCE was disabled. Fixes: 7304d603a57a ("net/mlx5: DR, Add support for force-loopback QP") Signed-off-by: Itamar Gozlan Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 1e5daf5565b61a96e570865091589afc9156e3d3 Author: Erez Shitrit Date: Thu Mar 9 16:43:15 2023 +0200 net/mlx5: DR, Fix crc32 calculation to work on big-endian (BE) CPUs When calculating crc for hash index we use the function crc32 that calculates for little-endian (LE) arch. Then we convert it to network endianness using htonl(), but it's wrong to do the conversion in BE archs since the crc32 value is already LE. The solution is to switch the bytes from the crc result for all types of arc. Fixes: 40416d8ede65 ("net/mlx5: DR, Replace CRC32 implementation to use kernel lib") Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 2be5bd42a5bba1a05daedc86cf0e248210009669 Author: Shay Drory Date: Mon Mar 20 13:07:53 2023 +0200 net/mlx5: Handle pairing of E-switch via uplink un/load APIs In case user switch a device from switchdev mode to legacy mode, mlx5 first unpair the E-switch and afterwards unload the uplink vport. From the other hand, in case user remove or reload a device, mlx5 first unload the uplink vport and afterwards unpair the E-switch. The latter is causing a bug[1], hence, handle pairing of E-switch as part of uplink un/load APIs. [1] In case VF_LAG is used, every tc fdb flow is duplicated to the peer esw. However, the original esw keeps a pointer to this duplicated flow, not the peer esw. e.g.: if user create tc fdb flow over esw0, the flow is duplicated over esw1, in FW/HW, but in SW, esw0 keeps a pointer to the duplicated flow. During module unload while a peer tc fdb flow is still offloaded, in case the first device to be removed is the peer device (esw1 in the example above), the peer net-dev is destroyed, and so the mlx5e_priv is memset to 0. Afterwards, the peer device is trying to unpair himself from the original device (esw0 in the example above). Unpair API invoke the original device to clear peer flow from its eswitch (esw0), but the peer flow, which is stored over the original eswitch (esw0), is trying to use the peer mlx5e_priv, which is memset to 0 and result in bellow kernel-oops. [ 157.964081 ] BUG: unable to handle page fault for address: 000000000002ce60 [ 157.964662 ] #PF: supervisor read access in kernel mode [ 157.965123 ] #PF: error_code(0x0000) - not-present page [ 157.965582 ] PGD 0 P4D 0 [ 157.965866 ] Oops: 0000 [#1] SMP [ 157.967670 ] RIP: 0010:mlx5e_tc_del_fdb_flow+0x48/0x460 [mlx5_core] [ 157.976164 ] Call Trace: [ 157.976437 ] [ 157.976690 ] __mlx5e_tc_del_fdb_peer_flow+0xe6/0x100 [mlx5_core] [ 157.977230 ] mlx5e_tc_clean_fdb_peer_flows+0x67/0x90 [mlx5_core] [ 157.977767 ] mlx5_esw_offloads_unpair+0x2d/0x1e0 [mlx5_core] [ 157.984653 ] mlx5_esw_offloads_devcom_event+0xbf/0x130 [mlx5_core] [ 157.985212 ] mlx5_devcom_send_event+0xa3/0xb0 [mlx5_core] [ 157.985714 ] esw_offloads_disable+0x5a/0x110 [mlx5_core] [ 157.986209 ] mlx5_eswitch_disable_locked+0x152/0x170 [mlx5_core] [ 157.986757 ] mlx5_eswitch_disable+0x51/0x80 [mlx5_core] [ 157.987248 ] mlx5_unload+0x2a/0xb0 [mlx5_core] [ 157.987678 ] mlx5_uninit_one+0x5f/0xd0 [mlx5_core] [ 157.988127 ] remove_one+0x64/0xe0 [mlx5_core] [ 157.988549 ] pci_device_remove+0x31/0xa0 [ 157.988933 ] device_release_driver_internal+0x18f/0x1f0 [ 157.989402 ] driver_detach+0x3f/0x80 [ 157.989754 ] bus_remove_driver+0x70/0xf0 [ 157.990129 ] pci_unregister_driver+0x34/0x90 [ 157.990537 ] mlx5_cleanup+0xc/0x1c [mlx5_core] [ 157.990972 ] __x64_sys_delete_module+0x15a/0x250 [ 157.991398 ] ? exit_to_user_mode_prepare+0xea/0x110 [ 157.991840 ] do_syscall_64+0x3d/0x90 [ 157.992198 ] entry_SYSCALL_64_after_hwframe+0x46/0xb0 Fixes: 04de7dda7394 ("net/mlx5e: Infrastructure for duplicated offloading of TC flows") Fixes: 1418ddd96afd ("net/mlx5e: Duplicate offloaded TC eswitch rules under uplink LAG") Signed-off-by: Shay Drory Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 2a0a935fb64ee8af253b9c6133bb6702fb152ac2 Author: Shay Drory Date: Tue May 2 11:03:53 2023 +0300 net/mlx5: Collect command failures data only for known commands DEVX can issue a general command, which is not used by mlx5 driver. In case such command is failed, mlx5 is trying to collect the failure data, However, mlx5 doesn't create a storage for this command, since mlx5 doesn't use it. This lead to array-index-out-of-bounds error. Fix it by checking whether the command is known before collecting the failure data. Fixes: 34f46ae0d4b3 ("net/mlx5: Add command failures data to debugfs") Signed-off-by: Shay Drory Signed-off-by: Saeed Mahameed commit 18c40a1cc1d990c51381ef48cd93fdb31d5cd903 Author: Chuck Lever Date: Fri May 19 13:08:24 2023 -0400 net/handshake: Fix sock->file allocation sock->file = sock_alloc_file(sock, O_NONBLOCK, NULL); ^^^^ ^^^^ sock_alloc_file() calls release_sock() on error but the left hand side of the assignment dereferences "sock". This isn't the bug and I didn't report this earlier because there is an assert that it doesn't fail. net/handshake/handshake-test.c:221 handshake_req_submit_test4() error: dereferencing freed memory 'sock' net/handshake/handshake-test.c:233 handshake_req_submit_test4() warn: 'req' was already freed. net/handshake/handshake-test.c:254 handshake_req_submit_test5() error: dereferencing freed memory 'sock' net/handshake/handshake-test.c:290 handshake_req_submit_test6() error: dereferencing freed memory 'sock' net/handshake/handshake-test.c:321 handshake_req_cancel_test1() error: dereferencing freed memory 'sock' net/handshake/handshake-test.c:355 handshake_req_cancel_test2() error: dereferencing freed memory 'sock' net/handshake/handshake-test.c:367 handshake_req_cancel_test2() warn: 'req' was already freed. net/handshake/handshake-test.c:395 handshake_req_cancel_test3() error: dereferencing freed memory 'sock' net/handshake/handshake-test.c:407 handshake_req_cancel_test3() warn: 'req' was already freed. net/handshake/handshake-test.c:451 handshake_req_destroy_test1() error: dereferencing freed memory 'sock' net/handshake/handshake-test.c:463 handshake_req_destroy_test1() warn: 'req' was already freed. Reported-by: Dan Carpenter Fixes: 88232ec1ec5e ("net/handshake: Add Kunit tests for the handshake consumer API") Signed-off-by: Chuck Lever Link: https://lore.kernel.org/r/168451609436.45209.15407022385441542980.stgit@oracle-102.nfsv4bat.org Signed-off-by: Jakub Kicinski commit b21c7ba6d9a5532add3827a3b49f49cbc0cb9779 Author: Chuck Lever Date: Fri May 19 13:12:50 2023 -0400 net/handshake: Squelch allocation warning during Kunit test The "handshake_req_alloc excessive privsize" kunit test is intended to check what happens when the maximum privsize is exceeded. The WARN_ON_ONCE_GFP at mm/page_alloc.c:4744 can be disabled safely for this test. Reported-by: Linux Kernel Functional Testing Fixes: 88232ec1ec5e ("net/handshake: Add Kunit tests for the handshake consumer API") Signed-off-by: Chuck Lever Link: https://lore.kernel.org/r/168451636052.47152.9600443326570457947.stgit@oracle-102.nfsv4bat.org Signed-off-by: Jakub Kicinski commit 640bf95b2c7c2981fb471acdafbd3e0458f8390d Author: Christophe JAILLET Date: Sat May 20 11:48:55 2023 +0200 3c589_cs: Fix an error handling path in tc589_probe() Should tc589_config() fail, some resources need to be released as already done in the remove function. Fixes: 15b99ac17295 ("[PATCH] pcmcia: add return value to _config() functions") Signed-off-by: Christophe JAILLET Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/d8593ae867b24c79063646e36f9b18b0790107cb.1684575975.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit 5b17a4971d3b2a073f4078dd65331efbe35baa2d Author: Christophe JAILLET Date: Sat May 20 10:30:17 2023 +0200 forcedeth: Fix an error handling path in nv_probe() If an error occures after calling nv_mgmt_acquire_sema(), it should be undone with a corresponding nv_mgmt_release_sema() call. Add it in the error handling path of the probe as already done in the remove function. Fixes: cac1c52c3621 ("forcedeth: mgmt unit interface") Signed-off-by: Christophe JAILLET Acked-by: Zhu Yanjun Link: https://lore.kernel.org/r/355e9a7d351b32ad897251b6f81b5886fcdc6766.1684571393.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski commit 2bd110339288c18823dcace602b63b0d8627e520 Author: John Sperbeck Date: Sun May 21 19:29:53 2023 +0000 cgroup: always put cset in cgroup_css_set_put_fork A successful call to cgroup_css_set_fork() will always have taken a ref on kargs->cset (regardless of CLONE_INTO_CGROUP), so always do a corresponding put in cgroup_css_set_put_fork(). Without this, a cset and its contained css structures will be leaked for some fork failures. The following script reproduces the leak for a fork failure due to exceeding pids.max in the pids controller. A similar thing can happen if we jump to the bad_fork_cancel_cgroup label in copy_process(). [ -z "$1" ] && echo "Usage $0 pids-root" && exit 1 PID_ROOT=$1 CGROUP=$PID_ROOT/foo [ -e $CGROUP ] && rmdir -f $CGROUP mkdir $CGROUP echo 5 > $CGROUP/pids.max echo $$ > $CGROUP/cgroup.procs fork_bomb() { set -e for i in $(seq 10); do /bin/sleep 3600 & done } (fork_bomb) & wait echo $$ > $PID_ROOT/cgroup.procs kill $(cat $CGROUP/cgroup.procs) rmdir $CGROUP Fixes: ef2c41cf38a7 ("clone3: allow spawning processes into cgroups") Cc: stable@vger.kernel.org # v5.7+ Signed-off-by: John Sperbeck Signed-off-by: Tejun Heo commit ae8373a5add4ea39f032563cf12a02946d1e3546 Merge: 1177dcc963766 ce0b15d11ad83 Author: Linus Torvalds Date: Mon May 22 16:31:28 2023 -0700 Merge tag 'x86_urgent_for_6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Dave Hansen: "This works around and issue where the INVLPG instruction may miss invalidating kernel TLB entries in recent hybrid CPUs. I do expect an eventual microcode fix for this. When the microcode version numbers are known, we can circle back around and add them the model table to disable this workaround" * tag 'x86_urgent_for_6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Avoid incomplete Global INVLPG flushes commit 1177dcc9637661e05c18aa019a49821bcd6b3dc1 Merge: 421ca22e31387 d36f6efbe0cb4 Author: Linus Torvalds Date: Mon May 22 15:35:53 2023 -0700 Merge tag 'modules-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull module fix from Luis Chamberlain: "Only one fix has trickled through. Harshit Mogalapalli found a use-after-free bug through static analysis with smatch" * tag 'modules-6.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: module: Fix use-after-free bug in read_file_mod_stats() commit d54820b22e404b06b2b65877ff802cc7b31688bc Author: Gleb Chesnokov Date: Wed May 17 11:22:35 2023 +0300 scsi: qla2xxx: Fix NULL pointer dereference in target mode When target mode is enabled, the pci_irq_get_affinity() function may return a NULL value in qla_mapq_init_qp_cpu_map() due to the qla24xx_enable_msix() code that handles IRQ settings for target mode. This leads to a crash due to a NULL pointer dereference. This patch fixes the issue by adding a check for the NULL value returned by pci_irq_get_affinity() and introducing a 'cpu_mapped' boolean flag to the qla_qpair structure, ensuring that the qpair's CPU affinity is updated when it has not been mapped to a CPU. Fixes: 1d201c81d4cc ("scsi: qla2xxx: Select qpair depending on which CPU post_cmd() gets called") Signed-off-by: Gleb Chesnokov Link: https://lore.kernel.org/r/56b416f2-4e0f-b6cf-d6d5-b7c372e3c6a2@scst.dev Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit d36f6efbe0cb422fe1e4475717d75f3737088832 Author: Harshit Mogalapalli Date: Thu Apr 27 22:59:33 2023 -0700 module: Fix use-after-free bug in read_file_mod_stats() Smatch warns: kernel/module/stats.c:394 read_file_mod_stats() warn: passing freed memory 'buf' We are passing 'buf' to simple_read_from_buffer() after freeing it. Fix this by changing the order of 'simple_read_from_buffer' and 'kfree'. Fixes: df3e764d8e5c ("module: add debug stats to help identify memory pressure") Signed-off-by: Harshit Mogalapalli Signed-off-by: Luis Chamberlain commit 2a737d3b8c792400118d6cf94958f559de9c5e59 Author: Maurizio Lombardi Date: Mon May 8 18:22:19 2023 +0200 scsi: target: iscsi: Prevent login threads from racing between each other The tpg->np_login_sem is a semaphore that is used to serialize the login process when multiple login threads run concurrently against the same target portal group. The iscsi_target_locate_portal() function finds the tpg, calls iscsit_access_np() against the np_login_sem semaphore and saves the tpg pointer in conn->tpg; If iscsi_target_locate_portal() fails, the caller will check for the conn->tpg pointer and, if it's not NULL, then it will assume that iscsi_target_locate_portal() called iscsit_access_np() on the semaphore. Make sure that conn->tpg gets initialized only if iscsit_access_np() was successful, otherwise iscsit_deaccess_np() may end up being called against a semaphore we never took, allowing more than one thread to access the same tpg. Signed-off-by: Maurizio Lombardi Link: https://lore.kernel.org/r/20230508162219.1731964-4-mlombard@redhat.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit 98a8c2bf938a5973716f280da618077a3d255976 Author: Maurizio Lombardi Date: Mon May 8 18:22:18 2023 +0200 scsi: target: iscsi: Remove unused transport_timer Signed-off-by: Maurizio Lombardi Link: https://lore.kernel.org/r/20230508162219.1731964-3-mlombard@redhat.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit 13247018d68f21e7132924b9853f7e2c423588b6 Author: Maurizio Lombardi Date: Mon May 8 18:22:17 2023 +0200 scsi: target: iscsi: Fix hang in the iSCSI login code If the initiator suddenly stops sending data during a login while keeping the TCP connection open, the login_work won't be scheduled and will never release the login semaphore; concurrent login operations will therefore get stuck and fail. The bug is due to the inability of the login timeout code to properly handle this particular case. Fix the problem by replacing the old per-NP login timer with a new per-connection timer. The timer is started when an initiator connects to the target; if it expires, it sends a SIGINT signal to the thread pointed at by the conn->login_kworker pointer. conn->login_kworker is set by calling the iscsit_set_login_timer_kworker() helper, initially it will point to the np thread; When the login operation's control is in the process of being passed from the NP-thread to login_work, the conn->login_worker pointer is set to NULL. Finally, login_kworker will be changed to point to the worker thread executing the login_work job. If conn->login_kworker is NULL when the timer expires, it means that the login operation hasn't been completed yet but login_work isn't running, in this case the timer will mark the login process as failed and will schedule login_work so the latter will be forced to free the resources it holds. Signed-off-by: Maurizio Lombardi Link: https://lore.kernel.org/r/20230508162219.1731964-2-mlombard@redhat.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit 421ca22e313871d4104617bab077b275b30950ae Merge: 44c026a73be80 43439d858bbae Author: Linus Torvalds Date: Mon May 22 12:01:13 2023 -0700 Merge tag 'nfs-for-6.4-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: "Stable Fix: - Don't change task->tk_status after the call to rpc_exit_task Other Bugfixes: - Convert kmap_atomic() to kmap_local_folio() - Fix a potential double free with READ_PLUS" * tag 'nfs-for-6.4-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: NFSv4.2: Fix a potential double free with READ_PLUS SUNRPC: Don't change task->tk_status after the call to rpc_exit_task NFS: Convert kmap_atomic() to kmap_local_folio() commit ab1de7ead871ebe6d12a774c3c25de0388cde082 Author: Qi Zheng Date: Wed May 17 07:45:45 2023 +0000 cgroup: fix missing cpus_read_{lock,unlock}() in cgroup_transfer_tasks() The commit 4f7e7236435c ("cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock") fixed the deadlock between cgroup_threadgroup_rwsem and cpus_read_lock() by introducing cgroup_attach_{lock,unlock}() and removing cpus_read_{lock,unlock}() from cpuset_attach(). But cgroup_transfer_tasks() was missed and not handled, which will cause th following warning: WARNING: CPU: 0 PID: 589 at kernel/cpu.c:526 lockdep_assert_cpus_held+0x32/0x40 CPU: 0 PID: 589 Comm: kworker/1:4 Not tainted 6.4.0-rc2-next-20230517 #50 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014 Workqueue: events cpuset_hotplug_workfn RIP: 0010:lockdep_assert_cpus_held+0x32/0x40 <...> Call Trace: cpuset_attach+0x40/0x240 cgroup_migrate_execute+0x452/0x5e0 ? _raw_spin_unlock_irq+0x28/0x40 cgroup_transfer_tasks+0x1f3/0x360 ? find_held_lock+0x32/0x90 ? cpuset_hotplug_workfn+0xc81/0xed0 cpuset_hotplug_workfn+0xcb1/0xed0 ? process_one_work+0x248/0x5b0 process_one_work+0x2b9/0x5b0 worker_thread+0x56/0x3b0 ? process_one_work+0x5b0/0x5b0 kthread+0xf1/0x120 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x1f/0x30 So just use the cgroup_attach_{lock,unlock}() helper to fix it. Reported-by: Zhao Gongyi Signed-off-by: Qi Zheng Acked-by: Muchun Song Fixes: 05c7b7a92cc8 ("cgroup/cpuset: Fix a race between cpuset_attach() and cpu hotplug") Cc: stable@vger.kernel.org # v5.17+ Signed-off-by: Tejun Heo commit b34ffb0c6d23583830f9327864b9c1f486003305 Author: Anton Protopopov Date: Mon May 22 15:45:58 2023 +0000 bpf: fix a memory leak in the LRU and LRU_PERCPU hash maps The LRU and LRU_PERCPU maps allocate a new element on update before locking the target hash table bucket. Right after that the maps try to lock the bucket. If this fails, then maps return -EBUSY to the caller without releasing the allocated element. This makes the element untracked: it doesn't belong to either of free lists, and it doesn't belong to the hash table, so can't be re-used; this eventually leads to the permanent -ENOMEM on LRU map updates, which is unexpected. Fix this by returning the element to the local free list if bucket locking fails. Fixes: 20b6cc34ea74 ("bpf: Avoid hashtab deadlock with map_locked") Signed-off-by: Anton Protopopov Link: https://lore.kernel.org/r/20230522154558.2166815-1-aspsk@isovalent.com Signed-off-by: Martin KaFai Lau commit d703797380c540bbeac03f104ebcfc364eaf47cc Author: Helge Deller Date: Wed May 17 15:54:40 2023 +0200 parisc: Flush gatt writes and adjust gatt mask in parisc_agp_mask_memory() Flush caches after changing gatt entries and calculate entry according to SBA requirements. Signed-off-by: Helge Deller commit 59fa12646d9f56c842b4d5b6418ed77af625c588 Author: Helge Deller Date: Wed May 17 15:52:30 2023 +0200 parisc: Improve cache flushing for PCXL in arch_sync_dma_for_cpu() Add comment in arch_sync_dma_for_device() and handle the direction flag in arch_sync_dma_for_cpu(). When receiving data from the device (DMA_FROM_DEVICE) unconditionally purge the data cache in arch_sync_dma_for_cpu(). Signed-off-by: Helge Deller commit 2212fc2acf3f6ee690ea36506fb882a19d1bfcab Author: Jon Pan-Doh Date: Wed Apr 26 13:32:56 2023 -0700 iommu/amd: Fix domain flush size when syncing iotlb When running on an AMD vIOMMU, we observed multiple invalidations (of decreasing power of 2 aligned sizes) when unmapping a single page. Domain flush takes gather bounds (end-start) as size param. However, gather->end is defined as the last inclusive address (start + size - 1). This leads to an off by 1 error. With this patch, verified that 1 invalidation occurs when unmapping a single page. Fixes: a270be1b3fdf ("iommu/amd: Use only natural aligned flushes in a VM") Cc: stable@vger.kernel.org # >= 5.15 Signed-off-by: Jon Pan-Doh Tested-by: Sudheer Dantuluri Suggested-by: Gary Zibrat Reviewed-by: Vasant Hegde Acked-by: Nadav Amit Link: https://lore.kernel.org/r/20230426203256.237116-1-pandoh@google.com Signed-off-by: Joerg Roedel commit 29f54745f24547a84b18582e054df9bea1a7bf3e Author: Jason Gunthorpe Date: Tue Apr 25 16:04:15 2023 -0300 iommu/amd: Add missing domain type checks Drivers are supposed to list the domain types they support in their domain_alloc() ops so when we add new domain types, like BLOCKING or SVA, they don't start breaking. This ended up providing an empty UNMANAGED domain when the core code asked for a BLOCKING domain, which happens to be the fallback for drivers that don't support it, but this is completely wrong for SVA. Check for the DMA types AMD supports and reject every other kind. Fixes: 136467962e49 ("iommu: Add IOMMU SVA domain support") Signed-off-by: Jason Gunthorpe Reviewed-by: Vasant Hegde Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/0-v1-2ac37b893728+da-amd_check_types_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 8ec4e2befef10c7679cd59251956a428e783c0b5 Author: Jerry Snitselaar Date: Thu Apr 20 12:20:13 2023 -0700 iommu/amd: Fix up merge conflict resolution Merge commit e17c6debd4b2 ("Merge branches 'arm/mediatek', 'arm/msm', 'arm/renesas', 'arm/rockchip', 'arm/smmu', 'x86/vt-d' and 'x86/amd' into next") added amd_iommu_init_devices, amd_iommu_uninit_devices, and amd_iommu_init_notifier back to drivers/iommu/amd/amd_iommu.h. The only references to them are here, so clean them up. Fixes: e17c6debd4b2 ("Merge branches 'arm/mediatek', 'arm/msm', 'arm/renesas', 'arm/rockchip', 'arm/smmu', 'x86/vt-d' and 'x86/amd' into next") Cc: Joerg Roedel Cc: Suravee Suthikulpanit Cc: Will Deacon Cc: Robin Murphy Signed-off-by: Jerry Snitselaar Reviewed-by: Vasant Hegde Link: https://lore.kernel.org/r/20230420192013.733331-1-jsnitsel@redhat.com Signed-off-by: Joerg Roedel commit af47b0a24058e56e983881993752f88288ca6511 Author: Joao Martins Date: Wed Apr 19 21:11:54 2023 +0100 iommu/amd: Handle GALog overflows GALog exists to propagate interrupts into all vCPUs in the system when interrupts are marked as non running (e.g. when vCPUs aren't running). A GALog overflow happens when there's in no space in the log to record the GATag of the interrupt. So when the GALOverflow condition happens, the GALog queue is processed and the GALog is restarted, as the IOMMU manual indicates in section "2.7.4 Guest Virtual APIC Log Restart Procedure": | * Wait until MMIO Offset 2020h[GALogRun]=0b so that all request | entries are completed as circumstances allow. GALogRun must be 0b to | modify the guest virtual APIC log registers safely. | * Write MMIO Offset 0018h[GALogEn]=0b. | * As necessary, change the following values (e.g., to relocate or | resize the guest virtual APIC event log): | - the Guest Virtual APIC Log Base Address Register | [MMIO Offset 00E0h], | - the Guest Virtual APIC Log Head Pointer Register | [MMIO Offset 2040h][GALogHead], and | - the Guest Virtual APIC Log Tail Pointer Register | [MMIO Offset 2048h][GALogTail]. | * Write MMIO Offset 2020h[GALOverflow] = 1b to clear the bit (W1C). | * Write MMIO Offset 0018h[GALogEn] = 1b, and either set | MMIO Offset 0018h[GAIntEn] to enable the GA log interrupt or clear | the bit to disable it. Failing to handle the GALog overflow means that none of the VFs (in any guest) will work with IOMMU AVIC forcing the user to power cycle the host. When handling the event it resumes the GALog without resizing much like how it is done in the event handler overflow. The [MMIO Offset 2020h][GALOverflow] bit might be set in status register without the [MMIO Offset 2020h][GAInt] bit, so when deciding to poll for GA events (to clear space in the galog), also check the overflow bit. [suravee: Check for GAOverflow without GAInt, toggle CONTROL_GAINT_EN] Co-developed-by: Suravee Suthikulpanit Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joao Martins Reviewed-by: Vasant Hegde Link: https://lore.kernel.org/r/20230419201154.83880-3-joao.m.martins@oracle.com Signed-off-by: Joerg Roedel commit ed8a2f4ddef2eaaf864ab1efbbca9788187036ab Author: Joao Martins Date: Wed Apr 19 21:11:53 2023 +0100 iommu/amd: Don't block updates to GATag if guest mode is on On KVM GSI routing table updates, specially those where they have vIOMMUs with interrupt remapping enabled (to boot >255vcpus setups without relying on KVM_FEATURE_MSI_EXT_DEST_ID), a VMM may update the backing VF MSIs with a new VCPU affinity. On AMD with AVIC enabled, the new vcpu affinity info is updated via: avic_pi_update_irte() irq_set_vcpu_affinity() amd_ir_set_vcpu_affinity() amd_iommu_{de}activate_guest_mode() Where the IRTE[GATag] is updated with the new vcpu affinity. The GATag contains VM ID and VCPU ID, and is used by IOMMU hardware to signal KVM (via GALog) when interrupt cannot be delivered due to vCPU is in blocking state. The issue is that amd_iommu_activate_guest_mode() will essentially only change IRTE fields on transitions from non-guest-mode to guest-mode and otherwise returns *with no changes to IRTE* on already configured guest-mode interrupts. To the guest this means that the VF interrupts remain affined to the first vCPU they were first configured, and guest will be unable to issue VF interrupts and receive messages like this from spurious interrupts (e.g. from waking the wrong vCPU in GALog): [ 167.759472] __common_interrupt: 3.34 No irq handler for vector [ 230.680927] mlx5_core 0000:00:02.0: mlx5_cmd_eq_recover:247:(pid 3122): Recovered 1 EQEs on cmd_eq [ 230.681799] mlx5_core 0000:00:02.0: wait_func_handle_exec_timeout:1113:(pid 3122): cmd[0]: CREATE_CQ(0x400) recovered after timeout [ 230.683266] __common_interrupt: 3.34 No irq handler for vector Given the fact that amd_ir_set_vcpu_affinity() uses amd_iommu_activate_guest_mode() underneath it essentially means that VCPU affinity changes of IRTEs are nops. Fix it by dropping the check for guest-mode at amd_iommu_activate_guest_mode(). Same thing is applicable to amd_iommu_deactivate_guest_mode() although, even if the IRTE doesn't change underlying DestID on the host, the VFIO IRQ handler will still be able to poke at the right guest-vCPU. Fixes: b9c6ff94e43a ("iommu/amd: Re-factor guest virtual APIC (de-)activation code") Signed-off-by: Joao Martins Reviewed-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20230419201154.83880-2-joao.m.martins@oracle.com Signed-off-by: Joerg Roedel commit ec014683c564fb74fc68e8f5e84691d3b3839d24 Author: Chao Wang Date: Mon Apr 17 03:04:21 2023 +0000 iommu/rockchip: Fix unwind goto issue Smatch complains that drivers/iommu/rockchip-iommu.c:1306 rk_iommu_probe() warn: missing unwind goto? The rk_iommu_probe function, after obtaining the irq value through platform_get_irq, directly returns an error if the returned value is negative, without releasing any resources. Fix this by adding a new error handling label "err_pm_disable" and use a goto statement to redirect to the error handling process. In order to preserve the original semantics, set err to the value of irq. Fixes: 1aa55ca9b14a ("iommu/rockchip: Move irq request past pm_runtime_enable") Signed-off-by: Chao Wang Reviewed-by: Dongliang Mu Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230417030421.2777-1-D202280639@hust.edu.cn Signed-off-by: Joerg Roedel commit e332003bb216a9f91e08004b9e2de0745f321290 Author: Randy Dunlap Date: Thu Mar 30 09:58:17 2023 -0700 iommu: Make IPMMU_VMSA dependencies more strict On riscv64, linux-next-20233030 (and for several days earlier), there is a kconfig warning: WARNING: unmet direct dependencies detected for IOMMU_IO_PGTABLE_LPAE Depends on [n]: IOMMU_SUPPORT [=y] && (ARM || ARM64 || COMPILE_TEST [=n]) && !GENERIC_ATOMIC64 [=n] Selected by [y]: - IPMMU_VMSA [=y] && IOMMU_SUPPORT [=y] && (ARCH_RENESAS [=y] || COMPILE_TEST [=n]) && !GENERIC_ATOMIC64 [=n] and build errors: riscv64-linux-ld: drivers/iommu/io-pgtable-arm.o: in function `.L140': io-pgtable-arm.c:(.init.text+0x1e8): undefined reference to `alloc_io_pgtable_ops' riscv64-linux-ld: drivers/iommu/io-pgtable-arm.o: in function `.L168': io-pgtable-arm.c:(.init.text+0xab0): undefined reference to `free_io_pgtable_ops' riscv64-linux-ld: drivers/iommu/ipmmu-vmsa.o: in function `.L140': ipmmu-vmsa.c:(.text+0xbc4): undefined reference to `free_io_pgtable_ops' riscv64-linux-ld: drivers/iommu/ipmmu-vmsa.o: in function `.L0 ': ipmmu-vmsa.c:(.text+0x145e): undefined reference to `alloc_io_pgtable_ops' Add ARM || ARM64 || COMPILE_TEST dependencies to IPMMU_VMSA to prevent these issues, i.e., so that ARCH_RENESAS on RISC-V is not allowed. This makes the ARCH dependencies become: depends on (ARCH_RENESAS && (ARM || ARM64)) || COMPILE_TEST but that can be a bit hard to read. Fixes: 8292493c22c8 ("riscv: Kconfig.socs: Add ARCH_RENESAS kconfig option") Signed-off-by: Randy Dunlap Suggested-by: Geert Uytterhoeven Cc: Joerg Roedel Cc: Will Deacon Cc: Robin Murphy Cc: iommu@lists.linux.dev Cc: Conor Dooley Cc: Lad Prabhakar Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20230330165817.21920-1-rdunlap@infradead.org Signed-off-by: Joerg Roedel commit 240ca9553fcd8da6851dc6b449996c21344b9b66 Merge: 3a2e3fa795052 25148f57a2a6d Author: Mark Brown Date: Mon May 22 15:48:41 2023 +0100 ASoC: Intel: Fixes Merge series from Amadeusz Sławiński : Series of fixes for issues found during development and testing, primarly for avs driver. commit 45dfbd992923f4df174db4e23b96fca7e30d73e2 Author: Imre Deak Date: Wed May 10 13:31:18 2023 +0300 drm/i915: Fix PIPEDMC disabling for a bigjoiner configuration For a bigjoiner configuration display->crtc_disable() will be called first for the slave CRTCs and then for the master CRTC. However slave CRTCs will be actually disabled only after the master CRTC is disabled (from the encoder disable hooks called with the master CRTC state). Hence the slave PIPEDMCs can be disabled only after the master CRTC is disabled, make this so. intel_encoders_post_pll_disable() must be called only for the master CRTC, as for the other two encoder disable hooks. While at it fix this up as well. This didn't cause a problem, since intel_encoders_post_pll_disable() will call the corresponding hook only for an encoder/connector connected to the given CRTC, however slave CRTCs will have no associated encoder/connector. Fixes: 3af2ff0840be ("drm/i915: Enable a PIPEDMC whenever its corresponding pipe is enabled") Cc: Rodrigo Vivi Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230510103131.1618266-2-imre.deak@intel.com (cherry picked from commit 7eeef32719f6af935a1554813e6bc206446339cd) Signed-off-by: Joonas Lahtinen commit eb799279fb1f9c63c520fe8c1c41cb9154252db6 Author: Tetsuo Handa Date: Thu May 11 22:47:32 2023 +0900 debugobjects: Don't wake up kswapd from fill_pool() syzbot is reporting a lockdep warning in fill_pool() because the allocation from debugobjects is using GFP_ATOMIC, which is (__GFP_HIGH | __GFP_KSWAPD_RECLAIM) and therefore tries to wake up kswapd, which acquires kswapd_wait::lock. Since fill_pool() might be called with arbitrary locks held, fill_pool() should not assume that acquiring kswapd_wait::lock is safe. Use __GFP_HIGH instead and remove __GFP_NORETRY as it is pointless for !__GFP_DIRECT_RECLAIM allocation. Fixes: 3ac7fe5a4aab ("infrastructure to debug (dynamic) objects") Reported-by: syzbot Signed-off-by: Tetsuo Handa Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/6577e1fa-b6ee-f2be-2414-a2b51b1c5e30@I-love.SAKURA.ne.jp Closes: https://syzkaller.appspot.com/bug?extid=fe0c72f0ccbb93786380 commit 81302b1c7c997e8a56c1c2fc63a296ebeb0cd2d0 Author: Takashi Iwai Date: Thu May 18 13:35:20 2023 +0200 ALSA: hda: Fix unhandled register update during auto-suspend period It's reported that the recording started right after the driver probe doesn't work properly, and it turned out that this is related with the codec auto-suspend. Namely, after the probe phase, the usage count goes zero, and the auto-suspend is programmed, but the codec is kept still active until the auto-suspend expiration. When an application (e.g. alsactl) updates the mixer values at this moment, the values are cached but not actually written. Then, starting arecord thereafter also results in the silence because of the missing unmute. The root cause is the handling of "lazy update" mode; when a mixer value is updated *after* the suspend, it should update only the cache and exits. At the resume, the cached value is written to the device, in turn. The problem is that the current code misinterprets the state of auto-suspend as if it were already suspended. Although we can add the check of the actual device state after pm_runtime_get_if_in_use() for catching the missing state, this won't suffice; the second call of regmap_update_bits_check() will skip writing the register because the cache has been already updated by the first call. So we'd need fixes in two different places. OTOH, a simpler fix is to replace pm_runtime_get_if_in_use() with pm_runtime_get_if_active() (with ign_usage_count=true). This change implies that the driver takes the pm refcount if the device is still in ACTIVE state and continues the processing. A small caveat is that this will leave the auto-suspend timer. But, since the timer callback itself checks the device state and aborts gracefully when it's active, this won't be any substantial problem. Long story short: we address the missing register-write problem just by replacing the pm_runtime_*() call in snd_hda_keep_power_up(). Fixes: fc4f000bf8c0 ("ALSA: hda - Fix unexpected resume through regmap code path") Reported-by: Amadeusz Sławiński Closes: https://lore.kernel.org/r/a7478636-af11-92ab-731c-9b13c582a70d@linux.intel.com Suggested-by: Cezary Rojewski Cc: Link: https://lore.kernel.org/r/20230518113520.15213-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit b845b574f86dcb6a70dfa698aa87a237b0878d2a Author: Finn Thain Date: Sat May 6 19:38:12 2023 +1000 m68k: Move signal frame following exception on 68020/030 On 68030/020, an instruction such as, moveml %a2-%a3/%a5,%sp@- may cause a stack page fault during instruction execution (i.e. not at an instruction boundary) and produce a format 0xB exception frame. In this situation, the value of USP will be unreliable. If a signal is to be delivered following the exception, this USP value is used to calculate the location for a signal frame. This can result in a corrupted user stack. The corruption was detected in dash (actually in glibc) where it showed up as an intermittent "stack smashing detected" message and crash following signal delivery for SIGCHLD. It was hard to reproduce that failure because delivery of the signal raced with the page fault and because the kernel places an unpredictable gap of up to 7 bytes between the USP and the signal frame. A format 0xB exception frame can be produced by a bus error or an address error. The 68030 Users Manual says that address errors occur immediately upon detection during instruction prefetch. The instruction pipeline allows prefetch to overlap with other instructions, which means an address error can arise during the execution of a different instruction. So it seems likely that this patch may help in the address error case also. Reported-and-tested-by: Stan Johnson Link: https://lore.kernel.org/all/CAMuHMdW3yD22_ApemzW_6me3adq6A458u1_F0v-1EYwK_62jPA@mail.gmail.com/ Cc: Michael Schmitz Cc: Andreas Schwab Cc: stable@vger.kernel.org Co-developed-by: Michael Schmitz Signed-off-by: Michael Schmitz Signed-off-by: Finn Thain Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/9e66262a754fcba50208aa424188896cc52a1dd1.1683365892.git.fthain@linux-m68k.org Signed-off-by: Geert Uytterhoeven commit 89c0c62e947a01e7a36b54582fd9c9e346170255 Author: Vineeth Vijayan Date: Thu May 4 20:53:20 2023 +0200 s390/cio: unregister device when the only path is gone Currently, if the device is offline and all the channel paths are either configured or varied offline, the associated subchannel gets unregistered. Don't unregister the subchannel, instead unregister offline device. Signed-off-by: Vineeth Vijayan Reviewed-by: Peter Oberparleiter Signed-off-by: Alexander Gordeev commit 6afe2ae8dc48e643cb9f52e86494b96942440bc6 Author: Charles Keepax Date: Thu May 18 10:39:26 2023 +0100 spi: spi-cadence: Interleave write of TX and read of RX FIFO When working in slave mode it seems the timing is exceedingly tight. The TX FIFO can never empty, because the master is driving the clock so zeros would be sent for those bytes where the FIFO is empty. Return to interleaving the writing of the TX FIFO and the reading of the RX FIFO to try to ensure the data is available when required. Fixes: a84c11e16dc2 ("spi: spi-cadence: Avoid read of RX FIFO before its ready") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20230518093927.711358-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit c21f11d182c2180d8b90eaff84f574cfa845b250 Author: Matthew Auld Date: Fri May 19 10:07:33 2023 +0100 drm: fix drmm_mutex_init() In mutex_init() lockdep identifies a lock by defining a special static key for each lock class. However if we wrap the macro in a function, like in drmm_mutex_init(), we end up generating: int drmm_mutex_init(struct drm_device *dev, struct mutex *lock) { static struct lock_class_key __key; __mutex_init((lock), "lock", &__key); .... } The static __key here is what lockdep uses to identify the lock class, however since this is just a normal function the key here will be created once, where all callers then use the same key. In effect the mutex->depmap.key will be the same pointer for different drmm_mutex_init() callers. This then results in impossible lockdep splats since lockdep thinks completely unrelated locks are the same lock class. To fix this turn drmm_mutex_init() into a macro such that it generates a different "static struct lock_class_key __key" for each invocation, which looks to be inline with what mutex_init() wants. v2: - Revamp the commit message with clearer explanation of the issue. - Rather export __drmm_mutex_release() than static inline. Reported-by: Thomas Hellström Reported-by: Sarah Walker Fixes: e13f13e039dc ("drm: Add DRM-managed mutex_init()") Cc: Stanislaw Gruszka Cc: Boris Brezillon Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Matthew Auld Reviewed-by: Boris Brezillon Reviewed-by: Stanislaw Gruszka Reviewed-by: Lucas De Marchi Acked-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230519090733.489019-1-matthew.auld@intel.com commit 3a2e3fa795052b42da013931bc2e451bcecf4f0c Author: David Epping Date: Fri May 19 13:05:53 2023 +0200 ASoC: dt-bindings: tlv320aic32x4: Fix supply names The term "-supply" is a suffix to regulator names. Signed-off-by: David Epping Link: https://lore.kernel.org/r/20230519110545.GA18663@nucnuc.mle Signed-off-by: Mark Brown commit 25148f57a2a6d157779bae494852e172952ba980 Author: Amadeusz Sławiński Date: Fri May 19 22:17:11 2023 +0200 ASoC: Intel: avs: Add missing checks on FE startup Constraint functions have return values, they should be checked for potential errors. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230519201711.4073845-8-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 320f4d868b83a804e3a4bd61a5b7d0f1db66380e Author: Amadeusz Sławiński Date: Fri May 19 22:17:10 2023 +0200 ASoC: Intel: avs: Fix avs_path_module::instance_id size All IPCs using instance_id use 8 bit value. Original commit used 16 bit value because FW reports possible max value in 16 bit field, but in practice FW limits the value to 8 bits. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230519201711.4073845-7-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 836855100b87b4dd7a82546131779dc255c18b67 Author: Cezary Rojewski Date: Fri May 19 22:17:09 2023 +0200 ASoC: Intel: avs: Account for UID of ACPI device Configurations with multiple codecs attached to the platform are supported but only if each from the set is different. Add new field representing the 'Unique ID' so that codecs that share Vendor and Part IDs can be differentiated and thus enabling support for such configurations. Signed-off-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230519201711.4073845-6-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 1cf036deebcdec46d6348842bd2f8931202fd4cd Author: Cezary Rojewski Date: Fri May 19 22:17:08 2023 +0200 ASoC: Intel: avs: Fix declaration of enum avs_channel_config Constant 'C4_CHANNEL' does not exist on the firmware side. Value 0xC is reserved for 'C7_1' instead. Fixes: 580a5912d1fe ("ASoC: Intel: avs: Declare module configuration types") Signed-off-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230519201711.4073845-5-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 95109657471311601b98e71f03d0244f48dc61bb Author: Cezary Rojewski Date: Fri May 19 22:17:07 2023 +0200 ASoC: Intel: Skylake: Fix declaration of enum skl_ch_cfg Constant 'C4_CHANNEL' does not exist on the firmware side. Value 0xC is reserved for 'C7_1' instead. Fixes: 04afbbbb1cba ("ASoC: Intel: Skylake: Update the topology interface structure") Signed-off-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230519201711.4073845-4-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit d849996f7458042af803b7d15a181922834c5249 Author: Amadeusz Sławiński Date: Fri May 19 22:17:06 2023 +0200 ASoC: Intel: avs: Access path components under lock Path and its components should be accessed under lock to prevent problems with one thread modifying them while other tries to read. Fixes: c8c960c10971 ("ASoC: Intel: avs: APL-based platforms support") Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230519201711.4073845-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit ff04437f6dcd138b50483afc7b313f016020ce8f Author: Amadeusz Sławiński Date: Fri May 19 22:17:05 2023 +0200 ASoC: Intel: avs: Fix module lookup When changing value of kcontrol, FW module to which data should be send needs to be found. Currently it is done in improper way, fix it. Change function name to indicate that it looks only for volume module. This allows to change volume during runtime, instead of only changing init value. Fixes: be2b81b519d7 ("ASoC: Intel: avs: Parse control tuples") Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230519201711.4073845-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 6ca328e985cd995dfd1d5de44046e6074f853fbb Author: Xin Long Date: Thu May 18 16:03:00 2023 -0400 sctp: fix an issue that plpmtu can never go to complete state When doing plpmtu probe, the probe size is growing every time when it receives the ACK during the Search state until the probe fails. When the failure occurs, pl.probe_high is set and it goes to the Complete state. However, if the link pmtu is huge, like 65535 in loopback_dev, the probe eventually keeps using SCTP_MAX_PLPMTU as the probe size and never fails. Because of that, pl.probe_high can not be set, and the plpmtu probe can never go to the Complete state. Fix it by setting pl.probe_high to SCTP_MAX_PLPMTU when the probe size grows to SCTP_MAX_PLPMTU in sctp_transport_pl_recv(). Also, not allow the probe size greater than SCTP_MAX_PLPMTU in the Complete state. Fixes: b87641aff9e7 ("sctp: do state transition when a probe succeeds on HB ACK recv path") Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 7843380d07bbeffd3ce6504e73cf61f840ae76ca Author: Adam Stylinski Date: Sun May 21 10:52:23 2023 -0400 ALSA: hda/ca0132: add quirk for EVGA X299 DARK This quirk is necessary for surround and other DSP effects to work with the onboard ca0132 based audio chipset for the EVGA X299 dark mainboard. Signed-off-by: Adam Stylinski Cc: Link: https://bugzilla.kernel.org/show_bug.cgi?id=67071 Link: https://lore.kernel.org/r/ZGopOe19T1QOwizS@eggsbenedict.adamsnet Signed-off-by: Takashi Iwai commit 4115af49d2c24e840461fb83027315e2d2de6db4 Merge: 44c026a73be80 cddb536a73ef2 Author: Thomas Gleixner Date: Mon May 22 08:11:01 2023 +0200 Merge tag 'irqchip-fixes-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes from Marc Zyngier: - MIPS GIC fixes for issues that could result in either loss of state in the interrupt controller, or a deadlock - Workaround for Mediatek Chromebooks that only save/restore partial state when turning the GIC redistributors off, resulting if fireworks if Linux uses interrupt priorities for pseudo-NMIs - Fix the MBIGEN error handling on init - Mark meson-gpio OF data structures as __maybe_unused, avoiding compilation warnings on non-OF setups Link: https://lore.kernel.org/lkml/20230521101812.2520740-1-maz@kernel.org commit 70c2e03e9aaf17496c63f6e42333c012f5ae5307 Author: Mika Westerberg Date: Wed Mar 29 13:23:04 2023 +0300 thunderbolt: dma_test: Use correct value for absent rings when creating paths Both tb_xdomain_enable_paths() and tb_xdomain_disable_paths() expect -1, not 0, if the corresponding ring is not needed. For this reason change the driver to use correct value for the rings that are not needed. Fixes: 180b0689425c ("thunderbolt: Allow multiple DMA tunnels over a single XDomain connection") Cc: stable@vger.kernel.org Reported-by: Pengfei Xu Tested-by: Pengfei Xu Signed-off-by: Mika Westerberg commit 44c026a73be8038f03dbdeef028b642880cf1511 Author: Linus Torvalds Date: Sun May 21 14:05:48 2023 -0700 Linux 6.4-rc3 commit fa4fe8ce4256bee870eae1c4a5b33ad463590230 Merge: a35747c3107eb 73a23d7710331 Author: Linus Torvalds Date: Sun May 21 14:03:22 2023 -0700 Merge tag 'uml-for-linus-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux Pull UML fix from Richard Weinberger: - Fix modular build for UML watchdog * tag 'uml-for-linus-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: um: harddog: fix modular build commit a35747c3107ebb8ef2749d4dabaf71c205e0d0fe Merge: c47d122c5ba5f b9846a698c9af Author: Linus Torvalds Date: Sun May 21 13:58:37 2023 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM: - Plug a race in the stage-2 mapping code where the IPA and the PA would end up being out of sync - Make better use of the bitmap API (bitmap_zero, bitmap_zalloc...) - FP/SVE/SME documentation update, in the hope that this field becomes clearer... - Add workaround for Apple SEIS brokenness to a new SoC - Random comment fixes x86: - add MSR_IA32_TSX_CTRL into msrs_to_save - fixes for XCR0 handling in SGX enclaves Generic: - Fix vcpu_array[0] races - Fix race between starting a VM and 'reboot -f'" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: VMX: add MSR_IA32_TSX_CTRL into msrs_to_save KVM: x86: Don't adjust guest's CPUID.0x12.1 (allowed SGX enclave XFRM) KVM: VMX: Don't rely _only_ on CPUID to enforce XCR0 restrictions for ECREATE KVM: Fix vcpu_array[0] races KVM: VMX: Fix header file dependency of asm/vmx.h KVM: Don't enable hardware after a restart/shutdown is initiated KVM: Use syscore_ops instead of reboot_notifier to hook restart/shutdown KVM: arm64: vgic: Add Apple M2 PRO/MAX cpus to the list of broken SEIS implementations KVM: arm64: Clarify host SME state management KVM: arm64: Restructure check for SVE support in FP trap handler KVM: arm64: Document check for TIF_FOREIGN_FPSTATE KVM: arm64: Fix repeated words in comments KVM: arm64: Constify start/end/phys fields of the pgtable walker data KVM: arm64: Infer PA offset from VA in hyp map walker KVM: arm64: Infer the PA offset from IPA in stage-2 map walker KVM: arm64: Use the bitmap API to allocate bitmaps KVM: arm64: Slightly optimize flush_context() commit c47d122c5ba5f3b3371cfe051d770b5bbd591f6b Merge: 4927cb98f0eea 4e111f0cf0ee9 Author: Linus Torvalds Date: Sun May 21 13:24:59 2023 -0700 Merge tag 'perf-tools-fixes-for-v6.4-1-2023-05-20' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fail graciously if BUILD_BPF_SKEL=1 is specified and clang isn't available - Add empty 'struct rq' to 'perf lock contention' to satisfy libbpf 'runqueue' type verification. This feature is built only with BUILD_BPF_SKEL=1 - Make vmlinux.h use bpf.h and perf_event.h in source directory, not system ones that may be old and not have things like 'union perf_sample_weight' - Add system include paths to BPF builds to pick things missing in the headers included by clang -target bpf - Update various header copies with the kernel sources - Change divide by zero and not supported events behavior to show 'nan'/'not counted' in 'perf stat' output. This happens when using things like 'perf stat -M TopdownL2 true', involving JSON metrics - Update no event/metric expectations affected by using JSON metrics in 'perf stat -ddd' perf test - Avoid segv with 'perf stat --topdown' for metrics without a group - Do not assume which events may have a PMU name, allowing the logic to keep an AUX event group together. Makes this usecase work again: $ perf record --no-bpf-event -c 10 -e '{intel_pt//,tlb_flush.stlb_any/aux-sample-size=8192/pp}:u' -- sleep 0.1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.078 MB perf.data ] $ perf script -F-dso,+addr | grep -C5 tlb_flush.stlb_any | head -11 sleep 20444 [003] 7939.510243: 1 branches:uH: 7f5350cc82a2 dl_main+0x9a2 => 7f5350cb38f0 _dl_add_to_namespace_list+0x0 sleep 20444 [003] 7939.510243: 1 branches:uH: 7f5350cb3908 _dl_add_to_namespace_list+0x18 => 7f5350cbb080 rtld_mutex_dummy+0x0 sleep 20444 [003] 7939.510243: 1 branches:uH: 7f5350cc8350 dl_main+0xa50 => 0 [unknown] sleep 20444 [003] 7939.510244: 1 branches:uH: 7f5350cc83ca dl_main+0xaca => 7f5350caeb60 _dl_process_pt_gnu_property+0x0 sleep 20444 [003] 7939.510245: 1 branches:uH: 7f5350caeb60 _dl_process_pt_gnu_property+0x0 => 0 [unknown] sleep 20444 7939.510245: 10 tlb_flush.stlb_any/aux-sample-size=8192/pp: 0 7f5350caeb60 _dl_process_pt_gnu_property+0x0 sleep 20444 [003] 7939.510254: 1 branches:uH: 7f5350cc87fe dl_main+0xefe => 7f5350ccd240 strcmp+0x0 sleep 20444 [003] 7939.510254: 1 branches:uH: 7f5350cc8862 dl_main+0xf62 => 0 [unknown] - Add a check for the above use case in 'perf test test_intel_pt' - Fix build with refcount checking on arm64, it was still accessing fields that need to be wrapped so that the refcounted struct gets checked - Fix contextid validation in ARM's CS-ETM, so that older kernels without that field can still be supported - Skip unsupported aggregation for stat events found in perf.data files in 'perf script' - Add stat test for record and script to check the previous problem - Remove needless debuginfod queries from 'perf test java symbol', this was just making the test take a long time to complete - Address python SafeConfigParser() deprecation warning in 'perf test attr' - Fix __NR_execve undeclared on i386 'perf bench syscall' build error * tag 'perf-tools-fixes-for-v6.4-1-2023-05-20' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (33 commits) perf bench syscall: Fix __NR_execve undeclared build error perf test attr: Fix python SafeConfigParser() deprecation warning perf test attr: Update no event/metric expectations tools headers disabled-features: Sync with the kernel sources tools headers UAPI: Sync arch prctl headers with the kernel sources tools headers: Update the copy of x86's mem{cpy,set}_64.S used in 'perf bench' tools headers x86 cpufeatures: Sync with the kernel sources tools headers UAPI: Sync s390 syscall table file that wires up the memfd_secret syscall tools headers UAPI: Sync linux/prctl.h with the kernel sources perf metrics: Avoid segv with --topdown for metrics without a group perf lock contention: Add empty 'struct rq' to satisfy libbpf 'runqueue' type verification perf cs-etm: Fix contextid validation perf arm64: Fix build with refcount checking perf test: Add stat test for record and script perf script: Skip aggregation for stat events perf build: Add system include paths to BPF builds perf bpf skels: Make vmlinux.h use bpf.h and perf_event.h in source directory perf parse-events: Do not break up AUX event group perf test test_intel_pt.sh: Test sample mode with event with PMU name perf evsel: Modify group pmu name for software events ... commit 4927cb98f0eeaa5dbeac882e8372f4b16dc62624 Merge: 90af47edea473 1f7aacc5eb9ed Author: Linus Torvalds Date: Sun May 21 11:53:52 2023 -0700 Merge tag 'powerpc-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix broken soft dirty tracking when using the Radix MMU (>= P9) - Fix ISA mapping when "ranges" property is not present, for PASemi Nemo boards - Fix a possible WARN_ON_ONCE hitting in BPF extable handling - Fix incorrect DMA address handling when using 2MB TCEs - Fix a bug in IOMMU table handling for SR-IOV devices - Fix the recent rework of IOMMU handling which left arch code calling clean up routines that are handled by the IOMMU core - A few assorted build fixes Thanks to Christian Zigotzky, Dan Horák, Gaurav Batra, Hari Bathini, Jason Gunthorpe, Nathan Chancellor, Naveen N. Rao, Nicholas Piggin, Pali Rohár, Randy Dunlap, and Rob Herring. * tag 'powerpc-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/iommu: Incorrect DDW Table is referenced for SR-IOV device powerpc/iommu: DMA address offset is incorrectly calculated with 2MB TCEs powerpc/iommu: Remove iommu_del_device() powerpc/crypto: Fix aes-gcm-p10 build when VSX=n powerpc/bpf: populate extable entries only during the last pass powerpc/boot: Disable power10 features after BOOTAFLAGS assignment powerpc/64s/radix: Fix soft dirty tracking powerpc/fsl_uli1575: fix kconfig warnings and build errors powerpc/isa-bridge: Fix ISA mapping when "ranges" is not present commit 90af47edea473e5776989f4b669401552c7ca558 Merge: 70e137e3840e1 a784452872261 Author: Linus Torvalds Date: Sun May 21 11:46:23 2023 -0700 Merge tag 'ata-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata Pull ata fix from Damien Le Moal: - Fix DT binding for the ahci-ceva driver to fully describe all iommus, from Michal * tag 'ata-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: dt-bindings: ata: ahci-ceva: Cover all 4 iommus entries commit 70e137e3840e1bc2deab32492316653c956a5c6b Merge: e2065b8c1b012 d9a45969abeb6 Author: Linus Torvalds Date: Sun May 21 11:13:23 2023 -0700 Merge tag 'fbdev-for-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev fixes from Helge Deller: "A few small unspectacular fbdev fixes: - Fix for USB endpoint check in udlfb (found by syzbot fuzzer) - Small fix in error code path in omapfb - compiler warning fixes in fbmem & i810 - code removal and whitespace cleanups in stifb and atyfb" * tag 'fbdev-for-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: stifb: Whitespace cleanups fbdev: udlfb: Use usb_control_msg_send() fbdev: udlfb: Fix endpoint check fbdev: atyfb: Remove unused clock determination fbdev: i810: include i810_main.h in i810_dvt.c fbdev: fbmem: mark get_fb_unmapped_area() static fbdev: omapfb: panel-tpo-td043mtea1: fix error code in probe() commit e2065b8c1b0120d47b327364a1a09090bdc11f31 Merge: 0c9dcf128ef99 e7b8b8ed9960b Author: Linus Torvalds Date: Sun May 21 10:55:31 2023 -0700 Merge tag '6.4-rc2-ksmbd-server-fixes' of git://git.samba.org/ksmbd Pull ksmbd server fixes from Steve French: - two fixes for incorrect SMB3 message validation (one for client which uses 8 byte padding, and one for empty bcc) - two fixes for out of bounds bugs: one for username offset checks (in session setup) and the other for create context name length checks in open requests * tag '6.4-rc2-ksmbd-server-fixes' of git://git.samba.org/ksmbd: ksmbd: smb2: Allow messages padded to 8byte boundary ksmbd: allocate one more byte for implied bcc[0] ksmbd: fix wrong UserName check in session_user ksmbd: fix global-out-of-bounds in smb2_find_context_vals commit 0c9dcf128ef99c257dcde5dbb8683605009906bf Merge: 0dd2a6fb1e34d 59a556aebc43d Author: Linus Torvalds Date: Sun May 21 10:20:58 2023 -0700 Merge tag '6.4-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs client fixes from Steve French: "Two smb3 client fixes, both related to deferred close, and also for stable: - send close for deferred handles before not after lease break response to avoid possible sharing violations - check all opens on an inode (looking for deferred handles) when lease break is returned not just the handle the lease break came in on" * tag '6.4-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: SMB3: drop reference to cfile before sending oplock break SMB3: Close all deferred handles of inode in case of handle lease break commit b9846a698c9aff4eb2214a06ac83638ad098f33f Author: Mingwei Zhang Date: Tue May 9 03:23:48 2023 +0000 KVM: VMX: add MSR_IA32_TSX_CTRL into msrs_to_save Add MSR_IA32_TSX_CTRL into msrs_to_save[] to explicitly tell userspace to save/restore the register value during migration. Missing this may cause userspace that relies on KVM ioctl(KVM_GET_MSR_INDEX_LIST) fail to port the value to the target VM. In addition, there is no need to add MSR_IA32_TSX_CTRL when ARCH_CAP_TSX_CTRL_MSR is not supported in kvm_get_arch_capabilities(). So add the checking in kvm_probe_msr_to_save(). Fixes: c11f83e0626b ("KVM: vmx: implement MSR_IA32_TSX_CTRL disable RTM functionality") Reported-by: Jim Mattson Signed-off-by: Mingwei Zhang Reviewed-by: Xiaoyao Li Reviewed-by: Jim Mattson Message-Id: <20230509032348.1153070-1-mizhang@google.com> Signed-off-by: Paolo Bonzini commit 275a87244ec8320e5d319132caa787329b04bb7e Author: Sean Christopherson Date: Wed May 3 09:08:37 2023 -0700 KVM: x86: Don't adjust guest's CPUID.0x12.1 (allowed SGX enclave XFRM) Drop KVM's manipulation of guest's CPUID.0x12.1 ECX and EDX, i.e. the allowed XFRM of SGX enclaves, now that KVM explicitly checks the guest's allowed XCR0 when emulating ECREATE. Note, this could theoretically break a setup where userspace advertises a "bad" XFRM and relies on KVM to provide a sane CPUID model, but QEMU is the only known user of KVM SGX, and QEMU explicitly sets the SGX CPUID XFRM subleaf based on the guest's XCR0. Reviewed-by: Kai Huang Tested-by: Kai Huang Signed-off-by: Sean Christopherson Message-Id: <20230503160838.3412617-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ad45413d22e6a224f8530b6fcc9ac01c8ced7fd6 Author: Sean Christopherson Date: Wed May 3 09:08:36 2023 -0700 KVM: VMX: Don't rely _only_ on CPUID to enforce XCR0 restrictions for ECREATE Explicitly check the vCPU's supported XCR0 when determining whether or not the XFRM for ECREATE is valid. Checking CPUID works because KVM updates guest CPUID.0x12.1 to restrict the leaf to a subset of the guest's allowed XCR0, but that is rather subtle and KVM should not modify guest CPUID except for modeling true runtime behavior (allowed XFRM is most definitely not "runtime" behavior). Reviewed-by: Kai Huang Tested-by: Kai Huang Signed-off-by: Sean Christopherson Message-Id: <20230503160838.3412617-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit a287f5b0cfc6804c5b12a4be13c7c9fe27869e90 Author: Benedict Wong Date: Wed May 10 01:30:22 2023 +0000 xfrm: Ensure policies always checked on XFRM-I input path This change adds methods in the XFRM-I input path that ensures that policies are checked prior to processing of the subsequent decapsulated packet, after which the relevant policies may no longer be resolvable (due to changing src/dst/proto/etc). Notably, raw ESP/AH packets did not perform policy checks inherently, whereas all other encapsulated packets (UDP, TCP encapsulated) do policy checks after calling xfrm_input handling in the respective encapsulation layer. Fixes: b0355dbbf13c ("Fix XFRM-I support for nested ESP tunnels") Test: Verified with additional Android Kernel Unit tests Test: Verified against Android CTS Signed-off-by: Benedict Wong Signed-off-by: Steffen Klassert commit 1f8b6df6a997a430b0c48b504638154b520781ad Author: Benedict Wong Date: Wed May 10 01:30:21 2023 +0000 xfrm: Treat already-verified secpath entries as optional This change allows inbound traffic through nested IPsec tunnels to successfully match policies and templates, while retaining the secpath stack trace as necessary for netfilter policies. Specifically, this patch marks secpath entries that have already matched against a relevant policy as having been verified, allowing it to be treated as optional and skipped after a tunnel decapsulation (during which the src/dst/proto/etc may have changed, and the correct policy chain no long be resolvable). This approach is taken as opposed to the iteration in b0355dbbf13c, where the secpath was cleared, since that breaks subsequent validations that rely on the existence of the secpath entries (netfilter policies, or transport-in-tunnel mode, where policies remain resolvable). Fixes: b0355dbbf13c ("Fix XFRM-I support for nested ESP tunnels") Test: Tested against Android Kernel Unit Tests Test: Tested against Android CTS Signed-off-by: Benedict Wong Signed-off-by: Steffen Klassert commit 358e526a1648cdd773ba169da5867874ae2408e3 Author: Michael Ellerman Date: Fri May 19 21:38:06 2023 +1000 powerpc/mm: Reinstate ARCH_FORCE_MAX_ORDER ranges Commit 1e8fed873e74 ("powerpc: drop ranges for definition of ARCH_FORCE_MAX_ORDER") removed the limits on the possible values for ARCH_FORCE_MAX_ORDER. However removing the ranges entirely causes some common work flows to break. For example building a defconfig (which uses 64K pages), changing the page size to 4K, and rebuilding used to work, because ARCH_FORCE_MAX_ORDER would be clamped to 12 by the ranges. With the ranges removed it creates a kernel that builds but crashes at boot: kernel BUG at mm/huge_memory.c:470! Oops: Exception in kernel mode, sig: 5 [#1] ... NIP hugepage_init+0x9c/0x278 LR do_one_initcall+0x80/0x320 Call Trace: do_one_initcall+0x80/0x320 kernel_init_freeable+0x304/0x3ac kernel_init+0x30/0x1a0 ret_from_kernel_user_thread+0x14/0x1c The reasoning for removing the ranges was that some of the values were too large. So take that into account and limit the maximums to 10 which is the default max, except for the 4K case which uses 12. Fixes: 1e8fed873e74 ("powerpc: drop ranges for definition of ARCH_FORCE_MAX_ORDER") Signed-off-by: Michael Ellerman Link: https://msgid.link/20230519113806.370635-1-mpe@ellerman.id.au commit d9a45969abeb641c5fb8cf3591f63f827f9932b5 Author: Helge Deller Date: Sat May 20 22:43:35 2023 +0200 fbdev: stifb: Whitespace cleanups Missed whitespace cleanups in stifb. Fixes: 8000425739dc ("fbdev: stifb: Remove trailing whitespaces") Signed-off-by: Helge Deller commit 537adba4083ed858db4b5129ea78a820a6fb2edc Author: Helge Deller Date: Fri May 19 23:11:51 2023 +0200 fbdev: udlfb: Use usb_control_msg_send() Use the newly introduced usb_control_msg_send() instead of usb_control_msg() when selecting the channel. Reviewed-by: Alan Stern Signed-off-by: Helge Deller commit 0dd2a6fb1e34d6dcb96806bc6b111388ad324722 Merge: 2dd0d98d62103 8fb9ea65c9d13 Author: Linus Torvalds Date: Sat May 20 10:33:57 2023 -0700 Merge tag 'tty-6.4-rc3' 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.4-rc3 to resolve some reported problems, and add some new device ids. These include: - termios documentation updates - vc_screen use-after-free fix - memory leak fix in arc_uart driver - new 8250 driver ids - other small serial driver fixes All of these have been in linux-next for a while with no reported problems" * tag 'tty-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: vc_screen: reload load of struct vc_data pointer in vcs_write() to avoid UAF serial: qcom-geni: fix enabling deactivated interrupt serial: 8250_bcm7271: fix leak in `brcmuart_probe` serial: 8250_bcm7271: balance clk_enable calls serial: arc_uart: fix of_iomap leak in `arc_serial_probe` serial: 8250: Document termios parameter of serial8250_em485_config() serial: Add support for Advantech PCI-1611U card serial: 8250_exar: Add support for USR298x PCI Modems commit 2dd0d98d62103c993f74193a7abe97eaef4bc120 Merge: 98be58a6e9310 ddaf098ea779b Author: Linus Torvalds Date: Sat May 20 10:16:38 2023 -0700 Merge tag 'usb-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt fixes from Greg KH: "Here are some USB fixes for 6.4-rc3, as well as a driver core fix that resolves a memory leak that shows up in USB devices easier than other subsystems. Included in here are: - driver core memory leak as reported and tested by syzbot and developers - dwc3 driver fixes for reported problems - xhci driver fixes for reported problems - USB gadget driver reverts to resolve regressions - usbtmc driver fix for syzbot reported problem - thunderbolt driver fixes for reported issues - other small USB fixes All of these, except for the driver core fix, have been in linux-next with no reported problems. The driver core fix was tested and verified to solve the issue by syzbot and the original reporter" * tag 'usb-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: driver core: class: properly reference count class_dev_iter() xhci: Fix incorrect tracking of free space on transfer rings xhci-pci: Only run d3cold avoidance quirk for s2idle usb-storage: fix deadlock when a scsi command timeouts more than once usb: dwc3: fix a test for error in dwc3_core_init() usb: typec: tps6598x: Fix fault at module removal usb: gadget: u_ether: Fix host MAC address case usb: typec: altmodes/displayport: fix pin_assignment_show Revert "usb: gadget: udc: core: Invoke usb_gadget_connect only when started" Revert "usb: gadget: udc: core: Prevent redundant calls to pullup" usb: gadget: drop superfluous ':' in doc string usb: dwc3: debugfs: Resume dwc3 before accessing registers USB: UHCI: adjust zhaoxin UHCI controllers OverCurrent bit value usb: dwc3: fix gadget mode suspend interrupt handler issue usb: dwc3: gadget: Improve dwc3_gadget_suspend() and dwc3_gadget_resume() USB: usbtmc: Fix direction for 0-length ioctl control messages thunderbolt: Clear registers properly when auto clear isn't in use commit d1d8875c8c13517f6fd1ff8d4d3e1ac366a17e07 Author: Carlos Llamas Date: Fri May 19 19:59:49 2023 +0000 binder: fix UAF of alloc->vma in race with munmap() [ cmllamas: clean forward port from commit 015ac18be7de ("binder: fix UAF of alloc->vma in race with munmap()") in 5.10 stable. It is needed in mainline after the revert of commit a43cfc87caaf ("android: binder: stop saving a pointer to the VMA") as pointed out by Liam. The commit log and tags have been tweaked to reflect this. ] In commit 720c24192404 ("ANDROID: binder: change down_write to down_read") binder assumed the mmap read lock is sufficient to protect alloc->vma inside binder_update_page_range(). This used to be accurate until commit dd2283f2605e ("mm: mmap: zap pages with read mmap_sem in munmap"), which now downgrades the mmap_lock after detaching the vma from the rbtree in munmap(). Then it proceeds to teardown and free the vma with only the read lock held. This means that accesses to alloc->vma in binder_update_page_range() now will race with vm_area_free() in munmap() and can cause a UAF as shown in the following KASAN trace: ================================================================== BUG: KASAN: use-after-free in vm_insert_page+0x7c/0x1f0 Read of size 8 at addr ffff16204ad00600 by task server/558 CPU: 3 PID: 558 Comm: server Not tainted 5.10.150-00001-gdc8dcf942daa #1 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0x0/0x2a0 show_stack+0x18/0x2c dump_stack+0xf8/0x164 print_address_description.constprop.0+0x9c/0x538 kasan_report+0x120/0x200 __asan_load8+0xa0/0xc4 vm_insert_page+0x7c/0x1f0 binder_update_page_range+0x278/0x50c binder_alloc_new_buf+0x3f0/0xba0 binder_transaction+0x64c/0x3040 binder_thread_write+0x924/0x2020 binder_ioctl+0x1610/0x2e5c __arm64_sys_ioctl+0xd4/0x120 el0_svc_common.constprop.0+0xac/0x270 do_el0_svc+0x38/0xa0 el0_svc+0x1c/0x2c el0_sync_handler+0xe8/0x114 el0_sync+0x180/0x1c0 Allocated by task 559: kasan_save_stack+0x38/0x6c __kasan_kmalloc.constprop.0+0xe4/0xf0 kasan_slab_alloc+0x18/0x2c kmem_cache_alloc+0x1b0/0x2d0 vm_area_alloc+0x28/0x94 mmap_region+0x378/0x920 do_mmap+0x3f0/0x600 vm_mmap_pgoff+0x150/0x17c ksys_mmap_pgoff+0x284/0x2dc __arm64_sys_mmap+0x84/0xa4 el0_svc_common.constprop.0+0xac/0x270 do_el0_svc+0x38/0xa0 el0_svc+0x1c/0x2c el0_sync_handler+0xe8/0x114 el0_sync+0x180/0x1c0 Freed by task 560: kasan_save_stack+0x38/0x6c kasan_set_track+0x28/0x40 kasan_set_free_info+0x24/0x4c __kasan_slab_free+0x100/0x164 kasan_slab_free+0x14/0x20 kmem_cache_free+0xc4/0x34c vm_area_free+0x1c/0x2c remove_vma+0x7c/0x94 __do_munmap+0x358/0x710 __vm_munmap+0xbc/0x130 __arm64_sys_munmap+0x4c/0x64 el0_svc_common.constprop.0+0xac/0x270 do_el0_svc+0x38/0xa0 el0_svc+0x1c/0x2c el0_sync_handler+0xe8/0x114 el0_sync+0x180/0x1c0 [...] ================================================================== To prevent the race above, revert back to taking the mmap write lock inside binder_update_page_range(). One might expect an increase of mmap lock contention. However, binder already serializes these calls via top level alloc->mutex. Also, there was no performance impact shown when running the binder benchmark tests. Fixes: c0fd2101781e ("Revert "android: binder: stop saving a pointer to the VMA"") Fixes: dd2283f2605e ("mm: mmap: zap pages with read mmap_sem in munmap") Reported-by: Jann Horn Closes: https://lore.kernel.org/all/20230518144052.xkj6vmddccq4v66b@revolver Cc: Cc: Minchan Kim Cc: Yang Shi Cc: Liam Howlett Signed-off-by: Carlos Llamas Acked-by: Todd Kjos Link: https://lore.kernel.org/r/20230519195950.1775656-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit bbaae0c79ebd49f61ad942a8bf9e12bfc7f821bb Author: Jean-Baptiste Maneyrol Date: Tue May 9 15:22:02 2023 +0000 iio: imu: inv_icm42600: fix timestamp reset Timestamp reset is not done in the correct place. It must be done before enabling buffer. The reason is that interrupt timestamping is always happening when the chip is on, even if the corresponding sensor is off. When the sensor restarts, timestamp is wrong if you don't do a reset first. Fixes: ec74ae9fd37c ("iio: imu: inv_icm42600: add accurate timestamping") Signed-off-by: Jean-Baptiste Maneyrol Cc: Link: https://lore.kernel.org/r/20230509152202.245444-1-inv.git-commit@tdk.com Signed-off-by: Jonathan Cameron commit 98be58a6e9310fbfa757d438b0b51f857ce17ee4 Merge: d635f6cc934bc e3afec91aad23 Author: Linus Torvalds Date: Sat May 20 08:48:04 2023 -0700 Merge tag 'block-6.4-2023-05-20' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - NVMe pull request via Keith: - More device quirks (Sagi, Hristo, Adrian, Daniel) - Controller delete race (Maurizo) - Multipath cleanup fix (Christoph) - Deny writeable mmap mapping on a readonly block device (Loic) - Kill unused define that got introduced by accident (Christoph) - Error handling fix for s390 dasd (Stefan) - ublk locking fix (Ming) * tag 'block-6.4-2023-05-20' of git://git.kernel.dk/linux: block: remove NFL4_UFLG_MASK block: Deny writable memory mapping if block is read-only s390/dasd: fix command reject error on ESE devices nvme-pci: Add quirk for Teamgroup MP33 SSD ublk: fix AB-BA lockdep warning nvme: do not let the user delete a ctrl before a complete initialization nvme-multipath: don't call blk_mark_disk_dead in nvme_mpath_remove_disk nvme-pci: clamp max_hw_sectors based on DMA optimized limitation nvme-pci: add quirk for missing secondary temperature thresholds nvme-pci: add NVME_QUIRK_BOGUS_NID for HS-SSD-FUTURE 2048G commit 626d312028bec44209d0ecd5beaa9b1aa8945f7d Author: Masahiro Honda Date: Thu May 18 20:08:16 2023 +0900 iio: adc: ad_sigma_delta: Fix IRQ issue by setting IRQ_DISABLE_UNLAZY flag The Sigma-Delta ADCs supported by this driver can use SDO as an interrupt line to indicate the completion of a conversion. However, some devices cannot properly detect the completion of a conversion by an interrupt. This is for the reason mentioned in the following commit. commit e9849777d0e2 ("genirq: Add flag to force mask in disable_irq[_nosync]()") A read operation is performed by an extra interrupt before the completion of a conversion. At this time, the value read from the ADC data register is the same as the previous conversion result. This patch fixes the issue by setting IRQ_DISABLE_UNLAZY flag. Fixes: 0c6ef985a1fd ("iio: adc: ad7791: fix IRQ flags") Fixes: 1a913270e57a ("iio: adc: ad7793: Fix IRQ flag") Fixes: e081102f3077 ("iio: adc: ad7780: Fix IRQ flag") Fixes: 89a86da5cb8e ("iio: adc: ad7192: Add IRQ flag") Fixes: 79ef91493f54 ("iio: adc: ad7124: Set IRQ type to falling") Signed-off-by: Masahiro Honda Link: https://lore.kernel.org/r/20230518110816.248-1-honda@mechatrax.com Cc: Signed-off-by: Jonathan Cameron commit e3afec91aad23c52dfe426c7d7128e4839c3eed8 Author: Christoph Hellwig Date: Sat May 20 11:00:10 2023 +0200 block: remove NFL4_UFLG_MASK The NFL4_UFLG_MASK define slipped in in commit 9208d4149758 ("block: add a ->get_unique_id method") and should never have been added, as NFSD as the only user of it already has it's copy. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230520090010.527046-1-hch@lst.de Signed-off-by: Jens Axboe commit 67caf26d769e0cb17dba182b0acae015c7aa5881 Merge: ae9b15fbe6344 6ce5169e05aa5 Author: Jakub Kicinski Date: Fri May 19 22:48:26 2023 -0700 Merge tag 'for-net-2023-05-19' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - Fix compiler warnings on btnxpuart - Fix potential double free on hci_conn_unlink - Fix UAF on hci_conn_hash_flush * tag 'for-net-2023-05-19' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: btnxpuart: Fix compiler warnings Bluetooth: Unlink CISes when LE disconnects in hci_conn_del Bluetooth: Fix UAF in hci_conn_hash_flush again Bluetooth: Refcnt drop must be placed last in hci_conn_unlink Bluetooth: Fix potential double free caused by hci_conn_unlink ==================== Link: https://lore.kernel.org/r/20230519233056.2024340-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit ae9b15fbe63447bc1d3bba3769f409d17ca6fdf6 Author: Taehee Yoo Date: Wed May 17 14:30:10 2023 +0000 net: fix stack overflow when LRO is disabled for virtual interfaces When the virtual interface's feature is updated, it synchronizes the updated feature for its own lower interface. This propagation logic should be worked as the iteration, not recursively. But it works recursively due to the netdev notification unexpectedly. This problem occurs when it disables LRO only for the team and bonding interface type. team0 | +------+------+-----+-----+ | | | | | team1 team2 team3 ... team200 If team0's LRO feature is updated, it generates the NETDEV_FEAT_CHANGE event to its own lower interfaces(team1 ~ team200). It is worked by netdev_sync_lower_features(). So, the NETDEV_FEAT_CHANGE notification logic of each lower interface work iteratively. But generated NETDEV_FEAT_CHANGE event is also sent to the upper interface too. upper interface(team0) generates the NETDEV_FEAT_CHANGE event for its own lower interfaces again. lower and upper interfaces receive this event and generate this event again and again. So, the stack overflow occurs. But it is not the infinite loop issue. Because the netdev_sync_lower_features() updates features before generating the NETDEV_FEAT_CHANGE event. Already synchronized lower interfaces skip notification logic. So, it is just the problem that iteration logic is changed to the recursive unexpectedly due to the notification mechanism. Reproducer: ip link add team0 type team ethtool -K team0 lro on for i in {1..200} do ip link add team$i master team0 type team ethtool -K team$i lro on done ethtool -K team0 lro off In order to fix it, the notifier_ctx member of bonding/team is introduced. Reported-by: syzbot+60748c96cf5c6df8e581@syzkaller.appspotmail.com Fixes: fd867d51f889 ("net/core: generic support for disabling netdev features down stack") Signed-off-by: Taehee Yoo Reviewed-by: Eric Dumazet Reviewed-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20230517143010.3596250-1-ap420073@gmail.com Signed-off-by: Jakub Kicinski commit ed9de4ed39875706607fb08118a58344ae6c5f42 Author: Alan Stern Date: Fri May 19 15:32:30 2023 -0400 fbdev: udlfb: Fix endpoint check The syzbot fuzzer detected a problem in the udlfb driver, caused by an endpoint not having the expected type: usb 1-1: Read EDID byte 0 failed: -71 usb 1-1: Unable to get valid EDID from device/display ------------[ cut here ]------------ usb 1-1: BOGUS urb xfer, pipe 3 != type 1 WARNING: CPU: 0 PID: 9 at drivers/usb/core/urb.c:504 usb_submit_urb+0xed6/0x1880 drivers/usb/core/urb.c:504 Modules linked in: CPU: 0 PID: 9 Comm: kworker/0:1 Not tainted 6.4.0-rc1-syzkaller-00016-ga4422ff22142 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 Workqueue: usb_hub_wq hub_event RIP: 0010:usb_submit_urb+0xed6/0x1880 drivers/usb/core/urb.c:504 ... Call Trace: dlfb_submit_urb+0x92/0x180 drivers/video/fbdev/udlfb.c:1980 dlfb_set_video_mode+0x21f0/0x2950 drivers/video/fbdev/udlfb.c:315 dlfb_ops_set_par+0x2a7/0x8d0 drivers/video/fbdev/udlfb.c:1111 dlfb_usb_probe+0x149a/0x2710 drivers/video/fbdev/udlfb.c:1743 The current approach for this issue failed to catch the problem because it only checks for the existence of a bulk-OUT endpoint; it doesn't check whether this endpoint is the one that the driver will actually use. We can fix the problem by instead checking that the endpoint used by the driver does exist and is bulk-OUT. Reported-and-tested-by: syzbot+0e22d63dcebb802b9bc8@syzkaller.appspotmail.com Signed-off-by: Alan Stern CC: Pavel Skripkin Fixes: aaf7dbe07385 ("video: fbdev: udlfb: properly check endpoint type") Signed-off-by: Helge Deller commit 93f57c7a10890645d1d3b88eea1692b285bf3f38 Author: Niklas Schnelle Date: Tue May 16 13:00:33 2023 +0200 fbdev: atyfb: Remove unused clock determination Just below the removed lines par->clk_wr_offset is hard coded to 3 so there is no use in determining a different clock just to then ignore it anyway. This also removes the only I/O port use remaining in the driver allowing it to be built without CONFIG_HAS_IOPORT. Link: https://lore.kernel.org/all/ZBx5aLo5h546BzBt@intel.com/ Suggested-by: Ville Syrjälä Signed-off-by: Niklas Schnelle Reviewed-by: Ville Syrjälä Signed-off-by: Helge Deller commit f6cd4c96b2c201be1ca3c17daeec52bf20880d69 Author: Arnd Bergmann Date: Tue May 16 22:28:09 2023 +0200 fbdev: i810: include i810_main.h in i810_dvt.c Building with W=1 shows that a header needs to be included to make the prototypes visible: drivers/video/fbdev/i810/i810_dvt.c:194:6: error: no previous prototype for 'round_off_xres' [-Werror=missing-prototypes] drivers/video/fbdev/i810/i810_dvt.c:233:6: error: no previous prototype for 'i810fb_encode_registers' [-Werror=missing-prototypes] drivers/video/fbdev/i810/i810_dvt.c:245:6: error: no previous prototype for 'i810fb_fill_var_timings' [-Werror=missing-prototypes] drivers/video/fbdev/i810/i810_dvt.c:279:5: error: no previous prototype for 'i810_get_watermark' [-Werror=missing-prototypes] Adding the header leads to another warning from a mismatched prototype, so fix this as well: drivers/video/fbdev/i810/i810_dvt.c:280:5: error: conflicting types for 'i810_get_watermark'; have 'u32(struct fb_var_screeninfo *, Signed-off-by: Arnd Bergmann Reviewed-by: Jani Nikula Signed-off-by: Helge Deller commit 19abb4583d5eba06459930932e72c862a83cd9c2 Author: Arnd Bergmann Date: Tue May 16 22:22:48 2023 +0200 fbdev: fbmem: mark get_fb_unmapped_area() static There is a global function with this name on sparc, but no global declaration: drivers/video/fbdev/core/fbmem.c:1469:15: error: no previous prototype for 'get_fb_unmapped_area' Make the generic definition static to avoid this warning. On sparc, this is never seen. Edit by Helge: Update Kconfig text as suggested by Geert Uytterhoeven. Signed-off-by: Arnd Bergmann Signed-off-by: Helge Deller commit 69baa3a623fd2e58624f24f2f23d46f87b817c93 Author: Loic Poulain Date: Wed May 10 09:42:23 2023 +0200 block: Deny writable memory mapping if block is read-only User should not be able to write block device if it is read-only at block level (e.g force_ro attribute). This is ensured in the regular fops write operation (blkdev_write_iter) but not when writing via user mapping (mmap), allowing user to actually write a read-only block device via a PROT_WRITE mapping. Example: This can lead to integrity issue of eMMC boot partition (e.g mmcblk0boot0) which is read-only by default. To fix this issue, simply deny shared writable mapping if the block is readonly. Note: Block remains writable if switch to read-only is performed after the initial mapping, but this is expected behavior according to commit a32e236eb93e ("Partially revert "block: fail op_is_write() requests to read-only partitions"")'. Signed-off-by: Loic Poulain Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230510074223.991297-1-loic.poulain@linaro.org Signed-off-by: Jens Axboe commit d635f6cc934bcd467c5d67148ece74632fd96abf Merge: 5565ec4ef4f0d 79ef1c9d14c65 Author: Linus Torvalds Date: Fri May 19 19:11:20 2023 -0700 Merge tag 'drm-fixes-2023-05-20' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular fixes pull, amdgpu and msm make up most of these, nothing too serious, also one i915 and one exynos. I didn't get a misc fixes pull this week (one of the maintainers is off, so have to engage the backup) so I think there are a few outstanding patches that will show up next week, amdgpu: - update gfx11 clock counter logic - Fix a race when disabling gfxoff on gfx10/11 for profiling - Raven/Raven2/PCO clock counter fix - Add missing get_vbios_fb_size for GMC 11 - Fix a spurious irq warning in the device remove case - Fix possible power mode mismatch between driver and PMFW - USB4 fix exynos: - fix build warning i915: - fix missing NULL check in HDCP code msm: - display: - msm8998: fix fetch and qos to align with downstream - msm8998: fix LM pairs to align with downstream - remove unused INTF0 interrupt mask on some chipsets - remove TE2 block from relevant chipsets - relocate non-MDP_TOP offset to different header - fix some indentation - fix register offets/masks for dither blocks - make ping-ping block length 0 - remove duplicated defines - fix log mask for writeback block - unregister the hdmi codec for dp during unbind - fix yaml warnings - gpu: - fix submit error path leak - arm-smmu-qcom fix for regression that broke per-process page tables - fix no-iommu crash" * tag 'drm-fixes-2023-05-20' of git://anongit.freedesktop.org/drm/drm: (29 commits) drm/amd/display: enable dpia validate drm/amd/pm: fix possible power mode mismatch between driver and PMFW drm/amdgpu: skip disabling fence driver src_irqs when device is unplugged drm/amdgpu/gmc11: implement get_vbios_fb_size() drm/amdgpu: Differentiate between Raven2 and Raven/Picasso according to revision id drm/amdgpu/gfx11: Adjust gfxoff before powergating on gfx11 as well drm/amdgpu/gfx10: Disable gfxoff before disabling powergating. drm/amdgpu/gfx11: update gpu_clock_counter logic drm/msm: Be more shouty if per-process pgtables aren't working iommu/arm-smmu-qcom: Fix missing adreno_smmu's drm/i915/hdcp: Check if media_gt exists drm/exynos: fix g2d_open/close helper function definitions drm/msm: Fix submit error-path leaks drm/msm/iommu: Fix null pointer dereference in no-IOMMU case dt-bindings: display/msm: dsi-controller-main: Document qcom, master-dsi and qcom, sync-dual-dsi drm/msm/dpu: Remove duplicate register defines from INTF drm/msm/dpu: Set PINGPONG block length to zero for DPU >= 7.0.0 drm/msm/dpu: Use V2 DITHER PINGPONG sub-block in SM8[34]50/SC8280XP drm/msm/dpu: Fix PP_BLK_DIPHER -> DITHER typo drm/msm/dpu: Reindent REV_7xxx interrupt masks with tabs ... commit c99bff34290f1b994073557b754aff86e4c7b22e Author: Stefan Haberland Date: Fri May 19 12:23:40 2023 +0200 s390/dasd: fix command reject error on ESE devices Formatting a thin-provisioned (ESE) device that is part of a PPRC copy relation might fail with the following error: dasd-eckd 0.0.f500: An error occurred in the DASD device driver, reason=09 [...] 24 Byte: 0 MSG 4, no MSGb to SYSOP During format of an ESE disk the Release Allocated Space command is used. A bit in the payload of the command is set that is not allowed to be set for devices in a copy relation. This bit is set to allow the partial release of an extent. Check for the existence of a copy relation before setting the respective bit. Fixes: 91dc4a197569 ("s390/dasd: Add new ioctl to release space") Cc: stable@kernel.org # 5.3+ Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Link: https://lore.kernel.org/r/20230519102340.3854819-2-sth@linux.ibm.com Signed-off-by: Jens Axboe commit a70fc4ed20a6118837b0aecbbf789074935f473b Author: Robert Richter Date: Fri May 19 23:54:35 2023 +0200 cxl/port: Fix NULL pointer access in devm_cxl_add_port() In devm_cxl_add_port() the port creation may fail and its associated pointer does not contain a valid address. During error message generation this invalid port address is used. Fix that wrong address access. Fixes: f3cd264c4ec1 ("cxl: Unify debug messages when calling devm_cxl_add_port()") Signed-off-by: Robert Richter Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20230519215436.3394532-1-rrichter@amd.com Signed-off-by: Dan Williams commit 5565ec4ef4f0d676fc8518556e239ac6945b5186 Merge: a594874588241 09e797c8641f6 Author: Linus Torvalds Date: Fri May 19 15:54:01 2023 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Six small fixes. Four in drivers and the two core changes should be read together as a correction to a prior iorequest_cnt fix that exposed us to a potential use after free" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: core: Decrease scsi_device's iorequest_cnt if dispatch failed scsi: Revert "scsi: core: Do not increase scsi_device's iorequest_cnt if dispatch failed" scsi: storvsc: Don't pass unused PFNs to Hyper-V host scsi: ufs: core: Fix MCQ nr_hw_queues scsi: ufs: core: Rename symbol sizeof_utp_transfer_cmd_desc() scsi: ufs: core: Fix MCQ tag calculation commit 6ce5169e05aa5360a49a574cc1490ceea6b651a6 Author: Neeraj Sanjay Kale Date: Thu May 18 22:13:47 2023 +0530 Bluetooth: btnxpuart: Fix compiler warnings This fixes the follwing compiler warning reported by kernel test robot: drivers/bluetooth/btnxpuart.c:1332:34: warning: unused variable 'nxpuart_of_match_table' [-Wunused-const-variable] Signed-off-by: Neeraj Sanjay Kale Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202305161345.eClvTYQ9-lkp@intel.com/ Signed-off-by: Luiz Augusto von Dentz commit a2904d2825536aa896a149a9174d11b0958e7095 Author: Ruihan Li Date: Wed May 3 21:39:37 2023 +0800 Bluetooth: Unlink CISes when LE disconnects in hci_conn_del Currently, hci_conn_del calls hci_conn_unlink for BR/EDR, (e)SCO, and CIS connections, i.e., everything except LE connections. However, if (e)SCO connections are unlinked when BR/EDR disconnects, CIS connections should also be unlinked when LE disconnects. In terms of disconnection behavior, CIS and (e)SCO connections are not too different. One peculiarity of CIS is that when CIS connections are disconnected, the CIS handle isn't deleted, as per [BLUETOOTH CORE SPECIFICATION Version 5.4 | Vol 4, Part E] 7.1.6 Disconnect command: All SCO, eSCO, and CIS connections on a physical link should be disconnected before the ACL connection on the same physical connection is disconnected. If it does not, they will be implicitly disconnected as part of the ACL disconnection. ... Note: As specified in Section 7.7.5, on the Central, the handle for a CIS remains valid even after disconnection and, therefore, the Host can recreate a disconnected CIS at a later point in time using the same connection handle. Since hci_conn_link invokes both hci_conn_get and hci_conn_hold, hci_conn_unlink should perform both hci_conn_put and hci_conn_drop as well. However, currently it performs only hci_conn_put. This patch makes hci_conn_unlink call hci_conn_drop as well, which simplifies the logic in hci_conn_del a bit and may benefit future users of hci_conn_unlink. But it is noted that this change additionally implies that hci_conn_unlink can queue disc_work on conn itself, with the following call stack: hci_conn_unlink(conn) [conn->parent == NULL] -> hci_conn_unlink(child) [child->parent == conn] -> hci_conn_drop(child->parent) -> queue_delayed_work(&conn->disc_work) Queued disc_work after hci_conn_del can be spurious, so during the process of hci_conn_del, it is necessary to make the call to cancel_delayed_work(&conn->disc_work) after invoking hci_conn_unlink. Signed-off-by: Ruihan Li Co-developed-by: Luiz Augusto von Dentz Signed-off-by: Luiz Augusto von Dentz commit a2ac591cb4d83e1f2d4b4adb3c14b2c79764650a Author: Ruihan Li Date: Wed May 3 21:39:36 2023 +0800 Bluetooth: Fix UAF in hci_conn_hash_flush again Commit 06149746e720 ("Bluetooth: hci_conn: Add support for linking multiple hcon") reintroduced a previously fixed bug [1] ("KASAN: slab-use-after-free Read in hci_conn_hash_flush"). This bug was originally fixed by commit 5dc7d23e167e ("Bluetooth: hci_conn: Fix possible UAF"). The hci_conn_unlink function was added to avoid invalidating the link traversal caused by successive hci_conn_del operations releasing extra connections. However, currently hci_conn_unlink itself also releases extra connections, resulted in the reintroduced bug. This patch follows a more robust solution for cleaning up all connections, by repeatedly removing the first connection until there are none left. This approach does not rely on the inner workings of hci_conn_del and ensures proper cleanup of all connections. Meanwhile, we need to make sure that hci_conn_del never fails. Indeed it doesn't, as it now always returns zero. To make this a bit clearer, this patch also changes its return type to void. Reported-by: syzbot+8bb72f86fc823817bc5d@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-bluetooth/000000000000aa920505f60d25ad@google.com/ Fixes: 06149746e720 ("Bluetooth: hci_conn: Add support for linking multiple hcon") Signed-off-by: Ruihan Li Co-developed-by: Luiz Augusto von Dentz Signed-off-by: Luiz Augusto von Dentz commit 2910431ab0e500dfc5df12299bb15eef0f30b43e Author: Ruihan Li Date: Wed May 3 21:39:35 2023 +0800 Bluetooth: Refcnt drop must be placed last in hci_conn_unlink If hci_conn_put(conn->parent) reduces conn->parent's reference count to zero, it can immediately deallocate conn->parent. At the same time, conn->link->list has its head in conn->parent, causing use-after-free problems in the latter list_del_rcu(&conn->link->list). This problem can be easily solved by reordering the two operations, i.e., first performing the list removal with list_del_rcu and then decreasing the refcnt with hci_conn_put. Reported-by: Luiz Augusto von Dentz Closes: https://lore.kernel.org/linux-bluetooth/CABBYNZ+1kce8_RJrLNOXd_8=Mdpb=2bx4Nto-hFORk=qiOkoCg@mail.gmail.com/ Fixes: 06149746e720 ("Bluetooth: hci_conn: Add support for linking multiple hcon") Signed-off-by: Ruihan Li Signed-off-by: Luiz Augusto von Dentz commit ca1fd42e7dbfcb34890ffbf1f2f4b356776dab6f Author: Ruihan Li Date: Wed May 3 21:39:34 2023 +0800 Bluetooth: Fix potential double free caused by hci_conn_unlink The hci_conn_unlink function is being called by hci_conn_del, which means it should not call hci_conn_del with the input parameter conn again. If it does, conn may have already been released when hci_conn_unlink returns, leading to potential UAF and double-free issues. This patch resolves the problem by modifying hci_conn_unlink to release only conn's child links when necessary, but never release conn itself. Reported-by: syzbot+690b90b14f14f43f4688@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-bluetooth/000000000000484a8205faafe216@google.com/ Fixes: 06149746e720 ("Bluetooth: hci_conn: Add support for linking multiple hcon") Signed-off-by: Ruihan Li Signed-off-by: Luiz Augusto von Dentz Reported-by: syzbot+690b90b14f14f43f4688@syzkaller.appspotmail.com Reported-by: Luiz Augusto von Dentz Reported-by: syzbot+8bb72f86fc823817bc5d@syzkaller.appspotmail.com commit 43439d858bbae244a510de47f9a55f667ca4ed52 Author: Anna Schumaker Date: Tue May 16 11:19:25 2023 -0400 NFSv4.2: Fix a potential double free with READ_PLUS kfree()-ing the scratch page isn't enough, we also need to set the pointer back to NULL to avoid a double-free in the case of a resend. Fixes: fbd2a05f29a9 (NFSv4.2: Rework scratch handling for READ_PLUS) Signed-off-by: Anna Schumaker commit d180891fba995bd54e25b089b1ec98d134873586 Author: Trond Myklebust Date: Wed May 10 12:28:00 2023 -0400 SUNRPC: Don't change task->tk_status after the call to rpc_exit_task Some calls to rpc_exit_task() may deliberately change the value of task->tk_status, for instance because it gets checked by the RPC call's rpc_release() callback. That makes it wrong to reset the value to task->tk_rpc_status. In particular this causes a bug where the rpc_call_done() callback tries to fail over a set of pNFS/flexfiles writes to a different IP address, but the reset of task->tk_status causes nfs_commit_release_pages() to immediately mark the file as having a fatal error. Fixes: 39494194f93b ("SUNRPC: Fix races with rpc_killall_tasks()") Cc: stable@vger.kernel.org # 6.1.x Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 4b71e2416ec4cb3edd6c667243bce357b0c6f7b3 Author: Fabio M. De Francesco Date: Wed May 3 19:24:11 2023 +0200 NFS: Convert kmap_atomic() to kmap_local_folio() kmap_atomic() is deprecated in favor of kmap_local_{folio,page}(). Therefore, replace kmap_atomic() with kmap_local_folio() in nfs_readdir_folio_array_append(). kmap_atomic() disables page-faults and preemption (the latter only for !PREEMPT_RT kernels), However, the code within the mapping/un-mapping in nfs_readdir_folio_array_append() does not depend on the above-mentioned side effects. Therefore, a mere replacement of the old API with the new one is all that is required (i.e., there is no need to explicitly add any calls to pagefault_disable() and/or preempt_disable()). Tested with (x)fstests in a QEMU/KVM x86_32 VM, 6GB RAM, booting a kernel with HIGHMEM64GB enabled. Cc: Ira Weiny Signed-off-by: Fabio M. De Francesco Fixes: ec108d3cc766 ("NFS: Convert readdir page array functions to use a folio") Signed-off-by: Anna Schumaker commit a59487458824184abf568721fe7d1beb1e0d099e Merge: d3f704310cc7e 4cafd0400bcb6 Author: Linus Torvalds Date: Fri May 19 12:02:12 2023 -0700 Merge tag 'ceph-for-6.4-rc3' of https://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "A workaround for a just discovered bug in MClientSnap encoding which goes back to 2017 (marked for stable) and a fixup to quieten a static checker" * tag 'ceph-for-6.4-rc3' of https://github.com/ceph/ceph-client: ceph: force updating the msg pointer in non-split case ceph: silence smatch warning in reconnect_caps_cb() commit d3f704310cc7e04e89d178ea080a2e74dae9db67 Merge: c83063298b206 5783ecc90e24a Author: Linus Torvalds Date: Fri May 19 11:44:08 2023 -0700 Merge tag 'pm-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix two issues in the cpupower utility and get rid of a spurious warning message printed to the kernel log by the ACPI cpufreq driver after recent changes. Specifics: - Get rid of a warning message printed by the ACPI cpufreq driver after recent changes in it when anohter CPU performance scaling driver is registered already when it starts (Petr Pavlu) - Make cpupower read TSC on each CPU right before reading MPERF so as to reduce the potential time difference between the TSC and MPERF accesses and improve the C0 percentage calculation (Wyes Karny) - Fix a possible file handle leak and clean up the code in the sysfs_get_enabled() function in cpupower (Hao Zeng)" * tag 'pm-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: ACPI: Prevent a warning when another frequency driver is loaded cpupower: Make TSC read per CPU for Mperf monitor cpupower:Fix resource leaks in sysfs_get_enabled() commit c83063298b206dc806a7f1e8724336e4962daeed Merge: cbd6ac3837cdc 71a485624c4cb Author: Linus Torvalds Date: Fri May 19 11:38:41 2023 -0700 Merge tag 'acpi-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Add an ACPI IRQ override quirk for LG UltraPC 17U70P so as to make the internal keyboard work on that machine (Rubén Gómez)" * tag 'acpi-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: resource: Add IRQ override quirk for LG UltraPC 17U70P commit cbd6ac3837cdc62f3078b53b92ad6ee59329e4dd Merge: ac92c27935c75 bd415b5c9552d Author: Linus Torvalds Date: Fri May 19 11:25:17 2023 -0700 Merge tag 'docs-6.4-fixes' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "Four straightforward documentation fixes" * tag 'docs-6.4-fixes' of git://git.lwn.net/linux: Documentation/filesystems: ramfs-rootfs-initramfs: use :Author: Documentation/filesystems: sharedsubtree: add section headings docs: quickly-build-trimmed-linux: various small fixes and improvements Documentation: use capitalization for chapters and acronyms commit ac92c27935c759ff8b3cc9f761b086b15145c901 Merge: 4ffd96c9621fc 0f1cbf941d594 Author: Linus Torvalds Date: Fri May 19 11:11:04 2023 -0700 Merge tag 's390-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Alexander Gordeev: - Add check whether the required facilities are installed before using the s390-specific ChaCha20 implementation - Key blobs for s390 protected key interface IOCTLs commands PKEY_VERIFYKEY2 and PKEY_VERIFYKEY3 may contain clear key material. Zeroize copies of these keys in kernel memory after creating protected keys - Set CONFIG_INIT_STACK_NONE=y in defconfigs to avoid extra overhead of initializing all stack variables by default - Make sure that when a new channel-path is enabled all subchannels are evaluated: with and without any devices connected on it - When SMT thread CPUs are added to CPU topology masks the nr_cpu_ids limit is not checked and could be exceeded. Respect the nr_cpu_ids limit and avoid a warning when CONFIG_DEBUG_PER_CPU_MAPS is set - The pointer to IPL Parameter Information Block is stored in the absolute lowcore as a virtual address. Save it as the physical address for later use by dump tools - Fix a Queued Direct I/O (QDIO) problem on z/VM guests using QIOASSIST with dedicated (pass through) QDIO-based devices such as FCP, real OSA or HiperSockets - s390's struct statfs and struct statfs64 contain padding, which field-by-field copying does not set. Initialize the respective structures with zeros before filling them and copying to userspace - Grow s390 compat_statfs64, statfs and statfs64 structures f_spare array member to cover padding and simplify things - Remove obsolete SCHED_BOOK and SCHED_DRAWER configs - Remove unneeded S390_CCW_IOMMU and S390_AP_IOM configs * tag 's390-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/iommu: get rid of S390_CCW_IOMMU and S390_AP_IOMMU s390/Kconfig: remove obsolete configs SCHED_{BOOK,DRAWER} s390/uapi: cover statfs padding by growing f_spare statfs: enforce statfs[64] structure initialization s390/qdio: fix do_sqbs() inline assembly constraint s390/ipl: fix IPIB virtual vs physical address confusion s390/topology: honour nr_cpu_ids when adding CPUs s390/cio: include subchannels without devices also for evaluation s390/defconfigs: set CONFIG_INIT_STACK_NONE=y s390/pkey: zeroize key blobs s390/crypto: use vector instructions only if available for ChaCha20 commit 4ffd96c9621fcec3b84f3f997e036cc7077ec465 Merge: 46be92e58fa88 c4c597f1b3674 Author: Linus Torvalds Date: Fri May 19 11:05:42 2023 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "A mixture of compiler/static checker resolutions and a couple of MTE fixes: - Avoid erroneously marking untagged pages with PG_mte_tagged - Always reset KASAN tags for destination page in copy_page() - Mark PMU header functions 'static inline' - Fix some sparse warnings due to missing casts" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mte: Do not set PG_mte_tagged if tags were not initialized arm64: Also reset KASAN tag if page is not PG_mte_tagged arm64: perf: Mark all accessor functions inline ARM: perf: Mark all accessor functions inline arm64: vdso: Pass (void *) to virt_to_page() arm64/mm: mark private VM_FAULT_X defines as vm_fault_t commit afb2acb2e3a32e4d56f7fbd819769b98ed1b7520 Author: Michal Luczaj Date: Wed May 10 16:04:09 2023 +0200 KVM: Fix vcpu_array[0] races In kvm_vm_ioctl_create_vcpu(), add vcpu to vcpu_array iff it's safe to access vcpu via kvm_get_vcpu() and kvm_for_each_vcpu(), i.e. when there's no failure path requiring vcpu removal and destruction. Such order is important because vcpu_array accessors may end up referencing vcpu at vcpu_array[0] even before online_vcpus is set to 1. When online_vcpus=0, any call to kvm_get_vcpu() goes through array_index_nospec() and ends with an attempt to xa_load(vcpu_array, 0): int num_vcpus = atomic_read(&kvm->online_vcpus); i = array_index_nospec(i, num_vcpus); return xa_load(&kvm->vcpu_array, i); Similarly, when online_vcpus=0, a kvm_for_each_vcpu() does not iterate over an "empty" range, but actually [0, ULONG_MAX]: xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \ (atomic_read(&kvm->online_vcpus) - 1)) In both cases, such online_vcpus=0 edge case, even if leading to unnecessary calls to XArray API, should not be an issue; requesting unpopulated indexes/ranges is handled by xa_load() and xa_for_each_range(). However, this means that when the first vCPU is created and inserted in vcpu_array *and* before online_vcpus is incremented, code calling kvm_get_vcpu()/kvm_for_each_vcpu() already has access to that first vCPU. This should not pose a problem assuming that once a vcpu is stored in vcpu_array, it will remain there, but that's not the case: kvm_vm_ioctl_create_vcpu() first inserts to vcpu_array, then requests a file descriptor. If create_vcpu_fd() fails, newly inserted vcpu is removed from the vcpu_array, then destroyed: vcpu->vcpu_idx = atomic_read(&kvm->online_vcpus); r = xa_insert(&kvm->vcpu_array, vcpu->vcpu_idx, vcpu, GFP_KERNEL_ACCOUNT); kvm_get_kvm(kvm); r = create_vcpu_fd(vcpu); if (r < 0) { xa_erase(&kvm->vcpu_array, vcpu->vcpu_idx); kvm_put_kvm_no_destroy(kvm); goto unlock_vcpu_destroy; } atomic_inc(&kvm->online_vcpus); This results in a possible race condition when a reference to a vcpu is acquired (via kvm_get_vcpu() or kvm_for_each_vcpu()) moments before said vcpu is destroyed. Signed-off-by: Michal Luczaj Message-Id: <20230510140410.1093987-2-mhal@rbox.co> Cc: stable@vger.kernel.org Fixes: c5b077549136 ("KVM: Convert the kvm->vcpus array to a xarray", 2021-12-08) Signed-off-by: Paolo Bonzini commit 3367eeab975145e65136c2d091fe6e0c6cb29636 Author: Jacob Xu Date: Thu Feb 24 17:29:59 2022 -0800 KVM: VMX: Fix header file dependency of asm/vmx.h Include a definition of WARN_ON_ONCE() before using it. Fixes: bb1fcc70d98f ("KVM: nVMX: Allow L1 to use 5-level page walks for nested EPT") Cc: Sean Christopherson Signed-off-by: Jacob Xu [reworded commit message; changed to ] Signed-off-by: Jim Mattson Reviewed-by: Sean Christopherson Message-Id: <20220225012959.1554168-1-jmattson@google.com> Signed-off-by: Paolo Bonzini commit e0ceec221f62deb5d6c32c0327030028d3db5f27 Author: Sean Christopherson Date: Fri May 12 16:31:27 2023 -0700 KVM: Don't enable hardware after a restart/shutdown is initiated Reject hardware enabling, i.e. VM creation, if a restart/shutdown has been initiated to avoid re-enabling hardware between kvm_reboot() and machine_{halt,power_off,restart}(). The restart case is especially problematic (for x86) as enabling VMX (or clearing GIF in KVM_RUN on SVM) blocks INIT, which results in the restart/reboot hanging as BIOS is unable to wake and rendezvous with APs. Note, this bug, and the original issue that motivated the addition of kvm_reboot(), is effectively limited to a forced reboot, e.g. `reboot -f`. In a "normal" reboot, userspace will gracefully teardown userspace before triggering the kernel reboot (modulo bugs, errors, etc), i.e. any process that might do ioctl(KVM_CREATE_VM) is long gone. Fixes: 8e1c18157d87 ("KVM: VMX: Disable VMX when system shutdown") Signed-off-by: Sean Christopherson Acked-by: Marc Zyngier Message-Id: <20230512233127.804012-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6735150b69978a9f73e3d1bab719e81a5dfafa83 Author: Sean Christopherson Date: Fri May 12 16:31:26 2023 -0700 KVM: Use syscore_ops instead of reboot_notifier to hook restart/shutdown Use syscore_ops.shutdown to disable hardware virtualization during a reboot instead of using the dedicated reboot_notifier so that KVM disables virtualization _after_ system_state has been updated. This will allow fixing a race in KVM's handling of a forced reboot where KVM can end up enabling hardware virtualization between kernel_restart_prepare() and machine_restart(). Rename KVM's hook to match the syscore op to avoid any possible confusion from wiring up a "reboot" helper to a "shutdown" hook (neither "shutdown nor "reboot" is completely accurate as the hook handles both). Opportunistically rewrite kvm_shutdown()'s comment to make it less VMX specific, and to explain why kvm_rebooting exists. Cc: Marc Zyngier Cc: Oliver Upton Cc: James Morse Cc: Suzuki K Poulose Cc: Zenghui Yu Cc: kvmarm@lists.linux.dev Cc: Huacai Chen Cc: Aleksandar Markovic Cc: Anup Patel Cc: Atish Patra Cc: kvm-riscv@lists.infradead.org Signed-off-by: Sean Christopherson Acked-by: Marc Zyngier Message-Id: <20230512233127.804012-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 46be92e58fa8868fc10854de94f270e1d58ec434 Merge: f4a8871f9f347 dc4f2ccaedddb Author: Linus Torvalds Date: Fri May 19 10:55:55 2023 -0700 Merge tag 'sound-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes that have been gathered since rc1: - Lots of small ASoC SOF Intel fixes - A couple of UAF and NULL-dereference fixes - Quirks and updates for HD-audio, USB-audio and ASoC AMD - A few minor build / sparse warning fixes - MAINTAINERS and DT updates" * tag 'sound-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (38 commits) ALSA: hda: Add NVIDIA codec IDs a3 through a7 to patch table ALSA: oss: avoid missing-prototype warnings ALSA: cs46xx: mark snd_cs46xx_download_image as static ALSA: hda: Fix Oops by 9.1 surround channel names ASoC: SOF: topology: Fix tuples array allocation ASoC: SOF: Separate the tokens for input and output pin index MAINTAINERS: Remove self from Cirrus Codec drivers ASoC: cs35l56: Prevent unbalanced pm_runtime in dsp_work() on SoundWire ASoC: SOF: topology: Fix logic for copying tuples ASoC: SOF: pm: save io region state in case of errors in resume ASoC: MAINTAINERS: drop Krzysztof Kozlowski from Samsung audio ASoC: mediatek: mt8186: Fix use-after-free in driver remove path ASoC: SOF: ipc3-topology: Make sure that only one cmd is sent in dai_config ASoC: SOF: sof-client-probes: fix pm_runtime imbalance in error handling ASoC: SOF: pcm: fix pm_runtime imbalance in error handling ASoC: SOF: debug: conditionally bump runtime_pm counter on exceptions ASoC: SOF: Intel: hda-mlink: add helper to program SoundWire PCMSyCM registers ASoC: SOF: Intel: hda-mlink: initialize instance_offset member ASoC: SOF: Intel: hda-mlink: use 'ml_addr' parameter consistently ASoC: SOF: Intel: hda-mlink: fix base_ptr computation ... commit 0613d8ca9ab382caabe9ed2dceb429e9781e443f Author: Will Deacon Date: Thu May 18 11:25:28 2023 +0100 bpf: Fix mask generation for 32-bit narrow loads of 64-bit fields A narrow load from a 64-bit context field results in a 64-bit load followed potentially by a 64-bit right-shift and then a bitwise AND operation to extract the relevant data. In the case of a 32-bit access, an immediate mask of 0xffffffff is used to construct a 64-bit BPP_AND operation which then sign-extends the mask value and effectively acts as a glorified no-op. For example: 0: 61 10 00 00 00 00 00 00 r0 = *(u32 *)(r1 + 0) results in the following code generation for a 64-bit field: ldr x7, [x7] // 64-bit load mov x10, #0xffffffffffffffff and x7, x7, x10 Fix the mask generation so that narrow loads always perform a 32-bit AND operation: ldr x7, [x7] // 64-bit load mov w10, #0xffffffff and w7, w7, w10 Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: John Fastabend Cc: Krzesimir Nowak Cc: Andrey Ignatov Acked-by: Yonghong Song Fixes: 31fd85816dbe ("bpf: permits narrower load from bpf program context fields") Signed-off-by: Will Deacon Link: https://lore.kernel.org/r/20230518102528.1341-1-will@kernel.org Signed-off-by: Alexei Starovoitov commit dd5fb04857d7346c9ea4901ec3ebe5b90b0e8868 Author: Kalesh AP Date: Thu May 18 01:11:01 2023 -0700 RDMA/bnxt_re: Do not enable congestion control on VFs Congestion control needs to be enabled only on the PFs. FW fails the command if issued on VFs. Avoid sending the command on VFs. Fixes: f13bcef04ba0 ("RDMA/bnxt_re: Enable congestion control by default") Link: https://lore.kernel.org/r/1684397461-23082-4-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Kalesh AP Reviewed-by: Selvin Thyparampil Xavier Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 0fa0d520e2a878cb4c94c4dc84395905d3f14f54 Author: Kalesh AP Date: Thu May 18 01:11:00 2023 -0700 RDMA/bnxt_re: Fix return value of bnxt_re_process_raw_qp_pkt_rx bnxt_re_process_raw_qp_pkt_rx() always return 0 and ignores the return value of bnxt_re_post_send_shadow_qp(). Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Link: https://lore.kernel.org/r/1684397461-23082-3-git-send-email-selvin.xavier@broadcom.com Reviewed-by: Hongguang Gao Reviewed-by: Ajit Khaparde Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 349e3c0cf239cc01d58a1e6c749e171de014cd6a Author: Kalesh AP Date: Thu May 18 01:10:59 2023 -0700 RDMA/bnxt_re: Fix a possible memory leak Inside bnxt_qplib_create_cq(), when the check for NULL DPI fails, driver returns directly without freeing the memory allocated inside bnxt_qplib_alloc_init_hwq() routine. Fixed this by moving the check for NULL DPI before invoking bnxt_qplib_alloc_init_hwq(). Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Link: https://lore.kernel.org/r/1684397461-23082-2-git-send-email-selvin.xavier@broadcom.com Reviewed-by: Kashyap Desai Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 4e111f0cf0ee973ce7e7e012b4ceb07867d2dae5 Author: Tiezhu Yang Date: Fri May 19 15:17:37 2023 +0800 perf bench syscall: Fix __NR_execve undeclared build error The __NR_execve definition for i386 was deleted by mistake in the commit ece7f7c0507c ("perf bench syscall: Add fork syscall benchmark"), add it to fix the build error on i386. Fixes: ece7f7c0507cc147 ("perf bench syscall: Add fork syscall benchmark") Reported-by: Linux Kernel Functional Testing Signed-off-by: Tiezhu Yang Tested-by: Naresh Kamboju Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Tiezhu Yang Cc: loongson-kernel@lists.loongnix.cn Closes: https://lore.kernel.org/all/CA+G9fYvgBR1iB0CorM8OC4AM_w_tFzyQKHc+rF6qPzJL=TbfDQ@mail.gmail.com/ Link: https://lore.kernel.org/r/1684480657-2375-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit 5783ecc90e24a870a563b1acbfd13cad3786e519 Merge: 73c7f8246539d eab866bfff51d Author: Rafael J. Wysocki Date: Fri May 19 16:33:50 2023 +0200 Merge branch 'pm-tools' Merge cpupower utility fixes for 6.4-rc3: - Read TSC on each CPU right before reading MPERF so as to reduce the potential time difference between the TSC and MPERF accesses and improve the C0 percentage calculation (Wyes Karny). - Fix a possible file handle leak and clean up the code in sysfs_get_enabled() (Hao Zeng). * pm-tools: cpupower: Make TSC read per CPU for Mperf monitor cpupower:Fix resource leaks in sysfs_get_enabled() commit eab866bfff51d21318425ef5ce9d5b49791a6799 Merge: f1fcbaa18b28d c2adb1877b76f Author: Rafael J. Wysocki Date: Fri May 19 16:23:07 2023 +0200 Merge tag 'linux-cpupower-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Pull cpupower utility fixes for 6.4-rc3 from Shuah Khan: "This cpupower fixes update for Linux 67.4-rc3 consists of: - a resource leak fix - fix drift in C0 percentage calculation due to System-wide TSC read. To lower this drift read TSC per CPU and also just after mperf read. This technique improves C0 percentage calculation in Mperf monitor" * tag 'linux-cpupower-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower: Make TSC read per CPU for Mperf monitor cpupower:Fix resource leaks in sysfs_get_enabled() commit 46f5dd7439e35ae63cdf04d7967152936c8a511e Author: Dan Carpenter Date: Mon May 15 13:32:47 2023 +0300 fbdev: omapfb: panel-tpo-td043mtea1: fix error code in probe() This was using the wrong variable, "r", instead of "ddata->vcc_reg", so it returned success instead of a negative error code. Fixes: 0d3dbeb8142a ("video: fbdev: omapfb: panel-tpo-td043mtea1: Make use of the helper function dev_err_probe()") Signed-off-by: Dan Carpenter Signed-off-by: Helge Deller commit aa8bf93101a185b49f83c9137453571a08be6e76 Author: Vladislav Efanov Date: Wed May 17 15:52:47 2023 +0300 drm/sched: Remove redundant check The rq pointer points inside the drm_gpu_scheduler structure. Thus it can't be NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: c61cdbdbffc1 ("drm/scheduler: Fix hang when sched_entity released") Signed-off-by: Vladislav Efanov Link: https://lore.kernel.org/r/20230517125247.434103-1-VEfanov@ispras.ru Reviewed-by: Luben Tuikov Signed-off-by: Luben Tuikov commit 75438f24a4d4adcaea6f04ad3a94b7a145e63327 Author: Ian Rogers Date: Wed May 17 15:57:06 2023 -0700 perf test attr: Fix python SafeConfigParser() deprecation warning Address the warning: ``` tests/attr.py:155: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in Python 3.12. Use ConfigParser directly instead. parser = configparser.SafeConfigParser() ``` by removing the word 'Safe'. Reviewed-by: James Clark Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Richter Link: https://lore.kernel.org/r/20230517225707.2682235-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 951efb9976ce453342a86b29d7bfe9fa483c7c4d Author: Ian Rogers Date: Wed May 17 15:57:05 2023 -0700 perf test attr: Update no event/metric expectations Previously hard coded events/metrics were used, update for the use of the TopdownL1 json metric group. Reported-by: Arnaldo Carvalho de Melo Fixes: 94b1a603fca78388 ("perf stat: Add TopdownL1 metric as a default if present") Reviewed-by: James Clark Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Tested-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Richter Link: https://lore.kernel.org/r/20230517225707.2682235-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 4d43acb145c363626d76f49febb4240c488cd1cf Author: Dan Carpenter Date: Mon May 15 13:32:10 2023 +0300 dmaengine: at_xdmac: fix potential Oops in at_xdmac_prep_interleaved() There are two place if the at_xdmac_interleaved_queue_desc() fails which could lead to a NULL dereference where "first" is NULL and we call list_add_tail(&first->desc_node, ...). In the first caller, the return is not checked so add a check for that. In the next caller, the return is checked but if it fails on the first iteration through the loop then it will lead to a NULL pointer dereference. Fixes: 4e5385784e69 ("dmaengine: at_xdmac: handle numf > 1") Fixes: 62b5cb757f1d ("dmaengine: at_xdmac: fix memory leak in interleaved mode") Signed-off-by: Dan Carpenter Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/21282b66-9860-410a-83df-39c17fcf2f1b@kili.mountain Signed-off-by: Vinod Koul commit ddaf098ea779b3c1302c7843f6ff01e89b1fd380 Author: Greg Kroah-Hartman Date: Tue May 16 21:20:14 2023 +0200 driver core: class: properly reference count class_dev_iter() When class_dev_iter is initialized, the reference count for the subsys private structure is incremented, but never decremented, causing a memory leak over time. To resolve this, save off a pointer to the internal structure into the class_dev_iter structure and then when the iterator is finished, drop the reference count. Reported-and-tested-by: syzbot+e7afd76ad060fa0d2605@syzkaller.appspotmail.com Fixes: 7b884b7f24b4 ("driver core: class.c: convert to only use class_to_subsys") Reported-by: Mirsad Goran Todorovac Cc: Alan Stern Acked-by: Rafael J. Wysocki Tested-by: Mirsad Goran Todorovac Link: https://lore.kernel.org/r/2023051610-stove-condense-9a77@gregkh Signed-off-by: Greg Kroah-Hartman commit 09cce60bddd6461a93a5bf434265a47827d1bc6f Author: Will Deacon Date: Thu May 18 10:58:44 2023 +0100 KVM: arm64: Prevent unconditional donation of unmapped regions from the host Since host stage-2 mappings are created lazily, we cannot rely solely on the pte in order to recover the target physical address when checking a host-initiated memory transition as this permits donation of unmapped regions corresponding to MMIO or "no-map" memory. Instead of inspecting the pte, move the addr_is_allowed_memory() check into the host callback function where it is passed the physical address directly from the walker. Cc: Quentin Perret Fixes: e82edcc75c4e ("KVM: arm64: Implement do_share() helper for sharing memory") Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230518095844.1178-1-will@kernel.org commit 62548732260976ca88fcb17ef98ab661e7ce7504 Author: Jean-Philippe Brucker Date: Thu May 18 11:09:18 2023 +0100 KVM: arm64: vgic: Fix a comment It is host userspace, not the guest, that issues KVM_DEV_ARM_VGIC_GRP_CTRL Signed-off-by: Jean-Philippe Brucker Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230518100914.2837292-5-jean-philippe@linaro.org commit c38b8400aef99d63be2b1ff131bb993465dcafe1 Author: Jean-Philippe Brucker Date: Thu May 18 11:09:17 2023 +0100 KVM: arm64: vgic: Fix locking comment It is now config_lock that must be held, not kvm lock. Replace the comment with a lockdep annotation. Fixes: f00327731131 ("KVM: arm64: Use config_lock to protect vgic state") Signed-off-by: Jean-Philippe Brucker Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230518100914.2837292-4-jean-philippe@linaro.org commit 9cf2f840c439b6b23bd99f584f2917ca425ae406 Author: Jean-Philippe Brucker Date: Thu May 18 11:09:16 2023 +0100 KVM: arm64: vgic: Wrap vgic_its_create() with config_lock vgic_its_create() changes the vgic state without holding the config_lock, which triggers a lockdep warning in vgic_v4_init(): [ 358.667941] WARNING: CPU: 3 PID: 178 at arch/arm64/kvm/vgic/vgic-v4.c:245 vgic_v4_init+0x15c/0x7a8 ... [ 358.707410] vgic_v4_init+0x15c/0x7a8 [ 358.708550] vgic_its_create+0x37c/0x4a4 [ 358.709640] kvm_vm_ioctl+0x1518/0x2d80 [ 358.710688] __arm64_sys_ioctl+0x7ac/0x1ba8 [ 358.711960] invoke_syscall.constprop.0+0x70/0x1e0 [ 358.713245] do_el0_svc+0xe4/0x2d4 [ 358.714289] el0_svc+0x44/0x8c [ 358.715329] el0t_64_sync_handler+0xf4/0x120 [ 358.716615] el0t_64_sync+0x190/0x194 Wrap the whole of vgic_its_create() with config_lock since, in addition to calling vgic_v4_init(), it also modifies the global kvm->arch.vgic state. Fixes: f00327731131 ("KVM: arm64: Use config_lock to protect vgic state") Signed-off-by: Jean-Philippe Brucker Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230518100914.2837292-3-jean-philippe@linaro.org commit 59112e9c390be595224e427827475a6cd3726021 Author: Jean-Philippe Brucker Date: Thu May 18 11:09:15 2023 +0100 KVM: arm64: vgic: Fix a circular locking issue Lockdep reports a circular lock dependency between the srcu and the config_lock: [ 262.179917] -> #1 (&kvm->srcu){.+.+}-{0:0}: [ 262.182010] __synchronize_srcu+0xb0/0x224 [ 262.183422] synchronize_srcu_expedited+0x24/0x34 [ 262.184554] kvm_io_bus_register_dev+0x324/0x50c [ 262.185650] vgic_register_redist_iodev+0x254/0x398 [ 262.186740] vgic_v3_set_redist_base+0x3b0/0x724 [ 262.188087] kvm_vgic_addr+0x364/0x600 [ 262.189189] vgic_set_common_attr+0x90/0x544 [ 262.190278] vgic_v3_set_attr+0x74/0x9c [ 262.191432] kvm_device_ioctl+0x2a0/0x4e4 [ 262.192515] __arm64_sys_ioctl+0x7ac/0x1ba8 [ 262.193612] invoke_syscall.constprop.0+0x70/0x1e0 [ 262.195006] do_el0_svc+0xe4/0x2d4 [ 262.195929] el0_svc+0x44/0x8c [ 262.196917] el0t_64_sync_handler+0xf4/0x120 [ 262.198238] el0t_64_sync+0x190/0x194 [ 262.199224] [ 262.199224] -> #0 (&kvm->arch.config_lock){+.+.}-{3:3}: [ 262.201094] __lock_acquire+0x2b70/0x626c [ 262.202245] lock_acquire+0x454/0x778 [ 262.203132] __mutex_lock+0x190/0x8b4 [ 262.204023] mutex_lock_nested+0x24/0x30 [ 262.205100] vgic_mmio_write_v3_misc+0x5c/0x2a0 [ 262.206178] dispatch_mmio_write+0xd8/0x258 [ 262.207498] __kvm_io_bus_write+0x1e0/0x350 [ 262.208582] kvm_io_bus_write+0xe0/0x1cc [ 262.209653] io_mem_abort+0x2ac/0x6d8 [ 262.210569] kvm_handle_guest_abort+0x9b8/0x1f88 [ 262.211937] handle_exit+0xc4/0x39c [ 262.212971] kvm_arch_vcpu_ioctl_run+0x90c/0x1c04 [ 262.214154] kvm_vcpu_ioctl+0x450/0x12f8 [ 262.215233] __arm64_sys_ioctl+0x7ac/0x1ba8 [ 262.216402] invoke_syscall.constprop.0+0x70/0x1e0 [ 262.217774] do_el0_svc+0xe4/0x2d4 [ 262.218758] el0_svc+0x44/0x8c [ 262.219941] el0t_64_sync_handler+0xf4/0x120 [ 262.221110] el0t_64_sync+0x190/0x194 Note that the current report, which can be triggered by the vgic_irq kselftest, is a triple chain that includes slots_lock, but after inverting the slots_lock/config_lock dependency, the actual problem reported above remains. In several places, the vgic code calls kvm_io_bus_register_dev(), which synchronizes the srcu, while holding config_lock (#1). And the MMIO handler takes the config_lock while holding the srcu read lock (#0). Break dependency #1, by registering the distributor and redistributors without holding config_lock. The ITS also uses kvm_io_bus_register_dev() but already relies on slots_lock to serialize calls. The distributor iodev is created on the first KVM_RUN call. Multiple threads will race for vgic initialization, and only the first one will see !vgic_ready() under the lock. To serialize those threads, rely on slots_lock rather than config_lock. Redistributors are created earlier, through KVM_DEV_ARM_VGIC_GRP_ADDR ioctls and vCPU creation. Similarly, serialize the iodev creation with slots_lock, and the rest with config_lock. Fixes: f00327731131 ("KVM: arm64: Use config_lock to protect vgic state") Signed-off-by: Jean-Philippe Brucker Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230518100914.2837292-2-jean-philippe@linaro.org commit 9025944fddfed5966c8f102f1fe921ab3aee2c12 Author: Shenwei Wang Date: Thu May 18 10:02:02 2023 -0500 net: fec: add dma_wmb to ensure correct descriptor values Two dma_wmb() are added in the XDP TX path to ensure proper ordering of descriptor and buffer updates: 1. A dma_wmb() is added after updating the last BD to make sure the updates to rest of the descriptor are visible before transferring ownership to FEC. 2. A dma_wmb() is also added after updating the bdp to ensure these updates are visible before updating txq->bd.cur. 3. Start the xmit of the frame immediately right after configuring the tx descriptor. Fixes: 6d6b39f180b8 ("net: fec: add initial XDP support") Signed-off-by: Shenwei Wang Reviewed-by: Wei Fang Signed-off-by: David S. Miller commit 3be5f6cd4a52b72ae31b77171da0912829c02096 Author: Vladimir Oltean Date: Thu May 18 18:41:46 2023 +0300 MAINTAINERS: add myself as maintainer for enetc I would like to be copied on new patches submitted on this driver. I am relatively familiar with the code, having practically maintained it for a while. Signed-off-by: Vladimir Oltean Acked-by: Claudiu Manoil Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit de678ca38861f2eb58814048076dcf95ed1b5bf9 Author: Sunil Goutham Date: Thu May 18 12:10:42 2023 +0530 octeontx2-pf: Fix TSOv6 offload HW adds segment size to the payload length in the IPv6 header. Fix payload length to just TCP header length instead of 'TCP header size + IPv6 header size'. Fixes: 86d7476078b8 ("octeontx2-pf: TCP segmentation offload support") Signed-off-by: Sunil Goutham Signed-off-by: Ratheesh Kannoth Signed-off-by: David S. Miller commit cfcb942863f6fce9266e1957a021e6c7295dee42 Author: Alejandro Lucero Date: Thu May 18 06:48:22 2023 +0100 sfc: fix devlink info error handling Avoid early devlink info return if errors arise with MCDI commands executed for getting the required info from the device. The rationale is some commands can fail but later ones could still give useful data. Moreover, some nvram partitions could not be present which needs to be handled as a non error. The specific errors are reported through system messages and if any error appears, it will be reported generically through extack. Fixes 14743ddd2495 ("sfc: add devlink info support for ef100") Signed-off-by: Alejandro Lucero Acked-by: Martin Habets Signed-off-by: David S. Miller commit 35112271672ae98f45df7875244a4e33aa215e31 Author: Wen Gu Date: Thu May 18 13:14:55 2023 +0800 net/smc: Reset connection when trying to use SMCRv2 fails. We found a crash when using SMCRv2 with 2 Mellanox ConnectX-4. It can be reproduced by: - smc_run nginx - smc_run wrk -t 32 -c 500 -d 30 http://: BUG: kernel NULL pointer dereference, address: 0000000000000014 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 8000000108713067 P4D 8000000108713067 PUD 151127067 PMD 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 4 PID: 2441 Comm: kworker/4:249 Kdump: loaded Tainted: G W E 6.4.0-rc1+ #42 Workqueue: smc_hs_wq smc_listen_work [smc] RIP: 0010:smc_clc_send_confirm_accept+0x284/0x580 [smc] RSP: 0018:ffffb8294b2d7c78 EFLAGS: 00010a06 RAX: ffff8f1873238880 RBX: ffffb8294b2d7dc8 RCX: 0000000000000000 RDX: 00000000000000b4 RSI: 0000000000000001 RDI: 0000000000b40c00 RBP: ffffb8294b2d7db8 R08: ffff8f1815c5860c R09: 0000000000000000 R10: 0000000000000400 R11: 0000000000000000 R12: ffff8f1846f56180 R13: ffff8f1815c5860c R14: 0000000000000001 R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff8f1aefd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000014 CR3: 00000001027a0001 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? mlx5_ib_map_mr_sg+0xa1/0xd0 [mlx5_ib] ? smcr_buf_map_link+0x24b/0x290 [smc] ? __smc_buf_create+0x4ee/0x9b0 [smc] smc_clc_send_accept+0x4c/0xb0 [smc] smc_listen_work+0x346/0x650 [smc] ? __schedule+0x279/0x820 process_one_work+0x1e5/0x3f0 worker_thread+0x4d/0x2f0 ? __pfx_worker_thread+0x10/0x10 kthread+0xe5/0x120 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2c/0x50 During the CLC handshake, server sequentially tries available SMCRv2 and SMCRv1 devices in smc_listen_work(). If an SMCRv2 device is found. SMCv2 based link group and link will be assigned to the connection. Then assumed that some buffer assignment errors happen later in the CLC handshake, such as RMB registration failure, server will give up SMCRv2 and try SMCRv1 device instead. But the resources assigned to the connection won't be reset. When server tries SMCRv1 device, the connection creation process will be executed again. Since conn->lnk has been assigned when trying SMCRv2, it will not be set to the correct SMCRv1 link in smcr_lgr_conn_assign_link(). So in such situation, conn->lgr points to correct SMCRv1 link group but conn->lnk points to the SMCRv2 link mistakenly. Then in smc_clc_send_confirm_accept(), conn->rmb_desc->mr[link->link_idx] will be accessed. Since the link->link_idx is not correct, the related MR may not have been initialized, so crash happens. | Try SMCRv2 device first | |-> conn->lgr: assign existed SMCRv2 link group; | |-> conn->link: assign existed SMCRv2 link (link_idx may be 1 in SMC_LGR_SYMMETRIC); | |-> sndbuf & RMB creation fails, quit; | | Try SMCRv1 device then | |-> conn->lgr: create SMCRv1 link group and assign; | |-> conn->link: keep SMCRv2 link mistakenly; | |-> sndbuf & RMB creation succeed, only RMB->mr[link_idx = 0] | initialized. | | Then smc_clc_send_confirm_accept() accesses | conn->rmb_desc->mr[conn->link->link_idx, which is 1], then crash. v This patch tries to fix this by cleaning conn->lnk before assigning link. In addition, it is better to reset the connection and clean the resources assigned if trying SMCRv2 failed in buffer creation or registration. Fixes: e49300a6bf62 ("net/smc: add listen processing for SMC-Rv2") Link: https://lore.kernel.org/r/20220523055056.2078994-1-liuyacan@corp.netease.com/ Signed-off-by: Wen Gu Reviewed-by: Tony Lu Signed-off-by: David S. Miller commit d226b1df361988f885c298737d6019c863a25f26 Author: Po-Hsu Lin Date: Thu May 18 12:37:59 2023 +0800 selftests: fib_tests: mute cleanup error message In the end of the test, there will be an error message induced by the `ip netns del ns1` command in cleanup() Tests passed: 201 Tests failed: 0 Cannot remove namespace file "/run/netns/ns1": No such file or directory This can even be reproduced with just `./fib_tests.sh -h` as we're calling cleanup() on exit. Redirect the error message to /dev/null to mute it. V2: Update commit message and fixes tag. V3: resubmit due to missing netdev ML in V2 Fixes: b60417a9f2b8 ("selftest: fib_tests: Always cleanup before exit") Signed-off-by: Po-Hsu Lin Reviewed-by: Ido Schimmel Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit afbed3f74830163f9559579dee382cac3cff82da Author: Jakub Kicinski Date: Tue May 16 18:59:35 2023 -0700 net/mlx5e: do as little as possible in napi poll when budget is 0 NAPI gets called with budget of 0 from netpoll, which has interrupts disabled. We should try to free some space on Tx rings and nothing else. Specifically do not try to handle XDP TX or try to refill Rx buffers - we can't use the page pool from IRQ context. Don't check if IRQs moved, either, that makes no sense in netpoll. Netpoll calls _all_ the rings from whatever CPU it happens to be invoked on. In general do as little as possible, the work quickly adds up when there's tens of rings to poll. The immediate stack trace I was seeing is: __do_softirq+0xd1/0x2c0 __local_bh_enable_ip+0xc7/0x120 page_pool_put_defragged_page+0x267/0x320 mlx5e_free_xdpsq_desc+0x99/0xd0 mlx5e_poll_xdpsq_cq+0x138/0x3b0 mlx5e_napi_poll+0xc3/0x8b0 netpoll_poll_dev+0xce/0x150 AFAIU page pool takes a BH lock, releases it and since BH is now enabled tries to run softirqs. Reviewed-by: Tariq Toukan Fixes: 60bbf7eeef10 ("mlx5: use page_pool for xdp_return_frame call") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 2897041ea094f1eaf49d6b9f765c11a91c0d5dbf Merge: 7e01c7f7046ef 74836ec828fe1 Author: David S. Miller Date: Fri May 19 08:37:37 2023 +0100 Merge branch 'tls-fixes' Jakub Kicinski says: ==================== tls: rx: strp: fix inline crypto offload The local strparser version I added to TLS does not preserve decryption status, which breaks inline crypto (NIC offload). ==================== Signed-off-by: David S. Miller commit 74836ec828fe17b63f2006fdbf53311d691396bf Author: Jakub Kicinski Date: Tue May 16 18:50:42 2023 -0700 tls: rx: strp: don't use GFP_KERNEL in softirq context When receive buffer is small, or the TCP rx queue looks too complicated to bother using it directly - we allocate a new skb and copy data into it. We already use sk->sk_allocation... but nothing actually sets it to GFP_ATOMIC on the ->sk_data_ready() path. Users of HW offload are far more likely to experience problems due to scheduling while atomic. "Copy mode" is very rarely triggered with SW crypto. Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser") Tested-by: Shai Amiram Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit eca9bfafee3a0487e59c59201ae14c7594ba940a Author: Jakub Kicinski Date: Tue May 16 18:50:41 2023 -0700 tls: rx: strp: preserve decryption status of skbs when needed When receive buffer is small we try to copy out the data from TCP into a skb maintained by TLS to prevent connection from stalling. Unfortunately if a single record is made up of a mix of decrypted and non-decrypted skbs combining them into a single skb leads to loss of decryption status, resulting in decryption errors or data corruption. Similarly when trying to use TCP receive queue directly we need to make sure that all the skbs within the record have the same status. If we don't the mixed status will be detected correctly but we'll CoW the anchor, again collapsing it into a single paged skb without decrypted status preserved. So the "fixup" code will not know which parts of skb to re-encrypt. Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser") Tested-by: Shai Amiram Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit c1c607b1e5d5477d82ca6a86a05a4f10907b33ee Author: Jakub Kicinski Date: Tue May 16 18:50:40 2023 -0700 tls: rx: strp: factor out copying skb data We'll need to copy input skbs individually in the next patch. Factor that code out (without assuming we're copying a full record). Tested-by: Shai Amiram Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 8b0c0dc9fbbd01e58a573a41c38885f9e4c17696 Author: Jakub Kicinski Date: Tue May 16 18:50:39 2023 -0700 tls: rx: strp: fix determining record length in copy mode We call tls_rx_msg_size(skb) before doing skb->len += chunk. So the tls_rx_msg_size() code will see old skb->len, most likely leading to an over-read. Worst case we will over read an entire record, next iteration will try to trim the skb but may end up turning frag len negative or discarding the subsequent record (since we already told TCP we've read it during previous read but now we'll trim it out of the skb). Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser") Tested-by: Shai Amiram Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 14c4be92ebb3e36e392aa9dd8f314038a9f96f3c Author: Jakub Kicinski Date: Tue May 16 18:50:38 2023 -0700 tls: rx: strp: force mixed decrypted records into copy mode If a record is partially decrypted we'll have to CoW it, anyway, so go into copy mode and allocate a writable skb right away. This will make subsequent fix simpler because we won't have to teach tls_strp_msg_make_copy() how to copy skbs while preserving decrypt status. Tested-by: Shai Amiram Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 210620ae44a83f25220450bbfcc22e6fe986b25f Author: Jakub Kicinski Date: Tue May 16 18:50:37 2023 -0700 tls: rx: strp: set the skb->len of detached / CoW'ed skbs alloc_skb_with_frags() fills in page frag sizes but does not set skb->len and skb->data_len. Set those correctly otherwise device offload will most likely generate an empty skb and hit the BUG() at the end of __skb_nsg(). Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser") Tested-by: Shai Amiram Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit b3a03b540e3cf62a255213d084d76d71c02793d5 Author: Jakub Kicinski Date: Tue May 16 18:50:36 2023 -0700 tls: rx: device: fix checking decryption status skb->len covers the entire skb, including the frag_list. In fact we're guaranteed that rxm->full_len <= skb->len, so since the change under Fixes we were not checking decrypt status of any skb but the first. Note that the skb_pagelen() added here may feel a bit costly, but it's removed by subsequent fixes, anyway. Reported-by: Tariq Toukan Fixes: 86b259f6f888 ("tls: rx: device: bound the frag walk") Tested-by: Shai Amiram Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 7e01c7f7046efc2c7c192c3619db43292b98e997 Author: Tudor Ambarus Date: Wed May 17 13:38:08 2023 +0000 net: cdc_ncm: Deal with too low values of dwNtbOutMaxSize Currently in cdc_ncm_check_tx_max(), if dwNtbOutMaxSize is lower than the calculated "min" value, but greater than zero, the logic sets tx_max to dwNtbOutMaxSize. This is then used to allocate a new SKB in cdc_ncm_fill_tx_frame() where all the data is handled. For small values of dwNtbOutMaxSize the memory allocated during alloc_skb(dwNtbOutMaxSize, GFP_ATOMIC) will have the same size, due to how size is aligned at alloc time: size = SKB_DATA_ALIGN(size); size += SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); Thus we hit the same bug that we tried to squash with commit 2be6d4d16a084 ("net: cdc_ncm: Allow for dwNtbOutMaxSize to be unset or zero") Low values of dwNtbOutMaxSize do not cause an issue presently because at alloc_skb() time more memory (512b) is allocated than required for the SKB headers alone (320b), leaving some space (512b - 320b = 192b) for CDC data (172b). However, if more elements (for example 3 x u64 = [24b]) were added to one of the SKB header structs, say 'struct skb_shared_info', increasing its original size (320b [320b aligned]) to something larger (344b [384b aligned]), then suddenly the CDC data (172b) no longer fits in the spare SKB data area (512b - 384b = 128b). Consequently the SKB bounds checking semantics fails and panics: skbuff: skb_over_panic: text:ffffffff831f755b len:184 put:172 head:ffff88811f1c6c00 data:ffff88811f1c6c00 tail:0xb8 end:0x80 dev: ------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:113! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 57 Comm: kworker/0:2 Not tainted 5.15.106-syzkaller-00249-g19c0ed55a470 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Workqueue: mld mld_ifc_work RIP: 0010:skb_panic net/core/skbuff.c:113 [inline] RIP: 0010:skb_over_panic+0x14c/0x150 net/core/skbuff.c:118 [snip] Call Trace: skb_put+0x151/0x210 net/core/skbuff.c:2047 skb_put_zero include/linux/skbuff.h:2422 [inline] cdc_ncm_ndp16 drivers/net/usb/cdc_ncm.c:1131 [inline] cdc_ncm_fill_tx_frame+0x11ab/0x3da0 drivers/net/usb/cdc_ncm.c:1308 cdc_ncm_tx_fixup+0xa3/0x100 Deal with too low values of dwNtbOutMaxSize, clamp it in the range [USB_CDC_NCM_NTB_MIN_OUT_SIZE, CDC_NCM_NTB_MAX_SIZE_TX]. We ensure enough data space is allocated to handle CDC data by making sure dwNtbOutMaxSize is not smaller than USB_CDC_NCM_NTB_MIN_OUT_SIZE. Fixes: 289507d3364f ("net: cdc_ncm: use sysfs for rx/tx aggregation tuning") Cc: stable@vger.kernel.org Reported-by: syzbot+9f575a1f15fc0c01ed69@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=b982f1059506db48409d Link: https://lore.kernel.org/all/20211202143437.1411410-1-lee.jones@linaro.org/ Signed-off-by: Tudor Ambarus Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230517133808.1873695-2-tudor.ambarus@linaro.org Signed-off-by: Jakub Kicinski commit 1878b736e88e0d30f67d7fb577816395727ef040 Merge: ac5902f84bb54 0649728123cf6 Author: Jens Axboe Date: Thu May 18 19:46:42 2023 -0600 Merge tag 'nvme-6.4-2023-05-18' of git://git.infradead.org/nvme into block-6.4 Pull NVMe fixes from Keith: "nvme fixes for Linux 6.4 - More device quirks (Sagi, Hristo, Adrian, Daniel) - Controller delete race (Maurizo) - Multipath cleanup fix (Christoph)" * tag 'nvme-6.4-2023-05-18' of git://git.infradead.org/nvme: nvme-pci: Add quirk for Teamgroup MP33 SSD nvme: do not let the user delete a ctrl before a complete initialization nvme-multipath: don't call blk_mark_disk_dead in nvme_mpath_remove_disk nvme-pci: clamp max_hw_sectors based on DMA optimized limitation nvme-pci: add quirk for missing secondary temperature thresholds nvme-pci: add NVME_QUIRK_BOGUS_NID for HS-SSD-FUTURE 2048G commit 79ef1c9d14c65a5c3f7eec47389d8c2a33be8e8d Merge: 83ab69c9f759e 6d600229df1ed Author: Dave Airlie Date: Fri May 19 11:26:21 2023 +1000 Merge tag 'amd-drm-fixes-6.4-2023-05-18' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.4-2023-05-18: amdgpu: - update gfx11 clock counter logic - Fix a race when disabling gfxoff on gfx10/11 for profiling - Raven/Raven2/PCO clock counter fix - Add missing get_vbios_fb_size for GMC 11 - Fix a spurious irq warning in the device remove case - Fix possible power mode mismatch between driver and PMFW - USB4 fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230518174811.3841-1-alexander.deucher@amd.com commit 83ab69c9f759e365cba243568cd76f8d49dcd5b5 Merge: 8c5be8a885a59 5c054db54c43a Author: Dave Airlie Date: Fri May 19 11:22:22 2023 +1000 Merge tag 'drm-msm-fixes-2023-05-17' of https://gitlab.freedesktop.org/drm/msm into drm-fixes msm-fixes for v6.4-rc3 Display Fixes: + Catalog fixes: - fix the programmable fetch lines and qos settings of msm8998 to match what is present downstream - fix the LM pairs for msm8998 to match what is present downstream. The current settings are not right as LMs with incompatible connected blocks are paired - remove unused INTF0 interrupt mask from SM6115/QCM2290 as there is no INTF0 present on those chipsets. There is only one DSI on index 1 - remove TE2 block from relevant chipsets because this is mainly used for ping-pong split feature which is not supported upstream and also for the chipsets where we are removing them in this change, that block is not present as the tear check has been moved to the intf block - relocate non-MDP_TOP INTF_INTR offsets from dpu_hwio.h to dpu_hw_interrupts.c to match where they belong - fix the indentation for REV_7xxx interrupt masks - fix the offset and version for dither blocks of SM8[34]50/SC8280XP chipsets as it was incorrect - make the ping-pong blk length 0 for appropriate chipsets as those chipsets only have a dither ping-pong dither block but no other functionality in the base ping-pong - remove some duplicate register defines from INTF + Fix the log mask for the writeback block so that it can be enabled correctly via debugfs + unregister the hdmi codec for dp during unbind otherwise it leaks audio codec devices + Yaml change to fix warnings related to 'qcom,master-dsi' and 'qcom,sync-dual-dsi' GPU Fixes: + fix submit error path leak + arm-smmu-qcom fix for regression that broke per-process page tables + fix no-iommu crash Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvHEcJfp=k6qatmb_SvAeyvy3CBpaPfwLqtNthuEzA_7w@mail.gmail.com commit 8c5be8a885a59bfe5c74ff03fe3d59717b99deae Merge: 90facc4d46301 5896f2d363d5c Author: Dave Airlie Date: Fri May 19 11:19:15 2023 +1000 Merge tag 'drm-intel-fixes-2023-05-17' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Add missing null check for HDCP code. Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZGUgi7kXq+MiLcCA@jlahtine-mobl.ger.corp.intel.com commit 0649728123cf6a5518e154b4e1735fc85ea4f55c Author: Daniel Smith Date: Wed May 17 14:32:32 2023 -0700 nvme-pci: Add quirk for Teamgroup MP33 SSD Add a quirk for Teamgroup MP33 that reports duplicate ids for disk. Signed-off-by: Daniel Smith [kch: patch formatting] Signed-off-by: Chaitanya Kulkarni Tested-by: Daniel Smith Signed-off-by: Keith Busch commit 90facc4d46301c4fb188899627e3e79b597f83bc Merge: f1fcbaa18b28d 2ef0785b30bd6 Author: Dave Airlie Date: Fri May 19 10:43:54 2023 +1000 Merge tag 'exynos-drm-fixes-for-v6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Just one fixup to exynos_drm_g2d module. - Fix below build warning by marking them as 'static inline' drivers/gpu/drm/exynos/exynos_drm_g2d.h:37:5: error: no previous prototype for 'g2d_open' drivers/gpu/drm/exynos/exynos_drm_g2d.h:42:5: error: no previous prototype for 'g2d_close' Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20230515083943.43933-1-inki.dae@samsung.com commit f4a8871f9f347b185c44525c9bb1755951f94841 Merge: 2d1bcbc6cd703 c7394fa9aa4cc Author: Linus Torvalds Date: Thu May 18 17:06:04 2023 -0700 Merge tag 'mm-hotfixes-stable-2023-05-18-15-52' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "Eight hotfixes. Four are cc:stable, the other four are for post-6.4 issues, or aren't considered suitable for backporting" * tag 'mm-hotfixes-stable-2023-05-18-15-52' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: MAINTAINERS: Cleanup Arm Display IP maintainers MAINTAINERS: repair pattern in DIALOG SEMICONDUCTOR DRIVERS nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode() mm: fix zswap writeback race condition mm: kfence: fix false positives on big endian zsmalloc: move LRU update from zs_map_object() to zs_malloc() mm: shrinkers: fix race condition on debugfs cleanup maple_tree: make maple state reusable after mas_empty_area() commit e764f12208b99ac7892c4e3f6bf88d71ca71036f Author: Dave Jiang Date: Thu May 18 16:38:20 2023 -0700 cxl: Move cxl_await_media_ready() to before capacity info retrieval Move cxl_await_media_ready() to cxl_pci probe before driver starts issuing IDENTIFY and retrieving memory device information to ensure that the device is ready to provide the information. Allow cxl_pci_probe() to succeed even if media is not ready. Cache the media failure in cxlds and don't ask the device for any media information. The rationale for proceeding in the !media_ready case is to allow for mailbox operations to interrogate and/or remediate the device. After media is repaired then rebinding the cxl_pci driver is expected to restart the capacity scan. Suggested-by: Dan Williams Fixes: b39cb1052a5c ("cxl/mem: Register CXL memX devices") Reviewed-by: Ira Weiny Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/168445310026.3251520.8124296540679268206.stgit@djiang5-mobl3 [djbw: fixup cxl_test] Signed-off-by: Dan Williams commit ce17ad0d54985e2595a3e615fda31df61808a08c Author: Dave Jiang Date: Thu May 18 14:54:34 2023 -0700 cxl: Wait Memory_Info_Valid before access memory related info The Memory_Info_Valid bit (CXL 3.0 8.1.3.8.2) indicates that the CXL Range Size High and Size Low registers are valid. The bit must be set within 1 second of reset deassertion to the device. Check valid bit before we check the Memory_Active bit when waiting for cxl_await_media_ready() to ensure that the memory info is valid for consumption. Also ensures both DVSEC ranges 1 and 2 are ready if DVSEC Capability indicates they are both supported. Fixes: 523e594d9cc0 ("cxl/pci: Implement wait for media active") Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/168444687469.3134781.11033518965387297327.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit eb0764b822b9b26880b28ccb9100b2983e01bc17 Author: Dan Williams Date: Wed May 17 20:19:43 2023 -0700 cxl/port: Enable the HDM decoder capability for switch ports Derick noticed, when testing hot plug, that hot-add behaves nominally after a removal. However, if the hot-add is done without a prior removal, CXL.mem accesses fail. It turns out that the original implementation of the port driver and region programming wrongly assumed that platform-firmware always enables the host-bridge HDM decoder capability. Add support turning on switch-level HDM decoders in the case where platform-firmware has not. The implementation is careful to only arrange for the enable to be undone if the current instance of the driver was the one that did the enable. This is to interoperate with platform-firmware that may expect CXL.mem to remain active after the driver is shutdown. This comes at the cost of potentially not shutting down the enable on kexec flows, but it is mitigated by the fact that the related HDM decoders still need to be enabled on an individual basis. Cc: Reported-by: Derick Marks Fixes: 54cdbf845cf7 ("cxl/port: Add a driver for 'struct cxl_port' objects") Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/168437998331.403037.15719879757678389217.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit e123036be377ddf628226a7c6d4f9af5efd113d3 Author: Ranjani Sridharan Date: Wed May 17 13:57:31 2023 -0500 ASoC: soc-pcm: test if a BE can be prepared In the BE hw_params configuration, the existing code checks if any of the existing FEs are prepared, running, paused or suspended - and skips the configuration in those cases. This allows multiple calls of hw_params which the ALSA state machine supports. This check is not handled for the prepare stage, which can lead to the same BE being prepared multiple times. This patch adds a check similar to that of the hw_params, with the main difference being that the suspended state is allowed: the ALSA state machine allows a transition from suspended to prepared with hw_params skipped. This problem was detected on Intel IPC4/SoundWire devices, where the BE dailink .prepare stage is used to configure the SoundWire stream with a bank switch. Multiple .prepare calls lead to conflicts with the .trigger operation with IPC4 configurations. This problem was not detected earlier on Intel devices, HDaudio BE dailinks detect that the link is already prepared and skip the configuration, and for IPC3 devices there is no BE trigger. Link: https://github.com/thesofproject/sof/issues/7596 Signed-off-by: Ranjani Sridharan Date: Thu May 18 09:04:45 2023 -0700 Merge tag 'probes-fixes-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull probes fixes from Masami Hiramatsu: - Initialize 'ret' local variables on fprobe_handler() to fix the smatch warning. With this, fprobe function exit handler is not working randomly. - Fix to use preempt_enable/disable_notrace for rethook handler to prevent recursive call of fprobe exit handler (which is based on rethook) - Fix recursive call issue on fprobe_kprobe_handler() - Fix to detect recursive call on fprobe_exit_handler() - Fix to make all arch-dependent rethook code notrace (the arch-independent code is already notrace)" * tag 'probes-fixes-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: rethook, fprobe: do not trace rethook related functions fprobe: add recursion detection in fprobe_exit_handler fprobe: make fprobe_kprobe_handler recursion free rethook: use preempt_{disable, enable}_notrace in rethook_trampoline_handler tracing: fprobe: Initialize ret valiable to fix smatch error commit 1f594fe7c90746982569bd4f3489e809104a9176 Merge: b802651bb6c90 6e42fae0a1551 Author: Linus Torvalds Date: Thu May 18 08:52:14 2023 -0700 Merge tag 'net-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from can, xfrm, bluetooth and netfilter. Current release - regressions: - ipv6: fix RCU splat in ipv6_route_seq_show() - wifi: iwlwifi: disable RFI feature Previous releases - regressions: - tcp: fix possible sk_priority leak in tcp_v4_send_reset() - tipc: do not update mtu if msg_max is too small in mtu negotiation - netfilter: fix null deref on element insertion - devlink: change per-devlink netdev notifier to static one - phylink: fix ksettings_set() ethtool call - wifi: mac80211: fortify the spinlock against deadlock by interrupt - wifi: brcmfmac: check for probe() id argument being NULL - eth: ice: - fix undersized tx_flags variable - fix ice VF reset during iavf initialization - eth: hns3: fix sending pfc frames after reset issue Previous releases - always broken: - xfrm: release all offloaded policy memory - nsh: use correct mac_offset to unwind gso skb in nsh_gso_segment() - vsock: avoid to close connected socket after the timeout - dsa: rzn1-a5psw: enable management frames for CPU port - eth: virtio_net: fix error unwinding of XDP initialization - eth: tun: fix memory leak for detached NAPI queue. Misc: - MAINTAINERS: sctp: move Neil to CREDITS" * tag 'net-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (107 commits) MAINTAINERS: skip CCing netdev for Bluetooth patches mdio_bus: unhide mdio_bus_init prototype bridge: always declare tunnel functions atm: hide unused procfs functions net: isa: include net/Space.h Revert "ARM: dts: stm32: add CAN support on stm32f746" netfilter: nft_set_rbtree: fix null deref on element insertion netfilter: nf_tables: fix nft_trans type confusion netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT net: wwan: t7xx: Ensure init is completed before system sleep net: selftests: Fix optstring net: pcs: xpcs: fix C73 AN not getting enabled net: wwan: iosm: fix NULL pointer dereference when removing device vlan: fix a potential uninit-value in vlan_dev_hard_start_xmit() mailmap: add entries for Nikolay Aleksandrov igb: fix bit_shift to be in [1..8] range net: dsa: mv88e6xxx: Fix mv88e6393x EPC write command offset cassini: Fix a memory leak in the error handling path of cas_init_one() tun: Fix memory leak for detached NAPI queue. can: kvaser_pciefd: Disable interrupts in probe error path ... commit b802651bb6c90e53b30205b2a4358433e3be57c8 Merge: 4d6d4c7f541d7 280a8ab81733d Author: Linus Torvalds Date: Thu May 18 08:42:23 2023 -0700 Merge tag 'media/v6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Several fixes for the dvb core and drivers: - fix UAF and null pointer de-reference in DVB core - fix kernel runtime warning for blocking operation in wait_event*() in dvb core - fix write size bug in DVB conditional access core - fix dvb demux continuity counter debug check logic - randconfig build fixes in pvrusb2 and mn88443x - fix memory leak in ttusb-dec - fix netup_unidvb probe-time error check logic - improve error handling in dw2102 if it can't retrieve DVB MAC address" * tag 'media/v6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: dvb-core: Fix use-after-free due to race condition at dvb_ca_en50221 media: dvb-core: Fix kernel WARNING for blocking operation in wait_event*() media: dvb-core: Fix use-after-free due to race at dvb_register_device() media: dvb-core: Fix use-after-free due on race condition at dvb_net media: dvb-core: Fix use-after-free on race condition at dvb_frontend media: mn88443x: fix !CONFIG_OF error by drop of_match_ptr from ID table media: ttusb-dec: fix memory leak in ttusb_dec_exit_dvb() media: dvb_ca_en50221: fix a size write bug media: netup_unidvb: fix irq init by register it at the end of probe media: dvb-usb: dw2102: fix uninit-value in su3000_read_mac_address media: dvb-usb: digitv: fix null-ptr-deref in digitv_i2c_xfer() media: dvb-usb-v2: rtl28xxu: fix null-ptr-deref in rtl28xxu_i2c_xfer media: dvb-usb-v2: ce6230: fix null-ptr-deref in ce6230_i2c_master_xfer() media: dvb-usb-v2: ec168: fix null-ptr-deref in ec168_i2c_xfer() media: dvb-usb: az6027: fix three null-ptr-deref in az6027_i2c_xfer() media: netup_unidvb: fix use-after-free at del_timer() media: dvb_demux: fix a bug for the continuity counter media: pvrusb2: fix DVB_CORE dependency commit ac5902f84bb546c64aea02c439c2579cbf40318f Author: Ming Lei Date: Wed May 17 21:34:08 2023 +0800 ublk: fix AB-BA lockdep warning When handling UBLK_IO_FETCH_REQ, ctx->uring_lock is grabbed first, then ub->mutex is acquired. When handling UBLK_CMD_STOP_DEV or UBLK_CMD_DEL_DEV, ub->mutex is grabbed first, then calling io_uring_cmd_done() for canceling uring command, in which ctx->uring_lock may be required. Real deadlock only happens when all the above commands are issued from same uring context, and in reality different uring contexts are often used for handing control command and IO command. Fix the issue by using io_uring_cmd_complete_in_task() to cancel command in ublk_cancel_dev(ublk_cancel_queue). Reported-by: Shinichiro Kawasaki Closes: https://lore.kernel.org/linux-block/becol2g7sawl4rsjq2dztsbc7mqypfqko6wzsyoyazqydoasml@rcxarzwidrhk Cc: Ziyang Zhang Signed-off-by: Ming Lei Tested-by: Shinichiro Kawasaki Link: https://lore.kernel.org/r/20230517133408.210944-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 6d600229df1ed06f46ba68ac706d9f44ba8c5fb4 Author: Mustapha Ghaddar Date: Fri Apr 28 12:13:21 2023 -0400 drm/amd/display: enable dpia validate Use dpia_validate_usb4_bw() function Fixes: a8b537605e22 ("drm/amd/display: Add function pointer for validate bw usb4") Reviewed-by: Roman Li Reviewed-by: Meenakshikumar Somasundaram Acked-by: Aurabindo Pillai Signed-off-by: Mustapha Ghaddar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bf4823267a817f7c155876a125b94336d7113e77 Author: Evan Quan Date: Thu May 11 15:41:27 2023 +0800 drm/amd/pm: fix possible power mode mismatch between driver and PMFW PMFW may boots the ASIC with a different power mode from the system's real one. Notify PMFW explicitly the power mode the system in. This is needed only when ACDC switch via gpio is not supported. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit c1a322a7a4a96cd0a3dde32ce37af437a78bf8cd Author: Guchun Chen Date: Tue May 9 16:15:27 2023 +0800 drm/amdgpu: skip disabling fence driver src_irqs when device is unplugged When performing device unbind or halt, we have disabled all irqs at the very begining like amdgpu_pci_remove or amdgpu_device_halt. So amdgpu_irq_put for irqs stored in fence driver should not be called any more, otherwise, below calltrace will arrive. [ 139.114088] WARNING: CPU: 2 PID: 1550 at drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:616 amdgpu_irq_put+0xf6/0x110 [amdgpu] [ 139.114655] Call Trace: [ 139.114655] [ 139.114657] amdgpu_fence_driver_hw_fini+0x93/0x130 [amdgpu] [ 139.114836] amdgpu_device_fini_hw+0xb6/0x350 [amdgpu] [ 139.114955] amdgpu_driver_unload_kms+0x51/0x70 [amdgpu] [ 139.115075] amdgpu_pci_remove+0x63/0x160 [amdgpu] [ 139.115193] ? __pm_runtime_resume+0x64/0x90 [ 139.115195] pci_device_remove+0x3a/0xb0 [ 139.115197] device_remove+0x43/0x70 [ 139.115198] device_release_driver_internal+0xbd/0x140 Signed-off-by: Guchun Chen Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 68518294d00da6a2433357af75a63abc6030676e Author: Alex Deucher Date: Thu May 11 10:40:03 2023 -0400 drm/amdgpu/gmc11: implement get_vbios_fb_size() Implement get_vbios_fb_size() so we can properly reserve the vbios splash screen to avoid potential artifacts on the screen during the transition from the pre-OS console to the OS console. Acked-by: Sunil Khatri Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.1.x commit 9d2d1827af295fd6971786672c41c4dba3657154 Author: Jesse Zhang Date: Fri May 12 09:29:17 2023 +0800 drm/amdgpu: Differentiate between Raven2 and Raven/Picasso according to revision id Due to the raven2 and raven/picasso maybe have the same GC_HWIP version. So differentiate them by revision id. Signed-off-by: shanshengwang Signed-off-by: Jesse Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 11fbdda2ab6bf049e2869139c07016022b4e045b Author: Guilherme G. Piccoli Date: Tue May 9 18:49:47 2023 +0200 drm/amdgpu/gfx11: Adjust gfxoff before powergating on gfx11 as well (Bas: speculative change to mirror gfx10/gfx9) Signed-off-by: Guilherme G. Piccoli Signed-off-by: Bas Nieuwenhuizen Cc: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.1.x commit 8173cab3368a13cdc3cad0bd5cf14e9399b0f501 Author: Bas Nieuwenhuizen Date: Tue May 9 18:49:46 2023 +0200 drm/amdgpu/gfx10: Disable gfxoff before disabling powergating. Otherwise we get a full system lock (looks like a FW mess). Copied the order from the GFX9 powergating code. Fixes: 366468ff6c34 ("drm/amdgpu: Allow GfxOff on Vangogh as default") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2545 Signed-off-by: Bas Nieuwenhuizen Tested-by: Guilherme G. Piccoli Cc: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit a511637502b1caa135046d0f8fdabd55a31af8ef Author: Sen Chu Date: Thu May 18 12:06:46 2023 +0800 regulator: mt6359: add read check for PMIC MT6359 Add hardware version read check for PMIC MT6359 Signed-off-by: Sen Chu Date: Thu May 18 09:47:23 2023 +0800 ceph: force updating the msg pointer in non-split case When the MClientSnap reqeust's op is not CEPH_SNAP_OP_SPLIT the request may still contain a list of 'split_realms', and we need to skip it anyway. Or it will be parsed as a corrupt snaptrace. Cc: stable@vger.kernel.org Link: https://tracker.ceph.com/issues/61200 Reported-by: Frank Schilder Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 9aaa7eb018661b2da221362d9bacb096bd596f52 Author: Xiubo Li Date: Mon May 8 14:45:01 2023 +0800 ceph: silence smatch warning in reconnect_caps_cb() Smatch static checker warning: fs/ceph/mds_client.c:3968 reconnect_caps_cb() warn: missing error code here? '__get_cap_for_mds()' failed. 'err' = '0' [ idryomov: Dan says that Smatch considers it intentional only if the "ret = 0;" assignment is within 4 or 5 lines of the goto. ] Reported-by: Dan Carpenter Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 6e42fae0a15519393d3cc5500dc8d84b8549a337 Merge: 30a0f49d5428a 36a6418bb1259 Author: Paolo Abeni Date: Thu May 18 11:06:28 2023 +0200 Merge tag 'linux-can-fixes-for-6.4-20230518' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2023-05-18 this is a pull request of 7 patches for net/master. The first 6 patches are by Jimmy Assarsson and fix several bugs in the kvaser_pciefd driver. The latest patch is from me and reverts a change in stm32f746.dtsi that causes build errors due to a missing dependent patch. * tag 'linux-can-fixes-for-6.4-20230518' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: Revert "ARM: dts: stm32: add CAN support on stm32f746" can: kvaser_pciefd: Disable interrupts in probe error path can: kvaser_pciefd: Do not send EFLUSH command on TFD interrupt can: kvaser_pciefd: Empty SRB buffer in probe can: kvaser_pciefd: Call request_irq() before enabling interrupts can: kvaser_pciefd: Clear listen-only bit if not explicitly requested can: kvaser_pciefd: Set CAN_STATE_STOPPED in kvaser_pciefd_stop() ==================== Link: https://lore.kernel.org/r/20230518073241.1110453-1-mkl@pengutronix.de Signed-off-by: Paolo Abeni commit 8c1688e897a6a74d1463327f313e4b0cd66b031f Merge: 280a8ab81733d f1fcbaa18b28d Author: Mauro Carvalho Chehab Date: Thu May 18 09:29:18 2023 +0100 Merge tag 'v6.4-rc2' into v4l_for_linus Linux 6.4-rc2 * tag 'v6.4-rc2': (162 commits) Linux 6.4-rc2 parisc: Fix encoding of swp_entry due to added SWP_EXCLUSIVE flag ext4: bail out of ext4_xattr_ibody_get() fails for any reason ext4: add bounds checking in get_max_inline_xattr_value_size() ext4: add indication of ro vs r/w mounts in the mount message ext4: fix deadlock when converting an inline directory in nojournal mode ext4: improve error recovery code paths in __ext4_remount() ext4: improve error handling from ext4_dirhash() ext4: don't clear SB_RDONLY when remounting r/w until quota is re-enabled ext4: check iomap type only if ext4_iomap_begin() does not fail ext4: avoid a potential slab-out-of-bounds in ext4_group_desc_csum ext4: fix data races when using cached status extents ext4: avoid deadlock in fs reclaim with page writeback ext4: fix invalid free tracking in ext4_xattr_move_to_block() ext4: remove a BUG_ON in ext4_mb_release_group_pa() ext4: allow ext4_get_group_info() to fail cxl: Add missing return to cdat read error path tools/testing/cxl: Use DEFINE_STATIC_SRCU() x86/retbleed: Fix return thunk alignment Documentation/block: drop the request.rst file ... commit 30a0f49d5428a0e06a63c157befb6b3ab21f366b Merge: c259ad11698b8 61ae320a29b05 Author: Jakub Kicinski Date: Wed May 17 21:43:20 2023 -0700 Merge tag 'nf-23-05-17' of https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Florian Westphal says: ==================== Netfilter fixes for net 1. Silence warning about unused variable when CONFIG_NF_NAT=n, from Tom Rix. 2. nftables: Fix possible out-of-bounds access, from myself. 3. nftables: fix null deref+UAF during element insertion into rbtree, also from myself. * tag 'nf-23-05-17' of https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nft_set_rbtree: fix null deref on element insertion netfilter: nf_tables: fix nft_trans type confusion netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT ==================== Link: https://lore.kernel.org/r/20230517123756.7353-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit c259ad11698b8a573183aee8932d1885f4441c3a Merge: bfa00d8f98f7c 212457ccbd60d Author: Jakub Kicinski Date: Wed May 17 21:36:21 2023 -0700 Merge tag 'wireless-2023-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.4 A lot of fixes this time, for both the stack and the drivers. The brcmfmac resume fix has been reported by several people so I would say it's the most important here. The iwlwifi RFI workaround is also something which was reported as a regression recently. * tag 'wireless-2023-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: (31 commits) wifi: b43: fix incorrect __packed annotation wifi: rtw88: sdio: Always use two consecutive bytes for word operations mac80211_hwsim: fix memory leak in hwsim_new_radio_nl wifi: iwlwifi: mvm: Add locking to the rate read flow wifi: iwlwifi: Don't use valid_links to iterate sta links wifi: iwlwifi: mvm: don't trust firmware n_channels wifi: iwlwifi: mvm: fix OEM's name in the tas approved list wifi: iwlwifi: fix OEM's name in the ppag approved list wifi: iwlwifi: mvm: fix initialization of a return value wifi: iwlwifi: mvm: fix access to fw_id_to_mac_id wifi: iwlwifi: fw: fix DBGI dump wifi: iwlwifi: mvm: fix number of concurrent link checks wifi: iwlwifi: mvm: fix cancel_delayed_work_sync() deadlock wifi: iwlwifi: mvm: don't double-init spinlock wifi: iwlwifi: mvm: always free dup_data wifi: mac80211: recalc chanctx mindef before assigning wifi: mac80211: consider reserved chanctx for mindef wifi: mac80211: simplify chanctx allocation wifi: mac80211: Abort running color change when stopping the AP wifi: mac80211: fix min center freq offset tracing ... ==================== Link: https://lore.kernel.org/r/20230517151914.B0AF6C433EF@smtp.kernel.org Signed-off-by: Jakub Kicinski commit bfa00d8f98f7c5e582b04f874aecb83af8da84c6 Author: Jakub Kicinski Date: Tue May 16 18:42:53 2023 -0700 MAINTAINERS: skip CCing netdev for Bluetooth patches As requested by Marcel skip netdev for Bluetooth patches. Bluetooth has its own mailing list and overloading netdev leads to fewer people reading it. Link: https://lore.kernel.org/netdev/639C8EA4-1F6E-42BE-8F04-E4A753A6EFFC@holtmann.org/ Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230517014253.1233333-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 2e9f8ab68f42b059e80db71266c1675c07c664bd Author: Arnd Bergmann Date: Tue May 16 21:45:36 2023 +0200 mdio_bus: unhide mdio_bus_init prototype mdio_bus_init() is either used as a local module_init() entry, or it gets called in phy_device.c. In the former case, there is no declaration, which causes a warning: drivers/net/phy/mdio_bus.c:1371:12: error: no previous prototype for 'mdio_bus_init' [-Werror=missing-prototypes] Remove the #ifdef around the declaration to avoid the warning.. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230516194625.549249-4-arnd@kernel.org Signed-off-by: Jakub Kicinski commit 89dcd87ce534a3a7f267cfd58505803006f51301 Author: Arnd Bergmann Date: Tue May 16 21:45:35 2023 +0200 bridge: always declare tunnel functions When CONFIG_BRIDGE_VLAN_FILTERING is disabled, two functions are still defined but have no prototype or caller. This causes a W=1 warning for the missing prototypes: net/bridge/br_netlink_tunnel.c:29:6: error: no previous prototype for 'vlan_tunid_inrange' [-Werror=missing-prototypes] net/bridge/br_netlink_tunnel.c:199:5: error: no previous prototype for 'br_vlan_tunnel_info' [-Werror=missing-prototypes] The functions are already contitional on CONFIG_BRIDGE_VLAN_FILTERING, and I coulnd't easily figure out the right set of #ifdefs, so just move the declarations out of the #ifdef to avoid the warning, at a small cost in code size over a more elaborate fix. Fixes: 188c67dd1906 ("net: bridge: vlan options: add support for tunnel id dumping") Fixes: 569da0822808 ("net: bridge: vlan options: add support for tunnel mapping set/del") Signed-off-by: Arnd Bergmann Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20230516194625.549249-3-arnd@kernel.org Signed-off-by: Jakub Kicinski commit fb1b7be9b16c1f4626969ba4e95a97da2a452b41 Author: Arnd Bergmann Date: Tue May 16 21:45:34 2023 +0200 atm: hide unused procfs functions When CONFIG_PROC_FS is disabled, the function declarations for some procfs functions are hidden, but the definitions are still build, as shown by this compiler warning: net/atm/resources.c:403:7: error: no previous prototype for 'atm_dev_seq_start' [-Werror=missing-prototypes] net/atm/resources.c:409:6: error: no previous prototype for 'atm_dev_seq_stop' [-Werror=missing-prototypes] net/atm/resources.c:414:7: error: no previous prototype for 'atm_dev_seq_next' [-Werror=missing-prototypes] Add another #ifdef to leave these out of the build. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230516194625.549249-2-arnd@kernel.org Signed-off-by: Jakub Kicinski commit 067dee65751bcd14fcaaee769cee84c65ce99360 Author: Arnd Bergmann Date: Tue May 16 21:45:33 2023 +0200 net: isa: include net/Space.h The legacy drivers that still get called from net/Space.c have prototypes in net/Space, but this header is not included in most of the files that define those functions: drivers/net/ethernet/cirrus/cs89x0.c:1649:28: error: no previous prototype for 'cs89x0_probe' [-Werror=missing-prototypes] drivers/net/ethernet/8390/ne.c:947:28: error: no previous prototype for 'ne_probe' [-Werror=missing-prototypes] drivers/net/ethernet/8390/smc-ultra.c:167:28: error: no previous prototype for 'ultra_probe' [-Werror=missing-prototypes] drivers/net/ethernet/amd/lance.c:438:28: error: no previous prototype for 'lance_probe' [-Werror=missing-prototypes] drivers/net/ethernet/3com/3c515.c:422:20: error: no previous prototype for 'tc515_probe' [-Werror=missing-prototypes] Add the inclusion to avoids the warnings. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230516194625.549249-1-arnd@kernel.org Signed-off-by: Jakub Kicinski commit a14da6144d16ef27e3022835fa282a3740b8ad7b Author: Konrad Dybcio Date: Wed May 17 19:06:13 2023 +0200 arm64: dts: qcom: sm6375-pdx225: Fix remoteproc firmware paths They were previously missing the SoC name. Fix it. Fixes: a2ad207c412b ("arm64: dts: qcom: sm6375-pdx225: Enable ADSP & CDSP") Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230517-topic-murray-fwname-v1-1-923e87312249@linaro.org commit 925a80af6106a55fa6bcfedc5bd2f02b0b835495 Author: Krzysztof Kozlowski Date: Sun Apr 16 12:11:34 2023 +0200 ARM: dts: qcom: add missing cache properties Add required cache-unified properties to fix warnings like: qcom-ipq4019-ap.dk01.1-c1.dtb: l2-cache: 'cache-unified' is a required property Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230416101134.95686-4-krzysztof.kozlowski@linaro.org commit 9c6e72fb2058dc06da9d278c4bff94430677d48a Author: Krzysztof Kozlowski Date: Sun Apr 16 12:11:33 2023 +0200 arm64: dts: qcom: add missing cache properties Add required cache-level and cache-unified properties to fix warnings like: qdu1000-idp.dtb: l3-cache: 'cache-unified' is a required property qdu1000-idp.dtb: l2-cache: 'cache-level' is a required property Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230416101134.95686-3-krzysztof.kozlowski@linaro.org commit 084657090aacd8a9269931a2879420bf614511fb Author: Krzysztof Kozlowski Date: Sun Apr 16 12:11:32 2023 +0200 arm64: dts: qcom: use decimal for cache level Cache level is by convention a decimal number, not hex. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230416101134.95686-2-krzysztof.kozlowski@linaro.org commit f34fbb71ce9eb0936c0b56fe8b3866d76618c433 Author: Krzysztof Kozlowski Date: Sun Apr 16 12:11:31 2023 +0200 arm64: dts: qcom: fix indentation Correct indentation to use only tabs. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230416101134.95686-1-krzysztof.kozlowski@linaro.org commit 033553c04b02b450261f60d5f1b0e5948cd197bb Author: Krzysztof Kozlowski Date: Mon Apr 10 20:10:05 2023 +0200 ARM: dts: qcom: msm8974: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230410181005.25853-3-krzysztof.kozlowski@linaro.org commit da50416fb1fa7502a52ad38c0e9ff196d9f56ac9 Author: Krzysztof Kozlowski Date: Mon Apr 10 20:10:04 2023 +0200 ARM: dts: qcom: mdm9615: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230410181005.25853-2-krzysztof.kozlowski@linaro.org commit 18f341061262a7a63bc8b5c9ef94a342ac2673a2 Author: Krzysztof Kozlowski Date: Mon Apr 10 20:10:03 2023 +0200 ARM: dts: qcom: apq8026: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230410181005.25853-1-krzysztof.kozlowski@linaro.org commit fae7d907a75eaad4bfb17e7990e357938c5b1351 Author: Krzysztof Kozlowski Date: Sat Apr 8 15:08:09 2023 +0200 arm64: dts: qcom: sm8250-xiaomi-elish-csot: fix panel compatible The bindings expect "novatek,nt36523" fallback in the panel compatible: sm8250-xiaomi-elish-csot.dtb: panel@0: compatible: ['xiaomi,elish-csot-nt36523'] is too short Fixes: 8a786036c7b6 ("arm64: dts: qcom: sm8250-xiaomi-elish-csot: Add Xiaomi Mi Pad 5 Pro CSOT variant") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230408130809.52319-2-krzysztof.kozlowski@linaro.org commit 0c7433dd81b5e771ef222f340fef03501131761b Author: Krzysztof Kozlowski Date: Sat Apr 8 15:08:08 2023 +0200 arm64: dts: qcom: sm8250-xiaomi-elish-boe: fix panel compatible The bindings expect "novatek,nt36523" fallback in the panel compatible: sm8250-xiaomi-elish-boe.dtb: panel@0: compatible: ['xiaomi,elish-boe-nt36523'] is too shor Fixes: 51c4c2bd6f31 ("arm64: dts: qcom: sm8250-xiaomi-elish-boe: Add mdss and dsi panel") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230408130809.52319-1-krzysztof.kozlowski@linaro.org commit 16bd455d0897d1b8b7a9aee2ed51d75b14a34563 Author: Krzysztof Kozlowski Date: Mon Feb 20 10:54:01 2023 +0100 arm64: dts: qcom: sc7280-qcard: drop incorrect dai-cells from WCD938x SDW The WCD938x audio codec Soundwire interface part is not a DAI and does not allow sound-dai-cells: sc7280-herobrine-crd.dtb: codec@0,4: '#sound-dai-cells' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230220095401.64196-2-krzysztof.kozlowski@linaro.org commit ca8fc6814844d8787e7fec61b2544a871ea8b675 Author: Krzysztof Kozlowski Date: Mon Feb 20 10:54:00 2023 +0100 arm64: dts: qcom: sc7280-idp: drop incorrect dai-cells from WCD938x SDW The WCD938x audio codec Soundwire interface part is not a DAI and does not allow sound-dai-cells: sc7280-idp.dtb: codec@0,4: '#sound-dai-cells' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230220095401.64196-1-krzysztof.kozlowski@linaro.org commit 3981514180c987a79ea98f0ae06a7cbf58a9ac0f Author: Jim Wylder Date: Wed May 17 10:20:11 2023 -0500 regmap: Account for register length when chunking Currently, when regmap_raw_write() splits the data, it uses the max_raw_write value defined for the bus. For any bus that includes the target register address in the max_raw_write value, the chunked transmission will always exceed the maximum transmission length. To avoid this problem, subtract the length of the register and the padding from the maximum transmission. Signed-off-by: Jim Wylder Date: Wed May 10 13:28:11 2023 +0100 MAINTAINERS: Cleanup Arm Display IP maintainers Some people have moved to different roles and are no longer involved in the upstream development. As there is only one person left, remove the mailing list as well as it serves no purpose. Link: https://lkml.kernel.org/r/20230510122811.1872358-1-liviu.dudau@arm.com Signed-off-by: Liviu Dudau Acked-by: Brian Starkey Cc: Mihail Atanassov Cc: Greg Kroah-Hartman Cc: Joe Perches # "Please use --order" Cc: Mihail Atanassov Cc: Uwe Kleine-König Signed-off-by: Andrew Morton commit 158fb07ba6e77a21f46c3e9c5be44ebd8c4dd2cc Author: Lukas Bulwahn Date: Tue May 9 09:48:34 2023 +0200 MAINTAINERS: repair pattern in DIALOG SEMICONDUCTOR DRIVERS Commit 361104b05684c ("dt-bindings: mfd: Convert da9063 to yaml") converts da9063.txt to dlg,da9063.yaml and adds a new file pattern in MAINTAINERS. Unfortunately, the file pattern matches da90*.yaml, but the yaml file is prefixed with dlg,da90. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken file pattern. Repair this file pattern in DIALOG SEMICONDUCTOR DRIVERS. Link: https://lkml.kernel.org/r/20230509074834.21521-1-lukas.bulwahn@gmail.com Fixes: 361104b05684c ("dt-bindings: mfd: Convert da9063 to yaml") Signed-off-by: Lukas Bulwahn Acked-by: Conor Dooley Cc: Lee Jones Signed-off-by: Andrew Morton commit 9b5a04ac3ad9898c4745cba46ea26de74ba56a8e Author: Ryusuke Konishi Date: Wed May 10 00:29:56 2023 +0900 nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode() During unmount process of nilfs2, nothing holds nilfs_root structure after nilfs2 detaches its writer in nilfs_detach_log_writer(). However, since nilfs_evict_inode() uses nilfs_root for some cleanup operations, it may cause use-after-free read if inodes are left in "garbage_list" and released by nilfs_dispose_list() at the end of nilfs_detach_log_writer(). Fix this issue by modifying nilfs_evict_inode() to only clear inode without additional metadata changes that use nilfs_root if the file system is degraded to read-only or the writer is detached. Link: https://lkml.kernel.org/r/20230509152956.8313-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Reported-by: syzbot+78d4495558999f55d1da@syzkaller.appspotmail.com Closes: https://lkml.kernel.org/r/00000000000099e5ac05fb1c3b85@google.com Tested-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton commit 04fc7816089c5a32c29a04ec94b998e219dfb946 Author: Domenico Cerasuolo Date: Wed May 3 17:12:00 2023 +0200 mm: fix zswap writeback race condition The zswap writeback mechanism can cause a race condition resulting in memory corruption, where a swapped out page gets swapped in with data that was written to a different page. The race unfolds like this: 1. a page with data A and swap offset X is stored in zswap 2. page A is removed off the LRU by zpool driver for writeback in zswap-shrink work, data for A is mapped by zpool driver 3. user space program faults and invalidates page entry A, offset X is considered free 4. kswapd stores page B at offset X in zswap (zswap could also be full, if so, page B would then be IOed to X, then skip step 5.) 5. entry A is replaced by B in tree->rbroot, this doesn't affect the local reference held by zswap-shrink work 6. zswap-shrink work writes back A at X, and frees zswap entry A 7. swapin of slot X brings A in memory instead of B The fix: Once the swap page cache has been allocated (case ZSWAP_SWAPCACHE_NEW), zswap-shrink work just checks that the local zswap_entry reference is still the same as the one in the tree. If it's not the same it means that it's either been invalidated or replaced, in both cases the writeback is aborted because the local entry contains stale data. Reproducer: I originally found this by running `stress` overnight to validate my work on the zswap writeback mechanism, it manifested after hours on my test machine. The key to make it happen is having zswap writebacks, so whatever setup pumps /sys/kernel/debug/zswap/written_back_pages should do the trick. In order to reproduce this faster on a vm, I setup a system with ~100M of available memory and a 500M swap file, then running `stress --vm 1 --vm-bytes 300000000 --vm-stride 4000` makes it happen in matter of tens of minutes. One can speed things up even more by swinging /sys/module/zswap/parameters/max_pool_percent up and down between, say, 20 and 1; this makes it reproduce in tens of seconds. It's crucial to set `--vm-stride` to something other than 4096 otherwise `stress` won't realize that memory has been corrupted because all pages would have the same data. Link: https://lkml.kernel.org/r/20230503151200.19707-1-cerasuolodomenico@gmail.com Signed-off-by: Domenico Cerasuolo Acked-by: Johannes Weiner Reviewed-by: Chris Li (Google) Cc: Dan Streetman Cc: Johannes Weiner Cc: Minchan Kim Cc: Nitin Gupta Cc: Seth Jennings Cc: Vitaly Wool Cc: Signed-off-by: Andrew Morton commit 7581495ac82d6cb073609284c7f7186a48021d1e Author: Michael Ellerman Date: Fri May 5 13:51:27 2023 +1000 mm: kfence: fix false positives on big endian Since commit 1ba3cbf3ec3b ("mm: kfence: improve the performance of __kfence_alloc() and __kfence_free()"), kfence reports failures in random places at boot on big endian machines. The problem is that the new KFENCE_CANARY_PATTERN_U64 encodes the address of each byte in its value, so it needs to be byte swapped on big endian machines. The compiler is smart enough to do the le64_to_cpu() at compile time, so there is no runtime overhead. Link: https://lkml.kernel.org/r/20230505035127.195387-1-mpe@ellerman.id.au Fixes: 1ba3cbf3ec3b ("mm: kfence: improve the performance of __kfence_alloc() and __kfence_free()") Signed-off-by: Michael Ellerman Reviewed-by: Alexander Potapenko Reviewed-by: Marco Elver Cc: Peng Zhang Cc: David Laight Signed-off-by: Andrew Morton commit d461aac924b937bcb4fd0ca1242b3ef6868ecddd Author: Nhat Pham Date: Fri May 5 11:50:54 2023 -0700 zsmalloc: move LRU update from zs_map_object() to zs_malloc() Under memory pressure, we sometimes observe the following crash: [ 5694.832838] ------------[ cut here ]------------ [ 5694.842093] list_del corruption, ffff888014b6a448->next is LIST_POISON1 (dead000000000100) [ 5694.858677] WARNING: CPU: 33 PID: 418824 at lib/list_debug.c:47 __list_del_entry_valid+0x42/0x80 [ 5694.961820] CPU: 33 PID: 418824 Comm: fuse_counters.s Kdump: loaded Tainted: G S 5.19.0-0_fbk3_rc3_hoangnhatpzsdynshrv41_10870_g85a9558a25de #1 [ 5694.990194] Hardware name: Wiwynn Twin Lakes MP/Twin Lakes Passive MP, BIOS YMM16 05/24/2021 [ 5695.007072] RIP: 0010:__list_del_entry_valid+0x42/0x80 [ 5695.017351] Code: 08 48 83 c2 22 48 39 d0 74 24 48 8b 10 48 39 f2 75 2c 48 8b 51 08 b0 01 48 39 f2 75 34 c3 48 c7 c7 55 d7 78 82 e8 4e 45 3b 00 <0f> 0b eb 31 48 c7 c7 27 a8 70 82 e8 3e 45 3b 00 0f 0b eb 21 48 c7 [ 5695.054919] RSP: 0018:ffffc90027aef4f0 EFLAGS: 00010246 [ 5695.065366] RAX: 41fe484987275300 RBX: ffff888008988180 RCX: 0000000000000000 [ 5695.079636] RDX: ffff88886006c280 RSI: ffff888860060480 RDI: ffff888860060480 [ 5695.093904] RBP: 0000000000000002 R08: 0000000000000000 R09: ffffc90027aef370 [ 5695.108175] R10: 0000000000000000 R11: ffffffff82fdf1c0 R12: 0000000010000002 [ 5695.122447] R13: ffff888014b6a448 R14: ffff888014b6a420 R15: 00000000138dc240 [ 5695.136717] FS: 00007f23a7d3f740(0000) GS:ffff888860040000(0000) knlGS:0000000000000000 [ 5695.152899] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5695.164388] CR2: 0000560ceaab6ac0 CR3: 000000001c06c001 CR4: 00000000007706e0 [ 5695.178659] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 5695.192927] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 5695.207197] PKRU: 55555554 [ 5695.212602] Call Trace: [ 5695.217486] [ 5695.221674] zs_map_object+0x91/0x270 [ 5695.229000] zswap_frontswap_store+0x33d/0x870 [ 5695.237885] ? do_raw_spin_lock+0x5d/0xa0 [ 5695.245899] __frontswap_store+0x51/0xb0 [ 5695.253742] swap_writepage+0x3c/0x60 [ 5695.261063] shrink_page_list+0x738/0x1230 [ 5695.269255] shrink_lruvec+0x5ec/0xcd0 [ 5695.276749] ? shrink_slab+0x187/0x5f0 [ 5695.284240] ? mem_cgroup_iter+0x6e/0x120 [ 5695.292255] shrink_node+0x293/0x7b0 [ 5695.299402] do_try_to_free_pages+0xea/0x550 [ 5695.307940] try_to_free_pages+0x19a/0x490 [ 5695.316126] __folio_alloc+0x19ff/0x3e40 [ 5695.323971] ? __filemap_get_folio+0x8a/0x4e0 [ 5695.332681] ? walk_component+0x2a8/0xb50 [ 5695.340697] ? generic_permission+0xda/0x2a0 [ 5695.349231] ? __filemap_get_folio+0x8a/0x4e0 [ 5695.357940] ? walk_component+0x2a8/0xb50 [ 5695.365955] vma_alloc_folio+0x10e/0x570 [ 5695.373796] ? walk_component+0x52/0xb50 [ 5695.381634] wp_page_copy+0x38c/0xc10 [ 5695.388953] ? filename_lookup+0x378/0xbc0 [ 5695.397140] handle_mm_fault+0x87f/0x1800 [ 5695.405157] do_user_addr_fault+0x1bd/0x570 [ 5695.413520] exc_page_fault+0x5d/0x110 [ 5695.421017] asm_exc_page_fault+0x22/0x30 After some investigation, I have found the following issue: unlike other zswap backends, zsmalloc performs the LRU list update at the object mapping time, rather than when the slot for the object is allocated. This deviation was discussed and agreed upon during the review process of the zsmalloc writeback patch series: https://lore.kernel.org/lkml/Y3flcAXNxxrvy3ZH@cmpxchg.org/ Unfortunately, this introduces a subtle bug that occurs when there is a concurrent store and reclaim, which interleave as follows: zswap_frontswap_store() shrink_worker() zs_malloc() zs_zpool_shrink() spin_lock(&pool->lock) zs_reclaim_page() zspage = find_get_zspage() spin_unlock(&pool->lock) spin_lock(&pool->lock) zspage = list_first_entry(&pool->lru) list_del(&zspage->lru) zspage->lru.next = LIST_POISON1 zspage->lru.prev = LIST_POISON2 spin_unlock(&pool->lock) zs_map_object() spin_lock(&pool->lock) if (!list_empty(&zspage->lru)) list_del(&zspage->lru) CHECK_DATA_CORRUPTION(next == LIST_POISON1) /* BOOM */ With the current upstream code, this issue rarely happens. zswap only triggers writeback when the pool is already full, at which point all further store attempts are short-circuited. This creates an implicit pseudo-serialization between reclaim and store. I am working on a new zswap shrinking mechanism, which makes interleaving reclaim and store more likely, exposing this bug. zbud and z3fold do not have this problem, because they perform the LRU list update in the alloc function, while still holding the pool's lock. This patch fixes the aforementioned bug by moving the LRU update back to zs_malloc(), analogous to zbud and z3fold. Link: https://lkml.kernel.org/r/20230505185054.2417128-1-nphamcs@gmail.com Fixes: 64f768c6b32e ("zsmalloc: add a LRU to zs_pool to keep track of zspages in LRU order") Signed-off-by: Nhat Pham Suggested-by: Johannes Weiner Acked-by: Johannes Weiner Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Dan Streetman Cc: Nitin Gupta Cc: Seth Jennings Cc: Vitaly Wool Cc: Signed-off-by: Andrew Morton commit 26e239b37ebdfd189a2e6f94d3407e70313348bc Author: Joan Bruguera Micó Date: Wed May 3 01:32:32 2023 +0000 mm: shrinkers: fix race condition on debugfs cleanup When something registers and unregisters many shrinkers, such as: for x in $(seq 10000); do unshare -Ui true; done Sometimes the following error is printed to the kernel log: debugfs: Directory '...' with parent 'shrinker' already present! This occurs since commit badc28d4924b ("mm: shrinkers: fix deadlock in shrinker debugfs") / v6.2: Since the call to `debugfs_remove_recursive` was moved outside the `shrinker_rwsem`/`shrinker_mutex` lock, but the call to `ida_free` stayed inside, a newly registered shrinker can be re-assigned that ID and attempt to create the debugfs directory before the directory from the previous shrinker has been removed. The locking changes in commit f95bdb700bc6 ("mm: vmscan: make global slab shrink lockless") made the race condition more likely, though it existed before then. Commit badc28d4924b ("mm: shrinkers: fix deadlock in shrinker debugfs") could be reverted since the issue is addressed should no longer occur since the count and scan operations are lockless since commit 20cd1892fcc3 ("mm: shrinkers: make count and scan in shrinker debugfs lockless"). However, since this is a contended lock, prefer instead moving `ida_free` outside the lock to avoid the race. Link: https://lkml.kernel.org/r/20230503013232.299211-1-joanbrugueram@gmail.com Fixes: badc28d4924b ("mm: shrinkers: fix deadlock in shrinker debugfs") Signed-off-by: Joan Bruguera Micó Cc: Qi Zheng Cc: Roman Gushchin Signed-off-by: Andrew Morton commit 0257d9908d38c0b1669af4bb1bc4dbca1f273fe6 Author: Peng Zhang Date: Fri May 5 22:58:29 2023 +0800 maple_tree: make maple state reusable after mas_empty_area() Make mas->min and mas->max point to a node range instead of a leaf entry range. This allows mas to still be usable after mas_empty_area() returns. Users would get unexpected results from other operations on the maple state after calling the affected function. For example, x86 MAP_32BIT mmap() acts as if there is no suitable gap when there should be one. Link: https://lkml.kernel.org/r/20230505145829.74574-1-zhangpeng.00@bytedance.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Peng Zhang Reported-by: "Edgecombe, Rick P" Reported-by: Tad Reported-by: Michael Keyes Link: https://lore.kernel.org/linux-mm/32f156ba80010fd97dbaf0a0cdfc84366608624d.camel@intel.com/ Link: https://lore.kernel.org/linux-mm/e6108286ac025c268964a7ead3aab9899f9bc6e9.camel@spotco.us/ Reviewed-by: Liam R. Howlett Tested-by: Rick Edgecombe Cc: Signed-off-by: Andrew Morton commit 571a2a50a8fc546145ffd3bf673547e9fe128ed2 Author: Ze Gao Date: Wed May 17 11:45:09 2023 +0800 rethook, fprobe: do not trace rethook related functions These functions are already marked as NOKPROBE to prevent recursion and we have the same reason to blacklist them if rethook is used with fprobe, since they are beyond the recursion-free region ftrace can guard. Link: https://lore.kernel.org/all/20230517034510.15639-5-zegao@tencent.com/ Fixes: f3a112c0c40d ("x86,rethook,kprobes: Replace kretprobe with rethook on x86") Signed-off-by: Ze Gao Reviewed-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) commit 2752741080f84f9b2fc93fa92735315d10a415bf Author: Ze Gao Date: Wed May 17 11:45:08 2023 +0800 fprobe: add recursion detection in fprobe_exit_handler fprobe_hander and fprobe_kprobe_handler has guarded ftrace recursion detection but fprobe_exit_handler has not, which possibly introduce recursive calls if the fprobe exit callback calls any traceable functions. Checking in fprobe_hander or fprobe_kprobe_handler is not enough and misses this case. So add recursion free guard the same way as fprobe_hander. Since ftrace recursion check does not employ ip(s), so here use entry_ip and entry_parent_ip the same as fprobe_handler. Link: https://lore.kernel.org/all/20230517034510.15639-4-zegao@tencent.com/ Fixes: 5b0ab78998e3 ("fprobe: Add exit_handler support") Signed-off-by: Ze Gao Cc: stable@vger.kernel.org Acked-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) commit 3cc4e2c5fbae84e5033723fb7e350bc6c164e3a2 Author: Ze Gao Date: Wed May 17 11:45:07 2023 +0800 fprobe: make fprobe_kprobe_handler recursion free Current implementation calls kprobe related functions before doing ftrace recursion check in fprobe_kprobe_handler, which opens door to kernel crash due to stack recursion if preempt_count_{add, sub} is traceable in kprobe_busy_{begin, end}. Things goes like this without this patch quoted from Steven: " fprobe_kprobe_handler() { kprobe_busy_begin() { preempt_disable() { preempt_count_add() { <-- trace fprobe_kprobe_handler() { [ wash, rinse, repeat, CRASH!!! ] " By refactoring the common part out of fprobe_kprobe_handler and fprobe_handler and call ftrace recursion detection at the very beginning, the whole fprobe_kprobe_handler is free from recursion. [ Fix the indentation of __fprobe_handler() parameters. ] Link: https://lore.kernel.org/all/20230517034510.15639-3-zegao@tencent.com/ Fixes: ab51e15d535e ("fprobe: Introduce FPROBE_FL_KPROBE_SHARED flag for fprobe") Signed-off-by: Ze Gao Acked-by: Masami Hiramatsu (Google) Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) commit be243bacfb25f5219f2396d787408e8cf1301dd1 Author: Ze Gao Date: Wed May 17 11:45:06 2023 +0800 rethook: use preempt_{disable, enable}_notrace in rethook_trampoline_handler This patch replaces preempt_{disable, enable} with its corresponding notrace version in rethook_trampoline_handler so no worries about stack recursion or overflow introduced by preempt_count_{add, sub} under fprobe + rethook context. Link: https://lore.kernel.org/all/20230517034510.15639-2-zegao@tencent.com/ Fixes: 54ecbe6f1ed5 ("rethook: Add a generic return hook") Signed-off-by: Ze Gao Acked-by: Masami Hiramatsu (Google) Cc: Signed-off-by: Masami Hiramatsu (Google) commit 56518a603fd2bf74762d176ac980572db84a3e14 Author: Yangyang Li Date: Fri May 12 17:22:45 2023 +0800 RDMA/hns: Modify the value of long message loopback slice Long message loopback slice is used for achieving traffic balance between QPs. It prevents the problem that QPs with large traffic occupying the hardware pipeline for a long time and QPs with small traffic cannot be scheduled. Currently, its maximum value is set to 16K, which means only after a QP sends 16K will the second QP be scheduled. This value is too large, which will lead to unbalanced traffic scheduling, and thus it needs to be modified. The setting range of the long message loopback slice is modified to be from 1024 (the lower limit supported by hardware) to mtu. Actual testing shows that this value can significantly reduce error in hardware traffic scheduling. This solution is compatible with both HIP08 and HIP09. The modified lp_pktn_ini has a maximum value of 2 (when mtu is 256), so the range checking code for lp_pktn_ini is no longer necessary and needs to be deleted. Fixes: 0e60778efb07 ("RDMA/hns: Modify the value of MAX_LP_MSG_LEN to meet hardware compatibility") Link: https://lore.kernel.org/r/20230512092245.344442-4-huangjunxian6@hisilicon.com Signed-off-by: Yangyang Li Signed-off-by: Junxian Huang Signed-off-by: Jason Gunthorpe commit 7f3969b14f356dd65fa95b3528eb05c32e68bc06 Author: Chengchang Tang Date: Fri May 12 17:22:44 2023 +0800 RDMA/hns: Fix base address table allocation For hns, the specification of an entry like resource (E.g. WQE/CQE/EQE) depends on BT page size, buf page size and hopnum. For user mode, the buf page size depends on UMEM. Therefore, the actual specification is controlled by BT page size and hopnum. The current BT page size and hopnum are obtained from firmware. This makes the driver inflexible and introduces unnecessary constraints. Resource allocation failures occur in many scenarios. This patch will calculate whether the BT page size set by firmware is sufficient before allocating BT, and increase the BT page size if it is insufficient. Fixes: 1133401412a9 ("RDMA/hns: Optimize base address table config flow for qp buffer") Link: https://lore.kernel.org/r/20230512092245.344442-3-huangjunxian6@hisilicon.com Signed-off-by: Chengchang Tang Signed-off-by: Junxian Huang Signed-off-by: Jason Gunthorpe commit 58caa2a51ad4fd21763696cc6c4defc9fc1b4b4f Author: Chengchang Tang Date: Fri May 12 17:22:43 2023 +0800 RDMA/hns: Fix timeout attr in query qp for HIP08 On HIP08, the queried timeout attr is different from the timeout attr configured by the user. It is found by rdma-core testcase test_rdmacm_async_traffic: ====================================================================== FAIL: test_rdmacm_async_traffic (tests.test_rdmacm.CMTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "./tests/test_rdmacm.py", line 33, in test_rdmacm_async_traffic self.two_nodes_rdmacm_traffic(CMAsyncConnection, self.rdmacm_traffic, File "./tests/base.py", line 382, in two_nodes_rdmacm_traffic raise(res) AssertionError Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC") Link: https://lore.kernel.org/r/20230512092245.344442-2-huangjunxian6@hisilicon.com Signed-off-by: Chengchang Tang Signed-off-by: Junxian Huang Signed-off-by: Jason Gunthorpe commit 36a6418bb125944838b91a33eddca4064a5eb610 Author: Marc Kleine-Budde Date: Wed May 17 20:02:51 2023 +0200 Revert "ARM: dts: stm32: add CAN support on stm32f746" This reverts commit 0920ccdf41e3078a4dd2567eb905ea154bc826e6. The commit 0920ccdf41e3 ("ARM: dts: stm32: add CAN support on stm32f746") depends on the patch "dt-bindings: mfd: stm32f7: add binding definition for CAN3" [1], which is not in net/main, yet. This results in a parsing error of "stm32f746.dtsi". So revert this commit. [1] https://lore.kernel.org/all/20230423172528.1398158-2-dario.binacchi@amarulasolutions.com Cc: Dario Binacchi Cc: Alexandre TORGUE Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202305172108.x5acbaQG-lkp@intel.com Closes: https://lore.kernel.org/oe-kbuild-all/202305172130.eGGEUhpi-lkp@intel.com Fixes: 0920ccdf41e3 ("ARM: dts: stm32: add CAN support on stm32f746") Suggested-by: Krzysztof Kozlowski Link: https://lore.kernel.org/20230517181950.1106697-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 4d6d4c7f541d7027beed4fb86eb2c451bd8d6fff Merge: 1b66c114d161a dbcf76390eb9a Author: Linus Torvalds Date: Wed May 17 11:16:36 2023 -0700 Merge tag 'linux-kselftest-fixes-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fixes from Shuah Khan: - sgx test fix for false negatives - ftrace output is hard to parses and it masks inappropriate skips etc. This fix addresses the problems by integrating with kselftest runner * tag 'linux-kselftest-fixes-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/ftrace: Improve integration with kselftest runner selftests/sgx: Add "test_encl.elf" to TEST_FILES commit 39428f6ea9eace95011681628717062ff7f5eb5f Merge: f1fcbaa18b28d c3a62df457ff9 Author: Paolo Bonzini Date: Wed May 17 13:35:31 2023 -0400 Merge tag 'kvmarm-fixes-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.4, take #1 - Plug a race in the stage-2 mapping code where the IPA and the PA would end up being out of sync - Make better use of the bitmap API (bitmap_zero, bitmap_zalloc...) - FP/SVE/SME documentation update, in the hope that this field becomes clearer... - Add workaround for the usual Apple SEIS brokenness - Random comment fixes commit 59a556aebc43dded08535fe97d94ca3f657915e4 Author: Bharath SM Date: Mon May 15 21:25:12 2023 +0000 SMB3: drop reference to cfile before sending oplock break In cifs_oplock_break function we drop reference to a cfile at the end of function, due to which close command goes on wire after lease break acknowledgment even if file is already closed by application but we had deferred the handle close. If other client with limited file shareaccess waiting on lease break ack proceeds operation on that file as soon as first client sends ack, then we may encounter status sharing violation error because of open handle. Solution is to put reference to cfile(send close on wire if last ref) and then send oplock acknowledgment to server. Fixes: 9e31678fb403 ("SMB3: fix lease break timeout when multiple deferred close handles for the same file.") Cc: stable@kernel.org Signed-off-by: Bharath SM Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 47592fa8eb03742048b096b4696ec133384c45eb Author: Bharath SM Date: Wed May 3 14:38:35 2023 +0000 SMB3: Close all deferred handles of inode in case of handle lease break Oplock break may occur for different file handle than the deferred handle. Check for inode deferred closes list, if it's not empty then close all the deferred handles of inode because we should not cache handles if we dont have handle lease. Eg: If openfilelist has one deferred file handle and another open file handle from app for a same file, then on a lease break we choose the first handle in openfile list. The first handle in list can be deferred handle or actual open file handle from app. In case if it is actual open handle then today, we don't close deferred handles if we lose handle lease on a file. Problem with this is, later if app decides to close the existing open handle then we still be caching deferred handles until deferred close timeout. Leaving open handle may result in sharing violation when windows client tries to open a file with limited file share access. So we should check for deferred list of inode and walk through the list of deferred files in inode and close all deferred files. Fixes: 9e31678fb403 ("SMB3: fix lease break timeout when multiple deferred close handles for the same file.") Cc: stable@kernel.org Signed-off-by: Bharath SM Signed-off-by: Steve French commit 1b66c114d161a457897d269420c74620c032135c Merge: cba582631ee40 21a3f3328972b Author: Linus Torvalds Date: Wed May 17 09:56:01 2023 -0700 Merge tag 'nfsd-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: - A collection of minor bug fixes * tag 'nfsd-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: NFSD: Remove open coding of string copy SUNRPC: Fix trace_svc_register() call site SUNRPC: always free ctxt when freeing deferred request SUNRPC: double free xprt_ctxt while still in use SUNRPC: Fix error handling in svc_setup_socket() SUNRPC: Fix encoding of accepted but unsuccessful RPC replies lockd: define nlm_port_min,max with CONFIG_SYSCTL nfsd: define exports_proc_ops with CONFIG_PROC_FS SUNRPC: Avoid relying on crypto API to derive CBC-CTS output IV commit cba582631ee40772c6dbe24e945b9173572dfca0 Merge: a18ef64fe1e45 e7d3e5c4b1dd5 Author: Linus Torvalds Date: Wed May 17 09:49:21 2023 -0700 Merge tag 'tpmdd-v6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm fixes from Jarkko Sakkinen: "Three bug fixes for recently discovered issues" * tag 'tpmdd-v6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm/tpm_tis: Disable interrupts for more Lenovo devices tpm: Prevent hwrng from activating during resume tpm_tis: Use tpm_chip_{start,stop} decoration inside tpm_tis_resume commit d5aa417808cf14c052ca042920b3c6b9f1dc6aa4 Author: Alex Deucher Date: Mon Apr 10 12:02:29 2023 -0400 drm/amdgpu/gfx11: update gpu_clock_counter logic This code was written prior to previous updates to this logic for other chips. The RSC registers are part of SMUIO which is an always on block so there is no need to disable gfxoff. Additionally add the carryover and preemption checks. v2: rebase Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.1.y: 5591a051b86b: drm/amdgpu: refine get gpu clock counter method Cc: stable@vger.kernel.org # 6.2.y: 5591a051b86b: drm/amdgpu: refine get gpu clock counter method Cc: stable@vger.kernel.org # 6.3.y: 5591a051b86b: drm/amdgpu: refine get gpu clock counter method commit a18ef64fe1e4558b14a6e0ca9fbe8264475b7013 Author: Arnd Bergmann Date: Wed May 17 14:47:12 2023 +0200 tracing: make ftrace_likely_update() declaration visible This function is only used when CONFIG_TRACE_BRANCH_PROFILING is set and DISABLE_BRANCH_PROFILING is not set, and the declaration is hidden behind this combination of tests. But that causes a warning when building with CONFIG_TRACING_BRANCHES, since that sets DISABLE_BRANCH_PROFILING for the tracing code, and the declaration is thus hidden: kernel/trace/trace_branch.c:205:6: error: no previous prototype for 'ftrace_likely_update' [-Werror=missing-prototypes] Move the declaration out of the #ifdef to avoid the warning. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Torvalds commit ce0b15d11ad837fbacc5356941712218e38a0a83 Author: Dave Hansen Date: Tue May 16 12:24:25 2023 -0700 x86/mm: Avoid incomplete Global INVLPG flushes The INVLPG instruction is used to invalidate TLB entries for a specified virtual address. When PCIDs are enabled, INVLPG is supposed to invalidate TLB entries for the specified address for both the current PCID *and* Global entries. (Note: Only kernel mappings set Global=1.) Unfortunately, some INVLPG implementations can leave Global translations unflushed when PCIDs are enabled. As a workaround, never enable PCIDs on affected processors. I expect there to eventually be microcode mitigations to replace this software workaround. However, the exact version numbers where that will happen are not known today. Once the version numbers are set in stone, the processor list can be tweaked to only disable PCIDs on affected processors with affected microcode. Note: if anyone wants a quick fix that doesn't require patching, just stick 'nopcid' on your kernel command-line. Signed-off-by: Dave Hansen Reviewed-by: Thomas Gleixner Cc: stable@vger.kernel.org commit 5c054db54c43a5fcb5cc81012361f5e3fac37637 Author: Rob Clark Date: Tue May 16 15:20:37 2023 -0700 drm/msm: Be more shouty if per-process pgtables aren't working Otherwise it is not always obvious if a dt or iommu change is causing us to fall back to global pgtable. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/537359/ Link: https://lore.kernel.org/r/20230516222039.907690-2-robdclark@gmail.com commit e36ca2fad6bb4ef0603bdb5556578e9082fe0056 Author: Rob Clark Date: Tue May 16 15:20:36 2023 -0700 iommu/arm-smmu-qcom: Fix missing adreno_smmu's When the special handling of qcom,adreno-smmu was moved into qcom_smmu_create(), it was overlooked that we didn't have all the required entries in qcom_smmu_impl_of_match. So we stopped getting adreno_smmu_priv on sc7180, breaking per-process pgtables. Fixes: 30b912a03d91 ("iommu/arm-smmu-qcom: Move the qcom,adreno-smmu check into qcom_smmu_create") Cc: Suggested-by: Lepton Wu Signed-off-by: Rob Clark Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/537357/ Link: https://lore.kernel.org/r/20230516222039.907690-1-robdclark@gmail.com commit dc4f2ccaedddb489a83e7b12ebbdc347272aacc9 Author: Nikhil Mahale Date: Wed May 17 14:37:36 2023 +0530 ALSA: hda: Add NVIDIA codec IDs a3 through a7 to patch table These IDs are for AD102, AD103, AD104, AD106, and AD107 gpus with audio functions that are largely similar to the existing ones. Tested audio using gnome-settings, over HDMI, DP-SST and DP-MST connections on AD106 gpu. Signed-off-by: Nikhil Mahale Cc: Link: https://lore.kernel.org/r/20230517090736.15088-1-nmahale@nvidia.com Signed-off-by: Takashi Iwai commit 040b5a046a9e18098580d3ccd029e2318fca7859 Author: Arnd Bergmann Date: Tue May 16 21:50:42 2023 +0200 ALSA: oss: avoid missing-prototype warnings Two functions are defined and used in pcm_oss.c but also optionally used from io.c, with an optional prototype. If CONFIG_SND_PCM_OSS_PLUGINS is disabled, this causes a warning as the functions are not static and have no prototype: sound/core/oss/pcm_oss.c:1235:19: error: no previous prototype for 'snd_pcm_oss_write3' [-Werror=missing-prototypes] sound/core/oss/pcm_oss.c:1266:19: error: no previous prototype for 'snd_pcm_oss_read3' [-Werror=missing-prototypes] Avoid this by making the prototypes unconditional. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230516195046.550584-2-arnd@kernel.org Signed-off-by: Takashi Iwai commit ccecefa4f89971e34745abbffdaf4d2c3fb2f457 Author: Arnd Bergmann Date: Tue May 16 21:50:41 2023 +0200 ALSA: cs46xx: mark snd_cs46xx_download_image as static snd_cs46xx_download_image() was originally called from dsp_spos.c, but is now local to cs46xx_lib.c. Mark it as 'static' to avoid a warning about it lacking a declaration, and '__maybe_unused' to avoid a warning about it being unused when CONFIG_SND_CS46XX_NEW_DSP is disabled: sound/pci/cs46xx/cs46xx_lib.c:534:5: error: no previous prototype for 'snd_cs46xx_download_image' Fixes: 89f157d9e6bf ("[ALSA] cs46xx - Fix PM resume") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230516195046.550584-1-arnd@kernel.org Signed-off-by: Takashi Iwai commit 1b5f159ce8751b61aea426293cd71a510a081939 Author: Arnaldo Carvalho de Melo Date: Wed May 17 11:47:38 2023 -0300 tools headers disabled-features: Sync with the kernel sources To pick the changes from: e0bddc19ba9578bc ("x86/mm: Reduce untagged_addr() overhead for systems without LAM") This only causes these perf files to be rebuilt: CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o And addresses this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h' diff -u tools/arch/x86/include/asm/disabled-features.h arch/x86/include/asm/disabled-features.h Cc: Adrian Hunter Cc: Dave Hansen Cc: Ian Rogers Cc: Jiri Olsa Cc: Kirill A. Shutemov Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZGTpdlzrlRjjnY6K@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2eb94dd56a4a4e3fe286def3e2ba207804a37345 Author: Maurizio Lombardi Date: Thu May 11 13:07:41 2023 +0200 nvme: do not let the user delete a ctrl before a complete initialization If a userspace application performes a "delete_controller" command early during the ctrl initialization, the delete operation may race against the init code and the kernel will crash. nvme nvme5: Connect command failed: host path error nvme nvme5: failed to connect queue: 0 ret=880 PF: supervisor write access in kernel mode PF: error_code(0x0002) - not-present page blk_mq_quiesce_queue+0x18/0x90 nvme_tcp_delete_ctrl+0x24/0x40 [nvme_tcp] nvme_do_delete_ctrl+0x7f/0x8b [nvme_core] nvme_sysfs_delete.cold+0x8/0xd [nvme_core] kernfs_fop_write_iter+0x124/0x1b0 new_sync_write+0xff/0x190 vfs_write+0x1ef/0x280 Fix the crash by checking the NVME_CTRL_STARTED_ONCE bit; if it's not set it means that the nvme controller is still in the process of getting initialized and the kernel will return an -EBUSY error to userspace. Set the NVME_CTRL_STARTED_ONCE later in the nvme_start_ctrl() function, after the controller start operation is completed. Signed-off-by: Maurizio Lombardi Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 1743e5f6000901a11f4e1cd741bfa9136f3ec9b1 Author: Christoph Hellwig Date: Wed May 17 09:53:45 2023 +0200 nvme-multipath: don't call blk_mark_disk_dead in nvme_mpath_remove_disk nvme_mpath_remove_disk is called after del_gendisk, at which point a blk_mark_disk_dead call doesn't make any sense. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 29719e319869c6b3f09e6e92310b019e32943696 Author: Arnaldo Carvalho de Melo Date: Wed May 17 11:15:53 2023 -0300 tools headers UAPI: Sync arch prctl headers with the kernel sources To pick the changes in this cset: a03c376ebaf38394 ("x86/arch_prctl: Add AMX feature numbers as ABI constants") 23e5d9ec2bab53c4 ("x86/mm/iommu/sva: Make LAM and SVA mutually exclusive") 2f8794bd087e7958 ("x86/mm: Provide arch_prctl() interface for LAM") This picks these new prctls in a third range, that was also added to the tools/perf/trace/beauty/arch_prctl.c beautifier. $ tools/perf/trace/beauty/x86_arch_prctl.sh > /tmp/before $ cp arch/x86/include/uapi/asm/prctl.h tools/arch/x86/include/uapi/asm/prctl.h $ tools/perf/trace/beauty/x86_arch_prctl.sh > /tmp/after $ diff -u /tmp/before /tmp/after @@ -20,3 +20,11 @@ [0x2003 - 0x2001]= "MAP_VDSO_64", }; +#define x86_arch_prctl_codes_3_offset 0x4001 +static const char *x86_arch_prctl_codes_3[] = { + [0x4001 - 0x4001]= "GET_UNTAG_MASK", + [0x4002 - 0x4001]= "ENABLE_TAGGED_ADDR", + [0x4003 - 0x4001]= "GET_MAX_TAG_BITS", + [0x4004 - 0x4001]= "FORCE_TAGGED_SVA", +}; + $ With this 'perf trace' can translate those numbers into strings and use the strings in filter expressions: # perf trace -e prctl 0.000 ( 0.011 ms): DOM Worker/3722622 prctl(option: SET_NAME, arg2: 0x7f9c014b7df5) = 0 0.032 ( 0.002 ms): DOM Worker/3722622 prctl(option: SET_NAME, arg2: 0x7f9bb6b51580) = 0 5.452 ( 0.003 ms): StreamT~ns #30/3722623 prctl(option: SET_NAME, arg2: 0x7f9bdbdfeb70) = 0 5.468 ( 0.002 ms): StreamT~ns #30/3722623 prctl(option: SET_NAME, arg2: 0x7f9bdbdfea70) = 0 24.494 ( 0.009 ms): IndexedDB #556/3722624 prctl(option: SET_NAME, arg2: 0x7f562a32ae28) = 0 24.540 ( 0.002 ms): IndexedDB #556/3722624 prctl(option: SET_NAME, arg2: 0x7f563c6d4b30) = 0 670.281 ( 0.008 ms): systemd-userwo/3722339 prctl(option: SET_NAME, arg2: 0x564be30805c8) = 0 670.293 ( 0.002 ms): systemd-userwo/3722339 prctl(option: SET_NAME, arg2: 0x564be30800f0) = 0 ^C# This addresses this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/prctl.h' differs from latest version at 'arch/x86/include/uapi/asm/prctl.h' diff -u tools/arch/x86/include/uapi/asm/prctl.h arch/x86/include/uapi/asm/prctl.h Cc: Adrian Hunter Cc: Chang S. Bae Cc: Dave Hansen Cc: Ian Rogers Cc: Jiri Olsa Cc: Kirill A. Shutemov Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZGTjNPpD3FOWfetM@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7f02ce62a6cfc0feb164bb7eb36c6647c00b43c8 Author: Arnaldo Carvalho de Melo Date: Wed May 17 10:34:59 2023 -0300 tools headers: Update the copy of x86's mem{cpy,set}_64.S used in 'perf bench' This is to get the changes from: 68674f94ffc9dddc ("x86: don't use REP_GOOD or ERMS for small memory copies") 20f3337d350c4e1b ("x86: don't use REP_GOOD or ERMS for small memory clearing") This also make the 'perf bench mem' files stop referring to the erms versions that gone away with the above patches. That addresses these perf tools build warning: Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S' diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S Warning: Kernel ABI header at 'tools/arch/x86/lib/memset_64.S' differs from latest version at 'arch/x86/lib/memset_64.S' diff -u tools/arch/x86/lib/memset_64.S arch/x86/lib/memset_64.S Signed-off-by: Arnaldo Carvalho de Melo commit 9bc83d6e3824f09cef73b01256962d950965ddc4 Author: Arnaldo Carvalho de Melo Date: Wed May 17 10:10:57 2023 -0300 tools headers x86 cpufeatures: Sync with the kernel sources To pick the changes from: 3d8f61bf8bcd69bc ("x86: KVM: Add common feature flag for AMD's PSFD") 3763bf58029f3459 ("x86/cpufeatures: Redefine synthetic virtual NMI bit as AMD's "real" vNMI") 6449dcb0cac73821 ("x86: CPUID and CR3/CR4 flags for Linear Address Masking") be8de49bea505e77 ("x86/speculation: Identify processors vulnerable to SMT RSB predictions") e7862eda309ecfcc ("x86/cpu: Support AMD Automatic IBRS") faabfcb194a8d068 ("x86/cpu, kvm: Add the SMM_CTL MSR not present feature") 5b909d4ae59aedc7 ("x86/cpu, kvm: Add the Null Selector Clears Base feature") 84168ae786f8a15a ("x86/cpu, kvm: Move X86_FEATURE_LFENCE_RDTSC to its native leaf") a9dc9ec5a1fafc3d ("x86/cpu, kvm: Add the NO_NESTED_DATA_BP feature") f8df91e73a6827a4 ("x86/cpufeatures: Add macros for Intel's new fast rep string features") 78335aac6156eada ("x86/cpufeatures: Add Bandwidth Monitoring Event Configuration feature flag") f334f723a63cfc25 ("x86/cpufeatures: Add Slow Memory Bandwidth Allocation feature flag") a018d2e3d4b1abc4 ("x86/cpufeatures: Add Architectural PerfMon Extension bit") This causes these perf files to be rebuilt and brings some X86_FEATURE that will be used when updating the copies of tools/arch/x86/lib/mem{cpy,set}_64.S with the kernel sources: CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o And addresses this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h' diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h Cc: Borislav Petkov (AMD) Cc: Kim Phillips Cc: Jim Mattson Cc: Babu Moger Cc: Ingo Molnar Cc: Kan Liang Cc: Sean Christopherson Cc: Dave Hansen Cc: Kirill A. Shutemov Cc: Paolo Bonzini Cc: Tom Lendacky Link: https://lore.kernel.org/lkml/ZGTTw642q8mWgv2Y@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 48524463f807ec516a291bdf717dcf2c8e059f51 Author: Namjae Jeon Date: Wed May 17 16:07:39 2023 +0900 ntfs: Add myself as a reviewer I'm volunteering to help review patches for current unmaintained ntfs filesytem. Signed-off-by: Namjae Jeon Acked-by: Bagas Sanjaya Message-Id: <20230517070739.6505-1-linkinjeon@kernel.org> Signed-off-by: Christian Brauner commit 3a7bb21b6f49b4d1695d4ba8ff31e9619cbcebe3 Author: Jeff Layton Date: Tue May 16 08:46:54 2023 -0400 fs: don't call posix_acl_listxattr in generic_listxattr Commit f2620f166e2a caused the kernel to start emitting POSIX ACL xattrs for NFSv4 inodes, which it doesn't support. The only other user of generic_listxattr is HFS (classic) and it doesn't support POSIX ACLs either. Fixes: f2620f166e2a xattr: simplify listxattr helpers Reported-by: Ondrej Valousek Signed-off-by: Jeff Layton Message-Id: <20230516124655.82283-1-jlayton@kernel.org> Signed-off-by: Christian Brauner commit f15afbd34d8fadbd375f1212e97837e32bc170cc Author: Hao Ge Date: Mon Apr 24 13:18:35 2023 +0800 fs: fix undefined behavior in bit shift for SB_NOUSER Shifting signed 32-bit value by 31 bits is undefined, so changing significant bit to unsigned. It was spotted by UBSAN. So let's just fix this by using the BIT() helper for all SB_* flags. Fixes: e462ec50cb5f ("VFS: Differentiate mount flags (MS_*) from internal superblock flags") Signed-off-by: Hao Ge Message-Id: <20230424051835.374204-1-gehao@kylinos.cn> [brauner@kernel.org: use BIT() for all SB_* flags] Signed-off-by: Christian Brauner commit 0f1cbf941d5949110adf70725a9614e622de8d99 Author: Jason Gunthorpe Date: Mon May 1 14:11:28 2023 -0300 s390/iommu: get rid of S390_CCW_IOMMU and S390_AP_IOMMU These don't do anything anymore, the only user of the symbol was VFIO_CCW/AP which already "depends on VFIO" and VFIO itself selects IOMMU_API. When this was added VFIO was wrongly doing "depends on IOMMU_API" which required some contortions like this to ensure IOMMU_API was turned on. Reviewed-by: Eric Farman Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/0-v2-eb322ce2e547+188f-rm_iommu_ccw_jgg@nvidia.com Signed-off-by: Alexander Gordeev commit e534167cee150d900bf800ddb9bf1514d966635f Author: Lukas Bulwahn Date: Mon May 8 06:09:16 2023 +0200 s390/Kconfig: remove obsolete configs SCHED_{BOOK,DRAWER} Commit f1045056c726 ("topology/sysfs: rework book and drawer topology ifdefery") activates the book and drawer topology, previously activated by CONFIG_SCHED_{BOOK,DRAWER}, dependent on the existence of certain macro definitions. Hence, since then, CONFIG_SCHED_{BOOK,DRAWER} have no effect and any further purpose. Remove the obsolete configs SCHED_{BOOK,DRAWER}. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20230508040916.16733-1-lukas.bulwahn@gmail.com Signed-off-by: Alexander Gordeev commit 6d9406f80cd82964c8ed75d482d885f18921e0b8 Author: Ilya Leoshkevich Date: Thu May 4 16:40:21 2023 +0200 s390/uapi: cover statfs padding by growing f_spare pahole says: struct compat_statfs64 { ... u32 f_spare[4]; /* 68 16 */ /* size: 88, cachelines: 1, members: 12 */ /* padding: 4 */ struct statfs { ... unsigned int f_spare[4]; /* 68 16 */ /* size: 88, cachelines: 1, members: 12 */ /* padding: 4 */ struct statfs64 { ... unsigned int f_spare[4]; /* 68 16 */ /* size: 88, cachelines: 1, members: 12 */ /* padding: 4 */ One has to keep the existence of padding in mind when working with these structs. Grow f_spare arrays to 5 in order to simplify things. Acked-by: Heiko Carstens Signed-off-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230504144021.808932-3-iii@linux.ibm.com Signed-off-by: Alexander Gordeev commit ed40866ec7d328b3dfb70db7e2011640a16202c3 Author: Ilya Leoshkevich Date: Thu May 4 16:40:20 2023 +0200 statfs: enforce statfs[64] structure initialization s390's struct statfs and struct statfs64 contain padding, which field-by-field copying does not set. Initialize the respective structs with zeros before filling them and copying them to userspace, like it's already done for the compat versions of these structs. Found by KMSAN. [agordeev@linux.ibm.com: fixed typo in patch description] Acked-by: Heiko Carstens Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: Ilya Leoshkevich Reviewed-by: Andrew Morton Link: https://lore.kernel.org/r/20230504144021.808932-2-iii@linux.ibm.com Signed-off-by: Alexander Gordeev commit 2862a2fdfae875888e3c1c3634e3422e01d98147 Author: Heiko Carstens Date: Thu May 11 17:04:41 2023 +0200 s390/qdio: fix do_sqbs() inline assembly constraint Use "a" constraint instead of "d" constraint to pass the state parameter to the do_sqbs() inline assembly. This prevents that general purpose register zero is used for the state parameter. If the compiler would select general purpose register zero this would be problematic for the used instruction in rsy format: the register used for the state parameter is a base register. If the base register is general purpose register zero the contents of the register are unexpectedly ignored when the instruction is executed. This only applies to z/VM guests using QIOASSIST with dedicated (pass through) QDIO-based devices such as FCP [zfcp driver] as well as real OSA or HiperSockets [qeth driver]. A possible symptom for this case using zfcp is the following repeating kernel message pattern: zfcp : A QDIO problem occurred zfcp : A QDIO problem occurred zfcp : qdio: ZFCP on SC using AI:1 QEBSM:1 PRI:1 TDD:1 SIGA: W zfcp : A QDIO problem occurred zfcp : A QDIO problem occurred Each of the qdio problem message can be accompanied by the following entries for the affected subchannel in /sys/kernel/debug/s390dbf/qdio_error/hex_ascii for zfcp or qeth: ccq: 69.... SQBS ERROR. Reviewed-by: Benjamin Block Cc: Steffen Maier Fixes: 8129ee164267 ("[PATCH] s390: qdio V=V pass-through") Cc: Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 1e94be78ec1556e90056ac038b15231723d315a9 Merge: fe82f16aafdaf c4af8e3fecd03 Author: Greg Kroah-Hartman Date: Wed May 17 14:49:36 2023 +0200 Merge tag 'thunderbolt-for-v6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fix for v6.4-rc3 This includes a single fix that fixes an error when resuming from hibernation if the driver is built into the kernel. This has been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Clear registers properly when auto clear isn't in use commit 61ae320a29b0540c16931816299eb86bf2b66c08 Author: Florian Westphal Date: Thu May 11 22:39:30 2023 +0200 netfilter: nft_set_rbtree: fix null deref on element insertion There is no guarantee that rb_prev() will not return NULL in nft_rbtree_gc_elem(): general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f] nft_add_set_elem+0x14b0/0x2990 nf_tables_newsetelem+0x528/0xb30 Furthermore, there is a possible use-after-free while iterating, 'node' can be free'd so we need to cache the next value to use. Fixes: c9e6978e2725 ("netfilter: nft_set_rbtree: Switch to node list walk for overlap detection") Signed-off-by: Florian Westphal commit e3c361b8acd636f5fe80c02849ca175201edf10c Author: Florian Westphal Date: Thu May 11 14:15:15 2023 +0200 netfilter: nf_tables: fix nft_trans type confusion nft_trans_FOO objects all share a common nft_trans base structure, but trailing fields depend on the real object size. Access is only safe after trans->msg_type check. Check for rule type first. Found by code inspection. Fixes: 1a94e38d254b ("netfilter: nf_tables: add NFTA_RULE_ID attribute") Signed-off-by: Florian Westphal commit 224a876e37543eee111bf9b6aa4935080e619335 Author: Tom Rix Date: Sun May 14 10:00:10 2023 -0400 netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT gcc with W=1 and ! CONFIG_NF_NAT net/netfilter/nf_conntrack_netlink.c:3463:32: error: ‘exp_nat_nla_policy’ defined but not used [-Werror=unused-const-variable=] 3463 | static const struct nla_policy exp_nat_nla_policy[CTA_EXPECT_NAT_MAX+1] = { | ^~~~~~~~~~~~~~~~~~ net/netfilter/nf_conntrack_netlink.c:2979:33: error: ‘any_addr’ defined but not used [-Werror=unused-const-variable=] 2979 | static const union nf_inet_addr any_addr; | ^~~~~~~~ These variables use is controlled by CONFIG_NF_NAT, so should their definitions. Signed-off-by: Tom Rix Reviewed-by: Simon Horman Signed-off-by: Florian Westphal commit ab87603b251134441a67385ecc9d3371be17b7a7 Author: Kai-Heng Feng Date: Wed May 17 13:24:51 2023 +0800 net: wwan: t7xx: Ensure init is completed before system sleep When the system attempts to sleep while mtk_t7xx is not ready, the driver cannot put the device to sleep: [ 12.472918] mtk_t7xx 0000:57:00.0: [PM] Exiting suspend, modem in invalid state [ 12.472936] mtk_t7xx 0000:57:00.0: PM: pci_pm_suspend(): t7xx_pci_pm_suspend+0x0/0x20 [mtk_t7xx] returns -14 [ 12.473678] mtk_t7xx 0000:57:00.0: PM: dpm_run_callback(): pci_pm_suspend+0x0/0x1b0 returns -14 [ 12.473711] mtk_t7xx 0000:57:00.0: PM: failed to suspend async: error -14 [ 12.764776] PM: Some devices failed to suspend, or early wake event detected Mediatek confirmed the device can take a rather long time to complete its initialization, so wait for up to 20 seconds until init is done. Signed-off-by: Kai-Heng Feng Signed-off-by: David S. Miller commit 9ba9485b87ac97fd159abdb4cbd53099bc9f01c6 Author: Benjamin Poirier Date: Tue May 16 14:49:24 2023 -0400 net: selftests: Fix optstring The cited commit added a stray colon to the 'v' option. That makes the option work incorrectly. ex: tools/testing/selftests/net# ./fib_nexthops.sh -v (should enable verbose mode, instead it shows help text due to missing arg) Fixes: 5feba4727395 ("selftests: fib_nexthops: Make ping timeout configurable") Reviewed-by: Ido Schimmel Signed-off-by: Benjamin Poirier Signed-off-by: David S. Miller commit c46e78ba9a7a09da4f192dc8df15c4e8a07fb9e0 Author: Vladimir Oltean Date: Tue May 16 18:44:10 2023 +0300 net: pcs: xpcs: fix C73 AN not getting enabled The XPCS expects clause 73 (copper backplane) autoneg to follow the ethtool autoneg bit. It actually did that until the blamed commit inaptly replaced state->an_enabled (coming from ethtool) with phylink_autoneg_inband() (coming from the device tree or struct phylink_config), as part of an unrelated phylink_pcs API conversion. Russell King suggests that state->an_enabled from the original code was just a proxy for the ethtool Autoneg bit, and that the correct way of restoring the functionality is to check for this bit in the advertising mask. Fixes: 11059740e616 ("net: pcs: xpcs: convert to phylink_pcs_ops") Link: https://lore.kernel.org/netdev/ZGNt2MFeRolKGFck@shell.armlinux.org.uk/ Suggested-by: Russell King (Oracle) Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 60829145f1e2650b31ebe6a0ec70a9725b38fa2c Author: M Chetan Kumar Date: Tue May 16 21:09:46 2023 +0530 net: wwan: iosm: fix NULL pointer dereference when removing device In suspend and resume cycle, the removal and rescan of device ends up in NULL pointer dereference. During driver initialization, if the ipc_imem_wwan_channel_init() fails to get the valid device capabilities it returns an error and further no resource (wwan struct) will be allocated. Now in this situation if driver removal procedure is initiated it would result in NULL pointer exception since unallocated wwan struct is dereferenced inside ipc_wwan_deinit(). ipc_imem_run_state_worker() to handle the called functions return value and to release the resource in failure case. It also reports the link down event in failure cases. The user space application can handle this event to do a device reset for restoring the device communication. Fixes: 3670970dd8c6 ("net: iosm: shared memory IPC interface") Reported-by: Samuel Wein PhD Closes: https://lore.kernel.org/netdev/20230427140819.1310f4bd@kernel.org/T/ Signed-off-by: M Chetan Kumar Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit dacab578c7c6cd06c50c89dfa36b0e0f10decd4e Author: Eric Dumazet Date: Tue May 16 14:23:42 2023 +0000 vlan: fix a potential uninit-value in vlan_dev_hard_start_xmit() syzbot triggered the following splat [1], sending an empty message through pppoe_sendmsg(). When VLAN_FLAG_REORDER_HDR flag is set, vlan_dev_hard_header() does not push extra bytes for the VLAN header, because vlan is offloaded. Unfortunately vlan_dev_hard_start_xmit() first reads veth->h_vlan_proto before testing (vlan->flags & VLAN_FLAG_REORDER_HDR). We need to swap the two conditions. [1] BUG: KMSAN: uninit-value in vlan_dev_hard_start_xmit+0x171/0x7f0 net/8021q/vlan_dev.c:111 vlan_dev_hard_start_xmit+0x171/0x7f0 net/8021q/vlan_dev.c:111 __netdev_start_xmit include/linux/netdevice.h:4883 [inline] netdev_start_xmit include/linux/netdevice.h:4897 [inline] xmit_one net/core/dev.c:3580 [inline] dev_hard_start_xmit+0x253/0xa20 net/core/dev.c:3596 __dev_queue_xmit+0x3c7f/0x5ac0 net/core/dev.c:4246 dev_queue_xmit include/linux/netdevice.h:3053 [inline] pppoe_sendmsg+0xa93/0xb80 drivers/net/ppp/pppoe.c:900 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] ____sys_sendmsg+0xa24/0xe40 net/socket.c:2501 ___sys_sendmsg+0x2a1/0x3f0 net/socket.c:2555 __sys_sendmmsg+0x411/0xa50 net/socket.c:2641 __do_sys_sendmmsg net/socket.c:2670 [inline] __se_sys_sendmmsg net/socket.c:2667 [inline] __x64_sys_sendmmsg+0xbc/0x120 net/socket.c:2667 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Uninit was created at: slab_post_alloc_hook+0x12d/0xb60 mm/slab.h:774 slab_alloc_node mm/slub.c:3452 [inline] kmem_cache_alloc_node+0x543/0xab0 mm/slub.c:3497 kmalloc_reserve+0x148/0x470 net/core/skbuff.c:520 __alloc_skb+0x3a7/0x850 net/core/skbuff.c:606 alloc_skb include/linux/skbuff.h:1277 [inline] sock_wmalloc+0xfe/0x1a0 net/core/sock.c:2583 pppoe_sendmsg+0x3af/0xb80 drivers/net/ppp/pppoe.c:867 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] ____sys_sendmsg+0xa24/0xe40 net/socket.c:2501 ___sys_sendmsg+0x2a1/0x3f0 net/socket.c:2555 __sys_sendmmsg+0x411/0xa50 net/socket.c:2641 __do_sys_sendmmsg net/socket.c:2670 [inline] __se_sys_sendmmsg net/socket.c:2667 [inline] __x64_sys_sendmmsg+0xbc/0x120 net/socket.c:2667 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd CPU: 0 PID: 29770 Comm: syz-executor.0 Not tainted 6.3.0-rc6-syzkaller-gc478e5b17829 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 6049674b5720edbbb13a7cb3e2f3d2affaa40c19 Author: Masami Hiramatsu (Google) Date: Sun Apr 9 11:28:31 2023 +0900 tracing: fprobe: Initialize ret valiable to fix smatch error The commit 39d954200bf6 ("fprobe: Skip exit_handler if entry_handler returns !0") introduced a hidden dependency of 'ret' local variable in the fprobe_handler(), Smatch warns the `ret` can be accessed without initialization. kernel/trace/fprobe.c:59 fprobe_handler() error: uninitialized symbol 'ret'. kernel/trace/fprobe.c 49 fpr->entry_ip = ip; 50 if (fp->entry_data_size) 51 entry_data = fpr->data; 52 } 53 54 if (fp->entry_handler) 55 ret = fp->entry_handler(fp, ip, ftrace_get_regs(fregs), entry_data); ret is only initialized if there is an ->entry_handler 56 57 /* If entry_handler returns !0, nmissed is not counted. */ 58 if (rh) { rh is only true if there is an ->exit_handler. Presumably if you have and ->exit_handler that means you also have a ->entry_handler but Smatch is not smart enough to figure it out. --> 59 if (ret) ^^^ Warning here. 60 rethook_recycle(rh); 61 else 62 rethook_hook(rh, ftrace_get_regs(fregs), true); 63 } 64 out: 65 ftrace_test_recursion_unlock(bit); 66 } Link: https://lore.kernel.org/all/168100731160.79534.374827110083836722.stgit@devnote2/ Reported-by: Dan Carpenter Link: https://lore.kernel.org/all/85429a5c-a4b9-499e-b6c0-cbd313291c49@kili.mountain Fixes: 39d954200bf6 ("fprobe: Skip exit_handler if entry_handler returns !0") Acked-by: Dan Carpenter Signed-off-by: Masami Hiramatsu (Google) commit 597441b3436a43011f31ce71dc0a6c0bf5ce958a Author: Josef Bacik Date: Thu May 11 12:45:59 2023 -0400 btrfs: use nofs when cleaning up aborted transactions Our CI system caught a lockdep splat: ====================================================== WARNING: possible circular locking dependency detected 6.3.0-rc7+ #1167 Not tainted ------------------------------------------------------ kswapd0/46 is trying to acquire lock: ffff8c6543abd650 (sb_internal#2){++++}-{0:0}, at: btrfs_commit_inode_delayed_inode+0x5f/0x120 but task is already holding lock: ffffffffabe61b40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x4aa/0x7a0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (fs_reclaim){+.+.}-{0:0}: fs_reclaim_acquire+0xa5/0xe0 kmem_cache_alloc+0x31/0x2c0 alloc_extent_state+0x1d/0xd0 __clear_extent_bit+0x2e0/0x4f0 try_release_extent_mapping+0x216/0x280 btrfs_release_folio+0x2e/0x90 invalidate_inode_pages2_range+0x397/0x470 btrfs_cleanup_dirty_bgs+0x9e/0x210 btrfs_cleanup_one_transaction+0x22/0x760 btrfs_commit_transaction+0x3b7/0x13a0 create_subvol+0x59b/0x970 btrfs_mksubvol+0x435/0x4f0 __btrfs_ioctl_snap_create+0x11e/0x1b0 btrfs_ioctl_snap_create_v2+0xbf/0x140 btrfs_ioctl+0xa45/0x28f0 __x64_sys_ioctl+0x88/0xc0 do_syscall_64+0x38/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc -> #0 (sb_internal#2){++++}-{0:0}: __lock_acquire+0x1435/0x21a0 lock_acquire+0xc2/0x2b0 start_transaction+0x401/0x730 btrfs_commit_inode_delayed_inode+0x5f/0x120 btrfs_evict_inode+0x292/0x3d0 evict+0xcc/0x1d0 inode_lru_isolate+0x14d/0x1e0 __list_lru_walk_one+0xbe/0x1c0 list_lru_walk_one+0x58/0x80 prune_icache_sb+0x39/0x60 super_cache_scan+0x161/0x1f0 do_shrink_slab+0x163/0x340 shrink_slab+0x1d3/0x290 shrink_node+0x300/0x720 balance_pgdat+0x35c/0x7a0 kswapd+0x205/0x410 kthread+0xf0/0x120 ret_from_fork+0x29/0x50 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(sb_internal#2); lock(fs_reclaim); lock(sb_internal#2); *** DEADLOCK *** 3 locks held by kswapd0/46: #0: ffffffffabe61b40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x4aa/0x7a0 #1: ffffffffabe50270 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x113/0x290 #2: ffff8c6543abd0e0 (&type->s_umount_key#44){++++}-{3:3}, at: super_cache_scan+0x38/0x1f0 stack backtrace: CPU: 0 PID: 46 Comm: kswapd0 Not tainted 6.3.0-rc7+ #1167 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014 Call Trace: dump_stack_lvl+0x58/0x90 check_noncircular+0xd6/0x100 ? save_trace+0x3f/0x310 ? add_lock_to_list+0x97/0x120 __lock_acquire+0x1435/0x21a0 lock_acquire+0xc2/0x2b0 ? btrfs_commit_inode_delayed_inode+0x5f/0x120 start_transaction+0x401/0x730 ? btrfs_commit_inode_delayed_inode+0x5f/0x120 btrfs_commit_inode_delayed_inode+0x5f/0x120 btrfs_evict_inode+0x292/0x3d0 ? lock_release+0x134/0x270 ? __pfx_wake_bit_function+0x10/0x10 evict+0xcc/0x1d0 inode_lru_isolate+0x14d/0x1e0 __list_lru_walk_one+0xbe/0x1c0 ? __pfx_inode_lru_isolate+0x10/0x10 ? __pfx_inode_lru_isolate+0x10/0x10 list_lru_walk_one+0x58/0x80 prune_icache_sb+0x39/0x60 super_cache_scan+0x161/0x1f0 do_shrink_slab+0x163/0x340 shrink_slab+0x1d3/0x290 shrink_node+0x300/0x720 balance_pgdat+0x35c/0x7a0 kswapd+0x205/0x410 ? __pfx_autoremove_wake_function+0x10/0x10 ? __pfx_kswapd+0x10/0x10 kthread+0xf0/0x120 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x29/0x50 This happens because when we abort the transaction in the transaction commit path we call invalidate_inode_pages2_range on our block group cache inodes (if we have space cache v1) and any delalloc inodes we may have. The plain invalidate_inode_pages2_range() call passes through GFP_KERNEL, which makes sense in most cases, but not here. Wrap these two invalidate callees with memalloc_nofs_save/memalloc_nofs_restore to make sure we don't end up with the fs reclaim dependency under the transaction dependency. CC: stable@vger.kernel.org # 4.14+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 806570c0bb7b4847828c22c4934fcf2dc8fc572f Author: Johannes Thumshirn Date: Thu May 4 13:58:13 2023 +0200 btrfs: handle memory allocation failure in btrfs_csum_one_bio Since f8a53bb58ec7 ("btrfs: handle checksum generation in the storage layer") the failures of btrfs_csum_one_bio() are handled via bio_end_io(). This means, we can return BLK_STS_RESOURCE from btrfs_csum_one_bio() in case the allocation of the ordered sums fails. This also fixes a syzkaller report, where injecting a failure into the kvzalloc() call results in a BUG_ON(). Reported-by: syzbot+d8941552e21eac774778@syzkaller.appspotmail.com Reviewed-by: Christoph Hellwig Reviewed-by: Anand Jain Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7561551e7ba870b9659083b95feb520fb2dacce3 Author: Qu Wenruo Date: Thu Apr 13 13:57:17 2023 +0800 btrfs: scrub: try harder to mark RAID56 block groups read-only Currently we allow a block group not to be marked read-only for scrub. But for RAID56 block groups if we require the block group to be read-only, then we're allowed to use cached content from scrub stripe to reduce unnecessary RAID56 reads. So this patch would: - Make btrfs_inc_block_group_ro() try harder During my tests, for cases like btrfs/061 and btrfs/064, we can hit ENOSPC from btrfs_inc_block_group_ro() calls during scrub. The reason is if we only have one single data chunk, and trying to scrub it, we won't have any space left for any newer data writes. But this check should be done by the caller, especially for scrub cases we only temporarily mark the chunk read-only. And newer data writes would always try to allocate a new data chunk when needed. - Return error for scrub if we failed to mark a RAID56 chunk read-only Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 7dd3d9bd873f138675cb727eaa51a498d99f0e89 Author: Andreas Kemnade Date: Thu May 4 08:04:21 2023 +0200 gpiolib: fix allocation of mixed dynamic/static GPIOs If static allocation and dynamic allocation GPIOs are present, dynamic allocation pollutes the numberspace for static allocation, causing static allocation to fail. Enforce dynamic allocation above GPIO_DYNAMIC_BASE. Seen on a GTA04 when omap-gpio (static) and twl-gpio (dynamic) raced: [some successful registrations of omap_gpio instances] [ 2.553833] twl4030_gpio twl4030-gpio: gpio (irq 145) chaining IRQs 161..178 [ 2.561401] gpiochip_find_base: found new base at 160 [ 2.564392] gpio gpiochip5: (twl4030): added GPIO chardev (254:5) [ 2.564544] gpio gpiochip5: registered GPIOs 160 to 177 on twl4030 [...] [ 2.692169] omap-gpmc 6e000000.gpmc: GPMC revision 5.0 [ 2.697357] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000 [ 2.703643] gpiochip_find_base: found new base at 178 [ 2.704376] gpio gpiochip6: (omap-gpmc): added GPIO chardev (254:6) [ 2.704589] gpio gpiochip6: registered GPIOs 178 to 181 on omap-gpmc [...] [ 2.840393] gpio gpiochip7: Static allocation of GPIO base is deprecated, use dynamic allocation. [ 2.849365] gpio gpiochip7: (gpio-160-191): GPIO integer space overlap, cannot add chip [ 2.857513] gpiochip_add_data_with_key: GPIOs 160..191 (gpio-160-191) failed to register, -16 [ 2.866149] omap_gpio 48310000.gpio: error -EBUSY: Could not register gpio chip On that device it is fixed invasively by commit 92bf78b33b0b4 ("gpio: omap: use dynamic allocation of base") but let's also fix that for devices where there is still a mixture of static and dynamic allocation. Fixes: 7b61212f2a07 ("gpiolib: Get rid of ARCH_NR_GPIOS") Signed-off-by: Andreas Kemnade Reviewed-by: Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 1aa7f416175619e0286fddc5fc44e968b06bf2aa Author: Maya Matuszczyk Date: Mon May 15 20:48:43 2023 +0200 drm: panel-orientation-quirks: Change Air's quirk to support Air Plus It turned out that Aya Neo Air Plus had a different board name than expected. This patch changes Aya Neo Air's quirk to account for that, as both devices share "Air" in DMI product name. Tested on Air claiming to be an Air Pro, and on Air Plus. Signed-off-by: Maya Matuszczyk Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20230515184843.1552612-1-maccraft123mc@gmail.com commit 0a1bb16e0fe6650c3841e611de374bfd5578ad70 Author: Zev Weiss Date: Tue May 16 22:47:56 2023 -0700 gpio: mockup: Fix mode of debugfs files This driver's debugfs files have had a read operation since commit 2a9e27408e12 ("gpio: mockup: rework debugfs interface"), but were still being created with write-only mode bits. Update them to indicate that the files can also be read. Signed-off-by: Zev Weiss Fixes: 2a9e27408e12 ("gpio: mockup: rework debugfs interface") Cc: stable@kernel.org # v5.1+ Signed-off-by: Bartosz Golaszewski commit 66353baf3762fa0968b4424a2075fb395b329e9d Author: Nikolay Aleksandrov Date: Tue May 16 11:48:49 2023 +0300 mailmap: add entries for Nikolay Aleksandrov Turns out I missed a few patches due to use of old addresses by senders. Add a mailmap entry with my old addresses. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 60d758659f1fb49e0d5b6ac2691ede8c0958795b Author: Aleksandr Loktionov Date: Tue May 16 10:41:46 2023 -0700 igb: fix bit_shift to be in [1..8] range In igb_hash_mc_addr() the expression: "mc_addr[4] >> 8 - bit_shift", right shifting "mc_addr[4]" shift by more than 7 bits always yields zero, so hash becomes not so different. Add initialization with bit_shift = 1 and add a loop condition to ensure bit_shift will be always in [1..8] range. Fixes: 9d5c824399de ("igb: PCI-Express 82575 Gigabit Ethernet driver") Signed-off-by: Aleksandr Loktionov Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Signed-off-by: David S. Miller commit 5ad3bd8444021a227959891c14b436e4067d67fd Merge: 1323e0c6e1d7e 7dcbdf29282fb Author: David S. Miller Date: Wed May 17 09:19:23 2023 +0100 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony nguyen says: ==================== Intel Wired LAN Driver Updates 2023-05-16 This series contains updates to ice and iavf drivers. Ahmed adds setting of missed condition for statistics which caused incorrect reporting of values for ice. For iavf, he removes a call to set VLAN offloads during re-initialization which can cause incorrect values to be set. Dawid adds checks to ensure VF is ready to be reset before executing commands that will require it to be reset on ice. --- v2: Patch 2 - Redo commit message ==================== Signed-off-by: David S. Miller commit 1323e0c6e1d7e103d59384c3ac50f72b17a6936c Author: Marco Migliore Date: Tue May 16 09:38:54 2023 +0200 net: dsa: mv88e6xxx: Fix mv88e6393x EPC write command offset According to datasheet, the command opcode must be specified into bits [14:12] of the Extended Port Control register (EPC). Fixes: de776d0d316f ("net: dsa: mv88e6xxx: add support for mv88e6393x family") Signed-off-by: Marco Migliore Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 412cd77a2c24b191c65ea53025222418db09817c Author: Christophe JAILLET Date: Mon May 15 21:09:11 2023 +0200 cassini: Fix a memory leak in the error handling path of cas_init_one() cas_saturn_firmware_init() allocates some memory using vmalloc(). This memory is freed in the .remove() function but not it the error handling path of the probe. Add the missing vfree() to avoid a memory leak, should an error occur. Fixes: fcaa40669cd7 ("cassini: use request_firmware") Signed-off-by: Christophe JAILLET Reviewed-by: Pavan Chebbi Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 82b2bc279467c875ec36f8ef820f00997c2a4e8e Author: Kuniyuki Iwashima Date: Mon May 15 11:42:04 2023 -0700 tun: Fix memory leak for detached NAPI queue. syzkaller reported [0] memory leaks of sk and skb related to the TUN device with no repro, but we can reproduce it easily with: struct ifreq ifr = {} int fd_tun, fd_tmp; char buf[4] = {}; fd_tun = openat(AT_FDCWD, "/dev/net/tun", O_WRONLY, 0); ifr.ifr_flags = IFF_TUN | IFF_NAPI | IFF_MULTI_QUEUE; ioctl(fd_tun, TUNSETIFF, &ifr); ifr.ifr_flags = IFF_DETACH_QUEUE; ioctl(fd_tun, TUNSETQUEUE, &ifr); fd_tmp = socket(AF_PACKET, SOCK_PACKET, 0); ifr.ifr_flags = IFF_UP; ioctl(fd_tmp, SIOCSIFFLAGS, &ifr); write(fd_tun, buf, sizeof(buf)); close(fd_tun); If we enable NAPI and multi-queue on a TUN device, we can put skb into tfile->sk.sk_write_queue after the queue is detached. We should prevent it by checking tfile->detached before queuing skb. Note this must be done under tfile->sk.sk_write_queue.lock because write() and ioctl(IFF_DETACH_QUEUE) can run concurrently. Otherwise, there would be a small race window: write() ioctl(IFF_DETACH_QUEUE) `- tun_get_user `- __tun_detach |- if (tfile->detached) |- tun_disable_queue | `-> false | `- tfile->detached = tun | `- tun_queue_purge |- spin_lock_bh(&queue->lock) `- __skb_queue_tail(queue, skb) Another solution is to call tun_queue_purge() when closing and reattaching the detached queue, but it could paper over another problems. Also, we do the same kind of test for IFF_NAPI_FRAGS. [0]: unreferenced object 0xffff88801edbc800 (size 2048): comm "syz-executor.1", pid 33269, jiffies 4295743834 (age 18.756s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 07 40 00 00 00 00 00 00 00 00 00 00 00 00 ...@............ backtrace: [<000000008c16ea3d>] __do_kmalloc_node mm/slab_common.c:965 [inline] [<000000008c16ea3d>] __kmalloc+0x4a/0x130 mm/slab_common.c:979 [<000000003addde56>] kmalloc include/linux/slab.h:563 [inline] [<000000003addde56>] sk_prot_alloc+0xef/0x1b0 net/core/sock.c:2035 [<000000003e20621f>] sk_alloc+0x36/0x2f0 net/core/sock.c:2088 [<0000000028e43843>] tun_chr_open+0x3d/0x190 drivers/net/tun.c:3438 [<000000001b0f1f28>] misc_open+0x1a6/0x1f0 drivers/char/misc.c:165 [<000000004376f706>] chrdev_open+0x111/0x300 fs/char_dev.c:414 [<00000000614d379f>] do_dentry_open+0x2f9/0x750 fs/open.c:920 [<000000008eb24774>] do_open fs/namei.c:3636 [inline] [<000000008eb24774>] path_openat+0x143f/0x1a30 fs/namei.c:3791 [<00000000955077b5>] do_filp_open+0xce/0x1c0 fs/namei.c:3818 [<00000000b78973b0>] do_sys_openat2+0xf0/0x260 fs/open.c:1356 [<00000000057be699>] do_sys_open fs/open.c:1372 [inline] [<00000000057be699>] __do_sys_openat fs/open.c:1388 [inline] [<00000000057be699>] __se_sys_openat fs/open.c:1383 [inline] [<00000000057be699>] __x64_sys_openat+0x83/0xf0 fs/open.c:1383 [<00000000a7d2182d>] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [<00000000a7d2182d>] do_syscall_64+0x3c/0x90 arch/x86/entry/common.c:80 [<000000004cc4e8c4>] entry_SYSCALL_64_after_hwframe+0x72/0xdc unreferenced object 0xffff88802f671700 (size 240): comm "syz-executor.1", pid 33269, jiffies 4295743854 (age 18.736s) hex dump (first 32 bytes): 68 c9 db 1e 80 88 ff ff 68 c9 db 1e 80 88 ff ff h.......h....... 00 c0 7b 2f 80 88 ff ff 00 c8 db 1e 80 88 ff ff ..{/............ backtrace: [<00000000e9d9fdb6>] __alloc_skb+0x223/0x250 net/core/skbuff.c:644 [<000000002c3e4e0b>] alloc_skb include/linux/skbuff.h:1288 [inline] [<000000002c3e4e0b>] alloc_skb_with_frags+0x6f/0x350 net/core/skbuff.c:6378 [<00000000825f98d7>] sock_alloc_send_pskb+0x3ac/0x3e0 net/core/sock.c:2729 [<00000000e9eb3df3>] tun_alloc_skb drivers/net/tun.c:1529 [inline] [<00000000e9eb3df3>] tun_get_user+0x5e1/0x1f90 drivers/net/tun.c:1841 [<0000000053096912>] tun_chr_write_iter+0xac/0x120 drivers/net/tun.c:2035 [<00000000b9282ae0>] call_write_iter include/linux/fs.h:1868 [inline] [<00000000b9282ae0>] new_sync_write fs/read_write.c:491 [inline] [<00000000b9282ae0>] vfs_write+0x40f/0x530 fs/read_write.c:584 [<00000000524566e4>] ksys_write+0xa1/0x170 fs/read_write.c:637 [<00000000a7d2182d>] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [<00000000a7d2182d>] do_syscall_64+0x3c/0x90 arch/x86/entry/common.c:80 [<000000004cc4e8c4>] entry_SYSCALL_64_after_hwframe+0x72/0xdc Fixes: cde8b15f1aab ("tuntap: add ioctl to attach or detach a file form tuntap device") Reported-by: syzkaller Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller commit c1e4f5a411dd354c2ad20deadd56eadb4a461bbc Merge: 6ad85ed0ebf7e 11164bc394593 Author: Marc Kleine-Budde Date: Wed May 17 09:02:43 2023 +0200 Merge patch series "can: kvaser_pciefd: Bug fixes" Jimmy Assarsson says: This patch series contains various bug fixes for the kvaser_pciefd driver. Link: https://lore.kernel.org/r/20230516134318.104279-1-extja@kvaser.com Signed-off-by: Marc Kleine-Budde commit 11164bc39459335ab93c6e99d53b7e4292fba38b Author: Jimmy Assarsson Date: Tue May 16 15:43:18 2023 +0200 can: kvaser_pciefd: Disable interrupts in probe error path Disable interrupts in error path of probe function. Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Cc: stable@vger.kernel.org Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/r/20230516134318.104279-7-extja@kvaser.com Signed-off-by: Marc Kleine-Budde commit 262d7a52ba27525e3c1203230c9f0524e48bbb34 Author: Jimmy Assarsson Date: Tue May 16 15:43:17 2023 +0200 can: kvaser_pciefd: Do not send EFLUSH command on TFD interrupt Under certain circumstances we send two EFLUSH commands, resulting in two EFLUSH ack packets, while only expecting a single EFLUSH ack. This can cause the driver Tx flush completion to get out of sync. To avoid this problem, don't enable the "Transmit buffer flush done" (TFD) interrupt and remove the code handling it. Now we only send EFLUSH command after receiving status packet with "Init detected" (IDET) bit set. Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Cc: stable@vger.kernel.org Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/r/20230516134318.104279-6-extja@kvaser.com Signed-off-by: Marc Kleine-Budde commit c589557dd1426f5adf90c7a919d4fde5a3e4ef64 Author: Jimmy Assarsson Date: Tue May 16 15:43:16 2023 +0200 can: kvaser_pciefd: Empty SRB buffer in probe Empty the "Shared receive buffer" (SRB) in probe, to assure we start in a known state, and don't process any irrelevant packets. Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Cc: stable@vger.kernel.org Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/r/20230516134318.104279-5-extja@kvaser.com Signed-off-by: Marc Kleine-Budde commit 84762d8da89d29ba842317eb842973e628c27391 Author: Jimmy Assarsson Date: Tue May 16 15:43:15 2023 +0200 can: kvaser_pciefd: Call request_irq() before enabling interrupts Make sure the interrupt handler is registered before enabling interrupts. Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Cc: stable@vger.kernel.org Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/r/20230516134318.104279-4-extja@kvaser.com Signed-off-by: Marc Kleine-Budde commit bf7ac55e991ca177f1ac16be51152f1ef291a4df Author: Jimmy Assarsson Date: Tue May 16 15:43:14 2023 +0200 can: kvaser_pciefd: Clear listen-only bit if not explicitly requested The listen-only bit was never cleared, causing the controller to always use listen-only mode, if previously set. Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Cc: stable@vger.kernel.org Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/r/20230516134318.104279-3-extja@kvaser.com Signed-off-by: Marc Kleine-Budde commit aed0e6ca7dbb8fbea9bc69c9ac663d5533c8c5d8 Author: Jimmy Assarsson Date: Tue May 16 15:43:13 2023 +0200 can: kvaser_pciefd: Set CAN_STATE_STOPPED in kvaser_pciefd_stop() Set can.state to CAN_STATE_STOPPED in kvaser_pciefd_stop(). Without this fix, wrong CAN state was repported after the interface was brought down. Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Cc: stable@vger.kernel.org Signed-off-by: Jimmy Assarsson Link: https://lore.kernel.org/r/20230516134318.104279-2-extja@kvaser.com Signed-off-by: Marc Kleine-Budde commit 38de368a66360f1859428d5e191b45bd01c20786 Author: Vinod Koul Date: Tue May 16 23:13:11 2023 +0530 dmaengine: ti: k3-udma: annotate pm function with __maybe_unused We get a warning when PM is not set: ../drivers/dma/ti/k3-udma.c:5552:12: warning: 'udma_pm_resume' defined but not used [-Wunused-function] 5552 | static int udma_pm_resume(struct device *dev) | ^~~~~~~~~~~~~~ ../drivers/dma/ti/k3-udma.c:5530:12: warning: 'udma_pm_suspend' defined but not used [-Wunused-function] 5530 | static int udma_pm_suspend(struct device *dev) | ^~~~~~~~~~~~~~~ Fix this by annotating pm function with __maybe_unused Fixes: fbe05149e40b ("dmaengine: ti: k3-udma: Add system suspend/resume support") Reported-by: Randy Dunlap Signed-off-by: Vinod Koul Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/20230516174311.117264-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit 0642287e3ecdd0d1f88e6a2e63768e16153a990c Author: Harshit Mogalapalli Date: Mon May 8 23:07:16 2023 -0700 dmaengine: idxd: Fix passing freed memory in idxd_cdev_open() Smatch warns: drivers/dma/idxd/cdev.c:327: idxd_cdev_open() warn: 'sva' was already freed. When idxd_wq_set_pasid() fails, the current code unbinds sva and then goes to 'failed_set_pasid' where iommu_sva_unbind_device is called again causing the above warning. [ device_user_pasid_enabled(idxd) is still true when calling failed_set_pasid ] Fix this by removing additional unbind when idxd_wq_set_pasid() fails Fixes: b022f59725f0 ("dmaengine: idxd: add idxd_copy_cr() to copy user completion record during page fault handling") Signed-off-by: Harshit Mogalapalli Acked-by: Fenghua Yu Acked-by: Dave Jiang Link: https://lore.kernel.org/r/20230509060716.2830630-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Vinod Koul commit 212457ccbd60dba34f965e4ffbe62f0e4f970538 Author: Arnd Bergmann Date: Tue May 16 20:34:22 2023 +0200 wifi: b43: fix incorrect __packed annotation clang warns about an unpacked structure inside of a packed one: drivers/net/wireless/broadcom/b43/b43.h:654:4: error: field data within 'struct b43_iv' is less aligned than 'union (unnamed union at /home/arnd/arm-soc/drivers/net/wireless/broadcom/b43/b43.h:651:2)' and is usually due to 'struct b43_iv' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access] The problem here is that the anonymous union has the default alignment from its members, apparently because the original author mixed up the placement of the __packed attribute by placing it next to the struct member rather than the union definition. As the struct itself is also marked as __packed, there is no need to mark its members, so just move the annotation to the inner type instead. As Michael noted, the same problem is present in b43legacy, so change both at the same time. Acked-by: Michael Büsch Reported-by: kernel test robot Reviewed-by: Simon Horman Tested-by: Larry Finger Link: https://lore.kernel.org/oe-kbuild-all/202305160749.ay1HAoyP-lkp@intel.com/ Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230516183442.536589-1-arnd@kernel.org commit cb0ddaaa5db09d7d216fcbf0e68779be223a1128 Author: Martin Blumenstingl Date: Mon May 15 21:50:43 2023 +0200 wifi: rtw88: sdio: Always use two consecutive bytes for word operations The Allwinner sunxi-mmc controller cannot handle word (16 bit) transfers. So and sdio_{read,write}w fails with messages like the following example using an RTL8822BS (but the same problems were also observed with RTL8822CS and RTL8723DS chips): rtw_8822bs mmc1:0001:1: Firmware version 27.2.0, H2C version 13 sunxi-mmc 4021000.mmc: unaligned scatterlist: os f80 length 2 sunxi-mmc 4021000.mmc: map DMA failed rtw_8822bs mmc1:0001:1: sdio read16 failed (0x10230): -22 Use two consecutive single byte accesses for word operations instead. It turns out that upon closer inspection this is also what the vendor driver does, even though it does have support for sdio_{read,write}w. So we can conclude that the rtw88 chips do support word access but only on SDIO controllers that also support it. Since there's no way to detect if the controller supports word access or not the rtw88 sdio driver switches to the easiest approach: avoiding word access. Reported-by: Larry Finger Closes: https://lore.kernel.org/linux-wireless/527585e5-9cdd-66ed-c3af-6da162f4b720@lwfinger.net/ Reported-by: Rudi Heitbaum Link: https://github.com/LibreELEC/LibreELEC.tv/pull/7837#issue-1708469467 Fixes: 65371a3f14e7 ("wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets") Reviewed-by: Ping-Ke Shih Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230515195043.572375-1-martin.blumenstingl@googlemail.com commit 6ad85ed0ebf7ece0f376950a6b3b3c6048093d35 Merge: 47d55c62bdb9c 8680407b6f8f5 Author: Jakub Kicinski Date: Tue May 16 20:52:34 2023 -0700 Merge tag 'ipsec-2023-05-16' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2023-05-16 1) Don't check the policy default if we have an allow policy. Fix from Sabrina Dubroca. 2) Fix netdevice refount usage on offload. From Leon Romanovsky. 3) Use netdev_put instead of dev_puti to correctly release the netdev on failure in xfrm_dev_policy_add. From Leon Romanovsky. 4) Revert "Fix XFRM-I support for nested ESP tunnels" This broke Netfilter policy matching. From Martin Willi. 5) Reject optional tunnel/BEET mode templates in outbound policies on netlink and pfkey sockets. From Tobias Brunner. 6) Check if_id in inbound policy/secpath match to make it symetric to the outbound codepath. From Benedict Wong. * tag 'ipsec-2023-05-16' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec: xfrm: Check if_id in inbound policy/secpath match af_key: Reject optional tunnel/BEET mode templates in outbound policies xfrm: Reject optional tunnel/BEET mode templates in outbound policies Revert "Fix XFRM-I support for nested ESP tunnels" xfrm: Fix leak of dev tracker xfrm: release all offloaded policy memory xfrm: don't check the default policy if the policy allows the packet ==================== Link: https://lore.kernel.org/r/20230516052405.2677554-1-steffen.klassert@secunet.com Signed-off-by: Jakub Kicinski commit 47d55c62bdb9ce55283243f61b0575d4a9ce3744 Merge: d6352dae0903f c08e24013aba4 Author: Jakub Kicinski Date: Tue May 16 20:49:42 2023 -0700 Merge tag 'linux-can-fixes-for-6.4-20230515' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2023-05-15 The first 2 patches are by Oliver Hartkopp and allow the MSG_CMSG_COMPAT flag for isotp and j1939. The next patch is by Oliver Hartkopp, too and adds missing CAN XL support in can_put_echo_skb(). Geert Uytterhoeven's patch let's the bxcan driver depend on ARCH_STM32. The last 5 patches are from Dario Binacchi and also affect the bxcan driver. The bxcan driver hit mainline with v6.4-rc1 and was originally written for IP cores containing 2 CAN interfaces with shared resources. Dario's series updates the DT bindings and driver to support IP cores with a single CAN interface instance as well as adding the bxcan to the stm32f746's device tree. * tag 'linux-can-fixes-for-6.4-20230515' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: ARM: dts: stm32: add CAN support on stm32f746 can: bxcan: add support for single peripheral configuration ARM: dts: stm32: add pin map for CAN controller on stm32f7 ARM: dts: stm32f429: put can2 in secondary mode dt-bindings: net: can: add "st,can-secondary" property can: CAN_BXCAN should depend on ARCH_STM32 can: dev: fix missing CAN XL support in can_put_echo_skb() can: j1939: recvmsg(): allow MSG_CMSG_COMPAT flag can: isotp: recvmsg(): allow MSG_CMSG_COMPAT flag ==================== Link: https://lore.kernel.org/r/20230515204722.1000957-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit d6352dae0903fe8beae4c007dc320e9e9f1fed45 Author: Ido Schimmel Date: Mon May 15 19:29:25 2023 +0300 devlink: Fix crash with CONFIG_NET_NS=n '__net_initdata' becomes a no-op with CONFIG_NET_NS=y, but when this option is disabled it becomes '__initdata', which means the data can be freed after the initialization phase. This annotation is obviously incorrect for the devlink net device notifier block which is still registered after the initialization phase [1]. Fix this crash by removing the '__net_initdata' annotation. [1] general protection fault, probably for non-canonical address 0xcccccccccccccccc: 0000 [#1] PREEMPT SMP CPU: 3 PID: 117 Comm: (udev-worker) Not tainted 6.4.0-rc1-custom-gdf0acdc59b09 #64 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-1.fc37 04/01/2014 RIP: 0010:notifier_call_chain+0x58/0xc0 [...] Call Trace: dev_set_mac_address+0x85/0x120 dev_set_mac_address_user+0x30/0x50 do_setlink+0x219/0x1270 rtnl_setlink+0xf7/0x1a0 rtnetlink_rcv_msg+0x142/0x390 netlink_rcv_skb+0x58/0x100 netlink_unicast+0x188/0x270 netlink_sendmsg+0x214/0x470 __sys_sendto+0x12f/0x1a0 __x64_sys_sendto+0x24/0x30 do_syscall_64+0x38/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: e93c9378e33f ("devlink: change per-devlink netdev notifier to static one") Reported-by: Marek Szyprowski Closes: https://lore.kernel.org/netdev/600ddf9e-589a-2aa0-7b69-a438f833ca10@samsung.com/ Tested-by: Marek Szyprowski Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230515162925.1144416-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit 09e797c8641f6ad435c33ae24c223351197ea29a Author: Wenchao Hao Date: Mon May 15 15:01:56 2023 +0800 scsi: core: Decrease scsi_device's iorequest_cnt if dispatch failed If scsi_dispatch_cmd() failed, the SCSI command was not sent to the target, scsi_queue_rq() would return BLK_STS_RESOURCE and the related request would be requeued. The timeout of this request would not fire, no one would increase iodone_cnt. The above flow would result the iodone_cnt smaller than iorequest_cnt. So decrease the iorequest_cnt if dispatch failed to workaround the issue. Signed-off-by: Wenchao Hao Reported-by: Ming Lei Closes: https://lore.kernel.org/r/ZF+zB+bB7iqe0wGd@ovpn-8-17.pek2.redhat.com Link: https://lore.kernel.org/r/20230515070156.1790181-3-haowenchao2@huawei.com Reviewed-by: Ming Lei Signed-off-by: Martin K. Petersen commit 6ca9818d1624e136a76ae8faedb6b6c95ca66903 Author: Wenchao Hao Date: Mon May 15 15:01:55 2023 +0800 scsi: Revert "scsi: core: Do not increase scsi_device's iorequest_cnt if dispatch failed" The "atomic_inc(&cmd->device->iorequest_cnt)" in scsi_queue_rq() would cause kernel panic because cmd->device may be freed after returning from scsi_dispatch_cmd(). This reverts commit cfee29ffb45b1c9798011b19d454637d1b0fe87d. Signed-off-by: Wenchao Hao Reported-by: Ming Lei Closes: https://lore.kernel.org/r/ZF+zB+bB7iqe0wGd@ovpn-8-17.pek2.redhat.com Link: https://lore.kernel.org/r/20230515070156.1790181-2-haowenchao2@huawei.com Reviewed-by: Ming Lei Signed-off-by: Martin K. Petersen commit 4e81a6cba517cb33584308a331f14f5e3fec369b Author: Michael Kelley Date: Mon May 15 10:20:41 2023 -0700 scsi: storvsc: Don't pass unused PFNs to Hyper-V host In a SCSI request, storvsc pre-allocates space for up to MAX_PAGE_BUFFER_COUNT physical frame numbers to be passed to Hyper-V. If the size of the I/O request requires more PFNs, a separate memory area of exactly the correct size is dynamically allocated. But when the pre-allocated area is used, current code always passes MAX_PAGE_BUFFER_COUNT PFNs to Hyper-V, even if fewer are needed. While this doesn't break anything because the additional PFNs are always zero, more bytes than necessary are copied into the VMBus channel ring buffer. This takes CPU cycles and wastes space in the ring buffer. For a typical 4 Kbyte I/O that requires only a single PFN, 248 unnecessary bytes are copied. Fix this by setting the payload_sz based on the actual number of PFNs required, not the size of the pre-allocated space. Reported-by: John Starks Fixes: 8f43710543ef ("scsi: storvsc: Support PAGE_SIZE larger than 4K") Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/1684171241-16209-1-git-send-email-mikelley@microsoft.com Signed-off-by: Martin K. Petersen commit 8b271370e963370703819bd9795a54d658071bed Author: Matthias Kaehlcke Date: Tue May 16 16:46:30 2023 +0000 ASoC: rt5682: Disable jack detection interrupt during suspend The rt5682 driver switches its regmap to cache-only when the device suspends and back to regular mode on resume. When the jack detect interrupt fires rt5682_irq() schedules the jack detect work. This can result in invalid reads from the regmap in cache-only mode if the work runs before the device has resumed: [ 56.245502] rt5682 9-001a: ASoC: error at soc_component_read_no_lock on rt5682.9-001a for register: [0x000000f0] -16 Disable the jack detection interrupt during suspend and re-enable it on resume. The driver already schedules the jack detection work on resume, so any state change during suspend is still handled. This is essentially the same as commit f7d00a9be147 ("SoC: rt5682s: Disable jack detection interrupt during suspend") for the rt5682s. Cc: stable@kernel.org Signed-off-by: Matthias Kaehlcke Date: Thu May 11 16:55:32 2023 +0530 ASoC: lpass: Fix for KASAN use_after_free out of bounds When we run syzkaller we get below Out of Bounds error. "KASAN: slab-out-of-bounds Read in regcache_flat_read" Below is the backtrace of the issue: BUG: KASAN: slab-out-of-bounds in regcache_flat_read+0x10c/0x110 Read of size 4 at addr ffffff8088fbf714 by task syz-executor.4/14144 CPU: 6 PID: 14144 Comm: syz-executor.4 Tainted: G W Hardware name: Qualcomm Technologies, Inc. sc7280 CRD platform (rev5+) (DT) Call trace: dump_backtrace+0x0/0x4ec show_stack+0x34/0x50 dump_stack_lvl+0xdc/0x11c print_address_description+0x30/0x2d8 kasan_report+0x178/0x1e4 __asan_report_load4_noabort+0x44/0x50 regcache_flat_read+0x10c/0x110 regcache_read+0xf8/0x5a0 _regmap_read+0x45c/0x86c _regmap_update_bits+0x128/0x290 regmap_update_bits_base+0xc0/0x15c snd_soc_component_update_bits+0xa8/0x22c snd_soc_component_write_field+0x68/0xd4 tx_macro_put_dec_enum+0x1d0/0x268 snd_ctl_elem_write+0x288/0x474 By Error checking and checking valid values issue gets rectifies. Signed-off-by: Ravulapati Vishnu Vardhan Rao Date: Thu May 4 23:44:51 2023 +0800 scsi: ufs: core: Fix MCQ nr_hw_queues Since MAXQ is 0-based value, add one to obtain number of hardware queues. Signed-off-by: Po-Wen Kao Link: https://lore.kernel.org/r/20230504154454.26654-4-powen.kao@mediatek.com Reviewed-by: Bean Huo Reviewed-by: Manivannan Sadhasivam Reviewed-by: Bart Van Assche Reviewed-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 06caeb536b2b21668efd2d6fa97c09461957b3a7 Author: Po-Wen Kao Date: Thu May 4 23:44:50 2023 +0800 scsi: ufs: core: Rename symbol sizeof_utp_transfer_cmd_desc() Naming the functions after standard operators like sizeof() may cause confusion. Rename it to ufshcd_get_ucd_size(). Signed-off-by: Po-Wen Kao Link: https://lore.kernel.org/r/20230504154454.26654-3-powen.kao@mediatek.com Suggested-by: Manivannan Sadhasivam Reviewed-by: Stanley Chu Reviewed-by: Ziqi Chen Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 5149452ca66289ef33d13897ee845a2f6f5b680f Author: Po-Wen Kao Date: Thu May 4 23:44:49 2023 +0800 scsi: ufs: core: Fix MCQ tag calculation The transfer command descriptor is allocated in ufshcd_memory_alloc() and referenced by the transfer request descriptor with stride size sizeof_utp_transfer_cmd_desc() instead of sizeof(struct utp_transfer_cmd_desc). Consequently, computing tag by address offset should also refer to the same stride. Signed-off-by: Po-Wen Kao Link: https://lore.kernel.org/r/20230504154454.26654-2-powen.kao@mediatek.com Reviewed-by: Bart Van Assche Reviewed-by: Manivannan Sadhasivam Reviewed-by: Stanley Chu Reviewed-by: Ziqi Chen Signed-off-by: Martin K. Petersen commit 866422cdddcdf59d8c68e9472d49ba1be29b5fcf Author: Yonatan Nachum Date: Thu May 11 11:51:03 2023 +0000 RDMA/efa: Fix unsupported page sizes in device Device uses 4KB size blocks for user pages indirect list while the driver creates those blocks with the size of PAGE_SIZE of the kernel. On kernels with PAGE_SIZE different than 4KB (ARM RHEL), this leads to a failure on register MR with indirect list because of the miss communication between driver and device. Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation") Link: https://lore.kernel.org/r/20230511115103.13876-1-ynachum@amazon.com Reviewed-by: Firas Jahjah Reviewed-by: Michael Margolin Signed-off-by: Yonatan Nachum Signed-off-by: Jason Gunthorpe commit b5f3fe27c54b1fe77d4dd834ccd48a6d694f872e Author: Guoqing Jiang Date: Wed May 10 11:50:56 2023 +0800 RDMA/rxe: Convert spin_{lock_bh,unlock_bh} to spin_{lock_irqsave,unlock_irqrestore} We need to call spin_lock_irqsave()/spin_unlock_irqrestore() for state_lock in rxe, otherwsie the callchain: ib_post_send_mad -> spin_lock_irqsave -> ib_post_send -> rxe_post_send -> spin_lock_bh -> spin_unlock_bh -> spin_unlock_irqrestore Causes below traces during run block nvmeof-mp/001 test due to mismatched spinlock nesting: WARNING: CPU: 0 PID: 94794 at kernel/softirq.c:376 __local_bh_enable_ip+0xc2/0x140 [ ... ] CPU: 0 PID: 94794 Comm: kworker/u4:1 Tainted: G E 6.4.0-rc1 #9 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.15.0-0-g2dd4b9b-rebuilt.opensuse.org 04/01/2014 Workqueue: rdma_cm cma_work_handler [rdma_cm] RIP: 0010:__local_bh_enable_ip+0xc2/0x140 Code: 48 85 c0 74 72 5b 41 5c 5d 31 c0 89 c2 89 c1 89 c6 89 c7 41 89 c0 e9 bd 0e 11 01 65 8b 05 f2 65 72 48 85 c0 0f 85 76 ff ff ff <0f> 0b e9 6f ff ff ff e8 d2 39 1c 00 eb 80 4c 89 e7 e8 68 ad 0a 00 RSP: 0018:ffffb7cf818539f0 EFLAGS: 00010046 RAX: 0000000000000000 RBX: 0000000000000201 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000201 RDI: ffffffffc0f25f79 RBP: ffffb7cf81853a00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffc0f25f79 R13: ffff8db1f0fa6000 R14: ffff8db2c63ff000 R15: 00000000000000e8 FS: 0000000000000000(0000) GS:ffff8db33bc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000559758db0f20 CR3: 0000000105124000 CR4: 00000000003506f0 Call Trace: _raw_spin_unlock_bh+0x31/0x40 rxe_post_send+0x59/0x8b0 [rdma_rxe] ib_send_mad+0x26b/0x470 [ib_core] ib_post_send_mad+0x150/0xb40 [ib_core] ? cm_form_tid+0x5b/0x90 [ib_cm] ib_send_cm_req+0x7c8/0xb70 [ib_cm] rdma_connect_locked+0x433/0x940 [rdma_cm] nvme_rdma_cm_handler+0x5d7/0x9c0 [nvme_rdma] cma_cm_event_handler+0x4f/0x170 [rdma_cm] cma_work_handler+0x6a/0xe0 [rdma_cm] process_one_work+0x2a9/0x580 worker_thread+0x52/0x3f0 ? __pfx_worker_thread+0x10/0x10 kthread+0x109/0x140 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2c/0x50 raw_local_irq_restore() called with IRQs enabled WARNING: CPU: 0 PID: 94794 at kernel/locking/irqflag-debug.c:10 warn_bogus_irq_restore+0x37/0x60 [ ... ] CPU: 0 PID: 94794 Comm: kworker/u4:1 Tainted: G W E 6.4.0-rc1 #9 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.15.0-0-g2dd4b9b-rebuilt.opensuse.org 04/01/2014 Workqueue: rdma_cm cma_work_handler [rdma_cm] RIP: 0010:warn_bogus_irq_restore+0x37/0x60 Code: fb 01 77 36 83 e3 01 74 0e 48 8b 5d f8 c9 31 f6 89 f7 e9 ac ea 01 00 48 c7 c7 e0 52 33 b9 c6 05 bb 1c 69 01 01 e8 39 24 f0 fe <0f> 0b 48 8b 5d f8 c9 31 f6 89 f7 e9 89 ea 01 00 0f b6 f3 48 c7 c7 RSP: 0018:ffffb7cf81853a58 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffb7cf81853a60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8db2cfb1a9e8 R13: ffff8db2cfb1a9d8 R14: ffff8db2c63ff000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8db33bc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000559758db0f20 CR3: 0000000105124000 CR4: 00000000003506f0 Call Trace: _raw_spin_unlock_irqrestore+0x91/0xa0 ib_send_mad+0x1e3/0x470 [ib_core] ib_post_send_mad+0x150/0xb40 [ib_core] ? cm_form_tid+0x5b/0x90 [ib_cm] ib_send_cm_req+0x7c8/0xb70 [ib_cm] rdma_connect_locked+0x433/0x940 [rdma_cm] nvme_rdma_cm_handler+0x5d7/0x9c0 [nvme_rdma] cma_cm_event_handler+0x4f/0x170 [rdma_cm] cma_work_handler+0x6a/0xe0 [rdma_cm] process_one_work+0x2a9/0x580 worker_thread+0x52/0x3f0 ? __pfx_worker_thread+0x10/0x10 kthread+0x109/0x140 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2c/0x50 Fixes: f605f26ea196 ("RDMA/rxe: Protect QP state with qp->state_lock") Link: https://lore.kernel.org/r/20230510035056.881196-1-guoqing.jiang@linux.dev Signed-off-by: Guoqing Jiang Reviewed-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 95339f40a8b652b5b1773def31e63fc53c26378a Author: Mario Limonciello Date: Tue May 16 13:25:40 2023 -0500 power: supply: Fix logic checking if system is running from battery The logic used for power_supply_is_system_supplied() counts all power supplies and assumes that the system is running from AC if there is either a non-battery power-supply reporting to be online or if no power-supplies exist at all. The second rule is for desktop systems, that don't have any battery/charger devices. These systems will incorrectly report to be powered from battery once a device scope power-supply is registered (e.g. a HID device), since these power-supplies increase the counter. Apart from HID devices, recent dGPUs provide UCSI power supplies on a desktop systems. The dGPU by default doesn't have anything plugged in so it's 'offline'. This makes power_supply_is_system_supplied() return 0 with a count of 1 meaning all drivers that use this get a wrong judgement. To fix this case adjust the logic to also examine the scope of the power supply. If the power supply is deemed a device power supply, then don't count it. Cc: Evan Quan Suggested-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Sebastian Reichel commit 17eabd6a044b57b2c1b5459eb9d11af3ea909e63 Author: Bob Pearson Date: Mon May 15 15:10:57 2023 -0500 RDMA/rxe: Fix double unlock in rxe_qp.c A recent patch can cause a double spin_unlock_bh() in rxe_qp_to_attr() at line 715 in rxe_qp.c. Move the 2nd unlock into the if statement. Fixes: f605f26ea196 ("RDMA/rxe: Protect QP state with qp->state_lock") Link: https://lore.kernel.org/r/20230515201056.1591140-1-rpearsonhpe@gmail.com Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/27773078-40ce-414f-8b97-781954da9f25@kili.mountain Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit bd415b5c9552d44069d4e7c1e018b6d42f25af9e Author: Randy Dunlap Date: Sun May 7 22:59:28 2023 -0700 Documentation/filesystems: ramfs-rootfs-initramfs: use :Author: Use the :Author: markup instead of making it a chapter heading. This cleans up the table of contents for this file. Fixes: 7f46a240b0a1 ("[PATCH] ramfs, rootfs, and initramfs docs") Signed-off-by: Randy Dunlap Cc: Rob Landley Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20230508055928.3548-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 7b38ecfdf9fbb133b4d2ea3738c02291a262abe2 Author: Randy Dunlap Date: Sun May 7 22:59:38 2023 -0700 Documentation/filesystems: sharedsubtree: add section headings Several of the sections are missing underlines. This makes the generated contents have missing entries, so add the underlines. Fixes: 16c01b20ae05 ("doc/filesystems: more mount cleanups") Fixes: 9cfcceea8f7e ("[PATCH] Complete description of shared subtrees.") Signed-off-by: Randy Dunlap Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20230508055938.6550-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 0d8aa3212e042bfcb7011e4de841dfdea39dc4b7 Author: Thorsten Leemhuis Date: Mon May 15 10:52:19 2023 +0200 docs: quickly-build-trimmed-linux: various small fixes and improvements * improve the short description of localmodconfig in the step-by-step guide while fixing its broken first sentence * briefly mention immutable Linux distributions * use '--shallow-exclude=v6.0' throughout the document * instead of "git reset --hard; git checkout ..." use "git checkout --force ..." in the step-by-step guide: this matches the TLDR and is one command less to execute. This led to a few small adjustments to the text and the flow in the surrounding area. * fix two thinkos in the section explaining full git clones Signed-off-by: Thorsten Leemhuis Link: https://lore.kernel.org/r/6f4684b9a5d11d3adb04e0af3cfc60db8b28eeb2.1684140700.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit 96e3cc270d61cb9945b1c2894effcba15010f097 Author: Randy Dunlap Date: Mon May 15 17:15:18 2023 -0700 Documentation: use capitalization for chapters and acronyms Use capital letters in acronyms for CD-ROM, FPGA, and PCMCIA. Use capital letter in the first word of chapter headings for Locking, Timers, and "Brief tutorial on CRC computation". Signed-off-by: Randy Dunlap Cc: Moritz Fischer Cc: Wu Hao Cc: Tom Rix Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Cc: Boqun Feng Cc: Dominik Brodowski Cc: Thomas Gleixner Acked-by: Xu Yilun Reviewed-by: Phillip Potter Link: https://lore.kernel.org/r/20230516001518.14514-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 3b44ec8c5c44790a82f07e90db45643c762878c6 Author: Takashi Iwai Date: Tue May 16 20:44:12 2023 +0200 ALSA: hda: Fix Oops by 9.1 surround channel names get_line_out_pfx() may trigger an Oops by overflowing the static array with more than 8 channels. This was reported for MacBookPro 12,1 with Cirrus codec. As a workaround, extend for the 9.1 channels and also fix the potential Oops by unifying the code paths accessing the same array with the proper size check. Reported-by: Olliver Schinagl Cc: Link: https://lore.kernel.org/r/64d95eb0-dbdb-cff8-a8b1-988dc22b24cd@schinagl.nl Link: https://lore.kernel.org/r/20230516184412.24078-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit b633896314c0f78f2b4eb7b19a530d68f2a35445 Author: Arnaldo Carvalho de Melo Date: Tue May 16 15:27:50 2023 -0300 tools headers UAPI: Sync s390 syscall table file that wires up the memfd_secret syscall To pick the changes in these csets: 7608f70adcb1ea69 ("s390: wire up memfd_secret system call") That add support for this new syscall in tools such as 'perf trace'. For instance, this is now possible (adapted from the x86_64 test output): # perf trace -v -e memfd_secret event qualifier tracepoint filter: (common_pid != 13375 && common_pid != 3713) && (id == 447) ^C# That is the filter expression attached to the raw_syscalls:sys_{enter,exit} tracepoints. $ grep memfd_secret tools/perf/arch/x86/entry/syscalls/syscall_64.tbl 447 common memfd_secret sys_memfd_secret $ This addresses this perf build warnings: Warning: Kernel ABI header at 'tools/perf/arch/s390/entry/syscalls/syscall.tbl' differs from latest version at 'arch/s390/kernel/syscalls/syscall.tbl' diff -u tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl Cc: Adrian Hunter Cc: Heiko Carstens Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Vasily Gorbik Link: https://lore.kernel.org/lkml/ZGPMW0p++D1Jdvf6@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 71852cd8825077d2d90466ac34d3b94e0be3bfae Author: Arnaldo Carvalho de Melo Date: Tue May 16 15:23:47 2023 -0300 tools headers UAPI: Sync linux/prctl.h with the kernel sources ddc65971bb677aa9 ("prctl: add PR_GET_AUXV to copy auxv to userspace") To pick the changes in: That don't result in any changes in tooling: $ tools/perf/trace/beauty/prctl_option.sh > before $ cp include/uapi/linux/prctl.h tools/include/uapi/linux/prctl.h $ tools/perf/trace/beauty/prctl_option.sh > after $ diff -u before after $ This actually adds a new prctl arg, but it has to be dealt with differently, as it is not in sequence with the other arguments. Just silences this perf tools build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/prctl.h' differs from latest version at 'include/uapi/linux/prctl.h' diff -u tools/include/uapi/linux/prctl.h include/uapi/linux/prctl.h Signed-off-by: Arnaldo Carvalho de Melo commit 9dde12767aa19696a7fb28b2320119b87fb9d299 Author: Ian Rogers Date: Mon May 15 15:45:30 2023 -0700 perf metrics: Avoid segv with --topdown for metrics without a group Some metrics may not have a metric_group which can result in segvs with "perf stat --topdown". Add a condition for the no metric_group case. Fixes: 1647cd5b8802698f ("perf stat: Implement --topdown using json metrics") Reported-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230515224530.671331-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit cc638dba23266897c80b9bc87f33de44565fab38 Merge: 9dc68a4fe7089 9be0b3a0074a6 Author: Takashi Iwai Date: Tue May 16 20:11:50 2023 +0200 Merge tag 'asoc-fix-v6.4-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.4 More fixes that came in since the merge window, the bulk of which are for the SOF code, I suspect as a result of the wide usage, active development and large code size rather than huge quality problems. There's also a couple of MAINTAINERS updates and some new device quirks. commit a820ca1a739b7e3ee0ddb48bdfa3c09dc7cd4302 Author: Andrii Nakryiko Date: Mon May 15 17:17:18 2023 -0700 samples/bpf: Drop unnecessary fallthrough __fallthrough is now not supported. Instead of renaming it to now-canonical ([0]) fallthrough pseudo-keyword, just get rid of it and equate 'h' case to default case, as both emit usage information and succeed. [0] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20230516001718.317177-1-andrii@kernel.org commit 098abbd48ec1accf111dde50a2a5392f2a15f59c Author: Zhengchao Shao Date: Mon May 15 17:22:27 2023 +0800 mac80211_hwsim: fix memory leak in hwsim_new_radio_nl When parse_pmsr_capa failed in hwsim_new_radio_nl, the memory resources applied for by pmsr_capa are not released. Add release processing to the incorrect path. Fixes: 92d13386ec55 ("mac80211_hwsim: add PMSR capability support") Reported-by: syzbot+904ce6fbb38532d9795c@syzkaller.appspotmail.com Signed-off-by: Zhengchao Shao Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230515092227.2691437-1-shaozhengchao@huawei.com Signed-off-by: Johannes Berg commit a8938bc881d2a03f9b77f19fae924fe798a01285 Author: Ariel Malamud Date: Sun May 14 12:15:55 2023 +0300 wifi: iwlwifi: mvm: Add locking to the rate read flow The rs_drv_get_rate flow reads the lq_sta to return the optimal rate for tx frames. This read flow is not protected thereby leaving a small window, a few instructions wide, open to contention by an asynchronous rate update. Indeed this race condition was hit and the update occurred in the middle of the read. Fix this by locking the lq_sta struct during read. Signed-off-by: Ariel Malamud Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230514120631.b52c9ed5c379.I15290b78e0d966c1b68278263776ca9de841d5fe@changeid Signed-off-by: Johannes Berg commit 207be64f4e60bf5de13fc69fcf7fe2441bf71a97 Author: Miri Korenblit Date: Sun May 14 12:15:54 2023 +0300 wifi: iwlwifi: Don't use valid_links to iterate sta links This bitmap equals to zero when in a non-MLO mode, and then we won't be iterating on any link. Use for_each_sta_active_link() instead, as it handles also the case of non-MLO mode. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230514120631.f32a8c08730a.Ib02248cd0b7f2bc885f91005c3c110dd027f9dcd@changeid Signed-off-by: Johannes Berg commit 682b6dc29d98e857e6ca4bbc077c7dc2899b7473 Author: Johannes Berg Date: Sun May 14 12:15:53 2023 +0300 wifi: iwlwifi: mvm: don't trust firmware n_channels If the firmware sends us a corrupted MCC response with n_channels much larger than the command response can be, we might copy far too much (uninitialized) memory and even crash if the n_channels is large enough to make it run out of the one page allocated for the FW response. Fix that by checking the lengths. Doing a < comparison would be sufficient, but the firmware should be doing it correctly, so check more strictly. Fixes: dcaf9f5ecb6f ("iwlwifi: mvm: add MCC update FW API") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230514120631.d7b233139eb4.I51fd319df8e9d41881fc8450e83d78049518a79a@changeid Signed-off-by: Johannes Berg commit d0246a0e49efee0f8649d0e4f2350614cdfe6565 Author: Alon Giladi Date: Sun May 14 12:15:52 2023 +0300 wifi: iwlwifi: mvm: fix OEM's name in the tas approved list Fix a spelling mistake. Fixes: 2856f623ce48 ("iwlwifi: mvm: Add list of OEMs allowed to use TAS") Signed-off-by: Alon Giladi Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230514120631.4090de6d1878.If9391ef6da78f1b2cc5eb6cb8f6965816bb7a7f5@changeid Signed-off-by: Johannes Berg commit eca7296d9a671e9961834d2ace9cc0ce21fc15b3 Author: Alon Giladi Date: Sun May 14 12:15:51 2023 +0300 wifi: iwlwifi: fix OEM's name in the ppag approved list Fix a spelling mistake. Fixes: e8e10a37c51c ("iwlwifi: acpi: move ppag code from mvm to fw/acpi") Signed-off-by: Alon Giladi Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230514120631.fdd07f36a8bf.I223e5fb16ab5c95d504c3fdaffd0bd70affad1c2@changeid Signed-off-by: Johannes Berg commit e234c36290430a833aa87532a7740fef031c2c85 Author: Mukesh Sisodiya Date: Sun May 14 12:15:50 2023 +0300 wifi: iwlwifi: mvm: fix initialization of a return value In iwl_mvm_mld_update_sta(), if the flow doesn't enter for_each_sta_active_link(), the default value is returned. Set this default to -EINVAL instead of 0 to better reflect this. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230514120631.98b7e3aacf0b.I2fc274dd7e374ef7fac8e26d71c9cd73323da665@changeid Signed-off-by: Johannes Berg commit 6818266283d191549afa87ac5d7b86635a5fb105 Author: Gregory Greenman Date: Sun May 14 12:15:49 2023 +0300 wifi: iwlwifi: mvm: fix access to fw_id_to_mac_id RCU protected fw_id_to_mac_id can be initialized with either an error code or NULL. Thus, after dereferencing need to check the value with IS_ERR_OR_NULL() and not only that it is not NULL. Fix it. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230514120631.ec5f2880e81c.Ifa8c0f451df2835bde800f5c3670cc46238a3bd8@changeid Signed-off-by: Johannes Berg commit d3ae69180bbd74bcbc03a2b6d10ed7eccbe98c23 Author: Johannes Berg Date: Sun May 14 12:15:48 2023 +0300 wifi: iwlwifi: fw: fix DBGI dump The DBGI dump is (unsurprisingly) of type DBGI, not SRAM. This leads to bad register accesses because the union is built differently, there's no allocation ID, and thus the allocation ID ends up being 0x8000. Note that this was already wrong for DRAM vs. SMEM since they use different parts of the union, but the allocation ID is at the same place, so it worked. Fix all of this but set the allocation ID in a way that the offset calculation ends up without any offset. Fixes: 34bc27783a31 ("iwlwifi: yoyo: fix DBGI_SRAM ini dump header.") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230514120631.19a302ae4c65.I12272599f7c1930666157b9d5e7f81fe9ec4c421@changeid Signed-off-by: Johannes Berg commit 204bfec9168ddd869a05e7f70dc5b0a9ae513722 Author: Johannes Berg Date: Sun May 14 12:15:47 2023 +0300 wifi: iwlwifi: mvm: fix number of concurrent link checks The concurrent link checks need to correctly differentiate between AP and non-AP, fix that. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230514120631.992b2f981ef6.I7d386c19354e9be39c4822f436dd22c93422b660@changeid Signed-off-by: Johannes Berg commit c2d8b7f257b2398f2d866205365895e038beca12 Author: Johannes Berg Date: Sun May 14 12:15:46 2023 +0300 wifi: iwlwifi: mvm: fix cancel_delayed_work_sync() deadlock Lockdep points out that we can deadlock here by calling cancel_delayed_work_sync() because that might be already running and gotten interrupted by the NAPI soft-IRQ. Even just calling something that can sleep is wrong in this context though. Luckily, it doesn't even really matter since the things we need to do are idempotent, so just drop the _sync(). Fixes: e5d153ec54f0 ("iwlwifi: mvm: fix CSA AP side") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230514120631.b1813c823b4d.I9d20cc06d24fa40b6774d3dd95ea5e2bf8dd015b@changeid Signed-off-by: Johannes Berg commit 9e949dfdc5d1697ccbcc19c06f5133e1833d8eea Author: Johannes Berg Date: Sun May 14 12:15:45 2023 +0300 wifi: iwlwifi: mvm: don't double-init spinlock We don't need to (and shouldn't) initialize the spinlock during HW restart that was already initialized, so move that into the correct if block. Since then we have two consecutive if statements with the same (though inverted) condition, unify those as well. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230514120631.221c22cfdf4e.I2e30113ef4bd8cb5bd9e1a69e52a95671914961c@changeid Signed-off-by: Johannes Berg commit 783336b05f06821c9af3b057ecd5a7aa082ed973 Author: Johannes Berg Date: Sun May 14 12:15:44 2023 +0300 wifi: iwlwifi: mvm: always free dup_data There are some assertions in the STA removal code that can fail, and in that case we may leak memory since we skip the freeing. Fix this by freeing the dup_data earlier in the function, we already have a check for when we free the station, and this we don't need to do it with and without MLD API, so it's a win all around. Fixes: a571f5f635ef ("iwlwifi: mvm: add duplicate packet detection per rx queue") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230514120631.173938681d72.Iff4b55fc52943825d6e3e28d78a24b155ea5cd22@changeid Signed-off-by: Johannes Berg commit 04312de4ced4b152749614e8179f3978a20a992f Author: Johannes Berg Date: Thu May 4 16:45:04 2023 +0300 wifi: mac80211: recalc chanctx mindef before assigning When we allocate a new channel context, or find an existing one that is compatible, we currently assign it to a link before its mindef is updated. This leads to strange situations, especially in link switching where you switch to an 80 MHz link and expect it to be active immediately, but the mindef is still configured to 20 MHz while assigning. Also, it's strange that the chandef passed to the assign method's argument is wider than the one in the context. Fix this by calculating the mindef with the new link considered before calling the driver. In particular, this fixes an iwlwifi problem during link switch where the firmware would assert because the (link) station that was added for the AP is configured to transmit at a bandwidth that's wider than the channel context that it's configured on. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230504134511.828474-5-gregory.greenman@intel.com Signed-off-by: Johannes Berg commit b72a455a2409fd94d6d9b4eb51d659a88213243b Author: Johannes Berg Date: Thu May 4 16:45:03 2023 +0300 wifi: mac80211: consider reserved chanctx for mindef When a chanctx is reserved for a new vif and we recalculate the minimal definition for it, we need to consider the new interface it's being reserved for before we assign it, so it can be used directly with the correct min channel width. Fix the code to - optionally - consider that, and use that option just before doing the reassignment. Also, when considering channel context reservations, we should only consider the one link we're currently working with. Change the boolean argument to a link pointer to do that. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230504134511.828474-4-gregory.greenman@intel.com Signed-off-by: Johannes Berg commit 860e1b43da94551cd1e73adc36b3c64cc3e5dc01 Author: Johannes Berg Date: Thu May 4 16:45:02 2023 +0300 wifi: mac80211: simplify chanctx allocation There's no need to call ieee80211_recalc_chanctx_min_def() since it cannot and won't call the driver anyway; just use _ieee80211_recalc_chanctx_min_def() instead. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230504134511.828474-3-gregory.greenman@intel.com Signed-off-by: Johannes Berg commit a23d7f5b2fbda114de60c4b53311e052281d7533 Author: Michael Lee Date: Thu May 4 16:04:41 2023 +0800 wifi: mac80211: Abort running color change when stopping the AP When stopping the AP, there might be a color change in progress. It should be deactivated here, or the driver might later finalize a color change on a stopped AP. Fixes: 5f9404abdf2a (mac80211: add support for BSS color change) Signed-off-by: Michael Lee Link: https://lore.kernel.org/r/20230504080441.22958-1-michael-cy.lee@mediatek.com Signed-off-by: Johannes Berg commit 248e4776514bf70236e6b1a54c65aa5324c8b1eb Author: Johannes Berg Date: Thu May 4 16:45:01 2023 +0300 wifi: mac80211: fix min center freq offset tracing We need to set the correct trace variable, otherwise we're overwriting something else instead and the right one that we print later is not initialized. Fixes: b6011960f392 ("mac80211: handle channel frequency offset") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230504134511.828474-2-gregory.greenman@intel.com Signed-off-by: Johannes Berg commit 9e26f098a2a5a4c4cd327ad911ed2eb9a067a7b8 Author: Gregory Greenman Date: Sun Apr 30 20:18:30 2023 +0300 wifi: iwlwifi: mvm: rfi: disable RFI feature This feature depends on a platform bugfix. Until we have a mechanism that can verify a platform has the required bugfix, disable RFI. Fixes: ef3ed33dfc8f ("wifi: iwlwifi: bump FW API to 77 for AX devices") Reported-by: Jeff Chua Link: https://lore.kernel.org/linux-wireless/CAAJw_ZvZdFpw9W2Hisc9c2BAFbYAnQuaFFaFG6N7qPUP2fOL_w@mail.gmail.com/ Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg commit 13ad2b1eeacd48ec0f31f55964e6dc7dfc2c0299 Author: Christophe JAILLET Date: Mon Apr 24 19:42:04 2023 +0200 wifi: mac80211: Fix puncturing bitmap handling in __ieee80211_csa_finalize() 'changed' can be OR'ed with BSS_CHANGED_EHT_PUNCTURING which is larger than an u32. So, turn 'changed' into an u64 and update ieee80211_set_after_csa_beacon() accordingly. In the commit in Fixes, only ieee80211_start_ap() was updated. Fixes: 2cc25e4b2a04 ("wifi: mac80211: configure puncturing bitmap") Signed-off-by: Christophe JAILLET Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/e84a3f80fe536787f7a2c7180507efc36cd14f95.1682358088.git.christophe.jaillet@wanadoo.fr Signed-off-by: Johannes Berg commit ef6e1997da63ad0ac3fe33153fec9524c9ae56c9 Author: Mirsad Goran Todorovac Date: Tue Apr 25 18:40:08 2023 +0200 wifi: mac80211: fortify the spinlock against deadlock by interrupt In the function ieee80211_tx_dequeue() there is a particular locking sequence: begin: spin_lock(&local->queue_stop_reason_lock); q_stopped = local->queue_stop_reasons[q]; spin_unlock(&local->queue_stop_reason_lock); However small the chance (increased by ftracetest), an asynchronous interrupt can occur in between of spin_lock() and spin_unlock(), and the interrupt routine will attempt to lock the same &local->queue_stop_reason_lock again. This will cause a costly reset of the CPU and the wifi device or an altogether hang in the single CPU and single core scenario. The only remaining spin_lock(&local->queue_stop_reason_lock) that did not disable interrupts was patched, which should prevent any deadlocks on the same CPU/core and the same wifi device. This is the probable trace of the deadlock: kernel: ================================ kernel: WARNING: inconsistent lock state kernel: 6.3.0-rc6-mt-20230401-00001-gf86822a1170f #4 Tainted: G W kernel: -------------------------------- kernel: inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. kernel: kworker/5:0/25656 [HC0[0]:SC0[0]:HE1:SE1] takes: kernel: ffff9d6190779478 (&local->queue_stop_reason_lock){+.?.}-{2:2}, at: return_to_handler+0x0/0x40 kernel: {IN-SOFTIRQ-W} state was registered at: kernel: lock_acquire+0xc7/0x2d0 kernel: _raw_spin_lock+0x36/0x50 kernel: ieee80211_tx_dequeue+0xb4/0x1330 [mac80211] kernel: iwl_mvm_mac_itxq_xmit+0xae/0x210 [iwlmvm] kernel: iwl_mvm_mac_wake_tx_queue+0x2d/0xd0 [iwlmvm] kernel: ieee80211_queue_skb+0x450/0x730 [mac80211] kernel: __ieee80211_xmit_fast.constprop.66+0x834/0xa50 [mac80211] kernel: __ieee80211_subif_start_xmit+0x217/0x530 [mac80211] kernel: ieee80211_subif_start_xmit+0x60/0x580 [mac80211] kernel: dev_hard_start_xmit+0xb5/0x260 kernel: __dev_queue_xmit+0xdbe/0x1200 kernel: neigh_resolve_output+0x166/0x260 kernel: ip_finish_output2+0x216/0xb80 kernel: __ip_finish_output+0x2a4/0x4d0 kernel: ip_finish_output+0x2d/0xd0 kernel: ip_output+0x82/0x2b0 kernel: ip_local_out+0xec/0x110 kernel: igmpv3_sendpack+0x5c/0x90 kernel: igmp_ifc_timer_expire+0x26e/0x4e0 kernel: call_timer_fn+0xa5/0x230 kernel: run_timer_softirq+0x27f/0x550 kernel: __do_softirq+0xb4/0x3a4 kernel: irq_exit_rcu+0x9b/0xc0 kernel: sysvec_apic_timer_interrupt+0x80/0xa0 kernel: asm_sysvec_apic_timer_interrupt+0x1f/0x30 kernel: _raw_spin_unlock_irqrestore+0x3f/0x70 kernel: free_to_partial_list+0x3d6/0x590 kernel: __slab_free+0x1b7/0x310 kernel: kmem_cache_free+0x52d/0x550 kernel: putname+0x5d/0x70 kernel: do_sys_openat2+0x1d7/0x310 kernel: do_sys_open+0x51/0x80 kernel: __x64_sys_openat+0x24/0x30 kernel: do_syscall_64+0x5c/0x90 kernel: entry_SYSCALL_64_after_hwframe+0x72/0xdc kernel: irq event stamp: 5120729 kernel: hardirqs last enabled at (5120729): [] trace_graph_return+0xd6/0x120 kernel: hardirqs last disabled at (5120728): [] trace_graph_return+0xf0/0x120 kernel: softirqs last enabled at (5069900): [] return_to_handler+0x0/0x40 kernel: softirqs last disabled at (5067555): [] return_to_handler+0x0/0x40 kernel: other info that might help us debug this: kernel: Possible unsafe locking scenario: kernel: CPU0 kernel: ---- kernel: lock(&local->queue_stop_reason_lock); kernel: kernel: lock(&local->queue_stop_reason_lock); kernel: *** DEADLOCK *** kernel: 8 locks held by kworker/5:0/25656: kernel: #0: ffff9d618009d138 ((wq_completion)events_freezable){+.+.}-{0:0}, at: process_one_work+0x1ca/0x530 kernel: #1: ffffb1ef4637fe68 ((work_completion)(&local->restart_work)){+.+.}-{0:0}, at: process_one_work+0x1ce/0x530 kernel: #2: ffffffff9f166548 (rtnl_mutex){+.+.}-{3:3}, at: return_to_handler+0x0/0x40 kernel: #3: ffff9d6190778728 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: return_to_handler+0x0/0x40 kernel: #4: ffff9d619077b480 (&mvm->mutex){+.+.}-{3:3}, at: return_to_handler+0x0/0x40 kernel: #5: ffff9d61907bacd8 (&trans_pcie->mutex){+.+.}-{3:3}, at: return_to_handler+0x0/0x40 kernel: #6: ffffffff9ef9cda0 (rcu_read_lock){....}-{1:2}, at: iwl_mvm_queue_state_change+0x59/0x3a0 [iwlmvm] kernel: #7: ffffffff9ef9cda0 (rcu_read_lock){....}-{1:2}, at: iwl_mvm_mac_itxq_xmit+0x42/0x210 [iwlmvm] kernel: stack backtrace: kernel: CPU: 5 PID: 25656 Comm: kworker/5:0 Tainted: G W 6.3.0-rc6-mt-20230401-00001-gf86822a1170f #4 kernel: Hardware name: LENOVO 82H8/LNVNB161216, BIOS GGCN51WW 11/16/2022 kernel: Workqueue: events_freezable ieee80211_restart_work [mac80211] kernel: Call Trace: kernel: kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: dump_stack_lvl+0x5f/0xa0 kernel: dump_stack+0x14/0x20 kernel: print_usage_bug.part.46+0x208/0x2a0 kernel: mark_lock.part.47+0x605/0x630 kernel: ? sched_clock+0xd/0x20 kernel: ? trace_clock_local+0x14/0x30 kernel: ? __rb_reserve_next+0x5f/0x490 kernel: ? _raw_spin_lock+0x1b/0x50 kernel: __lock_acquire+0x464/0x1990 kernel: ? mark_held_locks+0x4e/0x80 kernel: lock_acquire+0xc7/0x2d0 kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: ? ftrace_return_to_handler+0x8b/0x100 kernel: ? preempt_count_add+0x4/0x70 kernel: _raw_spin_lock+0x36/0x50 kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: ieee80211_tx_dequeue+0xb4/0x1330 [mac80211] kernel: ? prepare_ftrace_return+0xc5/0x190 kernel: ? ftrace_graph_func+0x16/0x20 kernel: ? 0xffffffffc02ab0b1 kernel: ? lock_acquire+0xc7/0x2d0 kernel: ? iwl_mvm_mac_itxq_xmit+0x42/0x210 [iwlmvm] kernel: ? ieee80211_tx_dequeue+0x9/0x1330 [mac80211] kernel: ? __rcu_read_lock+0x4/0x40 kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: iwl_mvm_mac_itxq_xmit+0xae/0x210 [iwlmvm] kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: iwl_mvm_queue_state_change+0x311/0x3a0 [iwlmvm] kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: iwl_mvm_wake_sw_queue+0x17/0x20 [iwlmvm] kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: iwl_txq_gen2_unmap+0x1c9/0x1f0 [iwlwifi] kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: iwl_txq_gen2_free+0x55/0x130 [iwlwifi] kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: iwl_txq_gen2_tx_free+0x63/0x80 [iwlwifi] kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: _iwl_trans_pcie_gen2_stop_device+0x3f3/0x5b0 [iwlwifi] kernel: ? _iwl_trans_pcie_gen2_stop_device+0x9/0x5b0 [iwlwifi] kernel: ? mutex_lock_nested+0x4/0x30 kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: iwl_trans_pcie_gen2_stop_device+0x5f/0x90 [iwlwifi] kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: iwl_mvm_stop_device+0x78/0xd0 [iwlmvm] kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: __iwl_mvm_mac_start+0x114/0x210 [iwlmvm] kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: iwl_mvm_mac_start+0x76/0x150 [iwlmvm] kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: drv_start+0x79/0x180 [mac80211] kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: ieee80211_reconfig+0x1523/0x1ce0 [mac80211] kernel: ? synchronize_net+0x4/0x50 kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: ieee80211_restart_work+0x108/0x170 [mac80211] kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: process_one_work+0x250/0x530 kernel: ? ftrace_regs_caller_end+0x66/0x66 kernel: worker_thread+0x48/0x3a0 kernel: ? __pfx_worker_thread+0x10/0x10 kernel: kthread+0x10f/0x140 kernel: ? __pfx_kthread+0x10/0x10 kernel: ret_from_fork+0x29/0x50 kernel: Fixes: 4444bc2116ae ("wifi: mac80211: Proper mark iTXQs for resumption") Link: https://lore.kernel.org/all/1f58a0d1-d2b9-d851-73c3-93fcc607501c@alu.unizg.hr/ Reported-by: Mirsad Goran Todorovac Cc: Gregory Greenman Cc: Johannes Berg Link: https://lore.kernel.org/all/cdc80531-f25f-6f9d-b15f-25e16130b53a@alu.unizg.hr/ Cc: David S. Miller Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Leon Romanovsky Cc: Alexander Wetzel Signed-off-by: Mirsad Goran Todorovac Reviewed-by: Leon Romanovsky Reviewed-by: tag, or it goes automatically? Link: https://lore.kernel.org/r/20230425164005.25272-1-mirsad.todorovac@alu.unizg.hr Signed-off-by: Johannes Berg commit 1b6b4ed01493b7ea2205ab83c49198f7d13ca9d2 Author: Ilan Peer Date: Mon Apr 24 10:32:24 2023 +0300 wifi: cfg80211: Drop entries with invalid BSSIDs in RNR Ignore AP information for entries that include an invalid BSSID in the TBTT information field, e.g., all zeros BSSIDs. Fixes: c8cb5b854b40 ("nl80211/cfg80211: support 6 GHz scanning") Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230424103224.5e65d04d1448.Ic10c8577ae4a85272c407106c9d0a2ecb5372743@changeid Signed-off-by: Johannes Berg commit 2d2f5f1e8fd91fe848aacde28f738fb8e8d95a27 Author: Dan Carpenter Date: Wed May 3 13:41:27 2023 +0300 accel/qaic: silence some uninitialized variable warnings Smatch complains that these are not initialized if get_cntl_version() fails but we still print them in the debug message. Not the end of the world, but true enough. Let's just initialize them to a dummy value to make the checker happy. Fixes: c501ca23a6a3 ("accel/qaic: Add uapi and core driver file") Signed-off-by: Dan Carpenter Reviewed-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya [jhugo: Add fixes and reorder varable declarations for style] Signed-off-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/d11ee378-7b06-4b5e-b56f-d66174be1ab3@kili.mountain commit 7dcbdf29282fbcdb646dc785e8a57ed2c2fec8ba Author: Ahmed Zaki Date: Mon Apr 17 12:09:39 2023 -0600 iavf: send VLAN offloading caps once after VFR When the user disables rxvlan offloading and then changes the number of channels, all VLAN ports are unable to receive traffic. Changing the number of channels triggers a VFR reset. During re-init, when VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS is received, we do: 1 - set the IAVF_FLAG_SETUP_NETDEV_FEATURES flag 2 - call iavf_set_vlan_offload_features(adapter, 0, netdev->features); The second step sends to the PF the __default__ features, in this case aq_required |= IAVF_FLAG_AQ_ENABLE_CTAG_VLAN_STRIPPING While the first step forces the watchdog task to call netdev_update_features() -> iavf_set_features() -> iavf_set_vlan_offload_features(adapter, netdev->features, features). Since the user disabled the "rxvlan", this sets: aq_required |= IAVF_FLAG_AQ_DISABLE_CTAG_VLAN_STRIPPING When we start processing the AQ commands, both flags are enabled. Since we process DISABLE_XTAG first then ENABLE_XTAG, this results in the PF enabling the rxvlan offload. This breaks all communications on the VLAN net devices. Fix by removing the call to iavf_set_vlan_offload_features() (second step). Calling netdev_update_features() from watchdog task is enough for both init and reset paths. Fixes: 7598f4b40bd6 ("iavf: Move netdev_update_features() into watchdog task") Signed-off-by: Ahmed Zaki Tested-by: Rafal Romanowski Reviewed-by: Leon Romanovsky Signed-off-by: Tony Nguyen commit 7255355a0636b4eff08d5e8139c77d98f151c4fc Author: Dawid Wesierski Date: Tue Apr 18 11:52:55 2023 +0200 ice: Fix ice VF reset during iavf initialization Fix the current implementation that causes ice_trigger_vf_reset() to start resetting the VF even when the VF-NIC is still initializing. When we reset NIC with ice driver it can interfere with iavf-vf initialization e.g. during consecutive resets induced by ice iavf ice | | |<-----------------| | ice resets vf iavf | reset | start | |<-----------------| | ice resets vf | causing iavf | initialization | error | | iavf reset end This leads to a series of -53 errors (failed to init adminq) from the IAVF. Change the state of the vf_state field to be not active when the IAVF is still initializing. Make sure to wait until receiving the message on the message box to ensure that the vf is ready and initializded. In simple terms we use the ACTIVE flag to make sure that the ice driver knows if the iavf is ready for another reset iavf ice | | | | |<------------- ice resets vf iavf vf_state != ACTIVE reset | start | | | | | iavf | reset-------> vf_state == ACTIVE end ice resets vf | | | | Fixes: c54d209c78b8 ("ice: Wait for VF to be reset/ready before configuration") Signed-off-by: Dawid Wesierski Signed-off-by: Kamil Maziarz Acked-by: Jacob Keller Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit ab7470bc6d8fb5f3004ccc8e4dfd49aab0f27561 Author: Ahmed Zaki Date: Mon Apr 17 17:44:45 2023 -0600 ice: Fix stats after PF reset After a core PF reset, the VFs were showing wrong Rx/Tx stats. This is a regression in commit 6624e780a577 ("ice: split ice_vsi_setup into smaller functions") caused by missing to set "stat_offsets_loaded = false" in the ice_vsi_rebuild() path. Fixes: 6624e780a577 ("ice: split ice_vsi_setup into smaller functions") Signed-off-by: Ahmed Zaki Reviewed-by: Alexander Lobakin Tested-by: Rafal Romanowski Reviewed-by: Leon Romanovsky Signed-off-by: Tony Nguyen commit e7b8b8ed9960bf699bf4029f482d9e869c094ed6 Author: Gustav Johansson Date: Sat May 6 00:05:07 2023 +0900 ksmbd: smb2: Allow messages padded to 8byte boundary clc length is now accepted to <= 8 less than length, rather than < 8. Solve issues on some of Axis's smb clients which send messages where clc length is 8 bytes less than length. The specific client was running kernel 4.19.217 with smb dialect 3.0.2 on armv7l. Cc: stable@vger.kernel.org Signed-off-by: Gustav Johansson Acked-by: Namjae Jeon Signed-off-by: Steve French commit 443d61d1fa9faa60ef925513d83742902390100f Author: Chih-Yen Chang Date: Sat May 6 00:03:54 2023 +0900 ksmbd: allocate one more byte for implied bcc[0] ksmbd_smb2_check_message allows client to return one byte more, so we need to allocate additional memory in ksmbd_conn_handler_loop to avoid out-of-bound access. Cc: stable@vger.kernel.org Signed-off-by: Chih-Yen Chang Acked-by: Namjae Jeon Signed-off-by: Steve French commit f0a96d1aafd8964e1f9955c830a3e5cb3c60a90f Author: Chih-Yen Chang Date: Sat May 6 00:01:54 2023 +0900 ksmbd: fix wrong UserName check in session_user The offset of UserName is related to the address of security buffer. To ensure the validaty of UserName, we need to compare name_off + name_len with secbuf_len instead of auth_msg_len. [ 27.096243] ================================================================== [ 27.096890] BUG: KASAN: slab-out-of-bounds in smb_strndup_from_utf16+0x188/0x350 [ 27.097609] Read of size 2 at addr ffff888005e3b542 by task kworker/0:0/7 ... [ 27.099950] Call Trace: [ 27.100194] [ 27.100397] dump_stack_lvl+0x33/0x50 [ 27.100752] print_report+0xcc/0x620 [ 27.102305] kasan_report+0xae/0xe0 [ 27.103072] kasan_check_range+0x35/0x1b0 [ 27.103757] smb_strndup_from_utf16+0x188/0x350 [ 27.105474] smb2_sess_setup+0xaf8/0x19c0 [ 27.107935] handle_ksmbd_work+0x274/0x810 [ 27.108315] process_one_work+0x419/0x760 [ 27.108689] worker_thread+0x2a2/0x6f0 [ 27.109385] kthread+0x160/0x190 [ 27.110129] ret_from_fork+0x1f/0x30 [ 27.110454] Cc: stable@vger.kernel.org Signed-off-by: Chih-Yen Chang Acked-by: Namjae Jeon Signed-off-by: Steve French commit 02f76c401d17e409ed45bf7887148fcc22c93c85 Author: Chih-Yen Chang Date: Sun May 14 12:05:05 2023 +0900 ksmbd: fix global-out-of-bounds in smb2_find_context_vals Add tag_len argument in smb2_find_context_vals() to avoid out-of-bound read when create_context's name_len is larger than tag length. [ 7.995411] ================================================================== [ 7.995866] BUG: KASAN: global-out-of-bounds in memcmp+0x83/0xa0 [ 7.996248] Read of size 8 at addr ffffffff8258d940 by task kworker/0:0/7 ... [ 7.998191] Call Trace: [ 7.998358] [ 7.998503] dump_stack_lvl+0x33/0x50 [ 7.998743] print_report+0xcc/0x620 [ 7.999458] kasan_report+0xae/0xe0 [ 7.999895] kasan_check_range+0x35/0x1b0 [ 8.000152] memcmp+0x83/0xa0 [ 8.000347] smb2_find_context_vals+0xf7/0x1e0 [ 8.000635] smb2_open+0x1df2/0x43a0 [ 8.006398] handle_ksmbd_work+0x274/0x810 [ 8.006666] process_one_work+0x419/0x760 [ 8.006922] worker_thread+0x2a2/0x6f0 [ 8.007429] kthread+0x160/0x190 [ 8.007946] ret_from_fork+0x1f/0x30 [ 8.008181] Cc: stable@vger.kernel.org Signed-off-by: Chih-Yen Chang Acked-by: Namjae Jeon Signed-off-by: Steve French commit fe82f16aafdaf8002281d3b9524291d4a4a28460 Author: Mathias Nyman Date: Mon May 15 16:40:59 2023 +0300 xhci: Fix incorrect tracking of free space on transfer rings This incorrect tracking caused unnecessary ring expansion in some usecases which over days of use consume a lot of memory. xhci driver tries to keep track of free transfer blocks (TRBs) on the ring buffer, but failed to add back some cancelled transfers that were turned into no-op operations instead of just moving past them. This can happen if there are several queued pending transfers which then are cancelled in reverse order. Solve this by counting the numer of steps we move the dequeue pointer once we complete a transfer, and add it to the number of free trbs instead of just adding the trb number of the current transfer. This way we ensure we count the no-op trbs on the way as well. Fixes: 55f6153d8cc8 ("xhci: remove extra loop in interrupt context") Cc: stable@vger.kernel.org Reported-by: Miller Hunter Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217242 Tested-by: Miller Hunter Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230515134059.161110-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2a821fc3136d5d99dcb9de152be8a052ca27d870 Author: Mario Limonciello Date: Mon May 15 16:40:58 2023 +0300 xhci-pci: Only run d3cold avoidance quirk for s2idle Donghun reports that a notebook that has an AMD Ryzen 5700U but supports S3 has problems with USB after resuming from suspend. The issue was bisected down to commit d1658268e439 ("usb: pci-quirks: disable D3cold on xhci suspend for s2idle on AMD Renoir"). As this issue only happens on S3, narrow the broken D3cold quirk to only run in s2idle. Fixes: d1658268e439 ("usb: pci-quirks: disable D3cold on xhci suspend for s2idle on AMD Renoir") Reported-and-tested-by: Donghun Yoon Cc: stable@vger.kernel.org Signed-off-by: Mario Limonciello Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230515134059.161110-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1f7aacc5eb9ed2cc17be7a90da5cd559effb9d59 Author: Gaurav Batra Date: Fri May 5 13:47:01 2023 -0500 powerpc/iommu: Incorrect DDW Table is referenced for SR-IOV device For an SR-IOV device, while enabling DDW, a new table is created and added at index 1 in the group. In the below 2 scenarios, the table is incorrectly referenced at index 0 (which is where the table is for default DMA window). 1. When adding DDW This issue is exposed with "slub_debug". Error thrown out from dma_iommu_dma_supported() Warning: IOMMU offset too big for device mask mask: 0xffffffff, table offset: 0x800000000000000 2. During Dynamic removal of the PCI device. Error is from iommu_tce_table_put() since a NULL table pointer is passed in. Fixes: 381ceda88c4c ("powerpc/pseries/iommu: Make use of DDW for indirect mapping") Cc: stable@vger.kernel.org # v5.15+ Signed-off-by: Gaurav Batra Reviewed-by: Brian King Signed-off-by: Michael Ellerman Link: https://msgid.link/20230505184701.91613-1-gbatra@linux.vnet.ibm.com commit 096339ab84f36beae0b1db25e0ce63fb3873e8b2 Author: Gaurav Batra Date: Thu May 4 12:59:13 2023 -0500 powerpc/iommu: DMA address offset is incorrectly calculated with 2MB TCEs When DMA window is backed by 2MB TCEs, the DMA address for the mapped page should be the offset of the page relative to the 2MB TCE. The code was incorrectly setting the DMA address to the beginning of the TCE range. Mellanox driver is reporting timeout trying to ENABLE_HCA for an SR-IOV ethernet port, when DMA window is backed by 2MB TCEs. Fixes: 387273118714 ("powerps/pseries/dma: Add support for 2M IOMMU page size") Cc: stable@vger.kernel.org # v5.16+ Signed-off-by: Gaurav Batra Reviewed-by: Greg Joyce Reviewed-by: Brian King Signed-off-by: Michael Ellerman Link: https://msgid.link/20230504175913.83844-1-gbatra@linux.vnet.ibm.com commit ad593827db9b73f15eb65416ec975ec0311f773a Author: Jason Gunthorpe Date: Mon May 15 21:12:31 2023 -0300 powerpc/iommu: Remove iommu_del_device() Now that power calls iommu_device_register() and populates its groups using iommu_ops->device_group it should not be calling iommu_group_remove_device(). The core code owns the groups and all the other related iommu data, it will clean it up automatically. Remove the bus notifiers and explicit calls to iommu_group_remove_device(). Fixes: a940904443e4 ("powerpc/iommu: Add iommu_ops to report capabilities and allow blocking domains") Signed-off-by: Jason Gunthorpe Signed-off-by: Michael Ellerman Link: https://msgid.link/0-v1-1421774b874b+167-ppc_device_group_jgg@nvidia.com commit 2a881183dc5ab2474ef602e48fe7af34db460d95 Author: Krzysztof Kozlowski Date: Sun May 7 16:48:18 2023 +0200 phy: qcom-snps: correct struct qcom_snps_hsphy kerneldoc Update kerneldoc of struct qcom_snps_hsphy to fix: drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c:135: warning: Function parameter or member 'update_seq_cfg' not described in 'qcom_snps_hsphy' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230507144818.193039-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit b949193011540bb17cf1da7795ec42af1b875203 Author: Neil Armstrong Date: Fri May 12 15:11:41 2023 +0200 phy: amlogic: phy-meson-g12a-mipi-dphy-analog: fix CNTL2_DIF_TX_CTL0 value Use the same CNTL2_DIF_TX_CTL0 value used by the vendor, it was reported fixing timings issues. Fixes: 2a56dc650e54 ("phy: amlogic: Add G12A Analog MIPI D-PHY driver") Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20230512-amlogic-v6-4-upstream-dsi-ccf-vim3-v4-10-2592c29ea263@linaro.org Signed-off-by: Vinod Koul commit 03262a3f5b5b910c7c2900c2f8884832794355f5 Author: Tom Rix Date: Tue May 2 10:50:05 2023 -0400 phy: mediatek: rework the floating point comparisons to fixed point gcc on aarch64 reports drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c: In function ‘mtk_hdmi_pll_set_rate’: drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c:240:52: error: ‘-mgeneral-regs-only’ is incompatible with the use of floating-point types 240 | else if (tmds_clk >= 54 * MEGA && tmds_clk < 148.35 * MEGA) Floating point should not be used, so rework the floating point comparisons to fixed point. Signed-off-by: Tom Rix Reviewed-by: Chunfeng Yun Link: https://lore.kernel.org/r/20230502145005.2927101-1-trix@redhat.com Signed-off-by: Vinod Koul commit c4c597f1b367433c52c531dccd6859a39b4580fb Author: Peter Collingbourne Date: Thu Apr 20 14:43:27 2023 -0700 arm64: mte: Do not set PG_mte_tagged if tags were not initialized The mte_sync_page_tags() function sets PG_mte_tagged if it initializes page tags. Then we return to mte_sync_tags(), which sets PG_mte_tagged again. At best, this is redundant. However, it is possible for mte_sync_page_tags() to return without having initialized tags for the page, i.e. in the case where check_swap is true (non-compound page), is_swap_pte(old_pte) is false and pte_is_tagged is false. So at worst, we set PG_mte_tagged on a page with uninitialized tags. This can happen if, for example, page migration causes a PTE for an untagged page to be replaced. If the userspace program subsequently uses mprotect() to enable PROT_MTE for that page, the uninitialized tags will be exposed to userspace. Fix it by removing the redundant call to set_page_mte_tagged(). Fixes: e059853d14ca ("arm64: mte: Fix/clarify the PG_mte_tagged semantics") Signed-off-by: Peter Collingbourne Cc: # 6.1 Link: https://linux-review.googlesource.com/id/Ib02d004d435b2ed87603b858ef7480f7b1463052 Reviewed-by: Catalin Marinas Reviewed-by: Alexandru Elisei Link: https://lore.kernel.org/r/20230420214327.2357985-1-pcc@google.com Signed-off-by: Will Deacon commit 2efbafb91e12ff5a16cbafb0085e4c10c3fca493 Author: Peter Collingbourne Date: Thu Apr 20 14:09:45 2023 -0700 arm64: Also reset KASAN tag if page is not PG_mte_tagged Consider the following sequence of events: 1) A page in a PROT_READ|PROT_WRITE VMA is faulted. 2) Page migration allocates a page with the KASAN allocator, causing it to receive a non-match-all tag, and uses it to replace the page faulted in 1. 3) The program uses mprotect() to enable PROT_MTE on the page faulted in 1. As a result of step 3, we are left with a non-match-all tag for a page with tags accessible to userspace, which can lead to the same kind of tag check faults that commit e74a68468062 ("arm64: Reset KASAN tag in copy_highpage with HW tags only") intended to fix. The general invariant that we have for pages in a VMA with VM_MTE_ALLOWED is that they cannot have a non-match-all tag. As a result of step 2, the invariant is broken. This means that the fix in the referenced commit was incomplete and we also need to reset the tag for pages without PG_mte_tagged. Fixes: e5b8d9218951 ("arm64: mte: reset the page tag in page->flags") Cc: # 5.15 Link: https://linux-review.googlesource.com/id/I7409cdd41acbcb215c2a7417c1e50d37b875beff Signed-off-by: Peter Collingbourne Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20230420210945.2313627-1-pcc@google.com Signed-off-by: Will Deacon commit 3bc879e355da4ff925e9d82278a829547d9d54bf Author: Geert Uytterhoeven Date: Mon May 8 18:05:19 2023 +0200 arm64: perf: Mark all accessor functions inline When just including : arch/arm64/include/asm/arm_pmuv3.h:31:13: error: ‘write_pmevtypern’ defined but not used [-Werror=unused-function] 31 | static void write_pmevtypern(int n, unsigned long val) | ^~~~~~~~~~~~~~~~ arch/arm64/include/asm/arm_pmuv3.h:24:13: error: ‘write_pmevcntrn’ defined but not used [-Werror=unused-function] 24 | static void write_pmevcntrn(int n, unsigned long val) | ^~~~~~~~~~~~~~~ arch/arm64/include/asm/arm_pmuv3.h:16:22: error: ‘read_pmevcntrn’ defined but not used [-Werror=unused-function] 16 | static unsigned long read_pmevcntrn(int n) | ^~~~~~~~~~~~~~ Fix this by adding the missing "inline" keywords to the three accessor functions that lack them. Fixes: df29ddf4f04b ("arm64: perf: Abstract system register accesses away") Signed-off-by: Geert Uytterhoeven Reviewed-by: Marc Zyngier Acked-by: Mark Rutland Link: https://lore.kernel.org/r/d53a19043c0c3bd25f6c203e73a2fb08a9661824.1683561482.git.geert+renesas@glider.be Signed-off-by: Will Deacon commit 68e3f61eb9f58798e28b18152cd38cb269eebc34 Author: Geert Uytterhoeven Date: Mon May 8 18:05:18 2023 +0200 ARM: perf: Mark all accessor functions inline When just including : arch/arm/include/asm/arm_pmuv3.h:110:13: error: ‘write_pmevtypern’ defined but not used [-Werror=unused-function] 110 | static void write_pmevtypern(int n, unsigned long val) | ^~~~~~~~~~~~~~~~ arch/arm/include/asm/arm_pmuv3.h:103:13: error: ‘write_pmevcntrn’ defined but not used [-Werror=unused-function] 103 | static void write_pmevcntrn(int n, unsigned long val) | ^~~~~~~~~~~~~~~ arch/arm/include/asm/arm_pmuv3.h:95:22: error: ‘read_pmevcntrn’ defined but not used [-Werror=unused-function] 95 | static unsigned long read_pmevcntrn(int n) | ^~~~~~~~~~~~~~ Fix this by adding the missing "inline" keywords to the three accessor functions that lack them. Fixes: 009d6dc87a56 ("ARM: perf: Allow the use of the PMUv3 driver on 32bit ARM") Signed-off-by: Geert Uytterhoeven Acked-by: Mark Rutland Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/3a7d9bc7470aa2d85696ee9765c74f8c03fb5454.1683561482.git.geert+renesas@glider.be Signed-off-by: Will Deacon commit b0abde80620f42d1ceb3de5e4c1a49cdd5628229 Author: Linus Walleij Date: Wed May 10 08:48:11 2023 +0200 arm64: vdso: Pass (void *) to virt_to_page() Like the other calls in this function virt_to_page() expects a pointer, not an integer. However since many architectures implement virt_to_pfn() as a macro, this function becomes polymorphic and accepts both a (unsigned long) and a (void *). Fix this up with an explicit cast. Signed-off-by: Linus Walleij Link: http://lists.infradead.org/pipermail/linux-arm-kernel/2023-May/832583.html Signed-off-by: Will Deacon commit d91d580878064b880f3574ac35b98d8b70ee8620 Author: Min-Hua Chen Date: Tue May 2 23:19:06 2023 +0800 arm64/mm: mark private VM_FAULT_X defines as vm_fault_t This patch fixes several sparse warnings for fault.c: arch/arm64/mm/fault.c:493:24: sparse: warning: incorrect type in return expression (different base types) arch/arm64/mm/fault.c:493:24: sparse: expected restricted vm_fault_t arch/arm64/mm/fault.c:493:24: sparse: got int arch/arm64/mm/fault.c:501:32: sparse: warning: incorrect type in return expression (different base types) arch/arm64/mm/fault.c:501:32: sparse: expected restricted vm_fault_t arch/arm64/mm/fault.c:501:32: sparse: got int arch/arm64/mm/fault.c:503:32: sparse: warning: incorrect type in return expression (different base types) arch/arm64/mm/fault.c:503:32: sparse: expected restricted vm_fault_t arch/arm64/mm/fault.c:503:32: sparse: got int arch/arm64/mm/fault.c:511:24: sparse: warning: incorrect type in return expression (different base types) arch/arm64/mm/fault.c:511:24: sparse: expected restricted vm_fault_t arch/arm64/mm/fault.c:511:24: sparse: got int arch/arm64/mm/fault.c:670:13: sparse: warning: restricted vm_fault_t degrades to integer arch/arm64/mm/fault.c:670:13: sparse: warning: restricted vm_fault_t degrades to integer arch/arm64/mm/fault.c:713:39: sparse: warning: restricted vm_fault_t degrades to integer Reported-by: kernel test robot Signed-off-by: Min-Hua Chen Link: https://lore.kernel.org/r/20230502151909.128810-1-minhuadotchen@gmail.com Signed-off-by: Will Deacon commit 2e4be0d011f21593c6b316806779ba1eba2cd7e0 Author: Vernon Lovejoy Date: Fri May 12 12:42:32 2023 +0200 x86/show_trace_log_lvl: Ensure stack pointer is aligned, again The commit e335bb51cc15 ("x86/unwind: Ensure stack pointer is aligned") tried to align the stack pointer in show_trace_log_lvl(), otherwise the "stack < stack_info.end" check can't guarantee that the last read does not go past the end of the stack. However, we have the same problem with the initial value of the stack pointer, it can also be unaligned. So without this patch this trivial kernel module #include static int init(void) { asm volatile("sub $0x4,%rsp"); dump_stack(); asm volatile("add $0x4,%rsp"); return -EAGAIN; } module_init(init); MODULE_LICENSE("GPL"); crashes the kernel. Fixes: e335bb51cc15 ("x86/unwind: Ensure stack pointer is aligned") Signed-off-by: Vernon Lovejoy Signed-off-by: Oleg Nesterov Link: https://lore.kernel.org/r/20230512104232.GA10227@redhat.com Signed-off-by: Josh Poimboeuf commit f7ba52f302fdc392e0047f38e50841483d997144 Author: Josh Poimboeuf Date: Tue Apr 18 14:49:25 2023 -0700 vmlinux.lds.h: Discard .note.gnu.property section When tooling reads ELF notes, it assumes each note entry is aligned to the value listed in the .note section header's sh_addralign field. The kernel-created ELF notes in the .note.Linux and .note.Xen sections are aligned to 4 bytes. This causes the toolchain to set those sections' sh_addralign values to 4. On the other hand, the GCC-created .note.gnu.property section has an sh_addralign value of 8 for some reason, despite being based on struct Elf32_Nhdr which only needs 4-byte alignment. When the mismatched input sections get linked together into the vmlinux .notes output section, the higher alignment "wins", resulting in an sh_addralign of 8, which confuses tooling. For example: $ readelf -n .tmp_vmlinux.btf ... readelf: .tmp_vmlinux.btf: Warning: note with invalid namesz and/or descsz found at offset 0x170 readelf: .tmp_vmlinux.btf: Warning: type: 0x4, namesize: 0x006e6558, descsize: 0x00008801, alignment: 8 In this case readelf thinks there's alignment padding where there is none, so it starts reading an ELF note in the middle. With newer toolchains (e.g., latest Fedora Rawhide), a similar mismatch triggers a build failure when combined with CONFIG_X86_KERNEL_IBT: btf_encoder__encode: btf__dedup failed! Failed to encode BTF libbpf: failed to find '.BTF' ELF section in vmlinux FAILED: load BTF from vmlinux: No data available make[1]: *** [scripts/Makefile.vmlinux:35: vmlinux] Error 255 This latter error was caused by pahole crashing when it encountered the corrupt .notes section. This crash has been fixed in dwarves version 1.25. As Tianyi Liu describes: "Pahole reads .notes to look for LINUX_ELFNOTE_BUILD_LTO. When LTO is enabled, pahole needs to call cus__merge_and_process_cu to merge compile units, at which point there should only be one unspecified type (used to represent some compilation information) in the global context. However, when the kernel is compiled without LTO, if pahole calls cus__merge_and_process_cu due to alignment issues with notes, multiple unspecified types may appear after merging the cus, and older versions of pahole only support up to one. This is why pahole 1.24 crashes, while newer versions support multiple. However, the latest version of pahole still does not solve the problem of incorrect LTO recognition, so compiling the kernel may be slower than normal." Even with the newer pahole, the note section misaligment issue still exists and pahole is misinterpreting the LTO note. Fix it by discarding the .note.gnu.property section. While GNU properties are important for user space (and VDSO), they don't seem to have any use for vmlinux. (In fact, they're already getting (inadvertently) stripped from vmlinux when CONFIG_DEBUG_INFO_BTF is enabled. The BTF data is extracted from vmlinux.o with "objcopy --only-section=.BTF" into .btf.vmlinux.bin.o. That file doesn't have .note.gnu.property, so when it gets modified and linked back into the main object, the linker automatically strips it (see "How GNU properties are merged" in the ld man page).) Reported-by: Daniel Xu Link: https://lkml.kernel.org/bpf/57830c30-cd77-40cf-9cd1-3bb608aa602e@app.fastmail.com Debugged-by: Tianyi Liu Suggested-by: Joan Bruguera Micó Link: https://lore.kernel.org/r/20230418214925.ay3jpf2zhw75kgmd@treble Signed-off-by: Josh Poimboeuf commit 5b10ff013e8a57f8845615ac2cc37edf7f6eef05 Author: Martin Hundebøll Date: Fri May 12 08:49:25 2023 +0200 pinctrl: meson-axg: add missing GPIOA_18 gpio group Without this, the gpio cannot be explicitly mux'ed to its gpio function. Fixes: 83c566806a68a ("pinctrl: meson-axg: Add new pinctrl driver for Meson AXG SoC") Cc: stable@vger.kernel.org Signed-off-by: Martin Hundebøll Reviewed-by: Neil Armstrong Reviewed-by: Dmitry Rokosov Link: https://lore.kernel.org/r/20230512064925.133516-1-martin@geanix.com Signed-off-by: Linus Walleij commit 0f554e37dad416f445cd3ec5935f5aec1b0e7ba5 Author: Frank Li Date: Mon May 15 12:20:53 2023 -0400 arm64: dts: imx8: fix USB 3.0 Gadget Failure in QM & QXPB0 at super speed Resolve USB 3.0 gadget failure for QM and QXPB0 in super speed mode with single IN and OUT endpoints, like mass storage devices, due to incorrect ACTUAL_MEM_SIZE in ep_cap2 (32k instead of actual 18k). Implement dt property cdns,on-chip-buff-size to override ep_cap2 and set it to 18k for imx8QM and imx8QXP chips. No adverse effects for 8QXP C0. Cc: stable@vger.kernel.org Fixes: dce49449e04f ("usb: cdns3: allocate TX FIFO size according to composite EP number") Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 50a1726b148ff30778cb8a6cf3736130b07c93fd Author: Frank Li Date: Mon May 15 12:20:52 2023 -0400 dt-binding: cdns,usb3: Fix cdns,on-chip-buff-size type In cdns3-gadget.c, 'cdns,on-chip-buff-size' was read using device_property_read_u16(). It resulted in 0 if a 32bit value was used in dts. This commit fixes the dt binding doc to declare it as u16. Cc: stable@vger.kernel.org Fixes: 68989fe1c39d ("dt-bindings: usb: Convert cdns-usb3.txt to YAML schema") Signed-off-by: Frank Li Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit cddb536a73ef2c82ce04059dc61c65e85a355561 Author: Kefeng Wang Date: Fri May 5 17:06:54 2023 +0800 irqchip/mbigen: Unify the error handling in mbigen_of_create_domain() Dan Carpenter reported that commit fea087fc291b "irqchip/mbigen: move to use bus_get_dev_root()" leads to the following Smatch static checker warning: drivers/irqchip/irq-mbigen.c:258 mbigen_of_create_domain() error: potentially dereferencing uninitialized 'child'. It should not cause a problem on real hardware, but better to fix the warning, let's move the bus_get_dev_root() out of the loop, and unify the error handling to silence it. Reported-by: Dan Carpenter Signed-off-by: Kefeng Wang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230505090654.12793-1-wangkefeng.wang@huawei.com commit 14130211be5366a91ec07c3284c183b75d8fba17 Author: Krzysztof Kozlowski Date: Fri May 12 18:45:06 2023 +0200 irqchip/meson-gpio: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/irqchip/irq-meson-gpio.c:153:34: error: ‘meson_irq_gpio_matches’ defined but not used [-Werror=unused-const-variable=] Acked-by: Martin Blumenstingl Signed-off-by: Krzysztof Kozlowski Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230512164506.212267-1-krzysztof.kozlowski@linaro.org commit 3d6a0e4197c04599d75d85a608c8bb16a630a38c Author: Jiaxun Yang Date: Mon Apr 24 11:31:56 2023 +0100 irqchip/mips-gic: Use raw spinlock for gic_lock Since we may hold gic_lock in hardirq context, use raw spinlock makes more sense given that it is for low-level interrupt handling routine and the critical section is small. Fixes BUG: [ 0.426106] ============================= [ 0.426257] [ BUG: Invalid wait context ] [ 0.426422] 6.3.0-rc7-next-20230421-dirty #54 Not tainted [ 0.426638] ----------------------------- [ 0.426766] swapper/0/1 is trying to lock: [ 0.426954] ffffffff8104e7b8 (gic_lock){....}-{3:3}, at: gic_set_type+0x30/08 Fixes: 95150ae8b330 ("irqchip: mips-gic: Implement irq_set_type callback") Cc: stable@vger.kernel.org Signed-off-by: Jiaxun Yang Reviewed-by: Serge Semin Tested-by: Serge Semin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230424103156.66753-3-jiaxun.yang@flygoat.com commit 2c6c9c049510163090b979ea5f92a68ae8d93c45 Author: Jiaxun Yang Date: Mon Apr 24 11:31:55 2023 +0100 irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable When a GIC local interrupt is not routable, it's vl_map will be used to control some internal states for core (providing IPTI, IPPCI, IPFDC input signal for core). Overriding it will interfere core's intetrupt controller. Do not touch vl_map if a local interrupt is not routable, we are not going to remap it. Before dd098a0e0319 (" irqchip/mips-gic: Get rid of the reliance on irq_cpu_online()"), if a local interrupt is not routable, then it won't be requested from GIC Local domain, and thus gic_all_vpes_irq_cpu_online won't be called for that particular interrupt. Fixes: dd098a0e0319 (" irqchip/mips-gic: Get rid of the reliance on irq_cpu_online()") Cc: stable@vger.kernel.org Signed-off-by: Jiaxun Yang Reviewed-by: Serge Semin Tested-by: Serge Semin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230424103156.66753-2-jiaxun.yang@flygoat.com commit 44bd78dd2b8897f59b7e3963f088caadb7e4f047 Author: Douglas Anderson Date: Mon May 15 13:13:51 2023 -0700 irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware issues Some Chromebooks with Mediatek SoCs have a problem where the firmware doesn't properly save/restore certain GICR registers. Newer Chromebooks should fix this issue and we may be able to do firmware updates for old Chromebooks. At the moment, the only known issue with these Chromebooks is that we can't enable "pseudo NMIs" since the priority register can be lost. Enabling "pseudo NMIs" on Chromebooks with the problematic firmware causes crashes and freezes. Let's detect devices with this problem and then disable "pseudo NMIs" on them. We'll detect the problem by looking for the presence of the "mediatek,broken-save-restore-fw" property in the GIC device tree node. Any devices with fixed firmware will not have this property. Our detection plan works because we never bake a Chromebook's device tree into firmware. Instead, device trees are always bundled with the kernel. We'll update the device trees of all affected Chromebooks and then we'll never enable "pseudo NMI" on a kernel that is bundled with old device trees. When a firmware update is shipped that fixes this issue it will know to patch the device tree to remove the property. In order to make this work, the quick detection mechanism of the GICv3 code is extended to be able to look for properties in addition to looking at "compatible". Reviewed-by: Julius Werner Signed-off-by: Douglas Anderson Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230515131353.v2.2.I88dc0a0eb1d9d537de61604cd8994ecc55c0cac1@changeid commit 43cd3ddbff3c1635d0e09fe5b09af48d39dbb9d7 Author: Douglas Anderson Date: Mon May 15 13:13:50 2023 -0700 dt-bindings: interrupt-controller: arm,gic-v3: Add quirk for Mediatek SoCs w/ broken FW When trying to turn on the "pseudo NMI" kernel feature in Linux, it was discovered that all Mediatek-based Chromebooks that ever shipped (at least ones with GICv3) had a firmware bug where they wouldn't save certain GIC "GICR" registers properly. If a processor ever entered a suspend/idle mode where the GICR registers lost state then they'd be reset to their default state. As a result of the bug, if you try to enable "pseudo NMIs" on the affected devices then certain interrupts will unexpectedly get promoted to be "pseudo NMIs" and cause crashes / freezes / general mayhem. ChromeOS is looking to start turning on "pseudo NMIs" in production to make crash reports more actionable. To do so, we will release firmware updates for at least some of the affected Mediatek Chromebooks. However, even when we update the firmware of a Chromebook it's always possible that a user will end up booting with old firmware. We need to be able to detect when we're running with firmware that will crash and burn if pseudo NMIs are enabled. The current plan is: * Update the device trees of all affected Chromebooks to include the 'mediatek,broken-save-restore-fw' property. The kernel can use this to know not to enable certain features like "pseudo NMI". NOTE: device trees for Chromebooks are never baked into the firmware but are bundled with the kernel. A kernel will never be configured to use "pseudo NMIs" and be bundled with an old device tree. * When we get a fixed firmware for one of these Chromebooks, it will patch the device tree to remove this property. For some details, you can also see the public bug Reviewed-by: Julius Werner Signed-off-by: Douglas Anderson Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230515131353.v2.1.Iabe67a827e206496efec6beb5616d5a3b99c1e65@changeid commit 140809738d969376f26f13264b16669703956f6c Author: Linus Walleij Date: Mon May 15 11:29:43 2023 +0200 drm/pl111: Fix FB depth on IMPD-1 framebuffer The last argument to the function drm_fbdev_dma_setup() was changed from desired BPP to desired depth. In our case the desired depth was 15 but BPP was 16, so we specified 16 as BPP and we relied on the FB emulation core to select a format with a suitable depth for the limited bandwidth and end up with e.g. XRGB1555 like in the past: [drm] Initialized pl111 1.0.0 20170317 for c1000000.display on minor 0 drm-clcd-pl111 c1000000.display: [drm] requested bpp 16, scaled depth down to 15 drm-clcd-pl111 c1000000.display: enable IM-PD1 CLCD connectors Console: switching to colour frame buffer device 80x30 drm-clcd-pl111 c1000000.display: [drm] fb0: pl111drmfb frame buffer device However the current code will fail at that: [drm] Initialized pl111 1.0.0 20170317 for c1000000.display on minor 0 drm-clcd-pl111 c1000000.display: [drm] bpp/depth value of 16/16 not supported drm-clcd-pl111 c1000000.display: [drm] No compatible format found drm-clcd-pl111 c1000000.display: [drm] *ERROR* fbdev: Failed to setup generic emulation (ret=-12) Fix this by passing the desired depth of 15 for the IM/PD-1 display instead of 16 to drm_fbdev_dma_setup(). The desired depth is however in turn used for bandwidth limiting calculations and that was done with a simple / integer division, whereas we now have to modify that to use DIV_ROUND_UP() so that we get DIV_ROUND_UP(15, 2) = 2 not 15/2 = 1. After this the display works again on the Integrator/AP IM/PD-1. Cc: Emma Anholt Cc: stable@vger.kernel.org Suggested-by: Thomas Zimmermann Fixes: 37c90d589dc0 ("drm/fb-helper: Fix single-probe color-format selection") Link: https://lore.kernel.org/dri-devel/20230102112927.26565-1-tzimmermann@suse.de/ Reviewed-by: Thomas Zimmermann Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20230515092943.1401558-1-linus.walleij@linaro.org commit 225c657945c4a6307741cb3cc89467eadcc26e9b Author: Florian Fainelli Date: Sun May 14 19:56:07 2023 -0700 net: bcmgenet: Restore phy_stop() depending upon suspend/close Removing the phy_stop() from bcmgenet_netif_stop() ended up causing warnings from the PHY library that phy_start() is called from the RUNNING state since we are no longer stopping the PHY state machine during bcmgenet_suspend(). Restore the call to phy_stop() but make it conditional on being called from the close or suspend path. Fixes: c96e731c93ff ("net: bcmgenet: connect and disconnect from the PHY state machine") Fixes: 93e0401e0fc0 ("net: bcmgenet: Remove phy_stop() from bcmgenet_netif_stop()") Signed-off-by: Florian Fainelli Reviewed-by: Pavan Chebbi Link: https://lore.kernel.org/r/20230515025608.2587012-1-f.fainelli@gmail.com Signed-off-by: Paolo Abeni commit 445164e8c136f1445caf735d6d268c948e71caf1 Author: Amit Kumar Mahapatra Date: Mon May 15 18:33:43 2023 +0530 spi: dw: Replace spi->chip_select references with function calls New set/get APIs for accessing spi->chip_select were introduced by 'commit 9e264f3f85a5 ("spi: Replace all spi->chip_select and spi->cs_gpiod references with function call")', but the 'commit 2c8606040a80 ("spi: dw: Add support for AMD Pensando Elba SoC")' uses the old interface by directly accessing spi->chip_select. So, replace all spi->chip_select references in the driver with new get/set APIs. Signed-off-by: Amit Kumar Mahapatra Date: Mon May 15 22:29:38 2023 +0500 regulator: Fix error checking for debugfs_create_dir This patch fixes the error checking in core.c in debugfs_create_dir. The correct way to check if an error occurred is 'IS_ERR' inline function. Signed-off-by: Osama Muhammad Date: Wed May 10 17:54:03 2023 -0700 tpm/tpm_tis: Disable interrupts for more Lenovo devices The P360 Tiny suffers from an irq storm issue like the T490s, so add an entry for it to tpm_tis_dmi_table, and force polling. There also previously was a report from the previous attempt to enable interrupts that involved a ThinkPad L490. So an entry is added for it as well. Cc: stable@vger.kernel.org Reported-by: Peter Zijlstra # P360 Tiny Closes: https://lore.kernel.org/linux-integrity/20230505130731.GO83892@hirez.programming.kicks-ass.net/ Signed-off-by: Jerry Snitselaar Signed-off-by: Jarkko Sakkinen commit 99d46450625590d410f86fe4660a5eff7d3b8343 Author: Jarkko Sakkinen Date: Wed Apr 26 20:29:28 2023 +0300 tpm: Prevent hwrng from activating during resume Set TPM_CHIP_FLAG_SUSPENDED in tpm_pm_suspend() and reset in tpm_pm_resume(). While the flag is set, tpm_hwrng() gives back zero bytes. This prevents hwrng from racing during resume. Cc: stable@vger.kernel.org Fixes: 6e592a065d51 ("tpm: Move Linux RNG connection to hwrng") Reviewed-by: Jerry Snitselaar Signed-off-by: Jarkko Sakkinen commit 1398aa803f198b7a386fdd8404666043e95f4c16 Author: Jarkko Sakkinen Date: Wed Apr 26 20:29:27 2023 +0300 tpm_tis: Use tpm_chip_{start,stop} decoration inside tpm_tis_resume Before sending a TPM command, CLKRUN protocol must be disabled. This is not done in the case of tpm1_do_selftest() call site inside tpm_tis_resume(). Address this by decorating the calls with tpm_chip_{start,stop}, which should be always used to arm and disarm the TPM chip for transmission. Finally, move the call to the main TPM driver callback as the last step because it should arm the chip by itself, if it needs that type of functionality. Cc: stable@vger.kernel.org Reported-by: Jason A. Donenfeld Closes: https://lore.kernel.org/linux-integrity/CS68AWILHXS4.3M36M1EKZLUMS@suppilovahvero/ Fixes: a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()") Reviewed-by: Jerry Snitselaar Signed-off-by: Jarkko Sakkinen commit 4cbb0d358883a27e432714b5256f0362946f5e25 Author: Kang Chen Date: Mon Feb 27 11:14:10 2023 +0800 power: supply: mt6360: add a check of devm_work_autocancel in mt6360_charger_probe devm_work_autocancel may fail, add a check and return early. Fixes: 0402e8ebb8b86 ("power: supply: mt6360_charger: add MT6360 charger support") Signed-off-by: Kang Chen Signed-off-by: Sebastian Reichel commit b2f2a3c9800208b0db2c2e34b05323757117faa2 Author: Daisuke Nojiri Date: Mon Apr 24 11:25:58 2023 -0700 power: supply: sbs-charger: Fix INHIBITED bit for Status reg CHARGE_INHIBITED bit position of the ChargerStatus register is actually 0 not 1. This patch corrects it. Fixes: feb583e37f8a8 ("power: supply: add sbs-charger driver") Signed-off-by: Daisuke Nojiri Signed-off-by: Sebastian Reichel commit c08e24013aba49a593424715ffc04c928c84b9c9 Merge: 4920bded3ee07 0920ccdf41e30 Author: Marc Kleine-Budde Date: Mon May 15 22:26:39 2023 +0200 Merge patch series "can: bxcan: add support for single peripheral configuration" Dario Binacchi says: The series adds support for managing bxCAN controllers in single peripheral configuration. Unlike stm32f4 SOCs, where bxCAN controllers are only in dual peripheral configuration, stm32f7 SOCs contain three CAN peripherals, CAN1 and CAN2 in dual peripheral configuration and CAN3 in single peripheral configuration: - Dual CAN peripheral configuration: * CAN1: Primary bxCAN for managing the communication between a secondary bxCAN and the 512-byte SRAM memory. * CAN2: Secondary bxCAN with no direct access to the SRAM memory. This means that the two bxCAN cells share the 512-byte SRAM memory and CAN2 can't be used without enabling CAN1. - Single CAN peripheral configuration: * CAN3: Primary bxCAN with dedicated Memory Access Controller unit and 512-byte SRAM memory. The driver has been tested on the stm32f769i-discovery board with a kernel version 5.19.0-rc2 in loopback + silent mode: | ip link set can[0-2] type can bitrate 125000 loopback on listen-only on | ip link set up can[0-2] | candump can[0-2] -L & | cansend can[0-2] 300#AC.AB.AD.AE.75.49.AD.D1 Changes in v2: - s/fiter/filter/ in the commit message - Replace struct bxcan_mb::primary with struct bxcan_mb::cfg. - Move after the patch "can: bxcan: add support for single peripheral configuration". - Add node gcan3. - Rename gcan as gcan1. - Add property "st,can-secondary" to can2 node. - Drop patch "dt-bindings: mfd: stm32f7: add binding definition for CAN3" because it has been accepted. - Add patch "ARM: dts: stm32f429: put can2 in secondary mode". - Add patch "dt-bindings: net: can: add "st,can-secondary" property". v1: https://lore.kernel.org/all/20230423172528.1398158-1-dario.binacchi@amarulasolutions.com Link: https://lore.kernel.org/all/20230427204540.3126234-1-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde commit 0920ccdf41e3078a4dd2567eb905ea154bc826e6 Author: Dario Binacchi Date: Thu Apr 27 22:45:40 2023 +0200 ARM: dts: stm32: add CAN support on stm32f746 Add support for bxcan (Basic eXtended CAN controller) to STM32F746. The chip contains three CAN peripherals, CAN1 and CAN2 in dual peripheral configuration and CAN3 in single peripheral configuration: - Dual CAN peripheral configuration: * CAN1: Primary bxCAN for managing the communication between a secondary bxCAN and the 512-byte SRAM memory. * CAN2: Secondary bxCAN with no direct access to the SRAM memory. This means that the two bxCAN cells share the 512-byte SRAM memory and CAN2 can't be used without enabling CAN1. - Single CAN peripheral configuration: * CAN3: Primary bxCAN with dedicated Memory Access Controller unit and 512-byte SRAM memory. ------------------------------------------------------------------------- | features | CAN1 | CAN2 | CAN 3 | ------------------------------------------------------------------------- | SRAM | 512-byte shared between CAN1 & CAN2 | 512-byte | ------------------------------------------------------------------------- | Filters | 26 filters shared between CAN1 & CAN2 | 14 filters | ------------------------------------------------------------------------- Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/all/20230427204540.3126234-6-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde commit 85a79b971164c4636b2db7f4aef9788142e3f885 Author: Dario Binacchi Date: Thu Apr 27 22:45:39 2023 +0200 can: bxcan: add support for single peripheral configuration Add support for bxCAN controller in single peripheral configuration: - primary bxCAN - dedicated Memory Access Controller unit - 512-byte SRAM memory - 14 filter banks Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/all/20230427204540.3126234-5-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde commit 011644249686f2675e142519cd59e81e04cfc231 Author: Dario Binacchi Date: Thu Apr 27 22:45:38 2023 +0200 ARM: dts: stm32: add pin map for CAN controller on stm32f7 Add pin configurations for using CAN controller on stm32f7. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/all/20230427204540.3126234-4-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde commit 6b443faa313c519db755ff90be32758fd9c66453 Author: Dario Binacchi Date: Thu Apr 27 22:45:37 2023 +0200 ARM: dts: stm32f429: put can2 in secondary mode This is a preparation patch for the upcoming support to manage CAN peripherals in single configuration. The addition ensures backwards compatibility. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/all/20230427204540.3126234-3-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde commit caf78f0f491981893b6a5a71c9dabd2734909c4a Author: Dario Binacchi Date: Thu Apr 27 22:45:36 2023 +0200 dt-bindings: net: can: add "st,can-secondary" property On the stm32f7 Socs the can peripheral can be in single or dual configuration. In the dual configuration, in turn, it can be in primary or secondary mode. The addition of the 'st,can-secondary' property allows you to specify this mode in the dual configuration. CAN peripheral nodes in single configuration contain neither "st,can-primary" nor "st,can-secondary". Signed-off-by: Dario Binacchi Reviewed-by: Rob Herring Link: https://lore.kernel.org/all/20230427204540.3126234-2-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde commit 4920bded3ee077c99cd52666519cb50f9ee35b26 Author: Geert Uytterhoeven Date: Tue Apr 4 13:59:00 2023 +0200 can: CAN_BXCAN should depend on ARCH_STM32 The STMicroelectronics STM32 basic extended CAN Controller (bxCAN) is only present on STM32 SoCs. Hence drop the "|| OF" part from its dependency rule, to prevent asking the user about this driver when configuring a kernel without STM32 SoC support. Fixes: f00647d8127be4d3 ("can: bxcan: add support for ST bxCAN controller") Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Link: https://lore.kernel.org/all/40095112efd1b2214e4223109fd9f0c6d0158a2d.1680609318.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit 6bffdc38f9935bae49f980448f3f6be2dada0564 Author: Oliver Hartkopp Date: Sat May 6 20:45:15 2023 +0200 can: dev: fix missing CAN XL support in can_put_echo_skb() can_put_echo_skb() checks for the enabled IFF_ECHO flag and the correct ETH_P type of the given skbuff. When implementing the CAN XL support the new check for ETH_P_CANXL has been forgotten. Fixes: fb08cba12b52 ("can: canxl: update CAN infrastructure for CAN XL frames") Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/all/20230506184515.39241-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit 1db080cbdbab28752bbb1c86d64daf96253a5da1 Author: Oliver Hartkopp Date: Thu Apr 6 13:08:45 2023 +0200 can: j1939: recvmsg(): allow MSG_CMSG_COMPAT flag The control message provided by J1939 support MSG_CMSG_COMPAT but blocked recvmsg() syscalls that have set this flag, i.e. on 32bit user space on 64 bit kernels. Link: https://github.com/hartkopp/can-isotp/issues/59 Cc: Oleksij Rempel Suggested-by: Marc Kleine-Budde Signed-off-by: Oliver Hartkopp Tested-by: Oleksij Rempel Acked-by: Oleksij Rempel Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Link: https://lore.kernel.org/20230505110308.81087-3-mkl@pengutronix.de Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde commit db2773d65b02aed319a93efdfb958087771d4e19 Author: Oliver Hartkopp Date: Thu Apr 6 13:08:45 2023 +0200 can: isotp: recvmsg(): allow MSG_CMSG_COMPAT flag The control message provided by isotp support MSG_CMSG_COMPAT but blocked recvmsg() syscalls that have set this flag, i.e. on 32bit user space on 64 bit kernels. Link: https://github.com/hartkopp/can-isotp/issues/59 Cc: Oleksij Rempel Suggested-by: Marc Kleine-Budde Signed-off-by: Oliver Hartkopp Fixes: 42bf50a1795a ("can: isotp: support MSG_TRUNC flag when reading from socket") Link: https://lore.kernel.org/20230505110308.81087-2-mkl@pengutronix.de Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde commit 20429444e653ee8242dfbf815c0c37866beb371b Author: Yun Lu Date: Fri May 12 09:20:55 2023 +0800 wifi: rtl8xxxu: fix authentication timeout due to incorrect RCR value When using rtl8192cu with rtl8xxxu driver to connect wifi, there is a probability of failure, which shows "authentication with ... timed out". Through debugging, it was found that the RCR register has been inexplicably modified to an incorrect value, resulting in the nic not being able to receive authenticated frames. To fix this problem, add regrcr in rtl8xxxu_priv struct, and store the RCR value every time the register is written, and use it the next time the register need to be modified. Signed-off-by: Yun Lu Link: https://lore.kernel.org/all/20230427020512.1221062-1-luyun_611@163.com Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230512012055.2990472-1-luyun_611@163.com commit 60fc756fc8e6954a5618eecac73b255d651602e4 Author: Hans de Goede Date: Wed May 10 16:18:56 2023 +0200 wifi: brcmfmac: Check for probe() id argument being NULL The probe() id argument may be NULL in 2 scenarios: 1. brcmf_pcie_pm_leave_D3() calling brcmf_pcie_probe() to reprobe the device. 2. If a user tries to manually bind the driver from sysfs then the sdio / pcie / usb probe() function gets called with NULL as id argument. 1. Is being hit by users causing the following oops on resume and causing wifi to stop working: BUG: kernel NULL pointer dereference, address: 0000000000000018 Hardware name: Dell Inc. XPS 13 9350/0PWNCR, BIDS 1.13.0 02/10/2020 Workgueue: events_unbound async_run_entry_fn RIP: 0010:brcmf_pcie_probe+Ox16b/0x7a0 [brcmfmac] Call Trace: brcmf_pcie_pm_leave_D3+0xc5/8x1a0 [brcmfmac be3b4cefca451e190fa35be8f00db1bbec293887] ? pci_pm_resume+0x5b/0xf0 ? pci_legacy_resume+0x80/0x80 dpm_run_callback+0x47/0x150 device_resume+0xa2/0x1f0 async_resume+0x1d/0x30 Fix this by checking for id being NULL. In the PCI and USB cases try a manual lookup of the id so that manually binding the driver through sysfs and more importantly brcmf_pcie_probe() on resume will work. For the SDIO case there is no helper to do a manual sdio_device_id lookup, so just directly error out on a NULL id there. Fixes: da6d9c8ecd00 ("wifi: brcmfmac: add firmware vendor info in driver info") Reported-by: Felix Link: https://lore.kernel.org/regressions/4ef3f252ff530cbfa336f5a0d80710020fc5cb1e.camel@gmail.com/ Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Reviewed-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230510141856.46532-1-hdegoede@redhat.com commit 8e4942db5f5ed7b7d9690d93235b3ca49c5c59ce Author: Ping-Ke Shih Date: Mon May 8 16:55:39 2023 +0800 wifi: rtw88: correct qsel_to_ep[] type as int qsel_to_ep[] can be assigned negative value, so change type from 'u8' to 'int'. Otherwise, Smatch static checker warns: drivers/net/wireless/realtek/rtw88/usb.c:219 rtw_usb_parse() warn: assigning (-22) to unsigned variable 'rtwusb->qsel_to_ep[8]' Cc: stable@vger.kernel.org Fixes: a6f187f92bcc ("wifi: rtw88: usb: fix priority queue to endpoint mapping") Reported-by: Dan Carpenter Link: https://lore.kernel.org/linux-wireless/c3f70197-829d-48ed-ae15-66a9de80fa90@kili.mountain/ Cc: Sascha Hauer Signed-off-by: Ping-Ke Shih Acked-by: Sascha Hauer Tested-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230508085539.46795-1-pkshih@realtek.com commit 73c7f8246539da12c76bb731a2fe7389ae55eae8 Author: Petr Pavlu Date: Thu May 11 14:53:12 2023 +0200 cpufreq: ACPI: Prevent a warning when another frequency driver is loaded The recent change to use platform devices to load ACPI PPC and PCC drivers caused that a misleading warning is reported when a respective module cannot be loaded because another CPU frequency driver is already registered: kernel: acpi-cpufreq: probe of acpi-cpufreq failed with error -17 Address it by changing the return code in acpi-cpufreq and pcc-cpufreq for this case from -EEXIST to -ENODEV which silences the warning in call_driver_probe(). The change has also a benefit for users of init_module() as this return code is propagated out from the syscall. The previous -EEXIST code made the callers, such as kmod, wrongly believe that the module was already loaded instead of that it failed to load. Fixes: 691a63712347 ("ACPI: cpufreq: Use platform devices to load ACPI PPC and PCC drivers") Reported-by: Kevin Locke Link: https://lore.kernel.org/lkml/ZFreh8SDMX67EaB6@kevinlocke.name/ Signed-off-by: Petr Pavlu Tested-by: Kevin Locke Signed-off-by: Rafael J. Wysocki commit 9be0b3a0074a61df1c94c37faea35ec8b9ea130b Merge: 1c0d023c8c2f7 ccc2f0c1b6b61 Author: Mark Brown Date: Tue May 16 00:13:09 2023 +0900 ASoC: SOF: Intel: hda-mlink: fixes and extensions Merge series from Pierre-Louis Bossart : With additional testing with multiple links and multiple DAI types, we found a couple of mistakes with refcounts, base address, missing initialization. A new helper was also added due to a change in the SoundWire programming sequences, with the host driver in charge of setting up the DMA channel mapping instead of the firmware. commit e1505c1cc8d527fcc5bcaf9c1ad82eed817e3e10 Author: Jakub Kicinski Date: Fri May 5 14:58:36 2023 -0700 bpf: netdev: init the offload table earlier Some netdevices may get unregistered before late_initcall(), we have to move the hashtable init earlier. Fixes: f1fc43d03946 ("bpf: Move offload initialization into late_initcall") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217399 Signed-off-by: Jakub Kicinski Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230505215836.491485-1-kuba@kernel.org Signed-off-by: Alexei Starovoitov commit 95e4b25192e9238fd2dbe85d96dd2f8fd1ce9d14 Author: Dan Carpenter Date: Mon May 15 13:32:37 2023 +0300 platform/mellanox: mlxbf-pmc: fix sscanf() error checking The sscanf() function never returns negatives. It returns the number of items successfully read. Fixes: 1a218d312e65 ("platform/mellanox: mlxbf-pmc: Add Mellanox BlueField PMC driver") Signed-off-by: Dan Carpenter Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/4ccdfd28-099b-40bf-8d77-ad4ea2e76b93@kili.mountain Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit b54147fa374dbeadcb01b1762db1a793e06e37de Author: Mario Limonciello Date: Fri May 12 20:14:08 2023 -0500 platform/x86/amd/pmf: Fix CnQF and auto-mode after resume After suspend/resume cycle there is an error message and auto-mode or CnQF stops working. [ 5741.447511] amd-pmf AMDI0100:00: SMU cmd failed. err: 0xff [ 5741.447523] amd-pmf AMDI0100:00: AMD_PMF_REGISTER_RESPONSE:ff [ 5741.447527] amd-pmf AMDI0100:00: AMD_PMF_REGISTER_ARGUMENT:7 [ 5741.447531] amd-pmf AMDI0100:00: AMD_PMF_REGISTER_MESSAGE:16 [ 5741.447540] amd-pmf AMDI0100:00: [AUTO_MODE] avg power: 0 mW mode: QUIET This is because the DRAM address used for accessing metrics table needs to be refreshed after a suspend resume cycle. Add a resume callback to reset this again. Fixes: 1a409b35c995 ("platform/x86/amd/pmf: Get performance metrics from PMFW") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20230513011408.958-1-mario.limonciello@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 362c1f2ec82cb65940e1c73e15a395a7a891fc6f Author: Alexandru Sorodoc Date: Fri May 12 13:15:17 2023 +0300 platform/x86: asus-wmi: Ignore WMI events with codes 0x7B, 0xC0 On ASUS GU604V the key 0x7B is issued when the charger is connected or disconnected, and key 0xC0 is issued when an external display is connected or disconnected. This commit maps them to KE_IGNORE to slience kernel messages about unknown keys, such as: kernel: asus_wmi: Unknown key code 0x7b Signed-off-by: Alexandru Sorodoc Link: https://lore.kernel.org/r/20230512101517.47416-1-ealex95@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 8133a3f0aa66ed3d7d974c89ac6aca6fe6cec837 Author: Michael Ellerman Date: Mon May 15 22:40:08 2023 +1000 powerpc/crypto: Fix aes-gcm-p10 build when VSX=n When VSX is disabled, eg. microwatt_defconfig, the build fails with: In function ‘enable_kernel_vsx’, inlined from ‘vsx_begin’ at arch/powerpc/crypto/aes-gcm-p10-glue.c:68:2, inlined from ‘p10_aes_gcm_crypt.constprop’ at arch/powerpc/crypto/aes-gcm-p10-glue.c:244:2: ... arch/powerpc/include/asm/switch_to.h:86:9: note: in expansion of macro ‘BUILD_BUG’ 86 | BUILD_BUG(); | ^~~~~~~~~ Fix it by making the p10-aes-gcm code depend on VSX. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230515124731.122962-1-mpe%40ellerman.id.au commit 71a485624c4cbb144169852d7bb8ca8c0667d7a3 Author: Rubén Gómez Date: Mon May 8 18:03:07 2023 +0000 ACPI: resource: Add IRQ override quirk for LG UltraPC 17U70P Add an ACPI IRQ override quirk for LG UltraPC 17U70P to address the internal keyboard problem on it. Link: https://bugzilla.kernel.org/show_bug.cgi?id=213031 Link: https://bugzilla.kernel.org/show_bug.cgi?id=216983 Signed-off-by: Rubén Gómez Agudo [ rjw: Subject, changelog, white space damage fixes ] Signed-off-by: Rafael J. Wysocki commit 2facd5d3980f3a26c04fe6ec8689a1d019a5812c Author: Alexander Gordeev Date: Sun May 7 18:09:02 2023 +0200 s390/ipl: fix IPIB virtual vs physical address confusion The pointer to IPL Parameter Information Block is stored in the absolute lowcore for later use by dump tools. That pointer is a virtual address, though it should be physical instead. Note, this does not fix a real issue, since virtual and physical addresses are currently the same. Suggested-by: Heiko Carstens Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit a33239be2d38ff5a44427db1707c08787508d34a Author: Alexander Gordeev Date: Thu May 4 16:21:48 2023 +0200 s390/topology: honour nr_cpu_ids when adding CPUs When SMT thread CPUs are added to CPU masks the nr_cpu_ids limit is not checked and could be exceeded. This leads to a warning for example if CONFIG_DEBUG_PER_CPU_MAPS is set and the command line parameter nr_cpus is set to 1. Reviewed-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit b1b0d5aec1cf9f9a900a14964f869c68688d923e Author: Vineeth Vijayan Date: Tue May 2 11:12:42 2023 +0200 s390/cio: include subchannels without devices also for evaluation Currently when the new channel-path is enabled, we do evaluation only on the subchannels with a device connected on it. This is because, in the past, if the device in the subchannel is not working or not available, we used to unregister the subchannels. But, from the 'commit 2297791c92d0 ("s390/cio: dont unregister subchannel from child-drivers")' we allow subchannels with or without an active device connected on it. So, when we do the io_subchannel_verify, make sure that, we are evaluating the subchannels without any device too. Fixes: 2297791c92d0 ("s390/cio: dont unregister subchannel from child-drivers") Reported-by: Boris Fiuczynski Signed-off-by: Vineeth Vijayan Reviewed-by: Peter Oberparleiter Signed-off-by: Alexander Gordeev commit 124acbe275040809abfa5fbe6e25790a53d5a161 Author: Heiko Carstens Date: Thu May 4 13:40:46 2023 +0200 s390/defconfigs: set CONFIG_INIT_STACK_NONE=y Set CONFIG_INIT_STACK_NONE=y in defconfigs to avoid the extra overhead of initializing all stack variables by default. Users who want to have that must change the configuration on their own. Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 844cf829e5f33e00b279230470c8c93b58b8c16f Author: Holger Dengler Date: Thu Apr 20 14:34:10 2023 +0200 s390/pkey: zeroize key blobs Key blobs for the IOCTLs PKEY_KBLOB2PROTK[23] may contain clear key material. Zeroize the copies of these keys in kernel memory after creating the protected key. Reviewed-by: Harald Freudenberger Signed-off-by: Holger Dengler Signed-off-by: Alexander Gordeev commit 8703dd6b238da0ec6c276e53836f8200983d3d9b Author: Heiko Carstens Date: Thu Apr 20 13:31:29 2023 +0200 s390/crypto: use vector instructions only if available for ChaCha20 Commit 349d03ffd5f6 ("crypto: s390 - add crypto library interface for ChaCha20") added a library interface to the s390 specific ChaCha20 implementation. However no check was added to verify if the required facilities are installed before branching into the assembler code. If compiled into the kernel, this will lead to the following crash, if vector instructions are not available: data exception: 0007 ilc:3 [#1] SMP Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.3.0-rc7+ #11 Hardware name: IBM 3931 A01 704 (KVM/Linux) Krnl PSW : 0704e00180000000 000000001857277a (chacha20_vx+0x32/0x818) R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 RI:0 EA:3 Krnl GPRS: 0000037f0000000a ffffffffffffff60 000000008184b000 0000000019f5c8e6 0000000000000109 0000037fffb13c58 0000037fffb13c78 0000000019bb1780 0000037fffb13c58 0000000019f5c8e6 000000008184b000 0000000000000109 00000000802d8000 0000000000000109 0000000018571ebc 0000037fffb13718 Krnl Code: 000000001857276a: c07000b1f80b larl %r7,0000000019bb1780 0000000018572770: a708000a lhi %r0,10 #0000000018572774: e78950000c36 vlm %v24,%v25,0(%r5),0 >000000001857277a: e7a060000806 vl %v26,0(%r6),0 0000000018572780: e7bf70004c36 vlm %v27,%v31,0(%r7),4 0000000018572786: e70b00000456 vlr %v0,%v27 000000001857278c: e71800000456 vlr %v1,%v24 0000000018572792: e74b00000456 vlr %v4,%v27 Call Trace: [<000000001857277a>] chacha20_vx+0x32/0x818 Last Breaking-Event-Address: [<0000000018571eb6>] chacha20_crypt_s390.constprop.0+0x6e/0xd8 ---[ end trace 0000000000000000 ]--- Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b Fix this by adding a missing MACHINE_HAS_VX check. Fixes: 349d03ffd5f6 ("crypto: s390 - add crypto library interface for ChaCha20") Reported-by: Marc Hartmayer Cc: # 5.19+ Reviewed-by: Harald Freudenberger [agordeev@linux.ibm.com: remove duplicates in commit message] Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 21a3f3328972bdb774c62b301a715b5cebf03fa2 Author: Azeem Shaikh Date: Mon May 15 02:40:44 2023 +0000 NFSD: Remove open coding of string copy Instead of open coding a __dynamic_array(), use the __string() and __assign_str() helper macros that exist for this kind of use case. Part of an effort to remove deprecated strlcpy() [1] completely from the kernel[2]. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [2] https://github.com/KSPP/linux/issues/89 Fixes: 3c92fba557c6 ("NFSD: Enhance the nfsd_cb_setup tracepoint") Signed-off-by: Azeem Shaikh Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 1c0d023c8c2f7c56750a3d58207b263a39d39554 Author: Ranjani Sridharan Date: Mon May 15 11:52:00 2023 +0300 ASoC: SOF: topology: Fix tuples array allocation The memory allocated for the tuples array assumes that there's 1 instance of all tokens already. So for those tokens that have multiple instances in topology, we need to exclude the initial instance that has already been accounted for. Fixes: 4fdef47a44d6 ("ASoC: SOF: ipc4-topology: Add new tokens for input/output pin format count") Signed-off-by: Ranjani Sridharan Date: Mon May 15 13:44:03 2023 +0300 ASoC: SOF: Separate the tokens for input and output pin index Using the same token ID for both input and output format pin index results in collisions and incorrect pin index getting parsed from topology. Signed-off-by: Ranjani Sridharan Date: Mon May 15 20:08:26 2023 +0900 ASoC: SOF: Various runtime pm fixes, improvements Merge series from Peter Ujfalusi : Three patch to correct error path PM runtime handling in few places. Regards, Peter --- Pierre-Louis Bossart (3): ASoC: SOF: debug: conditionally bump runtime_pm counter on exceptions ASoC: SOF: pcm: fix pm_runtime imbalance in error handling ASoC: SOF: sof-client-probes: fix pm_runtime imbalance in error handling sound/soc/sof/debug.c | 4 ++-- sound/soc/sof/pcm.c | 11 ++++++----- sound/soc/sof/sof-client-probes.c | 14 ++++++++------ 3 files changed, 16 insertions(+), 13 deletions(-) -- 2.40.1 commit df0acdc59b094cdaef19b1c8d83c9721082bab7b Author: Russell King (Oracle) Date: Sat May 13 22:03:45 2023 +0100 net: phylink: fix ksettings_set() ethtool call While testing a Fiberstore SFP-10G-T module (which uses 10GBASE-R with rate adaption) in a Clearfog platform (which can't do that) it was found that the PHYs advertisement was not limited according to the hosts capabilities when using ethtool to change it. Fix this by ensuring that we mask the advertisement with the computed support mask as the very first thing we do. Fixes: cbc1bb1e4689 ("net: phylink: simplify phy case for ksettings_set method") Signed-off-by: Russell King (Oracle) Signed-off-by: David S. Miller commit d1b2777d1467a3aa86d403492cc0411bf429dbe4 Merge: b48a18644046c 35a089b5d793d Author: David S. Miller Date: Mon May 15 10:21:21 2023 +0100 Merge branch 'tipc-fixes' Xin Long says: ==================== tipc: fix the mtu update in link mtu negotiation This patchset fixes a crash caused by a too small MTU carried in the activate msg. Note that as such malicious packet does not exist in the normal env, the fix won't break any application The 1st patch introduces a function to calculate the minimum MTU for the bearer, and the 2nd patch fixes the crash with this helper. While at it, the 3rd patch fixes the udp bearer mtu update by netlink with this helper. ==================== Reviewed-by: Tung Nguyen Signed-off-by: David S. Miller commit 35a089b5d793d2bfd2cc7cfa6104545184de2ce7 Author: Xin Long Date: Sun May 14 15:52:29 2023 -0400 tipc: check the bearer min mtu properly when setting it by netlink Checking the bearer min mtu with tipc_udp_mtu_bad() only works for IPv4 UDP bearer, and IPv6 UDP bearer has a different value for the min mtu. This patch checks with encap_hlen + TIPC_MIN_BEARER_MTU for min mtu, which works for both IPv4 and IPv6 UDP bearer. Note that tipc_udp_mtu_bad() is still used to check media min mtu in __tipc_nl_media_set(), as m->mtu currently is only used by the IPv4 UDP bearer as its default mtu value. Fixes: 682cd3cf946b ("tipc: confgiure and apply UDP bearer MTU on running links") Signed-off-by: Xin Long Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 56077b56cd3fb78e1c8619e29581ba25a5c55e86 Author: Xin Long Date: Sun May 14 15:52:28 2023 -0400 tipc: do not update mtu if msg_max is too small in mtu negotiation When doing link mtu negotiation, a malicious peer may send Activate msg with a very small mtu, e.g. 4 in Shuang's testing, without checking for the minimum mtu, l->mtu will be set to 4 in tipc_link_proto_rcv(), then n->links[bearer_id].mtu is set to 4294967228, which is a overflow of '4 - INT_H_SIZE - EMSG_OVERHEAD' in tipc_link_mss(). With tipc_link.mtu = 4, tipc_link_xmit() kept printing the warning: tipc: Too large msg, purging xmit list 1 5 0 40 4! tipc: Too large msg, purging xmit list 1 15 0 60 4! And with tipc_link_entry.mtu 4294967228, a huge skb was allocated in named_distribute(), and when purging it in tipc_link_xmit(), a crash was even caused: general protection fault, probably for non-canonical address 0x2100001011000dd: 0000 [#1] PREEMPT SMP PTI CPU: 0 PID: 0 Comm: swapper/0 Kdump: loaded Not tainted 6.3.0.neta #19 RIP: 0010:kfree_skb_list_reason+0x7e/0x1f0 Call Trace: skb_release_data+0xf9/0x1d0 kfree_skb_reason+0x40/0x100 tipc_link_xmit+0x57a/0x740 [tipc] tipc_node_xmit+0x16c/0x5c0 [tipc] tipc_named_node_up+0x27f/0x2c0 [tipc] tipc_node_write_unlock+0x149/0x170 [tipc] tipc_rcv+0x608/0x740 [tipc] tipc_udp_recv+0xdc/0x1f0 [tipc] udp_queue_rcv_one_skb+0x33e/0x620 udp_unicast_rcv_skb.isra.72+0x75/0x90 __udp4_lib_rcv+0x56d/0xc20 ip_protocol_deliver_rcu+0x100/0x2d0 This patch fixes it by checking the new mtu against tipc_bearer_min_mtu(), and not updating mtu if it is too small. Fixes: ed193ece2649 ("tipc: simplify link mtu negotiation") Reported-by: Shuang Li Signed-off-by: Xin Long Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 3ae6d66b605be604644d4bb5708a7ffd9cf1abe8 Author: Xin Long Date: Sun May 14 15:52:27 2023 -0400 tipc: add tipc_bearer_min_mtu to calculate min mtu As different media may requires different min mtu, and even the same media with different net family requires different min mtu, add tipc_bearer_min_mtu() to calculate min mtu accordingly. This API will be used to check the new mtu when doing the link mtu negotiation in the next patch. Signed-off-by: Xin Long Acked-by: Jon Maloy Signed-off-by: David S. Miller commit b48a18644046c9bc0667493a147dfa01e8241eab Author: Russell King (Oracle) Date: Sat May 13 09:57:27 2023 +0100 net: mdio: i2c: fix rollball accessors Commit 87e3bee0f247 ("net: mdio: i2c: Separate C22 and C45 transactions") separated the non-rollball bus accessors, but left the rollball accessors as is. As rollball accessors are clause 45, this results in the rollball protocol being completely non-functional. Fix this. Fixes: 87e3bee0f247 ("net: mdio: i2c: Separate C22 and C45 transactions") Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 5306623a9826aa7d63b32c6a3803c798a765474d Author: Feng Liu Date: Fri May 12 11:18:12 2023 -0400 virtio_net: Fix error unwinding of XDP initialization When initializing XDP in virtnet_open(), some rq xdp initialization may hit an error causing net device open failed. However, previous rqs have already initialized XDP and enabled NAPI, which is not the expected behavior. Need to roll back the previous rq initialization to avoid leaks in error unwinding of init code. Also extract helper functions of disable and enable queue pairs. Use newly introduced disable helper function in error unwinding and virtnet_close. Use enable helper function in virtnet_open. Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info") Signed-off-by: Feng Liu Reviewed-by: Jiri Pirko Reviewed-by: William Tu Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Reviewed-by: Xuan Zhuo Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit 6ead9c98cafcbc6992cf35f0ca393df2c03e3316 Author: Shenwei Wang Date: Fri May 12 08:38:43 2023 -0500 net: fec: remove the xdp_return_frame when lack of tx BDs In the implementation, the sent_frame count does not increment when transmit errors occur. Therefore, bq_xmit_all() will take care of returning the XDP frames. Fixes: 26312c685ae0 ("net: fec: correct the counting of XDP sent frames") Signed-off-by: Shenwei Wang Reviewed-by: Horatiu Vultur Signed-off-by: David S. Miller commit 5896f2d363d5cfb7510856c90d5e0ed934a1d340 Author: Suraj Kandpal Date: Fri May 5 09:45:12 2023 +0530 drm/i915/hdcp: Check if media_gt exists Check if media_gt exists if we are using gsc cs --v2 -correct typo [Ankit] -assign gsc variable if gt exists [Ankit] --v3 -declare gsc and gt variables in if block [Ankit] --v4 -add fixes tag [Ankit] Fixes: 883631771038 ("drm/i915/mtl: Add HDCP GSC interface") Cc: Tomas Winkler Cc: Rodrigo Vivi Cc: Uma Shankar Cc: Anshuman Gupta Cc: Ankit Nautiyal Signed-off-by: Suraj Kandpal Reviewed-by: Gustavo Sousa Reviewed-by: Ankit Nautiyal Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20230505041512.585486-1-suraj.kandpal@intel.com (cherry picked from commit 6986f05b557bf1efea5bac8dbdffb7ee89d0cf77) Signed-off-by: Joonas Lahtinen commit c83b49383b595be50647f0c764a48c78b5f3c4f8 Author: Dong Chenchen Date: Thu May 11 20:54:40 2023 +0800 net: nsh: Use correct mac_offset to unwind gso skb in nsh_gso_segment() As the call trace shows, skb_panic was caused by wrong skb->mac_header in nsh_gso_segment(): invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 3 PID: 2737 Comm: syz Not tainted 6.3.0-next-20230505 #1 RIP: 0010:skb_panic+0xda/0xe0 call Trace: skb_push+0x91/0xa0 nsh_gso_segment+0x4f3/0x570 skb_mac_gso_segment+0x19e/0x270 __skb_gso_segment+0x1e8/0x3c0 validate_xmit_skb+0x452/0x890 validate_xmit_skb_list+0x99/0xd0 sch_direct_xmit+0x294/0x7c0 __dev_queue_xmit+0x16f0/0x1d70 packet_xmit+0x185/0x210 packet_snd+0xc15/0x1170 packet_sendmsg+0x7b/0xa0 sock_sendmsg+0x14f/0x160 The root cause is: nsh_gso_segment() use skb->network_header - nhoff to reset mac_header in skb_gso_error_unwind() if inner-layer protocol gso fails. However, skb->network_header may be reset by inner-layer protocol gso function e.g. mpls_gso_segment. skb->mac_header reset by the inaccurate network_header will be larger than skb headroom. nsh_gso_segment nhoff = skb->network_header - skb->mac_header; __skb_pull(skb,nsh_len) skb_mac_gso_segment mpls_gso_segment skb_reset_network_header(skb);//skb->network_header+=nsh_len return -EINVAL; skb_gso_error_unwind skb_push(skb, nsh_len); skb->mac_header = skb->network_header - nhoff; // skb->mac_header > skb->headroom, cause skb_push panic Use correct mac_offset to restore mac_header and get rid of nhoff. Fixes: c411ed854584 ("nsh: add GSO support") Reported-by: syzbot+632b5d9964208bfef8c0@syzkaller.appspotmail.com Suggested-by: Eric Dumazet Signed-off-by: Dong Chenchen Signed-off-by: David S. Miller commit 436eeae0411acdfc54521ddea80ee76d4ae8a7ea Author: Rijo Thomas Date: Tue May 9 13:02:40 2023 +0530 tee: amdtee: Add return_origin to 'struct tee_cmd_load_ta' After TEE has completed processing of TEE_CMD_ID_LOAD_TA, set proper value in 'return_origin' argument passed by open_session() call. To do so, add 'return_origin' field to the structure tee_cmd_load_ta. The Trusted OS shall update return_origin as part of TEE processing. This change to 'struct tee_cmd_load_ta' interface requires a similar update in AMD-TEE Trusted OS's TEE_CMD_ID_LOAD_TA interface. This patch has been verified on Phoenix Birman setup. On older APUs, return_origin value will be 0. Cc: stable@vger.kernel.org Fixes: 757cc3e9ff1d ("tee: add AMD-TEE driver") Tested-by: Sourabh Das Signed-off-by: Rijo Thomas Acked-by: Sumit Garg Signed-off-by: Jens Wiklander commit 35a4b8ce4ac00e940b46b1034916ccb22ce9bdef Author: Hari Bathini Date: Tue Apr 25 12:28:29 2023 +0530 powerpc/bpf: populate extable entries only during the last pass Since commit 85e031154c7c ("powerpc/bpf: Perform complete extra passes to update addresses"), two additional passes are performed to avoid space and CPU time wastage on powerpc. But these extra passes led to WARN_ON_ONCE() hits in bpf_add_extable_entry() as extable entries are populated again, during the extra pass, without resetting the index. Fix it by resetting entry index before repopulating extable entries, if and when there is an additional pass. Fixes: 85e031154c7c ("powerpc/bpf: Perform complete extra passes to update addresses") Cc: stable@vger.kernel.org # v6.3+ Signed-off-by: Hari Bathini Reviewed-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://msgid.link/20230425065829.18189-1-hbathini@linux.ibm.com commit 2ef0785b30bd6549ddbc124979f1b6596e065ae2 Author: Arnd Bergmann Date: Mon Apr 17 23:04:11 2023 +0200 drm/exynos: fix g2d_open/close helper function definitions The empty stub functions are defined as global functions, which causes a warning because of missing prototypes: drivers/gpu/drm/exynos/exynos_drm_g2d.h:37:5: error: no previous prototype for 'g2d_open' drivers/gpu/drm/exynos/exynos_drm_g2d.h:42:5: error: no previous prototype for 'g2d_close' Mark them as 'static inline' to avoid the warning and to make them behave as intended. Fixes: eb4d9796fa34 ("drm/exynos: g2d: Convert to driver component API") Signed-off-by: Arnd Bergmann Reviewed-by: Andi Shyti Signed-off-by: Inki Dae commit b8b23fbe93b34e595a7b0f31b4ed22400c47ec07 Author: Andrejs Cainikovs Date: Sun May 14 11:22:46 2023 +0200 arm64: dts: colibri-imx8x: delete adc1 and dsp i.MX8, i.MX8X, i.MX8XP and i.MX8XL SOC device trees are all based on imx8-ss-*.dtsi files. For i.MX8X and i.MX8XP these device trees should be updated with some peripherals removed or updated, similar to i.MX8XL (imx8dxl-ss-*.dtsi files). However, it looks like only i.MX8 and i.MX8XL are up to date, but for i.MX8X and i.MX8XP some of the peripherals got inherited from imx8-ss-*.dtsi files, but in reality they are not present on SOC. As a result, during resource partition ownership check U-Boot receives messages from SCU firmware about these resources not owned by boot partition. In reality, these resources are not owned by anyone, as they simply does not exist, but are defined in Linux device tree. This change removes those peripherals, which are listed during U-Boot resource partition ownership check as warnings: ## Flattened Device Tree blob at 9d400000 Booting using the fdt blob at 0x9d400000 Loading Device Tree to 00000000fd652000, end 00000000fd67efff ... OK Disable clock-controller@59580000 rsrc 512 not owned Disable clock-controller@5ac90000 rsrc 102 not owned Starting kernel ... Fixes: ba5a5615d54f ("arm64: dts: freescale: add initial support for colibri imx8x") Signed-off-by: Andrejs Cainikovs Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit 34e5c0cd55af7258d819cb203da7d202bae3b97d Author: Emanuele Ghidoli Date: Sun May 14 11:22:45 2023 +0200 arm64: dts: colibri-imx8x: fix iris pinctrl configuration Remove GPIO3_IO10 from Iris carrier board pinctrl configuration, this is already defined in the SOM dtsi since this is a standard SOM functionality (wake-up button). Duplicating it leads to the following error message imx8qxp-pinctrl scu:pinctrl: pin IMX8QXP_QSPI0A_DATA1 already requested Fixes: aefb5e2d974d ("arm64: dts: colibri-imx8x: Add iris carrier board") Signed-off-by: Emanuele Ghidoli Signed-off-by: Andrejs Cainikovs Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit 25acffb00899d3ac85a9701c99f7929f97a5d9af Author: Emanuele Ghidoli Date: Sun May 14 11:22:44 2023 +0200 arm64: dts: colibri-imx8x: move pinctrl property from SoM to eval board Each carrier board device tree except the eval board one already override iomuxc pinctrl property to configure unused pins as gpio. So move also the pinctrl property to eval board device tree. Leave the pin group definition in imx8x-colibri.dtsi to avoid duplication and simplify configuration of gpio. Signed-off-by: Emanuele Ghidoli Signed-off-by: Andrejs Cainikovs Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit a346d4dc74d94ac3c197283d0a7ec673a59a0674 Author: Emanuele Ghidoli Date: Sun May 14 11:22:43 2023 +0200 arm64: dts: colibri-imx8x: fix eval board pin configuration Fix pinctrl groups to have SODIMM 75 only in one group. Remove configuration of the pin at SoM level because it is normally used as CSI_MCLK at camera interface connector. Without this fix it is not possible, without redefining iomuxc pinctrl, to use CSI_MCLK signal and leads to the following error messages: imx8qxp-pinctrl scu:pinctrl: pin IMX8QXP_CSI_MCLK already requested imx8qxp-pinctrl scu:pinctrl: pin-147 (16-003c) status -22 Fixes: 4d2adf738169 ("arm64: dts: colibri-imx8x: Split pinctrl_hog1") Signed-off-by: Emanuele Ghidoli Signed-off-by: Andrejs Cainikovs Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit 07bb2e368820a4de9b4b586691e143976b74ea44 Author: Adam Ford Date: Thu May 11 20:04:23 2023 -0500 arm64: dts: imx8mp: Fix video clock parents There are a few clocks whose parents are set in mipi_dsi and lcdif nodes, but these clocks are used by the media_blk_ctrl power domain. This may cause an issue when re-parenting, because the media_blk_ctrl may start the clocks before the reparent is done resulting in a disp_pixel clock having the wrong parent and rate. Fix this by moving the assigned-clock-parents and rates to the media_blk_ctrl node to configure these clocks before they are enabled. After this patch, both disp1_pix_root and dixp2_pix_root clock become children of the video_pll1. video_pll1_ref_sel 24000000 video_pll1 1039500000 video_pll1_bypass 1039500000 video_pll1_out 1039500000 media_disp2_pix 1039500000 media_disp2_pix_root_clk 1039500000 media_disp1_pix 1039500000 media_disp1_pix_root_clk 1039500000 Fixes: eda09fe149df ("arm64: dts: imx8mp: Add display pipeline components") Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit ce7c014937c442be677963848c7db62eccd94eac Author: Bjorn Andersson Date: Fri May 12 08:04:25 2023 -0700 arm64: dts: qcom: sc8280xp: Flush RSC sleep & wake votes The rpmh driver will cache sleep and wake votes until the cluster power-domain is about to enter idle, to avoid unnecessary writes. So associate the apps_rsc with the cluster pd, so that it can be notified about this event. Without this, only AMC votes are being commited. Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform") Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230512150425.3171122-1-quic_bjorande@quicinc.com commit 2d80b1e649dd74f5226484e244e57990348a9f18 Author: Krzysztof Kozlowski Date: Tue Apr 11 19:09:38 2023 +0200 arm64: dts: qcom: sc8280xp: Revert "arm64: dts: qcom: sc8280xp: remove superfluous "input-enable"" This reverts commit 87e1f7b1a041a37390bf4fa7913683fb4f8d00d8 because it removed input-enable from the LPASS TLMM, where it is still correct (both bindings and Linux driver parse it). Reported-by: Johan Hovold Closes: https://lore.kernel.org/lkml/ZDVq1b0TjXH5LTYx@hovoldconsulting.com/ Signed-off-by: Krzysztof Kozlowski Reviewed-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230411170938.1657387-1-krzysztof.kozlowski@linaro.org commit 3395d36e6805786c26d13188735bc796b9d7a7c9 Author: Krzysztof Kozlowski Date: Sat May 13 13:29:13 2023 +0200 soc: qcom: rpmh-rsc: drop redundant unsigned >=0 comparision Unsigned int "minor" is always >= 0 as reported by Smatch: drivers/soc/qcom/rpmh-rsc.c:1076 rpmh_rsc_probe() warn: always true condition '(drv->ver.minor >= 0) => (0-u32max >= 0)' Fixes: 88704a0cd719 ("soc: qcom: rpmh-rsc: Support RSC v3 minor versions") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230513112913.176009-1-krzysztof.kozlowski@linaro.org commit 3530167c6fe8001de6c026a3058eaca4c8a5329f Author: Krzysztof Kozlowski Date: Sat May 13 13:17:47 2023 +0200 soc: qcom: icc-bwmon: fix incorrect error code passed to dev_err_probe() Pass to dev_err_probe() PTR_ERR from actual dev_pm_opp_find_bw_floor() call which failed, instead of previous ret which at this point is 0. Failure of dev_pm_opp_find_bw_floor() would result in prematurely ending the probe with success. Fixes smatch warnings: drivers/soc/qcom/icc-bwmon.c:776 bwmon_probe() warn: passing zero to 'dev_err_probe' drivers/soc/qcom/icc-bwmon.c:781 bwmon_probe() warn: passing zero to 'dev_err_probe' Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202305131657.76XeHDjF-lkp@intel.com/ Cc: Fixes: b9c2ae6cac40 ("soc: qcom: icc-bwmon: Add bandwidth monitoring driver") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230513111747.132532-1-krzysztof.kozlowski@linaro.org commit dc60b67d259ea63196dcd0400dd43ba062e2e097 Author: Lucas Tanure Date: Fri May 12 16:45:03 2023 +0100 MAINTAINERS: Remove self from Cirrus Codec drivers I'm leaving Cirrus Logic, and will no longer have access to hardware and documentation necessary to be effective in a maintainership role. Signed-off-by: Lucas Tanure Date: Fri May 12 15:42:37 2023 +0100 ASoC: cs35l56: Prevent unbalanced pm_runtime in dsp_work() on SoundWire Flush the SoundWire interrupt handler work instead of cancelling it. When a SoundWire interrupt is triggered the pm_runtime is held until the work has completed. It's therefore unsafe to cancel the work, it must be flushed. Signed-off-by: Simon Trimmer Date: Sat May 13 19:36:46 2023 +0200 spi: MAINTAINERS: drop Krzysztof Kozlowski from Samsung SPI Remove Krzysztof Kozlowski from maintainers of Samsung SoC SPI drivers. Signed-off-by: Krzysztof Kozlowski Date: Tue May 9 17:41:53 2023 +0100 spi: spi-cadence: Only overlap FIFO transactions in slave mode Commit b1b90514eaa3 ("spi: spi-cadence: Add support for Slave mode") updated the code to trigger the IRQ when the FIFO was half empty, overlapping filling more data into the FIFO and sending what is left. This appears to cause regressions on the Zynq 7000, for transactions longer than the FIFO size, below that no overlapping occurs. It would appear from my testing that any attempt to put new data into the FIFO whilst data is still transmitting causes data corruption on both send and receive. If I am reading the commit message right on commit 49530e641178 ("spi: cadence: Add usleep_range() for cdns_spi_fill_tx_fifo()"), that would also seem to imply this is the case. On the assumption that this isn't an issue on the platform the original slave mode support was added for, update the cdns_transfer_one to only set the watermark to 50% of the FIFO size when in slave mode. There by retaining the new behaviour for slave mode but reverting to the older behaviour when the SPI is used a master. Fixes: b1b90514eaa3 ("spi: spi-cadence: Add support for Slave mode") Signed-off-by: Charles Keepax Date: Tue May 9 17:41:52 2023 +0100 spi: spi-cadence: Avoid read of RX FIFO before its ready Recent changes to cdns_spi_irq introduced some issues. Firstly, when writing the end of a longer transaction, the code in cdns_spi_irq will write data into the TX FIFO, then immediately fall into the if (!xspi->tx_bytes) path and attempt to read data from the RX FIFO. However this required waiting for the TX FIFO to empty before the RX data was ready. Secondly, the variable trans_cnt is now rather inaccurately named since in cases, where the watermark is set to 1, trans_cnt will be 1 but the count of bytes transferred would be much longer. Finally, when setting up the transaction we set the watermark to 50% of the FIFO if the transaction is great than 50% of the FIFO. However, there is no need to split a tranaction that is smaller than the whole FIFO, so anything up to the FIFO size can be done in a single transaction. Tidy up the code a little, to avoid repeatedly calling cdns_spi_read_rx_fifo with a count of 1, and correct the three issues noted above. Fixes: b1b90514eaa3 ("spi: spi-cadence: Add support for Slave mode") Signed-off-by: Charles Keepax Date: Fri May 12 10:19:34 2023 +0200 regulator: pca9450: Fix BUCK2 enable_mask This fixes a copy & paste error. No functional change intended, BUCK1_ENMODE_MASK equals BUCK2_ENMODE_MASK. Fixes: 0935ff5f1f0a ("regulator: pca9450: add pca9450 pmic driver") Originally-from: Robin Gong Date: Fri May 12 14:46:30 2023 +0300 ASoC: SOF: topology: Fix logic for copying tuples Topology could have more instances of the tokens being searched for than the number of sets that need to be copied. Stop copying token after the limit of number of token instances has been reached. This worked before only by chance as we had allocated more size for the tuples array than the number of actual tokens being parsed. Fixes: 7006d20e5e9d ("ASoC: SOF: Introduce IPC3 ops") Signed-off-by: Ranjani Sridharan Date: Fri May 12 13:46:38 2023 +0300 ASoC: SOF: pm: save io region state in case of errors in resume If there are failures in DSP runtime resume, the device state will not reach active and this makes it impossible e.g. to retrieve a possible DSP panic dump via "exception" debugfs node. If CONFIG_SND_SOC_SOF_DEBUG_ENABLE_DEBUGFS_CACHE=y is set, the data in cache is stale. If debugfs cache is not used, the region simply cannot be read. To allow debugging these scenarios, update the debugfs cache contents in resume error handler. User-space can then later retrieve DSP panic and other state via debugfs (requires SOF debugfs cache to be enabled in build). Reported-by: Curtis Malainey Date: Sat May 13 11:02:28 2023 +0200 ASoC: MAINTAINERS: drop Krzysztof Kozlowski from Samsung audio Remove Krzysztof Kozlowski from maintainer of Samsung SoC Audio drivers and change the status to maintenance (no one is reality being paid for looking at this). Signed-off-by: Krzysztof Kozlowski Date: Thu May 11 09:25:12 2023 -0700 ASoC: mediatek: mt8186: Fix use-after-free in driver remove path When devm runs function in the "remove" path for a device it runs them in the reverse order. That means that if you have parts of your driver that aren't using devm or are using "roll your own" devm w/ devm_add_action_or_reset() you need to keep that in mind. The mt8186 audio driver didn't quite get this right. Specifically, in mt8186_init_clock() it called mt8186_audsys_clk_register() and then went on to call a bunch of other devm function. The caller of mt8186_init_clock() used devm_add_action_or_reset() to call mt8186_deinit_clock() but, because of the intervening devm functions, the order was wrong. Specifically at probe time, the order was: 1. mt8186_audsys_clk_register() 2. afe_priv->clk = devm_kcalloc(...) 3. afe_priv->clk[i] = devm_clk_get(...) At remove time, the order (which should have been 3, 2, 1) was: 1. mt8186_audsys_clk_unregister() 3. Free all of afe_priv->clk[i] 2. Free afe_priv->clk The above seemed to be causing a use-after-free. Luckily, it's easy to fix this by simply using devm more correctly. Let's move the devm_add_action_or_reset() to the right place. In addition to fixing the use-after-free, code inspection shows that this fixes a leak (missing call to mt8186_audsys_clk_unregister()) that would have happened if any of the syscon_regmap_lookup_by_phandle() calls in mt8186_init_clock() had failed. Fixes: 55b423d5623c ("ASoC: mediatek: mt8186: support audio clock control in platform driver") Signed-off-by: Douglas Anderson Date: Fri May 12 14:03:17 2023 +0300 ASoC: SOF: ipc3-topology: Make sure that only one cmd is sent in dai_config The commands in sof_ipc_dai_config.flags are encoded as bits: 1 (bit0) - hw_params 2 (bit1) - hw_free 4 (bit2) - pause These are commands, they cannot be combined as one would assume, for example 3 (bit0 | bit1) is invalid. This can happen right at the second start of a stream as at the end of the first stream we set the hw_free command (bit1) and on the second start we would OR on top of it the hw_params (bit0). Fixes: b66bfc3a9810 ("ASoC: SOF: sof-audio: Fix broken early bclk feature for SSP") Signed-off-by: Peter Ujfalusi Date: Fri May 12 13:33:15 2023 +0300 ASoC: SOF: sof-client-probes: fix pm_runtime imbalance in error handling When an error occurs, we need to make sure the device can pm_runtime suspend instead of keeping it active. Signed-off-by: Pierre-Louis Bossart Date: Fri May 12 13:33:14 2023 +0300 ASoC: SOF: pcm: fix pm_runtime imbalance in error handling When an error occurs, we need to make sure the device can pm_runtime suspend instead of keeping it active. Signed-off-by: Pierre-Louis Bossart Date: Fri May 12 13:33:13 2023 +0300 ASoC: SOF: debug: conditionally bump runtime_pm counter on exceptions When a firmware IPC error happens during a pm_runtime suspend, we ignore the error and suspend anyways. However, the code unconditionally increases the runtime_pm counter. This results in a confusing configuration where the code will suspend, resume but never suspend again due to the use of pm_runtime_get_noresume(). The intent of the counter increase was to prevent entry in D3, but if that transition to D3 is already started it cannot be stopped. In addition, there's no point in that case in trying to prevent anything, the firmware error is handled and the next resume will re-initialize the firmware completely. This patch changes the logic to prevent suspend when the device is pm_runtime active and has a use_count > 0. Signed-off-by: Pierre-Louis Bossart Date: Fri May 12 12:46:11 2023 -0500 ASoC: SOF: Intel: hda-mlink: add helper to program SoundWire PCMSyCM registers These registers enable the HDaudio DMA hardware to split/merge data from different PDIs, possibly on different links. This capability exists for all types of HDaudio extended links, but for now is only required for SoundWire. In the SSP/DMIC case, the IP is programmed by the DSP firmware. Signed-off-by: Pierre-Louis Bossart Date: Fri May 12 12:46:10 2023 -0500 ASoC: SOF: Intel: hda-mlink: initialize instance_offset member We defined the values but never initialized it for SoundWire/SSP, fix this miss. A Fixes: tag is not provided as instance_offset was not used so far, so nothing was really broken. This patch is only required for the SoundWire support in the following patch. Signed-off-by: Pierre-Louis Bossart Date: Fri May 12 12:46:09 2023 -0500 ASoC: SOF: Intel: hda-mlink: use 'ml_addr' parameter consistently We mix the use of hlink->ml_addr and the 'ml_addr' parameter. It's the same thing, let's align on using the parameter. Signed-off-by: Pierre-Louis Bossart Date: Fri May 12 12:46:08 2023 -0500 ASoC: SOF: Intel: hda-mlink: fix base_ptr computation The base_ptr value needs to be derived from the remap_addr pointer, not the ml_addr. This base_ptr was used only in debug logs that were so far not contributed upstream so the issue was not detected. It needs to be fixed for SoundWire support on LunarLake. Fixes: 17c9b6ec35c0 ("ASoC: SOF: Intel: hda-mlink: add structures to parse ALT links") Signed-off-by: Pierre-Louis Bossart Date: Fri May 12 12:46:07 2023 -0500 ASoC: SOF: Intel: hda-mlink: add helper to get SoundWire hlink Same functionality as for DMIC/SSP with different ID. Signed-off-by: Pierre-Louis Bossart Date: Fri May 12 12:46:06 2023 -0500 ASoC: SOF: Intel: hda-mlink: fix sublink refcounting In hindsight it was a very bad idea to use the same refcount for Extended and 'legacy' HDaudio multi-links. The existing solution only powers-up the first sublink, which causes SoundWire and SSP tests to fail when more than one DAI is used concurrently. Solving this problem requires per-sublink refcounting, as suggested in this patch. The existing refcounting remains for 'legacy' HdAudio links, mainly to avoid changing the obscure programming sequence in snd_hdac_ext_bus_link_put(). Signed-off-by: Pierre-Louis Bossart Date: Fri May 12 13:44:23 2023 +0800 power: supply: rt9467: Fix passing zero to 'dev_err_probe' Fix passing zero to 'dev_err_probe()' in 'rt9467_request_interrupt()' Fixes: 6f7f70e3a8dd ("power: supply: rt9467: Add Richtek RT9467 charger driver") Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202305111228.bHLWU6bq-lkp@intel.com/ Signed-off-by: ChiaEn Wu Signed-off-by: Sebastian Reichel commit a7844528722619d2f97740ae5ec747afff18c4be Author: Michal Simek Date: Fri May 12 13:52:04 2023 +0200 dt-bindings: ata: ahci-ceva: Cover all 4 iommus entries Current only one entry is enabled but IP itself is using 4 different IDs which are already listed in zynqmp.dtsi. sata: ahci@fd0c0000 { compatible = "ceva,ahci-1v84"; ... iommus = <&smmu 0x4c0>, <&smmu 0x4c1>, <&smmu 0x4c2>, <&smmu 0x4c3>; }; Fixes: 8ac47837f0e0 ("arm64: dts: zynqmp: Add missing iommu IDs") Cc: stable@vger.kernel.org # v5.12+ Signed-off-by: Michal Simek Acked-by: Krzysztof Kozlowski Signed-off-by: Damien Le Moal commit 5f5486b620cd43b16a1787ef92b9bc21bd72ef2e Author: Jeremy Sowden Date: Wed Apr 26 22:50:32 2023 +0100 selftests/bpf: Fix pkg-config call building sign-file When building sign-file, the call to get the CFLAGS for libcrypto is missing white-space between `pkg-config` and `--cflags`: $(shell $(HOSTPKG_CONFIG)--cflags libcrypto 2> /dev/null) Removing the redirection of stderr, we see: $ make -C tools/testing/selftests/bpf sign-file make: Entering directory '[...]/tools/testing/selftests/bpf' make: pkg-config--cflags: No such file or directory SIGN-FILE sign-file make: Leaving directory '[...]/tools/testing/selftests/bpf' Add the missing space. Fixes: fc97590668ae ("selftests/bpf: Add test for bpf_verify_pkcs7_signature() kfunc") Signed-off-by: Jeremy Sowden Signed-off-by: Daniel Borkmann Reviewed-by: Roberto Sassu Link: https://lore.kernel.org/bpf/20230426215032.415792-1-jeremy@azazel.net Signed-off-by: Alexei Starovoitov commit 07a27305938559fb35f7a46fb90a5e37728bdee6 Author: Chuck Lever Date: Sun May 14 15:51:48 2023 -0400 SUNRPC: Fix trace_svc_register() call site The trace event recorded incorrect values for the registered family, protocol, and port because the arguments are in the wrong order. Fixes: b4af59328c25 ("SUNRPC: Trace server-side rpcbind registration events") Signed-off-by: Chuck Lever commit 948f072ada23e0a504c5e4d7d71d4c83bd0785ec Author: NeilBrown Date: Tue May 9 09:42:47 2023 +1000 SUNRPC: always free ctxt when freeing deferred request Since the ->xprt_ctxt pointer was added to svc_deferred_req, it has not been sufficient to use kfree() to free a deferred request. We may need to free the ctxt as well. As freeing the ctxt is all that ->xpo_release_rqst() does, we repurpose it to explicit do that even when the ctxt is not stored in an rqst. So we now have ->xpo_release_ctxt() which is given an xprt and a ctxt, which may have been taken either from an rqst or from a dreq. The caller is now responsible for clearing that pointer after the call to ->xpo_release_ctxt. We also clear dr->xprt_ctxt when the ctxt is moved into a new rqst when revisiting a deferred request. This ensures there is only one pointer to the ctxt, so the risk of double freeing in future is reduced. The new code in svc_xprt_release which releases both the ctxt and any rq_deferred depends on this. Fixes: 773f91b2cf3f ("SUNRPC: Fix NFSD's request deferral on RDMA transports") Signed-off-by: NeilBrown Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit eb8d3a2c809abd73ab0a060fe971d6b9019aa3c1 Author: NeilBrown Date: Tue May 9 09:41:49 2023 +1000 SUNRPC: double free xprt_ctxt while still in use When an RPC request is deferred, the rq_xprt_ctxt pointer is moved out of the svc_rqst into the svc_deferred_req. When the deferred request is revisited, the pointer is copied into the new svc_rqst - and also remains in the svc_deferred_req. In the (rare?) case that the request is deferred a second time, the old svc_deferred_req is reused - it still has all the correct content. However in that case the rq_xprt_ctxt pointer is NOT cleared so that when xpo_release_xprt is called, the ctxt is freed (UDP) or possible added to a free list (RDMA). When the deferred request is revisited for a second time, it will reference this ctxt which may be invalid, and the free the object a second time which is likely to oops. So change svc_defer() to *always* clear rq_xprt_ctxt, and assert that the value is now stored in the svc_deferred_req. Fixes: 773f91b2cf3f ("SUNRPC: Fix NFSD's request deferral on RDMA transports") Signed-off-by: NeilBrown Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit f1fcbaa18b28dec10281551dfe6ed3a3ed80e3d6 Author: Linus Torvalds Date: Sun May 14 12:51:40 2023 -0700 Linux 6.4-rc2 commit 533c54547153d46c0bf99ac0e396bed71f760c03 Merge: 838a854820eea 764d102ef94e8 Author: Linus Torvalds Date: Sun May 14 12:32:34 2023 -0700 Merge tag 'cxl-fixes-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull compute express link fixes from Dan Williams: - Fix a compilation issue with DEFINE_STATIC_SRCU() in the unit tests - Fix leaking kernel memory to a root-only sysfs attribute * tag 'cxl-fixes-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: cxl: Add missing return to cdat read error path tools/testing/cxl: Use DEFINE_STATIC_SRCU() commit 838a854820eea0d21c6910cc3ab23b78d16aa1dd Merge: 01bc932561438 6f9e98849edaa Author: Linus Torvalds Date: Sun May 14 09:54:38 2023 -0700 Merge tag 'parisc-for-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc architecture fixes from Helge Deller: - Fix encoding of swp_entry due to added SWP_EXCLUSIVE flag - Include reboot.h to avoid gcc-12 compiler warning * tag 'parisc-for-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix encoding of swp_entry due to added SWP_EXCLUSIVE flag parisc: kexec: include reboot.h commit 01bc932561438be3a33d7c7c89be45f866168c5f Merge: 31f4104e392a1 2b951b0efbaa6 Author: Linus Torvalds Date: Sun May 14 09:17:32 2023 -0700 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: - fix unwinder for uleb128 case - fix kernel-doc warnings for HP Jornada 7xx - fix unbalanced stack on vfp success path * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9297/1: vfp: avoid unbalanced stack on 'success' return path ARM: 9296/1: HP Jornada 7XX: fix kernel-doc warnings ARM: 9295/1: unwind:fix unwind abort for uleb128 case commit 280a8ab81733da8bc442253c700a52c4c0886ffd Author: Hyunwoo Kim Date: Mon Nov 21 06:33:08 2022 +0000 media: dvb-core: Fix use-after-free due to race condition at dvb_ca_en50221 If the device node of dvb_ca_en50221 is open() and the device is disconnected, a UAF may occur when calling close() on the device node. The root cause is that wake_up() and wait_event() for dvbdev->wait_queue are not implemented. So implement wait_event() function in dvb_ca_en50221_release() and add 'remove_mutex' which prevents race condition for 'ca->exit'. [mchehab: fix a checkpatch warning] Link: https://lore.kernel.org/linux-media/20221121063308.GA33821@ubuntu Signed-off-by: Hyunwoo Kim Signed-off-by: Mauro Carvalho Chehab commit 31f4104e392a10327f90006a61fcf1d4e7a79472 Merge: ef21831c2e4e6 92cc5d00a431e Author: Linus Torvalds Date: Sun May 14 08:00:46 2023 -0700 Merge tag 'locking_urgent_for_v6.4_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Borislav Petkov: - Make sure __down_read_common() is always inlined so that the callers' names land in traceevents output and thus the blocked function can be identified * tag 'locking_urgent_for_v6.4_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/rwsem: Add __always_inline annotation to __down_read_common() and inlined callers commit ef21831c2e4e66cb948d5107f47c1aa0a5711a56 Merge: f3b9e8e4c8484 b752ea0c28e3f Author: Linus Torvalds Date: Sun May 14 07:56:51 2023 -0700 Merge tag 'perf_urgent_for_v6.4_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Borislav Petkov: - Make sure the PEBS buffer is flushed before reprogramming the hardware so that the correct record sizes are used - Update the sample size for AMD BRS events - Fix a confusion with using the same on-stack struct with different events in the event processing path * tag 'perf_urgent_for_v6.4_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/ds: Flush PEBS DS when changing PEBS_DATA_CFG perf/x86: Fix missing sample size update on AMD BRS perf/core: Fix perf_sample_data not properly initialized for different swevents in perf_tp_event() commit f3b9e8e4c84845d09dbba49f664fc8407f18a3dc Merge: 011e33ee48849 0019a2d4b7e37 Author: Linus Torvalds Date: Sun May 14 07:50:34 2023 -0700 Merge tag 'sched_urgent_for_v6.4_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Borislav Petkov: - Fix a couple of kernel-doc warnings * tag 'sched_urgent_for_v6.4_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched: fix cid_lock kernel-doc warnings commit 011e33ee48849739aab1d25b9e41c824fb5383a9 Merge: 491459b5ec375 7d8accfaa0ab6 Author: Linus Torvalds Date: Sun May 14 07:44:48 2023 -0700 Merge tag 'x86_urgent_for_v6.4_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Borislav Petkov: - Add the required PCI IDs so that the generic SMN accesses provided by amd_nb.c work for drivers which switch to them. Add a PCI device ID to k10temp's table so that latter is loaded on such systems too * tag 'x86_urgent_for_v6.4_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: hwmon: (k10temp) Add PCI ID for family 19, model 78h x86/amd_nb: Add PCI ID for family 19h model 78h commit 491459b5ec3751a3a58129db4fb9f832e474bb95 Merge: bb7c241fae622 f9d36cf445fff Author: Linus Torvalds Date: Sun May 14 07:39:15 2023 -0700 Merge tag 'timers_urgent_for_v6.4_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Borislav Petkov: - Prevent CPU state corruption when an active clockevent broadcast device is replaced while the system is already in oneshot mode * tag 'timers_urgent_for_v6.4_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tick/broadcast: Make broadcast device replacement work correctly commit 91aa4b3782448a7a13baa8cbcdfd5fd19defcbd9 Author: Alexander Stein Date: Wed May 3 13:31:10 2023 +0200 ARM: dts: imx6qdl-mba6: Add missing pvcie-supply regulator This worked before by coincidence, as the regulator was probed and enabled before PCI RC probe. But probe order changed since commit 259b93b21a9f ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") and PCIe supply is enabled after RC. Fix this by adding the regulator to RC node. The PCIe vaux regulator still needs to be enabled unconditionally for Mini-PCIe USB-only devices. Fixes: ef3846247b41 ("ARM: dts: imx6qdl: add TQ-Systems MBa6x device trees") Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 892943d7729bbfb2edeed9e323eba9a5cec21c49 Author: Christoph Niedermaier Date: Tue May 2 13:14:24 2023 +0200 ARM: dts: imx6ull-dhcor: Set and limit the mode for PMIC buck 1, 2 and 3 According to Renesas Electronics (formerly Dialog Semiconductor), the standard AUTO mode of the PMIC DA9061 can lead to stability problems depending on the hardware revision. It is recommended to set a defined mode such as PFM or PWM permanently. So set and limit the mode for buck 1, 2 and 3 to a fixed one. Fixes: 611b6c891e40 ("ARM: dts: imx6ull-dhcom: Add DH electronics DHCOM i.MX6ULL SoM and PDK2 board") Signed-off-by: Christoph Niedermaier Reviewed-by: Marek Vasut Signed-off-by: Shawn Guo commit f161cea5a20f3aeeb637a88ad1705fc2720b4d58 Author: Hugo Villeneuve Date: Mon May 1 13:05:32 2023 -0400 arm64: dts: imx8mn-var-som: fix PHY detection bug by adding deassert delay While testing the ethernet interface on a Variscite symphony carrier board using an imx8mn SOM with an onboard ADIN1300 PHY (EC hardware configuration), the ethernet PHY is not detected. The ADIN1300 datasheet indicate that the "Management interface active (t4)" state is reached at most 5ms after the reset signal is deasserted. The device tree in Variscite custom git repository uses the following property: phy-reset-post-delay = <20>; Add a new MDIO property 'reset-deassert-us' of 20ms to have the same delay inside the ethphy node. Adding this property fixes the problem with the PHY detection. Note that this SOM can also have an Atheros AR8033 PHY. In this case, a 1ms deassert delay is sufficient. Add a comment to that effect. Fixes: ade0176dd8a0 ("arm64: dts: imx8mn-var-som: Add Variscite VAR-SOM-MX8MN System on Module") Signed-off-by: Hugo Villeneuve Signed-off-by: Shawn Guo commit 2ac6c4a637132b79863426223242e680cc4f8e27 Author: Adam Ford Date: Sun Apr 23 07:35:13 2023 -0500 arm64: dts: imx8mn: Fix video clock parents There are a few clocks whose parents are set in mipi_dsi and mxsfb nodes, but these clocks are used by the disp_blk_ctrl power domain which may cause an issue when re-parenting, resuling in a disp_pixel clock having the wrong parent and wrong rate. Fix this by moving the assigned-clock-parents as associate clock assignments to the power-domain node to setup these clocks before they are enabled. Fixes: d825fb6455d5 ("arm64: dts: imx8mn: Add display pipeline components") Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit b8c75e4a1b325ea0a9433fa8834be97b5836b946 Author: Takashi Iwai Date: Fri May 12 16:18:00 2023 +0100 media: dvb-core: Fix kernel WARNING for blocking operation in wait_event*() Using a semaphore in the wait_event*() condition is no good idea. It hits a kernel WARN_ON() at prepare_to_wait_event() like: do not call blocking ops when !TASK_RUNNING; state=1 set at prepare_to_wait_event+0x6d/0x690 For avoiding the potential deadlock, rewrite to an open-coded loop instead. Unlike the loop in wait_event*(), this uses wait_woken() after the condition check, hence the task state stays consistent. CVE-2023-31084 was assigned to this bug. Link: https://lore.kernel.org/r/CA+UBctCu7fXn4q41O_3=id1+OdyQ85tZY1x+TkT-6OVBL6KAUw@mail.gmail.com/ Link: https://lore.kernel.org/linux-media/20230512151800.1874-1-tiwai@suse.de Reported-by: Yu Hao Closes: https://nvd.nist.gov/vuln/detail/CVE-2023-31084 Signed-off-by: Takashi Iwai Signed-off-by: Mauro Carvalho Chehab commit 627bb528b086b4136315c25d6a447a98ea9448d3 Author: Hyunwoo Kim Date: Thu Nov 17 04:59:24 2022 +0000 media: dvb-core: Fix use-after-free due to race at dvb_register_device() dvb_register_device() dynamically allocates fops with kmemdup() to set the fops->owner. And these fops are registered in 'file->f_ops' using replace_fops() in the dvb_device_open() process, and kfree()d in dvb_free_device(). However, it is not common to use dynamically allocated fops instead of 'static const' fops as an argument of replace_fops(), and UAF may occur. These UAFs can occur on any dvb type using dvb_register_device(), such as dvb_dvr, dvb_demux, dvb_frontend, dvb_net, etc. So, instead of kfree() the fops dynamically allocated in dvb_register_device() in dvb_free_device() called during the .disconnect() process, kfree() it collectively in exit_dvbdev() called when the dvbdev.c module is removed. Link: https://lore.kernel.org/linux-media/20221117045925.14297-4-imv4bel@gmail.com Signed-off-by: Hyunwoo Kim Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab commit 4172385b0c9ac366dcab78eda48c26814b87ed1a Author: Hyunwoo Kim Date: Thu Nov 17 04:59:23 2022 +0000 media: dvb-core: Fix use-after-free due on race condition at dvb_net A race condition may occur between the .disconnect function, which is called when the device is disconnected, and the dvb_device_open() function, which is called when the device node is open()ed. This results in several types of UAFs. The root cause of this is that you use the dvb_device_open() function, which does not implement a conditional statement that checks 'dvbnet->exit'. So, add 'remove_mutex` to protect 'dvbnet->exit' and use locked_dvb_net_open() function to check 'dvbnet->exit'. [mchehab: fix a checkpatch warning] Link: https://lore.kernel.org/linux-media/20221117045925.14297-3-imv4bel@gmail.com Signed-off-by: Hyunwoo Kim Signed-off-by: Mauro Carvalho Chehab commit 6769a0b7ee0c3b31e1b22c3fadff2bfb642de23f Author: Hyunwoo Kim Date: Thu Nov 17 04:59:22 2022 +0000 media: dvb-core: Fix use-after-free on race condition at dvb_frontend If the device node of dvb_frontend is open() and the device is disconnected, many kinds of UAFs may occur when calling close() on the device node. The root cause of this is that wake_up() for dvbdev->wait_queue is implemented in the dvb_frontend_release() function, but wait_event() is not implemented in the dvb_frontend_stop() function. So, implement wait_event() function in dvb_frontend_stop() and add 'remove_mutex' which prevents race condition for 'fe->exit'. [mchehab: fix a couple of checkpatch warnings and some mistakes at the error handling logic] Link: https://lore.kernel.org/linux-media/20221117045925.14297-2-imv4bel@gmail.com Signed-off-by: Hyunwoo Kim Signed-off-by: Mauro Carvalho Chehab commit ae11c0efaec32fb45130ee9886689f467232eebc Author: Krzysztof Kozlowski Date: Sun Mar 12 13:13:18 2023 +0000 media: mn88443x: fix !CONFIG_OF error by drop of_match_ptr from ID table The driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes !CONFIG_OF error: drivers/media/dvb-frontends/mn88443x.c:782:34: error: ‘mn88443x_of_match’ defined but not used [-Werror=unused-const-variable=] Link: https://lore.kernel.org/linux-media/20230312131318.351173-28-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Mauro Carvalho Chehab commit 517a281338322ff8293f988771c98aaa7205e457 Author: Hyunwoo Kim Date: Thu Nov 17 04:59:25 2022 +0000 media: ttusb-dec: fix memory leak in ttusb_dec_exit_dvb() Since dvb_frontend_detach() is not called in ttusb_dec_exit_dvb(), which is called when the device is disconnected, dvb_frontend_free() is not finally called. This causes a memory leak just by repeatedly plugging and unplugging the device. Fix this issue by adding dvb_frontend_detach() to ttusb_dec_exit_dvb(). Link: https://lore.kernel.org/linux-media/20221117045925.14297-5-imv4bel@gmail.com Signed-off-by: Hyunwoo Kim Signed-off-by: Mauro Carvalho Chehab commit a4315e5be7020aac9b24a8151caf4bb85224cd0e Author: YongSu Yoo Date: Thu Aug 18 13:50:27 2022 +0100 media: dvb_ca_en50221: fix a size write bug The function of "dvb_ca_en50221_write_data" at source/drivers/media /dvb-core/dvb_ca_en50221.c is used for two cases. The first case is for writing APDU data in the function of "dvb_ca_en50221_io_write" at source/drivers/media/dvb-core/ dvb_ca_en50221.c. The second case is for writing the host link buf size on the Command Register in the function of "dvb_ca_en50221_link_init" at source/drivers/media/dvb-core/dvb_ca_en50221.c. In the second case, there exists a bug like following. In the function of the "dvb_ca_en50221_link_init", after a TV host calculates the host link buf_size, the TV host writes the calculated host link buf_size on the Size Register. Accroding to the en50221 Spec (the page 60 of https://dvb.org/wp-content/uploads/2020/02/En50221.V1.pdf), before this writing operation, the "SW(CMDREG_SW)" flag in the Command Register should be set. We can see this setting operation in the function of the "dvb_ca_en50221_link_init" like below. ... if ((ret = ca->pub->write_cam_control(ca->pub, slot, CTRLIF_COMMAND, IRQEN | CMDREG_SW)) != 0) return ret; ... But, after that, the real writing operation is implemented using the function of the "dvb_ca_en50221_write_data" in the function of "dvb_ca_en50221_link_init", and the "dvb_ca_en50221_write_data" includes the function of "ca->pub->write_cam_control", and the function of the "ca->pub->write_cam_control" in the function of the "dvb_ca_en50221_wrte_data" does not include "CMDREG_SW" flag like below. ... if ((status = ca->pub->write_cam_control(ca->pub, slot, CTRLIF_COMMAND, IRQEN | CMDREG_HC)) != 0) ... In the above source code, we can see only the "IRQEN | CMDREG_HC", but we cannot see the "CMDREG_SW". The "CMDREG_SW" flag which was set in the function of the "dvb_ca_en50221_link_init" was rollbacked by the follwoing function of the "dvb_ca_en50221_write_data". This is a bug. and this bug causes that the calculated host link buf_size is not properly written in the CI module. Through this patch, we fix this bug. Link: https://lore.kernel.org/linux-media/20220818125027.1131-1-yongsuyoo0215@gmail.com Signed-off-by: YongSu Yoo Signed-off-by: Mauro Carvalho Chehab commit e6ad6233592593079db5c8fa592c298e51bc1356 Author: Wei Chen Date: Wed Mar 15 13:45:18 2023 +0000 media: netup_unidvb: fix irq init by register it at the end of probe IRQ handler netup_spi_interrupt() takes spinlock spi->lock. The lock is initialized in netup_spi_init(). However, irq handler is registered before initializing the lock. Spinlock dma->lock and i2c->lock suffer from the same problem. Fix this by registering the irq at the end of probe. Link: https://lore.kernel.org/linux-media/20230315134518.1074497-1-harperchen1110@gmail.com Signed-off-by: Wei Chen Signed-off-by: Mauro Carvalho Chehab commit a3fd1ef27aa686d871cefe207bd6168c4b0cd29e Author: Wei Chen Date: Tue Mar 28 13:44:16 2023 +0100 media: dvb-usb: dw2102: fix uninit-value in su3000_read_mac_address In su3000_read_mac_address, if i2c_transfer fails to execute two messages, array mac address will not be initialized. Without handling such error, later in function dvb_usb_adapter_dvb_init, proposed_mac is accessed before initialization. Fix this error by returning a negative value if message execution fails. Link: https://lore.kernel.org/linux-media/20230328124416.560889-1-harperchen1110@gmail.com Signed-off-by: Wei Chen Signed-off-by: Mauro Carvalho Chehab commit 9ded5bd2a49ce3015b7c936743eec0a0e6e11f0c Author: Wei Chen Date: Mon Mar 13 09:50:08 2023 +0000 media: dvb-usb: digitv: fix null-ptr-deref in digitv_i2c_xfer() In digitv_i2c_xfer, msg is controlled by user. When msg[i].buf is null and msg[i].len is zero, former checks on msg[i].buf would be passed. Malicious data finally reach digitv_i2c_xfer. If accessing msg[i].buf[0] without sanity check, null ptr deref would happen. We add check on msg[i].len to prevent crash. Similar commit: commit 0ed554fd769a ("media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()") Link: https://lore.kernel.org/linux-media/20230313095008.1039689-1-harperchen1110@gmail.com Signed-off-by: Wei Chen Signed-off-by: Mauro Carvalho Chehab commit aa4a447b81b84f69c1a89ad899df157f386d7636 Author: Zhang Shurong Date: Sun May 7 15:52:47 2023 +0100 media: dvb-usb-v2: rtl28xxu: fix null-ptr-deref in rtl28xxu_i2c_xfer In rtl28xxu_i2c_xfer, msg is controlled by user. When msg[i].buf is null and msg[i].len is zero, former checks on msg[i].buf would be passed. Malicious data finally reach rtl28xxu_i2c_xfer. If accessing msg[i].buf[0] without sanity check, null ptr deref would happen. We add check on msg[i].len to prevent crash. Similar commit: commit 0ed554fd769a ("media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()") Link: https://lore.kernel.org/linux-media/tencent_3623572106754AC2F266B316798B0F6CCA05@qq.com Signed-off-by: Zhang Shurong Signed-off-by: Mauro Carvalho Chehab commit dff919090155fb22679869e8469168f270dcd97f Author: Wei Chen Date: Mon Mar 13 09:27:51 2023 +0000 media: dvb-usb-v2: ce6230: fix null-ptr-deref in ce6230_i2c_master_xfer() In ce6230_i2c_master_xfer, msg is controlled by user. When msg[i].buf is null and msg[i].len is zero, former checks on msg[i].buf would be passed. Malicious data finally reach ce6230_i2c_master_xfer. If accessing msg[i].buf[0] without sanity check, null ptr deref would happen. We add check on msg[i].len to prevent crash. Similar commit: commit 0ed554fd769a ("media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()") Link: https://lore.kernel.org/linux-media/20230313092751.209496-1-harperchen1110@gmail.com Signed-off-by: Wei Chen Signed-off-by: Mauro Carvalho Chehab commit a6dcefcc08eca1bf4e3d213c97c3cfb75f377935 Author: Wei Chen Date: Mon Mar 13 08:58:53 2023 +0000 media: dvb-usb-v2: ec168: fix null-ptr-deref in ec168_i2c_xfer() In ec168_i2c_xfer, msg is controlled by user. When msg[i].buf is null and msg[i].len is zero, former checks on msg[i].buf would be passed. If accessing msg[i].buf[0] without sanity check, null pointer deref would happen. We add check on msg[i].len to prevent crash. Similar commit: commit 0ed554fd769a ("media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()") Link: https://lore.kernel.org/linux-media/20230313085853.3252349-1-harperchen1110@gmail.com Signed-off-by: Wei Chen Signed-off-by: Mauro Carvalho Chehab commit 858e97d7956d17a2cb56a9413468704a4d5abfe1 Author: Wei Chen Date: Fri Mar 10 16:56:04 2023 +0000 media: dvb-usb: az6027: fix three null-ptr-deref in az6027_i2c_xfer() In az6027_i2c_xfer, msg is controlled by user. When msg[i].buf is null, commit 0ed554fd769a ("media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()") fix the null-ptr-deref bug when msg[i].addr is 0x99. However, null-ptr-deref also happens when msg[i].addr is 0xd0 and 0xc0. We add check on msg[i].len to prevent null-ptr-deref. Link: https://lore.kernel.org/linux-media/20230310165604.3093483-1-harperchen1110@gmail.com Signed-off-by: Wei Chen Signed-off-by: Mauro Carvalho Chehab commit 0f5bb36bf9b39a2a96e730bf4455095b50713f63 Author: Duoming Zhou Date: Wed Mar 8 12:55:14 2023 +0000 media: netup_unidvb: fix use-after-free at del_timer() When Universal DVB card is detaching, netup_unidvb_dma_fini() uses del_timer() to stop dma->timeout timer. But when timer handler netup_unidvb_dma_timeout() is running, del_timer() could not stop it. As a result, the use-after-free bug could happen. The process is shown below: (cleanup routine) | (timer routine) | mod_timer(&dev->tx_sim_timer, ..) netup_unidvb_finidev() | (wait a time) netup_unidvb_dma_fini() | netup_unidvb_dma_timeout() del_timer(&dma->timeout); | | ndev->pci_dev->dev //USE Fix by changing del_timer() to del_timer_sync(). Link: https://lore.kernel.org/linux-media/20230308125514.4208-1-duoming@zju.edu.cn Fixes: 52b1eaf4c59a ("[media] netup_unidvb: NetUP Universal DVB-S/S2/T/T2/C PCI-E card driver") Signed-off-by: Duoming Zhou Signed-off-by: Mauro Carvalho Chehab commit bb7c241fae6228e89c0286ffd6f249b3b0dea225 Merge: adfbf653a3ba6 2a534e1d0d159 Author: Linus Torvalds Date: Sat May 13 17:45:39 2023 -0700 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Some ext4 bug fixes (mostly to address Syzbot reports)" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: bail out of ext4_xattr_ibody_get() fails for any reason ext4: add bounds checking in get_max_inline_xattr_value_size() ext4: add indication of ro vs r/w mounts in the mount message ext4: fix deadlock when converting an inline directory in nojournal mode ext4: improve error recovery code paths in __ext4_remount() ext4: improve error handling from ext4_dirhash() ext4: don't clear SB_RDONLY when remounting r/w until quota is re-enabled ext4: check iomap type only if ext4_iomap_begin() does not fail ext4: avoid a potential slab-out-of-bounds in ext4_group_desc_csum ext4: fix data races when using cached status extents ext4: avoid deadlock in fs reclaim with page writeback ext4: fix invalid free tracking in ext4_xattr_move_to_block() ext4: remove a BUG_ON in ext4_mb_release_group_pa() ext4: allow ext4_get_group_info() to fail ext4: fix lockdep warning when enabling MMP ext4: fix WARNING in mb_find_extent commit adfbf653a3ba6bb8bbb84ed90bf4f1533db545d3 Merge: 046206bad0f6a 0bdf1ad8d10bd Author: Linus Torvalds Date: Sat May 13 17:41:58 2023 -0700 Merge tag 'fbdev-for-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev fixes from Helge Deller: - use after free fix in imsttfb (Zheng Wang) - fix error handling in arcfb (Zongjie Li) - lots of whitespace cleanups (Thomas Zimmermann) - add 1920x1080 modedb entry (me) * tag 'fbdev-for-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: stifb: Fix info entry in sti_struct on error path fbdev: modedb: Add 1920x1080 at 60 Hz video mode fbdev: imsttfb: Fix use after free bug in imsttfb_probe fbdev: vfb: Remove trailing whitespaces fbdev: valkyriefb: Remove trailing whitespaces fbdev: stifb: Remove trailing whitespaces fbdev: sa1100fb: Remove trailing whitespaces fbdev: platinumfb: Remove trailing whitespaces fbdev: p9100: Remove trailing whitespaces fbdev: maxinefb: Remove trailing whitespaces fbdev: macfb: Remove trailing whitespaces fbdev: hpfb: Remove trailing whitespaces fbdev: hgafb: Remove trailing whitespaces fbdev: g364fb: Remove trailing whitespaces fbdev: controlfb: Remove trailing whitespaces fbdev: cg14: Remove trailing whitespaces fbdev: atmel_lcdfb: Remove trailing whitespaces fbdev: 68328fb: Remove trailing whitespaces fbdev: arcfb: Fix error handling in arcfb_probe() commit 046206bad0f6a886e1f890c5fcb106d596971c95 Merge: d4d58949a6eac 1a7edd041f2d2 Author: Linus Torvalds Date: Sat May 13 17:37:32 2023 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "A single small fix for the UFS driver to fix a power management failure" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: core: Fix I/O hang that occurs when BKOPS fails in W-LUN suspend commit 6f9e98849edaa8aefc4030ff3500e41556e83ff7 Author: Helge Deller Date: Sat May 13 22:30:06 2023 +0200 parisc: Fix encoding of swp_entry due to added SWP_EXCLUSIVE flag Fix the __swp_offset() and __swp_entry() macros due to commit 6d239fc78c0b ("parisc/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE") which introduced the SWP_EXCLUSIVE flag by reusing the _PAGE_ACCESSED flag. Reported-by: Christoph Biedl Tested-by: Christoph Biedl Reviewed-by: David Hildenbrand Signed-off-by: Helge Deller Fixes: 6d239fc78c0b ("parisc/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE") Cc: # v6.3+ commit 2a534e1d0d1591e951f9ece2fb460b2ff92edabd Author: Theodore Ts'o Date: Fri May 12 15:16:27 2023 -0400 ext4: bail out of ext4_xattr_ibody_get() fails for any reason In ext4_update_inline_data(), if ext4_xattr_ibody_get() fails for any reason, it's best if we just fail as opposed to stumbling on, especially if the failure is EFSCORRUPTED. Cc: stable@kernel.org Signed-off-by: Theodore Ts'o commit 2220eaf90992c11d888fe771055d4de330385f01 Author: Theodore Ts'o Date: Fri May 12 15:11:02 2023 -0400 ext4: add bounds checking in get_max_inline_xattr_value_size() Normally the extended attributes in the inode body would have been checked when the inode is first opened, but if someone is writing to the block device while the file system is mounted, it's possible for the inode table to get corrupted. Add bounds checking to avoid reading beyond the end of allocated memory if this happens. Reported-by: syzbot+1966db24521e5f6e23f7@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=1966db24521e5f6e23f7 Cc: stable@kernel.org Signed-off-by: Theodore Ts'o commit 6dcc98fbc46511f7a6650946f198df6951a5a88c Author: Theodore Ts'o Date: Fri May 12 14:49:57 2023 -0400 ext4: add indication of ro vs r/w mounts in the mount message Whether the file system is mounted read-only or read/write is more important than the quota mode, which we are already printing. Add the ro vs r/w indication since this can be helpful in debugging problems from the console log. Signed-off-by: Theodore Ts'o commit f4ce24f54d9cca4f09a395f3eecce20d6bec4663 Author: Theodore Ts'o Date: Sat May 6 21:04:01 2023 -0400 ext4: fix deadlock when converting an inline directory in nojournal mode In no journal mode, ext4_finish_convert_inline_dir() can self-deadlock by calling ext4_handle_dirty_dirblock() when it already has taken the directory lock. There is a similar self-deadlock in ext4_incvert_inline_data_nolock() for data files which we'll fix at the same time. A simple reproducer demonstrating the problem: mke2fs -Fq -t ext2 -O inline_data -b 4k /dev/vdc 64 mount -t ext4 -o dirsync /dev/vdc /vdc cd /vdc mkdir file0 cd file0 touch file0 touch file1 attr -s BurnSpaceInEA -V abcde . touch supercalifragilisticexpialidocious Cc: stable@kernel.org Link: https://lore.kernel.org/r/20230507021608.1290720-1-tytso@mit.edu Reported-by: syzbot+91dccab7c64e2850a4e5@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=ba84cc80a9491d65416bc7877e1650c87530fe8a Signed-off-by: Theodore Ts'o commit 4c0b4818b1f636bc96359f7817a2d8bab6370162 Author: Theodore Ts'o Date: Fri May 5 22:20:29 2023 -0400 ext4: improve error recovery code paths in __ext4_remount() If there are failures while changing the mount options in __ext4_remount(), we need to restore the old mount options. This commit fixes two problem. The first is there is a chance that we will free the old quota file names before a potential failure leading to a use-after-free. The second problem addressed in this commit is if there is a failed read/write to read-only transition, if the quota has already been suspended, we need to renable quota handling. Cc: stable@kernel.org Link: https://lore.kernel.org/r/20230506142419.984260-2-tytso@mit.edu Signed-off-by: Theodore Ts'o commit 4b3cb1d108bfc2aebb0d7c8a52261a53cf7f5786 Author: Theodore Ts'o Date: Sat May 6 11:59:13 2023 -0400 ext4: improve error handling from ext4_dirhash() The ext4_dirhash() will *almost* never fail, especially when the hash tree feature was first introduced. However, with the addition of support of encrypted, casefolded file names, that function can most certainly fail today. So make sure the callers of ext4_dirhash() properly check for failures, and reflect the errors back up to their callers. Cc: stable@kernel.org Link: https://lore.kernel.org/r/20230506142419.984260-1-tytso@mit.edu Reported-by: syzbot+394aa8a792cb99dbc837@syzkaller.appspotmail.com Reported-by: syzbot+344aaa8697ebd232bfc8@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=db56459ea4ac4a676ae4b4678f633e55da005a9b Signed-off-by: Theodore Ts'o commit a44be64bbecb15a452496f60db6eacfee2b59c79 Author: Theodore Ts'o Date: Fri May 5 21:02:30 2023 -0400 ext4: don't clear SB_RDONLY when remounting r/w until quota is re-enabled When a file system currently mounted read/only is remounted read/write, if we clear the SB_RDONLY flag too early, before the quota is initialized, and there is another process/thread constantly attempting to create a directory, it's possible to trigger the WARN_ON_ONCE(dquot_initialize_needed(inode)); in ext4_xattr_block_set(), with the following stack trace: WARNING: CPU: 0 PID: 5338 at fs/ext4/xattr.c:2141 ext4_xattr_block_set+0x2ef2/0x3680 RIP: 0010:ext4_xattr_block_set+0x2ef2/0x3680 fs/ext4/xattr.c:2141 Call Trace: ext4_xattr_set_handle+0xcd4/0x15c0 fs/ext4/xattr.c:2458 ext4_initxattrs+0xa3/0x110 fs/ext4/xattr_security.c:44 security_inode_init_security+0x2df/0x3f0 security/security.c:1147 __ext4_new_inode+0x347e/0x43d0 fs/ext4/ialloc.c:1324 ext4_mkdir+0x425/0xce0 fs/ext4/namei.c:2992 vfs_mkdir+0x29d/0x450 fs/namei.c:4038 do_mkdirat+0x264/0x520 fs/namei.c:4061 __do_sys_mkdirat fs/namei.c:4076 [inline] __se_sys_mkdirat fs/namei.c:4074 [inline] __x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4074 Cc: stable@kernel.org Link: https://lore.kernel.org/r/20230506142419.984260-1-tytso@mit.edu Reported-by: syzbot+6385d7d3065524c5ca6d@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=6513f6cb5cd6b5fc9f37e3bb70d273b94be9c34c Signed-off-by: Theodore Ts'o commit fa83c34e3e56b3c672af38059e066242655271b1 Author: Baokun Li Date: Fri May 5 21:24:29 2023 +0800 ext4: check iomap type only if ext4_iomap_begin() does not fail When ext4_iomap_overwrite_begin() calls ext4_iomap_begin() map blocks may fail for some reason (e.g. memory allocation failure, bare disk write), and later because "iomap->type ! = IOMAP_MAPPED" triggers WARN_ON(). When ext4 iomap_begin() returns an error, it is normal that the type of iomap->type may not match the expectation. Therefore, we only determine if iomap->type is as expected when ext4_iomap_begin() is executed successfully. Cc: stable@kernel.org Reported-by: syzbot+08106c4b7d60702dbc14@syzkaller.appspotmail.com Link: https://lore.kernel.org/all/00000000000015760b05f9b4eee9@google.com Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230505132429.714648-1-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit 4f04351888a83e595571de672e0a4a8b74f4fb31 Author: Tudor Ambarus Date: Thu May 4 12:15:25 2023 +0000 ext4: avoid a potential slab-out-of-bounds in ext4_group_desc_csum When modifying the block device while it is mounted by the filesystem, syzbot reported the following: BUG: KASAN: slab-out-of-bounds in crc16+0x206/0x280 lib/crc16.c:58 Read of size 1 at addr ffff888075f5c0a8 by task syz-executor.2/15586 CPU: 1 PID: 15586 Comm: syz-executor.2 Not tainted 6.2.0-rc5-syzkaller-00205-gc96618275234 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x290 lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:306 print_report+0x107/0x1f0 mm/kasan/report.c:417 kasan_report+0xcd/0x100 mm/kasan/report.c:517 crc16+0x206/0x280 lib/crc16.c:58 ext4_group_desc_csum+0x81b/0xb20 fs/ext4/super.c:3187 ext4_group_desc_csum_set+0x195/0x230 fs/ext4/super.c:3210 ext4_mb_clear_bb fs/ext4/mballoc.c:6027 [inline] ext4_free_blocks+0x191a/0x2810 fs/ext4/mballoc.c:6173 ext4_remove_blocks fs/ext4/extents.c:2527 [inline] ext4_ext_rm_leaf fs/ext4/extents.c:2710 [inline] ext4_ext_remove_space+0x24ef/0x46a0 fs/ext4/extents.c:2958 ext4_ext_truncate+0x177/0x220 fs/ext4/extents.c:4416 ext4_truncate+0xa6a/0xea0 fs/ext4/inode.c:4342 ext4_setattr+0x10c8/0x1930 fs/ext4/inode.c:5622 notify_change+0xe50/0x1100 fs/attr.c:482 do_truncate+0x200/0x2f0 fs/open.c:65 handle_truncate fs/namei.c:3216 [inline] do_open fs/namei.c:3561 [inline] path_openat+0x272b/0x2dd0 fs/namei.c:3714 do_filp_open+0x264/0x4f0 fs/namei.c:3741 do_sys_openat2+0x124/0x4e0 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_creat fs/open.c:1402 [inline] __se_sys_creat fs/open.c:1396 [inline] __x64_sys_creat+0x11f/0x160 fs/open.c:1396 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f72f8a8c0c9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f72f97e3168 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007f72f8bac050 RCX: 00007f72f8a8c0c9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000280 RBP: 00007f72f8ae7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd165348bf R14: 00007f72f97e3300 R15: 0000000000022000 Replace le16_to_cpu(sbi->s_es->s_desc_size) with sbi->s_desc_size It reduces ext4's compiled text size, and makes the code more efficient (we remove an extra indirect reference and a potential byte swap on big endian systems), and there is no downside. It also avoids the potential KASAN / syzkaller failure, as a bonus. Reported-by: syzbot+fc51227e7100c9294894@syzkaller.appspotmail.com Reported-by: syzbot+8785e41224a3afd04321@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=70d28d11ab14bd7938f3e088365252aa923cff42 Link: https://syzkaller.appspot.com/bug?id=b85721b38583ecc6b5e72ff524c67302abbc30f3 Link: https://lore.kernel.org/all/000000000000ece18705f3b20934@google.com/ Fixes: 717d50e4971b ("Ext4: Uninitialized Block Groups") Cc: stable@vger.kernel.org Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20230504121525.3275886-1-tudor.ambarus@linaro.org Signed-off-by: Theodore Ts'o commit 492888df0c7b42fc0843631168b0021bc4caee84 Author: Jan Kara Date: Thu May 4 14:55:24 2023 +0200 ext4: fix data races when using cached status extents When using cached extent stored in extent status tree in tree->cache_es another process holding ei->i_es_lock for reading can be racing with us setting new value of tree->cache_es. If the compiler would decide to refetch tree->cache_es at an unfortunate moment, it could result in a bogus in_range() check. Fix the possible race by using READ_ONCE() when using tree->cache_es only under ei->i_es_lock for reading. Cc: stable@kernel.org Reported-by: syzbot+4a03518df1e31b537066@syzkaller.appspotmail.com Link: https://lore.kernel.org/all/000000000000d3b33905fa0fd4a6@google.com Suggested-by: Dmitry Vyukov Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230504125524.10802-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit 00d873c17e29cc32d90ca852b82685f1673acaa5 Author: Jan Kara Date: Thu May 4 14:47:23 2023 +0200 ext4: avoid deadlock in fs reclaim with page writeback Ext4 has a filesystem wide lock protecting ext4_writepages() calls to avoid races with switching of journalled data flag or inode format. This lock can however cause a deadlock like: CPU0 CPU1 ext4_writepages() percpu_down_read(sbi->s_writepages_rwsem); ext4_change_inode_journal_flag() percpu_down_write(sbi->s_writepages_rwsem); - blocks, all readers block from now on ext4_do_writepages() ext4_init_io_end() kmem_cache_zalloc(io_end_cachep, GFP_KERNEL) fs_reclaim frees dentry... dentry_unlink_inode() iput() - last ref => iput_final() - inode dirty => write_inode_now()... ext4_writepages() tries to acquire sbi->s_writepages_rwsem and blocks forever Make sure we cannot recurse into filesystem reclaim from writeback code to avoid the deadlock. Reported-by: syzbot+6898da502aef574c5f8a@syzkaller.appspotmail.com Link: https://lore.kernel.org/all/0000000000004c66b405fa108e27@google.com Fixes: c8585c6fcaf2 ("ext4: fix races between changing inode journal mode and ext4_writepages") CC: stable@vger.kernel.org Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230504124723.20205-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit b87c7cdf2bed4928b899e1ce91ef0d147017ba45 Author: Theodore Ts'o Date: Sun Apr 30 03:04:13 2023 -0400 ext4: fix invalid free tracking in ext4_xattr_move_to_block() In ext4_xattr_move_to_block(), the value of the extended attribute which we need to move to an external block may be allocated by kvmalloc() if the value is stored in an external inode. So at the end of the function the code tried to check if this was the case by testing entry->e_value_inum. However, at this point, the pointer to the xattr entry is no longer valid, because it was removed from the original location where it had been stored. So we could end up calling kvfree() on a pointer which was not allocated by kvmalloc(); or we could also potentially leak memory by not freeing the buffer when it should be freed. Fix this by storing whether it should be freed in a separate variable. Cc: stable@kernel.org Link: https://lore.kernel.org/r/20230430160426.581366-1-tytso@mit.edu Link: https://syzkaller.appspot.com/bug?id=5c2aee8256e30b55ccf57312c16d88417adbd5e1 Link: https://syzkaller.appspot.com/bug?id=41a6b5d4917c0412eb3b3c3c604965bed7d7420b Reported-by: syzbot+64b645917ce07d89bde5@syzkaller.appspotmail.com Reported-by: syzbot+0d042627c4f2ad332195@syzkaller.appspotmail.com Signed-off-by: Theodore Ts'o commit 463808f237cf73e98a1a45ff7460c2406a150a0b Author: Theodore Ts'o Date: Sat Apr 29 16:14:46 2023 -0400 ext4: remove a BUG_ON in ext4_mb_release_group_pa() If a malicious fuzzer overwrites the ext4 superblock while it is mounted such that the s_first_data_block is set to a very large number, the calculation of the block group can underflow, and trigger a BUG_ON check. Change this to be an ext4_warning so that we don't crash the kernel. Cc: stable@kernel.org Link: https://lore.kernel.org/r/20230430154311.579720-3-tytso@mit.edu Reported-by: syzbot+e2efa3efc15a1c9e95c3@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=69b28112e098b070f639efb356393af3ffec4220 Signed-off-by: Theodore Ts'o commit 5354b2af34064a4579be8bc0e2f15a7b70f14b5f Author: Theodore Ts'o Date: Sat Apr 29 00:06:28 2023 -0400 ext4: allow ext4_get_group_info() to fail Previously, ext4_get_group_info() would treat an invalid group number as BUG(), since in theory it should never happen. However, if a malicious attaker (or fuzzer) modifies the superblock via the block device while it is the file system is mounted, it is possible for s_first_data_block to get set to a very large number. In that case, when calculating the block group of some block number (such as the starting block of a preallocation region), could result in an underflow and very large block group number. Then the BUG_ON check in ext4_get_group_info() would fire, resutling in a denial of service attack that can be triggered by root or someone with write access to the block device. For a quality of implementation perspective, it's best that even if the system administrator does something that they shouldn't, that it will not trigger a BUG. So instead of BUG'ing, ext4_get_group_info() will call ext4_error and return NULL. We also add fallback code in all of the callers of ext4_get_group_info() that it might NULL. Also, since ext4_get_group_info() was already borderline to be an inline function, un-inline it. The results in a next reduction of the compiled text size of ext4 by roughly 2k. Cc: stable@kernel.org Link: https://lore.kernel.org/r/20230430154311.579720-2-tytso@mit.edu Reported-by: syzbot+e2efa3efc15a1c9e95c3@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=69b28112e098b070f639efb356393af3ffec4220 Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara commit 55720d242052e860b9fde445e302e0425722e7f1 Author: Geert Uytterhoeven Date: Tue May 9 14:34:22 2023 +0200 dt-bindings: iio: adc: renesas,rcar-gyroadc: Fix adi,ad7476 compatible value The conversion to json-schema accidentally dropped the "ad" part prefix from the compatible value. Fixes: 8c41245872e2 ("dt-bindings:iio:adc:renesas,rcar-gyroadc: txt to yaml conversion.") Signed-off-by: Geert Uytterhoeven Reviewed-by: Marek Vasut Reviewed-by: Krzysztof Kozlowski Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/6b328a3f52657c20759f3a5bb2fe033d47644ba8.1683635404.git.geert+renesas@glider.be Cc: Signed-off-by: Jonathan Cameron commit 09d3bec7009186bdba77039df01e5834788b3f95 Author: Marek Vasut Date: Thu May 11 02:43:30 2023 +0200 iio: dac: mcp4725: Fix i2c_master_send() return value handling The i2c_master_send() returns number of sent bytes on success, or negative on error. The suspend/resume callbacks expect zero on success and non-zero on error. Adapt the return value of the i2c_master_send() to the expectation of the suspend and resume callbacks, including proper validation of the return value. Fixes: cf35ad61aca2 ("iio: add mcp4725 I2C DAC driver") Signed-off-by: Marek Vasut Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230511004330.206942-1-marex@denx.de Cc: Signed-off-by: Jonathan Cameron commit 56cd3d1c5c5b073a1a444eafdcf97d4d866d351a Author: Matti Vaittinen Date: Fri May 12 10:53:41 2023 +0300 iio: accel: kx022a fix irq getting The fwnode_irq_get_byname() was returning 0 at device-tree mapping error. If this occurred, the KX022A driver did abort the probe but errorneously directly returned the return value from fwnode_irq_get_byname() from probe. In case of a device-tree mapping error this indicated success. The fwnode_irq_get_byname() has since been fixed to not return zero on error so the check for fwnode_irq_get_byname() can be relaxed to only treat negative values as errors. This will also do decent fix even when backported to branches where fwnode_irq_get_byname() can still return zero on error because KX022A probe should later fail at IRQ requesting and a prober error handling should follow. Relax the return value check for fwnode_irq_get_byname() to only treat negative values as errors. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202305110245.MFxC9bUj-lkp@intel.com/ Link: https://lore.kernel.org/r/202305110245.MFxC9bUj-lkp@intel.com/ Signed-off-by: Matti Vaittinen Fixes: 7c1d1677b322 ("iio: accel: Support Kionix/ROHM KX022A accelerometer") Link: https://lore.kernel.org/r/b45b4b638db109c6078d243252df3a7b0485f7d5.1683875389.git.mazziesaccount@gmail.com Cc: Signed-off-by: Jonathan Cameron commit d049151adde4ec17392592d145e94f0086f8ee80 Author: Matti Vaittinen Date: Mon May 8 14:01:25 2023 +0300 iio: bu27034: Ensure reset is written The reset bit must be always written to the hardware no matter what value is in a cache or register. Ensure this by using regmap_write_bits() instead of the regmap_update_bits(). Furthermore, the SWRESET bit may be self-clearing, so mark the SYSTEM_CONTROL register volatile to guarantee we do also read the right state - should we ever need to read it. Finally, writing the SWRESET bit will restore the default register values. This can cause register cache to be outdated if there are any register values cached. Rebuild register cache after SWRESET and use regmap_update_bits() when performing the reset. Signed-off-by: Matti Vaittinen Fixes: e52afbd61039 ("iio: light: ROHM BU27034 Ambient Light Sensor") Link: https://lore.kernel.org/r/ZFjWhbfuN5XcKty+@fedora Signed-off-by: Jonathan Cameron commit a146eccb68be161ae9eab5f3f68bb0ed7c0fbaa8 Author: Lukas Bulwahn Date: Mon May 8 06:02:08 2023 +0200 iio: dac: build ad5758 driver when AD5758 is selected Commit 28d1a7ac2a0d ("iio: dac: Add AD5758 support") adds the config AD5758 and the corresponding driver ad5758.c. In the Makefile, the ad5758 driver is however included when AD5755 is selected, not when AD5758 is selected. Probably, this was simply a mistake that happened by copy-and-paste and forgetting to adjust the actual line. Surprisingly, no one has ever noticed that this driver is actually only included when AD5755 is selected and that the config AD5758 has actually no effect on the build. Fixes: 28d1a7ac2a0d ("iio: dac: Add AD5758 support") Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20230508040208.12033-1-lukas.bulwahn@gmail.com Cc: Signed-off-by: Jonathan Cameron commit 24febc99ca725dcf42d57168a2f4e8a75a5ade92 Author: Rasmus Villemoes Date: Wed May 3 11:58:17 2023 +0200 iio: addac: ad74413: fix resistance input processing On success, ad74413r_get_single_adc_result() returns IIO_VAL_INT aka 1. So currently, the IIO_CHAN_INFO_PROCESSED case is effectively equivalent to the IIO_CHAN_INFO_RAW case, and we never call ad74413r_adc_to_resistance_result() to convert the adc measurement to ohms. Check ret for being negative rather than non-zero. Fixes: fea251b6a5dbd (iio: addac: add AD74413R driver) Signed-off-by: Rasmus Villemoes Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20230503095817.452551-1-linux@rasmusvillemoes.dk Cc: Signed-off-by: Jonathan Cameron commit a551c26e8e568fad42120843521529241b9bceec Author: Frank Li Date: Mon May 1 10:36:04 2023 -0400 iio: light: vcnl4035: fixed chip ID check VCNL4035 register(0xE) ID_L and ID_M define as: ID_L: 0x80 ID_H: 7:6 (0:0) 5:4 (0:0) slave address = 0x60 (7-bit) (0:1) slave address = 0x51 (7-bit) (1:0) slave address = 0x40 (7-bit) (1:0) slave address = 0x41 (7-bit) 3:0 Version code default (0:0:0:0) So just check ID_L. Fixes: 55707294c4eb ("iio: light: Add support for vishay vcnl4035") Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20230501143605.1615549-1-Frank.Li@nxp.com Cc: Signed-off-by: Jonathan Cameron commit 72c1d11074d6160f19760d57fc78b2a7f52bcb1a Author: Alexander Stein Date: Mon Apr 24 11:23:12 2023 +0200 dt-bindings: iio: imx8qxp-adc: add missing vref-supply Although this property is used right now for IIO_CHAN_INFO_SCALE, this ADC has two internal reference voltages, which the driver currently doesn't make use of. Fixes: db73419d8c06 ("dt-bindings: iio: adc: Add binding documentation for NXP IMX8QXP ADC") Signed-off-by: Alexander Stein Reviewed-by: Haibo Chen Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230424092312.61746-1-alexander.stein@ew.tq-group.com Signed-off-by: Jonathan Cameron commit 3e27ef0ced49f8ae7883c25fadf76a2086e99025 Author: Sean Nyekjaer Date: Wed May 3 18:20:29 2023 +0200 iio: adc: stm32-adc: skip adc-channels setup if none is present If only adc differential channels are defined driver will fail with stm32-adc: probe of 48003000.adc:adc@0 failed with error -22 Fix this by skipping the initialization if no channels are defined. This applies only to the legacy way of initializing adc channels. Fixes: d7705f35448a ("iio: adc: stm32-adc: convert to device properties") Signed-off-by: Sean Nyekjaer Reviewed-by: Olivier Moysan Link: https://lore.kernel.org/r/20230503162029.3654093-2-sean@geanix.com Cc: Signed-off-by: Jonathan Cameron commit 9c0d6ccd7d6bbd275e390b55a3390b4274291d95 Author: Sean Nyekjaer Date: Wed May 3 18:20:28 2023 +0200 iio: adc: stm32-adc: skip adc-diff-channels setup if none is present If no adc differential channels are defined driver will fail with EINVAL: stm32-adc: probe of 48003000.adc:adc@0 failed with error -22 Fix this by skipping the initialization if no channels are defined. This applies only to the legacy way of initializing adc channels. Fixes: d7705f35448a ("iio: adc: stm32-adc: convert to device properties") Signed-off-by: Sean Nyekjaer Link: https://lore.kernel.org/r/20230503162029.3654093-1-sean@geanix.com Cc: Signed-off-by: Jonathan Cameron commit e55245d115bb9054cb72cdd5dda5660f4484873a Author: Paul Cercueil Date: Thu Mar 30 12:21:00 2023 +0200 iio: adc: ad7192: Change "shorted" channels to differential The AD7192 provides a specific channel configuration where both negative and positive inputs are connected to AIN2. This was represented in the ad7192 driver as a IIO channel with .channel = 2 and .extended_name set to "shorted". The problem with this approach, is that the driver provided two IIO channels with the identifier .channel = 2; one "shorted" and the other not. This goes against the IIO ABI, as a channel identifier should be unique. Address this issue by changing "shorted" channels to being differential instead, with channel 2 vs. itself, as we're actually measuring AIN2 vs. itself. Note that the fix tag is for the commit that moved the driver out of staging. The bug existed before that, but backporting would become very complex further down and unlikely to happen. Fixes: b581f748cce0 ("staging: iio: adc: ad7192: move out of staging") Signed-off-by: Paul Cercueil Co-developed-by: Alisa Roman Signed-off-by: Alisa Roman Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20230330102100.17590-1-paul@crapouillou.net Cc: Signed-off-by: Jonathan Cameron commit 79b8ded9d9c595db9bd5b2f62f5f738b36de1e22 Author: Hans de Goede Date: Sun Apr 16 23:24:09 2023 +0200 iio: accel: st_accel: Fix invalid mount_matrix on devices without ACPI _ONT method When apply_acpi_orientation() fails, st_accel_common_probe() will fall back to iio_read_mount_matrix(), which checks for a mount-matrix device property and if that is not set falls back to the identity matrix. But when a sensor has no ACPI companion fwnode, or when the ACPI fwnode does not have a "_ONT" method apply_acpi_orientation() was returning 0, causing iio_read_mount_matrix() to never get called resulting in an invalid mount_matrix: [root@fedora ~]# cat /sys/bus/iio/devices/iio\:device0/mount_matrix (null), (null), (null); (null), (null), (null); (null), (null), (null) Fix this by making apply_acpi_orientation() always return an error when it did not set the mount_matrix. Fixes: 3d8ad94bb175 ("iio: accel: st_sensors: Support generic mounting matrix") Signed-off-by: Hans de Goede Reviewed-by: Linus Walleij Tested-by: Marius Hoch Link: https://lore.kernel.org/r/20230416212409.310936-1-hdegoede@redhat.com Cc: Signed-off-by: Jonathan Cameron commit e65065132fa6d9e1fd3b7418eae5215e3b7bf6c7 Author: Matti Vaittinen Date: Mon Apr 17 12:20:18 2023 +0300 iio: gts-helpers: fix integration time units The IIO ABI mandates expressing integration times in seconds. The GTS helper errorneously uses micro seconds in integration_times_available. Fix this by converting the lists to IIO_VAL_INT_PLUS_MICRO. Fixes: 38416c28e168 ("iio: light: Add gain-time-scale helpers") Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/eeacd192c259e885850b5a2dd8b776bccfc44fa8.1681722914.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit b7b04f393ffa1530213f522115e7d77761eb5c4f Author: Matti Vaittinen Date: Mon Apr 17 12:19:57 2023 +0300 iio: bu27034: Fix integration time The bu27034 uses micro seconds for integration time configuration. This is incorrect as the ABI mandates use of seconds. Change BU27034 driver to use seconds for integration time. Fixes: e52afbd61039 ("iio: light: ROHM BU27034 Ambient Light Sensor") Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/a05647669af22ba919c7c87dccb43975e3235a87.1681722914.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 672cde9ef80ffde9e76d38f7aa2b287c4a18de9a Author: Matti Vaittinen Date: Fri Apr 21 08:46:11 2023 +0300 iio: fix doc for iio_gts_find_sel_by_int_time The kerneldoc for iio_gts_find_sel_by_int_time() has an error. Documentation states that function is searching a selector for a HW-gain while it is searching a selector for an integration time. Fix the documentation by saying the function is looking for a selector for an integration time. Fixes: 38416c28e168 ("iio: light: Add gain-time-scale helpers") Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/ZEIjI4YUzqPZk/9X@fedora Signed-off-by: Jonathan Cameron commit 279c3a2a5eb2c1054fbe38e5c33be08584229047 Author: Dan Carpenter Date: Fri Apr 21 13:41:56 2023 +0300 iio: adc: palmas: fix off by one bugs Valid values for "adc_chan" are zero to (PALMAS_ADC_CH_MAX - 1). Smatch detects some buffer overflows caused by this: drivers/iio/adc/palmas_gpadc.c:721 palmas_gpadc_read_event_value() error: buffer overflow 'adc->thresholds' 16 <= 16 drivers/iio/adc/palmas_gpadc.c:758 palmas_gpadc_write_event_value() error: buffer overflow 'adc->thresholds' 16 <= 16 The effect of this bug in other functions is more complicated but obviously we should fix all of them. Fixes: a99544c6c883 ("iio: adc: palmas: add support for iio threshold events") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/14fee94a-7db7-4371-b7d6-e94d86b9561e@kili.mountain Signed-off-by: Jonathan Cameron commit 27b2ed5b6d53cd62fc61c3f259ae52f5cac23b66 Author: Jiakai Luo Date: Sat Apr 22 06:34:06 2023 -0700 iio: adc: mxs-lradc: fix the order of two cleanup operations Smatch reports: drivers/iio/adc/mxs-lradc-adc.c:766 mxs_lradc_adc_probe() warn: missing unwind goto? the order of three init operation: 1.mxs_lradc_adc_trigger_init 2.iio_triggered_buffer_setup 3.mxs_lradc_adc_hw_init thus, the order of three cleanup operation should be: 1.mxs_lradc_adc_hw_stop 2.iio_triggered_buffer_cleanup 3.mxs_lradc_adc_trigger_remove we exchange the order of two cleanup operations, introducing the following differences: 1.if mxs_lradc_adc_trigger_init fails, returns directly; 2.if trigger_init succeeds but iio_triggered_buffer_setup fails, goto err_trig and remove the trigger. In addition, we also reorder the unwind that goes on in the remove() callback to match the new ordering. Fixes: 6dd112b9f85e ("iio: adc: mxs-lradc: Add support for ADC driver") Signed-off-by: Jiakai Luo Reviewed-by: Dongliang Mu Link: https://lore.kernel.org/r/20230422133407.72908-1-jkluo@hust.edu.cn Cc: Signed-off-by: Jonathan Cameron commit 28f73ded19d403697f87473c9b85a27eb8ed9cf2 Author: Lars-Peter Clausen Date: Fri Apr 14 08:07:02 2023 -0700 iio: ad4130: Make sure clock provider gets removed The ad4130 driver registers a clock provider, but never removes it. This leaves a stale clock provider behind that references freed clocks when the device is unbound. Register a managed action to remove the clock provider when the device is removed. Fixes: 62094060cf3a ("iio: adc: ad4130: add AD4130 driver") Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230414150702.518441-1-lars@metafoo.de Cc: Signed-off-by: Jonathan Cameron commit 265c82ea8b172129cb6d4eff41af856c3aff6168 Author: Lars-Peter Clausen Date: Thu Apr 13 18:37:52 2023 -0700 iio: tmag5273: Fix runtime PM leak on measurement error The tmag5273 gets a runtime PM reference before reading a measurement and releases it when done. But if the measurement fails the tmag5273_read_raw() function exits before releasing the reference. Make sure that this error path also releases the runtime PM reference. Fixes: 866a1389174b ("iio: magnetometer: add ti tmag5273 driver") Signed-off-by: Lars-Peter Clausen Acked-by: Gerald Loacker Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20230414013752.498767-1-lars@metafoo.de Cc: Signed-off-by: Jonathan Cameron commit 00ffdd6fa90298522d45ca0c348b23485584dcdc Author: ChiaEn Wu Date: Mon Apr 10 18:34:22 2023 +0800 iio: adc: mt6370: Fix ibus and ibat scaling value of some specific vendor ID chips The scale value of ibus and ibat on the datasheet is incorrect due to the customer report after the experimentation with some specific vendor ID chips. Fixes: c1404d1b659f ("iio: adc: mt6370: Add MediaTek MT6370 support") Signed-off-by: ChiaEn Wu Reviewed-by: Alexandre Mergnat Link: https://lore.kernel.org/r/1681122862-1994-1-git-send-email-chiaen_wu@richtek.com Cc: Signed-off-by: Jonathan Cameron commit 20f291b88ecf23f674ee2ed980a4d93b7f16a06f Author: Dan Carpenter Date: Tue Feb 14 18:47:30 2023 +0300 iio: adc: imx93: fix a signedness bug in imx93_adc_read_raw() The problem is these lines: ret = vref_uv = regulator_get_voltage(adc->vref); if (ret < 0) The "ret" variable is type long and "vref_uv" is u32 so that means the condition can never be true on a 64bit system. A negative error code from regulator_get_voltage() would be cast to a high positive u32 value and then remain a high positive value when cast to a long. The "ret" variable only ever stores ints so it should be declared as an int. We can delete the "vref_uv" variable and use "ret" directly. Fixes: 7d02296ac8b8 ("iio: adc: add imx93 adc support") Signed-off-by: Dan Carpenter Reviewed-by: Haibo Chen Link: https://lore.kernel.org/r/Y+utEvjfjQRQo2QB@kili Signed-off-by: Jonathan Cameron commit 5325593377f07de31f7e473a9677a28a04c891f3 Author: Tianling Shen Date: Thu May 11 00:18:50 2023 +0800 arm64: dts: rockchip: fix button reset pin for nanopi r5c The reset pin was wrongly assigned due to a copy/paste error, fix it to match actual gpio pin. While at it, remove a blank line from nanopi r5s dts. Fixes: 05620031408a ("arm64: dts: rockchip: Add FriendlyARM NanoPi R5C") Signed-off-by: Tianling Shen Link: https://lore.kernel.org/r/20230510161850.4866-1-cnsztl@gmail.com Signed-off-by: Heiko Stuebner commit b41caaded077aa8e7617c15e87d0503df8e7739e Merge: 843eb679d8311 6b45d5ff8c2c6 Author: David S. Miller Date: Sat May 13 17:12:24 2023 +0100 Merge branch 'hns3-fixes' Hao Lan says: ==================== net: hns3: fix some bug for hns3 There are some bugfixes for the HNS3 ethernet driver. patch#1 fix miss checking for rx packet. patch#2 fixes VF promisc mode not update when mac table full bug, and patch#3 fixes a nterrupts not initialization in VF FLR bug. ==================== Signed-off-by: David S. Miller commit 6b45d5ff8c2c61baddd67d7510075ae121c5e704 Author: Jijie Shao Date: Fri May 12 18:00:14 2023 +0800 net: hns3: fix reset timeout when enable full VF The timeout of the cmdq reset command has been increased to resolve the reset timeout issue in the full VF scenario. The timeout of other cmdq commands remains unchanged. Fixes: 8d307f8e8cf1 ("net: hns3: create new set of unified hclge_comm_cmd_send APIs") Signed-off-by: Jijie Shao Signed-off-by: Hao Lan Signed-off-by: David S. Miller commit 814d0c786068e858d889ada3153bff82f64223ad Author: Jie Wang Date: Fri May 12 18:00:13 2023 +0800 net: hns3: fix reset delay time to avoid configuration timeout Currently the hns3 vf function reset delays 5000ms before vf rebuild process. In product applications, this delay is too long for application configurations and causes configuration timeout. According to the tests, 500ms delay is enough for reset process except PF FLR. So this patch modifies delay to 500ms in these scenarios. Fixes: 6988eb2a9b77 ("net: hns3: Add support to reset the enet/ring mgmt layer") Signed-off-by: Jie Wang Signed-off-by: Hao Lan Signed-off-by: David S. Miller commit f14db07064727dd3bc0906c77a6d2759c1bbb395 Author: Jijie Shao Date: Fri May 12 18:00:12 2023 +0800 net: hns3: fix sending pfc frames after reset issue To prevent the system from abnormally sending PFC frames after an abnormal reset. The hns3 driver notifies the firmware to disable pfc before reset. Fixes: 35d93a30040c ("net: hns3: adjust the process of PF reset") Signed-off-by: Jijie Shao Signed-off-by: Hao Lan Signed-off-by: David S. Miller commit 89f6bfb071182f05d7188c255b0e7251c3806f16 Author: Jie Wang Date: Fri May 12 18:00:11 2023 +0800 net: hns3: fix output information incomplete for dumping tx queue info with debugfs In function hns3_dump_tx_queue_info, The print buffer is not enough when the tx BD number is configured to 32760. As a result several BD information wouldn't be displayed. So fix it by increasing the tx queue print buffer length. Fixes: 630a6738da82 ("net: hns3: adjust string spaces of some parameters of tx bd info in debugfs") Signed-off-by: Jie Wang Signed-off-by: Hao Lan Signed-off-by: David S. Miller commit 843eb679d831130c381aaf1ec3bfb9206921cc62 Merge: d80fc101d2eb9 ec52b69c046a6 Author: David S. Miller Date: Sat May 13 17:06:38 2023 +0100 Merge branch 'dsa-rzn1-a5psw-stp' Alexis Lothoré says: ==================== net: dsa: rzn1-a5psw: fix STP states handling This small series fixes STP support and while adding a new function to enable/disable learning, use that to disable learning on standalone ports at switch setup as reported by Vladimir Oltean. This series was initially submitted on net-next by Clement Leger, but some career evolutions has made him hand me over those topics. Also, this new revision is submitted on net instead of net-next for V1 based on Vladimir Oltean's suggestion Changes since v2: - fix commit split by moving A5PSW_MGMT_CFG_ENABLE in relevant commit - fix reverse christmas tree ordering in a5psw_port_stp_state_set Changes since v1: - fix typos in commit messages and doc - re-split STP states handling commit - add Fixes: tag and new Signed-off-by - submit series as fix on net instead of net-next - split learning and blocking setting functions - remove unused define A5PSW_PORT_ENA_TX_SHIFT - add boolean for tx/rx enabled for clarity ==================== Signed-off-by: David S. Miller commit ec52b69c046a6219011af780aca155a96719637b Author: Clément Léger Date: Fri May 12 09:27:12 2023 +0200 net: dsa: rzn1-a5psw: disable learning for standalone ports When ports are in standalone mode, they should have learning disabled to avoid adding new entries in the MAC lookup table which might be used by other bridge ports to forward packets. While adding that, also make sure learning is enabled for CPU port. Fixes: 888cdb892b61 ("net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver") Signed-off-by: Clément Léger Signed-off-by: Alexis Lothoré Reviewed-by: Piotr Raczynski Signed-off-by: David S. Miller commit ebe9bc50952757b4b25eaf514da7c464196c9606 Author: Alexis Lothoré Date: Fri May 12 09:27:11 2023 +0200 net: dsa: rzn1-a5psw: fix STP states handling stp_set_state() should actually allow receiving BPDU while in LEARNING mode which is not the case. Additionally, the BLOCKEN bit does not actually forbid sending forwarded frames from that port. To fix this, add a5psw_port_tx_enable() function which allows to disable TX. However, while its name suggest that TX is totally disabled, it is not and can still allow to send BPDUs even if disabled. This can be done by using forced forwarding with the switch tagging mechanism but keeping "filtering" disabled (which is already the case in the rzn1-a5sw tag driver). With these fixes, STP support is now functional. Fixes: 888cdb892b61 ("net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver") Signed-off-by: Clément Léger Signed-off-by: Alexis Lothoré Signed-off-by: David S. Miller commit 9e4b45f20c5aac786c728619e5ee746bffce1798 Author: Clément Léger Date: Fri May 12 09:27:10 2023 +0200 net: dsa: rzn1-a5psw: enable management frames for CPU port Currently, management frame were discarded before reaching the CPU port due to a misconfiguration of the MGMT_CONFIG register. Enable them by setting the correct value in this register in order to correctly receive management frame and handle STP. Fixes: 888cdb892b61 ("net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver") Signed-off-by: Clément Léger Signed-off-by: Alexis Lothoré Reviewed-by: Piotr Raczynski Signed-off-by: David S. Miller commit d80fc101d2eb9b3188c228d61223890aeea480a4 Author: Xin Long Date: Thu May 11 19:22:11 2023 -0400 erspan: get the proto with the md version for collect_md In commit 20704bd1633d ("erspan: build the header with the right proto according to erspan_ver"), it gets the proto with t->parms.erspan_ver, but t->parms.erspan_ver is not used by collect_md branch, and instead it should get the proto with md->version for collect_md. Thanks to Kevin for pointing this out. Fixes: 20704bd1633d ("erspan: build the header with the right proto according to erspan_ver") Fixes: 94d7d8f29287 ("ip6_gre: add erspan v2 support") Reported-by: Kevin Traynor Signed-off-by: Xin Long Reviewed-by: Simon Horman Reviewed-by: William Tu Signed-off-by: David S. Miller commit d4d58949a6eac1c45ab022562c8494725e1ac094 Merge: 9a48d60467222 56cdea92ed915 Author: Linus Torvalds Date: Sat May 13 09:51:03 2023 -0500 Merge tag 'block-6.4-2023-05-13' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: "Just a few minor fixes for drivers, and a deletion of a file that is woefully out-of-date these days" * tag 'block-6.4-2023-05-13' of git://git.kernel.dk/linux: Documentation/block: drop the request.rst file ublk: fix command op code check block/rnbd: replace REQ_OP_FLUSH with REQ_OP_WRITE nbd: Fix debugfs_create_dir error checking commit 0fa53349c3acba0239369ba4cd133740a408d246 Author: Carlos Llamas Date: Tue May 2 20:12:19 2023 +0000 binder: add lockless binder_alloc_(set|get)_vma() Bring back the original lockless design in binder_alloc to determine whether the buffer setup has been completed by the ->mmap() handler. However, this time use smp_load_acquire() and smp_store_release() to wrap all the ordering in a single macro call. Also, add comments to make it evident that binder uses alloc->vma to determine when the binder_alloc has been fully initialized. In these scenarios acquiring the mmap_lock is not required. Fixes: a43cfc87caaf ("android: binder: stop saving a pointer to the VMA") Cc: Liam Howlett Cc: Suren Baghdasaryan Cc: stable@vger.kernel.org Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20230502201220.1756319-3-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit c0fd2101781ef761b636769b2f445351f71c3626 Author: Carlos Llamas Date: Tue May 2 20:12:18 2023 +0000 Revert "android: binder: stop saving a pointer to the VMA" This reverts commit a43cfc87caaf46710c8027a8c23b8a55f1078f19. This patch fixed an issue reported by syzkaller in [1]. However, this turned out to be only a band-aid in binder. The root cause, as bisected by syzkaller, was fixed by commit 5789151e48ac ("mm/mmap: undo ->mmap() when mas_preallocate() fails"). We no longer need the patch for binder. Reverting such patch allows us to have a lockless access to alloc->vma in specific cases where the mmap_lock is not required. This approach avoids the contention that caused a performance regression. [1] https://lore.kernel.org/all/0000000000004a0dbe05e1d749e0@google.com [cmllamas: resolved conflicts with rework of alloc->mm and removal of binder_alloc_set_vma() also fixed comment section] Fixes: a43cfc87caaf ("android: binder: stop saving a pointer to the VMA") Cc: Liam Howlett Cc: Suren Baghdasaryan Cc: stable@vger.kernel.org Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20230502201220.1756319-2-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit b15655b12ddca7ade09807f790bafb6fab61b50a Author: Carlos Llamas Date: Tue May 2 20:12:17 2023 +0000 Revert "binder_alloc: add missing mmap_lock calls when using the VMA" This reverts commit 44e602b4e52f70f04620bbbf4fe46ecb40170bde. This caused a performance regression particularly when pages are getting reclaimed. We don't need to acquire the mmap_lock to determine when the binder buffer has been fully initialized. A subsequent patch will bring back the lockless approach for this. [cmllamas: resolved trivial conflicts with renaming of alloc->mm] Fixes: 44e602b4e52f ("binder_alloc: add missing mmap_lock calls when using the VMA") Cc: Liam Howlett Cc: Suren Baghdasaryan Cc: stable@vger.kernel.org Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20230502201220.1756319-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit bdc1c5fac982845a58d28690cdb56db8c88a530d Author: Carlos Llamas Date: Fri May 5 20:30:20 2023 +0000 binder: fix UAF caused by faulty buffer cleanup In binder_transaction_buffer_release() the 'failed_at' offset indicates the number of objects to clean up. However, this function was changed by commit 44d8047f1d87 ("binder: use standard functions to allocate fds"), to release all the objects in the buffer when 'failed_at' is zero. This introduced an issue when a transaction buffer is released without any objects having been processed so far. In this case, 'failed_at' is indeed zero yet it is misinterpreted as releasing the entire buffer. This leads to use-after-free errors where nodes are incorrectly freed and subsequently accessed. Such is the case in the following KASAN report: ================================================================== BUG: KASAN: slab-use-after-free in binder_thread_read+0xc40/0x1f30 Read of size 8 at addr ffff4faf037cfc58 by task poc/474 CPU: 6 PID: 474 Comm: poc Not tainted 6.3.0-12570-g7df047b3f0aa #5 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0x94/0xec show_stack+0x18/0x24 dump_stack_lvl+0x48/0x60 print_report+0xf8/0x5b8 kasan_report+0xb8/0xfc __asan_load8+0x9c/0xb8 binder_thread_read+0xc40/0x1f30 binder_ioctl+0xd9c/0x1768 __arm64_sys_ioctl+0xd4/0x118 invoke_syscall+0x60/0x188 [...] Allocated by task 474: kasan_save_stack+0x3c/0x64 kasan_set_track+0x2c/0x40 kasan_save_alloc_info+0x24/0x34 __kasan_kmalloc+0xb8/0xbc kmalloc_trace+0x48/0x5c binder_new_node+0x3c/0x3a4 binder_transaction+0x2b58/0x36f0 binder_thread_write+0x8e0/0x1b78 binder_ioctl+0x14a0/0x1768 __arm64_sys_ioctl+0xd4/0x118 invoke_syscall+0x60/0x188 [...] Freed by task 475: kasan_save_stack+0x3c/0x64 kasan_set_track+0x2c/0x40 kasan_save_free_info+0x38/0x5c __kasan_slab_free+0xe8/0x154 __kmem_cache_free+0x128/0x2bc kfree+0x58/0x70 binder_dec_node_tmpref+0x178/0x1fc binder_transaction_buffer_release+0x430/0x628 binder_transaction+0x1954/0x36f0 binder_thread_write+0x8e0/0x1b78 binder_ioctl+0x14a0/0x1768 __arm64_sys_ioctl+0xd4/0x118 invoke_syscall+0x60/0x188 [...] ================================================================== In order to avoid these issues, let's always calculate the intended 'failed_at' offset beforehand. This is renamed and wrapped in a helper function to make it clear and convenient. Fixes: 32e9f56a96d8 ("binder: don't detect sender/target during buffer cleanup") Reported-by: Zi Fan Tan Cc: stable@vger.kernel.org Signed-off-by: Carlos Llamas Acked-by: Todd Kjos Link: https://lore.kernel.org/r/20230505203020.4101154-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 000dcaa5c0a0fc5fb621a50a46cb74264ad115d6 Merge: ac9a78681b921 04ac7f98b9218 Author: Greg Kroah-Hartman Date: Sat May 13 20:16:46 2023 +0900 Merge tag 'coresight-fixes-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-linus Suzuki writes: coresight: Fixes for v6.4 Couple of fixes for coresight self-hosted tracing subsystem for v6.4. These include : - Fix signedness bug in tmc_etr_buf_insert_barrier_packet() - Fix memory leak with failing to release the path if trace-id allocation fails Signed-off-by: Suzuki K Poulose * tag 'coresight-fixes-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux: coresight: perf: Release Coresight path when alloc trace id failed coresight: Fix signedness bug in tmc_etr_buf_insert_barrier_packet() commit 8fb9ea65c9d1338b0d2bb0a9122dc942cdd32357 Author: George Kennedy Date: Fri May 12 06:08:48 2023 -0500 vc_screen: reload load of struct vc_data pointer in vcs_write() to avoid UAF After a call to console_unlock() in vcs_write() the vc_data struct can be freed by vc_port_destruct(). Because of that, the struct vc_data pointer must be reloaded in the while loop in vcs_write() after console_lock() to avoid a UAF when vcs_size() is called. Syzkaller reported a UAF in vcs_size(). BUG: KASAN: slab-use-after-free in vcs_size (drivers/tty/vt/vc_screen.c:215) Read of size 4 at addr ffff8880beab89a8 by task repro_vcs_size/4119 Call Trace: __asan_report_load4_noabort (mm/kasan/report_generic.c:380) vcs_size (drivers/tty/vt/vc_screen.c:215) vcs_write (drivers/tty/vt/vc_screen.c:664) vfs_write (fs/read_write.c:582 fs/read_write.c:564) ... Allocated by task 1213: kmalloc_trace (mm/slab_common.c:1064) vc_allocate (./include/linux/slab.h:559 ./include/linux/slab.h:680 drivers/tty/vt/vt.c:1078 drivers/tty/vt/vt.c:1058) con_install (drivers/tty/vt/vt.c:3334) tty_init_dev (drivers/tty/tty_io.c:1303 drivers/tty/tty_io.c:1415 drivers/tty/tty_io.c:1392) tty_open (drivers/tty/tty_io.c:2082 drivers/tty/tty_io.c:2128) chrdev_open (fs/char_dev.c:415) do_dentry_open (fs/open.c:921) vfs_open (fs/open.c:1052) ... Freed by task 4116: kfree (mm/slab_common.c:1016) vc_port_destruct (drivers/tty/vt/vt.c:1044) tty_port_destructor (drivers/tty/tty_port.c:296) tty_port_put (drivers/tty/tty_port.c:312) vt_disallocate_all (drivers/tty/vt/vt_ioctl.c:662 (discriminator 2)) vt_ioctl (drivers/tty/vt/vt_ioctl.c:903) tty_ioctl (drivers/tty/tty_io.c:2778) ... The buggy address belongs to the object at ffff8880beab8800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 424 bytes inside of freed 1024-byte region [ffff8880beab8800, ffff8880beab8c00) The buggy address belongs to the physical page: page:00000000afc77580 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xbeab8 head:00000000afc77580 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfffffc0010200(slab|head|node=0|zone=1|lastcpupid=0x1fffff) page_type: 0xffffffff() raw: 000fffffc0010200 ffff888100042dc0 ffffea000426de00 dead000000000002 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880beab8880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880beab8900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880beab8980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880beab8a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880beab8a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Disabling lock debugging due to kernel taint Fixes: ac751efa6a0d ("console: rename acquire/release_console_sem() to console_lock/unlock()") Cc: stable Reported-by: syzkaller Signed-off-by: George Kennedy Reviewed-by: Thomas Weißschuh Link: https://lore.kernel.org/r/1683889728-10411-1-git-send-email-george.kennedy@oracle.com Signed-off-by: Greg Kroah-Hartman commit 5f949f140f73696f64acb89a1f16ff9153d017e0 Author: Krzysztof Kozlowski Date: Fri May 5 17:23:01 2023 +0200 serial: qcom-geni: fix enabling deactivated interrupt The driver have a race, experienced only with PREEMPT_RT patchset: CPU0 | CPU1 ================================================================== qcom_geni_serial_probe | uart_add_one_port | | serdev_drv_probe | qca_serdev_probe | serdev_device_open | uart_open | uart_startup | qcom_geni_serial_startup | enable_irq | __irq_startup | WARN_ON() | IRQ not activated request_threaded_irq | irq_domain_activate_irq | The warning: 894000.serial: ttyHS1 at MMIO 0x894000 (irq = 144, base_baud = 0) is a MSM serial serial0: tty port ttyHS1 registered WARNING: CPU: 7 PID: 107 at kernel/irq/chip.c:241 __irq_startup+0x78/0xd8 ... qcom_geni_serial 894000.serial: serial engine reports 0 RX bytes in! Adding UART port triggers probe of child serial devices - serdev and eventually Qualcomm Bluetooth hci_qca driver. This opens UART port which enables the interrupt before it got activated in request_threaded_irq(). The issue originates in commit f3974413cf02 ("tty: serial: qcom_geni_serial: Wakeup IRQ cleanup") and discussion on mailing list [1]. However the above commit does not explain why the uart_add_one_port() is moved above requesting interrupt. [1] https://lore.kernel.org/all/5d9f3dfa.1c69fb81.84c4b.30bf@mx.google.com/ Fixes: f3974413cf02 ("tty: serial: qcom_geni_serial: Wakeup IRQ cleanup") Cc: Cc: Stephen Boyd Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20230505152301.2181270-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit f264f2f6f4788dc031cef60a0cf2881902736709 Author: Doug Berger Date: Thu Apr 27 11:19:16 2023 -0700 serial: 8250_bcm7271: fix leak in `brcmuart_probe` Smatch reports: drivers/tty/serial/8250/8250_bcm7271.c:1120 brcmuart_probe() warn: 'baud_mux_clk' from clk_prepare_enable() not released on lines: 1032. The issue is fixed by using a managed clock. Fixes: 41a469482de2 ("serial: 8250: Add new 8250-core based Broadcom STB driver") Reported-by: XuDong Liu Link: https://lore.kernel.org/lkml/20230424125100.4783-1-m202071377@hust.edu.cn/ Signed-off-by: Doug Berger Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20230427181916.2983697-3-opendmb@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8a3b5477256a54ae4a470dcebbcf8cdc18e4696d Author: Doug Berger Date: Thu Apr 27 11:19:15 2023 -0700 serial: 8250_bcm7271: balance clk_enable calls The sw_baud clock must be disabled when the device driver is not connected to the device. This now occurs when probe fails and upon remove. Fixes: 41a469482de2 ("serial: 8250: Add new 8250-core based Broadcom STB driver") Reported-by: XuDong Liu Link: https://lore.kernel.org/lkml/20230424125100.4783-1-m202071377@hust.edu.cn/ Signed-off-by: Doug Berger Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20230427181916.2983697-2-opendmb@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8ab5fc55d7f65d58a3c3aeadf11bdf60267cd2bd Author: Ke Zhang Date: Fri Apr 28 11:16:36 2023 +0800 serial: arc_uart: fix of_iomap leak in `arc_serial_probe` Smatch reports: drivers/tty/serial/arc_uart.c:631 arc_serial_probe() warn: 'port->membase' from of_iomap() not released on lines: 631. In arc_serial_probe(), if uart_add_one_port() fails, port->membase is not released, which would cause a resource leak. To fix this, I replace of_iomap with devm_platform_ioremap_resource. Fixes: 8dbe1d5e09a7 ("serial/arc: inline the probe helper") Signed-off-by: Ke Zhang Reviewed-by: Dongliang Mu Link: https://lore.kernel.org/r/20230428031636.44642-1-m202171830@hust.edu.cn Signed-off-by: Greg Kroah-Hartman commit f16182ed9d8430adfab77f5929c23756c94b0230 Author: Geert Uytterhoeven Date: Fri Apr 21 11:58:06 2023 +0200 serial: 8250: Document termios parameter of serial8250_em485_config() With W=1: drivers/tty/serial/8250/8250_port.c:679: warning: Function parameter or member 'termios' not described in 'serial8250_em485_config' Fix this by documenting the parameter. Fixes: ae50bb2752836277 ("serial: take termios_rwsem for ->rs485_config() & pass termios as param") Signed-off-by: Geert Uytterhoeven Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/2bd1e62be1d5d33333002910372feecc6d52e78f.1682071013.git.geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit d2b00516de0e1d696724247098f6733a6ea53908 Author: Vitaliy Tomin Date: Sun Apr 23 11:45:12 2023 +0800 serial: Add support for Advantech PCI-1611U card Add support for Advantech PCI-1611U card Advantech provides opensource drivers for this and many others card based on legacy copy of 8250_pci driver called adv950 https://www.advantech.com/emt/support/details/driver?id=1-TDOIMJ It is hard to maintain to run as out of tree module on newer kernels. Just adding PCI ID to kernel 8250_pci works perfect. Signed-off-by: Vitaliy Tomin Cc: stable Link: https://lore.kernel.org/r/20230423034512.2671157-1-tomin@iszf.irk.ru Signed-off-by: Greg Kroah-Hartman commit 95d698869b404772cc8b72560df71548491c10bc Author: Andrew Davis Date: Thu Apr 20 11:02:09 2023 -0500 serial: 8250_exar: Add support for USR298x PCI Modems Possibly the last PCI controller-based (i.e. not a soft/winmodem) dial-up modem one can still buy. Looks to have a stock XR17C154 PCI UART chip for communication, but for some reason when provisioning the PCI IDs they swapped the vendor and subvendor IDs. Otherwise this card would have worked out of the box. Searching online, some folks seem to not have this issue and others do, so it is possible only some batches of cards have this error. Create a new macro to handle the switched IDs and add support here. Signed-off-by: Andrew Davis Cc: stable Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230420160209.28221-1-afd@ti.com Signed-off-by: Greg Kroah-Hartman commit a398d5eac6984316e71474e25b975688f282379b Author: Maxime Bizon Date: Fri May 5 13:47:59 2023 +0200 usb-storage: fix deadlock when a scsi command timeouts more than once With faulty usb-storage devices, read/write can timeout, in that case the SCSI layer will abort and re-issue the command. USB storage has no internal timeout, it relies on SCSI layer aborting commands via .eh_abort_handler() for non those responsive devices. After two consecutive timeouts of the same command, SCSI layer calls .eh_device_reset_handler(), without calling .eh_abort_handler() first. With usb-storage, this causes a deadlock: -> .eh_device_reset_handler -> device_reset -> mutex_lock(&(us->dev_mutex)); mutex already by usb_stor_control_thread(), which is waiting for command completion: -> usb_stor_control_thread (mutex taken here) -> usb_stor_invoke_transport -> usb_stor_Bulk_transport -> usb_stor_bulk_srb -> usb_stor_bulk_transfer_sglist -> usb_sg_wait Make sure we cancel any pending command in .eh_device_reset_handler() to avoid this. Signed-off-by: Maxime Bizon Cc: linux-usb@vger.kernel.org Cc: stable Link: https://lore.kernel.org/all/ZEllnjMKT8ulZbJh@sakura/ Reviewed-by: Alan Stern Acked-by: Alan Stern Link: https://lore.kernel.org/r/20230505114759.1189741-1-mbizon@freebox.fr Signed-off-by: Greg Kroah-Hartman commit 8018018d9c56473067e5358986ce0ee9ce56949f Author: Dan Carpenter Date: Thu May 4 17:59:24 2023 +0300 usb: dwc3: fix a test for error in dwc3_core_init() This was refactored recently and the "ret = " was accidentally deleted so the errors aren't checked. Fixes: 1d72fab47656 ("USB: dwc3: refactor phy handling") Signed-off-by: Dan Carpenter Reviewed-by: Johan Hovold Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/d0c5a04f-deee-4ebe-9b0b-dc5492564519@kili.mountain Signed-off-by: Greg Kroah-Hartman commit 94ea04ec790887b5b0e43429a92c18a1e692ec08 Author: Roger Quadros Date: Fri Apr 21 13:17:20 2023 +0300 usb: typec: tps6598x: Fix fault at module removal We need to cancel the delayed workqueue if it is being used else it will cause paging request fault during module removal. Fixes: 0d6a119cecd7 ("usb: typec: tps6598x: Add support for polling interrupts status") Signed-off-by: Roger Quadros Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230421101720.34318-1-rogerq@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3c0f4f09c063e143822393d99cb2b19a85451c07 Author: Konrad Gräfe Date: Fri May 5 16:36:40 2023 +0200 usb: gadget: u_ether: Fix host MAC address case The CDC-ECM specification [1] requires to send the host MAC address as an uppercase hexadecimal string in chapter "5.4 Ethernet Networking Functional Descriptor": The Unicode character is chosen from the set of values 30h through 39h and 41h through 46h (0-9 and A-F). However, snprintf(.., "%pm", ..) generates a lowercase MAC address string. While most host drivers are tolerant to this, UsbNcm.sys on Windows 10 is not. Instead it uses a different MAC address with all bytes set to zero including and after the first byte containing a lowercase letter. On Windows 11 Microsoft fixed it, but apparently they did not backport the fix. This change fixes the issue by upper-casing the MAC to comply with the specification. [1]: https://www.usb.org/document-library/class-definitions-communication-devices-12, file ECM120.pdf Fixes: bcd4a1c40bee ("usb: gadget: u_ether: construct with default values and add setters/getters") Cc: stable@vger.kernel.org Signed-off-by: Konrad Gräfe Link: https://lore.kernel.org/r/20230505143640.443014-1-k.graefe@gateware.de Signed-off-by: Greg Kroah-Hartman commit d8f28269dd4bf9b55c3fb376ae31512730a96fce Author: Badhri Jagan Sridharan Date: Mon May 8 21:44:43 2023 +0000 usb: typec: altmodes/displayport: fix pin_assignment_show This patch fixes negative indexing of buf array in pin_assignment_show when get_current_pin_assignments returns 0 i.e. no compatible pin assignments are found. BUG: KASAN: use-after-free in pin_assignment_show+0x26c/0x33c ... Call trace: dump_backtrace+0x110/0x204 dump_stack_lvl+0x84/0xbc print_report+0x358/0x974 kasan_report+0x9c/0xfc __do_kernel_fault+0xd4/0x2d4 do_bad_area+0x48/0x168 do_tag_check_fault+0x24/0x38 do_mem_abort+0x6c/0x14c el1_abort+0x44/0x68 el1h_64_sync_handler+0x64/0xa4 el1h_64_sync+0x78/0x7c pin_assignment_show+0x26c/0x33c dev_attr_show+0x50/0xc0 Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode") Cc: stable@vger.kernel.org Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230508214443.893436-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit f22e9b67f19ccc73de1ae04375d4b30684e261f8 Author: Francesco Dolcini Date: Fri May 12 15:14:35 2023 +0200 Revert "usb: gadget: udc: core: Invoke usb_gadget_connect only when started" This reverts commit 0db213ea8eed5534a5169e807f28103cbc9d23df. It introduces an issues with configuring the USB gadget hangs forever on multiple Qualcomm and NXP i.MX SoC at least. Cc: stable@vger.kernel.org Fixes: 0db213ea8eed ("usb: gadget: udc: core: Invoke usb_gadget_connect only when started") Reported-by: Stephan Gerhold Reported-by: Francesco Dolcini Link: https://lore.kernel.org/all/ZF4BvgsOyoKxdPFF@francesco-nb.int.toradex.com/ Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20230512131435.205464-3-francesco@dolcini.it Signed-off-by: Greg Kroah-Hartman commit 5e1617210aede9f1b91bb9819c93097b6da481f9 Author: Francesco Dolcini Date: Fri May 12 15:14:34 2023 +0200 Revert "usb: gadget: udc: core: Prevent redundant calls to pullup" This reverts commit a3afbf5cc887fc3401f012fe629810998ed61859. This depends on commit 0db213ea8eed ("usb: gadget: udc: core: Invoke usb_gadget_connect only when started") that introduces a regression, revert it till the issue is fixed. Cc: stable@vger.kernel.org Reported-by: Stephan Gerhold Reported-by: Francesco Dolcini Link: https://lore.kernel.org/all/ZF4BvgsOyoKxdPFF@francesco-nb.int.toradex.com/ Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20230512131435.205464-2-francesco@dolcini.it Signed-off-by: Greg Kroah-Hartman commit 8432a15cd810c99db464b7e7858d559f3e1920e3 Author: Jó Ágila Bitsch Date: Sat Apr 22 18:05:32 2023 +0200 usb: gadget: drop superfluous ':' in doc string There was one superfluous ':' that kernel-doc complained about. Reported-by: Randy Dunlap Closes: https://lore.kernel.org/all/c718a490-028d-2682-9ad7-8256d16504bf@infradead.org/ Fixes: fb6211f1584a ("usb: gadget: add doc to struct usb_composite_dev") Signed-off-by: Jó Ágila Bitsch Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/ZEQFzMntIrwvZl4+@jo-einhundert Signed-off-by: Greg Kroah-Hartman commit 614ce6a2ea50068b45339257891e51e639ac9001 Author: Udipto Goswami Date: Tue May 9 20:18:36 2023 +0530 usb: dwc3: debugfs: Resume dwc3 before accessing registers When the dwc3 device is runtime suspended, various required clocks are in disabled state and it is not guaranteed that access to any registers would work. Depending on the SoC glue, a register read could be as benign as returning 0 or be fatal enough to hang the system. In order to prevent such scenarios of fatal errors, make sure to resume dwc3 then allow the function to proceed. Fixes: 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver") Cc: stable@vger.kernel.org #3.2: 30332eeefec8: debugfs: regset32: Add Runtime PM support Signed-off-by: Udipto Goswami Reviewed-by: Johan Hovold Tested-by: Johan Hovold Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20230509144836.6803-1-quic_ugoswami@quicinc.com Signed-off-by: Greg Kroah-Hartman commit dddb342b5b9e482bb213aecc08cbdb201ea4f8da Author: Weitao Wang Date: Sun Apr 23 18:59:52 2023 +0800 USB: UHCI: adjust zhaoxin UHCI controllers OverCurrent bit value OverCurrent condition is not standardized in the UHCI spec. Zhaoxin UHCI controllers report OverCurrent bit active off. In order to handle OverCurrent condition correctly, the uhci-hcd driver needs to be told to expect the active-off behavior. Suggested-by: Alan Stern Cc: stable@vger.kernel.org Signed-off-by: Weitao Wang Acked-by: Alan Stern Link: https://lore.kernel.org/r/20230423105952.4526-1-WeitaoWang-oc@zhaoxin.com Signed-off-by: Greg Kroah-Hartman commit 4e8ef34e36f2839ef8c8da521ab7035956436818 Author: Linyu Yuan Date: Fri May 12 08:45:24 2023 +0800 usb: dwc3: fix gadget mode suspend interrupt handler issue When work in gadget mode, currently driver doesn't update software level link_state correctly as link state change event is not enabled for most devices, in function dwc3_gadget_suspend_interrupt(), it will only pass suspend event to UDC core when software level link state changes, so when interrupt generated in sequences of suspend -> reset -> conndone -> suspend, link state is not updated during reset and conndone, so second suspend interrupt event will not pass to UDC core. Remove link_state compare in dwc3_gadget_suspend_interrupt() and add a suspended flag to replace the compare function. Fixes: 799e9dc82968 ("usb: dwc3: gadget: conditionally disable Link State change events") Cc: stable Acked-by: Thinh Nguyen Signed-off-by: Linyu Yuan Link: https://lore.kernel.org/r/20230512004524.31950-1-quic_linyyuan@quicinc.com Signed-off-by: Greg Kroah-Hartman commit c8540870af4ce6ddeb27a7bb5498b75fb29b643c Author: Roger Quadros Date: Wed May 3 14:00:48 2023 +0300 usb: dwc3: gadget: Improve dwc3_gadget_suspend() and dwc3_gadget_resume() Prevent -ETIMEDOUT error on .suspend(). e.g. If gadget driver is loaded and we are connected to a USB host, all transfers must be stopped before stopping the controller else we will not get a clean stop i.e. dwc3_gadget_run_stop() will take several seconds to complete and will return -ETIMEDOUT. Handle error cases properly in dwc3_gadget_suspend(). Simplify dwc3_gadget_resume() by using the introduced helper function. Fixes: 9f8a67b65a49 ("usb: dwc3: gadget: fix gadget suspend/resume") Cc: stable@vger.kernel.org Suggested-by: Thinh Nguyen Signed-off-by: Roger Quadros Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20230503110048.30617-1-rogerq@kernel.org Signed-off-by: Greg Kroah-Hartman commit 94d25e9128988c6a1fc9070f6e98215a95795bd8 Author: Alan Stern Date: Mon May 1 14:22:35 2023 -0400 USB: usbtmc: Fix direction for 0-length ioctl control messages The syzbot fuzzer found a problem in the usbtmc driver: When a user submits an ioctl for a 0-length control transfer, the driver does not check that the direction is set to OUT: ------------[ cut here ]------------ usb 3-1: BOGUS control dir, pipe 80000b80 doesn't match bRequestType fd WARNING: CPU: 0 PID: 5100 at drivers/usb/core/urb.c:411 usb_submit_urb+0x14a7/0x1880 drivers/usb/core/urb.c:411 Modules linked in: CPU: 0 PID: 5100 Comm: syz-executor428 Not tainted 6.3.0-syzkaller-12049-g58390c8ce1bd #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 RIP: 0010:usb_submit_urb+0x14a7/0x1880 drivers/usb/core/urb.c:411 Code: 7c 24 40 e8 1b 13 5c fb 48 8b 7c 24 40 e8 21 1d f0 fe 45 89 e8 44 89 f1 4c 89 e2 48 89 c6 48 c7 c7 e0 b5 fc 8a e8 19 c8 23 fb <0f> 0b e9 9f ee ff ff e8 ed 12 5c fb 0f b6 1d 12 8a 3c 08 31 ff 41 RSP: 0018:ffffc90003d2fb00 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff8880789e9058 RCX: 0000000000000000 RDX: ffff888029593b80 RSI: ffffffff814c1447 RDI: 0000000000000001 RBP: ffff88801ea742f8 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: ffff88802915e528 R13: 00000000000000fd R14: 0000000080000b80 R15: ffff8880222b3100 FS: 0000555556ca63c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f9ef4d18150 CR3: 0000000073e5b000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: usb_start_wait_urb+0x101/0x4b0 drivers/usb/core/message.c:58 usb_internal_control_msg drivers/usb/core/message.c:102 [inline] usb_control_msg+0x320/0x4a0 drivers/usb/core/message.c:153 usbtmc_ioctl_request drivers/usb/class/usbtmc.c:1954 [inline] usbtmc_ioctl+0x1b3d/0x2840 drivers/usb/class/usbtmc.c:2097 To fix this, we must override the direction in the bRequestType field of the control request structure when the length is 0. Reported-and-tested-by: syzbot+ce77725b89b7bd52425c@syzkaller.appspotmail.com Signed-off-by: Alan Stern Link: https://lore.kernel.org/linux-usb/000000000000716a3705f9adb8ee@google.com/ CC: Link: https://lore.kernel.org/r/ede1ee02-b718-49e7-a44c-51339fec706b@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 764d102ef94e880ca834a7fe3968a00a05b1fb12 Author: Dave Jiang Date: Sat May 13 00:20:06 2023 -0700 cxl: Add missing return to cdat read error path Add a return to the error path when cxl_cdat_read_table() fails. Current code continues with the table pointer points to freed memory. Fixes: 7a877c923995 ("cxl/pci: Simplify CDAT retrieval error path") Signed-off-by: Dave Jiang Reviewed-by: Davidlohr Bueso Link: https://lore.kernel.org/r/168382793506.3510737.4792518576623749076.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 7efb10d8dc70ea3000cc70dca53407c52488acd1 Author: YongSu Yoo Date: Sun Mar 5 21:25:19 2023 +0000 media: dvb_demux: fix a bug for the continuity counter In dvb_demux.c, some logics exist which compare the expected continuity counter and the real continuity counter. If they are not matched each other, both of the expected continuity counter and the real continuity counter should be printed. But there exists a bug that the expected continuity counter is not correctly printed. The expected continuity counter is replaced with the real countinuity counter + 1 so that the epected continuity counter is not correclty printed. This is wrong. This bug is fixed. Link: https://lore.kernel.org/linux-media/20230305212519.499-1-yongsuyoo0215@gmail.com Signed-off-by: YongSu Yoo Signed-off-by: Mauro Carvalho Chehab commit 53558de2b5c4f4ee6bfcfbe34e27071c2d0073d5 Author: Arnd Bergmann Date: Tue Jan 17 17:10:16 2023 +0000 media: pvrusb2: fix DVB_CORE dependency Now that DVB_CORE can be a loadable module, pvrusb2 can run into a link error: ld.lld: error: undefined symbol: dvb_module_probe >>> referenced by pvrusb2-devattr.c >>> drivers/media/usb/pvrusb2/pvrusb2-devattr.o:(pvr2_lgdt3306a_attach) in archive vmlinux.a ld.lld: error: undefined symbol: dvb_module_release >>> referenced by pvrusb2-devattr.c >>> drivers/media/usb/pvrusb2/pvrusb2-devattr.o:(pvr2_dual_fe_attach) in archive vmlinux.a Refine the Kconfig dependencies to avoid this case. Link: https://lore.kernel.org/linux-media/20230117171055.2714621-1-arnd@kernel.org Fixes: 7655c342dbc4 ("media: Kconfig: Make DVB_CORE=m possible when MEDIA_SUPPORT=y") Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab commit 270205be711056534d1f86d275d4ec922fb62102 Author: Dan Williams Date: Fri May 12 14:31:35 2023 -0700 tools/testing/cxl: Use DEFINE_STATIC_SRCU() Starting with commit: 95433f726301 ("srcu: Begin offloading srcu_struct fields to srcu_update") ...it is no longer possible to do: static DEFINE_SRCU(x) Switch to DEFINE_STATIC_SRCU(x) to fix: tools/testing/cxl/test/mock.c:22:1: error: duplicate ‘static’ 22 | static DEFINE_SRCU(cxl_mock_srcu); | ^~~~~~ Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/168392709546.1135523.10424917245934547117.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 9a48d604672220545d209e9996c2a1edbb5637f6 Author: Borislav Petkov (AMD) Date: Fri May 12 23:12:26 2023 +0200 x86/retbleed: Fix return thunk alignment SYM_FUNC_START_LOCAL_NOALIGN() adds an endbr leading to this layout (leaving only the last 2 bytes of the address): 3bff : 3bff: f3 0f 1e fa endbr64 3c03: f6 test $0xcc,%bl 3c04 <__x86_return_thunk>: 3c04: c3 ret 3c05: cc int3 3c06: 0f ae e8 lfence However, "the RET at __x86_return_thunk must be on a 64 byte boundary, for alignment within the BTB." Use SYM_START instead. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Thomas Gleixner Cc: Signed-off-by: Linus Torvalds commit 76c7f8873a7696dbd8f9cd844e30e5c84cbaba1a Merge: fd88f147cb121 1d6a4fc857176 Author: Linus Torvalds Date: Fri May 12 17:10:32 2023 -0500 Merge tag 'for-6.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull more btrfs fixes from David Sterba: - fix incorrect number of bitmap entries for space cache if loading is interrupted by some error - fix backref walking, this breaks a mode of LOGICAL_INO_V2 ioctl that is used in deduplication tools - zoned mode fixes: - properly finish zone reserved for relocation - correctly calculate super block zone end on ZNS - properly initialize new extent buffer for redirty - make mount option clear_cache work with block-group-tree, to rebuild free-space-tree instead of temporarily disabling it that would lead to a forced read-only mount - fix alignment check for offset when printing extent item * tag 'for-6.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: make clear_cache mount option to rebuild FST without disabling it btrfs: zero the buffer before marking it dirty in btrfs_redirty_list_add btrfs: zoned: fix full zone super block reading on ZNS btrfs: zoned: zone finish data relocation BG with last IO btrfs: fix backref walking not returning all inode refs btrfs: fix space cache inconsistency after error loading it from disk btrfs: print-tree: parent bytenr must be aligned to sector size commit fd88f147cb121c9c748ca0d4c5155a96e9d81e58 Merge: df8c2d13e227e d39fc592ef8ae Author: Linus Torvalds Date: Fri May 12 17:01:36 2023 -0500 Merge tag '6.4-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs client fixes from Steve French: - fix for copy_file_range bug for very large files that are multiples of rsize - do not ignore "isolated transport" flag if set on share - set rasize default better - three fixes related to shutdown and freezing (fixes 4 xfstests, and closes deferred handles faster in some places that were missed) * tag '6.4-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: release leases for deferred close handles when freezing smb3: fix problem remounting a share after shutdown SMB3: force unmount was failing to close deferred close files smb3: improve parallel reads of large files do not reuse connection if share marked as isolated cifs: fix pcchunk length type in smb2_copychunk_range commit df8c2d13e227e4670ebe777970f89db7802b1f56 Merge: 584dc5dbcbcca c04fe8e32f907 Author: Linus Torvalds Date: Fri May 12 16:56:09 2023 -0500 Merge tag 'vfs/v6.4-rc1/pipe' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs Pull vfs fix from Christian Brauner: "During the pipe nonblock rework the check for both O_NONBLOCK and IOCB_NOWAIT was dropped. Both checks need to be performed to ensure that files without O_NONBLOCK but IOCB_NOWAIT don't block when writing to or reading from a pipe. This just contains the fix adding the check for IOCB_NOWAIT back in" * tag 'vfs/v6.4-rc1/pipe' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs: pipe: check for IOCB_NOWAIT alongside O_NONBLOCK commit 584dc5dbcbcca71cc7ccce9077a1456842c26179 Merge: ed6a75e3133bc 293007b033418 Author: Linus Torvalds Date: Fri May 12 16:39:05 2023 -0500 Merge tag 'io_uring-6.4-2023-05-12' of git://git.kernel.dk/linux Pull io_uring fix from Jens Axboe: "Just a single fix making io_uring_sqe_cmd() available regardless of CONFIG_IO_URING, fixing a regression introduced during the merge window if nvme was selected but io_uring was not" * tag 'io_uring-6.4-2023-05-12' of git://git.kernel.dk/linux: io_uring: make io_uring_sqe_cmd() unconditionally available commit ed6a75e3133bca544849b967f7f3233cddb66090 Merge: 47a2ee5d4a0bd 3b90b09af5be4 Author: Linus Torvalds Date: Fri May 12 16:31:55 2023 -0500 Merge tag 'riscv-for-linus-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fix from Palmer Dabbelt: "Just a single fix this week for a build issue. That'd usually be a good sign, but we've started to get some reports of boot failures on some hardware/bootloader configurations. Nothing concrete yet, but I've got a funny feeling that's where much of the bug hunting is going right now. Nothing's reproducing on my end, though, and this fixes some pretty concrete issues so I figured there's no reason to delay it: - a fix to the linker script to avoid orpahaned sections in kernel/pi" * tag 'riscv-for-linus-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Fix orphan section warnings caused by kernel/pi commit 78b6a9a3f445e121ca08195084206cb8faa6999f Author: Haoyue Xu Date: Sat May 6 15:06:04 2023 +0800 MAINTAINERS: Update maintainers of HiSilicon RoCE Wenpeng has moved to other technical areas, and Junxian will take over his responsibilities in maintaining this module. Link: https://lore.kernel.org/r/20230506070604.2982542-1-xuhaoyue1@hisilicon.com Signed-off-by: Haoyue Xu Signed-off-by: Jason Gunthorpe commit 08c7f09356e45d093d1867c7a3c6ac6526e2f98b Author: Selvin Xavier Date: Sun May 7 11:29:29 2023 -0700 RDMA/bnxt_re: Fix the page_size used during the MR creation Driver populates the list of pages used for Memory region wrongly when page size is more than system page size. This is causing a failure when some of the applications that creates MR with page size as 2M. Since HW can support multiple page sizes, pass the correct page size while creating the MR. Also, driver need not adjust the number of pages when HW Queues are created with user memory. It should work with the number of dma blocks returned by ib_umem_num_dma_blocks. Fix this calculation also. Fixes: 0c4dcd602817 ("RDMA/bnxt_re: Refactor hardware queue memory allocation") Fixes: f6919d56388c ("RDMA/bnxt_re: Code refactor while populating user MRs") Link: https://lore.kernel.org/r/1683484169-9539-1-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Kalesh AP Signed-off-by: Kashyap Desai Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 56cdea92ed915f8eb37575331fb4a269991e8026 Author: Randy Dunlap Date: Sun May 7 11:26:06 2023 -0700 Documentation/block: drop the request.rst file Documentation/block/request.rst is outdated and should be removed. Also delete its entry in the block/index.rst file. Signed-off-by: Randy Dunlap Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20230507182606.12647-1-rdunlap@infradead.org Signed-off-by: Jens Axboe commit 034f4a7877c32a8efd6beee4d71ed14e424499a9 Author: Max Filippov Date: Sat May 6 17:10:36 2023 -0700 xtensa: add __bswap{si,di}2 helpers gcc-13 may generate calls for __bswap{si,di}2. This breaks the kernel build when optimization for size is selected. Add __bswap{si,di}2 helpers to fix that. Cc: stable@vger.kernel.org Fixes: 19c5699f9aff ("xtensa: don't link with libgcc") Signed-off-by: Max Filippov commit 9c2cc74fb31ec76b8b118c97041a6a154a3ff219 Author: Max Filippov Date: Tue May 2 03:20:47 2023 -0700 xtensa: fix signal delivery to FDPIC process Fetch function descriptor pointed to by the signal handler pointer from userspace on signal delivery and function pointer pointed to by the sa_restorer on return from the signal handler. Cc: stable@vger.kernel.org Fixes: e3ddb8bbe0f8 ("xtensa: add FDPIC and static PIE support for noMMU") Signed-off-by: Max Filippov commit c04fe8e32f907ea668f3f802387c1148fdb0e6c9 Author: Jens Axboe Date: Tue May 9 09:12:24 2023 -0600 pipe: check for IOCB_NOWAIT alongside O_NONBLOCK Pipe reads or writes need to enable nonblocking attempts, if either O_NONBLOCK is set on the file, or IOCB_NOWAIT is set in the iocb being passed in. The latter isn't currently true, ensure we check for both before waiting on data or space. Fixes: afed6271f5b0 ("pipe: set FMODE_NOWAIT on pipes") Signed-off-by: Jens Axboe Message-Id: Signed-off-by: Christian Brauner commit e485bd9e2c419142430ae6fe3e8f64e3059aef50 Author: Ming Lei Date: Fri May 5 23:31:42 2023 +0800 ublk: fix command op code check In case of CONFIG_BLKDEV_UBLK_LEGACY_OPCODES, type of cmd opcode could be 0 or 'u'; and type can only be 'u' if CONFIG_BLKDEV_UBLK_LEGACY_OPCODES isn't set. So fix the wrong check. Fixes: 2d786e66c966 ("block: ublk: switch to ioctl command encoding") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230505153142.1258336-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 5e6e08087a4acb4ee3574cea32dbff0f63c7f608 Author: Guoqing Jiang Date: Fri May 12 11:46:31 2023 +0800 block/rnbd: replace REQ_OP_FLUSH with REQ_OP_WRITE Since flush bios are implemented as writes with no data and the preflush flag per Christoph's comment [1]. And we need to change it in rnbd accordingly. Otherwise, I got splatting when create fs from rnbd client. [ 464.028545] ------------[ cut here ]------------ [ 464.028553] WARNING: CPU: 0 PID: 65 at block/blk-core.c:751 submit_bio_noacct+0x32c/0x5d0 [ ... ] [ 464.028668] CPU: 0 PID: 65 Comm: kworker/0:1H Tainted: G OE 6.4.0-rc1 #9 [ 464.028671] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.15.0-0-g2dd4b9b-rebuilt.opensuse.org 04/01/2014 [ 464.028673] Workqueue: ib-comp-wq ib_cq_poll_work [ib_core] [ 464.028717] RIP: 0010:submit_bio_noacct+0x32c/0x5d0 [ 464.028720] Code: 03 0f 85 51 fe ff ff 48 8b 43 18 8b 88 04 03 00 00 85 c9 0f 85 3f fe ff ff e9 be fd ff ff 0f b6 d0 3c 0d 74 26 83 fa 01 74 21 <0f> 0b b8 0a 00 00 00 e9 56 fd ff ff 4c 89 e7 e8 70 a1 03 00 84 c0 [ 464.028722] RSP: 0018:ffffaf3680b57c68 EFLAGS: 00010202 [ 464.028724] RAX: 0000000000060802 RBX: ffffa09dcc18bf00 RCX: 0000000000000000 [ 464.028726] RDX: 0000000000000002 RSI: 0000000000000000 RDI: ffffa09dde081d00 [ 464.028727] RBP: ffffaf3680b57c98 R08: ffffa09dde081d00 R09: ffffa09e38327200 [ 464.028729] R10: 0000000000000000 R11: 0000000000000000 R12: ffffa09dde081d00 [ 464.028730] R13: ffffa09dcb06e1e8 R14: 0000000000000000 R15: 0000000000200000 [ 464.028733] FS: 0000000000000000(0000) GS:ffffa09e3bc00000(0000) knlGS:0000000000000000 [ 464.028735] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 464.028736] CR2: 000055a4e8206c40 CR3: 0000000119f06000 CR4: 00000000003506f0 [ 464.028738] Call Trace: [ 464.028740] [ 464.028746] submit_bio+0x1b/0x80 [ 464.028748] rnbd_srv_rdma_ev+0x50d/0x10c0 [rnbd_server] [ 464.028754] ? percpu_ref_get_many.constprop.0+0x55/0x140 [rtrs_server] [ 464.028760] ? __this_cpu_preempt_check+0x13/0x20 [ 464.028769] process_io_req+0x1dc/0x450 [rtrs_server] [ 464.028775] rtrs_srv_inv_rkey_done+0x67/0xb0 [rtrs_server] [ 464.028780] __ib_process_cq+0xbc/0x1f0 [ib_core] [ 464.028793] ib_cq_poll_work+0x2b/0xa0 [ib_core] [ 464.028804] process_one_work+0x2a9/0x580 [1]. https://lore.kernel.org/all/ZFHgefWofVt24tRl@infradead.org/ Signed-off-by: Guoqing Jiang Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20230512034631.28686-1-guoqing.jiang@linux.dev Signed-off-by: Jens Axboe commit 4913cfcf014c95f0437db2df1734472fd3e15098 Author: Ivan Orlov Date: Fri May 12 17:05:32 2023 +0400 nbd: Fix debugfs_create_dir error checking The debugfs_create_dir function returns ERR_PTR in case of error, and the only correct way to check if an error occurred is 'IS_ERR' inline function. This patch will replace the null-comparison with IS_ERR. Signed-off-by: Ivan Orlov Link: https://lore.kernel.org/r/20230512130533.98709-1-ivan.orlov0322@gmail.com Signed-off-by: Jens Axboe commit 47a2ee5d4a0bda05decdda7be0a77e792cdb09a3 Merge: cc3c44c9fda26 f7dcc5e33c1e4 Author: Linus Torvalds Date: Fri May 12 07:59:08 2023 -0500 Merge tag 'firewire-fixes-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire fix from Takashi Sakamoto: - fix early release of request packet * tag 'firewire-fixes-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: net: fix unexpected release of object for asynchronous request packet commit 0bdf1ad8d10bd4e50a8b1a2c53d15984165f7fea Author: Helge Deller Date: Fri May 12 11:50:33 2023 +0200 fbdev: stifb: Fix info entry in sti_struct on error path Minor fix to reset the info field to NULL in case of error. Signed-off-by: Helge Deller commit 1e306ec49a1f206fd2cc89a42fac6e6f592a8cc1 Author: Eric Dumazet Date: Thu May 11 11:47:49 2023 +0000 tcp: fix possible sk_priority leak in tcp_v4_send_reset() When tcp_v4_send_reset() is called with @sk == NULL, we do not change ctl_sk->sk_priority, which could have been set from a prior invocation. Change tcp_v4_send_reset() to set sk_priority and sk_mark fields before calling ip_send_unicast_reply(). This means tcp_v4_send_reset() and tcp_v4_send_ack() no longer have to clear ctl_sk->sk_mark after their call to ip_send_unicast_reply(). Fixes: f6c0f5d209fa ("tcp: honor SO_PRIORITY in TIME_WAIT state") Signed-off-by: Eric Dumazet Cc: Antoine Tenart Signed-off-by: David S. Miller commit 9dc68a4fe70893b000fb3c92c68b9f72369cf448 Author: Kai-Heng Feng Date: Fri May 12 16:34:16 2023 +0800 ALSA: hda/realtek: Fix mute and micmute LEDs for yet another HP laptop There's yet another laptop that needs the fixup to enable mute and micmute LEDs. So do it accordingly. Signed-off-by: Kai-Heng Feng Cc: Link: https://lore.kernel.org/r/20230512083417.157127-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 6d4486efe9c69626cab423456169e250a5cd3af5 Author: Zhuang Shengen Date: Thu May 11 19:34:30 2023 +0800 vsock: avoid to close connected socket after the timeout When client and server establish a connection through vsock, the client send a request to the server to initiate the connection, then start a timer to wait for the server's response. When the server's RESPONSE message arrives, the timer also times out and exits. The server's RESPONSE message is processed first, and the connection is established. However, the client's timer also times out, the original processing logic of the client is to directly set the state of this vsock to CLOSE and return ETIMEDOUT. It will not notify the server when the port is released, causing the server port remain. when client's vsock_connect timeout,it should check sk state is ESTABLISHED or not. if sk state is ESTABLISHED, it means the connection is established, the client should not set the sk state to CLOSE Note: I encountered this issue on kernel-4.18, which can be fixed by this patch. Then I checked the latest code in the community and found similar issue. Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") Signed-off-by: Zhuang Shengen Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit 134120b066044399ef59564ff3ba66ab344cfc5b Author: Pieter Jansen van Vuuren Date: Thu May 11 10:43:33 2023 +0100 sfc: disable RXFCS and RXALL features by default By default we would not want RXFCS and RXALL features enabled as they are mainly intended for debugging purposes. This does not stop users from enabling them later on as needed. Fixes: 8e57daf70671 ("sfc_ef100: RX path for EF100") Signed-off-by: Pieter Jansen van Vuuren Co-developed-by: Edward Cree Signed-off-by: Edward Cree Reviewed-by: Martin Habets Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit c8902258b2b8ecaa1b8d88c312853c5b14c2553d Author: Helge Deller Date: Sat Apr 22 23:24:26 2023 +0200 fbdev: modedb: Add 1920x1080 at 60 Hz video mode Add typical resolution for Full-HD monitors. Signed-off-by: Helge Deller commit 9113302bb43cf7a6d5a414d49b29478e57451c86 Author: Jan Sokolowski Date: Thu May 11 08:53:19 2023 -0700 ice: Fix undersized tx_flags variable As not all ICE_TX_FLAGS_* fit in current 16-bit limited tx_flags field that was introduced in the Fixes commit, VLAN-related information would be discarded completely. As such, creating a vlan and trying to run ping through would result in no traffic passing. Fix that by refactoring tx_flags variable into flags only and a separate variable that holds VLAN ID. As there is some space left, type variable can fit between those two. Pahole reports no size change to ice_tx_buf struct. Fixes: aa1d3faf71a6 ("ice: Robustify cleaning/completing XDP Tx buffers") Signed-off-by: Jan Sokolowski Reviewed-by: Alexander Lobakin Signed-off-by: Tony Nguyen Signed-off-by: David S. Miller commit 92553ee03166ef8fa978e7683f9f4af30c9c4e6b Author: Ryan C. Underwood Date: Thu May 11 12:32:21 2023 -0500 ALSA: hda/realtek: Apply HP B&O top speaker profile to Pavilion 15 The Pavilion 15 line has B&O top speakers similar to the x360 and applying the same profile produces good sound. Without this, the sound would be tinny and underpowered without either applying model=alc295-hp-x360 or booting another OS first. Signed-off-by: Ryan Underwood Fixes: 563785edfcef ("ALSA: hda/realtek - Add quirk entry for HP Pavilion 15") Link: https://lore.kernel.org/r/ZF0mpcMz3ezP9KQw@icequake.net Signed-off-by: Takashi Iwai commit bcafcb959a57a6890e900199690c5fc47da1a304 Author: Ping-Ke Shih Date: Mon May 8 16:54:29 2023 +0800 wifi: rtw88: use work to update rate to avoid RCU warning The ieee80211_ops::sta_rc_update must be atomic, because ieee80211_chan_bw_change() holds rcu_read lock while calling drv_sta_rc_update(), so create a work to do original things. Voluntary context switch within RCU read-side critical section! WARNING: CPU: 0 PID: 4621 at kernel/rcu/tree_plugin.h:318 rcu_note_context_switch+0x571/0x5d0 CPU: 0 PID: 4621 Comm: kworker/u16:2 Tainted: G W OE Workqueue: phy3 ieee80211_chswitch_work [mac80211] RIP: 0010:rcu_note_context_switch+0x571/0x5d0 Call Trace: __schedule+0xb0/0x1460 ? __mod_timer+0x116/0x360 schedule+0x5a/0xc0 schedule_timeout+0x87/0x150 ? trace_raw_output_tick_stop+0x60/0x60 wait_for_completion_timeout+0x7b/0x140 usb_start_wait_urb+0x82/0x160 [usbcore usb_control_msg+0xe3/0x140 [usbcore rtw_usb_read+0x88/0xe0 [rtw_usb rtw_usb_read8+0xf/0x10 [rtw_usb rtw_fw_send_h2c_command+0xa0/0x170 [rtw_core rtw_fw_send_ra_info+0xc9/0xf0 [rtw_core drv_sta_rc_update+0x7c/0x160 [mac80211 ieee80211_chan_bw_change+0xfb/0x110 [mac80211 ieee80211_change_chanctx+0x38/0x130 [mac80211 ieee80211_vif_use_reserved_switch+0x34e/0x900 [mac80211 ieee80211_link_use_reserved_context+0x88/0xe0 [mac80211 ieee80211_chswitch_work+0x95/0x170 [mac80211 process_one_work+0x201/0x410 worker_thread+0x4a/0x3b0 ? process_one_work+0x410/0x410 kthread+0xe1/0x110 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x1f/0x30 Cc: stable@vger.kernel.org Fixes: c1edc86472fc ("rtw88: add ieee80211:sta_rc_update ops") Reported-by: Larry Finger Link: https://lore.kernel.org/linux-wireless/f1e31e8e-f84e-3791-50fb-663a83c5c6e9@lwfinger.net/T/#t Signed-off-by: Ping-Ke Shih Tested-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230508085429.46653-1-pkshih@realtek.com commit c0426c446d92023d344131d01d929bc25db7a24e Author: Ping-Ke Shih Date: Wed Apr 26 11:47:37 2023 +0800 wifi: rtw89: 8852b: adjust quota to avoid SER L1 caused by access null page Though SER can recover this case, traffic can get stuck for a while. Fix it by adjusting page quota to avoid hardware access null page of CMAC/DMAC. Fixes: a1cb097168fa ("wifi: rtw89: 8852b: configure DLE mem") Fixes: 3e870b481733 ("wifi: rtw89: 8852b: add HFC quota arrays") Cc: stable@vger.kernel.org Tested-by: Larry Finger Link: https://github.com/lwfinger/rtw89/issues/226#issuecomment-1520776761 Link: https://github.com/lwfinger/rtw89/issues/240 Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230426034737.24870-1-pkshih@realtek.com commit c7ab7a29ef5c0779574120d922256ce4651555d3 Author: Ryder Lee Date: Mon Apr 24 05:39:06 2023 +0800 wifi: mt76: connac: fix stats->tx_bytes calculation The stats->tx_bytes shall subtract retry byte from tx byte. Fixes: 43eaa3689507 ("wifi: mt76: add PPDU based TxS support for WED device") Signed-off-by: Ryder Lee Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/b3cd45596943cf5a06b2e08e2fe732ab0b51311b.1682285873.git.ryder.lee@mediatek.com commit cdc26ee89bddb9b6b2ae026a46d97855d5ba6694 Author: Ryder Lee Date: Mon Apr 24 05:39:05 2023 +0800 wifi: mt76: mt7996: fix endianness of MT_TXD6_TX_RATE To avoid sparse warning: sparse: warning: invalid assignment: |= sparse: left side has type restricted __le32 sparse: right side has type unsigned lon Fixes: 15ee62e73705 ("wifi: mt76: mt7996: enable BSS_CHANGED_BASIC_RATES support") Signed-off-by: Ryder Lee Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/16fa938373e3b145cb07a2c98d2428fea2abadba.1682285873.git.ryder.lee@mediatek.com commit 359b4315471181f108723c61612d96e383e56179 Author: Takashi Iwai Date: Fri May 12 09:58:58 2023 +0200 ALSA: usb-audio: Add a sample rate workaround for Line6 Pod Go Line6 Pod Go (0e41:424b) requires the similar workaround for the fixed 48k sample rate like other Line6 models. This patch adds the corresponding entry to line6_parse_audio_format_rate_quirk(). Reported-by: John Humlick Cc: Link: https://lore.kernel.org/r/20230512075858.22813-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit c0e72058d5e21982e61a29de6b098f7c1f0db498 Author: Dan Carpenter Date: Tue May 9 12:07:11 2023 +0300 ALSA: firewire-digi00x: prevent potential use after free This code was supposed to return an error code if init_stream() failed, but it instead freed dg00x->rx_stream and returned success. This potentially leads to a use after free. Fixes: 9a08067ec318 ("ALSA: firewire-digi00x: support AMDTP domain") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/c224cbd5-d9e2-4cd4-9bcf-2138eb1d35c6@kili.mountain Signed-off-by: Takashi Iwai commit 47af4291711f21e1282dbc1002baebba30595aa2 Author: Jakub Kicinski Date: Thu May 11 09:03:10 2023 -0700 MAINTAINERS: exclude wireless drivers from netdev It seems that we mostly get netdev CCed on wireless patches which are written by people who don't know any better and CC everything that get_maintainers spits out. Rather than patches which indeed could benefit from general networking review. Marking them down in patchwork as Awaiting Upstream is a bit tedious. Signed-off-by: Jakub Kicinski Acked-by: Johannes Berg Acked-by: Kalle Valo Signed-off-by: David S. Miller commit de9c1a23add9e7842ce63ce6f498a05c66344311 Author: Huayu Chen Date: Thu May 11 08:50:56 2023 +0200 nfp: fix NFP_NET_MAX_DSCP definition error The patch corrects the NFP_NET_MAX_DSCP definition in the main.h file. The incorrect definition result DSCP bits not being mapped properly when DCB is set. When NFP_NET_MAX_DSCP was defined as 4, the next 60 DSCP bits failed to be set. Fixes: 9b7fe8046d74 ("nfp: add DCB IEEE support") Cc: stable@vger.kernel.org Signed-off-by: Huayu Chen Acked-by: Simon Horman Signed-off-by: Louis Peens Signed-off-by: David S. Miller commit 01e8f6cd108b8702d206c6352d919c045b842b82 Author: Jakub Kicinski Date: Wed May 10 18:43:39 2023 -0700 MAINTAINERS: don't CC docs@ for netlink spec changes Documentation/netlink/ contains machine-readable protocol specs in YAML. Those are much like device tree bindings, no point CCing docs@ for the changes. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman commit d03a2f17627e8f94ce8c4790fede3ef7efe9be53 Author: Marcelo Ricardo Leitner Date: Wed May 10 19:42:43 2023 -0300 MAINTAINERS: sctp: move Neil to CREDITS Neil moved away from SCTP related duties. Move him to CREDITS then and while at it, update SCTP project website. Signed-off-by: Marcelo Ricardo Leitner Acked-by: Xin Long Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 50282fd57bcd3525c9d81eef58df8718e4337c6d Merge: ad81e23426a65 ac9a78681b921 Author: Maxime Ripard Date: Fri May 12 09:47:12 2023 +0200 Merge drm/drm-fixes into drm-misc-fixes Let's bring 6.4-rc1 in drm-misc-fixes to start the new fix cycle. Signed-off-by: Maxime Ripard commit 0b01db274028f5acd207332686ffc92ac77491ac Author: Grygorii Strashko Date: Wed May 10 18:21:39 2023 +0530 net: phy: dp83867: add w/a for packet errors seen with short cables Introduce the W/A for packet errors seen with short cables (<1m) between two DP83867 PHYs. The W/A recommended by DM requires FFE Equalizer Configuration tuning by writing value 0x0E81 to DSP_FFE_CFG register (0x012C), surrounded by hard and soft resets as follows: write_reg(0x001F, 0x8000); //hard reset write_reg(DSP_FFE_CFG, 0x0E81); write_reg(0x001F, 0x4000); //soft reset Since DP83867 PHY DM says "Changing this register to 0x0E81, will not affect Long Cable performance.", enable the W/A by default. Fixes: 2a10154abcb7 ("net: phy: dp83867: Add TI dp83867 phy") Signed-off-by: Grygorii Strashko Signed-off-by: Siddharth Vadapalli Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 2b694fc96fe33a7c042e3a142d27d945c8c668b0 Author: Nathan Chancellor Date: Thu Apr 27 12:34:53 2023 -0700 powerpc/boot: Disable power10 features after BOOTAFLAGS assignment When building the boot wrapper assembly files with clang after commit 648a1783fe25 ("powerpc/boot: Fix boot wrapper code generation with CONFIG_POWER10_CPU"), the following warnings appear for each file built: '-prefixed' is not a recognized feature for this target (ignoring feature) '-pcrel' is not a recognized feature for this target (ignoring feature) While it is questionable whether or not LLVM should be emitting a warning when passed negative versions of code generation flags when building assembly files (since it does not emit a warning for the altivec and vsx flags), it is easy enough to work around this by just moving the disabled flags to BOOTCFLAGS after the assignment of BOOTAFLAGS, so that they are not added when building assembly files. Do so to silence the warnings. Fixes: 648a1783fe25 ("powerpc/boot: Fix boot wrapper code generation with CONFIG_POWER10_CPU") Link: https://github.com/ClangBuiltLinux/linux/issues/1839 Reviewed-by: Nicholas Piggin Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://msgid.link/20230427-remove-power10-args-from-boot-aflags-clang-v1-1-9107f7c943bc@kernel.org commit f63550e2b165208a2f382afcaf5551df9569e1d4 Author: Paweł Anikiel Date: Mon May 8 13:30:37 2023 +0200 ASoC: ssm2602: Add workaround for playback distortions Apply a workaround for what appears to be a hardware quirk. The problem seems to happen when enabling "whole chip power" (bit D7 register R6) for the very first time after the chip receives power. If either "output" (D4) or "DAC" (D3) aren't powered on at that time, playback becomes very distorted later on. This happens on the Google Chameleon v3, as well as on a ZYBO Z7-10: https://ez.analog.com/audio/f/q-a/543726/solved-ssm2603-right-output-offset-issue/480229 I suspect this happens only when using an external MCLK signal (which is the case for both of these boards). Here are some experiments run on a Google Chameleon v3. These were run in userspace using a wrapper around the i2cset utility: ssmset() { i2cset -y 0 0x1a $(($1*2)) $2 } For each of the following sequences, we apply power to the ssm2603 chip, set the configuration registers R0-R5 and R7-R8, run the selected sequence, and check for distortions on playback. ssmset 0x09 0x01 # core ssmset 0x06 0x07 # chip, out, dac OK ssmset 0x09 0x01 # core ssmset 0x06 0x87 # out, dac ssmset 0x06 0x07 # chip OK (disable MCLK) ssmset 0x09 0x01 # core ssmset 0x06 0x1f # chip ssmset 0x06 0x07 # out, dac (enable MCLK) OK ssmset 0x09 0x01 # core ssmset 0x06 0x1f # chip ssmset 0x06 0x07 # out, dac NOT OK ssmset 0x06 0x1f # chip ssmset 0x09 0x01 # core ssmset 0x06 0x07 # out, dac NOT OK ssmset 0x09 0x01 # core ssmset 0x06 0x0f # chip, out ssmset 0x06 0x07 # dac NOT OK ssmset 0x09 0x01 # core ssmset 0x06 0x17 # chip, dac ssmset 0x06 0x07 # out NOT OK For each of the following sequences, we apply power to the ssm2603 chip, run the selected sequence, issue a reset with R15, configure R0-R5 and R7-R8, run one of the NOT OK sequences from above, and check for distortions. ssmset 0x09 0x01 # core ssmset 0x06 0x07 # chip, out, dac OK (disable MCLK) ssmset 0x09 0x01 # core ssmset 0x06 0x07 # chip, out, dac (enable MCLK after reset) NOT OK ssmset 0x09 0x01 # core ssmset 0x06 0x17 # chip, dac NOT OK ssmset 0x09 0x01 # core ssmset 0x06 0x0f # chip, out NOT OK ssmset 0x06 0x07 # chip, out, dac NOT OK Signed-off-by: Paweł Anikiel Date: Wed May 10 22:00:20 2023 +0200 net: fec: Better handle pm_runtime_get() failing in .remove() In the (unlikely) event that pm_runtime_get() (disguised as pm_runtime_resume_and_get()) fails, the remove callback returned an error early. The problem with this is that the driver core ignores the error value and continues removing the device. This results in a resource leak. Worse the devm allocated resources are freed and so if a callback of the driver is called later the register mapping is already gone which probably results in a crash. Fixes: a31eda65ba21 ("net: fec: fix clock count mis-match") Signed-off-by: Uwe Kleine-König Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230510200020.1534610-1-u.kleine-koenig@pengutronix.de Signed-off-by: Jakub Kicinski commit ef1148d4487438a3408d6face2a8360d91b4af70 Author: Eric Dumazet Date: Wed May 10 15:46:46 2023 +0000 ipv6: remove nexthop_fib6_nh_bh() After blamed commit, nexthop_fib6_nh_bh() and nexthop_fib6_nh() are the same. Delete nexthop_fib6_nh_bh(), and convert /proc/net/ipv6_route to standard rcu to avoid this splat: [ 5723.180080] WARNING: suspicious RCU usage [ 5723.180083] ----------------------------- [ 5723.180084] include/net/nexthop.h:516 suspicious rcu_dereference_check() usage! [ 5723.180086] other info that might help us debug this: [ 5723.180087] rcu_scheduler_active = 2, debug_locks = 1 [ 5723.180089] 2 locks held by cat/55856: [ 5723.180091] #0: ffff9440a582afa8 (&p->lock){+.+.}-{3:3}, at: seq_read_iter (fs/seq_file.c:188) [ 5723.180100] #1: ffffffffaac07040 (rcu_read_lock_bh){....}-{1:2}, at: rcu_lock_acquire (include/linux/rcupdate.h:326) [ 5723.180109] stack backtrace: [ 5723.180111] CPU: 14 PID: 55856 Comm: cat Tainted: G S I 6.3.0-dbx-DEV #528 [ 5723.180115] Call Trace: [ 5723.180117] [ 5723.180119] dump_stack_lvl (lib/dump_stack.c:107) [ 5723.180124] dump_stack (lib/dump_stack.c:114) [ 5723.180126] lockdep_rcu_suspicious (include/linux/context_tracking.h:122) [ 5723.180132] ipv6_route_seq_show (include/net/nexthop.h:?) [ 5723.180135] ? ipv6_route_seq_next (net/ipv6/ip6_fib.c:2605) [ 5723.180140] seq_read_iter (fs/seq_file.c:272) [ 5723.180145] seq_read (fs/seq_file.c:163) [ 5723.180151] proc_reg_read (fs/proc/inode.c:316 fs/proc/inode.c:328) [ 5723.180155] vfs_read (fs/read_write.c:468) [ 5723.180160] ? up_read (kernel/locking/rwsem.c:1617) [ 5723.180164] ksys_read (fs/read_write.c:613) [ 5723.180168] __x64_sys_read (fs/read_write.c:621) [ 5723.180170] do_syscall_64 (arch/x86/entry/common.c:?) [ 5723.180174] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120) [ 5723.180177] RIP: 0033:0x7fa455677d2a Fixes: 09eed1192cec ("neighbour: switch to standard rcu, instead of rcu_bh") Reported-by: syzbot Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20230510154646.370659-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit e93c9378e33f68b61ea9318580d841caa22fb9ea Author: Jiri Pirko Date: Wed May 10 16:46:21 2023 +0200 devlink: change per-devlink netdev notifier to static one The commit 565b4824c39f ("devlink: change port event netdev notifier from per-net to global") changed original per-net notifier to be per-devlink instance. That fixed the issue of non-receiving events of netdev uninit if that moved to a different namespace. That worked fine in -net tree. However, later on when commit ee75f1fc44dd ("net/mlx5e: Create separate devlink instance for ethernet auxiliary device") and commit 72ed5d5624af ("net/mlx5: Suspend auxiliary devices only in case of PCI device suspend") were merged, a deadlock was introduced when removing a namespace with devlink instance with another nested instance. Here there is the bad flow example resulting in deadlock with mlx5: net_cleanup_work -> cleanup_net (takes down_read(&pernet_ops_rwsem) -> devlink_pernet_pre_exit() -> devlink_reload() -> mlx5_devlink_reload_down() -> mlx5_unload_one_devl_locked() -> mlx5_detach_device() -> del_adev() -> mlx5e_remove() -> mlx5e_destroy_devlink() -> devlink_free() -> unregister_netdevice_notifier() (takes down_write(&pernet_ops_rwsem) Steps to reproduce: $ modprobe mlx5_core $ ip netns add ns1 $ devlink dev reload pci/0000:08:00.0 netns ns1 $ ip netns del ns1 Resolve this by converting the notifier from per-devlink instance to a static one registered during init phase and leaving it registered forever. Use this notifier for all devlink port instances created later on. Note what a tree needs this fix only in case all of the cited fixes commits are present. Reported-by: Moshe Shemesh Fixes: 565b4824c39f ("devlink: change port event netdev notifier from per-net to global") Fixes: ee75f1fc44dd ("net/mlx5e: Create separate devlink instance for ethernet auxiliary device") Fixes: 72ed5d5624af ("net/mlx5: Suspend auxiliary devices only in case of PCI device suspend") Signed-off-by: Jiri Pirko Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230510144621.932017-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 7ce93d6f91d8871a609f55bce91a507c392805e6 Merge: 6e27831b91a0b f97b8401e0deb Author: Jakub Kicinski Date: Thu May 11 18:01:40 2023 -0700 Merge branch 'selftests-seg6-make-srv6_end_dt4_l3vpn_test-more-robust' Andrea Mayer says: ==================== selftests: seg6: make srv6_end_dt4_l3vpn_test more robust This pachset aims to improve and make more robust the selftests performed to check whether SRv6 End.DT4 beahvior works as expected under different system configurations. Some Linux distributions enable Deduplication Address Detection and Reverse Path Filtering mechanisms by default which can interfere with SRv6 End.DT4 behavior and cause selftests to fail. The following patches improve selftests for End.DT4 by taking these two mechanisms into account. Specifically: - patch 1/2: selftests: seg6: disable DAD on IPv6 router cfg for srv6_end_dt4_l3vpn_test - patch 2/2: selftets: seg6: disable rp_filter by default in srv6_end_dt4_l3vpn_test ==================== Link: https://lore.kernel.org/r/20230510111638.12408-1-andrea.mayer@uniroma2.it Signed-off-by: Jakub Kicinski commit f97b8401e0deb46ad1e4245c21f651f64f55aaa6 Author: Andrea Mayer Date: Wed May 10 13:16:38 2023 +0200 selftets: seg6: disable rp_filter by default in srv6_end_dt4_l3vpn_test On some distributions, the rp_filter is automatically set (=1) by default on a netdev basis (also on VRFs). In an SRv6 End.DT4 behavior, decapsulated IPv4 packets are routed using the table associated with the VRF bound to that tunnel. During lookup operations, the rp_filter can lead to packet loss when activated on the VRF. Therefore, we chose to make this selftest more robust by explicitly disabling the rp_filter during tests (as it is automatically set by some Linux distributions). Fixes: 2195444e09b4 ("selftests: add selftest for the SRv6 End.DT4 behavior") Reported-by: Hangbin Liu Signed-off-by: Andrea Mayer Tested-by: Hangbin Liu Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 21a933c79a33add3612808f3be4ad65dd4dc026b Author: Andrea Mayer Date: Wed May 10 13:16:37 2023 +0200 selftests: seg6: disable DAD on IPv6 router cfg for srv6_end_dt4_l3vpn_test The srv6_end_dt4_l3vpn_test instantiates a virtual network consisting of several routers (rt-1, rt-2) and hosts. When the IPv6 addresses of rt-{1,2} routers are configured, the Deduplicate Address Detection (DAD) kicks in when enabled in the Linux distros running the selftests. DAD is used to check whether an IPv6 address is already assigned in a network. Such a mechanism consists of sending an ICMPv6 Echo Request and waiting for a reply. As the DAD process could take too long to complete, it may cause the failing of some tests carried out by the srv6_end_dt4_l3vpn_test script. To make the srv6_end_dt4_l3vpn_test more robust, we disable DAD on routers since we configure the virtual network manually and do not need any address deduplication mechanism at all. Fixes: 2195444e09b4 ("selftests: add selftest for the SRv6 End.DT4 behavior") Signed-off-by: Andrea Mayer Reviewed-by: David Ahern Signed-off-by: Jakub Kicinski commit 3b8803494a0612acdeee714cb72aa142b1e05ce5 Author: Mika Westerberg Date: Thu May 11 15:19:05 2023 +0300 PCI/DPC: Quirk PIO log size for Intel Ice Lake Root Ports Commit 5459c0b70467 ("PCI/DPC: Quirk PIO log size for certain Intel Root Ports") added quirks for Tiger and Alder Lake Root Ports but missed that the same issue exists also in the previous generation, Ice Lake. Apply the quirk for Ice Lake Root Ports as well. This prevents kernel complaints like: DPC: RP PIO log size 0 is invalid and also enables the DPC driver to dump the RP PIO Log registers when DPC is triggered. [bhelgaas: add dmesg warning and RP PIO Log dump info] Closes: https://bugzilla.kernel.org/show_bug.cgi?id=209943 Link: https://lore.kernel.org/r/20230511121905.73949-1-mika.westerberg@linux.intel.com Reported-by: Mark Blakeney Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas commit cc3c44c9fda264c6d401be04e95449a57c1231c6 Merge: 849a4f09730ba d8843eebbbd15 Author: Linus Torvalds Date: Thu May 11 16:56:58 2023 -0500 Merge tag 'drm-fixes-2023-05-12' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "About the usual for this stage, bunch of amdgpu, a few i915 and a scattering of fixes across the board" dsc: - macro fixes simplefb: - fix VESA format scheduler: - timeout handling fix fbdev: - avoid potential out-of-bounds access in generic fbdev emulation ast: - improve AST2500+ compat on ARM mipi-dsi: - small mipi-dsi fix amdgpu: - VCN3 fixes - APUs always support PCI atomics - legacy power management fixes - DCN 3.1.4 fix - DCFCLK fix - fix several RAS irq refcount mismatches - GPU Reset fix - GFX 11.0.4 fix i915: - taint kernel when force_probe is used - NULL deref and div-by-zero fixes for display - GuC error capture fix for Xe devices" * tag 'drm-fixes-2023-05-12' of git://anongit.freedesktop.org/drm/drm: (24 commits) drm/amdgpu: change gfx 11.0.4 external_id range drm/amdgpu/jpeg: Remove harvest checking for JPEG3 drm/amdgpu/gfx: disable gfx9 cp_ecc_error_irq only when enabling legacy gfx ras drm/amd/pm: avoid potential UBSAN issue on legacy asics drm/i915: taint kernel when force probing unsupported devices drm/i915/dp: prevent potential div-by-zero drm/i915: Fix NULL ptr deref by checking new_crtc_state drm/i915/guc: Don't capture Gen8 regs on Xe devices drm/amdgpu: disable sdma ecc irq only when sdma RAS is enabled in suspend drm/amdgpu: Fix vram recover doesn't work after whole GPU reset (v2) drm/amdgpu: drop gfx_v11_0_cp_ecc_error_irq_funcs drm/amd/display: Enforce 60us prefetch for 200Mhz DCFCLK modes drm/amd/display: Add symclk workaround during disable link output drm/amd/pm: parse pp_handle under appropriate conditions drm/amdgpu: set gfx9 onwards APU atomics support to be true drm/amdgpu/nv: update VCN 3 max HEVC encoding resolution drm/sched: Check scheduler work queue before calling timeout handling drm/mipi-dsi: Set the fwnode for mipi_dsi_device drm/nouveau/disp: More DP_RECEIVER_CAP_SIZE array fixes drm/dsc: fix DP_DSC_MAX_BPP_DELTA_* macro values ... commit 849a4f09730ba3c02da01924c7a6e7a000a4d27c Merge: 105131df9c3b2 2254a7396a0ca Author: Linus Torvalds Date: Thu May 11 16:51:11 2023 -0500 Merge tag 'xfs-6.4-rc1-fixes' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs bug fixes from Dave Chinner: "Largely minor bug fixes and cleanups, th emost important of which are probably the fixes for regressions in the extent allocation code: - fixes for inode garbage collection shutdown racing with work queue updates - ensure inodegc workers run on the CPU they are supposed to - disable counter scrubbing until we can exclusively freeze the filesystem from the kernel - regression fixes for new allocation related bugs - a couple of minor cleanups" * tag 'xfs-6.4-rc1-fixes' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix xfs_inodegc_stop racing with mod_delayed_work xfs: disable reaping in fscounters scrub xfs: check that per-cpu inodegc workers actually run on that cpu xfs: explicitly specify cpu when forcing inodegc delayed work to run immediately xfs: fix negative array access in xfs_getbmap xfs: don't allocate into the data fork for an unshare request xfs: flush dirty data and drain directios before scrubbing cow fork xfs: set bnobt/cntbt numrecs correctly when formatting new AGs xfs: don't unconditionally null args->pag in xfs_bmap_btalloc_at_eof commit c75f5a55061091030a13fef71b9995b89bc86213 Author: Zheng Wang Date: Thu Apr 27 11:08:41 2023 +0800 fbdev: imsttfb: Fix use after free bug in imsttfb_probe A use-after-free bug may occur if init_imstt invokes framebuffer_release and free the info ptr. The caller, imsttfb_probe didn't notice that and still keep the ptr as private data in pdev. If we remove the driver which will call imsttfb_remove to make cleanup, UAF happens. Fix it by return error code if bad case happens in init_imstt. Signed-off-by: Zheng Wang Signed-off-by: Helge Deller commit d8843eebbbd15b78c6a7745717b3705eca923b0f Merge: 9235c21c37fac 996e93a3fe74d Author: Dave Airlie Date: Fri May 12 06:46:33 2023 +1000 Merge tag 'amd-drm-fixes-6.4-2023-05-11' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amdgpu: - VCN3 fixes - APUs always support PCI atomics - Legacy power management fixes - DCN 3.1.4 fix - DCFCLK fix - Fix several RAS irq refcount mismatches - GPU Reset fix - GFX 11.0.4 fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230511141755.7896-1-alexander.deucher@amd.com commit 9235c21c37facd131b4d126ce7535ca573f850e3 Merge: dc49c3b1d463a 79c901c93562b Author: Dave Airlie Date: Fri May 12 06:45:54 2023 +1000 Merge tag 'drm-intel-fixes-2023-05-11-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix to taint kernel when force_probe is used - Null deref and div-by-zero fixes for display - GuC error capture fix for Xe devices Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZFzdYV3O8lvVJ1DQ@jlahtine-mobl.ger.corp.intel.com commit dc49c3b1d463a99fb529d2a69cc0e2270d6cb27e Merge: ac9a78681b921 2da5bffe9eaa5 Author: Dave Airlie Date: Fri May 12 05:32:36 2023 +1000 Merge tag 'drm-misc-fixes-2023-05-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v6.4-rc2: - More DSC macro fixes. - Small mipi-dsi fix. - Scheduler timeout handling fix. --- drm-misc-fixes for v6.4-rc1: - Fix DSC macros. - Fix VESA format for simplefb. - Prohibit potential out-of-bounds access in generic fbdev emulation. - Improve AST2500+ compat on ARM. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/b34135e3-2651-4e0a-a776-9b047882b1b2@linux.intel.com commit 7b63a88bb62ba2ddf5fcd956be85fe46624628b9 Author: Dmitry Torokhov Date: Thu May 11 12:08:37 2023 -0700 Input: psmouse - fix OOB access in Elantech protocol The kernel only allocate 5 MT slots; check that transmitted slot ID falls within the acceptable range. Link: https://lore.kernel.org/r/ZFnEL91nrT789dbG@google.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 20a99a291d564a559cc2fd013b4824a3bb3f1db7 Author: Hans de Goede Date: Thu May 11 11:57:04 2023 -0700 Input: soc_button_array - add invalid acpi_index DMI quirk handling Some devices have a wrong entry in their button array which points to a GPIO which is required in another driver, so soc_button_array must not claim it. A specific example of this is the Lenovo Yoga Book X90F / X90L, where the PNP0C40 home button entry points to a GPIO which is not a home button and which is required by the lenovo-yogabook driver. Add a DMI quirk table which can specify an ACPI GPIO resource index which should be skipped; and add an entry for the Lenovo Yoga Book X90F / X90L to this new DMI quirk table. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230414072116.4497-1-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit 155c45a25679f571c2ae57d10db843a9dfc63430 Author: Marek Vasut Date: Sun Mar 5 21:52:26 2023 +0100 power: supply: Ratelimit no data debug output Reduce the amount of output this dev_dbg() statement emits into logs, otherwise if system software polls the sysfs entry for data and keeps getting -ENODATA, it could end up filling the logs up. This does in fact make systemd journald choke, since during boot the sysfs power supply entries are polled and if journald starts at the same time, the journal is just being repeatedly filled up, and the system stops on trying to start journald without booting any further. Signed-off-by: Marek Vasut Reviewed-by: Hans de Goede Signed-off-by: Sebastian Reichel commit 4b963ae1df6426f0e51de64133d379d9bde50c48 Author: Alexandru Sorodoc Date: Thu May 11 19:15:10 2023 +0300 ALSA: hda/realtek: Add quirks for ASUS GU604V and GU603V These models use 2 CS35L41 amplifiers using SPI for down-facing speakers. alc285_fixup_speaker2_to_dac1 is needed to fix volume control of the down-facing speakers. Pin configs are needed to enable headset mic detection. Note that these models lack the ACPI _DSD properties needed to initialize the amplifiers. They can be added during boot to get working sound out of the speakers: https://gist.github.com/lamperez/862763881c0e1c812392b5574727f6ff Signed-off-by: Alexandru Sorodoc Link: https://lore.kernel.org/r/20230511161510.315170-1-ealex95@gmail.com Signed-off-by: Takashi Iwai commit 3e10f6ca76c4d00019badebd235c9d7f0068261e Author: Vitaly Rodionov Date: Wed May 10 15:22:27 2023 +0100 ALSA: hda/realtek: Add quirk for HP EliteBook G10 laptops Add support for HP EliteBook 835/845/845W/865 G10 laptops with CS35L41 amplifiers on I2C/SPI bus connected to Realtek codec. Signed-off-by: Vitaly Rodionov Cc: Link: https://lore.kernel.org/r/20230510142227.32945-1-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 68dc6c2d5eec45515855cce99256162f45651a0b Author: Rob Clark Date: Tue May 9 13:30:41 2023 -0700 drm/msm: Fix submit error-path leaks For errors after msm_submitqueue_get(), we need to drop the submitqueue reference. Additionally after get_unused_fd() we need to drop the fd. The ordering for dropping the queue lock and put_unused_fd() is not important, so just move this all into out_post_unlock. v2: Only drop queue ref if submit doesn't take it v3: Fix unitialized submit ref in error path v4: IS_ERR_OR_NULL() Reported-by: pinkperfect2021@gmail.com Fixes: f0de40a131d9 drm/msm: ("Reorder lock vs submit alloc") Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/536073/ Link: https://lore.kernel.org/r/20230509203041.440619-1-robdclark@gmail.com commit db40d2928d245f3a6cba9a6a2547ec955b00f0fc Author: Luca Weiss Date: Mon May 8 22:26:45 2023 +0200 drm/msm/iommu: Fix null pointer dereference in no-IOMMU case In the case that no IOMMU is available, msm_iommu_new can return NULL which should be handled. Without we will get a NULL pointer dereference in the next statement when we try to use the mmu variable. Fixes: 8cceb773f565 ("drm/msm/adreno: stall translation on fault for all GPU families") Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/535915/ Link: https://lore.kernel.org/r/20230508-6-4-drm-msm-iommu-fixup-v1-1-a7a21ec94f5b@z3ntu.xyz Signed-off-by: Rob Clark commit c3a62df457ff9ac8c77efe6d1eca2855d399355d Merge: 9a48c597d60de 1ea244158a4a2 Author: Marc Zyngier Date: Thu May 11 15:26:01 2023 +0100 Merge branch kvm-arm64/pgtable-fixes-6.4 into kvmarm-master/fixes * kvm-arm64/pgtable-fixes-6.4: : . : Fixes for concurrent S2 mapping race from Oliver: : : "So it appears that there is a race between two parallel stage-2 map : walkers that could lead to mapping the incorrect PA for a given IPA, as : the IPA -> PA relationship picks up an unintended offset. This series : eliminates the problem by using the current IPA of the walk as the : source-of-truth regarding where we are in a map operation." : . KVM: arm64: Constify start/end/phys fields of the pgtable walker data KVM: arm64: Infer PA offset from VA in hyp map walker KVM: arm64: Infer the PA offset from IPA in stage-2 map walker Signed-off-by: Marc Zyngier commit 9a48c597d60decb1c1f982a9eac19519dbf02875 Merge: ac9a78681b921 e910baa9c1efd Author: Marc Zyngier Date: Thu May 11 15:25:58 2023 +0100 Merge branch kvm-arm64/misc-6.4 into kvmarm-master/fixes * kvm-arm64/misc-6.4: : . : Minor changes for 6.4: : : - Make better use of the bitmap API (bitmap_zero, bitmap_zalloc...) : : - FP/SVE/SME documentation update, in the hope that this field : becomes clearer... : : - Add workaround for the usual Apple SEIS brokenness : : - Random comment fixes : . KVM: arm64: vgic: Add Apple M2 PRO/MAX cpus to the list of broken SEIS implementations KVM: arm64: Clarify host SME state management KVM: arm64: Restructure check for SVE support in FP trap handler KVM: arm64: Document check for TIF_FOREIGN_FPSTATE KVM: arm64: Fix repeated words in comments KVM: arm64: Use the bitmap API to allocate bitmaps KVM: arm64: Slightly optimize flush_context() Signed-off-by: Marc Zyngier commit e910baa9c1efdf7634519c135c6723b0fd499683 Author: Marc Zyngier Date: Mon May 1 19:21:41 2023 +0100 KVM: arm64: vgic: Add Apple M2 PRO/MAX cpus to the list of broken SEIS implementations Unsurprisingly, the M2 PRO is also affected by the SEIS bug, so add it to the naughty list. And since M2 MAX is likely to be of the same ilk, flag it as well. Tested on a M2 PRO mini machine. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20230501182141.39770-1-maz@kernel.org commit 105131df9c3b27673392a6b7ff356360188dc869 Merge: 6e27831b91a0b 8bbec86ce6d66 Author: Linus Torvalds Date: Thu May 11 09:01:40 2023 -0500 Merge tag 'dt-fixes-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt Pull devicetree binding fixes from Krzysztof Kozlowski: "A few fixes for Devicetree bindings and related docs, all for issues introduced in v6.4-rc1 commits: - media/ov2685: fix number of possible data lanes, as old binding explicitly mentioned one data lane. This fixes dt_binding_check warnings like: Documentation/devicetree/bindings/media/rockchip-isp1.example.dtb: camera@3c: port:endpoint:data-lanes: [[1]] is too short From schema: Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml - PCI/fsl,imx6q: correct parsing of assigned-clocks and related properties and make the clocks more specific per PCI device (host or endpoint). This fixes dtschema limitation and dt_binding_check warnings like: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000: Unevaluated properties are not allowed From schema: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml - Maintainers: correct path of Apple PWM binding. This fixes refcheckdocs warning" * tag 'dt-fixes-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning MAINTAINERS: adjust file entry for ARM/APPLE MACHINE SUPPORT media: dt-bindings: ov2685: Correct data-lanes attribute commit 6e27831b91a0bc572902eb065b374991c1ef452a Merge: 691e1eee1b4e5 cceac92678877 Author: Linus Torvalds Date: Thu May 11 08:42:47 2023 -0500 Merge tag 'net-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from netfilter. Current release - regressions: - mtk_eth_soc: fix NULL pointer dereference Previous releases - regressions: - core: - skb_partial_csum_set() fix against transport header magic value - fix load-tearing on sk->sk_stamp in sock_recv_cmsgs(). - annotate sk->sk_err write from do_recvmmsg() - add vlan_get_protocol_and_depth() helper - netlink: annotate accesses to nlk->cb_running - netfilter: always release netdev hooks from notifier Previous releases - always broken: - core: deal with most data-races in sk_wait_event() - netfilter: fix possible bug_on with enable_hooks=1 - eth: bonding: fix send_peer_notif overflow - eth: xpcs: fix incorrect number of interfaces - eth: ipvlan: fix out-of-bounds caused by unclear skb->cb - eth: stmmac: Initialize MAC_ONEUS_TIC_COUNTER register" * tag 'net-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (31 commits) af_unix: Fix data races around sk->sk_shutdown. af_unix: Fix a data race of sk->sk_receive_queue->qlen. net: datagram: fix data-races in datagram_poll() net: mscc: ocelot: fix stat counter register values ipvlan:Fix out-of-bounds caused by unclear skb->cb docs: networking: fix x25-iface.rst heading & index order gve: Remove the code of clearing PBA bit tcp: add annotations around sk->sk_shutdown accesses net: add vlan_get_protocol_and_depth() helper net: pcs: xpcs: fix incorrect number of interfaces net: deal with most data-races in sk_wait_event() net: annotate sk->sk_err write from do_recvmmsg() netlink: annotate accesses to nlk->cb_running kselftest: bonding: add num_grat_arp test selftests: forwarding: lib: add netns support for tc rule handle stats get Documentation: bonding: fix the doc of peer_notif_delay bonding: fix send_peer_notif overflow net: ethernet: mtk_eth_soc: fix NULL pointer dereference selftests: nft_flowtable.sh: check ingress/egress chain too selftests: nft_flowtable.sh: monitor result file sizes ... commit 691e1eee1b4e5203fa5152a4603c11fbd5448528 Merge: 80e62bc8487b0 ae3c253f595b3 Author: Linus Torvalds Date: Thu May 11 08:35:52 2023 -0500 Merge tag 'media/v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - fix some unused-variable warning in mtk-mdp3 - ignore unused suspend operations in nxp - some driver fixes in rcar-vin * tag 'media/v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: platform: mtk-mdp3: work around unused-variable warning media: nxp: ignore unused suspend operations media: rcar-vin: Select correct interrupt mode for V4L2_FIELD_ALTERNATE media: rcar-vin: Fix NV12 size alignment media: rcar-vin: Gen3 can not scale NV12 commit 6208890495ded5429424b0335c7fd2d47fdffb83 Author: Thomas Zimmermann Date: Fri Mar 31 11:23:14 2023 +0200 fbdev: vfb: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Helge Deller Signed-off-by: Helge Deller commit 2fce6899b110f117edb6c27c7ad18a29e7c622db Author: Thomas Zimmermann Date: Fri Mar 31 11:23:13 2023 +0200 fbdev: valkyriefb: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Helge Deller Signed-off-by: Helge Deller commit 8000425739dc49beceecdcd6f76c7b3bf40093fb Author: Thomas Zimmermann Date: Fri Mar 31 11:23:12 2023 +0200 fbdev: stifb: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Helge Deller Signed-off-by: Helge Deller commit 6a7be526157940a71f363f24badccf545ff40541 Author: Thomas Zimmermann Date: Fri Mar 31 11:23:11 2023 +0200 fbdev: sa1100fb: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller commit a124ee3271ccd498689e4dc8ccd610e41e1579c9 Author: Thomas Zimmermann Date: Fri Mar 31 11:23:10 2023 +0200 fbdev: platinumfb: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Helge Deller Signed-off-by: Helge Deller commit 58b0aca735ff008ff32e494d87869556d299f0c4 Author: Thomas Zimmermann Date: Fri Mar 31 11:23:09 2023 +0200 fbdev: p9100: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller commit 8c13c9de80b516d2a168e18744c9b7f586135ea4 Author: Thomas Zimmermann Date: Fri Mar 31 11:23:08 2023 +0200 fbdev: maxinefb: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller commit 41aaa2ecfca87afaebc40f00100a5d19ba381e4b Author: Thomas Zimmermann Date: Fri Mar 31 11:23:07 2023 +0200 fbdev: macfb: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Helge Deller Signed-off-by: Helge Deller commit 4311776fd8f789c3fa15e051cf9ec94df6ca5a46 Author: Thomas Zimmermann Date: Fri Mar 31 11:23:06 2023 +0200 fbdev: hpfb: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller commit f15d296317a73a81394600050702264bbe99fa37 Author: Thomas Zimmermann Date: Fri Mar 31 11:23:05 2023 +0200 fbdev: hgafb: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller commit 353e4441199b4106e5a5148bcff5c6b8ea268134 Author: Thomas Zimmermann Date: Fri Mar 31 11:23:04 2023 +0200 fbdev: g364fb: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller commit 56fd9558357bdfa5c187dbd59990b62d358ed66e Author: Thomas Zimmermann Date: Fri Mar 31 11:23:03 2023 +0200 fbdev: controlfb: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Helge Deller Signed-off-by: Helge Deller commit ca047de0e00e9cf55775f1f6b90461ed1f76c424 Author: Thomas Zimmermann Date: Fri Mar 31 11:23:02 2023 +0200 fbdev: cg14: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller commit 486357bbdafb43bcc99fcf943ea76fcd69aae7b7 Author: Thomas Zimmermann Date: Fri Mar 31 11:23:01 2023 +0200 fbdev: atmel_lcdfb: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Sui Jingfeng commit 3f6cb84839dcdd53cc002a198b5f92705bd793b3 Author: Thomas Zimmermann Date: Fri Mar 31 11:23:00 2023 +0200 fbdev: 68328fb: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Helge Deller Signed-off-by: Helge Deller commit 5a6bef734247c7a8c19511664ff77634ab86f45b Author: Zongjie Li Date: Tue May 9 19:27:26 2023 +0800 fbdev: arcfb: Fix error handling in arcfb_probe() Smatch complains that: arcfb_probe() warn: 'irq' from request_irq() not released on lines: 587. Fix error handling in the arcfb_probe() function. If IO addresses are not provided or framebuffer registration fails, the code will jump to the err_addr or err_register_fb label to release resources. If IRQ request fails, previously allocated resources will be freed. Fixes: 1154ea7dcd8e ("[PATCH] Framebuffer driver for Arc LCD board") Signed-off-by: Zongjie Li Reviewed-by: Dongliang Mu Signed-off-by: Helge Deller commit ad81e23426a651eb89a4b306e1c4169e6308c124 Author: Jocelyn Falempe Date: Wed May 10 15:10:34 2023 +0200 drm/mgag200: Fix gamma lut not initialized. When mgag200 switched from simple KMS to regular atomic helpers, the initialization of the gamma settings was lost. This leads to a black screen, if the bios/uefi doesn't use the same pixel color depth. v2: rebase on top of drm-misc-fixes, and add Cc stable tag. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2171155 Fixes: 1baf9127c482 ("drm/mgag200: Replace simple-KMS with regular atomic helpers") Cc: Tested-by: Phil Oester Reviewed-by: Thomas Zimmermann Signed-off-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20230510131034.284078-1-jfalempe@redhat.com commit 996e93a3fe74dcf9d467ae3020aea42cc3ff65e3 Author: Yifan Zhang Date: Wed May 10 16:13:48 2023 +0800 drm/amdgpu: change gfx 11.0.4 external_id range gfx 11.0.4 range starts from 0x80. Fixes: 311d52367d0a ("drm/amdgpu: add soc21 common ip block support for GC 11.0.4") Cc: stable@vger.kernel.org Signed-off-by: Yifan Zhang Reported-by: Yogesh Mohan Marimuthu Acked-by: Alex Deucher Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 5b94db73e45e2e6c2840f39c022fd71dfa47fc58 Author: Saleemkhan Jamadar Date: Tue May 9 12:37:50 2023 +0530 drm/amdgpu/jpeg: Remove harvest checking for JPEG3 Register CC_UVD_HARVESTING is obsolete for JPEG 3.1.2 Signed-off-by: Saleemkhan Jamadar Reviewed-by: Veerabadhran Gopalakrishnan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.1.x commit 4a76680311330aefe5074bed8f06afa354b85c48 Author: Guchun Chen Date: Sat May 6 20:06:45 2023 +0800 drm/amdgpu/gfx: disable gfx9 cp_ecc_error_irq only when enabling legacy gfx ras gfx9 cp_ecc_error_irq is only enabled when legacy gfx ras is assert. So in gfx_v9_0_hw_fini, interrupt disablement for cp_ecc_error_irq should be executed under such condition, otherwise, an amdgpu_irq_put calltrace will occur. [ 7283.170322] RIP: 0010:amdgpu_irq_put+0x45/0x70 [amdgpu] [ 7283.170964] RSP: 0018:ffff9a5fc3967d00 EFLAGS: 00010246 [ 7283.170967] RAX: ffff98d88afd3040 RBX: ffff98d89da20000 RCX: 0000000000000000 [ 7283.170969] RDX: 0000000000000000 RSI: ffff98d89da2bef8 RDI: ffff98d89da20000 [ 7283.170971] RBP: ffff98d89da20000 R08: ffff98d89da2ca18 R09: 0000000000000006 [ 7283.170973] R10: ffffd5764243c008 R11: 0000000000000000 R12: 0000000000001050 [ 7283.170975] R13: ffff98d89da38978 R14: ffffffff999ae15a R15: ffff98d880130105 [ 7283.170978] FS: 0000000000000000(0000) GS:ffff98d996f00000(0000) knlGS:0000000000000000 [ 7283.170981] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 7283.170983] CR2: 00000000f7a9d178 CR3: 00000001c42ea000 CR4: 00000000003506e0 [ 7283.170986] Call Trace: [ 7283.170988] [ 7283.170989] gfx_v9_0_hw_fini+0x1c/0x6d0 [amdgpu] [ 7283.171655] amdgpu_device_ip_suspend_phase2+0x101/0x1a0 [amdgpu] [ 7283.172245] amdgpu_device_suspend+0x103/0x180 [amdgpu] [ 7283.172823] amdgpu_pmops_freeze+0x21/0x60 [amdgpu] [ 7283.173412] pci_pm_freeze+0x54/0xc0 [ 7283.173419] ? __pfx_pci_pm_freeze+0x10/0x10 [ 7283.173425] dpm_run_callback+0x98/0x200 [ 7283.173430] __device_suspend+0x164/0x5f0 v2: drop gfx11 as it's fixed in a different solution by retiring cp_ecc_irq funcs(Hawking) Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2522 Signed-off-by: Guchun Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 976d3c6778e99390c6d854d140b746d12ea18a51 Author: Mirsad Todorovac Date: Tue Apr 11 20:15:20 2023 +0300 selftests: gpio: gpio-sim: Fix BUG: test FAILED due to recent change According to Mirsad the gpio-sim.sh test appears to FAIL in a wrong way due to missing initialisation of shell variables: 4.2. Bias settings work correctly cat: /sys/devices/platform/gpio-sim.0/gpiochip18/sim_gpio0/value: No such file or directory ./gpio-sim.sh: line 393: test: =: unary operator expected bias setting does not work GPIO gpio-sim test FAIL After this change the test passed: 4.2. Bias settings work correctly GPIO gpio-sim test PASS His testing environment is AlmaLinux 8.7 on Lenovo desktop box with the latest Linux kernel based on v6.2: Linux 6.2.0-mglru-kmlk-andy-09238-gd2980d8d8265 x86_64 Suggested-by: Mirsad Todorovac Signed-off-by: Andy Shevchenko Tested-by: Mirsad Goran Todorovac Signed-off-by: Mirsad Goran Todorovac Signed-off-by: Bartosz Golaszewski commit 5247f05eadf1081a74b2233f291cee2efed25e3a Author: Guchun Chen Date: Tue May 9 09:36:49 2023 +0800 drm/amd/pm: avoid potential UBSAN issue on legacy asics Prevent further dpm casting on legacy asics without od_enabled in amdgpu_dpm_is_overdrive_supported. This can avoid UBSAN complain in init sequence. v2: add a macro to check legacy dpm instead of checking asic family/type v3: refine macro name for naming consistency Suggested-by: Evan Quan Signed-off-by: Guchun Chen Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 66b2ca086210732954a7790d63d35542936fc664 Author: Michael Ellerman Date: Thu May 11 21:42:24 2023 +1000 powerpc/64s/radix: Fix soft dirty tracking It was reported that soft dirty tracking doesn't work when using the Radix MMU. The tracking is supposed to work by clearing the soft dirty bit for a mapping and then write protecting the PTE. If/when the page is written to, a page fault occurs and the soft dirty bit is added back via pte_mkdirty(). For example in wp_page_reuse(): entry = maybe_mkwrite(pte_mkdirty(entry), vma); if (ptep_set_access_flags(vma, vmf->address, vmf->pte, entry, 1)) update_mmu_cache(vma, vmf->address, vmf->pte); Unfortunately on radix _PAGE_SOFTDIRTY is being dropped by radix__ptep_set_access_flags(), called from ptep_set_access_flags(), meaning the soft dirty bit is not set even though the page has been written to. Fix it by adding _PAGE_SOFTDIRTY to the set of bits that are able to be changed in radix__ptep_set_access_flags(). Fixes: b0b5e9b13047 ("powerpc/mm/radix: Add radix pte #defines") Cc: stable@vger.kernel.org # v4.7+ Reported-by: Dan Horák Link: https://lore.kernel.org/r/20230511095558.56663a50f86bdc4cd97700b7@danny.cz Signed-off-by: Michael Ellerman Link: https://msgid.link/20230511114224.977423-1-mpe@ellerman.id.au commit 79c901c93562bdf1c84ce6c1b744fbbe4389a6eb Author: Jani Nikula Date: Thu May 4 13:35:08 2023 +0300 drm/i915: taint kernel when force probing unsupported devices For development and testing purposes, the i915.force_probe module parameter and DRM_I915_FORCE_PROBE kconfig option allow probing of devices that aren't supported by the driver. The i915.force_probe module parameter is "unsafe" and setting it taints the kernel. However, using the kconfig option does not. Always taint the kernel when force probing a device that is not supported. v2: Drop "depends on EXPERT" to avoid build breakage (kernel test robot) Fixes: 7ef5ef5cdead ("drm/i915: add force_probe module parameter to replace alpha_support") Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: Daniel Vetter Cc: Dave Airlie Acked-by: Daniel Vetter Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230504103508.1818540-1-jani.nikula@intel.com (cherry picked from commit 3312bb4ad09ca6423bd4a5b15a94588a8962fb8e) Signed-off-by: Joonas Lahtinen commit 0ff80028e2702c7c3d78b69705dc47c1ccba8c39 Author: Nikita Zhandarovich Date: Tue Apr 18 07:04:30 2023 -0700 drm/i915/dp: prevent potential div-by-zero drm_dp_dsc_sink_max_slice_count() may return 0 if something goes wrong on the part of the DSC sink and its DPCD register. This null value may be later used as a divisor in intel_dsc_compute_params(), which will lead to an error. In the unlikely event that this issue occurs, fix it by testing the return value of drm_dp_dsc_sink_max_slice_count() against zero. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: a4a157777c80 ("drm/i915/dp: Compute DSC pipe config in atomic check") Signed-off-by: Nikita Zhandarovich Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230418140430.69902-1-n.zhandarovich@fintech.ru (cherry picked from commit 51f7008239de011370c5067bbba07f0207f06b72) Signed-off-by: Joonas Lahtinen commit a41d985902c153c31c616fe183cf2ee331e95ecb Author: Stanislav Lisovskiy Date: Fri May 5 11:22:12 2023 +0300 drm/i915: Fix NULL ptr deref by checking new_crtc_state intel_atomic_get_new_crtc_state can return NULL, unless crtc state wasn't obtained previously with intel_atomic_get_crtc_state, so we must check it for NULLness here, just as in many other places, where we can't guarantee that intel_atomic_get_crtc_state was called. We are currently getting NULL ptr deref because of that, so this fix was confirmed to help. Fixes: 74a75dc90869 ("drm/i915/display: move plane prepare/cleanup to intel_atomic_plane.c") Signed-off-by: Stanislav Lisovskiy Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20230505082212.27089-1-stanislav.lisovskiy@intel.com (cherry picked from commit 1d5b09f8daf859247a1ea65b0d732a24d88980d8) Signed-off-by: Joonas Lahtinen commit 275dac1f7f5e9c2a2e806b34d3b10804eec0ac3c Author: John Harrison Date: Fri Apr 28 11:56:33 2023 -0700 drm/i915/guc: Don't capture Gen8 regs on Xe devices A pair of pre-Xe registers were being included in the Xe capture list. GuC was rejecting those as being invalid and logging errors about them. So, stop doing it. Signed-off-by: John Harrison Reviewed-by: Alan Previn Fixes: dce2bd542337 ("drm/i915/guc: Add Gen9 registers for GuC error state capture.") Cc: Alan Previn Cc: Umesh Nerlige Ramappa Cc: Lucas De Marchi Cc: John Harrison Cc: Jani Nikula Cc: Matt Roper Cc: Balasubramani Vivekanandan Cc: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20230428185636.457407-2-John.C.Harrison@Intel.com (cherry picked from commit b049132d61336f643d8faf2f6574b063667088cf) Signed-off-by: Joonas Lahtinen commit 04ac7f98b92181179ea84439642493f3826d04a2 Author: Ruidong Tian Date: Tue Apr 25 11:24:16 2023 +0800 coresight: perf: Release Coresight path when alloc trace id failed Error handler for etm_setup_aux can not release coresight path because cpu mask was cleared when coresight_trace_id_get_cpu_id failed. Call coresight_release_path function explicitly when alloc trace id filed. Fixes: 4ff1fdb4125c4 ("coresight: perf: traceid: Add perf ID allocation and notifiers") Signed-off-by: Ruidong Tian Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230425032416.125542-1-tianruidong@linux.alibaba.com commit f67bc15e526bb9920683ad6c1891ff9e08981335 Author: Dan Carpenter Date: Fri Apr 21 13:42:41 2023 +0300 coresight: Fix signedness bug in tmc_etr_buf_insert_barrier_packet() This code generates a Smatch warning: drivers/hwtracing/coresight/coresight-tmc-etr.c:947 tmc_etr_buf_insert_barrier_packet() error: uninitialized symbol 'bufp'. The problem is that if tmc_sg_table_get_data() returns -EINVAL, then when we test if "len < CORESIGHT_BARRIER_PKT_SIZE", the negative "len" value is type promoted to a high unsigned long value which is greater than CORESIGHT_BARRIER_PKT_SIZE. Fix this bug by adding an explicit check for error codes. Fixes: 75f4e3619fe2 ("coresight: tmc-etr: Add transparent buffer management") Signed-off-by: Dan Carpenter Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/7d33e244-d8b9-4c27-9653-883a13534b01@kili.mountain commit eb4b8eca1bad98f4b8574558a74f041f9acb5a54 Author: Milo Spadacini Date: Mon May 8 15:18:48 2023 +0200 tools: gpio: fix debounce_period_us output of lsgpio Fix incorrect output that could occur when more attributes are used and GPIO_V2_LINE_ATTR_ID_DEBOUNCE is not the first one. Signed-off-by: Milo Spadacini Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 8b229ada2669b74fdae06c83fbfda5a5a99fc253 Author: Guchun Chen Date: Sat May 6 16:52:59 2023 +0800 drm/amdgpu: disable sdma ecc irq only when sdma RAS is enabled in suspend sdma_v4_0_ip is shared on a few asics, but in sdma_v4_0_hw_fini, driver unconditionally disables ecc_irq which is only enabled on those asics enabling sdma ecc. This will introduce a warning in suspend cycle on those chips with sdma ip v4.0, while without sdma ecc. So this patch correct this. [ 7283.166354] RIP: 0010:amdgpu_irq_put+0x45/0x70 [amdgpu] [ 7283.167001] RSP: 0018:ffff9a5fc3967d08 EFLAGS: 00010246 [ 7283.167019] RAX: ffff98d88afd3770 RBX: 0000000000000001 RCX: 0000000000000000 [ 7283.167023] RDX: 0000000000000000 RSI: ffff98d89da30390 RDI: ffff98d89da20000 [ 7283.167025] RBP: ffff98d89da20000 R08: 0000000000036838 R09: 0000000000000006 [ 7283.167028] R10: ffffd5764243c008 R11: 0000000000000000 R12: ffff98d89da30390 [ 7283.167030] R13: ffff98d89da38978 R14: ffffffff999ae15a R15: ffff98d880130105 [ 7283.167032] FS: 0000000000000000(0000) GS:ffff98d996f00000(0000) knlGS:0000000000000000 [ 7283.167036] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 7283.167039] CR2: 00000000f7a9d178 CR3: 00000001c42ea000 CR4: 00000000003506e0 [ 7283.167041] Call Trace: [ 7283.167046] [ 7283.167048] sdma_v4_0_hw_fini+0x38/0xa0 [amdgpu] [ 7283.167704] amdgpu_device_ip_suspend_phase2+0x101/0x1a0 [amdgpu] [ 7283.168296] amdgpu_device_suspend+0x103/0x180 [amdgpu] [ 7283.168875] amdgpu_pmops_freeze+0x21/0x60 [amdgpu] [ 7283.169464] pci_pm_freeze+0x54/0xc0 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2522 Signed-off-by: Guchun Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 6c032c37ac3ef3b7df30937c785ecc4da428edc0 Author: Lin.Cao Date: Mon May 8 17:28:41 2023 +0800 drm/amdgpu: Fix vram recover doesn't work after whole GPU reset (v2) v1: Vmbo->shadow is used to back vram bo up when vram lost. So that we should set shadow as vmbo->shadow to recover vmbo->bo v2: Modify if(vmbo->shadow) shadow = vmbo->shadow as if(!vmbo->shadow) continue; Fixes: e18aaea733da ("drm/amdgpu: move shadow_list to amdgpu_bo_vm") Reviewed-by: Christian König Signed-off-by: Lin.Cao Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 720b47229a5b24061d1c2e29ddb6043a59178d79 Author: Horatio Zhang Date: Thu May 4 01:46:12 2023 -0400 drm/amdgpu: drop gfx_v11_0_cp_ecc_error_irq_funcs The gfx.cp_ecc_error_irq is retired in gfx11. In gfx_v11_0_hw_fini still use amdgpu_irq_put to disable this interrupt, which caused the call trace in this function. [ 102.873958] Call Trace: [ 102.873959] [ 102.873961] gfx_v11_0_hw_fini+0x23/0x1e0 [amdgpu] [ 102.874019] gfx_v11_0_suspend+0xe/0x20 [amdgpu] [ 102.874072] amdgpu_device_ip_suspend_phase2+0x240/0x460 [amdgpu] [ 102.874122] amdgpu_device_ip_suspend+0x3d/0x80 [amdgpu] [ 102.874172] amdgpu_device_pre_asic_reset+0xd9/0x490 [amdgpu] [ 102.874223] amdgpu_device_gpu_recover.cold+0x548/0xce6 [amdgpu] [ 102.874321] amdgpu_debugfs_reset_work+0x4c/0x70 [amdgpu] [ 102.874375] process_one_work+0x21f/0x3f0 [ 102.874377] worker_thread+0x200/0x3e0 [ 102.874378] ? process_one_work+0x3f0/0x3f0 [ 102.874379] kthread+0xfd/0x130 [ 102.874380] ? kthread_complete_and_exit+0x20/0x20 [ 102.874381] ret_from_fork+0x22/0x30 v2: - Handle umc and gfx ras cases in separated patch - Retired the gfx_v11_0_cp_ecc_error_irq_funcs in gfx11 v3: - Improve the subject and code comments - Add judgment on gfx11 in the function of amdgpu_gfx_ras_late_init v4: - Drop the define of CP_ME1_PIPE_INST_ADDR_INTERVAL and SET_ECC_ME_PIPE_STATE which using in gfx_v11_0_set_cp_ecc_error_state - Check cp_ecc_error_irq.funcs rather than ip version for a more sustainable life v5: - Simplify judgment conditions Signed-off-by: Horatio Zhang Reviewed-by: Hawking Zhang Acked-by: Christian König Reviewed-by: Guchun Chen Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit b504f99ccaa64da364443431e388ecf30b604e38 Author: Alvin Lee Date: Thu Apr 27 15:10:13 2023 -0400 drm/amd/display: Enforce 60us prefetch for 200Mhz DCFCLK modes [Description] - Due to bandwidth / arbitration issues at 200Mhz DCFCLK, we want to enforce minimum 60us of prefetch to avoid intermittent underflow issues - Since 60us prefetch is already enforced for UCLK DPM0, and many DCFCLK's > 200Mhz are mapped to UCLK DPM1, in theory there should not be any UCLK DPM regressions by enforcing greater prefetch Reviewed-by: Nevenko Stupar Reviewed-by: Jun Lei Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f57fa0f23d9707747272b0d09af8b93b19cf8ee4 Author: Leo Chen Date: Wed Apr 26 16:02:28 2023 -0400 drm/amd/display: Add symclk workaround during disable link output [Why & How] This is originally a change (9c75891f) in DCN32 because of the lack of interface to set TX while keeping symclk on. Adding this workaround to DCN314 will resolve the current issue. Fixes: 9c75891feef0 ("drm/amd/display: rework recent update PHY state commit") Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Leo Chen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 58d9b9a14b47c2a3da6effcbb01607ad7edc0275 Author: Guchun Chen Date: Fri May 5 13:20:11 2023 +0800 drm/amd/pm: parse pp_handle under appropriate conditions amdgpu_dpm_is_overdrive_supported is a common API across all asics, so we should cast pp_handle into correct structure under different power frameworks. v2: using return directly to simplify code v3: SI asic does not carry od_enabled member in pp_handle, and update Fixes tag Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2541 Fixes: eb4900aa4c49 ("drm/amdgpu: Fix kernel NULL pointer dereference in dpm functions") Suggested-by: Mario Limonciello Signed-off-by: Guchun Chen Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit af7828fbceed4f9e503034111066a0adef3db383 Author: Yifan Zhang Date: Thu Apr 27 14:01:05 2023 +0800 drm/amdgpu: set gfx9 onwards APU atomics support to be true APUs w/ gfx9 onwards doesn't reply on PCIe atomics, rather it is internal path w/ native atomic support. Set have_atomics_support to true. Signed-off-by: Yifan Zhang Reviewed-by: Lang Yu Acked-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 476ac50fc30540e29191615a26aaf5f9dee91c49 Author: Thong Thai Date: Mon May 1 11:04:36 2023 -0400 drm/amdgpu/nv: update VCN 3 max HEVC encoding resolution Update the maximum resolution reported for HEVC encoding on VCN 3 devices to reflect its 8K encoding capability. v2: Also update the max height for H.264 encoding to match spec. (Ruijing) Signed-off-by: Thong Thai Reviewed-by: Ruijing Dong Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit cceac9267887753f3c9594f1f7b92237cb0f64fb Merge: 33dcee99e0e6d 3acf8f6c14d0e Author: Jakub Kicinski Date: Wed May 10 19:08:58 2023 -0700 Merge tag 'nf-23-05-10' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter updates for net The following patchset contains Netfilter fixes for net: 1) Fix UAF when releasing netnamespace, from Florian Westphal. 2) Fix possible BUG_ON when nf_conntrack is enabled with enable_hooks, from Florian Westphal. 3) Fixes for nft_flowtable.sh selftest, from Boris Sukholitko. 4) Extend nft_flowtable.sh selftest to cover integration with ingress/egress hooks, from Florian Westphal. * tag 'nf-23-05-10' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: selftests: nft_flowtable.sh: check ingress/egress chain too selftests: nft_flowtable.sh: monitor result file sizes selftests: nft_flowtable.sh: wait for specific nc pids selftests: nft_flowtable.sh: no need for ps -x option selftests: nft_flowtable.sh: use /proc for pid checking netfilter: conntrack: fix possible bug_on with enable_hooks=1 netfilter: nf_tables: always release netdev hooks from notifier ==================== Link: https://lore.kernel.org/r/20230510083313.152961-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 33dcee99e0e6d37b4ac84b3ffdfe18b64bbca0c9 Merge: 5bca1d081f44c e1d09c2c2f579 Author: Jakub Kicinski Date: Wed May 10 19:06:55 2023 -0700 Merge branch 'af_unix-fix-two-data-races-reported-by-kcsan' Kuniyuki Iwashima says: ==================== af_unix: Fix two data races reported by KCSAN. KCSAN reported data races around these two fields for AF_UNIX sockets. * sk->sk_receive_queue->qlen * sk->sk_shutdown Let's annotate them properly. ==================== Link: https://lore.kernel.org/r/20230510003456.42357-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit e1d09c2c2f5793474556b60f83900e088d0d366d Author: Kuniyuki Iwashima Date: Tue May 9 17:34:56 2023 -0700 af_unix: Fix data races around sk->sk_shutdown. KCSAN found a data race around sk->sk_shutdown where unix_release_sock() and unix_shutdown() update it under unix_state_lock(), OTOH unix_poll() and unix_dgram_poll() read it locklessly. We need to annotate the writes and reads with WRITE_ONCE() and READ_ONCE(). BUG: KCSAN: data-race in unix_poll / unix_release_sock write to 0xffff88800d0f8aec of 1 bytes by task 264 on cpu 0: unix_release_sock+0x75c/0x910 net/unix/af_unix.c:631 unix_release+0x59/0x80 net/unix/af_unix.c:1042 __sock_release+0x7d/0x170 net/socket.c:653 sock_close+0x19/0x30 net/socket.c:1397 __fput+0x179/0x5e0 fs/file_table.c:321 ____fput+0x15/0x20 fs/file_table.c:349 task_work_run+0x116/0x1a0 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x174/0x180 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:297 do_syscall_64+0x4b/0x90 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x72/0xdc read to 0xffff88800d0f8aec of 1 bytes by task 222 on cpu 1: unix_poll+0xa3/0x2a0 net/unix/af_unix.c:3170 sock_poll+0xcf/0x2b0 net/socket.c:1385 vfs_poll include/linux/poll.h:88 [inline] ep_item_poll.isra.0+0x78/0xc0 fs/eventpoll.c:855 ep_send_events fs/eventpoll.c:1694 [inline] ep_poll fs/eventpoll.c:1823 [inline] do_epoll_wait+0x6c4/0xea0 fs/eventpoll.c:2258 __do_sys_epoll_wait fs/eventpoll.c:2270 [inline] __se_sys_epoll_wait fs/eventpoll.c:2265 [inline] __x64_sys_epoll_wait+0xcc/0x190 fs/eventpoll.c:2265 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x72/0xdc value changed: 0x00 -> 0x03 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 222 Comm: dbus-broker Not tainted 6.3.0-rc7-02330-gca6270c12e20 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Fixes: 3c73419c09a5 ("af_unix: fix 'poll for write'/ connected DGRAM sockets") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Reviewed-by: Michal Kubiak Signed-off-by: Jakub Kicinski commit 679ed006d416ea0cecfe24a99d365d1dea69c683 Author: Kuniyuki Iwashima Date: Tue May 9 17:34:55 2023 -0700 af_unix: Fix a data race of sk->sk_receive_queue->qlen. KCSAN found a data race of sk->sk_receive_queue->qlen where recvmsg() updates qlen under the queue lock and sendmsg() checks qlen under unix_state_sock(), not the queue lock, so the reader side needs READ_ONCE(). BUG: KCSAN: data-race in __skb_try_recv_from_queue / unix_wait_for_peer write (marked) to 0xffff888019fe7c68 of 4 bytes by task 49792 on cpu 0: __skb_unlink include/linux/skbuff.h:2347 [inline] __skb_try_recv_from_queue+0x3de/0x470 net/core/datagram.c:197 __skb_try_recv_datagram+0xf7/0x390 net/core/datagram.c:263 __unix_dgram_recvmsg+0x109/0x8a0 net/unix/af_unix.c:2452 unix_dgram_recvmsg+0x94/0xa0 net/unix/af_unix.c:2549 sock_recvmsg_nosec net/socket.c:1019 [inline] ____sys_recvmsg+0x3a3/0x3b0 net/socket.c:2720 ___sys_recvmsg+0xc8/0x150 net/socket.c:2764 do_recvmmsg+0x182/0x560 net/socket.c:2858 __sys_recvmmsg net/socket.c:2937 [inline] __do_sys_recvmmsg net/socket.c:2960 [inline] __se_sys_recvmmsg net/socket.c:2953 [inline] __x64_sys_recvmmsg+0x153/0x170 net/socket.c:2953 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x72/0xdc read to 0xffff888019fe7c68 of 4 bytes by task 49793 on cpu 1: skb_queue_len include/linux/skbuff.h:2127 [inline] unix_recvq_full net/unix/af_unix.c:229 [inline] unix_wait_for_peer+0x154/0x1a0 net/unix/af_unix.c:1445 unix_dgram_sendmsg+0x13bc/0x14b0 net/unix/af_unix.c:2048 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0x148/0x160 net/socket.c:747 ____sys_sendmsg+0x20e/0x620 net/socket.c:2503 ___sys_sendmsg+0xc6/0x140 net/socket.c:2557 __sys_sendmmsg+0x11d/0x370 net/socket.c:2643 __do_sys_sendmmsg net/socket.c:2672 [inline] __se_sys_sendmmsg net/socket.c:2669 [inline] __x64_sys_sendmmsg+0x58/0x70 net/socket.c:2669 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x72/0xdc value changed: 0x0000000b -> 0x00000001 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 49793 Comm: syz-executor.0 Not tainted 6.3.0-rc7-02330-gca6270c12e20 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Reviewed-by: Michal Kubiak Signed-off-by: Jakub Kicinski commit 5bca1d081f44c9443e61841842ce4e9179d327b6 Author: Eric Dumazet Date: Tue May 9 17:31:31 2023 +0000 net: datagram: fix data-races in datagram_poll() datagram_poll() runs locklessly, we should add READ_ONCE() annotations while reading sk->sk_err, sk->sk_shutdown and sk->sk_state. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20230509173131.3263780-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 4c329f5da7cfa366bacfda1328a025dd38951317 Author: Vijaya Krishna Nivarthi Date: Tue May 9 15:31:36 2023 +0530 spi: spi-geni-qcom: Select FIFO mode for chip select Spi geni driver switches between FIFO and DMA modes based on xfer length. FIFO mode relies on M_CMD_DONE_EN interrupt for completion while DMA mode relies on XX_DMA_DONE. During dynamic switching, if FIFO mode is chosen, FIFO related interrupts are enabled and DMA related interrupts are disabled. And viceversa. Chip select shares M_CMD_DONE_EN interrupt with FIFO to check completion. Now, if a chip select operation is preceded by a DMA xfer, M_CMD_DONE_EN interrupt would have been disabled and hence it will never receive one resulting in timeout. For chip select, in addition to setting the xfer mode to FIFO, select_mode() to FIFO so that required interrupts are enabled. Fixes: e5f0dfa78ac7 ("spi: spi-geni-qcom: Add support for SE DMA mode") Suggested-by: Praveen Talari Date: Tue May 9 17:34:12 2023 +0200 ASoC: dt-bindings: Adjust #sound-dai-cells on TI's single-DAI codecs A bunch of TI's codecs have binding schemas which force #sound-dai-cells to one despite those codecs only having a single DAI. Allow for bindings with zero DAI cells and deprecate the former non-zero value. Signed-off-by: Martin Povišer Date: Tue May 9 13:51:34 2023 +0100 ASoC: jz4740-i2s: Make I2S divider calculations more robust When the CPU supplies bit/frame clocks, the system clock (clk_i2s) is divided to produce the bit clock. This is a simple 1/N divider with a fairly limited range, so for a given system clock frequency only a few sample rates can be produced. Usually a wider range of sample rates is supported by varying the system clock frequency. The old calculation method was not very robust and could easily produce the wrong clock rate, especially with non-standard rates. For example, if the system clock is 1.99x the target bit clock rate, the divider would be calculated as 1 instead of the more accurate 2. Instead, use a more accurate method that considers two adjacent divider settings and selects the one that produces the least error versus the requested rate. If the error is 5% or higher then the rate setting is rejected to prevent garbled audio. Skip divider calculation when the codec is supplying both the bit and frame clock; in that case, the divider outputs are unused and we don't want to constrain the sample rate. Signed-off-by: Aidan MacDonald Date: Wed May 10 20:04:04 2023 -0500 MAINTAINERS: re-sort all entries and fields It's been a few years since we've sorted this thing, and the end result is that we've added MAINTAINERS entries in the wrong order, and a number of entries have their fields in non-canonical order too. So roll this boulder up the hill one more time by re-running ./scripts/parse-maintainers.pl --order on it. This file ends up being fairly painful for merge conflicts even normally, since unlike almost all other kernel files it's one of those "everybody touches the same thing", and re-ordering all entries is only going to make that worse. But the alternative is to never do it at all, and just let it all rot.. The rc2 week is likely the quietest and least painful time to do this. Requested-by: Randy Dunlap Requested-by: Joe Perches # "Please use --order" Signed-off-by: Linus Torvalds commit f7dcc5e33c1e4b0d278a30f7d2f0c9a63d7b40ca Author: Takashi Sakamoto Date: Wed May 10 10:35:33 2023 +0900 firewire: net: fix unexpected release of object for asynchronous request packet The lifetime of object for asynchronous request packet is now maintained by reference counting, while current implementation of firewire-net releases the passed object in the handler. This commit fixes the bug. Reported-by: Dan Carpenter Link: https://lore.kernel.org/lkml/Y%2Fymx6WZIAlrtjLc@workstation/ Fixes: 13a55d6bb15f ("firewire: core: use kref structure to maintain lifetime of data for fw_request structure") Link: https://lore.kernel.org/lkml/20230510031205.782032-1-o-takashi@sakamocchi.jp/ Signed-off-by: Takashi Sakamoto commit d39fc592ef8ae9a89c5e85c8d9f760937a57d5ba Author: Steve French Date: Wed May 10 17:42:21 2023 -0500 cifs: release leases for deferred close handles when freezing We should not be caching closed files when freeze is invoked on an fs (so we can release resources more gracefully). Fixes xfstests generic/068 generic/390 generic/491 Reviewed-by: David Howells Cc: Signed-off-by: Steve French commit d295b66a7b66ed504a827b58876ad9ea48c0f4a8 Merge: 2a78769da34b7 c915d8f5918be Author: Linus Torvalds Date: Wed May 10 17:07:42 2023 -0500 Merge tag 'fsnotify_for_v6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull inotify fix from Jan Kara: "A fix for possibly reporting invalid watch descriptor with inotify event" * tag 'fsnotify_for_v6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: inotify: Avoid reporting event with invalid wd commit 2a78769da34b792cc4c4f7157cda6b622fab0872 Merge: ad2fd53a7870a 504a10d9e46bc Author: Linus Torvalds Date: Wed May 10 16:48:35 2023 -0500 Merge tag 'gfs2-v6.3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fix from Andreas Gruenbacher: - Fix a NULL pointer dereference when mounting corrupted filesystems * tag 'gfs2-v6.3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Don't deref jdesc in evict commit 760ebc45746b498a36332acefd9e2838a3f8fcf0 Author: Jiri Olsa Date: Wed May 10 15:51:31 2023 -0300 perf lock contention: Add empty 'struct rq' to satisfy libbpf 'runqueue' type verification If 'struct rq' isn't defined in lock_contention.bpf.c then the type for the 'runqueue' variable ends up being a forward declaration (BTF_KIND_FWD) while the kernel has it defined (BTF_KIND_STRUCT). This makes libbpf decide it has incompatible types and then fails to load the BPF skeleton: # perf lock con -ab sleep 1 libbpf: extern (var ksym) 'runqueues': incompatible types, expected [95] fwd rq, but kernel has [55509] struct rq libbpf: failed to load object 'lock_contention_bpf' libbpf: failed to load BPF skeleton 'lock_contention_bpf': -22 Failed to load lock-contention BPF skeleton lock contention BPF setup failed # Add it as an empty struct to satisfy that type verification: # perf lock con -ab sleep 1 contended total wait max wait avg wait type caller 2 50.64 us 25.38 us 25.32 us spinlock tick_do_update_jiffies64+0x25 1 26.18 us 26.18 us 26.18 us spinlock tick_do_update_jiffies64+0x25 # Committer notes: Extracted from a larger patch as Namhyung had already fixed the other issues in e53de7b65a3ca59a ("perf lock contention: Fix struct rq lock access"). Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Changbin Du Cc: Hao Luo Cc: Ian Rogers Cc: Namhyung Kim Cc: Song Liu Cc: Stephane Eranian Cc: Yang Jihong Link: https://lore.kernel.org/lkml/ZFVqeKLssg7uzxzI@krava Signed-off-by: Arnaldo Carvalho de Melo commit bfd431cb2c68cbaec7a27b8a979d031f8501301b Author: James Clark Date: Thu May 4 15:48:22 2023 +0100 perf cs-etm: Fix contextid validation Pre 5.11 kernels don't support 'contextid1' and 'contextid2' so validation would be skipped. By adding an additional check for 'contextid', old kernels will still have validation done even though contextid would either be contextid1 or contextid2. Additionally now that it's possible to override options, an existing bug in the validation is revealed. 'val' is overwritten by the contextid1 validation, and re-used for contextid2 validation causing it to always fail. '!val || val != 0x4' is the same as 'val != 0x4' because 0 is also != 4, so that expression can be simplified and the temp variable not overwritten. Fixes: 35c51f83dd1ed5db ("perf cs-etm: Validate options after applying them") Reviewed-by: Leo Yan Signed-off-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/all/20230501073452.GA4660@leoy-yangtze.lan Link: https://lore.kernel.org/r/20230504144822.1938717-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit a3cee97446cc9ee1332b5f317024ccd23ac6c48c Author: James Clark Date: Thu May 4 17:08:45 2023 +0100 perf arm64: Fix build with refcount checking With EXTRA_CFLAGS=-DREFCNT_CHECKING=1 and build-test, some unwrapped map accesses appear. Wrap it in the new accessor to fix the error: error: 'struct perf_cpu_map' has no member named 'map' Signed-off-by: James Clark Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230504160845.2065510-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 8669862388b01de7a248fea8b743aafd42169875 Author: Sandipan Das Date: Fri May 5 15:32:54 2023 +0530 perf test: Add stat test for record and script When using the global aggregation mode, running perf script after perf stat record can result in a segmentation fault as seen with commit 8b76a3188b85 ("perf stat: Remove unused perf_counts.aggr field"). Add a basic test to the existing suite of stat-related tests for checking if that workflow runs without erroring out. Signed-off-by: Sandipan Das Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Nick Terrell Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/6a5429879764e3dac984cbb11ee2d95cc1604161.1683280603.git.sandipan.das@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit 2fe6575924612f1014a0539ab3053b106aded926 Author: Sandipan Das Date: Fri May 5 15:32:53 2023 +0530 perf script: Skip aggregation for stat events The script command does not support aggregation modes by itself although that can be achieved using post-processing scripts. Because of this, it does not allocate memory for aggregated event values. Upon running perf stat record, the aggregation mode is set in the perf data file. If the mode is AGGR_GLOBAL, the aggregated event values are accessed and this leads to a segmentation fault since these were never allocated to begin with. Set the mode to AGGR_NONE explicitly to avoid this. E.g. $ perf stat record -e cycles true $ perf script Before: Segmentation fault (core dumped) After: CPU THREAD VAL ENA RUN TIME EVENT -1 231919 162831 362069 362069 935289 cycles:u Fixes: 8b76a3188b85724f ("perf stat: Remove unused perf_counts.aggr field") Signed-off-by: Sandipan Das Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Nick Terrell Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: stable@vger.kernel.org # v6.2+ Link: https://lore.kernel.org/r/83d6c6c05c54bf00c5a9df32ac160718efca0c7a.1683280603.git.sandipan.das@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit a2af0f6b8ef7ea402d6a531607bd0bc3dd3b4815 Author: Ian Rogers Date: Wed May 10 14:23:52 2023 -0300 perf build: Add system include paths to BPF builds There are insufficient headers in tools/include to satisfy building BPF programs and their header dependencies. Add the system include paths from the non-BPF clang compile so that these headers can be found. This code was taken from: tools/testing/selftests/bpf/Makefile Committer notes: Had to adjust the '#ifndef NO_BPF_SKEL' to '#ifdef BUILD_BPF_SKEL' as reverted that build BPF skels by default. Also cope with the addition of -I$(srctree)/tools/include/uapi done by Yang Jihong so that we prefer using the kernel sources headers instead of older ones in the system. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Albert Ou Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Palmer Dabbelt Cc: Paul Walmsley , Cc: Peter Zijlstra Cc: Song Liu Cc: Tom Rix Cc: Yang Jihong Link: https://lore.kernel.org/lkml/20230506021450.3499232-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 5be6cecda0802f2397504fd40c3402cd8ac8022e Author: Yang Jihong Date: Wed May 10 06:44:01 2023 +0000 perf bpf skels: Make vmlinux.h use bpf.h and perf_event.h in source directory Currently, vmlinux.h uses the bpf.h and perf_event.h header files in the system path. If the header files in compilation environment are old, compilation may fail. For example: /home/yangjihong/linux/tools/perf/util/bpf_skel/.tmp/../vmlinux.h:151:27: error: field has incomplete type 'union perf_sample_weight' union perf_sample_weight weight; Use the bpf.h and perf_event.h files in the source code directory to avoid compilation compatibility problems. Signed-off-by: Yang Jihong Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Tom Rix Link: https://lore.kernel.org/r/20230510064401.225051-1-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 7d161165d9072dcbb1f01ce947436b7a3101c254 Author: Adrian Hunter Date: Mon May 8 12:39:52 2023 +0300 perf parse-events: Do not break up AUX event group Do not assume which events may have a PMU name, allowing the logic to keep an AUX event group together. Example: Before: $ perf record --no-bpf-event -c 10 -e '{intel_pt//,tlb_flush.stlb_any/aux-sample-size=8192/pp}:u' -- sleep 0.1 WARNING: events were regrouped to match PMUs Cannot add AUX area sampling to a group leader $ After: $ perf record --no-bpf-event -c 10 -e '{intel_pt//,tlb_flush.stlb_any/aux-sample-size=8192/pp}:u' -- sleep 0.1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.078 MB perf.data ] $ perf script -F-dso,+addr | grep -C5 tlb_flush.stlb_any | head -11 sleep 20444 [003] 7939.510243: 1 branches:uH: 7f5350cc82a2 dl_main+0x9a2 => 7f5350cb38f0 _dl_add_to_namespace_list+0x0 sleep 20444 [003] 7939.510243: 1 branches:uH: 7f5350cb3908 _dl_add_to_namespace_list+0x18 => 7f5350cbb080 rtld_mutex_dummy+0x0 sleep 20444 [003] 7939.510243: 1 branches:uH: 7f5350cc8350 dl_main+0xa50 => 0 [unknown] sleep 20444 [003] 7939.510244: 1 branches:uH: 7f5350cc83ca dl_main+0xaca => 7f5350caeb60 _dl_process_pt_gnu_property+0x0 sleep 20444 [003] 7939.510245: 1 branches:uH: 7f5350caeb60 _dl_process_pt_gnu_property+0x0 => 0 [unknown] sleep 20444 7939.510245: 10 tlb_flush.stlb_any/aux-sample-size=8192/pp: 0 7f5350caeb60 _dl_process_pt_gnu_property+0x0 sleep 20444 [003] 7939.510254: 1 branches:uH: 7f5350cc87fe dl_main+0xefe => 7f5350ccd240 strcmp+0x0 sleep 20444 [003] 7939.510254: 1 branches:uH: 7f5350cc8862 dl_main+0xf62 => 0 [unknown] sleep 20444 [003] 7939.510255: 1 branches:uH: 7f5350cc9cdc dl_main+0x23dc => 0 [unknown] sleep 20444 [003] 7939.510257: 1 branches:uH: 7f5350cc89f6 dl_main+0x10f6 => 7f5350cb9530 _dl_setup_hash+0x0 sleep 20444 [003] 7939.510257: 1 branches:uH: 7f5350cc8a2d dl_main+0x112d => 7f5350cb3990 _dl_new_object+0x0 $ Fixes: 347c2f0a0988c59c ("perf parse-events: Sort and group parsed events") Suggested-by: Ian Rogers Signed-off-by: Adrian Hunter Tested-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230508093952.27482-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a468085011ea8bba7fc605a5423d6edaf46d35cf Author: Adrian Hunter Date: Mon May 8 12:39:51 2023 +0300 perf test test_intel_pt.sh: Test sample mode with event with PMU name br_misp_retired.all_branches is supported on processors that support Intel PT, so use it to test sample mode with an event that has been given a PMU name. Please note, the test fails prior to the fix "perf parse-events: Do not break up AUX event group". Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230508093952.27482-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 123361659fa405de8e21bff485fe22a65d85e64e Author: Ian Rogers Date: Tue May 2 15:38:26 2023 -0700 perf evsel: Modify group pmu name for software events If we have a group of {cycles,faults} then we need the faults software event to appear to be on the same PMU as cycles so that we don't split the group in parse_events__sort_events_and_fix_groups. This case is relatively easy as cycles is the leader and will have a PMU name. In the reverse case, {faults,cycles} we still need faults to appear to have the PMU name of cycles but the old behavior is just to return "cpu". For hybrid this fails as cycles will be on "cpu_core" or "cpu_atom", causing faults to be split into a different group. Change the behavior for software events so that the whole group is searched for the named PMU. Signed-off-by: Ian Rogers Tested-by: Adrian Hunter Cc: Ahmad Yasin Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Caleb Biggers Cc: Edward Baker Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Kang Minchul Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Samantha Alt Cc: Stephane Eranian Cc: Sumanth Korikkar Cc: Suzuki Poulouse Cc: Thomas Richter Cc: Tiezhu Yang Cc: Weilin Wang Cc: Xing Zhengjun Cc: Yang Jihong Link: https://lore.kernel.org/r/20230502223851.2234828-20-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 34e82891d995ab89b494032c5ab0ee939cbb7524 Author: Yanteng Si Date: Wed May 10 18:24:52 2023 +0800 tools arch x86: Sync the msr-index.h copy with the kernel sources Picking the changes from: c68e3d473988b9af ("x86/include/asm/msr-index.h: Add IFS Array test bits") Silencing these perf build warnings: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h' diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h Signed-off-by: Yanteng Si Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: loongson-kernel@lists.loongnix.cn Link: https://lore.kernel.org/r/05778ab3c168c8030f6b20e60375dc803f0cd300.1683712945.git.siyanteng@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit 705049ca4f5b7b00a792dfb559878945a6c7e084 Author: Yanteng Si Date: Wed May 10 18:24:11 2023 +0800 tools headers kvm: Sync uapi/{asm/linux} kvm.h headers with the kernel sources Picking the changes from: e65733b5c59a1ea2 ("KVM: x86: Redefine 'longmode' as a flag for KVM_EXIT_HYPERCALL") 30ec7997d175cd68 ("KVM: arm64: timers: Allow userspace to set the global counter offset") 821d935c87bc9525 ("KVM: arm64: Introduce support for userspace SMCCC filtering") 81dc9504a7006b48 ("KVM: arm64: nv: timers: Support hyp timer emulation") a8308b3fc9494953 ("KVM: arm64: Refactor hvc filtering to support different actions") 0e5c9a9d6548e9b1 ("KVM: arm64: Expose SMC/HVC width to userspace") Silencing these perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h' diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h' diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h' diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h Signed-off-by: Yanteng Si Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: loongson-kernel@lists.loongnix.cn Link: https://lore.kernel.org/r/ac5adb58411d23b3360d436a65038fefe91c32a8.1683712945.git.siyanteng@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit 8d6a41c8065e11206e03e7f9fa9018d35b398583 Author: Yanteng Si Date: Wed May 10 18:24:08 2023 +0800 tools include UAPI: Sync the sound/asound.h copy with the kernel sources Picking the changes from: 102882b5c62f6bfe ("ALSA: document that struct __snd_pcm_mmap_control64 is messed up") 9f656705c5faa18a ("ALSA: pcm: rewrite snd_pcm_playback_silence()") Silencing these perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/sound/asound.h' differs from latest version at 'include/uapi/sound/asound.h' diff -u tools/include/uapi/sound/asound.h include/uapi/sound/asound.h Signed-off-by: Yanteng Si Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: loongson-kernel@lists.loongnix.cn Link: https://lore.kernel.org/r/5606e7989bbb029c400117f2e455ab995208266f.1683712945.git.siyanteng@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit 92b8e61e8835109140139bc1eb60329429c32a0f Author: Yanteng Si Date: Wed May 10 18:22:51 2023 +0800 tools headers UAPI: Sync the linux/const.h with the kernel headers Picking the changes from: 31088f6f7906253e ("uapi/linux/const.h: prefer ISO-friendly __typeof__") Silencing these perf build warnings:: Warning: Kernel ABI header at 'tools/include/uapi/linux/const.h' differs from latest version at 'include/uapi/linux/const.h' diff -u tools/include/uapi/linux/const.h include/uapi/linux/const.h Signed-off-by: Yanteng Si Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: loongson-kernel@lists.loongnix.cn Link: https://lore.kernel.org/r/33e963df304394f932d9108a1b0bb327f23a4eca.1683712945.git.siyanteng@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit e7ec3a249c38a9c9be3a1eeb0142fcbaa3bd02d9 Author: Yanteng Si Date: Wed May 10 18:22:49 2023 +0800 tools headers UAPI: Sync the i915_drm.h with the kernel sources Picking the changes from: 1cc064dce4ed0ff1 ("drm/i915/perf: Add support for OA media units") c61d04c9eb435498 ("drm/i915/perf: Add engine class instance parameters to perf") 02abecdeebfcd384 ("drm/i915/uapi: Replace fake flex-array with flexible-array member") Silencing these perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h' diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h Signed-off-by: Yanteng Si Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: loongson-kernel@lists.loongnix.cn Link: https://lore.kernel.org/r/4c0c150997ae1455f49094222daa121385643ae0.1683712945.git.siyanteng@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit e6232180e524e11205d285bb27045bf2c19db265 Author: Yanteng Si Date: Wed May 10 18:21:46 2023 +0800 tools headers UAPI: Sync the drm/drm.h with the kernel sources Picking the changes from: 6068771673a38efc ("drm: document DRM_IOCTL_PRIME_HANDLE_TO_FD and PRIME_FD_TO_HANDLE") 61a55f8b1ebcde68 ("drm: document expectations for GETFB2 handles") 158350aae16a4e66 ("drm: document DRM_IOCTL_GEM_CLOSE") Silencing these perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h' diff -u tools/include/uapi/drm/drm.h include/uapi/drm/drm.h No changes in tooling as these are just C comment documentation changes. Signed-off-by: Yanteng Si Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: loongson-kernel@lists.loongnix.cn Link: https://lore.kernel.org/r/7552c61660bf079f2979fdcbcef8e921255f877a.1683712945.git.siyanteng@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit 5d1ac59ff7445e51a0e4958fa39ac8aa23691698 Author: Yanteng Si Date: Wed May 10 18:21:44 2023 +0800 tools headers UAPI: Sync the linux/in.h with the kernel sources Picking the changes from: 91d0b78c5177f3e4 ("inet: Add IP_LOCAL_PORT_RANGE socket option") Silencing these perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/linux/in.h' differs from latest version at 'include/uapi/linux/in.h' diff -u tools/include/uapi/linux/in.h include/uapi/linux/in.h Signed-off-by: Yanteng Si Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: loongson-kernel@lists.loongnix.cn Link: https://lore.kernel.org/r/23aabc69956ac94fbf388b05c8be08a64e8c7ccc.1683712945.git.siyanteng@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit b0618f38e2ab8ce3f094e4973955cfdbb55fceea Author: Arnaldo Carvalho de Melo Date: Tue May 9 15:42:38 2023 -0300 perf build: Gracefully fail the build if BUILD_BPF_SKEL=1 is specified and clang isn't available Build BPF skels require having a compiler able to generate BPF bytecode, and so far this is only possible with clang, so check for its availability and fail the build when the user explicitely ask for BPF skels to be built. Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Andrii Nakryiko , Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Song Liu Yang: Yang Jihong , Signed-off-by: Arnaldo Carvalho de Melo commit 5f0b89e632ed81b69993f3e68ed924ca3874d0d0 Author: Thomas Richter Date: Tue May 9 15:18:47 2023 +0200 perf test java symbol: Remove needless debuginfod queries Test case 'Test java symbol' might run for a long time. On Fedora 38 the run time is very, very long: Output before: # time ./perf test 108 108: Test java symbol : Ok real 22m15.775s user 3m42.584s sys 4m30.685s # The reason is a lookup for the server for debug symbols as shown in: # cat /etc/debuginfod/elfutils.urls https://debuginfod.fedoraproject.org/ # This lookup is done for every symbol/sample, so about 3500 lookups will take place. To omit this lookup, which is not needed, unset environment variable DEBUGINFOD_URLS=''. Output after: # time ./perf test 108 108: Test java symbol : Ok real 0m6.242s user 0m4.982s sys 0m3.243s # Signed-off-by: Thomas Richter Tested-by: Arnaldo Carvalho de Melo Cc: Heiko Carstens Cc: Ian Rogers Cc: Leo Yan Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20230509131847.835974-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 327daf34554d20a6aa190dce5a625a555055435e Author: Ian Rogers Date: Tue May 2 15:38:11 2023 -0700 perf parse-events: Don't reorder ungrouped events by PMU The pmu_group_name by default returns "cpu" which on non-hybrid/ARM means that ungrouped software, and hardware events are all going to sort by the original insertion index. However, on hybrid and ARM wildcard expansion may mean the PMU name is set and events will be unnecessarily reordered - triggering the reordering warning. Signed-off-by: Ian Rogers Tested-by: Kan Liang Cc: Adrian Hunter Cc: Ahmad Yasin Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Caleb Biggers Cc: Edward Baker Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kang Minchul Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Samantha Alt Cc: Stephane Eranian Cc: Sumanth Korikkar Cc: Suzuki Poulouse Cc: Thomas Richter Cc: Tiezhu Yang Cc: Weilin Wang Cc: Xing Zhengjun Cc: Yang Jihong Link: https://lore.kernel.org/r/20230502223851.2234828-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit ccc66c6092802d682537227136dcbd0527027e6f Author: Ian Rogers Date: Tue May 2 15:38:10 2023 -0700 perf metric: JSON flag to not group events if gathering a metric group Some metric groups have metrics that don't have fully overlapping events, meaning that the group's events become unique event groups that may need to multiplex with each other. This can be particularly unfortunate when the groups wouldn't need to multiplex because there are sufficient hardware counters. Add a flag so that if recording a metric group then the metrics within the group needn't use groups for their events. The flag is added to Intel TopdownL1 and TopdownL2 metrics. Signed-off-by: Ian Rogers Tested-by: Kan Liang Cc: Adrian Hunter Cc: Ahmad Yasin Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Caleb Biggers Cc: Edward Baker Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kang Minchul Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Samantha Alt Cc: Stephane Eranian Cc: Sumanth Korikkar Cc: Suzuki Poulouse Cc: Thomas Richter Cc: Tiezhu Yang Cc: Weilin Wang Cc: Xing Zhengjun Cc: Yang Jihong Link: https://lore.kernel.org/r/20230502223851.2234828-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 1b114824106ca4686276c94e414e06bf58b0934f Author: Ian Rogers Date: Tue May 2 15:38:09 2023 -0700 perf stat: Introduce skippable evsels 'perf stat' with no arguments will use default events and metrics. These events may fail to open even with kernel and hypervisor disabled. When these fail then the permissions error appears even though they were implicitly selected. This is particularly a problem with the automatic selection of the TopdownL1 metric group on certain architectures like Skylake: $ perf stat true Error: Access to performance monitoring and observability operations is limited. Consider adjusting /proc/sys/kernel/perf_event_paranoid setting to open access to performance monitoring and observability operations for processes without CAP_PERFMON, CAP_SYS_PTRACE or CAP_SYS_ADMIN Linux capability. More information can be found at 'Perf events and tool security' document: https://www.kernel.org/doc/html/latest/admin-guide/perf-security.html perf_event_paranoid setting is 2: -1: Allow use of (almost) all events by all users Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK >= 0: Disallow raw and ftrace function tracepoint access >= 1: Disallow CPU event access >= 2: Disallow kernel profiling To make the adjusted perf_event_paranoid setting permanent preserve it in /etc/sysctl.conf (e.g. kernel.perf_event_paranoid = ) $ This patch adds skippable evsels that when they fail to open won't cause termination and will appear as "" in output. The TopdownL1 events, from the metric group, are marked as skippable. This turns the failure above to: $ perf stat perf bench internals synthesize Computing performance of single threaded perf event synthesis by synthesizing events on the perf process itself: Average synthesis took: 49.287 usec (+- 0.083 usec) Average num. events: 3.000 (+- 0.000) Average time per event 16.429 usec Average data synthesis took: 49.641 usec (+- 0.085 usec) Average num. events: 11.000 (+- 0.000) Average time per event 4.513 usec Performance counter stats for 'perf bench internals synthesize': 1,222.38 msec task-clock:u # 0.993 CPUs utilized 0 context-switches:u # 0.000 /sec 0 cpu-migrations:u # 0.000 /sec 162 page-faults:u # 132.529 /sec 774,445,184 cycles:u # 0.634 GHz (49.61%) 1,640,969,811 instructions:u # 2.12 insn per cycle (59.67%) 302,052,148 branches:u # 247.102 M/sec (59.69%) 1,807,718 branch-misses:u # 0.60% of all branches (59.68%) 5,218,927 CPU_CLK_UNHALTED.REF_XCLK:u # 4.269 M/sec # 17.3 % tma_frontend_bound # 56.4 % tma_retiring # nan % tma_backend_bound # nan % tma_bad_speculation (60.01%) 536,580,469 IDQ_UOPS_NOT_DELIVERED.CORE:u # 438.965 M/sec (60.33%) INT_MISC.RECOVERY_CYCLES_ANY:u 5,223,936 CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE:u # 4.274 M/sec (40.31%) 774,127,250 CPU_CLK_UNHALTED.THREAD:u # 633.297 M/sec (50.34%) 1,746,579,518 UOPS_RETIRED.RETIRE_SLOTS:u # 1.429 G/sec (50.12%) 1,940,625,702 UOPS_ISSUED.ANY:u # 1.588 G/sec (49.70%) 1.231055525 seconds time elapsed 0.258327000 seconds user 0.965749000 seconds sys $ The event INT_MISC.RECOVERY_CYCLES_ANY:u is skipped as it can't be opened with paranoia 2 on Skylake. With a lower paranoia, or as root, all events/metrics are computed. Signed-off-by: Ian Rogers Tested-by: Kan Liang Cc: Adrian Hunter Cc: Ahmad Yasin Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Caleb Biggers Cc: Edward Baker Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kang Minchul Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Samantha Alt Cc: Stephane Eranian Cc: Sumanth Korikkar Cc: Suzuki Poulouse Cc: Thomas Richter Cc: Tiezhu Yang Cc: Weilin Wang Cc: Xing Zhengjun Cc: Yang Jihong Link: https://lore.kernel.org/r/20230502223851.2234828-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2a939c8695035b11e00239610d88551be34c7a61 Author: Ian Rogers Date: Tue May 2 15:38:08 2023 -0700 perf metric: Change divide by zero and !support events behavior Division by zero causes expression parsing to fail and no metric to be generated. This can mean for short running benchmarks metrics are not shown. Change the behavior to make the value nan, which gets shown like: ''' $ perf stat -M TopdownL2 true Performance counter stats for 'true': 1,031,492 INST_RETIRED.ANY # nan % tma_fetch_bandwidth # nan % tma_heavy_operations # nan % tma_light_operations 29,304 CPU_CLK_UNHALTED.REF_XCLK # nan % tma_fetch_latency # nan % tma_branch_mispredicts # nan % tma_machine_clears # nan % tma_core_bound # nan % tma_memory_bound 2,658,319 IDQ_UOPS_NOT_DELIVERED.CORE 11,167 EXE_ACTIVITY.BOUND_ON_STORES 262,058 EXE_ACTIVITY.1_PORTS_UTIL BR_MISP_RETIRED.ALL_BRANCHES (0.00%) INT_MISC.RECOVERY_CYCLES_ANY (0.00%) CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE (0.00%) CPU_CLK_UNHALTED.THREAD (0.00%) UOPS_RETIRED.RETIRE_SLOTS (0.00%) CYCLE_ACTIVITY.STALLS_MEM_ANY (0.00%) UOPS_RETIRED.MACRO_FUSED (0.00%) IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE (0.00%) EXE_ACTIVITY.2_PORTS_UTIL (0.00%) CYCLE_ACTIVITY.STALLS_TOTAL (0.00%) MACHINE_CLEARS.COUNT (0.00%) UOPS_ISSUED.ANY (0.00%) 0.002864879 seconds time elapsed 0.003012000 seconds user 0.000000000 seconds sys ''' When events aren't supported a count of 0 can be confusing and make metrics look meaningful. Change these to be nan also which, with the next change, gets shown like: ''' $ perf stat true Performance counter stats for 'true': 1.25 msec task-clock:u # 0.387 CPUs utilized 0 context-switches:u # 0.000 /sec 0 cpu-migrations:u # 0.000 /sec 46 page-faults:u # 36.702 K/sec 255,942 cycles:u # 0.204 GHz (88.66%) 123,046 instructions:u # 0.48 insn per cycle 28,301 branches:u # 22.580 M/sec 2,489 branch-misses:u # 8.79% of all branches 4,719 CPU_CLK_UNHALTED.REF_XCLK:u # 3.765 M/sec # nan % tma_frontend_bound # nan % tma_retiring # nan % tma_backend_bound # nan % tma_bad_speculation 344,855 IDQ_UOPS_NOT_DELIVERED.CORE:u # 275.147 M/sec INT_MISC.RECOVERY_CYCLES_ANY:u CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE:u (0.00%) CPU_CLK_UNHALTED.THREAD:u (0.00%) UOPS_RETIRED.RETIRE_SLOTS:u (0.00%) UOPS_ISSUED.ANY:u (0.00%) 0.003238142 seconds time elapsed 0.000000000 seconds user 0.003434000 seconds sys ''' Ensure that nan metric values are quoted as nan isn't a valid number in JSON. Signed-off-by: Ian Rogers Tested-by: Kan Liang Cc: Adrian Hunter Cc: Ahmad Yasin Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Caleb Biggers Cc: Edward Baker Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kang Minchul Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Samantha Alt Cc: Stephane Eranian Cc: Sumanth Korikkar Cc: Suzuki Poulouse Cc: Thomas Richter Cc: Tiezhu Yang Cc: Weilin Wang Cc: Xing Zhengjun Cc: Yang Jihong Link: https://lore.kernel.org/r/20230502223851.2234828-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 504a10d9e46bc37b23d0a1ae2f28973c8516e636 Author: Bob Peterson Date: Fri Apr 28 12:07:46 2023 -0400 gfs2: Don't deref jdesc in evict On corrupt gfs2 file systems the evict code can try to reference the journal descriptor structure, jdesc, after it has been freed and set to NULL. The sequence of events is: init_journal() ... fail_jindex: gfs2_jindex_free(sdp); <------frees journals, sets jdesc = NULL if (gfs2_holder_initialized(&ji_gh)) gfs2_glock_dq_uninit(&ji_gh); fail: iput(sdp->sd_jindex); <--references jdesc in evict_linked_inode evict() gfs2_evict_inode() evict_linked_inode() ret = gfs2_trans_begin(sdp, 0, sdp->sd_jdesc->jd_blocks); <------references the now freed/zeroed sd_jdesc pointer. The call to gfs2_trans_begin is done because the truncate_inode_pages call can cause gfs2 events that require a transaction, such as removing journaled data (jdata) blocks from the journal. This patch fixes the problem by adding a check for sdp->sd_jdesc to function gfs2_evict_inode. In theory, this should only happen to corrupt gfs2 file systems, when gfs2 detects the problem, reports it, then tries to evict all the system inodes it has read in up to that point. Reported-by: Yang Lan Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit ad2fd53a7870a395b8564697bef6c329d017c6c9 Merge: 16a8829130ca2 3d43f9f639542 Author: Linus Torvalds Date: Wed May 10 09:36:42 2023 -0500 Merge tag 'platform-drivers-x86-v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: "Nothing special to report just various small fixes: - thinkpad_acpi: Fix profile (performance/bal/low-power) regression on T490 - misc other small fixes / hw-id additions" * tag 'platform-drivers-x86-v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/mellanox: fix potential race in mlxbf-tmfifo driver platform/x86: touchscreen_dmi: Add info for the Dexp Ursus KX210i platform/x86: touchscreen_dmi: Add upside-down quirk for GDIX1002 ts on the Juno Tablet platform/x86: thinkpad_acpi: Add profile force ability platform/x86: thinkpad_acpi: Fix platform profiles on T490 platform/x86: hp-wmi: add micmute to hp_wmi_keymap struct platform/x86/intel-uncore-freq: Return error on write frequency platform/x86: intel_scu_pcidrv: Add back PCI ID for Medfield commit 2da5bffe9eaa5819a868e8eaaa11b3fd0f16a691 Author: Vitaly Prosyak Date: Wed May 10 09:51:11 2023 -0400 drm/sched: Check scheduler work queue before calling timeout handling During an IGT GPU reset test we see again oops despite of commit 0c8c901aaaebc9 (drm/sched: Check scheduler ready before calling timeout handling). It uses ready condition whether to call drm_sched_fault which unwind the TDR leads to GPU reset. However it looks the ready condition is overloaded with other meanings, for example, for the following stack is related GPU reset : 0 gfx_v9_0_cp_gfx_start 1 gfx_v9_0_cp_gfx_resume 2 gfx_v9_0_cp_resume 3 gfx_v9_0_hw_init 4 gfx_v9_0_resume 5 amdgpu_device_ip_resume_phase2 does the following: /* start the ring */ gfx_v9_0_cp_gfx_start(adev); ring->sched.ready = true; The same approach is for other ASICs as well : gfx_v8_0_cp_gfx_resume gfx_v10_0_kiq_resume, etc... As a result, our GPU reset test causes GPU fault which calls unconditionally gfx_v9_0_fault and then drm_sched_fault. However now it depends on whether the interrupt service routine drm_sched_fault is executed after gfx_v9_0_cp_gfx_start is completed which sets the ready field of the scheduler to true even for uninitialized schedulers and causes oops vs no fault or when ISR drm_sched_fault is completed prior gfx_v9_0_cp_gfx_start and NULL pointer dereference does not occur. Use the field timeout_wq to prevent oops for uninitialized schedulers. The field could be initialized by the work queue of resetting the domain. v1: Corrections to commit message (Luben) Fixes: 11b3b9f461c5c4 ("drm/sched: Check scheduler ready before calling timeout handling") Signed-off-by: Vitaly Prosyak Link: https://lore.kernel.org/r/20230510135111.58631-1-vitaly.prosyak@amd.com Reviewed-by: Luben Tuikov Signed-off-by: Luben Tuikov commit 1d6a4fc85717677e00fefffd847a50fc5928ce69 Author: Qu Wenruo Date: Fri Apr 28 14:13:05 2023 +0800 btrfs: make clear_cache mount option to rebuild FST without disabling it Previously clear_cache mount option would simply disable free-space-tree feature temporarily then re-enable it to rebuild the whole free space tree. But this is problematic for block-group-tree feature, as we have an artificial dependency on free-space-tree feature. If we go the existing method, after clearing the free-space-tree feature, we would flip the filesystem to read-only mode, as we detect a super block write with block-group-tree but no free-space-tree feature. This patch would change the behavior by properly rebuilding the free space tree without disabling this feature, thus allowing clear_cache mount option to work with block group tree. Now we can mount a filesystem with block-group-tree feature and clear_mount option: $ mkfs.btrfs -O block-group-tree /dev/test/scratch1 -f $ sudo mount /dev/test/scratch1 /mnt/btrfs -o clear_cache $ sudo dmesg -t | head -n 5 BTRFS info (device dm-1): force clearing of disk cache BTRFS info (device dm-1): using free space tree BTRFS info (device dm-1): auto enabling async discard BTRFS info (device dm-1): rebuilding free space tree BTRFS info (device dm-1): checking UUID tree CC: stable@vger.kernel.org # 6.1+ Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit c83b56d1dd87cf67492bb770c26d6f87aee70ed6 Author: Christoph Hellwig Date: Mon May 8 07:58:37 2023 -0700 btrfs: zero the buffer before marking it dirty in btrfs_redirty_list_add btrfs_redirty_list_add zeroes the buffer data and sets the EXTENT_BUFFER_NO_CHECK to make sure writeback is fine with a bogus header. But it does that after already marking the buffer dirty, which means that writeback could already be looking at the buffer. Switch the order of operations around so that the buffer is only marked dirty when we're ready to write it. Fixes: d3575156f662 ("btrfs: zoned: redirty released extent buffers") CC: stable@vger.kernel.org # 5.15+ Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 02ca9e6fb5f66a031df4fac508b8e477ca69e918 Author: Naohiro Aota Date: Tue May 9 18:29:15 2023 +0000 btrfs: zoned: fix full zone super block reading on ZNS When both of the superblock zones are full, we need to check which superblock is newer. The calculation of last superblock position is wrong as it does not consider zone_capacity and uses the length. Fixes: 9658b72ef300 ("btrfs: zoned: locate superblock position using zone capacity") CC: stable@vger.kernel.org # 6.1+ Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Signed-off-by: David Sterba commit f84353c7c20536ea7e01eca79430eccdf3cc7348 Author: Naohiro Aota Date: Mon May 8 22:14:20 2023 +0000 btrfs: zoned: zone finish data relocation BG with last IO For data block groups, we zone finish a zone (or, just deactivate it) when seeing the last IO in btrfs_finish_ordered_io(). That is only called for IOs using ZONE_APPEND, but we use a regular WRITE command for data relocation IOs. Detect it and call btrfs_zone_finish_endio() properly. Fixes: be1a1d7a5d24 ("btrfs: zoned: finish fully written block group") CC: stable@vger.kernel.org # 6.1+ Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Signed-off-by: David Sterba commit cdc2e28e214fe9315cdd7e069c1c8e2428f93427 Author: Colin Foster Date: Tue May 9 21:48:51 2023 -0700 net: mscc: ocelot: fix stat counter register values Commit d4c367650704 ("net: mscc: ocelot: keep ocelot_stat_layout by reg address, not offset") organized the stats counters for Ocelot chips, namely the VSC7512 and VSC7514. A few of the counter offsets were incorrect, and were caught by this warning: WARNING: CPU: 0 PID: 24 at drivers/net/ethernet/mscc/ocelot_stats.c:909 ocelot_stats_init+0x1fc/0x2d8 reg 0x5000078 had address 0x220 but reg 0x5000079 has address 0x214, bulking broken! Fix these register offsets. Fixes: d4c367650704 ("net: mscc: ocelot: keep ocelot_stat_layout by reg address, not offset") Signed-off-by: Colin Foster Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 2b951b0efbaa6c805854b60c11f08811054d50cd Author: Ard Biesheuvel Date: Mon May 8 13:40:19 2023 +0100 ARM: 9297/1: vfp: avoid unbalanced stack on 'success' return path Commit c76c6c4ecbec0deb5 ("ARM: 9294/2: vfp: Fix broken softirq handling with instrumentation enabled") updated the VFP exception entry logic to go via a C function, so that we get the compiler's version of local_bh_disable(), which may be instrumented, and isn't generally callable from assembler. However, this assumes that passing an alternative 'success' return address works in C as it does in asm, and this is only the case if the C calls in question are tail calls, as otherwise, the stack will need some unwinding as well. I have already sent patches to the list that replace most of the asm logic with C code, and so it is preferable to have a minimal fix that addresses the issue and can be backported along with the commit that it fixes to v6.3 from v6.4. Hopefully, we can land the C conversion for v6.5. So instead of passing the 'success' return address as a function argument, pass the stack address from where to pop it so that both LR and SP have the expected value. Fixes: c76c6c4ecbec0deb5 ("ARM: 9294/2: vfp: Fix broken softirq handling with ...") Reported-by: syzbot+d4b00edc2d0c910d4bf4@syzkaller.appspotmail.com Tested-by: syzbot+d4b00edc2d0c910d4bf4@syzkaller.appspotmail.com Reviewed-by: Linus Walleij Tested-by: Andrew Lunn Signed-off-by: Ard Biesheuvel Tested-by: Andre Przywara Signed-off-by: Russell King (Oracle) commit 90cbed5247439a966b645b34eb0a2e037836ea8e Author: t.feng Date: Wed May 10 11:50:44 2023 +0800 ipvlan:Fix out-of-bounds caused by unclear skb->cb If skb enqueue the qdisc, fq_skb_cb(skb)->time_to_send is changed which is actually skb->cb, and IPCB(skb_in)->opt will be used in __ip_options_echo. It is possible that memcpy is out of bounds and lead to stack overflow. We should clear skb->cb before ip_local_out or ip6_local_out. v2: 1. clean the stack info 2. use IPCB/IP6CB instead of skb->cb crash on stable-5.10(reproduce in kasan kernel). Stack info: [ 2203.651571] BUG: KASAN: stack-out-of-bounds in __ip_options_echo+0x589/0x800 [ 2203.653327] Write of size 4 at addr ffff88811a388f27 by task swapper/3/0 [ 2203.655460] CPU: 3 PID: 0 Comm: swapper/3 Kdump: loaded Not tainted 5.10.0-60.18.0.50.h856.kasan.eulerosv2r11.x86_64 #1 [ 2203.655466] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.2-0-g5f4c7b1-20181220_000000-szxrtosci10000 04/01/2014 [ 2203.655475] Call Trace: [ 2203.655481] [ 2203.655501] dump_stack+0x9c/0xd3 [ 2203.655514] print_address_description.constprop.0+0x19/0x170 [ 2203.655530] __kasan_report.cold+0x6c/0x84 [ 2203.655586] kasan_report+0x3a/0x50 [ 2203.655594] check_memory_region+0xfd/0x1f0 [ 2203.655601] memcpy+0x39/0x60 [ 2203.655608] __ip_options_echo+0x589/0x800 [ 2203.655654] __icmp_send+0x59a/0x960 [ 2203.655755] nf_send_unreach+0x129/0x3d0 [nf_reject_ipv4] [ 2203.655763] reject_tg+0x77/0x1bf [ipt_REJECT] [ 2203.655772] ipt_do_table+0x691/0xa40 [ip_tables] [ 2203.655821] nf_hook_slow+0x69/0x100 [ 2203.655828] __ip_local_out+0x21e/0x2b0 [ 2203.655857] ip_local_out+0x28/0x90 [ 2203.655868] ipvlan_process_v4_outbound+0x21e/0x260 [ipvlan] [ 2203.655931] ipvlan_xmit_mode_l3+0x3bd/0x400 [ipvlan] [ 2203.655967] ipvlan_queue_xmit+0xb3/0x190 [ipvlan] [ 2203.655977] ipvlan_start_xmit+0x2e/0xb0 [ipvlan] [ 2203.655984] xmit_one.constprop.0+0xe1/0x280 [ 2203.655992] dev_hard_start_xmit+0x62/0x100 [ 2203.656000] sch_direct_xmit+0x215/0x640 [ 2203.656028] __qdisc_run+0x153/0x1f0 [ 2203.656069] __dev_queue_xmit+0x77f/0x1030 [ 2203.656173] ip_finish_output2+0x59b/0xc20 [ 2203.656244] __ip_finish_output.part.0+0x318/0x3d0 [ 2203.656312] ip_finish_output+0x168/0x190 [ 2203.656320] ip_output+0x12d/0x220 [ 2203.656357] __ip_queue_xmit+0x392/0x880 [ 2203.656380] __tcp_transmit_skb+0x1088/0x11c0 [ 2203.656436] __tcp_retransmit_skb+0x475/0xa30 [ 2203.656505] tcp_retransmit_skb+0x2d/0x190 [ 2203.656512] tcp_retransmit_timer+0x3af/0x9a0 [ 2203.656519] tcp_write_timer_handler+0x3ba/0x510 [ 2203.656529] tcp_write_timer+0x55/0x180 [ 2203.656542] call_timer_fn+0x3f/0x1d0 [ 2203.656555] expire_timers+0x160/0x200 [ 2203.656562] run_timer_softirq+0x1f4/0x480 [ 2203.656606] __do_softirq+0xfd/0x402 [ 2203.656613] asm_call_irq_on_stack+0x12/0x20 [ 2203.656617] [ 2203.656623] do_softirq_own_stack+0x37/0x50 [ 2203.656631] irq_exit_rcu+0x134/0x1a0 [ 2203.656639] sysvec_apic_timer_interrupt+0x36/0x80 [ 2203.656646] asm_sysvec_apic_timer_interrupt+0x12/0x20 [ 2203.656654] RIP: 0010:default_idle+0x13/0x20 [ 2203.656663] Code: 89 f0 5d 41 5c 41 5d 41 5e c3 cc cc cc cc cc cc cc cc cc cc cc cc cc 0f 1f 44 00 00 0f 1f 44 00 00 0f 00 2d 9f 32 57 00 fb f4 cc cc cc cc 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 54 be 08 [ 2203.656668] RSP: 0018:ffff88810036fe78 EFLAGS: 00000256 [ 2203.656676] RAX: ffffffffaf2a87f0 RBX: ffff888100360000 RCX: ffffffffaf290191 [ 2203.656681] RDX: 0000000000098b5e RSI: 0000000000000004 RDI: ffff88811a3c4f60 [ 2203.656686] RBP: 0000000000000000 R08: 0000000000000001 R09: ffff88811a3c4f63 [ 2203.656690] R10: ffffed10234789ec R11: 0000000000000001 R12: 0000000000000003 [ 2203.656695] R13: ffff888100360000 R14: 0000000000000000 R15: 0000000000000000 [ 2203.656729] default_idle_call+0x5a/0x150 [ 2203.656735] cpuidle_idle_call+0x1c6/0x220 [ 2203.656780] do_idle+0xab/0x100 [ 2203.656786] cpu_startup_entry+0x19/0x20 [ 2203.656793] secondary_startup_64_no_verify+0xc2/0xcb [ 2203.657409] The buggy address belongs to the page: [ 2203.658648] page:0000000027a9842f refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11a388 [ 2203.658665] flags: 0x17ffffc0001000(reserved|node=0|zone=2|lastcpupid=0x1fffff) [ 2203.658675] raw: 0017ffffc0001000 ffffea000468e208 ffffea000468e208 0000000000000000 [ 2203.658682] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 [ 2203.658686] page dumped because: kasan: bad access detected To reproduce(ipvlan with IPVLAN_MODE_L3): Env setting: ======================================================= modprobe ipvlan ipvlan_default_mode=1 sysctl net.ipv4.conf.eth0.forwarding=1 iptables -t nat -A POSTROUTING -s 20.0.0.0/255.255.255.0 -o eth0 -j MASQUERADE ip link add gw link eth0 type ipvlan ip -4 addr add 20.0.0.254/24 dev gw ip netns add net1 ip link add ipv1 link eth0 type ipvlan ip link set ipv1 netns net1 ip netns exec net1 ip link set ipv1 up ip netns exec net1 ip -4 addr add 20.0.0.4/24 dev ipv1 ip netns exec net1 route add default gw 20.0.0.254 ip netns exec net1 tc qdisc add dev ipv1 root netem loss 10% ifconfig gw up iptables -t filter -A OUTPUT -p tcp --dport 8888 -j REJECT --reject-with icmp-port-unreachable ======================================================= And then excute the shell(curl any address of eth0 can reach): for((i=1;i<=100000;i++)) do ip netns exec net1 curl x.x.x.x:8888 done ======================================================= Fixes: 2ad7bf363841 ("ipvlan: Initial check-in of the IPVLAN driver.") Signed-off-by: "t.feng" Suggested-by: Florian Westphal Reviewed-by: Paolo Abeni Signed-off-by: David S. Miller commit 77c964dad99a182a3df6add8bad73aca1be59890 Author: Randy Dunlap Date: Tue May 9 19:29:14 2023 -0700 docs: networking: fix x25-iface.rst heading & index order Fix the chapter heading for "X.25 Device Driver Interface" so that it does not contain a trailing '-' character, which makes Sphinx omit this heading from the contents. Reverse the order of the x25.rst and x25-iface.rst files in the index so that the project introduction (x25.rst) comes first. Fixes: 883780af7209 ("docs: networking: convert x25-iface.txt to ReST") Signed-off-by: Randy Dunlap Cc: Mauro Carvalho Chehab Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Martin Schiller Cc: linux-x25@vger.kernel.org Reviewed-by: Bagas Sanjaya Signed-off-by: David S. Miller commit f4c2e67c1773d2a2632381ee30e9139c1e744c16 Author: Ziwei Xiao Date: Tue May 9 15:51:23 2023 -0700 gve: Remove the code of clearing PBA bit Clearing the PBA bit from the driver is race prone and it may lead to dropped interrupt events. This could potentially lead to the traffic being completely halted. Fixes: 5e8c5adf95f8 ("gve: DQO: Add core netdev features") Signed-off-by: Ziwei Xiao Signed-off-by: Bailey Forrest Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit e14cadfd80d76f01bfaa1a8d745b1db19b57d6be Author: Eric Dumazet Date: Tue May 9 20:36:56 2023 +0000 tcp: add annotations around sk->sk_shutdown accesses Now sk->sk_shutdown is no longer a bitfield, we can add standard READ_ONCE()/WRITE_ONCE() annotations to silence KCSAN reports like the following: BUG: KCSAN: data-race in tcp_disconnect / tcp_poll write to 0xffff88814588582c of 1 bytes by task 3404 on cpu 1: tcp_disconnect+0x4d6/0xdb0 net/ipv4/tcp.c:3121 __inet_stream_connect+0x5dd/0x6e0 net/ipv4/af_inet.c:715 inet_stream_connect+0x48/0x70 net/ipv4/af_inet.c:727 __sys_connect_file net/socket.c:2001 [inline] __sys_connect+0x19b/0x1b0 net/socket.c:2018 __do_sys_connect net/socket.c:2028 [inline] __se_sys_connect net/socket.c:2025 [inline] __x64_sys_connect+0x41/0x50 net/socket.c:2025 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff88814588582c of 1 bytes by task 3374 on cpu 0: tcp_poll+0x2e6/0x7d0 net/ipv4/tcp.c:562 sock_poll+0x253/0x270 net/socket.c:1383 vfs_poll include/linux/poll.h:88 [inline] io_poll_check_events io_uring/poll.c:281 [inline] io_poll_task_func+0x15a/0x820 io_uring/poll.c:333 handle_tw_list io_uring/io_uring.c:1184 [inline] tctx_task_work+0x1fe/0x4d0 io_uring/io_uring.c:1246 task_work_run+0x123/0x160 kernel/task_work.c:179 get_signal+0xe64/0xff0 kernel/signal.c:2635 arch_do_signal_or_restart+0x89/0x2a0 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop+0x6f/0xe0 kernel/entry/common.c:168 exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:297 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x03 -> 0x00 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 4063384ef762cc5946fc7a3f89879e76c6ec51e2 Author: Eric Dumazet Date: Tue May 9 13:18:57 2023 +0000 net: add vlan_get_protocol_and_depth() helper Before blamed commit, pskb_may_pull() was used instead of skb_header_pointer() in __vlan_get_protocol() and friends. Few callers depended on skb->head being populated with MAC header, syzbot caught one of them (skb_mac_gso_segment()) Add vlan_get_protocol_and_depth() to make the intent clearer and use it where sensible. This is a more generic fix than commit e9d3f80935b6 ("net/af_packet: make sure to pull mac header") which was dealing with a similar issue. kernel BUG at include/linux/skbuff.h:2655 ! invalid opcode: 0000 [#1] SMP KASAN CPU: 0 PID: 1441 Comm: syz-executor199 Not tainted 6.1.24-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 RIP: 0010:__skb_pull include/linux/skbuff.h:2655 [inline] RIP: 0010:skb_mac_gso_segment+0x68f/0x6a0 net/core/gro.c:136 Code: fd 48 8b 5c 24 10 44 89 6b 70 48 c7 c7 c0 ae 0d 86 44 89 e6 e8 a1 91 d0 00 48 c7 c7 00 af 0d 86 48 89 de 31 d2 e8 d1 4a e9 ff <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 41 RSP: 0018:ffffc90001bd7520 EFLAGS: 00010286 RAX: ffffffff8469736a RBX: ffff88810f31dac0 RCX: ffff888115a18b00 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc90001bd75e8 R08: ffffffff84697183 R09: fffff5200037adf9 R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000012 R13: 000000000000fee5 R14: 0000000000005865 R15: 000000000000fed7 FS: 000055555633f300(0000) GS:ffff8881f6a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000000 CR3: 0000000116fea000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: [] __skb_gso_segment+0x32d/0x4c0 net/core/dev.c:3419 [] skb_gso_segment include/linux/netdevice.h:4819 [inline] [] validate_xmit_skb+0x3aa/0xee0 net/core/dev.c:3725 [] __dev_queue_xmit+0x1332/0x3300 net/core/dev.c:4313 [] dev_queue_xmit+0x17/0x20 include/linux/netdevice.h:3029 [] packet_snd net/packet/af_packet.c:3111 [inline] [] packet_sendmsg+0x49d2/0x6470 net/packet/af_packet.c:3142 [] sock_sendmsg_nosec net/socket.c:716 [inline] [] sock_sendmsg net/socket.c:736 [inline] [] __sys_sendto+0x472/0x5f0 net/socket.c:2139 [] __do_sys_sendto net/socket.c:2151 [inline] [] __se_sys_sendto net/socket.c:2147 [inline] [] __x64_sys_sendto+0xe5/0x100 net/socket.c:2147 [] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [] do_syscall_64+0x2f/0x50 arch/x86/entry/common.c:80 [] entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: 469aceddfa3e ("vlan: consolidate VLAN parsing code and limit max parsing depth") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Toke Høiland-Jørgensen Cc: Willem de Bruijn Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 43fb622d91a9f408322735d2f736495c1009f575 Author: Russell King (Oracle) Date: Tue May 9 12:50:04 2023 +0100 net: pcs: xpcs: fix incorrect number of interfaces In synopsys_xpcs_compat[], the DW_XPCS_2500BASEX entry was setting the number of interfaces using the xpcs_2500basex_features array rather than xpcs_2500basex_interfaces. This causes us to overflow the array of interfaces. Fix this. Fixes: f27abde3042a ("net: pcs: add 2500BASEX support for Intel mGbE controller") Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit d0ac89f6f9879fae316c155de77b5173b3e2c9c9 Author: Eric Dumazet Date: Tue May 9 18:29:48 2023 +0000 net: deal with most data-races in sk_wait_event() __condition is evaluated twice in sk_wait_event() macro. First invocation is lockless, and reads can race with writes, as spotted by syzbot. BUG: KCSAN: data-race in sk_stream_wait_connect / tcp_disconnect write to 0xffff88812d83d6a0 of 4 bytes by task 9065 on cpu 1: tcp_disconnect+0x2cd/0xdb0 inet_shutdown+0x19e/0x1f0 net/ipv4/af_inet.c:911 __sys_shutdown_sock net/socket.c:2343 [inline] __sys_shutdown net/socket.c:2355 [inline] __do_sys_shutdown net/socket.c:2363 [inline] __se_sys_shutdown+0xf8/0x140 net/socket.c:2361 __x64_sys_shutdown+0x31/0x40 net/socket.c:2361 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff88812d83d6a0 of 4 bytes by task 9040 on cpu 0: sk_stream_wait_connect+0x1de/0x3a0 net/core/stream.c:75 tcp_sendmsg_locked+0x2e4/0x2120 net/ipv4/tcp.c:1266 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1484 inet6_sendmsg+0x63/0x80 net/ipv6/af_inet6.c:651 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] __sys_sendto+0x246/0x300 net/socket.c:2142 __do_sys_sendto net/socket.c:2154 [inline] __se_sys_sendto net/socket.c:2150 [inline] __x64_sys_sendto+0x78/0x90 net/socket.c:2150 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x00000000 -> 0x00000068 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit e05a5f510f26607616fecdd4ac136310c8bea56b Author: Eric Dumazet Date: Tue May 9 16:35:53 2023 +0000 net: annotate sk->sk_err write from do_recvmmsg() do_recvmmsg() can write to sk->sk_err from multiple threads. As said before, many other points reading or writing sk_err need annotations. Fixes: 34b88a68f26a ("net: Fix use after free in the recvmmsg exit path") Signed-off-by: Eric Dumazet Reported-by: syzbot Reviewed-by: Kuniyuki Iwashima Signed-off-by: David S. Miller commit a939d14919b799e6fff8a9c80296ca229ba2f8a4 Author: Eric Dumazet Date: Tue May 9 16:56:34 2023 +0000 netlink: annotate accesses to nlk->cb_running Both netlink_recvmsg() and netlink_native_seq_show() read nlk->cb_running locklessly. Use READ_ONCE() there. Add corresponding WRITE_ONCE() to netlink_dump() and __netlink_dump_start() syzbot reported: BUG: KCSAN: data-race in __netlink_dump_start / netlink_recvmsg write to 0xffff88813ea4db59 of 1 bytes by task 28219 on cpu 0: __netlink_dump_start+0x3af/0x4d0 net/netlink/af_netlink.c:2399 netlink_dump_start include/linux/netlink.h:308 [inline] rtnetlink_rcv_msg+0x70f/0x8c0 net/core/rtnetlink.c:6130 netlink_rcv_skb+0x126/0x220 net/netlink/af_netlink.c:2577 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6192 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x56f/0x640 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x665/0x770 net/netlink/af_netlink.c:1942 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] sock_write_iter+0x1aa/0x230 net/socket.c:1138 call_write_iter include/linux/fs.h:1851 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x463/0x760 fs/read_write.c:584 ksys_write+0xeb/0x1a0 fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __x64_sys_write+0x42/0x50 fs/read_write.c:646 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff88813ea4db59 of 1 bytes by task 28222 on cpu 1: netlink_recvmsg+0x3b4/0x730 net/netlink/af_netlink.c:2022 sock_recvmsg_nosec+0x4c/0x80 net/socket.c:1017 ____sys_recvmsg+0x2db/0x310 net/socket.c:2718 ___sys_recvmsg net/socket.c:2762 [inline] do_recvmmsg+0x2e5/0x710 net/socket.c:2856 __sys_recvmmsg net/socket.c:2935 [inline] __do_sys_recvmmsg net/socket.c:2958 [inline] __se_sys_recvmmsg net/socket.c:2951 [inline] __x64_sys_recvmmsg+0xe2/0x160 net/socket.c:2951 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x00 -> 0x01 Fixes: 16b304f3404f ("netlink: Eliminate kmalloc in netlink dump operation.") Reported-by: syzbot Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit a5b3363d8cec749fbdfe96bde7edbe19eeaefeb1 Merge: 7c83e28f10830 6cbe791c0f4ed Author: David S. Miller Date: Wed May 10 09:27:21 2023 +0100 Merge branch 'bonding-overflow' Hangbin Liu says: ==================== bonding: fix send_peer_notif overflow Bonding send_peer_notif was defined as u8. But the value is num_peer_notif multiplied by peer_notif_delay, which is u8 * u32. This would cause the send_peer_notif overflow. Before the fix: TEST: num_grat_arp (active-backup miimon num_grat_arp 10) [ OK ] TEST: num_grat_arp (active-backup miimon num_grat_arp 20) [ OK ] 4 garp packets sent on active slave eth1 TEST: num_grat_arp (active-backup miimon num_grat_arp 30) [FAIL] 24 garp packets sent on active slave eth1 TEST: num_grat_arp (active-backup miimon num_grat_arp 50) [FAIL] After the fix: TEST: num_grat_arp (active-backup miimon num_grat_arp 10) [ OK ] TEST: num_grat_arp (active-backup miimon num_grat_arp 20) [ OK ] TEST: num_grat_arp (active-backup miimon num_grat_arp 30) [ OK ] TEST: num_grat_arp (active-backup miimon num_grat_arp 50) [ OK ] ==================== Signed-off-by: David S. Miller commit 6cbe791c0f4ed7310db212791e69c7ffedd4f4b6 Author: Hangbin Liu Date: Tue May 9 11:12:00 2023 +0800 kselftest: bonding: add num_grat_arp test TEST: num_grat_arp (active-backup miimon num_grat_arp 10) [ OK ] TEST: num_grat_arp (active-backup miimon num_grat_arp 20) [ OK ] TEST: num_grat_arp (active-backup miimon num_grat_arp 30) [ OK ] TEST: num_grat_arp (active-backup miimon num_grat_arp 50) [ OK ] Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit b6d1599f8c282bfbc4d291af750436d93005b9ea Author: Hangbin Liu Date: Tue May 9 11:11:59 2023 +0800 selftests: forwarding: lib: add netns support for tc rule handle stats get When run the test in netns, it's not easy to get the tc stats via tc_rule_handle_stats_get(). With the new netns parameter, we can get stats from specific netns like num=$(tc_rule_handle_stats_get "dev eth0 ingress" 101 ".packets" "-n ns") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 84df83e0ecd3beba62c3d06b43ab51cc47efaca0 Author: Hangbin Liu Date: Tue May 9 11:11:58 2023 +0800 Documentation: bonding: fix the doc of peer_notif_delay Bonding only supports setting peer_notif_delay with miimon set. Fixes: 0307d589c4d6 ("bonding: add documentation for peer_notif_delay") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 9949e2efb54eb3001cb2f6512ff3166dddbfb75d Author: Hangbin Liu Date: Tue May 9 11:11:57 2023 +0800 bonding: fix send_peer_notif overflow Bonding send_peer_notif was defined as u8. Since commit 07a4ddec3ce9 ("bonding: add an option to specify a delay between peer notifications"). the bond->send_peer_notif will be num_peer_notif multiplied by peer_notif_delay, which is u8 * u32. This would cause the send_peer_notif overflow easily. e.g. ip link add bond0 type bond mode 1 miimon 100 num_grat_arp 30 peer_notify_delay 1000 To fix the overflow, let's set the send_peer_notif to u32 and limit peer_notif_delay to 300s. Reported-by: Liang Li Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2090053 Fixes: 07a4ddec3ce9 ("bonding: add an option to specify a delay between peer notifications") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 7c83e28f10830aa5105c25eaabe890e3adac36aa Author: Daniel Golle Date: Tue May 9 03:20:06 2023 +0200 net: ethernet: mtk_eth_soc: fix NULL pointer dereference Check for NULL pointer to avoid kernel crashing in case of missing WO firmware in case only a single WEDv2 device has been initialized, e.g. on MT7981 which can connect just one wireless frontend. Fixes: 86ce0d09e424 ("net: ethernet: mtk_eth_soc: use WO firmware for MT7981") Signed-off-by: Daniel Golle Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 3acf8f6c14d0e42b889738d63b6d9cb63348fc94 Author: Florian Westphal Date: Tue May 9 16:47:24 2023 +0200 selftests: nft_flowtable.sh: check ingress/egress chain too Make sure flowtable interacts correctly with ingress and egress chains, i.e. those get handled before and after flow table respectively. Adds three more tests: 1. repeat flowtable test, but with 'ip dscp set cs3' done in inet forward chain. Expect that some packets have been mangled (before flowtable offload became effective) while some pass without mangling (after offload succeeds). 2. repeat flowtable test, but with 'ip dscp set cs3' done in veth0:ingress. Expect that all packets pass with cs3 dscp field. 3. same as 2, but use veth1:egress. Expect the same outcome. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 90ab51226d52ad61e5ff175b572e08046b1b0a99 Author: Boris Sukholitko Date: Thu May 4 11:48:14 2023 +0300 selftests: nft_flowtable.sh: monitor result file sizes When running nft_flowtable.sh in VM on a busy server we've found that the time of the netcat file transfers vary wildly. Therefore replace hardcoded 3 second sleep with the loop checking for a change in the file sizes. Once no change in detected we test the results. Nice side effect is that we shave 1 second sleep in the fast case (hard-coded 3 second sleep vs two 1 second sleeps). Acked-by: Florian Westphal Signed-off-by: Boris Sukholitko Signed-off-by: Pablo Neira Ayuso commit 1114803c2da974526ecbc0bd81e6c637bf257de5 Author: Boris Sukholitko Date: Thu May 4 11:48:13 2023 +0300 selftests: nft_flowtable.sh: wait for specific nc pids Doing wait with no parameters may interfere with some of the tests having their own background processes. Although no such test is currently present, the cleanup is useful to rely on the nft_flowtable.sh for local development (e.g. running background tcpdump command during the tests). Signed-off-by: Boris Sukholitko Signed-off-by: Pablo Neira Ayuso commit 0749d670d758099970c52ef70f4bbcfa5a15b3d3 Author: Boris Sukholitko Date: Thu May 4 11:48:12 2023 +0300 selftests: nft_flowtable.sh: no need for ps -x option Some ps commands (e.g. busybox derived) have no -x option. For the purposes of hash calculation of the list of processes this option is inessential. Signed-off-by: Boris Sukholitko Signed-off-by: Pablo Neira Ayuso commit 0a11073e8e3362d715255d28d294aa7350c1c01f Author: Boris Sukholitko Date: Thu May 4 11:48:11 2023 +0300 selftests: nft_flowtable.sh: use /proc for pid checking Some ps commands (e.g. busybox derived) have no -p option. Use /proc for pid existence check. Signed-off-by: Boris Sukholitko Signed-off-by: Pablo Neira Ayuso commit e72eeab542dbf4f544e389e64fa13b82a1b6d003 Author: Florian Westphal Date: Thu May 4 14:55:02 2023 +0200 netfilter: conntrack: fix possible bug_on with enable_hooks=1 I received a bug report (no reproducer so far) where we trip over 712 rcu_read_lock(); 713 ct_hook = rcu_dereference(nf_ct_hook); 714 BUG_ON(ct_hook == NULL); // here In nf_conntrack_destroy(). First turn this BUG_ON into a WARN. I think it was triggered via enable_hooks=1 flag. When this flag is turned on, the conntrack hooks are registered before nf_ct_hook pointer gets assigned. This opens a short window where packets enter the conntrack machinery, can have skb->_nfct set up and a subsequent kfree_skb might occur before nf_ct_hook is set. Call nf_conntrack_init_end() to set nf_ct_hook before we register the pernet ops. Fixes: ba3fbe663635 ("netfilter: nf_conntrack: provide modparam to always register conntrack hooks") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit dc1c9fd4a8bbe1e06add9053010b652449bfe411 Author: Florian Westphal Date: Thu May 4 14:20:21 2023 +0200 netfilter: nf_tables: always release netdev hooks from notifier This reverts "netfilter: nf_tables: skip netdev events generated on netns removal". The problem is that when a veth device is released, the veth release callback will also queue the peer netns device for removal. Its possible that the peer netns is also slated for removal. In this case, the device memory is already released before the pre_exit hook of the peer netns runs: BUG: KASAN: slab-use-after-free in nf_hook_entry_head+0x1b8/0x1d0 Read of size 8 at addr ffff88812c0124f0 by task kworker/u8:1/45 Workqueue: netns cleanup_net Call Trace: nf_hook_entry_head+0x1b8/0x1d0 __nf_unregister_net_hook+0x76/0x510 nft_netdev_unregister_hooks+0xa0/0x220 __nft_release_hook+0x184/0x490 nf_tables_pre_exit_net+0x12f/0x1b0 .. Order is: 1. First netns is released, veth_dellink() queues peer netns device for removal 2. peer netns is queued for removal 3. peer netns device is released, unreg event is triggered 4. unreg event is ignored because netns is going down 5. pre_exit hook calls nft_netdev_unregister_hooks but device memory might be free'd already. Fixes: 68a3765c659f ("netfilter: nf_tables: skip netdev events generated on netns removal") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 8680407b6f8f5fba59e8f1d63c869abc280f04df Author: Benedict Wong Date: Wed May 10 01:14:14 2023 +0000 xfrm: Check if_id in inbound policy/secpath match This change ensures that if configured in the policy, the if_id set in the policy and secpath states match during the inbound policy check. Without this, there is potential for ambiguity where entries in the secpath differing by only the if_id could be mismatched. Notably, this is checked in the outbound direction when resolving templates to SAs, but not on the inbound path when matching SAs and policies. Test: Tested against Android kernel unit tests & CTS Signed-off-by: Benedict Wong Signed-off-by: Steffen Klassert commit cf3128a7aca55b2eefb68281d44749c683bdc96f Author: Tobias Brunner Date: Tue May 9 11:00:06 2023 +0200 af_key: Reject optional tunnel/BEET mode templates in outbound policies xfrm_state_find() uses `encap_family` of the current template with the passed local and remote addresses to find a matching state. If an optional tunnel or BEET mode template is skipped in a mixed-family scenario, there could be a mismatch causing an out-of-bounds read as the addresses were not replaced to match the family of the next template. While there are theoretical use cases for optional templates in outbound policies, the only practical one is to skip IPComp states in inbound policies if uncompressed packets are received that are handled by an implicitly created IPIP state instead. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Tobias Brunner Acked-by: Herbert Xu Signed-off-by: Steffen Klassert commit 3d776e31c841ba2f69895d2255a49320bec7cea6 Author: Tobias Brunner Date: Tue May 9 10:59:58 2023 +0200 xfrm: Reject optional tunnel/BEET mode templates in outbound policies xfrm_state_find() uses `encap_family` of the current template with the passed local and remote addresses to find a matching state. If an optional tunnel or BEET mode template is skipped in a mixed-family scenario, there could be a mismatch causing an out-of-bounds read as the addresses were not replaced to match the family of the next template. While there are theoretical use cases for optional templates in outbound policies, the only practical one is to skip IPComp states in inbound policies if uncompressed packets are received that are handled by an implicitly created IPIP state instead. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Tobias Brunner Acked-by: Herbert Xu Signed-off-by: Steffen Klassert commit 582dbb2cc1a0a7427840f5b1e3c65608e511b061 Author: Florian Fainelli Date: Mon May 8 16:17:49 2023 -0700 net: phy: bcm7xx: Correct read from expansion register Since the driver works in the "legacy" addressing mode, we need to write to the expansion register (0x17) with bits 11:8 set to 0xf to properly select the expansion register passed as argument. Fixes: f68d08c437f9 ("net: phy: bcm7xxx: Add EPHY entry for 72165") Signed-off-by: Florian Fainelli Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230508231749.1681169-1-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski commit dfd9248c071a3710c24365897459538551cb7167 Author: Kuniyuki Iwashima Date: Mon May 8 10:55:43 2023 -0700 net: Fix load-tearing on sk->sk_stamp in sock_recv_cmsgs(). KCSAN found a data race in sock_recv_cmsgs() where the read access to sk->sk_stamp needs READ_ONCE(). BUG: KCSAN: data-race in packet_recvmsg / packet_recvmsg write (marked) to 0xffff88803c81f258 of 8 bytes by task 19171 on cpu 0: sock_write_timestamp include/net/sock.h:2670 [inline] sock_recv_cmsgs include/net/sock.h:2722 [inline] packet_recvmsg+0xb97/0xd00 net/packet/af_packet.c:3489 sock_recvmsg_nosec net/socket.c:1019 [inline] sock_recvmsg+0x11a/0x130 net/socket.c:1040 sock_read_iter+0x176/0x220 net/socket.c:1118 call_read_iter include/linux/fs.h:1845 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x5e0/0x630 fs/read_write.c:470 ksys_read+0x163/0x1a0 fs/read_write.c:613 __do_sys_read fs/read_write.c:623 [inline] __se_sys_read fs/read_write.c:621 [inline] __x64_sys_read+0x41/0x50 fs/read_write.c:621 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x72/0xdc read to 0xffff88803c81f258 of 8 bytes by task 19183 on cpu 1: sock_recv_cmsgs include/net/sock.h:2721 [inline] packet_recvmsg+0xb64/0xd00 net/packet/af_packet.c:3489 sock_recvmsg_nosec net/socket.c:1019 [inline] sock_recvmsg+0x11a/0x130 net/socket.c:1040 sock_read_iter+0x176/0x220 net/socket.c:1118 call_read_iter include/linux/fs.h:1845 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x5e0/0x630 fs/read_write.c:470 ksys_read+0x163/0x1a0 fs/read_write.c:613 __do_sys_read fs/read_write.c:623 [inline] __se_sys_read fs/read_write.c:621 [inline] __x64_sys_read+0x41/0x50 fs/read_write.c:621 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x72/0xdc value changed: 0xffffffffc4653600 -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 19183 Comm: syz-executor.5 Not tainted 6.3.0-rc7-02330-gca6270c12e20 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Fixes: 6c7c98bad488 ("sock: avoid dirtying sk_stamp, if possible") Reported-by: syzbot Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20230508175543.55756-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 8efbdbfa99381a017dd2c0f6375a7d80a8118b74 Author: Marek Vasut Date: Sun May 7 01:58:45 2023 +0200 net: stmmac: Initialize MAC_ONEUS_TIC_COUNTER register Initialize MAC_ONEUS_TIC_COUNTER register with correct value derived from CSR clock, otherwise EEE is unstable on at least NXP i.MX8M Plus and Micrel KSZ9131RNX PHY, to the point where not even ARP request can be sent out. i.MX 8M Plus Applications Processor Reference Manual, Rev. 1, 06/2021 11.7.6.1.34 One-microsecond Reference Timer (MAC_ONEUS_TIC_COUNTER) defines this register as: " This register controls the generation of the Reference time (1 microsecond tic) for all the LPI timers. This timer has to be programmed by the software initially. ... The application must program this counter so that the number of clock cycles of CSR clock is 1us. (Subtract 1 from the value before programming). For example if the CSR clock is 100MHz then this field needs to be programmed to value 100 - 1 = 99 (which is 0x63). This is required to generate the 1US events that are used to update some of the EEE related counters. " The reset value is 0x63 on i.MX8M Plus, which means expected CSR clock are 100 MHz. However, the i.MX8M Plus "enet_qos_root_clk" are 266 MHz instead, which means the LPI timers reach their count much sooner on this platform. This is visible using a scope by monitoring e.g. exit from LPI mode on TX_CTL line from MAC to PHY. This should take 30us per STMMAC_DEFAULT_TWT_LS setting, during which the TX_CTL line transitions from tristate to low, and 30 us later from low to high. On i.MX8M Plus, this transition takes 11 us, which matches the 30us * 100/266 formula for misconfigured MAC_ONEUS_TIC_COUNTER register. Configure MAC_ONEUS_TIC_COUNTER based on CSR clock, so that the LPI timers have correct 1us reference. This then fixes EEE on i.MX8M Plus with Micrel KSZ9131RNX PHY. Fixes: 477286b53f55 ("stmmac: add GMAC4 core support") Signed-off-by: Marek Vasut Tested-by: Harald Seiler Reviewed-by: Francesco Dolcini Tested-by: Francesco Dolcini # Toradex Verdin iMX8MP Reviewed-by: Jesse Brandeburg Link: https://lore.kernel.org/r/20230506235845.246105-1-marex@denx.de Signed-off-by: Jakub Kicinski commit 3b90b09af5be42491a8a74a549318cfa265b3029 Author: Alexandre Ghiti Date: Thu May 4 14:07:59 2023 +0200 riscv: Fix orphan section warnings caused by kernel/pi kernel/pi gives rise to a lot of new sections that end up orphans: the first attempt to fix that tried to enumerate them all in the linker script, but kernel test robot with a random config keeps finding more of them. So prefix all those sections with .init.pi instead of only .init in order to be able to easily catch them all in the linker script. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304301606.Cgp113Ha-lkp@intel.com/ Fixes: 26e7aacb83df ("riscv: Allow to downgrade paging mode from the command line") Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20230504120759.18730-1-alexghiti@rivosinc.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 73a23d7710331a530e972903318528b75e5a5f58 Author: Johannes Berg Date: Tue Apr 25 10:38:37 2023 +0200 um: harddog: fix modular build Since we no longer (want to) export any libc symbols the _user portions of any drivers need to be built into image rather than the module. I missed this for the watchdog. Fix the watchdog accordingly. Reported-by: kernel test robot Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 0cad8f14d70cfeb5173dce93cafeba665a95430e Author: Filipe Manana Date: Tue May 9 12:50:02 2023 +0100 btrfs: fix backref walking not returning all inode refs When using the logical to ino ioctl v2, if the flag to ignore offsets of file extent items (BTRFS_LOGICAL_INO_ARGS_IGNORE_OFFSET) is given, the backref walking code ends up not returning references for all file offsets of an inode that point to the given logical bytenr. This happens since kernel 6.2, commit 6ce6ba534418 ("btrfs: use a single argument for extent offset in backref walking functions") because: 1) It mistakenly skipped the search for file extent items in a leaf that point to the target extent if that flag is given. Instead it should only skip the filtering done by check_extent_in_eb() - that is, it should not avoid the calls to that function (or find_extent_in_eb(), which uses it). 2) It was also not building a list of inode extent elements (struct extent_inode_elem) if we have multiple inode references for an extent when the ignore offset flag is given to the logical to ino ioctl - it would leave a single element, only the last one that was found. These stem from the confusing old interface for backref walking functions where we had an extent item offset argument that was a pointer to a u64 and another boolean argument that indicated if the offset should be ignored, but the pointer could be NULL. That NULL case is used by relocation, qgroup extent accounting and fiemap, simply to avoid building the inode extent list for each reference, as it's not necessary for those use cases and therefore avoids memory allocations and some computations. Fix this by adding a boolean argument to the backref walk context structure to indicate that the inode extent list should not be built, make relocation set that argument to true and fix the backref walking logic to skip the calls to check_extent_in_eb() and find_extent_in_eb() only if this new argument is true, instead of 'ignore_extent_item_pos' being true. A test case for fstests will be added soon, to provide cover not only for these cases but to the logical to ino ioctl in general as well, as currently we do not have a test case for it. Reported-by: Vladimir Panteleev Link: https://lore.kernel.org/linux-btrfs/CAHhfkvwo=nmzrJSqZ2qMfF-rZB-ab6ahHnCD_sq9h4o8v+M7QQ@mail.gmail.com/ Fixes: 6ce6ba534418 ("btrfs: use a single argument for extent offset in backref walking functions") CC: stable@vger.kernel.org # 6.2+ Tested-by: Vladimir Panteleev Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 0004ff15ea26015a0a3a6182dca3b9d1df32e2b7 Author: Filipe Manana Date: Thu May 4 12:04:18 2023 +0100 btrfs: fix space cache inconsistency after error loading it from disk When loading a free space cache from disk, at __load_free_space_cache(), if we fail to insert a bitmap entry, we still increment the number of total bitmaps in the btrfs_free_space_ctl structure, which is incorrect since we failed to add the bitmap entry. On error we then empty the cache by calling __btrfs_remove_free_space_cache(), which will result in getting the total bitmaps counter set to 1. A failure to load a free space cache is not critical, so if a failure happens we just rebuild the cache by scanning the extent tree, which happens at block-group.c:caching_thread(). Yet the failure will result in having the total bitmaps of the btrfs_free_space_ctl always bigger by 1 then the number of bitmap entries we have. So fix this by having the total bitmaps counter be incremented only if we successfully added the bitmap entry. Fixes: a67509c30079 ("Btrfs: add a io_ctl struct and helpers for dealing with the space cache") Reviewed-by: Anand Jain CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit c87f318e6f47696b4040b58f460d5c17ea0280e6 Author: Anastasia Belova Date: Wed Apr 26 14:53:23 2023 +0300 btrfs: print-tree: parent bytenr must be aligned to sector size Check nodesize to sectorsize in alignment check in print_extent_item. The comment states that and this is correct, similar check is done elsewhere in the functions. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: ea57788eb76d ("btrfs: require only sector size alignment for parent eb bytenr") CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Qu Wenruo Signed-off-by: Anastasia Belova Reviewed-by: David Sterba Signed-off-by: David Sterba commit 16a8829130ca22666ac6236178a6233208d425c3 Author: Linus Torvalds Date: Tue May 9 10:22:13 2023 -0700 nfs: fix another case of NULL/IS_ERR confusion wrt folio pointers Dan has been improving on the smatch error pointer checks, and pointed at another case where the __filemap_get_folio() conversion to error pointers had been overlooked. This time because it was hidden behind the filemap_grab_folio() helper function that is a wrapper around it. Reported-by: Dan Carpenter Cc: Anna Schumaker Cc: Matthew Wilcox Cc: Christoph Hellwig Signed-off-by: Linus Torvalds commit 1dc3731daf1f350cfd631b5559aac865ab2fbb4c Merge: ba0ad6ed89fd5 d246331b78cbe Author: Linus Torvalds Date: Tue May 9 09:53:41 2023 -0700 Merge tag 'for-6.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - fix backward leaf iteration which could possibly return the same key - fix assertion when device add and balance race for exclusive operation - fix regression when freeing device, state tree would leak after device replace - fix attempt to clear space cache v1 when block-group-tree is enabled - fix potential i_size corruption when encoded write races with send v2 and enabled no-holes (the race is hard to hit though, the window is a few instructions wide) - fix wrong bitmap API use when checking empty zones, parameters were swapped but not causing a bug due to other code - prevent potential qgroup leak if subvolume create does not commit transaction (which is pending in the development queue) - error handling and reporting: - abort transaction when sibling keys check fails for leaves - print extent buffers when sibling keys check fails * tag 'for-6.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: don't free qgroup space unless specified btrfs: fix encoded write i_size corruption with no-holes btrfs: zoned: fix wrong use of bitops API in btrfs_ensure_empty_zones btrfs: properly reject clear_cache and v1 cache for block-group-tree btrfs: print extent buffers when sibling keys check fails btrfs: abort transaction when sibling keys check fails for leaves btrfs: fix leak of source device allocation state after device replace btrfs: fix assertion of exclop condition when starting balance btrfs: fix btrfs_prev_leaf() to not return the same key twice commit 716a3cf317456fa01d54398bb14ab354f50ed6a2 Author: Steve French Date: Tue May 9 01:37:19 2023 -0500 smb3: fix problem remounting a share after shutdown xfstests generic/392 showed a problem where even after a shutdown call was made on a mount, we would still attempt to use the (now inaccessible) superblock if another mount was attempted for the same share. Reported-by: David Howells Reviewed-by: David Howells Cc: Fixes: 087f757b0129 ("cifs: add shutdown support") Signed-off-by: Steve French commit 2cb6f968775a9fd60c90a6042b9550bcec3ea087 Author: Steve French Date: Tue May 9 01:00:42 2023 -0500 SMB3: force unmount was failing to close deferred close files In investigating a failure with xfstest generic/392 it was noticed that mounts were reusing a superblock that should already have been freed. This turned out to be related to deferred close files keeping a reference count until the closetimeo expired. Currently the only way an fs knows that mount is beginning is when force unmount is called, but when this, ie umount_begin(), is called all deferred close files on the share (tree connection) should be closed immediately (unless shared by another mount) to avoid using excess resources on the server and to avoid reusing a superblock which should already be freed. In umount_begin, close all deferred close handles for that share if this is the last mount using that share on this client (ie send the SMB3 close request over the wire for those that have been already closed by the app but that we have kept a handle lease open for and have not sent closes to the server for yet). Reported-by: David Howells Acked-by: Bharath SM Cc: Fixes: 78c09634f7dc ("Cifs: Fix kernel oops caused by deferred close for files.") Signed-off-by: Steve French commit 293007b033418c8c9d1b35d68dec49a500750fde Author: Jens Axboe Date: Mon May 8 12:13:27 2023 -0600 io_uring: make io_uring_sqe_cmd() unconditionally available If CONFIG_IO_URING isn't set, then io_uring_sqe_cmd() is not defined. As the nvme driver uses this helper, it causes a compilation issue: drivers/nvme/host/ioctl.c: In function 'nvme_uring_cmd_io': drivers/nvme/host/ioctl.c:555:44: error: implicit declaration of function 'io_uring_sqe_cmd'; did you mean 'io_uring_free'? [-Werror=implicit-function-declaration] 555 | const struct nvme_uring_cmd *cmd = io_uring_sqe_cmd(ioucmd->sqe); | ^~~~~~~~~~~~~~~~ | io_uring_free Fix it by just making io_uring_sqe_cmd() generally available - the types are known, and there's no reason to hide it under CONFIG_IO_URING. Fixes: fd9b8547bc5c ("io_uring: Pass whole sqe to commands") Reported-by: kernel test robot Reported-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Jens Axboe commit cc719a9ce7a455bef132e0211437847bcd89b4ef Author: Simon Horman Date: Tue May 9 09:01:50 2023 +0200 parisc: kexec: include reboot.h Include reboot.h in machine_kexec.c for declaration of machine_crash_shutdown and machine_shutdown. gcc-12 with W=1 reports: arch/parisc/kernel/kexec.c:57:6: warning: no previous prototype for 'machine_crash_shutdown' [-Wmissing-prototypes] 57 | void machine_crash_shutdown(struct pt_regs *regs) | ^~~~~~~~~~~~~~~~~~~~~~ arch/parisc/kernel/kexec.c:61:6: warning: no previous prototype for 'machine_shutdown' [-Wmissing-prototypes] 61 | void machine_shutdown(void) | ^~~~~~~~~~~~~~~~ No functional changes intended. Compile tested only. Signed-off-by: Simon Horman Acked-by: Baoquan He Signed-off-by: Helge Deller commit 81dce1490e28439c3cd8a8650b862a712f3061ba Author: Haibo Chen Date: Thu May 4 19:22:22 2023 +0800 mmc: sdhci-esdhc-imx: make "no-mmc-hs400" works After commit 1ed5c3b22fc7 ("mmc: sdhci-esdhc-imx: Propagate ESDHC_FLAG_HS400* only on 8bit bus"), the property "no-mmc-hs400" from device tree file do not work any more. This patch reorder the code, which can avoid the warning message "drop HS400 support since no 8-bit bus" and also make the property "no-mmc-hs400" from dts file works. Fixes: 1ed5c3b22fc7 ("mmc: sdhci-esdhc-imx: Propagate ESDHC_FLAG_HS400* only on 8bit bus") Signed-off-by: Haibo Chen Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230504112222.3599602-1-haibo.chen@nxp.com Signed-off-by: Ulf Hansson commit 3d43f9f639542fadfb28f40b509bf147a6624d48 Author: Liming Sun Date: Wed Apr 26 10:23:44 2023 -0400 platform/mellanox: fix potential race in mlxbf-tmfifo driver This commit adds memory barrier for the 'vq' update in function mlxbf_tmfifo_virtio_find_vqs() to avoid potential race due to out-of-order memory write. It also adds barrier for the 'is_ready' flag to make sure the initializations are visible before this flag is checked. Signed-off-by: Liming Sun Reviewed-by: Vadim Pasternak Link: https://lore.kernel.org/r/b98c0ab61d644ba38fa9b3fd1607b138b0dd820b.1682518748.git.limings@nvidia.com Signed-off-by: Hans de Goede commit e5bce3c15ad20d7dd4f8393513b1c41373d2dc37 Author: Christophe JAILLET Date: Tue Apr 25 15:41:26 2023 +0200 mmc: sdhci-cadence: Fix an error handling path in sdhci_cdns_probe() If devm_reset_control_get_optional_exclusive() fails, some resources still need to be released. So branch to the error handling path instead of returning directly. Fixes: aad53d4ee756 ("mmc: sdhci-cadence: Support mmc hardware reset") Signed-off-by: Christophe JAILLET Acked-by: Adrian Hunter Acked-by: Brad Larson Link: https://lore.kernel.org/r/f61599a9ef23767c2d66e5af9c975f05ef1cec6b.1682430069.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson commit 003fb0a51162d940f25fc35e70b0996a12c9e08a Author: Christian Loehle Date: Wed Apr 26 16:59:39 2023 +0000 mmc: block: ensure error propagation for non-blk Requests to the mmc layer usually come through a block device IO. The exceptions are the ioctl interface, RPMB chardev ioctl and debugfs, which issue their own blk_mq requests through blk_execute_rq and do not query the BLK_STS error but the mmcblk-internal drv_op_result. This patch ensures that drv_op_result defaults to an error and has to be overwritten by the operation to be considered successful. The behavior leads to a bug where the request never propagates the error, e.g. by directly erroring out at mmc_blk_mq_issue_rq if mmc_blk_part_switch fails. The ioctl caller of the rpmb chardev then can never see an error (BLK_STS_IOERR, but drv_op_result is unchanged) and thus may assume that their call executed successfully when it did not. While always checking the blk_execute_rq return value would be advised, let's eliminate the error by always setting drv_op_result as -EIO to be overwritten on success (or other error) Fixes: 614f0388f580 ("mmc: block: move single ioctl() commands to block requests") Signed-off-by: Christian Loehle Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/59c17ada35664b818b7bd83752119b2d@hyperstone.com Signed-off-by: Ulf Hansson commit 162bd18eb55adf464a0fa2b4144b8d61c75ff7c2 Author: Roy Novich Date: Sun May 7 16:57:43 2023 +0300 linux/dim: Do nothing if no time delta between samples Add return value for dim_calc_stats. This is an indication for the caller if curr_stats was assigned by the function. Avoid using curr_stats uninitialized over {rdma/net}_dim, when no time delta between samples. Coverity reported this potential use of an uninitialized variable. Fixes: 4c4dbb4a7363 ("net/mlx5e: Move dynamic interrupt coalescing code to include/linux") Fixes: cb3c7fd4f839 ("net/mlx5e: Support adaptive RX coalescing") Signed-off-by: Roy Novich Reviewed-by: Aya Levin Reviewed-by: Saeed Mahameed Signed-off-by: Tariq Toukan Reviewed-by: Leon Romanovsky Reviewed-by: Michal Kubiak Link: https://lore.kernel.org/r/20230507135743.138993-1-tariqt@nvidia.com Signed-off-by: Paolo Abeni commit 4b65f95c87c35699bc6ad540d6b9dd7f950d0924 Author: Andrey Avdeev Date: Sun Apr 30 11:01:10 2023 +0300 platform/x86: touchscreen_dmi: Add info for the Dexp Ursus KX210i Add touchscreen info for the Dexp Ursus KX210i Signed-off-by: Andrey Avdeev Link: https://lore.kernel.org/r/ZE4gRgzRQCjXFYD0@avdeevavpc Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 6abfa99ce52f61a31bcfc2aaaae09006f5665495 Author: Hans de Goede Date: Fri May 5 23:03:23 2023 +0200 platform/x86: touchscreen_dmi: Add upside-down quirk for GDIX1002 ts on the Juno Tablet The Juno Computers Juno Tablet has an upside-down mounted Goodix touchscreen. Add a quirk to invert both axis to correct for this. Link: https://junocomputers.com/us/product/juno-tablet/ Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230505210323.43177-1-hdegoede@redhat.com commit 1684878952929e20a864af5df7b498941c750f45 Author: Mark Pearson Date: Fri May 5 09:25:23 2023 -0400 platform/x86: thinkpad_acpi: Add profile force ability There has been a lot of confusion around which platform profiles are supported on various platforms and it would be useful to have a debug method to be able to override the profile mode that is selected. I don't expect this to be used in anything other than debugging in conjunction with Lenovo engineers - but it does give a way to get a system working whilst we wait for either FW fixes, or a driver fix to land upstream, if something is wonky in the mode detection logic Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20230505132523.214338-2-mpearson-lenovo@squebb.ca Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 0c0cd3e25a5b64b541dd83ba6e032475a9d77432 Author: Mark Pearson Date: Fri May 5 09:25:22 2023 -0400 platform/x86: thinkpad_acpi: Fix platform profiles on T490 I had incorrectly thought that PSC profiles were not usable on Intel platforms so had blocked them in the driver initialistion. This broke platform profiles on the T490. After discussion with the FW team PSC does work on Intel platforms and should be allowed. Note - it's possible this may impact other platforms where it is advertised but special driver support that only Windows has is needed. But if it does then they will need fixing via quirks. Please report any issues to me so I can get them addressed - but I haven't found any problems in testing...yet Fixes: bce6243f767f ("platform/x86: thinkpad_acpi: do not use PSC mode on Intel platforms") Link: https://bugzilla.redhat.com/show_bug.cgi?id=2177962 Cc: stable@vger.kernel.org Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20230505132523.214338-1-mpearson-lenovo@squebb.ca Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit decab2825c3ef9b154c6f76bce40872ffb41c36f Author: Fae Date: Tue Apr 25 01:36:44 2023 -0500 platform/x86: hp-wmi: add micmute to hp_wmi_keymap struct Fixes micmute key of HP Envy X360 ey0xxx. Signed-off-by: Fae Link: https://lore.kernel.org/r/20230425063644.11828-1-faenkhauser@gmail.com Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 75e406b540c3eca67625d97bbefd4e3787eafbfe Author: Srinivas Pandruvada Date: Tue Apr 18 08:32:30 2023 -0700 platform/x86/intel-uncore-freq: Return error on write frequency Currently when the uncore_write() returns error, it is silently ignored. Return error to user space when uncore_write() fails. Fixes: 49a474c7ba51 ("platform/x86: Add support for Uncore frequency control") Signed-off-by: Srinivas Pandruvada Reviewed-by: Zhang Rui Tested-by: Wendy Wang Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230418153230.679094-1-srinivas.pandruvada@linux.intel.com Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede commit 44c524b642996148a8e94f1a1b8751076edcf577 Author: Huacai Chen Date: Tue May 9 10:44:48 2023 +0800 power: supply: Fix power_supply_get_battery_info() if parent is NULL After commit 27a2195efa8d26447c ("power: supply: core: auto-exposure of simple-battery data") we call power_supply_get_battery_info() in __power_supply_register(), but it causes test_battery crash with NULL pointer: [ 7.524846] __power_supply_register: Expected proper parent device for 'test_battery' [ 7.524856] CPU 3 Unable to handle kernel paging request at virtual address 0000000000000278, era == 9000000002fb279c, ra == 9000000003173434 [ 7.524862] Oops[#1]: [ 7.524866] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 6.3.0+ #524 [ 7.524870] Hardware name: Loongson Loongson-3A5000-7A1000-1w-CRB/Loongson-LS3A5000-7A1000-1w-CRB, BIOS vUDK2018-LoongArch-V2.0.0-prebeta9 10/21/2022 [ 7.524872] pc 9000000002fb279c ra 9000000003173434 tp 90000001001f0000 sp 90000001001f3c00 [ 7.524875] a0 0000000000000000 a1 0000000000000000 a2 0000000000000000 a3 9000000004553e13 [ 7.524878] a4 9000000004553e16 a5 ffffffffffffffff a6 9000000003fd0948 a7 0000000000000030 [ 7.524881] t0 9000000003173434 t1 90000000035e2c00 t2 0000000000000001 t3 00000000fffff2b0 [ 7.524883] t4 0000000000000007 t5 fffffffffffffffe t6 0000000000000000 t7 0000000000000010 [ 7.524886] t8 00000000000000b4 u0 00000001c0840c76 s9 0000000000000000 s0 0000000000000000 [ 7.524889] s1 900000000370c458 s2 0000000000000001 s3 9000000101f81000 s4 9000000101f81038 [ 7.524891] s5 9000000101f813a0 s6 900000000370c398 s7 9000000003eebd18 s8 90000000037c0070 [ 7.524894] ra: 9000000003173434 power_supply_get_battery_info+0xe4/0x710 [ 7.591224] ERA: 9000000002fb279c __dev_fwnode+0x8/0x20 [ 7.853583] CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE) [ 7.859740] PRMD: 00000004 (PPLV0 +PIE -PWE) [ 7.864073] EUEN: 00000000 (-FPE -SXE -ASXE -BTE) [ 7.868839] ECFG: 00071c1c (LIE=2-4,10-12 VS=7) [ 7.873430] ESTAT: 00010000 [PIL] (IS= ECode=1 EsubCode=0) [ 7.878884] BADV: 0000000000000278 [ 7.882346] PRID: 0014c010 (Loongson-64bit, Loongson-3A5000) [ 7.888056] Modules linked in: [ 7.891088] Process swapper/0 (pid: 1, threadinfo=0000000091357ee8, task=00000000313d98cb) [ 7.899307] Stack : 00000000000000b4 900000000279aca8 0000000000000001 0000000000000000 [ 7.907274] 0000000000000049 0000000000000408 9000000100008c00 90000000035b6370 [ 7.915238] 900000000b801080 90000000029a440c 9000000003eb4680 9000000003eb4680 [ 7.923202] 9000000101f81038 900000000357cdcc 0000000000000001 900000000370c458 [ 7.931166] 9000000101f81000 90000000037c0070 9000000003eebd18 900000000370c398 [ 7.939131] 90000000045f4530 9000000101f81038 0000000000000000 0000000000000001 [ 7.947095] 900000000370c458 9000000101f81000 0000000000000000 9000000003173e64 [ 7.955059] 0000000000000026 9000000003de3880 9000000100562040 900000000357e07c [ 7.963023] 000000000000026f 0000000000000001 90000001001f3d68 fffffffffffffff5 [ 7.970987] 90000000036d2ca8 90000000027429d8 90000000037c0030 0000000000000001 [ 7.978951] ... [ 7.981379] Call Trace: [ 7.981382] [<9000000002fb279c>] __dev_fwnode+0x8/0x20 [ 7.988916] [<9000000003173434>] power_supply_get_battery_info+0xe4/0x710 [ 7.995666] [<9000000003173e64>] __power_supply_register+0x404/0x580 [ 8.001984] [<900000000379d368>] test_power_init+0x6c/0x124 [ 8.007527] [<90000000026e08f8>] do_one_initcall+0x58/0x1ec [ 8.013066] [<9000000003761614>] kernel_init_freeable+0x290/0x310 [ 8.019127] [<90000000035b40e8>] kernel_init+0x24/0x11c [ 8.024324] [<90000000026e2048>] ret_from_kernel_thread+0xc/0xa4 [ 8.030295] [ 8.031769] Code: 4c000020 0015002c 03400000 <28c9e08c> 40000d80 02c06184 4c000020 28ca0084 4c000020 Root cause: psy->dev.parent is NULL in power_supply_get_battery_info(), so change the else branch to be 'else if (psy->dev.parent)' and return -ENOENT if psy->dev.parent is NULL. Fixes: 27a2195efa8d26447c ("power: supply: core: auto-exposure of simple-battery data") Signed-off-by: Huacai Chen Signed-off-by: Sebastian Reichel commit c4af8e3fecd03b0aedcd38145955605cfebe7e3a Author: Mario Limonciello Date: Mon Apr 24 14:55:54 2023 -0500 thunderbolt: Clear registers properly when auto clear isn't in use When `QUIRK_AUTO_CLEAR_INT` isn't set, interrupt masking should be cleared by writing to Interrupt Mask Clear (IMR) and interrupt status should be cleared properly at shutdown/init. This fixes an error where interrupts are left enabled during resume from hibernation with `CONFIG_USB4=y`. Fixes: 468c49f44759 ("thunderbolt: Disable interrupt auto clear for rings") Cc: stable@vger.kernel.org # v6.3 Reported-by: Takashi Iwai Link: https://bugzilla.kernel.org/show_bug.cgi?id=217343 Signed-off-by: Mario Limonciello Signed-off-by: Mika Westerberg commit 8bbec86ce6d66fb33530c679f7bb3a123fc9e7da Author: Krzysztof Kozlowski Date: Mon May 8 09:18:37 2023 +0200 dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning assigned-clocks are a dependency of clocks, however the dtschema has limitation and expects clocks to be present in the binding using assigned-clocks, not in other referenced bindings. The clocks were defined in common fsl,imx6q-pcie-common.yaml, which is referenced by fsl,imx6q-pcie-ep.yaml. The fsl,imx6q-pcie-ep.yaml used assigned-clocks thus leading to warnings: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000: Unevaluated properties are not allowed ('assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' were unexpected) From schema: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml Fix this by moving clocks to each specific schema from the common one and narrowing them to strictly match what is expected for given device. Fixes: b10f82380eeb ("dt-bindings: imx6q-pcie: Restruct i.MX PCIe schema") Acked-by: Conor Dooley Reviewed-by: Richard Zhu Link: https://lore.kernel.org/r/20230508071837.68552-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit ba8c2b75b02a162202d31e6200ab15da1035a7d0 Author: Steve French Date: Mon May 8 00:45:45 2023 -0500 smb3: improve parallel reads of large files rasize (ra_pages) should be set higher than read size by default to allow parallel reads when reading large files in order to improve performance (otherwise there is much dead time on the network when doing readahead of large files). Default rasize to twice readsize. Signed-off-by: Steve French commit 051d71e073614a72ad423d6dacba37a7eeff274d Author: V sujith kumar Reddy Date: Mon May 8 12:35:08 2023 +0530 ASoC: SOF: amd: Fix NULL pointer crash in acp_sof_ipc_msg_data function Check substream and runtime variables before assigning. Signed-off-by: V sujith kumar Reddy Date: Sat May 6 18:40:57 2023 +0200 tick/broadcast: Make broadcast device replacement work correctly When a tick broadcast clockevent device is initialized for one shot mode then tick_broadcast_setup_oneshot() OR's the periodic broadcast mode cpumask into the oneshot broadcast cpumask. This is required when switching from periodic broadcast mode to oneshot broadcast mode to ensure that CPUs which are waiting for periodic broadcast are woken up on the next tick. But it is subtly broken, when an active broadcast device is replaced and the system is already in oneshot (NOHZ/HIGHRES) mode. Victor observed this and debugged the issue. Then the OR of the periodic broadcast CPU mask is wrong as the periodic cpumask bits are sticky after tick_broadcast_enable() set it for a CPU unless explicitly cleared via tick_broadcast_disable(). That means that this sets all other CPUs which have tick broadcasting enabled at that point unconditionally in the oneshot broadcast mask. If the affected CPUs were already idle and had their bits set in the oneshot broadcast mask then this does no harm. But for non idle CPUs which were not set this corrupts their state. On their next invocation of tick_broadcast_enable() they observe the bit set, which indicates that the broadcast for the CPU is already set up. As a consequence they fail to update the broadcast event even if their earliest expiring timer is before the actually programmed broadcast event. If the programmed broadcast event is far in the future, then this can cause stalls or trigger the hung task detector. Avoid this by telling tick_broadcast_setup_oneshot() explicitly whether this is the initial switch over from periodic to oneshot broadcast which must take the periodic broadcast mask into account. In the case of initialization of a replacement device this prevents that the broadcast oneshot mask is modified. There is a second problem with broadcast device replacement in this function. The broadcast device is only armed when the previous state of the device was periodic. That is correct for the switch from periodic broadcast mode to oneshot broadcast mode as the underlying broadcast device could operate in oneshot state already due to lack of periodic state in hardware. In that case it is already armed to expire at the next tick. For the replacement case this is wrong as the device is in shutdown state. That means that any already pending broadcast event will not be armed. This went unnoticed because any CPU which goes idle will observe that the broadcast device has an expiry time of KTIME_MAX and therefore any CPUs next timer event will be earlier and cause a reprogramming of the broadcast device. But that does not guarantee that the events of the CPUs which were already in idle are delivered on time. Fix this by arming the newly installed device for an immediate event which will reevaluate the per CPU expiry times and reprogram the broadcast device accordingly. This is simpler than caching the last expiry time in yet another place or saving it before the device exchange and handing it down to the setup function. Replacement of broadcast devices is not a frequent operation and usually happens once somewhere late in the boot process. Fixes: 9c336c9935cf ("tick/broadcast: Allow late registered device to enter oneshot mode") Reported-by: Victor Hassan Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/87pm7d2z1i.ffs@tglx commit 111a833dc5cbef3d05b2a796a7e23cb7f6ff2192 Author: Sudeep Holla Date: Wed May 3 14:12:52 2023 +0100 firmware: arm_ffa: Set reserved/MBZ fields to zero in the memory descriptors The transmit buffers allocated by the driver can be used to transmit data by any messages/commands needing the buffer. However, it is not guaranteed to have been zero-ed before every new transmission and hence it will just contain residual value from the previous transmission. There are several reserved fields in the memory descriptors that must be zero(MBZ). The receiver can reject the transmission if any such MBZ fields are non-zero. While we can set the whole page to zero, it is not optimal as most of the fields get initialised to the value required for the current transmission. So, just set the reserved/MBZ fields to zero in the memory descriptors explicitly to honour the requirement and keep the receiver happy. Fixes: cc2195fe536c ("firmware: arm_ffa: Add support for MEM_* interfaces") Reported-by: Marc Bonnici Link: https://lore.kernel.org/r/20230503131252.12585-1-sudeep.holla@arm.com Signed-off-by: Sudeep Holla commit 19b8766459c41c6f318f8a548cc1c66dffd18363 Author: Sudeep Holla Date: Thu Apr 20 16:06:03 2023 +0100 firmware: arm_ffa: Fix FFA device names for logical partitions Each physical partition can provide multiple services each with UUID. Each such service can be presented as logical partition with a unique combination of VM ID and UUID. The number of distinct UUID in a system will be less than or equal to the number of logical partitions. However, currently it fails to register more than one logical partition or service within a physical partition as the device name contains only VM ID while both VM ID and UUID are maintained in the partition information. The kernel complains with the below message: | sysfs: cannot create duplicate filename '/devices/arm-ffa-8001' | CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.3.0-rc7 #8 | Hardware name: FVP Base RevC (DT) | Call trace: | dump_backtrace+0xf8/0x118 | show_stack+0x18/0x24 | dump_stack_lvl+0x50/0x68 | dump_stack+0x18/0x24 | sysfs_create_dir_ns+0xe0/0x13c | kobject_add_internal+0x220/0x3d4 | kobject_add+0x94/0x100 | device_add+0x144/0x5d8 | device_register+0x20/0x30 | ffa_device_register+0x88/0xd8 | ffa_setup_partitions+0x108/0x1b8 | ffa_init+0x2ec/0x3a4 | do_one_initcall+0xcc/0x240 | do_initcall_level+0x8c/0xac | do_initcalls+0x54/0x94 | do_basic_setup+0x1c/0x28 | kernel_init_freeable+0x100/0x16c | kernel_init+0x20/0x1a0 | ret_from_fork+0x10/0x20 | kobject_add_internal failed for arm-ffa-8001 with -EEXIST, don't try to | register things with the same name in the same directory. | arm_ffa arm-ffa: unable to register device arm-ffa-8001 err=-17 | ARM FF-A: ffa_setup_partitions: failed to register partition ID 0x8001 By virtue of being random enough to avoid collisions when generated in a distributed system, there is no way to compress UUID keys to the number of bits required to identify each. We can eliminate '-' in the name but it is not worth eliminating 4 bytes and add unnecessary logic for doing that. Also v1.0 doesn't provide the UUID of the partitions which makes it hard to use the same for the device name. So to keep it simple, let us alloc an ID using ida_alloc() and append the same to "arm-ffa" to make up a unique device name. Also stash the id value in ffa_dev to help freeing the ID later when the device is destroyed. Fixes: e781858488b9 ("firmware: arm_ffa: Add initial FFA bus support for device enumeration") Reported-by: Lucian Paul-Trifu Link: https://lore.kernel.org/r/20230419-ffa_fixes_6-4-v2-3-d9108e43a176@arm.com Signed-off-by: Sudeep Holla commit c6e045361a27ecd4fac6413164e0d091d80eee99 Author: Sudeep Holla Date: Thu Apr 20 16:06:02 2023 +0100 firmware: arm_ffa: Fix usage of partition info get count flag Commit bb1be7498500 ("firmware: arm_ffa: Add v1.1 get_partition_info support") adds support to discovery the UUIDs of the partitions or just fetch the partition count using the PARTITION_INFO_GET_RETURN_COUNT_ONLY flag. However the commit doesn't handle the fact that the older version doesn't understand the flag and must be MBZ which results in firmware returning invalid parameter error. That results in the failure of the driver probe which is in correct. Limit the usage of the PARTITION_INFO_GET_RETURN_COUNT_ONLY flag for the versions above v1.0(i.e v1.1 and onwards) which fixes the issue. Fixes: bb1be7498500 ("firmware: arm_ffa: Add v1.1 get_partition_info support") Reported-by: Jens Wiklander Reported-by: Marc Bonnici Tested-by: Jens Wiklander Reviewed-by: Jens Wiklander Link: https://lore.kernel.org/r/20230419-ffa_fixes_6-4-v2-2-d9108e43a176@arm.com Signed-off-by: Sudeep Holla commit b71b55248a580e9c9befc4ae060539f1f8e477da Author: Sudeep Holla Date: Thu Apr 20 16:06:01 2023 +0100 firmware: arm_ffa: Check if ffa_driver remove is present before executing Currently ffa_drv->remove() is called unconditionally from ffa_device_remove(). Since the driver registration doesn't check for it and allows it to be registered without .remove callback, we need to check for the presence of it before executing it from ffa_device_remove() to above a NULL pointer dereference like the one below: | 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=0000000881cc8000 | [0000000000000000] pgd=0000000000000000, p4d=0000000000000000 | Internal error: Oops: 0000000086000004 [#1] PREEMPT SMP | CPU: 3 PID: 130 Comm: rmmod Not tainted 6.3.0-rc7 #6 | Hardware name: FVP Base RevC (DT) | pstate: 63402809 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=-c) | pc : 0x0 | lr : ffa_device_remove+0x20/0x2c | Call trace: | 0x0 | device_release_driver_internal+0x16c/0x260 | driver_detach+0x90/0xd0 | bus_remove_driver+0xdc/0x11c | driver_unregister+0x30/0x54 | ffa_driver_unregister+0x14/0x20 | cleanup_module+0x18/0xeec | __arm64_sys_delete_module+0x234/0x378 | invoke_syscall+0x40/0x108 | el0_svc_common+0xb4/0xf0 | do_el0_svc+0x30/0xa4 | el0_svc+0x2c/0x7c | el0t_64_sync_handler+0x84/0xf0 | el0t_64_sync+0x190/0x194 Fixes: 244f5d597e1e ("firmware: arm_ffa: Add missing remove callback to ffa_bus_type") Link: https://lore.kernel.org/r/20230419-ffa_fixes_6-4-v2-1-d9108e43a176@arm.com Signed-off-by: Sudeep Holla commit 55b37d9c8ba23d28c584aef0801fb1e60e4a817c Author: Krzysztof Kozlowski Date: Sat Apr 22 00:32:12 2023 +0200 arm64: dts: arm: add missing cache properties As all level 2 and level 3 caches are unified, add required cache-unified properties to fix warnings like: foundation-v8.dtb: l2-cache0: 'cache-unified' is a required property Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230421223213.115639-1-krzysztof.kozlowski@linaro.org Signed-off-by: Sudeep Holla commit 328acc5657c6197753238d7ce0a6924ead829347 Author: Krzysztof Kozlowski Date: Sun Apr 23 17:08:37 2023 +0200 ARM: dts: vexpress: add missing cache properties As all level 2 and level 3 caches are unified, add required cache-unified property to fix warnings like: vexpress-v2p-ca5s.dtb: cache-controller@2c0f0000: 'cache-unified' is a required property Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230423150837.118466-1-krzysztof.kozlowski@linaro.org Signed-off-by: Sudeep Holla commit 44e8d5ad2dc01529eb1316b1521f24ac4aac8eaf Author: Tejun Heo Date: Thu Apr 20 09:33:49 2023 -1000 firmware: arm_scmi: Fix incorrect alloc_workqueue() invocation scmi_xfer_raw_worker_init() is specifying a flag, WQ_SYSFS, as @max_active. Fix it by or'ing WQ_SYSFS into @flags so that it actually enables sysfs interface and using 0 for @max_active for the default setting. Signed-off-by: Tejun Heo Fixes: 3c3d818a9317 ("firmware: arm_scmi: Add core raw transmission support") Link: https://lore.kernel.org/r/ZEGTnajiQm7mkkZS@slm.duckdns.org Signed-off-by: Sudeep Holla commit ec97e112985c2581ee61854a4b74f080f6cdfc2c Author: Dexuan Cui Date: Thu May 4 15:41:55 2023 -0700 Drivers: hv: vmbus: Call hv_synic_free() if hv_synic_alloc() fails Commit 572086325ce9 ("Drivers: hv: vmbus: Cleanup synic memory free path") says "Any memory allocations that succeeded will be freed when the caller cleans up by calling hv_synic_free()", but if the get_zeroed_page() in hv_synic_alloc() fails, currently hv_synic_free() is not really called in vmbus_bus_init(), consequently there will be a memory leak, e.g. hv_context.hv_numa_map is not freed in the error path. Fix this by updating the goto labels. Cc: stable@kernel.org Signed-off-by: Dexuan Cui Fixes: 4df4cb9e99f8 ("x86/hyperv: Initialize clockevents earlier in CPU onlining") Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20230504224155.10484-1-decui@microsoft.com Signed-off-by: Wei Liu commit dbcf76390eb9a65d5d0c37b0cd57335218564e37 Author: Mark Brown Date: Mon May 8 22:15:42 2023 +0900 selftests/ftrace: Improve integration with kselftest runner The ftrace selftests do not currently produce KTAP output, they produce a custom format much nicer for human consumption. This means that when run in automated test systems we just get a single result for the suite as a whole rather than recording results for individual test cases, making it harder to look at the test data and masking things like inappropriate skips. Address this by adding support for KTAP output to the ftracetest script and providing a trivial wrapper which will be invoked by the kselftest runner to generate output in this format by default, users using ftracetest directly will continue to get the existing output. This is not the most elegant solution but it is simple and effective. I did consider implementing this by post processing the existing output format but that felt more complex and likely to result in all output being lost if something goes seriously wrong during the run which would not be helpful. I did also consider just writing a separate runner script but there's enough going on with things like the signal handling for that to seem like it would be duplicating too much. Acked-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) Tested-by: Masami Hiramatsu (Google) Signed-off-by: Mark Brown Signed-off-by: Shuah Khan commit 4b79f76920a49fc13766b95df1df1f4d700acbad Author: Yi Lai Date: Fri Apr 21 11:31:23 2023 +0800 selftests/sgx: Add "test_encl.elf" to TEST_FILES The "test_encl.elf" file used by test_sgx is not installed in INSTALL_PATH. Attempting to execute test_sgx causes false negative: " enclave executable open(): No such file or directory main.c:188:unclobbered_vdso:Failed to load the test enclave. " Add "test_encl.elf" to TEST_FILES so that it will be installed. Fixes: 2adcba79e69d ("selftests/x86: Add a selftest for SGX") Signed-off-by: Yi Lai Reviewed-by: Jarkko Sakkinen Signed-off-by: Shuah Khan commit cbd4cbabef646f1719a73a01cc491b1c1fea4d41 Author: Steve French Date: Sun May 7 17:57:17 2023 -0500 do not reuse connection if share marked as isolated "SHAREFLAG_ISOLATED_TRANSPORT" indicates that we should not reuse the socket for this share (for future mounts). Mark the socket as server->nosharesock if share flags returned include SHAREFLAG_ISOLATED_TRANSPORT. See MS-SMB2 MS-SMB2 2.2.10 and 3.2.5.5 Signed-off-by: Steve French commit d66cde50c3c868af7abddafce701bb86e4a93039 Author: Pawel Witek Date: Fri May 5 17:14:59 2023 +0200 cifs: fix pcchunk length type in smb2_copychunk_range Change type of pcchunk->Length from u32 to u64 to match smb2_copychunk_range arguments type. Fixes the problem where performing server-side copy with CIFS_IOC_COPYCHUNK_FILE ioctl resulted in incomplete copy of large files while returning -EINVAL. Fixes: 9bf0c9cd4314 ("CIFS: Fix SMB2/SMB3 Copy offload support (refcopy) for large files") Cc: Signed-off-by: Pawel Witek Signed-off-by: Steve French commit c2adb1877b76fc81ae041e1db1a6ed2078c6746b Author: Wyes Karny Date: Thu May 4 06:25:44 2023 +0000 cpupower: Make TSC read per CPU for Mperf monitor System-wide TSC read could cause a drift in C0 percentage calculation. Because if first TSC is read and then one by one mperf is read for all cpus, this introduces drift between mperf reading of later CPUs and TSC reading. To lower this drift read TSC per CPU and also just after mperf read. This technique improves C0 percentage calculation in Mperf monitor. Before fix: (System 100% busy) | Mperf || RAPL || Idle_Stats PKG|CORE| CPU| C0 | Cx | Freq || pack | core || POLL | C1 | C2 0| 0| 0| 87.15| 12.85| 2695||168659003|3970468|| 0.00| 0.00| 0.00 0| 0| 256| 84.62| 15.38| 2695||168659003|3970468|| 0.00| 0.00| 0.00 0| 1| 1| 87.15| 12.85| 2695||168659003|3970468|| 0.00| 0.00| 0.00 0| 1| 257| 84.08| 15.92| 2695||168659003|3970468|| 0.00| 0.00| 0.00 0| 2| 2| 86.61| 13.39| 2695||168659003|3970468|| 0.00| 0.00| 0.00 0| 2| 258| 83.26| 16.74| 2695||168659003|3970468|| 0.00| 0.00| 0.00 0| 3| 3| 86.61| 13.39| 2695||168659003|3970468|| 0.00| 0.00| 0.00 0| 3| 259| 83.60| 16.40| 2695||168659003|3970468|| 0.00| 0.00| 0.00 0| 4| 4| 86.33| 13.67| 2695||168659003|3970468|| 0.00| 0.00| 0.00 0| 4| 260| 83.33| 16.67| 2695||168659003|3970468|| 0.00| 0.00| 0.00 0| 5| 5| 86.06| 13.94| 2695||168659003|3970468|| 0.00| 0.00| 0.00 0| 5| 261| 83.05| 16.95| 2695||168659003|3970468|| 0.00| 0.00| 0.00 0| 6| 6| 85.51| 14.49| 2695||168659003|3970468|| 0.00| 0.00| 0.00 After fix: (System 100% busy) | Mperf || RAPL || Idle_Stats PKG|CORE| CPU| C0 | Cx | Freq || pack | core || POLL | C1 | C2 0| 0| 0| 98.03| 1.97| 2415||163295480|3811189|| 0.00| 0.00| 0.00 0| 0| 256| 98.50| 1.50| 2394||163295480|3811189|| 0.00| 0.00| 0.00 0| 1| 1| 99.99| 0.01| 2401||163295480|3811189|| 0.00| 0.00| 0.00 0| 1| 257| 99.99| 0.01| 2375||163295480|3811189|| 0.00| 0.00| 0.00 0| 2| 2| 99.99| 0.01| 2401||163295480|3811189|| 0.00| 0.00| 0.00 0| 2| 258|100.00| 0.00| 2401||163295480|3811189|| 0.00| 0.00| 0.00 0| 3| 3|100.00| 0.00| 2401||163295480|3811189|| 0.00| 0.00| 0.00 0| 3| 259| 99.99| 0.01| 2435||163295480|3811189|| 0.00| 0.00| 0.00 0| 4| 4|100.00| 0.00| 2401||163295480|3811189|| 0.00| 0.00| 0.00 0| 4| 260|100.00| 0.00| 2435||163295480|3811189|| 0.00| 0.00| 0.00 0| 5| 5| 99.99| 0.01| 2401||163295480|3811189|| 0.00| 0.00| 0.00 0| 5| 261|100.00| 0.00| 2435||163295480|3811189|| 0.00| 0.00| 0.00 0| 6| 6|100.00| 0.00| 2401||163295480|3811189|| 0.00| 0.00| 0.00 0| 6| 262|100.00| 0.00| 2435||163295480|3811189|| 0.00| 0.00| 0.00 Cc: Thomas Renninger Cc: Shuah Khan Cc: Dominik Brodowski Fixes: 7fe2f6399a84 ("cpupowerutils - cpufrequtils extended with quite some features") Signed-off-by: Wyes Karny Signed-off-by: Shuah Khan commit cb6aeeb69af06b09e687fbef4da36a81c36b4994 Author: Saurabh Sengar Date: Mon Apr 24 03:10:16 2023 -0700 x86/hyperv/vtl: Add noop for realmode pointers Assign the realmode pointers to noop, instead of NULL to fix kernel panic. Signed-off-by: Saurabh Sengar Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1682331016-22561-1-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu commit ba0ad6ed89fd5dada3b7b65ef2b08e95d449d4ab Author: Arnd Bergmann Date: Tue Apr 18 08:11:43 2023 +0200 media: nxp: imx8-isi: fix buiding on 32-bit The #if check is wrong, leading to a build failure: drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c: In function 'mxc_isi_channel_set_inbuf': drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c:33:5: error: "CONFIG_ARCH_DMA_ADDR_T_64BIT" is not defined, evaluates to 0 [-Werror=undef] 33 | #if CONFIG_ARCH_DMA_ADDR_T_64BIT | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ This could just be an #ifdef, but it seems nicer to just remove the check entirely. Apparently the only reason for the #ifdef is to avoid another warning: drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c:55:24: error: right shift count >= width of type [-Werror=shift-count-overflow] But this is best avoided by using the lower_32_bits()/upper_32_bits() helpers. Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver") Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart Signed-off-by: Linus Torvalds commit 4a9b6850c794e4394cad99e2b863d75f5bc8e92f Author: Julian Winkler Date: Sun Apr 16 17:49:32 2023 +0200 platform/x86: intel_scu_pcidrv: Add back PCI ID for Medfield This id was removed in commit b47018a778c1 ("platform/x86: intel_scu_ipc: Remove Lincroft support"), saying it is only used on Moorestown, but apparently the same id is also used on Medfield. Tested on the Medfield based Motorola RAZR i smartphone. Signed-off-by: Julian Winkler Link: https://lore.kernel.org/r/20230416154932.6579-1-julian.winkler1@web.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit e652be0f59d4ba4d5c636b1f7f4dcb73aae049fa Author: Hao Zeng Date: Tue Apr 18 09:30:56 2023 +0800 cpupower:Fix resource leaks in sysfs_get_enabled() The sysfs_get_enabled() opened file processor not closed, may cause a file handle leak. Putting error handling and resource cleanup code together makes the code easy to maintain and read. Removed the unnecessary else if branch from the original function, as it should return an error in cases other than '0'. Signed-off-by: Hao Zeng Suggested-by: Shuah Khan Signed-off-by: Shuah Khan commit b3dad076a058916c443c93074dc3ee80baaff4ea Author: Aaro Koskinen Date: Fri Apr 28 00:16:06 2023 +0300 staging: octeon: delete my name from TODO contact I gave up using MIPS OCTEON hardware after the drivers were deleted from staging in 2019. Afterwards, the driver seems to be added back but the TODO contact name was not updated accordingly. Delete my name, as I still get mails from people asking help with the driver and their systems. Fixes: 422d97b8b05e ("Revert "staging: octeon: delete driver"") Signed-off-by: Aaro Koskinen Link: https://lore.kernel.org/r/20230427211606.GD881984@darkstar.musicnaut.iki.fi Signed-off-by: Greg Kroah-Hartman commit 17955aba7877a4494d8093ae5498e19469b01d57 Author: Shengjiu Wang Date: Mon May 8 18:16:36 2023 +0800 ASoC: fsl_micfil: Fix error handler with pm_runtime_enable There is error message when defer probe happens: fsl-micfil-dai 30ca0000.micfil: Unbalanced pm_runtime_enable! Fix the error handler with pm_runtime_enable and add fsl_micfil_remove() for pm_runtime_disable. Fixes: 47a70e6fc9a8 ("ASoC: Add MICFIL SoC Digital Audio Interface driver.") Signed-off-by: Shengjiu Wang Date: Sat Apr 15 20:23:41 2023 +0200 power: supply: bq24190: Call power_supply_changed() after updating input current The bq24192 model relies on external charger-type detection and once that is done the bq24190_charger code will update the input current. In this case, when the initial power_supply_changed() call is made from the interrupt handler, the input settings are 5V/0.5A which on many devices is not enough power to charge (while the device is on). On many devices the fuel-gauge relies in its external_power_changed callback to timely signal userspace about charging <-> discharging status changes. Add a power_supply_changed() call after updating the input current. This allows the fuel-gauge driver to timely recheck if the battery is charging after the new input current has been applied and then it can immediately notify userspace about this. Fixes: 18f8e6f695ac ("power: supply: bq24190_charger: Get input_current_limit from our supplier") Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit ad3d9c779b1f09f3f3a6fefd07af407c7bc7c9a7 Author: Hans de Goede Date: Sat Apr 15 20:23:40 2023 +0200 power: supply: bq25890: Call power_supply_changed() after updating input current or voltage The bq25892 model relies on external charger-type detection and once that is done the bq25890_charger code will update the input current and if pumpexpress is used also the input voltage. In this case, when the initial power_supply_changed() call is made from the interrupt handler, the input settings are 5V/0.5A which on many devices is not enough power to charge (while the device is on). On many devices the fuel-gauge relies in its external_power_changed callback to timely signal userspace about charging <-> discharging status changes. Add a power_supply_changed() call after updating the input current or voltage. This allows the fuel-gauge driver to timely recheck if the battery is charging after the new input settings have been applied and then it can immediately notify userspace about this. Fixes: 48f45b094dbb ("power: supply: bq25890: Support higher charging voltages through Pump Express+ protocol") Fixes: eab25b4f93aa ("power: supply: bq25890: On the bq25892 set the IINLIM based on external charger detection") Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit 59dddea9879713423c7b2ade43c423bb71e0d216 Author: Hans de Goede Date: Sat Apr 15 20:23:39 2023 +0200 power: supply: bq27xxx: Use mod_delayed_work() instead of cancel() + schedule() Use mod_delayed_work() instead of separate cancel_delayed_work_sync() + schedule_delayed_work() calls. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit 59a99cd462fbdf71f4e845e09f37783035088b4f Author: Hans de Goede Date: Sat Apr 15 20:23:38 2023 +0200 power: supply: bq27xxx: After charger plug in/out wait 0.5s for things to stabilize bq27xxx_external_power_changed() gets called when the charger is plugged in or out. Rather then immediately scheduling an update wait 0.5 seconds for things to stabilize, so that e.g. the (dis)charge current is stable when bq27xxx_battery_update() runs. Fixes: 740b755a3b34 ("bq27x00: Poll battery state") Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit 939a116142012926e25de0ea6b7e2f8d86a5f1b6 Author: Hans de Goede Date: Sat Apr 15 20:23:37 2023 +0200 power: supply: bq27xxx: Ensure power_supply_changed() is called on current sign changes On gauges where the current register is signed, there is no charging flag in the flags register. So only checking flags will not result in power_supply_changed() getting called when e.g. a charger is plugged in and the current sign changes from negative (discharging) to positive (charging). This causes userspace's notion of the status to lag until userspace does a poll. And when a power_supply_leds.c LED trigger is used to indicate charging status with a LED, this LED will lag until the capacity percentage changes, which may take many minutes (because the LED trigger only is updated on power_supply_changed() calls). Fix this by calling bq27xxx_battery_current_and_status() on gauges with a signed current register and checking if the status has changed. Fixes: 297a533b3e62 ("bq27x00: Cache battery registers") Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit ff4c4a2a4437a6d03787c7aafb2617f20c3ef45f Author: Hans de Goede Date: Sat Apr 15 20:23:36 2023 +0200 power: supply: bq27xxx: Move bq27xxx_battery_update() down Move the bq27xxx_battery_update() functions to below the bq27xxx_battery_current_and_status() function. This is just moving a block of text, no functional changes. This is a preparation patch for making bq27xxx_battery_update() check the status and have it call power_supply_changed() on status changes. Fixes: 297a533b3e62 ("bq27x00: Cache battery registers") Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit 35092c5819f8c5acc7bafe3fdbb13d6307c4f5e1 Author: Hans de Goede Date: Sat Apr 15 20:23:35 2023 +0200 power: supply: bq27xxx: Add cache parameter to bq27xxx_battery_current_and_status() Add a cache parameter to bq27xxx_battery_current_and_status() so that it can optionally use cached flags instead of re-reading them itself. This is a preparation patch for making bq27xxx_battery_update() check the status and have it call power_supply_changed() on status changes. Fixes: 297a533b3e62 ("bq27x00: Cache battery registers") Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit c00bc80462afc7963f449d7f21d896d2f629cacc Author: Hans de Goede Date: Sat Apr 15 20:23:34 2023 +0200 power: supply: bq27xxx: Fix poll_interval handling and races on remove Before this patch bq27xxx_battery_teardown() was setting poll_interval = 0 to avoid bq27xxx_battery_update() requeuing the delayed_work item. There are 2 problems with this: 1. If the driver is unbound through sysfs, rather then the module being rmmod-ed, this changes poll_interval unexpectedly 2. This is racy, after it being set poll_interval could be changed before bq27xxx_battery_update() checks it through /sys/module/bq27xxx_battery/parameters/poll_interval Fix this by added a removed attribute to struct bq27xxx_device_info and using that instead of setting poll_interval to 0. There also is another poll_interval related race on remove(), writing /sys/module/bq27xxx_battery/parameters/poll_interval will requeue the delayed_work item for all devices on the bq27xxx_battery_devices list and the device being removed was only removed from that list after cancelling the delayed_work item. Fix this by moving the removal from the bq27xxx_battery_devices list to before cancelling the delayed_work item. Fixes: 8cfaaa811894 ("bq27x00_battery: Fix OOPS caused by unregistring bq27x00 driver") Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit 444ff00734f3878cd54ddd1ed5e2e6dbea9326d5 Author: Hans de Goede Date: Sat Apr 15 20:23:33 2023 +0200 power: supply: bq27xxx: Fix I2C IRQ race on remove devm_request_threaded_irq() requested IRQs are only free-ed after the driver's remove function has ran. So the IRQ could trigger and call bq27xxx_battery_update() after bq27xxx_battery_teardown() has already run. Switch to explicitly free-ing the IRQ in bq27xxx_battery_i2c_remove() to fix this. Fixes: 8807feb91b76 ("power: bq27xxx_battery: Add interrupt handling support") Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit 5c34c0aef185dcd10881847b9ebf20046aa77cb4 Author: Hans de Goede Date: Sat Apr 15 20:23:32 2023 +0200 power: supply: bq27xxx: Fix bq27xxx_battery_update() race condition bq27xxx_battery_update() assumes / requires that it is only run once, not multiple times at the same time. But there are 3 possible callers: 1. bq27xxx_battery_poll() delayed_work item handler 2. bq27xxx_battery_irq_handler_thread() I2C IRQ handler 3. bq27xxx_battery_setup() And there is no protection against these racing with each other, fix this race condition by making all callers take di->lock: - Rename bq27xxx_battery_update() to bq27xxx_battery_update_unlocked() - Add new bq27xxx_battery_update() which takes di->lock and then calls bq27xxx_battery_update_unlocked() - Make stale cache check code in bq27xxx_battery_get_property(), which already takes di->lock directly to check the jiffies, call bq27xxx_battery_update_unlocked() instead of messing with the delayed_work item - Make bq27xxx_battery_update_unlocked() mod the delayed-work item so that the next poll is delayed to poll_interval milliseconds after the last update independent of the source of the update Fixes: 740b755a3b34 ("bq27x00: Poll battery state") Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit e4484643991e0f6b89060092563f0dbab9450cbb Author: Hans de Goede Date: Thu Apr 13 12:09:41 2023 +0200 power: supply: leds: Fix blink to LED on transition When a battery's status changes from charging to full then the charging-blink-full-solid trigger tries to change the LED from blinking to solid/on. As is documented in include/linux/leds.h to deactivate blinking / to make the LED solid a LED_OFF must be send: """ * Deactivate blinking again when the brightness is set to LED_OFF * via the brightness_set() callback. """ led_set_brighness() calls with a brightness value other then 0 / LED_OFF merely change the brightness of the LED in its on state while it is blinking. So power_supply_update_bat_leds() must first send a LED_OFF event before the LED_FULL to disable blinking. Fixes: 6501f728c56f ("power_supply: Add new LED trigger charging-blink-solid-full") Signed-off-by: Hans de Goede Reviewed-by: Vasily Khoruzhick Signed-off-by: Sebastian Reichel commit 4d5c129d6c8993fe96e9ae712141eedcb9ca68c2 Author: Hans de Goede Date: Sat Apr 15 18:07:32 2023 +0200 power: supply: sc27xx: Fix external_power_changed race sc27xx_fgu_external_power_changed() dereferences data->battery, which gets sets in ab8500_btemp_probe() like this: data->battery = devm_power_supply_register(dev, &sc27xx_fgu_desc, &fgu_cfg); As soon as devm_power_supply_register() has called device_add() the external_power_changed callback can get called. So there is a window where sc27xx_fgu_external_power_changed() may get called while data->battery has not been set yet leading to a NULL pointer dereference. Fixing this is easy. The external_power_changed callback gets passed the power_supply which will eventually get stored in data->battery, so sc27xx_fgu_external_power_changed() can simply directly use the passed in psy argument which is always valid. After this change sc27xx_fgu_external_power_changed() is reduced to just "power_supply_changed(psy);" and it has the same prototype. While at it simply replace it with making the external_power_changed callback directly point to power_supply_changed. Cc: Orson Zhai Cc: Chunyan Zhang Signed-off-by: Hans de Goede Reviewed-by: Baolin Wang Signed-off-by: Sebastian Reichel commit 029a443b9b6424170f00f6dd5b7682e682cce92e Author: Hans de Goede Date: Sat Apr 15 18:07:31 2023 +0200 power: supply: bq25890: Fix external_power_changed race bq25890_charger_external_power_changed() dereferences bq->charger, which gets sets in bq25890_power_supply_init() like this: bq->charger = devm_power_supply_register(bq->dev, &bq->desc, &psy_cfg); As soon as devm_power_supply_register() has called device_add() the external_power_changed callback can get called. So there is a window where bq25890_charger_external_power_changed() may get called while bq->charger has not been set yet leading to a NULL pointer dereference. This race hits during boot sometimes on a Lenovo Yoga Book 1 yb1-x90f when the cht_wcove_pwrsrc (extcon) power_supply is done with detecting the connected charger-type which happens to exactly hit the small window: BUG: kernel NULL pointer dereference, address: 0000000000000018 RIP: 0010:__power_supply_is_supplied_by+0xb/0xb0 Call Trace: __power_supply_get_supplier_property+0x19/0x50 class_for_each_device+0xb1/0xe0 power_supply_get_property_from_supplier+0x2e/0x50 bq25890_charger_external_power_changed+0x38/0x1b0 [bq25890_charger] __power_supply_changed_work+0x30/0x40 class_for_each_device+0xb1/0xe0 power_supply_changed_work+0x5f/0xe0 Fixing this is easy. The external_power_changed callback gets passed the power_supply which will eventually get stored in bq->charger, so bq25890_charger_external_power_changed() can simply directly use the passed in psy argument which is always valid. Fixes: eab25b4f93aa ("power: supply: bq25890: On the bq25892 set the IINLIM based on external charger detection") Cc: stable@vger.kernel.org Cc: Marek Vasut Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit f8319774d6f1567d6e7d03653174ab0c82c5c66d Author: Hans de Goede Date: Sat Apr 15 18:07:30 2023 +0200 power: supply: axp288_fuel_gauge: Fix external_power_changed race fuel_gauge_external_power_changed() dereferences info->bat, which gets sets in axp288_fuel_gauge_probe() like this: info->bat = devm_power_supply_register(dev, &fuel_gauge_desc, &psy_cfg); As soon as devm_power_supply_register() has called device_add() the external_power_changed callback can get called. So there is a window where fuel_gauge_external_power_changed() may get called while info->bat has not been set yet leading to a NULL pointer dereference. Fixing this is easy. The external_power_changed callback gets passed the power_supply which will eventually get stored in info->bat, so fuel_gauge_external_power_changed() can simply directly use the passed in psy argument which is always valid. Fixes: 30abb3d07929 ("power: supply: axp288_fuel_gauge: Take lock before updating the valid flag") Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit a5299ce4e96f3e8930e9c051b28d8093ada87b08 Author: Hans de Goede Date: Sat Apr 15 18:07:29 2023 +0200 power: supply: ab8500: Fix external_power_changed race ab8500_btemp_external_power_changed() dereferences di->btemp_psy, which gets sets in ab8500_btemp_probe() like this: di->btemp_psy = devm_power_supply_register(dev, &ab8500_btemp_desc, &psy_cfg); As soon as devm_power_supply_register() has called device_add() the external_power_changed callback can get called. So there is a window where ab8500_btemp_external_power_changed() may get called while di->btemp_psy has not been set yet leading to a NULL pointer dereference. Fixing this is easy. The external_power_changed callback gets passed the power_supply which will eventually get stored in di->btemp_psy, so ab8500_btemp_external_power_changed() can simply directly use the passed in psy argument which is always valid. And the same applies to ab8500_fg_external_power_changed(). Signed-off-by: Hans de Goede Reviewed-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 536d948a8dee21166d9c5b5a4189af56beba16e3 Author: Randy Dunlap Date: Fri Apr 28 21:35:19 2023 -0700 powerpc/fsl_uli1575: fix kconfig warnings and build errors Neither FSL_SOC_BOOKE nor PPC_86xx enables CONFIG_PCI by default, so it may be unset in some randconfigs. When that happens, FSL_ULI1575 may be set when it should not be since it is a PCI driver. When it is set, there are 3 kconfig warnings and a slew of build errors WARNING: unmet direct dependencies detected for PCI_QUIRKS Depends on [n]: PCI [=n] Selected by [y]: - FSL_PCI [=y] WARNING: unmet direct dependencies detected for GENERIC_ISA_DMA Depends on [n]: ISA_DMA_API [=n] Selected by [y]: - FSL_ULI1575 [=y] && (FSL_SOC_BOOKE [=n] || PPC_86xx [=y]) WARNING: unmet direct dependencies detected for PPC_INDIRECT_PCI Depends on [n]: PCI [=n] Selected by [y]: - FSL_PCI [=y] and 30+ build errors. Fixes: 22fdf79171e8 ("powerpc/fsl_uli1575: Allow to disable FSL_ULI1575 support") Signed-off-by: Randy Dunlap Reviewed-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://msgid.link/20230429043519.19807-1-rdunlap@infradead.org commit 79de36042eecb684e0f748d17ba52f365fde0d65 Author: Rob Herring Date: Fri May 5 12:18:17 2023 -0500 powerpc/isa-bridge: Fix ISA mapping when "ranges" is not present Commit e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges" parsing") broke PASemi Nemo board booting. The issue is the ISA I/O range was not getting mapped as the logic to handle no "ranges" was inverted. If phb_io_base_phys is non-zero, then the ISA range defaults to the first 64K of the PCI I/O space. phb_io_base_phys should only be 0 when looking for a non-PCI ISA region. Fixes: e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges" parsing") Reported-by: Christian Zigotzky Link: https://lore.kernel.org/all/301595ad-0edf-2113-b55f-f5b8051ed24c@xenosoft.de/ Signed-off-by: Rob Herring Tested-by: Christian Zigotzky Signed-off-by: Michael Ellerman Link: https://msgid.link/20230505171816.3175865-1-robh@kernel.org commit 1a7edd041f2d252f251523ba3f2eaead076a8f8d Author: Keoseong Park Date: Tue Apr 25 12:17:21 2023 +0900 scsi: ufs: core: Fix I/O hang that occurs when BKOPS fails in W-LUN suspend Even when urgent BKOPS fails, the consumer will get stuck in runtime suspend status. Like commit 1a5665fc8d7a ("scsi: ufs: core: WLUN suspend SSU/enter hibern8 fail recovery"), trigger the error handler and return -EBUSY to break the suspend. Fixes: b294ff3e3449 ("scsi: ufs: core: Enable power management for wlun") Signed-off-by: Keoseong Park Link: https://lore.kernel.org/r/20230425031721epcms2p5d4de65616478c967d466626e20c42a3a@epcms2p5 Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen commit ae3c253f595b31ff30d55b4c50b4470e56bc4e0d Author: Arnd Bergmann Date: Tue Apr 18 11:15:48 2023 +0200 media: platform: mtk-mdp3: work around unused-variable warning When CONFIG_OF is disabled, the 'data' variable is not used at all because of_match_node() turns into a dummy macro: drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c: In function 'mdp_comp_sub_create': drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c:1038:36: error: unused variable 'data' [-Werror=unused-variable] 1038 | const struct mtk_mdp_driver_data *data = mdp->mdp_data; | ^~~~ Remove the variable again by moving the pointer dereference into the of_match_node call. Fixes: b385b991ef2f ("media: platform: mtk-mdp3: chip config split about subcomponents") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil commit 55e2a6e36be6d61f914898ce731f9321c0dcf4e8 Author: Arnd Bergmann Date: Tue Apr 18 11:19:55 2023 +0200 media: nxp: ignore unused suspend operations gcc warns about some functions being unused when CONFIG_PM_SLEEP is disabled: drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:328:12: error: 'mxc_isi_pm_resume' defined but not used [-Werror=unused-function] 328 | static int mxc_isi_pm_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~ drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:314:12: error: 'mxc_isi_pm_suspend' defined but not used [-Werror=unused-function] 314 | static int mxc_isi_pm_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~ Use the modern SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() helpers in place of the old SET_SYSTEM_SLEEP_PM_OPS()/SET_RUNTIME_PM_OPS() ones. By convention, use pm_ptr() to guard the reference to the operations. This makes no difference as long as the driver requires CONFIG_PM, but is what users of SET_RUNTIME_PM_OPS() are supposed to do. Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver") Reviewed-by: Laurent Pinchart Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil commit e10707d5865c90d3dfe4ef589ce02ff4287fef85 Author: Niklas Söderlund Date: Sat Feb 11 21:55:34 2023 +0100 media: rcar-vin: Select correct interrupt mode for V4L2_FIELD_ALTERNATE When adding proper support for V4L2_FIELD_ALTERNATE it was missed that this field format should trigger an interrupt for each field, not just for the whole frame. Fix this by marking it as progressive in the capture setup, which will then select the correct interrupt mode. Tested on both Gen2 and Gen3 with the result of a doubling of the frame rate for V4L2_FIELD_ALTERNATE. From a PAL video source the frame rate is now 50, which is expected for alternate field capture. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil commit cb88d8289fc222bd21b7a7f99b055e7e73e316f4 Author: Niklas Söderlund Date: Sat Feb 11 21:54:32 2023 +0100 media: rcar-vin: Fix NV12 size alignment When doing format validation for NV12 the width and height should be aligned to 32 pixels. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil commit 879c5a458e532b95783ce27f704d1b21573066f7 Author: Niklas Söderlund Date: Sat Feb 11 21:54:31 2023 +0100 media: rcar-vin: Gen3 can not scale NV12 The VIN modules on Gen3 can not scale NV12, fail format validation if the user tries. Currently no frames are produced if this is attempted. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil commit 6ad9cf7a615287d640deb4a6530c4d9846621be0 Author: Lukas Bulwahn Date: Mon Apr 24 13:40:43 2023 +0200 MAINTAINERS: adjust file entry for ARM/APPLE MACHINE SUPPORT Commit de614ac31955 ("MAINTAINERS: Add entries for Apple PWM driver") adds an entry for Documentation/devicetree/bindings/pwm/pwm-apple.yaml, but commit 87a3a3929c71 ("dt-bindings: pwm: Add Apple PWM controller") from the same patch series actually adds the devicetree binding file with the name apple,s5l-fpwm.yaml. Adjust the file entry to the file actually added. Fixes: de614ac31955 ("MAINTAINERS: Add entries for Apple PWM driver") Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20230424114043.22475-1-lukas.bulwahn@gmail.com Signed-off-by: Krzysztof Kozlowski commit 7d8accfaa0ab65e4282c8e58950f7d688342cd86 Author: Mario Limonciello Date: Thu Apr 27 00:33:37 2023 -0500 hwmon: (k10temp) Add PCI ID for family 19, model 78h Enable k10temp on this system. [ bp: Massage. ] Signed-off-by: Mario Limonciello Signed-off-by: Borislav Petkov (AMD) Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20230427053338.16653-3-mario.limonciello@amd.com commit 23a5b8bb022c1e071ca91b1a9c10f0ad6a0966e9 Author: Mario Limonciello Date: Thu Apr 27 00:33:36 2023 -0500 x86/amd_nb: Add PCI ID for family 19h model 78h Commit 310e782a99c7 ("platform/x86/amd: pmc: Utilize SMN index 0 for driver probe") switched to using amd_smn_read() which relies upon the misc PCI ID used by DF function 3 being included in a table. The ID for model 78h is missing in that table, so amd_smn_read() doesn't work. Add the missing ID into amd_nb, restoring s2idle on this system. [ bp: Simplify commit message. ] Fixes: 310e782a99c7 ("platform/x86/amd: pmc: Utilize SMN index 0 for driver probe") Signed-off-by: Mario Limonciello Signed-off-by: Borislav Petkov (AMD) Acked-by: Bjorn Helgaas # pci_ids.h Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20230427053338.16653-2-mario.limonciello@amd.com commit e42f110700ed7293700c26145e1ed07ea05ac3f6 Author: Johan Hovold Date: Tue May 2 12:38:10 2023 +0200 phy: qcom-qmp-pcie-msm8996: fix init-count imbalance The init counter is not decremented on initialisation errors, which prevents retrying initialisation. Add the missing decrement on initialisation errors so that the counter reflects the state of the device. Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Cc: stable@vger.kernel.org # 4.12 Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230502103810.12061-3-johan+linaro@kernel.org Signed-off-by: Vinod Koul commit 9bf03a0cbd80a256bc1e1c4bcc80bc2b06b8b2b9 Author: Johan Hovold Date: Tue May 2 12:38:09 2023 +0200 phy: qcom-qmp-combo: fix init-count imbalance The init counter is not decremented on initialisation errors, which prevents retrying initialisation and can lead to the runtime suspend callback attempting to disable resources that have never been enabled. Add the missing decrement on initialisation errors so that the counter reflects the state of the device. Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Cc: stable@vger.kernel.org # 4.12 Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230502103810.12061-2-johan+linaro@kernel.org Signed-off-by: Vinod Koul commit 0019a2d4b7e37a983d133d42b707b8a3018ae6f4 Author: Randy Dunlap Date: Thu Apr 27 20:11:11 2023 -0700 sched: fix cid_lock kernel-doc warnings Fix kernel-doc warnings for cid_lock and use_cid_lock. These comments are not in kernel-doc format. kernel/sched/core.c:11496: warning: Cannot understand * @cid_lock: Guarantee forward-progress of cid allocation. on line 11496 - I thought it was a doc line kernel/sched/core.c:11505: warning: Cannot understand * @use_cid_lock: Select cid allocation behavior: lock-free vs spinlock. on line 11505 - I thought it was a doc line Fixes: 223baf9d17f2 ("sched: Fix performance regression introduced by mm_cid") Signed-off-by: Randy Dunlap Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230428031111.322-1-rdunlap@infradead.org commit b752ea0c28e3f7f0aaaad6abf84f735eebc37a60 Author: Kan Liang Date: Fri Apr 21 11:45:28 2023 -0700 perf/x86/intel/ds: Flush PEBS DS when changing PEBS_DATA_CFG Several similar kernel warnings can be triggered, [56605.607840] CPU0 PEBS record size 0, expected 32, config 0 cpuc->record_size=208 when the below commands are running in parallel for a while on SPR. while true; do perf record --no-buildid -a --intr-regs=AX \ -e cpu/event=0xd0,umask=0x81/pp \ -c 10003 -o /dev/null ./triad; done & while true; do perf record -o /tmp/out -W -d \ -e '{ld_blocks.store_forward:period=1000000, \ MEM_TRANS_RETIRED.LOAD_LATENCY:u:precise=2:ldlat=4}' \ -c 1037 ./triad; done The triad program is just the generation of loads/stores. The warnings are triggered when an unexpected PEBS record (with a different config and size) is found. A system-wide PEBS event with the large PEBS config may be enabled during a context switch. Some PEBS records for the system-wide PEBS may be generated while the old task is sched out but the new one hasn't been sched in yet. When the new task is sched in, the cpuc->pebs_record_size may be updated for the per-task PEBS events. So the existing system-wide PEBS records have a different size from the later PEBS records. The PEBS buffer should be flushed right before the hardware is reprogrammed. The new size and threshold should be updated after the old buffer has been flushed. Reported-by: Stephane Eranian Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230421184529.3320912-1-kan.liang@linux.intel.com commit 90befef5a9e820ccccc33181ec14c015980300cc Author: Namhyung Kim Date: Wed Apr 26 20:05:27 2023 -0700 perf/x86: Fix missing sample size update on AMD BRS It missed to convert a PERF_SAMPLE_BRANCH_STACK user to call the new perf_sample_save_brstack() helper in order to update the dyn_size. This affects AMD Zen3 machines with the branch-brs event. Fixes: eb55b455ef9c ("perf/core: Add perf_sample_save_brstack() helper") Signed-off-by: Namhyung Kim Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20230427030527.580841-1-namhyung@kernel.org commit 1d1bfe30dad50d4bea83cd38d73c441972ea0173 Author: Yang Jihong Date: Tue Apr 25 10:32:17 2023 +0000 perf/core: Fix perf_sample_data not properly initialized for different swevents in perf_tp_event() data->sample_flags may be modified in perf_prepare_sample(), in perf_tp_event(), different swevents use the same on-stack perf_sample_data, the previous swevent may change sample_flags in perf_prepare_sample(), as a result, some members of perf_sample_data are not correctly initialized when next swevent_event preparing sample (for example data->id, the value varies according to swevent). A simple scenario triggers this problem is as follows: # perf record -e sched:sched_switch --switch-output-event sched:sched_switch -a sleep 1 [ perf record: dump data: Woken up 0 times ] [ perf record: Dump perf.data.2023041209014396 ] [ perf record: dump data: Woken up 0 times ] [ perf record: Dump perf.data.2023041209014662 ] [ perf record: dump data: Woken up 0 times ] [ perf record: Dump perf.data.2023041209014910 ] [ perf record: Woken up 0 times to write data ] [ perf record: Dump perf.data.2023041209015164 ] [ perf record: Captured and wrote 0.069 MB perf.data. ] # ls -l total 860 -rw------- 1 root root 95694 Apr 12 09:01 perf.data.2023041209014396 -rw------- 1 root root 606430 Apr 12 09:01 perf.data.2023041209014662 -rw------- 1 root root 82246 Apr 12 09:01 perf.data.2023041209014910 -rw------- 1 root root 82342 Apr 12 09:01 perf.data.2023041209015164 # perf script -i perf.data.2023041209014396 0x11d58 [0x80]: failed to process type: 9 [Bad address] Solution: Re-initialize perf_sample_data after each event is processed. Note that data->raw->frag.data may be accessed in perf_tp_event_match(). Therefore, need to init sample_data and then go through swevent hlist to prevent reference of NULL pointer, reported by [1]. After fix: # perf record -e sched:sched_switch --switch-output-event sched:sched_switch -a sleep 1 [ perf record: dump data: Woken up 0 times ] [ perf record: Dump perf.data.2023041209442259 ] [ perf record: dump data: Woken up 0 times ] [ perf record: Dump perf.data.2023041209442514 ] [ perf record: dump data: Woken up 0 times ] [ perf record: Dump perf.data.2023041209442760 ] [ perf record: Woken up 0 times to write data ] [ perf record: Dump perf.data.2023041209443003 ] [ perf record: Captured and wrote 0.069 MB perf.data. ] # ls -l total 864 -rw------- 1 root root 100166 Apr 12 09:44 perf.data.2023041209442259 -rw------- 1 root root 606438 Apr 12 09:44 perf.data.2023041209442514 -rw------- 1 root root 82246 Apr 12 09:44 perf.data.2023041209442760 -rw------- 1 root root 82342 Apr 12 09:44 perf.data.2023041209443003 # perf script -i perf.data.2023041209442259 | head -n 5 perf 232 [000] 66.846217: sched:sched_switch: prev_comm=perf prev_pid=232 prev_prio=120 prev_state=D ==> next_comm=perf next_pid=234 next_prio=120 perf 234 [000] 66.846449: sched:sched_switch: prev_comm=perf prev_pid=234 prev_prio=120 prev_state=S ==> next_comm=perf next_pid=232 next_prio=120 perf 232 [000] 66.846546: sched:sched_switch: prev_comm=perf prev_pid=232 prev_prio=120 prev_state=R ==> next_comm=perf next_pid=234 next_prio=120 perf 234 [000] 66.846606: sched:sched_switch: prev_comm=perf prev_pid=234 prev_prio=120 prev_state=S ==> next_comm=perf next_pid=232 next_prio=120 perf 232 [000] 66.846646: sched:sched_switch: prev_comm=perf prev_pid=232 prev_prio=120 prev_state=R ==> next_comm=perf next_pid=234 next_prio=120 [1] Link: https://lore.kernel.org/oe-lkp/202304250929.efef2caa-yujie.liu@intel.com Fixes: bb447c27a467 ("perf/core: Set data->sample_flags in perf_prepare_sample()") Signed-off-by: Yang Jihong Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230425103217.130600-1-yangjihong1@huawei.com commit 92cc5d00a431e96e5a49c0b97e5ad4fa7536bd4b Author: John Stultz Date: Wed May 3 02:33:51 2023 +0000 locking/rwsem: Add __always_inline annotation to __down_read_common() and inlined callers Apparently despite it being marked inline, the compiler may not inline __down_read_common() which makes it difficult to identify the cause of lock contention, as the blocked function in traceevents will always be listed as __down_read_common(). So this patch adds __always_inline annotation to the common function (as well as the inlined helper callers) to force it to be inlined so the blocking function will be listed (via Wchan) in traceevents. Fixes: c995e638ccbb ("locking/rwsem: Fold __down_{read,write}*()") Reported-by: Tim Murray Signed-off-by: John Stultz Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Waiman Long Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20230503023351.2832796-1-jstultz@google.com commit 048bce15da19e46ce5e866a48338929c76ca4152 Author: Luca Weiss Date: Wed Apr 19 17:58:27 2023 +0200 media: dt-bindings: ov2685: Correct data-lanes attribute When adapting the original doc conversion to support 2 lanes, minItems should've been added as well since the sensor supports either 1 or 2 lanes. Add minItems to make the validation happy again. Fixes: 8d561d78aeab ("media: dt-bindings: ov2685: convert to dtschema") Signed-off-by: Luca Weiss Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230419-ov2685-dtschema-fixup-v1-1-c850a34b3a26@z3ntu.xyz Signed-off-by: Krzysztof Kozlowski commit 90670ef774a8b6700c38ce1222e6aa263be54d5f Author: Ai Chao Date: Sat May 6 10:26:53 2023 +0800 ALSA: hda/realtek: Add a quirk for HP EliteDesk 805 Add a quirk for HP EliteDesk 805 to fixup ALC3867 headset MIC no sound. Signed-off-by: Ai Chao Cc: Link: https://lore.kernel.org/r/20230506022653.2074343-1-aichao@kylinos.cn Signed-off-by: Takashi Iwai commit a4671b7fba59775845ee60cfbdfc4ba64300211b Author: Luke D. Jones Date: Sat May 6 11:58:24 2023 +1200 ALSA: hda/realtek: Add quirk for 2nd ASUS GU603 Add quirk for GU603 with 0x1c62 variant of codec. Signed-off-by: Luke D. Jones Cc: Link: https://lore.kernel.org/r/20230505235824.49607-2-luke@ljones.dev Signed-off-by: Takashi Iwai commit 0a6b36c5dc3dda0196f4fb65bdb34c38b8d060c3 Author: Jeremy Soller Date: Fri May 5 10:36:51 2023 -0600 ALSA: hda/realtek: Add quirk for Clevo L140AU Fixes headset detection on Clevo L140AU. Signed-off-by: Jeremy Soller Signed-off-by: Tim Crawford Cc: Link: https://lore.kernel.org/r/20230505163651.21257-1-tcrawford@system76.com Signed-off-by: Takashi Iwai commit 949f95ff39bf188e594e7ecd8e29b82eb108f5bf Author: Jan Kara Date: Tue Apr 11 14:10:19 2023 +0200 ext4: fix lockdep warning when enabling MMP When we enable MMP in ext4_multi_mount_protect() during mount or remount, we end up calling sb_start_write() from write_mmp_block(). This triggers lockdep warning because freeze protection ranks above s_umount semaphore we are holding during mount / remount. The problem is harmless because we are guaranteed the filesystem is not frozen during mount / remount but still let's fix the warning by not grabbing freeze protection from ext4_multi_mount_protect(). Cc: stable@kernel.org Reported-by: syzbot+6b7df7d5506b32467149@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=ab7e5b6f400b7778d46f01841422e5718fb81843 Signed-off-by: Jan Kara Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20230411121019.21940-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit fa08a7b61dff8a4df11ff1e84abfc214b487caf7 Author: Ye Bin Date: Mon Jan 16 10:00:15 2023 +0800 ext4: fix WARNING in mb_find_extent Syzbot found the following issue: EXT4-fs: Warning: mounting with data=journal disables delayed allocation, dioread_nolock, O_DIRECT and fast_commit support! EXT4-fs (loop0): orphan cleanup on readonly fs ------------[ cut here ]------------ WARNING: CPU: 1 PID: 5067 at fs/ext4/mballoc.c:1869 mb_find_extent+0x8a1/0xe30 Modules linked in: CPU: 1 PID: 5067 Comm: syz-executor307 Not tainted 6.2.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 RIP: 0010:mb_find_extent+0x8a1/0xe30 fs/ext4/mballoc.c:1869 RSP: 0018:ffffc90003c9e098 EFLAGS: 00010293 RAX: ffffffff82405731 RBX: 0000000000000041 RCX: ffff8880783457c0 RDX: 0000000000000000 RSI: 0000000000000041 RDI: 0000000000000040 RBP: 0000000000000040 R08: ffffffff82405723 R09: ffffed10053c9402 R10: ffffed10053c9402 R11: 1ffff110053c9401 R12: 0000000000000000 R13: ffffc90003c9e538 R14: dffffc0000000000 R15: ffffc90003c9e2cc FS: 0000555556665300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000056312f6796f8 CR3: 0000000022437000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ext4_mb_complex_scan_group+0x353/0x1100 fs/ext4/mballoc.c:2307 ext4_mb_regular_allocator+0x1533/0x3860 fs/ext4/mballoc.c:2735 ext4_mb_new_blocks+0xddf/0x3db0 fs/ext4/mballoc.c:5605 ext4_ext_map_blocks+0x1868/0x6880 fs/ext4/extents.c:4286 ext4_map_blocks+0xa49/0x1cc0 fs/ext4/inode.c:651 ext4_getblk+0x1b9/0x770 fs/ext4/inode.c:864 ext4_bread+0x2a/0x170 fs/ext4/inode.c:920 ext4_quota_write+0x225/0x570 fs/ext4/super.c:7105 write_blk fs/quota/quota_tree.c:64 [inline] get_free_dqblk+0x34a/0x6d0 fs/quota/quota_tree.c:130 do_insert_tree+0x26b/0x1aa0 fs/quota/quota_tree.c:340 do_insert_tree+0x722/0x1aa0 fs/quota/quota_tree.c:375 do_insert_tree+0x722/0x1aa0 fs/quota/quota_tree.c:375 do_insert_tree+0x722/0x1aa0 fs/quota/quota_tree.c:375 dq_insert_tree fs/quota/quota_tree.c:401 [inline] qtree_write_dquot+0x3b6/0x530 fs/quota/quota_tree.c:420 v2_write_dquot+0x11b/0x190 fs/quota/quota_v2.c:358 dquot_acquire+0x348/0x670 fs/quota/dquot.c:444 ext4_acquire_dquot+0x2dc/0x400 fs/ext4/super.c:6740 dqget+0x999/0xdc0 fs/quota/dquot.c:914 __dquot_initialize+0x3d0/0xcf0 fs/quota/dquot.c:1492 ext4_process_orphan+0x57/0x2d0 fs/ext4/orphan.c:329 ext4_orphan_cleanup+0xb60/0x1340 fs/ext4/orphan.c:474 __ext4_fill_super fs/ext4/super.c:5516 [inline] ext4_fill_super+0x81cd/0x8700 fs/ext4/super.c:5644 get_tree_bdev+0x400/0x620 fs/super.c:1282 vfs_get_tree+0x88/0x270 fs/super.c:1489 do_new_mount+0x289/0xad0 fs/namespace.c:3145 do_mount fs/namespace.c:3488 [inline] __do_sys_mount fs/namespace.c:3697 [inline] __se_sys_mount+0x2d3/0x3c0 fs/namespace.c:3674 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Add some debug information: mb_find_extent: mb_find_extent block=41, order=0 needed=64 next=0 ex=0/41/1@3735929054 64 64 7 block_bitmap: ff 3f 0c 00 fc 01 00 00 d2 3d 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff Acctually, blocks per group is 64, but block bitmap indicate at least has 128 blocks. Now, ext4_validate_block_bitmap() didn't check invalid block's bitmap if set. To resolve above issue, add check like fsck "Padding at end of block bitmap is not set". Cc: stable@kernel.org Reported-by: syzbot+68223fe9f6c95ad43bed@syzkaller.appspotmail.com Signed-off-by: Ye Bin Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230116020015.1506120-1-yebin@huaweicloud.com Signed-off-by: Theodore Ts'o commit 70a640c0efa7667453c3911b13335304ce46ad8b Author: Geert Uytterhoeven Date: Wed Apr 26 15:35:45 2023 +0200 regmap: REGMAP_KUNIT should not select REGMAP Enabling a (modular) test should not silently enable additional kernel functionality, as that may increase the attack vector of a product. Fix this by: 1. making REGMAP visible if CONFIG_KUNIT_ALL_TESTS is enabled, 2. making REGMAP_KUNIT depend on REGMAP instead of selecting it. After this, one can safely enable CONFIG_KUNIT_ALL_TESTS=m to build modules for all appropriate tests for ones system, without pulling in extra unwanted functionality, while still allowing a tester to manually enable REGMAP and its test suite on a system where REGMAP is not enabled by default. Fixes: 2238959b6ad27040 ("regmap: Add some basic kunit tests") Signed-off-by: Geert Uytterhoeven Date: Fri May 5 09:28:20 2023 +0300 ASoC: dwc: limit the number of overrun messages On slow CPU (FPGA/QEMU emulated) printing overrun messages from interrupt handler to uart console may leads to more overrun errors. So use dev_err_ratelimited to limit the number of error messages. Signed-off-by: Maxim Kochetkov Date: Fri May 5 10:14:58 2023 -0600 ASoC: amd: yc: Add DMI entry to support System76 Pangolin 12 Add pang12 quirk to enable the internal microphone. Signed-off-by: Jeremy Soller Date: Fri Apr 21 17:26:10 2023 +0200 arm64: dts: rockchip: fix nEXTRST on SOQuartz In pre-production prototypes (of which I only know one person having one, Peter Geis), GPIO0 pin A5 was tied to the SDMMC power enable pin on the CM4 connector. On all production models, this is not the case; instead, this pin is used for the nEXTRST signal, and the SDMMC power enable pin is always pulled high. Since everyone currently using the SOQuartz device trees will want this change, it is made to the tree without splitting the trees into two separate ones of which users will then inevitably choose the wrong one. This fixes USB and PCIe on a wide variety of CM4IO-compatible boards which use the nEXTRST signal. Fixes: 5859b5a9c3ac ("arm64: dts: rockchip: add SoQuartz CM4IO dts") Signed-off-by: Nicolas Frattaroli Link: https://lore.kernel.org/r/20230421152610.21688-1-frattaroli.nicolas@gmail.com Signed-off-by: Heiko Stuebner commit 42dcd054a6493e1adf292c3e246d1a2a9258942e Author: Krzysztof Kozlowski Date: Sat Apr 22 00:31:48 2023 +0200 arm64: dts: rockchip: add missing cache properties As all level 2 and level 3 caches are unified, add required cache-unified properties to fix warnings like: rk3588s-khadas-edge2.dtb: l3-cache: 'cache-unified' is a dependency of 'cache-size' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230421223149.115185-1-krzysztof.kozlowski@linaro.org Signed-off-by: Heiko Stuebner commit 03633c4ef1fb5ee119296dfe0c411656a9b5e04f Author: Lorenz Brun Date: Fri Apr 21 23:38:41 2023 +0200 arm64: dts: rockchip: fix USB regulator on ROCK64 Currently the ROCK64 device tree specifies two regulators, vcc_host_5v and vcc_host1_5v for USB VBUS on the device. Both of those are however specified with RK_PA2 as the GPIO enabling them, causing the following error when booting: rockchip-pinctrl pinctrl: pin gpio0-2 already requested by vcc-host-5v-regulator; cannot claim for vcc-host1-5v-regulator rockchip-pinctrl pinctrl: pin-2 (vcc-host1-5v-regulator) status -22 rockchip-pinctrl pinctrl: could not request pin 2 (gpio0-2) from group usb20-host-drv on device rockchip-pinctrl reg-fixed-voltage vcc-host1-5v-regulator: Error applying setting, reverse things back Looking at the schematic, there are in fact three USB regulators, vcc_host_5v, vcc_host1_5v and vcc_otg_v5. But the enable signal for all three is driven by Q2604 which is in turn driven by GPIO_A2/PA2. Since these three regulators are not controllable separately, I removed the second one which was causing the error and added labels for all rails to the single regulator. Signed-off-by: Lorenz Brun Tested-by: Diederik de Haas Link: https://lore.kernel.org/r/20230421213841.3079632-1-lorenz@brun.one Signed-off-by: Heiko Stuebner commit ac9a78681b921877518763ba0e89202254349d1b Author: Linus Torvalds Date: Sun May 7 13:34:35 2023 -0700 Linux 6.4-rc1 commit f085df1be60abf670315c11036261cfaec16b2eb Merge: 17784de648be9 9a2d5178b9d51 Author: Linus Torvalds Date: Sun May 7 11:32:18 2023 -0700 Merge tag 'perf-tools-for-v6.4-3-2023-05-06' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tool updates from Arnaldo Carvalho de Melo: "Third version of perf tool updates, with the build problems with with using a 'vmlinux.h' generated from the main build fixed, and the bpf skeleton build disabled by default. Build: - Require libtraceevent to build, one can disable it using NO_LIBTRACEEVENT=1. It is required for tools like 'perf sched', 'perf kvm', 'perf trace', etc. libtraceevent is available in most distros so installing 'libtraceevent-devel' should be a one-time event to continue building perf as usual. Using NO_LIBTRACEEVENT=1 produces tooling that is functional and sufficient for lots of users not interested in those libtraceevent dependent features. - Allow Python support in 'perf script' when libtraceevent isn't linked, as not all features requires it, for instance Intel PT does not use tracepoints. - Error if the python interpreter needed for jevents to work isn't available and NO_JEVENTS=1 isn't set, preventing a build without support for JSON vendor events, which is a rare but possible condition. The two check error messages: $(error ERROR: No python interpreter needed for jevents generation. Install python or build with NO_JEVENTS=1.) $(error ERROR: Python interpreter needed for jevents generation too old (older than 3.6). Install a newer python or build with NO_JEVENTS=1.) - Make libbpf 1.0 the minimum required when building with out of tree, distro provided libbpf. - Use libsdtc++'s and LLVM's libcxx's __cxa_demangle, a portable C++ demangler, add 'perf test' entry for it. - Make binutils libraries opt in, as distros disable building with it due to licensing, they were used for C++ demangling, for instance. - Switch libpfm4 to opt-out rather than opt-in, if libpfm-devel (or equivalent) isn't installed, we'll just have a build warning: Makefile.config:1144: libpfm4 not found, disables libpfm4 support. Please install libpfm4-dev - Add a feature test for scandirat(), that is not implemented so far in musl and uclibc, disabling features that need it, such as scanning for tracepoints in /sys/kernel/tracing/events. perf BPF filters: - New feature where BPF can be used to filter samples, for instance: $ sudo ./perf record -e cycles --filter 'period > 1000' true $ sudo ./perf script perf-exec 2273949 546850.708501: 5029 cycles: ffffffff826f9e25 finish_wait+0x5 ([kernel.kallsyms]) perf-exec 2273949 546850.708508: 32409 cycles: ffffffff826f9e25 finish_wait+0x5 ([kernel.kallsyms]) perf-exec 2273949 546850.708526: 143369 cycles: ffffffff82b4cdbf xas_start+0x5f ([kernel.kallsyms]) perf-exec 2273949 546850.708600: 372650 cycles: ffffffff8286b8f7 __pagevec_lru_add+0x117 ([kernel.kallsyms]) perf-exec 2273949 546850.708791: 482953 cycles: ffffffff829190de __mod_memcg_lruvec_state+0x4e ([kernel.kallsyms]) true 2273949 546850.709036: 501985 cycles: ffffffff828add7c tlb_gather_mmu+0x4c ([kernel.kallsyms]) true 2273949 546850.709292: 503065 cycles: 7f2446d97c03 _dl_map_object_deps+0x973 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2) - In addition to 'period' (PERF_SAMPLE_PERIOD), the other PERF_SAMPLE_ can be used for filtering, and also some other sample accessible values, from tools/perf/Documentation/perf-record.txt: Essentially the BPF filter expression is: (("," | "||") )* The can be one of: ip, id, tid, pid, cpu, time, addr, period, txn, weight, phys_addr, code_pgsz, data_pgsz, weight1, weight2, weight3, ins_lat, retire_lat, p_stage_cyc, mem_op, mem_lvl, mem_snoop, mem_remote, mem_lock, mem_dtlb, mem_blk, mem_hops The can be one of: ==, !=, >, >=, <, <=, & The can be one of: (for any term) na, load, store, pfetch, exec (for mem_op) l1, l2, l3, l4, cxl, io, any_cache, lfb, ram, pmem (for mem_lvl) na, none, hit, miss, hitm, fwd, peer (for mem_snoop) remote (for mem_remote) na, locked (for mem_locked) na, l1_hit, l1_miss, l2_hit, l2_miss, any_hit, any_miss, walk, fault (for mem_dtlb) na, by_data, by_addr (for mem_blk) hops0, hops1, hops2, hops3 (for mem_hops) perf lock contention: - Show lock type with address. - Track and show mmap_lock, siglock and per-cpu rq_lock with address. This is done for mmap_lock by following the current->mm pointer: $ sudo ./perf lock con -abl -- sleep 10 contended total wait max wait avg wait address symbol ... 16344 312.30 ms 2.22 ms 19.11 us ffff8cc702595640 17686 310.08 ms 1.49 ms 17.53 us ffff8cc7025952c0 3 84.14 ms 45.79 ms 28.05 ms ffff8cc78114c478 mmap_lock 3557 76.80 ms 68.75 us 21.59 us ffff8cc77ca3af58 1 68.27 ms 68.27 ms 68.27 ms ffff8cda745dfd70 9 54.53 ms 7.96 ms 6.06 ms ffff8cc7642a48b8 mmap_lock 14629 44.01 ms 60.00 us 3.01 us ffff8cc7625f9ca0 3481 42.63 ms 140.71 us 12.24 us ffffffff937906ac vmap_area_lock 16194 38.73 ms 42.15 us 2.39 us ffff8cd397cbc560 11 38.44 ms 10.39 ms 3.49 ms ffff8ccd6d12fbb8 mmap_lock 1 5.43 ms 5.43 ms 5.43 ms ffff8cd70018f0d8 1674 5.38 ms 422.93 us 3.21 us ffffffff92e06080 tasklist_lock 581 4.51 ms 130.68 us 7.75 us ffff8cc9b1259058 5 3.52 ms 1.27 ms 703.23 us ffff8cc754510070 112 3.47 ms 56.47 us 31.02 us ffff8ccee38b3120 381 3.31 ms 73.44 us 8.69 us ffffffff93790690 purge_vmap_area_lock 255 3.19 ms 36.35 us 12.49 us ffff8d053ce30c80 - Update default map size to 16384. - Allocate single letter option -M for --map-nr-entries, as it is proving being frequently used. - Fix struct rq lock access for older kernels with BPF's CO-RE (Compile once, run everywhere). - Fix problems found with MSAn. perf report/top: - Add inline information when using --call-graph=fp or lbr, as was already done to the --call-graph=dwarf callchain mode. - Improve the 'srcfile' sort key performance by really using an optimization introduced in 6.2 for the 'srcline' sort key that avoids calling addr2line for comparision with each sample. perf sched: - Make 'perf sched latency/map/replay' to use "sched:sched_waking" instead of "sched:sched_waking", consistent with 'perf record' since d566a9c2d482 ("perf sched: Prefer sched_waking event when it exists"). perf ftrace: - Make system wide the default target for latency subcommand, run the following command then generate some network traffic and press control+C: # perf ftrace latency -T __kfree_skb ^C DURATION | COUNT | GRAPH | 0 - 1 us | 27 | ############# | 1 - 2 us | 22 | ########### | 2 - 4 us | 8 | #### | 4 - 8 us | 5 | ## | 8 - 16 us | 24 | ############ | 16 - 32 us | 2 | # | 32 - 64 us | 1 | | 64 - 128 us | 0 | | 128 - 256 us | 0 | | 256 - 512 us | 0 | | 512 - 1024 us | 0 | | 1 - 2 ms | 0 | | 2 - 4 ms | 0 | | 4 - 8 ms | 0 | | 8 - 16 ms | 0 | | 16 - 32 ms | 0 | | 32 - 64 ms | 0 | | 64 - 128 ms | 0 | | 128 - 256 ms | 0 | | 256 - 512 ms | 0 | | 512 - 1024 ms | 0 | | 1 - ... s | 0 | | # perf top: - Add --branch-history (LBR: Last Branch Record) option, just like already available for 'perf record'. - Fix segfault in thread__comm_len() where thread->comm was being used outside thread->comm_lock. perf annotate: - Allow configuring objdump and addr2line in ~/.perfconfig., so that you can use alternative binaries, such as llvm's. perf kvm: - Add TUI mode for 'perf kvm stat report'. Reference counting: - Add reference count checking infrastructure to check for use after free, done to the 'cpumap', 'namespaces', 'maps' and 'map' structs, more to come. To build with it use -DREFCNT_CHECKING=1 in the make command line to build tools/perf. Documented at: https://perf.wiki.kernel.org/index.php/Reference_Count_Checking - The above caught, for instance, fix, present in this series: - Fix maps use after put in 'perf test "Share thread maps"': 'maps' is copied from leader, but the leader is put on line 79 and then 'maps' is used to read the reference count below - so a use after put, with the put of maps happening within thread__put. Fixed by reversing the order of puts so that the leader is put last. - Also several fixes were made to places where reference counts were not being held. - Make this one of the tests in 'make -C tools/perf build-test' to regularly build test it and to make sure no direct access to the reference counted structs are made, doing that via accessors to check the validity of the struct pointer. ARM64: - Fix 'perf report' segfault when filtering coresight traces by sparse lists of CPUs. - Add support for 'simd' as a sort field for 'perf report', to show ARM's NEON SIMD's predicate flags: "partial" and "empty". arm64 vendor events: - Add N1 metrics. Intel vendor events: - Add graniterapids, grandridge and sierraforrest events. - Refresh events for: alderlake, aldernaken, broadwell, broadwellde, broadwellx, cascadelakx, haswell, haswellx, icelake, icelakex, jaketown, meteorlake, knightslanding, sandybridge, sapphirerapids, silvermont, skylake, tigerlake and westmereep-dp - Refresh metrics for alderlake-n, broadwell, broadwellde, broadwellx, haswell, haswellx, icelakex, ivybridge, ivytown and skylakex. perf stat: - Implement --topdown using JSON metrics. - Add TopdownL1 JSON metric as a default if present, but disable it for now for some Intel hybrid architectures, a series of patches addressing this is being reviewed and will be submitted for v6.5. - Use metrics for --smi-cost. - Update topdown documentation. Vendor events (JSON) infrastructure: - Add support for computing and printing metric threshold values. For instance, here is one found in thesapphirerapids json file: { "BriefDescription": "Percentage of cycles spent in System Management Interrupts.", "MetricExpr": "((msr@aperf@ - cycles) / msr@aperf@ if msr@smi@ > 0 else 0)", "MetricGroup": "smi", "MetricName": "smi_cycles", "MetricThreshold": "smi_cycles > 0.1", "ScaleUnit": "100%" }, - Test parsing metric thresholds with the fake PMU in 'perf test pmu-events'. - Support for printing metric thresholds in 'perf list'. - Add --metric-no-threshold option to 'perf stat'. - Add rand (reverse and) and has_pmem (optane memory) support to metrics. - Sort list of input files to avoid depending on the order from readdir() helping in obtaining reproducible builds. S/390: - Add common metrics: - CPI (cycles per instruction), prbstate (ratio of instructions executed in problem state compared to total number of instructions), l1mp (Level one instruction and data cache misses per 100 instructions). - Add cache metrics for z13, z14, z15 and z16. - Add metric for TLB and cache. ARM: - Add raw decoding for SPE (Statistical Profiling Extension) v1.3 MTE (Memory Tagging Extension) and MOPS (Memory Operations) load/store. Intel PT hardware tracing: - Add event type names UINTR (User interrupt delivered) and UIRET (Exiting from user interrupt routine), documented in table 32-50 "CFE Packet Type and Vector Fields Details" in the Intel Processor Trace chapter of The Intel SDM Volume 3 version 078. - Add support for new branch instructions ERETS and ERETU. - Fix CYC timestamps after standalone CBR ARM CoreSight hardware tracing: - Allow user to override timestamp and contextid settings. - Fix segfault in dso lookup. - Fix timeless decode mode detection. - Add separate decode paths for timeless and per-thread modes. auxtrace: - Fix address filter entire kernel size. Miscellaneous: - Fix use-after-free and unaligned bugs in the PLT handling routines. - Use zfree() to reduce chances of use after free. - Add missing 0x prefix for addresses printed in hexadecimal in 'perf probe'. - Suppress massive unsupported target platform errors in the unwind code. - Fix return incorrect build_id size in elf_read_build_id(). - Fix 'perf scripts intel-pt-events.py' IPC output for Python 2 . - Add missing new parameter in kfree_skb tracepoint to the python scripts using it. - Add 'perf bench syscall fork' benchmark. - Add support for printing PERF_MEM_LVLNUM_UNC (Uncached access) in 'perf mem'. - Fix wrong size expectation for perf test 'Setup struct perf_event_attr' caused by the patch adding perf_event_attr::config3. - Fix some spelling mistakes" * tag 'perf-tools-for-v6.4-3-2023-05-06' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (365 commits) Revert "perf build: Make BUILD_BPF_SKEL default, rename to NO_BPF_SKEL" Revert "perf build: Warn for BPF skeletons if endian mismatches" perf metrics: Fix SEGV with --for-each-cgroup perf bpf skels: Stop using vmlinux.h generated from BTF, use subset of used structs + CO-RE perf stat: Separate bperf from bpf_profiler perf test record+probe_libc_inet_pton: Fix call chain match on x86_64 perf test record+probe_libc_inet_pton: Fix call chain match on s390 perf tracepoint: Fix memory leak in is_valid_tracepoint() perf cs-etm: Add fix for coresight trace for any range of CPUs perf build: Fix unescaped # in perf build-test perf unwind: Suppress massive unsupported target platform errors perf script: Add new parameter in kfree_skb tracepoint to the python scripts using it perf script: Print raw ip instead of binary offset for callchain perf symbols: Fix return incorrect build_id size in elf_read_build_id() perf list: Modify the warning message about scandirat(3) perf list: Fix memory leaks in print_tracepoint_events() perf lock contention: Rework offset calculation with BPF CO-RE perf lock contention: Fix struct rq lock access perf stat: Disable TopdownL1 on hybrid perf stat: Avoid SEGV on counter->name ... commit 17784de648be93b4eef0ef8fe28a16ff04feecc7 Merge: 6f69c981811c8 0af462f19e635 Author: Linus Torvalds Date: Sun May 7 11:04:26 2023 -0700 Merge tag 'core-debugobjects-2023-05-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull debugobjects fix from Thomas Gleixner: "A single fix for debugobjects: The recent fix to ensure atomicity of lookup and allocation inadvertently broke the pool refill mechanism, so that debugobject OOMs now in certain situations. The reason is that the functions which got updated no longer invoke debug_objecs_init(), which is now the only place to care about refilling the tracking object pool. Restore the original behaviour by adding explicit refill opportunities to those places" * tag 'core-debugobjects-2023-05-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobject: Ensure pool refill (again) commit 6f69c981811c8b019d7882839e31c34ea8330860 Merge: 63342b1dd5f88 b8969a1b69672 Author: Linus Torvalds Date: Sun May 7 10:57:14 2023 -0700 Merge tag 'v6.4-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: - A long-standing bug in crypto_engine - A buggy but harmless check in the sun8i-ss driver - A regression in the CRYPTO_USER interface * tag 'v6.4-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: api - Fix CRYPTO_USER checks for report function crypto: engine - fix crypto_queue backlog handling crypto: sun8i-ss - Fix a test in sun8i_ss_setup_ivs() commit 63342b1dd5f884d97b41b0cd04fae01a69e0a762 Merge: d6b8a8c49ad6a 9ee04875ae734 Author: Linus Torvalds Date: Sun May 7 10:46:21 2023 -0700 Merge tag '6.4-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "smb3 client fixes, mostly DFS or reconnect related: - Two DFS connection sharing fixes - DFS refresh fix - Reconnect fix - Two potential use after free fixes - Also print prefix patch in mount debug msg - Two small cleanup fixes" * tag '6.4-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6: cifs: Remove unneeded semicolon cifs: fix sharing of DFS connections cifs: avoid potential races when handling multiple dfs tcons cifs: protect access of TCP_Server_Info::{origin,leaf}_fullpath cifs: fix potential race when tree connecting ipc cifs: fix potential use-after-free bugs in TCP_Server_Info::hostname cifs: print smb3_fs_context::source when mounting cifs: protect session status check in smb2_reconnect() SMB3.1.1: correct definition for app_instance_id create contexts commit d6b8a8c49ad6afce23c2c65a3cda0a0ccd3eaf61 Merge: 1c1094e47ef10 31c6ed4e89187 Author: Linus Torvalds Date: Sun May 7 10:31:45 2023 -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 couple more patches that would be good to get into -rc1: - Revert an i.MX patch that's causing video failures because division math goes sideways - Fix a clang + W=1 build isue where FIELD_PREP() is taking a 32-bit variable instead of the usual u64 type - Fix a Kconfig bug in the StarFive JH7110 clk config that selects a reset controller when it can't be selected" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case clk: sp7021: Adjust width of _m in HWM_FIELD_PREP() Revert "clk: imx: composite-8m: Add support to determine_rate" commit 1c1094e47ef10be267a982fb1c69dbb80aa4f257 Merge: 03e5cb7b50feb d396133dced4c Author: Linus Torvalds Date: Sun May 7 10:17:33 2023 -0700 Merge tag 'mailbox-v6.4' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: - mailbox api: allow direct registration to a channel and convert omap and pcc to use mbox_bind_client - omap and hi6220 : use of_property_read_bool - test: fix double-free and use spinlock header - rockchip and bcm-pdc: drop of_match_ptr - mpfs: change config symbol - mediatek gce: support MT6795 - qcom apcs: consolidate of_device_id and support IPQ9574 * tag 'mailbox-v6.4' of git://git.linaro.org/landing-teams/working/fujitsu/integration: dt-bindings: mailbox: qcom: add compatible for IPQ9574 SoC mailbox: qcom-apcs-ipc: do not grow the of_device_id dt-bindings: mailbox: qcom,apcs-kpss-global: use fallbacks for few variants dt-bindings: mailbox: mediatek,gce-mailbox: Add support for MT6795 mailbox: mpfs: convert SOC_MICROCHIP_POLARFIRE to ARCH_MICROCHIP_POLARFIRE mailbox: bcm-pdc: drop of_match_ptr for ID table mailbox: rockchip: drop of_match_ptr for ID table mailbox: mailbox-test: Fix potential double-free in mbox_test_message_write() mailbox: mailbox-test: Explicitly include header for spinlock support mailbox: Use of_property_read_bool() for boolean properties mailbox: pcc: Use mbox_bind_client mailbox: omap: Use mbox_bind_client mailbox: Allow direct registration to a channel commit 03e5cb7b50feb687508946a702febaba24c77f0b Merge: fc4354c6e5c21 d2b7fa6174bc4 Author: Linus Torvalds Date: Sun May 7 10:00:09 2023 -0700 Merge tag 'for-6.4/io_uring-2023-05-07' of git://git.kernel.dk/linux Pull more io_uring updates from Jens Axboe: "Nothing major in here, just two different parts: - A small series from Breno that enables passing the full SQE down for ->uring_cmd(). This is a prerequisite for enabling full network socket operations. Queued up a bit late because of some stylistic concerns that got resolved, would be nice to have this in 6.4-rc1 so the dependent work will be easier to handle for 6.5. - Fix for the huge page coalescing, which was a regression introduced in the 6.3 kernel release (Tobias)" * tag 'for-6.4/io_uring-2023-05-07' of git://git.kernel.dk/linux: io_uring: Remove unnecessary BUILD_BUG_ON io_uring: Pass whole sqe to commands io_uring: Create a helper to return the SQE size io_uring/rsrc: check for nonconsecutive pages commit 27c1eaa07283b0c94becf8241f95368267cf558b Author: Christophe JAILLET Date: Fri May 5 20:39:33 2023 +0200 net: mdio: mvusb: Fix an error handling path in mvusb_mdio_probe() Should of_mdiobus_register() fail, a previous usb_get_dev() call should be undone as in the .disconnect function. Fixes: 04e37d92fbed ("net: phy: add marvell usb to mdio controller") Signed-off-by: Christophe JAILLET Reviewed-by: Simon Horman Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 424f8416bb39936df6365442d651ee729b283460 Author: Eric Dumazet Date: Fri May 5 17:06:18 2023 +0000 net: skb_partial_csum_set() fix against transport header magic value skb->transport_header uses the special 0xFFFF value to mark if the transport header was set or not. We must prevent callers to accidentaly set skb->transport_header to 0xFFFF. Note that only fuzzers can possibly do this today. syzbot reported: WARNING: CPU: 0 PID: 2340 at include/linux/skbuff.h:2847 skb_transport_offset include/linux/skbuff.h:2956 [inline] WARNING: CPU: 0 PID: 2340 at include/linux/skbuff.h:2847 virtio_net_hdr_to_skb+0xbcc/0x10c0 include/linux/virtio_net.h:103 Modules linked in: CPU: 0 PID: 2340 Comm: syz-executor.0 Not tainted 6.3.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 RIP: 0010:skb_transport_header include/linux/skbuff.h:2847 [inline] RIP: 0010:skb_transport_offset include/linux/skbuff.h:2956 [inline] RIP: 0010:virtio_net_hdr_to_skb+0xbcc/0x10c0 include/linux/virtio_net.h:103 Code: 41 39 df 0f 82 c3 04 00 00 48 8b 7c 24 10 44 89 e6 e8 08 6e 59 ff 48 85 c0 74 54 e8 ce 36 7e fc e9 37 f8 ff ff e8 c4 36 7e fc <0f> 0b e9 93 f8 ff ff 44 89 f7 44 89 e6 e8 32 38 7e fc 45 39 e6 0f RSP: 0018:ffffc90004497880 EFLAGS: 00010293 RAX: ffffffff84fea55c RBX: 000000000000ffff RCX: ffff888120be2100 RDX: 0000000000000000 RSI: 000000000000ffff RDI: 000000000000ffff RBP: ffffc90004497990 R08: ffffffff84fe9de5 R09: 0000000000000034 R10: ffffea00048ebd80 R11: 0000000000000034 R12: ffff88811dc2d9c8 R13: dffffc0000000000 R14: ffff88811dc2d9ae R15: 1ffff11023b85b35 FS: 00007f9211a59700(0000) GS:ffff8881f6c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000200002c0 CR3: 00000001215a5000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: packet_snd net/packet/af_packet.c:3076 [inline] packet_sendmsg+0x4590/0x61a0 net/packet/af_packet.c:3115 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] __sys_sendto+0x472/0x630 net/socket.c:2144 __do_sys_sendto net/socket.c:2156 [inline] __se_sys_sendto net/socket.c:2152 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:2152 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2f/0x50 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f9210c8c169 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f9211a59168 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f9210dabf80 RCX: 00007f9210c8c169 RDX: 000000000000ffed RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00007f9210ce7ca1 R08: 0000000020000540 R09: 0000000000000014 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe135d65cf R14: 00007f9211a59300 R15: 0000000000022000 Fixes: 66e4c8d95008 ("net: warn if transport header was not set") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Willem de Bruijn Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 9a2d5178b9d51e1c5f9e08989ff97fc8d4893f31 Author: Arnaldo Carvalho de Melo Date: Sat May 6 18:07:37 2023 -0300 Revert "perf build: Make BUILD_BPF_SKEL default, rename to NO_BPF_SKEL" This reverts commit a980755beb5aca9002e1c95ba519b83a44242b5b. We need to better polish building with BPF skels, so revert back to making it an experimental feature that has to be explicitely enabled using BUILD_BPF_SKEL=1. Signed-off-by: Arnaldo Carvalho de Melo commit c3e6df97fa25ff310c3d5e7f1644248e072e3cb0 Author: Arnaldo Carvalho de Melo Date: Sat May 6 18:06:43 2023 -0300 Revert "perf build: Warn for BPF skeletons if endian mismatches" This reverts commit 51924ae69eea5bc90b5da525fbcf4bbd5f8551b3. We need to better polish building with BPF skels, so revert back to making it an experimental feature that has to be explicitely enabled using BUILD_BPF_SKEL=1. Signed-off-by: Arnaldo Carvalho de Melo commit fc4354c6e5c21257cf4a50b32f7c11c7d65c55b3 Merge: 706ce3caea1cc da9619a30e73b Author: Linus Torvalds Date: Sat May 6 11:43:08 2023 -0700 Merge tag 'mm-stable-2023-05-06-10-49' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull dmapool updates - again - from Andrew Morton: "Reinstate the dmapool changes which were accidentally removed by a mishap on the last commit in the previous attempt at the series" Fixes: 2d55c16c0c54 ("dmapool: create/destroy cleanup"). [ The whole old series: def8574308ed..2d55c16c0c54 results in an empty diff because that last commit ended up being just a revert of all that came everything before it. - Linus ] * tag 'mm-stable-2023-05-06-10-49' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: dmapool: link blocks across pages dmapool: don't memset on free twice dmapool: simplify freeing dmapool: consolidate page initialization dmapool: rearrange page alloc failure handling dmapool: move debug code to own functions dmapool: speedup DMAPOOL_DEBUG with init_on_alloc dmapool: cleanup integer types dmapool: use sysfs_emit() instead of scnprintf() dmapool: remove checks for dev == NULL commit 706ce3caea1cc1dab8c7fd6e7d1389b46ad1570e Merge: 994e2419f1e77 58f5f6698a72a Author: Linus Torvalds Date: Sat May 6 11:25:03 2023 -0700 Merge tag 'mm-hotfixes-stable-2023-05-06-10-45' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull hotfixes from Andrew Morton: "Five hotfixes. Three are cc:stable, two pertain to merge window changes" * tag 'mm-hotfixes-stable-2023-05-06-10-45' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: afs: fix the afs_dir_get_folio return value nilfs2: do not write dirty data after degenerating to read-only mm: do not reclaim private data from pinned page nilfs2: fix infinite loop in nilfs_mdt_get_block() mm/mmap/vma_merge: always check invariants commit da9619a30e73b59605ed998bf7bc4359f5c0029a Author: Keith Busch Date: Thu Jan 26 13:51:24 2023 -0800 dmapool: link blocks across pages The allocated dmapool pages are never freed for the lifetime of the pool. There is no need for the two level list+stack lookup for finding a free block since nothing is ever removed from the list. Just use a simple stack, reducing time complexity to constant. The implementation inserts the stack linking elements and the dma handle of the block within itself when freed. This means the smallest possible dmapool block is increased to at most 16 bytes to accommodate these fields, but there are no exisiting users requesting a dma pool smaller than that anyway. Removing the list has a significant change in performance. Using the kernel's micro-benchmarking self test: Before: # modprobe dmapool_test dmapool test: size:16 blocks:8192 time:57282 dmapool test: size:64 blocks:8192 time:172562 dmapool test: size:256 blocks:8192 time:789247 dmapool test: size:1024 blocks:2048 time:371823 dmapool test: size:4096 blocks:1024 time:362237 After: # modprobe dmapool_test dmapool test: size:16 blocks:8192 time:24997 dmapool test: size:64 blocks:8192 time:26584 dmapool test: size:256 blocks:8192 time:33542 dmapool test: size:1024 blocks:2048 time:9022 dmapool test: size:4096 blocks:1024 time:6045 The module test allocates quite a few blocks that may not accurately represent how these pools are used in real life. For a more marco level benchmark, running fio high-depth + high-batched on nvme, this patch shows submission and completion latency reduced by ~100usec each, 1% IOPs improvement, and perf record's time spent in dma_pool_alloc/free were reduced by half. [kbusch@kernel.org: push new blocks in ascending order] Link: https://lkml.kernel.org/r/20230221165400.1595247-1-kbusch@meta.com Link: https://lkml.kernel.org/r/20230126215125.4069751-12-kbusch@meta.com Fixes: 2d55c16c0c54 ("dmapool: create/destroy cleanup") Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Tested-by: Bryan O'Donoghue Cc: Matthew Wilcox Cc: Tony Battersby Signed-off-by: Andrew Morton commit 8ecc369554219060367fc589661d2b7ab201e923 Author: Keith Busch Date: Thu Jan 26 13:51:23 2023 -0800 dmapool: don't memset on free twice If debug is enabled, dmapool will poison the range, so no need to clear it to 0 immediately before writing over it. Link: https://lkml.kernel.org/r/20230126215125.4069751-11-kbusch@meta.com Fixes: 2d55c16c0c54 ("dmapool: create/destroy cleanup") Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Cc: Tony Battersby Signed-off-by: Andrew Morton commit cc669954ab38866c1aba73c27e17bb07bcb4a194 Author: Keith Busch Date: Thu Jan 26 13:51:22 2023 -0800 dmapool: simplify freeing The actions for busy and not busy are mostly the same, so combine these and remove the unnecessary function. Also, the pool is about to be freed so there's no need to poison the page data since we only check for poison on alloc, which can't be done on a freed pool. Link: https://lkml.kernel.org/r/20230126215125.4069751-10-kbusch@meta.com Fixes: 2d55c16c0c54 ("dmapool: create/destroy cleanup") Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Cc: Tony Battersby Signed-off-by: Andrew Morton commit f0bccea6bc0caa0db9c68d28123f242a6295c5dd Author: Keith Busch Date: Thu Jan 26 13:51:21 2023 -0800 dmapool: consolidate page initialization Various fields of the dma pool are set in different places. Move it all to one function. Link: https://lkml.kernel.org/r/20230126215125.4069751-9-kbusch@meta.com Fixes: 2d55c16c0c54 ("dmapool: create/destroy cleanup") Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Cc: Tony Battersby Signed-off-by: Andrew Morton commit 5407df10e5754b80d43697a75484bacda048fef8 Author: Keith Busch Date: Thu Jan 26 13:51:20 2023 -0800 dmapool: rearrange page alloc failure handling Handle the error in a condition so the good path can be in the normal flow. Link: https://lkml.kernel.org/r/20230126215125.4069751-8-kbusch@meta.com Fixes: 2d55c16c0c54 ("dmapool: create/destroy cleanup") Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Cc: Tony Battersby Signed-off-by: Andrew Morton commit d93e08b7556fcd393b7fd1eb421cb44e5fae314c Author: Keith Busch Date: Thu Jan 26 13:51:19 2023 -0800 dmapool: move debug code to own functions Clean up the normal path by moving the debug code outside it. Link: https://lkml.kernel.org/r/20230126215125.4069751-7-kbusch@meta.com Fixes: 2d55c16c0c54 ("dmapool: create/destroy cleanup") Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Cc: Tony Battersby Signed-off-by: Andrew Morton commit 290911c56f98ac7af9354108f3d16da5d6c5189c Author: Tony Battersby Date: Thu Jan 26 13:51:18 2023 -0800 dmapool: speedup DMAPOOL_DEBUG with init_on_alloc Avoid double-memset of the same allocated memory in dma_pool_alloc() when both DMAPOOL_DEBUG is enabled and init_on_alloc=1. Link: https://lkml.kernel.org/r/20230126215125.4069751-6-kbusch@meta.com Fixes: 2d55c16c0c54 ("dmapool: create/destroy cleanup") Signed-off-by: Tony Battersby Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 790233528d338f1467662761cf1e871086483ab8 Author: Tony Battersby Date: Thu Jan 26 13:51:17 2023 -0800 dmapool: cleanup integer types To represent the size of a single allocation, dmapool currently uses 'unsigned int' in some places and 'size_t' in other places. Standardize on 'unsigned int' to reduce overhead, but use 'size_t' when counting all the blocks in the entire pool. Link: https://lkml.kernel.org/r/20230126215125.4069751-5-kbusch@meta.com Fixes: 2d55c16c0c54 ("dmapool: create/destroy cleanup") Signed-off-by: Tony Battersby Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 08cc96c894848bcd1d15a79b15c56a8bb4f07ff5 Author: Tony Battersby Date: Thu Jan 26 13:51:16 2023 -0800 dmapool: use sysfs_emit() instead of scnprintf() Use sysfs_emit instead of scnprintf, snprintf or sprintf. Link: https://lkml.kernel.org/r/20230126215125.4069751-4-kbusch@meta.com Fixes: 2d55c16c0c54 ("dmapool: create/destroy cleanup") Signed-off-by: Tony Battersby Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 67a540c60c39d052d9599aa9909023152200a707 Author: Tony Battersby Date: Thu Jan 26 13:51:15 2023 -0800 dmapool: remove checks for dev == NULL dmapool originally tried to support pools without a device because dma_alloc_coherent() supports allocations without a device. But nobody ended up using dma pools without a device, and trying to do so will result in an oops. So remove the checks for pool->dev == NULL since they are unneeded bloat. [kbusch@kernel.org: add check for null dev on create] Link: https://lkml.kernel.org/r/20230126215125.4069751-3-kbusch@meta.com Fixes: 2d55c16c0c54 ("dmapool: create/destroy cleanup") Signed-off-by: Tony Battersby Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 994e2419f1e77724479f0ffd5ad4eeae060dec95 Author: Linus Torvalds Date: Sat May 6 10:16:19 2023 -0700 nfs: fix mis-merged __filemap_get_folio() error check Fix another case of an incorrect check for the returned 'folio' value from __filemap_get_folio(). The failure case used to return NULL, but was changed by commit 66dabbb65d67 ("mm: return an ERR_PTR from __filemap_get_folio"). But in the meantime, commit ec108d3cc766 ("NFS: Convert readdir page array functions to use a folio") added a new user of that function. And my merge of the two did not fix this up correctly. The ext4 merge had the same issue, but that one had been caught in linux-next and got properly fixed while merging. Fixes: 0127f25b5dfc ("Merge tag 'nfs-for-6.4-1' of git://git.linux-nfs.org/projects/anna/linux-nfs") Cc: Anna Schumaker Cc: Matthew Wilcox Cc: Christoph Hellwig Signed-off-by: Linus Torvalds commit 58f5f6698a72a8af5d7bfc5f49b6df60f378f167 Author: Christoph Hellwig Date: Wed May 3 17:45:26 2023 +0200 afs: fix the afs_dir_get_folio return value Keep returning NULL on failure instead of letting an ERR_PTR escape to callers that don't expect it. Link: https://lkml.kernel.org/r/20230503154526.1223095-2-hch@lst.de Fixes: 66dabbb65d67 ("mm: return an ERR_PTR from __filemap_get_folio") Signed-off-by: Christoph Hellwig Reported-by: Jan Kara Reviewed-by: Jan Kara Reviewed-by: David Howells Tested-by: David Howells Cc: Marc Dionne Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 28a65b49eb53e172d23567005465019658bfdb4d Author: Ryusuke Konishi Date: Thu Apr 27 10:15:26 2023 +0900 nilfs2: do not write dirty data after degenerating to read-only According to syzbot's report, mark_buffer_dirty() called from nilfs_segctor_do_construct() outputs a warning with some patterns after nilfs2 detects metadata corruption and degrades to read-only mode. After such read-only degeneration, page cache data may be cleared through nilfs_clear_dirty_page() which may also clear the uptodate flag for their buffer heads. However, even after the degeneration, log writes are still performed by unmount processing etc., which causes mark_buffer_dirty() to be called for buffer heads without the "uptodate" flag and causes the warning. Since any writes should not be done to a read-only file system in the first place, this fixes the warning in mark_buffer_dirty() by letting nilfs_segctor_do_construct() abort early if in read-only mode. This also changes the retry check of nilfs_segctor_write_out() to avoid unnecessary log write retries if it detects -EROFS that nilfs_segctor_do_construct() returned. Link: https://lkml.kernel.org/r/20230427011526.13457-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Tested-by: Ryusuke Konishi Reported-by: syzbot+2af3bc9585be7f23f290@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=2af3bc9585be7f23f290 Cc: Signed-off-by: Andrew Morton commit d824ec2a154677f63c56cc71ffe4578274f6e32e Author: Jan Kara Date: Fri Apr 28 14:41:40 2023 +0200 mm: do not reclaim private data from pinned page If the page is pinned, there's no point in trying to reclaim it. Furthermore if the page is from the page cache we don't want to reclaim fs-private data from the page because the pinning process may be writing to the page at any time and reclaiming fs private info on a dirty page can upset the filesystem (see link below). Link: https://lore.kernel.org/linux-mm/20180103100430.GE4911@quack2.suse.cz Link: https://lkml.kernel.org/r/20230428124140.30166-1-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Lorenzo Stoakes Reviewed-by: Christoph Hellwig Reviewed-by: John Hubbard Acked-by: David Hildenbrand Acked-by: Peter Xu Cc: Signed-off-by: Andrew Morton commit a6a491c048882e7e424d407d32cba0b52d9ef2bf Author: Ryusuke Konishi Date: Mon May 1 04:30:46 2023 +0900 nilfs2: fix infinite loop in nilfs_mdt_get_block() If the disk image that nilfs2 mounts is corrupted and a virtual block address obtained by block lookup for a metadata file is invalid, nilfs_bmap_lookup_at_level() may return the same internal return code as -ENOENT, meaning the block does not exist in the metadata file. This duplication of return codes confuses nilfs_mdt_get_block(), causing it to read and create a metadata block indefinitely. In particular, if this happens to the inode metadata file, ifile, semaphore i_rwsem can be left held, causing task hangs in lock_mount. Fix this issue by making nilfs_bmap_lookup_at_level() treat virtual block address translation failures with -ENOENT as metadata corruption instead of returning the error code. Link: https://lkml.kernel.org/r/20230430193046.6769-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Tested-by: Ryusuke Konishi Reported-by: syzbot+221d75710bde87fa0e97@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=221d75710bde87fa0e97 Cc: Signed-off-by: Andrew Morton commit 29417d292bd0fa174d20360326abaf6444a23c3b Author: Lorenzo Stoakes Date: Sun Apr 30 21:19:17 2023 +0100 mm/mmap/vma_merge: always check invariants We may still have inconsistent input parameters even if we choose not to merge and the vma_merge() invariant checks are useful for checking this with no production runtime cost (these are only relevant when CONFIG_DEBUG_VM is specified). Therefore, perform these checks regardless of whether we merge. This is relevant, as a recent issue (addressed in commit "mm/mempolicy: Correctly update prev when policy is equal on mbind") in the mbind logic was only picked up in the 6.2.y stable branch where these assertions are performed prior to determining mergeability. Had this remained the same in mainline this issue may have been picked up faster, so moving forward let's always check them. Link: https://lkml.kernel.org/r/df548a6ae3fa135eec3b446eb3dae8eb4227da97.1682885809.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Acked-by: Vlastimil Babka Reviewed-by: David Hildenbrand Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 38a55db9877cae9aa9cc53bb0464b7434fb03e75 Author: Matthew Wilcox Date: Sat May 6 17:04:14 2023 +0100 filemap: Handle error return from __filemap_get_folio() Smatch reports that filemap_fault() was missed in the conversion of __filemap_get_folio() error returns from NULL to ERR_PTR. Fixes: 66dabbb65d67 ("mm: return an ERR_PTR from __filemap_get_folio") Reported-by: Dan Carpenter Reported-by: syzbot+48011b86c8ea329af1b9@syzkaller.appspotmail.com Reported-by: Christoph Hellwig Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Linus Torvalds commit dd9e11d6477a52ede9ebe575c83285e79e823889 Merge: a3b111b046f6c c5749639f2d0a Author: Linus Torvalds Date: Sat May 6 08:37:28 2023 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull more SCSI updates from James Bottomley: "Six late arriving patches for the merge window. Five are minor assorted fixes and updates. The IPR driver change removes SATA support, which will now allow a major cleanup in the ATA subsystem because it was the only driver still using the old attachment mechanism. The driver is only used on power systems and SATA was used to support a DVD device, which has long been moved to a different hba. IBM chose this route instead of porting ipr to the newer SATA interfaces" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: qedi: Fix use after free bug in qedi_remove() scsi: ufs: core: mcq: Fix &hwq->cq_lock deadlock issue scsi: ipr: Remove several unused variables scsi: pm80xx: Log device registration scsi: ipr: Remove SATA support scsi: scsi_debug: Abort commands from scsi_debug_device_reset() commit a3b111b046f6ce5dff168af203daf2f46f3afb29 Merge: 7644c82319872 c0b79b0ff53be Author: Linus Torvalds Date: Sat May 6 08:28:58 2023 -0700 Merge tag 'for-6.4/block-2023-05-06' of git://git.kernel.dk/linux Pull more block updates from Jens Axboe: - MD pull request via Song: - Improve raid5 sequential IO performance on spinning disks, which fixes a regression since v6.0 (Jan Kara) - Fix bitmap offset types, which fixes an issue introduced in this merge window (Jonathan Derrick) - Cleanup of hweight type used for cgroup writeback (Maxim) - Fix a regression with the "has_submit_bio" changes across partitions (Ming) - Cleanup of QUEUE_FLAG_ADD_RANDOM clearing. We used to set this flag on queues non blk-mq queues, and hence some drivers clear it unconditionally. Since all of these have since been converted to true blk-mq drivers, drop the useless clear as the bit is not set (Chaitanya) - Fix the flags being set in a bio for a flush for drbd (Christoph) - Cleanup and deduplication of the code handling setting block device capacity (Damien) - Fix for ublk handling IO timeouts (Ming) - Fix for a regression in blk-cgroup teardown (Tao) - NBD documentation and code fixes (Eric) - Convert blk-integrity to using device_attributes rather than a second kobject to manage lifetimes (Thomas) * tag 'for-6.4/block-2023-05-06' of git://git.kernel.dk/linux: ublk: add timeout handler drbd: correctly submit flush bio on barrier mailmap: add mailmap entries for Jens Axboe block: Skip destroyed blkg when restart in blkg_destroy_all() writeback: fix call of incorrect macro md: Fix bitmap offset type in sb writer md/raid5: Improve performance for sequential IO docs nbd: userspace NBD now favors github over sourceforge block nbd: use req.cookie instead of req.handle uapi nbd: add cookie alias to handle uapi nbd: improve doc links to userspace spec blk-integrity: register sysfs attributes on struct device blk-integrity: convert to struct device_attribute blk-integrity: use sysfs_emit block/drivers: remove dead clear of random flag block: sync part's ->bd_has_submit_bio with disk's block: Cleanup set_capacity()/bdev_set_nr_sectors() commit 7644c8231987288e7aae378d2ff3c56a980d1988 Merge: 0021b532b2fdd afed6271f5b0d Author: Linus Torvalds Date: Sat May 6 08:15:20 2023 -0700 Merge tag 'pipe-nonblock-2023-05-06' of git://git.kernel.dk/linux Pull nonblocking pipe io_uring support from Jens Axboe: "Here's the revised edition of the FMODE_NOWAIT support for pipes, in which we just flag it as such supporting FMODE_NOWAIT unconditionally, but clear it if we ever end up using splice/vmsplice on the pipe. The pipe read/write side is perfectly fine for nonblocking IO, however splice and vmsplice can potentially wait for IO with the pipe lock held" * tag 'pipe-nonblock-2023-05-06' of git://git.kernel.dk/linux: pipe: set FMODE_NOWAIT on pipes splice: clear FMODE_NOWAIT on file if splice/vmsplice is used commit 0021b532b2fdd6b82cf3ff758191f00d8edd235d Merge: 27e0c8461c0aa ee2dd70347024 Author: Linus Torvalds Date: Sat May 6 08:07:11 2023 -0700 Merge tag 'sound-fix-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes for rc1. The only (LOC-wise) dominant change was ASoC Qualcomm fix, but most of it was merely a code shuffling. Another significant change here is for ALSA PCM core; it received a revert and a series of fixes for PCM auto-silencing where it caused a regression in the previous PR for rc1. Others are all small: ASoC Intel fixes, various quirks for ASoC AMD, HD-audio and USB-audio, the continued legacy emu10k1 code cleanup, and some documentation updates" * tag 'sound-fix-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (23 commits) ALSA: pcm: use exit controlled loop in snd_pcm_playback_silence() ALSA: pcm: simplify top-up mode init in snd_pcm_playback_silence() ALSA: pcm: playback silence - move silence variable updates to separate function ALSA: pcm: playback silence - remove extra code ALSA: pcm: fix playback silence - correct incremental silencing ALSA: pcm: fix playback silence - use the actual new_hw_ptr for the threshold mode ALSA: pcm: Revert "ALSA: pcm: rewrite snd_pcm_playback_silence()" ALSA: hda/realtek: Fix mute and micmute LEDs for an HP laptop ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init` ALSA: usb-audio: Add quirk for Pioneer DDJ-800 ALSA: hda/realtek: support HP Pavilion Aero 13-be0xxx Mute LED ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet ASoC: amd: yc: Add Asus VivoBook Pro 14 OLED M6400RC to the quirks list for acp6x ASoC: codecs: wcd938x: fix accessing regmap on unattached devices ALSA: docs: Fix code block indentation in ALSA driver example ALSA: docs: Extend module parameters description ALSA: hda/realtek: Add quirk for ASUS UM3402YAR using CS35L41 ALSA: emu10k1: use more existing defines instead of open-coded numbers ASoC: amd: yc: Add ASUS M3402RA into DMI table ALSA: hda/realtek: Add quirk for ThinkPad P1 Gen 6 ... commit 27e0c8461c0aa2454d236924421e1c078cb77f21 Merge: 2e1e1337881b0 3302212f0384a Author: Linus Torvalds Date: Sat May 6 08:06:09 2023 -0700 Merge tag 'regulator-fix-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "A trivial typo fix that came in during the merge window" * tag 'regulator-fix-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: consumer.rst: fix 'regulator_enable' typo. commit 2e1e1337881b0e9844d687982aa54b31b1269b11 Merge: ed23734c23d2f eb307d09fe158 Author: Linus Torvalds Date: Fri May 5 19:16:58 2023 -0700 Merge tag '6.4-rc-ksmbd-server-fixes-part2' of git://git.samba.org/ksmbd Pull ksmbd server fixes from Steve French: "Ten ksmbd server fixes, including some important security fixes: - Two use after free fixes - Fix RCU callback race - Deadlock fix - Three patches to prevent session setup attacks - Prevent guest users from establishing multichannel sessions - Fix null pointer dereference in query FS info - Memleak fix" * tag '6.4-rc-ksmbd-server-fixes-part2' of git://git.samba.org/ksmbd: ksmbd: call rcu_barrier() in ksmbd_server_exit() ksmbd: fix racy issue under cocurrent smb2 tree disconnect ksmbd: fix racy issue from smb2 close and logoff with multichannel ksmbd: not allow guest user on multichannel ksmbd: fix deadlock in ksmbd_find_crypto_ctx() ksmbd: block asynchronous requests when making a delay on session setup ksmbd: destroy expired sessions ksmbd: fix racy issue from session setup and logoff ksmbd: fix NULL pointer dereference in smb2_get_info_filesystem() ksmbd: fix memleak in session setup commit ed23734c23d2fc1e6a1ff80f8c2b82faeed0ed0c Merge: a5e219005aeaf 644bca1d48139 Author: Linus Torvalds Date: Fri May 5 19:12:01 2023 -0700 Merge tag 'net-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from netfilter. Current release - regressions: - sched: act_pedit: free pedit keys on bail from offset check Current release - new code bugs: - pds_core: - Kconfig fixes (DEBUGFS and AUXILIARY_BUS) - fix mutex double unlock in error path Previous releases - regressions: - sched: cls_api: remove block_cb from driver_list before freeing - nf_tables: fix ct untracked match breakage - eth: mtk_eth_soc: drop generic vlan rx offload - sched: flower: fix error handler on replace Previous releases - always broken: - tcp: fix skb_copy_ubufs() vs BIG TCP - ipv6: fix skb hash for some RST packets - af_packet: don't send zero-byte data in packet_sendmsg_spkt() - rxrpc: timeout handling fixes after moving client call connection to the I/O thread - ixgbe: fix panic during XDP_TX with > 64 CPUs - igc: RMW the SRRCTL register to prevent losing timestamp config - dsa: mt7530: fix corrupt frames using TRGMII on 40 MHz XTAL MT7621 - r8152: - fix flow control issue of RTL8156A - fix the poor throughput for 2.5G devices - move setting r8153b_rx_agg_chg_indicate() to fix coalescing - enable autosuspend - ncsi: clear Tx enable mode when handling a Config required AEN - octeontx2-pf: macsec: fixes for CN10KB ASIC rev Misc: - 9p: remove INET dependency" * tag 'net-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (69 commits) net: bcmgenet: Remove phy_stop() from bcmgenet_netif_stop() pds_core: fix mutex double unlock in error path net/sched: flower: fix error handler on replace Revert "net/sched: flower: Fix wrong handle assignment during filter change" net/sched: flower: fix filter idr initialization net: fec: correct the counting of XDP sent frames bonding: add xdp_features support net: enetc: check the index of the SFI rather than the handle sfc: Add back mailing list virtio_net: suppress cpu stall when free_unused_bufs ice: block LAN in case of VF to VF offload net: dsa: mt7530: fix network connectivity with multiple CPU ports net: dsa: mt7530: fix corrupt frames using trgmii on 40 MHz XTAL MT7621 9p: Remove INET dependency netfilter: nf_tables: fix ct untracked match breakage af_packet: Don't send zero-byte data in packet_sendmsg_spkt(). igc: read before write to SRRCTL register pds_core: add AUXILIARY_BUS and NET_DEVLINK to Kconfig pds_core: remove CONFIG_DEBUG_FS from makefile ionic: catch failure from devlink_alloc ... commit a5e219005aeaf52cb10f9999a61c07a140db7097 Merge: c12753d5fa3ea 1bd922877a084 Author: Linus Torvalds Date: Fri May 5 19:07:17 2023 -0700 Merge tag 'i2c-for-6.4-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull more i2c updates from Wolfram Sang: "Some more driver bugfixes and a DT binding conversion" * tag 'i2c-for-6.4-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: dt-bindings: i2c: brcm,kona-i2c: convert to YAML i2c: gxp: fix build failure without CONFIG_I2C_SLAVE i2c: imx-lpi2c: avoid taking clk_prepare mutex in PM callbacks i2c: omap: Fix standard mode false ACK readings i2c: tegra: Fix PEC support for SMBUS block read commit c12753d5fa3eab636b5ced91d6a2155173c11527 Author: Lukas Bulwahn Date: Sat May 6 00:39:09 2023 +0200 s390: remove the unneeded select GCC12_NO_ARRAY_BOUNDS Commit 0da6e5fd6c37 ("gcc: disable '-Warray-bounds' for gcc-13 too") makes config GCC11_NO_ARRAY_BOUNDS to be for disabling -Warray-bounds in any gcc version 11 and upwards, and with that, removes the GCC12_NO_ARRAY_BOUNDS config as it is now covered by the semantics of GCC11_NO_ARRAY_BOUNDS. As GCC11_NO_ARRAY_BOUNDS is yes by default, there is no need for the s390 architecture to explicitly select GCC11_NO_ARRAY_BOUNDS. Hence, the select GCC12_NO_ARRAY_BOUNDS in arch/s390/Kconfig can simply be dropped. Remove the unneeded "select GCC12_NO_ARRAY_BOUNDS". Signed-off-by: Lukas Bulwahn Signed-off-by: Linus Torvalds commit 319050d4302ee9b216fb8cea847a9c4427628a98 Author: Chuck Lever Date: Thu May 4 13:43:33 2023 -0400 SUNRPC: Fix error handling in svc_setup_socket() Dan points out that sock_alloc_file() releases @sock on error, but so do all of svc_setup_socket's callers, resulting in a double- release if sock_alloc_file() returns an error. Rather than allocating a struct file for all new sockets, allocate one only for sockets created during a TCP accept. For the moment, those are the only ones that will ever be used with RPC-with-TLS. Reported-by: Dan Carpenter Fixes: ae0d77708aae ("SUNRPC: Ensure server-side sockets have a sock->file") Signed-off-by: Chuck Lever commit 6c73f819b6b6d6f052e8dbe3f66f0693554ddf48 Author: Ian Rogers Date: Fri May 5 13:41:19 2023 -0700 perf metrics: Fix SEGV with --for-each-cgroup Ensure the metric threshold is copied correctly or else a use of uninitialized memory happens. Fixes: d0a3052f6faefffc ("perf metric: Compute and print threshold values") Reported-by: Namhyung Kim Signed-off-by: Ian Rogers Tested-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230505204119.3443491-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit a887466562b425bd6183bf75b523c1477c9fd22d Author: Arnaldo Carvalho de Melo Date: Thu May 4 19:03:51 2023 -0300 perf bpf skels: Stop using vmlinux.h generated from BTF, use subset of used structs + CO-RE Linus reported a build break due to using a vmlinux without a BTF elf section to generate the vmlinux.h header with bpftool for use in the BPF tools in tools/perf/util/bpf_skel/*.bpf.c. Instead add a vmlinux.h file with the structs needed with the fields the tools need, marking the structs with __attribute__((preserve_access_index)), so that libbpf's CO-RE code can fixup the struct field offsets. In some cases the vmlinux.h file that was being generated by bpftool from the kernel BTF information was not needed at all, just including linux/bpf.h, sometimes linux/perf_event.h was enough as non-UAPI types were not being used. To keep te patch small, include those UAPI headers from the trimmed down vmlinux.h file, that then provides the tools with just the structs and the subset of its fields needed for them. Testing it: # perf lock contention -b find / > /dev/null ^C contended total wait max wait avg wait type caller 7 53.59 us 10.86 us 7.66 us rwlock:R start_this_handle+0xa0 2 30.35 us 21.99 us 15.17 us rwsem:R iterate_dir+0x52 1 9.04 us 9.04 us 9.04 us rwlock:W start_this_handle+0x291 1 8.73 us 8.73 us 8.73 us spinlock raw_spin_rq_lock_nested+0x1e # # perf lock contention -abl find / > /dev/null ^C contended total wait max wait avg wait address symbol 1 262.96 ms 262.96 ms 262.96 ms ffff8e67502d0170 (mutex) 12 244.24 us 39.91 us 20.35 us ffff8e6af56f8070 mmap_lock (rwsem) 7 30.28 us 6.85 us 4.33 us ffff8e6c865f1d40 rq_lock (spinlock) 3 7.42 us 4.03 us 2.47 us ffff8e6c864b1d40 rq_lock (spinlock) 2 3.72 us 2.19 us 1.86 us ffff8e6c86571d40 rq_lock (spinlock) 1 2.42 us 2.42 us 2.42 us ffff8e6c86471d40 rq_lock (spinlock) 4 2.11 us 559 ns 527 ns ffffffff9a146c80 rcu_state (spinlock) 3 1.45 us 818 ns 482 ns ffff8e674ae8384c (rwlock) 1 870 ns 870 ns 870 ns ffff8e68456ee060 (rwlock) 1 663 ns 663 ns 663 ns ffff8e6c864f1d40 rq_lock (spinlock) 1 573 ns 573 ns 573 ns ffff8e6c86531d40 rq_lock (spinlock) 1 472 ns 472 ns 472 ns ffff8e6c86431740 (spinlock) 1 397 ns 397 ns 397 ns ffff8e67413a4f04 (spinlock) # # perf test offcpu 95: perf record offcpu profiling tests : Ok # # perf kwork latency --use-bpf Starting trace, Hit to stop and report ^C Kwork Name | Cpu | Avg delay | Count | Max delay | Max delay start | Max delay end | -------------------------------------------------------------------------------------------------------------------------------- (w)flush_memcg_stats_dwork | 0000 | 1056.212 ms | 2 | 2112.345 ms | 550113.229573 s | 550115.341919 s | (w)toggle_allocation_gate | 0000 | 10.144 ms | 62 | 416.389 ms | 550113.453518 s | 550113.869907 s | (w)0xffff8e6748e28080 | 0002 | 0.623 ms | 1 | 0.623 ms | 550110.989841 s | 550110.990464 s | (w)vmstat_shepherd | 0000 | 0.586 ms | 10 | 2.828 ms | 550111.971536 s | 550111.974364 s | (w)vmstat_update | 0007 | 0.363 ms | 5 | 1.634 ms | 550113.222520 s | 550113.224154 s | (w)vmstat_update | 0000 | 0.324 ms | 10 | 2.827 ms | 550111.971526 s | 550111.974354 s | (w)0xffff8e674c5f4a58 | 0002 | 0.102 ms | 5 | 0.134 ms | 550110.989839 s | 550110.989972 s | (w)psi_avgs_work | 0001 | 0.086 ms | 3 | 0.107 ms | 550114.957852 s | 550114.957959 s | (w)psi_avgs_work | 0000 | 0.079 ms | 5 | 0.100 ms | 550118.605668 s | 550118.605768 s | (w)kfree_rcu_monitor | 0006 | 0.079 ms | 1 | 0.079 ms | 550110.925821 s | 550110.925900 s | (w)psi_avgs_work | 0004 | 0.079 ms | 1 | 0.079 ms | 550109.581835 s | 550109.581914 s | (w)psi_avgs_work | 0001 | 0.078 ms | 1 | 0.078 ms | 550109.197809 s | 550109.197887 s | (w)psi_avgs_work | 0002 | 0.077 ms | 5 | 0.086 ms | 550110.669819 s | 550110.669905 s | # strace -e bpf -o perf-stat-bpf-counters.output perf stat -e cycles --bpf-counters sleep 1 Performance counter stats for 'sleep 1': 6,197,983 cycles 1.003922848 seconds time elapsed 0.000000000 seconds user 0.002032000 seconds sys # head -7 perf-stat-bpf-counters.output bpf(BPF_OBJ_GET, {pathname="/sys/fs/bpf/perf_attr_map", bpf_fd=0, file_flags=0}, 16) = 3 bpf(BPF_OBJ_GET_INFO_BY_FD, {info={bpf_fd=3, info_len=88, info=0x7ffcead64990}}, 16) = 0 bpf(BPF_MAP_LOOKUP_ELEM, {map_fd=3, key=0x24129e0, value=0x7ffcead65a48, flags=BPF_ANY}, 32) = 0 bpf(BPF_LINK_GET_FD_BY_ID, {link_id=1252}, 12) = -1 ENOENT (No such file or directory) bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_SOCKET_FILTER, insn_cnt=2, insns=0x7ffcead65780, license="GPL", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(0, 0, 0), prog_flags=0, prog_name="", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS, prog_btf_fd=0, func_info_rec_size=0, +func_info=NULL, func_info_cnt=0, line_info_rec_size=0, line_info=NULL, line_info_cnt=0, attach_btf_id=0, attach_prog_fd=0}, 116) = 4 bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_SOCKET_FILTER, insn_cnt=2, insns=0x7ffcead65920, license="GPL", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(0, 0, 0), prog_flags=0, prog_name="", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS, prog_btf_fd=0, func_info_rec_size=0, +func_info=NULL, func_info_cnt=0, line_info_rec_size=0, line_info=NULL, line_info_cnt=0, attach_btf_id=0, attach_prog_fd=0, fd_array=NULL}, 128) = 4 bpf(BPF_BTF_LOAD, {btf="\237\353\1\0\30\0\0\0\0\0\0\0\20\0\0\0\20\0\0\0\5\0\0\0\1\0\0\0\0\0\0\1"..., btf_log_buf=NULL, btf_size=45, btf_log_size=0, btf_log_level=0}, 28) = 4 # Reported-by: Linus Torvalds Suggested-by: Andrii Nakryiko Tested-by: Namhyung Kim Tested-by: Song Liu Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Ian Rogers Cc: Jiri Olsa Co-developed-by: Jiri Olsa Link: https://lore.kernel.org/lkml/ZFU1PJrn8YtHIqno@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 644bca1d48139ad77570c24d22bafaf8e438cf03 Merge: 93e0401e0fc0c cb9e6e584d584 Author: Jakub Kicinski Date: Fri May 5 13:35:45 2023 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next There's a fix which landed in net-next, pull it in along with the couple of minor cleanups. Signed-off-by: Jakub Kicinski commit ecc68ee216c6c5b2f84915e1441adf436f1b019b Author: Dmitrii Dolgov <9erthalion6@gmail.com> Date: Wed Apr 12 20:23:16 2023 +0200 perf stat: Separate bperf from bpf_profiler It seems that perf stat -b doesn't produce any results: $ perf stat -e cycles -b 4 -I 10000 -vvv Control descriptor is not initialized cycles: 0 0 0 time counts unit events 10.007641640 cycles Looks like this happens because fentry/fexit progs are getting loaded, but the corresponding perf event is not enabled and not added into the events bpf map. I think there is some mixing up between two type of bpf support, one for bperf and one for bpf_profiler. Both are identified via evsel__is_bpf, based on which perf events are enabled, but for the latter (bpf_profiler) a perf event is required. Using evsel__is_bperf to check only bperf produces expected results: $ perf stat -e cycles -b 4 -I 10000 -vvv Control descriptor is not initialized ------------------------------------------------------------ perf_event_attr: size 136 sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 = 3 ------------------------------------------------------------ [...perf_event_attr for other CPUs...] ------------------------------------------------------------ cycles: 309426 169009 169009 time counts unit events 10.010091271 309426 cycles The final numbers correspond (at least in the level of magnitude) to the same metric obtained via bpftool. Fixes: 112cb56164bc2108 ("perf stat: Introduce config stat.bpf-counter-events") Reviewed-by: Song Liu Signed-off-by: Dmitrii Dolgov <9erthalion6@gmail.com> Tested-by: Song Liu Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Song Liu Link: https://lore.kernel.org/r/20230412182316.11628-1-9erthalion6@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 418d5c98319f67b9ae651babea031b5394425c18 Merge: 647681bfa6784 6997f847cbb72 Author: Linus Torvalds Date: Fri May 5 13:27:59 2023 -0700 Merge tag 'devicetree-fixes-for-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Add Conor Dooley as a DT binding maintainer - Swap the order of parsing /memreserve/ and /reserved-memory nodes so that the /reserved-memory nodes which have more information are handled first - Fix some property dependencies in riscv,pmu binding - Update maintainers entries on a couple of bindings * tag 'devicetree-fixes-for-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: MAINTAINERS: add Conor as a dt-bindings maintainer dt-bindings: perf: riscv,pmu: fix property dependencies dt-bindings: xilinx: Remove Naga from memory and mtd bindings of: fdt: Scan /memreserve/ last dt-bindings: clock: r9a06g032-sysctrl: Change maintainer to Fabrizio Castro dt-bindings: pinctrl: renesas,rzv2m: Change maintainer to Fabrizio Castro dt-bindings: pinctrl: renesas,rzn1: Change maintainer to Fabrizio Castro dt-bindings: i2c: renesas,rzv2m: Change maintainer to Fabrizio Castro commit 647681bfa678400f0117d214313005cbfaf79f48 Merge: e919a3f7057b5 cdc822dda6f82 Author: Linus Torvalds Date: Fri May 5 13:16:42 2023 -0700 Merge tag 'docs-6.4-2' of git://git.lwn.net/linux Pull more documentation updates from Jonathan Corbet: "A handful of late-arriving documentation fixes, plus one Spanish translation that has been ready for some time but got applied late" * tag 'docs-6.4-2' of git://git.lwn.net/linux: docs/sp_SP: Add translation of process/adding-syscalls CREDITS: Update email address for Mat Martineau Documentation: update kernel stack for x86_64 docs: Remove unnecessary unicode character docs: fix "Reviewd" typo Documentation: timers: hrtimers: Make hybrid union historical docs/admin-guide/mm/ksm.rst fix intraface -> interface typo doc:it_IT: fix some typos commit e919a3f7057b5ca918dea98826b39a38eff9bebb Merge: b115d85a9584c 6ce2c04fcbcaa Author: Linus Torvalds Date: Fri May 5 13:11:02 2023 -0700 Merge tag 'trace-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull more tracing updates from Steven Rostedt: - Make buffer_percent read/write. The buffer_percent file is how users can state how long to block on the tracing buffer depending on how much is in the buffer. When it hits the "buffer_percent" it will wake the task waiting on the buffer. For some reason it was set to read-only. This was not noticed because testing was done as root without SELinux, but with SELinux it will prevent even root to write to it without having CAP_DAC_OVERRIDE. - The "touched_functions" was added this merge window, but one of the reasons for adding it was not implemented. That was to show what functions were not only touched, but had either a direct trampoline attached to it, or a kprobe or live kernel patching that can "hijack" the function to run a different function. The point is to know if there's functions in the kernel that may not be behaving as the kernel code shows. This can be used for debugging. TODO: Add this information to kernel oops too. * tag 'trace-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: ftrace: Add MODIFIED flag to show if IPMODIFY or direct was attached tracing: Fix permissions for the buffer_percent file commit b115d85a9584c98f9a7dec209d835462aa1adc09 Merge: d5ed10bb80bb3 ec570320b09f7 Author: Linus Torvalds Date: Fri May 5 12:56:55 2023 -0700 Merge tag 'locking-core-2023-05-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: - Introduce local{,64}_try_cmpxchg() - a slightly more optimal primitive, which will be used in perf events ring-buffer code - Simplify/modify rwsems on PREEMPT_RT, to address writer starvation - Misc cleanups/fixes * tag 'locking-core-2023-05-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/atomic: Correct (cmp)xchg() instrumentation locking/x86: Define arch_try_cmpxchg_local() locking/arch: Wire up local_try_cmpxchg() locking/generic: Wire up local{,64}_try_cmpxchg() locking/atomic: Add generic try_cmpxchg{,64}_local() support locking/rwbase: Mitigate indefinite writer starvation locking/arch: Rename all internal __xchg() names to __arch_xchg() commit d5ed10bb80bb376501cb56015a47457647efaabf Merge: 982365a8f5c45 798dec3304f69 Author: Linus Torvalds Date: Fri May 5 12:29:57 2023 -0700 Merge branch 'x86-uaccess-cleanup': x86 uaccess header cleanups Merge my x86 uaccess updates branch. The LAM ("Linear Address Masking") updates in this release made me unhappy about how "access_ok()" was done, and it actually turned out to have a couple of small bugs in it too. This is my cleanup of the code: - use the sign bit of the __user pointer rather than masking the address and checking it against the TASK_SIZE range. We already did this part for the get/put_user() side, but 'access_ok()' did the naïve "mask and range check" thing, which not only generates nasty code, but also ended up meaning that __access_ok itself didn't do a good job, and so copy_from_user_nmi() didn't get the check right. - move all the code that is 64-bit only into the 64-bit version of the header file, so that we don't unnecessarily pollute the shared x86 code and make it look like LAM might work in 32-bit too. - fix a bug in the address masking (that doesn't end up mattering: in this case the fix was to just remove the buggy code entirely). - a couple of trivial cleanups and added commentary about the access_ok() rules. * x86-uaccess-cleanup: x86-64: mm: clarify the 'positive addresses' user address rules x86: mm: remove 'sign' games from LAM untagged_addr*() macros x86: uaccess: move 32-bit and 64-bit parts into proper header x86: mm: remove architecture-specific 'access_ok()' define x86-64: make access_ok() independent of LAM commit 982365a8f5c453b3ecff131d60f254a7e67c9a2b Merge: 493804a6895d6 c2d3c8441e3dd Author: Linus Torvalds Date: Fri May 5 12:23:33 2023 -0700 Merge tag 'riscv-for-linus-6.4-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull more RISC-V updates from Palmer Dabbelt: - Support for hibernation - The .rela.dyn section has been moved to the init area - A fix for the SBI probing to allow for implementation-defined behavior - Various other fixes and cleanups throughout the tree * tag 'riscv-for-linus-6.4-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: include cpufeature.h in cpufeature.c riscv: Move .rela.dyn to the init sections dt-bindings: riscv: explicitly mention assumption of Zicsr & Zifencei support riscv: compat_syscall_table: Fixup compile warning RISC-V: fixup in-flight collision with ARCH_WANT_OPTIMIZE_VMEMMAP rename RISC-V: fix sifive and thead section mismatches in errata RISC-V: Align SBI probe implementation with spec riscv: mm: remove redundant parameter of create_fdt_early_page_table riscv: Adjust dependencies of HAVE_DYNAMIC_FTRACE selection RISC-V: Add arch functions to support hibernation/suspend-to-disk RISC-V: mm: Enable huge page support to kernel_page_present() function RISC-V: Factor out common code of __cpu_resume_enter() RISC-V: Change suspend_save_csrs and suspend_restore_csrs to public function commit 493804a6895d63240fe45d087cd14c4b77d8488b Merge: 7163a2111f6c0 7a8016d95651f Author: Linus Torvalds Date: Fri May 5 12:17:01 2023 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull more kvm updates from Paolo Bonzini: "This includes the 6.4 changes for RISC-V, and a few bugfix patches for other architectures. For x86, this closes a longstanding performance issue in the newer and (usually) more scalable page table management code. RISC-V: - ONE_REG interface to enable/disable SBI extensions - Zbb extension for Guest/VM - AIA CSR virtualization x86: - Fix a long-standing TDP MMU flaw, where unloading roots on a vCPU can result in the root being freed even though the root is completely valid and can be reused as-is (with a TLB flush). s390: - A couple of bugfixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: s390: fix race in gmap_make_secure() KVM: s390: pv: fix asynchronous teardown for small VMs KVM: x86: Preserve TDP MMU roots until they are explicitly invalidated RISC-V: KVM: Virtualize per-HART AIA CSRs RISC-V: KVM: Use bitmap for irqs_pending and irqs_pending_mask RISC-V: KVM: Add ONE_REG interface for AIA CSRs RISC-V: KVM: Implement subtype for CSR ONE_REG interface RISC-V: KVM: Initial skeletal support for AIA RISC-V: KVM: Drop the _MASK suffix from hgatp.VMID mask defines RISC-V: Detect AIA CSRs from ISA string RISC-V: Add AIA related CSR defines RISC-V: KVM: Allow Zbb extension for Guest/VM RISC-V: KVM: Add ONE_REG interface to enable/disable SBI extensions RISC-V: KVM: Alphabetize selects KVM: RISC-V: Retry fault if vma_lookup() results become invalid commit 7163a2111f6c030ee39635ac3334bfa1a52a3dd3 Merge: 817e1af1b3723 3db66620ea90b Author: Linus Torvalds Date: Fri May 5 12:10:09 2023 -0700 Merge tag 'acpi-6.4-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Remove an ACPI backlight quirk for Lenovo ThinkPad W530, added during the 6.3 cycle, that turned out to do more harm than help (Hans de Goede)" * tag 'acpi-6.4-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: video: Remove acpi_backlight=video quirk for Lenovo ThinkPad W530 commit 817e1af1b37230ef6bb40bec6ccaf9a800ee6610 Merge: b49178e68fc7e 2492ba4cd06dd Author: Linus Torvalds Date: Fri May 5 12:05:00 2023 -0700 Merge tag 'thermal-6.4-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control fixes from Rafael Wysocki: "These fix a NULL pointer dereference in the Intel powerclamp driver introduced during the 6.3 cycle and update MAINTAINERS to match recent code changes. Specifics: - Fix NULL pointer access in the Intel powerclamp thermal driver that occurs on attempts to set the cooling device state to 0 in the default configuration (Srinivas Pandruvada) - Drop the stale MAINTAINERS entry for the Intel Menlow thermal driver that has been removed recently (Lukas Bulwahn)" * tag 'thermal-6.4-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: MAINTAINERS: remove section INTEL MENLOW THERMAL DRIVER thermal: intel: powerclamp: Fix NULL pointer access issue commit b49178e68fc7e3333c3d9f96eb09937ca84d05fd Merge: 084f51d473cd5 9d9ff3d2a4a56 Author: Linus Torvalds Date: Fri May 5 11:57:29 2023 -0700 Merge tag 'phy-fixes-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy fixes from Vinod Koul: - Fix for mediatek driver warning for variable used uninitialized and for wrong pll math * tag 'phy-fixes-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: mediatek: hdmi: mt8195: fix wrong pll calculus phy: mediatek: hdmi: mt8195: fix uninitialized variable usage in pll_calc commit 084f51d473cd566eab310d5da56fe7b68d0b10be Merge: 78b421b6a7c6d 1bef84af084e9 Author: Linus Torvalds Date: Fri May 5 11:49:22 2023 -0700 Merge tag 'drm-next-2023-05-05' of git://anongit.freedesktop.org/drm/drm Pull more drm fixes from Dave Airlie: "This is the fixes for the last couple of weeks for i915 and last 3 weeks for amdgpu, lots of them but pretty scattered around and all pretty small. amdgpu: - SR-IOV fixes - DCN 3.2 fixes - DC mclk handling fixes - eDP fixes - SubVP fixes - HDCP regression fix - DSC fixes - DC FP fixes - DCN 3.x fixes - Display flickering fix when switching between vram and gtt - Z8 power saving fix - Fix hang when skipping modeset - GPU reset fixes - Doorbell fix when resizing BARs - Fix spurious warnings in gmc - Locking fix for AMDGPU_SCHED IOCTL - SR-IOV fix - DCN 3.1.4 fix - DCN 3.2 fix - Fix job cleanup when CS is aborted i915: - skl pipe source size check - mtl transcoder mask fix - DSI power on sequence fix - GuC versioning corner case fix" * tag 'drm-next-2023-05-05' of git://anongit.freedesktop.org/drm/drm: (48 commits) drm/amdgpu: drop redundant sched job cleanup when cs is aborted drm/amd/display: filter out invalid bits in pipe_fuses drm/amd/display: Change default Z8 watermark values drm/amdgpu: disable SDMA WPTR_POLL_ENABLE for SR-IOV drm/amdgpu: add a missing lock for AMDGPU_SCHED drm/amdgpu: fix an amdgpu_irq_put() issue in gmc_v9_0_hw_fini() drm/amdgpu: fix amdgpu_irq_put call trace in gmc_v10_0_hw_fini drm/amdgpu: fix amdgpu_irq_put call trace in gmc_v11_0_hw_fini drm/amdgpu: Enable doorbell selfring after resize FB BAR drm/amdgpu: Use the default reset when loading or reloading the driver drm/amdgpu: Fix mode2 reset for sienna cichlid drm/i915/dsi: Use unconditional msleep() instead of intel_dsi_msleep() drm/i915/mtl: Add the missing CPU transcoder mask in intel_device_info drm/i915/guc: Actually return an error if GuC version range check fails drm/amd/display: Lowering min Z8 residency time drm/amd/display: fix flickering caused by S/G mode drm/amd/display: Set min_width and min_height capability for DCN30 drm/amd/display: Isolate remaining FPU code in DCN32 drm/amd/display: Update bounding box values for DCN321 drm/amd/display: Do not clear GPINT register when releasing DMUB from reset ... commit 978134c4b192ed04ecf699be3e1b4d23b5d20457 Author: Dmitry Torokhov Date: Fri May 5 11:16:07 2023 -0700 Input: fix open count when closing inhibited device Because the kernel increments device's open count in input_open_device() even if device is inhibited, the counter should always be decremented in input_close_device() to keep it balanced. Fixes: a181616487db ("Input: Add "inhibited" property") Reviewed-by: Peter Hutterer Link: https://lore.kernel.org/r/ZFFz0xAdPNSL3PT7@google.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit ee2dd703470242f1672403e83f827391afeca808 Author: Oswald Buddenhagen Date: Fri May 5 17:52:44 2023 +0200 ALSA: pcm: use exit controlled loop in snd_pcm_playback_silence() We already know that `frames` is greater than zero, because we just checked it. So we don't need to check the loop condition on the first iteration. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230505155244.2312199-7-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 6ffa6f397e80bc196ed554e4dabfe43ecc0fe7c1 Author: Oswald Buddenhagen Date: Fri May 5 17:52:43 2023 +0200 ALSA: pcm: simplify top-up mode init in snd_pcm_playback_silence() Inline the remaining call of snd_pcm_playback_hw_avail(). This makes the top-up branch more congruent with the thresholded one, and allows simplifying the handling of the corner cases. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230505155244.2312199-6-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 6d8d56db0cd14c415c26e27d949c615750c40d70 Author: Jaroslav Kysela Date: Fri May 5 17:52:42 2023 +0200 ALSA: pcm: playback silence - move silence variable updates to separate function The code tracking the added samples in thresholded mode and the code tracking the just played samples in top-up mode are semantically identical, so factor it out to a common function to enhance readability. Co-developed-by: Oswald Buddenhagen Signed-off-by: Oswald Buddenhagen Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230505155244.2312199-5-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 190cb66a4ee0ac4419e1f8a9de46074a8c8e4c23 Author: Jaroslav Kysela Date: Fri May 5 17:52:41 2023 +0200 ALSA: pcm: playback silence - remove extra code The removed condition handles de facto only one situation where runtime->silence_filled variable is equal to runtime->buffer_size, because this variable cannot go over the buffer size. This case is implicitly caught by the required comparison of the noise distance with the threshold. Suggested-by: Oswald Buddenhagen Signed-off-by: Jaroslav Kysela Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230505155244.2312199-4-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 781b4da64b9e3dafb356b7365e7ecf273e879602 Author: Jaroslav Kysela Date: Fri May 5 17:52:40 2023 +0200 ALSA: pcm: fix playback silence - correct incremental silencing Commit 9a826ddba6e ("[ALSA] pcm core: fix silence_start calculations") came with exactly the right commit message, but the patch just made things broken in a different way: We'd fill at a too low address if the area was already partially zeroed, so we'd under-fill. This affected both thresholded mode (where it was somewhat less likely) and top-up mode (where it would be the case consistently). Co-developed-by: Oswald Buddenhagen Signed-off-by: Oswald Buddenhagen Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230505155244.2312199-3-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 2fbaa44a59887f9fd70c986f39c4ac9aebd0c8a1 Author: Jaroslav Kysela Date: Fri May 5 17:52:39 2023 +0200 ALSA: pcm: fix playback silence - use the actual new_hw_ptr for the threshold mode The snd_pcm_playback_hw_avail() function uses runtime->status->hw_ptr. Unfortunately, in case when we call this function from snd_pcm_update_hw_ptr0(), this variable contains the previous hardware pointer. Use the new_hw_ptr argument to calculate hw_avail (filled samples by the user space) to correct the threshold comparison. The new_hw_ptr argument may also be set to ULONG_MAX which means the initialization phase. In this case, use runtime->status->hw_ptr. Suggested-by: Oswald Buddenhagen Signed-off-by: Jaroslav Kysela Reviewed-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230505155244.2312199-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit d7f5dd9790bbf9c7357672bafb1992ee7aadf45a Author: Jaroslav Kysela Date: Fri May 5 17:52:38 2023 +0200 ALSA: pcm: Revert "ALSA: pcm: rewrite snd_pcm_playback_silence()" This reverts commit 9f656705c5faa18afb26d922cfc64f9fd103c38d. There was a regression (in the top-up mode). Unfortunately, the patch provided from the author of this commit is not easy to review. Keep the updated and new comments in headers. Also add a new comment that documents the missed API constraint which led to the regression. Reported-by: Jeff Chua Link: https://lore.kernel.org/r/CAAJw_ZsbTVd3Es373x_wTNDF7RknGhCD0r+NKUSwAO7HpLAkYA@mail.gmail.com Signed-off-by: Jaroslav Kysela Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230505155244.2312199-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 56fc217f0db4fc78e02a1b8450df06389474a5e5 Author: Kai-Heng Feng Date: Fri May 5 14:59:23 2023 +0200 ALSA: hda/realtek: Fix mute and micmute LEDs for an HP laptop There's another laptop that needs the fixup to enable mute and micmute LEDs. So do it accordingly. Signed-off-by: Kai-Heng Feng Cc: Link: https://lore.kernel.org/r/20230505125925.543601-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 4a2248855fc1053ef191e3412486f05a4cc4d28b Merge: 0d727e1856ef2 ec6f82b4c63cc Author: Takashi Iwai Date: Fri May 5 17:11:08 2023 +0200 Merge tag 'asoc-fix-v6.4-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.4 A small set of fixes and device quirks that have come in during the merge window, the Qualcomm fix seems quite large but it's mainly code motion so looks larger than it is. commit 6ce2c04fcbcaa5eb086e5142ab359be306cbc3e1 Author: Steven Rostedt (Google) Date: Tue May 2 21:32:33 2023 -0400 ftrace: Add MODIFIED flag to show if IPMODIFY or direct was attached If a function had ever had IPMODIFY or DIRECT attached to it, where this is how live kernel patching and BPF overrides work, mark them and display an "M" in the enabled_functions and touched_functions files. This can be used for debugging. If a function had been modified and later there's a bug in the code related to that function, this can be used to know if the cause is possibly from a live kernel patch or a BPF program that changed the behavior of the code. Also update the documentation on the enabled_functions and touched_functions output, as it was missing direct callers and CALL_OPS. And include this new modify attribute. Link: https://lore.kernel.org/linux-trace-kernel/20230502213233.004e3ae4@gandalf.local.home Cc: Mark Rutland Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 2492ba4cd06dd24076f44327174816b04cddde90 Author: Lukas Bulwahn Date: Fri May 5 06:36:05 2023 +0200 MAINTAINERS: remove section INTEL MENLOW THERMAL DRIVER Commit 2b6a7409ac39 ("thermal: intel: menlow: Get rid of this driver") removes the driver drivers/thermal/intel/intel_menlow.c, but misses to remove its reference in MAINTAINERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Remove the INTEL MENLOW THERMAL DRIVER section in MAINTAINERS. Fixes: 2b6a7409ac39 ("thermal: intel: menlow: Get rid of this driver") Signed-off-by: Lukas Bulwahn Signed-off-by: Rafael J. Wysocki commit 6997f847cbb72082a2e9aa0fef8ebfcc3bd4ddc5 Author: Conor Dooley Date: Thu May 4 22:58:39 2023 +0100 MAINTAINERS: add Conor as a dt-bindings maintainer Rob asked if I would be interested in helping with the dt-bindings maintenance, and since I am a glutton for punishment I accepted. Signed-off-by: Conor Dooley Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230504-renderer-alive-1c01d431b2a7@spud Signed-off-by: Rob Herring commit 7a8016d95651fecce5708ed93a24a03a9ad91c80 Merge: 29b38e765016e c148dc8e2fa40 Author: Paolo Bonzini Date: Fri May 5 06:15:09 2023 -0400 Merge tag 'kvm-s390-next-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD For 6.4 commit 29b38e765016e7b99f6ced75b359ee2b44f17269 Merge: d4fba4dfdcce1 edbdb43fc96b1 Author: Paolo Bonzini Date: Fri May 5 06:12:36 2023 -0400 Merge tag 'kvm-x86-mmu-6.4-2' of https://github.com/kvm-x86/linux into HEAD Fix a long-standing flaw in x86's TDP MMU where unloading roots on a vCPU can result in the root being freed even though the root is completely valid and can be reused as-is (with a TLB flush). commit d4fba4dfdcce1e23bc769591bc2e993118391b53 Merge: 1a5304fecee52 2f4d58f7635ae Author: Paolo Bonzini Date: Fri May 5 06:11:48 2023 -0400 Merge tag 'kvm-riscv-6.4-1' of https://github.com/kvm-riscv/linux into HEAD KVM/riscv changes for 6.4 - ONE_REG interface to enable/disable SBI extensions - Zbb extension for Guest/VM - AIA CSR virtualization commit 9ee04875ae73412f5071f6ec1af01788ec271e7c Author: Yang Li Date: Fri May 5 08:49:25 2023 +0800 cifs: Remove unneeded semicolon ./fs/cifs/smb2pdu.c:4140:2-3: Unneeded semicolon Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4863 Signed-off-by: Yang Li Signed-off-by: Steve French commit 46dd6078dbc7e363a8bb01209da67015a1538929 Author: Randy Dunlap Date: Sun Apr 23 06:48:45 2023 +0100 ARM: 9296/1: HP Jornada 7XX: fix kernel-doc warnings Fix kernel-doc warnings from the kernel test robot: jornada720_ssp.c:24: warning: Function parameter or member 'jornada_ssp_lock' not described in 'DEFINE_SPINLOCK' jornada720_ssp.c:24: warning: expecting prototype for arch/arm/mac(). Prototype was for DEFINE_SPINLOCK() instead jornada720_ssp.c:34: warning: Function parameter or member 'byte' not described in 'jornada_ssp_reverse' jornada720_ssp.c:57: warning: Function parameter or member 'byte' not described in 'jornada_ssp_byte' jornada720_ssp.c:85: warning: Function parameter or member 'byte' not described in 'jornada_ssp_inout' Link: lore.kernel.org/r/202304210535.tWby3jWF-lkp@intel.com Fixes: 69ebb22277a5 ("[ARM] 4506/1: HP Jornada 7XX: Addition of SSP Platform Driver") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Arnd Bergmann Cc: Kristoffer Ericson Cc: patches@armlinux.org.uk Signed-off-by: Russell King (Oracle) commit fa3eeb638de0c1a9d2d860e5b48259facdd65176 Author: Haibo Li Date: Mon Apr 17 10:17:07 2023 +0100 ARM: 9295/1: unwind:fix unwind abort for uleb128 case When unwind instruction is 0xb2,the subsequent instructions are uleb128 bytes. For now,it uses only the first uleb128 byte in code. For vsp increments of 0x204~0x400,use one uleb128 byte like below: 0xc06a00e4 : 0x80b27fac Compact model index: 0 0xb2 0x7f vsp = vsp + 1024 0xac pop {r4, r5, r6, r7, r8, r14} For vsp increments larger than 0x400,use two uleb128 bytes like below: 0xc06a00e4 : @0xc0cc9e0c Compact model index: 1 0xb2 0x81 0x01 vsp = vsp + 1032 0xac pop {r4, r5, r6, r7, r8, r14} The unwind works well since the decoded uleb128 byte is also 0x81. For vsp increments larger than 0x600,use two uleb128 bytes like below: 0xc06a00e4 : @0xc0cc9e0c Compact model index: 1 0xb2 0x81 0x02 vsp = vsp + 1544 0xac pop {r4, r5, r6, r7, r8, r14} In this case,the decoded uleb128 result is 0x101(vsp=0x204+(0x101<<2)). While the uleb128 used in code is 0x81(vsp=0x204+(0x81<<2)). The unwind aborts at this frame since it gets incorrect vsp. To fix this,add uleb128 decode to cover all the above case. Signed-off-by: Haibo Li Reviewed-by: Linus Walleij Reviewed-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Russell King (Oracle) commit 93e0401e0fc0c54b0ac05b687cd135c2ac38187c Author: Florian Fainelli Date: Thu May 4 16:07:27 2023 -0700 net: bcmgenet: Remove phy_stop() from bcmgenet_netif_stop() The call to phy_stop() races with the later call to phy_disconnect(), resulting in concurrent phy_suspend() calls being run from different CPUs. The final call to phy_disconnect() ensures that the PHY is stopped and suspended, too. Fixes: c96e731c93ff ("net: bcmgenet: connect and disconnect from the PHY state machine") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 1e76f42779d6a2e45107b34d79d86a57b8077630 Author: Shannon Nelson Date: Thu May 4 13:44:59 2023 -0700 pds_core: fix mutex double unlock in error path Fix a double unlock in an error handling path by unlocking as soon as the error is seen and removing unlocks in the error cleanup path. Link: https://lore.kernel.org/kernel-janitors/209a09f6-5ec6-40c7-a5ec-6260d8f54d25@kili.mountain/ Fixes: 523847df1b37 ("pds_core: add devcmd device interfaces") Reported-by: Dan Carpenter Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 1a304495082e7e73a96b9facac1eb93b6b0498a4 Merge: 26312c685ae0b fd741f0d9f702 Author: David S. Miller Date: Fri May 5 10:01:31 2023 +0100 Merge branch 'tc-action-fixes' Vlad Buslov says: ==================== Fixes for miss to tc action series Changes V1 -> V2: - Added new patch reverting Ivan's fix for the same issue. ==================== Signed-off-by: David S. Miller commit fd741f0d9f702c193b2b44225c004f8c5d5be163 Author: Vlad Buslov Date: Thu May 4 20:16:16 2023 +0200 net/sched: flower: fix error handler on replace When replacing a filter (i.e. 'fold' pointer is not NULL) the insertion of new filter to idr is postponed until later in code since handle is already provided by the user. However, the error handling code in fl_change() always assumes that the new filter had been inserted into idr. If error handler is reached when replacing existing filter it may remove it from idr therefore making it unreachable for delete or dump afterwards. Fix the issue by verifying that 'fold' argument wasn't provided by caller before calling idr_remove(). Fixes: 08a0063df3ae ("net/sched: flower: Move filter handle initialization earlier") Signed-off-by: Vlad Buslov Reviewed-by: Pedro Tammela Signed-off-by: David S. Miller commit 5110f3ff6d3c986df9575c8da86630578b7f0846 Author: Vlad Buslov Date: Thu May 4 20:16:15 2023 +0200 Revert "net/sched: flower: Fix wrong handle assignment during filter change" This reverts commit 32eff6bacec2cb574677c15378169a9fa30043ef. Superseded by the following commit in this series. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit dd4f6bbfa646f258e5bcdfac57a5c413d687f588 Author: Vlad Buslov Date: Thu May 4 20:16:14 2023 +0200 net/sched: flower: fix filter idr initialization The cited commit moved idr initialization too early in fl_change() which allows concurrent users to access the filter that is still being initialized and is in inconsistent state, which, in turn, can cause NULL pointer dereference [0]. Since there is no obvious way to fix the ordering without reverting the whole cited commit, alternative approach taken to first insert NULL pointer into idr in order to allocate the handle but still cause fl_get() to return NULL and prevent concurrent users from seeing the filter while providing miss-to-action infrastructure with valid handle id early in fl_change(). [ 152.434728] general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN [ 152.436163] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] [ 152.437269] CPU: 4 PID: 3877 Comm: tc Not tainted 6.3.0-rc4+ #5 [ 152.438110] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 152.439644] RIP: 0010:fl_dump_key+0x8b/0x1d10 [cls_flower] [ 152.440461] Code: 01 f2 02 f2 c7 40 08 04 f2 04 f2 c7 40 0c 04 f3 f3 f3 65 48 8b 04 25 28 00 00 00 48 89 84 24 00 01 00 00 48 89 c8 48 c1 e8 03 <0f> b6 04 10 84 c0 74 08 3c 03 0f 8e 98 19 00 00 8b 13 85 d2 74 57 [ 152.442885] RSP: 0018:ffff88817a28f158 EFLAGS: 00010246 [ 152.443851] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 152.444826] RDX: dffffc0000000000 RSI: ffffffff8500ae80 RDI: ffff88810a987900 [ 152.445791] RBP: ffff888179d88240 R08: ffff888179d8845c R09: ffff888179d88240 [ 152.446780] R10: ffffed102f451e48 R11: 00000000fffffff2 R12: ffff88810a987900 [ 152.447741] R13: ffffffff8500ae80 R14: ffff88810a987900 R15: ffff888149b3c738 [ 152.448756] FS: 00007f5eb2a34800(0000) GS:ffff88881ec00000(0000) knlGS:0000000000000000 [ 152.449888] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 152.450685] CR2: 000000000046ad19 CR3: 000000010b0bd006 CR4: 0000000000370ea0 [ 152.451641] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 152.452628] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 152.453588] Call Trace: [ 152.454032] [ 152.454447] ? netlink_sendmsg+0x7a1/0xcb0 [ 152.455109] ? sock_sendmsg+0xc5/0x190 [ 152.455689] ? ____sys_sendmsg+0x535/0x6b0 [ 152.456320] ? ___sys_sendmsg+0xeb/0x170 [ 152.456916] ? do_syscall_64+0x3d/0x90 [ 152.457529] ? entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 152.458321] ? ___sys_sendmsg+0xeb/0x170 [ 152.458958] ? __sys_sendmsg+0xb5/0x140 [ 152.459564] ? do_syscall_64+0x3d/0x90 [ 152.460122] ? entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 152.460852] ? fl_dump_key_options.part.0+0xea0/0xea0 [cls_flower] [ 152.461710] ? _raw_spin_lock+0x7a/0xd0 [ 152.462299] ? _raw_read_lock_irq+0x30/0x30 [ 152.462924] ? nla_put+0x15e/0x1c0 [ 152.463480] fl_dump+0x228/0x650 [cls_flower] [ 152.464112] ? fl_tmplt_dump+0x210/0x210 [cls_flower] [ 152.464854] ? __kmem_cache_alloc_node+0x1a7/0x330 [ 152.465592] ? nla_put+0x15e/0x1c0 [ 152.466160] tcf_fill_node+0x515/0x9a0 [ 152.466766] ? tc_setup_offload_action+0xf0/0xf0 [ 152.467463] ? __alloc_skb+0x13c/0x2a0 [ 152.468067] ? __build_skb_around+0x330/0x330 [ 152.468814] ? fl_get+0x107/0x1a0 [cls_flower] [ 152.469503] tc_del_tfilter+0x718/0x1330 [ 152.470115] ? is_bpf_text_address+0xa/0x20 [ 152.470765] ? tc_ctl_chain+0xee0/0xee0 [ 152.471335] ? __kernel_text_address+0xe/0x30 [ 152.471948] ? unwind_get_return_address+0x56/0xa0 [ 152.472639] ? __thaw_task+0x150/0x150 [ 152.473218] ? arch_stack_walk+0x98/0xf0 [ 152.473839] ? __stack_depot_save+0x35/0x4c0 [ 152.474501] ? stack_trace_save+0x91/0xc0 [ 152.475119] ? security_capable+0x51/0x90 [ 152.475741] rtnetlink_rcv_msg+0x2c1/0x9d0 [ 152.476387] ? rtnl_calcit.isra.0+0x2b0/0x2b0 [ 152.477042] ? __sys_sendmsg+0xb5/0x140 [ 152.477664] ? do_syscall_64+0x3d/0x90 [ 152.478255] ? entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 152.479010] ? __stack_depot_save+0x35/0x4c0 [ 152.479679] ? __stack_depot_save+0x35/0x4c0 [ 152.480346] netlink_rcv_skb+0x12c/0x360 [ 152.480929] ? rtnl_calcit.isra.0+0x2b0/0x2b0 [ 152.481517] ? do_syscall_64+0x3d/0x90 [ 152.482061] ? netlink_ack+0x1550/0x1550 [ 152.482612] ? rhashtable_walk_peek+0x170/0x170 [ 152.483262] ? kmem_cache_alloc_node+0x1af/0x390 [ 152.483875] ? _copy_from_iter+0x3d6/0xc70 [ 152.484528] netlink_unicast+0x553/0x790 [ 152.485168] ? netlink_attachskb+0x6a0/0x6a0 [ 152.485848] ? unwind_next_frame+0x11cc/0x1a10 [ 152.486538] ? arch_stack_walk+0x61/0xf0 [ 152.487169] netlink_sendmsg+0x7a1/0xcb0 [ 152.487799] ? netlink_unicast+0x790/0x790 [ 152.488355] ? iovec_from_user.part.0+0x4d/0x220 [ 152.488990] ? _raw_spin_lock+0x7a/0xd0 [ 152.489598] ? netlink_unicast+0x790/0x790 [ 152.490236] sock_sendmsg+0xc5/0x190 [ 152.490796] ____sys_sendmsg+0x535/0x6b0 [ 152.491394] ? import_iovec+0x7/0x10 [ 152.491964] ? kernel_sendmsg+0x30/0x30 [ 152.492561] ? __copy_msghdr+0x3c0/0x3c0 [ 152.493160] ? do_syscall_64+0x3d/0x90 [ 152.493706] ___sys_sendmsg+0xeb/0x170 [ 152.494283] ? may_open_dev+0xd0/0xd0 [ 152.494858] ? copy_msghdr_from_user+0x110/0x110 [ 152.495541] ? __handle_mm_fault+0x2678/0x4ad0 [ 152.496205] ? copy_page_range+0x2360/0x2360 [ 152.496862] ? __fget_light+0x57/0x520 [ 152.497449] ? mas_find+0x1c0/0x1c0 [ 152.498026] ? sockfd_lookup_light+0x1a/0x140 [ 152.498703] __sys_sendmsg+0xb5/0x140 [ 152.499306] ? __sys_sendmsg_sock+0x20/0x20 [ 152.499951] ? do_user_addr_fault+0x369/0xd80 [ 152.500595] do_syscall_64+0x3d/0x90 [ 152.501185] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 152.501917] RIP: 0033:0x7f5eb294f887 [ 152.502494] Code: 0a 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b9 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10 [ 152.505008] RSP: 002b:00007ffd2c708f78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 152.506152] RAX: ffffffffffffffda RBX: 00000000642d9472 RCX: 00007f5eb294f887 [ 152.507134] RDX: 0000000000000000 RSI: 00007ffd2c708fe0 RDI: 0000000000000003 [ 152.508113] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 [ 152.509119] R10: 00007f5eb2808708 R11: 0000000000000246 R12: 0000000000000001 [ 152.510068] R13: 0000000000000000 R14: 00007ffd2c70d1b8 R15: 0000000000485400 [ 152.511031] [ 152.511444] Modules linked in: cls_flower sch_ingress openvswitch nsh mlx5_vdpa vringh vhost_iotlb vdpa mlx5_ib mlx5_core rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi ib_umad rdma_cm ib_ipoib iw_cm ib_cm ib_uverbs ib_core xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter overlay zram zsmalloc fuse [last unloaded: mlx5_core] [ 152.515720] ---[ end trace 0000000000000000 ]--- Fixes: 08a0063df3ae ("net/sched: flower: Move filter handle initialization earlier") Signed-off-by: Vlad Buslov Reviewed-by: Pedro Tammela Signed-off-by: David S. Miller commit 26312c685ae0bca61e06ac75ee158b1e69546415 Author: Shenwei Wang Date: Thu May 4 10:35:17 2023 -0500 net: fec: correct the counting of XDP sent frames In the current xdp_xmit implementation, if any single frame fails to transmit due to insufficient buffer descriptors, the function nevertheless reports success in sending all frames. This results in erroneously indicating that frames were transmitted when in fact they were dropped. This patch fixes the issue by ensureing the return value properly indicates the actual number of frames successfully transmitted, rather than potentially reporting success for all frames when some could not transmit. Fixes: 6d6b39f180b8 ("net: fec: add initial XDP support") Signed-off-by: Gagandeep Singh Signed-off-by: Shenwei Wang Signed-off-by: David S. Miller commit cb9e6e584d58420df182102674e636fb841dae4c Author: Lorenzo Bianconi Date: Thu May 4 11:52:49 2023 +0200 bonding: add xdp_features support Introduce xdp_features support for bonding driver according to the slave devices attached to the master one. xdp_features is required whenever we want to xdp_redirect traffic into a bond device and then into selected slaves attached to it. Reviewed-by: Simon Horman Acked-by: Jay Vosburgh Fixes: 66c0e13ad236 ("drivers: net: turn on XDP features") Signed-off-by: Lorenzo Bianconi Reviewed-by: Jussi Maki Tested-by: Jussi Maki Signed-off-by: David S. Miller commit 299efdc2380aac588557f4d0b2ce7bee05bd0cf2 Author: Wei Fang Date: Thu May 4 16:03:59 2023 +0800 net: enetc: check the index of the SFI rather than the handle We should check whether the current SFI (Stream Filter Instance) table is full before creating a new SFI entry. However, the previous logic checks the handle by mistake and might lead to unpredictable behavior. Fixes: 888ae5a3952b ("net: enetc: add tc flower psfp offload driver") Signed-off-by: Wei Fang Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit c00ce5470a8adeaf681865836085f72633c00a7e Author: Martin Habets Date: Thu May 4 08:28:01 2023 +0100 sfc: Add back mailing list We used to have a mailing list in the MAINTAINERS file, but removed this when we became part of Xilinx as it stopped working. Now inside AMD we have the list again. Add it back so patches will be seen by all sfc developers. Signed-off-by: Martin Habets Signed-off-by: David S. Miller commit f8bb5104394560e29017c25bcade4c6b7aabd108 Author: Wenliang Wang Date: Thu May 4 10:27:06 2023 +0800 virtio_net: suppress cpu stall when free_unused_bufs For multi-queue and large ring-size use case, the following error occurred when free_unused_bufs: rcu: INFO: rcu_sched self-detected stall on CPU. Fixes: 986a4f4d452d ("virtio_net: multiqueue support") Signed-off-by: Wenliang Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit 9f699b71c2f31c51bd1483a20e1c8ddc5986a8c9 Author: Michal Swiatkowski Date: Wed May 3 08:39:35 2023 -0700 ice: block LAN in case of VF to VF offload VF to VF traffic shouldn't go outside. To enforce it, set only the loopback enable bit in case of all ingress type rules added via the tc tool. Fixes: 0d08a441fb1a ("ice: ndo_setup_tc implementation for PF") Reported-by: Sujai Buvaneswaran Signed-off-by: Michal Swiatkowski Tested-by: George Kuruvinakunnel Reviewed-by: Simon Horman Signed-off-by: Tony Nguyen Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit 120a56b01beed51ab5956a734adcfd2760307107 Author: Arınç ÜNAL Date: Wed May 3 00:09:47 2023 +0300 net: dsa: mt7530: fix network connectivity with multiple CPU ports On mt753x_cpu_port_enable() there's code that enables flooding for the CPU port only. Since mt753x_cpu_port_enable() runs twice when both CPU ports are enabled, port 6 becomes the only port to forward the frames to. But port 5 is the active port, so no frames received from the user ports will be forwarded to port 5 which breaks network connectivity. Every bit of the BC_FFP, UNM_FFP, and UNU_FFP bits represents a port. Fix this issue by setting the bit that corresponds to the CPU port without overwriting the other bits. Clear the bits beforehand only for the MT7531 switch. According to the documents MT7621 Giga Switch Programming Guide v0.3 and MT7531 Reference Manual for Development Board v1.0, after reset, the BC_FFP, UNM_FFP, and UNU_FFP bits are set to 1 for MT7531, 0 for MT7530. The commit 5e5502e012b8 ("net: dsa: mt7530: fix roaming from DSA user ports") silently changed the method to set the bits on the MT7530_MFC. Instead of clearing the relevant bits before mt7530_cpu_port_enable() which runs under a for loop, the commit started doing it on mt7530_cpu_port_enable(). Back then, this didn't really matter as only a single CPU port could be used since the CPU port number was hardcoded. The driver was later changed with commit 1f9a6abecf53 ("net: dsa: mt7530: get cpu-port via dp->cpu_dp instead of constant") to retrieve the CPU port via dp->cpu_dp. With that, this silent change became an issue for when using multiple CPU ports. Fixes: 5e5502e012b8 ("net: dsa: mt7530: fix roaming from DSA user ports") Signed-off-by: Arınç ÜNAL Signed-off-by: David S. Miller commit 37c218d8021e36e226add4bab93d071d30fe0704 Author: Arınç ÜNAL Date: Wed May 3 00:09:46 2023 +0300 net: dsa: mt7530: fix corrupt frames using trgmii on 40 MHz XTAL MT7621 The multi-chip module MT7530 switch with a 40 MHz oscillator on the MT7621AT, MT7621DAT, and MT7621ST SoCs forwards corrupt frames using trgmii. This is caused by the assumption that MT7621 SoCs have got 150 MHz PLL, hence using the ncpo1 value, 0x0780. My testing shows this value works on Unielec U7621-06, Bartel's testing shows it won't work on Hi-Link HLK-MT7621A and Netgear WAC104. All devices tested have got 40 MHz oscillators. Using the value for 125 MHz PLL, 0x0640, works on all boards at hand. The definitions for 125 MHz PLL exist on the Banana Pi BPI-R2 BSP source code whilst 150 MHz PLL don't. Forwarding frames using trgmii on the MCM MT7530 switch with a 25 MHz oscillator on the said MT7621 SoCs works fine because the ncpo1 value defined for it is for 125 MHz PLL. Change the 150 MHz PLL comment to 125 MHz PLL, and use the 125 MHz PLL ncpo1 values for both oscillator frequencies. Link: https://github.com/BPI-SINOVOIP/BPI-R2-bsp/blob/81d24bbce7d99524d0771a8bdb2d6663e4eb4faa/u-boot-mt/drivers/net/rt2880_eth.c#L2195 Fixes: 7ef6f6f8d237 ("net: dsa: mt7530: Add MT7621 TRGMII mode support") Tested-by: Bartel Eerdekens Signed-off-by: Arınç ÜNAL Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 78b421b6a7c6dbb6a213877c742af52330f5026d Merge: 3c4aa44343777 10f67d1fd2755 Author: Linus Torvalds Date: Thu May 4 18:33:56 2023 -0700 Merge tag 'linux-watchdog-6.4-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - Add watchdog driver for StarFive JH7100 and JH7110 Soc - Add Rockchip RK3588 devices - Add Qualcom IPQ5332 APSS, QCM2290 KPSS and SM6115 SoC devices - Add Mediatke MT8365 and MT6735 devices - Watchdog-core: Always set WDOG_HW_RUNNING when starting watchdog - Convert watchdog platform drivers to return void on the remove callback - Convert to devm_clk_get_enabled() helpers - ... and other small fixes and improvements * tag 'linux-watchdog-6.4-rc1' of git://www.linux-watchdog.org/linux-watchdog: (72 commits) watchdog: dw_wdt: Simplify clk management watchdog: dw_wdt: Fix the error handling path of dw_wdt_drv_probe() watchdog: starfive: Fix the warning of starfive_wdt_match watchdog: starfive: Fix the probe return error if PM and early_enable are both disabled MAINTAINERS: Add fragment for Xilinx watchdog driver watchdog: menz069_wdt: fix timeout setting watchdog: menz069_wdt: fix watchdog initialisation dt-bindings: watchdog: alphascale-asm9260: convert to DT schema watchdog: loongson1_wdt: Implement restart handler dt-bindings: watchdog: Document Qualcomm SM6115 watchdog dt-bindings: watchdog: realtek,otto-wdt: simplify requiring interrupt-names dt-bindings: watchdog: toshiba,visconti-wdt: simplify with unevaluatedProperties dt-bindings: watchdog: fsl-imx7ulp-wdt: simplify with unevaluatedProperties dt-bindings: watchdog: arm,sp805: drop unneeded minItems dt-bindings: watchdog: drop duplicated GPIO watchdog bindings dt-bindings: reset: Add binding for MediaTek MT6735 TOPRGU/WDT drivers: watchdog: Add StarFive Watchdog driver dt-bindings: watchdog: Add watchdog for StarFive JH7100 and JH7110 dt-bindings: watchdog: indentation, quotes and white-space cleanup watchdog: ebc-c384_wdt: Mark status as orphaned ... commit 1bef84af084e981550d9ecc3359baa22533d7b99 Merge: f4c41a7fd7f99 c8c2969bfcba5 Author: Dave Airlie Date: Fri May 5 11:27:25 2023 +1000 Merge tag 'drm-intel-next-fixes-2023-05-04-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Add missing GPU transcoder masks for MTL and fix DSI power on sequence for Nextbook Ares 8A. Fix GuC version corner case. Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZFOskabVuN45dNaA@jlahtine-mobl.ger.corp.intel.com commit f4c41a7fd7f99329e5af0ac0a236504a60bfb17c Merge: fa0d9c066dee8 1253685f0d3eb Author: Dave Airlie Date: Fri May 5 11:27:08 2023 +1000 Merge tag 'amd-drm-fixes-6.4-2023-05-03' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-fixes-6.4-2023-05-03: amdgpu: - GPU reset fixes - Doorbell fix when resizing BARs - Fix spurious warnings in gmc - Locking fix for AMDGPU_SCHED IOCTL - SR-IOV fix - DCN 3.1.4 fix - DCN 3.2 fix - Fix job cleanup when CS is aborted Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230504034018.7950-1-alexander.deucher@amd.com commit fa0d9c066dee8f52eabcb8416459aa0568b832f9 Merge: 6f5a5e8670587 d944eafed618a Author: Dave Airlie Date: Fri May 5 11:23:11 2023 +1000 Merge tag 'drm-intel-next-fixes-2023-04-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-next One cc stable for pipe source size check on SKL+ Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZEpbSG1ZOSVqzGLx@jlahtine-mobl.ger.corp.intel.com commit 6f5a5e8670587d5066aacd0235071a166ee458fc Merge: cf03e2956af30 d893f39320e12 Author: Dave Airlie Date: Fri May 5 09:13:21 2023 +1000 Merge tag 'amd-drm-fixes-6.4-2023-04-26' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-fixes-6.4-2023-04-26: amdgpu: - SR-IOV fixes - DCN 3.2 fixes - DC mclk handling fixes - eDP fixes - SubVP fixes - HDCP regression fix - DSC fixes - DC FP fixes - DCN 3.x fixes - Display flickering fix when switching between vram and gtt - Z8 power saving fix - Fix hang when skipping modeset Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230427033012.7668-1-alexander.deucher@amd.com commit 4d276e4d3bb4a503e75086faab54f92c0a8fd368 Author: Conor Dooley Date: Tue Apr 4 19:03:22 2023 +0100 dt-bindings: perf: riscv,pmu: fix property dependencies Seemingly I mis-implemented the dependencies here. The OpenSBI docs only point out that the "riscv,event-to-mhpmcounters property is mandatory if riscv,event-to-mhpmevent is present". It never claims that riscv,event-to-mhpmcounters requires riscv,event-to-mhpmevent. Drop the dependency of riscv,event-to-mhpmcounters on riscv,event-to-mhpmevent. Fixes: 7e38085d9c59 ("dt-bindings: riscv: add SBI PMU event mappings") Signed-off-by: Conor Dooley Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20230404-tractor-confusing-8852e552539a@spud Signed-off-by: Rob Herring commit 8e3554150d6c80a84b3cb046615d1a0e943811dc Author: Paulo Alcantara Date: Sun Apr 23 23:26:51 2023 -0300 cifs: fix sharing of DFS connections When matching DFS connections, we can't rely on the values set in cifs_sb_info::prepath and cifs_tcon::tree_name as they might change during DFS failover. The DFS referrals related to a specific DFS tcon are already matched earlier in match_server(), therefore we can safely skip those checks altogether as the connection is guaranteed to be unique for the DFS tcon. Besides, when creating or finding an SMB session, make sure to also refcount any DFS root session related to it (cifs_ses::dfs_root_ses), so if a new DFS mount ends up reusing the connection from the old mount while there was an umount(2) still in progress (e.g. umount(2) -> cifs_umount() -> reconnect -> cifs_put_tcon()), the connection could potentially be put right after the umount(2) finished. Patch has minor update to include fix for unused variable issue noted by the kernel test robot Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202305041040.j7W2xQSy-lkp@intel.com/ Cc: stable@vger.kernel.org # v6.2+ Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 3c4aa44343777844e425c28f1427127f3e55826f Merge: 8e15605be8bae db2993a423e3f Author: Linus Torvalds Date: Thu May 4 14:48:02 2023 -0700 Merge tag 'ceph-for-6.4-rc1' of https://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "A few filesystem improvements, with a rather nasty use-after-free fix from Xiubo intended for stable" * tag 'ceph-for-6.4-rc1' of https://github.com/ceph/ceph-client: ceph: reorder fields in 'struct ceph_snapid_map' ceph: pass ino# instead of old_dentry if it's disconnected ceph: fix potential use-after-free bug when trimming caps ceph: implement writeback livelock avoidance using page tagging ceph: do not print the whole xattr value if it's too long commit 8e15605be8baeb9e3957c268c7d6f901c327ad5c Merge: a1fd058b07d58 21e26d5e54ab7 Author: Linus Torvalds Date: Thu May 4 14:37:53 2023 -0700 Merge tag '9p-6.4-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs Pull 9p updates from Eric Van Hensbergen: "This includes a number of patches that didn't quite make the cut last merge window while we addressed some outstanding issues and review comments. It includes some new caching modes for those that only want readahead caches and reworks how we do writeback caching so we are not keeping extra references around which both causes performance problems and uses lots of additional resources on the server. It also includes a new flag to force disabling of xattrs which can also cause major performance issues, particularly if the underlying filesystem on the server doesn't support them. Finally it adds a couple of additional mount options to better support directio and enabling caches when the server doesn't support qid.version. There was one late-breaking bug report that has also been included as its own patch where I forgot to propagate an embarassing bit-logic fix to the various variations of open" * tag '9p-6.4-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: fs/9p: Fix bit operation logic error fs/9p: Rework cache modes and add new options to Documentation fs/9p: remove writeback fid and fix per-file modes fs/9p: Add new mount modes 9p: Add additional debug flags and open modes fs/9p: allow disable of xattr support on mount fs/9p: Remove unnecessary superblock flags fs/9p: Consolidate file operations and add readahead and writeback commit d7385ba137711ea71527a605cac162610a621de8 Author: Jason Andryuk Date: Thu May 4 15:47:23 2023 -0400 9p: Remove INET dependency 9pfs can run over assorted transports, so it doesn't have an INET dependency. Drop it and remove the includes of linux/inet.h. NET_9P_FD/trans_fd.o builds without INET or UNIX and is usable over plain file descriptors. However, tcp and unix functionality is still built and would generate runtime failures if used. Add imply INET and UNIX to NET_9P_FD, so functionality is enabled by default but can still be explicitly disabled. This allows configuring 9pfs over Xen with INET and UNIX disabled. Signed-off-by: Jason Andryuk Signed-off-by: David S. Miller commit a1fd058b07d58c3372c1aba25dd65f1c9c9b65f1 Merge: 15fb96a35db7a 6152e53d9671b Author: Linus Torvalds Date: Thu May 4 13:21:16 2023 -0700 Merge tag 'mm-hotfixes-stable-2023-05-03-16-27' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull hitfixes from Andrew Morton: "Five hotfixes. Three are cc:stable, two for this -rc cycle" * tag 'mm-hotfixes-stable-2023-05-03-16-27' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: mm: change per-VMA lock statistics to be disabled by default MAINTAINERS: update Michal Simek's email mm/mempolicy: correctly update prev when policy is equal on mbind relayfs: fix out-of-bounds access in relay_file_read kasan: hw_tags: avoid invalid virt_to_page() commit 37f225ecc2e06e21276700b42f682b0f2fe565e4 Author: Michal Simek Date: Wed May 3 10:40:55 2023 +0200 dt-bindings: xilinx: Remove Naga from memory and mtd bindings Naga is no longer works for AMD/Xilinx and there is no activity from him to continue to maintain Xilinx related drivers. Two drivers have Miquel as maintainer and for the last one add myself instead to be kept in a loop if there is any change required. Signed-off-by: Michal Simek Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/6b4cdc7158599b4a38409a03eda56e38975b6233.1683103250.git.michal.simek@amd.com Signed-off-by: Rob Herring commit 15fb96a35db7aad8eb7cf98206b10e50a966e388 Merge: 671e148d079f4 245f092268936 Author: Linus Torvalds Date: Thu May 4 13:09:43 2023 -0700 Merge tag 'mm-stable-2023-05-03-16-22' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull more MM updates from Andrew Morton: - Some DAMON cleanups from Kefeng Wang - Some KSM work from David Hildenbrand, to make the PR_SET_MEMORY_MERGE ioctl's behavior more similar to KSM's behavior. [ Andrew called these "final", but I suspect we'll have a series fixing up the fact that the last commit in the dmapools series in the previous pull seems to have unintentionally just reverted all the other commits in the same series.. - Linus ] * tag 'mm-stable-2023-05-03-16-22' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: mm: hwpoison: coredump: support recovery from dump_user_range() mm/page_alloc: add some comments to explain the possible hole in __pageblock_pfn_to_page() mm/ksm: move disabling KSM from s390/gmap code to KSM code selftests/ksm: ksm_functional_tests: add prctl unmerge test mm/ksm: unmerge and clear VM_MERGEABLE when setting PR_SET_MEMORY_MERGE=0 mm/damon/paddr: fix missing folio_sz update in damon_pa_young() mm/damon/paddr: minor refactor of damon_pa_mark_accessed_or_deactivate() mm/damon/paddr: minor refactor of damon_pa_pageout() commit 671e148d079f4d4eca0a98f7dadf1fe69d856374 Merge: 611c9d88302cb 0fddb79bf283a Author: Linus Torvalds Date: Thu May 4 12:45:32 2023 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "A few arm64 fixes that came in during the merge window for -rc1. The main thing is restoring the pointer authentication hwcaps, which disappeared during some recent refactoring - Fix regression in CPU erratum workaround when disabling the MMU - Fix detection of pointer authentication hwcaps - Avoid writeable, executable ELF sections in vmlinux" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: lds: move .got section out of .text arm64: kernel: remove SHF_WRITE|SHF_EXECINSTR from .idmap.text arm64: cpufeature: Fix pointer auth hwcaps arm64: Fix label placement in record_mmu_state() commit 611c9d88302cb9ac3b0f58f4a06c0ffb98345bd2 Merge: a1f749de8a610 2fa5ebe3bc4e3 Author: Linus Torvalds Date: Thu May 4 12:40:16 2023 -0700 Merge tag 'loongarch-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch updates from Huacai Chen: - Better backtraces for humanization - Relay BCE exceptions to userland as SIGSEGV - Provide kernel fpu functions - Optimize memory ops (memset/memcpy/memmove) - Optimize checksum and crc32(c) calculation - Add ARCH_HAS_FORTIFY_SOURCE selection - Add function error injection support - Add ftrace with direct call support - Add basic perf tools support * tag 'loongarch-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: (24 commits) tools/perf: Add basic support for LoongArch LoongArch: ftrace: Add direct call trampoline samples support LoongArch: ftrace: Add direct call support LoongArch: ftrace: Implement ftrace_find_callable_addr() to simplify code LoongArch: ftrace: Fix build error if DYNAMIC_FTRACE_WITH_REGS is not set LoongArch: ftrace: Abstract DYNAMIC_FTRACE_WITH_ARGS accesses LoongArch: Add support for function error injection LoongArch: Add ARCH_HAS_FORTIFY_SOURCE selection LoongArch: crypto: Add crc32 and crc32c hw acceleration LoongArch: Add checksum optimization for 64-bit system LoongArch: Optimize memory ops (memset/memcpy/memmove) LoongArch: Provide kernel fpu functions LoongArch: Relay BCE exceptions to userland as SIGSEGV with si_code=SEGV_BNDERR LoongArch: Tweak the BADV and CPUCFG.PRID lines in show_regs() LoongArch: Humanize the ESTAT line when showing registers LoongArch: Humanize the ECFG line when showing registers LoongArch: Humanize the EUEN line when showing registers LoongArch: Humanize the PRMD line when showing registers LoongArch: Humanize the CRMD line when showing registers LoongArch: Fix format of CSR lines during show_regs() ... commit a1f749de8a610096ca0dd9a40d89c8fa4098c8eb Merge: 1a5304fecee52 1f62ed00a56bf Author: Linus Torvalds Date: Thu May 4 12:25:05 2023 -0700 Merge tag 'csky-for-linus-6.4' of https://github.com/c-sky/csky-linux Pull arch/csky updates from Guo Ren: - Remove CPU_TLB_SIZE config - Prevent spurious page faults * tag 'csky-for-linus-6.4' of https://github.com/c-sky/csky-linux: csky: mmu: Prevent spurious page faults csky: remove obsolete config CPU_TLB_SIZE commit b5d68f84f4c62c78bc3d004911d80da5aa22df8b Author: Srinivas Pandruvada Date: Wed May 3 16:38:50 2023 -0700 thermal: intel: powerclamp: Fix NULL pointer access issue If cur_state for the powerclamp cooling device is set to the default minimum state of 0, without setting first to cur_state > 0, this results in NULL pointer access. This NULL pointer access happens in the powercap core idle-inject function idle_inject_set_duration() as there is no NULL check for idle_inject_device pointer. This pointer must be allocated by calling idle_inject_register() or idle_inject_register_full(). In the function powerclamp_set_cur_state(), idle_inject_device pointer is allocated only when the cur_state > 0. But setting 0 without changing to any other state, idle_inject_set_duration() will be called with a NULL idle_inject_device pointer. To address this, just return from powerclamp_set_cur_state() if the current cooling device state is the same as the last one. Since the power-up default cooling device state is 0, changing the state to 0 again here will return without calling idle_inject_set_duration(). Signed-off-by: Srinivas Pandruvada Fixes: 8526eb7fc75a ("thermal: intel: powerclamp: Use powercap idle-inject feature") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=217386 Tested-by: Risto A. Paju Cc: 6.3+ # 6.3+ Signed-off-by: Rafael J. Wysocki commit 3db66620ea90b0fd4134b31eabfec16d7b07d7e3 Author: Hans de Goede Date: Fri Apr 28 15:23:50 2023 +0200 ACPI: video: Remove acpi_backlight=video quirk for Lenovo ThinkPad W530 Remove the acpi_backlight=video quirk for Lenovo ThinkPad W530. This was intended to help users of the (unsupported) Nvidia binary driver, but this has been reported to cause backlight control issues for users who have the gfx configured in hybrid (dual-GPU) mode, so drop this. The Nvidia binary driver should call acpi_video_register_backlight() when necessary and this has been reported to Nvidia. Until this is fixed Nvidia binary driver users can work around this by passing "acpi_backlight=video" on the kernel commandline (with the latest 6.1.y or newer stable series, kernels < 6.1.y don't need this). Fixes: a5b2781dcab2 ("ACPI: video: Add acpi_backlight=video quirk for Lenovo ThinkPad W530") Reported-by: Русев Путин Link: https://lore.kernel.org/linux-acpi/CAK4BXn0ngZRmzx1bodAF8nmYj0PWdUXzPGHofRrsyZj8MBpcVA@mail.gmail.com/ Cc: 6.1+ # 6.1+ Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 9d9ff3d2a4a567b543b71c2967d2ccc5e0ac6816 Author: Guillaume Ranquet Date: Fri Apr 14 18:07:47 2023 +0200 phy: mediatek: hdmi: mt8195: fix wrong pll calculus The clock rate calculus in mtk_hdmi_pll_calc() was wrong when it has been replaced by 'div_u64'. Fix the issue by multiplying the values in the denominator instead of dividing them. Fixes: 45810d486bb44 ("phy: mediatek: add support for phy-mtk-hdmi-mt8195") Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Guillaume Ranquet Link: https://lore.kernel.org/r/20230413-fixes-for-mt8195-hdmi-phy-v2-2-bbad62e64321@baylibre.com Signed-off-by: Vinod Koul commit 714dd3c29a2241fb799586a5b03773103ca50fe5 Author: Guillaume Ranquet Date: Fri Apr 14 18:07:46 2023 +0200 phy: mediatek: hdmi: mt8195: fix uninitialized variable usage in pll_calc The ret variable in mtk_hdmi_pll_calc() was used unitialized as reported by the kernel test robot. Fix the issue by removing the variable altogether and testing out the return value of mtk_hdmi_pll_set_hw() Fixes: 45810d486bb44 ("phy: mediatek: add support for phy-mtk-hdmi-mt8195") Reported-by: kernel test robot Signed-off-by: Guillaume Ranquet Reviewed-by: Nathan Chancellor Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230413-fixes-for-mt8195-hdmi-phy-v2-1-bbad62e64321@baylibre.com Signed-off-by: Vinod Koul commit c148dc8e2fa403be501612ee409db866eeed35c0 Author: Claudio Imbrenda Date: Fri Apr 28 11:27:53 2023 +0200 KVM: s390: fix race in gmap_make_secure() Fix a potential race in gmap_make_secure() and remove the last user of follow_page() without FOLL_GET. The old code is locking something it doesn't have a reference to, and as explained by Jason and David in this discussion: https://lore.kernel.org/linux-mm/Y9J4P%2FRNvY1Ztn0Q@nvidia.com/ it can lead to all kind of bad things, including the page getting unmapped (MADV_DONTNEED), freed, reallocated as a larger folio and the unlock_page() would target the wrong bit. There is also another race with the FOLL_WRITE, which could race between the follow_page() and the get_locked_pte(). The main point is to remove the last use of follow_page() without FOLL_GET or FOLL_PIN, removing the races can be considered a nice bonus. Link: https://lore.kernel.org/linux-mm/Y9J4P%2FRNvY1Ztn0Q@nvidia.com/ Suggested-by: Jason Gunthorpe Fixes: 214d9bbcd3a6 ("s390/mm: provide memory management functions for protected KVM guests") Reviewed-by: Jason Gunthorpe Signed-off-by: Claudio Imbrenda Message-Id: <20230428092753.27913-2-imbrenda@linux.ibm.com> commit 292a7d6fca33df70ca4b8e9b0d0e74adf87582dc Author: Claudio Imbrenda Date: Fri Apr 21 10:50:36 2023 +0200 KVM: s390: pv: fix asynchronous teardown for small VMs On machines without the Destroy Secure Configuration Fast UVC, the topmost level of page tables is set aside and freed asynchronously as last step of the asynchronous teardown. Each gmap has a host_to_guest radix tree mapping host (userspace) addresses (with 1M granularity) to gmap segment table entries (pmds). If a guest is smaller than 2GB, the topmost level of page tables is the segment table (i.e. there are only 2 levels). Replacing it means that the pointers in the host_to_guest mapping would become stale and cause all kinds of nasty issues. This patch fixes the issue by disallowing asynchronous teardown for guests with only 2 levels of page tables. Userspace should (and already does) try using the normal destroy if the asynchronous one fails. Update s390_replace_asce so it refuses to replace segment type ASCEs. This is still needed in case the normal destroy VM fails. Fixes: fb491d5500a7 ("KVM: s390: pv: asynchronous destroy for reboot") Reviewed-by: Marc Hartmayer Reviewed-by: Janosch Frank Signed-off-by: Claudio Imbrenda Message-Id: <20230421085036.52511-2-imbrenda@linux.ibm.com> commit d2b7fa6174bc4260e496cbf84375c73636914641 Author: Breno Leitao Date: Thu May 4 05:18:56 2023 -0700 io_uring: Remove unnecessary BUILD_BUG_ON In the io_uring_cmd_prep_async() there is an unnecessary compilation time check to check if cmd is correctly placed at field 48 of the SQE. This is unnecessary, since this check is already in place at io_uring_init(): BUILD_BUG_SQE_ELEM(48, __u64, addr3); Remove it and the uring_cmd_pdu_size() function, which is not used anymore. Keith started a discussion about this topic in the following thread: Link: https://lore.kernel.org/lkml/ZDBmQOhbyU0iLhMw@kbusch-mbp.dhcp.thefacebook.com/ Signed-off-by: Breno Leitao Reviewed-by: Christoph Hellwig Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/20230504121856.904491-4-leitao@debian.org Signed-off-by: Jens Axboe commit fd9b8547bc5c34186dc42ea05fb4380d21695374 Author: Breno Leitao Date: Thu May 4 05:18:55 2023 -0700 io_uring: Pass whole sqe to commands Currently uring CMD operation relies on having large SQEs, but future operations might want to use normal SQE. The io_uring_cmd currently only saves the payload (cmd) part of the SQE, but, for commands that use normal SQE size, it might be necessary to access the initial SQE fields outside of the payload/cmd block. So, saves the whole SQE other than just the pdu. This changes slightly how the io_uring_cmd works, since the cmd structures and callbacks are not opaque to io_uring anymore. I.e, the callbacks can look at the SQE entries, not only, in the cmd structure. The main advantage is that we don't need to create custom structures for simple commands. Creates io_uring_sqe_cmd() that returns the cmd private data as a null pointer and avoids casting in the callee side. Also, make most of ublk_drv's sqe->cmd priv structure into const, and use io_uring_sqe_cmd() to get the private structure, removing the unwanted cast. (There is one case where the cast is still needed since the header->{len,addr} is updated in the private structure) Suggested-by: Pavel Begunkov Signed-off-by: Breno Leitao Reviewed-by: Keith Busch Reviewed-by: Christoph Hellwig Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/20230504121856.904491-3-leitao@debian.org Signed-off-by: Jens Axboe commit 96c7d4f81db0fea05c0792f7563ae0cb4ad5f022 Author: Breno Leitao Date: Thu May 4 05:18:54 2023 -0700 io_uring: Create a helper to return the SQE size Create a simple helper that returns the size of the SQE. The SQE could have two size, depending of the flags. If IO_URING_SETUP_SQE128 flag is set, then return a double SQE, otherwise returns the sizeof of io_uring_sqe (64 bytes). Signed-off-by: Breno Leitao Reviewed-by: Christoph Hellwig Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/20230504121856.904491-2-leitao@debian.org Signed-off-by: Jens Axboe commit b9850ec0027ca7639141706101bce09b8e3224e6 Merge: 6a341729fb31b f057b63bc11d8 Author: Paolo Abeni Date: Thu May 4 10:48:10 2023 +0200 Merge tag 'nf-23-05-03' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains one Netfilter fix: 1) Restore 'ct state untracked' matching with CONFIG_RETPOLINE=y, from Florian Westphal. * tag 'nf-23-05-03' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_tables: fix ct untracked match breakage ==================== Link: https://lore.kernel.org/r/20230503201143.12310-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 0d727e1856ef22dd9337199430258cb64cbbc658 Author: Ruliang Lin Date: Thu May 4 14:50:53 2023 +0800 ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init` Smatch complains that: snd_usb_caiaq_input_init() warn: missing error code 'ret' This patch adds a new case to handle the situation where the device does not support any input methods in the `snd_usb_caiaq_input_init` function. It returns an `-EINVAL` error code to indicate that no input methods are supported on the device. Fixes: 523f1dce3743 ("[ALSA] Add Native Instrument usb audio device support") Signed-off-by: Ruliang Lin Reviewed-by: Dongliang Mu Acked-by: Daniel Mack Link: https://lore.kernel.org/r/20230504065054.3309-1-u202112092@hust.edu.cn Signed-off-by: Takashi Iwai commit a26cc2934331b57b5a7164bff344f0a2ec245fc0 Author: Saravana Kannan Date: Thu Mar 9 22:39:09 2023 -0800 drm/mipi-dsi: Set the fwnode for mipi_dsi_device After commit 3fb16866b51d ("driver core: fw_devlink: Make cycle detection more robust"), fw_devlink prints an error when consumer devices don't have their fwnode set. This used to be ignored silently. Set the fwnode mipi_dsi_device so fw_devlink can find them and properly track their dependencies. This fixes errors like this: [ 0.334054] nwl-dsi 30a00000.mipi-dsi: Failed to create device link with regulator-lcd-1v8 [ 0.346964] nwl-dsi 30a00000.mipi-dsi: Failed to create device link with backlight-dsi Reported-by: Martin Kepplinger Link: https://lore.kernel.org/lkml/2a8e407f4f18c9350f8629a2b5fa18673355b2ae.camel@puri.sm/ Fixes: 068a00233969 ("drm: Add MIPI DSI bus support") Signed-off-by: Saravana Kannan Tested-by: Martin Kepplinger Link: https://lore.kernel.org/r/20230310063910.2474472-1-saravanak@google.com Signed-off-by: Maxime Ripard commit 7501f472977df233d039d86c6981e0641708e1ca Author: Geraldo Nascimento Date: Wed May 3 18:02:06 2023 -0300 ALSA: usb-audio: Add quirk for Pioneer DDJ-800 One more Pioneer quirk, this time for DDJ-800, which is quite similar like other DJ DDJ models but with slightly different EPs or channels. Signed-off-by: Geraldo Nascimento Tested-by: Grégory Desor Cc: Link: https://lore.kernel.org/r/ZFLLzgEcsSF5aIHG@geday Signed-off-by: Takashi Iwai commit e7477cb97607b373d175a759c8c0270a640ab3f2 Author: Caleb Harper Date: Wed May 3 12:50:26 2023 -0500 ALSA: hda/realtek: support HP Pavilion Aero 13-be0xxx Mute LED This patch adds support for the mute LED on the HP Pavilion Aero Laptop 13-be0xxx. The current behavior is that the LED does not turn on at any time and does not indicate to the user whether the sound is muted. The solution is to add a PCI quirk to properly recognize and support the LED on this device. This change has been tested on the device in question using modified versions of kernels 6.0.7-6.2.12 on Arch Linux. Signed-off-by: Caleb Harper Cc: Link: https://lore.kernel.org/r/20230503175026.6796-1-calebharp2005@gmail.com Signed-off-by: Takashi Iwai commit d396133dced4cbaa52581d0e9c4aea8e04b8db10 Author: Devi Priya Date: Thu Apr 6 11:43:12 2023 +0530 dt-bindings: mailbox: qcom: add compatible for IPQ9574 SoC Add the mailbox compatible for IPQ9574 SoC. Acked-by: Krzysztof Kozlowski Signed-off-by: Devi Priya Signed-off-by: Jassi Brar commit e17225887005f5cc6f18cb0fe9519849856b01b5 Author: Krzysztof Kozlowski Date: Mon Mar 27 16:07:49 2023 +0200 mailbox: qcom-apcs-ipc: do not grow the of_device_id Re-organize the compatible devices and add a comment to avoid unneeded of_device_id growth with every new SoC. These devices have quite a lot of similarities and they can use only one compatible fallback for driver binding. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar commit 34d8775a0edc479644414c0dd2d880fb8aad55b0 Author: Krzysztof Kozlowski Date: Thu May 4 00:57:33 2023 -0500 dt-bindings: mailbox: qcom,apcs-kpss-global: use fallbacks for few variants Rework the compatibles of IPQ8074, SC7180, SC8180X and SM8150 as compatible devices (same from Linux driver point of view). This allows smaller of_device_id table in the Linux driver and smaller allOf:if:then: constraints. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Jassi Brar commit 26e02e6c1012793248096028287ae7296029cd29 Author: AngeloGioacchino Del Regno Date: Mon Mar 27 10:36:37 2023 +0200 dt-bindings: mailbox: mediatek,gce-mailbox: Add support for MT6795 Add a compatible string for the MT6795 Helio X10 SoC using MT8173 binding and add a header for the MT6795's GCE mailbox. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar commit 5f84a056cf437c4ee5f7ca5bc6928cc56ea5206c Author: Conor Dooley Date: Thu Mar 9 20:44:50 2023 +0000 mailbox: mpfs: convert SOC_MICROCHIP_POLARFIRE to ARCH_MICROCHIP_POLARFIRE As part of converting RISC-V SOC_FOO symbols to ARCH_FOO to match the use of such symbols on other architectures, convert the Microchip FPGA mailbox driver to use the new symbol. Signed-off-by: Conor Dooley Signed-off-by: Jassi Brar commit e2aa7993115cfab8a1e6efa7cae05b6817ea69be Author: Krzysztof Kozlowski Date: Sat Mar 11 12:17:39 2023 +0100 mailbox: bcm-pdc: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/mailbox/bcm-pdc-mailbox.c:1474:34: error: ‘pdc_mbox_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar commit 7490b8fb98848df2e7ac5c4a0fc2e898146695d1 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:17:38 2023 +0100 mailbox: rockchip: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/mailbox/rockchip-mailbox.c:158:34: error: ‘rockchip_mbox_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar commit 2d1e952a2b8e5e92d8d55ac88a7cf7ca5ea591ad Author: Lee Jones Date: Thu Apr 20 08:27:18 2023 +0100 mailbox: mailbox-test: Fix potential double-free in mbox_test_message_write() If a user can make copy_from_user() fail, there is a potential for UAF/DF due to a lack of locking around the allocation, use and freeing of the data buffers. This issue is not theoretical. I managed to author a POC for it: BUG: KASAN: double-free in kfree+0x5c/0xac Free of addr ffff29280be5de00 by task poc/356 CPU: 1 PID: 356 Comm: poc Not tainted 6.1.0-00001-g961aa6552c04-dirty #20 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace.part.0+0xe0/0xf0 show_stack+0x18/0x40 dump_stack_lvl+0x64/0x80 print_report+0x188/0x48c kasan_report_invalid_free+0xa0/0xc0 ____kasan_slab_free+0x174/0x1b0 __kasan_slab_free+0x18/0x24 __kmem_cache_free+0x130/0x2e0 kfree+0x5c/0xac mbox_test_message_write+0x208/0x29c full_proxy_write+0x90/0xf0 vfs_write+0x154/0x440 ksys_write+0xcc/0x180 __arm64_sys_write+0x44/0x60 invoke_syscall+0x60/0x190 el0_svc_common.constprop.0+0x7c/0x160 do_el0_svc+0x40/0xf0 el0_svc+0x2c/0x6c el0t_64_sync_handler+0xf4/0x120 el0t_64_sync+0x18c/0x190 Allocated by task 356: kasan_save_stack+0x3c/0x70 kasan_set_track+0x2c/0x40 kasan_save_alloc_info+0x24/0x34 __kasan_kmalloc+0xb8/0xc0 kmalloc_trace+0x58/0x70 mbox_test_message_write+0x6c/0x29c full_proxy_write+0x90/0xf0 vfs_write+0x154/0x440 ksys_write+0xcc/0x180 __arm64_sys_write+0x44/0x60 invoke_syscall+0x60/0x190 el0_svc_common.constprop.0+0x7c/0x160 do_el0_svc+0x40/0xf0 el0_svc+0x2c/0x6c el0t_64_sync_handler+0xf4/0x120 el0t_64_sync+0x18c/0x190 Freed by task 357: kasan_save_stack+0x3c/0x70 kasan_set_track+0x2c/0x40 kasan_save_free_info+0x38/0x5c ____kasan_slab_free+0x13c/0x1b0 __kasan_slab_free+0x18/0x24 __kmem_cache_free+0x130/0x2e0 kfree+0x5c/0xac mbox_test_message_write+0x208/0x29c full_proxy_write+0x90/0xf0 vfs_write+0x154/0x440 ksys_write+0xcc/0x180 __arm64_sys_write+0x44/0x60 invoke_syscall+0x60/0x190 el0_svc_common.constprop.0+0x7c/0x160 do_el0_svc+0x40/0xf0 el0_svc+0x2c/0x6c el0t_64_sync_handler+0xf4/0x120 el0t_64_sync+0x18c/0x190 Signed-off-by: Lee Jones Signed-off-by: Jassi Brar commit be884585852e7d8336e765504399972b3034a89f Author: Lee Jones Date: Thu Apr 20 08:27:17 2023 +0100 mailbox: mailbox-test: Explicitly include header for spinlock support Presently the support appears to be implied. Signed-off-by: Lee Jones Signed-off-by: Jassi Brar commit 6be2ea33a4093402252724a00c4af8033725184c Author: Paulo Alcantara Date: Thu Apr 27 04:40:08 2023 -0300 cifs: avoid potential races when handling multiple dfs tcons Now that a DFS tcon manages its own list of DFS referrals and sessions, there is no point in having a single worker to refresh referrals of all DFS tcons. Make it faster and less prone to race conditions when having several mounts by queueing a worker per DFS tcon that will take care of refreshing only the DFS referrals related to it. Cc: stable@vger.kernel.org # v6.2+ Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 3dc9c433c9dde15477d02b609ccb4328e2adb6dc Author: Paulo Alcantara Date: Wed Apr 26 13:43:53 2023 -0300 cifs: protect access of TCP_Server_Info::{origin,leaf}_fullpath Protect access of TCP_Server_Info::{origin,leaf}_fullpath when matching DFS connections, and get rid of TCP_Server_Info::current_fullpath while we're at it. Cc: stable@vger.kernel.org # v6.2+ Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit ee20d7c6100752eaf2409d783f4f1449c29ea33d Author: Paulo Alcantara Date: Tue Apr 25 02:42:56 2023 -0300 cifs: fix potential race when tree connecting ipc Protect access of TCP_Server_Info::hostname when building the ipc tree name as it might get freed in cifsd thread and thus causing an use-after-free bug in __tree_connect_dfs_target(). Also, while at it, update status of IPC tcon on success and then avoid any extra tree connects. Cc: stable@vger.kernel.org # v6.2+ Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit eb307d09fe15844fdaebeb8cc8c9b9e925430aa5 Author: Namjae Jeon Date: Wed May 3 08:51:51 2023 +0900 ksmbd: call rcu_barrier() in ksmbd_server_exit() racy issue is triggered the bug by racing between closing a connection and rmmod. In ksmbd, rcu_barrier() is not called at module unload time, so nothing prevents ksmbd from getting unloaded while it still has RCU callbacks pending. It leads to trigger unintended execution of kernel code locally and use to defeat protections such as Kernel Lockdown Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20477 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 30210947a343b6b3ca13adc9bfc88e1543e16dd5 Author: Namjae Jeon Date: Wed May 3 08:51:12 2023 +0900 ksmbd: fix racy issue under cocurrent smb2 tree disconnect There is UAF issue under cocurrent smb2 tree disconnect. This patch introduce TREE_CONN_EXPIRE flags for tcon to avoid cocurrent access. Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20592 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit abcc506a9a71976a8b4c9bf3ee6efd13229c1e19 Author: Namjae Jeon Date: Wed May 3 14:03:40 2023 +0900 ksmbd: fix racy issue from smb2 close and logoff with multichannel When smb client send concurrent smb2 close and logoff request with multichannel connection, It can cause racy issue. logoff request free tcon and can cause UAF issues in smb2 close. When receiving logoff request with multichannel, ksmbd should wait until all remaning requests complete as well as ones in the current connection, and then make session expired. Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20796 ZDI-CAN-20595 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 3353ab2df5f68dab7da8d5ebb427a2d265a1f2b2 Author: Namjae Jeon Date: Wed May 3 08:45:08 2023 +0900 ksmbd: not allow guest user on multichannel This patch return STATUS_NOT_SUPPORTED if binding session is guest. Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20480 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 7b4323373d844954bb76e0e9f39c4e5fc785fa7b Author: Namjae Jeon Date: Wed May 3 08:44:14 2023 +0900 ksmbd: fix deadlock in ksmbd_find_crypto_ctx() Deadlock is triggered by sending multiple concurrent session setup requests. It should be reused after releasing when getting ctx for crypto. Multiple consecutive ctx uses cause deadlock while waiting for releasing due to the limited number of ctx. Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20591 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit b096d97f47326b1e2dbdef1c91fab69ffda54d17 Author: Namjae Jeon Date: Wed May 3 08:43:30 2023 +0900 ksmbd: block asynchronous requests when making a delay on session setup ksmbd make a delay of 5 seconds on session setup to avoid dictionary attacks. But the 5 seconds delay can be bypassed by using asynchronous requests. This patch block all requests on current connection when making a delay on sesstion setup failure. Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20482 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit ea174a91893956450510945a0c5d1a10b5323656 Author: Namjae Jeon Date: Wed May 3 08:42:21 2023 +0900 ksmbd: destroy expired sessions client can indefinitely send smb2 session setup requests with the SessionId set to 0, thus indefinitely spawning new sessions, and causing indefinite memory usage. This patch limit to the number of sessions using expired timeout and session state. Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20478 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit f5c779b7ddbda30866cf2a27c63e34158f858c73 Author: Namjae Jeon Date: Wed May 3 16:45:00 2023 +0900 ksmbd: fix racy issue from session setup and logoff This racy issue is triggered by sending concurrent session setup and logoff requests. This patch does not set connection status as KSMBD_SESS_GOOD if state is KSMBD_SESS_NEED_RECONNECT in session setup. And relookup session to validate if session is deleted in logoff. Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20481, ZDI-CAN-20590, ZDI-CAN-20596 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 3ac00a2ab69b34189942afa9e862d5170cdcb018 Author: Namjae Jeon Date: Wed May 3 08:38:33 2023 +0900 ksmbd: fix NULL pointer dereference in smb2_get_info_filesystem() If share is , share->path is NULL and it cause NULL pointer dereference issue. Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20479 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 6d7cb549c2ca20e1f07593f15e936fd54b763028 Author: Namjae Jeon Date: Wed May 3 08:26:45 2023 +0900 ksmbd: fix memleak in session setup If client send session setup request with unknown NTLMSSP message type, session that does not included channel can be created. It will cause session memleak. because ksmbd_sessions_deregister() does not destroy session if channel is not included. This patch return error response if client send the request unknown NTLMSSP message type. Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20593 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 1253685f0d3eb3eab0bfc4bf15ab341a5f3da0c8 Author: Guchun Chen Date: Wed Apr 26 09:46:54 2023 +0800 drm/amdgpu: drop redundant sched job cleanup when cs is aborted Once command submission failed due to userptr invalidation in amdgpu_cs_submit, legacy code will perform cleanup of scheduler job. However, it's not needed at all, as former commit has integrated job cleanup stuff into amdgpu_job_free. Otherwise, because of double free, a NULL pointer dereference will occur in such scenario. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2457 Fixes: f7d66fb2ea43 ("drm/amdgpu: cleanup scheduler job initialization v2") Signed-off-by: Guchun Chen Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 682439fffad9fa9a38d37dd1b1318e9374232213 Author: Samson Tam Date: Wed Apr 19 18:17:14 2023 -0400 drm/amd/display: filter out invalid bits in pipe_fuses [Why] Reading pipe_fuses from register may have invalid bits set, which may affect the num_pipes erroneously. [How] Add read_pipes_fuses() call and filter bits based on expected number of pipes. Reviewed-by: Alvin Lee Acked-by: Alan Liu Signed-off-by: Samson Tam Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.1.x commit 8f586cc16c1fc3c2202c9d54563db8c7ed365f82 Author: Leo Chen Date: Thu Apr 13 17:34:24 2023 -0400 drm/amd/display: Change default Z8 watermark values [Why & How] Previous Z8 watermark values were causing flickering and OTC underflow. Updating Z8 watermark values based on the measurement. Reviewed-by: Nicholas Kazlauskas Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Acked-by: Alan Liu Signed-off-by: Leo Chen Signed-off-by: Alex Deucher commit 100bd00881f8553d0ccfc99a575966d990c455eb Author: Horace Chen Date: Tue Apr 25 13:15:32 2023 +0800 drm/amdgpu: disable SDMA WPTR_POLL_ENABLE for SR-IOV [Why] This WPTR_POLL_ENABLE is a hardware contigious polling which will cause FCLK and UCLK to keep on a high level. Mostly its case can be covered by F32_WPTR_POLL_ENABLE which polls by firmware. So to save power, SR-IOV also needs to disable this bit Signed-off-by: Horace Chen Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 2397e3d8d2e120355201a8310b61929f5a8bd2c0 Author: Chia-I Wu Date: Wed Apr 26 15:54:55 2023 -0700 drm/amdgpu: add a missing lock for AMDGPU_SCHED mgr->ctx_handles should be protected by mgr->lock. v2: improve commit message v3: add a Fixes tag Signed-off-by: Chia-I Wu Reviewed-by: Christian König Fixes: 52c6a62c64fa ("drm/amdgpu: add interface for editing a foreign process's priority v3") Signed-off-by: Alex Deucher commit 922a76ba31adf84e72bc947267385be420c689ee Author: Hamza Mahfooz Date: Tue May 2 11:59:08 2023 -0400 drm/amdgpu: fix an amdgpu_irq_put() issue in gmc_v9_0_hw_fini() As made mention of in commit 08c677cb0b43 ("drm/amdgpu: fix amdgpu_irq_put call trace in gmc_v10_0_hw_fini") and commit 13af556104fa ("drm/amdgpu: fix amdgpu_irq_put call trace in gmc_v11_0_hw_fini"). It is meaningless to call amdgpu_irq_put() for gmc.ecc_irq. So, remove it from gmc_v9_0_hw_fini(). Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2522 Fixes: 3029c855d79f ("drm/amdgpu: Fix desktop freezed after gpu-reset") Reviewed-by: Mario Limonciello Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 08c677cb0b436a96a836792bb35a8ec5de4999c2 Author: Horatio Zhang Date: Tue Apr 25 10:52:28 2023 +0800 drm/amdgpu: fix amdgpu_irq_put call trace in gmc_v10_0_hw_fini The gmc.ecc_irq is enabled by firmware per IFWI setting, and the host driver is not privileged to enable/disable the interrupt. So, it is meaningless to use the amdgpu_irq_put function in gmc_v10_0_hw_fini, which also leads to the call trace. [ 82.340264] Call Trace: [ 82.340265] [ 82.340269] gmc_v10_0_hw_fini+0x83/0xa0 [amdgpu] [ 82.340447] gmc_v10_0_suspend+0xe/0x20 [amdgpu] [ 82.340623] amdgpu_device_ip_suspend_phase2+0x127/0x1c0 [amdgpu] [ 82.340789] amdgpu_device_ip_suspend+0x3d/0x80 [amdgpu] [ 82.340955] amdgpu_device_pre_asic_reset+0xdd/0x2b0 [amdgpu] [ 82.341122] amdgpu_device_gpu_recover.cold+0x4dd/0xbb2 [amdgpu] [ 82.341359] amdgpu_debugfs_reset_work+0x4c/0x70 [amdgpu] [ 82.341529] process_one_work+0x21d/0x3f0 [ 82.341535] worker_thread+0x1fa/0x3c0 [ 82.341538] ? process_one_work+0x3f0/0x3f0 [ 82.341540] kthread+0xff/0x130 [ 82.341544] ? kthread_complete_and_exit+0x20/0x20 [ 82.341547] ret_from_fork+0x22/0x30 Signed-off-by: Horatio Zhang Reviewed-by: Hawking Zhang Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2522 Fixes: c8b5a95b5709 ("drm/amdgpu: Fix desktop freezed after gpu-reset") Cc: stable@vger.kernel.org commit 13af556104fa93b1945c70bbf8a0a62cd2c92879 Author: Horatio Zhang Date: Tue Apr 25 13:16:32 2023 +0800 drm/amdgpu: fix amdgpu_irq_put call trace in gmc_v11_0_hw_fini The gmc.ecc_irq is enabled by firmware per IFWI setting, and the host driver is not privileged to enable/disable the interrupt. So, it is meaningless to use the amdgpu_irq_put function in gmc_v11_0_hw_fini, which also leads to the call trace. [ 102.980303] Call Trace: [ 102.980303] [ 102.980304] gmc_v11_0_hw_fini+0x54/0x90 [amdgpu] [ 102.980357] gmc_v11_0_suspend+0xe/0x20 [amdgpu] [ 102.980409] amdgpu_device_ip_suspend_phase2+0x240/0x460 [amdgpu] [ 102.980459] amdgpu_device_ip_suspend+0x3d/0x80 [amdgpu] [ 102.980520] amdgpu_device_pre_asic_reset+0xd9/0x490 [amdgpu] [ 102.980573] amdgpu_device_gpu_recover.cold+0x548/0xce6 [amdgpu] [ 102.980687] amdgpu_debugfs_reset_work+0x4c/0x70 [amdgpu] [ 102.980740] process_one_work+0x21f/0x3f0 [ 102.980741] worker_thread+0x200/0x3e0 [ 102.980742] ? process_one_work+0x3f0/0x3f0 [ 102.980743] kthread+0xfd/0x130 [ 102.980743] ? kthread_complete_and_exit+0x20/0x20 [ 102.980744] ret_from_fork+0x22/0x30 Signed-off-by: Horatio Zhang Reviewed-by: Hawking Zhang Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2522 Fixes: c8b5a95b5709 ("drm/amdgpu: Fix desktop freezed after gpu-reset") Cc: stable@vger.kernel.org commit b03f38b9bd90d9eb29951e56f5a4375984c8dffb Author: Shane Xiao Date: Tue Apr 25 22:39:08 2023 +0800 drm/amdgpu: Enable doorbell selfring after resize FB BAR [Why] The selfring doorbell aperture will change when resize FB BAR successfully during gmc sw init, we should reorder the sequence of enabling doorbell selfring aperture. [How] Move enable_doorbell_selfring_aperture from *_common_hw_init to *_common_late_init. This fixes the potential issue that GPU ring its own doorbell when this device is in translated mode when iommu is on. v2: Remove *_enable_doorbell_aperture functions (Christian) v3: Add comments to note that why we need enable doorbell selfring late (Christian) Signed-off-by: Shane Xiao Signed-off-by: Aaron Liu Tested-by: Xiaomeng Hou Reviewed-by: Christian K�nig Signed-off-by: Alex Deucher commit 4eea7fb980dc44545a32eec92e2662053b34cd9d Author: lyndonli Date: Sun Apr 23 17:05:15 2023 +0800 drm/amdgpu: Use the default reset when loading or reloading the driver Below call trace and errors are observed when reloading amdgpu driver with the module parameter reset_method=3. It should do a default reset when loading or reloading the driver, regardless of the module parameter reset_method. v2: add comments inside and modify commit messages. [ +2.180243] [drm] psp gfx command ID_LOAD_TOC(0x20) failed and response status is (0x0) [ +0.000011] [drm:psp_hw_start [amdgpu]] *ERROR* Failed to load toc [ +0.000890] [drm:psp_hw_start [amdgpu]] *ERROR* PSP tmr init failed! [ +0.020683] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off. [ +0.000003] RIP: 0010:amdgpu_bo_release_notify+0x1ef/0x210 [amdgpu] [ +0.000004] Call Trace: [ +0.000003] [ +0.000008] ttm_bo_release+0x2c4/0x330 [amdttm] [ +0.000026] amdttm_bo_put+0x3c/0x70 [amdttm] [ +0.000020] amdgpu_bo_free_kernel+0xe6/0x140 [amdgpu] [ +0.000728] psp_v11_0_ring_destroy+0x34/0x60 [amdgpu] [ +0.000826] psp_hw_init+0xe7/0x2f0 [amdgpu] [ +0.000813] amdgpu_device_fw_loading+0x1ad/0x2d0 [amdgpu] [ +0.000731] amdgpu_device_init.cold+0x108e/0x2002 [amdgpu] [ +0.001071] ? do_pci_enable_device+0xe1/0x110 [ +0.000011] amdgpu_driver_load_kms+0x1a/0x160 [amdgpu] [ +0.000729] amdgpu_pci_probe+0x179/0x3a0 [amdgpu] Signed-off-by: lyndonli Signed-off-by: Yunxiang Li Reviewed-by: Feifei Xu Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 74a49415144035f171751d55b11ba04c9f348f9f Author: lyndonli Date: Sun Apr 23 16:46:30 2023 +0800 drm/amdgpu: Fix mode2 reset for sienna cichlid Before this change, sienna_cichlid_get_reset_handler will always return NULL, although the module parameter reset_method is 3 when loading amdgpu driver. Signed-off-by: lyndonli Signed-off-by: Yunxiang Li Reviewed-by: Feifei Xu Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 1a5304fecee523060f26e2778d9d8e33c0562df3 Merge: b4082428727b5 6e3220ba3323a Author: Linus Torvalds Date: Wed May 3 19:41:59 2023 -0700 Merge tag 'parisc-for-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "Two important fixes in here: - The argument pointer register was wrong when calling 64-bit firmware functions, which may cause random memory corruption or crashes. - Ensure page alignment in cache flush functions, otherwise not all memory might get flushed. The rest are cleanups (mmap implementation, panic path) and usual smaller updates. Summary: - Calculate correct argument pointer in real64_call_asm() - Cleanup mmap implementation regarding color alignment (John David Anglin) - Spinlock fixes in panic path (Guilherme G. Piccoli) - build doc update for parisc64 (Randy Dunlap) - Ensure page alignment in flush functions" * tag 'parisc-for-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix argument pointer in real64_call_asm() parisc: Cleanup mmap implementation regarding color alignment parisc: Drop HP-UX constants and structs from grfioctl.h parisc: Ensure page alignment in flush functions parisc: Replace regular spinlock with spin_trylock on panic path parisc: update kbuild doc. aliases for parisc64 parisc: Limit amount of kgdb breakpoints on parisc commit b4082428727b58f223661278974527ef9a9661e0 Merge: 049a18f232887 0b891c83d8c54 Author: Linus Torvalds Date: Wed May 3 19:19:34 2023 -0700 Merge tag 'modules-6.4-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull modules fix from Luis Chamberlain: "One fix by Arnd far for modules which came in after the first pull request. The issue was found as part of some late compile tests with 0-day. I take it 0-day does some secondary late builds with after some initial ones" * tag 'modules-6.4-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: module: include internal.h in module/dups.c commit 049a18f232887834fc77e7cee46f06b5043aea22 Merge: 342528ff00e8a 0199849acd07d Author: Linus Torvalds Date: Wed May 3 19:08:20 2023 -0700 Merge tag 'sysctl-6.4-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull more sysctl updates from Luis Chamberlain: "As mentioned on my first pull request for sysctl-next, for v6.4-rc1 we're very close to being able to deprecating register_sysctl_paths(). I was going to assess the situation after the first week of the merge window. That time is now and things are looking good. We only have one which had already an ACK for so I'm picking this up here now and the last patch is the one that uses an axe. I have boot tested the last patch and 0-day build completed successfully" * tag 'sysctl-6.4-rc1-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: sysctl: remove register_sysctl_paths() kernel: pid_namespace: simplify sysctls with register_sysctl() commit 342528ff00e8a7dd31c1ea0c0093c2289d769b39 Merge: 9f2692326b9c6 6032aca0deb9c Author: Linus Torvalds Date: Wed May 3 19:02:03 2023 -0700 Merge tag 'uml-for-linus-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux Pull uml updates from Richard Weinberger: - Make stub data pages configurable - Make it harder to mix user and kernel code by accident * tag 'uml-for-linus-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: um: make stub data pages size tweakable um: prevent user code in modules um: further clean up user_syms um: don't export printf() um: hostfs: define our own API boundary um: add __weak for exported functions commit 9f2692326b9c6db8d0e866d555606b12a507a363 Merge: fa31fc82fb775 b5fda08ef2133 Author: Linus Torvalds Date: Wed May 3 18:58:59 2023 -0700 Merge tag 'ubifs-for-linus-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull UBI and UBIFS updates from Richard Weinberger: "UBI: - Fix error value for try_write_vid_and_data() - Minor cleanups UBIFS: - Fixes for various memory leaks - Minor cleanups" * tag 'ubifs-for-linus-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubifs: Fix memleak when insert_old_idx() failed Revert "ubifs: dirty_cow_znode: Fix memleak in error handling path" ubifs: Fix memory leak in do_rename ubifs: Free memory for tmpfile name ubi: Fix return value overwrite issue in try_write_vid_and_data() ubifs: Remove return in compr_exit() ubi: Simplify bool conversion commit ec6f82b4c63cc68f8dc03316e725106d242706be Author: Hans de Goede Date: Sat Apr 29 12:47:21 2023 +0200 ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet The Nextbook Ares 8A tablet which has Android as factory OS, has a buggy DSDT with both ESSX8316 and 10EC5651 ACPI devices. This tablet actually uses an rt5651 codec, but the matching code ends up picking the ESSX8316 device, add a quirk to ignote the ESSX8316 device on this tablet. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Message-Id: <20230429104721.7176-1-hdegoede@redhat.com> Signed-off-by: Mark Brown commit 4a1b5bc73e9ce8373d50fdb8f74badd2b4bf324e Author: Andrey Rakhmatullin Date: Mon May 1 22:51:34 2023 +0400 ASoC: amd: yc: Add Asus VivoBook Pro 14 OLED M6400RC to the quirks list for acp6x This is needed (and enough) to get the internal mic visible and working. Signed-off-by: Andrey Rakhmatullin Message-Id: <20230501185134.34591-1-wrar@wrar.name> Signed-off-by: Mark Brown commit 84822215acd15bd86a7759a835271e63bba83a7b Author: Krzysztof Kozlowski Date: Wed May 3 16:41:02 2023 +0200 ASoC: codecs: wcd938x: fix accessing regmap on unattached devices The WCD938x comes with three devices on two Linux drivers: 1. RX Soundwire device (wcd938x-sdw.c driver), 2. TX Soundwire device, which is used to access devices via regmap (also wcd938x-sdw.c driver), 3. platform device (wcd938x.c driver) - glue and component master, actually having most of the code using TX Soundwire device regmap. When RX and TX Soundwire devices probe, the component master (platform device) bind tries to write micbias configuration via TX Soundwire regmap. This might happen before TX Soundwire enumerates, so the regmap access fails. On Qualcomm SM8550 board with WCD9385: qcom-soundwire 6d30000.soundwire-controller: Qualcomm Soundwire controller v2.0.0 Registered wcd938x_codec audio-codec: bound sdw:0:0217:010d:00:4 (ops wcd938x_sdw_component_ops) wcd938x_codec audio-codec: bound sdw:0:0217:010d:00:3 (ops wcd938x_sdw_component_ops) qcom-soundwire 6ad0000.soundwire-controller: swrm_wait_for_wr_fifo_avail err write overflow Fix the issue by: 1. Moving the regmap creation from platform device to TX Soundwire device. The regmap settings are moved as-is with one difference: making the wcd938x_regmap_config const. 2. Using regmap in cache only mode till the actual TX Soundwire device enumerates and then sync the regmap cache. Cc: # v3.14+ Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart Message-Id: <20230503144102.242240-1-krzysztof.kozlowski@linaro.org> Signed-off-by: Mark Brown commit fa31fc82fb775445c176e576304c4098222f47f2 Merge: 0153d8e695255 57ea3ab21c14e Author: Linus Torvalds Date: Wed May 3 12:01:05 2023 -0700 Merge tag 'pm-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These fix a hibernation test mode regression and clean up the intel_idle driver. Specifics: - Make test_resume work again after the changes that made hibernation open the snapshot device in exclusive mode (Chen Yu) - Clean up code in several places in intel_idle (Artem Bityutskiy)" * tag 'pm-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: intel_idle: mark few variables as __read_mostly intel_idle: do not sprinkle module parameter definitions around intel_idle: fix confusing message intel_idle: improve C-state flags handling robustness intel_idle: further intel_idle_init_cstates_icpu() cleanup intel_idle: clean up intel_idle_init_cstates_icpu() intel_idle: use pr_info() instead of printk() PM: hibernate: Do not get block device exclusively in test_resume mode PM: hibernate: Turn snapshot_test into global variable commit 0153d8e695255cdf3faa5cfa9f18b57158dc2764 Merge: 667de5c684407 2e70a47ceafe4 Author: Linus Torvalds Date: Wed May 3 11:49:57 2023 -0700 Merge tag 'acpi-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "These add two ACPI-related quirks and extend support for Apple device properties supplied via ACPI _DSM. Specifics: - Do not turn off unused power resources during initialization on the Toshiba Click Mini (Hans de Goede) - Support strings in device properties supplied by ACPI _DSM on Apple platforms (Hector Martin) - Add an ACPI device ID quirk for Lenovo Yoga Tablet 2 (Marius Hoch)" * tag 'acpi-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: property: Support strings in Apple _DSM props ACPI: x86: utils: Remove Lenovo Yoga Tablet 2's MAGN0001 ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini commit 667de5c68440732373f571f7eac4ff44b1b93ee7 Merge: 89b7fd5d7f3ce 53389edd40205 Author: Linus Torvalds Date: Wed May 3 11:46:01 2023 -0700 Merge tag 'thermal-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more thermal control updates from Rafael Wysocki: "These are mostly cleanups on top of the previously merged thermal control changes plus some driver fixes and the removal of the Intel Menlow thermal driver. Specifics: - Add compatible DT bindings for imx6sll and imx6ul to fix a dtbs check warning (Stefan Wahren) - Update the example in the DT bindings to reflect changes with the ADC node name for QCom TM and TM5 (Marijn Suijten) - Fix comments for the cpuidle_cooling_register() function to match the function prototype (Chenggang Wang) - Fix inconsistent temperature read and some Mediatek variant board reboot by reverting a change and handling the temperature differently (AngeloGioacchino Del Regno) - Fix a memory leak in the initialization error path for the Mediatek driver (Kang Chen) - Use of_address_to_resource() in the Mediatek driver (Rob Herring) - Fix unit address in the QCom tsens driver DT bindings (Krzysztof Kozlowski) - Clean up the step-wise thermal governor (Zhang Rui) - Introduce thermal_zone_device() for accessing the device field of struct thermal_zone_device and two drivers use it (Daniel Lezcano) - Clean up the ACPI thermal driver a bit (Daniel Lezcano) - Delete the thermal driver for Intel Menlow platforms that is not expected to have any users (Rafael Wysocki)" * tag 'thermal-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: intel: menlow: Get rid of this driver ACPI: thermal: Move to dedicated function sysfs extra attr creation ACPI: thermal: Use thermal_zone_device() thermal: intel: pch_thermal: Use thermal driver device to write a trace thermal: core: Encapsulate tz->device field thermal: gov_step_wise: Adjust code logic to match comment thermal: gov_step_wise: Delete obsolete comment dt-bindings: thermal: qcom-tsens: Correct unit address thermal/drivers/mediatek: Use of_address_to_resource() thermal/drivers/mediatek: Change clk_prepare_enable to devm_clk_get_enabled in mtk_thermal_probe thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe thermal/drivers/mediatek: Add temperature constraints to validate read Revert "thermal/drivers/mediatek: Add delay after thermal banks initialization" thermal/drivers/cpuidle_cooling: Delete unmatched comments dt-bindings: thermal: Use generic ADC node name in examples dt-bindings: imx-thermal: Add imx6sll and imx6ul compatible commit 89b7fd5d7f3ceda236cc1d0026986a5f57ecaf4a Merge: 4c9818d8652b9 247ee6c780406 Author: Linus Torvalds Date: Wed May 3 11:25:01 2023 -0700 Merge tag 'pwm/for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "The bulk of this is trivial conversions to the new .remove_new() callback for drivers as part of Uwe's effort to clean that up. Other than that a driver is added for Apple devices and various small fixes are included for existing drivers. Last but not least, this finally gets rid of the old pwm_request() and pwm_free() APIs are removed since the last user was dropped in v6.3" * tag 'pwm/for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (44 commits) pwm: Remove unused radix tree pwm: Delete deprecated functions pwm_request() and pwm_free() pwm: meson: Fix g12a ao clk81 name pwm: meson: Fix axg ao mux parents pwm: stm32: Enforce settings for PWM capture MAINTAINERS: Add entries for Apple PWM driver pwm: Add Apple PWM controller dt-bindings: pwm: Add Apple PWM controller pwm: mtk-disp: Configure double buffering before reading in .get_state() pwm: mtk-disp: Disable shadow registers before setting backlight values pwm: stm32-lp: Drop of_match_ptr for ID table pwm: rcar: Drop of_match_ptr for ID table dt-bindings: pwm: Convert Amlogic Meson PWM binding dt-bindings: pwm: mediatek: Add mediatek,mt7986 compatible pwm: xilinx: Convert to platform remove callback returning void pwm: vt8500: Convert to platform remove callback returning void pwm: tiehrpwm: Convert to platform remove callback returning void pwm: tiecap: Convert to platform remove callback returning void pwm: tegra: Convert to platform remove callback returning void pwm: sun4i: Convert to platform remove callback returning void ... commit 4c9818d8652b9824c73e456dd0d73ffba1d0e64d Merge: 54bdf8a39931c 67572c8dc6441 Author: Linus Torvalds Date: Wed May 3 11:21:07 2023 -0700 Merge tag 'soundwire-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire Pull soundwire updates from Vinod Koul: "This features AMD soundwire controller driver, a bunch of Intel changes for future platform support, sdw API updates etc: - Support for AMD soundwire controller - Intel driver updates to support future platforms - Core API sdw_nread/nwrite_no_pm updates to handle page boundaries" * tag 'soundwire-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: (38 commits) soundwire: intel_auxdevice: improve pm_prepare step soundwire: bus: Fix unbalanced pm_runtime_put() causing usage count underflow soundwire: intel: don't save hw_params for use in prepare soundwire: bus: Update sdw_nread/nwrite_no_pm to handle page boundaries soundwire: bus: Update kernel doc for no_pm functions soundwire: bus: Remove now outdated comments on no_pm IO soundwire: stream: uniquify dev_err() logs soundwire: stream: remove bus->dev from logs on multiple buses soundwire: amd: add pm_prepare callback and pm ops support soundwire: amd: handle SoundWire wake enable interrupt soundwire: amd: add runtime pm ops for AMD SoundWire manager driver soundwire: amd: add SoundWire manager interrupt handling soundwire: amd: enable build for AMD SoundWire manager driver soundwire: amd: register SoundWire manager dai ops soundwire: amd: Add support for AMD Manager driver soundwire: export sdw_compute_slave_ports() function soundwire: stream: restore cumulative bus bandwidth when compute_params callback failed soundwire: bandwidth allocation: Use hweight32() to calculate set bits soundwire: qcom: gracefully handle too many ports in DT soundwire: qcom: define hardcoded version magic numbers ... commit 54bdf8a39931cf8fe2c74432e715353d9a1c1107 Merge: 7994beabfbb9a a010613237212 Author: Linus Torvalds Date: Wed May 3 11:17:34 2023 -0700 Merge tag 'phy-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy updates from Vinod Koul: "New support: - UFS PHY for Qualcomm SA8775p, SM7150 - PCIe 2 lane phy support for sc8180x and PCIe PHY for SDX65 - Mediatke hdmi phy support for mt8195 - rockchip naneng combo phy support for RK358 Updates: - Drop Thunder Bay eMMC PHY driver - RC support for PCIe phy for Qualcomm SDX55 - SGMII support in WIZ driver for J721E - PCIe and multilink SGMII PHY support in cadence driver - Big pile of platform remove callback returning void conversions" * tag 'phy-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (77 commits) phy: cadence: cdns-dphy-rx: Add common module reset support phy: ti: j721e-wiz: Add SGMII support in WIZ driver for J721E dt-bindings: phy: ti: phy-gmii-sel: Add support for J784S4 CPSW9G phy: ti: j721e-wiz: Fix unreachable code in wiz_mode_select() phy: cadence: Sierra: Add PCIe + SGMII PHY multilink configuration phy: mediatek: add support for phy-mtk-hdmi-mt8195 phy: phy-mtk-hdmi: Add generic phy configure callback dt-bindings: phy: mediatek: hdmi-phy: Add mt8195 compatible phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port dt-bindings: phy: ti,phy-j721e-wiz: document clock-output-names dt-bindings: phy: ti,phy-j721e-wiz: drop assigned-clocks dt-bindings: phy: ti,phy-am654-serdes: drop assigned-clocks type dt-bindings: phy: cadence-torrent: drop assigned-clocks dt-bindings: phy: cadence-sierra: drop assigned-clocks phy: rockchip: remove unused hw_to_inno function phy: qualcomm: phy-qcom-qmp-ufs: add definitions for sa8775p dt-bindings: phy: qmp-ufs: describe the UFS PHY for sa8775p phy: qcom-qmp-pcie: drop sdm845_qhp_pcie_rx_tbl phy: qcom-qmp-pcie: sc8180x PCIe PHY has 2 lanes phy: qcom-qmp-ufs: Add SM7150 support ... commit 7994beabfbb9a15c069eba7833a00f5ff4da1172 Merge: 29ee463d6fe45 f2dc327131b5c Author: Linus Torvalds Date: Wed May 3 11:11:56 2023 -0700 Merge tag 'dmaengine-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine updates from Vinod Koul: "New support: - Apple admac t8112 device support - StarFive JH7110 DMA controller Updates: - Big pile of idxd updates to support IAA 2.0 device capabilities, DSA 2.0 Event Log and completion record faulting features and new DSA operations - at_xdmac supend & resume updates and driver code cleanup - k3-udma supend & resume support - k3-psil thread support for J784s4" * tag 'dmaengine-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (57 commits) dmaengine: idxd: add per wq PRS disable dmaengine: idxd: add pid to exported sysfs attribute for opened file dmaengine: idxd: expose fault counters to sysfs dmaengine: idxd: add a device to represent the file opened dmaengine: idxd: add per file user counters for completion record faults dmaengine: idxd: process batch descriptor completion record faults dmaengine: idxd: add descs_completed field for completion record dmaengine: idxd: process user page faults for completion record dmaengine: idxd: add idxd_copy_cr() to copy user completion record during page fault handling dmaengine: idxd: create kmem cache for event log fault items dmaengine: idxd: add per DSA wq workqueue for processing cr faults dmanegine: idxd: add debugfs for event log dump dmaengine: idxd: add interrupt handling for event log dmaengine: idxd: setup event log configuration dmaengine: idxd: add event log size sysfs attribute dmaengine: idxd: make misc interrupt one shot dt-bindings: dma: snps,dw-axi-dmac: constrain the items of resets for JH7110 dma dt-bindings: dma: Drop unneeded quotes dmaengine: at_xdmac: align declaration of ret with the rest of variables dmaengine: at_xdmac: add a warning message regarding for unpaused channels ... commit 29ee463d6fe45adde02098b3aa1166cd65fd2739 Merge: 348551ddaf311 ca3d1a4b419ac Author: Linus Torvalds Date: Wed May 3 11:00:27 2023 -0700 Merge tag 'for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux Pull hardware timestamp engine updates from Dipen Patel: "The changes for the hte subsystem include: - Add Tegra234 HTE provider and relevant DT bindings - Update MAINTAINERS file for the HTE subsystem" * tag 'for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux: hte: tegra-194: Use proper includes hte: Use device_match_of_node() hte: tegra-194: Fix off by one in tegra_hte_map_to_line_id() hte: tegra: fix 'struct of_device_id' build error hte: Use of_property_present() for testing DT property presence gpio: tegra186: Add Tegra234 hte support hte: handle nvidia,gpio-controller property hte: Deprecate nvidia,slices property hte: Add Tegra234 provider hte: Re-phrase tegra API document arm64: tegra: Add Tegra234 GTE nodes dt-bindings: timestamp: Deprecate nvidia,slices property dt-bindings: timestamp: Add Tegra234 support MAINTAINERS: Add HTE/timestamp subsystem details commit 798dec3304f69b97cdf78f485473fb5653fc22d1 Author: Linus Torvalds Date: Wed May 3 10:13:41 2023 -0700 x86-64: mm: clarify the 'positive addresses' user address rules Dave Hansen found the "(long) addr >= 0" code in the x86-64 access_ok checks somewhat confusing, and suggested using a helper to clarify what the code is doing. So this does exactly that: clarifying what the sign bit check is all about, by adding a helper macro that makes it clear what it is testing. This also adds some explicit comments talking about how even with LAM enabled, any addresses with the sign bit will still GP-fault in the non-canonical region just above the sign bit. This is all what allows us to do the user address checks with just the sign bit, and furthermore be a bit cavalier about accesses that might be done with an additional offset even past that point. (And yes, this talks about 'positive' even though zero is also a valid user address and so technically we should call them 'non-negative'. But I don't think using 'non-negative' ends up being more understandable). Suggested-by: Dave Hansen Signed-off-by: Linus Torvalds commit 1dbc0a9515fdf1f0b9d6c9b1954a347c94e5f5f9 Author: Linus Torvalds Date: Wed May 3 09:38:58 2023 -0700 x86: mm: remove 'sign' games from LAM untagged_addr*() macros The intent of the sign games was to not modify kernel addresses when untagging them. However, that had two issues: (a) it didn't actually work as intended, since the mask was calculated as 'addr >> 63' on an _unsigned_ address. So instead of getting a mask of all ones for kernel addresses, you just got '1'. (b) untagging a kernel address isn't actually a valid operation anyway. Now, (a) had originally been true for both 'untagged_addr()' and the remote version of it, but had accidentally been fixed for the regular version of untagged_addr() by commit e0bddc19ba95 ("x86/mm: Reduce untagged_addr() overhead for systems without LAM"). That one rewrote the shift to be part of the alternative asm code, and in the process changed the unsigned shift into a signed 'sar' instruction. And while it is true that we don't want to turn what looks like a kernel address into a user address by masking off the high bit, that doesn't need these sign masking games - all it needs is that the mm context 'untag_mask' value has the high bit set. Which it always does. So simplify the code by just removing the superfluous (and in the case of untagged_addr_remote(), still buggy) sign bit games in the address masking. Acked-by: Dave Hansen Signed-off-by: Linus Torvalds commit b9bd9f605c4a6f04a83e6640a7d1d6dda80f17ca Author: Linus Torvalds Date: Tue May 2 16:39:59 2023 -0700 x86: uaccess: move 32-bit and 64-bit parts into proper header The x86 file has grown features that are specific to x86-64 like LAM support and the related access_ok() changes. They really should be in the file and not pollute the generic x86 header. Signed-off-by: Linus Torvalds commit 6ccdc91d6af922f3ded5de494ff27daedeb6d6c9 Author: Linus Torvalds Date: Tue May 2 12:35:01 2023 -0700 x86: mm: remove architecture-specific 'access_ok()' define There's already a generic definition of 'access_ok()' in the asm-generic/access_ok.h header file, and the only difference bwteen that and the x86-specific one is the added check for WARN_ON_IN_IRQ(). And it turns out that the reason for that check is long gone: it used to use a "user_addr_max()" inline function that depended on the current thread, and caused problems in non-thread contexts. For details, see commits 7c4788950ba5 ("x86/uaccess, sched/preempt: Verify access_ok() context") and in particular commit ae31fe51a3cc ("perf/x86: Restore TASK_SIZE check on frame pointer") about how and why this came to be. But that "current task" issue was removed in the big set_fs() removal by Christoph Hellwig in commit 47058bb54b57 ("x86: remove address space overrides using set_fs()"). So the reason for the test and the architecture-specific access_ok() define no longer exists, and is actually harmful these days. For example, it led various 'copy_from_user_nmi()' games (eg using __range_not_ok() instead, and then later converted to __access_ok() when that became ok). And that in turn meant that LAM was broken for the frame following before this series, because __access_ok() used to not do the address untagging. Accessing user state still needs care in many contexts, but access_ok() is not the place for this test. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Linus Torvalds torvalds@linux-foundation.org> commit 6014bc27561f2cc63e0acc18adbc4ed810834e32 Author: Linus Torvalds Date: Fri Apr 28 12:55:10 2023 -0700 x86-64: make access_ok() independent of LAM The linear address masking (LAM) code made access_ok() more complicated, in that it now needs to untag the address in order to verify the access range. See commit 74c228d20a51 ("x86/uaccess: Provide untagged_addr() and remove tags before address check"). We were able to avoid that overhead in the get_user/put_user code paths by simply using the sign bit for the address check, and depending on the GP fault if the address was non-canonical, which made it all independent of LAM. And we can do the same thing for access_ok(): simply check that the user pointer range has the high bit clear. No need to bother with any address bit masking. In fact, we can go a bit further, and just check the starting address for known small accesses ranges: any accesses that overflow will still be in the non-canonical area and will still GP fault. To still make syzkaller catch any potentially unchecked user addresses, we'll continue to warn about GP faults that are caused by accesses in the non-canonical range. But we'll limit that to purely "high bit set and past the one-page 'slop' area". We could probably just do that "check only starting address" for any arbitrary range size: realistically all kernel accesses to user space will be done starting at the low address. But let's leave that kind of optimization for later. As it is, this already allows us to generate simpler code and not worry about any tag bits in the address. The one thing to look out for is the GUP address check: instead of actually copying data in the virtual address range (and thus bad addresses being caught by the GP fault), GUP will look up the page tables manually. As a result, the page table limits need to be checked, and that was previously implicitly done by the access_ok(). With the relaxed access_ok() check, we need to just do an explicit check for TASK_SIZE_MAX in the GUP code instead. The GUP code already needs to do the tag bit unmasking anyway, so there this is all very straightforward, and there are no LAM issues. Cc: Kirill A. Shutemov Cc: Dave Hansen Cc: Peter Zijlstra (Intel) Signed-off-by: Linus Torvalds commit 4f94559f40ad06d627c0fdfc3319cec778a2845b Author: Ondrej Mosnacek Date: Wed May 3 16:01:14 2023 +0200 tracing: Fix permissions for the buffer_percent file This file defines both read and write operations, yet it is being created as read-only. This means that it can't be written to without the CAP_DAC_OVERRIDE capability. Fix the permissions to allow root to write to it without the need to override DAC perms. Link: https://lore.kernel.org/linux-trace-kernel/20230503140114.3280002-1-omosnace@redhat.com Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Fixes: 03329f993978 ("tracing: Add tracefs file buffer_percentage") Signed-off-by: Ondrej Mosnacek Signed-off-by: Steven Rostedt (Google) commit 3710e2b056cb92ad816e4d79fa54a6a5b6ad8cbd Author: Adrian Huang Date: Fri Apr 21 16:08:00 2023 +0800 nvme-pci: clamp max_hw_sectors based on DMA optimized limitation When running the fio test on a 448-core AMD server + a NVME disk, a soft lockup or a hard lockup call trace is shown: [soft lockup] watchdog: BUG: soft lockup - CPU#126 stuck for 23s! [swapper/126:0] RIP: 0010:_raw_spin_unlock_irqrestore+0x21/0x50 ... Call Trace: fq_flush_timeout+0x7d/0xd0 ? __pfx_fq_flush_timeout+0x10/0x10 call_timer_fn+0x2e/0x150 run_timer_softirq+0x48a/0x560 ? __pfx_fq_flush_timeout+0x10/0x10 ? clockevents_program_event+0xaf/0x130 __do_softirq+0xf1/0x335 irq_exit_rcu+0x9f/0xd0 sysvec_apic_timer_interrupt+0xb4/0xd0 asm_sysvec_apic_timer_interrupt+0x1f/0x30 ... Obvisouly, fq_flush_timeout spends over 20 seconds. Here is ftrace log: | fq_flush_timeout() { | fq_ring_free() { | put_pages_list() { 0.170 us | free_unref_page_list(); 0.810 us | } | free_iova_fast() { | free_iova() { * 85622.66 us | _raw_spin_lock_irqsave(); 2.860 us | remove_iova(); 0.600 us | _raw_spin_unlock_irqrestore(); 0.470 us | lock_info_report(); 2.420 us | free_iova_mem.part.0(); * 85638.27 us | } * 85638.84 us | } | put_pages_list() { 0.230 us | free_unref_page_list(); 0.470 us | } ... ... $ 31017069 us | } Most of cores are under lock contention for acquiring iova_rbtree_lock due to the iova flush queue mechanism. [hard lockup] NMI watchdog: Watchdog detected hard LOCKUP on cpu 351 RIP: 0010:native_queued_spin_lock_slowpath+0x2d8/0x330 Call Trace: _raw_spin_lock_irqsave+0x4f/0x60 free_iova+0x27/0xd0 free_iova_fast+0x4d/0x1d0 fq_ring_free+0x9b/0x150 iommu_dma_free_iova+0xb4/0x2e0 __iommu_dma_unmap+0x10b/0x140 iommu_dma_unmap_sg+0x90/0x110 dma_unmap_sg_attrs+0x4a/0x50 nvme_unmap_data+0x5d/0x120 [nvme] nvme_pci_complete_batch+0x77/0xc0 [nvme] nvme_irq+0x2ee/0x350 [nvme] ? __pfx_nvme_pci_complete_batch+0x10/0x10 [nvme] __handle_irq_event_percpu+0x53/0x1a0 handle_irq_event_percpu+0x19/0x60 handle_irq_event+0x3d/0x60 handle_edge_irq+0xb3/0x210 __common_interrupt+0x7f/0x150 common_interrupt+0xc5/0xf0 asm_common_interrupt+0x2b/0x40 ... ftrace shows fq_ring_free spends over 10 seconds [1]. Again, most of cores are under lock contention for acquiring iova_rbtree_lock due to the iova flush queue mechanism. [Root Cause] The root cause is that the max_hw_sectors_kb of nvme disk (mdts=10) is 4096kb, which streaming DMA mappings cannot benefit from the scalable IOVA mechanism introduced by the commit 9257b4a206fc ("iommu/iova: introduce per-cpu caching to iova allocation") if the length is greater than 128kb. To fix the lock contention issue, clamp max_hw_sectors based on DMA optimized limitation in order to leverage scalable IOVA mechanism. Note: The issue does not happen with another NVME disk (mdts = 5 and max_hw_sectors_kb = 128) [1] https://gist.github.com/AdrianHuang/bf8ec7338204837631fbdaed25d19cc4 Suggested-by: Keith Busch Reported-and-tested-by: Jiwei Sun Signed-off-by: Adrian Huang Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit bd375feeaf3408ed00e08c3bc918d6be15f691ad Author: Hristo Venev Date: Tue Apr 25 22:58:54 2023 +0300 nvme-pci: add quirk for missing secondary temperature thresholds On Kingston KC3000 and Kingston FURY Renegade (both have the same PCI IDs) accessing temp3_{min,max} fails with an invalid field error (note that there is no problem setting the thresholds for temp1). This contradicts the NVM Express Base Specification 2.0b, page 292: The over temperature threshold and under temperature threshold features shall be implemented for all implemented temperature sensors (i.e., all Temperature Sensor fields that report a non-zero value). Define NVME_QUIRK_NO_SECONDARY_TEMP_THRESH that disables the thresholds for all but the composite temperature and set it for this device. Signed-off-by: Hristo Venev Reviewed-by: Guenter Roeck Signed-off-by: Christoph Hellwig commit 1616d6c3717bae9041a4240d381ec56ccdaafedc Author: Sagi Grimberg Date: Wed May 3 18:57:33 2023 +0300 nvme-pci: add NVME_QUIRK_BOGUS_NID for HS-SSD-FUTURE 2048G Add a quirk to fix HS-SSD-FUTURE 2048G SSD drives reporting duplicate nsids. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217384 Reported-by: Andrey God Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 6e3220ba3323a2c24be834aebf5d6e9f89d0993f Author: Helge Deller Date: Wed May 3 16:39:56 2023 +0200 parisc: Fix argument pointer in real64_call_asm() Fix the argument pointer (ap) to point to real-mode memory instead of virtual memory. It's interesting that this issue hasn't shown up earlier, as this could have happened with any 64-bit PDC ROM code. I just noticed it because I suddenly faced a HPMC while trying to execute the 64-bit STI ROM code of an Visualize-FXe graphics card for the STI text console. Signed-off-by: Helge Deller Cc: commit 567b35159e76997e95b643b9a8a5d9d2198f2522 Author: John David Anglin Date: Sun Feb 26 18:03:33 2023 +0000 parisc: Cleanup mmap implementation regarding color alignment This change simplifies the randomization of file mapping regions. It reworks the code to remove duplication. The flow is now similar to that for mips. Finally, we consistently use the do_color_align variable to determine when color alignment is needed. Tested on rp3440. Signed-off-by: John David Anglin Signed-off-by: Helge Deller commit 653f3ea73bf3e03070d370300805eee4f2a47bd9 Author: Helge Deller Date: Sun Apr 23 21:37:47 2023 +0200 parisc: Drop HP-UX constants and structs from grfioctl.h Signed-off-by: Helge Deller commit d755bd2caeb47fd806e12399fe8b56798fa5d2cc Author: Helge Deller Date: Wed Mar 15 19:25:15 2023 +0100 parisc: Ensure page alignment in flush functions Matthew Wilcox noticed, that if ARCH_HAS_FLUSH_ON_KUNMAP is defined (which is the case for PA-RISC), __kunmap_local() calls kunmap_flush_on_unmap(), which may call the parisc flush functions with a non-page-aligned address and thus the page might not be fully flushed. This patch ensures that flush_kernel_dcache_page_asm() and flush_kernel_dcache_page_asm() will always operate on page-aligned addresses. Signed-off-by: Helge Deller Cc: # v6.0+ commit 829632dae8321787525ee37dc4828bbe6edafdae Author: Guilherme G. Piccoli Date: Mon Feb 20 18:11:05 2023 -0300 parisc: Replace regular spinlock with spin_trylock on panic path The panic notifiers' callbacks execute in an atomic context, with interrupts/preemption disabled, and all CPUs not running the panic function are off, so it's very dangerous to wait on a regular spinlock, there's a risk of deadlock. Refactor the panic notifier of parisc/power driver to make use of spin_trylock - for that, we've added a second version of the soft-power function. Also, some comments were reorganized and trailing white spaces, useless header inclusion and blank lines were removed. Cc: "James E.J. Bottomley" Cc: Jeroen Roovers Acked-by: Helge Deller # parisc Signed-off-by: Guilherme G. Piccoli Signed-off-by: Helge Deller commit e0838a99289e013d17496ed9464c3cf71d49b977 Author: Randy Dunlap Date: Sun Feb 5 08:37:52 2023 -0800 parisc: update kbuild doc. aliases for parisc64 ARCH=parisc64 is now supported for 64-bit parisc builds, so add this alias to the kbuild.rst documentation. Fixes: 3dcfb729b5f4 ("parisc: Make CONFIG_64BIT available for ARCH=parisc64 only") Signed-off-by: Randy Dunlap Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: linux-parisc@vger.kernel.org Cc: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Acked-by: Masahiro Yamada Signed-off-by: Helge Deller commit 82da62abe56263319a974a4d77c1e6fa19355de1 Author: Helge Deller Date: Wed Dec 28 08:41:54 2022 +0100 parisc: Limit amount of kgdb breakpoints on parisc kgdb is rarely used and 40 breakpoints seems enough to debug parisc specific bugs. Signed-off-by: Helge Deller commit c0b79b0ff53be5b05be98e3caaa6a39de1fe9520 Author: Ming Lei Date: Tue May 2 10:42:31 2023 +0800 ublk: add timeout handler Add timeout handler, so that we can provide forward progress guarantee for unprivileged ublk, which can't be trusted. One thing is that sync() calls sync_bdevs(wait) for all block devices after running sync_bdevs(no_wait), and if one device can't move on, the sync() won't return any more. Add timeout for unprivileged ublk to avoid such affect for other users which call sync() syscall. Meantime clear UBLK_F_USER_RECOVERY_REISSUE for unprivileged ublk since that feature may cause IO hang too. Fixes: 4093cb5a0634 ("ublk_drv: add mechanism for supporting unprivileged ublk device") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230502024231.888498-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 1bd922877a084c1c6c1d0cb1bb9c3700fa0f6c61 Author: Stanislav Jakubek Date: Sun Apr 23 14:40:18 2023 +0200 dt-bindings: i2c: brcm,kona-i2c: convert to YAML Changes during conversion: - add used, but previously undocumented SoC-specific compatibles - drop references to SoCs that are not upstream - add supported clock frequencies Signed-off-by: Stanislav Jakubek Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit 3899d94e3831ee07ea6821c032dc297aec80586a Author: Christoph Böhmwalder Date: Wed May 3 14:19:37 2023 +0200 drbd: correctly submit flush bio on barrier When we receive a flush command (or "barrier" in DRBD), we currently use a REQ_OP_FLUSH with the REQ_PREFLUSH flag set. The correct way to submit a flush bio is by using a REQ_OP_WRITE without any data, and set the REQ_PREFLUSH flag. Since commit b4a6bb3a67aa ("block: add a sanity check for non-write flush/fua bios"), this triggers a warning in the block layer, but this has been broken for quite some time before that. So use the correct set of flags to actually make the flush happen. Cc: Christoph Hellwig Cc: stable@vger.kernel.org Fixes: f9ff0da56437 ("drbd: allow parallel flushes for multi-volume resources") Reported-by: Thomas Voegtle Signed-off-by: Christoph Böhmwalder Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230503121937.17232-1-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit 5d388143fa6c351d985ffd23ea50c91c8839141b Author: Arnd Bergmann Date: Mon Apr 3 09:49:13 2023 +0200 i2c: gxp: fix build failure without CONFIG_I2C_SLAVE The gxp_i2c_slave_irq_handler() is hidden in an #ifdef, but the caller uses an IS_ENABLED() check: drivers/i2c/busses/i2c-gxp.c: In function 'gxp_i2c_irq_handler': drivers/i2c/busses/i2c-gxp.c:467:29: error: implicit declaration of function 'gxp_i2c_slave_irq_handler'; did you mean 'gxp_i2c_irq_handler'? [-Werror=implicit-function-declaration] It has to consistently use one method or the other to avoid warnings, so move to IS_ENABLED() here for readability and build coverage, and move the #ifdef in linux/i2c.h to allow building it as dead code. Fixes: 4a55ed6f89f5 ("i2c: Add GXP SoC I2C Controller") Signed-off-by: Arnd Bergmann Reviewed-by: Nick Hawkins Signed-off-by: Wolfram Sang commit fa39065833dbdb2059ffe25d071e722c31fbbb6c Author: Alexander Stein Date: Mon Apr 24 10:06:27 2023 +0200 i2c: imx-lpi2c: avoid taking clk_prepare mutex in PM callbacks This is unsafe, as the runtime PM callbacks are called from the PM workqueue, so this may deadlock when handling an i2c attached clock, which may already hold the clk_prepare mutex from another context. Signed-off-by: Alexander Stein Signed-off-by: Wolfram Sang commit c770657bd2611b077ec1e7b1fe6aa92f249399bd Author: Reid Tonking Date: Wed Apr 26 14:49:56 2023 -0500 i2c: omap: Fix standard mode false ACK readings Using standard mode, rare false ACK responses were appearing with i2cdetect tool. This was happening due to NACK interrupt triggering ISR thread before register access interrupt was ready. Removing the NACK interrupt's ability to trigger ISR thread lets register access ready interrupt do this instead. Cc: # v3.7+ Fixes: 3b2f8f82dad7 ("i2c: omap: switch to threaded IRQ support") Signed-off-by: Reid Tonking Acked-by: Vignesh Raghavendra Reviewed-by: Tony Lindgren Signed-off-by: Wolfram Sang commit 776617db78c6d208780e7c69d4d68d1fa82913de Author: Tobias Holl Date: Wed May 3 08:59:50 2023 -0600 io_uring/rsrc: check for nonconsecutive pages Pages that are from the same folio do not necessarily need to be consecutive. In that case, we cannot consolidate them into a single bvec entry. Before applying the huge page optimization from commit 57bebf807e2a ("io_uring/rsrc: optimise registered huge pages"), check that the memory is actually consecutive. Cc: stable@vger.kernel.org Fixes: 57bebf807e2a ("io_uring/rsrc: optimise registered huge pages") Signed-off-by: Tobias Holl [axboe: formatting] Signed-off-by: Jens Axboe commit d246331b78cbef86237f9c22389205bc9b4e1cc1 Author: Josef Bacik Date: Tue May 2 16:00:06 2023 -0400 btrfs: don't free qgroup space unless specified Boris noticed in his simple quotas testing that he was getting a leak with Sweet Tea's change to subvol create that stopped doing a transaction commit. This was just a side effect of that change. In the delayed inode code we have an optimization that will free extra reservations if we think we can pack a dir item into an already modified leaf. Previously this wouldn't be triggered in the subvolume create case because we'd commit the transaction, it was still possible but much harder to trigger. It could actually be triggered if we did a mkdir && subvol create with qgroups enabled. This occurs because in btrfs_insert_delayed_dir_index(), which gets called when we're adding the dir item, we do the following: btrfs_block_rsv_release(fs_info, trans->block_rsv, bytes, NULL); if we're able to skip reserving space. The problem here is that trans->block_rsv points at the temporary block rsv for the subvolume create, which has qgroup reservations in the block rsv. This is a problem because btrfs_block_rsv_release() will do the following: if (block_rsv->qgroup_rsv_reserved >= block_rsv->qgroup_rsv_size) { qgroup_to_release = block_rsv->qgroup_rsv_reserved - block_rsv->qgroup_rsv_size; block_rsv->qgroup_rsv_reserved = block_rsv->qgroup_rsv_size; } The temporary block rsv just has ->qgroup_rsv_reserved set, ->qgroup_rsv_size == 0. The optimization in btrfs_insert_delayed_dir_index() sets ->qgroup_rsv_reserved = 0. Then later on when we call btrfs_subvolume_release_metadata() which has btrfs_block_rsv_release(fs_info, rsv, (u64)-1, &qgroup_to_release); btrfs_qgroup_convert_reserved_meta(root, qgroup_to_release); qgroup_to_release is set to 0, and we do not convert the reserved metadata space. The problem here is that the block rsv code has been unconditionally messing with ->qgroup_rsv_reserved, because the main place this is used is delalloc, and any time we call btrfs_block_rsv_release() we do it with qgroup_to_release set, and thus do the proper accounting. The subvolume code is the only other code that uses the qgroup reservation stuff, but it's intermingled with the above optimization, and thus was getting its reservation freed out from underneath it and thus leaking the reserved space. The solution is to simply not mess with the qgroup reservations if we don't have qgroup_to_release set. This works with the existing code as anything that messes with the delalloc reservations always have qgroup_to_release set. This fixes the leak that Boris was observing. Reviewed-by: Qu Wenruo CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 57ea3ab21c14e6f04db2b0878e8a5be644fa3769 Merge: bd4468295e7a3 5904de0d735bb Author: Rafael J. Wysocki Date: Wed May 3 16:04:43 2023 +0200 Merge branch 'pm-sleep' Merge hibernation test mode fix for 6.4-rc1. * pm-sleep: PM: hibernate: Do not get block device exclusively in test_resume mode PM: hibernate: Turn snapshot_test into global variable commit 1f85d016768ff19f060f3cce014a43c761de8259 Author: Thomas Richter Date: Wed May 3 10:12:55 2023 +0200 perf test record+probe_libc_inet_pton: Fix call chain match on x86_64 The test case probe libc's inet_pton & backtrace it with ping fails with Fedora 38 on x86_64. Function getaddrinfo() does not show up in the call chain anymore: # ./perf script ping 1803 [000] 728.567146: probe_libc:inet_pton: (7f5275afc840) 133840 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6) 27b4a __libc_start_call_main+0x7a (/usr/lib64/libc.so.6) 27c0b __libc_start_main@@GLIBC_2.34+0x8b (/usr/lib64/libc.so.6) ping 1803 [000] 728.567184: probe_libc:inet_pton: (7f5275afc840) 133840 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6) 493e main+0xcde (/usr/bin/ping) 27b4a __libc_start_call_main+0x7a (/usr/lib64/libc.so.6) # which causes the test case to fail. Remove function getaddrinfo() from list of expected functions. Output before: # ./perf test 'libc' 91: probe libc's inet_pton & backtrace it with ping : FAILED! # Output after: # ./perf test 'libc' 91: probe libc's inet_pton & backtrace it with ping : Ok # Signed-off-by: Thomas Richter Tested-by: Arnaldo Carvalho de Melo Cc: Heiko Carstens Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20230503081255.3372986-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 311693ce81c9da3724d4294a4c3769a3b30b6a7f Author: Thomas Richter Date: Wed May 3 10:11:34 2023 +0200 perf test record+probe_libc_inet_pton: Fix call chain match on s390 With Fedora 38 the perf test 86 probe libc's inet_pton fails on s390. The call chain of the ping command changed. The functions text_to_binary_address() and gaih_inet() do not show up in the call chain anymore. Output before: # ./perf test -v 86 86: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 541050 fgrep: warning: fgrep is obsolescent; using grep -F fgrep: warning: fgrep is obsolescent; using grep -F BFD: DWARF error: could not find variable specification at offset 0x22011 ... ping 541078 [002] 348826.679581: probe_libc:inet_pton_1: (3ffad84b940) 14b940 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6) 10e9c3 __GI_getaddrinfo+0xeb3 (inlined) 4397 main+0x737 (/usr/bin/ping) FAIL: expected backtrace entry "gaih_inet.*\+0x[[:xdigit:]]\ +[[:space:]]\(/usr/lib64/libc.so.6|inlined\)$" got "4397 main+0x737 (/usr/bin/ping)" test child finished with -1 ---- end ---- probe libc's inet_pton & backtrace it with ping: FAILED! # Output after: # ./perf test -v 86 86: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 541098 fgrep: warning: fgrep is obsolescent; using grep -F fgrep: warning: fgrep is obsolescent; using grep -F BFD: DWARF error: could not find variable specification at offset 0x309d1 ... ping 541126 [006] 349309.099067: probe_libc:inet_pton_1: (3ffb7f4b940) 14b940 __GI___inet_pton+0x0 (/usr/lib64/libc.so.6) 10e9c3 __GI_getaddrinfo+0xeb3 (inlined) 4397 main+0x737 (/usr/bin/ping) test child finished with 0 ---- end ---- probe libc's inet_pton & backtrace it with ping: Ok # Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20230503081134.3372415-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 2e70a47ceafe4d71a4a402b2f7c5123cb4bf33f6 Merge: 61711941d8515 9b04d99788cf4 9bde7fb8940f6 Author: Rafael J. Wysocki Date: Wed May 3 15:55:19 2023 +0200 Merge branches 'acpi-pm' and 'acpi-properties' Merge an ACPI power management quirk and a change related to the handling of ACPI device properties for 6.4-rc1: - Do not turn off unused power resources during initialization on the Toshiba Click Mini (Hans de Goede). - Support strings in device properties supplied by ACPI _DSM on Apple platforms (Hector Martin). * acpi-pm: ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini * acpi-properties: ACPI: property: Support strings in Apple _DSM props commit 53389edd4020514b876b01d05e851fb7d46eb51f Merge: dd2358321e1aa 2b6a7409ac390 Author: Rafael J. Wysocki Date: Wed May 3 15:44:35 2023 +0200 Merge branch 'thermal-core' Merge additional thermal core and ACPI thermal changes for 6.4-rc1: - Clean up the step-wise thermal governor (Zhang Rui). - Introduce thermal_zone_device() for accessing the device field of struct thermal_zone_device and two drivers use it (Daniel Lezcano). - Clean up the ACPI thermal driver a bit (Daniel Lezcano). - Delete the thermal driver for Intel Menlow platforms that is not expected to have any users (Rafael Wysocki). * thermal-core: thermal: intel: menlow: Get rid of this driver ACPI: thermal: Move to dedicated function sysfs extra attr creation ACPI: thermal: Use thermal_zone_device() thermal: intel: pch_thermal: Use thermal driver device to write a trace thermal: core: Encapsulate tz->device field thermal: gov_step_wise: Adjust code logic to match comment thermal: gov_step_wise: Delete obsolete comment commit 29cd2927fb914cc53b5ba4f67d2b74695c994ba4 Author: Chuck Lever Date: Tue May 2 14:59:10 2023 -0400 SUNRPC: Fix encoding of accepted but unsuccessful RPC replies Jiri Slaby says: > I bisected to this ... as it breaks nfs3-only servers in 6.3. > I.e. /etc/nfs.conf containing: > [nfsd] > vers4=no > > The client sees: > mount("10.0.2.15:/tmp", "/mnt", "nfs", 0, "vers=4.2,addr=10.0.2.15,clientad"...) = -1 EIO (Input/output error) > write(2, "mount.nfs: mount system call fai"..., 45 > mount.nfs: mount system call failed for /mnt > > And the kernel says: > nfs4_discover_server_trunking unhandled error -5. Exiting with error EIO Reported-by: Jiri Slaby Link: https://bugzilla.suse.com/show_bug.cgi?id=1210995 Fixes: 4bcf0343e8a6 ("SUNRPC: Set rq_accept_statp inside ->accept methods") Tested-by: Jiri Slaby Signed-off-by: Chuck Lever commit f057b63bc11d86a98176de31b437e46789f44d8f Author: Florian Westphal Date: Wed May 3 12:00:18 2023 +0200 netfilter: nf_tables: fix ct untracked match breakage "ct untracked" no longer works properly due to erroneous NFT_BREAK. We have to check ctinfo enum first. Fixes: d9e789147605 ("netfilter: nf_tables: avoid retpoline overhead for some ct expression calls") Reported-by: Rvfg Link: https://marc.info/?l=netfilter&m=168294996212038&w=2 Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 6a341729fb31b4c5df9f74f24b4b1c98410c9b87 Author: Kuniyuki Iwashima Date: Mon May 1 13:28:57 2023 -0700 af_packet: Don't send zero-byte data in packet_sendmsg_spkt(). syzkaller reported a warning below [0]. We can reproduce it by sending 0-byte data from the (AF_PACKET, SOCK_PACKET) socket via some devices whose dev->hard_header_len is 0. struct sockaddr_pkt addr = { .spkt_family = AF_PACKET, .spkt_device = "tun0", }; int fd; fd = socket(AF_PACKET, SOCK_PACKET, 0); sendto(fd, NULL, 0, 0, (struct sockaddr *)&addr, sizeof(addr)); We have a similar fix for the (AF_PACKET, SOCK_RAW) socket as commit dc633700f00f ("net/af_packet: check len when min_header_len equals to 0"). Let's add the same test for the SOCK_PACKET socket. [0]: skb_assert_len WARNING: CPU: 1 PID: 19945 at include/linux/skbuff.h:2552 skb_assert_len include/linux/skbuff.h:2552 [inline] WARNING: CPU: 1 PID: 19945 at include/linux/skbuff.h:2552 __dev_queue_xmit+0x1f26/0x31d0 net/core/dev.c:4159 Modules linked in: CPU: 1 PID: 19945 Comm: syz-executor.0 Not tainted 6.3.0-rc7-02330-gca6270c12e20 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:skb_assert_len include/linux/skbuff.h:2552 [inline] RIP: 0010:__dev_queue_xmit+0x1f26/0x31d0 net/core/dev.c:4159 Code: 89 de e8 1d a2 85 fd 84 db 75 21 e8 64 a9 85 fd 48 c7 c6 80 2a 1f 86 48 c7 c7 c0 06 1f 86 c6 05 23 cf 27 04 01 e8 fa ee 56 fd <0f> 0b e8 43 a9 85 fd 0f b6 1d 0f cf 27 04 31 ff 89 de e8 e3 a1 85 RSP: 0018:ffff8880217af6e0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffc90001133000 RDX: 0000000000040000 RSI: ffffffff81186922 RDI: 0000000000000001 RBP: ffff8880217af8b0 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: ffff888030045640 R13: ffff8880300456b0 R14: ffff888030045650 R15: ffff888030045718 FS: 00007fc5864da640(0000) GS:ffff88806cd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020005740 CR3: 000000003f856003 CR4: 0000000000770ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: dev_queue_xmit include/linux/netdevice.h:3085 [inline] packet_sendmsg_spkt+0xc4b/0x1230 net/packet/af_packet.c:2066 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0x1b4/0x200 net/socket.c:747 ____sys_sendmsg+0x331/0x970 net/socket.c:2503 ___sys_sendmsg+0x11d/0x1c0 net/socket.c:2557 __sys_sendmmsg+0x18c/0x430 net/socket.c:2643 __do_sys_sendmmsg net/socket.c:2672 [inline] __se_sys_sendmmsg net/socket.c:2669 [inline] __x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2669 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3c/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7fc58791de5d 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:00007fc5864d9cc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00000000004bbf80 RCX: 00007fc58791de5d RDX: 0000000000000001 RSI: 0000000020005740 RDI: 0000000000000004 RBP: 00000000004bbf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fc58797e530 R15: 0000000000000000 ---[ end trace 0000000000000000 ]--- skb len=0 headroom=16 headlen=0 tailroom=304 mac=(16,0) net=(16,-1) trans=-1 shinfo(txflags=0 nr_frags=0 gso(size=0 type=0 segs=0)) csum(0x0 ip_summed=0 complete_sw=0 valid=0 level=0) hash(0x0 sw=0 l4=0) proto=0x0000 pkttype=0 iif=0 dev name=sit0 feat=0x00000006401d7869 sk family=17 type=10 proto=0 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot Signed-off-by: Kuniyuki Iwashima Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 3ce29c17dc847bf4245e16aad78a7617afa96297 Author: Song Yoong Siang Date: Tue May 2 08:48:06 2023 -0700 igc: read before write to SRRCTL register igc_configure_rx_ring() function will be called as part of XDP program setup. If Rx hardware timestamp is enabled prio to XDP program setup, this timestamp enablement will be overwritten when buffer size is written into SRRCTL register. Thus, this commit read the register value before write to SRRCTL register. This commit is tested by using xdp_hw_metadata bpf selftest tool. The tool enables Rx hardware timestamp and then attach XDP program to igc driver. It will display hardware timestamp of UDP packet with port number 9092. Below are detail of test steps and results. Command on DUT: sudo ./xdp_hw_metadata Command on Link Partner: echo -n skb | nc -u -q1 9092 Result before this patch: skb hwtstamp is not found! Result after this patch: found skb hwtstamp = 1677800973.642836757 Optionally, read PHC to confirm the values obtained are almost the same: Command: sudo ./testptp -d /dev/ptp0 -g Result: clock time: 1677800973.913598978 or Fri Mar 3 07:49:33 2023 Fixes: fc9df2a0b520 ("igc: Enable RX via AF_XDP zero-copy") Cc: # 5.14+ Signed-off-by: Song Yoong Siang Reviewed-by: Jacob Keller Reviewed-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Tested-by: Naama Meir Signed-off-by: Tony Nguyen Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit 1eeb807ffd8da5180f8d64d89ce332876acb5dbd Author: Shannon Nelson Date: Tue May 2 13:40:32 2023 -0700 pds_core: add AUXILIARY_BUS and NET_DEVLINK to Kconfig Add selecting of AUXILIARY_BUS and NET_DEVLINK to the pds_core Kconfig. Link: https://lore.kernel.org/netdev/ZE%2FduNH3lBLreNkJ@corigine.com/ Fixes: ddbcb22055d1 ("pds_core: Kconfig and pds_core.rst") Suggested-by: Simon Horman Signed-off-by: Shannon Nelson Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit ec788f7e96ad4cd30338a09d466d9368acd73c26 Author: Shannon Nelson Date: Tue May 2 13:27:52 2023 -0700 pds_core: remove CONFIG_DEBUG_FS from makefile This cruft from previous drafts should have been removed when the code was updated to not use the old style dummy helpers. Fixes: 55435ea7729a ("pds_core: initial framework for pds_core PF driver") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 4a54903ff68ddb33b6463c94b4eb37fc584ef760 Author: Shannon Nelson Date: Tue May 2 11:35:36 2023 -0700 ionic: catch failure from devlink_alloc Add a check for NULL on the alloc return. If devlink_alloc() fails and we try to use devlink_priv() on the NULL return, the kernel gets very unhappy and panics. With this fix, the driver load will still fail, but at least it won't panic the kernel. Fixes: df69ba43217d ("ionic: Add basic framework for IONIC Network device driver") Signed-off-by: Shannon Nelson Reviewed-by: Simon Horman Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 9ad685dbfe7e856bbf17a7177b64676d324d6ed7 Author: Ido Schimmel Date: Tue May 2 15:20:50 2023 +0300 ethtool: Fix uninitialized number of lanes It is not possible to set the number of lanes when setting link modes using the legacy IOCTL ethtool interface. Since 'struct ethtool_link_ksettings' is not initialized in this path, drivers receive an uninitialized number of lanes in 'struct ethtool_link_ksettings::lanes'. When this information is later queried from drivers, it results in the ethtool code making decisions based on uninitialized memory, leading to the following KMSAN splat [1]. In practice, this most likely only happens with the tun driver that simply returns whatever it got in the set operation. As far as I can tell, this uninitialized memory is not leaked to user space thanks to the 'ethtool_ops->cap_link_lanes_supported' check in linkmodes_prepare_data(). Fix by initializing the structure in the IOCTL path. Did not find any more call sites that pass an uninitialized structure when calling 'ethtool_ops::set_link_ksettings()'. [1] BUG: KMSAN: uninit-value in ethnl_update_linkmodes net/ethtool/linkmodes.c:273 [inline] BUG: KMSAN: uninit-value in ethnl_set_linkmodes+0x190b/0x19d0 net/ethtool/linkmodes.c:333 ethnl_update_linkmodes net/ethtool/linkmodes.c:273 [inline] ethnl_set_linkmodes+0x190b/0x19d0 net/ethtool/linkmodes.c:333 ethnl_default_set_doit+0x88d/0xde0 net/ethtool/netlink.c:640 genl_family_rcv_msg_doit net/netlink/genetlink.c:968 [inline] genl_family_rcv_msg net/netlink/genetlink.c:1048 [inline] genl_rcv_msg+0x141a/0x14c0 net/netlink/genetlink.c:1065 netlink_rcv_skb+0x3f8/0x750 net/netlink/af_netlink.c:2577 genl_rcv+0x40/0x60 net/netlink/genetlink.c:1076 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0xf41/0x1270 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x127d/0x1430 net/netlink/af_netlink.c:1942 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] ____sys_sendmsg+0xa24/0xe40 net/socket.c:2501 ___sys_sendmsg+0x2a1/0x3f0 net/socket.c:2555 __sys_sendmsg net/socket.c:2584 [inline] __do_sys_sendmsg net/socket.c:2593 [inline] __se_sys_sendmsg net/socket.c:2591 [inline] __x64_sys_sendmsg+0x36b/0x540 net/socket.c:2591 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Uninit was stored to memory at: tun_get_link_ksettings+0x37/0x60 drivers/net/tun.c:3544 __ethtool_get_link_ksettings+0x17b/0x260 net/ethtool/ioctl.c:441 ethnl_set_linkmodes+0xee/0x19d0 net/ethtool/linkmodes.c:327 ethnl_default_set_doit+0x88d/0xde0 net/ethtool/netlink.c:640 genl_family_rcv_msg_doit net/netlink/genetlink.c:968 [inline] genl_family_rcv_msg net/netlink/genetlink.c:1048 [inline] genl_rcv_msg+0x141a/0x14c0 net/netlink/genetlink.c:1065 netlink_rcv_skb+0x3f8/0x750 net/netlink/af_netlink.c:2577 genl_rcv+0x40/0x60 net/netlink/genetlink.c:1076 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0xf41/0x1270 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x127d/0x1430 net/netlink/af_netlink.c:1942 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] ____sys_sendmsg+0xa24/0xe40 net/socket.c:2501 ___sys_sendmsg+0x2a1/0x3f0 net/socket.c:2555 __sys_sendmsg net/socket.c:2584 [inline] __do_sys_sendmsg net/socket.c:2593 [inline] __se_sys_sendmsg net/socket.c:2591 [inline] __x64_sys_sendmsg+0x36b/0x540 net/socket.c:2591 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Uninit was stored to memory at: tun_set_link_ksettings+0x37/0x60 drivers/net/tun.c:3553 ethtool_set_link_ksettings+0x600/0x690 net/ethtool/ioctl.c:609 __dev_ethtool net/ethtool/ioctl.c:3024 [inline] dev_ethtool+0x1db9/0x2a70 net/ethtool/ioctl.c:3078 dev_ioctl+0xb07/0x1270 net/core/dev_ioctl.c:524 sock_do_ioctl+0x295/0x540 net/socket.c:1213 sock_ioctl+0x729/0xd90 net/socket.c:1316 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0x222/0x400 fs/ioctl.c:856 __x64_sys_ioctl+0x96/0xe0 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Local variable link_ksettings created at: ethtool_set_link_ksettings+0x54/0x690 net/ethtool/ioctl.c:577 __dev_ethtool net/ethtool/ioctl.c:3024 [inline] dev_ethtool+0x1db9/0x2a70 net/ethtool/ioctl.c:3078 Fixes: 012ce4dd3102 ("ethtool: Extend link modes settings uAPI with lanes") Reported-and-tested-by: syzbot+ef6edd9f1baaa54d6235@syzkaller.appspotmail.com Link: https://lore.kernel.org/netdev/0000000000004bb41105fa70f361@google.com/ Reviewed-by: Danielle Ratson Signed-off-by: Ido Schimmel Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit 0fbd79c01a9a657348f7032df70c57a406468c86 Author: Hayes Wang Date: Tue May 2 11:36:27 2023 +0800 r8152: fix the autosuspend doesn't work Set supports_autosuspend = 1 for the rtl8152_cfgselector_driver. Fixes: ec51fbd1b8a2 ("r8152: add USB device driver for config selection") Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 3711d44fac1f80ea69ecb7315fed05b3812a7401 Author: Shannon Nelson Date: Tue May 2 11:47:40 2023 -0700 ionic: remove noise from ethtool rxnfc error msg It seems that ethtool is calling into .get_rxnfc more often with ETHTOOL_GRXCLSRLCNT which ionic doesn't know about. We don't need to log a message about it, just return not supported. Fixes: aa3198819bea6 ("ionic: Add RSS support") Signed-off-by: Shannon Nelson Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 2dce08ab7a32b15ee75be6a31084f78e41d2936a Merge: 9e08dcef60baa 99ae1260fdb5f Author: David S. Miller Date: Wed May 3 09:03:00 2023 +0100 Merge branch 'octeontx2-af-fixes' Sai Krishna says: ==================== octeontx2: Miscellaneous fixes This patchset includes following fixes. Patch #1 Fix for the race condition while updating APR table Patch #2 Fix end bit position in NPC scan config Patch #3 Fix depth of CAM, MEM table entries Patch #4 Fix in increase the size of DMAC filter flows Patch #5 Fix driver crash resulting from invalid interface type information retrieved from firmware Patch #6 Fix incorrect mask used while installing filters involving fragmented packets Patch #7 Fixes for NPC field hash extract w.r.t IPV6 hash reduction, IPV6 filed hash configuration. Patch #8 Fix for NPC hardware parser configuration destination address hash, IPV6 endianness issues. Patch #9 Fix for skipping mbox initialization for PFs disabled by firmware. Patch #10 Fix disabling packet I/O in case of mailbox timeout. Patch #11 Fix detaching LF resources in case of VF probe fail. ==================== Signed-off-by: David S. Miller commit 99ae1260fdb5f15beab8a3adfb93a9041c87a2c1 Author: Subbaraya Sundeep Date: Wed May 3 12:39:44 2023 +0530 octeontx2-vf: Detach LF resources on probe cleanup When a VF device probe fails due to error in MSIX vector allocation then the resources NIX and NPA LFs were not detached. Fix this by detaching the LFs when MSIX vector allocation fails. Fixes: 3184fb5ba96e ("octeontx2-vf: Virtual function driver support") Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Signed-off-by: David S. Miller commit c926252205c424c4842dbdbe02f8e3296f623204 Author: Subbaraya Sundeep Date: Wed May 3 12:39:43 2023 +0530 octeontx2-pf: Disable packet I/O for graceful exit At the stage of enabling packet I/O in otx2_open, If mailbox timeout occurs then interface ends up in down state where as hardware packet I/O is enabled. Hence disable packet I/O also before bailing out. Fixes: 1ea0166da050 ("octeontx2-pf: Fix the device state on error") Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Signed-off-by: David S. Miller commit 5eb1b7220948a69298a436148a735f32ec325289 Author: Ratheesh Kannoth Date: Wed May 3 12:39:42 2023 +0530 octeontx2-af: Skip PFs if not enabled Firmware enables PFs and allocate mbox resources for each of the PFs. Currently PF driver configures mbox resources without checking whether PF is enabled or not. This results in crash. This patch fixes this issue by skipping disabled PF's mbox initialization. Fixes: 9bdc47a6e328 ("octeontx2-af: Mbox communication support btw AF and it's VFs") Signed-off-by: Ratheesh Kannoth Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Signed-off-by: David S. Miller commit f66155905959076619c9c519fb099e8ae6cb6f7b Author: Ratheesh Kannoth Date: Wed May 3 12:39:41 2023 +0530 octeontx2-af: Fix issues with NPC field hash extract 1. Allow field hash configuration for both source and destination IPv6. 2. Configure hardware parser based on hash extract feature enable flag for IPv6. 3. Fix IPv6 endianness issue while updating the source/destination IP address via ntuple rule. Fixes: 56d9f5fd2246 ("octeontx2-af: Use hashed field in MCAM key") Signed-off-by: Ratheesh Kannoth Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 406bed11fb91a0b35c26fe633d8700febaec6439 Author: Ratheesh Kannoth Date: Wed May 3 12:39:40 2023 +0530 octeontx2-af: Update/Fix NPC field hash extract feature 1. As per previous implementation, mask and control parameter to generate the field hash value was not passed to the caller program. Updated the secret key mbox to share that information as well, as a part of the fix. 2. Earlier implementation did not consider hash reduction of both source and destination IPv6 addresses. Only source IPv6 address was considered. This fix solves that and provides option to hash Fixes: 56d9f5fd2246 ("octeontx2-af: Use hashed field in MCAM key") Signed-off-by: Ratheesh Kannoth Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 2075bf150ddf320df02c05e242774dc0f73be1a1 Author: Suman Ghosh Date: Wed May 3 12:39:39 2023 +0530 octeontx2-af: Update correct mask to filter IPv4 fragments During the initial design, the IPv4 ip_flag mask was set to 0xff. Which results to filter only fragmets with (fragment_offset == 0). As part of the fix, updated the mask to 0x20 to filter all the fragmented packets irrespective of the fragment_offset value. Fixes: c672e3727989 ("octeontx2-pf: Add support to filter packet based on IP fragment") Signed-off-by: Suman Ghosh Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit cb5edce271764524b88b1a6866b3e626686d9a33 Author: Hariprasad Kelam Date: Wed May 3 12:39:38 2023 +0530 octeontx2-af: Add validation for lmac type Upon physical link change, firmware reports to the kernel about the change along with the details like speed, lmac_type_id, etc. Kernel derives lmac_type based on lmac_type_id received from firmware. In a few scenarios, firmware returns an invalid lmac_type_id, which is resulting in below kernel panic. This patch adds the missing validation of the lmac_type_id field. Internal error: Oops: 96000005 [#1] PREEMPT SMP [ 35.321595] Modules linked in: [ 35.328982] CPU: 0 PID: 31 Comm: kworker/0:1 Not tainted 5.4.210-g2e3169d8e1bc-dirty #17 [ 35.337014] Hardware name: Marvell CN103XX board (DT) [ 35.344297] Workqueue: events work_for_cpu_fn [ 35.352730] pstate: 40400089 (nZcv daIf +PAN -UAO) [ 35.360267] pc : strncpy+0x10/0x30 [ 35.366595] lr : cgx_link_change_handler+0x90/0x180 Fixes: 61071a871ea6 ("octeontx2-af: Forward CGX link notifications to PFs") Signed-off-by: Hariprasad Kelam Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 2a6eecc592b4d59a04d513aa25fc0f30d52100cd Author: Ratheesh Kannoth Date: Wed May 3 12:39:37 2023 +0530 octeontx2-pf: Increase the size of dmac filter flows CN10kb supports large number of dmac filter flows to be inserted. Increase the field size to accommodate the same Fixes: b747923afff8 ("octeontx2-af: Exact match support") Signed-off-by: Ratheesh Kannoth Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 60999cb83554ebcf6cfff8894bc2c3d99ea858ba Author: Ratheesh Kannoth Date: Wed May 3 12:39:36 2023 +0530 octeontx2-af: Fix depth of cam and mem table. In current driver, NPC cam and mem table sizes are read from wrong register offset. This patch fixes the register offset so that correct values are populated on read. Fixes: b747923afff8 ("octeontx2-af: Exact match support") Signed-off-by: Ratheesh Kannoth Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit c60a6b90e7890453f09e0d2163d6acadabe3415b Author: Ratheesh Kannoth Date: Wed May 3 12:39:35 2023 +0530 octeontx2-af: Fix start and end bit for scan config In the current driver, NPC exact match feature was not getting enabled as configured bit was not read properly. for_each_set_bit_from() need end bit as one bit post position in the bit map to read NPC exact nibble enable bits properly. This patch fixes the same. Fixes: b747923afff8 ("octeontx2-af: Exact match support") Signed-off-by: Ratheesh Kannoth Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Signed-off-by: David S. Miller commit 048486f81d01db4d100af021ee2ea211d19732a0 Author: Geetha sowjanya Date: Wed May 3 12:39:34 2023 +0530 octeontx2-af: Secure APR table update with the lock APR table contains the lmtst base address of PF/VFs. These entries are updated by the PF/VF during the device probe. The lmtst address is fetched from HW using "TXN_REQ" and "ADDR_RSP_STS" registers. The lock tries to protect these registers from getting overwritten when multiple PFs invokes rvu_get_lmtaddr() simultaneously. For example, if PF1 submit the request and got permitted before it reads the response and PF2 got scheduled submit the request then the response of PF1 is overwritten by the PF2 response. Fixes: 893ae97214c3 ("octeontx2-af: cn10k: Support configurable LMTST regions") Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Sai Krishna Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 9e08dcef60baa3125d10077ce5e9b3b5cf28a169 Merge: c6d96df9fa2c1 c1592a89942e9 Author: David S. Miller Date: Wed May 3 08:55:12 2023 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neir Ayuso says: ==================== The following patchset contains Netfilter fixes for net: 1) Hit ENOENT when trying to update an unexisting base chain. 2) Fix libmnl pkg-config usage in selftests, from Jeremy Sowden. 3) KASAN reports use-after-free when deleting a set element for an anonymous set that was already removed in the same transaction, reported by P. Sondej and P. Krysiuk. ==================== Signed-off-by: David S. Miller commit c1592a89942e9678f7d9c8030efa777c0d57edab Author: Pablo Neira Ayuso Date: Tue May 2 10:25:24 2023 +0200 netfilter: nf_tables: deactivate anonymous set from preparation phase Toggle deleted anonymous sets as inactive in the next generation, so users cannot perform any update on it. Clear the generation bitmask in case the transaction is aborted. The following KASAN splat shows a set element deletion for a bound anonymous set that has been already removed in the same transaction. [ 64.921510] ================================================================== [ 64.923123] BUG: KASAN: wild-memory-access in nf_tables_commit+0xa24/0x1490 [nf_tables] [ 64.924745] Write of size 8 at addr dead000000000122 by task test/890 [ 64.927903] CPU: 3 PID: 890 Comm: test Not tainted 6.3.0+ #253 [ 64.931120] Call Trace: [ 64.932699] [ 64.934292] dump_stack_lvl+0x33/0x50 [ 64.935908] ? nf_tables_commit+0xa24/0x1490 [nf_tables] [ 64.937551] kasan_report+0xda/0x120 [ 64.939186] ? nf_tables_commit+0xa24/0x1490 [nf_tables] [ 64.940814] nf_tables_commit+0xa24/0x1490 [nf_tables] [ 64.942452] ? __kasan_slab_alloc+0x2d/0x60 [ 64.944070] ? nf_tables_setelem_notify+0x190/0x190 [nf_tables] [ 64.945710] ? kasan_set_track+0x21/0x30 [ 64.947323] nfnetlink_rcv_batch+0x709/0xd90 [nfnetlink] [ 64.948898] ? nfnetlink_rcv_msg+0x480/0x480 [nfnetlink] Signed-off-by: Pablo Neira Ayuso commit de4773f0235acf74554f6a64ea60adc0d7b01895 Author: Jeremy Sowden Date: Tue Apr 25 22:11:39 2023 +0100 selftests: netfilter: fix libmnl pkg-config usage 1. Don't hard-code pkg-config 2. Remove distro-specific default for CFLAGS 3. Use pkg-config for LDLIBS Fixes: a50a88f026fb ("selftests: netfilter: fix a build error on openSUSE") Suggested-by: Jan Engelhardt Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso commit 8509f62b0b07ae8d6dec5aa9613ab1b250ff632f Author: Pablo Neira Ayuso Date: Tue Apr 25 16:50:32 2023 +0200 netfilter: nf_tables: hit ENOENT on unexisting chain/flowtable update with missing attributes If user does not specify hook number and priority, then assume this is a chain/flowtable update. Therefore, report ENOENT which provides a better hint than EINVAL. Set on extended netlink error report to refer to the chain name. Fixes: 5b6743fb2c2a ("netfilter: nf_tables: skip flowtable hooknum and priority on device updates") Fixes: 5efe72698a97 ("netfilter: nf_tables: support for adding new devices to an existing netdev chain") Signed-off-by: Pablo Neira Ayuso commit e4212ed0ba58264fbe7706c5493b9600339f60ae Author: Bagas Sanjaya Date: Wed May 3 10:54:16 2023 +0700 ALSA: docs: Fix code block indentation in ALSA driver example Sphinx reports htmldocs warnings: Documentation/sound/kernel-api/writing-an-alsa-driver.rst:3997: WARNING: Literal block expected; none found. Documentation/sound/kernel-api/writing-an-alsa-driver.rst:4004: WARNING: Literal block expected; none found. Documentation/sound/kernel-api/writing-an-alsa-driver.rst:4009: WARNING: Unexpected indentation. Documentation/sound/kernel-api/writing-an-alsa-driver.rst:4035: WARNING: Literal block expected; none found. These are due to indentation of example driver snippets which is outside the code block scope. Fix these by indenting code blocks in question to the scope. Fixes: 4d421eebe1465d ("ALSA: docs: writing-an-alsa-driver.rst: polishing") Reported-by: kernel test robot Closes: https://lore.kernel.org/linux-doc/202305021822.4U6XOvGf-lkp@intel.com/ Signed-off-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20230503035416.62722-1-bagasdotme@gmail.com Signed-off-by: Takashi Iwai commit 1604f51b401bfd881ab5c6401eaedac97f2166ca Author: Ivan Orlov Date: Mon May 1 14:16:34 2023 +0400 ALSA: docs: Extend module parameters description Common ALSA module parameters look a little bit confusing because of the description lacking, and it took me a while to understand the purpose of their existence. To figure it out I asked the question about them to the "alsa-devel" mailing list, and Takashi Iwai answered me with the text I appended to the ALSA documentation in this patch. These common module parameters aren't used a lot nowadays, but as I understand they are important for providing compatibility with some existing user-space apps. So in my opinion it is a good idea to document why we need them. Signed-off-by: Ivan Orlov Link: https://lore.kernel.org/r/20230501101634.476297-1-ivan.orlov0322@gmail.com Signed-off-by: Takashi Iwai commit c8c2969bfcba5fcba3a5b078315c1b586d927d9f Author: Hans de Goede Date: Tue Apr 25 21:44:41 2023 +0200 drm/i915/dsi: Use unconditional msleep() instead of intel_dsi_msleep() The intel_dsi_msleep() helper skips sleeping if the MIPI-sequences have a version of 3 or newer and the panel is in vid-mode. This is based on the big comment around line 730 which starts with "Panel enable/disable sequences from the VBT spec.", where the "v3 video mode seq" column does not have any wait t# entries. Checking the Windows driver shows that it does always honor the VBT delays independent of the version of the VBT sequences. Commit 6fdb335f1c9c ("drm/i915/dsi: Use unconditional msleep for the panel_on_delay when there is no reset-deassert MIPI-sequence") switched to a direct msleep() instead of intel_dsi_msleep() when there is no MIPI_SEQ_DEASSERT_RESET sequence, to fix the panel on an Acer Aspire Switch 10 E SW3-016 not turning on. And now testing on a Nextbook Ares 8A shows that panel_on_delay must always be honored otherwise the panel will not turn on. Instead of only always using regular msleep() for panel_on_delay do as Windows does and always use regular msleep() everywhere were intel_dsi_msleep() is used and drop the intel_dsi_msleep() helper. Changes in v2: - Replace all intel_dsi_msleep() calls instead of just the intel_dsi_msleep(panel_on_delay) call Cc: stable@vger.kernel.org Fixes: 6fdb335f1c9c ("drm/i915/dsi: Use unconditional msleep for the panel_on_delay when there is no reset-deassert MIPI-sequence") Signed-off-by: Hans de Goede Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230425194441.68086-1-hdegoede@redhat.com (cherry picked from commit fa83c12132f71302f7d4b02758dc0d46048d3f5f) Signed-off-by: Joonas Lahtinen commit 6ece90e3665a9b7fb2637fcca26cebd42991580b Author: Radhakrishna Sripada Date: Thu Apr 20 15:12:47 2023 -0700 drm/i915/mtl: Add the missing CPU transcoder mask in intel_device_info CPU transcoder mask is used to iterate over the available CPU transcoders in the macro for_each_cpu_transcoder(). The macro is broken on MTL and got highlighted when audio state was being tracked for each transcoder added in [1]. Add the missing CPU transcoder mask which is similar to ADL-P mask but without DSI transcoders. [1]: https://patchwork.freedesktop.org/patch/523723/ Fixes: 7835303982d1 ("drm/i915/mtl: Add MeteorLake PCI IDs") Cc: Ville Syrjälä Signed-off-by: Radhakrishna Sripada Acked-by: Haridhar Kalvala Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20230420221248.2511314-1-radhakrishna.sripada@intel.com (cherry picked from commit bddc18913bd44adae5c828fd514d570f43ba1576) Signed-off-by: Joonas Lahtinen commit 1816f4a17f54a01afa2f06d6571c39890b97d282 Author: John Harrison Date: Fri Apr 21 15:47:42 2023 -0700 drm/i915/guc: Actually return an error if GuC version range check fails Dan Carpenter pointed out that 'err' was not being set in the case where the GuC firmware version range check fails. Fix that. Note that while this is a bug fix for a previous patch (see Fixes tag below). It is an exceedingly low risk bug. The range check is asserting that the GuC firmware version is within spec. So it should not be possible to ever have a firmware file that fails this check. If larger version numbers are required in the future, that would be a backwards breaking spec change and thus require a major version bump, in which case an old i915 driver would not load that new version anyway. Fixes: 9bbba0667f37 ("drm/i915/guc: Use GuC submission API version number") Reported-by: Dan Carpenter Signed-off-by: John Harrison Cc: John Harrison Cc: Daniele Ceraolo Spurio Cc: Alan Previn Cc: Umesh Nerlige Ramappa Cc: Rodrigo Vivi Cc: Matthew Brost Cc: Andi Shyti Cc: Matthew Auld Cc: Tvrtko Ursulin Cc: Lucas De Marchi Cc: Jani Nikula Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230421224742.2357198-1-John.C.Harrison@Intel.com (cherry picked from commit 80ab31799002166ac7c660bacfbff4f85bc29107) Signed-off-by: Joonas Lahtinen commit 0b891c83d8c54cb70e186456c2191adb5fd98c56 Author: Arnd Bergmann Date: Sat Apr 29 22:36:04 2023 +0200 module: include internal.h in module/dups.c Two newly introduced functions are declared in a header that is not included before the definition, causing a warning with sparse or 'make W=1': kernel/module/dups.c:118:6: error: no previous prototype for 'kmod_dup_request_exists_wait' [-Werror=missing-prototypes] 118 | bool kmod_dup_request_exists_wait(char *module_name, bool wait, int *dup_ret) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/module/dups.c:220:6: error: no previous prototype for 'kmod_dup_request_announce' [-Werror=missing-prototypes] 220 | void kmod_dup_request_announce(char *module_name, int ret) | ^~~~~~~~~~~~~~~~~~~~~~~~~ Add an explicit include to ensure the prototypes match. Fixes: 8660484ed1cf ("module: add debugging auto-load duplicate module support") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304141440.DYO4NAzp-lkp@intel.com/ Signed-off-by: Arnd Bergmann Signed-off-by: Luis Chamberlain commit c6d96df9fa2c1d19525239d4262889cce594ce6c Author: Felix Fietkau Date: Wed Apr 26 19:21:53 2023 +0200 net: ethernet: mtk_eth_soc: drop generic vlan rx offload, only use DSA untagging Through testing I found out that hardware vlan rx offload support seems to have some hardware issues. At least when using multiple MACs and when receiving tagged packets on the secondary MAC, the hardware can sometimes start to emit wrong tags on the first MAC as well. In order to avoid such issues, drop the feature configuration and use the offload feature only for DSA hardware untagging on MT7621/MT7622 devices where this feature works properly. Fixes: 08666cbb7dd5 ("net: ethernet: mtk_eth_soc: add support for configuring vlan rx offload") Tested-by: Frank Wunderlich Signed-off-by: Felix Fietkau Signed-off-by: Frank Wunderlich Tested-by: Arınç ÜNAL Acked-by: Arınç ÜNAL Link: https://lore.kernel.org/r/20230426172153.8352-1-linux@fw-web.de Signed-off-by: Jakub Kicinski commit 0199849acd07d07e2a8e42757653ca8b14a122f5 Author: Luis Chamberlain Date: Tue May 2 18:30:04 2023 -0700 sysctl: remove register_sysctl_paths() The deprecation for register_sysctl_paths() is over. We can rejoice as we nuke register_sysctl_paths(). The routine register_sysctl_table() was the only user left of register_sysctl_paths(), so we can now just open code and move the implementation over to what used to be to __register_sysctl_paths(). The old dynamic struct ctl_table_set *set is now the point to sysctl_table_root.default_set. The old dynamic const struct ctl_path *path was being used in the routine register_sysctl_paths() with a static: static const struct ctl_path null_path[] = { {} }; Since this is a null path we can now just simplfy the old routine and remove its use as its always empty. This saves us a total of 230 bytes. $ ./scripts/bloat-o-meter vmlinux.old vmlinux add/remove: 2/7 grow/shrink: 1/1 up/down: 1015/-1245 (-230) Function old new delta register_leaf_sysctl_tables.constprop - 524 +524 register_sysctl_table 22 497 +475 __pfx_register_leaf_sysctl_tables.constprop - 16 +16 null_path 8 - -8 __pfx_register_sysctl_paths 16 - -16 __pfx_register_leaf_sysctl_tables 16 - -16 __pfx___register_sysctl_paths 16 - -16 __register_sysctl_base 29 12 -17 register_sysctl_paths 18 - -18 register_leaf_sysctl_tables 534 - -534 __register_sysctl_paths 620 - -620 Total: Before=21259666, After=21259436, chg -0.00% Signed-off-by: Luis Chamberlain commit 9e7c73c0b9f49bc73818e08e6282a32b94d96168 Author: Luis Chamberlain Date: Thu Mar 2 12:28:23 2023 -0800 kernel: pid_namespace: simplify sysctls with register_sysctl() register_sysctl_paths() is only required if your child (directories) have entries and pid_namespace does not. So use register_sysctl_init() instead where we don't care about the return value and use register_sysctl() where we do. Signed-off-by: Luis Chamberlain Acked-by: Jeff Xu Link: https://lore.kernel.org/r/20230302202826.776286-9-mcgrof@kernel.org commit 31c6ed4e89187beef8fe2f979c8881ca94839427 Author: Hal Feng Date: Tue Apr 18 20:37:56 2023 +0800 clk: starfive: Fix RESET_STARFIVE_JH7110 can't be selected in a specified case When (ARCH_STARFIVE [=n] && COMPILE_TEST [=y] && RESET_CONTROLLER [=n]), RESET_STARFIVE_JH7110 can't be selected by CLK_STARFIVE_JH7110_SYS and CLK_STARFIVE_JH7110_AON. Add a condition `if RESET_CONTROLLER` to fix it. Also, delete redundant selected options of CLK_STARFIVE_JH7110_AON because these options are already selected by the dependency. Fixes: edab7204afe5 ("clk: starfive: Add StarFive JH7110 system clock driver") Fixes: b2ab3c94f41f ("clk: starfive: Add StarFive JH7110 always-on clock driver") Signed-off-by: Hal Feng Link: https://lore.kernel.org/r/20230418123756.62495-2-hal.feng@starfivetech.com Reviewed-by: Conor Dooley Signed-off-by: Stephen Boyd commit 5c667d5a5a3ec16609229dddf25a46654186b52b Author: Nathan Chancellor Date: Mon May 1 14:34:47 2023 -0700 clk: sp7021: Adjust width of _m in HWM_FIELD_PREP() When building with clang + W=1, there is a warning around an internal comparison check within the FIELD_PREP() macro, due to a 32-bit variable comparison against ~0ull: drivers/clk/clk-sp7021.c:316:8: error: result of comparison of constant 18446744073709551615 with expression of type 'typeof (_Generic((_m), ...' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare] r0 |= HWM_FIELD_PREP(MASK_SEL_FRA, clk->p[SEL_FRA]); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/clk-sp7021.c:45:15: note: expanded from macro 'HWM_FIELD_PREP' (_m << 16) | FIELD_PREP(_m, value); \ ^~~~~~~~~~~~~~~~~~~~~ include/linux/bitfield.h:114:3: note: expanded from macro 'FIELD_PREP' __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/bitfield.h:71:53: note: expanded from macro '__BF_FIELD_CHECK' BUILD_BUG_ON_MSG(__bf_cast_unsigned(_mask, _mask) > \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:397:22: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:385:23: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:377:9: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ This is expected given the types of the input. Increase the size of the temporary variable in HWM_FIELD_PREP() to eliminate the warning, which follows the logic of commit cfd6fb45cfaf ("crypto: ccree - avoid out-of-range warnings from clang") for the same reasons. Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20230501-sp7021-field_prep-warning-v1-1-5b36d71feefe@kernel.org Reported-by: kernel test robot Link: https://lore.kernel.org/202303221947.pXP2v4xJ-lkp@intel.com/ Reviewed-by: Nick Desaulniers Signed-off-by: Stephen Boyd commit 690dccc4a0bf8b6b4eeb160882ec584d3d0bb642 Author: Adam Ford Date: Sun Apr 23 07:38:27 2023 -0500 Revert "clk: imx: composite-8m: Add support to determine_rate" This reverts commit 156e96ff2172518b6f83e97d8f11f677bc668e22. This patch was found to cause some division issues on the i.MX8MP which causes the video clocks to not properly divide when division was greate than 8. This causes video failures on disp1_pix and disp2_pix clocks. Until a better solution is found, we'll have to revert this. Signed-off-by: Adam Ford Link: https://lore.kernel.org/r/20230423123828.1346511-1-aford173@gmail.com Acked-by: Peng Fan Signed-off-by: Stephen Boyd commit 6152e53d9671b0ccc21c1bca842617b32ccfc5d8 Author: Suren Baghdasaryan Date: Fri Apr 28 10:35:33 2023 -0700 mm: change per-VMA lock statistics to be disabled by default Change CONFIG_PER_VMA_LOCK_STATS to be disabled by default, as most users don't need it. Add configuration help to clarify its usage. Link: https://lkml.kernel.org/r/20230428173533.18158-1-surenb@google.com Fixes: 52f238653e45 ("mm: introduce per-VMA lock statistics") Signed-off-by: Suren Baghdasaryan Suggested-by: Linus Torvalds Reviewed-by: Lorenzo Stoakes Acked-by: Vlastimil Babka Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit 3628d2bb155b0e4dfc1922a99de0631d3e2095d3 Author: Michal Simek Date: Tue May 2 15:55:00 2023 +0200 MAINTAINERS: update Michal Simek's email @xilinx.com is still working but better to switch to new amd.com after AMD/Xilinx acquisition. Link: https://lkml.kernel.org/r/bd073d026f8c367a9cfb45d26d39f26e40c665dc.1683035692.git.michal.simek@amd.com Signed-off-by: Michal Simek Cc: Colin Ian King Cc: Jakub Kicinski Cc: Kirill Tkhai Cc: Konrad Dybcio Cc: Qais Yousef Cc: Michal Simek Signed-off-by: Andrew Morton commit 00ca0f2e86bf40b016a646e6323a8941a09cf106 Author: Lorenzo Stoakes Date: Sun Apr 30 16:07:07 2023 +0100 mm/mempolicy: correctly update prev when policy is equal on mbind The refactoring in commit f4e9e0e69468 ("mm/mempolicy: fix use-after-free of VMA iterator") introduces a subtle bug which arises when attempting to apply a new NUMA policy across a range of VMAs in mbind_range(). The refactoring passes a **prev pointer to keep track of the previous VMA in order to reduce duplication, and in all but one case it keeps this correctly updated. The bug arises when a VMA within the specified range has an equivalent policy as determined by mpol_equal() - which unlike other cases, does not update prev. This can result in a situation where, later in the iteration, a VMA is found whose policy does need to change. At this point, vma_merge() is invoked with prev pointing to a VMA which is before the previous VMA. Since vma_merge() discovers the curr VMA by looking for the one immediately after prev, it will now be in a situation where this VMA is incorrect and the merge will not proceed correctly. This is checked in the VM_WARN_ON() invariant case with end > curr->vm_end, which, if a merge is possible, results in a warning (if CONFIG_DEBUG_VM is specified). I note that vma_merge() performs these invariant checks only after merge_prev/merge_next are checked, which is debatable as it hides this issue if no merge is possible even though a buggy situation has arisen. The solution is simply to update the prev pointer even when policies are equal. This caused a bug to arise in the 6.2.y stable tree, and this patch resolves this bug. Link: https://lkml.kernel.org/r/83f1d612acb519d777bebf7f3359317c4e7f4265.1682866629.git.lstoakes@gmail.com Fixes: f4e9e0e69468 ("mm/mempolicy: fix use-after-free of VMA iterator") Signed-off-by: Lorenzo Stoakes Reported-by: kernel test robot Link: https://lore.kernel.org/oe-lkp/202304292203.44ddeff6-oliver.sang@intel.com Cc: Liam R. Howlett Cc: Mel Gorman Cc: Signed-off-by: Andrew Morton commit 43ec16f1450f4936025a9bdf1a273affdb9732c1 Author: Zhang Zhengming Date: Wed Apr 19 12:02:03 2023 +0800 relayfs: fix out-of-bounds access in relay_file_read There is a crash in relay_file_read, as the var from point to the end of last subbuf. The oops looks something like: pc : __arch_copy_to_user+0x180/0x310 lr : relay_file_read+0x20c/0x2c8 Call trace: __arch_copy_to_user+0x180/0x310 full_proxy_read+0x68/0x98 vfs_read+0xb0/0x1d0 ksys_read+0x6c/0xf0 __arm64_sys_read+0x20/0x28 el0_svc_common.constprop.3+0x84/0x108 do_el0_svc+0x74/0x90 el0_svc+0x1c/0x28 el0_sync_handler+0x88/0xb0 el0_sync+0x148/0x180 We get the condition by analyzing the vmcore: 1). The last produced byte and last consumed byte both at the end of the last subbuf 2). A softirq calls function(e.g __blk_add_trace) to write relay buffer occurs when an program is calling relay_file_read_avail(). relay_file_read relay_file_read_avail relay_file_read_consume(buf, 0, 0); //interrupted by softirq who will write subbuf .... return 1; //read_start point to the end of the last subbuf read_start = relay_file_read_start_pos //avail is equal to subsize avail = relay_file_read_subbuf_avail //from points to an invalid memory address from = buf->start + read_start //system is crashed copy_to_user(buffer, from, avail) Link: https://lkml.kernel.org/r/20230419040203.37676-1-zhang.zhengming@h3c.com Fixes: 8d62fdebdaf9 ("relay file read: start-pos fix") Signed-off-by: Zhang Zhengming Reviewed-by: Zhao Lei Reviewed-by: Zhou Kete Reviewed-by: Pengcheng Yang Cc: Jens Axboe Cc: Signed-off-by: Andrew Morton commit 29083fd84da576bfb3563d044f98d38e6b338f00 Author: Mark Rutland Date: Tue Apr 18 17:42:12 2023 +0100 kasan: hw_tags: avoid invalid virt_to_page() When booting with 'kasan.vmalloc=off', a kernel configured with support for KASAN_HW_TAGS will explode at boot time due to bogus use of virt_to_page() on a vmalloc adddress. With CONFIG_DEBUG_VIRTUAL selected this will be reported explicitly, and with or without CONFIG_DEBUG_VIRTUAL the kernel will dereference a bogus address: | ------------[ cut here ]------------ | virt_to_phys used for non-linear address: (____ptrval____) (0xffff800008000000) | WARNING: CPU: 0 PID: 0 at arch/arm64/mm/physaddr.c:15 __virt_to_phys+0x78/0x80 | Modules linked in: | CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.3.0-rc3-00073-g83865133300d-dirty #4 | Hardware name: linux,dummy-virt (DT) | pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) | pc : __virt_to_phys+0x78/0x80 | lr : __virt_to_phys+0x78/0x80 | sp : ffffcd076afd3c80 | x29: ffffcd076afd3c80 x28: 0068000000000f07 x27: ffff800008000000 | x26: fffffbfff0000000 x25: fffffbffff000000 x24: ff00000000000000 | x23: ffffcd076ad3c000 x22: fffffc0000000000 x21: ffff800008000000 | x20: ffff800008004000 x19: ffff800008000000 x18: ffff800008004000 | x17: 666678302820295f x16: ffffffffffffffff x15: 0000000000000004 | x14: ffffcd076b009e88 x13: 0000000000000fff x12: 0000000000000003 | x11: 00000000ffffefff x10: c0000000ffffefff x9 : 0000000000000000 | x8 : 0000000000000000 x7 : 205d303030303030 x6 : 302e30202020205b | x5 : ffffcd076b41d63f x4 : ffffcd076afd3827 x3 : 0000000000000000 | x2 : 0000000000000000 x1 : ffffcd076afd3a30 x0 : 000000000000004f | Call trace: | __virt_to_phys+0x78/0x80 | __kasan_unpoison_vmalloc+0xd4/0x478 | __vmalloc_node_range+0x77c/0x7b8 | __vmalloc_node+0x54/0x64 | init_IRQ+0x94/0xc8 | start_kernel+0x194/0x420 | __primary_switched+0xbc/0xc4 | ---[ end trace 0000000000000000 ]--- | Unable to handle kernel paging request at virtual address 03fffacbe27b8000 | 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 | CM = 0, WnR = 0 | swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000041bc5000 | [03fffacbe27b8000] pgd=0000000000000000, p4d=0000000000000000 | Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP | Modules linked in: | CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 6.3.0-rc3-00073-g83865133300d-dirty #4 | Hardware name: linux,dummy-virt (DT) | pstate: 200000c5 (nzCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) | pc : __kasan_unpoison_vmalloc+0xe4/0x478 | lr : __kasan_unpoison_vmalloc+0xd4/0x478 | sp : ffffcd076afd3ca0 | x29: ffffcd076afd3ca0 x28: 0068000000000f07 x27: ffff800008000000 | x26: 0000000000000000 x25: 03fffacbe27b8000 x24: ff00000000000000 | x23: ffffcd076ad3c000 x22: fffffc0000000000 x21: ffff800008000000 | x20: ffff800008004000 x19: ffff800008000000 x18: ffff800008004000 | x17: 666678302820295f x16: ffffffffffffffff x15: 0000000000000004 | x14: ffffcd076b009e88 x13: 0000000000000fff x12: 0000000000000001 | x11: 0000800008000000 x10: ffff800008000000 x9 : ffffb2f8dee00000 | x8 : 000ffffb2f8dee00 x7 : 205d303030303030 x6 : 302e30202020205b | x5 : ffffcd076b41d63f x4 : ffffcd076afd3827 x3 : 0000000000000000 | x2 : 0000000000000000 x1 : ffffcd076afd3a30 x0 : ffffb2f8dee00000 | Call trace: | __kasan_unpoison_vmalloc+0xe4/0x478 | __vmalloc_node_range+0x77c/0x7b8 | __vmalloc_node+0x54/0x64 | init_IRQ+0x94/0xc8 | start_kernel+0x194/0x420 | __primary_switched+0xbc/0xc4 | Code: d34cfc08 aa1f03fa 8b081b39 d503201f (f9400328) | ---[ end trace 0000000000000000 ]--- | Kernel panic - not syncing: Attempted to kill the idle task! This is because init_vmalloc_pages() erroneously calls virt_to_page() on a vmalloc address, while virt_to_page() is only valid for addresses in the linear/direct map. Since init_vmalloc_pages() expects virtual addresses in the vmalloc range, it must use vmalloc_to_page() rather than virt_to_page(). We call init_vmalloc_pages() from __kasan_unpoison_vmalloc(), where we check !is_vmalloc_or_module_addr(), suggesting that we might encounter a non-vmalloc address. Luckily, this never happens. By design, we only call __kasan_unpoison_vmalloc() on pointers in the vmalloc area, and I have verified that we don't violate that expectation. Given that, is_vmalloc_or_module_addr() must always be true for any legitimate argument to __kasan_unpoison_vmalloc(). Correct init_vmalloc_pages() to use vmalloc_to_page(), and remove the redundant and misleading use of is_vmalloc_or_module_addr() in __kasan_unpoison_vmalloc(). Link: https://lkml.kernel.org/r/20230418164212.1775741-1-mark.rutland@arm.com Fixes: 6c2f761dad7851d8 ("kasan: fix zeroing vmalloc memory with HW_TAGS") Signed-off-by: Mark Rutland Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Cc: Signed-off-by: Andrew Morton commit 245f0922689364b21163af4937a05ea0ba576fae Author: Kefeng Wang Date: Mon Apr 17 12:53:23 2023 +0800 mm: hwpoison: coredump: support recovery from dump_user_range() dump_user_range() is used to copy the user page to a coredump file, but if a hardware memory error occurred during copy, which called from __kernel_write_iter() in dump_user_range(), it crashes, CPU: 112 PID: 7014 Comm: mca-recover Not tainted 6.3.0-rc2 #425 pc : __memcpy+0x110/0x260 lr : _copy_from_iter+0x3bc/0x4c8 ... Call trace: __memcpy+0x110/0x260 copy_page_from_iter+0xcc/0x130 pipe_write+0x164/0x6d8 __kernel_write_iter+0x9c/0x210 dump_user_range+0xc8/0x1d8 elf_core_dump+0x308/0x368 do_coredump+0x2e8/0xa40 get_signal+0x59c/0x788 do_signal+0x118/0x1f8 do_notify_resume+0xf0/0x280 el0_da+0x130/0x138 el0t_64_sync_handler+0x68/0xc0 el0t_64_sync+0x188/0x190 Generally, the '->write_iter' of file ops will use copy_page_from_iter() and copy_page_from_iter_atomic(), change memcpy() to copy_mc_to_kernel() in both of them to handle #MC during source read, which stop coredump processing and kill the task instead of kernel panic, but the source address may not always a user address, so introduce a new copy_mc flag in struct iov_iter{} to indicate that the iter could do a safe memory copy, also introduce the helpers to set/cleck the flag, for now, it's only used in coredump's dump_user_range(), but it could expand to any other scenarios to fix the similar issue. Link: https://lkml.kernel.org/r/20230417045323.11054-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Alexander Viro Cc: Christian Brauner Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Tong Tiangen Cc: Jens Axboe Signed-off-by: Andrew Morton commit 65f67a3e002f0e5ae84a65be915248d57d480060 Author: Baolin Wang Date: Tue Apr 25 20:44:53 2023 +0800 mm/page_alloc: add some comments to explain the possible hole in __pageblock_pfn_to_page() Now the __pageblock_pfn_to_page() is used by set_zone_contiguous(), which checks whether the given zone contains holes, and uses pfn_to_online_page() to validate if the start pfn is online and valid, as well as using pfn_valid() to validate the end pfn. However, the __pageblock_pfn_to_page() function may return non-NULL even if the end pfn of a pageblock is in a memory hole in some situations. For example, if the pageblock order is MAX_ORDER, which will fall into 2 sub-sections, and the end pfn of the pageblock may be hole even though the start pfn is online and valid. See below memory layout as an example and suppose the pageblock order is MAX_ORDER. [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000040000000-0x00000000ffffffff] [ 0.000000] DMA32 empty [ 0.000000] Normal [mem 0x0000000100000000-0x0000001fa7ffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000040000000-0x0000001fa3c7ffff] [ 0.000000] node 0: [mem 0x0000001fa3c80000-0x0000001fa3ffffff] [ 0.000000] node 0: [mem 0x0000001fa4000000-0x0000001fa402ffff] [ 0.000000] node 0: [mem 0x0000001fa4030000-0x0000001fa40effff] [ 0.000000] node 0: [mem 0x0000001fa40f0000-0x0000001fa73cffff] [ 0.000000] node 0: [mem 0x0000001fa73d0000-0x0000001fa745ffff] [ 0.000000] node 0: [mem 0x0000001fa7460000-0x0000001fa746ffff] [ 0.000000] node 0: [mem 0x0000001fa7470000-0x0000001fa758ffff] [ 0.000000] node 0: [mem 0x0000001fa7590000-0x0000001fa7dfffff] Focus on the last memory range, and there is a hole for the range [mem 0x0000001fa7590000-0x0000001fa7dfffff]. That means the last pageblock will contain the range from 0x1fa7c00000 to 0x1fa7ffffff, since the pageblock must be 4M aligned. And in this pageblock, these pfns will fall into 2 sub-section (the sub-section size is 2M aligned). So, the 1st sub-section (indicates pfn range: 0x1fa7c00000 - 0x1fa7dfffff ) in this pageblock is valid by calling subsection_map_init() in free_area_init(), but the 2nd sub-section (indicates pfn range: 0x1fa7e00000 - 0x1fa7ffffff ) in this pageblock is not valid. This did not break anything until now, but the zone continuous is fragile in this possible scenario. So as previous discussion[1], it is better to add some comments to explain this possible issue in case there are some future pfn walkers that rely on this. [1] https://lore.kernel.org/all/87r0sdsmr6.fsf@yhuang6-desk2.ccr.corp.intel.com/ Link: https://lkml.kernel.org/r/5c26368865e79c743a453dea48d30670b19d2e4f.1682425534.git.baolin.wang@linux.alibaba.com Link: https://lkml.kernel.org/r/5c26368865e79c743a453dea48d30670b19d2e4f.1682425534.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Acked-by: Michal Hocko Reviewed-by: "Huang, Ying" Cc: Baolin Wang Cc: David Hildenbrand Cc: Mel Gorman Cc: Mike Rapoport (IBM) Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 2c281f54f556e1f3266c8cb104adf9eea7a7b742 Author: David Hildenbrand Date: Sat Apr 22 23:01:56 2023 +0200 mm/ksm: move disabling KSM from s390/gmap code to KSM code Let's factor out actual disabling of KSM. The existing "mm->def_flags &= ~VM_MERGEABLE;" was essentially a NOP and can be dropped, because def_flags should never include VM_MERGEABLE. Note that we don't currently prevent re-enabling KSM. This should now be faster in case KSM was never enabled, because we only conditionally iterate all VMAs. Further, it certainly looks cleaner. Link: https://lkml.kernel.org/r/20230422210156.33630-1-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Janosch Frank Acked-by: Stefan Roesch Cc: Christian Borntraeger Cc: Claudio Imbrenda Cc: Heiko Carstens Cc: Johannes Weiner Cc: Michal Hocko Cc: Rik van Riel Cc: Shuah Khan Cc: Sven Schnelle Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit 1150ea9338554ee6685c9f8939cf7202bf5b27cf Author: David Hildenbrand Date: Sat Apr 22 22:54:19 2023 +0200 selftests/ksm: ksm_functional_tests: add prctl unmerge test Let's test whether setting PR_SET_MEMORY_MERGE to 0 after setting it to 1 will unmerge pages, similar to how setting MADV_UNMERGEABLE after setting MADV_MERGEABLE would. Link: https://lkml.kernel.org/r/20230422205420.30372-3-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Stefan Roesch Cc: Christian Borntraeger Cc: Claudio Imbrenda Cc: Heiko Carstens Cc: Janosch Frank Cc: Johannes Weiner Cc: Michal Hocko Cc: Rik van Riel Cc: Shuah Khan Cc: Sven Schnelle Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit 24139c07f413ef4b555482c758343d71392a19bc Author: David Hildenbrand Date: Sat Apr 22 22:54:18 2023 +0200 mm/ksm: unmerge and clear VM_MERGEABLE when setting PR_SET_MEMORY_MERGE=0 Patch series "mm/ksm: improve PR_SET_MEMORY_MERGE=0 handling and cleanup disabling KSM", v2. (1) Make PR_SET_MEMORY_MERGE=0 unmerge pages like setting MADV_UNMERGEABLE does, (2) add a selftest for it and (3) factor out disabling of KSM from s390/gmap code. This patch (of 3): Let's unmerge any KSM pages when setting PR_SET_MEMORY_MERGE=0, and clear the VM_MERGEABLE flag from all VMAs -- just like KSM would. Of course, only do that if we previously set PR_SET_MEMORY_MERGE=1. Link: https://lkml.kernel.org/r/20230422205420.30372-1-david@redhat.com Link: https://lkml.kernel.org/r/20230422205420.30372-2-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Stefan Roesch Cc: Christian Borntraeger Cc: Claudio Imbrenda Cc: Heiko Carstens Cc: Janosch Frank Cc: Johannes Weiner Cc: Michal Hocko Cc: Rik van Riel Cc: Shuah Khan Cc: Sven Schnelle Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit 70307b0e297a6634be855c49525ccbea50922a90 Author: Kefeng Wang Date: Wed Mar 8 16:33:11 2023 +0800 mm/damon/paddr: fix missing folio_sz update in damon_pa_young() The *folio_sz in damon_pa_young() will be used(as last_folio_sz) by __damon_pa_check_access(), so it's need to be updated, fix missing branch. Link: https://lkml.kernel.org/r/20230308083311.120951-4-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit b6993be23601c8bc992dc9743fbf78c1ff5d6b6a Author: Kefeng Wang Date: Wed Mar 8 16:33:10 2023 +0800 mm/damon/paddr: minor refactor of damon_pa_mark_accessed_or_deactivate() Omit one line by unified folio_put(), and make code more clear. Link: https://lkml.kernel.org/r/20230308083311.120951-3-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit dd411433129c07a3bea43a0cc5ad9587bac1736a Author: Kefeng Wang Date: Wed Mar 8 16:33:09 2023 +0800 mm/damon/paddr: minor refactor of damon_pa_pageout() Patch series "mm/damon/paddr: minor code improvement", v3. Unify folio_put() to make code more clear, and also fix minor issue in damon_pa_young(). This patch (of 3): Omit three lines by unified folio_put(), and make code more clear. Link: https://lkml.kernel.org/r/20230308083311.120951-1-wangkefeng.wang@huawei.com Link: https://lkml.kernel.org/r/20230308083311.120951-2-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit 348551ddaf311c76b01cdcbaf61b6fef06a49144 Merge: 7df047b3f0aa0 b7badd752de05 Author: Linus Torvalds Date: Tue May 2 15:40:41 2023 -0700 Merge tag 'pinctrl-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "Mostly drivers! Nothing special: some new Qualcomm chips as usual, and the new NXP S32 and nVidia BlueField-3. Core changes: - Make a lot of pin controllers with GPIO and irqchips immutable, i.e. not living structs, but const structs. This is driving a changed initiated by the irqchip maintainers. New drivers: - New driver for the NXP S32 SoC pin controller - As part of a thorough cleanup and restructuring of the Ralink/Mediatek drivers, the Ralink MIPS pin control drivers were folded into the Mediatek directory and the family is renamed "mtmips". The Ralink chips live on as Mediatek MIPS family where new variants can be added. As part of this work also the device tree bindings were reworked. - New subdriver for the Qualcomm SM7150 SoC. - New subdriver for the Qualcomm IPQ9574 SoC. - New driver for the nVidia BlueField-3 SoC. - Support for the Qualcomm PMM8654AU mixed signal circuit GPIO. - Support for the Qualcomm PMI632 mixed signal circuit GPIO. Improvements: - Add some missing pins and generic cleanups on the Renesas r8a779g0 and r8a779g0 pin controllers. Generic Renesas extension for power source selection on several SoCs. - Misc cleanups for the Atmel AT91 and AT91-PIO4 pin controllers - Make the GPIO mode work on the Qualcomm SM8550-lpass-lpi driver. - Several device tree binding cleanups as the binding YAML syntax is solidifying" * tag 'pinctrl-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (153 commits) pinctrl-bcm2835.c: fix race condition when setting gpio dir dt-bindings: pinctrl: qcom,sm8150: Drop duplicate function value "atest_usb2" dt-bindings: pinctrl: qcom: Add few missing functions pinctrl: qcom: spmi-gpio: Add PMI632 support dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632 pinctrl: wpcm450: select MFD_SYSCON pinctrl: qcom ssbi-gpio: Convert to immutable irq_chip pinctrl: qcom ssbi-mpp: Convert to immutable irq_chip pinctrl: qcom spmi-mpp: Convert to immutable irq_chip pinctrl: plgpio: Convert to immutable irq_chip pinctrl: pistachio: Convert to immutable irq_chip pinctrl: pic32: Convert to immutable irq_chip pinctrl: sx150x: Convert to immutable irq_chip pinctrl: stmfx: Convert to immutable irq_chip pinctrl: st: Convert to immutable irq_chip pinctrl: mcp23s08: Convert to immutable irq_chip pinctrl: equilibrium: Convert to immutable irq_chip pinctrl: npcm7xx: Convert to immutable irq_chip pinctrl: armada-37xx: Convert to immutable irq_chip pinctrl: nsp: Convert to immutable irq_chip ... commit fc412a6196a6f46ece0e6e6b118556464f165800 Author: Tom Rix Date: Tue May 2 14:07:13 2023 -0400 lockd: define nlm_port_min,max with CONFIG_SYSCTL gcc with W=1 and ! CONFIG_SYSCTL fs/lockd/svc.c:80:51: error: ‘nlm_port_max’ defined but not used [-Werror=unused-const-variable=] 80 | static const int nlm_port_min = 0, nlm_port_max = 65535; | ^~~~~~~~~~~~ fs/lockd/svc.c:80:33: error: ‘nlm_port_min’ defined but not used [-Werror=unused-const-variable=] 80 | static const int nlm_port_min = 0, nlm_port_max = 65535; | ^~~~~~~~~~~~ The only use of these variables is when CONFIG_SYSCTL is defined, so their definition should be likewise conditional. Signed-off-by: Tom Rix Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 340086da9a87820b40601141a0e9e87c954ac006 Author: Tom Rix Date: Tue May 2 13:11:21 2023 -0400 nfsd: define exports_proc_ops with CONFIG_PROC_FS gcc with W=1 and ! CONFIG_PROC_FS fs/nfsd/nfsctl.c:161:30: error: ‘exports_proc_ops’ defined but not used [-Werror=unused-const-variable=] 161 | static const struct proc_ops exports_proc_ops = { | ^~~~~~~~~~~~~~~~ The only use of exports_proc_ops is when CONFIG_PROC_FS is defined, so its definition should be likewise conditional. Signed-off-by: Tom Rix Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 7df047b3f0aa0c0ba730b6be9ab35c0053a3d4fd Merge: 21d2be646007a 705b004ee377b Author: Linus Torvalds Date: Tue May 2 11:56:43 2023 -0700 Merge tag 'vfio-v6.4-rc1' of https://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Expose and allow R/W access to the PCIe DVSEC capability through vfio-pci, as we already do with the legacy vendor capability (K V P Satyanarayana) - Fix kernel-doc issues with structure definitions (Simon Horman) - Clarify ordering of operations relative to the kvm-vfio device for driver dependencies against the kvm pointer (Yi Liu) * tag 'vfio-v6.4-rc1' of https://github.com/awilliam/linux-vfio: docs: kvm: vfio: Suggest KVM_DEV_VFIO_GROUP_ADD vs VFIO_GROUP_GET_DEVICE_FD ordering vfio: correct kdoc for ops structures vfio/pci: Add DVSEC PCI Extended Config Capability to user visible list. commit 21d2be646007a1c5461f4233749c368693aa6d9f Merge: d7b3ffe2d7e47 9ea4eff4b6f4f Author: Linus Torvalds Date: Tue May 2 11:23:08 2023 -0700 Merge tag 'afs-fixes-20230502' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS updates from David Howells: "Three fixes to AFS directory handling: - Make sure that afs_read_dir() sees any increase in file size if the file unexpectedly changed on the server (e.g. due to another client making a change). - Make afs_getattr() always return the server's dir file size, not the locally edited one, so that pagecache eviction doesn't cause the dir file size to change unexpectedly. - Prevent afs_read_dir() from getting into an endless loop if the server indicates that the directory file size is larger than expected" * tag 'afs-fixes-20230502' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Avoid endless loop if file is larger than expected afs: Fix getattr to report server i_size on dirs, not local size afs: Fix updating of i_size with dv jump from server commit d7b3ffe2d7e476f11d73b74093006aa936f59e8b Merge: 3af49062b0115 fb200218b40b7 Author: Linus Torvalds Date: Tue May 2 10:46:11 2023 -0700 Merge tag 'backlight-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "Fix-ups: - Add / improve Device Tree bindings - Convert (int) .remove functions to (void) .remove_new - Rid 'defined but not used' warnings - Remove ineffective casts and pointer stubs - Use specifically crafted API for testing DT property presence" * tag 'backlight-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: as3711: Use of_property_read_bool() for boolean properties backlight: hx8357: Use of_property_present() for testing DT property presence backlight: arcxcnn_bl: Drop of_match_ptr for ID table backlight: lp855x: Mark OF related data as maybe unused backlight: sky81452-backlight: Convert to platform remove callback returning void backlight: rt4831-backlight: Convert to platform remove callback returning void backlight: qcom-wled: Convert to platform remove callback returning void backlight: pwm_bl: Convert to platform remove callback returning void backlight: mt6370-backlight: Convert to platform remove callback returning void backlight: lp8788_bl: Convert to platform remove callback returning void backlight: lm3533_bl: Convert to platform remove callback returning void backlight: led_bl: Convert to platform remove callback returning void backlight: hp680_bl: Convert to platform remove callback returning void backlight: da9052_bl: Convert to platform remove callback returning void backlight: cr_bllcd: Convert to platform remove callback returning void backlight: adp5520_bl: Convert to platform remove callback returning void backlight: aat2870_bl: Convert to platform remove callback returning void backlight: qcom-wled: Add PMI8950 compatible commit 3af49062b0115b55a54615109172b44f618daf97 Merge: c5eb8bf76718c 9e9ff39243ea8 Author: Linus Torvalds Date: Tue May 2 10:41:31 2023 -0700 Merge tag 'mfd-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers: - Add support for Renesas RZ/G2L MTU3 New Device Support: - Add support for Lenovo Yoga Book X90F to Intel CHT WC - Add support for MAX5970 and MAX5978 to Simple MFD (I2C) - Add support for Meteor Lake PCH-S LPSS PCI to Intel LPSS PCI - Add support for AXP15060 PMIC to X-Powers PMIC collection Remove Device Support: - Remove support for Samsung 5M8751 and S5M8763 PMIC devices New Functionality: - Convert deprecated QCOM IRQ Chip to config registers - Add support for 32-bit address spaces to Renesas SMUs Fix-ups: - Make use of APIs / MACROs designed to simplify and demystify - Add / improve Device Tree bindings - Memory saving struct layout optimisations - Remove old / deprecated functionality - Factor out unassigned register addresses from ranges - Trivial: Spelling fixes, renames and coding style fixes - Rid 'defined but not used' warnings - Remove ineffective casts and pointer stubs Bug Fixes: - Fix incorrectly non-inverted mask/unmask IRQs on QCOM platforms - Remove MODULE_*() helpers from non-tristate drivers - Do not attempt to use out-of-range memory addresses associated with io_base - Provide missing export helpers - Fix remap bulk read optimisation fallout - Fix memory leak issues in error paths" * tag 'mfd-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (88 commits) dt-bindings: mfd: ti,j721e-system-controller: Add SoC chip ID leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driver dt-bindings: mfd: qcom,spmi-pmic: Document flash LED controller dt-bindings: mfd: x-powers,axp152: Document the AXP15060 variant mfd: axp20x: Add support for AXP15060 PMIC dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant counter: rz-mtu3-cnt: Unlock on error in rz_mtu3_count_ceiling_write() dt-bindings: mfd: dlg,da9063: Document voltage monitoring dt-bindings: mfd: stm32: Remove unnecessary blank lines dt-bindings: mfd: qcom,spmi-pmic: Use generic ADC node name in examples dt-bindings: mfd: syscon: Add nuvoton,ma35d1-sys compatible MAINTAINERS: Add entries for Renesas RZ/G2L MTU3a counter driver counter: Add Renesas RZ/G2L MTU3a counter driver Documentation: ABI: sysfs-bus-counter: add cascade_counts_enable and external_input_phase_clock_select mfd: Add Renesas RZ/G2L MTU3a core driver dt-bindings: timer: Document RZ/G2L MTU3a bindings mfd: rsmu_i2c: Convert to i2c's .probe_new() again mfd: intel-lpss: Add Intel Meteor Lake PCH-S LPSS PCI IDs mfd: dln2: Fix memory leak in dln2_probe() mfd: axp20x: Fix axp288 writable-ranges ... commit c5eb8bf76718cf2e2f36aac216a99014f00927de Merge: 865fdb08197e6 8325642d2757e Author: Linus Torvalds Date: Tue May 2 10:36:02 2023 -0700 Merge tag 'leds-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds Pull LED updates from Lee Jones: "New Drivers: - Add support for MediaTek MT6370 LED Indicator - Add support for MediaTek MT6370 Flashlight - Add support for QCOM PMIC Flash - Add support for Rohm BD2606MVV Charge Pump LED New Device Support: - Add support for PMK8550 PWM to QCOM LPG New Functionality: - Add support for high resolution PWM to QCOM LPG Fix-ups: - Kconfig 'depends' and 'select' dependency changes - Remove unused / irrelevant includes - Remove unnecessary checks (already performed further into the call stack) - Trivial: Fix commentary, simplify error messages - Rid 'defined but not used' warnings - Provide documentation - Explicitly provide include files Bug Fixes: - Mark GPIO LED as BROKEN - Fix Kconfig entries - Fix various Smatch staticify reports - Fix error handling (or a lack there of)" * tag 'leds-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (30 commits) leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driver dt-bindings: leds: Add ROHM BD2606MVV LED docs: leds: ledtrig-oneshot: Fix spelling mistake leds: pwm-multicolor: Simplify an error message dt-bindings: leds: Convert PCA9532 to dtschema leds: rgb: leds-qcom-lpg: Add support for PMK8550 PWM leds: rgb: leds-qcom-lpg: Add support for high resolution PWM dt-bindings: leds-qcom-lpg: Add qcom,pmk8550-pwm compatible string leds: tca6507: Fix error handling of using fwnode_property_read_string leds: flash: Set variables mvflash_{3,4}ch_regs storage-class-specifier to static leds: rgb: mt6370: Correct config name to select in LEDS_MT6370_RGB MAINTAINERS: Add entry for LED devices documentation Documentation: leds: MT6370: Use bullet lists for timing variables Documentation: leds: mt6370: Properly wrap hw_pattern chart Documentation: leds: Add MT6370 doc to the toctree leds: rgb: mt6370: Fix implicit declaration for FIELD_GET docs: leds: Add MT6370 RGB LED pattern document leds: flash: mt6370: Add MediaTek MT6370 flashlight support leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support dt-bindings: leds: spmi-flash-led: Add pm6150l compatible ... commit cdc822dda6f82269b94d5fa60ddc71d98c160fa0 Author: Carlos Bilbao Date: Wed Mar 15 09:35:26 2023 -0500 docs/sp_SP: Add translation of process/adding-syscalls Translate Documentation/process/adding-syscalls.rst into Spanish. Co-developed-by: Mauricio Fuentes Signed-off-by: Mauricio Fuentes Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20230315143526.1213813-1-carlos.bilbao@amd.com commit 37c95f3a3d251a9319ed137ee0adf5ab9e431ce2 Author: Mat Martineau Date: Mon May 1 17:05:44 2023 -0700 CREDITS: Update email address for Mat Martineau Changing my email address in CREDITS to be consistent with what's in use in MAINTAINERS and mailmap. Also removed extra date information from the CREDITS entry since I'm a maintainer for MPTCP again. Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20230502000545.2899055-1-martineau@kernel.org Signed-off-by: Jonathan Corbet commit 530421acaeda1d8c3533f241db944127f69efadc Author: 晏艳(采苓) Date: Tue Mar 28 15:25:37 2023 +0800 Documentation: update kernel stack for x86_64 Commit 6538b8ea886e ("x86_64: expand kernel stack to 16K") expanded kernel stack for x86_64 but left the wrong documentation, update it. Signed-off-by: Yan Yan Reviewed-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230328072537.20188-1-yanyan.yan@antgroup.com Signed-off-by: Jonathan Corbet commit 4a2d80ad062e2f3722227a72ad6050aa3e2c7676 Author: Tao Liu Date: Wed Apr 26 10:14:52 2023 +0800 docs: Remove unnecessary unicode character There is a non-printable unicode char '\u202a' or "0xe2 0x80 0xaa" in hex in the translation doc. It is unnecessary and should be removed for better text formatting when using editors like vi. Signed-off-by: Tao Liu Reviewed-by: Yanteng Si Link: https://lore.kernel.org/r/20230426021452.9745-1-ltao@redhat.com Signed-off-by: Jonathan Corbet commit be8ca5f4bcdb8f12f75e0fc64f37a13657440f22 Author: Deming Wang Date: Mon May 1 21:01:57 2023 -0400 docs: fix "Reviewd" typo Spell "Reviewed" properly in Documentation/Translations/jp/SubmittingPatches Signed-off-by: Deming Wang Reviewed-by: Akira Yokosawa Link: https://lore.kernel.org/r/20230502010157.1655-1-wangdeming@inspur.com Signed-off-by: Jonathan Corbet commit 4c093cbb89f32762555f624882f1d31a79237eaf Author: Geert Uytterhoeven Date: Tue May 2 12:05:10 2023 +0200 Documentation: timers: hrtimers: Make hybrid union historical Non-scalar time was removed from the ktime hybrid union in v3.17, and the union itself followed suit in v4.10. Make it clear that ktime_t is always a 64bit scalar type, to avoid confusing the casual reader. While at it, fix a spelling mistake. Fixes: 24e4a8c3e8868874 ("ktime: Kill non-scalar ktime_t implementation for 2038") Fixes: 2456e855354415bf ("ktime: Get rid of the union") Signed-off-by: Geert Uytterhoeven Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/59250a3d1c2c827b5c1833169a6e652ca6a784e6.1683021785.git.geert+renesas@glider.be Signed-off-by: Jonathan Corbet commit 9ea4eff4b6f4f36546d537a74da44fd3f30903ab Author: Marc Dionne Date: Fri Dec 2 10:19:42 2022 -0400 afs: Avoid endless loop if file is larger than expected afs_read_dir fetches an amount of data that's based on what the inode size is thought to be. If the file on the server is larger than what was fetched, the code rechecks i_size and retries. If the local i_size was not properly updated, this can lead to an endless loop of fetching i_size from the server and noticing each time that the size is larger on the server. If it is known that the remote size is larger than i_size, bump up the fetch size to that size. Fixes: f3ddee8dc4e2 ("afs: Fix directory handling") Signed-off-by: Marc Dionne Signed-off-by: David Howells cc: linux-afs@lists.infradead.org commit 45f66fa03ba9943cca5af88d691399332b8bde08 Author: David Howells Date: Tue Dec 6 13:49:42 2022 +0000 afs: Fix getattr to report server i_size on dirs, not local size Fix afs_getattr() to report the server's idea of the file size of a directory rather than the local size. The local size may differ as we edit the local copy to avoid having to redownload it and we may end up with a differently structured blob of a different size. However, if the directory is discarded from the pagecache we then download it again and the user may see the directory file size apparently change. Fixes: 63a4681ff39c ("afs: Locally edit directory data for mkdir/create/unlink/...") Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit d7f74e9a917503ee78f2b603a456d7227cf38919 Author: Marc Dionne Date: Fri Dec 2 10:07:01 2022 -0400 afs: Fix updating of i_size with dv jump from server If the data version returned from the server is larger than expected, the local data is invalidated, but we may still want to note the remote file size. Since we're setting change_size, we have to also set data_changed for the i_size to get updated. Fixes: 3f4aa9818163 ("afs: Fix EOF corruption") Signed-off-by: Marc Dionne Signed-off-by: David Howells cc: linux-afs@lists.infradead.org commit af97b7dfb0d4636d58f2341346fffce30c6c2259 Author: Ard Biesheuvel Date: Mon May 1 16:04:08 2023 +0200 SUNRPC: Avoid relying on crypto API to derive CBC-CTS output IV Scott reports SUNRPC self-test failures regarding the output IV on arm64 when using the SIMD accelerated implementation of AES in CBC mode with ciphertext stealing ("cts(cbc(aes))" in crypto API speak). These failures are the result of the fact that, while RFC 3962 does specify what the output IV should be and includes test vectors for it, the general concept of an output IV is poorly defined, and generally, not specified by the various algorithms implemented by the crypto API. Only algorithms that support transparent chaining (e.g., CBC mode on a block boundary) have requirements on the output IV, but ciphertext stealing (CTS) is fundamentally about how to encapsulate CBC in a way where the length of the entire message may not be an integral multiple of the cipher block size, and the concept of an output IV does not exist here because it has no defined purpose past the end of the message. The generic CTS template takes advantage of this chaining capability of the CBC implementations, and as a result, happens to return an output IV, simply because it passes its IV buffer directly to the encapsulated CBC implementation, which operates on full blocks only, and always returns an IV. This output IV happens to match how RFC 3962 defines it, even though the CTS template itself does not contain any output IV logic whatsoever, and, for this reason, lacks any test vectors that exercise this accidental output IV generation. The arm64 SIMD implementation of cts(cbc(aes)) does not use the generic CTS template at all, but instead, implements the CBC mode and ciphertext stealing directly, and therefore does not encapsule a CBC implementation that returns an output IV in the same way. The arm64 SIMD implementation complies with the specification and passes all internal tests, but when invoked by the SUNRPC code, fails to produce the expected output IV and causes its selftests to fail. Given that the output IV is defined as the penultimate block (where the final block may smaller than the block size), we can quite easily derive it in the caller by copying the appropriate slice of ciphertext after encryption. Cc: Trond Myklebust Cc: Anna Schumaker Cc: Chuck Lever Cc: Jeff Layton Reported-by: Scott Mayhew Tested-by: Scott Mayhew Signed-off-by: Ard Biesheuvel Signed-off-by: Chuck Lever commit 90c49fce1c43e1cc152695e20363ff5087897c09 Author: Paulo Alcantara Date: Fri Apr 21 15:52:32 2023 -0300 cifs: fix potential use-after-free bugs in TCP_Server_Info::hostname TCP_Server_Info::hostname may be updated once or many times during reconnect, so protect its access outside reconnect path as well and then prevent any potential use-after-free bugs. Cc: stable@vger.kernel.org Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 1810769e3a51375ca35d7a5e5f79542858ca495a Author: Paulo Alcantara Date: Thu Apr 27 16:20:13 2023 -0300 cifs: print smb3_fs_context::source when mounting Print full device name (UNC + optional prefix) from @old_ctx->source when printing info about mount. Before patch mount.cifs //srv/share/dir /mnt -o ... dmesg ... CIFS: Attempting to mount \\srv\share After patch mount.cifs //srv/share/dir /mnt -o ... dmesg ... CIFS: Attempting to mount //srv/share/dir Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 5bff9f741af60b143a5ae73417a8ec47fd5ff2f4 Author: Paulo Alcantara Date: Thu Apr 27 16:07:38 2023 -0300 cifs: protect session status check in smb2_reconnect() Use @ses->ses_lock to protect access of @ses->ses_status. Cc: stable@vger.kernel.org Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 3d6b15a8f3aeb4a6eed69a22822def0d0b039a16 Author: Steve French Date: Sun Apr 30 12:27:49 2023 -0500 SMB3.1.1: correct definition for app_instance_id create contexts The name lengths were incorrect for two create contexts. SMB2_CREATE_APP_INSTANCE_ID SMB2_CREATE_APP_INSTANCE_VERSION Update the definitions for these two to match the protocol specs. Acked-by: Paulo Alcantara (SUSE) Reviewed-by: Namjae Jeon Signed-off-by: Steve French commit 7e2d06628aab6324e1ac885910a52f4c038d4043 Author: Mark Asselstine Date: Mon May 1 19:13:46 2023 -0400 ALSA: hda/realtek: Add quirk for ASUS UM3402YAR using CS35L41 This Asus Zenbook laptop uses Realtek HDA codec combined with 2xCS35L41 Amplifiers using I2C with External Boost. Signed-off-by: Mark Asselstine Cc: Link: https://lore.kernel.org/r/20230501231346.54979-1-asselsm@gmail.com Signed-off-by: Takashi Iwai commit 0cce06ba859a515bd06224085d3addb870608b6d Author: Peter Zijlstra Date: Tue Apr 25 17:03:13 2023 +0200 debugobjects,locking: Annotate debug_object_fill_pool() wait type violation There is an explicit wait-type violation in debug_object_fill_pool() for PREEMPT_RT=n kernels which allows them to more easily fill the object pool and reduce the chance of allocation failures. Lockdep's wait-type checks are designed to check the PREEMPT_RT locking rules even for PREEMPT_RT=n kernels and object to this, so create a lockdep annotation to allow this to stand. Specifically, create a 'lock' type that overrides the inner wait-type while it is held -- allowing one to temporarily raise it, such that the violation is hidden. Reported-by: Vlastimil Babka Reported-by: Qi Zheng Signed-off-by: Peter Zijlstra (Intel) Tested-by: Qi Zheng Link: https://lkml.kernel.org/r/20230429100614.GA1489784@hirez.programming.kicks-ass.net commit e7db9e5c6b9615b287d01f0231904fbc1fbde9c5 Author: Boris Burkov Date: Fri Apr 28 14:02:11 2023 -0700 btrfs: fix encoded write i_size corruption with no-holes We have observed a btrfs filesystem corruption on workloads using no-holes and encoded writes via send stream v2. The symptom is that a file appears to be truncated to the end of its last aligned extent, even though the final unaligned extent and even the file extent and otherwise correctly updated inode item have been written. So if we were writing out a 1MiB+X file via 8 128K extents and one extent of length X, i_size would be set to 1MiB, but the ninth extent, nbyte, etc. would all appear correct otherwise. The source of the race is a narrow (one line of code) window in which a no-holes fs has read in an updated i_size, but has not yet set a shared disk_i_size variable to write. Therefore, if two ordered extents run in parallel (par for the course for receive workloads), the following sequence can play out: (following "threads" a bit loosely, since there are callbacks involved for endio but extra threads aren't needed to cause the issue) ENC-WR1 (second to last) ENC-WR2 (last) ------- ------- btrfs_do_encoded_write set i_size = 1M submit bio B1 ending at 1M endio B1 btrfs_inode_safe_disk_i_size_write local i_size = 1M falls off a cliff for some reason btrfs_do_encoded_write set i_size = 1M+X submit bio B2 ending at 1M+X endio B2 btrfs_inode_safe_disk_i_size_write local i_size = 1M+X disk_i_size = 1M+X disk_i_size = 1M btrfs_delayed_update_inode btrfs_delayed_update_inode And the delayed inode ends up filled with nbytes=1M+X and isize=1M, and writes respect i_size and present a corrupted file missing its last extents. Fix this by holding the inode lock in the no-holes case so that a thread can't sneak in a write to disk_i_size that gets overwritten with an out of date i_size. Fixes: 41a2ee75aab0 ("btrfs: introduce per-inode file extent tree") CC: stable@vger.kernel.org # 5.10+ Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0fddb79bf283a561eb81f09d01f5ac8f61bf8966 Author: Fangrui Song Date: Tue May 2 07:41:05 2023 +0000 arm64: lds: move .got section out of .text Currently, the .got section is placed within the output section .text. However, when .got is non-empty, the SHF_WRITE flag is set for .text when linked by lld. GNU ld recognizes .text as a special section and ignores the SHF_WRITE flag. By renaming .text, we can also get the SHF_WRITE flag. The kernel has performed R_AARCH64_RELATIVE resolving very early, and can then assume that .got is read-only. Let's move .got to the vmlinux_rodata pseudo-segment. As Ard Biesheuvel notes: "This matters to consumers of the vmlinux ELF representation of the kernel image, such as syzkaller, which disregards writable PT_LOAD segments when resolving code symbols. The kernel itself does not care about this distinction, but given that the GOT contains data and not code, it does not require executable permissions, and therefore does not belong in .text to begin with." Reviewed-by: Ard Biesheuvel Signed-off-by: Fangrui Song Link: https://lore.kernel.org/r/20230502074105.1541926-1-maskray@google.com Signed-off-by: Will Deacon commit 4df69e0df295822cdf816442fe4897f214cccb08 Author: ndesaulniers@google.com Date: Fri Apr 28 11:28:17 2023 -0700 arm64: kernel: remove SHF_WRITE|SHF_EXECINSTR from .idmap.text commit d54170812ef1 ("arm64: fix .idmap.text assertion for large kernels") modified some of the section assembler directives that declare .idmap.text to be SHF_ALLOC instead of SHF_ALLOC|SHF_WRITE|SHF_EXECINSTR. This patch fixes up the remaining stragglers that were left behind. Add Fixes tag so that this doesn't precede related change in stable. Fixes: d54170812ef1 ("arm64: fix .idmap.text assertion for large kernels") Reported-by: Greg Thelen Reviewed-by: Ard Biesheuvel Signed-off-by: Nick Desaulniers Link: https://lore.kernel.org/r/20230428-awx-v2-1-b197ffa16edc@google.com Signed-off-by: Will Deacon commit eda081d2efac50c9b314df7fb340a62306a7b07a Author: Kristina Martsenko Date: Fri Apr 28 14:25:46 2023 +0100 arm64: cpufeature: Fix pointer auth hwcaps The pointer auth hwcaps are not getting reported to userspace, as they are missing the .matches field. Add the field back. Fixes: 876e3c8efe79 ("arm64/cpufeature: Pull out helper for CPUID register definitions") Signed-off-by: Kristina Martsenko Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230428132546.2513834-1-kristina.martsenko@arm.com Signed-off-by: Will Deacon commit 9b86c49710eec7b4fbb78a0232b2dd0972a2b576 Author: Yang Jihong Date: Fri Apr 21 02:59:53 2023 +0000 perf tracepoint: Fix memory leak in is_valid_tracepoint() When is_valid_tracepoint() returns 1, need to call put_events_file() to free `dir_path`. Fixes: 25a7d914274de386 ("perf parse-events: Use get/put_events_file()") Signed-off-by: Yang Jihong Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230421025953.173826-1-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 6bf86cada3eb8ec3eb80cdce5280e7a22dac8b01 Author: Ganapatrao Kulkarni Date: Thu Apr 20 22:52:53 2023 -0700 perf cs-etm: Add fix for coresight trace for any range of CPUs The current implementation supports coresight trace decode for a range of CPUs, if the first CPU is CPU0. Perf report segfaults, if tried for sparse CPUs list and also for any range of CPUs(non zero first CPU). Adding a fix to perf report for any range of CPUs and for sparse list. Signed-off-by: Ganapatrao Kulkarni Link: https://lore.kernel.org/r/20230421055253.83912-1-gankulkarni@os.amperecomputing.com Cc: suzuki.poulose@arm.com Cc: acme@kernel.org Cc: mathieu.poirier@linaro.org Cc: mike.leach@linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: darren@os.amperecomputing.com Cc: scclevenger@os.amperecomputing.com Cc: scott@os.amperecomputing.com Cc: linux-kernel@vger.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d199226143f0ef6919131120319766ece514314e Author: James Clark Date: Tue Apr 25 11:44:13 2023 +0100 perf build: Fix unescaped # in perf build-test With the following bash and make versions: $ make --version GNU Make 4.2.1 Built for aarch64-unknown-linux-gnu $ bash --version GNU bash, version 5.0.17(1)-release (aarch64-unknown-linux-gnu) This error is encountered when running the build-test target: $ make -C tools/perf build-test tests/make:181: *** unterminated call to function 'shell': missing ')'. Stop. make: *** [Makefile:103: build-test] Error 2 Fix it by escaping the # which was causing make to interpret the rest of the line as a comment leaving the unclosed opening bracket. Fixes: 56d5229471ee1634 ("tools build: Pass libbpf feature only if libbpf 1.0+") Signed-off-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230425104414.1723571-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit c31380140f11195abb5b5f576355f886d32afd1c Author: Changbin Du Date: Wed Apr 26 11:22:46 2023 +0800 perf unwind: Suppress massive unsupported target platform errors When cross-analyzing perf data recorded on an another platform, massive unsupported target platform errors are printed. So let's show this message as warning and only once. Signed-off-by: Changbin Du Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Hui Wang Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230426032246.3608596-1-changbin.du@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 69b0e112612be9e325ea682263d895f3c675772f Author: Sriram Yagnaraman Date: Wed Apr 26 12:41:49 2023 +0200 perf script: Add new parameter in kfree_skb tracepoint to the python scripts using it Include reason parameter that was added in commit c504e5c2f9648a1e ("net: skb: introduce kfree_skb_reason()") Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sriram Yagnaraman Link: https://lore.kernel.org/r/20230426104149.14089-1-sriram.yagnaraman@est.tech Signed-off-by: Arnaldo Carvalho de Melo commit 0e20f4311254193fbf9eebafb4dc5c922a885397 Author: Changbin Du Date: Tue Apr 18 11:18:23 2023 +0800 perf script: Print raw ip instead of binary offset for callchain Before this, the raw ip is printed for non-callchain and dso offset for callchain. This inconsistent output for address may confuse people. And mostly what we expect is the raw ip. 'dso offset' is printed in callchain: $ perf script ... ls 1341034 2739463.008343: 2162417 cycles: ffffffff99d657a7 [unknown] ([unknown]) ffffffff99e00b67 [unknown] ([unknown]) 235d3 memset+0x53 (/usr/lib/x86_64-linux-gnu/ld-2.31.so) # dso offset a61b _dl_map_object+0x1bb (/usr/lib/x86_64-linux-gnu/ld-2.31.so) raw ip is printed for non-callchain: $ perf script -G ... ls 1341034 2739463.008876: 2053304 cycles: ffffffffc1596923 [unknown] ([unknown]) ls 1341034 2739463.009381: 1917049 cycles: 14def8e149e6 __strcoll_l+0xd96 (/usr/lib/x86_64-linux-gnu/libc-2.31.so) # raw ip Let's have consistent output for it. Later I'll add a new field 'dsoff' to print dso offset. Signed-off-by: Changbin Du Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Hui Wang Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230418031825.1262579-2-changbin.du@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 1511e4696acb715a4fe48be89e1e691daec91c0e Author: Yang Jihong Date: Thu Apr 27 01:28:41 2023 +0000 perf symbols: Fix return incorrect build_id size in elf_read_build_id() In elf_read_build_id(), if gnu build_id is found, should return the size of the actually copied data. If descsz is greater thanBuild_ID_SIZE, write_buildid data access may occur. Fixes: be96ea8ffa788dcc ("perf symbols: Fix issue with binaries using 16-bytes buildids (v2)") Reported-by: Will Ochowicz Signed-off-by: Yang Jihong Tested-by: Will Ochowicz Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/lkml/CWLP265MB49702F7BA3D6D8F13E4B1A719C649@CWLP265MB4970.GBRP265.PROD.OUTLOOK.COM/T/ Link: https://lore.kernel.org/r/20230427012841.231729-1-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 6a7b57d85f4a6232d435eac945b325d9048f030c Author: Namhyung Kim Date: Thu Apr 27 16:05:02 2023 -0700 perf list: Modify the warning message about scandirat(3) It should mention scandirat() instead of scandir(). Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230427230502.1526136-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7586d11d36fad5e6a28736be7ac8f9495e28289a Author: Namhyung Kim Date: Thu Apr 27 16:05:01 2023 -0700 perf list: Fix memory leaks in print_tracepoint_events() It should free entries (not only the array) filled by scandirat() after use. Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230427230502.1526136-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b9f82b5c63bf5390da19e879275a792a959a8dac Author: Namhyung Kim Date: Thu Apr 27 16:48:33 2023 -0700 perf lock contention: Rework offset calculation with BPF CO-RE It seems BPF CO-RE reloc doesn't work well with the pattern that gets the field-offset only. Use offsetof() to make it explicit so that the compiler would generate the correct code. Fixes: 0c1228486befa3d6 ("perf lock contention: Support pre-5.14 kernels") Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andrii Nakryiko Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Co-developed-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230427234833.1576130-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e53de7b65a3ca59af268c78df2d773f277f717fd Author: Namhyung Kim Date: Thu Apr 27 16:48:32 2023 -0700 perf lock contention: Fix struct rq lock access The BPF CO-RE's ignore suffix rule requires three underscores. Otherwise it'd fail like below: $ sudo perf lock contention -ab libbpf: prog 'collect_lock_syms': BPF program load failed: Invalid argument libbpf: prog 'collect_lock_syms': -- BEGIN PROG LOAD LOG -- reg type unsupported for arg#0 function collect_lock_syms#380 ; int BPF_PROG(collect_lock_syms) 0: (b7) r6 = 0 ; R6_w=0 1: (b7) r7 = 0 ; R7_w=0 2: (b7) r9 = 1 ; R9_w=1 3: failed to resolve CO-RE relocation [381] struct rq__new.__lock (0:0 @ offset 0) Fixes: 0c1228486befa3d6 ("perf lock contention: Support pre-5.14 kernels") Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Andrii Nakryiko Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230427234833.1576130-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b8969a1b69672b163d057e7745ebc915df689211 Author: Ondrej Mosnacek Date: Tue May 2 10:02:33 2023 +0200 crypto: api - Fix CRYPTO_USER checks for report function Checking the config via ifdef incorrectly compiles out the report functions when CRYPTO_USER is set to =m. Fix it by using IS_ENABLED() instead. Fixes: c0f9e01dd266 ("crypto: api - Check CRYPTO_USER instead of NET for report") Signed-off-by: Ondrej Mosnacek Signed-off-by: Herbert Xu commit 0af462f19e635ad522f28981238334620881badc Author: Thomas Gleixner Date: Mon May 1 17:42:06 2023 +0200 debugobject: Ensure pool refill (again) The recent fix to ensure atomicity of lookup and allocation inadvertently broke the pool refill mechanism. Prior to that change debug_objects_activate() and debug_objecs_assert_init() invoked debug_objecs_init() to set up the tracking object for statically initialized objects. That's not longer the case and debug_objecs_init() is now the only place which does pool refills. Depending on the number of statically initialized objects this can be enough to actually deplete the pool, which was observed by Ido via a debugobjects OOM warning. Restore the old behaviour by adding explicit refill opportunities to debug_objects_activate() and debug_objecs_assert_init(). Fixes: 63a759694eed ("debugobject: Prevent init race with static objects") Reported-by: Ido Schimmel Signed-off-by: Thomas Gleixner Tested-by: Ido Schimmel Link: https://lore.kernel.org/r/871qk05a9d.ffs@tglx commit 529de2f1ca3f0898c0d905b7d355a43dce1de7dc Author: Maximilian Weigand Date: Mon May 1 17:07:49 2023 -0700 Input: cyttsp5 - fix array length The cmd array should be initialized with the proper command size and not with the actual command value that is sent to the touchscreen. Signed-off-by: Maximilian Weigand Reviewed-by: Alistair Francis Link: https://lore.kernel.org/r/20230501113010.891786-2-mweigand@mweigand.net Fixes: 5b0c03e24a06 ("Input: Add driver for Cypress Generation 5 touchscreen") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit c2d3c8441e3ddbfe41fea9282ddc6ee372e154cd Author: Conor Dooley Date: Thu Apr 20 19:30:16 2023 +0100 RISC-V: include cpufeature.h in cpufeature.c Automation complains: warning: symbol '__pcpu_scope_misaligned_access_speed' was not declared. Should it be static? cpufeature.c doesn't actually include the header of the same name, as it had not previously used anything from it. The per-cpu variable is declared there, so include it to silence the complaints. Fixes: 62a31d6e38bd ("RISC-V: hwprobe: Support probing of misaligned access performance") Signed-off-by: Conor Dooley Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20230420-wound-gizzard-2b2b589d9bea@spud Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 865fdb08197e657c59e74a35fa32362b12397f58 Merge: c8c655c34e335 9a87ffc99ec8e Author: Linus Torvalds Date: Mon May 1 17:18:56 2023 -0700 Merge tag 'input-for-v6.4-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - a new driver for Novatek touch controllers - a new driver for power button for NXP BBNSM - a skeleton KUnit tests for the input core - improvements to Xpad game controller driver to support more devices - improvements to edt-ft5x06, hideep and other drivers * tag 'input-for-v6.4-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (42 commits) Revert "Input: xpad - fix support for some third-party controllers" dt-bindings: input: pwm-beeper: convert to dt schema Input: xpad - fix PowerA EnWired Controller guide button Input: xpad - add constants for GIP interface numbers Input: synaptics-rmi4 - fix function name in kerneldoc Input: raspberrypi-ts - fix refcount leak in rpi_ts_probe Input: edt-ft5x06 - select REGMAP_I2C Input: melfas_mip4 - report palm touches Input: cma3000_d0x - remove unneeded code Input: edt-ft5x06 - calculate points data length only once Input: edt-ft5x06 - unify the crc check Input: edt-ft5x06 - convert to use regmap API Input: edt-ft5x06 - don't print error messages with dev_dbg() Input: edt-ft5x06 - remove code duplication Input: edt-ft5x06 - don't recalculate the CRC Input: edt-ft5x06 - add spaces to ensure format specification Input: edt-ft5x06 - remove unnecessary blank lines Input: edt-ft5x06 - fix indentation Input: tsc2007 - enable cansleep pendown GPIO Input: Add KUnit tests for some of the input core helper functions ... commit 4db9e253e7016e6588620ad02d4ed326107506db Author: Alexandre Ghiti Date: Fri Apr 28 14:09:32 2023 +0200 riscv: Move .rela.dyn to the init sections The recent introduction of relocatable kernels prepared the move of .rela.dyn to the init section, but actually forgot to do so, so do it here. Before this patch: "Freeing unused kernel image (initmem) memory: 2592K" After this patch: "Freeing unused kernel image (initmem) memory: 6288K" The difference corresponds to the size of the .rela.dyn section: "[42] .rela.dyn RELA ffffffff8197e798 0127f798 000000000039c660 0000000000000018 A 47 0 8" Fixes: 559d1e45a16d ("riscv: Use --emit-relocs in order to move .rela.dyn in init") Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20230428120932.22735-1-alexghiti@rivosinc.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 41ebfc91f785c202e8e8f9bd2f67154efad6287e Author: Conor Dooley Date: Thu Apr 27 11:43:42 2023 +0100 dt-bindings: riscv: explicitly mention assumption of Zicsr & Zifencei support The dt-binding was defined before the extraction of csr access and fence.i into their own extensions, and thus the presence of the I base extension implies Zicsr and Zifencei. There's no harm in adding them obviously, but for backwards compatibility with DTs that existed prior to that extraction, software is unable to differentiate between "i" and "i_zicsr_zifencei" without any further information. Signed-off-by: Conor Dooley Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230427-fence-blurred-c92fb69d4137@wendy Signed-off-by: Palmer Dabbelt commit 2254a7396a0ca6309854948ee1c0a33fa4268cec Author: Darrick J. Wong Date: Tue May 2 09:16:14 2023 +1000 xfs: fix xfs_inodegc_stop racing with mod_delayed_work syzbot reported this warning from the faux inodegc shrinker that tries to kick off inodegc work: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 102 at kernel/workqueue.c:1445 __queue_work+0xd44/0x1120 kernel/workqueue.c:1444 RIP: 0010:__queue_work+0xd44/0x1120 kernel/workqueue.c:1444 Call Trace: __queue_delayed_work+0x1c8/0x270 kernel/workqueue.c:1672 mod_delayed_work_on+0xe1/0x220 kernel/workqueue.c:1746 xfs_inodegc_shrinker_scan fs/xfs/xfs_icache.c:2212 [inline] xfs_inodegc_shrinker_scan+0x250/0x4f0 fs/xfs/xfs_icache.c:2191 do_shrink_slab+0x428/0xaa0 mm/vmscan.c:853 shrink_slab+0x175/0x660 mm/vmscan.c:1013 shrink_one+0x502/0x810 mm/vmscan.c:5343 shrink_many mm/vmscan.c:5394 [inline] lru_gen_shrink_node mm/vmscan.c:5511 [inline] shrink_node+0x2064/0x35f0 mm/vmscan.c:6459 kswapd_shrink_node mm/vmscan.c:7262 [inline] balance_pgdat+0xa02/0x1ac0 mm/vmscan.c:7452 kswapd+0x677/0xd60 mm/vmscan.c:7712 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 This warning corresponds to this code in __queue_work: /* * For a draining wq, only works from the same workqueue are * allowed. The __WQ_DESTROYING helps to spot the issue that * queues a new work item to a wq after destroy_workqueue(wq). */ if (unlikely(wq->flags & (__WQ_DESTROYING | __WQ_DRAINING) && WARN_ON_ONCE(!is_chained_work(wq)))) return; For this to trip, we must have a thread draining the inodedgc workqueue and a second thread trying to queue inodegc work to that workqueue. This can happen if freezing or a ro remount race with reclaim poking our faux inodegc shrinker and another thread dropping an unlinked O_RDONLY file: Thread 0 Thread 1 Thread 2 xfs_inodegc_stop xfs_inodegc_shrinker_scan xfs_is_inodegc_enabled xfs_clear_inodegc_enabled xfs_inodegc_queue_all xfs_inodegc_queue xfs_is_inodegc_enabled drain_workqueue llist_empty mod_delayed_work_on(..., 0) __queue_work In other words, everything between the access to inodegc_enabled state and the decision to poke the inodegc workqueue requires some kind of coordination to avoid the WQ_DRAINING state. We could perhaps introduce a lock here, but we could also try to eliminate WQ_DRAINING from the picture. We could replace the drain_workqueue call with a loop that flushes the workqueue and queues workers as long as there is at least one inode present in the per-cpu inodegc llists. We've disabled inodegc at this point, so we know that the number of queued inodes will eventually hit zero as long as xfs_inodegc_start cannot reactivate the workers. There are four callers of xfs_inodegc_start. Three of them come from the VFS with s_umount held: filesystem thawing, failed filesystem freezing, and the rw remount transition. The fourth caller is mounting rw (no remount or freezing possible). There are three callers ofs xfs_inodegc_stop. One is unmounting (no remount or thaw possible). Two of them come from the VFS with s_umount held: fs freezing and ro remount transition. Hence, it is correct to replace the drain_workqueue call with a loop that drains the inodegc llists. Fixes: 6191cf3ad59f ("xfs: flush inodegc workqueue tasks before cancel") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 2d5f38a31980d7090f5bf91021488dc61a0ba8ee Author: Darrick J. Wong Date: Tue May 2 09:16:14 2023 +1000 xfs: disable reaping in fscounters scrub The fscounters scrub code doesn't work properly because it cannot quiesce updates to the percpu counters in the filesystem, hence it returns false corruption reports. This has been fixed properly in one of the online repair patchsets that are under review by replacing the xchk_disable_reaping calls with an exclusive filesystem freeze. Disabling background gc isn't sufficient to fix the problem. In other words, scrub doesn't need to call xfs_inodegc_stop, which is just as well since it wasn't correct to allow scrub to call xfs_inodegc_start when something else could be calling xfs_inodegc_stop (e.g. trying to freeze the filesystem). Neuter the scrubber for now, and remove the xchk_*_reaping functions. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit b37c4c8339cd394ea6b8b415026603320a185651 Author: Darrick J. Wong Date: Tue May 2 09:16:12 2023 +1000 xfs: check that per-cpu inodegc workers actually run on that cpu Now that we've allegedly worked out the problem of the per-cpu inodegc workers being scheduled on the wrong cpu, let's put in a debugging knob to let us know if a worker ever gets mis-scheduled again. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 03e0add80f4cf3f7393edb574eeb3a89a1db7758 Author: Darrick J. Wong Date: Tue May 2 09:16:05 2023 +1000 xfs: explicitly specify cpu when forcing inodegc delayed work to run immediately I've been noticing odd racing behavior in the inodegc code that could only be explained by one cpu adding an inode to its inactivation llist at the same time that another cpu is processing that cpu's llist. Preemption is disabled between get/put_cpu_ptr, so the only explanation is scheduler mayhem. I inserted the following debug code into xfs_inodegc_worker (see the next patch): ASSERT(gc->cpu == smp_processor_id()); This assertion tripped during overnight tests on the arm64 machines, but curiously not on x86_64. I think we haven't observed any resource leaks here because the lockfree list code can handle simultaneous llist_add and llist_del_all functions operating on the same list. However, the whole point of having percpu inodegc lists is to take advantage of warm memory caches by inactivating inodes on the last processor to touch the inode. The incorrect scheduling seems to occur after an inodegc worker is subjected to mod_delayed_work(). This wraps mod_delayed_work_on with WORK_CPU_UNBOUND specified as the cpu number. Unbound allows for scheduling on any cpu, not necessarily the same one that scheduled the work. Because preemption is disabled for as long as we have the gc pointer, I think it's safe to use current_cpu() (aka smp_processor_id) to queue the delayed work item on the correct cpu. Fixes: 7cf2b0f9611b ("xfs: bound maximum wait time for inodegc work") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 1bba82fe1afac69c85c1f5ea137c8e73de3c8032 Author: Darrick J. Wong Date: Tue May 2 09:15:01 2023 +1000 xfs: fix negative array access in xfs_getbmap In commit 8ee81ed581ff, Ye Bin complained about an ASSERT in the bmapx code that trips if we encounter a delalloc extent after flushing the pagecache to disk. The ioctl code does not hold MMAPLOCK so it's entirely possible that a racing write page fault can create a delalloc extent after the file has been flushed. The proposed solution was to replace the assertion with an early return that avoids filling out the bmap recordset with a delalloc entry if the caller didn't ask for it. At the time, I recall thinking that the forward logic sounded ok, but felt hesitant because I suspected that changing this code would cause something /else/ to burst loose due to some other subtlety. syzbot of course found that subtlety. If all the extent mappings found after the flush are delalloc mappings, we'll reach the end of the data fork without ever incrementing bmv->bmv_entries. This is new, since before we'd have emitted the delalloc mappings even though the caller didn't ask for them. Once we reach the end, we'll try to set BMV_OF_LAST on the -1st entry (because bmv_entries is zero) and go corrupt something else in memory. Yay. I really dislike all these stupid patches that fiddle around with debug code and break things that otherwise worked well enough. Nobody was complaining that calling XFS_IOC_BMAPX without BMV_IF_DELALLOC would return BMV_OF_DELALLOC records, and now we've gone from "weird behavior that nobody cared about" to "bad behavior that must be addressed immediately". Maybe I'll just ignore anything from Huawei from now on for my own sake. Reported-by: syzbot+c103d3808a0de5faaf80@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-xfs/20230412024907.GP360889@frogsfrogsfrogs/ Fixes: 8ee81ed581ff ("xfs: fix BUG_ON in xfs_getbmap()") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 1f1397b7218d7f8e53e33c6b58cbf9601cd2d8e6 Author: Darrick J. Wong Date: Tue May 2 09:14:51 2023 +1000 xfs: don't allocate into the data fork for an unshare request For an unshare request, we only have to take action if the data fork has a shared mapping. We don't care if someone else set up a cow operation. If we find nothing in the data fork, return a hole to avoid allocating space. Note that fallocate will replace the delalloc reservation with an unwritten extent anyway, so this has no user-visible effects outside of avoiding unnecessary updates. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 397b2d7e0f3e28bbeaa05cf8e10d0fd601f446f4 Author: Darrick J. Wong Date: Tue May 2 09:14:43 2023 +1000 xfs: flush dirty data and drain directios before scrubbing cow fork When we're scrubbing the COW fork, we need to take MMAPLOCK_EXCL to prevent page_mkwrite from modifying any inode state. The ILOCK should suffice to avoid confusing online fsck, but let's take the same locks that we do everywhere else. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 8e698ee72c4ecbbf18264568eb310875839fd601 Author: Darrick J. Wong Date: Tue May 2 09:14:36 2023 +1000 xfs: set bnobt/cntbt numrecs correctly when formatting new AGs Through generic/300, I discovered that mkfs.xfs creates corrupt filesystems when given these parameters: # mkfs.xfs -d size=512M /dev/sda -f -d su=128k,sw=4 --unsupported Filesystems formatted with --unsupported are not supported!! meta-data=/dev/sda isize=512 agcount=8, agsize=16352 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=130816, imaxpct=25 = sunit=32 swidth=128 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=8192, version=2 = sectsz=512 sunit=32 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 = rgcount=0 rgsize=0 blks Discarding blocks...Done. # xfs_repair -n /dev/sda Phase 1 - find and verify superblock... - reporting progress in intervals of 15 minutes Phase 2 - using internal log - zero log... - 16:30:50: zeroing log - 16320 of 16320 blocks done - scan filesystem freespace and inode maps... agf_freeblks 25, counted 0 in ag 4 sb_fdblocks 8823, counted 8798 The root cause of this problem is the numrecs handling in xfs_freesp_init_recs, which is used to initialize a new AG. Prior to calling the function, we set up the new bnobt block with numrecs == 1 and rely on _freesp_init_recs to format that new record. If the last record created has a blockcount of zero, then it sets numrecs = 0. That last bit isn't correct if the AG contains the log, the start of the log is not immediately after the initial blocks due to stripe alignment, and the end of the log is perfectly aligned with the end of the AG. For this case, we actually formatted a single bnobt record to handle the free space before the start of the (stripe aligned) log, and incremented arec to try to format a second record. That second record turned out to be unnecessary, so what we really want is to leave numrecs at 1. The numrecs handling itself is overly complicated because a different function sets numrecs == 1. Change the bnobt creation code to start with numrecs set to zero and only increment it after successfully formatting a free space extent into the btree block. Fixes: f327a00745ff ("xfs: account for log space when formatting new AGs") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit b82a5c42a5fa7e79426ed047ced3f8482bb66fbc Author: Darrick J. Wong Date: Tue May 2 09:14:27 2023 +1000 xfs: don't unconditionally null args->pag in xfs_bmap_btalloc_at_eof xfs/170 on a filesystem with su=128k,sw=4 produces this splat: BUG: kernel NULL pointer dereference, address: 0000000000000010 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP CPU: 1 PID: 4022907 Comm: dd Tainted: G W 6.3.0-xfsx #2 6ebeeffbe9577d32 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20171121_152543-x86-ol7-bu RIP: 0010:xfs_perag_rele+0x10/0x70 [xfs] RSP: 0018:ffffc90001e43858 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000100 RDX: ffffffffa054e717 RSI: 0000000000000005 RDI: 0000000000000000 RBP: ffff888194eea000 R08: 0000000000000000 R09: 0000000000000037 R10: ffff888100ac1cb0 R11: 0000000000000018 R12: 0000000000000000 R13: ffffc90001e43a38 R14: ffff888194eea000 R15: ffff888194eea000 FS: 00007f93d1a0e740(0000) GS:ffff88843fc80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000010 CR3: 000000018a34f000 CR4: 00000000003506e0 Call Trace: xfs_bmap_btalloc+0x1a7/0x5d0 [xfs f85291d6841cbb3dc740083f1f331c0327394518] xfs_bmapi_allocate+0xee/0x470 [xfs f85291d6841cbb3dc740083f1f331c0327394518] xfs_bmapi_write+0x539/0x9e0 [xfs f85291d6841cbb3dc740083f1f331c0327394518] xfs_iomap_write_direct+0x1bb/0x2b0 [xfs f85291d6841cbb3dc740083f1f331c0327394518] xfs_direct_write_iomap_begin+0x51c/0x710 [xfs f85291d6841cbb3dc740083f1f331c0327394518] iomap_iter+0x132/0x2f0 __iomap_dio_rw+0x2f8/0x840 iomap_dio_rw+0xe/0x30 xfs_file_dio_write_aligned+0xad/0x180 [xfs f85291d6841cbb3dc740083f1f331c0327394518] xfs_file_write_iter+0xfb/0x190 [xfs f85291d6841cbb3dc740083f1f331c0327394518] vfs_write+0x2eb/0x410 ksys_write+0x65/0xe0 do_syscall_64+0x2b/0x80 This crash occurs under the "out_low_space" label. We grabbed a perag reference, passed it via args->pag into xfs_bmap_btalloc_at_eof, and afterwards args->pag is NULL. Fix the second function not to clobber args->pag if the caller had passed one in. Fixes: 85843327094f ("xfs: factor xfs_bmap_btalloc()") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit f9c4bbddece7eff1155c70d48e3c9c2a01b9d778 Author: Guo Ren Date: Mon May 1 15:33:54 2023 -0700 riscv: compat_syscall_table: Fixup compile warning ../arch/riscv/kernel/compat_syscall_table.c:12:41: warning: initialized field overwritten [-Woverride-init] 12 | #define __SYSCALL(nr, call) [nr] = (call), | ^ ../include/uapi/asm-generic/unistd.h:567:1: note: in expansion of macro '__SYSCALL' 567 | __SYSCALL(__NR_semget, sys_semget) Fixes: 59c10c52f573 ("riscv: compat: syscall: Add compat_sys_call_table implementation") Reviewed-by: Conor Dooley Reported-by: kernel test robot Tested-by: Jisheng Zhang Signed-off-by: Guo Ren Signed-off-by: Guo Ren Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20230501223353.2833899-1-dfustini@baylibre.com Signed-off-by: Palmer Dabbelt commit 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e Merge: 5dc63e56a9cf8 53bea86b5712c Author: Dmitry Torokhov Date: Mon May 1 15:20:08 2023 -0700 Merge branch 'next' into for-linus Prepare input updates for 6.4 merge window. commit 53bea86b5712c7491bb3dae12e271666df0a308c Author: Dmitry Torokhov Date: Mon May 1 15:11:55 2023 -0700 Revert "Input: xpad - fix support for some third-party controllers" This reverts commit db7220c48d8d71476f881a7ae1285e1df4105409 because it causes crashes when trying to dereference xpad->dev->dev in xpad_probe() which has not been set up yet. Reported-by: syzbot+a3f758b8d8cb7e49afec@syzkaller.appspotmail.com Reported-by: Dongliang Mu Link: https://groups.google.com/g/syzkaller-bugs/c/iMhTgpGuIbM Signed-off-by: Dmitry Torokhov commit c8c655c34e33544aec9d64b660872ab33c29b5f1 Merge: d75439d64a1e2 b3c98052d4694 Author: Linus Torvalds Date: Mon May 1 12:06:20 2023 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm updates from Paolo Bonzini: "s390: - More phys_to_virt conversions - Improvement of AP management for VSIE (nested virtualization) ARM64: - Numerous fixes for the pathological lock inversion issue that plagued KVM/arm64 since... forever. - New framework allowing SMCCC-compliant hypercalls to be forwarded to userspace, hopefully paving the way for some more features being moved to VMMs rather than be implemented in the kernel. - Large rework of the timer code to allow a VM-wide offset to be applied to both virtual and physical counters as well as a per-timer, per-vcpu offset that complements the global one. This last part allows the NV timer code to be implemented on top. - A small set of fixes to make sure that we don't change anything affecting the EL1&0 translation regime just after having having taken an exception to EL2 until we have executed a DSB. This ensures that speculative walks started in EL1&0 have completed. - The usual selftest fixes and improvements. x86: - Optimize CR0.WP toggling by avoiding an MMU reload when TDP is enabled, and by giving the guest control of CR0.WP when EPT is enabled on VMX (VMX-only because SVM doesn't support per-bit controls) - Add CR0/CR4 helpers to query single bits, and clean up related code where KVM was interpreting kvm_read_cr4_bits()'s "unsigned long" return as a bool - Move AMD_PSFD to cpufeatures.h and purge KVM's definition - Avoid unnecessary writes+flushes when the guest is only adding new PTEs - Overhaul .sync_page() and .invlpg() to utilize .sync_page()'s optimizations when emulating invalidations - Clean up the range-based flushing APIs - Revamp the TDP MMU's reaping of Accessed/Dirty bits to clear a single A/D bit using a LOCK AND instead of XCHG, and skip all of the "handle changed SPTE" overhead associated with writing the entire entry - Track the number of "tail" entries in a pte_list_desc to avoid having to walk (potentially) all descriptors during insertion and deletion, which gets quite expensive if the guest is spamming fork() - Disallow virtualizing legacy LBRs if architectural LBRs are available, the two are mutually exclusive in hardware - Disallow writes to immutable feature MSRs (notably PERF_CAPABILITIES) after KVM_RUN, similar to CPUID features - Overhaul the vmx_pmu_caps selftest to better validate PERF_CAPABILITIES - Apply PMU filters to emulated events and add test coverage to the pmu_event_filter selftest - AMD SVM: - Add support for virtual NMIs - Fixes for edge cases related to virtual interrupts - Intel AMX: - Don't advertise XTILE_CFG in KVM_GET_SUPPORTED_CPUID if XTILE_DATA is not being reported due to userspace not opting in via prctl() - Fix a bug in emulation of ENCLS in compatibility mode - Allow emulation of NOP and PAUSE for L2 - AMX selftests improvements - Misc cleanups MIPS: - Constify MIPS's internal callbacks (a leftover from the hardware enabling rework that landed in 6.3) Generic: - Drop unnecessary casts from "void *" throughout kvm_main.c - Tweak the layout of "struct kvm_mmu_memory_cache" to shrink the struct size by 8 bytes on 64-bit kernels by utilizing a padding hole Documentation: - Fix goof introduced by the conversion to rST" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (211 commits) KVM: s390: pci: fix virtual-physical confusion on module unload/load KVM: s390: vsie: clarifications on setting the APCB KVM: s390: interrupt: fix virtual-physical confusion for next alert GISA KVM: arm64: Have kvm_psci_vcpu_on() use WRITE_ONCE() to update mp_state KVM: arm64: Acquire mp_state_lock in kvm_arch_vcpu_ioctl_vcpu_init() KVM: selftests: Test the PMU event "Instructions retired" KVM: selftests: Copy full counter values from guest in PMU event filter test KVM: selftests: Use error codes to signal errors in PMU event filter test KVM: selftests: Print detailed info in PMU event filter asserts KVM: selftests: Add helpers for PMC asserts in PMU event filter test KVM: selftests: Add a common helper for the PMU event filter guest code KVM: selftests: Fix spelling mistake "perrmited" -> "permitted" KVM: arm64: vhe: Drop extra isb() on guest exit KVM: arm64: vhe: Synchronise with page table walker on MMU update KVM: arm64: pkvm: Document the side effects of kvm_flush_dcache_to_poc() KVM: arm64: nvhe: Synchronise with page table walker on TLBI KVM: arm64: Handle 32bit CNTPCTSS traps KVM: arm64: nvhe: Synchronise with page table walker on vcpu run KVM: arm64: vgic: Don't acquire its_lock before config_lock KVM: selftests: Add test to verify KVM's supported XCR0 ... commit d75439d64a1e2b35e0f08906205b00279753cbed Merge: 3f2a1903af066 c91b4a07655d5 Author: Linus Torvalds Date: Mon May 1 11:52:32 2023 -0700 Merge tag 'for-linus' of https://github.com/openrisc/linux Pull OpenRISC updates from Stafford Horne: "Two things for OpenRISC this cycle: - Small cleanup for device tree cpu iteration from Rob Herring - Add support for storing, restoring and accessing user space FPU state, to allow for libc to support the FPU on OpenRISC" * tag 'for-linus' of https://github.com/openrisc/linux: openrisc: Add floating point regset openrisc: Support floating point user api openrisc: Support storing and restoring fpu state openrisc: Properly store r31 to pt_regs on unhandled exceptions openrisc: Use common of_get_cpu_node() instead of open-coding commit 3f2a1903af06672f416efd506f029066b9243cbd Merge: e0906f1feb7ca e99ab4abebf82 Author: Linus Torvalds Date: Mon May 1 11:14:12 2023 -0700 Merge tag 'rtc-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Not much this cycle, there is the conversion to remove_new and many small fixes in drivers: Subsystem: - Convert to platform remove callback returning void Drivers: - meson-vrtc: fix a firmware display issue" * tag 'rtc-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (53 commits) rtc: armada38x: use devm_platform_ioremap_resource_byname() rtc: sunplus: use devm_platform_ioremap_resource_byname() rtc: jz4740: Make sure clock provider gets removed rtc: k3: handle errors while enabling wake irq rtc: meson-vrtc: Use ktime_get_real_ts64() to get the current time dt-bindings: rtc: Drop unneeded quotes rtc: pcf8523: remove unnecessary OR operation rtc: pcf8523: fix coding-style issues rtc: ds1390: mark OF related data as maybe unused rtc: omap: include header for omap_rtc_power_off_program prototype rtc: sun6i: Use of_property_present() for testing DT property presence rtc: mpfs: convert SOC_MICROCHIP_POLARFIRE to ARCH_MICROCHIP_POLARFIRE rtc: zynqmp: Convert to platform remove callback returning void rtc: xgene: Convert to platform remove callback returning void rtc: wm8350: Convert to platform remove callback returning void rtc: vt8500: Convert to platform remove callback returning void rtc: twl: Convert to platform remove callback returning void rtc: tps6586x: Convert to platform remove callback returning void rtc: tegra: Convert to platform remove callback returning void rtc: sunplus: Convert to platform remove callback returning void ... commit e0906f1feb7caf5098e7f831f4889feecfb0c68b Merge: 06936aaf490ff 6b496a94c5905 Author: Linus Torvalds Date: Mon May 1 11:08:01 2023 -0700 Merge tag 'i3c/for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Alexandre Belloni: "Subsystem: - OF alias bus numbering - convert to platform remove callback returning void New driver: - AST2600 controller, based on Synopsys DesignWare IP Driver update: - dw: add infrastructure to support different platform integrations" * tag 'i3c/for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: ast2600: set variable ast2600_i3c_ops storage-class-specifier to static i3c: ast2600: fix register setting for 545 ohm pullups i3c: ast2600: enable IBI support i3c: dw: Add a platform facility for IBI PEC workarounds i3c: dw: Add support for in-band interrupts i3c: dw: Turn DAT array entry into a struct i3c: dw: Create a generic fifo read function i3c: Allow OF-alias-based persistent bus numbering i3c: ast2600: Add AST2600 platform-specific driver dt-bindings: i3c: Add AST2600 i3c controller i3c: dw: Add infrastructure for platform-specific implementations i3c: dw: use bus mode rather than device reg for conditional tCAS setting i3c: dw: Return the length from a read priv_xfer i3c: svc: Convert to platform remove callback returning void i3c: mipi-i3c-hci: Convert to platform remove callback returning void i3c: cdns: Convert to platform remove callback returning void i3c: dw: Convert to platform remove callback returning void i3c: Make i3c_master_unregister() return void i3c: dw: drop of_match_ptr for ID table i3c: Correct reference to the I²C device data type commit 06936aaf490ff55dd5787375a83d6e486bccc397 Merge: 26c009dffca89 d4fab7b28e2f5 Author: Linus Torvalds Date: Mon May 1 11:00:04 2023 -0700 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Some ext4 regression and bug fixes" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: clean up error handling in __ext4_fill_super() ext4: reflect error codes from ext4_multi_mount_protect() to its callers ext4: fix lost error code reporting in __ext4_fill_super() ext4: fix unused iterator variable warnings ext4: fix use-after-free read in ext4_find_extent for bigalloc + inline ext4: fix i_disksize exceeding i_size problem in paritally written case commit 26c009dffca89b0f8fe7facc41d1ccf88a66825a Merge: ed9a65e575cc3 9be11a69315e2 Author: Linus Torvalds Date: Mon May 1 10:43:44 2023 -0700 Merge tag '6.4-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: - deferred close fix for an important case when cached file should be closed immediately - two fixes for missing locks - eight minor cleanup * tag '6.4-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6: cifs: update internal module version number for cifs.ko smb3: move some common open context structs to smbfs_common smb3: make query_on_disk_id open context consistent and move to common code SMB3.1.1: add new tree connect ShareFlags cifs: missing lock when updating session status SMB3: Close deferred file handles in case of handle lease break SMB3: Add missing locks to protect deferred close file list cifs: Avoid a cast in add_lease_context() cifs: Simplify SMB2_open_init() cifs: Simplify SMB2_open_init() cifs: Simplify SMB2_open_init() commit ed9a65e575cc3c52a7f130d824671fe48a72da0c Merge: 58390c8ce1bdd 0c8862de05c1a Author: Linus Torvalds Date: Mon May 1 10:37:37 2023 -0700 Merge tag 'tpmdd-v6.4-rc1-fix-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm fix from Jarkko Sakkinen: "This fixes a critical bug in my first pull request. I fixed the cherry pick issue and tested with real hardare and libvirt/qemu plus swtpm" * tag 'tpmdd-v6.4-rc1-fix-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm: Re-enable TPM chip boostrapping non-tpm_tis TPM drivers commit 2fa5ebe3bc4e31e07a99196455498472417842f2 Author: Huacai Chen Date: Mon May 1 17:19:59 2023 +0800 tools/perf: Add basic support for LoongArch Add basic support for LoongArch, which is very similar to the MIPS version. Signed-off-by: Ming Wang Signed-off-by: Huacai Chen commit 22f367a689ceceb08d9ce6a65c43c9640f5cb935 Author: Youling Tang Date: Mon May 1 17:19:53 2023 +0800 LoongArch: ftrace: Add direct call trampoline samples support The ftrace samples need per-architecture trampoline implementations to save and restore argument registers around the calls to my_direct_func* and to restore polluted registers (e.g: ra). Signed-off-by: Qing Zhang Signed-off-by: Youling Tang Signed-off-by: Huacai Chen commit 9cdc3b6a299c6314485bcfb695546c11d35dac4c Author: Youling Tang Date: Mon May 1 17:19:53 2023 +0800 LoongArch: ftrace: Add direct call support Select the HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS to provide the register_ftrace_direct[_multi] interfaces allowing users to register the customed trampoline (direct_caller) as the mcount for one or more target functions. And modify_ftrace_direct[_multi] are also provided for modifying direct_caller. There are a few cases to distinguish: - If a direct call ops is the only one tracing a function AND the direct called trampoline is within the reach of a 'bl' instruction -> the ftrace patchsite jumps to the trampoline - Else -> the ftrace patchsite jumps to the ftrace_regs_caller trampoline points to ftrace_list_ops so it iterates over all registered ftrace ops, including the direct call ops and calls its call_direct_funcs handler which stores the direct called trampoline's address in the ftrace_regs and the ftrace_regs_caller trampoline will return to that address instead of returning to the traced function Signed-off-by: Qing Zhang Signed-off-by: Youling Tang Signed-off-by: Huacai Chen commit 24d4f52791dae16e478741cc397ba660a95b9d02 Author: Youling Tang Date: Mon May 1 17:19:53 2023 +0800 LoongArch: ftrace: Implement ftrace_find_callable_addr() to simplify code In the module processing functions, the same logic can be reused by implementing ftrace_find_callable_addr(). Signed-off-by: Youling Tang Signed-off-by: Huacai Chen commit 819cf65575230bca02ad669daadba2ac04187ae1 Author: Youling Tang Date: Mon May 1 17:19:52 2023 +0800 LoongArch: ftrace: Fix build error if DYNAMIC_FTRACE_WITH_REGS is not set We can see the following build error if CONFIG_DYNAMIC_FTRACE_WITH_REGS is not set on LoongArch: arch/loongarch/kernel/ftrace_dyn.c: In function ‘ftrace_make_call’: arch/loongarch/kernel/ftrace_dyn.c:167:23: error: implicit declaration of function ‘__get_mod’ 167 | ret = __get_mod(&mod, pc); | ^~~~~~~~~ arch/loongarch/kernel/ftrace_dyn.c:171:24: error: implicit declaration of function ‘get_plt_addr’ 171 | addr = get_plt_addr(mod, addr); | ^~~~~~~~~~~~ The reason is that the __get_mod() and get_plt_addr() may be called in ftrace_make_{call,nop}. Signed-off-by: Youling Tang Signed-off-by: Huacai Chen commit 6fbff14a638293dcd0550cac2921f308ef6abe0e Author: Qing Zhang Date: Mon May 1 17:19:52 2023 +0800 LoongArch: ftrace: Abstract DYNAMIC_FTRACE_WITH_ARGS accesses Add new ftrace_regs_{get,set}_*() helpers which can be used to manipulate ftrace_regs. When CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y, these can always be used on any ftrace_regs, and when CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS =n these can be used when regs are available. Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen commit 8b5ee2c66d5c4c1312fd193d4138e6963160ba43 Author: Tiezhu Yang Date: Mon May 1 17:19:52 2023 +0800 LoongArch: Add support for function error injection Inspired by the commit 42d038c4fb00f ("arm64: Add support for function error injection") and the commit ee55ff803b383 ("riscv: Add support for function error injection"), this patch supports function error injection for LoongArch. Mainly implement two functions: (1) regs_set_return_value() which is used to overwrite the return value, (2) override_function_with_return() which is used to override the probed function returning and jump to its caller. Here is a simple test under CONFIG_FUNCTION_ERROR_INJECTION and CONFIG_FAIL_FUNCTION: # echo sys_clone > /sys/kernel/debug/fail_function/inject # echo 100 > /sys/kernel/debug/fail_function/probability # dmesg bash: fork: Invalid argument # dmesg ... FAULT_INJECTION: forcing a failure. name fail_function, interval 1, probability 100, space 0, times 1 ... Call Trace: [<90000000002238f4>] show_stack+0x5c/0x180 [<90000000012e384c>] dump_stack_lvl+0x60/0x88 [<9000000000b1879c>] should_fail_ex+0x1b0/0x1f4 [<900000000032ead4>] fei_kprobe_handler+0x28/0x6c [<9000000000230970>] kprobe_breakpoint_handler+0xf0/0x118 [<90000000012e3e60>] do_bp+0x2c4/0x358 [<9000000002241924>] exception_handlers+0x1924/0x10000 [<900000000023b7d0>] sys_clone+0x0/0x4 [<90000000012e4744>] do_syscall+0x7c/0x94 [<9000000000221e44>] handle_syscall+0xc4/0x160 Tested-by: Hengqi Chen Acked-by: Masami Hiramatsu (Google) Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit d4c937c2a57bbba24790be6fe7a791456f5fbb60 Author: Qing Zhang Date: Mon May 1 17:19:52 2023 +0800 LoongArch: Add ARCH_HAS_FORTIFY_SOURCE selection FORTIFY_SOURCE could detect various overflows at compile and run time. ARCH_HAS_FORTIFY_SOURCE means that the architecture can be built and run with CONFIG_FORTIFY_SOURCE. So select it in LoongArch. See more about this feature from commit 6974f0c4555e285 ("include/linux/ string.h: add the option of fortified string.h functions"). Signed-off-by: Qing Zhang Signed-off-by: Huacai Chen commit 2f1648220214d18168e55920c21014e71c2d5bbc Author: Min Zhou Date: Mon May 1 17:19:43 2023 +0800 LoongArch: crypto: Add crc32 and crc32c hw acceleration With a blatant copy of some MIPS bits we introduce the crc32 and crc32c hw accelerated module to LoongArch. LoongArch has provided these instructions to calculate crc32 and crc32c: * crc.w.b.w crcc.w.b.w * crc.w.h.w crcc.w.h.w * crc.w.w.w crcc.w.w.w * crc.w.d.w crcc.w.d.w So we can make use of these instructions to improve the performance of calculation for crc32(c) checksums. As can be seen from the following test results, crc32(c) instructions can improve the performance by 58%. Software implemention Hardware acceleration Buffer size time cost (seconds) time cost (seconds) Accel. 100 KB 0.000845 0.000534 59.1% 1 MB 0.007758 0.004836 59.4% 10 MB 0.076593 0.047682 59.4% 100 MB 0.756734 0.479126 58.5% 1000 MB 7.563841 4.778266 58.5% Signed-off-by: Min Zhou Signed-off-by: Huacai Chen commit 69e3a6aa6be21de6aaf38130fad97ecde34a193c Author: Bibo Mao Date: Mon May 1 17:19:43 2023 +0800 LoongArch: Add checksum optimization for 64-bit system LoongArch platform is 64-bit system, which supports 8-bytes memory accessing, but generic checksum functions use 4-byte memory access. So add 8-bytes memory access optimization for checksum functions on LoongArch. And the code comes from arm64 system. When network hw checksum is disabled, iperf performance improves about 10% with this patch. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 8941e93ca5906fcca87dc74255b58054ec4d7868 Author: WANG Rui Date: Mon May 1 17:19:43 2023 +0800 LoongArch: Optimize memory ops (memset/memcpy/memmove) To optimize memset()/memcpy()/memmove() and so on, we use a jump table to dispatch cases for short data lengths; and for long data lengths, we split the destination into head part (first 8 bytes), tail part (last 8 bytes) and middle part. The head part and tail part may be at unaligned addresses, while the middle part is always aligned (the middle part is allowed to overlap the head/tail part). In this way, the first and last 8 bytes may be unaligned accesses, but we can make sure the data in the middle is processed at an aligned destination address. We have tested micro-bench[1] on a Loongson-3C5000 16-core machine (2.2GHz): 1. memset | length | src offset | dst offset | speed before | speed after | % | |--------|------------|------------|--------------|-------------|---------| | 8 | 0 | 0 | 696.191 | 1518.785 | 118.16% | | 8 | 0 | 1 | 696.325 | 1518.937 | 118.14% | | 50 | 0 | 0 | 969.976 | 8053.902 | 730.32% | | 50 | 0 | 1 | 970.034 | 8058.475 | 730.74% | | 300 | 0 | 0 | 5876.612 | 16544.703 | 181.53% | | 300 | 0 | 1 | 5030.849 | 16549.011 | 228.95% | | 1200 | 0 | 0 | 11797.077 | 16752.137 | 42.00% | | 1200 | 0 | 1 | 5687.141 | 16645.233 | 192.68% | | 4000 | 0 | 0 | 15723.27 | 16761.557 | 6.60% | | 4000 | 0 | 1 | 5906.114 | 16732.316 | 183.30% | | 8000 | 0 | 0 | 16751.403 | 16770.002 | 0.11% | | 8000 | 0 | 1 | 5995.449 | 16754.07 | 179.45% | 2. memcpy | length | src offset | dst offset | speed before | speed after | % | |--------|------------|------------|--------------|-------------|---------| | 8 | 0 | 0 | 696.2 | 1670.605 | 139.96% | | 8 | 0 | 1 | 696.325 | 1671.138 | 139.99% | | 50 | 0 | 0 | 969.974 | 8724.999 | 799.51% | | 50 | 0 | 1 | 970.032 | 8730.138 | 799.98% | | 300 | 0 | 0 | 5564.662 | 16272.652 | 192.43% | | 300 | 0 | 1 | 4670.436 | 14972.842 | 220.59% | | 1200 | 0 | 0 | 10740.23 | 16751.728 | 55.97% | | 1200 | 0 | 1 | 5027.741 | 14874.564 | 195.85% | | 4000 | 0 | 0 | 15122.367 | 16737.642 | 10.68% | | 4000 | 0 | 1 | 5536.918 | 14890.397 | 168.93% | | 8000 | 0 | 0 | 16505.453 | 16553.543 | 0.29% | | 8000 | 0 | 1 | 5821.619 | 14841.804 | 154.94% | 3. memmove | length | src offset | dst offset | speed before | speed after | % | |--------|------------|------------|--------------|-------------|---------| | 8 | 0 | 0 | 982.693 | 1670.568 | 70.00% | | 8 | 0 | 1 | 983.023 | 1671.174 | 70.00% | | 50 | 0 | 0 | 1230.87 | 8727.625 | 609.06% | | 50 | 0 | 1 | 1232.515 | 8730.138 | 608.32% | | 300 | 0 | 0 | 6490.375 | 16296.993 | 151.09% | | 300 | 0 | 1 | 4282.687 | 14972.842 | 249.61% | | 1200 | 0 | 0 | 11742.755 | 16752.546 | 42.66% | | 1200 | 0 | 1 | 5039.338 | 14872.951 | 195.14% | | 4000 | 0 | 0 | 15467.786 | 16737.09 | 8.21% | | 4000 | 0 | 1 | 5009.905 | 14890.542 | 197.22% | | 8000 | 0 | 0 | 16489.664 | 16553.273 | 0.39% | | 8000 | 0 | 1 | 5823.786 | 14858.646 | 155.14% | * speed: MB/s * length: byte [1] https://github.com/heiher/mem-bench Signed-off-by: WANG Rui Signed-off-by: Huacai Chen commit 2b3bd32ea3a22ea2d5e591da4ac2c2b1fb17c0e0 Author: Huacai Chen Date: Mon May 1 17:19:27 2023 +0800 LoongArch: Provide kernel fpu functions Provide kernel_fpu_begin()/kernel_fpu_end() to allow the kernel itself to use fpu. They can be used by some other kernel components, e.g., the AMDGPU graphic driver for DCN. Reported-by: WANG Xuerui Tested-by: WANG Xuerui Signed-off-by: Huacai Chen commit c23e7f01cf621290770069d968ca4c8356a50d00 Author: WANG Xuerui Date: Mon May 1 17:19:27 2023 +0800 LoongArch: Relay BCE exceptions to userland as SIGSEGV with si_code=SEGV_BNDERR SEGV_BNDERR was introduced initially for supporting the Intel MPX, but fell into disuse after the MPX support was removed. The LoongArch bounds-checking instructions behave very differently than MPX, but overall the interface is still kind of suitable for conveying the information to userland when bounds-checking assertions trigger, so we wouldn't have to invent more UAPI. Specifically, when the BCE triggers, a SEGV_BNDERR is sent to userland, with si_addr set to the out-of-bounds address or value (in asrt{gt,le}'s case), and one of si_lower or si_upper set to the configured bound depending on the faulting instruction. The other bound is set to either 0 or ULONG_MAX to resemble a range with both lower and upper bounds. Note that it is possible to have si_addr == si_lower in case of a failing asrtgt or {ld,st}gt, because those instructions test for strict greater-than relationship. This should not pose a problem for userland, though, because the faulting PC is available for the application to associate back to the exact instruction for figuring out the expectation. Example exception context generated by a faulting `asrtgt.d t0, t1` (assert t0 > t1 or BCE) with t0=100 and t1=200: > pc 00005555558206a4 ra 00007ffff2d854fc tp 00007ffff2f2f180 sp 00007ffffbf9fb80 > a0 0000000000000002 a1 00007ffffbf9fce8 a2 00007ffffbf9fd00 a3 00007ffff2ed4558 > a4 0000000000000000 a5 00007ffff2f044c8 a6 00007ffffbf9fce0 a7 fffffffffffff000 > t0 0000000000000064 t1 00000000000000c8 t2 00007ffffbfa2d5e t3 00007ffff2f12aa0 > t4 00007ffff2ed6158 t5 00007ffff2ed6158 t6 000000000000002e t7 0000000003d8f538 > t8 0000000000000005 u0 0000000000000000 s9 0000000000000000 s0 00007ffffbf9fce8 > s1 0000000000000002 s2 0000000000000000 s3 00007ffff2f2c038 s4 0000555555820610 > s5 00007ffff2ed5000 s6 0000555555827e38 s7 00007ffffbf9fd00 s8 0000555555827e38 > ra: 00007ffff2d854fc > ERA: 00005555558206a4 > CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE) > PRMD: 00000007 (PPLV3 +PIE -PWE) > EUEN: 00000000 (-FPE -SXE -ASXE -BTE) > ECFG: 0007181c (LIE=2-4,11-12 VS=7) > ESTAT: 000a0000 [BCE] (IS= ECode=10 EsubCode=0) > PRID: 0014c010 (Loongson-64bit, Loongson-3A5000) Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit 325a38b511caff53c10393bab1e59cbd37f15ec2 Author: WANG Xuerui Date: Mon May 1 17:19:27 2023 +0800 LoongArch: Tweak the BADV and CPUCFG.PRID lines in show_regs() Use ISA manual names for BADV and CPUCFG.PRID lines in show_regs(), for stylistic consistency with the other lines already touched. While at it, also include current CPU's full name in show_regs() output. It may be more helpful for developers looking at the resulting dumps, because multiple distinct CPU models may share the same PRID. Not having this info available may hide problems only found on some but not all of the models sharing one specific PRID. Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit 98b90ede59472de5931b7e4d72c3ff948eaa19a4 Author: WANG Xuerui Date: Mon May 1 17:19:27 2023 +0800 LoongArch: Humanize the ESTAT line when showing registers Example output looks like: [ xx.xxxxxx] ESTAT: 00001000 [INT] (IS=12 ECode=0 EsubCode=0) Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit 5e3e784d35c41ca21251f92c243780c791100b02 Author: WANG Xuerui Date: Mon May 1 17:19:27 2023 +0800 LoongArch: Humanize the ECFG line when showing registers Example output looks like: [ xx.xxxxxx] ECFG: 00071c1c (LIE=2-4,10-12 VS=7) Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit 9718d96c035c594390600168cbca0ae4e0d867f5 Author: WANG Xuerui Date: Mon May 1 17:19:27 2023 +0800 LoongArch: Humanize the EUEN line when showing registers Example output looks like: [ xx.xxxxxx] EUEN: 00000000 (-FPE -SXE -ASXE -BTE) Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit ce7f0b18b030e17fb3d8327f1b6f1719165ca51d Author: WANG Xuerui Date: Mon May 1 17:19:10 2023 +0800 LoongArch: Humanize the PRMD line when showing registers Example output looks like: [ xx.xxxxxx] PRMD: 00000004 (PPLV0 +PIE -PWE) Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit efada2afacee7b5e59b3182bc36ddfb0fad2b0e2 Author: WANG Xuerui Date: Mon May 1 17:19:10 2023 +0800 LoongArch: Humanize the CRMD line when showing registers Example output looks like: [ xx.xxxxxx] CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE) Some initial machinery for this pretty-printing format has been included in this patch as well. Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit 05fa8d4977d727cf41294ea09b4a5085cba4ad54 Author: WANG Xuerui Date: Mon May 1 17:19:10 2023 +0800 LoongArch: Fix format of CSR lines during show_regs() Use uppercase CSR names throughout for consistency with the manual wording, and right-align the keys. The "CSR" part is inferrable from context, hence dropped for more horizontal space. Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit 863b3795efae6458dbc24f03add50c575cf4fbd2 Author: WANG Xuerui Date: Mon May 1 17:19:10 2023 +0800 LoongArch: Print symbol info for $ra and CSR.ERA only for kernel-mode contexts Otherwise the addresses wouldn't make sense at all. While at it, align the "map keys" to maintain right-alignment with the "estat:" line too; also swap the ERA and ra lines so all CSRs are shown together. Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit f6a79b6036ef220028db190c7424ce8099c98090 Author: WANG Xuerui Date: Mon May 1 17:19:10 2023 +0800 LoongArch: Print GPRs with ABI names when showing registers Show PC (CSR.ERA) in place of $zero, and also show the syscall restart flag (conveniently stuffed in regs[0]) if non-zero. Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit aa552254cf0039d83908105a07007f9ea616c119 Author: WANG Xuerui Date: Mon May 1 17:19:10 2023 +0800 LoongArch: Define regular names for BCE/WATCH/HVC/GSPR exceptions Define them according to the ISA manual, in order to enable matching the sub-exceptions for humanization purposes later. Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit 9e36fa42995a7c7fa8d84a429ca647736c4f1c66 Author: WANG Xuerui Date: Mon May 1 17:19:10 2023 +0800 LoongArch: Clean up the architectural interrupt definitions While interrupts are assigned ECodes `64 + interrupt number`, all existing use sites of interrupt numbers want the 64 subtracted. Re-arrange the definitions so that the actual interrupt number is used everywhere, and make EXCCODE_INT_END inclusive as it is more intuitive that way. While at it, according to the asm/loongarch.h definitions, the total number of architectural interrupts should be 14, but various other places indicate otherwise (13 or 15). Those places have been adjusted to 14 as well for consistency. Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit fb7cba61919ada54d088870dd173c61b6b372873 Merge: 4f163bf82b024 db099c625b13a Author: David S. Miller Date: Mon May 1 07:43:19 2023 +0100 Merge branch 'rxrpc-timeout-fixes' David Howells says: ==================== rxrpc: Timeout handling fixes Here are three patches to fix timeouts handling in AF_RXRPC: (1) The hard call timeout should be interpreted in seconds, not milliseconds. (2) Allow a waiting call to be aborted (thereby cancelling the call) in the case a signal interrupts sendmsg() and leaves it hanging until it is granted a channel on a connection. (3) Kernel-generated calls get the timer started on them even if they're still waiting to be attached to a connection. If the timer expires before the wait is complete and a conn is attached, an oops will occur. ==================== Signed-off-by: David S. Miller commit db099c625b13a74d462521a46d98a8ce5b53af5d Author: David Howells Date: Fri Apr 28 21:27:56 2023 +0100 rxrpc: Fix timeout of a call that hasn't yet been granted a channel afs_make_call() calls rxrpc_kernel_begin_call() to begin a call (which may get stalled in the background waiting for a connection to become available); it then calls rxrpc_kernel_set_max_life() to set the timeouts - but that starts the call timer so the call timer might then expire before we get a connection assigned - leading to the following oops if the call stalled: BUG: kernel NULL pointer dereference, address: 0000000000000000 ... CPU: 1 PID: 5111 Comm: krxrpcio/0 Not tainted 6.3.0-rc7-build3+ #701 RIP: 0010:rxrpc_alloc_txbuf+0xc0/0x157 ... Call Trace: rxrpc_send_ACK+0x50/0x13b rxrpc_input_call_event+0x16a/0x67d rxrpc_io_thread+0x1b6/0x45f ? _raw_spin_unlock_irqrestore+0x1f/0x35 ? rxrpc_input_packet+0x519/0x519 kthread+0xe7/0xef ? kthread_complete_and_exit+0x1b/0x1b ret_from_fork+0x22/0x30 Fix this by noting the timeouts in struct rxrpc_call when the call is created. The timer will be started when the first packet is transmitted. It shouldn't be possible to trigger this directly from userspace through AF_RXRPC as sendmsg() will return EBUSY if the call is in the waiting-for-conn state if it dropped out of the wait due to a signal. Fixes: 9d35d880e0e4 ("rxrpc: Move client call connection to the I/O thread") Reported-by: Marc Dionne Signed-off-by: David Howells cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller commit 0eb362d254814ce04848730bf32e75b8ee1a4d6c Author: David Howells Date: Fri Apr 28 21:27:55 2023 +0100 rxrpc: Make it so that a waiting process can be aborted When sendmsg() creates an rxrpc call, it queues it to wait for a connection and channel to be assigned and then waits before it can start shovelling data as the encrypted DATA packet content includes a summary of the connection parameters. However, sendmsg() may get interrupted before a connection gets assigned and further sendmsg() calls will fail with EBUSY until an assignment is made. Fix this so that the call can at least be aborted without failing on EBUSY. We have to be careful here as sendmsg() mustn't be allowed to start the call timer if the call doesn't yet have a connection assigned as an oops may follow shortly thereafter. Fixes: 540b1c48c37a ("rxrpc: Fix deadlock between call creation and sendmsg/recvmsg") Reported-by: Marc Dionne Signed-off-by: David Howells cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller commit 0d098d83c5d9e107b2df7f5e11f81492f56d2fe7 Author: David Howells Date: Fri Apr 28 21:27:54 2023 +0100 rxrpc: Fix hard call timeout units The hard call timeout is specified in the RXRPC_SET_CALL_TIMEOUT cmsg in seconds, so fix the point at which sendmsg() applies it to the call to convert to jiffies from seconds, not milliseconds. Fixes: a158bdd3247b ("rxrpc: Fix timeout of a call that hasn't yet been granted a channel") Signed-off-by: David Howells cc: Marc Dionne cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller commit 4f163bf82b0244bf4d1e9a6b0f4cf4e90b42496e Author: Tom Rix Date: Fri Apr 28 17:43:21 2023 -0400 net: atlantic: Define aq_pm_ops conditionally on CONFIG_PM For s390, gcc with W=1 reports drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c:458:32: error: 'aq_pm_ops' defined but not used [-Werror=unused-const-variable=] 458 | static const struct dev_pm_ops aq_pm_ops = { | ^~~~~~~~~ The only use of aq_pm_ops is conditional on CONFIG_PM. The definition of aq_pm_ops and its functions should also be conditional on CONFIG_PM. Signed-off-by: Tom Rix Signed-off-by: David S. Miller commit 281900a923d4c50df109b52a22ae3cdac150159b Author: Andy Moreton Date: Fri Apr 28 12:33:33 2023 +0100 sfc: Fix module EEPROM reporting for QSFP modules The sfc driver does not report QSFP module EEPROM contents correctly as only the first page is fetched from hardware. Commit 0e1a2a3e6e7d ("ethtool: Add SFF-8436 and SFF-8636 max EEPROM length definitions") added ETH_MODULE_SFF_8436_MAX_LEN for the overall size of the EEPROM info, so use that to report the full EEPROM contents. Fixes: 9b17010da57a ("sfc: Add ethtool -m support for QSFP modules") Signed-off-by: Andy Moreton Signed-off-by: David S. Miller commit f858e2fd23ac40286f921cd461e3400e17a7fcf3 Merge: 526f28bd0fbdc cce8334f4aacd Author: David S. Miller Date: Mon May 1 07:32:04 2023 +0100 Merge branch 'r8152-fixes' Hayes Wang says: ==================== r8152: fix 2.5G devices v3: For patch #2, modify the comment. v2: For patch #1, Remove inline for fc_pause_on_auto() and fc_pause_off_auto(), and update the commit message. For patch #2, define the magic value for OCP register 0xa424. v1: These patches are used to fix some issues of RTL8156. ==================== Signed-off-by: David S. Miller commit cce8334f4aacd9936309a002d4a4de92a07cd2c2 Author: Hayes Wang Date: Fri Apr 28 16:53:31 2023 +0800 r8152: move setting r8153b_rx_agg_chg_indicate() Move setting r8153b_rx_agg_chg_indicate() for 2.5G devices. The r8153b_rx_agg_chg_indicate() has to be called after enabling tx/rx. Otherwise, the coalescing settings are useless. Fixes: 195aae321c82 ("r8152: support new chips") Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 61b0ad6f58e2066e054c6d4839d67974d2861a7d Author: Hayes Wang Date: Fri Apr 28 16:53:30 2023 +0800 r8152: fix the poor throughput for 2.5G devices Fix the poor throughput for 2.5G devices, when changing the speed from auto mode to force mode. This patch is used to notify the MAC when the mode is changed. Fixes: 195aae321c82 ("r8152: support new chips") Signed-off-by: Hayes Wang Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 8ceda6d5a1e5402fd852e6cc59a286ce3dc545ee Author: Hayes Wang Date: Fri Apr 28 16:53:29 2023 +0800 r8152: fix flow control issue of RTL8156A The feature of flow control becomes abnormal, if the device sends a pause frame and the tx/rx is disabled before sending a release frame. It causes the lost of packets. Set PLA_RX_FIFO_FULL and PLA_RX_FIFO_EMPTY to zeros before disabling the tx/rx. And, toggle FC_PATCH_TASK before enabling tx/rx to reset the flow control patch and timer. Then, the hardware could clear the state and the flow control becomes normal after enabling tx/rx. Besides, remove inline for fc_pause_on_auto() and fc_pause_off_auto(). Fixes: 195aae321c82 ("r8152: support new chips") Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 526f28bd0fbdc699cda31426928802650c1528e5 Author: Victor Nogueira Date: Wed Apr 26 15:19:40 2023 +0000 net/sched: act_mirred: Add carrier check There are cases where the device is adminstratively UP, but operationally down. For example, we have a physical device (Nvidia ConnectX-6 Dx, 25Gbps) who's cable was pulled out, here is its ip link output: 5: ens2f1: mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 link/ether b8:ce:f6:4b:68:35 brd ff:ff:ff:ff:ff:ff altname enp179s0f1np1 As you can see, it's administratively UP but operationally down. In this case, sending a packet to this port caused a nasty kernel hang (so nasty that we were unable to capture it). Aborting a transmit based on operational status (in addition to administrative status) fixes the issue. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Acked-by: Jamal Hadi Salim Signed-off-by: Victor Nogueira v1->v2: Add fixes tag v2->v3: Remove blank line between tags + add change log, suggested by Leon Signed-off-by: David S. Miller commit 7949aa46bb4b5c5e43ba3ba8298ffcb48bebf0ff Author: Jens Axboe Date: Sun Apr 30 16:15:08 2023 -0600 mailmap: add mailmap entries for Jens Axboe There's an old entry in there already, but update it and add fb/meta and oracle entries as well. Signed-off-by: Jens Axboe commit 6b496a94c5905fca7879bc0dc438a47de40b7d4f Author: Tom Rix Date: Sat Apr 29 09:46:01 2023 -0400 i3c: ast2600: set variable ast2600_i3c_ops storage-class-specifier to static smatch reports drivers/i3c/master/ast2600-i3c-master.c:121:34: warning: symbol 'ast2600_i3c_ops' was not declared. Should it be static? This variable is only used in its defining file, so it should be static. Signed-off-by: Tom Rix Reviewed-by: Jeremy Kerr Link: https://lore.kernel.org/r/20230429134601.2688558-1-trix@redhat.com Signed-off-by: Alexandre Belloni commit 58390c8ce1bddb6c623f62e7ed36383e7fa5c02f Merge: 7acc137211308 e51b4198396cd Author: Linus Torvalds Date: Sun Apr 30 13:00:38 2023 -0700 Merge tag 'iommu-updates-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu updates from Joerg Roedel: - Convert to platform remove callback returning void - Extend changing default domain to normal group - Intel VT-d updates: - Remove VT-d virtual command interface and IOASID - Allow the VT-d driver to support non-PRI IOPF - Remove PASID supervisor request support - Various small and misc cleanups - ARM SMMU updates: - Device-tree binding updates: * Allow Qualcomm GPU SMMUs to accept relevant clock properties * Document Qualcomm 8550 SoC as implementing an MMU-500 * Favour new "qcom,smmu-500" binding for Adreno SMMUs - Fix S2CR quirk detection on non-architectural Qualcomm SMMU implementations - Acknowledge SMMUv3 PRI queue overflow when consuming events - Document (in a comment) why ATS is disabled for bypass streams - AMD IOMMU updates: - 5-level page-table support - NUMA awareness for memory allocations - Unisoc driver: Support for reattaching an existing domain - Rockchip driver: Add missing set_platform_dma_ops callback - Mediatek driver: Adjust the dma-ranges - Various other small fixes and cleanups * tag 'iommu-updates-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (82 commits) iommu: Remove iommu_group_get_by_id() iommu: Make iommu_release_device() static iommu/vt-d: Remove BUG_ON in dmar_insert_dev_scope() iommu/vt-d: Remove a useless BUG_ON(dev->is_virtfn) iommu/vt-d: Remove BUG_ON in map/unmap() iommu/vt-d: Remove BUG_ON when domain->pgd is NULL iommu/vt-d: Remove BUG_ON in handling iotlb cache invalidation iommu/vt-d: Remove BUG_ON on checking valid pfn range iommu/vt-d: Make size of operands same in bitwise operations iommu/vt-d: Remove PASID supervisor request support iommu/vt-d: Use non-privileged mode for all PASIDs iommu/vt-d: Remove extern from function prototypes iommu/vt-d: Do not use GFP_ATOMIC when not needed iommu/vt-d: Remove unnecessary checks in iopf disabling path iommu/vt-d: Move PRI handling to IOPF feature path iommu/vt-d: Move pfsid and ats_qdep calculation to device probe path iommu/vt-d: Move iopf code from SVA to IOPF enabling path iommu/vt-d: Allow SVA with device-specific IOPF dmaengine: idxd: Add enable/disable device IOPF feature arm64: dts: mt8186: Add dma-ranges for the parent "soc" node ... commit 7acc1372113083fa281ba426021801e2402caca1 Merge: 10de638d8ea57 fd35fdcbf75b5 Author: Linus Torvalds Date: Sun Apr 30 11:51:51 2023 -0700 Merge tag 'cxl-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull compute express link updates from Dan Williams: "DOE support is promoted from drivers/cxl/ to drivers/pci/ with Bjorn's blessing, and the CXL core continues to mature its media management capabilities with support for listing and injecting media errors. Some late fixes that missed v6.3-final are also included: - Refactor the DOE infrastructure (Data Object Exchange PCI-config-cycle mailbox) to be a facility of the PCI core rather than the CXL core. This is foundational for upcoming support for PCI device-attestation and PCIe / CXL link encryption. - Add support for retrieving and injecting poison for CXL memory expanders. This enabling uses trace-events to convey CXL media error records to user tooling. It includes translation of device-local addresses (DPA) to system physical addresses (SPA) and their corresponding CXL region. - Fixes for decoder enumeration that missed v6.3-final - Miscellaneous fixups" * tag 'cxl-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: (38 commits) cxl/test: Add mock test for set_timestamp cxl/mbox: Update CMD_RC_TABLE tools/testing/cxl: Require CONFIG_DEBUG_FS tools/testing/cxl: Add a sysfs attr to test poison inject limits tools/testing/cxl: Use injected poison for get poison list tools/testing/cxl: Mock the Clear Poison mailbox command tools/testing/cxl: Mock the Inject Poison mailbox command cxl/mem: Add debugfs attributes for poison inject and clear cxl/memdev: Trace inject and clear poison as cxl_poison events cxl/memdev: Warn of poison inject or clear to a mapped region cxl/memdev: Add support for the Clear Poison mailbox command cxl/memdev: Add support for the Inject Poison mailbox command tools/testing/cxl: Mock support for Get Poison List cxl/trace: Add an HPA to cxl_poison trace events cxl/region: Provide region info to the cxl_poison trace event cxl/memdev: Add trigger_poison_list sysfs attribute cxl/trace: Add TRACE support for CXL media-error records cxl/mbox: Add GET_POISON_LIST mailbox command cxl/mbox: Initialize the poison state cxl/mbox: Restrict poison cmds to debugfs cxl_raw_allow_all ... commit 10de638d8ea57ebab4231ea077bed01d9bade775 Merge: d55571c008446 2a405f6bb3a5b Author: Linus Torvalds Date: Sun Apr 30 11:43:31 2023 -0700 Merge tag 's390-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Vasily Gorbik: - Add support for stackleak feature. Also allow specifying architecture-specific stackleak poison function to enable faster implementation. On s390, the mvc-based implementation helps decrease typical overhead from a factor of 3 to just 25% - Convert all assembler files to use SYM* style macros, deprecating the ENTRY() macro and other annotations. Select ARCH_USE_SYM_ANNOTATIONS - Improve KASLR to also randomize module and special amode31 code base load addresses - Rework decompressor memory tracking to support memory holes and improve error handling - Add support for protected virtualization AP binding - Add support for set_direct_map() calls - Implement set_memory_rox() and noexec module_alloc() - Remove obsolete overriding of mem*() functions for KASAN - Rework kexec/kdump to avoid using nodat_stack to call purgatory - Convert the rest of the s390 code to use flexible-array member instead of a zero-length array - Clean up uaccess inline asm - Enable ARCH_HAS_MEMBARRIER_SYNC_CORE - Convert to using CONFIG_FUNCTION_ALIGNMENT and enable DEBUG_FORCE_FUNCTION_ALIGN_64B - Resolve last_break in userspace fault reports - Simplify one-level sysctl registration - Clean up branch prediction handling - Rework CPU counter facility to retrieve available counter sets just once - Other various small fixes and improvements all over the code * tag 's390-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (118 commits) s390/stackleak: provide fast __stackleak_poison() implementation stackleak: allow to specify arch specific stackleak poison function s390: select ARCH_USE_SYM_ANNOTATIONS s390/mm: use VM_FLUSH_RESET_PERMS in module_alloc() s390: wire up memfd_secret system call s390/mm: enable ARCH_HAS_SET_DIRECT_MAP s390/mm: use BIT macro to generate SET_MEMORY bit masks s390/relocate_kernel: adjust indentation s390/relocate_kernel: use SYM* macros instead of ENTRY(), etc. s390/entry: use SYM* macros instead of ENTRY(), etc. s390/purgatory: use SYM* macros instead of ENTRY(), etc. s390/kprobes: use SYM* macros instead of ENTRY(), etc. s390/reipl: use SYM* macros instead of ENTRY(), etc. s390/head64: use SYM* macros instead of ENTRY(), etc. s390/earlypgm: use SYM* macros instead of ENTRY(), etc. s390/mcount: use SYM* macros instead of ENTRY(), etc. s390/crc32le: use SYM* macros instead of ENTRY(), etc. s390/crc32be: use SYM* macros instead of ENTRY(), etc. s390/crypto,chacha: use SYM* macros instead of ENTRY(), etc. s390/amode31: use SYM* macros instead of ENTRY(), etc. ... commit d55571c0084465f1f7e1e29f22bd910d366a6e1d Merge: 310897659cf05 9892bd72efdc9 Author: Linus Torvalds Date: Sun Apr 30 11:32:53 2023 -0700 Merge tag 'kbuild-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Refactor scripts/kallsyms to make it faster and easier to maintain - Clean up menuconfig - Provide Clang with hard-coded target triple instead of CROSS_COMPILE - Use -z pack-relative-relocs flags instead of --use-android-relr-tags for arm64 CONFIG_RELR - Add srcdeb-pkg target to build only a Debian source package - Add KDEB_SOURCE_COMPRESS option to specify the compression for a Debian source package - Misc cleanups and fixes * tag 'kbuild-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: deb-pkg: specify targets in debian/rules as .PHONY sparc: unify sparc32/sparc64 archhelp kbuild: rpm-pkg: remove kernel-drm PROVIDES kbuild: deb-pkg: add KDEB_SOURCE_COMPRESS to specify source compression kbuild: add srcdeb-pkg target Makefile: use -z pack-relative-relocs kbuild: clang: do not use CROSS_COMPILE for target triple kconfig: menuconfig: reorder functions to remove forward declarations kconfig: menuconfig: remove unused M_EVENT macro kconfig: menuconfig: remove OLD_NCURSES macro kbuild: builddeb: Eliminate debian/arch use scripts/kallsyms: update the usage in the comment block scripts/kallsyms: decrease expand_symbol() / cleanup_symbol_name() calls scripts/kallsyms: change the output order scripts/kallsyms: move compiler-generated symbol patterns to mksysmap scripts/kallsyms: exclude symbols generated by itself dynamically scripts/mksysmap: use sed with in-line comments scripts/mksysmap: remove comments described in nm(1) scripts/kallsyms: remove redundant code for omitting U and N kallsyms: expand symbol name into comment for debugging commit 310897659cf056016e2c772a028f9b8abc934928 Merge: 825a0714d2b38 ea76e08f4d901 Author: Linus Torvalds Date: Sun Apr 30 11:20:22 2023 -0700 Merge tag 'rust-6.4' of https://github.com/Rust-for-Linux/linux Pull rust updates from Miguel Ojeda "More additions to the Rust core. Importantly, this adds the pin-init API, which will be used by other abstractions, such as the synchronization ones added here too: - pin-init API: a solution for the safe pinned initialization problem. This allows to reduce the need for 'unsafe' code in the kernel when dealing with data structures that require a stable address. Commit 90e53c5e70a6 ("rust: add pin-init API core") contains a nice introduction -- here is an example of how it looks like: #[pin_data] struct Example { #[pin] value: Mutex, #[pin] value_changed: CondVar, } impl Example { fn new() -> impl PinInit { pin_init!(Self { value <- new_mutex!(0), value_changed <- new_condvar!(), }) } } // In a `Box`. let b = Box::pin_init(Example::new())?; // In the stack. stack_pin_init!(let s = Example::new()); - 'sync' module: New types 'LockClassKey' ('struct lock_class_key'), 'Lock', 'Guard', 'Mutex' ('struct mutex'), 'SpinLock' ('spinlock_t'), 'LockedBy' and 'CondVar' (uses 'wait_queue_head_t'), plus macros such as 'static_lock_class!' and 'new_spinlock!'. In particular, 'Lock' and 'Guard' are generic implementations that contain code that is common to all locks. Then, different backends (the new 'Backend' trait) are implemented and used to define types like 'Mutex': type Mutex = Lock; In addition, new methods 'assume_init()', 'init_with()' and 'pin_init_with()' for 'UniqueArc>' and 'downcast()' for 'Arc'; as well as 'Debug' and 'Display' implementations for 'Arc' and 'UniqueArc'. Reduced stack usage of 'UniqueArc::try_new_uninit()', too. - 'types' module: New trait 'AlwaysRefCounted' and new type 'ARef' (an owned reference to an always-reference-counted object, meant to be used in wrappers for C types that have their own ref counting functions). Moreover, new associated functions 'raw_get()' and 'ffi_init()' for 'Opaque'. - New 'task' module with a new type 'Task' ('struct task_struct'), and a new macro 'current!' to safely get a reference to the current one. - New 'ioctl' module with new '_IOC*' const functions (equivalent to the C macros). - New 'uapi' crate, intended to be accessible by drivers directly. - 'macros' crate: new 'quote!' macro (similar to the one provided in userspace by the 'quote' crate); and the 'module!' macro now allows specifying multiple module aliases. - 'error' module: New associated functions for the 'Error' type, such as 'from_errno()' and new functions such as 'to_result()'. - 'alloc' crate: More fallible 'Vec' methods: 'try_resize` and 'try_extend_from_slice' and the infrastructure (imported from the Rust standard library) they need" * tag 'rust-6.4' of https://github.com/Rust-for-Linux/linux: (44 commits) rust: ioctl: Add ioctl number manipulation functions rust: uapi: Add UAPI crate rust: sync: introduce `CondVar` rust: lock: add `Guard::do_unlocked` rust: sync: introduce `LockedBy` rust: introduce `current` rust: add basic `Task` rust: introduce `ARef` rust: lock: introduce `SpinLock` rust: lock: introduce `Mutex` rust: sync: introduce `Lock` and `Guard` rust: sync: introduce `LockClassKey` MAINTAINERS: add Benno Lossin as Rust reviewer rust: init: broaden the blanket impl of `Init` rust: sync: add functions for initializing `UniqueArc>` rust: sync: reduce stack usage of `UniqueArc::try_new_uninit` rust: types: add `Opaque::ffi_init` rust: prelude: add `pin-init` API items to prelude rust: init: add `Zeroable` trait and `init::zeroed` function rust: init: add `stack_pin_init!` macro ... commit db2993a423e3fd0e4878f4d3ac66fe717f5f072e Author: Christophe JAILLET Date: Thu Apr 27 20:05:42 2023 +0200 ceph: reorder fields in 'struct ceph_snapid_map' Group some variables based on their sizes to reduce holes. On x86_64, this shrinks the size of 'struct ceph_snapid_map' from 72 to 64 bytes. When such a structure is allocated, because of the way memory allocation works, when 72 bytes were requested, 96 bytes were allocated. So, on x86_64, this change saves 32 bytes per allocation and has the structure fit in a single cacheline. Signed-off-by: Christophe JAILLET Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit a5ffd7b6e91a12975ae30de863437cc04387576a Author: Xiubo Li Date: Wed Apr 26 10:38:57 2023 +0800 ceph: pass ino# instead of old_dentry if it's disconnected When exporting the kceph to NFS it may pass a DCACHE_DISCONNECTED dentry for the link operation. Then it will parse this dentry as a snapdir, and the mds will fail the link request as -EROFS. MDS allow clients to pass a ino# instead of a path. Link: https://tracker.ceph.com/issues/59515 Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit aaf67de78807c59c35bafb5003d4fb457c764800 Author: Xiubo Li Date: Wed Apr 19 10:39:14 2023 +0800 ceph: fix potential use-after-free bug when trimming caps When trimming the caps and just after the 'session->s_cap_lock' is released in ceph_iterate_session_caps() the cap maybe removed by another thread, and when using the stale cap memory in the callbacks it will trigger use-after-free crash. We need to check the existence of the cap just after the 'ci->i_ceph_lock' being acquired. And do nothing if it's already removed. Cc: stable@vger.kernel.org Link: https://tracker.ceph.com/issues/43272 Signed-off-by: Xiubo Li Reviewed-by: Luís Henriques Signed-off-by: Ilya Dryomov commit 7d41870d65db028234333c68e60a034ac335557a Author: Xiubo Li Date: Wed Mar 8 10:21:44 2023 +0800 ceph: implement writeback livelock avoidance using page tagging While the mapped IOs continue if we try to flush a file's buffer we can see that the fsync() won't complete until the IOs finish. This is analogous to Jan Kara's commit (f446daaea9d4 mm: implement writeback livelock avoidance using page tagging), we will try to avoid livelocks of writeback when some steadily creates dirty pages in a mapping we are writing out. Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 7a6c3a035a2e133b41d01c1a479b50aac4aeecad Author: Xiubo Li Date: Tue Feb 28 20:40:51 2023 +0800 ceph: do not print the whole xattr value if it's too long If the xattr's value size is long enough the kernel will warn and then will fail the xfstests test case. Just print part of the value string if it's too long. At the same time fix the function name issue in the debug logs. Link: https://tracker.ceph.com/issues/58404 Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 9f855779a3874eee70e9f6be57b5f7774f14e510 Author: Akhil R Date: Thu Apr 27 18:09:14 2023 +0530 i2c: tegra: Fix PEC support for SMBUS block read Update the msg->len value correctly for SMBUS block read. The discrepancy went unnoticed as msg->len is used in SMBUS transfers only when a PEC byte is added. Fixes: d7583c8a5748 ("i2c: tegra: Add SMBus block read function") Signed-off-by: Akhil R Acked-by: Thierry Reding Signed-off-by: Wolfram Sang commit 825a0714d2b3883d4f8ff64f6933fb73ee3f1834 Merge: 17d4ded2fc9d4 026b85796ab4d Author: Linus Torvalds Date: Sat Apr 29 17:42:33 2023 -0700 Merge tag 'efi-next-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI updates from Ard Biesheuvel: - relocate the LoongArch kernel if the preferred address is already occupied - implement BTI annotations for arm64 EFI stub and zboot images - clean up arm64 zboot Kbuild rules for injecting the kernel code size * tag 'efi-next-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi/zboot: arm64: Grab code size from ELF symbol in payload efi/zboot: arm64: Inject kernel code size symbol into the zboot payload efi/zboot: Set forward edge CFI compat header flag if supported efi/zboot: Add BSS padding before compression arm64: efi: Enable BTI codegen and add PE/COFF annotation efi/pe: Import new BTI/IBT header flags from the spec efi/loongarch: Reintroduce efi_relocate_kernel() to relocate kernel commit 17d4ded2fc9d4f0b7c3c74ed9f80420c59d36e0b Merge: e81507acdc19d baba1315a74d1 Author: Linus Torvalds Date: Sat Apr 29 17:37:02 2023 -0700 Merge tag 'for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - power-supply core support for automatic handling of constant battery data supplied by firmware - generic-adc-battery: major cleanup - axp288_charger: fix ACPI issues on x86 Android tablets - rk817: cleanup and fix handling for low state of charge * tag 'for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (26 commits) power: supply: rk817: Fix low SOC bugs power: supply: rk817: Drop unneeded debugging code power: supply: axp288_charger: Use alt usb-id extcon on some x86 android tablets power: supply: generic-adc-battery: style fixes power: supply: generic-adc-battery: improve error message power: supply: generic-adc-battery: update copyright info power: supply: generic-adc-battery: add DT support power: supply: generic-adc-battery: add temperature support power: supply: generic-adc-battery: simplify read_channel logic power: supply: generic-adc-battery: use simple-battery API power: supply: generic-adc-battery: drop memory alloc error message power: supply: generic-adc-battery: drop charge now support power: supply: generic-adc-battery: drop jitter delay support power: supply: generic-adc-battery: fix unit scaling power: supply: generic-adc-battery: convert to managed resources power: supply: core: auto-exposure of simple-battery data dt-bindings: power: supply: adc-battery: add binding power: supply: bq256xx: Support to disable charger power: supply: charger-manager: Use of_property_read_bool() for boolean properties power: reset: qcom-pon: drop of_match_ptr for ID table ... commit e81507acdc19d91df4121f409871f3e4e055f6c2 Merge: af3877265dd88 a9863979fbc25 Author: Linus Torvalds Date: Sat Apr 29 17:29:39 2023 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "Nothing looks out of the ordinary in this batch of clk driver updates. There are a couple patches to the core clk framework, but they're all basically cleanups or debugging aids. The driver updates and new additions are dominated in the diffstat by Qualcomm and MediaTek drivers. Qualcomm gained a handful of new drivers for various SoCs, and MediaTek gained a bunch of drivers for MT8188. The MediaTek drivers are being modernized as well, so there are updates all over that vendor's clk drivers. There's also a couple other new clk drivers in here, for example the Starfive JH7110 SoC support is added. Outside of the two major SoC vendors though, we have the usual collection of non-critical fixes and cleanups to various clk drivers. It's good to see that we're getting more cleanups and modernization patches. Maybe one day we'll be able to properly split clk providers from clk consumers. Core: - Print an informational message before disabling unused clks New Drivers: - BCM63268 timer clock and reset controller - Frequency Hopping (FHCTL) on MediaTek MT6795, MT8173, MT8192 and MT8195 SoCs - Mediatek MT8188 SoC clk drivers - Clock driver for Sunplus SP7021 SoC - Clk driver support for Loongson-2 SoCs - Clock driver for Skyworks Si521xx I2C PCIe clock generators - Initial Starfive JH7110 clk/reset support - Global clock controller drivers for Qualcomm SM7150, IPQ9574, MSM8917 and IPQ5332 SoCs - GPU clock controller drivers for SM6115, SM6125, SM6375 and SA8775P SoCs Updates: - Shrink size of clk_fractional_divider a little - Convert various clk drivers to devm_of_clk_add_hw_provider() - Convert platform clk drivers to remove_new() - Converted most Mediatek clock drivers to struct platform_driver - MediaTek clock drivers can be built as modules - Reimplement Loongson-1 clk driver with DT support - Migrate socfpga clk driver to of_clk_add_hw_provider() - Support for i3c clks on Aspeed ast2600 SoCs - Add clock generic devm_clk_hw_register_gate_parent_data - Add audiomix block control for i.MX8MP - Add support for determine_rate to i.MX composite-8m - Let the LCDIF Pixel clock of i.MX8MM and i.MX8MN set parent rate - Provide clock name in error message for clk-gpr-mux on get parent failure - Drop duplicate imx_clk_mux_flags macro - Register the i.MX8MP Media Disp2 Pix clock as bus clock - Add Media LDB root clock to i.MX8MP - Make i.MX8MP nand_usdhc_bus clock as non-critical - Fix the rate table for i.MX fracn-gppll - Disable HW control for the fracn-gppll in order to be controlled by register write - Add support for interger PLL in fracn-gppll - Add mcore_booted module parameter to i.MX93 provider - Add NIC, A55 and ARM PLL clocks to i.MX93 - Fix i.MX8ULP XBAR_DIVBUS and AD_SLOW clock parents - Use "divider closest" clock type for PLL4_PFD dividers on i.MX8ULP to get more accurate clock rates - Mark the MU0_Bi and TPM5 clocks on i.MX8ULP as critical - Update some of the i.MX critical clocks flags to allow glitchless on-the-fly rate change. - Add I2C5 clock on Renesas R-Car V3H - Exynos850: Add CMU_G3D clock controller for the Mali GPU - Extract Exynos5433 (ARM64) clock controller power management code to common driver parts - Exynos850: make PMU_ALIVE_PCLK clock critical - Add Audio, thermal, camera (CSI-2), Image Signal Processor/Channel Selector (ISPCS), and video capture (VIN) clocks on Renesas R-Car V4H - Add video capture (VIN) clocks on Renesas R-Car V3H - Add Cortex-A53 System CPU (Z2) clocks on Renesas R-Car V3M and V3H - Support for Stromer Plus PLL on Qualcomm IPQ5332 - Add a missing reset to Qualcomm QCM2290 - Migrate Qualcomm IPQ4019 to clk_parent_data - Make USB GDSCs enter retention state when disabled on Qualcomm SM6375, MSM8996 and MSM8998 SoCs - Set floor rounding clk_ops for Qualcomm QCM2290 SDCC2 clk - Add two EMAC GDSCs on Qualcomm SC8280XP - Use shared rcg clk ops in Qualcomm SM6115 GCC - Park Qualcomm SM8350 PCIe PIPE clks when disabled - Add GDSCs to Qualcomm SC7280 LPASS audio clock controller - Add missing XO clocks to Qualcomm MSM8226 and MSM8974 - Convert some Qualcomm clk DT bindings to YAML - Reparenting fix for the clock supplying camera modules on Rockchip rk3399 - Mark more critical (bus-)clocks on Rockchip rk3588" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (290 commits) clk: qcom: gcc-sc8280xp: Add EMAC GDSCs clk: starfive: Delete the redundant dev_set_drvdata() in JH7110 clock drivers clk: rockchip: rk3588: make gate linked clocks critical clk: qcom: dispcc-qcm2290: Remove inexistent DSI1PHY clk clk: qcom: add the GPUCC driver for sa8775p dt-bindings: clock: qcom: describe the GPUCC clock for SA8775P clk: qcom: gcc-sm8350: fix PCIe PIPE clocks handling clk: qcom: lpassaudiocc-sc7280: Add required gdsc power domain clks in lpass_cc_sc7280_desc clk: qcom: lpasscc-sc7280: Skip qdsp6ss clock registration dt-bindings: clock: qcom,sc7280-lpasscc: Add qcom,adsp-pil-mode property clk: starfive: Avoid casting iomem pointers clk: microchip: fix potential UAF in auxdev release callback clk: qcom: rpm: Use managed `of_clk_add_hw_provider()` clk: mediatek: fhctl: Mark local variables static clk: sifive: make SiFive clk drivers depend on ARCH_ symbols clk: uniphier: Use managed `of_clk_add_hw_provider()` clk: si5351: Use managed `of_clk_add_hw_provider()` clk: si570: Use managed `of_clk_add_hw_provider()` clk: si514: Use managed `of_clk_add_hw_provider()` clk: lmk04832: Use managed `of_clk_add_hw_provider()` ... commit af3877265dd88d7e333f94fb37bc09554544adca Merge: 1ae78a14516b9 531094dc71647 Author: Linus Torvalds Date: Sat Apr 29 17:21:24 2023 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "Usual wide collection of unrelated items in drivers: - Driver bug fixes and treewide cleanups in hfi1, siw, qib, mlx5, rxe, usnic, usnic, bnxt_re, ocrdma, iser: - remove unnecessary NULL checks - kmap obsolescence - pci_enable_pcie_error_reporting() obsolescence - unused variables and macros - trace event related warnings - casting warnings - Code cleanups for irdm and erdma - EFA reporting of 128 byte PCIe TLP support - mlx5 more agressively uses the out of order HW feature - Big rework of how state machines and tasks work in rxe - Fix a syzkaller found crash netdev refcount leak in siw - bnxt_re revises their HW description header - Congestion control for bnxt_re - Use mmu_notifiers more safely in hfi1 - mlx5 gets better support for PCIe relaxed ordering inside VMs" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (81 commits) RDMA/efa: Add rdma write capability to device caps RDMA/mlx5: Use correct device num_ports when modify DC RDMA/irdma: Drop spurious WQ_UNBOUND from alloc_ordered_workqueue() call RDMA/rxe: Fix spinlock recursion deadlock on requester RDMA/mlx5: Fix flow counter query via DEVX RDMA/rxe: Protect QP state with qp->state_lock RDMA/rxe: Move code to check if drained to subroutine RDMA/rxe: Remove qp->req.state RDMA/rxe: Remove qp->comp.state RDMA/rxe: Remove qp->resp.state RDMA/mlx5: Allow relaxed ordering read in VFs and VMs net/mlx5: Update relaxed ordering read HCA capabilities RDMA/mlx5: Check pcie_relaxed_ordering_enabled() in UMR RDMA/mlx5: Remove pcie_relaxed_ordering_enabled() check for RO write RDMA: Add ib_virt_dma_to_page() RDMA/rxe: Fix the error "trying to register non-static key in rxe_cleanup_task" RDMA/irdma: Slightly optimize irdma_form_ah_cm_frame() RDMA/rxe: Fix incorrect TASKLET_STATE_SCHED check in rxe_task.c IB/hfi1: Place struct mmu_rb_handler on cache line start IB/hfi1: Fix bugs with non-PAGE_SIZE-end multi-iovec user SDMA requests ... commit 26b0812f4cf824a02eec9a425c09e34a25420166 Author: Conor Dooley Date: Sat Apr 29 10:27:33 2023 +0100 RISC-V: fixup in-flight collision with ARCH_WANT_OPTIMIZE_VMEMMAP rename Lukas warned that ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP had been renamed in the mm tree & that RISC-V would need a fixup as part of the merge. The warning was missed however, and RISC-V is selecting the orphaned Kconfig option. Fixes: 89d77f71f493 ("Merge tag 'riscv-for-linus-6.4-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux") Reported-by: Lukas Bulwahn . Link: https://lore.kernel.org/linux-riscv/CAKXUXMyVeg2kQK_edKHtMD3eADrDK_PKhCSVkMrLDdYgTQQ5rg@mail.gmail.com/ Signed-off-by: Conor Dooley Reviewed-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20230429-trilogy-jolly-12bf5c53d62d@spud Signed-off-by: Palmer Dabbelt commit a2a58b5ca124f4a0178d0ada801f1ed2c84c393d Author: Randy Dunlap Date: Sat Apr 29 08:52:47 2023 -0700 RISC-V: fix sifive and thead section mismatches in errata When CONFIG_MODULES is set, __init_or_module becomes , but when CONFIG_MODULES is not set, __init_or_module becomes __init. In the latter case, it causes section mismatch warnings: WARNING: modpost: vmlinux.o: section mismatch in reference: riscv_fill_cpu_mfr_info (section: .text) -> sifive_errata_patch_func (section: .init.text) WARNING: modpost: vmlinux.o: section mismatch in reference: riscv_fill_cpu_mfr_info (section: .text) -> thead_errata_patch_func (section: .init.text) Fixes: bb3f89487fd9 ("RISC-V: hwprobe: Remove __init on probe_vendor_features()") Signed-off-by: Randy Dunlap Reviewed-by: Evan Green Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230429155247.12131-1-rdunlap@infradead.org Signed-off-by: Palmer Dabbelt commit 41cad8284d5e6bf1d49d3c10a6b52ee1ae866a20 Author: Andrew Jones Date: Thu Apr 27 18:36:26 2023 +0200 RISC-V: Align SBI probe implementation with spec sbi_probe_extension() is specified with "Returns 0 if the given SBI extension ID (EID) is not available, or 1 if it is available unless defined as any other non-zero value by the implementation." Additionally, sbiret.value is a long. Fix the implementation to ensure any nonzero long value is considered a success, rather than only positive int values. Fixes: b9dcd9e41587 ("RISC-V: Add basic support for SBI v0.2") Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230427163626.101042-1-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit e4ef93edd4e0b022529303db1915766ff9de450e Author: Song Shuai Date: Wed Apr 26 18:00:09 2023 +0800 riscv: mm: remove redundant parameter of create_fdt_early_page_table create_fdt_early_page_table() explicitly uses early_pg_dir for 32-bit fdt mapping and the pgdir parameter is redundant here. So remove it and its caller. Reviewed-by: Alexandre Ghiti Signed-off-by: Song Shuai Reviewed-by: Conor Dooley Fixes: ef69d2559fe9 ("riscv: Move early dtb mapping into the fixmap region") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230426100009.685435-1-suagrfillet@gmail.com Signed-off-by: Palmer Dabbelt commit 38dab744f77f6d61f6d08334f83948ce9faadd3a Merge: b3d6bdfea21ce c0317210012e3 Author: Palmer Dabbelt Date: Sat Apr 29 11:25:15 2023 -0700 Merge patch series "RISC-V Hibernation Support" Sia Jee Heng says: This series adds RISC-V Hibernation/suspend to disk support. Low level Arch functions were created to support hibernation. swsusp_arch_suspend() relies code from __cpu_suspend_enter() to write cpu state onto the stack, then calling swsusp_save() to save the memory image. Arch specific hibernation header is implemented and is utilized by the arch_hibernation_header_restore() and arch_hibernation_header_save() functions. The arch specific hibernation header consists of satp, hartid, and the cpu_resume address. The kernel built version is also need to be saved into the hibernation image header to making sure only the same kernel is restore when resume. swsusp_arch_resume() creates a temporary page table that covering only the linear map. It copies the restore code to a 'safe' page, then start to restore the memory image. Once completed, it restores the original kernel's page table. It then calls into __hibernate_cpu_resume() to restore the CPU context. Finally, it follows the normal hibernation path back to the hibernation core. To enable hibernation/suspend to disk into RISCV, the below config need to be enabled: - CONFIG_HIBERNATION - CONFIG_ARCH_HIBERNATION_HEADER - CONFIG_ARCH_HIBERNATION_POSSIBLE At high-level, this series includes the following changes: 1) Change suspend_save_csrs() and suspend_restore_csrs() to public function as these functions are common to suspend/hibernation. (patch 1) 2) Refactor the common code in the __cpu_resume_enter() function and __hibernate_cpu_resume() function. The common code are used by hibernation and suspend. (patch 2) 3) Enhance kernel_page_present() function to support huge page. (patch 3) 4) Add arch/riscv low level functions to support hibernation/suspend to disk. (patch 4) * b4-shazam-merge: RISC-V: Add arch functions to support hibernation/suspend-to-disk RISC-V: mm: Enable huge page support to kernel_page_present() function RISC-V: Factor out common code of __cpu_resume_enter() RISC-V: Change suspend_save_csrs and suspend_restore_csrs to public function Link: https://lore.kernel.org/r/20230330064321.1008373-1-jeeheng.sia@starfivetech.com Signed-off-by: Palmer Dabbelt commit b3d6bdfea21ce1bbb45c3e6f297dfaf570d36300 Author: Nathan Chancellor Date: Tue Apr 4 13:34:21 2023 -0700 riscv: Adjust dependencies of HAVE_DYNAMIC_FTRACE selection When building allmodconfig with clang and its integrated assembler and linking with a version of GNU ld prior to 2.36, the following link error occurs: riscv64-linux-gnu-ld: .init.data has both ordered [`__patchable_function_entries' in init/main.o] and unordered [`.init_array.0' in kernel/trace/trace_benchmark.o] sections riscv64-linux-gnu-ld: final link failed: bad value This is the same error addressed by commit 45bd8951806e ("arm64: Improve HAVE_DYNAMIC_FTRACE_WITH_REGS selection for clang") for arm64. See that changelog for a full description of why this error occurs with this combination of tools. In a similar manner as that change, restrict the CONFIG_HAVE_DYNAMIC_FTRACE selection to combinations of tools known to work so that there are no errors. Link: https://github.com/ClangBuiltLinux/linux/issues/1817 Signed-off-by: Nathan Chancellor Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230404-riscv-dynamic-ftrace-checks-clang-v1-1-0ce296b7d423@kernel.org Signed-off-by: Palmer Dabbelt commit c0317210012e3b985779ddd92a7c5db8424e1e97 Author: Sia Jee Heng Date: Thu Mar 30 14:43:21 2023 +0800 RISC-V: Add arch functions to support hibernation/suspend-to-disk Low level Arch functions were created to support hibernation. swsusp_arch_suspend() relies code from __cpu_suspend_enter() to write cpu state onto the stack, then calling swsusp_save() to save the memory image. Arch specific hibernation header is implemented and is utilized by the arch_hibernation_header_restore() and arch_hibernation_header_save() functions. The arch specific hibernation header consists of satp, hartid, and the cpu_resume address. The kernel built version is also need to be saved into the hibernation image header to making sure only the same kernel is restore when resume. swsusp_arch_resume() creates a temporary page table that covering only the linear map. It copies the restore code to a 'safe' page, then start to restore the memory image. Once completed, it restores the original kernel's page table. It then calls into __hibernate_cpu_resume() to restore the CPU context. Finally, it follows the normal hibernation path back to the hibernation core. To enable hibernation/suspend to disk into RISCV, the below config need to be enabled: - CONFIG_HIBERNATION - CONFIG_ARCH_HIBERNATION_HEADER - CONFIG_ARCH_HIBERNATION_POSSIBLE Signed-off-by: Sia Jee Heng Reviewed-by: Ley Foon Tan Reviewed-by: Mason Huo Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230330064321.1008373-5-jeeheng.sia@starfivetech.com Signed-off-by: Palmer Dabbelt commit a15c90b67a662c75f469822a7f95c7aaa049e28f Author: Sia Jee Heng Date: Thu Mar 30 14:43:20 2023 +0800 RISC-V: mm: Enable huge page support to kernel_page_present() function Currently kernel_page_present() function doesn't support huge page detection causes the function to mistakenly return false to the hibernation core. Add huge page detection to the function to solve the problem. Fixes: 9e953cda5cdf ("riscv: Introduce huge page support for 32/64bit kernel") Signed-off-by: Sia Jee Heng Reviewed-by: Ley Foon Tan Reviewed-by: Mason Huo Reviewed-by: Andrew Jones Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20230330064321.1008373-4-jeeheng.sia@starfivetech.com Signed-off-by: Palmer Dabbelt commit fcb89863d1b798565db6bdaf8f97f65823c2fd1b Author: Sia Jee Heng Date: Thu Mar 30 14:43:19 2023 +0800 RISC-V: Factor out common code of __cpu_resume_enter() The cpu_resume() function is very similar for the suspend to disk and suspend to ram cases. Factor out the common code into suspend_restore_csrs macro and suspend_restore_regs macro. Signed-off-by: Sia Jee Heng Reviewed-by: Andrew Jones Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230330064321.1008373-3-jeeheng.sia@starfivetech.com Signed-off-by: Palmer Dabbelt commit 0def12f32129c774f2cd598e326cc4b473da927b Author: Sia Jee Heng Date: Thu Mar 30 14:43:18 2023 +0800 RISC-V: Change suspend_save_csrs and suspend_restore_csrs to public function Currently suspend_save_csrs() and suspend_restore_csrs() functions are statically defined in the suspend.c. Change the function's attribute to public so that the functions can be used by hibernation as well. Signed-off-by: Sia Jee Heng Reviewed-by: Ley Foon Tan Reviewed-by: Mason Huo Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230330064321.1008373-2-jeeheng.sia@starfivetech.com Signed-off-by: Palmer Dabbelt commit 1ae78a14516b9372e4c90a89ac21b259339a3a3a Merge: 4e1c80ae5cf45 74d7970febf7e Author: Linus Torvalds Date: Sat Apr 29 11:10:39 2023 -0700 Merge tag '6.4-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd Pull ksmbd server updates from Steve French: - SMB3.1.1 negotiate context fixes and cleanup - new lock_rename_child VFS helper - ksmbd fix to avoid unlink race and to use the new VFS helper to avoid rename race * tag '6.4-rc-ksmbd-server-fixes' of git://git.samba.org/ksmbd: ksmbd: fix racy issue from using ->d_parent and ->d_name ksmbd: remove unused compression negotiate ctx packing ksmbd: avoid duplicate negotiate ctx offset increments ksmbd: set NegotiateContextCount once instead of every inc fs: introduce lock_rename_child() helper ksmbd: remove internal.h include commit 4e1c80ae5cf458792bec9815ee77bc3851046fb8 Merge: 0127f25b5dfcc 9280c57743140 Author: Linus Torvalds Date: Sat Apr 29 11:04:14 2023 -0700 Merge tag 'nfsd-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd updates from Chuck Lever: "The big ticket item for this release is that support for RPC-with-TLS [RFC 9289] has been added to the Linux NFS server. The goal is to provide a simple-to-deploy, low-overhead in-transit confidentiality and peer authentication mechanism. It can supplement NFS Kerberos and it can protect the use of legacy non-cryptographic user authentication flavors such as AUTH_SYS. The TLS Record protocol is handled entirely by kTLS, meaning it can use either software encryption or offload encryption to smart NICs. Aside from that, work continues on improving NFSD's open file cache. Among the many clean-ups in that area is a patch to convert the rhashtable to use the list-hashing version of that data structure" * tag 'nfsd-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: (31 commits) NFSD: Handle new xprtsec= export option SUNRPC: Support TLS handshake in the server-side TCP socket code NFSD: Clean up xattr memory allocation flags NFSD: Fix problem of COMMIT and NFS4ERR_DELAY in infinite loop SUNRPC: Clear rq_xid when receiving a new RPC Call SUNRPC: Recognize control messages in server-side TCP socket code SUNRPC: Be even lazier about releasing pages SUNRPC: Convert svc_xprt_release() to the release_pages() API SUNRPC: Relocate svc_free_res_pages() nfsd: simplify the delayed disposal list code SUNRPC: Ignore return value of ->xpo_sendto SUNRPC: Ensure server-side sockets have a sock->file NFSD: Watch for rq_pages bounds checking errors in nfsd_splice_actor() sunrpc: simplify two-level sysctl registration for svcrdma_parm_table SUNRPC: return proper error from get_expiry() lockd: add some client-side tracepoints nfs: move nfs_fhandle_hash to common include file lockd: server should unlock lock if client rejects the grant lockd: fix races in client GRANTED_MSG wait logic lockd: move struct nlm_wait to lockd.h ... commit 0127f25b5dfcc3d0349eb29d692178183e101652 Merge: 1e098dec61ba3 fbd2a05f29a95 Author: Linus Torvalds Date: Sat Apr 29 10:58:44 2023 -0700 Merge tag 'nfs-for-6.4-1' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client updates from Anna Schumaker: "New Features: - Convert the readdir path to use folios - Convert the NFS fscache code to use netfs Bugfixes and Cleanups: - Always send a RECLAIM_COMPLETE after establishing a lease - Simplify sysctl registrations and other cleanups - Handle out-of-order write replies on NFS v3 - Have sunrpc call_bind_status use standard hard/soft task semantics - Other minor cleanups" * tag 'nfs-for-6.4-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: NFSv4.2: Rework scratch handling for READ_PLUS NFS: Cleanup unused rpc_clnt variable NFS: set varaiable nfs_netfs_debug_id storage-class-specifier to static SUNRPC: remove the maximum number of retries in call_bind_status NFS: Convert readdir page array functions to use a folio NFS: Convert the readdir array-of-pages into an array-of-folios NFSv3: handle out-of-order write replies. NFS: Remove fscache specific trace points and NFS_INO_FSCACHE bit NFS: Remove all NFSIOS_FSCACHE counters due to conversion to netfs API NFS: Convert buffered read paths to use netfs when fscache is enabled NFS: Configure support for netfs when NFS fscache is configured NFS: Rename readpage_async_filler to nfs_read_add_folio sunrpc: simplify one-level sysctl registration for debug_table sunrpc: move sunrpc_table and proc routines above sunrpc: simplify one-level sysctl registration for xs_tunables_table sunrpc: simplify one-level sysctl registration for xr_tunables_table nfs: simplify two-level sysctl registration for nfs_cb_sysctls nfs: simplify two-level sysctl registration for nfs4_cb_sysctls lockd: simplify two-level sysctl registration for nlm_sysctls NFSv4.1: Always send a RECLAIM_COMPLETE after establishing lease commit 1e098dec61ba342c8cebbfdf0fcdcd9ce54f7fa1 Merge: 56c455b38dba4 788ee1605c2e9 Author: Linus Torvalds Date: Sat Apr 29 10:52:37 2023 -0700 Merge tag 'ntfs3_for_6.4' of https://github.com/Paragon-Software-Group/linux-ntfs3 Pull ntfs3 updates from Konstantin Komarov: "New code: - add missed "nocase" in ntfs_show_options - extend information on failures/errors - small optimizations Fixes: - some logic errors - some dead code was removed - code is refactored and reformatted according to the new version of clang-format Code removal: - 'noacsrules' option. Currently, this option does not work properly, and its use leads to unstable results. If we figure out how to implement it without errors, we will add it later - writepage" * tag 'ntfs3_for_6.4' of https://github.com/Paragon-Software-Group/linux-ntfs3: (30 commits) fs/ntfs3: Fix root inode checking fs/ntfs3: Print details about mount fails fs/ntfs3: Add missed "nocase" in ntfs_show_options fs/ntfs3: Code formatting and refactoring fs/ntfs3: Changed ntfs_get_acl() to use dentry fs/ntfs3: Remove field sbi->used.bitmap.set_tail fs/ntfs3: Undo critial modificatins to keep directory consistency fs/ntfs3: Undo endian changes fs/ntfs3: Optimization in ntfs_set_state() fs/ntfs3: Fix ntfs_create_inode() fs/ntfs3: Remove noacsrules fs/ntfs3: Use bh_read to simplify code fs/ntfs3: Fix a possible null-pointer dereference in ni_clear() fs/ntfs3: Refactoring of various minor issues fs/ntfs3: Restore overflow checking for attr size in mi_enum_attr fs/ntfs3: Check for extremely large size of $AttrDef fs/ntfs3: Improved checking of attribute's name length fs/ntfs3: Add null pointer checks fs/ntfs3: fix spelling mistake "attibute" -> "attribute" fs/ntfs3: Add length check in indx_get_root ... commit 56c455b38dba47ae9cb48d71b2a106d769d1a694 Merge: bedf1495271bc 9419092fb2630 Author: Linus Torvalds Date: Sat Apr 29 10:44:27 2023 -0700 Merge tag 'xfs-6.4-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Dave Chinner: "This consists mainly of online scrub functionality and the design documentation for the upcoming online repair functionality built on top of the scrub code: - Added detailed design documentation for the upcoming online repair feature - major update to online scrub to complete the reverse mapping cross-referencing infrastructure enabling us to fully validate allocated metadata against owner records. This is the last piece of scrub infrastructure needed before we can start merging online repair functionality. - Fixes for the ascii-ci hashing issues - deprecation of the ascii-ci functionality - on-disk format verification bug fixes - various random bug fixes for syzbot and other bug reports" * tag 'xfs-6.4-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (107 commits) xfs: fix livelock in delayed allocation at ENOSPC xfs: Extend table marker on deprecated mount options table xfs: fix duplicate includes xfs: fix BUG_ON in xfs_getbmap() xfs: verify buffer contents when we skip log replay xfs: _{attr,data}_map_shared should take ILOCK_EXCL until iread_extents is completely done xfs: remove WARN when dquot cache insertion fails xfs: don't consider future format versions valid xfs: deprecate the ascii-ci feature xfs: test the ascii case-insensitive hash xfs: stabilize the dirent name transformation function used for ascii-ci dir hash computation xfs: cross-reference rmap records with refcount btrees xfs: cross-reference rmap records with inode btrees xfs: cross-reference rmap records with free space btrees xfs: cross-reference rmap records with ag btrees xfs: introduce bitmap type for AG blocks xfs: convert xbitmap to interval tree xfs: drop the _safe behavior from the xbitmap foreach macro xfs: don't load local xattr values during scrub xfs: remove the for_each_xbitmap_ helpers ... commit bedf1495271bc2ea57903762b722f339ea680d0d Merge: b28e6315a0b42 3fd41721cd5c3 Author: Linus Torvalds Date: Sat Apr 29 10:35:48 2023 -0700 Merge tag 'iomap-6.4-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap updates from Darrick Wong: "The only changes for this cycle are the addition of tracepoints to the iomap directio code so that Ritesh (who is working on porting ext2 to iomap) can observe the io flows more easily. Summary: - Remove an unused symbol - Add tracepoints for the directio code" * tag 'iomap-6.4-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: Add DIO tracepoints iomap: Remove IOMAP_DIO_NOSYNC unused dio flag fs.h: Add TRACE_IOCB_STRINGS for use in trace points commit b28e6315a0b42b39351d1953c1c4b54f80855857 Merge: 7d8d20191c855 ec274aff21b6a Author: Linus Torvalds Date: Sat Apr 29 10:29:57 2023 -0700 Merge tag 'dma-mapping-6.4-2023-04-28' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - fix a PageHighMem check in dma-coherent initialization (Doug Berger) - clean up the coherency defaul initialiation (Jiaxun Yang) - add cacheline to user/kernel dma-debug space dump messages (Desnes Nunes, Geert Uytterhoeve) - swiotlb statistics improvements (Michael Kelley) - misc cleanups (Petr Tesarik) * tag 'dma-mapping-6.4-2023-04-28' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: Omit total_used and used_hiwater if !CONFIG_DEBUG_FS swiotlb: track and report io_tlb_used high water marks in debugfs swiotlb: fix debugfs reporting of reserved memory pools swiotlb: relocate PageHighMem test away from rmem_swiotlb_setup of: address: always use dma_default_coherent for default coherency dma-mapping: provide CONFIG_ARCH_DMA_DEFAULT_COHERENT dma-mapping: provide a fallback dma_default_coherent dma-debug: Use %pa to format phys_addr_t dma-debug: add cacheline to user/kernel space dump messages dma-debug: small dma_debug_entry's comment and variable name updates dma-direct: cleanup parameters to dma_direct_optimal_gfp_mask commit 7d8d20191c8557584269b6ba8eae5409564dc84b Merge: 8c1318e4383e4 158009f1b4a33 Author: Linus Torvalds Date: Sat Apr 29 10:24:30 2023 -0700 Merge tag 'timers-core-2023-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull more timer updates from Thomas Gleixner: "Timekeeping and clocksource/event driver updates the second batch: - A trivial documentation fix in the timekeeping core - A really boring set of small fixes, enhancements and cleanups in the drivers code. No new clocksource/clockevent drivers for a change" * tag 'timers-core-2023-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timekeeping: Fix references to nonexistent ktime_get_fast_ns() dt-bindings: timer: rockchip: Add rk3588 compatible dt-bindings: timer: rockchip: Drop superfluous rk3288 compatible clocksource/drivers/ti: Use of_property_read_bool() for boolean properties clocksource/drivers/timer-ti-dm: Fix finding alwon timer clocksource/drivers/davinci: Fix memory leak in davinci_timer_register when init fails clocksource/drivers/stm32-lp: Drop of_match_ptr for ID table clocksource/drivers/timer-ti-dm: Convert to platform remove callback returning void clocksource/drivers/timer-tegra186: Convert to platform remove callback returning void clocksource/drivers/timer-ti-dm: Improve error message in .remove clocksource/drivers/timer-stm32-lp: Mark driver as non-removable clocksource/drivers/sh_mtu2: Mark driver as non-removable clocksource/drivers/timer-ti-dm: Use of_address_to_resource() clocksource/drivers/timer-imx-gpt: Remove non-DT function clocksource/drivers/timer-mediatek: Split out CPUXGPT timers clocksource/drivers/exynos_mct: Explicitly return 0 for shared timer commit 8c1318e4383e400727c700b9db5044162f5bac57 Merge: febf9ee3d2f37 6d2ed653185ba Author: Linus Torvalds Date: Sat Apr 29 10:17:05 2023 -0700 Merge tag 'lsm-pr-20230428' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm Pull lsm fix from Paul Moore: "A single Documentation/LSM fix to update the LSM hook documentation references from lsm_hooks.h to security.c" * tag 'lsm-pr-20230428' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: lsm: move hook comments docs to security/security.c commit febf9ee3d2f37a772802fffb6e17c0e35a52e1f1 Merge: 86e98ed15b3e3 644f17412f5ac Author: Linus Torvalds Date: Sat Apr 29 10:11:32 2023 -0700 Merge tag 'integrity-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity update from Mimi Zohar: "Just one one bug fix. Other integrity changes are being upstreamed via the tpm and lsm trees" * tag 'integrity-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: IMA: allow/fix UML builds commit 86e98ed15b3e34460d1b3095bd119b6fac11841c Merge: cd546fa325161 9403d9cb564b6 Author: Linus Torvalds Date: Sat Apr 29 10:05:22 2023 -0700 Merge tag 'cgroup-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: - cpuset changes including the fix for an incorrect interaction with CPU hotplug and an optimization - Other doc and cosmetic changes * tag 'cgroup-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: docs: cgroup-v1/cpusets: update libcgroup project link cgroup/cpuset: Minor updates to test_cpuset_prs.sh cgroup/cpuset: Include offline CPUs when tasks' cpumasks in top_cpuset are updated cgroup/cpuset: Skip task update if hotplug doesn't affect current cpuset cpuset: Clean up cpuset_node_allowed cgroup: bpf: use cgroup_lock()/cgroup_unlock() wrappers commit cd546fa325161fbe374480a5081b6ebb7d1bec95 Merge: 89d77f71f493a 704bc669e1dda Author: Linus Torvalds Date: Sat Apr 29 09:48:52 2023 -0700 Merge tag 'wq-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue updates from Tejun Heo: "Mostly changes from Petr to improve warning and error reporting. Workqueue now reports more of the relevant failures with better context which should help debugging" * tag 'wq-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Introduce show_freezable_workqueues workqueue: Print backtraces from CPUs with hung CPU bound workqueues workqueue: Warn when a rescuer could not be created workqueue: Interrupted create_worker() is not a repeated event workqueue: Warn when a new worker could not be created workqueue: Fix hung time report of worker pools workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu() MAINTAINERS: Add workqueue_internal.h to the WORKQUEUE entry commit ec570320b09f76d52819e60abdccf372658216b6 Author: Mark Rutland Date: Thu Apr 13 17:06:44 2023 +0100 locking/atomic: Correct (cmp)xchg() instrumentation All xchg() and cmpxchg() ops are atomic RMWs, but currently we instrument these with instrument_atomic_write() rather than instrument_atomic_read_write(), missing the read aspect. Similarly, all try_cmpxchg() ops are non-atomic RMWs on *oldp, but we instrument these accesses with instrument_atomic_write() rather than instrument_read_write(), missing the read aspect and erroneously marking these as atomic. Fix the instrumentation for both points. Signed-off-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20230413160644.490976-1-mark.rutland@arm.com Cc: Linus Torvalds commit 5cd4c268412f802e71b7722c3ec4638b0fe04acd Author: Uros Bizjak Date: Wed Apr 5 16:17:09 2023 +0200 locking/x86: Define arch_try_cmpxchg_local() Define target specific arch_try_cmpxchg_local(). This definition overrides the generic arch_try_cmpxchg_local() fallback definition and enables target-specific implementation of try_cmpxchg_local(). Signed-off-by: Uros Bizjak Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230405141710.3551-5-ubizjak@gmail.com Cc: Linus Torvalds commit d994f2c8e2410ebcb928df67baa6f04e29bc9d3e Author: Uros Bizjak Date: Wed Apr 5 16:17:08 2023 +0200 locking/arch: Wire up local_try_cmpxchg() Implement target specific support for local_try_cmpxchg() and local_cmpxchg() using typed C wrappers that call their _local counterpart and provide additional checking of their input arguments. Signed-off-by: Uros Bizjak Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230405141710.3551-4-ubizjak@gmail.com Cc: Linus Torvalds commit 8fc4fddaf9a184eea7da21290236a1764e608a01 Author: Uros Bizjak Date: Wed Apr 5 16:17:07 2023 +0200 locking/generic: Wire up local{,64}_try_cmpxchg() Implement generic support for local{,64}_try_cmpxchg(). Redirect to the atomic_ family of functions when the target does not provide its own local.h definitions. For 64-bit targets, implement local64_try_cmpxchg and local64_cmpxchg using typed C wrappers that call local_ family of functions and provide additional checking of their input arguments. Signed-off-by: Uros Bizjak Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20230405141710.3551-3-ubizjak@gmail.com Cc: Linus Torvalds commit e6ce9d741163af0b846637ce6550ae8a671b1588 Author: Uros Bizjak Date: Wed Apr 5 16:17:06 2023 +0200 locking/atomic: Add generic try_cmpxchg{,64}_local() support Add generic support for try_cmpxchg{,64}_local() and their falbacks. These provides the generic try_cmpxchg_local family of functions from the arch_ prefixed version, also adding explicit instrumentation. Signed-off-by: Uros Bizjak Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20230405141710.3551-2-ubizjak@gmail.com Cc: Linus Torvalds commit 286deb7ec03d941664ac3ffaff58814b454adf65 Author: Sebastian Andrzej Siewior Date: Tue Mar 21 17:11:40 2023 +0100 locking/rwbase: Mitigate indefinite writer starvation On PREEMPT_RT, rw_semaphore and rwlock_t locks are unfair to writers. Readers can indefinitely acquire the lock unless the writer fully acquired the lock, which might never happen if there is always a reader in the critical section owning the lock. Mel Gorman reported that since LTP-20220121 the dio_truncate test case went from having 1 reader to having 16 readers and that number of readers is sufficient to prevent the down_write ever succeeding while readers exist. Eventually the test is killed after 30 minutes as a failure. Mel proposed a timeout to limit how long a writer can be blocked until the reader is forced into the slowpath. Thomas argued that there is no added value by providing this timeout. From a PREEMPT_RT point of view, there are no critical rw_semaphore or rwlock_t locks left where the reader must be preferred. Mitigate indefinite writer starvation by forcing the READER into the slowpath once the WRITER attempts to acquire the lock. Reported-by: Mel Gorman Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Mel Gorman Link: https://lore.kernel.org/877cwbq4cq.ffs@tglx Link: https://lore.kernel.org/r/20230321161140.HMcQEhHb@linutronix.de Cc: Linus Torvalds commit 068550631fbe0b7fb41625cea6fb204fdc8cb224 Author: Andrzej Hajda Date: Wed Jan 18 16:44:44 2023 +0100 locking/arch: Rename all internal __xchg() names to __arch_xchg() Decrease the probability of this internal facility to be used by driver code. Signed-off-by: Andrzej Hajda Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Arnd Bergmann Reviewed-by: Andi Shyti Acked-by: Geert Uytterhoeven [m68k] Acked-by: Palmer Dabbelt [riscv] Link: https://lore.kernel.org/r/20230118154450.73842-1-andrzej.hajda@intel.com Cc: Linus Torvalds commit 10f67d1fd275528e62109de2ece26371833638e5 Author: Christophe JAILLET Date: Wed Apr 26 08:52:49 2023 +0200 watchdog: dw_wdt: Simplify clk management Use devm_clk_get_enabled() instead of hand-writing it. This saves some LoC. Signed-off-by: Christophe JAILLET Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/f6094c55cacf9637d835cd49290d9e888faeb0f7.1682491863.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 7f5390750645756bd5da2b24fac285f2654dd922 Author: Christophe JAILLET Date: Wed Apr 26 08:52:48 2023 +0200 watchdog: dw_wdt: Fix the error handling path of dw_wdt_drv_probe() The commit in Fixes has only updated the remove function and missed the error handling path of the probe. Add the missing reset_control_assert() call. Fixes: 65a3b6935d92 ("watchdog: dw_wdt: get reset lines from dt") Signed-off-by: Christophe JAILLET Reviewed-by: Philipp Zabel Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/fbb650650bbb33a8fa2fd028c23157bedeed50e1.1682491863.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit b23c1f807cb20a9a4c42b63c3d80f63b045a43ef Author: Xingyu Wu Date: Thu Apr 27 15:44:00 2023 +0800 watchdog: starfive: Fix the warning of starfive_wdt_match Drop the function of of_match_ptr() to fix the warning of unused variable 'starfive_wdt_match'. Fixes: db728ea9c7be ("drivers: watchdog: Add StarFive Watchdog driver") Signed-off-by: Xingyu Wu Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230427074400.55380-1-xingyu.wu@starfivetech.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 90211b58828924577b589e59814f53aec4557fb9 Author: Xingyu Wu Date: Wed Apr 26 11:12:16 2023 +0800 watchdog: starfive: Fix the probe return error if PM and early_enable are both disabled When the starfive watchdog driver uses 'pm_runtime_put_sync()' as probe return value at last and 'early_enable' is disabled, it could return the error '-ENOSYS' if the CONFIG_PM is disabled, but the driver should works normally. Drop the 'return' and keep the 'pm_runtime_put_sync()', but do not use it as the return value. Fixes: db728ea9c7be ("drivers: watchdog: Add StarFive Watchdog driver") Signed-off-by: Xingyu Wu Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230426031216.37981-1-xingyu.wu@starfivetech.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 9be11a69315e26363a4de8930bc50d0901a96775 Author: Steve French Date: Sun Apr 23 01:19:28 2023 -0500 cifs: update internal module version number for cifs.ko From 2.42 to 2.43 Signed-off-by: Steve French commit 2fe187dca6030dd5dbecfe38e9610544d46e8c02 Author: Steve French Date: Fri Apr 28 00:41:58 2023 -0500 smb3: move some common open context structs to smbfs_common create durable and create durable reconnect context and the maximal access create context struct definitions can be put in common code in smbfs_common Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 1149c8467ddebfb6bb9aab37830f70a49cab7085 Author: Steve French Date: Fri Apr 28 00:21:10 2023 -0500 smb3: make query_on_disk_id open context consistent and move to common code cifs and ksmbd were using a slightly different version of the query_on_disk_id struct which could be confusing. Use the ksmbd version of this struct, and move it to common code. Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit c09ba02cfaf35732f7e36f291dd9679a6f109a12 Author: Steve French Date: Thu Apr 27 12:45:54 2023 -0500 SMB3.1.1: add new tree connect ShareFlags Also update these flag names in a few places to match the simpler easier to understand names now used in the protocol documentation (see MS-SMB2 section 2.2.10) Acked-by: Bharath SM Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 943fb67b090212f1d3789eb7796b1c9045c62fd6 Author: Steve French Date: Wed Apr 26 22:01:31 2023 -0500 cifs: missing lock when updating session status Coverity noted a place where we were not grabbing the ses_lock when setting (and checking) ses_status. Addresses-Coverity: 1536833 ("Data race condition (MISSING_LOCK)") Reviewed-by: Paulo Alcantara (SUSE) Reviewed-by: Bharath SM Signed-off-by: Steve French commit 06bff3d98cf2cfef225f8190bb679f3f8cb89912 Author: Ian Rogers Date: Fri Apr 28 00:37:27 2023 -0700 perf stat: Disable TopdownL1 on hybrid Bugs with event parsing, event grouping and metrics causes the TopdownL1 metricgroup to crash the perf command. Temporarily disable the group if no events/metrics are spcecified. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Ahmad Yasin Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Caleb Biggers Cc: Edward Baker Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kang Minchul Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Samantha Alt Cc: Stephane Eranian Cc: Sumanth Korikkar Cc: Suzuki Poulouse Cc: Thomas Richter Cc: Tiezhu Yang Cc: Weilin Wang Cc: Xing Zhengjun Cc: Yang Jihong Link: https://lore.kernel.org/r/20230428073809.1803624-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0463ca3d7159bb86efa6f36ca70a41bb711bc6f8 Author: Ian Rogers Date: Wed Apr 26 00:00:17 2023 -0700 perf stat: Avoid SEGV on counter->name Switch to use evsel__name() that doesn't return NULL for hardware and similar events. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Ahmad Yasin Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Caleb Biggers Cc: Edward Baker Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kang Minchul Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Samantha Alt Cc: Stephane Eranian Cc: Sumanth Korikkar Cc: Suzuki Poulouse Cc: Thomas Richter Cc: Tiezhu Yang Cc: Weilin Wang Cc: Xing Zhengjun Cc: Yang Jihong Link: https://lore.kernel.org/r/20230426070050.1315519-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 89d77f71f493a3663b10fa812d17f472935d24be Merge: b23c1376db2db b09313dd2e726 Author: Linus Torvalds Date: Fri Apr 28 16:55:39 2023 -0700 Merge tag 'riscv-for-linus-6.4-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: - Support for runtime detection of the Svnapot extension - Support for Zicboz when clearing pages - We've moved to GENERIC_ENTRY - Support for !MMU on rv32 systems - The linear region is now mapped via huge pages - Support for building relocatable kernels - Support for the hwprobe interface - Various fixes and cleanups throughout the tree * tag 'riscv-for-linus-6.4-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (57 commits) RISC-V: hwprobe: Explicity check for -1 in vdso init RISC-V: hwprobe: There can only be one first riscv: Allow to downgrade paging mode from the command line dt-bindings: riscv: add sv57 mmu-type RISC-V: hwprobe: Remove __init on probe_vendor_features() riscv: Use --emit-relocs in order to move .rela.dyn in init riscv: Check relocations at compile time powerpc: Move script to check relocations at compile time in scripts/ riscv: Introduce CONFIG_RELOCATABLE riscv: Move .rela.dyn outside of init to avoid empty relocations riscv: Prepare EFI header for relocatable kernels riscv: Unconditionnally select KASAN_VMALLOC if KASAN riscv: Fix ptdump when KASAN is enabled riscv: Fix EFI stub usage of KASAN instrumented strcmp function riscv: Move DTB_EARLY_BASE_VA to the kernel address space riscv: Rework kasan population functions riscv: Split early and final KASAN population functions riscv: Use PUD/P4D/PGD pages for the linear mapping riscv: Move the linear mapping creation in its own function riscv: Get rid of riscv_pfn_base variable ... commit b23c1376db2dbbf784906bbcc8db81c304fa76a7 Merge: 70cc1b5307e8e 8ab89e9563161 Author: Linus Torvalds Date: Fri Apr 28 16:37:54 2023 -0700 Merge tag 'm68knommu-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu updates from Greg Ungerer: "A couple of minor changes. One to remove the long dead uclinux.org web address and email list from the MAINTAINERS entry for UCLINUX. The other to remove dead config options in the m68knommu Kconfig" * tag 'm68knommu-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: Kconfig.machine: remove obsolete configs ROMBASE and ROMSIZE MAINTAINERS: drop uclinux.org commit 70cc1b5307e8ee3076fdf2ecbeb89eb973aa0ff7 Merge: 5ea8abf589f29 169f8997968ab Author: Linus Torvalds Date: Fri Apr 28 16:24:32 2023 -0700 Merge tag 'powerpc-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: - Add support for building the kernel using PC-relative addressing on Power10. - Allow HV KVM guests on Power10 to use prefixed instructions. - Unify support for the P2020 CPU (85xx) into a single machine description. - Always build the 64-bit kernel with 128-bit long double. - Drop support for several obsolete 2000's era development boards as identified by Paul Gortmaker. - A series fixing VFIO on Power since some generic changes. - Various other small features and fixes. Thanks to Alexey Kardashevskiy, Andrew Donnellan, Benjamin Gray, Bo Liu, Christophe Leroy, Dan Carpenter, David Binderman, Ira Weiny, Joel Stanley, Kajol Jain, Kautuk Consul, Liang He, Luis Chamberlain, Masahiro Yamada, Michael Neuling, Nathan Chancellor, Nathan Lynch, Nicholas Miehlbradt, Nicholas Piggin, Nick Desaulniers, Nysal Jan K.A, Pali Rohár, Paul Gortmaker, Paul Mackerras, Petr Vaněk, Randy Dunlap, Rob Herring, Sachin Sant, Sean Christopherson, Segher Boessenkool, and Timothy Pearson. * tag 'powerpc-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (156 commits) powerpc/64s: Disable pcrel code model on Clang powerpc: Fix merge conflict between pcrel and copy_thread changes powerpc/configs/powernv: Add IGB=y powerpc/configs/64s: Drop JFS Filesystem powerpc/configs/64s: Use EXT4 to mount EXT2 filesystems powerpc/configs: Make pseries_defconfig an alias for ppc64le_guest powerpc/configs: Make pseries_le an alias for ppc64le_guest powerpc/configs: Incorporate generic kvm_guest.config into guest configs powerpc/configs: Add IBMVETH=y and IBMVNIC=y to guest configs powerpc/configs/64s: Enable Device Mapper options powerpc/configs/64s: Enable PSTORE powerpc/configs/64s: Enable VLAN support powerpc/configs/64s: Enable BLK_DEV_NVME powerpc/configs/64s: Drop REISERFS powerpc/configs/64s: Use SHA512 for module signatures powerpc/configs/64s: Enable IO_STRICT_DEVMEM powerpc/configs/64s: Enable SCHEDSTATS powerpc/configs/64s: Enable DEBUG_VM & other options powerpc/configs/64s: Enable EMULATED_STATS powerpc/configs/64s: Enable KUNIT and most tests ... commit 5ea8abf589f2974d65460a1ffa0c303763e958da Merge: d579c468d7ad6 82253a271aae9 Author: Linus Torvalds Date: Fri Apr 28 16:11:26 2023 -0700 Merge tag 'trace-tools-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing tools updates from Steven Rostedt: - Add auto-analysis only option to rtla/timerlat Add an --aa-only option to the tooling to perform only the auto analysis and not to parse and format the data. - Other minor fixes and clean ups * tag 'trace-tools-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: rtla/timerlat: Fix "Previous IRQ" auto analysis' line rtla/timerlat: Add auto-analysis only option rv: Remove redundant assignment to variable retval rv: Fix addition on an uninitialized variable 'run' rtla: Add .gitignore file commit d579c468d7ad6e37f5b4290b0244a9a5a7d3c4bf Merge: f20730efbd305 675751bb20634 Author: Linus Torvalds Date: Fri Apr 28 15:57:53 2023 -0700 Merge tag 'trace-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing updates from Steven Rostedt: - User events are finally ready! After lots of collaboration between various parties, we finally locked down on a stable interface for user events that can also work with user space only tracing. This is implemented by telling the kernel (or user space library, but that part is user space only and not part of this patch set), where the variable is that the application uses to know if something is listening to the trace. There's also an interface to tell the kernel about these events, which will show up in the /sys/kernel/tracing/events/user_events/ directory, where it can be enabled. When it's enabled, the kernel will update the variable, to tell the application to start writing to the kernel. See https://lwn.net/Articles/927595/ - Cleaned up the direct trampolines code to simplify arm64 addition of direct trampolines. Direct trampolines use the ftrace interface but instead of jumping to the ftrace trampoline, applications (mostly BPF) can register their own trampoline for performance reasons. - Some updates to the fprobe infrastructure. fprobes are more efficient than kprobes, as it does not need to save all the registers that kprobes on ftrace do. More work needs to be done before the fprobes will be exposed as dynamic events. - More updates to references to the obsolete path of /sys/kernel/debug/tracing for the new /sys/kernel/tracing path. - Add a seq_buf_do_printk() helper to seq_bufs, to print a large buffer line by line instead of all at once. There are users in production kernels that have a large data dump that originally used printk() directly, but the data dump was larger than what printk() allowed as a single print. Using seq_buf() to do the printing fixes that. - Add /sys/kernel/tracing/touched_functions that shows all functions that was every traced by ftrace or a direct trampoline. This is used for debugging issues where a traced function could have caused a crash by a bpf program or live patching. - Add a "fields" option that is similar to "raw" but outputs the fields of the events. It's easier to read by humans. - Some minor fixes and clean ups. * tag 'trace-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (41 commits) ring-buffer: Sync IRQ works before buffer destruction tracing: Add missing spaces in trace_print_hex_seq() ring-buffer: Ensure proper resetting of atomic variables in ring_buffer_reset_online_cpus recordmcount: Fix memory leaks in the uwrite function tracing/user_events: Limit max fault-in attempts tracing/user_events: Prevent same address and bit per process tracing/user_events: Ensure bit is cleared on unregister tracing/user_events: Ensure write index cannot be negative seq_buf: Add seq_buf_do_printk() helper tracing: Fix print_fields() for __dyn_loc/__rel_loc tracing/user_events: Set event filter_type from type ring-buffer: Clearly check null ptr returned by rb_set_head_page() tracing: Unbreak user events tracing/user_events: Use print_format_fields() for trace output tracing/user_events: Align structs with tabs for readability tracing/user_events: Limit global user_event count tracing/user_events: Charge event allocs to cgroups tracing/user_events: Update documentation for ABI tracing/user_events: Use write ABI in example tracing/user_events: Add ABI self-test ... commit f20730efbd305d42eded761f6fbd9a59d6125228 Merge: 586b222d748e9 5c3124975e15c Author: Linus Torvalds Date: Fri Apr 28 15:03:43 2023 -0700 Merge tag 'smp-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull SMP cross-CPU function-call updates from Ingo Molnar: - Remove diagnostics and adjust config for CSD lock diagnostics - Add a generic IPI-sending tracepoint, as currently there's no easy way to instrument IPI origins: it's arch dependent and for some major architectures it's not even consistently available. * tag 'smp-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: trace,smp: Trace all smp_function_call*() invocations trace: Add trace_ipi_send_cpu() sched, smp: Trace smp callback causing an IPI smp: reword smp call IPI comment treewide: Trace IPIs sent via smp_send_reschedule() irq_work: Trace self-IPIs sent via arch_irq_work_raise() smp: Trace IPIs sent via arch_send_call_function_ipi_mask() sched, smp: Trace IPIs sent via send_call_function_single_ipi() trace: Add trace_ipi_send_cpumask() kernel/smp: Make csdlock_debug= resettable locking/csd_lock: Remove per-CPU data indirection from CSD lock debugging locking/csd_lock: Remove added data from CSD lock debugging locking/csd_lock: Add Kconfig option for csd_debug default commit 586b222d748e91c619d68e9239654ebc7fed9b0c Merge: 7c339778f9088 f31dcb152a3d0 Author: Linus Torvalds Date: Fri Apr 28 14:53:30 2023 -0700 Merge tag 'sched-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: - Allow unprivileged PSI poll()ing - Fix performance regression introduced by mm_cid - Improve livepatch stalls by adding livepatch task switching to cond_resched(). This resolves livepatching busy-loop stalls with certain CPU-bound kthreads - Improve sched_move_task() performance on autogroup configs - On core-scheduling CPUs, avoid selecting throttled tasks to run - Misc cleanups, fixes and improvements * tag 'sched-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/clock: Fix local_clock() before sched_clock_init() sched/rt: Fix bad task migration for rt tasks sched: Fix performance regression introduced by mm_cid sched/core: Make sched_dynamic_mutex static sched/psi: Allow unprivileged polling of N*2s period sched/psi: Extract update_triggers side effect sched/psi: Rename existing poll members in preparation sched/psi: Rearrange polling code in preparation sched/fair: Fix inaccurate tally of ttwu_move_affine vhost: Fix livepatch timeouts in vhost_worker() livepatch,sched: Add livepatch task switching to cond_resched() livepatch: Skip task_call_func() for current task livepatch: Convert stack entries array to percpu sched: Interleave cfs bandwidth timers for improved single thread performance at low utilization sched/core: Reduce cost of sched_move_task when config autogroup sched/core: Avoid selecting the task that is throttled to run when core-sched enable sched/topology: Make sched_energy_mutex,update static commit 7c339778f908875772c17f2e04ed731aac772881 Merge: 2aff7c706c748 743767d6f6b8f Author: Linus Torvalds Date: Fri Apr 28 14:41:53 2023 -0700 Merge tag 'perf-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: - Add Intel Granite Rapids support - Add uncore events for Intel SPR IMC PMU - Fix perf IRQ throttling bug * tag 'perf-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/uncore: Add events for Intel SPR IMC PMU perf/core: Fix hardlockup failure caused by perf throttle perf/x86/cstate: Add Granite Rapids support perf/x86/msr: Add Granite Rapids perf/x86/intel: Add Granite Rapids commit 2aff7c706c7483f4895ca250c92c1d71e45b6e82 Merge: 22b8cc3e78f54 611d4c716db01 Author: Linus Torvalds Date: Fri Apr 28 14:02:54 2023 -0700 Merge tag 'objtool-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool updates from Ingo Molnar: - Mark arch_cpu_idle_dead() __noreturn, make all architectures & drivers that did this inconsistently follow this new, common convention, and fix all the fallout that objtool can now detect statically - Fix/improve the ORC unwinder becoming unreliable due to UNWIND_HINT_EMPTY ambiguity, split it into UNWIND_HINT_END_OF_STACK and UNWIND_HINT_UNDEFINED to resolve it - Fix noinstr violations in the KCSAN code and the lkdtm/stackleak code - Generate ORC data for __pfx code - Add more __noreturn annotations to various kernel startup/shutdown and panic functions - Misc improvements & fixes * tag 'objtool-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (52 commits) x86/hyperv: Mark hv_ghcb_terminate() as noreturn scsi: message: fusion: Mark mpt_halt_firmware() __noreturn x86/cpu: Mark {hlt,resume}_play_dead() __noreturn btrfs: Mark btrfs_assertfail() __noreturn objtool: Include weak functions in global_noreturns check cpu: Mark nmi_panic_self_stop() __noreturn cpu: Mark panic_smp_self_stop() __noreturn arm64/cpu: Mark cpu_park_loop() and friends __noreturn x86/head: Mark *_start_kernel() __noreturn init: Mark start_kernel() __noreturn init: Mark [arch_call_]rest_init() __noreturn objtool: Generate ORC data for __pfx code x86/linkage: Fix padding for typed functions objtool: Separate prefix code from stack validation code objtool: Remove superfluous dead_end_function() check objtool: Add symbol iteration helpers objtool: Add WARN_INSN() scripts/objdump-func: Support multiple functions context_tracking: Fix KCSAN noinstr violation objtool: Add stackleak instrumentation to uaccess safe list ... commit fbd2a05f29a95d5b42b294bf47e55a711424965b Author: Anna Schumaker Date: Thu Apr 6 15:16:52 2023 -0400 NFSv4.2: Rework scratch handling for READ_PLUS Instead of using a tiny, static scratch buffer, we should use a kmalloc()-ed buffer that is allocated when checking for read plus usage. This lets us use the buffer before decoding any part of the READ_PLUS operation instead of setting it right before segment decoding, meaning it should be a little more robust. Signed-off-by: Anna Schumaker commit ca29699a57ecee6084a4056f5bfd6f11dd359a71 Author: Jianhua Lu Date: Thu Apr 27 20:21:32 2023 +0800 dt-bindings: display/msm: dsi-controller-main: Document qcom, master-dsi and qcom, sync-dual-dsi This fixes warning: sm8250-xiaomi-elish-csot.dtb: dsi@ae94000: Unevaluated properties are not allowed ('qcom,master-dsi', 'qcom,sync-dual-dsi' were unexpected) Reviewed-by: Dmitry Baryshkov Acked-by: Rob Herring Signed-off-by: Jianhua Lu Fixes: 4dbe55c97741 ("dt-bindings: msm: dsi: add yaml schemas for DSI bindings") Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/534306/ Link: https://lore.kernel.org/r/20230427122132.24840-1-lujianhua000@gmail.com Signed-off-by: Abhinav Kumar commit 25feda6fbd0cfefcb69308fb20d4d4815a107c5e Author: Kees Cook Date: Sat Feb 4 10:43:10 2023 -0800 drm/nouveau/disp: More DP_RECEIVER_CAP_SIZE array fixes More arrays (and arguments) for dcpd were set to 16, when it looks like DP_RECEIVER_CAP_SIZE (15) should be used. Fix the remaining cases, seen with GCC 13: ../drivers/gpu/drm/nouveau/nvif/outp.c: In function 'nvif_outp_acquire_dp': ../include/linux/fortify-string.h:57:33: warning: array subscript 'unsigned char[16][0]' is partly outside array bounds of 'u8[15]' {aka 'unsigned char[15]'} [-Warray-bounds=] 57 | #define __underlying_memcpy __builtin_memcpy | ^ ... ../drivers/gpu/drm/nouveau/nvif/outp.c:140:9: note: in expansion of macro 'memcpy' 140 | memcpy(args.dp.dpcd, dpcd, sizeof(args.dp.dpcd)); | ^~~~~~ ../drivers/gpu/drm/nouveau/nvif/outp.c:130:49: note: object 'dpcd' of size [0, 15] 130 | nvif_outp_acquire_dp(struct nvif_outp *outp, u8 dpcd[DP_RECEIVER_CAP_SIZE], | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 813443721331 ("drm/nouveau/disp: move DP link config into acquire") Cc: Ben Skeggs Cc: Lyude Paul Cc: Karol Herbst Cc: David Airlie Cc: Daniel Vetter Cc: Dave Airlie Cc: "Gustavo A. R. Silva" Cc: dri-devel@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Reviewed-by: Karol Herbst Signed-off-by: Karol Herbst Link: https://patchwork.freedesktop.org/patch/msgid/20230204184307.never.825-kees@kernel.org commit 8176080d59e6d4ff9fc97ae534063073b4f7a715 Author: Tao Su Date: Fri Apr 28 12:51:49 2023 +0800 block: Skip destroyed blkg when restart in blkg_destroy_all() Kernel hang in blkg_destroy_all() when total blkg greater than BLKG_DESTROY_BATCH_SIZE, because of not removing destroyed blkg in blkg_list. So the size of blkg_list is same after destroying a batch of blkg, and the infinite 'restart' occurs. Since blkg should stay on the queue list until blkg_free_workfn(), skip destroyed blkg when restart a new round, which will solve this kernel hang issue and satisfy the previous will to restart. Reported-by: Xiangfei Ma Tested-by: Xiangfei Ma Tested-by: Farrah Chen Signed-off-by: Tao Su Fixes: f1c006f1c685 ("blk-cgroup: synchronize pd_free_fn() from blkg_free_workfn() and blkcg_deactivate_policy()") Suggested-and-reviewed-by: Yu Kuai Link: https://lore.kernel.org/r/20230428045149.1310073-1-tao1.su@linux.intel.com Signed-off-by: Jens Axboe commit 21e26d5e54ab7cfe6b488fd27d4d70956d07e03b Author: Eric Van Hensbergen Date: Wed Apr 26 16:18:49 2023 +0000 fs/9p: Fix bit operation logic error This re-introduces a fix that somehow got dropped during rebase of the current series in for-next. When writeback is enabled, opens are forced to support both read and write operations but with the logic error other flags may be dropped unintentionaly. Reported-by: Christophe Jaillet Signed-off-by: Eric Van Hensbergen commit d4fab7b28e2f5d74790d47a8d298da0abfb5132f Author: Theodore Ts'o Date: Thu Apr 27 23:01:41 2023 -0400 ext4: clean up error handling in __ext4_fill_super() There were two ways to return an error code; one was via setting the 'err' variable, and the second, if err was zero, was via the 'ret' variable. This was both confusing and fragile, and when code was factored out of __ext4_fill_super(), some of the error codes returned by the original code was replaced by -EINVAL, and in one case, the error code was placed by 0, triggering a kernel null pointer dereference. Clean this up by removing the 'ret' variable, leaving only one way to set the error code to be returned, and restore the errno codes that were returned via the the mount system call as they were before we started refactoring __ext4_fill_super(). Signed-off-by: Theodore Ts'o Reviewed-by: Jason Yan commit 3b50d5018ed06a647bb26c44bb5ae74e59c903c7 Author: Theodore Ts'o Date: Thu Apr 27 22:49:34 2023 -0400 ext4: reflect error codes from ext4_multi_mount_protect() to its callers This will allow more fine-grained errno codes to be returned by the mount system call. Cc: Andreas Dilger Signed-off-by: Theodore Ts'o commit d5e72c4e3256335d6fb75c2e321144f93141f4f5 Author: Theodore Ts'o Date: Thu Apr 27 19:18:01 2023 -0400 ext4: fix lost error code reporting in __ext4_fill_super() When code was factored out of __ext4_fill_super() into ext4_percpu_param_init() the error return was discarded. This meant that it was possible for __ext4_fill_super() to return zero, indicating success, without the struct super getting completely filled in, leading to a potential NULL pointer dereference. Reported-by: syzbot+bbf0f9a213c94f283a5c@syzkaller.appspotmail.com Fixes: 1f79467c8a6b ("ext4: factor out ext4_percpu_param_init() ...") Link: https://syzkaller.appspot.com/bug?id=6dac47d5e58af770c0055f680369586ec32e144c Signed-off-by: Theodore Ts'o Reviewed-by: Jason Yan commit 856dd6c5981260b4d1aa84b78373ad54a203db48 Author: Nathan Chancellor Date: Thu Apr 20 09:51:24 2023 -0700 ext4: fix unused iterator variable warnings When CONFIG_QUOTA is disabled, there are warnings around unused iterator variables: fs/ext4/super.c: In function 'ext4_put_super': fs/ext4/super.c:1262:13: error: unused variable 'i' [-Werror=unused-variable] 1262 | int i, err; | ^ fs/ext4/super.c: In function '__ext4_fill_super': fs/ext4/super.c:5200:22: error: unused variable 'i' [-Werror=unused-variable] 5200 | unsigned int i; | ^ cc1: all warnings being treated as errors The kernel has updated to GNU11, allowing the variables to be declared within the for loop. Do so to clear up the warnings. Fixes: dcbf87589d90 ("ext4: factor out ext4_flex_groups_free()") Signed-off-by: Nathan Chancellor Reviewed-by: Geert Uytterhoeven Reviewed-by: Jan Kara Reviewed-by: Jason Yan Link: https://lore.kernel.org/r/20230420-ext4-unused-variables-super-c-v1-1-138b6db6c21c@kernel.org Signed-off-by: Theodore Ts'o commit 835659598c67907b98cd2aa57bb951dfaf675c69 Author: Ye Bin Date: Thu Apr 6 11:16:27 2023 +0000 ext4: fix use-after-free read in ext4_find_extent for bigalloc + inline Syzbot found the following issue: loop0: detected capacity change from 0 to 2048 EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 without journal. Quota mode: none. ================================================================== BUG: KASAN: use-after-free in ext4_ext_binsearch_idx fs/ext4/extents.c:768 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0x76e/0xd90 fs/ext4/extents.c:931 Read of size 4 at addr ffff888073644750 by task syz-executor420/5067 CPU: 0 PID: 5067 Comm: syz-executor420 Not tainted 6.2.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x290 lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:306 print_report+0x107/0x1f0 mm/kasan/report.c:417 kasan_report+0xcd/0x100 mm/kasan/report.c:517 ext4_ext_binsearch_idx fs/ext4/extents.c:768 [inline] ext4_find_extent+0x76e/0xd90 fs/ext4/extents.c:931 ext4_clu_mapped+0x117/0x970 fs/ext4/extents.c:5809 ext4_insert_delayed_block fs/ext4/inode.c:1696 [inline] ext4_da_map_blocks fs/ext4/inode.c:1806 [inline] ext4_da_get_block_prep+0x9e8/0x13c0 fs/ext4/inode.c:1870 ext4_block_write_begin+0x6a8/0x2290 fs/ext4/inode.c:1098 ext4_da_write_begin+0x539/0x760 fs/ext4/inode.c:3082 generic_perform_write+0x2e4/0x5e0 mm/filemap.c:3772 ext4_buffered_write_iter+0x122/0x3a0 fs/ext4/file.c:285 ext4_file_write_iter+0x1d0/0x18f0 call_write_iter include/linux/fs.h:2186 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7dc/0xc50 fs/read_write.c:584 ksys_write+0x177/0x2a0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f4b7a9737b9 RSP: 002b:00007ffc5cac3668 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f4b7a9737b9 RDX: 00000000175d9003 RSI: 0000000020000200 RDI: 0000000000000004 RBP: 00007f4b7a933050 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000079f R11: 0000000000000246 R12: 00007f4b7a9330e0 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Above issue is happens when enable bigalloc and inline data feature. As commit 131294c35ed6 fixed delayed allocation bug in ext4_clu_mapped for bigalloc + inline. But it only resolved issue when has inline data, if inline data has been converted to extent(ext4_da_convert_inline_data_to_extent) before writepages, there is no EXT4_STATE_MAY_INLINE_DATA flag. However i_data is still store inline data in this scene. Then will trigger UAF when find extent. To resolve above issue, there is need to add judge "ext4_has_inline_data(inode)" in ext4_clu_mapped(). Fixes: 131294c35ed6 ("ext4: fix delayed allocation bug in ext4_clu_mapped for bigalloc + inline") Reported-by: syzbot+bf4bb7731ef73b83a3b4@syzkaller.appspotmail.com Reviewed-by: Jan Kara Reviewed-by: Ye Bin Reviewed-by: Tudor Ambarus Tested-by: Tudor Ambarus Link: https://lore.kernel.org/r/20230406111627.1916759-1-tudor.ambarus@linaro.org Signed-off-by: Theodore Ts'o commit 22b8cc3e78f5448b4c5df00303817a9137cd663f Merge: 7b664cc38ea7b 97740266de26e Author: Linus Torvalds Date: Fri Apr 28 09:43:49 2023 -0700 Merge tag 'x86_mm_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 LAM (Linear Address Masking) support from Dave Hansen: "Add support for the new Linear Address Masking CPU feature. This is similar to ARM's Top Byte Ignore and allows userspace to store metadata in some bits of pointers without masking it out before use" * tag 'x86_mm_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/iommu/sva: Do not allow to set FORCE_TAGGED_SVA bit from outside x86/mm/iommu/sva: Fix error code for LAM enabling failure due to SVA selftests/x86/lam: Add test cases for LAM vs thread creation selftests/x86/lam: Add ARCH_FORCE_TAGGED_SVA test cases for linear-address masking selftests/x86/lam: Add inherit test cases for linear-address masking selftests/x86/lam: Add io_uring test cases for linear-address masking selftests/x86/lam: Add mmap and SYSCALL test cases for linear-address masking selftests/x86/lam: Add malloc and tag-bits test cases for linear-address masking x86/mm/iommu/sva: Make LAM and SVA mutually exclusive iommu/sva: Replace pasid_valid() helper with mm_valid_pasid() mm: Expose untagging mask in /proc/$PID/status x86/mm: Provide arch_prctl() interface for LAM x86/mm: Reduce untagged_addr() overhead for systems without LAM x86/uaccess: Provide untagged_addr() and remove tags before address check mm: Introduce untagged_addr_remote() x86/mm: Handle LAM on context switch x86: CPUID and CR3/CR4 flags for Linear Address Masking x86: Allow atomic MM_CONTEXT flags setting x86/mm: Rework address range check in get_user() and put_user() commit 3e46c89c74f2c38e5337d2cf44b0b551adff1cb4 Author: Maxim Korotkov Date: Thu Jan 19 13:44:43 2023 +0300 writeback: fix call of incorrect macro the variable 'history' is of type u16, it may be an error that the hweight32 macro was used for it I guess macro hweight16 should be used Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 2a81490811d0 ("writeback: implement foreign cgroup inode detection") Signed-off-by: Maxim Korotkov Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230119104443.3002-1-korotkov.maxim.s@gmail.com Signed-off-by: Jens Axboe commit f40c153afee1e50ed46c2dc22e09940e21699acf Merge: 952aa344bf430 b1211978ecf19 Author: Jens Axboe Date: Fri Apr 28 10:36:27 2023 -0600 Merge tag 'md-next-2023-04-28' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.4/block Pull MD fixes from Song: "1. Improve raid5 sequential IO performance on spinning disks, which fixes a regression since v6.0, by Jan Kara. 2. Fix bitmap offset types, which fixes an issue introduced in this merge window, by Jonathan Derrick." * tag 'md-next-2023-04-28' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: Fix bitmap offset type in sb writer md/raid5: Improve performance for sequential IO commit 7b664cc38ea7bdd5e3ce018bba98583741921bd4 Merge: e54debe657109 7a3a401874bea Author: Linus Torvalds Date: Fri Apr 28 09:36:09 2023 -0700 Merge tag 'x86_tdx_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 tdx update from Dave Hansen: "The original tdx hypercall assembly code took two flags in %RSI to tweak its behavior at runtime. PeterZ recently axed one flag in commit e80a48bade61 ("x86/tdx: Remove TDX_HCALL_ISSUE_STI"). Kill the other flag too and tweak the 'output' mode with an assembly macro instead. This results in elimination of one push/pop pair and overall easier to read assembly. - Do conditional __tdx_hypercall() 'output' processing via an assembly macro argument rather than a runtime register" * tag 'x86_tdx_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/tdx: Drop flags from __tdx_hypercall() commit e54debe657109f1728312f9cb5ccae6f737b7dd1 Merge: 4980c176a7170 5fbff26075575 Author: Linus Torvalds Date: Fri Apr 28 09:32:34 2023 -0700 Merge tag 'x86_fpu_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fpu updates from Dave Hansen: "There's no _actual_ kernel functionality here. This expands the documentation around AMX support including some code examples. The example code also exposed the fact that hardware architecture constants as part of the ABI, but there's no easy place that they get defined for apps. Adding them to a uabi header will eventually make life easier for consumers of the ABI. Summary: - Improve AMX documentation along with example code - Explicitly make some hardware constants part of the uabi" * tag 'x86_fpu_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Documentation/x86: Explain the state component permission for guests Documentation/x86: Add the AMX enabling example x86/arch_prctl: Add AMX feature numbers as ABI constants Documentation/x86: Explain the purpose for dynamic features commit 4980c176a71706f3621d5c1674266de54a689cb1 Merge: 682f7bbad29c0 322b72e0fd101 Author: Linus Torvalds Date: Fri Apr 28 09:30:51 2023 -0700 Merge tag 'x86_cache_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 resctrl update from Dave Hansen: "Reduce redundant counter reads with resctrl refactoring" * tag 'x86_cache_for_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Avoid redundant counter read in __mon_event_count() commit 682f7bbad29c0e5f59929ad69e1ed8525feb96d3 Merge: 33afd4b763936 5462ade6871e9 Author: Linus Torvalds Date: Fri Apr 28 09:22:30 2023 -0700 Merge tag 'x86_cleanups_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Borislav Petkov: - Unify duplicated __pa() and __va() definitions - Simplify sysctl tables registration - Remove unused symbols - Correct function name in comment * tag 'x86_cleanups_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Centralize __pa()/__va() definitions x86: Simplify one-level sysctl registration for itmt_kern_table x86: Simplify one-level sysctl registration for abi_table2 x86/platform/intel-mid: Remove unused definitions from intel-mid.h x86/uaccess: Remove memcpy_page_flushcache() x86/entry: Change stale function name in comment to error_return() commit b1211978ecf19bceb63a04f53fea4b5d73832a4a Author: Jonathan Derrick Date: Mon Apr 24 19:14:38 2023 -0600 md: Fix bitmap offset type in sb writer Bitmap offset is allowed to be negative, indicating that bitmap precedes metadata. Change the type back from sector_t to loff_t to satisfy conditionals and calculations. Reported-by: Dan Carpenter Link: https://lore.kernel.org/linux-raid/CAPhsuW6HuaUJ5WcyPajVgUfkQFYp2D_cy1g6qxN4CU_gP2=z7g@mail.gmail.com/ Fixes: 10172f200b67 ("md: Fix types in sb writer") Signed-off-by: Jonathan Derrick Suggested-by: Yu Kuai Reviewed-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230425011438.71046-1-jonathan.derrick@linux.dev commit fc05e06e6098ca2c28f7a10da0e00aeea20fa59e Author: Jan Kara Date: Mon Apr 17 19:15:37 2023 +0200 md/raid5: Improve performance for sequential IO Commit 7e55c60acfbb ("md/raid5: Pivot raid5_make_request()") changed the order in which requests for underlying disks are created. Since for large sequential IO adding of requests frequently races with md_raid5 thread submitting bios to underlying disks, this results in a change in IO pattern because intermediate states of new order of request creation result in more smaller discontiguous requests. For RAID5 on top of three rotational disks our performance testing revealed this results in regression in write throughput: iozone -a -s 131072000 -y 4 -q 8 -i 0 -i 1 -R before 7e55c60acfbb: KB reclen write rewrite read reread 131072000 4 493670 525964 524575 513384 131072000 8 540467 532880 512028 513703 after 7e55c60acfbb: KB reclen write rewrite read reread 131072000 4 421785 456184 531278 509248 131072000 8 459283 456354 528449 543834 To reduce the amount of discontiguous requests we can start generating requests with the stripe with the lowest chunk offset as that has the best chance of being adjacent to IO queued previously. This improves the performance to: KB reclen write rewrite read reread 131072000 4 497682 506317 518043 514559 131072000 8 514048 501886 506453 504319 restoring big part of the regression. Fixes: 7e55c60acfbb ("md/raid5: Pivot raid5_make_request()") Cc: stable@vger.kernel.org # v6.0+ Signed-off-by: Jan Kara Reviewed-by: Logan Gunthorpe Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230417171537.17899-1-jack@suse.cz commit 6d2ed653185baa5ba601306cbd6cd7192642045d Author: Randy Dunlap Date: Thu Apr 27 20:09:16 2023 -0700 lsm: move hook comments docs to security/security.c Fix one kernel-doc warning, but invesigating that led to other kernel-doc movement (lsm_hooks.h to security.c) that needs to be fixed also. include/linux/lsm_hooks.h:1: warning: no structured comments found Fixes: e261301c851a ("lsm: move the remaining LSM hook comments to security/security.c") Fixes: 1cd2aca64a5d ("lsm: move the io_uring hook comments to security/security.c") Fixes: 452b670c7222 ("lsm: move the perf hook comments to security/security.c") Fixes: 55e853201a9e ("lsm: move the bpf hook comments to security/security.c") Fixes: b14faf9c94a6 ("lsm: move the audit hook comments to security/security.c") Fixes: 1427ddbe5cc1 ("lsm: move the binder hook comments to security/security.c") Fixes: 43fad2821876 ("lsm: move the sysv hook comments to security/security.c") Fixes: ecc419a44535 ("lsm: move the key hook comments to security/security.c") Fixes: 742b99456e86 ("lsm: move the xfrm hook comments to security/security.c") Fixes: ac318aed5498 ("lsm: move the Infiniband hook comments to security/security.c") Fixes: 4a49f592e931 ("lsm: move the SCTP hook comments to security/security.c") Fixes: 6b6bbe8c02a1 ("lsm: move the socket hook comments to security/security.c") Fixes: 2c2442fd46cd ("lsm: move the AF_UNIX hook comments to security/security.c") Fixes: 2bcf51bf2f03 ("lsm: move the netlink hook comments to security/security.c") Fixes: 130c53bfee4b ("lsm: move the task hook comments to security/security.c") Fixes: a0fd6480de48 ("lsm: move the file hook comments to security/security.c") Fixes: 9348944b775d ("lsm: move the kernfs hook comments to security/security.c") Fixes: 916e32584dfa ("lsm: move the inode hook comments to security/security.c") Fixes: 08526a902cc4 ("lsm: move the filesystem hook comments to security/security.c") Fixes: 36819f185590 ("lsm: move the fs_context hook comments to security/security.c") Fixes: 1661372c912d ("lsm: move the program execution hook comments to security/security.c") Signed-off-by: Randy Dunlap Cc: Paul Moore Cc: James Morris Cc: "Serge E. Hallyn" Cc: linux-security-module@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: KP Singh Cc: bpf@vger.kernel.org Signed-off-by: Paul Moore commit 631003e2333c12cc1b52df06a707365b7363a159 Author: Naohiro Aota Date: Tue Apr 18 17:45:24 2023 +0900 btrfs: zoned: fix wrong use of bitops API in btrfs_ensure_empty_zones find_next_bit and find_next_zero_bit take @size as the second parameter and @offset as the third parameter. They are specified opposite in btrfs_ensure_empty_zones(). Thanks to the later loop, it never failed to detect the empty zones. Fix them and (maybe) return the result a bit faster. Note: the naming is a bit confusing, size has two meanings here, bitmap and our range size. Fixes: 1cd6121f2a38 ("btrfs: zoned: implement zoned chunk allocator") CC: stable@vger.kernel.org # 5.15+ Signed-off-by: Naohiro Aota Signed-off-by: David Sterba commit 1dedde690303c05ef732b7c5c8356fdf60a4ade3 Author: Zhihao Cheng Date: Tue Mar 21 09:37:21 2023 +0800 ext4: fix i_disksize exceeding i_size problem in paritally written case It is possible for i_disksize can exceed i_size, triggering a warning. generic_perform_write copied = iov_iter_copy_from_user_atomic(len) // copied < len ext4_da_write_end | ext4_update_i_disksize | new_i_size = pos + copied; | WRITE_ONCE(EXT4_I(inode)->i_disksize, newsize) // update i_disksize | generic_write_end | copied = block_write_end(copied, len) // copied = 0 | if (unlikely(copied < len)) | if (!PageUptodate(page)) | copied = 0; | if (pos + copied > inode->i_size) // return false if (unlikely(copied == 0)) goto again; if (unlikely(iov_iter_fault_in_readable(i, bytes))) { status = -EFAULT; break; } We get i_disksize greater than i_size here, which could trigger WARNING check 'i_size_read(inode) < EXT4_I(inode)->i_disksize' while doing dio: ext4_dio_write_iter iomap_dio_rw __iomap_dio_rw // return err, length is not aligned to 512 ext4_handle_inode_extension WARN_ON_ONCE(i_size_read(inode) < EXT4_I(inode)->i_disksize) // Oops WARNING: CPU: 2 PID: 2609 at fs/ext4/file.c:319 CPU: 2 PID: 2609 Comm: aa Not tainted 6.3.0-rc2 RIP: 0010:ext4_file_write_iter+0xbc7 Call Trace: vfs_write+0x3b1 ksys_write+0x77 do_syscall_64+0x39 Fix it by updating 'copied' value before updating i_disksize just like ext4_write_inline_data_end() does. A reproducer can be found in the buganizer link below. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217209 Fixes: 64769240bd07 ("ext4: Add delayed allocation support in data=writeback mode") Signed-off-by: Zhihao Cheng Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230321013721.89818-1-chengzhihao1@huawei.com Signed-off-by: Theodore Ts'o commit 64b5d5b2852661284ccbb038c697562cc56231bf Author: Qu Wenruo Date: Thu Apr 27 09:45:32 2023 +0800 btrfs: properly reject clear_cache and v1 cache for block-group-tree [BUG] With block-group-tree feature enabled, mounting it with clear_cache would cause the following transaction abort at mount or remount: BTRFS info (device dm-4): force clearing of disk cache BTRFS info (device dm-4): using free space tree BTRFS info (device dm-4): auto enabling async discard BTRFS info (device dm-4): clearing free space tree BTRFS info (device dm-4): clearing compat-ro feature flag for FREE_SPACE_TREE (0x1) BTRFS info (device dm-4): clearing compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2) BTRFS error (device dm-4): block-group-tree feature requires fres-space-tree and no-holes BTRFS error (device dm-4): super block corruption detected before writing it to disk BTRFS: error (device dm-4) in write_all_supers:4288: errno=-117 Filesystem corrupted (unexpected superblock corruption detected) BTRFS warning (device dm-4: state E): Skipping commit of aborted transaction. [CAUSE] For block-group-tree feature, we have an artificial dependency on free-space-tree. This means if we detect block-group-tree without v2 cache, we consider it a corruption and cause the problem. For clear_cache mount option, it would temporary disable v2 cache, then re-enable it. But unfortunately for that temporary v2 cache disabled status, we refuse to write a superblock with bg tree only flag, thus leads to the above transaction abortion. [FIX] For now, just reject clear_cache and v1 cache mount option for block group tree. So now we got a graceful rejection other than a transaction abort: BTRFS info (device dm-4): force clearing of disk cache BTRFS error (device dm-4): cannot disable free space tree with block-group-tree feature BTRFS error (device dm-4): open_ctree failed CC: stable@vger.kernel.org # 6.1+ Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit a2cea677db6099d71c9f70de7f907d3d7e6bec3b Author: Filipe Manana Date: Wed Apr 26 11:51:36 2023 +0100 btrfs: print extent buffers when sibling keys check fails When trying to move keys from one node/leaf to another sibling node/leaf, if the sibling keys check fails we just print an error message with the last key of the left sibling and the first key of the right sibling. However it's also useful to print all the keys of each sibling, as it may provide some clues to what went wrong, which code path may be inserting keys in an incorrect order. So just do that, print the siblings with btrfs_print_tree(), as it works for both leaves and nodes. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9ae5afd02a03d4e22a17a9609b19400b77c36273 Author: Filipe Manana Date: Wed Apr 26 11:51:35 2023 +0100 btrfs: abort transaction when sibling keys check fails for leaves If the sibling keys check fails before we move keys from one sibling leaf to another, we are not aborting the transaction - we leave that to some higher level caller of btrfs_search_slot() (or anything else that uses it to insert items into a b+tree). This means that the transaction abort will provide a stack trace that omits the b+tree modification call chain. So change this to immediately abort the transaction and therefore get a more useful stack trace that shows us the call chain in the bt+tree modification code. It's also important to immediately abort the transaction just in case some higher level caller is not doing it, as this indicates a very serious corruption and we should stop the possibility of doing further damage. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 611ccc58e1f2ccd4a85258a646d5f9b4d5b1b4f6 Author: Filipe Manana Date: Wed Apr 26 18:13:00 2023 +0100 btrfs: fix leak of source device allocation state after device replace When a device replace finishes, the source device is freed by calling btrfs_free_device() at btrfs_rm_dev_replace_free_srcdev(), but the allocation state, tracked in the device's alloc_state io tree, is never freed. This is a regression recently introduced by commit f0bb5474cff0 ("btrfs: remove redundant release of btrfs_device::alloc_state"), which removed a call to extent_io_tree_release() from btrfs_free_device(), with the rationale that btrfs_close_one_device() already releases the allocation state from a device and btrfs_close_one_device() is always called before a device is freed with btrfs_free_device(). However that is not true for the device replace case, as btrfs_free_device() is called without any previous call to btrfs_close_one_device(). The issue is trivial to reproduce, for example, by running test btrfs/027 from fstests: $ ./check btrfs/027 $ rmmod btrfs $ dmesg (...) [84519.395485] BTRFS info (device sdc): dev_replace from (devid 2) to /dev/sdg started [84519.466224] BTRFS info (device sdc): dev_replace from (devid 2) to /dev/sdg finished [84519.552251] BTRFS info (device sdc): scrub: started on devid 1 [84519.552277] BTRFS info (device sdc): scrub: started on devid 2 [84519.552332] BTRFS info (device sdc): scrub: started on devid 3 [84519.552705] BTRFS info (device sdc): scrub: started on devid 4 [84519.604261] BTRFS info (device sdc): scrub: finished on devid 4 with status: 0 [84519.609374] BTRFS info (device sdc): scrub: finished on devid 3 with status: 0 [84519.610818] BTRFS info (device sdc): scrub: finished on devid 1 with status: 0 [84519.610927] BTRFS info (device sdc): scrub: finished on devid 2 with status: 0 [84559.503795] BTRFS: state leak: start 1048576 end 1351614463 state 1 in tree 1 refs 1 [84559.506764] BTRFS: state leak: start 1048576 end 1347420159 state 1 in tree 1 refs 1 [84559.510294] BTRFS: state leak: start 1048576 end 1351614463 state 1 in tree 1 refs 1 So fix this by adding back the call to extent_io_tree_release() at btrfs_free_device(). Fixes: f0bb5474cff0 ("btrfs: remove redundant release of btrfs_device::alloc_state") Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit ac868bc9d136cde6e3eb5de77019a63d57a540ff Author: xiaoshoukui Date: Thu Apr 13 05:55:07 2023 -0400 btrfs: fix assertion of exclop condition when starting balance Balance as exclusive state is compatible with paused balance and device add, which makes some things more complicated. The assertion of valid states when starting from paused balance needs to take into account two more states, the combinations can be hit when there are several threads racing to start balance and device add. This won't typically happen when the commands are started from command line. Scenario 1: With exclusive_operation state == BTRFS_EXCLOP_NONE. Concurrently adding multiple devices to the same mount point and btrfs_exclop_finish executed finishes before assertion in btrfs_exclop_balance, exclusive_operation will changed to BTRFS_EXCLOP_NONE state which lead to assertion failed: fs_info->exclusive_operation == BTRFS_EXCLOP_BALANCE || fs_info->exclusive_operation == BTRFS_EXCLOP_DEV_ADD, in fs/btrfs/ioctl.c:456 Call Trace: btrfs_exclop_balance+0x13c/0x310 ? memdup_user+0xab/0xc0 ? PTR_ERR+0x17/0x20 btrfs_ioctl_add_dev+0x2ee/0x320 btrfs_ioctl+0x9d5/0x10d0 ? btrfs_ioctl_encoded_write+0xb80/0xb80 __x64_sys_ioctl+0x197/0x210 do_syscall_64+0x3c/0xb0 entry_SYSCALL_64_after_hwframe+0x63/0xcd Scenario 2: With exclusive_operation state == BTRFS_EXCLOP_BALANCE_PAUSED. Concurrently adding multiple devices to the same mount point and btrfs_exclop_balance executed finish before the latter thread execute assertion in btrfs_exclop_balance, exclusive_operation will changed to BTRFS_EXCLOP_BALANCE_PAUSED state which lead to assertion failed: fs_info->exclusive_operation == BTRFS_EXCLOP_BALANCE || fs_info->exclusive_operation == BTRFS_EXCLOP_DEV_ADD || fs_info->exclusive_operation == BTRFS_EXCLOP_NONE, fs/btrfs/ioctl.c:458 Call Trace: btrfs_exclop_balance+0x240/0x410 ? memdup_user+0xab/0xc0 ? PTR_ERR+0x17/0x20 btrfs_ioctl_add_dev+0x2ee/0x320 btrfs_ioctl+0x9d5/0x10d0 ? btrfs_ioctl_encoded_write+0xb80/0xb80 __x64_sys_ioctl+0x197/0x210 do_syscall_64+0x3c/0xb0 entry_SYSCALL_64_after_hwframe+0x63/0xcd An example of the failed assertion is below, which shows that the paused balance is also needed to be checked. root@syzkaller:/home/xsk# ./repro Failed to add device /dev/vda, errno 14 Failed to add device /dev/vda, errno 14 Failed to add device /dev/vda, errno 14 Failed to add device /dev/vda, errno 14 Failed to add device /dev/vda, errno 14 Failed to add device /dev/vda, errno 14 Failed to add device /dev/vda, errno 14 Failed to add device /dev/vda, errno 14 Failed to add device /dev/vda, errno 14 [ 416.611428][ T7970] BTRFS info (device loop0): fs_info exclusive_operation: 0 Failed to add device /dev/vda, errno 14 [ 416.613973][ T7971] BTRFS info (device loop0): fs_info exclusive_operation: 3 Failed to add device /dev/vda, errno 14 [ 416.615456][ T7972] BTRFS info (device loop0): fs_info exclusive_operation: 3 Failed to add device /dev/vda, errno 14 [ 416.617528][ T7973] BTRFS info (device loop0): fs_info exclusive_operation: 3 Failed to add device /dev/vda, errno 14 [ 416.618359][ T7974] BTRFS info (device loop0): fs_info exclusive_operation: 3 Failed to add device /dev/vda, errno 14 [ 416.622589][ T7975] BTRFS info (device loop0): fs_info exclusive_operation: 3 Failed to add device /dev/vda, errno 14 [ 416.624034][ T7976] BTRFS info (device loop0): fs_info exclusive_operation: 3 Failed to add device /dev/vda, errno 14 [ 416.626420][ T7977] BTRFS info (device loop0): fs_info exclusive_operation: 3 Failed to add device /dev/vda, errno 14 [ 416.627643][ T7978] BTRFS info (device loop0): fs_info exclusive_operation: 3 Failed to add device /dev/vda, errno 14 [ 416.629006][ T7979] BTRFS info (device loop0): fs_info exclusive_operation: 3 [ 416.630298][ T7980] BTRFS info (device loop0): fs_info exclusive_operation: 3 Failed to add device /dev/vda, errno 14 Failed to add device /dev/vda, errno 14 [ 416.632787][ T7981] BTRFS info (device loop0): fs_info exclusive_operation: 3 Failed to add device /dev/vda, errno 14 [ 416.634282][ T7982] BTRFS info (device loop0): fs_info exclusive_operation: 3 Failed to add device /dev/vda, errno 14 [ 416.636202][ T7983] BTRFS info (device loop0): fs_info exclusive_operation: 3 [ 416.637012][ T7984] BTRFS info (device loop0): fs_info exclusive_operation: 1 Failed to add device /dev/vda, errno 14 [ 416.637759][ T7984] assertion failed: fs_info->exclusive_operation == BTRFS_EXCLOP_BALANCE || fs_info->exclusive_operation == BTRFS_EXCLOP_DEV_ADD || fs_info->exclusive_operation == BTRFS_EXCLOP_NONE, in fs/btrfs/ioctl.c:458 [ 416.639845][ T7984] invalid opcode: 0000 [#1] PREEMPT SMP KASAN [ 416.640485][ T7984] CPU: 0 PID: 7984 Comm: repro Not tainted 6.2.0 #7 [ 416.641172][ T7984] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 [ 416.642090][ T7984] RIP: 0010:btrfs_assertfail+0x2c/0x2e [ 416.644423][ T7984] RSP: 0018:ffffc90003ea7e28 EFLAGS: 00010282 [ 416.645018][ T7984] RAX: 00000000000000cc RBX: 0000000000000000 RCX: 0000000000000000 [ 416.645763][ T7984] RDX: ffff88801d030000 RSI: ffffffff81637e7c RDI: fffff520007d4fb7 [ 416.646554][ T7984] RBP: ffffffff8a533de0 R08: 00000000000000cc R09: 0000000000000000 [ 416.647299][ T7984] R10: 0000000000000001 R11: 0000000000000001 R12: ffffffff8a533da0 [ 416.648041][ T7984] R13: 00000000000001ca R14: 000000005000940a R15: 0000000000000000 [ 416.648785][ T7984] FS: 00007fa2985d4640(0000) GS:ffff88802cc00000(0000) knlGS:0000000000000000 [ 416.649616][ T7984] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 416.650238][ T7984] CR2: 0000000000000000 CR3: 0000000018e5e000 CR4: 0000000000750ef0 [ 416.650980][ T7984] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 416.651725][ T7984] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 416.652502][ T7984] PKRU: 55555554 [ 416.652888][ T7984] Call Trace: [ 416.653241][ T7984] [ 416.653527][ T7984] btrfs_exclop_balance+0x240/0x410 [ 416.654036][ T7984] ? memdup_user+0xab/0xc0 [ 416.654465][ T7984] ? PTR_ERR+0x17/0x20 [ 416.654874][ T7984] btrfs_ioctl_add_dev+0x2ee/0x320 [ 416.655380][ T7984] btrfs_ioctl+0x9d5/0x10d0 [ 416.655822][ T7984] ? btrfs_ioctl_encoded_write+0xb80/0xb80 [ 416.656400][ T7984] __x64_sys_ioctl+0x197/0x210 [ 416.656874][ T7984] do_syscall_64+0x3c/0xb0 [ 416.657346][ T7984] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 416.657922][ T7984] RIP: 0033:0x4546af [ 416.660170][ T7984] RSP: 002b:00007fa2985d4150 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 416.660972][ T7984] RAX: ffffffffffffffda RBX: 00007fa2985d4640 RCX: 00000000004546af [ 416.661714][ T7984] RDX: 0000000000000000 RSI: 000000005000940a RDI: 0000000000000003 [ 416.662449][ T7984] RBP: 00007fa2985d41d0 R08: 0000000000000000 R09: 00007ffee37a4c4f [ 416.663195][ T7984] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fa2985d4640 [ 416.663951][ T7984] R13: 0000000000000009 R14: 000000000041b320 R15: 00007fa297dd4000 [ 416.664703][ T7984] [ 416.665040][ T7984] Modules linked in: [ 416.665590][ T7984] ---[ end trace 0000000000000000 ]--- [ 416.666176][ T7984] RIP: 0010:btrfs_assertfail+0x2c/0x2e [ 416.668775][ T7984] RSP: 0018:ffffc90003ea7e28 EFLAGS: 00010282 [ 416.669425][ T7984] RAX: 00000000000000cc RBX: 0000000000000000 RCX: 0000000000000000 [ 416.670235][ T7984] RDX: ffff88801d030000 RSI: ffffffff81637e7c RDI: fffff520007d4fb7 [ 416.671050][ T7984] RBP: ffffffff8a533de0 R08: 00000000000000cc R09: 0000000000000000 [ 416.671867][ T7984] R10: 0000000000000001 R11: 0000000000000001 R12: ffffffff8a533da0 [ 416.672685][ T7984] R13: 00000000000001ca R14: 000000005000940a R15: 0000000000000000 [ 416.673501][ T7984] FS: 00007fa2985d4640(0000) GS:ffff88802cc00000(0000) knlGS:0000000000000000 [ 416.674425][ T7984] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 416.675114][ T7984] CR2: 0000000000000000 CR3: 0000000018e5e000 CR4: 0000000000750ef0 [ 416.675933][ T7984] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 416.676760][ T7984] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Link: https://lore.kernel.org/linux-btrfs/20230324031611.98986-1-xiaoshoukui@gmail.com/ CC: stable@vger.kernel.org # 6.1+ Signed-off-by: xiaoshoukui Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6f932d4ef007d6a4ae03badcb749fbb8f49196f6 Author: Filipe Manana Date: Wed Apr 12 11:33:09 2023 +0100 btrfs: fix btrfs_prev_leaf() to not return the same key twice A call to btrfs_prev_leaf() may end up returning a path that points to the same item (key) again. This happens if while btrfs_prev_leaf(), after we release the path, a concurrent insertion happens, which moves items off from a sibling into the front of the previous leaf, and an item with the computed previous key does not exists. For example, suppose we have the two following leaves: Leaf A ------------------------------------------------------------- | ... key (300 96 10) key (300 96 15) key (300 96 16) | ------------------------------------------------------------- slot 20 slot 21 slot 22 Leaf B ------------------------------------------------------------- | key (300 96 20) key (300 96 21) key (300 96 22) ... | ------------------------------------------------------------- slot 0 slot 1 slot 2 If we call btrfs_prev_leaf(), from btrfs_previous_item() for example, with a path pointing to leaf B and slot 0 and the following happens: 1) At btrfs_prev_leaf() we compute the previous key to search as: (300 96 19), which is a key that does not exists in the tree; 2) Then we call btrfs_release_path() at btrfs_prev_leaf(); 3) Some other task inserts a key at leaf A, that sorts before the key at slot 20, for example it has an objectid of 299. In order to make room for the new key, the key at slot 22 is moved to the front of leaf B. This happens at push_leaf_right(), called from split_leaf(). After this leaf B now looks like: -------------------------------------------------------------------------------- | key (300 96 16) key (300 96 20) key (300 96 21) key (300 96 22) ... | -------------------------------------------------------------------------------- slot 0 slot 1 slot 2 slot 3 4) At btrfs_prev_leaf() we call btrfs_search_slot() for the computed previous key: (300 96 19). Since the key does not exists, btrfs_search_slot() returns 1 and with a path pointing to leaf B and slot 1, the item with key (300 96 20); 5) This makes btrfs_prev_leaf() return a path that points to slot 1 of leaf B, the same key as before it was called, since the key at slot 0 of leaf B (300 96 16) is less than the computed previous key, which is (300 96 19); 6) As a consequence btrfs_previous_item() returns a path that points again to the item with key (300 96 20). For some users of btrfs_prev_leaf() or btrfs_previous_item() this may not be functional a problem, despite not making sense to return a new path pointing again to the same item/key. However for a caller such as tree-log.c:log_dir_items(), this has a bad consequence, as it can result in not logging some dir index deletions in case the directory is being logged without holding the inode's VFS lock (logging triggered while logging a child inode for example) - for the example scenario above, in case the dir index keys 17, 18 and 19 were deleted in the current transaction. CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 0c8862de05c1a087795ee0a87bf61a6394306cc0 Author: Jarkko Sakkinen Date: Wed Apr 26 21:49:37 2023 +0300 tpm: Re-enable TPM chip boostrapping non-tpm_tis TPM drivers TPM chip bootstrapping was removed from tpm_chip_register(), and it was relocated to tpm_tis_core. This breaks all drivers which are not based on tpm_tis because the chip will not get properly initialized. Take the corrective steps: 1. Rename tpm_chip_startup() as tpm_chip_bootstrap() and make it one-shot. 2. Call tpm_chip_bootstrap() in tpm_chip_register(), which reverts the things as tehy used to be. Cc: Lino Sanfilippo Fixes: 548eb516ec0f ("tpm, tpm_tis: startup chip before testing for interrupts") Reported-by: Pengfei Xu Link: https://lore.kernel.org/all/ZEjqhwHWBnxcaRV5@xpf.sh.intel.com/ Tested-by: Pengfei Xu Signed-off-by: Jarkko Sakkinen commit 4140aafcff167b5b9e8dae6a1709a6de7cac6f74 Author: Olivier Bacon Date: Thu Apr 20 11:00:35 2023 -0400 crypto: engine - fix crypto_queue backlog handling CRYPTO_TFM_REQ_MAY_BACKLOG tells the crypto driver that it should internally backlog requests until the crypto hw's queue becomes full. At that point, crypto_engine backlogs the request and returns -EBUSY. Calling driver such as dm-crypt then waits until the complete() function is called with a status of -EINPROGRESS before sending a new request. The problem lies in the call to complete() with a value of -EINPROGRESS that is made when a backlog item is present on the queue. The call is done before the successful execution of the crypto request. In the case that do_one_request() returns < 0 and the retry support is available, the request is put back in the queue. This leads upper drivers to send a new request even if the queue is still full. The problem can be reproduced by doing a large dd into a crypto dm-crypt device. This is pretty easy to see when using Freescale CAAM crypto driver and SWIOTLB dma. Since the actual amount of requests that can be hold in the queue is unlimited we get IOs error and dma allocation. The fix is to call complete with a value of -EINPROGRESS only if the request is not enqueued back in crypto_queue. This is done by calling complete() later in the code. In order to delay the decision, crypto_queue is modified to correctly set the backlog pointer when a request is enqueued back. Fixes: 6a89f492f8e5 ("crypto: engine - support for parallel requests based on retry mechanism") Co-developed-by: Sylvain Ouellet Signed-off-by: Sylvain Ouellet Signed-off-by: Olivier Bacon Signed-off-by: Herbert Xu commit 8fd91151ebcb21b3f2f2bf158ac6092192550b2b Author: Christophe JAILLET Date: Mon Apr 17 22:25:09 2023 +0200 crypto: sun8i-ss - Fix a test in sun8i_ss_setup_ivs() SS_ENCRYPTION is (0 << 7 = 0), so the test can never be true. Use a direct comparison to SS_ENCRYPTION instead. The same king of test is already done the same way in sun8i_ss_run_task(). Fixes: 359e893e8af4 ("crypto: sun8i-ss - rework handling of IV") Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu commit 9d2f38638a145f0c6102bee6533204aa3e5a9c07 Author: Oswald Buddenhagen Date: Fri Apr 28 10:07:32 2023 +0200 ALSA: emu10k1: use more existing defines instead of open-coded numbers Using the *_MASK defines for "maximal value" is debatable. I got the idea from FreeBSD, and it sorta makes sense to me. Some hunks look a bit incomplete, because code that is going to be subsequently removed is not touched here. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230428080732.1697695-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 6686317855c6997671982d4489ccdd946f644957 Author: Angelo Dureghello Date: Wed Apr 26 22:28:15 2023 +0200 net: dsa: mv88e6xxx: add mv88e6321 rsvd2cpu Add rsvd2cpu capability for mv88e6321 model, to allow proper bpdu processing. Signed-off-by: Angelo Dureghello Fixes: 51c901a775621 ("net: dsa: mv88e6xxx: distinguish Global 2 Rsvd2CPU") Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit dc6456e938e938d64ffb6383a286b2ac9790a37f Author: Antoine Tenart Date: Thu Apr 27 11:21:59 2023 +0200 net: ipv6: fix skb hash for some RST packets The skb hash comes from sk->sk_txhash when using TCP, except for some IPv6 RST packets. This is because in tcp_v6_send_reset when not in TIME_WAIT the hash is taken from sk->sk_hash, while it should come from sk->sk_txhash as those two hashes are not computed the same way. Packetdrill script to test the above, 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 +0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 +0 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress) +0 > (flowlabel 0x1) S 0:0(0) <...> // Wrong ack seq, trigger a rst. +0 < S. 0:0(0) ack 0 win 4000 // Check the flowlabel matches prior one from SYN. +0 > (flowlabel 0x1) R 0:0(0) <...> Fixes: 9258b8b1be2e ("ipv6: tcp: send consistent autoflowlabel in RST packets") Signed-off-by: Antoine Tenart Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 46ef24c60f8ee70662968ac55325297ed4624d61 Author: Andrea Mayer Date: Thu Apr 27 11:49:23 2023 +0200 selftests: srv6: make srv6_end_dt46_l3vpn_test more robust On some distributions, the rp_filter is automatically set (=1) by default on a netdev basis (also on VRFs). In an SRv6 End.DT46 behavior, decapsulated IPv4 packets are routed using the table associated with the VRF bound to that tunnel. During lookup operations, the rp_filter can lead to packet loss when activated on the VRF. Therefore, we chose to make this selftest more robust by explicitly disabling the rp_filter during tests (as it is automatically set by some Linux distributions). Fixes: 03a0b567a03d ("selftests: seg6: add selftest for SRv6 End.DT46 Behavior") Reported-by: Hangbin Liu Signed-off-by: Andrea Mayer Tested-by: Hangbin Liu Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 042334a8d424a1917e916e611a8dda7f8caf1491 Author: wuych Date: Thu Apr 27 18:25:31 2023 +0800 atlantic:hw_atl2:hw_atl2_utils_fw: Remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: wuych Signed-off-by: David S. Miller commit c88f8d5cd95fd039cff95d682b8e71100c001df0 Author: Cong Wang Date: Wed Apr 26 23:00:06 2023 -0700 sit: update dev->needed_headroom in ipip6_tunnel_bind_dev() When a tunnel device is bound with the underlying device, its dev->needed_headroom needs to be updated properly. IPv4 tunnels already do the same in ip_tunnel_bind_dev(). Otherwise we may not have enough header room for skb, especially after commit b17f709a2401 ("gue: TX support for using remote checksum offload option"). Fixes: 32b8a8e59c9c ("sit: add IPv4 over IPv4 support") Reported-by: Palash Oswal Link: https://lore.kernel.org/netdev/CAGyP=7fDcSPKu6nttbGwt7RXzE3uyYxLjCSE97J64pRxJP8jPA@mail.gmail.com/ Cc: Kuniyuki Iwashima Cc: Eric Dumazet Signed-off-by: Cong Wang Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Signed-off-by: David S. Miller commit da94a7781fc3c92e7df7832bc2746f4d39bc624e Author: Vlad Buslov Date: Wed Apr 26 14:31:11 2023 +0200 net/sched: cls_api: remove block_cb from driver_list before freeing Error handler of tcf_block_bind() frees the whole bo->cb_list on error. However, by that time the flow_block_cb instances are already in the driver list because driver ndo_setup_tc() callback is called before that up the call chain in tcf_block_offload_cmd(). This leaves dangling pointers to freed objects in the list and causes use-after-free[0]. Fix it by also removing flow_block_cb instances from driver_list before deallocating them. [0]: [ 279.868433] ================================================================== [ 279.869964] BUG: KASAN: slab-use-after-free in flow_block_cb_setup_simple+0x631/0x7c0 [ 279.871527] Read of size 8 at addr ffff888147e2bf20 by task tc/2963 [ 279.873151] CPU: 6 PID: 2963 Comm: tc Not tainted 6.3.0-rc6+ #4 [ 279.874273] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 279.876295] Call Trace: [ 279.876882] [ 279.877413] dump_stack_lvl+0x33/0x50 [ 279.878198] print_report+0xc2/0x610 [ 279.878987] ? flow_block_cb_setup_simple+0x631/0x7c0 [ 279.879994] kasan_report+0xae/0xe0 [ 279.880750] ? flow_block_cb_setup_simple+0x631/0x7c0 [ 279.881744] ? mlx5e_tc_reoffload_flows_work+0x240/0x240 [mlx5_core] [ 279.883047] flow_block_cb_setup_simple+0x631/0x7c0 [ 279.884027] tcf_block_offload_cmd.isra.0+0x189/0x2d0 [ 279.885037] ? tcf_block_setup+0x6b0/0x6b0 [ 279.885901] ? mutex_lock+0x7d/0xd0 [ 279.886669] ? __mutex_unlock_slowpath.constprop.0+0x2d0/0x2d0 [ 279.887844] ? ingress_init+0x1c0/0x1c0 [sch_ingress] [ 279.888846] tcf_block_get_ext+0x61c/0x1200 [ 279.889711] ingress_init+0x112/0x1c0 [sch_ingress] [ 279.890682] ? clsact_init+0x2b0/0x2b0 [sch_ingress] [ 279.891701] qdisc_create+0x401/0xea0 [ 279.892485] ? qdisc_tree_reduce_backlog+0x470/0x470 [ 279.893473] tc_modify_qdisc+0x6f7/0x16d0 [ 279.894344] ? tc_get_qdisc+0xac0/0xac0 [ 279.895213] ? mutex_lock+0x7d/0xd0 [ 279.896005] ? __mutex_lock_slowpath+0x10/0x10 [ 279.896910] rtnetlink_rcv_msg+0x5fe/0x9d0 [ 279.897770] ? rtnl_calcit.isra.0+0x2b0/0x2b0 [ 279.898672] ? __sys_sendmsg+0xb5/0x140 [ 279.899494] ? do_syscall_64+0x3d/0x90 [ 279.900302] ? entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 279.901337] ? kasan_save_stack+0x2e/0x40 [ 279.902177] ? kasan_save_stack+0x1e/0x40 [ 279.903058] ? kasan_set_track+0x21/0x30 [ 279.903913] ? kasan_save_free_info+0x2a/0x40 [ 279.904836] ? ____kasan_slab_free+0x11a/0x1b0 [ 279.905741] ? kmem_cache_free+0x179/0x400 [ 279.906599] netlink_rcv_skb+0x12c/0x360 [ 279.907450] ? rtnl_calcit.isra.0+0x2b0/0x2b0 [ 279.908360] ? netlink_ack+0x1550/0x1550 [ 279.909192] ? rhashtable_walk_peek+0x170/0x170 [ 279.910135] ? kmem_cache_alloc_node+0x1af/0x390 [ 279.911086] ? _copy_from_iter+0x3d6/0xc70 [ 279.912031] netlink_unicast+0x553/0x790 [ 279.912864] ? netlink_attachskb+0x6a0/0x6a0 [ 279.913763] ? netlink_recvmsg+0x416/0xb50 [ 279.914627] netlink_sendmsg+0x7a1/0xcb0 [ 279.915473] ? netlink_unicast+0x790/0x790 [ 279.916334] ? iovec_from_user.part.0+0x4d/0x220 [ 279.917293] ? netlink_unicast+0x790/0x790 [ 279.918159] sock_sendmsg+0xc5/0x190 [ 279.918938] ____sys_sendmsg+0x535/0x6b0 [ 279.919813] ? import_iovec+0x7/0x10 [ 279.920601] ? kernel_sendmsg+0x30/0x30 [ 279.921423] ? __copy_msghdr+0x3c0/0x3c0 [ 279.922254] ? import_iovec+0x7/0x10 [ 279.923041] ___sys_sendmsg+0xeb/0x170 [ 279.923854] ? copy_msghdr_from_user+0x110/0x110 [ 279.924797] ? ___sys_recvmsg+0xd9/0x130 [ 279.925630] ? __perf_event_task_sched_in+0x183/0x470 [ 279.926656] ? ___sys_sendmsg+0x170/0x170 [ 279.927529] ? ctx_sched_in+0x530/0x530 [ 279.928369] ? update_curr+0x283/0x4f0 [ 279.929185] ? perf_event_update_userpage+0x570/0x570 [ 279.930201] ? __fget_light+0x57/0x520 [ 279.931023] ? __switch_to+0x53d/0xe70 [ 279.931846] ? sockfd_lookup_light+0x1a/0x140 [ 279.932761] __sys_sendmsg+0xb5/0x140 [ 279.933560] ? __sys_sendmsg_sock+0x20/0x20 [ 279.934436] ? fpregs_assert_state_consistent+0x1d/0xa0 [ 279.935490] do_syscall_64+0x3d/0x90 [ 279.936300] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 279.937311] RIP: 0033:0x7f21c814f887 [ 279.938085] Code: 0a 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b9 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10 [ 279.941448] RSP: 002b:00007fff11efd478 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 279.942964] RAX: ffffffffffffffda RBX: 0000000064401979 RCX: 00007f21c814f887 [ 279.944337] RDX: 0000000000000000 RSI: 00007fff11efd4e0 RDI: 0000000000000003 [ 279.945660] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 [ 279.947003] R10: 00007f21c8008708 R11: 0000000000000246 R12: 0000000000000001 [ 279.948345] R13: 0000000000409980 R14: 000000000047e538 R15: 0000000000485400 [ 279.949690] [ 279.950706] Allocated by task 2960: [ 279.951471] kasan_save_stack+0x1e/0x40 [ 279.952338] kasan_set_track+0x21/0x30 [ 279.953165] __kasan_kmalloc+0x77/0x90 [ 279.954006] flow_block_cb_setup_simple+0x3dd/0x7c0 [ 279.955001] tcf_block_offload_cmd.isra.0+0x189/0x2d0 [ 279.956020] tcf_block_get_ext+0x61c/0x1200 [ 279.956881] ingress_init+0x112/0x1c0 [sch_ingress] [ 279.957873] qdisc_create+0x401/0xea0 [ 279.958656] tc_modify_qdisc+0x6f7/0x16d0 [ 279.959506] rtnetlink_rcv_msg+0x5fe/0x9d0 [ 279.960392] netlink_rcv_skb+0x12c/0x360 [ 279.961216] netlink_unicast+0x553/0x790 [ 279.962044] netlink_sendmsg+0x7a1/0xcb0 [ 279.962906] sock_sendmsg+0xc5/0x190 [ 279.963702] ____sys_sendmsg+0x535/0x6b0 [ 279.964534] ___sys_sendmsg+0xeb/0x170 [ 279.965343] __sys_sendmsg+0xb5/0x140 [ 279.966132] do_syscall_64+0x3d/0x90 [ 279.966908] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 279.968407] Freed by task 2960: [ 279.969114] kasan_save_stack+0x1e/0x40 [ 279.969929] kasan_set_track+0x21/0x30 [ 279.970729] kasan_save_free_info+0x2a/0x40 [ 279.971603] ____kasan_slab_free+0x11a/0x1b0 [ 279.972483] __kmem_cache_free+0x14d/0x280 [ 279.973337] tcf_block_setup+0x29d/0x6b0 [ 279.974173] tcf_block_offload_cmd.isra.0+0x226/0x2d0 [ 279.975186] tcf_block_get_ext+0x61c/0x1200 [ 279.976080] ingress_init+0x112/0x1c0 [sch_ingress] [ 279.977065] qdisc_create+0x401/0xea0 [ 279.977857] tc_modify_qdisc+0x6f7/0x16d0 [ 279.978695] rtnetlink_rcv_msg+0x5fe/0x9d0 [ 279.979562] netlink_rcv_skb+0x12c/0x360 [ 279.980388] netlink_unicast+0x553/0x790 [ 279.981214] netlink_sendmsg+0x7a1/0xcb0 [ 279.982043] sock_sendmsg+0xc5/0x190 [ 279.982827] ____sys_sendmsg+0x535/0x6b0 [ 279.983703] ___sys_sendmsg+0xeb/0x170 [ 279.984510] __sys_sendmsg+0xb5/0x140 [ 279.985298] do_syscall_64+0x3d/0x90 [ 279.986076] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 279.987532] The buggy address belongs to the object at ffff888147e2bf00 which belongs to the cache kmalloc-192 of size 192 [ 279.989747] The buggy address is located 32 bytes inside of freed 192-byte region [ffff888147e2bf00, ffff888147e2bfc0) [ 279.992367] The buggy address belongs to the physical page: [ 279.993430] page:00000000550f405c refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x147e2a [ 279.995182] head:00000000550f405c order:1 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 279.996713] anon flags: 0x200000000010200(slab|head|node=0|zone=2) [ 279.997878] raw: 0200000000010200 ffff888100042a00 0000000000000000 dead000000000001 [ 279.999384] raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000 [ 280.000894] page dumped because: kasan: bad access detected [ 280.002386] Memory state around the buggy address: [ 280.003338] ffff888147e2be00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 280.004781] ffff888147e2be80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 280.006224] >ffff888147e2bf00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 280.007700] ^ [ 280.008592] ffff888147e2bf80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 280.010035] ffff888147e2c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 280.011564] ================================================================== Fixes: 59094b1e5094 ("net: sched: use flow block API") Signed-off-by: Vlad Buslov Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit e0807c430239d62d8dd7a25552e469aad8c3dd28 Author: Christophe JAILLET Date: Thu Apr 27 15:39:48 2023 +0200 mISDN: Use list_count_nodes() count_list_member() really looks the same as list_count_nodes(), so use the latter instead of hand writing it. The first one return an int and the other a size_t, but that should be fine. It is really unlikely that we get so many parties in a conference. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 7e692df3933628d974acb9f5b334d2b3e885e2a6 Author: Eric Dumazet Date: Fri Apr 28 04:32:31 2023 +0000 tcp: fix skb_copy_ubufs() vs BIG TCP David Ahern reported crashes in skb_copy_ubufs() caused by TCP tx zerocopy using hugepages, and skb length bigger than ~68 KB. skb_copy_ubufs() assumed it could copy all payload using up to MAX_SKB_FRAGS order-0 pages. This assumption broke when BIG TCP was able to put up to 512 KB per skb. We did not hit this bug at Google because we use CONFIG_MAX_SKB_FRAGS=45 and limit gso_max_size to 180000. A solution is to use higher order pages if needed. v2: add missing __GFP_COMP, or we leak memory. Fixes: 7c4e983c4f3c ("net: allow gso_max_size to exceed 65536") Reported-by: David Ahern Link: https://lore.kernel.org/netdev/c70000f6-baa4-4a05-46d0-4b3e0dc1ccc8@gmail.com/T/ Signed-off-by: Eric Dumazet Cc: Xin Long Cc: Willem de Bruijn Cc: Coco Li Signed-off-by: David S. Miller commit 6f75cd166a5a3c0bc50441faa8b8304f60522fdd Author: Cosmo Chou Date: Wed Apr 26 16:13:50 2023 +0800 net/ncsi: clear Tx enable mode when handling a Config required AEN ncsi_channel_is_tx() determines whether a given channel should be used for Tx or not. However, when reconfiguring the channel by handling a Configuration Required AEN, there is a misjudgment that the channel Tx has already been enabled, which results in the Enable Channel Network Tx command not being sent. Clear the channel Tx enable flag before reconfiguring the channel to avoid the misjudgment. Fixes: 8d951a75d022 ("net/ncsi: Configure multi-package, multi-channel modes with failover") Signed-off-by: Cosmo Chou Signed-off-by: David S. Miller commit 8c6c78ee3b3330cf8a00a3c6bdecc18d42e969d7 Author: Jeremy Kerr Date: Fri Apr 28 08:18:49 2023 +0800 i3c: ast2600: fix register setting for 545 ohm pullups The 2k register setting is zero, OR-ing it in doesn't parallel the 2k and 750 ohm pullups. We need a separate value for the 545 ohm setting. Reported-by: Lukwinski Zbigniew Signed-off-by: Jeremy Kerr Link: https://lore.kernel.org/r/20230428001849.1775559-1-jk@codeconstruct.com.au Signed-off-by: Alexandre Belloni commit f2539c20791eb474ae083f60a572f207ffbc3a67 Author: Jeremy Kerr Date: Thu Mar 30 15:50:36 2023 +0800 i3c: ast2600: enable IBI support The ast2600 i3c hardware is capable of IBIs, but we need a workaround for a hardware issue with the I3C state machine handling IBI payloads of specific lengths when PEC is not enabled. To avoid this, we need to unconditionally enable PECs, at the consquence of losing a byte of data when the device does not send a PEC. Enable IBIs on the ast2600 platform, including an implementation of the PEC workaround, which prints a warning when triggered. Signed-off-by: Jeremy Kerr Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/ba923b96d6d129024c975e8a0472c5b2fcb3af32.1680161823.git.jk@codeconstruct.com.au Signed-off-by: Alexandre Belloni commit f3a3553a51e64379dbb2e980f0024f7a28b74977 Author: Jeremy Kerr Date: Thu Mar 30 15:50:35 2023 +0800 i3c: dw: Add a platform facility for IBI PEC workarounds On the AST2600 i3c controller, we'll need to apply a workaround for a hardware issue with IBI payloads. Introduce a platform hook to allow dw i3c platform implementations to modify the DAT entry in IBI enable/disable to allow this workaround in a future change. Signed-off-by: Jeremy Kerr Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/d5d76a8d2336d2a71886537f42e71d51db184df6.1680161823.git.jk@codeconstruct.com.au Signed-off-by: Alexandre Belloni commit e389b1d72a6241b326071dd75e1b33f9e8818cd1 Author: Jeremy Kerr Date: Thu Mar 30 15:50:34 2023 +0800 i3c: dw: Add support for in-band interrupts This change adds support for receiving and dequeueing i3c IBIs. By setting struct dw_i3c_master->ibi_capable before probe, a platform implementation can select the IBI-enabled version of the i3c_master_ops, enabling the global IBI infrastrcture for that controller. Signed-off-by: Jeremy Kerr Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/79daeefd7ccb7c935d0c159149df21a6c9a73ffa.1680161823.git.jk@codeconstruct.com.au Signed-off-by: Alexandre Belloni commit e2d43101f61d6e79510d1cd9e7052b4745b8d809 Author: Jeremy Kerr Date: Thu Mar 30 15:50:33 2023 +0800 i3c: dw: Turn DAT array entry into a struct In an upcoming change, we will want to store additional data about the devices we have in the data address table. Change the type of the DAT entries into a struct, which currently just has the address data. Signed-off-by: Jeremy Kerr Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/9dc0d9e2857e851a0cf04819df48e5d31921f83e.1680161823.git.jk@codeconstruct.com.au Signed-off-by: Alexandre Belloni commit 79f42b31c2ec78416bc7dd6c9f21c3334879c43a Author: Jeremy Kerr Date: Thu Mar 30 15:50:32 2023 +0800 i3c: dw: Create a generic fifo read function In a future change we'll want to read from the IBI FIFO too, so turn dw_i3c_read_rx_fifo() into a generic read with the FIFO register as a parameter. Signed-off-by: Jeremy Kerr Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/827204789583dd86addffb47ecaeab9d67cf95d5.1680161823.git.jk@codeconstruct.com.au Signed-off-by: Alexandre Belloni commit 7dc2e0a875645a79f5c1c063019397e8e94008f5 Author: Jeremy Kerr Date: Wed Apr 5 17:41:49 2023 +0800 i3c: Allow OF-alias-based persistent bus numbering Parse the /aliases node to assign any fixed bus numbers, as is done with the i2c subsystem. Numbering for non-aliased busses will start after the highest fixed bus number. This allows an alias node such as: aliases { i3c0 = &bus_a, i3c4 = &bus_b, }; to set the numbering for a set of i3c controllers: /* fixed-numbered bus, assigned "i3c-0" */ bus_a: i3c-master { }; /* another fixed-numbered bus, assigned "i3c-4" */ bus_b: i3c-master { }; /* dynamic-numbered bus, likely assigned "i3c-5" */ bus_c: i3c-master { }; If no i3c device aliases are present, the numbering will stay as-is, starting from 0. Signed-off-by: Jeremy Kerr Link: https://lore.kernel.org/r/20230405094149.1513209-1-jk@codeconstruct.com.au Signed-off-by: Alexandre Belloni commit 5844564143575a8dbcbcece0084da059faeca5df Author: Jeremy Kerr Date: Fri Mar 31 17:15:01 2023 +0800 i3c: ast2600: Add AST2600 platform-specific driver Now that we have platform-specific infrastructure for the dw i3c driver, add platform support for the ASPEED AST2600 SoC. The AST2600 has a small set of "i3c global" registers, providing platform-level i3c configuration outside of the i3c core. For the ast2600, we need a couple of extra setup operations: - on probe: find the i3c global register set and parse the SDA pullup resistor values - on init: set the pullups accordingly, and set the i3c instance IDs Signed-off-by: Jeremy Kerr Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20230331091501.3800299-4-jk@codeconstruct.com.au Signed-off-by: Alexandre Belloni commit 21203e098cd3c1760de8112d750ceeedf09a6dad Author: Jeremy Kerr Date: Fri Mar 31 17:15:00 2023 +0800 dt-bindings: i3c: Add AST2600 i3c controller Add a devicetree binding for the ast2600 i3c controller hardware. This is heavily based on the designware i3c core, plus a reset facility and two platform-specific properties: - sda-pullup-ohms: to specify the value of the configurable pullup resistors on the SDA line - aspeed,global-regs: to reference the (ast2600-specific) i3c global register block, and the device index to use within it. Reviewed-by: Krzysztof Kozlowski (on v1) Signed-off-by: Jeremy Kerr Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20230331091501.3800299-3-jk@codeconstruct.com.au Signed-off-by: Alexandre Belloni commit d782188cbb05a196e46a4838484f020ceeb889ec Author: Jeremy Kerr Date: Fri Mar 31 17:14:59 2023 +0800 i3c: dw: Add infrastructure for platform-specific implementations The dw i3c core can be integrated into various SoC devices. Platforms that use this core may need a little configuration that is specific to that platform. Add some infrastructure to allow platform-specific behaviour: common probe/remove functions, a set of platform hook operations, and a pointer for platform-specific data in struct dw_i3c_master. Move the common api into a new (i3c local) header file. Platforms will provide their own struct platform_driver, which allocates struct dw_i3c_master, does any platform-specific probe behaviour, and calls into the common probe. A future change will add new platform support that uses this infrastructure. Signed-off-by: Jeremy Kerr Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20230331091501.3800299-2-jk@codeconstruct.com.au Signed-off-by: Alexandre Belloni commit e99ab4abebf825de2ce65f6c6c32ee30e00bb077 Author: Ye Xingchen Date: Wed Mar 22 11:30:31 2023 +0800 rtc: armada38x: use devm_platform_ioremap_resource_byname() Convert platform_get_resource_byname(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource_byname(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Link: https://lore.kernel.org/r/202303221130316049449@zte.com.cn Signed-off-by: Alexandre Belloni commit 916890539bc8a5674d363a1fc985633200c2117a Author: Ye Xingchen Date: Wed Mar 22 11:31:58 2023 +0800 rtc: sunplus: use devm_platform_ioremap_resource_byname() Convert platform_get_resource_byname(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource_byname(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Link: https://lore.kernel.org/r/202303221131581039486@zte.com.cn Signed-off-by: Alexandre Belloni commit c7a639dac8e4d7e63450bef2f3a19fb331566fb1 Author: Lars-Peter Clausen Date: Sun Apr 9 09:25:44 2023 -0700 rtc: jz4740: Make sure clock provider gets removed The jz4740 RTC driver registers a clock provider, but never removes it. This leaves a stale clock provider behind that references freed clocks when the device is unbound. Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()` to make sure the provider gets automatically removed on unbind. Fixes: 5ddfa148de8c ("rtc: jz4740: Register clock provider for the CLK32K pin") Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230409162544.16155-1-lars@metafoo.de Signed-off-by: Alexandre Belloni commit 33afd4b76393627477e878b3b195d606e585d816 Merge: 7fa8a8ee9400f d88f2f72ca89e Author: Linus Torvalds Date: Thu Apr 27 19:57:00 2023 -0700 Merge tag 'mm-nonmm-stable-2023-04-27-16-01' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull non-MM updates from Andrew Morton: "Mainly singleton patches all over the place. Series of note are: - updates to scripts/gdb from Glenn Washburn - kexec cleanups from Bjorn Helgaas" * tag 'mm-nonmm-stable-2023-04-27-16-01' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (50 commits) mailmap: add entries for Paul Mackerras libgcc: add forward declarations for generic library routines mailmap: add entry for Oleksandr ocfs2: reduce ioctl stack usage fs/proc: add Kthread flag to /proc/$pid/status ia64: fix an addr to taddr in huge_pte_offset() checkpatch: introduce proper bindings license check epoll: rename global epmutex scripts/gdb: add GDB convenience functions $lx_dentry_name() and $lx_i_dentry() scripts/gdb: create linux/vfs.py for VFS related GDB helpers uapi/linux/const.h: prefer ISO-friendly __typeof__ delayacct: track delays from IRQ/SOFTIRQ scripts/gdb: timerlist: convert int chunks to str scripts/gdb: print interrupts scripts/gdb: raise error with reduced debugging information scripts/gdb: add a Radix Tree Parser lib/rbtree: use '+' instead of '|' for setting color. proc/stat: remove arch_idle_time() checkpatch: check for misuse of the link tags checkpatch: allow Closes tags with links ... commit 7fa8a8ee9400fe8ec188426e40e481717bc5e924 Merge: 91ec4b0d11fe1 4d4b6d66db63c Author: Linus Torvalds Date: Thu Apr 27 19:42:02 2023 -0700 Merge tag 'mm-stable-2023-04-27-15-30' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull MM updates from Andrew Morton: - Nick Piggin's "shoot lazy tlbs" series, to improve the peformance of switching from a user process to a kernel thread. - More folio conversions from Kefeng Wang, Zhang Peng and Pankaj Raghav. - zsmalloc performance improvements from Sergey Senozhatsky. - Yue Zhao has found and fixed some data race issues around the alteration of memcg userspace tunables. - VFS rationalizations from Christoph Hellwig: - removal of most of the callers of write_one_page() - make __filemap_get_folio()'s return value more useful - Luis Chamberlain has changed tmpfs so it no longer requires swap backing. Use `mount -o noswap'. - Qi Zheng has made the slab shrinkers operate locklessly, providing some scalability benefits. - Keith Busch has improved dmapool's performance, making part of its operations O(1) rather than O(n). - Peter Xu adds the UFFD_FEATURE_WP_UNPOPULATED feature to userfaultd, permitting userspace to wr-protect anon memory unpopulated ptes. - Kirill Shutemov has changed MAX_ORDER's meaning to be inclusive rather than exclusive, and has fixed a bunch of errors which were caused by its unintuitive meaning. - Axel Rasmussen give userfaultfd the UFFDIO_CONTINUE_MODE_WP feature, which causes minor faults to install a write-protected pte. - Vlastimil Babka has done some maintenance work on vma_merge(): cleanups to the kernel code and improvements to our userspace test harness. - Cleanups to do_fault_around() by Lorenzo Stoakes. - Mike Rapoport has moved a lot of initialization code out of various mm/ files and into mm/mm_init.c. - Lorenzo Stoakes removd vmf_insert_mixed_prot(), which was added for DRM, but DRM doesn't use it any more. - Lorenzo has also coverted read_kcore() and vread() to use iterators and has thereby removed the use of bounce buffers in some cases. - Lorenzo has also contributed further cleanups of vma_merge(). - Chaitanya Prakash provides some fixes to the mmap selftesting code. - Matthew Wilcox changes xfs and afs so they no longer take sleeping locks in ->map_page(), a step towards RCUification of pagefaults. - Suren Baghdasaryan has improved mmap_lock scalability by switching to per-VMA locking. - Frederic Weisbecker has reworked the percpu cache draining so that it no longer causes latency glitches on cpu isolated workloads. - Mike Rapoport cleans up and corrects the ARCH_FORCE_MAX_ORDER Kconfig logic. - Liu Shixin has changed zswap's initialization so we no longer waste a chunk of memory if zswap is not being used. - Yosry Ahmed has improved the performance of memcg statistics flushing. - David Stevens has fixed several issues involving khugepaged, userfaultfd and shmem. - Christoph Hellwig has provided some cleanup work to zram's IO-related code paths. - David Hildenbrand has fixed up some issues in the selftest code's testing of our pte state changing. - Pankaj Raghav has made page_endio() unneeded and has removed it. - Peter Xu contributed some rationalizations of the userfaultfd selftests. - Yosry Ahmed has fixed an issue around memcg's page recalim accounting. - Chaitanya Prakash has fixed some arm-related issues in the selftests/mm code. - Longlong Xia has improved the way in which KSM handles hwpoisoned pages. - Peter Xu fixes a few issues with uffd-wp at fork() time. - Stefan Roesch has changed KSM so that it may now be used on a per-process and per-cgroup basis. * tag 'mm-stable-2023-04-27-15-30' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (369 commits) mm,unmap: avoid flushing TLB in batch if PTE is inaccessible shmem: restrict noswap option to initial user namespace mm/khugepaged: fix conflicting mods to collapse_file() sparse: remove unnecessary 0 values from rc mm: move 'mmap_min_addr' logic from callers into vm_unmapped_area() hugetlb: pte_alloc_huge() to replace huge pte_alloc_map() maple_tree: fix allocation in mas_sparse_area() mm: do not increment pgfault stats when page fault handler retries zsmalloc: allow only one active pool compaction context selftests/mm: add new selftests for KSM mm: add new KSM process and sysfs knobs mm: add new api to enable ksm per process mm: shrinkers: fix debugfs file permissions mm: don't check VMA write permissions if the PTE/PMD indicates write permissions migrate_pages_batch: fix statistics for longterm pin retry userfaultfd: use helper function range_in_vma() lib/show_mem.c: use for_each_populated_zone() simplify code mm: correct arg in reclaim_pages()/reclaim_clean_pages_from_list() fs/buffer: convert create_page_buffers to folio_create_buffers fs/buffer: add folio_create_empty_buffers helper ... commit 952aa344bf4305ab6fa0d9962ef8c2caa2afef4c Author: Eric Blake Date: Mon Apr 10 13:06:11 2023 -0500 docs nbd: userspace NBD now favors github over sourceforge While the sourceforge site for userspace NBD still exists, the code repository moved to github several years ago. Then with a recent patch[1], the github landing page contains just as much information as the sourceforge page, so we might as well point to a single location that also provides the code. [1] https://lists.debian.org/nbd/2023/03/msg00051.html Signed-off-by: Eric Blake Reviewed-by: Josef Bacik Link: https://lore.kernel.org/r/20230410180611.1051618-5-eblake@redhat.com Signed-off-by: Jens Axboe commit bd9e9916c32fd4b4fb4e879e05bd1568ee02ec93 Author: Eric Blake Date: Mon Apr 10 13:06:10 2023 -0500 block nbd: use req.cookie instead of req.handle The NBD spec was recently changed [1] to refer to the opaque client identifier as a 'cookie' rather than a 'handle', but has for a much longer time listed it as a 64-bit value, and declares that all values in the NBD protocol are sent in network byte order (big-endian). Because the value is opaque to the server, it doesn't usually matter what endianness we send as the client - as long as we are consistent that either we byte-swap on both write and read, or on neither, then we can match server replies back to our requests. That said, our internal use of the cookie is as a 64-bit number (well, as two 32-bit numbers concatenated together), rather than as 8 individual bytes; so prior to this commit, we ARE leaking the native endianness of our internals as a client out to the server. We don't know of any server that will actually inspect the opaque value and behave differently depending on whether a little-endian or big-endian client is sending requests, but since we DO log the cookie value, a wireshark capture of the network traffic is easier to correlate back to the kernel traffic of a big-endian host (where the u64 and char[8] representations are the same) than of a little-endian host (where if wireshark honors the NBD spec and displays a u64 in network byte order, it is byte-swapped from what the kernel logged). The fix in this patch is thus two-part: it now consistently uses network byte order for the opaque value (no difference to a big-endian machine, but an extra byteswap on a little-endian machine; probably in the noise compared to the overhead of network traffic in general), and now uses a 64-bit integer instead of char[8] as its preferred access to the opaque value (direct assignment instead of memcpy()). Signed-off-by: Eric Blake Reviewed-by: Josef Bacik Link: https://lore.kernel.org/r/20230410180611.1051618-4-eblake@redhat.com Signed-off-by: Jens Axboe commit 2686eb845da7762ee98b17e578b0c081aafb77b9 Author: Eric Blake Date: Mon Apr 10 13:06:09 2023 -0500 uapi nbd: add cookie alias to handle The uapi header declares a 'char handle[8]' per request; which is overloaded in English (are you referring to "handle" the verb, such as handling a signal or writing a callback handler, or "handle" the noun, the value used in a lookup table to correlate a response back to the request). Many user-space NBD implementations (both servers and clients) have instead used 'uint64_t cookie' or similar, as it is easier to directly assign an integer than to futz around with memcpy. In fact, upstream documentation is now encouraging this shift in terminology: https://github.com/NetworkBlockDevice/nbd/commit/ca4392eb2b Accomplish this by use of an anonymous union to provide the alias for anyone getting the definition from the uapi; this does not break existing clients, while exposing the nicer name for those who prefer it. Note that block/nbd.c still uses the term handle (in fact, it actually combines a 32-bit cookie and a 32-bit tag into the 64-bit handle), but that internal usage is not changed by the public uapi, since no compliant NBD server has any reason to inspect or alter the 64 bits sent over the socket. Signed-off-by: Eric Blake Reviewed-by: Josef Bacik Link: https://lore.kernel.org/r/20230410180611.1051618-3-eblake@redhat.com Signed-off-by: Jens Axboe commit daf376a366fd2d469d66ab83dfdc074777462bab Author: Eric Blake Date: Mon Apr 10 13:06:08 2023 -0500 uapi nbd: improve doc links to userspace spec The uapi header intentionally documents only the NBD server features that the kernel module will utilize as a client. But while it already had one mention of skipped bits due to userspace extensions, it did not actually direct the reader to the canonical source to learn about those extensions. While touching comments, fix an outdated reference that listed only READ and WRITE as commands. Signed-off-by: Eric Blake Reviewed-by: Ming Lei Reviewed-by: Josef Bacik Link: https://lore.kernel.org/r/20230410180611.1051618-2-eblake@redhat.com Signed-off-by: Jens Axboe commit 91ec4b0d11fe115581ce2835300558802ce55e6c Merge: 513f17f8d6b67 46e614cc91f7b Author: Linus Torvalds Date: Thu Apr 27 17:46:52 2023 -0700 Merge tag 'mips_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Thomas Bogendoerfer: - added support for Huawei B593u-12 - added support for virt board aligned to QEMU MIPS virt board - added support for doing DMA coherence on a per device base - reworked handling of RALINK SoCs - cleanup for Loongon64 barriers - removed deprecated support for MIPS_CMP SMP handling method - removed support Sibyte CARMEL and CHRINE boards - cleanups and fixes * tag 'mips_6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (59 commits) MIPS: uprobes: Restore thread.trap_nr MIPS: Don't clear _PAGE_SPECIAL in _PAGE_CHG_MASK MIPS: Sink body of check_bugs_early() into its only call site MIPS: Mark check_bugs() as __init Revert "MIPS: generic: Enable all CPUs supported by virt board in Kconfig" MIPS: octeon_switch: Remove duplicated labels MIPS: loongson2ef: Add missing break in cs5536_isa MIPS: Remove set_swbp() in uprobes.c MIPS: Use def_bool y for ARCH_SUPPORTS_UPROBES MIPS: fw: Allow firmware to pass a empty env MIPS: Remove deprecated CONFIG_MIPS_CMP MIPS: lantiq: remove unused function declaration MIPS: Drop unused positional parameter in local_irq_{dis,en}able MIPS: mm: Remove local_cache_flush_page MIPS: Remove no longer used ide.h MIPS: mm: Remove unused *cache_page_indexed flush functions MIPS: generic: Enable all CPUs supported by virt board in Kconfig MIPS: Add board config for virt board MIPS: Octeon: Disable CVMSEG by default on other platforms MIPS: Loongson: Don't select platform features with CPU ... commit 513f17f8d6b67563d977c730d50bc0db6ea6e1b0 Merge: 35fab9271b7e6 e5c23bec0f121 Author: Linus Torvalds Date: Thu Apr 27 17:41:23 2023 -0700 Merge tag 'sh-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux Pull sh updates from John Paul Adrian Glaubitz: "This is a bit larger than my previous one and mainly consists of clean-up work in the arch/sh directory by Geert Uytterhoeven and Randy Dunlap. Additionally, this fixes a bug in the Storage Queue code that was discovered while I was reviewing a patch to switch the code to the bitmap API by Christophe Jaillet. So this contains both a fix for the original bug in the Storage Queue code that can be backported later as well as the Christophe's patch to swich the code to the bitmap API. Summary: - Use generic GCC library routines - sq: Use the bitmap API when applicable - sq: Fix incorrect element size for allocating bitmap buffer - pci: Remove unused variable in SH-7786 PCI Express code - mcount.S: fix build error when PRINTK is not enabled - remove sh5/sh64 last fragments - math-emu: fix macro redefined warning - init: use OF_EARLY_FLATTREE for early init - nmi_debug: fix return value of __setup handler - SH2007: drop the bad URL info" * tag 'sh-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux: sh: Replace by sh: Use generic GCC library routines sh: sq: Use the bitmap API when applicable sh: sq: Fix incorrect element size for allocating bitmap buffer sh: pci: Remove unused variable in SH-7786 PCI Express code sh: mcount.S: fix build error when PRINTK is not enabled sh: remove sh5/sh64 last fragments sh: math-emu: fix macro redefined warning sh: init: use OF_EARLY_FLATTREE for early init sh: nmi_debug: fix return value of __setup handler sh: SH2007: drop the bad URL info commit 35fab9271b7e6d193b47005c4d07369714db4fd1 Merge: da46b58ff8841 cbfac7707ba16 Author: Linus Torvalds Date: Thu Apr 27 17:27:06 2023 -0700 Merge tag 'for-linus-6.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: - some cleanups in the Xen blkback driver - fix potential sleeps under lock in various Xen drivers * tag 'for-linus-6.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/blkback: move blkif_get_x86_*_req() into blkback.c xen/blkback: simplify free_persistent_gnts() interface xen/blkback: remove stale prototype xen/blkback: fix white space code style issues xen/pvcalls: don't call bind_evtchn_to_irqhandler() under lock xen/scsiback: don't call scsiback_free_translation_entry() under lock xen/pciback: don't call pcistub_device_put() under lock commit da46b58ff884146f6153064f18d276806f3c114c Merge: 8ccd54fe45713 a494aef23dfc7 Author: Linus Torvalds Date: Thu Apr 27 17:17:12 2023 -0700 Merge tag 'hyperv-next-signed-20230424' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv updates from Wei Liu: - PCI passthrough for Hyper-V confidential VMs (Michael Kelley) - Hyper-V VTL mode support (Saurabh Sengar) - Move panic report initialization code earlier (Long Li) - Various improvements and bug fixes (Dexuan Cui and Michael Kelley) * tag 'hyperv-next-signed-20230424' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: (22 commits) PCI: hv: Replace retarget_msi_interrupt_params with hyperv_pcpu_input_arg Drivers: hv: move panic report code from vmbus to hv early init code x86/hyperv: VTL support for Hyper-V Drivers: hv: Kconfig: Add HYPERV_VTL_MODE x86/hyperv: Make hv_get_nmi_reason public x86/hyperv: Add VTL specific structs and hypercalls x86/init: Make get/set_rtc_noop() public x86/hyperv: Exclude lazy TLB mode CPUs from enlightened TLB flushes x86/hyperv: Add callback filter to cpumask_to_vpset() Drivers: hv: vmbus: Remove the per-CPU post_msg_page clocksource: hyper-v: make sure Invariant-TSC is used if it is available PCI: hv: Enable PCI pass-thru devices in Confidential VMs Drivers: hv: Don't remap addresses that are above shared_gpa_boundary hv_netvsc: Remove second mapping of send and recv buffers Drivers: hv: vmbus: Remove second way of mapping ring buffers Drivers: hv: vmbus: Remove second mapping of VMBus monitor pages swiotlb: Remove bounce buffer remapping for Hyper-V Driver: VMBus: Add Devicetree support dt-bindings: bus: Add Hyper-V VMBus Drivers: hv: vmbus: Convert acpi_device to more generic platform_device ... commit 8ccd54fe45713cd458015b5b08d6098545e70543 Merge: 0835b5ee8704a c82729e06644f Author: Linus Torvalds Date: Thu Apr 27 17:05:34 2023 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: "virtio,vhost,vdpa: features, fixes, and cleanups: - reduction in interrupt rate in virtio - perf improvement for VDUSE - scalability for vhost-scsi - non power of 2 ring support for packed rings - better management for mlx5 vdpa - suspend for snet - VIRTIO_F_NOTIFICATION_DATA - shared backend with vdpa-sim-blk - user VA support in vdpa-sim - better struct packing for virtio and fixes, cleanups all over the place" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (52 commits) vhost_vdpa: fix unmap process in no-batch mode MAINTAINERS: make me a reviewer of VIRTIO CORE AND NET DRIVERS tools/virtio: fix build caused by virtio_ring changes virtio_ring: add a struct device forward declaration vdpa_sim_blk: support shared backend vdpa_sim: move buffer allocation in the devices vdpa/snet: use likely/unlikely macros in hot functions vdpa/snet: implement kick_vq_with_data callback virtio-vdpa: add VIRTIO_F_NOTIFICATION_DATA feature support virtio: add VIRTIO_F_NOTIFICATION_DATA feature support vdpa/snet: support the suspend vDPA callback vdpa/snet: support getting and setting VQ state MAINTAINERS: add vringh.h to Virtio Core and Net Drivers vringh: address kdoc warnings vdpa: address kdoc warnings virtio_ring: don't update event idx on get_buf vdpa_sim: add support for user VA vdpa_sim: replace the spinlock with a mutex to protect the state vdpa_sim: use kthread worker vdpa_sim: make devices agnostic for work management ... commit 0835b5ee8704aef4e19b369237a762c52c7b6fb1 Merge: 900941bea3f69 5239a89b06d6b Author: Linus Torvalds Date: Thu Apr 27 17:03:40 2023 -0700 Merge tag 'pstore-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore update from Kees Cook: - Revert pmsg_lock back to a normal mutex (John Stultz) * tag 'pstore-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: Revert pmsg_lock back to a normal mutex commit 900941bea3f69859c8e4cb17e4fd89c3ff6ade99 Merge: 888d3c9f7f3ae b69edab47f1da Author: Linus Torvalds Date: Thu Apr 27 17:01:04 2023 -0700 Merge tag 'hardening-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardening update from Kees Cook: - Fix kheaders array declaration to avoid tripping FORTIFY_SOURCE * tag 'hardening-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: kheaders: Use array declaration instead of char commit 888d3c9f7f3ae44101a3fd76528d3dd6f96e9fd0 Merge: b6a7828502dc7 e3184de9d46c2 Author: Linus Torvalds Date: Thu Apr 27 16:52:33 2023 -0700 Merge tag 'sysctl-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull sysctl updates from Luis Chamberlain: "This only does a few sysctl moves from the kernel/sysctl.c file, the rest of the work has been put towards deprecating two API calls which incur recursion and prevent us from simplifying the registration process / saving memory per move. Most of the changes have been soaking on linux-next since v6.3-rc3. I've slowed down the kernel/sysctl.c moves due to Matthew Wilcox's feedback that we should see if we could *save* memory with these moves instead of incurring more memory. We currently incur more memory since when we move a syctl from kernel/sysclt.c out to its own file we end up having to add a new empty sysctl used to register it. To achieve saving memory we want to allow syctls to be passed without requiring the end element being empty, and just have our registration process rely on ARRAY_SIZE(). Without this, supporting both styles of sysctls would make the sysctl registration pretty brittle, hard to read and maintain as can be seen from Meng Tang's efforts to do just this [0]. Fortunately, in order to use ARRAY_SIZE() for all sysctl registrations also implies doing the work to deprecate two API calls which use recursion in order to support sysctl declarations with subdirectories. And so during this development cycle quite a bit of effort went into this deprecation effort. I've annotated the following two APIs are deprecated and in few kernel releases we should be good to remove them: - register_sysctl_table() - register_sysctl_paths() During this merge window we should be able to deprecate and unexport register_sysctl_paths(), we can probably do that towards the end of this merge window. Deprecating register_sysctl_table() will take a bit more time but this pull request goes with a few example of how to do this. As it turns out each of the conversions to move away from either of these two API calls *also* saves memory. And so long term, all these changes *will* prove to have saved a bit of memory on boot. The way I see it then is if remove a user of one deprecated call, it gives us enough savings to move one kernel/sysctl.c out from the generic arrays as we end up with about the same amount of bytes. Since deprecating register_sysctl_table() and register_sysctl_paths() does not require maintainer coordination except the final unexport you'll see quite a bit of these changes from other pull requests, I've just kept the stragglers after rc3" Link: https://lkml.kernel.org/r/ZAD+cpbrqlc5vmry@bombadil.infradead.org [0] * tag 'sysctl-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: (29 commits) fs: fix sysctls.c built mm: compaction: remove incorrect #ifdef checks mm: compaction: move compaction sysctl to its own file mm: memory-failure: Move memory failure sysctls to its own file arm: simplify two-level sysctl registration for ctl_isa_vars ia64: simplify one-level sysctl registration for kdump_ctl_table utsname: simplify one-level sysctl registration for uts_kern_table ntfs: simplfy one-level sysctl registration for ntfs_sysctls coda: simplify one-level sysctl registration for coda_table fs/cachefiles: simplify one-level sysctl registration for cachefiles_sysctls xfs: simplify two-level sysctl registration for xfs_table nfs: simplify two-level sysctl registration for nfs_cb_sysctls nfs: simplify two-level sysctl registration for nfs4_cb_sysctls lockd: simplify two-level sysctl registration for nlm_sysctls proc_sysctl: enhance documentation xen: simplify sysctl registration for balloon md: simplify sysctl registration hv: simplify sysctl registration scsi: simplify sysctl registration with register_sysctl() csky: simplify alignment sysctl registration ... commit b6a7828502dc769e1a5329027bc5048222fa210a Merge: d06f5a3f71409 8660484ed1cf3 Author: Linus Torvalds Date: Thu Apr 27 16:36:55 2023 -0700 Merge tag 'modules-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull module updates from Luis Chamberlain: "The summary of the changes for this pull requests is: - Song Liu's new struct module_memory replacement - Nick Alcock's MODULE_LICENSE() removal for non-modules - My cleanups and enhancements to reduce the areas where we vmalloc module memory for duplicates, and the respective debug code which proves the remaining vmalloc pressure comes from userspace. Most of the changes have been in linux-next for quite some time except the minor fixes I made to check if a module was already loaded prior to allocating the final module memory with vmalloc and the respective debug code it introduces to help clarify the issue. Although the functional change is small it is rather safe as it can only *help* reduce vmalloc space for duplicates and is confirmed to fix a bootup issue with over 400 CPUs with KASAN enabled. I don't expect stable kernels to pick up that fix as the cleanups would have also had to have been picked up. Folks on larger CPU systems with modules will want to just upgrade if vmalloc space has been an issue on bootup. Given the size of this request, here's some more elaborate details: The functional change change in this pull request is the very first patch from Song Liu which replaces the 'struct module_layout' with a new 'struct module_memory'. The old data structure tried to put together all types of supported module memory types in one data structure, the new one abstracts the differences in memory types in a module to allow each one to provide their own set of details. This paves the way in the future so we can deal with them in a cleaner way. If you look at changes they also provide a nice cleanup of how we handle these different memory areas in a module. This change has been in linux-next since before the merge window opened for v6.3 so to provide more than a full kernel cycle of testing. It's a good thing as quite a bit of fixes have been found for it. Jason Baron then made dynamic debug a first class citizen module user by using module notifier callbacks to allocate / remove module specific dynamic debug information. Nick Alcock has done quite a bit of work cross-tree to remove module license tags from things which cannot possibly be module at my request so to: a) help him with his longer term tooling goals which require a deterministic evaluation if a piece a symbol code could ever be part of a module or not. But quite recently it is has been made clear that tooling is not the only one that would benefit. Disambiguating symbols also helps efforts such as live patching, kprobes and BPF, but for other reasons and R&D on this area is active with no clear solution in sight. b) help us inch closer to the now generally accepted long term goal of automating all the MODULE_LICENSE() tags from SPDX license tags In so far as a) is concerned, although module license tags are a no-op for non-modules, tools which would want create a mapping of possible modules can only rely on the module license tag after the commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"). Nick has been working on this *for years* and AFAICT I was the only one to suggest two alternatives to this approach for tooling. The complexity in one of my suggested approaches lies in that we'd need a possible-obj-m and a could-be-module which would check if the object being built is part of any kconfig build which could ever lead to it being part of a module, and if so define a new define -DPOSSIBLE_MODULE [0]. A more obvious yet theoretical approach I've suggested would be to have a tristate in kconfig imply the same new -DPOSSIBLE_MODULE as well but that means getting kconfig symbol names mapping to modules always, and I don't think that's the case today. I am not aware of Nick or anyone exploring either of these options. Quite recently Josh Poimboeuf has pointed out that live patching, kprobes and BPF would benefit from resolving some part of the disambiguation as well but for other reasons. The function granularity KASLR (fgkaslr) patches were mentioned but Joe Lawrence has clarified this effort has been dropped with no clear solution in sight [1]. In the meantime removing module license tags from code which could never be modules is welcomed for both objectives mentioned above. Some developers have also welcomed these changes as it has helped clarify when a module was never possible and they forgot to clean this up, and so you'll see quite a bit of Nick's patches in other pull requests for this merge window. I just picked up the stragglers after rc3. LWN has good coverage on the motivation behind this work [2] and the typical cross-tree issues he ran into along the way. The only concrete blocker issue he ran into was that we should not remove the MODULE_LICENSE() tags from files which have no SPDX tags yet, even if they can never be modules. Nick ended up giving up on his efforts due to having to do this vetting and backlash he ran into from folks who really did *not understand* the core of the issue nor were providing any alternative / guidance. I've gone through his changes and dropped the patches which dropped the module license tags where an SPDX license tag was missing, it only consisted of 11 drivers. To see if a pull request deals with a file which lacks SPDX tags you can just use: ./scripts/spdxcheck.py -f \ $(git diff --name-only commid-id | xargs echo) You'll see a core module file in this pull request for the above, but that's not related to his changes. WE just need to add the SPDX license tag for the kernel/module/kmod.c file in the future but it demonstrates the effectiveness of the script. Most of Nick's changes were spread out through different trees, and I just picked up the slack after rc3 for the last kernel was out. Those changes have been in linux-next for over two weeks. The cleanups, debug code I added and final fix I added for modules were motivated by David Hildenbrand's report of boot failing on a systems with over 400 CPUs when KASAN was enabled due to running out of virtual memory space. Although the functional change only consists of 3 lines in the patch "module: avoid allocation if module is already present and ready", proving that this was the best we can do on the modules side took quite a bit of effort and new debug code. The initial cleanups I did on the modules side of things has been in linux-next since around rc3 of the last kernel, the actual final fix for and debug code however have only been in linux-next for about a week or so but I think it is worth getting that code in for this merge window as it does help fix / prove / evaluate the issues reported with larger number of CPUs. Userspace is not yet fixed as it is taking a bit of time for folks to understand the crux of the issue and find a proper resolution. Worst come to worst, I have a kludge-of-concept [3] of how to make kernel_read*() calls for modules unique / converge them, but I'm currently inclined to just see if userspace can fix this instead" Link: https://lore.kernel.org/all/Y/kXDqW+7d71C4wz@bombadil.infradead.org/ [0] Link: https://lkml.kernel.org/r/025f2151-ce7c-5630-9b90-98742c97ac65@redhat.com [1] Link: https://lwn.net/Articles/927569/ [2] Link: https://lkml.kernel.org/r/20230414052840.1994456-3-mcgrof@kernel.org [3] * tag 'modules-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: (121 commits) module: add debugging auto-load duplicate module support module: stats: fix invalid_mod_bytes typo module: remove use of uninitialized variable len module: fix building stats for 32-bit targets module: stats: include uapi/linux/module.h module: avoid allocation if module is already present and ready module: add debug stats to help identify memory pressure module: extract patient module check into helper modules/kmod: replace implementation with a semaphore Change DEFINE_SEMAPHORE() to take a number argument module: fix kmemleak annotations for non init ELF sections module: Ignore L0 and rename is_arm_mapping_symbol() module: Move is_arm_mapping_symbol() to module_symbol.h module: Sync code of is_arm_mapping_symbol() scripts/gdb: use mem instead of core_layout to get the module address interconnect: remove module-related code interconnect: remove MODULE_LICENSE in non-modules zswap: remove MODULE_LICENSE in non-modules zpool: remove MODULE_LICENSE in non-modules x86/mm/dump_pagetables: remove MODULE_LICENSE in non-modules ... commit d06f5a3f7140921ada47d49574ae6fa4de5e2a89 Author: Linus Torvalds Date: Thu Apr 27 16:21:32 2023 -0700 cdx: fix build failure due to sysfs 'bus_type' argument needing to be const Commit 75cff725d956 ("driver core: bus: mark the struct bus_type for sysfs callbacks as constant") missed at least one case - the CDX bus driver. Probably because Greg didn't notice the build failure, because it only ends up being enabled on arm64. And I missed it during the merge, because while I do arm64 builds these days, I don't do them in between each pull. So it took a while for me to notice the breakage, rather than me just fixing it in the driver core merge that brought this failure case in. Maybe we should remove the CDX_BUS dependency on arm64 when COMPILE_TEST is on? Cc: Greg Kroah-Hartman Cc: Nipun Gupta Cc: Nikhil Agarwal Signed-off-by: Linus Torvalds commit 9280c577431401544e63dfb489a830a42bee25eb Author: Chuck Lever Date: Thu Apr 20 13:56:31 2023 -0400 NFSD: Handle new xprtsec= export option Enable administrators to require clients to use transport layer security when accessing particular exports. Signed-off-by: Chuck Lever commit b3cbf98e2fdf3cb147a95161560cd25987284330 Author: Chuck Lever Date: Thu Apr 20 13:56:24 2023 -0400 SUNRPC: Support TLS handshake in the server-side TCP socket code This patch adds opportunitistic RPC-with-TLS to the Linux in-kernel NFS server. If the client requests RPC-with-TLS and the user space handshake agent is running, the server will set up a TLS session. There are no policy settings yet. For example, the server cannot yet require the use of RPC-with-TLS to access its data. Signed-off-by: Chuck Lever commit 22b620ec0bf454cfd1c464f57cfce9afb3fb1e70 Author: Chuck Lever Date: Thu Apr 20 11:02:33 2023 -0400 NFSD: Clean up xattr memory allocation flags Tetsuo Handa points out: > Since GFP_KERNEL is "GFP_NOFS | __GFP_FS", usage like > "GFP_KERNEL | GFP_NOFS" does not make sense. The original intent was to hold the inode lock while estimating the buffer requirements for the requested information. Frank van der Linden, the author of NFSD's xattr code, says: > ... you need inode_lock to get an atomic view of an xattr. Since > both nfsd_getxattr and nfsd_listxattr to the standard trick of > querying the xattr length with a NULL buf argument (just getting > the length back), allocating the right buffer size, and then > querying again, they need to hold the inode lock to avoid having > the xattr changed from under them while doing that. > > From that then flows the requirement that GFP_FS could cause > problems while holding i_rwsem, so I added GFP_NOFS. However, Dave Chinner states: > You can do GFP_KERNEL allocations holding the i_rwsem just fine. > All that it requires is the caller holds a reference to the > inode ... Since these code paths acquire a dentry, they do indeed hold a reference. It is therefore safe to use GFP_KERNEL for these memory allocations. In particular, that's what this code is already doing; but now the C source code looks sane too. At a later time we can revisit in order to remove the inode lock in favor of simply retrying if the estimated buffer size is too small. Reported-by: Tetsuo Handa Signed-off-by: Chuck Lever commit 147abcacee33781e75588869e944ddb07528a897 Author: Dai Ngo Date: Wed Apr 19 10:53:18 2023 -0700 NFSD: Fix problem of COMMIT and NFS4ERR_DELAY in infinite loop The following request sequence to the same file causes the NFS client and server getting into an infinite loop with COMMIT and NFS4ERR_DELAY: OPEN REMOVE WRITE COMMIT Problem reported by recall11, recall12, recall14, recall20, recall22, recall40, recall42, recall48, recall50 of nfstest suite. This patch restores the handling of race condition in nfsd_file_do_acquire with unlink to that prior of the regression. Fixes: ac3a2585f018 ("nfsd: rework refcounting in filecache") Signed-off-by: Dai Ngo Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 695bc1f32c6bc806218b322096b23dfd601e59ca Author: Chuck Lever Date: Mon Apr 17 22:15:28 2023 -0400 SUNRPC: Clear rq_xid when receiving a new RPC Call This is an eye-catcher for tracepoints that record the XID: it means svc_rqst() has not received a full RPC Call with an XID yet. Signed-off-by: Chuck Lever commit 5e052dda121e2870dd87181783da4a95d7d2927b Author: Chuck Lever Date: Mon Apr 17 09:42:14 2023 -0400 SUNRPC: Recognize control messages in server-side TCP socket code To support kTLS, the server-side TCP socket receive path needs to watch for CMSGs. Acked-by: Jakub Kicinski Signed-off-by: Chuck Lever commit 6a0cdf56bfc9a1791ddd6955d60f3678523e599c Author: Chuck Lever Date: Fri Apr 14 20:18:15 2023 -0400 SUNRPC: Be even lazier about releasing pages A single RPC transaction that touches only a couple of pages means rq_pvec will not be even close to full in svc_xpt_release(). This is a common case. Instead, just leave the pages in rq_pvec until it is completely full. This improves the efficiency of the batch release mechanism on workloads that involve small RPC messages. The rq_pvec is also fully emptied just before thread exit. Reviewed-by: Calum Mackay Signed-off-by: Chuck Lever commit 675751bb20634f981498c7d66161584080cc061e Author: Johannes Berg Date: Thu Apr 27 17:59:20 2023 +0200 ring-buffer: Sync IRQ works before buffer destruction If something was written to the buffer just before destruction, it may be possible (maybe not in a real system, but it did happen in ARCH=um with time-travel) to destroy the ringbuffer before the IRQ work ran, leading this KASAN report (or a crash without KASAN): BUG: KASAN: slab-use-after-free in irq_work_run_list+0x11a/0x13a Read of size 8 at addr 000000006d640a48 by task swapper/0 CPU: 0 PID: 0 Comm: swapper Tainted: G W O 6.3.0-rc1 #7 Stack: 60c4f20f 0c203d48 41b58ab3 60f224fc 600477fa 60f35687 60c4f20f 601273dd 00000008 6101eb00 6101eab0 615be548 Call Trace: [<60047a58>] show_stack+0x25e/0x282 [<60c609e0>] dump_stack_lvl+0x96/0xfd [<60c50d4c>] print_report+0x1a7/0x5a8 [<603078d3>] kasan_report+0xc1/0xe9 [<60308950>] __asan_report_load8_noabort+0x1b/0x1d [<60232844>] irq_work_run_list+0x11a/0x13a [<602328b4>] irq_work_tick+0x24/0x34 [<6017f9dc>] update_process_times+0x162/0x196 [<6019f335>] tick_sched_handle+0x1a4/0x1c3 [<6019fd9e>] tick_sched_timer+0x79/0x10c [<601812b9>] __hrtimer_run_queues.constprop.0+0x425/0x695 [<60182913>] hrtimer_interrupt+0x16c/0x2c4 [<600486a3>] um_timer+0x164/0x183 [...] Allocated by task 411: save_stack_trace+0x99/0xb5 stack_trace_save+0x81/0x9b kasan_save_stack+0x2d/0x54 kasan_set_track+0x34/0x3e kasan_save_alloc_info+0x25/0x28 ____kasan_kmalloc+0x8b/0x97 __kasan_kmalloc+0x10/0x12 __kmalloc+0xb2/0xe8 load_elf_phdrs+0xee/0x182 [...] The buggy address belongs to the object at 000000006d640800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 584 bytes inside of freed 1024-byte region [000000006d640800, 000000006d640c00) Add the appropriate irq_work_sync() so the work finishes before the buffers are destroyed. Prior to the commit in the Fixes tag below, there was only a single global IRQ work, so this issue didn't exist. Link: https://lore.kernel.org/linux-trace-kernel/20230427175920.a76159263122.I8295e405c44362a86c995e9c2c37e3e03810aa56@changeid Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Fixes: 15693458c4bc ("tracing/ring-buffer: Move poll wake ups into ring buffer code") Signed-off-by: Johannes Berg Signed-off-by: Steven Rostedt (Google) commit 66b32e3d2c6daeeafb80fa41f3a41e4c0ab85cc6 Author: Jeremy Kerr Date: Thu Mar 30 14:15:33 2023 +0800 i3c: dw: use bus mode rather than device reg for conditional tCAS setting In the clock setup path, we set the hardware DEV_CTRL_I2C_SLAVE_PRESENT bit on a shared mode bus, then read-back this bit for the conditional tCAS set. Instead, just use the bus->mode setting for the conditional test. While we're at it, add a little comment about why the conditional is there. Signed-off-by: Jeremy Kerr Link: https://lore.kernel.org/r/92a933566f7846708a00ad7f5a16ee8e6ed32d0e.1680156630.git.jk@codeconstruct.com.au Signed-off-by: Alexandre Belloni commit 67df5ce9dd8870d3e53de5ebd6aecf609b713044 Author: Matt Johnston Date: Thu Mar 30 14:15:32 2023 +0800 i3c: dw: Return the length from a read priv_xfer We currently assume that the rx_len of a read command will be as submitted, but we may have a shorter read than expected. This change populates the output i3c xfer length from the actually-read length. Signed-off-by: Matt Johnston Signed-off-by: Jeremy Kerr Link: https://lore.kernel.org/r/f4fff7ab18dee1f662dc7a5a4111fcd921e6792b.1680156630.git.jk@codeconstruct.com.au Signed-off-by: Alexandre Belloni commit 3302212f0384ab286b65683bc340f3953f88f70a Author: Philippe De Muyter Date: Wed Apr 26 21:33:02 2023 +0200 regulator: consumer.rst: fix 'regulator_enable' typo. Removing an erroneous 'd' at the end of 'regulator_enable'. Signed-off-by: Philippe De Muyter Cc: Liam Girdwood Cc: Mark Brown Link: https://lore.kernel.org/r/1682537582-2314-1-git-send-email-Philippe.DeMuyter@macq.eu Signed-off-by: Mark Brown commit 110ccfa9dd6ca1272e50fbea614aa31f01d2c17e Author: Enrico Belleri Date: Thu Apr 27 21:16:45 2023 +0200 ASoC: amd: yc: Add ASUS M3402RA into DMI table Fix builtin microphone on ASUS Vivobook S 14 OLED 2022 (M3402RA) Same issue with this model as apparently with other Rembrandt laptops: https://bugzilla.kernel.org/show_bug.cgi?id=216270 Signed-off-by: Enrico Belleri Link: https://lore.kernel.org/r/20230427191645.24519-1-kilgore.trout@idesmi.eu Signed-off-by: Mark Brown commit b413281876292de44ae84e9a9ce9d62e47f266e9 Author: Lucas Tanure Date: Mon Apr 24 12:38:46 2023 +0100 of: fdt: Scan /memreserve/ last Change the scanning /memreserve/ and /reserved-memory node order to fix Kernel panic on Khadas Vim3 Board. If /memreserve/ goes first, the memory is reserved, but nomap can't be applied to the region. So the memory won't be used by Linux, but it is still present in the linear map as normal memory, which allows speculation. Legitimate access to adjacent pages will cause the CPU to end up prefetching into them leading to Kernel panic. So /reserved-memory node should go first, as it has a more updated description of the memory regions and can apply flags, like nomap. Link: https://lore.kernel.org/all/CAJX_Q+1Tjc+-TjZ6JW9X0NxEdFe=82a9626yL63j7uVD4LpxEA@mail.gmail.com/ Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20230424113846.46382-1-tanure@linux.com Signed-off-by: Rob Herring commit d88f2f72ca89ead8743ee15e547274ba248e7c59 Author: Paul Mackerras Date: Mon Apr 24 17:01:32 2023 +1000 mailmap: add entries for Paul Mackerras Link: https://lkml.kernel.org/r/ZEYpTAufVHTvsO1n@cleo Signed-off-by: Paul Mackerras Signed-off-by: Andrew Morton commit 4f20b7471c57032860065591a17efd3325216bde Author: Geert Uytterhoeven Date: Fri Apr 21 16:54:24 2023 +0200 libgcc: add forward declarations for generic library routines With W=1 on platforms that use the generic gcc library routines (csky/loongarch/mips/riscv/sh/xtensa): lib/ashldi3.c:9:19: warning: no previous prototype for '__ashldi3' [-Wmissing-prototypes] 9 | long long notrace __ashldi3(long long u, word_type b) | ^~~~~~~~~ CC lib/ashrdi3.o lib/ashrdi3.c:9:19: warning: no previous prototype for '__ashrdi3' [-Wmissing-prototypes] 9 | long long notrace __ashrdi3(long long u, word_type b) | ^~~~~~~~~ CC lib/cmpdi2.o lib/cmpdi2.c:9:19: warning: no previous prototype for '__cmpdi2' [-Wmissing-prototypes] 9 | word_type notrace __cmpdi2(long long a, long long b) | ^~~~~~~~ CC lib/lshrdi3.o lib/lshrdi3.c:9:19: warning: no previous prototype for '__lshrdi3' [-Wmissing-prototypes] 9 | long long notrace __lshrdi3(long long u, word_type b) | ^~~~~~~~~ CC lib/muldi3.o lib/muldi3.c:49:19: warning: no previous prototype for '__muldi3' [-Wmissing-prototypes] 49 | long long notrace __muldi3(long long u, long long v) | ^~~~~~~~ CC lib/ucmpdi2.o lib/ucmpdi2.c:8:19: warning: no previous prototype for '__ucmpdi2' [-Wmissing-prototypes] 8 | word_type notrace __ucmpdi2(unsigned long long a, unsigned long long b) | ^~~~~~~~~ Fix this by adding forward declarations to the common libgcc header file. Link: https://lkml.kernel.org/r/5cdbe08296693dd53849f199c3933e16e97b33c1.1682088593.git.geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303272214.RxzpA6bP-lkp@intel.com/ Acked-by: Arnd Bergmann Cc: Chris Zankel Cc: Max Filippov Signed-off-by: Andrew Morton commit 4d4b6d66db63ceed399f1fb1a4b24081d2590eb1 Author: Huang Ying Date: Mon Apr 24 14:54:08 2023 +0800 mm,unmap: avoid flushing TLB in batch if PTE is inaccessible 0Day/LKP reported a performance regression for commit 7e12beb8ca2a ("migrate_pages: batch flushing TLB"). In the commit, the TLB flushing during page migration is batched. So, in try_to_migrate_one(), ptep_clear_flush() is replaced with set_tlb_ubc_flush_pending(). In further investigation, it is found that the TLB flushing can be avoided in ptep_clear_flush() if the PTE is inaccessible. In fact, we can optimize in similar way for the batched TLB flushing too to improve the performance. So in this patch, we check pte_accessible() before set_tlb_ubc_flush_pending() in try_to_unmap/migrate_one(). Tests show that the benchmark score of the anon-cow-rand-mt test case of vm-scalability test suite can improve up to 2.1% with the patch on a Intel server machine. The TLB flushing IPI can reduce up to 44.3%. Link: https://lore.kernel.org/oe-lkp/202303192325.ecbaf968-yujie.liu@intel.com Link: https://lore.kernel.org/oe-lkp/ab92aaddf1b52ede15e2c608696c36765a2602c1.camel@intel.com/ Link: https://lkml.kernel.org/r/20230424065408.188498-1-ying.huang@intel.com Fixes: 7e12beb8ca2a ("migrate_pages: batch flushing TLB") Signed-off-by: "Huang, Ying" Reported-by: kernel test robot Reviewed-by: Nadav Amit Reviewed-by: Xin Hao Cc: Mel Gorman Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: David Hildenbrand Signed-off-by: Andrew Morton commit 01106e140835ff94fdef79d66f166b87b0c89824 Author: Christian Brauner Date: Thu Apr 20 10:57:43 2023 +0200 shmem: restrict noswap option to initial user namespace Prevent tmpfs instances mounted in an unprivileged namespaces from evading accounting of locked memory by using the "noswap" mount option. Link: https://lkml.kernel.org/r/20230420-faxen-advokat-40abb4c1a152@brauner Signed-off-by: Christian Brauner Reported-by: Hugh Dickins Link: https://lore.kernel.org/lkml/79eae9fe-7818-a65c-89c6-138b55d609a@google.com Reviewed-by: Luis Chamberlain Cc: Adam Manzanares Cc: Davidlohr Bueso Cc: Kees Cook Cc: Matthew Wilcox (Oracle) Cc: Pankaj Raghav Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 0175ab610c2df7c21d93e4bd63b4e67cfa86737c Author: Hugh Dickins Date: Sat Apr 22 21:47:20 2023 -0700 mm/khugepaged: fix conflicting mods to collapse_file() Inserting Ivan Orlov's syzbot fix commit 2ce0bdfebc74 ("mm: khugepaged: fix kernel BUG in hpage_collapse_scan_file()") ahead of Jiaqi Yan's and David Stevens's commits 12904d953364 ("mm/khugepaged: recover from poisoned file-backed memory") cae106dd67b9 ("mm/khugepaged: refactor collapse_file control flow") ac492b9c70ca ("mm/khugepaged: skip shmem with userfaultfd") (all of which restructure collapse_file()) did not work out well. xfstests generic/086 on huge tmpfs (with accelerated khugepaged) freezes (if not on the first attempt, then the 2nd or 3rd) in find_lock_entries() while doing drop_caches: the file's xarray seems to have been corrupted, with find_get_entry() returning nonsense which makes no progress. Bisection led to ac492b9c70ca; and diff against earlier working linux-next suggested that it's probably down to an errant xas_store(), which does not belong with the later changes (and nor does the positioning of warnings). The later changes look as if they fix the syzbot issue independently. Remove most of what's left of 2ce0bdfebc74: just leave one WARN_ON_ONCE (xas_error) after the final xas_store() of the multi-index entry. Link: https://lkml.kernel.org/r/b6c881-c352-bb91-85a8-febeb09dfd71@google.com Signed-off-by: Hugh Dickins Cc: David Stevens Cc: Ivan Orlov Cc: Jiaqi Yan Signed-off-by: Andrew Morton commit cec24b8b6bb841a19b5c5555b600a511a8988100 Merge: 556eb8b791901 2025b2ca8004c Author: Linus Torvalds Date: Thu Apr 27 12:07:50 2023 -0700 Merge tag 'char-misc-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc drivers updates from Greg KH: "Here is the "big" set of char/misc and other driver subsystems for 6.4-rc1. It's pretty big, but due to the removal of pcmcia drivers, almost breaks even for number of lines added vs. removed, a nice change. Included in here are: - removal of unused PCMCIA drivers (finally!) - Interconnect driver updates and additions - Lots of IIO driver updates and additions - MHI driver updates - Coresight driver updates - NVMEM driver updates, which required some OF updates - W1 driver updates and a new maintainer to manage the subsystem - FPGA driver updates - New driver subsystem, CDX, for AMD systems - lots of other small driver updates and additions All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (196 commits) mcb-lpc: Reallocate memory region to avoid memory overlapping mcb-pci: Reallocate memory region to avoid memory overlapping mcb: Return actual parsed size when reading chameleon table kernel/configs: Drop Android config fragments virt: acrn: Replace obsolete memalign() with posix_memalign() spmi: Add a check for remove callback when removing a SPMI driver spmi: fix W=1 kernel-doc warnings spmi: mtk-pmif: Drop of_match_ptr for ID table spmi: pmic-arb: Convert to platform remove callback returning void spmi: mtk-pmif: Convert to platform remove callback returning void spmi: hisi-spmi-controller: Convert to platform remove callback returning void w1: gpio: remove unnecessary ENOMEM messages w1: omap-hdq: remove unnecessary ENOMEM messages w1: omap-hdq: add SPDX tag w1: omap-hdq: allow compile testing w1: matrox: remove unnecessary ENOMEM messages w1: matrox: use inline over __inline__ w1: matrox: switch from asm to linux header w1: ds2482: do not use assignment in if condition w1: ds2482: drop unnecessary header ... commit 556eb8b79190151506187bf0b16dda423c34d9a8 Merge: 97b2ff294381d 046b6a171009e Author: Linus Torvalds Date: Thu Apr 27 11:53:57 2023 -0700 Merge tag 'driver-core-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the large set of driver core changes for 6.4-rc1. Once again, a busy development cycle, with lots of changes happening in the driver core in the quest to be able to move "struct bus" and "struct class" into read-only memory, a task now complete with these changes. This will make the future rust interactions with the driver core more "provably correct" as well as providing more obvious lifetime rules for all busses and classes in the kernel. The changes required for this did touch many individual classes and busses as many callbacks were changed to take const * parameters instead. All of these changes have been submitted to the various subsystem maintainers, giving them plenty of time to review, and most of them actually did so. Other than those changes, included in here are a small set of other things: - kobject logging improvements - cacheinfo improvements and updates - obligatory fw_devlink updates and fixes - documentation updates - device property cleanups and const * changes - firwmare loader dependency fixes. All of these have been in linux-next for a while with no reported problems" * tag 'driver-core-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (120 commits) device property: make device_property functions take const device * driver core: update comments in device_rename() driver core: Don't require dynamic_debug for initcall_debug probe timing firmware_loader: rework crypto dependencies firmware_loader: Strip off \n from customized path zram: fix up permission for the hot_add sysfs file cacheinfo: Add use_arch[|_cache]_info field/function arch_topology: Remove early cacheinfo error message if -ENOENT cacheinfo: Check cache properties are present in DT cacheinfo: Check sib_leaf in cache_leaves_are_shared() cacheinfo: Allow early level detection when DT/ACPI info is missing/broken cacheinfo: Add arm64 early level initializer implementation cacheinfo: Add arch specific early level initializer tty: make tty_class a static const structure driver core: class: remove struct class_interface * from callbacks driver core: class: mark the struct class in struct class_interface constant driver core: class: make class_register() take a const * driver core: class: mark class_release() as taking a const * driver core: remove incorrect comment for device_create* MIPS: vpe-cmp: remove module owner pointer from struct class usage. ... commit 97b2ff294381d05e59294a931c4db55276470cb5 Merge: b39667abcdcc7 3fac2397f562e Author: Linus Torvalds Date: Thu Apr 27 11:49:35 2023 -0700 Merge tag 'staging-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here is the large set of staging driver updates for 6.4-rc1. Once again, we removed more code than was added, a nice trend. It was a calm cycle, mostly all just small coding style cleanups, included in here are: - removal of the greybus loopback testing tools, userspace code that didn't belong in a driver subdirectory and was causing problems for some build systems - platform remove callback cleanups - rtl8192e huge cleanups - other small staging driver cleanups. All of these have been in linux-next for a while with no reported problems" * tag 'staging-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (185 commits) staging: rtl8192e: Fix W_DISABLE# does not work after stop/start staging: rtl8192e: Remove unchanged variables bfsync_processing and more staging: rtl8192e: Remove unchanged variable frame_sync_monitor staging: rtl8192e: Remove unchanged variable chan_forced staging: rtl8192e: Remove set to true while true of bfirst_after_down staging: rtl8192e: Remove second initialization of bActuallySet staging: rtl8192e: Remove unused macro RT_SET_PS_LEVEL staging: rtl8192e: Remove unused function rtl92e_disable_nic staging: rtl8192e: Remove unchanged variable RegRfPsLevel staging: rtl8172: Add blank lines after declarations staging: rtl8192e: Remove unused variable RF_Type staging: rtl8192e: Remove one of two checks for hardware RTL8192SE staging: rtl8192e: Remove unused function _rtl92e_dm_init_wa_broadcom_iot staging: rtl8192e: Remove macro IS_HARDWARE_TYPE_8192SE staging: greybus: drop loopback test files staging: rtl8192e: Add blank lines after declarations staging: rtl8192e: avoid CamelCase staging: rtl8192e: avoid CamelCase staging: rtl8192e: avoid CamelCase staging: rtl8192e: fix alignment to match open parenthesis ... commit b39667abcdcc754e32a0eb0df9cf49d45333d4ae Merge: 4010e62b5b684 2b3174c96696c Author: Linus Torvalds Date: Thu Apr 27 11:46:26 2023 -0700 Merge tag 'tty-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty / serial updates from Greg KH: "Here is the big set of tty/serial driver updates for 6.4-rc1. Nothing major, just lots of tiny, constant, forward development. This includes: - obligatory n_gsm updates and feature additions - 8250_em driver updates - sh-sci driver updates - dts cleanups and updates - general cleanups and improvements by Ilpo and Jiri - other small serial driver core fixes and driver updates All of these have been in linux-next for a while with no reported problems" * tag 'tty-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (87 commits) n_gsm: Use array_index_nospec() with index that comes from userspace tty: vt: drop checks for undefined VT_SINGLE_DRIVER tty: vt: distribute EXPORT_SYMBOL() tty: vt: simplify some cases in tioclinux() tty: vt: reformat tioclinux() tty: serial: sh-sci: Fix end of transmission on SCI tty: serial: sh-sci: Add support for tx end interrupt handling tty: serial: sh-sci: Fix TE setting on SCI IP tty: serial: sh-sci: Add RZ/G2L SCIFA DMA rx support tty: serial: sh-sci: Add RZ/G2L SCIFA DMA tx support serial: max310x: fix IO data corruption in batched operations serial: core: Disable uart_start() on uart_remove_one_port() serial: 8250: Reinit port->pm on port specific driver unbind serial: 8250: Add missing wakeup event reporting tty: serial: fsl_lpuart: use UARTMODIR register bits for lpuart32 platform tty: serial: fsl_lpuart: adjust buffer length to the intended size serial: fix TIOCSRS485 locking serial: make SiFive serial drivers depend on ARCH_ symbols tty: synclink_gt: don't allocate and pass dummy flags tty: serial: simplify qcom_geni_serial_send_chunk_fifo() ... commit 4010e62b5b684d7a6090f3f9c69f8a5be31910e5 Merge: b02847fc2e7a5 8f40fc0808137 Author: Linus Torvalds Date: Thu Apr 27 11:42:11 2023 -0700 Merge tag 'usb-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt updates from Greg KH: "Here is the large set of USB and Thunderbolt changes for 6.4-rc1. The "biggest" thing in here is the removal of two obsolete drivers, u132-hcd and ftdi-elan, making this a net-removal of code overall. Other than the driver removals, included in here are: - Thunderbolt updates for new hardware and features - xhci driver updates and fixes - dwc3 driver updates and fixes - gadget core and driver updates and features added - mtu3 driver updates - dwc2 driver fixes and updates - usb-serial driver updates - typec driver updates and fixes - platform remove callback changes - dts updates and conversions - other small changes All have been in linux-next for a while with no reported problems" * tag 'usb-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (177 commits) usb: dwc3: gadget: Refactor EP0 forced stall/restart into a separate API usb: dwc3: gadget: Execute gadget stop after halting the controller media: radio-shark: Add endpoint checks USB: sisusbvga: Add endpoint checks USB: core: Add routines for endpoint checks in old drivers usb: dwc3: gadget: Stall and restart EP0 if host is unresponsive dt-bindings: usb: snps,dwc3: Add 'snps,parkmode-disable-hs-quirk' quirk usb: dwc3: core: add support for disabling High-speed park mode dt-bindings: usb: ci-hdrc-usb2: allow multiple PHYs usb: mtu3: add optional clock xhci_ck and frmcnt_ck dt-bindings: usb: mtu3: add two optional clocks usb: mtu3: expose role-switch control to userspace usb: mtu3: unlock @mtu->lock just before giving back request usb: mtu3: fix kernel panic at qmu transfer done irq handler usb: mtu3: use boolean return value usb: mtu3: give back request when rx error happens usb: chipidea: fix missing goto in `ci_hdrc_probe` usb: gadget: udc: core: Prevent redundant calls to pullup usb: gadget: udc: core: Invoke usb_gadget_connect only when started usb: typec: ucsi: don't print PPM init deferred errors ... commit b02847fc2e7a55b7247cf80c14527555bdc965af Merge: 34da76dca4673 02dc51a0a07a3 Author: Linus Torvalds Date: Thu Apr 27 11:27:48 2023 -0700 Merge tag 'firewire-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire updates from Takashi Sakamoto: "The pull request includes a few changes, Its main purpose is to prepare for my future work by taking over maintainership from Stefan Richter. I have plans to work on several items; e.g. packet processing in workqueue context instead of tasklet. As you may be aware, the IEEE 1394 technology is outdated. However, we still have users. It is better to ensure a smooth transition for the users to shift to other categories of devices" * tag 'firewire-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: init_ohci1394_dma: use correct function names in comments MAINTAINERS: replace maintainer of FireWire subsystem commit 34da76dca4673ab1819830b4924bb5b436325b26 Merge: 725a345b2ee3c c3a6ef330a08e Author: Linus Torvalds Date: Thu Apr 27 11:23:36 2023 -0700 Merge tag 'for-linus-2023042601' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: - import a bunch of HID selftests from out-of-tree hid-tools project (Benjamin Tissoires) - drastically reducing Bluetooth disconnects on hid-nintendo driven devices (Daniel J. Ogorchock) - lazy initialization of battery interfaces in wacom driver (Jason Gerecke) - generic support for all Kye tablets (David Yang) - proper rumble queue overrun handling in hid-nintendo (Daniel J. Ogorchock) - support for ADC measurement in logitech-hidpp driver (Bastien Nocera) - reset GPIO support in i2c-hid (Hans de Goede) - improved handling of generic "Digitizer" usage (Jason Gerecke) - support for KEY_CAMERA_FOCUS (Feng Qi) - quirks for Apple Geyser 3 and Apple Geyser 4 (Alex Henrie) - assorted functional fixes and device ID additions * tag 'for-linus-2023042601' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (54 commits) HID: amd_sfh: Fix max supported HID devices HID: wacom: generic: Set battery quirk only when we see battery data HID: wacom: Lazy-init batteries HID: Ignore battery for ELAN touchscreen on ROG Flow X13 GV301RA HID: asus: explicitly include linux/leds.h HID: lg-g15: explicitly include linux/leds.h HID: steelseries: explicitly include linux/leds.h HID: apple: Set the tilde quirk flag on the Geyser 3 HID: apple: explicitly include linux/leds.h HID: mcp2221: fix get and get_direction for gpio HID: mcp2221: fix report layout for gpio get HID: wacom: Set a default resolution for older tablets HID: i2c-hid-of: Add reset GPIO support to i2c-hid-of HID: i2c-hid-of: Allow using i2c-hid-of on non OF platforms HID: i2c-hid-of: Consistenly use dev local variable in probe() HID: kye: Fix rdesc for kye tablets HID: amd_sfh: Support for additional light sensor HID: amd_sfh: Handle "no sensors" enabled for SFH1.1 HID: amd_sfh: Increase sensor command timeout for SFH1.1 HID: amd_sfh: Correct the stop all command ... commit 725a345b2ee3c24f9ac2078eb73667e22a1b7214 Merge: 89555eebb9fb6 60ed3cd85b951 Author: Linus Torvalds Date: Thu Apr 27 11:19:51 2023 -0700 Merge tag 'fbdev-for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev updates from Helge Deller: "Nothing really exiting in here. The majority of lines changed is due to Uwe's preparation patches to change the return value of the .remove() callback to void. Summary: - vt_buffer.h: Fix build on alpha (Randy Dunlap) - mmp: Clock handling fix (Christophe JAILLET) - 68328fb, ps3fb, vfb: Init .owner field of struct fb_ops (Thomas Zimmermann) - fbdev: cg14: Convert to platform remove callback returning void - Preparation patches to convert drivers to return void in .remove() callback (Uwe Kleine-König) - Drop Paul Mackerras as rage128 maintainer" * tag 'fbdev-for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: (51 commits) MAINTAINERS: Remove rage128 framebuffer driver maintainer fbdev: vfb: Init owner field of struct fb_ops fbdev: ps3fb: Init owner field of struct fb_ops fbdev: 68328fb: Init owner field of struct fb_ops fbdev: mmp: Fix deferred clk handling in mmphw_probe() linux/vt_buffer.h: allow either builtin or modular for macros fbdev: xilinxfb: Convert to platform remove callback returning void fbdev: wmt_ge_rops: Convert to platform remove callback returning void fbdev: wm8505fb: Convert to platform remove callback returning void fbdev: vt8500lcdfb: Convert to platform remove callback returning void fbdev: via: Convert to platform remove callback returning void fbdev: vga16fb: Convert to platform remove callback returning void fbdev: vfb: Convert to platform remove callback returning void fbdev: vesafb: Convert to platform remove callback returning void fbdev: uvesafb: Convert to platform remove callback returning void fbdev: tcx: Convert to platform remove callback returning void fbdev: sm501fb: Convert to platform remove callback returning void fbdev: simplefb: Convert to platform remove callback returning void fbdev: sh_mobile_lcdcfb: Convert to platform remove callback returning void fbdev: sh7760fb: Convert to platform remove callback returning void ... commit 89555eebb9fb603ad43c0def8ab35e76c210002f Merge: d91f6a7307d27 38c87827ffd3c Author: Linus Torvalds Date: Thu Apr 27 11:15:36 2023 -0700 Merge tag 'i2c-for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "Mostly fixes for DTs or DT handling this time. And a few driver bugfixes" * tag 'i2c-for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (28 commits) i2c: xiic: xiic_xfer(): Fix runtime PM leak on error path i2c: cadence: cdns_i2c_master_xfer(): Fix runtime PM leak on error path i2c: omap: Improve error reporting for problems during .remove() i2c: cadence: Add reset controller support dt-bindings: i2c: cadence: Document `resets` property i2c: mediatek: add support for MT7981 SoC dt-bindings: i2c: i2c-mt65xx: add MediaTek MT7981 SoC dt-bindings: i2c: Drop unneeded quotes i2c: brcmstb: use devm_platform_ioremap_resource_byname() i2c: cadence: Detect maximum transfer size i2c: cadence: Allow to specify the FIFO depth dt-bindings: i2c: cadence: Document `fifo-depth` property i2c: xiic: Use devm_platform_get_and_ioremap_resource() i2c: mpc: Use i2c-scl-clk-low-timeout-us i2c property i2c: mpc: Use of_property_read_u32 instead of of_get_property dt-bindings: i2c: mpc: Mark "fsl,timeout" as deprecated i2c: xiic: hide OF related data for COMPILE_TEST i2c: synquacer: mark OF related data as maybe unused dt-bindings: i2c: i2c-mt65xx: Add compatible for MT6795 Helio X10 i2c: imx: Simplify using devm_clk_get_enabled() ... commit d91f6a7307d27eae7b954c82bebf55071914c3f2 Merge: fc2e58b8b7c94 d08076678ce72 Author: Linus Torvalds Date: Thu Apr 27 11:07:18 2023 -0700 Merge tag 'for-linus-6.4-1' of https://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "Minor bug fixes for the IPMI driver There was a bug in the SSIF driver where in certain conditions it could stop working. Outside of that: spelling fixes, removing some dead code, re-adding a missing statistic increment, and removal of register_sysctl_table()" * tag 'for-linus-6.4-1' of https://github.com/cminyard/linux-ipmi: ipmi:ssif: Drop if blocks with always false condition ipmi: fix SSIF not responding under certain cond. ipmi:ssif: Add send_retries increment char:ipmi:Fix spelling mistake "asychronously" -> "asynchronously" ipmi: simplify sysctl registration ipmi: ASPEED_BT_IPMI_BMC: select REGMAP_MMIO instead of depending on it commit fc2e58b8b7c94b8fe23977775550de00472f6a74 Merge: 1c15ca4e4efad cc5f6fa4f6590 Author: Linus Torvalds Date: Thu Apr 27 11:02:26 2023 -0700 Merge tag 'spi-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "A fairly standard release for SPI with the exception of a change to the API for specifying chip selects done in preparation for supporting devices with more than one chip select, this required some mechanical changes throughout the tree which have been cooking in -next happily for a while. There's also a new API to allow us to support TPM chips on half duplex controllers. Summary: - Refactoring in preparation for supporting multiple chip selects for a single device, needed by some flash devices, which required a change in the SPI device API visible throughout the tree - Support for hardware assisted interaction with SPI TPMs on half duplex controllers, implemented on nVidia Tedra210 QuadSPI - Optimisation for large transfers on fsl-cpm devices - Cleanups around device property use which fix some sisues with fwnode - Use of both void remove() and devm_platform_.*ioremap_resource() - Support for AMD Pensando Elba, Amlogic A1, Cadence device mode, Intel MetorLake-S and StarFive J7110 QuadSPI" * tag 'spi-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (185 commits) spi: bcm63xx: use macro DEFINE_SIMPLE_DEV_PM_OPS spi: tegra210-quad: Enable TPM wait polling spi: Add TPM HW flow flag spi: bcm63xx: remove PM_SLEEP based conditional compilation spi: cadence-quadspi: use macro DEFINE_SIMPLE_DEV_PM_OPS spi: spi-cadence: Add support for Slave mode spi: spi-cadence: Switch to spi_controller structure spi: cadence-quadspi: fix suspend-resume implementations spi: dw: Add support for AMD Pensando Elba SoC spi: dw: Add AMD Pensando Elba SoC SPI Controller spi: cadence-quadspi: Disable the SPI before reconfiguring spi: cadence-quadspi: Update the read timeout based on the length spi: spi-loopback-test: Add module param for iteration length spi: add support for Amlogic A1 SPI Flash Controller dt-bindings: spi: add Amlogic A1 SPI controller spi: fsl-spi: No need to check transfer length versus word size spi: fsl-spi: Change mspi_apply_cpu_mode_quirks() to void spi: fsl-cpm: Use 16 bit mode for large transfers with even size spi: fsl-spi: Re-organise transfer bits_per_word adaptation spi: fsl-spi: Fix CPM/QE mode Litte Endian ... commit 1c15ca4e4efaddb78f83eed31eeee34c522c3ae2 Merge: 34b62f186db96 baa6584a24494 Author: Linus Torvalds Date: Thu Apr 27 10:58:37 2023 -0700 Merge tag 'sound-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "At this time, it's an interesting mixture of changes for both old and new stuff. Majority of changes are about ASoC (lots of systematic changes for converting remove callbacks to void, and cleanups), while we got the fixes and the enhancements of very old PCI cards, too. Here are some highlights: ALSA/ASoC Core: - Continued effort of more ASoC core cleanups - Minor improvements for XRUN handling in indirect PCM helpers - Code refactoring of PCM core code ASoC: - Continued feature and simplification work on SOF, including addition of a no-DSP mode for bringup, HDA MLink and extensions to the IPC4 protocol - Hibernation support for CS35L45 - More DT binding conversions - Support for Cirrus Logic CS35L56, Freescale QMC, Maxim MAX98363, nVidia systems with MAX9809x and RT5631, Realtek RT712, Renesas R-Car Gen4, Rockchip RK3588 and TI TAS5733 ALSA: - Lots of works for legacy emu10k1 and ymfpci PCI drivers - PCM kselftest fixes and enhancements" * tag 'sound-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (586 commits) ALSA: emu10k1: use high-level I/O in set_filterQ() ALSA: emu10k1: use high-level I/O functions also during init ALSA: emu10k1: fix error handling in snd_audigy_i2c_volume_put() ALSA: emu10k1: don't stop DSP in _snd_emu10k1_{,audigy_}init_efx() ALSA: emu10k1: fix SNDRV_EMU10K1_IOCTL_SINGLE_STEP ALSA: emu10k1: skip Sound Blaster-specific hacks for E-MU cards ALSA: emu10k1: fixup DSP defines ALSA: emu10k1: pull in some register definitions from kX-project ALSA: emu10k1: remove some bogus defines ALSA: emu10k1: eliminate some unused defines ALSA: emu10k1: fix lineup of EMU_HANA_* defines ALSA: emu10k1: comment updates ALSA: emu10k1: fix snd_emu1010_fpga_read() input masking for rev2 cards ALSA: emu10k1: remove unused emu->pcm_playback_efx_substream field ALSA: emu10k1: remove unused `resume` parameter from snd_emu10k1_init() ALSA: emu10k1: minor optimizations ALSA: emu10k1: remove remaining cruft from snd_emu10k1_emu1010_init() ALSA: emu10k1: remove apparently pointless EMU_HANA_OPTION_CARDS reads ALSA: emu10k1: remove apparently pointless FPGA reads ALSA: emu10k1: stop doing weird things with HCFG in snd_emu10k1_emu1010_init() ... commit 34b62f186db9614e55d021f8c58d22fc44c57911 Merge: cb6fe2ceb667e 09a8e5f01dfb3 Author: Linus Torvalds Date: Thu Apr 27 10:45:30 2023 -0700 Merge tag 'pci-v6.4-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci updates from Bjorn Helgaas: "Resource management: - Add pci_dev_for_each_resource() and pci_bus_for_each_resource() iterators PCIe native device hotplug: - Fix AB-BA deadlock between reset_lock and device_lock Power management: - Wait longer for devices to become ready after resume (as we do for reset) to accommodate Intel Titan Ridge xHCI devices - Extend D3hot delay for NVIDIA HDA controllers to avoid unrecoverable devices after a bus reset Error handling: - Clear PCIe Device Status after EDR since generic error recovery now only clears it when AER is native ASPM: - Work around Chromebook firmware defect that clobbers Capability list (including ASPM L1 PM Substates Cap) when returning from D3cold to D0 Freescale i.MX6 PCIe controller driver: - Install imprecise external abort handler only when DT indicates PCIe support Freescale Layerscape PCIe controller driver: - Add ls1028a endpoint mode support Qualcomm PCIe controller driver: - Add SM8550 DT binding and driver support - Add SDX55 DT binding and driver support - Use bulk APIs for clocks of IP 1.0.0, 2.3.2, 2.3.3 - Use bulk APIs for reset of IP 2.1.0, 2.3.3, 2.4.0 - Add DT "mhi" register region for supported SoCs - Expose link transition counts via debugfs to help debug low power issues - Support system suspend and resume; reduce interconnect bandwidth and turn off clock and PHY if there are no active devices - Enable async probe by default to reduce boot time Miscellaneous: - Sort controller Kconfig entries by vendor" * tag 'pci-v6.4-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: (56 commits) PCI: xilinx: Drop obsolete dependency on COMPILE_TEST PCI: mobiveil: Sort Kconfig entries by vendor PCI: dwc: Sort Kconfig entries by vendor PCI: Sort controller Kconfig entries by vendor PCI: Use consistent controller Kconfig menu entry language PCI: xilinx-nwl: Add 'Xilinx' to Kconfig prompt PCI: hv: Add 'Microsoft' to Kconfig prompt PCI: meson: Add 'Amlogic' to Kconfig prompt PCI: Use of_property_present() for testing DT property presence PCI/PM: Extend D3hot delay for NVIDIA HDA controllers dt-bindings: PCI: qcom: Document msi-map and msi-map-mask properties PCI: qcom: Add SM8550 PCIe support dt-bindings: PCI: qcom: Add SM8550 compatible PCI: qcom: Add support for SDX55 SoC dt-bindings: PCI: qcom-ep: Fix the unit address used in example dt-bindings: PCI: qcom: Add SDX55 SoC dt-bindings: PCI: qcom: Update maintainers entry PCI: qcom: Enable async probe by default PCI: qcom: Add support for system suspend and resume PCI/PM: Drop pci_bridge_wait_for_secondary_bus() timeout parameter ... commit bd4468295e7a335319c10affdf594b56f1e6c0a4 Author: Artem Bityutskiy Date: Wed Apr 19 17:39:47 2023 +0300 intel_idle: mark few variables as __read_mostly The intention is to clean up the code and make it look a bit more consistent. Mark all unitialized module parameter variables as __read_mostly, not just one of them. The other parameters are read-mostly too. Signed-off-by: Artem Bityutskiy Signed-off-by: Rafael J. Wysocki commit 4152379a701ad66b6c4e1c9fc93704d993e49615 Author: Artem Bityutskiy Date: Thu Apr 20 09:47:21 2023 +0300 intel_idle: do not sprinkle module parameter definitions around This is a cleanup which improves code consistency. Move the force_irq_on module parameter variable and definition to the same place where we have variables and definitions for other module parameters. Signed-off-by: Artem Bityutskiy Reviewed-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit db1ae0c99950502d10e09d0c57ed1e16cd854b20 Author: Artem Bityutskiy Date: Wed Apr 19 17:39:45 2023 +0300 intel_idle: fix confusing message By default, all non-POLL C-states are entered with interrupts disabled. There are 2 ways to make 'intel_idle' enter C-states with interrupts enabled: 1. Mark the C-state with the CPUIDLE_FLAG_IRQ_ENABLE flag. 2. Use the force_irq_on module parameter. The former is the "proper" way of doing it, it is per-C-state and per-platform. The latter is for debugging purposes only. The problem is that intel_idle prints the "forced intel_idle_irq" message in both cases, even though the former case does not needed this message, because nothing is forced there. This patch addresses the problem. Signed-off-by: Artem Bityutskiy Reviewed-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 00433eae1771d355f20c152ddc5976baedb427e2 Author: Artem Bityutskiy Date: Wed Apr 19 17:39:44 2023 +0300 intel_idle: improve C-state flags handling robustness The following C-state flags are currently mutually-exclusive and should not be combined: * IRQ_ENABLE * IBRS * XSTATE There is a warning for the situation when the IRQ_ENABLE flag is combined with the IBRS flag, but no warnings for other combinations. This is inconsistent and prone to errors. Improve the situation by adding warnings for all the unexpected combinations. Add a couple of helpful commentaries too. Signed-off-by: Artem Bityutskiy Reviewed-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 1abffbd827668b3b44c34b168ccb5ee2866714a8 Author: Artem Bityutskiy Date: Wed Apr 19 17:39:43 2023 +0300 intel_idle: further intel_idle_init_cstates_icpu() cleanup Introduce a temporary 'state' variable for referencing the currently processed C-state in the intel_idle_init_cstates_icpu() function. This makes code lines shorter and easier to read. Signed-off-by: Artem Bityutskiy Reviewed-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit a78032e94bf16e9c53238cd83c82095b4a251d4b Author: Artem Bityutskiy Date: Thu Apr 20 09:47:18 2023 +0300 intel_idle: clean up intel_idle_init_cstates_icpu() The intel_idle_init_cstates_icpu() function includes a loop that iterates over every C-state. Inside the loop, the same C-state data is referenced 2 ways: 1. as cpuidle_state_table[cstate] 2. as drv->states[drv->state_count] (but it is a copy of #1, not the same object). Make the code be more consistent and easier to read by using only the 2nd way. So the code structure would be as follows: 1. Use cpuidle_state_table[cstate] 2. Copy cpuidle_state_table[cstate] to drv->states[drv->state_count] 3. Use only drv->states[drv->state_count] from this point. Note, this change introduces a checkpatch.pl warning (too long line), but it will be addressed in the next patch. Signed-off-by: Artem Bityutskiy Reviewed-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 91048ce4227868000bfe624707e42274ef2198aa Author: Artem Bityutskiy Date: Wed Apr 19 17:39:41 2023 +0300 intel_idle: use pr_info() instead of printk() Substitute 'printk()' with 'pr_info()', because 'intel_idle' already uses 'pr_debug()', so using 'pr_info()' will be more consistent. In addition to this, this patch addresses the following checkpatch.pl warning: WARNING: printk() should include KERN_ facility level Signed-off-by: Artem Bityutskiy Reviewed-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 2b6a7409ac390d3edb49822ea602ac129486ea3f Author: Rafael J. Wysocki Date: Wed Apr 26 18:46:05 2023 +0200 thermal: intel: menlow: Get rid of this driver According to my information, there are no active users of this driver in the field. Moreover, it does some really questionable things and gets in the way of thermal core improvements, so drop it. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit a4b81715a58e0ddf10bc2df2185566b73b9ae616 Author: Daniel Lezcano Date: Wed Apr 19 10:33:42 2023 +0200 ACPI: thermal: Move to dedicated function sysfs extra attr creation The ACPI thermal driver creates extra sysfs attributes in its own directory pointing to the thermal zone it is related to and add a pointer to the sysfs ACPI thermal device from the thermal zone sysfs entry. This is very specific to this ACPI thermal driver, let's encapsulate the related creation/deletion code to group it inside a function we can identify later for removal if needed. Signed-off-by: Daniel Lezcano [ rjw: Subject adjustment, removal of trailing white space ] Signed-off-by: Rafael J. Wysocki commit 66d39e74bf490fb1ef90e13086b68d6df6e6ad06 Author: Daniel Lezcano Date: Wed Apr 19 10:33:40 2023 +0200 ACPI: thermal: Use thermal_zone_device() In order to get the device associated with the thermal zone, let's use the wrapper thermal_zone_device() instead of accessing directly the content of the thermal zone device structure. Signed-off-by: Daniel Lezcano [ rjw: Subject adjustment, removal of trailing white space ] Signed-off-by: Rafael J. Wysocki commit ba7894be5e57d5c154c793e5411889275e68644e Author: Daniel Lezcano Date: Wed Apr 19 10:33:39 2023 +0200 thermal: intel: pch_thermal: Use thermal driver device to write a trace The pch_critical() callback accesses the thermal zone device structure internals, it dereferences the thermal zone struct device and the 'type'. Use the available accessors instead of accessing the structure directly. Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 7cefbaf081eb7c114299f7478ed4fa0d90ec90bb Author: Daniel Lezcano Date: Wed Apr 19 10:33:38 2023 +0200 thermal: core: Encapsulate tz->device field There are still some drivers needing to play with the thermal zone device internals. That is not the best but until we can figure out if the information is really needed, let's encapsulate the field used in the thermal zone device structure, so we can move forward relocating the thermal zone device structure definition in the thermal framework private headers. Some drivers are accessing tz->device, that implies they need to have the knowledge of the thermal_zone_device structure but we want to self-encapsulate this structure and reduce the scope of the structure to the thermal core only. By adding this wrapper, these drivers won't need the thermal zone device structure definition and are no longer an obstacle to its relocation to the private thermal core headers. Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit e4006bfec12cec4fb251de860d384dd34e6df346 Author: Zhang Rui Date: Tue Mar 21 13:47:14 2023 +0800 thermal: gov_step_wise: Adjust code logic to match comment For the algorithm of choosing the next target state in step_wise governor, the code does the right thing but is implemented in a way different from what the comment describes. And this hurts the code readability. As the logic in the comment is simpler, adjust the code logic to align with the comment. No functional change. Signed-off-by: Zhang Rui [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit cead266cdbcfa471f54590ebfd3ebf303f99123f Author: Zhang Rui Date: Tue Mar 21 13:47:13 2023 +0800 thermal: gov_step_wise: Delete obsolete comment Commit 4102c4042a33 ("thermal/core: Remove DROP_FULL and RAISE_FULL") removes support for THERMAL_TREND_RAISE_FULL/DROP_FULL but leaves the comment unchanged. Delete the obsolte comment about THERMAL_TREND_RAISE_FULL/DROP_FULL. Fixes: 4102c4042a33 ("thermal/core: Remove DROP_FULL and RAISE_FULL") Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit cb6fe2ceb667eb78f252d473b03deb23999ab1cf Merge: d42b1c47570eb 1c5e9170ad93d Author: Linus Torvalds Date: Thu Apr 27 10:09:05 2023 -0700 Merge tag 'devicetree-for-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull more devicetree updates from Rob Herring: - First part of DT header detangling dropping cpu.h from of_device.h and replacing some includes with forward declarations. A handful of drivers needed some adjustment to their includes as a result. - Refactor of_device.h to be used by bus drivers rather than various device drivers. This moves non-bus related functions out of of_device.h. The end goal is for of_platform.h and of_device.h to stop including each other. - Refactor open coded parsing of "ranges" in some bus drivers to use DT address parsing functions - Add some new address parsing functions of_property_read_reg(), of_range_count(), and of_range_to_resource() in preparation to convert more open coded parsing of DT addresses to use them. - Treewide clean-ups to use of_property_read_bool() and of_property_present() as appropriate. The ones here are the ones that didn't get picked up elsewhere. * tag 'devicetree-for-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (34 commits) bus: tegra-gmi: Replace of_platform.h with explicit includes hte: Use of_property_present() for testing DT property presence w1: w1-gpio: Use of_property_read_bool() for boolean properties virt: fsl: Use of_property_present() for testing DT property presence soc: fsl: Use of_property_present() for testing DT property presence sbus: display7seg: Use of_property_read_bool() for boolean properties sparc: Use of_property_read_bool() for boolean properties sparc: Use of_property_present() for testing DT property presence bus: mvebu-mbus: Remove open coded "ranges" parsing of/address: Add of_property_read_reg() helper of/address: Add of_range_count() helper of/address: Add support for 3 address cell bus of/address: Add of_range_to_resource() helper of: unittest: Add bus address range parsing tests of: Drop cpu.h include from of_device.h OPP: Adjust includes to remove of_device.h irqchip: loongson-eiointc: Add explicit include for cpuhotplug.h cpuidle: Adjust includes to remove of_device.h cpufreq: sun50i: Add explicit include for cpu.h cpufreq: Adjust includes to remove of_device.h ... commit 5904de0d735bbb3b4afe9375c5b4f9748f882945 Author: Chen Yu Date: Fri Apr 14 20:10:42 2023 +0800 PM: hibernate: Do not get block device exclusively in test_resume mode The system refused to do a test_resume because it found that the swap device has already been taken by someone else. Specifically, the swsusp_check()->blkdev_get_by_dev(FMODE_EXCL) is supposed to do this check. Steps to reproduce: dd if=/dev/zero of=/swapfile bs=$(cat /proc/meminfo | awk '/MemTotal/ {print $2}') count=1024 conv=notrunc mkswap /swapfile swapon /swapfile swap-offset /swapfile echo 34816 > /sys/power/resume_offset echo test_resume > /sys/power/disk echo disk > /sys/power/state PM: Using 3 thread(s) for compression PM: Compressing and saving image data (293150 pages)... PM: Image saving progress: 0% PM: Image saving progress: 10% ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300) ata1.00: configured for UDMA/100 ata2: SATA link down (SStatus 0 SControl 300) ata5: SATA link down (SStatus 0 SControl 300) ata6: SATA link down (SStatus 0 SControl 300) ata3: SATA link down (SStatus 0 SControl 300) ata4: SATA link down (SStatus 0 SControl 300) PM: Image saving progress: 20% PM: Image saving progress: 30% PM: Image saving progress: 40% PM: Image saving progress: 50% pcieport 0000:00:02.5: pciehp: Slot(0-5): No device found PM: Image saving progress: 60% PM: Image saving progress: 70% PM: Image saving progress: 80% PM: Image saving progress: 90% PM: Image saving done PM: hibernation: Wrote 1172600 kbytes in 2.70 seconds (434.29 MB/s) PM: S| PM: hibernation: Basic memory bitmaps freed PM: Image not found (code -16) This is because when using the swapfile as the hibernation storage, the block device where the swapfile is located has already been mounted by the OS distribution(usually mounted as the rootfs). This is not an issue for normal hibernation, because software_resume()->swsusp_check() happens before the block device(rootfs) mount. But it is a problem for the test_resume mode. Because when test_resume happens, the block device has been mounted already. Thus remove the FMODE_EXCL for test_resume mode. This would not be a problem because in test_resume stage, the processes have already been frozen, and the race condition described in Commit 39fbef4b0f77 ("PM: hibernate: Get block device exclusively in swsusp_check()") is unlikely to happen. Fixes: 39fbef4b0f77 ("PM: hibernate: Get block device exclusively in swsusp_check()") Reported-by: Yifan Li Suggested-by: Pavankumar Kondeti Tested-by: Pavankumar Kondeti Tested-by: Wendy Wang Signed-off-by: Chen Yu Signed-off-by: Rafael J. Wysocki commit 08169a162f97819d3e5b4a342bb9cf5137787154 Author: Chen Yu Date: Fri Apr 14 20:10:26 2023 +0800 PM: hibernate: Turn snapshot_test into global variable There is need to check snapshot_test and open block device in different mode, so as to avoid the race condition. No functional changes intended. Suggested-by: Pavankumar Kondeti Signed-off-by: Chen Yu Signed-off-by: Rafael J. Wysocki commit dd2358321e1aa0cf3808b353e02fae2ddf005a72 Merge: 5e0ca0bfc33b7 2afa82d1fc648 Author: Rafael J. Wysocki Date: Thu Apr 27 18:55:15 2023 +0200 Merge tag 'thermal-v6.4-rc1-3' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull more thermal control changes for 6.4-rc1 from Daniel Lezcano: "- Add compatible strings DT bindings for imx6sll and imx6ul to fix dtbs check warning (Stefan Wahren) - Update the example in the DT bindings to reflect changes with the ADC node name for QCom TM and TM5 (Marijn Suijten) - Fix the comments for the cpuidle_cooling_register() function to match the function prototype (Chenggang Wang) - Fix inconsistent temperature read and some Mediatek variant board reboot by reverting a change and handling the temperature differently (AngeloGioacchino Del Regno) - Fix a memory leak in the initialization error path for the Mediatek driver (Kang Chen) - Use of_address_to_resource() in the Mediatek driver (Rob Herring) - Fix unit address in the QCom tsens driver DT bindings (Krzysztof Kozlowski)" * tag 'thermal-v6.4-rc1-3' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: dt-bindings: thermal: qcom-tsens: Correct unit address thermal/drivers/mediatek: Use of_address_to_resource() thermal/drivers/mediatek: Change clk_prepare_enable to devm_clk_get_enabled in mtk_thermal_probe thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe thermal/drivers/mediatek: Add temperature constraints to validate read Revert "thermal/drivers/mediatek: Add delay after thermal banks initialization" thermal/drivers/cpuidle_cooling: Delete unmatched comments dt-bindings: thermal: Use generic ADC node name in examples dt-bindings: imx-thermal: Add imx6sll and imx6ul compatible commit 9bde7fb8940f636f4338bf233883ae37844dcdb7 Author: Hector Martin Date: Mon Apr 24 15:46:57 2023 +0900 ACPI: property: Support strings in Apple _DSM props The Wi-Fi module in x86 Apple machines has a "module-instance" device property that specifies the platform type and is used for firmware selection. Its value is a string, so add support for string values in acpi_extract_apple_properties(). Reviewed-by: Lukas Wunner Acked-by: Linus Walleij Signed-off-by: Hector Martin Signed-off-by: Rafael J. Wysocki commit 61711941d8515c6d2a8a95d89e132902b56feebd Author: Marius Hoch Date: Sat Apr 22 18:44:01 2023 +0200 ACPI: x86: utils: Remove Lenovo Yoga Tablet 2's MAGN0001 The LSM303D on the Lenovo Yoga Tablet 2 series is present as both ACCL0001 and MAGN0001. As we can only ever register an i2c client for one of them, ignore MAGN0001. Currently this errors: i2c i2c-4: Failed to register i2c client MAGN0001:00 at 0x1d (-16) Tested on a Lenovo Yoga Tablet 2 1051-F. Signed-off-by: Marius Hoch Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 9b04d99788cf475cbd277f30ec66230ccb7e99f4 Author: Hans de Goede Date: Thu Apr 20 13:02:20 2023 +0200 ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini The CPR3 power resource on the Toshiba Click Mini toggles a GPIO which is called SISP (for SIS touchscreen power?) on/off. This CPR3 power resource is not listed in any _PR? lists, let alone in a _PR0 list for the SIS0817 touchscreen ACPI device which needs it. Before commit a1224f34d72a ("ACPI: PM: Check states of power resources during initialization") this was not an issue because since nothing referenced the CPR3 power resource its state was always ACPI_POWER_RESOURCE_STATE_UNKNOWN and power resources with this state get ignored by acpi_turn_off_unused_power_resources(). This clearly is a bug in the DSDT of this device. Add a DMI quirk to make acpi_turn_off_unused_power_resources() a no-op on this model to fix the touchscreen no longer working since kernel 5.16 . This quirk also causes 2 other power resources to not get turned off, but the _OFF method on these already was a no-op, so this makes no difference for the other 2 power resources. Fixes: a1224f34d72a ("ACPI: PM: Check states of power resources during initialization") Reported-by: Gé Koerkamp Link: https://bugzilla.kernel.org/show_bug.cgi?id=216946 Link: https://lore.kernel.org/regressions/32a14a8a-9795-4c8c-7e00-da9012f548f8@leemhuis.info/ Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 8325642d2757eba80210dec727bb0bcffb837ff1 Author: Andreas Kemnade Date: Wed Apr 19 13:18:06 2023 +0200 leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driver The device provides 6 channels which can be individually turned off and on but groups of two channels share a common brightness register. Limitation: The GPIO to enable the device is not used yet. Signed-off-by: Andreas Kemnade Reviewed-by: Matti Vaittinen Acked-by: Pavel Machek Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230419111806.1100437-3-andreas@kemnade.info commit d42b1c47570eb2ed818dc3fe94b2678124af109d Merge: 6df969b77ecc2 66ae053516766 Author: Linus Torvalds Date: Thu Apr 27 09:23:57 2023 -0700 Merge tag 'devicetree-for-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: "Bindings: - Convert Qcom IOMMU, Amlogic timer, Freescale sec-v4.0, Toshiba TC358764 display bridge, Parade PS8622 display bridge, and Xilinx FPGA bindings to DT schema format - Add qdu1000 and sa8775p SoC support to Qcom PDC interrupt controller - Add MediaTek MT8365 UART and SYSIRQ bindings - Add Arm Cortex-A78C and X1C core compatibles - Add vendor prefix for Novatek - Remove bindings for stih415, sti416, stid127 platforms - Drop uneeded quotes in schema files. This is preparation for yamllint checking quoting for us. - Add missing (unevaluated|additional)Properties constraints on child node schemas - Clean-up schema comments formatting - Fix I2C and SPI node bus names in schema examples - Clean-up some display compatibles schema syntax - Fix incorrect references to lvds.yaml - Gather all cache controller bindings in a common directory DT core: - Convert unittest to new void .remove platform device hook - kerneldoc fixes for DT address of_pci_range_to_resource/ of_address_to_resource functions" * tag 'devicetree-for-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (46 commits) dt-bindings: rng: Drop unneeded quotes dt-bindings: arm/soc: mediatek: Drop unneeded quotes dt-bindings: soc: qcom: Drop unneeded quotes dt-bindings: i2c: samsung: Fix 'deprecated' value dt-bindings: display: Fix lvds.yaml references dt-bindings: display: simplify compatibles syntax dt-bindings: display: mediatek: simplify compatibles syntax dt-bindings: drm/bridge: ti-sn65dsi86: Fix the video-interfaces.yaml references dt-bindings: timer: Drop unneeded quotes dt-bindings: interrupt-controller: qcom,pdc: document qcom,qdu1000-pdc dt-bindings: interrupt-controller: qcom-pdc: add compatible for sa8775p dt-bindings: reset: remove stih415/stih416 reset dt-bindings: net: dwmac: sti: remove stih415/sti416/stid127 dt-bindings: irqchip: sti: remove stih415/stih416 and stid127 dt-bindings: iommu: Convert QCOM IOMMU to YAML dt-bindings: irqchip: ti,sci-inta: Add optional power-domains property dt-bindings: Add missing (unevaluated|additional)Properties on child node schemas of: address: Reshuffle to remove forward declarations of: address: Fix documented return value of of_pci_range_to_resource() of: address: Document return value of of_address_to_resource() ... commit 6df969b77ecc2ba21dcd0e57f416e58bec2a5ca1 Merge: 32f7ad0fbe752 62e37c86bf071 Author: Linus Torvalds Date: Thu Apr 27 09:08:08 2023 -0700 Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd Pull iommufd updates from Jason Gunthorpe: "Two series: - Reorganize how the hardware page table objects are managed, particularly their destruction flow. Increase the selftest test coverage in this area by creating a more complete mock iommu driver. This is preparation to add a replace operation for HWPT binding, which is done but waiting for the VFIO parts to complete so there is a user. - Split the iommufd support for "access" to make it two step - allocate an access then link it to an IOAS. Update VFIO and have VFIO always create an access even for the VFIO mdevs that never do DMA. This is also preperation for the replace VFIO series that will allow replace to work on access types as well. Three minor fixes: - Sykzaller found the selftest code didn't check for overflow when processing user VAs - smatch noted a .data item should have been static - Add a selftest that reproduces a syzkaller bug for batch carry already fixed in rc" * tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd: (21 commits) iommufd/selftest: Cover domain unmap with huge pages and access iommufd/selftest: Set varaiable mock_iommu_device storage-class-specifier to static vfio: Check the presence for iommufd callbacks in __vfio_register_dev() vfio/mdev: Uses the vfio emulated iommufd ops set in the mdev sample drivers vfio-iommufd: Make vfio_iommufd_emulated_bind() return iommufd_access ID vfio-iommufd: No need to record iommufd_ctx in vfio_device iommufd: Create access in vfio_iommufd_emulated_bind() iommu/iommufd: Pass iommufd_ctx pointer in iommufd_get_ioas() iommufd/selftest: Catch overflow of uptr and length iommufd/selftest: Add a selftest for iommufd_device_attach() with a hwpt argument iommufd/selftest: Make selftest create a more complete mock device iommufd/selftest: Rename the remaining mock device_id's to stdev_id iommufd/selftest: Rename domain_id to hwpt_id for FIXTURE iommufd_mock_domain iommufd/selftest: Rename domain_id to stdev_id for FIXTURE iommufd_ioas iommufd/selftest: Rename the sefltest 'device_id' to 'stdev_id' iommufd: Make iommufd_hw_pagetable_alloc() do iopt_table_add_domain() iommufd: Move iommufd_device to iommufd_private.h iommufd: Move ioas related HWPT destruction into iommufd_hw_pagetable_destroy() iommufd: Consistently manage hwpt_item iommufd: Add iommufd_lock_obj() around the auto-domains hwpts ... commit d906be3fa571f6fc9381911304a0eca99f1b6951 Author: Bharath SM Date: Wed Apr 26 14:05:16 2023 +0000 SMB3: Close deferred file handles in case of handle lease break We should not cache deferred file handles if we dont have handle lease on a file. And we should immediately close all deferred handles in case of handle lease break. Fixes: 9e31678fb403 ("SMB3: fix lease break timeout when multiple deferred close handles for the same file.") Signed-off-by: Bharath SM Signed-off-by: Steve French commit 6e0c2bf2ca34046fe17a978a092925d411ce3a8c Author: Chris Paterson Date: Wed Apr 26 11:09:25 2023 +0100 dt-bindings: clock: r9a06g032-sysctrl: Change maintainer to Fabrizio Castro Gareth no longer works for Renesas. Signed-off-by: Chris Paterson Acked-by: Fabrizio Castro Link: https://lore.kernel.org/r/20230426100925.12063-1-chris.paterson2@renesas.com Signed-off-by: Rob Herring commit d25728563dc950c813ee963c14a8493931612e8d Author: Chris Paterson Date: Wed Apr 26 11:08:32 2023 +0100 dt-bindings: pinctrl: renesas,rzv2m: Change maintainer to Fabrizio Castro Phil no longer works for Renesas. Signed-off-by: Chris Paterson Acked-by: Fabrizio Castro Link: https://lore.kernel.org/r/20230426100832.11945-1-chris.paterson2@renesas.com Signed-off-by: Rob Herring commit ae98cbffcb4b15140f36ec3172b085deffda48f4 Author: Chris Paterson Date: Wed Apr 26 11:08:02 2023 +0100 dt-bindings: pinctrl: renesas,rzn1: Change maintainer to Fabrizio Castro Gareth no longer works for Renesas. Signed-off-by: Chris Paterson Acked-by: Fabrizio Castro Link: https://lore.kernel.org/r/20230426100802.11860-1-chris.paterson2@renesas.com Signed-off-by: Rob Herring commit f30ec5df80a0a3328ad6b9c2434ccaa331505307 Author: Chris Paterson Date: Wed Apr 26 11:07:36 2023 +0100 dt-bindings: i2c: renesas,rzv2m: Change maintainer to Fabrizio Castro Phil no longer works for Renesas. Signed-off-by: Chris Paterson Acked-by: Fabrizio Castro Link: https://lore.kernel.org/r/20230426100736.11808-1-chris.paterson2@renesas.com Signed-off-by: Rob Herring commit ab9ddc87a9055c4bebd6524d5d761d605d52e557 Author: Bharath SM Date: Thu Apr 20 13:54:33 2023 +0000 SMB3: Add missing locks to protect deferred close file list cifs_del_deferred_close function has a critical section which modifies the deferred close file list. We must acquire deferred_lock before calling cifs_del_deferred_close function. Fixes: ca08d0eac020 ("cifs: Fix memory leak on the deferred close") Signed-off-by: Bharath SM Acked-off-by: Paulo Alcantara (SUSE) Acked-by: Ronnie Sahlberg Signed-off-by: Steve French commit 32f7ad0fbe7521de2a5e8f79c33d46110247fd7c Merge: 7e7757876f258 cf03e2956af30 Author: Linus Torvalds Date: Thu Apr 27 08:28:08 2023 -0700 Merge tag 'drm-next-2023-04-27' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "A bit out of routine fixes pull for rc1. There's a build breakage on some platforms due to ttm, this has that fix + qaic uapi removal + minor panel fixes. ttm: - Fix TTM build on archs where PMD_SHIFT is not constant qaic: - Revert uAPI from accel/qaic panel: - Improve error handling in nt35950 - Fix double unregister in otm8009a when removing the driver" * tag 'drm-next-2023-04-27' of git://anongit.freedesktop.org/drm/drm: drm/panel: novatek-nt35950: Only unregister DSI1 if it exists drm/panel: otm8009a: Set backlight parent to panel device drm/panel: novatek-nt35950: Improve error handling drm/ttm: revert "Reduce the number of used allocation orders for TTM pages" Revert "accel/qaic: Add mhi_qaic_cntl" commit 7e7757876f258d99266e7b3c559639289a2a45fe Author: Vlastimil Babka Date: Thu Apr 27 16:09:59 2023 +0200 mm/mremap: fix vm_pgoff in vma_merge() case 3 After upgrading build guests to v6.3, rpm started segfaulting for specific packages, which was bisected to commit 0503ea8f5ba7 ("mm/mmap: remove __vma_adjust()"). rpm is doing many mremap() operations with file mappings of its db. The problem is that in vma_merge() case 3 (we merge with the next vma, expanding it downwards) vm_pgoff is not adjusted as it should when vm_start changes. As a result the rpm process most likely sees data from the wrong offset of the file. Fix the vm_pgoff calculation. For case 8 this is a non-functional change as the resulting vm_pgoff is the same. Reported-and-bisected-by: Jiri Slaby Reported-and-tested-by: Fabian Vogt Link: https://bugzilla.suse.com/show_bug.cgi?id=1210903 Fixes: 0503ea8f5ba7 ("mm/mmap: remove __vma_adjust()") Signed-off-by: Vlastimil Babka Cc: Signed-off-by: Linus Torvalds commit 067eb084592819ad59d07afcb5de3e61cee2757c Author: Vitaly Rodionov Date: Thu Apr 27 12:04:52 2023 +0100 ALSA: hda/realtek: Add quirk for ThinkPad P1 Gen 6 Lenovo ThinkPad P1 Gen 6 laptop has 2 CS35L41 amplifies on I2C bus connected to Realtek codec. Signed-off-by: Vitaly Rodionov Cc: Link: https://lore.kernel.org/r/20230427110452.13787-1-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai commit ea3292986cc90fdd9ad9aa7018ee0651736a4529 Merge: c51e431052e2e 2ae147d643d32 Author: Takashi Iwai Date: Thu Apr 27 14:21:18 2023 +0200 Merge branch 'for-linus' into for-next Merge 6.3-devel branch back in order to apply the more Realtek HD-audio changes cleanly. Signed-off-by: Takashi Iwai commit 075cafffce2429dfa0085c98162657e88d11aa1d Merge: c23ae5091a8b3 3c99bace4ad08 Author: Paolo Abeni Date: Thu Apr 27 12:39:11 2023 +0200 Merge branch 'macsec-fixes-for-cn10kb' Geetha sowjanya says: ==================== Macsec fixes for CN10KB This patch set has fixes for the issues encountered while testing macsec on CN10KB silicon. Below is the description of patches: Patch 1: For each LMAC two MCSX_MCS_TOP_SLAVE_CHANNEL_CFG registers exist in CN10KB. Bypass has to be disabled in two registers. Patch 2: Add workaround for errata w.r.t accessing TCAM DATA and MASK registers. Patch 3: Fixes the parser configuration to allow PTP traffic. Patch 4: Addresses the IP vector and block level interrupt mask changes. Patch 5: Fix NULL pointer crashes when rebooting Patch 6: Since MCS is global block shared by all LMACS the TCAM match must include macsec DMAC also to distinguish each macsec interface Patch 7: Before freeing MCS hardware resource to AF clear the stats also. Patch 8: Stats which share single counter in hardware are tracked in software. This tracking was based on wrong secy mode params. Use correct secy mode params Patch 9: When updating secy mode params, PN number was also reset to initial values. Hence do not write to PN value register when updating secy. ==================== Link: https://lore.kernel.org/r/20230426062528.20575-1-gakula@marvell.com Signed-off-by: Paolo Abeni commit 3c99bace4ad08ad0264285ba8ad73117560992c2 Author: Subbaraya Sundeep Date: Wed Apr 26 11:55:28 2023 +0530 octeontx2-pf: mcs: Do not reset PN while updating secy After creating SecYs, SCs and SAs a SecY can be modified to change attributes like validation mode, protect frames mode etc. During this SecY update, packet number is reset to initial user given value by mistake. Hence do not reset PN when updating SecY parameters. Fixes: c54ffc73601c ("octeontx2-pf: mcs: Introduce MACSEC hardware offloading") Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Geetha sowjanya Reviewed-by: Leon Romanovsky Signed-off-by: Paolo Abeni commit 9bdfe61054fb2b989eb58df20bf99c0cf67e3038 Author: Subbaraya Sundeep Date: Wed Apr 26 11:55:27 2023 +0530 octeontx2-pf: mcs: Fix shared counters logic Macsec stats like InPktsLate and InPktsDelayed share same counter in hardware. If SecY replay_protect is true then counter represents InPktsLate otherwise InPktsDelayed. This mode change was tracked based on protect_frames instead of replay_protect mistakenly. Similarly InPktsUnchecked and InPktsOk share same counter and mode change was tracked based on validate_check instead of validate_disabled. This patch fixes those problems. Fixes: c54ffc73601c ("octeontx2-pf: mcs: Introduce MACSEC hardware offloading") Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Geetha sowjanya Reviewed-by: Leon Romanovsky Signed-off-by: Paolo Abeni commit 815debbbf7b52026462c37eea3be70d6377a7a9a Author: Subbaraya Sundeep Date: Wed Apr 26 11:55:26 2023 +0530 octeontx2-pf: mcs: Clear stats before freeing resource When freeing MCS hardware resources like SecY, SC and SA the corresponding stats needs to be cleared. Otherwise previous stats are shown in newly created macsec interfaces. Fixes: c54ffc73601c ("octeontx2-pf: mcs: Introduce MACSEC hardware offloading") Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Geetha sowjanya Reviewed-by: Leon Romanovsky Signed-off-by: Paolo Abeni commit 57d00d4364f314485092667d2a48718985515deb Author: Subbaraya Sundeep Date: Wed Apr 26 11:55:25 2023 +0530 octeontx2-pf: mcs: Match macsec ethertype along with DMAC On CN10KB silicon a single hardware macsec block is present and offloads macsec operations for all the ethernet LMACs. TCAM match with macsec ethertype 0x88e5 alone at RX side is not sufficient to distinguish all the macsec interfaces created on top of netdevs. Hence append the DMAC of the macsec interface too. Otherwise the first created macsec interface only receives all the macsec traffic. Fixes: c54ffc73601c ("octeontx2-pf: mcs: Introduce MACSEC hardware offloading") Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Geetha sowjanya Reviewed-by: Leon Romanovsky Signed-off-by: Paolo Abeni commit 699af748c61574125d269db260dabbe20436d74e Author: Subbaraya Sundeep Date: Wed Apr 26 11:55:24 2023 +0530 octeontx2-pf: mcs: Fix NULL pointer dereferences When system is rebooted after creating macsec interface below NULL pointer dereference crashes occurred. This patch fixes those crashes by using correct order of teardown [ 3324.406942] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 3324.415726] Mem abort info: [ 3324.418510] ESR = 0x96000006 [ 3324.421557] EC = 0x25: DABT (current EL), IL = 32 bits [ 3324.426865] SET = 0, FnV = 0 [ 3324.429913] EA = 0, S1PTW = 0 [ 3324.433047] Data abort info: [ 3324.435921] ISV = 0, ISS = 0x00000006 [ 3324.439748] CM = 0, WnR = 0 .... [ 3324.575915] Call trace: [ 3324.578353] cn10k_mdo_del_secy+0x24/0x180 [ 3324.582440] macsec_common_dellink+0xec/0x120 [ 3324.586788] macsec_notify+0x17c/0x1c0 [ 3324.590529] raw_notifier_call_chain+0x50/0x70 [ 3324.594965] call_netdevice_notifiers_info+0x34/0x7c [ 3324.599921] rollback_registered_many+0x354/0x5bc [ 3324.604616] unregister_netdevice_queue+0x88/0x10c [ 3324.609399] unregister_netdev+0x20/0x30 [ 3324.613313] otx2_remove+0x8c/0x310 [ 3324.616794] pci_device_shutdown+0x30/0x70 [ 3324.620882] device_shutdown+0x11c/0x204 [ 966.664930] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 966.673712] Mem abort info: [ 966.676497] ESR = 0x96000006 [ 966.679543] EC = 0x25: DABT (current EL), IL = 32 bits [ 966.684848] SET = 0, FnV = 0 [ 966.687895] EA = 0, S1PTW = 0 [ 966.691028] Data abort info: [ 966.693900] ISV = 0, ISS = 0x00000006 [ 966.697729] CM = 0, WnR = 0 [ 966.833467] Call trace: [ 966.835904] cn10k_mdo_stop+0x20/0xa0 [ 966.839557] macsec_dev_stop+0xe8/0x11c [ 966.843384] __dev_close_many+0xbc/0x140 [ 966.847298] dev_close_many+0x84/0x120 [ 966.851039] rollback_registered_many+0x114/0x5bc [ 966.855735] unregister_netdevice_many.part.0+0x14/0xa0 [ 966.860952] unregister_netdevice_many+0x18/0x24 [ 966.865560] macsec_notify+0x1ac/0x1c0 [ 966.869303] raw_notifier_call_chain+0x50/0x70 [ 966.873738] call_netdevice_notifiers_info+0x34/0x7c [ 966.878694] rollback_registered_many+0x354/0x5bc [ 966.883390] unregister_netdevice_queue+0x88/0x10c [ 966.888173] unregister_netdev+0x20/0x30 [ 966.892090] otx2_remove+0x8c/0x310 [ 966.895571] pci_device_shutdown+0x30/0x70 [ 966.899660] device_shutdown+0x11c/0x204 [ 966.903574] __do_sys_reboot+0x208/0x290 [ 966.907487] __arm64_sys_reboot+0x20/0x30 [ 966.911489] el0_svc_handler+0x80/0x1c0 [ 966.915316] el0_svc+0x8/0x180 [ 966.918362] Code: f9400000 f9400a64 91220014 f94b3403 (f9400060) [ 966.924448] ---[ end trace 341778e799c3d8d7 ]--- Fixes: c54ffc73601c ("octeontx2-pf: mcs: Introduce MACSEC hardware offloading") Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: Geetha sowjanya Reviewed-by: Leon Romanovsky Signed-off-by: Paolo Abeni commit b8aebeaaf9ffb1e99c642eb3751e28981f9be475 Author: Geetha sowjanya Date: Wed Apr 26 11:55:23 2023 +0530 octeontx2-af: mcs: Fix MCS block interrupt On CN10KB, MCS IP vector number, BBE and PAB interrupt mask got changed to support more block level interrupts. To address this changes, this patch fixes the bbe and pab interrupt handlers. Fixes: 6c635f78c474 ("octeontx2-af: cn10k: mcs: Handle MCS block interrupts") Signed-off-by: Sunil Goutham Signed-off-by: Geetha sowjanya Reviewed-by: Leon Romanovsky Signed-off-by: Paolo Abeni commit 65cdc2b637a5749c7dec0ce14fe2c48f1f91f671 Author: Geetha sowjanya Date: Wed Apr 26 11:55:22 2023 +0530 octeontx2-af: mcs: Config parser to skip 8B header When ptp timestamp is enabled in RPM, RPM will append 8B timestamp header for all RX traffic. MCS need to skip these 8 bytes header while parsing the packet header, so that correct tcam key is created for lookup. This patch fixes the mcs parser configuration to skip this 8B header for ptp packets. Fixes: ca7f49ff8846 ("octeontx2-af: cn10k: Introduce driver for macsec block.") Signed-off-by: Sunil Goutham Signed-off-by: Geetha sowjanya Reviewed-by: Leon Romanovsky Signed-off-by: Paolo Abeni commit b51612198603fce33d6cf57b4864e3018a1cd9b8 Author: Subbaraya Sundeep Date: Wed Apr 26 11:55:21 2023 +0530 octeontx2-af: mcs: Write TCAM_DATA and TCAM_MASK registers at once As per hardware errata on CN10KB, all the four TCAM_DATA and TCAM_MASK registers has to be written at once otherwise write to individual registers will fail. Hence write to all TCAM_DATA registers and then to all TCAM_MASK registers. Fixes: cfc14181d497 ("octeontx2-af: cn10k: mcs: Manage the MCS block hardware resources") Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Kovvuri Goutham Signed-off-by: Geetha sowjanya Reviewed-by: Leon Romanovsky Signed-off-by: Paolo Abeni commit c222b292a3568754828ffd30338d2909b14ed160 Author: Geetha sowjanya Date: Wed Apr 26 11:55:20 2023 +0530 octeonxt2-af: mcs: Fix per port bypass config For each lmac port, MCS has two MCS_TOP_SLAVE_CHANNEL_CONFIGX registers. For CN10KB both register need to be configured for the port level mcs bypass to work. This patch also sets bitmap of flowid/secy entry reserved for default bypass so that these entries can be shown in debugfs. Fixes: bd69476e86fc ("octeontx2-af: cn10k: mcs: Install a default TCAM for normal traffic") Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Reviewed-by: Leon Romanovsky Signed-off-by: Paolo Abeni commit c23ae5091a8b3e50fe755257df020907e7c029bb Author: John Hickey Date: Tue Apr 25 10:03:08 2023 -0700 ixgbe: Fix panic during XDP_TX with > 64 CPUs Commit 4fe815850bdc ("ixgbe: let the xdpdrv work with more than 64 cpus") adds support to allow XDP programs to run on systems with more than 64 CPUs by locking the XDP TX rings and indexing them using cpu % 64 (IXGBE_MAX_XDP_QS). Upon trying this out patch on a system with more than 64 cores, the kernel paniced with an array-index-out-of-bounds at the return in ixgbe_determine_xdp_ring in ixgbe.h, which means ixgbe_determine_xdp_q_idx was just returning the cpu instead of cpu % IXGBE_MAX_XDP_QS. An example splat: ========================================================================== UBSAN: array-index-out-of-bounds in /var/lib/dkms/ixgbe/5.18.6+focal-1/build/src/ixgbe.h:1147:26 index 65 is out of range for type 'ixgbe_ring *[64]' ========================================================================== BUG: kernel NULL pointer dereference, address: 0000000000000058 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] SMP NOPTI CPU: 65 PID: 408 Comm: ksoftirqd/65 Tainted: G IOE 5.15.0-48-generic #54~20.04.1-Ubuntu Hardware name: Dell Inc. PowerEdge R640/0W23H8, BIOS 2.5.4 01/13/2020 RIP: 0010:ixgbe_xmit_xdp_ring+0x1b/0x1c0 [ixgbe] Code: 3b 52 d4 cf e9 42 f2 ff ff 66 0f 1f 44 00 00 0f 1f 44 00 00 55 b9 00 00 00 00 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 ec 08 <44> 0f b7 47 58 0f b7 47 5a 0f b7 57 54 44 0f b7 76 08 66 41 39 c0 RSP: 0018:ffffbc3fcd88fcb0 EFLAGS: 00010282 RAX: ffff92a253260980 RBX: ffffbc3fe68b00a0 RCX: 0000000000000000 RDX: ffff928b5f659000 RSI: ffff928b5f659000 RDI: 0000000000000000 RBP: ffffbc3fcd88fce0 R08: ffff92b9dfc20580 R09: 0000000000000001 R10: 3d3d3d3d3d3d3d3d R11: 3d3d3d3d3d3d3d3d R12: 0000000000000000 R13: ffff928b2f0fa8c0 R14: ffff928b9be20050 R15: 000000000000003c FS: 0000000000000000(0000) GS:ffff92b9dfc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000058 CR3: 000000011dd6a002 CR4: 00000000007706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: ixgbe_poll+0x103e/0x1280 [ixgbe] ? sched_clock_cpu+0x12/0xe0 __napi_poll+0x30/0x160 net_rx_action+0x11c/0x270 __do_softirq+0xda/0x2ee run_ksoftirqd+0x2f/0x50 smpboot_thread_fn+0xb7/0x150 ? sort_range+0x30/0x30 kthread+0x127/0x150 ? set_kthread_struct+0x50/0x50 ret_from_fork+0x1f/0x30 I think this is how it happens: Upon loading the first XDP program on a system with more than 64 CPUs, ixgbe_xdp_locking_key is incremented in ixgbe_xdp_setup. However, immediately after this, the rings are reconfigured by ixgbe_setup_tc. ixgbe_setup_tc calls ixgbe_clear_interrupt_scheme which calls ixgbe_free_q_vectors which calls ixgbe_free_q_vector in a loop. ixgbe_free_q_vector decrements ixgbe_xdp_locking_key once per call if it is non-zero. Commenting out the decrement in ixgbe_free_q_vector stopped my system from panicing. I suspect to make the original patch work, I would need to load an XDP program and then replace it in order to get ixgbe_xdp_locking_key back above 0 since ixgbe_setup_tc is only called when transitioning between XDP and non-XDP ring configurations, while ixgbe_xdp_locking_key is incremented every time ixgbe_xdp_setup is called. Also, ixgbe_setup_tc can be called via ethtool --set-channels, so this becomes another path to decrement ixgbe_xdp_locking_key to 0 on systems with more than 64 CPUs. Since ixgbe_xdp_locking_key only protects the XDP_TX path and is tied to the number of CPUs present, there is no reason to disable it upon unloading an XDP program. To avoid confusion, I have moved enabling ixgbe_xdp_locking_key into ixgbe_sw_init, which is part of the probe path. Fixes: 4fe815850bdc ("ixgbe: let the xdpdrv work with more than 64 cpus") Signed-off-by: John Hickey Reviewed-by: Maciej Fijalkowski Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20230425170308.2522429-1-anthony.l.nguyen@intel.com Signed-off-by: Paolo Abeni commit 1b483d9f5805c7e3d628d4995e97f4311fcb82eb Author: Pedro Tammela Date: Tue Apr 25 11:47:25 2023 -0300 net/sched: act_pedit: free pedit keys on bail from offset check Ido Schimmel reports a memleak on a syzkaller instance: BUG: memory leak unreferenced object 0xffff88803d45e400 (size 1024): comm "syz-executor292", pid 563, jiffies 4295025223 (age 51.781s) hex dump (first 32 bytes): 28 bd 70 00 fb db df 25 02 00 14 1f ff 02 00 02 (.p....%........ 00 32 00 00 1f 00 00 00 ac 14 14 3e 08 00 07 00 .2.........>.... backtrace: [] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline] [] slab_post_alloc_hook mm/slab.h:772 [inline] [] slab_alloc_node mm/slub.c:3452 [inline] [] __kmem_cache_alloc_node+0x25c/0x320 mm/slub.c:3491 [] __do_kmalloc_node mm/slab_common.c:966 [inline] [] __kmalloc+0x59/0x1a0 mm/slab_common.c:980 [] kmalloc include/linux/slab.h:584 [inline] [] tcf_pedit_init+0x793/0x1ae0 net/sched/act_pedit.c:245 [] tcf_action_init_1+0x453/0x6e0 net/sched/act_api.c:1394 [] tcf_action_init+0x5a8/0x950 net/sched/act_api.c:1459 [] tcf_action_add+0x118/0x4e0 net/sched/act_api.c:1985 [] tc_ctl_action+0x377/0x490 net/sched/act_api.c:2044 [] rtnetlink_rcv_msg+0x46d/0xd70 net/core/rtnetlink.c:6395 [] netlink_rcv_skb+0x185/0x490 net/netlink/af_netlink.c:2575 [] rtnetlink_rcv+0x26/0x30 net/core/rtnetlink.c:6413 [] netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] [] netlink_unicast+0x5be/0x8a0 net/netlink/af_netlink.c:1365 [] netlink_sendmsg+0x9af/0xed0 net/netlink/af_netlink.c:1942 [] sock_sendmsg_nosec net/socket.c:724 [inline] [] sock_sendmsg net/socket.c:747 [inline] [] ____sys_sendmsg+0x3ef/0xaa0 net/socket.c:2503 [] ___sys_sendmsg+0x122/0x1c0 net/socket.c:2557 [] __sys_sendmsg+0x11f/0x200 net/socket.c:2586 [] __do_sys_sendmsg net/socket.c:2595 [inline] [] __se_sys_sendmsg net/socket.c:2593 [inline] [] __x64_sys_sendmsg+0x80/0xc0 net/socket.c:2593 The recently added static offset check missed a free to the key buffer when bailing out on error. Fixes: e1201bc781c2 ("net/sched: act_pedit: check static offsets a priori") Reported-by: Ido Schimmel Signed-off-by: Pedro Tammela Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Link: https://lore.kernel.org/r/20230425144725.669262-1-pctammela@mojatatu.com Signed-off-by: Paolo Abeni commit 32eff6bacec2cb574677c15378169a9fa30043ef Author: Ivan Vecera Date: Tue Apr 25 16:06:04 2023 +0200 net/sched: flower: Fix wrong handle assignment during filter change Commit 08a0063df3ae ("net/sched: flower: Move filter handle initialization earlier") moved filter handle initialization but an assignment of the handle to fnew->handle is done regardless of fold value. This is wrong because if fold != NULL (so fold->handle == handle) no new handle is allocated and passed handle is assigned to fnew->handle. Then if any subsequent action in fl_change() fails then the handle value is removed from IDR that is incorrect as we will have still valid old filter instance with handle that is not present in IDR. Fix this issue by moving the assignment so it is done only when passed fold == NULL. Prior the patch: [root@machine tc-testing]# ./tdc.py -d enp1s0f0np0 -e 14be Test 14be: Concurrently replace same range of 100k flower filters from 10 tc instances exit: 123 exit: 0 RTNETLINK answers: Invalid argument We have an error talking to the kernel Command failed tmp/replace_6:1885 All test results: 1..1 not ok 1 14be - Concurrently replace same range of 100k flower filters from 10 tc instances Command exited with 123, expected 0 RTNETLINK answers: Invalid argument We have an error talking to the kernel Command failed tmp/replace_6:1885 After the patch: [root@machine tc-testing]# ./tdc.py -d enp1s0f0np0 -e 14be Test 14be: Concurrently replace same range of 100k flower filters from 10 tc instances All test results: 1..1 ok 1 14be - Concurrently replace same range of 100k flower filters from 10 tc instances Fixes: 08a0063df3ae ("net/sched: flower: Move filter handle initialization earlier") Signed-off-by: Ivan Vecera Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230425140604.169881-1-ivecera@redhat.com Signed-off-by: Paolo Abeni commit 2b5fdc0f5caa505afe34d608e2eefadadf2ee67a Author: David Howells Date: Tue Apr 25 13:56:35 2023 +0100 rxrpc: Fix potential data race in rxrpc_wait_to_be_connected() Inside the loop in rxrpc_wait_to_be_connected() it checks call->error to see if it should exit the loop without first checking the call state. This is probably safe as if call->error is set, the call is dead anyway, but we should probably wait for the call state to have been set to completion first, lest it cause surprise on the way out. Fix this by only accessing call->error if the call is complete. We don't actually need to access the error inside the loop as we'll do that after. This caused the following report: BUG: KCSAN: data-race in rxrpc_send_data / rxrpc_set_call_completion write to 0xffff888159cf3c50 of 4 bytes by task 25673 on cpu 1: rxrpc_set_call_completion+0x71/0x1c0 net/rxrpc/call_state.c:22 rxrpc_send_data_packet+0xba9/0x1650 net/rxrpc/output.c:479 rxrpc_transmit_one+0x1e/0x130 net/rxrpc/output.c:714 rxrpc_decant_prepared_tx net/rxrpc/call_event.c:326 [inline] rxrpc_transmit_some_data+0x496/0x600 net/rxrpc/call_event.c:350 rxrpc_input_call_event+0x564/0x1220 net/rxrpc/call_event.c:464 rxrpc_io_thread+0x307/0x1d80 net/rxrpc/io_thread.c:461 kthread+0x1ac/0x1e0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 read to 0xffff888159cf3c50 of 4 bytes by task 25672 on cpu 0: rxrpc_send_data+0x29e/0x1950 net/rxrpc/sendmsg.c:296 rxrpc_do_sendmsg+0xb7a/0xc20 net/rxrpc/sendmsg.c:726 rxrpc_sendmsg+0x413/0x520 net/rxrpc/af_rxrpc.c:565 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] ____sys_sendmsg+0x375/0x4c0 net/socket.c:2501 ___sys_sendmsg net/socket.c:2555 [inline] __sys_sendmmsg+0x263/0x500 net/socket.c:2641 __do_sys_sendmmsg net/socket.c:2670 [inline] __se_sys_sendmmsg net/socket.c:2667 [inline] __x64_sys_sendmmsg+0x57/0x60 net/socket.c:2667 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x00000000 -> 0xffffffea Fixes: 9d35d880e0e4 ("rxrpc: Move client call connection to the I/O thread") Reported-by: syzbot+ebc945fdb4acd72cba78@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/000000000000e7c6d205fa10a3cd@google.com/ Signed-off-by: David Howells cc: Marc Dionne cc: Dmitry Vyukov cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: linux-fsdevel@vger.kernel.org cc: netdev@vger.kernel.org Link: https://lore.kernel.org/r/508133.1682427395@warthog.procyon.org.uk Signed-off-by: Paolo Abeni commit d893f39320e1248d1c97fde0d6e51e5ea008a76b Author: Leo Chen Date: Tue Apr 11 10:49:38 2023 -0400 drm/amd/display: Lowering min Z8 residency time [Why & How] Per HW team request, we're lowering the minimum Z8 residency time to 2000us. This enables Z8 support for additional modes we were previously blocking like 2k>60hz Cc: stable@vger.kernel.org Tested-by: Daniel Wheeler Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Leo Chen Signed-off-by: Alex Deucher commit 08da182175db4c7f80850354849d95f2670e8cd9 Author: Hamza Mahfooz Date: Fri Apr 14 14:26:27 2023 -0400 drm/amd/display: fix flickering caused by S/G mode Currently, on a handful of ASICs. We allow the framebuffer for a given plane to exist in either VRAM or GTT. However, if the plane's new framebuffer is in a different memory domain than it's previous framebuffer, flipping between them can cause the screen to flicker. So, to fix this, don't perform an immediate flip in the aforementioned case. Cc: stable@vger.kernel.org Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2354 Reviewed-by: Roman Li Fixes: 81d0bcf99009 ("drm/amdgpu: make display pinning more flexible (v2)") Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 9675b3ba99ec79273d94afa09e9b69e2b8c0d238 Author: Igor Kravchenko Date: Fri Jul 10 16:24:30 2020 -0400 drm/amd/display: Set min_width and min_height capability for DCN30 Add min_width, min_height fields to dc_plane_cap structure. Set values to 16x16 for discrete ASICs, and 64x64 for others. Reviewed-by: Rodrigo Siqueira Signed-off-by: Igor Kravchenko Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3caab67db1f69e077fb12ac194d3cd2a4de06d8d Author: Jasdeep Dhillon Date: Tue Feb 28 11:46:31 2023 -0500 drm/amd/display: Isolate remaining FPU code in DCN32 [Why] DCN32 resource contains code that uses FPU. [How] Moved code into DCN32 FPU Reviewed-by: Rodrigo Siqueira Signed-off-by: Jasdeep Dhillon Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 989cd3e76a4aab76fe7dd50090ac3fa501c537f6 Author: Aurabindo Pillai Date: Thu Apr 6 15:59:45 2023 -0400 drm/amd/display: Update bounding box values for DCN321 [Why&how] Update bounding box values as per hardware spec Fixes: 197485c69543 ("drm/amd/display: Create dcn321_fpu file") Acked-by: Leo Li Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 99d92eaca5d915763b240aae24669f5bf3227ecf Author: Aurabindo Pillai Date: Thu Apr 6 15:48:48 2023 -0400 drm/amd/display: Do not clear GPINT register when releasing DMUB from reset [Why & How] There's no need to clear GPINT register for DMUB when releasing it from reset. Fix that. Fixes: ac2e555e0a7f ("drm/amd/display: Add DMCUB source files and changes for DCN32/321") Reviewed-by: Leo Li Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 425afa0ac99a05b39e6cd00704fa0e3e925cee2b Author: Cruise Hung Date: Fri May 13 09:16:42 2022 +0800 drm/amd/display: Reset OUTBOX0 r/w pointer on DMUB reset [Why & How] We missed resetting OUTBOX0 mailbox r/w pointer on DMUB reset. Fix it. Fixes: 6ecf9773a503 ("drm/amd/display: Fix DMUB outbox trace in S4 (#4465)") Signed-off-by: Cruise Hung Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d1c5c3e252b8a911a524e6ee33b82aca81397745 Author: Aurabindo Pillai Date: Thu Apr 6 12:28:59 2023 -0400 drm/amd/display: Fixes for dcn32_clk_mgr implementation [Why&How] Fix CLK MGR early initialization and add logging. Fixes: 265280b99822 ("drm/amd/display: add CLKMGR changes for DCN32/321") Reviewed-by: Leo Li Reviewed-by: Qingqing Zhuo Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b1bcdd409d2d158867ce0b71cfa9bcefe83ce07f Author: Tianci Yin Date: Mon Feb 6 15:58:46 2023 +0800 drm/amd/display: Disable migration to ensure consistency of per-CPU variable [why] Since the variable fpu_recursion_depth is per-CPU type, it has one copy on each CPU, thread migration causes data consistency issue, then the call trace shows up. And preemption disabling can't prevent migration. [how] Disable migration to ensure consistency of fpu_recursion_depth. Reviewed-by: Aurabindo Pillai Signed-off-by: Tianci Yin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fc3888fe2c63b35a22db8234d142823a5ffda9d8 Author: Aurabindo Pillai Date: Wed Apr 5 16:17:42 2023 -0400 drm/amd/display: remove incorrect early return [Why&How] Remove incorrect early return in a device specific fifo reset workaround Reviewed-by: Leo Li Reviewed-by: Qingqing Zhuo Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dd24662d9dfbad281bbf030f06d68c7938fa0c66 Author: Hersen Wu Date: Sun May 29 10:54:30 2022 -0400 drm/amd/display: Return error code on DSC atomic check failure [Why&How] We were not returning -EINVAL on DSC atomic check fail. Add it. Fixes: 71be4b16d39a ("drm/amd/display: dsc validate fail not pass to atomic check") Reviewed-by: Aurabindo Pillai Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e0cce122514ff76c3c986103c94de68fbb401949 Author: Jingwen Zhu Date: Thu Mar 30 16:38:59 2023 +0800 drm/amd/display: Improvement for handling edp link training fails [Why] The eDP retrain will cause the DPCD 300 to be reset to default. And cause the brightness can't be set correctly. [How] delete the call to edp panel power control in both enable_link_output/disable_link_output entirely and only call edp panel control in enable_link_dp and  disable_link_dp once. Reviewed-by: Charlene Liu Acked-by: Qingqing Zhuo Signed-off-by: Jingwen Zhu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 56d8ce9d8c17bea955b0c2551ee86149486890ae Author: Michael Mityushkin Date: Thu Mar 30 11:35:08 2023 -0400 drm/amd/display: Apply correct panel mode when reinitializing hardware [Why] When link training during engine recovery, ASSR might fail causing panel mode to be reset to default. This should not happen for eDP as it will prevent the panel from turning back on. [How] Added dp_panel_mode to struct dc_link to remember previously applied panel mode. Do not reset panel mode to default while performing link training if previously used panel mode = eDP. Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Michael Mityushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3cf7cd3f770a0b89dc5f06e19edb52e65b93b214 Author: Hersen Wu Date: Tue Mar 28 10:45:24 2023 -0400 drm/amd/display: fix access hdcp_workqueue assert [Why] hdcp are enabled for asics from raven. for old asics which hdcp are not enabled, hdcp_workqueue are null. some access to hdcp work queue are not guarded with pointer check. [How] add hdcp_workqueue pointer check before access workqueue. Fixes: 82986fd631fa ("drm/amd/display: save restore hdcp state when display is unplugged from mst hub") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2444 Reported-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com> Reviewed-by: Bhawanpreet Lakha Acked-by: Qingqing Zhuo Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 0c0463ff010b80a0c03937ca8cf85587ded2f20e Author: Alvin Lee Date: Tue Mar 28 09:53:33 2023 -0400 drm/amd/display: Reduce SubVP + DRR stretch margin [Description] - Having excessively large margin causes failure in the static schedulability check in some cases for SubVP + DRR - 100us of DRR margin is sufficient based on a weeks worth of stress testing on different display configs Reviewed-by: Michael Strauss Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 025ce392b5f213696ca0af3e07735d0fae020694 Author: Hersen Wu Date: Mon Mar 27 09:10:48 2023 -0400 drm/amd/display: fix memleak in aconnector->timing_requested [Why] when amdgpu_dm_update_connector_after_detect is called two times successively with valid sink, memory allocated of aconnector->timing_requested for the first call is not free. this causes memeleak. [How] allocate memory only when aconnector->timing_requested is null. Reviewed-by: Qingqing Zhuo Acked-by: Qingqing Zhuo Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit da5e14909776edea4462672fb4a3007802d262e7 Author: Aurabindo Pillai Date: Fri Mar 24 10:42:37 2023 -0400 drm/amd/display: Fix hang when skipping modeset [Why&How] When skipping full modeset since the only state change was a front porch change, the DC commit sequence requires extra checks to handle non existant plane states being asked to be removed from context. Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3fb7efd6866e5d43770e999b33d619a3b345dc2f Author: Alex Hung Date: Wed Mar 15 19:09:15 2023 +0800 drm/amd/display: allow edp updates for virtual signal [Why] When IGT's kms_hdmi_inject forces EDID for HDMI audio, dc rejects the request because virtual signal is not in dc_is_audio_capable_signal function. [How] Includes SIGNAL_TYPE_VIRTUAL as audio capable. Reviewed-by: Chao-kai Wang Acked-by: Qingqing Zhuo Signed-off-by: Alex Hung Signed-off-by: Wenchieh Chien Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f11aee97b13ea6817287cd8dbed9b09a260ff0e7 Author: Josip Pavic Date: Fri May 14 14:04:02 2021 -0400 drm/amd/display: copy dmub caps to dc on dcn31 [Why & How] Add code path to copy dmub caps to dc, which is missing on dcn31 Acked-by: Qingqing Zhuo Signed-off-by: Josip Pavic Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 822b84ecfc646da0f87fd947fa00dc3be5e45ecc Author: Rodrigo Siqueira Date: Tue Apr 4 14:54:05 2023 -0600 drm/amd/display: Add missing WA and MCLK validation When the commit fff7eb56b376 ("drm/amd/display: Don't set dram clock change requirement for SubVP") was merged, we missed some parts associated with the MCLK switch. This commit adds all the missing parts. Fixes: fff7eb56b376 ("drm/amd/display: Don't set dram clock change requirement for SubVP") Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ce560ac40272a5c8b5b68a9d63a75edd9e66aed2 Author: Wesley Chalmers Date: Tue Feb 28 13:48:00 2023 -0500 drm/amd/display: Block optimize on consecutive FAMS enables [WHY] It is possible to commit state multiple times in rapid succession with FAMS enabled; if each of these commits were to set optimized_required, then the user may see latency. [HOW] fw_based_mclk_switching is currently not used in dc->clk_mgr; use it to track whether the current state has FAMS enabled; if it has, then do not disable FAMS in prepare_bandwidth, and do not set optimized_required. Reviewed-by: Rodrigo Siqueira Signed-off-by: Wesley Chalmers Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 474f01015ffdb74e01c2eb3584a2822c64e7b2be Author: Wesley Chalmers Date: Thu Nov 3 22:29:31 2022 -0400 drm/amd/display: Do not set drr on pipe commit [WHY] Writing to DRR registers such as OTG_V_TOTAL_MIN on the same frame as a pipe commit can cause underflow. [HOW] Move DMUB p-state delegate into optimze_bandwidth; enabling FAMS sets optimized_required. This change expects that Freesync requests are blocked when optimized_required is true. Reviewed-by: Rodrigo Siqueira Signed-off-by: Wesley Chalmers Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cf03e2956af307dc25e8c41fd4cffe44482a6ec1 Merge: 289af45508ca8 a50be876f4fe2 Author: Dave Airlie Date: Thu Apr 27 11:29:33 2023 +1000 Merge tag 'drm-misc-next-fixes-2023-04-26' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next-fixes for v6.4-rc1: - Revert uAPI from accel/qaic. - Fix TTM build on archs where PMD_SHIFT is not constant. - Improve error handling in nt35950. - Fix double unregister in otm8009a when removing the driver. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/45757de9-75d8-5b41-f1f9-562a7c4675b9@linux.intel.com commit ff53cd52d9bdbf4074d2bbe9b591729997780bd3 Author: Thomas Weißschuh Date: Sat Mar 18 17:36:25 2023 +0000 blk-integrity: register sysfs attributes on struct device The "integrity" kobject only acted as a holder for static sysfs entries. It also was embedded into struct gendisk without managing it, violating assumptions of the driver core. Instead register the sysfs entries directly onto the struct device. Also drop the now unused member integrity_kobj from struct gendisk. Suggested-by: Christoph Hellwig Signed-off-by: Thomas Weißschuh Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20230309-kobj_release-gendisk_integrity-v3-3-ceccb4493c46@weissschuh.net Signed-off-by: Jens Axboe commit 76b8c319f02715e14abdbbbdd6508e83a1059bcc Author: Thomas Weißschuh Date: Sat Mar 18 17:36:24 2023 +0000 blk-integrity: convert to struct device_attribute An upcoming patch will register the integrity attributes directly with the struct device kobject. For this the attributes have to be implemented in terms of struct device_attribute. Signed-off-by: Thomas Weißschuh Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20230309-kobj_release-gendisk_integrity-v3-2-ceccb4493c46@weissschuh.net Signed-off-by: Jens Axboe commit 3315e169b446249c1b61ff988d157238f4b2c5a0 Author: Thomas Weißschuh Date: Sat Mar 18 17:36:23 2023 +0000 blk-integrity: use sysfs_emit The correct way to emit data into sysfs is via sysfs_emit(), use it. Also perform some trivial syntactic cleanups. Signed-off-by: Thomas Weißschuh Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20230309-kobj_release-gendisk_integrity-v3-1-ceccb4493c46@weissschuh.net Signed-off-by: Jens Axboe commit 202c044203ac5860e3025169105368d99f9bc6a2 Author: Marijn Suijten Date: Thu Apr 27 00:37:22 2023 +0200 drm/msm/dpu: Remove duplicate register defines from INTF The INTF_FRAME_LINE_COUNT_EN, INTF_FRAME_COUNT and INTF_LINE_COUNT registers are already defined higher up, in the right place when sorted numerically. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/534231/ Link: https://lore.kernel.org/r/20230411-dpu-intf-te-v4-8-27ce1a5ab5c6@somainline.org Signed-off-by: Abhinav Kumar commit 7557f58b6383e560dd5dc5267aceb8372f2a4426 Author: Marijn Suijten Date: Thu Apr 27 00:37:21 2023 +0200 drm/msm/dpu: Set PINGPONG block length to zero for DPU >= 7.0.0 Despite downstream DTS stating otherwise, the PINGPONG block has no registers starting with DPU revision 7.0.0. TEAR registers are gone since DPU 5.0.0 after being moved to the INTF block, and DSC registers are gone since 7.0.0, leaving only the dither sub-block. A future patch, part of the DSC 1.2 series, should disable DSC functions on the PINGPONG block for all DPU >= 7.0.0 hardware. Fixes: 4a352c2fc15a ("drm/msm/dpu: Introduce SC8280XP") Fixes: 0e91bcbb0016 ("drm/msm/dpu: Add SM8350 to hw catalog") Fixes: 100d7ef6995d ("drm/msm/dpu: add support for SM8450") Signed-off-by: Marijn Suijten Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/534206/ Link: https://lore.kernel.org/r/20230411-dpu-intf-te-v4-7-27ce1a5ab5c6@somainline.org Signed-off-by: Abhinav Kumar commit fe47a3084789fd653a3465ba39ea4afe33fc6d19 Author: Marijn Suijten Date: Thu Apr 27 00:37:20 2023 +0200 drm/msm/dpu: Use V2 DITHER PINGPONG sub-block in SM8[34]50/SC8280XP According to downstream sources this DITHER sub-block sits at an offset of 0xe0 with version 0x20000. Lets fix this by using sc7280_pp_sblk instead of sdm845_pp_sblk. Fixes: 4a352c2fc15a ("drm/msm/dpu: Introduce SC8280XP") Fixes: 0e91bcbb0016 ("drm/msm/dpu: Add SM8350 to hw catalog") Fixes: 100d7ef6995d ("drm/msm/dpu: add support for SM8450") Signed-off-by: Marijn Suijten Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/534208/ Link: https://lore.kernel.org/r/20230411-dpu-intf-te-v4-6-27ce1a5ab5c6@somainline.org [quic_abhinavk@quicinc.com: minor fix in the commit message] Signed-off-by: Abhinav Kumar commit 701f69183d4d52533fb2af0d6948b7d1b00d1a09 Author: Marijn Suijten Date: Thu Apr 27 00:37:19 2023 +0200 drm/msm/dpu: Fix PP_BLK_DIPHER -> DITHER typo SM8550 exclusively has a DITHER sub-block inside the PINGPONG block and no other registers, hence the DITHER name of the macro and a corresponding PINGPONG block length of zero. However, the PP_BLK_ macro name was typo'd to DIPHER rather than DITHER. Fixes: efcd0107727c ("drm/msm/dpu: add support for SM8550") Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/534214/ Link: https://lore.kernel.org/r/20230411-dpu-intf-te-v4-5-27ce1a5ab5c6@somainline.org Signed-off-by: Abhinav Kumar commit 85340c0256f9b85b47c5867e411df37d76df5858 Author: Marijn Suijten Date: Thu Apr 27 00:37:18 2023 +0200 drm/msm/dpu: Reindent REV_7xxx interrupt masks with tabs Use tabs for consistency with the other interrupt register definitions, rather than spaces. Fixes: ed6154a136e4 ("drm/msm/disp/dpu1: add intf offsets for SC7280 target") Fixes: 89688e2119b2 ("drm/msm/dpu: Add more of the INTF interrupt regions") Fixes: 4a352c2fc15a ("drm/msm/dpu: Introduce SC8280XP") Signed-off-by: Marijn Suijten Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/534212/ Link: https://lore.kernel.org/r/20230411-dpu-intf-te-v4-4-27ce1a5ab5c6@somainline.org Signed-off-by: Abhinav Kumar commit e9d9ce5462fecdeefec87953de71df4d025cbc72 Author: Marijn Suijten Date: Thu Apr 27 00:37:17 2023 +0200 drm/msm/dpu: Move non-MDP_TOP INTF_INTR offsets out of hwio header These offsets do not fall under the MDP TOP block and do not fit the comment right above. Move them to dpu_hw_interrupts.c next to the repsective MDP_INTF_x_OFF interrupt block offsets. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Marijn Suijten Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/534203/ Link: https://lore.kernel.org/r/20230411-dpu-intf-te-v4-3-27ce1a5ab5c6@somainline.org Signed-off-by: Abhinav Kumar commit cfbc21d1c0f9bc2f74acab84031fbaefdbb49ae1 Author: Marijn Suijten Date: Thu Apr 27 00:37:16 2023 +0200 drm/msm/dpu: Remove TE2 block and feature from DPU >= 5.0.0 hardware No hardware beyond kona (sm8250, DPU 6.0.0) defines the TE2 PINGPONG sub-block offset downstream, and according to insiders no DPU >= 5.0.0 hardware has support for it either. Especially since neither downstream nor upstream utilize these registers in any way, remove the erroneous specification from SM8150, SC8180X, SM8250, SC7180, SM8350, SC8280XP and SM8450 to prevent confusion. Note that downstream enables the PPSPLIT (split-FIFO) topology (single LM for 2 PP and 2 INTF) based on the presence of a TE2 block. Fixes: 386fced3f76f ("drm/msm/dpu: add SM8150 to hw catalog") Fixes: 7bdc0c4b8126 ("msm:disp:dpu1: add support for display for SC7180 target") Fixes: 0e91bcbb0016 ("drm/msm/dpu: Add SM8350 to hw catalog") Fixes: 4a352c2fc15a ("drm/msm/dpu: Introduce SC8280XP") Fixes: 100d7ef6995d ("drm/msm/dpu: add support for SM8450") Signed-off-by: Marijn Suijten Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/534210/ Link: https://lore.kernel.org/r/20230411-dpu-intf-te-v4-2-27ce1a5ab5c6@somainline.org Signed-off-by: Abhinav Kumar commit f9d5bb73c260f0478f43b07d9fb3dae7d7a8b36b Author: Marijn Suijten Date: Thu Apr 27 00:37:15 2023 +0200 drm/msm/dpu: Remove unused INTF0 interrupt mask from SM6115/QCM2290 Neither of these SoCs has INTF0, they only have a DSI interface on index 1. Stop enabling an interrupt that can't fire. Fixes: 3581b7062cec ("drm/msm/disp/dpu1: add support for display on SM6115") Fixes: 5334087ee743 ("drm/msm: add support for QCM2290 MDSS") Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/534204/ Link: https://lore.kernel.org/r/20230411-dpu-intf-te-v4-1-27ce1a5ab5c6@somainline.org Signed-off-by: Abhinav Kumar commit 686eb89b103631a41c7f69b8ac5fbca4a6b07fa0 Author: Arnaud Vrac Date: Wed Apr 19 16:41:17 2023 +0200 drm/msm/dpu: tweak lm pairings in msm8998 hw catalog Change lm blocks pairs so that lm blocks with the same features are paired together: LM_0 and LM_1 with PP and DSPP LM_2 and LM_5 with PP LM_3 and LM_4 This matches the sdm845 configuration and allows using pp or dspp when 2 lm blocks are needed in the topology. In the previous config the reservation code could never find an lm pair without a matching feature set. Signed-off-by: Arnaud Vrac Fixes: 94391a14fc27 ("drm/msm/dpu1: Add MSM8998 to hw catalog") Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/532905/ Link: https://lore.kernel.org/r/20230419-dpu-tweaks-v1-10-d1bac46db075@freebox.fr Signed-off-by: Abhinav Kumar commit 3f23a52fc2b890884828747111f7a3291d2a1b3d Author: Arnaud Vrac Date: Wed Apr 19 16:41:08 2023 +0200 drm/msm/dpu: tweak msm8998 hw catalog values Match the values found in the downstream msm-4.4 kernel sde driver. Signed-off-by: Arnaud Vrac Fixes: 94391a14fc27 ("drm/msm/dpu1: Add MSM8998 to hw catalog") Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/532900/ Link: https://lore.kernel.org/r/20230419-dpu-tweaks-v1-1-d1bac46db075@freebox.fr Signed-off-by: Abhinav Kumar commit a432fc31f03db2546a48bcf5dd69ca28ceb732bf Author: Marijn Suijten Date: Wed Apr 26 01:11:09 2023 +0200 drm/msm/dpu: Assign missing writeback log_mask The WB debug log mask ended up never being assigned, leading to writes to this block to never be logged even if the mask is enabled in dpu_hw_util_log_mask via debugfs. Fixes: 84a33d0fd921 ("drm/msm/dpu: add dpu_hw_wb abstraction for writeback blocks") Signed-off-by: Marijn Suijten Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/533860/ Link: https://lore.kernel.org/r/20230418-dpu-drop-useless-for-lookup-v3-1-e8d869eea455@somainline.org Signed-off-by: Abhinav Kumar commit 85c636284cb63b7740b4ae98881ace92158068d3 Author: Srinivas Kandagatla Date: Fri Apr 21 15:56:57 2023 +0100 drm/msm/dp: unregister audio driver during unbind while binding the code always registers a audio driver, however there is no corresponding unregistration done in unbind. This leads to multiple redundant audio platform devices if dp_display_bind and dp_display_unbind happens multiple times during startup. On X13s platform this resulted in 6 to 9 audio codec device instead of just 3 codec devices for 3 dp ports. Fix this by unregistering codecs on unbind. Signed-off-by: Srinivas Kandagatla Fixes: d13e36d7d222 ("drm/msm/dp: add audio support for Display Port on MSM") Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/533324/ Link: https://lore.kernel.org/r/20230421145657.12186-1-srinivas.kandagatla@linaro.org Signed-off-by: Abhinav Kumar commit 6e98b09da931a00bf4e0477d0fa52748bf28fcce Merge: b68ee1c6131c5 9b78d919632b7 Author: Linus Torvalds Date: Wed Apr 26 16:07:23 2023 -0700 Merge tag 'net-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Paolo Abeni: "Core: - Introduce a config option to tweak MAX_SKB_FRAGS. Increasing the default value allows for better BIG TCP performances - Reduce compound page head access for zero-copy data transfers - RPS/RFS improvements, avoiding unneeded NET_RX_SOFTIRQ when possible - Threaded NAPI improvements, adding defer skb free support and unneeded softirq avoidance - Address dst_entry reference count scalability issues, via false sharing avoidance and optimize refcount tracking - Add lockless accesses annotation to sk_err[_soft] - Optimize again the skb struct layout - Extends the skb drop reasons to make it usable by multiple subsystems - Better const qualifier awareness for socket casts BPF: - Add skb and XDP typed dynptrs which allow BPF programs for more ergonomic and less brittle iteration through data and variable-sized accesses - Add a new BPF netfilter program type and minimal support to hook BPF programs to netfilter hooks such as prerouting or forward - Add more precise memory usage reporting for all BPF map types - Adds support for using {FOU,GUE} encap with an ipip device operating in collect_md mode and add a set of BPF kfuncs for controlling encap params - Allow BPF programs to detect at load time whether a particular kfunc exists or not, and also add support for this in light skeleton - Bigger batch of BPF verifier improvements to prepare for upcoming BPF open-coded iterators allowing for less restrictive looping capabilities - Rework RCU enforcement in the verifier, add kptr_rcu and enforce BPF programs to NULL-check before passing such pointers into kfunc - Add support for kptrs in percpu hashmaps, percpu LRU hashmaps and in local storage maps - Enable RCU semantics for task BPF kptrs and allow referenced kptr tasks to be stored in BPF maps - Add support for refcounted local kptrs to the verifier for allowing shared ownership, useful for adding a node to both the BPF list and rbtree - Add BPF verifier support for ST instructions in convert_ctx_access() which will help new -mcpu=v4 clang flag to start emitting them - Add ARM32 USDT support to libbpf - Improve bpftool's visual program dump which produces the control flow graph in a DOT format by adding C source inline annotations Protocols: - IPv4: Allow adding to IPv4 address a 'protocol' tag. Such value indicates the provenance of the IP address - IPv6: optimize route lookup, dropping unneeded R/W lock acquisition - Add the handshake upcall mechanism, allowing the user-space to implement generic TLS handshake on kernel's behalf - Bridge: support per-{Port, VLAN} neighbor suppression, increasing resilience to nodes failures - SCTP: add support for Fair Capacity and Weighted Fair Queueing schedulers - MPTCP: delay first subflow allocation up to its first usage. This will allow for later better LSM interaction - xfrm: Remove inner/outer modes from input/output path. These are not needed anymore - WiFi: - reduced neighbor report (RNR) handling for AP mode - HW timestamping support - support for randomized auth/deauth TA for PASN privacy - per-link debugfs for multi-link - TC offload support for mac80211 drivers - mac80211 mesh fast-xmit and fast-rx support - enable Wi-Fi 7 (EHT) mesh support Netfilter: - Add nf_tables 'brouting' support, to force a packet to be routed instead of being bridged - Update bridge netfilter and ovs conntrack helpers to handle IPv6 Jumbo packets properly, i.e. fetch the packet length from hop-by-hop extension header. This is needed for BIT TCP support - The iptables 32bit compat interface isn't compiled in by default anymore - Move ip(6)tables builtin icmp matches to the udptcp one. This has the advantage that icmp/icmpv6 match doesn't load the iptables/ip6tables modules anymore when iptables-nft is used - Extended netlink error report for netdevice in flowtables and netdev/chains. Allow for incrementally add/delete devices to netdev basechain. Allow to create netdev chain without device Driver API: - Remove redundant Device Control Error Reporting Enable, as PCI core has already error reporting enabled at enumeration time - Move Multicast DB netlink handlers to core, allowing devices other then bridge to use them - Allow the page_pool to directly recycle the pages from safely localized NAPI - Implement lockless TX queue stop/wake combo macros, allowing for further code de-duplication and sanitization - Add YNL support for user headers and struct attrs - Add partial YNL specification for devlink - Add partial YNL specification for ethtool - Add tc-mqprio and tc-taprio support for preemptible traffic classes - Add tx push buf len param to ethtool, specifies the maximum number of bytes of a transmitted packet a driver can push directly to the underlying device - Add basic LED support for switch/phy - Add NAPI documentation, stop relaying on external links - Convert dsa_master_ioctl() to netdev notifier. This is a preparatory work to make the hardware timestamping layer selectable by user space - Add transceiver support and improve the error messages for CAN-FD controllers New hardware / drivers: - Ethernet: - AMD/Pensando core device support - MediaTek MT7981 SoC - MediaTek MT7988 SoC - Broadcom BCM53134 embedded switch - Texas Instruments CPSW9G ethernet switch - Qualcomm EMAC3 DWMAC ethernet - StarFive JH7110 SoC - NXP CBTX ethernet PHY - WiFi: - Apple M1 Pro/Max devices - RealTek rtl8710bu/rtl8188gu - RealTek rtl8822bs, rtl8822cs and rtl8821cs SDIO chipset - Bluetooth: - Realtek RTL8821CS, RTL8851B, RTL8852BS - Mediatek MT7663, MT7922 - NXP w8997 - Actions Semi ATS2851 - QTI WCN6855 - Marvell 88W8997 - Can: - STMicroelectronics bxcan stm32f429 Drivers: - Ethernet NICs: - Intel (1G, icg): - add tracking and reporting of QBV config errors - add support for configuring max SDU for each Tx queue - Intel (100G, ice): - refactor mailbox overflow detection to support Scalable IOV - GNSS interface optimization - Intel (i40e): - support XDP multi-buffer - nVidia/Mellanox: - add the support for linux bridge multicast offload - enable TC offload for egress and engress MACVLAN over bond - add support for VxLAN GBP encap/decap flows offload - extend packet offload to fully support libreswan - support tunnel mode in mlx5 IPsec packet offload - extend XDP multi-buffer support - support MACsec VLAN offload - add support for dynamic msix vectors allocation - drop RX page_cache and fully use page_pool - implement thermal zone to report NIC temperature - Netronome/Corigine: - add support for multi-zone conntrack offload - Solarflare/Xilinx: - support offloading TC VLAN push/pop actions to the MAE - support TC decap rules - support unicast PTP - Other NICs: - Broadcom (bnxt): enforce software based freq adjustments only on shared PHC NIC - RealTek (r8169): refactor to addess ASPM issues during NAPI poll - Micrel (lan8841): add support for PTP_PF_PEROUT - Cadence (macb): enable PTP unicast - Engleder (tsnep): add XDP socket zero-copy support - virtio-net: implement exact header length guest feature - veth: add page_pool support for page recycling - vxlan: add MDB data path support - gve: add XDP support for GQI-QPL format - geneve: accept every ethertype - macvlan: allow some packets to bypass broadcast queue - mana: add support for jumbo frame - Ethernet high-speed switches: - Microchip (sparx5): Add support for TC flower templates - Ethernet embedded switches: - Broadcom (b54): - configure 6318 and 63268 RGMII ports - Marvell (mv88e6xxx): - faster C45 bus scan - Microchip: - lan966x: - add support for IS1 VCAP - better TX/RX from/to CPU performances - ksz9477: add ETS Qdisc support - ksz8: enhance static MAC table operations and error handling - sama7g5: add PTP capability - NXP (ocelot): - add support for external ports - add support for preemptible traffic classes - Texas Instruments: - add CPSWxG SGMII support for J7200 and J721E - Intel WiFi (iwlwifi): - preparation for Wi-Fi 7 EHT and multi-link support - EHT (Wi-Fi 7) sniffer support - hardware timestamping support for some devices/firwmares - TX beacon protection on newer hardware - Qualcomm 802.11ax WiFi (ath11k): - MU-MIMO parameters support - ack signal support for management packets - RealTek WiFi (rtw88): - SDIO bus support - better support for some SDIO devices (e.g. MAC address from efuse) - RealTek WiFi (rtw89): - HW scan support for 8852b - better support for 6 GHz scanning - support for various newer firmware APIs - framework firmware backwards compatibility - MediaTek WiFi (mt76): - P2P support - mesh A-MSDU support - EHT (Wi-Fi 7) support - coredump support" * tag 'net-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2078 commits) net: phy: hide the PHYLIB_LEDS knob net: phy: marvell-88x2222: remove unnecessary (void*) conversions tcp/udp: Fix memleaks of sk and zerocopy skbs with TX timestamp. net: amd: Fix link leak when verifying config failed net: phy: marvell: Fix inconsistent indenting in led_blink_set lan966x: Don't use xdp_frame when action is XDP_TX tsnep: Add XDP socket zero-copy TX support tsnep: Add XDP socket zero-copy RX support tsnep: Move skb receive action to separate function tsnep: Add functions for queue enable/disable tsnep: Rework TX/RX queue initialization tsnep: Replace modulo operation with mask net: phy: dp83867: Add led_brightness_set support net: phy: Fix reading LED reg property drivers: nfc: nfcsim: remove return value check of `dev_dir` net: phy: dp83867: Remove unnecessary (void*) conversions net: ethtool: coalesce: try to make user settings stick twice net: mana: Check if netdev/napi_alloc_frag returns single page net: mana: Rename mana_refill_rxoob and remove some empty lines net: veth: add page_pool stats ... commit 9419092fb2630c30e4ffeb9ef61007ef0c61827a Author: Dave Chinner Date: Thu Apr 27 09:02:11 2023 +1000 xfs: fix livelock in delayed allocation at ENOSPC On a filesystem with a non-zero stripe unit and a large sequential write, delayed allocation will set a minimum allocation length of the stripe unit. If allocation fails because there are no extents long enough for an aligned minlen allocation, it is supposed to fall back to unaligned allocation which allows single block extents to be allocated. When the allocator code was rewritting in the 6.3 cycle, this fallback was broken - the old code used args->fsbno as the both the allocation target and the allocation result, the new code passes the target as a separate parameter. The conversion didn't handle the aligned->unaligned fallback path correctly - it reset args->fsbno to the target fsbno on failure which broke allocation failure detection in the high level code and so it never fell back to unaligned allocations. This resulted in a loop in writeback trying to allocate an aligned block, getting a false positive success, trying to insert the result in the BMBT. This did nothing because the extent already was in the BMBT (merge results in an unchanged extent) and so it returned the prior extent to the conversion code as the current iomap. Because the iomap returned didn't cover the offset we tried to map, xfs_convert_blocks() then retries the allocation, which fails in the same way and now we have a livelock. Reported-and-tested-by: Brian Foster Fixes: 85843327094f ("xfs: factor xfs_bmap_btalloc()") Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong commit edbdb43fc96b11b3bfa531be306a1993d9fe89ec Author: Sean Christopherson Date: Wed Apr 26 15:03:23 2023 -0700 KVM: x86: Preserve TDP MMU roots until they are explicitly invalidated Preserve TDP MMU roots until they are explicitly invalidated by gifting the TDP MMU itself a reference to a root when it is allocated. Keeping a reference in the TDP MMU fixes a flaw where the TDP MMU exhibits terrible performance, and can potentially even soft-hang a vCPU, if a vCPU frequently unloads its roots, e.g. when KVM is emulating SMI+RSM. When KVM emulates something that invalidates _all_ TLB entries, e.g. SMI and RSM, KVM unloads all of the vCPUs roots (KVM keeps a small per-vCPU cache of previous roots). Unloading roots is a simple way to ensure KVM flushes and synchronizes all roots for the vCPU, as KVM flushes and syncs when allocating a "new" root (from the vCPU's perspective). In the shadow MMU, KVM keeps track of all shadow pages, roots included, in a per-VM hash table. Unloading a shadow MMU root just wipes it from the per-vCPU cache; the root is still tracked in the per-VM hash table. When KVM loads a "new" root for the vCPU, KVM will find the old, unloaded root in the per-VM hash table. Unlike the shadow MMU, the TDP MMU doesn't track "inactive" roots in a per-VM structure, where "active" in this case means a root is either in-use or cached as a previous root by at least one vCPU. When a TDP MMU root becomes inactive, i.e. the last vCPU reference to the root is put, KVM immediately frees the root (asterisk on "immediately" as the actual freeing may be done by a worker, but for all intents and purposes the root is gone). The TDP MMU behavior is especially problematic for 1-vCPU setups, as unloading all roots effectively frees all roots. The issue is mitigated to some degree in multi-vCPU setups as a different vCPU usually holds a reference to an unloaded root and thus keeps the root alive, allowing the vCPU to reuse its old root after unloading (with a flush+sync). The TDP MMU flaw has been known for some time, as until very recently, KVM's handling of CR0.WP also triggered unloading of all roots. The CR0.WP toggling scenario was eventually addressed by not unloading roots when _only_ CR0.WP is toggled, but such an approach doesn't Just Work for emulating SMM as KVM must emulate a full TLB flush on entry and exit to/from SMM. Given that the shadow MMU plays nice with unloading roots at will, teaching the TDP MMU to do the same is far less complex than modifying KVM to track which roots need to be flushed before reuse. Note, preserving all possible TDP MMU roots is not a concern with respect to memory consumption. Now that the role for direct MMUs doesn't include information about the guest, e.g. CR0.PG, CR0.WP, CR4.SMEP, etc., there are _at most_ six possible roots (where "guest_mode" here means L2): 1. 4-level !SMM !guest_mode 2. 4-level SMM !guest_mode 3. 5-level !SMM !guest_mode 4. 5-level SMM !guest_mode 5. 4-level !SMM guest_mode 6. 5-level !SMM guest_mode And because each vCPU can track 4 valid roots, a VM can already have all 6 root combinations live at any given time. Not to mention that, in practice, no sane VMM will advertise different guest.MAXPHYADDR values across vCPUs, i.e. KVM won't ever use both 4-level and 5-level roots for a single VM. Furthermore, the vast majority of modern hypervisors will utilize EPT/NPT when available, thus the guest_mode=%true cases are also unlikely to be utilized. Reported-by: Jeremi Piotrowski Link: https://lore.kernel.org/all/959c5bce-beb5-b463-7158-33fc4a4f910c@linux.microsoft.com Link: https://lkml.kernel.org/r/20220209170020.1775368-1-pbonzini%40redhat.com Link: https://lore.kernel.org/all/20230322013731.102955-1-minipli@grsecurity.net Link: https://lore.kernel.org/all/000000000000a0bc2b05f9dd7fab@google.com Link: https://lore.kernel.org/all/000000000000eca0b905fa0f7756@google.com Cc: Ben Gardon Cc: David Matlack Cc: stable@vger.kernel.org Tested-by: Jeremi Piotrowski Link: https://lore.kernel.org/r/20230426220323.3079789-1-seanjc@google.com Signed-off-by: Sean Christopherson commit ca3d1a4b419acad3fca6828884acb03614f7558b Author: Linus Walleij Date: Wed Feb 8 19:33:28 2023 +0200 hte: tegra-194: Use proper includes The test driver uses the gpiod consumer API so include the right header. This may cause a problem with struct of_device_id being implcitly pulled in by the legacy header so include explicitly as well. While at it, drop explicit moduleparam.h (it's included with module.h) and sort the headers. Signed-off-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Dipen Patel Signed-off-by: Dipen Patel commit 9e0c2d40a40733fba605ff47a08f3eba2fab4fbb Author: ye xingchen Date: Thu Nov 17 15:17:29 2022 +0800 hte: Use device_match_of_node() Replace the open-code with device_match_of_node(). Signed-off-by: ye xingchen Acked-by: Dipen Patel Signed-off-by: Dipen Patel commit e078180d66848a6a890daf0a3ce28dc43cc66790 Author: Dan Carpenter Date: Wed Apr 19 17:30:00 2023 +0300 hte: tegra-194: Fix off by one in tegra_hte_map_to_line_id() The "map_sz" is the number of elements in the "m" array so the > comparison needs to be changed to >= to prevent an out of bounds read. Fixes: 09574cca6ad6 ("hte: Add Tegra194 HTE kernel provider") Signed-off-by: Dan Carpenter Acked-by: Dipen Patel Signed-off-by: Dipen Patel commit 6680c835ada1b34e882d0a32612f7294c62e27e0 Author: Arnd Bergmann Date: Thu Dec 15 17:46:19 2022 +0100 hte: tegra: fix 'struct of_device_id' build error Without the extra #include, this driver produces a build failure in some configurations. drivers/hte/hte-tegra194-test.c:96:34: error: array type has incomplete element type 'struct of_device_id' 96 | static const struct of_device_id tegra_hte_test_of_match[] = { Fixes: 9a75a7cd03c9 ("hte: Add Tegra HTE test driver") Signed-off-by: Arnd Bergmann Acked-by: Dipen Patel Signed-off-by: Dipen Patel commit 902dea62b3dda532172c0f4d0410fe595266b22c Author: Rob Herring Date: Fri Mar 10 08:47:06 2023 -0600 hte: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Acked-by: Dipen Patel Signed-off-by: Dipen Patel commit 7d507452048d9a6971998339243d16a09c95a842 Author: Dipen Patel Date: Thu Apr 13 17:44:55 2023 -0700 gpio: tegra186: Add Tegra234 hte support To enable timestamp support for the Tegra234, has_gte variable needs to be set true. Signed-off-by: Dipen Patel Acked-by: Thierry Reding Acked-by: Bartosz Golaszewski Reviewed-by: Linus Walleij commit d02b1cabc7c6fe0e237bf8a2a6a8813302cfd87c Author: Dipen Patel Date: Thu Apr 13 17:44:54 2023 -0700 hte: handle nvidia,gpio-controller property The dt binding adds nvidia,gpio-controller property from Tegra234 SoC onwards to simplify code handling gpio chip search. The gpio chip search is needed for the AON GPIO GTE instances to map the hardware timestamp GPIO request (coming from the GPIO framework) to the tegra HTE providers. The patch also adds new gpio chip match function to match from the fwnode instead of the gpio controller label. The addition of the property does not break ABI for the existing Tegra194 code. Signed-off-by: Dipen Patel Reviewed-by: Linus Walleij commit 0ebc475fb636df12222faa04dd989a4e3c87f31a Author: Dipen Patel Date: Thu Apr 13 17:44:53 2023 -0700 hte: Deprecate nvidia,slices property The relevant DT bindings deprecates nvidia,slices property from Tegra234 SoC onwards, moving the slices value per SoC data structure instead. Signed-off-by: Dipen Patel commit b003fb5c9df8a8923bf46e0c00cc54edcfb0fbe3 Author: Dipen Patel Date: Thu Apr 13 17:44:52 2023 -0700 hte: Add Tegra234 provider The Tegra234 AON GPIO instance and LIC IRQ support HTE. For the GPIO HTE support, it also requires to add mapping between GPIO and HTE framework same as it was done with Tegra194 SoC. Signed-off-by: Dipen Patel commit 59cc80a6d8695e7b4b51154ea2d08af551b6c359 Author: Dipen Patel Date: Thu Apr 13 17:44:51 2023 -0700 hte: Re-phrase tegra API document Make Tegra194 API document generic to make it applicable for current and future tegra hte providers. Signed-off-by: Dipen Patel Reviewed-by: Bagas Sanjaya commit 29662d622641af8866aac904c8aa264844086af3 Author: Dipen Patel Date: Thu Apr 13 17:44:50 2023 -0700 arm64: tegra: Add Tegra234 GTE nodes Add GTE LIC and AON GPIO nodes for the tegra234 SoC. Signed-off-by: Dipen Patel Acked-by: Thierry Reding commit 1815e37b6e67f2a543e36628bfe6a834aad3ea1b Author: Dipen Patel Date: Thu Apr 13 17:44:49 2023 -0700 dt-bindings: timestamp: Deprecate nvidia,slices property The property is not necessary as it is a constant value and can be hardcoded in the driver code. Signed-off-by: Dipen Patel Reviewed-by: Linus Walleij Acked-by: Rob Herring commit d0672fa4931dcb9d9d53002e855f25dd7507a300 Author: Dipen Patel Date: Thu Apr 13 17:44:48 2023 -0700 dt-bindings: timestamp: Add Tegra234 support Added timestamp provider support for the Tegra234 in devicetree bindings. From Tegra234 SoC onwards, the nvidia,gpio-controller property is required. This is needed as the tegra always-on (AON) GPIO HTE/GTE provider depends on the AON GPIO controller where it needs to do namespace conversion between GPIO line number (belonging to AON GPIO controller instance) and the GTE slice bits. Signed-off-by: Dipen Patel Reviewed-by: Krzysztof Kozlowski commit fdd1e3489b30ba6ba3075d38ce6f448e04119c71 Author: Dipen Patel Date: Thu Apr 13 17:44:47 2023 -0700 MAINTAINERS: Add HTE/timestamp subsystem details Add tree, mailing list and patchwork details. Signed-off-by: Dipen Patel Acked-by: Thierry Reding commit b68ee1c6131c540a62ecd443be89c406401df091 Merge: 36006b1d5c046 3c85f087faeca Author: Linus Torvalds Date: Wed Apr 26 15:39:25 2023 -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 (megaraid_sas, scsi_debug, lpfc, target, mpi3mr, hisi_sas, arcmsr). The major core change is the constification of the host templates (which touches everything) along with other minor fixups and clean ups" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (207 commits) scsi: ufs: mcq: Use pointer arithmetic in ufshcd_send_command() scsi: ufs: mcq: Annotate ufshcd_inc_sq_tail() appropriately scsi: cxlflash: s/semahpore/semaphore/ scsi: lpfc: Silence an incorrect device output scsi: mpi3mr: Use IRQ save variants of spinlock to protect chain frame allocation scsi: scsi_debug: Fix missing error code in scsi_debug_init() scsi: hisi_sas: Work around build failure in suspend function scsi: lpfc: Fix ioremap issues in lpfc_sli4_pci_mem_setup() scsi: mpt3sas: Fix an issue when driver is being removed scsi: mpt3sas: Remove HBA BIOS version in the kernel log scsi: target: core: Fix invalid memory access scsi: scsi_debug: Drop sdebug_queue scsi: scsi_debug: Only allow sdebug_max_queue be modified when no shosts scsi: scsi_debug: Use scsi_host_busy() in delay_store() and ndelay_store() scsi: scsi_debug: Use blk_mq_tagset_busy_iter() in stop_all_queued() scsi: scsi_debug: Use blk_mq_tagset_busy_iter() in sdebug_blk_mq_poll() scsi: scsi_debug: Dynamically allocate sdebug_queued_cmd scsi: scsi_debug: Use scsi_block_requests() to block queues scsi: scsi_debug: Protect block_unblock_all_queues() with mutex scsi: scsi_debug: Change shost list lock to a mutex ... commit 158009f1b4a33bc0f354b994eea361362bd83226 Author: Geert Uytterhoeven Date: Wed Apr 26 15:43:34 2023 +0200 timekeeping: Fix references to nonexistent ktime_get_fast_ns() There was never a function named ktime_get_fast_ns(). Presumably these should refer to ktime_get_mono_fast_ns() instead. Fixes: c1ce406e80fb15fa ("timekeeping: Fix up function documentation for the NMI safe accessors") Signed-off-by: Geert Uytterhoeven Signed-off-by: Thomas Gleixner Acked-by: John Stultz Link: https://lore.kernel.org/r/06df7b3cbd94f016403bbf6cd2b38e4368e7468f.1682516546.git.geert+renesas@glider.be commit c3a6ef330a08eba406f82b0b8cbca4e4d9b7c4ba Merge: ab396fb2f37da bea407a427baa Author: Jiri Kosina Date: Wed Apr 26 23:09:07 2023 +0200 Merge branch 'for-6.4/wacom' into for-linus - improved handling of battery quirk (Jason Gerecke) - lazy initialization of battery interfaces (Jason Gerecke) commit ab396fb2f37dabc436bbe52ac0d287f95080ee65 Merge: 67471b89989d9 bf81de760a836 Author: Jiri Kosina Date: Wed Apr 26 23:08:04 2023 +0200 Merge branch 'for-6.4/tests' into for-linus - import of bunch of HID selftests from out-of-tree hid-tools project (Benjamin Tissoires) commit 026b85796ab4d52af56f8a1c60d2613983ecd845 Author: Ard Biesheuvel Date: Tue Apr 18 15:49:52 2023 +0200 efi/zboot: arm64: Grab code size from ELF symbol in payload Instead of relying on a dodgy dd hack to copy the image code size from the uncompressed image's PE header to the end of the compressed image, let's grab the code size from the symbol that is injected into the ELF object by the Kbuild rules that generate the compressed payload. Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland commit 67471b89989d960a2f2283e281287481e791fb6d Merge: 5fce154a4d9fc d750d14803627 Author: Jiri Kosina Date: Wed Apr 26 23:05:55 2023 +0200 Merge branch 'for-6.4/nintendo' into for-linus - drastically reducing Bluetooth disconnects on hid-nintendo driven devices (Daniel J. Ogorchock) - proper rumble queue overrun handling (Daniel J. Ogorchock) commit 5fce154a4d9fcbf897fcaa0ebf084618dd6d751f Merge: 0549fbac401ce ca6961d8a851f Author: Jiri Kosina Date: Wed Apr 26 23:03:00 2023 +0200 Merge branch 'for-6.4/mcp2221' into for-linus - generic code improvements for mcp2221 driver (Louis Morhet) commit 0549fbac401ced4adea4fca44baf8bab7ebcfc74 Merge: d411b5aa1f49c 539adfedbd2d5 Author: Jiri Kosina Date: Wed Apr 26 22:57:40 2023 +0200 Merge branch 'for-6.4/logitech-hidpp' into for-linus - support for ADC measurement (Bastien Nocera) - support for Logitech G935 (Bastien Nocera) commit d411b5aa1f49c065dfe23b7a7e72ee56f2677331 Merge: b680751bd9c55 a2654c1f640c4 Author: Jiri Kosina Date: Wed Apr 26 22:57:15 2023 +0200 Merge branch 'for-6.4/led-includes' into for-linus - explicit include fixes (Thomas Weißschuh) commit b680751bd9c55b8dd85d1f1067f4a0474449c819 Merge: ba984d2798fed 0f6fac2cfbefa Author: Jiri Kosina Date: Wed Apr 26 22:56:33 2023 +0200 Merge branch 'for-6.4/kye' into for-linus - generic support for all Kye tablets (David Yang) commit ba984d2798fedd73ec85b7ef44ff75b7216903fb Merge: 63f7cf6659290 2be404486c059 Author: Jiri Kosina Date: Wed Apr 26 22:55:51 2023 +0200 Merge branch 'for-6.4/i2c-hid' into for-linus - reset GPIO support (Hans de Goede) commit 63f7cf66592907e17073c14f6a24c366b1f68db5 Merge: 5f86a084a4127 35903009dbde8 Author: Jiri Kosina Date: Wed Apr 26 22:54:24 2023 +0200 Merge branch 'for-6.4/core' into for-linus - improve handling of generic "Digitizer" usage (Jason Gerecke) - support for KEY_CAMERA_FOCUS (Feng Qi) commit 5f86a084a4127458563a845459d08770f3a59465 Merge: cdc780f044a80 29e1ecc197d41 Author: Jiri Kosina Date: Wed Apr 26 22:53:41 2023 +0200 Merge branch 'for-6.4/apple' into for-linus - quirks for Apple Geyser 3 and Apple Geyser 4 (Alex Henrie) commit cdc780f044a803aff8845b949f800f0f3d095d5f Merge: 38518593ec55e 37386669887d3 Author: Jiri Kosina Date: Wed Apr 26 22:52:34 2023 +0200 Merge branch 'for-6.4/amd-sfh' into for-linus - assorted functional fixes for amd-sfh driver (Basavaraj Natikar) commit 36006b1d5c04692924f011aa949e8788f1c604de Merge: 48dc810012a6b 140b26035b2d3 Author: Linus Torvalds Date: Wed Apr 26 13:09:45 2023 -0700 Merge tag 'ata-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata Pull ata updates from Damien Le Moal: - Many cleanups of the pata_parport driver and of its protocol modules (Ondrej) - Remove unused code (ata_id_xxx() functions) (Sergey) - Add Add UniPhier SATA controller DT bindings (Kunihiko) - Fix dependencies for the Freescale QorIQ AHCI SATA controller driver (Geert) - DT property handling improvements (Rob) * tag 'ata-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: (57 commits) ata: pata_parport-bpck6: Declare mode_map as static ata: pata_parport-bpck6: Remove dependency on 64BIT ata: pata_parport-bpck6: reduce indents in bpck6_open ata: pata_parport-bpck6: delete ppc6lnx.c ata: pata_parport-bpck6: move defines and mode_map to bpck6.c ata: pata_parport-bpck6: move ppc6_wr_data_byte to bpck6.c and rename ata: pata_parport-bpck6: move ppc6_rd_data_byte to bpck6.c and rename ata: pata_parport-bpck6: move ppc6_send_cmd to bpck6.c and rename ata: pata_parport-bpck6: move ppc6_deselect to bpck6.c and rename ata: pata_parport-bpck6: merge ppc6_select into bpck6_open ata: pata_parport-bpck6: move ppc6_open to bpck6.c and rename ata: pata_parport-bpck6: move ppc6_wr_extout to bpck6.c and rename ata: pata_parport-bpck6: move ppc6_wait_for_fifo to bpck6.c and rename ata: pata_parport-bpck6: merge ppc6_wr_data_blk into bpck6_write_block ata: pata_parport-bpck6: merge ppc6_rd_data_blk into bpck6_read_block ata: pata_parport-bpck6: merge ppc6_wr_port16_blk into bpck6_write_block ata: pata_parport-bpck6: merge ppc6_rd_port16_blk into bpck6_read_block ata: pata_parport-bpck6: merge ppc6_wr_port into bpck6_write_regr ata: pata_parport-bpck6: merge ppc6_rd_port into bpck6_read_regr ata: pata_parport-bpck6: remove ppc6_close ... commit 48dc810012a6b4f4ba94073d6b7edb4f76edeb72 Merge: 9dd6956b38923 38d11da522aac Author: Linus Torvalds Date: Wed Apr 26 13:05:21 2023 -0700 Merge tag 'for-6.4/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Split dm-bufio's rw_semaphore and rbtree. Offers improvements to dm-bufio's locking to allow increased concurrent IO -- particularly for read access for buffers already in dm-bufio's cache. - Also split dm-bio-prison-v1's spinlock and rbtree with comparable aim at improving concurrent IO (for the DM thinp target). - Both the dm-bufio and dm-bio-prison-v1 scaling of the number of locks and rbtrees used are managed by dm_num_hash_locks(). And the hash function used by both is dm_hash_locks_index(). - Allow DM targets to require DISCARD, WRITE_ZEROES and SECURE_ERASE to be split at the target specified boundary (in terms of max_discard_sectors, max_write_zeroes_sectors and max_secure_erase_sectors respectively). - DM verity error handling fix for check_at_most_once on FEC. - Update DM verity target to emit audit events on verification failure and more. - DM core ->io_hints improvements needed in support of new discard support that is added to the DM "zero" and "error" targets. - Fix missing kmem_cache_destroy() call in initialization error path of both the DM integrity and DM clone targets. - A couple fixes for DM flakey, also add "error_reads" feature. - Fix DM core's resume to not lock FS when the DM map is NULL; otherwise initial table load can race with FS mount that takes superblock's ->s_umount rw_semaphore. - Various small improvements to both DM core and DM targets. * tag 'for-6.4/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (40 commits) dm: don't lock fs when the map is NULL in process of resume dm flakey: add an "error_reads" option dm flakey: remove trailing space in the table line dm flakey: fix a crash with invalid table line dm ioctl: fix nested locking in table_clear() to remove deadlock concern dm: unexport dm_get_queue_limits() dm: allow targets to require splitting WRITE_ZEROES and SECURE_ERASE dm: add helper macro for simple DM target module init and exit dm raid: remove unused d variable dm: remove unnecessary (void*) conversions dm mirror: add DMERR message if alloc_workqueue fails dm: push error reporting down to dm_register_target() dm integrity: call kmem_cache_destroy() in dm_integrity_init() error path dm clone: call kmem_cache_destroy() in dm_clone_init() error path dm error: add discard support dm zero: add discard support dm table: allow targets without devices to set ->io_hints dm verity: emit audit events on verification failure and more dm verity: fix error handling for check_at_most_once on FEC dm: improve hash_locks sizing and hash function ... commit b3c98052d46948a8d65d2778c7f306ff38366aac Merge: 4a5fd419952e4 4984563823f00 Author: Paolo Bonzini Date: Wed Apr 26 15:56:51 2023 -0400 Merge tag 'kvm-x86-vmx-6.4' of https://github.com/kvm-x86/linux into HEAD KVM VMX changes for 6.4: - Fix a bug in emulation of ENCLS in compatibility mode - Allow emulation of NOP and PAUSE for L2 - Misc cleanups commit 4a5fd419952e49ef870e9259d815718062871cc1 Merge: c21775ae021f8 c0d0ce9b5a851 Author: Paolo Bonzini Date: Wed Apr 26 15:56:27 2023 -0400 Merge tag 'kvm-x86-svm-6.4' of https://github.com/kvm-x86/linux into HEAD KVM SVM changes for 6.4: - Add support for virtual NMIs - Fixes for edge cases related to virtual interrupts commit c21775ae021f8d28bb1b8ab857b7342e0f8b180d Merge: 48b1893ae38bd 20aef201dafba Author: Paolo Bonzini Date: Wed Apr 26 15:54:40 2023 -0400 Merge tag 'kvm-x86-selftests-6.4' of https://github.com/kvm-x86/linux into HEAD KVM selftests, and an AMX/XCR0 bugfix, for 6.4: - Don't advertise XTILE_CFG in KVM_GET_SUPPORTED_CPUID if XTILE_DATA is not being reported due to userspace not opting in via prctl() - Overhaul the AMX selftests to improve coverage and cleanup the test - Misc cleanups commit 48b1893ae38bd6d46a9dcfc7b85c70a143fb8cab Merge: 807b758496e42 457bd7af1a171 Author: Paolo Bonzini Date: Wed Apr 26 15:53:36 2023 -0400 Merge tag 'kvm-x86-pmu-6.4' of https://github.com/kvm-x86/linux into HEAD KVM x86 PMU changes for 6.4: - Disallow virtualizing legacy LBRs if architectural LBRs are available, the two are mutually exclusive in hardware - Disallow writes to immutable feature MSRs (notably PERF_CAPABILITIES) after KVM_RUN, and overhaul the vmx_pmu_caps selftest to better validate PERF_CAPABILITIES - Apply PMU filters to emulated events and add test coverage to the pmu_event_filter selftest - Misc cleanups and fixes commit 9dd6956b38923dc1b7b349ca1eee3c0bb1f0163a Merge: 5b9a7bb72fddb 55793ea54d777 Author: Linus Torvalds Date: Wed Apr 26 12:52:58 2023 -0700 Merge tag 'for-6.4/block-2023-04-21' of git://git.kernel.dk/linux Pull block updates from Jens Axboe: - drbd patches, bringing us closer to unifying the out-of-tree version and the in tree one (Andreas, Christoph) - support for auto-quiesce for the s390 dasd driver (Stefan) - MD pull request via Song: - md/bitmap: Optimal last page size (Jon Derrick) - Various raid10 fixes (Yu Kuai, Li Nan) - md: add error_handlers for raid0 and linear (Mariusz Tkaczyk) - NVMe pull request via Christoph: - Drop redundant pci_enable_pcie_error_reporting (Bjorn Helgaas) - Validate nvmet module parameters (Chaitanya Kulkarni) - Fence TCP socket on receive error (Chris Leech) - Fix async event trace event (Keith Busch) - Minor cleanups (Chaitanya Kulkarni, zhenwei pi) - Fix and cleanup nvmet Identify handling (Damien Le Moal, Christoph Hellwig) - Fix double blk_mq_complete_request race in the timeout handler (Lei Yin) - Fix irq locking in nvme-fcloop (Ming Lei) - Remove queue mapping helper for rdma devices (Sagi Grimberg) - use structured request attribute checks for nbd (Jakub) - fix blk-crypto race conditions between keyslot management (Eric) - add sed-opal support for reading read locking range attributes (Ondrej) - make fault injection configurable for null_blk (Akinobu) - clean up the request insertion API (Christoph) - clean up the queue running API (Christoph) - blkg config helper cleanups (Tejun) - lazy init support for blk-iolatency (Tejun) - various fixes and tweaks to ublk (Ming) - remove hybrid polling. It hasn't really been useful since we got async polled IO support, and these days we don't support sync polled IO at all (Keith) - misc fixes, cleanups, improvements (Zhong, Ondrej, Colin, Chengming, Chaitanya, me) * tag 'for-6.4/block-2023-04-21' of git://git.kernel.dk/linux: (118 commits) nbd: fix incomplete validation of ioctl arg ublk: don't return 0 in case of any failure sed-opal: geometry feature reporting command null_blk: Always check queue mode setting from configfs block: ublk: switch to ioctl command encoding blk-mq: fix the blk_mq_add_to_requeue_list call in blk_kick_flush block, bfq: Fix division by zero error on zero wsum fault-inject: fix build error when FAULT_INJECTION_CONFIGFS=y and CONFIGFS_FS=m block: store bdev->bd_disk->fops->submit_bio state in bdev block: re-arrange the struct block_device fields for better layout md/raid5: remove unused working_disks variable md/raid10: don't call bio_start_io_acct twice for bio which experienced read error md/raid10: fix memleak of md thread md/raid10: fix memleak for 'conf->bio_split' md/raid10: fix leak of 'r10bio->remaining' for recovery md/raid10: don't BUG_ON() in raise_barrier() md: fix soft lockup in status_resync md: add error_handlers for raid0 and linear md: Use optimal I/O size for last bitmap page md: Fix types in sb writer ... commit 807b758496e42ada4ba3f3defcfbac88afcd64f8 Merge: a1c288f87de7a 9ed3bf411226f Author: Paolo Bonzini Date: Wed Apr 26 15:50:01 2023 -0400 Merge tag 'kvm-x86-mmu-6.4' of https://github.com/kvm-x86/linux into HEAD KVM x86 MMU changes for 6.4: - Tweak FNAME(sync_spte) to avoid unnecessary writes+flushes when the guest is only adding new PTEs - Overhaul .sync_page() and .invlpg() to share the .sync_page() implementation, i.e. utilize .sync_page()'s optimizations when emulating invalidations - Clean up the range-based flushing APIs - Revamp the TDP MMU's reaping of Accessed/Dirty bits to clear a single A/D bit using a LOCK AND instead of XCHG, and skip all of the "handle changed SPTE" overhead associated with writing the entire entry - Track the number of "tail" entries in a pte_list_desc to avoid having to walk (potentially) all descriptors during insertion and deletion, which gets quite expensive if the guest is spamming fork() - Misc cleanups commit a1c288f87de7aff94e87724127eabb6cdb38b120 Merge: e1a6d5cf10dd9 cf9f4c0eb1699 Author: Paolo Bonzini Date: Wed Apr 26 15:49:23 2023 -0400 Merge tag 'kvm-x86-misc-6.4' of https://github.com/kvm-x86/linux into HEAD KVM x86 changes for 6.4: - Optimize CR0.WP toggling by avoiding an MMU reload when TDP is enabled, and by giving the guest control of CR0.WP when EPT is enabled on VMX (VMX-only because SVM doesn't support per-bit controls) - Add CR0/CR4 helpers to query single bits, and clean up related code where KVM was interpreting kvm_read_cr4_bits()'s "unsigned long" return as a bool - Move AMD_PSFD to cpufeatures.h and purge KVM's definition - Misc cleanups commit e1a6d5cf10dd93fc27d8c85cd7b3e41f08a816e6 Merge: 4f382a79a66b1 b0d237087c674 Author: Paolo Bonzini Date: Wed Apr 26 15:48:44 2023 -0400 Merge tag 'kvm-x86-generic-6.4' of https://github.com/kvm-x86/linux into HEAD Common KVM changes for 6.4: - Drop unnecessary casts from "void *" throughout kvm_main.c - Tweak the layout of "struct kvm_mmu_memory_cache" to shrink the struct size by 8 bytes on 64-bit kernels by utilizing a padding hole - Fix a documentation format goof that was introduced when the KVM docs were converted to ReST - Constify MIPS's internal callbacks (a leftover from the hardware enabling rework that landed in 6.3) commit 4f382a79a66b1a926e30f6d89295fc8fe2c4a86e Merge: b3c129e33e91f 36fe1b29b3cae Author: Paolo Bonzini Date: Wed Apr 26 15:46:52 2023 -0400 Merge tag 'kvmarm-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 updates for 6.4 - Numerous fixes for the pathological lock inversion issue that plagued KVM/arm64 since... forever. - New framework allowing SMCCC-compliant hypercalls to be forwarded to userspace, hopefully paving the way for some more features being moved to VMMs rather than be implemented in the kernel. - Large rework of the timer code to allow a VM-wide offset to be applied to both virtual and physical counters as well as a per-timer, per-vcpu offset that complements the global one. This last part allows the NV timer code to be implemented on top. - A small set of fixes to make sure that we don't change anything affecting the EL1&0 translation regime just after having having taken an exception to EL2 until we have executed a DSB. This ensures that speculative walks started in EL1&0 have completed. - The usual selftest fixes and improvements. commit b3c129e33e91fa3dc3171f45b90edb35e60dbc33 Merge: 400d2132288ed 8a46df7cd135f Author: Paolo Bonzini Date: Wed Apr 26 15:43:15 2023 -0400 Merge tag 'kvm-s390-next-6.4-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD Minor cleanup: - phys_to_virt conversion - Improvement of VSIE AP management commit 5b9a7bb72fddbc5247f56ede55d485fab7abdf92 Merge: 5c7ecada25d20 3c85cc43c8e78 Author: Linus Torvalds Date: Wed Apr 26 12:40:31 2023 -0700 Merge tag 'for-6.4/io_uring-2023-04-21' of git://git.kernel.dk/linux Pull io_uring updates from Jens Axboe: - Cleanup of the io-wq per-node mapping, notably getting rid of it so we just have a single io_wq entry per ring (Breno) - Followup to the above, move accounting to io_wq as well and completely drop struct io_wqe (Gabriel) - Enable KASAN for the internal io_uring caches (Breno) - Add support for multishot timeouts. Some applications use timeouts to wake someone waiting on completion entries, and this makes it a bit easier to just have a recurring timer rather than needing to rearm it every time (David) - Support archs that have shared cache coloring between userspace and the kernel, and hence have strict address requirements for mmap'ing the ring into userspace. This should only be parisc/hppa. (Helge, me) - XFS has supported O_DIRECT writes without needing to lock the inode exclusively for a long time, and ext4 now supports it as well. This is true for the common cases of not extending the file size. Flag the fs as having that feature, and utilize that to avoid serializing those writes in io_uring (me) - Enable completion batching for uring commands (me) - Revert patch adding io_uring restriction to what can be GUP mapped or not. This does not belong in io_uring, as io_uring isn't really special in this regard. Since this is also getting in the way of cleanups and improvements to the GUP code, get rid of if (me) - A few series greatly reducing the complexity of registered resources, like buffers or files. Not only does this clean up the code a lot, the simplified code is also a LOT more efficient (Pavel) - Series optimizing how we wait for events and run task_work related to it (Pavel) - Fixes for file/buffer unregistration with DEFER_TASKRUN (Pavel) - Misc cleanups and improvements (Pavel, me) * tag 'for-6.4/io_uring-2023-04-21' of git://git.kernel.dk/linux: (71 commits) Revert "io_uring/rsrc: disallow multi-source reg buffers" io_uring: add support for multishot timeouts io_uring/rsrc: disassociate nodes and rsrc_data io_uring/rsrc: devirtualise rsrc put callbacks io_uring/rsrc: pass node to io_rsrc_put_work() io_uring/rsrc: inline io_rsrc_put_work() io_uring/rsrc: add empty flag in rsrc_node io_uring/rsrc: merge nodes and io_rsrc_put io_uring/rsrc: infer node from ctx on io_queue_rsrc_removal io_uring/rsrc: remove unused io_rsrc_node::llist io_uring/rsrc: refactor io_queue_rsrc_removal io_uring/rsrc: simplify single file node switching io_uring/rsrc: clean up __io_sqe_buffers_update() io_uring/rsrc: inline switch_start fast path io_uring/rsrc: remove rsrc_data refs io_uring/rsrc: fix DEFER_TASKRUN rsrc quiesce io_uring/rsrc: use wq for quiescing io_uring/rsrc: refactor io_rsrc_ref_quiesce io_uring/rsrc: remove io_rsrc_node::done io_uring/rsrc: use nospec'ed indexes ... commit 0b656310bfc33c5e044df9cf6013df8280ec69cc Author: Donald Hunter Date: Mon Apr 24 09:03:05 2023 +0100 docs/admin-guide/mm/ksm.rst fix intraface -> interface typo Fix typo from 'intraface' to 'interface' in admin guide for KSM. Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20230424080305.2985-1-donald.hunter@gmail.com Signed-off-by: Jonathan Corbet commit 3ee23096add52c84aae23b8569a4d6fc8d47f2ac Author: Fabio Fantoni Date: Tue Apr 25 13:01:58 2023 +0200 doc:it_IT: fix some typos Fix of some typos spotted reading documentation in italian and latest changes for 6.4 Signed-off-by: Fabio Fantoni Reviewed-by: Federico Vaga Link: https://lore.kernel.org/r/20230425110158.9755-1-fantonifabio@tiscali.it Signed-off-by: Jonathan Corbet commit 5c7ecada25d2086aee607ff7deb69e77faa4aa92 Merge: fbfaf03ebac99 8375be2b64145 Author: Linus Torvalds Date: Wed Apr 26 09:42:10 2023 -0700 Merge tag 'f2fs-for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs update from Jaegeuk Kim: "In this round, we've mainly modified to support non-power-of-two zone size, which is not required for f2fs by design. In order to avoid arch dependency, we refactored the messy rb_entry structure shared across different extent_cache. In addition to the improvement, we've also fixed several subtle bugs and error cases. Enhancements: - support non-power-of-two zone size for zoned device - remove sharing the rb_entry structure in extent cache - refactor f2fs_gc to call checkpoint in urgent condition - support iopoll Bug fixes: - fix potential corruption when moving a directory - fix to avoid use-after-free for cached IPU bio - fix the folio private usage - avoid kernel warnings or panics in the cp_error case - fix to recover quota data correctly - fix some bugs in atomic operations - fix system crash due to lack of free space in LFS - fix null pointer panic in tracepoint in __replace_atomic_write_block - fix iostat lock protection - fix scheduling while atomic in decompression path - preserve direct write semantics when buffering is forced - fix to call f2fs_wait_on_page_writeback() in f2fs_write_raw_pages()" * tag 'f2fs-for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (52 commits) f2fs: remove unnessary comment in __may_age_extent_tree f2fs: allocate node blocks for atomic write block replacement f2fs: use cow inode data when updating atomic write f2fs: remove power-of-two limitation of zoned device f2fs: allocate trace path buffer from names_cache f2fs: add has_enough_free_secs() f2fs: relax sanity check if checkpoint is corrupted f2fs: refactor f2fs_gc to call checkpoint in urgent condition f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio f2fs: remove bulk remove_proc_entry() and unnecessary kobject_del() f2fs: support iopoll method f2fs: remove batched_trim_sections node description f2fs: fix to check return value of inc_valid_block_count() f2fs: fix to check return value of f2fs_do_truncate_blocks() f2fs: fix passing relative address when discard zones f2fs: fix potential corruption when moving a directory f2fs: add radix_tree_preload_end in error case f2fs: fix to recover quota data correctly f2fs: fix to check readonly condition correctly docs: f2fs: Correct instruction to disable checkpoint ... commit fbfaf03ebac999b4f44f36d851bd729c24c5a658 Merge: e0fcc9c68d114 7a40f1f18a88c Author: Linus Torvalds Date: Wed Apr 26 09:36:55 2023 -0700 Merge tag 'dlm-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: - Remove some unused features (related to lock timeouts) that have been previously scheduled for removal - Fix a bug where the pending callback flag would be incorrectly cleared, which could potentially result in missing a completion callback - Use an unbound workqueue for dlm socket handling so that socket operations can be processed with less delay - Fix possible lockspace join connection errors with large clusters (e.g. over 16 nodes) caused by a small socket backlog setting - Use atomic bit ops for internal flags to help avoid mistakes copying flag values from messages - Fix recently introduced bug where memory for lvb data could be unnecessarily allocated for a lock * tag 'dlm-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: fs: dlm: stop unnecessarily filling zero ms_extra bytes fs: dlm: switch lkb_sbflags to atomic ops fs: dlm: rsb hash table flag value to atomic ops fs: dlm: move internal flags to atomic ops fs: dlm: change dflags to use atomic bits fs: dlm: store lkb distributed flags into own value fs: dlm: remove DLM_IFL_LOCAL_MS flag fs: dlm: rename stub to local message flag fs: dlm: remove deprecated code parts DLM: increase socket backlog to avoid hangs with 16 nodes fs: dlm: add unbound flag to dlm_io workqueue fs: dlm: fix DLM_IFL_CB_PENDING gets overwritten commit e0fcc9c68d1147ca33159d57332b02ca8bac6ab9 Merge: 85d7ab2463822 644f6bf762fa9 Author: Linus Torvalds Date: Wed Apr 26 09:28:15 2023 -0700 Merge tag 'gfs2-v6.3-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Andreas Gruenbacher: - Fix revoke processing at unmount and on read-only remount - Refuse reading in inodes with an impossible indirect block height - Various minor cleanups * tag 'gfs2-v6.3-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: gfs2_ail_empty_gl no log flush on error gfs2: Issue message when revokes cannot be written gfs2: Perform second log flush in gfs2_make_fs_ro gfs2: return errors from gfs2_ail_empty_gl gfs2: Move variable assignment behind a null pointer check in inode_go_dump gfs2: Use gfs2_holder_initialized for jindex gfs2: Eliminate gfs2_trim_blocks gfs2: Fix inode height consistency check gfs2: Remove ghs[] from gfs2_unlink gfs2: Remove ghs[] from gfs2_link gfs2: Remove duplicate i_nlink check from gfs2_link() commit 85d7ab2463822a4ab096c0b7b59feec962552572 Merge: 94fc0792661a9 f372463124df5 Author: Linus Torvalds Date: Wed Apr 26 09:13:44 2023 -0700 Merge tag 'for-6.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "Mostly core changes and cleanups, some notable fixes and two performance improvements in directory logging. The IO path cleanups are removing or refactoring old code, scrub main loop has been completely rewritten also refactoring old code. There are some changes to non-btrfs code, mostly trivial, the cgroup punt bio logic is only moved from generic code. Performance improvements: - improve logging changes in a directory during one transaction, avoid iterating over items and reduce lock contention (fsync time 4x lower) - when logging directory entries during one transaction, reduce locking of subvolume trees by checking tree-log instead (improvement in throughput and latency for concurrent access to a subvolume) Notable fixes: - dev-replace: - properly honor read mode when requested to avoid reading from source device - target device won't be used for eventual read repair, this is unreliable for NODATASUM files - when there are unpaired (and unrepairable) metadata during replace, exit early with error and don't try to finish whole operation - scrub ioctl properly rejects unknown flags - fix global block reserve calculations - fix partial direct io write when there's a page fault in the middle, iomap will try to continue with partial request but the btrfs part did not match that, this can lead to zeros written instead of data Core changes: - io path: - continued cleanups and refactoring around bio handling - extent io submit path simplifications and cleanups - flush write path simplifications and cleanups - rework logic of passing sync mode of bio, with further cleanups - rewrite scrub code flow, restructure how the stripes are enumerated and verified in a more unified way - allow to set lower threshold for block group reclaim in debug mode to aid zoned mode testing - remove obsolete time-based delayed ref throttling logic when truncating items - DREW locks are not using percpu variables anymore - more warning fixes (-Wmaybe-uninitialized) - u64 division simplifications - error handling improvements Non-btrfs code changes: - push cgroup punt bio logic to btrfs code (there was no other user of that), the functionality can be now selected separately by BLK_CGROUP_PUNT_BIO - crc32c_impl removed after removing last uses in btrfs code - add btrfs_assertfail() to objtool table" * tag 'for-6.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (147 commits) btrfs: mark btrfs_assertfail() __noreturn btrfs: fix uninitialized variable warnings btrfs: use log root when iterating over index keys when logging directory btrfs: avoid iterating over all indexes when logging directory btrfs: dev-replace: error out if we have unrepaired metadata error during btrfs: remove pointless loop at btrfs_get_next_valid_item() btrfs: scrub: reject unsupported scrub flags btrfs: reinterpret async discard iops_limit=0 as no delay btrfs: set default discard iops_limit to 1000 btrfs: remove unused raid56 functions which were dedicated for scrub btrfs: scrub: remove scrub_bio structure btrfs: scrub: remove scrub_block and scrub_sector structures btrfs: scrub: remove the old scrub recheck code btrfs: scrub: remove the old writeback infrastructure btrfs: scrub: remove scrub_parity structure btrfs: scrub: use scrub_stripe to implement RAID56 P/Q scrub btrfs: scrub: switch scrub_simple_mirror() to scrub_stripe infrastructure btrfs: scrub: introduce helper to queue a stripe for scrub btrfs: scrub: introduce error reporting functionality for scrub_stripe btrfs: scrub: introduce a writeback helper for scrub_stripe ... commit 94fc0792661a96d64a4bb79cf10d0793ecadf76e Merge: 0cfcde1fafc23 36d532d713db5 Author: Linus Torvalds Date: Wed Apr 26 09:07:46 2023 -0700 Merge tag 'fs_for_v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull ext2, reiserfs, udf, and quota updates from Jan Kara: "A couple of small fixes and cleanups for ext2, udf, reiserfs, and quota. The biggest change is making CONFIG_PRINT_QUOTA_WARNING depend on BROKEN with an outlook for removing it completely in an year or so" * tag 'fs_for_v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: mark PRINT_QUOTA_WARNING as BROKEN quota: update Kconfig comment reiserfs: remove unused iter variable quota: Use register_sysctl_init() for registering fs_dqstats_table reiserfs: remove unused sched_count variable ext2: remove redundant assignment to pointer end quota: make dquot_set_dqinfo return errors from ->write_info quota: fixup *_write_file_info() to return proper error code quota: simplify two-level sysctl registration for fs_dqstats_table udf: use wrapper i_blocksize() in udf_discard_prealloc() udf: Use folios in udf_adinicb_writepage() ext2: Check block size validity during mount ext2: Correct maximum ext2 filesystem block size commit 45dd403da851124412d32e3193c21de4a51d29da Author: Ard Biesheuvel Date: Tue Apr 18 15:49:49 2023 +0200 efi/zboot: arm64: Inject kernel code size symbol into the zboot payload The EFI zboot code is not built as part of the kernel proper, like the ordinary EFI stub, but still needs access to symbols that are defined only internally in the kernel, and are left unexposed deliberately to avoid creating ABI inadvertently that we're stuck with later. So capture the kernel code size of the kernel image, and inject it as an ELF symbol into the object that contains the compressed payload, where it will be accessible to zboot code that needs it. Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland commit b09313dd2e726fe5e1fa574cd73f5e326c6030a4 Author: Andrew Jones Date: Wed Apr 26 16:13:33 2023 +0200 RISC-V: hwprobe: Explicity check for -1 in vdso init id_bitsmash is unsigned. We need to explicitly check for -1, rather than use > 0. Fixes: aa5af0aa90ba ("RISC-V: Add hwprobe vDSO function and data") Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20230426141333.10063-3-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 08dc107594681040587c23a097cfa678e51f5af2 Author: Andrew Jones Date: Wed Apr 26 16:13:32 2023 +0200 RISC-V: hwprobe: There can only be one first Only capture the first cpu_id in order for the comparison below to be of any use. Fixes: ea3de9ce8aa2 ("RISC-V: Add a syscall for HW probing") Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20230426141333.10063-2-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 0cfcde1fafc23068f57afa50faa3e69487b7cd30 Merge: c3558a6b2a75d 519fe1bae7e20 Author: Linus Torvalds Date: Wed Apr 26 08:57:41 2023 -0700 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "There are a number of major cleanups in ext4 this cycle: - The data=journal writepath has been significantly cleaned up and simplified, and reduces a large number of data=journal special cases by Jan Kara. - Ojaswin Muhoo has replaced linked list used to track extents that have been used for inode preallocation with a red-black tree in the multi-block allocator. This improves performance for workloads which do a large number of random allocating writes. - Thanks to Kemeng Shi for a lot of cleanup and bug fixes in the multi-block allocator. - Matthew wilcox has converted the code paths for reading and writing ext4 pages to use folios. - Jason Yan has continued to factor out ext4_fill_super() into smaller functions for improve ease of maintenance and comprehension. - Josh Triplett has created an uapi header for ext4 userspace API's" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (105 commits) ext4: Add a uapi header for ext4 userspace APIs ext4: remove useless conditional branch code ext4: remove unneeded check of nr_to_submit ext4: move dax and encrypt checking into ext4_check_feature_compatibility() ext4: factor out ext4_block_group_meta_init() ext4: move s_reserved_gdt_blocks and addressable checking into ext4_check_geometry() ext4: rename two functions with 'check' ext4: factor out ext4_flex_groups_free() ext4: use ext4_group_desc_free() in ext4_put_super() to save some duplicated code ext4: factor out ext4_percpu_param_init() and ext4_percpu_param_destroy() ext4: factor out ext4_hash_info_init() Revert "ext4: Fix warnings when freezing filesystem with journaled data" ext4: Update comment in mpage_prepare_extent_to_map() ext4: Simplify handling of journalled data in ext4_bmap() ext4: Drop special handling of journalled data from ext4_quota_on() ext4: Drop special handling of journalled data from ext4_evict_inode() ext4: Fix special handling of journalled data from extent zeroing ext4: Drop special handling of journalled data from extent shifting operations ext4: Drop special handling of journalled data from ext4_sync_file() ext4: Commit transaction before writing back pages in data=journal mode ... commit c3558a6b2a75d9adacf15dd7fae79dbfffa7ebe4 Merge: dbe0e78d0e3a8 04839139213cf Author: Linus Torvalds Date: Wed Apr 26 08:51:51 2023 -0700 Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux Pull fsverity updates from Eric Biggers: "Several cleanups and fixes for fs/verity/, including a couple minor fixes to the changes in 6.3 that added support for Merkle tree block sizes less than the page size" * tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux: fsverity: reject FS_IOC_ENABLE_VERITY on mode 3 fds fsverity: explicitly check for buffer overflow in build_merkle_tree() fsverity: use WARN_ON_ONCE instead of WARN_ON fs-verity: simplify sysctls with register_sysctl() fs/buffer.c: use b_folio for fsverity work commit dbe0e78d0e3a83dd924ea01bebf6c45313c81607 Merge: 733f7e9c18c5e 83e57e47906ce Author: Linus Torvalds Date: Wed Apr 26 08:37:51 2023 -0700 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux Pull fscrypt updates from Eric Biggers: "A few cleanups for fs/crypto/, and another patch to prepare for the upcoming CephFS encryption support" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux: fscrypt: optimize fscrypt_initialize() fscrypt: use WARN_ON_ONCE instead of WARN_ON fscrypt: new helper function - fscrypt_prepare_lookup_partial() fs/buffer.c: use b_folio for fscrypt work commit 733f7e9c18c5e377025c1bfdce6bc9a7d55649be Merge: 98f99e67a1dc4 482c84e906e53 Author: Linus Torvalds Date: Wed Apr 26 08:32:52 2023 -0700 Merge tag 'v6.4-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Total usage stats now include all that returned errors (instead of just some) - Remove maximum hash statesize limit - Add cloning support for hmac and unkeyed hashes - Demote BUG_ON in crypto_unregister_alg to a WARN_ON Algorithms: - Use RIP-relative addressing on x86 to prepare for PIE build - Add accelerated AES/GCM stitched implementation on powerpc P10 - Add some test vectors for cmac(camellia) - Remove failure case where jent is unavailable outside of FIPS mode in drbg - Add permanent and intermittent health error checks in jitter RNG Drivers: - Add support for 402xx devices in qat - Add support for HiSTB TRNG - Fix hash concurrency issues in stm32 - Add OP-TEE firmware support in caam" * tag 'v6.4-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (139 commits) i2c: designware: Add doorbell support for Mendocino i2c: designware: Use PCI PSP driver for communication powerpc: Move Power10 feature PPC_MODULE_FEATURE_P10 crypto: p10-aes-gcm - Remove POWER10_CPU dependency crypto: testmgr - Add some test vectors for cmac(camellia) crypto: cryptd - Add support for cloning hashes crypto: cryptd - Convert hash to use modern init_tfm/exit_tfm crypto: hmac - Add support for cloning crypto: hash - Add crypto_clone_ahash/shash crypto: api - Add crypto_clone_tfm crypto: api - Add crypto_tfm_get crypto: x86/sha - Use local .L symbols for code crypto: x86/crc32 - Use local .L symbols for code crypto: x86/aesni - Use local .L symbols for code crypto: x86/sha256 - Use RIP-relative addressing crypto: x86/ghash - Use RIP-relative addressing crypto: x86/des3 - Use RIP-relative addressing crypto: x86/crc32c - Use RIP-relative addressing crypto: x86/cast6 - Use RIP-relative addressing crypto: x86/cast5 - Use RIP-relative addressing ... commit 98f99e67a1dc456e9a542584819b2aa265ffc737 Merge: 0cfd8703e7da6 00168b415a60c Author: Linus Torvalds Date: Wed Apr 26 08:25:57 2023 -0700 Merge tag 'flex-array-transformations-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull flexible-array updates from Gustavo Silva: "Transform more zero-length and one-element arrays into C99 flexible-array members" * tag 'flex-array-transformations-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: uapi: net: ipv6: Replace fake flex-array with flex-array member drm/vmwgfx: Replace one-element array with flexible-array member ASoC: uapi: Replace zero-length arrays with __DECLARE_FLEX_ARRAY() helper commit 26e7aacb83dfd04330673c5c9ac336560da52bb3 Author: Alexandre Ghiti Date: Mon Apr 24 11:23:13 2023 +0200 riscv: Allow to downgrade paging mode from the command line Add 2 early command line parameters that allow to downgrade satp mode (using the same naming as x86): - "no5lvl": use a 4-level page table (down from sv57 to sv48) - "no4lvl": use a 3-level page table (down from sv57/sv48 to sv39) Note that going through the device tree to get the kernel command line works with ACPI too since the efi stub creates a device tree anyway with the command line. In KASAN kernels, we can't use the libfdt that early in the boot process since we are not ready to execute instrumented functions. So instead of using the "generic" libfdt, we compile our own versions of those functions that are not instrumented and that are prefixed so that they do not conflict with the generic ones. We also need the non-instrumented versions of the string functions and the prefixed versions of memcpy/memmove. This is largely inspired by commit aacd149b6238 ("arm64: head: avoid relocating the kernel twice for KASLR") from which I removed compilation flags that were not relevant to RISC-V at the moment (LTO, SCS). Also note that we have to link with -z norelro to avoid ld.lld to throw a warning with the new .got sections, like in commit 311bea3cb9ee ("arm64: link with -z norelro for LLD or aarch64-elf"). Signed-off-by: Alexandre Ghiti Tested-by: Björn Töpel Reviewed-by: Björn Töpel Link: https://lore.kernel.org/r/20230424092313.178699-2-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit d4dda690b44a5e36b4bf108c48177cef40c80d24 Author: Conor Dooley Date: Mon Apr 24 18:05:43 2023 +0100 dt-bindings: riscv: add sv57 mmu-type Dumping the dtb from new versions of QEMU warns that sv57 is an undocumented mmu-type. The kernel has supported sv57 for about a year, so bring it into the fold. Signed-off-by: Conor Dooley Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230424-rival-habitual-478567c516f0@spud Signed-off-by: Palmer Dabbelt commit 9e9ff39243ea8795a4833708613f884b39dc91f9 Author: Nishanth Menon Date: Mon Apr 17 20:00:19 2023 -0500 dt-bindings: mfd: ti,j721e-system-controller: Add SoC chip ID The system-controller node also contains the chip-id node that is used to identify the SoC specific properties. Add a pattern property to match to the same, and add to the example. Signed-off-by: Nishanth Menon Acked-by: Krzysztof Kozlowski Reviewed-by: Roger Quadros Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230418010019.1222431-1-nm@ti.com commit 3808b8424b476ceb8ac7610ff3bb377ad1893847 Author: Andreas Kemnade Date: Wed Apr 19 13:18:06 2023 +0200 leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driver The device provides 6 channels which can be individually turned off and on but groups of two channels share a common brightness register. Limitation: The GPIO to enable the device is not used yet. Signed-off-by: Andreas Kemnade Reviewed-by: Matti Vaittinen Acked-by: Pavel Machek Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230419111806.1100437-3-andreas@kemnade.info commit 9f0184ac1dcb48efe724ec6482f88d85579b52df Author: Krzysztof Kozlowski Date: Sun Apr 16 14:32:03 2023 +0200 dt-bindings: mfd: qcom,spmi-pmic: Document flash LED controller The Qualcomm SPMI PMIC come also with a LED controller for flash LEDs, already used in DTS: sm8250-hdk.dtb: pmic@5: 'led-controller@d300' does not match any of the regexes: ... From schema: Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230416123203.299740-1-krzysztof.kozlowski@linaro.org commit 34480c6e1746138880778af9b86e86a95e0264fb Author: Shengyu Qu Date: Fri Apr 21 23:08:14 2023 +0800 dt-bindings: mfd: x-powers,axp152: Document the AXP15060 variant The X-Powers AXP15060 is a PMIC seen on Starfive Visionfive 2 board. Add relative compatible item and CPUSLDO support and disables DC-DC frequency setting for it. Signed-off-by: Shengyu Qu Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/TY3P286MB261177CF7AA2959BD9517DA998609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM commit e0f8ad2a705367518b5c56bf9d6da89681467c02 Author: Shengyu Qu Date: Fri Apr 21 23:08:15 2023 +0800 mfd: axp20x: Add support for AXP15060 PMIC The AXP15060 is a PMIC chip produced by X-Powers, and could be connected via an I2C bus. Describe the regmap and the MFD bits, along with the registers exposed via I2C. Eventually advertise the device using a new compatible string and add support for power off the system. The driver would disable PEK function if IRQ is not configured in device tree, since some boards (For example, Starfive Visionfive 2) didn't connect IRQ line of PMIC to SOC. GPIO function isn't enabled in this commit, since its configuration operation is different from any existing AXP PMICs and needs logic modification on existing driver. GPIO support might come in later patches. Signed-off-by: Shengyu Qu Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/TY3P286MB261162D57695AC8164ED50E298609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM commit c91b4a07655d5ba67962a08dfac8bd7f45ad049c Author: Stafford Horne Date: Fri Apr 14 08:31:08 2023 +0100 openrisc: Add floating point regset Define REGSET_FPU to allow reading and writing the FPCSR fpu state register. This will be used primarily by debuggers like GDB. Signed-off-by: Stafford Horne commit 27267655c5313ba0f5a3caa9ad35d887d9a12574 Author: Stafford Horne Date: Fri Apr 14 08:27:51 2023 +0100 openrisc: Support floating point user api Add support for handling floating point exceptions and forwarding the SIGFPE signal to processes. Also, add fpu state to sigcontext. Signed-off-by: Stafford Horne commit 63d7f9f11e5e81de2ce8f1c7a8aaed5b0288eddf Author: Stafford Horne Date: Fri Apr 14 08:25:58 2023 +0100 openrisc: Support storing and restoring fpu state OpenRISC floating point state is not so expensive to save as OpenRISC uses general purpose registers for floating point instructions. We need to save only the floating point status and control register, FPCSR. Add support to maintain the FPCSR unconditionally upon exceptions and switches. On machines that do not support FPU this will always just store 0x0 and restore is a no-op. On FPU systems this adds an additional special purpose register read/write and read/write to memory (already cached). Signed-off-by: Stafford Horne commit 812489ac4dd91144a74ce65ecf232252a2e406fb Author: Stafford Horne Date: Sat Feb 11 19:14:06 2023 +0900 openrisc: Properly store r31 to pt_regs on unhandled exceptions In commit 91993c8c2ed5 ("openrisc: use shadow registers to save regs on exception") the unhandled exception path was changed to do an early store of r30 instead of r31. The entry code was not updated and r31 is not getting stored to pt_regs. This patch updates the entry handler to store r31 instead of r30. We also remove some misleading commented out store r30 and r31 instructrions. I noticed this while working on adding floating point exception handling, This issue probably would never impact anything since we kill the process or Oops right away on unhandled exceptions. Fixes: 91993c8c2ed5 ("openrisc: use shadow registers to save regs on exception") Signed-off-by: Stafford Horne commit adace4408252cc1c9913958d71e81a688af90a30 Author: Ken Lin Date: Wed Apr 26 03:22:57 2023 +0000 tracing: Add missing spaces in trace_print_hex_seq() If the buffer length is larger than 16 and concatenate is set to false, there would be missing spaces every 16 bytes. Example: Before: c5 11 10 50 05 4d 31 40 00 40 00 40 00 4d 31 4000 40 00 After: c5 11 10 50 05 4d 31 40 00 40 00 40 00 4d 31 40 00 40 00 Link: https://lore.kernel.org/linux-trace-kernel/20230426032257.3157247-1-lyenting@google.com Signed-off-by: Ken Lin Signed-off-by: Steven Rostedt (Google) commit 7c339fb4d8577792378136c15fde773cfb863cb8 Author: Tze-nan Wu Date: Wed Apr 26 14:20:23 2023 +0800 ring-buffer: Ensure proper resetting of atomic variables in ring_buffer_reset_online_cpus In ring_buffer_reset_online_cpus, the buffer_size_kb write operation may permanently fail if the cpu_online_mask changes between two for_each_online_buffer_cpu loops. The number of increases and decreases on both cpu_buffer->resize_disabled and cpu_buffer->record_disabled may be inconsistent, causing some CPUs to have non-zero values for these atomic variables after the function returns. This issue can be reproduced by "echo 0 > trace" while hotplugging cpu. After reproducing success, we can find out buffer_size_kb will not be functional anymore. To prevent leaving 'resize_disabled' and 'record_disabled' non-zero after ring_buffer_reset_online_cpus returns, we ensure that each atomic variable has been set up before atomic_sub() to it. Link: https://lore.kernel.org/linux-trace-kernel/20230426062027.17451-1-Tze-nan.Wu@mediatek.com Cc: stable@vger.kernel.org Cc: Cc: npiggin@gmail.com Fixes: b23d7a5f4a07 ("ring-buffer: speed up buffer resets by avoiding synchronize_rcu for each CPU") Reviewed-by: Cheng-Jui Wang Signed-off-by: Tze-nan Wu Signed-off-by: Steven Rostedt (Google) commit 647a2a6428f2cd01e53079ac16e17fdeff229e68 Author: Chuck Lever Date: Fri Apr 14 20:18:02 2023 -0400 SUNRPC: Convert svc_xprt_release() to the release_pages() API Instead of invoking put_page() one-at-a-time, pass the "response" portion of rq_pages directly to release_pages() to reduce the number of times each nfsd thread invokes a page allocator API. Since svc_xprt_release() is not invoked while a client is waiting for an RPC Reply, this is not expected to directly impact mean request latencies on a lightly or moderately loaded server. However as workload intensity increases, I expect somewhat better scalability: the same number of server threads should be able to handle more work. Reviewed-by: Calum Mackay Signed-off-by: Chuck Lever commit b20cb39def085723868972182fb58fa906839a4f Author: Chuck Lever Date: Fri Apr 14 20:17:56 2023 -0400 SUNRPC: Relocate svc_free_res_pages() Clean-up: There doesn't seem to be a reason why this function is stuck in a header. One thing it prevents is the convenient addition of tracing. Moving it to a source file also makes the rq_respages clean-up logic easier to find. Reviewed-by: Calum Mackay Signed-off-by: Chuck Lever commit 92e4a6733f922f0fef1d0995f7b2d0eaff86c7ea Author: Jeff Layton Date: Fri Apr 14 17:31:44 2023 -0400 nfsd: simplify the delayed disposal list code When queueing a dispose list to the appropriate "freeme" lists, it pointlessly queues the objects one at a time to an intermediate list. Remove a few helpers and just open code a list_move to make it more clear and efficient. Better document the resulting functions with kerneldoc comments. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 55fcc7d9159de886296626e47db2c81f8578c7e1 Author: Chuck Lever Date: Mon Apr 3 13:53:07 2023 -0400 SUNRPC: Ignore return value of ->xpo_sendto Clean up: All callers of svc_process() ignore its return value, so svc_process() can safely be converted to return void. Ditto for svc_send(). The return value of ->xpo_sendto() is now used only as part of a trace event. Signed-off-by: Chuck Lever commit ae0d77708aae219a9264a74188d5c1b1a5754da6 Author: Chuck Lever Date: Tue Mar 7 09:14:46 2023 -0500 SUNRPC: Ensure server-side sockets have a sock->file The TLS handshake upcall mechanism requires a non-NULL sock->file on the socket it hands to user space. svc_sock_free() already releases sock->file properly if one exists. Signed-off-by: Chuck Lever commit 0f5162480bd25bd97b91c9153db7afbd89698804 Author: Chuck Lever Date: Fri Mar 17 17:09:20 2023 -0400 NFSD: Watch for rq_pages bounds checking errors in nfsd_splice_actor() There have been several bugs over the years where the NFSD splice actor has attempted to write outside the rq_pages array. This is a "should never happen" condition, but if for some reason the pipe splice actor should attempt to walk past the end of rq_pages, it needs to terminate the READ operation to prevent corruption of the pointer addresses in the fields just beyond the array. A server crash is thus prevented. Since the code is not behaving, the READ operation returns -EIO to the client. None of the READ payload data can be trusted if the splice actor isn't operating as expected. Suggested-by: Jeff Layton Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton commit 376bcd9b37632cf191711a68aa25ab42f0048c2e Author: Luis Chamberlain Date: Sat Mar 11 15:39:40 2023 -0800 sunrpc: simplify two-level sysctl registration for svcrdma_parm_table There is no need to declare two tables to just create directories, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit cf64b9bce95095b80f4589e4f54572cc5d8c1538 Author: NeilBrown Date: Wed Mar 8 17:51:00 2023 +1100 SUNRPC: return proper error from get_expiry() The get_expiry() function currently returns a timestamp, and uses the special return value of 0 to indicate an error. Unfortunately this causes a problem when 0 is the correct return value. On a system with no RTC it is possible that the boot time will be seen to be "3". When exportfs probes to see if a particular filesystem supports NFS export it tries to cache information with an expiry time of "3". The intention is for this to be "long in the past". Even with no RTC it will not be far in the future (at most a second or two) so this is harmless. But if the boot time happens to have been calculated to be "3", then get_expiry will fail incorrectly as it converts the number to "seconds since bootime" - 0. To avoid this problem we change get_expiry() to report the error quite separately from the expiry time. The error is now the return value. The expiry time is reported through a by-reference parameter. Reported-by: Jerry Zhang Tested-by: Jerry Zhang Signed-off-by: NeilBrown Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 2f90e18ffec47c265c14e313047189b79784bc0e Author: Jeff Layton Date: Fri Mar 3 07:16:03 2023 -0500 lockd: add some client-side tracepoints Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit e59fb6749ed833deee5b3cfd7e89925296d41f49 Author: Jeff Layton Date: Fri Mar 3 07:16:02 2023 -0500 nfs: move nfs_fhandle_hash to common include file lockd needs to be able to hash filehandles for tracepoints. Move the nfs_fhandle_hash() helper to a common nfs include file. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 244cc19196d2f6691d34e8cd9bc34a55e4f778e5 Author: Jeff Layton Date: Fri Mar 3 07:16:01 2023 -0500 lockd: server should unlock lock if client rejects the grant Currently lockd just dequeues the block and ignores it if the client sends a GRANT_RES with a status of nlm_lck_denied. That status is an indicator that the client has rejected the lock, so the right thing to do is to unlock the lock we were trying to grant. Reported-by: Yongcheng Yang Link: https://bugzilla.redhat.com/show_bug.cgi?id=2063818 Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 2005f5b9c35bd736c81e9f24f5c5051967c022ee Author: Jeff Layton Date: Fri Mar 3 07:16:00 2023 -0500 lockd: fix races in client GRANTED_MSG wait logic After the wait for a grant is done (for whatever reason), nlmclnt_block updates the status of the nlm_rqst with the status of the block. At the point it does this, however, the block is still queued its status could change at any time. This is particularly a problem when the waiting task is signaled during the wait. We can end up giving up on the lock just before the GRANTED_MSG callback comes in, and accept it even though the lock request gets back an error, leaving a dangling lock on the server. Since the nlm_wait never lives beyond the end of nlmclnt_lock, put it on the stack and add functions to allow us to enqueue and dequeue the block. Enqueue it just before the lock/wait loop, and dequeue it just after we exit the loop instead of waiting until the end of the function. Also, scrape the status at the time that we dequeue it to ensure that it's final. Reported-by: Yongcheng Yang Link: https://bugzilla.redhat.com/show_bug.cgi?id=2063818 Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit f0aa4852e63f9c1cfd4322c770e69d7e6817e906 Author: Jeff Layton Date: Fri Mar 3 07:15:59 2023 -0500 lockd: move struct nlm_wait to lockd.h The next patch needs struct nlm_wait in fs/lockd/clntproc.c, so move the definition to a shared header file. As an added clean-up, drop the unused b_reclaim field. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit c88c680c6de5077292667fae4a147fd5a6523479 Author: Jeff Layton Date: Fri Mar 3 07:15:58 2023 -0500 lockd: remove 2 unused helper functions Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit bfca7a6f0c75f5d97f5efc2c80cca55bdbf5f79a Author: Jeff Layton Date: Fri Mar 3 07:15:57 2023 -0500 lockd: purge resources held on behalf of nlm clients when shutting down It's easily possible for the server to have an outstanding lock when we go to shut down. When that happens, we often get a warning like this in the kernel log: lockd: couldn't shutdown host module for net f0000000! This is because the shutdown procedures skip removing any hosts that still have outstanding resources (locks). Eventually, things seem to get cleaned up anyway, but the log message is unsettling, and server shutdown doesn't seem to be working the way it was intended. Ensure that we tear down any resources held on behalf of a client when tearing one down for server shutdown. Reported-by: Yongcheng Yang Link: https://bugzilla.redhat.com/show_bug.cgi?id=2063818 Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit c4c649ab413ba6a785b25f0edbb12f617c87db2a Author: Chuck Lever Date: Thu Nov 24 15:09:04 2022 -0500 NFSD: Convert filecache to rhltable While we were converting the nfs4_file hashtable to use the kernel's resizable hashtable data structure, Neil Brown observed that the list variant (rhltable) would be better for managing nfsd_file items as well. The nfsd_file hash table will contain multiple entries for the same inode -- these should be kept together on a list. And, it could be possible for exotic or malicious client behavior to cause the hash table to resize itself on every insertion. A nice simplification is that rhltable_lookup() can return a list that contains only nfsd_file items that match a given inode, which enables us to eliminate specialized hash table helper functions and use the default functions provided by the rhashtable implementation). Since we are now storing nfsd_file items for the same inode on a single list, that effectively reduces the number of hash entries that have to be tracked in the hash table. The mininum bucket count is therefore lowered. Light testing with fstests generic/531 show no regressions. Suggested-by: Neil Brown Signed-off-by: Chuck Lever commit dcb779fcd4ed5984ad15991d574943d12a8693d1 Author: Jeff Layton Date: Wed Feb 15 06:53:54 2023 -0500 nfsd: allow reaping files still under writeback On most filesystems, there is no reason to delay reaping an nfsd_file just because its underlying inode is still under writeback. nfsd just relies on client activity or the local flusher threads to do writeback. The main exception is NFS, which flushes all of its dirty data on last close. Add a new EXPORT_OP_FLUSH_ON_CLOSE flag to allow filesystems to signal that they do this, and only skip closing files under writeback on such filesystems. Also, remove a redundant NULL file pointer check in nfsd_file_check_writeback, and clean up nfs's export op flag definitions. Signed-off-by: Jeff Layton Acked-by: Anna Schumaker Signed-off-by: Chuck Lever commit 972cc0e0924598cb293b919d39c848dc038b2c28 Author: Jeff Layton Date: Thu Jan 26 12:21:16 2023 -0500 nfsd: update comment over __nfsd_file_cache_purge Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit b2ff1bd71db2a1b193a6dde0845adcd69cbcf75e Author: Jeff Layton Date: Wed Jan 18 12:31:37 2023 -0500 nfsd: don't take/put an extra reference when putting a file The last thing that filp_close does is an fput, so don't bother taking and putting the extra reference. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit b680cb9b737331aad271feebbedafb865504e234 Author: Jeff Layton Date: Thu Jan 5 07:15:12 2023 -0500 nfsd: add some comments to nfsd_file_do_acquire David Howells mentioned that he found this bit of code confusing, so sprinkle in some comments to clarify. Reported-by: David Howells Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit c6593366c0bf222be9c7561354dfb921c611745e Author: Jeff Layton Date: Thu Jan 5 07:15:11 2023 -0500 nfsd: don't kill nfsd_files because of lease break error An error from break_lease is non-fatal, so we needn't destroy the nfsd_file in that case. Just put the reference like we normally would and return the error. Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit d69b8dbfd0866abc5ec84652cc1c10fc3d4d91ef Author: Jeff Layton Date: Fri Jan 6 10:39:01 2023 -0500 nfsd: simplify test_bit return in NFSD_FILE_KEY_FULL comparator test_bit returns bool, so we can just compare the result of that to the key->gc value without the "!!". Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 6c31e4c98853a4ba47355ea151b36a77c42b7734 Author: Jeff Layton Date: Fri Jan 6 10:39:00 2023 -0500 nfsd: NFSD_FILE_KEY_INODE only needs to find GC'ed entries Since v4 files are expected to be long-lived, there's little value in closing them out of the cache when there is conflicting access. Change the comparator to also match the gc value in the key. Change both of the current users of that key to set the gc value in the key to "true". Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit b8bea9f6cdd7236c7c2238d022145e9b2f8aac22 Author: Jeff Layton Date: Thu Jan 5 07:15:09 2023 -0500 nfsd: don't open-code clear_and_wake_up_bit Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 9892bd72efdc9daa7c07ca9f427ac7e5928c7704 Author: Masahiro Yamada Date: Tue Apr 25 20:08:59 2023 +0900 kbuild: deb-pkg: specify targets in debian/rules as .PHONY If a file with the same name exists, the target is not run. For example, the following command fails. $ make O=build-arch bindeb-pkg [ snip ] sed: can't read modules.order: No such file or directory make[6]: *** [../Makefile:1577: __modinst_pre] Error 2 make[5]: *** [../scripts/Makefile.package:150: intdeb-pkg] Error 2 make[4]: *** [../Makefile:1657: intdeb-pkg] Error 2 make[3]: *** [debian/rules:14: binary-arch] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 make[2]: *** [../scripts/Makefile.package:139: bindeb-pkg] Error 2 Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit dbb5f7c3fae38de3e69d48b984e6f539993a02d3 Author: Randy Dunlap Date: Thu Apr 13 13:38:57 2023 -0700 sparc: unify sparc32/sparc64 archhelp Currently, entering $ make ARCH=sparc32 help prints the archhelp text for sparc64. ["sparc32" is documented (Documentation/kbuild/kbuild.rst) to be a recognized alias for 32-bit sparc.] Instead of handling ARCH=sparc or ARCH=sparc32 or ARCH=sparc64, just unify all SPARC archhelp text in one place. Fixes: 5e53879008b9 ("sparc,sparc64: unify Makefile") Signed-off-by: Randy Dunlap Suggested-by: Masahiro Yamada Signed-off-by: Masahiro Yamada commit c51e431052e2eacfb23fbf6b39bc6c8770d9827a Author: jasontao Date: Wed Apr 26 09:30:59 2023 +0800 ALSA: hda: Glenfly: add HD Audio PCI IDs and HDMI Codec Vendor IDs. Add a set of HD Audio PCI IDS, and the HDMI codec vendor IDs for Glenfly Gpus. - In default_bdl_pos_adj, set bdl to 128 as Glenfly Gpus have hardware limitation, need to increase hdac interrupt interval. - In azx_first_init, enable polling mode for Glenfly Gpu. When the codec complete the command, it sends interrupt and writes response entries to memory, howerver, the write requests sometimes are not actually synchronized to memory when driver handle hdac interrupt on Glenfly Gpus. If the RIRB status is not updated in the interrupt handler, azx_rirb_get_response keeps trying to recevie a response from rirb until 1s timeout. Enabling polling mode for Glenfly Gpu can fix the issue. - In patch_gf_hdmi, set Glenlfy Gpu Codec's no_sticky_stream as it need driver to do actual clean-ups for the linked codec when switch from one codec to another. Signed-off-by: jasontao Signed-off-by: Reaper Li Link: https://lore.kernel.org/r/20230426013059.4329-1-reaperlioc@glenfly.com Signed-off-by: Takashi Iwai commit a33c6a22f6d616caab6f5a5bfaa7ee01ea567d82 Author: Martin Botka Date: Sat Apr 1 01:18:48 2023 +0100 dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant The X-Powers AXP313a is a PMIC used on some devices with the Allwinner H616 or H313 SoC. According to the datasheet, the DC/DC converter PWM frequency is fixed (to 3 MHz), so disallow the property that lets us set this frequency for the other PMICs. Signed-off-by: Martin Botka Signed-off-by: Andre Przywara Reviewed-by: Krzysztof Kozlowski Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230401001850.4988-2-andre.przywara@arm.com (cherry picked from commit 2a9e8a1a7c4caadf690e5a77fe4162c5edab4a9c) Signed-off-by: Lee Jones commit 1e28dfdf40d7293882ba7eb70a3bc0e9ab625377 Author: Dan Carpenter Date: Thu Apr 20 18:02:11 2023 +0300 counter: rz-mtu3-cnt: Unlock on error in rz_mtu3_count_ceiling_write() These error paths need to call mutex_unlock(&priv->lock) before returning. The lock is taken in rz_mtu3_lock_if_counter_is_valid(). Fixes: 25d21447d896 ("counter: Add Renesas RZ/G2L MTU3a counter driver") Signed-off-by: Dan Carpenter Acked-by: William Breathitt Gray Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/7b535d6b-6031-493a-84f6-82842089e637@kili.mountain commit 1706636eafcab76e08784f66f80f00d9aa59bed1 Author: Benjamin Bara Date: Wed Apr 5 19:14:36 2023 +0200 dt-bindings: mfd: dlg,da9063: Document voltage monitoring Document that the da9063 only provides under- *and* over-voltage monitoring in one, and therefore requires both to be configured with the same severity and value. Add an example for clarification. Signed-off-by: Benjamin Bara Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230403-da9063-disable-unused-v3-3-cc4dc698864c@skidata.com commit 378b0e9f247450c9c4e49f02d9d79799a0c7c349 Author: Patrick Delaunay Date: Mon Apr 17 18:14:06 2023 +0200 dt-bindings: mfd: stm32: Remove unnecessary blank lines Remove double blank line. Signed-off-by: Patrick Delaunay Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230417181342.v2.1.I483a676579cc7e3ac07e1db649091553743fecc8@changeid commit b24e335b7d73b5d65d09144319c62aa967b6abc8 Author: Marijn Suijten Date: Mon Apr 10 22:29:16 2023 +0200 dt-bindings: mfd: qcom,spmi-pmic: Use generic ADC node name in examples Update the examples to reflect a future requirement for the generic `channel` node name on ADC channel nodes, while conveying the board name of the channel in a label instead. Signed-off-by: Marijn Suijten Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230410202917.247666-5-marijn.suijten@somainline.org commit dbc5e57200e9ed14f08c5493c8633200cf07d700 Author: Jacky Huang Date: Tue Mar 28 02:19:05 2023 +0000 dt-bindings: mfd: syscon: Add nuvoton,ma35d1-sys compatible Add Nuvoton ma35d1 system registers compatible. Signed-off-by: Jacky Huang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230328021912.177301-6-ychuang570808@gmail.com commit 5dee9439cc2d60ff35cad04b618ee53f48a7cfc2 Author: Biju Das Date: Thu Mar 30 12:16:31 2023 +0100 MAINTAINERS: Add entries for Renesas RZ/G2L MTU3a counter driver Add the MAINTAINERS entries for the Renesas RZ/G2L MTU3a counter driver. Signed-off-by: Biju Das Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230330111632.169434-6-biju.das.jz@bp.renesas.com commit 0be8907359df4c62319f5cb2c6981ff0d9ebf35a Author: Biju Das Date: Thu Mar 30 12:16:30 2023 +0100 counter: Add Renesas RZ/G2L MTU3a counter driver Add RZ/G2L MTU3a counter driver. This IP supports the following phase counting modes on MTU1 and MTU2 channels 1) 16-bit phase counting modes on MTU1 and MTU2 channels. 2) 32-bit phase counting mode by cascading MTU1 and MTU2 channels. This patch adds 3 counter value channels. count0: 16-bit phase counter value channel on MTU1 count1: 16-bit phase counter value channel on MTU2 count2: 32-bit phase counter value channel by cascading MTU1 and MTU2 channels. The external input phase clock pin for the counter value channels are as follows: count0: "MTCLKA-MTCLKB" count1: "MTCLKA-MTCLKB" or "MTCLKC-MTCLKD" count2: "MTCLKA-MTCLKB" or "MTCLKC-MTCLKD" Use the sysfs variable "external_input_phase_clock_select" to select the external input phase clock pin and "cascade_counts_enable" to enable/ disable cascading of channels. Signed-off-by: Biju Das Reviewed-by: William Breathitt Gray Acked-by: William Breathitt Gray Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230330111632.169434-5-biju.das.jz@bp.renesas.com commit 7bb985ac03c4a91d185c006f68c4fadfb71e1cca Author: Biju Das Date: Thu Mar 30 12:16:29 2023 +0100 Documentation: ABI: sysfs-bus-counter: add cascade_counts_enable and external_input_phase_clock_select This commit adds cascade_counts_enable and external_input_phase_ clock_select items to counter ABI file. (e.g. for Renesas MTU3 hardware used for phase counting). Signed-off-by: Biju Das Reviewed-by: William Breathitt Gray Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230330111632.169434-4-biju.das.jz@bp.renesas.com commit 654c293e1687b31819f9bf1ac71b5a85a8053210 Author: Biju Das Date: Thu Mar 30 12:16:28 2023 +0100 mfd: Add Renesas RZ/G2L MTU3a core driver The RZ/G2L multi-function timer pulse unit 3 (MTU3a) is embedded in the Renesas RZ/G2L family SoCs. It consists of eight 16-bit timer channels and one 32-bit timer channel. It supports the following functions - Counter - Timer - PWM The 8/16/32 bit registers are mixed in each channel. Add MTU3a core driver for RZ/G2L SoC. The core driver shares the clk and channel register access for the other child devices like Counter, PWM and Clock event. Signed-off-by: Biju Das Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230330111632.169434-3-biju.das.jz@bp.renesas.com commit 0a9d6b54297e216199cbfd08c5e6a35cce152477 Author: Biju Das Date: Thu Mar 30 12:16:27 2023 +0100 dt-bindings: timer: Document RZ/G2L MTU3a bindings The RZ/G2L multi-function timer pulse unit 3 (MTU3a) is embedded in the Renesas RZ/G2L family SoC's. It consists of eight 16-bit timer channels and one 32-bit timer channel. It supports the following functions - Counter - Timer - PWM Signed-off-by: Biju Das Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230330111632.169434-2-biju.das.jz@bp.renesas.com commit a29f5a3eeb81717245d28f9fc212229f5407c8d5 Author: Uwe Kleine-König Date: Fri Mar 31 09:03:44 2023 +0200 mfd: rsmu_i2c: Convert to i2c's .probe_new() again This commit reapplies commit 601e6d48ee35 ("mfd: rsmu_i2c: Convert to i2c's .probe_new()") which was accidently reverted by commit 1b3b1d6c27cc ("mfd: rsmu: Support 32-bit address space"). Without this change the driver fails to build in combination with commit 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") which is contained in v6.3-rc2. Fixes: 1b3b1d6c27cc ("mfd: rsmu: Support 32-bit address space") Signed-off-by: Uwe Kleine-König Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230331070344.czphnnmvu2ojzo5l@pengutronix.de commit 72d4a1683741ee578da0e265886e6a7f3d42266c Author: Jarkko Nikula Date: Thu Mar 30 16:26:18 2023 +0300 mfd: intel-lpss: Add Intel Meteor Lake PCH-S LPSS PCI IDs Add Intel Meteor Lake PCH-S also called as Meteor Point-S LPSS PCI IDs. Signed-off-by: Jarkko Nikula Acked-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230330132618.4108665-1-jarkko.nikula@linux.intel.com commit 96da8f148396329ba769246cb8ceaa35f1ddfc48 Author: Qiang Ning Date: Thu Mar 30 10:43:53 2023 +0800 mfd: dln2: Fix memory leak in dln2_probe() When dln2_setup_rx_urbs() in dln2_probe() fails, error out_free forgets to call usb_put_dev() to decrease the refcount of dln2->usb_dev. Fix this by adding usb_put_dev() in the error handling code of dln2_probe(). Signed-off-by: Qiang Ning Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230330024353.4503-1-qning0106@126.com commit 2405fbfb384ef39e9560d76d3f6e4c90519f90aa Author: Hans de Goede Date: Wed Mar 29 22:55:44 2023 +0200 mfd: axp20x: Fix axp288 writable-ranges Register AXP288_POWER_REASON is writable and needs to be written to reset the reset- / power-on-reason bits. Add it to the axp288 writable-ranges so that the extcon-axp288 driver can properly clear the reset- / power-on-reason bits. Signed-off-by: Hans de Goede Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230329205544.1051393-1-hdegoede@redhat.com commit 66c8d55966fd169a36fa2ca6e80517080492e87f Author: Krzysztof Kozlowski Date: Sat Mar 25 12:43:53 2023 +0100 dt-bindings: mfd: x-powers,axp152: Simplify disallowing properties The syntax to disallow x-powers,drive-vbus-en, x-powers,self-working-mode and x-powers,master-mode for certain variants can be made simpler. Also this produces much nicer warning message when the condition hits wrong DTS. Signed-off-by: Krzysztof Kozlowski Acked-by: Chen-Yu Tsai Reviewed-by: Andre Przywara Tested-by: Andre Przywara Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230325114353.50293-1-krzysztof.kozlowski@linaro.org commit 67d6c76fc815cddc77de9529221f9ff8dd1fb10e Author: Min Li Date: Mon Mar 27 14:39:53 2023 -0400 mfd: rsmu: Support 32-bit address space We used to assume 0x2010xxxx address. Now that we need to access 0x2011xxxx address, we need to support read/write the whole 32-bit address space. Also defined RSMU_MAX_WRITE_COUNT and RSMU_MAX_READ_COUNT for readability Signed-off-by: Min Li Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/MW5PR03MB693295AF31ABCAF6AE52EE74A08B9@MW5PR03MB6932.namprd03.prod.outlook.com commit fb9d4960a876e9344ab2c8a22c5c0fcd8c64210d Author: Johan Hovold Date: Mon Mar 20 14:57:10 2023 +0100 dt-bindings: mfd: qcom,spmi-pmic: Add nvram function Add an 'nvram' pattern property and a reference to the corresponding SDAM DT schema. Signed-off-by: Johan Hovold Acked-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230320135710.1989-4-johan+linaro@kernel.org commit 972c91fd7beddc3f19c8c855f6e60e7dbd435cbd Author: Charles Keepax Date: Thu Mar 23 13:41:38 2023 +0000 mfd: arizona-spi: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as a module. Fixes: 3f65555c417c ("mfd: arizona: Split of_match table into I2C and SPI versions") Signed-off-by: Charles Keepax Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230323134138.834369-1-ckeepax@opensource.cirrus.com commit 9896a19caf79f83692f13ab688d34c85ecfa92b2 Author: Rob Herring Date: Wed Mar 22 12:35:18 2023 -0500 dt-bindings: mfd: Drop unneeded quotes in 'ref', 'id' and 'schema' entries Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Reviewed-by: Damien Le Moal Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230322173519.3971434-1-robh@kernel.org commit f0484d2f80a72022b7fac72bcb406392900ef1eb Author: Colin Foster Date: Wed Mar 22 07:11:30 2023 -0700 mfd: ocelot-spi: Fix unsupported bulk read Ocelot chips (VSC7511, VSC7512, VSC7513, VSC7514) don't support bulk read operations over SPI. Many SPI buses have hardware that can optimize consecutive reads. Essentially an address is written to the chip, and if the SPI controller continues to toggle the clock, subsequent register values are reported. This can lead to significant optimizations, because the time between "address is written to the chip" and "chip starts to report data" can often take a fixed amount of time. When support for Ocelot chips were added in commit f3e893626abe ("mfd: ocelot: Add support for the vsc7512 chip via spi") it was believed that this optimization was supported. However it is not. Most register transactions with the Ocelot chips are not done in bulk, so this bug could go unnoticed. The one scenario where bulk register operations _are_ performed is when polling port statistics counters, which was added in commit d87b1c08f38a ("net: mscc: ocelot: use bulk reads for stats"). Things get slightly more complicated here... A bug was introduced in commit d4c367650704 ("net: mscc: ocelot: keep ocelot_stat_layout by reg address, not offset") that broke the optimization of bulk reads. This means that when Ethernet support for the VSC7512 chip was added in commit 3d7316ac81ac ("net: dsa: ocelot: add external ocelot switch control") things were actually working "as expected". The bulk read opmtimization was discovered, and fixed in commit 6acc72a43eac ("net: mscc: ocelot: fix stats region batching") and the timing optimizations for SPI were noticed. A bulk read went from ~14ms to ~2ms. But this timing improvement came at the cost of every register reading zero due the fact that bulk reads don't work. The read timings increase back to 13-14ms, but that's a price worth paying in order to receive valid data. This is verified in a DSA setup (cpsw-new switch tied to port 0 on the VSC7512, after having been running overnight) Rx Octets: 16222055 # Counters from CPSW switch Tx Octets: 12034702 Net Octets: 28256757 p00_rx_octets: 12034702 # Counters from Ocelot switch p00_rx_frames_below_65_octets: 0 p00_rx_frames_65_to_127_octets: 88188 p00_rx_frames_128_to_255_octets: 13 p00_rx_frames_256_to_511_octets: 0 p00_rx_frames_512_to_1023_octets: 0 p00_rx_frames_over_1526_octets: 3306 p00_tx_octets: 16222055 Fixes: f3e893626abe ("mfd: ocelot: Add support for the vsc7512 chip via spi") Signed-off-by: Colin Foster Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230322141130.2531256-1-colin.foster@in-advantage.com commit 4363f2113d04db9bafcc79487050ee0c10875c5a Author: Tom Rix Date: Wed Mar 22 08:58:03 2023 -0400 mfd: omap-usb-tll: Remove unused usbtll_readb() function Clang with W=1 reports: drivers/mfd/omap-usb-tll.c:128:18: error: unused function 'usbtll_readb' [-Werror,-Wunused-function] static inline u8 usbtll_readb(void __iomem *base, u32 reg) ^ This function is not used so remove it. Signed-off-by: Tom Rix Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230322125803.2570968-1-trix@redhat.com commit 75c0a1b3fc1c09ed67d22235900cb7e762af1dfd Author: Tom Rix Date: Wed Mar 22 07:58:38 2023 -0400 mfd: twl-core: Remove unused add_child() and add_numbered_child() functions Clang with W=1 reports: drivers/mfd/twl-core.c:654:30: error: unused function 'add_child' [-Werror,-Wunused-function] static inline struct device *add_child(unsigned mod_no, const char *name, ^ add_numbered_child() and its only caller add_child() are not used, so remove them. Signed-off-by: Tom Rix Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230322115838.2569414-1-trix@redhat.com commit 3e0475ec8d9114b600586b0bfb4056565a679a3d Author: Bartosz Golaszewski Date: Tue Mar 14 19:30:33 2023 +0100 dt-bindings: mfd: qcom,spmi-pmic: Add compatible for pmm8654au PMM8654au is the SPMI PMIC variant used on sa8775p-ride. Add a compatible for it. Signed-off-by: Bartosz Golaszewski Acked-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230314183043.619997-5-brgl@bgdev.pl commit 881656790e9bd246b7cf6eb537feb04f09140a40 Author: André Apitzsch Date: Sun Mar 19 13:41:53 2023 +0100 mfd: arizona-i2c: Add the missing device table IDs for OF This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as a module. Signed-off-by: André Apitzsch Acked-by: Charles Keepax Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230319124153.35294-1-git@apitzsch.eu commit 44604617ce7aa0c24fd198b5a8760e018549922f Author: Konrad Dybcio Date: Wed Mar 15 19:38:19 2023 +0100 dt-bindings: mfd: qcom,spmi-pmic: Add PM2250 Add a compatible for PM2250, commonly found with QCM2290. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230315183819.3563704-1-konrad.dybcio@linaro.org commit e90978ecdf9d016e31f6aff36da77255b42fb4fd Author: Geert Uytterhoeven Date: Mon Mar 13 11:58:33 2023 +0100 mfd: rsmu_spi: Remove unneeded casts of void * There is no need to cast a "void *" to a different type of pointer. Signed-off-by: Geert Uytterhoeven Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/ae84c1751e79cb49ab584557f4ecd835a8493d7c.1678704562.git.geert+renesas@glider.be commit 9bb8ccead3b0162cf98091c4ff25e772fd97d953 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:16:29 2023 +0100 mfd: atc260x-i2c: Drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/mfd/atc260x-i2c.c:44:34: error: ‘atc260x_i2c_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230311111629.251830-2-krzysztof.kozlowski@linaro.org commit f130faebcdb6c7fd04c1db9e589d593361b81c13 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:16:28 2023 +0100 mfd: atmel-smc: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/mfd/atmel-smc.c:326:34: error: ‘atmel_smc_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230311111629.251830-1-krzysztof.kozlowski@linaro.org commit 01330edcc5ecc92eb9152b27f326618735900502 Author: Rob Herring Date: Fri Mar 10 08:47:12 2023 -0600 mfd: various: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230310144712.1543449-1-robh@kernel.org commit 1ba58fbbe619125af113d0583c4b6bade94168d1 Author: Rob Herring Date: Fri Mar 10 08:47:12 2023 -0600 mfd: various: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230310144712.1543379-1-robh@kernel.org commit 2ddbddaf19dcdc60e05c720611faca7ba5176ed9 Author: Nick Alcock Date: Wed Mar 8 19:42:50 2023 +0000 mfd: da903x: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308194307.374789-1-nick.alcock@oracle.com commit ca9642a623dfc43a8ec8b0ba4694605ea74cef20 Author: Nick Alcock Date: Wed Mar 8 19:42:51 2023 +0000 mfd: da9052: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit adefecd9b506a6f9981cdcda97ae6803bdea0180 Author: Nick Alcock Date: Wed Mar 8 19:42:52 2023 +0000 mfd: da9052-i2c: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit fca17373d26c5e4e98134f97601aff688d164813 Author: Nick Alcock Date: Wed Mar 8 19:42:53 2023 +0000 mfd: da9052-spi: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit 1247f3c3e1f29fc78027dfe4043f6c0413612126 Author: Nick Alcock Date: Wed Mar 8 19:42:54 2023 +0000 mfd: da9055: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit e7bf264def565d77474dd074109cc84948a5058e Author: Nick Alcock Date: Wed Mar 8 19:42:55 2023 +0000 mfd: da9055-i2c: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit 9e646615df195f1864e2384133a42a832a809059 Author: Nick Alcock Date: Wed Mar 8 19:42:56 2023 +0000 mfd: stmpe-i2c: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit 9ca834bd404c2b1e1e7010e7c22c5a1810fd7cd5 Author: Nick Alcock Date: Wed Mar 8 19:42:57 2023 +0000 mfd: stmpe-spi: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit ce1b2783136a1b44b619336fbe76776ae2c8f3ab Author: Nick Alcock Date: Wed Mar 8 19:42:58 2023 +0000 mfd: 88pm860x: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit 65edd14d790cfe076be0da58c457f75b35395c27 Author: Nick Alcock Date: Wed Mar 8 19:43:00 2023 +0000 mfd: tc3589x: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit 0607ad38c2fb0182eba20d4f476558b0547d58a5 Author: Nick Alcock Date: Wed Mar 8 19:43:02 2023 +0000 mfd: ezx-pcap: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit e3dfb3dbd67805914ebda52430257b370554e479 Author: Nick Alcock Date: Wed Mar 8 19:43:04 2023 +0000 mfd: omap-usb-host: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit 85aebcd54e2d22c00e0964442dc5330128e43f9b Author: Nick Alcock Date: Wed Mar 8 19:43:05 2023 +0000 mfd: omap-usb-tll: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit fb2455985b5981e4f8a72667bb3d4bd5b7ca2b12 Author: Nick Alcock Date: Wed Mar 8 19:43:01 2023 +0000 mfd: tps6586x: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit f580386425518643c4027286b48cfa545390be07 Author: Nick Alcock Date: Wed Mar 8 19:43:03 2023 +0000 mfd: lp8788: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit b22f3152494e3b1e2fce4d61ad828420d16e9e5d Author: Nick Alcock Date: Wed Mar 8 19:43:06 2023 +0000 mfd: twl4030-audio: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit 3a101f09b1066991569ce9f4fd1e90a07e97fb3a Author: Nick Alcock Date: Wed Mar 8 19:43:07 2023 +0000 mfd: twl6040: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Signed-off-by: Lee Jones commit 75a6ff48fe16e4221be68eb354747bb207d61535 Author: Nick Alcock Date: Wed Mar 8 19:42:59 2023 +0000 mfd: da9055: Do not cite as modular This driver cannot be built as a module, so don't suggest otherwise in Kconfig help. Suggested-by: Lee Jones Signed-off-by: Nick Alcock Reviewed-by: Vincenzo Palazzo Signed-off-by: Lee Jones commit c923d5001ba054df10ed3441d24f8f2c01db7e00 Author: Christoph Niedermaier Date: Thu Mar 9 10:22:53 2023 +0100 mfd: da9062: Remove IRQ requirement This patch removes the requirement for an IRQ, because for the core functionality IRQ isn't needed. So this makes the DA9061/62 chip usable for designs which haven't connected the IRQ pin. Signed-off-by: Christoph Niedermaier Acked-by: Adam Ward Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230309092254.56279-2-cniedermaier@dh-electronics.com commit 7d61f6313e90cdbe592eba5e0ae6d1c367b03548 Author: Christoph Niedermaier Date: Thu Mar 9 10:22:52 2023 +0100 mfd: da9062: Use MFD_CELL_OF macro Use MFD_CELL_OF macro helper instead of plain struct properties, which makes the code a bit shorter and to have commonly defined MFD cell attributes. Signed-off-by: Christoph Niedermaier Acked-by: Adam Ward Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230309092254.56279-1-cniedermaier@dh-electronics.com commit 6e264e72299c1aff75b9cf45c4cbebaea2cb5fd6 Author: Andrew Davis Date: Wed Mar 8 10:55:48 2023 -0600 dt-bindings: mfd: Add TI-Nspire misc registers The TI Nspire devices contain a set of registers with a seemingly miscellaneous set of functionality. This area is known simply as the "misc" region. Signed-off-by: Andrew Davis Reviewed-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308165557.2242-2-afd@ti.com commit a0b9becad8a7d62a81530035a69f744c0e389737 Author: Uwe Kleine-König Date: Wed Mar 8 10:12:57 2023 +0100 mfd: core: Remove .enable() and .disable() callbacks With commit dd77f5fa97d3 ("mfd: Remove toshiba tmio drivers") the last mfd driver that implements these callbacks is gone and since commit 652719b1003a ("w1: remove ds1wm driver") the last user is gone. The corresponding functions mfd_cell_enable() and mfd_cell_disable() are also unused (since commit 0ca222c81977 ("leds: Remove asic3 driver")). Signed-off-by: Uwe Kleine-König Acked-by: Arnd Bergmann Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308091257.2404932-1-u.kleine-koenig@pengutronix.de commit e8e9837dde98b18b694f79f6268afff7a610bf30 Author: Krzysztof Kozlowski Date: Mon Mar 6 08:26:17 2023 +0100 dt-bindings: mfd: qcom,tcsr: Document SDX55 TCSR Add compatible for SDX55 TCSR block. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230306072618.10770-1-krzysztof.kozlowski@linaro.org commit 0742c2a6335281608ac9e9aee67493e9e30f6195 Author: Patrick Rudolph Date: Tue Mar 7 13:12:45 2023 +0100 mfd: max597x: Add support for MAX5970 and MAX5978 Implement a regulator driver with IRQ support for fault management. Written against documentation [1] and [2] and tested on real hardware. Every channel has it's own regulator supply nammed 'vss1-supply' and 'vss2-supply'. The regulator supply is used to determine the output voltage, as the smart switch provides no output regulation. The driver requires the 'shunt-resistor-micro-ohms' to be present in the devicetree to properly calculate current related values. You must specify compatible devictree layout: regulator@3a { reg = <0x3a>; vss1-supply = <&p3v3>; compatible = "maxim,max5978"; ... regulators { sw0_ref: SW0 { regulator-compatible = "SW0"; shunt-resistor-micro-ohms = <12000>; ... } } } 1: https://datasheets.maximintegrated.com/en/ds/MAX5970.pdf 2: https://datasheets.maximintegrated.com/en/ds/MAX5978.pdf ... Changes in V12: - Use simple_mfd_i2c driver and remove previous implementation. - Remove newline - Use _MFD_MAX597X_H in header file - Successfull build need following patch from regulator: https://lore.kernel.org/r/20230216075302.68935-1-Naresh.Solanki@9elements.com https://lore.kernel.org/r/20230210163225.1208035-1-Naresh.Solanki@9elements.com Signed-off-by: Patrick Rudolph Signed-off-by: Marcello Sylvester Bauer Signed-off-by: Naresh Solanki Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230307121246.127425-2-Naresh.Solanki@9elements.com commit ba2b13df8ab005cee919d2ca31829a3c639fded2 Author: Marcello Sylvester Bauer Date: Tue Mar 7 13:12:44 2023 +0100 dt-bindings: mfd: Add MAX5970 and MAX5978 The MAX597x is a hot swap controller with configurable fault protection. It also has 10bit ADC for current & voltage measurements. ... Changes in V12: - Update title Signed-off-by: Marcello Sylvester Bauer Co-developed-by: Patrick Rudolph Signed-off-by: Patrick Rudolph Co-developed-by: Naresh Solanki Signed-off-by: Naresh Solanki Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230307121246.127425-1-Naresh.Solanki@9elements.com commit 2c6a1bde024ccb0e64ea4bc112d15438abc08949 Author: Rohit Agarwal Date: Wed Mar 8 17:49:48 2023 +0530 dt-bindings: mfd: qcom,tcsr: Add compatible for sdx65 Add the qcom,sdx65-tcsr compatible. Signed-off-by: Rohit Agarwal Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/1678277993-18836-2-git-send-email-quic_rohiagar@quicinc.com commit c5a4b6fd31e8cbc749f7ac9ff6c3a6118f3e5011 Author: Ye Xiang Date: Sat Feb 25 22:01:15 2023 +0800 gpio: Add support for Intel LJCA USB GPIO driver This patch implements the GPIO function of Intel USB-I2C/GPIO/SPI adapter device named "La Jolla Cove Adapter" (LJCA). It communicate with LJCA GPIO module with specific protocol through interfaces exported by LJCA USB driver. Signed-off-by: Ye Xiang Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230225140118.2037220-3-xiang.ye@intel.com commit b8fd17d9505e18001d10ceaa350c118a82b467bb Author: Jakob Hauser Date: Tue Feb 28 23:32:20 2023 +0100 mfd: rt5033: Fix comments and style in includes Fix comments and remove some empty lines in rt5033-private.h. Align struct rt5033_charger in rt5033.h. Signed-off-by: Jakob Hauser Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/606950da6f4b36f5a124ff13756c78644fc89804.1677620677.git.jahau@rocketmail.com commit 21a8d573d967214e66abe2a1d69152d59e2a3521 Author: Mukesh Ojha Date: Thu Feb 2 16:41:24 2023 +0530 dt-bindings: mfd: qcom,tcsr: Add compatible for sm8450 Document the qcom,sm8450-tcsr compatible. Signed-off-by: Mukesh Ojha Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/1675336284-548-1-git-send-email-quic_mojha@quicinc.com commit f376c479668557bcc2fd9e9fbc0f53e7819a11cd Author: Matthias Schiffer Date: Mon Feb 20 12:25:46 2023 +0100 mfd: tqmx86: Correct board names for TQMxE39x It seems that this driver was developed based on preliminary documentation. Report the correct names for all TQMxE39x variants, as they are used by the released hardware revisions: - Fix names for TQMxE39C1/C2 board IDs - Distinguish TQMxE39M and TQMxE39S, which use the same board ID The TQMxE39M/S are distinguished using the SAUC (Sanctioned Alternate Uses Configuration) register of the GPIO controller. This also prepares for the correct handling of the differences between the GPIO controllers of our COMe and SMARC modules. Fixes: 2f17dd34ffed ("mfd: tqmx86: IO controller with I2C, Wachdog and GPIO") Signed-off-by: Matthias Schiffer Reviewed-by: Andrew Lunn Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/aca9a7cb42a85181bcb456c437554d2728e708ec.1676892223.git.matthias.schiffer@ew.tq-group.com commit 051c69ff4f607aa114c7bbdd7c41ed881367aeee Author: Matthias Schiffer Date: Mon Feb 20 12:25:45 2023 +0100 mfd: tqmx86: Specify IO port register range more precisely Registers 0x160..0x17f are unassigned. Use 0x180 as base register and update offets accordingly. Also change the size of the range to include 0x19f. While 0x19f is currently reserved for future extensions, so are several of the previous registers up to 0x19e, and it is weird to leave out just the last one. Fixes: 2f17dd34ffed ("mfd: tqmx86: IO controller with I2C, Wachdog and GPIO") Signed-off-by: Matthias Schiffer Reviewed-by: Andrew Lunn Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/db4677ac318b1283c8956f637f409995a30a31c3.1676892223.git.matthias.schiffer@ew.tq-group.com commit 1be1b23696b3d4b0231c694f5e0767b4471d33a9 Author: Matthias Schiffer Date: Mon Feb 20 12:25:44 2023 +0100 mfd: tqmx86: Do not access I2C_DETECT register through io_base The I2C_DETECT register is at IO port 0x1a7, which is outside the range passed to devm_ioport_map() for io_base, and was only working because there aren't actually any bounds checks for IO port accesses. Extending the range does not seem like a good solution here, as it would then conflict with the IO resource assigned to the I2C controller. As this is just a one-off access during probe, use a simple inb() instead. While we're at it, drop the unused define TQMX86_REG_I2C_INT_EN. Fixes: 2f17dd34ffed ("mfd: tqmx86: IO controller with I2C, Wachdog and GPIO") Signed-off-by: Matthias Schiffer Reviewed-by: Andrew Lunn Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/e8300a30f0791afb67d79db8089fb6004855f378.1676892223.git.matthias.schiffer@ew.tq-group.com commit 4d820dda94162968ea743675d9338ff5df6f62d0 Author: Emil Renner Berthing Date: Sat Feb 11 05:18:15 2023 +0200 dt-bindings: mfd: syscon: Add StarFive JH7100 sysmain compatible Document StarFive JH7100 SoC compatible for sysmain registers. Signed-off-by: Emil Renner Berthing Signed-off-by: Cristian Ciocaltea Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230211031821.976408-7-cristian.ciocaltea@collabora.com commit cf973869b9c46a9c817831bc31d89a2c38b65ba0 Author: Nick Alcock Date: Fri Feb 24 15:07:48 2023 +0000 mfd: intel_soc_pmic_crc: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Suggested-by: Luis Chamberlain Signed-off-by: Nick Alcock Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230224150811.80316-5-nick.alcock@oracle.com commit 679532c2f6df69ad65b8717c71b06e957d2f60e6 Author: Nick Alcock Date: Fri Feb 24 15:08:05 2023 +0000 mfd: bcm2835-pm: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Suggested-by: Luis Chamberlain Signed-off-by: Nick Alcock Reviewed-by: Florian Fainelli Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230224150811.80316-22-nick.alcock@oracle.com commit c8bce48225eff37d87d1eab12c907c813befa8e9 Author: Aidan MacDonald Date: Thu Feb 16 22:22:14 2023 +0000 mfd: qcom-pm8008: Remove workaround for a regmap-irq quirk Remove pm8008_init(), which according to the comments exists only as a workaround for regmap-irq's odd treatment of type registers. This workaround shouldn't be needed anymore because this driver uses config registers, which are always programmed by regmap-irq no matter what the initial register state is. Signed-off-by: Aidan MacDonald Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230216222214.138671-5-aidanmacdonald.0x0@gmail.com commit ba97b5a505627fc2fb9c85f06afaef918e19032e Author: Aidan MacDonald Date: Thu Feb 16 22:22:13 2023 +0000 mfd: qcom-pm8008: Use .get_irq_reg() for irq chip Replace the deprecated not_fixed_stride flag and the associated hierarchy of offsets with a .get_irq_reg() callback. Signed-off-by: Aidan MacDonald Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230216222214.138671-4-aidanmacdonald.0x0@gmail.com commit fd0a2afa5ab2fb3ba5646e3bf907f2c4a8b4a291 Author: Aidan MacDonald Date: Thu Feb 16 22:22:12 2023 +0000 mfd: qcom-pm8008: Convert irq chip to config regs Replace type and virtual registers, which are both deprecated, with config registers. This also simplifies the driver because IRQ types are set in one place, the set_type_config() callback. Signed-off-by: Aidan MacDonald [Lee: Squashed in fix-up patch from Stephen Rothwell adapting to new .set_type_config() API] Signed-off-by: Stephen Rothwell Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230216222214.138671-3-aidanmacdonald.0x0@gmail.com commit 172a293707a55ba62e55a386eb601c8ef4824c85 Author: Aidan MacDonald Date: Thu Feb 16 22:22:11 2023 +0000 mfd: qcom-pm8008: Fix swapped mask/unmask in irq chip The usual behavior of mask registers is writing a '1' bit to disable (mask) an interrupt; similarly, writing a '1' bit to an unmask register enables (unmasks) an interrupt. Due to a longstanding issue in regmap-irq, mask and unmask registers were inverted when both kinds of registers were present on the same chip, ie. regmap-irq actually wrote '1's to the mask register to enable an IRQ and '1's to the unmask register to disable an IRQ. This was fixed by commit e8ffb12e7f06 ("regmap-irq: Fix inverted handling of unmask registers") but the fix is opt-in via mask_unmask_non_inverted = true because it requires manual changes for each affected driver. The new behavior will become the default once all drivers have been updated. The PM8008 appears to rely on the inverted behavior. It has separate set & clear registers for a register called INT_EN, which presumably enables interrupts by writing '1's. Opt in to the new non-inverted behavior & swap mask_base/unmask_base. Signed-off-by: Aidan MacDonald Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230216222214.138671-2-aidanmacdonald.0x0@gmail.com commit c301311a523bcc48d6d626cbd4654463a105e089 Author: Poovendhan Selvaraj Date: Wed Feb 8 11:03:32 2023 +0530 dt-bindings: mfd: Add the tcsr compatible for IPQ9574 Add the tcsr compatible string for IPQ9574 SoC Signed-off-by: Poovendhan Selvaraj Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230208053332.16537-6-quic_poovendh@quicinc.com commit 86c6bb0edffa9fc02b4e3801b48c8e82114f1352 Author: Christophe JAILLET Date: Tue Feb 14 09:58:59 2023 +0100 mfd: core: Reorder fields in 'struct mfd_cell' to save some memory Group some variables based on their sizes to reduce hole and avoid padding. On x86_64, this shrinks the size from 144 to 128 bytes. As an example: $ size drivers/mfd/as3722.o (Before) text data bss dec hex filename 9441 680 16 10137 2799 drivers/mfd/as3722.o $ size drivers/mfd/as3722.o (After) text data bss dec hex filename 9345 680 16 10041 2739 drivers/mfd/as3722.o Signed-off-by: Christophe JAILLET Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/bb631974888dfe1af593b6280cf30fb913d2d1a4.1676365116.git.christophe.jaillet@wanadoo.fr commit b09ed62f2d985c8eb2d5d5b560bebac653fdba20 Author: Konrad Dybcio Date: Mon Feb 13 21:13:37 2023 +0100 dt-bindings: mfd: qcom,spmi-pmic: Allow RRADC as adc@ subnode This was omitted when adding the RRADC bindings. Fixes: 7ea58c951ab3 ("dt-bindings: iio: adc: document qcom-spmi-rradc") Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230213201337.2089970-1-konrad.dybcio@linaro.org commit 2e9de58c65f76ac9617b0028254edaca01529208 Author: Ye Xingchen Date: Wed Feb 8 17:34:51 2023 +0800 mfd: qcom_rpm: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Reviewed-by: Konrad Dybcio Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/202302081734511884545@zte.com.cn commit ccb92c4d1608eb07c0d6b677c3bc7745db7fa33d Author: Ye Xingchen Date: Wed Feb 8 17:31:59 2023 +0800 mfd: atmel-flexcom: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Reviewed-by: Claudiu Beznea Tested-by: Claudiu Beznea Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/202302081731593374472@zte.com.cn commit 4723d2ef5329f28f569bf9e855bd5bd4b691aa37 Author: Ye Xingchen Date: Wed Feb 8 17:36:50 2023 +0800 mfd: sun4i-gpadc: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/202302081736500534579@zte.com.cn commit 0479ed2cf70c69fa703a1e6cbb4d5c2e7e4442a2 Author: Ye Xingchen Date: Wed Feb 8 17:35:44 2023 +0800 mfd: ssbi: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/202302081735440864562@zte.com.cn commit 4239bff3455dd28733d719b79400df1b65b4d9fa Author: Ye Xingchen Date: Wed Feb 8 17:33:54 2023 +0800 mfd: ipaq-micro: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/202302081733542304522@zte.com.cn commit 74d3de876a3aa9c91ccf8e5559f41b30ed8a9cd1 Author: Ye Xingchen Date: Wed Feb 8 17:33:01 2023 +0800 mfd: hi6421-pmic: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/202302081733017704501@zte.com.cn commit d16fc6858777f861717f7b2c0ef3676e419f52a0 Author: Jackie Liu Date: Mon Feb 6 11:22:31 2023 +0800 mfd: si476x-cmd: Fix several issues reported by codespell Fix some typo, find by 'codespell drivers/mfd/si476x-cmd.c' succsess -> success interace -> interface comand -> command failre -> failure Reported-by: k2ci Signed-off-by: Jackie Liu Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230206032231.3208296-1-liu.yun@linux.dev commit ded99b89d25fd73a1d7bd910378e0339fd9d4c4a Author: Hans de Goede Date: Wed Mar 1 10:54:02 2023 +0100 mfd: intel_soc_pmic_chtwc: Add Lenovo Yoga Book X90F to intel_cht_wc_models The Android Lenovo Yoga Book X90F / X90L uses the same charger / fuelgauge setup as the already supported Windows Lenovo Yoga Book X91F/L, add a DMI match for this to intel_cht_wc_models with driver_data set to INTEL_CHT_WC_LENOVO_YOGABOOK1. When the quirk for the X91F/L was initially added it was written to also apply to the X90F/L but this does not work because the Android version of the Yoga Book uses completely different DMI strings. Also adjust the X91F/L quirk to reflect that it only applies to the X91F/L models. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230301095402.28582-1-hdegoede@redhat.com commit a3165abaa9bda3e729b434a3e684fcfa205f252a Author: David Virag Date: Tue Jan 31 19:30:07 2023 +0100 rtc: s5m: Drop S5M8763 support The S5M8763 MFD has no device tree compatible, and since board file support for it was removed, there's no way to use this MFD. After removing the remaining code for it from the MFD driver, also remove support for it in the s5m RTC driver, and all remaining references to it. Signed-off-by: David Virag Acked-by: Alexandre Belloni Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230131183008.4451-3-virag.david003@gmail.com commit f736d2c0caa8348b0bcd897972e470f7a596caad Author: David Virag Date: Tue Jan 31 19:30:06 2023 +0100 mfd: sec: Remove PMICs without compatibles The S5M8751 and S5M8763 PMIC chips have no corresponding compatible values, so since board file support was removed for this driver, there is no way to specify these PMICs as present in boards anymore. Remove leftovers of these chips since it's dead code. Signed-off-by: David Virag Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230131183008.4451-2-virag.david003@gmail.com commit 9b78d919632b7149d311aaad5a977e4b48b10321 Author: Paolo Abeni Date: Wed Apr 26 10:15:31 2023 +0200 net: phy: hide the PHYLIB_LEDS knob commit 4bb7aac70b5d ("net: phy: fix circular LEDS_CLASS dependencies") solved a build failure, but introduces a new config knob with a default 'y' value: PHYLIB_LEDS. The latter is against the current new config policy. The exception was raised to allow the user to catch bad configurations without led support. Anyway the current definition of PHYLIB_LEDS does not fit the above goal: if LEDS_CLASS is disabled, the new config will be available only with PHYLIB disabled, too. Hide the mentioned config, to preserve the randconfig testing done so far, while respecting the mentioned policy. Suggested-by: Andrew Lunn Suggested-by: Arnd Bergmann Signed-off-by: Paolo Abeni Link: https://lore.kernel.org/r/d82489be8ed911c383c3447e9abf469995ccf39a.1682496488.git.pabeni@redhat.com Signed-off-by: Paolo Abeni commit 7e0664b660bc8f977d2948d8c8fbfc4809b3e6b4 Merge: f7abf14f0001a e2a1406c84c43 Author: Thomas Gleixner Date: Wed Apr 26 11:03:57 2023 +0200 Merge tag 'timers-v6.4-rc1' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clocksource and clockevent updates from Daniel Lezcano: - Fix error returned for shared timers on Exynos MCT timers (Krzysztof Kozlowski) - Code reorg by splitting the CPUXGPT timer code (AngeloGioacchino Del Regno) - Remove the unused mxc_timer_init() function on i.MX (Fabio Estevam) - Replace of_get_address() and of_translate_address() calls with single call to of_address_to_resource() on TI timer (Rob Herring) - Mark driver as non-removable and remove useless remove() callback on SH MTU2 and STM32 LP timers. Improve the error message in the remove callback of the TI DM timer (Uwe Kleine-König) - Convert to platform remove callback returning void on Tegra186, TI DM timers (Uwe Kleine-König) - Drop pointless of_match_ptr for ID table in the STM32 LP timer (Krzysztof Kozlowski) - Fix memory leak in davinci_timer_register when init fails on DaVinci (Qinrun Dai) - Fix finding alwon timer regression on Timer TI DM (Tony Lindgren) - Use of_property_read_bool() for boolean properties on TI timer (Rob Herring) - Drop superfluous rk3288 compatible and add rk3588 compatible DT bindings (Cristian Ciocaltea) Link: htttps://lore.kernel.org/lkml/d30fd923-e6e5-a1a6-ca76-1b39f8fad6c9@linaro.org commit 2afa82d1fc648c8d4c2ef9e876626abb1089f9ab Author: Krzysztof Kozlowski Date: Thu Apr 20 09:24:29 2023 +0200 dt-bindings: thermal: qcom-tsens: Correct unit address Match unit-address to first reg entry. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Acked-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230420072429.36255-1-krzysztof.kozlowski@linaro.org commit f0fb67c27160eb1aed1524cf5bf7dbbc3174f1b9 Author: Rob Herring Date: Sun Mar 19 11:32:31 2023 -0500 thermal/drivers/mediatek: Use of_address_to_resource() Replace of_get_address() and of_translate_address() calls with single call to of_address_to_resource(). Signed-off-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230319163231.226738-1-robh@kernel.org commit a3e9a9a5971164933e0d247125897c2e54587c6b Author: Kang Chen Date: Wed Apr 19 10:07:49 2023 +0800 thermal/drivers/mediatek: Change clk_prepare_enable to devm_clk_get_enabled in mtk_thermal_probe Use devm_clk_get_enabled to do automatic resource management. Meanwhile, remove error handling labels in the probe function and the whole remove function. Signed-off-by: Kang Chen Reviewed-by: Dongliang Mu Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230419020749.621257-2-void0red@hust.edu.cn commit f05c7b7d9ea9477fcc388476c6f4ade8c66d2d26 Author: Kang Chen Date: Wed Apr 19 10:07:48 2023 +0800 thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe Smatch reports: 1. mtk_thermal_probe() warn: 'apmixed_base' from of_iomap() not released. 2. mtk_thermal_probe() warn: 'auxadc_base' from of_iomap() not released. The original code forgets to release iomap resource when handling errors, fix it by switch to devm_of_iomap. Fixes: 89945047b166 ("thermal: mediatek: Add tsensor support for V2 thermal system") Signed-off-by: Kang Chen Reviewed-by: Dongliang Mu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230419020749.621257-1-void0red@hust.edu.cn commit 47cbb0467b8b3c76faba3c2dd34b20070e6103ca Author: AngeloGioacchino Del Regno Date: Wed Apr 19 08:11:46 2023 +0200 thermal/drivers/mediatek: Add temperature constraints to validate read The AUXADC thermal v1 allows reading temperature range between -20°C to 150°C and any value out of this range is invalid. Add new definitions for MT8173_TEMP_{MIN_MAX} and a new small helper mtk_thermal_temp_is_valid() to check if new readings are in range: if not, we tell to the API that the reading is invalid by returning THERMAL_TEMP_INVALID. It was chosen to introduce the helper function because, even though this temperature range is realistically ok for all, it comes from a downstream kernel driver for version 1, but here we also support v2 and v3 which may may have wider constraints. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230419061146.22246-3-angelogioacchino.delregno@collabora.com commit 0a677eea71fd58aa3bc805edfdbe8b0f11815c7d Author: AngeloGioacchino Del Regno Date: Wed Apr 19 08:11:45 2023 +0200 Revert "thermal/drivers/mediatek: Add delay after thermal banks initialization" Some more testing revealed that this commit introduces a regression on some MT8173 Chromebooks and at least on one MT6795 Sony Xperia M5 smartphone due to the delay being apparently variable and machine specific. Another solution would be to delay for a bit more (~70ms) but this is not feasible for two reasons: first of all, we're adding an even bigger delay in a probe function; second, some machines need less, some may need even more, making the msleep at probe solution highly suboptimal. This reverts commit 10debf8c2da8011c8009dd4b3f6d0ab85891c81b. Fixes: 10debf8c2da8 ("thermal/drivers/mediatek: Add delay after thermal banks initialization") Reported-by: "kernelci.org bot" Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230419061146.22246-2-angelogioacchino.delregno@collabora.com commit 2912d341800bb9781c0a0ed2bedc10b2c1fd5909 Author: Chenggang Wang Date: Tue Apr 18 11:38:28 2023 +0800 thermal/drivers/cpuidle_cooling: Delete unmatched comments The function no longer returns a value, synchronize the comments. Signed-off-by: wangchenggang@vivo.com Acked-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1681789108-28130-1-git-send-email-wangchenggang@vivo.com commit d9f7eeaf24aedfdf47bddf0cf88e1021b7f652f5 Author: Marijn Suijten Date: Mon Apr 10 22:29:15 2023 +0200 dt-bindings: thermal: Use generic ADC node name in examples Update the examples to reflect a future requirement for the generic `channel` node name on ADC channel nodes, while conveying the board name of the channel in a label instead. Signed-off-by: Marijn Suijten Acked-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230410202917.247666-4-marijn.suijten@somainline.org commit a8a2330753bc280c87aa72d690b41b8515fda214 Author: Stefan Wahren Date: Mon Apr 10 22:58:00 2023 +0200 dt-bindings: imx-thermal: Add imx6sll and imx6ul compatible Currently the dtbs_check for imx6 generates warnings like this: ['fsl,imx6sll-tempmon', 'fsl,imx6sx-tempmon'] is too long So add them to the devicetree binding. Signed-off-by: Stefan Wahren Reviewed-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230410205803.45853-4-stefan.wahren@i2se.com commit c248b27cfc0a8a5fee93e000d47e659bca335d0f Merge: 28b17f6270f18 50749f2dd6854 Author: Paolo Abeni Date: Wed Apr 26 10:17:46 2023 +0200 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net No conflicts. Signed-off-by: Paolo Abeni commit 4e8f6e44bce8da3b0e2df37b12839f4bc9c9cabe Author: Neeraj Upadhyay Date: Tue Apr 25 15:27:00 2023 +0530 arm64: Fix label placement in record_mmu_state() Fix label so that pre_disable_mmu_workaround() is called before clearing sctlr_el1.M. Fixes: 2ced0f30a426 ("arm64: head: Switch endianness before populating the ID map") Signed-off-by: Neeraj Upadhyay Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20230425095700.22005-1-quic_neeraju@quicinc.com Signed-off-by: Will Deacon commit 169f8997968ab620d750d9a45e15c5288d498356 Author: Nicholas Piggin Date: Wed Apr 26 15:58:39 2023 +1000 powerpc/64s: Disable pcrel code model on Clang Clang has a bug that casues the pcrel code model not to be used when any of -msoft-float, -mno-altivec, or -mno-vsx are set. Leaving these off causes FP/vector instructions to be generated, causing crashes. So disable pcrel for clang for now. Fixes: 7e3a68be42e10 ("powerpc/64: vmlinux support building with PCREL addresing") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230426055848.402993-3-npiggin@gmail.com commit 0c993300d52bf5ce9b951c3b6b25d0d14acc49a9 Author: Nicholas Piggin Date: Wed Apr 26 15:58:38 2023 +1000 powerpc: Fix merge conflict between pcrel and copy_thread changes Fix a conflict between commit 4e991e3c16a35 ("powerpc: add CFUNC assembly label annotation") and commit b504b6aade040 ("powerpc: differentiate kthread from user kernel thread start"). Fixes: 4e991e3c16a35 ("powerpc: add CFUNC assembly label annotation") Fixes: b504b6aade040 ("powerpc: differentiate kthread from user kernel thread start") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230426055848.402993-2-npiggin@gmail.com commit bb3f89487fd936df7cc5165bae37ca2669056c5c Author: Evan Green Date: Thu Apr 20 12:49:34 2023 -0700 RISC-V: hwprobe: Remove __init on probe_vendor_features() probe_vendor_features() is now called from smp_callin(), which is not __init code and runs during cpu hotplug events. Remove the __init_or_module decoration from it and the functions it calls to avoid walking into outer space. Fixes: 62a31d6e38bd ("RISC-V: hwprobe: Support probing of misaligned access performance") Signed-off-by: Evan Green Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230420194934.1871356-1-evan@rivosinc.com Signed-off-by: Palmer Dabbelt commit 3b5a5672b34bdac2aa63985cd1226c569e36e7a7 Merge: 457391b038033 48ce2d722f7f1 Author: Huacai Chen Date: Wed Apr 26 11:56:37 2023 +0800 Merge 'irq/loongarch-fixes-6.4' into loongarch-next LoongArch architecture changes for 6.4 depend on the irq changes to work on "dual-bridge" systems, so merge them to create a base. commit 0cfd8703e7da687924371e9bc77a025bdeba9637 Merge: 793582ff47f8b d3f2c402e4488 Author: Linus Torvalds Date: Tue Apr 25 18:44:10 2023 -0700 Merge tag 'pm-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These update several cpufreq drivers and the cpufreq core, add sysfs interface for exposing the time really spent in the platform low-power state during suspend-to-idle, update devfreq (core and drivers) and the pm-graph suite of tools and clean up code. Specifics: - Fix the frequency unit in cpufreq_verify_current_freq checks() Sanjay Chandrashekara) - Make mode_state_machine in amd-pstate static (Tom Rix) - Make the cpufreq core require drivers with target_index() to set freq_table (Viresh Kumar) - Fix typo in the ARM_BRCMSTB_AVS_CPUFREQ Kconfig entry (Jingyu Wang) - Use of_property_read_bool() for boolean properties in the pmac32 cpufreq driver (Rob Herring) - Make the cpufreq sysfs interface return proper error codes on obviously invalid input (qinyu) - Add guided autonomous mode support to the AMD P-state driver (Wyes Karny) - Make the Intel P-state driver enable HWP IO boost on all server platforms (Srinivas Pandruvada) - Add opp and bandwidth support to tegra194 cpufreq driver (Sumit Gupta) - Use of_property_present() for testing DT property presence (Rob Herring) - Remove MODULE_LICENSE in non-modules (Nick Alcock) - Add SM7225 to cpufreq-dt-platdev blocklist (Luca Weiss) - Optimizations and fixes for qcom-cpufreq-hw driver (Krzysztof Kozlowski, Konrad Dybcio, and Bjorn Andersson) - DT binding updates for qcom-cpufreq-hw driver (Konrad Dybcio and Bartosz Golaszewski) - Updates and fixes for mediatek driver (Jia-Wei Chang and AngeloGioacchino Del Regno) - Use of_property_present() for testing DT property presence in the cpuidle code (Rob Herring) - Drop unnecessary (void *) conversions from the PM core (Li zeming) - Add sysfs files to represent time spent in a platform sleep state during suspend-to-idle and make AMD and Intel PMC drivers use them Mario Limonciello) - Use of_property_present() for testing DT property presence (Rob Herring) - Add set_required_opps() callback to the 'struct opp_table', to make the code paths cleaner (Viresh Kumar) - Update the pm-graph siute of utilities to v5.11 with the following changes: * New script which allows users to install the latest pm-graph from the upstream github repo. * Update all the dmesg suspend/resume PM print formats to be able to process recent timelines using dmesg only. * Add ethtool output to the log for the system's ethernet device if ethtool exists. * Make the tool more robustly handle events where mangled dmesg or ftrace outputs do not include all the requisite data. - Make the sleepgraph utility recognize "CPU killed" messages (Xueqin Luo) - Remove unneeded SRCU selection in Kconfig because it's always set from devfreq core (Paul E. McKenney) - Drop of_match_ptr() macro from exynos-bus.c because this driver is always using the DT table for driver probe (Krzysztof Kozlowski) - Use the preferred of_property_present() instead of the low-level of_get_property() on exynos-bus.c (Rob Herring) - Use devm_platform_get_and_ioream_resource() in exyno-ppmu.c (Yang Li)" * tag 'pm-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (44 commits) platform/x86/intel/pmc: core: Report duration of time in HW sleep state platform/x86/intel/pmc: core: Always capture counters on suspend platform/x86/amd: pmc: Report duration of time in hw sleep state PM: Add sysfs files to represent time spent in hardware sleep state cpufreq: use correct unit when verify cur freq cpufreq: tegra194: add OPP support and set bandwidth cpufreq: amd-pstate: Make varaiable mode_state_machine static PM: core: Remove unnecessary (void *) conversions cpufreq: drivers with target_index() must set freq_table PM / devfreq: exynos-ppmu: Use devm_platform_get_and_ioremap_resource() OPP: Move required opps configuration to specialized callback OPP: Handle all genpd cases together in _set_required_opps() cpufreq: qcom-cpufreq-hw: Revert adding cpufreq qos dt-bindings: cpufreq: cpufreq-qcom-hw: Add QCM2290 dt-bindings: cpufreq: cpufreq-qcom-hw: Sanitize data per compatible dt-bindings: cpufreq: cpufreq-qcom-hw: Allow just 1 frequency domain cpufreq: Add SM7225 to cpufreq-dt-platdev blocklist cpufreq: qcom-cpufreq-hw: fix double IO unmap and resource release on exit cpufreq: mediatek: Raise proc and sram max voltage for MT7622/7623 cpufreq: mediatek: raise proc/sram max voltage for MT8516 ... commit 793582ff47f8b73be8d3d925d750bf3ef79f33c7 Merge: 5e0ca0bfc33b7 4f810294e00bd Author: Linus Torvalds Date: Tue Apr 25 18:37:41 2023 -0700 Merge tag 'acpi-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These update the ACPICA code in the kernel to upstream revision 20230331, fix the ACPI SBS driver and the evaluation of the _PDC method on Xen dom0 in the ACPI processor driver, update the ACPI driver for Intel SoCs and clean up code in multiple places. Specifics: - Update the ACPICA code in the kernel to upstream revision 20230331 including the following changes: * Delete bogus node_array array of pointers from AEST table (Jessica Clarke) * Add support for trace buffer extension in GICC to the ACPI MADT parser (Xiongfeng Wang) * Add missing macro ACPI_FUNCTION_TRACE() for acpi_ns_repair_HID() (Xiongfeng Wang) * Add missing tables to astable (Pedro Falcato) * Add support for 64 bit loong_arch compilation to ACPICA (Huacai Chen) * Add support for ASPT table in disassembler to ACPICA (Jeremi Piotrowski) * Add support for Arm's MPAM ACPI table version 2 (Hesham Almatary) * Update all copyrights/signons in ACPICA to 2023 (Bob Moore) * Add support for ClockInput resource (v6.5) (Niyas Sait) * Add RISC-V INTC interrupt controller definition to the list of supported interrupt controllers for MADT (Sunil V L) * Add structure definitions for the RISC-V RHCT ACPI table (Sunil V L) * Address several cases in which the ACPICA code might lead to undefined behavior (Tamir Duberstein) * Make ACPICA code support flexible arrays properly (Kees Cook) * Check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects() (void0red) * Add os specific support for Zephyr RTOS to ACPICA (Najumon) * Update version to 20230331 (Bob Moore) - Fix evaluating the _PDC ACPI control method when running as Xen dom0 (Roger Pau Monne) - Use platform devices to load ACPI PPC and PCC drivers (Petr Pavlu) - Check for null return of devm_kzalloc() in fch_misc_setup() (Kang Chen) - Log a message if enable_irq_wake() fails for the ACPI SCI (Simon Gaiser) - Initialize the correct IOMMU fwspec while parsing ACPI VIOT (Jean-Philippe Brucker) - Amend indentation and prefix error messages with FW_BUG in the ACPI SPCR parsing code (Andy Shevchenko) - Enable ACPI sysfs support for CCEL records (Kuppuswamy Sathyanarayanan) - Make the APEI error injection code warn on invalid arguments when explicitly indicated by platform (Shuai Xue) - Add CXL error types to the error injection code in APEI (Tony Luck) - Refactor acpi_data_prop_read_single() (Andy Shevchenko) - Fix two issues in the ACPI SBS driver (Armin Wolf) - Replace ternary operator with min_t() in the generic ACPI thermal zone driver (Jiangshan Yi) - Ensure that ACPI notify handlers are not running after removal and clean up code in acpi_sb_notify() (Rafael Wysocki) - Remove register_backlight_delay module option and code and remove quirks for false-positive backlight control support advertised on desktop boards (Hans de Goede) - Replace irqdomain.h include with struct declarations in ACPI headers and update several pieces of code previously including of.h implicitly through those headers (Rob Herring) - Fix acpi_evaluate_dsm_typed() redefinition error (Kiran K) - Update the pm_profile sysfs attribute documentation (Rafael Wysocki) - Add 80862289 ACPI _HID for second PWM controller on Cherry Trail to the ACPI driver for Intel SoCs (Hans de Goede)" * tag 'acpi-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (64 commits) ACPI: LPSS: Add 80862289 ACPI _HID for second PWM controller on Cherry Trail ACPI: bus: Ensure that notify handlers are not running after removal ACPI: bus: Add missing braces to acpi_sb_notify() ACPI: video: Remove desktops without backlight DMI quirks ACPI: video: Remove register_backlight_delay module option and code ACPI: Replace irqdomain.h include with struct declarations fpga: lattice-sysconfig-spi: Add explicit include for of.h tpm: atmel: Add explicit include for of.h virtio-mmio: Add explicit include for of.h pata: ixp4xx: Add explicit include for of.h ata: pata_macio: Add explicit include of irqdomain.h serial: 8250_tegra: Add explicit include for of.h net: rfkill-gpio: Add explicit include for of.h staging: iio: resolver: ad2s1210: Add explicit include for of.h iio: adc: ad7292: Add explicit include for of.h ACPICA: Update version to 20230331 ACPICA: add os specific support for Zephyr RTOS ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects ACPICA: acpi_resource_irq: Replace 1-element arrays with flexible array ACPICA: acpi_madt_oem_data: Fix flexible array member definition ... commit 5e0ca0bfc33b7196ae3a5cbe26289a4025618f5a Merge: 4173cf6fb6b7d 5bc6b1df65c87 Author: Linus Torvalds Date: Tue Apr 25 18:32:43 2023 -0700 Merge tag 'thermal-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control updates from Rafael Wysocki: "These mostly continue to prepare the thermal control subsystem for using unified representation of trip points, which includes cleanups, code refactoring and similar and update several drivers (for other reasons), which includes new hardware support. Specifics: - Add a thermal zone 'devdata' accessor and modify several drivers to use it (Daniel Lezcano) - Prevent drivers from using the 'device' internal thermal zone structure field directly (Daniel Lezcano) - Clean up the hwmon thermal driver (Daniel Lezcano) - Add thermal zone id accessor and thermal zone type accessor and prevent drivers from using thermal zone fields directly (Daniel Lezcano) - Clean up the acerhdf and tegra thermal drivers (Daniel Lezcano) - Add lower bound check for sysfs input to the x86_pkg_temp_thermal Intel thermal driver (Zhang Rui) - Add more thermal zone device encapsulation: prevent setting structure field directly, access the sensor device instead the thermal zone's device for trace, relocate the traces in drivers/thermal (Daniel Lezcano) - Use the generic trip point for the i.MX and remove the get_trip_temp ops (Daniel Lezcano) - Use the devm_platform_ioremap_resource() in the Hisilicon driver (Yang Li) - Remove R-Car H3 ES1.* handling as public has only access to the ES2 version and the upstream support for the ES1 has been shutdown (Wolfram Sang) - Add a delay after initializing the bank in order to let the time to the hardware to initialze itself before reading the temperature (Amjad Ouled-Ameur) - Add MT8365 support (Amjad Ouled-Ameur) - Preparational cleanup and DT bindings for RK3588 support (Sebastian Reichel) - Add driver support for RK3588 (Finley Xiao) - Use devm_reset_control_array_get_exclusive() for the Rockchip driver (Ye Xingchen) - Detect power gated thermal zones and return -EAGAIN when reading the temperature (Mikko Perttunen) - Remove thermal_bind_params structure as it is unused (Zhang Rui) - Drop unneeded quotes in DT bindings allowing to run yamllint (Rob Herring) - Update the power allocator documentation according to the thermal trace relocation (Lukas Bulwahn) - Fix sensor 1 interrupt status bitmask for the Mediatek LVTS sensor (Chen-Yu Tsai) - Use the dev_err_probe() helper in the Amlogic driver (Ye Xingchen) - Add AP domain support to LVTS thermal controllers for mt8195 (Balsam CHIHI) - Remove buggy call to thermal_of_zone_unregister() (Daniel Lezcano) - Make thermal_of_zone_[un]register() private to the thermal OF code (Daniel Lezcano) - Create a private copy of the thermal zone device parameters structure when registering a thermal zone (Daniel Lezcano) - Fix a kernel NULL pointer dereference in thermal_hwmon (Zhang Rui) - Revert recent message adjustment in thermal_hwmon (Rafael Wysocki) - Use of_property_present() for testing DT property presence in thermal control code (Rob Herring) - Clean up thermal_list_lock locking in the thermal core (Rafael Wysocki) - Add DLVR support for RFIM control in the int340x Intel thermal driver (Srinivas Pandruvada)" * tag 'thermal-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (55 commits) thermal: intel: int340x: Add DLVR support for RFIM control thermal/core: Alloc-copy-free the thermal zone parameters structure thermal/of: Unexport unused OF functions thermal/drivers/bcm2835: Remove buggy call to thermal_of_zone_unregister thermal/drivers/mediatek/lvts_thermal: Add AP domain for mt8195 dt-bindings: thermal: mediatek: Add AP domain to LVTS thermal controllers for mt8195 thermal: amlogic: Use dev_err_probe() thermal/drivers/mediatek/lvts_thermal: Fix sensor 1 interrupt status bitmask MAINTAINERS: adjust entry in THERMAL/POWER_ALLOCATOR after header movement dt-bindings: thermal: Drop unneeded quotes thermal/core: Remove thermal_bind_params structure thermal/drivers/tegra-bpmp: Handle offline zones thermal/drivers/rockchip: use devm_reset_control_array_get_exclusive() dt-bindings: rockchip-thermal: Support the RK3588 SoC compatible thermal/drivers/rockchip: Support RK3588 SoC in the thermal driver thermal/drivers/rockchip: Support dynamic sized sensor array thermal/drivers/rockchip: Simplify channel id logic thermal/drivers/rockchip: Use dev_err_probe thermal/drivers/rockchip: Simplify clock logic thermal/drivers/rockchip: Simplify getting match data ... commit fa359d068574d29e7d2f0fdd0ebe4c6a12b5cfb9 Author: Hao Zeng Date: Wed Apr 26 09:05:27 2023 +0800 recordmcount: Fix memory leaks in the uwrite function Common realloc mistake: 'file_append' nulled but not freed upon failure Link: https://lkml.kernel.org/r/20230426010527.703093-1-zenghao@kylinos.cn Signed-off-by: Hao Zeng Suggested-by: Steven Rostedt Signed-off-by: Steven Rostedt (Google) commit 41d8fba193b36ac1208d8f8489390b93675fab7b Author: Beau Belgrave Date: Tue Apr 25 15:51:07 2023 -0700 tracing/user_events: Limit max fault-in attempts When event enablement changes, user_events attempts to update a bit in the user process. If a fault is hit, an attempt to fault-in the page and the write is retried if the page made it in. While this normally requires a couple attempts, it is possible a bad user process could attempt to cause infinite loops. Ensure fault-in attempts either sync or async are limited to a max of 10 attempts for each update. When the max is hit, return -EFAULT so another attempt is not made in all cases. Link: https://lkml.kernel.org/r/20230425225107.8525-5-beaub@linux.microsoft.com Suggested-by: Steven Rostedt (Google) Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 97bbce89bfdec9219dfcb60cd62b815a97cb29cb Author: Beau Belgrave Date: Tue Apr 25 15:51:06 2023 -0700 tracing/user_events: Prevent same address and bit per process User processes register an address and bit pair for events. If the same address and bit pair are registered multiple times in the same process, it can cause undefined behavior when events are enabled/disabled. When more than one are used, the bit could be turned off by another event being disabled, while the original event is still enabled. Prevent undefined behavior by checking the current mm to see if any event has already been registered for the address and bit pair. Return EADDRINUSE back to the user process if it's already being used. Update ftrace self-test to ensure this occurs properly. Link: https://lkml.kernel.org/r/20230425225107.8525-4-beaub@linux.microsoft.com Suggested-by: Doug Cook Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 17b439db21d5dbe70c419e982262621e5e6aba7f Author: Beau Belgrave Date: Tue Apr 25 15:51:05 2023 -0700 tracing/user_events: Ensure bit is cleared on unregister If an event is enabled and a user process unregisters user_events, the bit is left set. Fix this by always clearing the bit in the user process if unregister is successful. Update abi self-test to ensure this occurs properly. Link: https://lkml.kernel.org/r/20230425225107.8525-3-beaub@linux.microsoft.com Suggested-by: Doug Cook Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit cd98c93286a30cc4588dfd02453bec63c2f4acf4 Author: Beau Belgrave Date: Tue Apr 25 15:51:04 2023 -0700 tracing/user_events: Ensure write index cannot be negative The write index indicates which event the data is for and accesses a per-file array. The index is passed by user processes during write() calls as the first 4 bytes. Ensure that it cannot be negative by returning -EINVAL to prevent out of bounds accesses. Update ftrace self-test to ensure this occurs properly. Link: https://lkml.kernel.org/r/20230425225107.8525-2-beaub@linux.microsoft.com Fixes: 7f5a08c79df3 ("user_events: Add minimal support for trace_event into ftrace") Reported-by: Doug Cook Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 96928d9032a7c34f12a88df879665562bcebf59a Author: Sergey Senozhatsky Date: Sat Apr 15 19:01:10 2023 +0900 seq_buf: Add seq_buf_do_printk() helper Sometimes we use seq_buf to format a string buffer, which we then pass to printk(). However, in certain situations the seq_buf string buffer can get too big, exceeding the PRINTKRB_RECORD_MAX bytes limit, and causing printk() to truncate the string. Add a new seq_buf helper. This helper prints the seq_buf string buffer line by line, using \n as a delimiter, rather than passing the whole string buffer to printk() at once. Link: https://lkml.kernel.org/r/20230415100110.1419872-1-senozhatsky@chromium.org Cc: Andrew Morton Signed-off-by: Sergey Senozhatsky Reviewed-by: Petr Mladek Tested-by: Yosry Ahmed Signed-off-by: Steven Rostedt (Google) commit 4173cf6fb6b7d1b4569cca08af318c4561356fb5 Merge: 3361e9a4ea957 1c19ac768b8ee Author: Linus Torvalds Date: Tue Apr 25 17:43:44 2023 -0700 Merge tag 'hwmon-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "New drivers - Driver for Acbel FSB032 power supply - Driver for StarFive JH71x0 temperature sensor Added support to existing drivers: - aquacomputer_d5next: Support for Aquacomputer Aquastream XT - nct6775: Added various ASUS boards to list of boards supporting WMI - asus-ec-sensors: ROG STRIX Z390-F GAMING, ProArt B550-Creator, Notable improvements: - Regulator event and sysfs notification support for PMBus drivers Notable cleanup: - Constified pointers to hwmon_channel_info .. and various other minor bug fixes and improvements" * tag 'hwmon-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (131 commits) hwmon: lochnagar: Remove the unneeded include hwmon: (pmbus/fsp-3y) Fix functionality bitmask in FSP-3Y YM-2151E hwmon: (adt7475) Use device_property APIs when configuring polarity hwmon: (aquacomputer_d5next) Add support for Aquacomputer Aquastream XT hwmon: (it87) Disable/enable SMBus access for IT8622E chipset hwmon: (it87) Add calls to smbus_enable/smbus_disable as required hwmon: (it87) Test for error in it87_update_device hwmon: (it87) Disable SMBus access for environmental controller registers. docs: hwmon: Add documentaion for acbel-fsg032 PSU hwmon: (pmbus/acbel-fsg032) Add Acbel power supply dt-bindings: trivial-devices: Add acbel,fsg032 dt-bindings: vendor-prefixes: Add prefix for acbel hwmon: (sfctemp) Simplify error message hwmon: (pmbus/ibm-cffps) Use default debugfs attributes and lock function hwmon: (pmbus/core) Add lock and unlock functions hwmon: (pmbus/core) Request threaded interrupt with IRQF_ONESHOT hwmon: (nct6775) update ASUS WMI monitoring list A620/B760/W790 hwmon: ina2xx: add optional regulator support dt-bindings: hwmon: ina2xx: add supply property dt-bindings: hwmon: pwm-fan: Convert to DT schema ... commit 3361e9a4ea957b09c5d6242613360c415194dbb5 Merge: fe89e9b1af147 1f6fa392a9942 Author: Linus Torvalds Date: Tue Apr 25 17:38:25 2023 -0700 Merge tag 'rproc-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull remoteproc updates from Bjorn Andersson: - Unnecessary type casts from the 'void *' rproc->priv pointer are dropped throughout the subsystem. - A kernel-doc error is corrected in the Mediatek SCPI IPI implementation - The firmware loading onto the IMX DSP remote processors is reworked to avoid non-32bit memory operations. A module parameter is introduced to assist development of firmware without communication abilities in place. Error paths in imx_dsp_rproc_mbox_alloc() is cleaned up - The cluster configuration handling in the TI K3 R5 driver is corrected and support for the single-R5 core found in the TI AM62x SoC family is introduced - The TI PRU driver device- to virtual-address translation is updated to avoid compiler warning about the unsigned device-address always being larger than 0 - The ST remoteproc driver is transitioned to use of_property_present() - Issues with kicks arriving after the STM32 remote processor has been shut down are mitigated by checking the processor's state before handling them. - Support for mailbox channels for communication with the remote processors are added to the Xilinx R5 remoteproc driver. The naming of carveouts are corrected and their parsing is reworked. For this a couple of fixes targeting the mailbox subsystem are picked up here as well. - Reference counting of of_nodes are corrected in the ST, STM32, RCAR and IMX remoteproc drivers * tag 'rproc-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (24 commits) remoteproc: st: Use of_property_present() for testing DT property presence dt-bindings: remoteproc: Drop unneeded quotes remoteproc: imx_dsp_rproc: Fix kernel test robot sparse warning remoteproc: imx_dsp_rproc: Improve exception handling in imx_dsp_rproc_mbox_alloc() remoteproc: pru: Remove always true check positive unsigned value dt-bindings: remoteproc: stm32-rproc: Typo fix remoteproc: stm32_rproc: Add mutex protection for workqueue remoteproc: Remove unnecessary (void*) conversions remoteproc: imx_dsp_rproc: Call of_node_put() on iteration error remoteproc: imx_rproc: Call of_node_put() on iteration error remoteproc: rcar_rproc: Call of_node_put() on iteration error remoteproc: st: Call of_node_put() on iteration error remoteproc: stm32: Call of_node_put() on iteration error remoteproc: k3-r5: Use separate compatible string for TI AM62x SoC family dt-bindings: remoteproc: ti: Add new compatible for AM62 SoC family remoteproc: k3-r5: Simplify cluster mode setting usage remoteproc/mtk_scpi_ipi: Fix one kernel-doc comment remoteproc: xilinx: Add mailbox channels for rpmsg drivers: remoteproc: xilinx: Fix carveout names mailbox: zynqmp: Fix typo in IPI documentation ... commit fe89e9b1af14794a4df9d45b958ff1adf0b98dc1 Merge: c5c06e2780198 ba7a4754da109 Author: Linus Torvalds Date: Tue Apr 25 17:33:55 2023 -0700 Merge tag 'rpmsg-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull rpmsg updates from Bjorn Andersson: "The remove functions of the Qualcomm SMD and GLINK RPM platform drivers are transitioned to the new void returning prototype. Likewise is qcom_smd_unregister_edge() transitioned to void, as it unconditionally returned 0. An assumption about the ordering of the intent request acknowledgement and advertisement of a new intent in the GLINK implementation is corrected. Faulty error handling is corrected is improved in the TX path, and duplicated code, in the same path, is cleaned up" * tag 'rpmsg-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: rpmsg: glink: Consolidate TX_DATA and TX_DATA_CONT rpmsg: glink: Propagate TX failures in intentless mode as well rpmsg: glink: Wait for intent, not just request ack rpmsg: glink: Transition intent request signaling to wait queue rpmsg: qcom_smd: Convert to platform remove callback returning void rpmsg: qcom_glink_rpm: Convert to platform remove callback returning void rpmsg: qcom_smd: Make qcom_smd_unregister_edge() return void commit c5c06e278019892391ef4d47933796cacfec29cb Merge: eb8322d714ea9 22a4455e75be4 Author: Linus Torvalds Date: Tue Apr 25 17:29:46 2023 -0700 Merge tag 'mmc-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Allow an invalid regulator in mmc_regulator_set_ocr() - Log about empty non-removable slots - Add helpers to enable/disable the vqmmc regulator MMC host: - mtk-sd: Add support for the mt8365 variant - renesas_sdhi: Remove support for R-Car H3 ES1.* variants - sdhci_am654: Add power management support - sdhci-cadence: Add support for eMMC hardware reset - sdhci-cadence: Add support for AMD Pensando Elba variant - sdhci-msm: Add support for the IPQ5018 variant - sdhci-msm: Add support for the QCM2290 variant - sdhci-of-arasan: Skip setting clock delay for 400KHz - sdhci-of-arasan: Add support for the Xilinx Versal Net variant - sdhci-of-arasan: Remove Intel Thunder Bay SOC support - sdhci-of-arasan: Add support to request the "gate" clock - sdhci-of-dwcmshc: Properly determine max clock on Rockchip - sdhci-of-esdhc: Fix quirk to ignore command inhibit for data - sdhci-pci-o2micro: Fix SDR50 mode timing issue MEMSTICK: - r592: Fix use-after-free bug in r592_remove due to race condition" * tag 'mmc-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (40 commits) dt-bindings: mmc: sdhci-msm: Document the IPQ5018 compatible mmc: vub300: remove unreachable code mmc: sdhci-cadence: Support mmc hardware reset mmc: sdhci-cadence: Add AMD Pensando Elba SoC support mmc: sdhci-cadence: Support device specific init during probe mmc: sdhci-cadence: Enable device specific override of writel() dt-bindings: mmc: cdns: Add AMD Pensando Elba SoC mmc: core: Remove unused macro mmc_req_rel_wr mmc: sdhci-of-arasan: Skip setting clock delay for 400KHz mmc: sdhci-of-arasan: Add support for eMMC5.1 on Xilinx Versal Net platform dt-bindings: mmc: arasan,sdci: Add Xilinx Versal Net compatible mmc: sdhci_am654: Add support for PM suspend/resume mmc: core: remove unnecessary (void*) conversions dt-bindings: mmc: fsl-imx-esdhc: ref sdhci-common.yaml mmc: sdhci-of-esdhc: fix quirk to ignore command inhibit for data mmc: core: Log about empty non-removable slots dt-bindings: mmc: fujitsu: Add Socionext Synquacer mmc: sdricoh_cs: remove unused sdricoh_readw function dt-bindings: mmc: Remove bindings for Intel Thunder Bay SoC" mmc: sdhci-of-arasan: Remove Intel Thunder Bay SOC support ... commit eb8322d714ea98fdc620d682fb517b50ea282aa5 Merge: 2c96606a0f8b7 7227aacb62aeb Author: Linus Torvalds Date: Tue Apr 25 17:23:42 2023 -0700 Merge tag 'mtd/for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd updates from Miquel Raynal: "Core MTD changes: - dt-bindings: Drop unneeded quotes - mtdblock: Tolerate corrected bit-flips - Use of_property_read_bool() for boolean properties - Avoid magic values - Avoid printing error messages on probe deferrals - Prepare mtd_otp_nvmem_add() to handle -EPROBE_DEFER - Fix error path for nvmem provider - Fix nvmem error reporting - Provide unique name for nvmem device MTD device changes: - lpddr_cmds: Remove unused words variable - bcm63xxpart: Remove MODULE_LICENSE in non-modules SPI NOR core changes: - Introduce Read While Write support for flashes featuring several banks - Set the 4-Byte Address Mode method based on SFDP data - Allow post_sfdp hook to return errors - Parse SCCR MC table and introduce support for multi-chip devices SPI NOR manufacturer drivers changes: - macronix: Add support for mx25uw51245g with RWW - spansion: - Determine current address mode at runtime as it can be changed in a non-volatile way and differ from factory defaults or from what SFDP advertises. - Enable JFFS2 write buffer mode for few ECC'd NOR flashes: S25FS256T, s25hx and s28hx - Add support for s25hl02gt and s25hs02gt Raw NAND core changes: - Convert to platform remove callback returning void - Fix spelling mistake waifunc() -> waitfunc() Raw NAND controller driver changes: - imx: Remove unused is_imx51_nfc and imx53_nfc functions - omap2: Drop obsolete dependency on COMPILE_TEST - orion: Use devm_platform_ioremap_resource() - qcom: - Use of_property_present() for testing DT property presence - Use devm_platform_get_and_ioremap_resource() - stm32_fmc2: Depends on ARCH_STM32 instead of MACH_STM32MP157 - tmio: Remove reference to config MTD_NAND_TMIO in the parsers Raw NAND manufacturer driver changes: - hynix: Fix up bit 0 of sdr_timing_mode SPI-NAND changes: - Add support for ESMT F50x1G41LB" * tag 'mtd/for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (55 commits) mtd: nand: Convert to platform remove callback returning void mtd: onenand: omap2: Drop obsolete dependency on COMPILE_TEST mtd: spi-nor: spansion: Add support for s25hl02gt and s25hs02gt mtd: spi-nor: spansion: Add a new ->ready() hook for multi-chip device mtd: spi-nor: spansion: Rework cypress_nor_quad_enable_volatile() for multi-chip device support mtd: spi-nor: spansion: Rework cypress_nor_get_page_size() for multi-chip device support mtd: spi-nor: sfdp: Add support for SCCR map for multi-chip device mtd: spi-nor: Extract volatile register offset from SCCR map mtd: spi-nor: Allow post_sfdp hook to return errors mtd: spi-nor: spansion: Rename method to cypress_nor_get_page_size mtd: spi-nor: spansion: Enable JFFS2 write buffer for S25FS256T mtd: spi-nor: spansion: Enable JFFS2 write buffer for Infineon s25hx SEMPER flash mtd: spi-nor: spansion: Enable JFFS2 write buffer for Infineon s28hx SEMPER flash mtd: spi-nor: spansion: Determine current address mode mtd: spi-nor: core: Introduce spi_nor_set_4byte_addr_mode() mtd: spi-nor: core: Update flash's current address mode when changing address mode mtd: spi-nor: Stop exporting spi_nor_restore() mtd: spi-nor: Set the 4-Byte Address Mode method based on SFDP data mtd: spi-nor: core: Make spi_nor_set_4byte_addr_mode_brwr public mtd: spi-nor: core: Update name and description of spi_nor_set_4byte_addr_mode ... commit 2c96606a0f8b7900387dbeb6532b59527999834d Merge: d84955790e165 8a4adcf67a39b Author: Linus Torvalds Date: Tue Apr 25 17:18:18 2023 -0700 Merge tag 'gpio-updates-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "We have some new drivers, significant refactoring of existing intel platforms, lots of improvements all around, mass conversion to using immutable irqchips by drivers that had not been converted individually yet and some changes in the core library code. Summary: New drivers: - add a driver for the Loongson GPIO controller - add a driver for the fxl6408 I2C GPIO expander - add a GPIO module containing code common for Intel Elkhart Lake and Merrifield platforms - add a driver for the Intel Elkhart Lake platform reusing the code from the intel tangier library GPIOLIB core: - GPIO ACPI improvements - simplify gpiochip_add_data_with_keys() fwnode handling - cleanup header inclusions (remove unneeded ones, order the rest alphabetically) - remove duplicate code (reuse krealloc() instead of open-coding it, drop a duplicated check in gpiod_find_and_request()) - reshuffle the code to remove unnecessary forward declarations - coding style cleanups and improvements - add a helper for accessing device fwnodes - small updates in docs Driver improvements: - convert all remaining GPIO irqchip drivers to using immutable irqchips - drop unnecessary of_match_ptr() macro expansions - shrink the code in gpio-merrifield significantly by reusing the code from gpio-tangier + minor tweaks to the driver code - remove MODULE_LICENSE() from drivers that can only be built-in - add device-tree support to gpio-loongson1 - use new regmap features in gpio-104-dio-48e and gpio-pcie-idio-24 - minor tweaks and fixes to gpio-xra1403, gpio-sim, gpio-tegra194, gpio-omap, gpio-aspeed, gpio-raspberrypi-exp - shrink code in gpio-ich and gpio-pxa - Kconfig tweak for gpio-pmic-eic-sprd" * tag 'gpio-updates-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (99 commits) gpio: gpiolib: Simplify gpiochip_add_data_with_key() fwnode gpiolib: Add gpiochip_set_data() helper gpiolib: Move gpiochip_get_data() higher in the code gpiolib: Check array_info for NULL only once in gpiod_get_array() gpiolib: Replace open coded krealloc() gpiolib: acpi: Add a ignore wakeup quirk for Clevo NL5xNU gpiolib: acpi: Move ACPI device NULL check to acpi_get_driver_gpio_data() gpiolib: acpi: use the fwnode in acpi_gpiochip_find() gpio: mm-lantiq: Fix typo in the newly added header filename sh: mach-x3proto: Add missing #include powerpc/40x: Add missing select OF_GPIO_MM_GPIOCHIP gpio: xlp: Convert to immutable irq_chip gpio: xilinx: Convert to immutable irq_chip gpio: xgs-iproc: Convert to immutable irq_chip gpio: visconti: Convert to immutable irq_chip gpio: tqmx86: Convert to immutable irq_chip gpio: thunderx: Convert to immutable irq_chip gpio: stmpe: Convert to immutable irq_chip gpio: siox: Convert to immutable irq_chip gpio: rda: Convert to immutable irq_chip ... commit d84955790e16588774c4365ba0d449e8a2aa46d8 Merge: f5468bec213ec ed479907ff790 Author: Linus Torvalds Date: Tue Apr 25 17:13:47 2023 -0700 Merge tag 'regulator-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "A fairly quiet release, there were some cleanup and a couple of new devices but the biggest change was converting most of the drivers to use asynchronous probe. This allows us to ramp up multiple regulators in parallel during boot which can have a noticable impact on modern systems. Summary: - Update of drivers to PROBE_PREFER_ASYNCHRONOUS to mitigate issues with ramp times slowing down boots. - Convert to void remove callbacks. - Support for voltage monitoring on DA9063 - Support for Qualcomm PMC8180 and PMM8654au, Richtek RT4803 and RT5739, Rockchip RK860x" * tag 'regulator-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (46 commits) regulator: dt-bindings: qcom,rpmh: Combine PM6150L and PM8150L if-then regulator: core: Make regulator_lock_two() logic easier to follow regulator: dt-bindings: qcom,rpmh: Correct PM8550 family supplies regulator: stm32-pwr: fix of_iomap leak dt-bindings: mfd: dlg,da9063: document voltage monitoring regulator: da9063: implement setter for voltage monitoring regulator: da9063: add voltage monitoring registers regulator: fan53555: Add support for RK860X regulator: fan53555: Use dev_err_probe regulator: fan53555: Improve vsel_mask computation regulator: fan53555: Make use of the bit macros regulator: fan53555: Remove unused *_SLEW_SHIFT definitions regulator: dt-bindings: fcs,fan53555: Add support for RK860X regulator: qcom_smd: Add MP5496 S1 regulator regulator: qcom_smd: Add s1 sub-node to mp5496 regulator regulator: qcom,rpmh: add compatible for pmm8654au RPMH regulator: qcom-rpmh: add support for pmm8654au regulators regulator: core: Avoid lockdep reports when resolving supplies regulator: core: Consistently set mutex_owner when using ww_mutex_lock_slow() regulator: dt-bindings: qcom,rpmh: Add compatible for PMC8180 ... commit c7bdb07902e0b633795372665d0154e7267ecd0e Author: Beau Belgrave Date: Wed Apr 19 14:41:40 2023 -0700 tracing: Fix print_fields() for __dyn_loc/__rel_loc Both print_fields() and print_array() do not handle if dynamic data ends at the last byte of the payload for both __dyn_loc and __rel_loc field types. For __rel_loc, the offset was off by 4 bytes, leading to incorrect strings and data being printed out. In print_array() the buffer pos was missed from being advanced, which results in the first payload byte being used as the offset base instead of the field offset. Advance __rel_loc offset by 4 to ensure correct offset and advance pos to the field offset to ensure correct data is displayed when printing arrays. Change >= to > when checking if data is in-bounds, since it's valid for dynamic data to include the last byte of the payload. Example outputs for event format: field:unsigned short common_type; offset:0; size:2; signed:0; field:unsigned char common_flags; offset:2; size:1; signed:0; field:unsigned char common_preempt_count; offset:3; size:1; signed:0; field:int common_pid; offset:4; size:4; signed:1; field:__rel_loc char text[]; offset:8; size:4; signed:1; Output before: tp_rel_loc: text= Output after: tp_rel_loc: text=Test Link: https://lkml.kernel.org/r/20230419214140.4158-3-beaub@linux.microsoft.com Fixes: 80a76994b2d8 ("tracing: Add "fields" option to show raw trace event fields") Reported-by: Doug Cook Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 9872c07b14e5ad3e3a89a7fd43e9488072007118 Author: Beau Belgrave Date: Wed Apr 19 14:41:39 2023 -0700 tracing/user_events: Set event filter_type from type Users expect that events can be filtered by the kernel. User events currently sets all event fields as FILTER_OTHER which limits to binary filters only. When strings are being used, functionality is reduced. Use filter_assign_type() to find the most appropriate filter type for each field in user events to ensure full kernel capabilities. Link: https://lkml.kernel.org/r/20230419214140.4158-2-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 625ed52717603f0de4c8b5cf163a3bba5cd9a362 Author: Zheng Yejian Date: Fri Apr 14 15:17:29 2023 +0800 ring-buffer: Clearly check null ptr returned by rb_set_head_page() In error case, 'buffer_page' returned by rb_set_head_page() is NULL, currently check '&buffer_page->list' is equivalent to check 'buffer_page' due to 'list' is the first member of 'buffer_page', but suppose it is not some time, 'head_page' would be wild memory while check would be bypassed. Link: https://lore.kernel.org/linux-trace-kernel/20230414071729.57312-1-zhengyejian1@huawei.com Cc: Signed-off-by: Zheng Yejian Signed-off-by: Steven Rostedt (Google) commit f5468bec213ec2ad3f2724e3f1714b3bc7bf1515 Merge: 088e0c188513b 4a670ac3e75e5 Author: Linus Torvalds Date: Tue Apr 25 17:09:34 2023 -0700 Merge tag 'regmap-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "This is a much bigger change for regmap than is normal, the main things being the addition of some KUnit coverage and a maple tree based register cache which longer term is likely to replace the rbtree cache except possibly for very small register maps. While it's complete overkill for most applications the code for maple trees is there and there are some larger, sparser devices where the data structure is a better fit. The maple tree support is still a work in progress but already useful, there's some conversions of drivers ready to go after the merge window. Summary: - Support for shifting register addresses up as well as down, there's a use cases with memory mapped MDIO. - Refactoring of the type configuration in regmap-irq to allow access to driver data in the handler, needed by some GPIO devices. - Some initial KUnit coverage, the bulk of the driver facing API is covered but there's holes and things like the data marshalling for bytestream buses are just not covered in the slightest. - Removal of the compressed cache type, it had zero users and was getting in the way of KUnit. - Addition of a maple tree based register cache, there's more work to do but it's already useful for some devices with a flatter data structure than rbtree and getting to use all the optimisation work Liam is doing" * tag 'regmap-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: allow upshifting register addresses before performing operations regmap: Pass irq_drv_data as a parameter for set_type_config() regmap: Use mas_walk() instead of mas_find() regmap: Fix double unlock in the maple cache regmap: Add maple tree based register cache regmap: Factor out single value register syncing regmap: Add some basic kunit tests regmap: Add RAM backed register map regmap: Removed compressed cache support regmap: Support paging for buses with reg_read()/reg_write() regmap: Clarify error for unknown cache types regmap: Handle sparse caches in the default sync regmap: add a helper to translate the register address regmap: cache: Silence checkpatch warning regmap: cache: Return error in cache sync operations for REGCACHE_NONE regmap-irq: Place kernel doc of struct regmap_irq_chip in order regmap-irq: Add no_status support regmap: sdw: Remove 8-bit value size restriction regmap: sdw: Update misleading comment commit 088e0c188513b58a0056a488cf5b7df094a8a48a Merge: 07d971abf436f e578c943e363f Author: Linus Torvalds Date: Tue Apr 25 16:59:48 2023 -0700 Merge tag 'platform-drivers-x86-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Hans de Goede: - AMD PMC and PMF drivers: - Numerous bugfixes - Intel Speed Select Technology (ISST): - TPMI (Topology Aware Register and PM Capsule Interface) support for ISST support on upcoming processor models - Various other improvements / new hw support - tools/intel-speed-select: TPMI support + other improvements - Intel In Field Scan (IFS): - Add Array Bist test support - New drivers: - intel_bytcrc_pwrsrc Crystal Cove PMIC pwrsrc / reset-reason driver - lenovo-ymc Yoga Mode Control driver for reporting SW_TABLET_MODE - msi-ec Driver for MSI laptop EC features like battery charging limits - apple-gmux: - Support for new MMIO based models (T2 Macs) - Honor acpi_backlight= auto-detect-code + kernel cmdline option to switch between gmux and apple_bl backlight drivers and remove own custom handling for this - x86-android-tablets: Refactor / cleanup + new hw support - Miscellaneous other cleanups / fixes * tag 'platform-drivers-x86-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (178 commits) platform/x86: x86-android-tablets: Add accelerometer support for Yoga Tablet 2 1050/830 series platform/x86: x86-android-tablets: Add "yogabook-touch-kbd-digitizer-switch" pdev for Lenovo Yoga Book platform/x86: x86-android-tablets: Add Wacom digitizer info for Lenovo Yoga Book platform/x86: x86-android-tablets: Update Yoga Book HiDeep touchscreen comment platform/x86: thinkpad_acpi: Fix Embedded Controller access on X380 Yoga platform/x86/intel/sdsi: Change mailbox timeout platform/x86/intel/pmt: Ignore uninitialized entries platform/x86: amd: pmc: provide user message where s0ix is not supported platform/x86/amd: pmc: Fix memory leak in amd_pmc_stb_debugfs_open_v2() mlxbf-bootctl: Add sysfs file for BlueField boot fifo platform/x86: amd: pmc: Remove __maybe_unused from amd_pmc_suspend_handler() platform/x86/intel/pmc/mtl: Put GNA/IPU/VPU devices in D3 platform/x86/amd: pmc: Move out of BIOS SMN pair for STB init platform/x86/amd: pmc: Utilize SMN index 0 for driver probe platform/x86/amd: pmc: Move idlemask check into `amd_pmc_idlemask_read` platform/x86/amd: pmc: Don't dump data after resume from s0i3 on picasso platform/x86/amd: pmc: Hide SMU version and program attributes for Picasso platform/x86/amd: pmc: Don't try to read SMU version on Picasso platform/x86/amd/pmf: Move out of BIOS SMN pair for driver probe platform/x86: intel-uncore-freq: Add client processors ... commit 07d971abf436f78962ad95faafce04582b5b833a Merge: 4ea956963f4fc d184d60aa301e Author: Linus Torvalds Date: Tue Apr 25 16:56:53 2023 -0700 Merge tag 'tag-chrome-platform-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform updates from Tzung-Bi Shih: "Improvements: - Replace fake flexible arrays with flexible-array member Misc: - Minor cleanups and fixes" * tag 'tag-chrome-platform-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: wilco_ec: remove return value check of debugfs_create_dir() platform/chrome: cros_ec_debugfs: fix kernel-doc warning platform/chrome: cros_ec: Separate logic for getting panic info platform/chrome: cros_typec_switch: Add missing fwnode_handle_put() platform/chrome: cros_ec: remove unneeded label and if-condition platform/chrome: Replace fake flexible arrays with flexible-array member commit 4ea956963f4fca59050a22fcc65f00a85d586e63 Merge: c8cc58e289ed3 73b41dc51fbef Author: Linus Torvalds Date: Tue Apr 25 16:27:13 2023 -0700 Merge tag 'media/v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Removal of some old unused sensor drivers: ad9389b, m5mols, mt9m032, mt9t001, noon010pc30, s5k6aa, sr030pc30 and vs6624 - New i.MX8 image sensor interface driver - Some new RC keymaps - lots of cleanups at atomisp driver to make it support standard features present on other webcam drivers - the cx18 and saa7146 now uses VB2 - lots of cleanups and driver improvements * tag 'media/v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (460 commits) media: ov5670: Fix probe on ACPI media: nxp: imx8-isi: Remove 300ms sleep after enabling channel media: nxp: imx8-isi: Replace udelay() with fsleep() media: nxp: imx8-isi: Drop partial support for i.MX8QM and i.MX8QXP media: nxp: Add i.MX8 ISI driver media: dt-bindings: media: Add i.MX8 ISI DT bindings media: atomisp: gmin_platform: Add Lenovo Ideapad Miix 310 gmin_vars media: atomisp: gmin_platform: Make DMI quirks take precedence over the _DSM table media: atomisp: Remove struct atomisp_sub_device index field media: atomisp: Drop support for streaming from 2 sensors at once media: atomisp: Remove atomisp_try_fmt() call from atomisp_set_fmt() media: atomisp: Remove unused ATOM_ISP_MAX_WIDTH_TMP and ATOM_ISP_MAX_HEIGHT_TMP media: atomisp: Remove snr_mbus_fmt local var from atomisp_try_fmt() media: atomisp: Remove custom V4L2_CID_FMT_AUTO control media: atomisp: Remove continuous mode related code from atomisp_set_fmt() media: atomisp: Remove duplicate atomisp_[start|stop]_streaming() prototypes media: atomisp: gc0310: Switch over to ACPI powermanagement media: atomisp: gc0310: Use devm_kzalloc() for data struct media: atomisp: gc0310: Add runtime-pm support media: atomisp: gc0310: Delay power-on till streaming is started ... commit 82253a271aae9271fcf0aaa5e0ecc6dd38fb872b Author: Daniel Bristot de Oliveira Date: Fri Mar 24 20:26:42 2023 +0100 rtla/timerlat: Fix "Previous IRQ" auto analysis' line The "Previous IRQ interference" line is misaligned and without a \n, breaking the tool's output: ## CPU 12 hit stop tracing, analyzing it ## Previous IRQ interference: up to 2.22 us IRQ handler delay: 18.06 us (0.00 %) IRQ latency: 18.52 us Timerlat IRQ duration: 4.41 us (0.00 %) Blocking thread: 216.93 us (0.03 %) Fix the output: ## CPU 7 hit stop tracing, analyzing it ## Previous IRQ interference: up to 8.93 us IRQ handler delay: 0.98 us (0.00 %) IRQ latency: 2.95 us Timerlat IRQ duration: 11.26 us (0.03 %) Link: https://lore.kernel.org/linux-trace-devel/8b5819077f15ccf24745c9bf3205451e16ee32d9.1679685525.git.bristot@kernel.org Fixes: 27e348b221f6 ("rtla/timerlat: Add auto-analysis core") Cc: Masami Hiramatsu Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit 9fa48a2477de747b644c778a1e35d679cabcd917 Author: Daniel Bristot de Oliveira Date: Wed Mar 29 18:23:32 2023 +0200 rtla/timerlat: Add auto-analysis only option Parsing and formating timerlat data might consume a reasonable amount of CPU time on very large systems, or when timerlat has a too short period. Add an option to run timerlat with auto-analysis enabled while skipping the statistics parsing. In this mode, rtla timerlat periodically checks if the tracing is on, going to sleep waiting for the stop tracing condition to stop tracing, or for the tracing session to finish. If the stop tracing condition is hit, the tool prints the auto analysis. Otherwise, the tool prints the max observed latency and exit. The max observed latency is captured via tracing_max_latency. Link: https://lore.kernel.org/linux-trace-devel/4dc514d1d5dc353c537a466a9b5af44c266b6da2.1680106912.git.bristot@kernel.org Cc: Jonathan Corbet Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit 73e053cbd00ed890abfc812d6c602cbfa8d234dc Author: Colin Ian King Date: Tue Apr 18 16:00:18 2023 +0100 rv: Remove redundant assignment to variable retval Variable retval is being assigned a value that is never read, it is being re-assigned a new value in both paths of a following if statement. Remove the assignment. Cleans up clang-scan warning: kernel/trace/rv/rv.c:293:2: warning: Value stored to 'retval' is never read [deadcode.DeadStores] retval = count; Link: https://lkml.kernel.org/r/20230418150018.3123753-1-colin.i.king@gmail.com Cc: Masami Hiramatsu Signed-off-by: Colin Ian King Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit c8cc58e289ed3b5bc50258f52776cf3dfa3bad66 Merge: 736b378b29d89 289af45508ca8 Author: Linus Torvalds Date: Tue Apr 25 16:12:15 2023 -0700 Merge tag 'drm-next-2023-04-24' of git://anongit.freedesktop.org/drm/drm Pull drm updates from Dave Airlie: "There is a new Qualcomm accel driver for their QAIC, dma-fence got a deadline feature added, lots of refactoring around fbdev emulation, and the usual pre-release hw enablements from AMD and Intel and fixes everywhere. New drivers: - add QAIC acceleration driver dma-buf: - constify kobj_type structs - Reject prime DMA-Buf attachment if get_sg_table is missing. fbdev: - cmdline parser fixes - implement fbdev emulation for GEM DMA drivers - always use shadow buffer in fbdev emulation helpers dma-fence: - add deadline hint to fences - signal private stub fence core: - improve DisplayID 2.0 and EDID parsing - add gem eviction function + callback - prep to convert shmem helper to GEM resv lock - move suballocator from radeon/amdgpu to core for Xe - HPD polling fixes - Documentation improvements - Add atomic enable_plane callback - use tgid instead of pid for client tracking - DP: Add SDP Error Detection Configuration Register - Add prime import/export to vram-helper - use pci aperture helpers in more drivers panel: - Radxa 8/10HD support - Samsung AMD495QA01 support - Elida KD50T048A - Sony TD4353 - Novatek NT36523 - STARRY 2081101QFH032011-53G - B133UAN01.0 - AUO NE135FBM-N41 i915: - More MTL enabling - fix s/r problems with MEI/PXP - Implement fb_dirty for PSR,FBC,DRRS fixes - Fix eDP+DSI dual panel systems - Fix issue #6333: "list_add corruption" and full system lockup from performance monitoring - Don't use stolen memory or BAR for ring buffers on LLC platforms - Make sure DSM size has correct 1MiB granularity on Gen12+ - Whitelist COMMON_SLICE_CHICKEN3 for UMD access on Gen12+ - Add engine TLB invalidation for Meteorlake - Fix GSC races on driver load/unload on Meteorlake+ - Make kobj_type structures constant - Move fd_install after last use of fence - wm/vblank refactoring - display code refactoring - Create GSC submission targeting HDCP and PXP usages on MTL+ - Enable HDCP2.x via GSC CS - Fix context runtime accounting on sysfs fdinfo for heavy workloads - Use i915 instead of dev_priv insied the file_priv structure - Replace fake flex-array with flexible-array member amdgpu: - Make kobj structures const - Generalize dmabuf import to work with KFD - Add capped/uncapped workload handling for supported APUs - Expose additional memory stats via fdinfo - Register vga_switcheroo for apple-gmux - Initial NBIO7.9, GC 9.4.3, GFXHUB 1.2, MMHUB 1.8 support - Initial DC FAM infrastructure - Link DC backlight to connector device rather than PCI device - Add sysfs nodes for secondary VCN clocks amdkfd: - Make kobj structures const - Support for exporting buffers via dmabuf - Multi-VMA page migration fixes - initial GC 9.4.3 support radeon: - iMac fix - convert to client based fbdev emulation habanalabs: - Add opcodes to the CS ioctl to allow user to stall/resume specific engines inside Gaudi2. - INFO ioctl the amount of device memory that the driver and f/w reserve for themselves. - INFO ioctl a bit-mask of the available rotator engines - INFO ioctl the register's address of the f/w that should be used to trigger interrupts - INFO ioctl two new opcodes to fetch information on h/w and f/w events - Enable graceful reset mechanism for compute-reset. - Align to the latest firmware specs. - Enforce the release order of the compute device and dma-buf. msm: - UBWC decoder programming rework - SM8550, SM8450 bindings update - uapi C++ fix - a3xx and a4xx devfreq support - GPU and GEM updates to avoid allocations which could trigger reclaim (shrinker) in fence signaling path - dma-fence deadline hint support and wait-boost - a640/650 speed bin support cirrus: - convert to regular atomic helpers - add damage clipping mediatek: - 10-bit overlay support - mt8195 support - Only trigger DRM HPD events if bridge is attached - Change the aux retries times when receiving AUX_DEFER rockchip: - add 4K support vc4: - use drm_gem_objects virtio: - allow KMS support to be disabled - add damage clipping vmwgfx: - buffer object lifetime fixes exynos: - move MIPI DSI driver to drm bridge for iMX sharing - use kernel fbdev emulation panfrost: - add support for mali MT81xx devices - add speed binning support lima: - add usage stats tegra: - fbdev client conversion vkms: - Add primary plane positioning support" * tag 'drm-next-2023-04-24' of git://anongit.freedesktop.org/drm/drm: (1495 commits) drm/i915/dp_mst: Fix active port PLL selection for secondary MST streams drm/exynos: Implement fbdev emulation as in-kernel client drm/exynos: Initialize fbdev DRM client drm/exynos: Remove fb_helper from struct exynos_drm_private drm/exynos: Remove struct exynos_drm_fbdev drm/exynos: Remove exynos_gem from struct exynos_drm_fbdev drm/i915: Fix memory leaks in i915 selftests drm/i915: Make intel_get_crtc_new_encoder() less oopsy drm/i915/gt: Avoid out-of-bounds access when loading HuC drm/amdgpu: add some basic elements for multiple XCD case drm/amdgpu: move vmhub out of amdgpu_ring_funcs (v4) Revert "drm/amdgpu: enable ras for mp0 v13_0_10 on SRIOV" drm/amdgpu: add common ip block for GC 9.4.3 drm/amd/display: Add logging when DP link training Clock recovery is Successful drm/amdgpu: add common early init support for GC 9.4.3 drm/amdgpu: switch to v9_4_3 gfx_funcs callbacks for GC 9.4.3 drm/amd/display: Add logging when setting DP sink power state fails drm/amdkfd: Add gfx_target_version for GC 9.4.3 drm/amdkfd: Enable HW_UPDATE_RPTR on GC 9.4.3 drm/amdgpu: reserve the old gc_11_0_*_mes.bin ... commit 54a0dffa62de0c91b406ff32082a121ccfa0d7f1 Author: Colin Ian King Date: Mon Apr 24 10:47:30 2023 +0100 rv: Fix addition on an uninitialized variable 'run' The variable run is not initialized however it is being accumulated by the return value from the call to ikm_run_monitor. Fix this by initializing run to zero at the start of the function. Link: https://lkml.kernel.org/r/20230424094730.105313-1-colin.i.king@gmail.com Fixes: 4bc4b131d44c ("rv: Add rv tool") Signed-off-by: Colin Ian King Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit a99d0d5f4a53f31e0d9c8f3d03436d9709116b6b Author: Rong Tao Date: Mon Apr 24 18:46:06 2023 +0800 rtla: Add .gitignore file Add .gitignore file to ignore the rtla binary. Link: https://lore.kernel.org/linux-trace-devel/tencent_3C22A3418CD06196C2E5A84AE3EBC2281206@qq.com Signed-off-by: Rong Tao Acked-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit afed6271f5b0d78ca1a3739c1da4aa3629b26bba Author: Jens Axboe Date: Tue Mar 7 17:56:28 2023 -0700 pipe: set FMODE_NOWAIT on pipes Pipes themselves do not hold the the pipe lock across IO, and hence are safe for RWF_NOWAIT/IOCB_NOWAIT usage. The "contract" for NOWAIT is really "should not do IO under this lock", not strictly that we cannot block or that the below code is in any way atomic. Pipes fulfil that criteria. Acked-by: Dave Chinner Reviewed-by: Christian Brauner Signed-off-by: Jens Axboe commit 0f99fc513ddd28de155c58547824a9fd63daacea Author: Jens Axboe Date: Mon Apr 24 16:32:55 2023 -0600 splice: clear FMODE_NOWAIT on file if splice/vmsplice is used In preparation for pipes setting FMODE_NOWAIT on pipes to indicate that RWF_NOWAIT/IOCB_NOWAIT is fully supported, have splice and vmsplice clear that file flag. Splice holds the pipe lock around IO and cannot easily be refactored to avoid that, as splice and pipes are inherently tied together. By clearing FMODE_NOWAIT if splice is being used on a pipe, other users of the pipe will know that the pipe is no longer safe for RWF_NOWAIT and friends. Suggested-by: Linus Torvalds Signed-off-by: Jens Axboe commit 736b378b29d89c8c3567fa4b2e948be5568aebb8 Merge: 11704531dde45 ed4cdfbeb8735 Author: Linus Torvalds Date: Tue Apr 25 13:00:41 2023 -0700 Merge tag 'slab-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab Pull slab updates from Vlastimil Babka: "The main change is naturally the SLOB removal. Since its deprecation in 6.2 I've seen no complaints so hopefully SLUB_(TINY) works well for everyone and we can proceed. Besides the code cleanup, the main immediate benefit will be allowing kfree() family of function to work on kmem_cache_alloc() objects, which was incompatible with SLOB. This includes kfree_rcu() which had no kmem_cache_free_rcu() counterpart yet and now it shouldn't be necessary anymore. Besides that, there are several small code and comment improvements from Thomas, Thorsten and Vernon" * tag 'slab-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: mm/slab: document kfree() as allowed for kmem_cache_alloc() objects mm/slob: remove slob.c mm/slab: remove CONFIG_SLOB code from slab common code mm, pagemap: remove SLOB and SLQB from comments and documentation mm, page_flags: remove PG_slob_free mm/slob: remove CONFIG_SLOB mm/slub: fix help comment of SLUB_DEBUG mm: slub: make kobj_type structure constant slab: Adjust comment after refactoring of gfp.h commit 11704531dde45bc667a411e1c76de81d9f4481b8 Merge: 7ec85f3e089aa c9c8133080c75 Author: Linus Torvalds Date: Tue Apr 25 12:51:51 2023 -0700 Merge tag 'livepatching-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching updates from Petr Mladek: - Code and documentation cleanup * tag 'livepatching-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: livepatch: Make kobj_type structures constant livepatch: fix ELF typos commit 7ec85f3e089aa423a69559bf4555b6218b5a2ef7 Merge: df45da57cbd35 bee43904dc774 Author: Linus Torvalds Date: Tue Apr 25 12:46:48 2023 -0700 Merge tag 'printk-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk updates from Petr Mladek: - Code cleanup and dead code removal * tag 'printk-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk: Remove obsoleted check for non-existent "user" object lib/vsprintf: Use isodigit() for the octal number check Remove orphaned CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT commit df45da57cbd35715d590a36a12968a94508ccd1f Merge: 53b5e72b9d898 eeb3557cc188e Author: Linus Torvalds Date: Tue Apr 25 12:39:01 2023 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: "ACPI: - Improve error reporting when failing to manage SDEI on AGDI device removal Assembly routines: - Improve register constraints so that the compiler can make use of the zero register instead of moving an immediate #0 into a GPR - Allow the compiler to allocate the registers used for CAS instructions CPU features and system registers: - Cleanups to the way in which CPU features are identified from the ID register fields - Extend system register definition generation to handle Enum types when defining shared register fields - Generate definitions for new _EL2 registers and add new fields for ID_AA64PFR1_EL1 - Allow SVE to be disabled separately from SME on the kernel command-line Tracing: - Support for "direct calls" in ftrace, which enables BPF tracing for arm64 Kdump: - Don't bother unmapping the crashkernel from the linear mapping, which then allows us to use huge (block) mappings and reduce TLB pressure when a crashkernel is loaded. Memory management: - Try again to remove data cache invalidation from the coherent DMA allocation path - Simplify the fixmap code by mapping at page granularity - Allow the kfence pool to be allocated early, preventing the rest of the linear mapping from being forced to page granularity Perf and PMU: - Move CPU PMU code out to drivers/perf/ where it can be reused by the 32-bit ARM architecture when running on ARMv8 CPUs - Fix race between CPU PMU probing and pKVM host de-privilege - Add support for Apple M2 CPU PMU - Adjust the generic PERF_COUNT_HW_BRANCH_INSTRUCTIONS event dynamically, depending on what the CPU actually supports - Minor fixes and cleanups to system PMU drivers Stack tracing: - Use the XPACLRI instruction to strip PAC from pointers, rather than rolling our own function in C - Remove redundant PAC removal for toolchains that handle this in their builtins - Make backtracing more resilient in the face of instrumentation Miscellaneous: - Fix single-step with KGDB - Remove harmless warning when 'nokaslr' is passed on the kernel command-line - Minor fixes and cleanups across the board" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (72 commits) KVM: arm64: Ensure CPU PMU probes before pKVM host de-privilege arm64: kexec: include reboot.h arm64: delete dead code in this_cpu_set_vectors() arm64/cpufeature: Use helper macro to specify ID register for capabilites drivers/perf: hisi: add NULL check for name drivers/perf: hisi: Remove redundant initialized of pmu->name arm64/cpufeature: Consistently use symbolic constants for min_field_value arm64/cpufeature: Pull out helper for CPUID register definitions arm64/sysreg: Convert HFGITR_EL2 to automatic generation ACPI: AGDI: Improve error reporting for problems during .remove() arm64: kernel: Fix kernel warning when nokaslr is passed to commandline perf/arm-cmn: Fix port detection for CMN-700 arm64: kgdb: Set PSTATE.SS to 1 to re-enable single-step arm64: move PAC masks to arm64: use XPACLRI to strip PAC arm64: avoid redundant PAC stripping in __builtin_return_address() arm64/sme: Fix some comments of ARM SME arm64/signal: Alloc tpidr2 sigframe after checking system_supports_tpidr2() arm64/signal: Use system_supports_tpidr2() to check TPIDR2 arm64/idreg: Don't disable SME when disabling SVE ... commit 53b5e72b9d89853b7e622239676163ede52acffe Merge: d53c3eaaef6a0 73afb20716e16 Author: Linus Torvalds Date: Tue Apr 25 12:22:11 2023 -0700 Merge tag 'asm-generic-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic updates from Arnd Bergmann: "These are various cleanups, fixing a number of uapi header files to no longer reference CONFIG_* symbols, and one patch that introduces the new CONFIG_HAS_IOPORT symbol for architectures that provide working inb()/outb() macros, as a preparation for adding driver dependencies on those in the following release" * tag 'asm-generic-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: Kconfig: introduce HAS_IOPORT option and select it as necessary scripts: Update the CONFIG_* ignore list in headers_install.sh pktcdvd: Remove CONFIG_CDROM_PKTCDVD_WCACHE from uapi header Move bp_type_idx to include/linux/hw_breakpoint.h Move ep_take_care_of_epollwakeup() to fs/eventpoll.c Move COMPAT_ATM_ADDPARTY to net/atm/svc.c commit d53c3eaaef6a05fec04e8b5990d97d7216eb5e42 Merge: 672d2dae19012 b8a4346d25024 Author: Linus Torvalds Date: Tue Apr 25 12:11:54 2023 -0700 Merge tag 'soc-dt-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC devicetree updates from Arnd Bergmann: "The devicetree changes overall are again dominated by the Qualcomm Snapdragon platform that weighs in at over 300 changesets, but there are many updates across other platforms as well, notably Mediatek, NXP, Rockchips, Renesas, TI, Samsung and ST Microelectronics. These all add new features for existing machines, as well as new machines and SoCs. The newly added SoCs are: - Allwinner T113-s, an Cortex-A7 based variant of the RISC-V based D1 chip. - StarFive JH7110, a RISC-V SoC based on the Sifive U74 core like its JH7100 predecessor, but with additional CPU cores and a GPU. - Apple M2 as used in current Macbook Air/Pro and Mac Mini gets added, with comparable support as its M1 predecessor. - Unisoc UMS512 (Tiger T610) is a midrange smartphone SoC - Qualcomm IPQ5332 and IPQ9574 are Wi-Fi 7 networking SoCs, based on the Cortex-A53 and Cortex-A73 cores, respectively. - Qualcomm sa8775p is an automotive SoC derived from the Snapdragon family. Including the initial board support for the added SoC platforms, there are 52 new machines. The largest group are 19 boards industrial embedded boards based on the NXP i.MX6 (32-bit) and i.MX8 (64-bit) families. Others include: - Two boards based on the Allwinner f1c200s ultra-low-cost chip - Three 'Banana Pi' variants based on the Amlogic g12b (A311D, S922X) SoC. - The Gl.Inet mv1000 router based on Marvell Armada 3720 - A Wifi/LTE Dongle based on Qualcomm msm8916 - Two robotics boards based on Qualcomm QRB chips - Three Snapdragon based phones made by Xiaomi - Five developments boards based on various Rockchip SoCs, including the rk3588s-khadas-edge2 and a few NanoPi models - The AM625 Beagleplay industrial SBC Another 14 machines get removed: both boards for the obsolete 'oxnas' platform, three boards for the Renesas r8a77950 SoC that were only for pre-production chips, and various chromebook models based on the Qualcomm Sc7180 'trogdor' design that were never part of products" * tag 'soc-dt-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (836 commits) arm64: dts: rockchip: Add support for volume keys to rk3399-pinephone-pro arm64: dts: rockchip: Add vdd_cpu_big regulators to rk3588-rock-5b arm64: dts: rockchip: Use generic name for es8316 on Pinebook Pro and Rock 5B arm64: dts: rockchip: Drop RTC clock-frequency on rk3588-rock-5b arm64: dts: apple: t8112: Add PWM controller arm64: dts: apple: t600x: Add PWM controller arm64: dts: apple: t8103: Add PWM controller arm64: dts: rockchip: Add pinctrl gpio-ranges for rk356x ARM: dts: nomadik: Replace deprecated spi-gpio properties ARM: dts: aspeed-g6: Add UDMA node ARM: dts: aspeed: greatlakes: add mctp device ARM: dts: aspeed: greatlakes: Add gpio names ARM: dts: aspeed: p10bmc: Change power supply info arm64: dts: mediatek: mt6795-xperia-m5: Add Bosch BMM050 Magnetometer arm64: dts: mediatek: mt6795-xperia-m5: Add Bosch BMA255 Accelerometer arm64: dts: mediatek: mt6795: Add tertiary PWM node arm64: dts: rockchip: add panel to Anbernic RG353 series dt-bindings: arm: Add Data Modul i.MX8M Plus eDM SBC dt-bindings: arm: fsl: Add chargebyte Tarragon dt-bindings: vendor-prefixes: add chargebyte ... commit 672d2dae19012cb2c40fdf36711ee3b5f5420724 Merge: a907047732470 2c25b94f881cf Author: Linus Torvalds Date: Tue Apr 25 12:09:54 2023 -0700 Merge tag 'soc-defconfig-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC defconfig updates from Arnd Bergmann: "Most of the changes just enable additional device drivers that were added or that are often used on major platforms. The virtconfig added last time now disables additional drivers to shrink kernels for virtual machines. The obsolete oxnas_v6_defconfig file is removed in turn" * tag 'soc-defconfig-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (33 commits) ARM: config: Update Vexpress defconfig arm64: defconfig: enable building the nvmem-reboot-mode module arm64: defconfig: Enable TI ADC driver arm64: defconfig: Enable TI TSCADC driver arm64: defconfig: Enable security accelerator driver for TI K3 SoCs arm64: defconfig: Enable crypto test module ARM: multi_v7_defconfig: Add OPTEE support ARM: configs: Update U8500 defconfig ARM: imx_v4_v5_defconfig: Build CONFIG_IMX_SDMA as module arm64: defconfig: Enable IPQ9574 SoC base configs ARM: imx_v6_v7_defconfig: Enable Tarragon peripheral drivers arm64: defconfig: Enable ARM CoreSight PMU driver arm64: defconfig: remove duplicate TYPEC_UCSI & QCOM_PMIC_GLINK ARM: configs: remove oxnas_v6_defconfig arm64: defconfig: Enable audio drivers for AM62-SK arm64: defconfig: Enable drivers for BeaglePlay ARM: imx_v6_v7_defconfig: Select CONFIG_DRM_I2C_NXP_TDA998X arm64: defconfig: Enable Virtio RNG driver as built in arm64: defconfig: Enable CAN PHY transceiver driver arm64: defconfig: add PMIC GLINK modules ... commit a907047732470f75f3b7c9a8ee09b16765b8364c Merge: 18032df5ef5c0 4c87f3ff78b20 Author: Linus Torvalds Date: Tue Apr 25 12:02:16 2023 -0700 Merge tag 'soc-drivers-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC driver updates from Arnd Bergmann: "The most notable updates this time are for Qualcomm Snapdragon platforms. The Inline-Crypto-Engine gets a new DT binding and driver, and a number of drivers now support additional Snapdragon variants, in particular the rsc, scm, geni, bwm, glink and socinfo, while the llcc (edac) and rpm drivers get notable functionality updates. Updates on other platforms include: - Various updates to the Mediatek mutex and mmsys drivers, including support for the Helio X10 SoC - Support for unidirectional mailbox channels in Arm SCMI firmware - Support for per cpu asynchronous notification in OP-TEE firmware - Minor updates for memory controller drivers. - Minor updates for Renesas, TI, Amlogic, Apple, Broadcom, Tegra, Allwinner, Versatile Express, Canaan, Microchip, Mediatek and i.MX SoC drivers, mainly updating the use of MODULE_LICENSE() macros and obsolete DT driver interfaces" * tag 'soc-drivers-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (165 commits) soc: ti: smartreflex: Simplify getting the opam_sr pointer bus: vexpress-config: Add explicit of_platform.h include soc: mediatek: Kconfig: Add MTK_CMDQ dependency to MTK_MMSYS memory: mtk-smi: mt8365: Add SMI Support dt-bindings: memory-controllers: mediatek,smi-larb: add mt8365 dt-bindings: memory-controllers: mediatek,smi-common: add mt8365 memory: tegra: read values from correct device dt-bindings: crypto: Add Qualcomm Inline Crypto Engine soc: qcom: Make the Qualcomm UFS/SDCC ICE a dedicated driver dt-bindings: firmware: document Qualcomm QCM2290 SCM soc: qcom: rpmh-rsc: Support RSC v3 minor versions soc: qcom: smd-rpm: Use GFP_ATOMIC in write path soc/tegra: fuse: Remove nvmem root only access soc/tegra: cbb: tegra194: Use of_address_count() helper soc/tegra: cbb: Remove MODULE_LICENSE in non-modules ARM: tegra: Remove MODULE_LICENSE in non-modules soc/tegra: flowctrl: Use devm_platform_get_and_ioremap_resource() soc: tegra: cbb: Drop empty platform remove function firmware: arm_scmi: Add support for unidirectional mailbox channels dt-bindings: firmware: arm,scmi: Support mailboxes unidirectional channels ... commit 18032df5ef5c0eec2adf120142bd95a3a8807866 Merge: de10553fce407 bd2c0c4452eea Author: Linus Torvalds Date: Tue Apr 25 11:53:09 2023 -0700 Merge tag 'soc-arm-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC updates from Arnd Bergmann: "The Oxford Semiconductor OX810/OX820 'Oxnas' platform gets retired after the ARM11MPcore processor keeps causing problems in certain corner cases. OX820 was the only remaining SoC with this core after CNS3xxx got retired, and its driver support was never completely merged upstream. The Arm 'Realview' reference platform still supports ARM11MPCore in principle, but this was never a product, and the CPU support will get cleaned up later on. Another series updates the mv78xx0 platform, which has been similarly neglected for a while, but should work properly again now. The other changes are minor cleanups across platforms, mostly converting code to more modern interfaces for DT nodes and removing some more code as a follow-up to the large-scale platform removal in linux-6.3" * tag 'soc-arm-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (28 commits) ARM: mv78xx0: fix entries for gpios, buttons and usb ports ARM: mv78xx0: add code to enable XOR and CRYPTO engines on mv78xx0 ARM: mv78xx0: set the correct driver for the i2c RTC ARM: mv78xx0: adjust init logic for ts-wxl to reflect single core dev soc: fsl: Use of_property_present() for testing DT property presence ARM: pxa: Use of_property_read_bool() for boolean properties firmware: turris-mox-rwtm: make kobj_type structure constant ARM: oxnas: remove OXNAS support ARM: sh-mobile: Use of_cpu_node_to_id() to read CPU node 'reg' ARM: OMAP2+: hwmod: Use kzalloc for allocating only one element ARM: OMAP2+: Remove the unneeded result variable ARM: OMAP2+: fix repeated words in comments ARM: OMAP2+: remove obsolete config OMAP3_SDRC_AC_TIMING ARM: OMAP2+: Use of_address_to_resource() ARM: OMAP2+: Use of_property_read_bool() for boolean properties ARM: omap1: remove redundant variables err ARM: omap1: Kconfig: Fix indentation ARM: bcm: Use of_address_to_resource() ARM: mstar: remove unused config MACH_MERCURY ARM: spear: remove obsolete config MACH_SPEAR600 ... commit a9863979fbc25838bbe7c5badf538cedfc802f60 Merge: c19c6c7b44c69 80e9552e843b2 Author: Stephen Boyd Date: Tue Apr 25 11:52:39 2023 -0700 Merge branch 'clk-imx' into clk-next * clk-imx: (25 commits) clk: imx: imx8ulp: update clk flag for system critical clock clk: imx: imx8ulp: Add tpm5 clock as critical gate clock clk: imx: imx8ulp: keep MU0_B clock enabled always clk: imx: imx8ulp: Add divider closest support to get more accurate clock rate clk: imx: imx8ulp: Fix XBAR_DIVBUS and AD_SLOW clock parents clk: imx: imx93: Add nic and A55 clk dt-bindings: clock: imx93: add NIC, A55 and ARM PLL CLK clk: imx: imx93: add mcore_booted module paratemter clk: imx: fracn-gppll: Add 300MHz freq support for imx9 clk: imx: fracn-gppll: support integer pll clk: imx: fracn-gppll: disable hardware select control clk: imx: fracn-gppll: fix the rate table clk: imx: imx8mp: change the 'nand_usdhc_bus' clock to non-critical clk: imx: imx8mp: Add LDB root clock dt-bindings: clock: imx8mp: Add LDB clock entry clk: imx: imx8mp: correct DISP2 pixel clock type clk: imx: drop duplicated macro clk: imx: clk-gpr-mux: Provide clock name in error message clk: imx: Let IMX8MN_CLK_DISP_PIXEL set parent rate clk: imx8mm: Let IMX8MM_CLK_LCDIF_PIXEL set parent rate ... commit c19c6c7b44c69faa7a18ef79e758f580b144fd8f Merge: 1a86e99fa00a6 27a6e1b09a782 ef382228d25a9 0818c8d46948d ea90f303e8c19 Author: Stephen Boyd Date: Tue Apr 25 11:52:25 2023 -0700 Merge branches 'clk-of', 'clk-samsung', 'clk-rockchip' and 'clk-qcom' into clk-next * clk-of: clk: add missing of_node_put() in "assigned-clocks" property parsing * clk-samsung: clk: samsung: exynos850: Make PMU_ALIVE_PCLK critical clk: samsung: Convert to platform remove callback returning void clk: samsung: exynos5433: Extract PM support to common ARM64 layer clk: samsung: Extract parent clock enabling to common function clk: samsung: Extract clocks registration to common function clk: samsung: exynos850: Add AUD and HSI main gate clocks clk: samsung: exynos850: Implement CMU_G3D domain clk: samsung: clk-pll: Implement pll0818x PLL type clk: samsung: Set dev in samsung_clk_init() clk: samsung: Don't pass reg_base to samsung_clk_register_pll() clk: samsung: Remove np argument from samsung_clk_init() dt-bindings: clock: exynos850: Add AUD and HSI main gate clocks dt-bindings: clock: exynos850: Add Exynos850 CMU_G3D * clk-rockchip: clk: rockchip: rk3588: make gate linked clocks critical clk: rockchip: rk3399: allow clk_cifout to force clk_cifout_src to reparent * clk-qcom: (57 commits) clk: qcom: gcc-sc8280xp: Add EMAC GDSCs clk: qcom: dispcc-qcm2290: Remove inexistent DSI1PHY clk clk: qcom: add the GPUCC driver for sa8775p dt-bindings: clock: qcom: describe the GPUCC clock for SA8775P clk: qcom: gcc-sm8350: fix PCIe PIPE clocks handling clk: qcom: lpassaudiocc-sc7280: Add required gdsc power domain clks in lpass_cc_sc7280_desc clk: qcom: lpasscc-sc7280: Skip qdsp6ss clock registration dt-bindings: clock: qcom,sc7280-lpasscc: Add qcom,adsp-pil-mode property clk: qcom: rpm: Use managed `of_clk_add_hw_provider()` clk: qcom: Add Global Clock Controller driver for IPQ9574 dt-bindings: clock: Add ipq9574 clock and reset definitions clk: qcom: gpucc-sm6375: Configure CX_GDSC disable wait value clk: qcom: gcc-sm6115: Mark RCGs shared where applicable clk: qcom: dispcc-qcm2290: Add MDSS_CORE reset dt-bindings: clock: dispcc-qcm2290: Add MDSS_CORE reset clk: qcom: apss-ipq-pll: add support for IPQ5332 dt-bindings: clock: qcom,a53pll: add IPQ5332 compatible clk: qcom: apss-ipq-pll: refactor the driver to accommodate different PLL types dt-bindings: mailbox: qcom,apcs-kpss-global: fix SDX55 'if' match dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks ... commit 1a86e99fa00a6284c9419043493246d38ad3357f Merge: caca6ad3670e6 c19d966e11c45 14e985482111a c0e19528439db Author: Stephen Boyd Date: Tue Apr 25 11:50:49 2023 -0700 Merge branches 'clk-starfive', 'clk-fractional' and 'clk-devmof' into clk-next - Shrink size of clk_fractional_divider a little - Convert various clk drivers to devm_of_clk_add_hw_provider() * clk-starfive: clk: starfive: Delete the redundant dev_set_drvdata() in JH7110 clock drivers clk: starfive: Avoid casting iomem pointers MAINTAINERS: generalise StarFive clk/reset entries reset: starfive: Add StarFive JH7110 reset driver clk: starfive: Add StarFive JH7110 always-on clock driver clk: starfive: Add StarFive JH7110 system clock driver reset: starfive: jh71x0: Use 32bit I/O on 32bit registers reset: starfive: Rename "jh7100" to "jh71x0" for the common code reset: starfive: Extract the common JH71X0 reset code reset: starfive: Factor out common JH71X0 reset code reset: Create subdirectory for StarFive drivers reset: starfive: Replace SOC_STARFIVE with ARCH_STARFIVE clk: starfive: Rename "jh7100" to "jh71x0" for the common code clk: starfive: Rename clk-starfive-jh7100.h to clk-starfive-jh71x0.h clk: starfive: Factor out common JH7100 and JH7110 code clk: starfive: Replace SOC_STARFIVE with ARCH_STARFIVE dt-bindings: clock: Add StarFive JH7110 always-on clock and reset generator dt-bindings: clock: Add StarFive JH7110 system clock and reset generator * clk-fractional: clk: Remove mmask and nmask fields in struct clk_fractional_divider clk: rockchip: Remove values for mmask and nmask in struct clk_fractional_divider clk: imx: Remove values for mmask and nmask in struct clk_fractional_divider clk: Compute masks for fractional_divider clk when needed. * clk-devmof: clk: uniphier: Use managed `of_clk_add_hw_provider()` clk: si5351: Use managed `of_clk_add_hw_provider()` clk: si570: Use managed `of_clk_add_hw_provider()` clk: si514: Use managed `of_clk_add_hw_provider()` clk: lmk04832: Use managed `of_clk_add_hw_provider()` clk: hsdk-pll: Use managed `of_clk_add_hw_provider()` clk: cdce706: Use managed `of_clk_add_hw_provider()` clk: axs10x: Use managed `of_clk_add_hw_provider()` clk: axm5516: Use managed `of_clk_add_hw_provider()` clk: axi-clkgen: Use managed `of_clk_add_hw_provider()` commit caca6ad3670e6163c51dd7c53c1c679638de0f4e Merge: 6f7478e3bb289 595c88cda65d3 ba7c8d2700adf ce1c5f840fb7c Author: Stephen Boyd Date: Tue Apr 25 11:50:36 2023 -0700 Merge branches 'clk-xilinx', 'clk-broadcom' and 'clk-platform' into clk-next - BCM63268 timer clock and reset controller - Convert platform clk drivers to remove_new * clk-xilinx: clocking-wizard: Support higher frequency accuracy clk: zynqmp: pll: Remove the limit * clk-broadcom: clk: bcm: Add BCM63268 timer clock and reset driver dt-bindings: clock: Add BCM63268 timer binding dt-bindings: reset: add BCM63268 timer reset definitions dt-bindings: clk: add BCM63268 timer clock definitions * clk-platform: (25 commits) clk: xilinx: Convert to platform remove callback returning void clk: x86: Convert to platform remove callback returning void clk: uniphier: Convert to platform remove callback returning void clk: ti: Convert to platform remove callback returning void clk: tegra: Convert to platform remove callback returning void clk: stm32: Convert to platform remove callback returning void clk: mvebu: Convert to platform remove callback returning void clk: mmp: Convert to platform remove callback returning void clk: keystone: Convert to platform remove callback returning void clk: hisilicon: Convert to platform remove callback returning void clk: stm32mp1: Convert to platform remove callback returning void clk: scpi: Convert to platform remove callback returning void clk: s2mps11: Convert to platform remove callback returning void clk: pwm: Convert to platform remove callback returning void clk: palmas: Convert to platform remove callback returning void clk: hsdk-pll: Convert to platform remove callback returning void clk: fixed-rate: Convert to platform remove callback returning void clk: fixed-mmio: Convert to platform remove callback returning void clk: fixed-factor: Convert to platform remove callback returning void clk: axm5516: Convert to platform remove callback returning void ... commit 6f7478e3bb2894309ebef08fac91ec896ce667d8 Merge: 4ec6a2f957bfc cb9eee590a773 d54c1fd4a51e8 acc0ccffec502 3dc6faa3ab026 Author: Stephen Boyd Date: Tue Apr 25 11:50:08 2023 -0700 Merge branches 'clk-mediatek', 'clk-sunplus', 'clk-loongson' and 'clk-socfpga' into clk-next - Frequency Hopping (FHCTL) on MediaTek MT6795, MT8173, MT8192 and MT8195 SoCs - Converted most Mediatek clock drivers to struct platform_driver - MediaTek clock drivers can be built as modules - Mediatek MT8188 SoC clk drivers - Clock driver for Sunplus SP7021 SoC - Reimplement Loongson-1 clk driver with DT support - Clk driver support for Loongson-2 SoCs - Migrate socfpga clk driver to of_clk_add_hw_provider() * clk-mediatek: (84 commits) clk: mediatek: fhctl: Mark local variables static clk: mediatek: Use right match table, include mod_devicetable clk: mediatek: Add MT8188 adsp clock support clk: mediatek: Add MT8188 imp i2c wrapper clock support clk: mediatek: Add MT8188 wpesys clock support clk: mediatek: Add MT8188 vppsys1 clock support clk: mediatek: Add MT8188 vppsys0 clock support clk: mediatek: Add MT8188 vencsys clock support clk: mediatek: Add MT8188 vdosys1 clock support clk: mediatek: Add MT8188 vdosys0 clock support clk: mediatek: Add MT8188 vdecsys clock support clk: mediatek: Add MT8188 mfgcfg clock support clk: mediatek: Add MT8188 ipesys clock support clk: mediatek: Add MT8188 imgsys clock support clk: mediatek: Add MT8188 ccusys clock support clk: mediatek: Add MT8188 camsys clock support clk: mediatek: Add MT8188 infrastructure clock support clk: mediatek: Add MT8188 peripheral clock support clk: mediatek: Add MT8188 topckgen clock support clk: mediatek: Add MT8188 apmixedsys clock support ... * clk-sunplus: clk: Add Sunplus SP7021 clock driver * clk-loongson: clk: clk-loongson2: add clock controller driver support dt-bindings: clock: add loongson-2 boot clock index MAINTAINERS: remove obsolete file entry in MIPS/LOONGSON1 ARCHITECTURE MIPS: loongson32: Update the clock initialization clk: loongson1: Re-implement the clock driver clk: loongson1: Remove the outdated driver dt-bindings: clock: Add Loongson-1 clock * clk-socfpga: clk: socfpga: arria10: use of_clk_add_hw_provider and improve error handling clk: socfpga: use of_clk_add_hw_provider and improve error handling clk: socfpga: arria10: use of_clk_add_hw_provider and improve error handling clk: socfpga: use of_clk_add_hw_provider and improve error handling clk: socfpga: arria10: use of_clk_add_hw_provider and improve error handling clk: socfpga: use of_clk_add_hw_provider and improve error handling commit 4ec6a2f957bfc14be69da171f749dab8b7b18be5 Merge: eeac8ede17557 7455b7007b9e9 ced8a02b34522 f1d97a37f975a 6aa252ae88883 edc12763a3a29 Author: Stephen Boyd Date: Tue Apr 25 11:49:50 2023 -0700 Merge branches 'clk-cleanup', 'clk-aspeed', 'clk-dt', 'clk-renesas' and 'clk-skyworks' into clk-next - Support for i3c clks on Aspeed ast2600 SoCs - Clock driver for Skyworks Si521xx I2C PCIe clock generators * clk-cleanup: clk: microchip: fix potential UAF in auxdev release callback clk: sifive: make SiFive clk drivers depend on ARCH_ symbols clk: stm32h7: Remove an unused field in struct stm32_fractional_divider clk: tegra20: fix gcc-7 constant overflow warning clock: milbeaut: use devm_platform_get_and_ioremap_resource() clk: Print an info line before disabling unused clocks clk: ti: Use of_address_to_resource() clk: remove unnecessary (void*) conversions clk: at91: clk-sam9x60-pll: fix return value check clk: visconti: remove unused visconti_pll_provider::regmap * clk-aspeed: dt-bindings: clock: ast2600: Expand comment on reset definitions clk: ast2600: Add comment about combined clock + reset handling dt-bindings: clock: ast2600: remove IC36 & I3C7 clock definitions clk: ast2600: Add full configs for I3C clocks dt-bindings: clock: ast2600: Add top-level I3C clock clk: ast2600: allow empty entries in aspeed_g6_gates * clk-dt: clk: mediatek: clk-pllfh: fix missing of_node_put() in fhctl_parse_dt() clk: Use of_property_present() for testing DT property presence * clk-renesas: clk: renesas: r8a77980: Add I2C5 clock clk: rs9: Add support for 9FGV0441 clk: rs9: Support device specific dif bit calculation dt-bindings: clk: rs9: Add 9FGV0441 clk: rs9: Check for vendor/device ID clk: renesas: Convert to platform remove callback returning void clk: renesas: r9a06g032: Improve clock tables clk: renesas: r9a06g032: Document structs clk: renesas: r9a06g032: Drop unused fields clk: renesas: r9a06g032: Improve readability clk: renesas: r8a77980: Add Z2 clock clk: renesas: r8a77970: Add Z2 clock clk: renesas: r8a77995: Fix VIN parent clock clk: renesas: r8a77980: Add VIN clocks clk: renesas: r8a779g0: Add VIN clocks clk: renesas: r8a779g0: Add ISPCS clocks clk: renesas: r8a779g0: Add CSI-2 clocks clk: renesas: r8a779g0: Add thermal clock clk: renesas: r8a779g0: Add Audio clocks clk: renesas: cpg-mssr: Update MSSR register range for R-Car V4H * clk-skyworks: clk: si521xx: Clock driver for Skyworks Si521xx I2C PCIe clock generators dt-bindings: clk: si521xx: Add Skyworks Si521xx I2C PCIe clock generators commit de10553fce40797313f980301af45e7398e422ca Merge: e7989789c686e 5af507bef93c0 Author: Linus Torvalds Date: Tue Apr 25 11:39:45 2023 -0700 Merge tag 'x86-apic-2023-04-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 APIC updates from Thomas Gleixner: - Fix the incorrect handling of atomic offset updates in reserve_eilvt_offset() The check for the return value of atomic_cmpxchg() is not compared against the old value, it is compared against the new value, which makes it two round on success. Convert it to atomic_try_cmpxchg() which does the right thing. - Handle IO/APIC less systems correctly When IO/APIC is not advertised by ACPI then the computation of the lower bound for dynamically allocated interrupts like MSI goes wrong. This lower bound is used to exclude the IO/APIC legacy GSI space as that must stay reserved for the legacy interrupts. In case that the system, e.g. VM, does not advertise an IO/APIC the lower bound stays at 0. 0 is an invalid interrupt number except for the legacy timer interrupt on x86. The return value is unchecked in the core code, so it ends up to allocate interrupt number 0 which is subsequently considered to be invalid by the caller, e.g. the MSI allocation code. A similar problem was already cured for device tree based systems years ago, but that missed - or did not envision - the zero IO/APIC case. Consolidate the zero check and return the provided "from" argument to the core code call site, which is guaranteed to be greater than 0. - Simplify the X2APIC cluster CPU mask logic for CPU hotplug Per cluster CPU masks are required for X2APIC in cluster mode to determine the correct cluster for a target CPU when calculating the destination for IPIs These masks are established when CPUs are borught up. The first CPU in a cluster must allocate a new cluster CPU mask. As this happens during the early startup of a CPU, where memory allocations cannot be done, the mask has to be allocated by the control CPU. The current implementation allocates a clustermask just in case and if the to be brought up CPU is the first in a cluster the CPU takes over this allocation from a global pointer. This works nicely in the fully serialized CPU bringup scenario which is used today, but would fail completely for parallel bringup of CPUs. The cluster association of a CPU can be computed from the APIC ID which is enumerated by ACPI/MADT. So the cluster CPU masks can be preallocated and associated upfront and the upcoming CPUs just need to set their corresponding bit. Aside of preparing for parallel bringup this is a valuable simplification on its own. - Remove global variables which control the early startup of secondary CPUs on 64-bit The only information which is needed by a starting CPU is the Linux CPU number. The CPU number allows it to retrieve the rest of the required data from already existing per CPU storage. So instead of initial_stack, early_gdt_desciptor and initial_gs provide a new variable smpboot_control which contains the Linux CPU number for now. The starting CPU can retrieve and compute all required information for startup from there. Aside of being a cleanup, this is also preparing for parallel CPU bringup, where starting CPUs will look up their Linux CPU number via the APIC ID, when smpboot_control has the corresponding control bit set. - Make cc_vendor globally accesible Subsequent parallel bringup changes require access to cc_vendor because confidental computing platforms need special treatment in the early startup phase vs. CPUID and APCI ID readouts. The change makes cc_vendor global and provides stub accessors in case that CONFIG_ARCH_HAS_CC_PLATFORM is not set. This was merged from the x86/cc branch in anticipation of further parallel bringup commits which require access to cc_vendor. Due to late discoveries of fundamental issue with those patches these commits never happened. The merge commit is unfortunately in the middle of the APIC commits so unraveling it would have required a rebase or revert. As the parallel bringup seems to be well on its way for 6.5 this would be just pointless churn. As the commit does not contain any functional change it's not a risk to keep it. * tag 'x86-apic-2023-04-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ioapic: Don't return 0 from arch_dynirq_lower_bound() x86/apic: Fix atomic update of offset in reserve_eilvt_offset() x86/coco: Export cc_vendor x86/smpboot: Reference count on smpboot_setup_warm_reset_vector() x86/smpboot: Remove initial_gs x86/smpboot: Remove early_gdt_descr on 64-bit x86/smpboot: Remove initial_stack on 64-bit x86/apic/x2apic: Allow CPU cluster_mask to be populated in parallel commit e7989789c686e83f032acf2c4363c2c153876b96 Merge: 3f614ab563c44 f7abf14f0001a Author: Linus Torvalds Date: Tue Apr 25 11:22:46 2023 -0700 Merge tag 'timers-core-2023-04-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timers and timekeeping updates from Thomas Gleixner: - Improve the VDSO build time checks to cover all dynamic relocations VDSO does not allow dynamic relocations, but the build time check is incomplete and fragile. It's based on architectures specifying the relocation types to search for and does not handle R_*_NONE relocation entries correctly. R_*_NONE relocations are injected by some GNU ld variants if they fail to determine the exact .rel[a]/dyn_size to cover trailing zeros. R_*_NONE relocations must be ignored by dynamic loaders, so they should be ignored in the build time check too. Remove the architecture specific relocation types to check for and validate strictly that no other relocations than R_*_NONE end up in the VSDO .so file. - Prefer signal delivery to the current thread for CLOCK_PROCESS_CPUTIME_ID based posix-timers Such timers prefer to deliver the signal to the main thread of a process even if the context in which the timer expires is the current task. This has the downside that it might wake up an idle thread. As there is no requirement or guarantee that the signal has to be delivered to the main thread, avoid this by preferring the current task if it is part of the thread group which shares sighand. This not only avoids waking idle threads, it also distributes the signal delivery in case of multiple timers firing in the context of different threads close to each other better. - Align the tick period properly (again) For a long time the tick was starting at CLOCK_MONOTONIC zero, which allowed users space applications to either align with the tick or to place a periodic computation so that it does not interfere with the tick. The alignement of the tick period was more by chance than by intention as the tick is set up before a high resolution clocksource is installed, i.e. timekeeping is still tick based and the tick period advances from there. The early enablement of sched_clock() broke this alignement as the time accumulated by sched_clock() is taken into account when timekeeping is initialized. So the base value now(CLOCK_MONOTONIC) is not longer a multiple of tick periods, which breaks applications which relied on that behaviour. Cure this by aligning the tick starting point to the next multiple of tick periods, i.e 1000ms/CONFIG_HZ. - A set of NOHZ fixes and enhancements: * Cure the concurrent writer race for idle and IO sleeptime statistics The statitic values which are exposed via /proc/stat are updated from the CPU local idle exit and remotely by cpufreq, but that happens without any form of serialization. As a consequence sleeptimes can be accounted twice or worse. Prevent this by restricting the accumulation writeback to the CPU local idle exit and let the remote access compute the accumulated value. * Protect idle/iowait sleep time with a sequence count Reading idle/iowait sleep time, e.g. from /proc/stat, can race with idle exit updates. As a consequence the readout may result in random and potentially going backwards values. Protect this by a sequence count, which fixes the idle time statistics issue, but cannot fix the iowait time problem because iowait time accounting races with remote wake ups decrementing the remote runqueues nr_iowait counter. The latter is impossible to fix, so the only way to deal with that is to document it properly and to remove the assertion in the selftest which triggers occasionally due to that. * Restructure struct tick_sched for better cache layout * Some small cleanups and a better cache layout for struct tick_sched - Implement the missing timer_wait_running() callback for POSIX CPU timers For unknown reason the introduction of the timer_wait_running() callback missed to fixup posix CPU timers, which went unnoticed for almost four years. While initially only targeted to prevent livelocks between a timer deletion and the timer expiry function on PREEMPT_RT enabled kernels, it turned out that fixing this for mainline is not as trivial as just implementing a stub similar to the hrtimer/timer callbacks. The reason is that for CONFIG_POSIX_CPU_TIMERS_TASK_WORK enabled systems there is a livelock issue independent of RT. CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y moves the expiry of POSIX CPU timers out from hard interrupt context to task work, which is handled before returning to user space or to a VM. The expiry mechanism moves the expired timers to a stack local list head with sighand lock held. Once sighand is dropped the task can be preempted and a task which wants to delete a timer will spin-wait until the expiry task is scheduled back in. In the worst case this will end up in a livelock when the preempting task and the expiry task are pinned on the same CPU. The timer wheel has a timer_wait_running() mechanism for RT, which uses a per CPU timer-base expiry lock which is held by the expiry code and the task waiting for the timer function to complete blocks on that lock. This does not work in the same way for posix CPU timers as there is no timer base and expiry for process wide timers can run on any task belonging to that process, but the concept of waiting on an expiry lock can be used too in a slightly different way. Add a per task mutex to struct posix_cputimers_work, let the expiry task hold it accross the expiry function and let the deleting task which waits for the expiry to complete block on the mutex. In the non-contended case this results in an extra mutex_lock()/unlock() pair on both sides. This avoids spin-waiting on a task which is scheduled out, prevents the livelock and cures the problem for RT and !RT systems * tag 'timers-core-2023-04-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: posix-cpu-timers: Implement the missing timer_wait_running callback selftests/proc: Assert clock_gettime(CLOCK_BOOTTIME) VS /proc/uptime monotonicity selftests/proc: Remove idle time monotonicity assertions MAINTAINERS: Remove stale email address timers/nohz: Remove middle-function __tick_nohz_idle_stop_tick() timers/nohz: Add a comment about broken iowait counter update race timers/nohz: Protect idle/iowait sleep time under seqcount timers/nohz: Only ever update sleeptime from idle exit timers/nohz: Restructure and reshuffle struct tick_sched tick/common: Align tick period with the HZ tick. selftests/timers/posix_timers: Test delivery of signals across threads posix-timers: Prefer delivery of signals to the current thread vdso: Improve cmd_vdso_check to check all dynamic relocations commit 3f614ab563c44fa443cbb6a7f355bdd04a5a4450 Merge: 15bbeec0fe9f1 f37202aa6e5d6 Author: Linus Torvalds Date: Tue Apr 25 11:16:08 2023 -0700 Merge tag 'irq-core-2023-04-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull interrupt updates from Thomas Gleixner: "Core: - Add tracepoints for tasklet callbacks which makes it possible to analyze individual tasklet functions instead of guess working from the overall duration of tasklet processing - Ensure that secondary interrupt threads have their affinity adjusted correctly Drivers: - A large rework of the RISC-V IPI management to prepare for a new RISC-V interrupt architecture - Small fixes and enhancements all over the place - Removal of support for various obsolete hardware platforms and the related code" * tag 'irq-core-2023-04-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits) irqchip/st: Remove stih415/stih416 and stid127 platforms support irqchip/gic-v3: Add Rockchip 3588001 erratum workaround genirq: Update affinity of secondary threads softirq: Add trace points for tasklet entry/exit irqchip/loongson-pch-pic: Fix pch_pic_acpi_init calling irqchip/loongson-pch-pic: Fix registration of syscore_ops irqchip/loongson-eiointc: Fix registration of syscore_ops irqchip/loongson-eiointc: Fix incorrect use of acpi_get_vec_parent irqchip/loongson-eiointc: Fix returned value on parsing MADT irqchip/riscv-intc: Add empty irq_eoi() for chained irq handlers RISC-V: Use IPIs for remote icache flush when possible RISC-V: Use IPIs for remote TLB flush when possible RISC-V: Allow marking IPIs as suitable for remote FENCEs RISC-V: Treat IPIs as normal Linux IRQs irqchip/riscv-intc: Allow drivers to directly discover INTC hwnode RISC-V: Clear SIP bit only when using SBI IPI operations irqchip/irq-sifive-plic: Add syscore callbacks for hibernation irqchip: Use of_property_read_bool() for boolean properties irqchip/bcm-6345-l1: Request memory region irqchip/gicv3: Workaround for NVIDIA erratum T241-FABRIC-4 ... commit 15bbeec0fe9f1e910cb6a173005a02b6b4582f3c Merge: 29e95a4b2686b 8c8fa605f7b8b Author: Linus Torvalds Date: Tue Apr 25 11:05:04 2023 -0700 Merge tag 'core-entry-2023-04-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core entry/ptrace update from Thomas Gleixner: "Provide a ptrace set/get interface for syscall user dispatch. The main purpose is to enable checkpoint/restore (CRIU) to handle processes which utilize syscall user dispatch correctly" * tag 'core-entry-2023-04-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: selftest, ptrace: Add selftest for syscall user dispatch config api ptrace: Provide set/get interface for syscall user dispatch syscall_user_dispatch: Untag selector address before access_ok() syscall_user_dispatch: Split up set_syscall_user_dispatch() commit 29e95a4b2686b2cfb5564b3fb31371d5f71c6b66 Merge: bc1bb2a49bae9 63a759694eed6 Author: Linus Torvalds Date: Tue Apr 25 11:00:45 2023 -0700 Merge tag 'core-debugobjects-2023-04-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core debugobjects update from Thomas Gleixner: "A single update to debugobjects: Prevent a race vs statically initialized objects. Such objects are usually not initialized via an init() function. They are special cased and detected on first use under the assumption that they are already correctly initialized via the static initializer. This works correctly unless there are two concurrent debug object operations on such an object. The first one detects that the object is not yet tracked and tries to establish a tracking object after dropping the debug objects hash bucket lock. The concurrent operation does the same. The one which wins the race ends up modifying the state of the object which makes the other one fail resulting in a bogus debug objects warning. Prevent this by making the detection of a static object and the allocation of a tracking object atomic under the hash bucket lock. So the first one to acquire the hash bucket lock will succeed and the second one will observe the correct tracking state. This race existed forever but was only exposed when the timer wheel code added a debug_object_assert_init() call outside of the timer base locked region. This replaced the previous warning about timer::function being NULL which had to be removed when the timer_shutdown() mechanics were added" * tag 'core-debugobjects-2023-04-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobject: Prevent init race with static objects commit bc1bb2a49bae915107fd58705edb1e32db92c635 Merge: c42b59bfaa009 812b0597fb404 Author: Linus Torvalds Date: Tue Apr 25 10:48:08 2023 -0700 Merge tag 'x86_sev_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 SEV updates from Borislav Petkov: - Add the necessary glue so that the kernel can run as a confidential SEV-SNP vTOM guest on Hyper-V. A vTOM guest basically splits the address space in two parts: encrypted and unencrypted. The use case being running unmodified guests on the Hyper-V confidential computing hypervisor - Double-buffer messages between the guest and the hardware PSP device so that no partial buffers are copied back'n'forth and thus potential message integrity and leak attacks are possible - Name the return value the sev-guest driver returns when the hw PSP device hasn't been called, explicitly - Cleanups * tag 'x86_sev_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/hyperv: Change vTOM handling to use standard coco mechanisms init: Call mem_encrypt_init() after Hyper-V hypercall init is done x86/mm: Handle decryption/re-encryption of bss_decrypted consistently Drivers: hv: Explicitly request decrypted in vmap_pfn() calls x86/hyperv: Reorder code to facilitate future work x86/ioremap: Add hypervisor callback for private MMIO mapping in coco VM x86/sev: Change snp_guest_issue_request()'s fw_err argument virt/coco/sev-guest: Double-buffer messages crypto: ccp: Get rid of __sev_platform_init_locked()'s local function pointer crypto: ccp - Name -1 return value as SEV_RET_NO_FW_CALL commit c42b59bfaa0091833b6758be772c54ec7183daa5 Merge: 4a4a28fca6966 11af36cb89812 Author: Linus Torvalds Date: Tue Apr 25 10:32:51 2023 -0700 Merge tag 'x86_paravirt_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 paravirt updates from Borislav Petkov: - Convert a couple of paravirt callbacks to asm to prevent '-fzero-call-used-regs' builds from zeroing live registers because paravirt hides the CALLs from the compiler so latter doesn't know there's a CALL in the first place - Merge two paravirt callbacks into one, as their functionality is identical * tag 'x86_paravirt_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/paravirt: Convert simple paravirt functions to asm x86/paravirt: Merge activate_mm() and dup_mmap() callbacks commit 4a4a28fca6966ff2aee7d8313db6defcc8fcf70b Merge: e3420f98f8984 5910f06503aae Author: Linus Torvalds Date: Tue Apr 25 10:27:02 2023 -0700 Merge tag 'x86_misc_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 updates from Borislav Petkov: - Add a x86 hw vulnerabilities section to MAINTAINERS so that the folks involved in it can get CCed on patches - Add some more CPUID leafs to the kcpuid tool and extend its functionality to be more useful when grepping for CPUID bits * tag 'x86_misc_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: MAINTAINERS: Add x86 hardware vulnerabilities section tools/x86/kcpuid: Dump the CPUID function in detailed view tools/x86/kcpuid: Update AMD leaf Fn80000001 tools/x86/kcpuid: Fix avx512bw and avx512lvl fields in Fn00000007 commit e3420f98f8984c4ffde72e6a877bccbcc9cad6b6 Merge: 1699dbebf31f0 36168bc061b43 Author: Linus Torvalds Date: Tue Apr 25 10:20:52 2023 -0700 Merge tag 'x86_cpu_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu model updates from Borislav Petkov: - Add Emerald Rapids to the list of Intel models supporting PPIN - Finally use a CPUID bit for split lock detection instead of enumerating every model - Make sure automatic IBRS is set on AMD, even though the AP bringup code does that now by replicating the MSR which contains the switch * tag 'x86_cpu_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Add Xeon Emerald Rapids to list of CPUs that support PPIN x86/split_lock: Enumerate architectural split lock disable bit x86/CPU/AMD: Make sure EFER[AIBRSE] is set commit 1699dbebf31f0b26a8408d24da3c7f3b113f0340 Merge: d3464152e541b 22767544e9763 Author: Linus Torvalds Date: Tue Apr 25 10:05:00 2023 -0700 Merge tag 'x86_acpi_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 ACPI update from Borislav Petkov: - Improve code generation in ACPI's global lock's acquisition function * tag 'x86_acpi_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ACPI/boot: Improve __acpi_acquire_global_lock commit d3464152e541b08fdc3c60664c01a28f8844a655 Merge: e94ee641f9cef 4c1cdec319b9a Author: Linus Torvalds Date: Tue Apr 25 09:56:33 2023 -0700 Merge tag 'ras_core_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS updates from Borislav Petkov: - Just cleanups and fixes this time around: make threshold_ktype const, an objtool fix and use proper size for a bitmap * tag 'ras_core_for_v6.4_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/MCE/AMD: Use an u64 for bank_map x86/mce: Always inline old MCA stubs x86/MCE/AMD: Make kobj_type structure constant commit e94ee641f9cef2502adfe5e0c264b271420c7ab5 Merge: f7301270a29fb ce8ac91130b96 Author: Linus Torvalds Date: Tue Apr 25 09:44:07 2023 -0700 Merge tag 'edac_updates_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Borislav Petkov: - skx_edac: Fix overflow when decoding 32G DIMM ranks - i10nm_edac: Add Sierra Forest support - amd64_edac: Split driver code between legacy and SMCA systems. The final goal is adding support for more hw, like GPUs - The usual minor cleanups and fixes * tag 'edac_updates_for_v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: (25 commits) EDAC/i10nm: Add Intel Sierra Forest server support EDAC/amd64: Fix indentation in umc_determine_edac_cap() EDAC/altera: Remove MODULE_LICENSE in non-module EDAC: Sanitize MODULE_AUTHOR strings EDAC/amd81[13]1: Remove trailing newline from MODULE_AUTHOR EDAC/amd64: Add get_err_info() to pvt->ops EDAC/amd64: Split dump_misc_regs() into dct/umc functions EDAC/amd64: Split init_csrows() into dct/umc functions EDAC/amd64: Split determine_edac_cap() into dct/umc functions EDAC/amd64: Rename f17h_determine_edac_ctl_cap() EDAC/amd64: Split setup_mci_misc_attrs() into dct/umc functions EDAC/amd64: Split ecc_enabled() into dct/umc functions EDAC/amd64: Split read_mc_regs() into dct/umc functions EDAC/amd64: Split determine_memory_type() into dct/umc functions EDAC/amd64: Split read_base_mask() into dct/umc functions EDAC/amd64: Split prep_chip_selects() into dct/umc functions EDAC/amd64: Rework hw_info_{get,put} EDAC/amd64: Merge struct amd64_family_type into struct amd64_pvt EDAC/amd64: Do not discover ECC symbol size for Family 17h and later EDAC/amd64: Drop dbam_to_cs() for Family 17h and later ... commit f7301270a29fb3b5b2f3ab73ef63a208e21f783a Merge: 173ea743bf7a9 aaee8c7f2a17d Author: Linus Torvalds Date: Tue Apr 25 09:37:43 2023 -0700 Merge tag 'm68k-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - defconfig updates - miscellaneous fixes and improvements * tag 'm68k-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: kexec: Include m68k: defconfig: Update defconfigs for v6.3-rc1 m68k: Remove obsolete config NO_KERNEL_MSG nubus: Drop noop match function commit cc5f6fa4f6590e3b9eb8d34302ea43af4a3cfed7 Author: Dhruva Gole Date: Mon Apr 24 15:55:46 2023 +0530 spi: bcm63xx: use macro DEFINE_SIMPLE_DEV_PM_OPS Using this macro makes the code more readable. It also inits the members of dev_pm_ops in the following manner without us explicitly needing to: .suspend = bcm63xx_spi_suspend, \ .resume = bcm63xx_spi_resume, \ .freeze = bcm63xx_spi_suspend, \ .thaw = bcm63xx_spi_resume, \ .poweroff = bcm63xx_spi_suspend, \ .restore = bcm63xx_spi_resume Signed-off-by: Dhruva Gole Link: https://lore.kernel.org/r/20230424102546.1604484-1-d-gole@ti.com Signed-off-by: Mark Brown commit 3f89ac587baa0c0460c977d1596e16f950815f05 Author: Chaitanya Kulkarni Date: Mon Apr 24 16:46:28 2023 -0700 block/drivers: remove dead clear of random flag QUEUE_FLAG_ADD_RANDOM is not set before we clear it for "null_blk", "brd", "nbd", "zram", and "bcache" since by default we don't set "QUEUE_FLAG_ADD_RANDOM" to MQ ops. Remove dead clear of QUEUE_FLAG_ADD_RANDOM in above listed drivers. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sergey Senozhatsky #zram Link: https://lore.kernel.org/r/20230424234628.45544-2-kch@nvidia.com Signed-off-by: Jens Axboe commit 38c8e3dfb2a1be863b7f5aad7755d5e9727da8a5 Author: Ming Lei Date: Tue Apr 25 11:41:54 2023 +0800 block: sync part's ->bd_has_submit_bio with disk's submit_bio() always uses bio->bi_bdev->bd_has_submit_bio to decide if disk's ->submit_bio() is called, and bio->bi_bdev could point to one partition device. So we have to sync part bdev's ->bd_has_submit_bio with disk's. Reported-by: Changhui Zhong Link: https://lore.kernel.org/linux-block/ZEdItaPqif8fp85H@ovpn-8-24.pek2.redhat.com/T/#t Fixes: 9f4107b07b17 ("block: store bdev->bd_disk->fops->submit_bio state in bdev") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230425034154.110099-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit c915d8f5918bea7c3962b09b8884ca128bfd9b0c Author: Jan Kara Date: Mon Apr 24 18:32:19 2023 +0200 inotify: Avoid reporting event with invalid wd When inotify_freeing_mark() races with inotify_handle_inode_event() it can happen that inotify_handle_inode_event() sees that i_mark->wd got already reset to -1 and reports this value to userspace which can confuse the inotify listener. Avoid the problem by validating that wd is sensible (and pretend the mark got removed before the event got generated otherwise). CC: stable@vger.kernel.org Fixes: 7e790dd5fc93 ("inotify: fix error paths in inotify_update_watch") Message-Id: <20230424163219.9250-1-jack@suse.cz> Reported-by: syzbot+4a06d4373fd52f0b2f9c@syzkaller.appspotmail.com Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara commit cbfac7707ba16619006a4fd60faac46303fd2f3e Author: Juergen Gross Date: Fri Dec 16 14:49:18 2022 +0100 xen/blkback: move blkif_get_x86_*_req() into blkback.c There is no need to have the functions blkif_get_x86_32_req() and blkif_get_x86_64_req() in a header file, as they are used in one place only. So move them into the using source file and drop the inline qualifier. While at it fix some style issues, and simplify the code by variable reusing and using min() instead of open coding it. Instead of using barrier() use READ_ONCE() for avoiding multiple reads of nr_segments. Signed-off-by: Juergen Gross Acked-by: Roger Pau Monné Signed-off-by: Juergen Gross commit e7b4c07d4b42676691f3c815f05c1bbf071dc718 Author: Juergen Gross Date: Mon Dec 12 10:37:42 2022 +0100 xen/blkback: simplify free_persistent_gnts() interface The interface of free_persistent_gnts() can be simplified, as there is only a single caller of free_persistent_gnts() and the 2nd and 3rd parameters are easily obtainable via the ring pointer, which is passed as the first parameter anyway. Signed-off-by: Juergen Gross Acked-by: Roger Pau Monné Signed-off-by: Juergen Gross commit 656f3c1d7966ea65f9b51d17db3008ce5dbb4090 Author: Juergen Gross Date: Mon Dec 12 09:43:28 2022 +0100 xen/blkback: remove stale prototype There is no function xen_blkif_purge_persistent(), so remove its prototype from common.h. Signed-off-by: Juergen Gross Acked-by: Roger Pau Monné Signed-off-by: Juergen Gross commit 6935321eccf32555e6f7e6d29f4cccf84a5c1e3a Author: Juergen Gross Date: Mon Dec 12 09:41:34 2022 +0100 xen/blkback: fix white space code style issues Signed-off-by: Juergen Gross Acked-by: Roger Pau Monné Signed-off-by: Juergen Gross commit 644f6bf762fa903f64c59c2ec0f4d0d753527053 Author: Bob Peterson Date: Fri Apr 21 15:07:10 2023 -0400 gfs2: gfs2_ail_empty_gl no log flush on error Before this patch, function gfs2_ail_empty_gl called gfs2_log_flush even in cases where it encountered an error. It should probably skip the log flush and leave the file system in an inconsistent state, letting a subsequent withdraw force the journal to be replayed to reestablish metadata consistency. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit b97e583caa25abf95695cd06d7f9512b484c6c01 Author: Bob Peterson Date: Fri Apr 21 15:07:09 2023 -0400 gfs2: Issue message when revokes cannot be written Before this patch, function gfs2_ail_empty_gl would silently return an error to the caller. This would get silently set into sd_log_error which would cause a withdraw, but there was no indication why the file system was withdrawn. This patch adds a fs_err to log the appropriate error message. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 68ca088dc1cfc4e366811b11ffe2954c6dcebca1 Author: Bob Peterson Date: Fri Apr 21 15:07:08 2023 -0400 gfs2: Perform second log flush in gfs2_make_fs_ro Before this patch, function gfs2_make_fs_ro called gfs2_log_flush once to finalize the log. However, if there's dirty metadata, log flushes tend to sync the metadata and formulate revokes. Before this patch, those revokes may not be written out to the journal immediately, which meant unresolved glocks could still have revokes in their ail lists. When the glock worker runs, it tries to transition the glock, but the unresolved revokes in the ail still need to be written, so it tries to start a transaction. It's impossible to start a transaction because at that point, the SDF_JOURNAL_LIVE flag has been cleared by gfs2_make_fs_ro. That causes the glock worker to fail, unable to write the revokes. The calling sequence looked something like this: gfs2_make_fs_ro gfs2_log_flush - with GFS2_LOG_HEAD_FLUSH_SHUTDOWN flag set if (flags & GFS2_LOG_HEAD_FLUSH_SHUTDOWN) clear_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags); ...meanwhile... glock_work_func do_xmote rgrp_go_sync (or possibly inode_go_sync) ... gfs2_ail_empty_gl __gfs2_trans_begin if (unlikely(!test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags))) { ... return -EROFS; The previous patch in the series ("gfs2: return errors from gfs2_ail_empty_gl") now causes the transaction error to no longer be ignored, so it causes a warning from MOST of the xfstests: WARNING: CPU: 11 PID: X at fs/gfs2/super.c:603 gfs2_put_super [gfs2] which corresponds to: WARN_ON(gfs2_withdrawing(sdp)); The withdraw was triggered silently from do_xmote by: if (unlikely(sdp->sd_log_error && !gfs2_withdrawn(sdp))) gfs2_withdraw_delayed(sdp); This patch adds a second log_flush to gfs2_make_fs_ro: one to sync the data and one to sync any outstanding revokes and finalize the journal. Note that both of these log flushes need to be "special," in other words, not GFS2_LOG_HEAD_FLUSH_NORMAL. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 24ab15829867a9cc09dfd16f41ed75aa8272a45f Author: Bob Peterson Date: Fri Apr 21 15:07:07 2023 -0400 gfs2: return errors from gfs2_ail_empty_gl Before this patch, function gfs2_ail_empty_gl did not return errors it encountered from __gfs2_trans_begin. Those errors usually came from the fact that the file system was made read-only, often due to unmount (but theoretically could be due to -o remount,ro), which prevented the transaction from starting. The inability to start a transaction prevented its revokes from being properly written to the journal for glocks during unmount (and transition to ro). That meant glocks could be unlocked without the metadata properly revoked in the journal. So other nodes could grab the glock thinking that their lvb values were correct, but in fact corresponded to the glock without its revokes properly synced. That presented as lvb mismatch errors. This patch allows gfs2_ail_empty_gl to return the error properly to the caller. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 37386669887d3f2ccf021322c5558353d20f2387 Author: Basavaraj Natikar Date: Mon Apr 24 21:34:06 2023 +0530 HID: amd_sfh: Fix max supported HID devices commit 4bd763568dbd ("HID: amd_sfh: Support for additional light sensor") adds additional sensor devices, but forgets to add the number of HID devices to match. Thus, the number of HID devices does not match the actual number of sensors. In order to prevent corruption and system hangs when more than the allowed number of HID devices are accessed, the number of HID devices is increased accordingly. Fixes: 4bd763568dbd ("HID: amd_sfh: Support for additional light sensor") Link: https://bugzilla.kernel.org/show_bug.cgi?id=217354 Signed-off-by: Basavaraj Natikar Link: https://lore.kernel.org/r/20230424160406.2579888-1-Basavaraj.Natikar@amd.com Signed-off-by: Benjamin Tissoires commit 28b17f6270f182e22cdad5a0fdc4979031e4486a Author: wuych Date: Tue Apr 25 13:15:32 2023 +0800 net: phy: marvell-88x2222: remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: wuych Signed-off-by: David S. Miller commit 50749f2dd6854a41830996ad302aef2ffaf011d8 Author: Kuniyuki Iwashima Date: Mon Apr 24 15:20:22 2023 -0700 tcp/udp: Fix memleaks of sk and zerocopy skbs with TX timestamp. syzkaller reported [0] memory leaks of an UDP socket and ZEROCOPY skbs. We can reproduce the problem with these sequences: sk = socket(AF_INET, SOCK_DGRAM, 0) sk.setsockopt(SOL_SOCKET, SO_TIMESTAMPING, SOF_TIMESTAMPING_TX_SOFTWARE) sk.setsockopt(SOL_SOCKET, SO_ZEROCOPY, 1) sk.sendto(b'', MSG_ZEROCOPY, ('127.0.0.1', 53)) sk.close() sendmsg() calls msg_zerocopy_alloc(), which allocates a skb, sets skb->cb->ubuf.refcnt to 1, and calls sock_hold(). Here, struct ubuf_info_msgzc indirectly holds a refcnt of the socket. When the skb is sent, __skb_tstamp_tx() clones it and puts the clone into the socket's error queue with the TX timestamp. When the original skb is received locally, skb_copy_ubufs() calls skb_unclone(), and pskb_expand_head() increments skb->cb->ubuf.refcnt. This additional count is decremented while freeing the skb, but struct ubuf_info_msgzc still has a refcnt, so __msg_zerocopy_callback() is not called. The last refcnt is not released unless we retrieve the TX timestamped skb by recvmsg(). Since we clear the error queue in inet_sock_destruct() after the socket's refcnt reaches 0, there is a circular dependency. If we close() the socket holding such skbs, we never call sock_put() and leak the count, sk, and skb. TCP has the same problem, and commit e0c8bccd40fc ("net: stream: purge sk_error_queue in sk_stream_kill_queues()") tried to fix it by calling skb_queue_purge() during close(). However, there is a small chance that skb queued in a qdisc or device could be put into the error queue after the skb_queue_purge() call. In __skb_tstamp_tx(), the cloned skb should not have a reference to the ubuf to remove the circular dependency, but skb_clone() does not call skb_copy_ubufs() for zerocopy skb. So, we need to call skb_orphan_frags_rx() for the cloned skb to call skb_copy_ubufs(). [0]: BUG: memory leak unreferenced object 0xffff88800c6d2d00 (size 1152): comm "syz-executor392", pid 264, jiffies 4294785440 (age 13.044s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 cd af e8 81 00 00 00 00 ................ 02 00 07 40 00 00 00 00 00 00 00 00 00 00 00 00 ...@............ backtrace: [<0000000055636812>] sk_prot_alloc+0x64/0x2a0 net/core/sock.c:2024 [<0000000054d77b7a>] sk_alloc+0x3b/0x800 net/core/sock.c:2083 [<0000000066f3c7e0>] inet_create net/ipv4/af_inet.c:319 [inline] [<0000000066f3c7e0>] inet_create+0x31e/0xe40 net/ipv4/af_inet.c:245 [<000000009b83af97>] __sock_create+0x2ab/0x550 net/socket.c:1515 [<00000000b9b11231>] sock_create net/socket.c:1566 [inline] [<00000000b9b11231>] __sys_socket_create net/socket.c:1603 [inline] [<00000000b9b11231>] __sys_socket_create net/socket.c:1588 [inline] [<00000000b9b11231>] __sys_socket+0x138/0x250 net/socket.c:1636 [<000000004fb45142>] __do_sys_socket net/socket.c:1649 [inline] [<000000004fb45142>] __se_sys_socket net/socket.c:1647 [inline] [<000000004fb45142>] __x64_sys_socket+0x73/0xb0 net/socket.c:1647 [<0000000066999e0e>] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [<0000000066999e0e>] do_syscall_64+0x38/0x90 arch/x86/entry/common.c:80 [<0000000017f238c1>] entry_SYSCALL_64_after_hwframe+0x63/0xcd BUG: memory leak unreferenced object 0xffff888017633a00 (size 240): comm "syz-executor392", pid 264, jiffies 4294785440 (age 13.044s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 2d 6d 0c 80 88 ff ff .........-m..... backtrace: [<000000002b1c4368>] __alloc_skb+0x229/0x320 net/core/skbuff.c:497 [<00000000143579a6>] alloc_skb include/linux/skbuff.h:1265 [inline] [<00000000143579a6>] sock_omalloc+0xaa/0x190 net/core/sock.c:2596 [<00000000be626478>] msg_zerocopy_alloc net/core/skbuff.c:1294 [inline] [<00000000be626478>] msg_zerocopy_realloc+0x1ce/0x7f0 net/core/skbuff.c:1370 [<00000000cbfc9870>] __ip_append_data+0x2adf/0x3b30 net/ipv4/ip_output.c:1037 [<0000000089869146>] ip_make_skb+0x26c/0x2e0 net/ipv4/ip_output.c:1652 [<00000000098015c2>] udp_sendmsg+0x1bac/0x2390 net/ipv4/udp.c:1253 [<0000000045e0e95e>] inet_sendmsg+0x10a/0x150 net/ipv4/af_inet.c:819 [<000000008d31bfde>] sock_sendmsg_nosec net/socket.c:714 [inline] [<000000008d31bfde>] sock_sendmsg+0x141/0x190 net/socket.c:734 [<0000000021e21aa4>] __sys_sendto+0x243/0x360 net/socket.c:2117 [<00000000ac0af00c>] __do_sys_sendto net/socket.c:2129 [inline] [<00000000ac0af00c>] __se_sys_sendto net/socket.c:2125 [inline] [<00000000ac0af00c>] __x64_sys_sendto+0xe1/0x1c0 net/socket.c:2125 [<0000000066999e0e>] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [<0000000066999e0e>] do_syscall_64+0x38/0x90 arch/x86/entry/common.c:80 [<0000000017f238c1>] entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: f214f915e7db ("tcp: enable MSG_ZEROCOPY") Fixes: b5947e5d1e71 ("udp: msg_zerocopy") Reported-by: syzbot Signed-off-by: Kuniyuki Iwashima Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit d325c34d9e7e38d371c0a299d415e9b07f66a1fb Author: Gencen Gan Date: Mon Apr 24 23:28:01 2023 +0800 net: amd: Fix link leak when verifying config failed After failing to verify configuration, it returns directly without releasing link, which may cause memory leak. Paolo Abeni thinks that the whole code of this driver is quite "suboptimal" and looks unmainatained since at least ~15y, so he suggests that we could simply remove the whole driver, please take it into consideration. Simon Horman suggests that the fix label should be set to "Linux-2.6.12-rc2" considering that the problem has existed since the driver was introduced and the commit above doesn't seem to exist in net/net-next. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Gan Gecen Reviewed-by: Dongliang Mu Signed-off-by: David S. Miller commit 5fc46f94219d1d103ffb5f0832be9da674d85a73 Author: Martin Willi Date: Tue Apr 25 09:46:18 2023 +0200 Revert "Fix XFRM-I support for nested ESP tunnels" This reverts commit b0355dbbf13c0052931dd14c38c789efed64d3de. The reverted commit clears the secpath on packets received via xfrm interfaces to support nested IPsec tunnels. This breaks Netfilter policy matching using xt_policy in the FORWARD chain, as the secpath is missing during forwarding. Additionally, Benedict Wong reports that it breaks Transport-in-Tunnel mode. Fix this regression by reverting the commit until we have a better approach for nested IPsec tunnels. Fixes: b0355dbbf13c ("Fix XFRM-I support for nested ESP tunnels") Link: https://lore.kernel.org/netdev/20230412085615.124791-1-martin@strongswan.org/ Signed-off-by: Martin Willi Signed-off-by: Steffen Klassert commit 73b41dc51fbeffa4a216b20193274cfe92b5d95b Author: Sakari Ailus Date: Wed Mar 29 15:57:50 2023 +0100 media: ov5670: Fix probe on ACPI devm_clk_get() will return either an error or NULL, which the driver handles, continuing to use the clock of reading the value of the clock-frequency property. However, the value of ov5670->xvclk is left as-is and the other clock framework functions aren't capable of handling error values. Use devm_clk_get_optional() to obtain NULL instead of -ENOENT. Fixes: 8004c91e2095 ("media: i2c: ov5670: Use common clock framework") Signed-off-by: Sakari Ailus Reviewed-by: Jacopo Mondi Signed-off-by: Mauro Carvalho Chehab commit e5c23bec0f121b4160dc8ca61e751e734652bd05 Author: Geert Uytterhoeven Date: Thu Mar 23 11:22:59 2023 +0100 sh: Replace by As arch/sh/include/uapi/asm/types.h doesn't exist, sh doesn't provide any sh-specific uapi definitions, and it can just include , like most other architectures. Signed-off-by: Geert Uytterhoeven Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/26932016c83c2ad350db59f5daf96117a38bbbd8.1679566927.git.geert@linux-m68k.org Signed-off-by: John Paul Adrian Glaubitz commit 8bc6666f13fe1971cb870e5e0c3082435e3caa9c Author: Geert Uytterhoeven Date: Thu Mar 23 11:18:07 2023 +0100 sh: Use generic GCC library routines The C implementations of __ashldi3(), __ashrdi3__(), and __lshrdi3() in arch/sh/lib/ are identical to the generic C implementations in lib/. Reduce duplication by switching SH to the generic versions. Update the include path in arch/sh/boot/compressed accordingly. Signed-off-by: Geert Uytterhoeven Acked-by: Palmer Dabbelt Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/74dbe68dc8e2ffb6180092f73723fe21ab692c7a.1679566500.git.geert+renesas@glider.be Signed-off-by: John Paul Adrian Glaubitz commit c5749639f2d0a1f6cbe187d05f70c2e7c544d748 Author: Zheng Wang Date: Thu Apr 13 11:34:22 2023 +0800 scsi: qedi: Fix use after free bug in qedi_remove() In qedi_probe() we call __qedi_probe() which initializes &qedi->recovery_work with qedi_recovery_handler() and &qedi->board_disable_work with qedi_board_disable_work(). When qedi_schedule_recovery_handler() is called, schedule_delayed_work() will finally start the work. In qedi_remove(), which is called to remove the driver, the following sequence may be observed: Fix this by finishing the work before cleanup in qedi_remove(). CPU0 CPU1 |qedi_recovery_handler qedi_remove | __qedi_remove | iscsi_host_free | scsi_host_put | //free shost | |iscsi_host_for_each_session |//use qedi->shost Cancel recovery_work and board_disable_work in __qedi_remove(). Fixes: 4b1068f5d74b ("scsi: qedi: Add MFW error recovery process") Signed-off-by: Zheng Wang Link: https://lore.kernel.org/r/20230413033422.28003-1-zyytlz.wz@163.com Acked-by: Manish Rangankar Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit 948afc69615167a3c82430f99bfd046332b89912 Author: Alice Chao Date: Mon Apr 24 16:03:56 2023 +0800 scsi: ufs: core: mcq: Fix &hwq->cq_lock deadlock issue When ufshcd_err_handler() is executed, CQ event interrupt can enter waiting for the same lock. This can happen in ufshcd_handle_mcq_cq_events() and also in ufs_mtk_mcq_intr(). The following warning message will be generated when &hwq->cq_lock is used in IRQ context with IRQ enabled. Use ufshcd_mcq_poll_cqe_lock() with spin_lock_irqsave instead of spin_lock to resolve the deadlock issue. [name:lockdep&]WARNING: inconsistent lock state [name:lockdep&]-------------------------------- [name:lockdep&]inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. [name:lockdep&]kworker/u16:4/260 [HC0[0]:SC0[0]:HE1:SE1] takes: ffffff8028444600 (&hwq->cq_lock){?.-.}-{2:2}, at: ufshcd_mcq_poll_cqe_lock+0x30/0xe0 [name:lockdep&]{IN-HARDIRQ-W} state was registered at: lock_acquire+0x17c/0x33c _raw_spin_lock+0x5c/0x7c ufshcd_mcq_poll_cqe_lock+0x30/0xe0 ufs_mtk_mcq_intr+0x60/0x1bc [ufs_mediatek_mod] __handle_irq_event_percpu+0x140/0x3ec handle_irq_event+0x50/0xd8 handle_fasteoi_irq+0x148/0x2b0 generic_handle_domain_irq+0x4c/0x6c gic_handle_irq+0x58/0x134 call_on_irq_stack+0x40/0x74 do_interrupt_handler+0x84/0xe4 el1_interrupt+0x3c/0x78 Possible unsafe locking scenario: CPU0 ---- lock(&hwq->cq_lock); lock(&hwq->cq_lock); *** DEADLOCK *** 2 locks held by kworker/u16:4/260: [name:lockdep&] stack backtrace: CPU: 7 PID: 260 Comm: kworker/u16:4 Tainted: G S W OE 6.1.17-mainline-android14-2-g277223301adb #1 Workqueue: ufs_eh_wq_0 ufshcd_err_handler Call trace: dump_backtrace+0x10c/0x160 show_stack+0x20/0x30 dump_stack_lvl+0x98/0xd8 dump_stack+0x20/0x60 print_usage_bug+0x584/0x76c mark_lock_irq+0x488/0x510 mark_lock+0x1ec/0x25c __lock_acquire+0x4d8/0xffc lock_acquire+0x17c/0x33c _raw_spin_lock+0x5c/0x7c ufshcd_mcq_poll_cqe_lock+0x30/0xe0 ufshcd_poll+0x68/0x1b0 ufshcd_transfer_req_compl+0x9c/0xc8 ufshcd_err_handler+0x3bc/0xea0 process_one_work+0x2f4/0x7e8 worker_thread+0x234/0x450 kthread+0x110/0x134 ret_from_fork+0x10/0x20 Fixes: ed975065c31c ("scsi: ufs: core: mcq: Add completion support in poll") Reviewed-by: Can Guo Reviewed-by: Stanley Chu Signed-off-by: Alice Chao Link: https://lore.kernel.org/r/20230424080400.8955-1-alice.chao@mediatek.com Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 392e4daa8a7e3d9b103c64acef08f62f19d421aa Author: Tom Rix Date: Thu Apr 20 08:50:35 2023 -0400 scsi: ipr: Remove several unused variables gcc with W=1 reports drivers/scsi/ipr.c: In function ‘ipr_init_res_entry’: drivers/scsi/ipr.c:1104:22: error: variable ‘proto’ set but not used [-Werror=unused-but-set-variable] 1104 | unsigned int proto; | ^~~~~ drivers/scsi/ipr.c: In function ‘ipr_update_res_entry’: drivers/scsi/ipr.c:1261:22: error: variable ‘proto’ set but not used [-Werror=unused-but-set-variable] 1261 | unsigned int proto; | ^~~~~ drivers/scsi/ipr.c: In function ‘ipr_change_queue_depth’: drivers/scsi/ipr.c:4417:36: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable] 4417 | struct ipr_resource_entry *res; | ^~~ These variables are not used, so remove them. The lock around res is not needed so remove that. This makes ioa_cfg and lock_flags unneeded so remove them as well. Fixes: 65a15d6560df ("scsi: ipr: Remove SATA support") Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230420125035.3888188-1-trix@redhat.com Acked-by: Brian King Signed-off-by: Martin K. Petersen commit 81221ab76490622952f1df2a45c41d6ffb10b303 Author: Akshat Jain Date: Tue Apr 11 23:06:50 2023 +0000 scsi: pm80xx: Log device registration Log combination of phy_id and device_id in device registration response. Signed-off-by: Akshat Jain Signed-off-by: Pranav Prasad Link: https://lore.kernel.org/r/20230411230650.1760757-1-pranavpp@google.com Acked-by: Jack Wang Signed-off-by: Martin K. Petersen commit 173ea743bf7a9eef04460e03b00ba267cc52aee2 Merge: 181b69dd6e612 eb2317b13b188 Author: Linus Torvalds Date: Mon Apr 24 19:43:32 2023 -0700 Merge tag 'pull-nios2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull trivial nios2 cleanup from Al Viro. * tag 'pull-nios2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: nios2: _TIF_ALLWORK_MASK is unused commit 181b69dd6e61235b04742b473c23b00b731f62c3 Merge: 11b32219cba46 73bb5a9017b93 Author: Linus Torvalds Date: Mon Apr 24 19:38:34 2023 -0700 Merge tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs pile from Al Viro. Random minor cleanups. * tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: Fix description of vfs_tmpfile() sysv: switch to put_and_unmap_page() fs/sysv: Don't round down address for kunmap_flush_on_unmap() commit 11b32219cba462b1e12cfd91069ba82574bc2dcc Merge: 0e497ad525506 0aaf08de8426f Author: Linus Torvalds Date: Mon Apr 24 19:28:49 2023 -0700 Merge tag 'pull-old-dio' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull legacy dio cleanup from Al Viro. * tag 'pull-old-dio' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: __blockdev_direct_IO(): get rid of submit_io callback commit 0e497ad5255069b2d394168568790d26bbc8d365 Merge: ef36b9afc2edb 2d68317582717 Author: Linus Torvalds Date: Mon Apr 24 19:20:27 2023 -0700 Merge tag 'pull-write-one-page' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs write_one_page removal from Al Viro: "write_one_page series" * tag 'pull-write-one-page' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: mm,jfs: move write_one_page/folio_write_one to jfs ocfs2: don't use write_one_page in ocfs2_duplicate_clusters_by_page ufs: don't flush page immediately for DIRSYNC directories commit ef36b9afc2edb0764cb3df7a1cb5e86406267b40 Merge: 61d325dcbc05d 4a892c0fe4bb0 Author: Linus Torvalds Date: Mon Apr 24 19:14:20 2023 -0700 Merge tag 'pull-fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fget updates from Al Viro: "fget() to fdget() conversions" * tag 'pull-fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fuse_dev_ioctl(): switch to fdget() cgroup_get_from_fd(): switch to fdget_raw() bpf: switch to fdget_raw() build_mount_idmapped(): switch to fdget() kill the last remaining user of proc_ns_fget() SVM-SEV: convert the rest of fget() uses to fdget() in there convert sgx_set_attribute() to fdget()/fdput() convert setns(2) to fdget()/fdput() commit 4774ad841bef97cc51df90195338c5b2573dd4cb Author: Christian Marangi Date: Sun Apr 23 19:28:00 2023 +0200 net: phy: marvell: Fix inconsistent indenting in led_blink_set Fix inconsistent indeinting in m88e1318_led_blink_set reported by kernel test robot, probably done by the presence of an if condition dropped in later revision of the same code. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304240007.0VEX8QYG-lkp@intel.com/ Fixes: ea9e86485dec ("net: phy: marvell: Implement led_blink_set()") Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230423172800.3470-1-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit 700f11eb2cbea349bda2599b4b676b49d43b4175 Author: Horatiu Vultur Date: Sat Apr 22 16:23:44 2023 +0200 lan966x: Don't use xdp_frame when action is XDP_TX When the action of an xdp program was XDP_TX, lan966x was creating a xdp_frame and use this one to send the frame back. But it is also possible to send back the frame without needing a xdp_frame, because it is possible to send it back using the page. And then once the frame is transmitted is possible to use directly page_pool_recycle_direct as lan966x is using page pools. This would save some CPU usage on this path, which results in higher number of transmitted frames. Bellow are the statistics: Frame size: Improvement: 64 ~8% 256 ~11% 512 ~8% 1000 ~0% 1500 ~0% Signed-off-by: Horatiu Vultur Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/r/20230422142344.3630602-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski commit ee3392ed16b064594a14ce5886e412efb05ed17b Merge: 9610a8dc0aaaf be7dbd275dc6b Author: Jakub Kicinski Date: Mon Apr 24 18:45:11 2023 -0700 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2023-04-24 We've added 5 non-merge commits during the last 3 day(s) which contain a total of 7 files changed, 87 insertions(+), 44 deletions(-). The main changes are: 1) Workaround for bpf iter selftest due to lack of subprog support in precision tracking, from Andrii. 2) Disable bpf_refcount_acquire kfunc until races are fixed, from Dave. 3) One more test_verifier test converted from asm macro to asm in C, from Eduard. 4) Fix build with NETFILTER=y INET=n config, from Florian. 5) Add __rcu_read_{lock,unlock} into deny list, from Yafang. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: selftests/bpf: avoid mark_all_scalars_precise() trigger in one of iter tests bpf: Add __rcu_read_{lock,unlock} into btf id deny list bpf: Disable bpf_refcount_acquire kfunc calls until race conditions are fixed selftests/bpf: verifier/prevent_map_lookup converted to inline assembly bpf: fix link failure with NETFILTER=y INET=n ==================== Link: https://lore.kernel.org/r/20230425005648.86714-1-alexei.starovoitov@gmail.com Signed-off-by: Jakub Kicinski commit 9610a8dc0aaaf146630ff5566b5d8804fcd22d15 Merge: 938f65adc4202 cd275c236b3f3 Author: Jakub Kicinski Date: Mon Apr 24 18:22:39 2023 -0700 Merge branch 'tsnep-xdp-socket-zero-copy-support' Gerhard Engleder says: ==================== tsnep: XDP socket zero-copy support Implement XDP socket zero-copy support for tsnep driver. I tried to follow existing drivers like igc as far as possible. But one main difference is that tsnep does not need any reconfiguration for XDP BPF program setup. So I decided to keep this behavior no matter if a XSK pool is used or not. As a result, tsnep starts using the XSK pool even if no XDP BPF program is available. Another difference is that I tried to prevent potentially failing allocations during XSK pool setup. E.g. both memory models for page pool and XSK pool are registered all the time. Thus, XSK pool setup cannot end up with not working queues. Some prework is done to reduce the last two XSK commits to actual XSK changes. ==================== Link: https://lore.kernel.org/r/20230421194656.48063-1-gerhard@engleder-embedded.com Signed-off-by: Jakub Kicinski commit cd275c236b3f342cb7d9437ef5adcdeaf42fdd2c Author: Gerhard Engleder Date: Fri Apr 21 21:46:56 2023 +0200 tsnep: Add XDP socket zero-copy TX support Send and complete XSK pool frames within TX NAPI context. NAPI context is triggered by ndo_xsk_wakeup. Test results with A53 1.2GHz: xdpsock txonly copy mode, 64 byte frames: pps pkts 1.00 tx 284,409 11,398,144 Two CPUs with 100% and 10% utilization. xdpsock txonly zero-copy mode, 64 byte frames: pps pkts 1.00 tx 511,929 5,890,368 Two CPUs with 100% and 1% utilization. xdpsock l2fwd copy mode, 64 byte frames: pps pkts 1.00 rx 248,985 7,315,885 tx 248,921 7,315,885 Two CPUs with 100% and 10% utilization. xdpsock l2fwd zero-copy mode, 64 byte frames: pps pkts 1.00 rx 254,735 3,039,456 tx 254,735 3,039,456 Two CPUs with 100% and 4% utilization. Packet rate increases and CPU utilization is reduced in both cases. Signed-off-by: Gerhard Engleder Reviewed-by: Maciej Fijalkowski Signed-off-by: Jakub Kicinski commit 3fc2333933fdf1148b694d15db824e10449ecbc1 Author: Gerhard Engleder Date: Fri Apr 21 21:46:55 2023 +0200 tsnep: Add XDP socket zero-copy RX support Add support for XSK zero-copy to RX path. The setup of the XSK pool can be done at runtime. If the netdev is running, then the queue must be disabled and enabled during reconfiguration. This can be done easily with functions introduced in previous commits. A more important property is that, if the netdev is running, then the setup of the XSK pool shall not stop the netdev in case of errors. A broken netdev after a failed XSK pool setup is bad behavior. Therefore, the allocation and setup of resources during XSK pool setup is done only before any queue is disabled. Additionally, freeing and later allocation of resources is eliminated in some cases. Page pool entries are kept for later use. Two memory models are registered in parallel. As a result, the XSK pool setup cannot fail during queue reconfiguration. In contrast to other drivers, XSK pool setup and XDP BPF program setup are separate actions. XSK pool setup can be done without any XDP BPF program. The XDP BPF program can be added, removed or changed without any reconfiguration of the XSK pool. Test results with A53 1.2GHz: xdpsock rxdrop copy mode, 64 byte frames: pps pkts 1.00 rx 856,054 10,625,775 Two CPUs with both 100% utilization. xdpsock rxdrop zero-copy mode, 64 byte frames: pps pkts 1.00 rx 889,388 4,615,284 Two CPUs with 100% and 20% utilization. Packet rate increases and CPU utilization is reduced. 100% CPU load seems to the base load. This load is consumed by ksoftirqd just for dropping the generated packets without xdpsock running. Using batch API reduced CPU utilization slightly, but measurements are not stable enough to provide meaningful numbers. Signed-off-by: Gerhard Engleder Reviewed-by: Maciej Fijalkowski Signed-off-by: Jakub Kicinski commit c2d64697f41b0c188690f4f5841045ed86243134 Author: Gerhard Engleder Date: Fri Apr 21 21:46:54 2023 +0200 tsnep: Move skb receive action to separate function The function tsnep_rx_poll() is already pretty long and the skb receive action can be reused for XSK zero-copy support. Move page based skb receive to separate function. Signed-off-by: Gerhard Engleder Reviewed-by: Maciej Fijalkowski Signed-off-by: Jakub Kicinski commit 2ea0a282ba09d29915f1d59b22c38207b5c7ed62 Author: Gerhard Engleder Date: Fri Apr 21 21:46:53 2023 +0200 tsnep: Add functions for queue enable/disable Move queue enable and disable code to separate functions. This way the activation and deactivation of the queues are defined actions, which can be used in future execution paths. This functions will be used for the queue reconfiguration at runtime, which is necessary for XSK zero-copy support. Signed-off-by: Gerhard Engleder Reviewed-by: Maciej Fijalkowski Signed-off-by: Jakub Kicinski commit 33b0ee02c84c962a9701107be5683f7a600ebffd Author: Gerhard Engleder Date: Fri Apr 21 21:46:52 2023 +0200 tsnep: Rework TX/RX queue initialization Make initialization of TX and RX queues less dynamic by moving some initialization from netdev open/close to device probing. Additionally, move some initialization code to separate functions to enable future use in other execution paths. This is done as preparation for queue reconfigure at runtime, which is necessary for XSK zero-copy support. Signed-off-by: Gerhard Engleder Reviewed-by: Maciej Fijalkowski Signed-off-by: Jakub Kicinski commit 42fb2962b4a6f8b46aa1c141748319e01d0c7c39 Author: Gerhard Engleder Date: Fri Apr 21 21:46:51 2023 +0200 tsnep: Replace modulo operation with mask TX/RX ring size is static and power of 2 to enable compiler to optimize modulo operation to mask operation. Make this optimization already in the code and don't rely on the compiler. CPU utilisation during high packet rate has not changed. So no performance improvement has been measured. But it is best practice to prevent modulo operations. Suggested-by: Maciej Fijalkowski Signed-off-by: Gerhard Engleder Reviewed-by: Maciej Fijalkowski Signed-off-by: Jakub Kicinski commit 938f65adc4202da8ed3c85ef5a40dd3b8ee328d9 Author: Alexander Stein Date: Mon Apr 24 15:46:25 2023 +0200 net: phy: dp83867: Add led_brightness_set support Up to 4 LEDs can be attached to the PHY, add support for setting brightness manually. Signed-off-by: Alexander Stein Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230424134625.303957-1-alexander.stein@ew.tq-group.com Signed-off-by: Jakub Kicinski commit aed8fdad2152d946add50bec00a6b07c457bdcdf Author: Alexander Stein Date: Mon Apr 24 16:16:48 2023 +0200 net: phy: Fix reading LED reg property 'reg' is always encoded in 32 bits, thus it has to be read using the function with the corresponding bit width. Fixes: 01e5b728e9e4 ("net: phy: Add a binding for PHY LEDs") Signed-off-by: Alexander Stein Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230424141648.317944-1-alexander.stein@ew.tq-group.com Signed-off-by: Jakub Kicinski commit e515c330d7e22692d03475740fa45d179281cdf7 Author: Jianuo Kuang Date: Mon Apr 24 10:41:40 2023 +0800 drivers: nfc: nfcsim: remove return value check of `dev_dir` Smatch complains that: nfcsim_debugfs_init_dev() warn: 'dev_dir' is an error pointer or valid According to the documentation of the debugfs_create_dir() function, there is no need to check the return value of this function. Just delete the dead code. Signed-off-by: Jianuo Kuang Reviewed-by: Dongliang Mu Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230424024140.34607-1-u202110722@hust.edu.cn Signed-off-by: Jakub Kicinski commit 86c2b51f203ec89adc18492a46343472055fd3c8 Author: wuych Date: Mon Apr 24 18:15:50 2023 +0800 net: phy: dp83867: Remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: wuych Reviewed-by: Leon Romanovsky Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230424101550.664319-1-yunchuan@nfschina.com Signed-off-by: Jakub Kicinski commit 00d0f31a1ec8eb3e4d692bdf2455daf0fb865bb3 Author: Jakub Kicinski Date: Thu Apr 20 16:33:02 2023 -0700 net: ethtool: coalesce: try to make user settings stick twice SET_COALESCE may change operation mode and parameters in one call. Changing operation mode may cause the driver to reset the parameter values to what is a reasonable default for new operation mode. Since driver does not know which parameters come from user and which are echoed back from ->get, driver may ignore the parameters when switching operation modes. This used to be inevitable for ioctl() but in netlink we know which parameters are actually specified by the user. We could inform which parameters were set by the user but this would lead to a lot of code duplication in the drivers. Instead try to call the drivers twice if both mode and params are changed. The set method already checks if any params need updating so in case the driver did the right thing the first time around - there will be no second call to it's ->set method (only an extra call to ->get()). For mlx5 for example before this patch we'd see: # ethtool -C eth0 adaptive-rx on adaptive-tx on # ethtool -C eth0 adaptive-rx off adaptive-tx off \ tx-usecs 123 rx-usecs 123 Adaptive RX: off TX: off rx-usecs: 3 rx-frames: 32 tx-usecs: 16 tx-frames: 32 [...] After the change: # ethtool -C eth0 adaptive-rx on adaptive-tx on # ethtool -C eth0 adaptive-rx off adaptive-tx off \ tx-usecs 123 rx-usecs 123 Adaptive RX: off TX: off rx-usecs: 123 rx-frames: 32 tx-usecs: 123 tx-frames: 32 [...] This only works for netlink, so it's a small discrepancy between netlink and ioctl(). Since we anticipate most users to move to netlink I believe it's worth making their lives easier. Link: https://lore.kernel.org/r/20230420233302.944382-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit c90b3bbff2a097f4b6861c6d1aac18ed66f15261 Author: Masahiro Yamada Date: Mon Apr 17 23:35:35 2023 +0900 kbuild: rpm-pkg: remove kernel-drm PROVIDES This code was added more than 20 years ago. [1] I checked the kernel spec files in Fedora and OpenSUSE, but did not see 'kernel-drm'. I do not know if there exists a distro that uses it in RPM dependency. Remove this, and let's see if somebody complains about it. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=6d956df7d6b716b28c910c4f5b360c4d44d96c4d Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit 086c161678b8cc291aa21ff8ef2b53df83ee44aa Merge: 8e8e47d9e84ff df18f2da302f1 Author: Jakub Kicinski Date: Mon Apr 24 18:08:54 2023 -0700 Merge branch 'update-coding-style-and-check-alloc_frag' Haiyang Zhang says: ==================== Update coding style and check alloc_frag Follow up patches for the jumbo frame support. As suggested by Jakub Kicinski, update coding style, and check napi_alloc_frag for possible fallback to single pages. ==================== Link: https://lore.kernel.org/r/1682096818-30056-1-git-send-email-haiyangz@microsoft.com Signed-off-by: Jakub Kicinski commit df18f2da302f169e1a29098c6ca3b474f1b0269e Author: Haiyang Zhang Date: Fri Apr 21 10:06:58 2023 -0700 net: mana: Check if netdev/napi_alloc_frag returns single page netdev/napi_alloc_frag() may fall back to single page which is smaller than the requested size. Add error checking to avoid memory overwritten. Signed-off-by: Haiyang Zhang Signed-off-by: Jakub Kicinski commit 5c74064f43c291d9add2b436a2d70205b71a7cc7 Author: Haiyang Zhang Date: Fri Apr 21 10:06:57 2023 -0700 net: mana: Rename mana_refill_rxoob and remove some empty lines Rename mana_refill_rxoob for naming consistency. And remove some empty lines between function call and error checking. Signed-off-by: Haiyang Zhang Signed-off-by: Jakub Kicinski commit 8e8e47d9e84ff9a6f1072177bd7ec1d2f12f4d5c Merge: ffcddcaed6e06 4fc418053ec7b Author: Jakub Kicinski Date: Mon Apr 24 18:07:09 2023 -0700 Merge branch 'add-page_pool-support-for-page-recycling-in-veth-driver' Lorenzo Bianconi says: ==================== add page_pool support for page recycling in veth driver Introduce page_pool support in veth driver in order to recycle pages in veth_convert_skb_to_xdp_buff routine and avoid reallocating the skb through the page allocator when we run a xdp program on the device and we receive skbs from the stack. ==================== Link: https://lore.kernel.org/r/cover.1682188837.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 4fc418053ec7b839d98533d0d4ee83e11ffbaf53 Author: Lorenzo Bianconi Date: Sat Apr 22 20:54:33 2023 +0200 net: veth: add page_pool stats Introduce page_pool stats support to report info about local page_pool through ethtool Tested-by: Maryam Tahhan Signed-off-by: Lorenzo Bianconi Signed-off-by: Jakub Kicinski commit 0ebab78cbcbfd698d40bd307b68337bdf1b47e9b Author: Lorenzo Bianconi Date: Sat Apr 22 20:54:32 2023 +0200 net: veth: add page_pool for page recycling Introduce page_pool support in veth driver in order to recycle pages in veth_convert_skb_to_xdp_buff routine and avoid reallocating the skb through the page allocator. The patch has been tested sending tcp traffic to a veth pair where the remote peer is running a simple xdp program just returning xdp_pass: veth upstream codebase: MTU 1500B: ~ 8Gbps MTU 8000B: ~ 13.9Gbps veth upstream codebase + pp support: MTU 1500B: ~ 9.2Gbps MTU 8000B: ~ 16.2Gbps Tested-by: Maryam Tahhan Signed-off-by: Lorenzo Bianconi Signed-off-by: Jakub Kicinski commit d913d32cc2707e9cd24fe6fa6d7d470e9c728980 Author: Kuniyuki Iwashima Date: Fri Apr 21 11:52:55 2023 -0700 netlink: Use copy_to_user() for optval in netlink_getsockopt(). Brad Spencer provided a detailed report [0] that when calling getsockopt() for AF_NETLINK, some SOL_NETLINK options set only 1 byte even though such options require at least sizeof(int) as length. The options return a flag value that fits into 1 byte, but such behaviour confuses users who do not initialise the variable before calling getsockopt() and do not strictly check the returned value as char. Currently, netlink_getsockopt() uses put_user() to copy data to optlen and optval, but put_user() casts the data based on the pointer, char *optval. As a result, only 1 byte is set to optval. To avoid this behaviour, we need to use copy_to_user() or cast optval for put_user(). Note that this changes the behaviour on big-endian systems, but we document that the size of optval is int in the man page. $ man 7 netlink ... Socket options To set or get a netlink socket option, call getsockopt(2) to read or setsockopt(2) to write the option with the option level argument set to SOL_NETLINK. Unless otherwise noted, optval is a pointer to an int. Fixes: 9a4595bc7e67 ("[NETLINK]: Add set/getsockopt options to support more than 32 groups") Fixes: be0c22a46cfb ("netlink: add NETLINK_BROADCAST_ERROR socket option") Fixes: 38938bfe3489 ("netlink: add NETLINK_NO_ENOBUFS socket flag") Fixes: 0a6a3a23ea6e ("netlink: add NETLINK_CAP_ACK socket option") Fixes: 2d4bc93368f5 ("netlink: extended ACK reporting") Fixes: 89d35528d17d ("netlink: Add new socket option to enable strict checking on dumps") Reported-by: Brad Spencer Link: https://lore.kernel.org/netdev/ZD7VkNWFfp22kTDt@datsun.rim.net/ Signed-off-by: Kuniyuki Iwashima Reviewed-by: Johannes Berg Link: https://lore.kernel.org/r/20230421185255.94606-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 1d29b4c223811871017542e96ac00ee562a37497 Author: Masahiro Yamada Date: Mon Apr 17 23:25:48 2023 +0900 kbuild: deb-pkg: add KDEB_SOURCE_COMPRESS to specify source compression Add KDEB_SOURCE_COMPRESS to specify the compression for the orig and debian tarballs. (cf. the existing KDEB_COMPRESS is used to specify the compression for binary packages.) Supported algorithms are gzip, bzip2, lzma, and xz, all of which are supported by dpkg-source. The current default is gzip. You can change it via the environment variable, for example, 'KDEB_SOURCE_COMPRESS=xz make deb-pkg'. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit be7dbd275dc6b911a5b9a22c4f9cb71b2c7fd847 Author: Andrii Nakryiko Date: Mon Apr 24 16:51:28 2023 -0700 selftests/bpf: avoid mark_all_scalars_precise() trigger in one of iter tests iter_pass_iter_ptr_to_subprog subtest is relying on actual array size being passed as subprog parameter. This combined with recent fixes to precision tracking in conditional jumps ([0]) is now causing verifier to backtrack all the way to the point where sum() and fill() subprogs are called, at which point precision backtrack bails out and forces all the states to have precise SCALAR registers. This in turn causes each possible value of i within fill() and sum() subprogs to cause a different non-equivalent state, preventing iterator code to converge. For now, change the test to assume fixed size of passed in array. Once BPF verifier supports precision tracking across subprogram calls, these changes will be reverted as unnecessary. [0] 71b547f56124 ("bpf: Fix incorrect verifier pruning due to missing register precision taints") Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230424235128.1941726-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit ffcddcaed6e06255811a8204458e1f380a3c2b21 Merge: 2efb07b5ced64 207296f1a03bf Author: Jakub Kicinski Date: Mon Apr 24 15:37:35 2023 -0700 Merge tag 'nf-next-23-04-22' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next 1) Reduce jumpstack footprint: Stash chain in last rule marker in blob for tracing. Remove last rule and chain from jumpstack. From Florian Westphal. 2) nf_tables validates all tables before committing the new rules. Unfortunately, this has two drawbacks: - Since addition of the transaction mutex pernet state gets written to outside of the locked section from the cleanup callback, this is wrong so do this cleanup directly after table has passed all checks. - Revalidate tables that saw no changes. This can be avoided by keeping the validation state per table, not per netns. From Florian Westphal. 3) Get rid of a few redundant pointers in the traceinfo structure. The three removed pointers are used in the expression evaluation loop, so gcc keeps them in registers. Passing them to the (inlined) helpers thus doesn't increase nft_do_chain text size, while stack is reduced by another 24 bytes on 64bit arches. From Florian Westphal. 4) IPVS cleanups in several ways without implementing any functional changes, aside from removing some debugging output: - Update width of source for ip_vs_sync_conn_options The operation is safe, use an annotation to describe it properly. - Consistently use array_size() in ip_vs_conn_init() It seems better to use helpers consistently. - Remove {Enter,Leave}Function. These seem to be well past their use-by date. - Correct spelling in comments. From Simon Horman. 5) Extended netlink error report for netdevice in flowtables and netdev/chains. Allow for incrementally add/delete devices to netdev basechain. Allow to create netdev chain without device. * tag 'nf-next-23-04-22' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: netfilter: nf_tables: allow to create netdev chain without device netfilter: nf_tables: support for deleting devices in an existing netdev chain netfilter: nf_tables: support for adding new devices to an existing netdev chain netfilter: nf_tables: rename function to destroy hook list netfilter: nf_tables: do not send complete notification of deletions netfilter: nf_tables: extended netlink error reporting for netdevice ipvs: Correct spelling in comments ipvs: Remove {Enter,Leave}Function ipvs: Consistently use array_size() in ip_vs_conn_init() ipvs: Update width of source for ip_vs_sync_conn_options netfilter: nf_tables: do not store rule in traceinfo structure netfilter: nf_tables: do not store verdict in traceinfo structure netfilter: nf_tables: do not store pktinfo in traceinfo structure netfilter: nf_tables: remove unneeded conditional netfilter: nf_tables: make validation state per table netfilter: nf_tables: don't write table validation state without mutex netfilter: nf_tables: don't store chain address on jump netfilter: nf_tables: don't store address of last rule on jump netfilter: nf_tables: merge nft_rules_old structure and end of ruleblob marker ==================== Link: https://lore.kernel.org/r/20230421235021.216950-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit ea90f303e8c195f0cbb25b5df21d203d2bb503e0 Merge: fe15c26ee26ef 32c2f2a46db13 Author: Stephen Boyd Date: Mon Apr 24 15:18:23 2023 -0700 Merge tag 'qcom-clk-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into clk-qcom Pull Qualcomm clk driver updates from Bjorn Andersson: New drivers for Global clock controller on SM7150, IPQ9574, MSM8917 and IPQ5332 are added. New GPU clock controllers for SM6115, SM6125, SM6375 and SA8775P are added. The APSS IPQ PLL driver is refactored to support different PLL types, support for the Stromer Plus PLL type is added, and support for IPQ5332 is introduced. Helpers for settings sleep, wake and retain bits of CBCR registers are introduced and used in some of the newly introduced GPU clock drivers. The platform_driver remove callbacks is transitioned to remove_new, as part of the system wide cleanup effort. In the Display clock controller for QCM2290, the MDSS_CORE reset is introduced and the non-existent DSI1PHY clock is removed. IPQ4019 Global clock controller is transitioned to parent_data. USB GDSCs in SM6375, MSM8996 and MSM8998 are changed to use retention as disabled state, to avoid collapsing them during suspend. The CX GDSC in the SM6375 GPU clock controller has it's disable-wait value corrected. QCM2290 SDCC2 src clock moves to floor_ops. The two EMAC GDSCs are added for SC8280XP. Relevant RCGs in the SM6115 Global clock controller are moved to use shared_ops. PCIe PIPE clock operations on SM8350 are updated, to ensure the mux is parked when the parent PLL is disabled. GDSCs are added to the SC7280 LPASS audio clock controller. The RPM clock controller is transitioned to use the managed version of of_clk_add_hw_provider(). Missing XO clocks are added to MSM8226 and MSM8974. DeviceTree bindings are added for the various newly supported clock controllers, the binding for KPSS ACC and GCC drivers are converted to YAML and a few fixes are introduced. * tag 'qcom-clk-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (57 commits) clk: qcom: gcc-sc8280xp: Add EMAC GDSCs clk: qcom: dispcc-qcm2290: Remove inexistent DSI1PHY clk clk: qcom: add the GPUCC driver for sa8775p dt-bindings: clock: qcom: describe the GPUCC clock for SA8775P clk: qcom: gcc-sm8350: fix PCIe PIPE clocks handling clk: qcom: lpassaudiocc-sc7280: Add required gdsc power domain clks in lpass_cc_sc7280_desc clk: qcom: lpasscc-sc7280: Skip qdsp6ss clock registration dt-bindings: clock: qcom,sc7280-lpasscc: Add qcom,adsp-pil-mode property clk: qcom: rpm: Use managed `of_clk_add_hw_provider()` clk: qcom: Add Global Clock Controller driver for IPQ9574 dt-bindings: clock: Add ipq9574 clock and reset definitions clk: qcom: gpucc-sm6375: Configure CX_GDSC disable wait value clk: qcom: gcc-sm6115: Mark RCGs shared where applicable clk: qcom: dispcc-qcm2290: Add MDSS_CORE reset dt-bindings: clock: dispcc-qcm2290: Add MDSS_CORE reset clk: qcom: apss-ipq-pll: add support for IPQ5332 dt-bindings: clock: qcom,a53pll: add IPQ5332 compatible clk: qcom: apss-ipq-pll: refactor the driver to accommodate different PLL types dt-bindings: mailbox: qcom,apcs-kpss-global: fix SDX55 'if' match dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks ... commit 61d325dcbc05d8fef88110d35ef7776f3ac3f68b Merge: 97adb49f052e7 745ed7d778340 Author: Linus Torvalds Date: Mon Apr 24 14:25:39 2023 -0700 Merge tag 'erofs-for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "In this cycle, sub-page block support for uncompressed files is available. It's mainly used to enable original signing ('golden') 4k-block images on arm64 with 16/64k pages. In addition, end users could also use this feature to build a manifest to directly refer to golden tar data. Besides, long xattr name prefix support is also introduced in this cycle to avoid too many xattrs with the same prefix (e.g. overlayfs xattrs). It's useful for erofs + overlayfs combination (like Composefs model): the image size is reduced by ~14% and runtime performance is also slightly improved. Others are random fixes and cleanups as usual. Summary: - Add sub-page block size support for uncompressed files - Support flattened block device for multi-blob images to be attached into virtual machines (including cloud servers) and bare metals - Support long xattr name prefixes to optimize images with common xattr namespaces (e.g. files with overlayfs xattrs) use cases - Various minor cleanups & fixes" * tag 'erofs-for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: cleanup i_format-related stuffs erofs: sunset erofs_dbg() erofs: fix potential overflow calculating xattr_isize erofs: get rid of z_erofs_fill_inode() erofs: enable long extended attribute name prefixes erofs: handle long xattr name prefixes properly erofs: add helpers to load long xattr name prefixes erofs: introduce on-disk format for long xattr name prefixes erofs: move packed inode out of the compression part erofs: keep meta inode into erofs_buf erofs: initialize packed inode after root inode is assigned erofs: stop parsing non-compact HEAD index if clusterofs is invalid erofs: don't warn ztailpacking feature anymore erofs: simplify erofs_xattr_generic_get() erofs: rename init_inode_xattrs with erofs_ prefix erofs: move several xattr helpers into xattr.c erofs: tidy up EROFS on-disk naming erofs: support flattened block device for multi-blob images erofs: set block size to the on-disk block size erofs: avoid hardcoded blocksize for subpage block support commit a0c109dcafb15b8bee187c49fb746779374f60f0 Author: Yafang Shao Date: Mon Apr 24 16:11:03 2023 +0000 bpf: Add __rcu_read_{lock,unlock} into btf id deny list The tracing recursion prevention mechanism must be protected by rcu, that leaves __rcu_read_{lock,unlock} unprotected by this mechanism. If we trace them, the recursion will happen. Let's add them into the btf id deny list. When CONFIG_PREEMPT_RCU is enabled, it can be reproduced with a simple bpf program as such: SEC("fentry/__rcu_read_lock") int fentry_run() { return 0; } Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230424161104.3737-2-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 97adb49f052e70455c3529509885f8aa3b40c370 Merge: e2eff52ce512e 43b450632676f Author: Linus Torvalds Date: Mon Apr 24 14:06:41 2023 -0700 Merge tag 'v6.4/vfs.open' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs open fixlet from Christian Brauner: "EINVAL ist keinmal: This contains the changes to make O_DIRECTORY when specified together with O_CREAT an invalid request. The wider background is that a regression report about the behavior of O_DIRECTORY | O_CREAT was sent to fsdevel about a behavior that was changed multiple years and LTS releases earlier during v5.7 development. This has also been covered in https://lwn.net/Articles/926782/ which provides an excellent summary of the discussion" * tag 'v6.4/vfs.open' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: open: return EINVAL for O_DIRECTORY | O_CREAT commit 7deca5eae83389ca40ac1b1bde96e4af17cca84f Author: Dave Marchevsky Date: Mon Apr 24 13:43:21 2023 -0700 bpf: Disable bpf_refcount_acquire kfunc calls until race conditions are fixed As reported by Kumar in [0], the shared ownership implementation for BPF programs has some race conditions which need to be addressed before it can safely be used. This patch does so in a minimal way instead of ripping out shared ownership entirely, as proper fixes for the issues raised will follow ASAP, at which point this patch's commit can be reverted to re-enable shared ownership. The patch removes the ability to call bpf_refcount_acquire_impl from BPF programs. Programs can only bump refcount and obtain a new owning reference using this kfunc, so removing the ability to call it effectively disables shared ownership. Instead of changing success / failure expectations for bpf_refcount-related selftests, this patch just disables them from running for now. [0]: https://lore.kernel.org/bpf/d7hyspcow5wtjcmw4fugdgyp3fwhljwuscp3xyut5qnwivyeru@ysdq543otzv2/ Reported-by: Kumar Kartikeya Dwivedi Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230424204321.2680232-1-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 16eb51aba0a72b8f60c6b98d1493844230293450 Author: Rob Clark Date: Mon Apr 17 15:55:04 2023 -0700 drm/msm: Fix vmap madv warning Commit d6ae7d1cd58e ("drm/msm/gem: Simplify vmap vs LRU tracking") introduced a splat in the pin_pages_locked() path for buffers that had been MADV_DONTNEED. ------------[ cut here ]------------ msm_obj->madv != 0 WARNING: CPU: 1 PID: 144 at drivers/gpu/drm/msm/msm_gem.c:230 msm_gem_pin_pages_locked+0x9c/0xd4 Modules linked in: lzo_rle cros_ec_lid_angle cros_ec_sensors cros_ec_sensors_core venus_dec venus_enc videobuf2_dma_contig cdc_ether usbnet mii uvcvideo videobuf2_vmalloc hci_uart btqca qcom_spmi_adc5 uvc qcom_spmi_temp_alarm qcom_vadc_common cros_ec_sensorhub videobuf2_memops cros_ec_typec sx9324 sx_common typec joydev bluetooth industrialio_triggered_buffer ecdh_generic kfifo_buf ecc venus_core qcom_stats v4l2_mem2mem videobuf2_v4l2 videobuf2_common ath11k_ahb ath11k mac80211 cfg80211 fuse zram zsmalloc CPU: 1 PID: 144 Comm: ring0 Tainted: G W 6.3.0-rc2-debug+ #622 Hardware name: Google Villager (rev1+) with LTE (DT) pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : msm_gem_pin_pages_locked+0x9c/0xd4 lr : msm_gem_pin_pages_locked+0x9c/0xd4 sp : ffffffc009ffbab0 x29: ffffffc009ffbab0 x28: ffffffee8da75008 x27: ffffff80a10274d0 x26: ffffff8087fe3bf8 x25: ffffff8087fe3c08 x24: 0000000000000001 x23: ffffff80891d5800 x22: ffffff809d0de480 x21: ffffff8081e5a080 x20: 0000000000000002 x19: ffffff80a3564c00 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 00000000000a9620 x14: 0000000000000000 x13: 2d2d2d2d2d2d2d2d x12: 2d2d2d2d5d206572 x11: 656820747563205b x10: 2d2d2d2d2d2d2d2d x9 : ffffffee8c705dfc x8 : ffffffee8da75000 x7 : ffffffee8d34e6d0 x6 : 0000000000000000 x5 : 00000000000affa8 x4 : 000000000000000d x3 : ffffffee8da75008 x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffffff8088048040 Call trace: msm_gem_pin_pages_locked+0x9c/0xd4 get_vaddr+0xb0/0x150 msm_gem_get_vaddr_active+0x1c/0x28 snapshot_buf+0x90/0x10c msm_rd_dump_submit+0x30c/0x380 msm_gpu_submit+0x88/0x174 msm_job_run+0x68/0x118 drm_sched_main+0x2b8/0x3a0 kthread+0xf0/0x100 ret_from_fork+0x10/0x20 irq event stamp: 3358 hardirqs last enabled at (3357): [] __up_console_sem+0x7c/0x80 hardirqs last disabled at (3358): [] el1_dbg+0x24/0x80 softirqs last enabled at (3330): [] __do_softirq+0x21c/0x4bc softirqs last disabled at (3325): [] ____do_softirq+0x18/0x24 ---[ end trace 0000000000000000 ]--- But, as with msm_gem_get_vaddr_active(), this is a special case because we know that the buffer won't be purged evicted until it's fence is signaled. We just forgot to propagate the logic get_vaddr() to pin_pages_locked(). Fixes: d6ae7d1cd58e ("drm/msm/gem: Simplify vmap vs LRU tracking") Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/532616/ Link: https://lore.kernel.org/r/20230417225504.494934-1-robdclark@gmail.com commit e2eff52ce512ec725f9f1daf975c45a499be1e1e Merge: 7bcff5a3969b0 81b21c0f0138f Author: Linus Torvalds Date: Mon Apr 24 13:39:58 2023 -0700 Merge tag 'v6.4/vfs.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull misc vfs updates from Christian Brauner: "This contains a pile of various smaller fixes. Most of them aren't very interesting so this just highlights things worth mentioning: - Various filesystems contained the same little helper to convert from the mode of a dentry to the DT_* type of that dentry. They have now all been switched to rely on the generic fs_umode_to_dtype() helper. All custom helpers are removed (Jeff) - Fsnotify now reports ACCESS and MODIFY events for splice (Chung-Chiang Cheng) - After converting timerfd a long time ago to rely on wait_event_interruptible_*() apis, convert eventfd as well. This removes the complex open-coded wait code (Wen Yang) - Simplify sysctl registration for devpts, avoiding the declaration of two tables. Instead, just use a prefixed path with register_sysctl() (Luis) - The setattr_should_drop_sgid() helper is now exported so NFS can use it. By switching NFS to this helper an NFS setgid inheritance bug is fixed (me)" * tag 'v6.4/vfs.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: fs: hfsplus: remove WARN_ON() from hfsplus_cat_{read,write}_inode() pnode: pass mountpoint directly eventfd: use wait_event_interruptible_locked_irq() helper splice: report related fsnotify events fs: consolidate duplicate dt_type helpers nfs: use vfs setgid helper Update relatime comments to include equality fs/buffer: Remove redundant assignment to err fs_context: drop the unused lsm_flags member fs/namespace: fnic: Switch to use %ptTd Documentation: update idmappings.rst devpts: simplify two-level sysctl registration for pty_kern_table eventpoll: align comment with nested epoll limitation commit 7bcff5a3969b0e396087516ba4131596296a4478 Merge: ec40758b31ef6 e499214ce3ef5 Author: Linus Torvalds Date: Mon Apr 24 13:35:23 2023 -0700 Merge tag 'v6.4/vfs.acl' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull acl updates from Christian Brauner: "After finishing the introduction of the new posix acl api last cycle the generic POSIX ACL xattr handlers are still around in the filesystems xattr handlers for two reasons: (1) Because a few filesystems rely on the ->list() method of the generic POSIX ACL xattr handlers in their ->listxattr() inode operation. (2) POSIX ACLs are only available if IOP_XATTR is raised. The IOP_XATTR flag is raised in inode_init_always() based on whether the sb->s_xattr pointer is non-NULL. IOW, the registered xattr handlers of the filesystem are used to raise IOP_XATTR. Removing the generic POSIX ACL xattr handlers from all filesystems would risk regressing filesystems that only implement POSIX ACL support and no other xattrs (nfs3 comes to mind). This contains the work to decouple POSIX ACLs from the IOP_XATTR flag as they don't depend on xattr handlers anymore. So it's now possible to remove the generic POSIX ACL xattr handlers from the sb->s_xattr list of all filesystems. This is a crucial step as the generic POSIX ACL xattr handlers aren't used for POSIX ACLs anymore and POSIX ACLs don't depend on the xattr infrastructure anymore. Adressing problem (1) will require more long-term work. It would be best to get rid of the ->list() method of xattr handlers completely at some point. For erofs, ext{2,4}, f2fs, jffs2, ocfs2, and reiserfs the nop POSIX ACL xattr handler is kept around so they can continue to use array-based xattr handler indexing. This update does simplify the ->listxattr() implementation of all these filesystems however" * tag 'v6.4/vfs.acl' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: acl: don't depend on IOP_XATTR ovl: check for ->listxattr() support reiserfs: rework priv inode handling fs: rename generic posix acl handlers reiserfs: rework ->listxattr() implementation fs: simplify ->listxattr() implementation fs: drop unused posix acl handlers xattr: remove unused argument xattr: add listxattr helper xattr: simplify listxattr helpers commit ce902336d9b3472d6104316e876e1a8752531916 Author: Rob Clark Date: Tue Apr 18 09:41:58 2023 -0700 drm/msm/atomic: Don't try async if crtc not active For a similar reason as commit f2c7ca890182 ("drm/atomic-helper: Don't set deadline for modesets"), we need the crtc to be already active in order to compute a target vblank time for an async commit. Otherwise we get this splat reminding us that we are doing it wrong: ------------[ cut here ]------------ msm_dpu ae01000.mdp: drm_WARN_ON_ONCE(drm_drv_uses_atomic_modeset(dev)) WARNING: CPU: 7 PID: 1923 at drivers/gpu/drm/drm_vblank.c:728 drm_crtc_vblank_helper_get_vblank_timestamp_internal+0x148/0x370 Modules linked in: snd_seq_dummy snd_seq snd_seq_device bridge stp llc tun vhost_vsock vhost vhost_iotlb vmw_vsock_virtio_transport_common vsock uinput rfcomm algif_hash algif_skcipher af_alg veth venus_dec venus_enc cros_ec_typec typec qcom_spmi_temp_alarm qcom_spmi_adc_tm5 qcom_spmi_adc5 xt_cgroup qcom_vadc_common qcom_stats hci_uart btqca xt_MASQUERADE venus_core 8021q coresight_tmc coresight_funnel coresight_etm4x coresight_replicator snd_soc_lpass_sc7180 coresight snd_soc_sc7180 ip6table_nat fuse ath10k_snoc ath10k_core ath mac80211 iio_trig_sysfs bluetooth cfg80211 cros_ec_sensors cros_ec_sensors_core ecdh_generic industrialio_triggered_buffer ecc kfifo_buf cros_ec_sensorhub r8153_ecm cdc_ether usbnet r8152 mii lzo_rle lzo_compress zram hid_vivaldi hid_google_hammer hid_vivaldi_common joydev CPU: 7 PID: 1923 Comm: DrmThread Not tainted 5.15.107-18853-g3be267609a0b-dirty #16 a1ffc1a66e79c21c3536d8c9a42e819236e39714 Hardware name: Google Wormdingler rev1+ BOE panel board (DT) pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : drm_crtc_vblank_helper_get_vblank_timestamp_internal+0x148/0x370 lr : drm_crtc_vblank_helper_get_vblank_timestamp_internal+0x144/0x370 sp : ffffffc012e2b800 x29: ffffffc012e2b840 x28: ffffff8083676094 x27: ffffffc012e2bb28 x26: ffffff8084539800 x25: 0000000000000000 x24: ffffff8083676000 x23: ffffffd3c8cdc5a0 x22: ffffff80845b9d00 x21: ffffffc012e2b8b4 x20: ffffffc012e2b910 x19: 0000000000000001 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000010 x15: ffffffd3c8451a88 x14: 0000000000000003 x13: 0000000000000004 x12: 0000000000000001 x11: c0000000ffffdfff x10: ffffffd3c973ef58 x9 : 8ea3526b3cc95900 x8 : 8ea3526b3cc95900 x7 : 0000000000000000 x6 : 000000000000003a x5 : ffffffd3c99676cd x4 : 0000000000000000 x3 : ffffffc012e2b4b8 x2 : ffffffc012e2b4c0 x1 : 00000000ffffdfff x0 : 0000000000000000 Call trace: drm_crtc_vblank_helper_get_vblank_timestamp_internal+0x148/0x370 drm_crtc_vblank_helper_get_vblank_timestamp+0x20/0x30 drm_crtc_get_last_vbltimestamp+0x68/0xb0 drm_crtc_next_vblank_start+0x5c/0xa8 msm_atomic_commit_tail+0x264/0x664 commit_tail+0xac/0x160 drm_atomic_helper_commit+0x160/0x168 drm_atomic_commit+0xfc/0x128 drm_atomic_helper_disable_plane+0x8c/0x110 __setplane_atomic+0x10c/0x138 drm_mode_cursor_common+0x3a8/0x410 drm_mode_cursor_ioctl+0x48/0x70 drm_ioctl_kernel+0xe0/0x158 drm_ioctl+0x25c/0x4d8 __arm64_sys_ioctl+0x98/0xd0 invoke_syscall+0x4c/0x100 el0_svc_common+0x98/0x104 do_el0_svc+0x30/0x90 el0_svc+0x20/0x50 el0t_64_sync_handler+0x78/0x108 el0t_64_sync+0x1a4/0x1a8 ---[ end trace a0f587e1ab9589e8 ]--- Fixes: 52ff0d3073d2 ("drm/msm/atomic: Switch to vblank_start helper") Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/532727/ Link: https://lore.kernel.org/r/20230418164158.549873-1-robdclark@gmail.com commit ec40758b31ef6f492a48267e9e02edff6b4d62c9 Merge: 3323ddce085cd eee3a0e93924f Author: Linus Torvalds Date: Mon Apr 24 13:03:42 2023 -0700 Merge tag 'v6.4/pidfd.file' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull pidfd updates from Christian Brauner: "This adds a new pidfd_prepare() helper which allows the caller to reserve a pidfd number and allocates a new pidfd file that stashes the provided struct pid. It should be avoided installing a file descriptor into a task's file descriptor table just to close it again via close_fd() in case an error occurs. The fd has been visible to userspace and might already be in use. Instead, a file descriptor should be reserved but not installed into the caller's file descriptor table. If another failure path is hit then the reserved file descriptor and file can just be put without any userspace visible side-effects. And if all failure paths are cleared the file descriptor and file can be installed into the task's file descriptor table. This helper is now used in all places that open coded this functionality before. For example, this is currently done during copy_process() and fanotify used pidfd_create(), which returns a pidfd that has already been made visibile in the caller's file descriptor table, but then closed it using close_fd(). In one of the next merge windows there is also new functionality coming to unix domain sockets that will have to rely on pidfd_prepare()" * tag 'v6.4/pidfd.file' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: fanotify: use pidfd_prepare() fork: use pidfd_prepare() pid: add pidfd_prepare() commit 3323ddce085cdb33331c2c1bb7a88233023566a9 Merge: a632b76b427d8 6e890c5d5021c Author: Linus Torvalds Date: Mon Apr 24 12:52:35 2023 -0700 Merge tag 'v6.4/kernel.user_worker' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull user work thread updates from Christian Brauner: "This contains the work generalizing the ability to create a kernel worker from a userspace process. Such user workers will run with the same credentials as the userspace process they were created from providing stronger security and accounting guarantees than the traditional override_creds() approach ever could've hoped for. The original work was heavily based and optimzed for the needs of io_uring which was the first user. However, as it quickly turned out the ability to create user workers inherting properties from a userspace process is generally useful. The vhost subsystem currently creates workers using the kthread api. The consequences of using the kthread api are that RLIMITs don't work correctly as they are inherited from khtreadd. This leads to bugs where more workers are created than would be allowed by the RLIMITs of the userspace process in lieu of which workers are created. Problems like this disappear with user workers created from the userspace processes for which they perform the work. In addition, providing this api allows vhost to remove additional complexity. For example, cgroup and mm sharing will just work out of the box with user workers based on the relevant userspace process instead of manually ensuring the correct cgroup and mm contexts are used. So the vhost subsystem should simply be made to use the same mechanism as io_uring. To this end the original mechanism used for create_io_thread() is generalized into user workers: - Introduce PF_USER_WORKER as a generic indicator that a given task is a user worker, i.e., a kernel task that was created from a userspace process. Now a PF_IO_WORKER thread is just a specialized version of PF_USER_WORKER. So io_uring io workers raise both flags. - Make copy_process() available to core kernel code - Extend struct kernel_clone_args with the following bitfields allowing to indicate to copy_process(): - to create a user worker (raise PF_USER_WORKER) - to not inherit any files from the userspace process - to ignore signals After all generic changes are in place the vhost subsystem implements a new dedicated vhost api based on user workers. Finally, vhost is switched to rely on the new api moving it off of kthreads. Thanks to Mike for sticking it out and making it through this rather arduous journey" * tag 'v6.4/kernel.user_worker' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: vhost: use vhost_tasks for worker threads vhost: move worker thread fields to new struct vhost_task: Allow vhost layer to use copy_process fork: allow kernel code to call copy_process fork: Add kernel_clone_args flag to ignore signals fork: add kernel_clone_args flag to not dup/clone files fork/vm: Move common PF_IO_WORKER behavior to new flag kernel: Make io_thread and kthread bit fields kthread: Pass in the thread's name during creation kernel: Allow a kernel thread's name to be set in copy_process csky: Remove kernel_thread declaration commit a632b76b427d886911221331f4bfcd44a3e58197 Merge: c23f28975abc2 d95debbdc528d Author: Linus Torvalds Date: Mon Apr 24 12:48:33 2023 -0700 Merge tag 'v6.4/kernel.clone3.tests' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull clone3 selftest fix from Christian Brauner: "This is a single fix to the clone3() selftstests. It fell through the sefltest tree cracks a few times so I'll provide it here. It has low urgency but we should still correctly report the number of tests" * tag 'v6.4/kernel.clone3.tests' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: selftests/clone3: fix number of tests in ksft_set_plan commit 0d68683838f2850dd8ff31f1121e05bfb7a2def0 Author: Jani Nikula Date: Thu Apr 6 16:46:15 2023 +0300 drm/dsc: fix DP_DSC_MAX_BPP_DELTA_* macro values The macro values just don't match the specs. Fix them. Fixes: 1482ec00be4a ("drm: Add missing DP DSC extended capability definitions.") Cc: Vinod Govindapillai Cc: Stanislav Lisovskiy Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20230406134615.1422509-2-jani.nikula@intel.com commit 13525645e2246ebc8a21bd656248d86022a6ee8f Author: Jani Nikula Date: Thu Apr 6 16:46:14 2023 +0300 drm/dsc: fix drm_edp_dsc_sink_output_bpp() DPCD high byte usage The operator precedence between << and & is wrong, leading to the high byte being completely ignored. For example, with the 6.4 format, 32 becomes 0 and 24 becomes 8. Fix it, and remove the slightly confusing and unnecessary DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT macro while at it. Fixes: 0575650077ea ("drm/dp: DRM DP helper/macros to get DP sink DSC parameters") Cc: Stanislav Lisovskiy Cc: Manasi Navare Cc: Anusha Srivatsa Cc: # v5.0+ Signed-off-by: Jani Nikula Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20230406134615.1422509-1-jani.nikula@intel.com commit c23f28975abc2eb02cecc8bc1f2c95473a59ed2e Merge: 1be89faab3cf1 7e8472c820f04 Author: Linus Torvalds Date: Mon Apr 24 12:35:49 2023 -0700 Merge tag 'docs-6.4' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "Commit volume in documentation is relatively low this time, but there is still a fair amount going on, including: - Reorganize the architecture-specific documentation under Documentation/arch This makes the structure match the source directory and helps to clean up the mess that is the top-level Documentation directory a bit. This work creates the new directory and moves x86 and most of the less-active architectures there. The current plan is to move the rest of the architectures in 6.5, with the patches going through the appropriate subsystem trees. - Some more Spanish translations and maintenance of the Italian translation - A new "Kernel contribution maturity model" document from Ted - A new tutorial on quickly building a trimmed kernel from Thorsten Plus the usual set of updates and fixes" * tag 'docs-6.4' of git://git.lwn.net/linux: (47 commits) media: Adjust column width for pdfdocs media: Fix building pdfdocs docs: clk: add documentation to log which clocks have been disabled docs: trace: Fix typo in ftrace.rst Documentation/process: always CC responsible lists docs: kmemleak: adjust to config renaming ELF: document some de-facto PT_* ABI quirks Documentation: arm: remove stih415/stih416 related entries docs: turn off "smart quotes" in the HTML build Documentation: firmware: Clarify firmware path usage docs/mm: Physical Memory: Fix grammar Documentation: Add document for false sharing dma-api-howto: typo fix docs: move m68k architecture documentation under Documentation/arch/ docs: move parisc documentation under Documentation/arch/ docs: move ia64 architecture docs under Documentation/arch/ docs: Move arc architecture docs under Documentation/arch/ docs: move nios2 documentation under Documentation/arch/ docs: move openrisc documentation under Documentation/arch/ docs: move superh documentation under Documentation/arch/ ... commit 1be89faab3cf1f3dd6eb4924b60d2b9094e7206b Merge: 0f50767d7e380 a42077b787680 Author: Linus Torvalds Date: Mon Apr 24 12:31:32 2023 -0700 Merge tag 'linux-kselftest-kunit-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull KUnit updates from Shuah Khan: - several fixes to kunit tool - new klist structure test - support for m68k under QEMU - support for overriding the QEMU serial port - support for SH under QEMU * tag 'linux-kselftest-kunit-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: add tests for using current KUnit test field kunit: tool: Add support for SH under QEMU kunit: tool: Add support for overriding the QEMU serial port .gitignore: Unignore .kunitconfig list: test: Test the klist structure kunit: increase KUNIT_LOG_SIZE to 2048 bytes kunit: Use gfp in kunit_alloc_resource() kernel-doc kunit: tool: fix pre-existing `mypy --strict` errors and update run_checks.py kunit: tool: remove unused imports and variables kunit: tool: add subscripts for type annotations where appropriate kunit: fix bug of extra newline characters in debugfs logs kunit: fix bug in the order of lines in debugfs logs kunit: fix bug in debugfs logs of parameterized tests kunit: tool: Add support for m68k under QEMU commit 0f50767d7e380618f81134a62e9a753dea2aecfb Merge: 5dfb75e842e0e 50ad2fb7ec2b1 Author: Linus Torvalds Date: Mon Apr 24 12:28:34 2023 -0700 Merge tag 'linux-kselftest-next-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest updates from Shuah Khan: - several patches to enhance and fix resctrl test - nolibc support for kselftest with an addition to vprintf() to tools/nolibc/stdio and related test changes - Refactor 'peeksiginfo' ptrace test part - add 'malloc' failures checks in cgroup test_memcontrol - a new prctl test - enhancements sched test with additional ore schedule prctl calls * tag 'linux-kselftest-next-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (25 commits) selftests/resctrl: Fix incorrect error return on test complete selftests/resctrl: Remove duplicate codes that clear each test result file selftests/resctrl: Commonize the signal handler register/unregister for all tests selftests/resctrl: Cleanup properly when an error occurs in CAT test selftests/resctrl: Flush stdout file buffer before executing fork() selftests/resctrl: Return MBA check result and make it to output message selftests/resctrl: Fix set up schemata with 100% allocation on first run in MBM test selftests/resctrl: Use correct exit code when tests fail kselftest/arm64: Convert za-fork to use kselftest.h kselftest: Support nolibc tools/nolibc/stdio: Implement vprintf() selftests/resctrl: Correct get_llc_perf() param in function comment selftests/resctrl: Use remount_resctrlfs() consistently with boolean selftests/resctrl: Change name from CBM_MASK_PATH to INFO_PATH selftests/resctrl: Change initialize_llc_perf() return type to void selftests/resctrl: Replace obsolete memalign() with posix_memalign() selftests/resctrl: Check for return value after write_schemata() selftests/resctrl: Allow ->setup() to return errors selftests/resctrl: Move ->setup() call outside of test specific branches selftests/resctrl: Return NULL if malloc_and_init_memory() did not alloc mem ... commit 5dfb75e842e0ef59fc7bf307e5c52eab215bdb4c Merge: 5d77652fbf231 8ae99857748be Author: Linus Torvalds Date: Mon Apr 24 12:16:14 2023 -0700 Merge tag 'rcu.6.4.april5.2023.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux Pull RCU updates from Joel Fernandes: - Updates and additions to MAINTAINERS files, with Boqun being added to the RCU entry and Zqiang being added as an RCU reviewer. I have also transitioned from reviewer to maintainer; however, Paul will be taking over sending RCU pull-requests for the next merge window. - Resolution of hotplug warning in nohz code, achieved by fixing cpu_is_hotpluggable() through interaction with the nohz subsystem. Tick dependency modifications by Zqiang, focusing on fixing usage of the TICK_DEP_BIT_RCU_EXP bitmask. - Avoid needless calls to the rcu-lazy shrinker for CONFIG_RCU_LAZY=n kernels, fixed by Zqiang. - Improvements to rcu-tasks stall reporting by Neeraj. - Initial renaming of k[v]free_rcu() to k[v]free_rcu_mightsleep() for increased robustness, affecting several components like mac802154, drbd, vmw_vmci, tracing, and more. A report by Eric Dumazet showed that the API could be unknowingly used in an atomic context, so we'd rather make sure they know what they're asking for by being explicit: https://lore.kernel.org/all/20221202052847.2623997-1-edumazet@google.com/ - Documentation updates, including corrections to spelling, clarifications in comments, and improvements to the srcu_size_state comments. - Better srcu_struct cache locality for readers, by adjusting the size of srcu_struct in support of SRCU usage by Christoph Hellwig. - Teach lockdep to detect deadlocks between srcu_read_lock() vs synchronize_srcu() contributed by Boqun. Previously lockdep could not detect such deadlocks, now it can. - Integration of rcutorture and rcu-related tools, targeted for v6.4 from Boqun's tree, featuring new SRCU deadlock scenarios, test_nmis module parameter, and more - Miscellaneous changes, various code cleanups and comment improvements * tag 'rcu.6.4.april5.2023.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux: (71 commits) checkpatch: Error out if deprecated RCU API used mac802154: Rename kfree_rcu() to kvfree_rcu_mightsleep() rcuscale: Rename kfree_rcu() to kfree_rcu_mightsleep() ext4/super: Rename kfree_rcu() to kfree_rcu_mightsleep() net/mlx5: Rename kfree_rcu() to kfree_rcu_mightsleep() net/sysctl: Rename kvfree_rcu() to kvfree_rcu_mightsleep() lib/test_vmalloc.c: Rename kvfree_rcu() to kvfree_rcu_mightsleep() tracing: Rename kvfree_rcu() to kvfree_rcu_mightsleep() misc: vmw_vmci: Rename kvfree_rcu() to kvfree_rcu_mightsleep() drbd: Rename kvfree_rcu() to kvfree_rcu_mightsleep() rcu: Protect rcu_print_task_exp_stall() ->exp_tasks access rcu: Avoid stack overflow due to __rcu_irq_enter_check_tick() being kprobe-ed rcu-tasks: Report stalls during synchronize_srcu() in rcu_tasks_postscan() rcu: Permit start_poll_synchronize_rcu_expedited() to be invoked early rcu: Remove never-set needwake assignment from rcu_report_qs_rdp() rcu: Register rcu-lazy shrinker only for CONFIG_RCU_LAZY=y kernels rcu: Fix missing TICK_DEP_MASK_RCU_EXP dependency check rcu: Fix set/clear TICK_DEP_BIT_RCU_EXP bitmask race rcu/trace: use strscpy() to instead of strncpy() tick/nohz: Fix cpu_is_hotpluggable() by checking with nohz subsystem ... commit 5d77652fbf2318f61af2cf27779951393dd0f749 Merge: 4a4075ada6a5f 0d8c461adbc4a Author: Linus Torvalds Date: Mon Apr 24 12:09:43 2023 -0700 Merge tag 'nolibc.2023.04.04a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull nolibc updates from Paul McKenney: - Add support for loongarch - Fix stack-protector issues - Support additional integral types and signal-related macros - Add support for stdin, stdout, and stderr - Add getuid() and geteuid() - Allow S_I* macros to be overridden by program - Defer to linux/fcntl.h and linux/stat.h to avoid duplicate definitions - Many improvements to the selftests * tag 'nolibc.2023.04.04a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: (22 commits) tools/nolibc: x86_64: add stackprotector support tools/nolibc: i386: add stackprotector support tools/nolibc: tests: add test for -fstack-protector tools/nolibc: tests: fold in no-stack-protector cflags tools/nolibc: add support for stack protector tools/nolibc: tests: constify test_names tools/nolibc: add helpers for wait() signal exits tools/nolibc: add definitions for standard fds selftests/nolibc: Adjust indentation for Makefile selftests/nolibc: Add support for LoongArch tools/nolibc: Add support for LoongArch tools/nolibc: Add statx() and make stat() rely on statx() if necessary tools/nolibc: Include linux/fcntl.h and remove duplicate code tools/nolibc: check for S_I* macros before defining them selftests/nolibc: skip the chroot_root and link_dir tests when not privileged tools/nolibc: add getuid() and geteuid() tools/nolibc: add tests for the integer limits in stdint.h tools/nolibc: enlarge column width of tests tools/nolibc: add integer types and integer limit macros tools/nolibc: add stdint.h ... commit 4a4075ada6a5f51087d6c046b024046bf3864beb Merge: 60eb45074234b 5d65cf6ae6aea Author: Linus Torvalds Date: Mon Apr 24 12:05:08 2023 -0700 Merge tag 'locktorture.2023.04.04a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull locktorture updates from Paul McKenney: "This adds tests for nested locking and also adds support for testing raw spinlocks in PREEMPT_RT kernels" * tag 'locktorture.2023.04.04a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: locktorture: Add raw_spinlock* torture tests for PREEMPT_RT kernels locktorture: With nested locks, occasionally skip main lock locktorture: Add nested locking to rtmutex torture tests locktorture: Add nested locking to mutex torture tests locktorture: Add nested_[un]lock() hooks and nlocks parameter commit 60eb45074234b90333b6241b4fd8d196aa2dfd98 Merge: 406037351e08d cc4a29819b0df Author: Linus Torvalds Date: Mon Apr 24 12:02:25 2023 -0700 Merge tag 'lkmm-scripting.2023.04.07a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull Linux Kernel Memory Model scripting updates from Paul McKenney: "This improves litmus-test documentation and improves the ability to do before/after tests on the https://github.com/paulmckrcu/litmus repo" * tag 'lkmm-scripting.2023.04.07a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: (32 commits) tools/memory-model: Remove out-of-date SRCU documentation tools/memory-model: Document LKMM test procedure tools/memory-model: Use "grep -E" instead of "egrep" tools/memory-model: Use "-unroll 0" to keep --hw runs finite tools/memory-model: Make judgelitmus.sh handle scripted Result: tag tools/memory-model: Add data-race capabilities to judgelitmus.sh tools/memory-model: Add checktheselitmus.sh to run specified litmus tests tools/memory-model: Repair parseargs.sh header comment tools/memory-model: Add "--" to parseargs.sh for additional arguments tools/memory-model: Make history-check scripts use mselect7 tools/memory-model: Make checkghlitmus.sh use mselect7 tools/memory-model: Fix scripting --jobs argument tools/memory-model: Implement --hw support for checkghlitmus.sh tools/memory-model: Add -v flag to jingle7 runs tools/memory-model: Make runlitmus.sh check for jingle errors tools/memory-model: Allow herd to deduce CPU type tools/memory-model: Keep assembly-language litmus tests tools/memory-model: Move from .AArch64.litmus.out to .litmus.AArch.out tools/memory-model: Make runlitmus.sh generate .litmus.out for --hw tools/memory-model: Split runlitmus.sh out of checklitmus.sh ... commit 406037351e08dea03735178bf11046da85f00125 Merge: 022e32094ed2a 57373671d5f5a Author: Linus Torvalds Date: Mon Apr 24 12:00:51 2023 -0700 Merge tag 'lkmm.2023.04.07a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull Linux Kernel Memory Model updates from Paul McKenney "This improves LKMM diagnostic messages, unifies handling of the ordering produced by unlock/lock pairs, adds support for the smp_mb__after_srcu_read_unlock() macro, removes redundant members from the to-r relation, brings SRCU read-side semantics into alignment with Linux-kernel SRCU, makes ppo a subrelation of po, and improves documentation" * tag 'lkmm.2023.04.07a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: Documentation: litmus-tests: Correct spelling tools/memory-model: Add documentation about SRCU read-side critical sections tools/memory-model: Make ppo a subrelation of po tools/memory-model: Provide exact SRCU semantics tools/memory-model: Restrict to-r to read-read address dependency tools/memory-model: Add smp_mb__after_srcu_read_unlock() tools/memory-model: Unify UNLOCK+LOCK pairings to po-unlock-lock-po tools/memory-model: Update some warning labels commit 022e32094ed2a688dcb2721534abd0a291905f29 Merge: 1a0beef98b582 8dec88070d964 Author: Linus Torvalds Date: Mon Apr 24 11:46:53 2023 -0700 Merge tag 'kcsan.2023.04.04a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull KCSAN updates from Paul McKenney: "Kernel concurrency sanitizer (KCSAN) updates for v6.4 This fixes kernel-doc warnings and also updates instrumentation from READ_ONCE() to volatile in order to avoid unaligned load-acquire instructions on arm64 in kernels built with LTO" * tag 'kcsan.2023.04.04a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: kcsan: Avoid READ_ONCE() in read_instrumented_memory() instrumented.h: Fix all kernel-doc format warnings commit 1a0beef98b582b69a2ba44e468f7dfecbcfab48e Merge: dc7e22a368c2a bd8621ca1510e Author: Linus Torvalds Date: Mon Apr 24 11:40:26 2023 -0700 Merge tag 'tpmdd-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm updates from Jarkko Sakkinen: - The .machine keyring, used for Machine Owner Keys (MOK), acquired the ability to store only CA enforced keys, and put rest to the .platform keyring, thus separating the code signing keys from the keys that are used to sign certificates. This essentially unlocks the use of the .machine keyring as a trust anchor for IMA. It is an opt-in feature, meaning that the additional contraints won't brick anyone who does not care about them. - Enable interrupt based transactions with discrete TPM chips (tpm_tis). There was code for this existing but it never really worked so I consider this a new feature rather than a bug fix. Before the driver just fell back to the polling mode. Link: https://lore.kernel.org/linux-integrity/a93b6222-edda-d43c-f010-a59701f2aeef@gmx.de/ Link: https://lore.kernel.org/linux-integrity/20230302164652.83571-1-eric.snowberg@oracle.com/ * tag 'tpmdd-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: (29 commits) tpm: Add !tpm_amd_is_rng_defective() to the hwrng_unregister() call site tpm_tis: fix stall after iowrite*()s tpm/tpm_tis_synquacer: Convert to platform remove callback returning void tpm/tpm_tis: Convert to platform remove callback returning void tpm/tpm_ftpm_tee: Convert to platform remove callback returning void tpm: tpm_tis_spi: Mark ACPI and OF related data as maybe unused tpm: st33zp24: Mark ACPI and OF related data as maybe unused tpm, tpm_tis: Enable interrupt test tpm, tpm_tis: startup chip before testing for interrupts tpm, tpm_tis: Claim locality when interrupts are reenabled on resume tpm, tpm_tis: Claim locality in interrupt handler tpm, tpm_tis: Request threaded interrupt handler tpm, tpm: Implement usage counter for locality tpm, tpm_tis: do not check for the active locality in interrupt handler tpm, tpm_tis: Move interrupt mask checks into own function tpm, tpm_tis: Only handle supported interrupts tpm, tpm_tis: Claim locality before writing interrupt registers tpm, tpm_tis: Do not skip reset of original interrupt vector tpm, tpm_tis: Disable interrupts if tpm_tis_probe_irq() failed tpm, tpm_tis: Claim locality before writing TPM_INT_ENABLE register ... commit dc7e22a368c2a217d2d3338b3bd984fdd0301173 Merge: 62443646a5fdd de93e515db306 Author: Linus Torvalds Date: Mon Apr 24 11:37:24 2023 -0700 Merge tag 'Smack-for-6.4' of https://github.com/cschaufler/smack-next Pull smack updates from Casey Schaufler: "There are two changes, one small and one more substantial: - Remove of an unnecessary cast - The mount option processing introduced with the mount rework makes copies of mount option values. There is no good reason to make copies of Smack labels, as they are maintained on a list and never removed. The code now uses pointers to entries on the list, reducing processing time and memory use" * tag 'Smack-for-6.4' of https://github.com/cschaufler/smack-next: Smack: Improve mount process memory use smack_lsm: remove unnecessary type casting commit 62443646a5fddd2c15dacd670fda84044ee7f748 Merge: 5af4b523ba9be ed35e2f2f0ded Author: Linus Torvalds Date: Mon Apr 24 11:35:15 2023 -0700 Merge tag 'landlock-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux Pull landlock update from Mickaël Salaün: "Improve user space documentation" * tag 'landlock-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: landlock: Clarify documentation for the LANDLOCK_ACCESS_FS_REFER right commit 5af4b523ba9be70372eafab02ebfb9babf77ec7d Merge: 08e30833f86ba c120c98486c28 Author: Linus Torvalds Date: Mon Apr 24 11:33:07 2023 -0700 Merge tag 'tomoyo-pr-20230424' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1 Pull tomoyo update from Tetsuo Handa: "One cleanup patch from Vlastimil Babka" * tag 'tomoyo-pr-20230424' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1: tomoyo: replace tomoyo_round2() with kmalloc_size_roundup() commit fd35fdcbf75b5f31dba6c284886b676bb2145fe6 Author: Davidlohr Bueso Date: Sun Apr 23 15:12:31 2023 -0700 cxl/test: Add mock test for set_timestamp Support the command testing in a unit-test fashion. Reviewed-by: Ira Weiny Signed-off-by: Davidlohr Bueso Link: https://lore.kernel.org/r/20230423221231.6357-1-dave@stgolabs.net Signed-off-by: Dan Williams commit 08e30833f86ba25945e416b9f372791aacfef153 Merge: 72eaa0967b594 d82dcd9e21b77 Author: Linus Torvalds Date: Mon Apr 24 11:21:50 2023 -0700 Merge tag 'lsm-pr-20230420' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm Pull lsm updates from Paul Moore: - Move the LSM hook comment blocks into security/security.c For many years the LSM hook comment blocks were located in a very odd place, include/linux/lsm_hooks.h, where they lived on their own, disconnected from both the function prototypes and definitions. In keeping with current kernel conventions, this moves all of these comment blocks to the top of the function definitions, transforming them into the kdoc format in the process. This should make it much easier to maintain these comments, which are the main source of LSM hook documentation. For the most part the comment contents were left as-is, although some glaring errors were corrected. Expect additional edits in the future as we slowly update and correct the comment blocks. This is the bulk of the diffstat. - Introduce LSM_ORDER_LAST Similar to how LSM_ORDER_FIRST is used to specify LSMs which should be ordered before "normal" LSMs, the LSM_ORDER_LAST is used to specify LSMs which should be ordered after "normal" LSMs. This is one of the prerequisites for transitioning IMA/EVM to a proper LSM. - Remove the security_old_inode_init_security() hook The security_old_inode_init_security() LSM hook only allows for a single xattr which is problematic both for LSM stacking and the IMA/EVM-as-a-LSM effort. This finishes the conversion over to the security_inode_init_security() hook and removes the single-xattr LSM hook. - Fix a reiserfs problem with security xattrs During the security_old_inode_init_security() removal work it became clear that reiserfs wasn't handling security xattrs properly so we fixed it. * tag 'lsm-pr-20230420' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: (32 commits) reiserfs: Add security prefix to xattr name in reiserfs_security_write() security: Remove security_old_inode_init_security() ocfs2: Switch to security_inode_init_security() reiserfs: Switch to security_inode_init_security() security: Remove integrity from the LSM list in Kconfig Revert "integrity: double check iint_cache was initialized" security: Introduce LSM_ORDER_LAST and set it for the integrity LSM device_cgroup: Fix typo in devcgroup_css_alloc description lsm: fix a badly named parameter in security_get_getsecurity() lsm: fix doc warnings in the LSM hook comments lsm: styling fixes to security/security.c lsm: move the remaining LSM hook comments to security/security.c lsm: move the io_uring hook comments to security/security.c lsm: move the perf hook comments to security/security.c lsm: move the bpf hook comments to security/security.c lsm: move the audit hook comments to security/security.c lsm: move the binder hook comments to security/security.c lsm: move the sysv hook comments to security/security.c lsm: move the key hook comments to security/security.c lsm: move the xfrm hook comments to security/security.c ... commit 72eaa0967b594cb9886c2f277a69ac1ea935b1a8 Merge: a5624566431de 4ce1f694eb5d8 Author: Linus Torvalds Date: Mon Apr 24 11:11:59 2023 -0700 Merge tag 'selinux-pr-20230420' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux updates from Paul Moore: - Stop passing the 'selinux_state' pointers as function arguments As discussed during the end of the last development cycle, passing a selinux_state pointer through the SELinux code has a noticeable impact on performance, and with the current code it is not strictly necessary. This simplifies things by referring directly to the single selinux_state global variable which should help improve SELinux performance. - Uninline the unlikely portions of avc_has_perm_noaudit() This change was also based on a discussion from the last development cycle, and is heavily based on an initial proof of concept patch from you. The core issue was that avc_has_perm_noaudit() was not able to be inlined, as intended, due to its size. We solved this issue by extracting the less frequently hit portions of avc_has_perm_noaudit() into a separate function, reducing the size of avc_has_perm_noaudit() to the point where the compiler began inlining the function. We also took the opportunity to clean up some ugly RCU locking in the code that became uglier with the change. - Remove the runtime disable functionality After several years of work by the userspace and distro folks, we are finally in a place where we feel comfortable removing the runtime disable functionality which we initially deprecated at the start of 2020. There is plenty of information in the kernel's deprecation (now removal) notice, but the main motivation was to be able to safely mark the LSM hook structures as '__ro_after_init'. LWN also wrote a good summary of the deprecation this morning which offers a more detailed history: https://lwn.net/SubscriberLink/927463/dcfa0d4ed2872f03 - Remove the checkreqprot functionality The original checkreqprot deprecation notice stated that the removal would happen no sooner than June 2021, which means this falls hard into the "better late than never" bucket. The Kconfig and deprecation notice has more detail on this setting, but the basic idea is that we want to ensure that the SELinux policy allows for the memory protections actually applied by the kernel, and not those requested by the process. While we haven't found anyone running a supported distro that is affected by this deprecation/removal, anyone who is affected would only need to update their policy to reflect the reality of their applications' mapping protections. - Minor Makefile improvements Some minor Makefile improvements to correct some dependency issues likely only ever seen by SELinux developers. I expect we will have at least one more tweak to the Makefile during the next merge window, but it didn't quite make the cutoff this time around. * tag 'selinux-pr-20230420' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: ensure av_permissions.h is built when needed selinux: fix Makefile dependencies of flask.h selinux: stop returning node from avc_insert() selinux: clean up dead code after removing runtime disable selinux: update the file list in MAINTAINERS selinux: remove the runtime disable functionality selinux: remove the 'checkreqprot' functionality selinux: stop passing selinux_state pointers and their offspring selinux: uninline unlikely parts of avc_has_perm_noaudit() commit 8375be2b6414577487486a92995bdc97a7934033 Author: Qi Han Date: Tue Apr 18 14:09:54 2023 +0800 f2fs: remove unnessary comment in __may_age_extent_tree This comment make no sense and is in the wrong place, so let's remove it. Signed-off-by: Qi Han Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 994b442b66a4624a2f471aba5cbae37a79213313 Author: Daeho Jeong Date: Tue Apr 18 10:42:01 2023 -0700 f2fs: allocate node blocks for atomic write block replacement When a node block is missing for atomic write block replacement, we need to allocate it in advance of the replacement. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 591fc34e1f98b0d7eef4aa3440bfdff3c5a1cadd Author: Daeho Jeong Date: Tue Apr 18 10:52:06 2023 -0700 f2fs: use cow inode data when updating atomic write Need to use cow inode data content instead of the one in the original inode, when we try to write the already updated atomic write files. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2e2c6e9b72ce3d137984c867eb5625b8498cfe2b Author: Jaegeuk Kim Date: Mon Apr 17 17:12:52 2023 -0700 f2fs: remove power-of-two limitation of zoned device In f2fs, there's no reason to force po2. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d1efa4a0a696e487f349f837f53a0db88f8f0d74 Author: James Clark Date: Mon Apr 24 14:47:47 2023 +0100 perf cs-etm: Add separate decode paths for timeless and per-thread modes Timeless and per-thread are orthogonal concepts that are currently treated as if they are the same (per-thread == timeless). This breaks when you modify the command line or itrace options to something that the current logic doesn't expect. For example: # Force timeless with Z --itrace=Zi10i # Or inconsistent record options -e cs_etm/timestamp=1/ --per-thread Adding Z for decoding in per-cpu mode is particularly bad because in per-thread mode trace channel IDs are discarded and all assumed to be 0, which would mix trace from different CPUs in per-cpu mode. Although the results might not be perfect in all scenarios, if the user requests no timestamps, it should still be possible to decode in either mode. Especially if the relative times of samples in different processes aren't interesting, quite a bit of space can be saved by turning off timestamps in per-cpu mode. Signed-off-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Denis Nikitin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: Yang Shi Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230424134748.228137-8-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 1764ce069bb05c630de2f108aadb66eaa470131e Author: James Clark Date: Mon Apr 24 14:47:46 2023 +0100 perf cs-etm: Use bool type for boolean values Using u8 for boolean values makes the code a bit more difficult to read so be more explicit by using bool. Signed-off-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Denis Nikitin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: Yang Shi Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230424134748.228137-7-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 7bfc1544d91121dddd3a6e7a289b03b63c660b57 Author: James Clark Date: Mon Apr 24 14:47:45 2023 +0100 perf cs-etm: Allow user to override timestamp and contextid settings Timestamps and context tracking are automatically enabled in per-core mode and it's impossible to override this. Use the new utility function to set them conditionally. Signed-off-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Denis Nikitin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: Yang Shi Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230424134748.228137-6-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 35c51f83dd1ed5db9ddf90e90caf5cb2aa608a35 Author: James Clark Date: Mon Apr 24 14:47:44 2023 +0100 perf cs-etm: Validate options after applying them Currently the cs_etm_set_option() function both validates and applies the config options. Because it's only called when they are added automatically, there are some paths where the user can apply the option on the command line and skip the validation. By moving it to the end it covers both cases. Also, options don't need to be re-applied anyway, Perf handles parsing and applying the config terms automatically. Signed-off-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Denis Nikitin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: Yang Shi Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230424134748.228137-5-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 3963d84b1bf0af98f604c85436076a1eb46373f3 Author: James Clark Date: Mon Apr 24 14:47:43 2023 +0100 perf cs-etm: Don't test full_auxtrace because it's always set There is no path in cs-etm where this isn't true so it doesn't need to be tested. Also re-order the beginning of cs_etm_recording_options() so that nothing is done until the early exit is passed. Signed-off-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Denis Nikitin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: Yang Shi Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230424134748.228137-4-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 6593f019c26cbdee3432f28a3d1ffac9605cf562 Author: James Clark Date: Mon Apr 24 14:47:42 2023 +0100 perf tools: Add util function for overriding user set config values There is some duplicated code to only override config values if they haven't already been set by the user so make a util function for this. Signed-off-by: James Clark Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Denis Nikitin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: Yang Shi Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230424134748.228137-3-james.clark@arm.com [ Moved evsel__set_config_if_unset() to util/pmu.c to avoid dragging stuff into the python binding ] Signed-off-by: Arnaldo Carvalho de Melo commit a5624566431de76b17862383d9ae254d9606cba9 Merge: 487c20b016dc4 034ff37d34071 Author: Linus Torvalds Date: Mon Apr 24 10:39:27 2023 -0700 Merge branch 'x86-rep-insns': x86 user copy clarifications Merge my x86 user copy updates branch. This cleans up a lot of our x86 memory copy code, particularly for user accesses. I've been pushing for microarchitectural support for good memory copying and clearing for a long while, and it's been visible in how the kernel has aggressively used 'rep movs' and 'rep stos' whenever possible. And that micro-architectural support has been improving over the years, to the point where on modern CPU's the best option for a memory copy that would become a function call (as opposed to being something that can just be turned into individual 'mov' instructions) is now to inline the string instruction sequence instead. However, that only makes sense when we have the modern markers for this: the x86 FSRM and FSRS capabilities ("Fast Short REP MOVS/STOS"). So this cleans up a lot of our historical code, gets rid of the legacy marker use ("REP_GOOD" and "ERMS") from the memcpy/memset cases, and replaces it with that modern reality. Note that REP_GOOD and ERMS end up still being used by the known large cases (ie page copyin gand clearing). The reason much of this ends up being about user memory accesses is that the normal in-kernel cases are done by the compiler (__builtin_memcpy() and __builtin_memset()) and getting to the point where we can use our instruction rewriting to inline those to be string instructions will need some compiler support. In contrast, the user accessor functions are all entirely controlled by the kernel code, so we can change those arbitrarily. Thanks to Borislav Petkov for feedback on the series, and Jens testing some of this on micro-architectures I didn't personally have access to. * x86-rep-insns: x86: rewrite '__copy_user_nocache' function x86: remove 'zerorest' argument from __copy_user_nocache() x86: set FSRS automatically on AMD CPUs that have FSRM x86: improve on the non-rep 'copy_user' function x86: improve on the non-rep 'clear_user' function x86: inline the 'rep movs' in user copies for the FSRM case x86: move stac/clac from user copy routines into callers x86: don't use REP_GOOD or ERMS for user memory clearing x86: don't use REP_GOOD or ERMS for user memory copies x86: don't use REP_GOOD or ERMS for small memory clearing x86: don't use REP_GOOD or ERMS for small memory copies commit 487c20b016dc48230367a7be017f40313e53e3bd Author: Linus Torvalds Date: Thu Mar 30 14:53:51 2023 -0700 iov: improve copy_iovec_from_user() code generation Use the same pattern as the compat version of this code does: instead of copying the whole array to a kernel buffer and then having a separate phase of verifying it, just do it one entry at a time, verifying as you go. On Jens' /dev/zero readv() test this improves performance by ~6%. [ This was obviously triggered by Jens' ITER_UBUF updates series ] Reported-and-tested-by: Jens Axboe Link: https://lore.kernel.org/all/de35d11d-bce7-e976-7372-1f2caf417103@kernel.dk/ Signed-off-by: Linus Torvalds commit b9dff2195f8a5847fad801046b26955e05670d31 Merge: d88867a24fa7e 50f9a76ef1273 Author: Linus Torvalds Date: Mon Apr 24 10:29:28 2023 -0700 Merge tag 'iter-ubuf.2-2023-04-21' of git://git.kernel.dk/linux Pull ITER_UBUF updates from Jens Axboe: "This turns singe vector imports into ITER_UBUF, rather than ITER_IOVEC. The former is more trivial to iterate and advance, and hence a bit more efficient. From some very unscientific testing, ~60% of all iovec imports are single vector" * tag 'iter-ubuf.2-2023-04-21' of git://git.kernel.dk/linux: iov_iter: Mark copy_compat_iovec_from_user() noinline iov_iter: import single vector iovecs as ITER_UBUF iov_iter: convert import_single_range() to ITER_UBUF iov_iter: overlay struct iovec and ubuf/len iov_iter: set nr_segs = 1 for ITER_UBUF iov_iter: remove iov_iter_iovec() iov_iter: add iter_iov_addr() and iter_iov_len() helpers ALSA: pcm: check for user backed iterator, not specific iterator type IB/qib: check for user backed iterator, not specific iterator type IB/hfi1: check for user backed iterator, not specific iterator type iov_iter: add iter_iovec() helper block: ensure bio_alloc_map_data() deals with ITER_UBUF correctly commit 449067f3fc9f340da54e383738286881e6634d0b Author: James Clark Date: Mon Apr 24 14:47:41 2023 +0100 perf cs-etm: Fix timeless decode mode detection In this context, timeless refers to the trace data rather than the perf event data. But when detecting whether there are timestamps in the trace data or not, the presence of a timestamp flag on any perf event is used. Since commit f42c0ce573df ("perf record: Always get text_poke events with --kcore option") timestamps were added to a tracking event when --kcore is used which breaks this detection mechanism. Fix it by detecting if trace timestamps exist by looking at the ETM config flags. This would have always been a more accurate way of doing it anyway. This fixes the following error message when using --kcore with Coresight: $ perf record --kcore -e cs_etm// --per-thread $ perf report The perf.data/data data has no samples! Fixes: f42c0ce573df79d1 ("perf record: Always get text_poke events with --kcore option") Reported-by: Yang Shi Signed-off-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: denik@google.com Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/lkml/CAHbLzkrJQTrYBtPkf=jf3OpQ-yBcJe7XkvQstX9j2frz4WF-SQ@mail.gmail.com/ Link: https://lore.kernel.org/r/20230424134748.228137-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit ce1d3bc2733224573600e5564203345caea814eb Author: Arnaldo Carvalho de Melo Date: Thu Apr 20 15:54:11 2023 -0300 perf evsel: Introduce evsel__name_is() method to check if the evsel name is equal to a given string This makes the logic a bit clear by avoiding the !strcmp() pattern and also a way to intercept the pointer if we need to do extra validation on it or to do lazy setting of evsel->name via evsel__name(evsel). Reviewed-by: "Liang, Kan" Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZEGLM8VehJbS0gP2@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d88867a24fa7e9c75b8f86df20d4f40e2fe61e9b Merge: 1a261a6e10e80 60261442c1b91 Author: Linus Torvalds Date: Mon Apr 24 10:26:22 2023 -0700 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM development updates from Russell King: "Four changes for v6.4: - simplify the path to the top vmlinux - three patches to fix vfp with instrumentation enabled (eg lockdep)" * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9294/2: vfp: Fix broken softirq handling with instrumentation enabled ARM: 9293/1: vfp: Pass successful return address via register R3 ARM: 9292/1: vfp: Pass thread_info pointer to vfp_support_entry ARM: 9291/1: decompressor: simplify the path to the top vmlinux commit 1a261a6e10e80cd7c69c3f5bdf47cd41f928fd08 Author: Ruihan Li Date: Tue Apr 25 00:21:10 2023 +0800 scripts: Remove ICC-related dead code Intel compiler support has already been completely removed in commit 95207db8166a ("Remove Intel compiler support"). However, it appears that there is still some ICC-related code in scripts/cc-version.sh. There is no harm in leaving the code as it is, but removing the dead code makes the codebase a bit cleaner. Hopefully all ICC-related stuff in the build scripts will be removed after this commit, given the grep output as below: (linux/scripts) $ grep -i -w -R 'icc' cc-version.sh:ICC) cc-version.sh: min_version=$($min_tool_version icc) dtc/include-prefixes/arm64/qcom/sm6350.dtsi:#include Fixes: 95207db8166a ("Remove Intel compiler support") Signed-off-by: Ruihan Li Reviewed-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Signed-off-by: Linus Torvalds commit d3f2c402e44887e507b65d65f0d0515d46575bf5 Merge: 21def611d8297 73d73f5ee7fb0 ddd66d6347351 0ba4962d01b6a 34ea427e01ea6 Author: Rafael J. Wysocki Date: Mon Apr 24 18:37:20 2023 +0200 Merge branches 'pm-core', 'pm-sleep', 'pm-opp' and 'pm-tools' Merge PM core changes, updates related to system sleep support, operating performance points (OPP) changes and power management utilities changes for 6.4-rc1: - Drop unnecessary (void *) conversions from the PM core (Li zeming). - Add sysfs files to represent time spent in a platform sleep state during suspend-to-idle and make AMD and Intel PMC drivers use them (Mario Limonciello). - Use of_property_present() for testing DT property presence (Rob Herring). - Add set_required_opps() callback to the 'struct opp_table', to make the code paths cleaner (Viresh Kumar). - Update the pm-graph siute of utilities to v5.11 with the following changes: * New script which allows users to install the latest pm-graph from the upstream github repo. * Update all the dmesg suspend/resume PM print formats to be able to process recent timelines using dmesg only. * Add ethtool output to the log for the system's ethernet device if ethtool exists. * Make the tool more robustly handle events where mangled dmesg or ftrace outputs do not include all the requisite data. - Make the sleepgraph utility recognize "CPU killed" messages (Xueqin Luo). * pm-core: PM: core: Remove unnecessary (void *) conversions * pm-sleep: platform/x86/intel/pmc: core: Report duration of time in HW sleep state platform/x86/intel/pmc: core: Always capture counters on suspend platform/x86/amd: pmc: Report duration of time in hw sleep state PM: Add sysfs files to represent time spent in hardware sleep state * pm-opp: OPP: Move required opps configuration to specialized callback OPP: Handle all genpd cases together in _set_required_opps() opp: Use of_property_present() for testing DT property presence * pm-tools: PM: tools: sleepgraph: Recognize "CPU killed" messages pm-graph: Update to v5.11 commit 21def611d82976a1dca8c29b800194f29e013151 Merge: 640324e3e62b5 f914bfdd7f846 Author: Rafael J. Wysocki Date: Mon Apr 24 18:36:07 2023 +0200 Merge branch 'pm-cpuidle' Merge a cpuidle change for 6.4-rc1: - Use of_property_present() for testing DT property presence in the cpuidle code (Rob Herring). * pm-cpuidle: cpuidle: Use of_property_present() for testing DT property presence commit 640324e3e62b5d0fada90a6d120d540956b4774b Merge: 8271f3846fa81 0bdd95cede51d Author: Rafael J. Wysocki Date: Mon Apr 24 18:24:47 2023 +0200 Merge branch 'pm-cpufreq' Merge cpufreq updates for 6.4-rc1: - Fix the frequency unit in cpufreq_verify_current_freq checks() (Sanjay Chandrashekara). - Make mode_state_machine in amd-pstate static (Tom Rix). - Make the cpufreq core require drivers with target_index() to set freq_table (Viresh Kumar). - Fix typo in the ARM_BRCMSTB_AVS_CPUFREQ Kconfig entry (Jingyu Wang). - Use of_property_read_bool() for boolean properties in the pmac32 cpufreq driver (Rob Herring). - Make the cpufreq sysfs interface return proper error codes on obviously invalid input (qinyu). - Add guided autonomous mode support to the AMD P-state driver (Wyes Karny). - Make the Intel P-state driver enable HWP IO boost on all server platforms (Srinivas Pandruvada). - Add opp and bandwidth support to tegra194 cpufreq driver (Sumit Gupta). - Use of_property_present() for testing DT property presence (Rob Herring). - Remove MODULE_LICENSE in non-modules (Nick Alcock). - Add SM7225 to cpufreq-dt-platdev blocklist (Luca Weiss). - Optimizations and fixes for qcom-cpufreq-hw driver (Krzysztof Kozlowski, Konrad Dybcio, and Bjorn Andersson). - DT binding updates for qcom-cpufreq-hw driver (Konrad Dybcio and Bartosz Golaszewski). - Updates and fixes for mediatek driver (Jia-Wei Chang and AngeloGioacchino Del Regno). * pm-cpufreq: (29 commits) cpufreq: use correct unit when verify cur freq cpufreq: tegra194: add OPP support and set bandwidth cpufreq: amd-pstate: Make varaiable mode_state_machine static cpufreq: drivers with target_index() must set freq_table cpufreq: qcom-cpufreq-hw: Revert adding cpufreq qos dt-bindings: cpufreq: cpufreq-qcom-hw: Add QCM2290 dt-bindings: cpufreq: cpufreq-qcom-hw: Sanitize data per compatible dt-bindings: cpufreq: cpufreq-qcom-hw: Allow just 1 frequency domain cpufreq: Add SM7225 to cpufreq-dt-platdev blocklist cpufreq: qcom-cpufreq-hw: fix double IO unmap and resource release on exit cpufreq: mediatek: Raise proc and sram max voltage for MT7622/7623 cpufreq: mediatek: raise proc/sram max voltage for MT8516 cpufreq: mediatek: fix KP caused by handler usage after regulator_put/clk_put cpufreq: mediatek: fix passing zero to 'PTR_ERR' cpufreq: pmac32: Use of_property_read_bool() for boolean properties cpufreq: Fix typo in the ARM_BRCMSTB_AVS_CPUFREQ Kconfig entry cpufreq: warn about invalid vals to scaling_max/min_freq interfaces Documentation: cpufreq: amd-pstate: Update amd_pstate status sysfs for guided cpufreq: amd-pstate: Add guided mode control support via sysfs cpufreq: amd-pstate: Add guided autonomous mode ... commit 4f810294e00bd99da9ec3c8fe3185a73e39bcd6c Merge: 21fc506cf5ef5 2c5a06e5505a7 55f4f6ead46c0 Author: Rafael J. Wysocki Date: Mon Apr 24 18:07:56 2023 +0200 Merge branches 'acpi-utils' and 'acpi-docs' Merge ACPI utilities and documentation updates for 6.4-rc1: - Fix acpi_evaluate_dsm_typed() redefinition error (Kiran K). - Update the pm_profile sysfs attribute documentation (Rafael Wysocki). * acpi-utils: ACPI: utils: Fix acpi_evaluate_dsm_typed() redefinition error * acpi-docs: ACPI: docs: Update the pm_profile sysfs attribute documentation commit 21fc506cf5ef5de9c2cdc04036e35169d2b3e7d6 Merge: 0f318baaf23d0 faae443738c6f abe4f5ae5efa6 45166620b7254 Author: Rafael J. Wysocki Date: Mon Apr 24 18:01:57 2023 +0200 Merge branches 'acpi-bus', 'acpi-video' and 'acpi-misc' Merge ACPI bus type driver changes, ACPI backlight driver updates and a series of cleanups related to of.h for 6.4-rc1: - Ensure that ACPI notify handlers are not running after removal and clean up code in acpi_sb_notify() (Rafael Wysocki). - Remove register_backlight_delay module option and code and remove quirks for false-positive backlight control support advertised on desktop boards (Hans de Goede). - Replace irqdomain.h include with struct declarations in ACPI headers and update several pieces of code previously including of.h implicitly through those headers (Rob Herring). * acpi-bus: ACPI: bus: Ensure that notify handlers are not running after removal ACPI: bus: Add missing braces to acpi_sb_notify() * acpi-video: ACPI: video: Remove desktops without backlight DMI quirks ACPI: video: Remove register_backlight_delay module option and code * acpi-misc: ACPI: Replace irqdomain.h include with struct declarations fpga: lattice-sysconfig-spi: Add explicit include for of.h tpm: atmel: Add explicit include for of.h virtio-mmio: Add explicit include for of.h pata: ixp4xx: Add explicit include for of.h ata: pata_macio: Add explicit include of irqdomain.h serial: 8250_tegra: Add explicit include for of.h net: rfkill-gpio: Add explicit include for of.h staging: iio: resolver: ad2s1210: Add explicit include for of.h iio: adc: ad7292: Add explicit include for of.h commit 0f318baaf23d0feb939cf9d3251712198c429879 Merge: 0e838286080d0 f1e65718ec185 1fbd9029c8d5c 3bd554e03ef41 0dc9a715578b0 Author: Rafael J. Wysocki Date: Mon Apr 24 17:54:02 2023 +0200 Merge branches 'acpi-apei', 'acpi-properties', 'acpi-sbs' and 'acpi-thermal' Merge ACPI APEI changes, ACPI device properties handling update, ACPI SBS driver fixes and ACPI thermal driver cleanup for 6.4-rc1: - Make the APEI error injection code warn on invalid arguments when explicitly indicated by platform (Shuai Xue). - Add CXL error types to the error injection code in APEI (Tony Luck). - Refactor acpi_data_prop_read_single() (Andy Shevchenko). - Fix two issues in the ACPI SBS driver (Armin Wolf). - Replace ternary operator with min_t() in the generic ACPI thermal zone driver (Jiangshan Yi). * acpi-apei: ACPI: APEI: EINJ: warn on invalid argument when explicitly indicated by platform ACPI: APEI: EINJ: Add CXL error types * acpi-properties: ACPI: property: Refactor acpi_data_prop_read_single() * acpi-sbs: ACPI: SBS: Fix handling of Smart Battery Selectors ACPI: EC: Fix oops when removing custom query handlers ACPI: EC: Limit explicit removal of query handlers to custom query handlers * acpi-thermal: ACPI: thermal: Replace ternary operator with min_t() commit 0e838286080d0f458aa20751b15f35f3a7924830 Merge: c90b29cede952 073828e954459 f2cba54a7fbf9 47d26684185d0 4f855dcead6c5 Author: Rafael J. Wysocki Date: Mon Apr 24 17:45:49 2023 +0200 Merge branches 'acpi-processor', 'acpi-pm', 'acpi-tables' and 'acpi-sysfs' Merge ACPI processor driver changes, ACPI power management updates, changes related to parsing ACPI tables and an ACPI sysfs interface update for 6.4-rc1: - Fix evaluating the _PDC ACPI control method when running as Xen dom0 (Roger Pau Monne). - Use platform devices to load ACPI PPC and PCC drivers (Petr Pavlu). - Check for null return of devm_kzalloc() in fch_misc_setup() (Kang Chen). - Log a message if enable_irq_wake() fails for the ACPI SCI (Simon Gaiser). - Initialize the correct IOMMU fwspec while parsing ACPI VIOT (Jean-Philippe Brucker). - Amend indentation and prefix error messages with FW_BUG in the ACPI SPCR parsing code (Andy Shevchenko). - Enable ACPI sysfs support for CCEL records (Kuppuswamy Sathyanarayanan). * acpi-processor: ACPI: processor: Fix evaluating _PDC method when running as Xen dom0 ACPI: cpufreq: Use platform devices to load ACPI PPC and PCC drivers ACPI: processor: Check for null return of devm_kzalloc() in fch_misc_setup() * acpi-pm: ACPI: s2idle: Log when enabling wakeup IRQ fails * acpi-tables: ACPI: VIOT: Initialize the correct IOMMU fwspec ACPI: SPCR: Amend indentation ACPI: SPCR: Prefix error messages with FW_BUG * acpi-sysfs: ACPI: sysfs: Enable ACPI sysfs support for CCEL records commit c963e2ec095cb3f855890be53f56f5a6c6fbe371 Author: Hans de Goede Date: Fri Apr 21 20:37:14 2023 +0200 ASoC: Intel: soc-acpi-byt: Fix "WM510205" match no longer working Commit 7e1d728a94ca ("ASoC: Intel: soc-acpi-byt: Add new WM5102 ACPI HID") added an extra HID to wm5102_comp_ids.codecs, but it forgot to bump wm5102_comp_ids.num_codecs, causing the last codec HID in the codecs list to no longer work. Bump wm5102_comp_ids.num_codecs to fix this. Fixes: 7e1d728a94ca ("ASoC: Intel: soc-acpi-byt: Add new WM5102 ACPI HID") Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230421183714.35186-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit 9e868ca1f269dec9f2062bb8de42b8a94773924e Author: Maxim Kochetkov Date: Sat Apr 22 00:19:50 2023 +0300 ASoC: max98090: make it selectable There is no way to select max98090 from menuconfig right now. Add a Kconfig menu description to allow building the driver standalone. It will allow this codec to be used by any other I2S master without adding extra sound card entry in Kconfig. Signed-off-by: Maxim Kochetkov Link: https://lore.kernel.org/r/20230421211950.20972-1-fido_max@inbox.ru Signed-off-by: Mark Brown commit c90b29cede952452f76477296cef3ef411727dd3 Merge: 03c57b0160f62 df2286655ce12 Author: Rafael J. Wysocki Date: Mon Apr 24 17:31:41 2023 +0200 Merge branch 'acpica' Merge ACPICA material for 6.4-rc1: - Delete bogus node_array array of pointers from AEST table (Jessica Clarke). - Add support for trace buffer extension in GICC to the ACPI MADT parser (Xiongfeng Wang). - Add missing macro ACPI_FUNCTION_TRACE() for acpi_ns_repair_HID() (Xiongfeng Wang). - Add missing tables to astable (Pedro Falcato). - Add support for 64 bit loong_arch compilation to ACPICA (Huacai Chen). - Add support for ASPT table in disassembler to ACPICA (Jeremi Piotrowski). - Add support for Arm's MPAM ACPI table version 2 (Hesham Almatary). - Update all copyrights/signons in ACPICA to 2023 (Bob Moore). - Add support for ClockInput resource (v6.5) (Niyas Sait). - Add RISC-V INTC interrupt controller definition to the list of supported interrupt controllers for MADT (Sunil V L). - Add structure definitions for the RISC-V RHCT ACPI table (Sunil V L). - Address several cases in which the ACPICA code might lead to undefined behavior (Tamir Duberstein). - Make ACPICA code support flexible arrays properly (Kees Cook). - Check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects() (void0red). - Add os specific support for Zephyr RTOS to ACPICA (Najumon). - Update version to 20230331 (Bob Moore). * acpica: (32 commits) ACPICA: Update version to 20230331 ACPICA: add os specific support for Zephyr RTOS ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects ACPICA: acpi_resource_irq: Replace 1-element arrays with flexible array ACPICA: acpi_madt_oem_data: Fix flexible array member definition ACPICA: acpi_dmar_andd: Replace 1-element array with flexible array ACPICA: acpi_pci_routing_table: Replace fixed-size array with flex array member ACPICA: struct acpi_resource_dma: Replace 1-element array with flexible array ACPICA: Introduce ACPI_FLEX_ARRAY ACPICA: struct acpi_nfit_interleave: Replace 1-element array with flexible array ACPICA: actbl2: Replace 1-element arrays with flexible arrays ACPICA: actbl1: Replace 1-element arrays with flexible arrays ACPICA: struct acpi_resource_vendor: Replace 1-element array with flexible array ACPICA: Avoid undefined behavior: load of misaligned address ACPICA: Avoid undefined behavior: member access within misaligned address ACPICA: Avoid undefined behavior: member access within misaligned address ACPICA: Avoid undefined behavior: member access within misaligned address ACPICA: Avoid undefined behavior: member access within misaligned address ACPICA: Avoid undefined behavior: member access within null pointer ACPICA: Avoid undefined behavior: applying zero offset to null pointer ... commit e2a1406c84c43bd104e2f85c4d8ab0b0b1609ab0 Author: Cristian Ciocaltea Date: Wed Apr 19 21:13:08 2023 +0300 dt-bindings: timer: rockchip: Add rk3588 compatible Add compatible string for Rockchip RK3588 timer. Signed-off-by: Cristian Ciocaltea Reviewed-by: Heiko Stuebner Acked-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230419181309.338354-3-cristian.ciocaltea@collabora.com commit 51010c1dc487e7764b7e1ec1c4954068e5880757 Author: Cristian Ciocaltea Date: Wed Apr 19 21:13:07 2023 +0300 dt-bindings: timer: rockchip: Drop superfluous rk3288 compatible The compatible string for Rockchip RK3288 is wrongly provided in the 'enum' item, in addition to the subsequent 'const', which allows the usage of an incorrect specification: compatible = "rockchip,rk3288-timer", "rockchip,rk3288-timer"; As the rk3288 string is also specified in the top-most 'const' item, the binding already allows the usage of the correct variant: compatible = "rockchip,rk3288-timer"; Drop the unwanted rk3288 entry from the enum. Fixes: faa186adbd06 ("dt-bindings: timer: convert rockchip,rk-timer.txt to YAML") Signed-off-by: Cristian Ciocaltea Reviewed-by: Heiko Stuebner Reviewed-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230419181309.338354-2-cristian.ciocaltea@collabora.com commit 87dd04f9b1a37a92ebbea5eb46e4941551d3547e Author: Rob Herring Date: Fri Mar 10 08:47:01 2023 -0600 clocksource/drivers/ti: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230310144702.1541660-1-robh@kernel.org commit 8d7aac5153f21108365137b76e395dcf9bb3a800 Author: Tony Lindgren Date: Wed Apr 12 09:41:41 2023 +0300 clocksource/drivers/timer-ti-dm: Fix finding alwon timer Clean-up commit b6999fa1c847 ("clocksource/drivers/timer-ti-dm: Use of_address_to_resource()") caused a regression where pa is never set making all related SoCs fail to boot. Let's fix this by setting pa if found. Fixes: b6999fa1c847 ("clocksource/drivers/timer-ti-dm: Use of_address_to_resource()") Cc: Rob Herring Signed-off-by: Tony Lindgren Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230412064142.12726-1-tony@atomide.com commit fb73556386e074e9bee9fa2d253aeaefe4e063e0 Author: Qinrun Dai Date: Thu Apr 13 13:50:37 2023 +0000 clocksource/drivers/davinci: Fix memory leak in davinci_timer_register when init fails Smatch reports: drivers/clocksource/timer-davinci.c:332 davinci_timer_register() warn: 'base' from ioremap() not released on lines: 274. Fix this and other potential memory leak problems by adding a set of corresponding exit lables. Fixes: 721154f972aa ("clocksource/drivers/davinci: Add support for clockevents") Signed-off-by: Qinrun Dai Link: https://lore.kernel.org/r/20230413135037.1505799-1-flno@hust.edu.cn Signed-off-by: Daniel Lezcano commit b6f228e800ccf285906bb1c4c366ce3848a5443e Author: Krzysztof Kozlowski Date: Sat Mar 11 18:38:03 2023 +0100 clocksource/drivers/stm32-lp: Drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/clocksource/timer-stm32-lp.c:203:34: error: ‘stm32_clkevent_lp_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230311173803.263446-1-krzysztof.kozlowski@linaro.org commit b1f0390048e2641d3451f8cdbbef24c79d1a8fdd Author: Uwe Kleine-König Date: Mon Mar 13 08:54:30 2023 +0100 clocksource/drivers/timer-ti-dm: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230313075430.2730803-6-u.kleine-koenig@pengutronix.de commit d7b76421c03fa58d16a52eb839302f582602997a Author: Uwe Kleine-König Date: Mon Mar 13 08:54:29 2023 +0100 clocksource/drivers/timer-tegra186: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230313075430.2730803-5-u.kleine-koenig@pengutronix.de commit 8efcbe927c5129d5b2528bbb40034c7dde87a6b6 Author: Uwe Kleine-König Date: Mon Mar 13 08:54:28 2023 +0100 clocksource/drivers/timer-ti-dm: Improve error message in .remove If a platform driver's remove callback returns an error code, the driver core emits a generic (and thus little helpful) error message. Instead emit a more specifc error message about the actual error and return zero to suppress the core's message. Note that returning zero has no side effects apart from not emitting said error message. This prepares converting platform driver's remove message to return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230313075430.2730803-4-u.kleine-koenig@pengutronix.de commit ede38f924a9e3c60382a13576347dc41967e8762 Author: Uwe Kleine-König Date: Mon Mar 13 08:54:27 2023 +0100 clocksource/drivers/timer-stm32-lp: Mark driver as non-removable The comment in the remove callback suggests that the driver is not supposed to be unbound. However returning an error code in the remove callback doesn't accomplish that. Instead set the suppress_bind_attrs property (which makes it impossible to unbind the driver via sysfs). The only remaining way to unbind an stm32-lp device would be module unloading, but that doesn't apply here, as the driver cannot be built as a module. Also drop the useless remove callback. [dlezcano] : Fixed up the wrong function removed Signed-off-by: Uwe Kleine-König Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230313075430.2730803-3-u.kleine-koenig@pengutronix.de commit 78012e3880a62e0eb130a0b5a10230162ad42a06 Author: Uwe Kleine-König Date: Mon Mar 13 08:54:26 2023 +0100 clocksource/drivers/sh_mtu2: Mark driver as non-removable The comment in the remove callback suggests that the driver is not supposed to be unbound. However returning an error code in the remove callback doesn't accomplish that. Instead set the suppress_bind_attrs property (which makes it impossible to unbind the driver via sysfs). The only remaining way to unbind a sh_tmu2 device would be module unloading, but that doesn't apply here, as the driver cannot be built as a module. Also drop the useless remove callback. Signed-off-by: Uwe Kleine-König Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230313075430.2730803-2-u.kleine-koenig@pengutronix.de commit 0fabf9f3a0c1ca44e01c5c4dccacfe69143413c5 Author: Rob Herring Date: Sun Mar 19 11:32:20 2023 -0500 clocksource/drivers/timer-ti-dm: Use of_address_to_resource() Replace of_get_address() and of_translate_address() calls with single call to of_address_to_resource(). Signed-off-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230319163220.226273-1-robh@kernel.org commit f68a40ee4732731f149961abab27a45b6c11f413 Author: Fabio Estevam Date: Tue Mar 7 09:43:13 2023 -0300 clocksource/drivers/timer-imx-gpt: Remove non-DT function mxc_timer_init() was originally only used by non-DT i.MX platforms. i.MX has already been converted to be a DT-only platform. Remove the unused mxc_timer_init() function. Signed-off-by: Fabio Estevam Acked-by: Uwe Kleine-König Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230307124313.708255-1-festevam@denx.de commit 49d576ea72a4fa5be15717babfa308b70b2bc5a4 Author: AngeloGioacchino Del Regno Date: Thu Mar 9 11:39:13 2023 +0100 clocksource/drivers/timer-mediatek: Split out CPUXGPT timers On MediaTek platforms, CPUXGPT is the source for the AArch64 System Timer, read through CNTVCT_EL0. The handling for starting this timer ASAP was introduced in commit 327e93cf9a59 ("clocksource/drivers/timer-mediatek: Implement CPUXGPT timers") which description also contains an important full explanation of the reasons why this driver is necessary and cannot be a module. In preparation for an eventual conversion of timer-mediatek to a platform_driver that would be possibly built as a module, split out the CPUXGPT timers driver to a new timer-mediatek-cpux.c driver. This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Walter Chang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230309103913.116775-1-angelogioacchino.delregno@collabora.com commit fd3f088f35f610a7ee3045b7d172b362342e43c6 Author: Krzysztof Kozlowski Date: Mon Apr 3 11:40:17 2023 +0200 clocksource/drivers/exynos_mct: Explicitly return 0 for shared timer For a shared timers, the mct_init_dt() should not initialize the clock even with global comparator. This is not an error, thus the function should simply return 0, not 'ret'. This also fixes smatch warning: drivers/clocksource/exynos_mct.c:635 mct_init_dt() warn: missing error code? 'ret' Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202304021446.46XVKag0-lkp@intel.com/ Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vincent Whitchurch Reviewed-by: Alim Akhtar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230403094017.9556-1-krzysztof.kozlowski@linaro.org commit c9c8133080c75ce2440001d765dbe8c24f932ea2 Merge: 1b47b80e2fa77 6486a57f05d3d Author: Petr Mladek Date: Mon Apr 24 16:49:08 2023 +0200 Merge branch 'for-6.4/doc' into for-linus commit 83794367dcc6749662b17a1e4b8ec085023fc53b Author: Damien Le Moal Date: Mon Apr 24 22:13:18 2023 +0900 block: Cleanup set_capacity()/bdev_set_nr_sectors() The code for setting a block device capacity (bd_nr_sectors field of struct block_device) is duplicated in set_capacity() and bdev_set_nr_sectors(). Clean this up by making bdev_set_nr_sectors() a block layer internal function defined in block/bdev.c instead of having this function statically defined in block/partitions/core.c. With this change, set_capacity() implementation can be simplified to only calling bdev_set_nr_sectors(). Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230424131318.79935-1-dlemoal@kernel.org Signed-off-by: Jens Axboe commit 32c2f2a46db1322caaf78d5ea747ed5c56d2e353 Author: Andrew Halaney Date: Thu Apr 13 14:15:39 2023 -0500 clk: qcom: gcc-sc8280xp: Add EMAC GDSCs Add the EMAC GDSCs to allow the EMAC hardware to be enabled. Acked-by: Stephen Boyd Reviewed-by: Konrad Dybcio Tested-by: Brian Masney Signed-off-by: Andrew Halaney Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230413191541.1073027-2-ahalaney@redhat.com commit 36cd9fb5344675e9b9d9f96eabcb3cdfdbacc841 Author: Andreas Kemnade Date: Wed Apr 19 13:18:05 2023 +0200 dt-bindings: leds: Add ROHM BD2606MVV LED Document ROHM BD2606MVV LED driver devicetree bindings. Signed-off-by: Andreas Kemnade Reviewed-by: Matti Vaittinen Reviewed-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230419111806.1100437-2-andreas@kemnade.info commit bd8621ca1510e6e802df9855bdc35a04a3cfa932 Author: Jarkko Sakkinen Date: Sun Apr 23 18:49:58 2023 +0300 tpm: Add !tpm_amd_is_rng_defective() to the hwrng_unregister() call site The following crash was reported: [ 1950.279393] list_del corruption, ffff99560d485790->next is NULL [ 1950.279400] ------------[ cut here ]------------ [ 1950.279401] kernel BUG at lib/list_debug.c:49! [ 1950.279405] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI [ 1950.279407] CPU: 11 PID: 5886 Comm: modprobe Tainted: G O 6.2.8_1 #1 [ 1950.279409] Hardware name: Gigabyte Technology Co., Ltd. B550M AORUS PRO-P/B550M AORUS PRO-P, BIOS F15c 05/11/2022 [ 1950.279410] RIP: 0010:__list_del_entry_valid+0x59/0xc0 [ 1950.279415] Code: 48 8b 01 48 39 f8 75 5a 48 8b 72 08 48 39 c6 75 65 b8 01 00 00 00 c3 cc cc cc cc 48 89 fe 48 c7 c7 08 a8 13 9e e8 b7 0a bc ff <0f> 0b 48 89 fe 48 c7 c7 38 a8 13 9e e8 a6 0a bc ff 0f 0b 48 89 fe [ 1950.279416] RSP: 0018:ffffa96d05647e08 EFLAGS: 00010246 [ 1950.279418] RAX: 0000000000000033 RBX: ffff99560d485750 RCX: 0000000000000000 [ 1950.279419] RDX: 0000000000000000 RSI: ffffffff9e107c59 RDI: 00000000ffffffff [ 1950.279420] RBP: ffffffffc19c5168 R08: 0000000000000000 R09: ffffa96d05647cc8 [ 1950.279421] R10: 0000000000000003 R11: ffffffff9ea2a568 R12: 0000000000000000 [ 1950.279422] R13: ffff99560140a2e0 R14: ffff99560127d2e0 R15: 0000000000000000 [ 1950.279422] FS: 00007f67da795380(0000) GS:ffff995d1f0c0000(0000) knlGS:0000000000000000 [ 1950.279424] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1950.279424] CR2: 00007f67da7e65c0 CR3: 00000001feed2000 CR4: 0000000000750ee0 [ 1950.279426] PKRU: 55555554 [ 1950.279426] Call Trace: [ 1950.279428] [ 1950.279430] hwrng_unregister+0x28/0xe0 [rng_core] [ 1950.279436] tpm_chip_unregister+0xd5/0xf0 [tpm] Add the forgotten !tpm_amd_is_rng_defective() invariant to the hwrng_unregister() call site inside tpm_chip_unregister(). Cc: stable@vger.kernel.org Reported-by: Martin Dimov Link: https://lore.kernel.org/linux-integrity/3d1d7e9dbfb8c96125bc93b6b58b90a7@dmarto.com/ Fixes: f1324bbc4011 ("tpm: disable hwrng for fTPM on some AMD designs") Fixes: b006c439d58d ("hwrng: core - start hwrng kthread also for untrusted sources") Tested-by: Martin Dimov Signed-off-by: Jarkko Sakkinen commit 77218e83c83c1cd4b994edfb5b162ece42e73ffe Author: Haris Okanovic Date: Wed Apr 19 17:41:30 2023 +0200 tpm_tis: fix stall after iowrite*()s ioread8() operations to TPM MMIO addresses can stall the CPU when immediately following a sequence of iowrite*()'s to the same region. For example, cyclitest measures ~400us latency spikes when a non-RT usermode application communicates with an SPI-based TPM chip (Intel Atom E3940 system, PREEMPT_RT kernel). The spikes are caused by a stalling ioread8() operation following a sequence of 30+ iowrite8()s to the same address. I believe this happens because the write sequence is buffered (in CPU or somewhere along the bus), and gets flushed on the first LOAD instruction (ioread*()) that follows. The enclosed change appears to fix this issue: read the TPM chip's access register (status code) after every iowrite*() operation to amortize the cost of flushing data to chip across multiple instructions. Signed-off-by: Haris Okanovic Link: https://lore.kernel.org/r/20230323153436.B2SATnZV@linutronix.de Signed-off-by: Sebastian Andrzej Siewior Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 7b69ef62034492b816c65b1d15b45834df2b194e Author: Uwe Kleine-König Date: Mon Mar 20 09:06:07 2023 +0100 tpm/tpm_tis_synquacer: 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 (mostly) ignored 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. 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: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit c3da2c6eeb10e71cc7be33c4b17ced60024fd9b0 Author: Uwe Kleine-König Date: Mon Mar 20 09:06:06 2023 +0100 tpm/tpm_tis: 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 (mostly) ignored 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. 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: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit bd88328607c4650ee8e7746a287375c5a618d09e Author: Uwe Kleine-König Date: Mon Mar 20 09:06:05 2023 +0100 tpm/tpm_ftpm_tee: 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 (mostly) ignored 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. ftpm_tee_remove() returns zero unconditionally (and cannot easily converted to return void). So ignore the return value to be able to make ftpm_plat_tee_remove() return void. Signed-off-by: Uwe Kleine-König Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 3fb29a23fcdadc9d7b60d323bbc1d9896249f6ac Author: Krzysztof Kozlowski Date: Sat Mar 11 18:35:41 2023 +0100 tpm: tpm_tis_spi: Mark ACPI and OF related data as maybe unused The driver can be compile tested with !CONFIG_OF or !CONFIG_ACPI making unused: drivers/char/tpm/tpm_tis_spi_main.c:234:34: error: ‘of_tis_spi_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jarkko Sakkinen commit c3985d8b9c224b359851f0a521ad25a83db6bdca Author: Krzysztof Kozlowski Date: Sat Mar 11 18:35:40 2023 +0100 tpm: st33zp24: Mark ACPI and OF related data as maybe unused The driver can be compile tested with !CONFIG_OF or !CONFIG_ACPI making drivers/char/tpm/st33zp24/i2c.c:141:34: error: ‘of_st33zp24_i2c_match’ defined but not used [-Werror=unused-const-variable=] drivers/char/tpm/st33zp24/spi.c:258:34: error: ‘of_st33zp24_spi_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jarkko Sakkinen commit e644b2f498d297a928efcb7ff6f900c27f8b788e Author: Lino Sanfilippo Date: Thu Nov 24 14:55:38 2022 +0100 tpm, tpm_tis: Enable interrupt test The test for interrupts in tpm_tis_send() is skipped if the flag TPM_CHIP_FLAG_IRQ is not set. Since the current code never sets the flag initially the test is never executed. Fix this by setting the flag in tpm_tis_gen_interrupt() right after interrupts have been enabled and before the test is executed. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 548eb516ec0f7a484a23a902835899341164b8ea Author: Lino Sanfilippo Date: Thu Nov 24 14:55:37 2022 +0100 tpm, tpm_tis: startup chip before testing for interrupts In tpm_tis_gen_interrupt() a request for a property value is sent to the TPM to test if interrupts are generated. However after a power cycle the TPM responds with TPM_RC_INITIALIZE which indicates that the TPM is not yet properly initialized. Fix this by first starting the TPM up before the request is sent. For this the startup implementation is removed from tpm_chip_register() and put into the new function tpm_chip_startup() which is called before the interrupts are tested. Signed-off-by: Lino Sanfilippo Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 955df4f87760b3bb2af253d3fbb12fb712b3ffa6 Author: Lino Sanfilippo Date: Thu Nov 24 14:55:36 2022 +0100 tpm, tpm_tis: Claim locality when interrupts are reenabled on resume In tpm_tis_resume() make sure that the locality has been claimed when tpm_tis_reenable_interrupts() is called. Otherwise the writings to the register might not have any effect. Fixes: 45baa1d1fa39 ("tpm_tis: Re-enable interrupts upon (S3) resume") Signed-off-by: Lino Sanfilippo Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 0e069265bce5a40c4eee52e2364bbbd4dabee94a Author: Lino Sanfilippo Date: Thu Nov 24 14:55:35 2022 +0100 tpm, tpm_tis: Claim locality in interrupt handler Writing the TPM_INT_STATUS register in the interrupt handler to clear the interrupts only has effect if a locality is held. Since this is not guaranteed at the time the interrupt is fired, claim the locality explicitly in the handler. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 0c7e66e5fd69bf21034c9a9b081d7de7c3eb2cea Author: Lino Sanfilippo Date: Thu Nov 24 14:55:34 2022 +0100 tpm, tpm_tis: Request threaded interrupt handler The TIS interrupt handler at least has to read and write the interrupt status register. In case of SPI both operations result in a call to tpm_tis_spi_transfer() which uses the bus_lock_mutex of the spi device and thus must only be called from a sleepable context. To ensure this request a threaded interrupt handler. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 7a2f55d0be296c4e81fd782f3d6c43ed4ec7e265 Author: Lino Sanfilippo Date: Thu Nov 24 14:55:33 2022 +0100 tpm, tpm: Implement usage counter for locality Implement a usage counter for the (default) locality used by the TPM TIS driver: Request the locality from the TPM if it has not been claimed yet, otherwise only increment the counter. Also release the locality if the counter is 0 otherwise only decrement the counter. Since in case of SPI the register accesses are locked by means of the SPI bus mutex use a sleepable lock (i.e. also a mutex) to ensure thread-safety of the counter which may be accessed by both a userspace thread and the interrupt handler. By doing this refactor the names of the amended functions to use a more appropriate prefix. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 35f621287ead686b66aa17aa605ed5d7c95883dc Author: Lino Sanfilippo Date: Thu Nov 24 14:55:32 2022 +0100 tpm, tpm_tis: do not check for the active locality in interrupt handler After driver initialization tpm_tis_data->locality may only be modified in case of a LOCALITY CHANGE interrupt. In this case the interrupt handler iterates over all localities only to assign the active one to tpm_tis_data->locality. However this information is never used any more, so the assignment is not needed. Furthermore without the assignment tpm_tis_data->locality cannot change any more at driver runtime, and thus no protection against concurrent modification is required when the variable is read at other places. So remove this iteration entirely. Signed-off-by: Lino Sanfilippo Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 4303553bced7a1d84583dada552393f5ebd31e54 Author: Lino Sanfilippo Date: Thu Nov 24 14:55:31 2022 +0100 tpm, tpm_tis: Move interrupt mask checks into own function Clean up wait_for_tpm_stat() by moving multiple similar interrupt mask checks into an own function. Signed-off-by: Lino Sanfilippo Suggested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit e87fcf0dc2b47fac5b4824f00f74dfbcd4acd363 Author: Lino Sanfilippo Date: Thu Nov 24 14:55:30 2022 +0100 tpm, tpm_tis: Only handle supported interrupts According to the TPM Interface Specification (TIS) support for "stsValid" and "commandReady" interrupts is only optional. This has to be taken into account when handling the interrupts in functions like wait_for_tpm_stat(). To determine the supported interrupts use the capability query. Also adjust wait_for_tpm_stat() to only wait for interrupt reported status changes. After that process all the remaining status changes by polling the status register. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 15d7aa4e46eba87242a320f39773aa16faddadee Author: Lino Sanfilippo Date: Thu Nov 24 14:55:29 2022 +0100 tpm, tpm_tis: Claim locality before writing interrupt registers In tpm_tis_probe_single_irq() interrupt registers TPM_INT_VECTOR, TPM_INT_STATUS and TPM_INT_ENABLE are modified to setup the interrupts. Currently these modifications are done without holding a locality thus they have no effect. Fix this by claiming the (default) locality before the registers are written. Since now tpm_tis_gen_interrupt() is called with the locality already claimed remove locality request and release from this function. Signed-off-by: Lino Sanfilippo Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit ed9be0e6c892a783800d77a41ca4c7255c6af8c5 Author: Lino Sanfilippo Date: Thu Nov 24 14:55:28 2022 +0100 tpm, tpm_tis: Do not skip reset of original interrupt vector If in tpm_tis_probe_irq_single() an error occurs after the original interrupt vector has been read, restore the interrupts before the error is returned. Since the caller does not check the error value, return -1 in any case that the TPM_CHIP_FLAG_IRQ flag is not set. Since the return value of function tpm_tis_gen_interrupt() is not longer used, make it a void function. Fixes: 1107d065fdf1 ("tpm_tis: Introduce intermediate layer for TPM access") Signed-off-by: Lino Sanfilippo Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 6d789ad726950e612a7f31044260337237c5b490 Author: Lino Sanfilippo Date: Thu Nov 24 14:55:27 2022 +0100 tpm, tpm_tis: Disable interrupts if tpm_tis_probe_irq() failed Both functions tpm_tis_probe_irq_single() and tpm_tis_probe_irq() may setup the interrupts and then return with an error. This case is indicated by a missing TPM_CHIP_FLAG_IRQ flag in chip->flags. Currently the interrupt setup is only undone if tpm_tis_probe_irq_single() fails. Undo the setup also if tpm_tis_probe_irq() fails. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 282657a8bd7fddcf511b834f43705001668b33a7 Author: Lino Sanfilippo Date: Thu Nov 24 14:55:26 2022 +0100 tpm, tpm_tis: Claim locality before writing TPM_INT_ENABLE register In disable_interrupts() the TPM_GLOBAL_INT_ENABLE bit is unset in the TPM_INT_ENABLE register to shut the interrupts off. However modifying the register is only possible with a held locality. So claim the locality before disable_interrupts() is called. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 858e8b792d06f45c427897bd90205a1d90bf430f Author: Lino Sanfilippo Date: Thu Nov 24 14:55:25 2022 +0100 tpm, tpm_tis: Avoid cache incoherency in test for interrupts The interrupt handler that sets the boolean variable irq_tested may run on another CPU as the thread that checks irq_tested as part of the irq test in tpm_tis_send(). Since nothing guarantees cache coherency between CPUs for unsynchronized accesses to boolean variables the testing thread might not perceive the value change done in the interrupt handler. Avoid this issue by setting the bit TPM_TIS_IRQ_TESTED in the flags field of the tpm_tis_data struct and by accessing this field with the bit manipulating functions that provide cache coherency. Also convert all other existing sites to use the proper macros when accessing this bitfield. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 099f26f22f5834ad744aee093ed4d11de13cac15 Author: Eric Snowberg Date: Thu Mar 2 11:46:52 2023 -0500 integrity: machine keyring CA configuration Add machine keyring CA restriction options to control the type of keys that may be added to it. The motivation is separation of certificate signing from code signing keys. Subsquent work will limit certificates being loaded into the IMA keyring to code signing keys used for signature verification. When no restrictions are selected, all Machine Owner Keys (MOK) are added to the machine keyring. When CONFIG_INTEGRITY_CA_MACHINE_KEYRING is selected, the CA bit must be true. Also the key usage must contain keyCertSign, any other usage field may be set as well. When CONFIG_INTEGRITY_CA_MACHINE_KEYRING_MAX is selected, the CA bit must be true. Also the key usage must contain keyCertSign and the digitialSignature usage may not be set. Signed-off-by: Eric Snowberg Acked-by: Mimi Zohar Reviewed-by: Jarkko Sakkinen Tested-by: Mimi Zohar Signed-off-by: Jarkko Sakkinen commit 76adb2fbc69a13c80b39042aab4d34e99309c8d4 Author: Eric Snowberg Date: Thu Mar 2 11:46:51 2023 -0500 KEYS: CA link restriction Add a new link restriction. Restrict the addition of keys in a keyring based on the key to be added being a CA. Signed-off-by: Eric Snowberg Reviewed-by: Mimi Zohar Reviewed-by: Jarkko Sakkinen Tested-by: Mimi Zohar Signed-off-by: Jarkko Sakkinen commit 567671281a751b80918a4531c4ba84b90a2a42c0 Author: Eric Snowberg Date: Thu Mar 2 11:46:50 2023 -0500 KEYS: X.509: Parse Key Usage Parse the X.509 Key Usage. The key usage extension defines the purpose of the key contained in the certificate. id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 } KeyUsage ::= BIT STRING { digitalSignature (0), contentCommitment (1), keyEncipherment (2), dataEncipherment (3), keyAgreement (4), keyCertSign (5), cRLSign (6), encipherOnly (7), decipherOnly (8) } If the keyCertSign or digitalSignature is set, store it in the public_key structure. Having the purpose of the key being stored during parsing, allows enforcement on the usage field in the future. This will be used in a follow on patch that requires knowing the certificate key usage type. Link: https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.3 Signed-off-by: Eric Snowberg Reviewed-by: Mimi Zohar Reviewed-by: Jarkko Sakkinen Tested-by: Mimi Zohar Signed-off-by: Jarkko Sakkinen commit 30eae2b037af54b24109dcaea21db46f6285c69b Author: Eric Snowberg Date: Thu Mar 2 11:46:49 2023 -0500 KEYS: X.509: Parse Basic Constraints for CA Parse the X.509 Basic Constraints. The basic constraints extension identifies whether the subject of the certificate is a CA. BasicConstraints ::= SEQUENCE { cA BOOLEAN DEFAULT FALSE, pathLenConstraint INTEGER (0..MAX) OPTIONAL } If the CA is true, store it in the public_key. This will be used in a follow on patch that requires knowing if the public key is a CA. Link: https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.9 Signed-off-by: Eric Snowberg Reviewed-by: Mimi Zohar Reviewed-by: Jarkko Sakkinen Tested-by: Mimi Zohar Signed-off-by: Jarkko Sakkinen commit ef97e774713fcd34c45f7a7426c7d8845394f7be Author: Eric Snowberg Date: Thu Mar 2 11:46:48 2023 -0500 KEYS: Add missing function documentation Compiling with 'W=1' results in warnings that 'Function parameter or member not described' Add the missing parameters for restrict_link_by_builtin_and_secondary_trusted and restrict_link_to_builtin_trusted. Use /* instead of /** for get_builtin_and_secondary_restriction, since it is a static function. Fix wrong function name restrict_link_to_builtin_trusted. Fixes: d3bfe84129f6 ("certs: Add a secondary system keyring that can be added to dynamically") Signed-off-by: Eric Snowberg Reviewed-by: Petr Vorel Reviewed-by: Mimi Zohar Reviewed-by: Jarkko Sakkinen Tested-by: Mimi Zohar Signed-off-by: Jarkko Sakkinen commit 7f8da9915fcc6386edf86471bf31e162845930a4 Author: Eric Snowberg Date: Thu Mar 2 11:46:47 2023 -0500 KEYS: Create static version of public_key_verify_signature The kernel test robot reports undefined reference to public_key_verify_signature when CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE is not defined. Create a static version in this case and return -EINVAL. Fixes: db6c43bd2132 ("crypto: KEYS: convert public key and digsig asym to the akcipher api") Reported-by: kernel test robot Signed-off-by: Eric Snowberg Reviewed-by: Mimi Zohar Reviewed-by: Petr Vorel Reviewed-by: Jarkko Sakkinen Tested-by: Mimi Zohar Signed-off-by: Jarkko Sakkinen commit eff33245595d7ade7b821c9ed0f688272b16b07b Author: Yu Zhe Date: Thu Mar 16 16:50:37 2023 +0800 tpm: remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 96785d635bc2b9e6f819cc606424d342a37872b4 Author: Mark Hasemeyer Date: Tue Mar 14 13:54:04 2023 -0600 tpm: cr50: i2c: use jiffies to wait for tpm ready irq When waiting for a tpm ready completion, the cr50 i2c driver incorrectly assumes that the value of timeout_a is represented in milliseconds instead of jiffies. Remove the msecs_to_jiffies conversion. Signed-off-by: Mark Hasemeyer Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit baa6584a24494fbbd2862270d39e61b86987cc91 Merge: 7002cbd625467 dc801ea8ae37d Author: Takashi Iwai Date: Mon Apr 24 15:15:31 2023 +0200 Merge tag 'asoc-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v6.4 The bulk of the commits here are for the conversion of drivers to use void remove callbacks but there's a reasonable amount of other stuff going on, the pace of development with the SOF code continues to be high and there's a bunch of new drivers too: - More core cleanups from Morimto-san. - Update drivers to have remove() callbacks returning void, mostly mechanical with some substantial changes. - Continued feature and simplification work on SOF, including addition of a no-DSP mode for bringup, HDA MLink and extensions to the IPC4 protocol. - Hibernation support for CS35L45. - More DT binding conversions. - Support for Cirrus Logic CS35L56, Freescale QMC, Maxim MAX98363, nVidia systems with MAX9809x and RT5631, Realtek RT712, Renesas R-Car Gen4, Rockchip RK3588 and TI TAS5733. commit d9f3a60ebbbd7244fe532dc8dcd278ac1651247f Merge: 25f0617109496 967ca91a996f8 Author: Mark Brown Date: Mon Apr 24 12:59:47 2023 +0100 Tegra TPM driver with HW flow control Merge series from Krishna Yarlagadda : TPM devices may insert wait state on last clock cycle of ADDR phase. For SPI controllers that support full-duplex transfers, this can be detected using software by reading the MISO line. For SPI controllers that only support half-duplex transfers, such as the Tegra QSPI, it is not possible to detect the wait signal from software. The QSPI controller in Tegra234 and Tegra241 implement hardware detection of the wait signal which can be enabled in the controller for TPM devices. Add a flag for this in the SPI core and implement support in the Tegra QuadSPI driver. commit d944eafed618a8507270b324ad9d5405bb7f0b3e Author: Ville Syrjälä Date: Tue Apr 18 20:55:14 2023 +0300 drm/i915: Check pipe source size when using skl+ scalers The skl+ scalers only sample 12 bits of PIPESRC so we can't do any plane scaling at all when the pipe source size is >4k. Make sure the pipe source size is also below the scaler's src size limits. Might not be 100% accurate, but should at least be safe. We can refine the limits later if we discover that recent hw is less restricted. Cc: stable@vger.kernel.org Tested-by: Ross Zwisler Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8357 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230418175528.13117-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula (cherry picked from commit 691248d4135fe3fae64b4ee0676bc96a7fd6950c) Signed-off-by: Joonas Lahtinen commit 46e614cc91f7bd6f7872e434e6bcfda44454aac3 Author: Tiezhu Yang Date: Sun Apr 23 09:38:03 2023 +0800 MIPS: uprobes: Restore thread.trap_nr thread.trap_nr is saved in arch_uprobe_pre_xol(), it should be restored in arch_uprobe_{post,abort}_xol() accordingly, actually it was only done in the post function, just do it in the abort function too, this change is similar with x86 and powerpc. Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 38c87827ffd3c7e1dd61eee9a7dea13d487dc2ed Merge: 9496fffcb28f3 d663d93bb47e7 Author: Wolfram Sang Date: Mon Apr 24 12:50:20 2023 +0200 Merge branch 'i2c/for-current' into i2c/for-mergewindow This should have been in 6.3, but sadly I missed it. commit 2efb07b5ced64d053e6fe6e829e45549aa622168 Merge: fd84c569f7b8b d883a4669a1de Author: David S. Miller Date: Mon Apr 24 11:07:20 2023 +0100 Merge tag 'for-net-next-2023-04-23' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next bluetooth-next pull request for net-next: - Introduce devcoredump support - Add support for Realtek RTL8821CS, RTL8851B, RTL8852BS - Add support for Mediatek MT7663, MT7922 - Add support for NXP w8997 - Add support for Actions Semi ATS2851 - Add support for QTI WCN6855 - Add support for Marvell 88W8997 commit 60fd497c99b336e466db0aaeff44c7d12a1fc10a Author: Paul Mackerras Date: Mon Apr 24 09:02:32 2023 +1000 MAINTAINERS: Remove PPP maintainer I am not currently maintaining the kernel PPP code, so remove my address from the MAINTAINERS entry for it. Signed-off-by: Paul Mackerras Signed-off-by: David S. Miller commit 60ed3cd85b95184936bce70ed7f9e76a6a54a5e1 Author: Paul Mackerras Date: Mon Apr 24 08:59:16 2023 +1000 MAINTAINERS: Remove rage128 framebuffer driver maintainer I have not worked on this code for years, so remove my name as maintainer. Signed-off-by: Paul Mackerras Signed-off-by: Helge Deller commit b04ab8c13a73c10a97126fbe7076b2fbf632ba03 Author: Thomas Zimmermann Date: Mon Apr 24 10:58:25 2023 +0200 fbdev: vfb: Init owner field of struct fb_ops Initialize the owner field of struct fb_ops. Required to prevent module unloading while the driver is in use. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller commit 25ec15abb06194963157fe42d41368b19a0d0d74 Author: Thomas Zimmermann Date: Mon Apr 24 10:58:24 2023 +0200 fbdev: ps3fb: Init owner field of struct fb_ops Initialize the owner field of struct fb_ops. Required to prevent module unloading while the driver is in use. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller commit 55caa9a7aca0e7685ebb9f5082156e89cae36c4a Author: Thomas Zimmermann Date: Mon Apr 24 10:58:23 2023 +0200 fbdev: 68328fb: Init owner field of struct fb_ops Initialize the owner field of struct fb_ops. Required to prevent module unloading while the driver is in use. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller commit b3a7a9ab65ae2f2626c7222fb79cdd433f8c5252 Author: Christophe JAILLET Date: Thu Apr 13 21:33:17 2023 +0200 fbdev: mmp: Fix deferred clk handling in mmphw_probe() When dev_err_probe() is called, 'ret' holds the value of the previous successful devm_request_irq() call. 'ret' should be assigned with a meaningful value before being used in dev_err_probe(). While at it, use and return "PTR_ERR(ctrl->clk)" instead of a hard-coded "-ENOENT" so that -EPROBE_DEFER is handled and propagated correctly. Fixes: 81b63420564d ("fbdev: mmp: Make use of the helper function dev_err_probe()") Signed-off-by: Christophe JAILLET Signed-off-by: Helge Deller commit bfff83c4824308f7acce47baf88858b52bc1314f Author: Randy Dunlap Date: Tue Mar 28 19:15:29 2023 -0700 linux/vt_buffer.h: allow either builtin or modular for macros Fix build errors on ARCH=alpha when CONFIG_MDA_CONSOLE=m. This allows the ARCH macros to be the only ones defined. In file included from ../drivers/video/console/mdacon.c:37: ../arch/alpha/include/asm/vga.h:17:40: error: expected identifier or '(' before 'volatile' 17 | static inline void scr_writew(u16 val, volatile u16 *addr) | ^~~~~~~~ ../include/linux/vt_buffer.h:24:34: note: in definition of macro 'scr_writew' 24 | #define scr_writew(val, addr) (*(addr) = (val)) | ^~~~ ../include/linux/vt_buffer.h:24:40: error: expected ')' before '=' token 24 | #define scr_writew(val, addr) (*(addr) = (val)) | ^ ../arch/alpha/include/asm/vga.h:17:20: note: in expansion of macro 'scr_writew' 17 | static inline void scr_writew(u16 val, volatile u16 *addr) | ^~~~~~~~~~ ../arch/alpha/include/asm/vga.h:25:29: error: expected identifier or '(' before 'volatile' 25 | static inline u16 scr_readw(volatile const u16 *addr) | ^~~~~~~~ Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Helge Deller commit 0ddc95b59f05c280520fc3f23366293bc653d92d Author: Uwe Kleine-König Date: Sun Mar 19 00:54:28 2023 +0100 fbdev: xilinxfb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 89c4bbd457af5e18026e45bedd87f6f097edc83a Author: Uwe Kleine-König Date: Sun Mar 19 00:54:27 2023 +0100 fbdev: wmt_ge_rops: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 024a3cafa5c965fd121948db5023e867cdaf73c9 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:26 2023 +0100 fbdev: wm8505fb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 3ab20cdc752d82939859a2aabe76ffd3fa5ece6f Author: Uwe Kleine-König Date: Sun Mar 19 00:54:25 2023 +0100 fbdev: vt8500lcdfb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 87b1e9a57445e4ee38cf1c03c203c82d5dda6aa3 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:24 2023 +0100 fbdev: via: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 4a5ef62ce73b3c73ad3f844052b37cbabd9e2357 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:23 2023 +0100 fbdev: vga16fb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 24f677094e325dd669b8f60b75779e7ef8263503 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:22 2023 +0100 fbdev: vfb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit f3db09aae19846f92dcf4c7c238a0ea6f9560617 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:21 2023 +0100 fbdev: vesafb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 94bada58284c93a38105637bbab0513f9caa005d Author: Uwe Kleine-König Date: Sun Mar 19 00:54:20 2023 +0100 fbdev: uvesafb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 1fd99273942058f529b7b2821ada51e0d94aac23 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:19 2023 +0100 fbdev: tcx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 7b49f61a7235813045c6adb34fdc5b5a0b7c2862 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:18 2023 +0100 fbdev: sm501fb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 4ba34066a29bd9db89525ed5c18d1838658402eb Author: Uwe Kleine-König Date: Sun Mar 19 00:54:17 2023 +0100 fbdev: simplefb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 068240885346a4f484237e24dc1f75530a58c370 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:16 2023 +0100 fbdev: sh_mobile_lcdcfb: 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 (mostly) ignored 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. 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: Geert Uytterhoeven Signed-off-by: Helge Deller commit 03dfa8d2be6f16c087fe871f043a99857cb38d80 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:15 2023 +0100 fbdev: sh7760fb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit f2f34fb9f94f79f7d7bb12410d2e0b7f3b867a54 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:14 2023 +0100 fbdev: s3c-fb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 77da73b32ceae6bb240fb57be6858042c76f9362 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:13 2023 +0100 fbdev: s1d13xxxfb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit eb703b6089bdeee974a02894a001de3df804f772 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:12 2023 +0100 fbdev: pxafb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 2872c2913abf2d51c2d333477933801e14cc284b Author: Uwe Kleine-König Date: Sun Mar 19 00:54:11 2023 +0100 fbdev: pxa3xx-gcu: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit bcfb6d43bb08babd207a93bce99d86c25febd51d Author: Uwe Kleine-König Date: Sun Mar 19 00:54:10 2023 +0100 fbdev: pxa168fb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit cc6a0d407c4a8c8ce9aa971124592b3c805cf6f6 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:09 2023 +0100 fbdev: platinumfb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 4d7960389f9e91dc7d09734f79346850f4fd11d9 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:08 2023 +0100 fbdev: p9100: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit dc6b77badc752e4965919f7b81ad9e3725ae0a64 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:07 2023 +0100 fbdev: omapfb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit db031426eb4680137f023d75fdb3646664227335 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:06 2023 +0100 fbdev: offb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit d14e9328fef310b42c58688cb5c3caaace5c967e Author: Uwe Kleine-König Date: Sun Mar 19 00:54:05 2023 +0100 fbdev: ocfb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 419368fba704bf34c6d04a891b3989f47678911e Author: Uwe Kleine-König Date: Sun Mar 19 00:54:04 2023 +0100 fbdev: mx3fb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit d0513776c132e040b2a438864dd1a2a362326858 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:03 2023 +0100 fbdev: metronomefb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 3a2ab02ddfacb04f92d47f2fe6e4aef4c95366e4 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:02 2023 +0100 fbdev: mb862xx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 3eafb6a37617eff4678723acb3400fe37e77f631 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:01 2023 +0100 fbdev: leo: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 909b7a3ea3989715ff20c191682c6a90eac3b4a4 Author: Uwe Kleine-König Date: Sun Mar 19 00:54:00 2023 +0100 fbdev: imxfb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit a1bb53688630aff762e79c6e4d781f33283f82a7 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:59 2023 +0100 fbdev: hitfb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit f693b4de3546fa484b86437fb06ac307603aed3e Author: Uwe Kleine-König Date: Sun Mar 19 00:53:58 2023 +0100 fbdev: hgafb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 5be0ce71097d087060cc9e9a416f62fa74e5a9dd Author: Uwe Kleine-König Date: Sun Mar 19 00:53:57 2023 +0100 fbdev: hecubafb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 41aede214f2f68f69d42a802ca8aab5b1aa9ea66 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:56 2023 +0100 fbdev: grvga: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit ecab1e9a54db8a2535d3ee7b25f78c3d02dfad19 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:55 2023 +0100 fbdev: goldfishfb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit e16e7ea4a8e5023ce9a68d7762102b5a9ccb17dd Author: Uwe Kleine-König Date: Sun Mar 19 00:53:54 2023 +0100 fbdev: gbefb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 0dc08e875aca46813efad5a18c98749d2fb41935 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:53 2023 +0100 fbdev: fsl-diu-fb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit b917b0a9c6b92e0abb4e07a9568cd93df831b7ff Author: Uwe Kleine-König Date: Sun Mar 19 00:53:52 2023 +0100 fbdev: ffb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 81431a9eaca14166f4dec21059f67cea81fac688 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:51 2023 +0100 fbdev: ep93xx-fb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 156ebfe4c87d1379fd599677d90056c911dc03f8 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:50 2023 +0100 fbdev: efifb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 33c890d022f91d7807cc9673f7017b480f64b2cf Author: Uwe Kleine-König Date: Sun Mar 19 00:53:49 2023 +0100 fbdev: da8xx-fb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit ac40ac6ca0fae749417819d9081d79886b1154a4 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:48 2023 +0100 fbdev: cobalt_lcdfb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit fdc757fe7cb0f14dff4dc43c843a453d6bc41a48 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:47 2023 +0100 fbdev: clps711x-fb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 2a50e4a1e685f9703763ee4a13f7bc622eecf79e Author: Uwe Kleine-König Date: Sun Mar 19 00:53:46 2023 +0100 fbdev: cg6: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit dd65e6f3fad96150cf54f8757f71884127ec4376 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:45 2023 +0100 fbdev: cg3: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 2d419df353d2558544c894509304acf7753bb4f7 Author: Uwe Kleine-König Date: Sun Mar 19 00:53:44 2023 +0100 fbdev: cg14: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Helge Deller commit 1492c6b1874ac5ed57d8ffef89e2b5c59f804aa8 Author: Henry Willard Date: Wed Apr 12 15:29:53 2023 -0600 MIPS: Don't clear _PAGE_SPECIAL in _PAGE_CHG_MASK In the special case where p = mmap(NULL, ALLOC_SIZE, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS | MAP_POPULATE, -1, 0); is followed by rc = mprotect(p, ALLOC_SIZE, PROT_NONE); the _PAGE_SPECIAL bit in the page tables will be cleared by mistake and the later unmapped operations will incorrectly modify the struct page for the the zero page. This sequence occurs in the madvise05 test of the Linux Test Project suite of tests. This was discovered while testing an older version of the kernel (5.4.17) on a MIPS device. Unfortunately, support for this device is not available in newer kernels, so I can't test this with the latest Linux kernel code. It looks like the problem exists in newer kernels, but I can't verify it. Except for the LTP test, this sequence of calls is probably not common. Passing it along in the hope it will be useful to someone. Signed-off-by: Henry Willard Signed-off-by: Thomas Bogendoerfer commit ce8ac91130b96f651cf6b5245668dfa4969c9c42 Merge: 96ae3995c6930 49aba1c5896b7 e088d80e2a1e7 Author: Borislav Petkov (AMD) Date: Mon Apr 24 09:14:30 2023 +0200 Merge branches 'edac-drivers', 'edac-amd64' and 'edac-misc' into edac-updates Combine all queued EDAC changes for submission into v6.4: * ras/edac-drivers: EDAC/i10nm: Add Intel Sierra Forest server support EDAC/skx: Fix overflows on the DRAM row address mapping arrays * ras/edac-amd64: (27 commits) EDAC/amd64: Fix indentation in umc_determine_edac_cap() EDAC/amd64: Add get_err_info() to pvt->ops EDAC/amd64: Split dump_misc_regs() into dct/umc functions EDAC/amd64: Split init_csrows() into dct/umc functions EDAC/amd64: Split determine_edac_cap() into dct/umc functions EDAC/amd64: Rename f17h_determine_edac_ctl_cap() EDAC/amd64: Split setup_mci_misc_attrs() into dct/umc functions EDAC/amd64: Split ecc_enabled() into dct/umc functions EDAC/amd64: Split read_mc_regs() into dct/umc functions EDAC/amd64: Split determine_memory_type() into dct/umc functions EDAC/amd64: Split read_base_mask() into dct/umc functions EDAC/amd64: Split prep_chip_selects() into dct/umc functions EDAC/amd64: Rework hw_info_{get,put} EDAC/amd64: Merge struct amd64_family_type into struct amd64_pvt EDAC/amd64: Do not discover ECC symbol size for Family 17h and later EDAC/amd64: Drop dbam_to_cs() for Family 17h and later EDAC/amd64: Split get_csrow_nr_pages() into dct/umc functions EDAC/amd64: Rename debug_display_dimm_sizes() * ras/edac-misc: EDAC/altera: Remove MODULE_LICENSE in non-module EDAC: Sanitize MODULE_AUTHOR strings EDAC/amd81[13]1: Remove trailing newline from MODULE_AUTHOR EDAC/i5100: Fix typo in comment EDAC/altera: Remove redundant error logging Signed-off-by: Borislav Petkov (AMD) commit 7002cbd625467084f1ef01b6e365e10b51fc4b9f Author: Oswald Buddenhagen Date: Sun Apr 23 20:10:02 2023 +0200 ALSA: emu10k1: use high-level I/O in set_filterQ() This makes the code shorter and more legible. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230423181002.1246793-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit d184d60aa301e424cd0cf7de90b40744710a2417 Author: Zhengkang Huang Date: Wed Apr 19 18:03:03 2023 +0800 platform/chrome: wilco_ec: remove return value check of debugfs_create_dir() Smatch complains that: wilco_ec_debugfs_probe() warn: 'debug_info->dir' is an error pointer or valid Debugfs checks are generally not supposed to be checked for errors and it is not necessary here. Just delete the dead code. Signed-off-by: Zhengkang Huang Reviewed-by: Dongliang Mu Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20230419100303.343379-1-zkhuang@hust.edu.cn commit 1f3744b89164a430865d18b757b86c4007627855 Author: Tzung-Bi Shih Date: Tue Apr 11 13:33:08 2023 +0800 platform/chrome: cros_ec_debugfs: fix kernel-doc warning Fix the following kernel-doc warning: $ ./scripts/kernel-doc -none drivers/platform/chrome/* [...] warning: This comment starts with '/**', but isn't a kernel-doc comment. Fixes: 14bb09b32f43 ("platform/chrome: cros_ec: Separate logic for getting panic info") Reported-by: kernel test robot Signed-off-by: Tzung-Bi Shih Reviewed-by: Benson Leung Link: https://lore.kernel.org/r/20230411053308.1572493-1-tzungbi@kernel.org commit 26e1dc1bef42a699734056271e790982e2ba8092 Author: Rob Barnes Date: Mon Apr 10 16:58:17 2023 +0000 platform/chrome: cros_ec: Separate logic for getting panic info Create a separate function called cros_ec_get_panicinfo for getting panic info from EC. Currently cros_ec_create_panicinfo is the only caller. Signed-off-by: Rob Barnes Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20230410165817.932449-1-robbarnes@google.com commit dc70234c408c644505a24362b0f095f713e4697e Author: Liang He Date: Wed Mar 22 12:16:57 2023 +0800 platform/chrome: cros_typec_switch: Add missing fwnode_handle_put() In cros_typec_register_switches(), we should add fwnode_handle_put() when break out of the iteration device_for_each_child_node() as it will automatically increase and decrease the refcounter. Fixes: affc804c44c8 ("platform/chrome: cros_typec_switch: Add switch driver") Signed-off-by: Liang He Link: https://lore.kernel.org/r/20230322041657.1857001-1-windhl@126.com Signed-off-by: Prashant Malani commit 554ec02c97254962bbb0a8776c3160d294fc7e51 Author: Tzung-Bi Shih Date: Wed Mar 8 11:12:47 2023 +0800 platform/chrome: cros_ec: remove unneeded label and if-condition Both `ec_dev->ec` and `ec_dev->pd` are initialized to NULL at the beginning of cros_ec_register(). Also, platform_device_unregister() takes care if the given platform_device is NULL. Remove the unneeded goto-label and if-condition. Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230308031247.2866401-1-tzungbi@kernel.org commit 32d2a15ec54a3d8b708b343e50072ccb0e5da83f Author: Gustavo A. R. Silva Date: Mon Mar 6 14:59:04 2023 -0600 platform/chrome: Replace fake flexible arrays with flexible-array member Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Use the DECLARE_FLEX_ARRAY() helper macro to transform zero-length arrays in unions with flexible-array members. Address the following warning found with GCC-13 and -fstrict-flex-arrays=3 enabled: drivers/iio/accel/cros_ec_accel_legacy.c:66:46: warning: array subscript is outside array bounds of ‘struct ec_response_motion_sensor_data[0]’ [-Warray-bounds=] This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/193 Link: https://github.com/KSPP/linux/issues/262 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/ZAZUGBmSLc5wg7AK@work commit c66bb48edd58c3a22072b4f68312c225dc1b0009 Author: Juergen Gross Date: Mon Apr 3 11:27:11 2023 +0200 xen/pvcalls: don't call bind_evtchn_to_irqhandler() under lock bind_evtchn_to_irqhandler() shouldn't be called under spinlock, as it can sleep. This requires to move the calls of create_active() out of the locked regions. This is no problem, as the worst which could happen would be a spurious call of the interrupt handler, causing a spurious wake_up(). Reported-by: Dan Carpenter Link: https://lore.kernel.org/lkml/Y+JUIl64UDmdkboh@kadam/ Signed-off-by: Juergen Gross Reviewed-by: Oleksandr Tyshchenko Reviewed-by: Stefano Stabellini Link: https://lore.kernel.org/r/20230403092711.15285-1-jgross@suse.com Signed-off-by: Juergen Gross commit b2c042cc802fe96d431821bf1cf2f0f04a3eda7d Author: Juergen Gross Date: Tue Mar 28 10:46:02 2023 +0200 xen/scsiback: don't call scsiback_free_translation_entry() under lock scsiback_free_translation_entry() shouldn't be called under spinlock, as it can sleep. This requires to split removing a translation entry from the v2p list from actually calling kref_put() for the entry. Reported-by: Dan Carpenter Link: https://lore.kernel.org/lkml/Y+JUIl64UDmdkboh@kadam/ Signed-off-by: Juergen Gross Reviewed-by: Oleksandr Tyshchenko Link: https://lore.kernel.org/r/20230328084602.20729-1-jgross@suse.com Signed-off-by: Juergen Gross commit fae65ef3a148079103ae935107c62f7830ab52c5 Author: Juergen Gross Date: Tue Mar 28 10:45:49 2023 +0200 xen/pciback: don't call pcistub_device_put() under lock pcistub_device_put() shouldn't be called under spinlock, as it can sleep. For this reason pcistub_device_get_pci_dev() needs to be modified: instead of always calling pcistub_device_get() just do the call of pcistub_device_get() only if it is really needed. This removes the need to call pcistub_device_put(). Reported-by: Dan Carpenter Link: https://lore.kernel.org/lkml/Y+JUIl64UDmdkboh@kadam/ Signed-off-by: Juergen Gross Reviewed-by: Oleksandr Tyshchenko Link: https://lore.kernel.org/r/20230328084549.20695-1-jgross@suse.com Signed-off-by: Juergen Gross commit 74d7970febf7e9005375aeda0df821d2edffc9f7 Author: Namjae Jeon Date: Fri Apr 21 16:09:01 2023 +0900 ksmbd: fix racy issue from using ->d_parent and ->d_name Al pointed out that ksmbd has racy issue from using ->d_parent and ->d_name in ksmbd_vfs_unlink and smb2_vfs_rename(). and use new lock_rename_child() to lock stable parent while underlying rename racy. Introduce vfs_path_parent_lookup helper to avoid out of share access and export vfs functions like the following ones to use vfs_path_parent_lookup(). - rename __lookup_hash() to lookup_one_qstr_excl(). - export lookup_one_qstr_excl(). - export getname_kernel() and putname(). vfs_path_parent_lookup() is used for parent lookup of destination file using absolute pathname given from FILE_RENAME_INFORMATION request. Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit af36c51e0e111de4e908328d49cba49de758f66e Author: David Disseldorp Date: Tue Apr 4 16:29:54 2023 +0200 ksmbd: remove unused compression negotiate ctx packing build_compression_ctxt() is currently unreachable due to conn.compress_algorithm remaining zero (SMB3_COMPRESS_NONE). It appears to have been broken in a couple of subtle ways over the years: - prior to d6c9ad23b421 ("ksmbd: use the common definitions for NEGOTIATE_PROTOCOL") smb2_compression_ctx.DataLength was set to 8, which didn't account for the single CompressionAlgorithms flexible array member. - post d6c9ad23b421 smb2_compression_capabilities_context CompressionAlgorithms is a three member array, while CompressionAlgorithmCount is set to indicate only one member. assemble_neg_contexts() ctxt_size is also incorrectly incremented by sizeof(struct smb2_compression_capabilities_context) + 2, which assumes one flexible array member. Signed-off-by: David Disseldorp Acked-by: Namjae Jeon Signed-off-by: Steve French commit a12a07a85aff72e19520328f78b1c64d2281a1ec Author: David Disseldorp Date: Tue Apr 4 00:47:48 2023 +0200 ksmbd: avoid duplicate negotiate ctx offset increments Both pneg_ctxt and ctxt_size change in unison, with each adding the length of the previously added context, rounded up to an eight byte boundary. Drop pneg_ctxt increments and instead use the ctxt_size offset when passing output pointers to per-context helper functions. This slightly simplifies offset tracking and shaves off a few text bytes. Before (x86-64 gcc 7.5): text data bss dec hex filename 213234 8677 672 222583 36577 ksmbd.ko After: text data bss dec hex filename 213218 8677 672 222567 36567 ksmbd.ko Signed-off-by: David Disseldorp Acked-by: Namjae Jeon Signed-off-by: Steve French commit 34e8ccf9ce24b6b2e275bbe35cd392e18fbbd369 Author: David Disseldorp Date: Mon Apr 3 11:29:55 2023 +0200 ksmbd: set NegotiateContextCount once instead of every inc There are no early returns, so marshalling the incremented NegotiateContextCount with every context is unnecessary. Signed-off-by: David Disseldorp Acked-by: Namjae Jeon Signed-off-by: Steve French commit d883a4669a1def6d121ccf5e64ad28260d1c9531 Author: Luiz Augusto von Dentz Date: Fri Apr 21 11:37:55 2023 -0700 Bluetooth: hci_sync: Only allow hci_cmd_sync_queue if running This makes sure hci_cmd_sync_queue only queue new work if HCI_RUNNING has been set otherwise there is a risk of commands being sent while turning off. Because hci_cmd_sync_queue can no longer queue work while HCI_RUNNING is not set it cannot be used to power on adapters so instead hci_cmd_sync_submit is introduced which bypass the HCI_RUNNING check, so it behaves like the old implementation. Link: https://lore.kernel.org/all/CAB4PzUpDMvdc8j2MdeSAy1KkAE-D3woprCwAdYWeOc-3v3c9Sw@mail.gmail.com/ Signed-off-by: Luiz Augusto von Dentz commit 20981ce2d5a5f79d17da1ace3a93df7b3c6ba3d6 Author: Tim Jiang Date: Wed Apr 19 11:38:05 2023 +0800 Bluetooth: btusb: Add WCN6855 devcoredump support WCN6855 will report memdump via ACL data or HCI event when it get crashed, so we collect memdump to debug firmware. Signed-off-by: Tim Jiang Signed-off-by: Luiz Augusto von Dentz commit 42bc6793e452a526294278b234e9e57cc4a81914 Merge: 457391b038033 9bc37e04823b5 Author: Steve French Date: Mon Apr 24 00:07:14 2023 -0500 Merge tag 'pull-lock_rename_child' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs into ksmbd-for-next lock_rename_child() (for ksmbd folks) Signed-off-by: Al Viro commit b0310d6ed684b862dd29049d7b9cca5589555654 Author: Neeraj Sanjay Kale Date: Wed Apr 19 20:54:13 2023 +0530 Bluetooth: btnxpuart: Enable flow control before checking boot signature This enables flow control before checking for bootloader signature and deciding whether FW download is needed or not. In case of V1 bootloader chips w8987 and w8997, it is observed that if WLAN FW is downloaded first and power save is enabled in wlan core, bootloader signatures are not emitted by the BT core when the chip is put to sleep. As a result, the driver skips FW download and subsequent HCI commands get timeout errors in dmesg as shown below: [ 112.898867] Bluetooth: hci0: Opcode 0x c03 failed: -110 [ 114.914865] Bluetooth: hci0: Setting baudrate failed (-110) [ 116.930856] Bluetooth: hci0: Setting wake-up method failed (-110) By enabling the flow control, the host enables its RTS pin, and an interrupt in chip's UART peripheral causes the bootloader to wake up, enabling the bootloader signatures, which then helps in downloading the bluetooth FW file. This changes all instances of 0/1 for serdev_device_set_flow_control() to false/true. Signed-off-by: Neeraj Sanjay Kale Signed-off-by: Luiz Augusto von Dentz commit f419863588217f76eaf754e1dfce21ea7fcb026d Author: Archie Pusaka Date: Thu Apr 20 20:23:36 2023 +0800 Bluetooth: Cancel sync command before suspend and power off Some of the sync commands might take a long time to complete, e.g. LE Create Connection when the peer device isn't responding might take 20 seconds before it times out. If suspend command is issued during this time, it will need to wait for completion since both commands are using the same sync lock. This patch cancel any running sync commands before attempting to suspend or adapter power off. Signed-off-by: Archie Pusaka Reviewed-by: Ying Hsu Signed-off-by: Luiz Augusto von Dentz commit 7948fe1c92d92313eea5453f83deb7f0141355e8 Author: Max Chou Date: Tue Apr 18 13:43:54 2023 +0800 Bluetooth: btrtl: Add the support for RTL8851B Add the support for RTL8851B BT controller on USB interface. The necessary firmware will be submitted to linux-firmware project. Note that the Bluetooth devices WITH the VID=0x0bda would be set the feature quirk in btrtl_setup_realtek(). It's able to ignore the feature flag set for the specific VID and PID in blacklist_table[] of btusb.c. (check [1]) If Realtek Bluetooth chips WITHOUT the VID=0x0bda, it shall be added the feature flag for the specific VID and PID in blacklist_table[] of btusb.c. (check [2]) [1] '9ab9235fe5cf ("Bluetooth: btrtl: Enable WBS for the specific Realtek devices")' [2] '73280f13c9bb ("Bluetooth: btusb: Add the more support IDs for Realtek RTL8822CE")' The device info from /sys/kernel/debug/usb/devices as below. T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 33 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=b851 Rev= 0.00 S: Manufacturer=Realtek S: Product=802.11ax WLAN Adapter S: SerialNumber=00E04C885A01 C:* #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=01 I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=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#= 2 Alt= 0 #EPs= 8 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=09(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0b(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0c(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Max Chou Signed-off-by: Luiz Augusto von Dentz commit 9e080b53dafae52759c87a105abcb87aa0592cf4 Author: Luiz Augusto von Dentz Date: Mon Apr 17 17:01:16 2023 -0700 Bluetooth: btnxpuart: Fix sparse warnings This fixes the following sparse warnings: drivers/bluetooth/btnxpuart.c:681:23: sparse: sparse: restricted __le16 degrades to integer drivers/bluetooth/btnxpuart.c:690:82: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] req_len @@ got restricted __le16 [usertype] len @@ drivers/bluetooth/btnxpuart.c:690:82: sparse: expected unsigned short [usertype] req_len drivers/bluetooth/btnxpuart.c:690:82: sparse: got restricted __le16 [usertype] len drivers/bluetooth/btnxpuart.c:694:84: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] req_len @@ got restricted __le16 [usertype] len @@ drivers/bluetooth/btnxpuart.c:694:84: sparse: expected unsigned short [usertype] req_len drivers/bluetooth/btnxpuart.c:694:84: sparse: got restricted __le16 [usertype] len drivers/bluetooth/btnxpuart.c:708:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] requested_len @@ got restricted __le16 [usertype] len @@ drivers/bluetooth/btnxpuart.c:708:23: sparse: expected unsigned int [usertype] requested_len drivers/bluetooth/btnxpuart.c:708:23: sparse: got restricted __le16 [usertype] len drivers/bluetooth/btnxpuart.c:787:78: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] chipid @@ got restricted __le16 [usertype] chip_id @@ drivers/bluetooth/btnxpuart.c:787:78: sparse: expected unsigned short [usertype] chipid drivers/bluetooth/btnxpuart.c:787:78: sparse: got restricted __le16 [usertype] chip_id drivers/bluetooth/btnxpuart.c:810:74: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] req_len @@ got restricted __le16 [usertype] len @@ drivers/bluetooth/btnxpuart.c:810:74: sparse: expected unsigned short [usertype] req_len drivers/bluetooth/btnxpuart.c:810:74: sparse: got restricted __le16 [usertype] len drivers/bluetooth/btnxpuart.c:815:76: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] req_len @@ got restricted __le16 [usertype] len @@ drivers/bluetooth/btnxpuart.c:815:76: sparse: expected unsigned short [usertype] req_len drivers/bluetooth/btnxpuart.c:815:76: sparse: got restricted __le16 [usertype] len drivers/bluetooth/btnxpuart.c:834:16: sparse: sparse: restricted __le32 degrades to integer drivers/bluetooth/btnxpuart.c:843:55: sparse: sparse: restricted __le32 degrades to integer drivers/bluetooth/btnxpuart.c:844:36: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected unsigned long [usertype] @@ got restricted __le16 [usertype] len @@ drivers/bluetooth/btnxpuart.c:844:36: sparse: expected unsigned long [usertype] drivers/bluetooth/btnxpuart.c:844:36: sparse: got restricted __le16 [usertype] len Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304160736.Tsa0zTBU-lkp@intel.com/ Signed-off-by: Luiz Augusto von Dentz commit 9a24ce5e29b15c4c6b0c89c04f9df6ce14addefa Author: Max Chou Date: Mon Apr 17 10:33:58 2023 +0800 Bluetooth: btrtl: Firmware format v2 support Realtek changed the format of the firmware file as v2. The driver should implement the patch to extract the firmware data from the firmware file. The future chips must apply this patch for firmware loading. This patch is compatible with the both previous format and v2 as well. Signed-off-by: Allen Chen Signed-off-by: Alex Lu Tested-by: Hilda Wu Signed-off-by: Max Chou Signed-off-by: Luiz Augusto von Dentz commit 0ab905c3be8c2be368821dd2bd1f8d126064d993 Author: Zijun Hu Date: Mon Apr 17 17:39:59 2023 +0800 Bluetooth: Devcoredump: Fix storing u32 without specifying byte order issue API hci_devcd_init() stores its u32 type parameter @dump_size into skb, but it does not specify which byte order is used to store the integer, let us take little endian to store and parse the integer. Fixes: f5cc609d09d4 ("Bluetooth: Add support for hci devcoredump") Signed-off-by: Zijun Hu Signed-off-by: Luiz Augusto von Dentz commit 25c150ac103a4ebeed0319994c742a90634ddf18 Author: Ruihan Li Date: Sun Apr 16 16:14:04 2023 +0800 bluetooth: Perform careful capability checks in hci_sock_ioctl() Previously, capability was checked using capable(), which verified that the caller of the ioctl system call had the required capability. In addition, the result of the check would be stored in the HCI_SOCK_TRUSTED flag, making it persistent for the socket. However, malicious programs can abuse this approach by deliberately sharing an HCI socket with a privileged task. The HCI socket will be marked as trusted when the privileged task occasionally makes an ioctl call. This problem can be solved by using sk_capable() to check capability, which ensures that not only the current task but also the socket opener has the specified capability, thus reducing the risk of privilege escalation through the previously identified vulnerability. Cc: stable@vger.kernel.org Fixes: f81f5b2db869 ("Bluetooth: Send control open and close messages for HCI raw sockets") Signed-off-by: Ruihan Li Signed-off-by: Luiz Augusto von Dentz commit 25e97f7b1866e6b8503be349eeea44bb52d661ce Author: Min Li Date: Mon Apr 17 10:27:54 2023 +0800 Bluetooth: L2CAP: fix "bad unlock balance" in l2cap_disconnect_rsp conn->chan_lock isn't acquired before l2cap_get_chan_by_scid, if l2cap_get_chan_by_scid returns NULL, then 'bad unlock balance' is triggered. Reported-by: syzbot+9519d6b5b79cf7787cf3@syzkaller.appspotmail.com Link: https://lore.kernel.org/all/000000000000894f5f05f95e9f4d@google.com/ Signed-off-by: Min Li Signed-off-by: Luiz Augusto von Dentz commit 000c2fa2c144c499c881a101819cf1936a1f7cf2 Author: Ruihan Li Date: Sun Apr 16 16:02:51 2023 +0800 bluetooth: Add cmd validity checks at the start of hci_sock_ioctl() Previously, channel open messages were always sent to monitors on the first ioctl() call for unbound HCI sockets, even if the command and arguments were completely invalid. This can leave an exploitable hole with the abuse of invalid ioctl calls. This commit hardens the ioctl processing logic by first checking if the command is valid, and immediately returning with an ENOIOCTLCMD error code if it is not. This ensures that ioctl calls with invalid commands are free of side effects, and increases the difficulty of further exploitation by forcing exploitation to find a way to pass a valid command first. Signed-off-by: Ruihan Li Co-developed-by: Marcel Holtmann Signed-off-by: Marcel Holtmann Signed-off-by: Luiz Augusto von Dentz commit db2bf510bd5d57f064d9e1db395ed86a08320c54 Author: Liu Jian Date: Fri Apr 14 18:30:06 2023 +0800 Revert "Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work" This reverts commit 1e9ac114c4428fdb7ff4635b45d4f46017e8916f. This patch introduces a possible null-ptr-def problem. Revert it. And the fixed bug by this patch have resolved by commit 73f7b171b7c0 ("Bluetooth: btsdio: fix use after free bug in btsdio_remove due to race condition"). Fixes: 1e9ac114c442 ("Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work") Signed-off-by: Liu Jian Signed-off-by: Luiz Augusto von Dentz commit 91b6d02ddcd113352bdd895990b252065c596de7 Author: Raul Cheleguini Date: Thu Mar 23 10:45:39 2023 -0300 Bluetooth: Add new quirk for broken set random RPA timeout for ATS2851 The ATS2851 based controller advertises support for command "LE Set Random Private Address Timeout" but does not actually implement it, impeding the controller initialization. Add the quirk HCI_QUIRK_BROKEN_SET_RPA_TIMEOUT to unblock the controller initialization. < HCI Command: LE Set Resolvable Private... (0x08|0x002e) plen 2 Timeout: 900 seconds > HCI Event: Command Status (0x0f) plen 4 LE Set Resolvable Private Address Timeout (0x08|0x002e) ncmd 1 Status: Unknown HCI Command (0x01) Co-developed-by: imoc Signed-off-by: imoc Signed-off-by: Raul Cheleguini Signed-off-by: Luiz Augusto von Dentz commit c09b80be6ffc338634b2f5f8cfa12b6843410834 Author: Luiz Augusto von Dentz Date: Wed Apr 12 17:45:51 2023 -0700 Bluetooth: hci_conn: Fix not waiting for HCI_EVT_LE_CIS_ESTABLISHED When submitting HCI_OP_LE_CREATE_CIS the code shall wait for HCI_EVT_LE_CIS_ESTABLISHED thus enforcing the serialization of HCI_OP_LE_CREATE_CIS as the Core spec does not allow to send them in parallel: BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 4, Part E page 2566: If the Host issues this command before all the HCI_LE_CIS_Established events from the previous use of the command have been generated, the Controller shall return the error code Command Disallowed (0x0C). Signed-off-by: Luiz Augusto von Dentz commit c14516faede33c2c31da45cf950d55dbff42962e Author: Luiz Augusto von Dentz Date: Tue Apr 11 16:14:25 2023 -0700 Bluetooth: hci_conn: Fix not matching by CIS ID This fixes only matching CIS by address which prevents creating new hcon if upper layer is requesting a specific CIS ID. Signed-off-by: Luiz Augusto von Dentz commit 06149746e7203d5ffe2d6faf9799ee36203aa8b8 Author: Luiz Augusto von Dentz Date: Tue Apr 11 16:02:22 2023 -0700 Bluetooth: hci_conn: Add support for linking multiple hcon Since it is required for some configurations to have multiple CIS with the same peer which is now covered by iso-tester in the following test cases: ISO AC 6(i) - Success ISO AC 7(i) - Success ISO AC 8(i) - Success ISO AC 9(i) - Success ISO AC 11(i) - Success Signed-off-by: Luiz Augusto von Dentz commit e4eea890369c00dd58d97b1c066dc2bddf0da2c7 Author: Dan Carpenter Date: Thu Apr 6 11:55:17 2023 +0300 Bluetooth: vhci: Fix info leak in force_devcd_write() There are a number of bugs here: 1) If "count" is less than sizeof(dump_data.data) then it copies uninitialized data. 2) If simple_write_to_buffer() returns -EFAULT then we run into a problem "ret < count" comparison. "count" is an unsigned long so the comparison is type promoted to unsigned long and the negative returns become high positive values. That also results in copying uninitialized data. 3) If "*ppos" is non-zero then the first part of the dump_data buffer is uninitialized. Using copy_from_user() instead of simple_write_to_buffer() is more appropriate here. Fixes: d5d5df6da0aa ("Bluetooth: Add vhci devcoredump support") Signed-off-by: Dan Carpenter Signed-off-by: Luiz Augusto von Dentz commit 0811ff480978a2122f0465cb8682d9f7a2f6a169 Author: Steev Klimaszewski Date: Wed Apr 12 18:58:17 2023 -0500 Bluetooth: hci_qca: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused. Signed-off-by: Steev Klimaszewski Signed-off-by: Luiz Augusto von Dentz commit 9e3c2ea67a4c24f7a7517e863e3adc89c4e3b66d Author: Iulia Tanasescu Date: Tue Apr 11 10:41:35 2023 +0300 Bluetooth: hci_conn: remove extra line in hci_le_big_create_sync Remove extra line setting the broadcast code parameter of the hci_cp_le_create_big struct to 0. The broadcast code is copied from the QoS struct. Signed-off-by: Iulia Tanasescu Signed-off-by: Luiz Augusto von Dentz commit 3c690a0d64f5964977050a91b6bba8de09c13d94 Author: Lanzhe Li Date: Sun Apr 9 21:02:29 2023 +0800 Bluetooth: fix inconsistent indenting Fixed a wrong indentation before "return".This line uses a 7 space indent instead of a tab. Signed-off-by: Lanzhe Li Signed-off-by: Luiz Augusto von Dentz commit 305d6b6e485e46a7a3e85d5bfecda9af2294f423 Author: Neeraj Sanjay Kale Date: Mon Apr 3 17:54:30 2023 +0530 Bluetooth: btnxpuart: No need to check the received bootloader signature We can never assume the uart will deliver a complete packet to the BT layer at once, the expected packet may be divided into several parts by uart as uart doesn't know the received packet size, the received data count may mismatch with the expected packet size, so here is_valid_bootloader_signature() check may always return false. Even we remove the count check in is_valid_bootloader_signature(), then the first part of the data which includes the packet type can pass the is_valid_bootloader_signature() check, but the remaining parts don't have the packet type data still cannot pass the check, here return directly will cause the data loss. So need to remove the received bootloader signature check here, the h4_recv_buf() can help us combine the different data received into one packet. If any out-of-sync or incomplete bootloader signature is received, it is safe to ignore and discard it, and process the next bootloader signature. Co-developed-by: Sherry Sun Signed-off-by: Sherry Sun Signed-off-by: Neeraj Sanjay Kale Signed-off-by: Luiz Augusto von Dentz commit 893410b221f4966890e5bc33be08d38d4bc968b2 Author: Neeraj Sanjay Kale Date: Mon Apr 3 17:54:29 2023 +0530 Bluetooth: btnxpuart: Disable Power Save feature on startup This sets the default power save mode setting to disabled. With this setting, this driver will behave like a normal h4 driver. If user needs to use the power save feature, it can be enabled using the following vendor command: hcitool cmd 3f 23 02 00 00 (HCI_NXP_AUTO_SLEEP_MODE) Signed-off-by: Neeraj Sanjay Kale Signed-off-by: Luiz Augusto von Dentz commit 86d55f124b52de2ba0d066d89b766bcc0387fd72 Author: Neeraj Sanjay Kale Date: Mon Apr 3 17:54:28 2023 +0530 Bluetooth: btnxpuart: Deasset UART break before closing serdev device This adds a call to ps_wakeup() before closing the serdev device, to de-assert UART break. Signed-off-by: Neeraj Sanjay Kale Signed-off-by: Luiz Augusto von Dentz commit 38a4f83d802caf5e7ec93a187d211d87b6d67800 Author: Neeraj Sanjay Kale Date: Mon Apr 3 17:54:27 2023 +0530 Bluetooth: btnxpuart: Add support to download helper FW file for w8997 This adds support to download helper FW file for the legacy NXP chipset 88w8997 for the btnxpuart driver. This helper FW file is necessary to set the bootloader baudrate to 3000000 after which the actual BT FW file can be downloaded. This change helps bring the FW download time from around 10 sec to less than 2 sec for 88w8997 chip. For newer chipsets, both V1 and V3 bootloader, driver sends the cmd5 and cmd7 to the chip bootloader, and does not need a helper FW file. Signed-off-by: Neeraj Sanjay Kale Signed-off-by: Luiz Augusto von Dentz commit 09df5a91e620a2d21f7f410938e5e28364fae0bf Author: Hans de Goede Date: Fri Mar 31 23:11:24 2023 +0200 Bluetooth: hci_bcm: Add Acer Iconia One 7 B1-750 to the bcm_broken_irq_dmi_table The DSDT for the Acer Iconia One 7 B1-750 models (which share the same mainboard) specifies a IOAPIC IRQ for the HCI -> host IRQ but this is not correct. Like the Asus TF103C these tablets use pin 17 of the INT33FC:02 GPIO controller for the IRQ and this pin is _not_ configured in direct IRQ mode by the firmware. Add a DMI match for this, re-using the Asus TF103C gpiod_lookup_table, to fix bluetooth not working on these tablets. Signed-off-by: Hans de Goede Signed-off-by: Luiz Augusto von Dentz commit 9a09460274d311466b44743c281c81f36c3e4df4 Author: Hans de Goede Date: Fri Mar 31 23:11:23 2023 +0200 Bluetooth: hci_bcm: Add Lenovo Yoga Tablet 2 830 / 1050 to the bcm_broken_irq_dmi_table The DSDT for the Lenovo Yoga Tablet 2 830 / 1050 models (which share the same mainboard) specifies a IOAPIC IRQ for the HCI -> host IRQ but this is not correct. Like the Asus TF103C these tablets use pin 17 of the INT33FC:02 GPIO controller for the IRQ and this pin is _not_ configured in direct IRQ mode by the firmware. Add a DMI match for this, re-using the Asus TF103C gpiod_lookup_table, to fix bluetooth not working on these tablets. Signed-off-by: Hans de Goede Signed-off-by: Luiz Augusto von Dentz commit ce439473acdf0a3aecbda616a0f92973ab1c2e52 Author: Hans de Goede Date: Fri Mar 31 23:11:22 2023 +0200 Bluetooth: hci_bcm: Limit bcm43430a0 / bcm43430a1 baudrate to 2000000 The bcm43430a0 and bcm43430a1 BT does not support the 0xfc45 command to set the UART clock to 48 MHz and it also does not work at 4000000 baud without this command as some newer models do. These chips are found on ACPI/x86 devices where the operating baudrate does not come from the firmware but is hardcoded at 4000000, which does not work. Add a max_baudrate value to struct bcm_device_data and set this to 2000000 on all known ACPI hardware-ids for the bcm43430a0 and the bcm43430a1. Note this also adds the BCM2E9F ACPI HID which was missing until now. Signed-off-by: Hans de Goede Signed-off-by: Luiz Augusto von Dentz commit 0d218c3642b9ccf71f44987cd03c19320f3bd918 Author: Hans de Goede Date: Fri Mar 31 23:11:21 2023 +0200 Bluetooth: hci_bcm: Fall back to getting bdaddr from EFI if not set On some devices the BCM Bluetooth adapter does not have a valid bdaddr set. btbcm.c currently sets HCI_QUIRK_INVALID_BDADDR to indicate when this is the case. But this requires users to manual setup a btaddr, by doing e.g.: btmgmt -i hci0 public-addr 'B0:F1:EC:82:1D:B3' Which means that Bluetooth will not work out of the box on such devices. To avoid this (where possible) hci_bcm sets: HCI_QUIRK_USE_BDADDR_PROPERTY which tries to get the bdaddr from devicetree. But this only works on devicetree platforms. On UEFI based platforms there is a special Broadcom UEFI variable which when present contains the devices bdaddr, just like how there is another UEFI variable which contains wifi nvram contents including the wifi MAC address. Add support for getting the bdaddr from this Broadcom UEFI variable, so that Bluetooth will work OOTB for users on devices where this UEFI variable is present. This fixes Bluetooth not working on for example Asus T100HA 2-in-1s. Signed-off-by: Hans de Goede Signed-off-by: Luiz Augusto von Dentz commit 3c0d41f141c97e516d986f0571b0d7a745a4e2a8 Author: Qiqi Zhang Date: Tue Apr 4 10:27:11 2023 +0800 Bluetooth: hci_h5: Complements reliable packet processing logic As shown in the schematic diagram below.There may be a critical scenario in the current code. If the device does not receive an pure ack sent by the host due to insufficient receive buffer or other reasons and triggers a retransmission, the host will always be in an 'out-of-order' state.The state machine will get stuck. host device SEQ3,ACK4 ---------> <--------- SEQ4,ACK4 pure ACK ---------> (not received) (out-of-order) <--------- SEQ4,ACK4(retransmission) ........ (out-of-order) <--------- SEQ4,ACK4(retransmission) According to the description in the core specification: "whenever a reliable packet is received, an acknowledgment shall be generated." So set H5_TX_ACK_REQ bit to trigger retransmission of pure ack packet when "out-of-order" occurs. Signed-off-by: Qiqi Zhang Signed-off-by: Luiz Augusto von Dentz commit 288c90224eec55d13e786844b7954ef060752089 Author: Luiz Augusto von Dentz Date: Mon Dec 19 13:37:02 2022 -0800 Bluetooth: Enable all supported LE PHY by default This enables 2M and Coded PHY by default if they are marked as supported in the LE features bits. Signed-off-by: Luiz Augusto von Dentz commit 0fe8c8d071343fa9278980ce4b6f8e6ea24a2ed1 Author: Iulia Tanasescu Date: Fri Mar 31 18:38:01 2023 +0300 Bluetooth: Split bt_iso_qos into dedicated structures Split bt_iso_qos into dedicated unicast and broadcast structures and add additional broadcast parameters. Fixes: eca0ae4aea66 ("Bluetooth: Add initial implementation of BIS connections") Signed-off-by: Iulia Tanasescu Signed-off-by: Luiz Augusto von Dentz commit af395330abed142a2685bf3d17a938544816bf3c Author: Abhishek Pandit-Subedi Date: Thu Mar 30 09:58:26 2023 -0700 Bluetooth: btintel: Add Intel devcoredump support Intercept debug exception events from the controller and put them into a devcoredump using hci devcoredump APIs. The debug exception contains data in a TLV format and it will be parsed in userspace. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Manish Mandlik Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Chethan Tumkur Narayan Signed-off-by: Luiz Augusto von Dentz commit 4f9c1a089623ac606e79a7886646939e0e2f89bf Author: Manish Mandlik Date: Thu Mar 30 09:58:25 2023 -0700 Bluetooth: btusb: Add btusb devcoredump support This patch implements the btusb driver side .coredump() callback to trigger a devcoredump via sysfs. Signed-off-by: Manish Mandlik Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Luiz Augusto von Dentz commit ab4e4380d4e158486e595013a2635190e07e28ce Author: Manish Mandlik Date: Thu Mar 30 09:58:24 2023 -0700 Bluetooth: Add vhci devcoredump support Add devcoredump support for vhci that creates forcce_devcoredump debugfs entry. This is used for mgmt-tester tests. Signed-off-by: Manish Mandlik Signed-off-by: Luiz Augusto von Dentz commit 9695ef876fd122cb7bbc04a4a93b8727d2e36bda Author: Abhishek Pandit-Subedi Date: Thu Mar 30 09:58:23 2023 -0700 Bluetooth: Add support for hci devcoredump Add devcoredump APIs to hci core so that drivers only have to provide the dump skbs instead of managing the synchronization and timeouts. The devcoredump APIs should be used in the following manner: - hci_devcoredump_init is called to allocate the dump. - hci_devcoredump_append is called to append any skbs with dump data OR hci_devcoredump_append_pattern is called to insert a pattern. - hci_devcoredump_complete is called when all dump packets have been sent OR hci_devcoredump_abort is called to indicate an error and cancel an ongoing dump collection. The high level APIs just prepare some skbs with the appropriate data and queue it for the dump to process. Packets part of the crashdump can be intercepted in the driver in interrupt context and forwarded directly to the devcoredump APIs. Internally, there are 5 states for the dump: idle, active, complete, abort and timeout. A devcoredump will only be in active state after it has been initialized. Once active, it accepts data to be appended, patterns to be inserted (i.e. memset) and a completion event or an abort event to generate a devcoredump. The timeout is initialized at the same time the dump is initialized (defaulting to 10s) and will be cleared either when the timeout occurs or the dump is complete or aborted. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Manish Mandlik Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Luiz Augusto von Dentz commit 77f542b10c535c9a93bf8afdd2665524935807c2 Author: Chethan T N Date: Tue Mar 21 10:03:10 2023 +0530 Bluetooth: btintel: Add LE States quirk support Basically all Intel controllers support both Central/Peripheral LE states. This patch enables the LE States quirk by default on all Solar and Magnertor Intel controllers. Signed-off-by: Chethan T N Signed-off-by: Luiz Augusto von Dentz commit 095327fede005f4b14d40b2183b2f7965c739dbd Author: Steev Klimaszewski Date: Sun Mar 26 18:38:10 2023 -0500 Bluetooth: hci_qca: Add support for QTI Bluetooth chip wcn6855 Add regulators, GPIOs and changes required to power on/off wcn6855. Add support for firmware download for wcn6855 which is in the linux-firmware repository as hpbtfw21.tlv and hpnv21.bin. Based on the assumption that this is similar to the wcn6750 Tested-on: BTFW.HSP.2.1.0-00538-VER_PATCHZ-1 Signed-off-by: Steev Klimaszewski Reviewed-by: Bjorn Andersson Tested-by: Bjorn Andersson Signed-off-by: Luiz Augusto von Dentz commit b1d00baaa0298a5e033bc00a92522e4fd07900a8 Author: Steev Klimaszewski Date: Sun Mar 26 18:38:09 2023 -0500 dt-bindings: net: Add WCN6855 Bluetooth Add bindings for the QTI WCN6855 chipset. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Steev Klimaszewski Signed-off-by: Luiz Augusto von Dentz commit 253cf30e8d3d001850a95c4729d668f916b037ab Author: Max Chou Date: Tue Mar 21 19:48:26 2023 +0800 Bluetooth: btrtl: check for NULL in btrtl_set_quirks() The btrtl_set_quirks() has accessed btrtl_dev->ic_info->lmp_subver since b8e482d02513. However, if installing a Realtek Bluetooth controller without the driver supported, it will hit the NULL point accessed. Add a check for NULL to avoid the Kernel Oops. Signed-off-by: Max Chou Signed-off-by: Luiz Augusto von Dentz commit 069f534247bb6db4f8c2c2ea8e9155abf495c37e Author: Larry Finger Date: Wed Mar 22 19:52:03 2023 -0500 bluetooth: Add device 13d3:3571 to device tables This device is part of a Realtek RTW8852BE chip. The device table is as follows: T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3571 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: Larry Finger Signed-off-by: Luiz Augusto von Dentz commit 730a1d1a93a3e30c3723f87af97a8517334b2203 Author: Larry Finger Date: Wed Mar 22 19:52:02 2023 -0500 bluetooth: Add device 0bda:887b to device tables This device is part of a Realtek RTW8852BE chip. The device table entry is as follows: T: Bus=03 Lev=01 Prnt=01 Port=12 Cnt=02 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=887b 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: Larry Finger Signed-off-by: Luiz Augusto von Dentz commit 11e29b4a3fda975f4427800285b7e4544f4e9152 Author: Arnd Bergmann Date: Wed Mar 22 12:16:27 2023 +0100 Bluetooth: NXP: select CONFIG_CRC8 The driver needs both CRC32 and CRC8 to link correctly: ld: drivers/bluetooth/btnxpuart.o: in function `nxp_serdev_probe': drivers/bluetooth/btnxpuart.c:1214: undefined reference to `crc8_populate_msb' ld: drivers/bluetooth/btnxpuart.o: in function `nxp_send_ack': drivers/bluetooth/btnxpuart.c:559: undefined reference to `crc8' ld: drivers/bluetooth/btnxpuart.c:559: undefined reference to `crc8' Fixes: 3e662aa4453a ("Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets") Signed-off-by: Arnd Bergmann Reviewed-by: Ilpo Järvinen Signed-off-by: Luiz Augusto von Dentz commit 689ca16e523278470c38832a3010645a78c544d8 Author: Neeraj Sanjay Kale Date: Thu Mar 16 22:52:14 2023 +0530 Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets This adds a driver based on serdev driver for the NXP BT serial protocol based on running H:4, which can enable the built-in Bluetooth device inside an NXP BT chip. This driver has Power Save feature that will put the chip into sleep state whenever there is no activity for 2000ms, and will be woken up when any activity is to be initiated over UART. This driver enables the power save feature by default by sending the vendor specific commands to the chip during setup. During setup, the driver checks if a FW is already running on the chip by waiting for the bootloader signature, and downloads device specific FW file into the chip over UART if bootloader signature is received.. Signed-off-by: Neeraj Sanjay Kale Reviewed-by: Ilpo Järvinen Signed-off-by: Luiz Augusto von Dentz commit ab3a769b4dccec2cf60f0a0700b140991bf9afc8 Author: Neeraj Sanjay Kale Date: Thu Mar 16 22:52:13 2023 +0530 dt-bindings: net: bluetooth: Add NXP bluetooth support Add binding document for NXP bluetooth chipsets attached over UART. Signed-off-by: Neeraj Sanjay Kale Reviewed-by: Krzysztof Kozlowski Signed-off-by: Luiz Augusto von Dentz commit 8eaf839e4ac4feadf06e03eeff34059795450712 Author: Neeraj Sanjay Kale Date: Thu Mar 16 22:52:12 2023 +0530 serdev: Add method to assert break signal over tty UART port Adds serdev_device_break_ctl() and an implementation for ttyport. This function simply calls the break_ctl in tty layer, which can assert a break signal over UART-TX line, if the tty and the underlying platform and UART peripheral supports this operation. Signed-off-by: Neeraj Sanjay Kale Reviewed-by: Simon Horman Signed-off-by: Luiz Augusto von Dentz commit 29f93a687f3c435e94d026ee1fc8ad18ce56b7fb Author: Neeraj Sanjay Kale Date: Thu Mar 16 22:52:11 2023 +0530 serdev: Replace all instances of ENOTSUPP with EOPNOTSUPP This replaces all instances of ENOTSUPP with EOPNOTSUPP since ENOTSUPP is not a standard error code. This will help maintain consistency in error codes when new serdev API's are added. Signed-off-by: Neeraj Sanjay Kale Reviewed-by: Simon Horman Signed-off-by: Luiz Augusto von Dentz commit 586e154f98ac826233c2be5dc80e101303b4b2bd Author: Ilpo Järvinen Date: Thu Mar 9 10:20:30 2023 +0200 Bluetooth: hci_ldisc: Fix tty_set_termios() return value assumptions tty_set_termios() never returns anything else than 0. Make the debug prints to look directly into the new termios instead to check CRTSCTS state. Signed-off-by: Ilpo Järvinen Signed-off-by: Luiz Augusto von Dentz commit 7c2b2d2d0cb658aa543e11e90ae95621d3cb5fe6 Author: Raul Cheleguini Date: Fri Mar 10 15:14:10 2023 +0000 Bluetooth: Improve support for Actions Semi ATS2851 based devices Add two more quirks to resume the device initialization and basic operation as the device seems not to support "Read Transmit Power" and "Set Extended Scan Parameters". < HCI Command: LE Read Transmit Power (0x08|0x004b) plen 0 > HCI Event: Command Status (0x0f) plen 4 LE Read Transmit Power (0x08|0x004b) ncmd 1 Status: Unknown HCI Command (0x01) < HCI Command: LE Set Extended Scan Parameters (0x08|0x0041) plen 8 Own address type: Random (0x01) Filter policy: Accept all advertisement (0x00) PHYs: 0x01 Entry 0: LE 1M Type: Active (0x01) Interval: 11.250 msec (0x0012) Window: 11.250 msec (0x0012) > HCI Event: Command Status (0x0f) plen 4 LE Set Extended Scan Parameters (0x08|0x0041) ncmd 1 Status: Unknown HCI Command (0x01) Signed-off-by: Raul Cheleguini Signed-off-by: Luiz Augusto von Dentz commit c0123cb6c4c7fc2a42ead6cd7d3e82b8e1c25c6f Author: Vasily Khoruzhick Date: Tue Mar 7 23:17:31 2023 +0100 Bluetooth: btrtl: add support for the RTL8723CS The Realtek RTL8723CS is a SDIO WiFi chip. It also contains a Bluetooth module which is connected via UART to the host. It shares lmp subversion with 8703B, so Realtek's userspace initialization tool (rtk_hciattach) differentiates varieties of RTL8723CS (CG, VF, XX) with RTL8703B using vendor's command to read chip type. Also this chip declares support for some features it doesn't support so add a quirk to indicate that these features are broken. Signed-off-by: Vasily Khoruzhick Signed-off-by: Bastian Germann Signed-off-by: Luiz Augusto von Dentz commit 8194f1ef5a815aea815a91daf2c721eab2674f1f Author: Vasily Khoruzhick Date: Tue Mar 7 23:17:30 2023 +0100 Bluetooth: Add new quirk for broken local ext features page 2 Some adapters (e.g. RTL8723CS) advertise that they have more than 2 pages for local ext features, but they don't support any features declared in these pages. RTL8723CS reports max_page = 2 and declares support for sync train and secure connection, but it responds with either garbage or with error in status on corresponding commands. Signed-off-by: Vasily Khoruzhick Signed-off-by: Bastian Germann Signed-off-by: Luiz Augusto von Dentz commit a88ea43b73f109e446f6027df237c8f868127a78 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:13:54 2023 +0100 Bluetooth: btmtkuart: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/bluetooth/btmtkuart.c:971:36: error: ‘mt7668_data’ defined but not used [-Werror=unused-const-variable=] drivers/bluetooth/btmtkuart.c:966:36: error: ‘mt7663_data’ defined but not used [-Werror=unused-const-variable=] drivers/bluetooth/btmtkuart.c:962:36: error: ‘mt7622_data’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Luiz Augusto von Dentz commit 44fac8a2fd2f72ee98ee41e6bc9ecc7765b5d3cc Author: Krzysztof Kozlowski Date: Sat Mar 11 12:13:53 2023 +0100 Bluetooth: hci_qca: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/bluetooth/hci_qca.c:1869:37: error: ‘qca_soc_data_wcn6750’ defined but not used [-Werror=unused-const-variable=] drivers/bluetooth/hci_qca.c:1853:37: error: ‘qca_soc_data_wcn3998’ defined but not used [-Werror=unused-const-variable=] drivers/bluetooth/hci_qca.c:1841:37: error: ‘qca_soc_data_wcn3991’ defined but not used [-Werror=unused-const-variable=] drivers/bluetooth/hci_qca.c:1830:37: error: ‘qca_soc_data_wcn3990’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Luiz Augusto von Dentz commit 04909d7bf847bc0b939a5571a1a1fcbe5f2e2ead Author: Krzysztof Kozlowski Date: Sat Mar 11 12:13:52 2023 +0100 Bluetooth: btmrvl_sdio: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/bluetooth/btmrvl_sdio.c:43:34: error: ‘btmrvl_sdio_of_match_table’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Luiz Augusto von Dentz commit cd97d47f3069ef578f3b3ddb8c7ae3d6ce38b61a Author: Krzysztof Kozlowski Date: Sat Mar 11 12:13:51 2023 +0100 Bluetooth: hci_ll: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/bluetooth/hci_ll.c:769:34: error: ‘hci_ti_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Luiz Augusto von Dentz commit b8b23001b8025a61f0979578884a74faa825023e Author: Luiz Augusto von Dentz Date: Wed Mar 8 16:16:31 2023 -0800 Bluetooth: L2CAP: Delay identity address updates This delays the identity address updates to give time for userspace to process the new address otherwise there is a risk that userspace creates a duplicated device if the MGMT event is delayed for some reason. Signed-off-by: Luiz Augusto von Dentz commit 9f5ae8fcae1227e9bae3d973fcbef8319a1b25c7 Author: Inga Stotland Date: Wed Mar 8 10:32:35 2023 -0800 Bluetooth: hci_sync: Remove duplicate statement This removes the following duplicate statement in hci_le_ext_directed_advertising_sync(): cp.own_addr_type = own_addr_type; Signed-off-by: Inga Stotland Signed-off-by: Luiz Augusto von Dentz commit 493ea69970e2a4e4102fdf0be6d262456f564c3a Author: Brian Gix Date: Fri Feb 24 09:56:32 2023 -0800 Bluetooth: Convert MSFT filter HCI cmd to hci_sync The msft_set_filter_enable() command was using the deprecated hci_request mechanism rather than hci_sync. This caused the warning error: hci0: HCI_REQ-0xfcf0 Signed-off-by: Brian Gix Signed-off-by: Luiz Augusto von Dentz commit f5d13029a41d6504831ab99da0a9a0332fa7ea19 Author: Archie Pusaka Date: Mon Mar 6 17:07:07 2023 +0800 Bluetooth: hci_sync: Don't wait peer's reply when powering off Currently, when we initiate disconnection, we will wait for the peer's reply unless when we are suspending, where we fire and forget the disconnect request. A similar case is when adapter is powering off. However, we still wait for the peer's reply in this case. Therefore, if the peer is unresponsive, the command will time out and the power off sequence will fail, causing "bluetooth powered on by itself" to users. This patch makes the host doesn't wait for the peer's reply when the disconnection reason is powering off. Signed-off-by: Archie Pusaka Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Simon Horman Signed-off-by: Luiz Augusto von Dentz commit 125ede3afe5830c3e748dbc66098b7b640899321 Author: Meng Tang Date: Mon Mar 6 09:44:59 2023 +0800 Bluetooth: Add VID/PID 0489/e0e4 for MediaTek MT7922 Tested on Acer Nitro AN515-47 Notebook output from /sys/kernel/debug/usb/devices: T: Bus=03 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0489 ProdID=e0e4 Rev= 1.00 S: Manufacturer=MediaTek Inc. S: Product=Wireless_Device S: SerialNumber=000000000 C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA A: FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01 I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=125us E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 64 Ivl=125us I: If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none) E: Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us E: Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us Signed-off-by: Meng Tang Signed-off-by: Luiz Augusto von Dentz commit b6986b7920bb50ed64e96ddd8c4da43bca289ecc Author: Chris Morgan Date: Tue Feb 28 09:22:05 2023 -0600 arm64: dts: rockchip: Update compatible for bluetooth Update the compatible for the Realtek RTL8821CS bluetooth node. Signed-off-by: Chris Morgan Signed-off-by: Luiz Augusto von Dentz commit 10c9e0104e3bffa31ddc653619f993d6842955d6 Author: Chris Morgan Date: Tue Feb 28 09:22:04 2023 -0600 Bluetooth: hci_h5: btrtl: Add support for RTL8821CS RTL8821CS is a WiFi + Bluetooth combo chip from Realtek that provides WiFi A/B/G/N/AC over an SDIO interface and Bluetooth 4.2 over a UART interface. Note that the firmware this was tested with was firmware version 0x75b8f098. Signed-off-by: Chris Morgan Signed-off-by: Luiz Augusto von Dentz commit 95ee3a93239e172b592dc4613c403de2410e4a82 Author: Chris Morgan Date: Tue Feb 28 09:22:03 2023 -0600 dt-bindings: net: realtek-bluetooth: Add RTL8821CS Add compatible string for RTL8821CS for existing Realtek Bluetooth driver. Signed-off-by: Chris Morgan Reviewed-by: Krzysztof Kozlowski Reviewed-by: Alistair Francis Signed-off-by: Luiz Augusto von Dentz commit 13209415d0e88396d99d346b184864834d70d68a Author: Meng Tang Date: Tue Feb 28 13:55:17 2023 +0800 Bluetooth: btusb: Add new PID/VID 04ca:3801 for MT7663 This bluetooth device is found in a combo WLAN/BT card for a MediaTek 7663. Tested on Acer Aspire A315-24P Notebook The device information: T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=04ca ProdID=3801 Rev= 1.00 S: Manufacturer=MediaTek Inc. S: Product=Wireless_Device S: SerialNumber=000000000 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=01 I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=125us E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms Signed-off-by: Meng Tang Signed-off-by: Luiz Augusto von Dentz commit ae051b044ebf5938940741c25a8989e07a5d7e88 Author: Luiz Augusto von Dentz Date: Mon Feb 27 15:50:58 2023 -0800 Bluetooth: hci_sync: Fix smatch warning This fixes the following new warning: net/bluetooth/hci_sync.c:2403 hci_pause_addr_resolution() warn: missing error code? 'err' Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202302251952.xryXOegd-lkp@intel.com/ Signed-off-by: Luiz Augusto von Dentz commit d4b20f0b8491bfb3238ebf7df4b13243189620d2 Author: Luiz Augusto von Dentz Date: Fri Feb 24 15:27:33 2023 -0800 Bluetooth: hci_core: Make hci_conn_hash_add append to the list This makes hci_conn_hash_add append to the tail of the conn_hash so it matches the order they are created, this is required if the controller attempts to match the order of ACL with CIS which uses append logic when programming the CIS ids on the CIG. The result of this change affects Create CIS: Before: < HCI Command: LE Create Connected Isochronous Stream (0x08|0x0064) plen 9 Number of CIS: 2 CIS Handle: 2560 ACL Handle: 3586 CIS Handle: 2561 ACL Handle: 3585 After: < HCI Command: LE Create Connected Isochronous Stream (0x08|0x0064) plen 9 Number of CIS: 2 CIS Handle: 2560 ACL Handle: 3585 CIS Handle: 2561 ACL Handle: 3586 Signed-off-by: Luiz Augusto von Dentz commit fe4b71b59ed5067ae591a33d512947160fd9aa89 Author: Victor Hassan Date: Wed Feb 22 17:47:20 2023 +0800 Bluetooth: btrtl: Add support for RTL8852BS Add the support for RTL8852BS BT controller on UART interface. The necessary firmware file will be submitted to linux-firmware. Signed-off-by: Victor Hassan Signed-off-by: Luiz Augusto von Dentz commit a860c50f7aef5186fcbb73aff224ae6f5e51cecc Author: Stefan Eichenberger Date: Mon Feb 13 13:09:25 2023 +0100 Bluetooth: hci_mrvl: Add serdev support for 88W8997 Add serdev support for the 88W8997 from NXP (previously Marvell). It includes support for changing the baud rate. The command to change the baud rate is taken from the user manual UM11483 Rev. 9 in section 7 (Bring-up of Bluetooth interfaces) from NXP. Signed-off-by: Stefan Eichenberger Signed-off-by: Francesco Dolcini Signed-off-by: Luiz Augusto von Dentz commit 069690a92ffdda399350af072ea62640bcd370df Author: Stefan Eichenberger Date: Mon Feb 13 13:09:24 2023 +0100 Bluetooth: hci_mrvl: use maybe_unused macro for device tree ids Use the maybe_unused macro for the device tree ids instead of #ifdef CONFIG_OF. This makes it easier to add support for new devices. Signed-off-by: Stefan Eichenberger Signed-off-by: Francesco Dolcini Signed-off-by: Luiz Augusto von Dentz commit 552705fd891b6ed6dda340567ce3ffff943f1f3b Author: Stefan Eichenberger Date: Mon Feb 13 13:09:23 2023 +0100 dt-bindings: bluetooth: marvell: add max-speed property The 88W8997 bluetooth module supports setting the max-speed property. Signed-off-by: Stefan Eichenberger Signed-off-by: Francesco Dolcini Reviewed-by: Krzysztof Kozlowski Signed-off-by: Luiz Augusto von Dentz commit c43132abfbe9d2f3befdbddfc3097d30905dc3d1 Author: Stefan Eichenberger Date: Mon Feb 13 13:09:22 2023 +0100 dt-bindings: bluetooth: marvell: add 88W8997 Update the documentation with the device tree binding for the Marvell 88W8997 bluetooth device. Signed-off-by: Stefan Eichenberger Acked-by: Krzysztof Kozlowski Signed-off-by: Francesco Dolcini Signed-off-by: Luiz Augusto von Dentz commit c13380a55522bf14e54779a142487c224509db95 Author: Tomasz Moń Date: Tue Feb 7 12:57:41 2023 +0100 Bluetooth: btusb: Do not require hardcoded interface numbers Remove hardcoded interface number check because Bluetooth specification since version 4.0 only recommends and no longer requires specific interface numbers. While earlier Bluetooth versions, i.e. 2.1 + EDR and 3.0 + HS, contain required configuration table in Volume 4 - Host Controller Interface Part B - USB Transport Layer, Bluetooth Core Specification Addendum 2 changes the table from required to recommended configuration. Signed-off-by: Tomasz Moń Signed-off-by: Luiz Augusto von Dentz commit a80d2c545ded86d0350b9a870735565d8b749786 Author: Luiz Augusto von Dentz Date: Mon Feb 13 14:28:55 2023 -0800 Bluetooth: MGMT: Use BIT macro when defining bitfields This makes use of BIT macro when defining bitfields which makes it clearer what bit it is toggling. Signed-off-by: Luiz Augusto von Dentz commit 919e57c3147ce66ed0887168e622c5e7a8f04440 Author: Volker Lendecke Date: Fri Mar 17 11:15:22 2023 +0000 cifs: Avoid a cast in add_lease_context() We have the correctly-typed struct smb2_create_req * available in the caller. Signed-off-by: Volker Lendecke Reviewed-by Ralph Boehme Signed-off-by: Steve French commit d2ec43b51521b4c83313df60d8b03a6640374c20 Author: Volker Lendecke Date: Thu Mar 30 12:04:47 2023 +0000 cifs: Simplify SMB2_open_init() Reduce code duplication by calculating req->CreateContextsLength in one place. This is the last reference to "req" in the add_*_context functions, remove that parameter. Signed-off-by: Volker Lendecke Reviewed-by: Enzo Matsumiya Signed-off-by: Steve French commit 2a8d1387ed985341364b471ad63e323431ef6c4a Author: Volker Lendecke Date: Thu Mar 30 12:04:46 2023 +0000 cifs: Simplify SMB2_open_init() Reduce code duplication by stitching together create contexts in one place. Signed-off-by: Volker Lendecke Reviewed-by: Enzo Matsumiya Signed-off-by: Steve French commit 5ec629e037ac5872139ebcac0c6af7d8675bbe6b Author: Volker Lendecke Date: Thu Mar 30 12:04:45 2023 +0000 cifs: Simplify SMB2_open_init() We can point to the create contexts in just one place, we don't have to do this in every add_*_context routine. Signed-off-by: Volker Lendecke Reviewed-by: Enzo Matsumiya Signed-off-by: Steve French commit 289af45508ca890585f329376d16e08f41f75bd5 Merge: 02a8ae723225a 49953b70e7d38 Author: Dave Airlie Date: Mon Apr 24 10:34:04 2023 +1000 Merge tag 'exynos-drm-next-for-v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next A patch series for implementing fbdev emulation as in-kernel client. - This patch series refactors fbdev callbacks to DRM client functions and simplifies fbdev emulation initialization including some code cleanups. The changes make fbdev emulation behave like a regular DRM client. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20230417100624.35229-1-inki.dae@samsung.com commit 02dc51a0a07a379539b4661ecb56eeb5b19b3928 Author: Randy Dunlap Date: Sun Apr 9 18:13:06 2023 -0700 firewire: init_ohci1394_dma: use correct function names in comments Prevent kernel-doc complaints by using the correct function names in kernel-doc comments: drivers/firewire/init_ohci1394_dma.c:258: warning: expecting prototype for debug_init_ohci1394_dma(). Prototype was for init_ohci1394_dma_on_all_controllers() instead drivers/firewire/init_ohci1394_dma.c:289: warning: expecting prototype for setup_init_ohci1394_early(). Prototype was for setup_ohci1394_dma() instead Signed-off-by: Randy Dunlap Cc: Stefan Richter Cc: linux1394-devel@lists.sourceforge.net Cc: Andrew Morton Cc: Takashi Sakamoto Link: https://lore.kernel.org/r/20230410011306.26268-1-rdunlap@infradead.org Signed-off-by: Takashi Sakamoto commit f3948874c340cddb8c6d93d36f35742184d601a7 Author: Takashi Sakamoto Date: Mon Mar 6 12:58:14 2023 +0900 MAINTAINERS: replace maintainer of FireWire subsystem In the last few years, I have reviewed patches for FireWire subsystem and requested sound subsystem maintainer to sent them to mainline, since FireWire subsystem maintainer has been long absent. This situation is not preferable since we have some user of sound hardware in IEEE 1394 bus. I will stand for the maintainer, and work for FireWire core functions and 1394 OHCI driver, as well as sound drivers. This commit replaces the corresponding entry. As you know, IEEE 1394 is enough legacy. I would like to schedule the end of my work in the subsystem. My effort will last next 6 years. In 2026, I will start strong announcement for users to migrate their work load from IEEE 1394 bus (e.g. by purchasing alternative devices in USB and hardening system for them), then in 2029 let me resign the maintainer and close Linux 1394 project. My current work focuses on real time data (sampling data) transmission protocol in packet-oriented communication, thus I would provide less help to implementations for the other type of protocol; i.e. IPv4/IPv6 over IEEE 1394 bus (firewire-net), SCSI transport protocol over IEEE 1394 bus (firewire-sbp2) and iSCSI target (sbp-target). If receiving few objections from developers, I will start my work to send fixes for v6.3 prepatch, and PR for future v6.4 or later. I'm pleased if getting any help until the end. Reference: commit b32744751e75 ("firewire: add to MAINTAINERS") Acked-by: Stefan Richter Acked-by: Takashi Iwai Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20230306035814.78455-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 02a8ae723225afae25ddf9d2c7ca271b3f856b5a Merge: e82c98f2ca439 2c69679626d5d Author: Dave Airlie Date: Mon Apr 24 09:48:04 2023 +1000 Merge tag 'drm-intel-next-fixes-2023-04-20-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Active port PLL MST fix for second stream, CSC plane index fix, null and oob array deref fixes and selftest memory leak fix. Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZEDz9ZedyZVyFXxU@jlahtine-mobl.ger.corp.intel.com commit b5fda08ef213352ac2df7447611eb4d383cce929 Author: Zhihao Cheng Date: Wed Mar 1 20:29:19 2023 +0800 ubifs: Fix memleak when insert_old_idx() failed Following process will cause a memleak for copied up znode: dirty_cow_znode zn = copy_znode(c, znode); err = insert_old_idx(c, zbr->lnum, zbr->offs); if (unlikely(err)) return ERR_PTR(err); // No one refers to zn. Fetch a reproducer in [Link]. Function copy_znode() is split into 2 parts: resource allocation and znode replacement, insert_old_idx() is split in similar way, so resource cleanup could be done in error handling path without corrupting metadata(mem & disk). It's okay that old index inserting is put behind of add_idx_dirt(), old index is used in layout_leb_in_gaps(), so the two processes do not depend on each other. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216705 Fixes: 1e51764a3c2a ("UBIFS: add new flash file system") Cc: stable@vger.kernel.org Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 7d01cb27f6aebc54efbe28d8961a973b8f795b13 Author: Zhihao Cheng Date: Wed Mar 1 20:29:18 2023 +0800 Revert "ubifs: dirty_cow_znode: Fix memleak in error handling path" This reverts commit 122deabfe1428 (ubifs: dirty_cow_znode: Fix memleak in error handling path). After commit 122deabfe1428 applied, if insert_old_idx() failed, old index neither exists in TNC nor in old-index tree. Which means that old index node could be overwritten in layout_leb_in_gaps(), then ubifs image will be corrupted in power-cut. Fixes: 122deabfe1428 (ubifs: dirty_cow_znode: Fix memleak ... path) Cc: stable@vger.kernel.org Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit bfe58458fd2557c9a81b89bc0ff10eb03d6c0745 Author: Davidlohr Bueso Date: Mon Mar 6 20:26:55 2023 -0800 cxl/mbox: Update CMD_RC_TABLE As of CXL 3.0 there have some added return codes, update the driver accordingly. Signed-off-by: Davidlohr Bueso Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20230307042655.6714-1-dave@stgolabs.net Signed-off-by: Dan Williams commit ca899f4021c9fc673935a09c17a7323527aefccd Merge: 856ef55e7e1fb c841ecd827715 Author: Dan Williams Date: Sun Apr 23 12:10:13 2023 -0700 Merge branch 'for-6.3/cxl-autodetect-fixes' into for-6.4/cxl Pick up late v6.3 fixes for v6.4. commit 856ef55e7e1fb411cd42b917bac2a7aaf75344ae Merge: 267214a2319b5 30a8a105f0ce9 Author: Dan Williams Date: Sun Apr 23 12:09:56 2023 -0700 Merge branch 'for-6.4/cxl-poison' into for-6.4/cxl Include the poison list and injection infrastructure from Alison for v6.4. commit 30a8a105f0ce9f2c83063b289f76833386d4a120 Author: Alison Schofield Date: Tue Apr 18 20:26:34 2023 -0700 tools/testing/cxl: Require CONFIG_DEBUG_FS The cxl_mem driver uses debugfs to support poison inject and clear. Add debugfs to the list of required symbols so that cxl_test can emulate those poison operations. Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/4f3aab57fbf1cc3ccde2eb887c5d90566c8d0e90.1681874357.git.alison.schofield@intel.com Signed-off-by: Dan Williams commit 98980d76c3fc3d56b34e425eb102b10355ccc743 Author: Alison Schofield Date: Tue Apr 18 20:26:33 2023 -0700 tools/testing/cxl: Add a sysfs attr to test poison inject limits CXL devices may report a maximum number of addresses that a device allows to be poisoned using poison injection. When cxl_test creates mock CXL memory devices, it defaults to MOCK_INJECT_DEV_MAX==88 for all mocked memdevs. Add a sysfs attribute, poison_inject_max to module cxl_mock_mem so that users can set a custom device injection limit. Fail, and return -EBUSY, if the mock poison list is not empty. /sys/bus/platform/drivers/cxl_mock_mem/poison_inject_max A simple usage model is to set the attribute before running a test in order to emulate a device's poison handling. Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/0f25b2862b90013545450222d2199e435c6cc11a.1681874357.git.alison.schofield@intel.com Signed-off-by: Dan Williams commit 8eac7ea72593010726713c5359a4b6aedf29b6fe Author: Alison Schofield Date: Tue Apr 18 20:26:32 2023 -0700 tools/testing/cxl: Use injected poison for get poison list Prior to poison inject support, the mock of 'Get Poison List' returned a poison list containing a single mocked error record. Following the addition of poison inject and clear support to the mock driver, use the mock_poison_list[], rather than faking an error record. Mock_poison_list[] list tracks the actual poison inject and clear requests issued by userspace. Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/0f4242c81821f4982b02cb1009c22783ef66b2f1.1681874357.git.alison.schofield@intel.com Signed-off-by: Dan Williams commit 6ec4b6d23e3a5b653cc8b6a7b09c20c30190cfce Author: Alison Schofield Date: Tue Apr 18 20:26:31 2023 -0700 tools/testing/cxl: Mock the Clear Poison mailbox command Mock the clear of poison by deleting the device:address entry from the mock_poison_list[]. Behave like a real CXL device and do not fail if the address is not in the poison list, but offer a dev_dbg() message. Signed-off-by: Alison Schofield Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/ecf19743c6572e60971bbd078f67d520cf5bca5d.1681874357.git.alison.schofield@intel.com Signed-off-by: Dan Williams commit 371c16101ee8a076cbe93ab95bbefdb43927003e Author: Alison Schofield Date: Tue Apr 18 20:26:30 2023 -0700 tools/testing/cxl: Mock the Inject Poison mailbox command Mock the injection of poison by storing the device:address entries in mock_poison_list[]. Enforce a limit of 8 poison injections per memdev device and 128 total entries for the cxl_test mock driver. Introducing the mock_poison[] list here, makes it available for use in the mock of Clear Poison, and the mock of Get Poison List. Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/f6b7f03541eaa8c2260d3eafadd04afe3f0d7962.1681874357.git.alison.schofield@intel.com Signed-off-by: Dan Williams commit 50d527f52cbf0680c87d11a254383ca730c5c19f Author: Alison Schofield Date: Tue Apr 18 20:26:29 2023 -0700 cxl/mem: Add debugfs attributes for poison inject and clear Inject and Clear Poison commands are optionally supported by CXL memdev devices and are intended for use in debug environments only. Add debugfs attributes for user access. Documentation/ABI/testing/debugfs-cxl describes the usage. Signed-off-by: Alison Schofield Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/0c9ea8e671b8e58465d18722788b60d325c675c7.1681874357.git.alison.schofield@intel.com Tested-by: Jonathan Cameron Signed-off-by: Dan Williams commit 98b6926562d9ccdbca69de9a0e0bf4f90d7f1326 Author: Alison Schofield Date: Tue Apr 18 20:26:28 2023 -0700 cxl/memdev: Trace inject and clear poison as cxl_poison events The cxl_poison trace event allows users to view the history of poison list reads. With the addition of inject and clear poison capabilities, users will expect similar tracing. Add trace types 'Inject' and 'Clear' to the cxl_poison trace_event and trace successful operations only. If the driver finds that the DPA being injected or cleared of poison is mapped in a region, that region info is included in the cxl_poison trace event. Region reconfigurations can make this extra info useless if the debug operations are not carefully managed. Signed-off-by: Alison Schofield Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/e20eb7c3029137b480ece671998c183da0477e2e.1681874357.git.alison.schofield@intel.com Tested-by: Jonathan Cameron Signed-off-by: Dan Williams commit 0a105ab28a4de44eb738ce64e9ac74946aa5133b Author: Alison Schofield Date: Tue Apr 18 20:26:27 2023 -0700 cxl/memdev: Warn of poison inject or clear to a mapped region Inject and clear poison capabilities and intended for debug usage only. In order to be useful in debug environments, the driver needs to allow inject and clear operations on DPAs mapped in regions. dev_warn_once() when either operation occurs. Signed-off-by: Alison Schofield Link: https://lore.kernel.org/r/f911ca5277c9d0f9757b72d7e6842871bfff4fa2.1681874357.git.alison.schofield@intel.com Tested-by: Jonathan Cameron Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams commit 9690b07748d18ac667036a68442081c4aea33ba7 Author: Alison Schofield Date: Tue Apr 18 20:26:26 2023 -0700 cxl/memdev: Add support for the Clear Poison mailbox command CXL devices optionally support the CLEAR POISON mailbox command. Add memdev driver support for clearing poison. Per the CXL Specification (3.0 8.2.9.8.4.3), after receiving a valid clear poison request, the device removes the address from the device's Poison List and writes 0 (zero) for 64 bytes starting at address. If the device cannot clear poison from the address, it returns a permanent media error and -ENXIO is returned to the user. Additionally, and per the spec also, it is not an error to clear poison of an address that is not poisoned. If the address is not contained in the device's dpa resource, or is not 64 byte aligned, the driver returns -EINVAL without sending the command to the device. Poison clearing is intended for debug only and will be exposed to userspace through debugfs. Restrict compilation to CONFIG_DEBUG_FS. Implementation note: Although the CXL specification defines the clear command to accept 64 bytes of 'write-data', this implementation always uses zeroes as write-data. Signed-off-by: Alison Schofield Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/8682c30ec24bd9c45af5feccb04b02be51e58c0a.1681874357.git.alison.schofield@intel.com Tested-by: Jonathan Cameron Signed-off-by: Dan Williams commit d2fbc48658022f48625064ae192baff52057987d Author: Alison Schofield Date: Tue Apr 18 20:26:25 2023 -0700 cxl/memdev: Add support for the Inject Poison mailbox command CXL devices optionally support the INJECT POISON mailbox command. Add memdev driver support for the mailbox command. Per the CXL Specification (3.0 8.2.9.8.4.2), after receiving a valid inject poison request, the device will return poison when the address is accessed through the CXL.mem driver. Injecting poison adds the address to the device's Poison List and the error source is set to Injected. In addition, the device adds a poison creation event to its internal Informational Event log, updates the Event Status register, and if configured, interrupts the host. Also, per the CXL Specification, it is not an error to inject poison into an address that already has poison present and no error is returned from the device. If the address is not contained in the device's dpa resource, or is not 64 byte aligned, return -EINVAL without issuing the mbox command. Poison injection is intended for debug only and will be exposed to userspace through debugfs. Restrict compilation to CONFIG_DEBUG_FS. Signed-off-by: Alison Schofield Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/241c64115e6bd2effed9c7a20b08b3908dd7be8f.1681874357.git.alison.schofield@intel.com Tested-by: Jonathan Cameron Signed-off-by: Dan Williams commit f8d22bf50ca56a334ef58bf59ee299ed62940e42 Author: Alison Schofield Date: Tue Apr 18 10:39:09 2023 -0700 tools/testing/cxl: Mock support for Get Poison List Make mock memdevs support the Get Poison List mailbox command. Return a fake poison error record when the get poison list command is issued. This supports testing the kernel tracing and cxl list capabilities for media errors. Signed-off-by: Alison Schofield Reviewed-by: Jonathan Cameron Reviewed-by: Ira Weiny Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/14d661ce3e3a32b7d8e76b8ecc5eb88343b3d09c.1681838292.git.alison.schofield@intel.com Signed-off-by: Dan Williams commit 28a3ae4ff66c622448f5dfb7416bbe753e182eb4 Author: Alison Schofield Date: Tue Apr 18 10:39:08 2023 -0700 cxl/trace: Add an HPA to cxl_poison trace events When a cxl_poison trace event is reported for a region, the poisoned Device Physical Address (DPA) can be translated to a Host Physical Address (HPA) for consumption by user space. Translate and add the resulting HPA to the cxl_poison trace event. Follow the device decode logic as defined in the CXL Spec 3.0 Section 8.2.4.19.13. If no region currently maps the poison, assign ULLONG_MAX to the cxl_poison event hpa field. Signed-off-by: Alison Schofield Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/6d3cd726f9042a59902785b0a2cb3ddfb70e0219.1681838292.git.alison.schofield@intel.com Tested-by: Jonathan Cameron Signed-off-by: Dan Williams commit f0832a58639691af575fa28ffaeb657c51f3ca06 Author: Alison Schofield Date: Tue Apr 18 10:39:07 2023 -0700 cxl/region: Provide region info to the cxl_poison trace event User space may need to know which region, if any, maps the poison address(es) logged in a cxl_poison trace event. Since the mapping of DPAs (device physical addresses) to a region can change, the kernel must provide this information at the time the poison list is read. The event informs user space that at event this mapped to this , which is poisoned. The cxl_poison trace event is already wired up to log the region name and uuid if it receives param 'struct cxl_region'. In order to provide that cxl_region, add another method for gathering poison - by committed endpoint decoder mappings. This method is only available with CONFIG_CXL_REGION and is only used if a region actually maps the memdev where poison is being read. After the region driver reads the poison list for all the mapped resources, poison is read for any remaining unmapped resources. The default method remains: read the poison by memdev resource. Signed-off-by: Alison Schofield Tested-by: Jonathan Cameron Reviewed-by: Jonathan Cameron Reviewed-by: Ira Weiny Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/438b01ccaa70592539e8eda4eb2b1d617ba03160.1681838292.git.alison.schofield@intel.com Tested-by: Jonathan Cameron Signed-off-by: Dan Williams commit 7ff6ad1075885fdc71f6fea94b95109a582dec29 Author: Alison Schofield Date: Tue Apr 18 10:39:06 2023 -0700 cxl/memdev: Add trigger_poison_list sysfs attribute When a boolean 'true' is written to this attribute the memdev driver retrieves the poison list from the device. The list consists of addresses that are poisoned, or would result in poison if accessed, and the source of the poison. This attribute is only visible for devices supporting the capability. The retrieved errors are logged as kernel events when cxl_poison event tracing is enabled. Signed-off-by: Alison Schofield Reviewed-by: Jonathan Cameron Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/1081cfdc8a349dc754779642d584707e56db26ba.1681838291.git.alison.schofield@intel.com Tested-by: Jonathan Cameron Signed-off-by: Dan Williams commit ddf49d57b841e55e1b0aee1224a9f526e50e1bcc Author: Alison Schofield Date: Tue Apr 18 10:39:05 2023 -0700 cxl/trace: Add TRACE support for CXL media-error records CXL devices may support the retrieval of a device poison list. Add a new trace event that the CXL subsystem may use to log the media-error records returned in the poison list. Log each media-error record as a cxl_poison trace event of type 'List'. Signed-off-by: Alison Schofield Reviewed-by: Jonathan Cameron Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/de6196f5269483d886ab1834744f82d27189a666.1681838291.git.alison.schofield@intel.com Tested-by: Jonathan Cameron Signed-off-by: Dan Williams commit ed83f7ca398b3798b82c1d5d1113011c0e5a2198 Author: Alison Schofield Date: Tue Apr 18 10:39:04 2023 -0700 cxl/mbox: Add GET_POISON_LIST mailbox command CXL devices maintain a list of locations that are poisoned or result in poison if the addresses are accessed by the host. Per the spec, (CXL 3.0 8.2.9.8.4.1), the device returns this Poison list as a set of Media Error Records that include the source of the error, the starting device physical address, and length. The length is the number of adjacent DPAs in the record and is in units of 64 bytes. Retrieve the poison list. Signed-off-by: Alison Schofield Reviewed-by: Jonathan Cameron Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/a1f332e817834ef8e89c0ff32e760308fb903346.1681838291.git.alison.schofield@intel.com Tested-by: Jonathan Cameron Signed-off-by: Dan Williams commit d0abf5787adc0341a04667d3b4a23b4d0999af30 Author: Alison Schofield Date: Tue Apr 18 10:39:03 2023 -0700 cxl/mbox: Initialize the poison state Driver reads of the poison list are synchronized to ensure that a reader does not get an incomplete list because their request overlapped (was interrupted or preceded by) another read request of the same DPA range. (CXL Spec 3.0 Section 8.2.9.8.4.1). The driver maintains state information to achieve this goal. To initialize the state, first recognize the poison commands in the CEL (Command Effects Log). If the device supports Get Poison List, allocate a single buffer for the poison list and protect it with a lock. Signed-off-by: Alison Schofield Link: https://lore.kernel.org/r/9078d180769be28a5087288b38cdfc827cae58bf.1681838291.git.alison.schofield@intel.com Reviewed-by: Jonathan Cameron Tested-by: Jonathan Cameron Signed-off-by: Dan Williams commit dec441d32a9a1e4a891ccda3356cac61cc1ffe79 Author: Alison Schofield Date: Tue Apr 18 10:39:02 2023 -0700 cxl/mbox: Restrict poison cmds to debugfs cxl_raw_allow_all The Get, Inject, and Clear poison commands are not available for direct user access because they require kernel driver controls to perform safely. Further restrict access to these commands by requiring the selection of the debugfs attribute 'cxl_raw_allow_all' to enable in raw mode. Signed-off-by: Alison Schofield Link: https://lore.kernel.org/r/0e5cb41ffae2bab800957d3b9003eedfd0a2dfd5.1681838291.git.alison.schofield@intel.com Reviewed-by: Jonathan Cameron Tested-by: Jonathan Cameron Signed-off-by: Dan Williams commit 3951adc42ac878fff84f10e194ed13c32fa9c971 Merge: fadfc57cc8047 7eb060a51a3ba Author: David S. Miller Date: Sun Apr 23 18:47:09 2023 +0100 Merge branch 'net-sched-parsing-prints' Pedro Tammela says: ==================== net/sched: cleanup parsing prints in htb and qfq These two qdiscs are still using prints on dmesg to report parsing errors. Since the parsing code has access to extack, convert these error messages to extack. QFQ also had the opportunity to remove some redundant code in the parameters parsing by transforming some attributes into parsing policies. v4->v5: Rebased v3->v4: Drop 'BITification' as suggested by Eric v2->v3: Address suggestions by Jakub and Simon v1->v2: Address suggestions by Jakub ==================== Signed-off-by: David S. Miller commit 7eb060a51a3ba44acefafefd242dcbf12dd91fb9 Author: Pedro Tammela Date: Sat Apr 22 12:56:12 2023 -0300 selftests: tc-testing: add more tests for sch_qfq The QFQ qdisc class has parameter bounds that are not being checked for correctness. Acked-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Signed-off-by: David S. Miller commit 25369891fcef373540f8b4e0b3bccf77a04490d5 Author: Pedro Tammela Date: Sat Apr 22 12:56:11 2023 -0300 net/sched: sch_qfq: refactor parsing of netlink parameters Two parameters can be transformed into netlink policies and validated while parsing the netlink message. Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Signed-off-by: David S. Miller commit c69a9b023f65b73068a17f2f4eb6a1b6e257f5bf Author: Pedro Tammela Date: Sat Apr 22 12:56:10 2023 -0300 net/sched: sch_qfq: use extack on errors messages Some error messages are still being printed to dmesg. Since extack is available, provide error messages there. Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Signed-off-by: David S. Miller commit 807cfded92b0a2e8be9c078c693075790c7c4131 Author: Pedro Tammela Date: Sat Apr 22 12:56:09 2023 -0300 net/sched: sch_htb: use extack on errors messages Some error messages are still being printed to dmesg. Since extack is available, provide error messages there. Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Signed-off-by: David S. Miller commit fd84c569f7b8bbf8154c9940b427942ff5bfbc48 Merge: 2f0f9465ad9fa e3c9673e2f6e1 Author: David S. Miller Date: Sun Apr 23 18:35:27 2023 +0100 Merge branch 'act_pedit-minor-improvements' Pedro Tammela says: ==================== net/sched: act_pedit: minor improvements This series aims to improve the code and usability of act_pedit for netlink users. Patches 1-2 improves error reporting for extended keys parsing with extack. Patch 3 checks the static offsets a priori on create/update. Currently, this is done at the datapath for both static and runtime offsets. Patch 4 removes a check from the datapath which is redundant since the netlink parsing validates the key types. Patch 5 changes the 'pr_info()' calls in the datapath to rate limited versions. ==================== Signed-off-by: David S. Miller commit e3c9673e2f6e1b3aa4bb87c570336e10f364c28a Author: Pedro Tammela Date: Fri Apr 21 18:25:17 2023 -0300 net/sched: act_pedit: rate limit datapath messages Unbounded info messages in the pedit datapath can flood the printk ring buffer quite easily depending on the action created. As these messages are informational, usually printing some, not all, is enough to bring attention to the real issue. Reviewed-by: Jamal Hadi Salim Reviewed-by: Simon Horman Signed-off-by: Pedro Tammela Signed-off-by: David S. Miller commit 577140180ba28d0d37bc898c7bd6702c83aa106f Author: Pedro Tammela Date: Fri Apr 21 18:25:16 2023 -0300 net/sched: act_pedit: remove extra check for key type The netlink parsing already validates the key 'htype'. Remove the datapath check as it's redundant. Reviewed-by: Jamal Hadi Salim Reviewed-by: Simon Horman Signed-off-by: Pedro Tammela Signed-off-by: David S. Miller commit e1201bc781c28766720e78a5e099ffa568be4d74 Author: Pedro Tammela Date: Fri Apr 21 18:25:15 2023 -0300 net/sched: act_pedit: check static offsets a priori Static key offsets should always be on 32 bit boundaries. Validate them on create/update time for static offsets and move the datapath validation for runtime offsets only. iproute2 already errors out if a given offset and data size cannot be packed to a 32 bit boundary. This change will make sure users which create/update pedit instances directly via netlink also error out, instead of finding out when packets are traversing. Reviewed-by: Jamal Hadi Salim Reviewed-by: Simon Horman Signed-off-by: Pedro Tammela Signed-off-by: David S. Miller commit 0c83c5210e18763ec54252b990d270748c99b01d Author: Pedro Tammela Date: Fri Apr 21 18:25:14 2023 -0300 net/sched: act_pedit: use extack in 'ex' parsing errors We have extack available when parsing 'ex' keys, so pass it to tcf_pedit_keys_ex_parse and add more detailed error messages. Reviewed-by: Simon Horman Signed-off-by: Pedro Tammela Signed-off-by: David S. Miller commit 5036034572b79daa6d6600338e8e8229e2a44b09 Author: Pedro Tammela Date: Fri Apr 21 18:25:13 2023 -0300 net/sched: act_pedit: use NLA_POLICY for parsing 'ex' keys Transform two checks in the 'ex' key parsing into netlink policies removing extra if checks. Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 7e8472c820f04517ae5d5a27c1aecfa2263a0aa5 Author: Akira Yokosawa Date: Tue Mar 7 10:36:34 2023 +0900 media: Adjust column width for pdfdocs The column width specifiers added in commit 8d0e3fc61abd ("media: Add 2-10-10-10 RGB formats") don't suffice for column 1 and too wide for column 2. Adjust them to get a good looking table. Fixes: 8d0e3fc61abd ("media: Add 2-10-10-10 RGB formats") Cc: Tomi Valkeinen Signed-off-by: Akira Yokosawa Link: https://lore.kernel.org/r/f94e3ada-212c-eef7-9e7b-03760bb29521@gmail.com Signed-off-by: Jonathan Corbet commit fc623d89b4c404f2dea917d00eba2111f3c1bc15 Author: Tomi Valkeinen Date: Tue Mar 7 10:34:28 2023 +0900 media: Fix building pdfdocs Commit 8d0e3fc61abd ("media: Add 2-10-10-10 RGB formats") added documentation for a few new RGB formats. The table has column-width specifiers for 34 columns used in pdfdocs build. However, the new table has a couple of rows with 35 columns which confused Sphinx's latex builder. The resulting .tex file causes an error in a later stage of a pdfdocs build. Remove the trailing empty dash lines to fix the issue. Fixes: 8d0e3fc61abd ("media: Add 2-10-10-10 RGB formats") Reported-by: Akira Yokosawa Link: https://lore.kernel.org/r/12250823-8445-5854-dfb8-b92c0ff0851e@gmail.com/ Signed-off-by: Tomi Valkeinen Tested-by: Akira Yokosawa Reviewed-by: Laurent Pinchart Acked-by: Mauro Carvalho Chehab [akiyks: explain the cause of build error] Signed-off-by: Akira Yokosawa Link: https://lore.kernel.org/r/29380b3e-1daa-3aef-1749-dbd9960ba620@gmail.com Signed-off-by: Jonathan Corbet commit 1c19ac768b8eeb0304c4ed7db66c2bb89c6ad226 Author: Christophe JAILLET Date: Sun Apr 23 10:10:07 2023 +0200 hwmon: lochnagar: Remove the unneeded include This driver does not use i2c, so there is no point in including Remove it. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/df555e724d1b52bd9958c0bd729a774dfe0cf150.1682237387.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck commit 31f735c65d4f4825c57620f39f2fa27aa01ac172 Author: Masahiro Yamada Date: Mon Apr 17 23:25:47 2023 +0900 kbuild: add srcdeb-pkg target This new target builds only the debian source package. Unify the build rules of deb-pkg, srcdeb-pkg, bindeb-pkg to avoid code duplication. --no-check-builddeps is added to srcdeb-pkg so that build dependencies will not be checked. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 2f0f9465ad9fa9c93f30009184c10da0f504f313 Author: Yajun Deng Date: Fri Apr 21 16:26:06 2023 +0800 net: sched: Print msecs when transmit queue time out The kernel will print several warnings in a short period of time when it stalls. Like this: First warning: [ 7100.097547] ------------[ cut here ]------------ [ 7100.097550] NETDEV WATCHDOG: eno2 (xxx): transmit queue 8 timed out [ 7100.097571] WARNING: CPU: 8 PID: 0 at net/sched/sch_generic.c:467 dev_watchdog+0x260/0x270 ... Second warning: [ 7147.756952] rcu: INFO: rcu_preempt self-detected stall on CPU [ 7147.756958] rcu: 24-....: (59999 ticks this GP) idle=546/1/0x400000000000000 softirq=367 3137/3673146 fqs=13844 [ 7147.756960] (t=60001 jiffies g=4322709 q=133381) [ 7147.756962] NMI backtrace for cpu 24 ... We calculate that the transmit queue start stall should occur before 7095s according to watchdog_timeo, the rcu start stall at 7087s. These two times are close together, it is difficult to confirm which happened first. To let users know the exact time the stall started, print msecs when the transmit queue time out. Signed-off-by: Yajun Deng Signed-off-by: David S. Miller commit 00266b365d2b5a7ab4c9fa300784607d5770f8bc Merge: 4d2bd2581c3bc 0bcf2e4aca6c2 Author: David S. Miller Date: Sun Apr 23 14:16:45 2023 +0100 Merge branch 'dsa-skb_mac_header' Vladimir Oltean says: ==================== Remove skb_mac_header() dependency in DSA xmit path Eric started working on removing skb_mac_header() assumptions from the networking xmit path, and I offered to help for DSA: https://lore.kernel.org/netdev/20230321164519.1286357-1-edumazet@google.com/ The majority of this patch set is a straightforward replacement of skb_mac_header() with skb->data (hidden either behind skb_eth_hdr(), or behind skb_vlan_eth_hdr()). The only patch which is more "interesting" is 9/9. Another potential caller of __skb_vlan_pop() on xmit (and therefore also of skb_mac_header()) is tcf_vlan_act(), but I haven't had the time to investigate that (enough to submit changes other than what's here). v1->v2: - 09/09: document the vlan_tci argument of vlan_remove_tag() in the kdoc v1 at: https://lore.kernel.org/netdev/20230322233823.1806736-1-vladimir.oltean@nxp.com/ Cc: Madalin Bucur ==================== Signed-off-by: David S. Miller commit 0bcf2e4aca6c29a07555b713f2fb461dc38d5977 Author: Vladimir Oltean Date: Fri Apr 21 01:56:01 2023 +0300 net: dsa: tag_ocelot: call only the relevant portion of __skb_vlan_pop() on TX ocelot_xmit_get_vlan_info() calls __skb_vlan_pop() as the most appropriate helper I could find which strips away a VLAN header. That's all I need it to do, but __skb_vlan_pop() has more logic, which will become incompatible with the future revert of commit 6d1ccff62780 ("net: reset mac header in dev_start_xmit()"). Namely, it performs a sanity check on skb_mac_header(), which will stop being set after the above revert, so it will return an error instead of removing the VLAN tag. ocelot_xmit_get_vlan_info() gets called in 2 circumstances: (1) the port is under a VLAN-aware bridge and the bridge sends VLAN-tagged packets (2) the port is under a VLAN-aware bridge and somebody else (an 8021q upper) sends VLAN-tagged packets (using a VID that isn't in the bridge vlan tables) In case (1), there is actually no bug to defend against, because br_dev_xmit() calls skb_reset_mac_header() and things continue to work. However, in case (2), illustrated using the commands below, it can be seen that our intervention is needed, since __skb_vlan_pop() complains: $ ip link add br0 type bridge vlan_filtering 1 && ip link set br0 up $ ip link set $eth master br0 && ip link set $eth up $ ip link add link $eth name $eth.100 type vlan id 100 && ip link set $eth.100 up $ ip addr add 192.168.100.1/24 dev $eth.100 I could fend off the checks in __skb_vlan_pop() with some skb_mac_header_was_set() calls, but seeing how few callers of __skb_vlan_pop() there are from TX paths, that seems rather unproductive. As an alternative solution, extract the bare minimum logic to strip a VLAN header, and move it to a new helper named vlan_remove_tag(), close to the definition of vlan_insert_tag(). Document it appropriately and make ocelot_xmit_get_vlan_info() call this smaller helper instead. Seeing that it doesn't appear illegal to test skb->protocol in the TX path, I guess it would be a good for vlan_remove_tag() to also absorb the vlan_set_encap_proto() function call. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit f0a9d563064c3040a2d7b32317b37a6bcb1099b2 Author: Vladimir Oltean Date: Fri Apr 21 01:56:00 2023 +0300 net: dsa: update TX path comments to not mention skb_mac_header() Once commit 6d1ccff62780 ("net: reset mac header in dev_start_xmit()") will be reverted, it will no longer be true that skb->data points at skb_mac_header(skb) - since the skb->mac_header will not be set - so stop saying that, and just say that it points to the MAC header. I've reviewed vlan_insert_tag() and it does not *actually* depend on skb_mac_header(), so reword that to avoid the confusion. Signed-off-by: Vladimir Oltean Reviewed-by: Eric Dumazet Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit b5653b157e55a25ec76506e8cd31353e0ed4944c Author: Vladimir Oltean Date: Fri Apr 21 01:55:59 2023 +0300 net: dsa: tag_sja1105: replace skb_mac_header() with vlan_eth_hdr() This is a cosmetic patch which consolidates the code to use the helper function offered by if_vlan.h. Signed-off-by: Vladimir Oltean Reviewed-by: Eric Dumazet Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit f9346f00b5af0b32503dcd74072392d9592163ef Author: Vladimir Oltean Date: Fri Apr 21 01:55:58 2023 +0300 net: dsa: tag_sja1105: don't rely on skb_mac_header() in TX paths skb_mac_header() will no longer be available in the TX path when reverting commit 6d1ccff62780 ("net: reset mac header in dev_start_xmit()"). As preparation for that, let's use skb_vlan_eth_hdr() to get to the VLAN header instead, which assumes it's located at skb->data (assumption which holds true here). Signed-off-by: Vladimir Oltean Reviewed-by: Eric Dumazet Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 499b2491d550677b824b828ff431e4ef4d1d3b9d Author: Vladimir Oltean Date: Fri Apr 21 01:55:57 2023 +0300 net: dsa: tag_ksz: do not rely on skb_mac_header() in TX paths skb_mac_header() will no longer be available in the TX path when reverting commit 6d1ccff62780 ("net: reset mac header in dev_start_xmit()"). As preparation for that, let's use skb_eth_hdr() to get to the Ethernet header's MAC DA instead, helper which assumes this header is located at skb->data (assumption which holds true here). Signed-off-by: Vladimir Oltean Reviewed-by: Eric Dumazet Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit eabb1494c9f20362ae53a9991481a1523be4f4b7 Author: Vladimir Oltean Date: Fri Apr 21 01:55:56 2023 +0300 net: dsa: tag_ocelot: do not rely on skb_mac_header() for VLAN xmit skb_mac_header() will no longer be available in the TX path when reverting commit 6d1ccff62780 ("net: reset mac header in dev_start_xmit()"). As preparation for that, let's use skb_vlan_eth_hdr() to get to the VLAN header instead, which assumes it's located at skb->data (assumption which holds true here). Signed-off-by: Vladimir Oltean Reviewed-by: Eric Dumazet Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e2fdfd7119128b49d81972a75e74169802aa8ae0 Author: Vladimir Oltean Date: Fri Apr 21 01:55:55 2023 +0300 net: dpaa: avoid one skb_reset_mac_header() in dpaa_enable_tx_csum() It appears that dpaa_enable_tx_csum() only calls skb_reset_mac_header() to get to the VLAN header using skb_mac_header(). We can use skb_vlan_eth_hdr() to get to the VLAN header based on skb->data directly. This avoids spending a few cycles to set skb->mac_header. Signed-off-by: Vladimir Oltean Reviewed-by: Eric Dumazet Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Acked-by: Madalin Bucur Signed-off-by: David S. Miller commit 1f5020acb33f926030f62563c86dffca35c7b701 Author: Vladimir Oltean Date: Fri Apr 21 01:55:54 2023 +0300 net: vlan: introduce skb_vlan_eth_hdr() Similar to skb_eth_hdr() introduced in commit 96cc4b69581d ("macvlan: do not assume mac_header is set in macvlan_broadcast()"), let's introduce a skb_vlan_eth_hdr() helper which can be used in TX-only code paths to get to the VLAN header based on skb->data rather than based on the skb_mac_header(skb). We also consolidate the drivers that dereference skb->data to go through this helper. Signed-off-by: Vladimir Oltean Reviewed-by: Eric Dumazet Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit f90615ada0b1e21a9d93ff89b04549fd7a92c92b Author: Vladimir Oltean Date: Fri Apr 21 01:55:53 2023 +0300 net: vlan: don't adjust MAC header in __vlan_insert_inner_tag() unless set This is a preparatory change for the deletion of skb_reset_mac_header(skb) from __dev_queue_xmit(). After that deletion, skb_mac_header(skb) will no longer be set in TX paths, from which __vlan_insert_inner_tag() can still be called (perhaps indirectly). If we don't make this change, then an unset MAC header (equal to ~0U) will become set after the adjustment with VLAN_HLEN. Signed-off-by: Vladimir Oltean Reviewed-by: Eric Dumazet Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 4d2bd2581c3bc73e9fdf5f82b25c359212567457 Author: Ramón Nordin Rodriguez Date: Fri Apr 21 18:38:54 2023 +0200 drivers/net/phy: add driver for Microchip LAN867x 10BASE-T1S PHY This patch adds support for the Microchip LAN867x 10BASE-T1S family (LAN8670/1/2). The driver supports P2MP with PLCA. Reviewed-by: Andrew Lunn Signed-off-by: Ramón Nordin Rodriguez Signed-off-by: David S. Miller commit fadfc57cc8047080a123b16f288b7138524fb1e2 Author: Marc Dionne Date: Fri Apr 21 17:16:17 2023 +0100 rxrpc: Fix error when reading rxrpc tokens When converting from ASSERTCMP to WARN_ON, the tested condition must be inverted, which was missed for this case. This would cause an EIO error when trying to read an rxrpc token, for instance when trying to display tokens with AuriStor's "tokens" command. Fixes: 84924aac08a4 ("rxrpc: Fix checker warning") Signed-off-by: Marc Dionne Signed-off-by: David Howells cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org Signed-off-by: David S. Miller commit b148b9abc8444c9e0579a6bbe47b2da6adf5a150 Author: Wang Zhang Date: Fri Apr 21 23:10:09 2023 +0800 net: ethernet: mediatek: remove return value check of `mtk_wed_hw_add_debugfs` Smatch complains that: mtk_wed_hw_add_debugfs() warn: 'dir' is an error pointer or valid Debugfs checks are generally not supposed to be checked for errors and it is not necessary here. fix it by just deleting the dead code. Signed-off-by: Wang Zhang Reviewed-by: Dongliang Mu Signed-off-by: David S. Miller commit 788352191c85326beb74f518ba761ed38b82f533 Author: Gustavo A. R. Silva Date: Fri Apr 21 14:08:53 2023 +0100 rxrpc: Replace fake flex-array with flexible-array member Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Transform zero-length array into flexible-array member in struct rxrpc_ackpacket. Address the following warnings found with GCC-13 and -fstrict-flex-arrays=3 enabled: net/rxrpc/call_event.c:149:38: warning: array subscript i is outside array bounds of ‘uint8_t[0]’ {aka ‘unsigned char[]’} [-Warray-bounds=] This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/263 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Signed-off-by: David Howells Reviewed-by: Simon Horman Reviewed-by: Kees Cook Reviewed-by: Jeffrey Altman cc: Marc Dionne cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org cc: linux-hardening@vger.kernel.org Link: https://lore.kernel.org/r/ZAZT11n4q5bBttW0@work/ Signed-off-by: David S. Miller commit 6bb218b5a6e3f3c5e2e76faf8fc976f3f6f72496 Merge: 19c60fdee5db8 87eff2ec57b6d Author: David S. Miller Date: Sun Apr 23 13:35:08 2023 +0100 Merge branch 'napi_threaded_poll-enhancements' Eric Dumazet says: ==================== net: give napi_threaded_poll() some love There is interest to revert commit 4cd13c21b207 ("softirq: Let ksoftirqd do its job") and use instead the napi_threaded_poll() mode. https://lore.kernel.org/netdev/140f61e2e1fcb8cf53619709046e312e343b53ca.camel@redhat.com/T/#m8a8f5b09844adba157ad0d22fc1233d97013de50 Before doing so, make sure napi_threaded_poll() benefits from recent core stack improvements, to further reduce softirq triggers. ==================== Signed-off-by: David S. Miller commit 87eff2ec57b6d68d294013d8dd21e839a1175e3a Author: Eric Dumazet Date: Fri Apr 21 09:43:57 2023 +0000 net: optimize napi_threaded_poll() vs RPS/RFS We use napi_threaded_poll() in order to reduce our softirq dependency. We can add a followup of 821eba962d95 ("net: optimize napi_schedule_rps()") to further remove the need of firing NET_RX_SOFTIRQ whenever RPS/RFS are used. Signed-off-by: Eric Dumazet Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit a1aaee7f8f79d1b0595e24f8c3caed24630d6cb6 Author: Eric Dumazet Date: Fri Apr 21 09:43:56 2023 +0000 net: make napi_threaded_poll() aware of sd->defer_list If we call skb_defer_free_flush() from napi_threaded_poll(), we can avoid to raise IPI from skb_attempt_defer_free() when the list becomes too big. This allows napi_threaded_poll() to rely less on softirqs, and lowers latency caused by a too big list. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit e6f50edfef046cf8ad541b4d5972bf38fdcdec39 Author: Eric Dumazet Date: Fri Apr 21 09:43:55 2023 +0000 net: move skb_defer_free_flush() up We plan using skb_defer_free_flush() from napi_threaded_poll() in the following patch. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 931e93bdf8ca71cef1f8759c43bc2c5385392b8b Author: Eric Dumazet Date: Fri Apr 21 09:43:54 2023 +0000 net: do not provide hard irq safety for sd->defer_lock kfree_skb() can be called from hard irq handlers, but skb_attempt_defer_free() is meant to be used from process or BH contexts, and skb_defer_free_flush() is meant to be called from BH contexts. Not having to mask hard irq can save some cycles. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit e8e1ce8454c9cc8ad2e4422bef346428e52455e3 Author: Eric Dumazet Date: Fri Apr 21 09:43:53 2023 +0000 net: add debugging checks in skb_attempt_defer_free() Make sure skbs that are stored in softnet_data.defer_list do not have a dst attached. Also make sure the the skb was orphaned. Link: https://lore.kernel.org/netdev/CANn89iJuEVe72bPmEftyEJHLzzN=QNR2yueFjTxYXCEpS5S8HQ@mail.gmail.com/T/ Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 19c60fdee5db881a99a9c39fb31942a530d20c63 Merge: 4eaeca1fc43a4 b488ae52ef9f7 Author: David S. Miller Date: Sun Apr 23 13:27:36 2023 +0100 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== This series lowers the CPU usage of the ice driver when using its provided /dev/gnss*. ==================== Signed-off-by: David S. Miller commit 4eaeca1fc43a4060fa79d7a071572e89181a725e Author: Felix Fietkau Date: Thu Apr 20 22:06:42 2023 +0100 net: mtk_eth_soc: mediatek: fix ppe flow accounting for v1 hardware Older chips (like MT7622) use a different bit in ib2 to enable hardware counter support. Add macros for both and select the appropriate bit. Fixes: 3fbe4d8c0e53 ("net: ethernet: mtk_eth_soc: ppe: add support for flow accounting") Signed-off-by: Felix Fietkau Signed-off-by: Daniel Golle Signed-off-by: David S. Miller commit 8d60d5cabea12cd533e4f216ab3b773390165aac Author: Oswald Buddenhagen Date: Sat Apr 22 18:10:20 2023 +0200 ALSA: emu10k1: use high-level I/O functions also during init ... and also use more pre-defined constants on the way (some of which required adjustment). Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422161021.1143967-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 14a2956539b0620d3b7369af75ddc73f18852835 Author: Oswald Buddenhagen Date: Sat Apr 22 18:10:21 2023 +0200 ALSA: emu10k1: fix error handling in snd_audigy_i2c_volume_put() Check all inputs before changing anything, and return the right error code in case of failure. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422161021.1144026-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit dad173035ed6b3ba45b5f3923908f09093964900 Author: Oswald Buddenhagen Date: Sat Apr 22 18:10:21 2023 +0200 ALSA: emu10k1: don't stop DSP in _snd_emu10k1_{,audigy_}init_efx() These functions don't actually touch the DSP until they poke the code into it, at which point it's temporarily stopped anyway. And fx8010.dbg is already zero anyway. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422161021.1144004-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 375052892172c741b93e8e9303ec186cca7169ab Author: Oswald Buddenhagen Date: Sat Apr 22 18:10:20 2023 +0200 ALSA: emu10k1: fix SNDRV_EMU10K1_IOCTL_SINGLE_STEP - Use correct address limit for Audigy - Use the right constant to actually make a step on Audigy - Don't store *_DBG_STEP and the address in emu->fx8010.dbg, as otherwise unrelated operations would make steps, too This is untested. as10k1 was never ported to Audigy anyway. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422161021.1144004-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 65243c7eb601fdb1e0f979e7404d87b91f913387 Author: Oswald Buddenhagen Date: Sat Apr 22 18:10:21 2023 +0200 ALSA: emu10k1: skip Sound Blaster-specific hacks for E-MU cards The rev2 cards use CA0108, but the embedded P17V goes entirely unused. Also, A_IOCTL (which is really the GPIO port) is actually the FPGA control port, so messing with it is no good idea. The hacks are actually mutually exclusive, so make that explicit while we're at it. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422161021.1143888-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 2696d5a3b0ec9f242b0220999933b6c78502b1b2 Author: Oswald Buddenhagen Date: Sat Apr 22 18:10:20 2023 +0200 ALSA: emu10k1: fixup DSP defines Firstly, fix the distribution between public and private headers. Otherwise, some of the already public macros wouldn't actually work, and the SNDRV_EMU10K1_IOCTL_DBG_READ result for Audigy would be useless. Secondly, add condition code registers for Audigy. These are just aliases for selected constant registers, and thus are generation- specific. At least A_CC_REG_ZERO is actually correct ... Finally, shuffle around some defines to more logical places while at it, and fix up some more comments. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422161021.1143903-7-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 145ec1fd00a875d5afc54f52295472e2a898e35c Author: Oswald Buddenhagen Date: Sat Apr 22 18:10:19 2023 +0200 ALSA: emu10k1: pull in some register definitions from kX-project For documentation purposes and later use. Some pre-existing but (mostly) unused definitions were renamed for consistency. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422161021.1143903-6-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit ac9219d93a983b0e146878695beb64ea624747d4 Author: Oswald Buddenhagen Date: Sat Apr 22 18:10:18 2023 +0200 ALSA: emu10k1: remove some bogus defines Firstly, remove the FXWC_* defines - the comment on FXWC implies that the relevant defines are the (A_)EXTOUT_* ones. It's unclear where this came from - it was in the initial ALSA import, but neither the driver from Creative nor kX-project have these defines. Secondly, remove A_HR, which made plain no sense (was unused, and clashed with FXRT). Amends commit cbb7d8f9b7b ("emu10k1: Update registers defines for the Audigy 2/emu10k2.5"). Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422161021.1143903-5-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit a062b1032adae9ad89afb8dca299ef3ce9aca566 Author: Oswald Buddenhagen Date: Sat Apr 22 18:10:17 2023 +0200 ALSA: emu10k1: eliminate some unused defines One might be mislead to think that these mean anything. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422161021.1143903-4-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 6815f5359aa5d02d1a936221812ab46624c39283 Author: Oswald Buddenhagen Date: Sat Apr 22 18:10:16 2023 +0200 ALSA: emu10k1: fix lineup of EMU_HANA_* defines The bit values are supposed to be internally indented by one step relative to the register addresses. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422161021.1143903-3-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit a869057cd639ed41a1b16bc072fb20cb1ed1dc51 Author: Oswald Buddenhagen Date: Sat Apr 22 18:10:15 2023 +0200 ALSA: emu10k1: comment updates Move comments to better locations, de-duplicate, fix/remove incorrect/ outdated ones, add new ones, and unify spacing somewhat. While at it, also add testing credits for Jonathan Dowland (SB Live! Platinum) and myself (E-MU 0404b). Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422161021.1143903-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 3db166d6cf0ea73dd2c887036aad2e95e0884d9b Author: Dan Williams Date: Tue Apr 18 10:39:01 2023 -0700 cxl/mbox: Deprecate poison commands The CXL subsystem is adding formal mechanisms for managing device poison. Minimize the maintenance burden going forward, and maximize the investment in common tooling by deprecating direct user access to poison commands outside of CXL_MEM_RAW_COMMANDS debug scenarios. A new cxl_deprecated_commands[] list is created for querying which command ids defined in previous kernels are now deprecated. CXL Media and Poison Management commands, opcodes 0x43XX, defined in CXL 3.0 Spec, Table 8-93 are deprecated with one exception: Get Scan Media Capabilities. Keep Get Scan Media Capabilities as it simply provides information and has no impact on the device state. Effectively all of the commands defined in: commit 87815ee9d006 ("cxl/pci: Add media provisioning required commands") ...were defined prematurely and should have waited until the kernel implementation was decided. To my knowledge there are no shipping devices with poison support and no known tools that would regress with this change. Co-developed-by: Alison Schofield Signed-off-by: Alison Schofield Link: https://lore.kernel.org/r/652197e9bc8885e6448d989405b9e50ee9d6b0a6.1681838291.git.alison.schofield@intel.com Tested-by: Jonathan Cameron Signed-off-by: Dan Williams commit f4670a1b30f886e843258ca4a69c442811a90302 Author: Nathan Chancellor Date: Fri Apr 21 09:11:27 2023 -0700 MIPS: Sink body of check_bugs_early() into its only call site If check_bugs_early() is not inlined, which a compiler is free to do after commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly"), modpost would warn that check_bugs_early(), a non-init function, refers to check_bugs64_early(), which is marked __init. This would not result in any run time issues, as check_bugs_early() is only called from setup_arch(), which is marked __init. To avoid this potential warning, just sink the body of check_bugs_early() into its single call site in setup_arch(). Signed-off-by: Nathan Chancellor Signed-off-by: Thomas Bogendoerfer commit 95b5baf81001a80a8dd8b35306694db163bcb423 Author: Nathan Chancellor Date: Fri Apr 21 09:11:26 2023 -0700 MIPS: Mark check_bugs() as __init After commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly"), a compiler may choose not to inline a function marked with just 'inline'. If check_bugs() is not inlined into start_kernel(), which occurs when building with clang after commit 9ea7e6b62c2b ("init: Mark [arch_call_]rest_init() __noreturn"), modpost complains with: WARNING: modpost: vmlinux.o: section mismatch in reference: check_bugs (section: .text) -> check_bugs32 (section: .init.text) check_bugs() is only called from start_kernel(), which itself is marked __init, so there would not be any issues at run time. Make it obvious to modpost that this call chain is safe by marking check_bugs() as __init, which fixes the warning. Reported-by: Naresh Kamboju Link: https://lore.kernel.org/CA+G9fYt+4e57Gdy6cix=LeNK6XqWoui8du=mZWu=cf8vPYocKw@mail.gmail.com/ Signed-off-by: Nathan Chancellor Signed-off-by: Thomas Bogendoerfer commit 267214a2319b5692bbc9b128a6514960291dcca8 Author: Dan Williams Date: Fri Apr 21 19:51:47 2023 -0700 cxl/port: Fix port to pci device assumptions in read_cdat_data() Not all endpoint CXL ports are associated with PCI devices. The cxl_test infrastructure models 'struct cxl_port' instances hosted by platform devices. Teach read_cdat_data() to be careful about non-pci hosted cxl_memdev instances. Otherwise, cxl_test crashes with this signature: RIP: 0010:xas_start+0x6d/0x290 [..] Call Trace: xas_load+0xa/0x50 xas_find+0x25b/0x2f0 xa_find+0x118/0x1d0 pci_find_doe_mailbox+0x51/0xc0 read_cdat_data+0x45/0x190 [cxl_core] cxl_port_probe+0x10a/0x1e0 [cxl_port] cxl_bus_probe+0x17/0x50 [cxl_core] Some other cleanups are included like removing the single-use @uport variable, and removing the indirection through 'struct cxl_dev_state' to lookup the device that registered the memdev and may be a pci device. Fixes: af0a6c3587dc ("cxl/pci: Use CDAT DOE mailbox created by PCI core") Reviewed-by: Lukas Wunner Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/168213190748.708404.16215095414060364800.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 6fb861bb3caf2ca8e440f7a3fdcca35fcac917b4 Author: Oswald Buddenhagen Date: Sat Apr 22 15:24:30 2023 +0200 ALSA: emu10k1: fix snd_emu1010_fpga_read() input masking for rev2 cards Unlike the Alice2 chips used on 1st generation E-MU cards, the Tina/Tina2 chips used on the 2nd gen cards have only six GPIN pins, which means that we need to use a smaller mask. Failure to do so would falsify the read data if the FPGA tried to raise an IRQ right at that moment. This wasn't a problem so far, as we didn't actually enable FPGA IRQs, but that's going to change soon. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422132430.1057490-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 8b2dd46d9a0370cf092fdd798dd66634abaf03e0 Author: Oswald Buddenhagen Date: Sat Apr 22 15:24:30 2023 +0200 ALSA: emu10k1: remove unused emu->pcm_playback_efx_substream field Amends historic commit 27ae958cf6 ("emu10k1 driver - add multichannel device hw:x,3 [2-8/8]"). Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422132430.1057468-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit be250b7c9b2d8b30d923d6ae947c9f8e5fc40948 Author: Oswald Buddenhagen Date: Sat Apr 22 15:24:29 2023 +0200 ALSA: emu10k1: remove unused `resume` parameter from snd_emu10k1_init() This was unnecessarily added in commit 09668b441da ("emu10k1 - Add PM support"). Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422132430.1057468-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit e922da40befdbaa89cd85d3154b4a9cea8880fa0 Author: Oswald Buddenhagen Date: Sat Apr 22 14:15:19 2023 +0200 ALSA: emu10k1: minor optimizations - In snd_emu10k1_look_for_ctl(), evaluate the cheap condition first - In _snd_emu10k1_{audigy_,}init_efx(), don't use expensive bit setting loops to fill arrays - In snd_emu_proc_ptr_reg_read(), remove useless condition - iobase can be only 0 or 0x20 Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422121519.1052813-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 35150203e30b52d657165e325e3abc3b29c2086d Author: Eduard Zingerman Date: Fri Apr 21 23:45:14 2023 +0300 selftests/bpf: verifier/prevent_map_lookup converted to inline assembly Test verifier/prevent_map_lookup automatically converted to use inline assembly. This was a part of a series [1] but could not be applied becuase another patch from a series had to be witheld. [1] https://lore.kernel.org/bpf/20230421174234.2391278-1-eddyz87@gmail.com/ Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421204514.2450907-1-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 6d26d985eeda89faedabbcf6607c37454b9691b0 Author: Florian Westphal Date: Sat Apr 22 09:35:44 2023 +0200 bpf: fix link failure with NETFILTER=y INET=n Explicitly check if NETFILTER_BPF_LINK is enabled, else configs that have NETFILTER=y but CONFIG_INET=n fail to link: > kernel/bpf/syscall.o: undefined reference to `netfilter_prog_ops' > kernel/bpf/verifier.o: undefined reference to `netfilter_verifier_ops' Fixes: fd9c663b9ad6 ("bpf: minimal support for programs hooked into netfilter framework") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304220903.fRZTJtxe-lkp@intel.com/ Signed-off-by: Florian Westphal Link: https://lore.kernel.org/r/20230422073544.17634-1-fw@strlen.de Signed-off-by: Alexei Starovoitov commit e0416e7d33361d2ad0bf9f007428346579ac854a Author: David Howells Date: Fri Apr 21 23:03:46 2023 +0100 rxrpc: Fix potential race in error handling in afs_make_call() If the rxrpc call set up by afs_make_call() receives an error whilst it is transmitting the request, there's the possibility that it may get to the point the rxrpc call is ended (after the error_kill_call label) just as the call is queued for async processing. This could manifest itself as call->rxcall being seen as NULL in afs_deliver_to_call() when it tries to lock the call. Fix this by splitting rxrpc_kernel_end_call() into a function to shut down an rxrpc call and a function to release the caller's reference and calling the latter only when we get to afs_put_call(). Reported-by: Jeffrey Altman Signed-off-by: David Howells Tested-by: kafs-testing+fedora36_64checkkafs-build-306@auristor.com cc: Marc Dionne cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org Signed-off-by: David S. Miller commit 66efce1d099a67d9d0bf635a9815ec478bfbc8a2 Author: Srinivas Neeli Date: Thu Apr 20 16:12:28 2023 +0530 MAINTAINERS: Add fragment for Xilinx watchdog driver Added entry for Xilinx xps-timebase watchdog driver. Signed-off-by: Srinivas Neeli Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230420104231.2243079-2-srinivas.neeli@amd.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit bd858e494ceb3aac25bab9c6639f4cd764f534ba Author: Johannes Thumshirn Date: Tue Apr 18 19:25:31 2023 +0200 watchdog: menz069_wdt: fix timeout setting When setting the timeout for the menz069_wdt watchdog driver, we erroneously read from the 'watchdog value register' (WVR) instead of the 'watchdog timer register' (WTR) and then write the value back into WTR. This can potentially lead to wrong timeouts and wrong enable bit settings. Signed-off-by: Johannes Thumshirn Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230418172531.177349-3-jth@kernel.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 87b22656ca6a896d0378e9e60ffccb0c82f48b08 Author: Johannes Thumshirn Date: Tue Apr 18 19:25:30 2023 +0200 watchdog: menz069_wdt: fix watchdog initialisation Doing a 'cat /dev/watchdog0' with menz069_wdt as watchdog0 will result in a NULL pointer dereference. This happens because we're passing the wrong pointer to watchdog_register_device(). Fix this by getting rid of the static watchdog_device structure and use the one embedded into the driver's per-instance private data. Signed-off-by: Johannes Thumshirn Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230418172531.177349-2-jth@kernel.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit a23c83a0ae0280632e734aff1dbf299f602a79c4 Author: Om Parikh Date: Tue Apr 18 05:16:10 2023 +0000 dt-bindings: watchdog: alphascale-asm9260: convert to DT schema Makes alphascale-asm9260 dt bindings adhere to the dt json-schema by replacing txt file with yaml file. Signed-off-by: Om Parikh Reviewed-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230418051446.24288-1-hack3r-0m@proton.me Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 2a31bf20808aa3642a942ab9ce421ebb7585eb3a Author: Keguang Zhang Date: Thu Mar 30 19:20:51 2023 +0800 watchdog: loongson1_wdt: Implement restart handler Implement restart handler for the Loongson-1 watchdog driver and define the watchdog registers instead of including the legacy header. Signed-off-by: Keguang Zhang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230330112051.551648-3-keguang.zhang@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d0ee0e8aa97e6e1d443eaab8c94d580d0a6f5a89 Author: Bhupesh Sharma Date: Tue Mar 14 10:43:51 2023 +0530 dt-bindings: watchdog: Document Qualcomm SM6115 watchdog Add devicetree binding for watchdog present on Qualcomm SM6115 SoC. Acked-by: Krzysztof Kozlowski Signed-off-by: Bhupesh Sharma Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230314051351.1754321-1-bhupesh.sharma@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 495cbe36ee795dc06abccfb251e4384c6a26dc48 Author: Krzysztof Kozlowski Date: Sat Apr 15 11:51:12 2023 +0200 dt-bindings: watchdog: realtek,otto-wdt: simplify requiring interrupt-names Required properties should be listed in "required:" block. Since interrupts are already there, the dependency of interrupt-names on the interrupts can be simplified. Signed-off-by: Krzysztof Kozlowski Acked-by: Sander Vanheule Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230415095112.51257-6-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 20f43c943d06f628f832658238581fdeb29f7f92 Author: Krzysztof Kozlowski Date: Sat Apr 15 11:51:11 2023 +0200 dt-bindings: watchdog: toshiba,visconti-wdt: simplify with unevaluatedProperties Allow generic watchdog properties by using unevaluatedProperties: false. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Acked-by: Nobuhiro Iwamatsu Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230415095112.51257-5-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d5e8f87e365ff944631889ac978a7000a6181b3d Author: Krzysztof Kozlowski Date: Sat Apr 15 11:51:10 2023 +0200 dt-bindings: watchdog: fsl-imx7ulp-wdt: simplify with unevaluatedProperties Allow generic watchdog properties by using unevaluatedProperties: false. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230415095112.51257-4-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f0d6e92ebb06ca9a360683e69932d09bfc70f551 Author: Krzysztof Kozlowski Date: Sat Apr 15 11:51:09 2023 +0200 dt-bindings: watchdog: arm,sp805: drop unneeded minItems There is no need to specify minItems when they are equal to maxItems, because it is implied by maxItems. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230415095112.51257-3-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 6c266971d5d700f283c73094caca9e1ebde2d67a Author: Krzysztof Kozlowski Date: Sat Apr 15 11:51:07 2023 +0200 dt-bindings: watchdog: drop duplicated GPIO watchdog bindings Two conversions to DT schema of GPIO watchdog binding happened and came through different trees. Merge them into one: 1. Combine maintainers, 2. Use more descriptive property descriptions and constraints from gpio-wdt.yaml, 3. Switch to unevaluatedProperties:false, to allow generic watchdog properties. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230415095112.51257-1-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit edb10ace4dcd05f804d59dfdf2fee9121c92faee Author: Yassine Oudjana Date: Thu Mar 2 15:40:14 2023 +0300 dt-bindings: reset: Add binding for MediaTek MT6735 TOPRGU/WDT Add a DT binding for the MT6735 top reset generation unit/watchdog timer. Signed-off-by: Yassine Oudjana Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230302124015.75546-2-y.oudjana@protonmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit db728ea9c7be137b4f4361295f11e0b56b6286ac Author: Xingyu Wu Date: Tue Mar 14 21:24:36 2023 +0800 drivers: watchdog: Add StarFive Watchdog driver Add watchdog driver for the StarFive JH7100 and JH7110 SoC. Signed-off-by: Xingyu Wu Reviewed-by: Emil Renner Berthing Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230314132437.121534-3-xingyu.wu@starfivetech.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit b24e265d6f0a0965ae0d0a19848544300c397a2e Author: Xingyu Wu Date: Tue Mar 14 21:24:35 2023 +0800 dt-bindings: watchdog: Add watchdog for StarFive JH7100 and JH7110 Add bindings to describe the watchdog for the StarFive JH7100/JH7110 SoC. And Use JH7100 as first StarFive SoC with watchdog. Signed-off-by: Xingyu Wu Reviewed-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230314132437.121534-2-xingyu.wu@starfivetech.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 819d14135da5f8cd0e2104a6def805707e46d99b Author: Krzysztof Kozlowski Date: Sat Apr 15 11:51:08 2023 +0200 dt-bindings: watchdog: indentation, quotes and white-space cleanup Minor cleanup without functional impact: 1. Indent DTS examples to preferred four-spaces (more readable for DTS), 2. Drop unneeded quotes, 3. Add/drop blank lines to make the code readable. Signed-off-by: Krzysztof Kozlowski Acked-by: Sergio Paracuellos Acked-by: Justin Chen Acked-by: Neil Armstrong Acked-by: Nicolas Ferre Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230415095112.51257-2-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit ab8da07609fc982196df9df8f9b4f9ba4bea4731 Author: William Breathitt Gray Date: Mon Apr 10 11:09:26 2023 -0400 watchdog: ebc-c384_wdt: Mark status as orphaned The current maintainer no longer has access to the device for testing, the original user of this driver indicates that they have moved on to another device, and the manufacturer WINSYSTEMS does not appear interested in taking over support for this code. Signed-off-by: William Breathitt Gray Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230410150926.3354-1-william.gray@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 64543b0d637bd28abed1a3311aa8c9b007ee52d7 Author: Alexandre Mergnat Date: Fri Apr 7 14:59:22 2023 +0200 dt-bindings: watchdog: mediatek,mtk-wdt: add mt8365 Add binding description for mediatek,mt8365-wdt Acked-by: Krzysztof Kozlowski Reviewed-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230203-evk-board-support-v5-3-1883c1b405ad@baylibre.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit ee0da40588e1eda1323e7abd8e91a2dfe359b87c Author: Konrad Dybcio Date: Tue Mar 14 13:52:56 2023 +0100 dt-bindings: watchdog: qcom-wdt: add QCM2290 Document the QCM2290 KPSS watchdog. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230314-topic-2290_compats-v1-1-47e26c3c0365@linaro.org [groeck: Fixed context conflicts] Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 2cd55934d9774d23a7c683e415935cb9cd7dedff Author: Kathiravan T Date: Mon Mar 20 16:15:29 2023 +0530 dt-bindings: watchdog: qcom-wdt: add qcom,apss-wdt-ipq5332 compatible Add a compatible for the IPQ5332 platform's APSS watchdog. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Kathiravan T Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230320104530.30411-2-quic_kathirav@quicinc.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 92ce288ccb0d472977b24bd0b7240fc2490a6145 Merge: 99e5acae193e3 86ce0d09e4246 Author: David S. Miller Date: Sat Apr 22 14:13:25 2023 +0100 Merge branch 'mtk_eth_soc-firmware' Daniel Golle says: ==================== net: ethernet: mtk_eth_soc: use WO firmware for MT7981 In order to support wireless offloading on MT7981 we need to load the appropriate firmware. Recognize MT7981 by introducing a new DT compatible and load mt7981_wo.bin if it is set. Changes since v1: * retain alphabetic order in dt-bindings ==================== Signed-off-by: David S. Miller commit 86ce0d09e42463816f13766ac286012ec7b71fdc Author: Daniel Golle Date: Thu Apr 20 17:05:05 2023 +0100 net: ethernet: mtk_eth_soc: use WO firmware for MT7981 In order to support wireless offloading on MT7981 we need to load the appropriate firmware. Recognize MT7981 and load mt7981_wo.bin. Signed-off-by: Daniel Golle Signed-off-by: David S. Miller commit cf88231d973909dc8d578138509973e062aba3d7 Author: Daniel Golle Date: Thu Apr 20 17:04:23 2023 +0100 dt-bindings: net: mediatek: add WED RX binding for MT7981 eth driver Add compatible string for mediatek,mt7981-wed as MT7981 also supports RX WED just like MT7986, but needs a different firmware file. Signed-off-by: Daniel Golle Acked-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 99e5acae193e369b71217efe6f1dad42f3f18815 Author: Ziyang Xuan Date: Thu Apr 20 20:40:35 2023 +0800 ipv4: Fix potential uninit variable access bug in __ip_make_skb() Like commit ea30388baebc ("ipv6: Fix an uninit variable access bug in __ip6_make_skb()"). icmphdr does not in skb linear region under the scenario of SOCK_RAW socket. Access icmp_hdr(skb)->type directly will trigger the uninit variable access bug. Use a local variable icmp_type to carry the correct value in different scenarios. Fixes: 96793b482540 ("[IPV4]: Add ICMPMsgStats MIB (RFC 4293)") Reviewed-by: Willem de Bruijn Signed-off-by: Ziyang Xuan Signed-off-by: David S. Miller commit dcd615ee6fd3651ab0357364c4cf65b1148a40be Author: Shreeya Patel Date: Wed Mar 29 02:30:48 2023 +0530 dt-bindings: watchdog: rockchip: Add rockchip,rk3588-wdt string Add rockchip,rk3588-wdt compatible string. Signed-off-by: Shreeya Patel Reviewed-by: Heiko Stuebner Acked-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20230328210048.195124-3-shreeya.patel@collabora.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 33e4945352a2484c92fc1d5a16471b1939d67abb Author: Jakob Koschel Date: Mon Mar 13 14:59:19 2023 +0100 watchdog: avoid usage of iterator after loop If potentially no valid element is found, 'p' would contain an invalid pointer past the iterator loop. To ensure 'p' is valid under any circumstances, the kfree() should be within the loop body. Additionally, Linus proposed to avoid any use of the list iterator variable after the loop, in the attempt to move the list iterator variable declaration into the macro to avoid any potential misuse after the loop [1]. Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ [1] Signed-off-by: Jakob Koschel Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230301-watchdog-avoid-iter-after-loop-v2-1-8411e3bbe0de@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit fc0c5db58f4c78b948acfbf9558eeaf6b343bf9a Author: Tom Rix Date: Tue Mar 21 14:34:39 2023 -0400 watchdog: s3c2410: remove unused freq_to_wdt and s3c2410wdt_is_running functions clang with W=1 reports drivers/watchdog/s3c2410_wdt.c:311:35: error: unused function 'freq_to_wdt' [-Werror,-Wunused-function] static inline struct s3c2410_wdt *freq_to_wdt(struct notifier_block *nb) ^ drivers/watchdog/s3c2410_wdt.c:446:19: error: unused function 's3c2410wdt_is_running' [-Werror,-Wunused-function] static inline int s3c2410wdt_is_running(struct s3c2410_wdt *wdt) ^ These functions are not used, so remove them. Signed-off-by: Tom Rix Reviewed-by: Andi Shyti Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230321183439.1826823-1-trix@redhat.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit bfeaadbc0b8231e81dacd0616b476520759641ae Author: Krzysztof Kozlowski Date: Fri Mar 10 23:30:12 2023 +0100 watchdog: aspeed: Drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). drivers/watchdog/aspeed_wdt.c:56:34: error: ‘aspeed_wdt_of_table’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230310223012.315897-1-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4eda19cc8a29cde3580ed73bf11dc73b4e757697 Author: Gregory Oakes Date: Thu Mar 16 15:13:12 2023 -0500 watchdog: sp5100_tco: Immediately trigger upon starting. The watchdog countdown is supposed to begin when the device file is opened. Instead, it would begin countdown upon the first write to or close of the device file. Now, the ping operation is called within the start operation which ensures the countdown begins. From experimenation, it does not appear possible to do this with a single write including both the start bit and the trigger bit. So, it is done as two distinct writes. Signed-off-by: Gregory Oakes Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230316201312.17538-1-gregory.oakes@amd.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit fe5631bb3a4bf62208ed52600c21dd3d1787f412 Author: Sergio Paracuellos Date: Thu Mar 2 09:59:14 2023 +0100 dt-bindings: watchdog: migrate rt2880 text bindings to YAML Ralink RT2880 Watchdog bindings used text format, so migrate them to YAML. There are some additions to the binding that were not in the original txt file. This binding is used in RT2880, RT3050, RT3352, RT3883, RT5350, and MT7620 SoCs. To properly align binding with driver code we need to add to the schema 'clocks' and 'resets' properties. Signed-off-by: Sergio Paracuellos Reviewed-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230302085914.2858645-1-sergio.paracuellos@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit af3ac8e41786440a5ca0fa37628685f8f514f0a6 Author: Sergio Paracuellos Date: Wed Mar 1 07:55:10 2023 +0100 watchdog: rt2880-wdt: prefer unsigned int over unsigned Instead of declare 'reg' variable in read and write operations as a bare 'unsigned' type prefer to declate it as 'unsigned int'. Signed-off-by: Sergio Paracuellos Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230301065510.2818425-2-sergio.paracuellos@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 76ad36bf0ea620b14d32a332108a248412886d54 Author: Sergio Paracuellos Date: Wed Mar 1 07:55:09 2023 +0100 watchdog: rt2880-wdt: avoid static global declarations Instead of using static global definitions in driver code, refactor code introducing a new watchdog driver data structure and use it along the code. Signed-off-by: Sergio Paracuellos Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230301065510.2818425-1-sergio.paracuellos@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 07d41160b3b65c621f9352196c3791fdc7d2380d Author: Christophe JAILLET Date: Sat Dec 31 12:14:30 2022 +0100 watchdog: loongson1: Use devm_clk_get_enabled() helper The devm_clk_get_enabled() helper: - calls devm_clk_get() - calls clk_prepare_enable() and registers what is needed in order to call clk_disable_unprepare() when needed, as a managed resource. This simplifies the code and avoids the need of a dedicated function used with devm_add_action_or_reset(). Signed-off-by: Christophe JAILLET Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/624106aa86ef7e49f16b11b229528eabd63de8f7.1672485257.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 8fd15ace76a4aeb3648cf078541b5e6cfc91d5a2 Author: Christophe JAILLET Date: Sat Dec 31 12:07:27 2022 +0100 watchdog: ixp4xx: Use devm_clk_get_enabled() helper The devm_clk_get_enabled() helper: - calls devm_clk_get() - calls clk_prepare_enable() and registers what is needed in order to call clk_disable_unprepare() when needed, as a managed resource. This simplifies the code and avoids the need of a dedicated function used with devm_add_action_or_reset(). Signed-off-by: Christophe JAILLET Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/5d04e453a4da5cfafb56695a17157fa3ea296511.1672484831.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e0e0ee02e616269451dd00ff56be0328d5625a92 Author: Uwe Kleine-König Date: Tue Mar 7 07:56:03 2023 +0100 watchdog: s3c2410_wdt: Simplify using dev_err_probe() Make use of dev_err_probe() also for error paths that don't have to handle -EPROBE_DEFER. While the code handing -EPROBE_DEFER isn't used for these error paths, it still simpler as it cares for pretty printing the error code and usually needs one code line less as it combines message emitting and error returning. This also unifies the format of the error messages. Signed-off-by: Uwe Kleine-König Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230307065603.2253054-3-u.kleine-koenig@pengutronix.de [groeck: Split long line to avoid checkpatch warning] Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 16d477a1dba9f214d1229d0a122d6d3a9636aa79 Author: Uwe Kleine-König Date: Tue Mar 7 07:56:02 2023 +0100 watchdog: s3c2410: Make s3c2410_get_wdt_drv_data() return an int This is a preparation for making more use of dev_err_probe(). The idea is that s3c2410_get_wdt_drv_data() (as it's called only by .probe()) can make effective use of dev_err_probe() only if it returns an int. For that the assignment to wdt->drv_data has to happen in the function. The caller can then just pass on the return value in the error case. This seems to be nicer for the compiler: bloatometer reports for an ARCH=arm s3c6400_defconfig build: add/remove: 1/1 grow/shrink: 0/1 up/down: 4/-64 (-60) Function old new delta __initcall__kmod_s3c2410_wdt__209_821_s3c2410wdt_driver_init6 - 4 +4 __initcall__kmod_s3c2410_wdt__209_819_s3c2410wdt_driver_init6 4 - -4 s3c2410wdt_probe 1332 1272 -60 There is no semantical change. (Just one minor difference: Before this patch wdt->drv_data was always assigned, now that only happens in the non-error case. That doesn't matter however as *wdt is freed in the error case.) Signed-off-by: Uwe Kleine-König Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230307065603.2253054-2-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 0e89b2c9a2a6984af43d09de9d1bb44da9822ba2 Author: Uwe Kleine-König Date: Tue Mar 7 08:04:04 2023 +0100 watchdog: wm8350: Simplify using devm_watchdog_register_device() This allows to drop the .remove() function as it only exists to unregister the watchdog device which is now done in a callback registered by devm_watchdog_register_device(). Signed-off-by: Uwe Kleine-König Reviewed-by: Guenter Roeck Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20230307070404.2256308-4-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4095b94d3af8b05805b0fde192475b5578c73a48 Author: Uwe Kleine-König Date: Tue Mar 7 08:04:03 2023 +0100 watchdog: rn5t618: Simplify using devm_watchdog_register_device() This allows to drop the .remove() function as it only exists to unregister the watchdog device which is now done in a callback registered by devm_watchdog_register_device(). Signed-off-by: Uwe Kleine-König Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230307070404.2256308-3-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 16da6fbb55532c375cee0a7f33817225ae27a49f Author: Uwe Kleine-König Date: Tue Mar 7 08:04:02 2023 +0100 watchdog: bcm47xx: Simplify using devm_watchdog_register_device() This allows to drop the .remove() function as it only exists to unregister the watchdog device which is now done in a callback registered by devm_watchdog_register_device(). Signed-off-by: Uwe Kleine-König Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230307070404.2256308-2-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 74d6c68c74fac3e6bdc28fba69889ed7ef05a7f8 Author: Wang Wensheng Date: Wed Mar 1 11:37:02 2023 +0000 watchdog: sbsa: Test WDOG_HW_RUNNING bit in suspend and resume If the sbsa_gwdt is enabled by BIOS, the kernel set WDOG_HW_RUNNING bit and keep it alive before anyone else would open it. When system suspend, the sbsa_gwdt would not be disabled because WDOG_ACTIVE is not set. Then the sbsa_gwdt would reach timeout since no one touch it during system suspend. To solve this, just test WDOG_HW_RUNNING bit in suspend and disable the sbsa_gwdt if the bit is set, then reopen it accordingly in resume process. Signed-off-by: Wang Wensheng Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230301113702.76437-1-wangwensheng4@huawei.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 96c6e56d3ed46840d575102b7b76a760b28de55b Author: Uwe Kleine-König Date: Fri Mar 3 22:37:15 2023 +0100 watchdog: stmp3xxx_rtc: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-34-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e7a84d457d13775e864864703e88ae3ff4b5d36b Author: Uwe Kleine-König Date: Fri Mar 3 22:37:14 2023 +0100 watchdog: st_lpc: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-33-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 70b5b2b2feb00be6ed479557269438d505f86642 Author: Uwe Kleine-König Date: Fri Mar 3 22:37:13 2023 +0100 watchdog: shwdt: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-32-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f80e31b3abdbbdb82ee85d7d206229d20001f2d6 Author: Uwe Kleine-König Date: Fri Mar 3 22:37:12 2023 +0100 watchdog: sch311x: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-31-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4dca58a8cb7c65a5ab7385837acf60ff09c67e46 Author: Uwe Kleine-König Date: Fri Mar 3 22:37:11 2023 +0100 watchdog: sa1100: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-30-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4ead88bf860a6fb13056e964985ab0a2e78f3a9c Author: Uwe Kleine-König Date: Fri Mar 3 22:37:09 2023 +0100 watchdog: rti: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-28-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 3628149f6eef811e1422ff407e28fd74e6bfdf83 Author: Uwe Kleine-König Date: Fri Mar 3 22:37:07 2023 +0100 watchdog: riowd: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-26-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit b481d57bb1a29b50086130e46e83b0a8ad61604e Author: Uwe Kleine-König Date: Fri Mar 3 22:37:06 2023 +0100 watchdog: renesas: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-25-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 6645579b7081753e4f94946a2c98f5d4aeed9c9c Author: Uwe Kleine-König Date: Fri Mar 3 22:37:05 2023 +0100 watchdog: rdc321x: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-24-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit c550440918fff34f5098f8165ffb227afde6bf33 Author: Uwe Kleine-König Date: Fri Mar 3 22:37:04 2023 +0100 watchdog: rc32434: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-23-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e47f2a3b58e5dba92df861f905895b420a7db9ce Author: Uwe Kleine-König Date: Fri Mar 3 22:37:03 2023 +0100 watchdog: orion: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-22-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 412cec3b5e4cd2652ff6dbf0ce69d7f75e49673d Author: Uwe Kleine-König Date: Fri Mar 3 22:37:02 2023 +0100 watchdog: omap: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-21-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 3a9731099f7141265471ba1e4ed4ee97dc32f200 Author: Uwe Kleine-König Date: Fri Mar 3 22:37:01 2023 +0100 watchdog: nv_tco: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-20-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 55b0fb45375eddf89d8e9f06f22de5bac0285efa Author: Uwe Kleine-König Date: Fri Mar 3 22:37:00 2023 +0100 watchdog: nic7018: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-19-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 62b6a8507c1cdcb375549481f02177e80d51c7f1 Author: Uwe Kleine-König Date: Fri Mar 3 22:36:59 2023 +0100 watchdog: mtx-1: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-18-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit fb22b9e95af8d2f668c95f8b51bed11646720948 Author: Uwe Kleine-König Date: Fri Mar 3 22:36:58 2023 +0100 watchdog: lpc18xx: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-17-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e395a471591392820ccfc7cec1b1581042c461ae Author: Uwe Kleine-König Date: Fri Mar 3 22:36:57 2023 +0100 watchdog: ie6xx: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-16-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 40529e7ed5c98b4bfbaec62b8e13e1e647d46df8 Author: Uwe Kleine-König Date: Fri Mar 3 22:36:56 2023 +0100 watchdog: ib700wdt: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-15-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 5216a0a95d4fa65e26a67c00b739fdbd2c3a1b1f Author: Uwe Kleine-König Date: Fri Mar 3 22:36:55 2023 +0100 watchdog: geodewdt: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-14-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit b5f2e366b148f84d98da2cabd1bbd863fc2d6487 Author: Uwe Kleine-König Date: Fri Mar 3 22:36:54 2023 +0100 watchdog: gef: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-13-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 3a063f9bc4a1490ba913427a8b53ea973c55b043 Author: Uwe Kleine-König Date: Fri Mar 3 22:36:53 2023 +0100 watchdog: dw: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-12-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 5caafac4bb5873fea2b237d32dfcffda24dacd94 Author: Uwe Kleine-König Date: Fri Mar 3 22:36:52 2023 +0100 watchdog: cpwd: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-11-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 0eddace4629996b24e4f028286802c33c8ea0621 Author: Uwe Kleine-König Date: Fri Mar 3 22:36:51 2023 +0100 watchdog: bcm_kona: 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 (mostly) ignored 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. 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: Florian Fainelli Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-10-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 7ca823d5fa4574bef4636d2ae7946078dec6328b Author: Uwe Kleine-König Date: Fri Mar 3 22:36:49 2023 +0100 watchdog: bcm2835: 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 (mostly) ignored 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. 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: Florian Fainelli Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-8-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit ec6de663274d886a32b4e22a6fb3cf4b2e99cfab Author: Uwe Kleine-König Date: Fri Mar 3 22:36:48 2023 +0100 watchdog: ath79: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-7-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit c1e335c8d1b3ff8f818efcec0f250d91cd75af0b Author: Uwe Kleine-König Date: Fri Mar 3 22:36:47 2023 +0100 watchdog: at91rm9200: 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 (mostly) ignored 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. 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: Guenter Roeck Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230303213716.2123717-6-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e676c92e9a3a987a496733df1be50b8cea872822 Author: Uwe Kleine-König Date: Fri Mar 3 22:36:46 2023 +0100 watchdog: ar7: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-5-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 8960d8ada73518ed9ea4d695347bbe0b3142142e Author: Uwe Kleine-König Date: Fri Mar 3 22:36:45 2023 +0100 watchdog: advantechwdt: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-4-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 88d2c181ee9f87b53e1a49cdeb1413e6e45a340e Author: Uwe Kleine-König Date: Fri Mar 3 22:36:44 2023 +0100 watchdog: acquirewdt: 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 (mostly) ignored 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. 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: Guenter Roeck Link: https://lore.kernel.org/r/20230303213716.2123717-3-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 89baf2522ba3a82b7aa61dba023a8092b8ff1d5b Author: Guenter Roeck Date: Sat Mar 4 08:56:53 2023 -0800 watchdog: s3c2410_wdt: Use devm_add_action_or_reset() to disable watchdog Use devm_add_action_or_reset() to disable the watchdog when the driver is removed to simplify the code. With this in place, we can use devm_watchdog_register_device() to register the watchdog, and the removal function is no longer necessary. Cc: Uwe Kleine-König Signed-off-by: Guenter Roeck Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304165653.2179835-2-linux@roeck-us.net Signed-off-by: Wim Van Sebroeck commit 9b31b1ea125ca2e734ae89badc0c3073b4445842 Author: Guenter Roeck Date: Sat Mar 4 08:56:52 2023 -0800 watchdog: s3c2410_wdt: Use devm_clk_get[_optional]_enabled() helpers The devm_clk_get[_optional]_enabled() helpers: - call devm_clk_get[_optional]() - call clk_prepare_enable() and register what is needed in order to call clk_disable_unprepare() when needed, as a managed resource. This simplifies the code and avoids the calls to clk_disable_unprepare(). While at it, use dev_err_probe consistently, and use its return value to return the error code. Cc: Uwe Kleine-König Signed-off-by: Guenter Roeck Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304165653.2179835-1-linux@roeck-us.net Signed-off-by: Wim Van Sebroeck commit 12cee6efb7b94918747d09ba7488dd5cb1bbe2be Author: Guenter Roeck Date: Sat Mar 4 08:16:07 2023 -0800 watchdog: core: Always set WDOG_HW_RUNNING when starting watchdog The use of WDOG_HW_RUNNING is currently inconsistent: If set by the driver, it will remain set until the watchdog device is opened and then closed. If set by the watchdog core, it is only set if the watchdog can not be stopped when closed. Subsequenty it is always only set while the watchdog is closed and the hardware watchdog is running. This is both misleading and inconsistent: The API states that watchdog_hw_running() indicates that the hardware watchdog is running. This is currently not always the case. Set WDOG_HW_RUNNING whenever a watchdog is successfully started for consistent behavior and to accurately report its status. This means that we no longer have to check for both watchdog_active() and watchdog_hw_running() to check if the watchdog is running because watchdog_hw_running() now implies watchdog_active(). Simplify the code accordingly where warranted. Cc: Wang Wensheng Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20230304161607.1418952-1-linux@roeck-us.net Signed-off-by: Wim Van Sebroeck commit 0ea0a825192efdd44af4c016faaab1a3d2073c78 Author: Guenter Roeck Date: Tue Feb 28 07:16:48 2023 -0800 watchdog: imx2_wdg: Declare local symbols static 0-day complains: drivers/watchdog/imx2_wdt.c:442:22: sparse: symbol 'imx_wdt' was not declared. Should it be static? drivers/watchdog/imx2_wdt.c:446:22: sparse: symbol 'imx_wdt_legacy' was not declared. Should it be static? Declare as static variables. Fixes: e42c73f1ef0d ("watchdog: imx2_wdg: suspend watchdog in WAIT mode") Cc: Andrej Picej Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20230228151648.4087637-1-linux@roeck-us.net Signed-off-by: Wim Van Sebroeck commit 335927b125af7937c0dd566ecd62a80f9f55c923 Author: Oswald Buddenhagen Date: Fri Apr 21 16:10:06 2023 +0200 ALSA: emu10k1: remove remaining cruft from snd_emu10k1_emu1010_init() Various redundant FPGA writes which were presumably also cargo-culted from the Windows driver. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230421141006.1005539-7-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 1cbad9a50a28da5ecacb1789f4ed7fe612ba4ac8 Author: Oswald Buddenhagen Date: Fri Apr 21 16:10:05 2023 +0200 ALSA: emu10k1: remove apparently pointless EMU_HANA_OPTION_CARDS reads These seem to be another instance of cargo-culting from the Windows driver. It presumably queries the register to decide about the followup actions, but we don't do that. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230421141006.1005539-6-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 462d972d47a8a367c4c8ee28115778fae45d1992 Author: Oswald Buddenhagen Date: Fri Apr 21 16:10:04 2023 +0200 ALSA: emu10k1: remove apparently pointless FPGA reads These seem to be simply cargo-culted from the Windows driver's behavior. However, the original reason were presumably read-modify-write cycles, which we don't do. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230421141006.1005539-5-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 384e396f15be33ddd5c4eb9017ffc0d6016e27a9 Author: Oswald Buddenhagen Date: Fri Apr 21 16:10:03 2023 +0200 ALSA: emu10k1: stop doing weird things with HCFG in snd_emu10k1_emu1010_init() This doesn't do anything snd_emu10k1_init() wouldn't do later, and none of the things it does seem relevant for the function itself (which is pretty much about setting up the FPGA). It was probably a Windows driver behavior cargo-culting artifact. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230421141006.1005539-4-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit a1c87c0b27059b4155c7aba6b34810c889e8b6a9 Author: Oswald Buddenhagen Date: Fri Apr 21 16:10:01 2023 +0200 ALSA: emu10k1: fix access to Audigy GPIO port As the register definition clearly states, this is a 16-bit register, yet we did all accesses as 32-bit. The writes in particular would have the potential to clear the TIMER register (depending on how the bus/card actually handles the too long writes). This commit also introduces a separate define A_GPIO which aliases A_IOCFG, which better reflects the distinct usage on E-MU cards. This is done in the same commit to keep the churn down, as we're touching all involved lines anyway. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230421141006.1005539-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 10f212bd7a693e379154891cc16959bc4884668a Author: Oswald Buddenhagen Date: Fri Apr 21 16:10:00 2023 +0200 ALSA: emu10k1: properly assert E-MU FPGA access constaints Assert the validity of the registers and values, as them being out of range would indicate an error in the driver. Consequently, don't bother returning error codes; they were ignored everywhere anyway. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230421141006.1005539-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 02a0d9c281401d4e1eb0f83ed337c8c6a70194d2 Author: Oswald Buddenhagen Date: Fri Apr 21 16:10:06 2023 +0200 ALSA: emu10k1: clean up P16V part somewhat Detach it better from the main PCM driver, which it really doesn't have much in common with. In particular, this moves the interrupt handler implementation into p16v.c, and makes it access the substream runtime status more directly, so it doesn't need to abuse structs snd_emu10k1_pcm and snd_emu10k1_voice any more. We don't need private pcm runtime data at all, as the only thing it was used for (except the back-link to the substream) was the `running` flag. So store that directly in runtime->private_data. This somewhat radical strip-down shows that this driver contains some complexity that was never actually utilized. I suppose the right way to fully utilize the hardware in a simple way would be introducing more substreams. This wouldn't require any of the removed code. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230421141006.1005452-7-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 14a5c5a44b61953b3f84a01152fe1d40838f5d91 Author: Oswald Buddenhagen Date: Fri Apr 21 16:10:04 2023 +0200 ALSA: emu10k1: remove unused snd_emu10k1_voice.emu field It was written, but never read from. Its value is available via the epcm field. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230421141006.1005452-5-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit d4af7ca20173e61b77584e4f2025387b7b76ef75 Author: Oswald Buddenhagen Date: Fri Apr 21 16:10:02 2023 +0200 ALSA: emu10k1: remove obsolete card type variable and defines The use of the variable was removed in commit 2b637da5a1b ("clean up card features"). That commit also broke user space (the ioctl structure), at which point the defines became meaningless, so I don't think purging them is a problem. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230421141006.1005452-3-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit b9468c4106d49f6ec84c409470d7aaaefdfff2ba Author: Oswald Buddenhagen Date: Fri Apr 21 16:10:01 2023 +0200 ALSA: emu10k1: drop redundant snd_emu10k1_efx_playback_pointer() It's just an (outdated) copy of snd_emu10k1_playback_pointer(). Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230421141006.1005452-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 798524389a7822a487ac0245d177f9d3bf33a22d Author: Oswald Buddenhagen Date: Fri Apr 21 16:10:00 2023 +0200 ALSA: emu10k1: drop redundant snd_emu10k1_efx_playback_hw_free() Or actually, replace snd_emu10k1_playback_hw_free() with it, as that is a subset. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230421141006.1005452-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit fbc1449d385d65be49a8d164dfd3772f2cb049ae Merge: 9a82cdc28f47f f9c895a72a390 Author: Jakub Kicinski Date: Fri Apr 21 20:47:04 2023 -0700 Merge tag 'mlx5-updates-2023-04-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2023-04-20 1) Dragos Improves RX page pool, and provides some fixes to his previous series: 1.1) Fix releasing page_pool for striding RQ and legacy RQ nonlinear case 1.2) Hook NAPIs to page pools to gain more performance. 2) From Roi, Some cleanups to TC and eswitch modules. 3) Maher migrates vnic diagnostic counters reporting from debugfs to a dedicated devlink health reporter Maher Says: =========== net/mlx5: Expose vnic diagnostic counters using devlink Currently, vnic diagnostic counters are exposed through the following debugfs: $ ls /sys/kernel/debug/mlx5/0000:08:00.0/esw/vf_0/vnic_diag/ cq_overrun quota_exceeded_command total_q_under_processor_handle invalid_command send_queue_priority_update_flow nic_receive_steering_discard The current design does not allow the hypervisor to view the diagnostic counters of its VFs, in case the VFs get bound to a VM. In other words, the counters are not exposed for representor interfaces. Furthermore, the debugfs design is inconvenient future-wise, in case more counters need to be reported by the driver in the future. As these counters pertain to vNIC health, it is more appropriate to utilize the devlink health reporter to expose them. Thus, this patchest includes the following changes: * Drop the current vnic diagnostic counters debugfs interface. * Add a vnic devlink health reporter for PFs/VFs core devices, which when diagnosed will dump vnic diagnostic counter values that are queried from FW. * Add a vnic devlink health reporter for the representor interface, which serves the same purpose listed in the previous point, in addition to allowing the hypervisor to view its VFs diagnostic counters, even when the VFs are bounded to external VMs. Example of devlink health reporter usage is: $devlink health diagnose pci/0000:08:00.0 reporter vnic vNIC env counters: total_error_queues: 0 send_queue_priority_update_flow: 0 comp_eq_overrun: 0 async_eq_overrun: 0 cq_overrun: 0 invalid_command: 0 quota_exceeded_command: 0 nic_receive_steering_discard: 0 =========== 4) SW steering fixes and improvements Yevgeny Kliteynik Says: ======================= These short patch series are just small fixes / improvements for SW steering: - Patch 1: Fix dumping of legacy modify_hdr in debug dump to align to what is expected by parser - Patch 2: Have separate threshold for ICM sync per ICM type - Patch 3: Add more info to the steering debug dump - Linux version and device name - Patch 4: Keep track of number of buddies that are currently in use per domain per buddy type ======================= * tag 'mlx5-updates-2023-04-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: Update op_mode to op_mod for port selection net/mlx5: E-Switch, Remove unused mlx5_esw_offloads_vport_metadata_set() net/mlx5: E-Switch, Remove redundant dev arg from mlx5_esw_vport_alloc() net/mlx5: Include linux/pci.h for pci_msix_can_alloc_dyn() net/mlx5e: RX, Hook NAPIs to page pools net/mlx5e: RX, Fix XDP_TX page release for legacy rq nonlinear case net/mlx5e: RX, Fix releasing page_pool pages twice for striding RQ net/mlx5e: Add vnic devlink health reporter to representors net/mlx5: Add vnic devlink health reporter to PFs/VFs Revert "net/mlx5: Expose vnic diagnostic counters for eswitch managed vports" Revert "net/mlx5: Expose steering dropped packets counter" net/mlx5: DR, Add memory statistics for domain object net/mlx5: DR, Add more info in domain dbg dump net/mlx5: DR, Calculate sync threshold of each pool according to its type net/mlx5: DR, Fix dumping of legacy modify_hdr in debug dump ==================== Link: https://lore.kernel.org/r/20230421013850.349646-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 6e79bd28ab0abd7e82d020d6d1728c3ca543450f Merge: 7ecebee211c62 081abcacaf0a9 Author: Jakub Kicinski Date: Fri Apr 21 20:40:57 2023 -0700 Merge tag 'mlx5-fixes-2023-04-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2023-04-19 This series provides bug fixes to mlx5 driver. * tag 'mlx5-fixes-2023-04-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: Revert "net/mlx5e: Don't use termination table when redundant" net/mlx5e: Nullify table pointer when failing to create net/mlx5: Use recovery timeout on sync reset flow Revert "net/mlx5: Remove "recovery" arg from mlx5_load_one() function" net/mlx5e: Fix error flow in representor failing to add vport rx rule net/mlx5: Release tunnel device after tc update skb net/mlx5: E-switch, Don't destroy indirect table in split rule net/mlx5: E-switch, Create per vport table based on devlink encap mode net/mlx5e: Release the label when replacing existing ct entry net/mlx5e: Don't clone flow post action attributes second time ==================== Link: https://lore.kernel.org/r/20230421015057.355468-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 9a82cdc28f47f5e70f657a25c6e5bf16cf306848 Merge: 418a73074da91 4db10a8243df6 Author: Jakub Kicinski Date: Fri Apr 21 20:32:36 2023 -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 2023-04-21 We've added 71 non-merge commits during the last 8 day(s) which contain a total of 116 files changed, 13397 insertions(+), 8896 deletions(-). The main changes are: 1) Add a new BPF netfilter program type and minimal support to hook BPF programs to netfilter hooks such as prerouting or forward, from Florian Westphal. 2) Fix race between btf_put and btf_idr walk which caused a deadlock, from Alexei Starovoitov. 3) Second big batch to migrate test_verifier unit tests into test_progs for ease of readability and debugging, from Eduard Zingerman. 4) Add support for refcounted local kptrs to the verifier for allowing shared ownership, useful for adding a node to both the BPF list and rbtree, from Dave Marchevsky. 5) Migrate bpf_for(), bpf_for_each() and bpf_repeat() macros from BPF selftests into libbpf-provided bpf_helpers.h header and improve kfunc handling, from Andrii Nakryiko. 6) Support 64-bit pointers to kfuncs needed for archs like s390x, from Ilya Leoshkevich. 7) Support BPF progs under getsockopt with a NULL optval, from Stanislav Fomichev. 8) Improve verifier u32 scalar equality checking in order to enable LLVM transformations which earlier had to be disabled specifically for BPF backend, from Yonghong Song. 9) Extend bpftool's struct_ops object loading to support links, from Kui-Feng Lee. 10) Add xsk selftest follow-up fixes for hugepage allocated umem, from Magnus Karlsson. 11) Support BPF redirects from tc BPF to ifb devices, from Daniel Borkmann. 12) Add BPF support for integer type when accessing variable length arrays, from Feng Zhou. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (71 commits) selftests/bpf: verifier/value_ptr_arith converted to inline assembly selftests/bpf: verifier/value_illegal_alu converted to inline assembly selftests/bpf: verifier/unpriv converted to inline assembly selftests/bpf: verifier/subreg converted to inline assembly selftests/bpf: verifier/spin_lock converted to inline assembly selftests/bpf: verifier/sock converted to inline assembly selftests/bpf: verifier/search_pruning converted to inline assembly selftests/bpf: verifier/runtime_jit converted to inline assembly selftests/bpf: verifier/regalloc converted to inline assembly selftests/bpf: verifier/ref_tracking converted to inline assembly selftests/bpf: verifier/map_ptr_mixing converted to inline assembly selftests/bpf: verifier/map_in_map converted to inline assembly selftests/bpf: verifier/lwt converted to inline assembly selftests/bpf: verifier/loops1 converted to inline assembly selftests/bpf: verifier/jeq_infer_not_null converted to inline assembly selftests/bpf: verifier/direct_packet_access converted to inline assembly selftests/bpf: verifier/d_path converted to inline assembly selftests/bpf: verifier/ctx converted to inline assembly selftests/bpf: verifier/btf_ctx_access converted to inline assembly selftests/bpf: verifier/bpf_get_stack converted to inline assembly ... ==================== Link: https://lore.kernel.org/r/20230421211035.9111-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 7ecebee211c624bb61a7efe0420e759697e4a594 Merge: 2cc8a008d62f3 e85d3d55875f7 Author: Jakub Kicinski Date: Fri Apr 21 20:30:32 2023 -0700 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== ixgbe: Multiple RSS bugfixes Joe Damato says: This series fixes two bugs I stumbled on with ixgbe: 1. The flow hash cannot be set manually with ethool at all. Patch 1/2 addresses this by fixing what appears to be a small bug in set_rxfh in ixgbe. See the commit message for more details. 2. Once the above patch is applied and the flow hash can be set, resetting the flow hash to default fails if the number of queues is greater than the number of queues supported by RSS. Other drivers (like i40e) will reset the flowhash to use the maximum number of queues supported by RSS even if the queue count configured is larger. In other words: some queues will not have packets distributed to them by the RSS hash if the queue count is too large. Patch 2/2 allows the user to reset ixgbe to default and the flowhash is set correctly to either the maximum number of queues supported by RSS or the configured queue count, whichever is smaller. I believe this is correct and it mimics the behavior of i40e; `ethtool -X $iface default` should probably always succeed even if all the queues cannot be utilized. See the commit message for more details and examples. I tested these on an ixgbe system I have access to and they appear to work as intended, but I would appreciate a review by the experts on this list :) * '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ixgbe: Enable setting RSS table to default values ixgbe: Allow flow hash to be set via ethtool ==================== Link: https://lore.kernel.org/r/20230420235000.2971509-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 418a73074da9182f571e467eaded03ea501f3281 Author: Maxime Bizon Date: Thu Apr 20 20:25:08 2023 +0200 net: dst: fix missing initialization of rt_uncached xfrm_alloc_dst() followed by xfrm4_dst_destroy(), without a xfrm4_fill_dst() call in between, causes the following BUG: BUG: spinlock bad magic on CPU#0, fbxhostapd/732 lock: 0x890b7668, .magic: 890b7668, .owner: /-1, .owner_cpu: 0 CPU: 0 PID: 732 Comm: fbxhostapd Not tainted 6.3.0-rc6-next-20230414-00613-ge8de66369925-dirty #9 Hardware name: Marvell Kirkwood (Flattened Device Tree) unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x28/0x30 dump_stack_lvl from do_raw_spin_lock+0x20/0x80 do_raw_spin_lock from rt_del_uncached_list+0x30/0x64 rt_del_uncached_list from xfrm4_dst_destroy+0x3c/0xbc xfrm4_dst_destroy from dst_destroy+0x5c/0xb0 dst_destroy from rcu_process_callbacks+0xc4/0xec rcu_process_callbacks from __do_softirq+0xb4/0x22c __do_softirq from call_with_stack+0x1c/0x24 call_with_stack from do_softirq+0x60/0x6c do_softirq from __local_bh_enable_ip+0xa0/0xcc Patch "net: dst: Prevent false sharing vs. dst_entry:: __refcnt" moved rt_uncached and rt_uncached_list fields from rtable struct to dst struct, so they are more zeroed by memset_after(xdst, 0, u.dst) in xfrm_alloc_dst(). Note that rt_uncached (list_head) was never properly initialized at alloc time, but xfrm[46]_dst_destroy() is written in such a way that it was not an issue thanks to the memset: if (xdst->u.rt.dst.rt_uncached_list) rt_del_uncached_list(&xdst->u.rt); The route code does it the other way around: rt_uncached_list is assumed to be valid IIF rt_uncached list_head is not empty: void rt_del_uncached_list(struct rtable *rt) { if (!list_empty(&rt->dst.rt_uncached)) { struct uncached_list *ul = rt->dst.rt_uncached_list; spin_lock_bh(&ul->lock); list_del_init(&rt->dst.rt_uncached); spin_unlock_bh(&ul->lock); } } This patch adds mandatory rt_uncached list_head initialization in generic dst_init(), and adapt xfrm[46]_dst_destroy logic to match the rest of the code. Fixes: d288a162dd1c ("net: dst: Prevent false sharing vs. dst_entry:: __refcnt") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-lkp/202304162125.18b7bcdd-oliver.sang@intel.com Reviewed-by: David Ahern Reviewed-by: Eric Dumazet CC: Leon Romanovsky Signed-off-by: Maxime Bizon Link: https://lore.kernel.org/r/20230420182508.2417582-1-mbizon@freebox.fr Signed-off-by: Jakub Kicinski commit 33c1af8e2c75ab601524e25efeeed0173d703ce7 Author: Arnd Bergmann Date: Thu Apr 20 23:36:31 2023 +0200 net: dsa: qca8k: fix LEDS_CLASS dependency With LEDS_CLASS=m, a built-in qca8k driver fails to link: arm-linux-gnueabi-ld: drivers/net/dsa/qca/qca8k-leds.o: in function `qca8k_setup_led_ctrl': qca8k-leds.c:(.text+0x1ea): undefined reference to `devm_led_classdev_register_ext' Change the dependency to avoid the broken configuration. Fixes: 1e264f9d2918 ("net: dsa: qca8k: add LEDs basic support") Signed-off-by: Arnd Bergmann Reviewed-by: Christian Marangi Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230420213639.2243388-1-arnd@kernel.org Signed-off-by: Jakub Kicinski commit 2cc8a008d62f3c04eeb7ec6fe59e542802bb8df3 Author: Ivan Vecera Date: Thu Apr 20 20:36:33 2023 +0200 net/sched: cls_api: Initialize miss_cookie_node when action miss is not used Function tcf_exts_init_ex() sets exts->miss_cookie_node ptr only when use_action_miss is true so it assumes in other case that the field is set to NULL by the caller. If not then the field contains garbage and subsequent tcf_exts_destroy() call results in a crash. Ensure that the field .miss_cookie_node pointer is NULL when use_action_miss parameter is false to avoid this potential scenario. Fixes: 80cd22c35c90 ("net/sched: cls_api: Support hardware miss to tc action") Signed-off-by: Ivan Vecera Reviewed-by: Pedro Tammela Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230420183634.1139391-1-ivecera@redhat.com Signed-off-by: Jakub Kicinski commit 6aa445e39693bff9c98b12f960e66b4e18c7378b Author: Geert Uytterhoeven Date: Thu Apr 20 19:37:23 2023 +0200 net/handshake: Fix section mismatch in handshake_exit If CONFIG_NET_NS=n (e.g. m68k/defconfig): WARNING: modpost: vmlinux.o: section mismatch in reference: handshake_exit (section: .exit.text) -> handshake_genl_net_ops (section: .init.data) ERROR: modpost: Section mismatches detected. Fix this by dropping the __net_initdata tag from handshake_genl_net_ops. Fixes: 3b3009ea8abb713b ("net/handshake: Create a NETLINK service for handling handshake requests") Reported-by: noreply@ellerman.id.au Closes: http://kisskb.ellerman.id.au/kisskb/buildresult/14912987 Signed-off-by: Geert Uytterhoeven Reviewed-by: Chuck Lever Link: https://lore.kernel.org/r/20230420173723.3773434-1-geert@linux-m68k.org Signed-off-by: Jakub Kicinski commit 7041101ff6c3073fd8f2e99920f535b111c929cb Author: Davide Caratti Date: Thu Apr 20 16:59:46 2023 +0200 net/sched: sch_fq: fix integer overflow of "credit" if sch_fq is configured with "initial quantum" having values greater than INT_MAX, the first assignment of "credit" does signed integer overflow to a very negative value. In this situation, the syzkaller script provided by Cristoph triggers the CPU soft-lockup warning even with few sockets. It's not an infinite loop, but "credit" wasn't probably meant to be minus 2Gb for each new flow. Capping "initial quantum" to INT_MAX proved to fix the issue. v2: validation of "initial quantum" is done in fq_policy, instead of open coding in fq_change() _ suggested by Jakub Kicinski Reported-by: Christoph Paasch Link: https://github.com/multipath-tcp/mptcp_net-next/issues/377 Fixes: afe4fd062416 ("pkt_sched: fq: Fair Queue packet scheduler") Reviewed-by: Eric Dumazet Signed-off-by: Davide Caratti Link: https://lore.kernel.org/r/7b3a3c7e36d03068707a021760a194a8eb5ad41a.1682002300.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski commit 63cfd210034c772fad047afa13dd5a4664b0a72e Author: Huanhuan Wang Date: Thu Apr 20 16:01:25 2023 +0200 nfp: fix incorrect pointer deference when offloading IPsec with bonding There are two pointers in struct xfrm_dev_offload, *dev, *real_dev. The *dev points whether bonding interface or real interface, if bonding IPsec offload is used, it points bonding interface; if not, it points real interface. And *real_dev always points real interface. So nfp should always use real_dev instead of dev. Prior to this change the system becomes unresponsive when offloading IPsec for a device which is a lower device to a bonding device. Fixes: 859a497fe80c ("nfp: implement xfrm callbacks and expose ipsec offload feature to upper layer") CC: stable@vger.kernel.org Signed-off-by: Huanhuan Wang Acked-by: Simon Horman Signed-off-by: Louis Peens Link: https://lore.kernel.org/r/20230420140125.38521-1-louis.peens@corigine.com Signed-off-by: Jakub Kicinski commit 461bb5b97049a149278f2c27a3aa12af16da6a2e Author: Dan Carpenter Date: Thu Apr 20 15:36:07 2023 +0300 net: dpaa: Fix uninitialized variable in dpaa_stop() The return value is not initialized on the success path. Fixes: 901bdff2f529 ("net: fman: Change return type of disable to void") Signed-off-by: Dan Carpenter Acked-by: Madalin Bucur Reviewed-by: Sean Anderson Link: https://lore.kernel.org/r/8c9dc377-8495-495f-a4e5-4d2d0ee12f0c@kili.mountain Signed-off-by: Jakub Kicinski commit f3b766d981310989d524b076065a93b8f11bcab2 Author: Vladimir Oltean Date: Tue Apr 18 22:01:41 2023 +0300 net: phy: add basic driver for NXP CBTX PHY The CBTX PHY is a Fast Ethernet PHY integrated into the SJA1110 A/B/C automotive Ethernet switches. It was hoped it would work with the Generic PHY driver, but alas, it doesn't. The most important reason why is that the PHY is powered down by default, and it needs a vendor register to power it on. It has a linear memory map that is accessed over SPI by the SJA1110 switch driver, which exposes a fake MDIO controller. It has the following (and only the following) standard clause 22 registers: 0x0: MII_BMCR 0x1: MII_BMSR 0x2: MII_PHYSID1 0x3: MII_PHYSID2 0x4: MII_ADVERTISE 0x5: MII_LPA 0x6: MII_EXPANSION 0x7: the missing MII_NPAGE for Next Page Transmit Register Every other register is vendor-defined. The register map expands the standard clause 22 5-bit address space of 0x20 registers, however the driver does not need to access the extra registers for now (and hopefully never). If it ever needs to do that, it is possible to implement a fake (software) page switching mechanism between the PHY driver and the SJA1110 MDIO controller driver. Also, Auto-MDIX is turned off by default in hardware, the driver turns it on by default and reports the current status. I've tested this with a VSC8514 link partner and a crossover cable, by forcing the mode on the link partner, and seeing that the CBTX PHY always sees the reverse of the mode forced on the VSC8514 (and that traffic works). The link doesn't come up (as expected) if MDI modes are forced on both ends in the same way (with the cross-over cable, that is). Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230418190141.1040562-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit ea76e08f4d901a450619831a255e9e0a4c0ed162 Author: Asahi Lina Date: Mon Apr 3 18:33:53 2023 +0900 rust: ioctl: Add ioctl number manipulation functions Add simple 1:1 wrappers of the C ioctl number manipulation functions. Since these are macros we cannot bindgen them directly, and since they should be usable in const context we cannot use helper wrappers, so we'll have to reimplement them in Rust. Thankfully, the C headers do declare defines for the relevant bitfield positions, so we don't need to duplicate that. Signed-off-by: Asahi Lina Link: https://lore.kernel.org/r/20230329-rust-uapi-v2-2-bca5fb4d4a12@asahilina.net [ Moved the `#![allow(non_snake_case)]` to the usual place. ] Signed-off-by: Miguel Ojeda commit 4e1746656839ab1e88d76eec4d2fa0b41d585604 Author: Asahi Lina Date: Mon Apr 3 18:33:52 2023 +0900 rust: uapi: Add UAPI crate This crate mirrors the `bindings` crate, but will contain only UAPI bindings. Unlike the bindings crate, drivers may directly use this crate if they have to interface with userspace. Initially, just bind the generic ioctl stuff. In the future, we would also like to add additional checks to ensure that all types exposed by this crate satisfy UAPI-safety guarantees (that is, they are safely castable to/from a "bag of bits"). [ Miguel: added support for the `rustdoc` and `rusttest` targets, since otherwise they fail, and we want to keep them working. ] Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Asahi Lina Link: https://lore.kernel.org/r/20230329-rust-uapi-v2-1-bca5fb4d4a12@asahilina.net Signed-off-by: Miguel Ojeda commit 19096bce815716cf93fc1ef3965629c3affa26f1 Author: Wedson Almeida Filho Date: Sun Mar 26 00:57:38 2023 -0300 rust: sync: introduce `CondVar` This is the traditional condition variable or monitor synchronisation primitive. It is implemented with C's `wait_queue_head_t`. It allows users to release a lock and go to sleep while guaranteeing that notifications won't be missed. This is achieved by enqueuing a wait entry before releasing the lock. Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Wedson Almeida Filho Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20230411054543.21278-12-wedsonaf@gmail.com Signed-off-by: Miguel Ojeda commit e32cca32c3d452a277884502b9155f3325caf80e Author: Wedson Almeida Filho Date: Mon Mar 27 15:43:08 2023 -0300 rust: lock: add `Guard::do_unlocked` It releases the lock, executes some function provided by the caller, then reacquires the lock. This is preparation for the implementation of condvars, which will sleep after between unlocking and relocking. We need an explicit `relock` method for primitives like `SpinLock` that have an irqsave variant: we use the guard state to determine if the lock was originally acquired with the regular `lock` function or `lock_irqsave`. Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Wedson Almeida Filho Link: https://lore.kernel.org/rust-for-linux/20230412121431.41627-1-wedsonaf@gmail.com/ [ Removed the irqsave bits as discussed. ] Signed-off-by: Miguel Ojeda commit 207296f1a03bfead0110ffc4f192f242100ce4ff Author: Pablo Neira Ayuso Date: Fri Apr 21 00:34:33 2023 +0200 netfilter: nf_tables: allow to create netdev chain without device Relax netdev chain creation to allow for loading the ruleset, then adding/deleting devices at a later stage. Hardware offload does not support for this feature yet. Signed-off-by: Pablo Neira Ayuso commit 7d937b107108f918906fc867ea070cc3d0cbcd32 Author: Pablo Neira Ayuso Date: Fri Apr 21 00:34:32 2023 +0200 netfilter: nf_tables: support for deleting devices in an existing netdev chain This patch allows for deleting devices in an existing netdev chain. Signed-off-by: Pablo Neira Ayuso commit b9703ed44ffbfba85c103b9de01886a225e14b38 Author: Pablo Neira Ayuso Date: Fri Apr 21 00:34:31 2023 +0200 netfilter: nf_tables: support for adding new devices to an existing netdev chain This patch allows users to add devices to an existing netdev chain. Signed-off-by: Pablo Neira Ayuso commit cdc32546632354305afdcf399a5431138a31c9e0 Author: Pablo Neira Ayuso Date: Fri Apr 21 00:34:30 2023 +0200 netfilter: nf_tables: rename function to destroy hook list Rename nft_flowtable_hooks_destroy() by nft_hooks_destroy() to prepare for netdev chain device updates. Signed-off-by: Pablo Neira Ayuso commit 28339b21a365a8cb9edc6956cbfd679f569daa81 Author: Pablo Neira Ayuso Date: Fri Apr 21 00:34:29 2023 +0200 netfilter: nf_tables: do not send complete notification of deletions In most cases, table, name and handle is sufficient for userspace to identify an object that has been deleted. Skipping unneeded fields in the netlink attributes in the message saves bandwidth (ie. less chances of hitting ENOBUFS). Rules are an exception: the existing userspace monitor code relies on the rule definition. This exception can be removed by implementing a rule cache in userspace, this is already supported by the tracing infrastructure. Regarding flowtables, incremental deletion of devices is possible. Skipping a full notification allows userspace to differentiate between flowtable removal and incremental removal of devices. Signed-off-by: Pablo Neira Ayuso commit c3c060adc0249355411a93e61888051e6902b8a1 Author: Pablo Neira Ayuso Date: Fri Apr 21 00:34:28 2023 +0200 netfilter: nf_tables: extended netlink error reporting for netdevice Flowtable and netdev chains are bound to one or several netdevice, extend netlink error reporting to specify the the netdevice that triggers the error. Signed-off-by: Pablo Neira Ayuso commit c7d15aaa105a9484b5385e5c391ea5203347d6b0 Author: Simon Horman Date: Mon Apr 17 17:10:48 2023 +0200 ipvs: Correct spelling in comments Correct some spelling errors flagged by codespell and found by inspection. Signed-off-by: Simon Horman Reviewed-by: Horatiu Vultur Signed-off-by: Pablo Neira Ayuso commit 210ffe4a74caead4d6790747d32b63c6152c70b7 Author: Simon Horman Date: Mon Apr 17 17:10:47 2023 +0200 ipvs: Remove {Enter,Leave}Function Remove EnterFunction and LeaveFunction. These debugging macros seem well past their use-by date. And seem to have little value these days. Removing them allows some trivial cleanup of some exit paths for some functions. These are also included in this patch. There is likely scope for further cleanup of both debugging and unwind paths. But let's leave that for another day. Only intended to change debug output, and only when CONFIG_IP_VS_DEBUG is enabled. Compile tested only. Signed-off-by: Simon Horman Reviewed-by: Horatiu Vultur Signed-off-by: Pablo Neira Ayuso commit 280654932e341bf2860503af49bd5cb8e2b78522 Author: Simon Horman Date: Mon Apr 17 17:10:46 2023 +0200 ipvs: Consistently use array_size() in ip_vs_conn_init() Consistently use array_size() to calculate the size of ip_vs_conn_tab in bytes. Flagged by Coccinelle: WARNING: array_size is already used (line 1498) to compute the same size No functional change intended. Compile tested only. Signed-off-by: Simon Horman Reviewed-by: Horatiu Vultur Signed-off-by: Pablo Neira Ayuso commit e3478c68f6704638d08f437cbc552ca5970c151a Author: Simon Horman Date: Mon Apr 17 17:10:45 2023 +0200 ipvs: Update width of source for ip_vs_sync_conn_options In ip_vs_sync_conn_v0() copy is made to struct ip_vs_sync_conn_options. That structure looks like this: struct ip_vs_sync_conn_options { struct ip_vs_seq in_seq; struct ip_vs_seq out_seq; }; The source of the copy is the in_seq field of struct ip_vs_conn. Whose type is struct ip_vs_seq. Thus we can see that the source - is not as wide as the amount of data copied, which is the width of struct ip_vs_sync_conn_option. The copy is safe because the next field in is another struct ip_vs_seq. Make use of struct_group() to annotate this. Flagged by gcc-13 as: In file included from ./include/linux/string.h:254, from ./include/linux/bitmap.h:11, from ./include/linux/cpumask.h:12, from ./arch/x86/include/asm/paravirt.h:17, from ./arch/x86/include/asm/cpuid.h:62, from ./arch/x86/include/asm/processor.h:19, from ./arch/x86/include/asm/timex.h:5, from ./include/linux/timex.h:67, from ./include/linux/time32.h:13, from ./include/linux/time.h:60, from ./include/linux/stat.h:19, from ./include/linux/module.h:13, from net/netfilter/ipvs/ip_vs_sync.c:38: In function 'fortify_memcpy_chk', inlined from 'ip_vs_sync_conn_v0' at net/netfilter/ipvs/ip_vs_sync.c:606:3: ./include/linux/fortify-string.h:529:25: error: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror=attribute-warning] 529 | __read_overflow2_field(q_size_field, size); | Compile tested only. Signed-off-by: Simon Horman Reviewed-by: Horatiu Vultur Signed-off-by: Pablo Neira Ayuso commit 46df417544f4f7fa3438caada0dc0e534a694343 Author: Florian Westphal Date: Fri Apr 14 15:01:34 2023 +0200 netfilter: nf_tables: do not store rule in traceinfo structure pass it as argument instead. This reduces size of traceinfo to 16 bytes. Total stack usage: nf_tables_core.c:252 nft_do_chain 304 static While its possible to also pass basechain as argument, doing so increases nft_do_chaininfo function size. Unlike pktinfo/verdict/rule the basechain info isn't used in the expression evaluation path. gcc places it on the stack, which results in extra push/pop when it gets passed to the trace helpers as argument rather than as part of the traceinfo structure. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 0a202145d5f9277dd24474aca8245731d030f29e Author: Florian Westphal Date: Fri Apr 14 15:01:33 2023 +0200 netfilter: nf_tables: do not store verdict in traceinfo structure Just pass it as argument to nft_trace_notify. Stack is reduced by 8 bytes: nf_tables_core.c:256 nft_do_chain 312 static Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 698bb828a6c20c86e30b307175be1827c071ce23 Author: Florian Westphal Date: Fri Apr 14 15:01:32 2023 +0200 netfilter: nf_tables: do not store pktinfo in traceinfo structure pass it as argument. No change in object size. stack usage decreases by 8 byte: nf_tables_core.c:254 nft_do_chain 320 static Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 2a1d6abd7ebeafc45f2fb5fabfd53b8b3beaa170 Author: Florian Westphal Date: Fri Apr 14 15:01:31 2023 +0200 netfilter: nf_tables: remove unneeded conditional This helper is inlined, so keep it as small as possible. If the static key is true, there is only a very small chance that info->trace is false: 1. tracing was enabled at this very moment, the static key was updated to active right after nft_do_table was called. 2. tracing was disabled at this very moment. trace->info is already false, the static key is about to be patched to false soon. In both cases, no event will be sent because info->trace is false (checked in noinline slowpath). info->nf_trace is irrelevant. The nf_trace update is redunant in this case, but this will only happen for short duration, when static key flips. text data bss dec hex filename old: 2980 192 32 3204 c84 nf_tables_core.o new: 2964 192 32 3188 c74i nf_tables_core.o Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 00c320f9b75560628e840bef027a27c746706759 Author: Florian Westphal Date: Thu Apr 13 17:13:20 2023 +0200 netfilter: nf_tables: make validation state per table We only need to validate tables that saw changes in the current transaction. The existing code revalidates all tables, but this isn't needed as cross-table jumps are not allowed (chains have table scope). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 9a32e9850686599ed194ccdceb6cd3dd56b2d9b9 Author: Florian Westphal Date: Thu Apr 13 17:13:19 2023 +0200 netfilter: nf_tables: don't write table validation state without mutex The ->cleanup callback needs to be removed, this doesn't work anymore as the transaction mutex is already released in the ->abort function. Just do it after a successful validation pass, this either happens from commit or abort phases where transaction mutex is held. Fixes: f102d66b335a ("netfilter: nf_tables: use dedicated mutex to guard transactions") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 63e9bbbcca60333490e13744ae736d8f988e4950 Author: Florian Westphal Date: Tue Apr 11 16:29:47 2023 +0200 netfilter: nf_tables: don't store chain address on jump Now that the rule trailer/end marker and the rcu head reside in the same structure, we no longer need to save/restore the chain pointer when performing/returning from a jump. We can simply let the trace infra walk the evaluated rule until it hits the end marker and then fetch the chain pointer from there. When the rule is NULL (policy tracing), then chain and basechain pointers were already identical, so just use the basechain. This cuts size of jumpstack in half, from 256 to 128 bytes in 64bit, scripts/stackusage says: nf_tables_core.c:251 nft_do_chain 328 static Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit d4d89e6546e0d1ac09cb9dd353f0cb31c8a8deb1 Author: Florian Westphal Date: Tue Apr 11 16:29:46 2023 +0200 netfilter: nf_tables: don't store address of last rule on jump Walk the rule headers until the trailer one (last_bit flag set) instead of stopping at last_rule address. This avoids the need to store the address when jumping to another chain. This cuts size of jumpstack array by one third, on 64bit from 384 to 256 bytes. Still, stack usage is still quite large: scripts/stackusage: nf_tables_core.c:258 nft_do_chain 496 static Next patch will also remove chain pointer. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit e38fbfa972eb0944ce4387caf23d166c1df4b114 Author: Florian Westphal Date: Tue Apr 11 16:29:45 2023 +0200 netfilter: nf_tables: merge nft_rules_old structure and end of ruleblob marker In order to free the rules in a chain via call_rcu, the rule array used to stash a rcu_head and space for a pointer at the end of the rule array. When the current nft_rule_dp blob format got added in 2c865a8a28a1 ("netfilter: nf_tables: add rule blob layout"), this results in a double-trailer: size (unsigned long) struct nft_rule_dp struct nft_expr ... struct nft_rule_dp struct nft_expr ... struct nft_rule_dp (is_last=1) // Trailer The trailer, struct nft_rule_dp (is_last=1), is not accounted for in size, so it can be located via start_addr + size. Because the rcu_head is stored after 'start+size' as well this means the is_last trailer is *aliased* to the rcu_head (struct nft_rules_old). This is harmless, because at this time the nft_do_chain function never evaluates/accesses the trailer, it only checks the address boundary: for (; rule < last_rule; rule = nft_rule_next(rule)) { ... But this way the last_rule address has to be stashed in the jump structure to restore it after returning from a chain. nft_do_chain stack usage has become way too big, so put it on a diet. Without this patch is impossible to use for (; !rule->is_last; rule = nft_rule_next(rule)) { ... because on free, the needed update of the rcu_head will clobber the nft_rule_dp is_last bit. Furthermore, also stash the chain pointer in the trailer, this allows to recover the original chain structure from nf_tables_trace infra without a need to place them in the jump struct. After this patch it is trivial to diet the jump stack structure, done in the next two patches. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 7b1f55e3a984aaed0121f90f9f8580f18b7b561e Author: Wedson Almeida Filho Date: Tue Apr 11 02:45:43 2023 -0300 rust: sync: introduce `LockedBy` This allows us to have data protected by a lock despite not being wrapped by it. Access is granted by providing evidence that the lock is held by the caller. Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Wedson Almeida Filho Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20230411054543.21278-13-wedsonaf@gmail.com Signed-off-by: Miguel Ojeda commit 8da7a2b7432e8f043f04515895687f72cdb3e0a8 Author: Wedson Almeida Filho Date: Tue Apr 11 02:45:40 2023 -0300 rust: introduce `current` This allows Rust code to get a reference to the current task without having to increment the refcount, but still guaranteeing memory safety. Cc: Ingo Molnar Cc: Peter Zijlstra Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Wedson Almeida Filho Link: https://lore.kernel.org/r/20230411054543.21278-10-wedsonaf@gmail.com Signed-off-by: Miguel Ojeda commit 313c4281bc9dfa98d76a71b16a684af1c52e7751 Author: Wedson Almeida Filho Date: Tue Apr 11 02:45:39 2023 -0300 rust: add basic `Task` It is an abstraction for C's `struct task_struct`. It implements `AlwaysRefCounted`, so the refcount of the wrapped object is managed safely on the Rust side. Cc: Ingo Molnar Cc: Peter Zijlstra Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Wedson Almeida Filho Link: https://lore.kernel.org/r/20230411054543.21278-9-wedsonaf@gmail.com Signed-off-by: Miguel Ojeda commit f1fbd6a864d417443cdacd6bfdb7fd626993da7e Author: Wedson Almeida Filho Date: Tue Apr 11 02:45:38 2023 -0300 rust: introduce `ARef` This is an owned reference to an object that is always ref-counted. This is meant to be used in wrappers for C types that have their own ref counting functions, for example, tasks, files, inodes, dentries, etc. Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Wedson Almeida Filho Reviewed-by: Gary Guo Link: https://lore.kernel.org/r/20230411054543.21278-8-wedsonaf@gmail.com Signed-off-by: Miguel Ojeda commit c6d917a498bfef603f41bfc4d31e9699bb2909fc Author: Wedson Almeida Filho Date: Wed Apr 19 14:44:26 2023 -0300 rust: lock: introduce `SpinLock` This is the `spinlock_t` lock backend and allows Rust code to use the kernel spinlock idiomatically. Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Wedson Almeida Filho Link: https://lore.kernel.org/r/20230419174426.132207-1-wedsonaf@gmail.com Signed-off-by: Miguel Ojeda commit 6d20d629c6d8575be98eeebe49a16fb2d7b32350 Author: Wedson Almeida Filho Date: Tue Apr 11 02:45:33 2023 -0300 rust: lock: introduce `Mutex` This is the `struct mutex` lock backend and allows Rust code to use the kernel mutex idiomatically. Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Wedson Almeida Filho Link: https://lore.kernel.org/r/20230411054543.21278-3-wedsonaf@gmail.com Signed-off-by: Miguel Ojeda commit 76d4bd591e1101df69c44c819041e374c63f1194 Author: Wedson Almeida Filho Date: Tue Apr 11 02:45:32 2023 -0300 rust: sync: introduce `Lock` and `Guard` They are generic Rust implementations of a lock and a lock guard that contain code that is common to all locks. Different backends will be introduced in subsequent commits. Reviewed-by: Martin Rodriguez Reboredo Suggested-by: Gary Guo Signed-off-by: Wedson Almeida Filho Link: https://lore.kernel.org/r/20230411054543.21278-2-wedsonaf@gmail.com [ Fixed typo. ] Signed-off-by: Miguel Ojeda commit 531094dc7164718d28ebb581d729807d7e846363 Author: Yonatan Nachum Date: Tue Apr 4 15:43:13 2023 +0000 RDMA/efa: Add rdma write capability to device caps Add rdma write capability that is propagated from the device to rdma-core. Enable MR creation with remote write permissions according to this device capability. Link: https://lore.kernel.org/r/20230404154313.35194-1-ynachum@amazon.com Reviewed-by: Firas Jahjah Reviewed-by: Michael Margolin Signed-off-by: Yonatan Nachum Signed-off-by: Jason Gunthorpe commit 22ba509dd4dad053ad88fc387b5a74c2a9296a01 Author: Oleksandr Natalenko Date: Wed Apr 19 15:47:34 2023 +0200 mailmap: add entry for Oleksandr Map my corporate email to my personal one. Link: https://lkml.kernel.org/r/20230419134734.454630-1-oleksandr@natalenko.name Signed-off-by: Oleksandr Natalenko Cc: Jakub Kicinski Cc: Konrad Dybcio Signed-off-by: Andrew Morton commit 09d49eb90fc8d03e1dab62dd7060389040f1d32b Author: Arnd Bergmann Date: Mon Apr 17 22:56:24 2023 +0200 ocfs2: reduce ioctl stack usage On 32-bit architectures with KASAN_STACK enabled, the total stack usage of the ocfs2_ioctl function grows beyond the warning limit: fs/ocfs2/ioctl.c: In function 'ocfs2_ioctl': fs/ocfs2/ioctl.c:934:1: error: the frame size of 1448 bytes is larger than 1400 bytes [-Werror=frame-larger-than=] Move each of the variables into a basic block, and mark ocfs2_info_handle() as noinline_for_stack, in order to have the variable share stack slots. Link: https://lkml.kernel.org/r/20230417205631.1956027-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Reviewed-by: Joseph Qi Reviewed-by: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton commit 522dc4e5f51e3d51c4ff55ad1c725d12176b71ea Author: Chunguang Wu Date: Sun Apr 16 13:24:04 2023 +0800 fs/proc: add Kthread flag to /proc/$pid/status The command `ps -ef ` and `top -c` mark kernel thread by '[' and ']', but sometimes the result is not correct. The task->flags in /proc/$pid/stat is good, but we need remember the value of PF_KTHREAD is 0x00200000 and convert dec to hex. If we have no binary program and shell script which read /proc/$pid/stat, we can know it directly by `cat /proc/$pid/status`. Link: https://lkml.kernel.org/r/20230416052404.2920-1-fullspring2018@gmail.com Signed-off-by: Chunguang Wu Reviewed-by: Randy Dunlap Cc: Alexey Dobriyan Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 3647ebcfbfca384840231fe13fae665453238a61 Author: Hugh Dickins Date: Sun Apr 16 22:17:05 2023 -0700 ia64: fix an addr to taddr in huge_pte_offset() I know nothing of ia64 htlbpage_to_page(), but guess that the p4d line should be using taddr rather than addr, like everywhere else. Link: https://lkml.kernel.org/r/732eae88-3beb-246-2c72-281de786740@google.com Fixes: c03ab9e32a2c ("ia64: add support for folded p4d page tables") Signed-off-by: Hugh Dickins Acked-by: Mike Rapoport (IBM) Cc: Ard Biesheuvel Cc: Signed-off-by: Andrew Morton commit f0ca8c25256dd22737db5780e33e2809ce297625 Author: Li zeming Date: Sat Apr 22 05:47:33 2023 +0800 sparse: remove unnecessary 0 values from rc rc is assigned first, so it does not need to initialize the assignment. Link: https://lkml.kernel.org/r/20230421214733.2909-1-zeming@nfschina.com Signed-off-by: Li zeming Signed-off-by: Andrew Morton commit 6b008640db7355d8de6ac18f74cedd7ccc92684f Author: Linus Torvalds Date: Tue Apr 18 17:40:09 2023 -0400 mm: move 'mmap_min_addr' logic from callers into vm_unmapped_area() Instead of having callers care about the mmap_min_addr logic for the lowest valid mapping address (and some of them getting it wrong), just move the logic into vm_unmapped_area() itself. One less thing for various architecture cases (and generic helpers) to worry about. We should really try to make much more of this be common code, but baby steps.. Without this, vm_unmapped_area() could return an address below mmap_min_addr (because some caller forgot about that). That then causes the mmap machinery to think it has found a workable address, but then later security_mmap_addr(addr) is unhappy about it and the mmap() returns with a nonsensical error (EPERM). The proper action is to either return ENOMEM (if the virtual address space is exhausted), or try to find another address (ie do a bottom-up search for free addresses after the top-down one failed). See commit 2afc745f3e30 ("mm: ensure get_unmapped_area() returns higher address than mmap_min_addr"), which fixed this for one call site (the generic arch_get_unmapped_area_topdown() fallback) but left other cases alone. Link: https://lkml.kernel.org/r/20230418214009.1142926-1-Liam.Howlett@oracle.com Signed-off-by: Linus Torvalds Signed-off-by: Liam R. Howlett Cc: Russell King Cc: Liam Howlett Signed-off-by: Andrew Morton commit f724392415b3e1ae844d2766669c0d955fe9a17b Author: Hugh Dickins Date: Tue Apr 18 22:22:02 2023 -0700 hugetlb: pte_alloc_huge() to replace huge pte_alloc_map() Some architectures can have their hugetlb pages down at the lowest PTE level: their huge_pte_alloc() using pte_alloc_map(), but without any following pte_unmap(). Since none of these arches uses CONFIG_HIGHPTE, this is not seen as a problem at present; but would become a problem if forthcoming changes were to add an rcu_read_lock() into pte_offset_map(), with the rcu_read_unlock() expected in pte_unmap(). Similarly in their huge_pte_offset(): pte_offset_kernel() is good enough for that, but it's probably less confusing if we define pte_offset_huge() along with pte_alloc_huge(). Only define them without CONFIG_HIGHPTE: so there would be a build error to signal if ever more work is needed. For ease of development, define these now for 6.4-rc1, ahead of any use: then architectures can integrate patches using them, independent from mm. Link: https://lkml.kernel.org/r/ae9e7d98-8a3a-cfd9-4762-bcddffdf96cf@google.com Signed-off-by: Hugh Dickins Reviewed-by: Mike Kravetz Cc: Muchun Song Signed-off-by: Andrew Morton commit 29ad6bb313487370f9dfe5441fc8982593b6384e Author: Peng Zhang Date: Wed Apr 19 17:36:25 2023 +0800 maple_tree: fix allocation in mas_sparse_area() In the case of reverse allocation, mas->index and mas->last do not point to the correct allocation range, which will cause users to get incorrect allocation results, so fix it. If the user does not use it in a specific way, this bug will not be triggered. This is a bug, but only VMA uses it now, the way VMA is used now will not trigger it. There is a possibility that a user will trigger it in the future. Also re-check whether the size is still satisfied after the lower bound was increased, which is a corner case and is incorrect in previous versions. Link: https://lkml.kernel.org/r/20230419093625.99201-1-zhangpeng.00@bytedance.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Peng Zhang Cc: Liam R. Howlett Signed-off-by: Andrew Morton commit 53156443a30368c0759c22e54a8d5cacc1b543cc Author: Suren Baghdasaryan Date: Wed Apr 19 10:58:36 2023 -0700 mm: do not increment pgfault stats when page fault handler retries If the page fault handler requests a retry, we will count the fault multiple times. This is a relatively harmless problem as the retry paths are not often requested, and the only user-visible problem is that the fault counter will be slightly higher than it should be. Nevertheless, userspace only took one fault, and should not see the fact that the kernel had to retry the fault multiple times. Move page fault accounting into mm_account_fault() and skip incomplete faults which will be accounted upon completion. Link: https://lkml.kernel.org/r/20230419175836.3857458-1-surenb@google.com Fixes: d065bd810b6d ("mm: retry page fault when blocking on disk transfer") Signed-off-by: Suren Baghdasaryan Reviewed-by: Matthew Wilcox (Oracle) Acked-by: Peter Xu Cc: Davidlohr Bueso Cc: Jan Kara Cc: Johannes Weiner Cc: Josef Bacik Cc: Laurent Dufour Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Michal Hocko Cc: Michel Lespinasse Cc: Minchan Kim Cc: Punit Agrawal Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit d2658f2052c7db6ec0a79977205f8cf1cb9effc2 Author: Sergey Senozhatsky Date: Tue Apr 18 16:46:39 2023 +0900 zsmalloc: allow only one active pool compaction context zsmalloc pool can be compacted concurrently by many contexts, e.g. cc1 handle_mm_fault() do_anonymous_page() __alloc_pages_slowpath() try_to_free_pages() do_try_to_free_pages( lru_gen_shrink_node() shrink_slab() do_shrink_slab() zs_shrinker_scan() zs_compact() Pool compaction is currently (basically) single-threaded as it is performed under pool->lock. Having multiple compaction threads results in unnecessary contention, as each thread competes for pool->lock. This, in turn, affects all zsmalloc operations such as zs_malloc(), zs_map_object(), zs_free(), etc. Introduce the pool->compaction_in_progress atomic variable, which ensures that only one compaction context can run at a time. This reduces overall pool->lock contention in (corner) cases when many contexts attempt to shrink zspool simultaneously. Link: https://lkml.kernel.org/r/20230418074639.1903197-1-senozhatsky@chromium.org Fixes: c0547d0b6a4b ("zsmalloc: consolidate zs_pool's migrate_lock and size_class's locks") Signed-off-by: Sergey Senozhatsky Reviewed-by: Yosry Ahmed Cc: Minchan Kim Signed-off-by: Andrew Morton commit 07115fcc15b4aa5c268fb80b82ad15868a82a285 Author: Stefan Roesch Date: Mon Apr 17 22:13:42 2023 -0700 selftests/mm: add new selftests for KSM This adds three new tests to the selftests for KSM. These tests use the new prctl API's to enable and disable KSM. 1) add new prctl flags to prctl header file in tools dir This adds the new prctl flags to the include file prct.h in the tools directory. This makes sure they are available for testing. 2) add KSM prctl merge test to ksm_tests This adds the -t option to the ksm_tests program. The -t flag allows to specify if it should use madvise or prctl ksm merging. 3) add two functions for debugging merge outcome for ksm_tests This adds two functions to report the metrics in /proc/self/ksm_stat and /sys/kernel/debug/mm/ksm. The debug output is enabled with the -d option. 4) add KSM prctl test to ksm_functional_tests This adds a test to the ksm_functional_test that verifies that the prctl system call to enable / disable KSM works. 5) add KSM fork test to ksm_functional_test Add fork test to verify that the MMF_VM_MERGE_ANY flag is inherited by the child process. Link: https://lkml.kernel.org/r/20230418051342.1919757-4-shr@devkernel.io Signed-off-by: Stefan Roesch Acked-by: David Hildenbrand Cc: Bagas Sanjaya Cc: David Hildenbrand Cc: Johannes Weiner Cc: Michal Hocko Cc: Rik van Riel Signed-off-by: Andrew Morton commit d21077fbc2fc987c2e593c34dc3b4d84e546dc9f Author: Stefan Roesch Date: Mon Apr 17 22:13:41 2023 -0700 mm: add new KSM process and sysfs knobs This adds the general_profit KSM sysfs knob and the process profit metric knobs to ksm_stat. 1) expose general_profit metric The documentation mentions a general profit metric, however this metric is not calculated. In addition the formula depends on the size of internal structures, which makes it more difficult for an administrator to make the calculation. Adding the metric for a better user experience. 2) document general_profit sysfs knob 3) calculate ksm process profit metric The ksm documentation mentions the process profit metric and how to calculate it. This adds the calculation of the metric. 4) mm: expose ksm process profit metric in ksm_stat This exposes the ksm process profit metric in /proc//ksm_stat. The documentation mentions the formula for the ksm process profit metric, however it does not calculate it. In addition the formula depends on the size of internal structures. So it makes sense to expose it. 5) document new procfs ksm knobs Link: https://lkml.kernel.org/r/20230418051342.1919757-3-shr@devkernel.io Signed-off-by: Stefan Roesch Reviewed-by: Bagas Sanjaya Acked-by: David Hildenbrand Cc: David Hildenbrand Cc: Johannes Weiner Cc: Michal Hocko Cc: Rik van Riel Signed-off-by: Andrew Morton commit d7597f59d1d33e9efbffa7060deb9ee5bd119e62 Author: Stefan Roesch Date: Mon Apr 17 22:13:40 2023 -0700 mm: add new api to enable ksm per process Patch series "mm: process/cgroup ksm support", v9. So far KSM can only be enabled by calling madvise for memory regions. To be able to use KSM for more workloads, KSM needs to have the ability to be enabled / disabled at the process / cgroup level. Use case 1: The madvise call is not available in the programming language. An example for this are programs with forked workloads using a garbage collected language without pointers. In such a language madvise cannot be made available. In addition the addresses of objects get moved around as they are garbage collected. KSM sharing needs to be enabled "from the outside" for these type of workloads. Use case 2: The same interpreter can also be used for workloads where KSM brings no benefit or even has overhead. We'd like to be able to enable KSM on a workload by workload basis. Use case 3: With the madvise call sharing opportunities are only enabled for the current process: it is a workload-local decision. A considerable number of sharing opportunities may exist across multiple workloads or jobs (if they are part of the same security domain). Only a higler level entity like a job scheduler or container can know for certain if its running one or more instances of a job. That job scheduler however doesn't have the necessary internal workload knowledge to make targeted madvise calls. Security concerns: In previous discussions security concerns have been brought up. The problem is that an individual workload does not have the knowledge about what else is running on a machine. Therefore it has to be very conservative in what memory areas can be shared or not. However, if the system is dedicated to running multiple jobs within the same security domain, its the job scheduler that has the knowledge that sharing can be safely enabled and is even desirable. Performance: Experiments with using UKSM have shown a capacity increase of around 20%. Here are the metrics from an instagram workload (taken from a machine with 64GB main memory): full_scans: 445 general_profit: 20158298048 max_page_sharing: 256 merge_across_nodes: 1 pages_shared: 129547 pages_sharing: 5119146 pages_to_scan: 4000 pages_unshared: 1760924 pages_volatile: 10761341 run: 1 sleep_millisecs: 20 stable_node_chains: 167 stable_node_chains_prune_millisecs: 2000 stable_node_dups: 2751 use_zero_pages: 0 zero_pages_sharing: 0 After the service is running for 30 minutes to an hour, 4 to 5 million shared pages are common for this workload when using KSM. Detailed changes: 1. New options for prctl system command This patch series adds two new options to the prctl system call. The first one allows to enable KSM at the process level and the second one to query the setting. The setting will be inherited by child processes. With the above setting, KSM can be enabled for the seed process of a cgroup and all processes in the cgroup will inherit the setting. 2. Changes to KSM processing When KSM is enabled at the process level, the KSM code will iterate over all the VMA's and enable KSM for the eligible VMA's. When forking a process that has KSM enabled, the setting will be inherited by the new child process. 3. Add general_profit metric The general_profit metric of KSM is specified in the documentation, but not calculated. This adds the general profit metric to /sys/kernel/debug/mm/ksm. 4. Add more metrics to ksm_stat This adds the process profit metric to /proc//ksm_stat. 5. Add more tests to ksm_tests and ksm_functional_tests This adds an option to specify the merge type to the ksm_tests. This allows to test madvise and prctl KSM. It also adds a two new tests to ksm_functional_tests: one to test the new prctl options and the other one is a fork test to verify that the KSM process setting is inherited by client processes. This patch (of 3): So far KSM can only be enabled by calling madvise for memory regions. To be able to use KSM for more workloads, KSM needs to have the ability to be enabled / disabled at the process / cgroup level. 1. New options for prctl system command This patch series adds two new options to the prctl system call. The first one allows to enable KSM at the process level and the second one to query the setting. The setting will be inherited by child processes. With the above setting, KSM can be enabled for the seed process of a cgroup and all processes in the cgroup will inherit the setting. 2. Changes to KSM processing When KSM is enabled at the process level, the KSM code will iterate over all the VMA's and enable KSM for the eligible VMA's. When forking a process that has KSM enabled, the setting will be inherited by the new child process. 1) Introduce new MMF_VM_MERGE_ANY flag This introduces the new flag MMF_VM_MERGE_ANY flag. When this flag is set, kernel samepage merging (ksm) gets enabled for all vma's of a process. 2) Setting VM_MERGEABLE on VMA creation When a VMA is created, if the MMF_VM_MERGE_ANY flag is set, the VM_MERGEABLE flag will be set for this VMA. 3) support disabling of ksm for a process This adds the ability to disable ksm for a process if ksm has been enabled for the process with prctl. 4) add new prctl option to get and set ksm for a process This adds two new options to the prctl system call - enable ksm for all vmas of a process (if the vmas support it). - query if ksm has been enabled for a process. 3. Disabling MMF_VM_MERGE_ANY for storage keys in s390 In the s390 architecture when storage keys are used, the MMF_VM_MERGE_ANY will be disabled. Link: https://lkml.kernel.org/r/20230418051342.1919757-1-shr@devkernel.io Link: https://lkml.kernel.org/r/20230418051342.1919757-2-shr@devkernel.io Signed-off-by: Stefan Roesch Acked-by: David Hildenbrand Cc: David Hildenbrand Cc: Johannes Weiner Cc: Michal Hocko Cc: Rik van Riel Cc: Bagas Sanjaya Signed-off-by: Andrew Morton commit 2124f79de6a909630d1a62b01ecc32db9f967181 Author: John Keeping Date: Tue Apr 18 11:19:05 2023 +0100 mm: shrinkers: fix debugfs file permissions The permissions for the files here are swapped as "count" is read-only and "scan" is write-only. While this doesn't really matter as these permissions don't stop the files being opened for reading/writing as appropriate, they are shown by "ls -l" and are confusing. Link: https://lkml.kernel.org/r/20230418101906.3131303-1-john@metanate.com Signed-off-by: John Keeping Signed-off-by: Andrew Morton commit f3ebdf042df4e08bab1d5f8bf1c4b959d8741c10 Author: David Hildenbrand Date: Tue Apr 18 16:21:13 2023 +0200 mm: don't check VMA write permissions if the PTE/PMD indicates write permissions Staring at the comment "Recheck VMA as permissions can change since migration started" in remove_migration_pte() can result in confusion, because if the source PTE/PMD indicates write permissions, then there should be no need to check VMA write permissions when restoring migration entries or PTE-mapping a PMD. Commit d3cb8bf6081b ("mm: migrate: Close race between migration completion and mprotect") introduced the maybe_mkwrite() handling in remove_migration_pte() in 2014, stating that a race between mprotect() and migration finishing would be possible, and that we could end up with a writable PTE that should be readable. However, mprotect() code first updates vma->vm_flags / vma->vm_page_prot and then walks the page tables to (a) set all present writable PTEs to read-only and (b) convert all writable migration entries to readable migration entries. While walking the page tables and modifying the entries, migration code has to grab the PT locks to synchronize against concurrent page table modifications. Assuming migration would find a writable migration entry (while holding the PT lock) and replace it with a writable present PTE, surely mprotect() code didn't stumble over the writable migration entry yet (converting it into a readable migration entry) and would instead wait for the PT lock to convert the now present writable PTE into a read-only PTE. As mprotect() didn't finish yet, the behavior is just like migration didn't happen: a writable PTE will be converted to a read-only PTE. So it's fine to rely on the writability information in the source PTE/PMD and not recheck against the VMA as long as we're holding the PT lock to synchronize with anyone who concurrently wants to downgrade write permissions (like mprotect()) by first adjusting vma->vm_flags / vma->vm_page_prot to then walk over the page tables to adjust the page table entries. Running test cases that should reveal such races -- mprotect(PROT_READ) racing with page migration or THP splitting -- for multiple hours did not reveal an issue with this cleanup. Link: https://lkml.kernel.org/r/20230418142113.439494-1-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Kirill A. Shutemov Reviewed-by: Alistair Popple Cc: Mel Gorman Cc: Peter Xu Signed-off-by: Andrew Morton commit 851ae6424697d1c4f085cb878c88168923ebcad1 Author: Huang Ying Date: Mon Apr 17 07:59:29 2023 +0800 migrate_pages_batch: fix statistics for longterm pin retry In commit fd4a7ac32918 ("mm: migrate: try again if THP split is failed due to page refcnt"), if the THP splitting fails due to page reference count, we will retry to improve migration successful rate. But the failed splitting is counted as migration failure and migration retry, which will cause duplicated failure counting. So, in this patch, this is fixed via undoing the failure counting if we decide to retry. The patch is tested via failure injection. Link: https://lkml.kernel.org/r/20230416235929.1040194-1-ying.huang@intel.com Fixes: fd4a7ac32918 ("mm: migrate: try again if THP split is failed due to page refcnt") Signed-off-by: "Huang, Ying" Reviewed-by: Baolin Wang Cc: Alistair Popple Cc: David Hildenbrand Cc: Yang Shi Cc: Zi Yan Signed-off-by: Andrew Morton commit 686ea6e61da61e46ae7068f73167ca26e0c67efb Author: ZhangPeng Date: Mon Apr 17 08:39:19 2023 +0800 userfaultfd: use helper function range_in_vma() We can use range_in_vma() to check if dst_start, dst_start + len are within the dst_vma range. Minor readability improvement. Link: https://lkml.kernel.org/r/20230417003919.930515-1-zhangpeng362@huawei.com Signed-off-by: ZhangPeng Reviewed-by: David Hildenbrand Cc: Kefeng Wang Cc: Mike Kravetz Cc: Nanyong Sun Signed-off-by: Andrew Morton commit 13215e8a4bb336dac2af561d4f5c34a071810ee4 Author: Yajun Deng Date: Mon Apr 17 11:52:26 2023 +0800 lib/show_mem.c: use for_each_populated_zone() simplify code __show_mem() needs to iterate over all zones that have memory, we can simplify the code by using for_each_populated_zone(). Link: https://lkml.kernel.org/r/20230417035226.4013584-1-yajun.deng@linux.dev Signed-off-by: Yajun Deng Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Johannes Weiner Signed-off-by: Andrew Morton commit 4bf4f155bfbc77a12ad2c9e12d9f57718adb9a5c Author: Kefeng Wang Date: Mon Apr 17 19:48:07 2023 +0800 mm: correct arg in reclaim_pages()/reclaim_clean_pages_from_list() Both of them change the arg from page_list to folio_list when convert them to use a folio, but not the declaration, let's correct it, also move the reclaim_pages() from swap.h to internal.h as it only used in mm. Link: https://lkml.kernel.org/r/20230417114807.186786-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviwed-by: Matthew Wilcox (Oracle) Reviewed-by: SeongJae Park Reviewed-by: David Hildenbrand Cc: Hugh Dickins Signed-off-by: Andrew Morton commit c6c8c3e7b47d7d20952202e7568389a5e3b043dd Author: Pankaj Raghav Date: Mon Apr 17 14:36:18 2023 +0200 fs/buffer: convert create_page_buffers to folio_create_buffers fs/buffer do not support large folios as there are many assumptions on the folio size to be the host page size. This conversion is one step towards removing that assumption. Also this conversion will reduce calls to compound_head() if folio_create_buffers() calls folio_create_empty_buffers(). Link: https://lkml.kernel.org/r/20230417123618.22094-5-p.raghav@samsung.com Signed-off-by: Pankaj Raghav Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Hannes Reinecke Cc: Alexander Viro Cc: Christian Brauner Cc: Luis Chamberlain Signed-off-by: Andrew Morton commit 8e2e17560bed73c2a73c94cbe378719f6cf850ee Author: Pankaj Raghav Date: Mon Apr 17 14:36:17 2023 +0200 fs/buffer: add folio_create_empty_buffers helper Folio version of create_empty_buffers(). This is required to convert create_page_buffers() to folio_create_buffers() later in the series. It removes several calls to compound_head() as it works directly on folio compared to create_empty_buffers(). Hence, create_empty_buffers() has been modified to call folio_create_empty_buffers(). Link: https://lkml.kernel.org/r/20230417123618.22094-4-p.raghav@samsung.com Signed-off-by: Pankaj Raghav Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Hannes Reinecke Cc: Alexander Viro Cc: Christian Brauner Cc: Luis Chamberlain Signed-off-by: Andrew Morton commit c71124a8afa441af203d2001a92c91f114446687 Author: Pankaj Raghav Date: Mon Apr 17 14:36:16 2023 +0200 buffer: add folio_alloc_buffers() helper Folio version of alloc_page_buffers() helper. This is required to convert create_page_buffers() to folio_create_buffers() later in the series. alloc_page_buffers() has been modified to call folio_alloc_buffers() which adds one call to compound_head() but folio_alloc_buffers() removes one call to compound_head() compared to the existing alloc_page_buffers() implementation. Link: https://lkml.kernel.org/r/20230417123618.22094-3-p.raghav@samsung.com Signed-off-by: Pankaj Raghav Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Hannes Reinecke Cc: Alexander Viro Cc: Christian Brauner Cc: Luis Chamberlain Signed-off-by: Andrew Morton commit 465e5e6a1698f3325f5d2262d2875779b06b50c7 Author: Pankaj Raghav Date: Mon Apr 17 14:36:15 2023 +0200 fs/buffer: add folio_set_bh helper Patch series "convert create_page_buffers to folio_create_buffers". One of the first kernel panic we hit when we try to increase the block size > 4k is inside create_page_buffers()[1]. Even though buffer.c function do not support large folios (folios > PAGE_SIZE) at the moment, these changes are required when we want to remove that constraint. This patch (of 4): The folio version of set_bh_page(). This is required to convert create_page_buffers() to folio_create_buffers() later in the series. Link: https://lkml.kernel.org/r/20230417123618.22094-1-p.raghav@samsung.com Link: https://lkml.kernel.org/r/20230417123618.22094-2-p.raghav@samsung.com Signed-off-by: Pankaj Raghav Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Hannes Reinecke Cc: Alexander Viro Cc: Christian Brauner Cc: Luis Chamberlain Signed-off-by: Andrew Morton commit 760aee0b71e34b4b9535e237347ff31b93961cbf Author: Peter Xu Date: Mon Apr 17 15:53:17 2023 -0400 selftests/mm: add tests for RO pinning vs fork() Add a test suite (with 10 more sub-tests) to cover RO pinning against fork() over uffd-wp. It covers both: (1) Early CoW test in fork() when page pinned, (2) page unshare due to RO longterm pin. They are: Testing wp-fork-pin on anon... done Testing wp-fork-pin on shmem... done Testing wp-fork-pin on shmem-private... done Testing wp-fork-pin on hugetlb... done Testing wp-fork-pin on hugetlb-private... done Testing wp-fork-pin-with-event on anon... done Testing wp-fork-pin-with-event on shmem... done Testing wp-fork-pin-with-event on shmem-private... done Testing wp-fork-pin-with-event on hugetlb... done Testing wp-fork-pin-with-event on hugetlb-private... done CONFIG_GUP_TEST needed or they'll be skipped. Testing wp-fork-pin on anon... skipped [reason: Possibly CONFIG_GUP_TEST missing or unprivileged] Note that the major test goal is on private memory, but no hurt to also run all of them over shared because shared memory should work the same. Link: https://lkml.kernel.org/r/20230417195317.898696-7-peterx@redhat.com Signed-off-by: Peter Xu Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Mika Penttilä Cc: Mike Kravetz Cc: Nadav Amit Signed-off-by: Andrew Morton commit 71fc41eb98357d147fd26d3eb130ca9daf7a9bf3 Author: Peter Xu Date: Mon Apr 17 15:53:16 2023 -0400 selftests/mm: rename COW_EXTRA_LIBS to IOURING_EXTRA_LIBS The macro and facility can be reused in other tests too. Make it general. Link: https://lkml.kernel.org/r/20230417195317.898696-6-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Mika Penttilä Cc: Mike Kravetz Cc: Nadav Amit Signed-off-by: Andrew Morton commit cff294582798dce6ca2b2d08051f563c0f7a09c8 Author: Peter Xu Date: Mon Apr 17 15:53:15 2023 -0400 selftests/mm: extend and rename uffd pagemap test Extend it to all types of mem, meanwhile add one parallel test when EVENT_FORK is enabled, where uffd-wp bits should be persisted rather than dropped. Since at it, rename the test to "wp-fork" to better show what it means. Making the new test called "wp-fork-with-event". Before: Testing pagemap on anon... done After: Testing wp-fork on anon... done Testing wp-fork on shmem... done Testing wp-fork on shmem-private... done Testing wp-fork on hugetlb... done Testing wp-fork on hugetlb-private... done Testing wp-fork-with-event on anon... done Testing wp-fork-with-event on shmem... done Testing wp-fork-with-event on shmem-private... done Testing wp-fork-with-event on hugetlb... done Testing wp-fork-with-event on hugetlb-private... done Link: https://lkml.kernel.org/r/20230417195317.898696-5-peterx@redhat.com Signed-off-by: Peter Xu Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Mika Penttilä Cc: Mike Kravetz Cc: Nadav Amit Signed-off-by: Andrew Morton commit 21337f2af16cb36782ff5031f2553f9cf2f7c787 Author: Peter Xu Date: Mon Apr 17 15:53:14 2023 -0400 selftests/mm: add a few options for uffd-unit-test Namely: "-f": add a wildcard filter for tests to run "-l": list tests rather than running any "-h": help msg Link: https://lkml.kernel.org/r/20230417195317.898696-4-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Mika Penttilä Cc: Mike Kravetz Cc: Nadav Amit Signed-off-by: Andrew Morton commit 0f230bc24b6e1399b86b95642704a962d8aa40e6 Author: Peter Xu Date: Mon Apr 17 15:53:13 2023 -0400 mm/hugetlb: fix uffd-wp bit lost when unsharing happens When we try to unshare a pinned page for a private hugetlb, uffd-wp bit can get lost during unsharing. When above condition met, one can lose uffd-wp bit on the privately mapped hugetlb page. It allows the page to be writable even if it should still be wr-protected. I assume it can mean data loss. This should be very rare, only if an unsharing happened on a private hugetlb page with uffd-wp protected (e.g. in a child which shares the same page with parent with UFFD_FEATURE_EVENT_FORK enabled). When I wrote the reproducer (provided in the last patch) I needed to use the newest gup_test cmd introduced by David to trigger it because I don't even know another way to do a proper RO longerm pin. Besides that, it needs a bunch of other conditions all met: (1) hugetlb being mapped privately, (2) userfaultfd registered with WP and EVENT_FORK, (3) the user app fork()s, then, (4) RO longterm pin onto a wr-protected anonymous page. If it's not impossible to hit in production I'd say extremely rare. Link: https://lkml.kernel.org/r/20230417195317.898696-3-peterx@redhat.com Fixes: 166f3ecc0daf ("mm/hugetlb: hook page faults for uffd write protection") Signed-off-by: Peter Xu Reported-by: Mike Kravetz Reviewed-by: David Hildenbrand Reviewed-by: Mike Kravetz Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Mika Penttilä Cc: Nadav Amit Signed-off-by: Andrew Morton commit 5a2f8d22ace4c8ac8798fab836dca7350fa710b1 Author: Peter Xu Date: Mon Apr 17 15:53:12 2023 -0400 mm/hugetlb: fix uffd-wp during fork() Patch series "mm/hugetlb: More fixes around uffd-wp vs fork() / RO pins", v2. This patch (of 6): There're a bunch of things that were wrong: - Reading uffd-wp bit from a swap entry should use pte_swp_uffd_wp() rather than huge_pte_uffd_wp(). - When copying over a pte, we should drop uffd-wp bit when !EVENT_FORK (aka, when !userfaultfd_wp(dst_vma)). - When doing early CoW for private hugetlb (e.g. when the parent page was pinned), uffd-wp bit should be properly carried over if necessary. No bug reported probably because most people do not even care about these corner cases, but they are still bugs and can be exposed by the recent unit tests introduced, so fix all of them in one shot. Link: https://lkml.kernel.org/r/20230417195317.898696-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20230417195317.898696-2-peterx@redhat.com Fixes: bc70fbf269fd ("mm/hugetlb: handle uffd-wp during fork()") Signed-off-by: Peter Xu Reviewed-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Mika Penttilä Cc: Mike Kravetz Cc: Nadav Amit Cc: Signed-off-by: Andrew Morton commit be41d814c6c7bbf3ffa66faeefa01f6cea8e3c98 Author: Zqiang Date: Mon Mar 27 20:00:19 2023 +0800 kasan: fix lockdep report invalid wait context For kernels built with the following options and booting CONFIG_SLUB=y CONFIG_DEBUG_LOCKDEP=y CONFIG_PROVE_LOCKING=y CONFIG_PROVE_RAW_LOCK_NESTING=y [ 0.523115] [ BUG: Invalid wait context ] [ 0.523315] 6.3.0-rc1-yocto-standard+ #739 Not tainted [ 0.523649] ----------------------------- [ 0.523663] swapper/0/0 is trying to lock: [ 0.523663] ffff888035611360 (&c->lock){....}-{3:3}, at: put_cpu_partial+0x2e/0x1e0 [ 0.523663] other info that might help us debug this: [ 0.523663] context-{2:2} [ 0.523663] no locks held by swapper/0/0. [ 0.523663] stack backtrace: [ 0.523663] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.3.0-rc1-yocto-standard+ #739 [ 0.523663] Call Trace: [ 0.523663] [ 0.523663] dump_stack_lvl+0x64/0xb0 [ 0.523663] dump_stack+0x10/0x20 [ 0.523663] __lock_acquire+0x6c4/0x3c10 [ 0.523663] lock_acquire+0x188/0x460 [ 0.523663] put_cpu_partial+0x5a/0x1e0 [ 0.523663] __slab_free+0x39a/0x520 [ 0.523663] ___cache_free+0xa9/0xc0 [ 0.523663] qlist_free_all+0x7a/0x160 [ 0.523663] per_cpu_remove_cache+0x5c/0x70 [ 0.523663] __flush_smp_call_function_queue+0xfc/0x330 [ 0.523663] generic_smp_call_function_single_interrupt+0x13/0x20 [ 0.523663] __sysvec_call_function+0x86/0x2e0 [ 0.523663] sysvec_call_function+0x73/0x90 [ 0.523663] [ 0.523663] [ 0.523663] asm_sysvec_call_function+0x1b/0x20 [ 0.523663] RIP: 0010:default_idle+0x13/0x20 [ 0.523663] RSP: 0000:ffffffff83e07dc0 EFLAGS: 00000246 [ 0.523663] RAX: 0000000000000000 RBX: ffffffff83e1e200 RCX: ffffffff82a83293 [ 0.523663] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff8119a6b1 [ 0.523663] RBP: ffffffff83e07dc8 R08: 0000000000000001 R09: ffffed1006ac0d66 [ 0.523663] R10: ffff888035606b2b R11: ffffed1006ac0d65 R12: 0000000000000000 [ 0.523663] R13: ffffffff83e1e200 R14: ffffffff84a7d980 R15: 0000000000000000 [ 0.523663] default_idle_call+0x6c/0xa0 [ 0.523663] do_idle+0x2e1/0x330 [ 0.523663] cpu_startup_entry+0x20/0x30 [ 0.523663] rest_init+0x152/0x240 [ 0.523663] arch_call_rest_init+0x13/0x40 [ 0.523663] start_kernel+0x331/0x470 [ 0.523663] x86_64_start_reservations+0x18/0x40 [ 0.523663] x86_64_start_kernel+0xbb/0x120 [ 0.523663] secondary_startup_64_no_verify+0xe0/0xeb [ 0.523663] The local_lock_irqsave() is invoked in put_cpu_partial() and happens in IPI context, due to the CONFIG_PROVE_RAW_LOCK_NESTING=y (the LD_WAIT_CONFIG not equal to LD_WAIT_SPIN), so acquire local_lock in IPI context will trigger above calltrace. This commit therefore moves qlist_free_all() from hard-irq context to task context. Link: https://lkml.kernel.org/r/20230327120019.1027640-1-qiang1.zhang@intel.com Signed-off-by: Zqiang Acked-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton commit a494aef23dfc732945cb42e22246a5c31174e4a5 Author: Dexuan Cui Date: Thu Apr 20 18:30:25 2023 -0700 PCI: hv: Replace retarget_msi_interrupt_params with hyperv_pcpu_input_arg 4 commits are involved here: A (2016): commit 0de8ce3ee8e3 ("PCI: hv: Allocate physically contiguous hypercall params buffer") B (2017): commit be66b6736591 ("PCI: hv: Use page allocation for hbus structure") C (2019): commit 877b911a5ba0 ("PCI: hv: Avoid a kmemleak false positive caused by the hbus buffer") D (2018): commit 68bb7bfb7985 ("X86/Hyper-V: Enable IPI enlightenments") Patch D introduced the per-CPU hypercall input page "hyperv_pcpu_input_arg" in 2018. With patch D, we no longer need the per-Hyper-V-PCI-bus hypercall input page "hbus->retarget_msi_interrupt_params" that was added in patch A, and the issue addressed by patch B is no longer an issue, and we can also get rid of patch C. The change here is required for PCI device assignment to work for Confidential VMs (CVMs) running without a paravisor, because otherwise we would have to call set_memory_decrypted() for "hbus->retarget_msi_interrupt_params" before calling the hypercall HVCALL_RETARGET_INTERRUPT. Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Acked-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20230421013025.17152-1-decui@microsoft.com Signed-off-by: Wei Liu commit e025f0a73f6acb920d86549b2177a5883535421d Author: Benjamin Coddington Date: Thu Apr 20 12:17:35 2023 -0400 NFS: Cleanup unused rpc_clnt variable The root rpc_clnt is not used here, clean it up. Fixes: 4dc73c679114 ("NFSv4: keep state manager thread active if swap is enabled") Signed-off-by: Benjamin Coddington Reviewed-by: NeilBrown Signed-off-by: Anna Schumaker commit 3a36d20e012903f45714df2731261fdefac900cb Author: Mårten Lindahl Date: Thu Mar 30 16:40:59 2023 +0200 ubifs: Fix memory leak in do_rename If renaming a file in an encrypted directory, function fscrypt_setup_filename allocates memory for a file name. This name is never used, and before returning to the caller the memory for it is not freed. When running kmemleak on it we see that it is registered as a leak. The report below is triggered by a simple program 'rename' that renames a file in an encrypted directory: unreferenced object 0xffff888101502840 (size 32): comm "rename", pid 9404, jiffies 4302582475 (age 435.735s) backtrace: __kmem_cache_alloc_node __kmalloc fscrypt_setup_filename do_rename ubifs_rename vfs_rename do_renameat2 To fix this we can remove the call to fscrypt_setup_filename as it's not needed. Fixes: 278d9a243635f26 ("ubifs: Rename whiteout atomically") Reported-by: Zhihao Cheng Signed-off-by: Mårten Lindahl Reviewed-by: Zhihao Cheng Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger commit 1fb815b38bb31d6af9bd0540b8652a0d6fe6cfd3 Author: Mårten Lindahl Date: Thu Mar 30 11:32:14 2023 +0200 ubifs: Free memory for tmpfile name When opening a ubifs tmpfile on an encrypted directory, function fscrypt_setup_filename allocates memory for the name that is to be stored in the directory entry, but after the name has been copied to the directory entry inode, the memory is not freed. When running kmemleak on it we see that it is registered as a leak. The report below is triggered by a simple program 'tmpfile' just opening a tmpfile: unreferenced object 0xffff88810178f380 (size 32): comm "tmpfile", pid 509, jiffies 4294934744 (age 1524.742s) backtrace: __kmem_cache_alloc_node __kmalloc fscrypt_setup_filename ubifs_tmpfile vfs_tmpfile path_openat Free this memory after it has been copied to the inode. Signed-off-by: Mårten Lindahl Reviewed-by: Zhihao Cheng Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger commit c5733ae6dc895fa45032df0342c98dedc7051c2d Author: Tom Rix Date: Thu Apr 20 21:01:32 2023 -0400 NFS: set varaiable nfs_netfs_debug_id storage-class-specifier to static smatch reports fs/nfs/fscache.c:260:10: warning: symbol 'nfs_netfs_debug_id' was not declared. Should it be static? This variable is only used in its defining file, so it should be static Signed-off-by: Tom Rix Signed-off-by: Anna Schumaker commit 31a149d5c13c4cbcf97de3435817263a2d8c9d6e Author: Wang YanQing Date: Tue Mar 28 23:35:34 2023 +0800 ubi: Fix return value overwrite issue in try_write_vid_and_data() The commit 2d78aee426d8 ("UBI: simplify LEB write and atomic LEB change code") adds helper function, try_write_vid_and_data(), to simplify the code, but this helper function has bug, it will return 0 (success) when ubi_io_write_vid_hdr() or the ubi_io_write_data() return error number (-EIO, etc), because the return value of ubi_wl_put_peb() will overwrite the original return value. This issue will cause unexpected data loss issue, because the caller of this function and UBIFS willn't know the data is lost. Fixes: 2d78aee426d8 ("UBI: simplify LEB write and atomic LEB change code") Cc: stable@vger.kernel.org Signed-off-by: Wang YanQing Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit c477d83c26b7acd526a30a32be7e9c0bab5da285 Author: Yangtao Li Date: Tue Mar 21 15:11:36 2023 +0800 ubifs: Remove return in compr_exit() It's redundant, let's remove it. Signed-off-by: Yangtao Li Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 705b004ee377b789e39ae237519bab714297ac83 Author: Yi Liu Date: Thu Apr 20 22:36:11 2023 -0700 docs: kvm: vfio: Suggest KVM_DEV_VFIO_GROUP_ADD vs VFIO_GROUP_GET_DEVICE_FD ordering as some vfio_device's open_device op requires kvm pointer and kvm pointer set is part of GROUP_ADD. Reviewed-by: Kevin Tian Signed-off-by: Yi Liu Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230421053611.55839-1-yi.l.liu@intel.com Signed-off-by: Alex Williamson commit ef5031137b90c5338792f7073ba3bf38d14c8cf1 Author: Yang Li Date: Wed Feb 15 09:21:17 2023 +0800 ubi: Simplify bool conversion ./drivers/mtd/ubi/build.c:1261:33-38: WARNING: conversion to bool not needed here Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4061 Signed-off-by: Yang Li Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 4db10a8243df665ced10b027c2d4862173a7a3ec Author: Eduard Zingerman Date: Fri Apr 21 20:42:34 2023 +0300 selftests/bpf: verifier/value_ptr_arith converted to inline assembly Test verifier/value_ptr_arith automatically converted to use inline assembly. Test cases "sanitation: alu with different scalars 2" and "sanitation: alu with different scalars 3" are updated to avoid -ENOENT as return value, as __retval() annotation only supports numeric literals. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-25-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit efe25a330b106f39e5d27760cc57def3e8c5a3f9 Author: Eduard Zingerman Date: Fri Apr 21 20:42:33 2023 +0300 selftests/bpf: verifier/value_illegal_alu converted to inline assembly Test verifier/value_illegal_alu automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-24-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 82887c2568e4f78d5cfcb85bf3cdc056dfd97c85 Author: Eduard Zingerman Date: Fri Apr 21 20:42:32 2023 +0300 selftests/bpf: verifier/unpriv converted to inline assembly Test verifier/unpriv semi-automatically converted to use inline assembly. The verifier/unpriv.c had to be split in two parts: - the bulk of the tests is in the progs/verifier_unpriv.c; - the single test that needs `struct bpf_perf_event_data` definition is in the progs/verifier_unpriv_perf.c. The tests above can't be in a single file because: - first requires inclusion of the filter.h header (to get access to BPF_ST_MEM macro, inline assembler does not support this isntruction); - the second requires vmlinux.h, which contains definitions conflicting with filter.h. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-23-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 81d1d6dd4037755b98bf9b9f9d0dbd715b1734e5 Author: Eduard Zingerman Date: Fri Apr 21 20:42:31 2023 +0300 selftests/bpf: verifier/subreg converted to inline assembly Test verifier/subreg automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-22-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit f323a81806bd79adafa6e88607b388166e92a1b0 Author: Eduard Zingerman Date: Fri Apr 21 20:42:30 2023 +0300 selftests/bpf: verifier/spin_lock converted to inline assembly Test verifier/spin_lock automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-21-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 426fc0e3fce272c92e804b2d844a41641f9b888e Author: Eduard Zingerman Date: Fri Apr 21 20:42:29 2023 +0300 selftests/bpf: verifier/sock converted to inline assembly Test verifier/sock automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-20-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 034d9ad25db3569bee306850c6a276bca0d1e12d Author: Eduard Zingerman Date: Fri Apr 21 20:42:28 2023 +0300 selftests/bpf: verifier/search_pruning converted to inline assembly Test verifier/search_pruning automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-19-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 65222842ca04be5df505592f9f845acce0463f8b Author: Eduard Zingerman Date: Fri Apr 21 20:42:27 2023 +0300 selftests/bpf: verifier/runtime_jit converted to inline assembly Test verifier/runtime_jit automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-18-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 16a42573c253ad490a66cd0ca990f07297c0e221 Author: Eduard Zingerman Date: Fri Apr 21 20:42:26 2023 +0300 selftests/bpf: verifier/regalloc converted to inline assembly Test verifier/regalloc automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-17-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 8be632795996c198a26b6f39727d9c92007bb6a5 Author: Eduard Zingerman Date: Fri Apr 21 20:42:25 2023 +0300 selftests/bpf: verifier/ref_tracking converted to inline assembly Test verifier/ref_tracking automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-16-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit aee1779f0deca501e904fbf007ccb7232972e518 Author: Eduard Zingerman Date: Fri Apr 21 20:42:22 2023 +0300 selftests/bpf: verifier/map_ptr_mixing converted to inline assembly Test verifier/map_ptr_mixing automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-13-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 4a400ef9ba416494944db52f95d0f16ea04adfdf Author: Eduard Zingerman Date: Fri Apr 21 20:42:21 2023 +0300 selftests/bpf: verifier/map_in_map converted to inline assembly Test verifier/map_in_map automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-12-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit b427ca576f83d6853fc323639c5f4608e876527f Author: Eduard Zingerman Date: Fri Apr 21 20:42:20 2023 +0300 selftests/bpf: verifier/lwt converted to inline assembly Test verifier/lwt automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-11-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit a6fc14dc5e8d43871eebe5455719de6d7578a3bc Author: Eduard Zingerman Date: Fri Apr 21 20:42:19 2023 +0300 selftests/bpf: verifier/loops1 converted to inline assembly Test verifier/loops1 automatically converted to use inline assembly. There are a few modifications for the converted tests. "tracepoint" programs do not support test execution, change program type to "xdp" (which supports test execution) for the following tests that have __retval tags: - bounded loop, count to 4 - bonded loop containing forward jump Also, remove the __retval tag for test: - bounded loop, count from positive unknown to 4 As it's return value is a random number. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-10-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit a5828e3154d17d9fec53910a1aa161d028339ada Author: Eduard Zingerman Date: Fri Apr 21 20:42:18 2023 +0300 selftests/bpf: verifier/jeq_infer_not_null converted to inline assembly Test verifier/jeq_infer_not_null automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-9-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 0a372c9c0812ec5de4a740781fbf183ee523bf4a Author: Eduard Zingerman Date: Fri Apr 21 20:42:17 2023 +0300 selftests/bpf: verifier/direct_packet_access converted to inline assembly Test verifier/direct_packet_access automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-8-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 6080280243846f3c5b3715af4334260522bf11f0 Author: Eduard Zingerman Date: Fri Apr 21 20:42:16 2023 +0300 selftests/bpf: verifier/d_path converted to inline assembly Test verifier/d_path automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-7-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit fcd36964f22bbe571a07b3cdb3040ec31642ba44 Author: Eduard Zingerman Date: Fri Apr 21 20:42:15 2023 +0300 selftests/bpf: verifier/ctx converted to inline assembly Test verifier/ctx automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-6-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 37467c79e16a7b569fe5c1197e2ed507f72d2ab7 Author: Eduard Zingerman Date: Fri Apr 21 20:42:14 2023 +0300 selftests/bpf: verifier/btf_ctx_access converted to inline assembly Test verifier/btf_ctx_access automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-5-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 965a3f913e723e2da9c0ec21b9825b583b0777e1 Author: Eduard Zingerman Date: Fri Apr 21 20:42:13 2023 +0300 selftests/bpf: verifier/bpf_get_stack converted to inline assembly Test verifier/bpf_get_stack automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-4-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit c92336559ac0127250cb3ffa9e6f69f9d7e81779 Author: Eduard Zingerman Date: Fri Apr 21 20:42:12 2023 +0300 selftests/bpf: verifier/bounds converted to inline assembly Test verifier/bounds automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-3-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 63bb645b9da373c29ba4b5bea14e80c49e676694 Author: Eduard Zingerman Date: Fri Apr 21 20:42:11 2023 +0300 selftests/bpf: Add notion of auxiliary programs for test_loader In order to express test cases that use bpf_tail_call() intrinsic it is necessary to have several programs to be loaded at a time. This commit adds __auxiliary annotation to the set of annotations supported by test_loader.c. Programs marked as auxiliary are always loaded but are not treated as a separate test. For example: void dummy_prog1(void); struct { __uint(type, BPF_MAP_TYPE_PROG_ARRAY); __uint(max_entries, 4); __uint(key_size, sizeof(int)); __array(values, void (void)); } prog_map SEC(".maps") = { .values = { [0] = (void *) &dummy_prog1, }, }; SEC("tc") __auxiliary __naked void dummy_prog1(void) { asm volatile ("r0 = 42; exit;"); } SEC("tc") __description("reference tracking: check reference or tail call") __success __retval(0) __naked void check_reference_or_tail_call(void) { asm volatile ( "r2 = %[prog_map] ll;" "r3 = 0;" "call %[bpf_tail_call];" "r0 = 0;" "exit;" :: __imm(bpf_tail_call), : __clobber_all); } Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230421174234.2391278-2-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit d7a799ec782b6ae9158f8d587c9f49cf34a6c5f4 Merge: 45cea721ea36d 006c0e44ed924 Author: Alexei Starovoitov Date: Fri Apr 21 11:35:51 2023 -0700 Merge branch 'bpf: add netfilter program type' Florian Westphal says: ==================== Changes since last version: - rework test case in last patch wrt. ctx->skb dereference etc (Alexei) - pacify bpf ci tests, netfilter program type missed string translation in libbpf helper. This still uses runtime btf walk rather than extending the btf trace array as Alexei suggested, I would do this later (or someone else can). v1 cover letter: Add minimal support to hook bpf programs to netfilter hooks, e.g. PREROUTING or FORWARD. For this the most relevant parts for registering a netfilter hook via the in-kernel api are exposed to userspace via bpf_link. The new program type is 'tracing style', i.e. there is no context access rewrite done by verifier, the function argument (struct bpf_nf_ctx) isn't stable. There is no support for direct packet access, dynptr api should be used instead. With this its possible to build a small test program such as: #include "vmlinux.h" extern int bpf_dynptr_from_skb(struct __sk_buff *skb, __u64 flags, struct bpf_dynptr *ptr__uninit) __ksym; extern void *bpf_dynptr_slice(const struct bpf_dynptr *ptr, uint32_t offset, void *buffer, uint32_t buffer__sz) __ksym; SEC("netfilter") int nf_test(struct bpf_nf_ctx *ctx) { struct nf_hook_state *state = ctx->state; struct sk_buff *skb = ctx->skb; const struct iphdr *iph, _iph; const struct tcphdr *th, _th; struct bpf_dynptr ptr; if (bpf_dynptr_from_skb(skb, 0, &ptr)) return NF_DROP; iph = bpf_dynptr_slice(&ptr, 0, &_iph, sizeof(_iph)); if (!iph) return NF_DROP; th = bpf_dynptr_slice(&ptr, iph->ihl << 2, &_th, sizeof(_th)); if (!th) return NF_DROP; bpf_printk("accept %x:%d->%x:%d, hook %d ifin %d\n", iph->saddr, bpf_ntohs(th->source), iph->daddr, bpf_ntohs(th->dest), state->hook, state->in->ifindex); return NF_ACCEPT; } Then, tail /sys/kernel/tracing/trace_pipe. Changes since v3: - uapi: remove 'reserved' struct member, s/prio/priority (Alexei) - add ctx access test cases (Alexei, see last patch) - some arm32 can only handle cmpxchg on u32 (build bot) - Fix kdoc annotations (Simon Horman) - bpftool: prefer p_err, not fprintf (Quentin) - add test cases in separate patch Changes since v2: 1. don't WARN when user calls 'bpftool loink detach' twice restrict attachment to ip+ip6 families, lets relax this later in case arp/bridge/netdev are needed too. 2. show netfilter links in 'bpftool net' output as well. Changes since v1: 1. Don't fail to link when CONFIG_NETFILTER=n (build bot) 2. Use test_progs instead of test_verifier (Alexei) Changes since last RFC version: 1. extend 'bpftool link show' to print prio/hooknum etc 2. extend 'nft list hooks' so it can print the bpf program id 3. Add an extra patch to artificially restrict bpf progs with same priority. Its fine from a technical pov but it will cause ordering issues (most recent one comes first). Can be removed later. 4. Add test_run support for netfilter prog type and a small extension to verifier tests to make sure we can't return verdicts like NF_STOLEN. 5. Alter the netfilter part of the bpf_link uapi struct: - add flags/reserved members. Not used here except returning errors when they are nonzero. Plan is to allow the bpf_link users to enable netfilter defrag or conntrack engine by setting feature flags at link create time in the future. ==================== Signed-off-by: Alexei Starovoitov commit 006c0e44ed924140d44bc756e6ea36301fcea68d Author: Florian Westphal Date: Fri Apr 21 19:03:00 2023 +0200 selftests/bpf: add missing netfilter return value and ctx access tests Extend prog_tests with two test cases: # ./test_progs --allow=verifier_netfilter_retcode #278/1 verifier_netfilter_retcode/bpf_exit with invalid return code. test1:OK #278/2 verifier_netfilter_retcode/bpf_exit with valid return code. test2:OK #278/3 verifier_netfilter_retcode/bpf_exit with valid return code. test3:OK #278/4 verifier_netfilter_retcode/bpf_exit with invalid return code. test4:OK #278 verifier_netfilter_retcode:OK This checks that only accept and drop (0,1) are permitted. NF_QUEUE could be implemented later if we can guarantee that attachment of such programs can be rejected if they get attached to a pf/hook that doesn't support async reinjection. NF_STOLEN could be implemented via trusted helpers that can guarantee that the skb will eventually be free'd. v4: test case for bpf_nf_ctx access checks, requested by Alexei Starovoitov. v5: also check ctx->{state,skb} can be dereferenced (Alexei). # ./test_progs --allow=verifier_netfilter_ctx #281/1 verifier_netfilter_ctx/netfilter invalid context access, size too short:OK #281/2 verifier_netfilter_ctx/netfilter invalid context access, size too short:OK #281/3 verifier_netfilter_ctx/netfilter invalid context access, past end of ctx:OK #281/4 verifier_netfilter_ctx/netfilter invalid context, write:OK #281/5 verifier_netfilter_ctx/netfilter valid context read and invalid write:OK #281/6 verifier_netfilter_ctx/netfilter test prog with skb and state read access:OK #281/7 verifier_netfilter_ctx/netfilter test prog with skb and state read access @unpriv:OK #281 verifier_netfilter_ctx:OK Summary: 1/7 PASSED, 0 SKIPPED, 0 FAILED This checks: 1/2: partial reads of ctx->{skb,state} are rejected 3. read access past sizeof(ctx) is rejected 4. write to ctx content, e.g. 'ctx->skb = NULL;' is rejected 5. ctx->state content cannot be altered 6. ctx->state and ctx->skb can be dereferenced 7. ... same program fails for unpriv (CAP_NET_ADMIN needed). Link: https://lore.kernel.org/bpf/20230419021152.sjq4gttphzzy6b5f@dhcp-172-26-102-232.dhcp.thefacebook.com/ Link: https://lore.kernel.org/bpf/20230420201655.77kkgi3dh7fesoll@MacBook-Pro-6.local/ Signed-off-by: Florian Westphal Link: https://lore.kernel.org/r/20230421170300.24115-8-fw@strlen.de Signed-off-by: Alexei Starovoitov commit 2b99ef22e0d237e08bfc437e7d051f78f352aeb2 Author: Florian Westphal Date: Fri Apr 21 19:02:59 2023 +0200 bpf: add test_run support for netfilter program type add glue code so a bpf program can be run using userspace-provided netfilter state and packet/skb. Default is to use ipv4:output hook point, but this can be overridden by userspace. Userspace provided netfilter state is restricted, only hook and protocol families can be overridden and only to ipv4/ipv6. Signed-off-by: Florian Westphal Link: https://lore.kernel.org/r/20230421170300.24115-7-fw@strlen.de Signed-off-by: Alexei Starovoitov commit d0fe92fb5e3df6991c640fb9205d880b68603259 Author: Florian Westphal Date: Fri Apr 21 19:02:58 2023 +0200 tools: bpftool: print netfilter link info Dump protocol family, hook and priority value: $ bpftool link 2: netfilter prog 14 ip input prio -128 pids install(3264) 5: netfilter prog 14 ip6 forward prio 21 pids a.out(3387) 9: netfilter prog 14 ip prerouting prio 123 pids a.out(5700) 10: netfilter prog 14 ip input prio 21 pids test2(5701) v2: Quentin Monnet suggested to also add 'bpftool net' support: $ bpftool net xdp: tc: flow_dissector: netfilter: ip prerouting prio 21 prog_id 14 ip input prio -128 prog_id 14 ip input prio 21 prog_id 14 ip forward prio 21 prog_id 14 ip output prio 21 prog_id 14 ip postrouting prio 21 prog_id 14 'bpftool net' only dumps netfilter link type, links are sorted by protocol family, hook and priority. v5: fix bpf ci failure: libbpf needs small update to prog_type_name[] and probe_prog_load helper. v4: don't fail with -EOPNOTSUPP in libbpf probe_prog_load, update prog_type_name[] with "netfilter" entry (bpf ci) v3: fix bpf.h copy, 'reserved' member was removed (Alexei) use p_err, not fprintf (Quentin) Suggested-by: Quentin Monnet Link: https://lore.kernel.org/bpf/eeeaac99-9053-90c2-aa33-cc1ecb1ae9ca@isovalent.com/ Reviewed-by: Quentin Monnet Signed-off-by: Florian Westphal Link: https://lore.kernel.org/r/20230421170300.24115-6-fw@strlen.de Signed-off-by: Alexei Starovoitov commit 0bdc6da88f5bac0f3f272cb6f545c2cc70e8c66a Author: Florian Westphal Date: Fri Apr 21 19:02:57 2023 +0200 netfilter: disallow bpf hook attachment at same priority This is just to avoid ordering issues between multiple bpf programs, this could be removed later in case it turns out to be too cautious. bpf prog could still be shared with non-bpf hook, otherwise we'd have to make conntrack hook registration fail just because a bpf program has same priority. Signed-off-by: Florian Westphal Link: https://lore.kernel.org/r/20230421170300.24115-5-fw@strlen.de Signed-off-by: Alexei Starovoitov commit 506a74db7e019a277e987fa65654bdd953859d5b Author: Florian Westphal Date: Fri Apr 21 19:02:56 2023 +0200 netfilter: nfnetlink hook: dump bpf prog id This allows userspace ("nft list hooks") to show which bpf program is attached to which hook. Without this, user only knows bpf prog is attached at prio x, y, z at INPUT and FORWARD, but can't tell which program is where. v4: kdoc fixups (Simon Horman) Link: https://lore.kernel.org/bpf/ZEELzpNCnYJuZyod@corigine.com/ Signed-off-by: Florian Westphal Link: https://lore.kernel.org/r/20230421170300.24115-4-fw@strlen.de Signed-off-by: Alexei Starovoitov commit fd9c663b9ad67dedfc9a3fd3429ddd3e83782b4d Author: Florian Westphal Date: Fri Apr 21 19:02:55 2023 +0200 bpf: minimal support for programs hooked into netfilter framework This adds minimal support for BPF_PROG_TYPE_NETFILTER bpf programs that will be invoked via the NF_HOOK() points in the ip stack. Invocation incurs an indirect call. This is not a necessity: Its possible to add 'DEFINE_BPF_DISPATCHER(nf_progs)' and handle the program invocation with the same method already done for xdp progs. This isn't done here to keep the size of this chunk down. Verifier restricts verdicts to either DROP or ACCEPT. Signed-off-by: Florian Westphal Link: https://lore.kernel.org/r/20230421170300.24115-3-fw@strlen.de Signed-off-by: Alexei Starovoitov commit 84601d6ee68ae820dec97450934797046d62db4b Author: Florian Westphal Date: Fri Apr 21 19:02:54 2023 +0200 bpf: add bpf_link support for BPF_NETFILTER programs Add bpf_link support skeleton. To keep this reviewable, no bpf program can be invoked yet, if a program is attached only a c-stub is called and not the actual bpf program. Defaults to 'y' if both netfilter and bpf syscall are enabled in kconfig. Uapi example usage: union bpf_attr attr = { }; attr.link_create.prog_fd = progfd; attr.link_create.attach_type = 0; /* unused */ attr.link_create.netfilter.pf = PF_INET; attr.link_create.netfilter.hooknum = NF_INET_LOCAL_IN; attr.link_create.netfilter.priority = -128; err = bpf(BPF_LINK_CREATE, &attr, sizeof(attr)); ... this would attach progfd to ipv4:input hook. Such hook gets removed automatically if the calling program exits. BPF_NETFILTER program invocation is added in followup change. NF_HOOK_OP_BPF enum will eventually be read from nfnetlink_hook, it allows to tell userspace which program is attached at the given hook when user runs 'nft hook list' command rather than just the priority and not-very-helpful 'this hook runs a bpf prog but I can't tell which one'. Will also be used to disallow registration of two bpf programs with same priority in a followup patch. v4: arm32 cmpxchg only supports 32bit operand s/prio/priority/ v3: restrict prog attachment to ip/ip6 for now, lets lift restrictions if more use cases pop up (arptables, ebtables, netdev ingress/egress etc). Signed-off-by: Florian Westphal Link: https://lore.kernel.org/r/20230421170300.24115-2-fw@strlen.de Signed-off-by: Alexei Starovoitov commit 45cea721ea36d83969473d2abd29bcc2321cacdd Author: Kui-Feng Lee Date: Wed Apr 19 17:28:22 2023 -0700 bpftool: Update doc to explain struct_ops register subcommand. The "struct_ops register" subcommand now allows for an optional *LINK_DIR* to be included. This specifies the directory path where bpftool will pin struct_ops links with the same name as their corresponding map names. Signed-off-by: Kui-Feng Lee Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/r/20230420002822.345222-2-kuifeng@meta.com Signed-off-by: Alexei Starovoitov commit 0232b788978652571c4f4e57dc26ff8e4837926a Author: Kui-Feng Lee Date: Wed Apr 19 17:28:21 2023 -0700 bpftool: Register struct_ops with a link. You can include an optional path after specifying the object name for the 'struct_ops register' subcommand. Since the commit 226bc6ae6405 ("Merge branch 'Transit between BPF TCP congestion controls.'") has been accepted, it is now possible to create a link for a struct_ops. This can be done by defining a struct_ops in SEC(".struct_ops.link") to make libbpf returns a real link. If we don't pin the links before leaving bpftool, they will disappear. To instruct bpftool to pin the links in a directory with the names of the maps, we need to provide the path of that directory. Signed-off-by: Kui-Feng Lee Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/r/20230420002822.345222-1-kuifeng@meta.com Signed-off-by: Alexei Starovoitov commit 7a40f1f18a88c6d43c8725d7f45146480a79fde1 Author: Alexander Aring Date: Fri Apr 21 11:55:52 2023 -0400 fs: dlm: stop unnecessarily filling zero ms_extra bytes Commit 7175e131ebba ("fs: dlm: fix invalid derefence of sb_lvbptr") fixes an issue when the lkb->lkb_lvbptr set to an dangled pointer and an followed memcpy() would fail. It was fixed by an additional check of DLM_LKF_VALBLK flag. The mentioned commit forgot to add an additional check if DLM_LKF_VALBLK is set for the additional amount of LVB data allocated in a dlm message. This patch is changing the message allocation to check additionally if DLM_LKF_VALBLK is set otherwise a dangled lkb->lkb_lvbptr pointer would allocated zero LVB message data which not gets filled with actual data. This patch is however only a cleanup to reduce the amount of zero bytes transmitted over network as receive_lvb() will only evaluates message LVB data if DLM_LKF_VALBLK is set. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 3fd41721cd5c30af37c860e6201c98db0a568fd2 Author: Ritesh Harjani (IBM) Date: Fri Apr 21 08:52:43 2023 -0700 iomap: Add DIO tracepoints Add trace_iomap_dio_rw_begin, trace_iomap_dio_rw_queued and trace_iomap_dio_complete tracepoint. trace_iomap_dio_rw_queued is mostly only to know that the request was queued and -EIOCBQUEUED was returned. It is mostly trace_iomap_dio_rw_begin & trace_iomap_dio_complete which has all the details. a.out-2073 [006] 134.225717: iomap_dio_rw_begin: dev 7:7 ino 0xe size 0x0 offset 0x0 length 0x1000 done_before 0x0 flags DIRECT|WRITE dio_flags DIO_FORCE_WAIT aio 1 a.out-2073 [006] 134.226234: iomap_dio_complete: dev 7:7 ino 0xe size 0x1000 offset 0x1000 flags DIRECT|WRITE aio 1 error 0 ret 4096 a.out-2074 [006] 136.225975: iomap_dio_rw_begin: dev 7:7 ino 0xe size 0x1000 offset 0x0 length 0x1000 done_before 0x0 flags DIRECT dio_flags aio 1 a.out-2074 [006] 136.226173: iomap_dio_rw_queued: dev 7:7 ino 0xe size 0x1000 offset 0x1000 length 0x0 ksoftirqd/3-31 [003] 136.226389: iomap_dio_complete: dev 7:7 ino 0xe size 0x1000 offset 0x1000 flags DIRECT aio 1 error 0 ret 4096 a.out-2075 [003] 141.674969: iomap_dio_rw_begin: dev 7:7 ino 0xe size 0x1000 offset 0x0 length 0x1000 done_before 0x0 flags DIRECT|WRITE dio_flags aio 1 a.out-2075 [003] 141.676085: iomap_dio_rw_queued: dev 7:7 ino 0xe size 0x1000 offset 0x1000 length 0x0 kworker/2:0-27 [002] 141.676432: iomap_dio_complete: dev 7:7 ino 0xe size 0x1000 offset 0x1000 flags DIRECT|WRITE aio 1 error 0 ret 4096 a.out-2077 [006] 143.443746: iomap_dio_rw_begin: dev 7:7 ino 0xe size 0x1000 offset 0x0 length 0x1000 done_before 0x0 flags DIRECT dio_flags aio 1 a.out-2077 [006] 143.443866: iomap_dio_rw_queued: dev 7:7 ino 0xe size 0x1000 offset 0x1000 length 0x0 ksoftirqd/5-41 [005] 143.444134: iomap_dio_complete: dev 7:7 ino 0xe size 0x1000 offset 0x1000 flags DIRECT aio 1 error 0 ret 4096 a.out-2078 [007] 146.716833: iomap_dio_rw_begin: dev 7:7 ino 0xe size 0x1000 offset 0x0 length 0x1000 done_before 0x0 flags DIRECT dio_flags aio 0 a.out-2078 [007] 146.717639: iomap_dio_complete: dev 7:7 ino 0xe size 0x1000 offset 0x1000 flags DIRECT aio 0 error 0 ret 4096 a.out-2079 [006] 148.972605: iomap_dio_rw_begin: dev 7:7 ino 0xe size 0x1000 offset 0x0 length 0x1000 done_before 0x0 flags DIRECT dio_flags aio 0 a.out-2079 [006] 148.973099: iomap_dio_complete: dev 7:7 ino 0xe size 0x1000 offset 0x1000 flags DIRECT aio 0 error 0 ret 4096 Reviewed-by: Christoph Hellwig Signed-off-by: Ritesh Harjani (IBM) Reviewed-by: Darrick J. Wong [djwong: line up strings all prettylike] Signed-off-by: Darrick J. Wong commit d3bff1fc50d4fcaccddbd63917dd94172e80c40e Author: Ritesh Harjani (IBM) Date: Fri Apr 21 08:52:43 2023 -0700 iomap: Remove IOMAP_DIO_NOSYNC unused dio flag IOMAP_DIO_NOSYNC earlier was added for use in btrfs. But it seems for aio dsync writes this is not useful anyway. For aio dsync case, we we queue the request and return -EIOCBQUEUED. Now, since IOMAP_DIO_NOSYNC doesn't let iomap_dio_complete() to call generic_write_sync(), hence we may lose the sync write. Hence kill this flag as it is not in use by any FS now. Tested-by: Disha Goel Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Ritesh Harjani (IBM) Signed-off-by: Darrick J. Wong commit f6c73a11133ef991284311387ca707b48bf53912 Author: Ritesh Harjani (IBM) Date: Fri Apr 21 08:52:42 2023 -0700 fs.h: Add TRACE_IOCB_STRINGS for use in trace points Add TRACE_IOCB_STRINGS macro which can be used in the trace point patch to print different flag values with meaningful string output. Tested-by: Disha Goel Reviewed-by: Christoph Hellwig Signed-off-by: Ritesh Harjani (IBM) Reviewed-by: Darrick J. Wong [djwong: line up strings all prettylike] Signed-off-by: Darrick J. Wong commit 746aa3c8cb1a650ff2583497ac646e505831b9b9 Author: Mark Zhang Date: Thu Apr 20 04:39:06 2023 +0300 RDMA/mlx5: Use correct device num_ports when modify DC Just like other QP types, when modify DC, the port_num should be compared with dev->num_ports, instead of HCA_CAP.num_ports. Otherwise Multi-port vHCA on DC may not work. Fixes: 776a3906b692 ("IB/mlx5: Add support for DC target QP") Link: https://lore.kernel.org/r/20230420013906.1244185-1-markzhang@nvidia.com Signed-off-by: Mark Zhang Reviewed-by: Maor Gottlieb Signed-off-by: Jason Gunthorpe commit 109205b40afbddd01baff796c627c5be3d804ef9 Author: Tejun Heo Date: Thu Apr 20 09:48:08 2023 -1000 RDMA/irdma: Drop spurious WQ_UNBOUND from alloc_ordered_workqueue() call Workqueue is in the process of cleaning up the distinction between unbound workqueues w/ @nr_active==1 and ordered workqueues. Explicit WQ_UNBOUND isn't needed for alloc_ordered_workqueue() and will trigger a warning in the future. Let's remove it. This doesn't cause any functional changes. Link: https://lore.kernel.org/r/ZEGW-IcFReR1juVM@slm.duckdns.org Signed-off-by: Tejun Heo Acked-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 10af303192bc5490bb39b29541ecb0ead2eff1ce Author: Daisuke Matsuda Date: Tue Apr 18 18:06:42 2023 +0900 RDMA/rxe: Fix spinlock recursion deadlock on requester The following deadlock is observed: Call Trace: _raw_spin_lock_bh+0x29/0x30 check_type_state.constprop.0+0x4e/0xc0 [rdma_rxe] rxe_rcv+0x173/0x3d0 [rdma_rxe] rxe_udp_encap_recv+0x69/0xd0 [rdma_rxe] ? __pfx_rxe_udp_encap_recv+0x10/0x10 [rdma_rxe] udp_queue_rcv_one_skb+0x258/0x520 udp_unicast_rcv_skb+0x75/0x90 __udp4_lib_rcv+0x364/0x5c0 ip_protocol_deliver_rcu+0xa7/0x160 ip_local_deliver_finish+0x73/0xa0 ip_sublist_rcv_finish+0x80/0x90 ip_sublist_rcv+0x191/0x220 ip_list_rcv+0x132/0x160 __netif_receive_skb_list_core+0x297/0x2c0 netif_receive_skb_list_internal+0x1c5/0x300 napi_complete_done+0x6f/0x1b0 virtnet_poll+0x1f4/0x2d0 [virtio_net] __napi_poll+0x2c/0x1b0 net_rx_action+0x293/0x350 ? __napi_schedule+0x79/0x90 __do_softirq+0xcb/0x2ab __irq_exit_rcu+0xb9/0xf0 common_interrupt+0x80/0xa0 asm_common_interrupt+0x22/0x40 RIP: 0010:_raw_spin_lock+0x17/0x30 rxe_requester+0xe4/0x8f0 [rdma_rxe] ? xas_load+0x9/0xa0 ? xa_load+0x70/0xb0 do_task+0x64/0x1f0 [rdma_rxe] rxe_post_send+0x54/0x110 [rdma_rxe] ib_uverbs_post_send+0x5f8/0x680 [ib_uverbs] ? netif_receive_skb_list_internal+0x1e3/0x300 ib_uverbs_write+0x3c8/0x500 [ib_uverbs] vfs_write+0xc5/0x3b0 ksys_write+0xab/0xe0 ? syscall_trace_enter.constprop.0+0x126/0x1a0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc The deadlock is easily reproducible with perftest. Fix it by disabling softirq when acquiring the lock in process context. Fixes: f605f26ea196 ("RDMA/rxe: Protect QP state with qp->state_lock") Link: https://lore.kernel.org/r/20230418090642.1849358-1-matsuda-daisuke@fujitsu.com Signed-off-by: Daisuke Matsuda Acked-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe commit f37202aa6e5d6d39a48f744d962fd2bf3a8a452b Merge: 803235982b8c0 2ff1b0839ddd5 Author: Thomas Gleixner Date: Fri Apr 21 17:30:57 2023 +0200 Merge tag 'irqchip-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip changes from Marc Zyngier: - Large RISC-V IPI rework to make way for a new interrupt architecture - More Loongarch fixes from Lianmin Lv, fixing issues in the so called "dual-bridge" systems. - Workaround for the nvidia T241 chip that gets confused in 3 and 4 socket configurations, leading to the GIC malfunctionning in some contexts - Drop support for non-firmware driven GIC configurarations now that the old ARM11MP Cavium board is gone - Workaround for the Rockchip 3588 chip that doesn't correctly deal with the shareability attributes. - Replace uses of of_find_property() with the more appropriate of_property_read_bool() - Make bcm-6345-l1 request its MMIO region - Add suspend support to the SiFive PLIC - Drop support for stih415, stih416 and stid127 platforms Link: https://lore.kernel.org/lkml/20230421132104.3021536-1-maz@kernel.org commit 833d67ecdc5f35f1ebf59d0fccc1ce771434be9c Author: Stanislav Fomichev Date: Tue Apr 18 15:53:39 2023 -0700 selftests/bpf: Verify optval=NULL case Make sure we get optlen exported instead of getting EFAULT. Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230418225343.553806-3-sdf@google.com commit 00e74ae0863827d944e36e56a4ce1e77e50edb91 Author: Stanislav Fomichev Date: Tue Apr 18 15:53:38 2023 -0700 bpf: Don't EFAULT for getsockopt with optval=NULL Some socket options do getsockopt with optval=NULL to estimate the size of the final buffer (which is returned via optlen). This breaks BPF getsockopt assumptions about permitted optval buffer size. Let's enforce these assumptions only when non-NULL optval is provided. Fixes: 0d01da6afc54 ("bpf: implement getsockopt and setsockopt hooks") Reported-by: Martin KaFai Lau Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/ZD7Js4fj5YyI2oLd@google.com/T/#mb68daf700f87a9244a15d01d00c3f0e5b08f49f7 Link: https://lore.kernel.org/bpf/20230418225343.553806-2-sdf@google.com commit e81995a81e25e8fab286db6539198dd97b140807 Author: Oswald Buddenhagen Date: Fri Apr 21 16:10:06 2023 +0200 ALSA: emu10k1: clarify various fx8010.*_mask fields extin_mask and extout_mask are used only by the SbLive! microcode, so they have no effect on Audigy. Eliminate fxbus_mask entirely, as it wasn't actually used for anything. As a drive-by, remove the pointless pad1 field from struct snd_emu10k1_fx8010 - it is not visible to user space, so it has no binary compatibility constraints. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230421141006.1005509-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 2db2be5607c4508c37705d604437b43a99b4791f Author: Chris Down Date: Fri Apr 21 15:38:41 2023 +0100 ALSA: usb-audio: Rate limit usb_set_interface error reporting When an error occurs during USB disconnection sometimes things can go wrong as endpoint_set_interface may end up being called repeatedly. For example: % dmesg --notime | grep 'usb 3-7.1.4' | sort | uniq -c | head -2 3069 usb 3-7.1.4: 1:1: usb_set_interface failed (-19) 908 usb 3-7.1.4: 1:1: usb_set_interface failed (-71) In my case, there sometimes are hundreds of these usb_set_interface failure messages a second when I disconnect the hub that has my USB audio device. These messages can take a huge amount of the kmsg ringbuffer and don't provide any extra information over the previous ones, so ratelimit them. Signed-off-by: Chris Down Link: https://lore.kernel.org/r/ZEKf8UYBYa1h4JWR@chrisdown.name Signed-off-by: Takashi Iwai commit f9bcdcec3bf0063a010d123a9977cb7a8e240f95 Merge: e375b503943f5 73db1b8f2bb67 Author: Jakub Kicinski Date: Fri Apr 21 07:55:40 2023 -0700 Merge tag 'nf-23-04-21' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net 1) Set on IPS_CONFIRMED before change_status() otherwise EBUSY is bogusly hit. This bug was introduced in the 6.3 release cycle. 2) Fix nfnetlink_queue conntrack support: Set/dump timeout accordingly for unconfirmed conntrack entries. Make sure this is done after IPS_CONFIRMED is set on. This is an old bug, it happens since the introduction of this feature. * tag 'nf-23-04-21' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: conntrack: fix wrong ct->timeout value netfilter: conntrack: restore IPS_CONFIRMED out of nf_conntrack_hash_check_insert() ==================== Link: https://lore.kernel.org/r/20230421105700.325438-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 4d421eebe1465d94b95867dd025385dc3d661f9b Author: Oswald Buddenhagen Date: Fri Apr 21 13:27:51 2023 +0200 ALSA: docs: writing-an-alsa-driver.rst: polishing - Update some outdated info - Language fixes - Whitespace/formatting fixes - Prefer attached over stand-alone '::' [ dropped a trailing white space in the patch -- tiwai ] Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230421112751.990244-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit ca288965801572fe41386560d4e6c5cc0e5cc56d Merge: dfc39d4026fb2 3288ee5844b74 Author: Jakub Kicinski Date: Fri Apr 21 07:35:51 2023 -0700 Merge tag 'wireless-next-2023-04-21' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.4 Most likely the last -next pull request for v6.4. We have changes all over. rtw88 now supports SDIO bus and iwlwifi continues to work on Wi-Fi 7 support. Not much stack changes this time. Major changes: cfg80211/mac80211 - fix some Fine Time Measurement (FTM) frames not being bufferable - flush frames before key removal to avoid potential unencrypted transmission depending on the hardware design iwlwifi - preparation for Wi-Fi 7 EHT and multi-link support rtw88 - SDIO bus support - RTL8822BS, RTL8822CS and RTL8821CS SDIO chipset support rtw89 - framework firmware backwards compatibility brcmfmac - Cypress 43439 SDIO support mt76 - mt7921 P2P support - mt7996 mesh A-MSDU support - mt7996 EHT support - mt7996 coredump support wcn36xx - support for pronto v3 hardware ath11k - PCIe DeviceTree bindings - WCN6750: enable SAR support ath10k - convert DeviceTree bindings to YAML * tag 'wireless-next-2023-04-21' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (261 commits) wifi: rtw88: Update spelling in main.h wifi: airo: remove ISA_DMA_API dependency wifi: rtl8xxxu: Simplify setting the initial gain wifi: rtl8xxxu: Add rtl8xxxu_write{8,16,32}_{set,clear} wifi: rtl8xxxu: Don't print the vendor/product/serial wifi: rtw88: Fix memory leak in rtw88_usb wifi: rtw88: call rtw8821c_switch_rf_set() according to chip variant wifi: rtw88: set pkg_type correctly for specific rtw8821c variants wifi: rtw88: rtw8821c: Fix rfe_option field width wifi: rtw88: usb: fix priority queue to endpoint mapping wifi: rtw88: 8822c: add iface combination wifi: rtw88: handle station mode concurrent scan with AP mode wifi: rtw88: prevent scan abort with other VIFs wifi: rtw88: refine reserved page flow for AP mode wifi: rtw88: disallow PS during AP mode wifi: rtw88: 8822c: extend reserved page number wifi: rtw88: add port switch for AP mode wifi: rtw88: add bitmap for dynamic port settings wifi: rtw89: mac: use regular int as return type of DLE buffer request wifi: mac80211: remove return value check of debugfs_create_dir() ... ==================== Link: https://lore.kernel.org/r/20230421104726.800BCC433D2@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 02e93e0475df21a1091a9833c52c0e241586573a Author: Magnus Karlsson Date: Fri Apr 21 08:22:08 2023 +0200 selftests/xsk: Put MAP_HUGE_2MB in correct argument Put the flag MAP_HUGE_2MB in the correct flags argument instead of the wrong offset argument. Fixes: 2ddade322925 ("selftests/xsk: Fix munmap for hugepage allocated umem") Reported-by: Kal Cutter Conley Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230421062208.3772-1-magnus.karlsson@gmail.com commit 4ab07209d5cc8cb6d2a5324c07b3efc3b2fde494 Author: Dave Marchevsky Date: Fri Apr 21 00:44:31 2023 -0700 bpf: Fix bpf_refcount_acquire's refcount_t address calculation When calculating the address of the refcount_t struct within a local kptr, bpf_refcount_acquire_impl should add refcount_off bytes to the address of the local kptr. Due to some missing parens, the function is incorrectly adding sizeof(refcount_t) * refcount_off bytes. This patch fixes the calculation. Due to the incorrect calculation, bpf_refcount_acquire_impl was trying to refcount_inc some memory well past the end of local kptrs, resulting in kasan and refcount complaints, as reported in [0]. In that thread, Florian and Eduard discovered that bpf selftests written in the new style - with __success and an expected __retval, specifically - were not actually being run. As a result, selftests added in bpf_refcount series weren't really exercising this behavior, and thus didn't unearth the bug. With this fixed behavior it's safe to revert commit 7c4b96c00043 ("selftests/bpf: disable program test run for progs/refcounted_kptr.c"), this patch does so. [0] https://lore.kernel.org/bpf/ZEEp+j22imoN6rn9@strlen.de/ Fixes: 7c50b1cb76ac ("bpf: Add bpf_refcount_acquire kfunc") Reported-by: Florian Westphal Reported-by: Eduard Zingerman Signed-off-by: Dave Marchevsky Signed-off-by: Daniel Borkmann Tested-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20230421074431.3548349-1-davemarchevsky@fb.com commit acf1c3d68e9a31f10d92bc67ad4673cdae5e8d92 Author: Alexei Starovoitov Date: Thu Apr 20 18:49:01 2023 -0700 bpf: Fix race between btf_put and btf_idr walk. Florian and Eduard reported hard dead lock: [ 58.433327] _raw_spin_lock_irqsave+0x40/0x50 [ 58.433334] btf_put+0x43/0x90 [ 58.433338] bpf_find_btf_id+0x157/0x240 [ 58.433353] btf_parse_fields+0x921/0x11c0 This happens since btf->refcount can be 1 at the time of btf_put() and btf_put() will call btf_free_id() which will try to grab btf_idr_lock and will dead lock. Avoid the issue by doing btf_put() without locking. Fixes: 3d78417b60fb ("bpf: Add bpf_btf_find_by_name_kind() helper.") Fixes: 1e89106da253 ("bpf: Add bpf_core_add_cands() and wire it into bpf_core_apply_relo_insn().") Reported-by: Florian Westphal Reported-by: Eduard Zingerman Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Tested-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20230421014901.70908-1-alexei.starovoitov@gmail.com commit 93822f5161a2dc57a60b95b35b3cb8589f53413e Author: Tomáš Pecka Date: Thu Apr 20 19:19:39 2023 +0200 hwmon: (pmbus/fsp-3y) Fix functionality bitmask in FSP-3Y YM-2151E The bit flags in pmbus_driver_info functionality for YM-2151E chip were joined with a comma operator instead of a bitwise OR. This means that the last constant PMBUS_HAVE_IIN was not OR-ed with the other PM_BUS_HAVE_* constants for this page but it initialized the next element of the func array (which was not accessed from anywhere because of the number of pages). However, there is no need for setting PMBUS_HAVE_IIN in the 5Vsb page because this command does not seem to be paged. Obviously, the device only has one IIN sensor, so it doesn't make sense to query it again from the second page. Fixes: 1734b4135a62 ("hwmon: Add driver for fsp-3y PSUs and PDUs") Signed-off-by: Jan Kundrát Signed-off-by: Tomáš Pecka Link: https://lore.kernel.org/r/20230420171939.212040-1-tomas.pecka@cesnet.cz Signed-off-by: Guenter Roeck commit 2a8e41ad337508fc5d598c0f9288890214f8e318 Author: Chris Packham Date: Wed Apr 19 11:36:55 2023 +1200 hwmon: (adt7475) Use device_property APIs when configuring polarity On DT unaware platforms of_property_read_u32_array() returns -ENOSYS which wasn't handled by the code treating adi,pwm-active-state as optional. Update the code to use device_property_read_u32_array() which deals gracefully with DT unaware platforms. Fixes: 86da28eed4fb ("hwmon: (adt7475) Add support for inverting pwm output") Reported-by: Mariusz Białończyk Link: https://lore.kernel.org/linux-hwmon/52e26a67-9131-2dc0-40cb-db5c07370027@alliedtelesis.co.nz/T/#mdd0505801e0a4e72340de009a47c0fca4f771ed3 Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20230418233656.869055-2-chris.packham@alliedtelesis.co.nz Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck commit 19692f17cd133ba2305e1f5c6484e623ec1ac7d0 Author: Aleksa Savic Date: Sun Apr 16 20:17:01 2023 +0200 hwmon: (aquacomputer_d5next) Add support for Aquacomputer Aquastream XT Extend aquacomputer_d5next driver to expose various hardware sensors of the Aquacomputer Aquastream XT watercooling pump, which communicates through a proprietary USB HID protocol. Implemented by Leonard Anderweit [1] [2]. Coolant temp, fan IC and external temp sensor readings are available, along with speed and voltage of both the pump and optionally connected fan. It also exposes pump current. Additionally, serial number and firmware version are exposed through debugfs. [1] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/46 [2] https://github.com/aleksamagicka/aquacomputer_d5next-hwmon/pull/49 Originally-from: Leonard Anderweit Signed-off-by: Aleksa Savic Link: https://lore.kernel.org/r/20230416181702.9892-1-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck commit 0be100771711b99ab561ee3121657329a11e173a Author: Frank Crawford Date: Sun Apr 16 14:25:10 2023 +1000 hwmon: (it87) Disable/enable SMBus access for IT8622E chipset Configure the IT8622E chip to disable/re-enable access via an SMBus when reading or writing the chip's registers. Signed-off-by: Frank Crawford Signed-off-by: Guenter Roeck commit 376e1a937b3056802f3ad86811ec92ee3f49d560 Author: Frank Crawford Date: Sun Apr 16 14:25:09 2023 +1000 hwmon: (it87) Add calls to smbus_enable/smbus_disable as required Disable/re-enable access through SMBus for chip registers when they are are being read or written. For simple cases this is done at the same time as when a mutex is set, however, within loops or during initialisation it is done separately. Signed-off-by: Frank Crawford [groeck: Fixed multi-line alignment] Signed-off-by: Guenter Roeck commit 0282ba4a4fe6c8e6c0ffecfcdf214fa7f6452dc4 Author: Frank Crawford Date: Sun Apr 16 14:25:08 2023 +1000 hwmon: (it87) Test for error in it87_update_device Handle errors from it87_update_device(), which currently only occurs if SMBus access locking fails. Signed-off-by: Frank Crawford [groeck: Fixed handling in show_temp_type()] Signed-off-by: Guenter Roeck commit 1c5e9170ad93d3bd62a7ed8380e60b62c88b90a8 Author: Rob Herring Date: Mon Apr 10 18:27:35 2023 -0500 bus: tegra-gmi: Replace of_platform.h with explicit includes Tegra-gmi doesn't use anything from of_platform.h, but depends on of.h, of_device.h, and platform_device.h which are all implicitly included, but that is going to be removed soon. Link: https://lore.kernel.org/r/20230410232735.1562296-1-robh@kernel.org Signed-off-by: Rob Herring commit 3714c8d480964ca449bbe881f70b31f1bf7b428a Author: Rob Herring Date: Fri Mar 10 08:47:06 2023 -0600 hte: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Acked-by: Dipen Patel Link: https://lore.kernel.org/r/20230310144706.1542365-1-robh@kernel.org Signed-off-by: Rob Herring commit 6da07bdda1a4da07a8f1b6316e331974d6b6eef8 Author: Rob Herring Date: Fri Mar 10 08:47:36 2023 -0600 w1: w1-gpio: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Link: https://lore.kernel.org/r/20230310144737.1547200-1-robh@kernel.org Signed-off-by: Rob Herring commit 10ce6b701c21e4951ded058e06508d0f68a908df Author: Rob Herring Date: Fri Mar 10 08:47:31 2023 -0600 virt: fsl: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Link: https://lore.kernel.org/r/20230310144731.1546259-1-robh@kernel.org Signed-off-by: Rob Herring commit 83f32497890c8f3e5d2337bc4f353442641b6750 Author: Rob Herring Date: Fri Mar 10 08:47:23 2023 -0600 soc: fsl: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Link: https://lore.kernel.org/r/20230310144723.1545069-1-robh@kernel.org Signed-off-by: Rob Herring commit c763a0833fd451a7bbe207be843caf1666f46612 Author: Rob Herring Date: Fri Mar 10 08:47:22 2023 -0600 sbus: display7seg: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Link: https://lore.kernel.org/r/20230310144723.1544930-1-robh@kernel.org Signed-off-by: Rob Herring commit 967ca91a996f82219f2883e9e53d8e20df49025a Author: Krishna Yarlagadda Date: Fri Apr 21 14:43:09 2023 +0530 spi: tegra210-quad: Enable TPM wait polling Trusted Platform Module requires flow control. As defined in TPM interface specification, client would drive MISO line at same cycle as last address bit on MOSI. Tegra234 and Tegra241 QSPI controllers have TPM wait state detection feature which is enabled for TPM client devices reported in SPI device mode bits. Signed-off-by: Krishna Yarlagadda Reviewed-by: Jon Hunter Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20230421091309.2672-4-kyarlagadda@nvidia.com Signed-off-by: Mark Brown commit 67a142dc9eb96a5cc018e5db62390665eb5f038c Author: Krishna Yarlagadda Date: Fri Apr 21 14:43:07 2023 +0530 spi: Add TPM HW flow flag TPM specification [1] defines flow control over SPI. Client device can insert a wait state on MISO when address is transmitted by controller on MOSI. Detecting the wait state in software is only possible for full duplex controllers. For controllers that support only half- duplex, the wait state detection needs to be implemented in hardware. Add a flag SPI_TPM_HW_FLOW for TPM device to set when software flow control is not possible and hardware flow control is expected from SPI controller. Reference: [1] https://trustedcomputinggroup.org/resource/pc-client-platform-tpm -profile-ptp-specification/ Signed-off-by: Krishna Yarlagadda Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20230421091309.2672-2-kyarlagadda@nvidia.com Signed-off-by: Mark Brown commit f7abf14f0001a5a47539d9f60bbdca649e43536b Author: Thomas Gleixner Date: Mon Apr 17 15:37:55 2023 +0200 posix-cpu-timers: Implement the missing timer_wait_running callback For some unknown reason the introduction of the timer_wait_running callback missed to fixup posix CPU timers, which went unnoticed for almost four years. Marco reported recently that the WARN_ON() in timer_wait_running() triggers with a posix CPU timer test case. Posix CPU timers have two execution models for expiring timers depending on CONFIG_POSIX_CPU_TIMERS_TASK_WORK: 1) If not enabled, the expiry happens in hard interrupt context so spin waiting on the remote CPU is reasonably time bound. Implement an empty stub function for that case. 2) If enabled, the expiry happens in task work before returning to user space or guest mode. The expired timers are marked as firing and moved from the timer queue to a local list head with sighand lock held. Once the timers are moved, sighand lock is dropped and the expiry happens in fully preemptible context. That means the expiring task can be scheduled out, migrated, interrupted etc. So spin waiting on it is more than suboptimal. The timer wheel has a timer_wait_running() mechanism for RT, which uses a per CPU timer-base expiry lock which is held by the expiry code and the task waiting for the timer function to complete blocks on that lock. This does not work in the same way for posix CPU timers as there is no timer base and expiry for process wide timers can run on any task belonging to that process, but the concept of waiting on an expiry lock can be used too in a slightly different way: - Add a mutex to struct posix_cputimers_work. This struct is per task and used to schedule the expiry task work from the timer interrupt. - Add a task_struct pointer to struct cpu_timer which is used to store a the task which runs the expiry. That's filled in when the task moves the expired timers to the local expiry list. That's not affecting the size of the k_itimer union as there are bigger union members already - Let the task take the expiry mutex around the expiry function - Let the waiter acquire a task reference with rcu_read_lock() held and block on the expiry mutex This avoids spin-waiting on a task which might not even be on a CPU and works nicely for RT too. Fixes: ec8f954a40da ("posix-timers: Use a callback for cancel synchronization on PREEMPT_RT") Reported-by: Marco Elver Signed-off-by: Thomas Gleixner Tested-by: Marco Elver Tested-by: Sebastian Andrzej Siewior Reviewed-by: Frederic Weisbecker Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/87zg764ojw.ffs@tglx commit 2ff1b0839ddd514be4752c64c1c6facf91ff3a56 Merge: 275232c0b4064 0989ffb31cff7 Author: Marc Zyngier Date: Fri Apr 21 14:05:31 2023 +0100 Merge branch irq/misc-6.4 into irq/irqchip-next * irq/misc-6.4: : . : Misc irqchip changes for 6.4: : : - Replace uses of of_find_property() with the more : appropriate of_property_read_bool() : : - Make bcm-6345-l1 request its MMIO region : : - Add suspend support to the SiFive PLIC : : - Drop support for stih415, stih416 and stid127 platforms : . irqchip/st: Remove stih415/stih416 and stid127 platforms support irqchip/irq-sifive-plic: Add syscore callbacks for hibernation irqchip: Use of_property_read_bool() for boolean properties irqchip/bcm-6345-l1: Request memory region Signed-off-by: Marc Zyngier commit 275232c0b4064b85fd48532dff1a9b2764d67617 Merge: e7b5771aa0874 48ce2d722f7f1 Author: Marc Zyngier Date: Fri Apr 21 14:05:25 2023 +0100 Merge branch irq/loongarch-fixes-6.4 into irq/irqchip-next * irq/loongarch-fixes-6.4: : . : More Loongarch fixes from Lianmin Lv, fixing issues : in the so called "dual-bridge" systems. : . irqchip/loongson-pch-pic: Fix pch_pic_acpi_init calling irqchip/loongson-pch-pic: Fix registration of syscore_ops irqchip/loongson-eiointc: Fix registration of syscore_ops irqchip/loongson-eiointc: Fix incorrect use of acpi_get_vec_parent irqchip/loongson-eiointc: Fix returned value on parsing MADT Signed-off-by: Marc Zyngier commit e7b5771aa08746c13bb03ebe0a5053df1498c328 Merge: f39157b3c0bb4 f8415f2def181 Author: Marc Zyngier Date: Fri Apr 21 14:05:17 2023 +0100 Merge branch irq/riscv-ipi into irq/irqchip-next * irq/riscv-ipi: : . : RISC-V IPI rework from Anup Patel: : : "This series aims to improve IPI support in Linux RISC-V in following ways: : 1) Treat IPIs as normal per-CPU interrupts instead of having custom RISC-V : specific hooks. This also makes Linux RISC-V IPI support aligned with : other architectures. : 2) Remote TLB flushes and icache flushes should prefer local IPIs instead : of SBI calls whenever we have specialized hardware (such as RISC-V AIA : IMSIC and RISC-V SWI) which allows S-mode software to directly inject : IPIs without any assistance from M-mode runtime firmware." : . irqchip/riscv-intc: Add empty irq_eoi() for chained irq handlers RISC-V: Use IPIs for remote icache flush when possible RISC-V: Use IPIs for remote TLB flush when possible RISC-V: Allow marking IPIs as suitable for remote FENCEs RISC-V: Treat IPIs as normal Linux IRQs irqchip/riscv-intc: Allow drivers to directly discover INTC hwnode RISC-V: Clear SIP bit only when using SBI IPI operations Signed-off-by: Marc Zyngier commit f39157b3c0bb4afdcaea7809b3669de8e0495ed5 Merge: 197b6b60ae7bc a8707f5538846 Author: Marc Zyngier Date: Fri Apr 21 14:05:08 2023 +0100 Merge branch irq/gic-6.4 into irq/irqchip-next * irq/gic-6.4: : . : Collection of GIC/GICv3 fixes and cleanups : : - Workaround for the nvidia T241 chip that gets confused : in 3 and 4 socket configurations, leading to the GIC : malfunctionning in some contexts : : - Drop support for non-firmware driven GIC configurarations : now that the old ARM11MP Cavium board is gone : : - Workaround for the Rockchip 3588 chip that doesn't : correctly deal with the shareability attributes. : . irqchip/gic-v3: Add Rockchip 3588001 erratum workaround irqchip/gicv3: Workaround for NVIDIA erratum T241-FABRIC-4 irqchip/gic: Drop support for board files Signed-off-by: Marc Zyngier commit aaa2f14e6f3f34de8edfb13566110a0fe0d88785 Author: Mark Brown Date: Tue Mar 7 17:37:16 2023 +0000 KVM: arm64: Clarify host SME state management Normally when running a guest we do not touch the floating point register state until first use of floating point by the guest, saving the current state and loading the guest state at that point. This has been found to offer a performance benefit in common cases. However currently if SME is active when switching to a guest then we exit streaming mode, disable ZA and invalidate the floating point register state prior to starting the guest. The exit from streaming mode is required for correct guest operation, if we leave streaming mode enabled then many non-SME operations can generate SME traps (eg, SVE operations will become streaming SVE operations). If EL1 leaves CPACR_EL1.SMEN disabled then the host is unable to intercept these traps. This will mean that a SME unaware guest will see SME exceptions which will confuse it. Disabling streaming mode also avoids creating spurious indications of usage of the SME hardware which could impact system performance, especially with shared SME implementations. Document the requirement to exit streaming mode clearly. There is no issue with guest operation caused by PSTATE.ZA so we can defer handling for that until first floating point usage, do so if the register state is not that of the current task and hence has already been saved. We could also do this for the case where the register state is that for the current task however this is very unlikely to happen and would require disproportionate effort so continue to save the state in that case. Saving this state on first use would require that we map and unmap storage for the host version of these registers for use by the hypervisor, taking care to deal with protected KVM and the fact that the host can free or reallocate the backing storage. Given that the strong recommendation is that applications should only keep PSTATE.ZA enabled when the state it enables is in active use it is difficult to see a case where a VMM would wish to do this, it would need to not only be using SME but also running the guest in the middle of SME usage. This can be revisited in the future if a use case does arises, in the interim such tasks will work but experience a performance overhead. This brings our handling of SME more into line with our handling of other floating point state and documents more clearly the constraints we have, especially around streaming mode. Signed-off-by: Mark Brown Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221214-kvm-arm64-sme-context-switch-v2-3-57ba0082e9ff@kernel.org commit d071cefdcca39fdbcdd4bf36868448820dbac34b Author: Mark Brown Date: Tue Mar 7 17:37:15 2023 +0000 KVM: arm64: Restructure check for SVE support in FP trap handler We share the same handler for general floating point and SVE traps with a check to make sure we don't handle any SVE traps if the system doesn't have SVE support. Since we will be adding SME support and wishing to handle that along with other FP related traps rewrite the check to be more scalable and a bit clearer too, ensuring we don't misidentify SME traps as SVE ones. Signed-off-by: Mark Brown Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221214-kvm-arm64-sme-context-switch-v2-2-57ba0082e9ff@kernel.org commit 4c181e3d352e9280c84fb4b4c7a8940ce005374e Author: Mark Brown Date: Tue Mar 7 17:37:14 2023 +0000 KVM: arm64: Document check for TIF_FOREIGN_FPSTATE In kvm_arch_vcpu_load_fp() we unconditionally set the current FP state to FP_STATE_HOST_OWNED, this will be overridden to FP_STATE_NONE if TIF_FOREIGN_FPSTATE is set but the check is deferred until kvm_arch_vcpu_ctxflush_fp() where we are no longer preemptable. Add a comment to this effect to help avoid people being concerned about the lack of a check and discover where the check is done. Signed-off-by: Mark Brown Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221214-kvm-arm64-sme-context-switch-v2-1-57ba0082e9ff@kernel.org commit 3d1793562858f2bc42cc722fe00ec9b2ff0618e1 Author: Jingyu Wang Date: Thu Mar 9 15:59:19 2023 +0800 KVM: arm64: Fix repeated words in comments Delete the redundant word 'to'. Signed-off-by: Jingyu Wang Reviewed-by: Mukesh Ojha Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230309075919.169518-1-jingyuwang_vip@163.com commit 25f0617109496e1aff49594fbae5644286447a0f Author: Dhruva Gole Date: Thu Apr 20 17:46:15 2023 +0530 spi: bcm63xx: remove PM_SLEEP based conditional compilation Get rid of conditional compilation based on CONFIG_PM_SLEEP because it may introduce build issues with certain configs where it maybe disabled This is because if above config is not enabled the suspend-resume functions are never part of the code but the bcm63xx_spi_pm_ops struct still inits them to non-existent suspend-resume functions. Fixes: b42dfed83d95 ("spi: add Broadcom BCM63xx SPI controller driver") Signed-off-by: Dhruva Gole Link: https://lore.kernel.org/r/20230420121615.967487-1-d-gole@ti.com Signed-off-by: Mark Brown commit dc801ea8ae37d54706e6f1cef140731ac5981c9c Author: Kuninori Morimoto Date: Fri Apr 21 00:11:31 2023 +0000 ASoC: fsl: imx-audmix: remove dummy dai_link->platform Dummy dai_link->platform is not needed. Signed-off-by: Kuninori Morimoto Acked-by: Shengjiu Wang Tested-by: Shengjiu Wang Link: https://lore.kernel.org/r/877cu6f619.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3ce08f85133fc93278801aba3efb4548d3ef3ca0 Author: Kuninori Morimoto Date: Fri Apr 21 00:11:21 2023 +0000 ASoC: fsl: imx-audmix: cleanup platform which is using Generic DMA If CPU is using soc-generic-dmaengine-pcm, Platform Component will be same as CPU Component. In this case, we can use CPU dlc for Platform dlc. This patch shares CPU dlc with Platform, and add comment. Signed-off-by: Kuninori Morimoto Acked-by: Shengjiu Wang Tested-by: Shengjiu Wang Link: https://lore.kernel.org/r/878remf61j.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2324bc107b0b3d2de351f35032dc5093cbb61493 Author: Kuninori Morimoto Date: Fri Apr 21 00:11:07 2023 +0000 ASoC: fsl: imx-spdif: cleanup platform which is using Generic DMA If CPU is using soc-generic-dmaengine-pcm, Platform Component will be same as CPU Component. In this case, we can use CPU dlc for Platform dlc. This patch shares CPU dlc with Platform, and add comment. Signed-off-by: Kuninori Morimoto Acked-by: Shengjiu Wang Tested-by: Shengjiu Wang Link: https://lore.kernel.org/r/87a5z2f61w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit d6e28695dcb6f653c7f2adf38021a5e934a6f416 Author: Kuninori Morimoto Date: Fri Apr 21 00:10:56 2023 +0000 ASoC: fsl: imx-es8328: cleanup platform which is using Generic DMA If CPU is using soc-generic-dmaengine-pcm, Platform Component will be same as CPU Component. In this case, we can use CPU dlc for Platform dlc. This patch shares CPU dlc with Platform, and add comment. Signed-off-by: Kuninori Morimoto Acked-by: Shengjiu Wang Tested-by: Shengjiu Wang Link: https://lore.kernel.org/r/87bkjif628.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2f4d58f7635aec014428e73ef6120c4d0377c430 Author: Anup Patel Date: Wed Jan 11 11:26:10 2023 +0530 RISC-V: KVM: Virtualize per-HART AIA CSRs The AIA specification introduce per-HART AIA CSRs which primarily support: * 64 local interrupts on both RV64 and RV32 * priority for each of the 64 local interrupts * interrupt filtering for local interrupts This patch virtualize above mentioned AIA CSRs and also extend ONE_REG interface to allow user-space save/restore Guest/VM view of these CSRs. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit 1b617bc93178912fa36f87a957c15d1f1708c299 Author: Pierre Asselin Date: Wed Apr 19 00:48:34 2023 -0400 firmware/sysfb: Fix VESA format selection Some legacy BIOSes report no reserved bits in their 32-bit rgb mode, breaking the calculation of bits_per_pixel in commit f35cd3fa7729 ("firmware/sysfb: Fix EFI/VESA format selection"). However they report lfb_depth correctly for those modes. Keep the computation but set bits_per_pixel to lfb_depth if the latter is larger. v2 fixes the warnings from a max3() macro with arguments of different types; split the bits_per_pixel assignment to avoid uglyfing the code with too many typecasts. v3 fixes space and formatting blips pointed out by Javier, and change the bit_per_pixel assignment back to a single statement using two casts. v4 go back to v2 and use max_t() Signed-off-by: Pierre Asselin Fixes: f35cd3fa7729 ("firmware/sysfb: Fix EFI/VESA format selection") Link: https://lore.kernel.org/r/4Psm6B6Lqkz1QXM@panix3.panix.com Link: https://lore.kernel.org/r/20230412150225.3757223-1-javierm@redhat.com Tested-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230419044834.10816-1-pa@panix.com commit 6b1e8ba4bac49d99232026cae7eb8db3d338f9c2 Author: Anup Patel Date: Tue Apr 4 11:55:55 2023 +0530 RISC-V: KVM: Use bitmap for irqs_pending and irqs_pending_mask To support 64 VCPU local interrupts on RV32 host, we should use bitmap for irqs_pending and irqs_pending_mask in struct kvm_vcpu_arch. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit 78f94c082a2f74b78c8b9c779756d8b25317a55a Author: Anup Patel Date: Fri Mar 31 20:06:18 2023 +0530 RISC-V: KVM: Add ONE_REG interface for AIA CSRs We implement ONE_REG interface for AIA CSRs as a separate subtype under the CSR ONE_REG interface. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Reviewed-by: Atish Patra Signed-off-by: Anup Patel commit 7d50dd5012013f7c8e3c3e5d0bed78ba85800934 Author: Anup Patel Date: Fri Mar 31 19:56:56 2023 +0530 RISC-V: KVM: Implement subtype for CSR ONE_REG interface To make the CSR ONE_REG interface extensible, we implement subtype for the CSR ONE_REG IDs. The existing CSR ONE_REG IDs are treated as subtype = 0 (aka General CSRs). Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Reviewed-by: Atish Patra Signed-off-by: Anup Patel commit 54e43320c2ba0c70258a3aea690da38c6ea3293c Author: Anup Patel Date: Tue Jan 10 16:44:25 2023 +0530 RISC-V: KVM: Initial skeletal support for AIA To incrementally implement AIA support, we first add minimal skeletal support which only compiles and detects AIA hardware support at the boot-time but does not provide any functionality. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit e290dbb7f73670e06df7f8ec44c3f502c20707d7 Author: Anup Patel Date: Mon Jan 9 11:55:55 2023 +0530 RISC-V: KVM: Drop the _MASK suffix from hgatp.VMID mask defines The hgatp.VMID mask defines are used before shifting when extracting VMID value from hgatp CSR value so based on the convention followed in the other parts of asm/csr.h, the hgatp.VMID mask defines should not have a _MASK suffix. While we are here, let's use GENMASK() for hgatp.VMID and hgatp.PPN. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Reviewed-by: Atish Patra Signed-off-by: Anup Patel commit 8fe6f7e14c7eeb01c3a1994eba2356400981cb1e Author: Anup Patel Date: Mon Mar 6 12:10:15 2023 +0530 RISC-V: Detect AIA CSRs from ISA string We have two extension names for AIA ISA support: Smaia (M-mode AIA CSRs) and Ssaia (S-mode AIA CSRs). We extend the ISA string parsing to detect Smaia and Ssaia extensions. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Reviewed-by: Atish Patra Reviewed-by: Conor Dooley Signed-off-by: Anup Patel Acked-by: Palmer Dabbelt commit d6f5f6e904be628941eeab7d6ae7d1fb9190c486 Author: Anup Patel Date: Tue Jan 18 11:12:40 2022 +0530 RISC-V: Add AIA related CSR defines The RISC-V AIA specification improves handling per-HART local interrupts in a backward compatible manner. This patch adds defines for new RISC-V AIA CSRs. Signed-off-by: Anup Patel Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Reviewed-by: Atish Patra Signed-off-by: Anup Patel Acked-by: Palmer Dabbelt commit 90deec51d726b4d829ca7a684595154bebdf8353 Author: Anup Patel Date: Sat Apr 1 15:21:34 2023 +0530 RISC-V: KVM: Allow Zbb extension for Guest/VM We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zbb extension for Guest/VM. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit 96b3d4bd93f913440b4cb06233a1ecbc4dd41dad Author: Anup Patel Date: Mon Nov 28 11:43:16 2022 +0530 RISC-V: KVM: Add ONE_REG interface to enable/disable SBI extensions We add ONE_REG interface to enable/disable SBI extensions (just like the ONE_REG interface for ISA extensions). This allows KVM user-space to decide the set of SBI extension enabled for a Guest and by default all SBI extensions are enabled. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit c69daf8bf88c09271a55c65140c8af8fcd565c09 Author: Andrew Jones Date: Wed Mar 22 20:28:57 2023 +0100 RISC-V: KVM: Alphabetize selects While alphabetized lists tend to become unalphabetized almost as quickly as they get fixed up, it is preferred to keep select lists in Kconfigs in order. Let's fix KVM's up. Signed-off-by: Andrew Jones Reviewed-by: Anup Patel Signed-off-by: Anup Patel commit 2ed90cb0938a45b12eb947af062d12c7af0067b3 Author: David Matlack Date: Fri Mar 17 14:11:06 2023 -0700 KVM: RISC-V: Retry fault if vma_lookup() results become invalid Read mmu_invalidate_seq before dropping the mmap_lock so that KVM can detect if the results of vma_lookup() (e.g. vma_shift) become stale before it acquires kvm->mmu_lock. This fixes a theoretical bug where a VMA could be changed by userspace after vma_lookup() and before KVM reads the mmu_invalidate_seq, causing KVM to install page table entries based on a (possibly) no-longer-valid vma_shift. Re-order the MMU cache top-up to earlier in user_mem_abort() so that it is not done after KVM has read mmu_invalidate_seq (i.e. so as to avoid inducing spurious fault retries). It's unlikely that any sane userspace currently modifies VMAs in such a way as to trigger this race. And even with directed testing I was unable to reproduce it. But a sufficiently motivated host userspace might be able to exploit this race. Note KVM/ARM had the same bug and was fixed in a separate, near identical patch (see Link). Link: https://lore.kernel.org/kvm/20230313235454.2964067-1-dmatlack@google.com/ Fixes: 9955371cc014 ("RISC-V: KVM: Implement MMU notifiers") Cc: stable@vger.kernel.org Signed-off-by: David Matlack Tested-by: Anup Patel Signed-off-by: Anup Patel commit 743767d6f6b8f28228be181fe369657f7ecd1eb2 Author: Stephane Eranian Date: Wed Apr 19 14:42:41 2023 -0700 perf/x86/intel/uncore: Add events for Intel SPR IMC PMU Add missing clockticks and cas_count_* events for Intel SapphireRapids IMC PMU. These events are useful to measure memory bandwidth. Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20230419214241.2310385-1-eranian@google.com commit f31dcb152a3d0816e2f1deab4e64572336da197d Author: Aaron Thompson Date: Thu Apr 13 17:50:12 2023 +0000 sched/clock: Fix local_clock() before sched_clock_init() Have local_clock() return sched_clock() if sched_clock_init() has not yet run. sched_clock_cpu() has this check but it was not included in the new noinstr implementation of local_clock(). The effect can be seen on x86 with CONFIG_PRINTK_TIME enabled, for instance. scd->clock quickly reaches the value of TICK_NSEC and that value is returned until sched_clock_init() runs. dmesg without this patch: [ 0.000000] kvm-clock: ... [ 0.000002] kvm-clock: ... [ 0.000672] clocksource: ... [ 0.001000] tsc: ... [ 0.001000] e820: ... [ 0.001000] e820: ... ... [ 0.001000] ..TIMER: ... [ 0.001000] clocksource: ... [ 0.378956] Calibrating delay loop ... [ 0.379955] pid_max: ... dmesg with this patch: [ 0.000000] kvm-clock: ... [ 0.000001] kvm-clock: ... [ 0.000675] clocksource: ... [ 0.002685] tsc: ... [ 0.003331] e820: ... [ 0.004190] e820: ... ... [ 0.421939] ..TIMER: ... [ 0.422842] clocksource: ... [ 0.424582] Calibrating delay loop ... [ 0.425580] pid_max: ... Fixes: 776f22913b8e ("sched/clock: Make local_clock() noinstr") Signed-off-by: Aaron Thompson Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230413175012.2201-1-dev@aaront.org commit feffe5bb274dd3442080ef0e4053746091878799 Author: Schspa Shi Date: Mon Aug 29 01:03:02 2022 +0800 sched/rt: Fix bad task migration for rt tasks Commit 95158a89dd50 ("sched,rt: Use the full cpumask for balancing") allows find_lock_lowest_rq() to pick a task with migration disabled. The purpose of the commit is to push the current running task on the CPU that has the migrate_disable() task away. However, there is a race which allows a migrate_disable() task to be migrated. Consider: CPU0 CPU1 push_rt_task check is_migration_disabled(next_task) task not running and migration_disabled == 0 find_lock_lowest_rq(next_task, rq); _double_lock_balance(this_rq, busiest); raw_spin_rq_unlock(this_rq); double_rq_lock(this_rq, busiest); <> task become running migrate_disable(); deactivate_task(rq, next_task, 0); set_task_cpu(next_task, lowest_rq->cpu); WARN_ON_ONCE(is_migration_disabled(p)); Fixes: 95158a89dd50 ("sched,rt: Use the full cpumask for balancing") Signed-off-by: Schspa Shi Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (Google) Reviewed-by: Dietmar Eggemann Reviewed-by: Valentin Schneider Tested-by: Dwaine Gonyier commit 223baf9d17f25e2608dbdff7232c095c1e612268 Author: Mathieu Desnoyers Date: Thu Apr 20 10:55:48 2023 -0400 sched: Fix performance regression introduced by mm_cid Introduce per-mm/cpu current concurrency id (mm_cid) to fix a PostgreSQL sysbench regression reported by Aaron Lu. Keep track of the currently allocated mm_cid for each mm/cpu rather than freeing them immediately on context switch. This eliminates most atomic operations when context switching back and forth between threads belonging to different memory spaces in multi-threaded scenarios (many processes, each with many threads). The per-mm/per-cpu mm_cid values are serialized by their respective runqueue locks. Thread migration is handled by introducing invocation to sched_mm_cid_migrate_to() (with destination runqueue lock held) in activate_task() for migrating tasks. If the destination cpu's mm_cid is unset, and if the source runqueue is not actively using its mm_cid, then the source cpu's mm_cid is moved to the destination cpu on migration. Introduce a task-work executed periodically, similarly to NUMA work, which delays reclaim of cid values when they are unused for a period of time. Keep track of the allocation time for each per-cpu cid, and let the task work clear them when they are observed to be older than SCHED_MM_CID_PERIOD_NS and unused. This task work also clears all mm_cids which are greater or equal to the Hamming weight of the mm cidmask to keep concurrency ids compact. Because we want to ensure the mm_cid converges towards the smaller values as migrations happen, the prior optimization that was done when context switching between threads belonging to the same mm is removed, because it could delay the lazy release of the destination runqueue mm_cid after it has been replaced by a migration. Removing this prior optimization is not an issue performance-wise because the introduced per-mm/per-cpu mm_cid tracking also covers this more specific case. Fixes: af7f588d8f73 ("sched: Introduce per-memory-map concurrency ID") Reported-by: Aaron Lu Signed-off-by: Mathieu Desnoyers Signed-off-by: Peter Zijlstra (Intel) Tested-by: Aaron Lu Link: https://lore.kernel.org/lkml/20230327080502.GA570847@ziqianlu-desk2/ commit 5a4d3b38ed0cd5bbb03eccea6d9949136abc45c3 Merge: 9b8e17813aecc 6a8f57ae2eb07 Author: Peter Zijlstra Date: Fri Apr 21 13:24:18 2023 +0200 Merge branch 'v6.3-rc7' Sync with the urgent patches; in particular: a53ce18cacb4 ("sched/fair: Sanitize vruntime of entity being migrated") Signed-off-by: Peter Zijlstra commit dfc39d4026fb2432363c0f77543c4cf3adca4c7b Author: Jianfeng Tan Date: Wed Apr 19 15:24:16 2023 +0800 net/packet: support mergeable feature of virtio Packet sockets, like tap, can be used as the backend for kernel vhost. In packet sockets, virtio net header size is currently hardcoded to be the size of struct virtio_net_hdr, which is 10 bytes; however, it is not always the case: some virtio features, such as mrg_rxbuf, need virtio net header to be 12-byte long. Mergeable buffers, as a virtio feature, is worthy of supporting: packets that are larger than one-mbuf size will be dropped in vhost worker's handle_rx if mrg_rxbuf feature is not used, but large packets cannot be avoided and increasing mbuf's size is not economical. With this virtio feature enabled by virtio-user, packet sockets with hardcoded 10-byte virtio net header will parse mac head incorrectly in packet_snd by taking the last two bytes of virtio net header as part of mac header. This incorrect mac header parsing will cause packet to be dropped due to invalid ether head checking in later under-layer device packet receiving. By adding extra field vnet_hdr_sz with utilizing holes in struct packet_sock to record currently used virtio net header size and supporting extra sockopt PACKET_VNET_HDR_SZ to set specified vnet_hdr_sz, packet sockets can know the exact length of virtio net header that virtio user gives. In packet_snd, tpacket_snd and packet_recvmsg, instead of using hardcoded virtio net header size, it can get the exact vnet_hdr_sz from corresponding packet_sock, and parse mac header correctly based on this information to avoid the packets being mistakenly dropped. Signed-off-by: Jianfeng Tan Co-developed-by: Anqi Shen Signed-off-by: Anqi Shen Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 156c93986d940e0c55a9aec8b77387f7bb4eb790 Merge: 35226750f7ab9 45fd01f2fbf11 Author: David S. Miller Date: Fri Apr 21 11:49:47 2023 +0100 Merge branch 'mlx5-ipsec-fixes' Leon Romanovsky says: ==================== Fixes to mlx5 IPsec implementation This small patchset includes various fixes and one refactoring patch which I collected for the features sent in this cycle, with one exception - first patch. First patch fixes code which was introduced in previous cycle, however I was able to trigger FW error only in custom debug code, so don't see a need to send it to net-rc. ==================== Signed-off-by: David S. Miller commit 45fd01f2fbf1119d083931b095ad6d0f13443d0e Author: Leon Romanovsky Date: Thu Apr 20 11:02:51 2023 +0300 net/mlx5e: Refactor duplicated code in mlx5e_ipsec_init_macs ARP discovery code has same logic for RX and TX flows, but with different source and destination fields. Instead of duplicating same code in mlx5e_ipsec_init_macs, let's refactor. Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 94edec448479e302b7c7e18f40cb0d7f32e71682 Author: Leon Romanovsky Date: Thu Apr 20 11:02:50 2023 +0300 net/mlx5e: Properly release work data structure There are some flows in which work structure is not allocated at all and it is needed to be checked prior release of data structure. general protection fault, probably for non-canonical address 0xdffffc000000000a: 0000 [#1] SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000050-0x0000000000000057] CPU: 6 PID: 3486 Comm: kworker/6:0 Not tainted 6.3.0-rc5_for_upstream_debug_2023_04_06_11_01 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Workqueue: events xfrm_state_gc_task RIP: 0010:mlx5e_xfrm_free_state+0x177/0x260 [mlx5_core] Code: c1 ea 03 80 3c 02 00 0f 85 f5 00 00 00 4c 8b a5 08 01 00 00 48 b8 00 00 00 00 00 fc ff df 49 8d 7c 24 50 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 b7 00 00 00 49 8b 7c 24 50 e8 85 7c 09 e0 4c 89 RSP: 0018:ffff888137a8fc50 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: ffff888180398000 RCX: 0000000000000000 RDX: 000000000000000a RSI: ffffffffa1878227 RDI: 0000000000000050 RBP: ffff88812a0c8000 R08: ffff888137a8fb60 R09: 0000000000000000 R10: fffffbfff09aba0c R11: 0000000000000001 R12: 0000000000000000 R13: ffff88812a0c8108 R14: ffffffff84c63480 R15: ffff8881acb63118 FS: 0000000000000000(0000) GS:ffff88881eb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f667e8bc000 CR3: 0000000004693006 CR4: 0000000000370ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ___xfrm_state_destroy+0x3c8/0x5e0 xfrm_state_gc_task+0xf6/0x140 ? ___xfrm_state_destroy+0x5e0/0x5e0 process_one_work+0x7c2/0x1340 ? lockdep_hardirqs_on_prepare+0x3f0/0x3f0 ? pwq_dec_nr_in_flight+0x230/0x230 ? spin_bug+0x1d0/0x1d0 worker_thread+0x59d/0xec0 ? __kthread_parkme+0xd9/0x1d0 ? process_one_work+0x1340/0x1340 kthread+0x28f/0x330 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x1f/0x30 Modules linked in: sch_ingress openvswitch nsh mlx5_vdpa vringh vhost_iotlb vdpa mlx5_ib mlx5_core xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi rdma_cm iw_cm ib_umad ib_ipoib ib_cm ib_uverbs ib_core vfio_pci vfio_pci_core vfio_iommu_type1 vfio cuse overlay zram zsmalloc fuse [last unloaded: mlx5_core] ---[ end trace 0000000000000000 ]--- Fixes: 4562116f8a56 ("net/mlx5e: Generalize IPsec work structs") Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 3198ae7d42af844a7d30f6e432c079c134b03852 Author: Leon Romanovsky Date: Thu Apr 20 11:02:49 2023 +0300 net/mlx5e: Compare all fields in IPv6 address Fix size argument in memcmp to compare whole IPv6 address. Fixes: b3beba1fb404 ("net/mlx5e: Allow policies with reqid 0, to support IKE policy holes") Reviewed-by: Raed Salem Reviewed-by: Emeel Hakim Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 697b3518ebfd1d0ccae455d8ac1ac9c88884f4e5 Author: Leon Romanovsky Date: Thu Apr 20 11:02:48 2023 +0300 net/mlx5e: Don't overwrite extack message returned from IPsec SA validator Addition of new err_xfrm label caused to error messages be overwritten. Fix it by using proper NL_SET_ERR_MSG_WEAK_MOD macro together with change in a default message. Fixes: aa8bd0c9518c ("net/mlx5e: Support IPsec acquire default SA") Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit e239e31ae8026b85e225941eb3f2cd7deb24f0d1 Author: Leon Romanovsky Date: Thu Apr 20 11:02:47 2023 +0300 net/mlx5e: Fix FW error while setting IPsec policy block action When trying to set IPsec policy block action the following error is generated: mlx5_cmd_out_err:803:(pid 3426): SET_FLOW_TABLE_ENTRY(0x936) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0x8708c3), err(-22) This error means that drop action is not allowed when modify action is set, so update the code to skip modify header for XFRM_POLICY_BLOCK action. Fixes: 6721239672fe ("net/mlx5e: Skip IPsec encryption for TX path without matching policy") Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 35226750f7ab9d49140d95bc7d38a2a9b0f4fdfc Author: Yan Wang Date: Wed Apr 19 22:13:46 2023 +0800 net: stmmac:fix system hang when setting up tag_8021q VLAN for DSA ports The system hang because of dsa_tag_8021q_port_setup()-> stmmac_vlan_rx_add_vid(). I found in stmmac_drv_probe() that cailing pm_runtime_put() disabled the clock. First, when the kernel is compiled with CONFIG_PM=y,The stmmac's resume/suspend is active. Secondly,stmmac as DSA master,the dsa_tag_8021q_port_setup() function will callback stmmac_vlan_rx_add_vid when DSA dirver starts. However, The system is hanged for the stmmac_vlan_rx_add_vid() accesses its registers after stmmac's clock is closed. I would suggest adding the pm_runtime_resume_and_get() to the stmmac_vlan_rx_add_vid().This guarantees that resuming clock output while in use. Fixes: b3dcb3127786 ("net: stmmac: correct clocks enabled in stmmac_vlan_rx_kill_vid()") Reviewed-by: Jacob Keller Signed-off-by: Yan Wang Signed-off-by: David S. Miller commit 2d60eca501bc70fc73d30a1b151a137c3b990183 Author: Christophe JAILLET Date: Thu Apr 20 21:19:03 2023 +0200 sh: sq: Use the bitmap API when applicable Using the bitmap API is less verbose than hand writing it. It also improves the semantic. Signed-off-by: Christophe JAILLET Reviewed-by: Geert Uytterhoeven Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/a51e9f32c19a007f4922943282cb12c89064440d.1681671848.git.christophe.jaillet@wanadoo.fr Signed-off-by: John Paul Adrian Glaubitz commit 9f656705c5faa18afb26d922cfc64f9fd103c38d Author: Oswald Buddenhagen Date: Thu Apr 20 13:33:23 2023 +0200 ALSA: pcm: rewrite snd_pcm_playback_silence() The auto-silencer supports two modes: "thresholded" to fill up "just enough", and "top-up" to fill up "as much as possible". The two modes used rather distinct code paths, which this patch unifies. The only remaining distinction is how much we actually want to fill. This fixes a bug in thresholded mode, where we failed to use new_hw_ptr, resulting in under-fill. Top-up mode is now more well-behaved and much easier to understand in corner cases. This also updates comments in the proximity of silencing-related data structures. Signed-off-by: Oswald Buddenhagen Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20230420113324.877164-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 1ea244158a4a20ac686f4d1d46285f3d38d4571f Author: Marc Zyngier Date: Fri Apr 21 10:18:34 2023 +0100 KVM: arm64: Constify start/end/phys fields of the pgtable walker data As we are revamping the way the pgtable walker evaluates some of the data, make it clear that we rely on somew of the fields to be constant across the lifetime of a walk. For this, flag the start, end and phys fields of the walk data as 'const', which will generate an error if we were to accidentally update these fields again. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit 39bc95be3782ba88e55cd72e830f37e74395831b Author: Oliver Upton Date: Fri Apr 21 07:16:06 2023 +0000 KVM: arm64: Infer PA offset from VA in hyp map walker Similar to the recently fixed stage-2 walker, the hyp map walker increments the PA and VA of a walk separately. Unlike stage-2, there is no bug here as the map walker has exclusive access to the stage-1 page tables. Nonetheless, in the interest of continuity throughout the page table code, tweak the hyp map walker to avoid incrementing the PA and instead use the VA as the authoritative source of how far along a table walk has gotten. Calculate the PA to use for a leaf PTE by adding the offset of the VA from the start of the walk to the starting PA. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230421071606.1603916-3-oliver.upton@linux.dev commit 1f0f4a2ef7a5693b135ce174e71f116db4bd684d Author: Oliver Upton Date: Fri Apr 21 07:16:05 2023 +0000 KVM: arm64: Infer the PA offset from IPA in stage-2 map walker Until now, the page table walker counted increments to the PA and IPA of a walk in two separate places. While the PA is incremented as soon as a leaf PTE is installed in stage2_map_walker_try_leaf(), the IPA is actually bumped in the generic table walker context. Critically, __kvm_pgtable_visit() rereads the PTE after the LEAF callback returns to work out if a table or leaf was installed, and only bumps the IPA for a leaf PTE. This arrangement worked fine when we handled faults behind the write lock, as the walker had exclusive access to the stage-2 page tables. However, commit 1577cb5823ce ("KVM: arm64: Handle stage-2 faults in parallel") started handling all stage-2 faults behind the read lock, opening up a race where a walker could increment the PA but not the IPA of a walk. Nothing good ensues, as the walker starts mapping with the incorrect IPA -> PA relationship. For example, assume that two vCPUs took a data abort on the same IPA. One observes that dirty logging is disabled, and the other observed that it is enabled: vCPU attempting PMD mapping vCPU attempting PTE mapping ====================================== ===================================== /* install PMD */ stage2_make_pte(ctx, leaf); data->phys += granule; /* replace PMD with a table */ stage2_try_break_pte(ctx, data->mmu); stage2_make_pte(ctx, table); /* table is observed */ ctx.old = READ_ONCE(*ptep); table = kvm_pte_table(ctx.old, level); /* * map walk continues w/o incrementing * IPA. */ __kvm_pgtable_walk(..., level + 1); Bring an end to the whole mess by using the IPA as the single source of truth for how far along a walk has gotten. Work out the correct PA to map by calculating the IPA offset from the beginning of the walk and add that to the starting physical address. Cc: stable@vger.kernel.org Fixes: 1577cb5823ce ("KVM: arm64: Handle stage-2 faults in parallel") Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230421071606.1603916-2-oliver.upton@linux.dev commit b7badd752de05312fdb1aeb388480f706d0c087f Author: Hans Verkuil Date: Thu Apr 20 14:47:05 2023 +0200 pinctrl-bcm2835.c: fix race condition when setting gpio dir In the past setting the pin direction called pinctrl_gpio_direction() which uses a mutex to serialize this. That was changed to set the direction directly in the pin controller driver, but that lost the serialization mechanism. Since the direction of multiple pins are in the same register you can have a race condition, something that was in fact observed with the cec-gpio driver. Add a new spinlock to serialize writing to the FSEL registers. Signed-off-by: Hans Verkuil Fixes: 1a4541b68e25 ("pinctrl-bcm2835: don't call pinctrl_gpio_direction()") Link: https://lore.kernel.org/r/4302b66b-ca20-0f19-d2aa-ee8661118863@xs4all.nl Signed-off-by: Linus Walleij commit b19a1d8f1dbd2410eaa2f4a5f7680197e2647c94 Author: Rob Herring Date: Tue Apr 18 10:06:13 2023 -0500 dt-bindings: pinctrl: qcom,sm8150: Drop duplicate function value "atest_usb2" The enum value "atest_usb2" appears twice. Remove the duplicate. The meta-schema normally catches these, but schemas under "$defs" was not getting checked. A fix for that is pending. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230418150613.1528233-1-robh@kernel.org Signed-off-by: Linus Walleij commit 36fe1b29b3cae48f781011abd5a0b9e938f5b35f Merge: 6dcf7316e05ec bcf3e7da3ad3b Author: Marc Zyngier Date: Fri Apr 21 09:44:58 2023 +0100 Merge branch kvm-arm64/spec-ptw into kvmarm-master/next * kvm-arm64/spec-ptw: : . : On taking an exception from EL1&0 to EL2(&0), the page table walker is : allowed to carry on with speculative walks started from EL1&0 while : running at EL2 (see R_LFHQG). Given that the PTW may be actively using : the EL1&0 system registers, the only safe way to deal with it is to : issue a DSB before changing any of it. : : We already did the right thing for SPE and TRBE, but ignored the PTW : for unknown reasons (probably because the architecture wasn't crystal : clear at the time). : : This requires a bit of surgery in the nvhe code, though most of these : patches are comments so that my future self can understand the purpose : of these barriers. The VHE code is largely unaffected, thanks to the : DSB in the context switch. : . KVM: arm64: vhe: Drop extra isb() on guest exit KVM: arm64: vhe: Synchronise with page table walker on MMU update KVM: arm64: pkvm: Document the side effects of kvm_flush_dcache_to_poc() KVM: arm64: nvhe: Synchronise with page table walker on TLBI KVM: arm64: nvhe: Synchronise with page table walker on vcpu run Signed-off-by: Marc Zyngier commit 6dcf7316e05eccded11fc640813c8a8879f271a6 Merge: 367eb095b841a c5284f6d8ce2b Author: Marc Zyngier Date: Fri Apr 21 09:43:38 2023 +0100 Merge branch kvm-arm64/smccc-filtering into kvmarm-master/next * kvm-arm64/smccc-filtering: : . : SMCCC call filtering and forwarding to userspace, courtesy of : Oliver Upton. From the cover letter: : : "The Arm SMCCC is rather prescriptive in regards to the allocation of : SMCCC function ID ranges. Many of the hypercall ranges have an : associated specification from Arm (FF-A, PSCI, SDEI, etc.) with some : room for vendor-specific implementations. : : The ever-expanding SMCCC surface leaves a lot of work within KVM for : providing new features. Furthermore, KVM implements its own : vendor-specific ABI, with little room for other implementations (like : Hyper-V, for example). Rather than cramming it all into the kernel we : should provide a way for userspace to handle hypercalls." : . KVM: selftests: Fix spelling mistake "KVM_HYPERCAL_EXIT_SMC" -> "KVM_HYPERCALL_EXIT_SMC" KVM: arm64: Test that SMC64 arch calls are reserved KVM: arm64: Prevent userspace from handling SMC64 arch range KVM: arm64: Expose SMC/HVC width to userspace KVM: selftests: Add test for SMCCC filter KVM: selftests: Add a helper for SMCCC calls with SMC instruction KVM: arm64: Let errors from SMCCC emulation to reach userspace KVM: arm64: Return NOT_SUPPORTED to guest for unknown PSCI version KVM: arm64: Introduce support for userspace SMCCC filtering KVM: arm64: Add support for KVM_EXIT_HYPERCALL KVM: arm64: Use a maple tree to represent the SMCCC filter KVM: arm64: Refactor hvc filtering to support different actions KVM: arm64: Start handling SMCs from EL1 KVM: arm64: Rename SMC/HVC call handler to reflect reality KVM: arm64: Add vm fd device attribute accessors KVM: arm64: Add a helper to check if a VM has ran once KVM: x86: Redefine 'longmode' as a flag for KVM_EXIT_HYPERCALL Signed-off-by: Marc Zyngier commit 367eb095b841a1af8a4a1425021ac43159049dcd Merge: e2e321a7d663a 767cc0501bbb5 Author: Marc Zyngier Date: Fri Apr 21 09:39:07 2023 +0100 Merge branch kvm-arm64/selftest/misc-6.4 into kvmarm-master/next * kvm-arm64/selftest/misc-6.4: : . : Misc selftest updates for 6.4 : : - Add comments for recently added ID registers : . KVM: selftests: Comment newly defined aarch64 ID registers Signed-off-by: Marc Zyngier commit d59655d3c014fd08896b01a4602bbd8ee67db944 Author: Devi Priya Date: Mon Apr 17 11:43:37 2023 +0530 dt-bindings: pinctrl: qcom: Add few missing functions Added the missing functions cri_trng2, gpio and removed the duplicate entry qdss_tracedata_b Fixes: 5b63ccb69ee8 ("dt-bindings: pinctrl: qcom: Add support for IPQ9574") Acked-by: Krzysztof Kozlowski Signed-off-by: Devi Priya Link: https://lore.kernel.org/r/20230417061337.6552-1-quic_devipriy@quicinc.com Signed-off-by: Linus Walleij commit e2e321a7d663acd964e2fcdafbf5c9f5a36d55a5 Merge: b22498c4846b5 e17071754cf50 Author: Marc Zyngier Date: Fri Apr 21 09:37:36 2023 +0100 Merge branch kvm-arm64/selftest/lpa into kvmarm-master/next * kvm-arm64/selftest/lpa: : . : Selftest fixes addressing PTE and TTBR0_EL1 encodings for : 52bit PAs : . KVM: selftests: arm64: Fix ttbr0_el1 encoding for PA bits > 48 KVM: selftests: arm64: Fix pte encode/decode for PA bits > 48 KVM: selftests: Fixup config fragment for access_tracking_perf_test Signed-off-by: Marc Zyngier commit b22498c4846b52a5df2cc821d97c4049df0cf67a Merge: ef5f97e9de9fc a6610435ac17d Author: Marc Zyngier Date: Fri Apr 21 09:31:17 2023 +0100 Merge branch kvm-arm64/timer-vm-offsets into kvmarm-master/next * kvm-arm64/timer-vm-offsets: (21 commits) : . : This series aims at satisfying multiple goals: : : - allow a VMM to atomically restore a timer offset for a whole VM : instead of updating the offset each time a vcpu get its counter : written : : - allow a VMM to save/restore the physical timer context, something : that we cannot do at the moment due to the lack of offsetting : : - provide a framework that is suitable for NV support, where we get : both global and per timer, per vcpu offsetting, and manage : interrupts in a less braindead way. : : Conflict resolution involves using the new per-vcpu config lock instead : of the home-grown timer lock. : . KVM: arm64: Handle 32bit CNTPCTSS traps KVM: arm64: selftests: Augment existing timer test to handle variable offset KVM: arm64: selftests: Deal with spurious timer interrupts KVM: arm64: selftests: Add physical timer registers to the sysreg list KVM: arm64: nv: timers: Support hyp timer emulation KVM: arm64: nv: timers: Add a per-timer, per-vcpu offset KVM: arm64: Document KVM_ARM_SET_CNT_OFFSETS and co KVM: arm64: timers: Abstract the number of valid timers per vcpu KVM: arm64: timers: Fast-track CNTPCT_EL0 trap handling KVM: arm64: Elide kern_hyp_va() in VHE-specific parts of the hypervisor KVM: arm64: timers: Move the timer IRQs into arch_timer_vm_data KVM: arm64: timers: Abstract per-timer IRQ access KVM: arm64: timers: Rationalise per-vcpu timer init KVM: arm64: timers: Allow save/restoring of the physical timer KVM: arm64: timers: Allow userspace to set the global counter offset KVM: arm64: Expose {un,}lock_all_vcpus() to the rest of KVM KVM: arm64: timers: Allow physical offset without CNTPOFF_EL2 KVM: arm64: timers: Use CNTPOFF_EL2 to offset the physical timer arm64: Add HAS_ECV_CNTPOFF capability arm64: Add CNTPOFF_EL2 register definition ... Signed-off-by: Marc Zyngier commit ef5f97e9de9fc0d5bb6136de3d01d78c072a452f Merge: 197b6b60ae7bc a189884bdc923 Author: Marc Zyngier Date: Fri Apr 21 09:30:46 2023 +0100 Merge branch kvm-arm64/lock-inversion into kvmarm-master/next * kvm-arm64/lock-inversion: : . : vm/vcpu lock inversion fixes, courtesy of Oliver Upton, plus a few : extra fixes from both Oliver and Reiji Watanabe. : : From the initial cover letter: : : As it so happens, lock ordering in KVM/arm64 is completely backwards. : There's a significant amount of VM-wide state that needs to be accessed : from the context of a vCPU. Until now, this was accomplished by : acquiring the kvm->lock, but that cannot be nested within vcpu->mutex. : : This series fixes the issue with some fine-grained locking for MP state : and a new, dedicated mutex that can nest with both kvm->lock and : vcpu->mutex. : . KVM: arm64: Have kvm_psci_vcpu_on() use WRITE_ONCE() to update mp_state KVM: arm64: Acquire mp_state_lock in kvm_arch_vcpu_ioctl_vcpu_init() KVM: arm64: vgic: Don't acquire its_lock before config_lock KVM: arm64: Use config_lock to protect vgic state KVM: arm64: Use config_lock to protect data ordered against KVM_RUN KVM: arm64: Avoid lock inversion when setting the VM register width KVM: arm64: Avoid vcpu->mutex v. kvm->lock inversion in CPU_ON Signed-off-by: Marc Zyngier commit 7abf7f88df456a373ce34c05a54068574f6fbfef Author: Luca Weiss Date: Tue Apr 18 18:43:18 2023 +0200 pinctrl: qcom: spmi-gpio: Add PMI632 support Add support for the 8 GPIOs found on PMI632. Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230414-pmi632-v2-2-98bafa909c36@z3ntu.xyz Signed-off-by: Linus Walleij commit 4b648d94946618c7efee21227a5d646cec3335c3 Author: Luca Weiss Date: Tue Apr 18 18:43:17 2023 +0200 dt-bindings: pinctrl: qcom,pmic-gpio: add PMI632 Document the 8 GPIOs found on PMI632. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230414-pmi632-v2-1-98bafa909c36@z3ntu.xyz Signed-off-by: Linus Walleij commit f9a5502f8ee3d2bc4403f561f0037c920ca35e6d Author: Jonathan Neuschäfer Date: Wed Apr 12 20:50:49 2023 +0200 pinctrl: wpcm450: select MFD_SYSCON The pinctrl-wpcm450 driver relies on MFD_SYSCON functionality in order to find some of its MMIO registers. Select MFD_SYSCON from PINCTRL_WPCM450 to ensure that it's enabled. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20230412185049.3782842-1-j.neuschaefer@gmx.net Signed-off-by: Linus Walleij commit aaee8c7f2a17d2dd015dc97c113c9ea0cc97272a Author: Simon Horman Date: Fri Apr 21 09:11:49 2023 +0200 m68k: kexec: Include Include reboot.h in machine_kexec.c for declaration of machine_crash_shutdown and machine_shutdown. gcc-12 with W=1 reports: arch/m68k/kernel/machine_kexec.c:26:6: warning: no previous prototype for 'machine_shutdown' [-Wmissing-prototypes] 26 | void machine_shutdown(void) | ^~~~~~~~~~~~~~~~ arch/m68k/kernel/machine_kexec.c:30:6: warning: no previous prototype for 'machine_crash_shutdown' [-Wmissing-prototypes] 30 | void machine_crash_shutdown(struct pt_regs *regs) | ^~~~~~~~~~~~~~~~~~~~~~ No functional changes intended. Compile tested only. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230421-m68k-kexec-include-reboot-v1-1-7552963a0f25@kernel.org Signed-off-by: Geert Uytterhoeven commit c8687694bb1f5c48134f152f8c5c2e53483eb99d Author: Sui Jingfeng Date: Thu Apr 20 11:05:00 2023 +0800 drm/fbdev-generic: prohibit potential out-of-bounds access The fbdev test of IGT may write after EOF, which lead to out-of-bound access for drm drivers with fbdev-generic. For example, run fbdev test on a x86+ast2400 platform, with 1680x1050 resolution, will cause the linux kernel hang with the following call trace: Oops: 0000 [#1] PREEMPT SMP PTI [IGT] fbdev: starting subtest eof Workqueue: events drm_fb_helper_damage_work [drm_kms_helper] [IGT] fbdev: starting subtest nullptr RIP: 0010:memcpy_erms+0xa/0x20 RSP: 0018:ffffa17d40167d98 EFLAGS: 00010246 RAX: ffffa17d4eb7fa80 RBX: ffffa17d40e0aa80 RCX: 00000000000014c0 RDX: 0000000000001a40 RSI: ffffa17d40e0b000 RDI: ffffa17d4eb80000 RBP: ffffa17d40167e20 R08: 0000000000000000 R09: ffff89522ecff8c0 R10: ffffa17d4e4c5000 R11: 0000000000000000 R12: ffffa17d4eb7fa80 R13: 0000000000001a40 R14: 000000000000041a R15: ffffa17d40167e30 FS: 0000000000000000(0000) GS:ffff895257380000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffa17d40e0b000 CR3: 00000001eaeca006 CR4: 00000000001706e0 Call Trace: ? drm_fbdev_generic_helper_fb_dirty+0x207/0x330 [drm_kms_helper] drm_fb_helper_damage_work+0x8f/0x170 [drm_kms_helper] process_one_work+0x21f/0x430 worker_thread+0x4e/0x3c0 ? __pfx_worker_thread+0x10/0x10 kthread+0xf4/0x120 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2c/0x50 CR2: ffffa17d40e0b000 ---[ end trace 0000000000000000 ]--- The is because damage rectangles computed by drm_fb_helper_memory_range_to_clip() function is not guaranteed to be bound in the screen's active display area. Possible reasons are: 1) Buffers are allocated in the granularity of page size, for mmap system call support. The shadow screen buffer consumed by fbdev emulation may also choosed be page size aligned. 2) The DIV_ROUND_UP() used in drm_fb_helper_memory_range_to_clip() will introduce off-by-one error. For example, on a 16KB page size system, in order to store a 1920x1080 XRGB framebuffer, we need allocate 507 pages. Unfortunately, the size 1920*1080*4 can not be divided exactly by 16KB. 1920 * 1080 * 4 = 8294400 bytes 506 * 16 * 1024 = 8290304 bytes 507 * 16 * 1024 = 8306688 bytes line_length = 1920*4 = 7680 bytes 507 * 16 * 1024 / 7680 = 1081.6 off / line_length = 507 * 16 * 1024 / 7680 = 1081 DIV_ROUND_UP(507 * 16 * 1024, 7680) will yeild 1082 memcpy_toio() typically issue the copy line by line, when copy the last line, out-of-bound access will be happen. Because: 1082 * line_length = 1082 * 7680 = 8309760, and 8309760 > 8306688 Note that userspace may still write to the invisiable area if a larger buffer than width x stride is exposed. But it is not a big issue as long as there still have memory resolve the access if not drafting so far. - Also limit the y1 (Daniel) - keep fix patch it to minimal (Daniel) - screen_size is page size aligned because of it need mmap (Thomas) - Adding fixes tag (Thomas) Signed-off-by: Sui Jingfeng Fixes: aa15c677cc34 ("drm/fb-helper: Fix vertical damage clipping") Reviewed-by: Thomas Zimmermann Tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/dri-devel/ad44df29-3241-0d9e-e708-b0338bf3c623@189.cn/ Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230420030500.1578756-1-suijingfeng@loongson.cn commit 4327a6137ed43a091d900b1ac833345d60f32228 Author: Jammy Huang Date: Fri Apr 21 08:33:54 2023 +0800 drm/ast: Fix ARM compatibility ARM architecture only has 'memory', so all devices are accessed by MMIO if possible. Signed-off-by: Jammy Huang Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230421003354.27767-1-jammy_huang@aspeedtech.com commit d8bb382419230cf626a527eeb55efae0c56039fb Merge: 25c800b210587 ddbcb22055d13 Author: David S. Miller Date: Fri Apr 21 08:29:14 2023 +0100 Merge branch 'pds_core' Shannon Nelson says: ==================== pds_core driver Summary: -------- This patchset implements a new driver for use with the AMD/Pensando Distributed Services Card (DSC), intended to provide core configuration services through the auxiliary_bus and through a couple of EXPORTed functions for use initially in VFio and vDPA feature specific drivers. To keep this patchset to a manageable size, the pds_vdpa and pds_vfio drivers have been split out into their own patchsets to be reviewed separately. Detail: ------- AMD/Pensando is making available a new set of devices for supporting vDPA, VFio, and potentially other features in the Distributed Services Card (DSC). These features are implemented through a PF that serves as a Core device for controlling and configuring its VF devices. These VF devices have separate drivers that use the auxiliary_bus to work through the Core device as the control path. Currently, the DSC supports standard ethernet operations using the ionic driver. This is not replaced by the Core-based devices - these new devices are in addition to the existing Ethernet device. Typical DSC configurations will include both PDS devices and Ionic Eth devices. However, there is a potential future path for ethernet services to come through this device as well. The Core device is a new PCI PF/VF device managed by a new driver 'pds_core'. The PF device has access to an admin queue for configuring the services used by the VFs, and sets up auxiliary_bus devices for each vDPA VF for communicating with the drivers for the vDPA devices. The VFs may be for VFio or vDPA, and other services in the future; these VF types are selected as part of the DSC internal FW configurations, which is out of the scope of this patchset. When the vDPA support set is enabled in the core PF through its devlink param, auxiliary_bus devices are created for each VF that supports the feature. The vDPA driver then connects to and uses this auxiliary_device to do control path configuration through the PF device. This can then be used with the vdpa kernel module to provide devices for virtio_vdpa kernel module for host interfaces, or vhost_vdpa kernel module for interfaces exported into your favorite VM. A cheap ASCII diagram of a vDPA instance looks something like this: ,----------. | vdpa | '----------' | || ctl data | || .----------. || | pds_vdpa | || '----------' || | || pds_core.vDPA.1 || | || .---------------. || | pds_core | || '---------------' || || || || 09:00.0 09:00.1 == PCI ============================================ || || .----------. .----------. ,------| PF |---| VF |-------, | '----------' '----------' | | DSC | | | ------------------------------------------ Changes: v11: - change strncpy to strscpy Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304181137.WaZTYyAa-lkp@intel.com/ v10: Link: https://lore.kernel.org/netdev/20230418003228.28234-1-shannon.nelson@amd.com/ - remove CONFIG_DEBUG_FS guard static inline stuff - remove unnecessary 0 and null initializations - verify in driver load that PDS_CORE_DRV_NAME matches KBUILD_MODNAME - remove debugfs irqs_show(), redundant with /proc - return -ENOMEM if intr_info = kcalloc() fails - move the status code enum into pds_core_if.h as part of API definition - fix up one place in pdsc_devcmd_wait() we're using the status codes where we could use the errno - remove redundant calls to flush_workqueue() - grab config_lock before testing state bits in pdsc_fw_reporter_diagnose() - change pdsc_color_match() to return bool - remove useless VIF setup loop and just setup vDPA services for now - remove pf pointer from struct padev and have clients use pci_physfn() - drop use of "vf" in auxdev.c function names, make more generic - remove last of client ops struct and simply export the functions - drop drivers@pensando.io from MAINTAINERS and add new include dir - include dynamic_debug.h in adminq.c to protect dynamic_hex_dump() - fixed fw_slot type from u8 to int for handling error returns - fixed comment spelling - changed void arg in pdsc_adminq_post() to struct pdsc * v9: Link: https://lore.kernel.org/netdev/20230406234143.11318-1-shannon.nelson@amd.com/ - change pdsc field name id to uid to clarify the unique id used for aux device - remove unnecessary pf->state and other checks in aux device creation - hardcode fw slotnames for devlink info, don't use strings from FW - handle errors from PDS_CORE_CMD_INIT devcmd call - tighten up health thread use of config_lock - remove pdsc_queue_health_check() layer over queuing health check - start pds_core.rst file in first patch, add to it incrementally - give more user interaction info in commit messages - removed a few more extraneous includes v8: Link: https://lore.kernel.org/netdev/20230330234628.14627-1-shannon.nelson@amd.com/ - fixed deadlock problem, use devl_health_reporter_destroy() when devlink is locked - don't clear client_id until after auxiliary_device_uninit() v7: Link: https://lore.kernel.org/netdev/20230330192313.62018-1-shannon.nelson@amd.com/ - use explicit devlink locking and devl_* APIs - move some of devlink setup logic into probe and remove - use debugfs_create_u{type}() for state and queue head and tail - add include for linux/vmalloc.h Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303260420.Tgq0qobF-lkp@intel.com/ v6: Link: https://lore.kernel.org/netdev/20230324190243.27722-1-shannon.nelson@amd.com/ - removed version.h include noticed by kernel test robot's version check Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303230742.pX3ply0t-lkp@intel.com/ - fixed up the more egregious checkpatch line length complaints - make sure pdsc_auxbus_dev_register() checks padev pointer errcode v5: Link: https://lore.kernel.org/netdev/20230322185626.38758-1-shannon.nelson@amd.com/ - added devlink health reporter for FW issues - removed asic_type, asic_rev, serial_num, fw_version from debugfs as they are available through other means - trimed OS info in pdsc_identify(), we don't need to send that much info to the FW - removed reg/unreg from auxbus client API, they are now in the core when VF is started - removed need for pdsc definition in client by simplifying the padev to only carry struct pci_dev pointers rather than full struct pdsc to the pf and vf - removed the unused pdsc argument in pdsc_notify() - moved include/linux/pds/pds_core.h to driver/../pds_core/core.h - restored a few pds_core_if.h interface values and structs that are shared with FW source - moved final config_lock unlock to before tear down of timer and workqueue to be sure there are no deadlocks while waiting for any stragglers - changed use of PAGE_SIZE to local PDS_PAGE_SIZE to keep with FW layout needs without regard to kernel PAGE_SIZE configuration - removed the redundant *adminqcq argument from pdsc_adminq_post() v4: Link: https://lore.kernel.org/netdev/20230308051310.12544-1-shannon.nelson@amd.com/ - reworked to attach to both Core PF and vDPA VF PCI devices - now creates auxiliary_device as part of each VF PCI probe, removes them on PCI remove - auxiliary devices now use simple unique id rather than PCI address for identifier - replaced home-grown event publishing with kernel-based notifier service - dropped live_migration parameter, not needed when not creating aux device for it - replaced devm_* functions with traditional interfaces - added MAINTAINERS entry - removed lingering traces of set/get_vf attribute adminq commands - trimmed some include lists - cleaned a kernel test robot complaint about a stray unused variable Link: https://lore.kernel.org/oe-kbuild-all/202302181049.yeUQMeWY-lkp@intel.com/ v3: Link: https://lore.kernel.org/netdev/20230217225558.19837-1-shannon.nelson@amd.com/ - changed names from "pensando" to "amd" and updated copyright strings - dropped the DEVLINK_PARAM_GENERIC_ID_FW_BANK for future development - changed the auxiliary device creation to be triggered by the PCI bus event BOUND_DRIVER, and torn down at UNBIND_DRIVER in order to properly handle users using the sysfs bind/unbind functions - dropped some noisy log messages - rebased to current net-next RFC to v2: Link: https://lore.kernel.org/netdev/20221207004443.33779-1-shannon.nelson@amd.com/ - added separate devlink param patches for DEVLINK_PARAM_GENERIC_ID_ENABLE_MIGRATION and DEVLINK_PARAM_GENERIC_ID_FW_BANK, and dropped the driver specific implementations - updated descriptions for the new devlink parameters - dropped netdev support - dropped vDPA patches, will followup later - separated fw update and fw bank select into their own patches RFC: Link: https://lore.kernel.org/netdev/20221118225656.48309-1-snelson@pensando.io/ ==================== Signed-off-by: David S. Miller commit ddbcb22055d136f58841c73ca2226dab79eb6101 Author: Shannon Nelson Date: Wed Apr 19 10:04:27 2023 -0700 pds_core: Kconfig and pds_core.rst Remaining documentation and Kconfig hook for building the driver. Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit d24c28278a01dc4c80d1470533c667cf406f0e88 Author: Shannon Nelson Date: Wed Apr 19 10:04:26 2023 -0700 pds_core: publish events to the clients When the Core device gets an event from the device, or notices the device FW to be up or down, it needs to send those events on to the clients that have an event handler. Add the code to pass along the events to the clients. The entry points pdsc_register_notify() and pdsc_unregister_notify() are EXPORTed for other drivers that want to listen for these events. Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 10659034c622738bc1bfab8a76fc576c52d5acce Author: Shannon Nelson Date: Wed Apr 19 10:04:25 2023 -0700 pds_core: add the aux client API Add the client API operations for running adminq commands. The core registers the client with the FW, then the client has a context for requesting adminq services. We expect to add additional operations for other clients, including requesting additional private adminqs and IRQs, but don't have the need yet. Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 40ced89445364baa8620e92fba5b3fff8d9742b9 Author: Shannon Nelson Date: Wed Apr 19 10:04:24 2023 -0700 pds_core: devlink params for enabling VIF support Add the devlink parameter switches so the user can enable the features supported by the VFs. The only feature supported at the moment is vDPA. Example: devlink dev param set pci/0000:2b:00.0 \ name enable_vnet cmode runtime value true Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4569cce43bc61e4cdd76597a1cf9b608846c18cc Author: Shannon Nelson Date: Wed Apr 19 10:04:23 2023 -0700 pds_core: add auxiliary_bus devices An auxiliary_bus device is created for each vDPA type VF at VF probe and destroyed at VF remove. The aux device name comes from the driver name + VIF type + the unique id assigned at PCI probe. The VFs are always removed on PF remove, so there should be no issues with VFs trying to access missing PF structures. The auxiliary_device names will look like "pds_core.vDPA.nn" where 'nn' is the VF's uid. Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit f53d93110aa526ad3df628ad6d9f672c7d5ae285 Author: Shannon Nelson Date: Wed Apr 19 10:04:22 2023 -0700 pds_core: add initial VF device handling This is the initial VF PCI driver framework for the new pds_vdpa VF device, which will work in conjunction with an auxiliary_bus client of the pds_core driver. This does the very basics of registering for the new VF device, setting up debugfs entries, and registering with devlink. Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 65e0185ad764d2801811bb2e7c122e92557208c4 Author: Shannon Nelson Date: Wed Apr 19 10:04:21 2023 -0700 pds_core: set up the VIF definitions and defaults The Virtual Interfaces (VIFs) supported by the DSC's configuration (vDPA, Eth, RDMA, etc) are reported in the dev_ident struct and made visible in debugfs. At this point only vDPA is supported in this driver so we only setup devices for that feature. Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 49ce92fbee0b6bb8066dddf37489483b3b6b5c25 Author: Shannon Nelson Date: Wed Apr 19 10:04:20 2023 -0700 pds_core: add FW update feature to devlink Add in the support for doing firmware updates. Of the two main banks available, a and b, this updates the one not in use and then selects it for the next boot. Example: devlink dev flash pci/0000:b2:00.0 \ file pensando/dsc_fw_1.63.0-22.tar Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 01ba61b55b2041a39c54aefb3153c770dd59a0ef Author: Shannon Nelson Date: Wed Apr 19 10:04:19 2023 -0700 pds_core: Add adminq processing and commands Add the service routines for submitting and processing the adminq messages and for handling notifyq events. Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 45d76f492938cdc27ddadc16e1e75103f4cfbf56 Author: Shannon Nelson Date: Wed Apr 19 10:04:18 2023 -0700 pds_core: set up device and adminq Set up the basic adminq and notifyq queue structures. These are used mostly by the client drivers for feature configuration. These are essentially the same adminq and notifyq as in the ionic driver. Part of this includes querying for device identity and FW information, so we can make that available to devlink dev info. $ devlink dev info pci/0000:b5:00.0 pci/0000:b5:00.0: driver pds_core serial_number FLM18420073 versions: fixed: asic.id 0x0 asic.rev 0x0 running: fw 1.51.0-73 stored: fw.goldfw 1.15.9-C-22 fw.mainfwa 1.60.0-73 fw.mainfwb 1.60.0-57 Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 25b450c05a49e34f2d08ac469ae19d7651abc57c Author: Shannon Nelson Date: Wed Apr 19 10:04:17 2023 -0700 pds_core: add devlink health facilities Add devlink health reporting on top of our fw watchdog. Example: # devlink health show pci/0000:2b:00.0 reporter fw pci/0000:2b:00.0: reporter fw state healthy error 0 recover 0 # devlink health diagnose pci/0000:2b:00.0 reporter fw Status: healthy State: 1 Generation: 0 Recoveries: 0 Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit c2dbb0904310362aaff213e8c877e655c745d0d1 Author: Shannon Nelson Date: Wed Apr 19 10:04:16 2023 -0700 pds_core: health timer and workqueue Add in the periodic health check and the related workqueue, as well as the handlers for when a FW reset is seen. The firmware is polled every 5 seconds to be sure that it is still alive and that the FW generation didn't change. The alive check looks to see that the PCI bus is still readable and the fw_status still has the RUNNING bit on. If not alive, the driver stops activity and tears things down. When the FW recovers and the alive check again succeeds, the driver sets back up for activity. The generation check looks at the fw_generation to see if it has changed, which can happen if the FW crashed and recovered or was updated in between health checks. If changed, the driver counts that as though the alive test failed and forces the fw_down/fw_up cycle. Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 523847df1b3718d6286dce0ed1c83742fe0ffa94 Author: Shannon Nelson Date: Wed Apr 19 10:04:15 2023 -0700 pds_core: add devcmd device interfaces The devcmd interface is the basic connection to the device through the PCI BAR for low level identification and command services. This does the early device initialization and finds the identity data, and adds devcmd routines to be used by later driver bits. Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 55435ea7729accb5b8a330de751836c4be524834 Author: Shannon Nelson Date: Wed Apr 19 10:04:14 2023 -0700 pds_core: initial framework for pds_core PF driver This is the initial PCI driver framework for the new pds_core device driver and its family of devices. This does the very basics of registering for the new PF PCI device 1dd8:100c, setting up debugfs entries, and registering with devlink. Signed-off-by: Shannon Nelson Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 25c800b210587801a55d1b667059e5ae388a5edb Merge: 1cf3fe1c3726a 7648ac72dcd7e Author: David S. Miller Date: Fri Apr 21 08:25:51 2023 +0100 Merge branch 'bridge-neigh-suppression' Ido Schimmel says: ==================== bridge: Add per-{Port, VLAN} neighbor suppression Background ========== In order to minimize the flooding of ARP and ND messages in the VXLAN network, EVPN includes provisions [1] that allow participating VTEPs to suppress such messages in case they know the MAC-IP binding and can reply on behalf of the remote host. In Linux, the above is implemented in the bridge driver using a per-port option called "neigh_suppress" that was added in kernel version 4.15 [2]. Motivation ========== Some applications use ARP messages as keepalives between the application nodes in the network. This works perfectly well when two nodes are connected to the same VTEP. When a node goes down it will stop responding to ARP requests and the other node will notice it immediately. However, when the two nodes are connected to different VTEPs and neighbor suppression is enabled, the local VTEP will reply to ARP requests even after the remote node went down, until certain timers expire and the EVPN control plane decides to withdraw the MAC/IP Advertisement route for the address. Therefore, some users would like to be able to disable neighbor suppression on VLANs where such applications reside and keep it enabled on the rest. Implementation ============== The proposed solution is to allow user space to control neighbor suppression on a per-{Port, VLAN} basis, in a similar fashion to other per-port options that gained per-{Port, VLAN} counterparts such as "mcast_router". This allows users to benefit from the operational simplicity and scalability associated with shared VXLAN devices (i.e., external / collect-metadata mode), while still allowing for per-VLAN/VNI neighbor suppression control. The user interface is extended with a new "neigh_vlan_suppress" bridge port option that allows user space to enable per-{Port, VLAN} neighbor suppression on the bridge port. When enabled, the existing "neigh_suppress" option has no effect and neighbor suppression is controlled using a new "neigh_suppress" VLAN option. Example usage: # bridge link set dev vxlan0 neigh_vlan_suppress on # bridge vlan add vid 10 dev vxlan0 # bridge vlan set vid 10 dev vxlan0 neigh_suppress on Testing ======= Tested using existing bridge selftests. Added a dedicated selftest in the last patch. Patchset overview ================= Patches #1-#5 are preparations. Patch #6 adds per-{Port, VLAN} neighbor suppression support to the bridge's data path. Patches #7-#8 add the required netlink attributes to enable the feature. Patch #9 adds a selftest. iproute2 patches can be found here [3]. Changelog ========= Since RFC [4]: No changes. [1] https://www.rfc-editor.org/rfc/rfc7432#section-10 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a42317785c898c0ed46db45a33b0cc71b671bf29 [3] https://github.com/idosch/iproute2/tree/submit/neigh_suppress_v1 [4] https://lore.kernel.org/netdev/20230413095830.2182382-1-idosch@nvidia.com/ ==================== Signed-off-by: David S. Miller commit 7648ac72dcd7e22ac1fa5e573e536592773831dc Author: Ido Schimmel Date: Wed Apr 19 18:35:00 2023 +0300 selftests: net: Add bridge neighbor suppression test Add test cases for bridge neighbor suppression, testing both per-port and per-{Port, VLAN} neighbor suppression with both ARP and NS packets. Example truncated output: # ./test_bridge_neigh_suppress.sh [...] Tests passed: 148 Tests failed: 0 Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 160656d7201d861a1f2a0bf279a765e8cda2317a Author: Ido Schimmel Date: Wed Apr 19 18:34:59 2023 +0300 bridge: Allow setting per-{Port, VLAN} neighbor suppression state Add a new bridge port attribute that allows user space to enable per-{Port, VLAN} neighbor suppression. Example: # bridge -d -j -p link show dev swp1 | jq '.[]["neigh_vlan_suppress"]' false # bridge link set dev swp1 neigh_vlan_suppress on # bridge -d -j -p link show dev swp1 | jq '.[]["neigh_vlan_suppress"]' true # bridge link set dev swp1 neigh_vlan_suppress off # bridge -d -j -p link show dev swp1 | jq '.[]["neigh_vlan_suppress"]' false Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 83f6d600796c65ab34b08dbddb5795099dfda4d1 Author: Ido Schimmel Date: Wed Apr 19 18:34:58 2023 +0300 bridge: vlan: Allow setting VLAN neighbor suppression state Add a new VLAN attribute that allows user space to set the neighbor suppression state of the port VLAN. Example: # bridge -d -j -p vlan show dev swp1 vid 10 | jq '.[]["vlans"][]["neigh_suppress"]' false # bridge vlan set vid 10 dev swp1 neigh_suppress on # bridge -d -j -p vlan show dev swp1 vid 10 | jq '.[]["vlans"][]["neigh_suppress"]' true # bridge vlan set vid 10 dev swp1 neigh_suppress off # bridge -d -j -p vlan show dev swp1 vid 10 | jq '.[]["vlans"][]["neigh_suppress"]' false # bridge vlan set vid 10 dev br0 neigh_suppress on Error: bridge: Can't set neigh_suppress for non-port vlans. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 412614b1457af278b00152f3804af5481c6c55ac Author: Ido Schimmel Date: Wed Apr 19 18:34:57 2023 +0300 bridge: Add per-{Port, VLAN} neighbor suppression data path support When the bridge is not VLAN-aware (i.e., VLAN ID is 0), determine if neighbor suppression is enabled on a given bridge port solely based on the existing 'BR_NEIGH_SUPPRESS' flag. Otherwise, if the bridge is VLAN-aware, first check if per-{Port, VLAN} neighbor suppression is enabled on the given bridge port using the 'BR_NEIGH_VLAN_SUPPRESS' flag. If so, look up the VLAN and check whether it has neighbor suppression enabled based on the per-VLAN 'BR_VLFLAG_NEIGH_SUPPRESS_ENABLED' flag. If the bridge is VLAN-aware, but the bridge port does not have per-{Port, VLAN} neighbor suppression enabled, then fallback to determine neighbor suppression based on the 'BR_NEIGH_SUPPRESS' flag. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 3aca683e0654a2f4ff6996341cba98a5396ff050 Author: Ido Schimmel Date: Wed Apr 19 18:34:56 2023 +0300 bridge: Encapsulate data path neighbor suppression logic Currently, there are various places in the bridge data path that check whether neighbor suppression is enabled on a given bridge port. As a preparation for per-{Port, VLAN} neighbor suppression, encapsulate this logic in a function and pass the VLAN ID of the packet as an argument. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 6be42ed0a5f4b26e77b51cd10a09b41d53f97570 Author: Ido Schimmel Date: Wed Apr 19 18:34:55 2023 +0300 bridge: Take per-{Port, VLAN} neighbor suppression into account The bridge driver gates the neighbor suppression code behind an internal per-bridge flag called 'BROPT_NEIGH_SUPPRESS_ENABLED'. The flag is set when at least one bridge port has neighbor suppression enabled. As a preparation for per-{Port, VLAN} neighbor suppression, make sure the global flag is also set if per-{Port, VLAN} neighbor suppression is enabled. That is, when the 'BR_NEIGH_VLAN_SUPPRESS' flag is set on at least one bridge port. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit a714e3ec230892039b5d5ae6902b58bb084a15c1 Author: Ido Schimmel Date: Wed Apr 19 18:34:54 2023 +0300 bridge: Add internal flags for per-{Port, VLAN} neighbor suppression Add two internal flags that will be used to enable / disable per-{Port, VLAN} neighbor suppression: 1. 'BR_NEIGH_VLAN_SUPPRESS': A per-port flag used to indicate that per-{Port, VLAN} neighbor suppression is enabled on the bridge port. When set, 'BR_NEIGH_SUPPRESS' has no effect. 2. 'BR_VLFLAG_NEIGH_SUPPRESS_ENABLED': A per-VLAN flag used to indicate that neighbor suppression is enabled on the given VLAN. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit e408336a693e0fd74ba1b959627594b80f1761c3 Author: Ido Schimmel Date: Wed Apr 19 18:34:53 2023 +0300 bridge: Pass VLAN ID to br_flood() Subsequent patches are going to add per-{Port, VLAN} neighbor suppression, which will require br_flood() to potentially suppress ARP / NS packets on a per-{Port, VLAN} basis. As a preparation, pass the VLAN ID of the packet as another argument to br_flood(). Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 013a7ce81dd8a5bba31f802053829d91f9a43a8f Author: Ido Schimmel Date: Wed Apr 19 18:34:52 2023 +0300 bridge: Reorder neighbor suppression check when flooding The bridge does not flood ARP / NS packets for which a reply was sent to bridge ports that have neighbor suppression enabled. Subsequent patches are going to add per-{Port, VLAN} neighbor suppression, which is going to make it more expensive to check whether neighbor suppression is enabled since a VLAN lookup will be required. Therefore, instead of unnecessarily performing this lookup for every packet, only perform it for ARP / NS packets for which a reply was sent. Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 1cf3fe1c3726ac2e7aa47407321c484a468feb94 Merge: e2598dbd21279 7661351a54ec9 Author: David S. Miller Date: Fri Apr 21 08:22:15 2023 +0100 Merge branch 'macsec-vlan' Emeel Hakim says: ==================== Support MACsec VLAN This patch series introduces support for hardware (HW) offload MACsec devices with VLAN configuration. The patches address both scenarios where the VLAN header is both the inner and outer header for MACsec. The changes include: 1. Adding MACsec offload operation for VLAN. 2. Considering VLAN when accessing MACsec net device. 3. Currently offloading MACsec when it's configured over VLAN with current MACsec TX steering rules would wrongly insert the MACsec sec tag after inserting the VLAN header. This resulted in an ETHERNET | SECTAG | VLAN packet when ETHERNET | VLAN | SECTAG is configured. The patche handles this issue when configuring steering rules. 4. Adding MACsec rx_handler change support in case of a marked skb and a mismatch on the dst MAC address. Please review these changes and let me know if you have any feedback or concerns. Updates since v1: - Consult vlan_features when adding NETIF_F_HW_MACSEC. - Allow grep for the functions. - Add helper function to get the macsec operation to allow the compiler to make some choice. Updates since v2: - Don't use macros to allow direct navigattion from mdo functions to its implementation. - Make the vlan_get_macsec_ops argument a const. - Check if the specific mdo function is available before calling it. - Enable NETIF_F_HW_MACSEC by default when the lower device has it enabled and in case the lower device currently has NETIF_F_HW_MACSEC but disabled let the new vlan device also have it disabled. Updates since v3: - Split patch ("vlan: Add MACsec offload operations for VLAN interface") to prevent mixing generic vlan code changes with driver changes. - Add mdo_open, stop and stats to support drivers which have those. - Don't fail if macsec offload operations are available but a specific function is not, to support drivers which does not implement all macsec offload operations. - Don't call find_rx_sc twice in the same loop, instead save the result in a parameter and re-use it. - Completely remove _BUILD_VLAN_MACSEC_MDO macro, to prevent returning from a macro. - Reorder the functions inside struct macsec_ops to match the struct decleration. Updates since v4: - Change subject line of ("macsec: Add MACsec rx_handler change support") and adapt commit message. - Don't separate the new check in patch ("macsec: Add MACsec rx_handler change support") from the previous if/else if. - Drop"_found" from the parameter naming "rx_sc_found" and move the definition to the relevant block. - Remove "{}" since not needed around a single line. Updates since v5: - Consider promiscuous mode case. Updates since v6: - Use IS_ENABLED instead of checking for ifdef. - Don't add inline keywork in c files, let the compiler make its own decisions. ==================== Signed-off-by: David S. Miller commit 7661351a54ec9a6a20203f94fd459a9360049045 Author: Emeel Hakim Date: Wed Apr 19 17:21:26 2023 +0300 macsec: Don't rely solely on the dst MAC address to identify destination MACsec device Offloading device drivers will mark offloaded MACsec SKBs with the corresponding SCI in the skb_metadata_dst so the macsec rx handler will know to which interface to divert those skbs, in case of a marked skb and a mismatch on the dst MAC address, divert the skb to the macsec net_device where the macsec rx_handler will be called to consider cases where relying solely on the dst MAC address is insufficient. One such instance is when using MACsec with a VLAN as an inner header, where the packet structure is ETHERNET | SECTAG | VLAN. In such a scenario, the dst MAC address in the ethernet header will correspond to the VLAN MAC address, resulting in a mismatch. Signed-off-by: Emeel Hakim Reviewed-by: Subbaraya Sundeep Signed-off-by: David S. Miller commit 765f974c7dfd104ed569fae1669adfc0e70ded1b Author: Emeel Hakim Date: Wed Apr 19 17:21:25 2023 +0300 net/mlx5: Consider VLAN interface in MACsec TX steering rules Offloading MACsec when its configured over VLAN with current MACsec TX steering rules will wrongly insert MACsec sec tag after inserting the VLAN header leading to a ETHERNET | SECTAG | VLAN packet when ETHERNET | VLAN | SECTAG is configured. The above issue is due to adding the SECTAG by HW which is a later stage compared to the VLAN header insertion stage. Detect such a case and adjust TX steering rules to insert the SECTAG in the correct place by using reformat_param_0 field in the packet reformat to indicate the offset of SECTAG from end of the MAC header to account for VLANs in granularity of 4Bytes. Signed-off-by: Emeel Hakim Reviewed-by: Subbaraya Sundeep Signed-off-by: David S. Miller commit 4bba492b04270c29259594d1b9ee66ce96af9466 Author: Emeel Hakim Date: Wed Apr 19 17:21:24 2023 +0300 net/mlx5: Support MACsec over VLAN MACsec device may have a VLAN device on top of it. Detect MACsec state correctly under this condition, and return the correct net device accordingly. Signed-off-by: Emeel Hakim Reviewed-by: Subbaraya Sundeep Signed-off-by: David S. Miller commit 339ccec8d43d004a377b01e1a9a85487f95e8f13 Author: Emeel Hakim Date: Wed Apr 19 17:21:23 2023 +0300 net/mlx5: Enable MACsec offload feature for VLAN interface Enable MACsec offload feature over VLAN by adding NETIF_F_HW_MACSEC to the device vlan_features. Signed-off-by: Emeel Hakim Reviewed-by: Subbaraya Sundeep Signed-off-by: David S. Miller commit abff3e5e2935f5cc34feb559b352179b13eaa066 Author: Emeel Hakim Date: Wed Apr 19 17:21:22 2023 +0300 vlan: Add MACsec offload operations for VLAN interface Add support for MACsec offload operations for VLAN driver to allow offloading MACsec when VLAN's real device supports Macsec offload by forwarding the offload request to it. Signed-off-by: Emeel Hakim Reviewed-by: Subbaraya Sundeep Signed-off-by: David S. Miller commit e2598dbd21279d355d9c808eb14d336b94e3c788 Merge: 2f3a247c3994e dbda0fba7a14f Author: David S. Miller Date: Fri Apr 21 08:19:30 2023 +0100 Merge branch 'sctp-nested-flex-arrays' Xin Long says: ==================== sctp: fix a plenty of flexible-array-nested warnings Paolo noticed a compile warning in SCTP, ../net/sctp/stream_sched_fc.c: note: in included file (through ../include/net/sctp/sctp.h): ../include/net/sctp/structs.h:335:41: warning: array of flexible structures But not only this, there are actually quite a lot of such warnings in some SCTP structs. This patchset fixes most of warnings by deleting these nested flexible array members. After this patchset, there are still some warnings left: # make C=2 CF="-Wflexible-array-nested" M=./net/sctp/ ./include/net/sctp/structs.h:1145:41: warning: nested flexible array ./include/uapi/linux/sctp.h:641:34: warning: nested flexible array ./include/uapi/linux/sctp.h:643:34: warning: nested flexible array ./include/uapi/linux/sctp.h:644:33: warning: nested flexible array ./include/uapi/linux/sctp.h:650:40: warning: nested flexible array ./include/uapi/linux/sctp.h:653:39: warning: nested flexible array the 1st is caused by __data[] in struct ip_options, not in SCTP; the others are in uapi, and we should not touch them. Note that instead of completely deleting it, we just leave it as a comment in the struct, signalling to the reader that we do expect such variable parameters over there, as Marcelo suggested. ==================== Signed-off-by: David S. Miller commit dbda0fba7a14f14835c34d59fd329cb90a887862 Author: Xin Long Date: Wed Apr 19 11:16:33 2023 -0400 sctp: delete the nested flexible array payload This patch deletes the flexible-array payload[] from the structure sctp_datahdr to avoid some sparse warnings: # make C=2 CF="-Wflexible-array-nested" M=./net/sctp/ net/sctp/socket.c: note: in included file (through include/net/sctp/structs.h, include/net/sctp/sctp.h): ./include/linux/sctp.h:230:29: warning: nested flexible array This member is not even used anywhere. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 2ab399a931dddacdf7202cd4b49a5187154623d1 Author: Xin Long Date: Wed Apr 19 11:16:32 2023 -0400 sctp: delete the nested flexible array hmac This patch deletes the flexible-array hmac[] from the structure sctp_authhdr to avoid some sparse warnings: # make C=2 CF="-Wflexible-array-nested" M=./net/sctp/ net/sctp/auth.c: note: in included file (through include/net/sctp/structs.h, include/net/sctp/sctp.h): ./include/linux/sctp.h:735:29: warning: nested flexible array Signed-off-by: Xin Long Signed-off-by: David S. Miller commit f97278ff346a5f11c68d0ac499999d5ad06a6db2 Author: Xin Long Date: Wed Apr 19 11:16:31 2023 -0400 sctp: delete the nested flexible array peer_init This patch deletes the flexible-array peer_init[] from the structure sctp_cookie to avoid some sparse warnings: # make C=2 CF="-Wflexible-array-nested" M=./net/sctp/ net/sctp/sm_make_chunk.c: note: in included file (through include/net/sctp/sctp.h): ./include/net/sctp/structs.h:1588:28: warning: nested flexible array ./include/net/sctp/structs.h:343:28: warning: nested flexible array Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 9789c1c6619e0a5eccfc31abe49b1ce5ca3cd11f Author: Xin Long Date: Wed Apr 19 11:16:30 2023 -0400 sctp: delete the nested flexible array variable This patch deletes the flexible-array variable[] from the structure sctp_sackhdr and sctp_errhdr to avoid some sparse warnings: # make C=2 CF="-Wflexible-array-nested" M=./net/sctp/ net/sctp/sm_statefuns.c: note: in included file (through include/net/sctp/structs.h, include/net/sctp/sctp.h): ./include/linux/sctp.h:451:28: warning: nested flexible array ./include/linux/sctp.h:393:29: warning: nested flexible array Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 73175a042955e531ec355a8708585befa67a22db Author: Xin Long Date: Wed Apr 19 11:16:29 2023 -0400 sctp: delete the nested flexible array skip This patch deletes the flexible-array skip[] from the structure sctp_ifwdtsn/fwdtsn_hdr to avoid some sparse warnings: # make C=2 CF="-Wflexible-array-nested" M=./net/sctp/ net/sctp/stream_interleave.c: note: in included file (through include/net/sctp/structs.h, include/net/sctp/sctp.h): ./include/linux/sctp.h:611:32: warning: nested flexible array ./include/linux/sctp.h:628:33: warning: nested flexible array Signed-off-by: Xin Long Signed-off-by: David S. Miller commit add7370a398930077c6bc257ef5016b040d476eb Author: Xin Long Date: Wed Apr 19 11:16:28 2023 -0400 sctp: delete the nested flexible array params This patch deletes the flexible-array params[] from the structure sctp_inithdr, sctp_addiphdr and sctp_reconf_chunk to avoid some sparse warnings: # make C=2 CF="-Wflexible-array-nested" M=./net/sctp/ net/sctp/input.c: note: in included file (through include/net/sctp/structs.h, include/net/sctp/sctp.h): ./include/linux/sctp.h:278:29: warning: nested flexible array ./include/linux/sctp.h:675:30: warning: nested flexible array This warning is reported if a structure having a flexible array member is included by other structures. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit c82729e06644f4e087f5ff0f91b8fb15e03b8890 Author: Cindy Lu Date: Thu Apr 20 23:17:34 2023 +0800 vhost_vdpa: fix unmap process in no-batch mode While using the vdpa device with vIOMMU enabled in the guest VM, when the vdpa device bind to vfio-pci and run testpmd then system will fail to unmap. The test process is Load guest VM --> attach to virtio driver--> bind to vfio-pci driver So the mapping process is 1)batched mode map to normal MR 2)batched mode unmapped the normal MR 3)unmapped all the memory 4)mapped to iommu MR This error happened in step 3). The iotlb was freed in step 2) and the function vhost_vdpa_process_iotlb_msg will return fail Which causes failure. To fix this, we will not remove the AS while the iotlb->nmaps is 0. This will free in the vhost_vdpa_clean Cc: stable@vger.kernel.org Fixes: aaca8373c4b1 ("vhost-vdpa: support ASID based IOTLB API") Signed-off-by: Cindy Lu Message-Id: <20230420151734.860168-1-lulu@redhat.com> Signed-off-by: Michael S. Tsirkin commit 11841c52fa525c9be17c0731cc897d93c3c0f4fe Author: Xuan Zhuo Date: Thu Apr 13 15:16:10 2023 +0800 MAINTAINERS: make me a reviewer of VIRTIO CORE AND NET DRIVERS First of all, I personally love open source, linux and virtio. I have also participated in community work such as virtio for a long time. I think I am familiar enough with virtio/virtio-net and is adequate as a reviewer. Every time there is some patch/bug, I wish I can get pinged and I will feedback on that. For me personally, being a reviewer is an honor and a responsibility, and it also makes it easier for me to participate in virtio-related work. And I will spend more time reviewing virtio patch. Better advance virtio development I had some contributions to virtio/virtio-net and some support for it. * per-queue reset * virtio-net xdp * some bug fix * ...... I make a humble request to grant the reviewer role for the virtio core and net drivers. Signed-off-by: Xuan Zhuo Message-Id: <20230413071610.43659-1-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin commit e9c4962c5d69b8a238bb8bd51e8fdce39be13e5b Author: Shunsuke Mie Date: Mon Apr 17 11:20:37 2023 +0900 tools/virtio: fix build caused by virtio_ring changes Fix the build dependency for virtio_test. The virtio_ring that is used from the test requires container_of_const(). Change to use container_of.h kernel header directly and adapt related codes. Signed-off-by: Shunsuke Mie Message-Id: <20230417022037.917668-2-mie@igel.co.jp> Signed-off-by: Michael S. Tsirkin commit 38fc29ea754711e9a8c4e9ca2678ab41353a4662 Author: Shunsuke Mie Date: Mon Apr 17 11:20:36 2023 +0900 virtio_ring: add a struct device forward declaration The virtio_ring header file uses the struct device without a forward declaration. Signed-off-by: Shunsuke Mie Message-Id: <20230417022037.917668-1-mie@igel.co.jp> Signed-off-by: Michael S. Tsirkin commit abebb16254b362664452e14d9711ddb54855ddcf Author: Stefano Garzarella Date: Fri Apr 7 15:36:58 2023 +0200 vdpa_sim_blk: support shared backend The vdpa_sim_blk simulator uses a ramdisk as the backend. To test live migration, we need two devices that share the backend to have the data synchronized with each other. Add a new module parameter to make the buffer shared between all devices. The shared_buffer_mutex is used just to ensure that each operation is atomic, but it is up to the user to use the devices knowing that the underlying ramdisk is shared. For example, when we do a migration, the VMM (e.g., QEMU) will guarantee to write to the destination device, only after completing operations with the source device. Signed-off-by: Stefano Garzarella Message-Id: <20230407133658.66339-3-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin commit 112f23cd72a2975e11986d73575e2c3651ea4c7e Author: Stefano Garzarella Date: Fri Apr 7 15:36:57 2023 +0200 vdpa_sim: move buffer allocation in the devices Currently, the vdpa_sim core does not use the buffer, but only allocates it. The buffer is used by devices differently, and some future devices may not use it. So let's move all its management inside the devices. Add a new `free` device callback called to clean up the resources allocated by the device. Signed-off-by: Stefano Garzarella Message-Id: <20230407133658.66339-2-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin commit 5b250fac7c76b670dd1b28b67f1a91a1907bc117 Author: Alvaro Karsz Date: Sun Apr 9 15:02:42 2023 +0300 vdpa/snet: use likely/unlikely macros in hot functions - kick callback: most likely that the VQ is ready. - interrupt handlers: most likely that the callback is not NULL. Signed-off-by: Alvaro Karsz Message-Id: <20230409120242.3460074-1-alvaro.karsz@solid-run.com> Signed-off-by: Michael S. Tsirkin commit 51b6e6c1c8e382c50fe88a04e25d326ceff74f89 Author: Alvaro Karsz Date: Mon Apr 17 11:38:53 2023 +0300 vdpa/snet: implement kick_vq_with_data callback Implement the kick_vq_with_data vDPA callback. On kick, we pass the next available data to the DPU by writing it in the kick offset. Signed-off-by: Alvaro Karsz Message-Id: <20230417083853.375076-1-alvaro.karsz@solid-run.com> Signed-off-by: Michael S. Tsirkin commit 2c4e4a22a3b090e06191f8544d21e0e1d72ce518 Author: Alvaro Karsz Date: Thu Apr 13 11:18:55 2023 +0300 virtio-vdpa: add VIRTIO_F_NOTIFICATION_DATA feature support Add VIRTIO_F_NOTIFICATION_DATA support for vDPA transport. If this feature is negotiated, the driver passes extra data when kicking a virtqueue. A device that offers this feature needs to implement the kick_vq_with_data callback. kick_vq_with_data receives the vDPA device and data. data includes: 16 bits vqn and 16 bits next available index for split virtqueues. 16 bits vqs, 15 least significant bits of next available index and 1 bit next_wrap for packed virtqueues. This patch follows a patch [1] by Viktor Prutyanov which adds support for the MMIO, channel I/O and modern PCI transports. Signed-off-by: Alvaro Karsz Message-Id: <20230413081855.36643-3-alvaro.karsz@solid-run.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit af8ececda185078c096852edb4e1d7a2349e6856 Author: Viktor Prutyanov Date: Thu Apr 13 11:18:54 2023 +0300 virtio: add VIRTIO_F_NOTIFICATION_DATA feature support According to VirtIO spec v1.2, VIRTIO_F_NOTIFICATION_DATA feature indicates that the driver passes extra data along with the queue notifications. In a split queue case, the extra data is 16-bit available index. In a packed queue case, the extra data is 1-bit wrap counter and 15-bit available index. Add support for this feature for MMIO, channel I/O and modern PCI transports. Signed-off-by: Viktor Prutyanov Acked-by: Jason Wang Reviewed-by: Xuan Zhuo Message-Id: <20230413081855.36643-2-alvaro.karsz@solid-run.com> Signed-off-by: Michael S. Tsirkin commit 3616bf377a5a8ef4f124dfde5f3522c4da335561 Author: Alvaro Karsz Date: Thu Apr 13 10:33:37 2023 +0300 vdpa/snet: support the suspend vDPA callback When suspend is called, the driver sends a suspend command to the DPU through the control mechanism. Signed-off-by: Alvaro Karsz Message-Id: <20230413073337.31367-3-alvaro.karsz@solid-run.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 3f3a1675b731e532d479e65570f2904878fbd9f0 Author: Alvaro Karsz Date: Thu Apr 13 10:33:36 2023 +0300 vdpa/snet: support getting and setting VQ state This patch adds the get_vq_state and set_vq_state vDPA callbacks. In order to get the VQ state, the state needs to be read from the DPU. In order to allow that, the old messaging mechanism is replaced with a new, flexible control mechanism. This mechanism allows to read data from the DPU. The mechanism can be used if the negotiated config version is 2 or higher. If the new mechanism is used when the config version is 1, it will call snet_send_ctrl_msg_old, which is config 1 compatible. Signed-off-by: Alvaro Karsz Message-Id: <20230413073337.31367-2-alvaro.karsz@solid-run.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 4a536d881a661c7ff7d241c537ee511106d88163 Author: Simon Horman Date: Fri Mar 31 10:56:57 2023 +0200 MAINTAINERS: add vringh.h to Virtio Core and Net Drivers vringh.h doesn't seem to belong to any section in MAINTAINERS. Add it to Virtio Core and Net Drivers, which seems to be the most appropriate section to me. Signed-off-by: Simon Horman Message-Id: <20230331-vhost-fixes-v1-3-1f046e735b9e@kernel.org> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit b2ffaa672edaf1a681537a9f47bc14ab6c9e8845 Author: Simon Horman Date: Fri Mar 31 10:56:56 2023 +0200 vringh: address kdoc warnings Address some minor kdoc warnings in vring.h. * Place kdoc for 'struct vringh_config_ops' immediately before the structure * Add missing documentation of members of 'vringh_iov' and 'vringh_kiov' Warnings flagged by: $ ./scripts/kernel-doc -none include/linux/vringh.h include/linux/vringh.h:68: error: Cannot parse struct or union! include/linux/vringh.h:92: warning: Function parameter or member 'iov' not described in 'vringh_iov' include/linux/vringh.h:92: warning: Function parameter or member 'consumed' not described in 'vringh_iov' include/linux/vringh.h:92: warning: Function parameter or member 'i' not described in 'vringh_iov' include/linux/vringh.h:92: warning: Function parameter or member 'used' not described in 'vringh_iov' include/linux/vringh.h:92: warning: Function parameter or member 'max_num' not described in 'vringh_iov' include/linux/vringh.h:104: warning: Function parameter or member 'iov' not described in 'vringh_kiov' include/linux/vringh.h:104: warning: Function parameter or member 'consumed' not described in 'vringh_kiov' include/linux/vringh.h:104: warning: Function parameter or member 'i' not described in 'vringh_kiov' include/linux/vringh.h:104: warning: Function parameter or member 'used' not described in 'vringh_kiov' include/linux/vringh.h:104: warning: Function parameter or member 'max_num' not described in 'vringh_kiov' Signed-off-by: Simon Horman Message-Id: <20230331-vhost-fixes-v1-2-1f046e735b9e@kernel.org> Signed-off-by: Michael S. Tsirkin commit 9be5d2d424a19a0c6d643a1baecba3d58e725012 Author: Simon Horman Date: Fri Mar 31 10:56:55 2023 +0200 vdpa: address kdoc warnings This patch addresses the following minor kdoc problems. * Incorrect spelling of 'callback' and 'notification' * Unrecognised kdoc format for 'struct vdpa_map_file' * Missing documentation of 'get_vendor_vq_stats' member of 'struct vdpa_config_ops' * Missing documentation of 'max_supported_vqs' and 'supported_features' members of 'struct vdpa_mgmt_dev' Most of these problems were flagged by: $ ./scripts/kernel-doc -Werror -none include/linux/vdpa.h include/linux/vdpa.h:20: warning: expecting prototype for struct vdpa_calllback. Prototype was for struct vdpa_callback instead include/linux/vdpa.h:117: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Corresponding file area for device memory mapping include/linux/vdpa.h:357: warning: Function parameter or member 'get_vendor_vq_stats' not described in 'vdpa_config_ops' include/linux/vdpa.h:518: warning: Function parameter or member 'supported_features' not described in 'vdpa_mgmt_dev' include/linux/vdpa.h:518: warning: Function parameter or member 'max_supported_vqs' not described in 'vdpa_mgmt_dev' The misspelling of 'notification' was flagged by: $ ./scripts/checkpatch.pl --codespell --showfile --strict -f include/linux/vdpa.h include/linux/vdpa.h:171: CHECK: 'notifcation' may be misspelled - perhaps 'notification'? ... Signed-off-by: Simon Horman Message-Id: <20230331-vhost-fixes-v1-1-1f046e735b9e@kernel.org> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 6c0b057cec5eade4c3afec3908821176931a9997 Author: Albert Huang Date: Wed Mar 29 18:23:00 2023 +0800 virtio_ring: don't update event idx on get_buf In virtio_net, if we disable napi_tx, when we trigger a tx interrupt, the vq->event_triggered will be set to true. It is then never reset until we explicitly call virtqueue_enable_cb_delayed or virtqueue_enable_cb_prepare. If we disable the napi_tx, virtqueue_enable_cb* will only be called when the tx ring is getting relatively empty. Since event_triggered is true, VRING_AVAIL_F_NO_INTERRUPT or VRING_PACKED_EVENT_FLAG_DISABLE will not be set. As a result we update vring_used_event(&vq->split.vring) or vq->packed.vring.driver->off_wrap every time we call virtqueue_get_buf_ctx. This causes more interrupts. To summarize: 1) event_triggered was set to true in vring_interrupt() 2) after this nothing will happen in virtqueue_disable_cb() so VRING_AVAIL_F_NO_INTERRUPT is not set in avail_flags_shadow 3) virtqueue_get_buf_ctx_split() will still think the cb is enabled and then it will publish a new event index To fix: update VRING_AVAIL_F_NO_INTERRUPT or VRING_PACKED_EVENT_FLAG_DISABLE in the vq when we call virtqueue_disable_cb even when event_triggered is true. Tested with iperf: iperf3 tcp stream: vm1 -----------------> vm2 vm2 just receives tcp data stream from vm1, and sends acks to vm1, there are many tx interrupts in vm2. with the patch applied there are just a few tx interrupts. v2->v3: -update the interrupt disable flag even with the event_triggered is set, -instead of checking whether event_triggered is set in -virtqueue_get_buf_ctx_{packed/split}, will cause the drivers which have -not called virtqueue_{enable/disable}_cb to miss notifications. v3->v4: -remove change for -"if (vq->packed.event_flags_shadow != VRING_PACKED_EVENT_FLAG_DISABLE)" -in virtqueue_disable_cb_packed Fixes: 8d622d21d248 ("virtio: fix up virtio_disable_cb") Signed-off-by: Albert Huang Signed-off-by: Michael S. Tsirkin Signed-off-by: Jason Wang Message-Id: <20230329102300.61000-1-huangjie.albert@bytedance.com> Signed-off-by: Michael S. Tsirkin commit 4bb94d2de2fa90aa8d4e1ce940b1b2f7708cf141 Author: Stefano Garzarella Date: Tue Apr 4 15:17:34 2023 +0200 vdpa_sim: add support for user VA The new "use_va" module parameter (default: true) is used in vdpa_alloc_device() to inform the vDPA framework that the device supports VA. vringh is initialized to use VA only when "use_va" is true and the user's mm has been bound. So, only when the bus supports user VA (e.g. vhost-vdpa). vdpasim_mm_work_fn work is used to serialize the binding to a new address space when the .bind_mm callback is invoked, and unbinding when the .unbind_mm callback is invoked. Call mmget_not_zero()/kthread_use_mm() inside the worker function to pin the address space only as long as needed, following the documentation of mmget() in include/linux/sched/mm.h: * Never use this function to pin this address space for an * unbounded/indefinite amount of time. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Message-Id: <20230404131734.45943-1-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin commit d7621c28fca1c16f9e94245479792024a5676c50 Author: Stefano Garzarella Date: Tue Apr 4 15:17:29 2023 +0200 vdpa_sim: replace the spinlock with a mutex to protect the state The spinlock we use to protect the state of the simulator is sometimes held for a long time (for example, when devices handle requests). This also prevents us from calling functions that might sleep (such as kthread_flush_work() in the next patch), and thus having to release and retake the lock. For these reasons, let's replace the spinlock with a mutex that gives us more flexibility. Suggested-by: Jason Wang Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Message-Id: <20230404131730.45920-1-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin commit 76acfa7bc54f1e3b9dde396e0a3534493419fd6f Author: Stefano Garzarella Date: Tue Apr 4 15:17:25 2023 +0200 vdpa_sim: use kthread worker Let's use our own kthread to run device jobs. This allows us more flexibility, especially we can attach the kthread to the user address space when vDPA uses user's VA. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Message-Id: <20230404131725.45908-1-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin commit e2a4f808a78646badefcd13a6e995d369898f443 Author: Stefano Garzarella Date: Tue Apr 4 15:17:21 2023 +0200 vdpa_sim: make devices agnostic for work management Let's move work management inside the vdpa_sim core. This way we can easily change how we manage the works, without having to change the devices each time. Acked-by: Eugenio Pérez Martin Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Message-Id: <20230404131721.45886-1-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin commit 42823a871fd4e17b34034f43b36ae57bd2ed8a67 Author: Stefano Garzarella Date: Tue Apr 4 15:17:16 2023 +0200 vringh: support VA with iotlb vDPA supports the possibility to use user VA in the iotlb messages. So, let's add support for user VA in vringh to use it in the vDPA simulators. Acked-by: Eugenio Pérez Signed-off-by: Stefano Garzarella Message-Id: <20230404131716.45855-1-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin commit f609d6cbb36ab1c9c7434f67d555c57a2f7d3dde Author: Stefano Garzarella Date: Tue Apr 4 15:13:21 2023 +0200 vringh: define the stride used for translation Define a macro to be reused in the different parts of the code. Useful for the next patches where we add more arrays to manage also translations with user VA. Suggested-by: Eugenio Perez Martin Signed-off-by: Stefano Garzarella Message-Id: <20230404131326.44403-5-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin commit c0371782500c5314741da9ccbfbf0375a0d379fc Author: Stefano Garzarella Date: Tue Apr 4 15:13:20 2023 +0200 vringh: replace kmap_atomic() with kmap_local_page() kmap_atomic() is deprecated in favor of kmap_local_page() since commit f3ba3c710ac5 ("mm/highmem: Provide kmap_local*"). With kmap_local_page() the mappings are per thread, CPU local, can take page-faults, and can be called from any context (including interrupts). Furthermore, the tasks can be preempted and, when they are scheduled to run again, the kernel virtual addresses are restored and still valid. kmap_atomic() is implemented like a kmap_local_page() which also disables page-faults and preemption (the latter only for !PREEMPT_RT kernels, otherwise it only disables migration). The code within the mappings/un-mappings in getu16_iotlb() and putu16_iotlb() don't depend on the above-mentioned side effects of kmap_atomic(), so that mere replacements of the old API with the new one is all that is required (i.e., there is no need to explicitly add calls to pagefault_disable() and/or preempt_disable()). This commit reuses a "boiler plate" commit message from Fabio, who has already did this change in several places. Cc: "Fabio M. De Francesco" Reviewed-by: Fabio M. De Francesco Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Message-Id: <20230404131326.44403-4-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin commit 9067de4725a299bc1baf11de9f5040fdd0bd05c3 Author: Stefano Garzarella Date: Tue Apr 4 15:13:19 2023 +0200 vhost-vdpa: use bind_mm/unbind_mm device callbacks When the user call VHOST_SET_OWNER ioctl and the vDPA device has `use_va` set to true, let's call the bind_mm callback. In this way we can bind the device to the user address space and directly use the user VA. The unbind_mm callback is called during the release after stopping the device. Signed-off-by: Stefano Garzarella Message-Id: <20230404131326.44403-3-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin commit c618c84d4ccc6268c3da7609c7388b6cb305c639 Author: Stefano Garzarella Date: Tue Apr 4 15:13:18 2023 +0200 vdpa: add bind_mm/unbind_mm callbacks These new optional callbacks is used to bind/unbind the device to a specific address space so the vDPA framework can use VA when these callbacks are implemented. Suggested-by: Jason Wang Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Message-Id: <20230404131326.44403-2-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin commit 905233af513c0c6971cae0f25280f23be1f6cbe4 Author: Stefano Garzarella Date: Fri Mar 31 10:02:08 2023 +0200 vringh: fix typos in the vringh_init_* documentation Replace `userpace` with `userspace`. Cc: Simon Horman Signed-off-by: Stefano Garzarella Message-Id: <20230331080208.17002-1-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Xuan Zhuo Acked-by: Jason Wang commit b774f93d87e198481680873b22c2a443e10c3f93 Author: Xie Yongji Date: Thu Mar 23 13:30:43 2023 +0800 vduse: Support specifying bounce buffer size via sysfs As discussed in [1], this adds sysfs interface to support specifying bounce buffer size in virtio-vdpa case. It would be a performance tuning parameter for high throughput workloads. [1] https://lore.kernel.org/netdev/e8f25a35-9d45-69f9-795d-bdbbb90337a3@redhat.com/ Signed-off-by: Xie Yongji Acked-by: Jason Wang Message-Id: <20230323053043.35-12-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin commit d4438d23eeeef8bb1b3a8abe418abffd60bb544a Author: Xie Yongji Date: Thu Mar 23 13:30:42 2023 +0800 vduse: Delay iova domain creation Delay creating iova domain until the vduse device is registered to vdpa bus. This is a preparation for adding sysfs interface to support specifying bounce buffer size for the iova domain. Signed-off-by: Xie Yongji Acked-by: Jason Wang Message-Id: <20230323053043.35-11-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin commit e38632dd71818d99bcebeb55f27dc764a9f7d547 Author: Xie Yongji Date: Thu Mar 23 13:30:41 2023 +0800 vduse: Signal vq trigger eventfd directly if possible Now the vdpa callback will associate an trigger eventfd in some cases. For performance reasons, VDUSE can signal it directly during irq injection. Signed-off-by: Xie Yongji Acked-by: Jason Wang Message-Id: <20230323053043.35-10-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin commit 5e68470f4e80a4120e9ecec408f6ab4ad386bd4a Author: Xie Yongji Date: Thu Mar 23 13:30:40 2023 +0800 vdpa: Add eventfd for the vdpa callback Add eventfd for the vdpa callback so that user can signal it directly instead of triggering the callback. It will be used for vhost-vdpa case. Signed-off-by: Xie Yongji Message-Id: <20230323053043.35-9-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 66640f4a6fcc1861d1b1f9b36b65a218064f263f Author: Xie Yongji Date: Thu Mar 23 13:30:39 2023 +0800 vduse: Add sysfs interface for irq callback affinity Add sysfs interface for each vduse virtqueue to get/set the affinity for irq callback. This might be useful for performance tuning when the irq callback affinity mask contains more than one CPU. Signed-off-by: Xie Yongji Message-Id: <20230323053043.35-8-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit bfae1648ec2159da0a14d71a7d75b810f728a1e6 Author: Xie Yongji Date: Thu Mar 23 13:30:38 2023 +0800 vduse: Support get_vq_affinity callback This implements get_vq_affinity callback so that the virtio-blk driver can build the blk-mq queues based on the irq callback affinity. Signed-off-by: Xie Yongji Message-Id: <20230323053043.35-7-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 28f6288eb63d5979fa6758e64f52e4d55cf184a8 Author: Xie Yongji Date: Thu Mar 23 13:30:37 2023 +0800 vduse: Support set_vq_affinity callback Since virtio-vdpa bus driver already support interrupt affinity spreading mechanism, let's implement the set_vq_affinity callback to bring it to vduse device. After we get the virtqueue's affinity, we can spread IRQs between CPUs in the affinity mask, in a round-robin manner, to run the irq callback. Signed-off-by: Xie Yongji Message-Id: <20230323053043.35-6-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 78885597b9ccf68d4ce554aec98db01ee3c2d3fc Author: Xie Yongji Date: Thu Mar 23 13:30:36 2023 +0800 vduse: Refactor allocation for vduse virtqueues Allocate memory for vduse virtqueues one by one instead of doing one allocation for all of them. This is a preparation for adding sysfs interface for virtqueues. Signed-off-by: Xie Yongji Acked-by: Jason Wang Message-Id: <20230323053043.35-5-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin commit 3dad56823b5332ffdbe1867b2d7b50fbacea124a Author: Xie Yongji Date: Thu Mar 23 13:30:35 2023 +0800 virtio-vdpa: Support interrupt affinity spreading mechanism To support interrupt affinity spreading mechanism, this makes use of group_cpus_evenly() to create an irq callback affinity mask for each virtqueue of vdpa device. Then we will unify set_vq_affinity callback to pass the affinity to the vdpa device driver. Signed-off-by: Xie Yongji Message-Id: <20230323053043.35-4-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 1d24692732fb299c94b0dcc032b48ac8fa85c854 Author: Xie Yongji Date: Thu Mar 23 13:30:34 2023 +0800 vdpa: Add set/get_vq_affinity callbacks in vdpa_config_ops This introduces set/get_vq_affinity callbacks in vdpa_config_ops to support virtqueue affinity management for vdpa device drivers. Signed-off-by: Xie Yongji Acked-by: Jason Wang Message-Id: <20230323053043.35-3-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin commit aaf0594829c3a6f16bdf5d30904a7db4548dae15 Author: Xie Yongji Date: Thu Mar 23 13:30:33 2023 +0800 lib/group_cpus: Export group_cpus_evenly() Export group_cpus_evenly() so that some modules can make use of it to group CPUs evenly according to NUMA and CPU locality. Signed-off-by: Xie Yongji Acked-by: Jason Wang Message-Id: <20230323053043.35-2-xieyongji@bytedance.com> Signed-off-by: Michael S. Tsirkin commit e9d67e59f151eae964f749af74dbe4bd3b01b0d2 Author: Eli Cohen Date: Tue Mar 21 13:28:09 2023 +0200 vdpa/mlx5: Extend driver support for new features Extend the possible list for features that can be supported by firmware. Note that different versions of firmware may or may not support these features. The driver is made aware of them by querying the firmware. While doing this, improve the code so we use enum names instead of hard coded numerical values. The new features supported by the driver are the following: VIRTIO_NET_F_MRG_RXBUF VIRTIO_NET_F_HOST_ECN VIRTIO_NET_F_GUEST_ECN VIRTIO_NET_F_GUEST_TSO6 VIRTIO_NET_F_GUEST_TSO4 Reviewed-by: Si-Wei Liu Acked-by: Jason Wang Signed-off-by: Eli Cohen Message-Id: <20230321112809.221432-3-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin Acked-by: Eugenio Pérez Martin commit 791a1cb7b8591ece6a5075dfed803da379e7ecd3 Author: Eli Cohen Date: Tue Mar 21 13:28:08 2023 +0200 vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default Following patch adds driver support for VIRTIO_NET_F_MRG_RXBUF. Current firmware versions show degradation in packet rate when using MRG_RXBUF. Users who favor memory saving over packet rate could enable this feature but we want to keep it off by default. One can still enable it when creating the vdpa device using vdpa tool by providing features that include it. For example: $ vdpa dev add name vdpa0 mgmtdev pci/0000:86:00.2 device_features 0x300cb982b Acked-by: Jason Wang Signed-off-by: Eli Cohen Message-Id: <20230321112809.221432-2-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Si-Wei Liu commit a084983dcd4e75616fe4102c690d2fc922ac32b5 Author: Feng Liu Date: Wed Mar 15 20:54:56 2023 +0200 virtio_ring: Allow non power of 2 sizes for packed virtqueue According to the Virtio Specification, the Queue Size parameter of a virtqueue corresponds to the maximum number of descriptors in that queue, and it does not have to be a power of 2 for packed virtqueues. However, the virtio_pci_modern driver enforced a power of 2 check for virtqueue sizes, which is unnecessary and restrictive for packed virtuqueue. Split virtqueue still needs to check the virtqueue size is power_of_2 which has been done in vring_alloc_queue_split of the virtio_ring layer. To validate this change, we tested various virtqueue sizes for packed rings, including 128, 256, 512, 100, 200, 500, and 1000, with CONFIG_PAGE_POISONING enabled, and all tests passed successfully. Signed-off-by: Feng Liu Reviewed-by: Jiri Pirko Message-Id: <20230315185458.11638-2-feliu@nvidia.com> Signed-off-by: Michael S. Tsirkin commit bea273c7a8712a055cd504a2bb7d76d8d713ba6e Author: Mike Christie Date: Mon Mar 20 21:06:24 2023 -0500 vhost-scsi: Reduce vhost_scsi_mutex use We on longer need to hold the vhost_scsi_mutex the entire time we set/clear the endpoint. The tv_tpg_mutex handles tpg accesses not related to the tpg list, the port link/unlink functions use the tv_tpg_mutex while accessing the tpg->vhost_scsi pointer, vhost_scsi_do_plug will no longer queue events after the virtqueue's backend has been cleared and flushed, and we don't drop our refcount to the tpg until after we have stopped cmds and wait for outstanding cmds to complete. This moves the vhost_scsi_mutex use to it's documented use of being used to access the tpg list. We then don't need to hold it while a flush is being performed causing other device's vhost_scsi_set_endpoint and vhost_scsi_make_tpg/vhost_scsi_drop_tpg calls to have to wait on a flakey device. Signed-off-by: Mike Christie Message-Id: <20230321020624.13323-8-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin commit f5ed6f9e82ee62bf805551522dfa2d6c8030bb47 Author: Mike Christie Date: Mon Mar 20 21:06:23 2023 -0500 vhost-scsi: Drop vhost_scsi_mutex use in port callouts We are using the vhost_scsi_mutex to make sure vhost_scsi_port_link and vhost_scsi_port_unlink see if vhost_scsi_clear_endpoint has cleared tpg->vhost_scsi and it can't be freed while they are using. However, we currently set the tpg->vhost_scsi pointer while holding tv_tpg_mutex. So, we can just hold that while calling vhost_scsi_hotplug/hotunplug. We then don't need to hold the vhost_scsi_mutex while vhost_scsi_clear_endpoint is holding it and doing a flush which could cause the LUN map/unmap to have to wait on another device's flush. Signed-off-by: Mike Christie Message-Id: <20230321020624.13323-7-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin commit ced9eb376ab716ec5b06bef8c3e05608b8eb6700 Author: Mike Christie Date: Mon Mar 20 21:06:22 2023 -0500 vhost-scsi: Check for a cleared backend before queueing an event We currenly hold the vhost_scsi_mutex while clearing the endpoint and while performing vhost_scsi_do_plug, so tpg->vhost_scsi can't be freed from uder us, and to make sure anything queued is handled by the full call in vhost_scsi_clear_endpoint. This patch removes the need for the vhost_scsi_mutex for the latter case. In the next patches, we won't hold the vhost_scsi_mutex while flushing so this patch adds a check for the clearing of the virtqueue from vhost_scsi_clear_endpoint. We then know that once vhost_scsi_clear_endpoint has cleared the backend that no new events will be queued, and the flush after the vhost_vq_set_backend(vq, NULL) call will see everything that's been queued to that point. So the flush will then handle all events without the need for the vhost_scsi_mutex. Signed-off-by: Mike Christie Message-Id: <20230321020624.13323-6-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin commit eb1b291466376ad4d2f0a42392a2cd9f0e4983e5 Author: Mike Christie Date: Mon Mar 20 21:06:21 2023 -0500 vhost-scsi: Drop device mutex use in vhost_scsi_do_plug We don't need the device mutex in vhost_scsi_do_plug because: 1. we have the vhost_scsi_mutex so the tpg->vhost_scsi pointer will not change on us and the vhost_scsi can't be freed from under us if it was set. 2. vhost_scsi_clear_endpoint will stop the virtqueues and flush them while holding the vhost_scsi_mutex so we know once vhost_scsi_clear_endpoint has completed that vhost_scsi_do_plug can't send new events and any queued ones have completed. So this patch drops the device mutex use in vhost_scsi_do_plug. Signed-off-by: Mike Christie Message-Id: <20230321020624.13323-5-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin commit 9a10cb4de33f4c914bd2e33ac05cff3ddb6a67b0 Author: Mike Christie Date: Mon Mar 20 21:06:20 2023 -0500 vhost-scsi: Delay releasing our refcount on the tpg We currently hold the vhost_scsi_mutex the entire time we are running vhost_scsi_clear_endpoint. One of the reasons for this is that it prevents userspace from being able to free the se_tpg from under us after we have called target_undepend_item. However, it forces management operations for for other devices to have to wait on a flakey device's: vhost_scsi_clear_endpoint -> vhost_scsi_flush() call which can which can take a long time. This moves the target_undepend_item call and the tpg unsetup code to after we have stopped new IO from starting up and after we have waited on running IO. We can then release our refcount on the tpg and session knowing our device is no longer accessing them. We can then drop the vhost_scsi_mutex use during thee flush call in later patches in this set, when we have removed other reasons for holding it. Signed-off-by: Mike Christie Message-Id: <20230321020624.13323-4-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin commit 4b6ec919b84830949313c805c586fb34f141ce0c Author: Feng Liu Date: Fri Mar 10 07:34:28 2023 +0200 virtio_ring: Use const to annotate read-only pointer params Add const to make the read-only pointer parameters clear, similar to many existing functions. To implement this change, the commit also introduces the use of `container_of_const` to implement `to_vvq`, which ensures the const-ness of read-only parameters and avoids accidental modification of their members. Signed-off-by: Feng Liu Reviewed-by: Jiri Pirko Reviewed-by: Parav Pandit Reviewed-by: Gavin Li Reviewed-by: Bodong Wang Message-Id: <20230310053428.3376-4-feliu@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 1adbd6b2fc0c09645c4c30c5eb47beaa3e6ea4b4 Author: Feng Liu Date: Fri Mar 10 07:34:27 2023 +0200 virtio_ring: Avoid using inline for small functions According to kernel coding style [1], defining inline functions is not necessary and beneficial for simple functions. Hence clean up the code by removing the inline keyword. It is verified with GCC 12.2.0, the generated code with/without inline is same. Additionally tested with pktgen and iperf, and verified the result, the pps test results are the same in the cases of with/without inline. Iperf and pps of pktgen for virtio-net didn't change before and after the change. [1] https://www.kernel.org/doc/html/v6.2-rc3/process/coding-style.html#the-inline-disease Signed-off-by: Feng Liu Reviewed-by: Jiri Pirko Reviewed-by: Parav Pandit Reviewed-by: Gavin Li Reviewed-by: Bodong Wang Reviewed-by: David Edmondson Message-Id: <20230310053428.3376-3-feliu@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 6b27cd84a7917b995f66c052fd3453fdbd6e3d70 Author: Rong Tao Date: Thu Mar 9 16:42:50 2023 +0800 tools/virtio: virtio_test -h,--help should return directly When we get help information, we should return directly, and we should not execute test cases. Move the exit() directly into the help() function and remove it from case '?'. Signed-off-by: Rong Tao Message-Id: Signed-off-by: Michael S. Tsirkin commit 9b2b3de63c07123c0ec9b912d7b8e77b150e520b Author: Rong Tao Date: Thu Mar 9 14:13:20 2023 +0800 tools/virtio: virtio_test: Fix indentation Replace eight spaces with Tab. Signed-off-by: Rong Tao Message-Id: Signed-off-by: Michael S. Tsirkin commit 48cd6bc5b22d68b8bbc8601f3c7ddeed99541a0b Author: Christophe JAILLET Date: Sat Feb 18 09:10:31 2023 +0100 virtio: Reorder fields in 'struct virtqueue' Group some variables based on their sizes to reduce hole and avoid padding. On x86_64, this shrinks the size of 'struct virtqueue' from 72 to 68 bytes. It saves a few bytes of memory. Signed-off-by: Christophe JAILLET Message-Id: <8f3d2e49270a2158717e15008e7ed7228196ba02.1676707807.git.christophe.jaillet@wanadoo.fr> Signed-off-by: Michael S. Tsirkin Acked-by: Peter Lafreniere Reviewed-by: Stefano Garzarella commit e4be66e5f36b8cd2a052ba9e2ba063e6c37f5453 Author: Jacob Keller Date: Mon Feb 27 13:41:27 2023 -0800 vhost: use struct_size and size_add to compute flex array sizes The vhost_get_avail_size and vhost_get_used_size functions compute the size of structures with flexible array members with an additional 2 bytes if the VIRTIO_RING_F_EVENT_IDX feature flag is set. Convert these functions to use struct_size() and size_add() instead of coding the calculation by hand. This ensures that the calculations will saturate at SIZE_MAX rather than overflowing. Signed-off-by: Jacob Keller Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: virtualization@lists.linux-foundation.org Cc: kvm@vger.kernel.org Message-Id: <20230227214127.3678392-1-jacob.e.keller@intel.com> Signed-off-by: Michael S. Tsirkin commit c384c2401eed99a2e1f84191e573f15b898babe6 Author: Eli Cohen Date: Mon Apr 17 14:03:43 2023 +0300 vdpa/mlx5: Avoid losing link state updates Current code ignores link state updates if VIRTIO_NET_F_STATUS was not negotiated. However, link state updates could be received before feature negotiation was completed , therefore causing link state events to be lost, possibly leaving the link state down. Modify the code so link state notifier is registered after DRIVER_OK was negotiated and carry the registration only if VIRTIO_NET_F_STATUS was negotiated. Unregister the notifier when the device is reset. Fixes: 033779a708f0 ("vdpa/mlx5: make MTU/STATUS presence conditional on feature bits") Acked-by: Jason Wang Signed-off-by: Eli Cohen Message-Id: <20230417110343.138319-1-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin commit ec8f32ad9a65a8cbb465b69e154aaec9d2fe45c4 Author: Leon Romanovsky Date: Wed Apr 19 15:19:08 2023 +0300 xfrm: Fix leak of dev tracker At the stage of direction checks, the netdev reference tracker is already initialized, but released with wrong *_put() call. Fixes: 919e43fad516 ("xfrm: add an interface to offload policy") Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Signed-off-by: Steffen Klassert commit 94b95dfaa814f565d92f5a65f0ff12a483095522 Author: Leon Romanovsky Date: Wed Apr 19 15:19:07 2023 +0300 xfrm: release all offloaded policy memory Failure to add offloaded policy will cause to the following error once user will try to reload driver. Unregister_netdevice: waiting for eth3 to become free. Usage count = 2 This was caused by xfrm_dev_policy_add() which increments reference to net_device. That reference was supposed to be decremented in xfrm_dev_policy_free(). However the latter wasn't called. unregister_netdevice: waiting for eth3 to become free. Usage count = 2 leaked reference. xfrm_dev_policy_add+0xff/0x3d0 xfrm_policy_construct+0x352/0x420 xfrm_add_policy+0x179/0x320 xfrm_user_rcv_msg+0x1d2/0x3d0 netlink_rcv_skb+0xe0/0x210 xfrm_netlink_rcv+0x45/0x50 netlink_unicast+0x346/0x490 netlink_sendmsg+0x3b0/0x6c0 sock_sendmsg+0x73/0xc0 sock_write_iter+0x13b/0x1f0 vfs_write+0x528/0x5d0 ksys_write+0x120/0x150 do_syscall_64+0x3d/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Fixes: 919e43fad516 ("xfrm: add an interface to offload policy") Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Signed-off-by: Steffen Klassert commit 836a3de6b2bfe0b7c96a7104d3d567883d8a57b3 Author: Michael Ellerman Date: Thu Apr 20 15:21:49 2023 +1000 powerpc/configs/powernv: Add IGB=y Some powernv machines use IGB for networking, so build the driver in to enable net booting such machines. Suggested-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230420052149.1328094-1-mpe@ellerman.id.au commit da66ed3198162882755d5c9a147e36f02dc9be93 Author: Michael Ellerman Date: Thu Apr 20 15:16:09 2023 +1000 powerpc/configs/64s: Drop JFS Filesystem Unlikely that anyone is still regularly using JFS, drop it from the defconfig. Suggested-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230420051609.1324201-2-mpe@ellerman.id.au commit e4c02c3e6c39c3866d517388f6bb431c47743bde Author: Michael Ellerman Date: Thu Apr 20 15:16:08 2023 +1000 powerpc/configs/64s: Use EXT4 to mount EXT2 filesystems The ext4 code will mount ext2 filesystems, no need to build in both. Suggested-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230420051609.1324201-1-mpe@ellerman.id.au commit 9ecda934f43b1502c420653b02d54d4ffd7ae4cb Author: Michael Ellerman Date: Fri Apr 14 23:24:15 2023 +1000 powerpc/configs: Make pseries_defconfig an alias for ppc64le_guest Rather than trying to keep multiple configs up to date, make pseries_defconfig an alias for ppc64le_guest_defconfig. NOTE, pseries_defconfig was a big endian config, but this commit switches it to little endian. Almost all distros are ppc64le these days, so little endian is much more likely to be what a user wants when they build for "pseries". For an actual big endian guest, use ppc64_guest_defconfig. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-32-mpe@ellerman.id.au commit 596ddea8be17b5f4e2f72a0c9af313444d51d177 Author: Michael Ellerman Date: Fri Apr 14 23:24:14 2023 +1000 powerpc/configs: Make pseries_le an alias for ppc64le_guest Rather than trying to keep multiple configs up to date, make pseries_le_defconfig an alias for ppc64le_guest_defconfig. ppc64le_guest_defconfig should work in all cases that pseries_le_defconfig currently does, but if not we can update it. Move pseries_le_defconfig down in the Makefile, so it appears after ppc64le_guest_defconfig in the help output. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-31-mpe@ellerman.id.au commit bac949621c40ec09357c6a8beaacac235ae39239 Author: Michael Ellerman Date: Fri Apr 14 23:24:13 2023 +1000 powerpc/configs: Incorporate generic kvm_guest.config into guest configs Incorporate the generic kvm_guest.config into the powerpc guest configs, ppc64[le]_guest_defconfig. This brings in some useful options, in particular 9P support, and also means future additions to the generic file will be automatically picked up by the powerpc configs. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-30-mpe@ellerman.id.au commit 9ee937539e9bd0bef2ad845b3dfa34fa997775c5 Author: Michael Ellerman Date: Fri Apr 14 23:24:12 2023 +1000 powerpc/configs: Add IBMVETH=y and IBMVNIC=y to guest configs These drivers are sometimes required to have functional networking in a guest, so build them in when building ppc64[le]_guest_defconfig. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-29-mpe@ellerman.id.au commit 4f6cfb53646794a2dc14210fbfedd5c6db38ba2c Author: Michael Ellerman Date: Fri Apr 14 23:24:11 2023 +1000 powerpc/configs/64s: Enable Device Mapper options Add device mapper options for test coverage and in case folks are booting systems that require them. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-28-mpe@ellerman.id.au commit 262a3589df8cd28c152c46c166be9e552da90ed3 Author: Michael Ellerman Date: Fri Apr 14 23:24:10 2023 +1000 powerpc/configs/64s: Enable PSTORE Like pseries & powernv_defconfig, enable PSTORE. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-27-mpe@ellerman.id.au commit 48b2e99def2d92dbf2f7cb4b7f42ee8d98c56768 Author: Michael Ellerman Date: Fri Apr 14 23:24:09 2023 +1000 powerpc/configs/64s: Enable VLAN support Most other configs, and distros enable it. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-26-mpe@ellerman.id.au commit 22f615cb87af5a26c0ac91d02020575edb5aeb89 Author: Michael Ellerman Date: Fri Apr 14 23:24:08 2023 +1000 powerpc/configs/64s: Enable BLK_DEV_NVME Copy powernv_defconfig and enable BLK_DEV_NVME. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-25-mpe@ellerman.id.au commit a4f64f73b6a368c067beae20e0fac6625e8768cb Author: Michael Ellerman Date: Fri Apr 14 23:24:07 2023 +1000 powerpc/configs/64s: Drop REISERFS No reason to use this anymore. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-24-mpe@ellerman.id.au commit 649181aea2be6deaa1c9aef66e765a7ba0d077c5 Author: Michael Ellerman Date: Fri Apr 14 23:24:06 2023 +1000 powerpc/configs/64s: Use SHA512 for module signatures Modern distros use SHA512 for module signing. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-23-mpe@ellerman.id.au commit 6880db8fe1d042b164473fd865ee2ec6f5ee3df6 Author: Michael Ellerman Date: Fri Apr 14 23:24:05 2023 +1000 powerpc/configs/64s: Enable IO_STRICT_DEVMEM Distros enable it. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-22-mpe@ellerman.id.au commit d3a85f29c30d9876440c03933b3793607f616ed6 Author: Michael Ellerman Date: Fri Apr 14 23:24:04 2023 +1000 powerpc/configs/64s: Enable SCHEDSTATS Distros enable it. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-21-mpe@ellerman.id.au commit 3c18a2094ffe06626f09c923067ab284b294d5c6 Author: Michael Ellerman Date: Fri Apr 14 23:24:03 2023 +1000 powerpc/configs/64s: Enable DEBUG_VM & other options Fedora enables DEBUG_VM, which has led to occasions where a VM_BUG_ON() is not caught by upstream testing, but rather is first found in Fedora, which is not how it's meant to be. PAGE_OWNER & PAGE_POISONING both need to be enabled on the kernel command line, so should not add much overhead in normal operation. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-20-mpe@ellerman.id.au commit 7ccad8eee0d92f7566e4f9e12f2f26d74885f1a5 Author: Michael Ellerman Date: Fri Apr 14 23:24:02 2023 +1000 powerpc/configs/64s: Enable EMULATED_STATS This is enabled in some of the other powerpc configs, and can be useful for debugging, so enable it in ppc64[le]_defconfig. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-19-mpe@ellerman.id.au commit 5029aa2a47bd18c654a20a6b1a84b9e418189ad9 Author: Michael Ellerman Date: Fri Apr 14 23:24:01 2023 +1000 powerpc/configs/64s: Enable KUNIT and most tests All built as modules, so the tests only happen when the modules are loaded, not affecting normal boot time. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-18-mpe@ellerman.id.au commit 69c483660ef9735a71ca280f48584068c903c278 Author: Michael Ellerman Date: Fri Apr 14 23:24:00 2023 +1000 powerpc/configs/64s: Enable SELINUX Fedora, CentOS, RHEL & SUSE all enable it. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-17-mpe@ellerman.id.au commit 2e46fbe0881b18e4e338035958e1f49263629ca1 Author: Michael Ellerman Date: Fri Apr 14 23:23:59 2023 +1000 powerpc/configs/64s: Enable YAMA, LANDLOCK & BPF LSMs Multiple distros enable these. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-16-mpe@ellerman.id.au commit 40605274cf9b26f921df6d1875e3cf6fcc22dec0 Author: Michael Ellerman Date: Fri Apr 14 23:23:58 2023 +1000 powerpc/configs/64s: Enable SLAB hardening options Fedora & CentOS enable these. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-15-mpe@ellerman.id.au commit 90ae13b654ee58d5d0d0152d196d0419021273e6 Author: Michael Ellerman Date: Fri Apr 14 23:23:57 2023 +1000 powerpc/configs/64s: Enable ZSWAP & ZRAM Most distros enable these. In particular Fedore uses zram in the default install. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-14-mpe@ellerman.id.au commit b92c4675f0b20ccf493449c02357f0ff1241f6db Author: Michael Ellerman Date: Fri Apr 14 23:23:56 2023 +1000 powerpc/configs/64s: Enable CHECKPOINT_RESTORE Most distros enable this. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-13-mpe@ellerman.id.au commit 6c95035e06e8c38ce8d9a74f53ac49ede86e584f Author: Michael Ellerman Date: Fri Apr 14 23:23:55 2023 +1000 powerpc/configs/64s: Enable common CGROUP & related options Distros enable these options. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-12-mpe@ellerman.id.au commit ea87ec60e96e55ed034fbf1f91300b9bf12e412a Author: Michael Ellerman Date: Fri Apr 14 23:23:54 2023 +1000 powerpc/configs/64s: Enable NO_HZ_FULL At least Fedora & SUSE enable it. VIRT_CPU_ACCOUNTING_GEN is selected so no longer needs to be in the defconfig. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-11-mpe@ellerman.id.au commit 88e284b64b0b3193fc3c451d12e912f58375904c Author: Michael Ellerman Date: Fri Apr 14 23:23:53 2023 +1000 powerpc/configs/64s: Enable common accounting options These options are enabled by most distros. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-10-mpe@ellerman.id.au commit 1b813ac21b5d2c142bcbe0dbd58a23dcc8594d59 Author: Michael Ellerman Date: Fri Apr 14 23:23:52 2023 +1000 powerpc/configs/64s: Enable AUDIT Essentially all distros enable it. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-9-mpe@ellerman.id.au commit 3a4b71786e9828a0b85600013da7fbe8cb3d0138 Author: Michael Ellerman Date: Fri Apr 14 23:23:51 2023 +1000 powerpc/configs/64s: Enable PREEMPT_VOLUNTARY Traditionally on powerpc servers PREEMPT_NONE was used, but these days multiple distros are building with PREEMPT_VOLUNTARY - Ubuntu, Fedora & CentOS all enable it. So update the upstream config to reflect that, and get test coverage before code hits the distros. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-8-mpe@ellerman.id.au commit e0fe568ebbc0705fe2fe4ea62be752fad9d801d0 Author: Michael Ellerman Date: Fri Apr 14 23:23:50 2023 +1000 powerpc/configs/64s: Select ARCH_WANT_DEFAULT_BPF_JIT Tell the generic BPF code that the JIT should be enabled by default, rather than the interpreter. Most distros use CONFIG_BPF_JIT_ALWAYS_ON=y anyway, so this just updates upstream to more closely match that. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-7-mpe@ellerman.id.au commit d892ed0420e20a6423a165fdebb228590ece5f95 Author: Michael Ellerman Date: Fri Apr 14 23:23:49 2023 +1000 powerpc/configs/64s: Add secure boot options to defconfig Add the numerous options required to get secure boot enabled. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-6-mpe@ellerman.id.au commit 64fcdb2930290c84a65147410551857e60a7db2c Author: Michael Ellerman Date: Fri Apr 14 23:23:48 2023 +1000 powerpc/configs/64s: Enable PAPR_SCM This is a powerpc specific driver so add the symbols required to enable it so it gets some build/boot test coverage. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-5-mpe@ellerman.id.au commit 94d0b37feedc3701d5da4f69448d12352f437837 Author: Michael Ellerman Date: Fri Apr 14 23:23:47 2023 +1000 powerpc/configs/6s: Drop obsolete crypto ALGs These algorithms were marked obsolete in commit 1674aea5f080 ("crypto: Kconfig - mark unused ciphers as obsolete"). Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-4-mpe@ellerman.id.au commit 1ce7fda142af48f5c603cc72061e4e8bd32edab6 Author: Michael Ellerman Date: Fri Apr 14 23:23:46 2023 +1000 powerpc/configs/64s: Drop IPV6 which is default y Since commit de551f2eb22a ("net: Build IPv6 into kernel by default"), IPV6 is default y. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-3-mpe@ellerman.id.au commit 91c4ef9539c439af454674b0a617f1b855056066 Author: Michael Ellerman Date: Fri Apr 14 23:23:45 2023 +1000 powerpc/configs/64s: Drop SPLPAR which is default y SPLPAR is default y since commit 20c0e8269e9d ("powerpc/pseries: Implement paravirt qspinlocks for SPLPAR"), so doesn't need to be in the defconfig. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-2-mpe@ellerman.id.au commit cc876c7a245979e3e860da66a693fc5d94543010 Author: Michael Ellerman Date: Fri Apr 14 23:23:44 2023 +1000 powerpc/configs/64s: Update defconfig for symbol movement Update ppc64_defconfig to account for symbols moving around, no actual changes. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230414132415.821564-1-mpe@ellerman.id.au commit 22db99d673641d37c4e184ca8cff95d8441986af Author: Michael Ellerman Date: Wed Mar 29 18:23:34 2023 +1100 powerpc/Makefile: Add generated defconfigs to help output Currently none of the generated defconfigs appear in the help output, because the help text discovers defconfigs by looking for actual files named "*_defconfig". Collect the generated defconfig names into a variable and then print those out in archhelp. Output looks like eg: pseries_le_defconfig - Build for pseries_le ppc64le_defconfig - Build for ppc64le ppc64le_guest_defconfig - Build for ppc64le_guest ... ppc64_randconfig - Build for ppc64_randconfig adder875_defconfig - Build for adder875 amigaone_defconfig - Build for amigaone Signed-off-by: Michael Ellerman [mpe: Fix PHONY bug which broke in-tree build, thanks rmclure] Link: https://msgid.link/20230329072334.2023357-2-mpe@ellerman.id.au commit 8f40fc0808137c157dd408d2632e63bfca2aecdb Author: Wesley Cheng Date: Thu Apr 20 14:27:59 2023 -0700 usb: dwc3: gadget: Refactor EP0 forced stall/restart into a separate API Several sequences utilize the same routine for forcing the control endpoint back into the SETUP phase. This is required, because those operations need to ensure that EP0 is back in the default state. Acked-by: Thinh Nguyen Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/20230420212759.29429-3-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 39674be56fba1cd3a03bf4617f523a35f85fd2c1 Author: Wesley Cheng Date: Thu Apr 20 14:27:58 2023 -0700 usb: dwc3: gadget: Execute gadget stop after halting the controller Do not call gadget stop until the poll for controller halt is completed. DEVTEN is cleared as part of gadget stop, so the intention to allow ep0 events to continue while waiting for controller halt is not happening. Fixes: c96683798e27 ("usb: dwc3: ep0: Don't prepare beyond Setup stage") Cc: stable@vger.kernel.org Acked-by: Thinh Nguyen Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/20230420212759.29429-2-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 2f3a247c3994ece3acb7616965b656622bbf5243 Merge: 7ab75456be144 baa951a1c1771 Author: Jakub Kicinski Date: Thu Apr 20 20:20:51 2023 -0700 Merge branch 'net-extend-drop-reasons' Johannes Berg says: ==================== net: extend drop reasons Here's v4 of the extended drop reasons, with fixes to kernel-doc and checkpatch. ==================== Link: https://lore.kernel.org/r/20230419125254.20789-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit baa951a1c1771810f3a378a95fc93e81953027d5 Author: Johannes Berg Date: Wed Apr 19 14:52:54 2023 +0200 mac80211: use the new drop reasons infrastructure It can be really hard to analyse or debug why packets are going missing in mac80211, so add the needed infrastructure to use use the new per-subsystem drop reasons. We actually use two drop reason subsystems here because of the different handling of frames that are dropped but still go to monitor for old versions of hostapd, and those that are just completely unusable (e.g. crypto failed.) Annotate a few reasons here just to illustrate this, we'll need to go through and annotate more of them later. Signed-off-by: Johannes Berg Signed-off-by: Jakub Kicinski commit 071c0fc6fb919dcf29c676a842dda08a674877d7 Author: Johannes Berg Date: Wed Apr 19 14:52:53 2023 +0200 net: extend drop reasons for multiple subsystems Extend drop reasons to make them usable by subsystems other than core by reserving the high 16 bits for a new subsystem ID, of which 0 of course is used for the existing reasons immediately. To still be able to have string reasons, restructure that code a bit to make the loopup under RCU, the only user of this (right now) is drop_monitor. Link: https://lore.kernel.org/netdev/00659771ed54353f92027702c5bbb84702da62ce.camel@sipsolutions.net Signed-off-by: Johannes Berg Signed-off-by: Jakub Kicinski commit 5b8285cca6fed9bc5baabe2e5699a5a5c0d96371 Author: Johannes Berg Date: Wed Apr 19 14:52:52 2023 +0200 net: move dropreason.h to dropreason-core.h This will, after the next patch, hold only the core drop reasons and minimal infrastructure. Fix a small kernel-doc issue while at it, to avoid the move triggering a checker. Signed-off-by: Johannes Berg Signed-off-by: Jakub Kicinski commit 7ab75456be144a354fbb3df1516d82fc24d3d67d Author: Mahesh Bandewar Date: Tue Apr 18 18:32:38 2023 -0700 ipv6: add icmpv6_error_anycast_as_unicast for ICMPv6 ICMPv6 error packets are not sent to the anycast destinations and this prevents things like traceroute from working. So create a setting similar to ECHO when dealing with Anycast sources (icmpv6_echo_ignore_anycast). Signed-off-by: Mahesh Bandewar Reviewed-by: David Ahern Reviewed-by: Maciej Żenczykowski Link: https://lore.kernel.org/r/20230419013238.2691167-1-maheshb@google.com Signed-off-by: Jakub Kicinski commit b7b871f5dc4c854f3c1f444397493c7a7bc79c73 Merge: 787e6144aef74 e6991384ace5c Author: Jakub Kicinski Date: Thu Apr 20 20:03:24 2023 -0700 Merge branch 'ethtool-mm-api-consolidation' Vladimir Oltean says: ==================== ethtool mm API consolidation This series consolidates the behavior of the 2 drivers that implement the ethtool MAC Merge layer by making NXP ENETC commit its preemptible traffic classes to hardware only when MM TX is active (same as Ocelot). Then, after resolving an issue with the ENETC driver, it restricts user space from entering 2 states which don't make sense: - pmac-enabled off tx-enabled on verify-enabled * - pmac-enabled * tx-enabled off verify-enabled on Then, it introduces a selftest (ethtool_mm.sh) which puts everything together and tests all valid configurations known to me. This is simultaneously the v2 of "[PATCH net-next 0/2] ethtool mm API improvements": https://lore.kernel.org/netdev/20230415173454.3970647-1-vladimir.oltean@nxp.com/ which had caused some problems to openlldp. Those were solved in the meantime, see: https://github.com/intel/openlldp/commit/11171b474f6f3cbccac5d608b7f26b32ff72c651 and of "[RFC PATCH net-next] selftests: forwarding: add a test for MAC Merge layer": https://lore.kernel.org/netdev/20230210221243.228932-1-vladimir.oltean@nxp.com/ ==================== Link: https://lore.kernel.org/r/20230418111459.811553-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit e6991384ace5c9cbbe453ad1d8998b0cdaf222f5 Author: Vladimir Oltean Date: Tue Apr 18 14:14:59 2023 +0300 selftests: forwarding: add a test for MAC Merge layer The MAC Merge layer (IEEE 802.3-2018 clause 99) does all the heavy lifting for Frame Preemption (IEEE 802.1Q-2018 clause 6.7.2), a TSN feature for minimizing latency. Preemptible traffic is different on the wire from normal traffic in incompatible ways. If we send a preemptible packet and the link partner doesn't support preemption, it will drop it as an error frame and we will never know. The MAC Merge layer has a control plane of its own, which can be manipulated (using ethtool) in order to negotiate this capability with the link partner (through LLDP). Actually the TLV format for LLDP solves this problem only partly, because both partners only advertise: - if they support preemption (RX and TX) - if they have enabled preemption (TX) so we cannot tell the link partner what to do - we cannot force it to enable reception of our preemptible packets. That is fully solved by the verification feature, where the local device generates some small probe frames which look like preemptible frames with no useful content, and the link partner is obliged to respond to them if it supports the standard. If the verification times out, we know that preemption isn't active in our TX direction on the link. Having clarified the definition, this selftest exercises the manual (ethtool) configuration path of 2 link partners (with and without verification), and the LLDP code path, using the openlldp project. The test also verifies the TX activity of the MAC Merge layer by sending traffic through a traffic class configured as preemptible (using mqprio). There isn't a good way to make this really portable (user space cannot find out how many traffic classes there are for a device), but I chose num_tc 4 here, that should work reasonably well. I also know that some devices (stmmac) only permit TXQ0 to be preemptible, so this is why PREEMPTIBLE_PRIO was strategically chosen as 0. Even if other hardware is more configurable, this test should cover the baseline. This is not really a "forwarding" selftest, but I put it near the other "ethtool" selftests. $ ./ethtool_mm.sh eno0 swp0 TEST: Manual configuration with verification: eno0 to swp0 [ OK ] TEST: Manual configuration with verification: swp0 to eno0 [ OK ] TEST: Manual configuration without verification: eno0 to swp0 [ OK ] TEST: Manual configuration without verification: swp0 to eno0 [ OK ] TEST: Manual configuration with failed verification: eno0 to swp0 [ OK ] TEST: Manual configuration with failed verification: swp0 to eno0 [ OK ] TEST: LLDP [ OK ] Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit b5bf7126a6a0e706ef0e6c6cd22b2ebc23bf54a2 Author: Vladimir Oltean Date: Tue Apr 18 14:14:58 2023 +0300 selftests: forwarding: introduce helper for standard ethtool counters Counters for the MAC Merge layer and preemptible MAC have standardized so far on using structured ethtool stats as opposed to the driver specific names and meanings. Benefit from that rare opportunity and introduce a helper to lib.sh for querying standardized counters, in the hope that these will take off for other uses as well. Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 8fcac79270cae2e07e5475b682bc425b71e80595 Author: Petr Machata Date: Tue Apr 18 14:14:57 2023 +0300 selftests: forwarding: generalize bail_on_lldpad from mlxsw mlxsw selftests often invoke a bail_on_lldpad() helper to make sure LLDPAD is not running, to prevent conflicts between the QoS configuration applied through TC or DCB command line tool, and the DCB configuration that LLDPAD might apply. This helper might be useful to others. Move the function to lib.sh, and parameterize to make reusable in other contexts. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 54e906f1639e195bcb52725aab6814e2af922540 Author: Petr Machata Date: Tue Apr 18 14:14:56 2023 +0300 selftests: forwarding: sch_tbf_*: Add a pre-run hook The driver-specific wrappers of these selftests invoke bail_on_lldpad to make sure that LLDPAD doesn't trample the configuration. The function bail_on_lldpad is going to move to lib.sh in the next patch. With that, it won't be visible for the wrappers before sourcing the framework script. And after sourcing it, it is too late: the selftest will have run by then. One option might be to source NUM_NETIFS=0 lib.sh from the wrapper, but even if that worked (it might, it might not), that seems cumbersome. lib.sh is doing fair amount of stuff, and even if it works today, it does not look particularly solid as a solution. Instead, introduce a hook, sch_tbf_pre_hook(), that when available, gets invoked. Move the bail to the hook. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 35b288d6e3d467f6f7bf466fee6184b275999f14 Author: Vladimir Oltean Date: Tue Apr 18 14:14:55 2023 +0300 net: ethtool: mm: sanitize some UAPI configurations The verify-enabled boolean (ETHTOOL_A_MM_VERIFY_ENABLED) was intended to be a sub-setting of tx-enabled (ETHTOOL_A_MM_TX_ENABLED). IOW, MAC Merge TX can be enabled with or without verification, but verification with TX disabled makes no sense. The pmac-enabled boolean (ETHTOOL_A_MM_PMAC_ENABLED) was intended to be a global toggle from an API perspective, whereas tx-enabled just handles the TX direction. IOW, the pMAC can be enabled with or without TX, but it doesn't make sense to enable TX if the pMAC is not enabled. Add two checks which sanitize and reject these invalid cases. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 16a2c7634442b48ff24177d04b7ce429840b102e Author: Vladimir Oltean Date: Tue Apr 18 14:14:54 2023 +0300 net: enetc: include MAC Merge / FP registers in register dump These have been useful in debugging various problems related to frame preemption, so make them available through ethtool --register-dump for later too. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 827145392a4aad635b93e5235b7d7fecc2fa31c7 Author: Vladimir Oltean Date: Tue Apr 18 14:14:53 2023 +0300 net: enetc: only commit preemptible TCs to hardware when MM TX is active This was left as TODO in commit 01e23b2b3bad ("net: enetc: add support for preemptible traffic classes") since it's relatively complicated. Where this makes a difference is with a configuration as follows: ethtool --set-mm eno0 pmac-enabled on tx-enabled on verify-enabled on Preemptible packets should only be sent when the MAC Merge TX direction becomes active (i.o.w. when the verification process succeeds, aka when the link partner confirms it can process preemptible traffic). But the tc qdisc with the preemptible traffic classes is offloaded completely asynchronously w.r.t. the MM becoming active. The ENETC manual does suggest that this should be handled in the driver: "On startup, software should wait for the verification process to complete (MMCSR[VSTS]=011) before initiating traffic". Adding the necessary logic allows future selftests to uphold the claim that an inactive or disabled MAC Merge layer should never send data packets through the pMAC. This change moves enetc_set_ptcfpr() from enetc.c to enetc_ethtool.c, where its only caller is now - enetc_mm_commit_preemptible_tcs(). Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 153b5b1d030de3f94ecac4eec73854e4710ca6ba Author: Vladimir Oltean Date: Tue Apr 18 14:14:52 2023 +0300 net: enetc: report mm tx-active based on tx-enabled and verify-status The MMCSR register contains 2 fields with overlapping meaning: - LPA (Local preemption active): This read-only status bit indicates whether preemption is active for this port. This bit will be set if preemption is both enabled and has completed the verification process. - TXSTS (Merge status): This read-only status field provides the state of the MAC Merge sublayer transmit status as defined in IEEE Std 802.3-2018 Clause 99. 00 Transmit preemption is inactive 01 Transmit preemption is active 10 Reserved 11 Reserved However none of these 2 fields offer reliable reporting to software. When connecting ENETC to a link partner which is not capable of Frame Preemption, the expectation is that ENETC's verification should fail (VSTS=4) and its MM TX direction should be inactive (LPA=0, TXSTS=00) even though the MM TX is enabled (ME=1). But surprise, the LPA bit of MMCSR stays set even if VSTS=4 and ME=1. OTOH, the TXSTS field has the opposite problem. I cannot get its value to change from 0, even when connecting to a link partner capable of frame preemption, which does respond to its verification frames (ME=1 and VSTS=3, "SUCCEEDED"). The only option with such buggy hardware seems to be to reimplement the formula for calculating tx-active in software, which is for tx-enabled to be true, and for the verify-status to be either SUCCEEDED, or DISABLED. Without reliable tx-active reporting, we have no good indication when to commit the preemptible traffic classes to hardware, which makes it possible (but not desirable) to send preemptible traffic to a link partner incapable of receiving it. However, currently we do not have the logic to wait for TX to be active yet, so the impact is limited. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 59be75db5966f920bf5cccfd2a34b3bf222660d7 Author: Vladimir Oltean Date: Tue Apr 18 14:14:51 2023 +0300 net: enetc: fix MAC Merge layer remaining enabled until a link down event Current enetc_set_mm() is designed to set the priv->active_offloads bit ENETC_F_QBU for enetc_mm_link_state_update() to act on, but if the link is already up, it modifies the ENETC_MMCSR_ME ("Merge Enable") bit directly. The problem is that it only *sets* ENETC_MMCSR_ME if the link is up, it doesn't *clear* it if needed. So subsequent enetc_get_mm() calls still see tx-enabled as true, up until a link down event, which is when enetc_mm_link_state_update() will get called. This is not a functional issue as far as I can assess. It has only come up because I'd like to uphold a simple API rule in core ethtool code: the pMAC cannot be disabled if TX is going to be enabled. Currently, the fact that TX remains enabled for longer than expected (after the enetc_set_mm() call that disables it) is going to violate that rule, which is how it was caught. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 787e6144aef74e73f88875cb5d3a5af01701af6f Author: Slark Xiao Date: Thu Apr 20 10:36:17 2023 +0800 wwan: core: add print for wwan port attach/disconnect Refer to USB serial device or net device, there is a notice to let end user know the status of device, like attached or disconnected. Add attach/disconnect print for wwan device as well. Signed-off-by: Slark Xiao Reviewed-by: Loic Poulain Link: https://lore.kernel.org/r/20230420023617.3919569-1-slark_xiao@163.com Signed-off-by: Jakub Kicinski commit 4a892c0fe4bb0546d68a89fa595bd22cb4be2576 Author: Al Viro Date: Sun Aug 21 14:02:15 2022 -0400 fuse_dev_ioctl(): switch to fdget() Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 2f31fa029d99f3614e76e3ea4f2e9832c13ba429 Author: Al Viro Date: Sun Aug 21 12:01:26 2022 -0400 cgroup_get_from_fd(): switch to fdget_raw() Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 1d0027dc9a3c2be501de625feca2eaac7f67b509 Author: Al Viro Date: Wed Aug 3 20:13:33 2022 -0400 bpf: switch to fdget_raw() Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 96e85e95dc22d53650cbd499e963c70103c06738 Author: Al Viro Date: Mon Jun 6 00:30:50 2022 -0400 build_mount_idmapped(): switch to fdget() Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 38e124086282715e3b9b3d193d9308bb3499b46c Author: Al Viro Date: Sun May 15 18:16:54 2022 -0400 kill the last remaining user of proc_ns_fget() lookups by descriptor are better off closer to syscall surface... Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit d2084fd84569fb7054c97ae6ffaf2755086fd267 Author: Al Viro Date: Sat May 14 19:45:22 2022 -0400 SVM-SEV: convert the rest of fget() uses to fdget() in there Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit e73d43760ad938428537dd6ccbb3653297a1bd69 Author: Al Viro Date: Sat May 14 19:40:47 2022 -0400 convert sgx_set_attribute() to fdget()/fdput() Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 281117ccb2d2511d03f592dfec7ffdc33651e9b3 Author: Al Viro Date: Sat May 14 19:33:38 2022 -0400 convert setns(2) to fdget()/fdput() Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 9bc37e04823b5280dd0f22b6680fc23fe81ca325 Author: Al Viro Date: Thu Mar 16 07:34:34 2023 +0900 fs: introduce lock_rename_child() helper Pass the dentry of a source file and the dentry of a destination directory to lock parent inodes for rename. As soon as this function returns, ->d_parent of the source file dentry is stable and inodes are properly locked for calling vfs-rename. This helper is needed for ksmbd server. rename request of SMB protocol has to rename an opened file, no matter which directory it's in. Signed-off-by: Al Viro Signed-off-by: Namjae Jeon Signed-off-by: Al Viro commit 211db0ac9e3dc6c46f2dd53395b34d76af929faf Author: Namjae Jeon Date: Thu Mar 16 07:34:33 2023 +0900 ksmbd: remove internal.h include Since vfs_path_lookup is exported, It should not be internal. Move vfs_path_lookup prototype in internal.h to linux/namei.h. Suggested-by: Al Viro Reviewed-by: Christian Brauner Signed-off-by: Namjae Jeon Signed-off-by: Al Viro commit 8fa66e4a1bdd41d55d7842928e60a40fed65715d Author: Jakub Kicinski Date: Wed Apr 19 19:00:05 2023 -0700 net: skbuff: update and rename __kfree_skb_defer() __kfree_skb_defer() uses the old naming where "defer" meant slab bulk free/alloc APIs. In the meantime we also made __kfree_skb_defer() feed the per-NAPI skb cache, which implies bulk APIs. So take away the 'defer' and add 'napi'. While at it add a drop reason. This only matters on the tx_action path, if the skb has a frag_list. But getting rid of a SKB_DROP_REASON_NOT_SPECIFIED seems like a net benefit so why not. Reviewed-by: Alexander Lobakin Link: https://lore.kernel.org/r/20230420020005.815854-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 61718206ee5de9cc2c3503c59287c0b968446508 Author: Jakub Kicinski Date: Wed Apr 19 18:58:02 2023 -0700 eth: mlx5: avoid iterator use outside of a loop Fix the following warning about risky iterator use: drivers/net/ethernet/mellanox/mlx5/core/eq.c:1010 mlx5_comp_irq_get_affinity_mask() warn: iterator used outside loop: 'eq' Acked-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230420015802.815362-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 8c966a10eb8478dea333a0f7f77b11c3cb3f7dcb Author: Simon Horman Date: Wed Apr 19 13:34:35 2023 +0200 flow_dissector: Address kdoc warnings Address a number of warnings flagged by ./scripts/kernel-doc -none include/net/flow_dissector.h include/net/flow_dissector.h:23: warning: Function parameter or member 'addr_type' not described in 'flow_dissector_key_control' include/net/flow_dissector.h:23: warning: Function parameter or member 'flags' not described in 'flow_dissector_key_control' include/net/flow_dissector.h:46: warning: Function parameter or member 'padding' not described in 'flow_dissector_key_basic' include/net/flow_dissector.h:145: warning: Function parameter or member 'tipckey' not described in 'flow_dissector_key_addrs' include/net/flow_dissector.h:157: warning: cannot understand function prototype: 'struct flow_dissector_key_arp ' include/net/flow_dissector.h:171: warning: cannot understand function prototype: 'struct flow_dissector_key_ports ' include/net/flow_dissector.h:203: warning: cannot understand function prototype: 'struct flow_dissector_key_icmp ' Also improve indentation on adjacent lines to those changed to address the above. No functional changes intended. Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20230419-flow-dissector-kdoc-v1-1-1aa0cca1118b@kernel.org Signed-off-by: Jakub Kicinski commit e375b503943f512cdd3a7dd12849972b7a006076 Author: Jeroen de Borst Date: Wed Apr 19 14:05:58 2023 -0700 gve: update MAINTAINERS This reflects role changes in our team. Signed-off-by: Jeroen de Borst Signed-off-by: Praveen Kaligineedi Link: https://lore.kernel.org/r/20230419210558.1893400-1-jeroendb@google.com Signed-off-by: Jakub Kicinski commit dd64b232deb8d48812a2ea739d1fedaeaffb59ed Author: Jakub Kicinski Date: Wed Apr 19 11:20:06 2023 -0700 page_pool: unlink from napi during destroy Jesper points out that we must prevent recycling into cache after page_pool_destroy() is called, because page_pool_destroy() is not synchronized with recycling (some pages may still be outstanding when destroy() gets called). I assumed this will not happen because NAPI can't be scheduled if its page pool is being destroyed. But I missed the fact that NAPI may get reused. For instance when user changes ring configuration driver may allocate a new page pool, stop NAPI, swap, start NAPI, and then destroy the old pool. The NAPI is running so old page pool will think it can recycle to the cache, but the consumer at that point is the destroy() path, not NAPI. To avoid extra synchronization let the drivers do "unlinking" during the "swap" stage while NAPI is indeed disabled. Fixes: 8c48eea3adf3 ("page_pool: allow caching from safely localized NAPI") Reported-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/all/e8df2654-6a5b-3c92-489d-2fe5e444135f@redhat.com/ Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/r/20230419182006.719923-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 4bb7aac70b5d8a4bddf4ee0791b834f9f56883d2 Author: Arnd Bergmann Date: Thu Apr 20 10:45:51 2023 +0200 net: phy: fix circular LEDS_CLASS dependencies The CONFIG_PHYLIB symbol is selected by a number of device drivers that need PHY support, but it now has a dependency on CONFIG_LEDS_CLASS, which may not be enabled, causing build failures. Avoid the risk of missing and circular dependencies by guarding the phylib LED support itself in another Kconfig symbol that can only be enabled if the dependency is met. This could be made a hidden symbol and always enabled when both CONFIG_OF and CONFIG_LEDS_CLASS are reachable from the phylib, but there may be an advantage in having users see this option when they have a misconfigured kernel without built-in LED support. Fixes: 01e5b728e9e4 ("net: phy: Add a binding for PHY LEDs") Signed-off-by: Arnd Bergmann Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230420084624.3005701-1-arnd@kernel.org Signed-off-by: Jakub Kicinski commit 034ff37d34071ff3f48755f728cd229e42a4f15d Author: Linus Torvalds Date: Thu Apr 20 15:13:50 2023 -0700 x86: rewrite '__copy_user_nocache' function I didn't really want to do this, but as part of all the other changes to the user copy loops, I've been looking at this horror. I tried to clean it up multiple times, but every time I just found more problems, and the way it's written, it's just too hard to fix them. For example, the code is written to do quad-word alignment, and will use regular byte accesses to get to that point. That's fairly simple, but it means that any initial 8-byte alignment will be done with cached copies. However, the code then is very careful to do any 4-byte _tail_ accesses using an uncached 4-byte write, and that was claimed to be relevant in commit a82eee742452 ("x86/uaccess/64: Handle the caching of 4-byte nocache copies properly in __copy_user_nocache()"). So if you do a 4-byte copy using that function, it carefully uses a 4-byte 'movnti' for the destination. But if you were to do a 12-byte copy that is 4-byte aligned, it would _not_ do a 4-byte 'movnti' followed by a 8-byte 'movnti' to keep it all uncached. Instead, it would align the destination to 8 bytes using a byte-at-a-time loop, and then do a 8-byte 'movnti' for the final 8 bytes. The main caller that cares is __copy_user_flushcache(), which knows about this insanity, and has odd cases for it all. But I just can't deal with looking at this kind of "it does one case right, and another related case entirely wrong". And the code really wasn't fixable without hard drugs, which I try to avoid. So instead, rewrite it in a form that hopefully not only gets this right, but is a bit more maintainable. Knock wood. Signed-off-by: Linus Torvalds commit 081abcacaf0a9505c0d4cc9780b12e6ce5d33630 Author: Vlad Buslov Date: Thu Apr 13 15:06:59 2023 +0200 Revert "net/mlx5e: Don't use termination table when redundant" This reverts commit 14624d7247fcd0f3114a6f5f17b3c8d1020fbbb7. The termination table usage is requires for DMFS steering mode as firmware doesn't support mixed table destinations list which causes following syndrome with hairpin rules: [81922.283225] mlx5_core 0000:08:00.0: mlx5_cmd_out_err:803:(pid 25977): SET_FLOW_TABLE_ENTRY(0x936) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0xaca205), err(-22) Fixes: 14624d7247fc ("net/mlx5e: Don't use termination table when redundant") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 1b540decd03acd736693aabb6cb46c71fca38ae6 Author: Aya Levin Date: Sun Mar 12 16:37:36 2023 +0200 net/mlx5e: Nullify table pointer when failing to create On failing to create promisc flow steering table, the pointer is returned with an error. Nullify it so unloading the driver won't try to destroy a non existing table. Failing to create promisc table may happen over BF devices when the ARM side is going through a firmware tear down. The host side start a reload flow. While the driver unloads, it tries to remove the promisc table. Remove WARN in this state as it is a valid error flow. Fixes: 1c46d7409f30 ("net/mlx5e: Optimize promiscuous mode") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit dfad99750c0f83b0242572a573afa2c055f85b36 Author: Moshe Shemesh Date: Sun Apr 2 06:49:53 2023 +0300 net/mlx5: Use recovery timeout on sync reset flow Use the same timeout for sync reset flow and health recovery flow, since the former involves driver's recovery from firmware reset, which is similar to health recovery. Otherwise, in some cases, such as a firmware upgrade on the DPU, the firmware pre-init bit may not be ready within current timeout and the driver will abort loading back after reset. Signed-off-by: Moshe Shemesh Fixes: 37ca95e62ee2 ("net/mlx5: Increase FW pre-init timeout for health recovery") Reviewed-by: Maher Sanalla Signed-off-by: Saeed Mahameed commit 21608a2cf38e9f743636b5f86507ffbca18ecee7 Author: Moshe Shemesh Date: Sun Apr 9 10:44:31 2023 +0300 Revert "net/mlx5: Remove "recovery" arg from mlx5_load_one() function" This reverts commit 5977ac3910f1cbaf44dca48179118b25c206ac29. Revert this patch as we need the "recovery" arg back in mlx5_load_one() function. This arg will be used in the next patch for using recovery timeout during sync reset flow. Signed-off-by: Moshe Shemesh Reviewed-by: Maher Sanalla Signed-off-by: Saeed Mahameed commit 0a6b069cc60d68d33b4f6e7dd7f1adc3ec749766 Author: Roi Dayan Date: Wed Mar 29 15:24:32 2023 +0300 net/mlx5e: Fix error flow in representor failing to add vport rx rule On representor init rx error flow the flow steering pointer is being released so mlx5e_attach_netdev() doesn't have a valid fs pointer in its error flow. Make sure the pointer is nullified when released and add a check in mlx5e_fs_cleanup() to verify fs is not null as representor cleanup callback would be called anyway. Fixes: af8bbf730068 ("net/mlx5e: Convert mlx5e_flow_steering member of mlx5e_priv to pointer") Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 4fbef0f8ea6350eaea89b1e3175f9325252913ac Author: Chris Mi Date: Tue Apr 4 03:45:04 2023 +0300 net/mlx5: Release tunnel device after tc update skb The cited commit causes a regression. Tunnel device is not released after tc update skb if skb needs to be freed. The following error message will be printed: unregister_netdevice: waiting for vxlan1 to become free. Usage count = 11 Fix it by releasing tunnel device if skb needs to be freed. Fixes: 93a1ab2c545b ("net/mlx5: Refactor tc miss handling to a single function") Signed-off-by: Chris Mi Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 4c8189302567f75099a336b0efcff8291ec86ff4 Author: Chris Mi Date: Fri Mar 10 09:56:08 2023 +0200 net/mlx5: E-switch, Don't destroy indirect table in split rule Source port rewrite (forward to ovs internal port or statck device) isn't supported in the rule of split action. So there is no indirect table in split rule. The cited commit destroyes indirect table in split rule. The indirect table for other rules will be destroyed wrongly. It will cause traffic loss. Fix it by removing the destroy function in split rule. And also remove the destroy function in error flow. Fixes: 10742efc20a4 ("net/mlx5e: VF tunnel TX traffic offloading") Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit fd745f4c0abe41ebb09d11bf622b054a0f3e7b49 Author: Chris Mi Date: Fri Mar 10 11:06:48 2023 +0200 net/mlx5: E-switch, Create per vport table based on devlink encap mode Currently when creating per vport table, create flags are hardcoded. Devlink encap mode is set based on user input and HW capability. Create per vport table based on devlink encap mode. Fixes: c796bb7cd230 ("net/mlx5: E-switch, Generalize per vport table API") Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 8ac04a28144cfa89b61be518268233742c23d88d Author: Vlad Buslov Date: Fri Mar 24 17:52:17 2023 +0100 net/mlx5e: Release the label when replacing existing ct entry Cited commit doesn't release the label mapping when replacing existing ct entry which leads to following memleak report: unreferenced object 0xffff8881854cf280 (size 96): comm "kworker/u48:74", pid 23093, jiffies 4296664564 (age 175.944s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<000000002722d368>] __kmalloc+0x4b/0x1c0 [<00000000cc44e18f>] mapping_add+0x6e8/0xc90 [mlx5_core] [<000000003ad942a7>] mlx5_get_label_mapping+0x66/0xe0 [mlx5_core] [<00000000266308ac>] mlx5_tc_ct_entry_create_mod_hdr+0x1c4/0xf50 [mlx5_core] [<000000009a768b4f>] mlx5_tc_ct_entry_add_rule+0x16f/0xaf0 [mlx5_core] [<00000000a178f3e5>] mlx5_tc_ct_block_flow_offload_add+0x10cb/0x1f90 [mlx5_core] [<000000007b46c496>] mlx5_tc_ct_block_flow_offload+0x14a/0x630 [mlx5_core] [<00000000a9a18ac5>] nf_flow_offload_tuple+0x1a3/0x390 [nf_flow_table] [<00000000d0881951>] flow_offload_work_handler+0x257/0xd30 [nf_flow_table] [<000000009e4935a4>] process_one_work+0x7c2/0x13e0 [<00000000f5cd36a7>] worker_thread+0x59d/0xec0 [<00000000baed1daf>] kthread+0x28f/0x330 [<0000000063d282a4>] ret_from_fork+0x1f/0x30 Fix the issue by correctly releasing the label mapping. Fixes: 94ceffb48eac ("net/mlx5e: Implement CT entry update") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit e9fce818fe003b6c527f25517b9ac08eb4661b5d Author: Vlad Buslov Date: Wed Mar 22 09:52:26 2023 +0100 net/mlx5e: Don't clone flow post action attributes second time The code already clones post action attributes in mlx5e_clone_flow_attr_for_post_act(). Creating another copy in mlx5e_tc_post_act_add() is a erroneous leftover from original implementation. Instead, assign handle->attribute to post_attr provided by the caller. Note that cloning the attribute second time is not just wasteful but also causes issues like second copy not being properly updated in neigh update code which leads to following use-after-free: Feb 21 09:02:00 c-237-177-40-045 kernel: BUG: KASAN: use-after-free in mlx5_cmd_set_fte+0x200d/0x24c0 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: kasan_report+0xbb/0x1a0 Feb 21 09:02:00 c-237-177-40-045 kernel: kasan_save_stack+0x1e/0x40 Feb 21 09:02:00 c-237-177-40-045 kernel: kasan_set_track+0x21/0x30 Feb 21 09:02:00 c-237-177-40-045 kernel: __kasan_kmalloc+0x7a/0x90 Feb 21 09:02:00 c-237-177-40-045 kernel: kasan_save_stack+0x1e/0x40 Feb 21 09:02:00 c-237-177-40-045 kernel: kasan_set_track+0x21/0x30 Feb 21 09:02:00 c-237-177-40-045 kernel: kasan_save_free_info+0x2a/0x40 Feb 21 09:02:00 c-237-177-40-045 kernel: ____kasan_slab_free+0x11a/0x1b0 Feb 21 09:02:00 c-237-177-40-045 kernel: page dumped because: kasan: bad access detected Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5_core 0000:08:00.0: mlx5_cmd_out_err:803:(pid 8833): SET_FLOW_TABLE_ENTRY(0x936) op_mod(0x0) failed, status bad resource state(0x9), syndrome (0xf2ff71), err(-22) Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5_core 0000:08:00.0 enp8s0f0: Failed to add post action rule Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5_core 0000:08:00.0: mlx5e_tc_encap_flows_add:190:(pid 8833): Failed to update flow post acts, -22 Feb 21 09:02:00 c-237-177-40-045 kernel: Call Trace: Feb 21 09:02:00 c-237-177-40-045 kernel: Feb 21 09:02:00 c-237-177-40-045 kernel: dump_stack_lvl+0x57/0x7d Feb 21 09:02:00 c-237-177-40-045 kernel: print_report+0x170/0x471 Feb 21 09:02:00 c-237-177-40-045 kernel: ? mlx5_cmd_set_fte+0x200d/0x24c0 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: kasan_report+0xbb/0x1a0 Feb 21 09:02:00 c-237-177-40-045 kernel: ? mlx5_cmd_set_fte+0x200d/0x24c0 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5_cmd_set_fte+0x200d/0x24c0 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: ? __module_address.part.0+0x62/0x200 Feb 21 09:02:00 c-237-177-40-045 kernel: ? mlx5_cmd_stub_create_flow_table+0xd0/0xd0 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: ? __raw_spin_lock_init+0x3b/0x110 Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5_cmd_create_fte+0x80/0xb0 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: add_rule_fg+0xe80/0x19c0 [mlx5_core] -- Feb 21 09:02:00 c-237-177-40-045 kernel: Allocated by task 13476: Feb 21 09:02:00 c-237-177-40-045 kernel: kasan_save_stack+0x1e/0x40 Feb 21 09:02:00 c-237-177-40-045 kernel: kasan_set_track+0x21/0x30 Feb 21 09:02:00 c-237-177-40-045 kernel: __kasan_kmalloc+0x7a/0x90 Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5_packet_reformat_alloc+0x7b/0x230 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5e_tc_tun_create_header_ipv4+0x977/0xf10 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5e_attach_encap+0x15b4/0x1e10 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: post_process_attr+0x305/0xa30 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5e_tc_add_fdb_flow+0x4c0/0xcf0 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: __mlx5e_add_fdb_flow+0x7cf/0xe90 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5e_configure_flower+0xcaa/0x4b90 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5e_rep_setup_tc_cls_flower+0x99/0x1b0 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5e_rep_setup_tc_cb+0x133/0x1e0 [mlx5_core] -- Feb 21 09:02:00 c-237-177-40-045 kernel: Freed by task 8833: Feb 21 09:02:00 c-237-177-40-045 kernel: kasan_save_stack+0x1e/0x40 Feb 21 09:02:00 c-237-177-40-045 kernel: kasan_set_track+0x21/0x30 Feb 21 09:02:00 c-237-177-40-045 kernel: kasan_save_free_info+0x2a/0x40 Feb 21 09:02:00 c-237-177-40-045 kernel: ____kasan_slab_free+0x11a/0x1b0 Feb 21 09:02:00 c-237-177-40-045 kernel: __kmem_cache_free+0x1de/0x400 Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5_packet_reformat_dealloc+0xad/0x100 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5e_tc_encap_flows_del+0x3c0/0x500 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5e_rep_update_flows+0x40c/0xa80 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: mlx5e_rep_neigh_update+0x473/0x7a0 [mlx5_core] Feb 21 09:02:00 c-237-177-40-045 kernel: process_one_work+0x7c2/0x1310 Feb 21 09:02:00 c-237-177-40-045 kernel: worker_thread+0x59d/0xec0 Feb 21 09:02:00 c-237-177-40-045 kernel: kthread+0x28f/0x330 Fixes: 8300f225268b ("net/mlx5e: Create new flow attr for multi table actions") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit f9c895a72a390656f9582e048fdcc3d2cec1dd7c Author: Roi Dayan Date: Wed Mar 22 10:21:46 2023 +0200 net/mlx5: Update op_mode to op_mod for port selection To be consistent with the other enum keys use OP_MOD instead of OP_MODE. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 38d9a740f68d8bbe92029cdd9eb6259e3974e52a Author: Roi Dayan Date: Tue Mar 21 15:40:02 2023 +0200 net/mlx5: E-Switch, Remove unused mlx5_esw_offloads_vport_metadata_set() Remove unused function which also seems a duplicate of esw_port_metadata_set(). Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 8ca52ada6267fb67d31a5bf7d568a54d793c759e Author: Roi Dayan Date: Tue Mar 21 10:32:03 2023 +0200 net/mlx5: E-Switch, Remove redundant dev arg from mlx5_esw_vport_alloc() The passded esw->dev is redundant as esw being passed and esw->dev being used inside. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 45e261b7b821139556d039b69c9101207c152a50 Author: Eli Cohen Date: Sun Apr 2 15:17:09 2023 +0300 net/mlx5: Include linux/pci.h for pci_msix_can_alloc_dyn() Add include directive to assure pci_msix_can_alloc_dyn() prototype. Fixes: 3354822cde5a ("net/mlx5: Use dynamic msix vectors allocation") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303291328.sNmTyyWF-lkp@intel.com/ Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed commit a880f814739c84fa11e17ac87c91fb711c185610 Author: Dragos Tatulea Date: Thu Apr 13 17:14:05 2023 +0300 net/mlx5e: RX, Hook NAPIs to page pools Linking the NAPI to the rq page_pool to improve page_pool cache usage during skb recycling. Here are the observed improvements for a iperf single stream test case: - For 1500 MTU and legacy rq, seeing a 20% improvement of cache usage. - For 9K MTU, seeing 33-40 % page_pool cache usage improvements for both striding and legacy rq (depending if the application is running on the same core as the rq or not). Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 40afb3b14496afb01d5b3d028444e09d29b95559 Author: Dragos Tatulea Date: Mon Apr 3 20:03:11 2023 +0300 net/mlx5e: RX, Fix XDP_TX page release for legacy rq nonlinear case When the XDP handler marks the data for transmission (XDP_TX), it is incorrect to release the page fragment. Instead, the fragments should be marked as MLX5E_WQE_FRAG_SKIP_RELEASE because XDP will release the page directly to the page_pool (page_pool_put_defragged_page) after TX completion. The linear case already does this. This patch fixes the nonlinear part as well. Also, the looping over the fragments was incorrect: When handling pages after XDP_TX in the legacy rq nonlinear case, the loop was skipping the first wqe fragment. Fixes: 3f93f82988bc ("net/mlx5e: RX, Defer page release in legacy rq for better recycling") Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit c8e9090233a70b8bbd8a73521a7a81856695732f Author: Dragos Tatulea Date: Thu Mar 30 19:37:00 2023 +0300 net/mlx5e: RX, Fix releasing page_pool pages twice for striding RQ mlx5e_free_rx_descs is responsible for calling the dealloc_wqe op which returns pages to the page_pool. This can happen during flush or close. For XSK, the regular RQ is flushed (when replaced by the XSK RQ) and also closed later. This is normally not a problem as the wqe list is empty on a second call to mlx5e_free_rx_descs. However, for striding RQ, the previously released wqes from the list will appear as missing and will be released a second time by mlx5e_free_rx_missing_descs. This patch sets the no release bits on the striding RQ wqes in the dealloc_wqe op to prevent releasing the pages a second time. Please note that the bits are set only in the control path during close and not in the data path. Fixes: 4c2a13236807 ("net/mlx5e: RX, Defer page release in striding rq for better recycling") Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit cf14af140a5ad0937d385ce693100f33f02e9c54 Author: Maher Sanalla Date: Tue Mar 21 13:33:00 2023 +0200 net/mlx5e: Add vnic devlink health reporter to representors Create a new devlink health reporter for representor interface, which reports the values of representor vnic diagnostic counters when diagnosed. This patch will allow admins to monitor VF diagnostic counters through the representor-interface vnic reporter. Example of usage: $ devlink health diagnose pci/0000:08:00.0/65537 reporter vnic vNIC env counters: total_error_queues: 0 send_queue_priority_update_flow: 0 comp_eq_overrun: 0 async_eq_overrun: 0 cq_overrun: 0 invalid_command: 0 quota_exceeded_command: 0 nic_receive_steering_discard: 0 Signed-off-by: Maher Sanalla Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit b0bc615df488abd0e95107e4a9ecefb9bf8c250a Author: Maher Sanalla Date: Tue Mar 21 00:10:16 2023 +0200 net/mlx5: Add vnic devlink health reporter to PFs/VFs Create a vnic devlink health reporter for PFs/VFs interfaces. The reporter's diagnose callback displays the values of vNIC/vport transport debug counters of PFs/VFs, as follows: $ devlink health diagnose pci/0000:08:00.0 reporter vnic vNIC env counters: total_error_queues: 0 send_queue_priority_update_flow: 0 comp_eq_overrun: 0 async_eq_overrun: 0 cq_overrun: 0 invalid_command: 0 quota_exceeded_command: 0 nic_receive_steering_discard: 0 Moreover, add documentation on the reporter functionality and the counters description. While at it, expose the vNIC counters diagnose function to be used by the downstream patch, which will reveal the counters for representor interfaces. Signed-off-by: Maher Sanalla Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 0a431418f685e100c45ff150efaf4a5afa6f1982 Author: Maher Sanalla Date: Mon Mar 20 19:43:47 2023 +0200 Revert "net/mlx5: Expose vnic diagnostic counters for eswitch managed vports" This reverts commit 606e6a72e29dff9e3341c4cc9b554420e4793f401 which exposes the vnic diagnostic counters via debugfs. Instead, The upcoming series will expose the same counters through devlink health reporter. Signed-off-by: Maher Sanalla Signed-off-by: Saeed Mahameed commit e267b8a52ca5d5e8434929a5e9f5574aed141024 Author: Maher Sanalla Date: Mon Mar 20 19:43:27 2023 +0200 Revert "net/mlx5: Expose steering dropped packets counter" This reverts commit 4fe1b3a5f8fe2fdcedcaba9561e5b0ae5cb1d15b, which exposes the steering dropped packets counter via debugfs. The upcoming series will expose the counter via devlink health reporter instead of debugfs. Signed-off-by: Maher Sanalla Signed-off-by: Saeed Mahameed commit 57295e069cd8f7ac79f03d732ac17afb9f790ba5 Author: Yevgeny Kliteynik Date: Wed Nov 9 01:39:32 2022 +0200 net/mlx5: DR, Add memory statistics for domain object Add counters for number of buddies that are currently in use per domain per buddy type (STE, MODIFY-HEADER, MODIFY-PATTERN). Signed-off-by: Erez Shitrit Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit cedb6665bc331054a3477ac29ccac5e399c972da Author: Yevgeny Kliteynik Date: Wed Nov 9 01:35:24 2022 +0200 net/mlx5: DR, Add more info in domain dbg dump Add additinal items to domain info dump: Linux version and device name. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 72b2cff68405e91ee5e772385b68eb4442bcbf43 Author: Yevgeny Kliteynik Date: Tue Nov 8 17:45:03 2022 +0200 net/mlx5: DR, Calculate sync threshold of each pool according to its type When certain ICM chunk is no longer needed, it needs to be freed. Fully freeing ICM memory involves issuing FW SYNC_STEERING command. This is very time consuming, and it is impractical to do it for every freed chunk. Instead, we manage these 'freed' chunks in hot list (list of chunks that are not required by SW any more, but HW might still access them). When size of the hot list reaches certain threshold, we purge it and issue SYNC_STEERING FW command. There is one threshold for all the different ICM types, which is not optimal, as different ICM types require different approach: STEs pool is very large, and it is very 'dynamic' in its nature, so letting hot list to become too large will result in a significant perf hiccup when purging the hot list. Modify action is much smaller and less dynamic, so we can let the hot list to grow to almost the size of the whole pool. This patch fixes this problem: instead of having same hot memory threshold for all the pools, sync operation will be triggered in accordance with the ICM type. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 075056005d8cceecbbb8e054d8e3cd2b7519d9c6 Author: Yevgeny Kliteynik Date: Sun Jan 1 00:20:53 2023 +0200 net/mlx5: DR, Fix dumping of legacy modify_hdr in debug dump The steering dump parser expects to see 0 as rewrite num of actions in case pattern/args aren't supported - parsing of legacy modify header is based on this assumption. Fix this to align to parser's expectation. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 54d85d6966ca1dafa0b05f163a425060e8be3120 Author: Brian Masney Date: Tue Apr 11 15:21:53 2023 -0400 docs: clk: add documentation to log which clocks have been disabled The existing clk documentation has a section that talks about the clk_ignore_unused kernel parameter. Add additional documentation that describes how to log which clocks the kernel disables on bootup. This will log messages like the following to the console on bootup: [ 1.268115] clk: Disabling unused clocks [ 1.272167] clk_disable: gcc_usb_clkref_en [ 1.276389] clk_disable: gcc_usb30_sec_sleep_clk [ 1.281131] clk_disable: gcc_usb30_prim_sleep_clk ... Signed-off-by: Brian Masney Link: https://lore.kernel.org/r/20230411192153.289688-1-bmasney@redhat.com [jc: turned parameters into a literal block] Signed-off-by: Jonathan Corbet commit c9b951c3136fb04a9bb89deef5bba8e262410f68 Author: Lin Yu Chen Date: Wed Apr 12 11:37:39 2023 -0700 docs: trace: Fix typo in ftrace.rst There is a typo in the sentence "A kernel developer must be conscience ...". The word conscience should be conscious. This patch fixes it. Signed-off-by: Lin Yu Chen Acked-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20230412183739.89894-1-starpt.official@gmail.com Signed-off-by: Jonathan Corbet commit c0d747a5b226f36cebdce6da3a3c54ba5a301455 Author: Krzysztof Kozlowski Date: Thu Apr 13 18:55:01 2023 +0200 Documentation/process: always CC responsible lists The "Select the recipients for your patch" part about CC-ing mailing lists is a bit vague and might be understood that only some lists should be Cc-ed. That's not what most of the maintainers expect. For given code, associated mailing list must always be CC-ed, because the list is used for reviewing and testing patches. Example are the Devicetree bindings patches, which are tested iff Devicetree mailing list is CC-ed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230413165501.47442-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Corbet commit a110f8eb6a56d2796f59f6ced9b79d55bfd56839 Author: Lukas Bulwahn Date: Fri Apr 14 08:12:41 2023 +0200 docs: kmemleak: adjust to config renaming Commit c87db8ca0902 ("kmemleak-test: fix kmemleak_test.c build logic") essentially renames the config DEBUG_KMEMLEAK_TEST to SAMPLE_KMEMLEAK, but misses to adjust the documentation. Adjust kmemleak documentation to this config renaming. Signed-off-by: Lukas Bulwahn Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20230414061241.12754-1-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet commit 5c2c34a49be8fa534379c64579671feea52432b9 Author: Alexey Dobriyan Date: Sat Apr 15 20:37:29 2023 +0300 ELF: document some de-facto PT_* ABI quirks Turns out rules about PT_INTERP, PT_GNU_STACK and PT_GNU_PROPERTY program headers are slightly different. Signed-off-by: Alexey Dobriyan Link: https://lore.kernel.org/r/88d3f1bb-f4e0-4c40-9304-3843513a1262@p183 Signed-off-by: Jonathan Corbet commit 4de3790a6313dd6596ba7d0391ade94a21ee10b5 Author: Alain Volmat Date: Sun Apr 16 20:53:48 2023 +0200 Documentation: arm: remove stih415/stih416 related entries ST's STiH415 and STiH416 platforms support have been removed since a long time already. This commit updates the sti related documentation overview to remove related entries and update the sti part to add STiH407/STiH410 and STiH418 platforms which are still actively supported. Signed-off-by: Alain Volmat Link: https://lore.kernel.org/r/20230416185349.18156-1-avolmat@me.com Signed-off-by: Jonathan Corbet commit eaae75754d8192623a33a2d29bf1892c12965113 Author: Jonathan Corbet Date: Thu Apr 20 09:34:35 2023 -0600 docs: turn off "smart quotes" in the HTML build We have long disabled the "html_use_smartypants" option to prevent Sphinx from mangling "--" sequences (among others). Unfortunately, Sphinx changed that option to "smartquotes" in the 1.6.6 release, and seemingly didn't see fit to warn about the use of the obsolete option, resulting in the aforementioned mangling returning. Disable this behavior again and hope that the option name stays stable for a while. Reported-by: Zipeng Zhang Link: https://lore.kernel.org/lkml/tencent_CB1A298D31FD221496FF657CD7EF406E6605@qq.com Reviewed-by: Miguel Ojeda Signed-off-by: Jonathan Corbet commit 267a6e4e7870beb8896c192da175800e47c82407 Merge: 4b7ef71ac9778 cbb110bc6672f Author: Alexei Starovoitov Date: Thu Apr 20 16:49:17 2023 -0700 Merge branch 'fix __retval() being always ignored' Eduard Zingerman says: ==================== Florian Westphal found a bug in test_loader.c processing of __retval tag. Because of this bug the function test_loader.c:do_prog_test_run() never executed and all __retval test tags were ignored. See [1]. Fix for this bug uncovers two additional bugs: - During test_verifier tests migration to inline assembly (see [2]) I missed the fact that some tests require maps to contain mock values; - Some issue with a new refcounted_kptr test, which causes kernel to produce dead lock and refcount saturation warnings when subject to libbpf's bpf_test_run_opts(). This series fixes the bug in __retval() processing, and address the issue with test maps not being populated. The issue in refcounted_kptr is not addressed, __retval tags in those tests are commented out. I found that the following tests depend on test maps being populated: - progs/verifier_array_access.c - verifier/value_ptr_arith.c (planned for migration to inline assembly) Given the small amount of these tests I decided to opt for simple non-generic solution (see patch #4). [1] https://lore.kernel.org/bpf/f4c4aee644425842ee6aa8edf1da68f0a8260e7c.camel@gmail.com/T/ [2] https://lore.kernel.org/bpf/20230325025524.144043-1-eddyz87@gmail.com/ ==================== Signed-off-by: Alexei Starovoitov commit cbb110bc6672f785cab2cb308e9cfefee07af861 Author: Eduard Zingerman Date: Fri Apr 21 02:23:17 2023 +0300 selftests/bpf: populate map_array_ro map for verifier_array_access test Two test cases: - "valid read map access into a read-only array 1" and - "valid read map access into a read-only array 2" Expect that map_array_ro map is filled with mock data. This logic was not taken into acount during initial test conversion. This commit modifies prog_tests/verifier.c entry point for this test to fill the map. Fixes: a3c830ae0209 ("selftests/bpf: verifier/array_access.c converted to inline assembly") Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230420232317.2181776-5-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 5b22f4d1436b2693c7176a76be0ba6d30503bf7c Author: Eduard Zingerman Date: Fri Apr 21 02:23:16 2023 +0300 selftests/bpf: add pre bpf_prog_test_run_opts() callback for test_loader When a test case is annotated with __retval tag the test_loader engine would use libbpf's bpf_prog_test_run_opts() to do a test run of the program and compare retvals. This commit allows to perform arbitrary actions on bpf object right before test loader invokes bpf_prog_test_run_opts(). This could be used to setup some state for program execution, e.g. fill some maps. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230420232317.2181776-4-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 7cdddb99e4a69c26881d279472f1487cd67740c4 Author: Eduard Zingerman Date: Fri Apr 21 02:23:15 2023 +0300 selftests/bpf: fix __retval() being always ignored Florian Westphal found a bug in and suggested a fix for test_loader.c processing of __retval tag. Because of this bug the function test_loader.c:do_prog_test_run() never executed and all __retval test tags were ignored. If this bug is fixed a number of test cases from progs/verifier_array_access.c fail with retval not matching the expected value. This test was recently converted to use test_loader.c and inline assembly in [1]. When doing the conversion I missed the important detail of test_verifier.c operation: when it creates fixup_map_array_ro, fixup_map_array_wo and fixup_map_array_small it populates these maps with a dummy record. Disabling the __retval checks for the affected verifier_array_access in this commit to avoid false-postivies in any potential bisects. The issue is addressed in the next patch. I verified that the __retval tags are now respected by changing expected return values for all tests annotated with __retval, and checking that these tests started to fail. [1] https://lore.kernel.org/bpf/20230325025524.144043-1-eddyz87@gmail.com/ Fixes: 19a8e06f5f91 ("selftests/bpf: Tests execution support for test_loader.c") Reported-by: Florian Westphal Link: https://lore.kernel.org/bpf/f4c4aee644425842ee6aa8edf1da68f0a8260e7c.camel@gmail.com/T/ Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230420232317.2181776-3-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 7c4b96c00043f3b2cad50653f085c178fda92e62 Author: Eduard Zingerman Date: Fri Apr 21 02:23:14 2023 +0300 selftests/bpf: disable program test run for progs/refcounted_kptr.c Florian Westphal found a bug in test_loader.c processing of __retval tag. Because of this bug the function test_loader.c:do_prog_test_run() never executed and all __retval test tags were ignored. This hid an issue with progs/refcounted_kptr.c tests. When __retval tag bug is fixed and refcounted_kptr.c tests are run kernel reports various issues and eventually hangs. Shortest reproducer is the following command run a few times: $ for i in $(seq 1 4); do (./test_progs --allow=refcounted_kptr &); done Commenting out __retval tags for these tests until this issue is resolved. Reported-by: Florian Westphal Link: https://lore.kernel.org/bpf/f4c4aee644425842ee6aa8edf1da68f0a8260e7c.camel@gmail.com/T/ Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230420232317.2181776-2-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 4b7ef71ac977899cf7bdb09d66052926c7d249ff Author: Quentin Monnet Date: Thu Apr 20 01:33:33 2023 +0100 bpftool: Replace "__fallthrough" by a comment to address merge conflict The recent support for inline annotations in control flow graphs generated by bpftool introduced the usage of the "__fallthrough" macro in a switch/case block in btf_dumper.c. This change went through the bpf-next tree, but resulted in a merge conflict in linux-next, because this macro has been renamed "fallthrough" (no underscores) in the meantime. To address the conflict, we temporarily switch to a simple comment instead of a macro. Related: commit f7a858bffcdd ("tools: Rename __fallthrough to fallthrough") Fixes: 9fd496848b1c ("bpftool: Support inline annotations when dumping the CFG of a program") Reported-by: Sven Schnelle Reported-by: Thomas Richter Suggested-by: Daniel Borkmann Signed-off-by: Quentin Monnet Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/all/yt9dttxlwal7.fsf@linux.ibm.com/ Link: https://lore.kernel.org/bpf/20230412123636.2358949-1-tmricht@linux.ibm.com/ Link: https://lore.kernel.org/bpf/20230420003333.90901-1-quentin@isovalent.com commit b488ae52ef9f74155ab358f8c68e74327b45e0e1 Author: Michal Schmidt Date: Wed Apr 12 10:19:29 2023 +0200 ice: sleep, don't busy-wait, in the SQ send retry loop 10 ms is a lot of time to spend busy-waiting. Sleeping is clearly allowed here, because we have just returned from ice_sq_send_cmd(), which takes a mutex. On kernels with HZ=100, this msleep may be twice as long, but I don't think it matters. I did not actually observe any retries happening here. Signed-off-by: Michal Schmidt Reviewed-by: Arkadiusz Kubalewski Reviewed-by: Simon Horman Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 43a630e37e259fee83ab3fd769c42e2fed97ca81 Author: Michal Schmidt Date: Wed Apr 12 10:19:28 2023 +0200 ice: remove unused buffer copy code in ice_sq_send_cmd_retry() The 'buf_cpy'-related code in ice_sq_send_cmd_retry() looks broken. 'buf' is nowhere copied into 'buf_cpy'. The reason this does not cause problems is that all commands for which 'is_cmd_for_retry' is true go with a NULL buf. Let's remove 'buf_cpy'. Add a WARN_ON in case the assumption no longer holds in the future. Signed-off-by: Michal Schmidt Reviewed-by: Arkadiusz Kubalewski Reviewed-by: Simon Horman Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit f86d6f9c49f67b05d117495dc440aaa18c66a9da Author: Michal Schmidt Date: Wed Apr 12 10:19:27 2023 +0200 ice: sleep, don't busy-wait, for ICE_CTL_Q_SQ_CMD_TIMEOUT The driver polls for ice_sq_done() with a 100 µs period for up to 1 s and it uses udelay to do that. Let's use usleep_range instead. We know sleeping is allowed here, because we're holding a mutex (cq->sq_lock). To preserve the total max waiting time, measure the timeout in jiffies. ICE_CTL_Q_SQ_CMD_TIMEOUT is used also in ice_release_res(), but there the polling period is 1 ms (i.e. 10 times longer). Since the timeout was expressed in terms of the number of loops, the total timeout in this function is 10 s. I do not know if this is intentional. This patch keeps it. The patch lowers the CPU usage of the ice-gnss- kernel thread on my system from ~8 % to less than 1 %. I received a report of high CPU usage with ptp4l where the busy-waiting in ice_sq_send_cmd dominated the profile. This patch has been tested in that usecase too and it made a huge improvement there. Tested-by: Brent Rowsell Signed-off-by: Michal Schmidt Reviewed-by: Arkadiusz Kubalewski Reviewed-by: Simon Horman Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 84817ab66fd0d9cde371fcb020f610ba808585bb Author: Michal Schmidt Date: Wed Apr 12 10:19:26 2023 +0200 ice: remove ice_ctl_q_info::sq_cmd_timeout sq_cmd_timeout is initialized to ICE_CTL_Q_SQ_CMD_TIMEOUT and never changed, so just use the constant directly. Suggested-by: Simon Horman Signed-off-by: Michal Schmidt Reviewed-by: Arkadiusz Kubalewski Reviewed-by: Simon Horman Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 0ec636e571f59b741d1eca47d439181f29f7f083 Author: Michal Schmidt Date: Wed Apr 12 10:19:25 2023 +0200 ice: increase the GNSS data polling interval to 20 ms Double the GNSS data polling interval from 10 ms to 20 ms. According to Karol Kolacinski from the Intel team, they have been planning to make this change. Signed-off-by: Michal Schmidt Reviewed-by: Arkadiusz Kubalewski Reviewed-by: Simon Horman Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 2f8fdcb0a73a1831cc4f205f23493a17c0e5536f Author: Michal Schmidt Date: Wed Apr 12 10:19:24 2023 +0200 ice: do not busy-wait to read GNSS data The ice-gnss- kernel thread, which reads data from the u-blox GNSS module, keep a CPU core almost 100% busy. The main reason is that it busy-waits for data to become available. A simple improvement would be to replace the "mdelay(10);" in ice_gnss_read() with sleeping. A better fix is to not do any waiting directly in the function and just requeue this delayed work as needed. The advantage is that canceling the work from ice_gnss_exit() becomes immediate, rather than taking up to ~2.5 seconds (ICE_MAX_UBX_READ_TRIES * 10 ms). This lowers the CPU usage of the ice-gnss- thread on my system from ~90 % to ~8 %. I am not sure if the larger 0.1 s pause after inserting data into the gnss subsystem is really necessary, but I'm keeping that as it was. Of course, ideally the driver would not have to poll at all, but I don't know if the E810 can watch for GNSS data availability over the i2c bus by itself and notify the driver. Signed-off-by: Michal Schmidt Reviewed-by: Arkadiusz Kubalewski Reviewed-by: Simon Horman Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 681c5b51dc6b8ff1ec05555243eccf64a08cb2fd Merge: e315e7b83a220 0f2a4af27b649 Author: Jakub Kicinski Date: Thu Apr 20 16:27:33 2023 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Adjacent changes: net/mptcp/protocol.h 63740448a32e ("mptcp: fix accept vs worker race") 2a6a870e44dd ("mptcp: stops worker on unaccepted sockets at listener close") ddb1a072f858 ("mptcp: move first subflow allocation at mpc access time") Signed-off-by: Jakub Kicinski commit e85d3d55875f7a1079edfbc4e4e98d6f8aea9ac7 Author: Joe Damato Date: Sun Apr 16 19:12:23 2023 +0000 ixgbe: Enable setting RSS table to default values ethtool uses `ETHTOOL_GRXRINGS` to compute how many queues are supported by RSS. The driver should return the smaller of either: - The maximum number of RSS queues the device supports, OR - The number of RX queues configured Prior to this change, running `ethtool -X $iface default` fails if the number of queues configured is larger than the number supported by RSS, even though changing the queue count correctly resets the flowhash to use all supported queues. Other drivers (for example, i40e) will succeed but the flow hash will reset to support the maximum number of queues supported by RSS, even if that amount is smaller than the configured amount. Prior to this change: $ sudo ethtool -L eth1 combined 20 $ sudo ethtool -x eth1 RX flow hash indirection table for eth1 with 20 RX ring(s): 0: 0 1 2 3 4 5 6 7 8: 8 9 10 11 12 13 14 15 16: 0 1 2 3 4 5 6 7 24: 8 9 10 11 12 13 14 15 32: 0 1 2 3 4 5 6 7 ... You can see that the flowhash was correctly set to use the maximum number of queues supported by the driver (16). However, asking the NIC to reset to "default" fails: $ sudo ethtool -X eth1 default Cannot set RX flow hash configuration: Invalid argument After this change, the flowhash can be reset to default which will use all of the available RSS queues (16) or the configured queue count, whichever is smaller. Starting with eth1 which has 10 queues and a flowhash distributing to all 10 queues: $ sudo ethtool -x eth1 RX flow hash indirection table for eth1 with 10 RX ring(s): 0: 0 1 2 3 4 5 6 7 8: 8 9 0 1 2 3 4 5 16: 6 7 8 9 0 1 2 3 ... Increasing the queue count to 48 resets the flowhash to distribute to 16 queues, as it did before this patch: $ sudo ethtool -L eth1 combined 48 $ sudo ethtool -x eth1 RX flow hash indirection table for eth1 with 16 RX ring(s): 0: 0 1 2 3 4 5 6 7 8: 8 9 10 11 12 13 14 15 16: 0 1 2 3 4 5 6 7 ... Due to the other bugfix in this series, the flowhash can be set to use queues 0-5: $ sudo ethtool -X eth1 equal 5 $ sudo ethtool -x eth1 RX flow hash indirection table for eth1 with 16 RX ring(s): 0: 0 1 2 3 4 0 1 2 8: 3 4 0 1 2 3 4 0 16: 1 2 3 4 0 1 2 3 ... Due to this bugfix, the flowhash can be reset to default and use 16 queues: $ sudo ethtool -X eth1 default $ sudo ethtool -x eth1 RX flow hash indirection table for eth1 with 16 RX ring(s): 0: 0 1 2 3 4 5 6 7 8: 8 9 10 11 12 13 14 15 16: 0 1 2 3 4 5 6 7 ... Fixes: 91cd94bfe4f0 ("ixgbe: add basic support for setting and getting nfc controls") Signed-off-by: Joe Damato Reviewed-by: Sridhar Samudrala Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 4f3ed1293feb9502dc254b05802faf1ad3317ac6 Author: Joe Damato Date: Sun Apr 16 19:12:22 2023 +0000 ixgbe: Allow flow hash to be set via ethtool ixgbe currently returns `EINVAL` whenever the flowhash it set by ethtool because the ethtool code in the kernel passes a non-zero value for hfunc that ixgbe should allow. When ethtool is called with `ETHTOOL_SRXFHINDIR`, `ethtool_set_rxfh_indir` will call ixgbe's set_rxfh function with `ETH_RSS_HASH_NO_CHANGE`. This value should be accepted. When ethtool is called with `ETHTOOL_SRSSH`, `ethtool_set_rxfh` will call ixgbe's set_rxfh function with `rxfh.hfunc`, which appears to be hardcoded in ixgbe to always be `ETH_RSS_HASH_TOP`. This value should also be accepted. Before this patch: $ sudo ethtool -L eth1 combined 10 $ sudo ethtool -X eth1 default Cannot set RX flow hash configuration: Invalid argument After this patch: $ sudo ethtool -L eth1 combined 10 $ sudo ethtool -X eth1 default $ sudo ethtool -x eth1 RX flow hash indirection table for eth1 with 10 RX ring(s): 0: 0 1 2 3 4 5 6 7 8: 8 9 0 1 2 3 4 5 16: 6 7 8 9 0 1 2 3 24: 4 5 6 7 8 9 0 1 ... Fixes: 1c7cf0784e4d ("ixgbe: support for ethtool set_rxfh") Signed-off-by: Joe Damato Reviewed-by: Sridhar Samudrala Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 9c318a1d9b5000c77527011f158a75c5483510f5 Author: Long Li Date: Thu Apr 20 15:49:06 2023 -0700 Drivers: hv: move panic report code from vmbus to hv early init code The panic reporting code was added in commit 81b18bce48af ("Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic") It was added to the vmbus driver. The panic reporting has no dependence on vmbus, and can be enabled at an earlier boot time when Hyper-V is initialized. This patch moves the panic reporting code out of vmbus. There is no functionality changes. During moving, also refactored some cleanup functions into hv_kmsg_dump_unregister(). Signed-off-by: Long Li Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1682030946-6372-1-git-send-email-longli@linuxonhyperv.com Signed-off-by: Wei Liu commit 6ea5aa08857a81be7114b3c21d6aa6db0bc95f99 Author: Wedson Almeida Filho Date: Tue Apr 11 02:45:31 2023 -0300 rust: sync: introduce `LockClassKey` It is a wrapper around C's `lock_class_key`, which is used by the synchronisation primitives that are checked with lockdep. This is in preparation for introducing Rust abstractions for these primitives. Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Reviewed-by: Martin Rodriguez Reboredo Co-developed-by: Boqun Feng Signed-off-by: Boqun Feng Signed-off-by: Wedson Almeida Filho Reviewed-by: Gary Guo Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20230411054543.21278-1-wedsonaf@gmail.com Signed-off-by: Miguel Ojeda commit b0cf5d50210df982878df53ab465e4377ea07065 Author: Miguel Ojeda Date: Thu Apr 13 00:18:22 2023 +0200 MAINTAINERS: add Benno Lossin as Rust reviewer Benno has been involved with the Rust for Linux project for the better part of a year now. He has been working on solving the safe pinned initialization problem [1], which resulted in the pin-init API patch series [2] that allows to reduce the need for `unsafe` code in the kernel. He is also working on the field projection RFC for Rust [3] to bring pin-init as a language feature. His expertise with the language will be very useful to have around in the future if Rust grows within the kernel, thus add him to the `RUST` entry as reviewer. Link: https://rust-for-linux.com/the-safe-pinned-initialization-problem [1] Link: https://lore.kernel.org/rust-for-linux/20230408122429.1103522-1-y86-dev@protonmail.com/ [2] Link: https://github.com/rust-lang/rfcs/pull/3318 [3] Cc: Benno Lossin Reviewed-by: Alex Gaynor Link: https://lore.kernel.org/r/20230412221823.830135-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 52a7f2deb4be8706bcbd16bba1d70eb2b5735d19 Author: Benno Lossin Date: Thu Apr 13 10:02:17 2023 +0000 rust: init: broaden the blanket impl of `Init` This makes it possible to use `T` as a `impl Init` for every error type `E` instead of just `Infallible`. Signed-off-by: Benno Lossin Reviewed-by: Gary Guo Reviewed-by: Martin Rodriguez Reboredo Link: https://lore.kernel.org/r/20230413100157.740697-1-benno.lossin@proton.me Signed-off-by: Miguel Ojeda commit 66ae0535167660e427f9fcadeee5d05646e2bb22 Author: Rob Herring Date: Mon Mar 27 12:01:53 2023 -0500 dt-bindings: rng: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Reviewed-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Acked-by: Florian Fainelli #brcm,iproc-rng200 Link: https://lore.kernel.org/r/20230327170153.4105594-1-robh@kernel.org Signed-off-by: Rob Herring commit 09a8e5f01dfb30667a8f05e35c1cc073cb4fd134 Merge: fe15c26ee26ef ab072a3bfa0e9 Author: Bjorn Helgaas Date: Thu Apr 20 16:19:37 2023 -0500 Merge branch 'pci/controller/kconfig' - Use uniform language in Kconfig menu entries (Bjorn Helgaas) - Sort controller Kconfig entries by vendor (Bjorn Helgaas) * pci/controller/kconfig: PCI: xilinx: Drop obsolete dependency on COMPILE_TEST PCI: mobiveil: Sort Kconfig entries by vendor PCI: dwc: Sort Kconfig entries by vendor PCI: Sort controller Kconfig entries by vendor PCI: Use consistent controller Kconfig menu entry language PCI: xilinx-nwl: Add 'Xilinx' to Kconfig prompt PCI: hv: Add 'Microsoft' to Kconfig prompt PCI: meson: Add 'Amlogic' to Kconfig prompt PCI: Use of_property_present() for testing DT property presence PCI/PM: Extend D3hot delay for NVIDIA HDA controllers dt-bindings: PCI: qcom: Document msi-map and msi-map-mask properties PCI: qcom: Add SM8550 PCIe support dt-bindings: PCI: qcom: Add SM8550 compatible PCI: qcom: Add support for SDX55 SoC dt-bindings: PCI: qcom-ep: Fix the unit address used in example dt-bindings: PCI: qcom: Add SDX55 SoC dt-bindings: PCI: qcom: Update maintainers entry PCI: qcom: Enable async probe by default PCI: qcom: Add support for system suspend and resume PCI/PM: Drop pci_bridge_wait_for_secondary_bus() timeout parameter PCI/PM: Increase wait time after resume PCI: pciehp: Fix AB-BA deadlock between reset_lock and device_lock PCI: Fix up L1SS capability for Intel Apollo Lake Root Port PCI: qcom: Expose link transition counts via debugfs dt-bindings: PCI: qcom: Add "mhi" register region to supported SoCs PCI: qcom: Rename qcom_pcie_config_sid_sm8250() to reflect IP version PCI: qcom: Use macros for defining total no. of clocks & supplies PCI: qcom: Use bulk reset APIs for handling resets for IP rev 2.4.0 PCI: qcom: Use bulk reset APIs for handling resets for IP rev 2.3.3 PCI: qcom: Use bulk clock APIs for handling clocks for IP rev 2.3.3 PCI: qcom: Use bulk clock APIs for handling clocks for IP rev 2.3.2 PCI: qcom: Use bulk clock APIs for handling clocks for IP rev 1.0.0 PCI: qcom: Use bulk reset APIs for handling resets for IP rev 2.1.0 PCI: qcom: Use lower case for hex PCI: qcom: Add missing macros for register fields PCI: qcom: Use bitfield definitions for register fields PCI: qcom: Sort and group registers and bitfield definitions PCI: qcom: Remove PCIE20_ prefix from register definitions PCI: qcom: Fix the incorrect register usage in v2.7.0 config PCI/EDR: Add edr_handle_event() comments PCI/EDR: Clear Device Status after EDR error recovery efi/cper: Remove unnecessary aer.h include dt-bindings: imx6q-pcie: Restruct i.MX PCIe schema PCI/P2PDMA: Fix pci_p2pmem_find_many() kernel-doc EISA: Drop unused pci_bus_for_each_resource() index argument PCI: Make pci_bus_for_each_resource() index optional PCI: Document pci_bus_for_each_resource() PCI: Introduce pci_dev_for_each_resource() PCI: Introduce pci_resource_n() PCI: ixp4xx: Use PCI_CONF1_ADDRESS() macro PCI: mt7621: Use dev_info() to log PCIe card detection PCI: imx6: Install the fault handler only on compatible match PCI: layerscape: Add EP mode support for ls1028a PCI: rcar: Avoid defines prefixed with CONFIG dt-bindings: PCI: convert amlogic,meson-pcie.txt to dt-schema PCI: kirin: Select REGMAP_MMIO commit ab072a3bfa0e9f3747c22ff869541f11263b636c Author: Jean Delvare Date: Fri Apr 7 19:08:43 2023 +0200 PCI: xilinx: Drop obsolete dependency on COMPILE_TEST Since commit 0166dc11be91 ("of: make CONFIG_OF user selectable"), it is possible to test-build any driver which depends on OF on any architecture by explicitly selecting OF. Therefore depending on COMPILE_TEST as an alternative is no longer needed. Link: https://lore.kernel.org/r/20230407190843.529caf19@endymion.delvare Signed-off-by: Jean Delvare Signed-off-by: Bjorn Helgaas Cc: Lorenzo Pieralisi Cc: Rob Herring Cc: "Krzysztof Wilczyński" commit 9f3c35bfc54b309a60721b1edbbf20a5b4e663de Author: Bjorn Helgaas Date: Tue Apr 18 12:43:36 2023 -0500 PCI: mobiveil: Sort Kconfig entries by vendor Sort Kconfig entries by vendor so they appear in alphabetical order in menuconfig. Link: https://lore.kernel.org/r/20230418174336.145585-8-helgaas@kernel.org Signed-off-by: Bjorn Helgaas commit c39819c044be495abe6a6041f4a49cc58340e2a7 Author: Bjorn Helgaas Date: Tue Apr 18 12:43:35 2023 -0500 PCI: dwc: Sort Kconfig entries by vendor Sort Kconfig entries by vendor so they appear in alphabetical order in menuconfig. Link: https://lore.kernel.org/r/20230418174336.145585-7-helgaas@kernel.org Signed-off-by: Bjorn Helgaas commit 81c362e798d41592efa053b25b053621727319d1 Author: Bjorn Helgaas Date: Tue Apr 18 12:43:34 2023 -0500 PCI: Sort controller Kconfig entries by vendor Sort Kconfig entries by vendor so they appear in alphabetical order in menuconfig. Link: https://lore.kernel.org/r/20230418174336.145585-6-helgaas@kernel.org Signed-off-by: Bjorn Helgaas commit 80c170d7b13d0a46a46f869774baf3c02d775654 Author: Bjorn Helgaas Date: Tue Apr 18 12:43:33 2023 -0500 PCI: Use consistent controller Kconfig menu entry language Use "PCIe controller" consistently instead of "host bridge", "bus driver", etc. Annotate with "(host mode)" or "(endpoint mode)" as needed. Link: https://lore.kernel.org/r/20230418174336.145585-5-helgaas@kernel.org Signed-off-by: Bjorn Helgaas commit bf909c57567ec6385a2edccbadf56eb822186b29 Author: Bjorn Helgaas Date: Tue Apr 18 12:43:32 2023 -0500 PCI: xilinx-nwl: Add 'Xilinx' to Kconfig prompt Add the "Xilinx" vendor name to the CONFIG_PCIE_XILINX_NWL Kconfig prompt so it matches other drivers. Rename from "PCIe Core" to "PCIe controller". Link: https://lore.kernel.org/r/20230418174336.145585-4-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Michal Simek commit 7f5441c1789c178f4db47cd08b558048ba58ea4e Author: Bjorn Helgaas Date: Tue Apr 18 12:43:31 2023 -0500 PCI: hv: Add 'Microsoft' to Kconfig prompt Add the "Microsoft" vendor name to the CONFIG_PCI_HYPERV_INTERFACE Kconfig prompt so it matches other PCIe drivers and other Hyper-V prompts. Link: https://lore.kernel.org/r/20230418174336.145585-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Wei Liu Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Dexuan Cui commit 6ba4ce6b2ef6fe4be102cefeb89b3979af130983 Author: Bjorn Helgaas Date: Tue Apr 18 12:43:30 2023 -0500 PCI: meson: Add 'Amlogic' to Kconfig prompt Add the "Amlogic" vendor name to the CONFIG_PCI_MESON Kconfig prompt to match other PCIe drivers. Capitalize "Meson" to match other Meson Kconfig prompts. Link: https://lore.kernel.org/r/20230418174336.145585-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Cc: Yue Wang commit 30dc83a92275201af08596df5d5a38b15b95ce86 Merge: 5c5dd8839fc02 727de4c087683 Author: Bjorn Helgaas Date: Thu Apr 20 16:16:38 2023 -0500 Merge branch 'pci/controller/rcar' - Rename internal #defines without "CONFIG_" prefix to avoid confusion (Lukas Bulwahn) * pci/controller/rcar: PCI: rcar: Avoid defines prefixed with CONFIG commit 5c5dd8839fc02fa9b9558005a32ce4d7d86fd774 Merge: b4c85e7bf423b c025c7e5dbf47 Author: Bjorn Helgaas Date: Thu Apr 20 16:16:38 2023 -0500 Merge branch 'pci/controller/qcom' - Use correct PCIE20_PARF_AXI_MSTR_WR_ADDR_HALT_V2 register for v2.7.0 (Manivannan Sadhasivam) - Remove "PCIE20_" prefix from register definitions (Manivannan Sadhasivam) - Sort registers and bitfield declarations (Manivannan Sadhasivam) - Convert to GENMASK and FIELD_PREP (Manivannan Sadhasivam) - Use bulk APIs for clocks of IP 1.0.0, 2.3.2, 2.3.3 (Manivannan Sadhasivam) - Use bulk APIs for reset of IP 2.1.0, 2.3.3, 2.4.0 (Manivannan Sadhasivam) - Rename qcom_pcie_config_sid_sm8250() to be non SM8250-specific (Manivannan Sadhasivam) - Add DT "mhi" register region for supported SoCs (Manivannan Sadhasivam) - Expose link transition counts via debugfs to help debug low power issues (Manivannan Sadhasivam) - Support system suspend and resume; reduce interconnect bandwidth and turn off clock and PHY if there are no active devices (Manivannan Sadhasivam) - Enable async probe by default to reduce boot time (Manivannan Sadhasivam) - Add Manivannan Sadhasivam as qcom DT binding maintainer, replacing Stanimir Varbanov (Manivannan Sadhasivam) - Add DT binding and driver support for Qcom SDX55 SoC (Manivannan Sadhasivam) - Add DT binding and driver support for SM8550 SoC (Abel Vesa) - Document msi-map and msi-map-mask DT properties (Manivannan Sadhasivam) * pci/controller/qcom: dt-bindings: PCI: qcom: Document msi-map and msi-map-mask properties PCI: qcom: Add SM8550 PCIe support dt-bindings: PCI: qcom: Add SM8550 compatible PCI: qcom: Add support for SDX55 SoC dt-bindings: PCI: qcom-ep: Fix the unit address used in example dt-bindings: PCI: qcom: Add SDX55 SoC dt-bindings: PCI: qcom: Update maintainers entry PCI: qcom: Enable async probe by default PCI: qcom: Add support for system suspend and resume PCI: qcom: Expose link transition counts via debugfs dt-bindings: PCI: qcom: Add "mhi" register region to supported SoCs PCI: qcom: Rename qcom_pcie_config_sid_sm8250() to reflect IP version PCI: qcom: Use macros for defining total no. of clocks & supplies PCI: qcom: Use bulk reset APIs for handling resets for IP rev 2.4.0 PCI: qcom: Use bulk reset APIs for handling resets for IP rev 2.3.3 PCI: qcom: Use bulk clock APIs for handling clocks for IP rev 2.3.3 PCI: qcom: Use bulk clock APIs for handling clocks for IP rev 2.3.2 PCI: qcom: Use bulk clock APIs for handling clocks for IP rev 1.0.0 PCI: qcom: Use bulk reset APIs for handling resets for IP rev 2.1.0 PCI: qcom: Use lower case for hex PCI: qcom: Add missing macros for register fields PCI: qcom: Use bitfield definitions for register fields PCI: qcom: Sort and group registers and bitfield definitions PCI: qcom: Remove PCIE20_ prefix from register definitions PCI: qcom: Fix the incorrect register usage in v2.7.0 config commit b4c85e7bf423b9790cae50bb62663e8f5b5443e3 Merge: d7493f273b4ab 50233e105a033 Author: Bjorn Helgaas Date: Thu Apr 20 16:16:37 2023 -0500 Merge branch 'pci/controller/mt7621' - Log empty slots with dev_info(), not dev_err() (Sergio Paracuellos) * pci/controller/mt7621: PCI: mt7621: Use dev_info() to log PCIe card detection commit d7493f273b4ab70a3fb72161bf6762b8df63c33d Merge: 2ad2e01914fde be567c6cbc08e Author: Bjorn Helgaas Date: Thu Apr 20 16:16:37 2023 -0500 Merge branch 'pci/controller/layerscape' - Add ls1028a endpoint mode support (Xiaowei Bao) * pci/controller/layerscape: PCI: layerscape: Add EP mode support for ls1028a commit 2ad2e01914fdee7f4ccda0a837e3ab62bddd0d4d Merge: 73af737eea9e7 3a2776e8a0e15 Author: Bjorn Helgaas Date: Thu Apr 20 16:16:36 2023 -0500 Merge branch 'pci/controller/kirin' - Select CONFIG_REGMAP_MMIO so kirin driver links correctly (Josh Triplett) * pci/controller/kirin: PCI: kirin: Select REGMAP_MMIO commit 73af737eea9e7ff5a99d10e709f7f1ad7c6abe36 Merge: 0c78d418e95ff 6c6fa1f3f7715 Author: Bjorn Helgaas Date: Thu Apr 20 16:16:36 2023 -0500 Merge branch 'pci/controller/ixp4xx' - Use the PCI_CONF1_ADDRESS() macro to simplify config space address computation (Pali Rohár) * pci/controller/ixp4xx: PCI: ixp4xx: Use PCI_CONF1_ADDRESS() macro commit 0c78d418e95ff12ac53446effe9a042e73b406e3 Merge: 580b8bce6bd88 5f5ac460dfe7f Author: Bjorn Helgaas Date: Thu Apr 20 16:16:35 2023 -0500 Merge branch 'pci/controller/dwc' - Install i.MX6 PCI abort handler only when DT contains a PCI controller claimed by the imx6 driver (H. Nikolaus Schaller) * pci/controller/dwc: PCI: imx6: Install the fault handler only on compatible match commit 580b8bce6bd8817e220d2539ad2e14710fe5d8b2 Merge: 1c03b5bfc59ec b10f82380eeb4 Author: Bjorn Helgaas Date: Thu Apr 20 16:16:35 2023 -0500 Merge branch 'pci/controller/dt' - Convert Amlogic Meson AXG DWC PCIe SoC controller bindings to dt-schema (Neil Armstrong) - Restructure i.MX schema to extract common properties to be shared by Root Complex and Endpoint schema (Richard Zhu) * pci/controller/dt: dt-bindings: imx6q-pcie: Restruct i.MX PCIe schema dt-bindings: PCI: convert amlogic,meson-pcie.txt to dt-schema commit 1c03b5bfc59ec1c36c68c0a26c69dee81369e8fa Merge: 43ca31e00254f e34a6ba53e80d Author: Bjorn Helgaas Date: Thu Apr 20 16:16:34 2023 -0500 Merge branch 'pci/resource' - Add pci_dev_for_each_resource() and pci_bus_for_each_resource() iterators to simplify loops (Andy Shevchenko) * pci/resource: EISA: Drop unused pci_bus_for_each_resource() index argument PCI: Make pci_bus_for_each_resource() index optional PCI: Document pci_bus_for_each_resource() PCI: Introduce pci_dev_for_each_resource() PCI: Introduce pci_resource_n() commit 43ca31e00254fe2ee0712afdad2a6681e2eb34ae Merge: cc8a983d0fce6 a5a6dd2624698 Author: Bjorn Helgaas Date: Thu Apr 20 16:16:33 2023 -0500 Merge branch 'pci/reset' - Wait longer for devices to become ready after resume (as we do for reset) to accommodate Intel Titan Ridge xHCI devices (Mika Westerberg) - Drop pci_bridge_wait_for_secondary_bus() timeout parameter since all callers pass the same value (Mika Westerberg) - Extend D3hot delay for NVIDIA HDA controllers to avoid unrecoverable devices after a bus reset (Alex Williamson) * pci/reset: PCI/PM: Extend D3hot delay for NVIDIA HDA controllers PCI/PM: Drop pci_bridge_wait_for_secondary_bus() timeout parameter PCI/PM: Increase wait time after resume commit cc8a983d0fce68fc147743ef25114b2870368a3e Merge: 8745c3d542769 5376ced54ce31 Author: Bjorn Helgaas Date: Thu Apr 20 16:16:33 2023 -0500 Merge branch 'pci/p2pdma' - Fix pci_p2pmem_find_many() kernel-doc (Cai Huoqing) * pci/p2pdma: PCI/P2PDMA: Fix pci_p2pmem_find_many() kernel-doc commit 8745c3d542769c93fe6c88ffc927f02ce7cc0085 Merge: 66d3d0d0e860f f5eff5591b8f9 Author: Bjorn Helgaas Date: Thu Apr 20 16:16:33 2023 -0500 Merge branch 'pci/hotplug' - Fix pciehp AB-BA deadlock between reset_lock and device_lock (Lukas Wunner) * pci/hotplug: PCI: pciehp: Fix AB-BA deadlock between reset_lock and device_lock commit 66d3d0d0e860f06ec40304e792c2270e70617008 Merge: 90d66d4d86aee 9195ee1a1f760 Author: Bjorn Helgaas Date: Thu Apr 20 16:16:32 2023 -0500 Merge branch 'pci/enumeration' - Use of_property_present(), instead of lower-level functions like of_get_property(), for testing DT property presence (Rob Herring) * pci/enumeration: PCI: Use of_property_present() for testing DT property presence commit 90d66d4d86aee7a6a429081c9d95e663463ab436 Merge: 1a65a3271dad3 606012dddebbc Author: Bjorn Helgaas Date: Thu Apr 20 16:16:32 2023 -0500 Merge branch 'pci/aspm' - Work around Chromebook firmware issue that corrupts Extended Capability list (including L1 PM Substates capability) on D3cold -> D0 transitions (Ron Lee) * pci/aspm: PCI: Fix up L1SS capability for Intel Apollo Lake Root Port commit 1a65a3271dad3a03eb4d34e1ff6a3ad6c3ffb761 Merge: fe15c26ee26ef 774820b362b07 Author: Bjorn Helgaas Date: Thu Apr 20 16:16:32 2023 -0500 Merge branch 'pci/aer' - Remove unnecessary includes (Bjorn Helgaas) - Clear Device Status after EDR error recovery. Firmware collects EDR error information, but the OS is responsible for clearing it (Kuppuswamy Sathyanarayanan) * pci/aer: PCI/EDR: Add edr_handle_event() comments PCI/EDR: Clear Device Status after EDR error recovery efi/cper: Remove unnecessary aer.h include commit 6032aca0deb9c138df122192f8ef02de1fdccf25 Author: Johannes Berg Date: Fri Apr 14 15:46:39 2023 +0200 um: make stub data pages size tweakable There's a lot of code here that hard-codes that the data is a single page, and right now that seems to be sufficient, but to make it easier to change this in the future, add a new STUB_DATA_PAGES constant and use it throughout the code. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit fc54a4f15988e228cf88f888483e985c5f35031e Author: Johannes Berg Date: Fri Feb 10 22:05:11 2023 +0100 um: prevent user code in modules By not doing the user code cflags mangling we can simply break the build for any user code sneaking into modules. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 5d90cf6dcc6a4cb85a51ffe007a8e34375799164 Author: Johannes Berg Date: Fri Feb 10 22:05:10 2023 +0100 um: further clean up user_syms Make some cleanups, add and fix some comments and document here that we shouldn't export (libc) symbols for "_user.c" code, rather such should work like hostfs does now. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 6d708d1a0d81fe85a114766ff6beb3037fa77429 Author: Johannes Berg Date: Fri Feb 10 22:05:09 2023 +0100 um: don't export printf() Since printf() cannot be used in kernel threads (it uses too much stack space) don't export it for modules either. This should leave us exporting only things that are absolutely critical (such as memset and friends) and things that are injected by the compiler (stack guard and similar.) Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 8c6174503c7b7134c22072b45f92724c8a959f06 Author: Johannes Berg Date: Fri Feb 10 22:05:08 2023 +0100 um: hostfs: define our own API boundary Instead of exporting the set of functions provided by glibc that are needed for hostfs_user.c, just build that into the kernel image whenever hostfs is built, and then export _those_ functions cleanly, to be independent of the libc implementation. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit ce1831fe2febf7a3a03fda43b41d7589caa022cd Author: Johannes Berg Date: Sun Feb 12 20:32:04 2023 +0100 um: add __weak for exported functions If the exported glibc functions don't exist, we get link failures. Avoid that by adding __weak so they're allowed to not exist. Reported-by: Randy Dunlap Signed-off-by: Johannes Berg Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Richard Weinberger commit 4b71ed9fb2a55bc5dd375a45e0c04827c683c8d5 Author: Rob Herring Date: Wed Mar 22 12:34:59 2023 -0500 dt-bindings: arm/soc: mediatek: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20230322173501.3970991-1-robh@kernel.org Signed-off-by: Rob Herring commit 2961ab0568258537983deabb7fdc5048724ccf0e Author: Rob Herring Date: Mon Mar 27 12:02:04 2023 -0500 dt-bindings: soc: qcom: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230327170205.4106310-1-robh@kernel.org Signed-off-by: Rob Herring commit 98530c34d0e149456258359f5bb3bb17fbdfd83b Author: Rob Herring Date: Tue Apr 18 10:06:42 2023 -0500 dt-bindings: i2c: samsung: Fix 'deprecated' value 'deprecated' is a boolean type which should have a value of 'true' rather than 'yes'. Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230418150643.1529895-1-robh@kernel.org Signed-off-by: Rob Herring commit ed3d8f3efa128756508c80cf4fbc7f20fbec5755 Author: Rob Herring Date: Tue Apr 18 10:06:57 2023 -0500 dt-bindings: display: Fix lvds.yaml references The trailing "/" in "lvds.yaml/#" is not a valid JSON pointer. The existing jsonschema package allows it, but coming changes make allowed "$ref" URIs stricter. Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20230418150658.1535120-1-robh@kernel.org Signed-off-by: Rob Herring commit 55793ea54d77719a071b1ccc05a05056e3b5e009 Author: Zhong Jinghua Date: Mon Feb 6 22:58:05 2023 +0800 nbd: fix incomplete validation of ioctl arg We tested and found an alarm caused by nbd_ioctl arg without verification. The UBSAN warning calltrace like below: UBSAN: Undefined behaviour in fs/buffer.c:1709:35 signed integer overflow: -9223372036854775808 - 1 cannot be represented in type 'long long int' CPU: 3 PID: 2523 Comm: syz-executor.0 Not tainted 4.19.90 #1 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0x0/0x3f0 arch/arm64/kernel/time.c:78 show_stack+0x28/0x38 arch/arm64/kernel/traps.c:158 __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x170/0x1dc lib/dump_stack.c:118 ubsan_epilogue+0x18/0xb4 lib/ubsan.c:161 handle_overflow+0x188/0x1dc lib/ubsan.c:192 __ubsan_handle_sub_overflow+0x34/0x44 lib/ubsan.c:206 __block_write_full_page+0x94c/0xa20 fs/buffer.c:1709 block_write_full_page+0x1f0/0x280 fs/buffer.c:2934 blkdev_writepage+0x34/0x40 fs/block_dev.c:607 __writepage+0x68/0xe8 mm/page-writeback.c:2305 write_cache_pages+0x44c/0xc70 mm/page-writeback.c:2240 generic_writepages+0xdc/0x148 mm/page-writeback.c:2329 blkdev_writepages+0x2c/0x38 fs/block_dev.c:2114 do_writepages+0xd4/0x250 mm/page-writeback.c:2344 The reason for triggering this warning is __block_write_full_page() -> i_size_read(inode) - 1 overflow. inode->i_size is assigned in __nbd_ioctl() -> nbd_set_size() -> bytesize. We think it is necessary to limit the size of arg to prevent errors. Moreover, __nbd_ioctl() -> nbd_add_socket(), arg will be cast to int. Assuming the value of arg is 0x80000000000000001) (on a 64-bit machine), it will become 1 after the coercion, which will return unexpected results. Fix it by adding checks to prevent passing in too large numbers. Signed-off-by: Zhong Jinghua Reviewed-by: Yu Kuai Reviewed-by: Josef Bacik Link: https://lore.kernel.org/r/20230206145805.2645671-1-zhongjinghua@huawei.com Signed-off-by: Jens Axboe commit 9be6ab181b7b8d6114e225ae3c7c01bb6380cf8a Author: Ian Rogers Date: Thu Apr 20 10:18:12 2023 -0700 libperf rc_check: Enable implicitly with sanitizers If using leak sanitizer then implicitly enable reference count checking. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230420171812.561603-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0bdd95cede51d725c7f29c9787e62b77bfb0f034 Merge: 44295af5019f1 f41e1442ac5bd Author: Rafael J. Wysocki Date: Thu Apr 20 19:30:01 2023 +0200 Merge tag 'cpufreq-arm-updates-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull cpufreq/ARM updates for 6.4 from Viresh Kumar: "- Add opp and bandwidth support to tegra194 cpufreq driver (Sumit Gupta). - Use of_property_present() for testing DT property presence (Rob Herring). - Remove MODULE_LICENSE in non-modules (Nick Alcock). - Add SM7225 to cpufreq-dt-platdev blocklist (Luca Weiss). - Optimizations and fixes for qcom-cpufreq-hw driver (Krzysztof Kozlowski, Konrad Dybcio, and Bjorn Andersson). - DT binding updates for qcom-cpufreq-hw driver (Konrad Dybcio and Bartosz Golaszewski). - Updates and fixes for mediatek driver (Jia-Wei Chang and AngeloGioacchino Del Regno)." commit ddd66d63473513bb013928245b6482969b97de05 Author: Mario Limonciello Date: Mon Apr 17 10:27:08 2023 -0500 platform/x86/intel/pmc: core: Report duration of time in HW sleep state intel_pmc_core displays a warning when the module parameter `warn_on_s0ix_failures` is set and a suspend didn't get to a HW sleep state. Report this to the standard kernel reporting infrastructure so that userspace software can query after the suspend cycle is done. Reviewed-by: Hans de Goede Suggested-by: Ilpo Järvinen Reviewed-by: David E. Box Signed-off-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki commit e2348afe702e9431f428e230be7f4ef8a1778b19 Author: Mario Limonciello Date: Mon Apr 17 10:27:07 2023 -0500 platform/x86/intel/pmc: core: Always capture counters on suspend Currently counters are only captured during suspend when the warn_on_s0ix_failures module parameter is set. In order to relay this counter information to the kernel reporting infrastructure adjust it so that the counters are always captured. warn_on_s0ix_failures will be utilized solely for messaging by the driver instead. Reviewed-by: Hans de Goede Reviewed-by: David E. Box Signed-off-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki commit 09f5df3fb82fd444296e248f90dd29288e82d3a3 Author: Mario Limonciello Date: Mon Apr 17 10:27:06 2023 -0500 platform/x86/amd: pmc: Report duration of time in hw sleep state amd_pmc displays a warning when a suspend didn't get to the deepest state and a dynamic debugging message with the duration if it did. Rather than logging to dynamic debugging the duration spent in the deepest state, report this to the standard kernel reporting infrastructure so that userspace software can query after the suspend cycle is done. Reviewed-by: Hans de Goede Signed-off-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki commit b52124a78ab34eb0754e32edc0c9996937779176 Author: Mario Limonciello Date: Mon Apr 17 10:27:05 2023 -0500 PM: Add sysfs files to represent time spent in hardware sleep state Userspace can't easily discover how much of a sleep cycle was spent in a hardware sleep state without using kernel tracing and vendor specific sysfs or debugfs files. To make this information more discoverable, introduce 3 new sysfs files: 1) The time spent in a hw sleep state for last cycle. 2) The time spent in a hw sleep state since the kernel booted 3) The maximum time that the hardware can report for a sleep cycle. All of these files will be present only if the system supports s2idle. Reviewed-by: Hans de Goede Signed-off-by: Mario Limonciello Signed-off-by: Rafael J. Wysocki commit eeb3557cc188e42ae7f7bef2d6dc5bf0e078412e Merge: 9772b7f07499b bbd329fe723d1 Author: Will Deacon Date: Thu Apr 20 18:03:07 2023 +0100 Merge branch 'for-next/sysreg' into for-next/core * for-next/sysreg: arm64/sysreg: Convert HFGITR_EL2 to automatic generation arm64/idreg: Don't disable SME when disabling SVE arm64/sysreg: Update ID_AA64PFR1_EL1 for DDI0601 2022-12 arm64/sysreg: Convert HFG[RW]TR_EL2 to automatic generation arm64/sysreg: allow *Enum blocks in SysregFields blocks commit 9772b7f07499b71482276cb5a8e4aa23bfca6b27 Merge: 9651f00eb422a de1702f65feb5 Author: Will Deacon Date: Thu Apr 20 18:03:02 2023 +0100 Merge branch 'for-next/stacktrace' into for-next/core * for-next/stacktrace: arm64: move PAC masks to arm64: use XPACLRI to strip PAC arm64: avoid redundant PAC stripping in __builtin_return_address() arm64: stacktrace: always inline core stacktrace functions arm64: stacktrace: move dump functions to end of file arm64: stacktrace: recover return address for first entry commit 9651f00eb422a0a4c8f5cf5d920c80869e6ab5e5 Merge: 1bb31cc7afe6b 87727ba2bb05c Author: Will Deacon Date: Thu Apr 20 18:02:56 2023 +0100 Merge branch 'for-next/perf' into for-next/core * for-next/perf: (24 commits) KVM: arm64: Ensure CPU PMU probes before pKVM host de-privilege drivers/perf: hisi: add NULL check for name drivers/perf: hisi: Remove redundant initialized of pmu->name perf/arm-cmn: Fix port detection for CMN-700 arm64: pmuv3: dynamically map PERF_COUNT_HW_BRANCH_INSTRUCTIONS perf/arm-cmn: Validate cycles events fully Revert "ARM: mach-virt: Select PMUv3 driver by default" drivers/perf: apple_m1: Add Apple M2 support dt-bindings: arm-pmu: Add PMU compatible strings for Apple M2 cores perf: arm_cspmu: Fix variable dereference warning perf/amlogic: Fix config1/config2 parsing issue drivers/perf: Use devm_platform_get_and_ioremap_resource() kbuild, drivers/perf: remove MODULE_LICENSE in non-modules perf: qcom: Use devm_platform_get_and_ioremap_resource() perf: arm: Use devm_platform_get_and_ioremap_resource() perf/arm-cmn: Move overlapping wp_combine field ARM: mach-virt: Select PMUv3 driver by default ARM: perf: Allow the use of the PMUv3 driver on 32bit ARM ARM: Make CONFIG_CPU_V7 valid for 32bit ARMv8 implementations perf: pmuv3: Change GENMASK to GENMASK_ULL ... commit 3288ee5844b74cebb94ed15bc9b5b9d3223ae038 Merge: d2a158d113cbf b100722a777f6 Author: Kalle Valo Date: Thu Apr 20 19:43:45 2023 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v6.4. Major changes: wcn36xx * support for pronto v3 hardware ath11k * PCIe DeviceTree bindings * WCN6750: enable SAR support ath10k * convert DeviceTree bindings to YAML commit 5584785080045e6cd3ebc1aac49b9c0ec57f136a Author: Wu Bo Date: Fri Apr 14 18:43:08 2023 +0800 f2fs: allocate trace path buffer from names_cache It would be better to use the dedicated slab to store path. Signed-off-by: Wu Bo Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 87727ba2bb05cc3cb4233231faa7ab4c7eeb6c73 Author: Will Deacon Date: Thu Apr 20 13:33:56 2023 +0100 KVM: arm64: Ensure CPU PMU probes before pKVM host de-privilege Although pKVM supports CPU PMU emulation for non-protected guests since 722625c6f4c5 ("KVM: arm64: Reenable pmu in Protected Mode"), this relies on the PMU driver probing before the host has de-privileged so that the 'kvm_arm_pmu_available' static key can still be enabled by patching the hypervisor text. As it happens, both of these events hang off device_initcall() but the PMU consistently won the race until 7755cec63ade ("arm64: perf: Move PMUv3 driver to drivers/perf"). Since then, the host will fail to boot when pKVM is enabled: | hw perfevents: enabled with armv8_pmuv3_0 PMU driver, 7 counters available | kvm [1]: nVHE hyp BUG at: [] __kvm_nvhe_handle_host_mem_abort+0x270/0x284! | kvm [1]: Cannot dump pKVM nVHE stacktrace: !CONFIG_PROTECTED_NVHE_STACKTRACE | kvm [1]: Hyp Offset: 0xfffea41fbdf70000 | Kernel panic - not syncing: HYP panic: | PS:a00003c9 PC:0000dbe04b0c66e0 ESR:00000000f2000800 | FAR:fffffbfffddfcf00 HPFAR:00000000010b0bf0 PAR:0000000000000000 | VCPU:0000000000000000 | CPU: 2 PID: 1 Comm: swapper/0 Not tainted 6.3.0-rc7-00083-g0bce6746d154 #1 | Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015 | Call trace: | dump_backtrace+0xec/0x108 | show_stack+0x18/0x2c | dump_stack_lvl+0x50/0x68 | dump_stack+0x18/0x24 | panic+0x13c/0x33c | nvhe_hyp_panic_handler+0x10c/0x190 | aarch64_insn_patch_text_nosync+0x64/0xc8 | arch_jump_label_transform+0x4c/0x5c | __jump_label_update+0x84/0xfc | jump_label_update+0x100/0x134 | static_key_enable_cpuslocked+0x68/0xac | static_key_enable+0x20/0x34 | kvm_host_pmu_init+0x88/0xa4 | armpmu_register+0xf0/0xf4 | arm_pmu_acpi_probe+0x2ec/0x368 | armv8_pmu_driver_init+0x38/0x44 | do_one_initcall+0xcc/0x240 Fix the race properly by deferring the de-privilege step to device_initcall_sync(). This will also be needed in future when probing IOMMU devices and allows us to separate the pKVM de-privilege logic from the core hypervisor initialisation path. Cc: Oliver Upton Cc: Fuad Tabba Cc: Marc Zyngier Fixes: 7755cec63ade ("arm64: perf: Move PMUv3 driver to drivers/perf") Tested-by: Fuad Tabba Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20230420123356.2708-1-will@kernel.org Signed-off-by: Will Deacon commit 8a46df7cd135fe576c18efa418cd1549e51f2732 Author: Nico Boehr Date: Wed Feb 22 16:55:02 2023 +0100 KVM: s390: pci: fix virtual-physical confusion on module unload/load When the kvm module is unloaded, zpci_setup_aipb() perists some data in the zpci_aipb structure in s390 pci code. Note that this struct is also passed to firmware in the zpci_set_irq_ctrl() call and thus the GAIT must be a physical address. On module re-insertion, the GAIT is restored from this structure in zpci_reset_aipb(). But it is a physical address, hence this may cause issues when the kvm module is unloaded and loaded again. Fix virtual vs physical address confusion (which currently are the same) by adding the necessary physical-to-virtual-conversion in zpci_reset_aipb(). Signed-off-by: Nico Boehr Reviewed-by: Matthew Rosato Signed-off-by: Janosch Frank Link: https://lore.kernel.org/r/20230222155503.43399-1-nrb@linux.ibm.com Message-Id: <20230222155503.43399-1-nrb@linux.ibm.com> commit 7be3e3392335131b2234fa3e6feda3e989cb837c Author: Pierre Morel Date: Tue Feb 14 13:28:41 2023 +0100 KVM: s390: vsie: clarifications on setting the APCB The APCB is part of the CRYCB. The calculation of the APCB origin can be done by adding the APCB offset to the CRYCB origin. Current code makes confusing transformations, converting the CRYCB origin to a pointer to calculate the APCB origin. Let's make things simpler and keep the CRYCB origin to make these calculations. Signed-off-by: Pierre Morel Reviewed-by: Claudio Imbrenda Acked-by: David Hildenbrand Acked-by: Janosch Frank Signed-off-by: Janosch Frank Link: https://lore.kernel.org/r/20230214122841.13066-2-pmorel@linux.ibm.com Message-Id: <20230214122841.13066-2-pmorel@linux.ibm.com> commit 2f2c0911b950794dbf394ee2d784138fbf714dbd Author: Nico Boehr Date: Thu Feb 23 17:22:36 2023 +0100 KVM: s390: interrupt: fix virtual-physical confusion for next alert GISA We sometimes put a virtual address in next_alert, which should always be a physical address, since it is shared with hardware. This currently works, because virtual and physical addresses are the same. Add phys_to_virt() to resolve the virtual-physical confusion. Signed-off-by: Nico Boehr Reviewed-by: Janosch Frank Reviewed-by: Michael Mueller Signed-off-by: Janosch Frank Link: https://lore.kernel.org/r/20230223162236.51569-1-nrb@linux.ibm.com Message-Id: <20230223162236.51569-1-nrb@linux.ibm.com> commit 19bcff7e2777c7337caeef5532ad6f93f3d24d64 Author: Linus Walleij Date: Fri Apr 14 16:06:22 2023 +0200 pinctrl: qcom ssbi-gpio: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230414-immutable-irqchips-2-v1-6-6b59a5186b00@linaro.org commit 5e75e24eb111245b1a1fd08496fc012d5e1f9e7f Author: Linus Walleij Date: Fri Apr 14 16:06:21 2023 +0200 pinctrl: qcom ssbi-mpp: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230414-immutable-irqchips-2-v1-5-6b59a5186b00@linaro.org commit 9890a043b3d755f796f6ae14aa66cc9cecd15a68 Author: Linus Walleij Date: Fri Apr 14 16:06:20 2023 +0200 pinctrl: qcom spmi-mpp: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230414-immutable-irqchips-2-v1-4-6b59a5186b00@linaro.org commit 35d008679a5af05dcca4fac5c0e8491196a6ffdf Author: Linus Walleij Date: Fri Apr 14 16:06:19 2023 +0200 pinctrl: plgpio: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230414-immutable-irqchips-2-v1-3-6b59a5186b00@linaro.org commit 33c56e5ca01b85d235f464572a640ef657d53fca Author: Linus Walleij Date: Fri Apr 14 16:06:18 2023 +0200 pinctrl: pistachio: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230414-immutable-irqchips-2-v1-2-6b59a5186b00@linaro.org commit a0a53f1bf1f712b6a52eae21a2f82cf44a7cfe5c Author: Linus Walleij Date: Fri Apr 14 16:06:17 2023 +0200 pinctrl: pic32: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Switch some call to use irqd_to_hwirq() in the process. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230414-immutable-irqchips-2-v1-1-6b59a5186b00@linaro.org commit 57fbfb3b0b6526c9fd9c32383720ff550ace4919 Author: Alexander Dahl Date: Tue Apr 18 13:34:02 2023 +0200 docs: leds: ledtrig-oneshot: Fix spelling mistake It's no comparison, but a "first this, then that" situation. Signed-off-by: Alexander Dahl Acked-by: Pavel Machek Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230418113402.188391-1-ada@thorsis.com commit 389b01aba302c4504930cd6089d1910995e870af Merge: efd090c040f2a 6d0a21dd95c34 Author: Mark Brown Date: Thu Apr 20 14:49:35 2023 +0100 ASoC: SOF: pcm/Intel: Pause-resume improvements for Merge series from Peter Ujfalusi : Last minute patch for correct the pasue/resume operation with IPC4. The issues are hardto reproduce and needs extended stress testing to be hit, in which case the audio breaks due to DMA errors. commit efd090c040f2ab68b7be79f6c0e94ac8c30d70f1 Merge: 0d587f354dcf3 367fd6ffa294c Author: Mark Brown Date: Thu Apr 20 14:49:29 2023 +0100 ASoC: SOF: add no_reply IPC calls Merge series from Pierre-Louis Bossart : Simplify IPC messages to avoid passing a reply structure that is not used later. commit 0d587f354dcf3616542d6ec3239fb65ed7187735 Merge: a9e42d9e8b4be dc5a3e60a4b59 Author: Mark Brown Date: Thu Apr 20 14:49:22 2023 +0100 ASoC: Intel: boards: updates for 6.4 Merge series from Pierre-Louis Bossart : Preparation of ALC712 support with different types of SoundWire devices per link, new RaptorLake SoundWire device, better error handling for Cirrus devices and cosmetic changes for Max98373. Bard Liao (3): ASoC: Intel: sof_sdw: set codec_num = 1 if the device is not aggregated ASoC: Intel: sof_sdw: support different devices on the same sdw link ASoC: Intel: sof_sdw: append codec type to dai link name Curtis Malainey (1): ASoC: Intel: sof_cirrus_common: Guard against missing buses Yong Zhi (2): ASoC: Intel: sof_sdw: remove late_probe flag in struct sof_sdw_codec_info ASoC: Intel: sof_sdw_max98373: change sof_sdw_mx8373_late_probe to static call apoorv (1): ASoC: Intel: soc-acpi: Add entry for rt711-sdca-sdw at link 2 in RPL match table sound/soc/intel/boards/sof_cirrus_common.c | 7 +- sound/soc/intel/boards/sof_sdw.c | 181 ++++++++++++------ sound/soc/intel/boards/sof_sdw_common.h | 3 - sound/soc/intel/boards/sof_sdw_max98373.c | 22 +-- .../intel/common/soc-acpi-intel-rpl-match.c | 17 +- 5 files changed, 152 insertions(+), 78 deletions(-) -- 2.37.2 commit 538bc0f40b364f2c7b81f11aa163f723b138b40f Author: Ard Biesheuvel Date: Tue Apr 18 15:49:51 2023 +0200 efi/zboot: Set forward edge CFI compat header flag if supported Add some plumbing to the zboot EFI header generation to set the newly introduced DllCharacteristicsEx flag associated with forward edge CFI enforcement instructions (BTI on arm64, IBT on x86) x86 does not currently uses the zboot infrastructure, so let's wire it up only for arm64. Signed-off-by: Ard Biesheuvel commit bca2f3a9406b89961fbc6c92c52c6fc1fd91d35f Author: Ard Biesheuvel Date: Tue Apr 18 15:49:50 2023 +0200 efi/zboot: Add BSS padding before compression We don't really care about the size of the decompressed image - what matters is how much space needs to be allocated for the image to execute, and this includes space for BSS that is not part of the loadable image and so it is not accounted for in the decompressed size. So let's add some zero padding to the end of the image: this compresses well, and it ensures that BSS is accounted for, and as a bonus, it will be zeroed before launching the image. Since all architectures that implement support for EFI zboot carry this value in the header in the same location, we can just grab it from the binary that is being compressed. Signed-off-by: Ard Biesheuvel commit 8358098b9787caab8bbc93fd78d046afaed43c16 Author: Ard Biesheuvel Date: Tue Apr 18 15:49:48 2023 +0200 arm64: efi: Enable BTI codegen and add PE/COFF annotation UEFI heavily relies on so-called protocols, which are essentially tables populated with pointers to executable code, and these are invoked indirectly using BR or BLR instructions. This makes the EFI execution context vulnerable to attacks on forward edge control flow, and so it would help if we could enable hardware enforcement (BTI) on CPUs that implement it. So let's no longer disable BTI codegen for the EFI stub, and set the newly introduced PE/COFF header flag when the kernel is built with BTI landing pads. Signed-off-by: Ard Biesheuvel Reviewed-by: Mark Brown commit 038585573d0544bc717cdc5b3be4e95206d3ee3d Author: Ard Biesheuvel Date: Tue Apr 18 15:49:47 2023 +0200 efi/pe: Import new BTI/IBT header flags from the spec The latest version of your favorite fork of the PE/COFF spec includes a new type of header flag that is intended to be used in the context of EFI firmware to indicate to the image loader that the executable regions of an image can be mapped with BTI/IBT enforcement enabled. So let's import these definitions so we can use them in subsequent patches. Signed-off-by: Ard Biesheuvel commit e315e7b83a22043bffee450437d7089ef373cbf6 Author: Zhengchao Shao Date: Tue Apr 18 14:54:50 2023 +0800 net: libwx: fix memory leak in wx_setup_rx_resources When wx_alloc_page_pool() failed in wx_setup_rx_resources(), it doesn't release DMA buffer. Add dma_free_coherent() in the error path to release the DMA buffer. Fixes: 850b971110b2 ("net: libwx: Allocate Rx and Tx resources") Signed-off-by: Zhengchao Shao Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230418065450.2268522-1-shaozhengchao@huawei.com Signed-off-by: Paolo Abeni commit 7c75661c42a06fe35e1774373194f646b5a9e5c9 Author: Ming Lei Date: Thu Apr 20 17:11:04 2023 +0800 ublk: don't return 0 in case of any failure Commit 2d786e66c966 ("block: ublk: switch to ioctl command encoding") starts to reset local variable of 'ret' as zero, then if any failure happens when handling the three IO commands, 0 can be returned to ublk server. Fix it by returning -EINVAL in case of command handling failure. Cc: Christoph Hellwig Fixes: 2d786e66c966 ("block: ublk: switch to ioctl command encoding") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20230420091104.1092972-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit d2a158d113cbfe37a5dd3f44dc96d008dd910a81 Merge: 6c6d62ae8271b 3b522cadedfe6 Author: Kalle Valo Date: Thu Apr 20 15:53:58 2023 +0300 Merge tag 'mt76-for-kvalo-2023-04-18' of https://github.com/nbd168/wireless mt76 patches for 6.4 - fixes - connac code unification - mt7921 p2p support - mt7996 mesh a-msdu support - mt7996 eht support - mt7996 coredump support commit 654d0310007146fae87b0c1a68f81e53ad519b14 Author: Etienne Carriere Date: Thu Apr 20 09:49:23 2023 +0200 optee: fix uninited async notif value Fixes an uninitialized variable in irq_handler() that could lead to unpredictable behavior in case OP-TEE fails to handle SMC function ID OPTEE_SMC_GET_ASYNC_NOTIF_VALUE. This change ensures that in that case get_async_notif_value() properly reports there are no notification event. Reported-by: kernel test robot Link: https://lore.kernel.org/r/202304200755.OoiuclDZ-lkp@intel.com/ Reported-by: Dan Carpenter Link: https://lore.kernel.org/all/d9b7f69b-c737-4cb3-8e74-79fe00c934f9@kili.mountain/ Fixes: 6749e69c4dad ("optee: add asynchronous notifications") Signed-off-by: Etienne Carriere Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit 3c85cc43c8e7855d202da184baf00c7b8eeacf71 Author: Jens Axboe Date: Wed Apr 19 14:16:03 2023 -0600 Revert "io_uring/rsrc: disallow multi-source reg buffers" This reverts commit edd478269640b360c6f301f2baa04abdda563ef3. There's really no specific need to disallow multiple sources of buffers, and io_uring really should not be mandating this by itself. We should be able to solely rely on GUP making these decisions. As this also stands in the way of a cleanup where io_uring is the odd one out, kill it. Link: https://lore.kernel.org/all/61ded378-51a8-1dcb-b631-fda1903248a9@gmail.com/ Signed-off-by: Jens Axboe commit ec274aff21b6a94c7973384ca80a503c1bc3b173 Author: Petr Tesarik Date: Thu Apr 20 11:58:58 2023 +0200 swiotlb: Omit total_used and used_hiwater if !CONFIG_DEBUG_FS The tracking of used_hiwater adds an atomic operation to the hot path. This is acceptable only when debugging the kernel. To make sure that the fields can never be used by mistake, do not even include them in struct io_tlb_mem if CONFIG_DEBUG_FS is not set. The build fails after doing that. To fix it, it is necessary to remove all code specific to debugfs and instead provide a stub implementation of swiotlb_create_debugfs_files(). As a bonus, this change allows to remove one __maybe_unused attribute. Signed-off-by: Petr Tesarik Signed-off-by: Christoph Hellwig commit 6c6d62ae8271bd4b55dd2ba4b7ed552162823880 Author: Simon Horman Date: Tue Apr 18 13:29:22 2023 +0200 wifi: rtw88: Update spelling in main.h Update spelling in comments in main.h Found by inspection. Signed-off-by: Simon Horman Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230418-rtw88-starspell-v1-1-70e52a23979b@kernel.org commit 09be55585d2785d354b2375e9cf2acdc140d65cb Author: Arnd Bergmann Date: Mon Apr 17 22:51:24 2023 +0200 wifi: airo: remove ISA_DMA_API dependency This driver does not actually use the ISA DMA API, it is purely PIO based, so remove the dependency. Signed-off-by: Arnd Bergmann Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230417205131.1560074-1-arnd@kernel.org commit c8bc3760277965c8eaa90155acea2b16215ebb8a Author: Bitterblue Smith Date: Mon Apr 17 20:08:20 2023 +0300 wifi: rtl8xxxu: Simplify setting the initial gain The goal of writing 0x6954341e / 0x6955341e to REG_OFDM0_XA_AGC_CORE1 appears to be setting the initial gain, which is stored in bits 0..6. Bits 7..31 are the same as what the phy init tables write. Modify only bits 0..6 so that we don't have to care about the values of the others. This way we don't have to add another "else if" for the RTL8192FU. Why we need to change the initial gain from the default 0x20 to 0x1e? Not sure. Some of the vendor drivers change it to 0x1e before scanning and then restore it to the original value after. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/cf91ca69-70e3-4c20-c0b1-e59d452356a1@gmail.com commit cd85c8b059c54b00e3b509e83fb36c2798f50128 Author: Bitterblue Smith Date: Mon Apr 17 20:07:09 2023 +0300 wifi: rtl8xxxu: Add rtl8xxxu_write{8,16,32}_{set,clear} Also add rtl8xxxu_write32_mask, rtl8xxxu_write_rfreg_mask. These helper functions make it easier to modify only parts of a register by eliminating the call to the register reading function and the bit manipulations. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/9430b841-1048-b27c-14ec-fca447dc32af@gmail.com commit af8678e6c5bd37d99fa37c06a158a263da42efa1 Author: Bitterblue Smith Date: Mon Apr 17 20:05:43 2023 +0300 wifi: rtl8xxxu: Don't print the vendor/product/serial Most devices have a vendor name, product name, and serial number in the efuse, but it's pretty useless. It duplicates the information already printed by the USB subsystem: usb 1-4: New USB device found, idVendor=0bda, idProduct=8178, bcdDevice= 2.00 usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-4: Product: 802.11n WLAN Adapter usb 1-4: Manufacturer: Realtek usb 1-4: SerialNumber: 00e04c000001 -> usb 1-4: Vendor: Realtek -> usb 1-4: Product: 802.11n WLAN Adapter usb 1-4: New USB device found, idVendor=0bda, idProduct=818b, bcdDevice= 2.00 usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-4: Product: 802.11n NIC usb 1-4: Manufacturer: Realtek usb 1-4: SerialNumber: 00e04c000001 -> usb 1-4: Vendor: Realtek -> usb 1-4: Product: 802.11n NIC -> usb 1-4: Serial not available. usb 1-4: New USB device found, idVendor=0bda, idProduct=f179, bcdDevice= 0.00 usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-4: Product: 802.11n usb 1-4: Manufacturer: Realtek usb 1-4: SerialNumber: 002E2DC0041F -> usb 1-4: Vendor: Realtek -> usb 1-4: Product: 802.11n usb 1-4: New USB device found, idVendor=0bda, idProduct=8179, bcdDevice= 0.00 usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-4: Product: 802.11n NIC usb 1-4: Manufacturer: Realtek usb 1-4: SerialNumber: 00E04C0001 -> usb 1-4: Vendor: Realtek -> usb 1-4: Product: 802.11n NIC -> usb 1-4: Serial: 00E04C0001 Also, that data is not interpreted correctly in all cases: usb 3-1.1.2: New USB device found, idVendor=0bda, idProduct=8179, bcdDevice= 0.00 usb 3-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 3-1.1.2: Product: 802.11n NIC usb 3-1.1.2: Manufacturer: Realtek usb 3-1.1.2: Vendor: Realtek usb 3-1.1.2: Product: \x03802.11n NI usb 3-1.1.2: Serial: \xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff Link: https://bugzilla.kernel.org/show_bug.cgi?id=217231 Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/a2a7d9df-0529-7890-3522-48dce613753f@gmail.com commit 59a3a312009723e3e5082899655fdcc420e2b47a Author: Larry Finger Date: Mon Apr 17 11:03:31 2023 -0500 wifi: rtw88: Fix memory leak in rtw88_usb Kmemleak shows the following leak arising from routine in the usb probe routine: unreferenced object 0xffff895cb29bba00 (size 512): comm "(udev-worker)", pid 534, jiffies 4294903932 (age 102751.088s) hex dump (first 32 bytes): 77 30 30 30 00 00 00 00 02 2f 2d 2b 30 00 00 00 w000...../-+0... 02 00 2a 28 00 00 00 00 ff 55 ff ff ff 00 00 00 ..*(.....U...... backtrace: [] kmalloc_trace+0x26/0x90 [] rtw_usb_probe+0x2f1/0x680 [rtw_usb] [] usb_probe_interface+0xdd/0x2e0 [usbcore] [] really_probe+0x18e/0x3d0 [] __driver_probe_device+0x78/0x160 [] driver_probe_device+0x1f/0x90 [] __driver_attach+0xbf/0x1b0 [] bus_for_each_dev+0x70/0xc0 [] bus_add_driver+0x10e/0x210 [] driver_register+0x55/0xf0 [] usb_register_driver+0x88/0x140 [usbcore] [] do_one_initcall+0x43/0x210 [] do_init_module+0x4a/0x200 [] __do_sys_finit_module+0xac/0x120 [] do_syscall_64+0x56/0x80 [] entry_SYSCALL_64_after_hwframe+0x46/0xb0 The leak was verified to be real by unloading the driver, which resulted in a dangling pointer to the allocation. The allocated memory is freed in rtw_usb_intf_deinit(). Signed-off-by: Larry Finger Cc: Sascha Hauer Cc: Ping-Ke Shih Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230417160331.23071-1-Larry.Finger@lwfinger.net commit 172591baa2cc1ec04869a0d798821a6ca9a2f4b4 Author: Sascha Hauer Date: Mon Apr 17 16:03:58 2023 +0200 wifi: rtw88: call rtw8821c_switch_rf_set() according to chip variant We have to call rtw8821c_switch_rf_set() with SWITCH_TO_WLG or SWITCH_TO_BTG according to the chip variant as denoted in rfe_option. The information which argument to use for which variant has been taken from the vendor driver. Signed-off-by: Sascha Hauer Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230417140358.2240429-5-s.hauer@pengutronix.de commit 97c75e1adeda78b3794936c617d8b86e9ebd54f5 Author: Sascha Hauer Date: Mon Apr 17 16:03:57 2023 +0200 wifi: rtw88: set pkg_type correctly for specific rtw8821c variants According to the vendor driver the pkg_type has to be set to '1' for some rtw8821c variants. As the pkg_type has been hardcoded to '0', add a field for it in struct rtw_hal and set this correctly in the rtw8821c part. With this parsing of a rtw_table is influenced and check_positive() in phy.c returns true for some cases here. The same is done in the vendor driver. However, this has no visible effect on the driver here. Signed-off-by: Sascha Hauer Reviewed-by: Ping-Ke Shih Signed-off-by: Sascha Hauer Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230417140358.2240429-4-s.hauer@pengutronix.de commit 14705f969d98187a1cc2682e0c9bd2e230b8098f Author: Sascha Hauer Date: Mon Apr 17 16:03:56 2023 +0200 wifi: rtw88: rtw8821c: Fix rfe_option field width On my RTW8821CU chipset rfe_option reads as 0x22. Looking at the vendor driver suggests that the field width of rfe_option is 5 bit, so rfe_option should be masked with 0x1f. Without this the rfe_option comparisons with 2 further down the driver evaluate as false when they should really evaluate as true. The effect is that 2G channels do not work. rfe_option is also used as an array index into rtw8821c_rfe_defs[]. rtw8821c_rfe_defs[34] (0x22) was added as part of adding USB support, likely because rfe_option reads as 0x22. As this now becomes 0x2, rtw8821c_rfe_defs[34] is no longer used and can be removed. Note that this might not be the whole truth. In the vendor driver there are indeed places where the unmasked rfe_option value is used. However, the driver has several places where rfe_option is tested with the pattern if (rfe_option == 2 || rfe_option == 0x22) or if (rfe_option == 4 || rfe_option == 0x24), so that rfe_option BIT(5) has no influence on the code path taken. We therefore mask BIT(5) out from rfe_option entirely until this assumption is proved wrong by some chip variant we do not know yet. Signed-off-by: Sascha Hauer Tested-by: Alexandru gagniuc Tested-by: Larry Finger Tested-by: ValdikSS Cc: stable@vger.kernel.org Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230417140358.2240429-3-s.hauer@pengutronix.de commit a6f187f92bcc2b17821538b4a11d61764e68b091 Author: Sascha Hauer Date: Mon Apr 17 16:03:55 2023 +0200 wifi: rtw88: usb: fix priority queue to endpoint mapping The RTW88 chipsets have four different priority queues in hardware. For the USB type chipsets the packets destined for a specific priority queue must be sent through the endpoint corresponding to the queue. This was not fully understood when porting from the RTW88 USB out of tree driver and thus violated. This patch implements the qsel to endpoint mapping as in get_usb_bulkout_id_88xx() in the downstream driver. Without this the driver often issues "timed out to flush queue 3" warnings and often TX stalls completely. Signed-off-by: Sascha Hauer Tested-by: ValdikSS Tested-by: Alexandru gagniuc Tested-by: Larry Finger Cc: stable@vger.kernel.org Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230417140358.2240429-2-s.hauer@pengutronix.de commit d16836cdcc3b17734f6aae165268d2f1777a4f74 Author: Po-Hao Huang Date: Fri Apr 14 20:13:31 2023 +0800 wifi: rtw88: 8822c: add iface combination Allow 8822c to operate two interface concurrently, only 1 AP mode plus 1 station mode under same frequency is supported. Combination of other types will not be added until requested. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230414121331.18062-1-pkshih@realtek.com commit 96fbb84de4ffce76d54de8656efe0a580081c037 Author: Po-Hao Huang Date: Fri Apr 14 20:13:23 2023 +0800 wifi: rtw88: handle station mode concurrent scan with AP mode This patch allows vifs sharing same hardware with the AP mode vif to do scan, do note that this could lead to packet loss or disconnection of the AP's clients. Since we don't have chanctx, update scan info upon set channel so bandwidth changes won't go unnoticed and get misconfigured after scan. Download beacon just before scan starts to allow hardware to get proper content to do beaconing. Last, beacons should only be transmitted in AP's operating channel. Turn related beacon functions off while we're in other channels so the receiving stations won't get confused. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230414121323.18008-1-pkshih@realtek.com commit a1b8015da57a783b3ceebd8e114afbe07536bd54 Author: Po-Hao Huang Date: Fri Apr 14 20:13:12 2023 +0800 wifi: rtw88: prevent scan abort with other VIFs Only abort scan with current scanning VIF. If we have more than one interface, we could call rtw_hw_scan_abort() with the wrong VIF as input. This avoids potential null pointer being accessed when actually the other VIF is scanning. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230414121312.17954-1-pkshih@realtek.com commit 982f4a2004f712ce7aed7f7e69fa64e4c06eee7d Author: Po-Hao Huang Date: Fri Apr 14 20:13:00 2023 +0800 wifi: rtw88: refine reserved page flow for AP mode Only gather reserved pages from AP interface after it has started. Or else ieee80211_beacon_get_*() returns NULL and causes other VIFs' reserved pages fail to download. Update location of current reserved page after beacon renews so offsets changed by beacon can be recognized. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230414121300.17900-1-pkshih@realtek.com commit 5ec69129f195f340acb15b8535cb372ccdbcf5d7 Author: Po-Hao Huang Date: Fri Apr 14 20:11:31 2023 +0800 wifi: rtw88: disallow PS during AP mode Firmware can't support PS mode during AP mode, so disallow this case. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230414121135.17828-5-pkshih@realtek.com commit ffa71c5477793f41bc7537a60aa54ac40275ab78 Author: Po-Hao Huang Date: Fri Apr 14 20:11:30 2023 +0800 wifi: rtw88: 8822c: extend reserved page number Extend 8822c's reserved page number to accommodate additional required pages. Reserved page is an area of memory in the FIFO dedicated for special purposes. Previously only one interface is supported so 8 pages should suffice, extend it so we can support 2 interfaces concurrently. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230414121135.17828-4-pkshih@realtek.com commit ccf73f6e69c0244a979e97eb6c38f80cd6cbc116 Author: Po-Hao Huang Date: Fri Apr 14 20:11:29 2023 +0800 wifi: rtw88: add port switch for AP mode Switch port settings if AP mode does not start on port 0 because of hardware limitation. For some ICs, beacons on ports other than zero could misbehave and do not issue properly, to fix this we change AP VIFs to port zero when multiple interfaces is active. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230414121135.17828-3-pkshih@realtek.com commit f0e741e4ddbc01610ca87167a123702b3fdac51f Author: Po-Hao Huang Date: Fri Apr 14 20:11:28 2023 +0800 wifi: rtw88: add bitmap for dynamic port settings In order to support multiple interfaces, multiple port settings will be required. Current code always uses port 0 and should be changed. Declare a bitmap with size equal to hardware port number to record the current usage. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230414121135.17828-2-pkshih@realtek.com commit eaddda248483ff78c4d26f1bf420e5f2af436a74 Author: Ping-Ke Shih Date: Fri Apr 14 16:22:28 2023 +0800 wifi: rtw89: mac: use regular int as return type of DLE buffer request The function to request DLE (data link engine) buffer uses 'u16' as return value that mixes error code, so change it to 'int' as regular error code. Also, treat invalid register value (0xfff) as an error. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230414082228.30766-1-pkshih@realtek.com commit 046b6a171009e1ed9ede02194025e9ccd709beb2 Author: Guenter Roeck Date: Wed Apr 19 09:41:27 2023 -0700 device property: make device_property functions take const device * device_property functions do not modify the device pointer passed to them. The underlying of_device and fwnode_ functions actually already take const * arguments. Mark the parameter constant to simplify conversion from of_property to device_property functions, and to let the calling code use const device pointers where possible. Cc: Chris Packham Reviewed-by: Chris Packham Reviewed-by: Sakari Ailus Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20230419164127.3773278-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit 2025b2ca8004c04861903d076c67a73a0ec6dfca Author: Rodríguez Barbarin, José Javier Date: Tue Apr 11 10:33:29 2023 +0200 mcb-lpc: Reallocate memory region to avoid memory overlapping mcb-lpc requests a fixed-size memory region to parse the chameleon table, however, if the chameleon table is smaller that the allocated region, it could overlap with the IP Cores' memory regions. After parsing the chameleon table, drop/reallocate the memory region with the actual chameleon table size. Co-developed-by: Jorge Sanjuan Garcia Signed-off-by: Jorge Sanjuan Garcia Signed-off-by: Javier Rodriguez Signed-off-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20230411083329.4506-4-jth@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9be24faadd085c284890c3afcec7a0184642315a Author: Rodríguez Barbarin, José Javier Date: Tue Apr 11 10:33:28 2023 +0200 mcb-pci: Reallocate memory region to avoid memory overlapping mcb-pci requests a fixed-size memory region to parse the chameleon table, however, if the chameleon table is smaller that the allocated region, it could overlap with the IP Cores' memory regions. After parsing the chameleon table, drop/reallocate the memory region with the actual chameleon table size. Co-developed-by: Jorge Sanjuan Garcia Signed-off-by: Jorge Sanjuan Garcia Signed-off-by: Javier Rodriguez Signed-off-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20230411083329.4506-3-jth@kernel.org Signed-off-by: Greg Kroah-Hartman commit a889c276d33d333ae96697510f33533f6e9d9591 Author: Rodríguez Barbarin, José Javier Date: Tue Apr 11 10:33:27 2023 +0200 mcb: Return actual parsed size when reading chameleon table The function chameleon_parse_cells() returns the number of cells parsed which has an undetermined size. This return value is only used for error checking but the number of cells is never used. Change return value to be number of bytes parsed to allow for memory management improvements. Co-developed-by: Jorge Sanjuan Garcia Signed-off-by: Jorge Sanjuan Garcia Signed-off-by: Javier Rodriguez Signed-off-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20230411083329.4506-2-jth@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4daa669efcfa5147e4bd5ecb3f1e10c0c96eef27 Author: John Stultz Date: Tue Apr 11 18:04:09 2023 +0000 kernel/configs: Drop Android config fragments In the old days where each device had a custom kernel, the android config fragments were useful to provide the required and reccomended options expected by userland. However, these days devices are expected to use the GKI kernel, so these config fragments no longer needed, and out of date, so they seem to only cause confusion. So lets drop them. If folks are curious what configs are expected by the Android environment, check out the gki_defconfig file in the latest android common kernel tree. Cc: Rob Herring Cc: Amit Pundir Cc: Signed-off-by: John Stultz Link: https://lore.kernel.org/r/20230411180409.1706067-1-jstultz@google.com Signed-off-by: Greg Kroah-Hartman commit 32118bdc9471f6d28dbf3d55b2bf0f912be0c62b Author: Deming Wang Date: Wed Apr 12 03:30:41 2023 -0400 virt: acrn: Replace obsolete memalign() with posix_memalign() memalign() is obsolete according to its manpage. Replace memalign() with posix_memalign() and remove malloc.h include that was there for memalign(). As a pointer is passed into posix_memalign(), initialize *p to NULL to silence a warning about the function's return value being used as uninitialized (which is not valid anyway because the error is properly checked before p is returned). Signed-off-by: Deming Wang Link: https://lore.kernel.org/r/20230412073041.2168-1-wangdeming@inspur.com Signed-off-by: Greg Kroah-Hartman commit 11a96703943fc4293f50f554b9e33c79ef4f5d8d Author: Wedson Almeida Filho Date: Thu Apr 6 01:54:35 2023 -0300 driver core: update comments in device_rename() Document that some subsystems are still going to use device_rename for the time being, so it is not a good idea to assume it's not used. Also remove mentions of a plan to stop renaming net devices. Signed-off-by: Wedson Almeida Filho Link: https://lore.kernel.org/r/20230406045435.19452-1-wedsonaf@gmail.com Signed-off-by: Greg Kroah-Hartman commit e2f06aa885081e1391916367f53bad984714b4db Author: Stephen Boyd Date: Wed Apr 12 15:58:42 2023 -0700 driver core: Don't require dynamic_debug for initcall_debug probe timing Don't require the use of dynamic debug (or modification of the kernel to add a #define DEBUG to the top of this file) to get the printk message about driver probe timing. This printk is only emitted when initcall_debug is enabled on the kernel commandline, and it isn't immediately obvious that you have to do something else to debug boot timing issues related to driver probe. Add a comment too so it doesn't get converted back to pr_debug(). Fixes: eb7fbc9fb118 ("driver core: Add missing '\n' in log messages") Cc: stable Cc: Christophe JAILLET Cc: Brian Norris Reviewed-by: Brian Norris Acked-by: Randy Dunlap Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20230412225842.3196599-1-swboyd@chromium.org Signed-off-by: Greg Kroah-Hartman commit b56eef3e16d888883fefab47425036de80dd38fc Author: Jishnu Prakash Date: Thu Apr 13 15:38:34 2023 -0700 spmi: Add a check for remove callback when removing a SPMI driver When removing a SPMI driver, there can be a crash due to NULL pointer dereference if it does not have a remove callback defined. This is one such call trace observed when removing the QCOM SPMI PMIC driver: dump_backtrace.cfi_jt+0x0/0x8 dump_stack_lvl+0xd8/0x16c panic+0x188/0x498 __cfi_slowpath+0x0/0x214 __cfi_slowpath+0x1dc/0x214 spmi_drv_remove+0x16c/0x1e0 device_release_driver_internal+0x468/0x79c driver_detach+0x11c/0x1a0 bus_remove_driver+0xc4/0x124 driver_unregister+0x58/0x84 cleanup_module+0x1c/0xc24 [qcom_spmi_pmic] __do_sys_delete_module+0x3ec/0x53c __arm64_sys_delete_module+0x18/0x28 el0_svc_common+0xdc/0x294 el0_svc+0x38/0x9c el0_sync_handler+0x8c/0xf0 el0_sync+0x1b4/0x1c0 If a driver has all its resources allocated through devm_() APIs and does not need any other explicit cleanup, it would not require a remove callback to be defined. Hence, add a check for remove callback presence before calling it when removing a SPMI driver. Link: https://lore.kernel.org/r/1671601032-18397-2-git-send-email-quic_jprakash@quicinc.com Fixes: 6f00f8c8635f ("mfd: qcom-spmi-pmic: Use devm_of_platform_populate()") Fixes: 5a86bf343976 ("spmi: Linux driver framework for SPMI") Signed-off-by: Jishnu Prakash Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20230413223834.4084793-7-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 80c606a842e6b6b6f4a2b53a734a9d3be2cdddff Author: Randy Dunlap Date: Thu Apr 13 15:38:33 2023 -0700 spmi: fix W=1 kernel-doc warnings Fix all W=1 kernel-doc warnings in drivers/spmi/: drivers/spmi/spmi.c:414: warning: expecting prototype for spmi_controller_alloc(). Prototype was for spmi_device_alloc() instead drivers/spmi/spmi.c:592: warning: expecting prototype for spmi_driver_register(). Prototype was for __spmi_driver_register() instead drivers/spmi/spmi.c:592: warning: Function parameter or member 'owner' not described in '__spmi_driver_register' drivers/spmi/spmi-pmic-arb.c:155: warning: cannot understand function prototype: 'struct spmi_pmic_arb ' drivers/spmi/spmi-pmic-arb.c:203: warning: cannot understand function prototype: 'struct pmic_arb_ver_ops ' drivers/spmi/spmi-pmic-arb.c:219: warning: expecting prototype for struct pmic_arb_ver. Prototype was for struct pmic_arb_ver_ops instead Link: https://lore.kernel.org/r/20230113064040.26801-1-rdunlap@infradead.org Cc: Stephen Boyd Signed-off-by: Randy Dunlap Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20230413223834.4084793-6-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 77982a7f4970dcabf4bbcbcae9d1dc85a731ce6b Author: Krzysztof Kozlowski Date: Thu Apr 13 15:38:32 2023 -0700 spmi: mtk-pmif: Drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). drivers/spmi/spmi-mtk-pmif.c:517:34: error: ‘mtk_spmi_match_table’ defined but not used [-Werror=unused-const-variable=] Link: https://lore.kernel.org/r/20230310222857.315629-2-krzysztof.kozlowski@linaro.org Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20230413223834.4084793-5-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 019fe19bd4079bc9775fb034e49da68b1b8db06a Author: Uwe Kleine-König Date: Thu Apr 13 15:38:31 2023 -0700 spmi: pmic-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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20230306073446.2194048-4-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20230413223834.4084793-4-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 75fbbd8b53b46fa1c36d055854d7c0c849abf9ff Author: Uwe Kleine-König Date: Thu Apr 13 15:38:30 2023 -0700 spmi: mtk-pmif: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20230306073446.2194048-3-u.kleine-koenig@pengutronix.de Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Uwe Kleine-König Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20230413223834.4084793-3-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 15f44da0ab041e6f4d2218468eec792ebfa25665 Author: Uwe Kleine-König Date: Thu Apr 13 15:38:29 2023 -0700 spmi: hisi-spmi-controller: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20230306073446.2194048-2-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20230413223834.4084793-2-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4ccb0fc2a212d11e5491a4a1e705d6d84463c3a5 Author: Krzysztof Kozlowski Date: Sat Apr 15 12:43:04 2023 +0200 w1: gpio: remove unnecessary ENOMEM messages Core already prints detailed reports on out of memory: WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415104304.104134-16-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1e5d6652154aca23da856ac7926f23217239ea60 Author: Krzysztof Kozlowski Date: Sat Apr 15 12:43:03 2023 +0200 w1: omap-hdq: remove unnecessary ENOMEM messages Core already prints detailed reports on out of memory: WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415104304.104134-15-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 752144d8939a5b303b753da8528e14d14c2a235c Author: Krzysztof Kozlowski Date: Sat Apr 15 12:43:02 2023 +0200 w1: omap-hdq: add SPDX tag Replace GPLv2 license text with SPDX and drop unnecessary file name in comment to fix checkpatch warnings: WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 WARNING: It's generally not useful to have the filename in the file Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415104304.104134-14-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0cb90771913922e4b34c296e96d80d451766d942 Author: Krzysztof Kozlowski Date: Sat Apr 15 12:43:01 2023 +0200 w1: omap-hdq: allow compile testing omap-hdq does not depend on anything from ARCH_OMAP for building. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415104304.104134-13-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4f4129e4e28fb5f5e84a2d9719666968049d95e3 Author: Krzysztof Kozlowski Date: Sat Apr 15 12:43:00 2023 +0200 w1: matrox: remove unnecessary ENOMEM messages Core already prints detailed reports on out of memory: WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415104304.104134-12-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 115ddc758bfbd24e077e2e96b307d174622e1584 Author: Krzysztof Kozlowski Date: Sat Apr 15 12:42:59 2023 +0200 w1: matrox: use inline over __inline__ Switch to inline as preferred by coding style: WARNING: plain inline is preferred over __inline__ Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415104304.104134-11-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 01bc199b42594e31e5c4fe335f4feb40f976db1f Author: Krzysztof Kozlowski Date: Sat Apr 15 12:42:58 2023 +0200 w1: matrox: switch from asm to linux header linux/io.h is preferred over asm/io.h: WARNING: Use #include instead of Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415104304.104134-10-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 787e19ae1fa96cfbbb943e647253e966b4d53407 Author: Krzysztof Kozlowski Date: Sat Apr 15 12:42:57 2023 +0200 w1: ds2482: do not use assignment in if condition Assignments in if condition are less readable and error-prone. Fixes also checkpatch warning: ERROR: do not use assignment in if condition Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415104304.104134-9-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 076909c24ffa747a56d9c0167c74ee167dd81cd1 Author: Krzysztof Kozlowski Date: Sat Apr 15 12:42:56 2023 +0200 w1: ds2482: drop unnecessary header linux/delay.h is already included, so drop asm header to also fix checkpatch: WARNING: Use #include instead of Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415104304.104134-8-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 39bbfdacaebbe2576fb0f591e218e76a117886cf Author: Krzysztof Kozlowski Date: Sat Apr 15 12:42:55 2023 +0200 w1: ds2433: do not use assignment in if condition Assignments in if condition are less readable and error-prone. Fixes also checkpatch warning: ERROR: do not use assignment in if condition Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415104304.104134-7-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 921e0f2fb09d8decfa8f19eae01f0b68e322363e Author: Krzysztof Kozlowski Date: Sat Apr 15 12:42:54 2023 +0200 w1: use octal for file permissions Improve code readability and checkpatch warnings: WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415104304.104134-6-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit ad9c36be1f78f2990310cdcf902eba64cd2b2cf3 Author: Krzysztof Kozlowski Date: Sat Apr 15 12:42:52 2023 +0200 w1: minor white-space and code style fixes Correct several coding convention violations around white-spaces: ERROR: spaces required around that '=' (ctx:VxV) WARNING: Missing a blank line after declarations ERROR: "foo* bar" should be "foo *bar" ERROR: "(foo*)" should be "(foo *)" WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line WARNING: please, no space before tabs WARNING: Missing a blank line after declarations ERROR: open brace '{' following struct go on the same line ERROR: that open brace { should be on the previous line Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415104304.104134-4-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit a2809664ca296ca89c6c8cc52ce728c1088d5af1 Author: Krzysztof Kozlowski Date: Sat Apr 15 12:42:51 2023 +0200 w1: ds28e04: correct kerneldoc annotation Correct kerneldoc comments (or drop annotation) to fix: w1_ds28e04.c:57: warning: This comment starts with '/**', but isn't a kernel-doc comment. w1_ds28e04.c:149: warning: This comment starts with '/**', but isn't a kernel-doc comment. Reviewed-by: Randy Dunlap Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415104304.104134-3-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit a866ce3b4fde3d0fb399cb5a81fd12cc3ff6e5c1 Author: Krzysztof Kozlowski Date: Sat Apr 15 12:42:50 2023 +0200 w1: ds2433: correct kerneldoc annotation Correct kerneldoc comments (or drop annotation) to fix: w1_ds2433.c:46: warning: This comment starts with '/**', but isn't a kernel-doc comment. w1_ds2433.c:141: warning: This comment starts with '/**', but isn't a kernel-doc comment. Reviewed-by: Randy Dunlap Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415104304.104134-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 45c85d974f60aa519769c1933859e84aa96fa3f1 Author: Krzysztof Kozlowski Date: Sat Apr 15 12:42:49 2023 +0200 w1: ds2408: drop kerneldoc annotation Drop kerneldoc annotation from comment which is not a kerneldoc to fix: w1_ds2408.c:210: warning: This comment starts with '/**', but isn't a kernel-doc comment Reviewed-by: Randy Dunlap Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415104304.104134-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 58ecb03fc74a5ec4b8c8222c5b4bac572a264c47 Author: Stefan Wahren Date: Thu Apr 6 12:31:37 2023 +0200 w1: ds2482: add i2c id for DS2484 The DS2484 is compatible to the DS2482-100, but also supports a pin-controlled power-saving sleep mode. Link: https://www.analog.com/media/en/technical-documentation/data-sheets/DS2484.pdf Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20230406103137.6092-3-stefan.wahren@chargebyte.com Signed-off-by: Greg Kroah-Hartman commit 22ab6c515d9602e5ddf41998ce5352e8887f4543 Author: Stefan Wahren Date: Thu Apr 6 12:31:36 2023 +0200 dt-bindings: w1: Add DS2482/DS2484 I2C to 1-W bridges This adds a dedicated devicetree binding for the Maxim DS2482/DS2484 I2C to 1-W bridges, which can be extended later for further features (e.g. sleep mode control GPIO). Since one wire is a bus, child nodes needs to be allowed here. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20230406103137.6092-2-stefan.wahren@chargebyte.com Signed-off-by: Greg Kroah-Hartman commit 6f36ff32809aeaa7276d5f663d7adf9298a8bf5c Author: Krzysztof Kozlowski Date: Sat Apr 15 11:38:56 2023 +0200 MAINTAINERS: w1: add Krzysztof Kozlowski as maintainer Evgeniy wrote that he no longer takes patches for 1-Wire/W1 subsystem, so add Krzysztof Kozlowski to help reviewing and handling these. Link: https://lore.kernel.org/all/bdcf41d5-cd61-1e95-0b21-b8fe401644bd@ioremap.net/ Cc: Evgeniy Polyakov Cc: Arnd Bergmann Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230415093856.41948-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2b3174c96696cde676393474f0e01d0d108462f5 Author: Ilpo Järvinen Date: Tue Apr 11 19:45:32 2023 +0300 n_gsm: Use array_index_nospec() with index that comes from userspace dc.channel used for indexing comes directly from copy_from_user(). Use array_index_nospec() to mitigate speculative side-channel. Link: https://lore.kernel.org/linux-serial/64306d13.ONswMlyWlVKLGkKR%25lkp@intel.com/ Cc: stable Fixes: afe3154ba87e ("tty: n_gsm: add ioctl for DLC config via ldisc handle") Reported-by: kernel test robot Reviewed-by: Daniel Starke Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230411164532.64175-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3fac2397f562eb669ddc2f45867a253f3fc26184 Author: Philipp Hortmann Date: Tue Apr 18 22:02:01 2023 +0200 staging: rtl8192e: Fix W_DISABLE# does not work after stop/start When loading the driver for rtl8192e, the W_DISABLE# switch is working as intended. But when the WLAN is turned off in software and then turned on again the W_DISABLE# does not work anymore. Reason for this is that in the function _rtl92e_dm_check_rf_ctrl_gpio() the bfirst_after_down is checked and returned when true. bfirst_after_down is set true when switching the WLAN off in software. But it is not set to false again when WLAN is turned on again. Add bfirst_after_down = false in _rtl92e_sta_up to reset bit and fix above described bug. Fixes: 94a799425eee ("From: wlanfae [PATCH 1/8] rtl8192e: Import new version of driver from realtek") Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/20230418200201.GA17398@matrix-ESPRIMO-P710 Signed-off-by: Greg Kroah-Hartman commit 4de65f2b975fc0eb17629242db09e5895003edbe Author: Philipp Hortmann Date: Sun Apr 16 09:20:25 2023 +0200 staging: rtl8192e: Remove unchanged variables bfsync_processing and more Remove unchanged variable bfsync_processing and rfc_txpowertrackingindex_real to shorten code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/cb609f904d988febaa579526514586877b1dabf7.1681627603.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 548534d95b1dd7f9a51ac0ce06f1435be1e8ca33 Author: Philipp Hortmann Date: Sun Apr 16 09:20:19 2023 +0200 staging: rtl8192e: Remove unchanged variable frame_sync_monitor Remove unchanged variable frame_sync_monitor and equations that have always the same result to shorten code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/0c4bdca5f5dbb93bb05c6b7f32136d4dfb3b0e4b.1681627603.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit dc8aaa4f327b17603165c0b6f8d40f297f5f94c0 Author: Philipp Hortmann Date: Sun Apr 16 09:20:12 2023 +0200 staging: rtl8192e: Remove unchanged variable chan_forced Remove unchanged variable chan_forced and equations that have always the same result to shorten code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/3f218531a9d31c399d1351d3da7f9ca13d20df0c.1681627603.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 93bf41cc8afbcc2988be881c4bb569fe9a8c36e1 Author: Philipp Hortmann Date: Sun Apr 16 09:20:06 2023 +0200 staging: rtl8192e: Remove set to true while true of bfirst_after_down Remove set to true while true of bfirst_after_down to shorten code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/053ab341e80909e81867e42ec4c077e76b762051.1681627603.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit bfc1bb7866f8c91ae829eadbc1bc7c81b5f6f623 Author: Philipp Hortmann Date: Sun Apr 16 09:19:58 2023 +0200 staging: rtl8192e: Remove second initialization of bActuallySet Remove second initialization of bActuallySet to shorten code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/ebf51fbd56bad4f8fd7fb51fe031f376c3ab6d2c.1681627603.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit b0e60e96afa0719afddd483d9492a11851c2d9cf Author: Philipp Hortmann Date: Sun Apr 16 09:19:52 2023 +0200 staging: rtl8192e: Remove unused macro RT_SET_PS_LEVEL Remove unused macro RT_SET_PS_LEVEL to shorten code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/0d397210830f77ad3231c3b4a0465ae89aacb962.1681627603.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 88b81bddf1f3c2b4b23c687e27a5b6e0a6a63795 Author: Philipp Hortmann Date: Sun Apr 16 09:19:45 2023 +0200 staging: rtl8192e: Remove unused function rtl92e_disable_nic Remove unused function rtl92e_disable_nic to shorten code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/5ce2ef58f66e25d7db7432c56c7b7c37a2b15fc1.1681627603.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8020247877ebdf40416cb24bdfc47cba6c499412 Author: Philipp Hortmann Date: Sun Apr 16 09:19:37 2023 +0200 staging: rtl8192e: Remove unchanged variable RegRfPsLevel Remove unchanged variable RegRfPsLevel and equations that have always the same result to shorten code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/49162b0041db33c6c43c4126839baed69c76cb89.1681627603.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit be3206e8906e7a93df673ab2e96d69304a008edc Author: Dhruva Gole Date: Thu Apr 20 11:12:57 2023 +0530 spi: cadence-quadspi: use macro DEFINE_SIMPLE_DEV_PM_OPS Using this macro makes the code more readable. It also inits the members of dev_pm_ops in the following manner without us explicitly needing to: .suspend = cqspi_suspend, \ .resume = cqspi_resume, \ .freeze = cqspi_suspend, \ .thaw = cqspi_resume, \ .poweroff = cqspi_suspend, \ .restore = cqspi_resume Also get rid of conditional compilation based on CONFIG_PM_SLEEP because it introduces build issues with certain configs when CQSPI_DEV_PM_OPS is just NULL. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304191900.2fARFQW9-lkp@intel.com/ Fixes: 140623410536 ("mtd: spi-nor: Add driver for Cadence Quad SPI Flash Controller") Signed-off-by: Dhruva Gole Link: https://lore.kernel.org/r/20230420054257.925092-1-d-gole@ti.com Signed-off-by: Mark Brown commit a9e42d9e8b4be36a1e0dde0285a9ff36b2e06a46 Author: Simon Trimmer Date: Thu Apr 20 11:20:43 2023 +0100 ASoC: cs35l56: Remove duplicate mbox log messages cs35l56_mbox_send() logs a warning when sending a mbox command fails so the callers can be simplified. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230420102043.1151830-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 2cc3fdcddc86644c070223c522e418416cb7b1a2 Author: Mark Brown Date: Wed Apr 19 19:45:06 2023 +0100 ASoC: es8316: Don't use ranges based register lookup for a single register The es8316 driver uses a register range to specify the single volatile register it has. While the cost will be in the noise this is a bunch of overhead compared to just having a volatile_reg() callback so switch to the callback. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230419-asoc-es8316-volatile-v1-1-2074ec93d8f1@kernel.org Signed-off-by: Mark Brown commit 996b07efe49620325332081afdb0dc0bd6fe5cd0 Author: Ranjani Sridharan Date: Thu Apr 20 13:47:14 2023 +0300 ASoC: SOF: Intel: Split the set_power_op for IPC3 and IPC4 Suspending to S0iX with IPC3 requires the PM_GATE IPC to be sent again to stop the DMA trace. But with IPC4, this is not needed as the trace is stopped with the LARGE_CONFIG_SET IPC. Also, sending the MOD_D0IX IPC to set the D0I3 state again when the DSP is in D0I3 already results in an imbalance in PM runtime states in the firmware. So split the set_power_state ops for IPC3 and IPC4 to avoid sending the MOD_D0IX IPC when the DSP is already in D0I3 with IPC4. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230420104714.29573-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 6d0a21dd95c349bbe3663a4870ff7e70ddc6c9b6 Author: Ranjani Sridharan Date: Thu Apr 20 14:41:37 2023 +0300 ASoC: SOF: pcm: Add an option to skip platform trigger during stop In the case of IPC4, a pipeline is only paused during STOP/PAUSE/SUSPEND triggers and the FW keeps the host DMA running when a pipeline is paused. The start/stop tests iterate through STOP/START triggers without involving a hw_free. This means that the pipeline state will only toggle between PAUSED (during the STOP trigger) and RUNNING (during the START trigger). So this test should be treated in the same way as a PAUSE_PUSH/PAUSE_RELEASE test and the DMA should be kept running when toggling the pipeline states between PAUSED and RUNNING. Since there is no way to tell if a STOP trigger will be followed by hw_free or not, this patch proposes to always skip DMA stop during the STOP trigger and handle it later during hw_free. Introduce a new flag in struct sof_ipc_pcm_ops, delayed_platform_trigger, that will be used to ensure that the host DMA will not be stopped during the STOP/PAUSE/RELEASE triggers and set it for IPC4. The platform_trigger call to stop the DMA will be invoked during PCM hw_free instead when the pipeline is reset. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230420114137.27613-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 3e94369729ea8a825cf8bf304bfb1749de62ebf4 Author: Ranjani Sridharan Date: Thu Apr 20 14:41:36 2023 +0300 ASoC: SOF: Intel: hda: Do not stop/start DMA during pause/release The FW does not pause/stop the host DMA during pause and stopping the host DMA from the driver could result in an unknown behaviour. So, skip triggering the HD-Audio host DMA during pause/release. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230420114137.27613-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit dc5a3e60a4b5974a0cb5bf2c5df70a490dce9df2 Author: Bard Liao Date: Wed Apr 19 14:55:24 2023 -0500 ASoC: Intel: sof_sdw: append codec type to dai link name The existing sdw_sof machine driver constructs two SoundWire interfaces by direction and sdw link id. It means that we will have exactly the same dai link name if two dai links are on the same sdw link with the same direction. The new Realtek codec has two SoundWire interfaces for jack and DMIC functions and they are treated as different codecs. To create two dai links for jack and DMIC, we need to have different dai link names. This patch suggests to append codec type if there are two or more different types of devices on the same sdw bus. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230419195524.46995-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c8db7b50128b8cc61a5ca6e4717cf8158fca302a Author: Bard Liao Date: Wed Apr 19 14:55:23 2023 -0500 ASoC: Intel: sof_sdw: support different devices on the same sdw link The existing code assumes all devices on the same soundwire link are the same devices. eg. all rt1316. This commit removes the assumption and supports different devices on the same soundwire link. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230419195524.46995-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 16373f30777f45823fa68e850b230fa2ef9d7e92 Author: Bard Liao Date: Wed Apr 19 14:55:22 2023 -0500 ASoC: Intel: sof_sdw: set codec_num = 1 if the device is not aggregated We assume adr_link->num_adr = 1 if a device is not aggregated. However, the assumption is not valid if there are different type devices on the same soundwire link. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230419195524.46995-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e9fcbaff5fb871f1a10f09d7d1a4cd13c923e280 Author: Yong Zhi Date: Wed Apr 19 14:55:21 2023 -0500 ASoC: Intel: sof_sdw_max98373: change sof_sdw_mx8373_late_probe to static call sof_sdw_mx8373_late_probe is only used in sof_sdw_max98373, so it should be static and rename it to 'mx8373_sdw_late_probe'. Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20230419195524.46995-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 06b830bd73ec66b9316b899ae37b1d5b83d16a32 Author: Yong Zhi Date: Wed Apr 19 14:55:20 2023 -0500 ASoC: Intel: sof_sdw: remove late_probe flag in struct sof_sdw_codec_info Just use codec_card_late_probe ptr in struct sof_sdw_codec_info for validation check and drop late_probe variable. Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20230419195524.46995-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f5460a155ecb961463f6ff766c7d3092f07e6642 Author: apoorv Date: Wed Apr 19 14:55:19 2023 -0500 ASoC: Intel: soc-acpi: Add entry for rt711-sdca-sdw at link 2 in RPL match table RT711 sdca sdw is added with SDW2 link for RPL-P CRB platform. Signed-off-by: apoorv Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20230419195524.46995-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 058924644f9596b8c55fc81f01f741d628eed940 Author: Curtis Malainey Date: Wed Apr 19 14:55:18 2023 -0500 ASoC: Intel: sof_cirrus_common: Guard against missing buses Even if we find a acpi device we can still be missing the physical node. Signed-off-by: Curtis Malainey Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20230419195524.46995-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 367fd6ffa294ca3346902aa0814fac31bb5a6059 Author: Curtis Malainey Date: Wed Apr 19 14:40:57 2023 -0500 ASoC: SOF: Use no_reply calls for TX Convert all existing calls that pass "NULL, 0" for reply data to the new no_reply calls. Also convert any calls that pass in data but don't actually parse the result. Signed-off-by: Curtis Malainey Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20230419194057.42205-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ccb541a00b5bf87f1b7b9301373bf88a3257c688 Author: Curtis Malainey Date: Wed Apr 19 14:40:56 2023 -0500 ASoC: SOF: ipc: Add no reply inline calls 95% of the calls inside SOF to TX an IPC don't care about a reply. Yet the previous commit cleaned up a bunch of replies that were being populated and then thrown away. This adds some functions so users who do not need replies don't feel obligated to provide the space to the API. Signed-off-by: Curtis Malainey Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20230419194057.42205-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f91cf1a30255d81cf1d8992974ec0a9c0fd4a771 Author: Jiri Slaby (SUSE) Date: Thu Apr 20 11:35:59 2023 +0200 tty: vt: drop checks for undefined VT_SINGLE_DRIVER VT_SINGLE_DRIVER is defined nowhere. Remove its checks. These were added long time ago and never used. Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20230420093559.13200-4-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 921234d78339b9ee67c2da4dc78aa6ecd47d76e1 Author: Jiri Slaby (SUSE) Date: Thu Apr 20 11:35:58 2023 +0200 tty: vt: distribute EXPORT_SYMBOL() There is a list of EXPORT_SYMBOL()s at the end of the file. Put them all by their definition. This is how we usually do that. give_up_console() lost its VT_SINGLE_DRIVER local ifndef protection as that whole code is under this check. Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20230420093559.13200-3-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 71ca6e4bf44f9a737f11e3f169430f81e9febd7b Author: Jiri Slaby (SUSE) Date: Thu Apr 20 11:35:57 2023 +0200 tty: vt: simplify some cases in tioclinux() There is no need to set "ret" variable and break. We can simply return from the cases. This makes the code much easier to follow, as many else branches are redundant. Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20230420093559.13200-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6b97370b2cc6ef75acb72d651ef57041c8f1ece9 Author: Jiri Slaby (SUSE) Date: Thu Apr 20 11:35:56 2023 +0200 tty: vt: reformat tioclinux() Reformat tioclinux() to what we are used to. That is: * format switch-case (one less indent level), * format comments (the same indent level), and * add a newline before return. Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20230420093559.13200-1-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit f06c2a9000ebecbb461196e59ce063f742272902 Author: Biju Das Date: Wed Apr 12 15:50:53 2023 +0100 tty: serial: sh-sci: Fix end of transmission on SCI We need to set TE to "0" (i.e., disable serial transmission) to get the expected behavior of the end of serial transmission. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230412145053.114847-6-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit d61ae331d6f35183b38e0c992bc01bf15d8591c3 Author: Biju Das Date: Wed Apr 12 15:50:52 2023 +0100 tty: serial: sh-sci: Add support for tx end interrupt handling As per the RZ/G2L users hardware manual (Rev.1.20 Sep, 2022), section 23.3.7 Serial Data Transmission (Asynchronous Mode), it is mentioned that, set the SCR.TIE bit to 0 and SCR.TEIE bit to 1, after the last data to be transmitted are written to the TDR. This will generate tx end interrupt and in the handler set SCR.TE and SCR.TEIE to 0. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230412145053.114847-5-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 1707ce2d1e4d701db28ba2250d9d72dcf762babc Author: Biju Das Date: Wed Apr 12 15:50:51 2023 +0100 tty: serial: sh-sci: Fix TE setting on SCI IP As per the RZ/G2L users hardware manual (Rev.1.20 Sep, 2022), section 23.3.7 Serial Data Transmission (Asynchronous Mode) it is mentioned that the TE (transmit enable) must be set after setting TIE (transmit interrupt enable) or these 2 bits are set to 1 simultaneously by a single instruction. So set these 2 bits in single instruction. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230412145053.114847-4-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit cf383d123869574d1de4304ed73771d3eb5a3d40 Author: Biju Das Date: Wed Apr 12 15:50:50 2023 +0100 tty: serial: sh-sci: Add RZ/G2L SCIFA DMA rx support SCIFA IP on RZ/G2L SoC has the same signal for both interrupt and DMA transfer request. Setting DMARS register for DMA transfer makes the signal to work as a DMA transfer request signal and subsequent interrupt requests to the interrupt controller are masked. Similarly clearing DMARS register makes signal to work as interrupt signal and subsequent interrupt requests to the interrupt controller are unmasked. Add SCIFA DMA rx support for RZ/G2L alike SoCs by disabling RXI line interrupt and setting DMARS registers by DMA api for DMA transfer request. Apart from this, we must set FIFO trigger to 1 for the expected behavior of the receive transmission. While at it replace the parameter irq to s->irqs[SCIx_RXI_IRQ] in disable_irq_nosync() to match enable_irq() in sci_dma_rx_reenable_irq(). Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230412145053.114847-3-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 8749061be196b41a874d71c073c03171bf2741b2 Author: Biju Das Date: Wed Apr 12 15:50:49 2023 +0100 tty: serial: sh-sci: Add RZ/G2L SCIFA DMA tx support SCIFA IP on RZ/G2L SoC has the same signal for both interrupt and DMA transfer request. Setting DMARS register for DMA transfer makes the signal to work as a DMA transfer request signal and subsequent interrupt requests to the interrupt controller are masked. Similarly clearing DMARS register makes signal to work as interrupt signal and subsequent interrupt requests to the interrupt controller are unmasked. Add SCIFA DMA tx support for RZ/G2L alike SoCs by disabling TXI line interrupt and setting DMARS registers by DMA api for DMA transfer request. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230412145053.114847-2-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 3f42b142ea1171967e40e10e4b0241c0d6d28d41 Author: Jan Kundrát Date: Wed Apr 5 22:14:23 2023 +0200 serial: max310x: fix IO data corruption in batched operations After upgrading from 5.16 to 6.1, our board with a MAX14830 started producing lots of garbage data over UART. Bisection pointed out commit 285e76fc049c as the culprit. That patch tried to replace hand-written code which I added in 2b4bac48c1084 ("serial: max310x: Use batched reads when reasonably safe") with the generic regmap infrastructure for batched operations. Unfortunately, the `regmap_raw_read` and `regmap_raw_write` which were used are actually functions which perform IO over *multiple* registers. That's not what is needed for accessing these Tx/Rx FIFOs; the appropriate functions are the `_noinc_` versions, not the `_raw_` ones. Fix this regression by using `regmap_noinc_read()` and `regmap_noinc_write()` along with the necessary `regmap_config` setup; with this patch in place, our board communicates happily again. Since our board uses SPI for talking to this chip, the I2C part is completely untested. Fixes: 285e76fc049c ("serial: max310x: use regmap methods for SPI batch operations") Cc: stable@vger.kernel.org Reviewed-by: Andy Shevchenko Signed-off-by: Jan Kundrát Link: https://lore.kernel.org/r/79db8e82aadb0e174bc82b9996423c3503c8fb37.1680732084.git.jan.kundrat@cesnet.cz Signed-off-by: Greg Kroah-Hartman commit 63f4c34561718a349d321105adab028cbf212d57 Author: Tony Lindgren Date: Wed Apr 19 14:54:22 2023 +0300 serial: core: Disable uart_start() on uart_remove_one_port() While rebinding a uart device in a loop I noticed we may see a tx related race on uart_remove_one_port(): uart_write from n_tty_write n_tty_write from file_tty_write.constprop.0 file_tty_write.constprop.0 from vfs_write vfs_write from ksys_write ksys_write from ret_fast_syscall Let's disallow tx on port->UPF_DEAD. This flag gets set before we start tearing down the port in uart_remove_one_port(). Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20230419115423.59957-1-tony@atomide.com Signed-off-by: Greg Kroah-Hartman commit 04e82793f068d2f0ffe62fcea03d007a8cdc16a7 Author: Tony Lindgren Date: Tue Apr 18 13:14:06 2023 +0300 serial: 8250: Reinit port->pm on port specific driver unbind When we unbind a serial port hardware specific 8250 driver, the generic serial8250 driver takes over the port. After that we see an oops about 10 seconds later. This can produce the following at least on some TI SoCs: Unhandled fault: imprecise external abort (0x1406) Internal error: : 1406 [#1] SMP ARM Turns out that we may still have the serial port hardware specific driver port->pm in use, and serial8250_pm() tries to call it after the port specific driver is gone: serial8250_pm [8250_base] from uart_change_pm+0x54/0x8c [serial_base] uart_change_pm [serial_base] from uart_hangup+0x154/0x198 [serial_base] uart_hangup [serial_base] from __tty_hangup.part.0+0x328/0x37c __tty_hangup.part.0 from disassociate_ctty+0x154/0x20c disassociate_ctty from do_exit+0x744/0xaac do_exit from do_group_exit+0x40/0x8c do_group_exit from __wake_up_parent+0x0/0x1c Let's fix the issue by calling serial8250_set_defaults() in serial8250_unregister_port(). This will set the port back to using the serial8250 default functions, and sets the port->pm to point to serial8250_pm. Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20230418101407.12403-1-tony@atomide.com Signed-off-by: Greg Kroah-Hartman commit 0ba9e3a13c6adfa99e32b2576d20820ab10ad48a Author: Florian Fainelli Date: Fri Apr 14 10:02:39 2023 -0700 serial: 8250: Add missing wakeup event reporting An 8250 UART configured as a wake-up source would not have reported itself through sysfs as being the source of wake-up, correct that. Fixes: b3b708fa2780 ("wake up from a serial port") Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20230414170241.2016255-1-f.fainelli@gmail.com Signed-off-by: Greg Kroah-Hartman commit d57d56e4dddfb5c92cd81abf8922055bf0fb85a4 Author: Sherry Sun Date: Fri Apr 14 10:21:11 2023 +0800 tty: serial: fsl_lpuart: use UARTMODIR register bits for lpuart32 platform For lpuart32 platforms, UARTMODIR register is used instead of UARTMODEM. So here should configure the corresponding UARTMODIR register bits to avoid confusion. Reviewed-by: Ilpo Järvinen Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20230414022111.20896-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit f73fd750552524b06b5d77ebfdd106ccc8fcac61 Author: Shenwei Wang Date: Mon Apr 10 14:55:55 2023 -0500 tty: serial: fsl_lpuart: adjust buffer length to the intended size Based on the fls function definition provided below, we should not subtract 1 to obtain the correct buffer length: fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32. Fixes: 5887ad43ee02 ("tty: serial: fsl_lpuart: Use cyclic DMA for Rx") Signed-off-by: Shenwei Wang Link: https://lore.kernel.org/r/20230410195555.1003900-1-shenwei.wang@nxp.com Signed-off-by: Greg Kroah-Hartman commit 9e4f2a8004213339e9d837d891a59cc80e082966 Author: Johan Hovold Date: Wed Apr 12 14:48:11 2023 +0200 serial: fix TIOCSRS485 locking The RS485 multipoint addressing support for some reason added a new ADDRB termios cflag which is (only!) updated from one of the RS485 ioctls. Make sure to take the termios rw semaphore for the right ioctl (i.e. set, not get). Fixes: ae50bb275283 ("serial: take termios_rwsem for ->rs485_config() & pass termios as param") Cc: stable@vger.kernel.org # 6.0 Cc: Ilpo Järvinen Reviewed-by: Ilpo Järvinen Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230412124811.11217-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit c6c01763f24c40ec1a5faeb260632fdf0824bb72 Author: Conor Dooley Date: Thu Apr 6 21:57:50 2023 +0100 serial: make SiFive serial drivers depend on ARCH_ symbols As part of converting RISC-V SOC_FOO symbols to ARCH_FOO to match the use of such symbols on other architectures, convert the SiFive serial driver Kconfig entries from the SOC_ symbols to ARCH_ instead. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20230406-carnival-aspirate-fcf69a30078c@spud Signed-off-by: Greg Kroah-Hartman commit ee13ea33e066507a374a0d091034f1150e9d0c07 Author: Jiri Slaby (SUSE) Date: Thu Apr 20 11:35:30 2023 +0200 tty: synclink_gt: don't allocate and pass dummy flags In synclinc_gt, the flag_buf is allocated, zeroed and passed to ldisc's receive_buf(). It is never written to, so it serves as a dummy buffer. That's unneeded because all ldiscs accept NULL as flags. That NULL resolves to the TTY_NORMAL flag. So drop all this nonsense. Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20230420093530.13133-1-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5c7e105cd156fc9adf5294a83623d7a40c15f9b9 Author: Jiri Slaby (SUSE) Date: Thu Apr 20 11:35:14 2023 +0200 tty: serial: simplify qcom_geni_serial_send_chunk_fifo() * use memcpy() instead of the loop (removes c variable) * use remaining parameter directly (removes chunk variable) The code is simpler and easier to follow. Cc: Andy Gross Cc: Bjorn Andersson Cc: Konrad Dybcio Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20230420093514.13055-1-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit f3ef9d668b8b1b0e3e91dd9ea532f9d60eb61704 Author: Christophe JAILLET Date: Sat Apr 15 18:27:11 2023 +0200 leds: pwm-multicolor: Simplify an error message dev_err_probe() already display the error code. There is no need to duplicate it explicitly in the error message. While at it, add a missing \n at the end of the message. Signed-off-by: Christophe JAILLET Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/07d35e221faaa380fd11cd4597e42354c8eb350c.1681576017.git.christophe.jaillet@wanadoo.fr commit 9f6ffd0da650f6ed264e124a3d6bb4e11a49f9f1 Author: Wadim Egorov Date: Wed Apr 12 16:05:51 2023 +0200 dt-bindings: leds: Convert PCA9532 to dtschema Convert the PCA9532 LED Dimmer to dtschema. While at it, update the example to match recommended node names and the link to the product datasheet. Also add GPIO properties since the driver allows to use unused pins as GPIOs. Signed-off-by: Wadim Egorov Acked-by: Pavel Machek Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230412140552.451527-1-w.egorov@phytec.de commit 254d5a59464eea1324353d84c0f614c413e8e54f Author: Daniel Starke Date: Thu Apr 20 10:50:09 2023 +0200 tty: n_gsm: fix redundant assignment of gsm->encoding The function gsmld_open() contains a redundant assignment of gsm->encoding. The same value of GSM_ADV_OPT is already assigned to it during the initialization of the struct in gsm_alloc_mux() a few lines earlier. Fix this by removing the redundant second assignment of gsm->encoding in gsmld_open(). Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Reviewed-by: Ilpo Järvinen Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20230420085017.7314-1-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman commit edd4cab2d492daa5e45bd45e44084a2b9880f224 Author: Ian Rogers Date: Wed Apr 19 20:04:30 2023 -0700 perf test: Fix maps use after put Fix a use after put reference count issue. maps is copied from leader, but the leader is put on line 79 and then maps is used to read the reference count below - so a use after put, with the put of maps happening within thread__put. Fix by reversing the order of puts so that the leader is put last. To explain the reference count checker, I wrote this up as a little example here: https://perf.wiki.kernel.org/index.php/Reference_Count_Checking Note, the bug was introduced by the committer and wasn't present in the original reference count patch set. Committer notes: Yes, the bug predated your patch and is detected by the reference count checking you contributed. This was just part of splitting up your series into smaller chunks, in this case either we fix the problem detected while developing this reference counting infrastructure before the patch introducing REFCNT_CHECKING or fix it later after the merged infrastructure, when built with EXTRA_CFLAGS="-DREFCNT_CHECKING=1" detects it when running 'perf test', which is what this patch does. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20230420030430.489243-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 1bb31cc7afe6b1524d1cd74a1ed53c1add16fc73 Merge: 81444b77a4443 414c109bdf496 Author: Will Deacon Date: Thu Apr 20 11:22:33 2023 +0100 Merge branch 'for-next/mm' into for-next/core * for-next/mm: arm64: mm: always map fixmap at page granularity arm64: mm: move fixmap code to its own file arm64: add FIXADDR_TOT_{START,SIZE} Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()"" arm: uaccess: Remove memcpy_page_flushcache() mm,kfence: decouple kfence from page granularity mapping judgement commit 81444b77a4443e985b567310f19d601368ed4762 Merge: f8863bc8c1f9c b7b4ce84c830a Author: Will Deacon Date: Thu Apr 20 11:22:09 2023 +0100 Merge branch 'for-next/misc' into for-next/core * for-next/misc: arm64: kexec: include reboot.h arm64: delete dead code in this_cpu_set_vectors() arm64: kernel: Fix kernel warning when nokaslr is passed to commandline arm64: kgdb: Set PSTATE.SS to 1 to re-enable single-step arm64/sme: Fix some comments of ARM SME arm64/signal: Alloc tpidr2 sigframe after checking system_supports_tpidr2() arm64/signal: Use system_supports_tpidr2() to check TPIDR2 arm64: compat: Remove defines now in asm-generic arm64: kexec: remove unnecessary (void*) conversions arm64: armv8_deprecated: remove unnecessary (void*) conversions firmware: arm_sdei: Fix sleep from invalid context BUG commit f8863bc8c1f9cf4bc3bdc58a98c5a41d0b4c14c5 Merge: ea88dc925c3a2 504cae453f822 Author: Will Deacon Date: Thu Apr 20 11:22:04 2023 +0100 Merge branch 'for-next/kdump' into for-next/core * for-next/kdump: arm64: kdump: defer the crashkernel reservation for platforms with no DMA memory zones arm64: kdump: do not map crashkernel region specifically arm64: kdump : take off the protection on crashkernel memory region commit ea88dc925c3a24213abf6d428d8fc35f74ec10bd Merge: 31eb87cfd90e2 0f59dca63bf2c Author: Will Deacon Date: Thu Apr 20 11:21:56 2023 +0100 Merge branch 'for-next/ftrace' into for-next/core * for-next/ftrace: arm64: ftrace: Simplify get_ftrace_plt arm64: ftrace: Add direct call support ftrace: selftest: remove broken trace_direct_tramp ftrace: Make DIRECT_CALLS work WITH_ARGS and !WITH_REGS ftrace: Store direct called addresses in their ops ftrace: Rename _ftrace_direct_multi APIs to _ftrace_direct APIs ftrace: Remove the legacy _ftrace_direct API ftrace: Replace uses of _ftrace_direct APIs with _ftrace_direct_multi ftrace: Let unregister_ftrace_direct_multi() call ftrace_free_filter() commit 31eb87cfd90e27226e187e99a9ea3f62c6992f07 Merge: 0f6563a32c831 863da0bdb17b5 Author: Will Deacon Date: Thu Apr 20 11:21:45 2023 +0100 Merge branch 'for-next/cpufeature' into for-next/core * for-next/cpufeature: arm64/cpufeature: Use helper macro to specify ID register for capabilites arm64/cpufeature: Consistently use symbolic constants for min_field_value arm64/cpufeature: Pull out helper for CPUID register definitions commit 0f6563a32c83171277dbc1af020754ff4d1f8a0f Merge: 67eacd616ba4f 172420865b292 Author: Will Deacon Date: Thu Apr 20 11:21:39 2023 +0100 Merge branch 'for-next/asm' into for-next/core * for-next/asm: arm64: uaccess: remove unnecessary earlyclobber arm64: uaccess: permit put_{user,kernel} to use zero register arm64: uaccess: permit __smp_store_release() to use zero register arm64: atomics: lse: improve cmpxchg implementation commit 67eacd616ba4f6a5cd6fa236a0c8365bb91a718a Merge: e8d018dd0257f 858a56630a840 Author: Will Deacon Date: Thu Apr 20 11:21:31 2023 +0100 Merge branch 'for-next/acpi' into for-next/core * for-next/acpi: ACPI: AGDI: Improve error reporting for problems during .remove() commit 482c84e906e535072c55395acabd3a58e9443d12 Author: Mario Limonciello Date: Fri Apr 14 09:40:08 2023 -0500 i2c: designware: Add doorbell support for Mendocino Mendocino and later platform don't use the platform feature mailbox for communication for I2C arbitration, they rely upon ringing a doorbell. Detect the platform by the device ID of the root port and choose the appropriate method. Link: https://lore.kernel.org/linux-i2c/20220916131854.687371-3-jsd@semihalf.com/ Signed-off-by: Mario Limonciello Acked-by: Jarkko Nikula Reviewed-by: Mark Hasemeyer Tested-by: Mark Hasemeyer Acked-by: Wolfram Sang Signed-off-by: Herbert Xu commit 440da737cf8d35a1b2205678cc1879fa90948f7a Author: Mario Limonciello Date: Fri Apr 14 09:40:07 2023 -0500 i2c: designware: Use PCI PSP driver for communication Currently the PSP semaphore communication base address is discovered by using an MSR that is not architecturally guaranteed for future platforms. Also the mailbox that is utilized for communication with the PSP may have other consumers in the kernel, so it's better to make all communication go through a single driver. Signed-off-by: Mario Limonciello Reviewed-by: Mark Hasemeyer Acked-by: Jarkko Nikula Tested-by: Mark Hasemeyer Acked-by: Wolfram Sang Signed-off-by: Herbert Xu commit 1560541631a6f3215d27aeea182a5682644d33ba Author: Danny Tsen Date: Thu Apr 13 15:46:25 2023 -0400 powerpc: Move Power10 feature PPC_MODULE_FEATURE_P10 Move Power10 feature, PPC_MODULE_FEATURE_P10, definition to be in arch/powerpc/include/asm/cpufeature.h. Signed-off-by: Danny Tsen Acked-by: Michael Ellerman (powerpc) Signed-off-by: Herbert Xu commit 9c716e1bd369afa2d1c5038297e8ceda3f82db7d Author: Danny Tsen Date: Thu Apr 13 15:46:24 2023 -0400 crypto: p10-aes-gcm - Remove POWER10_CPU dependency Remove Power10 dependency in Kconfig and detect Power10 feature at runtime. Signed-off-by: Danny Tsen Acked-by: Michael Ellerman (powerpc) Signed-off-by: Herbert Xu commit ba24b8eb3ef676cb7d6cef4a2a53f3624f880d42 Author: David Howells Date: Thu Apr 13 16:40:18 2023 +0100 crypto: testmgr - Add some test vectors for cmac(camellia) Add some test vectors for 128-bit cmac(camellia) as found in draft-kato-ipsec-camellia-cmac96and128-01 section 6.2. The document also shows vectors for camellia-cmac-96, and for VK with a length greater than 16, but I'm not sure how to express those in testmgr. This also leaves cts(cbc(camellia)) untested, but I can't seem to find any tests for that that I could put into testmgr. Signed-off-by: David Howells cc: Herbert Xu cc: Chuck Lever cc: Scott Mayhew cc: linux-nfs@vger.kernel.org cc: linux-crypto@vger.kernel.org Link: https://datatracker.ietf.org/doc/pdf/draft-kato-ipsec-camellia-cmac96and128-01 Signed-off-by: Herbert Xu commit cfbda734d6678047fd3beb1f67d9682825773341 Author: Herbert Xu Date: Thu Apr 13 14:24:25 2023 +0800 crypto: cryptd - Add support for cloning hashes Allow cryptd hashes to be cloned. The underlying hash will be cloned. Signed-off-by: Herbert Xu commit 0303b7f5df603b91bc12e39c9309c094816ba6a9 Author: Herbert Xu Date: Thu Apr 13 14:24:23 2023 +0800 crypto: cryptd - Convert hash to use modern init_tfm/exit_tfm The cryptd hash template was still using the obsolete cra_init/cra_exit interface. Make it use the modern ahash init_tfm/exit_tfm instead. Signed-off-by: Herbert Xu Reviewed-by: Simon Horman Signed-off-by: Herbert Xu commit 8538e60d36d0c683d59eaeabea19f101a6cf1c66 Author: Herbert Xu Date: Thu Apr 13 14:24:21 2023 +0800 crypto: hmac - Add support for cloning Allow hmac to be cloned. The underlying hash can be used directly with a reference count. Signed-off-by: Herbert Xu commit ed3630b83e9394acef27041de7a2223f1e875e9a Author: Herbert Xu Date: Thu Apr 13 14:24:19 2023 +0800 crypto: hash - Add crypto_clone_ahash/shash This patch adds the helpers crypto_clone_ahash and crypto_clone_shash. They are the hash-specific counterparts of crypto_clone_tfm. This allows code paths that cannot otherwise allocate a hash tfm object to do so. Once a new tfm has been obtained its key could then be changed without impacting other users. Note that only algorithms that implement clone_tfm can be cloned. However, all keyless hashes can be cloned by simply reusing the tfm object. Signed-off-by: Herbert Xu Reviewed-by: Simon Horman Signed-off-by: Herbert Xu commit 3c3a24cb0ae46c9c45e4ce2272f84f0504831f59 Author: Herbert Xu Date: Thu Apr 13 14:24:17 2023 +0800 crypto: api - Add crypto_clone_tfm This patch adds the helper crypto_clone_tfm. The purpose is to allocate a tfm object with GFP_ATOMIC. As we cannot sleep, the object has to be cloned from an existing tfm object. This allows code paths that cannot otherwise allocate a crypto_tfm object to do so. Once a new tfm has been obtained its key could then be changed without impacting other users. Signed-off-by: Herbert Xu Reviewed-by: Simon Horman Signed-off-by: Herbert Xu commit ae131f4970f0778f35ed06aeb15bde2fbc1d9619 Author: Herbert Xu Date: Thu Apr 13 14:24:15 2023 +0800 crypto: api - Add crypto_tfm_get Add a crypto_tfm_get interface to allow tfm objects to be shared. They can still be freed in the usual way. This should only be done with tfm objects with no keys. You must also not modify the tfm flags in any way once it becomes shared. Signed-off-by: Herbert Xu Reviewed-by: Simon Horman Signed-off-by: Herbert Xu commit 94330fbe082acfd7ac9f2a348933944ba78b14dc Author: Ard Biesheuvel Date: Wed Apr 12 13:00:35 2023 +0200 crypto: x86/sha - Use local .L symbols for code Avoid cluttering up the kallsyms symbol table with entries that should not end up in things like backtraces, as they have undescriptive and generated identifiers. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 9ac589cf3cdf2344a5240d7df04ccb37070d7e96 Author: Ard Biesheuvel Date: Wed Apr 12 13:00:34 2023 +0200 crypto: x86/crc32 - Use local .L symbols for code Avoid cluttering up the kallsyms symbol table with entries that should not end up in things like backtraces, as they have undescriptive and generated identifiers. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 1d4b0ff30c2d698c9755bf52d20c073d46bca025 Author: Ard Biesheuvel Date: Wed Apr 12 13:00:33 2023 +0200 crypto: x86/aesni - Use local .L symbols for code Avoid cluttering up the kallsyms symbol table with entries that should not end up in things like backtraces, as they have undescriptive and generated identifiers. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit e4ab7680bb0c97656300cc77c79d85d445769d00 Author: Ard Biesheuvel Date: Wed Apr 12 13:00:32 2023 +0200 crypto: x86/sha256 - Use RIP-relative addressing Prefer RIP-relative addressing where possible, which removes the need for boot time relocation fixups. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit c41672b9fdc3cbee289e85eb00900d467ec5f03f Author: Ard Biesheuvel Date: Wed Apr 12 13:00:31 2023 +0200 crypto: x86/ghash - Use RIP-relative addressing Prefer RIP-relative addressing where possible, which removes the need for boot time relocation fixups. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 3695536028442d4181ccf01ddabddef845ac1f86 Author: Ard Biesheuvel Date: Wed Apr 12 13:00:30 2023 +0200 crypto: x86/des3 - Use RIP-relative addressing Prefer RIP-relative addressing where possible, which removes the need for boot time relocation fixups. Co-developed-by: Thomas Garnier Signed-off-by: Thomas Garnier Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 3b519dc878a5d19593bbb1773abedbf39a619f66 Author: Ard Biesheuvel Date: Wed Apr 12 13:00:29 2023 +0200 crypto: x86/crc32c - Use RIP-relative addressing Prefer RIP-relative addressing where possible, which removes the need for boot time relocation fixups. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7f8ec316480bf68d88c4ecc6a948ad1e00fafc71 Author: Ard Biesheuvel Date: Wed Apr 12 13:00:28 2023 +0200 crypto: x86/cast6 - Use RIP-relative addressing Prefer RIP-relative addressing where possible, which removes the need for boot time relocation fixups. Co-developed-by: Thomas Garnier Signed-off-by: Thomas Garnier Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 0dcc7782dea65190a3d826d6329b6ff0f9d787bf Author: Ard Biesheuvel Date: Wed Apr 12 13:00:27 2023 +0200 crypto: x86/cast5 - Use RIP-relative addressing Prefer RIP-relative addressing where possible, which removes the need for boot time relocation fixups. Co-developed-by: Thomas Garnier Signed-off-by: Thomas Garnier Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 24ff1e9d726001767c544bdee3aab8abc0a30199 Author: Ard Biesheuvel Date: Wed Apr 12 13:00:26 2023 +0200 crypto: x86/camellia - Use RIP-relative addressing Prefer RIP-relative addressing where possible, which removes the need for boot time relocation fixups. Co-developed-by: Thomas Garnier Signed-off-by: Thomas Garnier Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 52fc482a12af96a28a1200c9587d599055bff8b6 Author: Ard Biesheuvel Date: Wed Apr 12 13:00:25 2023 +0200 crypto: x86/aria - Use RIP-relative addressing Prefer RIP-relative addressing where possible, which removes the need for boot time relocation fixups. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit c75962f1c439de1590b038cb18466a859d59f209 Author: Ard Biesheuvel Date: Wed Apr 12 13:00:24 2023 +0200 crypto: x86/aesni - Use RIP-relative addressing Prefer RIP-relative addressing where possible, which removes the need for boot time relocation fixups. In the GCM case, we can get rid of the oversized permutation array entirely while at it. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 9d5aef1222337f593e52293bb94c5cf7139d4d83 Author: Ard Biesheuvel Date: Wed Apr 12 13:00:23 2023 +0200 crypto: x86/aegis128 - Use RIP-relative addressing Prefer RIP-relative addressing where possible, which removes the need for boot time relocation fixups. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7fec65155494fb9817adbd584f813a3faec33797 Author: Anjelique Melendez Date: Fri Apr 7 15:38:49 2023 -0700 leds: rgb: leds-qcom-lpg: Add support for PMK8550 PWM Add support for pmk8550 compatible and lpg_data. Signed-off-by: Anjelique Melendez Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230407223849.17623-4-quic_amelende@quicinc.com commit b00d2ed37617b5f2f091c98acf542fbedefcbf9b Author: Anjelique Melendez Date: Fri Apr 7 15:38:48 2023 -0700 leds: rgb: leds-qcom-lpg: Add support for high resolution PWM Certain PMICs like PMK8550 have a high resolution PWM module which can support from 8-bit to 15-bit PWM. Add support for it. Signed-off-by: Anjelique Melendez Acked-by: Pavel Machek Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230407223849.17623-3-quic_amelende@quicinc.com commit 03a85ab3ac910bc29e23db744091c40c8ed3d3af Author: Anjelique Melendez Date: Fri Apr 7 15:38:47 2023 -0700 dt-bindings: leds-qcom-lpg: Add qcom,pmk8550-pwm compatible string Add qcom,pmk8550-pwm compatible string for the Qualcomm Technologies, Inc. PMK8550 PMIC which has two high resolution PWM channels. Signed-off-by: Anjelique Melendez Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230407223849.17623-2-quic_amelende@quicinc.com commit eb74bfcfa99415f1a65ce021b8ac2256b7ed50bc Author: Yingsha Xu Date: Wed Apr 19 18:45:47 2023 +0800 wifi: mac80211: remove return value check of debugfs_create_dir() Smatch complains that: debugfs_hw_add() warn: 'statsd' is an error pointer or valid Debugfs checks are generally not supposed to be checked for errors and it is not necessary here. Just delete the dead code. Signed-off-by: Yingsha Xu Reviewed-by: Dongliang Mu Link: https://lore.kernel.org/r/20230419104548.30124-1-ysxu@hust.edu.cn Signed-off-by: Johannes Berg commit 22b68fc6d693e7a2b1c0eb852463f4a72522fa08 Author: Avraham Stern Date: Tue Apr 18 12:28:14 2023 +0300 wifi: iwlwifi: mvm: fix RFKILL report when driver is going down When CSME takes ownership, the driver sets RFKILL on, and this triggers driver unload and sending the confirmation SAP message. However, when IWL_MVM_MEI_REPORT_RFKILL is set, RFKILL was not reported and as a result, the driver did not confirm the ownership transition. Fix it. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230418122405.29ac3cd3df73.I96b32bc274bfe1e3871e54d3fa29c7ac4f40446f@changeid Signed-off-by: Johannes Berg commit 06ce23ad57c8e378b86ef3f439b2e08bcb5d05eb Author: Avraham Stern Date: Tue Apr 18 12:28:13 2023 +0300 wifi: iwlwifi: mei: re-ask for ownership after it was taken by CSME When the host disconnects from the AP CSME takes ownership right away. Since the driver never asks for ownership again wifi is left in rfkill until CSME releases the NIC, although in many cases the host could re-connect shortly after the disconnection. To allow the host to recover from occasional disconnection, re-ask for ownership to let the host connect again. Allow one minute before re-asking for ownership to avoid too frequent ownership transitions. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230418122405.a6c6ebc48f2d.I8a17003b86e71b3567521cc69864b9cbe9553ea9@changeid Signed-off-by: Johannes Berg commit 85c78af4e65053defeca958503fcfb0ebc1939e6 Author: Avraham Stern Date: Tue Apr 18 12:28:12 2023 +0300 wifi: iwlwifi: mei: make mei filtered scan more aggressive When mei filtered scan is performed, it must find the AP on the first scan, otherwise CSME will take the ownership of the NIC. Make this scan more aggressive by scanning the channel the AP is supposed to be on (as reported by CSME) several times. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230418122405.47e383b10b18.I14340a118acdb19ecb7214e7ff413054c77bd99c@changeid Signed-off-by: Johannes Berg commit 0d2558838ee815540eb89feb9a468cb88b189661 Author: Avraham Stern Date: Tue Apr 18 12:28:11 2023 +0300 wifi: iwlwifi: modify scan request and results when in link protection When CSME is connected and has link protection set, the driver must connect to the same AP CSME is connected to. When in link protection, modify scan request parameters to include only the channel of the AP CSME is connected to and scan for the same SSID. In addition, filter the scan results to include only results from the same AP. This will make sure the driver will connect to the same AP and will do it fast enough to keep the session alive. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230418122405.c1b55de3d704.I3895eebe18b3b672607695c887d728e113fc85ec@changeid Signed-off-by: Johannes Berg commit 0120e6b3e33dac3d0812ed93677d872e00dd4564 Author: Gregory Greenman Date: Tue Apr 18 12:28:10 2023 +0300 wifi: iwlwifi: mvm: enable support for MLO APIs Enable driver's support for MLO APIs to unlock this functionality. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20230418122405.0ae0dd6f0481.Iec993cf0f28eacb2483fb9d1e755b0b2fd62e163@changeid Signed-off-by: Johannes Berg commit 3e75668be54eff49c86d498623e3cf3d3a23169a Author: Johannes Berg Date: Tue Apr 18 12:28:09 2023 +0300 wifi: iwlwifi: mvm: prefer RCU_INIT_POINTER() For constant values we don't need rcu_assign_pointer(), use RCU_INIT_POINTER() instead. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230418122405.7b400d21a27f.Iccdef9d777677390a9881c88b06c0ed13a83d978@changeid Signed-off-by: Johannes Berg commit 457d7fb03e6c3d73fbb509bd85fc4b02d1ab405e Author: Johannes Berg Date: Tue Apr 18 12:28:08 2023 +0300 wifi: iwlwifi: mvm: fix potential memory leak If we do get multiple notifications from firmware, then we might have allocated 'notif', but don't free it. Fix that by checking for duplicates before allocation. Fixes: 4da46a06d443 ("wifi: iwlwifi: mvm: Add support for wowlan info notification") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230418122405.116758321cc4.I8bdbcbb38c89ac637eaa20dda58fa9165b25893a@changeid Signed-off-by: Johannes Berg commit f4d4ba4613dc92a58a8c051f7b6bcb0276b1fecc Author: Alon Giladi Date: Tue Apr 18 12:28:07 2023 +0300 wifi: iwlwifi: fw: fix argument to efi.get_variable We should pass the newly allocated data to fill. Signed-off-by: Alon Giladi Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230418122405.aaa6d8874442.I734841c71aad9564cb22c50f2737aaff489fadaf@changeid Signed-off-by: Johannes Berg commit 7b41a99ce2d494d01e8fcb25e7113f143a0f2155 Author: Johannes Berg Date: Tue Apr 18 12:28:06 2023 +0300 wifi: iwlwifi: mvm: fix MIC removal confusion The RADA/firmware collaborate on MIC stripping in the following way: - the firmware fills the IWL_RX_MPDU_MFLG1_MIC_CRC_LEN_MASK value for how many words need to be removed at the end of the frame, CRC and, if decryption was done, MIC - if the RADA is active, it will - remove that much from the end of the frame - zero the value in IWL_RX_MPDU_MFLG1_MIC_CRC_LEN_MASK As a consequence, the only thing the driver should need to do is to - unconditionally tell mac80211 that the MIC was removed if decryption was already done - remove as much as IWL_RX_MPDU_MFLG1_MIC_CRC_LEN_MASK says at the end of the frame, since either RADA did it and then the value is 0, or RADA was disabled and then the value is whatever should be removed to strip both CRC & MIC However, all this code was historically grown and getting a bit confused. Originally, we were indicating that the MIC was not stripped, which is the version of the code upstreamed in commit 780e87c29e77 ("iwlwifi: mvm: add 9000 series RX processing") which indicated RX_FLAG_DECRYPTED in iwl_mvm_rx_crypto(). We later had a commit to change that to also indicate that the MIC was stripped, adding RX_FLAG_MIC_STRIPPED. However, this was then "fixed" later to only do that conditionally on RADA being enabled, since otherwise RADA didn't strip the MIC bytes yet. At the time, we were also always including the FCS if the RADA was not enabled, so that was still broken wrt. the FCS if the RADA isn't enabled - but that's a pretty rare case. Notably though, it does happen for management frames, where we do need to remove the MIC and CRC but the RADA is disabled. Later, in commit 40a0b38d7a7f ("iwlwifi: mvm: Fix calculation of frame length"), we changed this again, upstream this was just a single commit, but internally it was split into first the correct commit and then an additional fix that reduced the number of bytes that are removed by crypt_len. Note that this is clearly wrong since crypt_len indicates the length of the PN header (always 8), not the length of the MIC (8 or 16 depending on algorithm). However, this additional fix mostly canceled the other bugs, apart from the confusion about the size of the MIC. To fix this correctly, remove all those additional workarounds. We really should always indicate to mac80211 the MIC was stripped (it cannot use it anyway if decryption was already done), and also always actually remove it and the CRC regardless of the RADA being enabled or not. That's simple though, the value indicated in the metadata is zeroed by the RADA if it's enabled and used the value, so there's no need to check if it's enabled or not. Notably then, this fixes the MIC size confusion, letting us receive GCMP-256 encrypted management frames correctly that would otherwise be reported to mac80211 8 bytes too short since the RADA is turned off for them, crypt_len is 8, but the MIC size is 16, so when we do the adjustment based on IWL_RX_MPDU_MFLG1_MIC_CRC_LEN_MASK (which indicates 20 bytes to remove) we remove 12 bytes but indicate then to mac80211 the MIC is still present, so mac80211 again removes the MIC of 16 bytes, for an overall removal of 28 rather than 20 bytes. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230418122405.81345b6ab0cd.Ibe0348defb6cce11c99929a1f049e60b5cfc150c@changeid Signed-off-by: Johannes Berg commit 3d90d2f4a018fe8cfd65068bc6350b6222be4852 Author: Johannes Berg Date: Tue Apr 18 12:28:05 2023 +0300 wifi: iwlwifi: fw: fix memory leak in debugfs Fix a memory leak that occurs when reading the fw_info file all the way, since we return NULL indicating no more data, but don't free the status tracking object. Fixes: 36dfe9ac6e8b ("iwlwifi: dump api version in yaml format") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230418122405.239e501b3b8d.I4268f87809ef91209cbcd748eee0863195e70fa2@changeid Signed-off-by: Johannes Berg commit c5050696588660226fe6cc90a360b62d52a87e32 Author: Mukesh Sisodiya Date: Tue Apr 18 12:28:04 2023 +0300 wifi: iwlwifi: Update support for b0 version Add support for B0 version of MAC of MR device Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230418122405.5dca1ea7a0cf.I87932e1e216a1940eeae8824071ecb777f4c034f@changeid Signed-off-by: Johannes Berg commit e1d6ca042e62c2a69513235f8629eb6e62ca79c5 Author: Dan Carpenter Date: Wed Apr 19 17:27:03 2023 +0300 firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in probe The svc_create_memory_pool() function returns error pointers. It never returns NULL. Fix the check. Fixes: 7ca5ce896524 ("firmware: add Intel Stratix10 service layer driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/5f9a8cb4-5a4f-460b-9cdc-2fae6c5b7922@kili.mountain Signed-off-by: Greg Kroah-Hartman commit b7b4ce84c830ae3ce6429fbbd70a62a4ae1ac78d Author: Simon Horman Date: Tue Apr 18 13:54:00 2023 +0200 arm64: kexec: include reboot.h Include reboot.h in machine_kexec.c for declaration of machine_crash_shutdown. gcc-12 with W=1 reports: arch/arm64/kernel/machine_kexec.c:257:6: warning: no previous prototype for 'machine_crash_shutdown' [-Wmissing-prototypes] 257 | void machine_crash_shutdown(struct pt_regs *regs) No functional changes intended. Compile tested only. Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20230418-arm64-kexec-include-reboot-v1-1-8453fd4fb3fb@kernel.org Signed-off-by: Will Deacon commit 460e70e2dc9af3128f69e533daf349635c421b0a Author: Dan Carpenter Date: Wed Apr 19 10:58:43 2023 +0300 arm64: delete dead code in this_cpu_set_vectors() The "slot" variable is an enum, and in this context it is an unsigned int. So the type means it can never be negative and also we never pass invalid data to this function. If something did pass invalid data then this check would be insufficient protection. Signed-off-by: Dan Carpenter Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/73859c9e-dea0-4764-bf01-7ae694fa2e37@kili.mountain Signed-off-by: Will Deacon commit 76e31045ba030e94e72105c01b2e98f543d175ac Author: Alan Stern Date: Mon Apr 10 15:40:05 2023 -0400 media: radio-shark: Add endpoint checks The syzbot fuzzer was able to provoke a WARNING from the radio-shark2 driver: ------------[ cut here ]------------ usb 1-1: BOGUS urb xfer, pipe 1 != type 3 WARNING: CPU: 0 PID: 3271 at drivers/usb/core/urb.c:504 usb_submit_urb+0xed2/0x1880 drivers/usb/core/urb.c:504 Modules linked in: CPU: 0 PID: 3271 Comm: kworker/0:3 Not tainted 6.1.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: usb_hub_wq hub_event RIP: 0010:usb_submit_urb+0xed2/0x1880 drivers/usb/core/urb.c:504 Code: 7c 24 18 e8 00 36 ea fb 48 8b 7c 24 18 e8 36 1c 02 ff 41 89 d8 44 89 e1 4c 89 ea 48 89 c6 48 c7 c7 a0 b6 90 8a e8 9a 29 b8 03 <0f> 0b e9 58 f8 ff ff e8 d2 35 ea fb 48 81 c5 c0 05 00 00 e9 84 f7 RSP: 0018:ffffc90003876dd0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000000 RDX: ffff8880750b0040 RSI: ffffffff816152b8 RDI: fffff5200070edac RBP: ffff8880172d81e0 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000080000000 R11: 0000000000000000 R12: 0000000000000001 R13: ffff8880285c5040 R14: 0000000000000002 R15: ffff888017158200 FS: 0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffe03235b90 CR3: 000000000bc8e000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: usb_start_wait_urb+0x101/0x4b0 drivers/usb/core/message.c:58 usb_bulk_msg+0x226/0x550 drivers/usb/core/message.c:387 shark_write_reg+0x1ff/0x2e0 drivers/media/radio/radio-shark2.c:88 ... The problem was caused by the fact that the driver does not check whether the endpoints it uses are actually present and have the appropriate types. This can be fixed by adding a simple check of these endpoints (and similarly for the radio-shark driver). Link: https://syzkaller.appspot.com/bug?extid=4b3f8190f6e13b3efd74 Reported-and-tested-by: syzbot+4b3f8190f6e13b3efd74@syzkaller.appspotmail.com Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/e2858ab4-4adf-46e5-bbf6-c56742034547@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit df05a9b05e466a46725564528b277d0c570d0104 Author: Alan Stern Date: Mon Apr 10 15:38:22 2023 -0400 USB: sisusbvga: Add endpoint checks The syzbot fuzzer was able to provoke a WARNING from the sisusbvga driver: ------------[ cut here ]------------ usb 1-1: BOGUS urb xfer, pipe 3 != type 1 WARNING: CPU: 1 PID: 26 at drivers/usb/core/urb.c:504 usb_submit_urb+0xed6/0x1880 drivers/usb/core/urb.c:504 Modules linked in: CPU: 1 PID: 26 Comm: kworker/1:1 Not tainted 6.2.0-rc5-syzkaller-00199-g5af6ce704936 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Workqueue: usb_hub_wq hub_event RIP: 0010:usb_submit_urb+0xed6/0x1880 drivers/usb/core/urb.c:504 Code: 7c 24 18 e8 6c 50 80 fb 48 8b 7c 24 18 e8 62 1a 01 ff 41 89 d8 44 89 e1 4c 89 ea 48 89 c6 48 c7 c7 60 b1 fa 8a e8 84 b0 be 03 <0f> 0b e9 58 f8 ff ff e8 3e 50 80 fb 48 81 c5 c0 05 00 00 e9 84 f7 RSP: 0018:ffffc90000a1ed18 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000 RDX: ffff888012783a80 RSI: ffffffff816680ec RDI: fffff52000143d95 RBP: ffff888079020000 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000080000000 R11: 0000000000000000 R12: 0000000000000003 R13: ffff888017d33370 R14: 0000000000000003 R15: ffff888021213600 FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005592753a60b0 CR3: 0000000022899000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: sisusb_bulkout_msg drivers/usb/misc/sisusbvga/sisusbvga.c:224 [inline] sisusb_send_bulk_msg.constprop.0+0x904/0x1230 drivers/usb/misc/sisusbvga/sisusbvga.c:379 sisusb_send_bridge_packet drivers/usb/misc/sisusbvga/sisusbvga.c:567 [inline] sisusb_do_init_gfxdevice drivers/usb/misc/sisusbvga/sisusbvga.c:2077 [inline] sisusb_init_gfxdevice+0x87b/0x4000 drivers/usb/misc/sisusbvga/sisusbvga.c:2177 sisusb_probe+0x9cd/0xbe2 drivers/usb/misc/sisusbvga/sisusbvga.c:2869 ... The problem was caused by the fact that the driver does not check whether the endpoints it uses are actually present and have the appropriate types. This can be fixed by adding a simple check of the endpoints. Link: https://syzkaller.appspot.com/bug?extid=23be03b56c5259385d79 Reported-and-tested-by: syzbot+23be03b56c5259385d79@syzkaller.appspotmail.com Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/48ef98f7-51ae-4f63-b8d3-0ef2004bb60a@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 13890626501ffda22b18213ddaf7930473da5792 Author: Alan Stern Date: Mon Apr 10 15:37:07 2023 -0400 USB: core: Add routines for endpoint checks in old drivers Many of the older USB drivers in the Linux USB stack were written based simply on a vendor's device specification. They use the endpoint information in the spec and assume these endpoints will always be present, with the properties listed, in any device matching the given vendor and product IDs. While that may have been true back then, with spoofing and fuzzing it is not true any more. More and more we are finding that those old drivers need to perform at least a minimum of checking before they try to use any endpoint other than ep0. To make this checking as simple as possible, we now add a couple of utility routines to the USB core. usb_check_bulk_endpoints() and usb_check_int_endpoints() take an interface pointer together with a list of endpoint addresses (numbers and directions). They check that the interface's current alternate setting includes endpoints with those addresses and that each of these endpoints has the right type: bulk or interrupt, respectively. Although we already have usb_find_common_endpoints() and related routines meant for a similar purpose, they are not well suited for this kind of checking. Those routines find endpoints of various kinds, but only one (either the first or the last) of each kind, and they don't verify that the endpoints' addresses agree with what the caller expects. In theory the new routines could be more general: They could take a particular altsetting as their argument instead of always using the interface's current altsetting. In practice I think this won't matter too much; multiple altsettings tend to be used for transferring media (audio or visual) over isochronous endpoints, not bulk or interrupt. Drivers for such devices will generally require more sophisticated checking than these simplistic routines provide. Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/dd2c8e8c-2c87-44ea-ba17-c64b97e201c9@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit bedee105bf4a072294af068d89ec2d2bb5f457ae Author: Arnd Bergmann Date: Fri Apr 14 10:03:07 2023 +0200 firmware_loader: rework crypto dependencies The crypto dependencies for the firmwware loader are incomplete, in particular a built-in FW_LOADER fails to link against a modular crypto hash driver: ld.lld: error: undefined symbol: crypto_alloc_shash ld.lld: error: undefined symbol: crypto_shash_digest ld.lld: error: undefined symbol: crypto_destroy_tfm >>> referenced by main.c >>> drivers/base/firmware_loader/main.o:(fw_log_firmware_info) in archive vmlinux.a Rework this to use the usual 'select' from the driver module, to respect the built-in vs module dependencies, and add a more verbose crypto dependency to the debug option to prevent configurations that lead to a link failure. Fixes: 02fe26f25325 ("firmware_loader: Add debug message with checksum for FW file") Reviewed-by: Amadeusz Sławiński Acked-by: Herbert Xu Acked-by: Luis Chamberlain Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230414080329.76176-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 495ff36388e8b71eb49e9242c8e04e06c5609e74 Author: Florian Fainelli Date: Thu Apr 13 12:17:57 2023 -0700 firmware_loader: Strip off \n from customized path Having helped an user recently figure out why the customized path being specified was not taken into account landed on a subtle difference between using: echo "/xyz/firmware" > /sys/module/firmware_class/parameters/path which inserts an additional newline which is passed as is down to fw_get_filesystem_firmware() and ultimately kernel_read_file_from_path() and fails. Strip off \n from the customized firmware path such that users do not run into these hard to debug situations. Link: https://lore.kernel.org/all/20230402135423.3235-1-f.fainelli@gmail.com/ Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20230413191757.1949088-1-f.fainelli@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2a405f6bb3a5b2baaa74dfc5aaa0e1b99145bd1b Author: Heiko Carstens Date: Wed Apr 5 15:08:41 2023 +0200 s390/stackleak: provide fast __stackleak_poison() implementation Provide an s390 specific __stackleak_poison() implementation which is faster than the generic variant. For the original implementation with an enforced 4kb stackframe for the getpid() system call the system call overhead increases by a factor of 3 if the stackleak feature is enabled. Using the s390 mvc based variant this is reduced to an increase of 25% instead. This is within the expected area, since the mvc based implementation is more or less a memset64() variant which comes with similar results. See commit 0b77d6701cf8 ("s390: implement memset16, memset32 & memset64"). Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Link: https://lore.kernel.org/r/20230405130841.1350565-3-hca@linux.ibm.com Signed-off-by: Vasily Gorbik commit 491a78663e039fabc58c892ca8f2c2e08caaf4f8 Author: Heiko Carstens Date: Wed Apr 5 15:08:40 2023 +0200 stackleak: allow to specify arch specific stackleak poison function Factor out the code that fills the stack with the stackleak poison value in order to allow architectures to provide a faster implementation. Acked-by: Vasily Gorbik Signed-off-by: Heiko Carstens Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20230405130841.1350565-2-hca@linux.ibm.com Signed-off-by: Vasily Gorbik commit ccf7c3fb61ed7f3019b5be9fe70ccc0ab782cf2e Author: Heiko Carstens Date: Wed Apr 19 15:17:02 2023 +0200 s390: select ARCH_USE_SYM_ANNOTATIONS All old style assembly annotations have been converted for s390. Select ARCH_USE_SYM_ANNOTATIONS to make sure the old macros like ENTRY() aren't available anymore. This prevents that new code which uses the old macros will be added again. This follows what has been done for x86 with commit 2ce0d7f9766f ("x86/asm: Provide a Kconfig symbol for disabling old assembly annotations") and for arm64 with commit 50479d58eaa3 ("arm64: Disable old style assembly annotations"). Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 34e4c79f3ba9e3d7de56be8ef1a514950915e0ee Author: Heiko Carstens Date: Fri Apr 14 14:30:46 2023 +0200 s390/mm: use VM_FLUSH_RESET_PERMS in module_alloc() Make use of the set_direct_map() calls for module allocations. In particular: - All changes to read-only permissions in kernel VA mappings are also applied to the direct mapping. Note that execute permissions are intentionally not applied to the direct mapping in order to make sure that all allocated pages within the direct mapping stay non-executable - module_alloc() passes the VM_FLUSH_RESET_PERMS to __vmalloc_node_range() to make sure that all implicit permission changes made to the direct mapping are reset when the allocated vm area is freed again Side effects: the direct mapping will be fragmented depending on how many vm areas with VM_FLUSH_RESET_PERMS and/or explicit page permission changes are allocated and freed again. For example, just after boot of a system the direct mapping statistics look like: $cat /proc/meminfo ... DirectMap4k: 111628 kB DirectMap1M: 16665600 kB DirectMap2G: 0 kB Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7608f70adcb1ea6957d7b9e1d5bd53584178fbbc Author: Heiko Carstens Date: Fri Apr 14 14:30:45 2023 +0200 s390: wire up memfd_secret system call s390 supports ARCH_HAS_SET_DIRECT_MAP, therefore wire up the memfd_secret system call, which depends on it. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 0490d6d7ba0a479fdd805da54ae25220ce5b514d Author: Heiko Carstens Date: Fri Apr 14 14:30:44 2023 +0200 s390/mm: enable ARCH_HAS_SET_DIRECT_MAP Implement the set_direct_map_*() API, which allows to invalidate and set default permissions to pages within the direct mapping. Note that kernel_page_present(), which is also supposed to be part of this API, is intentionally not implemented. The reason for this is that kernel_page_present() is only used (and currently only makes sense) for suspend/resume, which isn't supported on s390. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 17c51b1ba9c2d4b497349ac1622aafe67be16103 Author: Heiko Carstens Date: Fri Apr 14 14:30:43 2023 +0200 s390/mm: use BIT macro to generate SET_MEMORY bit masks Use BIT macro to generate SET_MEMORY bit masks, which is easier to maintain if bits get added, or removed. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 02435a739b81ae24aff5d6e930efef9458e2af3c Author: Wesley Cheng Date: Thu Apr 13 12:57:40 2023 -0700 usb: dwc3: gadget: Stall and restart EP0 if host is unresponsive It was observed that there are hosts that may complete pending SETUP transactions before the stop active transfers and controller halt occurs, leading to lingering endxfer commands on DEPs on subsequent pullup/gadget start iterations. dwc3_gadget_ep_disable name=ep8in flags=0x3009 direction=1 dwc3_gadget_ep_disable name=ep4in flags=1 direction=1 dwc3_gadget_ep_disable name=ep3out flags=1 direction=0 usb_gadget_disconnect deactivated=0 connected=0 ret=0 The sequence shows that the USB gadget disconnect (dwc3_gadget_pullup(0)) routine completed successfully, allowing for the USB gadget to proceed with a USB gadget connect. However, if this occurs the system runs into an issue where: BUG: spinlock already unlocked on CPU spin_bug+0x0 dwc3_remove_requests+0x278 dwc3_ep0_out_start+0xb0 __dwc3_gadget_start+0x25c This is due to the pending endxfers, leading to gadget start (w/o lock held) to execute the remove requests, which will unlock the dwc3 spinlock as part of giveback. To mitigate this, resolve the pending endxfers on the pullup disable path by re-locating the SETUP phase check after stop active transfers, since that is where the DWC3_EP_DELAY_STOP is potentially set. This also allows for handling of a host that may be unresponsive by using the completion timeout to trigger the stall and restart for EP0. Fixes: c96683798e27 ("usb: dwc3: ep0: Don't prepare beyond Setup stage") Cc: stable@vger.kernel.org Acked-by: Thinh Nguyen Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/20230413195742.11821-2-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 4a2f152af1c478d42bd4f535788d4dbec015704f Author: Stanley Chang Date: Wed Apr 19 10:00:43 2023 +0800 dt-bindings: usb: snps,dwc3: Add 'snps,parkmode-disable-hs-quirk' quirk Add a new 'snps,parkmode-disable-hs-quirk' DT quirk to dwc3 core for disable the high-speed parkmode. For some USB wifi devices, if enable this feature it will reduce the performance. Therefore, add an option for disabling HS park mode by device-tree. In Synopsys's dwc3 data book: In a few high speed devices when an IN request is sent within 900ns of the ACK of the previous packet, these devices send a NAK. When connected to these devices, if required, the software can disable the park mode if you see performance drop in your system. When park mode is disabled, pipelining of multiple packet is disabled and instead one packet at a time is requested by the scheduler. This allows up to 12 NAKs in a micro-frame and improves performance of these slow devices. Acked-by: Rob Herring Signed-off-by: Stanley Chang Link: https://lore.kernel.org/r/20230419020044.15475-2-stanley_chang@realtek.com Signed-off-by: Greg Kroah-Hartman commit d21a797a3eeb2b001e07ff943e5611eab67a71a3 Author: Stanley Chang Date: Wed Apr 19 10:00:42 2023 +0800 usb: dwc3: core: add support for disabling High-speed park mode Setting the PARKMODE_DISABLE_HS bit in the DWC3_USB3_GUCTL1. When this bit is set to '1' all HS bus instances in park mode are disabled For some USB wifi devices, if enable this feature it will reduce the performance. Therefore, add an option for disabling HS park mode by device-tree. In Synopsys's dwc3 data book: In a few high speed devices when an IN request is sent within 900ns of the ACK of the previous packet, these devices send a NAK. When connected to these devices, if required, the software can disable the park mode if you see performance drop in your system. When park mode is disabled, pipelining of multiple packet is disabled and instead one packet at a time is requested by the scheduler. This allows up to 12 NAKs in a micro-frame and improves performance of these slow devices. Acked-by: Thinh Nguyen Signed-off-by: Stanley Chang Link: https://lore.kernel.org/r/20230419020044.15475-1-stanley_chang@realtek.com Signed-off-by: Greg Kroah-Hartman commit a804a47658ced9e9cc6b6000846ddf208362f1b3 Author: Krzysztof Kozlowski Date: Thu Apr 20 08:50:51 2023 +0200 dt-bindings: usb: ci-hdrc-usb2: allow multiple PHYs Qualcomm MSM8974 comes with USB HS phy in two variants, although final DTS chooses only one. Allow such combination in the ChipIdea USB2 bindings and also disallow any other properties in the ulpi node. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230420065051.22994-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 41792870dc1cb8305ca04d563cabd63833e94762 Author: Chunfeng Yun Date: Mon Apr 17 10:52:03 2023 +0800 usb: mtu3: add optional clock xhci_ck and frmcnt_ck Add optional clock 'xhci_ck' which is usually the same as sys_ck, but some SoC use two separated clocks when the controller supports dual role mode; Add optional clock 'frmcnt_ck' used on 4nm or advanced process SoC. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20230417025203.18097-7-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit d10cb206acb45b9a0aa83318f0101bb56c33b7de Author: Chunfeng Yun Date: Mon Apr 17 10:52:02 2023 +0800 dt-bindings: usb: mtu3: add two optional clocks Add optional clock 'xhci_ck' and 'frmcnt_ck'; Reviewed-by: Rob Herring Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20230417025203.18097-6-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 976a5c256e34085207c0abf0941b5c967d8d1c18 Author: Chunfeng Yun Date: Mon Apr 17 10:52:01 2023 +0800 usb: mtu3: expose role-switch control to userspace The allow_userspace_control flag enables manual role switch from userspace, turn this feature on like several other USB DRD controller drivers. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20230417025203.18097-5-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit ed50be81d536cdb25d00befe6ca21cd02f1c509d Author: Chunfeng Yun Date: Mon Apr 17 10:52:00 2023 +0800 usb: mtu3: unlock @mtu->lock just before giving back request No need unlock @mtu->lock when unmap request, unlock it just before giving back request, due to we do not lock this spinlock when map the request. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20230417025203.18097-4-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit d28f4091ea7ec3510fd6a3c6d433234e7a2bef14 Author: Chunfeng Yun Date: Mon Apr 17 10:51:59 2023 +0800 usb: mtu3: fix kernel panic at qmu transfer done irq handler When handle qmu transfer irq, it will unlock @mtu->lock before give back request, if another thread handle disconnect event at the same time, and try to disable ep, it may lock @mtu->lock and free qmu ring, then qmu irq hanlder may get a NULL gpd, avoid the KE by checking gpd's value before handling it. e.g. qmu done irq on cpu0 thread running on cpu1 qmu_done_tx() handle gpd [0] mtu3_requ_complete() mtu3_gadget_ep_disable() unlock @mtu->lock give back request lock @mtu->lock mtu3_ep_disable() mtu3_gpd_ring_free() unlock @mtu->lock lock @mtu->lock get next gpd [1] [1]: goto [0] to handle next gpd, and next gpd may be NULL. Fixes: 48e0d3735aa5 ("usb: mtu3: supports new QMU format") Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20230417025203.18097-3-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 3481769cd05b2ff3fa00d0aab526eb64de994fad Author: Chunfeng Yun Date: Mon Apr 17 10:51:58 2023 +0800 usb: mtu3: use boolean return value Prefer to use boolean value due to gpd_ring_empty() return true or false. See "16) Function return values and names" in coding-style.rst Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20230417025203.18097-2-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit c507565aac2e8c4ca8dd36afcd40e15e4b459d93 Author: Chunfeng Yun Date: Mon Apr 17 10:51:57 2023 +0800 usb: mtu3: give back request when rx error happens When the Rx enconnter errors, currently, only print error logs, that may cause class driver's RX halt, shall give back the request with error status meanwhile. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20230417025203.18097-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit d6f712f53b79f5017cdcefafb7a5aea9ec52da5d Author: Yinhao Hu Date: Wed Apr 12 13:58:52 2023 +0800 usb: chipidea: fix missing goto in `ci_hdrc_probe` From the comment of ci_usb_phy_init, it returns an error code if usb_phy_init has failed, and it should do some clean up, not just return directly. Fix this by goto the error handling. Fixes: 74475ede784d ("usb: chipidea: move PHY operation to core") Reviewed-by: Dongliang Mu Acked-by: Peter Chen Signed-off-by: Yinhao Hu Link: https://lore.kernel.org/r/20230412055852.971991-1-dddddd@hust.edu.cn Signed-off-by: Greg Kroah-Hartman commit a3afbf5cc887fc3401f012fe629810998ed61859 Author: Badhri Jagan Sridharan Date: Fri Apr 7 03:07:41 2023 +0000 usb: gadget: udc: core: Prevent redundant calls to pullup usb_gadget_connect calls gadget->ops->pullup without checking whether gadget->connected was previously set. Make this symmetric to usb_gadget_disconnect by returning early if gadget->connected is already set. Fixes: 5a1da544e572 ("usb: gadget: core: do not try to disconnect gadget if it is not connected") Cc: stable@vger.kernel.org Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20230407030741.3163220-2-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 0db213ea8eed5534a5169e807f28103cbc9d23df Author: Badhri Jagan Sridharan Date: Fri Apr 7 03:07:40 2023 +0000 usb: gadget: udc: core: Invoke usb_gadget_connect only when started usb_udc_connect_control does not check to see if the udc has already been started. This causes gadget->ops->pullup to be called through usb_gadget_connect when invoked from usb_udc_vbus_handler even before usb_gadget_udc_start is called. Guard this by checking for udc->started in usb_udc_connect_control before invoking usb_gadget_connect. Guarding udc->vbus, udc->started, gadget->connect, gadget->deactivate related functions with connect_lock. usb_gadget_connect_locked, usb_gadget_disconnect_locked, usb_udc_connect_control_locked, usb_gadget_udc_start_locked, usb_gadget_udc_stop_locked are called with this lock held as they can be simulataneously invoked from different code paths. Adding an additional check to make sure udc is started(udc->started) before pullup callback is invoked. Fixes: 628ef0d273a6 ("usb: udc: add usb_udc_vbus_handler") Cc: stable@vger.kernel.org Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20230407030741.3163220-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 511b74e7c0b8ecd78b8175f5ee84dc0b6e014c19 Author: Fabrice Gasnier Date: Wed Apr 12 18:17:34 2023 +0200 usb: typec: ucsi: don't print PPM init deferred errors ucsi_init() may be deferred as usb_role_sw may be deferred in ucsi_register_port(). This results in several PPM init failed (-517) messages maybe printed several times upon boot, like on stm32mp135f-dk board, until the role_switch driver gets probed. [ 19.880945] dwc2 49000000.usb: supply vusb_d not found, using dummy regulator [ 19.887136] dwc2 49000000.usb: supply vusb_a not found, using dummy regulator [ 19.975432] ucsi-stm32g0-i2c 0-0053: PPM init failed (-517) [ 20.155746] dwc2 49000000.usb: EPs: 9, dedicated fifos, 952 entries in SPRAM [ 20.175429] ucsi-stm32g0-i2c 0-0053: PPM init failed (-517) [ 20.184242] dwc2 49000000.usb: DWC OTG Controller Adopt dev_err_probe() instead of dev_err(), to only print other errors. Also print an error in case the wait count has expired. Reviewed-by: Heikki Krogerus Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20230412161734.3425090-1-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman commit dac3b192107b978198e89ec0f77375738352e0c8 Author: Frank Wang Date: Thu Mar 16 16:11:49 2023 +0800 usb: typec: tcpm: fix multiple times discover svids error PD3.0 Spec 6.4.4.3.2 say that only Responder supports 12 or more SVIDs, the Discover SVIDs Command Shall be executed multiple times until a Discover SVIDs VDO is returned ending either with a SVID value of 0x0000 in the last part of the last VDO or with a VDO containing two SVIDs with values of 0x0000. In the current implementation, if the last VDO does not find that the Discover SVIDs Command would be executed multiple times even if the Responder SVIDs are less than 12, and we found some odd dockers just meet this case. So fix it. Acked-by: Heikki Krogerus Signed-off-by: Frank Wang Link: https://lore.kernel.org/r/20230316081149.24519-1-frank.wang@rock-chips.com Signed-off-by: Greg Kroah-Hartman commit 9a4d7dd1990383df8ffa09d6879cecb0534405e1 Author: Johan Hovold Date: Tue Apr 4 09:25:24 2023 +0200 USB: dwc3: clean up probe declarations Clean up the probe variable declarations by removing the stray newlines. Acked-by: Thinh Nguyen Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230404072524.19014-12-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit bd82857424d37897ad994381f7c580dacf2e2988 Author: Johan Hovold Date: Tue Apr 4 09:25:23 2023 +0200 USB: dwc3: refactor clock lookups The probe callback has become unwieldy so break out the clock lookups into a new helper function to improve readability. Acked-by: Thinh Nguyen Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230404072524.19014-11-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1d72fab476567a0e4f51ee0a93882208ba28dc54 Author: Johan Hovold Date: Tue Apr 4 09:25:22 2023 +0200 USB: dwc3: refactor phy handling Refactor the PHY handling using four new helpers to initialise, deinitialise, power on and power off all the PHYs. Acked-by: Thinh Nguyen Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230404072524.19014-10-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit d2f197822d5807d48bf27e713e2fd569e7017610 Author: Johan Hovold Date: Tue Apr 4 09:25:21 2023 +0200 USB: dwc3: clean up core init error handling Clean up the core init error handling by using descriptive names for the error labels and releasing resourcing in reverse order consistently. Acked-by: Thinh Nguyen Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230404072524.19014-9-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit c8e9eccf6ed29f6c20fa489286eee1059566d035 Author: Johan Hovold Date: Tue Apr 4 09:25:20 2023 +0200 USB: dwc3: clean up phy init error handling While there likely are no platforms out there that mix generic and legacy PHYs the driver should still be able to handle that, if only for consistency reasons. Add the missing calls to shutdown any legacy PHYs if generic PHY initialisation fails. Note that we continue to happily ignore potential errors from the legacy PHY callbacks... Acked-by: Thinh Nguyen Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230404072524.19014-8-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit fe296046c7219c3b156cddc90a0efaa52a5eb996 Author: Johan Hovold Date: Tue Apr 4 09:25:19 2023 +0200 USB: dwc3: clean up probe error labels Use descriptive names consistently for the probe error labels. Acked-by: Thinh Nguyen Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230404072524.19014-7-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit f56d0d29b018b6c19b4d5c60e768b5f90bb20c8d Author: Johan Hovold Date: Tue Apr 4 09:25:18 2023 +0200 USB: dwc3: drop dead hibernation code The hibernation code is broken and has never been enabled in mainline and should thus be dropped. Specifically, the scratch buffer DMA mapping would have been leaked on every suspend cycle since commit 51f5d49ad6f0 ("usb: dwc3: core: simplify suspend/resume operations") if this feature was ever enabled. The related error handling was also broken and could have resulted in attempts to unmap never mapped buffers, etc. This effectively revert commit 0ffcaf3798bf ("usb: dwc3: core: allocate scratch buffers"). Acked-by: Thinh Nguyen Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230404072524.19014-6-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit bdb19d01026a5cccfa437be8adcf2df472c5889e Author: Johan Hovold Date: Tue Apr 4 09:25:17 2023 +0200 USB: dwc3: gadget: drop dead hibernation code The hibernation code is broken and has never been enabled in mainline and should thus be dropped. Remove the hibernation bits from the gadget code, which effectively reverts commits e1dadd3b0f27 ("usb: dwc3: workaround: bogus hibernation events") and 7b2a0368bbc9 ("usb: dwc3: gadget: set KEEP_CONNECT in case of hibernation") except for the spurious interrupt warning. Acked-by: Thinh Nguyen Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230404072524.19014-5-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6b3b2402ca5be6a19f92968a5654bc64d3996d16 Author: Johan Hovold Date: Tue Apr 4 09:25:16 2023 +0200 USB: dwc3: disable autosuspend on unbind Add the missing calls to disable autosuspend on probe errors and on driver unbind. Acked-by: Thinh Nguyen Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230404072524.19014-4-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit 44d257e9012ee8040e41d224d0e5bfb5ef5427ea Author: Johan Hovold Date: Tue Apr 4 09:25:15 2023 +0200 USB: dwc3: fix runtime pm imbalance on unbind Make sure to balance the runtime PM usage count on driver unbind by adding back the pm_runtime_allow() call that had been erroneously removed. Fixes: 266d0493900a ("usb: dwc3: core: don't trigger runtime pm when remove driver") Cc: stable@vger.kernel.org # 5.9 Cc: Li Jun Acked-by: Thinh Nguyen Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230404072524.19014-3-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9a8ad10c9f2e0925ff26308ec6756b93fc2f4977 Author: Johan Hovold Date: Tue Apr 4 09:25:14 2023 +0200 USB: dwc3: fix runtime pm imbalance on probe errors Make sure not to suspend the device when probe fails to avoid disabling clocks and phys multiple times. Fixes: 328082376aea ("usb: dwc3: fix runtime PM in error path") Cc: stable@vger.kernel.org # 4.8 Cc: Roger Quadros Acked-by: Thinh Nguyen Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230404072524.19014-2-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit 21d018b75f4f1c183be565d302fde7a01ae79fb0 Author: Fabrice Gasnier Date: Fri Apr 14 10:41:37 2023 +0200 ARM: dts: stm32: add USB OTG UTMI clock on stm32mp151 It's needed on STM32MP15, when using the integrated full-speed PHY. This clock is an output of USBPHYC, and the HS USBPHYC is not attached as PHY in this case (managed directly by dwc2 ggpio glue): &usbotg_hs { compatible = "st,stm32mp15-fsotg", "snps,dwc2"; pinctrl-names = "default"; pinctrl-0 = <&usbotg_hs_pins_a &usbotg_fs_dp_dm_pins_a>; vbus-supply = <&vbus_otg>; status = "okay"; }; USBPHYC clock output must be used, so it can be properly enabled as a clock provider. Without this, currently, when the dualport High-Speed USBPHYC isn't requested by either USBH or OTG, it remains uninitialized when probing OTG: OTG configured with full-speed PHY isn't properly clocked, resulting in error log like: [ 2.383138] dwc2 49000000.usb-otg: dwc2_core_reset: HANG! Soft Reset timeout GRSTCTL_CSFTRST. Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20230414084137.1050487-5-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 02329adeae1f92b0133cfc1a2b06645f4c496c1b Author: Fabrice Gasnier Date: Fri Apr 14 10:41:36 2023 +0200 usb: dwc2: platform: add support for utmi optional clock Add support for the utmi clock. It's needed on STM32MP15, when using the integrated full-speed PHY. This clock is an output of USBPHYC, but HS USBPHYC is not attached as PHY in this case: Full-Speed PHY is directly managed in dwc2 glue, through GGPIO register. Typical DT when using FS PHY &usbotg_hs { compatible = "st,stm32mp15-fsotg", "snps,dwc2"; pinctrl-names = "default"; pinctrl-0 = <&usbotg_hs_pins_a &usbotg_fs_dp_dm_pins_a>; vbus-supply = <&vbus_otg>; status = "okay"; }; In this configuration, USBPHYC clock output must be defined, so it can be properly enabled as a clock provider: clocks = <&rcc USBO_K>, <&usbphyc>; clock-names = "otg", "utmi"; Acked-by: Minas Harutyunyan Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20230414084137.1050487-4-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 28f75a39d8a878d9e8e57fd2aa0a1ad262d257bd Author: Fabrice Gasnier Date: Fri Apr 14 10:41:35 2023 +0200 dt-bindings: usb: dwc2: add utmi optional clock utmi clock is typically provided by PHY output. Add this optional clock, as the core could use other clocks depending on the SoC where it's used. This is needed on stm32mp15, when using the integrated full-speed PHY. Acked-by: Krzysztof Kozlowski Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20230414084137.1050487-3-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 236d835302bd4e11697dfe65eb24a219ea5c70eb Author: Fabrice Gasnier Date: Fri Apr 14 10:41:34 2023 +0200 usb: dwc2: improve error handling in __dwc2_lowlevel_hw_enable Add error handling in __dwc2_lowlevel_hw_enable() that may leave the clocks and regulators enabled upon error. Acked-by: Minas Harutyunyan Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20230414084137.1050487-2-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 6a14ffc05c60fb4d5b7beb95460ac5642293e03f Author: Chunfeng Yun Date: Fri Apr 7 14:24:06 2023 +0800 usb: xhci-mtk: add optional frame count clock Add optional clock frmcnt_ck used on 4nm or advanced process SoC Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20230407062406.12575-2-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 4076c4f37bd9ef8415a7ab6acb6e2b5d6fddaf05 Author: Chunfeng Yun Date: Fri Apr 7 14:24:05 2023 +0800 dt-bindings: usb: mtk-xhci: add an optional frame count clock Add optional clock 'frmcnt_ck' used on 4nm or advanced process SoC Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20230407062406.12575-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 9134c1fd05034dd29a1a2f010abd178af409171e Author: Stanley Chang Date: Fri Apr 7 14:07:31 2023 +0800 usb: xhci: plat: Add USB 3.0 phy support For Realtek SoC, the usb xhci uses different driver for u2phy and u3phy. Therefore, add a hook to retrieve the USB 3.0 PHY to XHCI plat. Signed-off-by: Stanley Chang Link: https://lore.kernel.org/r/20230407060731.20537-1-stanley_chang@realtek.com Signed-off-by: Greg Kroah-Hartman commit f3588ea40aa17273c3303789b1828b3aa6b80748 Author: Nobuhiro Iwamatsu Date: Thu Apr 6 08:46:05 2023 +0900 usb: host: xhci-plat: Use dev_is_pci() helper Use common dev_is_pci() helper for checking PCI devices. And if CONFIG_PCI is not defined, dev_is_pci returns false. Therefore, CONFIG_PCI is also unnecessary, so remove it. Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20230405234605.2310155-1-nobuhiro1.iwamatsu@toshiba.co.jp Signed-off-by: Greg Kroah-Hartman commit 735baf1b23458f71a8b15cb924af22c9ff9cd125 Author: Johan Hovold Date: Wed Apr 5 11:03:42 2023 +0200 xhci: fix debugfs register accesses while suspended Wire up the debugfs regset device pointer so that the controller is resumed before accessing registers to avoid crashing or locking up if it happens to be runtime suspended. Fixes: 02b6fdc2a153 ("usb: xhci: Add debugfs interface for xHCI driver") Cc: stable@vger.kernel.org # 4.15: 30332eeefec8: debugfs: regset32: Add Runtime PM support Cc: stable@vger.kernel.org # 4.15 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230405090342.7363-1-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman commit 091b813d3d1078afba6ed74fa8df2a5bbc9bf124 Author: Rob Herring Date: Mon Apr 10 18:26:38 2023 -0500 usb: Add explicit of.h of_platform.h include Several USB drivers use of_platform_* functions which are declared in of_platform.h. of_platform.h gets implicitly included by of_device.h, but that is going to be removed soon. Nothing else depends on of_device.h so it can be dropped. Acked-by: Thinh Nguyen Acked-by: Chunfeng Yun Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230410232639.1561152-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit a00e9e4319c2a8a8b166da028292de83190e39a4 Author: Christophe JAILLET Date: Tue Apr 18 23:47:38 2023 +0200 KVM: arm64: Use the bitmap API to allocate bitmaps Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/3c5043731db4d3635383e9326bc7e98e25de3288.1681854412.git.christophe.jaillet@wanadoo.fr commit 4be8ddb48b1b6c6067fb59c846b9c6e19d6efe14 Author: Christophe JAILLET Date: Tue Apr 18 23:47:37 2023 +0200 KVM: arm64: Slightly optimize flush_context() bitmap_zero() is faster than bitmap_clear(), so use it to save a few cycles. Signed-off-by: Christophe JAILLET Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/97bf2743f3a302b3066aced02218b9da60690dd3.1681854412.git.christophe.jaillet@wanadoo.fr commit a189884bdc9238aeba941c50f02e25eb584fafed Author: Reiji Watanabe Date: Tue Apr 18 19:18:52 2023 -0700 KVM: arm64: Have kvm_psci_vcpu_on() use WRITE_ONCE() to update mp_state All accessors of kvm_vcpu_arch::mp_state should be {READ,WRITE}_ONCE(), since readers of the mp_state don't acquire the mp_state_lock. Nonetheless, kvm_psci_vcpu_on() updates the mp_state without using WRITE_ONCE(). So, fix the code to update the mp_state using WRITE_ONCE. Signed-off-by: Reiji Watanabe Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230419021852.2981107-3-reijiw@google.com commit 4ff910be01c0ca28c2ea8b354dd47a3a17524489 Author: Reiji Watanabe Date: Tue Apr 18 19:18:51 2023 -0700 KVM: arm64: Acquire mp_state_lock in kvm_arch_vcpu_ioctl_vcpu_init() kvm_arch_vcpu_ioctl_vcpu_init() doesn't acquire mp_state_lock when setting the mp_state to KVM_MP_STATE_RUNNABLE. Fix the code to acquire the lock. Signed-off-by: Reiji Watanabe [maz: minor refactor] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230419021852.2981107-2-reijiw@google.com commit 9d9a7614a75989a2356c8d2db736ce1a69d92fe4 Author: Jon Hunter Date: Wed Apr 5 19:18:54 2023 +0100 usb: gadget: tegra-xudc: Remove unneeded return variable The 'ret' variable in the function tegra_xudc_gadget_vbus_draw() is not needed and so remove this variable. Reviewed-by: Thierry Reding Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20230405181854.42355-2-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 5629d31955297ca47b9283c64fff70f2f34aa528 Author: Jon Hunter Date: Wed Apr 5 19:18:53 2023 +0100 usb: gadget: tegra-xudc: Fix crash in vbus_draw Commit ac82b56bda5f ("usb: gadget: tegra-xudc: Add vbus_draw support") populated the vbus_draw callback for the Tegra XUDC driver. The function tegra_xudc_gadget_vbus_draw(), that was added by this commit, assumes that the pointer 'curr_usbphy' has been initialised, which is not always the case because this is only initialised when the USB role is updated. Fix this crash, by checking that the 'curr_usbphy' is valid before dereferencing. Fixes: ac82b56bda5f ("usb: gadget: tegra-xudc: Add vbus_draw support") Reviewed-by: Thierry Reding Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20230405181854.42355-1-jonathanh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 9e6ca3e6ff4a463454d35c8747aa08198628f4d7 Merge: ced7c981f382f a095edfc15f08 Author: Greg Kroah-Hartman Date: Thu Apr 20 08:59:38 2023 +0200 Merge tag 'usb-serial-6.4-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 6.4-rc1 Here are the USB-serial updates for 6.4-rc1; a new modem device id and an unused-function cleanup. All have been in linux-next with no reported issues. * tag 'usb-serial-6.4-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add UNISOC vendor and TOZED LT70C product USB: serial: quatech2: remove unused qt2_setdevice function commit 780c69830ec6b27e0224586ce26bc89552fcf163 Merge: 2ddade3229256 5ff54dedf35bf Author: Alexei Starovoitov Date: Wed Apr 19 21:29:39 2023 -0700 Merge branch 'Access variable length array relaxed for integer type' Feng zhou says: ==================== From: Feng Zhou Add support for integer type of accessing variable length array. Add a selftest to check it. ==================== Signed-off-by: Alexei Starovoitov commit 5ff54dedf35bfee7a16eb9f8fb7ecadf7d5564cb Author: Feng Zhou Date: Thu Apr 20 11:27:35 2023 +0800 selftests/bpf: Add test to access integer type of variable array Add prog test for accessing integer type of variable array in tracing program. In addition, hook load_balance function to access sd->span[0], only to confirm whether the load is successful. Because there is no direct way to trigger load_balance call. Co-developed-by: Chengming Zhou Signed-off-by: Chengming Zhou Signed-off-by: Feng Zhou Link: https://lore.kernel.org/r/20230420032735.27760-3-zhoufeng.zf@bytedance.com Signed-off-by: Alexei Starovoitov commit 2569c7b8726fc06d946a4f999fb1be15b68f3f3c Author: Feng Zhou Date: Thu Apr 20 11:27:34 2023 +0800 bpf: support access variable length array of integer type After this commit: bpf: Support variable length array in tracing programs (9c5f8a1008a1) Trace programs can access variable length array, but for structure type. This patch adds support for integer type. Example: Hook load_balance struct sched_domain { ... unsigned long span[]; } The access: sd->span[0]. Co-developed-by: Chengming Zhou Signed-off-by: Chengming Zhou Signed-off-by: Feng Zhou Link: https://lore.kernel.org/r/20230420032735.27760-2-zhoufeng.zf@bytedance.com Signed-off-by: Alexei Starovoitov commit 519fe1bae7e20fc4e7f179d50b6102b49980e85d Author: Josh Triplett Date: Sun Apr 2 11:37:42 2023 +0900 ext4: Add a uapi header for ext4 userspace APIs Create a uapi header include/uapi/linux/ext4.h, move the ioctls and associated data structures to the uapi header, and include it from fs/ext4/ext4.h. Signed-off-by: Josh Triplett Link: https://lore.kernel.org/r/680175260970d977d16b5cc7e7606483ec99eb63.1680402881.git.josh@joshtriplett.org Signed-off-by: Theodore Ts'o commit 17809d3cf801374d7c23101800770ea34951f3c8 Author: wuchi Date: Sat Apr 1 15:53:03 2023 +0800 ext4: remove useless conditional branch code It's ok because the code will be optimized by the compiler, just try to simple the code. Signed-off-by: wuchi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230401075303.45206-1-wuchi.zero@gmail.com Signed-off-by: Theodore Ts'o commit 8ae56b4e82ee29b5cc1fbea8b00a0a7e0758f3c2 Author: Tom Rix Date: Thu Mar 16 16:48:31 2023 -0400 ext4: remove unneeded check of nr_to_submit cppcheck reports fs/ext4/page-io.c:516:51: style: Condition 'nr_to_submit' is always true [knownConditionTrueFalse] if (fscrypt_inode_uses_fs_layer_crypto(inode) && nr_to_submit) { ^ This earlier check to bail, makes this check unncessary /* Nothing to submit? Just unlock the page... */ if (!nr_to_submit) return 0; Signed-off-by: Tom Rix Fixes: dff4ac75eeee ("ext4: move keep_towrite handling to ext4_bio_write_page()") Reviewed-by: Eric Biggers Link: https://lore.kernel.org/r/20230316204831.2472537-1-trix@redhat.com Signed-off-by: Theodore Ts'o commit 228c7a95534b438859d6cc068691164bd705a9c8 Author: Michael Ellerman Date: Wed Mar 29 18:23:33 2023 +1100 powerpc/Makefile: Don't prefix archhelp commands with "@" It's not necessary to prefix every command in archhelp with "@" (to suppress echoing the command), because that is done by the top level Makefile when it evaluates archhelp. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230329072334.2023357-1-mpe@ellerman.id.au commit 18b5e7170a33a985dc842ab24a690fa6ff0f50e4 Author: Michael Ellerman Date: Fri Apr 7 00:45:35 2023 +1000 powerpc/pseries: Always inline functions called from cpuidle Code in the idle path is not allowed to be instrumented because RCU is disabled, see commit 0e985e9d2286 ("cpuidle: Add comments about noinstr/__cpuidle usage"). Force inlining of the inline functions called from cpuidle, to ensure they are not emitted out-of-line and then available for tracing. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230406144535.3786008-4-mpe@ellerman.id.au commit 88990745c934b14359e526033c5bc1daaf15267c Author: Michael Ellerman Date: Fri Apr 7 00:45:34 2023 +1000 cpuidle: pseries: Mark ->enter() functions as __cpuidle Code in the idle path is not allowed to be instrumented because RCU is disabled, see commit 0e985e9d2286 ("cpuidle: Add comments about noinstr/__cpuidle usage"). Mark the cpuidle ->enter() callbacks as __cpuidle and use the raw_local_irq_*() routines to ensure that is the case. Reported-by: Sachin Sant Link: https://lore.kernel.org/all/4C073F6A-C812-4C4A-BB7A-ECD10B75FB88@linux.ibm.com/ Suggested-by: Peter Zijlstra Tested-by: Sachin Sant Signed-off-by: Michael Ellerman Link: https://msgid.link/20230406144535.3786008-3-mpe@ellerman.id.au commit 6fee130204650515af80c2786176da0fe7e94482 Author: Michael Ellerman Date: Fri Apr 7 00:45:33 2023 +1000 powerpc/64: Don't call trace_hardirqs_on() in prep_irq_for_idle() Since commit a01353cf1896 ("cpuidle: Fix ct_idle_*() usage"), the cpuidle entry code calls trace_hardirqs_on() (actually trace_hardirqs_on_prepare()) in ct_cpuidle_enter() before calling into the cpuidle driver. Suggested-by: Peter Zijlstra Signed-off-by: Michael Ellerman Link: https://msgid.link/20230406144535.3786008-2-mpe@ellerman.id.au commit 7640854d966449e5befeff02c45c799cfc3d4fcf Author: Michael Ellerman Date: Fri Apr 7 00:45:32 2023 +1000 powerpc/64: Mark prep_irq_for_idle() __cpuidle Code in the idle path is not allowed to be instrumented because RCU is disabled, see commit 0e985e9d2286 ("cpuidle: Add comments about noinstr/__cpuidle usage"). Mark prep_irq_for_idle() __cpuidle, which is equivalent to noinstr, to enforce that. Suggested-by: Peter Zijlstra Signed-off-by: Michael Ellerman Link: https://msgid.link/20230406144535.3786008-1-mpe@ellerman.id.au commit e5b6634aa1bcbd43120b2fd6f15780f00e9e7f66 Author: Michael Ellerman Date: Thu Apr 6 22:21:18 2023 +1000 powerpc/irq: Mark check_return_regs_valid() notrace check_return_regs_valid() is called from the middle of the irq exit handling, which is all notrace, so mark it notrace also. Reported-by: Sachin Sant Link: https://lore.kernel.org/all/4C073F6A-C812-4C4A-BB7A-ECD10B75FB88@linux.ibm.com/ Signed-off-by: Michael Ellerman Link: https://msgid.link/20230406122118.3760344-1-mpe@ellerman.id.au commit 9ab9de2f3aa99ab6245203236d66a057d73b7e9f Author: Michael Ellerman Date: Tue Apr 11 20:28:38 2023 +1000 powerpc/corenet: Add PPC_QEMU_E500 to corenet configs Add PPC_QEMU_E500 to corenet_base.config, which is then used to generate corenet64_smp_defconfig and corenet32_smp_defconfig. That then allows both those configs to build kernels that boot in qemu using the ppce500 machine type and respectively -cpu e5500 or -cpu e500mc. The code that is added by PPC_QEMU_E500 just defines another machine with a probe function that recognises qemu, so there should be no change when booting on actual hardware supported by CORENET_GENERIC. The increase in vmlinux size is less than 1KB. Signed-off-by: Michael Ellerman Link: https://msgid.link/20230411102838.512859-1-mpe@ellerman.id.au commit ad46ad2d853daf082f742c9654da84e3d2a46765 Author: Paul Gortmaker Date: Fri Feb 24 15:49:59 2023 -0500 powerpc: drop MPC8272-ADS and PowerQUICC II FADS shared code. With the two platforms depending on this shared code, and no others, we can remove the orphaned code and Kconfigs Signed-off-by: Paul Gortmaker Signed-off-by: Michael Ellerman Link: https://msgid.link/20230224204959.17425-4-paul.gortmaker@windriver.com commit 859b21a008ebcc7fd876f50738f63750d46b5296 Author: Paul Gortmaker Date: Fri Feb 24 15:49:58 2023 -0500 powerpc: drop PowerQUICC II Family ADS platform support Based on documentation revision dates, this MPC82xx pq2fads system predates the MPC8272-ADS variant by about a year and only has 1/2 the amount of RAM (32MB) -- largely making it useless with a modern v6.x kernel from today. Similar to the MPC8272-ADS the pq2fads also supported other 82xx CPU variants, had 8MB flash, and like the 8272 ADS platform, was on a fairly large PCB in order to have space for breakout connectors for all features. These 82xx platforms are two decades old, and originally made for a small group of industry related people in order to assist in new OEM board designs. Given that, it makes sense to remove support today. Signed-off-by: Paul Gortmaker Signed-off-by: Michael Ellerman Link: https://msgid.link/20230224204959.17425-3-paul.gortmaker@windriver.com commit 33777a4e9bb93f66ac2511d99ec66ab50f1a04bc Author: Paul Gortmaker Date: Fri Feb 24 15:49:57 2023 -0500 powerpc: drop MPC8272_ADS platform support The MPC8272-ADS also supported other 82xx CPU variants, had 64MB RAM, 8MB flash, and like the 85xx ADS platforms, was on a fairly large PCB in order to have space for breakout connectors for all the features. These 82xx platforms are two decades old, and originally made for a small group of industry related people in order to assist in new OEM board designs. Given that, it makes sense to remove support today. Signed-off-by: Paul Gortmaker Signed-off-by: Michael Ellerman Link: https://msgid.link/20230224204959.17425-2-paul.gortmaker@windriver.com commit 248667f8bbded6c00a300dbcabe0d15b3d0de9ab Author: Paul Gortmaker Date: Sat Feb 25 15:13:18 2023 -0500 powerpc: drop HPCD/MPC8610 evaluation platform support This evaluation platform was essentially a single core 8641 with integrated graphics/display support - in an effort to reduce chip count on kiosk and similar applications. Compared to other evaluation platforms considered for removal in other recent commits, this platform was relatively rare. Unlike all the other 10+ platforms, I couldn't find any documentation on it - just a link to downloading the 2007 era BSP in "LTIB" format as was done back then. With all that in mind, it seems prudent to remove it here in 2023. Signed-off-by: Paul Gortmaker [mpe: Drop stale reference to MPC8610_HPCD in 86xx/Kconfig] Signed-off-by: Michael Ellerman Link: https://msgid.link/20230225201318.3682-4-paul.gortmaker@windriver.com commit c1d85f3f75e3c8391134b67aefc8d029b26fa38e Author: Paul Gortmaker Date: Sat Feb 25 15:13:17 2023 -0500 powerpc: drop HPC-NET/MPC8641D evaluation platform support There is no denying that this was an interesting platform in its day. Access to a SMP powerpc platform became a bit more obtainable for folks in the BSP industry in the 2007 era, thanks to this platform. Add to that the move to the black Antec case vs. the generic white 2005 era case of the MPC8548CDS or the retro 1950s 1/2 height horizontal case of the HPC II, and it was pretty interesting to people like myself then. However, like all the other evaluation platforms, the overall system was complex out of necessity, as it tried to showcase all possible features and use-cases. That included an AMP option, where you could run two bootloaders and two kernels over two serial consoles. Peripheral sharing got a bit more tricky when you got to the hard disk and similar. In any case we still have the same circumstance. A relatively rare and expensive evaluation platform that is now 15+ years old and not out there in large numbers in the general public. Removal in 2023 just makes sense. Signed-off-by: Paul Gortmaker Signed-off-by: Michael Ellerman Link: https://msgid.link/20230225201318.3682-3-paul.gortmaker@windriver.com commit f03425a5fd838a841138e3be586c1245fa9c78d6 Author: Paul Gortmaker Date: Sat Feb 25 15:13:16 2023 -0500 powerpc: drop HPC II (MPC7448) evaluation platform support. This was an interesting platform - it was the 1st instance of a respin of earlier 130nm 74xx CPUs on 90nm and systems using MPC7448 were positioned as a rack server platform solution. Given that, the evaluation platform (at least the one I had) was shipped in a horizontal 1/2 height Antec desktop case with retro styling and colours, despite the fact the docs explicitly stated that the HPC II is not a desktop machine (noting it had no gfx or legacy PC I/O support). Historic trivia aside, this was the 1st introduction of the e600 procfam as an evolution from the earlier G4. However even with the claim to being "1st e600" it seems the 2005+ era was turning its attention to multicore support and from my memory this poor guy was quickly overshadowed by the dual core MPC8641D. All that aside, we are once again looking at 15+ year old evaluation platforms that were not widely distributed, so 2023 removal makes sense. Signed-off-by: Paul Gortmaker Signed-off-by: Michael Ellerman Link: https://msgid.link/20230225201318.3682-2-paul.gortmaker@windriver.com commit b8fa3af2dbcb0c84270d4d2ecf54a088f7c90701 Author: Paul Gortmaker Date: Thu Apr 13 11:08:58 2023 +1000 powerpc: drop MPC832x_MDS platform support This final variant in the e300 family of Modular Development System (MDS) in this series was actually aimed at feature reduction - things like floating point and ethernet were removed in order to make for a lower power and lower cost system. Like all the MDS systems, it was meant as a vehicle to get the CPU out early to hardware OEMs so software and board development could take place in parallel. These were made in limited numbers and availability preference was given to partners who were planning to make their own boards. Given that the whole reason for existence was to assist in enabling new board designs [not happening for 10+ years], and that they weren't generally available, and that the hardware wasn't really hobbyist friendly even for retro computing, it makes sense to retire the support for this particular platform. Signed-off-by: Paul Gortmaker Acked-by: Li Yang [mpe: Drop stale reference to MPC832x_MDS in arch/powerpc/boot/Makefile] Signed-off-by: Michael Ellerman Link: https://msgid.link/20230220115913.25811-5-paul.gortmaker@windriver.com commit aa572079633c293882d8fa3973bf6d8c27eb430f Author: Paul Gortmaker Date: Thu Apr 13 11:08:57 2023 +1000 powerpc: drop MPC837x_MDS platform support This next evolutionary step in the e300 family of Modular Development System (MDS) still has, at its core component, a full length card with a PCI edge. No case. Serial and network connectors were on card, so it could optionally be fitted with plastic stand-offs and run stand-alone off a power brick. This is very similar to the MPC834x_MDS and MPC836x_MDS removed in the prior commits, but with this board variant as yet another evolutionary step. SATA and PCI-e were now available. But overall the form factor and design goals were unchanged. Like all the MDS systems, it was meant as a vehicle to get the CPU out early to hardware OEMs so software and board development could take place in parallel. These were made in limited numbers and availability preference was given to partners who were planning to make their own boards. Given that the whole reason for existence was to assist in enabling new board designs [not happening for 10+ years], and that they weren't generally available, and that the hardware wasn't really hobbyist friendly even for retro computing, it makes sense to retire the support for this particular platform. Signed-off-by: Paul Gortmaker Acked-by: Li Yang Signed-off-by: Michael Ellerman Link: https://msgid.link/20230220115913.25811-4-paul.gortmaker@windriver.com commit 7840b08aeccbd4d46261a6d5c27699d6939f712e Author: Paul Gortmaker Date: Thu Apr 13 11:08:55 2023 +1000 powerpc: drop MPC836x_MDS platform support This 2006 era Modular Development System (MDS) has, at its core component, a full length card with a PCI edge. No case. Serial and network connectors were on card, so it could optionally be fitted with plastic stand-offs and run stand-alone off a power brick. This is very similar to the MPC834x_MDS removed in the prior commit, but with this board variant as an evolutionary step. DDR2 was now an option, and the card edge was revised down to PCI-32 as PCI-64 never got traction. But overall the form factor and design goals were unchanged. Like all the MDS systems, it was meant as a vehicle to get the CPU out early to hardware OEMs so software and board development could take place in parallel. To that end, the BGA CPU was held in place with a mechanical spring loaded pressure assembly (vs. solder) so that early rev silicon could be replaced in the field. Not for COTS deployment! These were made in limited numbers and availability preference was given to partners who were planning to make their own boards. Given that the whole reason for existence was to assist in enabling new board designs [not happening for 10+ years], and that they weren't generally available, and that the hardware wasn't really hobbyist friendly even for retro computing, it makes sense to retire the support for this particular platform. Signed-off-by: Paul Gortmaker Acked-by: Li Yang [mpe: Drop stale reference to MPC836x_MDS in arch/powerpc/boot/Makefile] Signed-off-by: Michael Ellerman Link: https://msgid.link/20230220115913.25811-3-paul.gortmaker@windriver.com commit da03101799579f6477feb47a3aefcdb2e2379da1 Author: Paul Gortmaker Date: Thu Apr 13 11:08:53 2023 +1000 powerpc: drop MPC834x_MDS platform support This 2006 era Modular Development System (MDS) has, at its core component, a full length card with a PCI-64 edge. No case. Serial and network connectors were on card, so it could optionally be fitted with plastic stand-offs and run stand-alone off a power brick. Like all the MDS systems, it was meant as a vehicle to get the CPU out early to hardware OEMs so software and board development could take place in parallel. To that end, the BGA CPU was held in place with a mechanical spring loaded pressure assembly (vs. solder) so that early rev silicon could be replaced in the field. Not for COTS deployment! These were made in limited numbers and availability preference was given to partners who were planning to make their own boards, like our WR SBC8349 [since retired in v4.18 (2017, commit 3bc6cf5a86e5)] Given that the whole reason for existence was to assist in enabling new board designs [not happening for 10+ years], and that they weren't generally available, and that the hardware wasn't really hobbyist friendly even for retro computing, it makes sense to retire the support for this platform. Signed-off-by: Paul Gortmaker Acked-by: Li Yang Signed-off-by: Michael Ellerman Link: https://msgid.link/20230220115913.25811-2-paul.gortmaker@windriver.com commit df9cad09493808dca7d16a2fbcac1a78e8d412af Author: Andrew Donnellan Date: Fri Feb 24 15:10:12 2023 +1100 powerpc/pseries: Add FW_FEATURE_PLPKS feature flag Add a firmware feature flag, FW_FEATURE_PLPKS, to indicate availability of Platform KeyStore related hcalls. Check this flag in plpks_is_available() and pseries_plpks_init() before trying to make an hcall. Suggested-by: Michael Ellerman Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://msgid.link/20230224041012.772648-1-ajd@linux.ibm.com commit ae7312c09014fceb782a92cfb934e973f08b338f Author: Benjamin Gray Date: Thu Apr 6 14:33:20 2023 +1000 selftests/powerpc/dscr: Restore timeout to DSCR selftests Reducing the time taken by dscr_sysfs_test.c allows restoring the default timeout, which was removed in commit 850507f30c38 ("selftests/powerpc: Turn off timeout setting for benchmarks, dscr, signal, tm") because that test took too long. Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://msgid.link/20230406043320.125138-8-bgray@linux.ibm.com commit c14a9d0a79d4fb83c4e9e8cadc5cb094f41d01d0 Author: Benjamin Gray Date: Thu Apr 6 14:33:19 2023 +1000 selftests/powerpc/dscr: Speed up DSCR sysfs tests This test case is extremely slow, taking around a minute compared to most of the other DSCR tests taking a second at most. Perf shows most time is spent by the kernel switching to each CPU it reads in /sys/devices/system/cpu. This switching is an unavoidable consequnce of reading all the .../cpuN/dscr values. Remove the outer iteration loop from this test case, reducing the reads from 1600 to 16. This still updates the DSCR 16 times and verifies on every CPU each time, so I do not expect the lower coverage to be meaningful. The speedup is significant: back down to ~1 second like the other tests. Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://msgid.link/20230406043320.125138-7-bgray@linux.ibm.com commit 3067b89ab62305c54ec15b00a2c4dbaf64809c59 Author: Benjamin Gray Date: Thu Apr 6 14:33:18 2023 +1000 selftests/powerpc/dscr: Improve DSCR explicit random test case The tests currently have a single writer thread updating the system DSCR with a 1/1000 chance looped only 100 times. So only around one in 10 runs actually do anything. * Add multiple threads to the dscr_explicit_random_test case. * Use a barrier to make all the threads start work as simultaneously as possible. * Use a rwlock and make all threads have a reasonable chance to write to the DSCR on each iteration. PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP is used to prevent writers from starving while all the other threads keep reading. Logging the reads/writes shows a decent mix across the whole test. * Allow all threads a chance to write. * Make the chance of writing more likely. Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://msgid.link/20230406043320.125138-6-bgray@linux.ibm.com commit fda8158870063b99b88a0904bbb95188973b4297 Author: Benjamin Gray Date: Thu Apr 6 14:33:17 2023 +1000 selftests/powerpc/dscr: Add lockstep test cases to DSCR explicit tests Add new cases to the relevant tests that use explicitly synchronized threads to test the behaviour across context switches with less randomness. By locking the participants to the same CPU we guarantee a context switch occurs each time they make progress, which is a likely failure point if the kernel is not tracking the thread local DSCR correctly. The random case is left in to keep exercising potential edge cases. Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://msgid.link/20230406043320.125138-5-bgray@linux.ibm.com commit 6ff4dc25483f3f49d1db48af28d4c485fc77bd21 Author: Benjamin Gray Date: Thu Apr 6 14:33:16 2023 +1000 selftests/powerpc: Allow bind_to_cpu() to automatically pick CPU All current users of bind_to_cpu() don't care _which_ CPU they get, just that they are bound to a single free one. So alter the interface to 1. Accept a BIND_CPU_ANY value that tells it to automatically pick a CPU 2. Return the picked CPU And convert all these users to bind_to_cpu(BIND_CPU_ANY). Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://msgid.link/20230406043320.125138-4-bgray@linux.ibm.com commit c97b2fc6627e1c26a3a84633e135322918a1e592 Author: Benjamin Gray Date: Thu Apr 6 14:33:15 2023 +1000 selftests/powerpc: Move bind_to_cpu() to utils.h This function will be useful in the DSCR test patches later in this series, so promote it to be shared by all powerpc selftests. Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://msgid.link/20230406043320.125138-3-bgray@linux.ibm.com commit 15f0c2601e141e3c01c8dc3368b81181bc1c9228 Author: Benjamin Gray Date: Thu Apr 6 14:33:14 2023 +1000 selftests/powerpc/dscr: Correct typos Correct a couple of typos while working on other improvements to the DSCR tests. Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://msgid.link/20230406043320.125138-2-bgray@linux.ibm.com commit 92cb1eff88a67e95daaf39eccf777272e85398c6 Author: Joel Stanley Date: Wed Apr 5 14:23:16 2023 +0930 powerpc: Remove duplicate SPRN_HSRR definitions There are two copies of these defines. Keep the older ones as they have associated bit definitions. Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman Link: https://msgid.link/20230405045316.95003-1-joel@jms.id.au commit 77e69ee7ce0715c39b9a0cde68ff44fe467435ef Author: Nicholas Piggin Date: Sat Apr 8 12:17:52 2023 +1000 powerpc/64: modules support building with PCREL addresing Build modules using PCREL addressing when CONFIG_PPC_KERNEL_PCREL=y. - The module loader must handle several new relocation types: * R_PPC64_REL24_NOTOC is a function call handled like R_PPC_REL24, but does not restore r2 upon return. The external function call stub is changed to use pcrel addressing to load the function pointer rather than based on the module TOC. * R_PPC64_GOT_PCREL34 is a reference to external data. A GOT table must be built by hand, because the linker adds this during the final link (which is not done for kernel modules). The GOT table is built similarly to the way the external function call stub table is. This section is called .mygot because .got has a special meaning for the linker and can become upset. * R_PPC64_PCREL34 is used for local data addressing, but there is a special case where the percpu section is moved at load-time to the percpu area which is out of range of this relocation. This requires the PCREL34 relocations are converted to use GOT_PCREL34 addressing. Signed-off-by: Nicholas Piggin [mpe: Some coding style & formatting fixups] Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408021752.862660-7-npiggin@gmail.com commit 7e3a68be42e10f5fa5890e97afc0afd992355bc3 Author: Nicholas Piggin Date: Sat Apr 8 12:17:51 2023 +1000 powerpc/64: vmlinux support building with PCREL addresing PC-Relative or PCREL addressing is an extension to the ELF ABI which uses Power ISA v3.1 PC-relative instructions to calculate addresses, rather than the traditional TOC scheme. Add an option to build vmlinux using pcrel addressing. Modules continue to use TOC addressing. - TOC address helpers and r2 are poisoned with -1 when running vmlinux. r2 could be used for something useful once things are ironed out. - Assembly must call C functions with @notoc annotation, or the linker complains aobut a missing nop after the call. This is done with the CFUNC macro introduced earlier. - Boot: with the exception of prom_init, the execution branches to the kernel virtual address early in boot, before any addresses are generated, which ensures 34-bit pcrel addressing does not miss the high PAGE_OFFSET bits. TOC relative addressing has a similar requirement. prom_init does not go to the virtual address and its addresses should not carry over to the post-prom kernel. - Ftrace trampolines are converted from TOC addressing to pcrel addressing, including module ftrace trampolines that currently use the kernel TOC to find ftrace target functions. - BPF function prologue and function calling generation are converted from TOC to pcrel. - copypage_64.S has an interesting problem, prefixed instructions have alignment restrictions so the linker can add padding, which makes the assembler treat the difference between two local labels as non-constant even if alignment is arranged so padding is not required. This may need toolchain help to solve nicely, for now move the prefix instruction out of the alternate patch section to work around it. This reduces kernel text size by about 6%. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408021752.862660-6-npiggin@gmail.com commit 4e991e3c16a350d1eeffc100ce3fb25292596d03 Author: Nicholas Piggin Date: Sat Apr 8 12:17:50 2023 +1000 powerpc: add CFUNC assembly label annotation This macro is to be used in assembly where C functions are called. pcrel addressing mode requires branches to functions with a localentry value of 1 to have either a trailing nop or @notoc. This macro permits the latter without changing callers. Signed-off-by: Nicholas Piggin [mpe: Add dummy definitions to fix selftests build] Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408021752.862660-5-npiggin@gmail.com commit dc5dac748af9087e9240bd2ae6ae7db48d5360ae Author: Nicholas Piggin Date: Sat Apr 8 12:17:49 2023 +1000 powerpc/64: Add support to build with prefixed instructions Add an option to build kernel and module with prefixed instructions if the CPU and toolchain support it. This is not related to kernel support for userspace execution of prefixed instructions. Building with prefixed instructions breaks some extended inline asm memory addressing, for example it will provide immediates that exceed the range of simple load/store displacement. Whether this is a toolchain or a kernel asm problem remains to be seen. For now, these are replaced with simpler and less efficient direct register addressing when compiling with prefixed. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408021752.862660-4-npiggin@gmail.com commit b270bebd34e36fb69363d65e24b00a9d148903e8 Author: Nicholas Piggin Date: Sat Apr 8 12:17:48 2023 +1000 powerpc/64s: Run at the kernel virtual address earlier in boot This mostly consolidates the Book3E and Book3S behaviour in boot WRT executing from the physical or virtual address. Book3E sets up kernel virtual linear map in start_initialization_book3e and runs from the virtual linear alias after that. This change makes Book3S begin to execute from the virtual alias at the same point. Book3S can not use its MMU for that at this point, but when the MMU is disabled, the virtual linear address correctly aliases to physical memory because the top bits of the address are ignored with MMU disabled. Secondaries execute from the virtual address similarly early. This reduces the differences between subarchs, but the main motivation was to enable the PC-relative addressing ABI for Book3S, where pointer calculations must execute from the virtual address or the top bits of the pointer will be lost. This is similar to the requirement the TOC relative addressing already has that the TOC pointer use its virtual address. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408021752.862660-3-npiggin@gmail.com commit 4f18b9e6ca58440394e86a53bf1be0d8a1920bcd Author: Nicholas Piggin Date: Sat Apr 8 12:17:47 2023 +1000 powerpc/64: Move initial base and TOC pointer calculation A later change moves the non-prom case to run at the virtual address earlier, which calls for virtual TOC and kernel base. Split these two calculations for prom and non-prom to make that change simpler. Signed-off-by: Nicholas Piggin [mpe: Retain relative_toc call for start_initialization_book3e] Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408021752.862660-2-npiggin@gmail.com commit 40f7b523e31fd68163d9dfe639f2f34b6a726ecd Author: Pali Rohár Date: Sat Apr 8 16:01:22 2023 +0200 powerpc: dts: turris1x.dts: Remove "fsl,P2020RDB-PC" compatible string "fsl,P2020RDB-PC" compatible string was present in Turris 1.x DTS file just because Linux kernel required it for proper detection of P2020 processor during boot. This was quite a hack as CZ.NIC Turris 1.x is not compatible with Freescale P2020-RDB-PC board. Now when kernel has generic unified support for boards with P2020 processors, there is no need to have this "hack" in turris1x.dts file. So remove incorrect "fsl,P2020RDB-PC" compatible string from turris1x.dts. Signed-off-by: Pali Rohár Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408140122.25293-14-pali@kernel.org commit b5340a094b5c753ee3490716bcd86546dfd3e078 Author: Pali Rohár Date: Sat Apr 8 16:01:21 2023 +0200 powerpc/85xx: p2020: Enable boards by new config option CONFIG_PPC_P2020 Generic unified P2020 machine description which supports all P2020-based boards is now in separate file p2020.c. So create a separate config option CONFIG_PPC_P2020 for it. Previously machine descriptions for P2020 boards were enabled by CONFIG_MPC85xx_DS or CONFIG_MPC85xx_RDB option. So set CONFIG_PPC_P2020 to be enabled by default when one of those option is enabled. This allows to compile support for P2020 boards without need to have enabled support for older mpc85xx boards. And to compile kernel for old mpc85xx boards without having enabled support for new P2020 boards. Signed-off-by: Pali Rohár Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408140122.25293-13-pali@kernel.org commit 1a170efec56ba4707cd33e711dbafb60b7f94626 Author: Pali Rohár Date: Sat Apr 8 16:01:20 2023 +0200 powerpc/85xx: p2020: Define just one machine description Combine machine descriptions and code of all P2020 boards into just one generic unified P2020 machine description. This allows kernel to boot on any P2020-based board with P2020 DTS file without need to patch kernel and define a new machine description in 85xx powerpc platform directory. Signed-off-by: Pali Rohár Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408140122.25293-12-pali@kernel.org commit 7d8ae6e081428699999c9d128c4e9d3927c1da03 Author: Pali Rohár Date: Sat Apr 8 16:01:19 2023 +0200 powerpc/85xx: p2020: Unify .setup_arch and .init_IRQ callbacks Make just one .setup_arch and one .init_IRQ callback implementation for all P2020 board code. This deduplicate repeated and same code. Signed-off-by: Pali Rohár Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408140122.25293-11-pali@kernel.org commit 92189c902c2e2f8c0d4238310686e93da99156b5 Author: Pali Rohár Date: Sat Apr 8 16:01:18 2023 +0200 powerpc/85xx: mpc85xx_ds: Move i8259 code into own file In order to share mpc85xx i8259 code between DS and P2020. Prefix i8259 debug and error messages by i8259 word. Signed-off-by: Pali Rohár Signed-off-by: Christophe Leroy [mpe: Fix some coding style warnings in the moved code] Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408140122.25293-10-pali@kernel.org commit e1f2750edc4afebb966a229b797fc89b98ee6098 Author: Linus Torvalds Date: Wed Apr 19 19:09:52 2023 -0700 x86: remove 'zerorest' argument from __copy_user_nocache() Every caller passes in zero, meaning they don't want any partial copy to zero the remainder of the destination buffer. Which is just as well, because the implementation of that function didn't actually even look at that argument, and wasn't even aware it existed, although some misleading comments did mention it still. The 'zerorest' thing is a historical artifact of how "copy_from_user()" worked, in that it would zero the rest of the kernel buffer that it copied into. That zeroing still exists, but it's long since been moved to generic code, and the raw architecture-specific code doesn't do it. See _copy_from_user() in lib/usercopy.c for this all. However, while __copy_user_nocache() shares some history and superficial other similarities with copy_from_user(), it is in many ways also very different. In particular, while the code makes it *look* similar to the generic user copy functions that can copy both to and from user space, and take faults on both reads and writes as a result, __copy_user_nocache() does no such thing at all. __copy_user_nocache() always copies to kernel space, and will never take a page fault on the destination. What *can* happen, though, is that the non-temporal stores take a machine check because one of the use cases is for writing to stable memory, and any memory errors would then take synchronous faults. So __copy_user_nocache() does look a lot like copy_from_user(), but has faulting behavior that is more akin to our old copy_in_user() (which no longer exists, but copied from user space to user space and could fault on both source and destination). And it very much does not have the "zero the end of the destination buffer", since a problem with the destination buffer is very possibly the very source of the partial copy. So this whole thing was just a confusing historical artifact from having shared some code with a completely different function with completely different use cases. Signed-off-by: Linus Torvalds commit a5962e0a8b7b0da2350b4baeefaf7dfa3377bc89 Merge: f1836a424518a 88232ec1ec5ec Author: Jakub Kicinski Date: Wed Apr 19 18:48:50 2023 -0700 Merge branch 'another-crack-at-a-handshake-upcall-mechanism' Chuck Lever says: ==================== Another crack at a handshake upcall mechanism Here is v10 of a series to add generic support for transport layer security handshake on behalf of kernel socket consumers (user space consumers use a security library directly, of course). A summary of the purpose of these patches is archived here: https://lore.kernel.org/netdev/1DE06BB1-6BA9-4DB4-B2AA-07DE532963D6@oracle.com/ The first patch in the series applies to the top-level .gitignore file to address the build warnings reported a few days ago. I intend to submit that separately. I'd like you to consider taking the rest of this series for v6.4. The full patch set to support SunRPC with TLSv1.3 is available in the topic-rpc-with-tls-upcall branch here, based on net-next/main: https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git This patch set includes support for in-transit confidentiality and peer authentication for both the Linux NFS client and server. A user space handshake agent for TLSv1.3 to go along with the kernel patches is available in the "main" branch here: https://github.com/oracle/ktls-utils ==================== Link: https://lore.kernel.org/r/168174169259.9520.1911007910797225963.stgit@91.116.238.104.host.secureserver.net Signed-off-by: Jakub Kicinski commit 88232ec1ec5ecf4aa5de439cff3d5e2b7adcac93 Author: Chuck Lever Date: Mon Apr 17 10:32:39 2023 -0400 net/handshake: Add Kunit tests for the handshake consumer API These verify the API contracts and help exercise lifetime rules for consumer sockets and handshake_req structures. One way to run these tests: ./tools/testing/kunit/kunit.py run --kunitconfig ./net/handshake/.kunitconfig Signed-off-by: Chuck Lever Signed-off-by: Jakub Kicinski commit 2fd5532044a89d2403b543520b4902e196f7d165 Author: Chuck Lever Date: Mon Apr 17 10:32:33 2023 -0400 net/handshake: Add a kernel API for requesting a TLSv1.3 handshake To enable kernel consumers of TLS to request a TLS handshake, add support to net/handshake/ to request a handshake upcall. This patch also acts as a template for adding handshake upcall support for other kernel transport layer security providers. Signed-off-by: Chuck Lever Signed-off-by: Jakub Kicinski commit 3b3009ea8abb713b022d94fba95ec270cf6e7eae Author: Chuck Lever Date: Mon Apr 17 10:32:26 2023 -0400 net/handshake: Create a NETLINK service for handling handshake requests When a kernel consumer needs a transport layer security session, it first needs a handshake to negotiate and establish a session. This negotiation can be done in user space via one of the several existing library implementations, or it can be done in the kernel. No in-kernel handshake implementations yet exist. In their absence, we add a netlink service that can: a. Notify a user space daemon that a handshake is needed. b. Once notified, the daemon calls the kernel back via this netlink service to get the handshake parameters, including an open socket on which to establish the session. c. Once the handshake is complete, the daemon reports the session status and other information via a second netlink operation. This operation marks that it is safe for the kernel to use the open socket and the security session established there. The notification service uses a multicast group. Each handshake mechanism (eg, tlshd) adopts its own group number so that the handshake services are completely independent of one another. The kernel can then tell via netlink_has_listeners() whether a handshake service is active and prepared to handle a handshake request. A new netlink operation, ACCEPT, acts like accept(2) in that it instantiates a file descriptor in the user space daemon's fd table. If this operation is successful, the reply carries the fd number, which can be treated as an open and ready file descriptor. While user space is performing the handshake, the kernel keeps its muddy paws off the open socket. A second new netlink operation, DONE, indicates that the user space daemon is finished with the socket and it is safe for the kernel to use again. The operation also indicates whether a session was established successfully. Signed-off-by: Chuck Lever Signed-off-by: Jakub Kicinski commit 2bc42f482bedeafdbe70804fd82bdbf8f7e28b00 Author: Chuck Lever Date: Mon Apr 17 10:32:19 2023 -0400 .gitignore: Do not ignore .kunitconfig files Circumvent the .gitignore wildcard to avoid warnings about ignored .kunitconfig files. As far as I can tell, the warnings are harmless and these files are not actually ignored. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304142337.jc4oUrov-lkp@intel.com/ Signed-off-by: Chuck Lever Signed-off-by: Jakub Kicinski commit f1836a424518a09b17ee2b69e81e9477321a0aff Merge: 84ce730f82dfe f4796398f21b9 Author: Jakub Kicinski Date: Wed Apr 19 18:46:17 2023 -0700 Merge tag 'ipsec-next-2023-04-19' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== ipsec-next 2023-04-19 1) Remove inner/outer modes from input/output path. These are not needed anymore. From Herbert Xu. * tag 'ipsec-next-2023-04-19' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next: xfrm: Remove inner/outer modes from output path xfrm: Remove inner/outer modes from input path ==================== Link: https://lore.kernel.org/r/20230419075300.452227-1-steffen.klassert@secunet.com Signed-off-by: Jakub Kicinski commit 84ce730f82dfe62f6f3e76b059ce0f7178322fb9 Author: Rob Herring Date: Tue Apr 18 10:06:27 2023 -0500 dt-bindings: net: ethernet: Fix JSON pointer references A JSON pointer reference (the part after the "#") must start with a "/". Conversely, references to the entire document must not have a trailing "/" and should be just a "#". The existing jsonschema package allows these, but coming changes make allowed "$ref" URIs stricter and throw errors on these references. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230418150628.1528480-1-robh@kernel.org Signed-off-by: Jakub Kicinski commit 3e9c0700bf42b6170ae6b6e616cdc2e75a21b506 Author: Horatiu Vultur Date: Tue Apr 18 14:47:13 2023 +0200 net: micrel: Update the list of supported phys At the beginning of the file micrel.c there is list of supported PHYs. Extend this list with the following PHYs lan8841, lan8814 and lan8804, as these PHYs were added but the list was not updated. Signed-off-by: Horatiu Vultur Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230418124713.2221451-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski commit 43bb6100d8d5871d211196034042308c1b1d69c3 Author: Simon Horman Date: Tue Apr 18 13:07:33 2023 +0200 net: stmmac: dwmac-meson8b: Avoid cast to incompatible function type Rather than casting clk_disable_unprepare to an incompatible function type provide a trivial wrapper with the correct signature for the use-case. Reported by clang-16 with W=1: drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c:276:6: error: cast from 'void (*)(struct clk *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] (void(*)(void *))clk_disable_unprepare, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ No functional change intended. Compile tested only. Signed-off-by: Simon Horman Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20230418-dwmac-meson8b-clk-cb-cast-v1-1-e892b670cbbb@kernel.org Signed-off-by: Jakub Kicinski commit 91daa4f62ce878b6e1ac5908aceb83550332447f Author: Daniel Golle Date: Sun Apr 16 13:08:14 2023 +0100 net: dsa: mt7530: fix support for MT7531BE There are two variants of the MT7531 switch IC which got different features (and pins) regarding port 5: * MT7531AE: SGMII/1000Base-X/2500Base-X SerDes PCS * MT7531BE: RGMII Moving the creation of the SerDes PCS from mt753x_setup to mt7530_probe with commit 6de285229773 ("net: dsa: mt7530: move SGMII PCS creation to mt7530_probe function") works fine for MT7531AE which got two instances of mtk-pcs-lynxi, however, MT7531BE requires mt7531_pll_setup to setup clocks before the single PCS on port 6 (usually used as CPU port) starts to work and hence the PCS creation failed on MT7531BE. Fix this by introducing a pointer to mt7531_create_sgmii function in struct mt7530_priv and call it again at the end of mt753x_setup like it was before commit 6de285229773 ("net: dsa: mt7530: move SGMII PCS creation to mt7530_probe function"). Fixes: 6de285229773 ("net: dsa: mt7530: move SGMII PCS creation to mt7530_probe function") Signed-off-by: Daniel Golle Acked-by: Arınç ÜNAL Link: https://lore.kernel.org/r/ZDvlLhhqheobUvOK@makrotopia.org Signed-off-by: Jakub Kicinski commit 8660484ed1cf3261e89e0bad94c6395597e87599 Author: Luis Chamberlain Date: Thu Apr 13 22:28:39 2023 -0700 module: add debugging auto-load duplicate module support The finit_module() system call can in the worst case use up to more than twice of a module's size in virtual memory. Duplicate finit_module() system calls are non fatal, however they unnecessarily strain virtual memory during bootup and in the worst case can cause a system to fail to boot. This is only known to currently be an issue on systems with larger number of CPUs. To help debug this situation we need to consider the different sources for finit_module(). Requests from the kernel that rely on module auto-loading, ie, the kernel's *request_module() API, are one source of calls. Although modprobe checks to see if a module is already loaded prior to calling finit_module() there is a small race possible allowing userspace to trigger multiple modprobe calls racing against modprobe and this not seeing the module yet loaded. This adds debugging support to the kernel module auto-loader (*request_module() calls) to easily detect duplicate module requests. To aid with possible bootup failure issues incurred by this, it will converge duplicates requests to a single request. This avoids any possible strain on virtual memory during bootup which could be incurred by duplicate module autoloading requests. Folks debugging virtual memory abuse on bootup can and should enable this to see what pr_warn()s come on, to see if module auto-loading is to blame for their wores. If they see duplicates they can further debug this by enabling the module.enable_dups_trace kernel parameter or by enabling CONFIG_MODULE_DEBUG_AUTOLOAD_DUPS_TRACE. Current evidence seems to point to only a few duplicates for module auto-loading. And so the source for other duplicates creating heavy virtual memory pressure due to larger number of CPUs should becoming from another place (likely udev). Signed-off-by: Luis Chamberlain commit c30aa8fd6cabd12917277facbd2bd81dc3a226d6 Author: Pali Rohár Date: Sat Apr 8 16:01:17 2023 +0200 powerpc/85xx: p2020: Move all P2020 RDB machine descriptions to p2020.c This moves P2020 RDB machine descriptions into new p2020.c source file. This is preparation for code de-duplication and providing one unified machine description for all P2020 boards. Signed-off-by: Pali Rohár Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408140122.25293-9-pali@kernel.org commit ba5a7ca277afc0e9083a7a2021725425a493cfb2 Author: Pali Rohár Date: Sat Apr 8 16:01:16 2023 +0200 powerpc/85xx: p2020: Move all P2020 DS machine descriptions to p2020.c This moves P2020 DS machine descriptions into new p2020.c source file. This is preparation for code de-duplication and providing one unified machine description for all P2020 boards. Signed-off-by: Pali Rohár Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408140122.25293-8-pali@kernel.org commit b1a54cb693724b6212efa64d877126769ece4d4c Author: Christophe Leroy Date: Sat Apr 8 16:01:15 2023 +0200 powerpc/85xx: Remove #ifdef CONFIG_QUICC_ENGINE in mpc85xx_rdb mpc85xx_qe_par_io_init() is a stub when CONFIG_QUICC_ENGINE is not set. CONFIG_UCC_GETH and CONFIG_SERIAL_QE depend on CONFIG_QUICC_ENGINE. Remove #ifdef CONFIG_QUICC_ENGINE Signed-off-by: Christophe Leroy Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408140122.25293-7-pali@kernel.org commit f435f67024cbee223083aa843f9b69888c8de8a8 Author: Christophe Leroy Date: Sat Apr 8 16:01:14 2023 +0200 powerpc/85xx: Remove #ifdefs CONFIG_PPC_I8259 in mpc85xx_ds All necessary items are declared all the time, no need to use a #ifdef CONFIG_PPC_I8259. Refactor CONFIG_PPC_I8259 actions into a dedicated init function. Signed-off-by: Christophe Leroy Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408140122.25293-6-pali@kernel.org commit 15c6ba7992993fecdac52a424ce35b6e4a272c75 Author: Christophe Leroy Date: Sat Apr 8 16:01:13 2023 +0200 powerpc/85xx: mpc85xx_{ds/rdb} replace prink by pr_xxx macro Use pr_debug() instead of printk(KERN_DEBUG Use pr_err() instead of printk(KERN_ERR Use pr_info() instead of printk(KERN_INFO or printk(" Signed-off-by: Christophe Leroy Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408140122.25293-5-pali@kernel.org commit 1bca2f8219da51a1119d1f4054b44880cbf0494e Author: Christophe Leroy Date: Sat Apr 8 16:01:12 2023 +0200 powerpc/85xx: mpc85xx_{ds/rdb} replace BUG_ON() by WARN_ON() No need to BUG() in case mpic_alloc() fails. Use WARN_ON(). Signed-off-by: Christophe Leroy Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408140122.25293-4-pali@kernel.org commit 0abc1eadd605d461b9a953e6a27d810ed169ed7b Author: Christophe Leroy Date: Sat Apr 8 16:01:11 2023 +0200 powerpc/85xx: mpc85xx_{ds/rdb} compact the call to mpic_alloc() Reduce number of lines in the call to mpic_alloc(). Signed-off-by: Christophe Leroy Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408140122.25293-3-pali@kernel.org commit 6faab5d7ac49d40bedf348a879042681755c14b0 Author: Christophe Leroy Date: Sat Apr 8 16:01:10 2023 +0200 powerpc/85xx: Remove DBG() macro DBG() macro is defined at three places while used only one time at one place. Replace its only use by a pr_debug() and remove the macro. Signed-off-by: Christophe Leroy Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://msgid.link/20230408140122.25293-2-pali@kernel.org commit 3ce271435b717e1dbc4fc8191a69e88deb4f8990 Author: Pali Rohár Date: Sun Apr 9 02:08:12 2023 +0200 powerpc/fsl_uli1575: Mark uli_exclude_device() as static Function uli_exclude_device() is not used outside of the fsl_uli1575.c source file anymore. So mark it as static and remove public prototype. Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://msgid.link/20230409000812.18904-9-pali@kernel.org commit 40b221daf17bf8e0f27c7f1ffc8d5179d58e8597 Author: Pali Rohár Date: Sun Apr 9 02:08:11 2023 +0200 powerpc/86xx: mpc86xx_hpcn: Call uli_init() instead of explicit ppc_md assignment After calling fsl_pci_assign_primary(), it is possible to use uli_init() to conditionally initialize ppc_md.pci_exclude_device callback based on the uli1575 detection. Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://msgid.link/20230409000812.18904-8-pali@kernel.org commit 22fdf79171e8509db54599fd2c05ef0022ee83f5 Author: Pali Rohár Date: Sun Apr 9 02:08:10 2023 +0200 powerpc/fsl_uli1575: Allow to disable FSL_ULI1575 support ULI1575 PCIe south bridge exists only on some Freescale boards. Allow to disable CONFIG_FSL_ULI1575 symbol when it is not explicitly selected and only implied. This is achieved by marking symbol as visible by providing short description. Also adds dependency for this symbol to prevent enabling it on platforms on which driver does not compile. Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://msgid.link/20230409000812.18904-7-pali@kernel.org commit 304e364d1f89f590b72af6bec42b5199971b531b Author: Pali Rohár Date: Sun Apr 9 02:08:09 2023 +0200 powerpc/85xx: mpc85xx_rdb: Do not automatically select FSL_ULI1575 Boards provided by CONFIG_MPC85xx_RDB option do not initialize fsl_uli1575.c driver. So remove explicit select dependency on it. Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://msgid.link/20230409000812.18904-6-pali@kernel.org commit c4f6d8665cff0abacd164b3cd10afe0385290db2 Author: Pali Rohár Date: Sun Apr 9 02:08:08 2023 +0200 powerpc/85xx: mpc85xx_ds: Move uli_init() code into its own driver file Move uli_init() function into existing driver fsl_uli1575.c file in order to share its code between more platforms and board files. Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://msgid.link/20230409000812.18904-5-pali@kernel.org commit aa9f3d2d619b878a66dc918d8b3bf984300f975f Author: Pali Rohár Date: Sun Apr 9 02:08:07 2023 +0200 powerpc/fsl_uli1575: Simplify uli_exclude_device() usage Function uli_exclude_device() is called only from mpc86xx_exclude_device() and mpc85xx_exclude_device() functions. Both those functions are same, so merge its logic directly into the uli_exclude_device() function. Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://msgid.link/20230409000812.18904-4-pali@kernel.org commit 485536b9f289c8c3c86ecaad0f05a1a7b633cb8a Author: Pali Rohár Date: Sun Apr 9 02:08:06 2023 +0200 powerpc/85xx: mpc85xx_ds: Simplify mpc85xx_exclude_device() function Function mpc85xx_exclude_device() is installed and used only when pci_with_uli is fsl_pci_primary. So replace check for pci_with_uli by fsl_pci_primary in mpc85xx_exclude_device() and move pci_with_uli variable declaration into function mpc85xx_ds_uli_init() where it is used. Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://msgid.link/20230409000812.18904-3-pali@kernel.org commit 821b3a471f686910b97228010861c4a99d07fd86 Author: Christophe Leroy Date: Sun Apr 9 02:08:05 2023 +0200 powerpc/fsl_uli1575: Misc cleanup Use a single line for uli_exclude_device(). Add uli_exclude_device() prototype in ppc-pci.h and guard it. Remove that prototype from mpc85xx_ds.c and mpc86xx_hpcn.c files. Make uli_pirq_to_irq[] static as it is used only in that file. Signed-off-by: Christophe Leroy Signed-off-by: Pali Rohár Signed-off-by: Michael Ellerman Link: https://msgid.link/20230409000812.18904-2-pali@kernel.org commit 648a1783fe2551f5a091c9a5f8f463cb2cbf8745 Author: Nicholas Piggin Date: Fri Apr 7 14:09:09 2023 +1000 powerpc/boot: Fix boot wrapper code generation with CONFIG_POWER10_CPU -mcpu=power10 will generate prefixed and pcrel code by default, which we do not support. The general kernel disables these with cflags, but those were missed for the boot wrapper. Fixes: 4b2a9315f20d ("powerpc/64s: POWER10 CPU Kconfig build option") Cc: stable@vger.kernel.org # v6.1+ Reported-by: Danny Tsen Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230407040909.230998-1-npiggin@gmail.com commit 71deb8a5658c592ccad5ededb2ceffef6fcbba5f Author: Bagas Sanjaya Date: Thu Apr 20 08:18:36 2023 +1000 xfs: Extend table marker on deprecated mount options table Sphinx reports htmldocs warning on deprecated mount options table: /home/bagas/repo/linux-kernel/Documentation/admin-guide/xfs.rst:243: WARNING: Malformed table. Text in column margin in table line 5. =========================== ================ Name Removal Schedule =========================== ================ Mounting with V4 filesystem September 2030 Mounting ascii-ci filesystem September 2030 ikeep/noikeep September 2025 attr2/noattr2 September 2025 =========================== ================ Extend the table markers to take account of the second name entry ("Mounting ascii-ci filesystem"), which is now the widest and to fix the above warning. Fixes: 7ba83850ca2691 ("xfs: deprecate the ascii-ci feature") Signed-off-by: Bagas Sanjaya Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 422d56536fd2ebac254e469e196c64cf53cd8a07 Author: Dave Chinner Date: Thu Apr 20 08:18:34 2023 +1000 xfs: fix duplicate includes Header files were already included, just not in the normal order. Remove the duplicates, preserving normal order. Also move xfs_ag.h include to before the scrub internal includes which are normally last in the include list. Fixes: d5c88131dbf0 ("xfs: allow queued AG intents to drain before scrubbing") Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 691d0b782066a6eeeecbfceb7910a8f6184e6105 Author: Dai Ngo Date: Tue Apr 18 13:19:02 2023 -0700 SUNRPC: remove the maximum number of retries in call_bind_status Currently call_bind_status places a hard limit of 3 to the number of retries on EACCES error. This limit was done to prevent NLM unlock requests from being hang forever when the server keeps returning garbage. However this change causes problem for cases when NLM service takes longer than 9 seconds to register with the port mapper after a restart. This patch removes this hard coded limit and let the RPC handles the retry based on the standard hard/soft task semantics. Fixes: 0b760113a3a1 ("NLM: Don't hang forever on NLM unlock requests") Reported-by: Helen Chao Tested-by: Helen Chao Signed-off-by: Dai Ngo Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 9e05a2599a37295eb2dc5c03441daa6741abed4b Author: Ondrej Kozina Date: Tue Apr 11 11:09:31 2023 +0200 sed-opal: geometry feature reporting command Locking range start and locking range length attributes may be require to satisfy restrictions exposed by OPAL2 geometry feature reporting. Geometry reporting feature is described in TCG OPAL SSC, section 3.1.1.4 (ALIGN, LogicalBlockSize, AlignmentGranularity and LowestAlignedLBA). 4.3.5.2.1.1 RangeStart Behavior: [ StartAlignment = (RangeStart modulo AlignmentGranularity) - LowestAlignedLBA ] When processing a Set method or CreateRow method on the Locking table for a non-Global Range row, if: a) the AlignmentRequired (ALIGN above) column in the LockingInfo table is TRUE; b) RangeStart is non-zero; and c) StartAlignment is non-zero, then the method SHALL fail and return an error status code INVALID_PARAMETER. 4.3.5.2.1.2 RangeLength Behavior: If RangeStart is zero, then [ LengthAlignment = (RangeLength modulo AlignmentGranularity) - LowestAlignedLBA ] If RangeStart is non-zero, then [ LengthAlignment = (RangeLength modulo AlignmentGranularity) ] When processing a Set method or CreateRow method on the Locking table for a non-Global Range row, if: a) the AlignmentRequired (ALIGN above) column in the LockingInfo table is TRUE; b) RangeLength is non-zero; and c) LengthAlignment is non-zero, then the method SHALL fail and return an error status code INVALID_PARAMETER In userspace we stuck to logical block size reported by general block device (via sysfs or ioctl), but we can not read 'AlignmentGranularity' or 'LowestAlignedLBA' anywhere else and we need to get those values from sed-opal interface otherwise we will not be able to report or avoid locking range setup INVALID_PARAMETER errors above. Signed-off-by: Ondrej Kozina Reviewed-by: Christoph Hellwig Reviewed-by: Christian Brauner Tested-by: Milan Broz Link: https://lore.kernel.org/r/20230411090931.9193-2-okozina@redhat.com Signed-off-by: Jens Axboe commit ba7a4754da1092decbeea3b29bf7d5946f1be400 Author: Bjorn Andersson Date: Tue Apr 18 09:30:18 2023 -0700 rpmsg: glink: Consolidate TX_DATA and TX_DATA_CONT Rather than duplicating most of the code for constructing the initial TX_DATA and subsequent TX_DATA_CONT packets, roll them into a single loop. Signed-off-by: Bjorn Andersson Reviewed-by: Chris Lew Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230418163018.785524-3-quic_bjorande@quicinc.com commit 7a68f9fa97357a0f2073c9c31ed4101da4fce93e Author: Bjorn Andersson Date: Tue Apr 18 09:30:17 2023 -0700 rpmsg: glink: Propagate TX failures in intentless mode as well As support for splitting transmission over several messages using TX_DATA_CONT was introduced it does not immediately return the return value of qcom_glink_tx(). The result is that in the intentless case (i.e. intent == NULL), the code will continue to send all additional chunks. This is wasteful, and it's possible that the send operation could incorrectly indicate success, if the last chunk fits in the TX fifo. Fix the condition. Fixes: 8956927faed3 ("rpmsg: glink: Add TX_DATA_CONT command while sending") Reviewed-by: Chris Lew Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230418163018.785524-2-quic_bjorande@quicinc.com commit c05dfce0b89e3b58043805b6f4bdf30e3561d867 Author: Bjorn Andersson Date: Mon Mar 27 07:46:17 2023 -0700 rpmsg: glink: Wait for intent, not just request ack In some implementations of the remote firmware, an intent request acknowledgment is sent when it's determined if the intent allocation will be fulfilled, but then the intent is queued after the acknowledgment. The result is that upon receiving a granted allocation request, the search for the newly allocated intent will fail and an additional request will be made. This will at best waste memory, but if the second request is rejected the transaction will be incorrectly rejected. Take the incoming intent into account in the wait to mitigate this problem. The above scenario can still happen, in the case that, on that same channel, an unrelated intent is delivered prior to the request acknowledgment and a separate process enters the send path and picks up the intent. Given that there's no relationship between the acknowledgment and the delivered (or to be delivered intent), there doesn't seem to be a solution to this problem. Signed-off-by: Bjorn Andersson Reviewed-by: Chris Lew [bjorn: Fixed spelling issues pointed out by checkpatch in commit message] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327144617.3134175-3-quic_bjorande@quicinc.com commit 0a7eee89e79eb8b97d46e1e0001b9e2709795af5 Author: Bjorn Andersson Date: Mon Mar 27 07:46:16 2023 -0700 rpmsg: glink: Transition intent request signaling to wait queue Transition the intent request acknowledgement to use a wait queue so that it's possible, in the next commit, to extend the wait to also wait for an incoming intent. Signed-off-by: Bjorn Andersson Reviewed-by: Chris Lew Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327144617.3134175-2-quic_bjorande@quicinc.com commit 265b0de2f0f293f98173abb336edb63921b9c282 Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 16:30:05 2023 -0300 perf probe: Add missing 0x prefix for addresses printed in hexadecimal To fix this confusing warning: # perf probe -l Failed to find debug information for address 798240 probe_main:prometheus_new_counter__return (on github.com/prometheus/client_golang/prometheus.NewCounter%return in /home/acme/git/prometheus-uprobes/main with counter) # As that 798240 is printed with PRIx64 but has no letters, better print the 0x prefix to disambiguate. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZEBCyFu2GjTw6qOi@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7227aacb62aeb59b007a6d3489b11f78fa332696 Merge: 38f1aa5566730 ec185b18c2232 Author: Miquel Raynal Date: Wed Apr 19 20:38:54 2023 +0200 Merge tag 'nand/for-6.4' into mtd/next Raw NAND core changes: * Convert to platform remove callback returning void * Fix spelling mistake waifunc() -> waitfunc() Raw NAND controller driver changes: * imx: Remove unused is_imx51_nfc and imx53_nfc functions * omap2: Drop obsolete dependency on COMPILE_TEST * orion: Use devm_platform_ioremap_resource() * qcom: - Use of_property_present() for testing DT property presence - Use devm_platform_get_and_ioremap_resource() * stm32_fmc2: Depends on ARCH_STM32 instead of MACH_STM32MP157 * tmio: Remove reference to config MTD_NAND_TMIO in the parsers Raw NAND manufacturer driver changes: * hynix: Fix up bit 0 of sdr_timing_mode SPI-NAND changes: * Add support for ESMT F50x1G41LB Signed-off-by: Miquel Raynal commit 38f1aa5566730cdc5e09ec982c80489d87f0f0a7 Merge: e6026eb080fa1 df6def86b9dcb Author: Miquel Raynal Date: Wed Apr 19 20:38:10 2023 +0200 Merge tag 'spi-nor/for-6.4' into mtd/next SPI NOR core changes: * introduce Read While Write support for flashes featuring several banks * set the 4-Byte Address Mode method based on SFDP data * allow post_sfdp hook to return errors * parse SCCR MC table and introduce support for multi-chip devices SPI NOR manufacturer drivers changes: * macronix: add support for mx25uw51245g with RWW * spansion: - determine current address mode at runtime as it can be changed in a non-volatile way and differ from factory defaults or from what SFDP advertises. - enable JFFS2 write buffer mode for few ECC'd NOR flashes: S25FS256T, s25hx and s28hx - add support for s25hl02gt and s25hs02gt Signed-off-by: Miquel Raynal commit 8e4c62c7d980eaf0f64c1c0ef0c80f5685af0fb6 Author: Jakub Kicinski Date: Mon Apr 17 08:28:05 2023 -0700 page_pool: add DMA_ATTR_WEAK_ORDERING on all mappings Commit c519fe9a4f0d ("bnxt: add dma mapping attributes") added DMA_ATTR_WEAK_ORDERING to DMA attrs on bnxt. It has since spread to a few more drivers (possibly as a copy'n'paste). DMA_ATTR_WEAK_ORDERING only seems to matter on Sparc and PowerPC/cell, the rarity of these platforms is likely why we never bothered adding the attribute in the page pool, even though it should be safe to add. To make the page pool migration in drivers which set this flag less of a risk (of regressing the precious sparc database workloads or whatever needed this) let's add DMA_ATTR_WEAK_ORDERING on all page pool DMA mappings. We could make this a driver opt-in but frankly I don't think it's worth complicating the API. I can't think of a reason why device accesses to packet memory would have to be ordered. Acked-by: Ilias Apalodimas Acked-by: Somnath Kotur Reviewed-by: Alexander Lobakin Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/r/20230417152805.331865-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 686c511866b4634734be9d6e827e4e55b877d35e Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 13:47:03 2023 -0300 perf build: Test the refcnt check build Make sure we test build the currently added REFCNT_CHECKING infrastructure. Signed-off-by: Arnaldo Carvalho de Melo commit 2832ef81d4c75d4f0e3945bd2cb0b7012313cbb3 Author: Ian Rogers Date: Wed Apr 19 12:57:53 2023 -0300 perf map: Add reference count checking There's no strict get/put policy with map that leads to leaks or use after free. Reference count checking identifies correct pairing of gets and puts. Committer notes: Extracted from a larger patch removing bits that were covered by the use of pre-existing map__ accessors (e.g. maps__nr_maps()) and new ones added (map__refcnt() and the maps__set_ ones) to reduce RC_CHK_ACCESS(maps)-> source code pollution. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexey Bayduraev Cc: Dmitriy Vyukov Cc: Jiri Olsa Cc: Namhyung Kim Cc: Riccardo Mancini Cc: Stephane Eranian Cc: Stephen Brennan Link: https://lore.kernel.org/lkml/20230407230405.2931830-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit e6a9efcee55f084a5450e4853ecbbaa0b086dcd0 Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 12:24:12 2023 -0300 perf map: Add set_ methods for map->{start,end,pgoff,pgoff,reloc,erange_warned,dso,map_ip,unmap_ip,priv} To have a way to intercept usage of the reference counted struct map. Signed-off-by: Arnaldo Carvalho de Melo commit 38d11da522aacaa05898c734a1cec86f1e611129 Author: Li Lingfeng Date: Tue Apr 18 16:38:04 2023 +0800 dm: don't lock fs when the map is NULL in process of resume Commit fa247089de99 ("dm: requeue IO if mapping table not yet available") added a detection of whether the mapping table is available in the IO submission process. If the mapping table is unavailable, it returns BLK_STS_RESOURCE and requeues the IO. This can lead to the following deadlock problem: dm create mount ioctl(DM_DEV_CREATE_CMD) ioctl(DM_TABLE_LOAD_CMD) do_mount vfs_get_tree ext4_get_tree get_tree_bdev sget_fc alloc_super // got &s->s_umount down_write_nested(&s->s_umount, ...); ext4_fill_super ext4_load_super ext4_read_bh submit_bio // submit and wait io end ioctl(DM_DEV_SUSPEND_CMD) dev_suspend do_resume dm_suspend __dm_suspend lock_fs freeze_bdev get_active_super grab_super // wait for &s->s_umount down_write(&s->s_umount); dm_swap_table __bind // set md->map(can't get here) IO will be continuously requeued while holding the lock since mapping table is NULL. At the same time, mapping table won't be set since the lock is not available. Like request-based DM, bio-based DM also has the same problem. It's not proper to just abort IO if the mapping table not available. So clear DM_SKIP_LOCKFS_FLAG when the mapping table is NULL, this allows the DM table to be loaded and the IO submitted upon resume. Fixes: fa247089de99 ("dm: requeue IO if mapping table not yet available") Cc: stable@vger.kernel.org Signed-off-by: Li Lingfeng Signed-off-by: Mike Snitzer commit e1805aae1e0f648351913e7f5a8a7530a90c8634 Author: Arnaldo Carvalho de Melo Date: Wed Apr 19 10:57:57 2023 -0300 perf map: Add missing conversions to map__refcnt() Some conversions weren't performed in 4e8db2d7520f780f ("perf map: Add map__refcnt() accessor to use in the maps test"), fix it. Signed-off-by: Arnaldo Carvalho de Melo commit 0ae241f4d7d0003f091df6f8d1f45767c3d96d62 Author: Heiko Carstens Date: Mon Apr 17 14:45:17 2023 +0200 s390/relocate_kernel: adjust indentation relocate_kernel.S seems to be the only assembler file which doesn't follow the standard way of indentation. Adjust this for the sake of consistency. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 680957b3b8b0b2e8697592fcb77369d4f643908a Author: Heiko Carstens Date: Mon Apr 17 14:45:16 2023 +0200 s390/relocate_kernel: use SYM* macros instead of ENTRY(), etc. Consistently use the SYM* family of macros instead of the deprecated ENTRY(), ENDPROC(), etc. family of macros. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit fda1dffa44b0ea657e413f1e548022e3f0269592 Author: Heiko Carstens Date: Mon Apr 17 14:45:15 2023 +0200 s390/entry: use SYM* macros instead of ENTRY(), etc. Consistently use the SYM* family of macros instead of the deprecated ENTRY(), ENDPROC(), etc. family of macros. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 04b6d02dbecdda5d15aa55edbae2f0e1eb81749e Author: Heiko Carstens Date: Mon Apr 17 14:45:14 2023 +0200 s390/purgatory: use SYM* macros instead of ENTRY(), etc. Consistently use the SYM* family of macros instead of the deprecated ENTRY(), ENDPROC(), etc. family of macros. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 6cea5f0bc93dffc74f0fa8cad7680b5ad21d1961 Author: Heiko Carstens Date: Mon Apr 17 14:45:13 2023 +0200 s390/kprobes: use SYM* macros instead of ENTRY(), etc. Consistently use the SYM* family of macros instead of the deprecated ENTRY(), ENDPROC(), etc. family of macros. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 26d14299220ab8e1d4fb166d8e66dd4a43097ec1 Author: Heiko Carstens Date: Mon Apr 17 14:45:12 2023 +0200 s390/reipl: use SYM* macros instead of ENTRY(), etc. Consistently use the SYM* family of macros instead of the deprecated ENTRY(), ENDPROC(), etc. family of macros. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 05d0935d12966686eb1d780e3f929727e9fa500d Author: Heiko Carstens Date: Mon Apr 17 14:45:11 2023 +0200 s390/head64: use SYM* macros instead of ENTRY(), etc. Consistently use the SYM* family of macros instead of the deprecated ENTRY(), ENDPROC(), etc. family of macros. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit a89d60fc7a9ad544a30251d238a5f35d023754d1 Author: Heiko Carstens Date: Mon Apr 17 14:45:10 2023 +0200 s390/earlypgm: use SYM* macros instead of ENTRY(), etc. Consistently use the SYM* family of macros instead of the deprecated ENTRY(), ENDPROC(), etc. family of macros. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit aaaac068f0d2d137b7fcad47d4cebbd24bf060ae Author: Heiko Carstens Date: Mon Apr 17 14:45:09 2023 +0200 s390/mcount: use SYM* macros instead of ENTRY(), etc. Consistently use the SYM* family of macros instead of the deprecated ENTRY(), ENDPROC(), etc. family of macros. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit b5f3c99d15725d78a2e720ca48ab47a43bd1b5cb Author: Heiko Carstens Date: Mon Apr 17 14:45:08 2023 +0200 s390/crc32le: use SYM* macros instead of ENTRY(), etc. Consistently use the SYM* family of macros instead of the deprecated ENTRY(), ENDPROC(), etc. family of macros. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 4b788ac8ed39686f7810733c16521a7b91e005c1 Author: Heiko Carstens Date: Mon Apr 17 14:45:07 2023 +0200 s390/crc32be: use SYM* macros instead of ENTRY(), etc. Consistently use the SYM* family of macros instead of the deprecated ENTRY(), ENDPROC(), etc. family of macros. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 3e5e5107b7c6efe319069272a68a4d0ec8bce7fb Author: Heiko Carstens Date: Mon Apr 17 14:45:06 2023 +0200 s390/crypto,chacha: use SYM* macros instead of ENTRY(), etc. Consistently use the SYM* family of macros instead of the deprecated ENTRY(), ENDPROC(), etc. family of macros. Acked-by: Harald Freudenberger Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit ac0c06a1dc8702209e651975ce6f54715f7321c8 Author: Heiko Carstens Date: Mon Apr 17 14:45:05 2023 +0200 s390/amode31: use SYM* macros instead of ENTRY(), etc. Consistently use the SYM* family of macros instead of the deprecated ENTRY(), ENDPROC(), etc. family of macros. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 45769052ae77c0fb0f846c151bb0a845cf5d4237 Author: Heiko Carstens Date: Mon Apr 17 14:45:04 2023 +0200 s390/lib: use SYM* macros instead of ENTRY(), etc. Consistently use the SYM* family of macros instead of the deprecated ENTRY(), ENDPROC(), etc. family of macros. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit e48b6853d81b6b48dc238d328700536b425c8e70 Author: Heiko Carstens Date: Sun Apr 16 20:15:17 2023 +0200 s390/kasan: remove override of mem*() functions The kasan mem*() functions are not used anymore since s390 has switched to GENERIC_ENTRY and commit 69d4c0d32186 ("entry, kasan, x86: Disallow overriding mem*() functions"). Therefore remove the now dead code, similar to x86. While at it also use the SYM* macros in mem.S. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 2d1b21eceaf0765d60b543b2b8e26c2f55517259 Author: Alexander Gordeev Date: Mon Apr 3 08:44:40 2023 +0200 s390/kdump: remove nodat stack restriction for calling nodat functions To allow calling of DAT-off code from kernel the stack needs to be switched to nodat_stack (or other stack mapped as 1:1). Before call_nodat() macro was introduced that was necessary to provide the very same memory address for STNSM and STOSM instructions. If the kernel would stay on a random stack (e.g. a virtually mapped one) then a virtual address provided for STNSM instruction could differ from the physical address needed for the corresponding STOSM instruction. After call_nodat() macro is introduced the kernel stack does not need to be mapped 1:1 anymore, since the macro stores the physical memory address of return PSW in a register before entering DAT-off mode. This way the return LPSWE instruction is able to pick the correct memory location and restore the DAT-on mode. That however might fail in case the 16-byte return PSW happened to cross page boundary: PSW mask and PSW address could end up in two separate non-contiguous physical pages. Align the return PSW on 16-byte boundary so it always fits into a single physical page. As result any stack (including the virtually mapped one) could be used for calling DAT-off code and prior switching to nodat_stack becomes unnecessary. Signed-off-by: Alexander Gordeev Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 82caf7aba107dbc0e70c330786bed9961a098ab0 Author: Alexander Gordeev Date: Mon Apr 3 08:44:39 2023 +0200 s390/kdump: rework invocation of DAT-off code Calling kdump kernel is a two-step process that involves invocation of the purgatory code: first time - to verify the new kernel checksum and second time - to call the new kernel itself. The purgatory code operates on real addresses and does not expect any memory protection. Therefore, before the purgatory code is entered the DAT mode is always turned off. However, it is only restored upon return from the new kernel checksum verification. In case the purgatory was called to start the new kernel and failed the control is returned to the old kernel, but the DAT mode continues staying off. The new kernel start failure is unlikely and leads to the disabled wait state anyway. Still that poses a risk, since the kernel code in general is not DAT-off safe and even calling the disabled_wait() function might crash. Introduce call_nodat() macro that allows entering DAT-off mode, calling an arbitrary function and restoring DAT mode back on. Switch all invocations of DAT-off code to that macro and avoid the above described scenario altogether. Name the call_nodat() macro in small letters after the already existing call_on_stack() and put it to the same header file. Signed-off-by: Alexander Gordeev Reviewed-by: Heiko Carstens [hca@linux.ibm.com: some small modifications to call_nodat() macro] Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 39218bcf941ab1a5eabbf350c0f7a1f1325434b0 Author: Alexander Gordeev Date: Mon Apr 3 08:44:38 2023 +0200 s390/kdump: fix virtual vs physical address confusion Fix virtual vs physical address confusion (which currently are the same). Signed-off-by: Alexander Gordeev Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 86295cb4530dfbc2315ca5997502dad03748e5dd Author: Alexander Gordeev Date: Mon Apr 3 08:44:37 2023 +0200 s390/kdump: cleanup do_start_kdump() prototype and usage Avoid unnecessary run-time and compile-time type conversions of do_start_kdump() function return value and parameter. Signed-off-by: Alexander Gordeev Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7a04d491edf4766e7724671355b1ab27cae81a4a Author: Alexander Gordeev Date: Mon Apr 3 08:44:36 2023 +0200 s390/kexec: turn DAT mode off immediately before purgatory The kernel code is not guaranteed DAT-off mode safe. Turn the DAT mode off immediately before entering the purgatory. Further, to avoid subtle side effects reset the system immediately before turning DAT mode off while making all necessary preparations in advance. Signed-off-by: Alexander Gordeev Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit aa7d7bc99fed71664e9a241b32294ee15a88d938 Author: Mikulas Patocka Date: Tue Apr 18 15:56:41 2023 -0400 dm flakey: add an "error_reads" option dm-flakey returns error on reads if no other argument is specified. This commit simplifies associated logic while formalizing an "error_reads" argument and an ERROR_READS flag. If no argument is specified, set ERROR_READS flag so that it behaves just like before this commit. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit e3675dc1e7ea2e4e5a6527fa7068e9fcbc2475cc Author: Mikulas Patocka Date: Tue Apr 18 15:56:09 2023 -0400 dm flakey: remove trailing space in the table line Don't return a trailing space in the output of STATUSTYPE_TABLE. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 98dba02d9a93eec11bffbb93c7c51624290702d2 Author: Mikulas Patocka Date: Tue Apr 18 15:57:47 2023 -0400 dm flakey: fix a crash with invalid table line This command will crash with NULL pointer dereference: dmsetup create flakey --table \ "0 `blockdev --getsize /dev/ram0` flakey /dev/ram0 0 0 1 2 corrupt_bio_byte 512" Fix the crash by checking if arg_name is non-NULL before comparing it. Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 1a33aee1dc2476c5937a0890f2dfc228a165f364 Author: Thomas Richter Date: Thu Apr 6 11:40:42 2023 +0200 s390/cpum_cf: remove function validate_ctr_auth() by inline code Remove function validate_ctr_auth() and replace this very small function by its body. No functional change. Signed-off-by: Thomas Richter Acked-by: Heiko Carstens Acked-by: Sumanth Korikkar Signed-off-by: Vasily Gorbik commit 9ae9b868aeaad377f6315d7196a43e8827e24cb3 Author: Thomas Richter Date: Thu Apr 6 11:32:18 2023 +0200 s390/cpum_cf: provide counter number to validate_ctr_version() Function validate_ctr_version() first parameter is a pointer to a large structure, but only member hw_perf_event::config is used. Supply this structure member value in the function invocation. No functional change. Signed-off-by: Thomas Richter Acked-by: Heiko Carstens Acked-by: Sumanth Korikkar Signed-off-by: Vasily Gorbik commit 46c4d945ea1f9beebf49148b0d4aafb44e41ceb6 Author: Thomas Richter Date: Tue Apr 4 14:47:55 2023 +0200 s390/cpum_cf: introduce static CPU counter facility information The CPU measurement facility counter information instruction qctri() retrieves information about the available counter sets. The information varies between machine generations, but is constant when running on a particular machine. For example the CPU measurement facility counter first and second version numbers determine the amount of counters in a counter set. This information never changes. The counter sets are identical for all CPUs in the system. It does not matter which CPU performs the instruction. Authorization control of the CPU Measurement facility can only be changed in the activation profile while the LPAR is not running. Retrieve the CPU measurement counter information at device driver initialization time and use its constant values. Function validate_ctr_version() verifies if a user provided CPU Measurement counter facility counter is valid and defined. It now uses the newly introduced static CPU counter facility information. To avoid repeated recalculation of the counter set sizes (numbers of counters per set), which never changes on a running machine, calculate the counter set size once at device driver initialization and store the result in an array. Functions cpum_cf_make_setsize() and cpum_cf_read_setsize() are introduced. Finally remove cpu_cf_events::info member and use the static CPU counter facility information instead. Signed-off-by: Thomas Richter Acked-by: Heiko Carstens Acked-by: Sumanth Korikkar Signed-off-by: Vasily Gorbik commit 310c33dc7a1278d80ba717b9964bd478d52681e0 Merge: 2667e3673f707 559d1e45a16dc Author: Palmer Dabbelt Date: Wed Apr 19 07:47:45 2023 -0700 Merge patch series "Introduce 64b relocatable kernel" Alexandre Ghiti says: After multiple attempts, this patchset is now based on the fact that the 64b kernel mapping was moved outside the linear mapping. The first patch allows to build relocatable kernels but is not selected by default. That patch is a requirement for KASLR. The second and third patches take advantage of an already existing powerpc script that checks relocations at compile-time, and uses it for riscv. * b4-shazam-merge: riscv: Use --emit-relocs in order to move .rela.dyn in init riscv: Check relocations at compile time powerpc: Move script to check relocations at compile time in scripts/ riscv: Introduce CONFIG_RELOCATABLE riscv: Move .rela.dyn outside of init to avoid empty relocations riscv: Prepare EFI header for relocatable kernels Link: https://lore.kernel.org/r/20230329045329.64565-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 3b42877cd53ad4a1b1e3875a0fe537c9c517e635 Author: Harald Freudenberger Date: Fri Apr 14 17:33:19 2023 +0200 s390/zcrypt: rework arrays with length zero occurrences Review and rework all the zero length array occurrences within structs to flexible array fields or comment if not used at all. However, some struct fields are there for documentation purpose or to have correct sizeof() evaluation of a struct and thus should not get deleted. Signed-off-by: Harald Freudenberger Acked-by: Heiko Carstens Reviewed-by: Holger Dengler Signed-off-by: Vasily Gorbik commit 559d1e45a16dcf1542e430ea3dce9ab625be98d0 Author: Alexandre Ghiti Date: Wed Mar 29 06:53:29 2023 +0200 riscv: Use --emit-relocs in order to move .rela.dyn in init To circumvent an issue where placing the relocations inside the init sections produces empty relocations, use --emit-relocs. But to avoid carrying those relocations in vmlinux, use an intermediate vmlinux.relocs file which is a copy of vmlinux *before* stripping its relocations. Suggested-by: Björn Töpel Suggested-by: Nick Desaulniers Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20230329045329.64565-7-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit c2dea0bc53397166a77811d9b66928643a83d6f3 Author: Alexandre Ghiti Date: Wed Mar 29 06:53:28 2023 +0200 riscv: Check relocations at compile time Relocating kernel at runtime is done very early in the boot process, so it is not convenient to check for relocations there and react in case a relocation was not expected. There exists a script in scripts/ that extracts the relocations from vmlinux that is then used at postlink to check the relocations. Signed-off-by: Alexandre Ghiti Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20230329045329.64565-6-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 47981b5cc6871d78aee67b6c9ae70aff90ddb97d Author: Alexandre Ghiti Date: Wed Mar 29 06:53:27 2023 +0200 powerpc: Move script to check relocations at compile time in scripts/ Relocating kernel at runtime is done very early in the boot process, so it is not convenient to check for relocations there and react in case a relocation was not expected. Powerpc architecture has a script that allows to check at compile time for such unexpected relocations: extract the common logic to scripts/ so that other architectures can take advantage of it. Signed-off-by: Alexandre Ghiti Reviewed-by: Anup Patel Acked-by: Michael Ellerman (powerpc) Link: https://lore.kernel.org/r/20230329045329.64565-5-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 39b33072941f8bab82aa2c802044062385a046bf Author: Alexandre Ghiti Date: Wed Mar 29 06:53:26 2023 +0200 riscv: Introduce CONFIG_RELOCATABLE This config allows to compile 64b kernel as PIE and to relocate it at any virtual address at runtime: this paves the way to KASLR. Runtime relocation is possible since relocation metadata are embedded into the kernel. Note that relocating at runtime introduces an overhead even if the kernel is loaded at the same address it was linked at and that the compiler options are those used in arm64 which uses the same RELA relocation format. Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20230329045329.64565-4-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 69a90d2fe107c8bf6a424af0f30d2b223cdeaf7c Author: Alexandre Ghiti Date: Wed Mar 29 06:53:25 2023 +0200 riscv: Move .rela.dyn outside of init to avoid empty relocations This is a preparatory patch for relocatable kernels: .rela.dyn should be in .init but doing so actually produces empty relocations, so this should be a temporary commit until we find a solution. This issue was reported here [1]. [1] https://lore.kernel.org/all/4a6fc7a3-9697-a49b-0941-97f32194b0d7@ghiti.fr/. Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20230329045329.64565-3-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 55de1e4ad43b375566162ae0cc2b56dfa44aae4e Author: Alexandre Ghiti Date: Wed Mar 29 06:53:24 2023 +0200 riscv: Prepare EFI header for relocatable kernels ld does not handle relocations correctly as explained here [1], a fix for that was proposed by Nelson there but we have to support older toolchains and then provide this fix. Note that llvm does not need this fix and is then excluded. [1] https://sourceware.org/pipermail/binutils/2023-March/126690.html Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20230329045329.64565-2-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 09cda705860125ffee1b1359b1da79f8e0c77a40 Author: Shengjiu Wang Date: Wed Apr 19 18:29:18 2023 +0800 ASoC: fsl: Restore configuration of platform This reverts commit 33683cbf49b54 ("ASoC: fsl: remove unnecessary dai_link->platform"). dai_link->platform is needed. The platform component is "snd_dmaengine_pcm", which is registered from cpu driver, If dai_link->platform is not assigned, then platform component will not be probed, then there will be issue: aplay: main:831: audio open error: Invalid argument Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1681900158-17428-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 2ddade322925641ee2a75f13665c51f2e74d7791 Author: Magnus Karlsson Date: Tue Apr 18 16:36:17 2023 +0200 selftests/xsk: Fix munmap for hugepage allocated umem Fix the unmapping of hugepage allocated umems so that they are properly unmapped. The new test referred to in the fixes label, introduced a test that allocated a umem that is not a multiple of a 2M hugepage size. This is fine for mmap() that rounds the size up the nearest multiple of 2M. But munmap() requires the size to be a multiple of the hugepage size in order for it to unmap the region. The current behaviour of not properly unmapping the umem, was discovered when further additions of tests that require hugepages (unaligned mode tests only) started failing as the system was running out of hugepages. Fixes: c0801598e543 ("selftests: xsk: Add test UNALIGNED_INV_DESC_4K1_FRAME_SIZE") Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230418143617.27762-1-magnus.karlsson@gmail.com commit b100722a777f6455d913666a376f81342b2cb995 Author: Muna Sinada Date: Mon Apr 17 13:22:27 2023 -0700 wifi: ath11k: Remove disabling of 80+80 and 160 MHz This is a regression fix for 80+80 and 160 MHz support bits being cleared, therefore not adverised. Remove disable of 80+80 and 160 MHz capability flags and assign valid center frequency 2 similar to VHT80_80. Fixes: 38dfe775d0ab ("wifi: ath11k: push MU-MIMO params from hostapd to hardware") Reported-by: Robert Marko Tested-by: Robert Marko # IPQ8074 WLAN.HK.2.9.0.1-01385-QCAHKSWPL_SILICONZ-1 Link: https://bugzilla.kernel.org/show_bug.cgi?id=217299 Co-developed-by: P Praneesh Signed-off-by: P Praneesh Signed-off-by: Muna Sinada Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1681762947-13882-1-git-send-email-quic_msinada@quicinc.com commit 2c69679626d5daa680d71c77ad58af0088db537f Author: Imre Deak Date: Fri Apr 14 20:38:00 2023 +0300 drm/i915/dp_mst: Fix active port PLL selection for secondary MST streams The port PLL selection needs to be up-to-date in the CRTC state of both the primary and all secondary MST streams. The commit removing the encoder update_prepare/complete hooks (see Fixes: below), stopped doing this for secondary streams, fix this up. Fixes: 0f752b2178c9 ("drm/i915: Remove the encoder update_prepare()/complete() hooks") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8336 Cc: Mika Kahola Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20230414173800.590790-1-imre.deak@intel.com (cherry picked from commit 27ac123b454417ea92d77c13a5d94655f53b759c) Signed-off-by: Joonas Lahtinen commit 2667e3673f7079cf95d58cf84d7c0b5a455ac68b Merge: 2e75ab3189ecf 864046c512c2c Author: Palmer Dabbelt Date: Wed Apr 19 07:24:56 2023 -0700 Merge patch series "RISC-V kasan rework" Alexandre Ghiti says: As described in patch 2, our current kasan implementation is intricate, so I tried to simplify the implementation and mimic what arm64/x86 are doing. In addition it fixes UEFI bootflow with a kasan kernel and kasan inline instrumentation: all kasan configurations were tested on a large ubuntu kernel with success with KASAN_KUNIT_TEST and KASAN_MODULE_TEST. inline ubuntu config + uefi: sv39: OK sv48: OK sv57: OK outline ubuntu config + uefi: sv39: OK sv48: OK sv57: OK Actually 1 test always fails with KASAN_KUNIT_TEST that I have to check: KASAN failure expected in "set_bit(nr, addr)", but none occurrred Note that Palmer recently proposed to remove COMMAND_LINE_SIZE from the userspace abi https://lore.kernel.org/lkml/20221211061358.28035-1-palmer@rivosinc.com/T/ so that we can finally increase the command line to fit all kasan kernel parameters. All of this should hopefully fix the syzkaller riscv build that has been failing for a few months now, any test is appreciated and if I can help in any way, please ask. * b4-shazam-merge: riscv: Unconditionnally select KASAN_VMALLOC if KASAN riscv: Fix ptdump when KASAN is enabled riscv: Fix EFI stub usage of KASAN instrumented strcmp function riscv: Move DTB_EARLY_BASE_VA to the kernel address space riscv: Rework kasan population functions riscv: Split early and final KASAN population functions Link: https://lore.kernel.org/r/20230203075232.274282-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 864046c512c2cd8418dc928b91981fb12a80396c Author: Alexandre Ghiti Date: Fri Feb 3 08:52:32 2023 +0100 riscv: Unconditionnally select KASAN_VMALLOC if KASAN If KASAN is enabled, VMAP_STACK depends on KASAN_VMALLOC so enable KASAN_VMALLOC with KASAN so that we can enable VMAP_STACK by default. Signed-off-by: Alexandre Ghiti Reviewed-by: Björn Töpel Link: https://lore.kernel.org/r/20230203075232.274282-7-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit ecd7ebaf0b5a094a6180b299a5635c0eea42be4b Author: Alexandre Ghiti Date: Fri Feb 3 08:52:31 2023 +0100 riscv: Fix ptdump when KASAN is enabled The KASAN shadow region was moved next to the kernel mapping but the ptdump code was not updated and it appears to break the dump of the kernel page table, so fix this by moving the KASAN shadow region in ptdump. Fixes: f7ae02333d13 ("riscv: Move KASAN mapping next to the kernel mapping") Signed-off-by: Alexandre Ghiti Tested-by: Björn Töpel Reviewed-by: Björn Töpel Link: https://lore.kernel.org/r/20230203075232.274282-6-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 617955ca6e275c4dd0dcf5316fca7fc04a8f2fe6 Author: Alexandre Ghiti Date: Fri Feb 3 08:52:30 2023 +0100 riscv: Fix EFI stub usage of KASAN instrumented strcmp function The EFI stub must not use any KASAN instrumented code as the kernel proper did not initialize the thread pointer and the mapping for the KASAN shadow region. Avoid using the generic strcmp function, instead use the one in drivers/firmware/efi/libstub/string.c. Signed-off-by: Alexandre Ghiti Acked-by: Ard Biesheuvel Reviewed-by: Atish Patra Link: https://lore.kernel.org/r/20230203075232.274282-5-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 401e84488800d05e8ed6db2a687eaa94415f4ec8 Author: Alexandre Ghiti Date: Fri Feb 3 08:52:29 2023 +0100 riscv: Move DTB_EARLY_BASE_VA to the kernel address space The early virtual address should lie in the kernel address space for inline kasan instrumentation to succeed, otherwise kasan tries to dereference an address that does not exist in the address space (since kasan only maps *kernel* address space, not the userspace). Simply use the very first address of the kernel address space for the early fdt mapping. It allowed an Ubuntu kernel to boot successfully with inline instrumentation. Signed-off-by: Alexandre Ghiti Reviewed-by: Björn Töpel Link: https://lore.kernel.org/r/20230203075232.274282-4-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 96f9d4daf745205fe869e9e5ac23199ef11c5448 Author: Alexandre Ghiti Date: Fri Feb 3 08:52:28 2023 +0100 riscv: Rework kasan population functions Our previous kasan population implementation used to have the final kasan shadow region mapped with kasan_early_shadow_page, because we did not clean the early mapping and then we had to populate the kasan region "in-place" which made the code cumbersome. So now we clear the early mapping, establish a temporary mapping while we populate the kasan shadow region with just the kernel regions that will be used. This new version uses the "generic" way of going through a page table that may be folded at runtime (avoid the XXX_next macros). It was tested with outline instrumentation on an Ubuntu kernel configuration successfully. Signed-off-by: Alexandre Ghiti Reviewed-by: Björn Töpel Link: https://lore.kernel.org/r/20230203075232.274282-3-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit cd0334e1c091fc0263ccf76e81d333a2ece4f3ab Author: Alexandre Ghiti Date: Fri Feb 3 08:52:27 2023 +0100 riscv: Split early and final KASAN population functions This is a preliminary work that allows to make the code more understandable. Signed-off-by: Alexandre Ghiti Reviewed-by: Björn Töpel Link: https://lore.kernel.org/r/20230203075232.274282-2-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit b956e3110a797a3663f91f9b8935b667cc23fe72 Author: Toke Høiland-Jørgensen Date: Mon Apr 17 13:35:03 2023 +0300 wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels() This partially reverts commit e161d4b60ae3a5356e07202e0bfedb5fad82c6aa. Turns out the channelmap variable is not actually read-only, it's modified through the MCI_GPM_CLR_CHANNEL_BIT() macro further down in the function, so making it read-only causes page faults when that code is hit. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217183 Fixes: e161d4b60ae3 ("wifi: ath9k: Make arrays prof_prio and channelmap static const") Cc: stable@vger.kernel.org Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230413214118.153781-1-toke@toke.dk commit f9fff67d2d7ca6fa8066132003a3deef654c55b1 Author: Nagarajan Maran Date: Mon Apr 17 13:35:02 2023 +0300 wifi: ath11k: Fix SKB corruption in REO destination ring While running traffics for a long time, randomly an RX descriptor filled with value "0" from REO destination ring is received. This descriptor which is invalid causes the wrong SKB (SKB stored in the IDR lookup with buffer id "0") to be fetched which in turn causes SKB memory corruption issue and the same leads to crash after some time. Changed the start id for idr allocation to "1" and the buffer id "0" is reserved for error validation. Introduced Sanity check to validate the descriptor, before processing the SKB. Crash Signature : Unable to handle kernel paging request at virtual address 3f004900 PC points to "b15_dma_inv_range+0x30/0x50" LR points to "dma_cache_maint_page+0x8c/0x128". The Backtrace obtained is as follows: [<8031716c>] (b15_dma_inv_range) from [<80313a4c>] (dma_cache_maint_page+0x8c/0x128) [<80313a4c>] (dma_cache_maint_page) from [<80313b90>] (__dma_page_dev_to_cpu+0x28/0xcc) [<80313b90>] (__dma_page_dev_to_cpu) from [<7fb5dd68>] (ath11k_dp_process_rx+0x1e8/0x4a4 [ath11k]) [<7fb5dd68>] (ath11k_dp_process_rx [ath11k]) from [<7fb53c20>] (ath11k_dp_service_srng+0xb0/0x2ac [ath11k]) [<7fb53c20>] (ath11k_dp_service_srng [ath11k]) from [<7f67bba4>] (ath11k_pci_ext_grp_napi_poll+0x1c/0x78 [ath11k_pci]) [<7f67bba4>] (ath11k_pci_ext_grp_napi_poll [ath11k_pci]) from [<807d5cf4>] (__napi_poll+0x28/0xb8) [<807d5cf4>] (__napi_poll) from [<807d5f28>] (net_rx_action+0xf0/0x280) [<807d5f28>] (net_rx_action) from [<80302148>] (__do_softirq+0xd0/0x280) [<80302148>] (__do_softirq) from [<80320408>] (irq_exit+0x74/0xd4) [<80320408>] (irq_exit) from [<803638a4>] (__handle_domain_irq+0x90/0xb4) [<803638a4>] (__handle_domain_irq) from [<805bedec>] (gic_handle_irq+0x58/0x90) [<805bedec>] (gic_handle_irq) from [<80301a78>] (__irq_svc+0x58/0x8c) Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Nagarajan Maran Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230403191533.28114-1-quic_nmaran@quicinc.com commit 2f0c9ac8362da09c80f1cd422ef7fd6fa9b252b9 Author: Pradeep Kumar Chitrapu Date: Mon Apr 17 13:35:02 2023 +0300 wifi: ath11k: Fix incorrect update of radiotap fields Fix incorrect update of ppdu stats causing incorrect radiotap fields. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230403195738.25367-3-quic_pradeepc@quicinc.com commit 6257c702264c44d74c6b71f0c62a7665da2dc356 Author: Pradeep Kumar Chitrapu Date: Mon Apr 17 13:35:02 2023 +0300 wifi: ath11k: fix tx status reporting in encap offload mode ieee80211_tx_status() treats packets in 802.11 frame format and tries to extract sta address from packet header. When tx encap offload is enabled, this becomes invalid operation. Hence, switch to using ieee80211_tx_status_ext() after filling in station address for handling both 802.11 and 802.3 frames. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230403195738.25367-2-quic_pradeepc@quicinc.com commit 20487cc3ff36bbfa9505f0a078ba98f09abfc717 Author: Harshitha Prem Date: Mon Apr 17 13:35:01 2023 +0300 wifi: ath11k: add peer mac information in failure cases During reo command failure, the peer mac detail for which the reo command was not successful is unknown. Hence, to improve the debuggability, add the peer mac information in the failure cases which would be useful during multi client cases. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sathishkumar Muruganandam Signed-off-by: Harshitha Prem Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230403182420.23375-4-quic_hprem@quicinc.com commit a8ae833657a45746debde85c38bb7f070d344026 Author: Harshitha Prem Date: Mon Apr 17 13:35:01 2023 +0300 wifi: ath11k: Prevent REO cmd failures Prevent REO cmd failures causing double free by increasing REO cmd ring size and moving REO status ring mask to IRQ group 3 from group 0 to separate from tx completion ring on IRQ group 0 which may delay reo status processing. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sathishkumar Muruganandam Signed-off-by: Harshitha Prem Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230403182420.23375-3-quic_hprem@quicinc.com commit 93a91f40c25c3d0e61f8540a7accf105090f9995 Author: Harshitha Prem Date: Mon Apr 17 13:35:00 2023 +0300 wifi: ath11k: fix double free of peer rx_tid during reo cmd failure Peer rx_tid is locally copied thrice during peer_rx_tid_cleanup to send REO_CMD_UPDATE_RX_QUEUE followed by REO_CMD_FLUSH_CACHE to flush all aged REO descriptors from HW cache. When sending REO_CMD_FLUSH_CACHE fails, we do dma unmap of already mapped rx_tid->vaddr and free it. This is not checked during reo_cmd_list_cleanup() and dp_reo_cmd_free() before trying to free and unmap again. Fix this by setting rx_tid->vaddr NULL in rx tid delete and also wherever freeing it to check in reo_cmd_list_cleanup() and reo_cmd_free() before trying to free again. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sathishkumar Muruganandam Signed-off-by: Harshitha Prem Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230403182420.23375-2-quic_hprem@quicinc.com commit ed09c61eb19d9889780c791cb316ac76468f5186 Author: Konrad Dybcio Date: Mon Apr 17 13:35:00 2023 +0300 dt-bindings: net: Convert ath10k to YAML Convert the ath10k bindings to YAML. Dropped properties that are absent at the current state of mainline: - qcom,msi_addr - qcom,msi_base Somewhat based on the ath11k bindings. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230406-topic-ath10k_bindings-v4-1-9f67a6bb0d56@linaro.org commit 9989b3c0ff9771760c103d46e6b5e8645fd3d836 Author: Frank Crawford Date: Sun Apr 16 14:25:07 2023 +1000 hwmon: (it87) Disable SMBus access for environmental controller registers. Add functions to disable and re-enable access by the SMBus for specific chips. Signed-off-by: Frank Crawford Signed-off-by: Guenter Roeck commit 7a46c0cb473f05fe61edf26aa5509aa555dcd9be Author: Lakshmi Yadlapati Date: Thu Apr 13 08:26:26 2023 -0500 docs: hwmon: Add documentaion for acbel-fsg032 PSU Add documentation changes for acbel-fsg032 psu Signed-off-by: Lakshmi Yadlapati Link: https://lore.kernel.org/r/20230413132627.3444119-5-lakshmiy@us.ibm.com [groeck: Fixed alphabetic order in index.rst] Signed-off-by: Guenter Roeck commit d89d6c093acdf4545a89ded625686ee6e8db4634 Author: Lakshmi Yadlapati Date: Thu Apr 13 08:26:25 2023 -0500 hwmon: (pmbus/acbel-fsg032) Add Acbel power supply Add the driver to support ACBEL FSG032 power supply. Signed-off-by: Lakshmi Yadlapati Link: https://lore.kernel.org/r/20230413132627.3444119-4-lakshmiy@us.ibm.com Signed-off-by: Guenter Roeck commit b0cda2cc85686d5cd30a874f2caf9c6c34958cd1 Author: Lakshmi Yadlapati Date: Thu Apr 13 08:26:24 2023 -0500 dt-bindings: trivial-devices: Add acbel,fsg032 Add new Acbel FSG032 power supply to trivial devices. Signed-off-by: Lakshmi Yadlapati Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230413132627.3444119-3-lakshmiy@us.ibm.com Signed-off-by: Guenter Roeck commit 680921653cf39f086fe065234a2d9813b526bb6c Author: Lakshmi Yadlapati Date: Thu Apr 13 08:26:23 2023 -0500 dt-bindings: vendor-prefixes: Add prefix for acbel Add a vendor prefix entry for acbel (https://www.acbel.com) Signed-off-by: Lakshmi Yadlapati Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230413132627.3444119-2-lakshmiy@us.ibm.com Signed-off-by: Guenter Roeck commit fb23f23096471f915bf9745fa297c366e03ee579 Author: Christophe JAILLET Date: Sat Apr 15 18:23:37 2023 +0200 hwmon: (sfctemp) Simplify error message dev_err_probe() already display the error code. There is no need to duplicate it explicitly in the error message. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/f32a6e877f399e11ca130476002f85c2b48ba7ec.1681575790.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck commit 1680796b21c33cc13f413f8c39640b594092a3a4 Author: Eddie James Date: Wed Apr 12 11:15:26 2023 -0500 hwmon: (pmbus/ibm-cffps) Use default debugfs attributes and lock function Switch the driver to use the default debugfs attributes instead of ones that provide the same data under different names. Use the lock functions for the debugfs and led attributes, and simplify the input history operation by dropping the timer and lock. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20230412161526.252294-3-eajames@linux.ibm.com Signed-off-by: Guenter Roeck commit a7ac37183ac2a0cc46d857997b2dd24997ca2754 Author: Eddie James Date: Wed Apr 12 11:15:25 2023 -0500 hwmon: (pmbus/core) Add lock and unlock functions Debugfs operations may set the page number, which must be done atomically with the subsequent i2c operation. Lock the update_lock in the debugfs functions and provide a function for pmbus drivers to lock and unlock the update_lock. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20230412161526.252294-2-eajames@linux.ibm.com Signed-off-by: Guenter Roeck commit ab3e00416a0078be6d4126edc139536286d816e2 Author: Guenter Roeck Date: Wed Apr 12 11:11:17 2023 -0700 hwmon: (pmbus/core) Request threaded interrupt with IRQF_ONESHOT 0-day rightfully complains: drivers/hwmon/pmbus/pmbus_core.c:3164:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ) Without IRQF_ONESHOT, the primary interrupt may end up in a loop, and the threaded interrupt handler may never execute. Request interrupt with IRQF_ONESHOT and assume that the interrupt will cleared and re-enabled by clearing the fault condition in the threaded interrupt handler. Reported-by: kernel test robot Link: https://lore.kernel.org/linux-hwmon/6436efbb.08+e+yEDqvRxvHDP%25lkp@intel.com/T/#u Cc: Patrick Rudolph Cc: Naresh Solanki Signed-off-by: Guenter Roeck commit 5dcd53e315b7cd3efb591227c281f979bebd2155 Author: Denis Pauk Date: Sat Apr 8 19:22:28 2023 +0300 hwmon: (nct6775) update ASUS WMI monitoring list A620/B760/W790 Boards such as * B360M-BASALT, * B360M-D3H, * EX-B360M-V, * EX-B360M-V3, * EX-B360M-V5, * EX-B760M-V5 D4, * PRIME A620M-A, * PRIME B460I-PLUS, * PRIME B460M-A, * PRIME B460M-K, * PRIME B550-PLUS AC-HES, * PRIME B660M-A AC D4, * PRIME B760M-A, * PRIME B760M-A AX D4, * PRIME B760M-A D4, * PRIME B760M-AJ D4, * PRIME B760M-A WIFI, * PRIME B760M-A WIFI D4, * PRIME B760M-K D4, * PRIME B760-PLUS, * PRIME B760-PLUS D4, * PRIME H310I-PLUS, * PRIME H310M-A, * PRIME H310M-C, * PRIME H310M-D, * PRIME H310M-DASH, * PRIME H310M-E, * PRIME H310M-E/BR, * PRIME H310M-F, * PRIME H310M-K, * PRIME H310-PLUS, * PRIME H310T, * PRIME H370-A, * PRIME H370M-PLUS, * PRIME H370-PLUS, * PRIME H410I-PLUS, * PRIME H470M-PLUS, * PRIME H470-PLUS, * PRIME H510M-R, * PRIME H510T2/CSM, * PRIME H570M-PLUS, * PRIME H570-PLUS, * PRIME H610M-R D4, * PRIME H670-PLUS D4, * PRIME H770-PLUS D4, * PRIME Q370M-C, * ProArt B760-CREATOR D4, * Pro B760M-C, * Pro B760M-CT, * PRO Q470M-C, * Pro Q670M-C, * Pro WS W790-ACE, * Pro WS W790E-SAGE SE, * ROG MAXIMUS Z690 FORMULA, * ROG MAXIMUS Z690 HERO, * ROG STRIX B360-F GAMING, * ROG STRIX B360-G GAMING, * ROG STRIX B360-H GAMING, * ROG STRIX B360-H GAMING/OPTANE, * ROG STRIX B360-I GAMING, * ROG STRIX B760-A GAMING WIFI, * ROG STRIX B760-A GAMING WIFI D4, * ROG STRIX B760-F GAMING WIFI, * ROG STRIX B760-G GAMING WIFI, * ROG STRIX B760-G GAMING WIFI D4, * ROG STRIX B760-I GAMING WIFI, * ROG STRIX H370-F GAMING, * ROG STRIX H370-I GAMING, * ROG STRIX H470-I GAMING, * ROG STRIX Z690-E GAMING WIFI, * ROG STRIX Z690-F GAMING WIFI, * ROG STRIX Z690-G GAMING WIFI, * TUF B360M-E GAMING, * TUF B360M-PLUS GAMING, * TUF B360M-PLUS GAMING/BR, * TUF B360M-PLUS GAMING S, * TUF B360-PLUS GAMING, * TUF B360-PRO GAMING, * TUF B360-PRO GAMING (WI-FI), * TUF GAMING A620M-PLUS, * TUF GAMING A620M-PLUS WIFI, * TUF GAMING B660M-PLUS D4, * TUF GAMING B660M-PLUS WIFI D4, * TUF GAMING B760M-BTF WIFI D4, * TUF GAMING B760M-E D4, * TUF GAMING B760M-PLUS, * TUF GAMING B760M-PLUS D4, * TUF GAMING B760M-PLUS WIFI, * TUF GAMING B760M-PLUS WIFI D4, * TUF GAMING B760-PLUS WIFI, * TUF GAMING B760-PLUS WIFI D4, * TUF GAMING H470-PRO, * TUF GAMING H470-PRO (WI-FI), * TUF GAMING H570-PRO, * TUF GAMING H570-PRO WIFI, * TUF GAMING H670-PRO WIFI D4, * TUF GAMING H770-PRO WIFI, * TUF GAMING X570-PRO WIFI II, * TUF H310M-PLUS GAMING, * TUF H310M-PLUS GAMING/BR, * TUF H310-PLUS GAMING, * TUF H370-PRO GAMING, * TUF H370-PRO GAMING (WI-FI), have got a nct6775 chip, but by default there's no use of it because of resource conflict with WMI method. This commit adds such boards to the WMI monitoring list. Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-off-by: Denis Pauk Link: https://lore.kernel.org/r/20230408162228.4291-1-pauk.denis@gmail.com Signed-off-by: Guenter Roeck commit ad20248a2d644087fc149e6a8db150bde826c16f Author: Svyatoslav Ryhel Date: Fri Apr 7 19:05:08 2023 +0300 hwmon: ina2xx: add optional regulator support TI ina2xx sensors according to datasheets have dedicated vs supplies. Add it for proper work. Signed-off-by: Svyatoslav Ryhel Link: https://lore.kernel.org/r/20230407160508.20479-3-clamor95@gmail.com Signed-off-by: Guenter Roeck commit 4173a5bb7f51e3726381af65c365c1aac7769b54 Author: Svyatoslav Ryhel Date: Fri Apr 7 19:05:07 2023 +0300 dt-bindings: hwmon: ina2xx: add supply property Add vs-supply property. Signed-off-by: Svyatoslav Ryhel Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407160508.20479-2-clamor95@gmail.com Signed-off-by: Guenter Roeck commit 9e51acc4dbed91265c3a3e04e9ab6bd63bc9819b Author: Cristian Ciocaltea Date: Thu Apr 6 21:20:00 2023 +0300 dt-bindings: hwmon: pwm-fan: Convert to DT schema Convert the PWM fan bindings to DT schema format. Signed-off-by: Cristian Ciocaltea Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230406182000.956275-2-cristian.ciocaltea@collabora.com Signed-off-by: Guenter Roeck commit 7a0c7b9ff21d35c398fe609b3e2c7c3eaf374d05 Author: Naresh Solanki Date: Tue Mar 28 17:03:35 2023 +0200 hwmon: (pmbus/core) Notify regulator events Notify regulator events in PMBus irq handler. Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20230328150335.90238-3-Naresh.Solanki@9elements.com Signed-off-by: Guenter Roeck commit f74f06f4069ec008cec62574a55415c4567f8acf Author: Patrick Rudolph Date: Tue Mar 28 17:03:34 2023 +0200 hwmon: (pmbus/core) Add regulator event support Add regulator events corresponding to regulator error in regulator flag map. Also capture the same in pmbus_regulator_get_flags. Signed-off-by: Patrick Rudolph Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20230328150335.90238-2-Naresh.Solanki@9elements.com Signed-off-by: Guenter Roeck commit ffe36eb557d375ff7667d249aecdf08ed5acf55d Author: Naresh Solanki Date: Tue Mar 28 17:03:33 2023 +0200 hwmon: (pmbus/core) Add rdev in pmbus_data struct Add regulator device in pmbus_data & initialize the same during PMBus regulator register. Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20230328150335.90238-1-Naresh.Solanki@9elements.com Signed-off-by: Guenter Roeck commit 7f2958e845d2c8bf1100dc088dbdc31af2a80fd0 Author: Emil Renner Berthing Date: Tue Mar 21 10:26:44 2023 +0800 hwmon: (sfctemp) Add StarFive JH71x0 temperature sensor Add driver for the StarFive JH71x0 temperature sensor. You can enable/disable it and read temperature in milli Celcius through sysfs. Signed-off-by: Emil Renner Berthing Co-developed-by: Samin Guo Signed-off-by: Samin Guo Signed-off-by: Hal Feng Link: https://lore.kernel.org/r/20230321022644.107027-3-hal.feng@starfivetech.com Signed-off-by: Guenter Roeck commit d16718fcdde702c70fd07f8f3e1e0f67166389aa Author: Emil Renner Berthing Date: Tue Mar 21 10:26:43 2023 +0800 dt-bindings: hwmon: Add starfive,jh71x0-temp Add bindings for the temperature sensor on the StarFive JH7100 and JH7110 SoCs. Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230321022644.107027-2-hal.feng@starfivetech.com Signed-off-by: Guenter Roeck commit a2930f6dc90f07b2d956cab5f98b594b16918132 Author: Zhang Rui Date: Thu Mar 30 18:33:46 2023 +0800 hwmon: (coretemp) Delete an obsolete comment The refinement of tjmax value retrieved from MSR_IA32_TEMPERATURE_TARGET has been changed for several times. Now, the raw value from MSR is used without refinement. Thus remove the obsolete comment. Signed-off-by: Zhang Rui Link: https://lore.kernel.org/r/20230330103346.6044-2-rui.zhang@intel.com Signed-off-by: Guenter Roeck commit 6c2b659913ad9c70c30050efc3e287fd0869012a Author: Zhang Rui Date: Thu Mar 30 18:33:45 2023 +0800 hwmon: (coretemp) Delete tjmax debug message After commit c0c67f8761ce ("hwmon: (coretemp) Add support for dynamic tjmax"), tjmax value is retrieved from MSR every time the temperature is read. This means that, with debug message enabled, the tjmax debug message is printed out for every single temperature read for any CPU. This spams the syslog. Ideally, as tjmax is package scope unique, the debug message should show once when tjmax is changed for one package. But this requires inventing some new per-package data in the coretemp driver, and this is overkill. To keep the code simple, delete the tjmax debug message. Signed-off-by: Zhang Rui Link: https://lore.kernel.org/r/20230330103346.6044-1-rui.zhang@intel.com Signed-off-by: Guenter Roeck commit 3a31e0920308487331e53a53c4133ce1d8e12ad9 Author: Eugene Shalygin Date: Thu Apr 6 00:43:39 2023 +0200 hwmon: (asus-ec-sensors) add ROG STRIX Z390-F GAMING The definition comes from a LHM PR [1], and the mutex path from the ACPI dump, kindly provided by the PR author [2] [1] https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/pull/1031 [2] https://github.com/zeule/asus-ec-sensors/issues/36 Signed-off-by: Eugene Shalygin Link: https://lore.kernel.org/r/20230405224339.358675-3-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck commit c7ba3e26fd988116c98e7c8b9c27262b78db594c Author: fireflame90051 Date: Thu Apr 6 00:43:38 2023 +0200 hwmon: (asus-ec-sensors) add ProArt B550-Creator Add support for the ASUS ProArt B550-Creator board, was tested with the hardware [1]. [1] https://github.com/zeule/asus-ec-sensors/issues/35 Signed-off-by: Eugene Shalygin Signed-off-by: fireflame90051 Link: https://lore.kernel.org/r/20230405224339.358675-2-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck commit b0eb085b4f960a2961e566b5608470e493b2003d Author: James Seo Date: Wed Apr 5 07:31:07 2023 +0000 hwmon: fix typo in Makefile Fix the spelling of "ACPI" in Makefile. Signed-off-by: James Seo Link: https://lore.kernel.org/r/20230405073056.53466-3-james@equiv.tech Signed-off-by: Guenter Roeck commit 38c92a3110106e1b75d6d3c237478a11fefb461f Author: James Seo Date: Wed Apr 5 07:31:05 2023 +0000 hwmon: remove trailing whitespace in Kconfig Remove an unneeded trailing space. Signed-off-by: James Seo Link: https://lore.kernel.org/r/20230405073056.53466-2-james@equiv.tech Signed-off-by: Guenter Roeck commit 3bf8437be3755084e77cea6b68aec71235301cbe Author: Krzysztof Kozlowski Date: Thu Apr 6 22:40:27 2023 +0200 hwmon: w83773g: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit b418bd0a3119ae97cdfc9ab71193e494efc5add8 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:40:26 2023 +0200 hwmon: w83627ehf: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 7325fea5a5213d91805dc9dc448686b110df82ec Author: Krzysztof Kozlowski Date: Thu Apr 6 22:40:25 2023 +0200 hwmon: tps23861: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit b39c94a1f6f0aa3c0438588340495d5c777e2f4f Author: Krzysztof Kozlowski Date: Thu Apr 6 22:40:24 2023 +0200 hwmon: tmp513: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 98bc085cae3e350fdf1e4b7f60c8fd80dc6b84cc Author: Krzysztof Kozlowski Date: Thu Apr 6 22:40:23 2023 +0200 hwmon: tmp464: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 1198c51f8fb312450c0cb01f989d2537d43dcd0b Author: Krzysztof Kozlowski Date: Thu Apr 6 22:40:22 2023 +0200 hwmon: tmp108: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit a705bc468840a3392771477a28aaa394b493aecc Author: Krzysztof Kozlowski Date: Thu Apr 6 22:40:21 2023 +0200 hwmon: tmp103: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit fc3ad66804807efa88a6e8c97869ada1b59a257d Author: Krzysztof Kozlowski Date: Thu Apr 6 22:40:20 2023 +0200 hwmon: tmp102: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 5b5d8ae01954350f47b9d601ebfc7f96563c3496 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:40:19 2023 +0200 hwmon: sy7636a: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit dc8811447c6be6959b0f18b5a06fd9eafeba32c6 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:38:21 2023 +0200 hwmon: sparx5-temp: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit d302988c9867bc0daf2bf4057588a59fb2e637f6 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:38:20 2023 +0200 hwmon: smpro: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 7f46e9883f530068473f2adae93d3cf4a2f8b92e Author: Krzysztof Kozlowski Date: Thu Apr 6 22:38:19 2023 +0200 hwmon: sl28cpld: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 11c1dff58c65ee6a5cbfa19af049ee8af01a91c6 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:38:18 2023 +0200 hwmon: sht4x: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 1ff3d23d00184dc350394e3ca53fdce87daa1bc1 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:38:17 2023 +0200 hwmon: sch5627: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit eeda3a44532371bf72ef80d163326ca1c65a5bda Author: Krzysztof Kozlowski Date: Thu Apr 6 22:38:16 2023 +0200 hwmon: sbtsi_temp: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 29423978b76912b43ebb9ac6433be0f9dd7bd8fa Author: Krzysztof Kozlowski Date: Thu Apr 6 22:38:15 2023 +0200 hwmon: sbrmi: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 70df9a55434b2c05f70163524007f1b4382489a3 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:38:14 2023 +0200 hwmon: raspberrypi: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 42d273bcf4f2e74aa5591fa6a497c9ee48fe523e Author: Krzysztof Kozlowski Date: Thu Apr 6 22:38:13 2023 +0200 hwmon: powr1220: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 0c15d66d071c3490a9a3004b5a4c6f7524041a99 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:38:12 2023 +0200 hwmon: peci: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 195030d34ee9a77e851b23b9d5f174860e21a982 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:35:30 2023 +0200 hwmon: oxp-sensors: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 98ce1fc134ef4450c798a9e198261b6d0b9b7cb2 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:35:29 2023 +0200 hwmon: nzxt: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 9add51f2bc65340e5a42efa8f7312fbd9d13ee61 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:35:28 2023 +0200 hwmon: ntc_thermistor: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit ed30302c3bccc1be2c3b3205c37b3f3a0da55138 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:35:27 2023 +0200 hwmon: npcm750-pwm: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 2a06edbe33b21a7c6851f5d4f81f73e1407af040 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:35:26 2023 +0200 hwmon: nct7904: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit bb54a54b5c660053e96032209c5f75c72070b676 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:35:25 2023 +0200 hwmon: mlxreg: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit d716e0cf674d016ddeaeb25bede1bcd15366bc7f Author: Krzysztof Kozlowski Date: Thu Apr 6 22:35:24 2023 +0200 hwmon: mcp3021: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 11305fd37b428e9afddd4acdc104d87774162c09 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:35:23 2023 +0200 hwmon: mc34vr500: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 1c80f98754952749873d02bea5e67883733e7b42 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:36 2023 +0200 hwmon: max6650: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit a7bae59766835188917b3d1f186ecf02f5628cde Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:35 2023 +0200 hwmon: max6621: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit b3fcd02c608184e1ab42710d4bc58b4c15fbf873 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:34 2023 +0200 hwmon: max6620: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 822ce415baa4f46e0c8fe03944ccd1bcee199583 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:33 2023 +0200 hwmon: max31790: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 02681a9f33ab1e18e7838b69c637ca3ec80ddb36 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:32 2023 +0200 hwmon: max31760: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit c70164adbbdd15bc793bd4eed776ec4752dced82 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:31 2023 +0200 hwmon: max31730: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 2b1aec842ee248b2320cdaeea23c9ce6d4c3ea58 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:30 2023 +0200 hwmon: max127: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 894fce118b8dbf3c5b93cd3e0fab186bae35a48f Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:29 2023 +0200 hwmon: ltq-cputemp: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 38ab6d602ea1c332f06f9b22bcee5ea69deab14c Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:28 2023 +0200 hwmon: ltc4245: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 8cbafa6efece730bfb6f11829ec64c80437fbc96 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:27 2023 +0200 hwmon: ltc2992: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 53dc67eb935c8a3e18a06d10847cd761bd715ac4 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:26 2023 +0200 hwmon: ltc2947: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit bf36b752ca464582a0ec67fedf647d841071320e Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:25 2023 +0200 hwmon: lochnagar: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 043f90c8d103f05bdb63aa03afd4d84e1a77bf41 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:24 2023 +0200 hwmon: lm95245: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 1d0cfeb2ea93c6378d62cab88a512a570578c152 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:23 2023 +0200 hwmon: lm95241: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 3c370243cbfa2d194fe9caa36772bf9d8e83110d Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:22 2023 +0200 hwmon: lm83: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 3ee2ceca3f1d65503a9d599a67d92a52a4aea5dc Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:21 2023 +0200 hwmon: lm75: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 2d9011813e5ff462fef0c93d6fcea5a152b702ba Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:20 2023 +0200 hwmon: lan966x: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 55f4466382313d17fb0712e7733d75a91c380f04 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:19 2023 +0200 hwmon: k8temp: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 4dd50f3c1d6521d8f4a688bb00d0228fbe65b2b8 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:18 2023 +0200 hwmon: k10temp: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit b3dc5eee6b2dce921ccfd40dd209b26885a31093 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:17 2023 +0200 hwmon: jc42: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit e374c4100b6154f80aaf12af39c67a942b519a87 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:16 2023 +0200 hwmon: intel-m10-bmc: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 324399753854b8aaa6a621902a33e77f4425e7cf Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:15 2023 +0200 hwmon: ina3221: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit bf9b7f92df737654fc7f3fff3fab320e97ff33de Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:14 2023 +0200 hwmon: ina238: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 92b978fe7616486d9cbefbf2d99267f4258b758e Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:13 2023 +0200 hwmon: i5500_temp: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit d6171e4d3229fb671706edba14052897a353f262 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:12 2023 +0200 hwmon: gxp-fan: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 06c3779625378bb1ceb27e83e0366a2bef6707a8 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:11 2023 +0200 hwmon: ftsteutates: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit c1686de1db3656b0fe91dce44c0dffe084d07853 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:10 2023 +0200 hwmon: emc2305: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit b9adb6b6654486cebdf3b96bf2330d6958c9c326 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:09 2023 +0200 hwmon: drivetemp: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit f4ddd8f2e12f75fcbf956fa6845a11dc0455c040 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:08 2023 +0200 hwmon: dell-smm: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 42bd7a59f3b54f8f7dcf802001a8ed8ebb6cabd6 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:07 2023 +0200 hwmon: corsair: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit edcde8cfefb9809fea5172fcc3f4993c01bed4f1 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:06 2023 +0200 hwmon: bt1-pvt: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit a1e308bfae71d1f464edeb40141b23b1c1a86519 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:05 2023 +0200 hwmon: axi-fan: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 69a1ffca989e0b43afda1b8c93a43433a1c9ec60 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:04 2023 +0200 hwmon: as370: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 832dc5106e813b4dc942bce27f89819f8d21fbd7 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:03 2023 +0200 hwmon: aquacomputer: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit b9ab28a7749895e9ef20c5a70642825479d4dc75 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:02 2023 +0200 hwmon: aht10: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit d7bb04c3e226350d0f99aaf900ecb6f324173c14 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:01 2023 +0200 hwmon: adt7x10: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit ce94ff2ef9758797c4c1670fb90c3d5060024525 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:30:00 2023 +0200 hwmon: adt7470: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 07aa164a503878a83a8e8319109f69ce863a10c3 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:29:59 2023 +0200 hwmon: adt7411: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 013adc9852a1352007722c3e42986cb6e03a99be Author: Krzysztof Kozlowski Date: Thu Apr 6 22:29:58 2023 +0200 hwmon: adm9240: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 63bde65918e60c679e58dcc382b19cf24cc3f07a Author: Krzysztof Kozlowski Date: Thu Apr 6 22:29:57 2023 +0200 hwmon: adm1177: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 7165bfc9b89e5c144d63391e2229a905c920f1db Author: Krzysztof Kozlowski Date: Thu Apr 6 22:47:50 2023 +0200 MAINTAINERS: hwmon: drop Agathe Porte Mails to Agathe Porte bounce ("550 5.4.1 Recipient address rejected: Access denied. AS(201806281)"). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230406204750.3017850-1-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck commit a4fffe48e4bab49b991490abd3e6d4bd98af2610 Author: Denis Pauk Date: Thu Mar 23 23:27:51 2023 +0200 hwmon: (nct6775) update ASUS WMI monitoring list B360/H410/H610/Z390... Boards such as * EX-B460M-V5, * EX-H410M-V3, * PRIME B360M-D, * PRIME B360M-K, * PRIME H410M-A, * PRIME H410M-D, * PRIME H410M-E, * PRIME H410M-F, * PRIME H410M-K, * PRIME H410M-K R2.0, * PRIME H510M-K R2.0, * PRIME Z390-A, * PRIME Z390-A/H10, * PRIME Z390-P, * PRIME Z390M-PLUS, * PRIME Z490-A, * PRIME Z490-P, * PRIME Z490-V, * PRIME Z490M-PLUS, * PRO B460M-C, * PRO H410M-C, * ROG MAXIMUS XI APEX, * ROG MAXIMUS XI CODE, * ROG MAXIMUS XI EXTREME, * ROG MAXIMUS XI FORMULA, * ROG MAXIMUS XI GENE, * ROG MAXIMUS XI HERO, * ROG MAXIMUS XI HERO (WI-FI), * ROG MAXIMUS XII APEX, * ROG MAXIMUS XII EXTREME, * ROG MAXIMUS XII FORMULA, * ROG MAXIMUS XII HERO (WI-FI), * ROG STRIX B460-F GAMING, * ROG STRIX B460-G GAMING, * ROG STRIX B460-H GAMING, * ROG STRIX B460-I GAMING, * TUF GAMING B460-PLUS, * TUF GAMING B460-PRO (WI-FI), * TUF GAMING B460M-PLUS, * TUF GAMING B460M-PLUS (WI-FI), * TUF GAMING B460M-PRO, * TUF GAMING B550-PLUS (WI-FI), * TUF GAMING B550M ZAKU (WI-FI), * TUF Z390-PLUS GAMING, * TUF Z390-PLUS GAMING (WI-FI), * TUF Z390-PRO GAMING, * TUF Z390M-PRO GAMING, * TUF Z390M-PRO GAMING (WI-FI), * WS Z390 PRO, * B560M-P, * EX-B560M-V5, * EX-H510M-V3, * EX-H610M-V3 D4, * PRIME B560-PLUS, * PRIME B560-PLUS AC-HES, * PRIME B560M-A, * PRIME B560M-A AC, * PRIME B560M-K, * PRIME B660-PLUS D4, * PRIME H510M-A, * PRIME H510M-A WIFI, * PRIME H510M-D, * PRIME H510M-E, * PRIME H510M-F, * PRIME H510M-K, * PRIME H610I-PLUS D4, * PRIME H610M-A D4, * PRIME H610M-A WIFI D4, * PRIME H610M-D D4, * PRIME H610M-E D4, * PRIME H610M-F D4, * PRIME H610M-K D4, * PRIME Z690-A, * PRIME Z690-P, * PRIME Z690-P D4, * PRIME Z690-P WIFI, * PRIME Z690-P WIFI D4, * PRIME Z690M-PLUS D4, * PRIME Z790-A WIFI, * PRIME Z790-P, * PRIME Z790-P D4, * PRIME Z790-P WIFI, * PRIME Z790-P WIFI D4, * PRIME Z790M-PLUS, * PRIME Z790M-PLUS D4, * Pro B560M-C, * Pro B560M-CT, * Pro H510M-C, * Pro H510M-CT, * Pro H610M-C, * Pro H610M-C D4, * Pro H610M-CT D4, * Pro H610T D4, * ProArt Z690-CREATOR WIFI, * ROG MAXIMUS Z690 HERO EVA, * ROG MAXIMUS Z790 APEX, * ROG MAXIMUS Z790 HERO, * ROG STRIX B560-A GAMING WIFI, * ROG STRIX B560-E GAMING WIFI, * ROG STRIX B560-F GAMING WIFI, * ROG STRIX B560-G GAMING WIFI, * ROG STRIX B560-I GAMING WIFI, * ROG STRIX Z690-A GAMING WIFI, * ROG STRIX Z690-I GAMING WIFI, * ROG STRIX Z790-A GAMING WIFI, * ROG STRIX Z790-A GAMING WIFI D4, * ROG STRIX Z790-E GAMING WIFI, * ROG STRIX Z790-F GAMING WIFI, * ROG STRIX Z790-H GAMING WIFI, * ROG STRIX Z790-I GAMING WIFI, * TUF GAMING B560-PLUS WIFI, * TUF GAMING B560M-E, * TUF GAMING B560M-PLUS, * TUF GAMING B560M-PLUS WIFI, * TUF GAMING Z690-PLUS, * TUF GAMING Z690-PLUS D4, * TUF GAMING Z690-PLUS WIFI, * TUF GAMING Z690-PLUS WIFI D4, * TUF GAMING Z790-PLUS D4, * TUF GAMING Z790-PLUS WIFI, * TUF GAMING Z790-PLUS WIFI D4, have got a nct6775 chip, but by default there's no use of it because of resource conflict with WMI method. This commit adds such boards to the WMI monitoring list. Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-off-by: Denis Pauk Tested-by: Alejandro González Tested-by: bruno Tested-by: renedis Link: https://lore.kernel.org/r/20230323212751.2474-3-pauk.denis@gmail.com Signed-off-by: Guenter Roeck commit c05403e64d7feb12ac31cf785a61b665970cc821 Author: Denis Pauk Date: Thu Mar 23 23:27:50 2023 +0200 hwmon: (nct6775) Fix ROG B550-XE WIFI and Pro B660M-C D4 names ROG STRIX B550-XE GAMING WIFI motherboard is incorrectly named as ROG STRIX B550-XE GAMING (WI-FI). Pro B660M-C D4 motherboard is incorrectly named as Pro B660M-C-D4. Validated by dmidecode output from https://github.com/linuxhw/DMI/ Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-off-by: Denis Pauk Link: https://lore.kernel.org/r/20230323212751.2474-2-pauk.denis@gmail.com Signed-off-by: Guenter Roeck commit 0282592678b1e397916db36052986380d5fe4ec6 Author: Denis Pauk Date: Thu Mar 23 23:27:49 2023 +0200 hwmon: (nct6775) Sort ASUS board list Rearrange board list in alphabetical order by: LC_ALL=C sort -u Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-off-by: Denis Pauk Link: https://lore.kernel.org/r/20230323212751.2474-1-pauk.denis@gmail.com Signed-off-by: Guenter Roeck commit 8ea57c51e508d8c6ce1531b5336199ceeda39120 Author: Tom Rix Date: Thu Mar 23 17:15:35 2023 -0400 hwmon: remove unused superio_outb function clang with W=1 reports drivers/hwmon/vt1211.c:198:20: error: unused function 'superio_outb' [-Werror,-Wunused-function] static inline void superio_outb(int sio_cip, int reg, int val) ^ This function is not used so remove it. Signed-off-by: Tom Rix Acked-by: Juerg Haefliger Link: https://lore.kernel.org/r/20230323211535.2637939-1-trix@redhat.com Signed-off-by: Guenter Roeck commit a7da8a8bf19b758d6db50a1c09627b0422fe98db Author: Lorenz Brun Date: Thu Mar 9 02:10:08 2023 +0100 hwmon: (pwm-fan) set usage_power on PWM state PWM fans are controlled solely by the duty cycle of the PWM signal, they do not care about the exact timing. Thus set usage_power to true to allow less flexible hardware to work as a PWM source for fan control. Signed-off-by: Lorenz Brun Link: https://lore.kernel.org/r/20230309011009.2109696-1-lorenz@brun.one Signed-off-by: Guenter Roeck commit dedbe4c1499cf1b7b0357872cf858221f583bfc0 Author: Frank Crawford Date: Sat Mar 18 19:05:43 2023 +1100 hwmon: (it87) Use voltage scaling macro where appropriate Apply scaling macro to match the labels for internal voltage sensors. Signed-off-by: Frank Crawford Link: https://lore.kernel.org/r/20230318080543.1226700-3-frank@crawford.emu.id.au Signed-off-by: Guenter Roeck commit bcd2fbec8a2583f4180ffc8b453c24fad2068306 Author: Denis Pauk Date: Thu Mar 16 00:51:28 2023 +0200 hwmon: (nct6775) update ASUS WMI monitoring list A520/B360/B460/B550... Boards such as * EX-B660M-V5 D4, * PRIME A520M-A, * PRIME A520M-A II, * PRIME A520M-E, * PRIME A520M-K, * PRIME B360M-A, * PRIME B360M-C, * PRIME B460M-A R2.0, * PRIME B550M-A AC, * PRIME B550M-A WIFI II, * PRIME B550M-K, * PRIME B650M-A AX II, * PRIME Z590-P WIFI, * PRIME Z590-V, * Pro A520M-C, * ProArt B650-CREATOR, * ProArt Z790-CREATOR WIFI, * Pro B660M-C, * Pro WS W680-ACE, * Pro WS W680-ACE IPMI, * ROG MAXIMUS XIII APEX, * ROG MAXIMUS XIII EXTREME, * ROG MAXIMUS XIII HERO, * ROG MAXIMUS Z690 APEX, * ROG MAXIMUS Z790 EXTREME, * ROG STRIX B660-A GAMING WIFI, * ROG STRIX Z590-A GAMING WIFI, * ROG STRIX Z590-E GAMING WIFI, * ROG STRIX Z590-F GAMING WIFI, * ROG STRIX Z590-I GAMING WIFI, * TUF GAMING A520M-PLUS, * TUF GAMING A520M-PLUS II, * TUF GAMING A520M-PLUS WIFI, * TUF GAMING B660M-E D4, * TUF GAMING B660-PLUS WIFI D4, * TUF GAMING X570-PLUS_BR, * TUF GAMING Z590-PLUS, * Z490-GUNDAM (WI-FI), * Z590 WIFI GUNDAM EDITION have got a nct6775 chip, but by default there's no use of it because of resource conflict with WMI method. This commit adds such boards to the WMI monitoring list. Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-off-by: Denis Pauk Tested-by: Nick Owens Tested-by: A. M. Link: https://lore.kernel.org/r/20230315225128.1236-1-pauk.denis@gmail.com Signed-off-by: Guenter Roeck commit 23e8a379cf5c29a97c63016e1554de731b26a29b Author: Denis Pauk Date: Wed Mar 15 23:01:34 2023 +0200 hwmon: (nct6775) Fix TUF GAMING B550M-E WIFI name TUF GAMING B550M-E WIFI motherboard is incorrectly named as TUF GAMING B550M-E (WI-FI). Validated by dmidecode output from https://github.com/linuxhw/DMI/ Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-off-by: Denis Pauk Link: https://lore.kernel.org/r/20230315210135.2155-1-pauk.denis@gmail.com Signed-off-by: Guenter Roeck commit ea00552690bb408a8d1c361edf626d1bfe961f74 Author: Holger Kiehl Date: Mon Mar 13 13:10:31 2023 +0000 hwmon: (nct6775) add Asus Pro A520M-C II/CSM An NCT6798D chip is now detected: dmesg|grep nct6775 [ 23.765392] nct6775: Found NCT6798D or compatible chip at 0x2e:0x290 And sensors now shows: nct6798-isa-0290 Adapter: ISA adapter in0: 312.00 mV (min = +0.00 V, max = +1.74 V) in1: 1.02 V (min = +0.00 V, max = +0.00 V) ALARM in2: 3.42 V (min = +0.00 V, max = +0.00 V) ALARM in3: 3.38 V (min = +0.00 V, max = +0.00 V) ALARM in4: 1.03 V (min = +0.00 V, max = +0.00 V) ALARM in5: 1.02 V (min = +0.00 V, max = +0.00 V) ALARM in6: 200.00 mV (min = +0.00 V, max = +0.00 V) ALARM in7: 3.42 V (min = +0.00 V, max = +0.00 V) ALARM in8: 3.28 V (min = +0.00 V, max = +0.00 V) ALARM in9: 920.00 mV (min = +0.00 V, max = +0.00 V) ALARM in10: 512.00 mV (min = +0.00 V, max = +0.00 V) ALARM in11: 504.00 mV (min = +0.00 V, max = +0.00 V) ALARM in12: 1.03 V (min = +0.00 V, max = +0.00 V) ALARM in13: 256.00 mV (min = +0.00 V, max = +0.00 V) ALARM in14: 1.47 V (min = +0.00 V, max = +0.00 V) ALARM fan1: 0 RPM (min = 0 RPM) fan2: 0 RPM (min = 0 RPM) fan3: 355 RPM (min = 0 RPM) fan7: 0 RPM (min = 0 RPM) SYSTIN: +25.0°C (high = +80.0°C, hyst = +75.0°C) sensor = thermistor CPUTIN: +26.5°C (high = +80.0°C, hyst = +75.0°C) sensor = thermistor AUXTIN0: +97.0°C sensor = thermistor AUXTIN1: +25.0°C sensor = thermistor AUXTIN2: +25.0°C sensor = thermistor AUXTIN3: +1.0°C sensor = thermistor PECI Agent 0 Calibration: +26.0°C PCH_CHIP_CPU_MAX_TEMP: +0.0°C PCH_CHIP_TEMP: +0.0°C PCH_CPU_TEMP: +0.0°C TSI0_TEMP: +27.9°C intrusion0: ALARM intrusion1: OK beep_enable: disabled Signed-off-by: Holger Kiehl Tested-by: Holger Kiehl Link: https://lore.kernel.org/r/868bdc4f-9d45-475c-963e-f5232a8b95@praktifix.dwd.de Signed-off-by: Guenter Roeck commit aededf875a233b2b890af0000aa1b8f17b5351a0 Author: Guenter Roeck Date: Wed Mar 15 14:41:30 2023 -0700 Documentation/hwmon: Remove description of deprecated registration functions Remove description of deprecated registration functions from the hardware monitoring kernel API documentation to help ensure that no attempts are made to use them in new drivers. Signed-off-by: Guenter Roeck commit 9fadbda6d1e0c1022fc77fa14461d1f475b83510 Author: Stefan Wahren Date: Sun Mar 12 16:57:14 2023 +0100 docs: hwmon: sysfs-interface: Fix stray colon The commit 036d6a4e75c9 ("ABI: sysfs-class-hwmon: add ABI documentation for it") moved all ABI attributes to the usual ABI documentation. But this change left a stray colon for the fan speed control method. Fix this to avoid a confusion of readers. Fixes: 036d6a4e75c9 ("ABI: sysfs-class-hwmon: add ABI documentation for it") Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20230312155714.17290-1-stefan.wahren@i2se.com Signed-off-by: Guenter Roeck commit f469bde9afd136598a0c4edc054296e6046f90ee Author: Patrick Rudolph Date: Wed Mar 1 17:44:34 2023 +0100 hwmon: (pmbus/core) Notify hwmon events Notify hwmon events using the pmbus irq handler. Signed-off-by: Patrick Rudolph Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20230301164434.1928237-4-Naresh.Solanki@9elements.com Signed-off-by: Guenter Roeck commit 221819ca4c36e13a77475af56e8481dfb0a85646 Author: Patrick Rudolph Date: Wed Mar 1 17:44:33 2023 +0100 hwmon: (pmbus/core) Add interrupt support Implement PMBUS irq handler. Signed-off-by: Patrick Rudolph Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20230301164434.1928237-3-Naresh.Solanki@9elements.com Signed-off-by: Guenter Roeck commit df5f6b6af01ca326dd4babb287c9580fed0ad3d6 Author: Naresh Solanki Date: Wed Mar 1 17:44:32 2023 +0100 hwmon: (pmbus/core) Generalise pmbus get status Add function pmbus get status that can be used to get both pmbus specific status & regulator status Signed-off-by: Naresh Solanki Reviewed-by: Guenter Roeck ... Change in V4 - None Changes in V3: - Add pmbus_is_enabled function Changes in V2: - Add __maybe attribute for pmbus_get_status function - Remove unrelated changes Link: https://lore.kernel.org/r/20230301164434.1928237-2-Naresh.Solanki@9elements.com Signed-off-by: Guenter Roeck commit 7ab0da3a77fe62670877b986028861dc098532ae Author: Naresh Solanki Date: Wed Mar 1 17:44:31 2023 +0100 hwmon: (pmbus/core) Generalize pmbus status flag map The PMBus status flag map(pmbus_regulator_status_flag_map) is moved outside of the regulator #if block and the associated variable/struct name updated to reflect as generic PMBus status. This will make the PMBus status flag map more versatile and easier to incorporate into different contexts and functions. Signed-off-by: Naresh Solanki Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230301164434.1928237-1-Naresh.Solanki@9elements.com Signed-off-by: Guenter Roeck commit bd1e92f9977c78a04e9fe401e359feb67aacb7f9 Author: Leonard Anderweit Date: Tue Feb 14 23:02:21 2023 +0100 hwmon: (aquacomputer_d5next) Add fan PWM control for Aquaero Add the option to control fan PWM on Aquacomputer Aquaero. The Aquaero is the most complex Aquacomputer device, control is therefore more complicated then on already supported devices. Setting PWM requires multiple steps. First, an internal static PWM controller is set to the desired PWM value. Second, the fan is set to use that PWM controller. Last, the minimum and maximum accepted PWM values of the fan are set to allow all possible PWM values. Signed-off-by: Leonard Anderweit Link: https://lore.kernel.org/r/20230214220221.15003-7-leonard.anderweit@gmail.com Signed-off-by: Guenter Roeck commit 866e630a3b8b48688f0656e3c31da436493e8a99 Author: Leonard Anderweit Date: Tue Feb 14 23:02:20 2023 +0100 hwmon: (aquacomputer_d5next) Add temperature offset control for Aquaero Adds control over the Aquacomputer Aquaero temperature offset for all eight temperature sensors. Signed-off-by: Leonard Anderweit Link: https://lore.kernel.org/r/20230214220221.15003-6-leonard.anderweit@gmail.com Signed-off-by: Guenter Roeck commit 6c83ccb10c49e4867299a7ad34a0712c72d1f1a4 Author: Leonard Anderweit Date: Tue Feb 14 23:02:19 2023 +0100 hwmon: (aquacomputer_d5next) Add infrastructure for Aquaero control reports Add information on the Aquacomputer Aquaero control report and disable the control report checksum for Aquaero. The Aquaero does not use the checksum so it must be disabled to avoid overwriting the last two bytes of the control report. Signed-off-by: Leonard Anderweit Link: https://lore.kernel.org/r/20230214220221.15003-5-leonard.anderweit@gmail.com Signed-off-by: Guenter Roeck commit b29090bac9358344804b6d2007d9ec68d252cda4 Author: Leonard Anderweit Date: Tue Feb 14 23:02:18 2023 +0100 hwmon: (aquacomputer_d5next) Device dependent control report settings Add device dependent control report id, secondary control report id, secondary control report size and secondary control report for devices which need different control report settings. All currently supported devices use the same values. Signed-off-by: Leonard Anderweit Link: https://lore.kernel.org/r/20230214220221.15003-4-leonard.anderweit@gmail.com Signed-off-by: Guenter Roeck commit 4d09d155a5d1aa984cba70e52609a3587149a911 Author: Leonard Anderweit Date: Tue Feb 14 23:02:17 2023 +0100 hwmon: (aquacomputer_d5next) Support writing multiple control values at once Add new function aqc_set_ctrl_vals() to support changing multiple control values at once while sending only one control report. Signed-off-by: Leonard Anderweit Link: https://lore.kernel.org/r/20230214220221.15003-3-leonard.anderweit@gmail.com Signed-off-by: Guenter Roeck commit d0450fc1e3960ef2cd9aeea1b525bb513ee387bb Author: Leonard Anderweit Date: Tue Feb 14 23:02:16 2023 +0100 hwmon: (aquacomputer_d5next) Support one byte control values Add support for one byte control values. This extends aqc_set_ctrl_val() and aqc_get_ctrl_val() with a type. Currently supported types are AQC_8 (one byte) and AQC_BE16 (two bytes big endian). More types will be added in the future. Signed-off-by: Leonard Anderweit Link: https://lore.kernel.org/r/20230214220221.15003-2-leonard.anderweit@gmail.com Signed-off-by: Guenter Roeck commit 90b86248d31eb3d56b243487c188d0f5a3d24fdb Author: Erik Ekman Date: Mon Feb 27 10:03:11 2023 +0100 hwmon: (nct6775) ASUS PRIME Z590 boards support Tested on Z590M-PLUS. dmesg log: nct6775: Found NCT6798D or compatible chip at 0x2e:0x290 sensors output: nct6798-isa-0290 Adapter: ISA adapter in0: 672.00 mV (min = +0.00 V, max = +1.74 V) in1: 1000.00 mV (min = +0.00 V, max = +0.00 V) ALARM in2: 3.38 V (min = +0.00 V, max = +0.00 V) ALARM in3: 3.28 V (min = +0.00 V, max = +0.00 V) ALARM in4: 1.01 V (min = +0.00 V, max = +0.00 V) ALARM in5: 808.00 mV (min = +0.00 V, max = +0.00 V) ALARM in6: 1000.00 mV (min = +0.00 V, max = +0.00 V) ALARM in7: 3.38 V (min = +0.00 V, max = +0.00 V) ALARM in8: 3.20 V (min = +0.00 V, max = +0.00 V) ALARM in9: 528.00 mV (min = +0.00 V, max = +0.00 V) ALARM in10: 672.00 mV (min = +0.00 V, max = +0.00 V) ALARM in11: 528.00 mV (min = +0.00 V, max = +0.00 V) ALARM in12: 1.21 V (min = +0.00 V, max = +0.00 V) ALARM in13: 992.00 mV (min = +0.00 V, max = +0.00 V) ALARM in14: 1.02 V (min = +0.00 V, max = +0.00 V) ALARM fan1: 971 RPM (min = 0 RPM) fan2: 1525 RPM (min = 0 RPM) fan3: 0 RPM (min = 0 RPM) fan4: 1094 RPM (min = 0 RPM) fan5: 0 RPM (min = 0 RPM) fan6: 0 RPM (min = 0 RPM) fan7: 0 RPM (min = 0 RPM) SYSTIN: +36.0°C (high = +80.0°C, hyst = +75.0°C) sensor = thermistor CPUTIN: +40.0°C (high = +80.0°C, hyst = +75.0°C) sensor = thermistor AUXTIN0: +26.0°C sensor = thermistor AUXTIN1: +8.0°C sensor = thermistor AUXTIN2: +22.0°C sensor = thermistor AUXTIN3: +25.0°C sensor = thermistor PECI Agent 0 Calibration: +40.0°C PCH_CHIP_CPU_MAX_TEMP: +0.0°C PCH_CHIP_TEMP: +55.0°C PCH_CPU_TEMP: +0.0°C intrusion0: OK intrusion1: ALARM beep_enable: disabled Signed-off-by: Erik Ekman Link: https://lore.kernel.org/r/20230227090312.91091-1-erik@kryo.se Signed-off-by: Guenter Roeck commit 92e58a87a26cd2fd7c12165e68d5bd53c8cfb122 Author: Kang Chen Date: Mon Feb 27 11:09:12 2023 +0800 hwmon: (g762) add a check of devm_add_action in g762_of_clock_enable devm_add_action may fails, check it and do the cleanup. Signed-off-by: Kang Chen Link: https://lore.kernel.org/r/20230227030913.893004-1-void0red@gmail.com Signed-off-by: Guenter Roeck commit dbfeafdad31c52da8965819a298ed3b0127025e7 Author: Kang Chen Date: Mon Feb 27 17:15:34 2023 +0800 hwmon: (nzxt-smart2) handle failure of devm_add_action in nzxt_smart2_hid_probe 1. replace the devm_add_action with devm_add_action_or_reset to ensure the mutex lock can be destroyed when it fails. 2. use local wrapper function mutex_fini instead of mutex_destroy to avoid undefined behaviours. 3. add a check of devm_add_action_or_reset and return early when it fails. Link: https://lore.kernel.org/all/f5043281-9b3e-e454-16fe-ef4cde36dfdb@roeck-us.net Signed-off-by: Kang Chen Link: https://lore.kernel.org/r/20230227091534.907101-1-void0red@gmail.com Signed-off-by: Guenter Roeck commit 37ef30fbf2894e1acd5aa7cc1dccfc54039cecd5 Author: Armin Wolf Date: Sun Feb 26 02:48:30 2023 +0100 hwmon: (ftsteutates) Update specifications website The Fujitsu OEM Mainboard business was acquired by Kontron, so the specifications of the Teutates chip was transferred to the new Kontron FTP server. Update the specifications website accordingly. The outdated sensors how-to was omitted. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20230226014830.10929-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit 914b2fd2cd928f1eccd753e30707800b53acbeec Author: Rob Herring Date: Fri Mar 10 08:47:06 2023 -0600 hwmon: (ibmpowernv, pwm-fan) Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144706.1542434-1-robh@kernel.org Signed-off-by: Guenter Roeck commit 50c3480b6db859ce2c5f524eedb74973342455d0 Author: Rob Herring Date: Fri Mar 10 08:47:07 2023 -0600 hwmon: (ltc4245) Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to of_property_read_bool(). Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144707.1542525-1-robh@kernel.org Signed-off-by: Guenter Roeck commit 08d40c1d57b7127cfdebbc0648b57d54e38f2ba7 Author: Andy Shevchenko Date: Fri Feb 17 21:16:00 2023 +0200 hwmon: (nct6775) Drop unneeded casting and conjunction The 64-bit result will be cut to 32-bit automatically (by compiler) due to the type of the destination value. No need to have an explicit casting and especially additional conjunction which does the same. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230217191600.24837-1-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck commit 4a148e9b1ee04e608263fa9536a96214d5561220 Author: Aleksandr Mezin Date: Sun Feb 19 12:59:19 2023 +0200 hwmon: (nzxt-smart2) add another USB ID This seems to be a new revision of the device. RGB controls have changed, but this driver doesn't touch them anyway. Fan speed control reported to be working with existing userspace (hidraw) software, so I assume it's compatible. Fan channel count is the same. Recently added (0x1e71, 0x2019) seems to be the same device. Discovered in liquidctl project: https://github.com/liquidctl/liquidctl/issues/541 Signed-off-by: Aleksandr Mezin Link: https://lore.kernel.org/r/20230219105924.333007-1-mezin.alexander@gmail.com Signed-off-by: Guenter Roeck commit 8107fe93896dee8f159c8cb4ec8ec18656fbcd96 Author: Krzysztof Kozlowski Date: Sun Mar 12 20:37:22 2023 +0100 hwmon: (gpio-fan) drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes !CONFIG_OF error: drivers/hwmon/gpio-fan.c:484:34: error: ‘of_gpio_fan_match’ defined but not used [-Werror=unused-const-variable=] Note(groeck): The build error is only seen if Kconfig dependencies are messed up. The driver depends on OF_GPIO which should depend on OF. This was temporarily broken in linux-next, and it was possible to select CONFIG_OF=n and CONFIG_SENSORS_GPIO_FAN=y. Nevertheless, this is a sensible fix. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230312193723.478032-1-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck commit 629f57a7d5b9533313f41c79f8ae52c953b261f6 Merge: 0c072385348e3 d8cc9415a40f4 Author: Guenter Roeck Date: Wed Apr 19 07:08:24 2023 -0700 Merge branch 'hwmon-const' into HEAD commit 0c072385348e3ac5229145644055d3e2afb5b3db Author: Babu Moger Date: Thu Apr 13 16:39:58 2023 -0500 hwmon: (k10temp) Check range scale when CUR_TEMP register is read-write Spec says, when CUR_TEMP_TJ_SEL == 3 and CUR_TEMP_RANGE_SEL == 0, it should use RangeUnadjusted is 0, which is (CurTmp*0.125 -49) C. The CUR_TEMP register is read-write when CUR_TEMP_TJ_SEL == 3 (bit 17-16). Add the check to detect it. Sensors command's output before the patch. $sensors k10temp-pci-00c3 Adapter: PCI adapter Tctl: +76.6°C <- Wrong value Tccd1: +26.5°C Tccd2: +27.5°C Tccd3: +27.2°C Tccd4: +27.5°C Tccd5: +26.0°C Tccd6: +26.2°C Tccd7: +25.0°C Tccd8: +26.5°C Sensors command's output after the patch. $sensors k10temp-pci-00c3 Adapter: PCI adapter Tctl: +28.8°C <- corrected value Tccd1: +27.5°C Tccd2: +28.5°C Tccd3: +28.5°C Tccd4: +28.5°C Tccd5: +27.0°C Tccd6: +27.5°C Tccd7: +27.0°C Tccd8: +27.5°C Signed-off-by: Babu Moger Fixes: 1b59788979ac ("hwmon: (k10temp) Add temperature offset for Ryzen 2700X") Link: https://lore.kernel.org/r/20230413213958.847634-1-babu.moger@amd.com Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck commit 80f746e2bd0e1da3fdb49a53570e54a1a225faac Author: John Paul Adrian Glaubitz Date: Wed Apr 19 13:48:52 2023 +0200 sh: sq: Fix incorrect element size for allocating bitmap buffer The Store Queue code allocates a bitmap buffer with the size of multiple of sizeof(long) in sq_api_init(). While the buffer size is calculated correctly, the code uses the wrong element size to allocate the buffer which results in the allocated bitmap buffer being too small. Fix this by allocating the buffer with kcalloc() with element size sizeof(long) instead of kzalloc() whose elements size defaults to sizeof(char). Fixes: d7c30c682a27 ("sh: Store Queue API rework.") Reviewed-by: Geert Uytterhoeven Signed-off-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20230419114854.528677-1-glaubitz@physik.fu-berlin.de commit 8f12692b7e61e5fb5d3e4f6692d6675f62eeebdc Author: Ian Rogers Date: Wed Apr 19 10:48:37 2023 -0300 perf maps: Add reference count checking Add reference count checking to make sure of good use of get and put. Add and use accessors to reduce RC_CHK clutter. The only significant issue was in tests/thread-maps-share.c where reference counts were released in the reverse order to acquisition, leading to a use after put. This was fixed by reversing the put order. Committer notes: Extracted from a larger patch removing bits that were covered by the use of pre-existing maps__ accessors (e.g. maps__nr_maps()) and new ones added (maps__refcnt()) to reduce RC_CHK_ACCESS(maps)-> source code pollution. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexey Bayduraev Cc: Dmitriy Vyukov Cc: Jiri Olsa Cc: Namhyung Kim Cc: Riccardo Mancini Cc: Stephane Eranian Cc: Stephen Brennan Link: https://lore.kernel.org/lkml/20230407230405.2931830-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit a07dacad8ac40d1beadb640fe341b5198c1cf097 Author: Arnaldo Carvalho de Melo Date: Tue Apr 18 17:45:34 2023 -0300 perf maps: Use maps__nr_maps() instead of open coded maps->nr_maps To use the existing accessor and be consistent. Signef-off-by: Arnaldo Carvalho de Melo commit fe693d951e3c303b4fb6c712f8affecbe9e8b001 Author: Arnaldo Carvalho de Melo Date: Tue Apr 18 17:33:48 2023 -0300 perf maps: Add maps__refcnt() accessor to allow checking maps pointer To remove one more direct access to 'struct maps' so that we can intercept accesses to its instantiations and refcount check it to catch use after free, etc. Signed-off-by: Arnaldo Carvalho de Melo commit 3ad1be6faef9a482c3098928220fcafaa51a1283 Author: Arnaldo Carvalho de Melo Date: Tue Apr 18 12:46:02 2023 -0300 perf dso: Fix use before NULL check introduced by map__dso() introduction James Clark noticed that the recent 63df0e4bc368adbd ("perf map: Add accessor for dso") patch accessed map->dso before the 'map' variable was NULL checked, which is a change in logic that leads to segmentation faults, so comb thru that patch to fix similar cases. Fixes: 63df0e4bc368adbd ("perf map: Add accessor for dso") Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/lkml/ZD68RYCVT8hqPuxr@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a7b3a470fdea9f4a7daa5ae446c4e27c65f00aac Merge: ca9d081b49cc2 ef9f643a9f8b6 Author: Greg Kroah-Hartman Date: Wed Apr 19 15:09:40 2023 +0200 Merge tag 'cacheinfo-updates-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into driver-core-next Sudeep writes: cacheinfo and arch_topology updates for v6.4 The cache information can be extracted from either a Device Tree(DT), the PPTT ACPI table, or arch registers (clidr_el1 for arm64). When the DT is used but no cache properties are advertised, the current code doesn't correctly fallback to using arch information. The changes fixes the same and also assuse the that L1 data/instruction caches are private and L2/higher caches are shared when the cache information is missing in DT/ACPI and is derived form clidr_el1/arch registers. Currently the cacheinfo is built from the primary CPU prior to secondary CPUs boot, if the DT/ACPI description contains cache information. However, if not present, it still reverts to the old behavior, which allocates the cacheinfo memory on each secondary CPUs which causes RT kernels to triggers a "BUG: sleeping function called from invalid context". The changes here attempts to enable automatic detection for RT kernels when no DT/ACPI cache information is available, by pre-allocating cacheinfo memory on the primary CPU. * tag 'cacheinfo-updates-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: cacheinfo: Add use_arch[|_cache]_info field/function arch_topology: Remove early cacheinfo error message if -ENOENT cacheinfo: Check cache properties are present in DT cacheinfo: Check sib_leaf in cache_leaves_are_shared() cacheinfo: Allow early level detection when DT/ACPI info is missing/broken cacheinfo: Add arm64 early level initializer implementation cacheinfo: Add arch specific early level initializer commit 0989ffb31cff794506f5d3dd109574ddbb9b983a Author: Alain Volmat Date: Sun Apr 16 21:05:01 2023 +0200 irqchip/st: Remove stih415/stih416 and stid127 platforms support Remove support for the already no more supported stih415 and stih416 platforms. Remove as well the stid127 platform which never made it up to the kernel. Signed-off-by: Alain Volmat Reviewed-by: Patrice Chotard Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230416190501.18737-1-avolmat@me.com commit 12124d16726ca7d9cb1eb8725767cbcfb96195c8 Merge: 3fcf52b71161d 18996a113f256 Author: Greg Kroah-Hartman Date: Wed Apr 19 15:08:11 2023 +0200 Merge tag 'coresight-next-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next Suzuki writes: coresight: Updates for v6.4 This is a relatively smaller update for CoreSight tracing subsystem targeting v6.4, with the following changes: - Removing Mathieu Poirier as MAINTAINER for the subsystem, with updates to CREDITS for his contributions. - Fix CoreSight ETM PMU to set the module field Signed-off-by: Suzuki K Poulose * tag 'coresight-next-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux: coresight: etm_pmu: Set the module field MAINTAINERS: Remove Mathieu Poirier as coresight maintainer commit 3fcf52b71161d52ae47fa4dd2c4911125fe11cc5 Merge: 2a1dd5c88ce3b b7590f3841f47 Author: Greg Kroah-Hartman Date: Wed Apr 19 15:07:09 2023 +0200 Merge tag 'icc-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next Georgi writes: interconnect changes for 6.4 This pull request contains the interconnect changes for the 6.4-rc1 merge window, which this time are mostly cleanups. Core changes: interconnect: Skip call into provider if initial bw is zero interconnect: Use of_property_present() for testing DT property presence interconnect: drop racy registration API interconnect: drop unused icc_link_destroy() interface Driver changes: interconnect: qcom: Drop obsolete dependency on COMPILE_TEST interconnect: qcom: drop obsolete OSM_L3/EPSS defines interconnect: qcom: osm-l3: drop unuserd header inclusion interconnect: qcom: rpm: drop bogus pm domain attach interconnect: qcom: rpm: make QoS INVALID default interconnect: qcom: rpm: Add support for specifying channel num interconnect: qcom: Sort kerneldoc entries dt-bindings: interconnect: OSM L3: Add SM6375 CPUCP compatible dt-bindings: interconnect: qcom,msm8998-bwmon: Resolve MSM8998 support Signed-off-by: Georgi Djakov * tag 'icc-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: dt-bindings: interconnect: qcom,msm8998-bwmon: Resolve MSM8998 support dt-bindings: interconnect: OSM L3: Add SM6375 CPUCP compatible interconnect: qcom: Sort kerneldoc entries interconnect: qcom: rpm: Add support for specifying channel num interconnect: qcom: rpm: make QoS INVALID default interconnect: qcom: rpm: drop bogus pm domain attach interconnect: drop unused icc_link_destroy() interface interconnect: drop racy registration API interconnect: Use of_property_present() for testing DT property presence interconnect: qcom: osm-l3: drop unuserd header inclusion interconnect: qcom: drop obsolete OSM_L3/EPSS defines interconnect: Skip call into provider if initial bw is zero interconnect: qcom: Drop obsolete dependency on COMPILE_TEST commit 2a1dd5c88ce3b43b9fa9b4f61a847f0a13371bb7 Merge: 7e9fa830be059 1d1493bdc25f4 Author: Greg Kroah-Hartman Date: Wed Apr 19 15:06:11 2023 +0200 Merge tag 'mhi-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Manivannan writes: MHI Host ======== Core ---- - Removed the "mhi_poll()" API as there are no in-kernel users available at the moment. - Added range check for the CHDBOFF and ERDBOFF registers in case the device reports bad values. - Fixed the errno for the rest of the range checks to use -ERANGE. - Modified the event ring handlers to ring the doorbell only if there are any pending elements in the ring to process for the device. - Removed the check for EE (Execution Environment) while processing the SYS_ERR transition as it creates device recovery issues when SBL (Secondary Bootloader) crashes early. - Used mhi_tryset_pm_state() API to set the error state instead of open coding if the firmware loading fails. This avoids the race with other pm_state updates. pci_generic ----------- - Dropped the dedundant pci_{enable/disable}_pcie_error_reporting() calls from driver probe's error path as the PCI core itself takes care of that now. - Revered the commit 2d5253a096c6 ("bus: mhi: host: pci_generic: Add a secondary AT port to Telit FN990") as it turned out to be erroneous. This happened due to the patch adding secondary AT port for FN990 getting applied through NET and MHI trees and this caused two commits for the same functionality but one of them ended up wrong. - Added support for Foxconn T99W510 modem based on SDX24 chipset from Qualcomm. MHI Endpoint ============ - Demoted the channel not supported error log to debug as not all devices will support all channels defined in MHI spec and this may spam users. * tag 'mhi-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: host: Use mhi_tryset_pm_state() for setting fw error state bus: mhi: host: Remove duplicate ee check for syserr bus: mhi: host: Avoid ringing EV DB if there are no elements to process bus: mhi: pci_generic: Add Foxconn T99W510 bus: mhi: host: Use ERANGE for BHIOFF/BHIEOFF range check bus: mhi: host: Range check CHDBOFF and ERDBOFF bus: mhi: host: pci_generic: Revert "Add a secondary AT port to Telit FN990" bus: mhi: host: pci_generic: Drop redundant pci_enable_pcie_error_reporting() bus: mhi: ep: Demote unsupported channel error log to debug bus: mhi: host: Remove mhi_poll() API commit 574399f4c997ad71fab95dd875a9ff55424f9a3d Author: Christophe JAILLET Date: Sun Apr 16 08:29:34 2023 +0200 ASoC: fsl: Simplify an error message dev_err_probe() already display the error code. There is no need to duplicate it explicitly in the error message. Signed-off-by: Christophe JAILLET Reviewed-by: Iuliana Prodan Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/c167c16a535049d56f817bbede9c9f6f0a0f4c68.1681626553.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 4e195166624851d1da1a4e42110e66ee4faca4a3 Author: Corinna Vinschen Date: Mon Apr 17 21:29:03 2023 +0200 stmmac: fix changing mac address Without the IFF_LIVE_ADDR_CHANGE flag being set, the network code disallows changing the mac address while the interface is UP. Consequences are, for instance, that the interface can't be used in a failover bond. Add the missing flag to net_device priv_flags. Tested on Intel Elkhart Lake with default settings, as well as with failover and alb mode bonds. Signed-off-by: Corinna Vinschen Signed-off-by: David S. Miller commit fbb192a836bee873e4e94c5deca19bf558ab7bb9 Merge: 4edd97fbdc23e 48d80c394d3d1 Author: David S. Miller Date: Wed Apr 19 13:04:31 2023 +0100 Merge branch 'skbuff-bitfields' Jakub Kicinski says: ==================== net: skbuff: hide some bitfield members There is a number of protocol or subsystem specific fields in struct sk_buff which are only accessed by one subsystem. We can wrap them in ifdefs with minimal code impact. This gives us a better chance to save a 2B and a 4B holes resulting with the following savings (assuming a lucky kernel config): - /* size: 232, cachelines: 4, members: 28 */ - /* sum members: 227, holes: 1, sum holes: 4 */ - /* sum bitfield members: 8 bits (1 bytes) */ + /* size: 224, cachelines: 4, members: 28 */ /* forced alignments: 2 */ - /* last cacheline: 40 bytes */ + /* last cacheline: 32 bytes */ I think that the changes shouldn't be too controversial. The only one I'm not 100% sure of is the SCTP one, 12 extra LoC for one bit.. But it did fit squarely in the "this bit has only one user" category. ==================== Signed-off-by: David S. Miller Acked-by: Simon Horman commit 48d80c394d3d1afcb49d26398917f5be27bf44cb Author: Jakub Kicinski Date: Mon Apr 17 08:53:50 2023 -0700 net: skbuff: hide nf_trace and ipvs_property Accesses to nf_trace and ipvs_property are already wrapped by ifdefs where necessary. Don't allocate the bits for those fields at all if possible. Acked-by: Florian Westphal Acked-by: Simon Horman Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4c60d04c2888a542f96fe77ecbdfc242b484f943 Author: Jakub Kicinski Date: Mon Apr 17 08:53:49 2023 -0700 net: skbuff: push nf_trace down the bitfield nf_trace is a debug feature, AFAIU, and yet it sits oddly high in the sk_buff bitfield. Move it down, pushing up dst_pending_confirm and inner_protocol_type. Next change will make nf_trace optional (under Kconfig) and all optional fields should be placed after 2b fields to avoid 2b fields straddling bytes. dst_pending_confirm is L3, so it makes sense next to ignore_df. inner_protocol_type goes up just to keep the balance. Acked-by: Florian Westphal Reviewed-by: Florian Fainelli Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4398f3f6d1380d9f71a484e1e5d869ba0eaf23d5 Author: Jakub Kicinski Date: Mon Apr 17 08:53:48 2023 -0700 net: skbuff: move alloc_cpu into a potential hole alloc_cpu is currently between 4 byte fields, so it's almost guaranteed to create a 2B hole. It has a knock on effect of creating a 4B hole after @end (and @end and @tail being in different cachelines). None of this matters hugely, but for kernel configs which don't enable all the features there may well be a 2B hole after the bitfield. Move alloc_cpu there. Reviewed-by: Florian Fainelli Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit c24831a13ba2e472f874483525084da2f2feb890 Author: Jakub Kicinski Date: Mon Apr 17 08:53:47 2023 -0700 net: skbuff: hide csum_not_inet when CONFIG_IP_SCTP not set SCTP is not universally deployed, allow hiding its bit from the skb. Reviewed-by: Florian Fainelli Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit eb6fba7555a812c07aa984fb9e8e9b151a65ca16 Author: Jakub Kicinski Date: Mon Apr 17 08:53:46 2023 -0700 net: skbuff: hide wifi_acked when CONFIG_WIRELESS not set Datacenter kernel builds will very likely not include WIRELESS, so let them shave 2 bits off the skb by hiding the wifi fields. Reviewed-by: Florian Fainelli Reviewed-by: Eric Dumazet Signed-off-by: Jakub Kicinski Acked-by: Johannes Berg Signed-off-by: David S. Miller commit 4edd97fbdc23e917ef0787dbf0ccc543b400bb34 Merge: 158441884772a c693ea2fd6e3b Author: David S. Miller Date: Wed Apr 19 12:59:17 2023 +0100 Merge branch 'switch-phy-leds' Christian Marangi says: ==================== net: Add basic LED support for switch/phy This is a continue of [1]. It was decided to take a more gradual approach to implement LEDs support for switch and phy starting with basic support and then implementing the hw control part when we have all the prereq done. This series implements only the brightness_set() and blink_set() ops. An example of switch implementation is done with qca8k. For PHY a more generic approach is used with implementing the LED support in PHY core and with the user (in this case marvell) adding all the required functions. Currently we set the default-state as "keep" to not change the default configuration of the declared LEDs since almost every switch have a default configuration. [1] https://lore.kernel.org/lkml/20230216013230.22978-1-ansuelsmth@gmail.com/ Changes in new series v7: - Drop ethernet-leds schema and add unevaluatedProperties to ethernet-controller and ethernet-phy schema - Drop function-enumerator binding from schema example and DT - Set devname_mandatory for qca8k leds and assign better name to LEDs using the format {slave_mii_bus id}:0{port number}:{color}:{function} - Add Documentation patch for Correct LEDs naming from Andrew - Changes in Andrew patch: - net: phy: Add a binding for PHY LEDs - Convert index from u32 to u8 - net: phy: phy_device: Call into the PHY driver to set LED brightness - Fixup kernel doc - Convert index from u32 to u8 - net: phy: marvell: Add software control of the LEDs - Convert index from u32 to u8 - net: phy: phy_device: Call into the PHY driver to set LED blinking - Kernel doc fix - Convert index from u32 to u8 - net: phy: marvell: Implement led_blink_set() - Convert index from u32 to u8 Changes in new series v6: - Add leds-ethernet.yaml to document reg in led node - Update ethernet-controller and ethernet-phy to follow new leds-ethernet schema - Fix comments in qca8k-leds.c (at least -> at most) (wrong GENMASK for led phy 0 and 4) - Add review and ack tag from Pavel Machek - Changes in Andrew patch: - leds: Provide stubs for when CLASS_LED & NEW_LEDS are disabled - Change LED_CLASS to NEW_LEDS for led_init_default_state_get() - net: phy: Add a binding for PHY LEDs - Add dependency on LED_CLASS - Drop review tag from Michal Kubiak (patch modified) Changes in new series v5: - Rebase everything on top of net-next/main - Add more info on LED probe fail for qca8k - Drop some additional raw number and move to define in qca8k header - Add additional info on LED mapping on qca8k regs - Checks port number in qca8k switch port parse - Changes in Andrew patch: - Add additional patch for stubs when CLASS_LED disabled - Drop CLASS_LED dependency for PHYLIB (to fix kbot errors reported) Changes in new series v4: - Changes in Andrew patch: - net: phy: Add a binding for PHY LEDs: - Rename phy_led: led_list to list - Rename phy_device: led_list to leds - Remove phy_leds_remove() since devm_ should do what is needed - Fixup documentation for struct phy_led - Fail probe on LED errors - net: phy: phy_device: Call into the PHY driver to set LED brightness - Moved phy_led::phydev from previous patch to here since it is first used here. - net: phy: marvell: Implement led_blink_set() - Use int instead of unsigned - net: phy: marvell: Add software control of the LEDs - Use int instead of unsigned - Add depends on LED_CLASS for qca8k Kconfig - Fix Makefile for qca8k as suggested - Move qca8k_setup_led_ctrl to separate header - Move Documentation from dsa-port to ethernet-controller - Drop trailing . from Andrew patch fro consistency Changes in new series v3: - Move QCA8K_LEDS Kconfig option from tristate to bool - Use new helper led_init_default_state_get for default-state in qca8k - Drop cled_qca8k_brightness_get() as there isn't a good way to describe the mode the led is currently in - Rework qca8k_led_brightness_get() to return true only when LED is set to always ON Changes in new series v2: - Add LEDs node for rb3011 - Fix rb3011 switch node unevaluated properties while running make dtbs_check - Fix a copypaste error in qca8k-leds.c for port 4 required shift - Drop phy-handle usage for qca8k and use qca8k_port_to_phy() - Add review tag from Andrew - Add Christian Marangi SOB in each Andrew patch - Add extra description for dsa-port stressing that PHY have no access and LED are controlled by the related MAC - Add missing additionalProperties for dsa-port.yaml and ethernet-phy.yaml Changes from the old v8 series: - Drop linux,default-trigger set to netdev. - Dropped every hw control related patch and implement only blink_set and brightness_set - Add default-state to "keep" for each LED node example ==================== Signed-off-by: David S. Miller commit c693ea2fd6e3b43f6caaf618f864236c36a71f70 Author: Andrew Lunn Date: Mon Apr 17 17:17:38 2023 +0200 Documentation: LEDs: Describe good names for network LEDs Network LEDs can exist in both the MAC and the PHY. Naming is difficult because the netdev name is neither stable or unique, do to commands like ip link set name eth42 dev eth0, and network namesspaces. Give some example names where the MAC and the PHY have unique names based on device tree nodes, or PCI bus addresses. Since the LED can be used for anything which Linux supports for LEDs, avoid using names like activity or link, rather describe the location on the RJ-45, of what the RJ-45 is expected to be used for, WAN/LAN etc. Signed-off-by: Andrew Lunn Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit 380a8fe1b2f49f262673485d1c7f1c0da170a926 Author: Andrew Lunn Date: Mon Apr 17 17:17:37 2023 +0200 arm: mvebu: dt: Add PHY LED support for 370-rd WAN port The WAN port of the 370-RD has a Marvell PHY, with one LED on the front panel.y List this LED in the device tree. Signed-off-by: Andrew Lunn Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit 18a24b694a2bfd59ae8a17ffee87f12c65d9f2a6 Author: Christian Marangi Date: Mon Apr 17 17:17:36 2023 +0200 dt-bindings: net: phy: Document support for LEDs node Document support for LEDs node in phy and add an example for it. PHY LED will have to match led pattern and should be treated as a generic led. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 09930f1fb8750d5f4e668ab40733ab63cab58ed7 Author: Christian Marangi Date: Mon Apr 17 17:17:35 2023 +0200 ARM: dts: qcom: ipq8064-rb3011: Add Switch LED for each port Add Switch LED for each port for MikroTik RB3011UiAS-RM. MikroTik RB3011UiAS-RM is a 10 port device with 2 qca8337 switch chips connected. It was discovered that in the hardware design all 3 Switch LED trace of the related port is connected to the same LED. This was discovered by setting to 'always on' the related led in the switch regs and noticing that all 3 LED for the specific port (for example for port 1) cause the connected LED for port 1 to turn on. As an extra test we tried enabling 2 different LED for the port resulting in the LED turned off only if every led in the reg was off. Aside from this funny and strange hardware implementation, the device itself have one green LED for each port, resulting in 10 green LED one for each of the 10 supported port. Cc: Jonathan McDowell Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit 939595c79d12bb18e3784bc3faa2ddd2df41f70f Author: Christian Marangi Date: Mon Apr 17 17:17:34 2023 +0200 ARM: dts: qcom: ipq8064-rb3011: Drop unevaluated properties in switch nodes IPQ8064 MikroTik RB3011UiAS-RM DT have currently unevaluted properties in the 2 switch nodes. The bindings #address-cells and #size-cells are redundant and cause warning for 'Unevaluated properties are not allowed'. Drop these bindings to mute these warning as they should not be there from the start. Cc: Jonathan McDowell Signed-off-by: Christian Marangi Reviewed-by: Jonathan McDowell Tested-by: Jonathan McDowell Signed-off-by: David S. Miller commit ed617bc022f4596dc03815e8f0331e60644d07ee Author: Christian Marangi Date: Mon Apr 17 17:17:33 2023 +0200 dt-bindings: net: dsa: qca8k: add LEDs definition example Add LEDs definition example for qca8k Switch Family to describe how they should be defined for a correct usage. Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit 57b6c752c5c05a1f38eb6da9f1618f1b000e1f51 Author: Christian Marangi Date: Mon Apr 17 17:17:32 2023 +0200 dt-bindings: net: ethernet-controller: Document support for LEDs node Document support for LEDs node in ethernet-controller. Ethernet Controller may support different LEDs that can be configured for different operation like blinking on traffic event or port link. Also add some Documentation to describe the difference of these nodes compared to PHY LEDs, since ethernet-controller LEDs are controllable by the ethernet controller regs and the possible intergated PHY doesn't have control on them. Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit ea9e86485decb2ac1750005bd96c166c9b780406 Author: Andrew Lunn Date: Mon Apr 17 17:17:31 2023 +0200 net: phy: marvell: Implement led_blink_set() The Marvell PHY can blink the LEDs, simple on/off. All LEDs blink at the same rate, and the reset default is 84ms per blink, which is around 12Hz. Signed-off-by: Andrew Lunn Signed-off-by: Christian Marangi Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 4e901018432e38eab35d2a352661ce4727795be1 Author: Andrew Lunn Date: Mon Apr 17 17:17:30 2023 +0200 net: phy: phy_device: Call into the PHY driver to set LED blinking Linux LEDs can be requested to perform hardware accelerated blinking. Pass this to the PHY driver, if it implements the op. Signed-off-by: Andrew Lunn Signed-off-by: Christian Marangi Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 2d3960e58ef7c83fe1dbf952f056b9e906cb6df8 Author: Andrew Lunn Date: Mon Apr 17 17:17:29 2023 +0200 net: phy: marvell: Add software control of the LEDs Add a brightness function, so the LEDs can be controlled from software using the standard Linux LED infrastructure. Signed-off-by: Andrew Lunn Signed-off-by: Christian Marangi Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 684818189b04b095b34964ed4a3ea5249a840eab Author: Andrew Lunn Date: Mon Apr 17 17:17:28 2023 +0200 net: phy: phy_device: Call into the PHY driver to set LED brightness Linux LEDs can be software controlled via the brightness file in /sys. LED drivers need to implement a brightness_set function which the core will call. Implement an intermediary in phy_device, which will call into the phy driver if it implements the necessary function. Signed-off-by: Andrew Lunn Signed-off-by: Christian Marangi Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 01e5b728e9e43ae444e0369695a5f72209906464 Author: Andrew Lunn Date: Mon Apr 17 17:17:27 2023 +0200 net: phy: Add a binding for PHY LEDs Define common binding parsing for all PHY drivers with LEDs using phylib. Parse the DT as part of the phy_probe and add LEDs to the linux LED class infrastructure. For the moment, provide a dummy brightness function, which will later be replaced with a call into the PHY driver. This allows testing since the LED core might otherwise reject an LED whose brightness cannot be set. Add a dependency on LED_CLASS. It either needs to be built in, or not enabled, since a modular build can result in linker errors. Signed-off-by: Andrew Lunn Signed-off-by: Christian Marangi Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e5029edd53937a29801ef507cee12e657ff31ea9 Author: Andrew Lunn Date: Mon Apr 17 17:17:26 2023 +0200 leds: Provide stubs for when CLASS_LED & NEW_LEDS are disabled Provide stubs for devm_led_classdev_register_ext() and led_init_default_state_get() so that LED drivers embedded within other drivers such as PHYs and Ethernet switches still build when LEDS_CLASS or NEW_LEDS are disabled. This also helps with Kconfig dependencies, which are somewhat hairy for phylib and mdio and only get worse when adding a dependency on LED_CLASS. Signed-off-by: Andrew Lunn Signed-off-by: Christian Marangi Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 91acadcc6e599dfc62717abcdad58a459cfb1684 Author: Christian Marangi Date: Mon Apr 17 17:17:25 2023 +0200 net: dsa: qca8k: add LEDs blink_set() support Add LEDs blink_set() support to qca8k Switch Family. These LEDs support hw accellerated blinking at a fixed rate of 4Hz. Reject any other value since not supported by the LEDs switch. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Acked-by: Pavel Machek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 1e264f9d2918b5737023c44a23ae04def1095210 Author: Christian Marangi Date: Mon Apr 17 17:17:24 2023 +0200 net: dsa: qca8k: add LEDs basic support Add LEDs basic support for qca8k Switch Family by adding basic brightness_set() support. Since these LEDs refelect port status, the default label is set to ":port". DT binding should describe the color and function of the LEDs using standard LEDs api. Each LED always have the device name as prefix. The device name is composed from the mii bus id and the PHY addr resulting in example names like: - qca8k-0.0:00:amber:lan - qca8k-0.0:00:white:lan - qca8k-0.0:01:amber:lan - qca8k-0.0:01:white:lan These LEDs supports only blocking variant of the brightness_set() function since they can sleep during access of the switch leds to set the brightness. While at it add to the qca8k header file each mode defined by the Switch Documentation for future use. Signed-off-by: Christian Marangi Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 3e8b4d6277fd19d98c817576954dd6a4ff3caa2b Author: Christian Marangi Date: Mon Apr 17 17:17:23 2023 +0200 net: dsa: qca8k: move qca8k_port_to_phy() to header Move qca8k_port_to_phy() to qca8k header as it's useful for future reference in Switch LEDs module since the same logic is applied to get the right index of the switch port. Make it inline as it's simple function that just decrease the port. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Reviewed-by: Michal Kubiak Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 158441884772a19e840429e210bfd1879094306b Author: Jaime Breva Date: Mon Apr 17 08:07:24 2023 +0200 net: wwan: Expose secondary AT port on DATA1 Our use-case needs two AT ports available: One for running a ppp daemon, and another one for management This patch enables a second AT port on DATA1 Signed-off-by: Jaime Breva Signed-off-by: David S. Miller commit 73db1b8f2bb6725b7391e85aab41fdf592b3c0c1 Author: Tzung-Bi Shih Date: Wed Apr 19 13:15:26 2023 +0800 netfilter: conntrack: fix wrong ct->timeout value (struct nf_conn)->timeout is an interval before the conntrack confirmed. After confirmed, it becomes a timestamp. It is observed that timeout of an unconfirmed conntrack: - Set by calling ctnetlink_change_timeout(). As a result, `nfct_time_stamp` was wrongly added to `ct->timeout` twice. - Get by calling ctnetlink_dump_timeout(). As a result, `nfct_time_stamp` was wrongly subtracted. Call Trace: dump_stack_lvl ctnetlink_dump_timeout __ctnetlink_glue_build ctnetlink_glue_build __nfqnl_enqueue_packet nf_queue nf_hook_slow ip_mc_output ? __pfx_ip_finish_output ip_send_skb ? __pfx_dst_output udp_send_skb udp_sendmsg ? __pfx_ip_generic_getfrag sock_sendmsg Separate the 2 cases in: - Setting `ct->timeout` in __nf_ct_set_timeout(). - Getting `ct->timeout` in ctnetlink_dump_timeout(). Pablo appends: Update ctnetlink to set up the timeout _after_ the IPS_CONFIRMED flag is set on, otherwise conntrack creation via ctnetlink breaks. Note that the problem described in this patch occurs since the introduction of the nfnetlink_queue conntrack support, select a sufficiently old Fixes: tag for -stable kernel to pick up this fix. Fixes: a4b4766c3ceb ("netfilter: nfnetlink_queue: rename related to nfqueue attaching conntrack info") Signed-off-by: Tzung-Bi Shih Signed-off-by: Pablo Neira Ayuso commit ced7c981f382fc34b941ee3b861d49bdd9180af4 Merge: 8e86652e3e715 1f15af76784cc Author: Greg Kroah-Hartman Date: Wed Apr 19 11:42:44 2023 +0200 Merge tag 'thunderbolt-for-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next Mika writes: thunderbolt: Changes for v6.4 merge window This includes following Thunderbolt/USB4 changes for the v6.4 merge window: - Refactoring of DROM read code paths - Convert to use SI units from units.h - A couple of cleanups All these have been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Introduce usb4_port_sb_opcode_err_to_errno() helper thunderbolt: Make use of SI units from units.h thunderbolt: Get rid of redundant 'else' thunderbolt: Refactor DROM reading thunderbolt: use `tb_eeprom_get_drom_offset` to discover DROM offset commit 63f148c44f3919047301a023b10b0e3ce65a7389 Author: John Paul Adrian Glaubitz Date: Wed Apr 19 09:09:33 2023 +0200 sh: pci: Remove unused variable in SH-7786 PCI Express code Addresses the following warning when building sdk7786_defconfig: arch/sh/drivers/pci/pcie-sh7786.c:34:22: warning: 'dma_pfn_offset' defined but not used [-Wunused-variable] 34 | static unsigned long dma_pfn_offset; | ^~~~~~~~~~~~~~ Fixes: e0d072782c73 ("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset") Reviewed-by: Geert Uytterhoeven Signed-off-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20230419070934.422997-1-glaubitz@physik.fu-berlin.de commit 3b522cadedfe6e9e0e8193d7d4ab5aa8d0c73209 Author: Ryder Lee Date: Wed Apr 19 13:58:40 2023 +0800 wifi: mt76: mt7996: fill txd by host driver The hardware SDO has issue to fill txd for the moment, so fallback to driver filling method. Fixes: 98686cd21624 (wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices) Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 230a167e094770fdcc104481719ef7b1a706fb27 Author: Felix Fietkau Date: Thu Mar 30 11:07:52 2023 +0200 wifi: mt76: set NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 on supported drivers Drivers that do not generate IV/PN in software can safely rekey PTK0 Signed-off-by: Felix Fietkau commit f4d63a87b527de258eec5bd6e9547f063d472b79 Author: Felix Fietkau Date: Sat Dec 31 08:44:33 2022 +0100 wifi: mt76: dma: use napi_build_skb Improves performance by using bulk allocation Signed-off-by: Felix Fietkau commit e12b2e99b8799f26432528934edc8677888ad72f Author: Felix Fietkau Date: Fri Nov 11 19:50:46 2022 +0100 wifi: mt76: mt7615: increase eeprom size for mt7663 mt7663 efuse has 0x600 bytes instead of 0x400. Increase the size in order to fix issues with incomplete calibration data Signed-off-by: Felix Fietkau commit 27db47ab1f47906c2392f9d246e244e412b19278 Author: Ryder Lee Date: Sun Mar 12 14:11:25 2023 +0800 wifi: mt76: mt7996: enable mesh HW amsdu/de-amsdu support This enables HW offloading amsdu/de-amsdu support for 802.11s mesh interface. Co-developed-by: Bo Jiao Signed-off-by: Bo Jiao Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit c2171b068beea766311e4c2858ef8497504c6e6d Author: Ryder Lee Date: Fri Apr 14 04:23:33 2023 +0800 wifi: mt76: mt7996: enable configured beacon tx rate The user is allowed to change beacon tx rate (HT/VHT/HE) from hostapd. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit ab0eec4bf225c5e78fd10d764d536300376f8445 Author: Ryder Lee Date: Fri Apr 14 04:23:32 2023 +0800 wifi: mt76: mt7996: enable BSS_CHANGED_MCAST_RATE support Similar to BSS_CHANGED_BASIC_RATES, this enables mcast rate configuration through fixed rate tables. Signed-off-by: Ryder Lee Change-Id: Ifc305e8c7de9a7df4ad5f856e2097d721a886aaa Signed-off-by: Felix Fietkau commit 15ee62e73705df447971613de4fa660dd71ed40e Author: Ryder Lee Date: Fri Apr 14 04:23:31 2023 +0800 wifi: mt76: mt7996: enable BSS_CHANGED_BASIC_RATES support The connac3 removes fixed rate fields to reduce txd size and introduces global rate tables (64 entries) for rate setting. Driver needs to fill the corresponding idx in MT_TXD6_TX_RATE while tx, and push mt76_rate into predifined table at bootup stage so that mvif->basic_rates_idx can immediately switch out once setting changes. spe_idx is also needed for fixed rate frames, and will be updated by future patches. Note that all table entries are shared across driver and firmware (i.e.TxBF), hence adding MT7996_BASIC_RATES_TBL to reflect mapping status. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 2cdaa3eefed83082923cf219c8b6a314e622da74 Author: Pablo Neira Ayuso Date: Tue Apr 18 23:31:26 2023 +0200 netfilter: conntrack: restore IPS_CONFIRMED out of nf_conntrack_hash_check_insert() e6d57e9ff0ae ("netfilter: conntrack: fix rmmod double-free race") consolidates IPS_CONFIRMED bit set in nf_conntrack_hash_check_insert(). However, this breaks ctnetlink: # conntrack -I -p tcp --timeout 123 --src 1.2.3.4 --dst 5.6.7.8 --state ESTABLISHED --sport 1 --dport 4 -u SEEN_REPLY conntrack v1.4.6 (conntrack-tools): Operation failed: Device or resource busy This is a partial revert of the aforementioned commit to restore IPS_CONFIRMED. Fixes: e6d57e9ff0ae ("netfilter: conntrack: fix rmmod double-free race") Reported-by: Stéphane Graber Tested-by: Stéphane Graber Signed-off-by: Pablo Neira Ayuso commit cd02a1a24897ce8a5e32d29a11cb0a926fa6572a Merge: 14cac662235ea f52ac7028bec2 Author: David S. Miller Date: Wed Apr 19 08:59:27 2023 +0100 Merge branch 'mlx5e-xdp-extend' Tariq Toukan says: ==================== net/mlx5e: Extend XDP multi-buffer capabilities This series extends the XDP multi-buffer support in the mlx5e driver. Patchset breakdown: - Infrastructural changes and preparations. - Add XDP multi-buffer support for XDP redirect-in. - Use TX MPWQE (multi-packet WQE) HW feature for non-linear single-segmented XDP frames. - Add XDP multi-buffer support for striding RQ. In Striding RQ, we overcome the lack of headroom and tailroom between the RQ strides by allocating a side page per packet and using it for the xdp_buff descriptor. We structure the xdp_buff so that it contains nothing in the linear part, and the whole packet resides in the fragments. Performance highlight: Packet rate test, 64 bytes, 32 channels, MTU 9000 bytes. CPU: Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz. NIC: ConnectX-6 Dx, at 100 Gbps. +----------+-------------+-------------+---------+ | Test | Legacy RQ | Striding RQ | Speedup | +----------+-------------+-------------+---------+ | XDP_DROP | 101,615,544 | 117,191,020 | +15% | +----------+-------------+-------------+---------+ | XDP_TX | 95,608,169 | 117,043,422 | +22% | +----------+-------------+-------------+---------+ Series generated against net commit: e61caf04b9f8 Merge branch 'page_pool-allow-caching-from-safely-localized-napi' I'm submitting this directly as Saeed is traveling. ==================== Signed-off-by: David S. Miller commit f52ac7028bec22e925c8fece4f21641eb13b4d6f Author: Tariq Toukan Date: Mon Apr 17 15:19:03 2023 +0300 net/mlx5e: RX, Add XDP multi-buffer support in Striding RQ Here we add support for multi-buffer XDP handling in Striding RQ, which is our default out-of-the-box RQ type. Before this series, loading such an XDP program would fail, until you switch to the legacy RQ (by unsetting the rx_striding_rq priv-flag). To overcome the lack of headroom and tailroom between the strides, we allocate a side page to be used for the descriptor (xdp_buff / skb) and the linear part. When an XDP program is attached, we structure the xdp_buff so that it contains no data in the linear part, and the whole packet resides in the fragments. In case of XDP_PASS, where an SKB still needs to be created, we copy up to 256 bytes to its linear part, to match the current behavior, and satisfy functions that assume finding the packet headers in the SKB linear part (like eth_type_trans). Performance testing: Packet rate test, 64 bytes, 32 channels, MTU 9000 bytes. CPU: Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz. NIC: ConnectX-6 Dx, at 100 Gbps. +----------+-------------+-------------+---------+ | Test | Legacy RQ | Striding RQ | Speedup | +----------+-------------+-------------+---------+ | XDP_DROP | 101,615,544 | 117,191,020 | +15% | +----------+-------------+-------------+---------+ | XDP_TX | 95,608,169 | 117,043,422 | +22% | +----------+-------------+-------------+---------+ Reviewed-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 2cb0e27d43b4eec70e20103cb09055303f70b6d9 Author: Tariq Toukan Date: Mon Apr 17 15:19:02 2023 +0300 net/mlx5e: RX, Prepare non-linear striding RQ for XDP multi-buffer support In preparation for supporting XDP multi-buffer in striding RQ, use xdp_buff struct to describe the packet. Make its skb_shared_info collide the one of the allocated SKB, then add the fragments using the xdp_buff API. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 221c8c7ad7a2d414d6d64b5e5bbf7723ae23d3f5 Author: Tariq Toukan Date: Mon Apr 17 15:19:01 2023 +0300 net/mlx5e: RX, Generalize mlx5e_fill_mxbuf() Make the function more generic. Let it get an additional frame_sz parameter instead of deriving it from the RQ struct. No functional change here, just a preparation for a downstream patch. Reviewed-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 27602319e32862717c15c32283a727dc5bed695d Author: Tariq Toukan Date: Mon Apr 17 15:19:00 2023 +0300 net/mlx5e: RX, Take shared info fragment addition into a function Introduce mlx5e_add_skb_shared_info_frag(), a function dedicated for adding a fragment into a struct skb_shared_info object. Use it in the Legacy RQ flow. Similar usage will be added in a downstream patch by the corresponding Striding RQ flow. Reviewed-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 63abf14e13ed09ead1d979949963fe08ced3a77c Author: Tariq Toukan Date: Mon Apr 17 15:18:59 2023 +0300 net/mlx5e: XDP, Allow non-linear single-segment frames in XDP TX MPWQE Under a few restrictions, TX MPWQE feature can serve multiple TX packets in a single TX descriptor. It requires each of the packets to have a single scatter entry / segment. Today we allow only linear frames to use this feature, although there's no real problem with non-linear ones where the whole packet reside in the first fragment. Expand the XDP TX MPWQE feature support to include such frames. This is in preparation for the downstream patch, in which we will generate such non-linear frames. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 124d0d8daf85ddf106a25ab0647e41b956e5cd38 Author: Tariq Toukan Date: Mon Apr 17 15:18:58 2023 +0300 net/mlx5e: XDP, Remove un-established assumptions on XDP buffer Remove the assumption of non-zero linear length in the XDP xmit function, used to serve both internal XDP_TX operations as well as redirected-in requests. Do not apply the MLX5E_XDP_MIN_INLINE check unless necessary. Reviewed-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 20409abe52b1de8cfdc0565d89b7bc6d159dba35 Author: Tariq Toukan Date: Mon Apr 17 15:18:57 2023 +0300 net/mlx5e: XDP, Consider large muti-buffer packets in Striding RQ params calculations Function mlx5e_rx_get_linear_stride_sz() returns PAGE_SIZE immediately in case an XDP program is attached. The more accurate formula is ALIGN(sz, PAGE_SIZE), to prevent two packets from residing on the same page. The assumption behind the current code is that sz <= PAGE_SIZE holds for all cases with XDP program set. This is true because it is being called from: - 3 times from Striding RQ flows, in which XDP is not supported for such large packets. - 1 time from Legacy RQ flow, under the condition mlx5e_rx_is_linear_skb(). No functional change here, just removing the implied assumption in preparation for supporting XDP multi-buffer in Striding RQ. Reviewed-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit abd3f84ecab3ab90161c9ba49052ac4ca33a0ed3 Author: Tariq Toukan Date: Mon Apr 17 15:18:56 2023 +0300 net/mlx5e: XDP, Let XDP checker function get the params as input Change mlx5e_xdp_allowed() so it gets the params structure with the xdp_prog applied, rather than creating a local copy based on the current params in priv. This reduces the amount of memory on the stack, and acts on the exact params instance that's about to be applied. Reviewed-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 7fc06dd2ae7b42fc5093f76878b77c74006b4fd5 Author: Tariq Toukan Date: Mon Apr 17 15:18:55 2023 +0300 net/mlx5e: XDP, Improve Striding RQ check with XDP Non-linear mem scheme of Striding RQ does not yet support XDP at this point. Take the check where it belongs, inside the params validation function mlx5e_params_validate_xdp(). Reviewed-by: Gal Pressman Reviewed-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit c1783e74fc042adc28907ac7229b01ed20da31f9 Author: Tariq Toukan Date: Mon Apr 17 15:18:54 2023 +0300 net/mlx5e: XDP, Add support for multi-buffer XDP redirect-in Handle multi-buffer XDP redirect-in requests coming through mlx5e_xdp_xmit. Extend struct mlx5e_xmit_data_frags with an additional dma_arr field, to point to the fragments dma mapping, as they cannot be retrieved via the page_pool_get_dma_addr() function. Push a dma_addr xdpi instance per each fragment, and use them in the completion flow to dma_unmap the frags. Finally, remove the restriction in mlx5e_open_xdpsq, and set the flag in xdp_features. Reviewed-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 3f734b8c594bd378b0266cd98d6ce12b459da1d4 Author: Tariq Toukan Date: Mon Apr 17 15:18:53 2023 +0300 net/mlx5e: XDP, Use multiple single-entry objects in xdpi_fifo Here we fix the current wi->num_pkts abuse, as it was used to indicate multiple xdpi entries in the xdpi_fifo. Instead, reduce mlx5e_xdp_info to the size of a single field, making it a union of unions. Per packet, use as many instances as needed to provide the information needed at the time of completion. The sequence of xdpi instances pushed is well defined, derived by the xmit_mode. Reviewed-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit 3a48ba12b4e471a9a3cf5fcff5146632ae6453d5 Author: Tariq Toukan Date: Mon Apr 17 15:18:52 2023 +0300 net/mlx5e: XDP, Remove doubtful unlikely calls It is not likely nor unlikely that the xdp buff has fragments, it depends on the program loaded and size of the packet received. Reviewed-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit eb9b9fdcafe29f022260dc43bd001b85937d9f83 Author: Tariq Toukan Date: Mon Apr 17 15:18:51 2023 +0300 net/mlx5e: Introduce extended version for mlx5e_xmit_data Introduce struct mlx5e_xmit_data_frags to be used for non-linear xmit buffers. Let it include sinfo pointer. Take one bit from the len field to indicate if the descriptor has fragments and can be casted-up into the extended version. Zero-init to make sure has_frags, and potentially future fields, are zero when not explicitly assigned. Another field will be added in a downstream patch to indicate and point to dma addresses of the different frags, for redirect-in requests. This simplifies the mlx5e_xmit_xdp_frame/mlx5e_xmit_xdp_frame_mpwqe functions params. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit e32654f198897b0323e52fbd96a38606d0289c35 Author: Tariq Toukan Date: Mon Apr 17 15:18:50 2023 +0300 net/mlx5e: Move struct mlx5e_xmit_data to datapath header Move TX datapath struct from the generic en.h to the datapath txrx.h header, where it belongs. Reviewed-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit aebc62d336fed235e35d8522a004866c78dfa5c4 Author: Tariq Toukan Date: Mon Apr 17 15:18:49 2023 +0300 net/mlx5e: Move XDP struct and enum to XDP header Move struct mlx5e_xdp_info and enum mlx5e_xdp_xmit_mode from the generic en.h to the XDP header, where they belong. Reviewed-by: Saeed Mahameed Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit ef16799640865f937719f0771c93be5dca18adc6 Author: Hans de Goede Date: Tue Apr 18 15:25:46 2023 +0200 wifi: iwlwifi: dvm: Fix memcpy: detected field-spanning write backtrace A received TKIP key may be up to 32 bytes because it may contain MIC rx/tx keys too. These are not used by iwl and copying these over overflows the iwl_keyinfo.key field. Add a check to not copy more data to iwl_keyinfo.key then will fit. This fixes backtraces like this one: memcpy: detected field-spanning write (size 32) of single field "sta_cmd.key.key" at drivers/net/wireless/intel/iwlwifi/dvm/sta.c:1103 (size 16) WARNING: CPU: 1 PID: 946 at drivers/net/wireless/intel/iwlwifi/dvm/sta.c:1103 iwlagn_send_sta_key+0x375/0x390 [iwldvm] Hardware name: Dell Inc. Latitude E6430/0H3MT5, BIOS A21 05/08/2017 RIP: 0010:iwlagn_send_sta_key+0x375/0x390 [iwldvm] Call Trace: iwl_set_dynamic_key+0x1f0/0x220 [iwldvm] iwlagn_mac_set_key+0x1e4/0x280 [iwldvm] drv_set_key+0xa4/0x1b0 [mac80211] ieee80211_key_enable_hw_accel+0xa8/0x2d0 [mac80211] ieee80211_key_replace+0x22d/0x8e0 [mac80211] Link: https://www.alionet.org/index.php?topic=1469.0 Link: https://lore.kernel.org/linux-wireless/20230218191056.never.374-kees@kernel.org/ Link: https://lore.kernel.org/linux-wireless/68760035-7f75-1b23-e355-bfb758a87d83@redhat.com/ Cc: Kees Cook Suggested-by: Johannes Berg Signed-off-by: Hans de Goede Reviewed-by: Kees Cook Signed-off-by: Johannes Berg commit 0d19bd4df75eee7df20377ffa2b62a4adedd19ff Author: Rob Herring Date: Fri Mar 10 08:47:33 2023 -0600 ALSA: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144734.1546587-1-robh@kernel.org Signed-off-by: Takashi Iwai commit d42c521ff4c9824e81c13d5fe1af947c1c652669 Author: Rob Herring Date: Fri Mar 10 08:47:33 2023 -0600 ALSA: ppc/tumbler: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144733.1546500-1-robh@kernel.org Signed-off-by: Takashi Iwai commit 14cac662235ea097b6ff97f558ce5066292806b9 Author: Alain Volmat Date: Sun Apr 16 21:55:23 2023 +0200 net: ethernet: stmmac: dwmac-sti: remove stih415/stih416/stid127 Remove no more supported platforms (stih415/stih416 and stid127) Signed-off-by: Alain Volmat Acked-by: Jakub Kicinski Reviewed-by: Horatiu Vultur Link: https://lore.kernel.org/r/20230416195523.61075-1-avolmat@me.com Signed-off-by: Jakub Kicinski commit 33d74c8ff5ced854bc0ab6f94a778464dd2b905b Author: Arnd Bergmann Date: Mon Apr 17 22:55:25 2023 +0200 net: mscc: ocelot: remove incompatible prototypes The types for the register argument changed recently, but there are still incompatible prototypes that got left behind, and gcc-13 warns about these: In file included from drivers/net/ethernet/mscc/ocelot.c:13: drivers/net/ethernet/mscc/ocelot.h:97:5: error: conflicting types for 'ocelot_port_readl' due to enum/integer mismatch; have 'u32(struct ocelot_port *, u32)' {aka 'unsigned int(struct ocelot_port *, unsigned int)'} [-Werror=enum-int-mismatch] 97 | u32 ocelot_port_readl(struct ocelot_port *port, u32 reg); | ^~~~~~~~~~~~~~~~~ Just remove the two prototypes, and rely on the copy in the global header. Fixes: 9ecd05794b8d ("net: mscc: ocelot: strengthen type of "u32 reg" in I/O accessors") Signed-off-by: Arnd Bergmann Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20230417205531.1880657-1-arnd@kernel.org Signed-off-by: Jakub Kicinski commit 6b2c6e4a938fece9b539c8085f21d17c5e6eb9de Author: Corinna Vinschen Date: Mon Apr 17 21:28:45 2023 +0200 net: stmmac: propagate feature flags to vlan stmmac_dev_probe doesn't propagate feature flags to VLANs. So features like offloading don't correspond with the general features and it's not possible to manipulate features via ethtool -K to affect VLANs. Propagate feature flags to vlan features. Drop TSO feature because it does not work on VLANs yet. Signed-off-by: Corinna Vinschen Link: https://lore.kernel.org/r/20230417192845.590034-1-vinschen@redhat.com Signed-off-by: Jakub Kicinski commit 980f0799a15c75403f1f9284a32b6056b9660144 Author: Hangbin Liu Date: Tue Apr 18 11:48:41 2023 +0800 bonding: add software tx timestamping support Currently, bonding only obtain the timestamp (ts) information of the active slave, which is available only for modes 1, 5, and 6. For other modes, bonding only has software rx timestamping support. However, some users who use modes such as LACP also want tx timestamp support. To address this issue, let's check the ts information of each slave. If all slaves support tx timestamping, we can enable tx timestamping support for the bond. Add a note that the get_ts_info may be called with RCU, or rtnl or reference on the device in ethtool.h> Suggested-by: Miroslav Lichvar Signed-off-by: Hangbin Liu Acked-by: Jay Vosburgh Link: https://lore.kernel.org/r/20230418034841.2566262-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 2e75ab3189ecfe5f4383ef82896d30eaad0b3cd6 Merge: 5464912cfae70 3335068f87217 Author: Palmer Dabbelt Date: Tue Apr 18 20:43:07 2023 -0700 Merge patch series "riscv: Use PUD/P4D/PGD pages for the linear mapping" Alexandre Ghiti says: This patchset intends to improve tlb utilization by using hugepages for the linear mapping. As reported by Anup in v6, when STRICT_KERNEL_RWX is enabled, we must take care of isolating the kernel text and rodata so that they are not mapped with a PUD mapping which would then assign wrong permissions to the whole region: it is achieved the same way as arm64 by using the memblock nomap API which isolates those regions and re-merge them afterwards thus avoiding any issue with the system resources tree creation. arch/riscv/include/asm/page.h | 19 ++++++- arch/riscv/mm/init.c | 102 ++++++++++++++++++++++++++-------- arch/riscv/mm/physaddr.c | 16 ++++++ drivers/of/fdt.c | 11 ++-- 4 files changed, 118 insertions(+), 30 deletions(-) * b4-shazam-merge: riscv: Use PUD/P4D/PGD pages for the linear mapping riscv: Move the linear mapping creation in its own function riscv: Get rid of riscv_pfn_base variable Link: https://lore.kernel.org/r/20230324155421.271544-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 3335068f87217ea59d08f462187dc856652eea15 Author: Alexandre Ghiti Date: Fri Mar 24 16:54:21 2023 +0100 riscv: Use PUD/P4D/PGD pages for the linear mapping During the early page table creation, we used to set the mapping for PAGE_OFFSET to the kernel load address: but the kernel load address is always offseted by PMD_SIZE which makes it impossible to use PUD/P4D/PGD pages as this physical address is not aligned on PUD/P4D/PGD size (whereas PAGE_OFFSET is). But actually we don't have to establish this mapping (ie set va_pa_offset) that early in the boot process because: - first, setup_vm installs a temporary kernel mapping and among other things, discovers the system memory, - then, setup_vm_final creates the final kernel mapping and takes advantage of the discovered system memory to create the linear mapping. During the first phase, we don't know the start of the system memory and then until the second phase is finished, we can't use the linear mapping at all and phys_to_virt/virt_to_phys translations must not be used because it would result in a different translation from the 'real' one once the final mapping is installed. So here we simply delay the initialization of va_pa_offset to after the system memory discovery. But to make sure noone uses the linear mapping before, we add some guard in the DEBUG_VIRTUAL config. Finally we can use PUD/P4D/PGD hugepages when possible, which will result in a better TLB utilization. Note that: - this does not apply to rv32 as the kernel mapping lies in the linear mapping. - we rely on the firmware to protect itself using PMP. Signed-off-by: Alexandre Ghiti Acked-by: Rob Herring # DT bits Reviewed-by: Andrew Jones Reviewed-by: Anup Patel Tested-by: Anup Patel Link: https://lore.kernel.org/r/20230324155421.271544-4-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 8589e346bbb679cf7a4b564f75295d94250058f0 Author: Alexandre Ghiti Date: Fri Mar 24 16:54:20 2023 +0100 riscv: Move the linear mapping creation in its own function No change intended, it just splits the linear mapping creation from setup_vm_final: this prepares for upcoming additions to the linear mapping creation. Signed-off-by: Alexandre Ghiti Reviewed-by: Andrew Jones Reviewed-by: Anup Patel Tested-by: Anup Patel Link: https://lore.kernel.org/r/20230324155421.271544-3-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit a7407a1318a9d7b5a7de7ab19935de5fc4c47a57 Author: Alexandre Ghiti Date: Fri Mar 24 16:54:19 2023 +0100 riscv: Get rid of riscv_pfn_base variable Use directly phys_ram_base instead, riscv_pfn_base is just the pfn of the address contained in phys_ram_base. Even if there is no functional change intended in this patch, actually setting phys_ram_base that early changes the behaviour of kernel_mapping_pa_to_va during the early boot: phys_ram_base used to be zero before this patch and now it is set to the physical start address of the kernel. But it does not break the conversion of a kernel physical address into a virtual address since kernel_mapping_pa_to_va should only be used on kernel physical addresses, i.e. addresses greater than the physical start address of the kernel. Signed-off-by: Alexandre Ghiti Reviewed-by: Andrew Jones Reviewed-by: Anup Patel Tested-by: Anup Patel Link: https://lore.kernel.org/r/20230324155421.271544-2-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 5464912cfae706aff47f6253c495bf81284bc5d5 Author: Conor Dooley Date: Wed Apr 5 11:21:10 2023 +0100 RISC-V: align ISA extension Kconfig help text with each other Other extensions only capitalise the first letter in the text visible in Kconfig menus, and provide a short comment about the extension's meaning. Do the same for Svnapot & Svpbmt. The precedent for capitalisation in the Kconfig text was set by Zicbom & sorta followed for Zicboz. The RVI styling used for multi-letter extensions only capitalises the first letter, so do the same here. If nothing else, my OCD likes it when the extensions follow a consistent pattern. While editing one of the lines, reformat the "spelling" of 64-bit. Signed-off-by: Conor Dooley Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230405-pucker-cogwheel-3a999a94a2f2@wendy Signed-off-by: Palmer Dabbelt commit 8bf7b3b6676270c0ed3e4968608e1e052ecc8606 Author: Song Shuai Date: Fri Mar 10 19:03:36 2023 +0800 riscv: Kconfig: enable SCHED_MC kconfig RISC-V now builds the sched domain based on the simple possible map. Enable SCHED_MC to make the building based on cpu_coregroup_mask() which also takes care of the NUMA and cores with LLC. Signed-off-by: Song Shuai Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230310110336.970985-1-suagrfillet@gmail.com Signed-off-by: Palmer Dabbelt commit c4b52d8b6c1de1e6359bef2d1394d5917940b3dc Author: Song Shuai Date: Thu Mar 23 20:39:24 2023 +0800 riscv: export cpu/freq invariant to scheduler RISC-V now manages CPU topology using arch_topology which provides CPU capacity and frequency related interfaces to access the cpu/freq invariant in possible heterogeneous or DVFS-enabled platforms. Here adds topology.h file to export the arch_topology interfaces for replacing the scheduler's constant-based cpu/freq invariant accounting. Signed-off-by: Song Shuai Reviewed-by: Andrew Jones Reviewed-by: Ley Foon Tan Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230323123924.3032174-1-suagrfillet@gmail.com [Palmer: Fix the whitespace issues.] Signed-off-by: Palmer Dabbelt commit 65a15d6560dff065339f6cac91de4beded60fe3f Author: Brian King Date: Wed Apr 12 12:40:15 2023 -0500 scsi: ipr: Remove SATA support Linux SATA support in ipr has always been limited to SATA DVDs. The last systems that had the option of including a SATA DVD was Power 8, which have been withdrawn for some time now, so this support can be removed. Signed-off-by: Brian King Link: https://lore.kernel.org/r/20230412174015.114764-1-brking@linux.vnet.ibm.com Reviewed-by: Damien Le Moal Reviewed-by: John Garry Signed-off-by: Martin K. Petersen commit 0c028b6a115e7f18480ec3f98ba7bccf011646ea Author: John Garry Date: Sun Apr 16 17:56:54 2023 +0000 scsi: scsi_debug: Abort commands from scsi_debug_device_reset() Currently scsi_debug_device_reset() does not do much apart from setting the SDEBUG_UA_POR ("Power on, reset, or bus device reset") flag, which is eventually passed back to the SCSI midlayer later for a "unit attention" command. There is a report that blktest scsi/007 test fails due to commit 1107c7b24ee3 ("scsi: scsi_debug: Dynamically allocate sdebug_queued_cmd"). The problem there is that there are dangling scsi_debug queued commands when we attempt to remove the driver. scsi/007 test triggers SCSI EH and attempts to abort a timed-out command. Function scsi_debug_device_reset() is called as part of the EH, but does not deal with outstanding erroneous command. Prior to the named commit, removing the driver caused all dangling queued commands to be stopped - this should have not been necessary. Fix by aborting outstanding commands on a scsi_device basis from scsi_debug_device_reset(). Fixes: 1107c7b24ee3 ("scsi: scsi_debug: Dynamically allocate sdebug_queued_cmd") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-lkp/202304071111.e762fcbd-yujie.liu@intel.com Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230416175654.159163-1-john.g.garry@oracle.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit eb04e72b345b01d192163e012853fb28f433b234 Merge: 6a24915145c92 aa5af0aa90bad Author: Palmer Dabbelt Date: Tue Apr 18 16:01:19 2023 -0700 Merge patch series "RISC-V Hardware Probing User Interface" Evan Green says: There's been a bunch of off-list discussions about this, including at Plumbers. The original plan was to do something involving providing an ISA string to userspace, but ISA strings just aren't sufficient for a stable ABI any more: in order to parse an ISA string users need the version of the specifications that the string is written to, the version of each extension (sometimes at a finer granularity than the RISC-V releases/versions encode), and the expected use case for the ISA string (ie, is it a U-mode or M-mode string). That's a lot of complexity to try and keep ABI compatible and it's probably going to continue to grow, as even if there's no more complexity in the specifications we'll have to deal with the various ISA string parsing oddities that end up all over userspace. Instead this patch set takes a very different approach and provides a set of key/value pairs that encode various bits about the system. The big advantage here is that we can clearly define what these mean so we can ensure ABI stability, but it also allows us to encode information that's unlikely to ever appear in an ISA string (see the misaligned access performance, for example). The resulting interface looks a lot like what arm64 and x86 do, and will hopefully fit well into something like ACPI in the future. The actual user interface is a syscall, with a vDSO function in front of it. The vDSO function can answer some queries without a syscall at all, and falls back to the syscall for cases it doesn't have answers to. Currently we prepopulate it with an array of answers for all keys and a CPU set of "all CPUs". This can be adjusted as necessary to provide fast answers to the most common queries. An example series in glibc exposing this syscall and using it in an ifunc selector for memcpy can be found at [1]. I was asked about the performance delta between this and something like sysfs. I created a small test program and ran it on a Nezha D1 Allwinner board. Doing each operation 100000 times and dividing, these operations take the following amount of time: - open()+read()+close() of /sys/kernel/cpu_byteorder: 3.8us - access("/sys/kernel/cpu_byteorder", R_OK): 1.3us - riscv_hwprobe() vDSO and syscall: .0094us - riscv_hwprobe() vDSO with no syscall: 0.0091us These numbers get farther apart if we query multiple keys, as sysfs will scale linearly with the number of keys, where the dedicated syscall stays the same. To frame these numbers, I also did a tight fork/exec/wait loop, which I measured as 4.8ms. So doing 4 open/read/close operations is a delta of about 0.3%, versus a single vDSO call is a delta of essentially zero. [1] https://patchwork.ozlabs.org/project/glibc/list/?series=343050 * b4-shazam-merge: RISC-V: Add hwprobe vDSO function and data selftests: Test the new RISC-V hwprobe interface RISC-V: hwprobe: Support probing of misaligned access performance RISC-V: hwprobe: Add support for RISCV_HWPROBE_BASE_BEHAVIOR_IMA RISC-V: Add a syscall for HW probing RISC-V: Move struct riscv_cpuinfo to new header Link: https://lore.kernel.org/r/20230407231103.2622178-1-evan@rivosinc.com Signed-off-by: Palmer Dabbelt commit 63f8793ee60513a09f110ea460a6ff2c33811cdb Author: Chaitanya Kulkarni Date: Sun Apr 16 15:03:39 2023 -0700 null_blk: Always check queue mode setting from configfs Make sure to check device queue mode in the null_validate_conf() and return error for NULL_Q_RQ as we don't allow legacy I/O path, without this patch we get OOPs when queue mode is set to 1 from configfs, following are repro steps :- modprobe null_blk nr_devices=0 mkdir config/nullb/nullb0 echo 1 > config/nullb/nullb0/memory_backed echo 4096 > config/nullb/nullb0/blocksize echo 20480 > config/nullb/nullb0/size echo 1 > config/nullb/nullb0/queue_mode echo 1 > config/nullb/nullb0/power Entering kdb (current=0xffff88810acdd080, pid 2372) on processor 42 Oops: (null) due to oops @ 0xffffffffc041c329 CPU: 42 PID: 2372 Comm: sh Tainted: G O N 6.3.0-rc5lblk+ #5 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 RIP: 0010:null_add_dev.part.0+0xd9/0x720 [null_blk] Code: 01 00 00 85 d2 0f 85 a1 03 00 00 48 83 bb 08 01 00 00 00 0f 85 f7 03 00 00 80 bb 62 01 00 00 00 48 8b 75 20 0f 85 6d 02 00 00 <48> 89 6e 60 48 8b 75 20 bf 06 00 00 00 e8 f5 37 2c c1 48 8b 75 20 RSP: 0018:ffffc900052cbde0 EFLAGS: 00010246 RAX: 0000000000000001 RBX: ffff88811084d800 RCX: 0000000000000001 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888100042e00 RBP: ffff8881053d8200 R08: ffffc900052cbd68 R09: ffff888105db2000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000002 R13: ffff888104765200 R14: ffff88810eec1748 R15: ffff88810eec1740 FS: 00007fd445fd1740(0000) GS:ffff8897dfc80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000060 CR3: 0000000166a00000 CR4: 0000000000350ee0 DR0: ffffffff8437a488 DR1: ffffffff8437a489 DR2: ffffffff8437a48a DR3: ffffffff8437a48b DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: nullb_device_power_store+0xd1/0x120 [null_blk] configfs_write_iter+0xb4/0x120 vfs_write+0x2ba/0x3c0 ksys_write+0x5f/0xe0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7fd4460c57a7 Code: 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24 RSP: 002b:00007ffd3792a4a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fd4460c57a7 RDX: 0000000000000002 RSI: 000055b43c02e4c0 RDI: 0000000000000001 RBP: 000055b43c02e4c0 R08: 000000000000000a R09: 00007fd44615b4e0 R10: 00007fd44615b3e0 R11: 0000000000000246 R12: 0000000000000002 R13: 00007fd446198520 R14: 0000000000000002 R15: 00007fd446198700 Signed-off-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal Reviewed-by: Ming Lei Reviewed-by: Nitesh Shetty Link: https://lore.kernel.org/r/20230416220339.43845-1-kch@nvidia.com Signed-off-by: Jens Axboe commit 2d786e66c9662d84cbeab981ce3a371d2fb5a4bb Author: Ming Lei Date: Tue Apr 18 21:18:10 2023 +0800 block: ublk: switch to ioctl command encoding All ublk commands(control, IO) should have taken ioctl command encoding from the beginning, because ioctl command encoding defines each code uniquely, so driver can figure out wrong command sent from userspace easily; 2) it might help security subsystem for audit uring cmd[1]. Unfortunately we didn't do that way, and it could be one lesson for ublk driver. So switch to ioctl command encoding now, we still support commands encoded in old way, but they become legacy definition. Any new command should take ioctl encoding. See ublksrv code for switching to ioctl command encoding in [2]. [1] https://lore.kernel.org/io-uring/CAHC9VhSVzujW9LOj5Km80AjU0EfAuukoLrxO6BEfnXeK_s6bAg@mail.gmail.com/ [2] https://github.com/ming1/ubdsrv/commits/ioctl_cmd_encoding Cc: Christoph Hellwig Cc: Ken Kurematsu Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230418131810.855959-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 1f6fa392a9942e4a2bd3122913baeb33e987ccd9 Author: Rob Herring Date: Fri Mar 10 08:47:35 2023 -0600 remoteproc: st: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Reviewed-by: Mathieu Poirier Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230310144736.1546972-1-robh@kernel.org commit ea97f6c8558e83cb457c3b5f53351e4fd8519ab1 Author: David Wei Date: Tue Apr 18 15:58:18 2023 -0700 io_uring: add support for multishot timeouts A multishot timeout submission will repeatedly generate completions with the IORING_CQE_F_MORE cflag set. Depending on the value of the `off' field in the submission, these timeouts can either repeat indefinitely until cancelled (`off' = 0) or for a fixed number of times (`off' > 0). Only noseq timeouts (i.e. not dependent on the number of I/O completions) are supported. An indefinite timer will be cancelled if the CQ ever overflows. Signed-off-by: David Wei Link: https://lore.kernel.org/r/20230418225817.1905027-1-davidhwei@meta.com Signed-off-by: Jens Axboe commit 2236b3905b4d4e9cd4d149ab35767858c02bb79b Author: Pavel Begunkov Date: Tue Apr 18 14:06:41 2023 +0100 io_uring/rsrc: disassociate nodes and rsrc_data Make rsrc nodes independent from rsrd_data, for that we keep ctx and rsrc type in nodes. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4f259abe9cd4eea6a3b4ed83508635218acd3c3f.1681822823.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit fc7f3a8d3a78503c4f3e108155fb9a233dc307a4 Author: Pavel Begunkov Date: Tue Apr 18 14:06:40 2023 +0100 io_uring/rsrc: devirtualise rsrc put callbacks We only have two rsrc types, buffers and files, replace virtual callbacks for putting resources down with a switch..case. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/02ca727bf8e5f7f820c2f404e95ae88c8f472930.1681822823.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 29b26c556e7439b1370ac6a59fce83a9d1521de1 Author: Pavel Begunkov Date: Tue Apr 18 14:06:39 2023 +0100 io_uring/rsrc: pass node to io_rsrc_put_work() Instead of passing rsrc_data and a resource to io_rsrc_put_work() just forward node, that's all the function needs. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/791e8edd28d78797240b74d34e99facbaad62f3b.1681822823.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 4130b49991d6b8ca0ea44cb256e710c4e48d7f01 Author: Pavel Begunkov Date: Tue Apr 18 14:06:38 2023 +0100 io_uring/rsrc: inline io_rsrc_put_work() io_rsrc_put_work() is simple enough to be open coded into its only caller. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1b36dd46766ced39a9b160767babfa2fce07b8f8.1681822823.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 26147da37f3e52041d9deba189d39f27ce78a84f Author: Pavel Begunkov Date: Tue Apr 18 14:06:37 2023 +0100 io_uring/rsrc: add empty flag in rsrc_node Unless a node was flushed by io_rsrc_ref_quiesce(), it'll carry a resource. Replace ->inline_items with an empty flag, which is initialised to false and only raised in io_rsrc_ref_quiesce(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/75d384c9d2252e12af73b9cf8a44e1699106aeb1.1681822823.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c376644fb915fbdea8c4a04f859d032a8be352fd Author: Pavel Begunkov Date: Tue Apr 18 14:06:36 2023 +0100 io_uring/rsrc: merge nodes and io_rsrc_put struct io_rsrc_node carries a number of resources represented by struct io_rsrc_put. That was handy before for sync overhead ammortisation, but all complexity is gone and nodes are simple and lightweight. Let's allocate a separate node for each resource. Nodes and io_rsrc_put and not much different in size, and former are cached, so node allocation should work better. That also removes some overhead for nested iteration in io_rsrc_node_ref_zero() / __io_rsrc_put_work(). Another reason for the patch is that it greatly reduces complexity by moving io_rsrc_node_switch[_start]() inside io_queue_rsrc_removal(), so users don't have to care about it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c7d3a45b30cc14cd93700a710dd112edc703db98.1681822823.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 63fea89027ff4fd4f350b471ad5b9220d373eec5 Author: Pavel Begunkov Date: Tue Apr 18 14:06:35 2023 +0100 io_uring/rsrc: infer node from ctx on io_queue_rsrc_removal For io_queue_rsrc_removal() we should always use the current active rsrc node, don't pass it directly but let the function grab it from the context. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d15939b4afea730978b4925685c2577538b823bb.1681822823.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 2e6f45ac0e640bbd49296adfa0982c84f85fa342 Author: Pavel Begunkov Date: Tue Apr 18 14:06:34 2023 +0100 io_uring/rsrc: remove unused io_rsrc_node::llist ->llist was needed for rsrc node destruction offload, which is removed now. Get rid of the unused field. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8e7d764c3f947489fde88d0927c3060d2e1bb599.1681822823.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e046fe5a36a970bc14fbfbcb2074a48776f6b671 Author: Linus Torvalds Date: Mon Apr 17 12:13:35 2023 -0700 x86: set FSRS automatically on AMD CPUs that have FSRM So Intel introduced the FSRS ("Fast Short REP STOS") CPU capability bit, because they seem to have done the (much simpler) REP STOS optimizations separately and later than the REP MOVS one. In contrast, when AMD introduced support for FSRM ("Fast Short REP MOVS"), in the Zen 3 core, it appears to have improved the REP STOS case at the same time, and since the FSRS bit was added by Intel later, it doesn't show up on those AMD Zen 3 cores. And now that we made use of FSRS for the "rep stos" conditional, that made those AMD machines unnecessarily slower. The Intel situation where "rep movs" is fast, but "rep stos" isn't, is just odd. The 'stos' case is a lot simpler with no aliasing, no mutual alignment issues, no complicated cases. So this just sets FSRS automatically when FSRM is available on AMD machines, to get back all the nice REP STOS goodness in Zen 3. Reported-and-tested-by: Jens Axboe Signed-off-by: Linus Torvalds commit 427fda2c8a4977d9dbd9bc108bbe6e21ec84648d Author: Linus Torvalds Date: Sun Apr 16 18:23:06 2023 -0700 x86: improve on the non-rep 'copy_user' function The old 'copy_user_generic_unrolled' function was oddly implemented for largely historical reasons: it had been largely based on the uncached copy case, which has some other concerns. For example, the __copy_user_nocache() function uses 'movnti' for the destination stores, and those want the destination to be aligned. In contrast, the regular copy function doesn't really care, and trying to align things only complicates matters. Also, like the clear_user function, the copy function had some odd handling of the repeat counts, complicating the exception handling for no really good reason. So as with clear_user, just write it to keep all the byte counts in the %rcx register, exactly like the 'rep movs' functionality that this replaces. Unlike a real 'rep movs', we do allow for this to trash a few temporary registers to not have to unnecessarily save/restore registers on the stack. And like the clearing case, rename this to what it now clearly is: 'rep_movs_alternative', and make it one coherent function, so that it shows up as such in profiles (instead of the odd split between "copy_user_generic_unrolled" and "copy_user_short_string", the latter of which was not about strings at all, and which was shared with the uncached case). Signed-off-by: Linus Torvalds commit 8c9b6a88b7e2f33c656cd667a081bfd4dc8f5005 Author: Linus Torvalds Date: Sun Apr 16 14:06:58 2023 -0700 x86: improve on the non-rep 'clear_user' function The old version was oddly written to have the repeat count in multiple registers. So instead of taking advantage of %rax being zero, it had some sub-counts in it. All just for a "single word clearing" loop, which isn't even efficient to begin with. So get rid of those games, and just keep all the state in the same registers we got it in (and that we should return things in). That not only makes this act much more like 'rep stos' (which this function is replacing), but makes it much easier to actually do the obvious loop unrolling. Also rename the function from the now nonsensical 'clear_user_original' to what it now clearly is: 'rep_stos_alternative'. End result: if we don't have a fast 'rep stosb', at least we can have a fast fallback for it. Signed-off-by: Linus Torvalds commit 577e6a7fd50d519c201d20968b6a027a6563dc4c Author: Linus Torvalds Date: Sat Apr 15 19:31:34 2023 -0700 x86: inline the 'rep movs' in user copies for the FSRM case This does the same thing for the user copies as commit 0db7058e8e23 ("x86/clear_user: Make it faster") did for clear_user(). In other words, it inlines the "rep movs" case when X86_FEATURE_FSRM is set, avoiding the function call entirely. In order to do that, it makes the calling convention for the out-of-line case ("copy_user_generic_unrolled") match the 'rep movs' calling convention, although it does also end up clobbering a number of additional registers. Also, to simplify code sharing in the low-level assembly with the __copy_user_nocache() function (that uses the normal C calling convention), we end up with a kind of mixed return value for the low-level asm code: it will return the result in both %rcx (to work as an alternative for the 'rep movs' case), _and_ in %rax (for the nocache case). We could avoid this by wrapping __copy_user_nocache() callers in an inline asm, but since the cost is just an extra register copy, it's probably not worth it. Signed-off-by: Linus Torvalds commit 3639a535587d7aac449cdce9710dfdc97a3c8c8e Author: Linus Torvalds Date: Sat Apr 15 13:39:15 2023 -0700 x86: move stac/clac from user copy routines into callers This is preparatory work for inlining the 'rep movs' case, but also a cleanup. The __copy_user_nocache() function was mis-used by the rdma code to do uncached kernel copies that don't actually want user copies at all, and as a result doesn't want the stac/clac either. Signed-off-by: Linus Torvalds commit d2c95f9d6802cc518d71d9795f4d9da54fb4e24d Author: Linus Torvalds Date: Sat Apr 15 13:22:31 2023 -0700 x86: don't use REP_GOOD or ERMS for user memory clearing The modern target to use is FSRS (Fast Short REP STOS), and the other cases should only be used for bigger areas (ie mainly things like page clearing). Note! This changes the conditional for the inlining from FSRM ("fast short rep movs") to FSRS ("fast short rep stos"). We'll have a separate fixup for AMD microarchitectures that have a good 'rep stosb' yet do not set the new Intel-specific FSRS bit (because FSRM was there first). Signed-off-by: Linus Torvalds commit adfcf4231b8cbc2d9c1e7bfaa965b907e60639eb Author: Linus Torvalds Date: Sat Apr 15 13:14:59 2023 -0700 x86: don't use REP_GOOD or ERMS for user memory copies The modern target to use is FSRM (Fast Short REP MOVS), and the other cases should only be used for bigger areas (ie mainly things like page clearing). Signed-off-by: Linus Torvalds commit 20f3337d350c4e1b4ac66d731fd4e98565bf6cc0 Author: Linus Torvalds Date: Sat Apr 15 12:01:14 2023 -0700 x86: don't use REP_GOOD or ERMS for small memory clearing The modern target to use is FSRS (Fast Short REP STOS), and the other cases should only be used for bigger areas (ie mainly things like page clearing). Signed-off-by: Linus Torvalds commit 68674f94ffc9dddc45e7733963ecc35c5eda9efd Author: Linus Torvalds Date: Sat Apr 15 11:47:06 2023 -0700 x86: don't use REP_GOOD or ERMS for small memory copies The modern target to use is FSRM (Fast Short REP MOVS), and the other cases should only be used for bigger areas (ie mainly things like page copying and clearing). Signed-off-by: Linus Torvalds commit 4248d0083ec5817eebfb916c54950d100b3468ee Author: Longlong Xia Date: Fri Apr 14 10:17:41 2023 +0800 mm: ksm: support hwpoison for ksm page hwpoison_user_mappings() is updated to support ksm pages, and add collect_procs_ksm() to collect processes when the error hit an ksm page. The difference from collect_procs_anon() is that it also needs to traverse the rmap-item list on the stable node of the ksm page. At the same time, add_to_kill_ksm() is added to handle ksm pages. And task_in_to_kill_list() is added to avoid duplicate addition of tsk to the to_kill list. This is because when scanning the list, if the pages that make up the ksm page all come from the same process, they may be added repeatedly. Link: https://lkml.kernel.org/r/20230414021741.2597273-3-xialonglong1@huawei.com Signed-off-by: Longlong Xia Tested-by: Naoya Horiguchi Reviewed-by: Kefeng Wang Cc: Miaohe Lin Cc: Nanyong Sun Signed-off-by: Andrew Morton commit 4f775086a6eee07c6ae4be4734d736e13b537351 Author: Longlong Xia Date: Fri Apr 14 10:17:40 2023 +0800 mm: memory-failure: refactor add_to_kill() Patch series "mm: ksm: support hwpoison for ksm page", v2. Currently, ksm does not support hwpoison. As ksm is being used more widely for deduplication at the system level, container level, and process level, supporting hwpoison for ksm has become increasingly important. However, ksm pages were not processed by hwpoison in 2009 [1]. The main method of implementation: 1. Refactor add_to_kill() and add new add_to_kill_*() to better accommodate the handling of different types of pages. 2. Add collect_procs_ksm() to collect processes when the error hit an ksm page. 3. Add task_in_to_kill_list() to avoid duplicate addition of tsk to the to_kill list. 4. Try_to_unmap ksm page (already supported). 5. Handle related processes such as sending SIGBUS. Tested with poisoning to ksm page from 1) different process 2) one process and with/without memory_failure_early_kill set, the processes are killed as expected with the patchset. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/?h=01e00f880ca700376e1845cf7a2524ebe68e47d6 This patch (of 2): The page_address_in_vma() is used to find the user virtual address of page in add_to_kill(), but it doesn't support ksm due to the ksm page->index unusable, add an ksm_addr as parameter to add_to_kill(), let's the caller to pass it, also rename the function to __add_to_kill(), and adding add_to_kill_anon_file() for handling anonymous pages and file pages, adding add_to_kill_fsdax() for handling fsdax pages. Link: https://lkml.kernel.org/r/20230414021741.2597273-1-xialonglong1@huawei.com Link: https://lkml.kernel.org/r/20230414021741.2597273-2-xialonglong1@huawei.com Signed-off-by: Longlong Xia Tested-by: Naoya Horiguchi Reviewed-by: Kefeng Wang Cc: Kefeng Wang Cc: Miaohe Lin Cc: Nanyong Sun Signed-off-by: Andrew Morton commit 3cc0c3738cde66a1eadf977fa7b2fdecbbcf5d4f Author: Jeff Xu Date: Fri Apr 14 02:28:01 2023 +0000 selftests/memfd: fix test_sysctl sysctl memfd_noexec is pid-namespaced, non-reservable, and inherent to the child process. Move the inherence test from init ns to child ns, so init ns can keep the default value. Link: https://lkml.kernel.org/r/20230414022801.2545257-1-jeffxu@google.com Signed-off-by: Jeff Xu Reported-by: kernel test robot Link: https://lore.kernel.org/oe-lkp/202303312259.441e35db-yujie.liu@intel.com Tested-by: Yujie Liu Cc: Daniel Verkamp Cc: Dmitry Torokhov Cc: Hugh Dickins Cc: Jann Horn Cc: Jorge Lucangeli Obes Cc: Kees Cook Cc: Shuah Khan Signed-off-by: Andrew Morton commit c025da0f14e80028de93f72976a0d81dafc17d03 Author: Chaitanya S Prakash Date: Thu Mar 23 16:22:43 2023 +0530 selftests/mm: run hugetlb testcases of va switch The va_high_addr_switch selftest is used to test mmap across 128TB boundary. It divides the selftest cases into two main categories on the basis of size. One set is used to create mappings that are multiples of PAGE_SIZE while the other creates mappings that are multiples of HUGETLB_SIZE. In order to run the hugetlb testcases the binary must be appended with "--run-hugetlb" but the file that used to run the test only invokes the binary, thereby completely skipping the hugetlb testcases. Hence, the required statement has been added. Link: https://lkml.kernel.org/r/20230323105243.2807166-6-chaitanyas.prakash@arm.com Signed-off-by: Chaitanya S Prakash Cc: Aneesh Kumar K.V Cc: Kirill A. Shutemov Cc: Shuah Khan Cc: Mark Rutland Signed-off-by: Andrew Morton commit 2f489e2e69463729eefc77da22c163ae63b48b74 Author: Chaitanya S Prakash Date: Thu Mar 23 16:22:42 2023 +0530 selftests/mm: configure nr_hugepages for arm64 Arm64 has a default hugepage size of 512MB when CONFIG_ARM64_64K_PAGES=y is enabled. While testing on arm64 platforms having up to 4PB of virtual address space, a minimum of 6 hugepages were required for all test cases to pass. Support for this requirement has been added. Link: https://lkml.kernel.org/r/20230323105243.2807166-5-chaitanyas.prakash@arm.com Signed-off-by: Chaitanya S Prakash Cc: Aneesh Kumar K.V Cc: Kirill A. Shutemov Cc: Shuah Khan Cc: Mark Rutland Signed-off-by: Andrew Morton commit c2af2a41905efcf662b53f280f8538e5c6bd05f4 Author: Chaitanya S Prakash Date: Thu Mar 23 16:22:41 2023 +0530 selftests/mm: add platform independent in code comments The in code comments for the selftest were made on the basis of 128TB switch, an architecture feature specific to PowerPc and x86 platforms. Keeping in mind the support added for arm64 platforms which implements a 256TB switch, a more generic explanation has been provided. Link: https://lkml.kernel.org/r/20230323105243.2807166-4-chaitanyas.prakash@arm.com Signed-off-by: Chaitanya S Prakash Cc: Aneesh Kumar K.V Cc: Kirill A. Shutemov Cc: Shuah Khan Cc: Mark Rutland Signed-off-by: Andrew Morton commit bbe168729d4ef8305f4e35c3bbe4711389ab8354 Author: Chaitanya S Prakash Date: Thu Mar 23 16:22:40 2023 +0530 selftests/mm: rename va_128TBswitch to va_high_addr_switch As the initial selftest only took into consideration PowperPC and x86 architectures, on adding support for arm64, a platform independent naming convention is chosen. Link: https://lkml.kernel.org/r/20230323105243.2807166-3-chaitanyas.prakash@arm.com Signed-off-by: Chaitanya S Prakash Cc: Aneesh Kumar K.V Cc: Kirill A. Shutemov Cc: Shuah Khan Cc: Mark Rutland Signed-off-by: Andrew Morton commit cd834afa8ee3751644534be20d63cff445641f0f Author: Chaitanya S Prakash Date: Thu Mar 23 16:22:39 2023 +0530 selftests/mm: add support for arm64 platform on va switch Patch series "selftests/mm: Implement support for arm64 on va". The va_128TBswitch selftest is designed and implemented for PowerPC and x86 architectures which support a 128TB switch, up to 256TB of virtual address space and hugepage sizes of 16MB and 2MB respectively. Arm64 platforms on the other hand support a 256Tb switch, up to 4PB of virtual address space and a default hugepage size of 512MB when 64k pagesize is enabled. These architectural differences require introducing support for arm64 platforms, after which a more generic naming convention is suggested. The in code comments are amended to provide a more platform independent explanation of the working of the code and nr_hugepages are configured as required. Finally, the file running the testcase is modified in order to prevent skipping of hugetlb testcases of va_high_addr_switch. This patch (of 5): Arm64 platforms have the ability to support 64kb pagesize, 512MB default hugepage size and up to 4PB of virtual address space. The address switch occurs at 256TB as opposed to 128TB. Hence, the necessary support has been added. Link: https://lkml.kernel.org/r/20230323105243.2807166-1-chaitanyas.prakash@arm.com Link: https://lkml.kernel.org/r/20230323105243.2807166-2-chaitanyas.prakash@arm.com Signed-off-by: Chaitanya S Prakash Cc: Aneesh Kumar K.V Cc: Kirill A. Shutemov Cc: Shuah Khan Cc: Mark Rutland Signed-off-by: Andrew Morton commit e5ace96f2cba612825b82421eb6068fc94fb9da5 Author: Krzysztof Kozlowski Date: Fri Apr 14 12:42:30 2023 +0200 dt-bindings: display: simplify compatibles syntax Lists (items) with one item should be just const or enum because it is shorter and simpler. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230414104230.23165-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 112d5560a0678f5cea0f242ac576eefafed2a9e7 Author: Krzysztof Kozlowski Date: Fri Apr 14 10:33:11 2023 +0200 dt-bindings: display: mediatek: simplify compatibles syntax Lists (items) with one item should be just enum because it is shorter, simpler and does not confuse, if one wants to add new entry with a fallback. Convert all of them to enums. OTOH, leave unused "oneOf" entries in anticipation of further growth of the entire binding. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20230414083311.12197-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit a31a6c2465a368e2c40b8d768aa682b92743f33e Author: Fabio Estevam Date: Wed Apr 12 14:58:00 2023 -0300 dt-bindings: drm/bridge: ti-sn65dsi86: Fix the video-interfaces.yaml references video-interface.txt does not exist anymore, as it has been converted to video-interfaces.yaml. Instead of referencing video-interfaces.yaml multiple times, pass it as a $ref to the schema. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20230412175800.2537812-1-festevam@gmail.com Signed-off-by: Rob Herring commit 975b1e501887c287e82bbbed523de8c87197fddc Author: Rob Herring Date: Mon Mar 27 12:01:45 2023 -0500 dt-bindings: timer: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Reviewed-by: Linus Walleij Reviewed-by: Thierry Reding Link: https://lore.kernel.org/r/20230327170146.4104556-1-robh@kernel.org Signed-off-by: Rob Herring commit 6416a6ec1acbccd4191c62a57a85ef55056e69ca Author: Krzysztof Kozlowski Date: Sun Apr 16 12:28:31 2023 +0200 dt-bindings: interrupt-controller: qcom,pdc: document qcom,qdu1000-pdc Add QDU1000 PDC, already used in upstreamed DTS. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230416102831.105136-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit a04bb4c24a4846232a81047784d5eff2848e45bd Author: Dmitry Rokosov Date: Tue Apr 4 22:17:15 2023 +0300 checkpatch: introduce proper bindings license check All headers from 'include/dt-bindings/' must be verified by checkpatch together with Documentation bindings, because all of them are part of the whole DT bindings system. The requirement is dual licensed and matching patterns: * Schemas: /GPL-2\.0(?:-only)? OR BSD-2-Clause/ * Headers: /GPL-2\.0(?:-only)? OR \S+/ Above patterns suggested by Rob at: https://lore.kernel.org/all/CAL_Jsq+-YJsBO+LuPJ=ZQ=eb-monrwzuCppvReH+af7hYZzNaQ@mail.gmail.com The issue was found during patch review: https://lore.kernel.org/all/20230313201259.19998-4-ddrokosov@sberdevices.ru/ Link: https://lkml.kernel.org/r/20230404191715.7319-1-ddrokosov@sberdevices.ru Signed-off-by: Dmitry Rokosov Reviewed-by: Rob Herring Cc: Andy Whitcroft Cc: Dwaipayan Ray Cc: Joe Perches Cc: Krzysztof Kozlowski Cc: Lukas Bulwahn Signed-off-by: Andrew Morton commit d4cb626d6f3e86121e08ce1492836f37f91858dd Author: Davidlohr Bueso Date: Tue Apr 11 16:41:59 2023 -0700 epoll: rename global epmutex As of 4f04cbaf128 ("epoll: use refcount to reduce ep_mutex contention"), this lock is now specific to nesting cases - inserting an epoll fd onto another epoll fd. Rename the lock to be less generic. Link: https://lkml.kernel.org/r/20230411234159.20421-1-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Paolo Abeni Cc: Eric Dumazet Signed-off-by: Andrew Morton commit 5a10562bdeb58006de4b1cd5f671b7da26b20bb3 Author: Glenn Washburn Date: Tue Feb 28 18:53:35 2023 -0600 scripts/gdb: add GDB convenience functions $lx_dentry_name() and $lx_i_dentry() $lx_dentry_name() generates a full VFS path from a given dentry pointer, and $lx_i_dentry() returns the dentry pointer associated with the given inode pointer, if there is one. Link: https://lkml.kernel.org/r/c9a5ad8efbfbd2cc6559e082734eed7628f43a16.1677631565.git.development@efficientek.com Signed-off-by: Glenn Washburn Cc: Alexander Viro Cc: Antonio Borneo Cc: Jan Kiszka Cc: John Ogness Cc: Kieran Bingham Cc: Petr Mladek Signed-off-by: Andrew Morton commit f4efbdaf59e959507a1a931ec4afecdfb09db76e Author: Glenn Washburn Date: Tue Feb 28 18:53:34 2023 -0600 scripts/gdb: create linux/vfs.py for VFS related GDB helpers Patch series "GDB VFS utils". I've created a couple GDB convenience functions that I found useful when debugging some VFS issues and figure others might find them useful. For instance, they are useful in setting conditional breakpoints on VFS functions where you only care if the dentry path is a certain value. I took the opportunity to create a new "vfs" python module to give VFS related utilities a home. This patch (of 2): This will allow for more VFS specific GDB helpers to be collected in one place. Move utils.dentry_name into the vfs modules. Also a local variable in proc.py was changed from vfs to mnt to prevent a naming collision with the new vfs module. [akpm@linux-foundation.org: add SPDX-License-Identifier] Link: https://lkml.kernel.org/r/cover.1677631565.git.development@efficientek.com Link: https://lkml.kernel.org/r/7bba4c065a8c2c47f1fc5b03a7278005b04db251.1677631565.git.development@efficientek.com Signed-off-by: Glenn Washburn Cc: Alexander Viro Cc: Antonio Borneo Cc: Jan Kiszka Cc: John Ogness Cc: Kieran Bingham Cc: Petr Mladek Signed-off-by: Andrew Morton commit 31088f6f7906253ef4577f6a9b84e2d42447dba0 Author: Kevin Brodsky Date: Tue Apr 11 10:27:47 2023 +0100 uapi/linux/const.h: prefer ISO-friendly __typeof__ typeof is (still) a GNU extension, which means that it cannot be used when building ISO C (e.g. -std=c99). It should therefore be avoided in uapi headers in favour of the ISO-friendly __typeof__. Unfortunately this issue could not be detected by CONFIG_UAPI_HEADER_TEST=y as the __ALIGN_KERNEL() macro is not expanded in any uapi header. This matters from a userspace perspective, not a kernel one. uapi headers and their contents are expected to be usable in a variety of situations, and in particular when building ISO C applications (with -std=c99 or similar). This particular problem can be reproduced by trying to use the __ALIGN_KERNEL macro directly in application code, say: #include int align(int x, int a) { return __KERNEL_ALIGN(x, a); } and trying to build that with -std=c99. Link: https://lkml.kernel.org/r/20230411092747.3759032-1-kevin.brodsky@arm.com Fixes: a79ff731a1b2 ("netfilter: xtables: make XT_ALIGN() usable in exported headers by exporting __ALIGN_KERNEL()") Signed-off-by: Kevin Brodsky Reported-by: Ruben Ayrapetyan Tested-by: Ruben Ayrapetyan Reviewed-by: Petr Vorel Tested-by: Petr Vorel Reviewed-by: Masahiro Yamada Cc: Sam Ravnborg Signed-off-by: Andrew Morton commit a3b2aeac9d154e5e15ddbf19de934c0c606b6acd Author: Yang Yang Date: Sat Apr 8 17:28:35 2023 +0800 delayacct: track delays from IRQ/SOFTIRQ Delay accounting does not track the delay of IRQ/SOFTIRQ. While IRQ/SOFTIRQ could have obvious impact on some workloads productivity, such as when workloads are running on system which is busy handling network IRQ/SOFTIRQ. Get the delay of IRQ/SOFTIRQ could help users to reduce such delay. Such as setting interrupt affinity or task affinity, using kernel thread for NAPI etc. This is inspired by "sched/psi: Add PSI_IRQ to track IRQ/SOFTIRQ pressure"[1]. Also fix some code indent problems of older code. And update tools/accounting/getdelays.c: / # ./getdelays -p 156 -di print delayacct stats ON printing IO accounting PID 156 CPU count real total virtual total delay total delay average 15 15836008 16218149 275700790 18.380ms IO count delay total delay average 0 0 0.000ms SWAP count delay total delay average 0 0 0.000ms RECLAIM count delay total delay average 0 0 0.000ms THRASHING count delay total delay average 0 0 0.000ms COMPACT count delay total delay average 0 0 0.000ms WPCOPY count delay total delay average 36 7586118 0.211ms IRQ count delay total delay average 42 929161 0.022ms [1] commit 52b1364ba0b1("sched/psi: Add PSI_IRQ to track IRQ/SOFTIRQ pressure") Link: https://lkml.kernel.org/r/202304081728353557233@zte.com.cn Signed-off-by: Yang Yang Cc: Jiang Xuexin Cc: wangyong Cc: junhua huang Cc: Balbir Singh Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Juri Lelli Cc: Peter Zijlstra Signed-off-by: Andrew Morton commit 29692fc92c5b6a2c7cfe6f588ef68272e3343647 Author: Amjad Ouled-Ameur Date: Thu Apr 6 15:12:17 2023 -0700 scripts/gdb: timerlist: convert int chunks to str join() expects strings but integers are given. Convert chunks list to strings before passing it to join() Link: https://lkml.kernel.org/r/20230406221217.1585486-4-f.fainelli@gmail.com Signed-off-by: Amjad Ouled-Ameur Signed-by: Florian Fainelli Tested-by: Florian Fainelli Cc: Jan Kiszka Signed-off-by: Andrew Morton commit b0969d7687a7aaa82dcf2d1f245ef699387886da Author: Florian Fainelli Date: Thu Apr 6 15:04:51 2023 -0700 scripts/gdb: print interrupts This GDB script prints the interrupts in the system in the same way that /proc/interrupts does. This does include the architecture specific part done by arch_show_interrupts() for x86, ARM, ARM64 and MIPS. Example output from an ARM64 system: (gdb) lx-interruptlist CPU0 CPU1 CPU2 CPU3 10: 3167 1225 1276 2629 GICv2 30 Level arch_timer 13: 0 0 0 0 GICv2 36 Level arm-pmu 14: 0 0 0 0 GICv2 37 Level arm-pmu 15: 0 0 0 0 GICv2 38 Level arm-pmu 16: 0 0 0 0 GICv2 39 Level arm-pmu 28: 0 0 0 0 interrupt-controller@8410640 5 Edge brcmstb-gpio-wake 30: 125 0 0 0 GICv2 128 Level ttyS0 31: 0 0 0 0 interrupt-controller@8416000 0 Level mspi_done 32: 0 0 0 0 interrupt-controller@8410640 3 Edge brcmstb-waketimer 33: 0 0 0 0 interrupt-controller@8418580 8 Edge brcmstb-waketimer-rtc 34: 872 0 0 0 GICv2 230 Level brcm_scmi@0 35: 0 0 0 0 interrupt-controller@8410640 10 Edge 8d0f200.usb-phy 37: 0 0 0 0 GICv2 97 Level PCIe PME 42: 0 0 0 0 GICv2 145 Level xhci-hcd:usb1 43: 94 0 0 0 GICv2 71 Level mmc1 44: 0 0 0 0 GICv2 70 Level mmc0 IPI0: 23 666 154 98 Rescheduling interrupts IPI1: 247 1053 1701 634 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: 7 9 5 0 IRQ work interrupts IPI6: 0 0 0 0 CPU wake-up interrupts ERR: 0 Link: https://lkml.kernel.org/r/20230406220451.1583239-1-f.fainelli@gmail.com Signed-off-by: Florian Fainelli Cc: Jan Kiszka Cc: Kieran Bingham Signed-off-by: Andrew Morton commit 8af055ae25bff48f57227f5e3d48a4306f3dd1c4 Author: Florian Fainelli Date: Thu Apr 6 14:52:51 2023 -0700 scripts/gdb: raise error with reduced debugging information If CONFIG_DEBUG_INFO_REDUCED is enabled in the kernel configuration, we will typically not be able to load vmlinux-gdb.py and will fail with: Traceback (most recent call last): File "/home/fainelli/work/buildroot/output/arm64/build/linux-custom/vmlinux-gdb.py", line 25, in import linux.utils File "/home/fainelli/work/buildroot/output/arm64/build/linux-custom/scripts/gdb/linux/utils.py", line 131, in atomic_long_counter_offset = atomic_long_type.get_type()['counter'].bitpos KeyError: 'counter' Rather be left wondering what is happening only to find out that reduced debug information is the cause, raise an eror. This was not typically a problem until e3c8d33e0d62 ("scripts/gdb: fix 'lx-dmesg' on 32 bits arch") but it has since then. Link: https://lkml.kernel.org/r/20230406215252.1580538-1-f.fainelli@gmail.com Fixes: e3c8d33e0d62 ("scripts/gdb: fix 'lx-dmesg' on 32 bits arch") Signed-off-by: Florian Fainelli Cc: Antonio Borneo Cc: Jan Kiszka Cc: John Ogness Cc: Kieran Bingham Cc: Petr Mladek Signed-off-by: Andrew Morton commit b7235d6bb516fed6d62d2c9e30e7123b6ce5124c Author: Kieran Bingham Date: Tue Apr 4 14:40:49 2023 -0700 scripts/gdb: add a Radix Tree Parser Linux makes use of the Radix Tree data structure to store pointers indexed by integer values. This structure is utilised across many structures in the kernel including the IRQ descriptor tables, and several filesystems. This module provides a method to lookup values from a structure given its head node. Usage: The function lx_radix_tree_lookup, must be given a symbol of type struct radix_tree_root, and an index into that tree. The object returned is a generic integer value, and must be cast correctly to the type based on the storage in the data structure. For example, to print the irq descriptor in the sparse irq_desc_tree at index 18, try the following: (gdb) print (struct irq_desc)$lx_radix_tree_lookup(irq_desc_tree, 18) This script previously existed under commit e127a73d41ac471d7e3ba950cf128f42d6ee3448 ("scripts/gdb: add a Radix Tree Parser") and was later reverted with b447e02548a3304c47b78b5e2d75a4312a8f17e1i (Revert "scripts/gdb: add a Radix Tree Parser"). This version expects the XArray based radix tree implementation and has been verified using QEMU/x86 on Linux 6.3-rc5. [f.fainelli@gmail.com: revive and update for xarray implementation] [f.fainelli@gmail.com: guard against a NULL node in the while loop] Link: https://lkml.kernel.org/r/20230405222743.1191674-1-f.fainelli@gmail.com Link: https://lkml.kernel.org/r/20230404214049.1016811-1-f.fainelli@gmail.com Signed-off-by: Kieran Bingham Signed-off-by: Florian Fainelli Cc: Jan Kiszka Cc: Kieran Bingham Signed-off-by: Andrew Morton commit b0687c1119b4e8c88a651b6e876b7eae28d076e3 Author: Noah Goldstein Date: Tue Apr 4 17:13:51 2023 -0500 lib/rbtree: use '+' instead of '|' for setting color. This has a slight benefit for x86 and has no effect on other targets. The benefit to x86 is it change the codegen for setting a node to block from `mov %r0, %r1; or $RB_BLACK, %r1` to `lea RB_BLACK(%r0), %r1` which saves an instructions. In all other cases it just replace ALU with ALU (or -> and) which perform the same on all machines I am aware of. Total instructions in rbtree.o: Before - 802 After - 782 so it saves about 20 `mov` instructions. Link: https://lkml.kernel.org/r/20230404221350.3806566-1-goldstein.w.n@gmail.com Signed-off-by: Noah Goldstein Cc: Michel Lespinasse Signed-off-by: Andrew Morton commit 1be2edb25c72c3fe1bf955694c5521b035fcb276 Author: Heiko Carstens Date: Wed Apr 5 16:34:52 2023 +0200 proc/stat: remove arch_idle_time() The last (only) architecture specific arch_idle_time() implementation was removed with commit be76ea614460 ("s390/idle: remove arch_cpu_idle_time() and corresponding code"). Therefore remove the now dead code in fs/proc/stat.c as well. Link: https://lkml.kernel.org/r/20230405143452.2677172-1-hca@linux.ibm.com Signed-off-by: Heiko Carstens Cc: Alexey Dobriyan Signed-off-by: Andrew Morton commit d6ccdd678e459fdcfe675a45c76b3f1a75b9a8e8 Author: Matthieu Baerts Date: Mon Apr 3 18:23:50 2023 +0200 checkpatch: check for misuse of the link tags "Link:" and "Closes:" tags have to be used with public URLs. It is difficult to make sure the link is public but at least we can verify the tag is followed by 'http(s)://'. With that, we avoid such a tag that is not allowed [1]: Closes: Now that we check the "link" tags are followed by a URL, we can relax the check linked to "Reported-by being followed by a link tag" to only verify if a "link" tag is present after the "Reported-by" one. Link: https://lore.kernel.org/linux-doc/CAHk-=wh0v1EeDV3v8TzK81nDC40=XuTdY2MCr0xy3m3FiBV3+Q@mail.gmail.com/ [1] Link: https://lkml.kernel.org/r/20230314-doc-checkpatch-closes-tag-v4-5-d26d1fa66f9f@tessares.net Signed-off-by: Matthieu Baerts Acked-by: Joe Perches Cc: Andy Whitcroft Cc: Bagas Sanjaya Cc: Daniel Vetter Cc: David Airlie Cc: Dwaipayan Ray Cc: Jonathan Corbet Cc: Kai Wasserbäch Cc: Konstantin Ryabitsev Cc: Linus Torvalds Cc: Lukas Bulwahn Cc: Thorsten Leemhuis Signed-off-by: Andrew Morton commit 44c31888098a590b8ec5ba37009e5a983f7c4b46 Author: Matthieu Baerts Date: Mon Apr 3 18:23:49 2023 +0200 checkpatch: allow Closes tags with links As a follow-up of a previous patch modifying the documentation to allow using the "Closes:" tag, checkpatch.pl is updated accordingly. checkpatch.pl now no longer complain when the "Closes:" tag is used by itself: commit 76f381bb77a0 ("checkpatch: warn when unknown tags are used for links") ... or after the "Reported-by:" tag: commit d7f1d71e5ef6 ("checkpatch: warn when Reported-by: is not followed by Link:") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/373 Link: https://lkml.kernel.org/r/20230314-doc-checkpatch-closes-tag-v4-4-d26d1fa66f9f@tessares.net Signed-off-by: Matthieu Baerts Acked-by: Joe Perches Cc: Andy Whitcroft Cc: Bagas Sanjaya Cc: Daniel Vetter Cc: David Airlie Cc: Dwaipayan Ray Cc: Jonathan Corbet Cc: Kai Wasserbäch Cc: Konstantin Ryabitsev Cc: Linus Torvalds Cc: Lukas Bulwahn Cc: Thorsten Leemhuis Signed-off-by: Andrew Morton commit f94e40ea272b9847833de1114677eb5ad8b12a0a Author: Matthieu Baerts Date: Mon Apr 3 18:23:48 2023 +0200 checkpatch: use a list of "link" tags The following commit will allow the use of a similar "link" tag. Because there is a possibility that other similar tags will be added in the future and to reduce the number of places where the code will be modified to allow this new tag, a list with all these "link" tags is now used. Two variables are created from it: one to search for such tags and one to print all tags in a warning message. Link: https://lkml.kernel.org/r/20230314-doc-checkpatch-closes-tag-v4-3-d26d1fa66f9f@tessares.net Signed-off-by: Matthieu Baerts Suggested-by: Joe Perches Acked-by: Joe Perches Cc: Andy Whitcroft Cc: Bagas Sanjaya Cc: Daniel Vetter Cc: David Airlie Cc: Dwaipayan Ray Cc: Jonathan Corbet Cc: Kai Wasserbäch Cc: Konstantin Ryabitsev Cc: Linus Torvalds Cc: Lukas Bulwahn Cc: Thorsten Leemhuis Signed-off-by: Andrew Morton commit c917a872cee480d1fc8461da9be93e27e7977877 Author: Matthieu Baerts Date: Mon Apr 3 18:23:47 2023 +0200 checkpatch: don't print the next line if not defined When checking if "Reported-by" tag is followed by "Link:", there is no need to print the next line if there is no next line. While at it, also mention in this case that the "Link:" tag should be followed by a URL, similar to the next warning. By doing that, the code is now similar to what is done above when checking if the Co-developed-by tag is properly used. Link: https://lkml.kernel.org/r/20230314-doc-checkpatch-closes-tag-v4-2-d26d1fa66f9f@tessares.net Fixes: d7f1d71e5ef6 ("checkpatch: warn when Reported-by: is not followed by Link:") Signed-off-by: Matthieu Baerts Acked-by: Joe Perches Cc: Andy Whitcroft Cc: Bagas Sanjaya Cc: Daniel Vetter Cc: David Airlie Cc: Dwaipayan Ray Cc: Jonathan Corbet Cc: Kai Wasserbäch Cc: Konstantin Ryabitsev Cc: Linus Torvalds Cc: Lukas Bulwahn Cc: Thorsten Leemhuis Signed-off-by: Andrew Morton commit 0d828200ad56505a827610af876ca0b138b943a6 Author: Matthieu Baerts Date: Mon Apr 3 18:23:46 2023 +0200 docs: process: allow Closes tags with links Since v6.3, checkpatch.pl now complains about the use of "Closes:" tags followed by a link [1]. It also complains if a "Reported-by:" tag is followed by a "Closes:" one [2]. As detailed in the first patch, this "Closes:" tag is used for a bit of time, mainly by DRM and MPTCP subsystems. It is used by some bug trackers to automate the closure of issues when a patch is accepted. It is even planned to use this tag with bugzilla.kernel.org [3]. The first patch updates the documentation to explain what is this "Closes:" tag and how/when to use it. The second patch modifies checkpatch.pl to stop complaining about it. The DRM maintainers and their mailing list have been added in Cc as they are probably interested by these two patches as well. [1] https://lore.kernel.org/all/3b036087d80b8c0e07a46a1dbaaf4ad0d018f8d5.1674217480.git.linux@leemhuis.info/ [2] https://lore.kernel.org/all/bb5dfd55ea2026303ab2296f4a6df3da7dd64006.1674217480.git.linux@leemhuis.info/ [3] https://lore.kernel.org/linux-doc/20230315181205.f3av7h6owqzzw64p@meerkat.local/ This patch (of 5): Making sure a bug tracker is up to date is not an easy task. For example, a first version of a patch fixing a tracked issue can be sent a long time after having created the issue. But also, it can take some time to have this patch accepted upstream in its final form. When it is done, someone -- probably not the person who accepted the patch -- has to remember about closing the corresponding issue. This task of closing and tracking the patch can be done automatically by bug trackers like GitLab [1], GitHub [2] and hopefully soon [3] bugzilla.kernel.org when the appropriated tag is used. The two first ones accept multiple tags but it is probably better to pick one. According to commit 76f381bb77a0 ("checkpatch: warn when unknown tags are used for links"), the "Closes" tag seems to have been used in the past by a few people and it is supported by popular bug trackers. Here is how it has been used in the past: $ git log --no-merges --format=email -P --grep='^Closes: http' | \ grep '^Closes: http' | cut -d/ -f3-5 | sort | uniq -c | sort -rn 391 gitlab.freedesktop.org/drm/intel 79 github.com/multipath-tcp/mptcp_net-next 8 gitlab.freedesktop.org/drm/msm 3 gitlab.freedesktop.org/drm/amd 2 gitlab.freedesktop.org/mesa/mesa 1 patchwork.freedesktop.org/series/73320 1 gitlab.freedesktop.org/lima/linux 1 gitlab.freedesktop.org/drm/nouveau 1 github.com/ClangBuiltLinux/linux 1 bugzilla.netfilter.org/show_bug.cgi?id=1579 1 bugzilla.netfilter.org/show_bug.cgi?id=1543 1 bugzilla.netfilter.org/show_bug.cgi?id=1436 1 bugzilla.netfilter.org/show_bug.cgi?id=1427 1 bugs.debian.org/625804 Likely here, the "Closes" tag was only properly used with GitLab and GitHub. We can also see that it has been used quite a few times (and still used recently) and this is then not a "random tag that makes no sense" like it was the case with "BugLink" recently [4]. It has also been misused but that was a long time ago, when it was common to use many different random tags. checkpatch.pl script should then stop complaining about this "Closes" tag. As suggested by Thorsten [5], if this tag is accepted, it should first be described in the documentation. This is what is done here in this patch. To avoid confusion, the "Closes" should be used with any public bug report. No need to check if the underlying bug tracker supports automations. Having this tag with any kind of public bug reports allows bots like regzbot to clearly identify patches fixing a specific bug and avoid false-positives, e.g. patches mentioning it is related to an issue but not fixing it. As suggested by Thorsten [6] again, if we follow the same logic, the "Closes" tag should then be used after a "Reported-by" one. Note that thanks to this "Closes" tag, the mentioned bug trackers can also locate where a patch has been applied in different branches and repositories. If only the "Link" tag is used, the tracking can also be done but the ticket will not be closed and a manual operation will be needed. Also, these bug trackers have some safeguards: the closure is only done if a commit having the "Closes:" tag is applied in a specific branch. It will then not be closed if a random commit having the same tag is published elsewhere. Also in case of closure, a notification is sent to the owners. Link: https://lkml.kernel.org/r/20230314-doc-checkpatch-closes-tag-v4-0-d26d1fa66f9f@tessares.net Link: https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#default-closing-pattern [1] Link: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests [2] Link: https://lore.kernel.org/linux-doc/20230315181205.f3av7h6owqzzw64p@meerkat.local/ [3] Link: https://lore.kernel.org/all/CAHk-=wgs38ZrfPvy=nOwVkVzjpM3VFU1zobP37Fwd_h9iAD5JQ@mail.gmail.com/ [4] Link: https://lore.kernel.org/all/688cd6cb-90ab-6834-a6f5-97080e39ca8e@leemhuis.info/ [5] Link: https://lore.kernel.org/linux-doc/2194d19d-f195-1a1e-41fc-7827ae569351@leemhuis.info/ [6] Link: https://github.com/multipath-tcp/mptcp_net-next/issues/373 Link: https://lkml.kernel.org/r/20230314-doc-checkpatch-closes-tag-v4-1-d26d1fa66f9f@tessares.net Signed-off-by: Matthieu Baerts Suggested-by: Thorsten Leemhuis Acked-by: Konstantin Ryabitsev Acked-by: Joe Perches Cc: Andy Whitcroft Cc: Bagas Sanjaya Cc: Daniel Vetter Cc: David Airlie Cc: Dwaipayan Ray Cc: Jonathan Corbet Cc: Kai Wasserbäch Cc: Linus Torvalds Cc: Lukas Bulwahn Signed-off-by: Andrew Morton commit 8fc2a304f57cb304231a4b0564d5995b2dd04f63 Author: Peng Liu Date: Tue Mar 21 14:20:04 2023 +0800 scripts/gdb: fix lx-timerlist for HRTIMER_MAX_CLOCK_BASES printing HRTIMER_MAX_CLOCK_BASES is of enum type hrtimer_base_type. To print it as an integer, HRTIMER_MAX_CLOCK_BASES should be converted first. Link: https://lkml.kernel.org/r/TYCP286MB214640FF0E7F04AC3926A39EC6819@TYCP286MB2146.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Peng Liu Reviewed-by: Jan Kiszka Cc: Florian Fainelli Cc: Kieran Bingham Signed-off-by: Andrew Morton commit 7362042f3556528e9e9b1eb5ce8d7a3a6331476b Author: Peng Liu Date: Tue Mar 21 14:19:29 2023 +0800 scripts/gdb: fix lx-timerlist for Python3 Below incompatibilities between Python2 and Python3 made lx-timerlist fail to run under Python3. o xrange() is replaced by range() in Python3 o bytes and str are different types in Python3 o the return value of Inferior.read_memory() is memoryview object in Python3 akpm: cc stable so that older kernels are properly debuggable under newer Python. Link: https://lkml.kernel.org/r/TYCP286MB2146EE1180A4D5176CBA8AB2C6819@TYCP286MB2146.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Peng Liu Reviewed-by: Jan Kiszka Cc: Florian Fainelli Cc: Kieran Bingham Cc: Signed-off-by: Andrew Morton commit 747cd84f677cedb27db10d4ada777d7ec20431ee Author: Peng Liu Date: Tue Mar 21 14:18:43 2023 +0800 scripts/gdb: fix lx-timerlist for struct timequeue_head change commit 511885d7061e ("lib/timerqueue: Rely on rbtree semantics for next timer") changed struct timerqueue_head, and so print_active_timers() should be changed accordingly with its way to interpret the structure. Link: https://lkml.kernel.org/r/TYCP286MB21463BD277330B26DDC18903C6819@TYCP286MB2146.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Peng Liu Reviewed-by: Jan Kiszka Cc: Kieran Bingham Cc: Florian Fainelli Signed-off-by: Andrew Morton commit f7b8f70ba44fb63df47b6fc3204d49ac2885de64 Author: Luca Vizzarro Date: Fri Apr 14 16:24:58 2023 +0100 memfd: pass argument of memfd_fcntl as int The interface for fcntl expects the argument passed for the command F_ADD_SEALS to be of type int. The current code wrongly treats it as a long. In order to avoid access to undefined bits, we should explicitly cast the argument to int. This commit changes the signature of all the related and helper functions so that they treat the argument as int instead of long. Link: https://lkml.kernel.org/r/20230414152459.816046-5-Luca.Vizzarro@arm.com Signed-off-by: Luca Vizzarro Cc: Alexander Viro Cc: Christian Brauner Cc: Jeff Layton Cc: Chuck Lever Cc: Kevin Brodsky Cc: Vincenzo Frascino Cc: Szabolcs Nagy Cc: "Theodore Ts'o" Cc: David Laight Cc: Mark Rutland Signed-off-by: Andrew Morton commit 7f63cf2d9b9bbe7b90f808927558a66ff737d399 Author: Kalesh Singh Date: Thu Apr 13 14:43:26 2023 -0700 mm: Multi-gen LRU: remove wait_event_killable() Android 14 and later default to MGLRU [1] and field telemetry showed occasional long tail latency (>100ms) in the reclaim path. Tracing revealed priority inversion in the reclaim path. In try_to_inc_max_seq(), when high priority tasks were blocked on wait_event_killable(), the preemption of the low priority task to call wake_up_all() caused those high priority tasks to wait longer than necessary. In general, this problem is not different from others of its kind, e.g., one caused by mutex_lock(). However, it is specific to MGLRU because it introduced the new wait queue lruvec->mm_state.wait. The purpose of this new wait queue is to avoid the thundering herd problem. If many direct reclaimers rush into try_to_inc_max_seq(), only one can succeed, i.e., the one to wake up the rest, and the rest who failed might cause premature OOM kills if they do not wait. So far there is no evidence supporting this scenario, based on how often the wait has been hit. And this begs the question how useful the wait queue is in practice. Based on Minchan's recommendation, which is in line with his commit 6d4675e60135 ("mm: don't be stuck to rmap lock on reclaim path") and the rest of the MGLRU code which also uses trylock when possible, remove the wait queue. [1] https://android-review.googlesource.com/q/I7ed7fbfd6ef9ce10053347528125dd98c39e50bf Link: https://lkml.kernel.org/r/20230413214326.2147568-1-kaleshsingh@google.com Fixes: bd74fdaea146 ("mm: multi-gen LRU: support page table walks") Signed-off-by: Kalesh Singh Suggested-by: Minchan Kim Reported-by: Wei Wang Acked-by: Yu Zhao Cc: Minchan Kim Cc: Jan Alexander Steffens (heftig) Cc: Oleksandr Natalenko Cc: Suleiman Souhlal Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit ed8f3f999e9270ccc542ac44e237e389a2687a9e Author: Yang Yang Date: Thu Apr 13 16:34:49 2023 +0800 mm: workingset: update description of the source file The calculation of workingset size is the core logic of handling refault, it had been updated several times[1][2] after workingset.c was created[3]. But the description hadn't been updated accordingly, this mismatch may confuse the readers. So we update the description to make it consistent to the code. [1] commit 34e58cac6d8f ("mm: workingset: let cache workingset challenge anon") [2] commit aae466b0052e ("mm/swap: implement workingset detection for anonymous LRU") [3] commit a528910e12ec ("mm: thrash detection-based file cache sizing") Link: https://lkml.kernel.org/r/202304131634494948454@zte.com.cn Signed-off-by: Yang Yang Cc: Johannes Weiner Cc: Joonsoo Kim Signed-off-by: Andrew Morton commit 1f6ab566cb3be9e8292e34b89e8be83d75aa232e Author: Pavankumar Kondeti Date: Thu Apr 13 15:38:59 2023 +0530 printk: export console trace point for kcsan/kasan/kfence/kmsan The console tracepoint is used by kcsan/kasan/kfence/kmsan test modules. Since this tracepoint is not exported, these modules iterate over all available tracepoints to find the console trace point. Export the trace point so that it can be directly used. Link: https://lkml.kernel.org/r/20230413100859.1492323-1-quic_pkondeti@quicinc.com Signed-off-by: Pavankumar Kondeti Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: John Ogness Cc: Marco Elver Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit c7b23b68e2aa93f86a206222d23ccd9a21f5982a Author: Yosry Ahmed Date: Thu Apr 13 10:40:34 2023 +0000 mm: vmscan: refactor updating current->reclaim_state During reclaim, we keep track of pages reclaimed from other means than LRU-based reclaim through scan_control->reclaim_state->reclaimed_slab, which we stash a pointer to in current task_struct. However, we keep track of more than just reclaimed slab pages through this. We also use it for clean file pages dropped through pruned inodes, and xfs buffer pages freed. Rename reclaimed_slab to reclaimed, and add a helper function that wraps updating it through current, so that future changes to this logic are contained within include/linux/swap.h. Link: https://lkml.kernel.org/r/20230413104034.1086717-4-yosryahmed@google.com Signed-off-by: Yosry Ahmed Acked-by: Michal Hocko Cc: Alexander Viro Cc: Christoph Lameter Cc: Darrick J. Wong Cc: Dave Chinner Cc: David Hildenbrand Cc: David Rientjes Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Miaohe Lin Cc: NeilBrown Cc: Peter Xu Cc: Roman Gushchin Cc: Shakeel Butt Cc: Tim Chen Cc: Vlastimil Babka Cc: Yu Zhao Signed-off-by: Andrew Morton commit ef05e68936ff06e64919b3428ac92c4de002366c Author: Yosry Ahmed Date: Thu Apr 13 10:40:33 2023 +0000 mm: vmscan: move set_task_reclaim_state() near flush_reclaim_state() Move set_task_reclaim_state() near flush_reclaim_state() so that all helpers manipulating reclaim_state are in close proximity. Link: https://lkml.kernel.org/r/20230413104034.1086717-3-yosryahmed@google.com Signed-off-by: Yosry Ahmed Acked-by: Michal Hocko Cc: Alexander Viro Cc: Christoph Lameter Cc: Darrick J. Wong Cc: Dave Chinner Cc: David Hildenbrand Cc: David Rientjes Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Miaohe Lin Cc: NeilBrown Cc: Peter Xu Cc: Roman Gushchin Cc: Shakeel Butt Cc: Tim Chen Cc: Vlastimil Babka Cc: Yu Zhao Signed-off-by: Andrew Morton commit 583c27a167c2bc6088ec80be0d16ef44dd9fc6b0 Author: Yosry Ahmed Date: Thu Apr 13 10:40:32 2023 +0000 mm: vmscan: ignore non-LRU-based reclaim in memcg reclaim Patch series "Ignore non-LRU-based reclaim in memcg reclaim", v6. Upon running some proactive reclaim tests using memory.reclaim, we noticed some tests flaking where writing to memory.reclaim would be successful even though we did not reclaim the requested amount fully Looking further into it, I discovered that *sometimes* we overestimate the number of reclaimed pages in memcg reclaim. Reclaimed pages through other means than LRU-based reclaim are tracked through reclaim_state in struct scan_control, which is stashed in current task_struct. These pages are added to the number of reclaimed pages through LRUs. For memcg reclaim, these pages generally cannot be linked to the memcg under reclaim and can cause an overestimated count of reclaimed pages. This short series tries to address that. Patch 1 ignores pages reclaimed outside of LRU reclaim in memcg reclaim. The pages are uncharged anyway, so even if we end up under-reporting reclaimed pages we will still succeed in making progress during charging. Patches 2-3 are just refactoring. Patch 2 moves set_reclaim_state() helper next to flush_reclaim_state(). Patch 3 adds a helper that wraps updating current->reclaim_state, and renames reclaim_state->reclaimed_slab to reclaim_state->reclaimed. This patch (of 3): We keep track of different types of reclaimed pages through reclaim_state->reclaimed_slab, and we add them to the reported number of reclaimed pages. For non-memcg reclaim, this makes sense. For memcg reclaim, we have no clue if those pages are charged to the memcg under reclaim. Slab pages are shared by different memcgs, so a freed slab page may have only been partially charged to the memcg under reclaim. The same goes for clean file pages from pruned inodes (on highmem systems) or xfs buffer pages, there is no simple way to currently link them to the memcg under reclaim. Stop reporting those freed pages as reclaimed pages during memcg reclaim. This should make the return value of writing to memory.reclaim, and may help reduce unnecessary reclaim retries during memcg charging. Writing to memory.reclaim on the root memcg is considered as cgroup_reclaim(), but for this case we want to include any freed pages, so use the global_reclaim() check instead of !cgroup_reclaim(). Generally, this should make the return value of try_to_free_mem_cgroup_pages() more accurate. In some limited cases (e.g. freed a slab page that was mostly charged to the memcg under reclaim), the return value of try_to_free_mem_cgroup_pages() can be underestimated, but this should be fine. The freed pages will be uncharged anyway, and we can charge the memcg the next time around as we usually do memcg reclaim in a retry loop. Link: https://lkml.kernel.org/r/20230413104034.1086717-1-yosryahmed@google.com Link: https://lkml.kernel.org/r/20230413104034.1086717-2-yosryahmed@google.com Fixes: f2fe7b09a52b ("mm: memcg/slab: charge individual slab objects instead of pages") Signed-off-by: Yosry Ahmed Acked-by: David Hildenbrand Acked-by: Michal Hocko Cc: Alexander Viro Cc: Christoph Lameter Cc: Darrick J. Wong Cc: Dave Chinner Cc: David Rientjes Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Miaohe Lin Cc: NeilBrown Cc: Peter Xu Cc: Roman Gushchin Cc: Shakeel Butt Cc: Tim Chen Cc: Vlastimil Babka Cc: Yu Zhao Signed-off-by: Andrew Morton commit d905ae2b0f7eaf8fb37febfe4833ccf3f8c1c27a Author: Alexander Potapenko Date: Thu Apr 13 15:12:23 2023 +0200 mm: apply __must_check to vmap_pages_range_noflush() To prevent errors when vmap_pages_range_noflush() or __vmap_pages_range_noflush() silently fail (see the link below for an example), annotate them with __must_check so that the callers do not unconditionally assume the mapping succeeded. Link: https://lkml.kernel.org/r/20230413131223.4135168-4-glider@google.com Signed-off-by: Alexander Potapenko Reported-by: Dipanjan Das Link: https://lore.kernel.org/linux-mm/CANX2M5ZRrRA64k0hOif02TjmY9kbbO2aCBPyq79es34RXZ=cAw@mail.gmail.com/ Reviewed-by: Marco Elver Cc: Christoph Hellwig Cc: Dmitry Vyukov Cc: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton commit bb1508c24c9c361e6344308c8de2cb81d7f228ba Author: Alexander Potapenko Date: Thu Apr 13 15:12:22 2023 +0200 mm: kmsan: apply __must_check to non-void functions Non-void KMSAN hooks may return error codes that indicate that KMSAN failed to reflect the changed memory state in the metadata (e.g. it could not create the necessary memory mappings). In such cases the callers should handle the errors to prevent the tool from using the inconsistent metadata in the future. We mark non-void hooks with __must_check so that error handling is not skipped. Link: https://lkml.kernel.org/r/20230413131223.4135168-3-glider@google.com Signed-off-by: Alexander Potapenko Reviewed-by: Marco Elver Cc: Christoph Hellwig Cc: Dipanjan Das Cc: Dmitry Vyukov Cc: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton commit 1cb9dc4b475c7418f925ab0c97b6750007d9f52e Author: Liu Shixin Date: Thu Apr 13 21:13:49 2023 +0800 mm: hwpoison: support recovery from HugePage copy-on-write faults copy-on-write of hugetlb user pages with uncorrectable errors will result in a kernel crash. This is because the copy is performed in kernel mode and in general we can not handle accessing memory with such errors while in kernel mode. Commit a873dfe1032a ("mm, hwpoison: try to recover from copy-on write faults") introduced the routine copy_user_highpage_mc() to gracefully handle copying of user pages with uncorrectable errors. However, the separate hugetlb copy-on-write code paths were not modified as part of commit a873dfe1032a. Modify hugetlb copy-on-write code paths to use copy_mc_user_highpage() so that they can also gracefully handle uncorrectable errors in user pages. This involves changing the hugetlb specific routine copy_user_large_folio() from type void to int so that it can return an error. Modify the hugetlb userfaultfd code in the same way so that it can return -EHWPOISON if it encounters an uncorrectable error. Link: https://lkml.kernel.org/r/20230413131349.2524210-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Acked-by: Mike Kravetz Reviewed-by: Naoya Horiguchi Cc: Miaohe Lin Cc: Muchun Song Cc: Tony Luck Signed-off-by: Andrew Morton commit ec342603e6d7404c17936a6b53670c28355d3bc3 Author: Yosry Ahmed Date: Wed Apr 12 00:34:51 2023 +0000 memcg: page_cgroup_ino() get memcg from the page's folio In a kernel with added WARN_ON_ONCE(PageTail) in page_memcg_check(), we observed a warning from page_cgroup_ino() when reading /proc/kpagecgroup. This warning was added to catch fragile reads of a page memcg. Make page_cgroup_ino() get memcg from the page's folio using folio_memcg_check(): that gives it the correct memcg for each page of a folio, so is the right fix. Note that page_folio() is racy, the page's folio can change from under us, but the entire function is racy and documented as such. I dithered between the right fix and the safer "fix": it's unlikely but conceivable that some userspace has learnt that /proc/kpagecgroup gives no memcg on tail pages, and compensates for that in some (racy) way: so continuing to give no memcg on tails, without warning, might be safer. But hwpoison_filter_task(), the only other user of page_cgroup_ino(), persuaded me. It looks as if it currently leaves out tail pages of the selected memcg, by mistake: whereas hwpoison_inject() uses compound_head() and expects the tails to be included. So hwpoison testing coverage has probably been restricted by the wrong output from page_cgroup_ino() (if that memcg filter is used at all): in the short term, it might be safer not to enable wider coverage there, but long term we would regret that. This is based on a patch originally written by Hugh Dickins and retains most of the original commit log [1] The patch was changed to use folio_memcg_check(page_folio(page)) instead of page_memcg_check(compound_head(page)) based on discussions with Matthew Wilcox; where he stated that callers of page_memcg_check() should stop using it due to the ambiguity around tail pages -- instead they should use folio_memcg_check() and handle tail pages themselves. Link: https://lkml.kernel.org/r/20230412003451.4018887-1-yosryahmed@google.com Link: https://lore.kernel.org/linux-mm/20230313083452.1319968-1-yosryahmed@google.com/ [1] Signed-off-by: Yosry Ahmed Cc: Hugh Dickins Cc: Johannes Weiner Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Michal Hocko Cc: Muchun Song Cc: Naoya Horiguchi Cc: Roman Gushchin Cc: Shakeel Butt Cc: Vladimir Davydov Signed-off-by: Andrew Morton commit 0b376f1e0ff555435597fa16823ae0f30b2883e3 Author: Aneesh Kumar K.V Date: Wed Apr 12 10:30:25 2023 +0530 mm/hugetlb_vmemmap: rename ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP Now we use ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP config option to indicate devdax and hugetlb vmemmap optimization support. Hence rename that to a generic ARCH_WANT_OPTIMIZE_VMEMMAP Link: https://lkml.kernel.org/r/20230412050025.84346-2-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Reviewed-by: Muchun Song Cc: Joao Martins Cc: Dan Williams Cc: Mike Kravetz Cc: Tarun Sahu Signed-off-by: Andrew Morton commit 87a7ae75d7383afa998f57656d1d14e2a730cc47 Author: Aneesh Kumar K.V Date: Tue Apr 11 19:52:13 2023 +0530 mm/vmemmap/devdax: fix kernel crash when probing devdax devices commit 4917f55b4ef9 ("mm/sparse-vmemmap: improve memory savings for compound devmaps") added support for using optimized vmmemap for devdax devices. But how vmemmap mappings are created are architecture specific. For example, powerpc with hash translation doesn't have vmemmap mappings in init_mm page table instead they are bolted table entries in the hardware page table vmemmap_populate_compound_pages() used by vmemmap optimization code is not aware of these architecture-specific mapping. Hence allow architecture to opt for this feature. I selected architectures supporting HUGETLB_PAGE_OPTIMIZE_VMEMMAP option as also supporting this feature. This patch fixes the below crash on ppc64. BUG: Unable to handle kernel data access on write at 0xc00c000100400038 Faulting instruction address: 0xc000000001269d90 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Modules linked in: CPU: 7 PID: 1 Comm: swapper/0 Not tainted 6.3.0-rc5-150500.34-default+ #2 5c90a668b6bbd142599890245c2fb5de19d7d28a Hardware name: IBM,9009-42G POWER9 (raw) 0x4e0202 0xf000005 of:IBM,FW950.40 (VL950_099) hv:phyp pSeries NIP: c000000001269d90 LR: c0000000004c57d4 CTR: 0000000000000000 REGS: c000000003632c30 TRAP: 0300 Not tainted (6.3.0-rc5-150500.34-default+) MSR: 8000000000009033 CR: 24842228 XER: 00000000 CFAR: c0000000004c57d0 DAR: c00c000100400038 DSISR: 42000000 IRQMASK: 0 .... NIP [c000000001269d90] __init_single_page.isra.74+0x14/0x4c LR [c0000000004c57d4] __init_zone_device_page+0x44/0xd0 Call Trace: [c000000003632ed0] [c000000003632f60] 0xc000000003632f60 (unreliable) [c000000003632f10] [c0000000004c5ca0] memmap_init_zone_device+0x170/0x250 [c000000003632fe0] [c0000000005575f8] memremap_pages+0x2c8/0x7f0 [c0000000036330c0] [c000000000557b5c] devm_memremap_pages+0x3c/0xa0 [c000000003633100] [c000000000d458a8] dev_dax_probe+0x108/0x3e0 [c0000000036331a0] [c000000000d41430] dax_bus_probe+0xb0/0x140 [c0000000036331d0] [c000000000cef27c] really_probe+0x19c/0x520 [c000000003633260] [c000000000cef6b4] __driver_probe_device+0xb4/0x230 [c0000000036332e0] [c000000000cef888] driver_probe_device+0x58/0x120 [c000000003633320] [c000000000cefa6c] __device_attach_driver+0x11c/0x1e0 [c0000000036333a0] [c000000000cebc58] bus_for_each_drv+0xa8/0x130 [c000000003633400] [c000000000ceefcc] __device_attach+0x15c/0x250 [c0000000036334a0] [c000000000ced458] bus_probe_device+0x108/0x110 [c0000000036334f0] [c000000000ce92dc] device_add+0x7fc/0xa10 [c0000000036335b0] [c000000000d447c8] devm_create_dev_dax+0x1d8/0x530 [c000000003633640] [c000000000d46b60] __dax_pmem_probe+0x200/0x270 [c0000000036337b0] [c000000000d46bf0] dax_pmem_probe+0x20/0x70 [c0000000036337d0] [c000000000d2279c] nvdimm_bus_probe+0xac/0x2b0 [c000000003633860] [c000000000cef27c] really_probe+0x19c/0x520 [c0000000036338f0] [c000000000cef6b4] __driver_probe_device+0xb4/0x230 [c000000003633970] [c000000000cef888] driver_probe_device+0x58/0x120 [c0000000036339b0] [c000000000cefd08] __driver_attach+0x1d8/0x240 [c000000003633a30] [c000000000cebb04] bus_for_each_dev+0xb4/0x130 [c000000003633a90] [c000000000cee564] driver_attach+0x34/0x50 [c000000003633ab0] [c000000000ced878] bus_add_driver+0x218/0x300 [c000000003633b40] [c000000000cf1144] driver_register+0xa4/0x1b0 [c000000003633bb0] [c000000000d21a0c] __nd_driver_register+0x5c/0x100 [c000000003633c10] [c00000000206a2e8] dax_pmem_init+0x34/0x48 [c000000003633c30] [c0000000000132d0] do_one_initcall+0x60/0x320 [c000000003633d00] [c0000000020051b0] kernel_init_freeable+0x360/0x400 [c000000003633de0] [c000000000013764] kernel_init+0x34/0x1d0 [c000000003633e50] [c00000000000de14] ret_from_kernel_thread+0x5c/0x64 Link: https://lkml.kernel.org/r/20230411142214.64464-1-aneesh.kumar@linux.ibm.com Fixes: 4917f55b4ef9 ("mm/sparse-vmemmap: improve memory savings for compound devmaps") Signed-off-by: Aneesh Kumar K.V Reported-by: Tarun Sahu Reviewed-by: Joao Martins Cc: Muchun Song Cc: Dan Williams Cc: Mike Kravetz Cc: Signed-off-by: Andrew Morton commit 43759d44dc346273efd79e99ba5d195ed6c2bfa2 Author: Peter Xu Date: Wed Apr 12 12:45:48 2023 -0400 selftests/mm: add uffdio register ioctls test This new test tests against the returned ioctls from UFFDIO_REGISTER, where put into uffdio_register.ioctls. This also tests the expected failure cases of UFFDIO_REGISTER, aka: - Register with empty mode should fail with -EINVAL - Register minor without page cache (anon) should fail with -EINVAL Link: https://lkml.kernel.org/r/20230412164548.329376-1-peterx@redhat.com Signed-off-by: Peter Xu Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 5aec236fdd69d39f9fa5e579d10f7a45ed11b005 Author: Peter Xu Date: Wed Apr 12 12:45:46 2023 -0400 selftests/mm: add shmem-private test to uffd-stress The userfaultfd stress test never tested private shmem, which I think was overlooked long due. Add it so it matches with uffd unit test and it'll cover all memory supported with the three memory types. Meanwhile, rename the memory types a bit. Considering shared mem is the major use case for both shmem / hugetlbfs, changing from: anon, hugetlb, hugetlb_shared, shmem To (with shmem-private added): anon, hugetlb, hugetlb-private, shmem, shmem-private Add the shmem-private to run_vmtests.sh too. Link: https://lkml.kernel.org/r/20230412164546.329355-1-peterx@redhat.com Signed-off-by: Peter Xu Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 111fd29b2aed34f1841015df2196a9b489da06b0 Author: Peter Xu Date: Wed Apr 12 12:45:25 2023 -0400 selftests/mm: drop sys/dev test in uffd-stress test With the new uffd unit test covering the /dev/userfaultfd path and syscall path of uffd initializations, we can safely drop the devnode test in the old stress test. One thing is to avoid duplication of running the stress test twice which is an overkill to only test the /dev/ interface in run_vmtests.sh. The other benefit is now all uffd tests (that uses userfaultfd_open) can run automatically as long as any type of interface is enabled (either syscall or dev), so it's more likely to succeed rather than fail due to unprivilege. With this patch lands, we can drop all the "mem_type:XXX" handlings too. Link: https://lkml.kernel.org/r/20230412164525.329176-1-peterx@redhat.com Signed-off-by: Peter Xu Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit f9da24263db43da12f1e105cb8ac5e02c66f12d0 Author: Peter Xu Date: Wed Apr 12 12:45:20 2023 -0400 selftests/mm: allow uffd test to skip properly with no privilege Allow skip a unit test properly due to no privilege (e.g. sigbus and events tests). [colin.i.king@gmail.com: fix spelling mistake "priviledge" -> "privilege"] Link: https://lkml.kernel.org/r/20230414081506.1678998-1-colin.i.king@gmail.com Link: https://lkml.kernel.org/r/20230412164520.329163-1-peterx@redhat.com Signed-off-by: Peter Xu Signed-off-by: Colin Ian King Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 4df9cefa9419718c32259c105ac8fbbc680410f7 Author: Peter Xu Date: Wed Apr 12 12:45:17 2023 -0400 selftests/mm: workaround no way to detect uffd-minor + wp Userfaultfd minor+wp mode was very recently added. The test will fail on the old kernels at ioctl(UFFDIO_CONTINUE) which is misterious. Unfortunately there's no feature bit to detect for this support. Add a hack to leverage WP_UNPOPULATED to detect whether that feature existed, since WP_UNPOPULATED was merged right after minor+wp. Link: https://lkml.kernel.org/r/20230412164517.329152-1-peterx@redhat.com Signed-off-by: Peter Xu Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit c3315502c92406ec5bf36ba687f9651b43f838f6 Author: Peter Xu Date: Wed Apr 12 12:44:04 2023 -0400 selftests/mm: move zeropage test into uffd unit tests Simplifies it a bit along the way, e.g., drop the never used offset field (which was always the 1st page so offset=0). Introduce uffd_register_with_ioctls() out of uffd_register() to detect uffdio_register.ioctls got returned. Check that automatically when testing UFFDIO_ZEROPAGE on different types of memory (and kernel). Link: https://lkml.kernel.org/r/20230412164404.328815-1-peterx@redhat.com Signed-off-by: Peter Xu Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 73c1ea939b658962345e81e8bcff1439ede25eff Author: Peter Xu Date: Wed Apr 12 12:44:00 2023 -0400 selftests/mm: move uffd sig/events tests into uffd unit tests Move the two tests into the unit test, and convert it into 20 standalone tests: - events test on all 5 mem types, with wp on/off - signal test on all 5 mem types, with wp on/off Testing sigbus on anon... done Testing sigbus on shmem... done Testing sigbus on shmem-private... done Testing sigbus on hugetlb... done Testing sigbus on hugetlb-private... done Testing sigbus-wp on anon... done Testing sigbus-wp on shmem... done Testing sigbus-wp on shmem-private... done Testing sigbus-wp on hugetlb... done Testing sigbus-wp on hugetlb-private... done Testing events on anon... done Testing events on shmem... done Testing events on shmem-private... done Testing events on hugetlb... done Testing events on hugetlb-private... done Testing events-wp on anon... done Testing events-wp on shmem... done Testing events-wp on shmem-private... done Testing events-wp on hugetlb... done Testing events-wp on hugetlb-private... done It'll also remove a lot of global references along the way, e.g. test_uffdio_wp will be replaced with the wp value passed over. Link: https://lkml.kernel.org/r/20230412164400.328798-1-peterx@redhat.com Signed-off-by: Peter Xu Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 62515b5f9fdabf740efd28d5746c219f1b2e75cc Author: Peter Xu Date: Wed Apr 12 12:43:57 2023 -0400 selftests/mm: move uffd minor test to unit test This moves the minor test to the new unit test. Rewrite the content check with char* opeartions to avoid fiddling with my_bcmp(). Drop global vars test_uffdio_minor and test_collapse, just assume test them always in common code for now. OTOH make this single test into five tests: - minor test on [shmem, hugetlb] with wp=false - minor test on [shmem, hugetlb] with wp=true - minor test + collapse on shmem only One thing to mention that we used to test COLLAPSE+WP but that doesn't sound right at all. It's possible it's silently broken but unnoticed because COLLAPSE is not part of the default test suite. Make the MADV_COLLAPSE test fail-able (by skip it when failing), because it's not guaranteed to success anyway. Drop a bunch of useless code after the move, because the unit test always use aligned num of pages and has nothing to do with n_cpus. Link: https://lkml.kernel.org/r/20230412164357.328779-1-peterx@redhat.com Signed-off-by: Peter Xu Cc: Zach O'Keefe Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit 8bda424fca0a0cc056c49a2500df03590648d029 Author: Peter Xu Date: Wed Apr 12 12:43:52 2023 -0400 selftests/mm: move uffd pagemap test to unit test Move it over and make it split into two tests, one for pagemap and one for the new WP_UNPOPULATED (to be a separate one). The thp pagemap test wasn't really working (with MADV_HUGEPAGE). Let's just drop it (since it never really worked anyway..) and leave that for later. Link: https://lkml.kernel.org/r/20230412164352.328733-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Mike Rapoport (IBM) Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 16a45b57cbf2312215fbac79df4b58a0d70e1f2b Author: Peter Xu Date: Wed Apr 12 12:43:48 2023 -0400 selftests/mm: add framework for uffd-unit-test Add a framework to be prepared to move unit tests from uffd-stress.c into uffd-unit-tests.c. The goal is to allow detection of uffd features for each test, and also loop over specified types of memory that a test support. Link: https://lkml.kernel.org/r/20230412164348.328710-1-peterx@redhat.com Signed-off-by: Peter Xu Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit be39fec4f97f01329ef48a5a3836f592f6a82766 Author: Peter Xu Date: Wed Apr 12 12:43:45 2023 -0400 selftests/mm: allow allocate_area() to fail properly Mostly to detect hugetlb allocation errors and skip hugetlb tests when pages are not allocated. Link: https://lkml.kernel.org/r/20230412164345.328659-1-peterx@redhat.com Signed-off-by: Peter Xu Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 0210c43ef623a3c35cafd7dbe25b1b3c1699e7e9 Author: Peter Xu Date: Wed Apr 12 12:43:41 2023 -0400 selftests/mm: let uffd_handle_page_fault() take wp parameter Make the handler optionally apply WP bit when resolving page faults for either missing or minor page faults. This moves towards removing global test_uffdio_wp outside of the common code. Link: https://lkml.kernel.org/r/20230412164341.328618-1-peterx@redhat.com Signed-off-by: Peter Xu Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 508340845dd1423b6c81fccf082039dff202fb9f Author: Peter Xu Date: Wed Apr 12 12:43:37 2023 -0400 selftests/mm: rename uffd_stats to uffd_args Prepare for adding more fields into the struct. Link: https://lkml.kernel.org/r/20230412164337.328607-1-peterx@redhat.com Signed-off-by: Peter Xu Suggested-by: Mike Rapoport (IBM) Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 265818ef988b3a4cd12fc8885966413b78f06d96 Author: Peter Xu Date: Wed Apr 12 12:43:33 2023 -0400 selftests/mm: drop global hpage_size in uffd tests hpage_size was wrongly used. Sometimes it means hugetlb default size, sometimes it was used as thp size. Remove the global variable and use the right one at each place. Link: https://lkml.kernel.org/r/20230412164333.328596-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Mike Rapoport (IBM) Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit c5cb903646f4df0ab3760dcb2e5571b528b6db59 Author: Peter Xu Date: Wed Apr 12 12:43:31 2023 -0400 selftests/mm: drop global mem_fd in uffd tests Drop it by creating the memfd dynamically in the tests. Link: https://lkml.kernel.org/r/20230412164331.328584-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Mike Rapoport (IBM) Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit d5433ce84d2572d43a3c58e5cab21db200669bfd Author: Peter Xu Date: Wed Apr 12 12:42:57 2023 -0400 selftests/mm: UFFDIO_API test Add one simple test for UFFDIO_API. With that, I also added a bunch of small but handy helpers along the way. Link: https://lkml.kernel.org/r/20230412164257.328375-1-peterx@redhat.com Signed-off-by: Peter Xu Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 78391f6460ee2cb43f64bbdd7a7cf840e5a118a6 Author: Peter Xu Date: Wed Apr 12 12:42:54 2023 -0400 selftests/mm: uffd_open_{dev|sys}() Provide two helpers to open an uffd handle. Drop the error checks around SKIPs because it's inside an errexit() anyway, which IMHO doesn't really help much if the test will not continue. Link: https://lkml.kernel.org/r/20230412164254.328335-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport (IBM) Reviewed-by: Axel Rasmussen Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit c4277cb6c8e5dc60d425f3a148b3e2bf40d8d778 Author: Peter Xu Date: Wed Apr 12 12:42:47 2023 -0400 selftests/mm: uffd_[un]register() Add two helpers to register/unregister to an uffd. Use them to drop duplicate codes. This patch also drops assert_expected_ioctls_present() and get_expected_ioctls(). Reasons: - It'll need a lot of effort to pass test_type==HUGETLB into it from the upper, so it's the simplest way to get rid of another global var - The ioctls returned in UFFDIO_REGISTER is hardly useful at all, because any app can already detect kernel support on any ioctl via its corresponding UFFD_FEATURE_*. The check here is for sanity mostly but it's probably destined no user app will even use it. - It's not friendly to one future goal of uffd to run on old kernels, the problem is get_expected_ioctls() compiles against UFFD_API_RANGE_IOCTLS, which is a value that can change depending on where the test is compiled, rather than reflecting what the kernel underneath has. It means it'll report false negatives on old kernels so it's against our will. So let's make our lives easier. [peterx@redhat.com; tools/testing/selftests/mm/hugepage-mremap.c: add headers] Link: https://lkml.kernel.org/r/ZDxrvZh/cw357D8P@x1n Link: https://lkml.kernel.org/r/20230412164247.328293-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 686a8bb723497197022c73807cdd29eb5a1aeec8 Author: Peter Xu Date: Wed Apr 12 12:42:44 2023 -0400 selftests/mm: split uffd tests into uffd-stress and uffd-unit-tests In many ways it's weird and unwanted to keep all the tests in the same userfaultfd.c at least when still in the current way. For example, it doesn't make much sense to run the stress test for each method we can create an userfaultfd handle (either via syscall or /dev/ node). It's a waste of time running this twice for the whole stress as the stress paths are the same, only the open path is different. It's also just weird to need to manually specify different types of memory to run all unit tests for the userfaultfd interface. We should be able to just run a single program and that should go through all functional uffd tests without running the stress test at all. The stress test was more for torturing and finding race conditions. We don't want to wait for stress to finish just to regress test a functional test. When we start to pile up more things on top of the same file and same functions, things start to go a bit chaos and the code is just harder to maintain too with tons of global variables. This patch creates a new test uffd-unit-tests to keep userfaultfd unit tests in the future, currently empty. Meanwhile rename the old userfaultfd.c test to uffd-stress.c. Link: https://lkml.kernel.org/r/20230412164244.328270-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Mike Rapoport (IBM) Reviewed-by: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 33be4e892877eec7c8eb32988b95f5c42c87f0f0 Author: Peter Xu Date: Wed Apr 12 12:42:41 2023 -0400 selftests/mm: create uffd-common.[ch] Move common utility functions into uffd-common.[ch] files from the original userfaultfd.c. This prepares for a split of userfaultfd.c into two tests: one to only cover the old but powerful stress test, the other one covers all the functional tests. This movement is kind of a brute-force effort for now, with light touch-ups but nothing should really change. There's chances to optimize more, but let's leave that for later. Link: https://lkml.kernel.org/r/20230412164241.328259-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Mike Rapoport (IBM) Reviewed-by: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 618aeb5d6255a7c2db2ac9cb850e5e044dd916c5 Author: Peter Xu Date: Wed Apr 12 12:42:38 2023 -0400 selftests/mm: drop test_uffdio_zeropage_eexist The idea was trying to flip this var in the alarm handler from time to time to test -EEXIST of UFFDIO_ZEROPAGE, but firstly it's only used in the zeropage test so probably only used once, meanwhile we passed "retry==false" so it'll never got tested anyway. Drop both sides so we always test UFFDIO_ZEROPAGE retries if has_zeropage is set (!hugetlb). One more thing to do is doing UFFDIO_REGISTER for the alias buffer too, because otherwise the test won't even pass! We were just lucky that this test never really got ran at all. Link: https://lkml.kernel.org/r/20230412164238.328238-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Mike Kravetz Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport (IBM) Cc: Axel Rasmussen Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 4af9ff29816ac011af143c9d5cd16ab75429a600 Author: Peter Xu Date: Wed Apr 12 12:42:34 2023 -0400 selftests/mm: test UFFDIO_ZEROPAGE only when !hugetlb Make the check as simple as "test_type == TEST_HUGETLB" because that's the only mem that doesn't support ZEROPAGE. Link: https://lkml.kernel.org/r/20230412164234.328168-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Axel Rasmussen Cc: David Hildenbrand Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Mike Rapoport (IBM) Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 366e93c46576e77f1ccfdeab31127f40537e7484 Author: Peter Xu Date: Wed Apr 12 12:42:31 2023 -0400 selftests/mm: reuse pagemap_get_entry() in vm_util.h Meanwhile drop pagemap_read_vaddr(). Link: https://lkml.kernel.org/r/20230412164231.328157-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Axel Rasmussen Reviewed-by: Mike Kravetz Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport (IBM) Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 9f74696bd23da71ab19b1825f813421904cd4169 Author: Peter Xu Date: Wed Apr 12 12:42:27 2023 -0400 selftests/mm: use PM_* macros in vm_utils.h We've got the macros in uffd-stress.c, move it over and use it in vm_util.h. Link: https://lkml.kernel.org/r/20230412164227.328145-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Axel Rasmussen Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport (IBM) Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit bd4d67e76f699688d15e6194f1505b8bdfee0dd7 Author: Peter Xu Date: Wed Apr 12 12:42:23 2023 -0400 selftests/mm: merge default_huge_page_size() into one There're already 3 same definitions of the three functions. Move it into vm_util.[ch]. Link: https://lkml.kernel.org/r/20230412164223.328134-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Axel Rasmussen Reviewed-by: Mike Kravetz Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport (IBM) Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 4b54f5a758b7ac521d4658cb0d18b132b87597c0 Author: Peter Xu Date: Wed Apr 12 12:42:20 2023 -0400 selftests/mm: link vm_util.c always We do have plenty of files that want to link against vm_util.c. Just make it simple by linking it always. Link: https://lkml.kernel.org/r/20230412164220.328123-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport (IBM) Cc: Axel Rasmussen Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit aef6fde75d8c6c1cad4a0e017a8d4cbee2143723 Author: Peter Xu Date: Wed Apr 12 12:42:18 2023 -0400 selftests/mm: use TEST_GEN_PROGS where proper TEST_GEN_PROGS and TEST_GEN_FILES are used randomly in the mm/Makefile to specify programs that need to build. Logically all these binaries should all fall into TEST_GEN_PROGS. Replace those TEST_GEN_FILES with TEST_GEN_PROGS, so that we can reference all the tests easily later. [peterx@redhat.com: tools/testing/selftests/mm/Makefile: don't wipe out TEST_GEN_PROGS] Link: https://lkml.kernel.org/r/ZDxrvZh/cw357D8P@x1n Link: https://lkml.kernel.org/r/20230412164218.328104-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport (IBM) Cc: Axel Rasmussen Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit af605d26a8f26e9e46fa82246dc1241efd3834a5 Author: Peter Xu Date: Wed Apr 12 12:41:20 2023 -0400 selftests/mm: merge util.h into vm_util.h There're two util headers under mm/ kselftest. Merge one with another. It turns out util.h is the easy one to move. When merging, drop PAGE_SIZE / PAGE_SHIFT because they're unnecessary wrappers to page_size() / page_shift(), meanwhile rename them to psize() and pshift() so as to not conflict with some existing definitions in some test files that includes vm_util.h. Link: https://lkml.kernel.org/r/20230412164120.327731-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Axel Rasmussen Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport (IBM) Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit c7c55fc4e39aed6a5a4d47f2201e53b1efb24ca6 Author: Peter Xu Date: Wed Apr 12 12:41:17 2023 -0400 selftests/mm: dump a summary in run_vmtests.sh Dump a summary after running whatever test specified. Useful for human runners to identify any kind of failures (besides exit code). Link: https://lkml.kernel.org/r/20230412164117.327720-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Axel Rasmussen Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport (IBM) Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit c14ef37871fcee9dbcaebb1bc73ac4da21547c13 Author: Peter Xu Date: Wed Apr 12 12:41:14 2023 -0400 selftests/mm: update .gitignore with two missing tests Patch series "selftests/mm: Split / Refactor userfault test", v2. This patchset splits userfaultfd.c into two tests: - uffd-stress: the "vanilla", old and powerful stress test - uffd-unit-tests: all the unit tests will be moved here This is on my todo list for a long time but I never did it for real. The uffd test is growing into a small and cute monster. I start to notice it's going harder to maintain such a test and make it useful. A few issues I found when looking at userfaultfd test: - We have a bunch of unit tests in userfaultfd.c, but they always need to be run only after a stress type. No way to not do it. - We can only run an unit test for one memory type only, if we want to do a quick smoke test to check regressions, there's no good way. The best to come currently is "bash ./run_vmtests.sh -t userfaultfd" thanks to the most recent changes to run_vmtests.sh on tagging. Still, that needs to run the stress tests always and hard to see what's wrong. - It's hard to add a new unit test to userfaultfd.c, we don't really know what's happening, not until we mostly read the whole file. - We did a bunch of useless tests, e.g. we run twice the whole suite of stress test just to verify both syscall and /dev/userfaultfd. They're all using userfaultfd_new() to create the handle, everything should really be the same underneath. One simple unit test should cover that! - We have tens of global variables in one file but shared with all the tests. Some of them are not suitable to be a global var from maintainance pov. It enforces every unit test to consider how these vars affects the stress test and vice versa, but that's logically not necessary. - Userfaultfd test is not friendly to old kernels. Mostly it only works on the latest kernel tree. It's preferrable to be run on all kernels and properly report what's missing. I'll stop here, I feel like I can still list some.. This patchset should resolve all issues above, and actually we can do even more on top. I stopped doing that until I found I already got 29 patches and 2000+ LOC changes. That's already a patchset terrible enough so we should move in small steps. After the whole set applied, "./run_vmtests.sh -t userfaultfd" looks like this: ===8<=== vm.nr_hugepages = 1024 ------------------------- running ./uffd-unit-tests ------------------------- Testing UFFDIO_API (with syscall)... done Testing UFFDIO_API (with /dev/userfaultfd)... done Testing register-ioctls on anon... done Testing register-ioctls on shmem... done Testing register-ioctls on shmem-private... done Testing register-ioctls on hugetlb... done Testing register-ioctls on hugetlb-private... done Testing zeropage on anon... done Testing zeropage on shmem... done Testing zeropage on shmem-private... done Testing zeropage on hugetlb... done Testing zeropage on hugetlb-private... done Testing pagemap on anon... done Testing wp-unpopulated on anon... done Testing minor on shmem... done Testing minor on hugetlb... done Testing minor-wp on shmem... done Testing minor-wp on hugetlb... done Testing minor-collapse on shmem... done Testing sigbus on anon... done Testing sigbus on shmem... done Testing sigbus on shmem-private... done Testing sigbus on hugetlb... done Testing sigbus on hugetlb-private... done Testing sigbus-wp on anon... done Testing sigbus-wp on shmem... done Testing sigbus-wp on shmem-private... done Testing sigbus-wp on hugetlb... done Testing sigbus-wp on hugetlb-private... done Testing events on anon... done Testing events on shmem... done Testing events on shmem-private... done Testing events on hugetlb... done Testing events on hugetlb-private... done Testing events-wp on anon... done Testing events-wp on shmem... done Testing events-wp on shmem-private... done Testing events-wp on hugetlb... done Testing events-wp on hugetlb-private... done Userfaults unit tests: pass=39, skip=0, fail=0 (total=39) [PASS] -------------------------------- running ./uffd-stress anon 20 16 -------------------------------- nr_pages: 5120, nr_pages_per_cpu: 640 bounces: 15, mode: rnd racing ver poll, userfaults: 345 missing (26+48+61+102+30+12+59+7) 1596 wp (120+139+317+346+215+67+306+86) [...] [PASS] ------------------------------------ running ./uffd-stress hugetlb 128 32 ------------------------------------ nr_pages: 64, nr_pages_per_cpu: 8 bounces: 31, mode: rnd racing ver poll, userfaults: 29 missing (6+6+6+5+4+2+0+0) 104 wp (20+19+22+18+7+12+5+1) [...] [PASS] -------------------------------------------- running ./uffd-stress hugetlb-private 128 32 -------------------------------------------- nr_pages: 64, nr_pages_per_cpu: 8 bounces: 31, mode: rnd racing ver poll, userfaults: 33 missing (12+9+7+0+5+0+0+0) 111 wp (24+25+14+14+11+17+5+1) [...] [PASS] --------------------------------- running ./uffd-stress shmem 20 16 --------------------------------- nr_pages: 5120, nr_pages_per_cpu: 640 bounces: 15, mode: rnd racing ver poll, userfaults: 247 missing (15+17+34+60+81+37+3+0) 2038 wp (180+114+276+400+381+318+165+204) [...] [PASS] ----------------------------------------- running ./uffd-stress shmem-private 20 16 ----------------------------------------- nr_pages: 5120, nr_pages_per_cpu: 640 bounces: 15, mode: rnd racing ver poll, userfaults: 235 missing (52+29+55+56+13+9+16+5) 2849 wp (218+406+461+531+328+284+430+191) [...] [PASS] SUMMARY: PASS=6 SKIP=0 FAIL=0 ===8<=== The output may be different if we miss some features (e.g., hugetlb not allocated, old kernel, less privilege of uffd handle), but they should show up with good reasons. E.g., I tried to run the unit test on my Fedora kernel and it gives me: ===8<=== UFFDIO_API (with syscall)... failed [reason: UFFDIO_API should fail with wrong api but didn't] UFFDIO_API (with /dev/userfaultfd)... skipped [reason: cannot open userfaultfd handle] zeropage on anon... done zeropage on shmem... done zeropage on shmem-private... done zeropage-hugetlb on hugetlb... done zeropage-hugetlb on hugetlb-private... done pagemap on anon... pagemap on anon... pagemap on anon... done wp-unpopulated on anon... skipped [reason: feature missing] minor on shmem... done minor on hugetlb... done minor-wp on shmem... skipped [reason: feature missing] minor-wp on hugetlb... skipped [reason: feature missing] minor-collapse on shmem... done sigbus on anon... skipped [reason: possible lack of priviledge] sigbus on shmem... skipped [reason: possible lack of priviledge] sigbus on shmem-private... skipped [reason: possible lack of priviledge] sigbus on hugetlb... skipped [reason: possible lack of priviledge] sigbus on hugetlb-private... skipped [reason: possible lack of priviledge] sigbus-wp on anon... skipped [reason: possible lack of priviledge] sigbus-wp on shmem... skipped [reason: possible lack of priviledge] sigbus-wp on shmem-private... skipped [reason: possible lack of priviledge] sigbus-wp on hugetlb... skipped [reason: possible lack of priviledge] sigbus-wp on hugetlb-private... skipped [reason: possible lack of priviledge] events on anon... skipped [reason: possible lack of priviledge] events on shmem... skipped [reason: possible lack of priviledge] events on shmem-private... skipped [reason: possible lack of priviledge] events on hugetlb... skipped [reason: possible lack of priviledge] events on hugetlb-private... skipped [reason: possible lack of priviledge] events-wp on anon... skipped [reason: possible lack of priviledge] events-wp on shmem... skipped [reason: possible lack of priviledge] events-wp on shmem-private... skipped [reason: possible lack of priviledge] events-wp on hugetlb... skipped [reason: possible lack of priviledge] events-wp on hugetlb-private... skipped [reason: possible lack of priviledge] Userfaults unit tests: pass=9, skip=24, fail=1 (total=34) ===8<=== Patch layout: - Revert "userfaultfd: don't fail on unrecognized features" Something I found when I got the UFFDIO_API test below. Axel, I still propose to revert it as a whole, but feel free to continue the discussion from the original patch thread. - selftests/mm: Update .gitignore with two missing tests - selftests/mm: Dump a summary in run_vmtests.sh - selftests/mm: Merge util.h into vm_util.h - selftests/mm: Use TEST_GEN_PROGS where proper - selftests/mm: Link vm_util.c always - selftests/mm: Merge default_huge_page_size() into one - selftests/mm: Use PM_* macros in vm_utils.h - selftests/mm: Reuse pagemap_get_entry() in vm_util.h - selftests/mm: Test UFFDIO_ZEROPAGE only when !hugetlb - selftests/mm: Drop test_uffdio_zeropage_eexist Until here, all cleanups here and there. I wanted to keep going, but I found that maybe it'll take a few more days to split the test. Hence I did a split starting from the next one, so we have a working thing first. - selftests/mm: Create uffd-common.[ch] - selftests/mm: Split uffd tests into uffd-stress and uffd-unit-tests This did the major brute force split of common codes into uffd-common.[ch]. That'll be the so far common base for stress and unit tests. Then a new unit test is created. - selftests/mm: uffd_[un]register() - selftests/mm: uffd_open_{dev|sys}() - selftests/mm: UFFDIO_API test This patch hides here to start writting the 1st unit test with UFFDIO_API, also detection of userfaultfd privileges. - selftests/mm: Drop global mem_fd in uffd tests - selftests/mm: Drop global hpage_size in uffd tests - selftests/mm: Rename uffd_stats to uffd_args - selftests/mm: Let uffd_handle_page_fault() takes wp parameter - selftests/mm: Allow allocate_area() to fail properly Some further cleanup that I noticed otherwise hard to move the tests. - selftests/mm: Add framework for uffd-unit-test The major patch provides the framework for most of the rest unit tests. - selftests/mm: Move uffd pagemap test to unit test - selftests/mm: Move uffd minor test to unit test - selftests/mm: Move uffd sig/events tests into uffd unit tests - selftests/mm: Move zeropage test into uffd unit tests Move unit tests and suite them into the new file. - selftests/mm: Workaround no way to detect uffd-minor + wp - selftests/mm: Allow uffd test to skip properly with no privilege - selftests/mm: Drop sys/dev test in uffd-stress test - selftests/mm: Add shmem-private test to uffd-stress A bunch of changes to do better on error reportings, and add shmem-private to the stress test which was long missing. - selftests/mm: Add uffdio register ioctls test One more patch to test uffdio_register.ioctls. This patch (of 30): Update .gitignore with two missing tests. Link: https://lkml.kernel.org/r/20230412163922.327282-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20230412164114.327709-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport (IBM) Cc: Axel Rasmussen Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Kravetz Cc: Zach O'Keefe Signed-off-by: Andrew Morton commit 54c4fe08f65e4c39c3d62f5d181f958e9c6c97f7 Author: Haifeng Xu Date: Tue Apr 11 06:17:57 2023 +0000 mm/vmscan: simplify shrink_node() The difference between sc->nr_reclaimed and nr_reclaimed is computed three times. Introduce a new variable to record the value, so it only needs to be computed once. Link: https://lkml.kernel.org/r/20230411061757.12041-1-haifeng.xu@shopee.com Signed-off-by: Haifeng Xu Reviewed-by: David Hildenbrand Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 09a607c9cd23d9521e7be3ab5eb94f217d7a37f5 Author: Pankaj Raghav Date: Tue Apr 11 14:29:20 2023 +0200 mpage: use folios in bio end_io handler Use folios in the bio end_io handler. This conversion does the appropriate handling on the folios in the respective end_io callback and removes the call to page_endio(), which is soon to be removed. Link: https://lkml.kernel.org/r/20230411122920.30134-4-p.raghav@samsung.com Signed-off-by: Pankaj Raghav Reviewed-by: Christoph Hellwig Cc: Alexander Viro Cc: Christian Brauner Cc: Jens Axboe Cc: Luis Chamberlain Cc: Martin Brandenburg Cc: Matthew Wilcox (Oracle) Cc: Mike Marshall Cc: Minchan Kim Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton commit f0d6ca46d68670d04a43116fe07309643bac596e Author: Pankaj Raghav Date: Tue Apr 11 14:29:19 2023 +0200 mpage: split submit_bio and bio end_io handler for reads and writes Split the submit_bio() and bio end_io handler for reads and writes similar to other aops. This is a prep patch before we convert end_io handlers to use folios. Link: https://lkml.kernel.org/r/20230411122920.30134-3-p.raghav@samsung.com Signed-off-by: Pankaj Raghav Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Cc: Alexander Viro Cc: Christian Brauner Cc: Jens Axboe Cc: Luis Chamberlain Cc: Martin Brandenburg Cc: Matthew Wilcox (Oracle) Cc: Mike Marshall Cc: Minchan Kim Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton commit cd01049d9ca3788a9d1537b64aec26edc96ad0bd Author: Pankaj Raghav Date: Tue Apr 11 14:29:18 2023 +0200 orangefs: use folios in orangefs_readahead Patch series "remove page_endio()", v3. It was decided to remove the page_endio() as per the previous RFC discussion[1] of this series and move that functionality into the caller itself. One of the side benefit of doing that is the callers have been modified to directly work on folios as page_endio() already worked on folios. As Christoph is doing ZRAM cleanups[4] which will get rid of page_endio() function usage, I removed the final patch that removes page_endio()[5]. I will send it separately after rc-1 once the zram cleanups are merged. mpage changes were tested with a simple boot testing and running a fio workload on ext2 filesystem. orangefs was tested by Mike Marshall (No code changes since he tested). This patch (of 3): Convert orangefs_readahead() from using struct page to struct folio. This conversion removes the call to page_endio() which is soon to be removed, and simplifies the final page handling. The page error flags is not required to be set in the error case as orangefs doesn't depend on them. Link: https://lkml.kernel.org/r/20230411122920.30134-1-p.raghav@samsung.com Link: https://lkml.kernel.org/r/20230411122920.30134-2-p.raghav@samsung.com Link: https://lore.kernel.org/linux-mm/ZBHcl8Pz2ULb4RGD@infradead.org/ [1] Link: https://lore.kernel.org/linux-mm/20230322135013.197076-1-p.raghav@samsung.com/ [2] Link: https://lore.kernel.org/linux-mm/8adb0770-6124-e11f-2551-6582db27ed32@samsung.com/ [3] Link: https://lore.kernel.org/linux-block/20230404150536.2142108-1-hch@lst.de/T/#t [4] Link: https://lore.kernel.org/lkml/20230403132221.94921-6-p.raghav@samsung.com/ [5] Signed-off-by: Pankaj Raghav Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Tested-by: Mike Marshall Cc: Alexander Viro Cc: Christian Brauner Cc: Jens Axboe Cc: Luis Chamberlain Cc: Martin Brandenburg Cc: Minchan Kim Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton commit 1462c52e9f2b99e72022ed8979bfc969894bb3da Author: David Hildenbrand Date: Tue Apr 11 16:25:12 2023 +0200 mm/huge_memory: conditionally call maybe_mkwrite() and drop pte_wrprotect() in __split_huge_pmd_locked() No need to call maybe_mkwrite() to then wrprotect if the source PMD was not writable. It's worth nothing that this now allows for PTEs to be writable even if the source PMD was not writable: if vma->vm_page_prot includes write permissions. As documented in commit 931298e103c2 ("mm/userfaultfd: rely on vma->vm_page_prot in uffd_wp_range()"), any mechanism that intends to have pages wrprotected (COW, writenotify, mprotect, uffd-wp, softdirty, ...) has to properly adjust vma->vm_page_prot upfront, to not include write permissions. If vma->vm_page_prot includes write permissions, the PTE/PMD can be writable as default. This now mimics the handling in mm/migrate.c:remove_migration_pte() and in mm/huge_memory.c:remove_migration_pmd(), which has been in place for a long time (except that 96a9c287e25d ("mm/migrate: fix wrongly apply write bit after mkdirty on sparc64") temporarily changed it). Link: https://lkml.kernel.org/r/20230411142512.438404-7-david@redhat.com Signed-off-by: David Hildenbrand Cc: Anshuman Khandual Cc: David S. Miller Cc: Hugh Dickins Cc: Peter Xu Cc: Sam Ravnborg Cc: Shuah Khan Cc: Yu Zhao Signed-off-by: Andrew Morton commit 5436d6556937de6236ffa1829550d13702569dab Author: David Hildenbrand Date: Tue Apr 11 16:25:11 2023 +0200 mm/huge_memory: revert "Partly revert "mm/thp: carry over dirty bit when thp splits on pmd"" This reverts commit 624a2c94f5b7 ("Partly revert "mm/thp: carry over dirty bit when thp splits on pmd"") and the fixup in commit e833bc503405 ("mm/thp: re-apply mkdirty for small pages after split"). Now that sparc64 mkdirty handling is fixed and no longer sets a PTE/PMD writable that shouldn't be writable, let's revert the temporary fix and remove the stale comment. The mkdirty mm selftest still passes with this change on sparc64. Note that loongarch handling was fixed in commit bf2f34a506e6 ("LoongArch: Set _PAGE_DIRTY only if _PAGE_WRITE is set in {pmd,pte}_mkdirty()") Link: https://lkml.kernel.org/r/20230411142512.438404-6-david@redhat.com Signed-off-by: David Hildenbrand Cc: Anshuman Khandual Cc: David S. Miller Cc: Hugh Dickins Cc: Peter Xu Cc: Sam Ravnborg Cc: Shuah Khan Cc: Yu Zhao Signed-off-by: Andrew Morton commit 3c811f7883c4ee5a34ba4354381bde062888dd31 Author: David Hildenbrand Date: Tue Apr 11 16:25:10 2023 +0200 mm/migrate: revert "mm/migrate: fix wrongly apply write bit after mkdirty on sparc64" This reverts commit 96a9c287e25d ("mm/migrate: fix wrongly apply write bit after mkdirty on sparc64"). Now that sparc64 mkdirty handling is fixed and no longer sets a PTE/PMD writable that shouldn't be writable, let's revert the temporary fix. The mkdirty mm selftest still passes with this change on sparc64. Note that loongarch handling was fixed in commit bf2f34a506e6 ("LoongArch: Set _PAGE_DIRTY only if _PAGE_WRITE is set in {pmd,pte}_mkdirty()"). Link: https://lkml.kernel.org/r/20230411142512.438404-5-david@redhat.com Signed-off-by: David Hildenbrand Cc: Anshuman Khandual Cc: David S. Miller Cc: Hugh Dickins Cc: Peter Xu Cc: Sam Ravnborg Cc: Shuah Khan Cc: Yu Zhao Signed-off-by: Andrew Morton commit fa2e71a6fcee495e16176bd606e7121332627a16 Author: David Hildenbrand Date: Tue Apr 11 16:25:09 2023 +0200 sparc/mm: don't unconditionally set HW writable bit when setting PTE dirty on 64bit On sparc64, there is no HW modified bit, therefore, SW tracks via a SW bit if the PTE is dirty via pte_mkdirty(). However, pte_mkdirty() currently also unconditionally sets the HW writable bit, which is wrong. pte_mkdirty() is not supposed to make a PTE actually writable, unless the SW writable bit -- pte_write() -- indicates that the PTE is not write-protected. Fortunately, sparc64 also defines a SW writable bit. For example, this already turned into a problem in the context of THP splitting as documented in commit 624a2c94f5b7 ("Partly revert "mm/thp: carry over dirty bit when thp splits on pmd""), and for page migration, as documented in commit 96a9c287e25d ("mm/migrate: fix wrongly apply write bit after mkdirty on sparc64"). Also, we might want to use the dirty PTE bit in the context of KSM with shared zeropage [1], whereby setting the page writable would be problematic. But more general, any code that might end up setting a PTE/PMD dirty inside a VM without write permissions is possibly broken, Before this commit (sun4u in QEMU): root@debian:~/linux/tools/testing/selftests/mm# ./mkdirty # [INFO] detected THP size: 8192 KiB TAP version 13 1..6 # [INFO] PTRACE write access not ok 1 SIGSEGV generated, page not modified # [INFO] PTRACE write access to THP not ok 2 SIGSEGV generated, page not modified # [INFO] Page migration ok 3 SIGSEGV generated, page not modified # [INFO] Page migration of THP ok 4 SIGSEGV generated, page not modified # [INFO] PTE-mapping a THP ok 5 SIGSEGV generated, page not modified # [INFO] UFFDIO_COPY not ok 6 SIGSEGV generated, page not modified Bail out! 3 out of 6 tests failed # Totals: pass:3 fail:3 xfail:0 xpass:0 skip:0 error:0 Test #3,#4,#5 pass ever since we added some MM workarounds, the underlying issue remains. Let's fix the remaining issues and prepare for reverting the workarounds by setting the HW writable bit only if both, the SW dirty bit and the SW writable bit are set. We have to move pte_dirty() and pte_write() up. The code patching mechanism and handling constants > 22bit is a bit special on sparc64. The ASM logic in pte_mkdirty() and pte_mkwrite() match the logic in pte_mkold() to create the mask depending on the machine type. The ASM logic in __pte_mkhwwrite() matches the logic in pte_present(), just using an "or" instead of an "and" instruction. With this commit (sun4u in QEMU): root@debian:~/linux/tools/testing/selftests/mm# ./mkdirty # [INFO] detected THP size: 8192 KiB TAP version 13 1..6 # [INFO] PTRACE write access ok 1 SIGSEGV generated, page not modified # [INFO] PTRACE write access to THP ok 2 SIGSEGV generated, page not modified # [INFO] Page migration ok 3 SIGSEGV generated, page not modified # [INFO] Page migration of THP ok 4 SIGSEGV generated, page not modified # [INFO] PTE-mapping a THP ok 5 SIGSEGV generated, page not modified # [INFO] UFFDIO_COPY ok 6 SIGSEGV generated, page not modified # Totals: pass:6 fail:0 xfail:0 xpass:0 skip:0 error:0 This handling seems to have been in place forever. [1] https://lkml.kernel.org/r/533a7c3d-3a48-b16b-b421-6e8386e0b142@redhat.com Link: https://lkml.kernel.org/r/20230411142512.438404-4-david@redhat.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: David Hildenbrand Cc: Anshuman Khandual Cc: David S. Miller Cc: Hugh Dickins Cc: Peter Xu Cc: Sam Ravnborg Cc: Shuah Khan Cc: Yu Zhao Signed-off-by: Andrew Morton commit 9eac40fc0cc7b5bbc405af3b94cbe8aeb680ab26 Author: David Hildenbrand Date: Tue Apr 11 16:25:08 2023 +0200 selftests/mm: mkdirty: test behavior of (pte|pmd)_mkdirty on VMAs without write permissions Let's add some tests that trigger (pte|pmd)_mkdirty on VMAs without write permissions. If an architecture implementation is wrong, we might accidentally set the PTE/PMD writable and allow for write access in a VMA without write permissions. The tests include reproducers for the two issues recently discovered and worked-around in core-MM for now: (1) commit 624a2c94f5b7 ("Partly revert "mm/thp: carry over dirty bit when thp splits on pmd"") (2) commit 96a9c287e25d ("mm/migrate: fix wrongly apply write bit after mkdirty on sparc64") In addition, some other tests that reveal further issues. All tests pass under x86_64: ./mkdirty # [INFO] detected THP size: 2048 KiB TAP version 13 1..6 # [INFO] PTRACE write access ok 1 SIGSEGV generated, page not modified # [INFO] PTRACE write access to THP ok 2 SIGSEGV generated, page not modified # [INFO] Page migration ok 3 SIGSEGV generated, page not modified # [INFO] Page migration of THP ok 4 SIGSEGV generated, page not modified # [INFO] PTE-mapping a THP ok 5 SIGSEGV generated, page not modified # [INFO] UFFDIO_COPY ok 6 SIGSEGV generated, page not modified # Totals: pass:6 fail:0 xfail:0 xpass:0 skip:0 error:0 But some fail on sparc64: ./mkdirty # [INFO] detected THP size: 8192 KiB TAP version 13 1..6 # [INFO] PTRACE write access not ok 1 SIGSEGV generated, page not modified # [INFO] PTRACE write access to THP not ok 2 SIGSEGV generated, page not modified # [INFO] Page migration ok 3 SIGSEGV generated, page not modified # [INFO] Page migration of THP ok 4 SIGSEGV generated, page not modified # [INFO] PTE-mapping a THP ok 5 SIGSEGV generated, page not modified # [INFO] UFFDIO_COPY not ok 6 SIGSEGV generated, page not modified Bail out! 3 out of 6 tests failed # Totals: pass:3 fail:3 xfail:0 xpass:0 skip:0 error:0 Reverting both above commits makes all tests fail on sparc64: ./mkdirty # [INFO] detected THP size: 8192 KiB TAP version 13 1..6 # [INFO] PTRACE write access not ok 1 SIGSEGV generated, page not modified # [INFO] PTRACE write access to THP not ok 2 SIGSEGV generated, page not modified # [INFO] Page migration not ok 3 SIGSEGV generated, page not modified # [INFO] Page migration of THP not ok 4 SIGSEGV generated, page not modified # [INFO] PTE-mapping a THP not ok 5 SIGSEGV generated, page not modified # [INFO] UFFDIO_COPY not ok 6 SIGSEGV generated, page not modified Bail out! 6 out of 6 tests failed # Totals: pass:0 fail:6 xfail:0 xpass:0 skip:0 error:0 The tests are useful to detect other problematic archs, to verify new arch fixes, and to stop such issues from reappearing in the future. For now, we don't add any hugetlb tests. Link: https://lkml.kernel.org/r/20230411142512.438404-3-david@redhat.com Signed-off-by: David Hildenbrand Cc: Anshuman Khandual Cc: David S. Miller Cc: Hugh Dickins Cc: Peter Xu Cc: Sam Ravnborg Cc: Shuah Khan Cc: Yu Zhao Signed-off-by: Andrew Morton commit d6e61afb40e2208d90470f4b2012c4c8092863b9 Author: David Hildenbrand Date: Tue Apr 11 16:25:07 2023 +0200 selftests/mm: reuse read_pmd_pagesize() in COW selftest Patch series "mm: (pte|pmd)_mkdirty() should not unconditionally allow for write access". This is the follow-up on [1], adding selftests (testing for known issues we added workarounds for and other issues that haven't been fixed yet), fixing sparc64, reverting the workarounds, and perform one cleanup. The patch from [1] was modified slightly (updated/extended patch description, dropped one unnecessary NOP instruction from the ASM in __pte_mkhwwrite()). Retested on x86_64 and sparc64 (sun4u in QEMU). I scanned most architectures to make sure their (pte|pmd)_mkdirty() handling is correct. To be sure, we can run the selftests and find out if other architectures are still affectes (loongarch was fixed recently as well). Based on master for now. I don't expect surprises regarding mm-tress, but I can rebase if there are any problems. This patch (of 6): The COW selftest can deal with THP not being configured. So move error handling of read_pmd_pagesize() into the callers such that we can reuse it in the COW selftest. Link: https://lkml.kernel.org/r/20230411142512.438404-1-david@redhat.com Link: https://lkml.kernel.org/r/20221212130213.136267-1-david@redhat.com [1] Link: https://lkml.kernel.org/r/20230411142512.438404-2-david@redhat.com Signed-off-by: David Hildenbrand Cc: Anshuman Khandual Cc: David S. Miller Cc: Hugh Dickins Cc: Peter Xu Cc: Sam Ravnborg Cc: Shuah Khan Cc: Yu Zhao Signed-off-by: Andrew Morton commit 1e9460d132cc728941621f0f7a7b03a7d1c469af Author: Christoph Hellwig Date: Tue Apr 11 19:14:59 2023 +0200 zram: return errors from read_from_bdev_sync Propagate read errors to the caller instead of dropping them on the floor, and stop returning the somewhat dangerous 1 on success from read_from_bdev*. Link: https://lkml.kernel.org/r/20230411171459.567614-18-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Jens Axboe Signed-off-by: Andrew Morton commit 4e3c87b9421df497d849ae61aab9762de7f66afb Author: Christoph Hellwig Date: Tue Apr 11 19:14:58 2023 +0200 zram: fix synchronous reads Currently nothing waits for the synchronous reads before accessing the data. Switch them to an on-stack bio and submit_bio_wait to make sure the I/O has actually completed when the work item has been flushed. This also removes the call to page_endio that would unlock a page that has never been locked. Drop the partial_io/sync flag, as chaining only makes sense for the asynchronous reads of the entire page. Link: https://lkml.kernel.org/r/20230411171459.567614-17-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Jens Axboe Signed-off-by: Andrew Morton commit 0cd97a0372f21a66d1591114d0a12391e8d977d7 Author: Christoph Hellwig Date: Tue Apr 11 19:14:57 2023 +0200 zram: don't return errors from read_from_bdev_async bio_alloc will never return a NULL bio when it is allowed to sleep, and adding a single page to bio with a single vector also can't fail, so switch to the asserting __bio_add_page variant and drop the error returns. Link: https://lkml.kernel.org/r/20230411171459.567614-16-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Jens Axboe Signed-off-by: Andrew Morton commit fd45af53e220b2fe13a5e8db88c5e92bc3296754 Author: Christoph Hellwig Date: Tue Apr 11 19:14:56 2023 +0200 zram: pass a page to read_from_bdev read_from_bdev always reads a whole page, so pass a page to it instead of the bvec and remove the now pointless zram_bvec_read_from_bdev wrapper. Link: https://lkml.kernel.org/r/20230411171459.567614-15-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Jens Axboe Signed-off-by: Andrew Morton commit a0b81ae7a4ff8a779e9f16152563d614cb91f13c Author: Christoph Hellwig Date: Tue Apr 11 19:14:55 2023 +0200 zram: refactor zram_bdev_write Split the read/modify/write case into a separate helper. Link: https://lkml.kernel.org/r/20230411171459.567614-14-hch@lst.de Signed-off-by: Christoph Hellwig Acked-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Cc: Jens Axboe Signed-off-by: Andrew Morton commit 6aa4b839e7a481cc20b243168dc3333fc3d87eb0 Author: Christoph Hellwig Date: Tue Apr 11 19:14:54 2023 +0200 zram: don't pass a bvec to __zram_bvec_write __zram_bvec_write only extracts the page from __zram_bvec_write and always expects a full page of input. Pass the page directly instead of the bvec and rename the function to zram_write_page. Link: https://lkml.kernel.org/r/20230411171459.567614-13-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Jens Axboe Signed-off-by: Andrew Morton commit 889ae9169b45f0fc3fc05f93c3c6fa8a851eab67 Author: Christoph Hellwig Date: Tue Apr 11 19:14:53 2023 +0200 zram: refactor zram_bdev_read Split the partial read into a separate helper. Link: https://lkml.kernel.org/r/20230411171459.567614-12-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Jens Axboe Signed-off-by: Andrew Morton commit 79c744eeaa8eaa2d8fbb4f2c1edf292df7163c8a Author: Christoph Hellwig Date: Tue Apr 11 19:14:52 2023 +0200 zram: directly call zram_read_page in writeback_store writeback_store always reads a full page, so just call zram_read_page directly and bypass the boune buffer handling. Link: https://lkml.kernel.org/r/20230411171459.567614-11-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Jens Axboe Signed-off-by: Andrew Morton commit ffb0a9e66562083cc0fb0a93d2de85cecd23a0e8 Author: Christoph Hellwig Date: Tue Apr 11 19:14:51 2023 +0200 zram: rename __zram_bvec_read to zram_read_page __zram_bvec_read doesn't get passed a bvec, but always read a whole page. Rename it to make the usage more clear. Link: https://lkml.kernel.org/r/20230411171459.567614-10-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Jens Axboe Signed-off-by: Andrew Morton commit f575a5add8a9a3ca593e58e218f2113e5bd3e50e Author: Christoph Hellwig Date: Tue Apr 11 19:14:50 2023 +0200 zram: don't use highmem for the bounce buffer in zram_bvec_{read,write} There is no point in allocation a highmem page when we instantly need to copy from it. Link: https://lkml.kernel.org/r/20230411171459.567614-9-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Jens Axboe Signed-off-by: Andrew Morton commit 82ca875d2549f6843d0d16e897c9e1e0a13c8a74 Author: Christoph Hellwig Date: Tue Apr 11 19:14:49 2023 +0200 zram: refactor highlevel read and write handling Instead of having an outer loop in __zram_make_request and then branch out for reads vs writes for each loop iteration in zram_bvec_rw, split the main handler into separat zram_bio_read and zram_bio_write handlers that also include the functionality formerly in zram_bvec_rw. Link: https://lkml.kernel.org/r/20230411171459.567614-8-hch@lst.de Signed-off-by: Christoph Hellwig Acked-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Cc: Jens Axboe Signed-off-by: Andrew Morton commit 57de7bd830dae90301329748d60e196fab4c4125 Author: Christoph Hellwig Date: Tue Apr 11 19:14:48 2023 +0200 zram: return early on error in zram_bvec_rw When the low-level access fails, don't clear the idle flag or clear the caches, and just return. Link: https://lkml.kernel.org/r/20230411171459.567614-7-hch@lst.de Signed-off-by: Christoph Hellwig Acked-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Cc: Jens Axboe Signed-off-by: Andrew Morton commit d6eea0097e26769fb58c2773214c3bda85d1678a Author: Christoph Hellwig Date: Tue Apr 11 19:14:47 2023 +0200 zram: move discard handling to zram_submit_bio Switch on the bio operation in zram_submit_bio and only call into __zram_make_request for read and write operations. Link: https://lkml.kernel.org/r/20230411171459.567614-6-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Jens Axboe Signed-off-by: Andrew Morton commit af8b04c63708fa730c0257084fab91fb2a9cecc4 Author: Christoph Hellwig Date: Tue Apr 11 19:14:46 2023 +0200 zram: simplify bvec iteration in __zram_make_request bio_for_each_segment synthetize bvecs that never cross page boundaries, so don't duplicate that work in an inner loop. Link: https://lkml.kernel.org/r/20230411171459.567614-5-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Jens Axboe Signed-off-by: Andrew Morton commit 0120dd6e4e202e19a0e011e486fb2da40a5ea279 Author: Christoph Hellwig Date: Tue Apr 11 19:14:45 2023 +0200 zram: make zram_bio_discard more self-contained Derive the index and offset variables inside the function, and complete the bio directly in preparation for cleaning up the I/O path. Link: https://lkml.kernel.org/r/20230411171459.567614-4-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Jens Axboe Signed-off-by: Andrew Morton commit 9fe95babc7420722d39a1ded379027a1e1825d3a Author: Christoph Hellwig Date: Tue Apr 11 19:14:44 2023 +0200 zram: remove valid_io_request All bios hande to drivers from the block layer are checked against the device size and for logical block alignment already (and have been since long before zram was merged), so don't duplicate those checks. Link: https://lkml.kernel.org/r/20230411171459.567614-3-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Jens Axboe Signed-off-by: Andrew Morton commit a70aae12502b130b0c30dda44dff09e575c1aaeb Author: Christoph Hellwig Date: Tue Apr 11 19:14:43 2023 +0200 zram: always compile read_from_bdev_sync Patch series "zram I/O path cleanups and fixups", v3. This series cleans up the zram I/O path, and fixes the handling of synchronous I/O to the underlying device in the writeback_store function or for > 4K PAGE_SIZE systems. The fixes are at the end, as I could not fully reason about them being safe before untangling the callchain. This patch (of 17): read_from_bdev_sync is currently only compiled for non-4k PAGE_SIZE, which means it won't be built with the most common configurations. Replace the ifdef with a check for the PAGE_SIZE in an if instead. The check uses an extra symbol and IS_ENABLED to allow the compiler to eliminate the dead code, leading to the same generated code size: text data bss dec hex filename 16709 1428 12 18149 46e5 drivers/block/zram/zram_drv.o.old 16709 1428 12 18149 46e5 drivers/block/zram/zram_drv.o.new Link: https://lkml.kernel.org/r/20230411171459.567614-1-hch@lst.de Link: https://lkml.kernel.org/r/20230411171459.567614-2-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Sergey Senozhatsky Cc: Jens Axboe Cc: Minchan Kim Signed-off-by: Andrew Morton commit 3b7939c8e5345fb84309f2605a4b6f7ac8dd7fce Author: Peng Zhang Date: Tue Apr 11 12:10:05 2023 +0800 maple_tree: add a test case to check maple_alloc Add a test case to check whether the number of maple_alloc structures is actually equal to mas->alloc->total. Link: https://lkml.kernel.org/r/20230411041005.26205-2-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Cc: Liam R. Howlett Signed-off-by: Andrew Morton commit f6365881bf797c734bf4cf1353bfa59ffd444f8f Author: Tom Rix Date: Sat Apr 8 10:16:09 2023 -0400 mm: backing-dev: set variables dev_attr_min,max_bytes storage-class-specifier to static smatch reports mm/backing-dev.c:266:1: warning: symbol 'dev_attr_min_bytes' was not declared. Should it be static? mm/backing-dev.c:294:1: warning: symbol 'dev_attr_max_bytes' was not declared. Should it be static? These variables are only used in one file so should be static. Link: https://lkml.kernel.org/r/20230408141609.2703647-1-trix@redhat.com Signed-off-by: Tom Rix Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton commit fb20e99a74f8f08c53061e0186d0c26d546dc843 Author: Peng Zhang Date: Tue Apr 11 10:35:13 2023 +0800 maple_tree: use correct variable type in sizeof The type of variable pointed to by pivs is unsigned long, but the type used in sizeof is a pointer type. Change it to unsigned long. This change has no runtime effect, as sizeof(ul) == sizeof(ul *). Link: https://lkml.kernel.org/r/20230411023513.15227-1-zhangpeng.00@bytedance.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Peng Zhang Reported-by: David Binderman Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit d7be6d7eee1bbf98671d7a2c95654322241e2ae4 Author: ZhangPeng Date: Mon Apr 10 21:39:32 2023 +0800 userfaultfd: convert mfill_atomic() to use a folio Convert mfill_atomic_pte_copy(), shmem_mfill_atomic_pte() and mfill_atomic_pte() to take in a folio pointer. Convert mfill_atomic() to use a folio. Convert page_kaddr to kaddr in mfill_atomic(). Link: https://lkml.kernel.org/r/20230410133932.32288-7-zhangpeng362@huawei.com Signed-off-by: ZhangPeng Reviewed-by: Mike Kravetz Cc: Kefeng Wang Cc: Matthew Wilcox Cc: Muchun Song Cc: Nanyong Sun Cc: Sidhartha Kumar Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit c0e8150e144b62ae467520d0b51c4707c09e897b Author: ZhangPeng Date: Mon Apr 10 21:39:31 2023 +0800 mm: convert copy_user_huge_page() to copy_user_large_folio() Replace copy_user_huge_page() with copy_user_large_folio(). copy_user_large_folio() does the same as copy_user_huge_page(), but takes in folios instead of pages. Remove pages_per_huge_page from copy_user_large_folio(), because we can get that from folio_nr_pages(dst). Convert copy_user_gigantic_page() to take in folios. Link: https://lkml.kernel.org/r/20230410133932.32288-6-zhangpeng362@huawei.com Signed-off-by: ZhangPeng Cc: Kefeng Wang Cc: Matthew Wilcox Cc: Mike Kravetz Cc: Muchun Song Cc: Nanyong Sun Cc: Sidhartha Kumar Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 0169fd518a8934d8d723659752b07589ecc9f692 Author: ZhangPeng Date: Mon Apr 10 21:39:30 2023 +0800 userfaultfd: convert mfill_atomic_hugetlb() to use a folio Convert hugetlb_mfill_atomic_pte() to take in a folio pointer instead of a page pointer. Convert mfill_atomic_hugetlb() to use a folio. Link: https://lkml.kernel.org/r/20230410133932.32288-5-zhangpeng362@huawei.com Signed-off-by: ZhangPeng Reviewed-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: Kefeng Wang Cc: Matthew Wilcox Cc: Muchun Song Cc: Nanyong Sun Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit e87340ca5c9cecc8a11daf1a2dcabf23f06a4e10 Author: ZhangPeng Date: Mon Apr 10 21:39:29 2023 +0800 userfaultfd: convert copy_huge_page_from_user() to copy_folio_from_user() Replace copy_huge_page_from_user() with copy_folio_from_user(). copy_folio_from_user() does the same as copy_huge_page_from_user(), but takes in a folio instead of a page. Convert page_kaddr to kaddr in copy_folio_from_user() to do indenting cleanup. Link: https://lkml.kernel.org/r/20230410133932.32288-4-zhangpeng362@huawei.com Signed-off-by: ZhangPeng Reviewed-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: Kefeng Wang Cc: Matthew Wilcox Cc: Muchun Song Cc: Nanyong Sun Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 0d508c1f0e2c7cec76c141e9d2ebc3020d9e4be4 Author: ZhangPeng Date: Mon Apr 10 21:39:28 2023 +0800 userfaultfd: use kmap_local_page() in copy_huge_page_from_user() kmap() and kmap_atomic() are being deprecated in favor of kmap_local_page() which is appropriate for any thread local context.[1] Let's replace the kmap() and kmap_atomic() with kmap_local_page() in copy_huge_page_from_user(). When allow_pagefault is false, disable page faults to prevent potential deadlock.[2] [1] https://lore.kernel.org/all/20220813220034.806698-1-ira.weiny@intel.com/ [2] https://lkml.kernel.org/r/20221025220136.2366143-1-ira.weiny@intel.com Link: https://lkml.kernel.org/r/20230410133932.32288-3-zhangpeng362@huawei.com Signed-off-by: ZhangPeng Reviewed-by: Mike Kravetz Cc: Kefeng Wang Cc: Matthew Wilcox Cc: Muchun Song Cc: Nanyong Sun Cc: Sidhartha Kumar Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 07e6d4095c75bcf0bf511b36eecaceb3fbb91ad9 Author: ZhangPeng Date: Mon Apr 10 21:39:27 2023 +0800 userfaultfd: convert mfill_atomic_pte_copy() to use a folio Patch series "userfaultfd: convert userfaultfd functions to use folios", v6. This patch series converts several userfaultfd functions to use folios. This patch (of 6): Call vma_alloc_folio() directly instead of alloc_page_vma() and convert page_kaddr to kaddr in mfill_atomic_pte_copy(). Removes several calls to compound_head(). Link: https://lkml.kernel.org/r/20230410133932.32288-1-zhangpeng362@huawei.com Link: https://lkml.kernel.org/r/20230410133932.32288-2-zhangpeng362@huawei.com Signed-off-by: ZhangPeng Reviewed-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Cc: Kefeng Wang Cc: Matthew Wilcox Cc: Muchun Song Cc: Nanyong Sun Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit b4aca54792e76556bb9f8661bab07b4bf2eb4e5f Author: Steven Price Date: Wed Apr 5 11:38:19 2023 +0100 smaps: fix defined but not used smaps_shmem_walk_ops When !CONFIG_SHMEM smaps_shmem_walk_ops is defined but not used, triggering a compiler warning. To avoid the warning remove the #ifdef around the usage. This has no effect because shmem_mapping() is a stub returning false when !CONFIG_SHMEM so the code will be compiled out, however we now need to also provide a stub for shmem_swap_usage(). Link: https://lkml.kernel.org/r/20230405103819.151246-1-steven.price@arm.com Fixes: 7b86ac3371b7 ("pagewalk: separate function pointers from iterator data") Signed-off-by: Steven Price Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304031749.UiyJpxzF-lkp@intel.com/ Reviewed-by: Jason Gunthorpe Cc: Christoph Hellwig Cc: Alexey Dobriyan Cc: Thomas Hellström Signed-off-by: Andrew Morton commit 8666925c498674426de44ecba79fd8bf42d3cda3 Author: Vlastimil Babka Date: Wed Apr 5 16:28:40 2023 +0200 mm, page_alloc: use check_pages_enabled static key to check tail pages Commit 700d2e9a36b9 ("mm, page_alloc: reduce page alloc/free sanity checks") has introduced a new static key check_pages_enabled to control when struct pages are sanity checked during allocation and freeing. Mel Gorman suggested that free_tail_pages_check() could use this static key as well, instead of relying on CONFIG_DEBUG_VM. That makes sense, so do that. Also rename the function to free_tail_page_prepare() because it works on a single tail page and has a struct page preparation component as well as the optional checking component. Also remove some unnecessary unlikely() within static_branch_unlikely() statements that Mel pointed out for commit 700d2e9a36b9. Link: https://lkml.kernel.org/r/20230405142840.11068-1-vbabka@suse.cz Signed-off-by: Vlastimil Babka Suggested-by: Mel Gorman Acked-by: Mel Gorman Cc: Alexander Halbuer Cc: Kees Cook Signed-off-by: Andrew Morton commit 27da93d8e6d5633ac065c9316afc0f0240303c0a Author: David Hildenbrand Date: Wed Apr 5 18:02:36 2023 +0200 mm/userfaultfd: don't consider uffd-wp bit of writable migration entries If we end up with a writable migration entry that has the uffd-wp bit set, we already messed up: the source PTE/PMD was writable, which means we could have modified the page without notifying uffd first. Setting the uffd-wp bit always implies converting migration entries to !writable migration entries. Commit 8f34f1eac382 ("mm/userfaultfd: fix uffd-wp special cases for fork()") documents that "3. Forget to carry over uffd-wp bit for a write migration huge pmd entry", but it doesn't really say why that should be relevant. So let's remove that code to avoid hiding an eventual underlying issue (in the future, we might want to warn when creating writable migration entries that have the uffd-wp bit set -- or even better when turning a PTE writable that still has the uffd-wp bit set). This now matches the handling for hugetlb migration entries in hugetlb_change_protection(). In copy_huge_pmd()/copy_nonpresent_pte()/copy_hugetlb_page_range(), we still transfer the uffd-bit also for writable migration entries, but simply because we have unified handling for "writable" and "readable-exclusive" migration entries, and we care about transferring the uffd-wp bit for the latter. Link: https://lkml.kernel.org/r/20230405160236.587705-3-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Peter Xu Cc: Muhammad Usama Anjum Signed-off-by: Andrew Morton commit 2bd7f621130b47cab8bed82234cac1f9f105efb7 Author: Qi Zheng Date: Thu Apr 6 00:18:54 2023 +0800 mm: mlock: use folios_put() in mlock_folio_batch() Since we have updated mlock to use folios, it's better to call folios_put() instead of calling release_pages() directly. Link: https://lkml.kernel.org/r/20230405161854.6931-2-zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Acked-by: Mel Gorman Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit ddc65971bb677aa9f6a4c21f76d3133e106f88eb Author: Josh Triplett Date: Tue Apr 4 21:31:48 2023 +0900 prctl: add PR_GET_AUXV to copy auxv to userspace If a library wants to get information from auxv (for instance, AT_HWCAP/AT_HWCAP2), it has a few options, none of them perfectly reliable or ideal: - Be main or the pre-main startup code, and grub through the stack above main. Doesn't work for a library. - Call libc getauxval. Not ideal for libraries that are trying to be libc-independent and/or don't otherwise require anything from other libraries. - Open and read /proc/self/auxv. Doesn't work for libraries that may run in arbitrarily constrained environments that may not have /proc mounted (e.g. libraries that might be used by an init program or a container setup tool). - Assume you're on the main thread and still on the original stack, and try to walk the stack upwards, hoping to find auxv. Extremely bad idea. - Ask the caller to pass auxv in for you. Not ideal for a user-friendly library, and then your caller may have the same problem. Add a prctl that copies current->mm->saved_auxv to a userspace buffer. Link: https://lkml.kernel.org/r/d81864a7f7f43bca6afa2a09fc2e850e4050ab42.1680611394.git.josh@joshtriplett.org Signed-off-by: Josh Triplett Signed-off-by: Andrew Morton commit 97f7e09481f312b143db53cadbdfe81abac97e73 Author: Peng Zhang Date: Tue Mar 14 20:42:02 2023 +0800 maple_tree: simplify mas_wr_node_walk() Simplify code of mas_wr_node_walk() without changing functionality, and improve readability. Remove some special judgments. Instead of dynamically recording the min and max in the loop, get the final min and max directly at the end. Link: https://lkml.kernel.org/r/20230314124203.91572-3-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 9bc47f11525fb666a370063888904160188b024e Author: David Hildenbrand Date: Tue Apr 4 10:56:36 2023 +0200 m68k/mm: use correct bit number in _PAGE_SWP_EXCLUSIVE comment As noticed by Geert, commit b5c88f21531c ("microblaze/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE") modified m68k code by accident. While replacing 0x080 by CF_PAGE_NOCACHE is correct, although it should have been part of commit ed4154067a08 ("m68k/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE"), replacing "bit 7" by "bit 24" in the comment was wrong. Let's revert to the previous, correct, comment. Link: https://lkml.kernel.org/r/20230404085636.121409-1-david@redhat.com Signed-off-by: David Hildenbrand Reported-by: Geert Uytterhoeven Signed-off-by: Andrew Morton commit 92d5df38ca91f138d4964d71a6835add95f99e59 Author: ZhangPeng Date: Tue Apr 4 17:45:15 2023 +0800 mm/madvise: use vma_lookup() instead of find_vma() Using vma_lookup() verifies the address is contained in the found vma. This results in easier to read the code. Link: https://lkml.kernel.org/r/20230404094515.1883552-1-zhangpeng362@huawei.com Signed-off-by: ZhangPeng Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 6b0ba2abbeede5e1756d54277e811cf2783eb0a8 Author: Florian Schmidt Date: Tue Apr 4 10:58:59 2023 +0000 memcg v1: provide read access to memory.pressure_level cgroups v1 has a unique way of setting up memory pressure notifications: the user opens "memory.pressure_level" of the cgroup they want to monitor for pressure, then open "cgroup.event_control" and write the fd (among other things) to that file. memory.pressure_level has no other use, specifically it does not support any read or write operations. Consequently, no handlers are provided, and cgroup_file_mode() sets the permissions to 000. However, to actually use the mechanism, the subscribing user must have read access to the file and open the fd for reading, see memcg_write_event_control(). This is all fine as long as the subscribing process runs as root and is otherwise unconfined by further restrictions. However, if you add strict access controls such as selinux, the permission bits will be enforced, and opening memory.pressure_level for reading will fail, preventing the process from subscribing, even as root. To work around this issue, introduce a dummy read handler. When memory.pressure_level is created, cgroup_file_mode() will notice the existence of a handler, and therefore add read permissions to the file. Link: https://lkml.kernel.org/r/20230404105900.2005-1-flosch@nutanix.com Signed-off-by: Florian Schmidt Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Signed-off-by: Andrew Morton commit a2e17cc2efc72792c0d13d669d824fe9ab7155a1 Author: David Stevens Date: Tue Apr 4 21:01:17 2023 +0900 mm/khugepaged: maintain page cache uptodate flag Make sure that collapse_file doesn't interfere with checking the uptodate flag in the page cache by only inserting hpage into the page cache after it has been updated and marked uptodate. This is achieved by simply not replacing present pages with hpage when iterating over the target range. The present pages are already locked, so replacing them with the locked hpage before the collapse is finalized is unnecessary. However, it is necessary to stop freezing the present pages after validating them, since leaving long-term frozen pages in the page cache can lead to deadlocks. Simply checking the reference count is sufficient to ensure that there are no long-term references hanging around that would the collapse would break. Similar to hpage, there is no reason that the present pages actually need to be frozen in addition to being locked. This fixes a race where folio_seek_hole_data would mistake hpage for an fallocated but unwritten page. This race is visible to userspace via data temporarily disappearing from SEEK_DATA/SEEK_HOLE. This also fixes a similar race where pages could temporarily disappear from mincore. Link: https://lkml.kernel.org/r/20230404120117.2562166-5-stevensd@google.com Fixes: f3f0e1d2150b ("khugepaged: add support of collapse for tmpfs/shmem pages") Signed-off-by: David Stevens Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jiaqi Yan Cc: "Kirill A. Shutemov" Cc: Matthew Wilcox (Oracle) Cc: Peter Xu Cc: Yang Shi Signed-off-by: Andrew Morton commit ac492b9c70cac4d887e9dce4410b1d521851e142 Author: David Stevens Date: Tue Apr 4 21:01:16 2023 +0900 mm/khugepaged: skip shmem with userfaultfd Make sure that collapse_file respects any userfaultfds registered with MODE_MISSING. If userspace has any such userfaultfds registered, then for any page which it knows to be missing, it may expect a UFFD_EVENT_PAGEFAULT. This means collapse_file needs to be careful when collapsing a shmem range would result in replacing an empty page with a THP, to avoid breaking userfaultfd. Synchronization when checking for userfaultfds in collapse_file is tricky because the mmap locks can't be used to prevent races with the registration of new userfaultfds. Instead, we provide synchronization by ensuring that userspace cannot observe the fact that pages are missing before we check for userfaultfds. Although this allows registration of a userfaultfd to race with collapse_file, it ensures that userspace cannot observe any pages transition from missing to present after such a race occurs. This makes such a race indistinguishable to the collapse occurring immediately before the userfaultfd registration. The first step to provide this synchronization is to stop filling gaps during the loop iterating over the target range, since the page cache lock can be dropped during that loop. The second step is to fill the gaps with XA_RETRY_ENTRY after the page cache lock is acquired the final time, to avoid races with accesses to the page cache that only take the RCU read lock. The fact that we don't fill holes during the initial iteration means that collapse_file now has to handle faults occurring during the collapse. This is done by re-validating the number of missing pages after acquiring the page cache lock for the final time. This fix is targeted at khugepaged, but the change also applies to MADV_COLLAPSE. MADV_COLLAPSE on a range with a userfaultfd will now return EBUSY if there are any missing pages (instead of succeeding on shmem and returning EINVAL on anonymous memory). There is also now a window during MADV_COLLAPSE where a fault on a missing page will cause the syscall to fail with EAGAIN. The fact that intermediate page cache state can no longer be observed before the rollback of a failed collapse is also technically a userspace-visible change (via at least SEEK_DATA and SEEK_END), but it is exceedingly unlikely that anything relies on being able to observe that transient state. Link: https://lkml.kernel.org/r/20230404120117.2562166-4-stevensd@google.com Signed-off-by: David Stevens Acked-by: Peter Xu Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jiaqi Yan Cc: "Kirill A. Shutemov" Cc: Matthew Wilcox (Oracle) Cc: Yang Shi Signed-off-by: Andrew Morton commit cae106dd67b99a65d117a9f6c977a86b120dad61 Author: David Stevens Date: Tue Apr 4 21:01:15 2023 +0900 mm/khugepaged: refactor collapse_file control flow Add a rollback label to deal with failure, instead of continuously checking for RESULT_SUCCESS, to make it easier to add more failure cases. The refactoring also allows the collapse_file tracepoint to include hpage on success (instead of NULL). Link: https://lkml.kernel.org/r/20230404120117.2562166-3-stevensd@google.com Signed-off-by: David Stevens Acked-by: Peter Xu Reviewed-by: Yang Shi Acked-by: Hugh Dickins Cc: David Hildenbrand Cc: Jiaqi Yan Cc: "Kirill A. Shutemov" Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit efa3d814fad151ed5209539ecc1fc2880f7680b2 Author: David Stevens Date: Tue Apr 4 21:01:14 2023 +0900 mm/khugepaged: drain lru after swapping in shmem Patch series "mm/khugepaged: fixes for khugepaged+shmem", v6. This series reworks collapse_file so that the intermediate state of the collapse does not leak out of collapse_file. Although this makes collapse_file a bit more complicated, it means that the rest of the kernel doesn't have to deal with the unusual state. This directly fixes races with both lseek and mincore. This series also fixes the fact that khugepaged completely breaks userfaultfd+shmem. The rework of collapse_file provides a convenient place to check for registered userfaultfds without making the shmem userfaultfd implementation care about khugepaged. Finally, this series adds a lru_add_drain after swapping in shmem pages, which makes the subsequent folio_isolate_lru significantly more likely to succeed. This patch (of 4): Call lru_add_drain after swapping in shmem pages so that isolate_lru_page is more likely to succeed. Link: https://lkml.kernel.org/r/20230404120117.2562166-1-stevensd@google.com Link: https://lkml.kernel.org/r/20230404120117.2562166-2-stevensd@google.com Signed-off-by: David Stevens Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jiaqi Yan Cc: "Kirill A. Shutemov" Cc: Matthew Wilcox (Oracle) Cc: Peter Xu Cc: Yang Shi Signed-off-by: Andrew Morton commit 12904d953364e3bd21789a45137bf90df7cc78ee Author: Jiaqi Yan Date: Wed Mar 29 08:11:21 2023 -0700 mm/khugepaged: recover from poisoned file-backed memory Make collapse_file roll back when copying pages failed. More concretely: - extract copying operations into a separate loop - postpone the updates for nr_none until both scanning and copying succeeded - postpone joining small xarray entries until both scanning and copying succeeded - postpone the update operations to NR_XXX_THPS until both scanning and copying succeeded - for non-SHMEM file, roll back filemap_nr_thps_inc if scan succeeded but copying failed Tested manually: 0. Enable khugepaged on system under test. Mount tmpfs at /mnt/ramdisk. 1. Start a two-thread application. Each thread allocates a chunk of non-huge memory buffer from /mnt/ramdisk. 2. Pick 4 random buffer address (2 in each thread) and inject uncorrectable memory errors at physical addresses. 3. Signal both threads to make their memory buffer collapsible, i.e. calling madvise(MADV_HUGEPAGE). 4. Wait and then check kernel log: khugepaged is able to recover from poisoned pages by skipping them. 5. Signal both threads to inspect their buffer contents and make sure no data corruption. Link: https://lkml.kernel.org/r/20230329151121.949896-4-jiaqiyan@google.com Signed-off-by: Jiaqi Yan Reviewed-by: Yang Shi Acked-by: Hugh Dickins Cc: David Stevens Cc: Kefeng Wang Cc: Kirill A. Shutemov Cc: "Kirill A. Shutemov" Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Tong Tiangen Cc: Tony Luck Signed-off-by: Andrew Morton commit 6efc7afb5cc98488410d44695685d003d832534d Author: Jiaqi Yan Date: Wed Mar 29 08:11:20 2023 -0700 mm/hwpoison: introduce copy_mc_highpage Similar to how copy_mc_user_highpage is implemented for copy_user_highpage on #MC supported architecture, introduce the #MC handled version of copy_highpage. This helper has immediate usage when khugepaged wants to copy file-backed memory pages and tolerate #MC. Link: https://lkml.kernel.org/r/20230329151121.949896-3-jiaqiyan@google.com Signed-off-by: Jiaqi Yan Reviewed-by: Yang Shi Cc: David Stevens Cc: Hugh Dickins Cc: Kefeng Wang Cc: Kirill A. Shutemov Cc: "Kirill A. Shutemov" Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Tong Tiangen Cc: Tony Luck Signed-off-by: Andrew Morton commit 98c76c9f1ef7599b39bfd4bd99b8a760d4a8cd3b Author: Jiaqi Yan Date: Wed Mar 29 08:11:19 2023 -0700 mm/khugepaged: recover from poisoned anonymous memory Problem ======= Memory DIMMs are subject to multi-bit flips, i.e. memory errors. As memory size and density increase, the chances of and number of memory errors increase. The increasing size and density of server RAM in the data center and cloud have shown increased uncorrectable memory errors. There are already mechanisms in the kernel to recover from uncorrectable memory errors. This series of patches provides the recovery mechanism for the particular kernel agent khugepaged when it collapses memory pages. Impact ====== The main reason we chose to make khugepaged collapsing tolerant of memory failures was its high possibility of accessing poisoned memory while performing functionally optional compaction actions. Standard applications typically don't have strict requirements on the size of its pages. So they are given 4K pages by the kernel. The kernel is able to improve application performance by either 1) giving applications 2M pages to begin with, or 2) collapsing 4K pages into 2M pages when possible. This collapsing operation is done by khugepaged, a kernel agent that is constantly scanning memory. When collapsing 4K pages into a 2M page, it must copy the data from the 4K pages into a physically contiguous 2M page. Therefore, as long as there exists one poisoned cache line in collapsible 4K pages, khugepaged will eventually access it. The current impact to users is a machine check exception triggered kernel panic. However, khugepaged’s compaction operations are not functionally required kernel actions. Therefore making khugepaged tolerant to poisoned memory will greatly improve user experience. This patch series is for cases where khugepaged is the first guy that detects the memory errors on the poisoned pages. IOW, the pages are not known to have memory errors when khugepaged collapsing gets to them. In our observation, this happens frequently when the huge page ratio of the system is relatively low, which is fairly common in virtual machines running on cloud. Solution ======== As stated before, it is less desirable to crash the system only because khugepaged accesses poisoned pages while it is collapsing 4K pages. The high level idea of this patch series is to skip the group of pages (usually 512 4K-size pages) once khugepaged finds one of them is poisoned, as these pages have become ineligible to be collapsed. We are also careful to unwind operations khuagepaged has performed before it detects memory failures. For example, before copying and collapsing a group of anonymous pages into a huge page, the source pages will be isolated and their page table is unlinked from their PMD. These operations need to be undone in order to ensure these pages are not changed/lost from the perspective of other threads (both user and kernel space). As for file backed memory pages, there already exists a rollback case. This patch just extends it so that khugepaged also correctly rolls back when it fails to copy poisoned 4K pages. This patch (of 3): Make __collapse_huge_page_copy return whether copying anonymous pages succeeded, and make collapse_huge_page handle the return status. Break existing PTE scan loop into two for-loops. The first loop copies source pages into target huge page, and can fail gracefully when running into memory errors in source pages. If copying all pages succeeds, the second loop releases and clears up these normal pages. Otherwise, the second loop rolls back the page table and page states by: - re-establishing the original PTEs-to-PMD connection. - releasing source pages back to their LRU list. Tested manually: 0. Enable khugepaged on system under test. 1. Start a two-thread application. Each thread allocates a chunk of non-huge anonymous memory buffer. 2. Pick 4 random buffer locations (2 in each thread) and inject uncorrectable memory errors at corresponding physical addresses. 3. Signal both threads to make their memory buffer collapsible, i.e. calling madvise(MADV_HUGEPAGE). 4. Wait and check kernel log: khugepaged is able to recover from poisoned pages and skips collapsing them. 5. Signal both threads to inspect their buffer contents and make sure no data corruption. Link: https://lkml.kernel.org/r/20230329151121.949896-1-jiaqiyan@google.com Link: https://lkml.kernel.org/r/20230329151121.949896-2-jiaqiyan@google.com Signed-off-by: Jiaqi Yan Cc: David Stevens Cc: Hugh Dickins Cc: Kefeng Wang Cc: Kirill A. Shutemov Cc: "Kirill A. Shutemov" Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Tong Tiangen Cc: Tony Luck Cc: Yang Shi Signed-off-by: Andrew Morton commit f9d911ca49d7fb30dde4858f8751cf2534e78b47 Author: Yosry Ahmed Date: Thu Mar 30 19:18:01 2023 +0000 memcg: do not modify rstat tree for zero updates In some situations, we may end up calling memcg_rstat_updated() with a value of 0, which means the stat was not actually updated. An example is if we fail to reclaim any pages in shrink_folio_list(). Do not add the cgroup to the rstat updated tree in this case, to avoid unnecessarily flushing it. Link: https://lkml.kernel.org/r/20230330191801.1967435-9-yosryahmed@google.com Signed-off-by: Yosry Ahmed Acked-by: Shakeel Butt Acked-by: Johannes Weiner Acked-by: Michal Hocko Reviewed-by: Michal Koutný Cc: Jens Axboe Cc: Josef Bacik Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Tejun Heo Cc: Vasily Averin Cc: Zefan Li Signed-off-by: Andrew Morton commit 0d856cfedd6bc0cb8e19c1e70d400e79b655cfdd Author: Yosry Ahmed Date: Thu Mar 30 19:18:00 2023 +0000 vmscan: memcg: sleep when flushing stats during reclaim Memory reclaim is a sleepable context. Flushing is an expensive operaiton that scales with the number of cpus and the number of cgroups in the system, so avoid doing it atomically unnecessarily. This can slow down reclaim code if flushing stats is taking too long, but there is already multiple cond_resched()'s in reclaim code. Link: https://lkml.kernel.org/r/20230330191801.1967435-8-yosryahmed@google.com Signed-off-by: Yosry Ahmed Acked-by: Shakeel Butt Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Jens Axboe Cc: Josef Bacik Cc: Michal Hocko Cc: Michal Koutný Cc: Muchun Song Cc: Roman Gushchin Cc: Tejun Heo Cc: Vasily Averin Cc: Zefan Li Signed-off-by: Andrew Morton commit 4009b2f1887036d30637bc06dd0ade7e18408bb3 Author: Yosry Ahmed Date: Thu Mar 30 19:17:59 2023 +0000 workingset: memcg: sleep when flushing stats in workingset_refault() In workingset_refault(), we call mem_cgroup_flush_stats_atomic_ratelimited() to read accurate stats within an RCU read section and with sleeping disallowed. Move the call above the RCU read section to make it non-atomic. Flushing is an expensive operation that scales with the number of cpus and the number of cgroups in the system, so avoid doing it atomically where possible. Since workingset_refault() is the only caller of mem_cgroup_flush_stats_atomic_ratelimited(), just make it non-atomic, and rename it to mem_cgroup_flush_stats_ratelimited(). Link: https://lkml.kernel.org/r/20230330191801.1967435-7-yosryahmed@google.com Signed-off-by: Yosry Ahmed Acked-by: Shakeel Butt Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Jens Axboe Cc: Josef Bacik Cc: Michal Hocko Cc: Michal Koutný Cc: Muchun Song Cc: Roman Gushchin Cc: Tejun Heo Cc: Vasily Averin Cc: Zefan Li Signed-off-by: Andrew Morton commit 9fad9aee1f267a8ad1f86b87ae70b2c4d6796164 Author: Yosry Ahmed Date: Thu Mar 30 19:17:58 2023 +0000 memcg: sleep during flushing stats in safe contexts Currently, all contexts that flush memcg stats do so with sleeping not allowed. Some of these contexts are perfectly safe to sleep in, such as reading cgroup files from userspace or the background periodic flusher. Flushing is an expensive operation that scales with the number of cpus and the number of cgroups in the system, so avoid doing it atomically where possible. Refactor the code to make mem_cgroup_flush_stats() non-atomic (aka sleepable), and provide a separate atomic version. The atomic version is used in reclaim, refault, writeback, and in mem_cgroup_usage(). All other code paths are left to use the non-atomic version. This includes callbacks for userspace reads and the periodic flusher. Since refault is the only caller of mem_cgroup_flush_stats_ratelimited(), change it to mem_cgroup_flush_stats_atomic_ratelimited(). Reclaim and refault code paths are modified to do non-atomic flushing in separate later patches -- so it will eventually be changed back to mem_cgroup_flush_stats_ratelimited(). Link: https://lkml.kernel.org/r/20230330191801.1967435-6-yosryahmed@google.com Signed-off-by: Yosry Ahmed Acked-by: Shakeel Butt Acked-by: Michal Hocko Acked-by: Johannes Weiner Cc: Jens Axboe Cc: Josef Bacik Cc: Michal Hocko Cc: Michal Koutný Cc: Muchun Song Cc: Roman Gushchin Cc: Tejun Heo Cc: Vasily Averin Cc: Zefan Li Signed-off-by: Andrew Morton commit 3cd9992b93023cc5338423b3599eb987111e3ed5 Author: Yosry Ahmed Date: Thu Mar 30 19:17:57 2023 +0000 memcg: replace stats_flush_lock with an atomic As Johannes notes in [1], stats_flush_lock is currently used to: (a) Protect updated to stats_flush_threshold. (b) Protect updates to flush_next_time. (c) Serializes calls to cgroup_rstat_flush() based on those ratelimits. However: 1. stats_flush_threshold is already an atomic 2. flush_next_time is not atomic. The writer is locked, but the reader is lockless. If the reader races with a flush, you could see this: if (time_after(jiffies, flush_next_time)) spin_trylock() flush_next_time = now + delay flush() spin_unlock() spin_trylock() flush_next_time = now + delay flush() spin_unlock() which means we already can get flushes at a higher frequency than FLUSH_TIME during races. But it isn't really a problem. The reader could also see garbled partial updates if the compiler decides to split the write, so it needs at least READ_ONCE and WRITE_ONCE protection. 3. Serializing cgroup_rstat_flush() calls against the ratelimit factors is currently broken because of the race in 2. But the race is actually harmless, all we might get is the occasional earlier flush. If there is no delta, the flush won't do much. And if there is, the flush is justified. So the lock can be removed all together. However, the lock also served the purpose of preventing a thundering herd problem for concurrent flushers, see [2]. Use an atomic instead to serve the purpose of unifying concurrent flushers. [1]https://lore.kernel.org/lkml/20230323172732.GE739026@cmpxchg.org/ [2]https://lore.kernel.org/lkml/20210716212137.1391164-2-shakeelb@google.com/ Link: https://lkml.kernel.org/r/20230330191801.1967435-5-yosryahmed@google.com Signed-off-by: Yosry Ahmed Acked-by: Johannes Weiner Acked-by: Shakeel Butt Acked-by: Michal Hocko Cc: Jens Axboe Cc: Josef Bacik Cc: Michal Hocko Cc: Michal Koutný Cc: Muchun Song Cc: Roman Gushchin Cc: Tejun Heo Cc: Vasily Averin Cc: Zefan Li Signed-off-by: Andrew Morton commit a2174e95cce5e65ee49c60368434aaae944ff1af Author: Yosry Ahmed Date: Thu Mar 30 19:17:56 2023 +0000 memcg: do not flush stats in irq context Currently, the only context in which we can invoke an rstat flush from irq context is through mem_cgroup_usage() on the root memcg when called from memcg_check_events(). An rstat flush is an expensive operation that should not be done in irq context, so do not flush stats and use the stale stats in this case. Arguably, usage threshold events are not reliable on the root memcg anyway since its usage is ill-defined. Link: https://lkml.kernel.org/r/20230330191801.1967435-4-yosryahmed@google.com Signed-off-by: Yosry Ahmed Suggested-by: Johannes Weiner Suggested-by: Shakeel Butt Acked-by: Shakeel Butt Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Jens Axboe Cc: Josef Bacik Cc: Michal Hocko Cc: Michal Koutný Cc: Muchun Song Cc: Roman Gushchin Cc: Tejun Heo Cc: Vasily Averin Cc: Zefan Li Signed-off-by: Andrew Morton commit 92fbbc7202ac4fb16250dc91c88211814ae2190b Author: Yosry Ahmed Date: Thu Mar 30 19:17:55 2023 +0000 memcg: rename mem_cgroup_flush_stats_"delayed" to "ratelimited" mem_cgroup_flush_stats_delayed() suggests his is using a delayed_work, but this is actually sometimes flushing directly from the callsite. What it's doing is ratelimited calls. A better name would be mem_cgroup_flush_stats_ratelimited(). Link: https://lkml.kernel.org/r/20230330191801.1967435-3-yosryahmed@google.com Signed-off-by: Yosry Ahmed Suggested-by: Johannes Weiner Acked-by: Shakeel Butt Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Jens Axboe Cc: Josef Bacik Cc: Michal Hocko Cc: Michal Koutný Cc: Muchun Song Cc: Roman Gushchin Cc: Tejun Heo Cc: Vasily Averin Cc: Zefan Li Signed-off-by: Andrew Morton commit 8bff9a04ca33476213ea6155850505787c540c25 Author: Yosry Ahmed Date: Thu Mar 30 19:17:54 2023 +0000 cgroup: rename cgroup_rstat_flush_"irqsafe" to "atomic" Patch series "memcg: avoid flushing stats atomically where possible", v3. rstat flushing is an expensive operation that scales with the number of cpus and the number of cgroups in the system. The purpose of this series is to minimize the contexts where we flush stats atomically. Patches 1 and 2 are cleanups requested during reviews of prior versions of this series. Patch 3 makes sure we never try to flush from within an irq context. Patches 4 to 7 introduce separate variants of mem_cgroup_flush_stats() for atomic and non-atomic flushing, and make sure we only flush the stats atomically when necessary. Patch 8 is a slightly tangential optimization that limits the work done by rstat flushing in some scenarios. This patch (of 8): cgroup_rstat_flush_irqsafe() can be a confusing name. It may read as "irqs are disabled throughout", which is what the current implementation does (currently under discussion [1]), but is not the intention. The intention is that this function is safe to call from atomic contexts. Name it as such. Link: https://lkml.kernel.org/r/20230330191801.1967435-1-yosryahmed@google.com Link: https://lkml.kernel.org/r/20230330191801.1967435-2-yosryahmed@google.com Signed-off-by: Yosry Ahmed Suggested-by: Johannes Weiner Acked-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Jens Axboe Cc: Josef Bacik Cc: Michal Hocko Cc: Michal Koutný Cc: Muchun Song Cc: Roman Gushchin Cc: Tejun Heo Cc: Vasily Averin Cc: Zefan Li Cc: Michal Hocko Signed-off-by: Andrew Morton commit 1ba3cbf3ec3b21d866436fb46b4bb7bdc38608f9 Author: Peng Zhang Date: Mon Apr 3 20:27:38 2023 +0800 mm: kfence: improve the performance of __kfence_alloc() and __kfence_free() In __kfence_alloc() and __kfence_free(), we will set and check canary. Assuming that the size of the object is close to 0, nearly 4k memory accesses are required because setting and checking canary is executed byte by byte. canary is now defined like this: KFENCE_CANARY_PATTERN(addr) ((u8)0xaa ^ (u8)((unsigned long)(addr) & 0x7)) Observe that canary is only related to the lower three bits of the address, so every 8 bytes of canary are the same. We can access 8-byte canary each time instead of byte-by-byte, thereby optimizing nearly 4k memory accesses to 4k/8 times. Use the bcc tool funclatency to measure the latency of __kfence_alloc() and __kfence_free(), the numbers (deleted the distribution of latency) is posted below. Though different object sizes will have an impact on the measurement, we ignore it for now and assume the average object size is roughly equal. Before patching: __kfence_alloc: avg = 5055 nsecs, total: 5515252 nsecs, count: 1091 __kfence_free: avg = 5319 nsecs, total: 9735130 nsecs, count: 1830 After patching: __kfence_alloc: avg = 3597 nsecs, total: 6428491 nsecs, count: 1787 __kfence_free: avg = 3046 nsecs, total: 3415390 nsecs, count: 1121 The numbers indicate that there is ~30% - ~40% performance improvement. Link: https://lkml.kernel.org/r/20230403122738.6006-1-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Signed-off-by: Andrew Morton commit 141fdeececb3d7b782ea7361a22659775d53bc2a Author: Liu Shixin Date: Mon Apr 3 20:13:18 2023 +0800 mm/zswap: delay the initialization of zswap Since some users may not use zswap, the zswap_pool is wasted. Save memory by delaying the initialization of zswap until enabled. [liushixin2@huawei.com: fix some pattern problem suggested by Christoph] Link: https://lkml.kernel.org/r/20230411093632.822290-4-liushixin2@huawei.com Link: https://lkml.kernel.org/r/20230403121318.1876082-4-liushixin2@huawei.com Signed-off-by: Liu Shixin Reviewed-by: Christoph Hellwig Cc: Dan Streetman Cc: Nathan Chancellor Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton commit 9021ccec60f2d86b84080a7e262c91ea99495eaa Author: Liu Shixin Date: Mon Apr 3 20:13:17 2023 +0800 mm/zswap: replace zswap_init_{started/failed} with zswap_init_state The zswap_init_started variable name has a bit confusing. Actually, there are three state: uninitialized, initial failed and initial succeed. Add a new variable zswap_init_state to replace zswap_init_{started/failed}. Link: https://lkml.kernel.org/r/20230403121318.1876082-3-liushixin2@huawei.com Signed-off-by: Liu Shixin Reviewed-by: Christoph Hellwig Cc: Dan Streetman Cc: Nathan Chancellor Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton commit b791912252716168697a258bd8bbf579296ba438 Author: Liu Shixin Date: Mon Apr 3 20:13:16 2023 +0800 mm/zswap: remove zswap_entry_cache_{create,destroy} helper function Patch series "Delay the initialization of zswap", v9. In the initialization of zswap, about 18MB memory will be allocated for zswap_pool. Since some users may not use zswap, the zswap_pool is wasted. Save memory by delaying the initialization of zswap until enabled. This patch (of 3): Remove zswap_entry_cache_create and zswap_entry_cache_destroy and use kmem_cache_* function directly. Link: https://lkml.kernel.org/r/20230411093632.822290-1-liushixin2@huawei.com Link: https://lkml.kernel.org/r/20230403121318.1876082-1-liushixin2@huawei.com Link: https://lkml.kernel.org/r/20230403121318.1876082-2-liushixin2@huawei.com Signed-off-by: Liu Shixin Reviewed-by: Christoph Hellwig Cc: Dan Streetman Cc: Nathan Chancellor Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton commit fa1c77c13ca59101c4fbf0ff8bbadd3aaba375f8 Author: Uladzislau Rezki (Sony) Date: Fri Mar 31 09:37:27 2023 +0200 mm: vmalloc: rename addr_to_vb_xarray() function Short the name of the addr_to_vb_xarray() function to the addr_to_vb_xa(). This aligns with other internal function abbreviations. Link: https://lkml.kernel.org/r/20230331073727.6968-1-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Suggested-by: Baoquan He Reviewed-by: Baoquan He Reviewed-by: Lorenzo Stoakes Cc: Christoph Hellwig Cc: Dave Chinner Cc: Matthew Wilcox (Oracle) Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton commit 27d9a0fdb53f05c93ed9c674b870c8add451697e Author: Hao Ge Date: Thu Mar 30 14:09:04 2023 +0800 kmemleak-test: fix kmemleak_test.c build logic kmemleak-test.c was moved to the samples directory in 1abbef4f51724 ("mm,kmemleak-test.c: move kmemleak-test.c to samples dir"). If CONFIG_DEBUG_KMEMLEAK_TEST=m and CONFIG_SAMPLES is unset, kmemleak-test.c will be unnecessarily compiled. So move the entry for CONFIG_DEBUG_KMEMLEAK_TEST from mm/Kconfig and add a new CONFIG_SAMPLE_KMEMLEAK in samples/ to control whether kmemleak-test.c is built or not. Link: https://lkml.kernel.org/r/20230330060904.292975-1-gehao@kylinos.cn Fixes: 1abbef4f51724 ("mm,kmemleak-test.c: move kmemleak-test.c to samples dir") Signed-off-by: Hao Ge Cc: Catalin Marinas Cc: Alex Gaynor Cc: Alex Williamson Cc: Arnd Bergmann Cc: Finn Behrens Cc: Greg Kroah-Hartman Cc: Jason Gunthorpe Cc: Mark Rutland Cc: Miguel Ojeda Cc: Tony Krowiak Cc: Ye Xingchen Signed-off-by: Andrew Morton commit 869cb29a61a14bbc52e7bc8b18e8810874caf320 Author: Uladzislau Rezki (Sony) Date: Thu Mar 30 21:06:39 2023 +0200 lib/test_vmalloc.c: add vm_map_ram()/vm_unmap_ram() test case Add vm_map_ram()/vm_unmap_ram() test case to our stress test-suite. [akpm@linux-foundation.org: fix whitespace, per Lorenzo] Link: https://lkml.kernel.org/r/20230330190639.431589-2-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Lorenzo Stoakes Reviewed-by: Baoquan He Cc: Christoph Hellwig Cc: Dave Chinner Cc: Matthew Wilcox (Oracle) Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton commit 062eacf57ad91b5c272f89dc964fd6dd9715ea7d Author: Uladzislau Rezki (Sony) Date: Thu Mar 30 21:06:38 2023 +0200 mm: vmalloc: remove a global vmap_blocks xarray A global vmap_blocks-xarray array can be contented under heavy usage of the vm_map_ram()/vm_unmap_ram() APIs. The lock_stat shows that a "vmap_blocks.xa_lock" lock is a second in a top-list when it comes to contentions: ---------------------------------------- class name con-bounces contentions ... ---------------------------------------- vmap_area_lock: 2554079 2554276 ... -------------- vmap_area_lock 1297948 [<00000000dd41cbaa>] alloc_vmap_area+0x1c7/0x910 vmap_area_lock 1256330 [<000000009d927bf3>] free_vmap_block+0x4a/0xe0 vmap_area_lock 1 [<00000000c95c05a7>] find_vm_area+0x16/0x70 -------------- vmap_area_lock 1738590 [<00000000dd41cbaa>] alloc_vmap_area+0x1c7/0x910 vmap_area_lock 815688 [<000000009d927bf3>] free_vmap_block+0x4a/0xe0 vmap_area_lock 1 [<00000000c1d619d7>] __get_vm_area_node+0xd2/0x170 vmap_blocks.xa_lock: 862689 862698 ... ------------------- vmap_blocks.xa_lock 378418 [<00000000625a5626>] vm_map_ram+0x359/0x4a0 vmap_blocks.xa_lock 484280 [<00000000caa2ef03>] xa_erase+0xe/0x30 ------------------- vmap_blocks.xa_lock 576226 [<00000000caa2ef03>] xa_erase+0xe/0x30 vmap_blocks.xa_lock 286472 [<00000000625a5626>] vm_map_ram+0x359/0x4a0 ... that is a result of running vm_map_ram()/vm_unmap_ram() in a loop. The test creates 64(on 64 CPUs system) threads and each one maps/unmaps 1 page. After this change the "xa_lock" can be considered as a noise in the same test condition: ... &xa->xa_lock#1: 10333 10394 ... -------------- &xa->xa_lock#1 5349 [<00000000bbbc9751>] xa_erase+0xe/0x30 &xa->xa_lock#1 5045 [<0000000018def45d>] vm_map_ram+0x3a4/0x4f0 -------------- &xa->xa_lock#1 7326 [<0000000018def45d>] vm_map_ram+0x3a4/0x4f0 &xa->xa_lock#1 3068 [<00000000bbbc9751>] xa_erase+0xe/0x30 ... Running the test_vmalloc.sh run_test_mask=1024 nr_threads=64 nr_pages=5 shows around ~8 percent of throughput improvement of vm_map_ram() and vm_unmap_ram() APIs. This patch does not fix vmap_area_lock/free_vmap_area_lock and purge_vmap_area_lock bottle-necks, it is rather a separate rework. Link: https://lkml.kernel.org/r/20230330190639.431589-1-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Lorenzo Stoakes Reviewed-by: Baoquan He Cc: Christoph Hellwig Cc: Dave Chinner Cc: Matthew Wilcox (Oracle) Cc: Oleksiy Avramchenko Signed-off-by: Andrew Morton commit 62f31bd4dcedffe3c919deb76ed65bf62c3cf80b Author: Mike Rapoport (IBM) Date: Sun Mar 26 19:02:15 2023 +0300 mm: move free_area_empty() to mm/internal.h The free_area_empty() helper is only used inside mm/ so move it there to reduce noise in include/linux/mmzone.h Link: https://lkml.kernel.org/r/20230326160215.2674531-1-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Suggested-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit e961cc5652c68610d8acb65f20267b8c55444e5b Author: Zhen Lei Date: Mon Mar 27 11:41:49 2023 +0800 kmsan: fix a stale comment in kmsan_save_stack_with_flags() After commit 446ec83805dd ("mm/page_alloc: use might_alloc()") and commit 84172f4bb752 ("mm/page_alloc: combine __alloc_pages and __alloc_pages_nodemask"), the comment is no longer accurate. Flag '__GFP_DIRECT_RECLAIM' is clear enough on its own, so remove the comment rather than update it. Link: https://lkml.kernel.org/r/20230327034149.942-1-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit 957ebbdf434013ee01f29f6c9174eced995ebbe7 Author: Matthew Wilcox (Oracle) Date: Mon Mar 27 16:10:50 2023 +0100 hugetlb: remove PageHeadHuge() Sidhartha Kumar removed the last caller of PageHeadHuge(), so we can now remove it and make folio_test_hugetlb() the real implementation. Add kernel-doc for folio_test_hugetlb(). Link: https://lkml.kernel.org/r/20230327151050.1787744-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Sidhartha Kumar Reviewed-by: Mike Kravetz Reviewed-by: David Hildenbrand Reviewed-by: Muchun Song Signed-off-by: Andrew Morton commit 4519a254e0170c5d9d0b1054f045ec1f436c6336 Author: Mike Rapoport (IBM) Date: Fri Mar 24 08:22:33 2023 +0300 xtensa: reword ARCH_FORCE_MAX_ORDER prompt and help text The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option. Update both to actually describe what this option does. Link: https://lkml.kernel.org/r/20230324052233.2654090-15-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: Max Filippov Acked-by: Kirill A. Shutemov Reviewed-by: Zi Yan Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Christophe Leroy Cc: David Miller Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: John Paul Adrian Glaubitz Cc: Michael Ellerman Cc: Rich Felker Cc: "Russell King (Oracle)" Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 8def4c058fe1a560b2e68e98a824b44e7e012024 Author: Mike Rapoport (IBM) Date: Fri Mar 24 08:22:32 2023 +0300 sparc: reword ARCH_FORCE_MAX_ORDER prompt and help text The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option. Update both to actually describe what this option does. Link: https://lkml.kernel.org/r/20230324052233.2654090-14-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: Kirill A. Shutemov Reviewed-by: Zi Yan Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Christophe Leroy Cc: David Miller Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: John Paul Adrian Glaubitz Cc: Max Filippov Cc: Michael Ellerman Cc: Rich Felker Cc: "Russell King (Oracle)" Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 0495408240c97429cb2d21c6aca717baacb9199f Author: Mike Rapoport (IBM) Date: Fri Mar 24 08:22:31 2023 +0300 sh: drop ranges for definition of ARCH_FORCE_MAX_ORDER sh defines insane ranges for ARCH_FORCE_MAX_ORDER allowing MAX_ORDER up to 63, which implies maximal contiguous allocation size of 2^63 pages. Drop bogus definitions of ranges for ARCH_FORCE_MAX_ORDER and leave it a simple integer with sensible defaults. Users that *really* need to change the value of ARCH_FORCE_MAX_ORDER will be able to do so but they won't be mislead by the bogus ranges. [rppt@kernel.org: untweak ARCH_FORCE_MAX_ORDER's `range'] Link: https://lkml.kernel.org/r/20230325060828.2662773-13-rppt@kernel.org Link: https://lkml.kernel.org/r/20230324052233.2654090-13-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: Kirill A. Shutemov Reviewed-by: Zi Yan Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Christophe Leroy Cc: David Miller Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: John Paul Adrian Glaubitz Cc: Max Filippov Cc: Michael Ellerman Cc: Rich Felker Cc: "Russell King (Oracle)" Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit b2a37fb2b54fd46bfa799268717f558d9e168376 Author: Mike Rapoport (IBM) Date: Fri Mar 24 08:22:30 2023 +0300 sh: reword ARCH_FORCE_MAX_ORDER prompt and help text The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option. Update both to actually describe what this option does. [rppt@kernel.org: tweak ARCH_FORCE_MAX_ORDER's `range'] Link: https://lkml.kernel.org/r/20230325060828.2662773-12-rppt@kernel.org Link: https://lkml.kernel.org/r/20230324052233.2654090-12-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: Kirill A. Shutemov Reviewed-by: Zi Yan Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Christophe Leroy Cc: David Miller Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: John Paul Adrian Glaubitz Cc: Max Filippov Cc: Michael Ellerman Cc: Rich Felker Cc: "Russell King (Oracle)" Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 1e8fed873e7499bab8da05b2006f6a3960796c68 Author: Mike Rapoport (IBM) Date: Fri Mar 24 08:22:29 2023 +0300 powerpc: drop ranges for definition of ARCH_FORCE_MAX_ORDER PowerPC defines ranges for ARCH_FORCE_MAX_ORDER some of which are insanely allowing MAX_ORDER up to 63, which implies maximal contiguous allocation size of 2^63 pages. Drop bogus definitions of ranges for ARCH_FORCE_MAX_ORDER and leave it a simple integer with sensible defaults. Users that *really* need to change the value of ARCH_FORCE_MAX_ORDER will be able to do so but they won't be mislead by the bogus ranges. Link: https://lkml.kernel.org/r/20230324052233.2654090-11-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: Kirill A. Shutemov Reviewed-by: Zi Yan Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Christophe Leroy Cc: David Miller Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: John Paul Adrian Glaubitz Cc: Max Filippov Cc: Michael Ellerman Cc: Rich Felker Cc: "Russell King (Oracle)" Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 6fc54303aa2597e30558cdbd310d45070c9a0325 Author: Mike Rapoport (IBM) Date: Fri Mar 24 08:22:28 2023 +0300 powerpc: reword ARCH_FORCE_MAX_ORDER prompt and help text The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option. Update both to actually describe what this option does. Link: https://lkml.kernel.org/r/20230324052233.2654090-10-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: Kirill A. Shutemov Reviewed-by: Zi Yan Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Christophe Leroy Cc: David Miller Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: John Paul Adrian Glaubitz Cc: Max Filippov Cc: Michael Ellerman Cc: Rich Felker Cc: "Russell King (Oracle)" Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 482f7b7652b0aa2d39bd721f3bf3b664b4d75bb5 Author: Mike Rapoport (IBM) Date: Fri Mar 24 08:22:27 2023 +0300 nios2: drop ranges for definition of ARCH_FORCE_MAX_ORDER nios2 defines range for ARCH_FORCE_MAX_ORDER allowing MAX_ORDER up to 19, which implies maximal contiguous allocation size of 2^19 pages or 2GiB. Drop bogus definition of ranges for ARCH_FORCE_MAX_ORDER and leave it a simple integer with sensible default. Users that *really* need to change the value of ARCH_FORCE_MAX_ORDER will be able to do so but they won't be mislead by the bogus ranges. Link: https://lkml.kernel.org/r/20230324052233.2654090-9-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: Kirill A. Shutemov Reviewed-by: Zi Yan Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Christophe Leroy Cc: David Miller Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: John Paul Adrian Glaubitz Cc: Max Filippov Cc: Michael Ellerman Cc: Rich Felker Cc: "Russell King (Oracle)" Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 5646e83d6ae6f41d999b365d7d555fcdbcabc82b Author: Mike Rapoport (IBM) Date: Fri Mar 24 08:22:26 2023 +0300 nios2: reword ARCH_FORCE_MAX_ORDER prompt and help text The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option. Update both to actually describe what this option does. Link: https://lkml.kernel.org/r/20230324052233.2654090-8-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: Kirill A. Shutemov Reviewed-by: Zi Yan Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Christophe Leroy Cc: David Miller Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: John Paul Adrian Glaubitz Cc: Max Filippov Cc: Michael Ellerman Cc: Rich Felker Cc: "Russell King (Oracle)" Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 7a5b272e0b17bcb431b5bc1d46d369871c391837 Author: Mike Rapoport (IBM) Date: Fri Mar 24 08:22:25 2023 +0300 m68k: reword ARCH_FORCE_MAX_ORDER prompt and help text The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option. Update both to actually describe what this option does. Link: https://lkml.kernel.org/r/20230324052233.2654090-7-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: Kirill A. Shutemov Acked-by: Geert Uytterhoeven Reviewed-by: Zi Yan Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Christophe Leroy Cc: David Miller Cc: Dinh Nguyen Cc: Guo Ren Cc: John Paul Adrian Glaubitz Cc: Max Filippov Cc: Michael Ellerman Cc: Rich Felker Cc: "Russell King (Oracle)" Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 9d0f7a5780ef83e6e31581f90e73df9062d34470 Author: Mike Rapoport (IBM) Date: Fri Mar 24 08:22:24 2023 +0300 ia64: don't allow users to override ARCH_FORCE_MAX_ORDER It is enough to keep default values for base and huge pages without letting users to override ARCH_FORCE_MAX_ORDER. Drop the prompt to make the option unvisible in *config. Link: https://lkml.kernel.org/r/20230324052233.2654090-6-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: Kirill A. Shutemov Reviewed-by: Zi Yan Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Christophe Leroy Cc: David Miller Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: John Paul Adrian Glaubitz Cc: Max Filippov Cc: Michael Ellerman Cc: Rich Felker Cc: "Russell King (Oracle)" Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 4e7c8655ab577e24ac2c6a26292be9d837679f69 Author: Mike Rapoport (IBM) Date: Fri Mar 24 08:22:23 2023 +0300 csky: drop ARCH_FORCE_MAX_ORDER The default value of ARCH_FORCE_MAX_ORDER matches the generic default defined in the MM code, the architecture does not support huge pages, so there is no need to keep ARCH_FORCE_MAX_ORDER option available. Drop it. Link: https://lkml.kernel.org/r/20230324052233.2654090-5-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: Kirill A. Shutemov Reviewed-by: Zi Yan Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Christophe Leroy Cc: David Miller Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: John Paul Adrian Glaubitz Cc: Max Filippov Cc: Michael Ellerman Cc: Rich Felker Cc: "Russell King (Oracle)" Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 4632cb22ac26e9e6e4ad651fb53f25f0b78c2889 Author: Mike Rapoport (IBM) Date: Fri Mar 24 08:22:22 2023 +0300 arm64: reword ARCH_FORCE_MAX_ORDER prompt and help text The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option. Update both to actually describe what this option does. [rppt@kernel.org: change ARCH_FORCE_MAX_ORDER dependencies] Link: https://lkml.kernel.org/r/20230325060828.2662773-4-rppt@kernel.org Link: https://lkml.kernel.org/r/20230324052233.2654090-4-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: Kirill A. Shutemov Reviewed-by: Zi Yan Reviewed-by: Kefeng Wang Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Christophe Leroy Cc: David Miller Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: John Paul Adrian Glaubitz Cc: Max Filippov Cc: Michael Ellerman Cc: Rich Felker Cc: "Russell King (Oracle)" Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 34affcd7577a232803f729d1870ba475f294e4ea Author: Mike Rapoport (IBM) Date: Fri Mar 24 08:22:21 2023 +0300 arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER It is not a good idea to change fundamental parameters of core memory management. Having predefined ranges suggests that the values within those ranges are sensible, but one has to *really* understand implications of changing MAX_ORDER before actually amending it and ranges don't help here. Drop ranges in definition of ARCH_FORCE_MAX_ORDER and make its prompt visible only if EXPERT=y Link: https://lkml.kernel.org/r/20230324052233.2654090-3-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: Zi Yan Reviewed-by: Kefeng Wang Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Christophe Leroy Cc: David Miller Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: John Paul Adrian Glaubitz Cc: Kirill A. Shutemov Cc: Max Filippov Cc: Michael Ellerman Cc: Rich Felker Cc: "Russell King (Oracle)" Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 8c907785b8cc6dff2b9dda52e499715b0c64f377 Author: Mike Rapoport (IBM) Date: Fri Mar 24 08:22:20 2023 +0300 arm: reword ARCH_FORCE_MAX_ORDER prompt and help text Patch series "arch,mm: cleanup Kconfig entries for ARCH_FORCE_MAX_ORDER", v3. Several architectures have ARCH_FORCE_MAX_ORDER in their Kconfig and they all have wrong and misleading prompt and help text for this option. Besides, some define insane limits for possible values of ARCH_FORCE_MAX_ORDER, some carefully define ranges only for a subset of possible configurations, some make this option configurable by users for no good reason. This set updates the prompt and help text everywhere and does its best to update actual definitions of ranges where applicable. kbuild generated a bunch of false positives because it assigns -1 to ARCH_FORCE_MAX_ORDER, hopefully this will be fixed soon. This patch (of 14): The prompt and help text of ARCH_FORCE_MAX_ORDER are not even close to describe this configuration option. Update both to actually describe what this option does. Link: https://lkml.kernel.org/r/20230325060828.2662773-1-rppt@kernel.org Link: https://lkml.kernel.org/r/20230324052233.2654090-1-rppt@kernel.org Link: https://lkml.kernel.org/r/20230324052233.2654090-2-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: Kirill A. Shutemov Reviewed-by: Zi Yan Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Christophe Leroy Cc: David Miller Cc: Dinh Nguyen Cc: Geert Uytterhoeven Cc: Guo Ren Cc: John Paul Adrian Glaubitz Cc: Max Filippov Cc: Michael Ellerman Cc: Rich Felker Cc: "Russell King (Oracle)" Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit 6a792697a53af5b3028aa2918b40677effbc349f Author: Michal Hocko Date: Fri Mar 17 14:44:48 2023 +0100 memcg: do not drain charge pcp caches on remote isolated cpus Leonardo Bras has noticed that pcp charge cache draining might be disruptive on workloads relying on 'isolated cpus', a feature commonly used on workloads that are sensitive to interruption and context switching such as vRAN and Industrial Control Systems. There are essentially two ways how to approach the issue. We can either allow the pcp cache to be drained on a different rather than a local cpu or avoid remote flushing on isolated cpus. The current pcp charge cache is really optimized for high performance and it always relies to stick with its cpu. That means it only requires local_lock (preempt_disable on !RT) and draining is handed over to pcp WQ to drain locally again. The former solution (remote draining) would require to add an additional locking to prevent local charges from racing with the draining. This adds an atomic operation to otherwise simple arithmetic fast path in the try_charge path. Another concern is that the remote draining can cause a lock contention for the isolated workloads and therefore interfere with it indirectly via user space interfaces. Another option is to avoid draining scheduling on isolated cpus altogether. That means that those remote cpus would keep their charges even after drain_all_stock returns. This is certainly not optimal either but it shouldn't really cause any major problems. In the worst case (many isolated cpus with charges - each of them with MEMCG_CHARGE_BATCH i.e 64 page) the memory consumption of a memcg would be artificially higher than can be immediately used from other cpus. Theoretically a memcg OOM killer could be triggered pre-maturely. Currently it is not really clear whether this is a practical problem though. Tight memcg limit would be really counter productive to cpu isolated workloads pretty much by definition because any memory reclaimed induced by memcg limit could break user space timing expectations as those usually expect execution in the userspace most of the time. Also charges could be left behind on memcg removal. Any future charge on those isolated cpus will drain that pcp cache so this won't be a permanent leak. Considering cons and pros of both approaches this patch is implementing the second option and simply do not schedule remote draining if the target cpu is isolated. This solution is much more simpler. It doesn't add any new locking and it is more more predictable from the user space POV. Should the pre-mature memcg OOM become a real life problem, we can revisit this decision. [akpm@linux-foundation.org: memcontrol.c needs sched/isolation.h] Link: https://lore.kernel.org/oe-kbuild-all/202303180617.7E3aIlHf-lkp@intel.com/ Link: https://lkml.kernel.org/r/20230317134448.11082-3-mhocko@kernel.org Signed-off-by: Michal Hocko Suggested-by: Roman Gushchin Acked-by: Roman Gushchin Reported-by: Leonardo Bras Acked-by: Shakeel Butt Cc: Marcelo Tosatti Cc: Muchun Song Cc: Johannes Weiner Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton commit a85c2257a8ac353af16dbcbf32c50d3380860bc5 Author: Frederic Weisbecker Date: Fri Mar 17 14:44:47 2023 +0100 sched/isolation: add cpu_is_isolated() API Patch series "memcg, cpuisol: do not interfere pcp cache charges draining with cpuisol workloads". Leonardo has reported [1] that pcp memcg charge draining can interfere with cpu isolated workloads. The said draining is done from a WQ context with a pcp worker scheduled on each CPU which holds any cached charges for a specific memcg hierarchy. Operation is not really a common operation [2]. It can be triggered from the userspace though so some care is definitely due. Leonardo has tried to address the issue by allowing remote charge draining [3]. This approach requires an additional locking to synchronize pcp caches sync from a remote cpu from local pcp consumers. Even though the proposed lock was per-cpu there is still potential for contention and less predictable behavior. This patchset addresses the issue from a different angle. Rather than dealing with a potential synchronization, cpus which are isolated are simply never scheduled to be drained. This means that a small amount of charges could be laying around and waiting for a later use or they are flushed when a different memcg is charged from the same cpu. More details are in patch 2. The first patch from Frederic is implementing an abstraction to tell whether a specific cpu has been isolated and therefore require a special treatment. This patch (of 2): Provide this new API to check if a CPU has been isolated either through isolcpus= or nohz_full= kernel parameter. It aims at avoiding kernel load deemed to be safely spared on CPUs running sensitive workload that can't bear any disturbance, such as pcp cache draining. Link: https://lkml.kernel.org/r/20230317134448.11082-1-mhocko@kernel.org Link: https://lkml.kernel.org/r/20230317134448.11082-2-mhocko@kernel.org Signed-off-by: Frederic Weisbecker Signed-off-by: Michal Hocko Suggested-by: Michal Hocko Cc: Johannes Weiner Cc: Marcelo Tosatti Cc: Muchun Song Cc: Peter Zijlstra Cc: Roman Gushchin Cc: Shakeel Butt Cc: Thomas Gleixner Cc: Leonardo Bras Cc: Ingo Molnar Signed-off-by: Andrew Morton commit 2ce0bdfebc74f6cbd4e97a4e767d505a81c38cf2 Author: Ivan Orlov Date: Wed Mar 29 18:53:30 2023 +0400 mm: khugepaged: fix kernel BUG in hpage_collapse_scan_file() Syzkaller reported the following issue: kernel BUG at mm/khugepaged.c:1823! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 5097 Comm: syz-executor220 Not tainted 6.2.0-syzkaller-13154-g857f1268a591 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023 RIP: 0010:collapse_file mm/khugepaged.c:1823 [inline] RIP: 0010:hpage_collapse_scan_file+0x67c8/0x7580 mm/khugepaged.c:2233 Code: 00 00 89 de e8 c9 66 a3 ff 31 ff 89 de e8 c0 66 a3 ff 45 84 f6 0f 85 28 0d 00 00 e8 22 64 a3 ff e9 dc f7 ff ff e8 18 64 a3 ff <0f> 0b f3 0f 1e fa e8 0d 64 a3 ff e9 93 f6 ff ff f3 0f 1e fa 4c 89 RSP: 0018:ffffc90003dff4e0 EFLAGS: 00010093 RAX: ffffffff81e95988 RBX: 00000000000001c1 RCX: ffff8880205b3a80 RDX: 0000000000000000 RSI: 00000000000001c0 RDI: 00000000000001c1 RBP: ffffc90003dff830 R08: ffffffff81e90e67 R09: fffffbfff1a433c3 R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000 R13: ffffc90003dff6c0 R14: 00000000000001c0 R15: 0000000000000000 FS: 00007fdbae5ee700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fdbae6901e0 CR3: 000000007b2dd000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: madvise_collapse+0x721/0xf50 mm/khugepaged.c:2693 madvise_vma_behavior mm/madvise.c:1086 [inline] madvise_walk_vmas mm/madvise.c:1260 [inline] do_madvise+0x9e5/0x4680 mm/madvise.c:1439 __do_sys_madvise mm/madvise.c:1452 [inline] __se_sys_madvise mm/madvise.c:1450 [inline] __x64_sys_madvise+0xa5/0xb0 mm/madvise.c:1450 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The xas_store() call during page cache scanning can potentially translate 'xas' into the error state (with the reproducer provided by the syzkaller the error code is -ENOMEM). However, there are no further checks after the 'xas_store', and the next call of 'xas_next' at the start of the scanning cycle doesn't increase the xa_index, and the issue occurs. This patch will add the xarray state error checking after the xas_store() and the corresponding result error code. Tested via syzbot. [akpm@linux-foundation.org: update include/trace/events/huge_memory.h's SCAN_STATUS] Link: https://lkml.kernel.org/r/20230329145330.23191-1-ivan.orlov0322@gmail.com Link: https://syzkaller.appspot.com/bug?id=7d6bb3760e026ece7524500fe44fb024a0e959fc Signed-off-by: Ivan Orlov Reported-by: syzbot+9578faa5475acb35fa50@syzkaller.appspotmail.com Tested-by: Zach O'Keefe Cc: Yang Shi Cc: Himadri Pandya Cc: Ivan Orlov Cc: Shuah Khan Cc: Song Liu Cc: Rik van Riel Cc: Kirill A. Shutemov Cc: Johannes Weiner Signed-off-by: Andrew Morton commit 90fd833609c82487a0eca1581becde7ab54d9429 Author: Arnd Bergmann Date: Tue Apr 18 14:23:35 2023 +0200 kasan: remove hwasan-kernel-mem-intrinsic-prefix=1 for clang-14 Some unknown -mllvm options (i.e. those starting with the letter "h") don't cause an error to be returned by clang, so the cc-option helper adds the unknown hwasan-kernel-mem-intrinsic-prefix=1 flag to CFLAGS with compilers that are new enough for hwasan but too old for this option. This causes a rather unreadable build failure: fixdep: error opening file: scripts/mod/.empty.o.d: No such file or directory make[4]: *** [/home/arnd/arm-soc/scripts/Makefile.build:252: scripts/mod/empty.o] Error 2 fixdep: error opening file: scripts/mod/.devicetable-offsets.s.d: No such file or directory make[4]: *** [/home/arnd/arm-soc/scripts/Makefile.build:114: scripts/mod/devicetable-offsets.s] Error 2 Add a version check to only allow this option with clang-15, gcc-13 or later versions. Link: https://lkml.kernel.org/r/20230418122350.1646391-1-arnd@kernel.org Fixes: 51287dcb00cc ("kasan: emit different calls for instrumentable memintrinsics") Link: https://lore.kernel.org/all/CANpmjNMwYosrvqh4ogDO8rgn+SeDHM2b-shD21wTypm_6MMe=g@mail.gmail.com/ Signed-off-by: Arnd Bergmann Reviewed-by: Marco Elver Reviewed-by: Nathan Chancellor Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Masahiro Yamada Cc: Michael Ellerman Cc: Nick Desaulniers Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Tom Rix Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit f7ddb612568361e04d53fcd984d43d1c32c1294a Author: Sergey Senozhatsky Date: Mon Apr 17 22:08:50 2023 +0900 zsmalloc: reset compaction source zspage pointer after putback_zspage() The current implementation of the compaction loop fails to set the source zspage pointer to NULL in all cases, leading to a potential issue where __zs_compact() could use a stale zspage pointer. This pointer could even point to a previously freed zspage, causing unexpected behavior in the putback_zspage() and migrate_write_unlock() functions after returning from the compaction loop. Address the issue by ensuring that the source zspage pointer is always set to NULL when it should be. Link: https://lkml.kernel.org/r/20230417130850.1784777-1-senozhatsky@chromium.org Fixes: 5a845e9f2d66 ("zsmalloc: rework compaction algorithm") Signed-off-by: Sergey Senozhatsky Reported-by: Yu Zhao Tested-by: Yu Zhao Reviewed-by: Yosry Ahmed Signed-off-by: Andrew Morton commit 5f300fd59a2ae90b8a7fb5ed3d5fd43768236c38 Author: Arnd Bergmann Date: Fri Apr 14 10:03:53 2023 +0200 mm: make arch_has_descending_max_zone_pfns() static clang produces a build failure on x86 for some randconfig builds after a change that moves around code to mm/mm_init.c: Cannot find symbol for section 2: .text. mm/mm_init.o: failed I have not been able to figure out why this happens, but the __weak annotation on arch_has_descending_max_zone_pfns() is the trigger here. Removing the weak function in favor of an open-coded Kconfig option check avoids the problem and becomes clearer as well as better to optimize by the compiler. [arnd@arndb.de: fix logic bug] Link: https://lkml.kernel.org/r/20230415081904.969049-1-arnd@kernel.org Link: https://lkml.kernel.org/r/20230414080418.110236-1-arnd@kernel.org Fixes: 9420f89db2dd ("mm: move most of core MM initialization to mm/mm_init.c") Signed-off-by: Arnd Bergmann Acked-by: Vlastimil Babka Tested-by: SeongJae Park Tested-by: Geert Uytterhoeven Acked-by: Mike Rapoport (IBM) Cc: kernel test robot Signed-off-by: Andrew Morton commit 59f876fb9d68a4d8c20305d7a7a0daf4ee9478a8 Author: Kirill A. Shutemov Date: Thu Apr 6 10:25:29 2023 +0300 mm: avoid passing 0 to __ffs() 23baf831a32c ("mm, treewide: redefine MAX_ORDER sanely") results in various boot failures (hang) on arm targets Debug messages reveal the reason. ########### MAX_ORDER=10 start=0 __ffs(start)=-1 min()=10 min_t=-1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If start==0, __ffs(start) returns 0xfffffff or (as int) -1, which min_t() interprets as such, while min() apparently uses the returned unsigned long value. Obviously a negative order isn't received well by the rest of the code. [akpm@linux-foundation.org: fix comment, per Mike] Link: https://lkml.kernel.org/r/ZDBa7HWZK69dKKzH@kernel.org Link: https://lkml.kernel.org/r/20230406072529.vupqyrzqnhyozeyh@box.shutemov.name Fixes: 23baf831a32c ("mm, treewide: redefine MAX_ORDER sanely") Signed-off-by: "Kirill A. Shutemov" Reported-by: Guenter Roeck Link: https://lkml.kernel.org/r/9460377a-38aa-4f39-ad57-fb73725f92db@roeck-us.net Reviewed-by: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit aa5af0aa90bad3f1cad5a90ee5eecd92ac9f3096 Author: Evan Green Date: Fri Apr 7 16:11:03 2023 -0700 RISC-V: Add hwprobe vDSO function and data Add a vDSO function __vdso_riscv_hwprobe, which can sit in front of the riscv_hwprobe syscall and answer common queries. We stash a copy of static answers for the "all CPUs" case in the vDSO data page. This data is private to the vDSO, so we can decide later to change what's stored there or under what conditions we defer to the syscall. Currently all data can be discovered at boot, so the vDSO function answers all queries when the cpumask is set to the "all CPUs" hint. There's also a boolean in the data that lets the vDSO function know that all CPUs are the same. In that case, the vDSO will also answer queries for arbitrary CPU masks in addition to the "all CPUs" hint. Signed-off-by: Evan Green Link: https://lore.kernel.org/r/20230407231103.2622178-7-evan@rivosinc.com Signed-off-by: Palmer Dabbelt commit 287dcc2b0c831d3e3887421f68e3db6b8b8f4eb1 Author: Evan Green Date: Fri Apr 7 16:11:02 2023 -0700 selftests: Test the new RISC-V hwprobe interface This adds a test for the recently added RISC-V interface for probing hardware capabilities. It happens to be the first selftest we have for RISC-V, so I've added some infrastructure for those as well. Co-developed-by: Palmer Dabbelt Signed-off-by: Evan Green Link: https://lore.kernel.org/r/20230407231103.2622178-6-evan@rivosinc.com Signed-off-by: Palmer Dabbelt commit 62a31d6e38bd0faef7c956b358d651f7bdc4ae0c Author: Evan Green Date: Fri Apr 7 16:11:01 2023 -0700 RISC-V: hwprobe: Support probing of misaligned access performance This allows userspace to select various routines to use based on the performance of misaligned access on the target hardware. Rather than adding DT bindings, this change taps into the alternatives mechanism used to probe CPU errata. Add a new function pointer alongside the vendor-specific errata_patch_func() that probes for desirable errata (otherwise known as "features"). Unlike the errata_patch_func(), this function is called on each CPU as it comes up, so it can save feature information per-CPU. The T-head C906 has fast unaligned access, both as defined by GCC [1], and in performing a basic benchmark, which determined that byte copies are >50% slower than a misaligned word copy of the same data size (source for this test at [2]): bytecopy size f000 count 50000 offset 0 took 31664899 us wordcopy size f000 count 50000 offset 0 took 5180919 us wordcopy size f000 count 50000 offset 1 took 13416949 us [1] https://github.com/gcc-mirror/gcc/blob/master/gcc/config/riscv/riscv.cc#L353 [2] https://pastebin.com/EPXvDHSW Co-developed-by: Palmer Dabbelt Signed-off-by: Evan Green Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Reviewed-by: Conor Dooley Reviewed-by: Paul Walmsley Link: https://lore.kernel.org/r/20230407231103.2622178-5-evan@rivosinc.com Signed-off-by: Palmer Dabbelt commit 00e76e2c6a2bd3976d44d4a1fdd0b7a3c2566607 Author: Evan Green Date: Fri Apr 7 16:11:00 2023 -0700 RISC-V: hwprobe: Add support for RISCV_HWPROBE_BASE_BEHAVIOR_IMA We have an implicit set of base behaviors that userspace depends on, which are mostly defined in various ISA specifications. Co-developed-by: Palmer Dabbelt Signed-off-by: Evan Green Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Reviewed-by: Paul Walmsley Link: https://lore.kernel.org/r/20230407231103.2622178-4-evan@rivosinc.com Signed-off-by: Palmer Dabbelt commit ea3de9ce8aa280c5175c835bd3e94a3a9b814b74 Author: Evan Green Date: Fri Apr 7 16:10:59 2023 -0700 RISC-V: Add a syscall for HW probing We don't have enough space for these all in ELF_HWCAP{,2} and there's no system call that quite does this, so let's just provide an arch-specific one to probe for hardware capabilities. This currently just provides m{arch,imp,vendor}id, but with the key-value pairs we can pass more in the future. Co-developed-by: Palmer Dabbelt Signed-off-by: Evan Green Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Reviewed-by: Paul Walmsley Link: https://lore.kernel.org/r/20230407231103.2622178-3-evan@rivosinc.com Signed-off-by: Palmer Dabbelt commit ff77cf5b2e033d0bb5e3b7f83ebf65c5adc20d12 Author: Evan Green Date: Fri Apr 7 16:10:58 2023 -0700 RISC-V: Move struct riscv_cpuinfo to new header In preparation for tracking and exposing microarchitectural details to userspace (like whether or not unaligned accesses are fast), move the riscv_cpuinfo struct out to its own new cpufeatures.h header. It will need to be used by more than just cpu.c. Signed-off-by: Evan Green Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Reviewed-by: Paul Walmsley Link: https://lore.kernel.org/r/20230407231103.2622178-2-evan@rivosinc.com Signed-off-by: Palmer Dabbelt commit f8f238ffe5e96a924a2ddbbaa872231fbf2c0d7b Merge: e492cd61b9865 ef832747a82df Author: Andrew Morton Date: Tue Apr 18 14:53:49 2023 -0700 sync mm-stable with mm-hotfixes-stable to pick up depended-upon upstream changes commit 9195ee1a1f76033eccb424b97ee647625b7af096 Author: Rob Herring Date: Fri Mar 10 08:47:19 2023 -0600 PCI: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property()/of_find_property() functions for reading properties. As part of this, convert of_get_property()/of_find_property() calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Link: https://lore.kernel.org/r/20230310144719.1544443-1-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Bjorn Helgaas Reviewed-by: AngeloGioacchino Del Regno # pcie-mediatek commit 0c1f033159712b3d071cfe4a3ec0f36f1914453b Author: Tom Rix Date: Sat Apr 15 11:17:22 2023 -0400 drm/amd/display: set variable dccg314_init storage-class-specifier to static smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/dcn314/dcn314_dccg.c:277:6: warning: symbol 'dccg314_init' was not declared. Should it be static? This variable is only used in one file so should be static. Signed-off-by: Tom Rix Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 64626c0ee13257e330bc09fa6a169385c0eaf9ca Author: Rodrigo Siqueira Date: Mon Apr 3 19:23:29 2023 -0600 drm/amd/display: Use pointer in the memcpy Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b62f91569f9aa54b0a60d46a022482415cb968a9 Author: Rodrigo Siqueira Date: Mon Apr 3 15:40:21 2023 -0600 drm/amd/display: Remove wrong assignment of DP link rate Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ac7485cc363f2c603a3e1a7a609ef065ad56b19b Author: Rodrigo Siqueira Date: Mon Apr 3 15:38:09 2023 -0600 drm/amd/display: Set dp_rate to dm_dp_rate_na by default Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0fdf06e449b6d6d970c0709c71a8738cfe551ecc Author: Rodrigo Siqueira Date: Mon Apr 3 15:37:46 2023 -0600 drm/amd/display: Set maximum VStartup if is DCN201 Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 83aeb49c8c467e9fe77c4f01c80472a4329db49c Author: Rodrigo Siqueira Date: Mon Apr 3 15:29:36 2023 -0600 drm/amd/display: Adjust code identation and other minor details This commit replaces spaces with tabs in multiple functions and adjusts the indentation in some other parts of the code to improve readability. Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ef3d74aa7e5d0ba4e9fc00f1409652e29f46fc59 Author: Rodrigo Siqueira Date: Mon Apr 3 14:10:27 2023 -0600 drm/amd/display: Add missing mclk update When using FPO, there is some misconfiguration that happens for the lack of configuration of the MCLK switch in some circumstances. This commit adds the required field update when using the MCLK switch. Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 764ba43d34ac5fd16e0e377643f89a7208f1f67b Author: Rodrigo Siqueira Date: Mon Apr 3 14:06:16 2023 -0600 drm/amd/display: Update bouding box values for DCN32 All clock values came from firmware, but bounding box values can be helpful in some debug situations. This commit updates some of the values associated with clock speed and memory channels. Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 38eecbe086a4e52f54b2bbda8feba65d44addbef Author: Chong Li Date: Fri Apr 14 13:51:19 2023 +0800 drm/amdgpu: release gpu full access after "amdgpu_device_ip_late_init" [WHY] Function "amdgpu_irq_update()" called by "amdgpu_device_ip_late_init()" is an atomic context. We shouldn't access registers through KIQ since "msleep()" may be called in "amdgpu_kiq_rreg()". [HOW] Move function "amdgpu_virt_release_full_gpu()" after function "amdgpu_device_ip_late_init()", to ensure that registers be accessed through RLCG instead of KIQ. Call Trace: show_stack+0x52/0x69 dump_stack_lvl+0x49/0x6d dump_stack+0x10/0x18 __schedule_bug.cold+0x4f/0x6b __schedule+0x473/0x5d0 ? __wake_up_klogd.part.0+0x40/0x70 ? vprintk_emit+0xbe/0x1f0 schedule+0x68/0x110 schedule_timeout+0x87/0x160 ? timer_migration_handler+0xa0/0xa0 msleep+0x2d/0x50 amdgpu_kiq_rreg+0x18d/0x1f0 [amdgpu] amdgpu_device_rreg.part.0+0x59/0xd0 [amdgpu] amdgpu_device_rreg+0x3a/0x50 [amdgpu] amdgpu_sriov_rreg+0x3c/0xb0 [amdgpu] gfx_v10_0_set_gfx_eop_interrupt_state.constprop.0+0x16c/0x190 [amdgpu] gfx_v10_0_set_eop_interrupt_state+0xa5/0xb0 [amdgpu] amdgpu_irq_update+0x53/0x80 [amdgpu] amdgpu_irq_get+0x7c/0xb0 [amdgpu] amdgpu_fence_driver_hw_init+0x58/0x90 [amdgpu] amdgpu_device_init.cold+0x16b7/0x2022 [amdgpu] Signed-off-by: Chong Li Reviewed-by: JingWen.Chen2@amd.com Signed-off-by: Alex Deucher commit 8d9cdb4674f6e4e7fc789f8184a58c73eeadc16c Author: Tom Rix Date: Fri Apr 14 08:03:44 2023 -0400 drm/amd/pm: change pmfw_decoded_link_width, speed variables to globals gcc with W=1 reports In file included from drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0.c:36: ./drivers/gpu/drm/amd/amdgpu/../pm/swsmu/inc/smu_v13_0.h:66:18: error: ‘pmfw_decoded_link_width’ defined but not used [-Werror=unused-const-variable=] 66 | static const int pmfw_decoded_link_width[7] = {0, 1, 2, 4, 8, 12, 16}; | ^~~~~~~~~~~~~~~~~~~~~~~ ./drivers/gpu/drm/amd/amdgpu/../pm/swsmu/inc/smu_v13_0.h:65:18: error: ‘pmfw_decoded_link_speed’ defined but not used [-Werror=unused-const-variable=] 65 | static const int pmfw_decoded_link_speed[5] = {1, 2, 3, 4, 5}; | ^~~~~~~~~~~~~~~~~~~~~~~ These variables are defined and used in smu_v13_0_7_ppt.c and smu_v13_0_0_ppt.c. There should be only one definition. So define the variables as globals in smu_v13_0.c Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit 4de867fc237487ce2951a8231d7390237d3f3be8 Author: Jane Jian Date: Thu Apr 13 10:49:06 2023 +0800 drm/amdgpu/vcn: fix mmsch ctx table size add jpeg table size to ctx table size rather than override it Signed-off-by: Jane Jian Reviewed-by: JingWen Chen Signed-off-by: Alex Deucher commit 0818c8d46948da430e41eb426b54f061b5d03bf0 Merge: fe15c26ee26ef 64042c28c3bb6 Author: Stephen Boyd Date: Tue Apr 18 12:48:39 2023 -0700 Merge tag 'v6.4-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip Pull a couple Rockchip clk driver updates from Heiko Stübner: Reparenting fix for the clock supplying camera modules on the rk3399 and more critical (bus-)clocks on the rk3588. * tag 'v6.4-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: rk3588: make gate linked clocks critical clk: rockchip: rk3399: allow clk_cifout to force clk_cifout_src to reparent commit 276dcdd1a8f33047524dd0ae517290f0842fe4b8 Merge: 49859de997c31 94dccba795207 Author: Alexei Starovoitov Date: Tue Apr 18 12:45:11 2023 -0700 Merge branch 'Provide bpf_for() and bpf_for_each() by libbpf' Andrii Nakryiko says: ==================== This patch set moves bpf_for(), bpf_for_each(), and bpf_repeat() macros from selftests-internal bpf_misc.h header to libbpf-provided bpf_helpers.h header. To do this in a way to allow users to feature-detect and guard such bpf_for()/bpf_for_each() uses on old kernels we also extend libbpf to improve unresolved kfunc calls handling and reporting. This lets us mark bpf_iter_num_{new,next,destroy}() declarations as __weak, and thus not fail program loading outright if such kfuncs are missing on the host kernel. Patches #1 and #2 do some simple clean ups and logging improvements. Patch #3 adds kfunc call poisoning and log fixup logic and is the hear of this patch set, effectively. Patch #4 adds selftest for this logic. Patches #4 and #5 move bpf_for()/bpf_for_each()/bpf_repeat() into bpf_helpers.h header and mark kfuncs as __weak to allow users to feature-detect and guard their uses. ==================== Signed-off-by: Alexei Starovoitov commit 94dccba7952072ce448a3278c66405fbb2a44ec5 Author: Andrii Nakryiko Date: Mon Apr 17 17:21:48 2023 -0700 libbpf: mark bpf_iter_num_{new,next,destroy} as __weak Mark bpf_iter_num_{new,next,destroy}() kfuncs declared for bpf_for()/bpf_repeat() macros as __weak to allow users to feature-detect their presence and guard bpf_for()/bpf_repeat() loops accordingly for backwards compatibility with old kernels. Now that libbpf supports kfunc calls poisoning and better reporting of unresolved (but called) kfuncs, declaring number iterator kfuncs in bpf_helpers.h won't degrade user experience and won't cause unnecessary kernel feature dependencies. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230418002148.3255690-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit c5e64741670883a5b35d42f3125d611f5a4aa14f Author: Andrii Nakryiko Date: Mon Apr 17 17:21:47 2023 -0700 libbpf: move bpf_for(), bpf_for_each(), and bpf_repeat() into bpf_helpers.h To make it easier for bleeding-edge BPF applications, such as sched_ext, to utilize open-coded iterators, move bpf_for(), bpf_for_each(), and bpf_repeat() macros from selftests/bpf-internal bpf_misc.h helper, to libbpf-provided bpf_helpers.h header. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230418002148.3255690-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 30bbfe3236b01b81ed5f4a91cd9d87a236b182e3 Author: Andrii Nakryiko Date: Mon Apr 17 17:21:46 2023 -0700 selftests/bpf: add missing __weak kfunc log fixup test Add test validating that libbpf correctly poisons and reports __weak unresolved kfuncs in post-processed verifier log. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230418002148.3255690-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 05b6f766b25c455f2349df7714f0f0d3ac37fe46 Author: Andrii Nakryiko Date: Mon Apr 17 17:21:45 2023 -0700 libbpf: improve handling of unresolved kfuncs Currently, libbpf leaves `call #0` instruction for __weak unresolved kfuncs, which might lead to a confusing verifier log situations, where invalid `call #0` will be treated as successfully validated. We can do better. Libbpf already has an established mechanism of poisoning instructions that failed some form of resolution (e.g., CO-RE relocation and BPF map set to not be auto-created). Libbpf doesn't fail them outright to allow users to guard them through other means, and as long as BPF verifier can prove that such poisoned instructions cannot be ever reached, this doesn't consistute an invalid BPF program. If user didn't guard such code, libbpf will extract few pieces of information to tie such poisoned instructions back to additional information about what entitity wasn't resolved (e.g., BPF map name, or CO-RE relocation information). __weak unresolved kfuncs fit this model well, so this patch extends libbpf with poisioning and log fixup logic for kfunc calls. Note, this poisoning is done only for kfunc *calls*, not kfunc address resolution (ldimm64 instructions). The former cannot be ever valid, if reached, so it's safe to poison them. The latter is a valid mechanism to check if __weak kfunc ksym was resolved, and do necessary guarding and work arounds based on this result, supported in most recent kernels. As such, libbpf keeps such ldimm64 instructions as loading zero, never poisoning them. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230418002148.3255690-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit f709160d1724a4be469b985dcaadaa2aa8d5ce94 Author: Andrii Nakryiko Date: Mon Apr 17 17:21:44 2023 -0700 libbpf: report vmlinux vs module name when dealing with ksyms Currently libbpf always reports "kernel" as a source of ksym BTF type, which is ambiguous given ksym's BTF can come from either vmlinux or kernel module BTFs. Make this explicit and log module name, if used BTF is from kernel module. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230418002148.3255690-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 3055ddd654f65ebdd7860b4dfecd7e49e54c01b7 Author: Andrii Nakryiko Date: Mon Apr 17 17:21:43 2023 -0700 libbpf: misc internal libbpf clean ups around log fixup Normalize internal constants, field names, and comments related to log fixup. Also add explicit `ext_idx` alias for relocation where relocation is pointing to extern description for additional information. No functional changes, just a clean up before subsequent additions. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230418002148.3255690-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit a81b1fc8ea639e03326c1d0dcde041986bc11500 Author: Arnd Bergmann Date: Tue Apr 18 09:17:51 2023 +0200 module: stats: fix invalid_mod_bytes typo This was caught by randconfig builds but does not show up in build testing without CONFIG_MODULE_DECOMPRESS: kernel/module/stats.c: In function 'mod_stat_bump_invalid': kernel/module/stats.c:229:42: error: 'invalid_mod_byte' undeclared (first use in this function); did you mean 'invalid_mod_bytes'? 229 | atomic_long_add(info->compressed_len, &invalid_mod_byte); | ^~~~~~~~~~~~~~~~ | invalid_mod_bytes Fixes: df3e764d8e5c ("module: add debug stats to help identify memory pressure") Signed-off-by: Arnd Bergmann Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Luis Chamberlain commit 9f5cab173e19201eebeaca853ff664a9a269fed0 Author: Tom Rix Date: Mon Apr 17 19:09:57 2023 -0400 module: remove use of uninitialized variable len clang build reports kernel/module/stats.c:307:34: error: variable 'len' is uninitialized when used here [-Werror,-Wuninitialized] len = scnprintf(buf + 0, size - len, ^~~ At the start of this sequence, neither the '+ 0', nor the '- len' are needed. So remove them and fix using 'len' uninitalized. Fixes: df3e764d8e5c ("module: add debug stats to help identify memory pressure") Signed-off-by: Tom Rix Signed-off-by: Luis Chamberlain commit 719ccd803ed5bd1ad92b0b46fc095b8fe266827e Author: Arnd Bergmann Date: Tue Apr 18 00:48:04 2023 +0200 module: fix building stats for 32-bit targets The new module statistics code mixes 64-bit types and wordsized 'long' variables, which leads to build failures on 32-bit architectures: kernel/module/stats.c: In function 'read_file_mod_stats': kernel/module/stats.c:291:29: error: passing argument 1 of 'atomic64_read' from incompatible pointer type [-Werror=incompatible-pointer-types] 291 | total_size = atomic64_read(&total_mod_size); x86_64-linux-ld: kernel/module/stats.o: in function `read_file_mod_stats': stats.c:(.text+0x2b2): undefined reference to `__udivdi3' To fix this, the code has to use one of the two types consistently. Change them all to word-size types here. Fixes: df3e764d8e5c ("module: add debug stats to help identify memory pressure") Signed-off-by: Arnd Bergmann Signed-off-by: Luis Chamberlain commit 635dc38314c75c5727711d896d4c71ec92f6f20b Author: Arnd Bergmann Date: Tue Apr 18 00:02:46 2023 +0200 module: stats: include uapi/linux/module.h MODULE_INIT_COMPRESSED_FILE is defined in the uapi header, which is not included indirectly from the normal linux/module.h, but has to be pulled in explicitly: kernel/module/stats.c: In function 'mod_stat_bump_invalid': kernel/module/stats.c:227:14: error: 'MODULE_INIT_COMPRESSED_FILE' undeclared (first use in this function) 227 | if (flags & MODULE_INIT_COMPRESSED_FILE) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Arnd Bergmann Signed-off-by: Luis Chamberlain commit 064f4536d13939b6e8cdb71298ff5d657f4f8caa Author: Luis Chamberlain Date: Fri Mar 10 20:48:03 2023 -0800 module: avoid allocation if module is already present and ready The finit_module() system call can create unnecessary virtual memory pressure for duplicate modules. This is because load_module() can in the worse case allocate more than twice the size of a module in virtual memory. This saves at least a full size of the module in wasted vmalloc space memory by trying to avoid duplicates as soon as we can validate the module name in the read module structure. This can only be an issue if a system is getting hammered with userspace loading modules. There are two ways to load modules typically on systems, one is the kernel moduile auto-loading (*request_module*() calls in-kernel) and the other is things like udev. The auto-loading is in-kernel, but that pings back to userspace to just call modprobe. We already have a way to restrict the amount of concurrent kernel auto-loads in a given time, however that still allows multiple requests for the same module to go through and force two threads in userspace racing to call modprobe for the same exact module. Even though libkmod which both modprobe and udev does check if a module is already loaded prior calling finit_module() races are still possible and this is clearly evident today when you have multiple CPUs. To avoid memory pressure for such stupid cases put a stop gap for them. The *earliest* we can detect duplicates from the modules side of things is once we have blessed the module name, sadly after the first vmalloc allocation. We can check for the module being present *before* a secondary vmalloc() allocation. There is a linear relationship between wasted virtual memory bytes and the number of CPU counts. The reason is that udev ends up racing to call tons of the same modules for each of the CPUs. We can see the different linear relationships between wasted virtual memory and CPU count during after boot in the following graph: +----------------------------------------------------------------------------+ 14GB |-+ + + + + *+ +-| | **** | | *** | | ** | 12GB |-+ ** +-| | ** | | ** | | ** | | ** | 10GB |-+ ** +-| | ** | | ** | | ** | 8GB |-+ ** +-| waste | ** ### | | ** #### | | ** ####### | 6GB |-+ **** #### +-| | * #### | | * #### | | ***** #### | 4GB |-+ ** #### +-| | ** #### | | ** #### | | ** #### | 2GB |-+ ** ##### +-| | * #### | | * #### Before ******* | | **## + + + + After ####### | +----------------------------------------------------------------------------+ 0 50 100 150 200 250 300 CPUs count On the y-axis we can see gigabytes of wasted virtual memory during boot due to duplicate module requests which just end up failing. Trying to infer the slope this ends up being about ~463 MiB per CPU lost prior to this patch. After this patch we only loose about ~230 MiB per CPU, for a total savings of about ~233 MiB per CPU. This is all *just on bootup*! On a 8vcpu 8 GiB RAM system using kdevops and testing against selftests kmod.sh -t 0008 I see a saving in the *highest* side of memory consumption of up to ~ 84 MiB with the Linux kernel selftests kmod test 0008. With the new stress-ng module test I see a 145 MiB difference in max memory consumption with 100 ops. The stress-ng module ops tests can be pretty pathalogical -- it is not realistic, however it was used to finally successfully reproduce issues which are only reported to happen on system with over 400 CPUs [0] by just usign 100 ops on a 8vcpu 8 GiB RAM system. Running out of virtual memory space is no surprise given the above graph, since at least on x86_64 we're capped at 128 MiB, eventually we'd hit a series of errors and once can use the above graph to guestimate when. This of course will vary depending on the features you have enabled. So for instance, enabling KASAN seems to make this much worse. The results with kmod and stress-ng can be observed and visualized below. The time it takes to run the test is also not affected. The kmod tests 0008: The gnuplot is set to a range from 400000 KiB (390 Mib) - 580000 (566 Mib) given the tests peak around that range. cat kmod.plot set term dumb set output fileout set yrange [400000:580000] plot filein with linespoints title "Memory usage (KiB)" Before: root@kmod ~ # /data/linux-next/tools/testing/selftests/kmod/kmod.sh -t 0008 root@kmod ~ # free -k -s 1 -c 40 | grep Mem | awk '{print $3}' > log-0008-before.txt ^C root@kmod ~ # sort -n -r log-0008-before.txt | head -1 528732 So ~516.33 MiB After: root@kmod ~ # /data/linux-next/tools/testing/selftests/kmod/kmod.sh -t 0008 root@kmod ~ # free -k -s 1 -c 40 | grep Mem | awk '{print $3}' > log-0008-after.txt ^C root@kmod ~ # sort -n -r log-0008-after.txt | head -1 442516 So ~432.14 MiB That's about 84 ~MiB in savings in the worst case. The graphs: root@kmod ~ # gnuplot -e "filein='log-0008-before.txt'; fileout='graph-0008-before.txt'" kmod.plot root@kmod ~ # gnuplot -e "filein='log-0008-after.txt'; fileout='graph-0008-after.txt'" kmod.plot root@kmod ~ # cat graph-0008-before.txt 580000 +-----------------------------------------------------------------+ | + + + + + + + | 560000 |-+ Memory usage (KiB) ***A***-| | | 540000 |-+ +-| | | | *A *AA*AA*A*AA *A*AA A*A*A *AA*A*AA*A A | 520000 |-+A*A*AA *AA*A *A*AA*A*AA *A*A A *A+-| |*A | 500000 |-+ +-| | | 480000 |-+ +-| | | 460000 |-+ +-| | | | | 440000 |-+ +-| | | 420000 |-+ +-| | + + + + + + + | 400000 +-----------------------------------------------------------------+ 0 5 10 15 20 25 30 35 40 root@kmod ~ # cat graph-0008-after.txt 580000 +-----------------------------------------------------------------+ | + + + + + + + | 560000 |-+ Memory usage (KiB) ***A***-| | | 540000 |-+ +-| | | | | 520000 |-+ +-| | | 500000 |-+ +-| | | 480000 |-+ +-| | | 460000 |-+ +-| | | | *A *A*A | 440000 |-+A*A*AA*A A A*A*AA A*A*AA*A*AA*A*AA*A*AA*AA*A*AA*A*AA-| |*A *A*AA*A | 420000 |-+ +-| | + + + + + + + | 400000 +-----------------------------------------------------------------+ 0 5 10 15 20 25 30 35 40 The stress-ng module tests: This is used to run the test to try to reproduce the vmap issues reported by David: echo 0 > /proc/sys/vm/oom_dump_tasks ./stress-ng --module 100 --module-name xfs Prior to this commit: root@kmod ~ # free -k -s 1 -c 40 | grep Mem | awk '{print $3}' > baseline-stress-ng.txt root@kmod ~ # sort -n -r baseline-stress-ng.txt | head -1 5046456 After this commit: root@kmod ~ # free -k -s 1 -c 40 | grep Mem | awk '{print $3}' > after-stress-ng.txt root@kmod ~ # sort -n -r after-stress-ng.txt | head -1 4896972 5046456 - 4896972 149484 149484/1024 145.98046875000000000000 So this commit using stress-ng reveals saving about 145 MiB in memory using 100 ops from stress-ng which reproduced the vmap issue reported. cat kmod.plot set term dumb set output fileout set yrange [4700000:5070000] plot filein with linespoints title "Memory usage (KiB)" root@kmod ~ # gnuplot -e "filein='baseline-stress-ng.txt'; fileout='graph-stress-ng-before.txt'" kmod-simple-stress-ng.plot root@kmod ~ # gnuplot -e "filein='after-stress-ng.txt'; fileout='graph-stress-ng-after.txt'" kmod-simple-stress-ng.plot root@kmod ~ # cat graph-stress-ng-before.txt +---------------------------------------------------------------+ 5.05e+06 |-+ + A + + + + + + +-| | * Memory usage (KiB) ***A*** | | * A | 5e+06 |-+ ** ** +-| | ** * * A | 4.95e+06 |-+ * * A * A* +-| | * * A A * * * * A | | * * * * * * *A * * * A * | 4.9e+06 |-+ * * * A*A * A*AA*A A *A **A **A*A *+-| | A A*A A * A * * A A * A * ** | | * ** ** * * * * * * * | 4.85e+06 |-+ A A A ** * * ** *-| | * * * * ** * | | * A * * * * | 4.8e+06 |-+ * * * A A-| | * * * | 4.75e+06 |-+ * * * +-| | * ** | | * + + + + + + ** + | 4.7e+06 +---------------------------------------------------------------+ 0 5 10 15 20 25 30 35 40 root@kmod ~ # cat graph-stress-ng-after.txt +---------------------------------------------------------------+ 5.05e+06 |-+ + + + + + + + +-| | Memory usage (KiB) ***A*** | | | 5e+06 |-+ +-| | | 4.95e+06 |-+ +-| | | | | 4.9e+06 |-+ *AA +-| | A*AA*A*A A A*AA*AA*A*AA*A A A A*A *AA*A*A A A*AA*AA | | * * ** * * * ** * *** * | 4.85e+06 |-+* *** * * * * *** A * * +-| | * A * * ** * * A * * | | * * * * ** * * | 4.8e+06 |-+* * * A * * * +-| | * * * A * * | 4.75e+06 |-* * * * * +-| | * * * * * | | * + * *+ + + + + * *+ | 4.7e+06 +---------------------------------------------------------------+ 0 5 10 15 20 25 30 35 40 [0] https://lkml.kernel.org/r/20221013180518.217405-1-david@redhat.com Reported-by: David Hildenbrand Signed-off-by: Luis Chamberlain commit df3e764d8e5cd416efee29e0de3c93917dff5d33 Author: Luis Chamberlain Date: Tue Mar 28 20:03:19 2023 -0700 module: add debug stats to help identify memory pressure Loading modules with finit_module() can end up using vmalloc(), vmap() and vmalloc() again, for a total of up to 3 separate allocations in the worst case for a single module. We always kernel_read*() the module, that's a vmalloc(). Then vmap() is used for the module decompression, and if so the last read buffer is freed as we use the now decompressed module buffer to stuff data into our copy module. The last allocation is specific to each architectures but pretty much that's generally a series of vmalloc() calls or a variation of vmalloc to handle ELF sections with special permissions. Evaluation with new stress-ng module support [1] with just 100 ops is proving that you can end up using GiBs of data easily even with all care we have in the kernel and userspace today in trying to not load modules which are already loaded. 100 ops seems to resemble the sort of pressure a system with about 400 CPUs can create on module loading. Although issues relating to duplicate module requests due to each CPU inucurring a new module reuest is silly and some of these are being fixed, we currently lack proper tooling to help diagnose easily what happened, when it happened and who likely is to blame -- userspace or kernel module autoloading. Provide an initial set of stats which use debugfs to let us easily scrape post-boot information about failed loads. This sort of information can be used on production worklaods to try to optimize *avoiding* redundant memory pressure using finit_module(). There's a few examples that can be provided: A 255 vCPU system without the next patch in this series applied: Startup finished in 19.143s (kernel) + 7.078s (userspace) = 26.221s graphical.target reached after 6.988s in userspace And 13.58 GiB of virtual memory space lost due to failed module loading: root@big ~ # cat /sys/kernel/debug/modules/stats Mods ever loaded 67 Mods failed on kread 0 Mods failed on decompress 0 Mods failed on becoming 0 Mods failed on load 1411 Total module size 11464704 Total mod text size 4194304 Failed kread bytes 0 Failed decompress bytes 0 Failed becoming bytes 0 Failed kmod bytes 14588526272 Virtual mem wasted bytes 14588526272 Average mod size 171115 Average mod text size 62602 Average fail load bytes 10339140 Duplicate failed modules: module-name How-many-times Reason kvm_intel 249 Load kvm 249 Load irqbypass 8 Load crct10dif_pclmul 128 Load ghash_clmulni_intel 27 Load sha512_ssse3 50 Load sha512_generic 200 Load aesni_intel 249 Load crypto_simd 41 Load cryptd 131 Load evdev 2 Load serio_raw 1 Load virtio_pci 3 Load nvme 3 Load nvme_core 3 Load virtio_pci_legacy_dev 3 Load virtio_pci_modern_dev 3 Load t10_pi 3 Load virtio 3 Load crc32_pclmul 6 Load crc64_rocksoft 3 Load crc32c_intel 40 Load virtio_ring 3 Load crc64 3 Load The following screen shot, of a simple 8vcpu 8 GiB KVM guest with the next patch in this series applied, shows 226.53 MiB are wasted in virtual memory allocations which due to duplicate module requests during boot. It also shows an average module memory size of 167.10 KiB and an an average module .text + .init.text size of 61.13 KiB. The end shows all modules which were detected as duplicate requests and whether or not they failed early after just the first kernel_read*() call or late after we've already allocated the private space for the module in layout_and_allocate(). A system with module decompression would reveal more wasted virtual memory space. We should put effort now into identifying the source of these duplicate module requests and trimming these down as much possible. Larger systems will obviously show much more wasted virtual memory allocations. root@kmod ~ # cat /sys/kernel/debug/modules/stats Mods ever loaded 67 Mods failed on kread 0 Mods failed on decompress 0 Mods failed on becoming 83 Mods failed on load 16 Total module size 11464704 Total mod text size 4194304 Failed kread bytes 0 Failed decompress bytes 0 Failed becoming bytes 228959096 Failed kmod bytes 8578080 Virtual mem wasted bytes 237537176 Average mod size 171115 Average mod text size 62602 Avg fail becoming bytes 2758544 Average fail load bytes 536130 Duplicate failed modules: module-name How-many-times Reason kvm_intel 7 Becoming kvm 7 Becoming irqbypass 6 Becoming & Load crct10dif_pclmul 7 Becoming & Load ghash_clmulni_intel 7 Becoming & Load sha512_ssse3 6 Becoming & Load sha512_generic 7 Becoming & Load aesni_intel 7 Becoming crypto_simd 7 Becoming & Load cryptd 3 Becoming & Load evdev 1 Becoming serio_raw 1 Becoming nvme 3 Becoming nvme_core 3 Becoming t10_pi 3 Becoming virtio_pci 3 Becoming crc32_pclmul 6 Becoming & Load crc64_rocksoft 3 Becoming crc32c_intel 3 Becoming virtio_pci_modern_dev 2 Becoming virtio_pci_legacy_dev 1 Becoming crc64 2 Becoming virtio 2 Becoming virtio_ring 2 Becoming [0] https://github.com/ColinIanKing/stress-ng.git [1] echo 0 > /proc/sys/vm/oom_dump_tasks ./stress-ng --module 100 --module-name xfs Signed-off-by: Luis Chamberlain commit f71afa6a420111da90657fe999a8e32c42d5c7d6 Author: Luis Chamberlain Date: Fri Mar 10 20:05:52 2023 -0800 module: extract patient module check into helper The patient module check inside add_unformed_module() is large enough as we need it. It is a bit hard to read too, so just move it to a helper and do the inverse checks first to help shift the code and make it easier to read. The new helper then is module_patient_check_exists(). To make this work we need to mvoe the finished_loading() up, we do that without making any functional changes to that routine. Reviewed-by: David Hildenbrand Signed-off-by: Luis Chamberlain commit 25a1b5b518f4336bff934ac8348da6c57158363a Author: Luis Chamberlain Date: Fri Mar 24 18:38:00 2023 -0700 modules/kmod: replace implementation with a semaphore Simplify the concurrency delimiter we use for kmod with the semaphore. I had used the kmod strategy to try to implement a similar concurrency delimiter for the kernel_read*() calls from the finit_module() path so to reduce vmalloc() memory pressure. That effort didn't provide yet conclusive results, but one thing that became clear is we can use the suggested alternative solution with semaphores which Linus hinted at instead of using the atomic / wait strategy. I've stress tested this with kmod test 0008: time /data/linux-next/tools/testing/selftests/kmod/kmod.sh -t 0008 And I get only a *slight* delay. That delay however is small, a few seconds for a full test loop run that runs 150 times, for about ~30-40 seconds. The small delay is worth the simplfication IMHO. Reviewed-by: Davidlohr Bueso Reviewed-by: Miroslav Benes Reviewed-by: David Hildenbrand Signed-off-by: Luis Chamberlain commit 48380368dec14859723b9e3fbd43e042638d9a76 Author: Peter Zijlstra Date: Wed Mar 29 12:14:42 2023 +0200 Change DEFINE_SEMAPHORE() to take a number argument Fundamentally semaphores are a counted primitive, but DEFINE_SEMAPHORE() does not expose this and explicitly creates a binary semaphore. Change DEFINE_SEMAPHORE() to take a number argument and use that in the few places that open-coded it using __SEMAPHORE_INITIALIZER(). Signed-off-by: Peter Zijlstra (Intel) [mcgrof: add some tribal knowledge about why some folks prefer binary sempahores over mutexes] Reviewed-by: Sergey Senozhatsky Reviewed-by: Davidlohr Bueso Signed-off-by: Luis Chamberlain commit cd3beeb8c62473ac5ffee8ad7a8890f0363cf1f0 Merge: 60ba2fda52805 d29a966b72fb3 Author: Mark Brown Date: Tue Apr 18 19:08:24 2023 +0100 ASoC: cs35l56: Updates for B0 silicon Merge series from Richard Fitzgerald : These patches make some small changes to align with the B0 silicon revision. commit a1c86caa2c63f8c45020c39397d42eeff9beefd7 Author: Bartosz Golaszewski Date: Mon Apr 17 11:46:35 2023 +0200 dt-bindings: interrupt-controller: qcom-pdc: add compatible for sa8775p Add a compatible for the Power Domain Controller on SA8775p platforms. Increase the number of PDC pin mappings. Signed-off-by: Bartosz Golaszewski Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230417094635.302344-1-brgl@bgdev.pl Signed-off-by: Rob Herring commit 5c899820baaf4a5e9e027d5066c01c04afed290d Author: Alain Volmat Date: Sun Apr 16 22:04:41 2023 +0200 dt-bindings: reset: remove stih415/stih416 reset Remove the stih415 and stih416 reset dt-bindings since those two platforms are no more supported. Signed-off-by: Alain Volmat Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230416200442.61554-1-avolmat@me.com Signed-off-by: Rob Herring commit 3f90faa36057d65bde528d7fbb68adad2da4c870 Author: Alain Volmat Date: Sun Apr 16 21:58:56 2023 +0200 dt-bindings: net: dwmac: sti: remove stih415/sti416/stid127 Remove compatible for stih415/stih416 and stid127 which are no more supported. Signed-off-by: Alain Volmat Acked-by: Krzysztof Kozlowski Reviewed-by: Horatiu Vultur Link: https://lore.kernel.org/r/20230416195857.61284-1-avolmat@me.com Signed-off-by: Rob Herring commit ae087ca2b3931f23218b162a30ae542259f88846 Author: Alain Volmat Date: Sun Apr 16 21:09:50 2023 +0200 dt-bindings: irqchip: sti: remove stih415/stih416 and stid127 Remove bindings for the stih415/stih416/stid127 since they are not supported within the kernel anymore. Signed-off-by: Alain Volmat Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230416190950.18929-1-avolmat@me.com Signed-off-by: Rob Herring commit f960e57dca9fa3653d9e9c0a9e1386d2241e0aad Author: Lukas Wunner Date: Sat Mar 11 15:40:17 2023 +0100 cxl/pci: Rightsize CDAT response allocation Jonathan notes that cxl_cdat_get_length() and cxl_cdat_read_table() allocate 32 dwords for the DOE response even though it may be smaller. In the case of cxl_cdat_get_length(), only the second dword of the response is of interest (it contains the length). So reduce the allocation to 2 dwords and let DOE discard the remainder. In the case of cxl_cdat_read_table(), a correctly sized allocation for the full CDAT already exists. Let DOE write each table entry directly into that allocation. There's a snag in that the table entry is preceded by a Table Access Response Header (1 dword, CXL 3.0 table 8-14). Save the last dword of the previous table entry, let DOE overwrite it with the header of the next entry and restore it afterwards. The resulting CDAT is preceded by 4 unavoidable useless bytes. Increase the allocation size accordingly. The buffer overflow check in cxl_cdat_read_table() becomes unnecessary because the remaining bytes in the allocation are tracked in "length", which is passed to DOE and limits how many bytes it writes to the allocation. Additionally, cxl_cdat_read_table() bails out if the DOE response is truncated due to insufficient space. Tested-by: Ira Weiny Signed-off-by: Lukas Wunner Reviewed-by: Jonathan Cameron Cc: Dave Jiang Link: https://lore.kernel.org/r/7a4e1f86958a79a70f29b96a92199522f08f8322.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit 7a877c923995b8257069209b1d757735af4f4ce0 Author: Dave Jiang Date: Sat Mar 11 15:40:16 2023 +0100 cxl/pci: Simplify CDAT retrieval error path The cdat.table and cdat.length fields in struct cxl_port are set before CDAT retrieval and must therefore be unset on failure. Simplify by setting only on success. Suggested-by: Jonathan Cameron Link: https://lore.kernel.org/linux-cxl/20230209113422.00007017@Huawei.com/ Signed-off-by: Dave Jiang [lukas: rebase and rephrase commit message] Signed-off-by: Lukas Wunner Reviewed-by: Ira Weiny Reviewed-by: Jonathan Cameron Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/7a5c7104fb6a3016dbaec1c5d0ed34619ea11a0c.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit cedf8d8a5013ce515df2edbc52575614f3409593 Author: Lukas Wunner Date: Sat Mar 11 15:40:15 2023 +0100 PCI/DOE: Relax restrictions on request and response size An upcoming user of DOE is CMA (Component Measurement and Authentication, PCIe r6.0 sec 6.31). It builds on SPDM (Security Protocol and Data Model): https://www.dmtf.org/dsp/DSP0274 SPDM message sizes are not always a multiple of dwords. To transport them over DOE without using bounce buffers, allow sending requests and receiving responses whose final dword is only partially populated. To be clear, PCIe r6.0 sec 6.30.1 specifies the Data Object Header 2 "Length" in dwords and pci_doe_send_req() and pci_doe_recv_resp() read/write dwords. So from a spec point of view, DOE is still specified in dwords and allowing non-dword request/response buffers is merely for the convenience of callers. Tested-by: Ira Weiny Signed-off-by: Lukas Wunner Reviewed-by: Ming Li Reviewed-by: Jonathan Cameron Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/151b1a6a1794afb65d941287ecbc032c5b8004b9.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit 74e491e5d1bcc35a699291df720191760ff4130e Author: Lukas Wunner Date: Sat Mar 11 15:40:14 2023 +0100 PCI/DOE: Make mailbox creation API private The PCI core has just been amended to create a pci_doe_mb struct for every DOE instance on device enumeration. CXL (the only in-tree DOE user so far) has been migrated to use those mailboxes instead of creating its own. That leaves pcim_doe_create_mb() and pci_doe_for_each_off() without any callers, so drop them. pci_doe_supports_prot() is now only used internally, so declare it static. pci_doe_destroy_mb() is no longer used as callback for devm_add_action(), so refactor it to accept a struct pci_doe_mb pointer instead of a generic void pointer. Because pci_doe_create_mb() is only called on device enumeration, i.e. before driver binding, the workqueue name never contains a driver name. So replace dev_driver_string() with dev_bus_name() when generating the workqueue name. Tested-by: Ira Weiny Signed-off-by: Lukas Wunner Reviewed-by: Ming Li Reviewed-by: Ira Weiny Reviewed-by: Jonathan Cameron Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/64f614b6584982986c55d2c6229b4ee2b276dd59.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit af0a6c3587dc39df348d23c46996b9dad46d07db Author: Lukas Wunner Date: Sat Mar 11 15:40:13 2023 +0100 cxl/pci: Use CDAT DOE mailbox created by PCI core The PCI core has just been amended to create a pci_doe_mb struct for every DOE instance on device enumeration. Drop creation of a (duplicate) CDAT DOE mailbox on cxl probing in favor of the one already created by the PCI core. Tested-by: Ira Weiny Signed-off-by: Lukas Wunner Reviewed-by: Ira Weiny Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/becaf70e8faf9681d474200117d62d7eaac46cca.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit ac04840350e2c21a17d867b262a1586603b87a92 Author: Lukas Wunner Date: Sat Mar 11 15:40:12 2023 +0100 PCI/DOE: Create mailboxes on device enumeration Currently a DOE instance cannot be shared by multiple drivers because each driver creates its own pci_doe_mb struct for a given DOE instance. For the same reason a DOE instance cannot be shared between the PCI core and a driver. Moreover, finding out which protocols a DOE instance supports requires creating a pci_doe_mb for it. If a device has multiple DOE instances, a driver looking for a specific protocol may need to create a pci_doe_mb for each of the device's DOE instances and then destroy those which do not support the desired protocol. That's obviously an inefficient way to do things. Overcome these issues by creating mailboxes in the PCI core on device enumeration. Provide a pci_find_doe_mailbox() API call to allow drivers to get a pci_doe_mb for a given (pci_dev, vendor, protocol) triple. This API is modeled after pci_find_capability() and can later be amended with a pci_find_next_doe_mailbox() call to iterate over all mailboxes of a given pci_dev which support a specific protocol. On removal, destroy the mailboxes in pci_destroy_dev(), after the driver is unbound. This allows drivers to use DOE in their ->remove() hook. On surprise removal, cancel ongoing DOE exchanges and prevent new ones from being scheduled. Thereby ensure that a hot-removed device doesn't needlessly wait for a running exchange to time out. Tested-by: Ira Weiny Signed-off-by: Lukas Wunner Reviewed-by: Ming Li Reviewed-by: Ira Weiny Reviewed-by: Jonathan Cameron Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/40a6f973f72ef283d79dd55e7e6fddc7481199af.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit 022b66f38195f6760c193ceee18e0b676d9c9070 Author: Lukas Wunner Date: Sat Mar 11 15:40:11 2023 +0100 PCI/DOE: Allow mailbox creation without devres management DOE mailbox creation is currently only possible through a devres-managed API. The lifetime of mailboxes thus ends with driver unbinding. An upcoming commit will create DOE mailboxes upon device enumeration by the PCI core. Their lifetime shall not be limited by a driver. Therefore rework pcim_doe_create_mb() into the non-devres-managed pci_doe_create_mb(). Add pci_doe_destroy_mb() for mailbox destruction on device removal. Provide a devres-managed wrapper under the existing pcim_doe_create_mb() name. The error path of pcim_doe_create_mb() previously called xa_destroy() if alloc_ordered_workqueue() failed. That's unnecessary because the xarray is still empty at that point. It doesn't need to be destroyed until it's been populated by pci_doe_cache_protocols(). Arrange the error path of the new pci_doe_create_mb() accordingly. pci_doe_cancel_tasks() is no longer used as callback for devm_add_action(), so refactor it to accept a struct pci_doe_mb pointer instead of a generic void pointer. Tested-by: Ira Weiny Signed-off-by: Lukas Wunner Reviewed-by: Ming Li Reviewed-by: Jonathan Cameron Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/7c9a63867d70233c5e9d26cd8bf956742cd6d650.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit c8fc07abeba5cd14e88a2d77f4c4fed670da9492 Author: Lukas Wunner Date: Sat Mar 11 15:40:10 2023 +0100 PCI/DOE: Deduplicate mailbox flushing When a DOE mailbox is torn down, its workqueue is flushed once in pci_doe_flush_mb() through a call to flush_workqueue() and subsequently flushed once more in pci_doe_destroy_workqueue() through a call to destroy_workqueue(). Deduplicate by dropping flush_workqueue() from pci_doe_flush_mb(). Rename pci_doe_flush_mb() to pci_doe_cancel_tasks() to more aptly describe what it now does. Tested-by: Ira Weiny Signed-off-by: Lukas Wunner Reviewed-by: Ming Li Reviewed-by: Jonathan Cameron Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/1f009f60b326d1c6d776641d4b20aff27de0c234.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit 0821ff8ed059d38dfc9bec2106c5cc53bcaa15b1 Author: Lukas Wunner Date: Sat Mar 11 15:40:09 2023 +0100 PCI/DOE: Make asynchronous API private A synchronous API for DOE has just been introduced. CXL (the only in-tree DOE user so far) was converted to use it instead of the asynchronous API. Consequently, pci_doe_submit_task() as well as the pci_doe_task struct are only used internally, so make them private. Tested-by: Ira Weiny Signed-off-by: Lukas Wunner Reviewed-by: Ming Li Reviewed-by: Ira Weiny Reviewed-by: Jonathan Cameron Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/cc19544068483681e91dfe27545c2180cd09f931.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit 58709b924ea5911b7d500bba9ed36b71e1e76598 Author: Lukas Wunner Date: Sat Mar 11 15:40:08 2023 +0100 cxl/pci: Use synchronous API for DOE A synchronous API for DOE has just been introduced. Convert CXL CDAT retrieval over to it. Tested-by: Ira Weiny Signed-off-by: Lukas Wunner Reviewed-by: Ira Weiny Reviewed-by: Jonathan Cameron Cc: Dan Williams Link: https://lore.kernel.org/r/c329c0a21c11c3b524ce2336b0bbb3c80a28c415.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit 62e8b17ffc2ff0b0e29d5e05a18570c3e70b35ff Author: Lukas Wunner Date: Sat Mar 11 15:40:07 2023 +0100 PCI/DOE: Provide synchronous API and use it internally The DOE API only allows asynchronous exchanges and forces callers to provide a completion callback. Yet all existing callers only perform synchronous exchanges. Upcoming commits for CMA (Component Measurement and Authentication, PCIe r6.0 sec 6.31) likewise require only synchronous DOE exchanges. Provide a synchronous pci_doe() API call which builds on the internal asynchronous machinery. Convert the internal pci_doe_discovery() to the new call. The new API allows submission of const-declared requests, necessitating the addition of a const qualifier in struct pci_doe_task. Tested-by: Ira Weiny Signed-off-by: Lukas Wunner Reviewed-by: Ming Li Reviewed-by: Ira Weiny Reviewed-by: Davidlohr Bueso Reviewed-by: Dan Williams Reviewed-by: Jonathan Cameron Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/0f444206da9615c56301fbaff459c0f45d27f122.1678543498.git.lukas@wunner.de Signed-off-by: Dan Williams commit c841ecd8277154c9297dd9ac959494f6deb61e76 Author: Dan Williams Date: Fri Apr 14 11:54:16 2023 -0700 cxl/hdm: Add more HDM decoder debug messages at startup A recent debug session yielded a couple debug messages that were useful for determining the reason why the driver was or was not falling back to CXL range register emulation, and for identifying decoder setting enumeration problems. Reviewed-by: Dave Jiang Reviewed-by: Alison Schofield Link: https://lore.kernel.org/r/168149845668.792294.11814353796371419167.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 7bba261e0aa6e8e5f28a3a3def8338b6512534ee Author: Dan Williams Date: Fri Apr 14 11:54:11 2023 -0700 cxl/port: Scan single-target ports for decoders Do not assume that a single-target port falls back to a passthrough decoder configuration. Scan for decoders and only fallback after probing that the HDM decoder capability is not present. One user visible affect of this bug is the inability to enumerate present CXL regions as the decoder settings for the present decoders are skipped. Fixes: d17d0540a0db ("cxl/core/hdm: Add CXL standard decoder enumeration to the core") Reported-by: Jonathan Cameron Link: http://lore.kernel.org/r/20230227153128.8164-1-Jonathan.Cameron@huawei.com Cc: Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Alison Schofield Link: https://lore.kernel.org/r/168149845130.792294.3210421233937427962.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 104087a8aaf0f46d89376917eca977fad972cc93 Author: Dan Williams Date: Fri Apr 14 11:54:06 2023 -0700 cxl/core: Drop unused io-64-nonatomic-lo-hi.h After the discovery of a case where an implementation misbehaves with register reads larger than the definition of the register the other usages of readq() were audited and found to be correct, but some cases where the io-64-nonatomic-lo-hi.h include is not needed were discovered, delete them. Reviewed-by: Dave Jiang Reviewed-by: Alison Schofield Link: https://lore.kernel.org/r/168149844596.792294.8273108394688012953.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 1423885c84a5b3a53b79bcf241b18124d0d7cba6 Author: Dan Williams Date: Fri Apr 14 11:54:00 2023 -0700 cxl/hdm: Use 4-byte reads to retrieve HDM decoder base+limit The CXL specification mandates that 4-byte registers must be accessed with 4-byte access cycles. CXL 3.0 8.2.3 "Component Register Layout and Definition" states that the behavior is undefined if (2) 32-bit registers are accessed as an 8-byte quantity. It turns out that at least one hardware implementation is sensitive to this in practice. The @size variable results in zero with: size = readq(hdm + CXL_HDM_DECODER0_SIZE_LOW_OFFSET(which)); ...and the correct size with: lo = readl(hdm + CXL_HDM_DECODER0_SIZE_LOW_OFFSET(which)); hi = readl(hdm + CXL_HDM_DECODER0_SIZE_HIGH_OFFSET(which)); size = (hi << 32) + lo; Fixes: d17d0540a0db ("cxl/core/hdm: Add CXL standard decoder enumeration to the core") Cc: Reviewed-by: Dave Jiang Reviewed-by: Alison Schofield Link: https://lore.kernel.org/r/168149844056.792294.8224490474529733736.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 7701c8bef4f14bd9f7940c6ed0e6a73584115a96 Author: Dan Williams Date: Fri Apr 14 11:53:55 2023 -0700 cxl/hdm: Fail upon detecting 0-sized decoders Decoders committed with 0-size lead to later crashes on shutdown as __cxl_dpa_release() assumes a 'struct resource' has been established in the in 'cxlds->dpa_res'. Just fail the driver load in this instance since there are deeper problems with the enumeration or the setup when this happens. Fixes: 9c57cde0dcbd ("cxl/hdm: Enumerate allocated DPA") Cc: Reviewed-by: Dave Jiang Reviewed-by: Alison Schofield Link: https://lore.kernel.org/r/168149843516.792294.11872242648319572632.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 3be1bc2fe9d2e4fc1375efa2567d2f58cd2a2a7c Author: Saurabh Sengar Date: Mon Apr 10 22:55:32 2023 -0700 x86/hyperv: VTL support for Hyper-V Virtual Trust Levels (VTL) helps enable Hyper-V Virtual Secure Mode (VSM) feature. VSM is a set of hypervisor capabilities and enlightenments offered to host and guest partitions which enable the creation and management of new security boundaries within operating system software. VSM achieves and maintains isolation through VTLs. Add early initialization for Virtual Trust Levels (VTL). This includes initializing the x86 platform for VTL and enabling boot support for secondary CPUs to start in targeted VTL context. For now, only enable the code for targeted VTL level as 2. When starting an AP at a VTL other than VTL0, the AP must start directly in 64-bit mode, bypassing the usual 16-bit -> 32-bit -> 64-bit mode transition sequence that occurs after waking up an AP with SIPI whose vector points to the 16-bit AP startup trampoline code. Signed-off-by: Saurabh Sengar Reviewed-by: Michael Kelley Reviewed-by: Stanislav Kinsburskii Link: https://lore.kernel.org/r/1681192532-15460-6-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu commit d01b9a9f2d0131e1e249177a70e6b80d146d16d2 Author: Saurabh Sengar Date: Mon Apr 10 22:55:31 2023 -0700 Drivers: hv: Kconfig: Add HYPERV_VTL_MODE Add HYPERV_VTL_MODE Kconfig flag for VTL mode. Signed-off-by: Saurabh Sengar Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1681192532-15460-5-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu commit 0a7a00580a4fad9a6cd28c2d825e0e5ae917e59e Author: Saurabh Sengar Date: Mon Apr 10 22:55:30 2023 -0700 x86/hyperv: Make hv_get_nmi_reason public Move hv_get_nmi_reason to .h file so it can be used in other modules as well. Signed-off-by: Saurabh Sengar Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1681192532-15460-4-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu commit c26e0527aaf84a34b4774d80c9a9baa65f4d77f2 Author: Saurabh Sengar Date: Mon Apr 10 22:55:29 2023 -0700 x86/hyperv: Add VTL specific structs and hypercalls Add structs and hypercalls required to enable VTL support on x86. Signed-off-by: Saurabh Sengar Reviewed-by: Michael Kelley Reviewed-by: Stanislav Kinsburskii Link: https://lore.kernel.org/r/1681192532-15460-3-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu commit d21a19e1c2f55504c4b3e9f9c82b4554bfa90d7b Author: Saurabh Sengar Date: Mon Apr 10 22:55:28 2023 -0700 x86/init: Make get/set_rtc_noop() public Make get/set_rtc_noop() to be public so that they can be used in other modules as well. Co-developed-by: Tianyu Lan Signed-off-by: Tianyu Lan Signed-off-by: Saurabh Sengar Reviewed-by: Wei Liu Reviewed-by: Michael Kelley Acked-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/1681192532-15460-2-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu commit 2a61e7b7bd92f4745457c60c86d8bf045d185bda Author: Rob Herring Date: Fri Mar 10 08:47:10 2023 -0600 mailbox: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Signed-off-by: Jassi Brar commit 76d4adacd52e78bea2e393081f2a5766261d1e3a Author: Elliot Berman Date: Mon Apr 10 09:16:54 2023 -0700 mailbox: pcc: Use mbox_bind_client Use generic mbox_bind_client() to bind omap mailbox channel to a client. mbox_bind_client is identical to the replaced lines, except that it: - Does the operation under con_mutex which prevents possible races in removal path - Sets TXDONE_BY_ACK if pcc uses TXDONE_BY_POLL and the client knows when tx is done. TXDONE_BY_ACK is already set if there's no interrupt, so this is not applicable. - Calls chan->mbox->ops->startup. This is usecase for requesting irq: move the devm_request_irq into the startup callback and unregister it in the shutdown path. Tested-by: Sudeep Holla Signed-off-by: Elliot Berman Signed-off-by: Jassi Brar commit f11ff34d883a26f4f13c307aeb556f2b076a5066 Author: Elliot Berman Date: Mon Apr 10 09:16:53 2023 -0700 mailbox: omap: Use mbox_bind_client Use generic mbox_bind_client() to bind omap mailbox channel to a client. mbox_bind_client is identical to the replaced lines, except that it: - Does the operation under con_mutex which prevents possible races in removal path - Sets TXDONE_BY_ACK if omap uses TXDONE_BY_POLL. omap uses TXDONE_BY_IRQ, so this check is not applicable. - Calls chan->mbox->ops->startup, if available. omap doesn't have, so this is not applicable. Signed-off-by: Elliot Berman Signed-off-by: Jassi Brar commit 85a953806557dbf25d16e8c132b5b9b100d16496 Author: Elliot Berman Date: Mon Apr 10 09:16:52 2023 -0700 mailbox: Allow direct registration to a channel Support virtual mailbox controllers and clients which are not platform devices or come from the devicetree by allowing them to match client to channel via some other mechanism. Tested-by: Sudeep Holla (pcc) Signed-off-by: Elliot Berman Signed-off-by: Jassi Brar commit d663d93bb47e7ab45602b227701022d8aa16040a Author: Lars-Peter Clausen Date: Thu Apr 13 19:10:22 2023 -0700 i2c: xiic: xiic_xfer(): Fix runtime PM leak on error path The xiic_xfer() function gets a runtime PM reference when the function is entered. This reference is released when the function is exited. There is currently one error path where the function exits directly, which leads to a leak of the runtime PM reference. Make sure that this error path also releases the runtime PM reference. Fixes: fdacc3c7405d ("i2c: xiic: Switch from waitqueue to completion") Signed-off-by: Lars-Peter Clausen Reviewed-by: Michal Simek Signed-off-by: Wolfram Sang commit ae1664f04f504a998737f5bb563f16b44357bcca Author: Lars-Peter Clausen Date: Thu Apr 13 19:10:21 2023 -0700 i2c: cadence: cdns_i2c_master_xfer(): Fix runtime PM leak on error path The cdns_i2c_master_xfer() function gets a runtime PM reference when the function is entered. This reference is released when the function is exited. There is currently one error path where the function exits directly, which leads to a leak of the runtime PM reference. Make sure that this error path also releases the runtime PM reference. Fixes: 1a351b10b967 ("i2c: cadence: Added slave support") Signed-off-by: Lars-Peter Clausen Reviewed-by: Michal Simek Signed-off-by: Wolfram Sang commit a8707f5538846611c90116c14f72539ad5fb37da Author: Sebastian Reichel Date: Tue Apr 18 16:21:08 2023 +0200 irqchip/gic-v3: Add Rockchip 3588001 erratum workaround Rockchip RK3588/RK3588s GIC600 integration does not support the sharability feature. Rockchip assigned Erratum ID #3588001 for this issue. Note, that the 0x0201743b ID is not Rockchip specific and thus there is an extra of_machine_is_compatible() check. The flags are named FORCE_NON_SHAREABLE to be vendor agnostic, since apparently similar integration design errors exist in other platforms and they can reuse the same flag. Co-developed-by: XiaoDong Huang Signed-off-by: XiaoDong Huang Co-developed-by: Kever Yang Signed-off-by: Kever Yang Co-developed-by: Lucas Tanure Signed-off-by: Lucas Tanure Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Sebastian Reichel Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230418142109.49762-2-sebastian.reichel@collabora.com commit 928f4de0c03eb2eddd172395809094135fd879f7 Author: Rob Herring Date: Fri Mar 10 08:47:00 2023 -0600 sparc: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Link: https://lore.kernel.org/r/20230310144700.1541345-1-robh@kernel.org Signed-off-by: Rob Herring commit 6a71ca744bb52d222f821c6239aa44ffa16e5937 Author: Rob Herring Date: Fri Mar 10 08:46:59 2023 -0600 sparc: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Link: https://lore.kernel.org/r/20230310144659.1541247-1-robh@kernel.org Signed-off-by: Rob Herring commit 01875342ae659629b72c730ead5461eb330a9a02 Merge: 2087e85bb66ee b1b90514eaa34 Author: Mark Brown Date: Tue Apr 18 17:19:48 2023 +0100 spi: spi-cadence: Add Slave mode support Merge series from Srinivas Goud : Currently SPI Cadence controller works in Master mode only. Update driver to support Slave mode and also Full duplex transfer support in Slave mode commit 6bb1504d5fe10e4ccf0b5318525948c86d5aa915 Author: Rob Herring Date: Thu Feb 16 12:12:04 2023 -0600 bus: mvebu-mbus: Remove open coded "ranges" parsing "ranges" is a standard property, and we have common helper functions for parsing it, so let's use them. Cc: Andrew Lunn Cc: Sebastian Hesselbarth Cc: Gregory Clement Link: https://lore.kernel.org/r/20230216181204.2895676-1-robh@kernel.org Signed-off-by: Rob Herring commit d29a966b72fb370128096393961f2c456ff24e3d Author: Richard Fitzgerald Date: Tue Apr 18 15:43:09 2023 +0100 ASoC: cs35l56: Rename mixer source defines for SoundWire DP1 Rename the mixer source defines from CS35L56_INPUT_SRC_SWIRE_RXn to CS35L56_INPUT_SRC_SWIRE_DP1_CHANNELn to match the latest datasheet. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230418144309.1100721-5-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit d3a4efb334e5f6cbb3f2741fa07a873a2a78b016 Author: Richard Fitzgerald Date: Tue Apr 18 15:43:08 2023 +0100 ASoC: cs35l56: Remove SDW2RX1 mixer source The mixer source index value for SDW2RX1 is different between A1 and B0 silicon. As the driver doesn't provide a DAI for SDW2 just remove it as a mixer source option. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230418144309.1100721-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 5ab28c78a125a724684958f4caf8210127d3f528 Author: Richard Fitzgerald Date: Tue Apr 18 15:43:07 2023 +0100 ASoC: cs35l56: Remove SDW1 TX5 and TX6 Reduce SDW1 to 4 channels and remove the controls for SDW1 TX5 and TX6. The TX5 and TX6 channels have been removed from B0 silicon. There is no need to support them on A1 silicon. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230418144309.1100721-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 16e5fc8ae793947d7dd0de63c7a613798f75c237 Author: Richard Fitzgerald Date: Tue Apr 18 15:43:06 2023 +0100 ASoC: cs35l56: Update comment on masking of EINT20 interrupts EINT20 contains wake-source interrupts and also interface-blocked interrupts, which all default to unmasked after reset or wake. The comment in cs35l56_init() only mentioned the wake interrupts. Update the comment so it's clear that it's intentional to also mask the *_BLOCKED interrupts. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230418144309.1100721-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit c1660d88a064409879f6d467754bbe27259c71bb Author: Yangtao Li Date: Fri Apr 14 00:59:51 2023 +0800 f2fs: add has_enough_free_secs() Replace !has_not_enough_free_secs w/ has_enough_free_secs. BTW avoid nested 'if' statements in f2fs_balance_fs(). Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim commit bd90c5cd339a9d7cdc609d2d6310b80dc697070d Author: Jaegeuk Kim Date: Thu Apr 6 16:56:20 2023 -0700 f2fs: relax sanity check if checkpoint is corrupted 1. extent_cache - let's drop the largest extent_cache 2. invalidate_block - don't show the warnings Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2d3f197bad9796f81bc0c0c41f571b0e418f266f Author: Jaegeuk Kim Date: Mon Apr 10 14:48:50 2023 -0700 f2fs: refactor f2fs_gc to call checkpoint in urgent condition The major change is to call checkpoint, if there's not enough space while having some prefree segments in FG_GC case. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 44295af5019f1997d038ad2611086a2d1e2af167 Author: Sanjay Chandrashekara Date: Tue Apr 18 17:04:54 2023 +0530 cpufreq: use correct unit when verify cur freq cpufreq_verify_current_freq checks() if the frequency returned by the hardware has a slight delta with the valid frequency value last set and returns "policy->cur" if the delta is within "1 MHz". In the comparison, "policy->cur" is in "kHz" but it's compared against HZ_PER_MHZ. So, the comparison range becomes "1 GHz". Fix this by comparing against KHZ_PER_MHZ instead of HZ_PER_MHZ. Fixes: f55ae08c8987 ("cpufreq: Avoid unnecessary frequency updates due to mismatch") Signed-off-by: Sanjay Chandrashekara [ sumit gupta: Commit message update ] Signed-off-by: Sumit Gupta Signed-off-by: Rafael J. Wysocki commit 03c57b0160f621e1b2a05f9d4b7832ccfb10c391 Author: Hans de Goede Date: Tue Apr 18 10:54:37 2023 +0200 ACPI: LPSS: Add 80862289 ACPI _HID for second PWM controller on Cherry Trail On some Cherry Trail devices the second PWM controller uses 80862289 as ACPI _HID, rather then using 80862288 as is done for both controllers on most models. Add the missing 80862289 ACPI _HID, note this uses its own lpss_device_desc, without ".setup = bsw_pwm_setup" so that the pwm_lookup is not added for it. On devices where both controllers use the 80862288 _HID bsw_pwm_setup() does a UID check to avoid registering the lookup for the second controller but that will not work here. Adding the missing id fixes the second PWM controller no longer working after the entire LPSS1 island has been in D3 at least once, which causes the contents of the LPSS private registers to get lost. Adding the _HID makes acpi_lpss restore these when the controller moves from D3 to D0. Reviewed-by: Mika Westerberg Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit faae443738c6f0dac9b0d3d11d108f6911a989a9 Author: Rafael J. Wysocki Date: Fri Apr 14 16:00:48 2023 +0200 ACPI: bus: Ensure that notify handlers are not running after removal Currently, acpi_device_remove_notify_handler() may return while the notify handler being removed is still running which may allow the module holding that handler to be torn down prematurely. Address this issue by making acpi_device_remove_notify_handler() wait for the handling of all the ACPI events in progress to complete before returning. Fixes: 5894b0c46e49 ("ACPI / scan: Move bus operations and notification routines to bus.c") Signed-off-by: Rafael J. Wysocki commit 6d572d39b21fdd7411fe855a4fad479683ad99c5 Author: Rafael J. Wysocki Date: Fri Apr 14 15:59:52 2023 +0200 ACPI: bus: Add missing braces to acpi_sb_notify() As per the kernel coding style. No functional impact. Signed-off-by: Rafael J. Wysocki commit 82f2734d99d7e6a2327ff4e2122dd0db425b598f Author: Rob Herring Date: Mon Mar 27 12:01:13 2023 -0500 dt-bindings: remoteproc: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Reviewed-by: Mathieu Poirier Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327170114.4102315-1-robh@kernel.org commit b550bc90bb8218da8c944f28b99cb372ad969749 Author: James Clark Date: Tue Apr 18 15:12:03 2023 +0100 perf cs-etm: Fix segfault in dso lookup map__dso() is called before thread__find_map() which always results in a null pointer dereference. Fix it by finding first, then checking if it exists. Fixes: 63df0e4bc368adbd ("perf map: Add accessor for dso") Signed-off-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230418141203.673465-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit bd2c0c4452eea00e22c4008d8e64e58fa73857e5 Merge: b1b99b0cc2e5a f326e72a6e0ba Author: Arnd Bergmann Date: Tue Apr 18 17:04:43 2023 +0200 Merge tag 'mvebu-arm64-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/arm mvebu arm64 for 6.4 (part 1) turris-mox-rwtm firmware: - prevent modification at runtime of the kobj_type struct * tag 'mvebu-arm64-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: firmware: turris-mox-rwtm: make kobj_type structure constant Link: https://lore.kernel.org/r/878repzfbp.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit b1b99b0cc2e5a342613fd9db3e6f54928d7c76d6 Author: Jeremy J. Peper Date: Fri Mar 17 10:43:47 2023 -0500 ARM: mv78xx0: fix entries for gpios, buttons and usb ports Original code was largely copy-pasted from the reference board code, correct values to reflect the hardware actually present in the TS-WXL. Signed-off-by: Jeremy J. Peper Signed-off-by: Arnd Bergmann commit 4b01f735a619ae535d4459aec3b070c9336e56b4 Author: Jeremy J. Peper Date: Fri Mar 17 10:43:46 2023 -0500 ARM: mv78xx0: add code to enable XOR and CRYPTO engines on mv78xx0 Adding missing code/values required to enable the XOR and CESA engines for this SoC Signed-off-by: Jeremy J. Peper Signed-off-by: Arnd Bergmann commit 189e3ddb64cca682fc13a0f3d7216a1314a7975d Author: Jeremy J. Peper Date: Fri Mar 17 10:43:45 2023 -0500 ARM: mv78xx0: set the correct driver for the i2c RTC Original code was largely copy-pasted from the reference board code, adjust to use the actual RTC chip present on the TS-WXL. Signed-off-by: Jeremy J. Peper Signed-off-by: Arnd Bergmann commit cf15079c6b6163c15254437d862351e5b438be8b Author: Jeremy J. Peper Date: Fri Mar 17 10:43:44 2023 -0500 ARM: mv78xx0: adjust init logic for ts-wxl to reflect single core dev Original code was largely copy-pasted from the reference board code, adjust pcie initialiazation to reflect the TS-WXL using the single-core variant of this SoC. Correct pcie_port_size to be a power of 2 as required. Signed-off-by: Jeremy J. Peper Reviewed-by: Arnd Bergmann Signed-off-by: Arnd Bergmann commit 263dda24fff0957f6b0a9abde2809122f7f0fad8 Author: Frederic Weisbecker Date: Wed Feb 22 15:46:49 2023 +0100 selftests/proc: Assert clock_gettime(CLOCK_BOOTTIME) VS /proc/uptime monotonicity The first field of /proc/uptime relies on the CLOCK_BOOTTIME clock which can also be fetched from clock_gettime() API. Improve the test coverage while verifying the monotonicity of CLOCK_BOOTTIME accross both interfaces. Suggested-by: Thomas Gleixner Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230222144649.624380-9-frederic@kernel.org commit 270b2a679ea7be1ee2d84ea67751fb1ab15bcb20 Author: Frederic Weisbecker Date: Wed Feb 22 15:46:48 2023 +0100 selftests/proc: Remove idle time monotonicity assertions Due to broken iowait task counting design (cf: comments above get_cpu_idle_time_us() and nr_iowait()), it is not possible to provide the guarantee that /proc/stat or /proc/uptime display monotonic idle time values. Remove the assertions that verify the related wrong assumption so that testers and maintainers don't spend more time on that. Reported-by: Yu Liao Reported-by: Thomas Gleixner Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230222144649.624380-8-frederic@kernel.org commit 9a1d4b8a7b80c5c796f05744851c535c5020024b Author: Frederic Weisbecker Date: Wed Feb 22 15:46:47 2023 +0100 MAINTAINERS: Remove stale email address Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230222144649.624380-7-frederic@kernel.org commit 289dafed3851a7693a47896f5d09420bf6046ef2 Author: Frederic Weisbecker Date: Wed Feb 22 15:46:46 2023 +0100 timers/nohz: Remove middle-function __tick_nohz_idle_stop_tick() There is no need for the __tick_nohz_idle_stop_tick() function between tick_nohz_idle_stop_tick() and its implementation. Remove that unnecessary step. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230222144649.624380-6-frederic@kernel.org commit ead70b75237371c735a481a9843b411cfbb18404 Author: Frederic Weisbecker Date: Wed Feb 22 15:46:45 2023 +0100 timers/nohz: Add a comment about broken iowait counter update race The per-cpu iowait task counter is incremented locally upon sleeping. But since the task can be woken to (and by) another CPU, the counter may then be decremented remotely. This is the source of a race involving readers VS writer of idle/iowait sleeptime. The following scenario shows an example where a /proc/stat reader observes a pending sleep time as IO whereas that pending sleep time later eventually gets accounted as non-IO. CPU 0 CPU 1 CPU 2 ----- ----- ------ //io_schedule() TASK A current->in_iowait = 1 rq(0)->nr_iowait++ //switch to idle // READ /proc/stat // See nr_iowait_cpu(0) == 1 return ts->iowait_sleeptime + ktime_sub(ktime_get(), ts->idle_entrytime) //try_to_wake_up(TASK A) rq(0)->nr_iowait-- //idle exit // See nr_iowait_cpu(0) == 0 ts->idle_sleeptime += ktime_sub(ktime_get(), ts->idle_entrytime) As a result subsequent reads on /proc/stat may expose backward progress. This is unfortunately hardly fixable. Just add a comment about that condition. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230222144649.624380-5-frederic@kernel.org commit 620a30fa0bd14878891b22bf2261e6ed4587c2b4 Author: Frederic Weisbecker Date: Wed Feb 22 15:46:44 2023 +0100 timers/nohz: Protect idle/iowait sleep time under seqcount Reading idle/IO sleep time (eg: from /proc/stat) can race with idle exit updates because the state machine handling the stats is not atomic and requires a coherent read batch. As a result reading the sleep time may report irrelevant or backward values. Fix this with protecting the simple state machine within a seqcount. This is expected to be cheap enough not to add measurable performance impact on the idle path. Note this only fixes reader VS writer condition partitially. A race remains that involves remote updates of the CPU iowait task counter. It can hardly be fixed. Reported-by: Yu Liao Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230222144649.624380-4-frederic@kernel.org commit 07b65a800b6d5b6afbd6a91487b47038eac97c21 Author: Frederic Weisbecker Date: Wed Feb 22 15:46:43 2023 +0100 timers/nohz: Only ever update sleeptime from idle exit The idle and IO sleeptime statistics appearing in /proc/stat can be currently updated from two sites: locally on idle exit and remotely by cpufreq. However there is no synchronization mechanism protecting concurrent updates. It is therefore possible to account the sleeptime twice, among all the other possible broken scenarios. To prevent from breaking the sleeptime accounting source, restrict the sleeptime updates to the local idle exit site. If there is a delta to add since the last update, IO/Idle sleep time readers will now only compute the delta without actually writing it back to the internal idle statistic fields. This fixes a writer VS writer race. Note there are still two known reader VS writer races to handle. A subsequent patch will fix one. Reported-by: Yu Liao Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230222144649.624380-3-frederic@kernel.org commit 605da849d5982dee0527edb2488b79795f31a150 Author: Frederic Weisbecker Date: Wed Feb 22 15:46:42 2023 +0100 timers/nohz: Restructure and reshuffle struct tick_sched Restructure and group fields by access in order to optimize cache layout. While at it, also add missing kernel doc for two fields: @last_jiffies and @idle_expires. Reported-by: Thomas Gleixner Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230222144649.624380-2-frederic@kernel.org commit b8a4346d25024e00714fb6ceb0709075827f335d Merge: 7abad3d3a91c1 218669c662e3a Author: Arnd Bergmann Date: Tue Apr 18 16:10:52 2023 +0200 Merge tag 'mvebu-dt64-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/dt mvebu dt64 for 6.4 (part 1) Enlarge PCI memory window on Machiatobin (Armada 7040 based) Add supoport for the GL.iNet GL-MV1000 (Armada 3700 based) Add missing phy-mode on the cn9310 Align thermal node names with bindings * tag 'mvebu-dt64-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: ARM64: dts: marvell: cn9310: Add missing phy-mode arm64: dts: marvell: add DTS for GL.iNet GL-MV1000 arm64: dts: marvell: align thermal node names with bindings arm64: dts: marvell: mochabin: enlarge PCI memory window Link: https://lore.kernel.org/r/87bkjlzfcw.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit 7abad3d3a91c10bb299c81ff63fc80483aa624e7 Merge: 460df798ca70f 0939de7d89d2e Author: Arnd Bergmann Date: Tue Apr 18 16:09:35 2023 +0200 Merge tag 'mvebu-dt-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/dt mvebu dt for 6.4 (part 1) Add missing phy-mode and fixed links for kirkwood, orion5 and Armada (370, XP, 38x) SoCs * tag 'mvebu-dt-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: ARM: dts: armada: Add missing phy-mode and fixed links ARM: dts: orion5: Add missing phy-mode and fixed links ARM: dts: kirkwood: Add missing phy-mode and fixed links Link: https://lore.kernel.org/r/87edohzfeg.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit b1b90514eaa3454223d6f576a108cc0a58924a65 Author: Srinivas Goud Date: Tue Apr 18 19:17:05 2023 +0530 spi: spi-cadence: Add support for Slave mode Currently SPI Cadence controller works only in Master mode. Updated interrupt handler for Full duplex transfer in Slave mode. Interrupt handler rely on the TX empty interrupt even for Slave mode transfer due to below HW limitation. HW limitation: AR 65885 - SPI Controller Might Not Update RX_NEMPTY Flag, Showing Incorrect Status Of The Receive FIFO SPI Slave mode works in the following manner: 1. One transfer can be finished only after all transfer->len data been transferred to master device. 2. Slave device only accepts transfer->len data. Any data longer than this from master device will be dropped. Any data shorter than this from master will cause SPI to be stuck due to the above behavior. 3. The stale data present in RXFIFO will be dropped in unprepared hardware transfer function. Signed-off-by: Srinivas Goud Link: https://lore.kernel.org/r/1681825625-10265-3-git-send-email-srinivas.goud@amd.com Signed-off-by: Mark Brown commit f6997e9bd879ed1f1c61e65b6fcab0de9a873ab0 Author: Srinivas Goud Date: Tue Apr 18 19:17:04 2023 +0530 spi: spi-cadence: Switch to spi_controller structure Replace spi_master structure with spi_controller structure. spi_controller structure provides interface support for both SPI master and slave controller. Signed-off-by: Srinivas Goud Link: https://lore.kernel.org/r/1681825625-10265-2-git-send-email-srinivas.goud@amd.com Signed-off-by: Mark Brown commit 460df798ca70f12cf561f9a4bf3e3179966766d4 Merge: 9476d415f7c0f d3150ed535805 Author: Arnd Bergmann Date: Tue Apr 18 16:08:04 2023 +0200 Merge tag 'v6.4-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt On the Rock5b a fix the newly added rtc node and cpu-regulators for the big cluster. Volume-keys (via adc) for the Pinephone Pro, display support for the Anbernic RG353. As well as gpio-ranges for rk356x and fixes for the audio-codec node-names on two boards. * tag 'v6.4-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Add support for volume keys to rk3399-pinephone-pro arm64: dts: rockchip: Add vdd_cpu_big regulators to rk3588-rock-5b arm64: dts: rockchip: Use generic name for es8316 on Pinebook Pro and Rock 5B arm64: dts: rockchip: Drop RTC clock-frequency on rk3588-rock-5b arm64: dts: rockchip: Add pinctrl gpio-ranges for rk356x arm64: dts: rockchip: add panel to Anbernic RG353 series Link: https://lore.kernel.org/r/5144826.MHq7AAxBmi@phil Signed-off-by: Arnd Bergmann commit ca9d081b49cc225627aa73feb9284b7ffc190df5 Author: Greg Kroah-Hartman Date: Tue Apr 18 15:47:15 2023 +0200 zram: fix up permission for the hot_add sysfs file Commit 75a2d4226b53 ("driver core: class: mark the struct class for sysfs callbacks as constant") changed the attribute to use CLASS_ATTR_RO() which changed the permission from 0400 to 0444. But this atribute is "special" in that reading it modifies the system state, so it MUST be set to 0400 so that only root processes can muck around with it. Fix this all up, AND document this so that I don't change it again in 3-4 years when I stumble across it and wonder why it's an open-coded _ATTR() macro. Reported-by: Denis Efremov Fixes: 75a2d4226b53 ("driver core: class: mark the struct class for sysfs callbacks as constant") Link: https://lore.kernel.org/r/2023041810-angelic-conical-52d8@gregkh Signed-off-by: Greg Kroah-Hartman commit 2c25b94f881cf9389001cc08b1232a8099b3f8bf Author: Linus Walleij Date: Tue Apr 18 10:24:27 2023 +0200 ARM: config: Update Vexpress defconfig The Versatile Express should conform to standard contemporary kernel features: add NO_HZ_FULL and HIGH_RES_TIMERS. Also add the AFS flash partitions as these are used on the platform. The removed SCHED_DEBUG is due to Kconfig changes. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230418082427.186677-1-linus.walleij@linaro.org Signed-off-by: Arnd Bergmann commit 0ba4962d01b6a34e689eca6b4802ef348075311d Merge: 6a8f57ae2eb07 528f2d8d540a3 Author: Rafael J. Wysocki Date: Tue Apr 18 15:26:18 2023 +0200 Merge tag 'opp-updates-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-opp Pull OPP updates for 6.4 from Viresh Kumar: "- Use of_property_present() for testing DT property presence (Rob Herring). - Add set_required_opps() callback to the 'struct opp_table', to make the code paths cleaner (Viresh Kumar)." * tag 'opp-updates-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: OPP: Move required opps configuration to specialized callback OPP: Handle all genpd cases together in _set_required_opps() opp: Use of_property_present() for testing DT property presence commit 5bc6b1df65c87f8dd7d0afe494a2c0b9d5c73140 Author: Srinivas Pandruvada Date: Thu Apr 13 14:37:53 2023 -0700 thermal: intel: int340x: Add DLVR support for RFIM control Add support for DLVR (Digital Linear Voltage Regulator) attributes, which can be used to control RFIM. Here instead of "fivr" another directory "dlvr" is created with DLVR attributes: /sys/bus/pci/devices/0000:00:04.0/dlvr ├── dlvr_freq_mhz ├── dlvr_freq_select ├── dlvr_hardware_rev ├── dlvr_pll_busy ├── dlvr_rfim_enable └── dlvr_spread_spectrum_pct └── dlvr_control_mode └── dlvr_control_lock Attributes dlvr_freq_mhz (RO): Current DLVR PLL frequency in MHz. dlvr_freq_select (RW): Sets DLVR PLL clock frequency. dlvr_hardware_rev (RO): DLVR hardware revision. dlvr_pll_busy (RO): PLL can't accept frequency change when set. dlvr_rfim_enable (RW): 0: Disable RF frequency hopping, 1: Enable RF frequency hopping. dlvr_control_mode (RW): Specifies how frequencies are spread. 0: Down spread, 1: Spread in Center. dlvr_control_lock (RW): 1: future writes are ignored. dlvr_spread_spectrum_pct (RW) A write to this register updates the DLVR spread spectrum percent value. Signed-off-by: Srinivas Pandruvada [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki commit e9523a0d81899361214d118ad60ef76f0e92f71d Author: Sebastian Andrzej Siewior Date: Tue Apr 18 14:26:39 2023 +0200 tick/common: Align tick period with the HZ tick. With HIGHRES enabled tick_sched_timer() is programmed every jiffy to expire the timer_list timers. This timer is programmed accurate in respect to CLOCK_MONOTONIC so that 0 seconds and nanoseconds is the first tick and the next one is 1000/CONFIG_HZ ms later. For HZ=250 it is every 4 ms and so based on the current time the next tick can be computed. This accuracy broke since the commit mentioned below because the jiffy based clocksource is initialized with higher accuracy in read_persistent_wall_and_boot_offset(). This higher accuracy is inherited during the setup in tick_setup_device(). The timer still fires every 4ms with HZ=250 but timer is no longer aligned with CLOCK_MONOTONIC with 0 as it origin but has an offset in the us/ns part of the timestamp. The offset differs with every boot and makes it impossible for user land to align with the tick. Align the tick period with CLOCK_MONOTONIC ensuring that it is always a multiple of 1000/CONFIG_HZ ms. Fixes: 857baa87b6422 ("sched/clock: Enable sched clock early") Reported-by: Gusenleitner Klaus Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/20230406095735.0_14edn3@linutronix.de Link: https://lore.kernel.org/r/20230418122639.ikgfvu3f@linutronix.de commit 2087e85bb66ee3652dafe732bb9b9b896229eafc Author: Dhruva Gole Date: Mon Apr 17 14:40:27 2023 +0530 spi: cadence-quadspi: fix suspend-resume implementations The cadence QSPI driver misbehaves after performing a full system suspend resume: ... spi-nor spi0.0: resume() failed ... This results in a flash connected via OSPI interface after system suspend- resume to be unusable. fix these suspend and resume functions. Fixes: 140623410536 ("mtd: spi-nor: Add driver for Cadence Quad SPI Flash Controller") Signed-off-by: Dhruva Gole Link: https://lore.kernel.org/r/20230417091027.966146-3-d-gole@ti.com Signed-off-by: Mark Brown commit ed479907ff79007548c3bd1aed387f8cf0a62065 Author: Krzysztof Kozlowski Date: Tue Apr 18 09:17:34 2023 +0200 regulator: dt-bindings: qcom,rpmh: Combine PM6150L and PM8150L if-then The supplies for PM6150L and PM8150L are the same, so they can be part of one if-then block, for smaller code. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230418071734.5706-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 37473397b852f556d8b9428ccbfd51886037842d Author: Douglas Anderson Date: Thu Apr 13 17:34:17 2023 -0700 regulator: core: Make regulator_lock_two() logic easier to follow The regulator_lock_two() function could be made clearer in the case of lock contention by having a local variable for each of the held and contended locks. Let's do that. At the same time, let's use the swap() function instead of open coding it. This change is expected to be a no-op and simply improves code clarity. Suggested-by: Stephen Boyd Link: https://lore.kernel.org/r/CAE-0n53Eb1BeDPmjBycXUaQAF4ppiAM6UDWje_jiB9GAmR8MMw@mail.gmail.com Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230413173359.1.I1ae92b25689bd6579952e6d458b79f5f8054a0c9@changeid Signed-off-by: Mark Brown commit 60ba2fda5280528e70fa26b44e36d1530f6d1d7e Author: Krzysztof Kozlowski Date: Tue Apr 18 09:46:30 2023 +0200 ASoC: codecs: wcd938x: Simplify with dev_err_probe Replace dev_err() in probe() path with dev_err_probe() to: 1. Make code a bit simpler and easier to read, 2. Do not print messages on deferred probe. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230418074630.8681-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 92864de45c3e445419d1e99e3a409469a5f3ef57 Author: Krzysztof Kozlowski Date: Tue Apr 18 09:46:29 2023 +0200 ASoC: codecs: wcd934x: Simplify &pdev->dev in probe The probe already stores pointer to &pdev->dev, so use it to make the code a bit easier to read. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230418074630.8681-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit fa92f4294283cc7d1f29151420be9e9336182518 Author: Krzysztof Kozlowski Date: Tue Apr 18 09:46:28 2023 +0200 ASoC: codecs: wcd934x: Simplify with dev_err_probe Replace dev_err() in probe() path with dev_err_probe() to: 1. Make code a bit simpler and easier to read, 2. Do not print messages on deferred probe. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230418074630.8681-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 3da9d149eb9f51560163bb0c13a245fd0ba74c6e Author: Saalim Quadri Date: Mon Apr 17 20:43:23 2023 +0000 ASoC: dt-bindings: wm8728: Convert to dtschema Convert the WM8728 audio CODEC bindings to DT schema Signed-off-by: Saalim Quadri Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20230417204323.137681-1-danascape@gmail.com Signed-off-by: Mark Brown commit 5f3d94eb7ae877430d9fe6a9aae7dcef6c3e5fea Author: Tom Rix Date: Tue Apr 18 08:09:55 2023 -0400 ASoC: nau8825: fix bounds check for adc_delay clang build reports sound/soc/codecs/nau8825.c:2826:31: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare] if (nau8825->adc_delay < 125 && nau8825->adc_delay > 500) ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ This is a bug, a logical-or should have been used. Fixes: fc0b096c9291 ("ASoC: nau8825: Add delay control for input path") Signed-off-by: Tom Rix Acked-by: David Lin Link: https://lore.kernel.org/r/20230418120955.3230705-1-trix@redhat.com Signed-off-by: Mark Brown commit 67380533d450000699848e292d20ec18d0321f0e Author: Krzysztof Kozlowski Date: Mon Apr 17 16:14:50 2023 +0200 ASoC: codecs: wcd9335: Simplify with dev_err_probe Code can be a bit simpler with dev_err_probe(). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230417141453.919158-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit c341b5681fa074faa596fbb0fa0fc256b7e2301a Author: Saalim Quadri Date: Mon Apr 17 21:24:00 2023 +0000 ASoC: dt-bindings: wm8737: Convert to dtschema Convert the WM8737 audio CODEC bindings to DT schema Signed-off-by: Saalim Quadri Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20230417212400.161796-1-danascape@gmail.com Signed-off-by: Mark Brown commit 55534c094fd4e47db5547a013feab3ee88576e73 Author: Markus Elfring Date: Thu Apr 13 20:54:30 2023 +0200 gfs2: Move variable assignment behind a null pointer check in inode_go_dump Since commit 27a2660f1ef9 ("gfs2: Dump nrpages for inodes and their glocks"), inode_go_dump() computes the address of inode within ip before checking if ip is NULL. This isn't a bug by itself, but it can give rise to bugs later. Avoid that by checking if ip is NULL first. Signed-off-by: Markus Elfring Signed-off-by: Andreas Gruenbacher commit 9ae708f00161e1d789268fa9cc05bf6bec2af474 Author: Felix Fietkau Date: Mon Apr 17 15:37:51 2023 +0200 wifi: mac80211: remove ieee80211_tx_status_8023 It is unused and should not be used. In order to avoid limitations in 4-address mode, the driver should always use ieee80211_tx_status_ext for 802.3 frames with a valid sta pointer. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230417133751.79160-1-nbd@nbd.name Signed-off-by: Johannes Berg commit f25ee51452dfe156c515adefba4dafbc10366ce5 Author: Gregory Greenman Date: Mon Apr 17 11:41:34 2023 +0300 wifi: iwlwifi: bump FW API to 78 for AX devices Start supporting API version 78 for AX devices. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230417113648.5a4dcbf5a2c1.I125808566fe892ee0865e392bf1b1872daafe8ad@changeid Signed-off-by: Johannes Berg commit 13513cec93ac9902d0b896976d8bab3758a9881c Author: Johannes Berg Date: Mon Apr 17 11:41:33 2023 +0300 wifi: iwlwifi: mvm: check firmware response size Check the firmware response size for responses to the memory read/write command in debugfs before using it. Fixes: 2b55f43f8e47 ("iwlwifi: mvm: Add mem debugfs entry") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230417113648.0d56fcaf68ee.I70e9571f3ed7263929b04f8fabad23c9b999e4ea@changeid Signed-off-by: Johannes Berg commit 8939a18ce1d7efcaff8801ab16dd33eaeec4c91c Author: Johannes Berg Date: Mon Apr 17 11:41:32 2023 +0300 wifi: iwlwifi: mvm: add MLO support to SF - use sta pointer For MLO support, use the pointer to the peer MLD instead of the default link station id, since the default link is only used for non-MLO cases. Using the default link sta id is meaningless for MLO. Also remove the rcu protected section since we now avoid the lookup based on sta id. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230417113648.40cef48c0592.I8dd666d603d6e1854033e5369c70e78d9303d236@changeid Signed-off-by: Johannes Berg commit d2d0468f60cda38c275f7d1cc5955d60eebad43b Author: Johannes Berg Date: Mon Apr 17 11:41:31 2023 +0300 wifi: iwlwifi: mvm: configure TLC on link activation If the AP station already exists on link activation (which means we're during link switch), configure the TLC in FW so we can immediately transmit once the link is activated. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230417113648.1a93de9b7c1f.I42022f24bbe3572f5a082da8c99794ae14281875@changeid Signed-off-by: Johannes Berg commit b2bc600cced23762d4e97db8989b18772145604f Author: Johannes Berg Date: Mon Apr 17 11:41:30 2023 +0300 wifi: iwlwifi: fix iwl_mvm_max_amsdu_size() for MLO For MLO, we cannot use vif->bss_conf.chandef.chan->band, since that will lead to a NULL-ptr dereference as bss_conf isn't used. However, in case of real MLO, we also need to take both LMACs into account if they exist, since the station might be active on both LMACs at the same time. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230417113648.3588afc85d79.I11592893bbc191b9548518b8bd782de568a9f848@changeid Signed-off-by: Johannes Berg commit 15d4183425a6282bd673b6cdd198ec9335503e62 Author: Johannes Berg Date: Mon Apr 17 11:41:29 2023 +0300 wifi: iwlwifi: mvm: remove RS rate init update argument Track instead whether or not the station was authorized, that's clearer than trying to indicate in the code whether or not the full bandwidth should be used via an 'update' argument. While at it, give rs_fw_rate_init() the iwl_mvm_ prefix. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230417113648.92bd8d36e311.I1877a109104d5ffeaaad6a623e89f0c44decc38e@changeid Signed-off-by: Johannes Berg commit 9371ac0dfc13132aa57ab9078d5d43dda8114ac4 Author: Johannes Berg Date: Mon Apr 17 11:41:28 2023 +0300 wifi: iwlwifi: mvm: initialize per-link STA ratescale data When allocating a new link station, initialize the ratescaling data for it. To do that, refactor the initialization code out into a new iwl_mvm_rs_add_sta_link() function. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230417113648.441b6a8c60fd.I34f1b3555c25aaa22cc34d1112fc3b6393a20b7c@changeid Signed-off-by: Johannes Berg commit 8884730eab8773325579c4e8202b6647a42a1b94 Author: Johannes Berg Date: Mon Apr 17 11:41:27 2023 +0300 wifi: iwlwifi: mvm: rs-fw: properly access sband->iftype_data We need to look up the correct version of this struct depending on the interface type, rather than just checking if the pointer is non-NULL. Fix that. Fixes: befebbb30af0 ("iwlwifi: rs: consider LDPC capability in case of HE") Fixes: b009cf71a982 ("iwlwifi: mvm: only enable HE DCM if we also support TX") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230417113648.1fd54368a02c.Ie4db5e8ae224d9a4a63b528da5d63e1b957b9cef@changeid Signed-off-by: Johannes Berg commit c45217bd3f2e01f89f2afe6ee28151df12420f65 Author: Johannes Berg Date: Mon Apr 17 11:41:26 2023 +0300 wifi: iwlwifi: mvm: only clients can be 20MHz-only Since only clients to an AP can be 20MHz-only STAs, adjust the code to not make the use of EHT capabilities depend on only the bandwidth, but also the type of interface. Fixes: 701404f1091d ("wifi: iwlwifi: rs: add support for parsing max MCS per NSS/BW in 11be") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230417113648.a3a4c931e4a3.I693a07f4d88044c889eee04793883a83bc5ee362@changeid Signed-off-by: Johannes Berg commit a705a78281cad4665e4092a09f8c485e81b47882 Author: Johannes Berg Date: Mon Apr 17 11:41:25 2023 +0300 wifi: iwlwifi: mvm: fix iwl_mvm_sta_rc_update for MLO When this is called it might crash due to the use of deflink's phy context, update all links instead. It really shouldn't be called right now though, but it's better to have safer code until we update this to be with a link parameter. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230417113648.fd47d0de8319.I87c5e5bcb2fadd70acc32021eed394fc1eea12a4@changeid Signed-off-by: Johannes Berg commit 84f650e6323cfdb44aaa94adbab7480435427cf6 Author: Johannes Berg Date: Mon Apr 17 11:41:24 2023 +0300 wifi: iwlwifi: mvm: remove per-STA MFP setting When we first add the STA before sending an authentication frame this is false. However, in some cases such as FT or certainly in MLO link switch scenarios, it will be true. If it happens to be true, it causes a firmware assert (in LMAC, 0x2528), because the same bit is used by the firmware for tracking this setting as well as for tracking if the management key has been installed, and then we get this assert from the firmware when installing the MFP key as it thinks it has already been installed. Remove the setting for now, until the firmware disentangles the two. We should be able to set it, in fact we should be setting it speculatively before authentication/association, to avoid processing management frames that should have been protected/encrypted before the key is set. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230417113648.adbeb0e0bfed.I400d0ee3721dc4f294313be992d277ba4d9c88d9@changeid Signed-off-by: Johannes Berg commit d16b96b5fd88b75db6fbbe88a8d5981557329581 Author: Johannes Berg Date: Mon Apr 17 11:41:23 2023 +0300 wifi: iwlwifi: mvm: allow NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT We can allow NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT since we just use the elements from mac80211. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230417113648.88b1a70365fd.If5030437707ab67e2146291c1517a9b0e31d01ab@changeid Signed-off-by: Johannes Berg commit f1fec51cda70f1ac83b55f1f7292ee09318c3c0d Author: Johannes Berg Date: Mon Apr 17 11:41:22 2023 +0300 wifi: iwlwifi: mvm: use BSSID when building probe requests A long time, ago in commit 818965d39177 ("cfg80211: Allow a scan request for a specific BSSID"), the stack started passing the BSSID that should be scanned for. Use it in iwlwifi for the intended optimisation, and to also allow the use of this for an implementation sending multi-link probe requests. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230417113648.0be90360cad7.If279c28079a1db34280a824cee7c3f6545fd8b9e@changeid Signed-off-by: Johannes Berg commit 95a35ec7b9dde6dc90b0876b9b25fd2e0c31162b Author: Gregory Greenman Date: Mon Apr 17 11:41:21 2023 +0300 wifi: iwlwifi: mvm: update mac id management The restriction where MAC ID 0 could be used only for the managed/IBSS vif is not required when using the new MLO FW API. Update the driver. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230417113648.e4355615da92.Iba934ccf8589c3c27a25a390dc5e938312889b45@changeid Signed-off-by: Johannes Berg commit 3ec6697ec974391ae3e72c89a347945b82b7268c Author: Emmanuel Grumbach Date: Mon Apr 17 11:41:20 2023 +0300 wifi: iwlwifi: mvm: adopt the latest firmware API The firmware no longer wants the beacon template inside the MAC command. Signed-off-by: Emmanuel Grumbach Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230417113648.92aed4180a06.I277efa343c88081cb3fc890dcbeae3161cdffe16@changeid Signed-off-by: Johannes Berg commit 130cf5269cd267a9bf179017666f454d82bc13ef Author: Bob Peterson Date: Mon Apr 10 14:33:41 2023 -0400 gfs2: Use gfs2_holder_initialized for jindex Before this patch function init_journal() used a local variable jindex to keep track of whether it needed to dequeue the jindex holder when errors were found. It also uselessly set the variable just before returning from the function. This patch simplifies the code by eliminatinng the local variable in favor of using function gfs2_holder_initialized. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 7d1b37787fe3997b9612a8ba6766580f44e23796 Author: Bob Peterson Date: Fri Apr 7 14:09:51 2023 -0400 gfs2: Eliminate gfs2_trim_blocks Function gfs2_trim_blocks is not referenced. Eliminate it. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit dce46f1b0cab9f31c6b57c40ea06236b001ae323 Merge: 6714d478eb2c6 b4a5afa51ceec Author: Paolo Abeni Date: Tue Apr 18 13:13:44 2023 +0200 Merge branch 'add-ethernet-driver-for-starfive-jh7110-soc' Samin Guo says: ==================== Add Ethernet driver for StarFive JH7110 SoC This series adds ethernet support for the StarFive JH7110 RISC-V SoC, which includes a dwmac-5.20 MAC driver (from Synopsys DesignWare). This series has been tested and works fine on VisionFive-2 v1.2A and v1.3B SBC boards. For more information and support, you can visit RVspace wiki[1]. You can simply review or test the patches at the link [2]. This patchset should be applied after the patchset [3] [4]. [1]: https://wiki.rvspace.org/ [2]: https://github.com/saminGuo/linux/tree/vf2-6.3rc4-gmac-net-next [3]: https://patchwork.kernel.org/project/linux-riscv/cover/20230401111934.130844-1-hal.feng@starfivetech.com [4]: https://patchwork.kernel.org/project/linux-riscv/cover/20230315055813.94740-1-william.qiu@starfivetech.com ==================== Link: https://lore.kernel.org/r/20230417100251.11871-1-samin.guo@starfivetech.com Signed-off-by: Paolo Abeni commit b4a5afa51ceecab128b301da3896f0d0110ec347 Author: Samin Guo Date: Mon Apr 17 18:02:51 2023 +0800 net: stmmac: dwmac-starfive: Add phy interface settings dwmac supports multiple modess. When working under rmii and rgmii, you need to set different phy interfaces. According to the dwmac document, when working in rmii, it needs to be set to 0x4, and rgmii needs to be set to 0x1. The phy interface needs to be set in syscon, the format is as follows: starfive,syscon: <&syscon, offset, shift> Tested-by: Tommaso Merciai Signed-off-by: Samin Guo Signed-off-by: Paolo Abeni commit 4bd3bb7b452690a939c3f327104a557e1b9876b7 Author: Samin Guo Date: Mon Apr 17 18:02:50 2023 +0800 net: stmmac: Add glue layer for StarFive JH7110 SoC This adds StarFive dwmac driver support on the StarFive JH7110 SoC. Tested-by: Tommaso Merciai Co-developed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Samin Guo Signed-off-by: Paolo Abeni commit b76eaf7d7ede35adbbb914cb2e9223a250448e52 Author: Yanhong Wang Date: Mon Apr 17 18:02:49 2023 +0800 dt-bindings: net: Add support StarFive dwmac Add documentation to describe StarFive dwmac driver(GMAC). Signed-off-by: Yanhong Wang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Samin Guo Signed-off-by: Paolo Abeni commit 843f603762a5453e10999d89f2adea6a3cfe8735 Author: Samin Guo Date: Mon Apr 17 18:02:48 2023 +0800 dt-bindings: net: snps,dwmac: Add 'ahb' reset/reset-name According to: stmmac_platform.c: stmmac_probe_config_dt stmmac_main.c: stmmac_dvr_probe dwmac controller may require one (stmmaceth) or two (stmmaceth+ahb) reset signals, and the maxItems of resets/reset-names is going to be 2. The gmac of Starfive Jh7110 SOC must have two resets. it uses snps,dwmac-5.20 IP. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Samin Guo Signed-off-by: Paolo Abeni commit 65a1d72f0c7cd0ef5ba0fc13224a44bc84e91dc4 Author: Emil Renner Berthing Date: Mon Apr 17 18:02:47 2023 +0800 net: stmmac: platform: Add snps,dwmac-5.20 IP compatible string Add "snps,dwmac-5.20" compatible string for 5.20 version that can avoid to define some platform data in the glue layer. Tested-by: Tommaso Merciai Signed-off-by: Emil Renner Berthing Signed-off-by: Samin Guo Signed-off-by: Paolo Abeni commit 13f9351180aaa6cd745303339d2a1968fb5cc47d Author: Emil Renner Berthing Date: Mon Apr 17 18:02:46 2023 +0800 dt-bindings: net: snps,dwmac: Add dwmac-5.20 version Add dwmac-5.20 IP version to snps.dwmac.yaml Acked-by: Krzysztof Kozlowski Signed-off-by: Emil Renner Berthing Signed-off-by: Samin Guo Signed-off-by: Paolo Abeni commit 6714d478eb2c69c8c15b477937aa124b9afe4f67 Merge: 3684a23b5aff1 1a31ae00482cb Author: Paolo Abeni Date: Tue Apr 18 12:59:06 2023 +0200 Merge branch 'r8169-use-new-macros-from-netdev_queues-h' Heiner Kallweit says: ==================== r8169: use new macros from netdev_queues.h Add one missing subqueue version of the macros, and use the new macros in r8169 to simplify the code. ==================== Link: https://lore.kernel.org/r/7147a001-3d9c-a48d-d398-a94c666aa65b@gmail.com Signed-off-by: Paolo Abeni commit 1a31ae00482cb6b271ae62a72c7f0a0ad8f038fc Author: Heiner Kallweit Date: Mon Apr 17 11:38:36 2023 +0200 r8169: use new macro netif_subqueue_completed_wake in the tx cleanup path Use new net core macro netif_subqueue_completed_wake to simplify the code of the tx cleanup path. Reviewed-by: Jacob Keller Signed-off-by: Heiner Kallweit Signed-off-by: Paolo Abeni commit 8624e9bbef641731e1b305c71187cb5dd63673ab Author: Heiner Kallweit Date: Mon Apr 17 11:37:20 2023 +0200 r8169: use new macro netif_subqueue_maybe_stop in rtl8169_start_xmit Use new net core macro netif_subqueue_maybe_stop in the start_xmit path to simplify the code. Whilst at it, set the tx queue start threshold to twice the stop threshold. Before values were the same, resulting in stopping/starting the queue more often than needed. Signed-off-by: Heiner Kallweit Signed-off-by: Paolo Abeni commit cb18e5595df7f4e01d0dd4a0f9c4e71b68ae351e Author: Heiner Kallweit Date: Mon Apr 17 11:36:15 2023 +0200 net: add macro netif_subqueue_completed_wake Add netif_subqueue_completed_wake, complementing the subqueue versions netif_subqueue_try_stop and netif_subqueue_maybe_stop. Reviewed-by: Jacob Keller Signed-off-by: Heiner Kallweit Signed-off-by: Paolo Abeni commit f41e1442ac5bd687389d6104d7b74766db821eb3 Author: Sumit Gupta Date: Tue Apr 11 16:29:59 2023 +0530 cpufreq: tegra194: add OPP support and set bandwidth Add support to use OPP table from DT in Tegra194 cpufreq driver. Tegra SoC's receive the frequency lookup table (LUT) from BPMP-FW. Cross check the OPP's present in DT against the LUT from BPMP-FW and enable only those DT OPP's which are present in LUT also. The OPP table in DT has CPU Frequency to bandwidth mapping where the bandwidth value is per MC channel. DRAM bandwidth depends on the number of MC channels which can vary as per the boot configuration. This per channel bandwidth from OPP table will be later converted by MC driver to final bandwidth value by multiplying with number of channels before sending the request to BPMP-FW. If OPP table is not present in DT, then use the LUT from BPMP-FW directy as the CPU frequency table and not do the DRAM frequency scaling which is same as the current behavior. Now, as the CPU Frequency table is being controlling through OPP table in DT. Keeping fewer entries in the table will create less frequency steps and can help to scale fast to high frequencies when required. Signed-off-by: Sumit Gupta Signed-off-by: Viresh Kumar commit a50be876f4fe2349dc8b056a49d87f69c944570f Author: Konrad Dybcio Date: Mon Apr 17 17:41:08 2023 +0200 drm/panel: novatek-nt35950: Only unregister DSI1 if it exists Commit 5dd45b66742a ("drm/panel: novatek-nt35950: Improve error handling") introduced logic to unregister DSI1 on any sort of probe failure, as that's not done automatically by kernel APIs. It did not however account for cases where only one DSI host is used. Fix that. Fixes: 5dd45b66742a ("drm/panel: novatek-nt35950: Improve error handling") Reported-by: AngeloGioacchino Del Regno Signed-off-by: Konrad Dybcio Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230417-topic-maple_panel_fixup-v1-1-07c8db606f5e@linaro.org commit a095edfc15f0832e046ae23964e249ef5c95af87 Author: Arınç ÜNAL Date: Mon Apr 17 18:20:03 2023 +0300 USB: serial: option: add UNISOC vendor and TOZED LT70C product Add UNISOC vendor ID and TOZED LT70-C modem which is based from UNISOC SL8563. The modem supports the NCM mode. Interface 0 is used for running the AT commands. Interface 12 is the ADB interface. T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 6 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1782 ProdID=4055 Rev=04.04 S: Manufacturer=Unisoc Phone S: Product=Unisoc Phone S: SerialNumber= C: #Ifs=14 Cfg#= 1 Atr=c0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=82(I) Atr=03(Int.) MxPS= 16 Ivl=32ms I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#=10 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#=11 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#=12 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) E: Ad=09(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#=13 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 2 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=84(I) Atr=03(Int.) MxPS= 16 Ivl=32ms I: If#= 3 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=86(I) Atr=03(Int.) MxPS= 16 Ivl=32ms I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 6 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm E: Ad=88(I) Atr=03(Int.) MxPS= 16 Ivl=32ms I: If#= 7 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Arınç ÜNAL Link: https://lore.kernel.org/r/20230417152003.243248-1-arinc.unal@arinc9.com Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit f609bf6b21951569036d23cf66a1317d066ef9ed Author: Christophe JAILLET Date: Mon Apr 17 07:41:48 2023 +0200 ALSA: hda/hdmi: Remove some dead code These snd_BUG_ON() can never trigger, so just remove them to save a few LoC. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/91a31341f32d493bcc6c4515178ce0755ac1aa70.1681710069.git.christophe.jaillet@wanadoo.fr Signed-off-by: Takashi Iwai commit 3e358ea8614ddfbc59ca7a3f5dff5dde2b350b2c Author: Mark Bloch Date: Thu Apr 13 12:23:09 2023 +0300 RDMA/mlx5: Fix flow counter query via DEVX Commit cited in "fixes" tag added bulk support for flow counters but it didn't account that's also possible to query a counter using a non-base id if the counter was allocated as bulk. When a user performs a query, validate the flow counter id given in the mailbox is inside the valid range taking bulk value into account. Fixes: 208d70f562e5 ("IB/mlx5: Support flow counters offset for bulk counters") Signed-off-by: Mark Bloch Reviewed-by: Maor Gottlieb Link: https://lore.kernel.org/r/79d7fbe291690128e44672418934256254d93115.1681377114.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 3684a23b5aff1e72e386f496da3eeee609fee30b Merge: 3b53ada5142b6 403ffc2c34de5 Author: Jakub Kicinski Date: Mon Apr 17 19:01:20 2023 -0700 Merge branch 'ocelot-felix-driver-support-for-preemptible-traffic-classes' Vladimir Oltean says: ==================== Ocelot/Felix driver support for preemptible traffic classes The series "Add tc-mqprio and tc-taprio support for preemptible traffic classes" from: https://lore.kernel.org/netdev/20230220122343.1156614-1-vladimir.oltean@nxp.com/ was eventually submitted in a form without the support for the Ocelot/Felix switch driver. This patch set picks up that work again, and presents a fairly modified form compared to the original. ==================== Link: https://lore.kernel.org/r/20230415170551.3939607-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 403ffc2c34de5297d007e0e169bf022094d444c2 Author: Vladimir Oltean Date: Sat Apr 15 20:05:51 2023 +0300 net: mscc: ocelot: add support for preemptible traffic classes In order to not transmit (preemptible) frames which will be received by the link partner as corrupted (because it doesn't support FP), the hardware requires the driver to program the QSYS_PREEMPTION_CFG_P_QUEUES register only after the MAC Merge layer becomes active (verification succeeds, or was disabled). There are some cases when FP is known (through experimentation) to be broken. Give priority to FP over cut-through switching, and disable FP for known broken link modes. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit a1ca9f8b07d865224a6e4b1c41692f10bd95a311 Author: Vladimir Oltean Date: Sat Apr 15 20:05:50 2023 +0300 net: dsa: felix: act upon the mqprio qopt in taprio offload The mqprio queue configuration can appear either through TC_SETUP_QDISC_MQPRIO or through TC_SETUP_QDISC_TAPRIO. Make sure both are treated in the same way. Code does nothing new for now (except for rejecting multiple TXQs per TC, which is a useless concept with DSA switches). Signed-off-by: Vladimir Oltean Reviewed-by: Ferenc Fejes Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit aac80140dc31963d818a65a522c2e2da81979857 Author: Vladimir Oltean Date: Sat Apr 15 20:05:49 2023 +0300 net: mscc: ocelot: add support for mqprio offload This doesn't apply anything to hardware and in general doesn't do anything that the software variant doesn't do, except for checking that there isn't more than 1 TXQ per TC (TXQs for a DSA switch are a dubious concept anyway). The reason we add this is to be able to parse one more field added to struct tc_mqprio_qopt_offload, namely preemptible_tcs. Signed-off-by: Vladimir Oltean Reviewed-by: Ferenc Fejes Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit bddd96dd80777ec178770a953fdbb310feec29b4 Author: Vladimir Oltean Date: Sat Apr 15 20:05:48 2023 +0300 net: mscc: ocelot: don't rely on cached verify_status in ocelot_port_get_mm() ocelot_mm_update_port_status() updates mm->verify_status, but when the verification state of a port changes, an IRQ isn't emitted, but rather, only when the verification state reaches one of the final states (like DISABLED, FAILED, SUCCEEDED) - things that would affect mm->tx_active, which is what the IRQ *is* actually emitted for. That is to say, user space may miss reports of an intermediary MAC Merge verification state (like from INITIAL to VERIFYING), unless there was an IRQ notifying the driver of the change in mm->tx_active as well. This is not a huge deal, but for reliable reporting to user space, let's call ocelot_mm_update_port_status() synchronously from ocelot_port_get_mm(), which makes user space see the current MM status. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 7bf4a5b071e59f48de8d39dfde07a3a65e7f6488 Author: Vladimir Oltean Date: Sat Apr 15 20:05:47 2023 +0300 net: mscc: ocelot: optimize ocelot_mm_irq() The MAC Merge IRQ of all ports is shared with the PTP TX timestamp IRQ of all ports, which means that currently, when a PTP TX timestamp is generated, felix_irq_handler() also polls for the MAC Merge layer status of all ports, looking for changes. This makes the kernel do more work, and under certain circumstances may make ptp4l require a tx_timestamp_timeout argument higher than before. Changes to the MAC Merge layer status are only to be expected under certain conditions - its TX direction needs to be enabled - so we can check early if that is the case, and omit register access otherwise. Make ocelot_mm_update_port_status() skip register access if mm->tx_enabled is unset, and also call it once more, outside IRQ context, from ocelot_port_set_mm(), when mm->tx_enabled transitions from true to false, because an IRQ is also expected in that case. Also, a port may have its MAC Merge layer enabled but it may not have generated the interrupt. In that case, there's no point in writing to DEV_MM_STATUS to acknowledge that IRQ. We can reduce the number of register writes per port with MM enabled by keeping an "ack" variable which writes the "write-one-to-clear" bits. Those are 3 in number: PRMPT_ACTIVE_STICKY, UNEXP_RX_PFRM_STICKY and UNEXP_TX_PFRM_STICKY. The other fields in DEV_MM_STATUS are read-only and it doesn't matter what is written to them, so writing zero is just fine. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 3ff468ef987e38740de9ca0a811c55e11bfb2141 Author: Vladimir Oltean Date: Sat Apr 15 20:05:46 2023 +0300 net: mscc: ocelot: remove struct ocelot_mm_state :: lock Unfortunately, the workarounds for the hardware bugs make it pointless to keep fine-grained locking for the MAC Merge state of each port. Our vsc9959_cut_through_fwd() implementation requires ocelot->fwd_domain_lock to be held, in order to serialize with changes to the bridging domains and to port speed changes (which affect which ports can be cut-through). Simultaneously, the traffic classes which can be cut-through cannot be preemptible at the same time, and this will depend on the MAC Merge layer state (which changes from threaded interrupt context). Since vsc9959_cut_through_fwd() would have to hold the mm->lock of all ports for a correct and race-free implementation with respect to ocelot_mm_irq(), in practice it means that any time a port's mm->lock is held, it would potentially block holders of ocelot->fwd_domain_lock. In the interest of simple locking rules, make all MAC Merge layer state changes (and preemptible traffic class changes) be serialized by the ocelot->fwd_domain_lock. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 15f93f46f31232da863316769182c699e364c45f Author: Vladimir Oltean Date: Sat Apr 15 20:05:45 2023 +0300 net: mscc: ocelot: export a single ocelot_mm_irq() When the switch emits an IRQ, we don't know what caused it, and we iterate through all ports to check the MAC Merge status. Move that iteration inside the ocelot lib; we will change the locking in a future change and it would be good to encapsulate that lock completely within the ocelot lib. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 3b53ada5142b62850544f039773f2890edb89fb3 Merge: 6c829efed5e81 9570df353309d Author: Jakub Kicinski Date: Mon Apr 17 18:57:28 2023 -0700 Merge branch 'xdp-rx-hwts-metadata-for-stmmac-driver' Song Yoong Siang says: ==================== XDP Rx HWTS metadata for stmmac driver Implemented XDP receive hardware timestamp metadata for stmmac driver. This patchset is tested with tools/testing/selftests/bpf/xdp_hw_metadata. Below are the test steps and results. Command on DUT: sudo ./xdp_hw_metadata Command on Link Partner: echo -n xdp | nc -u -q1 9091 echo -n skb | nc -u -q1 9092 Result for port 9091: poll: 1 (0) skip=1 fail=0 redir=1 xsk_ring_cons__peek: 1 0x55f69f65f6d0: rx_desc[0]->addr=100000000008000 addr=8100 comp_addr=8000 rx_timestamp: 1677762069053692631 No rx_hash err=-95 0x55f69f65f6d0: complete idx=8 addr=8000 Result for port 9092: poll: 1 (0) skip=2 fail=0 redir=1 found skb hwtstamp = 1677762071.937207680 ==================== Link: https://lore.kernel.org/r/20230415064503.3225835-1-yoong.siang.song@intel.com Signed-off-by: Jakub Kicinski commit 9570df353309d010f6afc7146c88a135ee3d3f8a Author: Song Yoong Siang Date: Sat Apr 15 14:45:03 2023 +0800 net: stmmac: add Rx HWTS metadata to XDP ZC receive pkt Add receive hardware timestamp metadata support via kfunc to XDP Zero Copy receive packets. Signed-off-by: Song Yoong Siang Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski commit e3f9c3e348406f7016ded85aed119edfcd2de2fa Author: Song Yoong Siang Date: Sat Apr 15 14:45:02 2023 +0800 net: stmmac: add Rx HWTS metadata to XDP receive pkt Add receive hardware timestamp metadata support via kfunc to XDP receive packets. Suggested-by: Stanislav Fomichev Signed-off-by: Song Yoong Siang Acked-by: Stanislav Fomichev Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski commit 5b24324a907c996faf47ea3969499e04beea9c4f Author: Song Yoong Siang Date: Sat Apr 15 14:45:01 2023 +0800 net: stmmac: introduce wrapper for struct xdp_buff Introduce struct stmmac_xdp_buff as a preparation to support XDP Rx metadata via kfuncs. Signed-off-by: Song Yoong Siang Reviewed-by: Jacob Keller Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski commit 6c829efed5e8163dc13fa0d90c1e535e212fcc25 Merge: 99676a5766412 c941da23aaf06 Author: Jakub Kicinski Date: Mon Apr 17 18:55:27 2023 -0700 Merge branch 'support-tunnel-mode-in-mlx5-ipsec-packet-offload' Leon Romanovsky says: ==================== Support tunnel mode in mlx5 IPsec packet offload This series extends mlx5 to support tunnel mode in its IPsec packet offload implementation. v0: https://lore.kernel.org/all/cover.1681106636.git.leonro@nvidia.com ==================== Link: https://lore.kernel.org/r/cover.1681388425.git.leonro@nvidia.com Signed-off-by: Jakub Kicinski commit c941da23aaf065a893248943cedb27b0f492b292 Author: Leon Romanovsky Date: Thu Apr 13 15:29:28 2023 +0300 net/mlx5e: Accept tunnel mode for IPsec packet offload Open mlx5 driver to accept IPsec tunnel mode. Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Reviewed-by: Sridhar Samudrala Signed-off-by: Jakub Kicinski commit 146c196b60e49737a08dd2cb12cc1a9683a36074 Author: Leon Romanovsky Date: Thu Apr 13 15:29:27 2023 +0300 net/mlx5e: Create IPsec table with tunnel support only when encap is disabled Current hardware doesn't support double encapsulation which is happening when IPsec packet offload tunnel mode is configured together with eswitch encap option. Any user attempt to add new SA/policy after he/she sets encap mode, will generate the following FW syndrome: mlx5_core 0000:08:00.0: mlx5_cmd_out_err:803:(pid 1904): CREATE_FLOW_TABLE(0x930) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0xa43321), err(-22) Make sure that we block encap changes before creating flow steering tables. This is applicable only for packet offload in tunnel mode, while packet offload in transport mode and crypto offload, don't have such limitation as they don't perform encapsulation. Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Reviewed-by: Sridhar Samudrala Signed-off-by: Jakub Kicinski commit acc109291a028a9d9880dd44a9df8e79f2fb854c Author: Leon Romanovsky Date: Thu Apr 13 15:29:26 2023 +0300 net/mlx5: Allow blocking encap changes in eswitch Existing eswitch encap option enables header encapsulation. Unfortunately currently available hardware isn't able to perform double encapsulation, which can happen once IPsec packet offload tunnel mode is used together with encap mode set to BASIC. So as a solution for misconfiguration, provide an option to block encap changes, which will be used for IPsec packet offload. Reviewed-by: Emeel Hakim Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Reviewed-by: Sridhar Samudrala Signed-off-by: Jakub Kicinski commit 4c24272b4e2befca6ad1409c3c9aaa16c24b1099 Author: Leon Romanovsky Date: Thu Apr 13 15:29:25 2023 +0300 net/mlx5e: Listen to ARP events to update IPsec L2 headers in tunnel mode In IPsec packet offload mode all header manipulations are performed by hardware, which is responsible to add/remove L2 header with source and destinations MACs. CX-7 devices don't support offload of in-kernel routing functionality, as such HW needs external help to fill other side MAC as it isn't available for HW. As a solution, let's listen to neigh ARP updates and reconfigure IPsec rules on the fly once new MAC data information arrives. Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Reviewed-by: Sridhar Samudrala Signed-off-by: Jakub Kicinski commit efbd31c4d844e55526587cc3820ca8a11d7db733 Author: Leon Romanovsky Date: Thu Apr 13 15:29:24 2023 +0300 net/mlx5e: Support IPsec TX packet offload in tunnel mode Extend mlx5 driver with logic to support IPsec TX packet offload in tunnel mode. Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Reviewed-by: Sridhar Samudrala Signed-off-by: Jakub Kicinski commit 37a417ca911a52828aa84340484e4ccd33b7baae Author: Leon Romanovsky Date: Thu Apr 13 15:29:23 2023 +0300 net/mlx5e: Support IPsec RX packet offload in tunnel mode Extend mlx5 driver with logic to support IPsec RX packet offload in tunnel mode. Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Reviewed-by: Sridhar Samudrala Signed-off-by: Jakub Kicinski commit 6480a3b6c90a8d2b765f802a4f30829bd539599a Author: Leon Romanovsky Date: Thu Apr 13 15:29:22 2023 +0300 net/mlx5e: Prepare IPsec packet reformat code for tunnel mode Refactor setup_pkt_reformat() function to accommodate future extension to support tunnel mode. Signed-off-by: Leon Romanovsky Reviewed-by: Simon Horman Reviewed-by: Sridhar Samudrala Signed-off-by: Jakub Kicinski commit 006adbc6de9f6290a542949af8f834c17e851890 Author: Leon Romanovsky Date: Thu Apr 13 15:29:21 2023 +0300 net/mlx5e: Configure IPsec SA tables to support tunnel mode Create SA flow steering tables both for RX and TX with tunnel reformat property. This allows to add and delete extra headers needed for tunnel mode. Reviewed-by: Simon Horman Signed-off-by: Leon Romanovsky Reviewed-by: Sridhar Samudrala Signed-off-by: Jakub Kicinski commit 1c80e949292f2ec490828b538cb9d490edf8f224 Author: Leon Romanovsky Date: Thu Apr 13 15:29:20 2023 +0300 net/mlx5e: Check IPsec packet offload tunnel capabilities Validate tunnel mode support for IPsec packet offload. Reviewed-by: Simon Horman Signed-off-by: Leon Romanovsky Reviewed-by: Sridhar Samudrala Signed-off-by: Jakub Kicinski commit 1210af3b99561bbe140af8d9a6b16d1bd0ba3fda Author: Leon Romanovsky Date: Thu Apr 13 15:29:19 2023 +0300 net/mlx5e: Add IPsec packet offload tunnel bits Extend packet reformat types and flow table capabilities with IPsec packet offload tunnel bits. Reviewed-by: Simon Horman Signed-off-by: Leon Romanovsky Reviewed-by: Sridhar Samudrala Signed-off-by: Jakub Kicinski commit de047c1091854f0c0561f3d199c2ea2e344f10a5 Author: Colin Ian King Date: Mon Apr 17 18:48:26 2023 +0100 perf script task-analyzer: Fix spelling mistake "miliseconds" -> "milliseconds" There is a spelling mistake in the help for the --ms option. Fix it. Signed-off-by: Colin Ian King Acked-by: Hagen Paul Pfeifer Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Petar Gligoric Cc: Peter Zijlstra Cc: kernel-janitors@vger.kernel.org Link: https://lore.kernel.org/r/20230417174826.52963-1-colin.i.king@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 2d1acd3f10baed49329c1b201cafb060aeb377e0 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 22:11:58 2023 -0300 perf namespaces: Introduce nsinfo__mntns_path() accessor to avoid accessing ->mntns_path directly To reduce the use of RC_CHK_ACCESS(nsi). Signed-off-by: Arnaldo Carvalho de Melo commit f94c21dfd02e98aa0fcb9b453a1198e76ede60e7 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 22:11:58 2023 -0300 perf namespaces: Introduce nsinfo__refcnt() accessor to avoid accessing ->refcnt directly To reduces the use of RC_CHK_ACCESS(nsi). Signed-off-by: Arnaldo Carvalho de Melo commit 4d623903f1ed63a06e469c4ce45231440d1be5b6 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 22:11:58 2023 -0300 perf namespaces: Use the need_setns() accessors instead of accessing ->need_setns directly This uses pre-existing accessors and reduces the use of RC_CHK_ACCESS(nsi). Signed-off-by: Arnaldo Carvalho de Melo commit c19d966e11c4521ef49c861a36aa29b5665fea76 Author: Hal Feng Date: Mon Apr 17 15:41:15 2023 +0800 clk: starfive: Delete the redundant dev_set_drvdata() in JH7110 clock drivers The dev_set_drvdata() is no longer needed after we used a wrapper struct to get the data in auxiliary driver. Cc: Xingyu Wu Fixes: d1aae0663023 ("clk: starfive: Avoid casting iomem pointers") Signed-off-by: Hal Feng Link: https://lore.kernel.org/r/20230417074115.30786-3-hal.feng@starfivetech.com Signed-off-by: Stephen Boyd commit 64042c28c3bb6729df8e2fda89bc7ebbe3790907 Author: Sebastian Reichel Date: Mon Apr 3 21:32:49 2023 +0200 clk: rockchip: rk3588: make gate linked clocks critical RK3588 has a couple of hardware blocks called Native Interface Unit (NIU) that gate the clocks to devices behind them. Effectively this means that some clocks require two parent clocks being enabled. Downstream implemented this by using a separate clock driver ("clk-link") for them, which enables the second clock using PM framework. In the upstream kernel we are currently missing support for the second parent. The information about it is in the GATE_LINK() macro as linkname, but that is not used. Thus the second parent clock is not properly enabled. So far this did not really matter, since these clocks are mostly required for the more advanced IP blocks, that are not yet supported upstream. As this is about to change we need a fix. There are three options available: 1. Properly implement support for having two parent clocks in the clock framework. 2. Mark the affected clocks CLK_IGNORE_UNUSED, so that they are not disabled. This wastes some power, but keeps the hack contained within the clock driver. Going from this to the first solution is easy once that has been implemented. 3. Enabling the extra clock in the consumer driver. This leaks some implementation details into DT. This patch implements the second option as an intermediate solution until the first one is available. I used an alias for CLK_IS_CRITICAL, so that it's easy to see which clocks are not really critical once the clock framework supports a better way to implement this. Tested-by: Vincent Legoll Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20230403193250.108693-2-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner commit 49859de997c3115b85544bce6b6ceab60a7fabc4 Author: Yonghong Song Date: Mon Apr 17 15:21:39 2023 -0700 selftests/bpf: Add a selftest for checking subreg equality Add a selftest to ensure subreg equality if source register upper 32bit is 0. Without previous patch, the test will fail verification. Acked-by: Eduard Zingerman Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20230417222139.360607-1-yhs@fb.com Signed-off-by: Alexei Starovoitov commit 3be49f79555ee975acb4ad8b5de06fa4351264aa Author: Yonghong Song Date: Mon Apr 17 15:21:34 2023 -0700 bpf: Improve verifier u32 scalar equality checking In [1], I tried to remove bpf-specific codes to prevent certain llvm optimizations, and add llvm TTI (target transform info) hooks to prevent those optimizations. During this process, I found if I enable llvm SimplifyCFG:shouldFoldTwoEntryPHINode transformation, I will hit the following verification failure with selftests: ... 8: (18) r1 = 0xffffc900001b2230 ; R1_w=map_value(off=560,ks=4,vs=564,imm=0) 10: (61) r1 = *(u32 *)(r1 +0) ; R1_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) ; if (skb->tstamp == EGRESS_ENDHOST_MAGIC) 11: (79) r2 = *(u64 *)(r6 +152) ; R2_w=scalar() R6=ctx(off=0,imm=0) ; if (skb->tstamp == EGRESS_ENDHOST_MAGIC) 12: (55) if r2 != 0xb9fbeef goto pc+10 ; R2_w=195018479 13: (bc) w2 = w1 ; R1_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) R2_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) ; if (test < __NR_TESTS) 14: (a6) if w1 < 0x9 goto pc+1 16: R0=2 R1_w=scalar(umax=8,var_off=(0x0; 0xf)) R2_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) R6=ctx(off=0,imm=0) R10=fp0 ; 16: (27) r2 *= 28 ; R2_w=scalar(umax=120259084260,var_off=(0x0; 0x1ffffffffc),s32_max=2147483644,u32_max=-4) 17: (18) r3 = 0xffffc900001b2118 ; R3_w=map_value(off=280,ks=4,vs=564,imm=0) 19: (0f) r3 += r2 ; R2_w=scalar(umax=120259084260,var_off=(0x0; 0x1ffffffffc),s32_max=2147483644,u32_max=-4) R3_w=map_value(off=280,ks=4,vs=564,umax=120259084260,var_off=(0x0; 0x1ffffffffc),s32_max=2147483644,u32_max=-4) 20: (61) r2 = *(u32 *)(r3 +0) R3 unbounded memory access, make sure to bounds check any such access processed 97 insns (limit 1000000) max_states_per_insn 1 total_states 10 peak_states 10 mark_read 6 -- END PROG LOAD LOG -- libbpf: prog 'ingress_fwdns_prio100': failed to load: -13 libbpf: failed to load object 'test_tc_dtime' libbpf: failed to load BPF skeleton 'test_tc_dtime': -13 ... At insn 14, with condition 'w1 < 9', register r1 is changed from an arbitrary u32 value to `scalar(umax=8,var_off=(0x0; 0xf))`. Register r2, however, remains as an arbitrary u32 value. Current verifier won't claim r1/r2 equality if the previous mov is alu32 ('w2 = w1'). If r1 upper 32bit value is not 0, we indeed cannot clamin r1/r2 equality after 'w2 = w1'. But in this particular case, we know r1 upper 32bit value is 0, so it is safe to claim r1/r2 equality. This patch exactly did this. For a 32bit subreg mov, if the src register upper 32bit is 0, it is okay to claim equality between src and dst registers. With this patch, the above verification sequence becomes ... 8: (18) r1 = 0xffffc9000048e230 ; R1_w=map_value(off=560,ks=4,vs=564,imm=0) 10: (61) r1 = *(u32 *)(r1 +0) ; R1_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) ; if (skb->tstamp == EGRESS_ENDHOST_MAGIC) 11: (79) r2 = *(u64 *)(r6 +152) ; R2_w=scalar() R6=ctx(off=0,imm=0) ; if (skb->tstamp == EGRESS_ENDHOST_MAGIC) 12: (55) if r2 != 0xb9fbeef goto pc+10 ; R2_w=195018479 13: (bc) w2 = w1 ; R1_w=scalar(id=6,umax=4294967295,var_off=(0x0; 0xffffffff)) R2_w=scalar(id=6,umax=4294967295,var_off=(0x0; 0xffffffff)) ; if (test < __NR_TESTS) 14: (a6) if w1 < 0x9 goto pc+1 ; R1_w=scalar(id=6,umin=9,umax=4294967295,var_off=(0x0; 0xffffffff)) ... from 14 to 16: R0=2 R1_w=scalar(id=6,umax=8,var_off=(0x0; 0xf)) R2_w=scalar(id=6,umax=8,var_off=(0x0; 0xf)) R6=ctx(off=0,imm=0) R10=fp0 16: (27) r2 *= 28 ; R2_w=scalar(umax=224,var_off=(0x0; 0xfc)) 17: (18) r3 = 0xffffc9000048e118 ; R3_w=map_value(off=280,ks=4,vs=564,imm=0) 19: (0f) r3 += r2 20: (61) r2 = *(u32 *)(r3 +0) ; R2_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) R3_w=map_value(off=280,ks=4,vs=564,umax=224,var_off=(0x0; 0xfc),s32_max=252,u32_max=252) ... and eventually the bpf program can be verified successfully. [1] https://reviews.llvm.org/D147968 Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20230417222134.359714-1-yhs@fb.com Signed-off-by: Alexei Starovoitov commit d3150ed535805403291b95fd84b00b0b5ef41096 Author: Ondrej Jirman Date: Wed Apr 5 13:38:13 2023 +0100 arm64: dts: rockchip: Add support for volume keys to rk3399-pinephone-pro These are implemented via regular ADC, so regular polling is needed, for these keys to work. Co-developed-by: Martijn Braam Signed-off-by: Martijn Braam Co-developed-by: Kamil Trzciński Signed-off-by: Kamil Trzciński Signed-off-by: Ondrej Jirman Signed-off-by: Peter Robinson Tested-by: Ondrej Jirman Link: https://lore.kernel.org/r/20230405123813.2272919-1-pbrobinson@gmail.com [increased Volume-Down voltage to 600mV as suggested by Ondrej] Signed-off-by: Heiko Stuebner commit c35ce1d918c12900375a60165c908de47856900d Author: Ian Rogers Date: Mon Apr 17 18:51:57 2023 -0300 perf namespaces: Add reference count checking Add reference count checking controlled by REFCNT_CHECKING ifdef. The reference count checking interposes an allocated pointer between the reference counted struct on a get and frees the pointer on a put. Accesses after a put cause faults and use after free, missed puts are caughts as leaks and double puts are double frees. This checking helped resolve a memory leak and use after free: https://lore.kernel.org/linux-perf-users/CAP-5=fWZH20L4kv-BwVtGLwR=Em3AOOT+Q4QGivvQuYn5AsPRg@mail.gmail.com/ Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexey Bayduraev Cc: Dmitriy Vyukov Cc: Jiri Olsa Cc: Namhyung Kim Cc: Riccardo Mancini Cc: Stephane Eranian Cc: Stephen Brennan Link: https://lore.kernel.org/lkml/20230407230405.2931830-4-irogers@google.com [ Extracted from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit 635a52da8605e5d300ec8c18fdba8d6f8491755d Author: Chao Yu Date: Mon Apr 10 10:24:17 2023 +0800 f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio We have maintain PagePrivate and page_private and page reference w/ {set,clear}_page_private_*, it doesn't need to call folio_detach_private() in the end of .invalidate_folio and .release_folio, remove it and use f2fs_bug_on instead. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 33560f8020c2bf12bb5b598a03fa0a708cab3283 Author: Yangtao Li Date: Fri Apr 7 03:16:29 2023 +0800 f2fs: remove bulk remove_proc_entry() and unnecessary kobject_del() Convert to use remove_proc_subtree() and kill kobject_del() directly. kobject_put() actually covers kobject removal automatically, which is single stage removal. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7031edac9dbc0f880c9fbaa40ca08b5de34239c6 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 18:28:01 2023 -0300 perf dso: Add dso__filename_with_chroot() to reduce number of accesses to dso->nsinfo members We'll need to reference count dso->nsinfo, so reduce the number of direct accesses by having a shorter form of obtaining a filename with a chroot (namespace one). Cc: Adrian Hunter Cc: Alexey Bayduraev Cc: Dmitriy Vyukov Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Riccardo Mancini Cc: Stephane Eranian Cc: Stephen Brennan Link: https://lore.kernel.org/lkml/ZD26ZlqSbgSyH5lX@kernel.org [ Used nsinfo__pid(dso->nsinfo), as it was already present ] Signed-off-by: Arnaldo Carvalho de Melo commit a5a6dd2624698b6e3045c3a1450874d8c790d5d9 Author: Alex Williamson Date: Thu Apr 13 13:40:42 2023 -0600 PCI/PM: Extend D3hot delay for NVIDIA HDA controllers Assignment of NVIDIA Ampere-based GPUs have seen a regression since the below referenced commit, where the reduced D3hot transition delay appears to introduce a small window where a D3hot->D0 transition followed by a bus reset can wedge the device. The entire device is subsequently unavailable, returning -1 on config space read and is unrecoverable without a host reset. This has been observed with RTX A2000 and A5000 GPU and audio functions assigned to a Windows VM, where shutdown of the VM places the devices in D3hot prior to vfio-pci performing a bus reset when userspace releases the devices. The issue has roughly a 2-3% chance of occurring per shutdown. Restoring the HDA controller d3hot_delay to the effective value before the below commit has been shown to resolve the issue. NVIDIA confirms this change should be safe for all of their HDA controllers. Fixes: 3e347969a577 ("PCI/PM: Reduce D3hot delay with usleep_range()") Link: https://lore.kernel.org/r/20230413194042.605768-1-alex.williamson@redhat.com Reported-by: Zhiyi Guo Signed-off-by: Alex Williamson Signed-off-by: Bjorn Helgaas Reviewed-by: Tarun Gupta Cc: Abhishek Sahu Cc: Tarun Gupta commit 3a5e13eb151eaa7835e169c69cf38ced8724d1f2 Merge: 1c34890273a02 9ed4c762e214a Author: Mark Brown Date: Mon Apr 17 21:26:56 2023 +0100 ASoC: cs35l56: Code improvements Merge series from Richard Fitzgerald : Various code improvements. These remove redundant code and clean up less-than-optimal original implementations. commit 69a8c792cd9518071dc801bb110e0f2210d9f958 Author: Sean Young Date: Mon Apr 17 09:17:48 2023 +0100 bpf: lirc program type should not require SYS_CAP_ADMIN Make it possible to load lirc program type with just CAP_BPF. There is nothing exceptional about lirc programs that means they require SYS_CAP_ADMIN. In order to attach or detach a lirc program type you need permission to open /dev/lirc0; if you have permission to do that, you can alter all sorts of lirc receiving options. Changing the IR protocol decoder is no different. Right now on a typical distribution /dev/lirc devices are only read/write by root. Ideally we would make them group read/write like other devices so that local users can use them without becoming root. Signed-off-by: Sean Young Link: https://lore.kernel.org/r/ZD0ArKpwnDBJZsrE@gofer.mess.org Signed-off-by: Alexei Starovoitov commit 59e498a3289f685261c076b998a8a2f8a516874f Author: Daniel Borkmann Date: Mon Apr 17 15:49:15 2023 +0200 bpf: Set skb redirect and from_ingress info in __bpf_tx_skb There are some use-cases where it is desirable to use bpf_redirect() in combination with ifb device, which currently is not supported, for example, around filtering inbound traffic with BPF to then push it to ifb which holds the qdisc for shaping in contrast to doing that on the egress device. Toke mentions the following case related to OpenWrt: Because there's not always a single egress on the other side. These are mainly home routers, which tend to have one or more WiFi devices bridged to one or more ethernet ports on the LAN side, and a single upstream WAN port. And the objective is to control the total amount of traffic going over the WAN link (in both directions), to deal with bufferbloat in the ISP network (which is sadly still all too prevalent). In this setup, the traffic can be split arbitrarily between the links on the LAN side, and the only "single bottleneck" is the WAN link. So we install both egress and ingress shapers on this, configured to something like 95-98% of the true link bandwidth, thus moving the queues into the qdisc layer in the router. It's usually necessary to set the ingress bandwidth shaper a bit lower than the egress due to being "downstream" of the bottleneck link, but it does work surprisingly well. We usually use something like a matchall filter to put all ingress traffic on the ifb, so doing the redirect from BPF has not been an immediate requirement thus far. However, it does seem a bit odd that this is not possible, and we do have a BPF-based filter that layers on top of this kind of setup, which currently uses u32 as the ingress filter and so it could presumably be improved to use BPF instead if that was available. Reported-by: Toke Høiland-Jørgensen Reported-by: Yafang Shao Reported-by: Tonghao Zhang Signed-off-by: Daniel Borkmann Acked-by: Yafang Shao Acked-by: Toke Høiland-Jørgensen Link: https://git.openwrt.org/?p=project/qosify.git;a=blob;f=README Link: https://lore.kernel.org/bpf/875y9yzbuy.fsf@toke.dk Link: https://lore.kernel.org/r/8cebc8b2b6e967e10cbafe2ffd6795050e74accd.1681739137.git.daniel@iogearbox.net Signed-off-by: Alexei Starovoitov commit 902f8c9830c35cc61a7b3f63003c7246b2bf06ca Author: Krzysztof Kozlowski Date: Mon Mar 27 10:06:25 2023 +0200 regulator: dt-bindings: qcom,rpmh: Correct PM8550 family supplies PM8550 is different than PM8550VE/VS, because the latter has much smaller amount of supplies (l1-3 and s1-6) and regulators. The PM8550 has on the other hand one pin for vdd-l1-l4-l10 supplies. Correct the if:then: clause with their supplies. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Abel Vesa Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230327080626.24200-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit da885a0e5e0610e011f14a70c2dc7c4ddf79c6d6 Author: Ian Rogers Date: Mon Apr 17 16:50:02 2023 -0300 perf cpumap: Add reference count checking Enabled when REFCNT_CHECKING is defined. The change adds a memory allocated pointer that is interposed between the reference counted cpu map at a get and freed by a put. The pointer replaces the original perf_cpu_map struct, so use of the perf_cpu_map via APIs remains unchanged. Any use of the cpu map without the API requires two versions, handled via the RC_CHK_ACCESS macro. This change is intended to catch: - use after put: using a cpumap after you have put it will cause a segv. - unbalanced puts: two puts for a get will result in a double free that can be captured and reported by tools like address sanitizer, including with the associated stack traces of allocation and frees. - missing puts: if a put is missing then the get turns into a memory leak that can be reported by leak sanitizer, including the stack trace at the point the get occurs. Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter , Cc: Yury Norov Link: https://lore.kernel.org/lkml/20230407230405.2931830-3-irogers@google.com [ Extracted from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit 491b13c46d4165eacc294b880f388e00ed85e5aa Author: Ian Rogers Date: Mon Apr 17 16:28:28 2023 -0300 perf cpumap: Use perf_cpu_map__cpu(map, cpu) instead of accessing map->map[cpu] directly So that we can validate the 'map' instance wrt refcount checking. Cc: Adrian Hunter Cc: Alexey Bayduraev Cc: Dmitriy Vyukov Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Riccardo Mancini Cc: Stephane Eranian Cc: Stephen Brennan Link: https://lore.kernel.org/lkml/20230407230405.2931830-3-irogers@google.com [ Extracted from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit f605f26ea196a3b49bea249330cbd18dba61a33e Author: Bob Pearson Date: Tue Apr 4 23:26:11 2023 -0500 RDMA/rxe: Protect QP state with qp->state_lock Currently the rxe driver makes little effort to make the changes to qp state (which includes qp->attr.qp_state, qp->attr.sq_draining and qp->valid) atomic between different client threads and IO threads. In particular a common template is for an RDMA application to call ib_modify_qp() to move a qp to ERR state and then wait until all the packet and work queues have drained before calling ib_destroy_qp(). None of these state changes are protected by locks to assure that the changes are executed atomically and that memory barriers are included. This has been observed to lead to incorrect behavior around qp cleanup. This patch continues the work of the previous patches in this series and adds locking code around qp state changes and lookups. Link: https://lore.kernel.org/r/20230405042611.6467-5-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit ed5a25ac750684269b905e434ea9ffcc86e5e75a Merge: 2c8606040a808 c0b53f4e545e4 Author: Mark Brown Date: Mon Apr 17 20:27:00 2023 +0100 spi: cadence-quadspi: Fix random issues with Xilinx Merge series from Sai Krishna Potthuri : Update Xilinx Versal external DMA read logic to fix random issues - Instead of having the fixed timeout, update the read timeout based on the length of the transfer to avoid timeout for larger data size. - While switching between external DMA read and indirect read, disable the SPI before configuration and enable it after configuration as recommended by Octal-SPI Flash Controller specification. Sai Krishna Potthuri (2): spi: cadence-quadspi: Update the read timeout based on the length spi: cadence-quadspi: Disable the SPI before reconfiguring drivers/spi/spi-cadence-quadspi.c | 40 ++++++++++++++++++------------- 1 file changed, 24 insertions(+), 16 deletions(-) -- 2.25.1 commit d57fd4926ab81ad5749c6950047ea40863a52e18 Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 16:19:38 2023 -0300 perf cpumap: Remove initializations done in perf_cpu_map__alloc() When extracting this patch from Ian's original patch I forgot to remove the setting of ->nr and ->refcnt, no need to do those initializations again as those are done in perf_cpu_map__alloc() already, duh. Cc: Ian Rogers Fixes: 1f94479edb4decdc ("libperf: Make perf_cpu_map__alloc() available as an internal function for tools/perf to use") Signed-off-by: Arnaldo Carvalho de Melo commit 493cc07385cf1c6678a6159d410854b8e99aa945 Author: Michael Kelley Date: Mon Mar 27 06:16:07 2023 -0700 x86/hyperv: Exclude lazy TLB mode CPUs from enlightened TLB flushes In the case where page tables are not freed, native_flush_tlb_multi() does not do a remote TLB flush on CPUs in lazy TLB mode because the CPU will flush itself at the next context switch. By comparison, the Hyper-V enlightened TLB flush does not exclude CPUs in lazy TLB mode and so performs unnecessary flushes. If we're not freeing page tables, add logic to test for lazy TLB mode when adding CPUs to the input argument to the Hyper-V TLB flush hypercall. Exclude lazy TLB mode CPUs so the behavior matches native_flush_tlb_multi() and the unnecessary flushes are avoided. Handle both the <=64 vCPU case and the _ex case for >64 vCPUs. Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/1679922967-26582-3-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit d7b6ba9611aefc4bef207b16db8ff06b726efe35 Author: Michael Kelley Date: Mon Mar 27 06:16:06 2023 -0700 x86/hyperv: Add callback filter to cpumask_to_vpset() When copying CPUs from a Linux cpumask to a Hyper-V VPset, cpumask_to_vpset() currently has a "_noself" variant that doesn't copy the current CPU to the VPset. Generalize this variant by replacing it with a "_skip" variant having a callback function that is invoked for each CPU to decide if that CPU should be copied. Update the one caller of cpumask_to_vpset_noself() to use the new "_skip" variant instead. No functional change. Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/1679922967-26582-2-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 9a6b1a170ca8627d401fa76112e4920ba8c6314c Author: Dexuan Cui Date: Sat Apr 8 14:34:41 2023 -0700 Drivers: hv: vmbus: Remove the per-CPU post_msg_page The post_msg_page was introduced in 2014 in commit b29ef3546aec ("Drivers: hv: vmbus: Cleanup hv_post_message()") Commit 68bb7bfb7985 ("X86/Hyper-V: Enable IPI enlightenments") introduced the hyperv_pcpu_input_arg in 2018, which can be used in hv_post_message(). Remove post_msg_page to simplify the code a little bit. Signed-off-by: Dexuan Cui Reviewed-by: Jinank Jain Link: https://lore.kernel.org/r/20230408213441.15472-1-decui@microsoft.com Signed-off-by: Wei Liu commit c0e96acf884a1ce91c9bdd692c6a425b83c90285 Author: Dexuan Cui Date: Sat Apr 8 14:03:39 2023 -0700 clocksource: hyper-v: make sure Invariant-TSC is used if it is available If Hyper-V TSC page is unavailable and Invariant-TSC is available, currently hyperv_cs_msr (rather than Invariant-TSC) is used by default. Use Invariant-TSC by default by downgrading hyperv_cs_msr.rating in hv_init_tsc_clocksource(), if Invariant-TSC is available. Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20230408210339.15085-1-decui@microsoft.com Signed-off-by: Wei Liu commit 2c6ba4216844ca7918289b49ed5f3f7138ee2402 Author: Michael Kelley Date: Sun Mar 26 06:52:07 2023 -0700 PCI: hv: Enable PCI pass-thru devices in Confidential VMs For PCI pass-thru devices in a Confidential VM, Hyper-V requires that PCI config space be accessed via hypercalls. In normal VMs, config space accesses are trapped to the Hyper-V host and emulated. But in a confidential VM, the host can't access guest memory to decode the instruction for emulation, so an explicit hypercall must be used. Add functions to make the new MMIO read and MMIO write hypercalls. Update the PCI config space access functions to use the hypercalls when such use is indicated by Hyper-V flags. Also, set the flag to allow the Hyper-V PCI driver to be loaded and used in a Confidential VM (a.k.a., "Isolation VM"). The driver has previously been hardened against a malicious Hyper-V host[1]. [1] https://lore.kernel.org/all/20220511223207.3386-2-parri.andrea@gmail.com/ Co-developed-by: Dexuan Cui Signed-off-by: Dexuan Cui Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng Reviewed-by: Haiyang Zhang Link: https://lore.kernel.org/r/1679838727-87310-13-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 6afd9dc1a4b158456c072580f0851b4dbaaa02f1 Author: Michael Kelley Date: Sun Mar 26 06:52:06 2023 -0700 Drivers: hv: Don't remap addresses that are above shared_gpa_boundary With the vTOM bit now treated as a protection flag and not part of the physical address, avoid remapping physical addresses with vTOM set since technically such addresses aren't valid. Use ioremap_cache() instead of memremap() to ensure that the mapping provides decrypted access, which will correctly set the vTOM bit as a protection flag. While this change is not required for correctness with the current implementation of memremap(), for general code hygiene it's better to not depend on the mapping functions doing something reasonable with a physical address that is out-of-range. While here, fix typos in two error messages. Signed-off-by: Michael Kelley Reviewed-by: Tianyu Lan Link: https://lore.kernel.org/r/1679838727-87310-12-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 25727aaed6514b88f98a18862c6f2d65a0b0ec3b Author: Michael Kelley Date: Sun Mar 26 06:52:05 2023 -0700 hv_netvsc: Remove second mapping of send and recv buffers With changes to how Hyper-V guest VMs flip memory between private (encrypted) and shared (decrypted), creating a second kernel virtual mapping for shared memory is no longer necessary. Everything needed for the transition to shared is handled by set_memory_decrypted(). As such, remove the code to create and manage the second mapping for the pre-allocated send and recv buffers. This mapping is the last user of hv_map_memory()/hv_unmap_memory(), so delete these functions as well. Finally, hv_map_memory() is the last user of vmap_pfn() in Hyper-V guest code, so remove the Kconfig selection of VMAP_PFN. Signed-off-by: Michael Kelley Reviewed-by: Tianyu Lan Link: https://lore.kernel.org/r/1679838727-87310-11-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit bb862397f48fc79a1ea31b83a0bd8f1f913b4ab6 Author: Michael Kelley Date: Sun Mar 26 06:52:04 2023 -0700 Drivers: hv: vmbus: Remove second way of mapping ring buffers With changes to how Hyper-V guest VMs flip memory between private (encrypted) and shared (decrypted), it's no longer necessary to have separate code paths for mapping VMBus ring buffers for for normal VMs and for Confidential VMs. As such, remove the code path that uses vmap_pfn(), and set the protection flags argument to vmap() to account for the difference between normal and Confidential VMs. Signed-off-by: Michael Kelley Reviewed-by: Tianyu Lan Link: https://lore.kernel.org/r/1679838727-87310-10-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit a5ddb74588213c31ce993a8e9a09d1ffdc11a142 Author: Michael Kelley Date: Sun Mar 26 06:52:03 2023 -0700 Drivers: hv: vmbus: Remove second mapping of VMBus monitor pages With changes to how Hyper-V guest VMs flip memory between private (encrypted) and shared (decrypted), creating a second kernel virtual mapping for shared memory is no longer necessary. Everything needed for the transition to shared is handled by set_memory_decrypted(). As such, remove the code to create and manage the second mapping for VMBus monitor pages. Because set_memory_decrypted() and set_memory_encrypted() are no-ops in normal VMs, it's not even necessary to test for being in a Confidential VM (a.k.a., "Isolation VM"). Signed-off-by: Michael Kelley Reviewed-by: Tianyu Lan Link: https://lore.kernel.org/r/1679838727-87310-9-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 0459ff4873739986dccafbb417cfc69e71bdacf4 Author: Michael Kelley Date: Sun Mar 26 06:52:02 2023 -0700 swiotlb: Remove bounce buffer remapping for Hyper-V With changes to how Hyper-V guest VMs flip memory between private (encrypted) and shared (decrypted), creating a second kernel virtual mapping for shared memory is no longer necessary. Everything needed for the transition to shared is handled by set_memory_decrypted(). As such, remove swiotlb_unencrypted_base and the associated code. Signed-off-by: Michael Kelley Acked-by: Christoph Hellwig Acked-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/1679838727-87310-8-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 21eb596fce6c9f034f4e1bd91210336815bf8048 Merge: f83705a51275e 87efe384109f7 Author: Wei Liu Date: Mon Apr 17 19:18:13 2023 +0000 Merge remote-tracking branch 'tip/x86/sev' into hyperv-next Merge the following 6 patches from tip/x86/sev, which are taken from Michael Kelley's series [0]. The rest of Michael's series depend on them. x86/hyperv: Change vTOM handling to use standard coco mechanisms init: Call mem_encrypt_init() after Hyper-V hypercall init is done x86/mm: Handle decryption/re-encryption of bss_decrypted consistently Drivers: hv: Explicitly request decrypted in vmap_pfn() calls x86/hyperv: Reorder code to facilitate future work x86/ioremap: Add hypervisor callback for private MMIO mapping in coco VM 0: https://lore.kernel.org/linux-hyperv/1679838727-87310-1-git-send-email-mikelley@microsoft.com/ commit 1c34890273a020d61d6127ade3f68ed1cb21c16a Author: Liliang Ye Date: Mon Apr 3 23:26:47 2023 +0800 ASoC: fsl_mqs: move of_node_put() to the correct location of_node_put() should have been done directly after mqs_priv->regmap = syscon_node_to_regmap(gpr_np); otherwise it creates a reference leak on the success path. To fix this, of_node_put() is moved to the correct location, and change all the gotos to direct returns. Fixes: a9d273671440 ("ASoC: fsl_mqs: Fix error handling in probe") Signed-off-by: Liliang Ye Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20230403152647.17638-1-yll@hust.edu.cn Signed-off-by: Mark Brown commit f83705a51275ed29117d46e1d68e8b16dcb40507 Author: Saurabh Sengar Date: Mon Mar 20 00:47:40 2023 -0700 Driver: VMBus: Add Devicetree support Update the driver to support Devicetree boot as well along with ACPI. At present the Devicetree parsing only provides the mmio region info and is not the exact copy of ACPI parsing. This is sufficient to cater all the current Devicetree usecases for VMBus. Currently Devicetree is supported only for x86 systems. Signed-off-by: Saurabh Sengar Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1679298460-11855-6-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu commit 61f7a325927e6f15de09aef96eea54801b227864 Author: Saurabh Sengar Date: Mon Mar 20 00:47:39 2023 -0700 dt-bindings: bus: Add Hyper-V VMBus Add dt-bindings for Hyper-V VMBus. Signed-off-by: Saurabh Sengar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1679298460-11855-5-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu commit 9c8434238041e18d53fd6911826973b37656a8d1 Author: Saurabh Sengar Date: Mon Mar 20 00:47:38 2023 -0700 Drivers: hv: vmbus: Convert acpi_device to more generic platform_device VMBus driver code currently has direct dependency on ACPI and struct acpi_device. As a staging step toward optionally configuring based on Devicetree instead of ACPI, use a more generic platform device to reduce the dependency on ACPI where possible, though the dependency on ACPI is not completely removed. Also rename the function vmbus_acpi_remove() to the more generic vmbus_mmio_remove(). Signed-off-by: Saurabh Sengar Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1679298460-11855-4-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu commit 1f6277bf716cc5ba0e3fa0c3e0af1adb4160fb5d Author: Saurabh Sengar Date: Mon Mar 20 00:47:37 2023 -0700 ACPI: bus: Add stub acpi_sleep_state_supported() in non-ACPI cases acpi_sleep_state_supported() is defined only when CONFIG_ACPI=y. The function is in acpi_bus.h, and acpi_bus.h can only be used in CONFIG_ACPI=y cases. Add the stub function to linux/acpi.h to make compilation successful for !CONFIG_ACPI cases. Signed-off-by: Saurabh Sengar Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/1679298460-11855-3-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu commit a4fea9b78ebea6df9a61f34cfc2f7ed0bbc8a9fc Author: Saurabh Sengar Date: Mon Mar 20 00:47:36 2023 -0700 drivers/clocksource/hyper-v: non ACPI support in hyperv clock Add a placeholder function for the hv_setup_stimer0_irq API to accommodate systems without ACPI support. Since this function is not utilized on x86/x64 systems and non-ACPI support is only intended for x86/x64 systems, a placeholder function is sufficient for now and can be improved upon if necessary in the future. Signed-off-by: Saurabh Sengar Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1679298460-11855-2-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu commit 97c236e2d4628bddbd1ac5877da030f9be291d30 Merge: 59de6c38d713b 0f3b818486796 Author: Mark Brown Date: Mon Apr 17 20:12:43 2023 +0100 ASoC: cleanup mutex lock Merge series from Kuninori Morimoto : ASoC is using many type of mutex lock, but some of them has helper function, but some doesn't. Or, it has helper function, but is static. This patch-set adds helper function and use it. commit 7b560b89a08d35c23dfc95dc44aee10651c8b9a0 Author: Bob Pearson Date: Tue Apr 4 23:26:10 2023 -0500 RDMA/rxe: Move code to check if drained to subroutine Move two blocks of code in rxe_comp.c and rxe_req.c to subroutines that check if draining is complete in the SQD state and, if so, generate a SQ_DRAINED event. Link: https://lore.kernel.org/r/20230405042611.6467-4-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 98e891b5e4d94ceb0844de3355c9218027426e72 Author: Bob Pearson Date: Tue Apr 4 23:26:09 2023 -0500 RDMA/rxe: Remove qp->req.state The rxe driver has four different QP state variables, qp->attr.qp_state, qp->req.state, qp->comp.state, and qp->resp.state. All of these basically carry the same information. This patch replaces uses of qp->req.state by qp->attr.qp_state and enum rxe_qp_state. This is the third of three patches which will remove all but the qp->attr.qp_state variable. This will bring the driver closer to the IBA description. Link: https://lore.kernel.org/r/20230405042611.6467-3-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit f55efc2ed206eedfed08e1c8f8552f64fc3a11dd Author: Bob Pearson Date: Tue Apr 4 23:26:08 2023 -0500 RDMA/rxe: Remove qp->comp.state The rxe driver has four different QP state variables, qp->attr.qp_state, qp->req.state, qp->comp.state, and qp->resp.state. All of these basically carry the same information. This patch replaces uses of qp->comp.state by qp->attr.qp_state. This is the second of three patches which will remove all but the qp->attr.qp_state variable. This will bring the driver closer to the IBA description. Link: https://lore.kernel.org/r/20230405042611.6467-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit a588429a66e92960b195b8dceb3fc5477a2b2f80 Author: Bob Pearson Date: Tue Apr 4 23:26:07 2023 -0500 RDMA/rxe: Remove qp->resp.state The rxe driver has four different QP state variables, qp->attr.qp_state, qp->req.state, qp->comp.state, and qp->resp.state. All of these basically carry the same information. This patch replaces uses of qp->resp.state by qp->attr.qp_state. This is the first of three patches which will remove all but the qp->attr.qp_state variable. This will bring the driver closer to the IBA description. Link: https://lore.kernel.org/r/20230405042611.6467-1-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit a9b867f68e89a54fcac334b77e6d243e872573c9 Author: Ian Rogers Date: Fri Apr 7 16:04:01 2023 -0700 libperf: Add reference count checking macros The macros serve as a way to debug use of a reference counted struct. The macros add a memory allocated pointer that is interposed between the reference counted original struct at a get and freed by a put. The pointer replaces the original struct, so use of the struct name via APIs remains unchanged. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: http://lore.kernel.org/lkml/20230407230405.2931830-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 4121234a32887a49d5da06e4c219f67abb6e744f Author: Arnaldo Carvalho de Melo Date: Mon Apr 17 12:47:49 2023 -0300 libperf: Add perf_cpu_map__refcnt() interanl accessor to use in the maps test To remove one more direct access to 'struct perf_cpu_map' so that we can intercept accesses to its instantiations and refcount check it to catch use after free, etc. Cc: Adrian Hunter Cc: Alexey Bayduraev Cc: Dmitriy Vyukov Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Riccardo Mancini Cc: Stephane Eranian Cc: Stephen Brennan Link: https://lore.kernel.org/lkml/ZD1qdYjG+DL6KOfP@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f372463124df5f980de6ee0cd6000a3e43df0e01 Author: Josh Poimboeuf Date: Wed Apr 12 16:49:38 2023 -0700 btrfs: mark btrfs_assertfail() __noreturn Fixes a bunch of warnings including: vmlinux.o: warning: objtool: select_reloc_root+0x314: unreachable instruction vmlinux.o: warning: objtool: finish_inode_if_needed+0x15b1: unreachable instruction vmlinux.o: warning: objtool: get_bio_sector_nr+0x259: unreachable instruction vmlinux.o: warning: objtool: raid_wait_read_end_io+0xc26: unreachable instruction vmlinux.o: warning: objtool: raid56_parity_alloc_scrub_rbio+0x37b: unreachable instruction ... Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202302210709.IlXfgMpX-lkp@intel.com/ Signed-off-by: Josh Poimboeuf Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8ba7d5f5ba931be68a94b8c91bcced1622934e7a Author: Genjian Zhang Date: Fri Mar 24 10:08:38 2023 +0800 btrfs: fix uninitialized variable warnings There are some warnings on older compilers (gcc 10, 7) or non-x86_64 architectures (aarch64). As btrfs wants to enable -Wmaybe-uninitialized by default, fix the warnings even though it's not necessary on recent compilers (gcc 12+). ../fs/btrfs/volumes.c: In function ‘btrfs_init_new_device’: ../fs/btrfs/volumes.c:2703:3: error: ‘seed_devices’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 2703 | btrfs_setup_sprout(fs_info, seed_devices); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../fs/btrfs/send.c: In function ‘get_cur_inode_state’: ../include/linux/compiler.h:70:32: error: ‘right_gen’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 70 | (__if_trace.miss_hit[1]++,1) : \ | ^ ../fs/btrfs/send.c:1878:6: note: ‘right_gen’ was declared here 1878 | u64 right_gen; | ^~~~~~~~~ Reported-by: k2ci Signed-off-by: Genjian Zhang Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit 5d3e4f1d5123d79932177c3e7461a968f412775a Author: Filipe Manana Date: Wed Apr 5 18:51:30 2023 +0100 btrfs: use log root when iterating over index keys when logging directory When logging dir dentries of a directory, we iterate over the subvolume tree to find dir index keys on leaves modified in the current transaction. This however is heavy on locking, since btrfs_search_forward() may often keep locks on extent buffers for quite a while when walking the tree to find a suitable leaf modified in the current transaction and with a key not smaller than then the provided minimum key. That means it will block other tasks trying to access the subvolume tree, which may be common fs operations like creating, renaming, linking, unlinking, reflinking files, etc. A better solution is to iterate the log tree, since it's much smaller than a subvolume tree and just use plain btrfs_search_slot() (or the wrapper btrfs_for_each_slot()) and only contains dir index keys added in the current transaction. The following bonnie++ test on a non-debug kernel (with Debian's default kernel config) on a 20G null block device, was used to measure the impact: $ cat test.sh #!/bin/bash DEV=/dev/nullb0 MNT=/mnt/nullb0 NR_DIRECTORIES=20 NR_FILES=20480 # must be a multiple of 1024 DATASET_SIZE=$(( (8 * 1024 * 1024 * 1024) / 1048576 )) # 8 GiB as megabytes DIRECTORY_SIZE=$(( DATASET_SIZE / NR_FILES )) NR_FILES=$(( NR_FILES / 1024 )) umount $DEV &> /dev/null mkfs.btrfs -f $DEV mount $DEV $MNT bonnie++ -u root -d $MNT \ -n $NR_FILES:$DIRECTORY_SIZE:$DIRECTORY_SIZE:$NR_DIRECTORIES \ -r 0 -s $DATASET_SIZE -b umount $MNT Before patchset: Version 2.00a ------Sequential Output------ --Sequential Input- --Random- -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Name:Size etc /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP debian0 8G 376k 99 1.1g 98 939m 92 1527k 99 3.2g 99 9060 256 Latency 24920us 207us 680ms 5594us 171us 2891us Version 2.00a ------Sequential Create------ --------Random Create-------- debian0 -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 20/20 20480 96 +++++ +++ 20480 95 20480 99 +++++ +++ 20480 97 Latency 8708us 137us 5128us 6743us 60us 19712us After patchset: Version 2.00a ------Sequential Output------ --Sequential Input- --Random- -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Name:Size etc /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP debian0 8G 384k 99 1.2g 99 971m 91 1533k 99 3.3g 99 9180 309 Latency 24930us 125us 661ms 5587us 46us 2020us Version 2.00a ------Sequential Create------ --------Random Create-------- debian0 -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 20/20 20480 90 +++++ +++ 20480 99 20480 99 +++++ +++ 20480 97 Latency 7030us 61us 1246us 4942us 56us 16855us The patchset consists of this patch plus a previous one that has the following subject: "btrfs: avoid iterating over all indexes when logging directory" Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit fa4b8cb1738097586f49ec66cd3656cef47ac143 Author: Filipe Manana Date: Wed Apr 5 18:51:29 2023 +0100 btrfs: avoid iterating over all indexes when logging directory When logging a directory, after copying all directory index items from the subvolume tree to the log tree, we iterate over the subvolume tree to find all dir index items that are located in leaves COWed (or created) in the current transaction. If we keep logging a directory several times during the same transaction, we end up iterating over the same dir index items everytime we log the directory, wasting time and adding extra lock contention on the subvolume tree. So just keep track of the last logged dir index offset in order to start the search for that index (+1) the next time the directory is logged, as dir index values (key offsets) come from a monotonically increasing counter. The following test measures the difference before and after this change: $ cat test.sh #!/bin/bash DEV=/dev/nullb0 MNT=/mnt/nullb0 umount $DEV &> /dev/null mkfs.btrfs -f $DEV mount -o ssd $DEV $MNT # Time values in milliseconds. declare -a fsync_times # Total number of files added to the test directory. num_files=1000000 # Fsync directory after every N files are added. fsync_period=100 mkdir $MNT/testdir fsync_total_time=0 for ((i = 1; i <= $num_files; i++)); do echo -n > $MNT/testdir/file_$i if [ $((i % fsync_period)) -eq 0 ]; then start=$(date +%s%N) xfs_io -c "fsync" $MNT/testdir end=$(date +%s%N) fsync_total_time=$((fsync_total_time + (end - start))) fsync_times[i]=$(( (end - start) / 1000000 )) echo -n -e "Progress $i / $num_files\r" fi done echo -e "\nHistogram of directory fsync duration in ms:\n" printf '%s\n' "${fsync_times[@]}" | \ perl -MStatistics::Histogram -e '@d = <>; print get_histogram(\@d);' fsync_total_time=$((fsync_total_time / 1000000)) echo -e "\nTotal time spent in fsync: $fsync_total_time ms\n" echo umount $MNT The test was run on a non-debug kernel (Debian's default kernel config) against a 15G null block device. Result before this change: Histogram of directory fsync duration in ms: Count: 10000 Range: 3.000 - 362.000; Mean: 34.556; Median: 31.000; Stddev: 25.751 Percentiles: 90th: 71.000; 95th: 77.000; 99th: 81.000 3.000 - 5.278: 1423 ################################# 5.278 - 8.854: 1173 ########################### 8.854 - 14.467: 591 ############## 14.467 - 23.277: 1025 ####################### 23.277 - 37.105: 1422 ################################# 37.105 - 58.809: 2036 ############################################### 58.809 - 92.876: 2316 ##################################################### 92.876 - 146.346: 6 | 146.346 - 230.271: 6 | 230.271 - 362.000: 2 | Total time spent in fsync: 350527 ms Result after this change: Histogram of directory fsync duration in ms: Count: 10000 Range: 3.000 - 1088.000; Mean: 8.704; Median: 8.000; Stddev: 12.576 Percentiles: 90th: 12.000; 95th: 14.000; 99th: 17.000 3.000 - 6.007: 3222 ################################# 6.007 - 11.276: 5197 ##################################################### 11.276 - 20.506: 1551 ################ 20.506 - 36.674: 24 | 36.674 - 201.552: 1 | 201.552 - 353.841: 4 | 353.841 - 1088.000: 1 | Total time spent in fsync: 92114 ms Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 8eb3dd17eadd21a340cb658c7252d4ad5788baa4 Author: Qu Wenruo Date: Thu Apr 6 15:26:29 2023 +0800 btrfs: dev-replace: error out if we have unrepaired metadata error during [BUG] Even before the scrub rework, if we have some corrupted metadata failed to be repaired during replace, we still continue replacing and let it finish just as there is nothing wrong: BTRFS info (device dm-4): dev_replace from /dev/mapper/test-scratch1 (devid 1) to /dev/mapper/test-scratch2 started BTRFS warning (device dm-4): tree block 5578752 mirror 1 has bad csum, has 0x00000000 want 0xade80ca1 BTRFS warning (device dm-4): tree block 5578752 mirror 0 has bad csum, has 0x00000000 want 0xade80ca1 BTRFS warning (device dm-4): checksum error at logical 5578752 on dev /dev/mapper/test-scratch1, physical 5578752: metadata leaf (level 0) in tree 5 BTRFS warning (device dm-4): checksum error at logical 5578752 on dev /dev/mapper/test-scratch1, physical 5578752: metadata leaf (level 0) in tree 5 BTRFS error (device dm-4): bdev /dev/mapper/test-scratch1 errs: wr 0, rd 0, flush 0, corrupt 1, gen 0 BTRFS warning (device dm-4): tree block 5578752 mirror 1 has bad bytenr, has 0 want 5578752 BTRFS error (device dm-4): unable to fixup (regular) error at logical 5578752 on dev /dev/mapper/test-scratch1 BTRFS info (device dm-4): dev_replace from /dev/mapper/test-scratch1 (devid 1) to /dev/mapper/test-scratch2 finished This can lead to unexpected problems for the resulting filesystem. [CAUSE] Btrfs reuses scrub code path for dev-replace to iterate all dev extents. But unlike scrub, dev-replace doesn't really bother to check the scrub progress, which records all the errors found during replace. And even if we check the progress, we cannot really determine which errors are minor, which are critical just by the plain numbers. (remember we don't treat metadata/data checksum error differently). This behavior is there from the very beginning. [FIX] Instead of continuing the replace, just error out if we hit an unrepaired metadata sector. Now the dev-replace would be rejected with -EIO, to let the user know. Although it also means, the filesystem has some metadata error which cannot be repaired, the user would be upset anyway. The new dmesg would look like this: BTRFS info (device dm-4): dev_replace from /dev/mapper/test-scratch1 (devid 1) to /dev/mapper/test-scratch2 started BTRFS warning (device dm-4): tree block 5578752 mirror 1 has bad csum, has 0x00000000 want 0xade80ca1 BTRFS warning (device dm-4): tree block 5578752 mirror 1 has bad csum, has 0x00000000 want 0xade80ca1 BTRFS error (device dm-4): unable to fixup (regular) error at logical 5570560 on dev /dev/mapper/test-scratch1 physical 5570560 BTRFS warning (device dm-4): header error at logical 5570560 on dev /dev/mapper/test-scratch1, physical 5570560: metadata leaf (level 0) in tree 5 BTRFS warning (device dm-4): header error at logical 5570560 on dev /dev/mapper/test-scratch1, physical 5570560: metadata leaf (level 0) in tree 5 BTRFS error (device dm-4): stripe 5570560 has unrepaired metadata sector at 5578752 BTRFS error (device dm-4): btrfs_scrub_dev(/dev/mapper/test-scratch1, 1, /dev/mapper/test-scratch2) failed -5 Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 524f14bb114a20d9b3d8db25f93b532d4207fcac Author: Filipe Manana Date: Wed Apr 5 18:52:23 2023 +0100 btrfs: remove pointless loop at btrfs_get_next_valid_item() It's pointless to have a while loop at btrfs_get_next_valid_item(), as if the slot on the current leaf is beyond the last item, we call btrfs_next_leaf(), which leaves us at a valid slot of the next leaf (or a valid slot in the current leaf if after releasing the path an item gets pushed from the next leaf to the current leaf). So just call btrfs_next_leaf() if the current slot on the current leaf is beyond the last item. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 604e6681e114d05a2e384c4d1e8ef81918037ef5 Author: Qu Wenruo Date: Thu Apr 6 13:00:34 2023 +0800 btrfs: scrub: reject unsupported scrub flags Since the introduction of scrub interface, the only flag that we support is BTRFS_SCRUB_READONLY. Thus there is no sanity checks, if there are some undefined flags passed in, we just ignore them. This is problematic if we want to introduce new scrub flags, as we have no way to determine if such flags are supported. Address the problem by introducing a check for the flags, and if unsupported flags are set, return -EOPNOTSUPP to inform the user space. This check should be backported for all supported kernels before any new scrub flags are introduced. CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit f263a7c3a53b99f691b41e4925feb67f2e8544d0 Author: Boris Burkov Date: Wed Apr 5 12:43:59 2023 -0700 btrfs: reinterpret async discard iops_limit=0 as no delay Currently, a limit of 0 results in a hard coded metering over 6 hours. Since the default is a set limit, I suspect no one truly depends on this rather arbitrary setting. Repurpose it for an arguably more useful "unlimited" mode, where the delay is 0. Note that if block groups are too new, or go fully empty, there is still a delay associated with those conditions. Those delays implement heuristics for not trimming a region we are relatively likely to fully overwrite soon. CC: stable@vger.kernel.org # 6.2+ Reviewed-by: Neal Gompa Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit cfe3445a58658b2a142a9ba5f5de69d91c56a297 Author: Boris Burkov Date: Wed Apr 5 12:43:58 2023 -0700 btrfs: set default discard iops_limit to 1000 Previously, the default was a relatively conservative 10. This results in a 100ms delay, so with ~300 discards in a commit, it takes the full 30s till the next commit to finish the discards. On a workstation, this results in the disk never going idle, wasting power/battery, etc. Set the default to 1000, which results in using the smallest possible delay, currently, which is 1ms. This has shown to not pathologically keep the disk busy by the original reporter. Link: https://lore.kernel.org/linux-btrfs/Y%2F+n1wS%2F4XAH7X1p@nz/ Link: https://bugzilla.redhat.com/show_bug.cgi?id=2182228 CC: stable@vger.kernel.org # 6.2+ Reviewed-by: Neal Gompa Reviewed-by: David Sterba Signed-off-by: David Sterba commit aca43fe839e4b227ef7028305586429af69b0bcd Author: Qu Wenruo Date: Wed Apr 12 14:47:50 2023 +0800 btrfs: remove unused raid56 functions which were dedicated for scrub Since the scrub rework, the following RAID56 functions are no longer called: - raid56_add_scrub_pages() - raid56_alloc_missing_rbio() - raid56_submit_missing_rbio() Those functions are all utilized by scrub to handle missing device cases for RAID56. However the new scrub code handle them in a completely different way: - If it's data stripe, go recovery path through btrfs_submit_bio() - If it's P/Q stripe, it would be handled through raid56_parity_submit_scrub_rbio() And that function would handle dev-replace and repair properly. Thus we can safely remove those functions. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2c8606040a808aa01d2d9e4f5b9332e87bb66377 Author: Brad Larson Date: Mon Apr 10 11:45:21 2023 -0700 spi: dw: Add support for AMD Pensando Elba SoC The AMD Pensando Elba SoC includes a DW apb_ssi v4 controller with device specific chip-select control. The Elba SoC provides four chip-selects where the native DW IP supports two chip-selects. The Elba DW_SPI instance has two native CS signals that are always overridden. Signed-off-by: Brad Larson Reviewed-by: Serge Semin Link: https://lore.kernel.org/r/20230410184526.15990-11-blarson@amd.com Signed-off-by: Mark Brown commit 6282a6ceef62f5732082f691de8f82fcd49d4fb4 Author: Brad Larson Date: Mon Apr 10 11:45:15 2023 -0700 spi: dw: Add AMD Pensando Elba SoC SPI Controller The AMD Pensando Elba SoC has integrated the DW APB SPI Controller Signed-off-by: Brad Larson Reviewed-by: Krzysztof Kozlowski Reviewed-by: Serge Semin Link: https://lore.kernel.org/r/20230410184526.15990-5-blarson@amd.com Signed-off-by: Mark Brown commit c0b53f4e545e4c6106aab553eb351138d46211cc Author: Sai Krishna Potthuri Date: Mon Mar 20 15:29:31 2023 +0530 spi: cadence-quadspi: Disable the SPI before reconfiguring Observed random DMA timeout failures while doing back to back transfers which involves switching the modes from DMA to NON-DMA. This issue is observed while testing the OSPI+UBIFS file system test case where rootfs is mounted from OSPI UBIFS partition. To avoid this issue, disable the SPI before changing the configuration from external DMA to NON-DMA and vice versa and reenable it after changing the configuration. As per the Cadence Octal SPI design specification, it is recommended to disable the Octal-SPI enable bit before reconfiguring. Signed-off-by: Sai Krishna Potthuri Link: https://lore.kernel.org/r/20230320095931.2651714-3-sai.krishna.potthuri@amd.com Signed-off-by: Mark Brown commit 22c8ce0aa274cea2ff538ffdf723053ecf77d78b Author: Sai Krishna Potthuri Date: Mon Mar 20 15:29:30 2023 +0530 spi: cadence-quadspi: Update the read timeout based on the length When performing indirect read via external DMA the timeout for completion is set equal to the read length instead of fixed timeout value. For reads larger than 500 bytes, the timeout will continue to be equal to the read length whereas for a small read like the Read Status Register command, the timeout would be 1 or 2 milliseconds. This is not enough to cover the overhead needed in setting up DMA, in that case make sure the timeout is at least 500ms to allow DMA to finish. This solution is inline with the timeout used for Direct read via DMA. Signed-off-by: Sai Krishna Potthuri Link: https://lore.kernel.org/r/20230320095931.2651714-2-sai.krishna.potthuri@amd.com Signed-off-by: Mark Brown commit 3d32aaa7e66d5c1479a3c31d6c2c5d45dd0d3b89 Author: Mike Snitzer Date: Mon Apr 17 11:59:56 2023 -0400 dm ioctl: fix nested locking in table_clear() to remove deadlock concern syzkaller found the following problematic rwsem locking (with write lock already held): down_read+0x9d/0x450 kernel/locking/rwsem.c:1509 dm_get_inactive_table+0x2b/0xc0 drivers/md/dm-ioctl.c:773 __dev_status+0x4fd/0x7c0 drivers/md/dm-ioctl.c:844 table_clear+0x197/0x280 drivers/md/dm-ioctl.c:1537 In table_clear, it first acquires a write lock https://elixir.bootlin.com/linux/v6.2/source/drivers/md/dm-ioctl.c#L1520 down_write(&_hash_lock); Then before the lock is released at L1539, there is a path shown above: table_clear -> __dev_status -> dm_get_inactive_table -> down_read https://elixir.bootlin.com/linux/v6.2/source/drivers/md/dm-ioctl.c#L773 down_read(&_hash_lock); It tries to acquire the same read lock again, resulting in the deadlock problem. Fix this by moving table_clear()'s __dev_status() call to after its up_write(&_hash_lock); Cc: stable@vger.kernel.org Reported-by: Zheng Zhang Signed-off-by: Mike Snitzer commit 13a62fd997f0649d221afc73e301c95c76560506 Author: Qu Wenruo Date: Wed Mar 29 14:54:57 2023 +0800 btrfs: scrub: remove scrub_bio structure Since scrub path has been fully moved to scrub_stripe based facilities, no more scrub_bio would be submitted. Thus we can remove it completely, this involves: - SCRUB_SECTORS_PER_BIO macro - SCRUB_BIOS_PER_SCTX macro - SCRUB_MAX_PAGES macro - BTRFS_MAX_MIRRORS macro - scrub_bio structure - scrub_ctx::bios member - scrub_ctx::curr member - scrub_ctx::bios_in_flight member - scrub_ctx::workers_pending member - scrub_ctx::list_lock member - scrub_ctx::list_wait member - function scrub_bio_end_io_worker() - function scrub_pending_bio_inc() - function scrub_pending_bio_dec() - function scrub_throttle() - function scrub_submit() - function scrub_find_csum() - function drop_csum_range() - Some unnecessary flush and scrub pauses Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 001e3fc263ce96eaebc640350a8650a682249cb2 Author: Qu Wenruo Date: Wed Mar 29 14:42:38 2023 +0800 btrfs: scrub: remove scrub_block and scrub_sector structures Those two structures are used to represent a bunch of sectors for scrub, but now they are fully replaced by scrub_stripe in one go, so we can remove them. This involves: - structure scrub_block - structure scrub_sector - structure scrub_page_private - function attach_scrub_page_private() - function detach_scrub_page_private() Now we no longer need to use page::private to handle subpage. - function alloc_scrub_block() - function alloc_scrub_sector() - function scrub_sector_get_page() - function scrub_sector_get_page_offset() - function scrub_sector_get_kaddr() - function bio_add_scrub_sector() - function scrub_checksum_data() - function scrub_checksum_tree_block() - function scrub_checksum_super() - function scrub_check_fsid() - function scrub_block_get() - function scrub_block_put() - function scrub_sector_get() - function scrub_sector_put() - function scrub_bio_end_io() - function scrub_block_complete() - function scrub_add_sector_to_rd_bio() Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit e9255d6c4054ba865732e7a4ff67614442749f97 Author: Qu Wenruo Date: Wed Mar 29 14:25:29 2023 +0800 btrfs: scrub: remove the old scrub recheck code The old scrub code has different entrance to verify the content, and since we have removed the writeback path, now we can start removing the re-check part, including: - scrub_recover structure - scrub_sector::recover member - function scrub_setup_recheck_block() - function scrub_recheck_block() - function scrub_recheck_block_checksum() - function scrub_repair_block_group_good_copy() - function scrub_repair_sector_from_good_copy() - function scrub_is_page_on_raid56() - function full_stripe_lock() - function search_full_stripe_lock() - function get_full_stripe_logical() - function insert_full_stripe_lock() - function lock_full_stripe() - function unlock_full_stripe() - btrfs_block_group::full_stripe_locks_root member - btrfs_full_stripe_locks_tree structure This infrastructure is to ensure RAID56 scrub is properly handling recovery and P/Q scrub correctly. This is no longer needed, before P/Q scrub we will wait for all the involved data stripes to be scrubbed first, and RAID56 code has internal lock to ensure no race in the same full stripe. - function scrub_print_warning() - function scrub_get_recover() - function scrub_put_recover() - function scrub_handle_errored_block() - function scrub_setup_recheck_block() - function scrub_bio_wait_endio() - function scrub_submit_raid56_bio_wait() - function scrub_recheck_block_on_raid56() - function scrub_recheck_block() - function scrub_recheck_block_checksum() - function scrub_repair_block_from_good_copy() - function scrub_repair_sector_from_good_copy() And two more functions exported temporarily for later cleanup: - alloc_scrub_sector() - alloc_scrub_block() Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 16f93993498b8d3998817c58d5251b6829fdfd3e Author: Qu Wenruo Date: Wed Mar 29 14:16:24 2023 +0800 btrfs: scrub: remove the old writeback infrastructure Since the whole scrub path has been switched to scrub_stripe based solution, the old writeback path can be removed completely, which involves: - scrub_ctx::wr_curr_bio member - scrub_ctx::flush_all_writes member - function scrub_write_block_to_dev_replace() - function scrub_write_sector_to_dev_replace() - function scrub_add_sector_to_wr_bio() - function scrub_wr_submit() - function scrub_wr_bio_end_io() - function scrub_wr_bio_end_io_worker() And one more function needs to be exported temporarily: - scrub_sector_get() Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5dc96f8d5de9cc2b93a171c43ff5cb67909b1013 Author: Qu Wenruo Date: Wed Mar 29 13:55:20 2023 +0800 btrfs: scrub: remove scrub_parity structure The structure scrub_parity is used to indicate that some extents are scrubbed for the purpose of RAID56 P/Q scrubbing. Since the whole RAID56 P/Q scrubbing path has been replaced with new scrub_stripe infrastructure, and we no longer need to use scrub_parity to modify the behavior of data stripes, we can remove it completely. This removal involves: - scrub_parity_workers Now only one worker would be utilized, scrub_workers, to do the read and repair. All writeback would happen at the main scrub thread. - scrub_block::sparity member - scrub_parity structure - function scrub_parity_get() - function scrub_parity_put() - function scrub_free_parity() - function __scrub_mark_bitmap() - function scrub_parity_mark_sectors_error() - function scrub_parity_mark_sectors_data() These helpers are no longer needed, scrub_stripe has its bitmaps and we can use bitmap helpers to get the error/data status. - scrub_parity_bio_endio() - scrub_parity_check_and_repair() - function scrub_sectors_for_parity() - function scrub_extent_for_parity() - function scrub_raid56_data_stripe_for_parity() - function scrub_raid56_parity() The new code would reuse the scrub read-repair and writeback path. Just skip the dev-replace phase. And scrub_stripe infrastructure allows us to submit and wait for those data stripes before scrubbing P/Q, without extra infrastructure. The following two functions are temporarily exported for later cleanup: - scrub_find_csum() - scrub_add_sector_to_rd_bio() Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1009254bf22a3fa27837b9258df53b1b1135e131 Author: Qu Wenruo Date: Tue Mar 28 16:57:35 2023 +0800 btrfs: scrub: use scrub_stripe to implement RAID56 P/Q scrub Implement the only missing part for scrub: RAID56 P/Q stripe scrub. The workflow is pretty straightforward for the new function, scrub_raid56_parity_stripe(): - Go through the regular scrub path for each data stripe - Wait for the verification and repair to finish - Writeback the repaired sectors to data stripes - Make sure all stripes are properly repaired If we have sectors unrepaired, we cannot continue, or we could further corrupt the P/Q stripe. - Submit the rbio for P/Q stripe The dev-replace would be handled inside raid56_parity_submit_scrub_rbio() path. - Wait for the above bio to finish Although the old code is no longer used, we still keep the declaration, as the cleanup can be several times larger than this patch itself. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit e02ee89baa66c40e1002cf8b09141fce7265e0f5 Author: Qu Wenruo Date: Mon Mar 20 10:12:58 2023 +0800 btrfs: scrub: switch scrub_simple_mirror() to scrub_stripe infrastructure Switch scrub_simple_mirror() to the new scrub_stripe infrastructure. Since scrub_simple_mirror() is the core part of scrub (only RAID56 P/Q stripes don't utilize it), we can get rid of a big chunk of code, mostly scrub_extent(), scrub_sectors() and directly called functions. There is a functionality change: - Scrub speed throttle now only affects read on the scrubbing device Writes (for repair and replace), and reads from other mirrors won't be limited by the set limits. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 54765392a1b9533235c718e5956ebd97379fb200 Author: Qu Wenruo Date: Mon Mar 20 10:12:57 2023 +0800 btrfs: scrub: introduce helper to queue a stripe for scrub The new helper, queue_scrub_stripe(), would try to queue a stripe for scrub. If all stripes are already in use, we will submit all the existing ones and wait for them to finish. Currently we would queue up to 8 stripes, to enlarge the blocksize to 512KiB to improve the performance. Sectors repaired on zoned need to be relocated instead of in-place fix. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0096580713ffc061a579bd8be0661120079e3beb Author: Qu Wenruo Date: Mon Mar 20 10:12:56 2023 +0800 btrfs: scrub: introduce error reporting functionality for scrub_stripe The new helper, scrub_stripe_report_errors(), will report the result of the scrub to system log. The main reporting is done by introducing a new helper, scrub_print_common_warning(), which is mostly the same content from scrub_print_wanring(), but without the need for a scrub_block. Since we're reporting the errors, it's the perfect time to update the scrub stats too. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 058e09e6fe7ccbe5bead222eb7890277391aec0e Author: Qu Wenruo Date: Mon Mar 20 10:12:55 2023 +0800 btrfs: scrub: introduce a writeback helper for scrub_stripe Add a new helper, scrub_write_sectors(), to submit write bios for specified sectors to the target disk. There are several differences compared to read path: - Utilize btrfs_submit_scrub_write() Now we still rely on the @mirror_num based writeback, but the requirement is also a little different than regular writeback or read, thus we have to call btrfs_submit_scrub_write(). - We cannot write the full stripe back We can only write the sectors we have. There will be two call sites later, one for repaired sectors, one for all utilized sectors of dev-replace. Thus the callers should specify their own write_bitmap. This function only submit the bios, will not wait for them unless for zoned case. Caller must explicitly wait for the IO to finish. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9ecb5ef543d36e0b6aad4f74c91bec1bf3a9a074 Author: Qu Wenruo Date: Mon Mar 20 10:12:54 2023 +0800 btrfs: scrub: introduce the main read repair worker for scrub_stripe The new helper, scrub_stripe_read_repair_worker(), would handle the read-repair part: - Wait for the previous submitted read IO to finish - Verify the contents of the stripe - Go through the remaining mirrors, using as large blocksize as possible At this stage, we just read out all the failed sectors from each mirror and re-verify. If no more failed sector, we can exit. - Go through all mirrors again, sector-by-sector This time, we read sector by sector, this is to address cases where one bad sector mismatches the drive's internal checksum, and cause the whole read range to fail. We put this recovery method as the last resort, as sector-by-sector reading is slow, and reading from other mirrors may have already fixed the errors. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 97cf8f37542ab5764ab397257e8844fb09f91d1c Author: Qu Wenruo Date: Mon Mar 20 10:12:53 2023 +0800 btrfs: scrub: introduce a helper to verify one scrub_stripe The new helper, scrub_verify_stripe(), shares the same main workflow of the old scrub code. The major differences are: - How pages/page_offset is grabbed Everything can be grabbed from scrub_stripe easily. - When error report happens Currently the helper only verifies the sectors, not really doing any error reporting. The error reporting would be done after we have done the repair. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit a3ddbaebc7c9bcdaf0e9bf39780bbad4ff1b569f Author: Qu Wenruo Date: Mon Mar 20 10:12:52 2023 +0800 btrfs: scrub: introduce a helper to verify one metadata block The new helper, scrub_verify_one_metadata(), is almost the same as scrub_checksum_tree_block(). The difference is in how we grab the pages from other structures. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit b979547513ff060ebe4a381b69d8478b18e1cc4e Author: Qu Wenruo Date: Mon Mar 20 10:12:51 2023 +0800 btrfs: scrub: introduce helper to find and fill sector info for a scrub_stripe The new helper will search the extent tree to find the first extent of a logical range, then fill the sectors array by two loops: - Loop 1 to fill common bits and metadata generation - Loop 2 to fill csum data (only for data bgs) This loop will use the new btrfs_lookup_csums_bitmap() to fill the full csum buffer, and set scrub_sector_verification::csum. With all the needed info filled by this function, later we only need to submit and verify the stripe. Here we temporarily export the helper to avoid warning on unused static function. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2af2aaf982054cd2377bb0046b624df0f0d44d85 Author: Qu Wenruo Date: Mon Mar 20 10:12:50 2023 +0800 btrfs: scrub: introduce structure for new BTRFS_STRIPE_LEN based interface This patch introduces the following structures: - scrub_sector_verification Contains all the needed info to verify one sector (data or metadata). - scrub_stripe Contains all needed members (mostly bitmap based) to scrub one stripe (with a length of BTRFS_STRIPE_LEN). The basic idea is, we keep the existing per-device scrub behavior, but merge all the scrub_bio/scrub_bio into one generic structure, and read the full BTRFS_STRIPE_LEN stripe on the first try. This means we will read some sectors which are not scrub target, but that's fine. At dev-replace time we only writeback the utilized and good sectors, and for read-repair we only writeback the repaired sectors. With every read submitted in BTRFS_STRIPE_LEN, the need for complex bio form shaping would be gone. Although to get the same performance of the old scrub behavior, we would need to submit the initial read for two stripes at once. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4886ff7b50f6341539611a1503a6ad2e55b77c98 Author: Qu Wenruo Date: Mon Mar 20 10:12:49 2023 +0800 btrfs: introduce a new helper to submit write bio for repair Both scrub and read-repair are utilizing a special repair writes that: - Only writes back to a single device Even for read-repair on RAID56, we only update the corrupted data stripe itself, not triggering the full RMW path. - Requires a valid @mirror_num For RAID56 case, only @mirror_num == 1 is valid. For non-RAID56 cases, we need @mirror_num to locate our stripe. - No data csum generation needed These two call sites still have some differences though: - Read-repair goes plain bio It doesn't need a full btrfs_bio, and goes submit_bio_wait(). - New scrub repair would go btrfs_bio To simplify both read and write path. So here this patch would: - Introduce a common helper, btrfs_map_repair_block() Due to the single device nature, we can use an on-stack btrfs_io_stripe to pass device and its physical bytenr. - Introduce a new interface, btrfs_submit_repair_bio(), for later scrub code This is for the incoming scrub code. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4317ff0056bedfc472202bf4ccf72d51094d6ade Author: Qu Wenruo Date: Thu Mar 23 17:01:20 2023 +0800 btrfs: introduce btrfs_bio::fs_info member Currently we're doing a lot of work for btrfs_bio: - Checksum verification for data read bios - Bio splits if it crosses stripe boundary - Read repair for data read bios However for the incoming scrub patches, we don't want this extra functionality at all, just plain logical + mirror -> physical mapping ability. Thus here we do the following changes: - Introduce btrfs_bio::fs_info This is for the new scrub specific btrfs_bio, which would not populate btrfs_bio::inode. Thus we need such new member to grab a fs_info This new member will always be populated. - Replace @inode argument with @fs_info for btrfs_bio_init() and its caller Since @inode is no longer a mandatory member, replace it with @fs_info, and let involved users populate @inode. - Skip checksum verification and generation if @bbio->inode is NULL - Add extra ASSERT()s To make sure: * bbio->inode is properly set for involved read repair path * if @file_offset is set, bbio->inode is also populated - Grab @fs_info from @bbio directly We can no longer go @bbio->inode->root->fs_info, as bbio->inode can be NULL. This involves: * btrfs_simple_end_io() * should_async_write() * btrfs_wq_submit_bio() * btrfs_use_zone_append() Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2a2dc22f7e9df6daa9ab56e9b97855b3a0fbfc20 Author: Qu Wenruo Date: Mon Mar 20 10:12:47 2023 +0800 btrfs: scrub: use dedicated super block verification function to scrub one super block There is really no need to go through the super complex scrub_sectors() to just handle super blocks. Introduce a dedicated function to handle super block scrubbing. This new function will introduce a behavior change, instead of using the complex but concurrent scrub_bio system, here we just go submit-and-wait. There is really not much sense to care the performance of super block scrubbing. It only has 3 super blocks at most, and they are all scattered around the devices already. Reviewed-by: Christoph Hellwig Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit f0bb5474cff02ce24dd2599114a894f39aea03e6 Author: Anand Jain Date: Tue Apr 4 22:55:12 2023 +0800 btrfs: remove redundant release of btrfs_device::alloc_state Commit 321f69f86a0f ("btrfs: reset device back to allocation state when removing") included adding extent_io_tree_release(&device->alloc_state) to btrfs_close_one_device(), which had already been called in btrfs_free_device(). The alloc_state tree (IO_TREE_DEVICE_ALLOC_STATE), is created in btrfs_alloc_device() and released in btrfs_close_one_device(). Therefore, the additional call to extent_io_tree_release(&device->alloc_state) in btrfs_free_device() is unnecessary and can be removed. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1f16033c992971d5a630a038bd0ca8a5067527ef Author: Anand Jain Date: Tue Apr 4 22:55:11 2023 +0800 btrfs: warn for any missed cleanup at btrfs_close_one_device During my recent search for the root cause of a reported bug, I realized that it's a good idea to issue a warning for missed cleanup instead of using debug-only assertions. Since most installations run with debug off, missed cleanups and premature calls to close could go unnoticed. However, these issues are serious enough to warrant reporting and fixing. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7533583e125d65bac1435410ecb56433e95eade0 Author: Christoph Hellwig Date: Wed Apr 5 07:49:05 2023 +0200 libcrc32c: remove crc32c_impl This was only ever used by btrfs, and the usage just went away. This effectively reverts df91f56adce1 ("libcrc32c: Add crc32c_impl function"). Acked-by: Herbert Xu Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6e7a367e1abed5f6a73970f5342c747379197eda Author: Christoph Hellwig Date: Wed Apr 5 07:49:04 2023 +0200 btrfs: don't print the crc32c implementation at module load time Btrfs can use various different checksumming algorithms, and prints the one used for a given file system at mount time. Don't bother printing the crc32c implementation at module load time, the information is available in /sys/fs/btrfs/FSID/checksum. Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit e6b430f817ca7c44a083deab8c54ab8d56e99d54 Author: Christoph Hellwig Date: Mon Apr 3 16:03:55 2023 +0200 btrfs: tree-log: factor out a clean_log_buffer helper The tree-log code has three almost identical copies for the accounting on an extent_buffer that doesn't need to be written any more. The only difference is that walk_down_log_tree passed the bytenr used to find the buffer instead of extent_buffer.start and calculates the length using the nodesize, while the other two callers look at the extent_buffer.len field that must always be equivalent to the nodesize. Factor the code into a common helper. Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2c275afeb61dab732353aae2c7de01b6a87dcefc Author: Christoph Hellwig Date: Mon Mar 27 09:49:53 2023 +0900 block: make blkcg_punt_bio_submit optional Guard all the code to punt bios to a per-cgroup submission helper by a new CONFIG_BLK_CGROUP_PUNT_BIO symbol that is selected by btrfs. This way non-btrfs kernel builds don't need to have this code. Reviewed-by: Jens Axboe Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 12be09fe18f2fd9f882ca0acbe14cf121250bcbe Author: Christoph Hellwig Date: Mon Mar 27 09:49:52 2023 +0900 block: async_bio_lock does not need to be bh-safe async_bio_lock is only taken from bio submission and workqueue context, both are never in bottom halves. Reviewed-by: Jens Axboe Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 3480373ebdf7625ee29bee6508c9fc4ae70c00bf Author: Christoph Hellwig Date: Mon Mar 27 09:49:51 2023 +0900 btrfs, block: move REQ_CGROUP_PUNT to btrfs REQ_CGROUP_PUNT is a bit annoying as it is hard to follow and adds a branch to the bio submission hot path. To fix this, export blkcg_punt_bio_submit and let btrfs call it directly. Add a new REQ_FS_PRIVATE flag for btrfs to indicate to it's own low-level bio submission code that a punt to the cgroup submission helper is required. Reviewed-by: Jens Axboe Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0a0596fbbe5bddd28b1dfae7e7ecb6d70bdbf059 Author: Christoph Hellwig Date: Mon Mar 27 09:49:50 2023 +0900 btrfs, mm: remove the punt_to_cgroup field in struct writeback_control punt_to_cgroup is only used by extent_write_locked_range, but that function also directly controls the bio flags for the actual submission. Remove th punt_to_cgroup field, and just set REQ_CGROUP_PUNT directly in extent_write_locked_range. Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 896d7c1a90f33e9c6ee9002d53980dde4d8b99ee Author: Christoph Hellwig Date: Mon Mar 27 09:49:49 2023 +0900 btrfs: also use kthread_associate_blkcg for uncompressible ranges submit_one_async_extent needs to use submit_one_async_extent no matter if the range it handles ends up beeing compressed or not as the deadlock risk due to cgroup thottling is the same. Call kthread_associate_blkcg earlier to cover submit_uncompressed_range case as well. Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit e43a6210b79815dbd33705b11fe44141f53f371f Author: Christoph Hellwig Date: Mon Mar 27 09:49:48 2023 +0900 btrfs: don't free the async_extent in submit_uncompressed_range Let submit_one_async_extent, which is the only caller of submit_uncompressed_range handle freeing of the async_extent in one central place. Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 05d06a5c9d9c3c8119c365246dc1e3de2e3c5dd1 Author: Christoph Hellwig Date: Mon Mar 27 09:49:47 2023 +0900 btrfs: move kthread_associate_blkcg out of btrfs_submit_compressed_write btrfs_submit_compressed_write should not have to care if it is called from a helper thread or not. Move the kthread_associate_blkcg handling into submit_one_async_extent, as that is the one caller that needs it. Also move the assignment of REQ_CGROUP_PUNT into cow_file_range_async, as that is the routine that sets up the helper thread offload. Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0f69d1f4d62444bc1e7bdbcbea7c646ddcc35a58 Author: Filipe Manana Date: Thu Mar 30 15:39:03 2023 +0100 btrfs: correctly calculate delayed ref bytes when starting transaction When starting a transaction, we are assuming the number of bytes used for each delayed ref update matches the number of bytes used for each item update, that is the return value of: btrfs_calc_insert_metadata_size(fs_info, num_items) However that is not correct when we are using the free space tree, as we need to multiply that value by 2, since delayed ref updates need to modify the free space tree besides the extent tree. So fix this by using btrfs_calc_delayed_ref_bytes() to get the correct number of bytes used for delayed ref updates. Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit e4773b57b8949cec8743445e7877315c012fe5ca Author: Filipe Manana Date: Thu Mar 30 15:39:02 2023 +0100 btrfs: make btrfs_block_rsv_full() check more boolean when starting transaction When starting a transaction we are comparing the result of a call to btrfs_block_rsv_full() with 0, but the function returns a boolean. While in practice it is not incorrect, as 0 is equivalent to false, it makes it a bit odd and less readable. So update the check to not compare against 0 and instead use the logical not (!) operator. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit b73a6fd1b1efd799c6e3d14a922887f4453fea17 Author: Boris Burkov Date: Tue Mar 28 14:19:57 2023 +0900 btrfs: split partial dio bios before submit If an application is doing direct io to a btrfs file and experiences a page fault reading from the write buffer, iomap will issue a partial bio, and allow the fs to keep going. However, there was a subtle bug in this code path in the btrfs dio iomap implementation that led to the partial write ending up as a gap in the file's extents and to be read back as zeros. The sequence of events in a partial write, lightly summarized and trimmed down for brevity is as follows: ==== WRITING TASK ==== btrfs_direct_write __iomap_dio_write iomap_iter btrfs_dio_iomap_begin # create full ordered extent iomap_dio_bio_iter bio_iov_iter_get_pages # page fault; partial read submit_bio # partial bio iomap_iter btrfs_dio_iomap_end btrfs_mark_ordered_io_finished # sets BTRFS_ORDERED_IOERR; # submit to finish_ordered_fn wq fault_in_iov_iter_readable # btrfs_direct_write detects partial write __iomap_dio_write iomap_iter btrfs_dio_iomap_begin # create second partial ordered extent iomap_dio_bio_iter bio_iov_iter_get_pages # read all of remainder submit_bio # partial bio with all of remainder iomap_iter btrfs_dio_iomap_end # nothing exciting to do with ordered io ==== DIO ENDIO ==== == FIRST PARTIAL BIO == btrfs_dio_end_io btrfs_mark_ordered_io_finished # bytes_left > 0 # don't submit to finish_ordered_fn wq == SECOND PARTIAL BIO == btrfs_dio_end_io btrfs_mark_ordered_io_finished # bytes_left == 0 # submit to finish_ordered_fn wq ==== BTRFS FINISH ORDERED WQ ==== == FIRST PARTIAL BIO == btrfs_finish_ordered_io # called by dio_iomap_end_io, sees # BTRFS_ORDERED_IOERR, just drops the # ordered_extent ==SECOND PARTIAL BIO== btrfs_finish_ordered_io # called by btrfs_dio_end_io, writes out file # extents, csums, etc... The essence of the problem is that while btrfs_direct_write and iomap properly interact to submit all the correct bios, there is insufficient logic in the btrfs dio functions (btrfs_dio_iomap_begin, btrfs_dio_submit_io, btrfs_dio_end_io, and btrfs_dio_iomap_end) to ensure that every bio is at least a part of a completed ordered_extent. And it is completing an ordered_extent that results in crucial functionality like writing out a file extent for the range. More specifically, btrfs_dio_end_io treats the ordered extent as unfinished but btrfs_dio_iomap_end sets BTRFS_ORDERED_IOERR on it. Thus, the finish io work doesn't result in file extents, csums, etc. In the aftermath, such a file behaves as though it has a hole in it, instead of the purportedly written data. We considered a few options for fixing the bug: 1. treat the partial bio as if we had truncated the file, which would result in properly finishing it. 2. split the ordered extent when submitting a partial bio. 3. cache the ordered extent across calls to __iomap_dio_rw in iter->private, so that we could reuse it and correctly apply several bios to it. I had trouble with 1, and it felt the most like a hack, so I tried 2 and 3. Since 3 has the benefit of also not creating an extra file extent, and avoids an ordered extent lookup during bio submission, it felt like the best option. However, that turned out to re-introduce a deadlock which this code discarding the ordered_extent between faults was meant to fix in the first place. (Link to an explanation of the deadlock below.) Therefore, go with fix 2, which requires a bit more setup work but fixes the corruption without introducing the deadlock, which is fundamentally caused by the ordered extent existing when we attempt to fault in a range that overlaps with it. Put succinctly, what this patch does is: when we submit a dio bio, check if it is partial against the ordered extent stored in dio_data, and if it is, extract the ordered_extent that matches the bio exactly out of the larger ordered_extent. Keep the remaining ordered_extent around in dio_data for cancellation in iomap_end. Thanks to Josef, Christoph, and Filipe with their help figuring out the bug and the fix. Fixes: 51bd9563b678 ("btrfs: fix deadlock due to page faults during direct IO reads and writes") Link: https://bugzilla.redhat.com/show_bug.cgi?id=2169947 Link: https://lore.kernel.org/linux-btrfs/aa1fb69e-b613-47aa-a99e-a0a2c9ed273f@app.fastmail.com/ Link: https://pastebin.com/3SDaH8C6 Link: https://lore.kernel.org/linux-btrfs/20230315195231.GW10580@twin.jikos.cz/T/#t Reviewed-by: Josef Bacik Tested-by: Johannes Thumshirn Signed-off-by: Boris Burkov [ hch: refactored the ordered_extent extraction ] Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit f0f5329a00ba5e9aec012212e3d9d8c2ff8f5cfa Author: Boris Burkov Date: Tue Mar 28 14:19:56 2023 +0900 btrfs: don't split NOCOW extent_maps in btrfs_extract_ordered_extent NOCOW writes just overwrite an existing extent map, which thus should not be split in btrfs_extract_ordered_extent. The NOCOW case can't currently happen as btrfs_extract_ordered_extent is only used on zoned devices that do not support NOCOW writes, but this will change soon. Reviewed-by: Josef Bacik Tested-by: Johannes Thumshirn Signed-off-by: Boris Burkov [ hch: split from a larger patch, wrote a commit log ] Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 7edd339c8a416afed9d58b5d20778d5ee49e079f Author: Christoph Hellwig Date: Tue Mar 28 14:19:55 2023 +0900 btrfs: pass an ordered_extent to btrfs_extract_ordered_extent To prepare for a new caller that already has the ordered_extent available, change btrfs_extract_ordered_extent to take an argument for it. Add a wrapper for the bio case that still has to do the lookup (for now). Reviewed-by: Josef Bacik Tested-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2e38a84bc6aba53b82dceb1b4fd049be6924c288 Author: Christoph Hellwig Date: Tue Mar 28 14:19:54 2023 +0900 btrfs: simplify extent map splitting and rename split_zoned_em split_zoned_em is only ever asked to split out the beginning of an extent map. Change it to only take a len to split out instead of a pre and post region. Also rename the function to split_extent_map as there is nothing zoned device specific about it. Reviewed-by: Josef Bacik Tested-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit f0792b792dbe862847b1d590beed372a01b99af0 Author: Christoph Hellwig Date: Tue Mar 28 14:19:53 2023 +0900 btrfs: fold btrfs_clone_ordered_extent into btrfs_split_ordered_extent The function btrfs_clone_ordered_extent is very specific to the usage in btrfs_split_ordered_extent. Now that only a single call to btrfs_clone_ordered_extent is left, just fold it into btrfs_split_ordered_extent to make the operation more clear. Reviewed-by: Josef Bacik Tested-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 8f4af4b8e1227291bbeaee4b0f2e7f494d9dd2c1 Author: Christoph Hellwig Date: Tue Mar 28 14:19:52 2023 +0900 btrfs: sink parameter len to btrfs_split_ordered_extent btrfs_split_ordered_extent is only ever asked to split out the beginning of an ordered_extent (i.e. post == 0). Change it to only take a len to split out, and switch it to allocate the new extent for the beginning, as that helps with callers that want to keep a pointer to the ordered_extent that it is stealing from. Reviewed-by: Naohiro Aota Reviewed-by: Josef Bacik Tested-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 11d33ab6c1f3096194febc6b67c250b3476effa2 Author: Christoph Hellwig Date: Tue Mar 28 14:19:51 2023 +0900 btrfs: simplify splitting logic in btrfs_extract_ordered_extent btrfs_extract_ordered_extent is always used to split an ordered_extent and extent_map into two parts, so it doesn't need to deal with a three way split. Simplify it by only allowing for a single split point, and always split out the beginning of the extent, as that is what we'll later need to be able to hold on to a reference to the original ordered_extent that the first part is split off for submission. Reviewed-by: Josef Bacik Tested-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit e44ca71cfe07c5133a35102f2aeb200370614bb2 Author: Christoph Hellwig Date: Tue Mar 28 14:19:50 2023 +0900 btrfs: move ordered_extent internal sanity checks into btrfs_split_ordered_extent Move the three checks that are about ordered extent internal sanity checking into btrfs_split_ordered_extent instead of doing them in the higher level btrfs_extract_ordered_extent routine. Reviewed-by: Josef Bacik Tested-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 53f2c20687ba2cfce79d87f487c281ef7a4b25ce Author: Boris Burkov Date: Tue Mar 28 14:19:49 2023 +0900 btrfs: stash ordered extent in dio_data during iomap dio While it is not feasible for an ordered extent to survive across the calls btrfs_direct_write makes into __iomap_dio_rw, it is still helpful to stash it on the dio_data in between creating it in iomap_begin and finishing it in either end_io or iomap_end. The specific use I have in mind is that we can check if a particular bio is partial in submit_io without unconditionally looking up the ordered extent. This is a preparatory patch for a later patch which does just that. Reviewed-by: Naohiro Aota Reviewed-by: Josef Bacik Tested-by: Johannes Thumshirn Signed-off-by: Boris Burkov Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 8725bddf30c1a22aa167419491994e17c5fec93c Author: Boris Burkov Date: Tue Mar 28 14:19:48 2023 +0900 btrfs: pass flags as unsigned long to btrfs_add_ordered_extent The ordered_extent flags are declared as unsigned long, so pass them as such to btrfs_add_ordered_extent. Reviewed-by: Naohiro Aota Reviewed-by: Josef Bacik Tested-by: Johannes Thumshirn Signed-off-by: Boris Burkov [ hch: split from a larger patch ] Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit cf6d1aa482fb17b9d04d6bc8f134f7ec4425398f Author: Boris Burkov Date: Tue Mar 28 14:19:47 2023 +0900 btrfs: add function to create and return an ordered extent Currently, btrfs_add_ordered_extent allocates a new ordered extent, adds it to the rb_tree, but doesn't return a referenced pointer to the caller. There are cases where it is useful for the creator of a new ordered_extent to hang on to such a pointer, so add a new function btrfs_alloc_ordered_extent which is the same as btrfs_add_ordered_extent, except it takes an additional reference count and returns a pointer to the ordered_extent. Implement btrfs_add_ordered_extent as btrfs_alloc_ordered_extent followed by dropping the new reference and handling the IS_ERR case. The type of flags in btrfs_alloc_ordered_extent and btrfs_add_ordered_extent is changed from unsigned int to unsigned long so it's unified with the other ordered extent functions. Reviewed-by: Filipe Manana Reviewed-by: Christoph Hellwig Reviewed-by: Naohiro Aota Reviewed-by: Josef Bacik Tested-by: Johannes Thumshirn Signed-off-by: Boris Burkov Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit cf32e41fa5f4fb88e4b4acf9cbf3acf9ac362553 Author: Johannes Thumshirn Date: Thu Mar 30 03:43:51 2023 -0700 btrfs: use __bio_add_page to add single a page in rbio_add_io_sector The btrfs raid56 sector submission code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us a step closer to marking bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 078e4cf5dbedb3d407417a10ac5918dca6ca156a Author: Johannes Thumshirn Date: Thu Mar 30 03:43:50 2023 -0700 btrfs: use __bio_add_page for adding a single page in repair_one_sector The btrfs repair bio submission code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us a step closer to marking bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7e812f2054b8eeaca2c61ae9dc8986e9190e4dd6 Author: Anand Jain Date: Mon Mar 27 17:53:10 2023 +0800 btrfs: use test_and_clear_bit() in wait_dev_flush() The function wait_dev_flush() tests for the BTRFS_DEV_STATE_FLUSH_SENT bit and then clears it separately. Instead, use test_and_clear_bit(). Though we don't need to do the atomic test and clear, it's following a common pattern. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1b465784dc331bc70ae42ad4a4035ed60251e316 Author: Anand Jain Date: Mon Mar 27 17:53:09 2023 +0800 btrfs: change wait_dev_flush() return type to bool The flush error code is maintained in btrfs_device::last_flush_error, so there is no point in returning it in wait_dev_flush() when it is not being used. Instead, we can return a boolean value. Note that even though btrfs_device::last_flush_error may not be used, we will keep it for now. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit de38a206ff74cc8b2d1e253d8f7b2979d55069de Author: Anand Jain Date: Mon Mar 27 17:53:08 2023 +0800 btrfs: open code check_barrier_error() check_barrier_error() is almost a single line function, and just calls btrfs_check_rw_degradable(). Instead, open code it. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit bfd3ea946faa8b653025bf56e4bb5428ee6fde05 Author: Anand Jain Date: Mon Mar 27 17:53:07 2023 +0800 btrfs: move last_flush_error to write_dev_flush and wait_dev_flush We parallelize the flush command across devices using our own code, write_dev_flush() sends the flush command to each device and wait_dev_flush() waits for the flush to complete on all devices. Errors from each device are recorded at device->last_flush_error and reset to BLK_STS_OK in write_dev_flush() and to the error, if any, in wait_dev_flush(). These functions are called from barrier_all_devices(). This patch consolidates the use of device->last_flush_error in write_dev_flush() and wait_dev_flush() to remove it from barrier_all_devices(). Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit b7b1167c36350904899594ddb235f64d59625195 Author: Filipe Manana Date: Tue Mar 21 11:14:00 2023 +0000 btrfs: simplify exit paths of btrfs_evict_inode() Instead of using two labels at btrfs_evict_inode() for exiting depending on whether we need to delete the inode items and orphan or some error happened, we can use a single exit label if we initialize the block reserve to NULL, since btrfs_free_block_rsv() ignores a NULL block reserve pointer. So just do that. It will also make an upcoming change simpler by avoiding one extra error label. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit f8f210dc84709804c9f952297f2bfafa6ea6b4bd Author: Filipe Manana Date: Tue Mar 21 11:13:59 2023 +0000 btrfs: calculate the right space for delayed refs when updating global reserve When updating the global block reserve, we account for the 6 items needed by an unlink operation and the 6 delayed references for each one of those items. However the calculation for the delayed references is not correct in case we have the free space tree enabled, as in that case we need to touch the free space tree as well and therefore need twice the number of bytes. So use the btrfs_calc_delayed_ref_bytes() helper to calculate the number of bytes need for the delayed references at btrfs_update_global_block_rsv(). Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5630e2bcfe22392611a88a2a1e6240ff910c480c Author: Filipe Manana Date: Tue Mar 21 11:13:58 2023 +0000 btrfs: use a constant for the number of metadata units needed for an unlink Instead of hard coding the number of metadata units for an unlink operation in a couple places, define a macro and use it instead. This eliminates the problem of one place getting out of sync with the other, such as recently fixed by the previous patch in the series ("btrfs: fix calculation of the global block reserve's size"). Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit ba4ec8fbce6c8b629a26d78cdd4a308cd0a503ca Author: Filipe Manana Date: Tue Mar 21 11:13:57 2023 +0000 btrfs: fix calculation of the global block reserve's size At btrfs_update_global_block_rsv(), we are assuming an unlink operation uses 5 metadata units, but that's not true anymore, it uses 6 since the commit bca4ad7c0b54 ("btrfs: reserve correct number of items for unlink and rmdir"). So update the code and comments to consider 6 units. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit b13d57db90b859dadb33ccdb3716c9c3ed0a825d Author: Filipe Manana Date: Tue Mar 21 11:13:56 2023 +0000 btrfs: calculate correct amount of space for delayed reference when evicting When evicting an inode, we are incorrectly calculating the amount of space required for a single delayed reference in case the free space tree is enabled. We have to multiply by 2 the result of btrfs_calc_insert_metadata_size(). We should be calculating according to the size update and space release of the delayed block reserve logic at btrfs_update_delayed_refs_rsv() and btrfs_delayed_refs_rsv_release(). Fix this by using the btrfs_calc_delayed_ref_bytes() helper at evict_refill_and_join() instead of btrfs_calc_insert_metadata_size(). Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0e55a54502b977ded5fba30f8afdf450fdee94b7 Author: Filipe Manana Date: Tue Mar 21 11:13:55 2023 +0000 btrfs: add helper to calculate space for delayed references Instead of duplicating the logic for calculating how much space is required for a given number of delayed references, add an inline helper to encapsulate that logic and use it everywhere we are calculating the space required. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit f4160ee8789806a74445db3592b08fdd8eceeea2 Author: Filipe Manana Date: Tue Mar 21 11:13:54 2023 +0000 btrfs: constify fs_info argument for the reclaim items calculation helpers Now that btrfs_calc_insert_metadata_size() can take a const fs_info argument, make the fs_info argument of calc_reclaim_items_nr() and of calc_delayed_refs_nr() const as well. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d1085c9c52855d307662f1a742e27787a732a6f1 Author: Filipe Manana Date: Tue Mar 21 11:13:53 2023 +0000 btrfs: constify fs_info argument of the metadata size calculation helpers The fs_info argument of the helpers btrfs_calc_insert_metadata_size() and btrfs_calc_metadata_size() is not modified so it can be const. This will also allow a new helper function in one of the next patches to have its fs_info argument as const. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 007145ff644cc9a2b2b0c3c88ba68824274fcb12 Author: Filipe Manana Date: Tue Mar 21 11:13:52 2023 +0000 btrfs: accurately calculate number of delayed refs when flushing When flushing a limited number of delayed references (FLUSH_DELAYED_REFS_NR state), we are assuming each delayed reference is holding a number of bytes matching the needed space for inserting for a single metadata item (the result of btrfs_calc_insert_metadata_size()). That is not correct when using the free space tree, as in that case we have to multiply that value by 2 since we need to touch the free space tree as well. This is the same computation as we do at btrfs_update_delayed_refs_rsv() and at btrfs_delayed_refs_rsv_release(). So correct the computation for the amount of delayed references we need to flush in case we have the free space tree. This does not fix a functional issue, instead it makes the flush code flush less delayed references, only the minimum necessary to satisfy a ticket. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1d0df22a29329105079ba3ded8a569583dd7366d Author: Filipe Manana Date: Tue Mar 21 11:13:51 2023 +0000 btrfs: calculate the right space for a single delayed ref when refilling When refilling the delayed block reserve we are incorrectly computing the amount of bytes for a single delayed reference if the free space tree is being used. In that case we should double the calculated amount. Everywhere else we compute the correct amount, like when updating the delayed block reserve, at btrfs_update_delayed_refs_rsv(), or when releasing space from the delayed block reserve, at btrfs_delayed_refs_rsv_release(). So fix btrfs_delayed_refs_rsv_refill() to multiply the amount of bytes for a single delayed reference by two in case the free space tree is used. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit afa4b0afeeb44b0006fb9a35a2cfd94e5e73f190 Author: Filipe Manana Date: Tue Mar 21 11:13:50 2023 +0000 btrfs: don't throttle on delayed items when evicting deleted inode During inode eviction, if we are truncating a deleted inode, we don't add delayed items for our inode, so there's no need to throttle on delayed items on each iteration of the loop that truncates inode items from its subvolume tree. But we dirty extent buffers from its subvolume tree, so we only need to throttle on btree inode dirty pages. So use btrfs_btree_balance_dirty_nodelay() in the loop that truncates inode items. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit a8fdc05172d0e52ad7812c07be8f753d63779539 Author: Filipe Manana Date: Tue Mar 21 11:13:49 2023 +0000 btrfs: remove obsolete delayed ref throttling logic when truncating items We have this logic encapsulated in btrfs_should_throttle_delayed_refs() where we try to estimate if running the current amount of delayed references we have will take more than half a second, and if so, the caller btrfs_should_throttle_delayed_refs() should do something to prevent more and more delayed refs from being accumulated. This logic was added in commit 0a2b2a844af6 ("Btrfs: throttle delayed refs better") and then further refined in commit a79b7d4b3e81 ("Btrfs: async delayed refs"). The idea back then was that the caller of btrfs_should_throttle_delayed_refs() would release its transaction handle (by calling btrfs_end_transaction()) when that function returned true, then btrfs_end_transaction() would trigger an async job to run delayed references in a workqueue, and later start/join a transaction again and do more work. However we don't run delayed references asynchronously anymore, that was removed in commit db2462a6ad3d ("btrfs: don't run delayed refs in the end transaction logic"). That makes the logic that tries to estimate how long we will take to run our current delayed references, at btrfs_should_throttle_delayed_refs(), pointless as we don't take any action to run delayed references anymore. We do have other type of throttling, which consists of checking the size and reserved space of the delayed and global block reserves, as well as if fluhsing delayed references for the current transaction was already started, etc - this is all done by btrfs_should_end_transaction(), and the only user of btrfs_should_throttle_delayed_refs() does periodically call btrfs_should_end_transaction(). So remove btrfs_should_throttle_delayed_refs() and the infrastructure that keeps track of the average time used for running delayed references, as well as adapting btrfs_truncate_inode_items() to call btrfs_check_space_for_delayed_refs() instead. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4e8313e53c83d11510b9f323861a6f83757529ed Author: Filipe Manana Date: Tue Mar 21 11:13:48 2023 +0000 btrfs: simplify variables in btrfs_block_rsv_refill() At btrfs_block_rsv_refill(), there's no point in initializing the 'num_bytes' variable to 0 and then, after taking the block reserve's spinlock, initializing it to the value of the 'min_reserved' parameter. So just get rid of the 'num_bytes' local variable and rename the 'min_reserved' parameter to 'num_bytes'. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4a6f5ccac52485226e7cade3dd7758f1a3ed8fa5 Author: Filipe Manana Date: Tue Mar 21 11:13:47 2023 +0000 btrfs: remove redundant counter check at btrfs_truncate_inode_items() At btrfs_truncate_inode_items(), in the while loop when we decide that we are going to delete an item, it's pointless to check that 'pending_del_nr' is non-zero in an else clause because the corresponding if statement is checking if 'pending_del_nr' has a value of zero. So just remove that condition from the else clause. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9aa06c7669dd45b9cd2f4df6f948108d4df1e34c Author: Filipe Manana Date: Tue Mar 21 11:13:46 2023 +0000 btrfs: count extents before taking inode's spinlock when reserving metadata When reserving metadata space for delalloc (and direct IO too), at btrfs_delalloc_reserve_metadata(), there's no need to count the number of extents while holding the inode's spinlock, since that does not require access to any field of the inode. This section of code can be called concurrently, when we have direct IO writes against different file ranges that don't increase the inode's i_size, so it's beneficial to shorten the critical section by counting the number of extents before taking the inode's spinlock. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5758d1bd2d320467e6d539dd693ff2b4dc07f345 Author: Filipe Manana Date: Tue Mar 21 11:13:45 2023 +0000 btrfs: remove bytes_used argument from btrfs_make_block_group() The only caller of btrfs_make_block_group() always passes 0 as the value for the bytes_used argument, so remove it. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 04fb3285a4780ceee07b4b51e2c7fd236f41ca68 Author: Filipe Manana Date: Tue Mar 21 11:13:44 2023 +0000 btrfs: collapse should_end_transaction() into btrfs_should_end_transaction() The function should_end_transaction() is very short and only has one caller, which is btrfs_should_end_transaction(). So move the code from should_end_transaction() into btrfs_should_end_transaction(). Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit cf5fa929b7f561b78e3e4d7781232cf6fb94c988 Author: Filipe Manana Date: Tue Mar 21 11:13:43 2023 +0000 btrfs: simplify btrfs_should_throttle_delayed_refs() Currently btrfs_should_throttle_delayed_refs() returns 1 or 2 in case the delayed refs should be throttled, however the only caller (inode eviction and truncation path) does not care about those two different conditions, it treats the return value as a boolean. This allows us to remove one of the conditions in btrfs_should_throttle_delayed_refs() and change its return value from 'int' to 'bool'. So just do that. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3a49a5489490acec43c66ad9db62f090af9d9f73 Author: Filipe Manana Date: Tue Mar 21 11:13:42 2023 +0000 btrfs: initialize ret to -ENOSPC at __reserve_bytes() At space-info.c:__reserve_bytes(), instead of initializing 'ret' to 0 when it's declared and then shortly after set it to -ENOSPC under the space info's spinlock, initialize it to -ENOSPC when declaring it. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9d0d47d5c3c5b53d444ecf7022bedc5553c544c0 Author: Filipe Manana Date: Tue Mar 21 11:13:41 2023 +0000 btrfs: update flush method assertion when reserving space When reserving space, at space-info.c:__reserve_bytes(), we assert that either the current task is not holding a transacion handle, or, if it is, that the flush method is not BTRFS_RESERVE_FLUSH_ALL. This is because that flush method can trigger transaction commits, and therefore could lead to a deadlock. However there are other 2 flush methods that can trigger transaction commits: 1) BTRFS_RESERVE_FLUSH_ALL_STEAL 2) BTRFS_RESERVE_FLUSH_EVICT So update the assertion to check the flush method is also not one those two methods if the current task is holding a transaction handle. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1a332502c8536fdc50dbf3c2a78f22981251e4fc Author: Filipe Manana Date: Tue Mar 21 11:13:40 2023 +0000 btrfs: update documentation for BTRFS_RESERVE_FLUSH_EVICT flush method The BTRFS_RESERVE_FLUSH_EVICT flush method can also commit transactions, see the definition of the evict_flush_states const array at space-info.c, but the documentation for it at space-info.h does not mention it. So update the documentation. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit b93fa4acbb57470d48de381ec4aef3f481b32d67 Author: Filipe Manana Date: Tue Mar 21 11:13:39 2023 +0000 btrfs: remove check for NULL block reserve at btrfs_block_rsv_check() The block reserve passed to btrfs_block_rsv_check() is never NULL, so remove the check. In case it can ever become NULL in the future, then we'll get a pretty obvious and clear NULL pointer dereference crash and stack trace. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5c1f2c6bca8b51b38f6263ece354e9c74c2627d3 Author: Filipe Manana Date: Tue Mar 21 11:13:38 2023 +0000 btrfs: pass a bool size update argument to btrfs_block_rsv_add_bytes() At btrfs_delayed_refs_rsv_refill(), we are passing a value of 0 to the 'update_size' argument of btrfs_block_rsv_add_bytes(), which is defined as a boolean. Functionally this is fine because a 0 is, implicitly, converted to a boolean false value. However it's easier to read an explicit 'false' value, so just pass 'false' instead of 0. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4e0527deb31191b300380c98fb80757eb591f6f1 Author: Filipe Manana Date: Tue Mar 21 11:13:37 2023 +0000 btrfs: pass a bool to btrfs_block_rsv_migrate() at evict_refill_and_join() The last argument of btrfs_block_rsv_migrate() is a boolean, but we are passing an integer, with a value of 1, to it at evict_refill_and_join(). While this is not a bug, due to type conversion, it's a lot more clear to simply pass the boolean true value instead. So just do that. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 318eee0328b76394356f0194e2db29eddcb86a06 Author: Filipe Manana Date: Tue Mar 21 11:37:04 2023 +0000 btrfs: remove btrfs_lru_cache_is_full() inline function It's not used anywhere at the moment, but it was used in earlier version of a patch that removed its use in the second version. So just remove btrfs_lru_cache_is_full(). Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 43fa4219bcf012385150de299364b5044de6500d Author: Christoph Hellwig Date: Tue Mar 14 17:51:10 2023 +0100 btrfs: simplify adding pages in btrfs_add_compressed_bio_pages btrfs_add_compressed_bio_pages is needlessly complicated. Instead of iterating over the logic disk offset just to add pages to the bio use a simple offset starting at 0, which also removes most of the claiming. Additionally __bio_add_pages already takes care of the assert that the bio is always properly sized, and btrfs_submit_bio called right after asserts that the bio size is non-zero. Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4513cb0c40d79599f72a5d1a6ab2fb279b63500d Author: Christoph Hellwig Date: Tue Mar 14 17:51:09 2023 +0100 btrfs: move the bi_sector assignment out of btrfs_add_compressed_bio_pages Adding pages to a bio has nothing to do with the sector. Move the assignment to the two callers in preparation for cleaning up btrfs_add_compressed_bio_pages. Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit d1cc579383191fe6c3f1eeac45eb50b8976d38de Author: Naohiro Aota Date: Mon Mar 13 16:46:54 2023 +0900 btrfs: sysfs: relax bg_reclaim_threshold for debugging purposes Currently, /sys/fs/btrfs//bg_reclaim_threshold is limited to 0 (disable) or [50 .. 100]%, so we need to fill 50% of a device to start the auto reclaim process. It is cumbersome to do so when we want to shake out possible race issues of normal write vs reclaim. Relax the threshold check under the BTRFS_DEBUG option. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2cef0c79bb81d8bae1dbc45195771a824ca45e76 Author: Christoph Hellwig Date: Tue Mar 7 17:39:45 2023 +0100 btrfs: make btrfs_split_bio work on struct btrfs_bio btrfs_split_bio expects a btrfs_bio as argument and always allocates one. Type both the orig_bio argument and the return value as struct btrfs_bio to improve type safety. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit b41bbd293e64016b3bfad4e5f709fcc07f00b2c5 Author: Christoph Hellwig Date: Tue Mar 7 17:39:44 2023 +0100 btrfs: return a btrfs_bio from btrfs_bio_alloc Return the containing struct btrfs_bio instead of the less type safe struct bio from btrfs_bio_alloc. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 9dfde1b47b9d7e090d9bf34f8a7ef4d89735f9e6 Author: Christoph Hellwig Date: Tue Mar 7 17:39:43 2023 +0100 btrfs: store a pointer to a btrfs_bio in struct btrfs_bio_ctrl The bio in struct btrfs_bio_ctrl must be a btrfs_bio, so store a pointer to the btrfs_bio for better type checking. Reviewed-by: Anand Jain Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit d733ea012db32ea4354c6d89b9538bbe8aa9388e Author: Christoph Hellwig Date: Tue Mar 7 17:39:42 2023 +0100 btrfs: simplify finding the inode in submit_one_bio struct btrfs_bio now has an always valid inode pointer that can be used to find the inode in submit_one_bio, so use that and initialize all variables for which it is possible at declaration time. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit b7d463a1d1252c2cd5e9f13c008eb49b8a5f75af Author: Christoph Hellwig Date: Tue Mar 7 17:39:41 2023 +0100 btrfs: store a pointer to the original btrfs_bio in struct compressed_bio The original bio must be a btrfs_bio, so store a pointer to the btrfs_bio for better type checking. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 690834e47cf7868a4c13e32ea2332d9fe6590073 Author: Christoph Hellwig Date: Tue Mar 7 17:39:40 2023 +0100 btrfs: pass a btrfs_bio to btrfs_submit_compressed_read btrfs_submit_compressed_read expects the bio passed to it to be embedded into a btrfs_bio structure. Pass the btrfs_bio directly to increase type safety and make the code self-documenting. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit ae42a154ca8972739be29f811a69bef6c4818a26 Author: Christoph Hellwig Date: Tue Mar 7 17:39:39 2023 +0100 btrfs: pass a btrfs_bio to btrfs_submit_bio btrfs_submit_bio expects the bio passed to it to be embedded into a btrfs_bio structure. Pass the btrfs_bio directly to increase type safety and make the code self-documenting. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 7edb9a3e72009917602f80f1c01f2337a103e7e0 Author: Christoph Hellwig Date: Tue Mar 7 17:39:38 2023 +0100 btrfs: move zero filling of compressed read bios into common code All algorithms have to fill the remainder of the orig_bio with zeroes, so do it in common code. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 34f888ce3a355ff83c03ab57cb510920c07f78bb Author: Christoph Hellwig Date: Tue Mar 7 17:39:37 2023 +0100 btrfs: cleanup main loop in btrfs_encoded_read_regular_fill_pages btrfs_encoded_read_regular_fill_pages has a pretty odd control flow. Unwind it so that there is a single loop over the pages array. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit b665affe93d8309afb24e9023e3a3cb8a770e030 Author: Christoph Hellwig Date: Tue Mar 7 17:39:36 2023 +0100 btrfs: remove unused members from struct btrfs_encoded_read_private The inode and file_offset members in struct btrfs_encoded_read_private are unused, so remove them. Last used in commit 7959bd441176 ("btrfs: remove the start argument to check_data_csum and export") and commit 7609afac6775 ("btrfs: handle checksum validation and repair at the storage layer"). Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 0b5485391deff35c6633d7cbff5cf3a8229fbe9e Author: David Sterba Date: Wed Mar 1 21:47:08 2023 +0100 btrfs: locking: use atomic for DREW lock writers The DREW lock uses percpu variable to track lock counters and for that it needs to allocate the structure. In btrfs_read_tree_root() or btrfs_init_fs_root() this may add another error case or requires the NOFS scope protection. One way is to preallocate the structure as was suggested in https://lore.kernel.org/linux-btrfs/20221214021125.28289-1-robbieko@synology.com/ We may avoid the allocation altogether if we don't use the percpu variables but an atomic for the writer counter. This should not make any difference, the DREW lock is used for truncate and NOCOW writes along with other IO operations. The percpu counter for writers has been there since the original commit 8257b2dc3c1a1057 "Btrfs: introduce btrfs_{start, end}_nocow_write() for each subvolume". The reason could be to avoid hammering the same cacheline from all the readers but then the writers do that anyway. Signed-off-by: David Sterba commit ce4cf3793e72a4ca2eeebc5db5d04f25b42a59db Author: Anand Jain Date: Thu Mar 2 21:30:48 2023 +0800 btrfs: remove redundant clearing of NODISCARD If no discard mount option is specified, including the NODISCARD option, we make the async discard the default option then we don't have to call the clear_opt again to clear the NODISCARD flag. Though this makes no difference, that the call is redundant has been pointed out several times so we better remove it. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0f202b256a141e6c94398dcf262d4abdf8dff978 Author: Anand Jain Date: Mon Mar 6 21:28:09 2023 +0800 btrfs: avoid repetitive define BTRFS_FEATURE_INCOMPAT_SUPP BTRFS_FEATURE_INCOMPAT_SUPP is defined twice, once under CONFIG_BTRFS_DEBUG and once without it, resulting in repetitive code. The reason for this is to add experimental features under CONFIG_BTRFS_DEBUG. To avoid repetitive code, add a common list BTRFS_FEATURE_INCOMPAT_SUPP_STABLE, and append experimental features only under CONFIG_BTRFS_DEBUG. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6b4d375a81551bec17854b51e13efb58b45c8a76 Author: Qu Wenruo Date: Mon Jan 16 15:04:13 2023 +0800 btrfs: scrub: remove root and csum_root arguments from scrub_simple_mirror() We don't need to pass the roots as arguments, reading them from the rb-tree is cheap. Thus there is really not much need to pre-fetch it and pass it all the way from scrub_stripe(). And we already have more than enough arguments in scrub_simple_mirror() and scrub_simple_stripe(), it's better to remove them and only grab those roots in scrub_simple_mirror(). Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1d40329736907587ac5995d2d4b3263759ff84e3 Author: Qu Wenruo Date: Mon Jan 16 15:04:12 2023 +0800 btrfs: scrub: remove unused path inside scrub_stripe() The variable @path is no longer passed into any call sites after commit 18d30ab96149 ("btrfs: scrub: use scrub_simple_mirror() to handle RAID56 data stripe scrub"), thus we can remove the variable completely. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5f50fa918f0c1740eb294f9ed532e26a7f1d0cb4 Author: Qu Wenruo Date: Wed Feb 22 15:47:40 2023 +0800 btrfs: do not use replace target device as an extra mirror [BUG] Currently btrfs can use dev-replace device as an extra mirror for read-repair. But it can lead to NODATASUM corruption in the following case: There is a RAID1 data chunk, and dev-replace is running from dev2 to dev0. |//| = Replaced data X X+1MB X+2MB Dev 2: | | | <- Source dev Dev 0: |///////| | <- Target dev Then a read on dev 2 X+2MB happens. And something wrong happened inside devid 2, causing an -EIO. In that case, read-repair would try the next mirror, and since we can use target device as an extra mirror, we will use that mirror instead. But unfortunately since the read is beyond the current replace cursor, we should not trust it at all, what we get would be just uninitialized garbage. But if this read is for NODATASUM range, then we just trust them and cause data corruption. [CAUSE] We used to have some checks to make sure we only return such extra mirror when the range is before our left cursor. The first commit introducing this behavior is ad6d620e2a57 ("Btrfs: allow repair code to include target disk when searching mirrors"). But later a fix, 22ab04e814f4 ("Btrfs: fix race between device replace and chunk allocation") changed the behavior, to always let btrfs_map_block() include the extra mirror to address a race in dev-replace which can cause missing writes to target device. This means, we lose the tracking of cursor for the extra mirror, thus can lead to above corruption. [FIX] The extra mirror is never a reliable one, at the beginning of dev-replace, the reliability is zero, while only at the end of the replace it's a fully reliable mirror. We either do the complex tracking, or never trust it. IMHO it's much easier to maintain if we don't trust it at all, and the extra mirror can only benefit for a limited period of time (during replace). Thus this patch would completely remove the ability to use target device as an extra mirror. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 4871c33baf56b13559f1e7cb7c065df07c3f068e Author: Qu Wenruo Date: Tue Feb 28 08:44:30 2023 +0800 btrfs: open_ctree() error handling cleanup Currently open_ctree() still uses two variables for error handling, err and ret. This can be confusing and missing some errors and does not conform to current coding style. This patch will fix the problems by: - Use only ret for error handling - Add proper ret assignment Originally we rely on the default value (-EINVAL) of err to handle errors, but that doesn't really reflects the error. This will change it use the correct error number for the following call sites: * subpage_info allocation * btrfs_free_extra_devids() * btrfs_check_rw_degradable() * cleaner_kthread allocation * transaction_kthread allocation - Add an extra ASSERT() To make sure we error out instead of returning 0. Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit e2eb02480c5407cc918f2dd90ee856bd2e549465 Author: Christoph Hellwig Date: Wed Feb 22 09:07:02 2023 -0800 btrfs: cleanup the main loop in btrfs_lookup_bio_sums Introduce a bio_offset variable for the current offset into the bio instead of recalculating it over and over. Remove the now only used once search_len and sector_offset variables, and reduce the scope for count and cur_disk_bytenr. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: David Sterba commit 65886d2b1fd42cd9e8b0540782078591e8752012 Author: Christoph Hellwig Date: Wed Feb 22 09:07:01 2023 -0800 btrfs: remove search_file_offset_in_bio There is no need to search for a file offset in a bio, it is now always provided in bbio->file_offset (set at bio allocation time since 0d495430db8d ("btrfs: set bbio->file_offset in alloc_new_bio")). Just use that with the offset into the bio. Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 198bd49e5f0cdd21ded084235232da2507f17da0 Author: Johannes Thumshirn Date: Tue Feb 21 08:21:04 2023 -0800 btrfs: sink calc_bio_boundaries into its only caller Nowadays calc_bio_boundaries() is a relatively simple function that only guarantees the one bio equals to one ordered extent rule for uncompressed Zone Append bios. Sink it into it's only caller alloc_new_bio(). Reviewed-by: Christoph Hellwig Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 24e6c8082208d3e840e45ee707a0054d03a2fa41 Author: Christoph Hellwig Date: Mon Feb 27 08:17:04 2023 -0700 btrfs: simplify main loop in submit_extent_page bio_add_page always adds either the entire range passed to it or nothing. Based on that btrfs_bio_add_page can only return a length smaller than the passed in one when hitting the ordered extent limit, which can only happen for writes. Given that compressed writes never even use this code path, this means that all the special cases for compressed extent offset handling are dead code. Reflow submit_extent_page to take advantage of this by inlining btrfs_bio_add_page and handling the ordered extent limit by decrementing it for each added range and thus significantly simplifying the loop. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 78a2ef1b7b332caaf6466be0b2608082e7c9e7ea Author: Christoph Hellwig Date: Mon Feb 27 08:17:03 2023 -0700 btrfs: check for contiguity in submit_extent_page Different loop iterations in btrfs_bio_add_page not only have the same contiguity parameters, but also any non-initial operation operates on a fresh bio anyway. Factor out the contiguity check into a new btrfs_bio_is_contig and only call it once in submit_extent_page before descending into the bio_add_page loop. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5380311fc8b7baa45011a9b45193b8ba11fc0efb Author: Christoph Hellwig Date: Mon Feb 27 08:17:02 2023 -0700 btrfs: simplify the error handling in __extent_writepage_io Remove the has_error and saved_ret variables, and just jump to a goto label for error handling from the only place returning an error from the main loop. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 551733372fda4ca2ed09d5c47dae6ce9f96aab60 Author: Christoph Hellwig Date: Mon Feb 27 08:17:01 2023 -0700 btrfs: remove the submit_extent_page return value submit_extent_page always returns 0 since commit d5e4377d5051 ("btrfs: split zone append bios in btrfs_submit_bio"). Change it to a void return type and remove all the unreachable error handling code in the callers. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit f8ed4852f3a9246a6693c93e8c0cad3645916315 Author: Christoph Hellwig Date: Mon Feb 27 08:17:00 2023 -0700 btrfs: remove the compress_type argument to submit_extent_page Update the compress_type in the btrfs_bio_ctrl after forcing out the previous bio in btrfs_do_readpage, so that alloc_new_bio can just use the compress_type member in struct btrfs_bio_ctrl instead of passing the same information redundantly as a function argument. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit a140453bf9fb6486044e19f346c93ff54fb2f718 Author: Christoph Hellwig Date: Mon Feb 27 08:16:59 2023 -0700 btrfs: rename the this_bio_flag variable in btrfs_do_readpage Rename this_bio_flag to compress_type to match the surrounding code and better document the intent. Also use the proper enum type instead of unsigned long. Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit c9bc621fb4988d5e1bd96d552bb3fda199638864 Author: Christoph Hellwig Date: Mon Feb 27 08:16:58 2023 -0700 btrfs: move the compress_type check out of btrfs_bio_add_page The compress_type can only change on a per-extent basis. So instead of checking it for every page in btrfs_bio_add_page, do the check once in btrfs_do_readpage, which is the only caller of btrfs_bio_add_page and submit_extent_page that deals with compressed extents. Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 72b505dc57573e1026bc9b8178a5e36804f339b8 Author: Christoph Hellwig Date: Mon Feb 27 08:16:57 2023 -0700 btrfs: add a wbc pointer to struct btrfs_bio_ctrl Instead of passing down the wbc pointer the deep call chain, just add it to the btrfs_bio_ctrl structure. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 794c26e214abf29f1b863917c7c80ee5c1d8d719 Author: Christoph Hellwig Date: Mon Feb 27 08:16:56 2023 -0700 btrfs: remove the sync_io flag in struct btrfs_bio_ctrl The sync_io flag is equivalent to wbc->sync_mode == WB_SYNC_ALL, so just check for that and remove the separate flag. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit c000bc04bad42dbe86e705828c9a328f4052ff21 Author: Christoph Hellwig Date: Mon Feb 27 08:16:55 2023 -0700 btrfs: store the bio opf in struct btrfs_bio_ctrl The bio op and flags never change over the life time of a bio_ctrl, so move it in there instead of passing it down the deep call chain all the way down to alloc_new_bio. Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit eb8d0c6d042fbe021098c4698a4b88b2e8027d17 Author: Christoph Hellwig Date: Mon Feb 27 08:16:54 2023 -0700 btrfs: remove the force_bio_submit to submit_extent_page If force_bio_submit, submit_extent_page simply calls submit_one_bio as the first thing. This can just be moved to the only caller that sets force_bio_submit to true. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 67998cf438e20f5858dbcf488f1662861aab5f44 Author: Christoph Hellwig Date: Mon Feb 27 08:16:53 2023 -0700 btrfs: don't set force_bio_submit in read_extent_buffer_subpage When read_extent_buffer_subpage calls submit_extent_page, it does so on a freshly initialized btrfs_bio_ctrl structure that can't have a valid bio to submit. Clear the force_bio_submit parameter to false as there is nothing to submit. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit fdf8d595f49c79f1c47e5a91c4c6582572c5eeee Author: Anand Jain Date: Fri Feb 24 11:31:26 2023 +0800 btrfs: open code btrfs_bin_search() btrfs_bin_search() is a simple wrapper that searches for the whole slots by calling btrfs_generic_bin_search() with the starting slot/first_slot preset to 0. This simple wrapper can be open coded as btrfs_bin_search(). Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7b31e0451d0be0e52bf0d7879066b39d9bd064fe Author: Qu Wenruo Date: Wed Feb 22 15:04:37 2023 +0800 btrfs: dev-replace: properly follow its read mode [BUG] Although dev replace ioctl has a way to specify the mode on whether we should read from the source device, it's not properly followed. # mkfs.btrfs -f -d raid1 -m raid1 $dev1 $dev2 # mount $dev1 $mnt # xfs_io -f -c "pwrite 0 32M" $mnt/file # sync # btrfs replace start -r -f 1 $dev3 $mnt And one extra trace is added to scrub_submit(), showing the detail about the bio: btrfs-11569 [005] ... 37.0270: scrub_submit.part.0: devid=1 logical=22036480 phy=22036480 len=16384 btrfs-11569 [005] ... 37.0273: scrub_submit.part.0: devid=1 logical=30457856 phy=30457856 len=32768 btrfs-11569 [005] ... 37.0274: scrub_submit.part.0: devid=1 logical=30507008 phy=30507008 len=49152 btrfs-11569 [005] ... 37.0274: scrub_submit.part.0: devid=1 logical=30605312 phy=30605312 len=32768 btrfs-11569 [005] ... 37.0275: scrub_submit.part.0: devid=1 logical=30703616 phy=30703616 len=65536 btrfs-11569 [005] ... 37.0281: scrub_submit.part.0: devid=1 logical=298844160 phy=298844160 len=131072 ... btrfs-11569 [005] ... 37.0762: scrub_submit.part.0: devid=1 logical=322961408 phy=322961408 len=131072 btrfs-11569 [005] ... 37.0762: scrub_submit.part.0: devid=1 logical=323092480 phy=323092480 len=131072 One can see that all the reads are submitted to devid 1, even if we have specified "-r" option to avoid reading from the source device. [CAUSE] The dev-replace read mode is only set but not followed by scrub code at all. In fact, only common read path is properly following the read mode, but scrub itself has its own read path, thus not following the mode. [FIX] Here we enhance scrub_find_good_copy() to also follow the read mode. The idea is pretty simple, in the first loop, we avoid the following devices: - Missing devices This is the existing condition - The source device if the replace wants to avoid it. And if above loop found no candidate (e.g. replace a single device), then we discard the 2nd condition, and try again. Since we're here, also enhance the function scrub_find_good_copy() by: - Remove the forward declaration - Makes it return int To indicates errors, e.g. no good mirror found. - Add extra error messages Now with the same trace, "btrfs replace start -r" works as expected: btrfs-1213 [000] ... 991.9059: scrub_submit.part.0: devid=2 logical=22036480 phy=1064960 len=16384 btrfs-1213 [000] ... 991.9062: scrub_submit.part.0: devid=2 logical=30457856 phy=9486336 len=32768 btrfs-1213 [000] ... 991.9063: scrub_submit.part.0: devid=2 logical=30507008 phy=9535488 len=49152 btrfs-1213 [000] ... 991.9064: scrub_submit.part.0: devid=2 logical=30605312 phy=9633792 len=32768 btrfs-1213 [000] ... 991.9065: scrub_submit.part.0: devid=2 logical=30703616 phy=9732096 len=65536 btrfs-1213 [000] ... 991.9073: scrub_submit.part.0: devid=2 logical=298844160 phy=277872640 len=131072 btrfs-1213 [000] ... 991.9075: scrub_submit.part.0: devid=2 logical=298975232 phy=278003712 len=131072 btrfs-1213 [000] ... 991.9078: scrub_submit.part.0: devid=2 logical=299106304 phy=278134784 len=131072 ... btrfs-1213 [000] ... 991.9474: scrub_submit.part.0: devid=2 logical=318504960 phy=297533440 len=131072 btrfs-1213 [000] ... 991.9476: scrub_submit.part.0: devid=2 logical=318636032 phy=297664512 len=131072 btrfs-1213 [000] ... 991.9479: scrub_submit.part.0: devid=2 logical=318767104 phy=297795584 len=131072 Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit f9327a70c12c362b15c62b011332e22d242cf009 Author: Christoph Hellwig Date: Fri Feb 10 08:48:41 2023 +0100 btrfs: fold finish_compressed_bio_write into btrfs_finish_compressed_write_work Fold finish_compressed_bio_write into its only caller as there is no reason to keep them separate. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit a959a1745d333fbce1e21895ac6d833a77213112 Author: Christoph Hellwig Date: Fri Feb 10 08:48:40 2023 +0100 btrfs: don't clear page->mapping in btrfs_free_compressed_pages No one ever set ->mapping on these pages, so don't bother clearing it. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 32586c5bca72bfd2875f0c66032e134ce1c68680 Author: Christoph Hellwig Date: Fri Feb 10 08:48:39 2023 +0100 btrfs: factor out a btrfs_free_compressed_pages helper Share the code to free the compressed pages and the array to hold them into a common helper. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 10e924bc320a956a62db768ee6e5c49af8f0b670 Author: Christoph Hellwig Date: Fri Feb 10 08:48:38 2023 +0100 btrfs: factor out a btrfs_add_compressed_bio_pages helper Factor out a common helper to add the compressed_bio pages to the bio that is shared by the compressed read and write path. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit d7294e4deeb9f3e7a41c759b3b0b2d28d80fbde2 Author: Christoph Hellwig Date: Fri Feb 10 08:48:37 2023 +0100 btrfs: use the bbio file offset in add_ra_bio_pages struct btrfs_bio now has a file_offset field set up by all submitters. Use that value combined with the bio size in add_ra_bio_pages to calculate the last offset in the bio. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit e7aff33e31610729f0c9c487f0e262cf96e98ebb Author: Christoph Hellwig Date: Fri Feb 10 08:48:36 2023 +0100 btrfs: use the bbio file offset in btrfs_submit_compressed_read struct btrfs_bio now has a file_offset field set up by all submitters. Use that in btrfs_submit_compressed_read instead of recalculating the value. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 798c9fc74d034fca49031efb195e07e59bb926df Author: Christoph Hellwig Date: Fri Feb 10 08:48:35 2023 +0100 btrfs: remove redundant free_extent_map in btrfs_submit_compressed_read em can't be non-NULL after the free_extent_map label. Also remove the now pointless clearing of em to NULL after freeing it. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 544fe4a903ce71fb8ecbc159db6f245ef3f691fe Author: Christoph Hellwig Date: Fri Feb 10 08:48:34 2023 +0100 btrfs: embed a btrfs_bio into struct compressed_bio Embed a btrfs_bio into struct compressed_bio. This avoids potential (so far theoretical) deadlocks due to nesting of btrfs_bioset allocations for the original read bio and the compressed bio, and avoids an extra memory allocation in the I/O path. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 18d758a2d81a97b9a54a37d535870ce3170cc208 Author: Qu Wenruo Date: Fri Feb 17 13:37:03 2023 +0800 btrfs: replace btrfs_io_context::raid_map with a fixed u64 value In btrfs_io_context structure, we have a pointer raid_map, which indicates the logical bytenr for each stripe. But considering we always call sort_parity_stripes(), the result raid_map[] is always sorted, thus raid_map[0] is always the logical bytenr of the full stripe. So why we waste the space and time (for sorting) for raid_map? This patch will replace btrfs_io_context::raid_map with a single u64 number, full_stripe_start, by: - Replace btrfs_io_context::raid_map with full_stripe_start - Replace call sites using raid_map[0] to use full_stripe_start - Replace call sites using raid_map[i] to compare with nr_data_stripes. The benefits are: - Less memory wasted on raid_map It's sizeof(u64) * num_stripes vs sizeof(u64). It'll always save at least one u64, and the benefit grows larger with num_stripes. - No more weird alloc_btrfs_io_context() behavior As there is only one fixed size + one variable length array. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 1faf3885067d5be65597d5dc682f0da505822104 Author: Qu Wenruo Date: Tue Feb 7 12:26:14 2023 +0800 btrfs: use an efficient way to represent source of duplicated stripes For btrfs dev-replace, we have to duplicate writes to the source device into the target device. For non-RAID56, all writes into the same mapped ranges are sharing the same content, thus they don't really need to bother anything. (E.g. in btrfs_submit_bio() for non-RAID56 range we just submit the same write to all involved devices). But for RAID56, all stripes contain different content, thus we must have a clear mapping of which stripe is duplicated from which original stripe. Currently we use a complex way using tgtdev_map[] array, e.g: num_tgtdevs = 1 tgtdev_map[0] = 0 <- Means stripes[0] is not involved in replace. tgtdev_map[1] = 3 <- Means stripes[1] is involved in replace, and it's duplicated to stripes[3]. tgtdev_map[2] = 0 <- Means stripes[2] is not involved in replace. But this is wasting some space, and ignores one important thing for dev-replace, there is at most one running replace. Thus we can change it to a fixed array to represent the mapping: replace_nr_stripes = 1 replace_stripe_src = 1 <- Means stripes[1] is involved in replace. thus the extra stripe is a copy of stripes[1] By this we can save some space for bioc on RAID56 chunks with many devices. And we get rid of one variable sized array from bioc. Thus the patch involves the following changes: - Replace @num_tgtdevs and @tgtdev_map[] with @replace_nr_stripes and @replace_stripe_src. @num_tgtdevs is just renamed to @replace_nr_stripes. While the mapping is completely changed. - Add extra ASSERT()s for RAID56 code - Only add two more extra stripes for dev-replace cases. As we have an upper limit on how many dev-replace stripes we can have. - Unify the behavior of handle_ops_on_dev_replace() Previously handle_ops_on_dev_replace() go two different paths for WRITE and GET_READ_MIRRORS. Now unify them by always going the WRITE path first (with at most 2 replace stripes), then if we're doing GET_READ_MIRRORS and we have 2 extra stripes, just drop one stripe. - Remove the @real_stripes argument from alloc_btrfs_io_context() As we don't need the old variable length array any more. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 4ced85f81a7a67e190a4ff4e14d8cc04978a3767 Author: Qu Wenruo Date: Tue Feb 7 12:26:13 2023 +0800 btrfs: reduce type width of btrfs_io_contexts That structure is our ultimate object for all __btrfs_map_block() related functions. We have some hard to understand members, like tgtdev_map, but without any comments. This patch will improve the situation: - Add extra comments for num_stripes, mirror_num, num_tgtdevs and tgtdev_map[] Especially for the last two members, add a dedicated (thus very long) comments for them, with example to explain it. - Shrink those int members to u16. In fact our on-disk format is only using u16 for num_stripes, thus no need to use int at all. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit be5c7edbfdf1112cbbdd15700f33f37b66fc8976 Author: Qu Wenruo Date: Tue Feb 7 12:26:12 2023 +0800 btrfs: simplify the bioc argument for handle_ops_on_dev_replace() There is no memory re-allocation for handle_ops_on_dev_replace(), thus we don't need to pass a btrfs_io_context pointer. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6ded22c1bfe6a8a91216046d5d4c01fd1442988b Author: Qu Wenruo Date: Fri Feb 17 13:36:59 2023 +0800 btrfs: reduce div64 calls by limiting the number of stripes of a chunk to u32 There are quite some div64 calls inside btrfs_map_block() and its variants. Such calls are for @stripe_nr, where @stripe_nr is the number of stripes before our logical bytenr inside a chunk. However we can eliminate such div64 calls by just reducing the width of @stripe_nr from 64 to 32. This can be done because our chunk size limit is already 10G, with fixed stripe length 64K. Thus a U32 is definitely enough to contain the number of stripes. With such width reduction, we can get rid of slower div64, and extra warning for certain 32bit arch. This patch would do: - Add a new tree-checker chunk validation on chunk length Make sure no chunk can reach 256G, which can also act as a bitflip checker. - Reduce the width from u64 to u32 for @stripe_nr variables - Replace unnecessary div64 calls with regular modulo and division 32bit division and modulo are much faster than 64bit operations, and we are finally free of the div64 fear at least in those involved functions. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit a97699d1d610710fb0103addaac3b590716f2de4 Author: Qu Wenruo Date: Fri Feb 17 13:36:58 2023 +0800 btrfs: replace map_lookup->stripe_len by BTRFS_STRIPE_LEN Currently btrfs doesn't support stripe lengths other than 64KiB. This is already set in the tree-checker. There is really no meaning to record that fixed value in map_lookup for now, and can all be replaced with BTRFS_STRIPE_LEN. Furthermore we can use the fix stripe length to do the following optimization: - Use BTRFS_STRIPE_LEN_SHIFT to replace some 64bit division Now we only need to do a right shift. And the value of BTRFS_STRIPE_LEN itself is already too large for bit shift, thus if we accidentally use BTRFS_STRIPE_LEN to do bit shift, a compiler warning would be triggered. Thus this bit shift optimization would be safe. - Use BTRFS_STRIPE_LEN_MASK to calculate the offset inside a stripe Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit dcb2137c8411d9940ebdfc93bb4de20b7f8fcf42 Author: Christoph Hellwig Date: Sun Feb 19 19:10:22 2023 +0100 btrfs: move all btree inode initialization into btrfs_init_btree_inode Move the remaining code that deals with initializing the btree inode into btrfs_init_btree_inode instead of splitting it between that helpers and its only caller. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 19337f8ea3fc0ed177142bbaf8496cda26f1432e Author: Anand Jain Date: Sat Feb 11 00:15:55 2023 +0800 btrfs: switch search_file_offset_in_bio to return bool Function search_file_offset_in_bio() finds the file offset in the file_offset_ret, and we use the return value to indicate if it is successful, so use bool. Reviewed-by: Christoph Hellwig Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit da8269a3e9edb8c57cd5448e07a5157872ddd143 Author: Anand Jain Date: Sat Feb 11 00:15:54 2023 +0800 btrfs: avoid reusing return variable in nested block in btrfs_lookup_bio_sums The function btrfs_lookup_bio_sums() and a nested if statement declare ret respectively as blk_status_t and int. There is no need to store the return value of search_file_offset_in_bio() to ret as this is a one-time call. Reviewed-by: Christoph Hellwig Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit fa13661c48debbfb0a749e9328ea5648cf18fab4 Author: Johannes Thumshirn Date: Fri Feb 10 02:50:08 2023 -0800 btrfs: open code btrfs_csum_ptr Remove btrfs_csum_ptr() and fold it into it's only caller. Reviewed-by: Anand Jain Reviewed-by: Christoph Hellwig Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 74cc3600e8a7599557cf684ba8760d6cb2c911d8 Author: Christoph Hellwig Date: Fri Jan 20 08:46:57 2023 +0100 btrfs: raid56: no need for irqsafe locking These days all the operations that take locks in the raid56.c code are run from user context (mostly workqueues). Drop all the irqsafe locking that is not required any more. Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9a93b5a35388aabb061212e906221a540ffdb965 Author: Josef Bacik Date: Tue Feb 7 11:57:25 2023 -0500 btrfs: abort the transaction if we get an error during snapshot drop We were seeing weird errors when we were testing our btrfs backports before we had the incorrect level check fix. These errors appeared to be improper error handling, but error injection testing uncovered that the errors were a result of corruption that occurred from improper error handling during snapshot delete. With snapshot delete if we encounter any errors during walk_down or walk_up we'll simply return an error, we won't abort the transaction. This is problematic because we will be dropping references for nodes and leaves along the way, and if we fail in the middle we will leave the file system corrupt because we don't know where we left off in the drop. Fix this by making sure we abort if we hit any errors during the walk down or walk up operations, as we have no idea what operations could have been left half done at this point. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4e19438400ce6d4a6251829ac045ba680ad48bb4 Author: Josef Bacik Date: Tue Feb 7 11:57:24 2023 -0500 btrfs: handle errors in walk_down_tree properly We can get errors in walk_down_proc as we try and lookup extent info for the snapshot dropping to act on. However if we get an error we simply return 1 which indicates we're done with walking down, which will lead us to improperly continue with the snapshot drop with the incorrect information. Instead break if we get any error from walk_down_proc or do_walk_down, and handle the case of ret == 1 by returning 0, otherwise return the ret value that we have. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6989627db074a3db0ca297657bcb8709d8c888c0 Author: Josef Bacik Date: Tue Feb 7 11:57:23 2023 -0500 btrfs: drop root refs properly when orphan cleanup fails When we mount the file system we do something like this: while (1) { lookup fs roots; for (i = 0; i < num_roots; i++) { ret = btrfs_orphan_cleanup(roots[i]); if (ret) break; btrfs_put_root(roots[i]); } } for (; i < num_roots; i++) btrfs_put_root(roots[i]); As you can see if we break in that inner loop we just go back to the outer loop and lose the fact that we have to drop references on the remaining roots we looked up. Fix this by making an out label and jumping to that on error so we don't leak a reference to the roots we looked up. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit a13bb2c03848e4f96f10486ba0b76f8d398bc71c Author: Josef Bacik Date: Tue Feb 7 11:57:22 2023 -0500 btrfs: add missing iputs on orphan cleanup failure We missed a couple of iput()s in the orphan cleanup failure paths, add them so we don't get refcount errors. The iput needs to be done in the check and not under a common label due to the way the code is structured. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9cf14029d5fb42126b332aea708b787be9a5079e Author: Josef Bacik Date: Tue Feb 7 11:57:21 2023 -0500 btrfs: handle errors from btrfs_read_node_slot in split While investigating a problem with error injection I tripped over curious behavior in the node/leaf splitting code. If we get an EIO when trying to read either the left or right leaf/node for splitting we'll simply treat the node as if it were full and continue on. The end result of this isn't too bad, we simply end up allocating a block when we may have pushed items into the adjacent blocks. However this does essentially allow us to continue to modify a file system that we've gotten errors on, either from a bad disk or csum mismatch or other corruption. This isn't particularly safe, so instead handle these btrfs_read_node_slot() usages differently. We allow you to pass in any slot, the idea being that we save some code if the slot number is outside of the range of the parent. This means we treat all errors the same, when in reality we only want to ignore -ENOENT. Fix this by changing how we call btrfs_read_node_slot(), which is to only call it for slots we know are valid. This way if we get an error back from reading the block we can properly pass the error up the chain. This was validated with the error injection testing I was doing. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit d46947284496e5dd1d5f6850790ec623a482b63a Author: Josef Bacik Date: Tue Feb 7 11:57:20 2023 -0500 btrfs: replace BUG_ON with ASSERT in btrfs_read_node_slot In btrfs_read_node_slot() we have a BUG_ON() that can be converted to an ASSERT(), it's from an extent buffer and the level is validated at the time it's read from disk. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 13b98989c81a64b6674f017324b37bedf158567e Author: Josef Bacik Date: Tue Feb 7 11:57:19 2023 -0500 btrfs: use btrfs_handle_fs_error in btrfs_fill_super While trying to track down a lost EIO problem I hit the following assertion while doing my error injection testing BTRFS warning (device nvme1n1): transaction 1609 (with 180224 dirty metadata bytes) is not committed assertion failed: !found, in fs/btrfs/disk-io.c:4456 ------------[ cut here ]------------ kernel BUG at fs/btrfs/messages.h:169! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI CPU: 0 PID: 1445 Comm: mount Tainted: G W 6.2.0-rc5+ #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.1-2.fc37 04/01/2014 RIP: 0010:btrfs_assertfail.constprop.0+0x18/0x1a RSP: 0018:ffffb95fc3b0bc68 EFLAGS: 00010286 RAX: 0000000000000034 RBX: ffff9941c2ac2000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffffb6741f7d RDI: 00000000ffffffff RBP: ffff9941c2ac2428 R08: 0000000000000000 R09: ffffb95fc3b0bb38 R10: 0000000000000003 R11: ffffffffb71438a8 R12: ffff9941c2ac2428 R13: ffff9941c2ac2450 R14: ffff9941c2ac2450 R15: 000000000002c000 FS: 00007fcea2d07800(0000) GS:ffff9941fbc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f00cc7c83a8 CR3: 000000010c686000 CR4: 0000000000350ef0 Call Trace: close_ctree+0x426/0x48f btrfs_mount_root.cold+0x7e/0xee ? legacy_parse_param+0x2b/0x220 legacy_get_tree+0x2b/0x50 vfs_get_tree+0x29/0xc0 vfs_kern_mount.part.0+0x73/0xb0 btrfs_mount+0x11d/0x3d0 ? legacy_parse_param+0x2b/0x220 legacy_get_tree+0x2b/0x50 vfs_get_tree+0x29/0xc0 path_mount+0x438/0xa40 __x64_sys_mount+0xe9/0x130 do_syscall_64+0x3e/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc This is because the error injection did an EIO for the root inode lookup and we simply jumped to closing the ctree. However because we didn't mark the file system as having an error we skipped all of the broken transaction cleanup stuff, and thus triggered this ASSERT(). Fix this by calling btrfs_handle_fs_error() in this case so we have the error set on the file system. Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9c54548bc9e46217c551ed69fd2f14f4cb5155eb Author: Ryder Lee Date: Fri Apr 14 04:23:30 2023 +0800 wifi: mt76: connac: add nss calculation into mt76_connac2_mac_tx_rate_val() Take nss calculation into account since this function always wrongly returns 0. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 3d2892e05086d09aecf14ea64b2debbf495e313c Author: Ryder Lee Date: Fri Apr 14 04:23:29 2023 +0800 wifi: mt76: connac: fix txd multicast rate setting The vif->bss_conf.mcast_rate should be applied to multicast data frame only. Fixes: 182071cdd594 ("mt76: connac: move connac2_mac_write_txwi in mt76_connac module") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 3d78c46423c6567ed25ca033e086865b1b4d5ae1 Author: Quan Zhou Date: Thu Apr 13 05:11:14 2023 +0800 wifi: mt76: mt7921e: stop chip reset worker in unregister hook If the chip reset worker is triggered during the remove process, the chip DMA may not be properly pushed back to the idle state. This can lead to corruption of the DMA flow due to the chip reset. Therefore, it is necessary to stop the chip reset before the DMA is finalized. To avoid resetting the chip after the reset worker is cancelled, use __mt7921_mcu_drv_pmctrl() instead of mt7921_mcu_drv_pmctrl(). It is safe to ignore the pm mutex because the pm worker and wake worker have already been cancelled. Fixes: 033ae79b3830 ("mt76: mt7921: refactor init.c to be bus independent") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Co-developed-by: Deren Wu Signed-off-by: Deren Wu Co-developed-by: Wang Zhao Signed-off-by: Wang Zhao Signed-off-by: Quan Zhou Signed-off-by: Felix Fietkau commit 87714bf6ed1589813e473db5471e6e9857755764 Author: Quan Zhou Date: Thu Apr 13 05:11:13 2023 +0800 wifi: mt76: mt7921e: improve reliability of dma reset The hardware team has advised the driver that it is necessary to first put WFDMA into an idle state before resetting the WFDMA. Otherwise, the WFDMA may enter an unknown state where it cannot be polled with the right state successfully. To ensure that the DMA can work properly while a stressful cold reboot test was being made, we have reordered the programming sequence in the driver based on the hardware team's guidance. The patch would modify the WFDMA disabling flow from "DMA reset -> disabling DMASHDL -> disabling WFDMA -> polling and waiting until DMA idle" to "disabling WFDMA -> polling and waiting for DMA idle -> disabling DMASHDL -> DMA reset. Where he polling and waiting until WFDMA is idle is coordinated with the operation of disabling WFDMA. Even while WFDMA is being disabled, it can still handle Tx/Rx requests. The additional polling allows sufficient time for WFDMA to process the last T/Rx request. When the idle state of WFDMA is reached, it is a reliable indication that DMASHDL is also idle to ensure it is safe to disable it and perform the DMA reset. Fixes: 0a1059d0f060 ("mt76: mt7921: move mt7921_dma_reset in dma.c") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Co-developed-by: Deren Wu Signed-off-by: Deren Wu Co-developed-by: Wang Zhao Signed-off-by: Wang Zhao Signed-off-by: Quan Zhou Signed-off-by: Felix Fietkau commit 5c47cdebbaeb7724df6f9f46917c93e53f791547 Author: Jiefeng Li Date: Wed Apr 12 14:22:34 2023 +0800 wifi: mt76: mt7921: fix missing unwind goto in `mt7921u_probe` `mt7921u_dma_init` can only return zero or negative number according to its definition. When it returns non-zero number, there exists an error and this function should handle this error rather than return directly. Fixes: 0d2afe09fad5 ("mt76: mt7921: add mt7921u driver") Signed-off-by: Jiefeng Li Reviewed-by: Dongliang Mu Reviewed-by: Sridhar Samudrala Signed-off-by: Felix Fietkau commit 12db28c3ef31f719bd18fa186a40bb152e6a527c Author: Sean Wang Date: Wed Apr 12 05:23:11 2023 +0800 mt76: mt7921: fix kernel panic by accessing unallocated eeprom.data The MT7921 driver no longer uses eeprom.data, but the relevant code has not been removed completely since commit 16d98b548365 ("mt76: mt7921: rely on mcu_get_nic_capability"). This could result in potential invalid memory access. To fix the kernel panic issue in mt7921, it is necessary to avoid accessing unallocated eeprom.data which can lead to invalid memory access. Furthermore, it is possible to entirely eliminate the mt7921_mcu_parse_eeprom function and solely depend on mt7921_mcu_parse_response to divide the RxD header. [2.702735] BUG: kernel NULL pointer dereference, address: 0000000000000550 [2.702740] #PF: supervisor write access in kernel mode [2.702741] #PF: error_code(0x0002) - not-present page [2.702743] PGD 0 P4D 0 [2.702747] Oops: 0002 [#1] PREEMPT SMP NOPTI [2.702755] RIP: 0010:mt7921_mcu_parse_response+0x147/0x170 [mt7921_common] [2.702758] RSP: 0018:ffffae7c00fef828 EFLAGS: 00010286 [2.702760] RAX: ffffa367f57be024 RBX: ffffa367cc7bf500 RCX: 0000000000000000 [2.702762] RDX: 0000000000000550 RSI: 0000000000000000 RDI: ffffa367cc7bf500 [2.702763] RBP: ffffae7c00fef840 R08: ffffa367cb167000 R09: 0000000000000005 [2.702764] R10: 0000000000000000 R11: ffffffffc04702e4 R12: ffffa367e8329f40 [2.702766] R13: 0000000000000000 R14: 0000000000000001 R15: ffffa367e8329f40 [2.702768] FS: 000079ee6cf20c40(0000) GS:ffffa36b2f940000(0000) knlGS:0000000000000000 [2.702769] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [2.702775] CR2: 0000000000000550 CR3: 00000001233c6004 CR4: 0000000000770ee0 [2.702776] PKRU: 55555554 [2.702777] Call Trace: [2.702782] mt76_mcu_skb_send_and_get_msg+0xc3/0x11e [mt76 ] [2.702785] mt7921_run_firmware+0x241/0x853 [mt7921_common ] [2.702789] mt7921e_mcu_init+0x2b/0x56 [mt7921e ] [2.702792] mt7921_register_device+0x2eb/0x5a5 [mt7921_common ] [2.702795] ? mt7921_irq_tasklet+0x1d4/0x1d4 [mt7921e ] [2.702797] mt7921_pci_probe+0x2d6/0x319 [mt7921e ] [2.702799] pci_device_probe+0x9f/0x12a Fixes: 16d98b548365 ("mt76: mt7921: rely on mcu_get_nic_capability") Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 61d1f54533496711e06fcfd42b93c5ded9e27c7a Author: Lorenzo Bianconi Date: Wed Apr 5 12:38:53 2023 +0200 wifi: mt76: move mcu_uni_event and mcu_reg_event in common code mcu_uni_event and mcu_reg_event structs are shared between mt7921 and mt7615 drivers, so move them in connac lib. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 878161d5d4a469a6ef7f3fb4fe9f676bc508ee99 Author: Ryder Lee Date: Wed Apr 5 07:24:39 2023 +0800 wifi: mt76: mt7996: enable coredump support Host triggered and catastrophic event triggered firmware core dumping for basic firmware issues triage, including state reporting, function calltrace and MCU memory dump. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 672662f0742bf51584b871939703e3deb4beec27 Author: Ryder Lee Date: Wed Apr 5 07:24:38 2023 +0800 wifi: mt76: mt7996: add full system reset knobs into debugfs Add testing points into debugfs to trigger firmware assert and enable full system recovery. Also rename knob "fw_ser" to a clear-cut name "sys_recovery". Co-developed-by: Bo Jiao Signed-off-by: Bo Jiao Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 27015b6fbcca836c6dbf196afc266e068af4aeec Author: Bo Jiao Date: Wed Apr 5 07:24:37 2023 +0800 wifi: mt76: mt7996: enable full system reset support Add mt7996_reset() and refactor mt7996_mac_reset_work() to support full system recovery. Signed-off-by: Bo Jiao Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 1b83d17ccece7db5e0ad4602969c1146f1381c3d Author: Sean Wang Date: Wed Mar 8 05:50:59 2023 +0800 wifi: mt76: mt7921: enable p2p support Introduce p2p-go/p2p-client support to mt7921 driver CONNECTION_P2P_GC/GO is not supported with the current firmware so we added mt76_dev to mt76_connac_mcu_sta_basic_tlv signature to use CONNECTION_INFRA_STA/AP instead for p2p-client and p2p-go respectively to make it work. Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 4c87f3ff78b20da0dd118762fd66b67a98e36249 Merge: 1aa88541a2d2f 9f68ff79ec2cb Author: Arnd Bergmann Date: Mon Apr 17 17:38:41 2023 +0200 Merge tag 'scmi-updates-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers Arm SCMI updates for v6.4 The main and only new addition this time around is the support for unidirectional mailbox channels. SCMI communicates between the agent and the platform using one bidirectional 'a2p' channel used by the agent to send SCMI commands and synchronously receive the related replies, and an optional 'p2a' unidirectional channel used to asynchronously receive delayed responses and notifications emitted from the platform. In order to support platforms that support only unidirectional mailbox hardware channels, the existing bindings are extended to support the same. Both bidirectional and unidirectional channels support for the SCMI mailbox can coexist. The correct and effective combination of defined 'mboxes' and 'shmem' descriptors determines the type of the mailbox channel. This also contains a fix for the transfers allocation on Rx channel especially when the base protocol doesn't use Rx channel while some of the protocols can have dedicated Rx channels. * tag 'scmi-updates-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Add support for unidirectional mailbox channels dt-bindings: firmware: arm,scmi: Support mailboxes unidirectional channels firmware: arm_scmi: Fix xfers allocation on Rx channel firmware: arm_scmi: Use the bitmap API to allocate bitmaps firmware: arm_scmi: Fix device node validation for mailbox transport firmware: arm_scmi: Fix raw coexistence mode behaviour on failure path firmware: arm_scmi: Remove duplicate include header inclusion firmware: arm_scmi: Return a literal instead of a variable firmware: arm_scmi: Clean up a return statement in scmi_probe Link: https://lore.kernel.org/r/20230417145743.1904318-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 1aa88541a2d2f3003685bd019a59aba758a9814d Merge: 69bda55a09d1f 04ebdc354895e Author: Arnd Bergmann Date: Mon Apr 17 17:38:32 2023 +0200 Merge tag 'vexpress-update-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers Armv7/v8 Vexpress update for v6.4 Addition of explicit of_platform.h header inclusion and removal of soon to be removed of_device.h * tag 'vexpress-update-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: bus: vexpress-config: Add explicit of_platform.h include Link: https://lore.kernel.org/r/20230417145724.1904259-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 69bda55a09d1f6ee15666c5f90475f885fee3472 Merge: 4f2f29913684f 3ec0e1ea4770e Author: Arnd Bergmann Date: Mon Apr 17 17:38:04 2023 +0200 Merge tag 'memory-controller-drv-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers Memory controller drivers for v6.4, part two 1. Tegra210 EMC: correct reading of MR18 register. 2. MediaTek SMI: add support for MT8365. * tag 'memory-controller-drv-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: mtk-smi: mt8365: Add SMI Support dt-bindings: memory-controllers: mediatek,smi-larb: add mt8365 dt-bindings: memory-controllers: mediatek,smi-common: add mt8365 memory: tegra: read values from correct device Link: https://lore.kernel.org/r/20230416143248.308942-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 6d6793cef6a491b8f6db5f40ef3334411293da32 Author: Gustavo A. R. Silva Date: Fri Mar 17 14:56:39 2023 -0600 wifi: mt76: mt7921: Replace fake flex-arrays with flexible-array members Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Address the following warnings found with GCC-13 and -fstrict-flex-arrays=3 enabled: drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c:266:25: warning: array subscript 0 is outside array bounds of ‘struct mt7921_asar_dyn_limit_v2[0]’ [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c:263:25: warning: array subscript 0 is outside array bounds of ‘struct mt7921_asar_dyn_limit[0]’ [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c:223:28: warning: array subscript is outside array bounds of ‘struct mt7921_asar_geo_limit_v2[0]’ [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c:220:28: warning: array subscript is outside array bounds of ‘struct mt7921_asar_geo_limit[0]’ [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7921/acpi_sar.c:334:37: warning: array subscript i is outside array bounds of ‘u8[0]’ {aka ‘unsigned char[]’} [-Warray-bounds=] Notice that the DECLARE_FLEX_ARRAY() helper allows for flexible-array members in unions. This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/272 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Simon Horman Signed-off-by: Felix Fietkau commit 2631c5b6ef9d7c6707e020def6947464c8aa6f92 Author: Gustavo A. R. Silva Date: Thu Apr 6 08:32:12 2023 -0600 wifi: mt76: Replace zero-length array with flexible-array member Zero-length arrays are deprecated [1] and have to be replaced by C99 flexible-array members. This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help to make progress towards globally enabling -fstrict-flex-arrays=3 [2] Link: https://github.com/KSPP/linux/issues/78 [1] Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Simon Horman Signed-off-by: Felix Fietkau commit 03eb52dd78cab08f13925aeec8315fbdbcba3253 Author: Reese Russell Date: Tue Apr 4 00:35:12 2023 -0700 wifi: mt76: mt7921: add Netgear AXE3000 (A8000) support Issue: Though the Netgear AXE3000 (A8000) is based on the mt7921 chipset because of the unique USB VID:PID combination this device does not initialize/register. Thus making it not plug and play. Fix: Adds support for the Netgear AXE3000 (A8000) based on the Mediatek mt7921au chipset. The method of action is adding the USD VID/PID pair to the mt7921u_device_table[] array. Notes: A retail sample of the Netgear AXE3000 (A8000) yeilds the following from lsusb D 0846:9060 NetGear, Inc. Wireless_Device. This pair 0846:9060 VID:PID has been reported by other users on Github. Signed-off-by: Reese Russell Signed-off-by: Felix Fietkau commit 268079896060b224cb0a42eb6ca0d0a0836c46bb Author: Ryder Lee Date: Fri Mar 31 06:10:17 2023 +0800 wifi: mt76: mt7915: drop redundant prefix of mt7915_txpower_puts() Just a cosmetic patch to drop redundant prefix for txpower ouput text. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 23792cedaff02351b57bddd8957fc917fa88f2e0 Author: Ming Yen Hsieh Date: Thu Mar 23 21:26:12 2023 +0800 wifi: mt76: fix 6GHz high channel not be scanned mt76 scan command only support 64 channels currently. If the channel count is larger than 64(for 2+5+6GHz), some channels will not be scanned. Hence change the scan type to full channel scan in case of the command cannot include proper list for chip. Fixes: 399090ef9605 ("mt76: mt76_connac: move hw_scan and sched_scan routine in mt76_connac_mcu module") Reported-by: Ben Greear Tested-by: Isaac Konikoff Signed-off-by: Ming Yen Hsieh Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit c397fc1e6365a2a9e5540a85b2c1d4ea412aa0e2 Author: Quan Zhou Date: Sat Mar 18 15:41:12 2023 +0800 wifi: mt76: mt7921e: fix probe timeout after reboot In system warm reboot scene, due to the polling timeout(now 1000us) is too short to wait dma idle in time, it may make driver probe fail with error code -ETIMEDOUT. Meanwhile, we also found the dma may take around 70ms to enter idle state. Change the polling idle timeout to 100ms to avoid the probabilistic probe fail. Tested pass with 5000 times warm reboot on x86 platform. [4.477496] pci 0000:01:00.0: attach allowed to drvr mt7921e [internal device] [4.478306] mt7921e 0000:01:00.0: ASIC revision: 79610010 [4.480063] mt7921e: probe of 0000:01:00.0 failed with error -110 Fixes: 0a1059d0f060 ("mt76: mt7921: move mt7921_dma_reset in dma.c") Signed-off-by: Quan Zhou Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit 140efef36a91c1d7fad7f89c375fba8df1e4459f Author: Lorenzo Bianconi Date: Mon Apr 3 12:34:00 2023 +0200 wifi: mt76: move shared mac definitions in mt76_connac2_mac.h Move some mac shared definitions between mt7996, mt7921 and mt7915 in mt76_connac2_mac.h. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 50cc972dde9647e43e3c1e64a41e0553e92e6a37 Author: Lorenzo Bianconi Date: Mon Apr 3 12:33:59 2023 +0200 wifi: mt76: mt7921: get rid of eeprom.h eeprom.h is mostly empty for mt7921, so get rid of it. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 6a8b899df1562a46a8c55cebc7d35508a24300d3 Author: Lorenzo Bianconi Date: Mon Apr 3 12:33:58 2023 +0200 wifi: mt76: add mt76_connac_gen_ppe_thresh utility routine gen_ppe_thresh routine is shared between mt7615, mt7915, mt7921 and mt7996 so move it in mt76_connac module. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit f28c3139a9073a0f3161c4f144440b455124041c Author: Lorenzo Bianconi Date: Mon Apr 3 12:33:57 2023 +0200 wifi: mt76: get rid of unused sta_ps callbacks sta_ps callback is just an empty stub for most of the drivers, so get rid of them. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4fc441569c9b18eb87d8cd20f197d9d31a84d453 Author: Lorenzo Bianconi Date: Mon Apr 3 12:33:56 2023 +0200 wifi: mt76: add mt76_connac_irq_enable utility routine Most of connac based drivers (mt7921, mt7615, mt7663) share the same code to enable interrupts. Move it in mt76_connac module. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ec193b41cc56077e481af4abca2e00e298fcf798 Author: Lorenzo Bianconi Date: Mon Apr 3 12:33:55 2023 +0200 wifi: mt76: move irq_tasklet in mt76_dev struct irq_tasklet struct is used by most of the drivers (e.g. mt7915, mt7921, mt7615, mt7663 and mt7996) so move it in common code. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d4a53049faeaff611f1aff8fcae13c37101e048a Author: Bartosz Golaszewski Date: Thu Apr 13 15:17:03 2023 +0200 arm64: defconfig: enable building the nvmem-reboot-mode module This module is used by the Qualcomm sa8775p platform for passing the reboot reason to the bootloader. Enable building it in the arm64 defconfig as a module. Signed-off-by: Bartosz Golaszewski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit 8c0232d68d88b05f21b64fda1691fd1f3f81c7ca Author: Bhavya Kapoor Date: Tue Apr 11 16:30:34 2023 +0530 arm64: defconfig: Enable TI ADC driver Enable ADC driver to be built as a module which will add support for ADC in TI K3 specific SoCs. Signed-off-by: Bhavya Kapoor Reviewed-by: Manorit Chawdhry Signed-off-by: Arnd Bergmann commit e56ec0cad23eb32d9bbbef88802726873a8ffb60 Author: Bhavya Kapoor Date: Tue Apr 11 16:30:33 2023 +0530 arm64: defconfig: Enable TI TSCADC driver Enable TSCADC driver to be built as a module which will add support for TI's TSC/ADC MFDevice. Signed-off-by: Bhavya Kapoor Signed-off-by: Arnd Bergmann commit caa633855af148310fb68fb3996ef25ae6117848 Author: Kamlesh Gurudasani Date: Mon Apr 17 18:57:17 2023 +0530 arm64: defconfig: Enable security accelerator driver for TI K3 SoCs Enable TI's SA2UL driver to support security acceleration on TI K3 SoCs. Signed-off-by: Kamlesh Gurudasani Signed-off-by: Arnd Bergmann commit a2116e7b921e74e2da8b76fc4c5dfcb9e2b8b206 Author: Kamlesh Gurudasani Date: Mon Apr 17 18:57:16 2023 +0530 arm64: defconfig: Enable crypto test module Enable crypto test module, used for testing crypto engine performance. Signed-off-by: Kamlesh Gurudasani Signed-off-by: Arnd Bergmann commit 9476d415f7c0fa9537eee9128de2332ad7026936 Merge: 1e14b4f9d9082 50aa09ac18fac Author: Arnd Bergmann Date: Mon Apr 17 16:15:40 2023 +0200 Merge tag 'asahi-soc-dt-6.4-v2' of https://github.com/AsahiLinux/linux into soc/dt Apple SoC DT updates for 6.4 (v2). A late addition to the tree, adding the PWM controllers and associated keyboard backlight nodes, since that driver and its bindings are now on the way to 6.4. * tag 'asahi-soc-dt-6.4-v2' of https://github.com/AsahiLinux/linux: arm64: dts: apple: t8112: Add PWM controller arm64: dts: apple: t600x: Add PWM controller arm64: dts: apple: t8103: Add PWM controller Link: https://lore.kernel.org/r/d0862463-acb3-ce83-6493-281a833ec87e@marcan.st Signed-off-by: Arnd Bergmann commit 09d4d6da1b65d09414e7bce61459593f3c80ead1 Author: Mario Limonciello Date: Wed Mar 29 14:57:58 2023 -0500 wifi: mt76: mt7921e: Set memory space enable in PCI_COMMAND if unset When the BIOS has been configured for Fast Boot, systems with mt7921e have non-functional wifi. Turning on Fast boot caused both bus master enable and memory space enable bits in PCI_COMMAND not to get configured. The mt7921 driver already sets bus master enable, but explicitly check and set memory access enable as well to fix this problem. Tested-by: Anson Tsao Signed-off-by: Mario Limonciello Acked-by: Sean Wang Signed-off-by: Felix Fietkau commit a5af1481a85679a9812f728ee5cf64ee7edbe669 Author: Neil Chen Date: Tue Mar 7 19:22:49 2023 +0800 wifi: mt76: mt7921: use driver flags rather than mac80211 flags to mcu FIF_* flags from mac80211 is not ABI. mt7921 should not pass it into mcu directly. Remap FIF_* to driver defined flags as mcu command input. Fixes: c222f77fd421 ("wifi: mt76: mt7921: fix rx filter incorrect by drv/fw inconsistent") Signed-off-by: Neil Chen Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit a1ec7e6237c58c887e34ce4c02a9ec88ebe1c766 Author: Lorenzo Bianconi Date: Mon Mar 6 18:50:29 2023 +0100 wifi: mt76: mt7921: introduce mt7921_get_mac80211_ops utility routine Since the fw offload capability check is shared between pci,usb and sdio devices, move it in common init code and reduce code duplication. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 72fc0df3006ce5c109f9c68f0724e44c47b4ec7b Author: StanleyYP Wang Date: Fri Mar 3 16:35:58 2023 +0800 wifi: mt76: mt7996: fix eeprom tx path bitfields Swap the tx path bitfields of band1 and band2 to read correct setting. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 6784b1785e214b0df43a6c9c37495b39c7473223 Author: Peter Chiu Date: Fri Mar 3 16:35:57 2023 +0800 wifi: mt76: mt7996: remove mt7996_mcu_set_pm() Currently using BSS_INFO_PS command will sometimes cause packet drop in hw rx queue. Temporarily remove this function until finding the cause. Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 4e029000fc9f503f01fb91f19d341e65bcc6c3c2 Author: Peter Chiu Date: Fri Mar 3 16:35:56 2023 +0800 wifi: mt76: mt7996: init mpdu density cap Init mpdu density based on the hardware capability to prevent rx drop. Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 8b14ce24a0297175bc4ebdf26d45a22b5a33847f Author: Peter Chiu Date: Fri Mar 3 16:35:55 2023 +0800 wifi: mt76: mt7996: fix pointer calculation in ie countdown event Fix the tail and data pointers. The rxd->len in mt7996_mcu_rxd does not include the length of general rxd. It only includes the length of firmware event rxd. Use skb->length to get the correct length. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit c04ab57dab559c519bb882995beeb6d95a0a21d3 Author: Shayne Chen Date: Fri Mar 3 16:35:54 2023 +0800 wifi: mt76: mt7996: remove unused eeprom band selection Tri-band chipsets support one band on each a-die, so remove the unused definition of eeprom band selection. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit d0b6f86fdbefa62fd4ad2acd1aea6c45f9b518ba Author: Shayne Chen Date: Fri Mar 3 16:35:53 2023 +0800 wifi: mt76: mt7996: let non-bufferable MMPDUs use correct hw queue Pass qid into mt7996_mac_write_txwi() to let the tx descriptor of non-bufferable MMPDUs be filled with correct hw queue index. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 021af945997ffaeaa37c9673d71afad7cde6bdef Author: Shayne Chen Date: Fri Mar 3 16:35:52 2023 +0800 wifi: mt76: mt7996: add eht rx rate support Add support to report eht rx rate. Note that extended fields for eht in mt76_rx_status will make the struct size exceed the cb size, so make nss and band share the same u8. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit dda423dd65c3e977e545306de3f51031103ce610 Author: Ryder Lee Date: Thu Feb 9 10:23:00 2023 +0800 wifi: mt76: mt7996: remove mt7996_mcu_beacon_check_caps() Those capabilities have been added into ieee80211_bss_conf. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 51699e4c05d9d444d5e732dd3bac3ccb0c68bfec Merge: cfeeb7d37dea0 3d439b1a2ad36 Author: Rafael J. Wysocki Date: Mon Apr 17 15:52:27 2023 +0200 Merge tag 'thermal-v6.4-rc1-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull more thermal control changes for 6.4-rc1 from Daniel Lezcano: "- Do preparating cleaning and DT bindings for RK3588 support (Sebastian Reichel) - Add driver support for RK3588 (Finley Xiao) - Use devm_reset_control_array_get_exclusive() for the Rockchip driver (Ye Xingchen) - Detect power gated thermal zones and return -EAGAIN when reading the temperature (Mikko Perttunen) - Remove thermal_bind_params structure as it is unused (Zhang Rui) - Drop unneeded quotes in DT bindings allowing to run yamllint (Rob Herring) - Update the power allocator documentation according to the thermal trace relocation (Lukas Bulwahn) - Fix sensor 1 interrupt status bitmask for the Mediatek LVTS sensor (Chen-Yu Tsai) - Use the dev_err_probe() helper in the Amlogic driver (Ye Xingchen) - Add AP domain support to LVTS thermal controllers for mt8195 (Balsam CHIHI) - Remove buggy call to thermal_of_zone_unregister() (Daniel Lezcano) - Make thermal_of_zone_[un]register() private to the thermal OF code (Daniel Lezcano) - Create a private copy of the thermal zone device parameters structure when registering a thermal zone (Daniel Lezcano)" * tag 'thermal-v6.4-rc1-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: thermal/core: Alloc-copy-free the thermal zone parameters structure thermal/of: Unexport unused OF functions thermal/drivers/bcm2835: Remove buggy call to thermal_of_zone_unregister thermal/drivers/mediatek/lvts_thermal: Add AP domain for mt8195 dt-bindings: thermal: mediatek: Add AP domain to LVTS thermal controllers for mt8195 thermal: amlogic: Use dev_err_probe() thermal/drivers/mediatek/lvts_thermal: Fix sensor 1 interrupt status bitmask MAINTAINERS: adjust entry in THERMAL/POWER_ALLOCATOR after header movement dt-bindings: thermal: Drop unneeded quotes thermal/core: Remove thermal_bind_params structure thermal/drivers/tegra-bpmp: Handle offline zones thermal/drivers/rockchip: use devm_reset_control_array_get_exclusive() dt-bindings: rockchip-thermal: Support the RK3588 SoC compatible thermal/drivers/rockchip: Support RK3588 SoC in the thermal driver thermal/drivers/rockchip: Support dynamic sized sensor array thermal/drivers/rockchip: Simplify channel id logic thermal/drivers/rockchip: Use dev_err_probe thermal/drivers/rockchip: Simplify clock logic thermal/drivers/rockchip: Simplify getting match data commit 8271f3846fa81cba7e3bdb2b5de88283e5bc3dd1 Merge: 6a8f57ae2eb07 376b1446153ca Author: Rafael J. Wysocki Date: Mon Apr 17 15:50:00 2023 +0200 Merge tag 'devfreq-next-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux Pull devfreq updates for v6.4 from Chanwoo Choi: "1. Remove unneeded SRCU selection in Kconfig because it's always set from devfreq core. 2. Fix minor updates of devfreq drivers - Drop of_match_ptr macro from exynos-bus.c because this driver is always using the DT table for driver probe. - Use the preferred of_property_present instead of the low-level of_get_property on exynos-bus.c - Use devm_platform_get_and_ioream_resource on exyno-ppmu.c" * tag 'devfreq-next-for-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: exynos-ppmu: Use devm_platform_get_and_ioremap_resource() PM / devfreq: exynos: Use of_property_present() for testing DT property presence PM / devfreq: exyos-bus: drop of_match_ptr for ID table PM / devfreq: Remove "select SRCU" commit 885f7af7e54498e7168fa9e7c2f029f81988f933 Author: Ryder Lee Date: Thu Feb 9 10:22:59 2023 +0800 wifi: mt76: mt7915: remove mt7915_mcu_beacon_check_caps() Those capabilities have been added into ieee80211_bss_conf. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 1a1ff6c3b338a6e9ef8d187fbae3d8f823a300ce Author: Ryder Lee Date: Sat Feb 18 01:50:38 2023 +0800 wifi: mt76: connac: refresh tx session timer for WED device There's no keep-alive packet being received by mac80211 stack when WED is enabled, which leads to tx BA session timeout. This patch calls ieee80211_refresh_tx_agg_session_timer() to refresh timer according to tx status reporting. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 5b8ccdfb943f6a03c676d2ea816dd38c149e920b Author: Felix Fietkau Date: Fri Apr 14 14:10:54 2023 +0200 wifi: mt76: add missing locking to protect against concurrent rx/status calls According to the documentation, ieee80211_rx_list must not run concurrently with ieee80211_tx_status (or its variants). Cc: stable@vger.kernel.org Fixes: 88046b2c9f6d ("mt76: add support for reporting tx status with skb") Reported-by: Brian Coverstone Signed-off-by: Felix Fietkau commit 9e47dd9f64a47ae00ca0123017584c37209ee900 Author: Kang Chen Date: Mon Feb 27 22:48:23 2023 +0800 wifi: mt76: handle failure of vzalloc in mt7615_coredump_work vzalloc may fails, dump might be null and will cause illegal address access later. Link: https://lore.kernel.org/all/Y%2Fy5Asxw3T3m4jCw@lore-desk Fixes: d2bf7959d9c0 ("mt76: mt7663: introduce coredump support") Signed-off-by: Kang Chen Signed-off-by: Felix Fietkau commit e4d2b8bcac11c23536771ff38e536c7462b213f5 Author: Peter Chiu Date: Wed Feb 22 14:27:29 2023 +0800 wifi: mt76: drop the incorrect scatter and gather frame The scatter and gather frame may be incorrect because WED and WO may send frames to host driver interleaved. Signed-off-by: Peter Chiu Signed-off-by: Sujuan Chen Signed-off-by: Felix Fietkau commit 9c97df11dfe68b548a47744ba9fa6beddcfba2bc Author: Howard Hsu Date: Thu Feb 23 14:24:57 2023 +0800 wifi: mt76: mt7915: rework init flow in mt7915_thermal_init() If kernel do not enable CONFIG_HWMON, it may cause thermal initialization to be done with temperature value 0 and then can not transmit. This commit fixes it by setting trigger/restore temperature before checking CONFIG_HWMON. Fixes: 7d12b38ab6f6 ("wifi: mt76: mt7915: call mt7915_mcu_set_thermal_throttling() only after init_work") Signed-off-by: Howard Hsu Signed-off-by: Felix Fietkau commit db1a5a6c69e3f2dc05984f5472195bf011254d92 Author: Sujuan Chen Date: Wed Feb 22 21:01:35 2023 +0800 wifi: mt76: mt7915: add dev->hif2 support for mt7916 WED device Enable two PCIe interfaces (dev->hif2) support for mt7916 when WED is enabled. Signed-off-by: Sujuan Chen Signed-off-by: Felix Fietkau commit 90fb69212c60e26ef70ed0e8532b116c7649ac88 Author: Lorenz Brun Date: Sat Feb 18 12:29:45 2023 +0100 wifi: mt76: mt7915: expose device tree match table On MT7986 the WiFi driver currently does not get automatically loaded, requiring manual modprobing because the device tree compatibles are not exported into metadata. Add the missing MODULE_DEVICE_TABLE macro to fix this. Fixes: 99ad32a4ca3a2 ("mt76: mt7915: add support for MT7986") Signed-off-by: Lorenz Brun Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Felix Fietkau commit c278a64a9375b5410a25d3e17317c36ee9e2fd02 Author: Ryder Lee Date: Sat Feb 18 01:47:32 2023 +0800 wifi: mt76: dynamic channel bandwidth changes in AP mode Allow AP to change channel width for 40Mhz intolerant STA on the 2.4 GHz band. Signed-off-by: Himanshu Goyal Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 63a3724632464559d1e98d90d2c63d43ec6ef6f5 Author: Ryder Lee Date: Sat Feb 18 01:46:54 2023 +0800 wifi: mt76: mt7996: fix radiotap bitfield The 11be generation's radiotap bitfields were wrongly copy-and-pasted from 11ax driver, so fix them accordingly. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit cdc215c2c8d74b3c8886650e979b47f16c1f7f92 Author: Dan Carpenter Date: Thu Feb 16 15:15:05 2023 +0300 wifi: mt76: mt7915: unlock on error in mt7915_thermal_temp_store() Drop the lock before returning -EINVAL. Fixes: ecaccdae7a7e ("wifi: mt76: mt7915: rework mt7915_thermal_temp_store()") Signed-off-by: Dan Carpenter Acked-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit df5e5bfdb1d52c5524f21e34488a37f3fe2badad Author: Yang Li Date: Wed Feb 15 13:56:50 2023 +0800 wifi: mt76: mt7996: Remove unneeded semicolon ./drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:3136:3-4: Unneeded semicolon Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4059 Signed-off-by: Yang Li Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Felix Fietkau commit 9270270d62191b7549296721e8d5f3dc0df01563 Author: Deren Wu Date: Tue Feb 14 10:49:57 2023 +0800 wifi: mt76: mt7921: fix PCI DMA hang after reboot mt7921 just stop some workers and clean up chip status before reboot. In stress test, there are working activities still running at the period of .shutdown callback and that would cause some hosts cannot recover DMA after reboot. To avoid the floating state in reboot, we use mt7921_pci_remove() to fully deinit all resources. Fixes: f23a0cea8bd6 ("wifi: mt76: mt7921e: add pci .shutdown() support") Signed-off-by: Deren Wu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Felix Fietkau commit fcc51acfebb85dbc3ab1bea3ce4997d7c0a3a38d Author: Deren Wu Date: Sat Feb 11 09:01:58 2023 +0800 wifi: mt76: mt7921: fix wrong command to set STA channel Should not use AND operator to check vif type NL80211_IFTYPE_MONITOR, and that will cause we go into sniffer command for both STA and MONITOR mode. However, the sniffer command would set channel properly (with some extra options), the STA mode still works even if using the wrong command. Fix vif type check to make sure we using the right command to update channel. Fixes: 914189af23b8 ("wifi: mt76: mt7921: fix channel switch fail in monitor mode") Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit 64822bdba456a145f7cb4c66d9939bf42c64ae62 Author: Frank Wunderlich Date: Tue Feb 7 14:35:04 2023 +0100 dt-bindings: mt76: add active-low property for led LEDs can be in low-active mode, driver already supports it, but documentation is missing. Add documentation for the dt property. Signed-off-by: Frank Wunderlich Acked-by: Krzysztof Kozlowski Signed-off-by: Felix Fietkau commit 532f0482fc577a78c0086893ab39acb406ac3e65 Author: Deren Wu Date: Sat Feb 4 14:53:04 2023 +0800 wifi: mt76: remove redundent MCU_UNI_CMD_* definitions clear redundent definitions only Fixes: 5b55b6da982c ("wifi: mt76: mt7921: add unified ROC cmd/event support") Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit 863da0bdb17b5c9f093e042f655a84ea3f169d6b Author: Mark Brown Date: Wed Apr 12 18:13:31 2023 +0100 arm64/cpufeature: Use helper macro to specify ID register for capabilites When defining which value to look for in a system register field we currently manually specify the register, field shift, width and sign and the value to look for. This opens the potential for error with for example the wrong field width or sign being specified, an enumeration value for a different similarly named field or letting something be initialised to 0. Since we now generate defines for all the ID registers we now have named constants for all of these things generated from the system register description, meaning that we can generate initialisation for all the fields used in matching from a minimal specification of register, field and match value. This is both shorter and eliminates or makes build failures several potential errors. No change in the generated binary. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230303-arm64-cpufeature-helpers-v2-3-4c8f28a6f203@kernel.org [will: Drop explicit '.sign' assignment for BTI feature] Signed-off-by: Will Deacon commit 257aedb72e731082ab514058e57b132f0b29d707 Author: Junhao He Date: Mon Apr 3 16:14:23 2023 +0800 drivers/perf: hisi: add NULL check for name When allocations fails that can be NULL now. If the name provided is NULL, then the initialization process of the PMU type and dev will be skipped in function perf_pmu_register(). Consequently, the PMU will not be able to register into the kernel. Moreover, in the case of unregister the PMU, the function device_del() will need to handle NULL pointers, which potentially can cause issues. So move this allocation above the cpuhp_state_add_instance() and directly return if it does fail. Signed-off-by: Junhao He Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20230403081423.62460-3-hejunhao3@huawei.com Signed-off-by: Will Deacon commit 25d8c25025a46e7621edde2eb6d5f55c6d29ee86 Author: Junhao He Date: Mon Apr 3 16:14:22 2023 +0800 drivers/perf: hisi: Remove redundant initialized of pmu->name "pmu->name" is initialized by perf_pmu_register() function, so remove the redundant initialized in hisi_pmu_init(). Signed-off-by: Junhao He Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20230403081423.62460-2-hejunhao3@huawei.com Signed-off-by: Will Deacon commit 21642da214a9676727cd32b8e7f2906259502f00 Author: Mark Brown Date: Wed Apr 12 18:13:30 2023 +0100 arm64/cpufeature: Consistently use symbolic constants for min_field_value A number of the cpufeatures use raw numbers for the minimum field values specified rather than symbolic constants. In preparation for the use of helper macros replace all these with the appropriate constants. No change in the generated binary. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230303-arm64-cpufeature-helpers-v2-2-4c8f28a6f203@kernel.org Signed-off-by: Will Deacon commit 876e3c8efe79d7f21dadd711837ba9a495c2246a Author: Mark Brown Date: Wed Apr 12 18:13:29 2023 +0100 arm64/cpufeature: Pull out helper for CPUID register definitions We use the same structure to match hwcaps and CPU features so we can use the same helper to generate the fields required. Pull the portion of the current hwcaps helper that initialises the fields out into a separate define placed earlier in the file so we can use it for cpufeatures. No functional change. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230303-arm64-cpufeature-helpers-v2-1-4c8f28a6f203@kernel.org Signed-off-by: Will Deacon commit bbd329fe723d185485598bf52378a8341912a804 Author: Mark Brown Date: Wed Apr 12 17:26:43 2023 +0100 arm64/sysreg: Convert HFGITR_EL2 to automatic generation Automatically generate the Hypervisor Fine-Grained Instruction Trap Register as per DDI0601 2023-03, currently we only have a definition for the register name not any of the contents. No functional change. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230306-arm64-fgt-reg-gen-v5-1-516a89cb50f6@kernel.org Signed-off-by: Will Deacon commit 0f3b818486796ec8895fa4ccdf15edb759bff40a Author: Kuninori Morimoto Date: Thu Apr 6 00:16:27 2023 +0000 ASoC: add snd_soc_card_mutex_lock/unlock() ASoC need to use card->mutex with _INIT or _RUNTIME, but there is no helper function for it. This patch adds its helper function and use it. Because people might misunderstand that _init() is mutex initialization, this patch renames _INIT to _ROOT and adds new snd_soc_card_mutex_lock_root() for it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a5zlx3tw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 38e42f6d6c6702bbfc633fce9b579fb80cec2d59 Author: Kuninori Morimoto Date: Thu Apr 6 00:16:10 2023 +0000 ASoC: expand snd_soc_dpcm_mutex_lock/unlock() soc-pcm.c has snd_soc_dpcm_mutex_lock/unlock(), but other files can't use it because it is static function. It requests snd_soc_pcm_runtime as parameter (A), but sometimes we want to use it by snd_soc_card (B). (A) static inline void snd_soc_dpcm_mutex_lock(struct snd_soc_pcm_runtime *rtd) { mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass); } ^^^^^^^^^ (B) mutex_lock_nested(&card->pcm_mutex, card->pcm_subclass); ^^^^ We want to use it with both "rtd" and "card" for dapm lock/unlock. To enable it, this patch uses _Generic macro. This patch makes snd_soc_dpcm_mutex_{un}lock() global function, and use it on each files. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87bkk1x3ud.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4a778bdc7afbc422bd513c4f1cd7a9faf4bebaab Author: Kuninori Morimoto Date: Thu Apr 6 00:15:48 2023 +0000 ASoC: expand snd_soc_dapm_mutex_lock/unlock() soc.h has snd_soc_dapm_mutex_lock/unlock() definition and many drivers are using it, but soc-dapm.c is not. 1st reason is snd_soc_dapm_mutex_lock/unlock() requests snd_soc_dapm_context pointer as parameter (A), but sometimes soc-dapm.c needs to use snd_soc_card (B). (A) static inline void snd_soc_dapm_mutex_lock(struct snd_soc_dapm_context *dapm) { mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); } ^^^^^^^^^^ (B) mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); ^^^^ 2nd reason is it want to use SND_SOC_DAPM_CLASS_INIT for mutex_lock_nested(), but helper is using _RUNTIME (A). The conclusion is we want to use "dapm vs card" and "_RUNTIME vs _INIT" for dapm lock/unlock. To enable this selfish request, this patch uses _Generic macro. We can use snd_soc_dapm_mutex_lock/unlock() for both dapm and card case. snd_soc_dapm_mutex_lock(dapm); snd_soc_dapm_mutex_unlock(dapm); snd_soc_dapm_mutex_lock(card); snd_soc_dapm_mutex_unlock(card); Current soc-dapm.c is using both mutex_lock() and mutex_lock_nested(). This patch handles mutex_lock() as mutex_lock_nested(..., 0), in other words, handles below as same. mutex_lock(&card->dapm_mutex); mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT); Because people might misunderstand that _init() is mutex initialization, this patch renames _INIT to _ROOT and adds new snd_soc_dapm_mutex_lock_root() for it. This patch also moves snd_soc_dapm_subclass definition from soc-dapm.h to soc.h to keep related code together. Because very complex soc.h vs soc-dapm.h relationship, it is difficult/impossible to define these helper into soc-dapm.h. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87cz4hx3v0.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 59de6c38d713bb16760cc2612a79bc373f79bc6b Author: Saalim Quadri Date: Fri Apr 14 22:38:01 2023 +0000 ASoC: dt-bindings: wm8753: Convert to dtschema Convert the WM8753 audio codec bindings to DT schema. Signed-off-by: Saalim Quadri Acked-by: Charles Keepax Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230414223801.1106550-1-danascape@gmail.com Signed-off-by: Mark Brown commit 8076c586bbc1c62e075e58f41dafdd8b5022b24d Author: Paweł Anikiel Date: Fri Apr 14 16:02:00 2023 +0200 ASoC: ssm2602: Add support for CLKDIV2 The SSM260x chips have an internal MCLK /2 divider (bit D7 in register R8). Add logic that allows for more MCLK values using this divider. Signed-off-by: Paweł Anikiel Link: https://lore.kernel.org/r/20230414140203.707729-7-pan@semihalf.com Signed-off-by: Mark Brown commit 9ed4c762e214a6592184d0dd65b6db86ad30e6d5 Author: Simon Trimmer Date: Fri Apr 14 14:37:53 2023 +0100 ASoC: cs35l56: Don't return a value from cs35l56_remove() cs35l56_remove() always returns 0. Two of the functions that call it are void and the other one should only return 0. So there's no point returning anything from cs35l56_remove(). Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230414133753.653139-6-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 4be476830bf96c0095e4e1acdfc12081aa0fb165 Author: Simon Trimmer Date: Fri Apr 14 14:37:52 2023 +0100 ASoC: cs35l56: Remove redundant dsp_ready_completion dsp_ready_completion is redundant and can be replaced by a call flush_work() to wait for cs35l56_dsp_work() to complete. As the dsp_work is queued by component_probe() it must run before other ASoC component callbacks and therefore there is no risk of calling flush_work() before the dsp_work() has been queued. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230414133753.653139-5-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 440c2d38950f738d7a35d3d29533728e74586d54 Author: Simon Trimmer Date: Fri Apr 14 14:37:51 2023 +0100 ASoC: cs35l56: Wait for init_complete in cs35l56_component_probe() Moving the wait from the beginning of the cs35l56_dsp_work() into cs35l56_component_probe() will prevent the limbo situation that is an artifact of the two stage SoundWire driver probe and initialisation where the card is all registered and shows in ALSA but doesn't actually work because the hardware didn't enumerate. The other bus drivers perform the probe and init sequentially and are not susceptible to this issue. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230414133753.653139-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit b82396122b028a07ce2977e3f33123d7ab526d91 Author: Simon Trimmer Date: Fri Apr 14 14:37:50 2023 +0100 ASoC: cs35l56: Allow a wider range for reset pulse width There is no reason to have such a tight usleep range of 400us and it is acceptable to allow MIN_US * 2. Also wrap the usleep in an inline function. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/168147949455.26.3401634900657387799@mailman-core.alsa-project.org Signed-off-by: Mark Brown commit 7d72351a4ef6e1e763bccc24d43c44ffbe1a1555 Author: Simon Trimmer Date: Fri Apr 14 14:37:49 2023 +0100 ASoC: cs35l56: Rework IRQ allocation The irq member was being set before calling the init function and then cs35l56_irq_request() was called only when the init was successful. However cs35l56_release() calls devm_free_irq() when the irq member is set and therefore if init() fails then this will cause an attempted free of an unallocated IRQ. Instead pass the desired IRQ number to the cs35l56_irq_request() function and set cs35l56->irq only when it has been successfully allocated. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/168147949598.26.711670799488943454@mailman-core.alsa-project.org Signed-off-by: Mark Brown commit 858a56630a840aba0e291fd4958e9a8f74638d56 Author: Uwe Kleine-König Date: Fri Oct 14 18:06:23 2022 +0200 ACPI: AGDI: Improve error reporting for problems during .remove() Returning an error value in a platform driver's remove callback results in a generic error message being emitted by the driver core, but otherwise it doesn't make a difference. The device goes away anyhow. So instead of triggering the generic platform error message, emit a more helpful message if a problem occurs and return 0 to suppress the generic message. This patch is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Reviewed-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20221014160623.467195-1-u.kleine-koenig@pengutronix.de Signed-off-by: Will Deacon commit e04e4b6e01e71978d5df92a5f25b472e1827b46b Author: Jonas Jelonek Date: Thu Mar 30 15:21:59 2023 +0200 wifi: ath9k: fix per-packet TX-power cap for TPC Fix incorrect usage of plain rate_idx as index into the max (power) per rate lookup table. For transmit power control (TPC), the ath9k driver maintains internal tables (in struct ath_hw) to store the max allowed power level per rate. They are used to limit a given TX-power according to regulatory and user limits in the TX-path per packet. The tables are filled in a predefined order, starting with values for CCK + OFDM rates and followed by the values for MCS rates. Thus, the maximum power levels for MCS do not start at index 0 in the table but are shifted by a fixed value. The TX-power limiting in ath_get_rate_txpower currently does not apply this shift, thus retrieves the incorrect maximum power level for a given rate. In particular for MCS rates, the maximum power levels for CCK/OFDM rates were used, e.g. maximum power for OFDM 0 was used for MCS 0. If STBC is used, the power is mostly limited to 0 because the STBC table is zeroed for legacy CCK/OFDM rates. Encountered this during testing of our work-in-progress TPC per packet for ath9k. This only has an effect when TPC is enabled in ath9k (tpc_enabled in struct ath_hw) which defaults to false. In this case it has a significant impact on the used TX-power, throughput + RSSI. Otherwise the affected code is just skipped and TX-power is limited with the hardware registers only. This patch fixes this table lookup. Tested on OpenWrt (kernel 5.15.98, but backported ath9k driver) with small desk setup using ath9k chips AR9280 and AR9580. Cap of TX-power is working properly for all rates now, throughput and RSSI as expected, equal to as if TPC was disabled. Compile-tested with latest 6.3 kernel + allyesconfig. Signed-off-by: Jonas Jelonek Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230330132159.758088-1-jelonek.jonas@gmail.com commit 41e02bf4ae32cf2ac47b08b4caaa9c1a032e4ce7 Author: Harshitha Prem Date: Tue Apr 4 00:11:55 2023 +0530 wifi: ath11k: fix undefined behavior with __fls in dp "__fls" would have an undefined behavior if the argument is passed as "0". Hence, added changes to handle the same. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Harshitha Prem Signed-off-by: Nagarajan Maran Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230403184155.8670-3-quic_nmaran@quicinc.com commit a06bfb3c9f69f303692cdae87bc0899d2ae8b2a6 Author: Harshitha Prem Date: Tue Apr 4 00:11:54 2023 +0530 wifi: ath11k: Ignore frags from uninitialized peer in dp. When max virtual ap interfaces are configured in all the bands with ACS and hostapd restart is done every 60s, a crash is observed at random times. In this certain scenario, a fragmented packet is received for self peer, for which rx_tid and rx_frags are not initialized in datapath. While handling this fragment, crash is observed as the rx_frag list is uninitialised and when we walk in ath11k_dp_rx_h_sort_frags, skb null leads to exception. To address this, before processing received fragments we check dp_setup_done flag is set to ensure that peer has completed its dp peer setup for fragment queue, else ignore processing the fragments. Call trace: ath11k_dp_process_rx_err+0x550/0x1084 [ath11k] ath11k_dp_service_srng+0x70/0x370 [ath11k] 0xffffffc009693a04 __napi_poll+0x30/0xa4 net_rx_action+0x118/0x270 __do_softirq+0x10c/0x244 irq_exit+0x64/0xb4 __handle_domain_irq+0x88/0xac gic_handle_irq+0x74/0xbc el1_irq+0xf0/0x1c0 arch_cpu_idle+0x10/0x18 do_idle+0x104/0x248 cpu_startup_entry+0x20/0x64 rest_init+0xd0/0xdc arch_call_rest_init+0xc/0x14 start_kernel+0x480/0x4b8 Code: f9400281 f94066a2 91405021 b94a0023 (f9406401) Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Harshitha Prem Signed-off-by: Nagarajan Maran Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230403184155.8670-2-quic_nmaran@quicinc.com commit e578c943e363ff47d08e7b4f5648f3da9db325d8 Author: Hans de Goede Date: Sun Apr 16 23:28:41 2023 +0200 platform/x86: x86-android-tablets: Add accelerometer support for Yoga Tablet 2 1050/830 series The Yoga Tablet 2 1050/830 series have a LSM303DA accelerometer + magnetometer (IMU), add this to the list of i2c_clients to instantiate on these models. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230416212841.311152-4-hdegoede@redhat.com commit 1d3f7a31aa9671c43e03570edaebcd7e02751c15 Author: Hans de Goede Date: Sun Apr 16 23:28:40 2023 +0200 platform/x86: x86-android-tablets: Add "yogabook-touch-kbd-digitizer-switch" pdev for Lenovo Yoga Book Add a "yogabook-touch-kbd-digitizer-switch" platform-device, for the lenovo-yogabook driver to bind to, to the x86_dev_info for the Lenovo Yoga Book 1 Android models (yb1-x90f/l). Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230416212841.311152-3-hdegoede@redhat.com commit 95b829f89da3fd635b60b9b069395dede17a612c Author: Hans de Goede Date: Sun Apr 16 23:28:39 2023 +0200 platform/x86: x86-android-tablets: Add Wacom digitizer info for Lenovo Yoga Book The Lenovo Yoga Book has a wacom digitizer in its keyboard half, add the necessary info to instantiate an i2c_client for the digitizer. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230416212841.311152-2-hdegoede@redhat.com commit 02377e983e22396e52d43c4d0adb9bbc85fa9a26 Author: Hans de Goede Date: Sun Apr 16 23:28:38 2023 +0200 platform/x86: x86-android-tablets: Update Yoga Book HiDeep touchscreen comment After recent i2c-hid-of changes, the i2c-hid-of driver could be used for the Yoga Book HiDeep touchscreen comment instead of the native hideep driver. Update the comment to reflect this. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230416212841.311152-1-hdegoede@redhat.com commit 3a133f7c51b20d5d330d5424f3ef0dc283992500 Author: Daniel Bertalan Date: Fri Apr 14 18:02:10 2023 +0000 platform/x86: thinkpad_acpi: Fix Embedded Controller access on X380 Yoga On the X380 Yoga, the `ECRD` and `ECWR` ACPI objects cannot be used for accessing the Embedded Controller: instead of a method that reads from the EC's memory, `ECRD` is the name of a location in high memory. This meant that trying to call them would fail with the following message: ACPI: \_SB.PCI0.LPCB.EC.ECRD: 1 arguments were passed to a non-method ACPI object (RegionField) With this commit, it is now possible to access the EC and read temperature and fan speed information. Note that while writes to the HFSP register do go through (as indicated by subsequent reads showing the new value), the fan does not actually change its speed. Signed-off-by: Daniel Bertalan Link: https://lore.kernel.org/r/20230414180034.63914-1-dani@danielbertalan.dev Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit a87a9110ac0dcbfd9458b6665c141fa1c16a669d Author: Kalle Valo Date: Wed Apr 5 12:04:25 2023 +0300 wifi: ath11k: print a warning when crypto_alloc_shash() fails Christoph reported that ath11k failed to initialise when michael_mic.ko module was not installed. To make it easier to notice that case print a warning when crypto_alloc_shash() fails. Compile tested only. Reported-by: Christoph Hellwig Link: https://lore.kernel.org/all/20221130133016.GC3055@lst.de/ Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230405090425.1351-1-kvalo@kernel.org commit 06c58473969239e00d76b683edd511952060ca56 Author: Takashi Iwai Date: Thu Mar 30 16:37:18 2023 +0200 wifi: ath11k: pci: Add more MODULE_FIRMWARE() entries As there are a few more models supported by the driver, let's add the missing MODULE_FIRMWARE() entries for them. The lack of them resulted in the missing device enablement on some systems, such as the installation image of openSUSE. While we are at it, use the wildcard instead of listing each firmware files individually for each. Signed-off-by: Takashi Iwai Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230330143718.19511-1-tiwai@suse.de commit abf57d84973ce1abcb67504ac0df8aea1fe09a76 Author: Youghandhar Chintala Date: Tue Mar 28 17:04:55 2023 +0530 wifi: ath11k: enable SAR support on WCN6750 Currently, SAR is enabled only on WCN6855, enable this for WCN6750 too. This functionality gets triggered, when the user space application calls NL80211_CMD_SET_SAR_SPECS. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Signed-off-by: Youghandhar Chintala Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230328113455.11252-1-quic_youghand@quicinc.com commit 5c690db63b45c6c4c4932b13173af71df369dba5 Author: Tamizh Chelvam Raja Date: Tue Mar 28 12:41:50 2023 +0530 wifi: ath11k: Disable Spectral scan upon removing interface Host might receive spectral events during interface down sequence and this might create below errors. failed to handle dma buf release event -22 failed to handle dma buf release event -22 Fix this by disabling spectral config during remove interface. Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1 Signed-off-by: Tamizh Chelvam Raja Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230328071150.29645-1-quic_tamizhr@quicinc.com commit 14f6f0e3709a8aa987ae78783d2e4d63f88cc13a Author: David E. Box Date: Wed Apr 12 18:32:30 2023 -0700 platform/x86/intel/sdsi: Change mailbox timeout On some platforms, it may take up to 400ms for the ready bit to be set in a successful mailbox transaction. Set the timeout to 500ms to cover the worst case. Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230413013230.1521584-1-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 3f581602a22cc5445a66501fa13a80894d83e42a Author: David E. Box Date: Wed Apr 12 18:29:22 2023 -0700 platform/x86/intel/pmt: Ignore uninitialized entries On Intel Xeon, unused PMT regions will have uninitialized discovery headers containing all 0xF. Instead of returning an error, just skip the region. Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230413012922.1521377-1-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 22a4455e75be443fb80784175bb70f40ba6d0c52 Author: Sricharan Ramabadhran Date: Fri Apr 14 15:59:25 2023 +0530 dt-bindings: mmc: sdhci-msm: Document the IPQ5018 compatible Document the compatible for SDHCI on IPQ5018. Signed-off-by: Sricharan Ramabadhran Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1681468167-11689-8-git-send-email-quic_srichara@quicinc.com Signed-off-by: Ulf Hansson commit 45f54c9c18582c9d3af14fceaf44f7346c01a123 Author: Bo Liu Date: Wed Apr 12 04:47:58 2023 -0400 mmc: vub300: remove unreachable code The function sched_partition_show cannot execute return, delete the invalid code. Signed-off-by: Bo Liu Link: https://lore.kernel.org/r/20230412084758.2673-1-liubo03@inspur.com Signed-off-by: Ulf Hansson commit f22c0bffe8d9528ace89a853c6065b79dcb88c43 Author: Po-Hao Huang Date: Sat Apr 15 11:50:16 2023 +0800 wifi: rtw89: add support of concurrent mode Add iface_combination declaration to enable concurrent mode. Only two interfaces under same frequency is supported currently. We limit the role combination to be STA + P2P or STA + AP only for now until new feature is requested. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230415035016.15788-2-pkshih@realtek.com commit 982a91642708bb55246a7b169cb573866260124c Author: Po-Hao Huang Date: Sat Apr 15 11:50:15 2023 +0800 wifi: rtw89: Disallow power save with multiple stations Power saving for more than one station is not supported currently. Disallow entering PS mode when we have more than one associated stations. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230415035016.15788-1-pkshih@realtek.com commit ac83f380905591beecfe5b29a9ef811e35a3aa8d Author: Po-Hao Huang Date: Sat Apr 15 11:48:58 2023 +0800 wifi: rtw89: update statistics to FW for fine-tuning performance Since firmware can't have proper statistics, driver update the statistics periodically to firmware to assist in tuning performance. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230415034900.15679-5-pkshih@realtek.com commit 8b048bd5ddf700c72734c4a2a79ecdf082273edb Author: Ping-Ke Shih Date: Sat Apr 15 11:48:57 2023 +0800 wifi: rtw89: use struct instead of macros to set H2C command of hardware scan Remove macros that set H2C data. Instead, use struct and le32_encode_bits() with mask definition to make it clean. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230415034900.15679-4-pkshih@realtek.com commit e7399db231d07f1e5a4179f100ccd0106fdbee03 Author: Po-Hao Huang Date: Sat Apr 15 11:48:56 2023 +0800 wifi: rtw89: refine scan function after chanctx Since we can get the current channel definition each interface maps to, remove store_op function that is no longer required to make things simple. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230415034900.15679-3-pkshih@realtek.com commit e579e943bac3b52f69a25738fcbd8be945f72689 Author: Chih-Kang Chang Date: Sat Apr 15 11:48:55 2023 +0800 wifi: rtw89: prohibit enter IPS during HW scan Mac80211 core may ask driver to change to idle mode during HW scan, then H2C command for HW scan will send failed since chip is in idle mode. Therefore, We check the SCANNING flag before entering IPS to prevent this behavior. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230415034900.15679-2-pkshih@realtek.com commit c0fea064b2647a5069e2c234fb44286c8a205993 Author: Ping-Ke Shih Date: Wed Apr 12 09:28:31 2023 +0800 wifi: rtw89: coex: send more hardware module info to firmware for 8851B 8851B has various hardware module types, so BT coexistence in firmware needs these information to make decision. Add them to make 8851B work well. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230412012831.10519-5-pkshih@realtek.com commit 2380a220316fc2e753014b1862ed579796d29ac5 Author: Ching-Te Ku Date: Wed Apr 12 09:28:30 2023 +0800 wifi: rtw89: coex: Update function to get BT RSSI and hardware counter Correct Bluetooth RSSI count method. The 6dB is the gap between hardware packet sampled value and real RSSI value. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230412012831.10519-4-pkshih@realtek.com commit 9fde30562840837e4e2138bc3f88dba2b9963d98 Author: Ching-Te Ku Date: Wed Apr 12 09:28:29 2023 +0800 wifi: rtw89: coex: Add path control register to monitor list Chips use similar hardware for path control, but could different path/antenna configuration. Add these register to monitor, if there are wrong settings, these register can help to debug. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230412012831.10519-3-pkshih@realtek.com commit 36ef71db559f6a0dc2d7a9af8edb16c387d18ce2 Author: Ching-Te Ku Date: Wed Apr 12 09:28:28 2023 +0800 wifi: rtw89: coex: Enable Wi-Fi RX gain control for free run solution When Wi-Fi & Bluetooth are both busy at the same time, Wi-Fi need to enable RX gain to protect Wi-Fi RX RF ability. Without this configure the interference from Bluetooth will bring a big impact to Wi-Fi RX. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230412012831.10519-2-pkshih@realtek.com commit deb1b2aed763828b54a5be9be76c3a43c295f9f0 Author: Chih-Kang Chang Date: Mon Apr 10 13:34:38 2023 +0800 wifi: rtw89: fix power save function in WoWLAN mode In WoWLAN Mode, it's expected that WiFi chip could enter power save mode only after all setting is finished, but current wow_enter_lps function break the rule and may lead to WoWLAN function fail in low probability, so fix it. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230410053438.10682-2-pkshih@realtek.com commit 6863ad915d32990aec79e59db9d2a21a5abedf97 Author: Chin-Yen Lee Date: Mon Apr 10 13:34:37 2023 +0800 wifi: rtw89: support WoWLAN mode for 8852be To support WoWLAN mode for 8852be, we add one PLE quota setting and WoWLAN stub, which shows that supported WLAN events include receiving magic packet, rekey packet and deauth packet, and disconnecting from AP. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230410053438.10682-1-pkshih@realtek.com commit aad53d4ee7569d82cbc8ee14dacf3b8011fe827a Author: Brad Larson Date: Mon Apr 10 11:45:25 2023 -0700 mmc: sdhci-cadence: Support mmc hardware reset Add support for mmc hardware reset using a reset-controller that would need to be enabled in the device tree with a supporting driver. The default is disabled for all existing designs. Signed-off-by: Brad Larson Acked-by: Adrian Hunter Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20230410184526.15990-15-blarson@amd.com Signed-off-by: Ulf Hansson commit b5dbcf1f1d1a7349ca731c22dda7d429151956ac Author: Brad Larson Date: Mon Apr 10 11:45:24 2023 -0700 mmc: sdhci-cadence: Add AMD Pensando Elba SoC support Add support for AMD Pensando Elba SoC which explicitly controls byte-lane enables on writes. Select MMC_SDHCI_IO_ACCESSORS for MMC_SDHCI_CADENCE which allows Elba SoC sdhci_elba_ops to overwrite the SDHCI IO memory accessors Signed-off-by: Brad Larson Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230410184526.15990-14-blarson@amd.com Signed-off-by: Ulf Hansson commit e095b78ef2db903fefaf148ee14dcb92ebd1af87 Author: Brad Larson Date: Mon Apr 10 11:45:23 2023 -0700 mmc: sdhci-cadence: Support device specific init during probe Move struct sdhci_pltfm_data under new struct sdhci_cdns_drv_data. Add an init() into sdhci_cdns_drv_data for platform specific device initialization in the device probe which is not used for existing devices. Signed-off-by: Brad Larson Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230410184526.15990-13-blarson@amd.com Signed-off-by: Ulf Hansson commit d3e32f8478912568cad7472db3980635bf8766e3 Author: Brad Larson Date: Mon Apr 10 11:45:22 2023 -0700 mmc: sdhci-cadence: Enable device specific override of writel() SoCs with device specific Cadence implementation, such as setting byte-enables before the write, need to override writel(). Add a callback where the default is writel() for all existing chips. Signed-off-by: Brad Larson Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230410184526.15990-12-blarson@amd.com Signed-off-by: Ulf Hansson commit 82e4726b00e9e9bf7bf2ce3cc19532fe084005a4 Author: Brad Larson Date: Mon Apr 10 11:45:13 2023 -0700 dt-bindings: mmc: cdns: Add AMD Pensando Elba SoC AMD Pensando Elba ARM 64-bit SoC is integrated with this IP and explicitly controls byte-lane enables. Signed-off-by: Brad Larson Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230410184526.15990-3-blarson@amd.com Signed-off-by: Ulf Hansson commit efebfa80ce24cba9e7af786e9dec911cf9e7b35d Author: Shyam Sundar S K Date: Wed Apr 12 16:45:00 2023 +0530 platform/x86: amd: pmc: provide user message where s0ix is not supported Some platforms do not support hardware backed s0i3 transitions. When such CPUs are detected, provide a warning message to the user. Suggested-by: Sanket Goswami Signed-off-by: Shyam Sundar S K Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20230412111500.2602529-1-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 99676a5766412f3936c55b9d18565d248e5463ee Author: Horatiu Vultur Date: Mon Apr 17 09:26:41 2023 +0200 net: lan966x: Fix lan966x_ifh_get From time to time, it was observed that the nanosecond part of the received timestamp, which is extracted from the IFH, it was actually bigger than 1 second. So then when actually calculating the full received timestamp, based on the nanosecond part from IFH and the second part which is read from HW, it was actually wrong. The issue seems to be inside the function lan966x_ifh_get, which extracts information from an IFH(which is an byte array) and returns the value in a u64. When extracting the timestamp value from the IFH, which starts at bit 192 and have the size of 32 bits, then if the most significant bit was set in the timestamp, then this bit was extended then the return value became 0xffffffff... . And the reason of this is because constants without any postfix are treated as signed longs and that is the reason why '1 << 31' becomes 0xffffffff80000000. This is fixed by adding the postfix 'ULL' to 1. Fixes: fd7627833ddf ("net: lan966x: Stop using packing library") Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit 1bb69cd4a344299a382695a2de1a84c0b23fe6da Author: Cristian Ciocaltea Date: Fri Apr 14 15:54:25 2023 +0300 arm64: dts: rockchip: Add vdd_cpu_big regulators to rk3588-rock-5b The RK8602 and RK8603 voltage regulators on the Rock 5B board provide the power lines vdd_cpu_big0 and vdd_cpu_big1, respectively. Add the necessary device tree nodes and bind them to the corresponding CPU big core nodes. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230414125425.124994-4-cristian.ciocaltea@collabora.com Signed-off-by: Heiko Stuebner commit 0af7164cb0e076dbfeed28956658a1ad94bd5927 Author: Cristian Ciocaltea Date: Fri Apr 14 15:54:24 2023 +0300 arm64: dts: rockchip: Use generic name for es8316 on Pinebook Pro and Rock 5B Use generic 'audio-codec' name for es8316 node on Pinebook Pro and Rock 5B boards. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230414125425.124994-3-cristian.ciocaltea@collabora.com Signed-off-by: Heiko Stuebner commit d7f5e83913d1bcd50968972a7b50e49c9a14b2af Author: Cristian Ciocaltea Date: Fri Apr 14 15:54:23 2023 +0300 arm64: dts: rockchip: Drop RTC clock-frequency on rk3588-rock-5b The hym8563 RTC driver doesn't handle the 'clock-frequency' property, which is also indicated by the following dtbs_check warning: rk3588-rock-5b.dtb: rtc@51: Unevaluated properties are not allowed ('clock-frequency' was unexpected) From schema: Documentation/devicetree/bindings/rtc/haoyu,hym8563.yaml Drop the unsupported property. Fixes: 1e9c2404d887 ("arm64: dts: rockchip: Enable RTC support for Rock 5B") Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230414125425.124994-2-cristian.ciocaltea@collabora.com Signed-off-by: Heiko Stuebner commit 50aa09ac18fac94a907d26dca21aff5507373fb1 Author: Sasha Finkelstein Date: Sun Apr 9 11:18:46 2023 +0200 arm64: dts: apple: t8112: Add PWM controller This patch adds the device tree entries for the PWM controller present on M2 macbooks that is connected to the keyboard backlight. Signed-off-by: Sasha Finkelstein Signed-off-by: Hector Martin commit f6e7ac4c35a28aef0be93b32c533ae678ad0b9e7 Author: Feng Jiang Date: Wed Apr 12 17:37:34 2023 +0800 platform/x86/amd: pmc: Fix memory leak in amd_pmc_stb_debugfs_open_v2() Function amd_pmc_stb_debugfs_open_v2() may be called when the STB debug mechanism enabled. When amd_pmc_send_cmd() fails, the 'buf' needs to be released. Signed-off-by: Feng Jiang Link: https://lore.kernel.org/r/20230412093734.1126410-1-jiangfeng@kylinos.cn Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit b15999c27f9601c63a1add58cea698ea0c27184b Author: Sasha Finkelstein <7d578vix8hzw@opayq.net> Date: Mon Apr 3 16:19:22 2023 +0200 arm64: dts: apple: t600x: Add PWM controller Adds PWM controller and keyboard backlight bindings for M1 Pro/Max MacBook Pros Signed-off-by: Sasha Finkelstein Acked-by: Hector Martin Signed-off-by: Hector Martin commit 348981c783b9852b54ed78c2d9081135eaebfc70 Author: Sasha Finkelstein Date: Mon Apr 3 16:19:21 2023 +0200 arm64: dts: apple: t8103: Add PWM controller Adds PWM controller and keyboard backlight bindings for M1 MacBooks Signed-off-by: Sasha Finkelstein Acked-by: Sven Peter Signed-off-by: Hector Martin commit 6f5ab8fa33238fdf6cb28dac7bc2f650db2caf08 Author: John Clark Date: Thu Apr 13 13:03:37 2023 -0400 arm64: dts: rockchip: Add pinctrl gpio-ranges for rk356x Add gpio-range properties to the pinctrl gpio nodes in rk356x.dtsi Signed-off-by: John Clark Link: https://lore.kernel.org/r/20230413170337.6815-1-inindev@gmail.com Signed-off-by: Heiko Stuebner commit 82c3a0b7f0cb97445eeb8b91b0a37d95f8c2c2a9 Author: Liming Sun Date: Tue Apr 11 11:39:42 2023 -0400 mlxbf-bootctl: Add sysfs file for BlueField boot fifo This commit adds sysfs file for BlueField boot fifo. The boot fifo is usually used to push boot stream via USB or PCIe. Once OS is up, it can be reused by applications to read data or configuration from external host. Signed-off-by: Liming Sun Reviewed-by: David Thompson Link: https://lore.kernel.org/r/52b0b00dacbc4aad3169dd3667d79c85e334783b.1680657571.git.limings@nvidia.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 9ec71b52cc6b72ca13258f942b16f3207e3d6502 Author: Golan Ben Ami Date: Sun Apr 16 15:47:39 2023 +0300 wifi: iwlwifi: move debug buffer allocation failure to info verbosity This is noising the kernel log and customers asked to hush it down. We can live with this message in "info" verbosity. Signed-off-by: Golan Ben Ami Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230416154301.0a7f557aa2a0.If9db474b63242b1bfaed659aa174b678ae8dc196@changeid Signed-off-by: Johannes Berg commit 28965ec0b5d9112585f725660e2ff13218505ace Author: Emmanuel Grumbach Date: Sun Apr 16 15:47:38 2023 +0300 wifi: iwlwifi: make the loop for card preparation effective Since we didn't reset t to 0, only the first iteration of the loop did checked the ready bit several times. From the second iteration and on, we just tested the bit once and continued to the next iteration. Reported-and-tested-by: Lorenzo Zolfanelli Link: https://bugzilla.kernel.org/show_bug.cgi?id=216452 Fixes: 289e5501c314 ("iwlwifi: fix the preparation of the card") Signed-off-by: Emmanuel Grumbach Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230416154301.615b683ab9c8.Ic52c3229d3345b0064fa34263293db095d88daf8@changeid Signed-off-by: Johannes Berg commit d9bfd5a06448c175ba3a333e13168fb2622e9dd8 Author: Johannes Berg Date: Sun Apr 16 15:47:37 2023 +0300 wifi: iwlwifi: mvm: allow number of beacons from FW Newer firmware images have a TLV advertising how many beacons they support, use that to permit adding more links in AP mode (FW needs to support at least as many links as beacons). Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230416154301.0d7522533557.Ic6b5992e94446c35cb0f3add019defa6e7aded2a@changeid Signed-off-by: Johannes Berg commit 8642ddb2a363cab424fd6975165007f308de75ba Author: Johannes Berg Date: Sun Apr 16 15:47:36 2023 +0300 wifi: iwlwifi: mvm: implement key link switching Implement switching keys from one set of firmware station IDs to another set, during link switch. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230416154301.c6a777dd5e47.I693f7fd7c52fe8b51a58af69d45488511367f49e@changeid Signed-off-by: Johannes Berg commit 7a243c6b680694caca0d0d330eeb17ef8c2b2cd2 Author: Johannes Berg Date: Sun Apr 16 15:47:35 2023 +0300 wifi: iwlwifi: mvm: implement BAID link switching When we switch station links, also add the code to switch BAIDs from one station mask to the new one. To do so, refactor the switching code a bit to have common code for all the needed switches; will add keys next. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230416154301.40654afce24f.I0e35151f69e7513be53ddb8f008e9ab48278c352@changeid Signed-off-by: Johannes Berg commit 9aa3856d9b6f3f8bf085b5bbb5f3703578bf452b Author: Johannes Berg Date: Sun Apr 16 15:47:34 2023 +0300 wifi: iwlwifi: mvm: track station mask for BAIDs When we have MLO connections, a BAID applies to multiple firmware stations. Track the station mask instead of the station ID, getting rid of a few more deflink cases and preparing for handling link switching for BAIDs. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230416154301.c08523808c34.I719b7bba499648d1495ed3e3a90889d4732ef15d@changeid Signed-off-by: Johannes Berg commit ef3ed33dfc8f0f1c81ca103e6b68b4f77ee0ab65 Author: Gregory Greenman Date: Sun Apr 16 15:47:33 2023 +0300 wifi: iwlwifi: bump FW API to 77 for AX devices Start supporting API version 77 for AX devices. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230416154301.e522ccefe354.If7628363fafeb7687163103e734206915c445197@changeid Signed-off-by: Johannes Berg commit 6f2c5f38a7917a04a43494eda48aa71da97484e3 Author: Johannes Berg Date: Sun Apr 16 15:47:32 2023 +0300 wifi: iwlwifi: mvm: use correct sta mask to remove queue When we remove a queue we need to use the currently active firmware stations in the mask, not the deflink one. Fix that. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230416154301.01cdd2153418.I176d54f2d869f51b3707d056adb96455cf885f93@changeid Signed-off-by: Johannes Berg commit 85eb75c34eadb892d89e506619c6c49b194a392b Author: Avraham Stern Date: Sun Apr 16 15:47:31 2023 +0300 wifi: iwlwifi: mvm: avoid iterating over an un-initialized list The initiator smooth list is initialized only in iwl_mvm_up(), but is cleared in iwl_mvm_mac_stop. This may result in iterating over the list before it was initialized in case iwl_mvm_up() failed early. Fix it by moving the list initialization to an earlier stage. Fixes: b68bd2e3143a ("iwlwifi: mvm: Add FTM initiator RTT smoothing logic") Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230416154301.b50b1fe9a576.Ie348ffae110612d2e252ac120a3ba0aea063b1b6@changeid Signed-off-by: Johannes Berg commit 66a588bff29e61345df6d281c56d9864b84eb8cc Author: Johannes Berg Date: Sun Apr 16 15:47:30 2023 +0300 wifi: iwlwifi: mvm: factor out iwl_mvm_sta_fw_id_mask() We are going to need this in more places than just the key code, so factor out the functionality of getting the FW station ID mask (filtered to a specific link if needed) to a separate function that can now be called both under RCU and mvm->mutex protection. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230416154301.eff92b93025d.I2c50290a0537d5db3d3460f4d57c78a4712ffb75@changeid Signed-off-by: Johannes Berg commit bb7fcb37c9004ce7e296f7bb4e56ce65119b83b4 Author: Johannes Berg Date: Sun Apr 16 15:47:29 2023 +0300 wifi: iwlwifi: mvm: properly implement HE AP support The firmware split the HE support field into HE and "pseudo HE", the latter is really for AP and doesn't implement trigger frame handling for example. Use the new field for AP mode. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230416154301.34dbfefe2a49.I0e39cd35dbe03ff9209b26733746479eae1c8966@changeid Signed-off-by: Johannes Berg commit 69e1089316271f7651a3a7ce3b3509405f5b2b8a Author: Ilan Peer Date: Sun Apr 16 15:47:28 2023 +0300 wifi: iwlwifi: mvm: Fix _iwl_mvm_get_scan_type() The usage of the 'dtim_period' value was wrong, as it is only a multiplier of the beacon interval, and thus, beacon interval should also be considered. Fix it. Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230416154301.e08293d6cace.I25f8cea3189472bd714676ca38b121d7c60fb9d9@changeid Signed-off-by: Johannes Berg commit 0af637b5719fee09d006e83e1eecd235f7bc62f3 Author: Johannes Berg Date: Sun Apr 16 15:47:27 2023 +0300 wifi: iwlwifi: mvm: fix getting lowest TX rate for MLO In iwl_mvm_mac_ctxt_get_lowest_rate() we were still accessing vif->bss_conf without any multi-link provisions, and also the info->band, both of which isn't valid in MLO. Fix the code to look at the correct link. In case of EAPOL transmissions for the initial 4-way-HS, look up the correct link here as well, and warn if multiple are active. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230416154301.d892f68d3bcd.I7d6927abeea5c3899db225391dbc6a5c77805e80@changeid Signed-off-by: Johannes Berg commit 5af2bb3168db6b0af9988eb25cccf2e3bc4455e2 Author: Gregory Greenman Date: Sun Apr 16 15:47:26 2023 +0300 wifi: iwlwifi: call napi_synchronize() before freeing rx/tx queues When rx/tx queues are being freed, on a different CPU there could be still rx flow running. Call napi_synchronize() to prevent such a race. Signed-off-by: Gregory Greenman Co-developed-by: Benjamin Berg Signed-off-by: Benjamin Berg Link: https://lore.kernel.org/r/20230416154301.5171ee44dcc1.Iff18718540da412e084e7d8266447d40730600ed@changeid Signed-off-by: Johannes Berg commit f8f9c31129c4ebb098dba45a76e4ccf65dc7e6c8 Author: Johannes Berg Date: Sun Apr 16 15:47:25 2023 +0300 wifi: iwlwifi: nvm-parse: add full BW UL MU-MIMO support For some devices, in client mode, we support full bandwidth uplink multi-user MIMO. Add the necessary capability. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230416154301.88b6aac6c876.Ibf2a7a38d7a172c371c347c9d4441e8c656cefe3@changeid Signed-off-by: Johannes Berg commit 49953b70e7d38dd714f4cf22224e8a7ce14f3c48 Author: Thomas Zimmermann Date: Thu Mar 30 09:36:35 2023 +0200 drm/exynos: Implement fbdev emulation as in-kernel client Move code from ad-hoc fbdev callbacks into DRM client functions and remove the old callbacks. The functions instruct the client to poll for changed output or restore the display. The DRM core calls both, the old callbacks and the new client helpers, from the same places. The new functions perform the same operation as before, so there's no change in functionality. Replace all code that initializes or releases fbdev emulation throughout the driver. Instead initialize the fbdev client by a single call to exynos_fbdev_setup() after exynos has registered its DRM device. As in most drivers, exynos' fbdev emulation now acts like a regular DRM client. The fbdev client setup consists of the initial preparation and the hot-plugging of the display. The latter creates the fbdev device and sets up the fbdev framebuffer. The setup performs display hot-plugging once. If no display can be detected, DRM probe helpers re-run the detection on each hotplug event. A call to drm_dev_unregister() releases the client automatically. No further action is required within exynos. If the fbdev framebuffer has been fully set up, struct fb_ops.fb_destroy implements the release. For partially initialized emulation, the fbdev client reverts the initial setup. Signed-off-by: Thomas Zimmermann Tested-by: Marek Szyprowski Signed-off-by: Inki Dae commit 99286486d67450f2189f7373c0d76c49ce6825f7 Author: Thomas Zimmermann Date: Thu Mar 30 09:36:34 2023 +0200 drm/exynos: Initialize fbdev DRM client Initialize the fbdev client in the fbdev code with empty helper functions. Also clean up the client. The helpers will later implement various functionality of the DRM client. No functional changes. Signed-off-by: Thomas Zimmermann Tested-by: Marek Szyprowski Signed-off-by: Inki Dae commit 3bf3b53446d14003193a8804d0d1f3e1761b2be2 Author: Thomas Zimmermann Date: Thu Mar 30 09:36:33 2023 +0200 drm/exynos: Remove fb_helper from struct exynos_drm_private The DRM device stores a pointer to the fbdev helper. Remove struct exynos_drm_private.fb_helper, which contains the same value. No functional changes. Signed-off-by: Thomas Zimmermann Tested-by: Marek Szyprowski Signed-off-by: Inki Dae commit 50e97607f8853ad7efe1a8d451ccdd8f50e7fbe1 Author: Thomas Zimmermann Date: Thu Mar 30 09:36:32 2023 +0200 drm/exynos: Remove struct exynos_drm_fbdev Remove struct exynos_drm_fbdev, which is an empty wrapper around struct drm_fb_helper. Use the latter directly. No functional changes. Signed-off-by: Thomas Zimmermann Tested-by: Marek Szyprowski Signed-off-by: Inki Dae commit 89c258b5226d86a5d57b6df17eec00ab0f3d5b80 Author: Thomas Zimmermann Date: Thu Mar 30 09:36:31 2023 +0200 drm/exynos: Remove exynos_gem from struct exynos_drm_fbdev Fbdev's framebuffer stores a pointer to the GEM object. Remove struct exynos_drm_fbdev.exynos_gem, which contains the same value. No functional changes. Signed-off-by: Thomas Zimmermann Tested-by: Marek Szyprowski Signed-off-by: Inki Dae commit f695c5f952f28bf4ba74a7862ae20bae27568770 Author: Bean Huo Date: Tue Apr 4 00:17:54 2023 +0200 mmc: core: Remove unused macro mmc_req_rel_wr There is no user for macro mmc_req_rel_wr, so delete it. Signed-off-by: Bean Huo Link: https://lore.kernel.org/r/20230403221754.16168-1-beanhuo@iokpp.de Signed-off-by: Ulf Hansson commit 9fab93895fb6f4309b2e0a2e03a87da7d4dad643 Author: Sai Krishna Potthuri Date: Mon Apr 3 15:55:51 2023 +0530 mmc: sdhci-of-arasan: Skip setting clock delay for 400KHz Clock delay settings are not defined for 400KHz, so add frequency check to skip calling the clock delay settings when frequency is <=400KHz. Signed-off-by: Sai Krishna Potthuri Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230403102551.3763054-4-sai.krishna.potthuri@amd.com Signed-off-by: Ulf Hansson commit b095f4f52b1a8e926f0f39b3c01a8bab6a667438 Author: Swati Agarwal Date: Mon Apr 3 15:55:50 2023 +0530 mmc: sdhci-of-arasan: Add support for eMMC5.1 on Xilinx Versal Net platform Add support for eMMC5.1 on Xilinx Versal Net platform - Add new compatible string(xlnx,versal-net-emmc). - Add support for PHY which is part of Host Controller register space. - Add DLL and Delay Chain mode support and corresponding tap delays for all eMMC modes. - Add Strobe select tap for HS400 mode. Signed-off-by: Swati Agarwal Co-developed-by: Sai Krishna Potthuri Signed-off-by: Sai Krishna Potthuri Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230403102551.3763054-3-sai.krishna.potthuri@amd.com Signed-off-by: Ulf Hansson commit 8aa7206411fce5a2c6e2643df5c91e6d3e583ba8 Author: Sai Krishna Potthuri Date: Mon Apr 3 15:55:49 2023 +0530 dt-bindings: mmc: arasan,sdci: Add Xilinx Versal Net compatible Add Xilinx Versal Net compatible to support eMMC 5.1 PHY. Signed-off-by: Sai Krishna Potthuri Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230403102551.3763054-2-sai.krishna.potthuri@amd.com Signed-off-by: Ulf Hansson commit ab4f869fba6119997f7630d600049762a2b014fa Author: James Cowgill Date: Wed Apr 12 17:35:07 2023 +0000 drm/panel: otm8009a: Set backlight parent to panel device This is the logical place to put the backlight device, and it also fixes a kernel crash if the MIPI host is removed. Previously the backlight device would be unregistered twice when this happened - once as a child of the MIPI host through `mipi_dsi_host_unregister`, and once when the panel device is destroyed. Fixes: 12a6cbd4f3f1 ("drm/panel: otm8009a: Use new backlight API") Signed-off-by: James Cowgill Cc: stable@vger.kernel.org Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230412173450.199592-1-james.cowgill@blaize.com commit 0af03871b6af83622b652218039f3ac8864a5a3b Merge: 9bf55bd4425bc ab4f1e28c941b Author: David S. Miller Date: Mon Apr 17 08:28:21 2023 +0100 Merge branch 'sctp-info-dump' Xin Long says: ==================== sctp: add some missing peer_capables in sctp info dump The 1st patch removes the unused and obsolete hostname_address from sctp_association peer and also the bit from sctp_info peer_capables, and then reuses its bit for reconf_capable and use the higher available bit for intl_capable in the 2nd patch. ==================== Signed-off-by: David S. Miller commit ab4f1e28c941b2554456bfe091db0caf25c33044 Author: Xin Long Date: Fri Apr 14 17:21:16 2023 -0400 sctp: add intl_capable and reconf_capable in ss peer_capable There are two new peer capables have been added since sctp_diag was introduced into SCTP. When dumping the peer capables, these two new peer capables should also be included. To not break the old capables, reconf_capable takes the old hostname_address bit, and intl_capable uses the higher available bit in sctpi_peer_capable. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit bd4b28189469492df2b962d737842c311ce2659c Author: Xin Long Date: Fri Apr 14 17:21:15 2023 -0400 sctp: delete the obsolete code for the host name address param In the latest RFC9260, the Host Name Address param has been deprecated. For INIT chunk: Note 3: An INIT chunk MUST NOT contain the Host Name Address parameter. The receiver of an INIT chunk containing a Host Name Address parameter MUST send an ABORT chunk and MAY include an "Unresolvable Address" error cause. For Supported Address Types: The value indicating the Host Name Address parameter MUST NOT be used when sending this parameter and MUST be ignored when receiving this parameter. Currently Linux SCTP doesn't really support Host Name Address param, but only saves some flag and print debug info, which actually won't even be triggered due to the verification in sctp_verify_param(). This patch is to delete those dead code. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 5dd45b66742a1f3cfa9a92dc0ac8714c7708ee6c Author: Konrad Dybcio Date: Sat Apr 15 13:00:30 2023 +0200 drm/panel: novatek-nt35950: Improve error handling In a very peculiar case when probing and registering with the secondary DSI host succeeds, but the OF backlight or DSI attachment fails, the primary DSI device is automatically cleaned up, but the secondary one is not, leading to -EEXIST when the driver core tries to handle -EPROBE_DEFER. Unregister the DSI1 device manually on failure to prevent that. Fixes: 623a3531e9cf ("drm/panel: Add driver for Novatek NT35950 DSI DriverIC panels") Signed-off-by: Konrad Dybcio Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230415-konrad-longbois-next-v1-1-ce695dc9df84@linaro.org commit 9bf55bd4425bc944d23021cd818250e064f73227 Merge: 28f610d0868d9 0fcd72df8847d Author: David S. Miller Date: Mon Apr 17 08:25:34 2023 +0100 Merge branch 'mptcp-cleanups' Matthieu Baerts says: ==================== mptcp: various small cleanups Patch 1 makes a function static because it is only used in one file. Patch 2 adds info about the git trees we use to help occasional devs. Patch 3 removes an unused variable. Patch 4 removes duplicated entries from the help menu of a tool used in MPTCP selftests. Patch 5 removes some ShellCheck warnings in mptcp_join.sh selftest. Only very minor improvements then. ==================== Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 0fcd72df8847d3a62eb34a084862157ce0564a94 Author: Matthieu Baerts Date: Fri Apr 14 17:47:10 2023 +0200 selftests: mptcp: join: fix ShellCheck warnings Most of the code had an issue according to ShellCheck. That's mainly due to the fact it incorrectly believes most of the code was unreachable because it's invoked by variable name, see how the "tests" array is used. Once SC2317 has been ignored, three small warnings were still visible: - SC2155: Declare and assign separately to avoid masking return values. - SC2046: Quote this to prevent word splitting: can be ignored because "ip netns pids" can display more than one pid. - SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. This probably didn't fix any actual issues but it might help spotting new interesting warnings reported by ShellCheck as just before, ShellCheck was reporting issues for most lines making it a bit useless. Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 0a85264e48b642d360720589fdb837a3643fb9b0 Author: Matthieu Baerts Date: Fri Apr 14 17:47:09 2023 +0200 selftests: mptcp: remove duplicated entries in usage mptcp_connect tool was printing some duplicated entries when showing how to use it: -j -l -r While at it, I also: - moved the very few entries that were not sorted, - added -R that was missing since commit 8a4b910d005d ("mptcp: selftests: add rcvbuf set option"), - removed the -u parameter that has been removed in commit f730b65c9d85 ("selftests: mptcp: try to set mptcp ulp mode in different sk states"). No need to backport this, it is just an internal tool used by our selftests. The help menu is mainly useful for MPTCP kernel devs. Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit ce395d0e3ad585839245a1f6a43cc144617a0163 Author: Matthieu Baerts Date: Fri Apr 14 17:47:08 2023 +0200 mptcp: remove unused 'remaining' variable In some functions, 'remaining' variable was given in argument and/or set but never read. net/mptcp/options.c:779:3: warning: Value stored to 'remaining' is never read [clang-analyzer-deadcode.DeadStores]. net/mptcp/options.c:547:3: warning: Value stored to 'remaining' is never read [clang-analyzer-deadcode.DeadStores]. The issue has been reported internally by Alibaba CI. Reported-by: Abaci Robot Suggested-by: Mat Martineau Co-developed-by: Jiapeng Chong Signed-off-by: Jiapeng Chong Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit c3d713409b53c0db59887230341973d9b1f73bd4 Author: Matthieu Baerts Date: Fri Apr 14 17:47:07 2023 +0200 MAINTAINERS: add git trees for MPTCP This will help occasional developers to find our git repo without having to look at our wiki. Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit aa5887dca2d236fc50000e27023d4d78dce3af30 Author: Geliang Tang Date: Fri Apr 14 17:47:06 2023 +0200 mptcp: make userspace_pm_append_new_local_addr static mptcp_userspace_pm_append_new_local_addr() has always exclusively been used in pm_userspace.c since its introduction in commit 4638de5aefe5 ("mptcp: handle local addrs announced by userspace PMs"). So make it static. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 28f610d0868d961059f66fb4a3b2de082d52a4f6 Merge: 0475135f8c81d 8d547809a5d74 Author: David S. Miller Date: Mon Apr 17 08:18:34 2023 +0100 Merge branch 'mptcp-subflow-init' Matthieu Baerts says: ==================== mptcp: refactor first subflow init This series refactors the initialisation of the first subflow of a listen socket. The first subflow allocation is no longer done at the initialisation of the socket but later, when the connection request is received or when requested by the userspace. This is needed not just because Paolo likes to refactor things but because this simplifies the code and makes the behaviour more consistent with the rest. Also, this is a prerequisite for future patches adding proper support of SELinux/LSM labels with MPTCP and accept(2). In [1], Ondrej Mosnacek explained they discovered the (userspace-facing) sockets returned by accept(2) when using MPTCP always end up with the label representing the kernel (typically system_u:system_r:kernel_t:s0), while it would make more sense to inherit the context from the parent socket (the one that is passed to accept(2)). Before being able to properly support that on SELinux/LSM side, patches 2-3/5 prepare the code to simplify the patch 4/5 moving the allocation. Patch 1/5 is a small clean-up seen while working on the series and patch 5/5 is a small improvement when closing unaccepted sockets. [1] https://lore.kernel.org/netdev/CAFqZXNs2LF-OoQBUiiSEyranJUXkPLcCfBkMkwFeM6qEwMKCTw@mail.gmail.com/ ==================== Signed-off-by: David S. Miller commit 8d547809a5d74aacf022d1df7a508c631088aaec Author: Paolo Abeni Date: Fri Apr 14 16:08:04 2023 +0200 mptcp: fastclose msk when cleaning unaccepted sockets When cleaning up unaccepted mptcp socket still laying inside the listener queue at listener close time, such sockets will go through a regular close, waiting for a timeout before shutting down the subflows. There is no need to keep the kernel resources in use for such a possibly long time: short-circuit to fast-close. Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit ddb1a072f858704b3555876877ca38c5b103a215 Author: Paolo Abeni Date: Fri Apr 14 16:08:03 2023 +0200 mptcp: move first subflow allocation at mpc access time In the long run this will simplify the mptcp code and will allow for more consistent behavior. Move the first subflow allocation out of the sock->init ops into the __mptcp_nmpc_socket() helper. Since the first subflow creation can now happen after the first setsockopt() we additionally need to invoke mptcp_sockopt_sync() on it. Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit a2702a076e73787db660fb8fd07d26a1a3108358 Author: Paolo Abeni Date: Fri Apr 14 16:08:02 2023 +0200 mptcp: move fastopen subflow check inside mptcp_sendmsg_fastopen() So that we can avoid a bunch of check in fastpath. Additionally we can specialize such check according to the specific fastopen method - defer_connect vs MSG_FASTOPEN. The latter bits will simplify the next patches. Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 617612316953093bc859890e405e1b550c27d840 Author: Paolo Abeni Date: Fri Apr 14 16:08:01 2023 +0200 mptcp: avoid unneeded __mptcp_nmpc_socket() usage In a few spots, the mptcp code invokes the __mptcp_nmpc_socket() helper multiple times under the same socket lock scope. Additionally, in such places, the socket status ensures that there is no MP capable handshake running. Under the above condition we can replace the later __mptcp_nmpc_socket() helper invocation with direct access to the msk->subflow pointer and better document such access is not supposed to fail with WARN(). Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 7a486c443c89bd949f7a64e0040f704e02710b3c Author: Paolo Abeni Date: Fri Apr 14 16:08:00 2023 +0200 mptcp: drop unneeded argument After commit 3a236aef280e ("mptcp: refactor passive socket initialization"), every mptcp_pm_fully_established() call is always invoked with a GFP_ATOMIC argument. We can then drop it. Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 0475135f8c81dccd556234e14ec65888e71994db Merge: e2174b03558e5 220ae987838c8 Author: David S. Miller Date: Mon Apr 17 08:14:21 2023 +0100 Merge tag 'mlx5-updates-2023-04-14' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux mlx5-updates-2023-04-14 Yevgeny Kliteynik Says: ======================= SW Steering: Support pattern/args modify_header actions The following patch series adds support for a new pattern/arguments type of modify_header actions. Starting with ConnectX-6 DX, we use a new design of modify_header FW object. The current modify_header object allows for having only limited number of these FW objects, which means that we are limited in the number of offloaded flows that require modify_header action. The new approach comprises of two types of objects: pattern and argument. Pattern holds header modification templates, later used with corresponding argument object to create complete header modification actions. The pattern indicates which headers are modified, while the arguments provide the specific values. Therefore a single pattern can be used with different arguments in different flows, enabling offloading of large number of modify_header flows. - Patch 1, 2: Add ICM pool for modify-header-pattern objects and implement patterns cache, allowing patterns reuse for different flows - Patch 3: Allow for chunk allocation separately for STEv0 and STEv1 - Patch 4: Read related device capabilities - Patch 5: Add create/destroy functions for the new general object type - Patch 6: Add support for writing modify header argument to ICM - Patch 7, 8: Some required fixes to support pattern/arg - separate read buffer from the write buffer and fix QP continuous allocation - Patch 9: Add pool for modify header arg objects - Patch 10, 11, 12: Implement MODIFY_HEADER and TNL_L3_TO_L2 actions with the new patterns/args design - Patch 13: Optimization - set modify header action of size 1 directly on the STE instead of separate pattern/args combination - Patch 14: Adjust debug dump for patterns/args - Patch 15: Enable patterns and arguments for supporting devices ======================= commit e2174b03558e59be3c33b0967def5aca8518c964 Merge: c6d6ef3ee3b61 9feac87b673c6 Author: David S. Miller Date: Mon Apr 17 08:12:33 2023 +0100 Merge branch 'ovs-selftests' Aaron Conole says: ==================== selftests: openvswitch: add support for testing upcall interface The existing selftest suite for openvswitch will work for regression testing the datapath feature bits, but won't test things like adding interfaces, or the upcall interface. Here, we add some additional test facilities. First, extend the ovs-dpctl.py python module to support the OVS_FLOW and OVS_PACKET netlink families, with some associated messages. These can be extended over time, but the initial support is for more well known cases (output, userspace, and CT). Next, extend the test suite to test upcalls by adding a datapath, monitoring the upcall socket associated with the datapath, and then dumping any upcalls that are received. Compare with expected ARP upcall via arping. ==================== Signed-off-by: David S. Miller commit 9feac87b673c63e2de9aaf21bbf46cd9c4158a97 Author: Aaron Conole Date: Fri Apr 14 09:17:50 2023 -0400 selftests: openvswitch: add support for upcall testing The upcall socket interface can be exercised now to make sure that future feature adjustments to the field can maintain backwards compatibility. Signed-off-by: Aaron Conole Signed-off-by: David S. Miller commit e52b07aa1a54fcb66461149c5185a815c1c60340 Author: Aaron Conole Date: Fri Apr 14 09:17:49 2023 -0400 selftests: openvswitch: add flow dump support Add a basic set of fields to print in a 'dpflow' format. This will be used by future commits to check for flow fields after parsing, as well as verifying the flow fields pushed into the kernel from userspace. Signed-off-by: Aaron Conole Signed-off-by: David S. Miller commit 74cc26f416b9ed88af300393a6f06e0765ebde8b Author: Aaron Conole Date: Fri Apr 14 09:17:48 2023 -0400 selftests: openvswitch: add interface support Includes an associated test to generate netns and connect interfaces, with the option to include packet tracing. This will be used in the future when flow support is added for additional test cases. Signed-off-by: Aaron Conole Signed-off-by: David S. Miller commit c6d6ef3ee3b6118dae6b32816e43c790f81079b2 Author: Horatiu Vultur Date: Fri Apr 14 10:26:59 2023 +0200 net: phy: micrel: Fix PTP_PF_PEROUT for lan8841 If the 1PPS output was enabled and then lan8841 was configured to be a follower, then target clock which is used to generate the 1PPS was not configure correctly. The problem was that for each adjustments of the time, also the nanosecond part of the target clock was changed. Therefore the initial nanosecond part of the target clock was changed. The issue can be observed if both the leader and the follower are generating 1PPS and see that their PPS are not aligned even if the time is allined. The fix consists of not modifying the nanosecond part of the target clock when adjusting the time. In this way the 1PPS get also aligned. Fixes: e4ed8ba08e3f ("net: phy: micrel: Add support for PTP_PF_PEROUT for lan8841") Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit 803033c148f754f32da1b93926c49c22731ec485 Author: Cong Liu Date: Sat Apr 15 00:41:09 2023 +0200 drm/i915: Fix memory leaks in i915 selftests This patch fixes memory leaks on error escapes in function fake_get_pages Fixes: c3bfba9a2225 ("drm/i915: Check for integer truncation on scatterlist creation") Signed-off-by: Cong Liu Reviewed-by: Andrzej Hajda Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230414224109.1051922-1-andi.shyti@linux.intel.com (cherry picked from commit 8bfbdadce85c4c51689da10f39c805a7106d4567) Signed-off-by: Joonas Lahtinen commit 631420b06597a33c72b6dcef78d1c2dea17f452d Author: Ville Syrjälä Date: Thu Apr 13 23:06:02 2023 +0300 drm/i915: Make intel_get_crtc_new_encoder() less oopsy The point of the WARN was to print something, not oops straight up. Currently that is precisely what happens if we can't find the connector for the crtc in the atomic state. Get the dev pointer from the atomic state instead of the potentially NULL encoder to avoid that. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230413200602.6037-2-ville.syrjala@linux.intel.com Fixes: 3a47ae201e07 ("drm/i915/display: Make WARN* drm specific where encoder ptr is available") Reviewed-by: Jani Nikula (cherry picked from commit 3b6692357f70498f617ea1b31a0378070a0acf1c) Signed-off-by: Joonas Lahtinen commit d1691bb22eba23a0131f1bde41d268bb0ebb0f59 Author: Lucas De Marchi Date: Thu Apr 13 13:03:49 2023 -0700 drm/i915/gt: Avoid out-of-bounds access when loading HuC When HuC is loaded by GSC, there is no header definition for the kernel to look at and firmware is just handed to GSC. However when reading the version, it should still check the size of the blob to guarantee it's not incurring into out-of-bounds array access. If firmware is smaller than expected, the following message is now printed: # echo boom > /lib/firmware/i915/dg2_huc_gsc.bin # dmesg | grep -i huc [drm] GT0: HuC firmware i915/dg2_huc_gsc.bin: invalid size: 5 < 184 [drm] *ERROR* GT0: HuC firmware i915/dg2_huc_gsc.bin: fetch failed -ENODATA ... Even without this change the size, header and signature are still checked by GSC when loading, so this only avoids the out-of-bounds array access. Fixes: a7b516bd981f ("drm/i915/huc: Add fetch support for gsc-loaded HuC binary") Cc: Daniele Ceraolo Spurio Cc: Alan Previn Signed-off-by: Lucas De Marchi Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20230413200349.3492571-1-lucas.demarchi@intel.com (cherry picked from commit adfbae9ffe339eed08d54a4eb87c93f4b35f214b) Signed-off-by: Joonas Lahtinen commit ccb2d173b983984bfa35398abed3f8a76c75f788 Author: Fangrui Song Date: Tue Apr 11 20:09:44 2023 +0000 Makefile: use -z pack-relative-relocs Commit 27f2a4db76e8 ("Makefile: fix GDB warning with CONFIG_RELR") added --use-android-relr-tags to fix a GDB warning BFD: /android0/linux-next/vmlinux: unknown type [0x13] section `.relr.dyn' The GDB warning has been fixed in version 11.2. The DT_ANDROID_RELR tag was deprecated since DT_RELR was standardized. Thus, --use-android-relr-tags should be removed. While making the change, try -z pack-relative-relocs, which is supported since LLD 15. Keep supporting --pack-dyn-relocs=relr as well for older LLD versions. There is no indication of obsolescence for --pack-dyn-relocs=relr. As of today, GNU ld supports the latter option for x86 and powerpc64 ports and has no intention to support --pack-dyn-relocs=relr. In the absence of the glibc symbol version GLIBC_ABI_DT_RELR, --pack-dyn-relocs=relr and -z pack-relative-relocs are identical in ld.lld. GNU ld and newer versions of LLD report warnings (instead of errors) for unknown -z options. Only errors lead to non-zero exit codes. Therefore, we should test --pack-dyn-relocs=relr before testing -z pack-relative-relocs. Link: https://github.com/ClangBuiltLinux/linux/issues/1057 Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=a619b58721f0a03fd91c27670d3e4c2fb0d88f1e Signed-off-by: Fangrui Song Reviewed-by: Nick Desaulniers Acked-by: Will Deacon Signed-off-by: Masahiro Yamada commit ddc72c9659b5a85a2d135503caf193da0723e813 Author: Masahiro Yamada Date: Sun Apr 2 02:01:17 2023 +0900 kbuild: clang: do not use CROSS_COMPILE for target triple The target triple is overridden by the user-supplied CROSS_COMPILE, but I do not see a good reason to support it. Users can use a new architecture without adding CLANG_TARGET_FLAGS_*, but that would be a rare case. Use the hard-coded and deterministic target triple all the time. Signed-off-by: Masahiro Yamada Acked-by: Nathan Chancellor Reviewed-by: Nick Desaulniers commit fb318e54fea6b8532833faef98c8b7720a30b29d Author: Masahiro Yamada Date: Sun Mar 26 00:18:17 2023 +0900 kconfig: menuconfig: reorder functions to remove forward declarations Define helper functions before the callers so that forward declarations can go away. Signed-off-by: Masahiro Yamada commit b84e3687da9436c5438021800ce2d7baa03c2eab Author: Masahiro Yamada Date: Sun Mar 26 00:18:16 2023 +0900 kconfig: menuconfig: remove unused M_EVENT macro This is not used anywhere. Signed-off-by: Masahiro Yamada commit 90fe4c506c855ee90116a96ec25fa39ea8e9f202 Author: Masahiro Yamada Date: Sun Mar 26 00:18:15 2023 +0900 kconfig: menuconfig: remove OLD_NCURSES macro This code has been here for more than 20 years. The bug in the old days no longer matters. Signed-off-by: Masahiro Yamada commit 491b146d4c13908a23436bd44dc1f01d1a0a99e6 Author: Bastian Germann Date: Tue Mar 14 01:40:22 2023 +0100 kbuild: builddeb: Eliminate debian/arch use In the builddeb context, the DEB_HOST_ARCH environment variable is set to the same value as debian/arch's content, so use the variable with dpkg-architecture. This is the last use of the debian/arch file during dpkg-buildpackage time. Signed-off-by: Bastian Germann Signed-off-by: Masahiro Yamada commit 79549da691edd4874c19d99c578a134471817c47 Author: Masahiro Yamada Date: Wed Mar 8 20:52:43 2023 +0900 scripts/kallsyms: update the usage in the comment block Commit 010a0aad39fc ("kallsyms: Correctly sequence symbols when CONFIG_LTO_CLANG=y") added --lto-clang, and updated the usage() function, but not the comment. Update it in the same way. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit dd1553b8a5f2ef4e0aa2537c49ba0c37837b691e Author: Masahiro Yamada Date: Wed Mar 8 20:52:42 2023 +0900 scripts/kallsyms: decrease expand_symbol() / cleanup_symbol_name() calls Currently, expand_symbol() is called many times to get the uncompressed symbol names for sorting, and also for adding comments. With the output order shuffled in the previous commit, the symbol data are now written in the following order: (1) kallsyms_num_syms (2) kallsyms_names <-- need compressed names (3) kallsyms_markers (4) kallsyms_token_table (5) kallsyms_token_index (6) kallsyms_addressed / kallsyms_offsets <-- need uncompressed names (for commenting) (7) kallsyms_relative_base (8) kallsyms_seq_of_names <-- need uncompressed names (for sorting) The compressed names are only needed by (2). Call expand_symbol() between (2) and (3) to restore the original symbol names. This requires just one expand_symbol() call for each symbol. Call cleanup_symbol_name() between (7) and (8) instead of during sorting. It is allowed to overwrite the ->sym field because (8) just outputs the index instead of the name of each symbol. Again, this requires just one cleanup_symbol_name() call for each symbol. This refactoring makes it ~30% faster. [Before] $ time scripts/kallsyms --all-symbols --absolute-percpu --base-relative \ .tmp_vmlinux.kallsyms2.syms >/dev/null real 0m1.027s user 0m1.010s sys 0m0.016s [After] $ time scripts/kallsyms --all-symbols --absolute-percpu --base-relative \ .tmp_vmlinux.kallsyms2.syms >/dev/null real 0m0.717s user 0m0.717s sys 0m0.000s Signed-off-by: Masahiro Yamada commit 404bad70fcf7cb1a36198581e6904637f3c36846 Author: Masahiro Yamada Date: Wed Mar 8 20:52:41 2023 +0900 scripts/kallsyms: change the output order Currently, this tool outputs symbol data in the following order. (1) kallsyms_addressed / kallsyms_offsets (2) kallsyms_relative_base (3) kallsyms_num_syms (4) kallsyms_names (5) kallsyms_markers (6) kallsyms_seq_of_names (7) kallsyms_token_table (8) kallsyms_token_index This commit changes the order as follows: (1) kallsyms_num_syms (2) kallsyms_names (3) kallsyms_markers (4) kallsyms_token_table (5) kallsyms_token_index (6) kallsyms_addressed / kallsyms_offsets (7) kallsyms_relative_base (8) kallsyms_seq_of_names The motivation is to decrease the number of function calls to expand_symbol() and cleanup_symbol_name(). The compressed names are only required for writing 'kallsyms_names'. If you do this first, we can restore the original symbol names. You do not need to repeat the same operation over again. The actual refactoring will happen in the next commit. Signed-off-by: Masahiro Yamada commit 320e7c9d4494f7a6f046871678f582a3392235f8 Author: Masahiro Yamada Date: Wed Mar 8 20:52:40 2023 +0900 scripts/kallsyms: move compiler-generated symbol patterns to mksysmap scripts/kallsyms.c maintains compiler-generated symbols, but we end up with something similar in scripts/mksysmap to avoid the "Inconsistent kallsyms data" error. For example, commit c17a2538704f ("mksysmap: Fix the mismatch of 'L0' symbols in System.map"). They were separately maintained prior to commit 94ff2f63d6a3 ("kbuild: reuse mksysmap output for kallsyms"). Now that scripts/kallsyms.c parses the output of scripts/mksysmap, it makes more sense to collect all the ignored patterns to mksysmap. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit ca09bf48f99bdc08e17da11aeae56b7ea132b7c8 Author: Masahiro Yamada Date: Wed Mar 8 20:52:39 2023 +0900 scripts/kallsyms: exclude symbols generated by itself dynamically Drop the symbols generated by scripts/kallsyms itself automatically instead of maintaining the symbol list manually. Pass the kallsyms object from the previous kallsyms step (if it exists) as the third parameter of scripts/mksysmap, which will weed out the generated symbols from the input to the next kallsyms step. Signed-off-by: Masahiro Yamada commit c4802044a0a7d7dfa82af858c2fa3ae9d76249c4 Author: Masahiro Yamada Date: Wed Mar 8 20:52:38 2023 +0900 scripts/mksysmap: use sed with in-line comments It is not feasible to insert comments in a multi-line shell command. Use sed, and move comments close to the code. Signed-off-by: Masahiro Yamada commit e9f76363d0aa2d7c01288d9aad79b7e44855a435 Author: Masahiro Yamada Date: Wed Mar 8 20:52:37 2023 +0900 scripts/mksysmap: remove comments described in nm(1) I do not think we need to repeat what is written in 'man nm'. Signed-off-by: Masahiro Yamada commit a7b00a1811c9e562b44f0b283de7f01443123390 Author: Masahiro Yamada Date: Wed Mar 8 20:52:36 2023 +0900 scripts/kallsyms: remove redundant code for omitting U and N The symbol types 'U' and 'N' are already filtered out by the following line in scripts/mksysmap: -e ' [aNUw] ' Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit bea5b74504742f1b51b815bcaf9a70bddbc49ce3 Author: Arnd Bergmann Date: Mon Mar 6 11:14:51 2023 +0100 kallsyms: expand symbol name into comment for debugging The assembler output of kallsyms.c is not meant for people to understand, and is generally not helpful when debugging "Inconsistent kallsyms data" warnings. I have previously struggled with these, but found it helpful to list which symbols changed between the first and second pass in the .tmp_vmlinux.kallsyms*.S files. As this file is preprocessed, it's possible to add a C-style multiline comment with the full type/name tuple. Signed-off-by: Arnd Bergmann Signed-off-by: Masahiro Yamada commit e82c98f2ca439356d5595ba8c9cd782f993f6f8c Merge: afa351a15d809 541372bb62f28 Author: Dave Airlie Date: Mon Apr 17 10:54:58 2023 +1000 Merge tag 'amd-drm-next-6.4-2023-04-14' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.4-2023-04-14: amdgpu: - S4 fixes for APUs - GFX11 fixes - Misc code cleanups - DCN 3.2 fixes - DCN 3.1.4 fixes - FPO/FAMS work to improve display power savings - DP fixes - UMC 8.10 code cleanup - SDMA v4 fix - GPU clock counter fixes - SMU 13 fixes - Sdma v6 invalidation fix for preemption - RAS fixes - S0ix fix - GC 9.4.3 updates amdkfd: - Fix user pointers with IOMMU - Fix coherency flag handling Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230414204609.7942-1-alexander.deucher@amd.com commit 8ab89e9563161921ffc86724eb3217d228eaad57 Author: Lukas Bulwahn Date: Mon Mar 20 14:54:18 2023 +0100 m68k: Kconfig.machine: remove obsolete configs ROMBASE and ROMSIZE The configs ROMBASE and ROMSIZE were used in arch/m68k/68360/head-ram.S, which was removed with commit a3595962d824 ("m68knommu: remove obsolete 68360 support"). Remove the obsolete configs ROMBASE and ROMSIZE. Signed-off-by: Lukas Bulwahn Fixes: a3595962d82495f5 ("m68knommu: remove obsolete 68360 support") Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Ungerer commit 2196087b306952204eb38199437358161de2ae6b Author: Randy Dunlap Date: Tue Feb 28 08:37:26 2023 -0800 MAINTAINERS: drop uclinux.org uclinux.org is dead. Drop it from the MAINTAINERS file. Signed-off-by: Randy Dunlap Cc: Greg Ungerer Cc: linux-m68k@lists.linux-m68k.org Signed-off-by: Greg Ungerer commit e492cd61b986590a45c674ede7dd1c4dbf94cf24 Merge: d46031f40e0f7 2ff559f31a5d5 Author: Andrew Morton Date: Sun Apr 16 12:31:58 2023 -0700 sync mm-stable with mm-hotfixes-stable to pick up depended-upon upstream changes commit 26a42b614eb934f400cd3d1cc0b7fa1955ae3320 Author: Christoph Hellwig Date: Sun Apr 16 09:35:53 2023 +0200 blk-mq: fix the blk_mq_add_to_requeue_list call in blk_kick_flush Commit b12e5c6c755a accidentally changes blk_kick_flush to do a head insert into the requeue list, fix this up. Fixes: b12e5c6c755a ("blk-mq: pass a flags argument to blk_mq_add_to_requeue_list") Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230416073553.966161-1-hch@lst.de Signed-off-by: Jens Axboe commit e53413f8deedf738a6782cc14cc00bd5852ccf18 Author: Colin Ian King Date: Thu Apr 13 14:30:09 2023 +0100 block, bfq: Fix division by zero error on zero wsum When the weighted sum is zero the calculation of limit causes a division by zero error. Fix this by continuing to the next level. This was discovered by running as root: stress-ng --ioprio 0 Fixes divison by error oops: [ 521.450556] divide error: 0000 [#1] SMP NOPTI [ 521.450766] CPU: 2 PID: 2684464 Comm: stress-ng-iopri Not tainted 6.2.1-1280.native #1 [ 521.451117] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.1-0-g3208b098f51a-prebuilt.qemu.org 04/01/2014 [ 521.451627] RIP: 0010:bfqq_request_over_limit+0x207/0x400 [ 521.451875] Code: 01 48 8d 0c c8 74 0b 48 8b 82 98 00 00 00 48 8d 0c c8 8b 85 34 ff ff ff 48 89 ca 41 0f af 41 50 48 d1 ea 48 98 48 01 d0 31 d2 <48> f7 f1 41 39 41 48 89 85 34 ff ff ff 0f 8c 7b 01 00 00 49 8b 44 [ 521.452699] RSP: 0018:ffffb1af84eb3948 EFLAGS: 00010046 [ 521.452938] RAX: 000000000000003c RBX: 0000000000000000 RCX: 0000000000000000 [ 521.453262] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffb1af84eb3978 [ 521.453584] RBP: ffffb1af84eb3a30 R08: 0000000000000001 R09: ffff8f88ab8a4ba0 [ 521.453905] R10: 0000000000000000 R11: 0000000000000001 R12: ffff8f88ab8a4b18 [ 521.454224] R13: ffff8f8699093000 R14: 0000000000000001 R15: ffffb1af84eb3970 [ 521.454549] FS: 00005640b6b0b580(0000) GS:ffff8f88b3880000(0000) knlGS:0000000000000000 [ 521.454912] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 521.455170] CR2: 00007ffcbcae4e38 CR3: 00000002e46de001 CR4: 0000000000770ee0 [ 521.455491] PKRU: 55555554 [ 521.455619] Call Trace: [ 521.455736] [ 521.455837] ? bfq_request_merge+0x3a/0xc0 [ 521.456027] ? elv_merge+0x115/0x140 [ 521.456191] bfq_limit_depth+0xc8/0x240 [ 521.456366] __blk_mq_alloc_requests+0x21a/0x2c0 [ 521.456577] blk_mq_submit_bio+0x23c/0x6c0 [ 521.456766] __submit_bio+0xb8/0x140 [ 521.457236] submit_bio_noacct_nocheck+0x212/0x300 [ 521.457748] submit_bio_noacct+0x1a6/0x580 [ 521.458220] submit_bio+0x43/0x80 [ 521.458660] ext4_io_submit+0x23/0x80 [ 521.459116] ext4_do_writepages+0x40a/0xd00 [ 521.459596] ext4_writepages+0x65/0x100 [ 521.460050] do_writepages+0xb7/0x1c0 [ 521.460492] __filemap_fdatawrite_range+0xa6/0x100 [ 521.460979] file_write_and_wait_range+0xbf/0x140 [ 521.461452] ext4_sync_file+0x105/0x340 [ 521.461882] __x64_sys_fsync+0x67/0x100 [ 521.462305] ? syscall_exit_to_user_mode+0x2c/0x1c0 [ 521.462768] do_syscall_64+0x3b/0xc0 [ 521.463165] entry_SYSCALL_64_after_hwframe+0x5a/0xc4 [ 521.463621] RIP: 0033:0x5640b6c56590 [ 521.464006] Code: 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 80 3d 71 70 0e 00 00 74 17 b8 4a 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20230413133009.1605335-1-colin.i.king@gmail.com Signed-off-by: Jens Axboe commit d325c162631eb7c21f244f48184f3c8ace868039 Author: Akinobu Mita Date: Sat Apr 15 21:57:05 2023 +0900 fault-inject: fix build error when FAULT_INJECTION_CONFIGFS=y and CONFIGFS_FS=m This fixes a build error when CONFIG_FAULT_INJECTION_CONFIGFS=y and CONFIG_CONFIGFS_FS=m. Since the fault-injection library cannot built as a module, avoid building configfs as a module. Fixes: 4668c7a2940d ("fault-inject: allow configuration via configfs") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304150025.K0hczLR4-lkp@intel.com/ Signed-off-by: Akinobu Mita Signed-off-by: Jens Axboe commit 9f4107b07b17b5ee68af680150f91227bea2df6f Author: Jens Axboe Date: Fri Apr 14 07:32:02 2023 -0600 block: store bdev->bd_disk->fops->submit_bio state in bdev We have a long chain of memory dereferencing just to whether or not this disk has a special submit_bio helper. As that's not necessarily the common case, add a bd_has_submit_bio state in the bdev to avoid traversing this memory dependency chain if we don't need to. Signed-off-by: Jens Axboe commit 3838c406a594f15600ad6f83c1e3b16bfd1829d0 Author: Jens Axboe Date: Fri Apr 14 07:30:16 2023 -0600 block: re-arrange the struct block_device fields for better layout This moves struct device out-of-line as it's just used at open/close time, so we can keep some of the commonly used fields closer together. On a standard setup, it also reduces the size from 864 bytes to 848 bytes. Yes, struct device is a pig... Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 745ed7d77834048879bf24088c94e5a6462b613f Author: Gao Xiang Date: Fri Apr 14 16:30:27 2023 +0800 erofs: cleanup i_format-related stuffs Switch EROFS_I_{VERSION,DATALAYOUT}_BITS into EROFS_I_{VERSION,DATALAYOUT}_MASK. Also avoid erofs_bitrange() since its functionality is simple enough. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230414083027.12307-2-hsiangkao@linux.alibaba.com commit 10656f9ca60ed85f4cfc06bcbe1f240ee310fa8c Author: Gao Xiang Date: Fri Apr 14 16:30:26 2023 +0800 erofs: sunset erofs_dbg() Such debug messages are rarely used now. Let's get rid of these, and revert locally if they are needed for debugging. Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230414083027.12307-1-hsiangkao@linux.alibaba.com commit 1b3567a1969b26f709d82a874498c0754ea841c3 Author: Jingbo Xu Date: Fri Apr 14 14:18:10 2023 +0800 erofs: fix potential overflow calculating xattr_isize Given on-disk i_xattr_icount is 16 bits and xattr_isize is calculated from i_xattr_icount multiplying 4, xattr_isize has a theoretical maximum of 256K (64K * 4). Thus declare xattr_isize as unsigned int to avoid the potential overflow. Fixes: bfb8674dc044 ("staging: erofs: add erofs in-memory stuffs") Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230414061810.6479-1-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang commit 4fdadd5b0f0c723c812842454f8cca1619f2e731 Author: Gao Xiang Date: Thu Apr 13 17:22:41 2023 +0800 erofs: get rid of z_erofs_fill_inode() Prior to big pclusters, non-compact compression indexes could have empty headers. Let's just avoid the legacy path since it can be handled properly as a specific compression header with z_erofs_fill_inode_lazy() too. Tested with erofs-utils exist versions. Signed-off-by: Gao Xiang Reviewed-by: Yue Hu Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230413092241.73829-1-hsiangkao@linux.alibaba.com commit 6a318ccd7e083729cbcdbd174d7070f6b7d24130 Author: Jingbo Xu Date: Sat Apr 8 06:28:08 2023 +0800 erofs: enable long extended attribute name prefixes Let's enable long xattr name prefix feature. Old kernels will just ignore / skip such extended attributes. In addition, in case you don't want to mount such images, add another incompatible feature as an option for this. Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang Acked-by: Chao Yu Link: https://lore.kernel.org/r/20230407222808.19670-1-jefflexu@linux.alibaba.com [ Gao Xiang: minor commit message fix. ] Signed-off-by: Gao Xiang commit 82bc1ef41d275106a2b5288e4f5b0df19223066a Author: Jingbo Xu Date: Tue Apr 11 17:35:37 2023 +0800 erofs: handle long xattr name prefixes properly Make .{list,get}xattr routines adapted to long xattr name prefixes. When the bit 7 of erofs_xattr_entry.e_name_index is set, it indicates that it refers to a long xattr name prefix. Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang Acked-by: Chao Yu Link: https://lore.kernel.org/r/20230411093537.127286-1-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang commit 9e382914617c5cab89a01a223b8d00bbd43ad3b3 Author: Jingbo Xu Date: Fri Apr 7 22:17:08 2023 +0800 erofs: add helpers to load long xattr name prefixes Long xattr name prefixes will be scanned upon mounting and the in-memory long xattr name prefix array will be initialized accordingly. Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang Acked-by: Chao Yu Link: https://lore.kernel.org/r/20230407141710.113882-6-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang commit b3bfcb9dbfff3da26a63efc60558acd60b96392a Author: Jingbo Xu Date: Fri Apr 7 22:17:07 2023 +0800 erofs: introduce on-disk format for long xattr name prefixes Besides the predefined xattr name prefixes, introduces long xattr name prefixes, which work similarly as the predefined name prefixes, except that they are user specified. It is especially useful for use cases together with overlayfs like Composefs model, which introduces diverse xattr values with only a few common xattr names (trusted.overlay.redirect, trusted.overlay.digest, and maybe more in the future). That makes the existing predefined prefixes ineffective in both image size and runtime performance. When a user specified long xattr name prefix is used, only the trailing part of the xattr name apart from the long xattr name prefix will be stored in erofs_xattr_entry.e_name. e_name is empty if the xattr name matches exactly as the long xattr name prefix. All long xattr prefixes are stored in the packed or meta inode, which depends if fragments feature is enabled or not. For each long xattr name prefix, the on-disk format is kept as the same as the unique metadata format: ALIGN({__le16 len, data}, 4), where len represents the total size of struct erofs_xattr_long_prefix, followed by data of struct erofs_xattr_long_prefix itself. Each erofs_xattr_long_prefix keeps predefined prefixes (base_index) and the remaining prefix string without the trailing '\0'. Two fields are introduced to the on-disk superblock, where xattr_prefix_count represents the total number of the long xattr name prefixes recorded, and xattr_prefix_start represents the start offset of recorded name prefixes in the packed/meta inode divided by 4. When referring to a long xattr name prefix, the highest bit (bit 7) of erofs_xattr_entry.e_name_index is set, while the lower bits (bit 0-6) as a whole represents the index of the referred long name prefix among all long xattr name prefixes. Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang Acked-by: Chao Yu Link: https://lore.kernel.org/r/20230407141710.113882-5-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang commit a97a218b08868029507272a8fc6b52491a157ec5 Author: Jingbo Xu Date: Fri Apr 7 22:17:06 2023 +0800 erofs: move packed inode out of the compression part packed inode could be used in more scenarios which are independent of compression in the future. For example, packed inode could be used to keep extra long xattr prefixes with the help of following patches. Signed-off-by: Jingbo Xu Reviewed-by: Yue Hu Reviewed-by: Gao Xiang Acked-by: Chao Yu Link: https://lore.kernel.org/r/20230407141710.113882-4-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang commit eb2c5e41be1495cf7a20ff49df473b1c45b82e77 Author: Gao Xiang Date: Fri Apr 7 22:17:04 2023 +0800 erofs: keep meta inode into erofs_buf So that erofs_read_metadata() can read metadata from other inodes (e.g. packed inode) as well. Signed-off-by: Jingbo Xu Acked-by: Chao Yu Link: https://lore.kernel.org/r/20230407141710.113882-2-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang commit cb9bce79514392a9a216ff67148e05e2d72c28bd Author: Jingbo Xu Date: Fri Apr 7 22:17:05 2023 +0800 erofs: initialize packed inode after root inode is assigned As commit 8f7acdae2cd4 ("staging: erofs: kill all failure handling in fill_super()"), move the initialization of packed inode after root inode is assigned, so that the iput() in .put_super() is adequate as the failure handling. Otherwise, iput() is also needed in .kill_sb(), in case of the mounting fails halfway. Signed-off-by: Jingbo Xu Reviewed-by: Yue Hu Fixes: b15b2e307c3a ("erofs: support on-disk compressed fragments data") Reviewed-by: Gao Xiang Acked-by: Chao Yu Link: https://lore.kernel.org/r/20230407141710.113882-3-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang commit cc4efd3dd2ac9f89143e5d881609747ecff04164 Author: Gao Xiang Date: Tue Apr 11 01:37:14 2023 +0800 erofs: stop parsing non-compact HEAD index if clusterofs is invalid Syzbot generated a crafted image [1] with a non-compact HEAD index of clusterofs 33024 while valid numbers should be 0 ~ lclustersize-1, which causes the following unexpected behavior as below: BUG: unable to handle page fault for address: fffff52101a3fff9 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 23ffed067 P4D 23ffed067 PUD 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 4398 Comm: kworker/u5:1 Not tainted 6.3.0-rc6-syzkaller-g09a9639e56c0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023 Workqueue: erofs_worker z_erofs_decompressqueue_work RIP: 0010:z_erofs_decompress_queue+0xb7e/0x2b40 ... Call Trace: z_erofs_decompressqueue_work+0x99/0xe0 process_one_work+0x8f6/0x1170 worker_thread+0xa63/0x1210 kthread+0x270/0x300 ret_from_fork+0x1f/0x30 Note that normal images or images using compact indexes are not impacted. Let's fix this now. [1] https://lore.kernel.org/r/000000000000ec75b005ee97fbaa@google.com Reported-and-tested-by: syzbot+aafb3f37cfeb6534c4ac@syzkaller.appspotmail.com Fixes: 02827e1796b3 ("staging: erofs: add erofs_map_blocks_iter") Fixes: 152a333a5895 ("staging: erofs: add compacted compression indexes support") Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230410173714.104604-1-hsiangkao@linux.alibaba.com commit 12c2987e896bd1c433150a64f5bae9993c29d551 Author: Yue Hu Date: Mon Feb 27 16:44:57 2023 +0800 erofs: don't warn ztailpacking feature anymore The ztailpacking feature has been merged for a year, it has been mostly stable now. Signed-off-by: Yue Hu Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230227084457.3510-1-zbestahu@gmail.com Signed-off-by: Gao Xiang commit b05f30bcf71b8060d4a32b11353aaa2c5b0a8e3d Author: Jingbo Xu Date: Thu Mar 30 16:29:05 2023 +0800 erofs: simplify erofs_xattr_generic_get() erofs_xattr_generic_get() won't be called from xattr handlers other than user/trusted/security xattr handler, and thus there's no need of extra checking. Signed-off-by: Jingbo Xu Link: https://lore.kernel.org/r/20230330082910.125374-4-jefflexu@linux.alibaba.com Reviewed-by: Gao Xiang Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 6020ffe76d1119241871300aad2ec7ef2cdc5e6c Author: Jingbo Xu Date: Thu Mar 30 16:29:04 2023 +0800 erofs: rename init_inode_xattrs with erofs_ prefix Rename init_inode_xattrs() to erofs_init_inode_xattrs() without logic change. Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20230330082910.125374-3-jefflexu@linux.alibaba.com Reviewed-by: Yue Hu Acked-by: Chao Yu Signed-off-by: Gao Xiang commit 399f36d8c6e0c8292d2ff3db4fdcd33263b415ec Author: Jingbo Xu Date: Thu Mar 30 16:29:03 2023 +0800 erofs: move several xattr helpers into xattr.c Move xattrblock_addr() and xattrblock_offset() helpers into xattr.c, as they are not used outside of xattr.c. inlinexattr_header_size() has only one caller, and thus make it inlined into the caller directly. Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20230330082910.125374-2-jefflexu@linux.alibaba.com Reviewed-by: Yue Hu Acked-by: Chao Yu Signed-off-by: Gao Xiang commit 1c7f49a76773bcf95d3c840cff6cd449114ddf56 Author: Gao Xiang Date: Fri Mar 31 14:31:49 2023 +0800 erofs: tidy up EROFS on-disk naming - Get rid of all "vle" (variable-length extents) expressions since they only expand overall name lengths unnecessarily; - Rename COMPRESSION_LEGACY to COMPRESSED_FULL; - Move on-disk directory definitions ahead of compression; - Drop unused extended attribute definitions; - Move inode ondisk union `i_u` out as `union erofs_inode_i_u`. No actual logical change. Signed-off-by: Gao Xiang Reviewed-by: Yue Hu Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230331063149.25611-1-hsiangkao@linux.alibaba.com commit 8b465fecc35a434e61728a6184d188c6daa37a5d Author: Jia Zhu Date: Thu Mar 2 15:17:51 2023 +0800 erofs: support flattened block device for multi-blob images In order to support mounting multi-blobs container image as a single block device, add flattened block device feature for EROFS. In this mode, all meta/data contents will be mapped into one block space. User could compose a block device(by nbd/ublk/virtio-blk/ vhost-user-blk) from multiple sources and mount the block device by EROFS directly. It can reduce the number of block devices used, and it's also benefits in both VM file passthrough and distributed storage scenarios. You can test this using the method mentioned by: https://github.com/dragonflyoss/image-service/pull/1139 1. Compose a (nbd)block device from multi-blobs. 2. Mount EROFS on mntdir/. 3. Compare the md5sum between source dir and mntdir/. Later, we could also use it to refer original tar blobs. Signed-off-by: Jia Zhu Signed-off-by: Xin Yin Reviewed-by: Jingbo Xu Acked-by: Chao Yu Tested-by: Jiang Liu Link: https://lore.kernel.org/r/20230302071751.48425-1-zhujia.zj@bytedance.com [ Gao Xiang: refine commit message and use erofs_pos(). ] Signed-off-by: Gao Xiang commit d3c4bdcc756e60b95365c66ff58844ce75d1c8f8 Author: Jingbo Xu Date: Mon Mar 13 21:53:09 2023 +0800 erofs: set block size to the on-disk block size Set the block size to that specified in on-disk superblock. Also remove the hard constraint of PAGE_SIZE block size for the uncompressed device backend. This constraint is temporarily remained for compressed device and fscache backend, as there is more work needed to handle the condition where the block size is not equal to PAGE_SIZE. It is worth noting that the on-disk block size is read prior to erofs_superblock_csum_verify(), as the read block size is needed in the latter. Besides, later we are going to make erofs refer to tar data blobs (which is 512-byte aligned) for OCI containers, where the block size is 512 bytes. In this case, the 512-byte block size may not be adequate for a directory to contain enough dirents. To fix this, we are also going to introduce directory block size independent on the block size. Due to we have already supported block size smaller than PAGE_SIZE now, disable all these images with such separated directory block size until we supported this feature later. Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang Reviewed-by: Yue Hu Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230313135309.75269-3-jefflexu@linux.alibaba.com [ Gao Xiang: update documentation. ] Signed-off-by: Gao Xiang commit 3acea5fc335420ba7ef53947cf2d98d07fac39f7 Author: Jingbo Xu Date: Mon Mar 13 21:53:08 2023 +0800 erofs: avoid hardcoded blocksize for subpage block support As the first step of converting hardcoded blocksize to that specified in on-disk superblock, convert all call sites of hardcoded blocksize to sb->s_blocksize except for: 1) use sbi->blkszbits instead of sb->s_blocksize in erofs_superblock_csum_verify() since sb->s_blocksize has not been updated with the on-disk blocksize yet when the function is called. 2) use inode->i_blkbits instead of sb->s_blocksize in erofs_bread(), since the inode operated on may be an anonymous inode in fscache mode. Currently the anonymous inode is allocated from an anonymous mount maintained in erofs, while in the near future we may allocate anonymous inodes from a generic API directly and thus have no access to the anonymous inode's i_sb. Thus we keep the block size in i_blkbits for anonymous inodes in fscache mode. Be noted that this patch only gets rid of the hardcoded blocksize, in preparation for actually setting the on-disk block size in the following patch. The hard limit of constraining the block size to PAGE_SIZE still exists until the next patch. Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang Reviewed-by: Yue Hu Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20230313135309.75269-2-jefflexu@linux.alibaba.com [ Gao Xiang: fold a patch to fix incorrect truncated offsets. ] Link: https://lore.kernel.org/r/20230413035734.15457-1-zhujia.zj@bytedance.com Signed-off-by: Gao Xiang commit d40f4f68132e9f6d4b1743c8eca0d6194ea1712f Merge: 7a0788fe835f9 530474e6d044d Author: Alexei Starovoitov Date: Sun Apr 16 08:51:24 2023 -0700 Merge branch 'Remove KF_KPTR_GET kfunc flag' David Vernet says: ==================== We've managed to improve the UX for kptrs significantly over the last 9 months. All of the existing use cases which previously had KF_KPTR_GET kfuncs (struct bpf_cpumask *, struct task_struct *, and struct cgroup *) have all been updated to be synchronized using RCU. In other words, their KF_KPTR_GET kfuncs have been removed in favor of KF_RCU | KF_ACQUIRE kfuncs, with the pointers themselves also being readable from maps in an RCU read region thanks to the types being RCU safe. While KF_KPTR_GET was a logical starting point for kptrs, it's become clear that they're not the correct abstraction. KF_KPTR_GET is a flag that essentially does nothing other than enforcing that the argument to a function is a pointer to a referenced kptr map value. At first glance, that's a useful thing to guarantee to a kfunc. It gives kfuncs the ability to try and acquire a reference on that kptr without requiring the BPF prog to do something like this: struct kptr_type *in_map, *new = NULL; in_map = bpf_kptr_xchg(&map->value, NULL); if (in_map) { new = bpf_kptr_type_acquire(in_map); in_map = bpf_kptr_xchg(&map->value, in_map); if (in_map) bpf_kptr_type_release(in_map); } That's clearly a pretty ugly (and racy) UX, and if using KF_KPTR_GET is the only alternative, it's better than nothing. However, the problem with any KF_KPTR_GET kfunc lies in the fact that it always requires some kind of synchronization in order to safely do an opportunistic acquire of the kptr in the map. This is because a BPF program running on another CPU could do a bpf_kptr_xchg() on that map value, and free the kptr after it's been read by the KF_KPTR_GET kfunc. For example, the now-removed bpf_task_kptr_get() kfunc did the following: struct task_struct *bpf_task_kptr_get(struct task_struct **pp) { struct task_struct *p; rcu_read_lock(); p = READ_ONCE(*pp); /* If p is non-NULL, it could still be freed by another CPU, * so we have to do an opportunistic refcount_inc_not_zero() * and return NULL if the task will be freed after the * current RCU read region. */ |f (p && !refcount_inc_not_zero(&p->rcu_users)) p = NULL; rcu_read_unlock(); return p; } In other words, the kfunc uses RCU to ensure that the task remains valid after it's been peeked from the map. However, this is completely redundant with just defining a KF_RCU kfunc that itself does a refcount_inc_not_zero(), which is exactly what bpf_task_acquire() now does. So, the question of whether KF_KPTR_GET is useful is actually, "Are there any synchronization mechanisms / safety flags that are required by certain kptrs, but which are not provided by the verifier to kfuncs?" The answer to that question today is "No", because every kptr we currently care about is RCU protected. Even if the answer ever became "yes", the proper way to support that referenced kptr type would be to add support for whatever synchronization mechanism it requires in the verifier, rather than giving kfuncs a flag that says, "Here's a pointer to a referenced kptr in a map, do whatever you need to do." With all that said -- so as to allow us to consolidate the kfunc API, and simplify the verifier, this patchset removes the KF_KPTR_GET kfunc flag. --- This is v2 of this patchset v1: https://lore.kernel.org/all/20230415103231.236063-1-void@manifault.com/ Changelog: ---------- v1 -> v2: - Fix KF_RU -> KF_RCU typo in commit summary for patch 2/3, and in cover letter (Alexei) - In order to reduce churn, don't shift all KF_* flags down by 1. We'll just fill the now-empty slot the next time we add a flag (Alexei) ==================== Signed-off-by: Alexei Starovoitov commit 530474e6d044d07b179dc4d3392fb853c47446d0 Author: David Vernet Date: Sun Apr 16 03:49:28 2023 -0500 bpf,docs: Remove KF_KPTR_GET from documentation A prior patch removed KF_KPTR_GET from the kernel. Now that it's no longer accessible to kfunc authors, this patch removes it from the BPF kfunc documentation. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230416084928.326135-4-void@manifault.com Signed-off-by: Alexei Starovoitov commit 7b4ddf3920d247c2949073b9c274301c8131332a Author: David Vernet Date: Sun Apr 16 03:49:27 2023 -0500 bpf: Remove KF_KPTR_GET kfunc flag We've managed to improve the UX for kptrs significantly over the last 9 months. All of the existing use cases which previously had KF_KPTR_GET kfuncs (struct bpf_cpumask *, struct task_struct *, and struct cgroup *) have all been updated to be synchronized using RCU. In other words, their KF_KPTR_GET kfuncs have been removed in favor of KF_RCU | KF_ACQUIRE kfuncs, with the pointers themselves also being readable from maps in an RCU read region thanks to the types being RCU safe. While KF_KPTR_GET was a logical starting point for kptrs, it's become clear that they're not the correct abstraction. KF_KPTR_GET is a flag that essentially does nothing other than enforcing that the argument to a function is a pointer to a referenced kptr map value. At first glance, that's a useful thing to guarantee to a kfunc. It gives kfuncs the ability to try and acquire a reference on that kptr without requiring the BPF prog to do something like this: struct kptr_type *in_map, *new = NULL; in_map = bpf_kptr_xchg(&map->value, NULL); if (in_map) { new = bpf_kptr_type_acquire(in_map); in_map = bpf_kptr_xchg(&map->value, in_map); if (in_map) bpf_kptr_type_release(in_map); } That's clearly a pretty ugly (and racy) UX, and if using KF_KPTR_GET is the only alternative, it's better than nothing. However, the problem with any KF_KPTR_GET kfunc lies in the fact that it always requires some kind of synchronization in order to safely do an opportunistic acquire of the kptr in the map. This is because a BPF program running on another CPU could do a bpf_kptr_xchg() on that map value, and free the kptr after it's been read by the KF_KPTR_GET kfunc. For example, the now-removed bpf_task_kptr_get() kfunc did the following: struct task_struct *bpf_task_kptr_get(struct task_struct **pp) { struct task_struct *p; rcu_read_lock(); p = READ_ONCE(*pp); /* If p is non-NULL, it could still be freed by another CPU, * so we have to do an opportunistic refcount_inc_not_zero() * and return NULL if the task will be freed after the * current RCU read region. */ |f (p && !refcount_inc_not_zero(&p->rcu_users)) p = NULL; rcu_read_unlock(); return p; } In other words, the kfunc uses RCU to ensure that the task remains valid after it's been peeked from the map. However, this is completely redundant with just defining a KF_RCU kfunc that itself does a refcount_inc_not_zero(), which is exactly what bpf_task_acquire() now does. So, the question of whether KF_KPTR_GET is useful is actually, "Are there any synchronization mechanisms / safety flags that are required by certain kptrs, but which are not provided by the verifier to kfuncs?" The answer to that question today is "No", because every kptr we currently care about is RCU protected. Even if the answer ever became "yes", the proper way to support that referenced kptr type would be to add support for whatever synchronization mechanism it requires in the verifier, rather than giving kfuncs a flag that says, "Here's a pointer to a referenced kptr in a map, do whatever you need to do." With all that said -- so as to allow us to consolidate the kfunc API, and simplify the verifier a bit, this patch removes KF_KPTR_GET, and all relevant logic from the verifier. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230416084928.326135-3-void@manifault.com Signed-off-by: Alexei Starovoitov commit 09b501d905217a38f03c0f07d5a66e0b5c8c1644 Author: David Vernet Date: Sun Apr 16 03:49:26 2023 -0500 bpf: Remove bpf_kfunc_call_test_kptr_get() test kfunc We've managed to improve the UX for kptrs significantly over the last 9 months. All of the prior main use cases, struct bpf_cpumask *, struct task_struct *, and struct cgroup *, have all been updated to be synchronized mainly using RCU. In other words, their KF_ACQUIRE kfunc calls are all KF_RCU, and the pointers themselves are MEM_RCU and can be accessed in an RCU read region in BPF. In a follow-on change, we'll be removing the KF_KPTR_GET kfunc flag. This patch prepares for that by removing the bpf_kfunc_call_test_kptr_get() kfunc, and all associated selftests. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230416084928.326135-2-void@manifault.com Signed-off-by: Alexei Starovoitov commit 8c8fa605f7b8b6df3e6fb280a74cff8d7374a7b7 Author: Gregory Price Date: Fri Apr 7 13:18:34 2023 -0400 selftest, ptrace: Add selftest for syscall user dispatch config api Validate that the following new ptrace requests work as expected * PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG returns the contents of task->syscall_dispatch * PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG sets the contents of task->syscall_dispatch Signed-off-by: Gregory Price Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230407171834.3558-5-gregory.price@memverge.com commit 3f67987cdc09778e75098f9f5168832f8f8e1f1c Author: Gregory Price Date: Fri Apr 7 13:18:33 2023 -0400 ptrace: Provide set/get interface for syscall user dispatch The syscall user dispatch configuration can only be set by the task itself, but lacks a ptrace set/get interface which makes it impossible to implement checkpoint/restore for it. Add the required ptrace requests and the get/set functions in the syscall user dispatch code to make that possible. Signed-off-by: Gregory Price Signed-off-by: Thomas Gleixner Reviewed-by: Oleg Nesterov Link: https://lore.kernel.org/r/20230407171834.3558-4-gregory.price@memverge.com commit 463b7715e7ce367fce89769c5d85e31595715ee1 Author: Gregory Price Date: Fri Apr 7 13:18:32 2023 -0400 syscall_user_dispatch: Untag selector address before access_ok() To support checkpoint/restart, ptrace must be able to set the selector of the tracee. The selector is a user pointer that may be subject to memory tagging extensions on some architectures (namely ARM MTE). access_ok() clears memory tags for tagged addresses if the current task has memory tagging enabled. This obviously fails when ptrace modifies the selector of a tracee when tracer and tracee do not have the same memory tagging enabled state. Solve this by untagging the selector address before handing it to access_ok(), like other ptrace functions which modify tracee pointers do. Obviously a tracer can set an invalid selector address for the tracee, but that's independent of tagging and a general capability of the tracer. Suggested-by: Catalin Marinas Signed-off-by: Gregory Price Signed-off-by: Thomas Gleixner Reviewed-by: Catalin Marinas Acked-by: Oleg Nesterov Link: https://lore.kernel.org/all/ZCWXE04nLZ4pXEtM@arm.com/ Link: https://lore.kernel.org/r/20230407171834.3558-3-gregory.price@memverge.com commit 43360686328b1f4b7d9dcc883ee9243ad7c16fae Author: Gregory Price Date: Fri Apr 7 13:18:31 2023 -0400 syscall_user_dispatch: Split up set_syscall_user_dispatch() syscall user dispatch configuration is not covered by checkpoint/restore. To prepare for ptrace access to the syscall user dispatch configuration, move the inner working of set_syscall_user_dispatch() into a helper function. Make the helper function task pointer based and let set_syscall_user_dispatch() invoke it with task=current. No functional change. Signed-off-by: Gregory Price Signed-off-by: Thomas Gleixner Reviewed-by: Oleg Nesterov Link: https://lore.kernel.org/r/20230407171834.3558-2-gregory.price@memverge.com commit bd4ba605c4a92b46ab414626a4f969a19103f97a Author: Avihai Horon Date: Mon Apr 10 16:07:53 2023 +0300 RDMA/mlx5: Allow relaxed ordering read in VFs and VMs According to PCIe spec, Enable Relaxed Ordering value in the VF's PCI config space is wired to 0 and PF relaxed ordering (RO) setting should be applied to the VF. In QEMU (and maybe others), when assigning VFs, the RO bit in PCI config space is not emulated properly and is always set to 0. Therefore, pcie_relaxed_ordering_enabled() always returns 0 for VFs and VMs and thus MKeys can't be created with RO read even if the PF supports it. pcie_relaxed_ordering_enabled() check was added to avoid a syndrome when creating a MKey with relaxed ordering (RO) enabled when the driver's relaxed_ordering_read_pci_enabled HCA capability is out of sync with FW. With the new relaxed_ordering_read capability this can't happen, as it's set regardless of RO value in PCI config space and thus can't change during runtime. Hence, to allow RO read in VFs and VMs, use the new HCA capability relaxed_ordering_read without checking pcie_relaxed_ordering_enabled(). The old capability checks are kept for backward compatibility with older FWs. Allowing RO in VFs and VMs is valuable since it can greatly improve performance on some setups. For example, testing throughput of a VF on an AMD EPYC 7763 and ConnectX-6 Dx setup showed roughly 60% performance improvement. Signed-off-by: Avihai Horon Reviewed-by: Shay Drory Reviewed-by: Aya Levin Link: https://lore.kernel.org/r/e7048640d66c341a8fa0465e099926e7989184bc.1681131553.git.leon@kernel.org Reviewed-by: Jacob Keller Signed-off-by: Leon Romanovsky commit ccbbfe0682f2fff1e157413c30092dd27c50e20e Author: Avihai Horon Date: Mon Apr 10 16:07:52 2023 +0300 net/mlx5: Update relaxed ordering read HCA capabilities Rename existing HCA capability relaxed_ordering_read to relaxed_ordering_read_pci_enabled. This is in accordance with recent PRM change to better describe the capability, as it's set only if both the device supports relaxed ordering (RO) read and RO is enabled in PCI config space. In addition, add new HCA capability relaxed_ordering_read which is set if the device supports RO read, regardless of RO in PCI config space. This will be used in the following patch to allow RO in VFs and VMs. Signed-off-by: Avihai Horon Reviewed-by: Shay Drory Link: https://lore.kernel.org/r/caa0002fd8135086357dfcc368e2f5cc73b08480.1681131553.git.leon@kernel.org Reviewed-by: Jacob Keller Signed-off-by: Leon Romanovsky commit d43b020b0f82c088ef8ff3196ef00575a97d200e Author: Avihai Horon Date: Mon Apr 10 16:07:51 2023 +0300 RDMA/mlx5: Check pcie_relaxed_ordering_enabled() in UMR relaxed_ordering_read HCA capability is set if both the device supports relaxed ordering (RO) read and RO is set in PCI config space. RO in PCI config space can change during runtime. This will change the value of relaxed_ordering_read HCA capability in FW, but the driver will not see it since it queries the capabilities only once. This can lead to the following scenario: 1. RO in PCI config space is enabled. 2. User creates MKey without RO. 3. RO in PCI config space is disabled. As a result, relaxed_ordering_read HCA capability is turned off in FW but remains on in driver copy of the capabilities. 4. User requests to reconfig the MKey with RO via UMR. 5. Driver will try to reconfig the MKey with RO read although it shouldn't (as relaxed_ordering_read HCA capability is really off). To fix this, check pcie_relaxed_ordering_enabled() before setting RO read in UMR. Fixes: 896ec9735336 ("RDMA/mlx5: Set mkey relaxed ordering by UMR with ConnectX-7") Signed-off-by: Avihai Horon Reviewed-by: Shay Drory Link: https://lore.kernel.org/r/8d39eb8317e7bed1a354311a20ae707788fd94ed.1681131553.git.leon@kernel.org Reviewed-by: Jacob Keller Signed-off-by: Leon Romanovsky commit ed4b0661cce119870edb1994fd06c9cbc1dc05c3 Author: Avihai Horon Date: Mon Apr 10 16:07:50 2023 +0300 RDMA/mlx5: Remove pcie_relaxed_ordering_enabled() check for RO write pcie_relaxed_ordering_enabled() check was added to avoid a syndrome when creating a MKey with relaxed ordering (RO) enabled when the driver's relaxed_ordering_{read,write} HCA capabilities are out of sync with FW. While this can happen with relaxed_ordering_read, it can't happen with relaxed_ordering_write as it's set if the device supports RO write, regardless of RO in PCI config space, and thus can't change during runtime. Therefore, drop the pcie_relaxed_ordering_enabled() check for relaxed_ordering_write while keeping it for relaxed_ordering_read. Doing so will also allow the usage of RO write in VFs and VMs (where RO in PCI config space is not reported/emulated properly). Signed-off-by: Avihai Horon Reviewed-by: Shay Drory Link: https://lore.kernel.org/r/7e8f55e31572c1702d69cae015a395d3a824a38a.1681131553.git.leon@kernel.org Reviewed-by: Jacob Keller Signed-off-by: Leon Romanovsky commit 8d7c7c0eeb74281c846ef9231ce20536c79a99b4 Author: Jason Gunthorpe Date: Fri Apr 14 10:58:29 2023 -0300 RDMA: Add ib_virt_dma_to_page() Make it clearer what is going on by adding a function to go back from the "virtual" dma_addr to a kva and another to a struct page. This is used in the ib_uses_virt_dma() style drivers (siw, rxe, hfi, qib). Call them instead of a naked casting and virt_to_page() when working with dma_addr values encoded by the various ib_map functions. This also fixes the virt_to_page() casting problem Linus Walleij has been chasing. Cc: Linus Walleij Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/0-v2-05ea785520ed+10-ib_virt_page_jgg@nvidia.com Signed-off-by: Leon Romanovsky commit b2b1ddc457458fecd1c6f385baa9fbda5f0c63ad Author: Zhu Yanjun Date: Thu Apr 13 18:11:15 2023 +0800 RDMA/rxe: Fix the error "trying to register non-static key in rxe_cleanup_task" In the function rxe_create_qp(), rxe_qp_from_init() is called to initialize qp, internally things like rxe_init_task are not setup until rxe_qp_init_req(). If an error occurred before this point then the unwind will call rxe_cleanup() and eventually to rxe_qp_do_cleanup()/rxe_cleanup_task() which will oops when trying to access the uninitialized spinlock. If rxe_init_task is not executed, rxe_cleanup_task will not be called. Reported-by: syzbot+cfcc1a3c85be15a40cba@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=fd85757b74b3eb59f904138486f755f71e090df8 Fixes: 8700e3e7c485 ("Soft RoCE driver") Fixes: 2d4b21e0a291 ("IB/rxe: Prevent from completer to operate on non valid QP") Signed-off-by: Zhu Yanjun Link: https://lore.kernel.org/r/20230413101115.1366068-1-yanjun.zhu@intel.com Signed-off-by: Leon Romanovsky commit e797203fb3ba8c0ed2f4a8800d626c9d54fedfbf Author: Dmitry Vyukov Date: Thu Mar 16 13:30:28 2023 +0100 selftests/timers/posix_timers: Test delivery of signals across threads Test that POSIX timers using CLOCK_PROCESS_CPUTIME_ID eventually deliver a signal to all running threads. This effectively tests that the kernel doesn't prefer any one thread (or subset of threads) for signal delivery. Signed-off-by: Dmitry Vyukov Signed-off-by: Marco Elver Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230316123028.2890338-2-elver@google.com commit bcb7ee79029dcaeb09668a4d1489de256829a7cc Author: Dmitry Vyukov Date: Thu Mar 16 13:30:27 2023 +0100 posix-timers: Prefer delivery of signals to the current thread POSIX timers using the CLOCK_PROCESS_CPUTIME_ID clock prefer the main thread of a thread group for signal delivery. However, this has a significant downside: it requires waking up a potentially idle thread. Instead, prefer to deliver signals to the current thread (in the same thread group) if SIGEV_THREAD_ID is not set by the user. This does not change guaranteed semantics, since POSIX process CPU time timers have never guaranteed that signal delivery is to a specific thread (without SIGEV_THREAD_ID set). The effect is that queueing the signal no longer wakes up potentially idle threads, and the kernel is no longer biased towards delivering the timer signal to any particular thread (which better distributes the timer signals esp. when multiple timers fire concurrently). Suggested-by: Oleg Nesterov Signed-off-by: Dmitry Vyukov Signed-off-by: Marco Elver Signed-off-by: Thomas Gleixner Reviewed-by: Oleg Nesterov Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230316123028.2890338-1-elver@google.com commit 20af6be6bee4c3af80aac9b44b3d32d89824dde7 Author: Jacopo Mondi Date: Tue Feb 14 17:35:39 2023 +0000 media: nxp: imx8-isi: Remove 300ms sleep after enabling channel The current implementation of the mxc_isi_channel_enable() function has a hard 300ms sleep. This was copied from the NXP BSP, which has since dropped the sleep in a commit that implied the delay was meant to wait for the sensor to be "stable". As the sensor is started after the ISI, the delay won't affect sensor operation. Drop it. Signed-off-by: Jacopo Mondi Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 2bab9442b85665c1f52062dca6a5623dffc18272 Author: Laurent Pinchart Date: Fri Apr 7 05:25:28 2023 +0100 media: nxp: imx8-isi: Replace udelay() with fsleep() The ISI driver uses udelay() to wait for 300µs in a context where it can sleep. Use fsleep() instead. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 605b57c4e888ca5189e87b9db62772eb3ff23735 Author: Laurent Pinchart Date: Fri Apr 7 05:25:28 2023 +0100 media: nxp: imx8-isi: Drop partial support for i.MX8QM and i.MX8QXP Support for the i.MX8QM and i.MX8QXP is only partly implemented and has never been tested. Furthermore, the corresponding compatible string it not documented. Drop it, until someone with interest in those platforms can test and implement it properly. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit cf21f328fcafacf4f96e7a30ef9dceede1076378 Author: Laurent Pinchart Date: Mon Jan 21 02:58:49 2019 +0000 media: nxp: Add i.MX8 ISI driver The Image Sensing Interface (ISI) combines image processing pipelines with DMA engines to process and capture frames originating from a variety of sources. The inputs to the ISI go through Pixel Link interfaces, and their number and nature is SoC-dependent. They cover both capture interfaces (MIPI CSI-2 RX, HDMI RX) and memory inputs. Signed-off-by: Christian Hemp Signed-off-by: Dong Aisheng Signed-off-by: Guoniu Zhou Signed-off-by: Jacopo Mondi Signed-off-by: Laurent Pinchart Signed-off-by: Stefan Riedmueller Tested-by: Adam Ford #imx8mn-beacon Signed-off-by: Mauro Carvalho Chehab commit 8b0977ecc8b30a30966e76fcb64cef5041626b02 Author: Michael Kelley Date: Thu Apr 13 10:57:37 2023 -0700 swiotlb: track and report io_tlb_used high water marks in debugfs swiotlb currently reports the total number of slabs and the instantaneous in-use slabs in debugfs. But with increased usage of swiotlb for all I/O in Confidential Computing (coco) VMs, it has become difficult to know how much memory to allocate for swiotlb bounce buffers, either via the automatic algorithm in the kernel or by specifying a value on the kernel boot line. The current automatic algorithm generously allocates swiotlb bounce buffer memory, and may be wasting significant memory in many use cases. To support better understanding of swiotlb usage, add tracking of the the high water mark for usage of the default swiotlb bounce buffer memory pool and any reserved memory pools. Report these high water marks in debugfs along with the other swiotlb pool metrics. Allow the high water marks to be reset to zero at runtime by writing to them. Signed-off-by: Michael Kelley Signed-off-by: Christoph Hellwig commit 5499d01c029069044a3b3e50501c77b474c96178 Author: Michael Kelley Date: Thu Apr 13 08:37:30 2023 -0700 swiotlb: fix debugfs reporting of reserved memory pools For io_tlb_nslabs, the debugfs code reports the correct value for a specific reserved memory pool. But for io_tlb_used, the value reported is always for the default pool, not the specific reserved pool. Fix this. Fixes: 5c850d31880e ("swiotlb: fix passing local variable to debugfs_create_ulong()") Signed-off-by: Michael Kelley Signed-off-by: Christoph Hellwig commit a90922fa25370902322e9de6640e58737d459a50 Author: Doug Berger Date: Fri Apr 14 14:29:25 2023 -0700 swiotlb: relocate PageHighMem test away from rmem_swiotlb_setup The reservedmem_of_init_fn's are invoked very early at boot before the memory zones have even been defined. This makes it inappropriate to test whether the page corresponding to a PFN is in ZONE_HIGHMEM from within one. Removing the check allows an ARM 32-bit kernel with SPARSEMEM enabled to boot properly since otherwise we would be de-referencing an uninitialized sparsemem map to perform pfn_to_page() check. The arm64 architecture happens to work (and also has no high memory) but other 32-bit architectures could also be having similar issues. While it would be nice to provide early feedback about a reserved DMA pool residing in highmem, it is not possible to do that until the first time we try to use it, which is where the check is moved to. Fixes: 0b84e4f8b793 ("swiotlb: Add restricted DMA pool initialization") Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli Signed-off-by: Christoph Hellwig commit 7a0788fe835f98391b8fcb03e3cd29c1296b3280 Merge: 4a1e885c6d143 6147f15131e2d Author: Alexei Starovoitov Date: Sat Apr 15 17:36:50 2023 -0700 Merge branch 'Shared ownership for local kptrs' Dave Marchevsky says: ==================== This series adds support for refcounted local kptrs to the verifier. A local kptr is 'refcounted' if its type contains a struct bpf_refcount field: struct refcounted_node { long data; struct bpf_list_node ll; struct bpf_refcount ref; }; bpf_refcount is used to implement shared ownership for local kptrs. Motivating usecase ================== If a struct has two collection node fields, e.g.: struct node { long key; long val; struct bpf_rb_node rb; struct bpf_list_node ll; }; It's not currently possible to add a node to both the list and rbtree: long bpf_prog(void *ctx) { struct node *n = bpf_obj_new(typeof(*n)); if (!n) { /* ... */ } bpf_spin_lock(&lock); bpf_list_push_back(&head, &n->ll); bpf_rbtree_add(&root, &n->rb, less); /* Assume a resonable less() */ bpf_spin_unlock(&lock); } The above program will fail verification due to current owning / non-owning ref logic: after bpf_list_push_back, n is a non-owning reference and thus cannot be passed to bpf_rbtree_add. The only way to get an owning reference for the node that was added is to bpf_list_pop_{front,back} it. More generally, verifier ownership semantics expect that a node has one owner (program, collection, or stashed in map) with exclusive ownership of the node's lifetime. The owner free's the node's underlying memory when it itself goes away. Without a shared ownership concept it's impossible to express many real-world usecases such that they pass verification. Semantic Changes ================ Before this series, the verifier could make this statement: "whoever has the owning reference has exclusive ownership of the referent's lifetime". As demonstrated in the previous section, this implies that a BPF program can't have an owning reference to some node if that node is in a collection. If such a state were possible, the node would have multiple owners, each thinking they have exclusive ownership. In order to support shared ownership it's necessary to modify the exclusive ownership semantic. After this series' changes, an owning reference has ownership of the referent's lifetime, but it's not necessarily exclusive. The referent's underlying memory is guaranteed to be valid (i.e. not free'd) until the reference is dropped or used for collection insert. This change doesn't affect UX of owning or non-owning references much: * insert kfuncs (bpf_rbtree_add, bpf_list_push_{front,back}) still require an owning reference arg, as ownership still must be passed to the collection in a shared-ownership world. * non-owning references still refer to valid memory without claiming any ownership. One important conclusion that followed from "exclusive ownership" statement is no longer valid, though. In exclusive-ownership world, if a BPF prog has an owning reference to a node, the verifier can conclude that no collection has ownership of it. This conclusion was used to avoid runtime checking in the implementations of insert and remove operations (""has the node already been {inserted, removed}?"). In a shared-ownership world the aforementioned conclusion is no longer valid, which necessitates doing runtime checking in insert and remove operation kfuncs, and those functions possibly failing to insert or remove anything. Luckily the verifier changes necessary to go from exclusive to shared ownership were fairly minimal. Patches in this series which do change verifier semantics generally have some summary dedicated to explaining why certain usecases Just Work for shared ownership without verifier changes. Implementation ============== The changes in this series can be categorized as follows: * struct bpf_refcount opaque field + plumbing * support for refcounted kptrs in bpf_obj_new and bpf_obj_drop * bpf_refcount_acquire kfunc * enables shared ownershp by bumping refcount + acquiring owning ref * support for possibly-failing collection insertion and removal * insertion changes are more complex If a patch's changes have some nuance to their effect - or lack of effect - on verifier behavior, the patch summary talks about it at length. Patch contents: * Patch 1 removes btf_field_offs struct * Patch 2 adds struct bpf_refcount and associated plumbing * Patch 3 modifies semantics of bpf_obj_drop and bpf_obj_new to handle refcounted kptrs * Patch 4 adds bpf_refcount_acquire * Patches 5-7 add support for possibly-failing collection insert and remove * Patch 8 centralizes constructor-like functionality for local kptr types * Patch 9 adds tests for new functionality base-commit: 4a1e885c6d143ff1b557ec7f3fc6ddf39c51502f Changelog: v1 -> v2: lore.kernel.org/bpf/20230410190753.2012798-1-davemarchevsky@fb.com Patch #s used below refer to the patch's position in v1 unless otherwise specified. * General * Rebase onto latest bpf-next (base-commit updated above) * Patch 4 - "bpf: Add bpf_refcount_acquire kfunc" * Fix typo in summary (Alexei) * Patch 7 - "Migrate bpf_rbtree_remove to possibly fail" * Modify a paragraph in patch summary to more clearly state that only bpf_rbtree_remove's non-owning ref clobbering behavior is changed by the patch (Alexei) * refcount_off == -1 -> refcount_off < 0 in "node type w/ both list and rb_node fields" check, since any negative value means "no bpf_refcount field found", and furthermore refcount_off is never explicitly set to -1, but rather -EINVAL. (Alexei) * Instead of just changing "btf: list_node and rb_node in same struct" test expectation to pass instead of fail, do some refactoring to test both "list_node, rb_node, and bpf_refcount" (success) and "list_node, rb_node, _no_ bpf_refcount" (failure) cases. This ensures that logic change in previous bullet point is correct. * v1's "btf: list_node and rb_node in same struct" test changes didn't add bpf_refcount, so the fact that btf load succeeded w/ list and rb_nodes but no bpf_refcount field is further proof that this logic was incorrect in v1. * Patch 8 - "bpf: Centralize btf_field-specific initialization logic" * Instead of doing __init_field_infer_size in kfuncs when taking bpf_list_head type input which might've been 0-initialized in map, go back to simple oneliner initialization. Add short comment explaining why this is necessary. (Alexei) * Patch 9 - "selftests/bpf: Add refcounted_kptr tests" * Don't __always_inline helper fns in progs/refcounted_kptr.c (Alexei) ==================== Signed-off-by: Alexei Starovoitov commit 6147f15131e2df544a5449815f456da48c0c88e7 Author: Dave Marchevsky Date: Sat Apr 15 13:18:11 2023 -0700 selftests/bpf: Add refcounted_kptr tests Test refcounted local kptr functionality added in previous patches in the series. Usecases which pass verification: * Add refcounted local kptr to both tree and list. Then, read and - possibly, depending on test variant - delete from tree, then list. * Also test doing read-and-maybe-delete in opposite order * Stash a refcounted local kptr in a map_value, then add it to a rbtree. Read from both, possibly deleting after tree read. * Add refcounted local kptr to both tree and list. Then, try reading and deleting twice from one of the collections. * bpf_refcount_acquire of just-added non-owning ref should work, as should bpf_refcount_acquire of owning ref just out of bpf_obj_new Usecases which fail verification: * The simple successful bpf_refcount_acquire cases from above should both fail to verify if the newly-acquired owning ref is not dropped Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230415201811.343116-10-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 3e81740a90626024a9d9c6f9bfa3d36204dafefb Author: Dave Marchevsky Date: Sat Apr 15 13:18:10 2023 -0700 bpf: Centralize btf_field-specific initialization logic All btf_fields in an object are 0-initialized by memset in bpf_obj_init. This might not be a valid initial state for some field types, in which case kfuncs that use the type will properly initialize their input if it's been 0-initialized. Some BPF graph collection types and kfuncs do this: bpf_list_{head,node} and bpf_rb_node. An earlier patch in this series added the bpf_refcount field, for which the 0 state indicates that the refcounted object should be free'd. bpf_obj_init treats this field specially, setting refcount to 1 instead of relying on scattered "refcount is 0? Must have just been initialized, let's set to 1" logic in kfuncs. This patch extends this treatment to list and rbtree field types, allowing most scattered initialization logic in kfuncs to be removed. Note that bpf_{list_head,rb_root} may be inside a BPF map, in which case they'll be 0-initialized without passing through the newly-added logic, so scattered initialization logic must remain for these collection root types. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230415201811.343116-9-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 404ad75a36fb1a1008e9fe803aa7d0212df9e240 Author: Dave Marchevsky Date: Sat Apr 15 13:18:09 2023 -0700 bpf: Migrate bpf_rbtree_remove to possibly fail This patch modifies bpf_rbtree_remove to account for possible failure due to the input rb_node already not being in any collection. The function can now return NULL, and does when the aforementioned scenario occurs. As before, on successful removal an owning reference to the removed node is returned. Adding KF_RET_NULL to bpf_rbtree_remove's kfunc flags - now KF_RET_NULL | KF_ACQUIRE - provides the desired verifier semantics: * retval must be checked for NULL before use * if NULL, retval's ref_obj_id is released * retval is a "maybe acquired" owning ref, not a non-owning ref, so it will live past end of critical section (bpf_spin_unlock), and thus can be checked for NULL after the end of the CS BPF programs must add checks ============================ This does change bpf_rbtree_remove's verifier behavior. BPF program writers will need to add NULL checks to their programs, but the resulting UX looks natural: bpf_spin_lock(&glock); n = bpf_rbtree_first(&ghead); if (!n) { /* ... */} res = bpf_rbtree_remove(&ghead, &n->node); bpf_spin_unlock(&glock); if (!res) /* Newly-added check after this patch */ return 1; n = container_of(res, /* ... */); /* Do something else with n */ bpf_obj_drop(n); return 0; The "if (!res)" check above is the only addition necessary for the above program to pass verification after this patch. bpf_rbtree_remove no longer clobbers non-owning refs ==================================================== An issue arises when bpf_rbtree_remove fails, though. Consider this example: struct node_data { long key; struct bpf_list_node l; struct bpf_rb_node r; struct bpf_refcount ref; }; long failed_sum; void bpf_prog() { struct node_data *n = bpf_obj_new(/* ... */); struct bpf_rb_node *res; n->key = 10; bpf_spin_lock(&glock); bpf_list_push_back(&some_list, &n->l); /* n is now a non-owning ref */ res = bpf_rbtree_remove(&some_tree, &n->r, /* ... */); if (!res) failed_sum += n->key; /* not possible */ bpf_spin_unlock(&glock); /* if (res) { do something useful and drop } ... */ } The bpf_rbtree_remove in this example will always fail. Similarly to bpf_spin_unlock, bpf_rbtree_remove is a non-owning reference invalidation point. The verifier clobbers all non-owning refs after a bpf_rbtree_remove call, so the "failed_sum += n->key" line will fail verification, and in fact there's no good way to get information about the node which failed to add after the invalidation. This patch removes non-owning reference invalidation from bpf_rbtree_remove to allow the above usecase to pass verification. The logic for why this is now possible is as follows: Before this series, bpf_rbtree_add couldn't fail and thus assumed that its input, a non-owning reference, was in the tree. But it's easy to construct an example where two non-owning references pointing to the same underlying memory are acquired and passed to rbtree_remove one after another (see rbtree_api_release_aliasing in selftests/bpf/progs/rbtree_fail.c). So it was necessary to clobber non-owning refs to prevent this case and, more generally, to enforce "non-owning ref is definitely in some collection" invariant. This series removes that invariant and the failure / runtime checking added in this patch provide a clean way to deal with the aliasing issue - just fail to remove. Because the aliasing issue prevented by clobbering non-owning refs is no longer an issue, this patch removes the invalidate_non_owning_refs call from verifier handling of bpf_rbtree_remove. Note that bpf_spin_unlock - the other caller of invalidate_non_owning_refs - clobbers non-owning refs for a different reason, so its clobbering behavior remains unchanged. No BPF program changes are necessary for programs to remain valid as a result of this clobbering change. A valid program before this patch passed verification with its non-owning refs having shorter (or equal) lifetimes due to more aggressive clobbering. Also, update existing tests to check bpf_rbtree_remove retval for NULL where necessary, and move rbtree_api_release_aliasing from progs/rbtree_fail.c to progs/rbtree.c since it's now expected to pass verification. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230415201811.343116-8-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit de67ba3968fa1455e8020b21e5ccc2bb48b9a852 Author: Dave Marchevsky Date: Sat Apr 15 13:18:08 2023 -0700 selftests/bpf: Modify linked_list tests to work with macro-ified inserts The linked_list tests use macros and function pointers to reduce code duplication. Earlier in the series, bpf_list_push_{front,back} were modified to be macros, expanding to invoke actual kfuncs bpf_list_push_{front,back}_impl. Due to this change, a code snippet like: void (*p)(void *, void *) = (void *)&bpf_list_##op; p(hexpr, nexpr); meant to do bpf_list_push_{front,back}(hexpr, nexpr), will no longer work as it's no longer valid to do &bpf_list_push_{front,back} since they're no longer functions. This patch fixes issues of this type, along with two other minor changes - one improvement and one fix - both related to the node argument to list_push_{front,back}. * The fix: migration of list_push tests away from (void *, void *) func ptr uncovered that some tests were incorrectly passing pointer to node, not pointer to struct bpf_list_node within the node. This patch fixes such issues (CHECK(..., f) -> CHECK(..., &f->node)) * The improvement: In linked_list tests, the struct foo type has two list_node fields: node and node2, at byte offsets 0 and 40 within the struct, respectively. Currently node is used in ~all tests involving struct foo and lists. The verifier needs to do some work to account for the offset of bpf_list_node within the node type, so using node2 instead of node exercises that logic more in the tests. This patch migrates linked_list tests to use node2 instead of node. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230415201811.343116-7-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit d2dcc67df910dd85253a701b6a5b747f955d28f5 Author: Dave Marchevsky Date: Sat Apr 15 13:18:07 2023 -0700 bpf: Migrate bpf_rbtree_add and bpf_list_push_{front,back} to possibly fail Consider this code snippet: struct node { long key; bpf_list_node l; bpf_rb_node r; bpf_refcount ref; } int some_bpf_prog(void *ctx) { struct node *n = bpf_obj_new(/*...*/), *m; bpf_spin_lock(&glock); bpf_rbtree_add(&some_tree, &n->r, /* ... */); m = bpf_refcount_acquire(n); bpf_rbtree_add(&other_tree, &m->r, /* ... */); bpf_spin_unlock(&glock); /* ... */ } After bpf_refcount_acquire, n and m point to the same underlying memory, and that node's bpf_rb_node field is being used by the some_tree insert, so overwriting it as a result of the second insert is an error. In order to properly support refcounted nodes, the rbtree and list insert functions must be allowed to fail. This patch adds such support. The kfuncs bpf_rbtree_add, bpf_list_push_{front,back} are modified to return an int indicating success/failure, with 0 -> success, nonzero -> failure. bpf_obj_drop on failure ======================= Currently the only reason an insert can fail is the example above: the bpf_{list,rb}_node is already in use. When such a failure occurs, the insert kfuncs will bpf_obj_drop the input node. This allows the insert operations to logically fail without changing their verifier owning ref behavior, namely the unconditional release_reference of the input owning ref. With insert that always succeeds, ownership of the node is always passed to the collection, since the node always ends up in the collection. With a possibly-failed insert w/ bpf_obj_drop, ownership of the node is always passed either to the collection (success), or to bpf_obj_drop (failure). Regardless, it's correct to continue unconditionally releasing the input owning ref, as something is always taking ownership from the calling program on insert. Keeping owning ref behavior unchanged results in a nice default UX for insert functions that can fail. If the program's reaction to a failed insert is "fine, just get rid of this owning ref for me and let me go on with my business", then there's no reason to check for failure since that's default behavior. e.g.: long important_failures = 0; int some_bpf_prog(void *ctx) { struct node *n, *m, *o; /* all bpf_obj_new'd */ bpf_spin_lock(&glock); bpf_rbtree_add(&some_tree, &n->node, /* ... */); bpf_rbtree_add(&some_tree, &m->node, /* ... */); if (bpf_rbtree_add(&some_tree, &o->node, /* ... */)) { important_failures++; } bpf_spin_unlock(&glock); } If we instead chose to pass ownership back to the program on failed insert - by returning NULL on success or an owning ref on failure - programs would always have to do something with the returned ref on failure. The most likely action is probably "I'll just get rid of this owning ref and go about my business", which ideally would look like: if (n = bpf_rbtree_add(&some_tree, &n->node, /* ... */)) bpf_obj_drop(n); But bpf_obj_drop isn't allowed in a critical section and inserts must occur within one, so in reality error handling would become a hard-to-parse mess. For refcounted nodes, we can replicate the "pass ownership back to program on failure" logic with this patch's semantics, albeit in an ugly way: struct node *n = bpf_obj_new(/* ... */), *m; bpf_spin_lock(&glock); m = bpf_refcount_acquire(n); if (bpf_rbtree_add(&some_tree, &n->node, /* ... */)) { /* Do something with m */ } bpf_spin_unlock(&glock); bpf_obj_drop(m); bpf_refcount_acquire is used to simulate "return owning ref on failure". This should be an uncommon occurrence, though. Addition of two verifier-fixup'd args to collection inserts =========================================================== The actual bpf_obj_drop kfunc is bpf_obj_drop_impl(void *, struct btf_struct_meta *), with bpf_obj_drop macro populating the second arg with 0 and the verifier later filling in the arg during insn fixup. Because bpf_rbtree_add and bpf_list_push_{front,back} now might do bpf_obj_drop, these kfuncs need a btf_struct_meta parameter that can be passed to bpf_obj_drop_impl. Similarly, because the 'node' param to those insert functions is the bpf_{list,rb}_node within the node type, and bpf_obj_drop expects a pointer to the beginning of the node, the insert functions need to be able to find the beginning of the node struct. A second verifier-populated param is necessary: the offset of {list,rb}_node within the node type. These two new params allow the insert kfuncs to correctly call __bpf_obj_drop_impl: beginning_of_node = bpf_rb_node_ptr - offset if (already_inserted) __bpf_obj_drop_impl(beginning_of_node, btf_struct_meta->record); Similarly to other kfuncs with "hidden" verifier-populated params, the insert functions are renamed with _impl prefix and a macro is provided for common usage. For example, bpf_rbtree_add kfunc is now bpf_rbtree_add_impl and bpf_rbtree_add is now a macro which sets "hidden" args to 0. Due to the two new args BPF progs will need to be recompiled to work with the new _impl kfuncs. This patch also rewrites the "hidden argument" explanation to more directly say why the BPF program writer doesn't need to populate the arguments with anything meaningful. How does this new logic affect non-owning references? ===================================================== Currently, non-owning refs are valid until the end of the critical section in which they're created. We can make this guarantee because, if a non-owning ref exists, the referent was added to some collection. The collection will drop() its nodes when it goes away, but it can't go away while our program is accessing it, so that's not a problem. If the referent is removed from the collection in the same CS that it was added in, it can't be bpf_obj_drop'd until after CS end. Those are the only two ways to free the referent's memory and neither can happen until after the non-owning ref's lifetime ends. On first glance, having these collection insert functions potentially bpf_obj_drop their input seems like it breaks the "can't be bpf_obj_drop'd until after CS end" line of reasoning. But we care about the memory not being _freed_ until end of CS end, and a previous patch in the series modified bpf_obj_drop such that it doesn't free refcounted nodes until refcount == 0. So the statement can be more accurately rewritten as "can't be free'd until after CS end". We can prove that this rewritten statement holds for any non-owning reference produced by collection insert functions: * If the input to the insert function is _not_ refcounted * We have an owning reference to the input, and can conclude it isn't in any collection * Inserting a node in a collection turns owning refs into non-owning, and since our input type isn't refcounted, there's no way to obtain additional owning refs to the same underlying memory * Because our node isn't in any collection, the insert operation cannot fail, so bpf_obj_drop will not execute * If bpf_obj_drop is guaranteed not to execute, there's no risk of memory being free'd * Otherwise, the input to the insert function is refcounted * If the insert operation fails due to the node's list_head or rb_root already being in some collection, there was some previous successful insert which passed refcount to the collection * We have an owning reference to the input, it must have been acquired via bpf_refcount_acquire, which bumped the refcount * refcount must be >= 2 since there's a valid owning reference and the node is already in a collection * Insert triggering bpf_obj_drop will decr refcount to >= 1, never resulting in a free So although we may do bpf_obj_drop during the critical section, this will never result in memory being free'd, and no changes to non-owning ref logic are needed in this patch. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230415201811.343116-6-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 7c50b1cb76aca4540aa917db5f2a302acddcadff Author: Dave Marchevsky Date: Sat Apr 15 13:18:06 2023 -0700 bpf: Add bpf_refcount_acquire kfunc Currently, BPF programs can interact with the lifetime of refcounted local kptrs in the following ways: bpf_obj_new - Initialize refcount to 1 as part of new object creation bpf_obj_drop - Decrement refcount and free object if it's 0 collection add - Pass ownership to the collection. No change to refcount but collection is responsible for bpf_obj_dropping it In order to be able to add a refcounted local kptr to multiple collections we need to be able to increment the refcount and acquire a new owning reference. This patch adds a kfunc, bpf_refcount_acquire, implementing such an operation. bpf_refcount_acquire takes a refcounted local kptr and returns a new owning reference to the same underlying memory as the input. The input can be either owning or non-owning. To reinforce why this is safe, consider the following code snippets: struct node *n = bpf_obj_new(typeof(*n)); // A struct node *m = bpf_refcount_acquire(n); // B In the above snippet, n will be alive with refcount=1 after (A), and since nothing changes that state before (B), it's obviously safe. If n is instead added to some rbtree, we can still safely refcount_acquire it: struct node *n = bpf_obj_new(typeof(*n)); struct node *m; bpf_spin_lock(&glock); bpf_rbtree_add(&groot, &n->node, less); // A m = bpf_refcount_acquire(n); // B bpf_spin_unlock(&glock); In the above snippet, after (A) n is a non-owning reference, and after (B) m is an owning reference pointing to the same memory as n. Although n has no ownership of that memory's lifetime, it's guaranteed to be alive until the end of the critical section, and n would be clobbered if we were past the end of the critical section, so it's safe to bump refcount. Implementation details: * From verifier's perspective, bpf_refcount_acquire handling is similar to bpf_obj_new and bpf_obj_drop. Like the former, it returns a new owning reference matching input type, although like the latter, type can be inferred from concrete kptr input. Verifier changes in {check,fixup}_kfunc_call and check_kfunc_args are largely copied from aforementioned functions' verifier changes. * An exception to the above is the new KF_ARG_PTR_TO_REFCOUNTED_KPTR arg, indicated by new "__refcounted_kptr" kfunc arg suffix. This is necessary in order to handle both owning and non-owning input without adding special-casing to "__alloc" arg handling. Also a convenient place to confirm that input type has bpf_refcount field. * The implemented kfunc is actually bpf_refcount_acquire_impl, with 'hidden' second arg that the verifier sets to the type's struct_meta in fixup_kfunc_call. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230415201811.343116-5-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 1512217c47f0e8ea076dd0e67262e5a668a78f01 Author: Dave Marchevsky Date: Sat Apr 15 13:18:05 2023 -0700 bpf: Support refcounted local kptrs in existing semantics A local kptr is considered 'refcounted' when it is of a type that has a bpf_refcount field. When such a kptr is created, its refcount should be initialized to 1; when destroyed, the object should be free'd only if a refcount decr results in 0 refcount. Existing logic always frees the underlying memory when destroying a local kptr, and 0-initializes all btf_record fields. This patch adds checks for "is local kptr refcounted?" and new logic for that case in the appropriate places. This patch focuses on changing existing semantics and thus conspicuously does _not_ provide a way for BPF programs in increment refcount. That follows later in the series. __bpf_obj_drop_impl is modified to do the right thing when it sees a refcounted type. Container types for graph nodes (list, tree, stashed in map) are migrated to use __bpf_obj_drop_impl as a destructor for their nodes instead of each having custom destruction code in their _free paths. Now that "drop" isn't a synonym for "free" when the type is refcounted it makes sense to centralize this logic. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230415201811.343116-4-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit d54730b50bae1f3119bd686d551d66f0fcc387ca Author: Dave Marchevsky Date: Sat Apr 15 13:18:04 2023 -0700 bpf: Introduce opaque bpf_refcount struct and add btf_record plumbing A 'struct bpf_refcount' is added to the set of opaque uapi/bpf.h types meant for use in BPF programs. Similarly to other opaque types like bpf_spin_lock and bpf_rbtree_node, the verifier needs to know where in user-defined struct types a bpf_refcount can be located, so necessary btf_record plumbing is added to enable this. bpf_refcount is sized to hold a refcount_t. Similarly to bpf_spin_lock, the offset of a bpf_refcount is cached in btf_record as refcount_off in addition to being in the field array. Caching refcount_off makes sense for this field because further patches in the series will modify functions that take local kptrs (e.g. bpf_obj_drop) to change their behavior if the type they're operating on is refcounted. So enabling fast "is this type refcounted?" checks is desirable. No such verifier behavior changes are introduced in this patch, just logic to recognize 'struct bpf_refcount' in btf_record. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230415201811.343116-3-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit cd2a8079014aced27da9b2e669784f31680f1351 Author: Dave Marchevsky Date: Sat Apr 15 13:18:03 2023 -0700 bpf: Remove btf_field_offs, use btf_record's fields instead The btf_field_offs struct contains (offset, size) for btf_record fields, sorted by offset. btf_field_offs is always used in conjunction with btf_record, which has btf_field 'fields' array with (offset, type), the latter of which btf_field_offs' size is derived from via btf_field_type_size. This patch adds a size field to struct btf_field and sorts btf_record's fields by offset, making it possible to get rid of btf_field_offs. Less data duplication and less code complexity results. Since btf_field_offs' lifetime closely followed the btf_record used to populate it, most complexity wins are from removal of initialization code like: if (btf_record_successfully_initialized) { foffs = btf_parse_field_offs(rec); if (IS_ERR_OR_NULL(foffs)) // free the btf_record and return err } Other changes in this patch are pretty mechanical: * foffs->field_off[i] -> rec->fields[i].offset * foffs->field_sz[i] -> rec->fields[i].size * Sort rec->fields in btf_parse_fields before returning * It's possible that this is necessary independently of other changes in this patch. btf_record_find in syscall.c expects btf_record's fields to be sorted by offset, yet there's no explicit sorting of them before this patch, record's fields are populated in the order they're read from BTF struct definition. BTF docs don't say anything about the sortedness of struct fields. * All functions taking struct btf_field_offs * input now instead take struct btf_record *. All callsites of these functions already have access to the correct btf_record. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230415201811.343116-2-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 63a759694eed61025713b3e14dd827c8548daadc Author: Thomas Gleixner Date: Wed Apr 12 09:54:39 2023 +0200 debugobject: Prevent init race with static objects Statically initialized objects are usually not initialized via the init() function of the subsystem. They are special cased and the subsystem provides a function to validate whether an object which is not yet tracked by debugobjects is statically initialized. This means the object is started to be tracked on first use, e.g. activation. This works perfectly fine, unless there are two concurrent operations on that object. Schspa decoded the problem: T0 T1 debug_object_assert_init(addr) lock_hash_bucket() obj = lookup_object(addr); if (!obj) { unlock_hash_bucket(); - > preemption lock_subsytem_object(addr); activate_object(addr) lock_hash_bucket(); obj = lookup_object(addr); if (!obj) { unlock_hash_bucket(); if (is_static_object(addr)) init_and_track(addr); lock_hash_bucket(); obj = lookup_object(addr); obj->state = ACTIVATED; unlock_hash_bucket(); subsys function modifies content of addr, so static object detection does not longer work. unlock_subsytem_object(addr); if (is_static_object(addr)) <- Fails debugobject emits a warning and invokes the fixup function which reinitializes the already active object in the worst case. This race exists forever, but was never observed until mod_timer() got a debug_object_assert_init() added which is outside of the timer base lock held section right at the beginning of the function to cover the lockless early exit points too. Rework the code so that the lookup, the static object check and the tracking object association happens atomically under the hash bucket lock. This prevents the issue completely as all callers are serialized on the hash bucket lock and therefore cannot observe inconsistent state. Fixes: 3ac7fe5a4aab ("infrastructure to debug (dynamic) objects") Reported-by: syzbot+5093ba19745994288b53@syzkaller.appspotmail.com Debugged-by: Schspa Shi Signed-off-by: Thomas Gleixner Reviewed-by: Stephen Boyd Link: https://syzkaller.appspot.com/bug?id=22c8a5938eab640d1c6bcc0e3dc7be519d878462 Link: https://lore.kernel.org/lkml/20230303161906.831686-1-schspa@gmail.com Link: https://lore.kernel.org/r/87zg7dzgao.ffs@tglx commit c899a5d7d0eca054546b63e95c94b1e609516f84 Author: Pavel Begunkov Date: Thu Apr 13 15:28:14 2023 +0100 io_uring/rsrc: refactor io_queue_rsrc_removal We can queue up a rsrc into a list in io_queue_rsrc_removal() while allocating io_rsrc_put and so simplify the function. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/36bd708ee25c0e2e7992dc19b17db166eea9ac40.1681395792.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c87fd583f3b5ef770af33893394ea37c7a10b5b8 Author: Pavel Begunkov Date: Thu Apr 13 15:28:13 2023 +0100 io_uring/rsrc: simplify single file node switching At maximum io_install_fixed_file() removes only one file, so no need to keep needs_switch state and we can call io_rsrc_node_switch() right after removal. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/37cfb46f46160f81dced79f646e97db608994574.1681395792.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 9a57fffedc0ee078418a7793ab29cd3864205340 Author: Pavel Begunkov Date: Thu Apr 13 15:28:12 2023 +0100 io_uring/rsrc: clean up __io_sqe_buffers_update() Inline offset variable, so we don't use it without subjecting it to array_index_nospec() first. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/77936d9ed23755588810c5eafcea7e1c3b90e3cd.1681395792.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 2f2af35f8e5a1ed552ed02e47277d50092a2b9f6 Author: Pavel Begunkov Date: Thu Apr 13 15:28:11 2023 +0100 io_uring/rsrc: inline switch_start fast path Inline the part of io_rsrc_node_switch_start() that checks whether the cache is empty or not, as most of the times it will have some number of entries in there. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9619c1717a0e01f22c5fce2f1ba2735f804da0f2.1681395792.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 0b222eeb6514ba6c3457b667fa4f3645032e1fc9 Author: Pavel Begunkov Date: Thu Apr 13 15:28:10 2023 +0100 io_uring/rsrc: remove rsrc_data refs Instead of waiting for rsrc_data->refs to be downed to zero, check whether there are rsrc nodes queued for completion, that's easier then maintaining references. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8e33fd143d83e11af3e386aea28eb6d6c6a1be10.1681395792.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 7d481e0356334eb2de254414769b4bed4b2a8827 Author: Pavel Begunkov Date: Thu Apr 13 15:28:09 2023 +0100 io_uring/rsrc: fix DEFER_TASKRUN rsrc quiesce For io_rsrc_ref_quiesce() to progress it should execute all task_work items, including deferred ones. However, currently nobody would wake us, and so let's set ctx->cq_wait_nr, so io_req_local_work_add() would wake us up. Fixes: c0e0d6ba25f18 ("io_uring: add IORING_SETUP_DEFER_TASKRUN") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f1a90d1bc5ebf096475b018fed52e54f3b89d4af.1681395792.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 4ea15b56f0810f0d8795d475db1bb74b3a7c1b2f Author: Pavel Begunkov Date: Thu Apr 13 15:28:08 2023 +0100 io_uring/rsrc: use wq for quiescing Replace completions with waitqueues for rsrc data quiesce, the main wakeup condition is when data refs hit zero. Note that data refs are only changes under ->uring_lock, so we prepare before mutex_unlock() reacquire it after taking the lock back. This change will be needed in the next patch. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1d0dbc74b3b4fd67c8f01819e680c5e0da252956.1681395792.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit eef81fcaa61e1bc6b7735be65f41bbf1a8efd133 Author: Pavel Begunkov Date: Thu Apr 13 15:28:07 2023 +0100 io_uring/rsrc: refactor io_rsrc_ref_quiesce Refactor io_rsrc_ref_quiesce() by moving the first mutex_unlock(), so we don't have to have a second mutex_unlock() further in the loop. It prepares us to the next patch. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/65bc876271fb16bf550a53a4c76c91aacd94e52e.1681395792.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c732ea242d565c8281c4b017929fc62a246d81b9 Author: Pavel Begunkov Date: Thu Apr 13 15:28:06 2023 +0100 io_uring/rsrc: remove io_rsrc_node::done Kill io_rsrc_node::node and check refs instead, it's set when the nodes refcount hits zero, and it won't change afterwards. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/bbde361f4010f7e8bf196f1ecca27a763b79926f.1681395792.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 953c37e066f05a3dca2d74643574b8dfe8a83983 Author: Pavel Begunkov Date: Thu Apr 13 15:28:05 2023 +0100 io_uring/rsrc: use nospec'ed indexes We use array_index_nospec() for registered buffer indexes, but don't use it while poking into rsrc tags, fix that. Fixes: 634d00df5e1cf ("io_uring: add full-fledged dynamic buffers support") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f02fafc5a9c0dd69be2b0618c38831c078232ff0.1681395792.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 519760df251bf2dcafb0af23df0229096537e78a Author: Pavel Begunkov Date: Sat Apr 15 14:20:08 2023 +0100 io_uring/notif: add constant for ubuf_info flags Add a constant IO_NOTIF_UBUF_FLAGS for struct ubuf_info flags that notifications use. That should minimise merge conflicts for planned changes touching both io_uring and net at the same time. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 7e9fa830be05943312542576d3d2b4ba29c30c13 Merge: fba51482b6c0a 52cc189b4fc6a Author: Greg Kroah-Hartman Date: Sat Apr 15 20:24:55 2023 +0200 Merge tag 'iio-for-6.4b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: 2nd set of IIO features and cleanups for the 6.4 cycle. A few more changes. Some were dependent on fixes that are now upstream and in char-misc-next. st,lsm6dsx: - Add an ACPI ID (SMO8B30) and mount matrix (ROTM) seen in the wild. ti,palmas - Take probe fully devm managed. - Add threshold event support (after some rework) - Stop changing the event config on suspend and resume. * tag 'iio-for-6.4b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: adc: palmas: don't alter event config on suspend/resume iio: adc: palmas: add support for iio threshold events iio: adc: palmas: always reset events on unload iio: adc: palmas: move eventX_enable into palmas_adc_event iio: adc: palmas: use iio_event_direction for threshold polarity iio: adc: palmas: replace "wakeup" with "event" iio: adc: palmas: remove adc_wakeupX_data iio: adc: palmas: Take probe fully device managed. iio: imu: lsm6dsx: Add ACPI mount matrix retrieval iio: imu: lsm6dsx: Support SMO8B30 ACPI ID for LSM6DS3TR-C commit b28e24180258d8ac8a4544c8b4e7743424fd01fe Author: Laurent Pinchart Date: Mon May 17 04:32:45 2021 +0100 media: dt-bindings: media: Add i.MX8 ISI DT bindings The Image Sensing Interface (ISI) combines image processing pipelines with DMA engines to process and capture frames originating from a variety of sources. The inputs to the ISI go through Pixel Link interfaces, and their number and nature is SoC-dependent. They cover both capture interfaces (MIPI CSI-2 RX, HDMI RX) and memory inputs. Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 86d3ad9684562cd3cee30f28d5976cd92e702473 Author: Srihari S Date: Sat Apr 8 20:46:23 2023 +0530 staging: rtl8172: Add blank lines after declarations Add blank lines as reported by checkpatch.pl as below CHECK: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Srihari S Link: https://lore.kernel.org/r/1680966983-11609-1-git-send-email-sriharisat@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1cadfcfe353dc36d3c37224047cd422264dab263 Author: Philipp Hortmann Date: Fri Apr 7 23:50:41 2023 +0200 staging: rtl8192e: Remove unused variable RF_Type Remove unused variable RF_Type. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/7710a87f627dcfd2d0c34f14f583625ffab10660.1680902603.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit a273033cf466a8f078beb87ea0f4938382f90fb5 Author: Philipp Hortmann Date: Fri Apr 7 23:50:34 2023 +0200 staging: rtl8192e: Remove one of two checks for hardware RTL8192SE Check for hardware RTL8192SE is done in function _rtl92e_pci_probe() directly and also two lines later in function rtl92e_check_adapter(). Remove top level check to increase readability. This pci_read does not follow a pci_write to ensure data is written to the device. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/4126cca73739c75b1a0379af2ef8b0c63a705639.1680902603.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit edc332a9f4deac969394c1ada1918f75564867aa Author: Philipp Hortmann Date: Fri Apr 7 23:50:28 2023 +0200 staging: rtl8192e: Remove unused function _rtl92e_dm_init_wa_broadcom_iot Remove unused function _rtl92e_dm_init_wa_broadcom_iot and the variables that are not any longer used. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/0e7a2a5b9edc85b7f8e3fc0f9e0e6ab7f2830d02.1680902603.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 748b5db6a9991ba6549758a767ccecf6f3bf0096 Author: Philipp Hortmann Date: Fri Apr 7 23:50:21 2023 +0200 staging: rtl8192e: Remove macro IS_HARDWARE_TYPE_8192SE Remove unused macro IS_HARDWARE_TYPE_8192SE as it is used only in code areas that are not executed when 8192SE hardware is found. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/e9b19862ace002462e870e62c6f62bab3cc81c5a.1680902603.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit ffc5e1f3585e31c8f3572389a6418f5149db0fad Author: Greg Kroah-Hartman Date: Thu Apr 6 10:18:16 2023 +0200 staging: greybus: drop loopback test files The greybus loopback test tool does not belong burried down in a driver-specific directory. If it is needed, it should be somewhere else, like in the testing directory. But as the loopback driver is probably never going to be merged out of the staging directory, let's just delete the test alltogether for now. If it's needed in the future, it can be brought back with a revert. Also, having an Android.mk file in the kernel source tree breaks some Android build systems when trying to build from a read-only source tree, the report of which prompted this being a good reason to remove it as well. Cc: Johan Hovold Cc: Jack Schofield Cc: Vaibhav Nagare Cc: greybus-dev@lists.linaro.org Acked-by: Alex Elder Link: https://lore.kernel.org/r/2023040613-huntsman-goldsmith-4a41@gregkh Signed-off-by: Greg Kroah-Hartman commit 671397d7c6a5d2b923aaf1b4414e3ac9333674a7 Author: Hans de Goede Date: Fri Mar 10 12:22:38 2023 +0000 media: atomisp: gmin_platform: Add Lenovo Ideapad Miix 310 gmin_vars The _DSM used to get sensor variables like CsiPort returns the wrong csi-port for the front OV2680 sensor on the Lenovo Ideapad Miix 310 add a gmin_vars DMI quirk / override setting the right CsiPort. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit bd8856c65dbcb2a31054faece053d28378f185c1 Author: Hans de Goede Date: Fri Mar 10 12:34:45 2023 +0000 media: atomisp: gmin_platform: Make DMI quirks take precedence over the _DSM table On some devices the _DSM sensor-info table contains wrong info, move the DMI quirk handling up to above the _DSM table check to allow DMI quirks to override wrong info in the _DSM table. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 2f2fce05a75dd27d47afcf50eed52217cc99c556 Author: Hans de Goede Date: Sun Mar 5 15:41:02 2023 +0000 media: atomisp: Remove struct atomisp_sub_device index field Remove the struct atomisp_sub_device. This was used for 2 things: 1. In dev_dbg() messages 2. To set the name of the v4l2_subdev for each struct atomisp_sub_device Now that only 1 subdev is used neither is useful anymore. Remove the _%d postfix from the v4l2_subdev name and remove the logging of the asd index from the dev_dbg() messages. In case of the atomisp_s_input() check to see if an input/sensor has already been assigned to another subdev the entire check no longer makes sense, so instead of changing the dev_err() message there just drop the entire check. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 401e0e41aca7af8f5dfd4296b2ab13470a82c4d3 Author: Hans de Goede Date: Sun Mar 5 15:05:52 2023 +0000 media: atomisp: Drop support for streaming from 2 sensors at once With support for depth mode gone there really is no need to support streaming from 2 sensors at once. As discussed and acked on the list (see Link tag) it is desirable to drop support for this since it involves quite a lot of special handling / hacks in the code. This initial commit limits itself to a minimum set of changes to switch to 1 struct atomisp_sub_device / 1 stream. Further commits will actually remove / cleanup much of the special handling. Likewise this initial commit also deliberately skips the opportunity to turn some multi-line statements into single-line statements, so as to keep the diff small / easier to review. Link: https://lore.kernel.org/linux-media/5309d845-063b-6dd9-529d-0f82654290f2@redhat.com/ Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit df1697fa1778be545218945d8858581f3d023ff2 Author: Hans de Goede Date: Sun Mar 5 18:53:15 2023 +0000 media: atomisp: Remove atomisp_try_fmt() call from atomisp_set_fmt() atomisp_set_fmt() first calls: v4l2_subdev_call(isp->inputs[asd->input_curr].camera, pad, set_fmt, ...); with v4l2_subdev_format.which set to V4L2_SUBDEV_FORMAT_ACTIVE and then reduces width + height by padding_w / padding_h followed by calling atomisp_try_fmt() which then sets res_overflow if the requested resolution is larger then the sensor's max resolution, but that will never happen since we are requesting for the result of a set_fmt call minus padding, so res_overflow will always be false. And when called with a res_overflow parameter, combined with there being no overflow then atomisp_try_fmt() does not change the passed in width/height. Except when using JPEG or CUSTOM_M10MO_RAW as pixelformat, then atomisp_try_fmt() does change the width/height but in that case atomisp_set_fmt actually restores the old widht/height which it has saved before the atomisp_try_fmt() call. So this too is a no-op. TL;DR: The atomisp_try_fmt() call in atomisp_set_fmt() is a no-op, remove it. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit ec1d974fcff32eaa5a15883e4930534073538741 Author: Hans de Goede Date: Sun Mar 5 18:28:35 2023 +0000 media: atomisp: Remove unused ATOM_ISP_MAX_WIDTH_TMP and ATOM_ISP_MAX_HEIGHT_TMP Remove the unused ATOM_ISP_MAX_WIDTH_TMP and ATOM_ISP_MAX_HEIGHT_TMP defines. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 52172e9ecf2b1137b250be79df26f9fbf106df92 Author: Hans de Goede Date: Sun Mar 5 17:52:23 2023 +0000 media: atomisp: Remove snr_mbus_fmt local var from atomisp_try_fmt() snr_mbus_fmt is a local variable pointing to a substruct of another local variable which really just makes the code harder to read / follow, so drop it. And likewise also drop the stream_info local variable. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit fa8730b06cb3e40c8fbc265202a10849146470b5 Author: Hans de Goede Date: Sun Mar 5 17:57:45 2023 +0000 media: atomisp: Remove custom V4L2_CID_FMT_AUTO control The custom V4L2_CID_FMT_AUTO control, which defaults to true controls whether the atomisp driver will automatically configure the sensor and ISP settings to match. This is necessary to make normal v4l2 apps to work. We do eventually want to add libcamera support, but even then moving this to userspace does not give any added value, while breaking classic v4l2 apps. Moreover we really don't know all the exact pipeline constraints, so moving this to userspace/libcamera will be tricky thus it is best to keep the current in kernel code for this and make the kernel unconditionally do this. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit b3713bca92f6322bcd5ef1ef8137634db067fdc7 Author: Hans de Goede Date: Sun Mar 5 16:39:51 2023 +0000 media: atomisp: Remove continuous mode related code from atomisp_set_fmt() Remove code to check / adjust code between video and preview / capture and view-finder nodes now that we no longer support continuous mode and this no longer support streaming from 2 /dev/video# nodes at the same time. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 5fa5657be27971ec8c87abf50eaadb2205dd7053 Author: Hans de Goede Date: Sun Mar 5 15:46:38 2023 +0000 media: atomisp: Remove duplicate atomisp_[start|stop]_streaming() prototypes atomisp_ioctl.h contains the atomisp_[start|stop]_streaming() function prototypes 2 times. Drop one of the copies of the prototypes. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 2ec5bfe0c24a55a091689f13b039ac6ac1c6395c Author: Hans de Goede Date: Sun Feb 5 22:42:31 2023 +0000 media: atomisp: gc0310: Switch over to ACPI powermanagement The DSDT of all Windows BYT / CHT devices which I have seen has proper ACPI powermagement for the clk and regulators used by the sensors. So there is no need for the whole custom atomisp_gmin custom code to disable the ACPI pm and directly poke at the PMIC for this. Replace all the atomisp_gmin usage with using the new atomisp_register_sensor_no_gmin() / atomisp_unregister_subdev() helpers which allow registering a sensor with the atomisp code without using any of the atomisp_gmin power-management code. Note eventually these calls should be replaced by the standard v4l2_async_register_subdev_sensor() mechanism. But this first requires a bunch of work to the atomisp main code to make it set the necessary fwnodes up, similar to how drivers/media/pci/intel/ipu3/cio2-bridge.c does this. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 340b4dd6c183678fc37906e491ed8431c8330c29 Author: Hans de Goede Date: Sun Feb 5 21:53:25 2023 +0000 media: atomisp: gc0310: Use devm_kzalloc() for data struct Use devm_kzalloc() to allocate the data struct. It is always free-ed as the last step of probe-error-exit or remove, so it can be devm-managed. This will make unwinding things easier when support is added to the gc0310 code to use standard GPIO APIs instead of the custom atomisp_gmin code. This also allows dropping the out_free label and use direct return on errors. This may seem like a functional change since the out_free label also did a v4l2_device_unregister_subdev() but at the 1 changed return the device is not registered yet, so that always is a no-op and can be dropped. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 2726c899fb6d57d1b40c732b3b977445c4fb2400 Author: Hans de Goede Date: Sun Feb 5 21:49:33 2023 +0000 media: atomisp: gc0310: Add runtime-pm support Add runtime-pm support. This is a preparation patch for letting ACPI deal with the regulators and clocks instead of the DIY code in atomisp_gmin_platform.c. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit b6763b2247ad43603659309f6455256c137d98d1 Author: Hans de Goede Date: Sun Feb 5 13:32:27 2023 +0000 media: atomisp: gc0310: Delay power-on till streaming is started Move the setting of the mode to stream on, this also allows delaying power-on till streaming is started. And drop the deprecated s_power callback since this now no long is necessary. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 9783b96a1e0a38c70a58eec90c9b64d2f7377fe9 Author: Hans de Goede Date: Sun Feb 5 12:41:27 2023 +0000 media: atomisp: gc0310: Modernize and simply set_fmt(), get_fmt(), etc. There only is 1 supported resolution allowing significant simplification of the code; and also bring the code up2date with current subdev fmt handling practices. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 2b2297b11bb506e5b7152dd593d902bc309b7d54 Author: Hans de Goede Date: Sun Feb 5 12:12:24 2023 +0000 media: atomisp: gc0310: Add error_unlock label to s_stream() Add error_unlock label + goto error_unlock on error to remove separate unlock-s in all the error-exit paths. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit ef5fb5d470d6b029db7c39196793937fcea83f1c Author: Hans de Goede Date: Sat Feb 4 16:19:27 2023 +0000 media: atomisp: gc0310: Add exposure and gain controls Add exposure and gain controls. This allows controlling the exposure and gain through standard v4l2 IOCTLs. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 47088fb9105f09bbf82ec10e1fdc9c848dfaa63c Author: Hans de Goede Date: Sat Feb 4 16:01:50 2023 +0000 media: atomisp: gc0310: Drop custom ATOMISP_IOC_S_EXPOSURE support Exposure and gain control should use standard v4l2 controls, not a custom ioctl. The next patch in this series will re-add support as standard controls, this is split into 2 patches for easier reviewing. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 51e4d56cfee72352f6ae3cd0eefeeeaf2d1671e1 Author: Hans de Goede Date: Sat Feb 4 15:41:28 2023 +0000 media: atomisp: gc0310: Remove read-only exposure control The sensor does not have automatic exposure so the exposure cannot change underneath us. And the control is not marked volatile in it flags, so the .g_volatile_ctrl callback will never get called. Remove the current broken read-only (no s_ctrl implementation) exposure ctrl, this will be replaced with a proper r/w exposure control relying on the kernel caching the last set value (so non volatile). Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit c1c356e9c6fdf8e6de76637715043664652a2005 Author: Hans de Goede Date: Sat Feb 4 15:39:23 2023 +0000 media: atomisp: gc0310: Remove non working flip-controls The gc0310_[v|h]_flip() functions are empty stubs, remove the non working controls. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 65e5ef2f4bbb90837f56f9231201b0bb67dce2e9 Author: Hans de Goede Date: Sat Feb 4 13:41:29 2023 +0000 media: atomisp: gc0310: Replace custom reg access functions with smbus helpers The gc0310 uses 8 bit register addresses which makes it compatible with the standard smbus access functions. Drop the custom reg access helpers, replacing them with the smbus access functions. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 86199ed981ad0df0c9566bcf28867a7d299f4518 Author: Hans de Goede Date: Sat Feb 4 13:02:52 2023 +0000 media: atomisp: gc0310: Remove enum gc0310_tok_type enum gc0310_tok_type / the data_length read/write parameter is always GC0310_8BIT, drop this. Note for the register-lists the indentation is also fixed and c++ style comments are converted to regular C-style /* */ comments. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit e1a4b3a76069cb048351ee51ad67e55539e4b2ea Author: Hans de Goede Date: Sat Feb 4 12:45:08 2023 +0000 media: atomisp: gc0310: Simplify gc0310_write_reg_array() Remove the complex optimization to send multiple registers in one i2c-transfer. None of the other sensor drivers are doing this and the reg-lists are only used once at stream-start time, so this does not need to be highly optimized. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit bfe06aee37a9ee01a522a51d5c7bb49d09efd8b2 Author: Hans de Goede Date: Sat Feb 4 12:35:23 2023 +0000 media: atomisp: gc0310: Remove GC0310_TOK_* Remove the ability to have special tokens in a reg-list, GC0310_TOK_DELAY is not used and GC0310_TOK_TERM can be replaced with ARRAY_SIZE, simplifying the code. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 8b6afba5b9ec5d906f264157654d983cb5a6b1c8 Author: Hans de Goede Date: Sat Feb 4 12:24:15 2023 +0000 media: atomisp: gc0310: Remove some unused structure definitions Drop the unused struct gc0310_format and struct regval_list definitions. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 2cd6478cbe05b87b55611e3f511f73cef2ea42c2 Author: Hans de Goede Date: Sun Feb 5 15:05:39 2023 +0000 media: atomisp: ov2680: Error handling fixes Fix 3 error handling issues: 1. In ov2680_s_stream(), when pm_runtime_get_sync() fails it will still have incremented the pm-runtime reference count so we need to call pm_runtime_put() 2. In ov2680_s_stream() sensor->is_streaming should always be set to false when the sensor is powered-off even on i2c-communication errors. 3. In ov2680_probe(), call ov2680_remove() on ov2680_s_config() errors, so that pm_runtime_disable() is properly called to disable the runtime-pm which has been enabled before the ov2680_s_config() call. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 920cf0ba6350c3898ec9e0ac7c341b192d652633 Author: Hans de Goede Date: Sat Apr 1 14:25:20 2023 +0100 media: atomisp: ov2680: Use v4l2_get_acpi_sensor_info() for the GPIO lookups Use the new v4l2_get_acpi_sensor_info() for the GPIO lookups, this uses the special Intel _DSM method to get more info about the GPIOs like their function and their polarity. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit d1229eb04e454a625d99e0b557804215454b997a Author: Hans de Goede Date: Fri Feb 3 23:23:39 2023 +0000 media: atomisp: Add v4l2_get_acpi_sensor_info() helper ACPI nodes describing sensors on atomisp devices implement a "79234640-9e10-4fea-a5c1-b5aa8b19756f" Device Specific Method (DSM) to get info about the GPIOs. Using this method is necessary to figure out which ACPI GPIO resource is "reset" and which one is "powerdown" and this is also necessary to figure out the correct polarity of the pins. One example where this is necessary is the GC0310 sensor. The current GC0310 code hardcodes reset as being active-low and power-down as being active-high. This works on a number of devices such as the mpman converter 9. But it is wrong for the Chuwi Vi8 CWI501 where the powerdown pin is active-low. Rather then adding DMI quirks for this, add a helper for this, which can be shared between sensor-drivers. This new helper optionally also returns a string identifying the exact sensor-module used, which might be useful if any module specific behvior is necessary in the sensor driver. This uses the DSM directly on the sensor device's ACPI node. This is different from later Intel hardware (IPU3 / IPU6) which has a separate INT3472 node (with its own driver) with this info. Since there is no separate ACPI node to which we can bind to register GPIO lookups, this unfortunately means that all sensor drivers which may be used on BYT or CHT hw need to call this new helper. Note for now this function is being added to atomisp_gmin_platform.c, but once things are ready to move atomisp over to using generic sensor drivers this will need to become a generic v4l2 sensor helper. but this will require upstream discussion first. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 9d807761c9ef5ff2561c587251d7b0cec208265c Author: Tsuchiya Yuto Date: Sun Oct 17 17:19:54 2021 +0100 media: atomisp: Remove remaining instance of call to trace_printk (patch based on intel-aero kernel patch: https://github.com/intel-aero/meta-intel-aero-base/commit/26fc9fe5030b63bc9dcf0b5f32981948911ca272) Here is the original commit message from the aforementioned patch: From 26fc9fe5030b63bc9dcf0b5f32981948911ca272 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Fri, 7 Jul 2017 14:23:53 -0700 Subject: [PATCH] linux-yocto: Remove remaining instance of call to trace_printk It's not sufficient to leave trace_printk() out of "normal call chains" since the way trace infrastructure works is that it will allocate the trace_printk buffers if the symbol is there (by using a separate section for the function and checking if __start_* and __stop_* symbols are different. Therefore, even if the default value for the param tells the module to use printk(), just the fact that it can be changed to trace_printk() means the initialization code will be called. The trace_printk() was replaced by pr_info() on commit 3d81099c75a6 ("media: atomisp: Replace trace_printk by pr_info") for the upstreamed atomisp, too. However, as the aforementioned commit message says, there is still a remaining instance. This causes the "trace_printk() being used" kernel warning message to still appear on the first driver load. Based on the aforementioned patch, this patch removes the call to ftrace_vprintk(). This removes that kernel warning. In addition to this, this patch also removes the following now unused things: - now empty atomisp_css2_dbg_ftrace_print() - trace_printk option from dbg_func kernel parameter Link: https://lore.kernel.org/r/20211017161958.44351-15-kitakar@gmail.com Signed-off-by: Tsuchiya Yuto Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit edd076fe8a7749864267529f61570987d39186d0 Author: Hans de Goede Date: Tue Feb 21 14:59:06 2023 +0000 media: atomisp: Remove online_process setting online_process is always true, remove it. Link: https://lore.kernel.org/r/20230221145906.8113-11-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 738ac75e4ca30d91162dc6394cca4c80fbb8db54 Author: Hans de Goede Date: Tue Feb 21 14:59:05 2023 +0000 media: atomisp: Remove yuvpp_mode yuvpp_mode is never set, so it always is false remove it. Link: https://lore.kernel.org/r/20230221145906.8113-10-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 9c2f3b8f7f542c194ced4b1cd1184acfc0fea37d Author: Hans de Goede Date: Tue Feb 21 14:59:04 2023 +0000 media: atomisp: Remove ATOMISP_USE_YUVPP() ATOMISP_USE_YUVPP() always returns false, so remove it and remove any code-paths which only run when it would return true. Link: https://lore.kernel.org/r/20230221145906.8113-9-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit bbfd899fe0702a6e0241da191dc6ecd948d7e9b4 Author: Hans de Goede Date: Tue Feb 21 14:59:03 2023 +0000 media: atomisp: Remove unused SOC_CAMERA, XENON_FLASH and FILE_INPUT subdev types Nothing registers subdevs with the SOC_CAMERA, XENON_FLASH and FILE_INPUT types, remove the code for these. Link: https://lore.kernel.org/r/20230221145906.8113-8-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit c5449babb1c4face072c9dc5505c56349379319d Author: Hans de Goede Date: Tue Feb 21 14:59:02 2023 +0000 media: atomisp: Remove atomisp_get_metadata_type() atomisp_get_metadata_type() always returns ATOMISP_MAIN_METADATA, replace its uses with ATOMISP_MAIN_METADATA and remove it. Link: https://lore.kernel.org/r/20230221145906.8113-7-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 3adf19105508377edb1c9decce4832071ec5371a Author: Hans de Goede Date: Tue Feb 21 14:59:01 2023 +0000 media: atomisp: Remove atomisp_css_enable_raw_binning() Remove the now unused atomisp_css_enable_raw_binning() function. Link: https://lore.kernel.org/r/20230221145906.8113-6-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 7821a6039632d2f82ab01b829c6f70a0c225215a Author: Hans de Goede Date: Tue Feb 21 14:59:00 2023 +0000 media: atomisp: Remove crop_needs_override from atomisp_set_fmt() Remove the crop_needs_override local helper variable from atomisp_set_fmt(), as it always is true now. Link: https://lore.kernel.org/r/20230221145906.8113-5-hdegoede@redhat.com Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 9fd4b20816fcb0af770103dafdb0ef4bc647b679 Author: Hans de Goede Date: Tue Feb 21 14:58:59 2023 +0000 media: atomisp: Remove delayed_init related code After the continues-mode removal the delayed-work never gets queues remove all the related code. Link: https://lore.kernel.org/r/20230221145906.8113-4-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 6048fc1c5675820d1b5e00f658e97bd728442127 Author: Hans de Goede Date: Tue Feb 21 14:58:58 2023 +0000 media: atomisp: Remove continuous mode support Continues mode is a special mode where 2 /dev/video devices can be active at the same time. Either the video-preview + video nodes or the viewfinder (for still capture) + capture nodes. For the video-preview + video-recording case modern userspace will use a single stream multiplexed by pipewire. The still-capture case is extra special only starting the preview stream and then relying on a custom ATOMISP_IOC_S_CONT_CAPTURE_CONFIG ioctl to set things up followed by a second stream on to capture the amount of configured still pictures. While running the sensor at full resolution all the time. This case too is better handled with dma-buf + GPU downscaling for the view-finder rather then all this custom special code. Besises this the ioctl expects a bunch of special non error checked conditions to be met otherwise things will crash/hang. The continues mode also involves a special cases all over the code getting in the way of further cleanups and simplifying the code to using just 1 /dev/video# node. So lets remove it and the related custom ATOMISP_IOC_S_CONT_CAPTURE_CONFIG ioctl. Link: https://lore.kernel.org/linux-media/ea81b17b-7d1f-a5e1-11dd-04db310e1e50@redhat.com/ Link: https://lore.kernel.org/r/20230221145906.8113-3-hdegoede@redhat.com Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit d33b94c0938984db5a6ed78b87225f4858b73b10 Author: Hans de Goede Date: Tue Feb 21 14:58:57 2023 +0000 media: atomisp: Remove depth-mode support Remove support for depth mode. This is a special mode where 2 streams (from 2 different sensors) can be setup and then starting/stopping 1 will automatically also start/stop the other. Like many of these special features I'm pretty sure that if the queue setup is not done exactly right things will crash and there is no error checking for this. This seems to be for stereoscopic vision and the only known hw which actually supports this is the Intel Aero board/SDK, all other 1000+ BYT/CHT models don't need this. This false outside of the standard webcam use scenario which we are trying to get working and this involves a bunch of hacks / special exceptions all over the code, so lets remove this. Link: https://lore.kernel.org/linux-media/ea81b17b-7d1f-a5e1-11dd-04db310e1e50@redhat.com/ Link: https://lore.kernel.org/r/20230221145906.8113-2-hdegoede@redhat.com Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit 4db7f7a0e59b36cb7220d83c44e52b228ac891ef Author: Laurent Pinchart Date: Wed Jan 25 18:29:48 2023 +0000 media: i2c: Drop unused vs6624 camera sensor driver The vs6624 camera sensor driver doesn't support DT and relies on platform data. The last board files supplying platform data for that device have been removed from the kernel in v4.17. The driver hasn't been used since them. Drop it. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6a692b059c821887a6277a294c2788bf99a47a08 Author: Laurent Pinchart Date: Wed Jan 25 18:29:48 2023 +0000 media: i2c: Drop unused sr030pc30 camera sensor driver The sr030pc30 camera sensor driver doesn't support DT and relies on platform data. No board file has ever provided platform data for that device. The driver has thus never been used in the mainline kernel since its introduction in v2.6.37. Drop it. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 56ac4aa4ed76639c4786e7167b2c48c78d04b706 Author: Laurent Pinchart Date: Wed Jan 25 18:29:48 2023 +0000 media: i2c: Drop unused s5k6aa camera sensor driver The s5k6aa camera sensor driver doesn't support DT and relies on platform data. The last board files supplying platform data for that device have been removed from the kernel in v3.11. The driver hasn't been used since them. Drop it. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4604236d67278885fee3459a39315fb5ff7dc1c6 Author: Laurent Pinchart Date: Wed Jan 25 18:29:48 2023 +0000 media: i2c: Drop unused noon010pc30 camera sensor driver The noon010pc30 camera sensor driver doesn't support DT and relies on platform data. The last board files supplying platform data for that device have been removed from the kernel in v3.16. A device tree file referencing the device has been added in v3.17, but without corresponding DT bindings, and with DT support in the driver. The driver thus hasn't been used since v316. Drop it. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 95a9ea8a13885ef540f851091e87c78594c08829 Author: Laurent Pinchart Date: Wed Jan 25 18:29:48 2023 +0000 media: i2c: Drop unused mt9t001 camera sensor driver The mt9t001 camera sensor driver doesn't support DT and relies on platform data. No board file has ever provided platform data for that device. The driver has thus never been used in the mainline kernel since its introduction in v3.2. Drop it. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a22eabc825738dfcf06b7fcfe2cd6d020b832786 Author: Laurent Pinchart Date: Wed Jan 25 18:29:48 2023 +0000 media: i2c: Drop unused mt9m032 camera sensor driver The mt9m032 camera sensor driver doesn't support DT and relies on platform data. No board file has ever provided platform data for that device. The driver has thus never been used in the mainline kernel since its introduction in v3.4. Drop it. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c77d3da12e812c695cd9a3a0e428518e1442f73b Author: Laurent Pinchart Date: Wed Jan 25 18:29:48 2023 +0000 media: i2c: Drop unused m5mols camera sensor driver The m5mols camera sensor driver doesn't support DT and relies on platform data. The last board files supplying platform data for that device have been removed from the kernel in v3.11. The driver hasn't been used since them. Drop it. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit db24aa04119421149bee3a0ef6c9f651c942cbcb Author: Laurent Pinchart Date: Wed Jan 25 18:29:48 2023 +0000 media: i2c: Drop unused ad9389b video encoder driver The ad9389b video encoder driver doesn't support DT and relies on platform data. No board file has ever provided platform data for that device. The driver has thus never been used in the mainline kernel since its introduction in v3.7. Drop it. Signed-off-by: Laurent Pinchart Acked-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 803235982b8c086184d04798d9079d236f352f88 Author: John Keeping Date: Thu Apr 6 19:08:57 2023 +0100 genirq: Update affinity of secondary threads For interrupts with secondary threads, the affinity is applied when the thread is created but if the interrupts affinity is changed later only the primary thread is updated. Update the secondary thread's affinity as well to keep all the interrupts activity on the assigned CPUs. Signed-off-by: John Keeping Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230406180857.588682-1-john@metanate.com commit f4bf3ca2e5cba655824b6e0893a98dfb33ed24e5 Author: Lingutla Chandrasekhar Date: Fri Apr 7 23:05:26 2023 +0000 softirq: Add trace points for tasklet entry/exit Tasklets are supposed to finish their work quickly and should not block the current running process, but it is not guaranteed that they do so. Currently softirq_entry/exit can be used to analyse the total tasklets execution time, but that's not helpful to track individual tasklets execution time. That makes it hard to identify tasklet functions, which take more time than expected. Add tasklet_entry/exit trace point support to track individual tasklet execution. Trivial usage example: # echo 1 > /sys/kernel/debug/tracing/events/irq/tasklet_entry/enable # echo 1 > /sys/kernel/debug/tracing/events/irq/tasklet_exit/enable # cat /sys/kernel/debug/tracing/trace # tracer: nop # # entries-in-buffer/entries-written: 4/4 #P:4 # # _-----=> irqs-off/BH-disabled # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / _-=> migrate-disable # |||| / delay # TASK-PID CPU# ||||| TIMESTAMP FUNCTION # | | | ||||| | | -0 [003] ..s1. 314.011428: tasklet_entry: tasklet=0xffffa01ef8db2740 function=tcp_tasklet_func -0 [003] ..s1. 314.011432: tasklet_exit: tasklet=0xffffa01ef8db2740 function=tcp_tasklet_func -0 [003] ..s1. 314.017369: tasklet_entry: tasklet=0xffffa01ef8db2740 function=tcp_tasklet_func -0 [003] ..s1. 314.017371: tasklet_exit: tasklet=0xffffa01ef8db2740 function=tcp_tasklet_func Signed-off-by: Lingutla Chandrasekhar Signed-off-by: J. Avila Signed-off-by: John Stultz Signed-off-by: Thomas Gleixner Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20230407230526.1685443-1-jstultz@google.com [elavila: Port to android-mainline] [jstultz: Rebased to upstream, cut unused trace points, added comments for the tracepoints, reworded commit] commit 3b764ff03d9587da07374cf9606c1de47d5e6de6 Author: Ming Qian Date: Wed Mar 22 05:13:13 2023 +0000 media: imx-jpeg: Encoder add support for 12bit jpeg enable encoding 12-bit extended jpeg Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e7a1494a4814aee869e9275af7d331b92df6b87c Author: Ming Qian Date: Wed Mar 22 05:13:12 2023 +0000 media: imx-jpeg: Decoder add support for 12bit jpeg enable decoding 12-bit extended jpeg Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a14e14bae18cb28f62be4cce993ea0f3b1c7fac7 Author: Ming Qian Date: Wed Mar 22 05:13:11 2023 +0000 media: imx-jpeg: Clear slot next desc ptr if config error clear slot next desc ptr if config error, otherwise codec will report config error interrupt repeatedly, it may led to system hang. Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 492b99c2cd6f3192d6bda7e7681eff35f2ff41e0 Author: Ming Qian Date: Wed Mar 22 05:13:10 2023 +0000 media: imx-jpeg: Refine the function mxc_jpeg_find_format remove the unused parameter ctx Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 302b988ca03d83da0a7e006a57efda646c30f978 Author: Ming Qian Date: Wed Mar 22 05:13:09 2023 +0000 media: Add ABGR64_12 video format ABGR64_12 is a reversed RGB format with alpha channel last, 12 bits per component like ABGR32, expanded to 16bits. Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian order. Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit da0b7a400e4f39726c3c383f377fb51dbd8b0c71 Author: Ming Qian Date: Wed Mar 22 05:13:08 2023 +0000 media: Add BGR48_12 video format BGR48_12 is a reversed RGB format with 12 bits per component like BGR24, expanded to 16bits. Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian order. Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 99c954967762976b15265ea383354095e1ed1efa Author: Ming Qian Date: Wed Mar 22 05:13:07 2023 +0000 media: Add YUV48_12 video format YUV48_12 is a YUV format with 12-bits per component like YUV24, expanded to 16bits. Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian order. [hverkuil: replaced a . by ,] Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a178dd3bbecc3e26dfc2c72b6fe64d9bf7749de2 Author: Ming Qian Date: Wed Mar 22 05:13:06 2023 +0000 media: Add Y212 v4l2 format info Y212 is a YUV format with 12-bits per component like YUYV, expanded to 16bits. Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian order. Add the missing v4l2 foramt info of Y212 Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a490ea68444084ec0368c019e11ee4a7e5c8bb13 Author: Ming Qian Date: Wed Mar 22 05:13:05 2023 +0000 media: Add Y012 video format Y012 is a luma-only formats with 12-bits per pixel, expanded to 16bits. Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian order. Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit aa1080404200694aace5989f99664ca75e73b03d Author: Ming Qian Date: Wed Mar 22 05:13:04 2023 +0000 media: Add P012 and P012M video format P012 is a YUV format with 12-bits per component with interleaved UV, like NV12, expanded to 16 bits. Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian order. And P012M has two non contiguous planes. Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f57fa2959244026ea5e885249e6c55fe3f133bd7 Author: Tomi Valkeinen Date: Thu Mar 23 13:58:35 2023 +0000 media: v4l2-subdev: Add new ioctl for client capabilities Add new ioctls to set and get subdev client capabilities. Client in this context means the userspace application which opens the subdev device node. The client capabilities are stored in the file handle of the opened subdev device node, and the client must set the capabilities for each opened subdev. For now we only add a single flag, V4L2_SUBDEV_CLIENT_CAP_STREAMS, which indicates that the client is streams-aware. The reason for needing such a flag is as follows: Many structs passed via ioctls, e.g. struct v4l2_subdev_format, contain reserved fields (usually a single array field). These reserved fields can be used to extend the ioctl. The userspace is required to zero the reserved fields. We recently added a new 'stream' field to many of these structs, and the space for the field was taken from these reserved arrays. The assumption was that these new 'stream' fields are always initialized to zero if the userspace does not use them. This was a mistake, as, as mentioned above, the userspace is required to zero the _reserved_ fields. In other words, there is no requirement to zero this new stream field, and if the userspace doesn't use the field (which is the case for all userspace applications at the moment), the field may contain random data. This shows that the way the reserved fields are defined in v4l2 is, in my opinion, somewhat broken, but there is nothing to do about that. To fix this issue we need a way for the userspace to tell the kernel that the userspace has indeed set the 'stream' field, and it's fine for the kernel to access it. This is achieved with the new ioctl, which the userspace should usually use right after opening the subdev device node. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5fe4230d0ed4cd93ee843e70c4dac5533fa859c0 Author: Hans Verkuil Date: Wed Mar 22 12:51:56 2023 +0000 media: staging: media: av7110: fix VBI output support With these changes it now passes the v4l2-compliance test. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c116a5c677e2cbcf9aa6c9b3e7a016a3a12db795 Author: Hans Verkuil Date: Thu Mar 2 12:45:11 2023 +0000 media: pci: saa7146: advertise only those TV standard that are supported V4L2_STD_ALL advertises more standards than these boards actually support. This causes a V4L2 compliance issue. Limit the supported standards to those that are actually implemented. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5c57c421a8cedfd09901a3c21228de2fbd3c0dfa Author: Hans Verkuil Date: Thu Mar 2 11:42:57 2023 +0000 media: mxb: allow tuner/input/audio ioctls for vbi The vbi stream comes from the same video input as the video stream. So all the related ioctls to that are just as valid for the vbi stream. Add these. This fixes a V4L2 compliance issue. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 017984559d09aef296011f9a8e9ce855404ad519 Author: Hans Verkuil Date: Thu Mar 2 11:41:39 2023 +0000 media: common: saa7146: add support for missing .vidioc_try_fmt_vbi_cap Support for VIDIOC_TRY_FMT for the vbi device was missing. Add it. This fixes a V4L2 compliance issue. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1ba2615e468ec70de1b7dfa9868d3f0456d5f40c Author: Hans Verkuil Date: Thu Mar 2 11:39:41 2023 +0000 media: mxb: update the tvnorms when changing input The tuner input uses different tvnorms compared to the S-Video/Composite inputs. So update the tvnorms field in struct video_device when switching inputs. This fixes a V4L2 compliance issue. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b2943a0e9a7859c52d75f2f5cce532e04c4320a9 Author: Hans Verkuil Date: Thu Mar 2 11:37:38 2023 +0000 media: common: saa7146: allow S_STD(G_STD) If the requested TV standard is identical to the current TV standard, then return 0, even when the vb2 queues are busy. This fixes a V4L2 compliance issue. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ff6dad2f95fb6a3474fdf3ee9edf6892908302dd Author: Hans Verkuil Date: Thu Mar 2 11:31:24 2023 +0000 media: common: saa7146: check minimum video format size There was no check for the minimum width and height, so 0 values were just passed on. Fix this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e4561809174806ec304373a6734b89595a5a6988 Author: Hans Verkuil Date: Thu Mar 2 11:27:04 2023 +0000 media: common: saa7146: fix compliance problems with field handling The initial field value of the format is ANY, which isn't allowed. Change to INTERLACED. VIDIOC_TRY_FMT will overwrite vv->last_field, which is an unwanted side-effect, so drop this. And finally vidioc_s_fmt_vid_cap didn't initialize vv->last_field correctly. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0b6e30bd37ae14ae34f7dbcc46a05e98903d0eae Author: Hans Verkuil Date: Wed Mar 1 11:05:55 2023 +0000 media: saa7146: convert to vb2 Convert this driver from the old videobuf framework to the vb2 frame. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b3b2dd37290208a0cc085e9a0bb8430f0caeb89b Author: Hans Verkuil Date: Thu Mar 2 10:35:05 2023 +0000 media: common: saa7146: use for_each_sg_dma_page When building the pgtables, use for_each_sg_dma_page. Also clean up the code a bit. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 500174a2d558c4d21fed35291e4dc6fc70ca178e Author: Hans Verkuil Date: Thu Mar 2 10:21:47 2023 +0000 media: common: saa7146: fix broken V4L2_PIX_FMT_YUV422P support The U and V components were swapped. Drop the FORMAT_BYTE_SWAP to fix this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0e236e0a1d06320c23bfa755d3e2a059f48029b0 Author: Hans Verkuil Date: Thu Mar 2 10:06:40 2023 +0000 media: staging: media: av7110: replace BUG_ON by WARN_ON No need for BUG_ON, WARN_ON is a lot friendlier. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 40e986c99624c5306c0d18fd9011a55440c5f61a Author: Hans Verkuil Date: Thu Mar 2 10:05:58 2023 +0000 media: common: saa7146: replace BUG_ON by WARN_ON No need for BUG_ON, WARN_ON is a lot friendlier. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c79dbdae3a7693903a92a2348493e7084d9477b3 Author: Hans Verkuil Date: Thu Mar 2 09:52:59 2023 +0000 media: common: saa7146: drop 'fmt' from struct saa7146_buf Use the video_fmt in saa7146_vv instead of having a pointer to it in struct saa7146_buf. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit acdb15732869a429081b347d2ec40a425ea0b47f Author: Hans Verkuil Date: Wed Mar 1 12:21:38 2023 +0000 media: saa7146: drop 'dev' and 'resources' from struct saa7146_fh Instead use vv->resources and video_drvdata(file) to obtain this information. This prepares for the vb2 conversion later when saa7146_fh is dropped completely. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 999a9fbf0724e5f04720f334d099c8c6ec903508 Author: Hans Verkuil Date: Thu Mar 23 15:13:41 2023 +0000 media: pci: saa7146: hexium_orion: initialize input 0 When this driver is loaded for the first time, input 0 is not initialized. In order to capture from that input you would have to switch to input 1, then back to 0. Properly initialize the input when the driver is loaded. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 727c070cd0a3a7ae8f45b1b8dd65254607feef0c Author: Hans Verkuil Date: Wed Mar 22 12:51:36 2023 +0000 media: common/saa7146: fix VFL direction for vbi output The VBI output device didn't have VFL_DIR_TX set, so this didn't work anymore since the V4L2 core thought that it was a capture device instead. Fix this. Also drop invalid capabilities for the VBI output device. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c07deaa1f2bd3fb38a5f52de0f2b44d7fa6e8347 Author: Hans Verkuil Date: Thu Mar 23 15:11:20 2023 +0000 media: common: saa7146: disable clipping The patch removing overlay support also removed the old saa7146_disable_clipping() function, but that is needed in order to capture video. Without this the Hexium cards won't show any video. Signed-off-by: Hans Verkuil Fixes: 7777694f8066 ("media: saa7146: drop overlay support") Signed-off-by: Mauro Carvalho Chehab commit b8c41ec1fb552a5e6c851887374e32233232302e Author: Biju Das Date: Thu Apr 6 18:13:24 2023 +0100 media: dt-bindings: media: renesas,vsp1: Document RZ/V2L VSPD bindings Document VSPD found in RZ/V2L SoC. The VSPD block is identical to RZ/G2L SoC and therefore use RZ/G2L fallback to avoid any driver changes. Signed-off-by: Biju Das Acked-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 81442e3e6c0f7de9df64addc53d49079b8045b05 Author: Biju Das Date: Thu Apr 6 18:13:23 2023 +0100 media: dt-bindings: media: renesas,fcp: Document RZ/{G2L,V2L} FCPVD bindings Document FCPVD found in RZ/G2L alike SoCs. FCPVD block is similar to FCP for VSP found on R-Car SoC's . It has 3 clocks compared to 1 clock on fcpv. Introduce new compatibles renesas,r9a07g044-fcpvd for RZ/G2{L,LC} and renesas,r9a07g054-fcpvd for RZ/V2L to handle this difference. The 3 clocks are shared between du, vspd and fcpvd. No driver changes are required as generic compatible string "renesas,fcpv" will be used as a fallback. Signed-off-by: Biju Das Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bb02a201b63e6ae80a412b1673e9888d30ca5d1a Author: Irui Wang Date: Mon Apr 3 10:43:42 2023 +0100 media: mediatek: vcodec: Coverity issues in encoder driver CERT-C Characters and Strings: check core id is in valid range: dev->reg_base[dev->venc_pdata->core_id] evaluates to an address that could be at negative offset of an array. CERT-C Expression: check buf is not NULL before used: Dereferencing buf, which is known to be NULL. Signed-off-by: Irui Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8fbcf730cb89c3647f3365226fe7014118fa93c7 Author: Wei Chen Date: Wed Mar 29 09:05:13 2023 +0100 media: mediatek: vcodec: Fix potential array out-of-bounds in decoder queue_setup variable *nplanes is provided by user via system call argument. The possible value of q_data->fmt->num_planes is 1-3, while the value of *nplanes can be 1-8. The array access by index i can cause array out-of-bounds. Fix this bug by checking *nplanes against the array size. Signed-off-by: Wei Chen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e2a10b3801061d05d3e3415b9b824251451cfd6c Author: Yunfei Dong Date: Tue Mar 28 10:14:50 2023 +0100 media: mediatek: vcodec: add remove function for decoder platform driver Need to disable decoder power when remove decoder hardware driver, adding remove callback function in the definition of platform driver. Fixes: c05bada35f01 ("media: mtk-vcodec: Add to support multi hardware decode") Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9d2f13fb47dcab6d094f34ecfd6a879a409722b3 Author: Yunfei Dong Date: Tue Mar 28 10:14:49 2023 +0100 media: mediatek: vcodec: fix decoder disable pm crash Can't call pm_runtime_disable when the architecture support sub device for 'dev->pm.dev' is NUll, or will get below crash log. [ 10.771551] pc : _raw_spin_lock_irq+0x4c/0xa0 [ 10.771556] lr : __pm_runtime_disable+0x30/0x130 [ 10.771558] sp : ffffffc01e4cb800 [ 10.771559] x29: ffffffc01e4cb800 x28: ffffffdf082108a8 [ 10.771563] x27: ffffffc01e4cbd70 x26: ffffff8605df55f0 [ 10.771567] x25: 0000000000000002 x24: 0000000000000002 [ 10.771570] x23: ffffff85c0dc9c00 x22: 0000000000000001 [ 10.771573] x21: 0000000000000001 x20: 0000000000000000 [ 10.771577] x19: 00000000000000f4 x18: ffffffdf2e9fbe18 [ 10.771580] x17: 0000000000000000 x16: ffffffdf2df13c74 [ 10.771583] x15: 00000000000002ea x14: 0000000000000058 [ 10.771587] x13: ffffffdf2de1b62c x12: ffffffdf2e9e30e4 [ 10.771590] x11: 0000000000000000 x10: 0000000000000001 [ 10.771593] x9 : 0000000000000000 x8 : 00000000000000f4 [ 10.771596] x7 : 6bff6264632c6264 x6 : 0000000000008000 [ 10.771600] x5 : 0080000000000000 x4 : 0000000000000001 [ 10.771603] x3 : 0000000000000008 x2 : 0000000000000001 [ 10.771608] x1 : 0000000000000000 x0 : 00000000000000f4 [ 10.771613] Call trace: [ 10.771617] _raw_spin_lock_irq+0x4c/0xa0 [ 10.771620] __pm_runtime_disable+0x30/0x130 [ 10.771657] mtk_vcodec_probe+0x69c/0x728 [mtk_vcodec_dec 800cc929d6631f79f9b273254c8db94d0d3500dc] [ 10.771662] platform_drv_probe+0x9c/0xbc [ 10.771665] really_probe+0x13c/0x3a0 [ 10.771668] driver_probe_device+0x84/0xc0 [ 10.771671] device_driver_attach+0x54/0x78 Fixes: ba31a5b39400 ("media: mtk-vcodec: Remove mtk_vcodec_release_dec_pm") Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0b44232be77cc6ad898744127d6768d5f8952e13 Author: Ye Xingchen Date: Fri Mar 24 03:07:31 2023 +0000 media: hantro: use devm_reset_control_array_get_optional_exclusive() Switch to devm_reset_control_array_get_optional_exclusive() API. Signed-off-by: Ye Xingchen Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e8f27ebb39420121905d26a3bd73cfc89c4e17d3 Author: Niklas Söderlund Date: Thu Mar 30 15:47:31 2023 +0100 media: dt-bindings: media: renesas,vin: Add binding for V4H Document support for the VIN module in the Renesas V4H (r8a779g0) SoC. Signed-off-by: Niklas Söderlund Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 969242759296fbd52e679aad7fe5c198461ace74 Author: Niklas Söderlund Date: Thu Mar 30 15:47:30 2023 +0100 media: dt-bindings: media: renesas,csi2: Add binding for V4H Document support for the CSI-2 module in the Renesas V4H (r8a779g0) SoC. Signed-off-by: Niklas Söderlund Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d6de57ce85862f7e3f8e43524b2a5d38fd52a843 Author: Niklas Söderlund Date: Thu Mar 30 15:47:29 2023 +0100 media: dt-bindings: media: renesas,isp: Add binding for V4H Document support for the ISP module in the Renesas V4H (r8a779g0) SoC. Signed-off-by: Niklas Söderlund Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4d9ab75a1cfd32513e0c70568fd6af7474811511 Author: Uwe Kleine-König Date: Mon Apr 3 16:40:06 2023 +0100 media: staging: media: sun6i-isp: 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 (mostly) ignored 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. 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: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 62ee459f02edea2b4b2ef5c8820b9f8f957b3ac3 Author: Uwe Kleine-König Date: Mon Apr 3 16:40:05 2023 +0100 media: staging: media: sunxi: cedrus: 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 (mostly) ignored 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. 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: Paul Kocialkowski Acked-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7f91babe04721c1e35d27cc9120ef03f0cf4e2c1 Author: Uwe Kleine-König Date: Mon Apr 3 16:40:04 2023 +0100 media: staging: media: rkvdec: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 68637c4ee9998cb1cce002bdc4e301dfa49b2e4f Author: Uwe Kleine-König Date: Mon Apr 3 16:40:03 2023 +0100 media: staging: media: omap4iss: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2274d3233041fcf2948e43588adba2203a34bd92 Author: Uwe Kleine-König Date: Mon Apr 3 16:40:02 2023 +0100 media: staging: media: meson: vdec: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Martin Blumenstingl Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 162a87b562e1106f0660c074072b60977d03d478 Author: Uwe Kleine-König Date: Mon Apr 3 16:40:01 2023 +0100 media: staging: media: imx8mq-mipi-csi2: 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 (mostly) ignored 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. 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d24bbc5452a8a8adc40b68a2bb91497fc6696509 Author: Uwe Kleine-König Date: Mon Apr 3 16:40:00 2023 +0100 media: staging: media: imx6-mipi-csi2: 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 (mostly) ignored 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. 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ab204739688f25a0f15182bdcd771eeacc03aa76 Author: Uwe Kleine-König Date: Mon Apr 3 16:39:59 2023 +0100 media: staging: media: imx-media-dev: 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 (mostly) ignored 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. 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 10bef5e870a513fa864f09defe3cedbf0eb5465c Author: Uwe Kleine-König Date: Mon Apr 3 16:39:58 2023 +0100 media: staging: media: imx-media-csi: 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 (mostly) ignored 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. 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5b5365c76cf52eed1fa159af7469b7f14b7e712f Author: Uwe Kleine-König Date: Mon Apr 3 16:39:57 2023 +0100 media: staging: media: atmel-sama7g5-isc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Nicolas Ferre Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 107edf5f8e9711be86efd3dfe2c333838eabbdd8 Author: Uwe Kleine-König Date: Mon Apr 3 16:39:56 2023 +0100 media: staging: media: atmel-sama5d2-isc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Nicolas Ferre Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8eb2a208faa0635b355c753ed56440342c780850 Author: Hans Verkuil Date: Mon Mar 27 09:32:01 2023 +0100 media: Documentation: admin-guide: cec.rst: document NTP issue The CEC pin framework is affected by NTP daemons speeding up or slowing down the system clock. Document this and explain how to fix this for chronyd. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6bade236f14033fa457a9e22ceb8a114a14d90e3 Author: Hans Verkuil Date: Fri Mar 24 14:52:57 2023 +0000 media: cec: core: not all messages were passed on when monitoring The valid_la boolean is used to check if the destination logical address is either 15 (broadcast) or our logical address. If it is for another logical address, then only adapters that have the CEC_CAP_MONITOR_ALL capability can pass it on. However, it is also used to do more detailed validity checks, such as whether the message was broadcast when it should have been directed, or vice versa, in which case the message must be ignored according to the spec. But that should not apply to monitoring. Add a new bool that just checks the LA and nothing else. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 54902099b1d8b62bea7cfd949aa3acd9eae1c3db Author: Jason Yan Date: Thu Mar 23 22:05:17 2023 +0800 ext4: move dax and encrypt checking into ext4_check_feature_compatibility() These checkings are also related with feature compatibility checkings. So move them into ext4_check_feature_compatibility(). No functional change. Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20230323140517.1070239-9-yanaijie@huawei.com Signed-off-by: Theodore Ts'o commit 107d2be90116a1731d2d81296100c0a4c454a89f Author: Jason Yan Date: Thu Mar 23 22:05:16 2023 +0800 ext4: factor out ext4_block_group_meta_init() Factor out ext4_block_group_meta_init(). No functional change. Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20230323140517.1070239-8-yanaijie@huawei.com Signed-off-by: Theodore Ts'o commit 269e9226c29fbfe7f66a324d6d32d4a53bcffbbe Author: Jason Yan Date: Thu Mar 23 22:05:15 2023 +0800 ext4: move s_reserved_gdt_blocks and addressable checking into ext4_check_geometry() These two checkings are more suitable to be put into ext4_check_geometry() rather than spreading outside. Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20230323140517.1070239-7-yanaijie@huawei.com Signed-off-by: Theodore Ts'o commit 68e624398f7df3fd91d4a4cd148e722a18d76054 Author: Jason Yan Date: Thu Mar 23 22:05:14 2023 +0800 ext4: rename two functions with 'check' The naming styles are different for some functions with 'check' in their names. Some of them are like: ext4_check_quota_consistency ext4_check_test_dummy_encryption ext4_check_opt_consistency ext4_check_descriptors ext4_check_feature_compatibility While the others looks like below: ext4_geometry_check ext4_journal_data_mode_check This is not a big deal and boils down to personal preference. But I'd like to make them consistent. Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20230323140517.1070239-6-yanaijie@huawei.com Signed-off-by: Theodore Ts'o commit dcbf87589d90e3bd5a5a4cf832517f22f3c55efb Author: Jason Yan Date: Thu Mar 23 22:05:13 2023 +0800 ext4: factor out ext4_flex_groups_free() Factor out ext4_flex_groups_free() and it can be used both in __ext4_fill_super() and ext4_put_super(). Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20230323140517.1070239-5-yanaijie@huawei.com Signed-off-by: Theodore Ts'o commit 6ef684988816fdfa29ceff260c97d725a489a942 Author: Jason Yan Date: Thu Mar 23 22:05:12 2023 +0800 ext4: use ext4_group_desc_free() in ext4_put_super() to save some duplicated code The only difference here is that ->s_group_desc and ->s_flex_groups share the same rcu read lock here but it is not necessary. In other places they do not share the lock at all. Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20230323140517.1070239-4-yanaijie@huawei.com Signed-off-by: Theodore Ts'o commit 1f79467c8a6be64940a699de1bd43338a6dd9fdd Author: Jason Yan Date: Thu Mar 23 22:05:11 2023 +0800 ext4: factor out ext4_percpu_param_init() and ext4_percpu_param_destroy() Factor out ext4_percpu_param_init() and ext4_percpu_param_destroy(). And also use ext4_percpu_param_destroy() in ext4_put_super() to avoid duplicated code. No functional change. Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20230323140517.1070239-3-yanaijie@huawei.com Signed-off-by: Theodore Ts'o commit db9345d9e6f075e1ec26afadf744078ead935fec Author: Jason Yan Date: Thu Mar 23 22:05:10 2023 +0800 ext4: factor out ext4_hash_info_init() Factor out ext4_hash_info_init() to simplify __ext4_fill_super(). No functional change. Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20230323140517.1070239-2-yanaijie@huawei.com Signed-off-by: Theodore Ts'o commit e61caf04b9f8a2626714ffd12e734c555c758af4 Merge: c11d2e718c792 294e39e0d0344 Author: Jakub Kicinski Date: Fri Apr 14 18:56:13 2023 -0700 Merge branch 'page_pool-allow-caching-from-safely-localized-napi' Jakub Kicinski says: ==================== page_pool: allow caching from safely localized NAPI I went back to the explicit "are we in NAPI method", mostly because I don't like having both around :( (even tho I maintain that in_softirq() && !in_hardirq() is as safe, as softirqs do not nest). Still returning the skbs to a CPU, tho, not to the NAPI instance. I reckon we could create a small refcounted struct per NAPI instance which would allow sockets and other users so hold a persisent and safe reference. But that's a bigger change, and I get 90+% recycling thru the cache with just these patches (for RR and streaming tests with 100% CPU use it's almost 100%). Some numbers for streaming test with 100% CPU use (from previous version, but really they perform the same): HW-GRO page=page before after before after recycle: cached: 0 138669686 0 150197505 cache_full: 0 223391 0 74582 ring: 138551933 9997191 149299454 0 ring_full: 0 488 3154 127590 released_refcnt: 0 0 0 0 alloc: fast: 136491361 148615710 146969587 150322859 slow: 1772 1799 144 105 slow_high_order: 0 0 0 0 empty: 1772 1799 144 105 refill: 2165245 156302 2332880 2128 waive: 0 0 0 0 v1: https://lore.kernel.org/all/20230411201800.596103-1-kuba@kernel.org/ rfcv2: https://lore.kernel.org/all/20230405232100.103392-1-kuba@kernel.org/ ==================== Link: https://lore.kernel.org/r/20230413042605.895677-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 294e39e0d03449f32b0723d3fd99ab5c23881c05 Author: Jakub Kicinski Date: Wed Apr 12 21:26:05 2023 -0700 bnxt: hook NAPIs to page pools bnxt has 1:1 mapping of page pools and NAPIs, so it's safe to hoook them up together. Reviewed-by: Tariq Toukan Tested-by: Dragos Tatulea Signed-off-by: Jakub Kicinski commit 8c48eea3adf3119e0a3fc57bd31f6966f26ee784 Author: Jakub Kicinski Date: Wed Apr 12 21:26:04 2023 -0700 page_pool: allow caching from safely localized NAPI Recent patches to mlx5 mentioned a regression when moving from driver local page pool to only using the generic page pool code. Page pool has two recycling paths (1) direct one, which runs in safe NAPI context (basically consumer context, so producing can be lockless); and (2) via a ptr_ring, which takes a spin lock because the freeing can happen from any CPU; producer and consumer may run concurrently. Since the page pool code was added, Eric introduced a revised version of deferred skb freeing. TCP skbs are now usually returned to the CPU which allocated them, and freed in softirq context. This places the freeing (producing of pages back to the pool) enticingly close to the allocation (consumer). If we can prove that we're freeing in the same softirq context in which the consumer NAPI will run - lockless use of the cache is perfectly fine, no need for the lock. Let drivers link the page pool to a NAPI instance. If the NAPI instance is scheduled on the same CPU on which we're freeing - place the pages in the direct cache. With that and patched bnxt (XDP enabled to engage the page pool, sigh, bnxt really needs page pool work :() I see a 2.6% perf boost with a TCP stream test (app on a different physical core than softirq). The CPU use of relevant functions decreases as expected: page_pool_refill_alloc_cache 1.17% -> 0% _raw_spin_lock 2.41% -> 0.98% Only consider lockless path to be safe when NAPI is scheduled - in practice this should cover majority if not all of steady state workloads. It's usually the NAPI kicking in that causes the skb flush. The main case we'll miss out on is when application runs on the same CPU as NAPI. In that case we don't use the deferred skb free path. Reviewed-by: Tariq Toukan Acked-by: Jesper Dangaard Brouer Tested-by: Dragos Tatulea Signed-off-by: Jakub Kicinski commit b07a2d97ba5ef154fe736aa510e43a3299eee5f8 Author: Jakub Kicinski Date: Wed Apr 12 21:26:03 2023 -0700 net: skb: plumb napi state thru skb freeing paths We maintain a NAPI-local cache of skbs which is fed by napi_consume_skb(). Going forward we will also try to cache head and data pages. Plumb the "are we in a normal NAPI context" information thru deeper into the freeing path, up to skb_release_data() and skb_free_head()/skb_pp_recycle(). The "not normal NAPI context" comes from netpoll which passes budget of 0 to try to reap the Tx completions but not perform any Rx. Use "bool napi_safe" rather than bare "int budget", the further we get from NAPI the more confusing the budget argument may seem (particularly whether 0 or MAX is the correct value to pass in when not in NAPI). Reviewed-by: Tariq Toukan Tested-by: Dragos Tatulea Signed-off-by: Jakub Kicinski commit 17354d1528f902b3a4f66023cd24012e7999c4dc Author: Arnaldo Carvalho de Melo Date: Fri Apr 14 11:26:42 2023 -0300 perf test: Simplify for_each_test() to avoid tripping on -Werror=array-bounds When cross building on debian to the mips 32-bit arch we get these warnings: In function '__cmd_test', inlined from 'cmd_test' at tests/builtin-test.c:561:9: tests/builtin-test.c:260:66: error: array subscript 1 is outside array bounds of 'struct test_suite *[1]' [-Werror=array-bounds] 260 | for (k = 0, t = tests[j][k]; tests[j][k]; k++, t = tests[j][k]) | ^ tests/builtin-test.c:369:9: note: in expansion of macro 'for_each_test' 369 | for_each_test(j, k, t) { | ^~~~~~~~~~~~~ tests/builtin-test.c: In function 'cmd_test': tests/builtin-test.c:36:27: note: at offset 4 into object 'arch_tests' of size 4 36 | struct test_suite *__weak arch_tests[] = { | ^~~~~~~~~~ cc1: all warnings being treated as errors Switch to using a while(!sentinel) for the second level of the 'tests' array to avoid that compiler complaint. Signed-off-by: Arnaldo Carvalho de Melo commit d0ab8368c175f7b5ef0851283a2ba362a9ab327a Author: Jan Kara Date: Wed Mar 29 17:49:44 2023 +0200 Revert "ext4: Fix warnings when freezing filesystem with journaled data" After making ext4_writepages() properly clean all pages there is no need for special treatment of filesystem freezing. Revert commit e6c28a26b799c7640b77daff3e4a67808c74381c. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230329154950.19720-13-jack@suse.cz Signed-off-by: Theodore Ts'o commit ab382539adcb43f52d984abf58d8e3459cd707a2 Author: Jan Kara Date: Wed Mar 29 17:49:43 2023 +0200 ext4: Update comment in mpage_prepare_extent_to_map() Since filemap_write_and_wait() is now enough to get journalled data to final location update the comment in mpage_prepare_extent_to_map(). Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230329154950.19720-12-jack@suse.cz Signed-off-by: Theodore Ts'o commit 951cafa6b80e55b966047b0c9cc5564df8b92145 Author: Jan Kara Date: Wed Mar 29 17:49:42 2023 +0200 ext4: Simplify handling of journalled data in ext4_bmap() Now that ext4_writepages() gets journalled data into its final location we just use filemap_write_and_wait() instead of special handling of journalled data in ext4_bmap(). We can also drop EXT4_STATE_JDATA flag as it is not used anymore. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230329154950.19720-11-jack@suse.cz Signed-off-by: Theodore Ts'o commit 7c375870fdc5f50a001f8265cd8744a78d2d43ab Author: Jan Kara Date: Wed Mar 29 17:49:41 2023 +0200 ext4: Drop special handling of journalled data from ext4_quota_on() Now that ext4_writepages() makes sure all journalled data is committed and checkpointed, sync_filesystem() call done by dquot_quota_on() is enough for quota IO to see uptodate data. So drop special handling of journalled data from ext4_quota_on(). Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230329154950.19720-10-jack@suse.cz Signed-off-by: Theodore Ts'o commit 56c2a0e3d90d3822fab157883957523e327bc9ae Author: Jan Kara Date: Wed Mar 29 17:49:40 2023 +0200 ext4: Drop special handling of journalled data from ext4_evict_inode() Now that ext4_writepages() makes sure journalled data is on stable storage, write_inode_now() call in iput_final() is enough to make pagecache pages with journalled data really clean (data committed and checkpointed). So we can drop special handling of journalled data in ext4_evict_inode(). Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230329154950.19720-9-jack@suse.cz Signed-off-by: Theodore Ts'o commit 783ae448b7a21ca59ffe5bc261c17d9c3ebfe2ad Author: Jan Kara Date: Wed Mar 29 17:49:39 2023 +0200 ext4: Fix special handling of journalled data from extent zeroing The handling of journalled data in ext4_zero_range() is incomplete. We do not need to commit running transaction but we rather need to checkpoint pages with journalled data. If we don't, journal tail can be advanced beyond transaction containing the journalled data and if we then crash before committing the transaction doing the zeroing we will have inconsistent (too old) data in the file. Make sure file pages with journalled data are properly checkpointed before removing them from the page cache. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230329154950.19720-8-jack@suse.cz Signed-off-by: Theodore Ts'o commit c000dfec7e88cee660cbc594c9716ecc979dc1f1 Author: Jan Kara Date: Wed Mar 29 17:49:38 2023 +0200 ext4: Drop special handling of journalled data from extent shifting operations Now that filemap_write_and_wait() makes sure pages with journalled data are safely on disk, ext4_collapse_range() and ext4_insert_range() do not need special handling of journalled data. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230329154950.19720-7-jack@suse.cz Signed-off-by: Theodore Ts'o commit e360c6ed727401ad1a3b5080f06d2ec3a4b75f5b Author: Jan Kara Date: Wed Mar 29 17:49:37 2023 +0200 ext4: Drop special handling of journalled data from ext4_sync_file() Now that ext4_writepages() make sure all pages with journalled data are stable on disk, we don't need special handling of journalled data in ext4_sync_file(). Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230329154950.19720-6-jack@suse.cz Signed-off-by: Theodore Ts'o commit 1f1a55f0bf069799edd5f21a99ac1e3b10ebafee Author: Jan Kara Date: Wed Mar 29 17:49:36 2023 +0200 ext4: Commit transaction before writing back pages in data=journal mode When journalling data we currently just walk over pages, journal those that are marked for delayed dirtying (only pinned pages dirtied behing our back these days) and checkpoint other dirty pages. Because some pages may be part of running transaction the result is that after filemap_write_and_wait() we are not guaranteed pages are stable on disk. Thus places that want to flush current pagecache content need to jump through hoops to make sure journalled data is not lost. This is manageable in cases completely controlled by ext4 (such as extent shifting operations or inode eviction) but it gets ugly for stuff like fsverity. Furthermore it is rather error prone as people often do not realize journalled data needs special handling. So change ext4_writepages() to commit transaction with inode's data before going through the writeback loop in WB_SYNC_ALL mode. As a result filemap_write_and_wait() is now really getting pages to stable storage and makes pagecache pages safe to reclaim. Consequently we can remove the special handling of journalled data from several places in follow up patches. Note that this will make fsync(2) for journalled data more expensive as we will end up not only committing the transaction we need but also checkpointing the data (which we may have previously skipped if the data was part of the running transaction). If we really cared, we would need to introduce special VFS function for writing out & invalidating page cache for a range, use ->launder_page callback to perform checkpointing, and use it from all the places that need this functionality. But at this point I'm not convinced the complexity is worth it. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230329154950.19720-5-jack@suse.cz Signed-off-by: Theodore Ts'o commit 5e1bdea6391d09fde424a1406a04e01b208a04d2 Author: Jan Kara Date: Wed Mar 29 17:49:35 2023 +0200 ext4: Clear dirty bit from pages without data to write With journalled data it can happen that checkpointing code will write out page contents without clearing the page dirty bit. The logic in ext4_page_nomap_can_writeout() then results in us never calling mpage_submit_page() and thus clearing the dirty bit. Drop the optimization with ext4_page_nomap_can_writeout() and just always call to mpage_submit_page(). ext4_bio_write_page() knows when to redirty the page and the additional clearing & setting of page dirty bit for ordered mode writeout is not that expensive to jump through the hoops for it. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230329154950.19720-4-jack@suse.cz Signed-off-by: Theodore Ts'o commit 265e72efa99fcc0959f8d33d346a7e0f2e3fe201 Author: Jan Kara Date: Wed Mar 29 17:49:34 2023 +0200 ext4: Keep pages with journalled data dirty Currently we clear page dirty bit when we checkpoint some buffers from a page with journalled data or when we perform delayed dirtying of a page in ext4_writepages(). In a quest to simplify handling of journalled data we want to keep page dirty as long as it has either buffers to checkpoint or journalled dirty data. So make sure to keep page dirty in ext4_writepages() if it still has journalled data attached to it. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230329154950.19720-3-jack@suse.cz Signed-off-by: Theodore Ts'o commit d84c9ebdac1e39bc7b036c0c829ee8c1956edabc Author: Jan Kara Date: Wed Mar 29 17:49:33 2023 +0200 ext4: Mark pages with journalled data dirty Currently pages with journalled data written by write(2) or modified by block zeroing during truncate(2) are not marked as dirty. They are dirtied only once the transaction commits. This however makes writeback code think inode has no pages to write and so ext4_writepages() is not called to make pages with journalled data persistent. Mark pages with journalled data dirty (similarly as it happens for writes through mmap) so that writeback code knows about them and ext4_writepages() can do what it needs to to the inode. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230329154950.19720-2-jack@suse.cz Signed-off-by: Theodore Ts'o commit bd159398a2d2234de07d310132865706964aaaa7 Author: Jan Kara Date: Wed Mar 29 17:49:32 2023 +0200 jdb2: Don't refuse invalidation of already invalidated buffers When invalidating buffers under the partial tail page, jbd2_journal_invalidate_folio() returns -EBUSY if the buffer is part of the committing transaction as we cannot safely modify buffer state. However if the buffer is already invalidated (due to previous invalidation attempts from ext4_wait_for_tail_page_commit()), there's nothing to do and there's no point in returning -EBUSY. This fixes occasional warnings from ext4_journalled_invalidate_folio() triggered by generic/051 fstest when blocksize < pagesize. Fixes: 53e872681fed ("ext4: fix deadlock in journal_unmap_buffer()") Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230329154950.19720-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit 220ae987838c893fe11e46a3e3994a549f203daa Author: Yevgeny Kliteynik Date: Tue Aug 30 01:18:59 2022 +0300 net/mlx5: DR, Enable patterns and arguments for supporting devices Check if patterns and arguments for modify header action are supported and enable them accordingly. Signed-off-by: Muhammad Sammar Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit a21e52bb8f372b98855d931ca87e43e3c958c04f Author: Yevgeny Kliteynik Date: Sun Jan 1 00:20:53 2023 +0200 net/mlx5: DR, Add support for the pattern/arg parameters in debug dump Support the pattern/args-based MODIFY_HDR and TNL_L3_TO_L2 actions in dbg dump Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 40ff097f2503869fe5d96f796cf84ad4b17eaa9b Author: Yevgeny Kliteynik Date: Tue Nov 15 18:19:39 2022 +0200 net/mlx5: DR, Modify header action of size 1 optimization Set modify header action of size 1 directly on the STE for supporting devices, thus reducing number of hops and cache misses. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 947e258537ea43098d778b3315bde4fe1a1a10a3 Author: Yevgeny Kliteynik Date: Tue Nov 15 02:36:07 2022 +0200 net/mlx5: DR, Support decap L3 action using pattern / arg mechanism Use the new accelerated action for decap L3 on RX side: use the mechanism of pattern and argument same as in modify-header action. Signed-off-by: Erez Shitrit Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 62e40c8568251c65026712a90a9a486dc5d06d56 Author: Yevgeny Kliteynik Date: Tue Nov 8 11:56:11 2022 +0200 net/mlx5: DR, Apply new accelerated modify action and decapl3 If there is support for pattern/args, use the new accelerated modify header action for modify header and decap L3 actions. Otherwise fall back to the old modify-header implementation. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 0caebadda57b7f1740406b054ddff36cedf0bf39 Author: Yevgeny Kliteynik Date: Mon Nov 7 02:49:22 2022 +0200 net/mlx5: DR, Add modify header argument pointer to actions attributes While building the actions, add the pointer of the arguments for accelerated modify list action into the action's attributes. This will be used later on while building the specific STE for this action. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 608d4f1769d80824d0b02eca73243d377468ee68 Author: Yevgeny Kliteynik Date: Mon Mar 27 23:26:55 2023 +0300 net/mlx5: DR, Add modify header arg pool mechanism Added new mechanism for handling arguments for modify-header action. The new action "accelerated modify-header" asks for the arguments from separated area from the pattern, this area accessed via general objects. Handling of these object is done via the pool-manager struct. When the new header patterns are supported, while loading the domain, a few pools for argument creations will be created. The requests for allocating/deallocating arg objects are done via the pool manager API. Signed-off-by: Muhammad Sammar Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 17dc71c336aac381f59ba541cf85fb0c192d1c1c Author: Yevgeny Kliteynik Date: Tue Nov 15 00:11:38 2022 +0200 net/mlx5: DR, Fix QP continuous allocation When allocating a QP we allocate an RQ and an SQ, the RQ is stored first in memory and followed by the SQ. This allocation is not physically continiuos - it may span across different physical pages. SW Steering code always writes in pairs: 1BB write + 1BB read, or 2 continuous BBs of GTA WQE. This lead to an issue where RQ allocation was 4x16 which is equal to 1 WQE BB, causing 1 BB offset in the page and splitting the GTA WQE between different physical pages. The solution was to create the RQ with a even number of BBs and to have the RQ aligned to a page. Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 7d7c9453d679fe55d72d63bacb3b639cd963ebc0 Author: Yevgeny Kliteynik Date: Tue Nov 15 00:33:25 2022 +0200 net/mlx5: DR, Read ICM memory into dedicated buffer Instead of using the write buffer for reading we will use a dedicated buffer only for reading ICM memory. Due to the new support for args, we can have a case with pending_wc being odd number, and with reading into the same write buffer, it is possible to overwrite next write on the same slot. For example: pending_wc is 17 so the buffer for write is: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | and we have requests as follows: r wr wr wr wr wr wr wr wr Now, the first read will be written into the last write because we use the same buffer for read and write, before it was written to the HW and we will have a wrong data in the ICM area. Signed-off-by: Erez Shitrit Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 4605fc0a2b652070f45b0a17967c2cb11a9e5a6e Author: Yevgeny Kliteynik Date: Tue Nov 8 14:27:03 2022 +0200 net/mlx5: DR, Add support for writing modify header argument The accelerated modify header arguments are written in the HW area with special WQE and specific data format. New function was added to support writing of new argument type. Note that GTA WQE is larger than READ and WRITE, so the queue management logic was updated to support this. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit de69696b6eeef3c0704fdb3bcd473ddb4757130e Author: Yevgeny Kliteynik Date: Tue Aug 30 01:18:29 2022 +0300 net/mlx5: DR, Add create/destroy for modify-header-argument general object Add functions for creation/destruction of the new type of general object. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit b7ba743a2f1c7d14f281c6d1a2877984008e28e9 Author: Yevgeny Kliteynik Date: Tue Aug 30 01:21:10 2022 +0300 net/mlx5: DR, Check for modify_header_argument device capabilities Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 2533e726f4725b00a43b2d087480c7f2f414b56d Author: Yevgeny Kliteynik Date: Tue Aug 30 01:21:05 2022 +0300 net/mlx5: DR, Split chunk allocation to HW-dependent ways This way we are able to allocate chunk for modify_headers from 2 types: STEv0 that is allocated from the action area, and STEv1 that is allocating the chunks from the special area for patterns. Signed-off-by: Muhammad Sammar Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit da5d0027d666697f28af65fd0d975e9c7e2327c6 Author: Yevgeny Kliteynik Date: Sun Nov 6 12:52:23 2022 +0200 net/mlx5: DR, Add cache for modify header pattern Starting with ConnectX-6 Dx, we use new design of modify_header FW object. The current modify_header object allows for having only limited number of FW objects, so the new design of pattern and argument allows pattern reuse, saving memory, and having a large number of modify_header objects. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit b47dddc624efbc6c31afe0f4ee415ccbdeb0e4ce Author: Yevgeny Kliteynik Date: Sun Nov 6 12:50:41 2022 +0200 net/mlx5: DR, Move ACTION_CACHE_LINE_SIZE macro to header Move ACTION_CACHE_LINE_SIZE macro to header to be used by the pattern functions as well. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 4f2f29913684f729b70bbfa0c6c23c7025f1db89 Merge: 04523aceae8c8 5ce5e0d08e340 Author: Arnd Bergmann Date: Fri Apr 14 22:39:49 2023 +0200 Merge tag 'v6.3-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into soc/drivers mtk-svs: smaller coding style changes mtk-mutex: - add support for mt8365 display and mt8195 VPP mutex - add support for more then 32 mods - use module_platform_driver instead of open coding mtk-mmsys: - add support for mt8195 RSZ switching - add remove function - use module_platform_driver instead of open coding - split out mt8173 routing table from the legacy table - bump up resets in mt8173 to 64 - add support for mt6795 (Helio X10) - clean-up IS_REACHABLE code for cmdq * tag 'v6.3-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (25 commits) soc: mediatek: Kconfig: Add MTK_CMDQ dependency to MTK_MMSYS soc: mediatek: mutex: Use dev_err_probe() soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10 soc: mediatek: mtk-mmsys: Change MT8173 num_resets to 64 soc: mediatek: mtk-mmsys: Split out MT8173 mmsys DDP routing table soc: mediatek: Cleanup ifdefs for IS_REACHABLE(CONFIG_MTK_CMDQ) soc: mediatek: cmdq: Add inline functions for !CONFIG_MTK_CMDQ soc: mediatek: mtk-mutex: Use module_platform_driver() macro soc: mediatek: mtk-mutex: Replace max handles number with definition soc: mediatek: mtk-mutex: Compress of_device_id array entries soc: mediatek: mtk-mmsys: Add MODULE_DEVICE_TABLE() to allow auto-load soc: mediatek: mtk-mmsys: Compress of_device_id array entries soc: mediatek: mtk-mmsys: Use module_platform_driver() macro soc: mediatek: mtk-mmsys: Add .remove() callback dt-bindings: soc: mediatek: add display mutex for MT8365 SoC dt-bindings: soc: mediatek: specify which compatible requires clocks property soc: mediatek: mtk-svs: add thermal voltage compensation if needed soc: mediatek: mtk-svs: fix passing zero to 'PTR_ERR' soc: mediatek: mtk-svs: delete node name check soc: mediatek: mutex: support MT8195 VPPSYS ... Link: https://lore.kernel.org/r/bc9f7a74-ce12-b323-021c-ff2c0473e979@gmail.com Signed-off-by: Arnd Bergmann commit 1e14b4f9d9082f3a38dea2201e033c3b73785b0d Merge: 7e8298565d83a 13961ef828cbc Author: Arnd Bergmann Date: Fri Apr 14 22:32:40 2023 +0200 Merge tag 'v6.3-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into soc/dt mt6795 - enable frequency hopping controller (FHCTL) - add i2c, power domains and some clocks for video enconde/decode - Sony Xperia M5 enable touchscreen, proximity sensor, accelerometer and NFC mt8173 - align keys with DT binding mt8183 - enable GPU DVFS mt8186 - enable GPU mt8192 - enable GPU mt8195 - add mutex for Video Processor Pipeline Subsystem (VPP) - add support for Mali-G57 Valhall Natt GPU baked by panfrost - add support for display on vdosys1 - add thermal support - add display PWM mt8365 - add support for the eval kit including i2c, pmic-wrapper, mmc and ethernet * tag 'v6.3-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (50 commits) arm64: dts: mediatek: mt6795-xperia-m5: Add Bosch BMM050 Magnetometer arm64: dts: mediatek: mt6795-xperia-m5: Add Bosch BMA255 Accelerometer arm64: dts: mediatek: mt6795: Add tertiary PWM node arm64: dts: mediatek: mt8173: correct GPIO keys wakeup arm64: dts: mediatek: mt6795-xperia-m5: Add NXP PN547 NFC on I2C3 arm64: dts: mediatek: mt6795-xperia-m5: Add Sensortek STK3310 Proximity arm64: dts: mediatek: mt6795-xperia-m5: Add Synaptics RMI4 Touchscreen arm64: dts: mediatek: mt6795-xperia-m5: Enable I2C 0-3 busses arm64: dts: mediatek: mt6795: Add VDECSYS and VENCSYS clocks arm64: dts: mediatek: mt6795: Add SoC power domains arm64: dts: mediatek: mt6795: Add nodes for I2C controllers arm64: dts: mediatek: mt6795: xperia-m5: Enable Frequency Hopping arm64: dts: mediatek: mt6795: Add apmixedsys syscon node arm64: dts: mediatek: mt6795: Add Frequency Hopping Controller node arm64: dts: mediatek: cherry: Add configuration for display backlight arm64: dts: mediatek: mt8195: Add display pwm nodes arm64: dts: mediatek: mt8195: Add temperature mitigation threshold arm64: dts: mediatek: mt8195: Add thermal zones and thermal nodes arm64: dts: mediatek: add ethernet support for mt8365 SoC arm64: dts: mediatek: add mmc support for mt8365 SoC ... Link: https://lore.kernel.org/r/6920736b-ddb3-29df-d0b2-46db40cef49f@gmail.com Signed-off-by: Arnd Bergmann commit 7e8298565d83ab79dc9a3f05da01b4515d0d52f9 Merge: 718acce6f05df 6154a79fdcb3b Author: Arnd Bergmann Date: Fri Apr 14 22:29:36 2023 +0200 Merge tag 'v6.3-next-dts32' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into soc/dt mt7623: Disable not exising home key mt2701: change node name to match DT bindings * tag 'v6.3-next-dts32' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm: dts: mt7623: disable home key on Bananapi BPI-R2 arm: dts: mediatek: Fix existing NAND controller node name Link: https://lore.kernel.org/r/c3b17357-e08d-da7e-def0-a7f9e0b95cb7@gmail.com Signed-off-by: Arnd Bergmann commit 457bd7af1a17182e7f1f97eeb5d9107f8699e99d Author: Aaron Lewis Date: Fri Apr 7 16:32:54 2023 -0700 KVM: selftests: Test the PMU event "Instructions retired" Add testing for the event "Instructions retired" (0xc0) in the PMU event filter on both Intel and AMD to ensure that the event doesn't count when it is disallowed. Unlike most of the other events, the event "Instructions retired" will be incremented by KVM when an instruction is emulated. Test that this case is being properly handled and that KVM doesn't increment the counter when that event is disallowed. Signed-off-by: Aaron Lewis Link: https://lore.kernel.org/r/20230307141400.1486314-6-aaronlewis@google.com Link: https://lore.kernel.org/r/20230407233254.957013-7-seanjc@google.com Signed-off-by: Sean Christopherson commit e9f322bd23960026275014477e21f7a9445fd926 Author: Sean Christopherson Date: Fri Apr 7 16:32:53 2023 -0700 KVM: selftests: Copy full counter values from guest in PMU event filter test Use a single struct to track all PMC event counts in the PMU filter test, and copy the full struct to/from the guest when running and measuring each guest workload. Using a common struct avoids naming conflicts, e.g. the loads/stores testcase has claimed "perf_counter", and eliminates the unnecessary truncation of the counter values when they are propagated from the guest MSRs to the host structs. Zero the struct before running the guest workload to ensure that the test doesn't get a false pass due to consuming data from a previous run. Link: https://lore.kernel.org/r/20230407233254.957013-6-seanjc@google.com Reviewed by: Aaron Lewis Signed-off-by: Sean Christopherson commit c02c74428288282c9bd5fd37fe4135f3ca419a86 Author: Sean Christopherson Date: Fri Apr 7 16:32:52 2023 -0700 KVM: selftests: Use error codes to signal errors in PMU event filter test Use '0' to signal success and '-errno' to signal failure in the PMU event filter test so that the values are slightly less magical/arbitrary. Using '0' in the error paths is especially confusing as understanding it's an error value requires following the breadcrumbs to the host code that ultimately consumes the value. Arguably there should also be a #define for "success", but 0/-errno is a common enough pattern that defining another macro on top would likely do more harm than good. Link: https://lore.kernel.org/r/20230407233254.957013-5-seanjc@google.com Reviewed by: Aaron Lewis Signed-off-by: Sean Christopherson commit c140e93a0c11ac5a56834ac11ddb0f777307b2c1 Author: Aaron Lewis Date: Fri Apr 7 16:32:51 2023 -0700 KVM: selftests: Print detailed info in PMU event filter asserts Provide the actual vs. expected count in the PMU event filter test's asserts instead of relying on pr_info() to provide the context, e.g. so that all information needed to triage a failure is readily available even if the environment in which the test is run captures only the assert itself. Signed-off-by: Aaron Lewis [sean: rewrite changelog] Link: https://lore.kernel.org/r/20230407233254.957013-4-seanjc@google.com Signed-off-by: Sean Christopherson commit fa32233d51b9d26369b8371e986c1030c4201fae Author: Aaron Lewis Date: Fri Apr 7 16:32:50 2023 -0700 KVM: selftests: Add helpers for PMC asserts in PMU event filter test Add helper macros to consolidate the asserts that a PMC is/isn't counting (branch) instructions retired. This will make it easier to add additional asserts related to counting instructions later on. No functional changes intended. Signed-off-by: Aaron Lewis [sean: add "INSTRUCTIONS", massage changelog] Link: https://lore.kernel.org/r/20230407233254.957013-3-seanjc@google.com Signed-off-by: Sean Christopherson commit 33ef1411a36b47ae7ecdb919463b0d78576b3832 Author: Aaron Lewis Date: Fri Apr 7 16:32:49 2023 -0700 KVM: selftests: Add a common helper for the PMU event filter guest code Split out the common parts of the Intel and AMD guest code in the PMU event filter test into a helper function. This is in preparation for adding additional counters to the test. No functional changes intended. Signed-off-by: Aaron Lewis Link: https://lore.kernel.org/r/20230407233254.957013-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 38e4614c27210e63aafad1bb2e4a427515e46d71 Author: Simon Horman Date: Wed Mar 29 14:06:03 2023 +0200 vfio: correct kdoc for ops structures Address minor omissions from kdoc for ops structures flagged by check-kdoc: ./scripts/kernel-doc -Werror -none include/linux/vfio.h include/linux/vfio.h:114: warning: Function parameter or member 'name' not described in 'vfio_device_ops' include/linux/vfio.h:143: warning: Cannot understand * @migration_set_state: Optional callback to change the migration state for on line 143 - I thought it was a doc line include/linux/vfio.h:168: warning: Cannot understand * @log_start: Optional callback to ask the device start DMA logging. on line 168 - I thought it was a doc line Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20230329120603.468031-1-horms@kernel.org Signed-off-by: Alex Williamson commit 6467d0740a2b2a1fc18b5d9dbc86a9705dbc2cf9 Author: K V P, Satyanarayana Date: Fri Mar 17 08:22:22 2023 +0000 vfio/pci: Add DVSEC PCI Extended Config Capability to user visible list. The Designated Vendor-Specific Extended Capability (DVSEC Capability) is an optional Extended Capability that is permitted to be implemented by any PCI Express Function. This allows PCI Express component vendors to use the Extended Capability mechanism to expose vendor-specific registers that can be present in components by a variety of vendors. A DVSEC Capability structure can tell vendor-specific software which features a particular component supports. An example usage of DVSEC is Intel Platform Monitoring Technology (PMT) for enumerating and accessing hardware monitoring capabilities on a device. PMT encompasses three device monitoring features, Telemetry (device metrics), Watcher (sampling/tracing), and Crashlog. The DVSEC is used to discover these features and provide a BAR offset to their registers with the Intel vendor code. The current VFIO driver does not pass DVSEC capabilities to Virtual Machine (VM) which makes PMT not to work inside the virtual machine. This series adds DVSEC capability to user visible list to allow its use with VFIO. VFIO supports passing of Vendor Specific Extended Capability (VSEC) and raw write access to device. DVSEC also passed to VM in the same way as of VSEC. Signed-off-by: K V P Satyanarayana Link: https://lore.kernel.org/r/20230317082222.3355912-1-satyanarayana.k.v.p@intel.com Signed-off-by: Alex Williamson commit 541372bb62f289f4402cf55be51fb9cec7373627 Author: Le Ma Date: Tue Nov 16 21:42:28 2021 +0800 drm/amdgpu: add some basic elements for multiple XCD case Add some basic definitions and structure member. Inscrease MAX_WB slots to 1024 to support the increasing number of rings for multiple partitions. v2: unify naming style Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0530553ba842884737a689ae5fac11154dcf3122 Author: Le Ma Date: Thu May 19 19:49:59 2022 +0800 drm/amdgpu: move vmhub out of amdgpu_ring_funcs (v4) It looks better to place this field in ring structure. Also drop the repeated ring funcs definitions if there's no difference except for vmhub field. v2: rename the field to vm_hub like others (Le) v3: apply the changes to new ip blocks (Hawking) v4: fix vcn sw ring (Alex) Signed-off-by: Le Ma Reviewed-by: Christian König Reviewed-by: Hawking Zhang Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher commit b805d8d785e49cb3ee9279dad1402d5dcf902166 Author: Jane Jian Date: Fri Apr 14 11:33:19 2023 +0800 Revert "drm/amdgpu: enable ras for mp0 v13_0_10 on SRIOV" This reverts commit fe120b9f5ce873516a2604e4ff0c19084be94e8c. This patch impacts sriov multi-vf stability Signed-off-by: Jane Jian Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5e5d4b39ce2098a1d09064eb8b4e6b6b9a0cbd57 Author: Hawking Zhang Date: Mon Oct 3 15:37:47 2022 -0400 drm/amdgpu: add common ip block for GC 9.4.3 Add common IP handling for GC 9.4.3 Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 88c7ad91e378775a08f54b4a85068d51b5cf52f3 Author: Srinivasan Shanmugam Date: Fri Apr 14 01:20:18 2023 +0530 drm/amd/display: Add logging when DP link training Clock recovery is Successful Log when Clock recovery is successful, as part of DP link training process. Cc: Aurabindo Pillai Cc: Fangzhi Zuo Signed-off-by: Srinivasan Shanmugam Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 6a929fea7f80fc968f26baceecfdb5129d159c98 Author: Hawking Zhang Date: Fri Nov 26 17:20:32 2021 +0800 drm/amdgpu: add common early init support for GC 9.4.3 init asic funcs and cp/pg flags for GC 9.4.3 Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit de7511aef767656950d1c236a294c1b941f14ae7 Author: Hawking Zhang Date: Mon Oct 25 16:45:45 2021 +0800 drm/amdgpu: switch to v9_4_3 gfx_funcs callbacks for GC 9.4.3 add gfx_funcs callbacks implemenation based on gc_v9_4_3 ip headers Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit ca9beb8aac68468f1778ad0e0fdad4e204f91393 Author: Srinivasan Shanmugam Date: Thu Apr 13 21:19:15 2023 +0530 drm/amd/display: Add logging when setting DP sink power state fails Log if we fail to setup sink power states. Cc: Fangzhi Zuo Cc: Aurabindo Pillai Signed-off-by: Srinivasan Shanmugam Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 70bdfedaaec12dd47b24f16a59d31ae1bafffd99 Author: Graham Sider Date: Wed Oct 20 11:31:03 2021 -0400 drm/amdkfd: Add gfx_target_version for GC 9.4.3 Required for Thunk GFX version sysfs query. Signed-off-by: Graham Sider Reviewed-by: Amber Lin Signed-off-by: Alex Deucher commit 83688771400895ce39994f158362a3c666993504 Author: Amber Lin Date: Fri Sep 24 12:15:48 2021 -0400 drm/amdkfd: Enable HW_UPDATE_RPTR on GC 9.4.3 GC 9.4.3 uses the hardware to update AQL queues read pointer, so remove CP_HQD_PQ_CONTROL__NO_UPDATE_RPTR_MASK flag from MQD if it's GC 9.4.3, and keep it for other existing gfx9 ASICs. Signed-off-by: Amber Lin Acked-by: Felix Kuehling Signed-off-by: Alex Deucher commit 8855818ce7554fb7420200187fac9c3b69500da0 Author: Li Ma Date: Wed Apr 12 22:06:34 2023 +0800 drm/amdgpu: reserve the old gc_11_0_*_mes.bin Reserve the MOUDLE_FIRMWARE declaration of gc_11_0_*_mes.bin to fix falling back to old mes bin on failure via autoload. Fixes: 97998b893c30 ("drm/amd/amdgpu: introduce gc_*_mes_2.bin v2") Signed-off-by: Li Ma Reviewed-by: Yifan Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit fbc24293ca16b3b9ef891fe32ccd04735a6f8dc1 Author: Jesse Zhang Date: Wed Apr 12 17:04:03 2023 +0800 drm/amdgpu: change the reference clock for raven/raven2 Due to switch to golden tsc register to get clock counter for raven/ raven2. Chang the reference clock from 25MHZ to 100MHZ. Suggested-by: shanshengwang Reviewed-by: Evan Quan Signed-off-by: Jesse Zhang Signed-off-by: Alex Deucher commit f22067419e9683f8fba40ca3a0d56fb3106c7c6f Author: Aaron Liu Date: Wed Apr 5 19:22:20 2023 +0800 drm/amdgpu: skip kfd-iommu suspend/resume for S0ix GFX is in gfxoff mode during s0ix so we shouldn't need to actually execute kfd_iommu_suspend/kfd_iommu_resume operation. Signed-off-by: Aaron Liu Acked-by: Alex Deucher Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 7c0f7ee00c7d52e7ef1953e151a7f5d5fd5db64b Author: Hawking Zhang Date: Thu Oct 14 11:45:38 2021 +0800 drm/amdgpu: add gc v9_4_3 rlc_funcs implementation all the gc v9_4_3 registers fall in gc_rlcpdec address range have different relative offsets and base_idx from the ones defined in gc v9_0 ip headers. gc_v9_0_rlc_funcs can not be reused anymore for gc v9_4_3 v2: drop unused handshake function (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 50ad2fb7ec2b18186b8a4fa1c0e00f78b3de5119 Author: Reinette Chatre Date: Fri Apr 14 09:43:58 2023 -0700 selftests/resctrl: Fix incorrect error return on test complete An error snuck in between two recent conflicting changes: Until recently ->setup() used negative values to indicate normal test termination. This was changed in commit fa10366cc6f4 ("selftests/resctrl: Allow ->setup() to return errors") that transitioned ->setup() to use negative values to indicate errors and a new END_OF_TESTS to indicate normal termination. commit 42e3b093eb7c ("selftests/resctrl: Fix set up schemata with 100% allocation on first run in MBM test") continued to use negative return to indicate normal test termination. Fix mbm_setup() to use the new END_OF_TESTS to indicate error-free test termination. Fixes: 42e3b093eb7c ("selftests/resctrl: Fix set up schemata with 100% allocation on first run in MBM test") Reported-by: Ilpo Järvinen Link: https://lore.kernel.org/lkml/bb65cce8-54d7-68c5-ef19-3364ec95392a@linux.intel.com/ Signed-off-by: Reinette Chatre Signed-off-by: Shuah Khan commit 20aef201dafba6a1ffe9daa145c7f2c525b74aae Author: Colin Ian King Date: Fri Apr 14 09:08:09 2023 +0100 KVM: selftests: Fix spelling mistake "perrmited" -> "permitted" There is a spelling mistake in a test report message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20230414080809.1678603-1-colin.i.king@gmail.com Signed-off-by: Sean Christopherson commit 9403d9cb564b6a3af86cb18fe722097ed7620f6f Author: Kamalesh Babulal Date: Fri Apr 14 11:18:49 2023 +0530 docs: cgroup-v1/cpusets: update libcgroup project link Update the libcgroup project link, in the cgroup v1/cpusets documentation. Signed-off-by: Kamalesh Babulal Signed-off-by: Tejun Heo commit 430bb0d1c3376c988982f14bcbe71f917c89e1ab Author: Luis Chamberlain Date: Tue Apr 4 18:52:47 2023 -0700 module: fix kmemleak annotations for non init ELF sections Commit ac3b43283923 ("module: replace module_layout with module_memory") reworked the way to handle memory allocations to make it clearer. But it lost in translation how we handled kmemleak_ignore() or kmemleak_not_leak() for different ELF sections. Fix this and clarify the comments a bit more. Contrary to the old way of using kmemleak_ignore() for init.* ELF sections we stick now only to kmemleak_not_leak() as per suggestion by Catalin Marinas so to avoid any false positives and simplify the code. Fixes: ac3b43283923 ("module: replace module_layout with module_memory") Reported-by: Jim Cromie Acked-by: Song Liu Suggested-by: Catalin Marinas Reviewed-by: Catalin Marinas Signed-off-by: Luis Chamberlain commit f7995089c508a5a11b0491c7b348d5c07217a4e8 Author: Mike Snitzer Date: Fri Apr 14 12:32:20 2023 -0400 dm: unexport dm_get_queue_limits() There are no dm_get_queue_limits() callers outside of DM core and there shouldn't be. Also, remove its BUG_ON(!atomic_read(&md->holders)) to micro-optimize __process_abnormal_io(). Signed-off-by: Mike Snitzer commit 13f6facf3faeed34ca381aef4c9b153c7aed3972 Author: Mike Snitzer Date: Fri Apr 14 12:07:27 2023 -0400 dm: allow targets to require splitting WRITE_ZEROES and SECURE_ERASE Introduce max_write_zeroes_granularity and max_secure_erase_granularity flags in the dm_target struct. If a target sets these then DM core will split IO of these operation types accordingly (in terms of max_write_zeroes_sectors and max_secure_erase_sectors respectively). Signed-off-by: Mike Snitzer commit 04523aceae8c89d3c91ff33bdde6892f63a60f35 Author: Uwe Kleine-König Date: Wed Oct 12 16:00:32 2022 +0200 soc: ti: smartreflex: Simplify getting the opam_sr pointer The probe function stores the sr_info pointer using platform_set_drvdata(). Use the corresponding platform_get_drvdata() to retrieve that pointer in the remove and shutdown functions. This simplifies these functions and makes error handling unnecessary. This is a good thing as at least for .remove() returning an error code doesn't have the desired effect. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König Reviewed-by: Tony Lindgren Signed-off-by: Arnd Bergmann commit 718acce6f05df397092da870f3e77dfc12ac196c Merge: 8158597fd0ecf 8d58a8c0d930c Author: Arnd Bergmann Date: Fri Apr 14 18:00:39 2023 +0200 Merge tag 'qcom-arm64-for-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt More Qualcomm ARM64 Devicetree updated for v6.4 Devicetree for the QCM2210/QCM2290 is introduced. Support for the RB1 board is introduced on QRB2210, RB2 on QRB4210, the AL02 board on IPQ9574, the MI01.6 board is introduced on IPQ5332 and initial support for Xiaomi Mi A3 is introduced on SM6125. Support for the output-enable/disable flag is introduced in the pinctrl-msm driver, and the non-standard "input-enable" is dropped from a range of platforms. A wide range of smaller fixes are introduced, based on Devicetree validation. MSM8953 gains LPASS, MPSS and Wireless subsystem support. The iommus property is removed from PCIe nodes in all platforms, as the only the child devices should be associated with iommu groups, through the existing iommu-map property. A few QUP instances are introduced on the IPQ5332 platform, and support for the MI01.6 board is introduced. The reserved-memory map on Huawei Nexus 6P is updated with the addition of splash screen framebuffer memory and adjustment to the reserved memory region overlapping the smem region. Regulators are introduces for the SA8775P Ride platform. A regulator is marked always-on, for correctness, on Trogdor. Pinconf fixes are introduced to both sc7180 and sc7280 devices. A dedicated reviewers list is added for boards relevant to the Chromebook engineers. A set of pinconf fixes are introduced for sc8280xp, labels are introduced for Soundwire nodes. The sensor core remoteproc and FastRPC thereon, is introduce in SDM845 and enabled for OnePlus 6/6T and Shift Shift6mq. RMTFS, remoteprocs, ath10k and ramoops is introduced for the Lenovo Tab P11. UFS support is introduced on SM6125. SM8150 no longer defines the GPU to be in headless mode by default, GPU speedbins are introduced. GPU speedbins are introduced for SM8250 as well, as is support for display on Xiaomi Mi Pad 5 Pro, with two different panels supported. Soundwire controllers, ADSP audio codec macros and the Inline Crypto Engine support is added to the SM8550 platform. * tag 'qcom-arm64-for-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (85 commits) arm64: dts: qcom: Add base qrb4210-rb2 board dts arm64: dts: qcom: sm8550: add Soundwire controllers arm64: dts: qcom: sm8250: Add GPU speedbin support arm64: dts: qcom: sm8150: Add GPU speedbin support arm64: dts: qcom: sm8150: Don't start Adreno in headless mode arm64: dts: qcom: ipq5332: add support for the RDP468 variant arm64: dts: qcom: sdm630: move DSI opp-table out of DSI node arm64: dts: qcom: sm6115p-j606f: Enable ATH10K WiFi arm64: dts: qcom: sm6115p-j606f: Enable remoteprocs arm64: dts: qcom: sm6115: Add RMTFS arm64: dts: qcom: sm6115-j606f: Add ramoops node arm64: dts: qcom: msm8916-thwc-ufi001c: add function to pin config arm64: dts: qcom: sm8550: Add the Inline Crypto Engine node arm64: dts: MSM8953: Add lpass nodes arm64: dts: MSM8953: Add mpss nodes arm64: dts: MSM8953: Add wcnss nodes arm64: dts: qcom: sm8350: remove superfluous "input-enable" arm64: dts: qcom: sm8150: remove superfluous "input-enable" arm64: dts: qcom: apq8016: remove superfluous "input-enable" arm64: dts: qcom: sc8280xp-lenovo-thinkpad: correct pin drive-strength ... Link: https://lore.kernel.org/r/20230414031550.2412379-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 8158597fd0ecfacce8d9e42fb23e1adb1e6adad8 Merge: 0a25e38509b91 4e859ef0bae3c Author: Arnd Bergmann Date: Fri Apr 14 17:59:52 2023 +0200 Merge tag 'qcom-dts-for-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt A few more Qualcomm ARM32 DeviceTree updates for v6.4 This adds IPA definition to the sdx65 platform, and brings a few stylistic changes to sdx55 and sdx65. Compatibles for the two new Qualcomm Robotics Platform boards, RB1 and RB2, are defined, as is Xiaomi Mi A3 and the MI01.6 development baord on IPQ5332. These are all ARM64 boards, despite being introduced through the ARM32 pull request... * tag 'qcom-dts-for-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: dt-bindings: arm: qcom: Document the Qualcomm qrb4210-rb2 board ARM: dts: qcom: sdx55-fn980: Move "status" property to the end of node ARM: dts: qcom: sdx55: Move reset and wake gpios to board dts dt-bindings: arm: qcom: document MI01.6 board based on IPQ5332 family dt-bindings: arm: qcom: Document xiaomi,laurel-sprout board dt-bindings: arm: qcom: Add QRB2210/QCM2290 and RB1 board ARM: dts: qcom: sdx65: move status properties to end of nodes ARM: dts: qcom: sdx65: add IPA information Link: https://lore.kernel.org/r/20230414023723.2411793-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 0a25e38509b91b07ed4cdc9e35aaf82e66f37d66 Merge: 9e0dabbd9b0de 7d4f0b0df7c5e Author: Arnd Bergmann Date: Fri Apr 14 17:59:07 2023 +0200 Merge tag 'aspeed-6.4-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc into soc/dt ASPEED device tree updates for 6.4 - Fixes for romed8hm3 GPIO, asrock SPI clocks, bonnell eeprom - Misc updates for various BMC systems - Add AST2600 UDMA node * tag 'aspeed-6.4-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc: ARM: dts: aspeed-g6: Add UDMA node ARM: dts: aspeed: greatlakes: add mctp device ARM: dts: aspeed: greatlakes: Add gpio names ARM: dts: aspeed: p10bmc: Change power supply info ARM: dts: aspeed: bonnell: Update eeprom size ARM: dts: aspeed: bonnell: Remove MAC3 ARM: dts: aspeed: everest: Add reserved memory for TPM event log ARM: dts: aspeed: mtmitchell: Enable NCSI ARM: dts: aspeed: asrock: Correct firmware flash SPI clocks ARM: dts: aspeed: e3c246d4i: Add PECI device ARM: dts: aspeed: romed8hm3: Fix GPIO polarity of system-fault LED Link: https://lore.kernel.org/r/CACPK8XfmK5S=1PQjBQHb6daDR3qTWN-_NLoXP7+ZDCk13wDxcA@mail.gmail.com Signed-off-by: Arnd Bergmann commit 9e0dabbd9b0de0a725767c9d71dd9c3b941ade02 Merge: 0b3751dc8d4cb e6d356b146b75 Author: Arnd Bergmann Date: Fri Apr 14 17:58:26 2023 +0200 Merge tag 'arm-soc/for-6.4/devicetree-arm64' of https://github.com/Broadcom/stblinux into soc/dt This pull request contains Broadcom ARM64-based SoCs Device Tree changes for 6.4, please pull the following: - Rob fixes the GICv3 ITS node name for the Stingray platforms - William adds the new-style High Speed SPI controller nodes to the BCA SocS - Rafal fixes the NAND controller interrupt name for BCM4908, LED node(s) and procmon for BCM4908. He also adds support for the USB ports, and declares USB triggered LEDs for the Netgear R8000P and TP-Link C2300. * tag 'arm-soc/for-6.4/devicetree-arm64' of https://github.com/Broadcom/stblinux: arm64: dts: broadcom: bcmbca: bcm4908: add TP-Link C2300 USB LED triggers arm64: dts: broadcom: bcmbca: bcm4908: add Netgear R8000P USB LED triggers arm64: dts: broadcom: bcmbca: bcm4908: add on-SoC USB ports arm64: dts: broadcom: bcmbca: bcm4908: fix procmon nodename arm64: dts: broadcom: bcmbca: bcm4908: fix LED nodenames arm64: dts: broadcom: bcmbca: bcm4908: fix NAND interrupt name arm64: dts: broadcom: bcmbca: Add spi controller node arm64: dts: broadcom: stringray: Fix GICv3 ITS node name Link: https://lore.kernel.org/r/20230410232606.1917803-2-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 0b3751dc8d4cbf5c61f25387b26e14c35548d286 Merge: 325ae154b42b3 7858dded8c1e9 Author: Arnd Bergmann Date: Fri Apr 14 17:57:53 2023 +0200 Merge tag 'arm-soc/for-6.4/devicetree' of https://github.com/Broadcom/stblinux into soc/dt This pull request contains Broadcom ARM-based SoCs Device Tree changes for 6.4, please pull the following: - William adds the new-style High Speed SPI controller node to the BCA SoCs * tag 'arm-soc/for-6.4/devicetree' of https://github.com/Broadcom/stblinux: ARM: dts: broadcom: bcmbca: Add spi controller node Link: https://lore.kernel.org/r/20230410232606.1917803-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 325ae154b42b32c8ee114f4286364d153117fe59 Author: Fabio Estevam Date: Tue Apr 11 00:03:00 2023 +0200 ARM: dts: nomadik: Replace deprecated spi-gpio properties As stated in Documentation/devicetree/bindings/spi/spi-gpio.yaml, 'gpio-mosi' and 'gpio-sck' are deprecated properties. Use the recommeded 'mosi-gpios' and 'sck-gpios' instead. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20230407162504.1683422-1-festevam@gmail.com Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230410220300.2431524-1-linus.walleij@linaro.org Signed-off-by: Arnd Bergmann commit 10678a0751bf31b6b9ef494c175fecbf72791dcb Merge: a8127d2aae88e 105560b4fca4d Author: Arnd Bergmann Date: Fri Apr 14 17:54:35 2023 +0200 Merge tag 'qcom-arm64-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt Qualcomm ARM64 updates for v6.4 PCI I/O and MEM ranges are corrected across all targets with PCIe enabled. Likewise is CPU clocks defined to be provided from CPUfreq for a wide range of platforms, to satisfy the OPP definitions, and LLCC bank information is corrected for all relevant platforms. IPQ5332 gains SMEM, CPUfreq and support for triggering download mode. The MI01.2 board is introduced. On MSM8916 WCN compatibles are moved to be defined per board, to avoid issues when boards rely on the incorrect defaults. Support for Yiming UZ801 4G modem stick is introduced. XO clock is defined and fed to RPMCC on MSM8953 and MSM8976, to ensure clock trees are properly rooted. DSI clocks feeding into gcc are described on MSM8953. On MSM8996 the external audio components are moved from the SoC dtsi. A few DWC3 quirks are added. On MSM8998 GPIO names are introduced for Sony Xperia XZ Premium, XZ1 and XZ1 Compact. A numbe of boards have GPIO keys properly marked as wakeup-source. The SA8775P platform is extended with CPUfreq, UARTs, I2C controllers, SPI controllers, SPMI and PMICs, PDC support. The associated PMICs gains reset and power key support, as well as thermal zones defined. Nodes are sorted. On top of this the SA8775P Ride board/platform is introduced. On SC7180 and SC7280 a range of fixes coming from DeviceTree validation are introduced, some clearing up unused properties, others correcting errors. A number of Google rev0 boards on SC7180 are dropped, as these are not considered to be in use by anyone anymore. On SC8280XP RTC support is introduced and enabled for the CRD and Lenovo Thinkpad X13s. It gains another UART, upon which Bluetooth is enabled on the Lenovo ThinkPad X13s. The touchpad definition is altered to attempt to probe both devices seen in the wild. A number of bug fixes are also introduced, and the regulator definitions on X13s are corrected. On SDM845 dynamic power coefficients are improved. BWMON compatible is corrected. Xiaomi Pocophone F1 gains notification LED. Sony Xperia XZ2, XZ2 Compact and XZ3 gains display, touchscreen, gpu and remoteproc support. OnePlus 6 and 6T gains hall sensor. GPU clock controller and remoteproc nodes are added for SM6115. CPU clock are defined to come from CPUfreq. Board-specific USB-properties are moved out of the SoC dtsi. On SM6375 L3 scaling, IMEM, RMTFS, RPM sleep stats, Tsens, modem remoteproc and WiFi nodes are added. Tsens thermal zones are defined and additional low power states are defined. Sony Xperia 10 IV gains volume down key support. On SM8150 another UART is introduced, to be used by GNSS on the SA8155 ADP. Support for the Flash LED block in PM8150L is added. On SM8250 TPDM MM and PRNG is defined, MHI region is added to PCIe node. A few bug fixes are introduced after Devicetree validation. The DisplayPort controller on both SM8350 and SM8450 is defined and the related QMP instance is transitioned to the USB3/DP combo variant. IMEM and PIL info is introduced, for post mortem debugging of remoteprocs. On the HDK PMIC GLINK is enabled and role switch is enabled. Some audio resources are corrected. A typo in the USB role property of the Microsoft Surface is corrected, thanks to DeviceTree validation. PCIe controllers and PHYs descriptions are corrected, and pinctrl state definitions are moved from the soc to the board definition. BWMON compatibles are corrected. PM8550B gains the definition of the eUSB2 repeater and this is enabled on the MTP. PMIC GLINK is also defined for the MTP and connected to DWC3, for role switching support. In addition to this, a range of cleanups based on Devicetree validation is introduced. A few clock bindings are introduced, from topic-branches shared with the clock tree, to aid introduction of references to these. * tag 'qcom-arm64-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (256 commits) arm64: dts: qcom: sc8280xp-x13s: Add bluetooth arm64: dts: qcom: sc8280xp: Define uart2 arm64: dts: qcom: sc8280xp: Add "mhi" region to the PCIe nodes arm64: dts: qcom: sm8250: Add "mhi" region to the PCIe nodes arm64: dts: qcom: sdm845: Add "mhi" region to the PCIe nodes arm64: dts: qcom: sa8775p-ride: set gpio-line-names for PMIC GPIOs arm64: dts: qcom: sa8775p: add PMIC GPIO controller nodes arm64: dts: qcom: sa8775p: pmic: add thermal zones arm64: dts: qcom: sa8775p: pmic: add support for the pmm8654 RESIN input arm64: dts: qcom: sa8775p: pmic: add the power key arm64: dts: qcom: sa8775p: add the Power On device node arm64: dts: qcom: sa8775p: add support for the on-board PMICs arm64: dts: qcom: sa8775p: add the spmi node arm64: dts: qcom: sa8775p: add the pdc node arm64: dts: qcom: sa8775p: sort soc nodes by reg property arm64: dts: qcom: sa8775p: pad reg properties to 8 digits arm64: dts: qcom: sc8280xp: correct Soundwire wakeup interrupt name arm64: dts: qcom: sdm845-tama: Enable GPI_DMA0/1 arm64: dts: qcom: sdm845-tama: Enable GPU arm64: dts: qcom: sdm845-tama: Enable remoteprocs ... Link: https://lore.kernel.org/r/20230410170233.5931-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit a8127d2aae88e09539f35114711c0f7f5e7fc897 Merge: c47b89b4189fa 26c56dbddc304 Author: Arnd Bergmann Date: Fri Apr 14 17:52:32 2023 +0200 Merge tag 'qcom-dts-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt Qualcomm ARM32 DeviceTree updates for v6.4 stdout-path is defined for the ALFA Network AP120C-AC, to avoid the need to pass this information on the kernel commandline. Ath10k is wired up to read calibration data from the "ART" partition. PCI I/O port ranges are fixed on IPQ4019 and IPQ8064. Supply clocks are defined for KPSS L2CC and ACC clock controllers. Supply clocks for the global clock controller are being specified on IPQ4019, MSM8974 and MSM8226. PCIe RC support is enabled on the SDX55 T55 development board, IPA is defined for the SDX55 and a number of cleanup patches are introduced. Compatibles for QRB2210/QCM2290, IPQ9574, QRD8550 and IPQ5332 platforms are added, and the RB1, Yiming LTE dongle, Xiaomi Mi A3, MI01.2 and MI01.6 boards. * tag 'qcom-dts-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (28 commits) dt-bindings: arm: qcom: Add Yiming LTE dongle uz801-v3.0 (yiming-uz801v3) dt-bindings: vendor-prefixes: Add Henan Yiming Technology Co., Ltd. ARM: dts: qcom: sdx55: add dedicated SDX55 TCSR compatible ARM: dts: qcom: sdx55-t55: Move "status" property down ARM: dts: qcom: sdx55-t55: Enable PCIe RC support ARM: dts: qcom: sdx55: List the property values vertically ARM: dts: qcom: sdx55: Add support for PCIe RC controller ARM: dts: qcom: sdx55: Rename pcie0_{phy/lane} to pcie_{phy/lane} ARM: dts: qcom: sdx55: Fix the unit address of PCIe EP node ARM: dts: qcom: ipq8064: Fix the PCI I/O port range ARM: dts: qcom: ipq4019: Fix the PCI I/O port range ARM: dts: qcom: apq8064: Use 0x prefix for the PCI I/O and MEM ranges dt-bindings: arm: qcom: Add ipq9574 compatible ARM: dts: qcom: msm8974: add correct XO clock source to GCC node ARM: dts: qcom: msm8226: add clocks and clock-names to GCC node ARM: dts: qcom: rename kpss-acc-v2 nodes to power-manager nodes ARM: dts: qcom: add missing clock configuration for kpss-acc-v1 ARM: dts: qcom: add and fix clock configuration for kpss-gcc nodes ARM: dts: qcom: add per SoC compatible for qcom,kpss-gcc nodes dt-bindings: qcom: add ipq5332 boards ... Link: https://lore.kernel.org/r/20230410155226.5127-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit c47b89b4189fac278b19eb057fda413b9f0b06e8 Merge: 17e26de12a038 891db0c48efb4 Author: Arnd Bergmann Date: Fri Apr 14 17:48:56 2023 +0200 Merge tag 'ti-k3-dt-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/dt TI K3 device tree updates for v6.4 New features: * Overlays for CPSW9G and CPSW5G on J721e-evm, J7200-evm * Add support for AM625 based BeaglePlay, AM62-LP-SK * Audio, RTC, watchdog support for AM625 * McSPI for J7200,j721e, j721s2, J784s4 * ADC for j721s2 * Crypto acceleration, CPSW2G for J784s4 Non critical fixes: AM62, AM62a: * Fix schematics error to increase DDR to 4GB on AM62a-SK * L2Cache size fix (AM62a/AM625) * ti,vbus-divider property to USB1 on AM625-SK * Gpio count fix for AM625 J7200,j721e, j721s2, J784s4, AM68, AM69: * ti,sci-dev-id for J784s4 NAVSS nodes * j721e-sk: Drop application specific firmware name * am68-sk: Fix the gpio expander lines for production version Cleanups: * Pinmux header move to dt folder (next kernel PR, we will drop the uapi header). * j721e: ti,strobe-sel property cleanup for descoped HS400 MMC operation * tag 'ti-k3-dt-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: (34 commits) arm64: dts: ti: k3-j784s4-evm: Add eMMC mmc0 support arm64: dts: ti: Enable audio on SK-AM62(-LP) arm64: dts: ti: k3-am62-main: Add McASP nodes arm64: dts: ti: k3-j784s4: Add MCSPI nodes arm64: dts: ti: k3-j721s2: Add MCSPI nodes arm64: dts: ti: k3-j7200: Add MCSPI nodes arm64: dts: ti: k3-j721e: Add MCSPI nodes arm64: ti: dts: Add support for AM62x LP SK arm64: dts: ti: Refractor AM625 SK dts dt-bindings: arm: ti: k3: Add compatible for AM62x LP SK arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1 arm64: dts: ti: k3-am68-sk-base-board: Update IO EXP GPIO lines for Rev E2 arm64: dts: ti: Add k3-am625-beagleplay dt-bindings: arm: ti: Add BeaglePlay arm64: dts: ti: k3-j7200: Add overlay to enable CPSW5G ports in QSGMII mode arm64: dts: ti: j7200-main: Add CPSW5G nodes arm64: dts: ti: k3-j721e: Add overlay to enable CPSW9G ports in QSGMII mode arm64: dts: ti: k3-j721e: Add CPSW9G nodes arm64: dts: ti: k3-j784s4-evm: Enable MCU CPSW2G arm64: dts: ti: k3-j721s2-common-proc-board: Add pinmux information for ADC ... Link: https://lore.kernel.org/r/20230410140521.3u3fftgnejakqnzj@shakable Signed-off-by: Arnd Bergmann commit 17e26de12a038e2d5d595777666e3179cbeffdf8 Merge: 2925732f0c5cf 2f04079bf5920 Author: Arnd Bergmann Date: Fri Apr 14 17:47:46 2023 +0200 Merge tag 'renesas-dts-for-v6.4-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DTS updates for v6.4 (take two) - Add PWM support for the R-Car H1 and H2 SoCs, - Add slide switch and I2C support for the Marzen development board, - Add SCI (serial) and Camera support for the RZ/G2L SoC and the RZ/G2L SMARC EVK development board, - Add IOMMU support for the R-Car V4H SoC, - Miscellaneous fixes and improvements. * tag 'renesas-dts-for-v6.4-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: r8a779a0: Revise renesas,ipmmu-main arm64: dts: renesas: falcon-csi-dsi: Set bus-type for MAX96712 arm64: dts: renesas: r8a779g0: Add iommus to MMC node arm64: dts: renesas: r8a779g0: Add iommus to DMAC nodes arm64: dts: renesas: r8a779g0: Add IPMMU nodes arm64: dts: renesas: r8a779f0: Revise renesas,ipmmu-main arm64: dts: renesas: rzg2l-smarc: Enable CRU, CSI support arm64: dts: renesas: r9a07g044: Add CSI and CRU nodes arm64: dts: renesas: r9a07g044: Enable SCI0 using DT overlay ARM: dts: r8a7790: Add PWM device nodes ARM: dts: r8a7790: Add TPU device node ARM: dts: marzen: Enable I2C support ARM: dts: marzen: Add slide switches ARM: dts: r8a7779: Add PWM support dt-bindings: clock: r8a7779: Add PWM module clock arm64: dts: renesas: rzg2l: Add clock-names and reset-names to DMAC nodes Link: https://lore.kernel.org/r/cover.1681113117.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 2925732f0c5cf69fdd503ef42b9c8293480d0cab Merge: ff68e81685638 95e2ac6ae9f23 Author: Arnd Bergmann Date: Fri Apr 14 17:47:14 2023 +0200 Merge tag 'v6.4-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt MMC-aliases for rk3288-veyron devices and some dts node adaptions for yaml conversions recently merged into the drm tree. * tag 'v6.4-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: fix rk3288 dp node ARM: dts: rockchip: fix rk3288 lvds node ARM: dts: rockchip: fix rk3288 dsi node ARM: dts: rockchip: Add mmc aliases for rk3288-veyron devices Link: https://lore.kernel.org/r/9713202.NyiUUSuA9g@phil Signed-off-by: Arnd Bergmann commit ff68e816856383c2a31f45a94d5b55f18e90de03 Merge: 8f09b5ec4177d 07099a551803e Author: Arnd Bergmann Date: Fri Apr 14 17:44:52 2023 +0200 Merge tag 'v6.4-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt New boards: OrangePi R1 Plus, NanoPi R2C + R5C + R5S, Khadas Edge2. General RK3588 additions: audio, thermal management, sdmmc, clock fixes, watchdog; RK3588-Rock5b: rtc, pwm, audio. Display support for Odroid Go Super and PinephonePro. And some misc adaptions for recently merged yaml binding conversions. * tag 'v6.4-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (35 commits) arm64: dts: rockchip: correct panel supplies on Odroid Go Super arm64: dts: rockchip: Add rk3588-rock-5b analog audio arm64: dts: rockchip: Add I2S rk3588 nodes arm64: dts: rockchip: Add rk3588s I2S nodes arm64: dts: rockchip: Assign PLL_PPLL clock rate to 1.1 GHz on rk3588s arm64: dts: rockchip: Fix SCMI assigned clocks on rk3588s arm64: dts: rockchip: add rk3588 thermal sensor arm64: dts: rockchip: Add pwm-fan to rk3588-rock-5b arm64: dts: rockchip: Enable RTC support for Rock 5B arm64: dts: rockchip: Add Xunlong OrangePi R1 Plus LTS dt-bindings: Add doc for Xunlong OrangePi R1 Plus LTS arm64: dts: rockchip: Add FriendlyARM NanoPi R2C dt-bindings: Add doc for FriendlyARM NanoPi R2C arm64: dts: rockchip: Add touchscreen support to rk3399-pinephone-pro arm64: dts: rockchip: Add internal display support to rk3399-pinephone-pro dt-bindings: watchdog: rockchip: Add rockchip,rk3588-wdt string arm64: dts: rockchip: Enable watchdog support for RK3588 arm64: dts: rockchip: remove hclk from dsi node on rk356x arm64: dts: rockchip: rename vbus-supply to phy-supply in rk3566-box-demo.dts arm64: dts: rockchip: fix rk3399 dp node ... Link: https://lore.kernel.org/r/7289562.MhkbZ0Pkbq@phil Signed-off-by: Arnd Bergmann commit 8f09b5ec4177d52e9c6a32e930bc12256603c14b Merge: 58982e1d3c1ac a140b18f0cc79 Author: Arnd Bergmann Date: Fri Apr 14 17:42:27 2023 +0200 Merge tag 'sunxi-dt-for-6.4-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/dt - added D1 crypto node - enabled DVFS on OrangePi PC2 board - added GPIO line names on Nezha D1 board - added suniv USB nodes and enabled on licheepi-nano - new suniv boards: PopStick v1.1 and Lctech Pi - added Allwinner T113-s DTSI - added MangoPi MQ-R T113-s board variant - swapped DMA names for A23, A31, A33, D1, H3, H5, V3s * tag 'sunxi-dt-for-6.4-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: riscv: dts: allwinner: d1: Switch dma-names order for snps,dw-apb-uart nodes ARM: dts: sunxi: h3/h5: Switch dma-names order for snps,dw-apb-uart nodes ARM: dts: sun8i: v3s: Switch dma-names order for snps,dw-apb-uart nodes ARM: dts: sun8i: a23/a33: Switch dma-names order for snps,dw-apb-uart nodes ARM: dts: sun6i: a31: Switch dma-names order for snps,dw-apb-uart nodes ARM: dts: sunxi: add MangoPi MQ-R-T113 board dt-bindings: arm: sunxi: document MangoPi MQ-R board names ARM: dts: sunxi: add Allwinner T113-s SoC .dtsi dts: add riscv include prefix link ARM: dts: suniv: Add Lctech Pi F1C200s devicetree ARM: dts: suniv: add device tree for PopStick v1.1 dt-binding: arm: sunxi: add two board compatible strings dt-bindings: vendor-prefixes: add Source Parts and Lctech names ARM: dts: suniv: licheepi-nano: enable USB ARM: dts: suniv: add USB-related device nodes riscv: dts: nezha-d1: add gpio-line-names arm64: dts: allwinner: h5: OrangePi PC2: add OPP table to enable DVFS riscv: dts: allwinner: d1: Add crypto engine node Link: https://lore.kernel.org/r/20230408125156.GA17050@jernej-laptop Signed-off-by: Arnd Bergmann commit 611d4c716db0141cfc436994dc5aff1d69c924ad Author: Guilherme G. Piccoli Date: Wed Apr 12 16:49:41 2023 -0700 x86/hyperv: Mark hv_ghcb_terminate() as noreturn Annotate the function prototype and definition as noreturn to prevent objtool warnings like: vmlinux.o: warning: objtool: hyperv_init+0x55c: unreachable instruction Also, as per Josh's suggestion, add it to the global_noreturns list. As a comparison, an objdump output without the annotation: [...] 1b63: mov $0x1,%esi 1b68: xor %edi,%edi 1b6a: callq ffffffff8102f680 1b6f: jmpq ffffffff82f217ec # unreachable 1b74: cmpq $0xffffffffffffffff,-0x702a24(%rip) [...] Now, after adding the __noreturn to the function prototype: [...] 17df: callq ffffffff8102f6d0 17e4: test %al,%al 17e6: je ffffffff82f21bb9 [...] 1bb9: mov $0x1,%esi 1bbe: xor %edi,%edi 1bc0: callq ffffffff8102f680 1bc5: nopw %cs:0x0(%rax,%rax,1) # end of function Reported-by: Arnd Bergmann Signed-off-by: Guilherme G. Piccoli Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/32453a703dfcf0d007b473c9acbf70718222b74b.1681342859.git.jpoimboe@kernel.org commit 6e36a56a5f617262c0e8ae7e961487361c720b9e Author: Josh Poimboeuf Date: Wed Apr 12 16:49:40 2023 -0700 scsi: message: fusion: Mark mpt_halt_firmware() __noreturn mpt_halt_firmware() doesn't return. Mark it as such. Fixes the following warnings: vmlinux.o: warning: objtool: mptscsih_abort+0x7f4: unreachable instruction vmlinux.o: warning: objtool: mptctl_timeout_expired+0x310: unreachable instruction Reported-by: kernel test robot Reported-by: Mark Rutland Debugged-by: Peter Zijlstra Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/d8129817423422355bf30e90dadc6764261b53e0.1681342859.git.jpoimboe@kernel.org commit 52668badd34b4b346f32c33a9bcba069a06c3caa Author: Josh Poimboeuf Date: Wed Apr 12 16:49:39 2023 -0700 x86/cpu: Mark {hlt,resume}_play_dead() __noreturn Fixes the following warning: vmlinux.o: warning: objtool: resume_play_dead+0x21: unreachable instruction Reported-by: kernel test robot Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/ce1407c4bf88b1334fe40413126343792a77ca50.1681342859.git.jpoimboe@kernel.org commit 09c5ae30d007514a1be870fa5873ad55c3319f3a Author: Josh Poimboeuf Date: Wed Apr 12 16:49:38 2023 -0700 btrfs: Mark btrfs_assertfail() __noreturn Fixes a bunch of warnings including: vmlinux.o: warning: objtool: select_reloc_root+0x314: unreachable instruction vmlinux.o: warning: objtool: finish_inode_if_needed+0x15b1: unreachable instruction vmlinux.o: warning: objtool: get_bio_sector_nr+0x259: unreachable instruction vmlinux.o: warning: objtool: raid_wait_read_end_io+0xc26: unreachable instruction vmlinux.o: warning: objtool: raid56_parity_alloc_scrub_rbio+0x37b: unreachable instruction ... Reported-by: kernel test robot Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/960bd9c0c9e3cfc409ba9c35a17644b11b832956.1681342859.git.jpoimboe@kernel.org commit 1c47c8758a11345ac643fa68cb70b708a6668883 Author: Josh Poimboeuf Date: Wed Apr 12 16:49:37 2023 -0700 objtool: Include weak functions in global_noreturns check If a global function doesn't return, and its prototype has the __noreturn attribute, its weak counterpart must also not return so that it matches the prototype and meets call site expectations. To properly follow the compiled control flow at the call sites, change the global_noreturns check to include both global and weak functions. On the other hand, if a weak function isn't in global_noreturns, assume the prototype doesn't have __noreturn. Even if the weak function doesn't return, call sites treat it like a returnable function. Fixes the following warning: kernel/sched/build_policy.o: warning: objtool: do_idle() falls through to next function play_idle_precise() Reported-by: kernel test robot Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Miroslav Benes Link: https://lore.kernel.org/r/ede3460d63f4a65d282c86f1175bd2662c2286ba.1681342859.git.jpoimboe@kernel.org commit 27dea14c7f05106f39850a9239874cd38703b405 Author: Josh Poimboeuf Date: Wed Apr 12 16:49:36 2023 -0700 cpu: Mark nmi_panic_self_stop() __noreturn In preparation for improving objtool's handling of weak noreturn functions, mark nmi_panic_self_stop() __noreturn. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/316fc6dfab5a8c4e024c7185484a1ee5fb0afb79.1681342859.git.jpoimboe@kernel.org commit 7412a60decec2a6744cf773280ff17a0f89e8395 Author: Josh Poimboeuf Date: Wed Apr 12 16:49:35 2023 -0700 cpu: Mark panic_smp_self_stop() __noreturn In preparation for improving objtool's handling of weak noreturn functions, mark panic_smp_self_stop() __noreturn. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/92d76ab5c8bf660f04fdcd3da1084519212de248.1681342859.git.jpoimboe@kernel.org commit 5ab6876c7843db5fe8bef691c5fdb92518b12070 Author: Josh Poimboeuf Date: Wed Apr 12 16:49:34 2023 -0700 arm64/cpu: Mark cpu_park_loop() and friends __noreturn In preparation for marking panic_smp_self_stop() __noreturn across the kernel, first mark the arm64 implementation of cpu_park_loop() and related functions __noreturn. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/55787d3193ea3e295ccbb097abfab0a10ae49d45.1681342859.git.jpoimboe@kernel.org commit 4208d2d79837ef70f260d6170e3ac7fd6fde7788 Author: Josh Poimboeuf Date: Wed Apr 12 16:49:33 2023 -0700 x86/head: Mark *_start_kernel() __noreturn Now that start_kernel() is __noreturn, mark its chain of callers __noreturn. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/c2525f96b88be98ee027ee0291d58003036d4120.1681342859.git.jpoimboe@kernel.org commit 25a6917ca63ad4470bf88535c56f0dec72b570fe Author: Josh Poimboeuf Date: Wed Apr 12 16:49:32 2023 -0700 init: Mark start_kernel() __noreturn Now that arch_call_rest_init() is __noreturn, mark its caller start_kernel() __noreturn. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/7069acf026a195f26a88061227fba5a3b0337b9a.1681342859.git.jpoimboe@kernel.org commit 9ea7e6b62c2bd2f7bbfc3f10099df803002dd33b Author: Josh Poimboeuf Date: Wed Apr 12 16:49:31 2023 -0700 init: Mark [arch_call_]rest_init() __noreturn In preparation for improving objtool's handling of weak noreturn functions, mark start_kernel(), arch_call_rest_init(), and rest_init() __noreturn. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/7194ed8a989a85b98d92e62df660f4a90435a723.1681342859.git.jpoimboe@kernel.org commit 58982e1d3c1ac0b47707d8bb12b0ebefe80fb246 Merge: 0efb9fa003e60 562d222f23f0f Author: Arnd Bergmann Date: Fri Apr 14 17:28:58 2023 +0200 Merge tag 'imx-dt64-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX arm64 device tree changes for 6.4: - New board device trees: Apalis quadmax, DH electronics i.MX8M Plus DHCOM and PDK3, Data Modul i.MX8M Plus eDM SBC, Colibri Aster and Iris, etc. - Add FlexSPI, BBNSM and TPM PWM devices for i.MX93 SoC. - A series of imx8mq-librem5 udpates which includes minor fixes, magnetometer, CSI/camera support, and powersaving improvements. - Add Cadence USB3 support for i.MX8QXP. - Add FlexCAN support for i.MX8QXP and i.MX8QM. - Add UART DMA support for i.MX8MQ. - Add GPT devices for i.MX8MP. - Add VPU decoder and encoder support for i.MX8QM. - Add display pipeline and PCIe EP support for i.MX8M family SoCs. - A series from Peng Fan updating various i.MX8M device trees to pinctrl nodes match DT schema. - A series from Philippe Schenker improving colibri-imx8x device trees in various aspects. - Other random device tree updates. * tag 'imx-dt64-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (87 commits) arm64: dts: imx8mp: Add support for Data Modul i.MX8M Plus eDM SBC arm64: dts: imx8mp: Add display pipeline components arm64: dts: imx8mn: Add display pipeline components arm64: dts: imx8mm: Add display pipeline components arm64: dts: freescale: imx8qxp-mek: enable cadence usb3 arm64: dts: imx8qxp: add cadence usb3 support arm64: dts: imx8mq-librem5: add missing #clock-cells arm64: dts: imx8mm-prt8mm: update pinctrl to match dtschema arm64: dts: imx8mn-bsh-smm: update pinctrl to match dtschema arm64: dts: imx8mm-emcon: update pinctrl to match dtschema arm64: dts: imx8mq-librem5: update pinctrl to match dtschema arm64: dts: imx8mm-ddr4-evk: update gpmi pinctrl to match dtschema arm64: dts: imx8mn-evk: update i2c pinctrl to match dtschema arm64: dts: imx8mp: Add GPT blocks arm64: dts: imx8-apalis-v1.1: drop ci-disable-lpm arm64: dts: imx8dxl: drop clocks from scu clock controller arm64: dts: imx8mp: verdin-yavia: drop disable-over-current arm64: dts: imx8mq: tqma8mq-mba8mx: drop disable-over-current arm64: dts: imx8mp: Add support for DH electronics i.MX8M Plus DHCOM and PDK3 arm64: dts: colibri-imx8x: Add iris v2 carrier board ... Link: https://lore.kernel.org/r/20230408101928.280271-5-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 0efb9fa003e604ce3fe06e2c6fa2c4624729b0f9 Merge: 86724b74c95bd 5e4f393ccbf0a Author: Arnd Bergmann Date: Fri Apr 14 17:27:25 2023 +0200 Merge tag 'imx-dt-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX arm32 device tree changes for 6.4: - New board device trees: Tolino Vison, chargebyte Tarragon, new revision of the IOTA board. - A couple of imx7d-remarkable2 update to enable cyttsp5 touch and BD71815 PMIC. - A series from Oleksij Rempel to configure Ethernet reference clock from device tree. - A series from Stefan Wahren to use label references for i.MX28 based boards. * tag 'imx-dt-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (31 commits) ARM: dts: imx6ull: Add chargebyte Tarragon support ARM: dts: imx: Add devicetree for Tolino Vison ARM: dts: imx6dl-yapp43: Add support for new HW revision of the IOTA board ARM: dts: imx6dl-yapp4: Remove unneeded status "okay" ARM: dts: imx6dl-yapp4: Move status to the end of property list ARM: dts: imx6dl-yapp4: Move phy reset into switch node ARM: dts: imx28-tx28: add SPDX-License-Identifier ARM: dts: imx28-ts4600: Convert to use label references ARM: dts: imx28-evk: Convert to use label references ARM: dts: imx28-duckbill-2: Include base board ARM: dts: imx28-duckbill: Convert to use label references ARM: dts: imx28-cfa10036: Convert to use label references ARM: dts: imx28-apx4devkit: Convert to use label references ARM: dts: imx28-m28/sps1: Convert to use label references ARM: dts: imx28-apf28: Convert to use label references ARM: dts: imx7d-remarkable2: Enable the rohm,bd71815 ARM: dts: imx7d-remarkable2: Enable the cyttsp5 ARM: dts: imx6dl-yapp4: Use reset-gpios property name ARM: dts: imx6ul-prti6g: configure ethernet reference clock parent ARM: dts: imx6ul: set enet_clk_ref to CLK_ENETx_REF_SEL ... Link: https://lore.kernel.org/r/20230408101928.280271-4-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 86724b74c95bd918408a062b4a2f63f3e321039a Merge: 83f91bb49cbce e7a985d50841e Author: Arnd Bergmann Date: Fri Apr 14 17:25:19 2023 +0200 Merge tag 'imx-bindings-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX dt-bindings update for 6.4: - Add vendor prefix for chargebyte. - A bunch of new board compatibles: Tolino Vision, Toradex Apalis, chargebyte Tarragon, i.MX8M Plus based boards from DH electronics and Data Modul, etc. - A series from Marek Vasut to improve blk-ctrl bindings. * tag 'imx-bindings-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: Add Data Modul i.MX8M Plus eDM SBC dt-bindings: arm: fsl: Add chargebyte Tarragon dt-bindings: vendor-prefixes: add chargebyte dt-bindings: soc: imx-blk-ctrl: Drop leading label in blk-ctrl in examples dt-bindings: soc: imx8m-blk-ctrl: Rename blk_ctrl to blk-ctrl in examples dt-bindings: arm: Add DH electronics i.MX8M Plus DHCOM on PDK3 dt-bindings: arm: fsl: add compatible string for Tolino Vision dt-bindings: arm: fsl: Add Y Soft IOTA Phoenix, Lynx, Pegasus and Pegasus+ dt-bindings: arm: fsl: Add colibri-imx8x carrier boards dt-bindings: soc: imx8mp-media-blk-ctrl: Add LDB subnode into schema and example dt-bindings: soc: imx8mp-media-blk-ctrl: Align block controller example name dt-bindings: arm: fsl: Fix copy-paste error in comment dt-bindings: arm: fsl: add toradex,apalis-imx8 et al. commit 684952212ca639bce124e673f9f644a09895359c Merge: 4654e9f9f4399 11fa52fe619ac Author: Rafael J. Wysocki Date: Fri Apr 14 17:18:07 2023 +0200 Merge back cpufreq changes for 6.4-rc1. commit cfeeb7d37dea0e2359be10e4b0536d5b3c61661a Merge: 065ca2a8c6ee6 75f74a907164e Author: Rafael J. Wysocki Date: Fri Apr 14 17:16:28 2023 +0200 Merge back general thermal control changes for 6.4-rc1. commit 065ca2a8c6ee601d990ea10efc71b861c5afc4fd Merge: 117e4e5bd9d47 d4d8516624e10 Author: Rafael J. Wysocki Date: Fri Apr 14 17:14:02 2023 +0200 Merge back Intel thermal control material for 6.4-rc1. commit bea407a427baa019758f29f4d31b26f008bb8cc6 Author: Jason Gerecke Date: Thu Apr 13 11:17:43 2023 -0700 HID: wacom: generic: Set battery quirk only when we see battery data Some devices will include battery status usages in the HID descriptor but we won't see that battery data for one reason or another. For example, AES sensors won't send battery data unless an AES pen is in proximity. If a user does not have an AES pen but instead only interacts with the AES touchscreen with their fingers then there is no need for us to create a battery object. Similarly, if a family of peripherals shares the same HID descriptor between wired-only and wireless-capable SKUs, users of the former may never see a battery event and will not want a power_supply object created. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217062 Link: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2354 Signed-off-by: Jason Gerecke Tested-by: Mario Limonciello Signed-off-by: Jiri Kosina commit 7fc68653fc2e1a3457bb886e10164119ac48734f Author: Jason Gerecke Date: Thu Apr 13 11:17:42 2023 -0700 HID: wacom: Lazy-init batteries Rather than creating batteries as part of the initial device probe, let's make the process lazy. This gives us the opportunity to prevent batteries from being created in situations where they are unnecessary. There are two cases in particular where batteries are being unnecessarily created at initialization. These are AES sensors (for which we don't know any battery status information until a battery-powered pen actually comes into prox) peripheral tablets which share HID descriptors between the wired-only and wireless-capable SKUs of a family of devices. This patch will delay battery initialization of the former until a pen actually comes into prox. It will delay battery initialization of the latter until either a pen comes into prox or a "heartbeat" packet is processed. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217062 Link: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2354 Signed-off-by: Jason Gerecke Tested-by: Mario Limonciello Signed-off-by: Jiri Kosina commit 5743654f5e2ebd56df99f56fca5ba4b23fe3c815 Author: Josh Poimboeuf Date: Wed Apr 12 13:26:15 2023 -0700 objtool: Generate ORC data for __pfx code Allow unwinding from prefix code by copying the CFI from the starting instruction of the corresponding function. Even when the NOPs are replaced, they're still stack-invariant instructions so the same ORC entry can be reused everywhere. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/bc3344e51f3e87102f1301a0be0f72a7689ea4a4.1681331135.git.jpoimboe@kernel.org commit 4a2c3448ed3d362431c249ec0eb0f90281804ea8 Author: Josh Poimboeuf Date: Wed Apr 12 13:26:14 2023 -0700 x86/linkage: Fix padding for typed functions CFI typed functions are failing to get padded properly for CONFIG_CALL_PADDING. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/721f0da48d2a49fe907225711b8b76a2b787f9a8.1681331135.git.jpoimboe@kernel.org commit bd456a1bedd20cebd37493f8cb0291294a7356ea Author: Josh Poimboeuf Date: Wed Apr 12 13:26:13 2023 -0700 objtool: Separate prefix code from stack validation code Simplify the prefix code by moving it after validate_reachable_instructions(). Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/d7f31ac2de462d0cd7b1db01b7ecb525c057c8f6.1681331135.git.jpoimboe@kernel.org commit 6126ed5dfbc656374e851bfdfb128f3aa9e1263a Author: Josh Poimboeuf Date: Wed Apr 12 12:03:22 2023 -0700 objtool: Remove superfluous dead_end_function() check annotate_call_site() already sets 'insn->dead_end' for calls to dead end functions. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/5d603a301e9a8b1036b61503385907e154867ace.1681325924.git.jpoimboe@kernel.org commit 9290e772baccecec324ae9f2e0b470f870c097de Author: Josh Poimboeuf Date: Wed Apr 12 12:03:19 2023 -0700 objtool: Add symbol iteration helpers Add [sec_]for_each_sym() and use them. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/59023e5886ab125aa30702e633be7732b1acaa7e.1681325924.git.jpoimboe@kernel.org commit 246b2c85487a7bc5f6a09098e18a96506b1b55df Author: Josh Poimboeuf Date: Wed Apr 12 12:03:17 2023 -0700 objtool: Add WARN_INSN() It's easier to use and also gives easy access to the instruction's containing function, which is useful for printing that function's symbol. It will also be useful in the future for rate-limiting and disassembly of warned functions. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/2eaa3155c90fba683d8723599f279c46025b75f3.1681325924.git.jpoimboe@kernel.org commit 27d000d635ce48b579988e9b3240352a2a0306e0 Author: Josh Poimboeuf Date: Wed Apr 12 12:03:16 2023 -0700 scripts/objdump-func: Support multiple functions Allow specifying multiple functions on the cmdline. Note this removes the secret EXTRA_ARGS feature. While at it, spread out the awk to make it more readable. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/0bf5f4f5978660985037b24c6db49b114374eb4d.1681325924.git.jpoimboe@kernel.org commit e8deb00c0c4808654d1bf96a8f79cf1deb59b631 Author: Josh Poimboeuf Date: Wed Apr 12 10:24:06 2023 -0700 context_tracking: Fix KCSAN noinstr violation With KCSAN enabled, even empty inline stubs can be out-of-lined. Force the context_tracking_guest_exit() stub inline. Fixes the following warnings: vmlinux.o: warning: objtool: vmx_vcpu_enter_exit+0x1be: call to context_tracking_guest_exit() leaves .noinstr.text section vmlinux.o: warning: objtool: svm_vcpu_enter_exit+0x85: call to context_tracking_guest_exit() leaves .noinstr.text section Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/dc93f45abdec90c171108b4b590b7fff5790963c.1681320026.git.jpoimboe@kernel.org commit 7f530fba1123edcad00d59e1a73019814935f0c1 Author: Josh Poimboeuf Date: Wed Apr 12 10:29:35 2023 -0700 objtool: Add stackleak instrumentation to uaccess safe list If a function has a large stack frame, the stackleak plugin adds a call to stackleak_track_stack() after the prologue. This function may be called in uaccess-enabled code. Add it to the uaccess safe list. Fixes the following warning: vmlinux.o: warning: objtool: kasan_report+0x12: call to stackleak_track_stack() with UACCESS enabled Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/42e9b487ef89e9b237fd5220ad1c7cf1a2ad7eb8.1681320562.git.jpoimboe@kernel.org commit e18398e80c73e3cc7d9c3d2e0bc06a4af8f4f1cb Author: Josh Poimboeuf Date: Wed Apr 12 10:29:01 2023 -0700 Revert "objtool: Support addition to set CFA base" Commit 468af56a7bba ("objtool: Support addition to set CFA base") was added as a preparatory patch for arm64 support, but that support never came. It triggers a false positive warning on x86, so just revert it for now. Fixes the following warning: vmlinux.o: warning: objtool: cdce925_regmap_i2c_write+0xdb: stack state mismatch: cfa1=4+120 cfa2=5+40 Fixes: 468af56a7bba ("objtool: Support addition to set CFA base") Reported-by: kernel test robot Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/oe-kbuild-all/202304080538.j5G6h1AB-lkp@intel.com/ commit f571da059f86fd9d432aea32c9c7e5aaa53245d8 Author: Josh Poimboeuf Date: Wed Apr 12 10:24:08 2023 -0700 lkdtm/stackleak: Fix noinstr violation Fixes the following warning: vmlinux.o: warning: objtool: check_stackleak_irqoff+0x2b6: call to _printk() leaves .noinstr.text section Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/ee5209f53aa0a62aea58be18f2b78b17606779a6.1681320026.git.jpoimboe@kernel.org commit e0b081d17a9f4e5c0cbb0e5fbeb1abe3de0f7e4e Author: Josh Poimboeuf Date: Wed Apr 12 10:24:07 2023 -0700 sched: Fix KCSAN noinstr violation With KCSAN enabled, end_of_stack() can get out-of-lined. Force it inline. Fixes the following warnings: vmlinux.o: warning: objtool: check_stackleak_irqoff+0x2b: call to end_of_stack() leaves .noinstr.text section Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/cc1b4d73d3a428a00d206242a68fdf99a934ca7b.1681320026.git.jpoimboe@kernel.org commit 15def34e2635ab7e0e96f1bc32e1b69609f14942 Author: Yang Jihong Date: Mon Feb 27 10:35:08 2023 +0800 perf/core: Fix hardlockup failure caused by perf throttle commit e050e3f0a71bf ("perf: Fix broken interrupt rate throttling") introduces a change in throttling threshold judgment. Before this, compare hwc->interrupts and max_samples_per_tick, then increase hwc->interrupts by 1, but this commit reverses order of these two behaviors, causing the semantics of max_samples_per_tick to change. In literal sense of "max_samples_per_tick", if hwc->interrupts == max_samples_per_tick, it should not be throttled, therefore, the judgment condition should be changed to "hwc->interrupts > max_samples_per_tick". In fact, this may cause the hardlockup to fail, The minimum value of max_samples_per_tick may be 1, in this case, the return value of __perf_event_account_interrupt function is 1. As a result, nmi_watchdog gets throttled, which would stop PMU (Use x86 architecture as an example, see x86_pmu_handle_irq). Fixes: e050e3f0a71b ("perf: Fix broken interrupt rate throttling") Signed-off-by: Yang Jihong Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230227023508.102230-1-yangjihong1@huawei.com commit a2a83eb40fbdeee3ed9c6fcc7bb015a2dd1a3e93 Author: Pavankumar Kondeti Date: Wed Apr 12 10:02:58 2023 +0530 arm64: kernel: Fix kernel warning when nokaslr is passed to commandline 'Unknown kernel command line parameters "nokaslr", will be passed to user space' message is noticed in the dmesg when nokaslr is passed to the kernel commandline on ARM64 platform. This is because nokaslr param is handled by early cpufeature detection infrastructure and the parameter is never consumed by a kernel param handler. Fix this warning by providing a dummy kernel param handler for nokaslr. Signed-off-by: Pavankumar Kondeti Link: https://lore.kernel.org/r/20230412043258.397455-1-quic_pkondeti@quicinc.com Signed-off-by: Will Deacon commit 83f91bb49cbceb8a07b65ff825907378793005d9 Merge: d40a2f5062ee3 49f1d0b65f876 Author: Arnd Bergmann Date: Fri Apr 14 15:24:58 2023 +0200 Merge tag 'stm32-dt-for-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into soc/dt STM32 DT for v6.4, round 1 Highlights: ---------- - MPU: - STM32MP13: - Add FMC support. - Add QSPI support. - Add 8 UART instances nodes. - Enable UART on STM32MP135F-DK: -UART1/UART8 used on expansion connector. -UART2 used for BT. -UART4 used for console. - STMP32MP15: - Add STM32MP151 support ( documentation + machine). - Uart fixes (slew rate, aliases clean-up). - Fix GPU YAMl issue. * tag 'stm32-dt-for-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: stm32: add initial documentation for STM32MP151 ARM: dts: stm32: Add QSPI support on STM32MP13x SoC family ARM: dts: stm32: add FMC support on STM32MP13x SoC family ARM: dts: stm32: YAML validation fails for Argon Boards ARM: dts: stm32: YAML validation fails for Odyssey Boards ARM: dts: stm32: YAML validation fails for STM32MP15 ST Boards ARM: dts: stm32: add uart nodes and uart aliases on stm32mp135f-dk ARM: dts: stm32: add pins for usart2/1/4/8 in stm32mp13-pinctrl ARM: dts: stm32: add uart nodes on stm32mp13 ARM: dts: stm32: clean uart aliases on stm32mp15xx-exx boards ARM: dts: stm32: clean uart aliases on stm32mp15xx-dkx boards ARM: dts: stm32: fix slew-rate of USART2 on stm32mp15xx-dkx ARM: stm32: add support for STM32MP151 ARM: dts: stm32: fix spi1 pin assignment on stm32mp15 ARM: dts: stm32: drop invalid simple-panel compatible on stm32mp157c-lxa ARM: dts: stm32: Add coprocessor detach mbox on stm32mp15xx-osd32 SoM Link: https://lore.kernel.org/r/63987ed6-2813-15ff-e058-73312a730d61@foss.st.com Signed-off-by: Arnd Bergmann commit d40a2f5062ee3ccb9412ef1133d8600b8abb397e Merge: acda89d621df0 4cd4beb98fe5a Author: Arnd Bergmann Date: Fri Apr 14 15:24:00 2023 +0200 Merge tag 'riscv-dt-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/dt RISC-V Devicetrees for v6.4 Microchip: A "fix" for the system controller's regs on PolarFire SoC, adding a missing reg property. The patch had been sitting there for months and I only re-found it recently, so you can guess how much of a "fix" it actually is. It'll become needed when the system controller's QSPI gets added in the future, but at present there's no urgency as the driver can handle both the current and "fixed" versions. StarFive: Basic support for the JH7110 & the associated first-party dev board, the VisionFive v2 (in two forms). There's a bunch of dt-bindings required for this too, all of which have had input from the DT folk. There's enough in this tag to boot to a console w/ an initramfs but little more. The SoC supports some of the "new" bit manipulation instructions, which is a good test for the recently added Zbb support in the kernel. Signed-off-by: Conor Dooley * tag 'riscv-dt-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree riscv: dts: starfive: Add StarFive JH7110 pin function definitions riscv: dts: starfive: Add initial StarFive JH7110 device tree dt-bindings: riscv: Add SiFive S7 compatible dt-bindings: interrupt-controller: Add StarFive JH7110 plic dt-bindings: timer: Add StarFive JH7110 clint dt-bindings: clock: Add StarFive JH7110 always-on clock and reset generator dt-bindings: clock: Add StarFive JH7110 system clock and reset generator riscv: dts: microchip: fix the mpfs' mailbox regs riscv: dts: microchip: add mpfs specific macb reset support Link: https://lore.kernel.org/r/20230406-shank-impromptu-3d483bbc249f@spud Signed-off-by: Arnd Bergmann commit acda89d621df04833063bc85f8c6523c4a7b3bb7 Merge: 31e985a2c4e98 5c0ddb4e715d8 Author: Arnd Bergmann Date: Fri Apr 14 15:22:45 2023 +0200 Merge tag 'tegra-for-6.4-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/dt arm64: tegra: Device tree changes for v6.4-rc1 This adds support for the Jetson Orin NX and includes updates for Jetson AGX Orin (audio codec, USB Type-C support). * tag 'tegra-for-6.4-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Add vccmq on Jetson TX2 arm64: tegra: Populate USB Type-C Controller for Jetson AGX Orin arm64: tegra: Audio codec support on Jetson AGX Orin arm64: tegra: Support Jetson Orin NX reference platform arm64: tegra: Support Jetson Orin NX dt-bindings: tegra: Document Jetson Orin NX reference platform dt-bindings: tegra: Document Jetson Orin NX arm64: tegra: Add DSU PMUs for Tegra234 arm64: tegra: Drop serial clock-names and reset-names Link: https://lore.kernel.org/r/20230406124804.970394-6-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 31e985a2c4e98898077fbd218a4ae84c31c057a6 Merge: 065b3ec77f77a 13a53ebc22999 Author: Arnd Bergmann Date: Fri Apr 14 15:21:05 2023 +0200 Merge tag 'tegra-for-6.4-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/dt ARM: tegra: Device tree changes for v6.4-rc1 There are several fixes and cleanups here for some of the older Tegra consumer devices. * tag 'tegra-for-6.4-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra30: Use cpu* labels ARM: tegra30: peripherals: Add 266.5MHz nodes ARM: tegra: asus-tf101: Fix accelerometer mount matrix ARM: tegra: transformers: Bind RT5631 sound nodes ARM: tegra: transformers: Update WM8903 sound nodes Link: https://lore.kernel.org/r/20230406124804.970394-5-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 065b3ec77f77ad9fd1df8d563ce5b02e879898b7 Merge: 295954fefe2a4 c94673e80377d Author: Arnd Bergmann Date: Fri Apr 14 15:20:35 2023 +0200 Merge tag 'tegra-for-6.4-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/dt dt-bindings: Changes for v6.4-rc1 This is a single patch that drops unneeded quotes from various Tegra- related device tree bindings. * tag 'tegra-for-6.4-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: arm: nvidia: Drop unneeded quotes Link: https://lore.kernel.org/r/20230406124804.970394-4-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 295954fefe2a497fd6832bc2858d2a0c2cbea2a0 Merge: cfb6bb3831fa2 8d59efc33fdaa Author: Arnd Bergmann Date: Fri Apr 14 15:19:25 2023 +0200 Merge tag 'asahi-soc-dt-6.4' of https://github.com/AsahiLinux/linux into soc/dt Apple SoC DT updates for 6.4. This time we have the M2 (t8112) device trees and compatible updates, as well as a minor fix for PCIe ports on the prior models. * tag 'asahi-soc-dt-6.4' of https://github.com/AsahiLinux/linux: arm64: dts: apple: t600x: Disable unused PCIe ports arm64: dts: apple: t8103: Disable unused PCIe ports arm64: dts: apple: t8112: Initial t8112 (M2) device trees dt-bindings: arm: apple: Add t8112 j413/j473/j493 compatibles dt-bindings: clock: apple,nco: Add t8112-nco compatible dt-bindings: i2c: apple,i2c: Add apple,t8112-i2c compatible dt-bindings: pinctrl: apple,pinctrl: Add apple,t8112-pinctrl compatible dt-bindings: pci: apple,pcie: Add t8112 support dt-bindings: nvme: apple: Add apple,t8112-nvme-ans2 compatible string dt-bindings: mailbox: apple,mailbox: Add t8112 compatibles dt-bindings: iommu: apple,sart: Add apple,t8112-sart compatible string dt-bindings: interrupt-controller: apple,aic2: Add apple,t8112-aic compatible dt-bindings: arm: cpus: Add apple,avalanche & blizzard compatibles dt-bindings: watchdog: apple,wdt: Add t8112-wdt compatible dt-bindings: arm: apple: apple,pmgr: Add t8112-pmgr compatible dt-bindings: power: apple,pmgr-pwrstate: Add t8112 compatible Link: https://lore.kernel.org/r/7263df01-aebc-2db5-f074-4805e0ae9fbc@marcan.st Signed-off-by: Arnd Bergmann commit cfb6bb3831fa23a2dde0d92a34ec94bce931e861 Merge: 6dcb6ff6ece60 e154a338e16cc Author: Arnd Bergmann Date: Fri Apr 14 15:16:22 2023 +0200 Merge tag 'samsung-dt-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/dt Samsung DTS ARM changes for v6.4 1. Several cleanups and improvements as a result of dtbs_checks: align node names with bindings, drop incorrect properties, fix clock-names, add missing "ports" node. 2. Move DP and MIPI phys to PMU node (DTS with binding change). 3. Drop old MSHC aliases (while adding proper mmc-ddr-1_8v which was selected by the driver based on the MSHC alias) and add generic MMC aliases in each board. The aliases match known numbering in the schematics. * tag 'samsung-dt-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: dt-bindings: soc: samsung: exynos-pmu: allow phys as child on Exynos3 and Exynos4 ARM: dts: exynos: add mmc aliases ARM: dts: exynos: replace mshc0 alias with mmc-ddr-1_8v property ARM: dts: exynos: fix MCT compatible in Universal C210 ARM: dts: exynos: move DP and MIPI phys to PMU node in Exynos5250 ARM: dts: exynos: move DP and MIPI phys to PMU node in Exynos5420 ARM: dts: exynos: move MIPI phy to PMU node in Exynos4 ARM: dts: exynos: move MIPI phy to PMU node in Exynos3250 ARM: dts: exynos: drop unused samsung,camclk-out property in Midas ARM: dts: s5pv210: correct MIPI CSIS clock name ARM: dts: exynos: correct whitespace in Midas ARM: dts: exynos: fix WM8960 clock name in Itop Elite ARM: dts: exynos: add ports to TC358764 bridge on Arndale ARM: dts: exynos: drop fake align STMPE properties in P4 Note ARM: dts: exynos: align STMPE ADC node name with bindings in P4 Note Link: https://lore.kernel.org/r/20230405080438.156805-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 6dcb6ff6ece6096e3bd9796b25769e46917dfae4 Merge: 837be1cc222f8 5f67124757464 Author: Arnd Bergmann Date: Fri Apr 14 15:13:22 2023 +0200 Merge tag 'samsung-dt64-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/dt Samsung DTS ARM64 changes for v6.4 1. Exynos850: add headers with AUD, G3D and HSI clock controller clock IDs. Add G3D (GPU) clock controller node. 2. Exynos5433: fixes for dtbs_check: move MIPI phy to PMU node. 3. Drop old MSHC aliases (while adding proper mmc-ddr-1_8v which was selected by the driver based on the MSHC alias) and add generic MMC aliases in each board. The aliases match known numbering in the schematics. * tag 'samsung-dt64-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: add mmc aliases arm64: dts: exynos: drop mshc aliases arm64: dts: exynos: Add CMU_G3D node for Exynos850 SoC arm64: dts: exynos: move MIPI phy to PMU node in Exynos5433 dt-bindings: clock: exynos850: Add AUD and HSI main gate clocks dt-bindings: clock: exynos850: Add Exynos850 CMU_G3D Link: https://lore.kernel.org/r/20230405080438.156805-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit ec79ed5e15e55e0d641b90dcc60371dd562f5322 Author: Rob Herring Date: Fri Mar 10 08:47:23 2023 -0600 soc: fsl: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Signed-off-by: Arnd Bergmann commit 908ce5c0e7cba4ec64c4ae4c6dd803be4ff236ae Author: Rob Herring Date: Fri Mar 10 08:46:56 2023 -0600 ARM: pxa: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Signed-off-by: Arnd Bergmann commit aebe916f9e79f3d754da2a7d9e2720d18bbff72b Merge: 3ac02aa53d602 f6ff91a47ac57 Author: Arnd Bergmann Date: Fri Apr 14 14:55:48 2023 +0200 Merge tag 'qcom-drivers-for-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers A few more Qualcomm driver updates for v6.4 This introduces a new binding and a dedicated driver for the Qualcomm Inline-Crypto-Engine (ICE), in order to support a single shared instance between SDHCI and UFS, found in recent platforms. RSC version check is updated to support minor revisions of v3 of the ip block, the SMD-RPM interface is transitioned to GFP_ATOMIC to avoid the shrinker to kick in underneath the GPU and QCM2290 support is added to the SCM binding. * tag 'qcom-drivers-for-6.4-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: dt-bindings: crypto: Add Qualcomm Inline Crypto Engine soc: qcom: Make the Qualcomm UFS/SDCC ICE a dedicated driver dt-bindings: firmware: document Qualcomm QCM2290 SCM soc: qcom: rpmh-rsc: Support RSC v3 minor versions soc: qcom: smd-rpm: Use GFP_ATOMIC in write path Link: https://lore.kernel.org/r/20230414024302.2411985-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 3ac02aa53d602154620de33bac87f4922e85b828 Merge: 126c6da71fc86 c3fbced9af885 Author: Arnd Bergmann Date: Fri Apr 14 14:54:33 2023 +0200 Merge tag 'arm-soc/for-6.4/drivers' of https://github.com/Broadcom/stblinux into soc/drivers This pull request contains Broadcom SoCs drivers changes for 6.4, please pull the following: - Zhaoyang fixes an of_iomap() leak in the STB BIU driver - Florian removes the bare-metal ARM suspend/resume code which has long been replaced by the standard PSCI suspend/resume. * tag 'arm-soc/for-6.4/drivers' of https://github.com/Broadcom/stblinux: soc: bcm: brcmstb: biuctrl: fix of_iomap leak soc: bcm: brcmstb: Remove bare-metal ARM suspend/resume code kbuild, soc: bcm: bcm2835-power: remove MODULE_LICENSE in non-modules kbuild, soc: bcm: raspberrypi-power: remove MODULE_LICENSE in non-modules bus: brcmstb_gisb: Use devm_platform_get_and_ioremap_resource() Link: https://lore.kernel.org/r/20230410232606.1917803-3-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 2ad91e44e6b0c7ef1ed151b3bb2242a2144e6085 Author: Robin Murphy Date: Wed Apr 12 11:29:40 2023 +0100 perf/arm-cmn: Fix port detection for CMN-700 When the "extra device ports" configuration was first added, the additional mxp_device_port_connect_info registers were added around the existing mxp_mesh_port_connect_info registers. What I missed about CMN-700 is that it shuffled them around to remove this discontinuity. As such, tweak the definitions and factor out a helper for reading these registers so we can deal with this discrepancy easily, which does at least allow nicely tidying up the callsites. With this we can then also do the nice thing and skip accesses completely rather than relying on RES0 behaviour where we know the extra registers aren't defined. Fixes: 23760a014417 ("perf/arm-cmn: Add CMN-700 support") Reported-by: Jing Zhang Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/71d129241d4d7923cde72a0e5b4c8d2f6084525f.1681295193.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit af6c0bd59f4f3ad5daad2f7b777954b1954551d5 Author: Sumit Garg Date: Thu Feb 2 13:01:48 2023 +0530 arm64: kgdb: Set PSTATE.SS to 1 to re-enable single-step Currently only the first attempt to single-step has any effect. After that all further stepping remains "stuck" at the same program counter value. Refer to the ARM Architecture Reference Manual (ARM DDI 0487E.a) D2.12, PSTATE.SS=1 should be set at each step before transferring the PE to the 'Active-not-pending' state. The problem here is PSTATE.SS=1 is not set since the second single-step. After the first single-step, the PE transferes to the 'Inactive' state, with PSTATE.SS=0 and MDSCR.SS=1, thus PSTATE.SS won't be set to 1 due to kernel_active_single_step()=true. Then the PE transferes to the 'Active-pending' state when ERET and returns to the debugger by step exception. Before this patch: ================== Entering kdb (current=0xffff3376039f0000, pid 1) on processor 0 due to Keyboard Entry [0]kdb> [0]kdb> [0]kdb> bp write_sysrq_trigger Instruction(i) BP #0 at 0xffffa45c13d09290 (write_sysrq_trigger) is enabled addr at ffffa45c13d09290, hardtype=0 installed=0 [0]kdb> go $ echo h > /proc/sysrq-trigger Entering kdb (current=0xffff4f7e453f8000, pid 175) on processor 1 due to Breakpoint @ 0xffffad651a309290 [1]kdb> ss Entering kdb (current=0xffff4f7e453f8000, pid 175) on processor 1 due to SS trap @ 0xffffad651a309294 [1]kdb> ss Entering kdb (current=0xffff4f7e453f8000, pid 175) on processor 1 due to SS trap @ 0xffffad651a309294 [1]kdb> After this patch: ================= Entering kdb (current=0xffff6851c39f0000, pid 1) on processor 0 due to Keyboard Entry [0]kdb> bp write_sysrq_trigger Instruction(i) BP #0 at 0xffffc02d2dd09290 (write_sysrq_trigger) is enabled addr at ffffc02d2dd09290, hardtype=0 installed=0 [0]kdb> go $ echo h > /proc/sysrq-trigger Entering kdb (current=0xffff6851c53c1840, pid 174) on processor 1 due to Breakpoint @ 0xffffc02d2dd09290 [1]kdb> ss Entering kdb (current=0xffff6851c53c1840, pid 174) on processor 1 due to SS trap @ 0xffffc02d2dd09294 [1]kdb> ss Entering kdb (current=0xffff6851c53c1840, pid 174) on processor 1 due to SS trap @ 0xffffc02d2dd09298 [1]kdb> ss Entering kdb (current=0xffff6851c53c1840, pid 174) on processor 1 due to SS trap @ 0xffffc02d2dd0929c [1]kdb> Fixes: 44679a4f142b ("arm64: KGDB: Add step debugging support") Co-developed-by: Wei Li Signed-off-by: Wei Li Signed-off-by: Sumit Garg Tested-by: Douglas Anderson Acked-by: Daniel Thompson Tested-by: Daniel Thompson Link: https://lore.kernel.org/r/20230202073148.657746-3-sumit.garg@linaro.org Signed-off-by: Will Deacon commit 126c6da71fc8672820b7884eb6e53352e0733ae1 Merge: 508471c3de8b7 c78ad8597ed96 Author: Arnd Bergmann Date: Fri Apr 14 14:34:17 2023 +0200 Merge tag 'qcom-drivers-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers Qualcomm driver updates for v6.4 The Qualcomm SCM driver will now always clear the download bit, avoiding entering download mode on a clean reboot because the bootloader left it set. The vmid bitmap passed to qcom_scm_assign_mem() is transitioned to a well defined size. SM6375 support is added, and SC8180X, QDU1000/QRU1000, IPQ5332 and IPQ9574 compatibles are documented. GENI gains support for newer hardware with deeper FIFOs. The BWMON driver is updated to better handle the two register blocks, which are not consistent between MSM8998 and newer platforms. The LLCC driver no longer assumes a fixes stride across the various banks, and instead acquire the bank placement from DeviceTree. EDAC support for polling is introduced. EDAC support on SDM845 is disabled, as its been observed that accessing relevant registers is not permitted on most devices. PMIC GLINK is reworked to support defining which auxiliary children to spawn per platform, support for spawning a UCSI child is added and SM8450 and SM8550 is introduced. The RPM power-domain driver is cleaned up by moving and generalizing structures that are common between platforms, rather than duplicating everything. Macros are replaced with just direct definition of the relevant structures. Support for defining parent relationships between the power-domains is introduced, like it has been in rpmhpd for a long time. Number of processors has gone up, so max processor count in SMEM is bumped again. Error handling in SMSM is cleaned up using dev_err_probe(). Socinfo is taught about IPQ9574, QCM2290, QRB2210, QRB4210, SM7150, SA8775P and a number of PMICs. * tag 'qcom-drivers-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (51 commits) dt-bindings: firmware: document Qualcomm SC8180X SCM dt-bindings: sram: qcom,imem: document SM6375 IMEM soc: qcom: icc-bwmon: Handle global registers correctly soc: qcom: icc-bwmon: Remove unused struct member soc: qcom: smsm: Use dev_err_probe() firmware: qcom_scm: Add SM6375 compatible soc: qcom: llcc: Add configuration data for SM7150 dt-bindings: arm: msm: Add LLCC for SM7150 dt-bindings: soc: qcom: smd-rpm: re-add missing qcom,rpm-msm8994 soc: qcom: pmic_glink: register ucsi aux device dt-bindings: soc: qcom: qcom,pmic-glink: document SM8550 compatible dt-bindings: soc: qcom: qcom,pmic-glink: document SM8450 compatible firmware: qcom_scm: Clear download bit during reboot dt-bindings: soc: qcom: aoss: Document QDU1000/QRU1000 compatible dt-bindings: firmware: qcom,scm: Update QDU1000/QRU1000 compatible dt-bindings: soc: qcom: smd-rpm: Add IPQ9574 compatible firmware: qcom_scm: Use fixed width src vm bitmap dt-bindings: firmware: qcom,scm: document IPQ5332 SCM dt-bindings: scm: Add compatible for IPQ9574 soc: qcom: rpmpd: Remove useless comments ... Link: https://lore.kernel.org/r/20230410152421.4477-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 508471c3de8b7ef850ba205adbbb61ee41f244ee Merge: 9f8f0d07249bb a33bfafd99e0d Author: Arnd Bergmann Date: Fri Apr 14 14:33:36 2023 +0200 Merge tag 'ti-driver-soc-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers TI SoC driver updates for v6.4 * Minor fixups for of_property, using devm_platform_ioremap * Fixups for refcount leaks in pm33xx * Fixups for k3-ringacc for dmaring_request * SoCinfo detection for J784S4 SoC. * tag 'ti-driver-soc-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: soc: ti: Use devm_platform_ioremap_resource() soc: ti: k3-socinfo: Add entry for J784S4 SOC soc: ti: Use of_property_read_bool() for boolean properties soc: ti: Use of_property_present() for testing DT property presence soc: ti: pm33xx: Fix refcount leak in am33xx_pm_probe soc: ti: k3-ringacc: Add try_module_get() to k3_dmaring_request_dual_ring() Link: https://lore.kernel.org/r/20230410140506.ucvkwq7vz2h47vyj@stipulate Signed-off-by: Arnd Bergmann commit 666f4ab26c2c7c5e1aa963dc5d8623df1b015d06 Author: Rob Herring Date: Mon Apr 10 18:27:01 2023 -0500 bcma: Add explicit of_device.h include bcma/main.c uses of_dma_configure() which is declared in of_device.h. of_device.h gets implicitly included by of_platform.h, but that is going to be removed soon. Signed-off-by: Rob Herring Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230410232701.1561613-1-robh@kernel.org commit 9f8f0d07249bb738d78e58c9554d0907f963b60d Merge: e15a70922f6ad fc187a46a8e68 Author: Arnd Bergmann Date: Fri Apr 14 14:32:54 2023 +0200 Merge tag 'renesas-drivers-for-v6.4-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers Renesas driver updates for v6.4 (take two) - Add "renesas," file contents pattern to MAINTAINERS, - Fix a small leak on OOM. * tag 'renesas-drivers-for-v6.4-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: renesas-soc: Release 'chipid' from ioremap() MAINTAINERS: renesas: Add "renesas," file contents pattern Link: https://lore.kernel.org/r/cover.1681113115.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 310e9c85c61a4393e772c9286947e259bb8c32a7 Merge: d2a1d45ced846 7bc436121e557 Author: Jens Axboe Date: Fri Apr 14 06:32:44 2023 -0600 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.4/block Pull MD updates from Song: "- md/bitmap: Optimal last page size, by Jon Derrick - Various raid10 fixes, by Yu Kuai and Li Nan - md: add error_handlers for raid0 and linear, by Mariusz Tkaczyk" * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid5: remove unused working_disks variable md/raid10: don't call bio_start_io_acct twice for bio which experienced read error md/raid10: fix memleak of md thread md/raid10: fix memleak for 'conf->bio_split' md/raid10: fix leak of 'r10bio->remaining' for recovery md/raid10: don't BUG_ON() in raise_barrier() md: fix soft lockup in status_resync md: add error_handlers for raid0 and linear md: Use optimal I/O size for last bitmap page md: Fix types in sb writer md: Move sb writer loop to its own function md/raid10: Fix typo in comment (replacment -> replacement) md: make kobj_type structures constant md/raid10: fix null-ptr-deref in raid10_sync_request md/raid10: fix task hung in raid10d commit e15a70922f6adee60fbcc8ee866e44ec573790d0 Merge: e4fa3c7fc7b4d c014377bd053f Author: Arnd Bergmann Date: Fri Apr 14 14:32:12 2023 +0200 Merge tag 'sunxi-drivers-for-6.4-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/drivers - remove MODULE_LICENSE from sram driver - use of_property_present() in mbus driver * tag 'sunxi-drivers-for-6.4-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: kbuild, soc: sunxi: sram: remove MODULE_LICENSE in non-modules soc: sunxi: Use of_property_present() for testing DT property presence Link: https://lore.kernel.org/r/20230408125255.GA17134@jernej-laptop Signed-off-by: Arnd Bergmann commit b9c3379dda1435110440bf9d6d230b3067e8f1d6 Author: Bitterblue Smith Date: Mon Apr 10 18:36:48 2023 +0300 wifi: rtl8xxxu: Support devices with 5-6 out endpoints Handle them the same way as the devices with 3-4 USB out endpoints. This is needed for the RTL8192FU. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/ef4bc66d-84f5-4021-efd7-1787d097519c@gmail.com commit a5be45ea459371ad70eb1508b3fd4b731cdc57c7 Author: Bitterblue Smith Date: Mon Apr 10 18:35:45 2023 +0300 wifi: rtl8xxxu: Clean up some messy ifs Add some new members to rtl8xxxu_fileops and use them instead of checking priv->rtl_chip. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/e24a5534-6e33-cfb9-0634-0caf4646513f@gmail.com commit d2a1d45ced846da6e71d777d9f230e47c5d694d9 Merge: bb4c19e030f45 4f86a6ff6fbd8 Author: Jens Axboe Date: Fri Apr 14 06:31:29 2023 -0600 Merge tag 'nvme-6.4-2023-04-14' of git://git.infradead.org/nvme into for-6.4/block Pull NVMe updates from Christoph: "nvme updates for Linux 6.4 - drop redundant pci_enable_pcie_error_reporting (Bjorn Helgaas) - validate nvmet module parameters (Chaitanya Kulkarni) - fence TCP socket on receive error (Chris Leech) - fix async event trace event (Keith Busch) - minor cleanups (Chaitanya Kulkarni, zhenwei pi) - fix and cleanup nvmet Identify handling (Damien Le Moal, Christoph Hellwig) - fix double blk_mq_complete_request race in the timeout handler (Lei Yin) - fix irq locking in nvme-fcloop (Ming Lei) - remove queue mapping helper for rdma devices (Sagi Grimberg)" * tag 'nvme-6.4-2023-04-14' of git://git.infradead.org/nvme: nvme-fcloop: fix "inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage" blk-mq-rdma: remove queue mapping helper for rdma devices nvme-rdma: minor cleanup in nvme_rdma_create_cq() nvme: fix double blk_mq_complete_request for timeout request with low probability nvme: fix async event trace event nvme-apple: return directly instead of else nvme-apple: return directly instead of else nvmet-tcp: validate idle poll modparam value nvmet-tcp: validate so_priority modparam value nvme-tcp: fence TCP socket on receive error nvmet: remove nvmet_req_cns_error_complete nvmet: rename nvmet_execute_identify_cns_cs_ns nvmet: fix Identify Identification Descriptor List handling nvmet: cleanup nvmet_execute_identify() nvmet: fix I/O Command Set specific Identify Controller nvmet: fix Identify Active Namespace ID list handling nvmet: fix Identify Controller handling nvmet: fix Identify Namespace handling nvmet: fix error handling in nvmet_execute_identify_cns_cs_ns() nvme-pci: drop redundant pci_enable_pcie_error_reporting() commit e4fa3c7fc7b4da52c34c4ad479b61ef4dbccb6a5 Merge: 3d3b32a6dd1eb 816aec03a043a Author: Arnd Bergmann Date: Fri Apr 14 14:30:59 2023 +0200 Merge tag 'imx-drivers-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/drivers i.MX drivers update for 6.4: - Use dev_err_probe() for imx-scu driver to silences EPROBE_DEFER messages. - Add LVDS LPI2C and PWM power domains for scu-pd driver. - A series from Jindong Yue to support module build of imx8m soc driver. - Update imx8m-blk-ctrl driver to scan child nodes for binding drivers. - Reorder structure members in imx8m-blk-ctrl driver by following clang-analyzer suggestion. - Update imx-weim bus driver to use helper function for "ranges" parsing. * tag 'imx-drivers-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx: imx8m-blk-ctrl: reordering the fields soc: imx8m: Support building imx8m soc driver as module soc: imx8m: Add MODULE_LICENSE soc: imx: imx8m-blk-ctrl: Add MODULE_LICENSE soc: imx: imx8m-blk-ctrl: Use dev_pm_domain_attach_by_name soc: imx: imx8mp-blk-ctrl: Add MODULE_LICENSE soc: imx: imx8mp-blk-ctrl: Fix typo of imx8m_blk_ctrl_of_match soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them firmware: imx: scu-pd: add missed lvds lpi2c and pwm power domains bus: imx-weim: Remove open coded "ranges" parsing firmware: imx: scu: use dev_err_probe Link: https://lore.kernel.org/r/20230408101928.280271-1-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit cc4cffc3c142d57df48c07851862444e1d33bdaa Author: Marek Vasut Date: Fri Apr 7 22:37:52 2023 +0200 wifi: brcmfmac: add Cypress 43439 SDIO ids Add SDIO ids for use with the muRata 1YN (Cypress CYW43439). The odd thing about this is that the previous 1YN populated on M.2 card for evaluation purposes had BRCM SDIO vendor ID, while the chip populated on real hardware has a Cypress one. The device ID also differs between the two devices. But they are both 43439 otherwise, so add the IDs for both. On-device 1YN (43439), the new one, chip label reads "1YN": ``` /sys/.../mmc_host/mmc2/mmc2:0001 # cat vendor device 0x04b4 0xbd3d ``` EA M.2 evaluation board 1YN (43439), the old one, chip label reads "1YN ES1.4": ``` /sys/.../mmc_host/mmc0/mmc0:0001/# cat vendor device 0x02d0 0xa9a6 ``` Reviewed-by: Hans de Goede Cc: stable@vger.kernel.org Signed-off-by: Marek Vasut Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230407203752.128539-1-marex@denx.de commit 3d3b32a6dd1ebb06668c291f793fa7a34810cfe4 Merge: 871e766df429c 4dd472bdafcb6 Author: Arnd Bergmann Date: Fri Apr 14 14:30:13 2023 +0200 Merge tag 'riscv-soc-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/drivers RISC-V SoC drivers for v6.4 Microchip: Mailbox controller & client changes for the system controller on PolarFire SoC. The controller bits have been acked by Jassi. Primarily the changes work around a "hardware" bug (really the system controller's software, but it may as well be hardware as customers cannot change it) where interrupts are not generated if a service fails. The mailbox controller driver is tweaked to use polling, rather than interrupt, mode and there are some changes to timeout code required in the client driver as a result. There's some opportunistic cleanup that I performed while doing the swap too. Canaan: A single fix for some randconfig issues that crop up when !mmu is enabled for 32-bit kernels, due to my changes in a previous release that swapped out select based entablement of the driver. Signed-off-by: Conor Dooley * tag 'riscv-soc-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: soc: microchip: mpfs: add a prefix to rx_callback() soc: microchip: mpfs: handle timeouts and failed services differently soc: microchip: mpfs: simplify error handling in mpfs_blocking_transaction() soc: microchip: mpfs: use a consistent completion timeout soc: microchip: mpfs: fix some horrible alignment mailbox: mpfs: check the service status in .tx_done() mailbox: mpfs: ditch a useless busy check mailbox: mpfs: switch to txdone_poll mailbox: mpfs: fix an incorrect mask width soc: canaan: Make K210_SYSCTL depend on CLK_K210 Link: https://lore.kernel.org/r/20230406-islamist-mop-81d651b8830d@spud Signed-off-by: Arnd Bergmann commit 8551844d2c5b28b6809a45eb4f5d6e931838fd04 Author: Ping-Ke Shih Date: Thu Apr 6 17:30:09 2023 +0800 wifi: rtw89: fix crash due to null pointer of sta in AP mode In AP mode, 'sta' could be NULL if sending broadcast/multicast packets, so we should check before accessing, or it causes crash: BUG: kernel NULL pointer dereference, address: 0000000000000004 #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: 2 PID: 92 Comm: kworker/u33:0 Tainted: G OE Workqueue: rtw89_tx_wq rtw89_core_txq_work [rtw89_core] RIP: 0010:rtw89_core_tx_update_desc_info+0x2cc/0x7d0 [rtw89_core] Code: e2 01 41 be 04 00 00 00 41 8b 84 c4 0c 01 00 00 75 0d 45 31 f6 ... RSP: 0018:ffffb4cf807afce0 EFLAGS: 00010297 RAX: 0000000000000001 RBX: ffffb4cf807afd48 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001 RBP: ffffb4cf807afd30 R08: ffff9b28c1e59808 R09: ffff9b28c0297100 R10: 00000000052cf7c4 R11: 00000000052cf7c4 R12: ffff9b28c1602040 R13: ffff9b28c07b3000 R14: 0000000000000004 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff9b2a73280000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000004 CR3: 00000001ca410003 CR4: 00000000000606e0 Call Trace: rtw89_core_tx_write+0x7c/0x100 [rtw89_core] rtw89_core_txq_work+0x1b4/0x530 [rtw89_core] process_one_work+0x222/0x3f0 worker_thread+0x50/0x3f0 kthread+0x16b/0x190 ? rescuer_thread+0x3a0/0x3a0 ? set_kthread_struct+0x50/0x50 ret_from_fork+0x22/0x30 Fixes: e5307c9cd7ee ("wifi: rtw89: set data lowest rate according to AP supported rate") Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230406093009.5869-1-pkshih@realtek.com commit d33fc8d0368c180fe2338bfae4f5367a66a719f4 Author: Eric Huang Date: Thu Apr 6 15:28:41 2023 +0800 wifi: rtw89: correct 5 MHz mask setting Use primary channel index to determine which 5 MHz mask should be enable. This mask is used to prevent noise from channel edge to effect CCA threshold in wide bandwidth (>= 40 MHZ). Fixes: 1b00e9236a71 ("rtw89: 8852c: add set channel of BB part") Fixes: 6b0698984eb0 ("wifi: rtw89: 8852b: add chip_ops::set_channel") Cc: stable@vger.kernel.org Signed-off-by: Eric Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230406072841.8308-1-pkshih@realtek.com commit 8c36cf0df434e17c9c39a42f87319a6aaca89b05 Author: Ping-Ke Shih Date: Sat Apr 1 22:25:48 2023 +0800 wifi: rtw89: 8851b: add tables for RFK These tables are used by RF calibrations to assist to configure PHY and RF registers. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230401142548.55466-4-pkshih@realtek.com commit cf4917cf0ab828a4b520daa1708e8572b810417a Author: Ping-Ke Shih Date: Sat Apr 1 22:25:47 2023 +0800 wifi: rtw89: 8851b: add BB and RF tables (2 of 2) These tables contain BB and RF parameters that driver will load them into registers. It also contains TX power according to country, band, rate and so on. Increasing thermal can cause TX power degraded, so power tracking tables are defined to compensate TX power. Internal version of these tables: - HALBB_029_106_15 (V17) - HALRF_029_00_089 * Radio A 0x22 * NCTL 0x5 Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230401142548.55466-3-pkshih@realtek.com commit 108bdaaa8bc7eafa2cf4aa3b883fdadca0d2ce45 Author: Ping-Ke Shih Date: Sat Apr 1 22:25:46 2023 +0800 wifi: rtw89: 8851b: add BB and RF tables (1 of 2) These tables contain BB and RF parameters that driver will load them into registers. It also contains TX power according to country, band, rate and so on. Increasing thermal can cause TX power degraded, so power tracking tables are defined to compensate TX power. Internal version of these tables: - HALBB_029_106_15 (V17) - HALRF_029_00_089 * Radio A 0x22 * NCTL 0x5 Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230401142548.55466-2-pkshih@realtek.com commit 2a6d518dedcbc8dc6e666c1a68700945bca174b8 Author: Ping-Ke Shih Date: Thu Mar 30 21:33:24 2023 +0800 wifi: rtw89: pci: update PCI related settings to support 8851B Many settings of 8851B are like 8852A or 8852B. Change them to proper settings as hardware design. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230330133324.19538-5-pkshih@realtek.com commit 5c3afcba545cc820ba7911cecdf3abb05ea5e0df Author: Ping-Ke Shih Date: Thu Mar 30 21:33:23 2023 +0800 wifi: rtw89: mac: update MAC settings to support 8851b Many settings of 8851B are the same as 8852B or 8852A, like DLE (Data link engine), security engine and so on. Update them according to hardware design. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230330133324.19538-4-pkshih@realtek.com commit d5289b2d69a777d24686d7ee8264a55761dc9f93 Author: Ping-Ke Shih Date: Thu Mar 30 21:33:22 2023 +0800 wifi: rtw89: 8851b: fix TX path to path A for one RF path chip For two RF paths chips, we normally set path B as main path by default. 8851B has single one RF path, so set TX path to A and set mapping of path B to 0. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230330133324.19538-3-pkshih@realtek.com commit a6fb2bb84654dde55fab94251c9119b6917d098d Author: Ping-Ke Shih Date: Thu Mar 30 21:33:21 2023 +0800 wifi: rtw89: read version of analog hardware The chip contains digital and analog parts, and each of them has its own version number. This is used by BT coexistence mechanism to make strategy decision for different analog version. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230330133324.19538-2-pkshih@realtek.com commit 9f9882dbe2eecdb27f5f3832f215679747f94d8f Author: Eric Huang Date: Thu Mar 30 21:23:52 2023 +0800 wifi: rtw89: use hardware CFO to improve performance Turn on hardware CFO (central frequency offset) compensation based on IC capability, and improve digital CFO compensation accuracy by using more fixed points number. Signed-off-by: Eric Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230330132352.13647-1-pkshih@realtek.com commit 5395482afabb61cc980c9e78f013dd31cf212568 Author: Zong-Zhe Yang Date: Thu Mar 30 16:03:31 2023 +0800 wifi: rtw89: support parameter tables by RFE type One chip can have different RFE (RF front end) types which we will judge at runtime. And, different RFE types may use different RF parameter tables. Though we didn't really meet this case previously, we are going to meet it on upcoming chip RTL8851B. So, this commit handles parameter tables for runtime RFE type. We now encapsulate rtw89_txpwr_rule_<2/5/6>ghz tables into rtw89_rfe_parms. Then, each chip defines its default parameter tables, and if needed, it can configure extra parameter tables by RFE type. Finally we determine runtime parameter tables by RFE type if one is configured. Otherwise, we use the default parameter tables. For now, we just move all settings under default parameter tables. We will configure parameter tables by RFE types in separate commits afterwards. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230330080331.37155-1-pkshih@realtek.com commit 871e766df429c90c774f6720ed425bcd422e6f19 Merge: 547d67a904f77 8c47b8253f4cf Author: Arnd Bergmann Date: Fri Apr 14 14:16:11 2023 +0200 Merge tag 'tegra-for-6.4-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers soc/tegra: Changes for v6.4-rc1 This contains minor fixes and cleanups. Note that one of the patches here includes ARM firmware changes, but I picked that up after checking with Sudeep and Rob because it didn't seem worth splitting it up any further. * tag 'tegra-for-6.4-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: Use of_property_present() for testing DT property presence firmware: tegra: bpmp: Fix error paths in debugfs Link: https://lore.kernel.org/r/20230406124804.970394-3-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 547d67a904f774b031c02137c753c64db0f2d96f Merge: fceb6ba1cc6dc 821d96e3a006d Author: Arnd Bergmann Date: Fri Apr 14 14:15:19 2023 +0200 Merge tag 'tegra-for-6.4-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers soc/tegra: Changes for v6.4-rc1 Contains various minor cleanups and fixes as well as support for several more wake events on Tegra234. * tag 'tegra-for-6.4-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: fuse: Remove nvmem root only access soc/tegra: cbb: tegra194: Use of_address_count() helper soc/tegra: cbb: Remove MODULE_LICENSE in non-modules soc/tegra: flowctrl: Use devm_platform_get_and_ioremap_resource() soc: tegra: cbb: Drop empty platform remove function soc/tegra: pmc: Support software wake-up for SPE soc/tegra: pmc: Add wake source interrupt for MGBE soc/tegra: pmc: Add the PMIC wake event for Tegra234 soc/tegra: bpmp: Actually free memory on error path soc/tegra: cbb: remove linux/version.h Link: https://lore.kernel.org/r/20230406124804.970394-2-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit ffde7f3476a6dfd5856dc2af207dd0f950b10122 Author: Ping-Ke Shih Date: Mon Mar 20 21:06:06 2023 +0800 wifi: rtw89: add firmware format version to backward compatible with older drivers In the discuss threads [1] [2], new firmware format break user space because older drivers can't recognize new firmware format. To avoid this, the new format will be named rtw89/rtw8852b_fw-1.bin and only new driver try to load it. Old drivers only load original and understandable firmware rtw89/rtw8852b_fw.bin. More, new driver will be still backward compatible with old firmware, so original firmware can be used by new driver. If there is newer firmware format is introduced, rtw89/rtw8852b_fw-2.bin will be given. The same rules will be applied like above. So, we will have firmware like below in linux-firmware in the future. rtw89/rtw8852b_fw-2.bin rtw89/rtw8852b_fw-1.bin rtw89/rtw8852b_fw.bin After this patch, MODULE_FIRMWARE() of 8852A/B/C become rtw89/rtw8852a_fw.bin rtw89/rtw8852b_fw-1.bin rtw89/rtw8852c_fw.bin [1] https://lore.kernel.org/linux-wireless/df1ce994-3368-a57e-7078-8bdcccf4a1fd@gmail.com/T/#m24cb43be31a762d0ea70bf07f27ae96c59f6931b [2] https://bugzilla.kernel.org/show_bug.cgi?id=217207 Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230320130606.20777-4-pkshih@realtek.com commit b80ad23a8f2e0b63384cadc0aa2c1135b1dc03eb Author: Ping-Ke Shih Date: Mon Mar 20 21:06:05 2023 +0800 wifi: rtw89: use schedule_work to request firmware Since we are going to load more than one firmware and some are not presented or optional, using asynchronous API request_firmware_nowait() will become complicated. Also, we want to use firmware_request_nowarn() to avoid warning messages when loading optional files. So, use schedule_work to be simpler. To abstract loading a firmware or file, define a struct rtw89_fw_req_info containing a struct firmware and a completion to ensure this firmware is loaded completely. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230320130606.20777-3-pkshih@realtek.com commit 639ec6d63588b7e7c2dfae1df447daf243fb8342 Author: Zong-Zhe Yang Date: Mon Mar 20 21:06:04 2023 +0800 wifi: rtw89: fw: use generic flow to set/check features In early feature bitmap obtained from rtw89_early_fw_feature_recognize(), the bits needed to check get increased. It's more friendly to work with RTW89_CHK_FW_FEATURE(). So, we concentrate the flow of iterating FW feature configures and calling RTW89_SET_FW_FEATURE() for various uses. And then, we adjust rtw89_early_fw_feature_recognize() for RTW89_CHK_FW_FEATURE(). Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230320130606.20777-2-pkshih@realtek.com commit fceb6ba1cc6dc3bbd4c3a26b4753c499fb7ab694 Merge: 5d2e8343e4127 e8476011f04b1 Author: Arnd Bergmann Date: Fri Apr 14 14:12:48 2023 +0200 Merge tag 'tegra-for-6.4-arm-core' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers ARM: tegra: Core changes for v6.4-rc1 This contains a single commit to drop MODULE_LICENSE() from a driver that can't be built as a module since that can now confuse tooling. * tag 'tegra-for-6.4-arm-core' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: Remove MODULE_LICENSE in non-modules Link: https://lore.kernel.org/r/20230406124804.970394-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 5d2e8343e412798fbf182a3928c5a776fa6a0f64 Merge: 283480f0ce9ac bdfe6de2695c5 Author: Arnd Bergmann Date: Fri Apr 14 14:12:05 2023 +0200 Merge tag 'asahi-soc-rtkit-6.4' of https://github.com/AsahiLinux/linux into soc/drivers Apple SoC RTKit updates for 6.4. Just one bugfix and one improvement to how forwarded syslogs are sent to dmesg. * tag 'asahi-soc-rtkit-6.4' of https://github.com/AsahiLinux/linux: soc: apple: rtkit: Crop syslog messages soc: apple: rtkit: Fix buffer address field width Link: https://lore.kernel.org/r/0dbd2dc1-6a2c-5b21-354b-d8314937e8e7@marcan.st Signed-off-by: Arnd Bergmann commit c5280e5f6763c216e16feec10c63b6b32106ddb7 Author: Po-Hao Huang Date: Tue Apr 11 20:48:32 2023 +0800 wifi: rtw89: fix authentication fail during scan We used to store operating channel info after associated. However, scan might happen before that. Without switching back to operating channel, authentication or association might fail. Therefore, we switch back to operating channel when the scanning vif's BSSID is non-zero, which implies connected or during attempt to connect. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230411124832.14965-6-pkshih@realtek.com commit 6cfb6cc20a61aa17bdb5440459a3503a885ee913 Author: Po-Hao Huang Date: Tue Apr 11 20:48:31 2023 +0800 wifi: rtw89: add flag check for power state Use POWER_ON flag to make sure power on/off is symmetric. Since both remain_on_channel and hw_scan both alter the power state, this makes sure that we don't enter/leave IPS mode twice. Also, replace IPS related functions with inline function that does similar logic so we can track it more easily. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230411124832.14965-5-pkshih@realtek.com commit a0e97ae3f3320a246a79db7372fc23a38556014e Author: Po-Hao Huang Date: Tue Apr 11 20:48:30 2023 +0800 wifi: rtw89: add ieee80211::remain_on_channel ops Add support of remain on channel ops. Since channel context is required to enable multi-channel concurrent(MCC) and the current ROC in mac80211 don't support more than 1 channel context, add this to let P2P and other protocols relying on this work as expected. The off-channel duration and cancel timing is purely controlled by upper layers. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230411124832.14965-4-pkshih@realtek.com commit 1ae5ca615285d5d4f72d1de464716d85dffef19f Author: Po-Hao Huang Date: Tue Apr 11 20:48:29 2023 +0800 wifi: rtw89: add function to wait for completion of TX skbs Allocate a per-skb completion to track those skbs we are interested in and wait for them to complete transmission with TX status. Normally, the completion object is freed by wait side, but it could be timeout result that complete side should free the object instead. Add a owner field with RCU to determine which side should free the object. Signed-off-by: Po-Hao Huang Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230411124832.14965-3-pkshih@realtek.com commit d2b6da242454ee886729aad7020dfda7995bc26b Author: Po-Hao Huang Date: Tue Apr 11 20:48:28 2023 +0800 wifi: rtw89: 8852c: add beacon filter and CQM support Adding this supports beacon filter and connection quality monitor. To make host CPU wake up less, let firmware perform signal monitoring and beacon processing, then notify driver upon signal changes or beacon loss. This feature needs firmware 0.27.56 or newer to support it. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230411124832.14965-2-pkshih@realtek.com commit 3e54e7c8c42a0a640f4b4c4a491c7e0b34b8ebbd Merge: bda649b9a8bff 3c01b05407bfe Author: Arnd Bergmann Date: Fri Apr 14 14:05:48 2023 +0200 Merge tag 'arm-soc/for-6.4/soc' of https://github.com/Broadcom/stblinux into soc/arm This pull request contains ARM-based platform code changes for 6.4, please pull the following: - Rob makes use of the of_address_to_resource() helper instead of open coding it in the Kona SMC code. * tag 'arm-soc/for-6.4/soc' of https://github.com/Broadcom/stblinux: ARM: bcm: Use of_address_to_resource() Link: https://lore.kernel.org/r/20230410232606.1917803-4-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit bda649b9a8bff3e234f92061986e3de920f458e4 Merge: a8739ac16342d 6050cb1c7ad40 Author: Arnd Bergmann Date: Fri Apr 14 14:04:45 2023 +0200 Merge tag 'renesas-arm-soc-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/arm Renesas ARM SoC updates for v6.4 - Use of_cpu_node_to_id() to read CPU node 'reg'. * tag 'renesas-arm-soc-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: sh-mobile: Use of_cpu_node_to_id() to read CPU node 'reg' Link: https://lore.kernel.org/r/cover.1681113113.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit a8739ac16342d49b6276ccdc85a133df8d8fde4f Merge: 27994cb07cca9 614bef7e2727f Author: Arnd Bergmann Date: Fri Apr 14 14:04:03 2023 +0200 Merge tag 'imx-soc-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/arm i.MX SoC changes for 6.4: - A couple of changes from Oleksij Rempel which make it possible to configure Ethernet refclock from device tree. - Use common DT helpers to test DT property presence and read boolean properties. * tag 'imx-soc-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: Use of_property_read_bool() for boolean properties ARM: mxs: Use of_property_present() for testing DT property presence ARM: mach-imx: imx6ul: remove not optional ethernet refclock overwrite ARM: imx6q: skip ethernet refclock reconfiguration if enet_clk_ref is present Link: https://lore.kernel.org/r/20230408101928.280271-2-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 27994cb07cca9203e9d5d6b9465e1e193ec0889a Merge: 5ca2653011a4f cb56f508e5410 Author: Arnd Bergmann Date: Fri Apr 14 14:00:47 2023 +0200 Merge tag 'samsung-soc-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/arm Samsung mach/soc changes for v6.4 Cleanup of OF-related functions: use of_property_read_bool() for reading bool and of_address_to_resource() for mapping MMIO. * tag 'samsung-soc-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: EXYNOS: Use of_address_to_resource() ARM: exynos: Use of_property_read_bool() for boolean properties Link: https://lore.kernel.org/r/20230405080438.156805-3-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit fc0b096c92918c2ba4d76411ea763fdeb2ef6b0d Author: David Lin Date: Fri Apr 14 18:39:44 2023 +0800 ASoC: nau8825: Add delay control for input path Change the original fixed delay to the assignment from property. It will make more flexible to different platforms for avoiding pop noise at the beginning of recording. Signed-off-by: David Lin Link: https://lore.kernel.org/r/20230414103941.39566-2-CTLIN0@nuvoton.com Signed-off-by: Mark Brown commit c26c5921e1a770e6c092c4d25dea19052bdfddab Author: David Lin Date: Fri Apr 14 18:39:42 2023 +0800 ASoC: dt-bindings: nau8825: Add delay control for input path Change the original fixed delay to the assignment from property. It will make more flexible to different platforms for avoiding pop noise at the beginning of recording. Signed-off-by: David Lin Link: https://lore.kernel.org/r/20230414103941.39566-1-CTLIN0@nuvoton.com Signed-off-by: Mark Brown commit b4655af5f668fdb8dc23614f1610650d195a75de Merge: fe46e5547f27c f462eb1d0df39 Author: Arnd Bergmann Date: Fri Apr 14 13:58:26 2023 +0200 Merge tag 'tegra-for-6.4-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/defconfig arm64: tegra: Default configuration changes for v6.4-rc1 Contains a single patch to enable the Coresight System PMU driver. * tag 'tegra-for-6.4-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: defconfig: Enable ARM CoreSight PMU driver Link: https://lore.kernel.org/r/20230406124804.970394-7-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit fe46e5547f27c80c5637f141ce2e21a2fe2c00ba Merge: d04a06e984b69 b4b992e2332fe Author: Arnd Bergmann Date: Fri Apr 14 13:57:47 2023 +0200 Merge tag 'imx-defconfig-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/defconfig i.MX defconfig updates for 6.4: - Enable i.MX93 ADC driver in arm64 defconfig. - Enable BD71815 PMIC and TDA998X HDMI bridge driver in imx_v6_v7_defconfig. - Enable a few drivers support needed by Tarragon boards in imx_v6_v7_defconfig. - Build IMX_SDMA driver as module in imx_v4_v5_defconfig. * tag 'imx-defconfig-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx_v4_v5_defconfig: Build CONFIG_IMX_SDMA as module ARM: imx_v6_v7_defconfig: Enable Tarragon peripheral drivers ARM: imx_v6_v7_defconfig: Select CONFIG_DRM_I2C_NXP_TDA998X arm64: defconfig: Enable i.MX93 ADC support ARM: imx_v6_v7_defconfig: Enable rohm,bd71815 Link: https://lore.kernel.org/r/20230408101928.280271-6-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit d04a06e984b69ca7875a5bf2cb65ee73f24c8886 Merge: 2425d7e3f1a1c 44b263bf040a8 Author: Arnd Bergmann Date: Fri Apr 14 13:56:59 2023 +0200 Merge tag 'ti-k3-config-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/defconfig arm64: TI K3 defconfig updates for v6.4 * Enable drivers for BeaglePlay and Audio drivers for AM62-SK For this tag, Bloat-o-meter reports (17.0.0 + v6.3-rc1 base): add/remove: 61/2 grow/shrink: 3/1 up/down: 17852/-208 (17644) [...] Total: Before=27746954, After=27764598, chg +0.06% * tag 'ti-k3-config-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: arm64: defconfig: Enable audio drivers for AM62-SK arm64: defconfig: Enable drivers for BeaglePlay Link: https://lore.kernel.org/r/20230410140517.ovxnagc4xh3gqath@canary Signed-off-by: Arnd Bergmann commit 2425d7e3f1a1c689d523e6f154bf6d45c267c079 Merge: 24c1597932388 34d1a90bdb8a2 Author: Arnd Bergmann Date: Fri Apr 14 13:56:06 2023 +0200 Merge tag 'qcom-arm64-defconfig-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/defconfig Qualcomm ARM64 defconfig updates for v6.4 This enables a range of TLMM pinctrl drivers, needed to boot related platforms. Multimedia clock drivers for MSM8994 and MSM8998 are enabled and the MSM8996 is flagged as a module instead of builtin. The PMIC_GLINK drivers are enabled, providing USB Type-C and battery support on various platforms, and eUSB2 drivers found on SM8550 are enabled. Base drivers for IPQ5332 and IPQ9574 are enabled. * tag 'qcom-arm64-defconfig-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: Enable IPQ9574 SoC base configs arm64: defconfig: remove duplicate TYPEC_UCSI & QCOM_PMIC_GLINK arm64: defconfig: add PMIC GLINK modules arm64: defconfig: enable Qualcomm pin controller drivers arm64: defconfig: Enable qcom msm899{4,8} clk drivers arm64: defconfig: Switch msm8996 clk drivers to module arm64: defconfig: Enable QCOM eUSB2 SNPS PHY and repeater arm64: defconfig: Enable IPQ5332 SoC base configs Link: https://lore.kernel.org/r/20230410155955.5329-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 24c15979323885d2c1f17b052d86d63aa052fd8c Author: Alexandre Torgue Date: Thu Apr 13 09:20:42 2023 +0200 ARM: multi_v7_defconfig: Add OPTEE support STM32MP13 platform relies on OPTEE to boot: Clocks and regulators are handled in the secure world by OPTEE and exported to the non secure world (LINUX) thanks to ARM SCMI protocol. Signed-off-by: Alexandre Torgue Link: https://lore.kernel.org/r/20230413072042.30657-1-alexandre.torgue@foss.st.com Signed-off-by: Arnd Bergmann commit 344cad0660ea08c95bd3752d0cbbf3f51944d9af Author: Linus Walleij Date: Wed Apr 5 12:54:39 2023 +0200 ARM: configs: Update U8500 defconfig Update the U8500 defconfig accordingly: - Add the NFC modules used by some U8500-based systems. - Switch out the now deleted UX500 crypto drivers to the STM32 drivers that we have augmented to work with UX500. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230405105439.1739575-1-linus.walleij@linaro.org Signed-off-by: Arnd Bergmann commit e51b4198396cd715b140c0e8b259680429ff0cfb Merge: ccc62b8277759 08632365b274e 5e799a7ceed81 f543028451d13 0c0431646116b b67ab6fb63bbb 25c2325575cc7 391d0feb3b559 829a79556fc98 816c698c05247 e60d63e32d239 f594496403fa3 f7f9c054a227a 421b6093f5ac3 Author: Joerg Roedel Date: Fri Apr 14 13:45:50 2023 +0200 Merge branches 'iommu/fixes', 'arm/allwinner', 'arm/exynos', 'arm/mediatek', 'arm/omap', 'arm/renesas', 'arm/rockchip', 'arm/smmu', 'ppc/pamu', 'unisoc', 'x86/vt-d', 'x86/amd', 'core' and 'platform-remove_new' into next commit cdc419e9e7f3cbfd17a11cb3bce726903fada546 Author: Johannes Berg Date: Fri Apr 14 13:12:06 2023 +0300 wifi: iwlwifi: mvm: tx: remove misleading if statement The if statement here is misleading, we return zero anyway since we just checked the 'ret' variable, simplify the code to remove the condition entirely. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230414130637.57c1eb58e655.I1b47a7771cd66306931089c150c6b5b240bdcba5@changeid Signed-off-by: Johannes Berg commit 7f11d17f0b0805d68f3d2e116f2e7ff0c655fe39 Author: Ilan Peer Date: Fri Apr 14 13:12:05 2023 +0300 wifi: iwlwifi: mvm: Fix setting the rate for non station cases The setting of the rate used for non station cases did not take into consideration the interface type etc., thus when probe responses are transmitted on P2P Device interface etc. CCK rates were used which is not allowed. Modify the code so the non station case would consider the interface type etc. For HWs/FWs that do not support rate control, preserve the previous behavior, i.e., take the rate from the skb metadata and adjust as needed. Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230414130637.fa0e4d42205d.Iab4784560c77b965fec070d4d0a1ec84171d94ff@changeid Signed-off-by: Johannes Berg commit d3f9cd61b11a3ba9be1ddb27a6a4a2aceb8afe5b Author: Johannes Berg Date: Fri Apr 14 13:12:04 2023 +0300 wifi: iwlwifi: mvm: validate station properly in flush If we have MLO, then the deflink.ap_sta_id cannot be used. However, we can use the new mvmvif->ap_sta pointer for the validation instead. Also don't do it multiple times for different FW instances of the same AP STA (TDLS STAs are only on a single link). Note that this isn't really working right yet since the underlying flush code hasn't been updated yet to know of multiple link STAs. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230414130637.7d747df44d65.Ie5392859fab4cfb73c20b49bfee2caadef5fd8ec@changeid Signed-off-by: Johannes Berg commit aea99650f7316b43a064311bb79064e397ed237c Author: Johannes Berg Date: Fri Apr 14 13:12:03 2023 +0300 wifi: iwlwifi: mvm: set STA mask for keys in MLO Implement the full STA mask and selecting the correct link for key installation. While at it, catch errors if this function returns a bad zero station mask, rather than waiting for the firmware to crash on it. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230414130637.cedae2f21829.Iae07b736c3109d085ad5b74ec8282ce45020da39@changeid Signed-off-by: Johannes Berg commit d066a530af8e1833c7ea2cef7784004700c85f79 Author: Johannes Berg Date: Fri Apr 14 13:12:02 2023 +0300 wifi: iwlwifi: mvm: fix ptk_pn memory leak If adding a key to firmware fails we leak the allocated ptk_pn. This shouldn't happen in practice, but we should still fix it. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230414130637.99446ffd02bc.I82a2ad6ec1395f188e0a1677cc619e3fcb1feac9@changeid Signed-off-by: Johannes Berg commit 7035b5baae21be4af3d4432bd83e695c8523c2b0 Author: Johannes Berg Date: Fri Apr 14 13:12:01 2023 +0300 wifi: iwlwifi: mvm: make iwl_mvm_mac_ctxt_send_beacon() static We never needed this to be non-static, that was just an artifact of the development process. Make it static. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230414130637.3c018c15f948.I87fd1aee288f33312a7206492608002d4e8e213e@changeid Signed-off-by: Johannes Berg commit 0c9a8f9084be45525d445bf9e55ccbb152a16e1f Author: Johannes Berg Date: Fri Apr 14 13:12:00 2023 +0300 wifi: iwlwifi: mvm: track AP STA pointer and use it for MFP Instead of relying on the AP STA ID and dereferencing our firmware -> mac80211 STA array when we really only need the STA, not the per-link information (and might not have it, e.g. for a pairwise key installation where this is relevant), keep track of the AP STA as a pointer to the mac80211 STA, protected by the mutex. Then use it here in the key code instead. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230414130637.7db01b1508de.I88e6d252cdb0a6e4581d7c5fd7cbc037b4fd40ae@changeid Signed-off-by: Johannes Berg commit 58d1b717879bfeabe09b35e41ad667c79933eb2e Author: Hyunwoo Kim Date: Fri Apr 14 13:11:59 2023 +0300 wifi: iwlwifi: pcie: Fix integer overflow in iwl_write_to_user_buf An integer overflow occurs in the iwl_write_to_user_buf() function, which is called by the iwl_dbgfs_monitor_data_read() function. static bool iwl_write_to_user_buf(char __user *user_buf, ssize_t count, void *buf, ssize_t *size, ssize_t *bytes_copied) { int buf_size_left = count - *bytes_copied; buf_size_left = buf_size_left - (buf_size_left % sizeof(u32)); if (*size > buf_size_left) *size = buf_size_left; If the user passes a SIZE_MAX value to the "ssize_t count" parameter, the ssize_t count parameter is assigned to "int buf_size_left". Then compare "*size" with "buf_size_left" . Here, "buf_size_left" is a negative number, so "*size" is assigned "buf_size_left" and goes into the third argument of the copy_to_user function, causing a heap overflow. This is not a security vulnerability because iwl_dbgfs_monitor_data_read() is a debugfs operation with 0400 privileges. Signed-off-by: Hyunwoo Kim Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230414130637.2d80ace81532.Iecfba549e0e0be21bbb0324675392e42e75bd5ad@changeid Signed-off-by: Johannes Berg commit 8ce437dd5b2e4adef13aa4ecce07392f9966b1ab Author: Tom Rix Date: Fri Apr 14 13:11:58 2023 +0300 wifi: iwlwifi: fw: move memset before early return Clang static analysis reports this representative issue dbg.c:1455:6: warning: Branch condition evaluates to a garbage value if (!rxf_data.size) ^~~~~~~~~~~~~~ This check depends on iwl_ini_get_rxf_data() to clear rxf_data but the function can return early without doing the clear. So move the memset before the early return. Fixes: cc9b6012d34b ("iwlwifi: yoyo: use hweight_long instead of bit manipulating") Signed-off-by: Tom Rix Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230414130637.872a7175f1ff.I33802a77a91998276992b088fbe25f61c87c33ac@changeid Signed-off-by: Johannes Berg commit 11e94d2bcd88dea5d9ce99555b6b172f5232d3e2 Author: Tom Rix Date: Fri Apr 14 13:11:57 2023 +0300 wifi: iwlwifi: mvm: initialize seq variable Clang static analysis reports this issue d3.c:567:22: warning: The left operand of '>' is a garbage value if (seq.tkip.iv32 > cur_rx_iv32) ~~~~~~~~~~~~~ ^ seq is never initialized. Call ieee80211_get_key_rx_seq() to initialize seq. Fixes: 0419e5e672d6 ("iwlwifi: mvm: d3: separate TKIP data from key iteration") Signed-off-by: Tom Rix Reviewed-by: Nick Desaulniers Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230414130637.6dd372f84f93.If1f708c90e6424a935b4eba3917dfb7582e0dd0a@changeid Signed-off-by: Johannes Berg commit 5f10705eea400212c20c00c5dddd53978383c51c Author: Colin Ian King Date: Fri Apr 14 13:11:56 2023 +0300 wifi: iwlwifi: mvm: Fix spelling mistake "Gerenal" -> "General" There is a spelling mistake in a IWL_DEBUG_SCAN debug message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230414130637.eac55cbef8f1.I15cc5d3f1489759bf915bfb3cbbb72b67b18f8b6@changeid Signed-off-by: Johannes Berg commit 41c1b0b5aa4518ed3b7a97f35164dec298072aff Author: Colin Ian King Date: Fri Apr 14 13:11:55 2023 +0300 wifi: iwlwifi: Fix spelling mistake "upto" -> "up to" There is a spelling mistake in a IWL_ERR error message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230414130637.a00965734d02.I760cb43829b3d7a0f567f0958059f2fae0aa8a93@changeid Signed-off-by: Johannes Berg commit 7a41d58936b2cd32197cfe4a583a9c7d3b4dc7b0 Author: Miri Korenblit Date: Fri Apr 14 13:11:54 2023 +0300 wifi: iwlwifi: mvm: enable new MLD FW API Enable the new FW API with MLD based on FW TLV. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230414130637.5dc66b08539e.I1c65024c879346b0349e1e431d36ec2b5fd85dd7@changeid Signed-off-by: Johannes Berg commit c30a2a64788b3d617a9c5d96adb76c68b0862e5f Author: Mukesh Sisodiya Date: Fri Apr 14 13:11:53 2023 +0300 wifi: iwlwifi: add a new PCI device ID for BZ device Add support for a new PCI device ID 0x272b once registering with PCIe. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230414130637.56342664110d.I5aa6f2858fdcf69fdea4f1a873115a48bd43764e@changeid Signed-off-by: Johannes Berg commit 729040295f96b8060b1a3bdd35f767d266508502 Author: Mukesh Sisodiya Date: Fri Apr 14 13:11:52 2023 +0300 wifi: iwlwifi: Add RF Step Type for BZ device Add RF step id handling and handle for BZ device. Read CNV Aux register and uses for no OTP case. Add missing rf support for Bz/Bnj device and correct/add the mapping for rf-type if OTP not present. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230414130637.8f2e2fff7bbc.Iee5554178bc5f134dcc28591db0968e619afbdca@changeid Signed-off-by: Johannes Berg commit 20f8cb7dcbfe0d52f6939467ee6a1b6f92fc0adf Author: Ayala Beker Date: Thu Apr 13 21:40:35 2023 +0300 wifi: iwlwifi: mvm: scan legacy bands and UHB channels with same antenna In case of UHB scan that follows a scan on legacy bands, consider both scan commands as part of the same scan cycle, and thus configure them to use the same antenna configuration. Signed-off-by: Ayala Beker Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413213309.fd582c423ad8.I35239f94cb3ee1642d16936199c336a07ec2df8f@changeid Signed-off-by: Johannes Berg commit ba30415118eee374a08b39a0460a1d1e52c24a25 Author: Daniel Gabay Date: Thu Apr 13 21:40:34 2023 +0300 wifi: iwlwifi: yoyo: Fix possible division by zero Don't allow buffer allocation TLV with zero req_size since it leads later to division by zero in iwl_dbg_tlv_alloc_fragments(). Also, NPK/SRAM locations are allowed to have zero buffer req_size, don't discard them. Fixes: a9248de42464 ("iwlwifi: dbg_ini: add TLV allocation new API support") Signed-off-by: Daniel Gabay Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413213309.5d6688ed74d8.I5c2f3a882b50698b708d54f4524dc5bdf11e3d32@changeid Signed-off-by: Johannes Berg commit 11195ab0d6f3202cf7af1a4c69570f59c377d8ad Author: Daniel Gabay Date: Thu Apr 13 21:40:33 2023 +0300 wifi: iwlwifi: yoyo: skip dump correctly on hw error When NIC is in a bad state, reading data will return 28 bits as 0xa5a5a5a and the lowest 4 bits are not fixed value. Mask these bits in a few places to skip the dump correctly. Fixes: 89639e06d0f3 ("iwlwifi: yoyo: support for new DBGI_SRAM region") Signed-off-by: Daniel Gabay Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413213309.df6c0663179d.I36d8487b2419c6fefa65e5514855d94327c3b1eb@changeid Signed-off-by: Johannes Berg commit b655b9a9f8467684cfa8906713d33b71ea8c8f54 Author: Daniel Gabay Date: Thu Apr 13 21:40:32 2023 +0300 wifi: iwlwifi: pcie: fix possible NULL pointer dereference It is possible that iwl_pci_probe() will fail and free the trans, then afterwards iwl_pci_remove() will be called and crash by trying to access trans which is already freed, fix it. iwlwifi 0000:01:00.0: Detected crf-id 0xa5a5a5a2, cnv-id 0xa5a5a5a2 wfpm id 0xa5a5a5a2 iwlwifi 0000:01:00.0: Can't find a correct rfid for crf id 0x5a2 ... BUG: kernel NULL pointer dereference, address: 0000000000000028 ... RIP: 0010:iwl_pci_remove+0x12/0x30 [iwlwifi] pci_device_remove+0x3e/0xb0 device_release_driver_internal+0x103/0x1f0 driver_detach+0x4c/0x90 bus_remove_driver+0x5c/0xd0 driver_unregister+0x31/0x50 pci_unregister_driver+0x40/0x90 iwl_pci_unregister_driver+0x15/0x20 [iwlwifi] __exit_compat+0x9/0x98 [iwlwifi] __x64_sys_delete_module+0x147/0x260 Signed-off-by: Daniel Gabay Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413213309.082f6e21341b.I0db21d7fa9a828d571ca886713bd0b5d0b6e1e5c@changeid Signed-off-by: Johannes Berg commit 74aae25013ecae39a133148c36c1009b85b06a79 Author: Mukesh Sisodiya Date: Thu Apr 13 21:40:31 2023 +0300 wifi: iwlwifi: Fix the duplicate dump name Driver is using the dump name generated first time in all generated dump in case of NMI. The validity of dump name should be with each dump created and need to reset after each use. Fixes: 834f920ef34b ("wifi: iwlwifi: yoyo: Add driver defined dump file name") Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413213309.6c987f820557.I924f2eae1eef2fe82c7a23be566551653d46f729@changeid Signed-off-by: Johannes Berg commit 70582b826365d27b0be2c7cd0ebe85d01b438d2b Author: Johannes Berg Date: Thu Apr 13 21:40:30 2023 +0300 wifi: iwlwifi: pcie: work around ROM bug on AX210 integrated On 22000 and AX210 devices, there's a ROM bug that causes it to set invalid LTR settings. On 22000 and AX210 non-integrated we can fix up these settings from the driver (as done in the code here), but on AX210 integrated these registers are not available to the driver. Attempt to work around the issue by spinning while the IML is being loaded, the IML will then reprogram the LTR values itself after it's loaded, so only the brief IML load (which the ROM is doing) is affected. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413213309.aaa0a4339984.If08da23e960b6236f8c05c06fc8b26041ac89f1e@changeid Signed-off-by: Johannes Berg commit d48304326e5a34cc8be236d084dc2003d11f4c16 Author: Johannes Berg Date: Thu Apr 13 21:40:29 2023 +0300 wifi: iwlwifi: mvm: add DSM_FUNC_ENABLE_6E value to debugfs In order to simplify checking that this value was set up correctly, add it to debugfs. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413213309.c9a787710e1e.If509b2e510e22d62f3eefb2c54ff1645e331dc23@changeid Signed-off-by: Johannes Berg commit fb40cd9d914c8a1b4acc56edaa96046c5f4f1669 Author: Miri Korenblit Date: Thu Apr 13 21:40:28 2023 +0300 wifi: iwlwifi: mvm: cleanup beacon_inject_active during hw restart beacon_inject_active turns true and false via debugfs when we inject a beacon. During the time of the beacon injection we can't configure the FW with a beacon cmd. If we have a hw restart during the beacon injection then in the recovery flow we will not be able to configure the beacon cmd to the FW. Fix this by cleaning up this variable after an hw restart. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413213309.b021bce5e162.Ia5a0a0b5d8734f63077ceaac936176a345f8d3d1@changeid Signed-off-by: Johannes Berg commit 905d50ddbc83bef0d7f3386e7f3472b0324b405b Author: Haim Dreyfuss Date: Thu Apr 13 21:40:27 2023 +0300 wifi: iwlwifi: mvm: support wowlan info notification version 2 As part of version 2 we don't need to have wake_packet_bufsize and wake_packet_length. The first one is already calculated by the driver, the latter is sent as part of the wake packet notification. Signed-off-by: Haim Dreyfuss Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413213309.3b53213b10d4.Ibf2f15aca614def2d262dd267d1aad65931b58f1@changeid Signed-off-by: Johannes Berg commit 26c680b7319dba5da2ff743a6b18c9e4bba0ba04 Author: Avraham Stern Date: Thu Apr 13 21:40:26 2023 +0300 wifi: iwlwifi: mvm: make HLTK configuration for PASN station optional When secure LTF is not used, the HLTK is not derived during the PASN authentication. Make the HLTK optional when adding a PASN station. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413213309.a57f7f3b59bd.Ifa88afb51a2516156153ac321d81556e295036c2@changeid Signed-off-by: Johannes Berg commit 784d4a4258b6dfc953b9f109cfb203535e0b0796 Author: Johannes Berg Date: Thu Apr 13 21:40:25 2023 +0300 wifi: iwlwifi: mvm: request limiting to 8 MSDUs per A-MSDU Due to hardware limitations when splitting up A-MSDUs, it cannot handle an arbitrary number of MSDUs per A-MSDU. Set the bits to ask transmitters to send only 8 MSDUs in one A-MSDU. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413213309.e6c518f2724f.I15c13d13b38289edbcd64f67d57cf18f6026457a@changeid Signed-off-by: Johannes Berg commit 72c20e60966cb8429875a58ddbb99110f9252b9d Author: Avraham Stern Date: Thu Apr 13 21:40:24 2023 +0300 wifi: iwlwifi: mvm: fix shift-out-of-bounds The aux queue is initialized to IWL_MVM_INVALID_QUEUE. This is later used for a bitmask of the queue, which results in a shift-out-of-bounds. Fix it. Fixes: b85f7ebb2497 ("wifi: iwlwifi: mvm: avoid UB shift of snif_queue") Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413213309.c41a33c32898.Idc15f9eed005345a4137c28ef62efd80a405fad0@changeid Signed-off-by: Johannes Berg commit 1843676ad075e6dd24a7a201171382c810e84b84 Author: Alon Giladi Date: Thu Apr 13 21:40:23 2023 +0300 wifi: iwlwifi: acpi: support modules with high antenna gain Starting from version 4 of ANT_GAIN_CMD verification of ppag table values is done by the FW. Driver has to send the complete table as it appears in the BIOS. Make this change. Signed-off-by: Alon Giladi Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413213309.a965365e2336.I1081f00ae309d9225d0529fa2da6ba7e34a8bd4f@changeid Signed-off-by: Johannes Berg commit 8e5a26360cbe29b896b6758518280d41c3704d43 Author: Ayala Beker Date: Thu Apr 13 21:40:22 2023 +0300 wifi: iwlwifi: mvm: don't drop unencrypted MCAST frames MCAST frames are filtered out by the driver if we are not authorized yet. Fix it to filter out only protected frames. Fixes: 147eb05f24e6 ("iwlwifi: mvm: always tell the firmware to accept MCAST frames in BSS") Signed-off-by: Ayala Beker Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413213309.9cedcc27db60.I8fb7057981392660da482dd215e85c15946d3f4b@changeid Signed-off-by: Johannes Berg commit 5e31b3df86ec6fbb925eee77fe2c450099c61dff Author: Mukesh Sisodiya Date: Thu Apr 13 21:40:21 2023 +0300 wifi: iwlwifi: dbg: print pc register data once fw dump occurred Add debug print for different FW program counter details of different CPU. Program counter pc details will be read from TLV during init. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413213309.862790d336a9.I34e2ea05a79e8b2552f7f221bacf3af0166cb9c0@changeid Signed-off-by: Johannes Berg commit 18996a113f2567aef3057e300e3193ce2df1684c Author: Suzuki K Poulose Date: Wed Apr 5 10:49:22 2023 +0100 coresight: etm_pmu: Set the module field struct pmu::module must be set to the module owning the PMU driver. Set this for the coresight etm_pmu. Fixes: 8e264c52e1dab ("coresight: core: Allow the coresight core driver to be built as a module") Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230405094922.667834-1-suzuki.poulose@arm.com commit f7f9c054a227ad4922070d748b1f4fc4b5657329 Author: Jason Gunthorpe Date: Wed Apr 12 11:11:58 2023 -0300 iommu: Remove iommu_group_get_by_id() This is never called. Signed-off-by: Jason Gunthorpe Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/0-v1-60bbc66d7e92+24-rm_iommu_get_by_id_jgg@nvidia.com Signed-off-by: Joerg Roedel commit e223864f8257afde5e23eca4c006a0d69581a7a2 Author: Jason Gunthorpe Date: Wed Apr 12 11:10:45 2023 -0300 iommu: Make iommu_release_device() static This is not called outside the core code, and indeed cannot be called correctly outside the bus notifier. Make it static. Signed-off-by: Jason Gunthorpe Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/0-v1-c3da18124d2d+56-rm_iommu_release_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 36d532d713db5797b844fb8bd61a068d3cd4ee3f Author: Yangtao Li Date: Fri Apr 14 00:38:32 2023 +0800 quota: mark PRINT_QUOTA_WARNING as BROKEN PRINT_QUOTA_WARNING is deprecated since commit 8e8934695dfd ("quota: send messages via netlink") merged in 2007. Users should rather be using notification over netlink socket if they are interested about explicit notification in addition to plain EDQUOT error. Since printing to console from deep inside filesystem code is problematic, mark the feature as BROKEN now and see who complains. Signed-off-by: Yangtao Li Signed-off-by: Jan Kara Message-Id: <20230413163833.43913-1-frank.li@vivo.com> commit 586d492f2856216b848062d7355f21d286de4677 Author: Arnd Bergmann Date: Fri Apr 14 10:06:56 2023 +0200 crypto: ixp4xx - fix building wiht 64-bit dma_addr_t The crypt_ctl structure must be exactly 64 bytes long to work correctly, and it has to be a power-of-two size to allow turning the 64-bit division in crypt_phys2virt() into a shift operation, avoiding the link failure: ERROR: modpost: "__aeabi_uldivmod" [drivers/crypto/intel/ixp4xx/ixp4xx_crypto.ko] undefined! The failure now shows up because the driver is available for compile testing after the move, and a previous fix turned the more descriptive BUILD_BUG_ON() into a link error. Change the variably-sized dma_addr_t into the expected 'u32' type that is needed for the hardware, and reinstate the size check for all 32-bit architectures to simplify debugging if it hits again. Fixes: 1bc7fdbf2677 ("crypto: ixp4xx - Move driver to drivers/crypto/intel/ixp4xx") Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu commit 0489929f73a2b749cf409b95701bb6bd3c37cd91 Author: Horia GeantA Date: Wed Apr 5 11:07:52 2023 +0200 crypto: caam - OP-TEE firmware support caam driver needs to be aware of OP-TEE f/w presence, since some things are done differently: 1. there is no access to controller's register page (note however that some registers are aliased in job rings' register pages) 2 Due to this, MCFGR[PS] cannot be read and driver assumes MCFGR[PS] = b'0 - engine using 32-bit address pointers. This is in sync with the fact that: -all i.MX SoCs currently use MCFGR[PS] = b'0 -only i.MX OP-TEE use cases don't allow access to controller register page Signed-off-by: Horia GeantA Signed-off-by: Meenakshi Aggarwal Reviewed-by: Gaurav Jain Signed-off-by: Herbert Xu commit ae1dd17daeb8193b1ea3665c89ade63cf7385182 Author: Horia GeantA Date: Wed Apr 5 11:07:51 2023 +0200 crypto: caam - reduce page 0 regs access to minimum Use job ring register map, in place of controller register map to access page 0 registers, as access to the controller register map is not permitted. Signed-off-by: Horia GeantA Signed-off-by: Gaurav Jain Signed-off-by: Meenakshi Aggarwal Reviewed-by: Varun Sethi Reviewed-by: Gaurav Jain Signed-off-by: Herbert Xu commit 6699e1431e1567d1bae9cdccb4a849ca029eb861 Author: Mario Limonciello Date: Mon Apr 3 13:32:13 2023 -0500 crypto: ccp - Use lower 8 bytes to communicate with doorbell command register Unlike other command registers used by the PSP, only the lower 8 bytes are used for communication for both command and status of the command. Suggested-by: Mark Hasemeyer Signed-off-by: Mario Limonciello Reviewed-by: Mark Hasemeyer Tested-by: Mark Hasemeyer Signed-off-by: Herbert Xu commit a19c61b06585f71c4dc1303fe6a3af79dfe33678 Author: Mario Limonciello Date: Mon Apr 3 13:32:12 2023 -0500 crypto: ccp - Return doorbell status code as an argument If the doorbell failed to ring we return -EIO, but the caller can't determine why it failed. Pass the reason for the failure in an argument for caller to investigate. Suggested-by: Mark Hasemeyer Signed-off-by: Mario Limonciello Reviewed-by: Mark Hasemeyer Tested-by: Mark Hasemeyer Signed-off-by: Herbert Xu commit e0358dedff4ff432318665927d45f4786c34ed52 Author: Mario Limonciello Date: Mon Apr 3 13:32:11 2023 -0500 crypto: ccp - Bump up doorbell debug message to error This is helpful not just for debugging problems, but also for investigating captured logs later on. Suggested-by: Grzegorz Bernacki Signed-off-by: Mario Limonciello Tested-by: Mark Hasemeyer Signed-off-by: Herbert Xu commit cfd7ca021e561d4d908d876692debd95cac69dc2 Author: Mario Limonciello Date: Mon Apr 3 13:32:10 2023 -0500 crypto: ccp - Drop extra doorbell checks The doorbell register set used for I2C arbitration is dedicated for this purpose and there is no need to utilize other safety checks the platform access register set uses. Suggested-by: Mark Hasemeyer Signed-off-by: Mario Limonciello Reviewed-by: Mark Hasemeyer Tested-by: Mark Hasemeyer Signed-off-by: Herbert Xu commit c79a3169b9f3633c215b55857eba5921e5b49217 Author: Mario Limonciello Date: Mon Apr 3 12:38:01 2023 -0500 crypto: ccp - Don't initialize CCP for PSP 0x1649 A number of platforms are emitting the error: ```ccp: unable to access the device: you might be running a broken BIOS.``` This is expected behavior as CCP is no longer accessible from the PSP's PCIe BAR so stop trying to probe CCP for 0x1649. Cc: stable@vger.kernel.org Signed-off-by: Mario Limonciello Acked-by: Tom Lendacky Signed-off-by: Herbert Xu commit 01f727cdc4dbecd36c6722977ff9535f16c11751 Author: Herbert Xu Date: Mon Apr 3 12:48:42 2023 +0800 crypto: api - Move low-level functions into algapi.h A number of low-level functions were exposed in crypto.h. Move them into algapi.h (and internal.h). Signed-off-by: Herbert Xu commit dd8f7f463394f92c2f402e29cb39f5265ef97776 Author: Suzuki K Poulose Date: Tue Apr 4 12:11:17 2023 +0100 MAINTAINERS: Remove Mathieu Poirier as coresight maintainer Mathieu Poirier is no longer involved in maintainig the CoreSight self-hosted tracing subsystem. Mathieu, Thank you very much creating and maintaing the subsystem all these years ! Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Acked-by: Mathieu Poirier Link: https://lore.kernel.org/r/20230404111117.569795-1-suzuki.poulose@arm.com commit c11d2e718c792468e67389b506451eddf26c2dac Merge: eaaa4e9239798 b6d85cf5bd143 Author: David S. Miller Date: Fri Apr 14 11:09:27 2023 +0100 Merge branch 'msg_control-split' Kevin Brodsky says: ==================== net: Finish up ->msg_control{,_user} split Commit 1f466e1f15cf ("net: cleanly handle kernel vs user buffers for ->msg_control") introduced the msg_control_user and msg_control_is_user fields in struct msghdr, to ensure that user pointers are represented as such. It also took care of converting most users of struct msghdr::msg_control where user pointers are involved. It did however miss a number of cases, and some code using msg_control inappropriately has also appeared in the meantime. This series is attempting to complete the split, by eliminating the remaining cases where msg_control is used when in fact a user pointer is stored in the union (patch 1). It also addresses a couple of issues with msg_control_is_user: one where it is not updated as it should (patch 2), and one where it is not initialised (patch 3). v1..v2: * Split out the msg_control_is_user fixes into separate patches. ==================== Signed-off-by: David S. Miller commit b6d85cf5bd1433c5dd6bf6bb3a176537184c630c Author: Kevin Brodsky Date: Thu Apr 13 12:47:05 2023 +0100 net/ipv6: Initialise msg_control_is_user do_ipv6_setsockopt() makes use of struct msghdr::msg_control in the IPV6_2292PKTOPTIONS case. Make sure to initialise msg_control_is_user accordingly. Cc: Christoph Hellwig Cc: Eric Dumazet Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: Kevin Brodsky Reviewed-by: Christoph Hellwig Signed-off-by: David S. Miller commit 60daf8d40b80ccbd593930235aea9ee82ea8dbc2 Author: Kevin Brodsky Date: Thu Apr 13 12:47:04 2023 +0100 net/compat: Update msg_control_is_user when setting a kernel pointer cmsghdr_from_user_compat_to_kern() is an unusual case w.r.t. how the kmsg->msg_control* fields are used. The input struct msghdr holds a pointer to a user buffer, i.e. ksmg->msg_control_user is active. However, upon success, a kernel pointer is stored in kmsg->msg_control. kmsg->msg_control_is_user should therefore be updated accordingly. Cc: Christoph Hellwig Cc: Eric Dumazet Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: Kevin Brodsky Reviewed-by: Christoph Hellwig Signed-off-by: David S. Miller commit c39ef2130491b2382f2c81774c825527d4bdf4e2 Author: Kevin Brodsky Date: Thu Apr 13 12:47:03 2023 +0100 net: Ensure ->msg_control_user is used for user buffers Since commit 1f466e1f15cf ("net: cleanly handle kernel vs user buffers for ->msg_control"), pointers to user buffers should be stored in struct msghdr::msg_control_user, instead of the msg_control field. Most users of msg_control have already been converted (where user buffers are involved), but not all of them. This patch attempts to address the remaining cases. An exception is made for null checks, as it should be safe to use msg_control unconditionally for that purpose. Cc: Christoph Hellwig Cc: Eric Dumazet Cc: "David S. Miller" Cc: Jakub Kicinski Signed-off-by: Kevin Brodsky Reviewed-by: Christoph Hellwig Signed-off-by: David S. Miller commit 56e51681246e574dcb2e13fc071c2945c7667c83 Author: Christian König Date: Thu Apr 13 17:02:01 2023 +0200 drm/ttm: revert "Reduce the number of used allocation orders for TTM pages" This reverts commit 322458c2bb1a0398c5775333e1e71e1ece8a461f. PMD_SHIFT is not necessary constant on all architectures resulting in build failures. Signed-off-by: Christian König Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/CAKMK7uHgUuqWJuqmZKrxi2mNiqExhmMif-naYnzUSj-puW-x+A@mail.gmail.com commit eaaa4e92397981c65dae7b9a38425b8fa984d674 Author: Arseniy Krasnov Date: Thu Apr 13 12:17:19 2023 +0300 vsock/loopback: don't disable irqs for queue access This replaces 'skb_queue_tail()' with 'virtio_vsock_skb_queue_tail()'. The first one uses 'spin_lock_irqsave()', second uses 'spin_lock_bh()'. There is no need to disable interrupts in the loopback transport as there is no access to the queue with skbs from interrupt context. Both virtio and vhost transports work in the same way. Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit 247ee6c780406513c6031a7f4ea41f1648b03295 Author: Thierry Reding Date: Thu Apr 13 14:25:48 2023 +0200 pwm: Remove unused radix tree The radix tree's only use was to map PWM channels to the global number space. With that number space gone, the radix tree is now unused, so it can simply be removed. Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit ef9f643a9f8b62bcbcc51f0e0af8599adc2e17ed Author: Pierre Gondois Date: Fri Apr 14 10:14:52 2023 +0200 cacheinfo: Add use_arch[|_cache]_info field/function The cache information can be extracted from either a Device Tree (DT), the PPTT ACPI table, or arch registers (clidr_el1 for arm64). The clidr_el1 register is used only if DT/ACPI information is not available. It does not states how caches are shared among CPUs. Add a use_arch_cache_info field/function to identify when the DT/ACPI doesn't provide cache information. Use this information to assume L1 caches are privates and L2 and higher are shared among all CPUs. Signed-off-by: Pierre Gondois Link: https://lore.kernel.org/r/20230414081453.244787-5-pierre.gondois@arm.com Signed-off-by: Sudeep Holla commit 3522340199cc060b70f0094e3039bdb43c3f6ee1 Author: Pierre Gondois Date: Fri Apr 14 10:14:51 2023 +0200 arch_topology: Remove early cacheinfo error message if -ENOENT fetch_cache_info() tries to get the number of cache leaves/levels for each CPU in order to pre-allocate memory for cacheinfo struct. Allocating this memory later triggers a: 'BUG: sleeping function called from invalid context' in PREEMPT_RT kernels. If there is no cache related information available in DT or ACPI, fetch_cache_info() fails and an error message is printed: 'Early cacheinfo failed, ret = ...' Not having cache information should be a valid configuration. Remove the error message if fetch_cache_info() fails with -ENOENT. Suggested-by: Conor Dooley Link: https://lore.kernel.org/all/20230404-hatred-swimmer-6fecdf33b57a@spud/ Signed-off-by: Pierre Gondois Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230414081453.244787-4-pierre.gondois@arm.com Signed-off-by: Sudeep Holla commit cde0fbff07eff7e4e0e85fa053fe19a24c86b1e0 Author: Pierre Gondois Date: Fri Apr 14 10:14:50 2023 +0200 cacheinfo: Check cache properties are present in DT If a Device Tree (DT) is used, the presence of cache properties is assumed. Not finding any is not considered. For arm64 platforms, cache information can be fetched from the clidr_el1 register. Checking whether cache information is available in the DT allows to switch to using clidr_el1. init_of_cache_level() \-of_count_cache_leaves() will assume there a 2 cache leaves (L1 data/instruction caches), which can be different from clidr_el1 information. cache_setup_of_node() tries to read cache properties in the DT. If there are none, this is considered a success. Knowing no information was available would allow to switch to using clidr_el1. Fixes: de0df442ee49 ("cacheinfo: Check 'cache-unified' property to count cache leaves") Reported-by: Alexandre Ghiti Link: https://lore.kernel.org/all/20230404-hatred-swimmer-6fecdf33b57a@spud/ Signed-off-by: Pierre Gondois Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230414081453.244787-3-pierre.gondois@arm.com Signed-off-by: Sudeep Holla commit 7a306e3eabf2b2fd8cffa69b87b32dbf814d79ce Author: Pierre Gondois Date: Fri Apr 14 10:14:49 2023 +0200 cacheinfo: Check sib_leaf in cache_leaves_are_shared() If there is no ACPI/DT information, it is assumed that L1 caches are private and L2 (and higher) caches are shared. A cache is 'shared' between two CPUs if it is accessible from these two CPUs. Each CPU owns a representation (i.e. has a dedicated cacheinfo struct) of the caches it has access to. cache_leaves_are_shared() tries to identify whether two representations are designating the same actual cache. In cache_leaves_are_shared(), if 'this_leaf' is a L2 cache (or higher) and 'sib_leaf' is a L1 cache, the caches are detected as shared as only this_leaf's cache level is checked. This is leads to setting sib_leaf as being shared with another CPU, which is incorrect as this is a L1 cache. Check 'sib_leaf->level'. Also update the comment as the function is called when populating 'shared_cpu_map'. Fixes: f16d1becf96f ("cacheinfo: Use cache identifiers to check if the caches are shared if available") Signed-off-by: Pierre Gondois Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230414081453.244787-2-pierre.gondois@arm.com Signed-off-by: Sudeep Holla commit df60325839efcc0fa37f5ec64c0e29f5d84e56c8 Author: Linus Walleij Date: Tue Apr 4 11:43:11 2023 +0200 pinctrl: sx150x: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. I switched to consistently using irqd_to_hwirq() consistently while we are at it. As the driver now needs to get the gpio_chip in the .irq_mask and .irq_unmask callbacks, I switched to a pattern where we first fetch the gpio_chip and then the state container from that in two steps. The compiler will do the same thing anyway. Cc: Marc Zyngier Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230403-immutable-irqchips-v1-9-503788a7f6e6@linaro.org commit 7341944c78d544d4f96cfee3c2d56ceec94d83a4 Author: Linus Walleij Date: Tue Apr 4 11:43:10 2023 +0200 pinctrl: stmfx: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. This driver rolls it's own resource handling and does not use GPIOCHIP_IRQ_RESOURCE_HELPERS. Cc: Marc Zyngier Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230403-immutable-irqchips-v1-8-503788a7f6e6@linaro.org commit c36f8c06ebd0c4feda85b178d927e6e04dbe4c3f Author: Linus Walleij Date: Tue Apr 4 11:43:09 2023 +0200 pinctrl: st: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. I switched to using irqd_to_hwirq() consistently while we are at it. This driver does not use the GPIOCHIP_IRQ_RESOURCE_HELPERS as it defines its own resource reservations, simply in order to turn IRQ lines into inputs on initialization. Also switched the open coded calls to gpiochip_lock_as_irq() to gpiochip_reqres_irq() so we also get the right module reference counting. Cc: Marc Zyngier Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230403-immutable-irqchips-v1-7-503788a7f6e6@linaro.org commit cca973a823f1c94313256ab214af0577dcc3a52b Author: Linus Walleij Date: Tue Apr 4 11:43:08 2023 +0200 pinctrl: mcp23s08: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. I switched to using irqd_to_hwirq() consistently while we are at it. Cc: Marc Zyngier Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230403-immutable-irqchips-v1-6-503788a7f6e6@linaro.org commit 52066a53bd116a2f41d04d99b5095c02ad8cf953 Author: Linus Walleij Date: Tue Apr 4 11:43:07 2023 +0200 pinctrl: equilibrium: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230403-immutable-irqchips-v1-5-503788a7f6e6@linaro.org commit dcea54b7dad1b39757949d3e97a5eead161e8f0d Author: Linus Walleij Date: Tue Apr 4 11:43:06 2023 +0200 pinctrl: npcm7xx: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. I refactored the way the state container was accessed in the irq_chip callbacks to all look the same and switch to use irqd_to_hwirq() while we are at it. Cc: Marc Zyngier Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230403-immutable-irqchips-v1-4-503788a7f6e6@linaro.org commit dccdc09199b78cf3e24ec6becb70eb9a3c039d24 Author: Linus Walleij Date: Tue Apr 4 11:43:05 2023 +0200 pinctrl: armada-37xx: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230403-immutable-irqchips-v1-3-503788a7f6e6@linaro.org commit bb7e64e60e462c133a09e5674aa4c11ef888007d Author: Linus Walleij Date: Tue Apr 4 11:43:04 2023 +0200 pinctrl: nsp: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230403-immutable-irqchips-v1-2-503788a7f6e6@linaro.org commit 2cc4485e60a760fa50e0180e93308aa0975c73dd Author: Linus Walleij Date: Tue Apr 4 11:43:03 2023 +0200 pinctrl: iproc: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230403-immutable-irqchips-v1-1-503788a7f6e6@linaro.org commit c61fcc090fd9e3c214d1aad2e020bcab30088b42 Merge: e473ea818bfe4 80f6215b450eb Author: David S. Miller Date: Fri Apr 14 08:56:20 2023 +0100 Merge branch 'mana-jumbo-frames' Haiyang Zhang says: ==================== net: mana: Add support for jumbo frame The set adds support for jumbo frame, with some optimization for the RX path. ==================== Signed-off-by: David S. Miller commit 80f6215b450eb8e92d8b1f117abf5ecf867f963e Author: Haiyang Zhang Date: Wed Apr 12 14:16:03 2023 -0700 net: mana: Add support for jumbo frame During probe, get the hardware-allowed max MTU by querying the device configuration. Users can select MTU up to the device limit. When XDP is in use, limit MTU settings so the buffer size is within one page. And, when MTU is set to a too large value, XDP is not allowed to run. Also, to prevent changing MTU fails, and leaves the NIC in a bad state, pre-allocate all buffers before starting the change. So in low memory condition, it will return error, without affecting the NIC. Signed-off-by: Haiyang Zhang Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit 2fbbd712baf1c60996554326728bbdbef5616e12 Author: Haiyang Zhang Date: Wed Apr 12 14:16:02 2023 -0700 net: mana: Enable RX path to handle various MTU sizes Update RX data path to allocate and use RX queue DMA buffers with proper size based on potentially various MTU sizes. Signed-off-by: Haiyang Zhang Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit a2917b23497e4205db32271e4e06e142a9f8a6aa Author: Haiyang Zhang Date: Wed Apr 12 14:16:01 2023 -0700 net: mana: Refactor RX buffer allocation code to prepare for various MTU Move out common buffer allocation code from mana_process_rx_cqe() and mana_alloc_rx_wqe() to helper functions. Refactor related variables so they can be changed in one place, and buffer sizes are in sync. Signed-off-by: Haiyang Zhang Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit ce518bc3e9ca342309995c9270c3ec4892963695 Author: Haiyang Zhang Date: Wed Apr 12 14:16:00 2023 -0700 net: mana: Use napi_build_skb in RX path Use napi_build_skb() instead of build_skb() to take advantage of the NAPI percpu caches to obtain skbuff_head. Signed-off-by: Haiyang Zhang Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit 7bc436121e557b1f5bebf5ad67e7ed3614d6df92 Author: Tom Rix Date: Mon Mar 27 09:23:24 2023 -0400 md/raid5: remove unused working_disks variable clang with W=1 reports drivers/md/raid5.c:7719:6: error: variable 'working_disks' set but not used [-Werror,-Wunused-but-set-variable] int working_disks = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230327132324.1769595-1-trix@redhat.com commit 7cddb055bfda5f7b0be931e8ea750fc28bc18a27 Author: Yu Kuai Date: Tue Mar 14 09:22:58 2023 +0800 md/raid10: don't call bio_start_io_acct twice for bio which experienced read error handle_read_error() will resumit r10_bio by raid10_read_request(), which will call bio_start_io_acct() again, while bio_end_io_acct() will only be called once. Fix the problem by don't account io again from handle_read_error(). Fixes: 528bc2cf2fcc ("md/raid10: enable io accounting") Suggested-by: Song Liu Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230314012258.2395894-1-yukuai1@huaweicloud.com commit f0ddb83da3cbbf8a1f9087a642c448ff52ee9abd Author: Yu Kuai Date: Fri Mar 10 15:38:55 2023 +0800 md/raid10: fix memleak of md thread In raid10_run(), if setup_conf() succeed and raid10_run() failed before setting 'mddev->thread', then in the error path 'conf->thread' is not freed. Fix the problem by setting 'mddev->thread' right after setup_conf(). Fixes: 43a521238aca ("md-cluster: choose correct label when clustered layout is not supported") Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230310073855.1337560-7-yukuai1@huaweicloud.com commit c9ac2acde53f5385de185bccf6aaa91cf9ac1541 Author: Yu Kuai Date: Fri Mar 10 15:38:54 2023 +0800 md/raid10: fix memleak for 'conf->bio_split' In the error path of raid10_run(), 'conf' need be freed, however, 'conf->bio_split' is missed and memory will be leaked. Since there are 3 places to free 'conf', factor out a helper to fix the problem. Fixes: fc9977dd069e ("md/raid10: simplify the splitting of requests.") Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230310073855.1337560-6-yukuai1@huaweicloud.com commit 26208a7cffd0c7cbf14237ccd20c7270b3ffeb7e Author: Yu Kuai Date: Fri Mar 10 15:38:53 2023 +0800 md/raid10: fix leak of 'r10bio->remaining' for recovery raid10_sync_request() will add 'r10bio->remaining' for both rdev and replacement rdev. However, if the read io fails, recovery_request_write() returns without issuing the write io, in this case, end_sync_request() is only called once and 'remaining' is leaked, cause an io hang. Fix the problem by decreasing 'remaining' according to if 'bio' and 'repl_bio' is valid. Fixes: 24afd80d99f8 ("md/raid10: handle recovery of replacement devices.") Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230310073855.1337560-5-yukuai1@huaweicloud.com commit bcf3e7da3ad3bfea38ac6ba9f56b99b2877af51f Author: Marc Zyngier Date: Sat Apr 8 17:04:27 2023 +0100 KVM: arm64: vhe: Drop extra isb() on guest exit __kvm_vcpu_run_vhe() end on VHE with an isb(). However, this function is only reachable via kvm_call_hyp_ret(), which already contains an isb() in order to mimick the behaviour of nVHE and provide a context synchronisation event. We thus have two isb()s back to back, which is one too many. Drop the first one and solely rely on the one in the helper. Signed-off-by: Marc Zyngier Reviewed-by: Oliver Upton commit 1ff2755d6800d60bee96fb303cbbf30f9bb483a2 Author: Marc Zyngier Date: Sat Apr 8 17:04:26 2023 +0100 KVM: arm64: vhe: Synchronise with page table walker on MMU update Contrary to nVHE, VHE is a lot easier when it comes to dealing with speculative page table walks started at EL1. As we only change EL1&0 translation regime when context-switching, we already benefit from the effect of the DSB that sits in the context switch code. We only need to take care of it in the NV case, where we can flip between between two EL1 contexts (one of them being the virtual EL2) without a context switch. Signed-off-by: Marc Zyngier Reviewed-by: Oliver Upton commit 8442d65373c6316876208c1ad27729e9682fa3cf Author: Marc Zyngier Date: Sat Apr 8 17:04:25 2023 +0100 KVM: arm64: pkvm: Document the side effects of kvm_flush_dcache_to_poc() We rely on the presence of a DSB at the end of kvm_flush_dcache_to_poc() that, on top of ensuring completion of the cache clean, also covers the speculative page table walk started from EL1. Document this dependency. Signed-off-by: Marc Zyngier Reviewed-by: Oliver Upton commit 7e1b2329c205d0a08ebaf3f619318a8a18f36644 Author: Marc Zyngier Date: Sat Apr 8 17:04:24 2023 +0100 KVM: arm64: nvhe: Synchronise with page table walker on TLBI A TLBI from EL2 impacting EL1 involves messing with the EL1&0 translation regime, and the page table walker may still be performing speculative walks. Piggyback on the existing DSBs to always have a DSB ISH that will synchronise all load/store operations that the PTW may still have. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit c55d84fb2bd89fe2ad56768ead90eb1050581d29 Author: Peng Fan Date: Thu Apr 13 23:35:26 2023 -0700 dt-bindings: input: pwm-beeper: convert to dt schema Convert the binding doc to dt schema, and also fixed the example from fixed-regulator to regulator-fixed. Signed-off-by: Peng Fan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230407075259.1593739-1-peng.fan@oss.nxp.com Signed-off-by: Dmitry Torokhov commit cf5950187319346d7cdc62522f90479dfefd9235 Author: Vicki Pfau Date: Thu Apr 13 23:58:12 2023 -0700 Input: xpad - fix PowerA EnWired Controller guide button This commit explicitly disables the audio interface the same way the official driver does. This is needed for some controllers, such as the PowerA Enhanced Wired Controller for Series X|S (0x20d6:0x200e) to report the guide button. Signed-off-by: Vicki Pfau Link: https://lore.kernel.org/r/20230411031650.960322-3-vi@endrift.com Signed-off-by: Dmitry Torokhov commit f9b2e603c6216824e34dc9a67205d98ccc9a41ca Author: Vicki Pfau Date: Thu Apr 13 23:57:42 2023 -0700 Input: xpad - add constants for GIP interface numbers Wired GIP devices present multiple interfaces with the same USB identification other than the interface number. This adds constants for differentiating two of them and uses them where appropriate Signed-off-by: Vicki Pfau Link: https://lore.kernel.org/r/20230411031650.960322-2-vi@endrift.com Signed-off-by: Dmitry Torokhov commit 2efc8e1001acfdc143cf2d25a08a4974c322e2a8 Author: Chaitanya Kumar Borah Date: Thu Mar 30 20:31:04 2023 +0530 drm/i915/color: Fix typo for Plane CSC indexes Replace _PLANE_INPUT_CSC_RY_GY_2_* with _PLANE_CSC_RY_GY_2_* for Plane CSC Fixes: 6eba56f64d5d ("drm/i915/pxp: black pixels on pxp disabled") Cc: Signed-off-by: Chaitanya Kumar Borah Reviewed-by: Uma Shankar Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20230330150104.2923519-1-chaitanya.kumar.borah@intel.com (cherry picked from commit e39c76b2160bbd005587f978d29603ef790aefcd) Signed-off-by: Joonas Lahtinen commit d6e680837ec568818eff275c15709231ce2e2b4f Author: Jiapeng Chong Date: Thu Apr 13 23:23:29 2023 -0700 Input: synaptics-rmi4 - fix function name in kerneldoc No functional modification involved. drivers/input/rmi4/rmi_bus.c:300: warning: expecting prototype for rmi_register_function_handler(). Prototype was for __rmi_register_function_handler() instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20230209040710.111456-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Dmitry Torokhov commit 5bca3688bdbc3b58a2894b8671a8e2378efe28bd Author: Miaoqian Lin Date: Thu Apr 13 23:05:20 2023 -0700 Input: raspberrypi-ts - fix refcount leak in rpi_ts_probe rpi_firmware_get() take reference, we need to release it in error paths as well. Use devm_rpi_firmware_get() helper to handling the resources. Also remove the existing rpi_firmware_put(). Fixes: 0b9f28fed3f7 ("Input: add official Raspberry Pi's touchscreen driver") Fixes: 3b8ddff780b7 ("input: raspberrypi-ts: Release firmware handle when not needed") Signed-off-by: Miaoqian Lin Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20221223074657.810346-1-linmq006@gmail.com Signed-off-by: Dmitry Torokhov commit e473ea818bfe42cbdf872c41593cbaf24dbf1297 Merge: f7d29571ab0ad 108ff8215b559 Author: Jakub Kicinski Date: Thu Apr 13 22:28:03 2023 -0700 Merge tag 'mlx5-updates-2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2023-04-11 1) Vlad adds the support for linux bridge multicast offload support Patches #1 through #9 Synopsis Vlad Says: ============== Implement support of bridge multicast offload in mlx5. Handle port object attribute SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED notification to toggle multicast offload and bridge snooping support on bridge. Handle port object SWITCHDEV_OBJ_ID_PORT_MDB notification to attach a bridge port to MDB. Steering architecture Existing offload infrastructure relies on two levels of flow tables - bridge ingress and egress. For multicast offload the architecture is extended with additional layer of per-port multicast replication tables. Such tables filter loopback traffic (so packets are not replicated to their source port) and pop VLAN headers for "untagged" VLANs. The tables are referenced by the MDB rules in egress table. MDB egress rule can point to multiple per-port multicast tables, which causes matching multicast traffic to be replicated to all of them, and, consecutively, to several bridge ports: +--------+--+ +---------------------------------------> Port 1 | | | +-^------+--+ | | | | +-----------------------------------------+ | +---------------------------+ | | EGRESS table | | +--> PORT 1 multicast table | | +----------------------------------+ +-----------------------------------------+ | | +---------------------------+ | | INGRESS table | | | | | | | | +----------------------------------+ | dst_mac=P1,vlan=X -> pop vlan, goto P1 +--+ | | FG0: | | | | | dst_mac=P1,vlan=Y -> pop vlan, goto P1 | | | src_port=dst_port -> drop | | | src_mac=M1,vlan=X -> goto egress +---> dst_mac=P2,vlan=X -> pop vlan, goto P2 +--+ | | FG1: | | | ... | | dst_mac=P2,vlan=Y -> goto P2 | | | | VLAN X -> pop, goto port | | | | | dst_mac=MDB1,vlan=Y -> goto mcast P1,P2 +-----+ | ... | | +----------------------------------+ | | | | | VLAN Y -> pop, goto port +-------+ +-----------------------------------------+ | | | FG3: | | | | matchall -> goto port | | | | | | | +---------------------------+ | | | | | | +--------+--+ +---------------------------------------> Port 2 | | | +-^------+--+ | | | | | +---------------------------+ | +--> PORT 2 multicast table | | +---------------------------+ | | | | | FG0: | | | src_port=dst_port -> drop | | | FG1: | | | VLAN X -> pop, goto port | | | ... | | | | | | FG3: | | | matchall -> goto port +-------+ | | +---------------------------+ Patches overview: - Patch 1 adds hardware definition bits for capabilities required to replicate multicast packets to multiple per-port tables. These bits are used by following patches to only attempt multicast offload if firmware and hardware provide necessary support. - Pathces 2-4 patches are preparations and refactoring. - Patch 5 implements necessary infrastructure to toggle multicast offload via SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED port object attribute notification. This also enabled IGMP and MLD snooping. - Patch 6 implements per-port multicast replication tables. It only supports filtering of loopback packets. - Patch 7 extends per-port multicast tables with VLAN pop support for 'untagged' VLANs. - Patch 8 handles SWITCHDEV_OBJ_ID_PORT_MDB port object notifications. It creates MDB replication rules in egress table that can replicate packets to multiple per-port multicast tables. - Patch 9 adds tracepoints for MDB events. ============== 2) Parav Create a new allocation profile for SFs, to save on memory 3) Yevgeny provides some initial patches for upcoming software steering support new pattern/arguments type of modify_header actions. Starting with ConnectX-6 DX, we use a new design of modify_header FW object. The current modify_header object allows for having only limited number of these FW objects, which means that we are limited in the number of offloaded flows that require modify_header action. As a preparation Yevgeny provides the following 4 patches: - Patch 1: Add required mlx5_ifc HW bits - Patch 2, 3: Add new WQE type and opcode that is required for pattern/arg support and adds appropriate support in dr_send.c - Patch 4: Add ICM pool for modify-header-pattern objects and implement patterns cache, allowing patterns reuse for different flows * tag 'mlx5-updates-2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: DR, Add modify-header-pattern ICM pool net/mlx5: DR, Prepare sending new WQE type net/mlx5: Add new WQE for updating flow table net/mlx5: Add mlx5_ifc bits for modify header argument net/mlx5: DR, Set counter ID on the last STE for STEv1 TX net/mlx5: Create a new profile for SFs net/mlx5: Bridge, add tracepoints for multicast net/mlx5: Bridge, implement mdb offload net/mlx5: Bridge, support multicast VLAN pop net/mlx5: Bridge, add per-port multicast replication tables net/mlx5: Bridge, snoop igmp/mld packets net/mlx5: Bridge, extract code to lookup parent bridge of port net/mlx5: Bridge, move additional data structures to priv header net/mlx5: Bridge, increase bridge tables sizes net/mlx5: Add mlx5_ifc definitions for bridge multicast support ==================== Link: https://lore.kernel.org/r/20230412040752.14220-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit f7d29571ab0ad8b0251d8f2fe433b21ac045091c Merge: 85a4abed15540 01e23b2b3bad2 Author: Jakub Kicinski Date: Thu Apr 13 22:22:12 2023 -0700 Merge branch 'add-kernel-tc-mqprio-and-tc-taprio-support-for-preemptible-traffic-classes' Vladimir Oltean says: ==================== Add kernel tc-mqprio and tc-taprio support for preemptible traffic classes The last RFC in August 2022 contained a proposal for the UAPI of both TSN standards which together form Frame Preemption (802.1Q and 802.3): https://lore.kernel.org/netdev/20220816222920.1952936-1-vladimir.oltean@nxp.com/ It wasn't clear at the time whether the 802.1Q portion of Frame Preemption should be exposed via the tc qdisc (mqprio, taprio) or via some other layer (perhaps also ethtool like the 802.3 portion, or dcbnl), even though the options were discussed extensively, with pros and cons: https://lore.kernel.org/netdev/20220816222920.1952936-3-vladimir.oltean@nxp.com/ So the 802.3 portion got submitted separately and finally was accepted: https://lore.kernel.org/netdev/20230119122705.73054-1-vladimir.oltean@nxp.com/ leaving the only remaining question: how do we expose the 802.1Q bits? This series proposes that we use the Qdisc layer, through separate (albeit very similar) UAPI in mqprio and taprio, and that both these Qdiscs pass the information down to the offloading device driver through the common mqprio offload structure (which taprio also passes). An implementation is provided for the NXP LS1028A on-board Ethernet endpoint (enetc). Previous versions also contained support for its embedded switch (felix), but this needs more work and will be submitted separately. v4: https://lore.kernel.org/netdev/20230403103440.2895683-1-vladimir.oltean@nxp.com/ v2: https://lore.kernel.org/netdev/20230219135309.594188-1-vladimir.oltean@nxp.com/ v1: https://lore.kernel.org/netdev/20230216232126.3402975-1-vladimir.oltean@nxp.com/ ==================== Link: https://lore.kernel.org/r/20230411180157.1850527-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 01e23b2b3bad2d6e996d546f69c6ee804d0fc92f Author: Vladimir Oltean Date: Tue Apr 11 21:01:57 2023 +0300 net: enetc: add support for preemptible traffic classes PFs which support the MAC Merge layer also have a set of 8 registers called "Port traffic class N frame preemption register (PTC0FPR - PTC7FPR)". Through these, a traffic class (group of TX rings of same dequeue priority) can be mapped to the eMAC or to the pMAC. There's nothing particularly spectacular here. We should probably only commit the preemptible TCs to hardware once the MAC Merge layer became active, but unlike Felix, we don't have an IRQ that notifies us of that. We'd have to sleep for up to verifyTime (127 ms) to wait for a resolution coming from the verification state machine; not only from the ndo_setup_tc() code path, but also from enetc_mm_link_state_update(). Since it's relatively complicated and has a relatively small benefit, I'm not doing it. Signed-off-by: Vladimir Oltean Reviewed-by: Ferenc Fejes Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 50764da37cbed7097898a49ae5ba8337205ab4ac Author: Vladimir Oltean Date: Tue Apr 11 21:01:56 2023 +0300 net: enetc: rename "mqprio" to "qopt" To gain access to the larger encapsulating structure which has the type tc_mqprio_qopt_offload, rename just the "qopt" field as "qopt". Signed-off-by: Vladimir Oltean Reviewed-by: Ferenc Fejes Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit a721c3e54b80e45cd9202e7fca29ef018bed9069 Author: Vladimir Oltean Date: Tue Apr 11 21:01:55 2023 +0300 net/sched: taprio: allow per-TC user input of FP adminStatus This is a duplication of the FP adminStatus logic introduced for tc-mqprio. Offloading is done through the tc_mqprio_qopt_offload structure embedded within tc_taprio_qopt_offload. So practically, if a device driver is written to treat the mqprio portion of taprio just like standalone mqprio, it gets unified handling of frame preemption. I would have reused more code with taprio, but this is mostly netlink attribute parsing, which is hard to transform into generic code without having something that stinks as a result. We have the same variables with the same semantics, just different nlattr type values (TCA_MQPRIO_TC_ENTRY=5 vs TCA_TAPRIO_ATTR_TC_ENTRY=12; TCA_MQPRIO_TC_ENTRY_FP=2 vs TCA_TAPRIO_TC_ENTRY_FP=3, etc) and consequently, different policies for the nest. Every time nla_parse_nested() is called, an on-stack table "tb" of nlattr pointers is allocated statically, up to the maximum understood nlattr type. That array size is hardcoded as a constant, but when transforming this into a common parsing function, it would become either a VLA (which the Linux kernel rightfully doesn't like) or a call to the allocator. Having FP adminStatus in tc-taprio can be seen as addressing the 802.1Q Annex S.3 "Scheduling and preemption used in combination, no HOLD/RELEASE" and S.4 "Scheduling and preemption used in combination with HOLD/RELEASE" use cases. HOLD and RELEASE events are emitted towards the underlying MAC Merge layer when the schedule hits a Set-And-Hold-MAC or a Set-And-Release-MAC gate operation. So within the tc-taprio UAPI space, one can distinguish between the 2 use cases by choosing whether to use the TC_TAPRIO_CMD_SET_AND_HOLD and TC_TAPRIO_CMD_SET_AND_RELEASE gate operations within the schedule, or just TC_TAPRIO_CMD_SET_GATES. A small part of the change is dedicated to refactoring the max_sdu nlattr parsing to put all logic under the "if" that tests for presence of that nlattr. Signed-off-by: Vladimir Oltean Reviewed-by: Ferenc Fejes Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit f62af20bed2d9e824f51cfc97ff01bc261f40e58 Author: Vladimir Oltean Date: Tue Apr 11 21:01:54 2023 +0300 net/sched: mqprio: allow per-TC user input of FP adminStatus IEEE 802.1Q-2018 clause 6.7.2 Frame preemption specifies that each packet priority can be assigned to a "frame preemption status" value of either "express" or "preemptible". Express priorities are transmitted by the local device through the eMAC, and preemptible priorities through the pMAC (the concepts of eMAC and pMAC come from the 802.3 MAC Merge layer). The FP adminStatus is defined per packet priority, but 802.1Q clause 12.30.1.1.1 framePreemptionAdminStatus also says that: | Priorities that all map to the same traffic class should be | constrained to use the same value of preemption status. It is impossible to ignore the cognitive dissonance in the standard here, because it practically means that the FP adminStatus only takes distinct values per traffic class, even though it is defined per priority. I can see no valid use case which is prevented by having the kernel take the FP adminStatus as input per traffic class (what we do here). In addition, this also enforces the above constraint by construction. User space network managers which wish to expose FP adminStatus per priority are free to do so; they must only observe the prio_tc_map of the netdev (which presumably is also under their control, when constructing the mqprio netlink attributes). The reason for configuring frame preemption as a property of the Qdisc layer is that the information about "preemptible TCs" is closest to the place which handles the num_tc and prio_tc_map of the netdev. If the UAPI would have been any other layer, it would be unclear what to do with the FP information when num_tc collapses to 0. A key assumption is that only mqprio/taprio change the num_tc and prio_tc_map of the netdev. Not sure if that's a great assumption to make. Having FP in tc-mqprio can be seen as an implementation of the use case defined in 802.1Q Annex S.2 "Preemption used in isolation". There will be a separate implementation of FP in tc-taprio, for the other use cases. Signed-off-by: Vladimir Oltean Reviewed-by: Ferenc Fejes Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit c54876cd5961ce0f8e74807f79a6739cd6b35ddf Author: Vladimir Oltean Date: Tue Apr 11 21:01:53 2023 +0300 net/sched: pass netlink extack to mqprio and taprio offload With the multiplexed ndo_setup_tc() model which lacks a first-class struct netlink_ext_ack * argument, the only way to pass the netlink extended ACK message down to the device driver is to embed it within the offload structure. Do this for struct tc_mqprio_qopt_offload and struct tc_taprio_qopt_offload. Since struct tc_taprio_qopt_offload also contains a tc_mqprio_qopt_offload structure, and since device drivers might effectively reuse their mqprio implementation for the mqprio portion of taprio, we make taprio set the extack in both offload structures to point at the same netlink extack message. In fact, the taprio handling is a bit more tricky, for 2 reasons. First is because the offload structure has a longer lifetime than the extack structure. The driver is supposed to populate the extack synchronously from ndo_setup_tc() and leave it alone afterwards. To not have any use-after-free surprises, we zero out the extack pointer when we leave taprio_enable_offload(). The second reason is because taprio does overwrite the extack message on ndo_setup_tc() error. We need to switch to the weak form of setting an extack message, which preserves a potential message set by the driver. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim Signed-off-by: Jakub Kicinski commit ab277d2084ba59956b177a7d417791a27361e283 Author: Vladimir Oltean Date: Tue Apr 11 21:01:52 2023 +0300 net/sched: mqprio: add an extack message to mqprio_parse_opt() Ferenc reports that a combination of poor iproute2 defaults and obscure cases where the kernel returns -EINVAL make it difficult to understand what is wrong with this command: $ ip link add veth0 numtxqueues 8 numrxqueues 8 type veth peer name veth1 $ tc qdisc add dev veth0 root mqprio num_tc 8 map 0 1 2 3 4 5 6 7 \ queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 RTNETLINK answers: Invalid argument Hopefully with this patch, the cause is clearer: Error: Device does not support hardware offload. The kernel was (and still is) rejecting this because iproute2 defaults to "hw 1" if this command line option is not specified. Link: https://lore.kernel.org/netdev/ede5e9a2f27bf83bfb86d3e8c4ca7b34093b99e2.camel@inf.elte.hu/ Signed-off-by: Vladimir Oltean Reviewed-by: Ferenc Fejes Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim Signed-off-by: Jakub Kicinski commit 57f21bf85400abadac0cb2a4db5de1d663f8863f Author: Vladimir Oltean Date: Tue Apr 11 21:01:51 2023 +0300 net/sched: mqprio: add extack to mqprio_parse_nlattr() Netlink attribute parsing in mqprio is a minesweeper game, with many options having the possibility of being passed incorrectly and the user being none the wiser. Try to make errors less sour by giving user space some information regarding what went wrong. Signed-off-by: Vladimir Oltean Reviewed-by: Ferenc Fejes Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim Signed-off-by: Jakub Kicinski commit 3dd0c16ec93e2bf5212758baea34cfed90d9e6bd Author: Vladimir Oltean Date: Tue Apr 11 21:01:50 2023 +0300 net/sched: mqprio: simplify handling of nlattr portion of TCA_OPTIONS In commit 4e8b86c06269 ("mqprio: Introduce new hardware offload mode and shaper in mqprio"), the TCA_OPTIONS format of mqprio was extended to contain a fixed portion (of size NLA_ALIGN(sizeof struct tc_mqprio_qopt)) and a variable portion of other nlattrs (in the TCA_MQPRIO_* type space) following immediately afterwards. In commit feb2cf3dcfb9 ("net/sched: mqprio: refactor nlattr parsing to a separate function"), we've moved the nlattr handling to a smaller function, but yet, a small parse_attr() still remains, and the larger mqprio_parse_nlattr() still does not have access to the beginning, and the length, of the TCA_OPTIONS region containing these other nlattrs. In a future change, the mqprio qdisc will need to iterate through this nlattr region to discover other attributes, so eliminate parse_attr() and add 2 variables in mqprio_parse_nlattr() which hold the beginning and the length of the nlattr range. We avoid the need to memset when nlattr_opt_len has insufficient length by pre-initializing the table "tb". Signed-off-by: Vladimir Oltean Reviewed-by: Ferenc Fejes Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim Signed-off-by: Jakub Kicinski commit d54151aa0f4b5c89561705a00d8a5ebb4230028c Author: Vladimir Oltean Date: Tue Apr 11 21:01:49 2023 +0300 net: ethtool: create and export ethtool_dev_mm_supported() Create a wrapper over __ethtool_dev_mm_supported() which also calls ethnl_ops_begin() and ethnl_ops_complete(). It can be used by other code layers, such as tc, to make sure that preemptible TCs are supported (this is true if an underlying MAC Merge layer exists). Signed-off-by: Vladimir Oltean Reviewed-by: Ferenc Fejes Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 9fdfe6d45be2fe1bd07678bfc453e6a627c08223 Author: Yu Kuai Date: Fri Mar 10 15:38:52 2023 +0800 md/raid10: don't BUG_ON() in raise_barrier() If raise_barrier() is called the first time in raid10_sync_request(), which means the first non-normal io is handled, raise_barrier() should wait for all dispatched normal io to be done. This ensures that normal io won't starve. However, BUG_ON() if this is broken is too aggressive. This patch replace BUG_ON() with WARN and fall back to not force. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230310073855.1337560-4-yukuai1@huaweicloud.com commit 6efddf1e32e2a264694766ca485a4f5e04ee82a7 Author: Yu Kuai Date: Fri Mar 10 15:38:51 2023 +0800 md: fix soft lockup in status_resync status_resync() will calculate 'curr_resync - recovery_active' to show user a progress bar like following: [============>........] resync = 61.4% 'curr_resync' and 'recovery_active' is updated in md_do_sync(), and status_resync() can read them concurrently, hence it's possible that 'curr_resync - recovery_active' can overflow to a huge number. In this case status_resync() will be stuck in the loop to print a large amount of '=', which will end up soft lockup. Fix the problem by setting 'resync' to MD_RESYNC_ACTIVE in this case, this way resync in progress will be reported to user. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230310073855.1337560-3-yukuai1@huaweicloud.com commit c31fea2f8e2a72c817f318016bbc327095175a9f Author: Mariusz Tkaczyk Date: Mon Mar 6 14:03:17 2023 +0100 md: add error_handlers for raid0 and linear After the commit 9631abdbf406c("md: Set MD_BROKEN for RAID1 and RAID10") MD_BROKEN must be set if array is failed because state_store() checks it. If it is set then -EBUSY is returned to userspace. For raid0 and linear MD_BROKEN is not set by error_handler(). As a result mdadm is unable to trigger clean-up actions. It is a regression. This patch adds appropriate error_handler for raid0 and linear. The error handler sets MD_BROKEN for this device. Reviewed-by: Xiao Ni Signed-off-by: Mariusz Tkaczyk Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230306130317.3418-1-mariusz.tkaczyk@linux.intel.com commit 8745faa95611f6331331284925012c0310ae3e2c Author: Jon Derrick Date: Fri Feb 24 11:33:23 2023 -0700 md: Use optimal I/O size for last bitmap page If the bitmap space has enough room, size the I/O for the last bitmap page write to the optimal I/O size for the storage device. The expanded write is checked that it won't overrun the data or metadata. The drive this was tested against has higher latencies when there are sub-4k writes due to device-side read-mod-writes of its atomic 4k write unit. This change helps increase performance by sizing the last bitmap page I/O for the device's preferred write unit, if it is given. Example Intel/Solidigm P5520 Raid10, Chunk-size 64M, bitmap-size 57228 bits $ mdadm --create /dev/md0 --level=10 --raid-devices=4 /dev/nvme{0,1,2,3}n1 --assume-clean --bitmap=internal --bitmap-chunk=64M $ fio --name=test --direct=1 --filename=/dev/md0 --rw=randwrite --bs=4k --runtime=60 Without patch: write: IOPS=1676, BW=6708KiB/s (6869kB/s)(393MiB/60001msec); 0 zone resets With patch: write: IOPS=15.7k, BW=61.4MiB/s (64.4MB/s)(3683MiB/60001msec); 0 zone resets Biosnoop: Without patch: Time Process PID Device LBA Size Lat 1.410377 md0_raid10 6900 nvme0n1 W 16 4096 0.02 1.410387 md0_raid10 6900 nvme2n1 W 16 4096 0.02 1.410374 md0_raid10 6900 nvme3n1 W 16 4096 0.01 1.410381 md0_raid10 6900 nvme1n1 W 16 4096 0.02 1.410411 md0_raid10 6900 nvme1n1 W 115346512 4096 0.01 1.410418 md0_raid10 6900 nvme0n1 W 115346512 4096 0.02 1.410915 md0_raid10 6900 nvme2n1 W 24 3584 0.43 <-- 1.410935 md0_raid10 6900 nvme3n1 W 24 3584 0.45 <-- 1.411124 md0_raid10 6900 nvme1n1 W 24 3584 0.64 <-- 1.411147 md0_raid10 6900 nvme0n1 W 24 3584 0.66 <-- 1.411176 md0_raid10 6900 nvme3n1 W 2019022184 4096 0.01 1.411189 md0_raid10 6900 nvme2n1 W 2019022184 4096 0.02 With patch: Time Process PID Device LBA Size Lat 5.747193 md0_raid10 727 nvme0n1 W 16 4096 0.01 5.747192 md0_raid10 727 nvme1n1 W 16 4096 0.02 5.747195 md0_raid10 727 nvme3n1 W 16 4096 0.01 5.747202 md0_raid10 727 nvme2n1 W 16 4096 0.02 5.747229 md0_raid10 727 nvme3n1 W 1196223704 4096 0.02 5.747224 md0_raid10 727 nvme0n1 W 1196223704 4096 0.01 5.747279 md0_raid10 727 nvme0n1 W 24 4096 0.01 <-- 5.747279 md0_raid10 727 nvme1n1 W 24 4096 0.02 <-- 5.747284 md0_raid10 727 nvme3n1 W 24 4096 0.02 <-- 5.747291 md0_raid10 727 nvme2n1 W 24 4096 0.02 <-- 5.747314 md0_raid10 727 nvme2n1 W 2234636712 4096 0.01 5.747317 md0_raid10 727 nvme1n1 W 2234636712 4096 0.02 Reviewed-by: Christoph Hellwig Signed-off-by: Jon Derrick Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230224183323.638-4-jonathan.derrick@linux.dev commit 10172f200b67aafcb9b8ce7d0575d713c1aafbb7 Author: Jon Derrick Date: Fri Feb 24 11:33:22 2023 -0700 md: Fix types in sb writer Page->index is a pgoff_t and multiplying could cause overflows on a 32-bit architecture. In the sb writer, this is used to calculate and verify the sector being used, and is multiplied by a sector value. Using sector_t will cast it to a u64 type and is the more appropriate type for the unit. Additionally, the integer size unit is converted to a sector unit in later calculations, and is now corrected to be an unsigned type. Finally, clean up the calculations using variable aliases to improve readabiliy. Reviewed-by: Christoph Hellwig Signed-off-by: Jon Derrick Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230224183323.638-3-jonathan.derrick@linux.dev commit 328e17d8d9428b390ab48bdedcaf5106e4b511fe Author: Jon Derrick Date: Fri Feb 24 11:33:21 2023 -0700 md: Move sb writer loop to its own function Preparatory patch for optimal I/O size calculation. Move the sb writer loop routine into its own function for clarity. Reviewed-by: Christoph Hellwig Signed-off-by: Jon Derrick Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230224183323.638-2-jonathan.derrick@linux.dev commit dccb8ad615bf042a318d66d284151d4783cd56d6 Author: Jiangshan Yi Date: Tue Feb 14 14:40:13 2023 +0800 md/raid10: Fix typo in comment (replacment -> replacement) Replace replacment with replacement. Signed-off-by: Jiangshan Yi Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230214064013.2373851-1-yijiangshan@kylinos.cn commit 4d72a9de2f002c77267c720ebc5595a17f0d66e9 Author: Thomas Weißschuh Date: Tue Feb 14 03:19:22 2023 +0000 md: make kobj_type structures constant Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definitions to prevent modification at runtime. Signed-off-by: Thomas Weißschuh Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230214-kobj_type-md-v1-1-d6853f707f11@weissschuh.net commit a405c6f0229526160aa3f177f65e20c86fce84c5 Author: Li Nan Date: Wed Feb 22 12:10:00 2023 +0800 md/raid10: fix null-ptr-deref in raid10_sync_request init_resync() inits mempool and sets conf->have_replacemnt at the beginning of sync, close_sync() frees the mempool when sync is completed. After [1] recovery might be skipped and init_resync() is called but close_sync() is not. null-ptr-deref occurs with r10bio->dev[i].repl_bio. The following is one way to reproduce the issue. 1) create a array, wait for resync to complete, mddev->recovery_cp is set to MaxSector. 2) recovery is woken and it is skipped. conf->have_replacement is set to 0 in init_resync(). close_sync() not called. 3) some io errors and rdev A is set to WantReplacement. 4) a new device is added and set to A's replacement. 5) recovery is woken, A have replacement, but conf->have_replacemnt is 0. r10bio->dev[i].repl_bio will not be alloced and null-ptr-deref occurs. Fix it by not calling init_resync() if recovery skipped. [1] commit 7e83ccbecd60 ("md/raid10: Allow skipping recovery when clean arrays are assembled") Fixes: 7e83ccbecd60 ("md/raid10: Allow skipping recovery when clean arrays are assembled") Cc: stable@vger.kernel.org Signed-off-by: Li Nan Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230222041000.3341651-3-linan666@huaweicloud.com commit 72c215ed8731c88b2d7e09afc51fffc207ae47b8 Author: Li Nan Date: Wed Feb 22 12:09:59 2023 +0800 md/raid10: fix task hung in raid10d commit fe630de009d0 ("md/raid10: avoid deadlock on recovery.") allowed normal io and sync io to exist at the same time. Task hung will occur as below: T1 T2 T3 T4 raid10d handle_read_error allow_barrier conf->nr_pending-- -> 0 //submit sync io raid10_sync_request raise_barrier ->will not be blocked ... //submit to drivers raid10_read_request wait_barrier conf->nr_pending++ -> 1 //retry read fail raid10_end_read_request reschedule_retry add to retry_list conf->nr_queued++ -> 1 //sync io fail end_sync_read __end_sync_read reschedule_retry add to retry_list conf->nr_queued++ -> 2 ... handle_read_error get form retry_list conf->nr_queued-- freeze_array wait nr_pending == nr_queued+1 ->1 ->2 //task hung retry read and sync io will be added to retry_list(nr_queued->2) if they fails. raid10d() called handle_read_error() and hung in freeze_array(). nr_queued will not decrease because raid10d is blocked, nr_pending will not increase because conf->barrier is not released. Fix it by moving allow_barrier() after raid10_read_request(). raise_barrier() will wait for nr_waiting to become 0. Therefore, sync io and regular io will not be issued at the same time. Also remove the check of nr_queued in stop_waiting_barrier. It can be 0 but don't need to be blocking. Remove the check for MD_RECOVERY_RUNNING as the check is redundent. Fixes: fe630de009d0 ("md/raid10: avoid deadlock on recovery.") Signed-off-by: Li Nan Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20230222041000.3341651-2-linan666@huaweicloud.com commit 85a4abed155402d37fef9ea29836dbcdf816cb08 Author: Rahul Rameshbabu Date: Wed Apr 12 18:22:52 2023 -0700 tools: ynl: Rename ethtool to ethtool.py Make it explicit that this tool is not a drop-in replacement for ethtool. This tool is intended for testing ethtool functionality implemented in the kernel and should use a name that differentiates it from the ethtool utility. Signed-off-by: Rahul Rameshbabu Link: https://lore.kernel.org/r/20230413012252.184434-2-rrameshbabu@nvidia.com Signed-off-by: Jakub Kicinski commit 3ea31e66644b263f43850174847956fbbe2c28cf Author: Rahul Rameshbabu Date: Wed Apr 12 18:22:51 2023 -0700 tools: ynl: Remove absolute paths to yaml files from ethtool testing tool Absolute paths for the spec and schema files make the ethtool testing tool unusable with freshly checked-out source trees. Replace absolute paths with relative paths for both files in the Documentation/ directory. Issue seen before the change Traceback (most recent call last): File "/home/binary-eater/Documents/mlx/linux/tools/net/ynl/./ethtool", line 424, in main() File "/home/binary-eater/Documents/mlx/linux/tools/net/ynl/./ethtool", line 158, in main ynl = YnlFamily(spec, schema) File "/home/binary-eater/Documents/mlx/linux/tools/net/ynl/lib/ynl.py", line 342, in __init__ super().__init__(def_path, schema) File "/home/binary-eater/Documents/mlx/linux/tools/net/ynl/lib/nlspec.py", line 333, in __init__ with open(spec_path, "r") as stream: FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/google/home/sdf/src/linux/Documentation/netlink/specs/ethtool.yaml' Fixes: f3d07b02b2b8 ("tools: ynl: ethtool testing tool") Signed-off-by: Rahul Rameshbabu Link: https://lore.kernel.org/r/20230413012252.184434-1-rrameshbabu@nvidia.com Signed-off-by: Jakub Kicinski commit 916b15fbf24858a18491a0979d8d00c016baa179 Merge: fb4be9a4e7146 8c0d0fe04449b Author: Jakub Kicinski Date: Thu Apr 13 22:16:11 2023 -0700 Merge branch 'macb-ptp-minor-updates' Harini Katakam says: ==================== Macb PTP minor updates - Enable PTP unicast - Optimize HW timestamp reading ==================== Link: https://lore.kernel.org/r/20230411123712.11459-1-harini.katakam@amd.com Signed-off-by: Jakub Kicinski commit 8c0d0fe04449b9ea2654bf435e51171fbf2a71ac Author: Harini Katakam Date: Tue Apr 11 18:07:12 2023 +0530 net: macb: Optimize reading HW timestamp The seconds input from BD (6 bits) just needs to be ORed with the upper bits from timer in this function. Avoid addition operation every single time. Seconds rollover handling is left untouched. Signed-off-by: Harini Katakam Signed-off-by: Michal Simek Signed-off-by: Radhey Shyam Pandey Signed-off-by: Jakub Kicinski commit ee4e92c26c60b7344b7261035683a37da5a6119b Author: Harini Katakam Date: Tue Apr 11 18:07:11 2023 +0530 net: macb: Enable PTP unicast Enable transmission and reception of PTP unicast packets by updating PTP unicast config bit and setting current HW mac address as allowed address in PTP unicast filter registers. Signed-off-by: Harini Katakam Signed-off-by: Michal Simek Signed-off-by: Radhey Shyam Pandey Signed-off-by: Jakub Kicinski commit adee474a3b43dfab2d1f3b6a8ba7d052099f56a9 Author: Harini Katakam Date: Tue Apr 11 18:07:10 2023 +0530 net: macb: Update gem PTP support check There are currently two checks for PTP functionality - one on GEM capability and another on the kernel config option. Combine them into a single function as there's no use case where gem_has_ptp is TRUE and MACB_USE_HWSTAMP is false. Signed-off-by: Harini Katakam Signed-off-by: Jakub Kicinski commit 4a1e885c6d143ff1b557ec7f3fc6ddf39c51502f Author: Rong Tao Date: Wed Apr 12 16:16:24 2023 +0800 samples/bpf: sampleip: Replace PAGE_OFFSET with _text address Macro PAGE_OFFSET(0xffff880000000000) in sampleip_user.c is inaccurate, for example, in aarch64 architecture, this value depends on the CONFIG_ARM64_VA_BITS compilation configuration, this value defaults to 48, the corresponding PAGE_OFFSET is 0xffff800000000000, if we use the value defined in sampleip_user.c, then all KSYMs obtained by sampleip are (user) Symbol error due to PAGE_OFFSET error: $ sudo ./sampleip 1 Sampling at 99 Hertz for 1 seconds. Ctrl-C also ends. ADDR KSYM COUNT 0xffff80000810ceb8 (user) 1 0xffffb28ec880 (user) 1 0xffff8000080c82b8 (user) 1 0xffffb23fed24 (user) 1 0xffffb28944fc (user) 1 0xffff8000084628bc (user) 1 0xffffb2a935c0 (user) 1 0xffff80000844677c (user) 1 0xffff80000857a3a4 (user) 1 ... A few examples of addresses in the CONFIG_ARM64_VA_BITS=48 environment in the aarch64 environment: $ sudo head /proc/kallsyms ffff8000080a0000 T _text ffff8000080b0000 t gic_handle_irq ffff8000080b0000 T _stext ffff8000080b0000 T __irqentry_text_start ffff8000080b00b0 t gic_handle_irq ffff8000080b0230 t gic_handle_irq ffff8000080b03b4 T __irqentry_text_end ffff8000080b03b8 T __softirqentry_text_start ffff8000080b03c0 T __do_softirq ffff8000080b0718 T __entry_text_start We just need to replace the PAGE_OFFSET with the address _text in /proc/kallsyms to solve this problem: $ sudo ./sampleip 1 Sampling at 99 Hertz for 1 seconds. Ctrl-C also ends. ADDR KSYM COUNT 0xffffb2892ab0 (user) 1 0xffffb2b1edfc (user) 1 0xffff800008462834 __arm64_sys_ppoll 1 0xffff8000084b87f4 eventfd_read 1 0xffffb28e6788 (user) 1 0xffff8000081e96d8 rcu_all_qs 1 0xffffb2ada878 (user) 1 ... Signed-off-by: Rong Tao Link: https://lore.kernel.org/r/tencent_A0E82E0BEE925285F8156D540731DF805F05@qq.com Signed-off-by: Alexei Starovoitov commit fb4be9a4e7146fad672190db162ae22aa915a8a6 Merge: c2865b1122595 a291399e63541 Author: Jakub Kicinski Date: Thu Apr 13 21:56:08 2023 -0700 Merge branch 'ocelot-felix-driver-cleanup' Vladimir Oltean says: ==================== Ocelot/Felix driver cleanup The cleanup mostly handles the statistics code path - some issues regarding understandability became apparent after the series "Fix trainwreck with Ocelot switch statistics counters": https://lore.kernel.org/netdev/20230321010325.897817-1-vladimir.oltean@nxp.com/ There is also one patch which cleans up a misleading comment in the DSA felix_setup(). ==================== Link: https://lore.kernel.org/r/20230412124737.2243527-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit a291399e635415295860765954e247e83445e291 Author: Vladimir Oltean Date: Wed Apr 12 15:47:37 2023 +0300 net: mscc: ocelot: fix ineffective WARN_ON() in ocelot_stats.c Since it is hopefully now clear that, since "last" and "layout[i].reg" are enum types and not addresses, the existing WARN_ON() is ineffective in checking that the _addresses_ are sorted in the proper order. Signed-off-by: Vladimir Oltean Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 6663c01eca1a250374a898f19b60ec01859a3d0b Author: Vladimir Oltean Date: Wed Apr 12 15:47:36 2023 +0300 net: mscc: ocelot: strengthen type of "int i" in ocelot_stats.c The "int i" used to index the struct ocelot_stat_layout array actually has a specific type: enum ocelot_stat. Use it, so that the WARN() comment from ocelot_prepare_stats_regions() makes more sense. Signed-off-by: Vladimir Oltean Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit eae0b9d15ba6050852180449b932996bc3add48e Author: Vladimir Oltean Date: Wed Apr 12 15:47:35 2023 +0300 net: mscc: ocelot: strengthen type of "u32 reg" and "u32 base" in ocelot_stats.c Use the specific enum ocelot_reg to make it clear that the region registers are encoded and not plain addresses. Signed-off-by: Vladimir Oltean Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit a9afc3e41c61688e26ba526a1f6c574608ae42d5 Author: Vladimir Oltean Date: Wed Apr 12 15:47:34 2023 +0300 net: dsa: felix: remove confusing/incorrect comment from felix_setup() That comment was written prior to knowing that what I was actually seeing was a manifestation of the bug fixed in commit b4024c9e5c57 ("felix: Fix initialization of ioremap resources"). There isn't any particular reason now why the hardware initialization is done in felix_setup(), so just delete that comment to avoid spreading misinformation. Signed-off-by: Vladimir Oltean Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 93f0f93bbdb9ebf3d2831e8023cae4f31cb83cee Author: Vladimir Oltean Date: Wed Apr 12 15:47:33 2023 +0300 net: mscc: ocelot: remove blank line at the end of ocelot_stats.c Commit a3bb8f521fd8 ("net: mscc: ocelot: remove unnecessary exposure of stats structures") made an unnecessary change which was to add a new line at the end of ocelot_stats.c. Remove it. Signed-off-by: Vladimir Oltean Acked-by: Colin Foster Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 07de32655bb4e4518cdb8ce4e2e0d6ed49f2ceb0 Author: Vladimir Oltean Date: Wed Apr 12 15:47:32 2023 +0300 net: mscc: ocelot: debugging print for statistics regions To make it easier to debug future issues with statistics counters not getting aggregated properly into regions, like what happened in commit 6acc72a43eac ("net: mscc: ocelot: fix stats region batching"), add some dev_dbg() prints which show the regions that were dynamically determined. Signed-off-by: Vladimir Oltean Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 40cd07cb42617f0e8b8597d0db288a5ce66621d9 Author: Vladimir Oltean Date: Wed Apr 12 15:47:31 2023 +0300 net: mscc: ocelot: refactor enum ocelot_reg decoding to helper ocelot_io.c duplicates the decoding of an enum ocelot_reg (which holds an enum ocelot_target in the upper bits and an index into a regmap array in the lower bits) 4 times. We'd like to reuse that logic once more, from ocelot.c. In order to do that, let's consolidate the existing 4 instances into a header accessible both by ocelot.c as well as by ocelot_io.c. Signed-off-by: Vladimir Oltean Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 9ecd05794b8da1f6cfca4c3721a3b0fed2e21a82 Author: Vladimir Oltean Date: Wed Apr 12 15:47:30 2023 +0300 net: mscc: ocelot: strengthen type of "u32 reg" in I/O accessors The "u32 reg" argument that is passed to these functions is not a plain address, but rather a driver-specific encoding of another enum ocelot_target target in the upper bits, and an index into the u32 ocelot->map[target][] array in the lower bits. That encoded value takes the type "enum ocelot_reg" and is what is passed to these I/O functions, so let's actually use that to prevent type confusion. Signed-off-by: Vladimir Oltean Reviewed-by: Jacob Keller Signed-off-by: Jakub Kicinski commit 1cf3bfc60f9836f44da951f58b6ae24680484b35 Author: Ilya Leoshkevich Date: Thu Apr 13 01:06:32 2023 +0200 bpf: Support 64-bit pointers to kfuncs test_ksyms_module fails to emit a kfunc call targeting a module on s390x, because the verifier stores the difference between kfunc address and __bpf_call_base in bpf_insn.imm, which is s32, and modules are roughly (1 << 42) bytes away from the kernel on s390x. Fix by keeping BTF id in bpf_insn.imm for BPF_PSEUDO_KFUNC_CALLs, and storing the absolute address in bpf_kfunc_desc. Introduce bpf_jit_supports_far_kfunc_call() in order to limit this new behavior to the s390x JIT. Otherwise other JITs need to be modified, which is not desired. Introduce bpf_get_kfunc_addr() instead of exposing both find_kfunc_desc() and struct bpf_kfunc_desc. In addition to sorting kfuncs by imm, also sort them by offset, in order to handle conflicting imms from different modules. Do this on all architectures in order to simplify code. Factor out resolving specialized kfuncs (XPD and dynptr) from fixup_kfunc_call(). This was required in the first place, because fixup_kfunc_call() uses find_kfunc_desc(), which returns a const pointer, so it's not possible to modify kfunc addr without stripping const, which is not nice. It also removes repetition of code like: if (bpf_jit_supports_far_kfunc_call()) desc->addr = func; else insn->imm = BPF_CALL_IMM(func); and separates kfunc_desc_tab fixups from kfunc_call fixups. Suggested-by: Jiri Olsa Signed-off-by: Ilya Leoshkevich Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20230412230632.885985-1-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit c11bd046485d7bf1ca200db0e7d0bdc4bafdd395 Author: Yafang Date: Thu Apr 13 02:52:48 2023 +0000 bpf: Add preempt_count_{sub,add} into btf id deny list The recursion check in __bpf_prog_enter* and __bpf_prog_exit* leave preempt_count_{sub,add} unprotected. When attaching trampoline to them we get panic as follows, [ 867.843050] BUG: TASK stack guard page was hit at 0000000009d325cf (stack is 0000000046a46a15..00000000537e7b28) [ 867.843064] stack guard page: 0000 [#1] PREEMPT SMP NOPTI [ 867.843067] CPU: 8 PID: 11009 Comm: trace Kdump: loaded Not tainted 6.2.0+ #4 [ 867.843100] Call Trace: [ 867.843101] [ 867.843104] asm_exc_int3+0x3a/0x40 [ 867.843108] RIP: 0010:preempt_count_sub+0x1/0xa0 [ 867.843135] __bpf_prog_enter_recur+0x17/0x90 [ 867.843148] bpf_trampoline_6442468108_0+0x2e/0x1000 [ 867.843154] ? preempt_count_sub+0x1/0xa0 [ 867.843157] preempt_count_sub+0x5/0xa0 [ 867.843159] ? migrate_enable+0xac/0xf0 [ 867.843164] __bpf_prog_exit_recur+0x2d/0x40 [ 867.843168] bpf_trampoline_6442468108_0+0x55/0x1000 ... [ 867.843788] preempt_count_sub+0x5/0xa0 [ 867.843793] ? migrate_enable+0xac/0xf0 [ 867.843829] __bpf_prog_exit_recur+0x2d/0x40 [ 867.843837] BUG: IRQ stack guard page was hit at 0000000099bd8228 (stack is 00000000b23e2bc4..000000006d95af35) [ 867.843841] BUG: IRQ stack guard page was hit at 000000005ae07924 (stack is 00000000ffd69623..0000000014eb594c) [ 867.843843] BUG: IRQ stack guard page was hit at 00000000028320f0 (stack is 00000000034b6438..0000000078d1bcec) [ 867.843842] bpf_trampoline_6442468108_0+0x55/0x1000 ... That is because in __bpf_prog_exit_recur, the preempt_count_{sub,add} are called after prog->active is decreased. Fixing this by adding these two functions into btf ids deny list. Suggested-by: Steven Rostedt Signed-off-by: Yafang Cc: Masami Hiramatsu Cc: Steven Rostedt Cc: Jiri Olsa Acked-by: Hao Luo Link: https://lore.kernel.org/r/20230413025248.79764-1-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 68d1151f03067533827fc50b770954ef33149533 Author: Konrad Dybcio Date: Wed Apr 12 16:53:06 2023 +0200 clk: qcom: dispcc-qcm2290: Remove inexistent DSI1PHY clk There's only one DSI PHY on this SoC. Remove the ghost entry for the clock produced by a secondary one. Fixes: cc517ea3333f ("clk: qcom: Add display clock controller driver for QCM2290") Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230412-topic-qcm_dispcc-v1-2-bf2989a75ae4@linaro.org commit 0afa16afc36d0e462c7f815b0131d2e9013849ac Author: Shazad Hussain Date: Tue Apr 11 14:59:05 2023 +0200 clk: qcom: add the GPUCC driver for sa8775p Add the clock driver for the Qualcomm Graphics Clock control module. Signed-off-by: Shazad Hussain [Bartosz: make ready for upstream] Co-developed-by: Bartosz Golaszewski Signed-off-by: Bartosz Golaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230411125910.401075-3-brgl@bgdev.pl commit daa9e76d17570cdd2dbec28244e60e2cb0eafb36 Author: Bartosz Golaszewski Date: Tue Apr 11 14:59:04 2023 +0200 dt-bindings: clock: qcom: describe the GPUCC clock for SA8775P Add the compatible for the Qualcomm Graphics Clock control module present on sa8775p platforms. It matches the generic QCom GPUCC description. Add device-specific DT bindings defines as well. Signed-off-by: Bartosz Golaszewski Reviewed-by: Krzysztof Kozlowski Acked-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230411125910.401075-2-brgl@bgdev.pl commit 1a500e0bc97b6cb3c0d9859e81973b8dd07d1b7b Author: Dmitry Baryshkov Date: Wed Apr 12 16:48:29 2023 +0300 clk: qcom: gcc-sm8350: fix PCIe PIPE clocks handling On SM8350 platform the PCIe PIPE clocks require additional handling to function correctly. They are to be switched to the tcxo source before turning PCIe GDSCs off and should be switched to PHY PIPE source once they are working. Switch PCIe PHY clocks to use clk_regmap_phy_mux_ops, which provide support for this dance. Fixes: 44c20c9ed37f ("clk: qcom: gcc: Add clock driver for SM8350") Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230412134829.3686467-1-dmitry.baryshkov@linaro.org commit aad09fc7c4a522892eb64a79627b17a3869936cb Author: Mohammad Rafi Shaik Date: Fri Apr 7 14:52:55 2023 +0530 clk: qcom: lpassaudiocc-sc7280: Add required gdsc power domain clks in lpass_cc_sc7280_desc Add GDSCs in lpass_cc_sc7280_desc struct. When qcom,adsp-pil-mode is enabled, GDSCs required to solve dependencies in lpass_audiocc probe(). Fixes: 0cbcfbe50cbf ("clk: qcom: lpass: Handle the regmap overlap of lpasscc and lpass_aon") Signed-off-by: Mohammad Rafi Shaik Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407092255.119690-4-quic_mohs@quicinc.com commit 4fc1c2d9a2b7a394f3b873aae5e03bffd8b5cd31 Author: Srinivasa Rao Mandadapu Date: Fri Apr 7 14:52:54 2023 +0530 clk: qcom: lpasscc-sc7280: Skip qdsp6ss clock registration The qdsp6ss memory region is being shared by ADSP remoteproc device and lpasscc clock device, hence causing memory conflict. To avoid this, when qdsp6ss clocks are being enabled in remoteproc driver, skip qdsp6ss clock registration if "qcom,adsp-pil-mode" is enabled and also assign max_register value. Fixes: 4ab43d171181 ("clk: qcom: Add lpass clock controller driver for SC7280") Signed-off-by: Srinivasa Rao Mandadapu Signed-off-by: Mohammad Rafi Shaik Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407092255.119690-3-quic_mohs@quicinc.com commit 5c3a7dcce10028c5839864ed475ae7930b03c1e8 Author: Srinivasa Rao Mandadapu Date: Fri Apr 7 14:52:53 2023 +0530 dt-bindings: clock: qcom,sc7280-lpasscc: Add qcom,adsp-pil-mode property When this property is set, the remoteproc is used to boot the LPASS and therefore qdsp6ss clocks would be used to bring LPASS out of reset, hence they are directly controlled by the remoteproc. This is a cleanup done to handle overlap of regmap of lpasscc and adsp remoteproc blocks. Signed-off-by: Srinivasa Rao Mandadapu Signed-off-by: Mohammad Rafi Shaik Reviewed-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407092255.119690-2-quic_mohs@quicinc.com commit 75860b52019cf93662c31596254599bf5f8df900 Author: Alexei Starovoitov Date: Thu Apr 13 19:54:17 2023 -0700 selftests/bpf: Workaround for older vm_sockets.h. Some distros ship with older vm_sockets.h that doesn't have VMADDR_CID_LOCAL which causes selftests build to fail: /tmp/work/bpf/bpf/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c:261:18: error: ‘VMADDR_CID_LOCAL’ undeclared (first use in this function); did you mean ‘VMADDR_CID_HOST’? 261 | addr->svm_cid = VMADDR_CID_LOCAL; | ^~~~~~~~~~~~~~~~ | VMADDR_CID_HOST Workaround this issue by defining it on demand. Signed-off-by: Alexei Starovoitov commit c04135ab351badb1daf5868328581075ead691e0 Author: Alexei Starovoitov Date: Thu Apr 13 17:22:48 2023 -0700 selftests/bpf: Fix merge conflict due to SYS() macro change. Fix merge conflict between bpf/bpf-next trees due to change of arguments in SYS() macro. Signed-off-by: Alexei Starovoitov commit 0a3bf86092c38f7b72c56c6901c78dd302411307 Author: Tiezhu Yang Date: Fri Mar 31 17:15:53 2023 +0800 module: Ignore L0 and rename is_arm_mapping_symbol() The L0 symbol is generated when build module on LoongArch, ignore it in modpost and when looking at module symbols, otherwise we can not see the expected call trace. Now is_arm_mapping_symbol() is not only for ARM, in order to reflect the reality, rename is_arm_mapping_symbol() to is_mapping_symbol(). This is related with commit c17a2538704f ("mksysmap: Fix the mismatch of 'L0' symbols in System.map"). (1) Simple test case [loongson@linux hello]$ cat hello.c #include #include #include static void test_func(void) { pr_info("This is a test\n"); dump_stack(); } static int __init hello_init(void) { pr_warn("Hello, world\n"); test_func(); return 0; } static void __exit hello_exit(void) { pr_warn("Goodbye\n"); } module_init(hello_init); module_exit(hello_exit); MODULE_LICENSE("GPL"); [loongson@linux hello]$ cat Makefile obj-m:=hello.o ccflags-y += -g -Og all: make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) modules clean: make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) clean (2) Test environment system: LoongArch CLFS 5.5 https://github.com/sunhaiyong1978/CLFS-for-LoongArch/releases/tag/5.0 It needs to update grub to avoid booting error "invalid magic number". kernel: 6.3-rc1 with loongson3_defconfig + CONFIG_DYNAMIC_FTRACE=y (3) Test result Without this patch: [root@linux hello]# insmod hello.ko [root@linux hello]# dmesg ... Hello, world This is a test ... Call Trace: [<9000000000223728>] show_stack+0x68/0x18c [<90000000013374cc>] dump_stack_lvl+0x60/0x88 [] L0\x01+0x20/0x2c [hello] [] L0\x01+0x20/0x30 [hello] [<900000000022097c>] do_one_initcall+0x88/0x288 [<90000000002df890>] do_init_module+0x54/0x200 [<90000000002e1e18>] __do_sys_finit_module+0xc4/0x114 [<90000000013382e8>] do_syscall+0x7c/0x94 [<9000000000221e3c>] handle_syscall+0xbc/0x158 With this patch: [root@linux hello]# insmod hello.ko [root@linux hello]# dmesg ... Hello, world This is a test ... Call Trace: [<9000000000223728>] show_stack+0x68/0x18c [<90000000013374cc>] dump_stack_lvl+0x60/0x88 [] test_func+0x28/0x34 [hello] [] hello_init+0x28/0x38 [hello] [<900000000022097c>] do_one_initcall+0x88/0x288 [<90000000002df890>] do_init_module+0x54/0x200 [<90000000002e1e18>] __do_sys_finit_module+0xc4/0x114 [<90000000013382e8>] do_syscall+0x7c/0x94 [<9000000000221e3c>] handle_syscall+0xbc/0x158 Signed-off-by: Tiezhu Yang Tested-by: Youling Tang # for LoongArch Signed-off-by: Luis Chamberlain commit 987d2e0aaa55de40938435be760aa96428470fd6 Author: Tiezhu Yang Date: Fri Mar 31 17:15:52 2023 +0800 module: Move is_arm_mapping_symbol() to module_symbol.h In order to avoid duplicated code, move is_arm_mapping_symbol() to include/linux/module_symbol.h, then remove is_arm_mapping_symbol() in the other places. Signed-off-by: Tiezhu Yang Signed-off-by: Luis Chamberlain commit 87e5b1e8f257023ac5c4d2b8f07716a7f3dcc8ea Author: Tiezhu Yang Date: Fri Mar 31 17:15:51 2023 +0800 module: Sync code of is_arm_mapping_symbol() After commit 2e3a10a1551d ("ARM: avoid ARM binutils leaking ELF local symbols") and commit d6b732666a1b ("modpost: fix undefined behavior of is_arm_mapping_symbol()"), many differences of is_arm_mapping_symbol() exist in kernel/module/kallsyms.c and scripts/mod/modpost.c, just sync the code to keep consistent. Signed-off-by: Tiezhu Yang Signed-off-by: Luis Chamberlain commit c2865b1122595e69e7df52d01f7f02338b8babca Merge: 800e68c44ffe7 8c5c2a4898e3d Author: Jakub Kicinski Date: Thu Apr 13 16:11:22 2023 -0700 Daniel Borkmann says: ==================== pull-request: bpf-next 2023-04-13 We've added 260 non-merge commits during the last 36 day(s) which contain a total of 356 files changed, 21786 insertions(+), 11275 deletions(-). The main changes are: 1) Rework BPF verifier log behavior and implement it as a rotating log by default with the option to retain old-style fixed log behavior, from Andrii Nakryiko. 2) Adds support for using {FOU,GUE} encap with an ipip device operating in collect_md mode and add a set of BPF kfuncs for controlling encap params, from Christian Ehrig. 3) Allow BPF programs to detect at load time whether a particular kfunc exists or not, and also add support for this in light skeleton, from Alexei Starovoitov. 4) Optimize hashmap lookups when key size is multiple of 4, from Anton Protopopov. 5) Enable RCU semantics for task BPF kptrs and allow referenced kptr tasks to be stored in BPF maps, from David Vernet. 6) Add support for stashing local BPF kptr into a map value via bpf_kptr_xchg(). This is useful e.g. for rbtree node creation for new cgroups, from Dave Marchevsky. 7) Fix BTF handling of is_int_ptr to skip modifiers to work around tracing issues where a program cannot be attached, from Feng Zhou. 8) Migrate a big portion of test_verifier unit tests over to test_progs -a verifier_* via inline asm to ease {read,debug}ability, from Eduard Zingerman. 9) Several updates to the instruction-set.rst documentation which is subject to future IETF standardization (https://lwn.net/Articles/926882/), from Dave Thaler. 10) Fix BPF verifier in the __reg_bound_offset's 64->32 tnum sub-register known bits information propagation, from Daniel Borkmann. 11) Add skb bitfield compaction work related to BPF with the overall goal to make more of the sk_buff bits optional, from Jakub Kicinski. 12) BPF selftest cleanups for build id extraction which stand on its own from the upcoming integration work of build id into struct file object, from Jiri Olsa. 13) Add fixes and optimizations for xsk descriptor validation and several selftest improvements for xsk sockets, from Kal Conley. 14) Add BPF links for struct_ops and enable switching implementations of BPF TCP cong-ctls under a given name by replacing backing struct_ops map, from Kui-Feng Lee. 15) Remove a misleading BPF verifier env->bypass_spec_v1 check on variable offset stack read as earlier Spectre checks cover this, from Luis Gerhorst. 16) Fix issues in copy_from_user_nofault() for BPF and other tracers to resemble copy_from_user_nmi() from safety PoV, from Florian Lehner and Alexei Starovoitov. 17) Add --json-summary option to test_progs in order for CI tooling to ease parsing of test results, from Manu Bretelle. 18) Batch of improvements and refactoring to prep for upcoming bpf_local_storage conversion to bpf_mem_cache_{alloc,free} allocator, from Martin KaFai Lau. 19) Improve bpftool's visual program dump which produces the control flow graph in a DOT format by adding C source inline annotations, from Quentin Monnet. 20) Fix attaching fentry/fexit/fmod_ret/lsm to modules by extracting the module name from BTF of the target and searching kallsyms of the correct module, from Viktor Malik. 21) Improve BPF verifier handling of ' ' to better detect whether in particular jmp32 branches are taken, from Yonghong Song. 22) Allow BPF TCP cong-ctls to write app_limited of struct tcp_sock. A built-in cc or one from a kernel module is already able to write to app_limited, from Yixin Shen. Conflicts: Documentation/bpf/bpf_devel_QA.rst b7abcd9c656b ("bpf, doc: Link to submitting-patches.rst for general patch submission info") 0f10f647f455 ("bpf, docs: Use internal linking for link to netdev subsystem doc") https://lore.kernel.org/all/20230307095812.236eb1be@canb.auug.org.au/ include/net/ip_tunnels.h bc9d003dc48c3 ("ip_tunnel: Preserve pointer const in ip_tunnel_info_opts") ac931d4cdec3d ("ipip,ip_tunnel,sit: Add FOU support for externally controlled ipip devices") https://lore.kernel.org/all/20230413161235.4093777-1-broonie@kernel.org/ net/bpf/test_run.c e5995bc7e2ba ("bpf, test_run: fix crashes due to XDP frame overwriting/corruption") 294635a8165a ("bpf, test_run: fix &xdp_frame misplacement for LIVE_FRAMES") https://lore.kernel.org/all/20230320102619.05b80a98@canb.auug.org.au/ ==================== Link: https://lore.kernel.org/r/20230413191525.7295-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 50aa6f44e1daa79e5fa82abf46170fcac976531a Author: Wu Bo Date: Thu Apr 13 18:17:11 2023 +0800 f2fs: support iopoll method Wire up the iopoll method to the common implementation. As f2fs use common dio infrastructure: commit a1e09b03e6f5 ("f2fs: use iomap for direct I/O") Signed-off-by: Wu Bo Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit abae448626a26e123e5d8311ac5932cccfc1cdf6 Author: Yangtao Li Date: Tue Apr 4 22:38:31 2023 +0800 f2fs: remove batched_trim_sections node description It's deprecated since commit 377224c47118 ("f2fs: don't split checkpoint in fstrim"). Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 935fc6fa6466cf18dd72dd1518ebc7bfc4cd58a4 Author: Chao Yu Date: Wed Apr 5 22:45:36 2023 +0800 f2fs: fix to check return value of inc_valid_block_count() In __replace_atomic_write_block(), we missed to check return value of inc_valid_block_count(), for extreme testcase that f2fs image is run out of space, it may cause inconsistent status in between SIT table and total valid block count. Cc: Daeho Jeong Fixes: 3db1de0e582c ("f2fs: change the current atomic write way") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b851ee6ba3cc212641e622ebcf92b950c7bafa07 Author: Chao Yu Date: Wed Apr 5 22:44:53 2023 +0800 f2fs: fix to check return value of f2fs_do_truncate_blocks() Otherwise, if truncation on cow_inode failed, remained data may pollute current transaction of atomic write. Cc: Daeho Jeong Fixes: a46bebd502fe ("f2fs: synchronize atomic write aborts") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1ac3d037bee9ac3c4ec4041aafb54c5dffd7e1d0 Author: Daeho Jeong Date: Thu Apr 6 15:11:04 2023 -0700 f2fs: fix passing relative address when discard zones We should not pass relative address in a zone to __f2fs_issue_discard_zone(). Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 800e68c44ffe71f9715f745b38fd1af6910b3773 Merge: 4033eaa68af6e 829cca4d17830 Author: Jakub Kicinski Date: Thu Apr 13 16:04:28 2023 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Conflicts: tools/testing/selftests/net/config 62199e3f1658 ("selftests: net: Add VXLAN MDB test") 3a0385be133e ("selftests: add the missing CONFIG_IP_SCTP in net config") Signed-off-by: Jakub Kicinski commit ff61bacd77f258bd2ed145efb69e5449b115d4fe Author: Rob Herring Date: Tue Mar 28 15:16:00 2023 -0500 of/address: Add of_property_read_reg() helper Add a helper, of_property_read_reg(), to read "reg" entries untranslated address and size. This function is intended mainly for cases with an untranslatable "reg" address (i.e. not MMIO). There's also a few translatable cases such as address cells containing a bus chip-select number. Link: https://lore.kernel.org/r/20230328-dt-address-helpers-v1-5-e2456c3e77ab@kernel.org Signed-off-by: Rob Herring commit b50c788a56964a900ebcc817c8a5ad35ddad87b6 Author: Rob Herring Date: Tue Mar 28 15:15:59 2023 -0500 of/address: Add of_range_count() helper Some users need a count of the number of ranges entries before iterating over the entries. Typically this is for allocating some data structure based on the size. Add a helper, of_range_count(), to get the count. The helper must be called with an struct of_range_parser initialized by of_range_parser_init(). Link: https://lore.kernel.org/r/20230328-dt-address-helpers-v1-4-e2456c3e77ab@kernel.org Signed-off-by: Rob Herring commit 3d5089c4263d3594dc055e0f9c5cb990505cdd64 Author: Rob Herring Date: Tue Mar 28 15:15:58 2023 -0500 of/address: Add support for 3 address cell bus There's a few custom bus bindings (e.g. fsl,qoriq-mc) which use a 3 cell format with custom flags in the high cell. We can match these buses as a fallback if we didn't match on PCI bus which is the only standard bus binding with 3 address cells. Link: https://lore.kernel.org/r/20230328-dt-address-helpers-v1-3-e2456c3e77ab@kernel.org Signed-off-by: Rob Herring commit c75a79491835c50ca61938ae1ebd3ba5598f7410 Author: Rob Herring Date: Tue Mar 28 15:15:57 2023 -0500 of/address: Add of_range_to_resource() helper A few users need to convert a specific "ranges" entry into a struct resource. Add a helper to similar to of_address_to_resource(). The existing of_pci_range_to_resource() helper isn't really PCI specific, so it can be used with the CONFIG_PCI check dropped. Link: https://lore.kernel.org/r/20230328-dt-address-helpers-v1-2-e2456c3e77ab@kernel.org Signed-off-by: Rob Herring commit 6d32dadb11a6480be62c6ada901bbdcbda1775c9 Author: Rob Herring Date: Tue Mar 28 15:15:56 2023 -0500 of: unittest: Add bus address range parsing tests While there are tests for "dma-ranges" helpers, "ranges" is missing any tests. It's the same underlying code, but for completeness add a test for "ranges" parsing iterators. This is in preparation to add some additional "ranges" helpers. Link: https://lore.kernel.org/r/20230328-dt-address-helpers-v1-1-e2456c3e77ab@kernel.org Signed-off-by: Rob Herring commit 7e09cb0b84ac5d17086a65ca21479dfec600a232 Author: Rob Herring Date: Wed Mar 29 10:52:16 2023 -0500 of: Drop cpu.h include from of_device.h Now that all users which had an implicit dependency on cpu.h have been fixed. the cpu.h include can be dropped from of_device.h Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-19-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit cd6f0f5176d1192dbaf1f8c2a6833019d56eb700 Author: Rob Herring Date: Wed Mar 29 10:52:15 2023 -0500 OPP: Adjust includes to remove of_device.h Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just implicitly including other includes, and is no longer needed. Adjust the include files with what was implicitly included by of_device.h (cpu.h and of.h) and drop including of_device.h. Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-18-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit 6cd2fb5b1ca09039f0a6da6f403d2dc687f40f74 Author: Rob Herring Date: Wed Mar 29 10:52:14 2023 -0500 irqchip: loongson-eiointc: Add explicit include for cpuhotplug.h Removing the include of cpu.h from of_device.h causes an error: drivers/irqchip/irq-loongson-eiointc.c:420:9: error: implicit declaration of function 'cpuhp_setup_state_nocalls' [-Werror=implicit-function-declaration] This driver doesn't even use DT, so all the DT includes can be dropped. Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-17-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit 24760e43c6a6164a33c023eed7536073bf6c68f7 Author: Rob Herring Date: Wed Mar 29 10:52:13 2023 -0500 cpuidle: Adjust includes to remove of_device.h Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just implicitly including other includes, and is no longer needed. Adjust the include files with what was implicitly included by of_device.h (cpu.h, cpuhotplug.h, of.h, and of_platform.h) and drop including of_device.h. Acked-by: Anup Patel Acked-by: Rafael J. Wysocki Acked-by: Sudeep Holla Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-16-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit a88fb96086ea4f6c426e6d436c75af509888964b Author: Rob Herring Date: Wed Mar 29 10:52:12 2023 -0500 cpufreq: sun50i: Add explicit include for cpu.h Removing the include of cpu.h from of_device.h causes an error: drivers/cpufreq/sun50i-cpufreq-nvmem.c:42:19: error: implicit declaration of function ‘get_cpu_device’; did you mean ‘get_device’? [-Werror=implicit-function-declaration] As of_device.h is not otherwise needed, it can be replaced with of.h (also implicitly included). Acked-by: Jernej Skrabec Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-15-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit 21bb32b155dfe7b40e5e6545f2df53f81f2e69cc Author: Rob Herring Date: Wed Mar 29 10:52:11 2023 -0500 cpufreq: Adjust includes to remove of_device.h Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just implicitly including other includes, and is no longer needed. Adjust the include files with what was implicitly included by of_device.h (cpu.h and of.h) and drop including of_device.h. Acked-by: Viresh Kumar Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-14-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit 26c682676471777c8464645695d3590b9134a5e7 Author: Rob Herring Date: Wed Mar 29 10:52:10 2023 -0500 soc: mediatek: mtk-svs: Add explicit include for cpu.h Removing the include of cpu.h from of_device.h (included by of_platform.h) causes an error: drivers/soc/mediatek/mtk-svs.c:2134:41: error: implicit declaration of function 'get_cpu_device'; did you mean 'get_swap_device'? [-Werror=implicit-function-declaration] of_platform.h is still needed for of_find_device_by_node(). Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-13-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit dcf3d782ed10ef572dcafac9271690b3ce14dbf4 Author: Rob Herring Date: Wed Mar 29 10:52:09 2023 -0500 thermal: cpuidle_cooling: Adjust includes to remove of_device.h Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just implicitly including other includes, and is no longer needed. Adjust the include files with what was implicitly included by of_device.h (cpu.h and of.h) and drop including of_device.h. Acked-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-12-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit bd08b691615f342b3a10468ee8e182a3707041cc Author: Rob Herring Date: Wed Mar 29 10:52:08 2023 -0500 clocksource: ingenic: Add explicit include for cpuhotplug.h Removing include of cpu.h from of_device.h (included by of_platform.h) causes an error in ingenic-timer: drivers/clocksource/ingenic-timer.c: In function ‘ingenic_tcu_init’: drivers/clocksource/ingenic-timer.c:338:15: error: implicit declaration of function ‘cpuhp_setup_state’ The of_platform.h header is not necessary either, so it and of_address.h can be dropped. Acked-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-11-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit b9581552b0b94586fa7296613a5d8a4a63e801be Author: Rob Herring Date: Wed Mar 29 10:52:07 2023 -0500 cacheinfo: Adjust includes to remove of_device.h Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just implicitly including other includes, and is no longer needed. Update the includes to use of.h instead of of_device.h. Acked-by: Sudeep Holla Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-10-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit 06d90669769b6fc0a390b2f724457994d247aaae Author: Rob Herring Date: Wed Mar 29 10:52:06 2023 -0500 riscv: cacheinfo: Adjust includes to remove of_device.h Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just implicitly including other includes, and is no longer needed. Adjust the include files with what was implicitly included by of_device.h (cpu.h and of.h) and drop including of_device.h. Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-9-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit a0418108d7e1299b3fb696de96981c3bc05a040f Author: Rob Herring Date: Wed Mar 29 10:52:05 2023 -0500 riscv: Add explicit include for cpu.h Removing the include of cpu.h from of_device.h (included by of_platform.h) causes an error in setup.c: arch/riscv/kernel/setup.c:313:22: error: arithmetic on a pointer to an incomplete type 'typeof(struct cpu)' (aka 'struct cpu') The of_platform.h header is not necessary either, so it can be dropped. Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-8-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit ec7a7aa9a48736f4def16dc33e8ec01a49b0bfa4 Author: Rob Herring Date: Wed Mar 29 10:52:04 2023 -0500 ARM: cpuidle: Drop of_device.h include Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just implicitly including other includes, and is no longer needed. Just drop including of_device.h as of.h is already included. Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-7-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit 1630928f2912eaea765a41f12acb881f6cb2a75f Author: Rob Herring Date: Wed Mar 29 10:52:03 2023 -0500 ARM: sunxi: Drop of_device.h include Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just implicitly including other includes, and is no longer needed. Just drop including of_device.h as of.h is already included. Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-6-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit 2e8fff668dc14e758ae80a898832eb9b6d60c463 Author: Rob Herring Date: Wed Mar 29 10:52:02 2023 -0500 of: Drop unnecessary includes in headers Drop unnecessary includes in DT headers. Some simply aren't needed and some can be replaced with forward declarations. Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-5-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit b58fa269c59d0f401ca569c661c6d7f3e1a20eeb Author: Rob Herring Date: Wed Mar 29 10:52:01 2023 -0500 of: Move CPU node related functions to their own file drivers/of/base.c is quite long and we've accumulated a number of CPU node functions. Let's move them to a new file, cpu.c, along with the lone of_cpu_device_node_get() in of_device.h. Moving the declaration has no effect yet as of.h is included by of_device.h. This serves as preparation to disentangle the includes in of_device.h and of_platform.h. Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-4-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit 82174a0a9c5cf36a3e421fc1d2c86998d8023f61 Author: Rob Herring Date: Wed Mar 29 10:52:00 2023 -0500 of: Move of_device_get_match_data() declaration of_device.h mostly defines functions for bus drivers whereas of_device_get_match_data() is used by drivers. Let's move it to of.h. Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-3-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit d1aae06630230daf747ef5bc291c19ea7f046129 Author: Stephen Boyd Date: Thu Apr 13 13:55:28 2023 -0700 clk: starfive: Avoid casting iomem pointers Let's use a wrapper struct for the auxiliary_device made in jh7110_reset_controller_register() so that we can stop casting iomem pointers. The casts trip up tools like sparse, and make for some awkward casts that are largely unnecessary. While we're here, change the allocation from devm and actually free the auxiliary_device memory in the release function. This avoids any use after free problems where the parent device driver is unbound from the device but the auxiliuary_device is still in use accessing devm freed memory. Cc: Tommaso Merciai Cc: Emil Renner Berthing Cc: Hal Feng Cc: Conor Dooley Cc: Xingyu Wu Reviewed-by: Conor Dooley Fixes: edab7204afe5 ("clk: starfive: Add StarFive JH7110 system clock driver") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20230413205528.4044216-1-sboyd@kernel.org commit 7455b7007b9e93bcc2bc9c1c6c73a228e3152069 Author: Conor Dooley Date: Thu Apr 13 23:20:45 2023 +0100 clk: microchip: fix potential UAF in auxdev release callback Similar to commit 1c11289b34ab ("peci: cpu: Fix use-after-free in adev_release()"), the auxiliary device is not torn down in the correct order. If auxiliary_device_add() fails, the release callback will be called twice, resulting in a UAF. Due to timing, the auxdev code in this driver "took inspiration" from the aforementioned commit, and thus its bugs too! Moving auxiliary_device_uninit() to the unregister callback instead avoids the issue. CC: stable@vger.kernel.org Fixes: b56bae2dd6fd ("clk: microchip: mpfs: add reset controller") Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20230413-critter-synopsis-dac070a86cb4@spud Signed-off-by: Stephen Boyd commit c160118a90d4acf335993d8d59b02ae2147a524e Author: Markus Elfring Date: Thu Apr 13 14:46:39 2023 +0200 perf map: Delete two variable initialisations before null pointer checks in sort__sym_from_cmp() Addresses of two data structure members were determined before corresponding null pointer checks in the implementation of the function “sort__sym_from_cmp”. Thus avoid the risk for undefined behaviour by removing extra initialisations for the local variables “from_l” and “from_r” (also because they were already reassigned with the same value behind this pointer check). This issue was detected by using the Coccinelle software. Fixes: 1b9e97a2a95e4941 ("perf tools: Fix report -F symbol_from for data without branch info") Signed-off-by: Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: German Gomez Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Link: https://lore.kernel.org/cocci/54a21fea-64e3-de67-82ef-d61b90ffad05@web.de/ Signed-off-by: Arnaldo Carvalho de Melo commit ee31f6fea61c332100d2161081abbdfe65411fe9 Author: Ian Rogers Date: Thu Apr 13 06:29:49 2023 -0700 perf vendor events intel: Fix uncore topics for tigerlake Move events from 'uncore-other' topic classification to interconnect. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230413132949.3487664-22-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2bb848f820a5df2f9684435886c44caee8f5a056 Author: Ian Rogers Date: Thu Apr 13 06:29:48 2023 -0700 perf vendor events intel: Fix uncore topics for snowridgex Remove 'uncore-other' topic classification, move to cache, interconnect and io. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20230413132949.3487664-21-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 748d5cf71948d5ad2cac896777dd5ccc6ea494e9 Author: Ian Rogers Date: Thu Apr 13 06:29:47 2023 -0700 perf vendor events intel: Fix uncore topics for skylakex Remove 'uncore-other' topic classification, move to cache, interconnect, io and memory. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20230413132949.3487664-20-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 9a8b303688f80aa9480d6a196817c90b6a592356 Author: Ian Rogers Date: Thu Apr 13 06:29:46 2023 -0700 perf vendor events intel: Fix uncore topics for skylake Move events from 'uncore-other' topic classification to cache and interconnect. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230413132949.3487664-19-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f58468a815a3933710e871812ffe23b15421edc4 Author: Ian Rogers Date: Thu Apr 13 06:29:45 2023 -0700 perf vendor events intel: Fix uncore topics for sandybridge Remove 'uncore-other' topic classification, move to cache and interconnect. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230413132949.3487664-18-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 6c3566c594505d1e3d1d49f2c0a8dac61441505c Author: Ian Rogers Date: Thu Apr 13 06:29:44 2023 -0700 perf vendor events intel: Fix uncore topics for knightslanding Remove 'uncore-other' topic classification, move to cache, io and memory. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230413132949.3487664-17-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 05c74de4ecb66c75b63a348b0cb5a95bab92ce98 Author: Ian Rogers Date: Thu Apr 13 06:29:43 2023 -0700 perf vendor events intel: Fix uncore topics for jaketown Remove 'uncore-other' topic classification, move to cache, interconnect and io. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230413132949.3487664-16-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 14b4c54485bbab73e54c9170b8c9eae3f642edc2 Author: Ian Rogers Date: Thu Apr 13 06:29:42 2023 -0700 perf vendor events intel: Fix uncore topics for ivytown Remove 'uncore-other' topic classification, move to cache, interconnect and io. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20230413132949.3487664-15-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit c2f38d3b95e600d3a9a7195a2db57f7d47fb0664 Author: Ian Rogers Date: Thu Apr 13 06:29:41 2023 -0700 perf vendor events intel: Fix uncore topics for ivybridge Remove 'uncore-other' topic classification, move to cache and interconnect. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230413132949.3487664-14-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f42a7d02b7a3ce2531fef0ae89e474f0e0bbf0f9 Author: Ian Rogers Date: Thu Apr 13 06:29:40 2023 -0700 perf vendor events intel: Fix uncore topics for icelakex Remove 'uncore-other' topic classification, move to cache, interconnect and io. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20230413132949.3487664-13-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit bc4a245a80eef3ac1f0ee33f1ee3217218e38f3e Author: Ian Rogers Date: Thu Apr 13 06:29:39 2023 -0700 perf vendor events intel: Fix uncore topics for icelake Move events from 'uncore-other' topic classification to interconnect. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230413132949.3487664-12-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 579c04721539f690c63a9fe095d76af235a95864 Author: Ian Rogers Date: Thu Apr 13 06:29:38 2023 -0700 perf vendor events intel: Fix uncore topics for haswellx Remove 'uncore-other' topic classification, move to cache, interconnect and io. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20230413132949.3487664-11-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 6910f7bac205b28110f896b0b9881ecd35772426 Author: Ian Rogers Date: Thu Apr 13 06:29:37 2023 -0700 perf vendor events intel: Fix uncore topics for haswell Move events from 'uncore-other' topic classification to cache and interconnect. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230413132949.3487664-10-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b3eb533ca5c663db8fdd9621b34b3e4c672b70f0 Author: Ian Rogers Date: Thu Apr 13 06:29:36 2023 -0700 perf vendor events intel: Fix uncore topics for cascadelakex Remove 'uncore-other' topic classification, move to cache, interconnect, io and memory. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20230413132949.3487664-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit c9f485c63d9332d4bc09e2d688613b231f0aa754 Author: Ian Rogers Date: Thu Apr 13 06:29:35 2023 -0700 perf vendor events intel: Fix uncore topics for broadwellx Remove 'uncore-other' topic classification, move to cache, interconnect and io. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20230413132949.3487664-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 55b7bcef861c1345deb09c71d626e88174a20703 Author: Ian Rogers Date: Thu Apr 13 06:29:34 2023 -0700 perf vendor events intel: Fix uncore topics for broadwellde Remove 'uncore-other' topic classification, move to cache, interconnect and io. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230413132949.3487664-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 141825578a2467294752d2952c166116e32af2ca Author: Ian Rogers Date: Thu Apr 13 06:29:33 2023 -0700 perf vendor events intel: Fix uncore topics for broadwell Reduce the number of 'uncore-other' topic classifications, move to cache and interconnect. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230413132949.3487664-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 759e81507e82375475c6ff1cd328b2e4bb10aee6 Author: Ian Rogers Date: Thu Apr 13 06:29:32 2023 -0700 perf vendor events intel: Fix uncore topics for alderlake Move events from 'uncore-other' topic classification to interconnect. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230413132949.3487664-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 98806c08f995e850f4427e30852a7012f4f1c869 Author: Ian Rogers Date: Thu Apr 13 06:29:31 2023 -0700 perf vendor events intel: Add sierraforest Add v1.00 from: https://github.com/intel/perfmon/pull/69 Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230413132949.3487664-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit dbe9d887d3015a95c8d10dd47ce3e241a5167772 Author: Ian Rogers Date: Thu Apr 13 06:29:30 2023 -0700 perf vendor events intel: Add grandridge Add v1.00 from: https://github.com/intel/perfmon/pull/69 Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230413132949.3487664-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 54f5de6f2998cfefbb68e7f6b2672f0b0ea5ab24 Author: Ian Rogers Date: Thu Apr 13 06:29:29 2023 -0700 perf vendor events intel: Update sapphirerapids to v1.12 Summary from https://github.com/intel/perfmon/pull/68 - Numerous uncore event additions and changes. - Description updates for core events XQ.FULL_CYCLES and MISC2_RETIRED.LFENCE. - Update ARITH.IDIV_ACTIVE counter mask. This change also gets rid of uncore-other as a topic, derived from the file name, breaking it apart in to more specific topics. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Edward Baker Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Xing Zhengjun Link: http://lore.kernel.org/lkml/20230413132949.3487664-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 798352cb25d2c27affbb5c733ed28430057228ca Merge: b89116c2fb3f6 7ba83850ca269 Author: Dave Chinner Date: Fri Apr 14 07:11:43 2023 +1000 Merge tag 'fix-asciici-bugs-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: fix ascii-ci problems, then kill it [v2] Last week, I was fiddling around with the metadump name obfuscation code while writing a debugger command to generate directories full of names that all have the same hash name. I had a few questions about how well all that worked with ascii-ci mode, and discovered a nasty discrepancy between the kernel and glibc's implementations of the tolower() function. I discovered that I could create a directory that is large enough to require separate leaf index blocks. The hashes stored in the dabtree use the ascii-ci specific hash function, which uses a library function to convert the name to lowercase before hashing. If the kernel and C library's versions of tolower do not behave exactly identically, xfs_ascii_ci_hashname will not produce the same results for the same inputs. xfs_repair will deem the leaf information corrupt and rebuild the directory. After that, lookups in the kernel will fail because the hash index doesn't work. The kernel's tolower function will convert extended ascii uppercase letters (e.g. A-with-umlaut) to extended ascii lowercase letters (e.g. a-with-umlaut), whereas glibc's will only do that if you force LANG to ascii. Tiny embedded libc implementations just plain won't do it at all, and the result is a mess. Stabilize the behavior of the hash function by encoding the name transformation function in libxfs, add it to the selftest, and fix all the userspace tools, none of which handle this transformation correctly. The v1 series generated a /lot/ of discussion, in which several things became very clear: (1) Linus is not enamored of case folding of any kind; (2) Dave and Christoph don't seem to agree on whether the feature is supposed to work for 7-bit ascii or latin1; (3) it trashes UTF8 encoded names if those happen to show up; and (4) I don't want to maintain this mess any longer than I have to. Kill it in 2030. v2: rename the functions to make it clear we're moving away from the letters t, o, l, o, w, e, and r; and deprecate the whole feature once we've fixed the bugs and added tests. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit b89116c2fb3f6627e6b6ef1ccc96919603aa0315 Merge: 43223ef72ebbe 4f5e304248ab4 Author: Dave Chinner Date: Fri Apr 14 07:11:31 2023 +1000 Merge tag 'scrub-strengthen-rmap-checking-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: strengthen rmapbt scrubbing [v24.5] This series strengthens space allocation record cross referencing by using AG block bitmaps to compute the difference between space used according to the rmap records and the primary metadata, and reports cross-referencing errors for any discrepancies. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 43223ef72ebbe0f5dbedadaf01292526826a974b Merge: bb09d76599ede 6772fcc8890ae Author: Dave Chinner Date: Fri Apr 14 07:11:20 2023 +1000 Merge tag 'repair-bitmap-rework-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: rework online fsck incore bitmap [v24.5] In this series, we make some changes to the incore bitmap code: First, we shorten the prefix to 'xbitmap'. Then, we rework some utility functions for later use by online repair and clarify how the walk functions are supposed to be used. Finally, we use all these new pieces to convert the incore bitmap to use an interval tree instead of linked lists. This lifts the limitation that callers had to be careful not to set a range that was already set; and gets us ready for the btree rebuilder functions needing to be able to set bits in a bitmap and generate maximal contiguous extents for the set ranges. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit bb09d76599ededce8c08ef7c446b28f22ff730a8 Merge: b9fcf89f6b9a2 44af6c7e59b12 Author: Dave Chinner Date: Fri Apr 14 07:11:10 2023 +1000 Merge tag 'scrub-fix-xattr-memory-mgmt-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: clean up memory management in xattr scrub [v24.5] Currently, the extended attribute scrubber uses a single VLA to store all the context information needed in various parts of the scrubber code. This includes xattr leaf block space usage bitmaps, and the value buffer used to check the correctness of remote xattr value block headers. We try to minimize the insanity through the use of helper functions, but this is a memory management nightmare. Clean this up by making the bitmap and value pointers explicit members of struct xchk_xattr_buf. Second, strengthen the xattr checking by teaching it to look for overlapping data structures in the shortform attr data. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit b9fcf89f6b9a2f83d46469469b18f926d327733c Merge: d808a8e6b92a0 1c1646afc9678 Author: Dave Chinner Date: Fri Apr 14 07:11:02 2023 +1000 Merge tag 'scrub-detect-mergeable-records-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: detect mergeable and overlapping btree records [v24.5] While I was doing differential fuzz analysis between xfs_scrub and xfs_repair, I noticed that xfs_repair was only partially effective at detecting btree records that can be merged, and xfs_scrub totally didn't notice at all. For every interval btree type except for the bmbt, there should never exist two adjacent records with adjacent keyspaces because the blockcount field is always large enough to span the entire keyspace of the domain. This is because the free space, rmap, and refcount btrees have a blockcount field large enough to store the maximum AG length, and there can never be an allocation larger than an AG. The bmbt is a different story due to its ondisk encoding where the blockcount is only 21 bits wide. Because AGs can span up to 2^31 blocks and the RT volume can span up to 2^52 blocks, a preallocation of 2^22 blocks will be expressed as two records of 2^21 length. We don't opportunistically combine records when doing bmbt operations, which is why the fsck tools have never complained about this scenario. Offline repair is partially effective at detecting mergeable records because I taught it to do that for the rmap and refcount btrees. This series enhances the free space, rmap, and refcount scrubbers to detect mergeable records. For the bmbt, it will flag the file as being eligible for an optimization to shrink the size of the data structure. The last patch in this set also enhances the rmap scrubber to detect records that overlap incorrectly. This check is done automatically for non-overlapping btree types, but we have to do it separately for the rmapbt because there are constraints on which allocation types are allowed to overlap. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit d808a8e6b92a0bac2aac5a73981eaa9b6a2c4170 Merge: 1e7912349ebcc 1e59fdb7d6157 Author: Dave Chinner Date: Fri Apr 14 07:10:53 2023 +1000 Merge tag 'scrub-merge-bmap-records-6.4_2023-04-12' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: merge bmap records for faster scrubs [v24.5] I started looking into performance problems with the data fork scrubber in generic/333, and noticed a few things that needed improving. First, due to design reasons, it's possible for file forks btrees to contain multiple contiguous mappings to the same physical space. Instead of checking each ondisk mapping individually, it's much faster to combine them when possible and check the combined mapping because that's fewer trips through the rmap btree, and we can drop this check-around behavior that it does when an rmapbt lookup produces a record that starts before or ends after a particular bmbt mapping. Second, I noticed that the bmbt scrubber decides to walk every reverse mapping in the filesystem if the file fork is in btree format. This is very costly, and only necessary if the inode repair code had to zap a fork to convince iget to work. Constraining the full-rmap scan to this one case means we can skip it for normal files, which drives the runtime of this test from 8 hours down to 45 minutes (observed with realtime reflink and rebuild-all mode.) Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 1e7912349ebcc194aba463b2c8128ba809ee4b64 Merge: a44667226d32a 1fc7a0597d237 Author: Dave Chinner Date: Fri Apr 14 07:10:41 2023 +1000 Merge tag 'scrub-iget-fixes-6.4_2023-04-12' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: fix iget/irele usage in online fsck [v24.5] This patchset fixes a handful of problems relating to how we get and release incore inodes in the online scrub code. The first patch fixes how we handle DONTCACHE -- our reasons for setting (or clearing it) depend entirely on the runtime environment at irele time. Hence we can refactor iget and irele to use our own wrappers that set that context appropriately. The second patch fixes a race between the iget call in the inode core scrubber and other writer threads that are allocating or freeing inodes in the same AG by changing the behavior of xchk_iget (and the inode core scrub setup function) to return either an incore inode or the AGI buffer so that we can be sure that the inode cannot disappear on us. The final patch elides MMAPLOCK from scrub paths when possible. It did not fit anywhere else. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit a44667226d32a168a0953f9382cd8503ec947d7d Merge: f697c2cc15bd4 0916056eba4fd Author: Dave Chinner Date: Fri Apr 14 07:10:32 2023 +1000 Merge tag 'scrub-parent-fixes-6.4_2023-04-12' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: fix bugs in parent pointer checking [v24.5] Jan Kara pointed out that the VFS doesn't take i_rwsem of a child subdirectory that is being moved from one parent to another. Upon deeper analysis, I realized that this was the source of a very hard to trigger false corruption report in the parent pointer checking code. Now that we've refactored how directory walks work in scrub, we can also get rid of all the unnecessary and broken locking to make parent pointer scrubbing work properly. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit f697c2cc15bd42e9e0c7c33dea9e9b7b507877d0 Merge: b1bdab25262a6 6bb9209ceebb0 Author: Dave Chinner Date: Fri Apr 14 07:10:21 2023 +1000 Merge tag 'scrub-dir-iget-fixes-6.4_2023-04-12' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: fix iget usage in directory scrub [v24.5] In this series, we fix some problems with how the directory scrubber grabs child inodes. First, we want to reduce EDEADLOCK returns by replacing fixed-iteration loops with interruptible trylock loops. Second, we add UNTRUSTED to the child iget call so that we can detect a dirent that points to an unallocated inode. Third, we fix a bug where we weren't checking the inode pointed to by dotdot entries at all. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit b1bdab25262a6ac5fb04a04c14da4e25afddadb9 Merge: f1121b995c982 30f8ee5e7e0cc Author: Dave Chinner Date: Fri Apr 14 07:10:13 2023 +1000 Merge tag 'scrub-detect-rmapbt-gaps-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: detect incorrect gaps in rmap btree [v24.5] Following in the theme of the last two patchsets, this one strengthens the rmap btree record checking so that scrub can count the number of space records that map to a given owner and that do not map to a given owner. This enables us to determine exclusive ownership of space that can't be shared. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit f1121b995c9825f3267ad4f586b2ac644d87d5a8 Merge: e7cef2fe444b1 efc0845f5d3e2 Author: Dave Chinner Date: Fri Apr 14 07:10:05 2023 +1000 Merge tag 'scrub-detect-inobt-gaps-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: detect incorrect gaps in inode btree [v24.5] This series continues the corrections for a couple of problems I found in the inode btree scrubber. The first problem is that we don't directly check the inobt records have a direct correspondence with the finobt records, and vice versa. The second problem occurs on filesystems with sparse inode chunks -- the cross-referencing we do detects sparseness, but it doesn't actually check the consistency between the inobt hole records and the rmap data. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit e7cef2fe444b18e246d95d2a9156b37506590d61 Merge: 6858c88701077 7ac14fa2bd22e Author: Dave Chinner Date: Fri Apr 14 07:09:55 2023 +1000 Merge tag 'scrub-detect-refcount-gaps-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: detect incorrect gaps in refcount btree [v24.5] The next few patchsets address a deficiency in scrub that I found while QAing the refcount btree scrubber. If there's a gap between refcount records, we need to cross-reference that gap with the reverse mappings to ensure that there are no overlapping records in the rmap btree. If we find any, then the refcount btree is not consistent. This is not a property that is specific to the refcount btree; they all need to have this sort of keyspace scanning logic to detect inconsistencies. To do this accurately, we need to be able to scan the keyspace of a btree (which we already do) to be able to tell the caller if the keyspace is empty, sparse, or fully covered by records. The first few patches add the keyspace scanner to the generic btree code, along with the ability to mask off parts of btree keys because when we scan the rmapbt, we only care about space usage, not the owners. The final patch closes the scanning gap in the refcountbt scanner. v23.1: create helpers for the key extraction and comparison functions, improve documentation, and eliminate the ->mask_key indirect calls Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 6858c88701077730fa99342fe3e066c68efc9df4 Merge: 1ee75505324d1 2bea8df0a52b0 Author: Dave Chinner Date: Fri Apr 14 07:09:46 2023 +1000 Merge tag 'scrub-btree-key-enhancements-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: enhance btree key scrubbing [v24.5] This series fixes the scrub btree block checker to ensure that the keys in the parent block accurately represent the block, and check the ordering of all interior key records. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 1ee75505324d154ba0e17815d50726acbf7f0140 Merge: b764ea207fba6 38384569a2a8a Author: Dave Chinner Date: Fri Apr 14 07:09:36 2023 +1000 Merge tag 'rmap-btree-fix-key-handling-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: fix rmap btree key flag handling [v24.5] This series fixes numerous flag handling bugs in the rmapbt key code. The most serious transgression is that key comparisons completely strip out all flag bits from rm_offset, including the ones that participate in record lookups. The second problem is that for years we've been letting the unwritten flag (which is an attribute of a specific record and not part of the record key) escape from leaf records into key records. The solution to the second problem is to filter attribute flags when creating keys from records, and the solution to the first problem is to preserve *only* the flags used for key lookups. The ATTR and BMBT flags are a part of the lookup key, and the UNWRITTEN flag is a record attribute. This has worked for years without generating user complaints because ATTR and BMBT extents cannot be shared, so key comparisons succeed solely on rm_startblock. Only file data fork extents can be shared, and those records never set any of the three flag bits, so comparisons that dig into rm_owner and rm_offset work just fine. A filesystem written with an unpatched kernel and mounted on a patched kernel will work correctly because the ATTR/BMBT flags have been conveyed into keys correctly all along, and we still ignore the UNWRITTEN flag in any key record. This was what doomed my previous attempt to correct this problem in 2019. A filesystem written with a patched kernel and mounted on an unpatched kernel will also work correctly because unpatched kernels ignore all flags. With this patchset applied, the scrub code gains the ability to detect rmap btrees with incorrectly set attr and bmbt flags in the key records. After three years of testing, I haven't encountered any problems. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit b764ea207fba692bc8195513ab4a63fbc4af6e66 Merge: 01822a74ca5e4 de1a9ce225e93 Author: Dave Chinner Date: Fri Apr 14 07:09:27 2023 +1000 Merge tag 'btree-hoist-scrub-checks-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: hoist scrub record checks into libxfs [v24.5] There are a few things about btree records that scrub checked but the libxfs _get_rec functions didn't. Move these bits into libxfs so that everyone can benefit. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 01822a74ca5e49dfdc4003be21cb96e4f3d42606 Merge: b634abac59acc 6a3bd8fcf9afb Author: Dave Chinner Date: Fri Apr 14 07:09:18 2023 +1000 Merge tag 'btree-complain-bad-records-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: standardize btree record checking code [v24.5] While I was cleaning things up for 6.1, I noticed that the btree _query_range and _query_all functions don't perform the same checking that the _get_rec functions perform. In fact, they don't perform /any/ sanity checking, which means that callers aren't warned about impossible records. Therefore, hoist the record validation and complaint logging code into separate functions, and call them from any place where we convert an ondisk record into an incore record. For online scrub, we can replace checking code with a call to the record checking functions in libxfs, thereby reducing the size of the codebase. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit b634abac59acc0e4397c5cf420278b32a6e0b69e Merge: 793f5c2cca10d 88accf1722673 Author: Dave Chinner Date: Fri Apr 14 07:09:09 2023 +1000 Merge tag 'scrub-drain-intents-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: drain deferred work items when scrubbing [v24.5] The design doc for XFS online fsck contains a long discussion of the eventual consistency models in use for XFS metadata. In that chapter, we note that it is possible for scrub to collide with a chain of deferred space metadata updates, and proposes a lightweight solution: The use of a pending-intents counter so that scrub can wait for the system to drain all chains. This patchset implements that scrub drain. The first patch implements the basic mechanism, and the subsequent patches reduce the runtime overhead by converting the implementation to use sloppy counters and introducing jump labels to avoid walking into scrub hooks when it isn't running. This last paradigm repeats elsewhere in this megaseries. v23.1: make intent items take an active ref to the perag structure and document why we bump and drop the intent counts when we do Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 793f5c2cca10d0f33d38563c142ee00942c3e21e Merge: 1e5ffdc57d7e0 ecc73f8a58c78 Author: Dave Chinner Date: Fri Apr 14 07:08:59 2023 +1000 Merge tag 'scrub-fix-legalese-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs_scrub: fix licensing and copyright notices [v24.5] Fix various attribution problems in the xfs_scrub source code, such as the author's contact information, out of date SPDX tags, and a rough estimate of when the feature was under heavy development. The most egregious parts are the files that are missing license information completely. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 1e5ffdc57d7e0b213219f9e6bb0fb0ba5ef13da8 Merge: 826053db98ec6 9b2e5a234c89f Author: Dave Chinner Date: Fri Apr 14 07:08:49 2023 +1000 Merge tag 'pass-perag-refs-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: pass perag references around when possible [v24.5] Avoid the cost of perag radix tree lookups by passing around active perag references when possible. v24.2: rework some of the naming and whatnot so there's less opencoding Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 826053db98ec6ea2469f02571401422da539e5e3 Merge: bed25d8010bcf 00e7b3bac1dc8 Author: Dave Chinner Date: Fri Apr 14 07:08:38 2023 +1000 Merge tag 'intents-perag-refs-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: make intent items take a perag reference [v24.5] Now that we've cleaned up some code warts in the deferred work item processing code, let's make intent items take an active perag reference from their creation until they are finally freed by the defer ops machinery. This change facilitates the scrub drain in the next patchset and will make it easier for the future AG removal code to detect a busy AG in need of quiescing. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit bed25d8010bcf48de626545a89ea58550fb5e95b Merge: 8ee81ed581ff3 03786f0afb2ed Author: Dave Chinner Date: Fri Apr 14 07:08:05 2023 +1000 Merge tag 'online-fsck-design-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next xfs: design documentation for online fsck [v24.5] After six years of development and a nearly two year hiatus from patchbombing, I think it is time to resume the process of merging the online fsck feature into XFS. The full patchset comprises 105 separate patchsets that capture 470 patches across the kernel, xfsprogs, and fstests projects. I would like to merge this feature into upstream in time for the 2023 LTS kernel. As of 5.15 (aka last year's LTS), we have merged all generally useful infrastructure improvements into the regular filesystem. The only changes to the core filesystem that remain are the ones that are only useful to online fsck itself. In other words, the vast majority of the new code in the patchsets comprising the online fsck feature are is mostly self contained and can be turned off via Kconfig. Many of you readers might be wondering -- why have I chosen to make one large submission with 100+ patchsets comprising ~500 patches? Why didn't I merge small pieces of functionality bit by bit and revise common code as necessary? Well, the simple answer is that in the past six years, the fundamental algorithms have been revised repeatedly as I've built out the functionality. In other words, the codebase as it is now has the benefit that I now know every piece that's necessary to get the job done in a reasonable manner and within the constraints laid out by community reviews. I believe this has reduced code churn in mainline and freed up my time so that I can iterate faster. As a concession to the mail servers, I'm breaking up the submission into smaller pieces; I'm only pushing the design document and the revisions to the existing scrub code, which is the first 20%% of the patches. Also, I'm arbitrarily restarting the version numbering by reversioning all patchsets from version 22 to epoch 23, version 1. The big question to everyone reading this is: How might I convince you that there is more merit in merging the whole feature and dealing with the consequences than continuing to maintain it out of tree? --------- To prepare the XFS community and potential patch reviewers for the upstream submission of the online fsck feature, I decided to write a document capturing the broader picture behind the online repair development effort. The document begins by defining the problems that online fsck aims to solve and outlining specific use cases for the functionality. Using that as a base, the rest of the design document presents the high level algorithms that fulfill the goals set out at the start and the interactions between the large pieces of the system. Case studies round out the design documentation by adding the details of exactly how specific parts of the online fsck code integrate the algorithms with the filesystem. The goal of this effort is to help the XFS community understand how the gigantic online repair patchset works. The questions I submit to the community reviewers are: 1. As you read the design doc (and later the code), do you feel that you understand what's going on well enough to try to fix a bug if you found one? 2. What sorts of interactions between systems (or between scrub and the rest of the kernel) am I missing? 3. Do you feel confident enough in the implementation as it is now that the benefits of merging the feature (as EXPERIMENTAL) outweigh any potential disruptions to XFS at large? 4. Are there problematic interactions between subsystems that ought to be cleared up before merging? 5. Can I just merge all of this? I intend to commit this document to the kernel's documentation directory when we start merging the patchset, albeit without the links to git.kernel.org. A much more readable version of this is posted at: https://djwong.org/docs/xfs-online-fsck-design/ v2: add missing sections about: all the in-kernel data structures and new apis that the scrub and repair functions use; how xattrs and directories are checked; how space btree records are checked; and add more details to the parts where all these bits tie together. Proofread for verb tense inconsistencies and eliminate vague 'we' usage. Move all the discussion of what we can do with pageable kernel memory into a single source file and section. Document where log incompat feature locks fit into the locking model. v3: resync with 6.0, fix a few typos, begin discussion of the merging plan for this megapatchset. Signed-off-by: Darrick J. Wong Signed-off-by: Dave Chinner commit b4aff7513df323553de714dcf7b54e896577be1f Author: Pankaj Raghav Date: Thu Apr 13 14:00:55 2023 -0700 scripts/gdb: use mem instead of core_layout to get the module address commit ac3b43283923 ("module: replace module_layout with module_memory") changed the struct module data structure from module_layout to module_memory. The core_layout member which is used while loading modules are not available anymore leading to the following error while running gdb: (gdb) lx-symbols loading vmlinux Python Exception : There is no member named core_layout. Error occurred in Python: There is no member named core_layout. Replace core_layout with its new counterpart mem[MOD_TEXT]. Fixes: ac3b43283923 ("module: replace module_layout with module_memory") Signed-off-by: Pankaj Raghav Signed-off-by: Luis Chamberlain commit 560db7ccf96dda75592c6d2a604c1e296104fe7a Author: Nick Alcock Date: Mon Mar 20 10:48:10 2023 +0000 interconnect: remove module-related code Now the interconnect core can no longer be a module, drop all remaining module-related code as well. Signed-off-by: Nick Alcock Requested-by: Georgi Djakov Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Georgi Djakov Cc: linux-pm@vger.kernel.org Signed-off-by: Luis Chamberlain commit c0a8c5d04733a912e9fb4c5be6759e6708003ee6 Author: Nick Alcock Date: Mon Mar 20 10:46:24 2023 +0000 interconnect: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Georgi Djakov Cc: linux-pm@vger.kernel.org Signed-off-by: Luis Chamberlain commit 7e137102ae97c42099c90d01fa01a6c05bf742ab Author: Nick Alcock Date: Tue Mar 7 18:02:10 2023 +0000 zswap: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Seth Jennings Cc: Dan Streetman Cc: Vitaly Wool Cc: Andrew Morton Cc: linux-mm@kvack.org Signed-off-by: Luis Chamberlain commit 68ac126576a5ac0986ca64fa96ad8648da3cb751 Author: Nick Alcock Date: Tue Mar 7 18:02:09 2023 +0000 zpool: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Dan Streetman Cc: Andrew Morton Cc: linux-mm@kvack.org Signed-off-by: Luis Chamberlain commit 569e4d25f45ca4902566075e38a52eadd760b5da Author: Nick Alcock Date: Tue Mar 7 18:02:08 2023 +0000 x86/mm/dump_pagetables: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Signed-off-by: Luis Chamberlain commit 1c8744d83825e2dc5a773e321460030251d6925e Author: Nick Alcock Date: Tue Mar 7 18:02:07 2023 +0000 regulator: stm32-pwr: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Liam Girdwood Cc: Mark Brown Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Luis Chamberlain commit be1c21f17ce2d1e8cdb6d27b88a5346cfebfae49 Author: Nick Alcock Date: Tue Mar 7 18:02:06 2023 +0000 udmabuf: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Gerd Hoffmann Cc: Sumit Semwal Cc: "Christian König" Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Luis Chamberlain commit 573858e85d7d390313fbc1f452ae764512f9819d Author: Nick Alcock Date: Tue Mar 7 18:02:06 2023 +0000 unicode: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Acked-by: Gabriel Krisman Bertazi Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Gabriel Krisman Bertazi Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Luis Chamberlain commit 7f82b39dc3e41bc12a207101d961353875b05b7d Author: Nick Alcock Date: Tue Mar 7 18:02:05 2023 +0000 treewide: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Signed-off-by: Luis Chamberlain commit 0c9bf64c5b38ce4feb06a6d360ef0c9280340049 Author: Nick Alcock Date: Tue Mar 7 18:02:04 2023 +0000 btree: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Signed-off-by: Luis Chamberlain commit 958adeefbd62d55fc1e68701dc2c9ef5a076615b Author: Nick Alcock Date: Tue Mar 7 18:02:03 2023 +0000 watch_queue: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Signed-off-by: Luis Chamberlain commit 92a72297821836b2f89153afdb8a8dcfa642084d Author: Nick Alcock Date: Tue Mar 7 18:02:02 2023 +0000 drivers: bus: simple-pm-bus: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Signed-off-by: Luis Chamberlain commit ae6385af3740f2abb4b0ae8403af3de1a3c82725 Author: Nick Alcock Date: Tue Mar 7 18:02:01 2023 +0000 braille_console: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Signed-off-by: Luis Chamberlain commit 8493757372455f981d79a571487e85b8de80547b Author: Nick Alcock Date: Tue Mar 7 18:02:01 2023 +0000 bus: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Philipp Zabel Signed-off-by: Luis Chamberlain commit a0d8881006d0ee96ff52b122b6bf98cc58eefe7c Author: Nick Alcock Date: Tue Mar 7 18:02:00 2023 +0000 irqchip: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Nishanth Menon Cc: Tero Kristo Cc: Santosh Shilimkar Cc: Thomas Gleixner Cc: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Luis Chamberlain commit 295ff94c888cb21de1e3d12b4252a5178c15e99d Author: Nick Alcock Date: Tue Mar 7 18:02:00 2023 +0000 soc/tegra: cbb: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Signed-off-by: Luis Chamberlain commit 24e4dba2a482111f66072f214be2a59762505db3 Author: Nick Alcock Date: Tue Mar 7 18:01:59 2023 +0000 power: reset: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Sebastian Reichel Cc: linux-pm@vger.kernel.org Signed-off-by: Luis Chamberlain commit b00cf02386e4c82ebcde4bc2f6a6a802cea38c26 Author: Nick Alcock Date: Tue Mar 7 18:01:57 2023 +0000 irqchip/irq-sl28cpld: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Acked-by: Michael Walle Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Michael Walle Cc: Thomas Gleixner Cc: Marc Zyngier Signed-off-by: Luis Chamberlain commit 2fd5ed8b65a62eaf78e30098cf95b9d58461a8a5 Author: Nick Alcock Date: Tue Mar 7 18:01:56 2023 +0000 rv/reactor: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Acked-by: Daniel Bristot de Oliveira Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Daniel Bristot de Oliveira Cc: Steven Rostedt Cc: Masami Hiramatsu Cc: linux-trace-devel@vger.kernel.org Cc: linux-trace-kernel@vger.kernel.org Signed-off-by: Luis Chamberlain commit 39b8452f9136850df00425028de1b28d65751523 Author: Nick Alcock Date: Tue Mar 7 18:01:55 2023 +0000 reset: mpfs: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Reviewed-by: Conor Dooley Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Conor Dooley Cc: Daire McNamara Cc: Philipp Zabel Cc: linux-riscv@lists.infradead.org Signed-off-by: Luis Chamberlain commit 00c8682a78f88e4eecdfbfb86a8f15d4c322a128 Author: Nick Alcock Date: Tue Mar 7 18:01:55 2023 +0000 clk: microchip: mpfs: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Conor Dooley Cc: Daire McNamara Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-riscv@lists.infradead.org Cc: linux-clk@vger.kernel.org Signed-off-by: Luis Chamberlain commit 7bd57c5a98aa89af63f55a744e99b6a1da6ea9dd Author: Nick Alcock Date: Tue Mar 7 18:01:54 2023 +0000 reset: lantiq: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Philipp Zabel Signed-off-by: Luis Chamberlain commit c9698fd5b4550da9c5988c9501762cf1d7a752da Author: Nick Alcock Date: Tue Mar 7 18:01:54 2023 +0000 reset: mchp: sparx5: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Reviewed-by: Steen Hegelund Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Philipp Zabel Cc: Lars Povlsen Cc: Steen Hegelund Cc: Daniel Machon Cc: UNGLinuxDriver@microchip.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Luis Chamberlain commit 355a1a4b68d44384154e8fdb41861e053bb70d53 Author: Nick Alcock Date: Tue Mar 7 18:01:53 2023 +0000 clk: renesas: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Geert Uytterhoeven Cc: Michael Turquette Cc: Stephen Boyd Cc: Philipp Zabel Cc: linux-renesas-soc@vger.kernel.org Cc: linux-clk@vger.kernel.org Signed-off-by: Luis Chamberlain commit cc9ab32b6885b62fd5a774d1149ccf037801b510 Author: Nick Alcock Date: Tue Mar 7 18:01:53 2023 +0000 remoteproc: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Reviewed-by: Mathieu Poirier Acked-by: Mukesh Ojha Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Bjorn Andersson Cc: Mathieu Poirier Cc: linux-remoteproc@vger.kernel.org Signed-off-by: Luis Chamberlain commit ec4f7b7fc9918bb8afca42b8e6847193b24ca944 Author: Nick Alcock Date: Tue Mar 7 18:01:52 2023 +0000 power: supply: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Sebastian Reichel Cc: linux-pm@vger.kernel.org Signed-off-by: Luis Chamberlain commit 5e0266f0e5f57617472d5aac4013f58a3ef264ac Author: Nick Alcock Date: Tue Mar 7 18:01:52 2023 +0000 lib: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Acked-by: Jacob Keller Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Jacob Keller Signed-off-by: Luis Chamberlain commit b08401919cc1359095e9c03c52470f4b0e1097de Author: Nick Alcock Date: Tue Mar 7 18:01:51 2023 +0000 pinctrl: renesas: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Geert Uytterhoeven Cc: Linus Walleij Cc: linux-renesas-soc@vger.kernel.org Cc: linux-gpio@vger.kernel.org Signed-off-by: Luis Chamberlain commit 7da1628cf38f54f0d1044096f31b73f8c046aa8f Author: Nick Alcock Date: Tue Mar 7 18:01:50 2023 +0000 pinctrl: mediatek: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Sean Wang Cc: Linus Walleij Cc: Matthias Brugger Cc: linux-mediatek@lists.infradead.org Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Luis Chamberlain commit feb7e8cba73abc1984937d3a8507c17d337c82ca Author: Nick Alcock Date: Tue Mar 7 18:01:50 2023 +0000 pinctrl: amd: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Basavaraj Natikar Cc: Shyam Sundar S K Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Signed-off-by: Luis Chamberlain commit 33351b1a59550491569045fbcb926126c30a1113 Author: Nick Alcock Date: Tue Mar 7 18:01:49 2023 +0000 perf/hw_breakpoint: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: linux-perf-users@vger.kernel.org Signed-off-by: Luis Chamberlain commit 83bc3f3cd81dd7f16c836b4f896df70015ae577c Author: Nick Alcock Date: Tue Mar 7 18:01:47 2023 +0000 nvmem: core: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Srinivas Kandagatla Signed-off-by: Luis Chamberlain commit 62d8cd5bfd58e48e4e76415fa9db6147b79cb064 Author: Nick Alcock Date: Tue Mar 7 18:01:46 2023 +0000 NFSv4.2: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Trond Myklebust Cc: Anna Schumaker Cc: Chuck Lever Cc: Jeff Layton Cc: linux-nfs@vger.kernel.org Signed-off-by: Luis Chamberlain commit d829b836f2816abcb6bca4a036af53902a18fd74 Author: Nick Alcock Date: Tue Mar 7 18:01:44 2023 +0000 irqchip/mchp-eic: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Reviewed-by: Claudiu Beznea Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Claudiu Beznea Cc: Thomas Gleixner Cc: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Luis Chamberlain commit 268f4d5b63dbae4b289ccb17e3ad073934dee087 Author: Nick Alcock Date: Tue Mar 7 18:01:41 2023 +0000 power: reset: mt6397: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Sean Wang Cc: Sebastian Reichel Cc: Matthias Brugger Cc: linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Luis Chamberlain commit 4f2fe3964cf40c218e97de711646f4c608094749 Author: Nick Alcock Date: Tue Mar 7 18:01:40 2023 +0000 mailbox: zynq: make modular This driver has a MODULE_LICENSE but is not tristate so cannot be built as a module, unlike all its peers: make it modular to match. Signed-off-by: Nick Alcock Suggested-by: Michal Simek Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Jassi Brar Cc: Michal Simek Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Luis Chamberlain commit 7b51090edc1f5aeeac4d6f166ebd95f707eeb095 Author: Nick Alcock Date: Tue Mar 7 18:01:40 2023 +0000 mailbox: rockchip: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Jassi Brar Cc: Heiko Stuebner Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Signed-off-by: Luis Chamberlain commit e3f1f02548adbf973af29c6ee6304a45121bff03 Author: Nick Alcock Date: Tue Mar 7 18:01:40 2023 +0000 irqchip: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Thomas Gleixner Cc: Marc Zyngier Cc: Philipp Zabel Signed-off-by: Luis Chamberlain commit 2752626e3eec0c11487b0a03152821f32fc88dfa Author: Nick Alcock Date: Tue Mar 7 18:01:39 2023 +0000 irqchip: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Thomas Gleixner Cc: Marc Zyngier Signed-off-by: Luis Chamberlain commit 48a3cbf1c566fd68a1a6dd3fc91b6a71dda42e23 Author: Nick Alcock Date: Tue Mar 7 18:01:38 2023 +0000 iommu/sun50i: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Acked-by: Jernej Skrabec Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Joerg Roedel Cc: Will Deacon Cc: Chen-Yu Tsai Cc: Jernej Skrabec Cc: Samuel Holland Cc: Philipp Zabel Cc: iommu@lists.linux.dev Cc: linux-arm-kernel@lists.infradead.org Cc: linux-sunxi@lists.linux.dev Signed-off-by: Luis Chamberlain commit 8a0a6c9af053fb93c0edf4581518c77fd131803e Author: Nick Alcock Date: Tue Mar 7 18:01:37 2023 +0000 hwspinlock: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Ohad Ben-Cohen Cc: Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org Signed-off-by: Luis Chamberlain commit 7540fb785b0464a98a7e7ec7ed44e4bbded8e1c8 Author: Nick Alcock Date: Tue Mar 7 18:01:37 2023 +0000 phy: intel: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Vinod Koul Cc: Kishon Vijay Abraham I Cc: Philipp Zabel Cc: linux-phy@lists.infradead.org Signed-off-by: Luis Chamberlain commit 7435721a4a7b6f51b60c41a2e58075dec3cc0ca8 Author: Nick Alcock Date: Tue Mar 7 18:01:35 2023 +0000 binfmt_elf: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Alexander Viro Cc: Christian Brauner Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Signed-off-by: Luis Chamberlain commit 501e2c7d42d61bd5f473cc719db431973959e55a Author: Nick Alcock Date: Tue Mar 7 18:01:34 2023 +0000 dma-buf: heaps: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Sumit Semwal Cc: "Christian König" Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Luis Chamberlain commit 114da4b026d39e36f6017b7ea534ffe5099f90be Author: Nick Alcock Date: Tue Mar 7 18:01:34 2023 +0000 dma-mapping: benchmark: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: iommu@lists.linux.dev Signed-off-by: Luis Chamberlain commit 3f0dedc39039a75670817a1afffa77b6cee077cb Author: Nick Alcock Date: Tue Mar 7 18:01:33 2023 +0000 dmaengine: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Signed-off-by: Luis Chamberlain commit d69b1f0c03f61bbc6bcd57415f16cc855818ecac Author: Nick Alcock Date: Tue Mar 7 18:01:32 2023 +0000 dmaengine: stm32-mdma: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Vinod Koul Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: Philipp Zabel Cc: dmaengine@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Luis Chamberlain commit b71e2a69d16c8d12c2b1aadeffd59ed1920d50e9 Author: Nick Alcock Date: Mon Mar 20 10:24:35 2023 +0000 crypto: blake2s: remove module_init and module.h inclusion Now this can no longer be built as a module, drop all remaining module-related code as well. Signed-off-by: Nick Alcock Suggested-by: Herbert Xu Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Herbert Xu Cc: "David S. Miller" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: linux-crypto@vger.kernel.org Signed-off-by: Luis Chamberlain commit 41a98c68f2abc67b88568b7a25fd547989d2c92f Author: Nick Alcock Date: Tue Mar 7 18:01:31 2023 +0000 crypto: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Herbert Xu Cc: "David S. Miller" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: linux-crypto@vger.kernel.org Signed-off-by: Luis Chamberlain commit ef5bbd1172f4bd7b9162654d9b167e89afe82867 Author: Nick Alcock Date: Mon Mar 20 10:20:10 2023 +0000 crypto: blake2s: remove module-related code Now blake2s-generic.c can no longer be a module, drop all remaining module-related code as well. Signed-off-by: Nick Alcock Requested-by: Herbert Xu Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Luis Chamberlain commit 3714878005d3b7d78c096ad1f1f463887eb9b928 Author: Nick Alcock Date: Tue Mar 7 18:01:30 2023 +0000 crypto: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Luis Chamberlain commit 5ba4b11a8da728fe6e7c37a6799fd0cc1803157c Author: Nick Alcock Date: Tue Mar 7 18:01:26 2023 +0000 clocksource: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Daniel Lezcano Cc: Thomas Gleixner Signed-off-by: Luis Chamberlain commit 1e64f2a7fef058fa206f09e9e3268049af5e21c4 Author: Nick Alcock Date: Tue Mar 7 18:01:25 2023 +0000 clocksource/drivers/timer-tegra186: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Signed-off-by: Luis Chamberlain commit bb177282c46089d7cc30c1020c6f404070b87310 Author: Nick Alcock Date: Tue Mar 7 18:01:25 2023 +0000 clocksource: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Luis Chamberlain commit e518212eb6f3e70ab6b336b3ed66cc421b24032a Author: Nick Alcock Date: Tue Mar 7 18:01:24 2023 +0000 MIPS: BCM47XX: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Reviewed-by: Philippe Mathieu-Daudé Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: "Rafał Miłecki" Cc: linux-mips@vger.kernel.org Signed-off-by: Luis Chamberlain commit c7b9975a443167a0059e3d4d6582cd2634e7485d Author: Nick Alcock Date: Tue Mar 7 18:01:24 2023 +0000 pinctrl: bcm: ns: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Ray Jui Cc: Scott Branden Cc: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org Cc: linux-gpio@vger.kernel.org Signed-off-by: Luis Chamberlain commit 8a8dd17d2a2d86b23c7cb970ee0ff8f47f164d4b Author: Nick Alcock Date: Tue Mar 7 18:01:22 2023 +0000 KEYS: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: David Howells Cc: Herbert Xu Cc: "David S. Miller" Cc: keyrings@vger.kernel.org Cc: linux-crypto@vger.kernel.org Signed-off-by: Luis Chamberlain commit 6d398e69b9723cef9d9b1a735be34aef56e9e3a7 Author: Nick Alcock Date: Tue Mar 7 18:01:22 2023 +0000 video: fbdev: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Helge Deller Cc: linux-arm-kernel@lists.infradead.org Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Luis Chamberlain commit 06538a04efadf5231f6e02e786126a7a9d6ee647 Author: Nick Alcock Date: Tue Mar 7 18:01:21 2023 +0000 power: reset: keystone-reset: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Santosh Shilimkar Cc: Sebastian Reichel Cc: linux-pm@vger.kernel.org Signed-off-by: Luis Chamberlain commit bb798d3061f17d5139d69eddb8c5f8ee8c4f4f86 Author: Nick Alcock Date: Tue Mar 7 18:01:21 2023 +0000 EDAC, altera: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Dinh Nguyen Cc: Borislav Petkov Cc: Tony Luck Cc: linux-edac@vger.kernel.org Signed-off-by: Luis Chamberlain commit e86c8a2d1b55cb3a69bdbc86bb8101cdd3067f3f Author: Nick Alcock Date: Tue Mar 7 18:01:20 2023 +0000 bus: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Andy Gross Cc: Bjorn Andersson Cc: Philipp Zabel Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Luis Chamberlain commit c592acf5a7522e8746c801734c42d64b19f733da Author: Nick Alcock Date: Tue Mar 7 18:01:19 2023 +0000 bus: qcom: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Luis Chamberlain commit 1095ebc8d42bf5b35dc556b7f86f698c25d39923 Author: Nick Alcock Date: Tue Mar 7 18:01:19 2023 +0000 pinctrl: nuvoton: npcm7xx: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Avi Fishman Cc: Tomer Maimon Cc: Tali Perry Cc: Linus Walleij Cc: openbmc@lists.ozlabs.org Cc: linux-gpio@vger.kernel.org Signed-off-by: Luis Chamberlain commit 1739e4664e9fe8a1bfe23e2e74adc3c244639336 Author: Nick Alcock Date: Tue Mar 7 18:01:18 2023 +0000 bus: ixp4xx: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Linus Walleij Cc: Imre Kaloz Cc: Krzysztof Halasa Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Luis Chamberlain commit f6f5f91cc89a1152c7b6def226fc8b84e624b31b Author: Nick Alcock Date: Tue Mar 7 18:01:17 2023 +0000 clk: bm1880: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Acked-by: Stephen Boyd Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Manivannan Sadhasivam Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org Cc: linux-clk@vger.kernel.org Signed-off-by: Luis Chamberlain commit 87efd0d382aab4b9c0ec056159b7574960327505 Author: Nick Alcock Date: Tue Mar 7 18:01:16 2023 +0000 soc: apple: apple-pmgr-pwrstate: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Reviewed-by: Eric Curtin Acked-by: Sven Peter Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Hector Martin Cc: Sven Peter Cc: Philipp Zabel Cc: asahi@lists.linux.dev Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Luis Chamberlain commit b9ef12eaa0039f383099c7b3a4798c5090679714 Author: Nick Alcock Date: Tue Mar 7 18:01:16 2023 +0000 pinctrl: actions: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: "Andreas Färber" Cc: Manivannan Sadhasivam Cc: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org Cc: linux-actions@lists.infradead.org Cc: linux-gpio@vger.kernel.org Signed-off-by: Luis Chamberlain commit 0ba3f7977eb74edebcd06d93eb83bb872fe5c351 Author: Nick Alcock Date: Tue Mar 7 18:01:15 2023 +0000 ARM: tegra: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Signed-off-by: Luis Chamberlain commit 9016c09e90157c50b50f6e536a1ae9c01f1ea796 Author: Nick Alcock Date: Tue Mar 7 18:01:14 2023 +0000 drivers/perf: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Luis Chamberlain commit 591396b933734ee7f1628156ccefdbd4adcde04d Author: Nick Alcock Date: Tue Mar 7 18:01:14 2023 +0000 bus: arm-integrator-lm: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Luis Chamberlain commit 655cc3a64d5e8c162652eb193ed232b28e8d02a7 Author: Nick Alcock Date: Tue Mar 7 18:01:13 2023 +0000 irqchip/al-fic: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Talel Shenhar Cc: Thomas Gleixner Cc: Marc Zyngier Signed-off-by: Luis Chamberlain commit 9e0d360fe059ddf6b90ab3baae6eae06a7cc3f01 Author: Nick Alcock Date: Tue Mar 7 18:01:13 2023 +0000 mfd: altera-sysmgr: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Thor Thayer Cc: Lee Jones Signed-off-by: Luis Chamberlain commit 066ff7dba151a725f38bdb7606e263a7e884f16c Author: Nick Alcock Date: Tue Mar 7 18:01:12 2023 +0000 soc: fujitsu: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Signed-off-by: Luis Chamberlain commit e3184de9d46c2eebdb776face2e2662c6733331d Author: Kefeng Wang Date: Fri Mar 31 16:45:02 2023 +0800 fs: fix sysctls.c built 'obj-$(CONFIG_SYSCTL) += sysctls.o' must be moved after "obj-y :=", or it won't be built as it is overwrited. Note that there is nothing that is going to break by linking sysctl.o later, we were just being way to cautious and patches have been updated to reflect these considerations and sent for stable as well with the whole "base" stuff needing to be linked prior to child sysctl tables that use that directory. All of the kernel sysctl APIs always share the same directory, and races against using it should end up re-using the same single created directory. And so something we can do eventually is do away with all the base stuff. For now it's fine, it's not creating an issue. It is just a bit pedantic and careful. Fixes: ab171b952c6e ("fs: move namespace sysctls and declare fs base directory") Cc: stable@vger.kernel.org # v5.17 Cc: Christian Brauner Cc: Kefeng Wang Signed-off-by: Kefeng Wang [mcgrof: enhanced commit log for stable criteria and clarify base stuff ] Signed-off-by: Luis Chamberlain commit b3f312c4815d7acf6c7f88f921544626c31bd24a Author: Arnd Bergmann Date: Wed Mar 29 10:02:41 2023 +0200 mm: compaction: remove incorrect #ifdef checks Without CONFIG_SYSCTL, the compiler warns about a few unused functions: mm/compaction.c:3076:12: error: 'proc_dointvec_minmax_warn_RT_change' defined but not used [-Werror=unused-function] mm/compaction.c:2780:12: error: 'sysctl_compaction_handler' defined but not used [-Werror=unused-function] mm/compaction.c:2750:12: error: 'compaction_proactiveness_sysctl_handler' defined but not used [-Werror=unused-function] The #ifdef is actually not necessary here, as the alternative register_sysctl_init() stub function does not use its argument, which lets the compiler drop the rest implicitly, while avoiding the warning. Fixes: c521126610c3 ("mm: compaction: move compaction sysctl to its own file") Signed-off-by: Arnd Bergmann Signed-off-by: Luis Chamberlain commit 48fe8ab8d5a39c7bc49cb41d0ad92c75f48a9550 Author: Minghao Chi Date: Tue Mar 28 14:46:28 2023 +0800 mm: compaction: move compaction sysctl to its own file This moves all compaction sysctls to its own file. Move sysctl to where the functionality truly belongs to improve readability, reduce merge conflicts, and facilitate maintenance. I use x86_defconfig and linux-next-20230327 branch $ make defconfig;make all -jn CONFIG_COMPACTION=y add/remove: 1/0 grow/shrink: 1/1 up/down: 350/-256 (94) Function old new delta vm_compaction - 320 +320 kcompactd_init 180 210 +30 vm_table 2112 1856 -256 Total: Before=21119987, After=21120081, chg +0.00% Despite the addition of 94 bytes the patch still seems a worthwile cleanup. Link: https://lore.kernel.org/lkml/067f7347-ba10-5405-920c-0f5f985c84f4@suse.cz/ Signed-off-by: Minghao Chi Acked-by: Vlastimil Babka Signed-off-by: Luis Chamberlain commit 8cbc82f3ec0d58961cf9c1e5d99e56741f4bf134 Author: Kefeng Wang Date: Mon Mar 20 15:40:10 2023 +0800 mm: memory-failure: Move memory failure sysctls to its own file The sysctl_memory_failure_early_kill and memory_failure_recovery are only used in memory-failure.c, move them to its own file. Acked-by: Naoya Horiguchi Signed-off-by: Kefeng Wang [mcgrof: fix by adding empty ctl entry, this caused a crash] Signed-off-by: Luis Chamberlain commit ca14ccf310ee9d575c3bacbf1d61d9640d0025b6 Author: Luis Chamberlain Date: Fri Mar 10 00:50:50 2023 -0800 arm: simplify two-level sysctl registration for ctl_isa_vars There is no need to declare two tables to just create directories, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain commit 03860ef038e6435c5ea2bda24dc5698e0da60ebc Author: Luis Chamberlain Date: Fri Mar 10 01:10:11 2023 -0800 ia64: simplify one-level sysctl registration for kdump_ctl_table There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain commit 3d51cd8ea3c832c50c22e46354ac89e0964ea2d8 Author: Luis Chamberlain Date: Fri Mar 10 01:24:10 2023 -0800 utsname: simplify one-level sysctl registration for uts_kern_table There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Reviewed-by: Christian Brauner Signed-off-by: Luis Chamberlain commit 02148ff371b276d664780de6d1f52d52074c3e25 Author: Luis Chamberlain Date: Fri Mar 10 13:49:40 2023 -0800 ntfs: simplfy one-level sysctl registration for ntfs_sysctls There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain commit 1119aaa823e6cc35f2e8c8793cfa58d923a15c1b Author: Luis Chamberlain Date: Fri Mar 10 13:48:17 2023 -0800 coda: simplify one-level sysctl registration for coda_table There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Acked-by: Jan Harkes Signed-off-by: Luis Chamberlain commit 3d379b8d0de0492e86b93a1b8cd07403825fe23d Author: Luis Chamberlain Date: Fri Mar 10 13:46:23 2023 -0800 fs/cachefiles: simplify one-level sysctl registration for cachefiles_sysctls There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain commit f5d2b92c85d420d0020163b9ad153962d8f9fcc7 Author: Luis Chamberlain Date: Fri Mar 10 00:42:26 2023 -0800 xfs: simplify two-level sysctl registration for xfs_table There is no need to declare two tables to just create directories, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Reviewed-by: Dave Chinner Signed-off-by: Luis Chamberlain commit a2189b77676b256b6606612fd68ed493f7080929 Author: Luis Chamberlain Date: Fri Mar 10 00:40:35 2023 -0800 nfs: simplify two-level sysctl registration for nfs_cb_sysctls There is no need to declare two tables to just create directories, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Reviewed-by: Jeff Layton Signed-off-by: Luis Chamberlain commit d2235a705b48a1a86e2b8ea15091d83f7f80503c Author: Luis Chamberlain Date: Fri Mar 10 00:39:18 2023 -0800 nfs: simplify two-level sysctl registration for nfs4_cb_sysctls There is no need to declare two tables to just create directories, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Reviewed-by: Jeff Layton Signed-off-by: Luis Chamberlain commit 37b768ce3d23f79cef906aaf7427dd345b57f477 Author: Luis Chamberlain Date: Fri Mar 10 00:37:19 2023 -0800 lockd: simplify two-level sysctl registration for nlm_sysctls There is no need to declare two tables to just create directories, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Reviewed-by: Jeff Layton Signed-off-by: Luis Chamberlain commit 1dc8689e4cc651e21566e10206a84c4006e81fb1 Author: Luis Chamberlain Date: Fri Mar 10 13:00:16 2023 -0800 proc_sysctl: enhance documentation Expand documentation to clarify: o that paths don't need to exist for the new API callers o clarify that we *require* callers to keep the memory of the table around during the lifetime of the sysctls o annotate routines we are trying to deprecate and later remove Cc: stable@vger.kernel.org # v5.17 Cc: Christian Brauner Cc: Kefeng Wang Signed-off-by: Luis Chamberlain commit 9f17a75b2d10ddd786b3b2c4fd732356de4f483e Author: Luis Chamberlain Date: Thu Mar 2 12:46:12 2023 -0800 xen: simplify sysctl registration for balloon register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl_init() can do the directory creation for you so just use that. Signed-off-by: Luis Chamberlain Reviewed-by: Juergen Gross commit 9adcf9d3d5c9ed6bb9d493b59594501f79ae3bed Author: Luis Chamberlain Date: Thu Mar 2 12:46:09 2023 -0800 md: simplify sysctl registration register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl() can do the directory creation for you so just use that. Signed-off-by: Luis Chamberlain Acked-by: Song Liu commit 525f23fe58b59b3a78a7044916aed9fe26918296 Author: Luis Chamberlain Date: Thu Mar 2 12:46:08 2023 -0800 hv: simplify sysctl registration register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl() can do the directory creation for you so just use that. Signed-off-by: Luis Chamberlain Reviewed-by: Michael Kelley Reviewed-by: Wei Liu commit ca674057f36bcc42eea3832b8de5d0582615a472 Author: Luis Chamberlain Date: Thu Mar 2 12:46:06 2023 -0800 scsi: simplify sysctl registration with register_sysctl() register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl() can do the directory creation for you so just use that. Signed-off-by: Luis Chamberlain commit adf11ea8725bd7874b4aec6990c5807abcd5a00d Author: Luis Chamberlain Date: Thu Mar 2 12:28:25 2023 -0800 csky: simplify alignment sysctl registration Using register_sysctl_paths() is only required if we are using leafs with entries but all we are doing is creates leafs with just one leaf and then entries and register_sysctl_init() works well with that already. The 555 permission is already retained by the new_dir() proc sysctl directory creator. Signed-off-by: Luis Chamberlain commit 02a6b455fb35d29620ceaa0ed053ae9846f875ca Author: Luis Chamberlain Date: Thu Mar 2 12:28:22 2023 -0800 seccomp: simplify sysctls with register_sysctl_init() register_sysctl_paths() is only needed if you have childs (directories) with entries. Just use register_sysctl_init() as it also does the kmemleak check for you. Acked-by: Kees Cook Signed-off-by: Luis Chamberlain commit 98cfeb8d540aa009cd5cb973def265b6c44afa00 Author: Luis Chamberlain Date: Thu Mar 2 12:28:21 2023 -0800 yama: simplfy sysctls with register_sysctl() register_sysctl_paths() is only need if you have directories with entries, simplify this by using register_sysctl(). Acked-by: Kees Cook Signed-off-by: Luis Chamberlain commit 5df5bdc3c4733a47a818576c13a7bfd0f0715124 Author: Luis Chamberlain Date: Thu Mar 2 12:28:20 2023 -0800 loadpin: simplify sysctls use with register_sysctl() register_sysctl_paths() is not required, we can just use register_sysctl() with the required path specified. Reviewed-by: John Johansen Acked-by: Kees Cook Signed-off-by: Luis Chamberlain commit 96200952abeb35c4407851bfcdcbc144cc0d027d Author: Luis Chamberlain Date: Thu Mar 2 12:28:19 2023 -0800 apparmor: simplify sysctls with register_sysctl_init() Using register_sysctl_paths() is really only needed if you have subdirectories with entries. We can use the simple register_sysctl() instead. Acked-by: John Johansen Reviewed-by: Georgia Garcia Signed-off-by: Luis Chamberlain commit 228b09de936395ddd740df3522ea35ae934830d8 Author: Luis Chamberlain Date: Thu Mar 2 12:28:18 2023 -0800 sysctl: clarify register_sysctl_init() base directory order Relatively new docs which I added which hinted the base directories needed to be created before is wrong, remove that incorrect comment. This has been hinted before by Eric twice already [0] [1], I had just not verified that until now. Now that I've verified that updates the docs to relax the context described. [0] https://lkml.kernel.org/r/875ys0azt8.fsf@email.froward.int.ebiederm.org [1] https://lkml.kernel.org/r/87ftbiud6s.fsf@x220.int.ebiederm.org Cc: stable@vger.kernel.org # v5.17 Cc: Christian Brauner Cc: Kefeng Wang Suggested-by: Eric W. Biederman Signed-off-by: Luis Chamberlain commit b2f56e5574eac0cf9e3dc382bef010298cb1f1e9 Author: Luis Chamberlain Date: Thu Mar 2 12:28:17 2023 -0800 proc_sysctl: move helper which creates required subdirectories Move the code which creates the subdirectories for a ctl table into a helper routine so to make it easier to review. Document the goal. This creates no functional changes. Reviewed-by: John Johansen Signed-off-by: Luis Chamberlain commit 67ff32289acad9ed338cd9f2351b44939e55163e Author: Luis Chamberlain Date: Thu Mar 2 12:28:16 2023 -0800 proc_sysctl: update docs for __register_sysctl_table() Update the docs for __register_sysctl_table() to make it clear no child entries can be passed. When the child is true these are non-leaf entries on the ctl table and sysctl treats these as directories. The point to __register_sysctl_table() is to deal only with directories not part of the ctl table where thay may riside, to be simple and avoid recursion. While at it, hint towards using long on extra1 and extra2 later. Cc: stable@vger.kernel.org # v5.17 Cc: Christian Brauner Cc: Kefeng Wang Signed-off-by: Luis Chamberlain commit 8c5c2a4898e3d6bad86e29d471e023c8a19ba799 Author: Daniel Borkmann Date: Thu Apr 13 20:28:42 2023 +0200 bpf, sockmap: Revert buggy deadlock fix in the sockhash and sockmap syzbot reported a splat and bisected it to recent commit ed17aa92dc56 ("bpf, sockmap: fix deadlocks in the sockhash and sockmap"): [...] WARNING: CPU: 1 PID: 9280 at kernel/softirq.c:376 __local_bh_enable_ip+0xbe/0x130 kernel/softirq.c:376 Modules linked in: CPU: 1 PID: 9280 Comm: syz-executor.1 Not tainted 6.2.0-syzkaller-13249-gd319f344561d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023 RIP: 0010:__local_bh_enable_ip+0xbe/0x130 kernel/softirq.c:376 [...] Call Trace: spin_unlock_bh include/linux/spinlock.h:395 [inline] sock_map_del_link+0x2ea/0x510 net/core/sock_map.c:165 sock_map_unref+0xb0/0x1d0 net/core/sock_map.c:184 sock_hash_delete_elem+0x1ec/0x2a0 net/core/sock_map.c:945 map_delete_elem kernel/bpf/syscall.c:1536 [inline] __sys_bpf+0x2edc/0x53e0 kernel/bpf/syscall.c:5053 __do_sys_bpf kernel/bpf/syscall.c:5166 [inline] __se_sys_bpf kernel/bpf/syscall.c:5164 [inline] __x64_sys_bpf+0x79/0xc0 kernel/bpf/syscall.c:5164 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fe8f7c8c169 [...] Revert for now until we have a proper solution. Fixes: ed17aa92dc56 ("bpf, sockmap: fix deadlocks in the sockhash and sockmap") Reported-by: syzbot+49f6cef45247ff249498@syzkaller.appspotmail.com Cc: Hsin-Wei Hung Cc: Xin Liu Cc: John Fastabend Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/000000000000f1db9605f939720e@google.com/ commit afa351a15d80993f8ba6ae28652cc23127237e37 Merge: d8dab40a8b37f 81900e3a37750 Author: Daniel Vetter Date: Thu Apr 13 15:09:29 2023 +0200 Merge tag 'drm-intel-next-fixes-2023-04-13' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Just one Cc:stable fix for sampler indirect state in bindless heap. Signed-off-by: Daniel Vetter From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZDfxo+PXyw9ivFLI@jlahtine-mobl.ger.corp.intel.com commit 91db4fd9019a08251a500157cf0d88de457e1a96 Author: Shaopeng Tan Date: Thu Apr 13 16:22:59 2023 +0900 selftests/resctrl: Remove duplicate codes that clear each test result file Before exiting each test function(run_cmt/cat/mbm/mba_test()), test results("ok","not ok") are printed by ksft_test_result() and then temporary result files are cleaned by function cmt/cat/mbm/mba_test_cleanup(). However, before running ksft_test_result(), function cmt/cat/mbm/mba_test_cleanup() has been run in each test function as follows: cmt_resctrl_val() cat_perf_miss_val() mba_schemata_change() mbm_bw_change() Remove duplicate codes that clear each test result file, while ensuring cleanup properly even when errors occur in each test. Reviewed-by: Reinette Chatre Signed-off-by: Shaopeng Tan Signed-off-by: Shuah Khan commit 73c55fa5ab5539d38561b0d816be1315c8bf6752 Author: Shaopeng Tan Date: Thu Apr 13 16:22:58 2023 +0900 selftests/resctrl: Commonize the signal handler register/unregister for all tests After creating a child process with fork() in CAT test, if a signal such as SIGINT is received, the parent process will be terminated immediately, and therefore the child process will not be killed and also resctrlfs is not unmounted. There is a signal handler registered in CMT/MBM/MBA tests, which kills child process, unmount resctrlfs, cleanups result files, etc., if a signal such as SIGINT is received. Commonize the signal handler registered for CMT/MBM/MBA tests and reuse it in CAT. To reuse the signal handler to kill child process use global bm_pid instead of local bm_pid. Also, since the MBA/MBA/CMT/CAT are run in order, unregister the signal handler at the end of each test so that the signal handler cannot be inherited by other tests. Reviewed-by: Ilpo Jarvinen Reviewed-by: Reinette Chatre Signed-off-by: Shaopeng Tan Signed-off-by: Shuah Khan commit 39e34ddc382b33c9b784805ca9d83927093eb4af Author: Shaopeng Tan Date: Thu Apr 13 16:22:57 2023 +0900 selftests/resctrl: Cleanup properly when an error occurs in CAT test After creating a child process with fork() in CAT test, if an error occurs when parent process runs cat_val() or check_results(), the child process will not be killed and also resctrlfs is not unmounted. Also if an error occurs when child process runs cat_val() or check_results(), the parent process will wait for the pipe message from the child process which will never be sent by the child process and the parent process cannot proceed to unmount resctrlfs. Synchronize the exits between the parent and child. An error could occur whether in parent process or child process. The parent process always kills the child process and runs umount_resctrlfs(). The child process always waits to be killed by the parent process. Reviewed-by: Reinette Chatre Signed-off-by: Shaopeng Tan Signed-off-by: Shuah Khan commit a080b6e74b241dbc7e13dd378d6f6fc884579196 Author: Shaopeng Tan Date: Thu Apr 13 16:22:56 2023 +0900 selftests/resctrl: Flush stdout file buffer before executing fork() When a process has buffered output, a child process created by fork() will also copy buffered output. When using kselftest framework, the output (resctrl test result message) will be printed multiple times. Add fflush() to flush out the buffered output before executing fork(). Reviewed-by: Shuah Khan Reviewed-by: Reinette Chatre Signed-off-by: Shaopeng Tan Signed-off-by: Shuah Khan commit 1e359b6a9422a2bdef14798d539e9d5783bdd5c1 Author: Shaopeng Tan Date: Thu Apr 13 16:22:55 2023 +0900 selftests/resctrl: Return MBA check result and make it to output message Since MBA check result is not returned, the MBA test result message is always output as "ok" regardless of whether the MBA check result is true or false. Make output message to be "not ok" if MBA check result is failed. Reviewed-by: Shuah Khan Reviewed-by: Reinette Chatre Signed-off-by: Shaopeng Tan Signed-off-by: Shuah Khan commit 42e3b093eb7c8de823d15f7fa674a99ab8edf1ff Author: Shaopeng Tan Date: Thu Apr 13 16:22:54 2023 +0900 selftests/resctrl: Fix set up schemata with 100% allocation on first run in MBM test There is a comment "Set up shemata with 100% allocation on the first run" in function mbm_setup(), but there is an increment bug and the condition "num_of_runs == 0" will never be met and write_schemata() will never be called to set schemata to 100%. Even if write_schemata() is called in MBM test, since it is not supported for MBM test it does not set the schemata. This is currently fine because resctrl_val_parm->mum_resctrlfs is always 1 and umount/mount will be run in each test to set the schemata to 100%. To support the usage when MBM test does not unmount/remount resctrl filesystem before the test starts, fix to call write_schemata() and set schemata properly when the function is called for the first time. Also, remove static local variable 'num_of_runs' because this is not needed as there is resctrl_val_param->num_of_runs which should be used instead like in cat_setup(). Reviewed-by: Reinette Chatre Signed-off-by: Shaopeng Tan Signed-off-by: Shuah Khan commit c2b1790747a518f81071b44f31375d668e5b4b03 Author: Peter Newman Date: Thu Mar 9 15:57:57 2023 +0100 selftests/resctrl: Use correct exit code when tests fail Use ksft_finished() after running tests so that resctrl_tests doesn't return exit code 0 when tests fail. Consequently, report the MBA and MBM tests as skipped when running on non-Intel hardware, otherwise resctrl_tests will exit with a failure code. Signed-off-by: Peter Newman Reviewed-by: Shaopeng Tan Tested-by: Shaopeng Tan Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit 9496fffcb28f39e0352779a0199b6e61861c9221 Author: Uwe Kleine-König Date: Thu Apr 6 10:23:54 2023 +0200 i2c: omap: Improve error reporting for problems during .remove() If pm_runtime_get() fails in .remove() the driver used to return the error to the driver core. The only effect of this (compared to returning zero) is a generic warning that the error value is ignored. So emit a better warning and return zero to suppress the generic (and little helpful) message. Also disable runtime PM in the error case. This prepares changing platform device remove callbacks to return void. Signed-off-by: Uwe Kleine-König Reviewed-by: Tony Lindgren Signed-off-by: Wolfram Sang commit 0cbc9a2c62d2674b078d84e8f40445d755b94c30 Author: Lars-Peter Clausen Date: Thu Apr 6 08:48:34 2023 -0700 i2c: cadence: Add reset controller support The Cadence I2C controller has an external reset signal that needs to be de-asserted before the I2C controller can be used. Add support to the driver to be able to take the peripheral out of reset using the reset controller API. The reset is optional in the driver for compatibility to systems where the reset managed by the bootloader. Signed-off-by: Lars-Peter Clausen Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit 8455460914b98fba260786e174f8d645aa3d21aa Author: Lars-Peter Clausen Date: Thu Apr 6 08:48:33 2023 -0700 dt-bindings: i2c: cadence: Document `resets` property The Cadence I2C controller has an external reset that needs to be de-asserted before the I2C controller can be accessed. Document the `resets` devicetree property that can be used to describe how the reset signal is connected. While the reset signal will always be present in hardware the devicetree property is kept optional for backwards compatibility with existing systems that do not specify the reset property and where the reset signal might not be controlled by operating system. Signed-off-by: Lars-Peter Clausen Acked-by: Krzysztof Kozlowski Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit f82fd1845d309407a6ddc3a1c97c6088189c3a58 Author: Daniel Golle Date: Mon Apr 10 17:19:38 2023 +0100 i2c: mediatek: add support for MT7981 SoC Add support for the I2C units found in the MediaTek MT7981 and MT7988 SoCs. Just like other recent MediaTek I2C units that also uses v3 register offsets (which differ from v2 only by OFFSET_SLAVE_ADDR being 0x94 instead of 0x4). Signed-off-by: Daniel Golle Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Alexandre Mergnat Signed-off-by: Wolfram Sang commit 4b5256571951eaa581fb8169e8c460429948d208 Author: Daniel Golle Date: Mon Apr 10 17:19:21 2023 +0100 dt-bindings: i2c: i2c-mt65xx: add MediaTek MT7981 SoC Add compatible string for the I2C controllers found in the MediaTek MT7981 SoC. Signed-off-by: Daniel Golle Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Wolfram Sang commit e20985a79643c701cae3a527b584b3722c53d951 Author: Heiko Carstens Date: Tue Apr 11 11:18:59 2023 +0200 s390/cio: replace zero-length array with flexible-array member There are numerous patches which convert zero-length arrays with a flexible-array member. Convert the remaining s390 occurrences. Suggested-by: Gustavo A. R. Silva Link: https://github.com/KSPP/linux/issues/78 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 469c701db198227c2354b7c37f2c73dbfee5e065 Author: Heiko Carstens Date: Tue Apr 11 11:17:42 2023 +0200 s390/sclp: replace zero-length array with flexible-array member There are numerous patches which convert zero-length arrays with a flexible-array member. Convert the remaining s390 occurrences. Suggested-by: Gustavo A. R. Silva Link: https://github.com/KSPP/linux/issues/78 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit ca1382eafae50377088772d6c485ab6b89da2e56 Author: Heiko Carstens Date: Tue Apr 11 11:13:01 2023 +0200 s390/debug: replace zero-length array with flexible-array member There are numerous patches which convert zero-length arrays with a flexible-array member. Convert the remaining s390 occurrences. Suggested-by: Gustavo A. R. Silva Link: https://github.com/KSPP/linux/issues/78 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 6ca87bc4c8eee464cc13259aaf6881d8df3f86f9 Author: Gustavo A. R. Silva Date: Thu Apr 6 08:29:35 2023 -0600 s390/fcx: replace zero-length array with flexible-array member Zero-length arrays are deprecated [1] and have to be replaced by C99 flexible-array members. This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help to make progress towards globally enabling -fstrict-flex-arrays=3 [2] Link: https://github.com/KSPP/linux/issues/78 [1] Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/ZC7XT5prvoE4Yunm@work Signed-off-by: Vasily Gorbik commit 3071e9b39106e1b9576584a372f446c23b258e3f Author: Gustavo A. R. Silva Date: Thu Apr 6 08:28:42 2023 -0600 s390/diag: replace zero-length array with flexible-array member Zero-length arrays are deprecated [1] and have to be replaced by C99 flexible-array members. This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help to make progress towards globally enabling -fstrict-flex-arrays=3 [2] Link: https://github.com/KSPP/linux/issues/78 [1] Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/ZC7XGpUtVhqlRLhH@work Signed-off-by: Vasily Gorbik commit 81e8479649853ffafc714aca4a9c0262efd3160a Author: Heiko Carstens Date: Thu Apr 6 13:31:29 2023 +0200 s390/mm: fix direct map accounting Commit bb1520d581a3 ("s390/mm: start kernel with DAT enabled") did not implement direct map accounting in the early page table setup code. In result the reported values are bogus now: $cat /proc/meminfo ... DirectMap4k: 5120 kB DirectMap1M: 18446744073709546496 kB DirectMap2G: 0 kB Fix this by adding the missing accounting. The result looks sane again: $cat /proc/meminfo ... DirectMap4k: 6156 kB DirectMap1M: 2091008 kB DirectMap2G: 6291456 kB Fixes: bb1520d581a3 ("s390/mm: start kernel with DAT enabled") Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 07fdd6627f7f9c72ed68d531653b56df81da9996 Author: Heiko Carstens Date: Thu Apr 6 13:31:28 2023 +0200 s390/mm: rename POPULATE_ONE2ONE to POPULATE_DIRECT Architectures generally use the "direct map" wording for mapping the whole physical memory. Use that wording as well in arch/s390/boot/vmem.c, instead of "one to one" in order to avoid confusion. This also matches what is already done in arch/s390/mm/vmem.c. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit d24e18ef7e13c9cd580ebee771f7ccb9d3f6ee42 Author: Marc Hartmayer Date: Mon Jan 31 13:22:31 2022 +0000 s390/boot: improve install.sh script Use proper quoting for the variables and explicitly distinguish between command options and positional arguments. Acked-by: Heiko Carstens Signed-off-by: Marc Hartmayer Signed-off-by: Vasily Gorbik commit c01f2a5fe4e3df4ab846fcba5435ca9fdee4f583 Author: Thomas Richter Date: Fri Feb 24 09:01:51 2023 +0100 s390/cpum_cf: simplify pr_err() statement in cpumf_pmu_enable/disable Simplify pr_err() statement into one line and omit return statement. No functional change. Signed-off-by: Thomas Richter Acked-by: Sumanth Korikkar Signed-off-by: Vasily Gorbik commit b3e0423c4e76b19f04799e01b6443949f5fecbbc Author: Vasily Gorbik Date: Wed Mar 15 13:54:14 2023 +0100 s390/kaslr: randomize amode31 base address When the KASLR is enabled, randomize the base address of the amode31 image within the first 2 GB, similar to the approach taken for the vmlinux image. This makes it harder to predict the location of amode31 data and code. Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik commit 6e259bc5a15ec49693fa3d19fdd4511f7679a20d Author: Vasily Gorbik Date: Tue Feb 21 23:08:42 2023 +0100 s390/kaslr: generalize and improve random base distribution Improve the distribution algorithm of random base address to ensure a uniformity among all suitable addresses. To generate a random value once, and to build a continuous range in which every value is suitable, count all the suitable addresses (referred to as positions) that can be used as a base address. The positions are counted by iterating over the usable memory ranges. For each range that is big enough to accommodate the image, count all the suitable addresses where the image can be placed, while taking reserved memory ranges into consideration. A new function "iterate_valid_positions()" has dual purpose. Firstly, it is called to count the positions in a given memory range, and secondly, to convert a random position back to an address. "get_random_base()" has been replaced with more generic "randomize_within_range()" which now could be called for randomizing base addresses not just for the kernel image. Acked-by: Alexander Gordeev Signed-off-by: Vasily Gorbik commit 898435203c115b164b96f30be7d9c790bbb50338 Author: Vasily Gorbik Date: Wed Mar 15 11:00:19 2023 +0100 s390/boot: pin amode31 default lma The special amode31 part of the kernel must always remain below 2Gb. Place it just under vmlinux.default_lma by default, which makes it easier to debug amode31 as its default lma is known 0x10000 - 0x3000 (currently, amode31's size is 3 pages). This location is always available as it is originally occupied by the vmlinux archive. Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik commit a1d2d9cbaf0512451471705264bee7b3f50d4c29 Author: Vasily Gorbik Date: Wed Mar 15 10:19:57 2023 +0100 s390/boot: do not change default_lma The current modification of the default_lma is illogical and should be avoided. It would be more appropriate to introduce and utilize a new variable vmlinux_lma instead, so that default_lma remains unchanged and at its original "default" value of 0x100000. Signed-off-by: Vasily Gorbik commit 26300860c2be489fa8c919e55fba28fa782cbb1e Author: Thomas Richter Date: Fri Mar 31 11:42:20 2023 +0200 s390/cpum_cf: remove unnecessary copy_from_user call Struct s390_ctrset_read userdata is filled by ioctl_read operation using put_user/copy_to_user. However, the ctrset->data value access is not performed anywhere during the ioctl_read operation. Remove unnecessary copy_from_user() call. No functional change. Signed-off-by: Thomas Richter Suggested-by: Sumanth Korikkar Acked-by: Sumanth Korikkar Signed-off-by: Vasily Gorbik commit 3cdf0269cdc2c4728b71af4199823b6284379d42 Author: Thomas Richter Date: Fri Feb 24 08:55:21 2023 +0100 s390/cpum_cf: log bad return code of function cfset_all_copy When function cfset_all_copy() fails, also log the bad return code in the debug statement (when turned on). No functional change Signed-off-by: Thomas Richter Acked-by: Sumanth Korikkar Signed-off-by: Vasily Gorbik commit 1707c1165283a9634717971f17692535c21ab0eb Author: Heiko Carstens Date: Sun Apr 2 20:55:21 2023 +0200 s390/module: create module allocations without exec permissions This is the s390 variant of commit 7dfac3c5f40e ("arm64: module: create module allocations without exec permissions"): "The core code manages the executable permissions of code regions of modules explicitly. It is no longer necessary to create the module vmalloc regions with RWX permissions. So create them with RW- permissions instead, which is preferred from a security perspective." Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7c7ab788c0959c363b5cb2ac5ff4822fc12ccba5 Author: Heiko Carstens Date: Sun Apr 2 20:55:19 2023 +0200 s390/ftrace: do not assume module_alloc() returns executable memory The ftrace code assumes at two places that module_alloc() returns executable memory. While this is currently true, this will be changed with a subsequent patch to follow other architectures which implement ARCH_HAS_STRICT_MODULE_RWX. Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit f9b2d96c4fa4475929e26cbac4027801d93c6e53 Author: Heiko Carstens Date: Sun Apr 2 20:55:18 2023 +0200 s390/mm: use set_memory_*() helpers instead of open coding Given that set_memory_rox() and set_memory_rwnx() exist, it is possible to get rid of all open coded __set_memory() usages and replace them with proper helper calls everywhere. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit f0a2a7c527849bf1b112a43f0b8d0658a7b4e6ec Author: Heiko Carstens Date: Sun Apr 2 20:55:17 2023 +0200 s390/mm: implement set_memory_rwnx() Given that set_memory_rox() is implemented, provide also set_memory_rwnx(). This allows to get rid of all open coded __set_memory() usages in s390 architecture code. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 22e99fa56443f19b96e2e888854bfc202dd97069 Author: Heiko Carstens Date: Sun Apr 2 20:55:16 2023 +0200 s390/mm: implement set_memory_rox() Provide the s390 specific native set_memory_rox() implementation to avoid frequent set_memory_ro(); set_memory_x() call pairs. This is the s390 variant of commit 60463628c9e0 ("x86/mm: Implement native set_memory_rox()"). Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit bac30ea9ef80624dfe4bf20c0fc2073dcc771a87 Author: Nico Boehr Date: Fri Mar 10 12:52:37 2023 +0100 s390/ipl: fix physical-virtual confusion for diag308 Diag 308 subcodes expect a physical address as their parameter. This currently is not a bug, but in the future physical and virtual addresses might differ. Fix the confusion by doing a virtual-to-physical conversion in the exported diag308() and leave the assembly wrapper __diag308() alone. Note that several callers pass NULL as addr, so check for the case when NULL is passed and pass 0 to hardware since virt_to_phys(0) might be nonzero. Suggested-by: Marc Hartmayer Signed-off-by: Nico Boehr Signed-off-by: Vasily Gorbik commit 34644cc2e15a7a91ec36b496e218694d17371589 Author: Heiko Carstens Date: Fri Mar 31 15:03:23 2023 +0200 s390/kaslr: randomize module base load address Randomize the load address of modules in the kernel to make KASLR effective for modules. This is the s390 variant of commit e2b32e678513 ("x86, kaslr: randomize module base load address"). Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit bb87190c9d46c4285696e071d5972a534bb107cc Author: Heiko Carstens Date: Fri Mar 31 15:03:22 2023 +0200 s390/kaslr: provide kaslr_enabled() function Just like other architectures provide a kaslr_enabled() function, instead of directly accessing a global variable. Also pass the renamed __kaslr_enabled variable from the decompressor to the kernel, so that kalsr_enabled() is available there too. This will be used by a subsequent patch which randomizes the module base load address. Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 11018ef90ce73d9de8ac6e565c00cc8631b46328 Author: Heiko Carstens Date: Thu Mar 30 12:55:47 2023 +0200 s390/checksum: remove not needed uaccess.h include Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit e42ac7789df64120d7d3d57433dfc9f37ec0cb99 Author: Heiko Carstens Date: Thu Mar 30 12:55:46 2023 +0200 s390/checksum: always use cksm instruction Commit dfe843dce775 ("s390/checksum: support GENERIC_CSUM, enable it for KASAN") switched s390 to use the generic checksum functions, so that KASAN instrumentation also works checksum functions by avoiding architecture specific inline assemblies. There is however the problem that the generic csum_partial() function returns a 32 bit value with a 16 bit folded checksum, while the original s390 variant does not fold to 16 bit. This in turn causes that the ipib_checksum in lowcore contains different values depending on kernel config options. The ipib_checksum is used by system dumpers to verify if pointers in lowcore point to valid data. Verification is done by comparing checksum values. The system dumpers still use 32 bit checksum values which are not folded, and therefore the checksum verification fails (incorrectly). Symptom is that reboot after dump does not work anymore when a KASAN instrumented kernel is dumped. Fix this by not using the generic checksum implementation. Instead add an explicit kasan_check_read() so that KASAN knows about the read access from within the inline assembly. Reported-by: Alexander Egorenkov Fixes: dfe843dce775 ("s390/checksum: support GENERIC_CSUM, enable it for KASAN") Tested-by: Alexander Egorenkov Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 35903009dbde804a1565dc89e431c0f15179f054 Author: weiliang1503 Date: Thu Mar 30 19:56:38 2023 +0800 HID: Ignore battery for ELAN touchscreen on ROG Flow X13 GV301RA Ignore the reported battery level of the built-in touchscreen to suppress battery warnings when a stylus is used. The device ID was added and the battery ignore quirk was enabled. Signed-off-by: weiliang1503 Link: https://lore.kernel.org/r/20230330115638.16146-1-weiliang1503@gmail.com Signed-off-by: Benjamin Tissoires commit f4251e371d179e0009981e5f4619bfbdf893090e Author: Yangtao Li Date: Thu Apr 13 23:14:12 2023 +0800 quota: update Kconfig comment f2fs support quota since commit 0abd675e97e6 ("f2fs: support plain user/group quota"), let's document it. Signed-off-by: Yangtao Li Signed-off-by: Jan Kara Message-Id: <20230413151412.30059-1-frank.li@vivo.com> commit a2e20b29cf9ce6d2070a6e36666e2239f7f9625b Author: Christophe JAILLET Date: Thu Feb 2 21:23:24 2023 +0100 RDMA/irdma: Slightly optimize irdma_form_ah_cm_frame() There is no need to zero 'pktsize' bytes of 'buf', only the header needs to be cleared, to be safe. All the other bytes are already written with some memcpy() at the end of the function. Doing so also gives the opportunity to the compiler to avoid the memset() call. It can be inlined now that the length is known as compile time. Link: https://lore.kernel.org/r/098e3c397be0436f1867899245ecfe656c472110.1675369386.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Reviewed-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit a2654c1f640c4bbf72f5abc730e4d6ad90c4f025 Author: Thomas Weißschuh Date: Wed Feb 15 01:03:36 2023 +0000 HID: asus: explicitly include linux/leds.h Instead of relying on an accidental, transitive inclusion of linux/leds.h use it directly. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230215-power_supply-leds-hid-v1-3-35b6f1dcee8a@weissschuh.net Signed-off-by: Benjamin Tissoires commit 21c5bd5b4b0649b3d58eba56ff432ba3b34a50cd Author: Thomas Weißschuh Date: Wed Feb 15 01:03:35 2023 +0000 HID: lg-g15: explicitly include linux/leds.h Instead of relying on an accidental, transitive inclusion of linux/leds.h use it directly. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230215-power_supply-leds-hid-v1-2-35b6f1dcee8a@weissschuh.net Signed-off-by: Benjamin Tissoires commit f28bb5ce4f153d3a96c835b3a2751695cc9183dd Author: Thomas Weißschuh Date: Wed Feb 15 01:03:34 2023 +0000 HID: steelseries: explicitly include linux/leds.h Instead of relying on an accidental, transitive inclusion of linux/leds.h use it directly. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230215-power_supply-leds-hid-v1-1-35b6f1dcee8a@weissschuh.net Signed-off-by: Benjamin Tissoires commit 29e1ecc197d410ee59c8877098d54cf417075f7d Author: Alex Henrie Date: Mon Apr 3 20:48:29 2023 -0600 HID: apple: Set the tilde quirk flag on the Geyser 3 I was finally able to obtain a MacBook1,1 to test and I've now confirmed that it has the tilde key quirk as well: Product Model Year System CPU Shape Labels Country Quirky ============================================================================ 05ac:0218 A1181 2006 MacBook1,1 T2500 ISO British 13 Yes Signed-off-by: Alex Henrie Link: https://lore.kernel.org/r/20230404024829.13982-1-alexhenrie24@gmail.com Signed-off-by: Benjamin Tissoires commit 6c89c1160321725af1431bf6f365f3bfcb1f2350 Author: Thomas Weißschuh Date: Wed Feb 15 01:03:37 2023 +0000 HID: apple: explicitly include linux/leds.h Instead of relying on an accidental, transitive inclusion of linux/leds.h use it directly. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230215-power_supply-leds-hid-v1-4-35b6f1dcee8a@weissschuh.net Signed-off-by: Benjamin Tissoires commit ca6961d8a851f3720175f500be38fe9cee5a2c13 Author: Louis Morhet Date: Tue Apr 4 14:15:25 2023 +0200 HID: mcp2221: fix get and get_direction for gpio The mcp2221_raw_event retrieves the value and direction of gpio on the same command, by setting the value on mcp->status and the direction on mcp->gpio_dir; and the offset at which they are read is based on mcp->gp_idx, set by the gpiochip callbacks. However, the individual gpiochip calls set the index to look for directly on the field they want to track. This create a "double offset" in the final read in the response report. Align the behaviour of mcp2221_raw_event and mcp_gpio_get/mcp_gpio_get_direction by putting gp_idx on those calls to the base offset of the gpio status struct. Signed-off-by: Louis Morhet Link: https://lore.kernel.org/r/dd0b23800a79d2a464e1e9ed429b018b69fd5df2.1680602387.git.lmorhet@kalrayinc.com Signed-off-by: Benjamin Tissoires commit e36c31f8cac54d6d900d270078d6b33de74e1b0a Author: Louis Morhet Date: Tue Apr 4 14:15:14 2023 +0200 HID: mcp2221: fix report layout for gpio get The documentation of the component (section 3.1.12 GET GPIO VALUES) describes the hid report structure with two fields per gpio: its value, followed by its direction. However, the driver describes it with a wrong order: direction followed by value. Fix the structure representing the report answered by the chip to the GET GPIO VALUES command. Fixes commit 567b8e9fed8a ("HID: mcp2221: Fix GPIO output handling") Signed-off-by: Louis Morhet Link: https://lore.kernel.org/r/945967fbab56d53f9630ad3844b64734f8c3107e.1680602387.git.lmorhet@kalrayinc.com Signed-off-by: Benjamin Tissoires commit 08a46b4190d345544d04ce4fe2e1844b772b8535 Author: Ping Cheng Date: Sun Apr 9 09:42:29 2023 -0700 HID: wacom: Set a default resolution for older tablets Some older tablets may not report physical maximum for X/Y coordinates. Set a default to prevent undefined resolution. Signed-off-by: Ping Cheng Link: https://lore.kernel.org/r/20230409164229.29777-1-ping.cheng@wacom.com Signed-off-by: Benjamin Tissoires commit d00800a289c9349bb659a698cbd7bc04521dc927 Author: Johannes Berg Date: Fri Mar 31 16:59:17 2023 +0200 wifi: mac80211: add flush_sta method Some drivers like iwlwifi might have per-STA queues, so we may want to flush/drop just those queues rather than all when removing a station. Add a separate method for that. Signed-off-by: Johannes Berg commit 0b75a1b1e42e07ae84e3a11d2368b418546e2bec Author: Johannes Berg Date: Fri Mar 31 16:59:16 2023 +0200 wifi: mac80211: flush queues on STA removal When we remove a station, we first make it unreachable, then we (must) remove its keys, and then remove the station itself. Depending on the hardware design, if we have hardware crypto at all, frames still sitting on hardware queues may then be transmitted without a valid key, possibly unencrypted or with a fixed key. Fix this by flushing the queues when removing stations so this cannot happen. Signed-off-by: Johannes Berg commit 2c9abe653bc5134eeab411c46dde008d8a1c37b0 Author: Johannes Berg Date: Fri Mar 31 16:59:08 2023 +0200 wifi: ieee80211: correctly mark FTM frames non-bufferable The checks of whether or not a frame is bufferable were not taking into account that some action frames aren't, such as FTM. Check this, which requires some changes to the function ieee80211_is_bufferable_mmpdu() since we need the whole skb for the checks now. Reviewed-by: Ilan Peer Signed-off-by: Johannes Berg commit 4fdeb847130229dc94befa241461669c7359776b Author: Johannes Berg Date: Fri Mar 31 16:59:07 2023 +0200 wifi: ieee80211: clean up public action codes WLAN_PUBLIC_ACTION_FTM_RESPONSE is duplicated with WLAN_PUB_ACTION_FTM, but that might better be called WLAN_PUB_ACTION_FTM_RESPONSE; clean up here. Signed-off-by: Johannes Berg commit 217f3c52f00d3419ecdd38a99a7eceecb11679b2 Author: Avraham Stern Date: Thu Apr 13 10:44:15 2023 +0300 wifi: iwlwifi: mvm: don't set CHECKSUM_COMPLETE for unsupported protocols On Bz devices, CHECKSUM_COMPLETE was set for unsupported protocols which results in a warning. Fix it. Fixes: b6f5b647f694 ("iwlwifi: mvm: handle RX checksum on Bz devices") Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413102635.a2a35286f0ca.I50daa9445a6465514c44f5096c32adef64beba5f@changeid Signed-off-by: Johannes Berg commit 277f56a141fc54ef7f9e09dba65fb2e12021411d Author: Avraham Stern Date: Thu Apr 13 10:44:14 2023 +0300 wifi: iwlwifi: trans: don't trigger d3 interrupt twice When the IPC registers are used for sleep control, setting the IPC sleep bit already triggers an interrupt to the fw, so there is no need to also set the doorbell. Setting also the doorbell triggers the sleep interrupt twice which lead to an assert. Fixes: af08571d3925 ("iwlwifi: pcie: support Bz suspend/resume trigger") Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413102635.b5f2f6e44d38.I4cb5b6ad4914db47a714e731c4c8b4db679cabce@changeid Signed-off-by: Johannes Berg commit 5caa82529eabff044c5f3eb254f3a7ff00e9170d Author: Mukesh Sisodiya Date: Thu Apr 13 10:44:13 2023 +0300 wifi: iwlwifi: Update configurations for Bnj-a0 and specific rf devices Correction in config data is done for loading the ucode. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413102635.879b654c8d83.I7dbea9f411a0b6f47908c4ad6321c7e55cbeb636@changeid Signed-off-by: Johannes Berg commit d2ccc5c1526396aef5196e4dd2ec8538994e5072 Author: Mukesh Sisodiya Date: Thu Apr 13 10:44:12 2023 +0300 wifi: iwlwifi: Update init sequence if tx diversity supported PHY configuration command need to be sent to FW if the tx diversity with SISO is supported. This need to be sent to get the init notification from FW. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413102635.c2121c8694a7.Ibee3dd8765ef4b7504660fa228a7c7eff78920af@changeid Signed-off-by: Johannes Berg commit e305a408c5f9c8df06a58e09a23375fd257f081c Author: Mukesh Sisodiya Date: Thu Apr 13 10:44:11 2023 +0300 wifi: iwlwifi: mvm: move function sequence Need to move a function definition and actual changes will be done in following commit. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413102635.00a6c203712f.I7c099e5c1954f1daa5a5039b98149b6f081e46ae@changeid Signed-off-by: Johannes Berg commit cb75abcebc458efe3b329372e0a57c15f7bdaee0 Author: Daniel Gabay Date: Thu Apr 13 10:44:10 2023 +0300 wifi: iwlwifi: nvm: Update HE capabilities on 6GHz band for EHT device Max A-MPDU length exponent shall be set to 2 for EHT capable device on 6GHz band in order to support 4MB aggregation. Update HE MAC capabilities accordingly for station and softap interfaces. This change requires to add another ieee80211_sband_iftype_data for uhb since high/uhb are no longer the same. Signed-off-by: Daniel Gabay Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413102635.1eee32cfd199.I9c5ff3a6956d509137deca620814935149516fbc@changeid Signed-off-by: Johannes Berg commit a0c8ab93eb3edf82511502be71a825f74b632137 Author: Johannes Berg Date: Thu Apr 13 10:44:09 2023 +0300 wifi: iwlwifi: mvm: refactor TX csum mode check There are two modes now, and we have two places checking that must be in sync. Refactor the logic into a new small helper function. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413102635.ef6246f4b73b.I44820ec095634dd0bba3007465cf25e4ce1c77c6@changeid Signed-off-by: Johannes Berg commit d34d11aea2d5d71a66f2f90507c3f7202b964175 Author: Johannes Berg Date: Thu Apr 13 10:44:08 2023 +0300 wifi: iwlwifi: mvm: fix A-MSDU checks Since Gl A-step devices use the old checksum hardware, we shouldn't use the Bz code to check for A-MSDU combining ability; fix that. Fixes: ec18e7d4d20d ("wifi: iwlwifi: mvm: use old checksum for Bz A-step") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413102635.8c445b943fee.Ibf772102ca712f59e2ee0cdd4c344011fcf445aa@changeid Signed-off-by: Johannes Berg commit 72429d68a0e88a1a19bbc61ed4c35a3b6baba628 Author: Golan Ben Ami Date: Thu Apr 13 10:44:07 2023 +0300 wifi: iwlwifi: mvm: enable bz hw checksum from c step B step doesn't support full checksum yet, move to c step. Signed-off-by: Golan Ben Ami Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413102635.697a9d74e84d.I6724874112692a04e29287cac9dad7140532557f@changeid Signed-off-by: Johannes Berg commit 4e17e156051be8c2223af7bc0267fb3d325d277d Author: Avraham Stern Date: Thu Apr 13 10:44:06 2023 +0300 wifi: iwlwifi: mvm: use OFDM rate if IEEE80211_TX_CTL_NO_CCK_RATE is set IEEE80211_TX_CTL_NO_CCK_RATE indicates that CCK rates should not be used, but is ignored by the driver. Fix it. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413102635.a322d18b5eb1.Icc46027a03f90feffb6fab49a5d82e54829d3dd9@changeid Signed-off-by: Johannes Berg commit 925c6a40e31db33ae22f35cd866786d3164481ac Author: Johannes Berg Date: Thu Apr 13 10:44:05 2023 +0300 wifi: iwlwifi: mvm: convert TID to FW value on queue remove On queue remove, we should convert the TID value to the firmware value (8 -> 15) just like we do on queue add. Otherwise, the firmware will not be able to find the correct queue to remove. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413102635.6651077eaec3.Ia6868c8fc1a92063609bb057b6a618726712d0bb@changeid Signed-off-by: Johannes Berg commit 0aa27be59e01591a2f5b11fc97fd395dad63c5d3 Author: Mukesh Sisodiya Date: Thu Apr 13 10:44:04 2023 +0300 wifi: iwlwifi: Update configuration for SO,SOF MAC and HR RF update the device configuration for HR1 device for SO and SOF device. QuZ device configuration is corrected to support specific CRF. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413102635.86f08520323f.Ieccb50de47f877b85732000a0d67b645eeeb0c2a@changeid Signed-off-by: Johannes Berg commit 413be839bfca9a4f6b32b92807ecdc2c2c182d94 Author: Miri Korenblit Date: Thu Apr 13 10:44:03 2023 +0300 wifi: iwlwifi: add a validity check of queue_id in iwl_txq_reclaim This function receives the queue id to reclaim packets from. Currently we're passing to it the queue id we received from the FW in the flush response. We don't do any check of this value and it might be invalid. In such case we will refer to a pointer to a queue which might be NULL. Fix this by adding a validity check of the queue id before using it. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413102635.a9c3fd32bce7.I5fbdcf3b1b80eb96a907116c166f19dc0aae7cb8@changeid Signed-off-by: Johannes Berg commit 0cc6fb8a0c360de23606d013eb029a8c3e78bcc8 Author: Johannes Berg Date: Thu Apr 13 10:44:02 2023 +0300 wifi: iwlwifi: nvm-parse: enable 160/320 MHz for AP mode Initially, 160/320 MHz in AP mode were not supported. After testing, enable the wider bandwidths in AP mode as well. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413102635.ed04de3a2833.Ie3991179dfaf24880b96a0904a625dbf6b8fd579@changeid Signed-off-by: Johannes Berg commit 634c7b1bd08ca322537ab389f8cbd7bb543b5e45 Author: Johannes Berg Date: Thu Apr 13 10:44:01 2023 +0300 wifi: iwlwifi: debug: fix crash in __iwl_err() In __iwl_err(), if we rate-limit the message away, then vaf.va is still NULL-initialized by the time we get to the tracing code, which then crashes. When it doesn't get rate-limited out, it's still wrong to reuse the old args2 that was already printed, which is why we bother making a copy in the first place. Assign vaf.va properly to fix this. Fixes: e5f1cc98cc1b ("iwlwifi: allow rate-limited error messages") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230413102635.e27134c6bcd4.Ib3894cd2ba7a5ad5e75912a7634f146ceaa569e2@changeid Signed-off-by: Johannes Berg commit 2be404486c05980371b293ea5ff4b3fde70cedae Author: Hans de Goede Date: Thu Apr 13 11:36:25 2023 +0200 HID: i2c-hid-of: Add reset GPIO support to i2c-hid-of Add reset GPIO support to the generic i2c-hid-of driver This is necessary to make the Wacom digitizer on the Lenovo Yoga Book 1 (yb1-x90f/l) work and this will also allow consolidating the 2 specialized i2c-hid-of-elan.c and i2c-hid-of-goodix.c drivers into the generic i2c-hid-of driver. For now the new "post-reset-deassert-delay-ms" property is only used on x86/ACPI (non devicetree) devs. IOW it is not used in actual devicetree files and the same goes for the reset GPIO. The devicetree-bindings maintainers have requested properties like these to not be added to the devicetree-bindings, so the new property + GPIO are deliberately not added to the existing devicetree-bindings. Signed-off-by: Hans de Goede Reviewed-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20230413093625.71146-4-hdegoede@redhat.com Signed-off-by: Benjamin Tissoires commit 728ec8b6eda8f61dfeb2a4154e90c134d307e1de Author: Hans de Goede Date: Thu Apr 13 11:36:24 2023 +0200 HID: i2c-hid-of: Allow using i2c-hid-of on non OF platforms There are some x86 tablets / 2-in-1s which ship with Android as their factory OS image. These have pretty broken ACPI tables, relying on everything being hardcoded in the factory kernel image. platform/x86/x86-android-tablets.c manually instantiates i2c-clients for i2c devices on these tablets to make them work with the mainline kernel. The Lenovo Yoga Book 1 (yb1-x90f/l) is such a 2-in-1. It has 2 I2C-HID devices its main touchscreen and a Wacom digitizer. Its main touchscreen can alternatively also be used in HiDeep's native protocol mode but for the Wacom digitizer we really need I2C-HID. This patch allows using i2c-hid-of on non OF platforms so that it can bind to a non ACPI instantiated i2c_client on x86 for the Wacom digitizer. Note the driver already has an "i2c-over-hid" i2c_device_id (rather then an of_device_id). Besides enabling building on non-OF platforms this also replaces the only of_property_read_u32() call with device_property_read_u32() note that other properties where already read using device_property_read_...(). Signed-off-by: Hans de Goede Reviewed-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20230413093625.71146-3-hdegoede@redhat.com Signed-off-by: Benjamin Tissoires commit 9d793e7c1f884637c3bcd932b7a6ec9d976dccfb Author: Hans de Goede Date: Thu Apr 13 11:36:23 2023 +0200 HID: i2c-hid-of: Consistenly use dev local variable in probe() i2c_hid_of_probe() has a dev local variable pointing to &i2c_client->dev, consistently use this everywhere in i2c_hid_of_probe(). Signed-off-by: Hans de Goede Reviewed-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20230413093625.71146-2-hdegoede@redhat.com Signed-off-by: Benjamin Tissoires commit 0f6fac2cfbefa1d891389104af46e54c982b1c7a Author: David Yang Date: Wed Apr 12 01:33:08 2023 +0800 HID: kye: Fix rdesc for kye tablets I forget to add them in previous commit 2dd438cdc2e9 ("HID: kye: Add support for all kye tablets"). Signed-off-by: David Yang Link: https://lore.kernel.org/r/20230411173308.422756-1-mmyangfl@gmail.com Signed-off-by: Benjamin Tissoires commit 4bd763568dbdafdf7cd6b3fcc73f84f1a6f305d1 Author: Basavaraj Natikar Date: Tue Apr 11 21:49:01 2023 +0530 HID: amd_sfh: Support for additional light sensor There is support for additional light sensors in the SFH firmware. As a result, add support for additional light sensors. Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina commit 8455cbb25927013b3417ab619dced1c0e87708af Author: Basavaraj Natikar Date: Tue Apr 11 21:40:30 2023 +0530 HID: amd_sfh: Handle "no sensors" enabled for SFH1.1 Based on num_hid_devices, each sensor device is initialized. If "no sensors" is initialized, amd_sfh work initialization and scheduling doesn’t make sense and returns EOPNOTSUPP to stop driver probe. Hence, add a check for "no sensors" enabled to handle the special case. Fixes: 93ce5e0231d7 ("HID: amd_sfh: Implement SFH1.1 functionality") Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina commit 571dc8f59dd477037bb5a029e8d1b5a4a4d9dd63 Author: Basavaraj Natikar Date: Tue Apr 11 21:40:29 2023 +0530 HID: amd_sfh: Increase sensor command timeout for SFH1.1 The initialization of SFH1.1 sensors may take some time. Hence, increase sensor command timeouts in order to obtain status responses within a maximum timeout. Fixes: 93ce5e0231d7 ("HID: amd_sfh: Implement SFH1.1 functionality") Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina commit 82c2a0d137794f5ef47982231593a00aee26ce3b Author: Basavaraj Natikar Date: Tue Apr 11 21:40:28 2023 +0530 HID: amd_sfh: Correct the stop all command Misinterpreted the stop all command in SHF1.1 firmware. Therefore, it is necessary to update the stop all command accordingly to disable all sensors. Fixes: 93ce5e0231d7 ("HID: amd_sfh: Implement SFH1.1 functionality") Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina commit 1353ecaf1830d6d1b74f3225378a9498b4e14fdd Author: Basavaraj Natikar Date: Tue Apr 11 21:40:27 2023 +0530 HID: amd_sfh: Add support for shutdown operation As soon as the system is booted after shutdown, the sensors may remain in a weird state and fail to initialize. Therefore, all sensors should be turned off during shutdown. Fixes: 4f567b9f8141 ("SFH: PCIe driver to add support of AMD sensor fusion hub") Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina commit a33e5e393171ae8384d3381db5cd159ba877cfcb Author: Basavaraj Natikar Date: Tue Apr 11 21:40:26 2023 +0530 HID: amd_sfh: Fix illuminance value Illuminance value is actually 32 bits, but is incorrectly trancated to 16 bits. Hence convert to integer illuminace accordingly to reflect correct values. Fixes: 93ce5e0231d7 ("HID: amd_sfh: Implement SFH1.1 functionality") Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina commit 0b9255bf11baa61cd526e6bd24d6c8e6d1eabf8d Author: Basavaraj Natikar Date: Tue Apr 11 21:40:25 2023 +0530 HID: amd_sfh: Correct the sensor enable and disable command In order to start or stop sensors, the firmware command needs to be changed to add an additional default subcommand value. For this reason, add a subcommand value to enable or disable sensors accordingly. Fixes: 93ce5e0231d7 ("HID: amd_sfh: Implement SFH1.1 functionality") Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina commit 7e7fdab79899f62de39c9280fb78f3d3b02ac207 Author: Basavaraj Natikar Date: Tue Apr 11 21:40:24 2023 +0530 HID: amd_sfh: Correct the structure fields Misinterpreted sfh_cmd_base structure member fields. Therefore, adjust the structure member fields accordingly to reflect functionality. Fixes: 93ce5e0231d7 ("HID: amd_sfh: Implement SFH1.1 functionality") Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina commit bb4c19e030f45c5416f1eb4daa94fbaf7165e9ea Author: Akinobu Mita Date: Mon Mar 27 23:37:33 2023 +0900 block: null_blk: make fault-injection dynamically configurable per device The null_blk driver has multiple driver-specific fault injection mechanisms. Each fault injection configuration can only be specified by a module parameter and cannot be reconfigured without reloading the driver. Also, each configuration is common to all devices and is initialized every time a new device is added. This change adds the following subdirectories for each null_blk device. /sys/kernel/config/nullb//timeout_inject /sys/kernel/config/nullb//requeue_inject /sys/kernel/config/nullb//init_hctx_fault_inject Each fault injection attribute can be dynamically set per device by a corresponding file in these directories. Signed-off-by: Akinobu Mita Link: https://lore.kernel.org/r/20230327143733.14599-3-akinobu.mita@gmail.com Signed-off-by: Jens Axboe commit 4668c7a2940d134bea50058e138591b97485c5da Author: Akinobu Mita Date: Mon Mar 27 23:37:32 2023 +0900 fault-inject: allow configuration via configfs This provides a helper function to allow configuration of fault-injection for configfs-based drivers. The config items created by this function have the same interface as the one created under debugfs by fault_create_debugfs_attr(). Signed-off-by: Akinobu Mita Link: https://lore.kernel.org/r/20230327143733.14599-2-akinobu.mita@gmail.com Signed-off-by: Jens Axboe commit a6610435ac17de1ac727c90ad62c723d86c7ea36 Author: Marc Zyngier Date: Thu Apr 13 14:23:42 2023 +0100 KVM: arm64: Handle 32bit CNTPCTSS traps When CNTPOFF isn't implemented and that we have a non-zero counter offset, CNTPCT and CNTPCTSS are trapped. We properly handle the former, but not the latter, as it is not present in the sysreg table (despite being actually handled in the code). Bummer. Just populate the cp15_64 table with the missing register. Reported-by: Reiji Watanabe Signed-off-by: Marc Zyngier commit 23acb14af1914010dd0aae1bbb7fab28bf518b8e Author: Hao Zeng Date: Tue Apr 11 16:43:49 2023 +0800 samples/bpf: Fix fout leak in hbm's run_bpf_prog Fix fout being fopen'ed but then not subsequently fclose'd. In the affected branch, fout is otherwise going out of scope. Signed-off-by: Hao Zeng Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230411084349.1999628-1-zenghao@kylinos.cn commit 1ba83f505c53d35eda892ac7f108ef1189da6fa8 Author: Kal Conley Date: Tue Apr 11 15:00:25 2023 +0200 xsk: Elide base_addr comparison in xp_unaligned_validate_desc Remove redundant (base_addr >= pool->addrs_cnt) comparison from the conditional. In particular, addr is computed as: addr = base_addr + offset ... where base_addr and offset are stored as 48-bit and 16-bit unsigned integers, respectively. The above sum cannot overflow u64 since base_addr has a maximum value of 0x0000ffffffffffff and offset has a maximum value of 0xffff (implying a maximum sum of 0x000100000000fffe). Since overflow is impossible, it follows that addr >= base_addr. Now if (base_addr >= pool->addrs_cnt), then clearly: addr >= base_addr >= pool->addrs_cnt Thus, (base_addr >= pool->addrs_cnt) implies (addr >= pool->addrs_cnt). Subsequently, the former comparison is unnecessary in the conditional since for any boolean expressions A and B, (A || B) && (A -> B) is equivalent to B. Signed-off-by: Kal Conley Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20230411130025.19704-1-kal.conley@dectris.com commit 4d5bba5bee0aa002523125e51789e95d47794a06 Author: Christoph Hellwig Date: Thu Apr 13 08:06:51 2023 +0200 blk-mq: remove __blk_mq_run_hw_queue __blk_mq_run_hw_queue just contains a WARN_ON_ONCE for calls from interrupt context and a blk_mq_run_dispatch_ops-protected call to blk_mq_sched_dispatch_requests. Open code the call to blk_mq_sched_dispatch_requests in both callers, and move the WARN_ON_ONCE to blk_mq_run_hw_queue where it can be extended to all !async calls, while the other call is from workqueue context and thus obviously does not need the assert. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413060651.694656-6-hch@lst.de Signed-off-by: Jens Axboe commit 1aa8d875b523d61347a6887e4a4ab65a6d799d40 Author: Christoph Hellwig Date: Thu Apr 13 08:06:50 2023 +0200 blk-mq: move the !async handling out of __blk_mq_delay_run_hw_queue Only blk_mq_run_hw_queue can call __blk_mq_delay_run_hw_queue with async=false, so move the handling there. With this __blk_mq_delay_run_hw_queue can be merged into blk_mq_delay_run_hw_queue. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413060651.694656-5-hch@lst.de Signed-off-by: Jens Axboe commit cd735e11130d4c84a073e1056aa019ca0f3305f9 Author: Christoph Hellwig Date: Thu Apr 13 08:06:49 2023 +0200 blk-mq: move the blk_mq_hctx_stopped check in __blk_mq_delay_run_hw_queue For the in-context dispatch, blk_mq_hctx_stopped is alredy checked in blk_mq_sched_dispatch_requests under blk_mq_run_dispatch_ops() protection. For the async dispatch case having a check before scheduling the work still makes sense to avoid needless workqueue scheduling, so just keep it for that case. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413060651.694656-4-hch@lst.de Signed-off-by: Jens Axboe commit c20a1a2c1a9f5b1081121cd18be444e7610b0c6f Author: Christoph Hellwig Date: Thu Apr 13 08:06:48 2023 +0200 blk-mq: remove the blk_mq_hctx_stopped check in blk_mq_run_work_fn blk_mq_hctx_stopped is already checked in blk_mq_sched_dispatch_requests under blk_mq_run_dispatch_ops() protection, so remove the duplicate check. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413060651.694656-3-hch@lst.de Signed-off-by: Jens Axboe commit 89ea5ceb53d14f52ecbad8393be47f382c47c37d Author: Christoph Hellwig Date: Thu Apr 13 08:06:47 2023 +0200 blk-mq: cleanup __blk_mq_sched_dispatch_requests __blk_mq_sched_dispatch_requests currently has duplicated logic for the cases where requests are on the hctx dispatch list or not. Merge the two with a new need_dispatch variable and remove a few pointless local variables. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413060651.694656-2-hch@lst.de Signed-off-by: Jens Axboe commit 4099be372faf7b3616634dfe6994b81b1edf1906 Author: Andrii Nakryiko Date: Tue Apr 11 20:46:47 2023 -0700 selftests/bpf: Fix compiler warnings in bpf_testmod for kfuncs Add -Wmissing-prototypes ignore in bpf_testmod.c, similarly to what we do in kernel code proper. Reported-by: kernel test robot Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/oe-kbuild-all/202304080951.l14IDv3n-lkp@intel.com/ Link: https://lore.kernel.org/bpf/20230412034647.3968143-1-andrii@kernel.org commit b12e5c6c755ae8bec44723f77f037873e3d08021 Author: Christoph Hellwig Date: Thu Apr 13 08:40:57 2023 +0200 blk-mq: pass a flags argument to blk_mq_add_to_requeue_list Replace the boolean at_head argument with the same flags that are already passed to blk_mq_insert_request. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-21-hch@lst.de Signed-off-by: Jens Axboe commit 93fffe16f7ee18600f15838e2e8b5cf353f245c8 Author: Christoph Hellwig Date: Thu Apr 13 08:40:56 2023 +0200 blk-mq: pass a flags argument to elevator_type->insert_requests Instead of passing a bool at_head, pass down the full flags from the blk_mq_insert_request interface. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-20-hch@lst.de Signed-off-by: Jens Axboe commit 2b5976134bfbc753dec6281da0890c5f194c00c9 Author: Christoph Hellwig Date: Thu Apr 13 08:40:55 2023 +0200 blk-mq: pass a flags argument to blk_mq_request_bypass_insert Replace the boolean at_head argument with the same flags that are already passed to blk_mq_insert_request. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-19-hch@lst.de Signed-off-by: Jens Axboe commit 710fa3789ed94ceee9675f8e189aaf3e7525269a Author: Christoph Hellwig Date: Thu Apr 13 08:40:54 2023 +0200 blk-mq: pass a flags argument to blk_mq_insert_request Replace the at_head bool with a flags argument that so far only contains a single BLK_MQ_INSERT_AT_HEAD value. This makes it much easier to grep for head insertions into the blk-mq dispatch queues. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-18-hch@lst.de Signed-off-by: Jens Axboe commit 214a441805b8cc090930fb00193125e22466a95a Author: Christoph Hellwig Date: Thu Apr 13 08:40:53 2023 +0200 blk-mq: don't kick the requeue_list in blk_mq_add_to_requeue_list blk_mq_add_to_requeue_list takes a bool parameter to control how to kick the requeue list at the end of the function. Move the call to blk_mq_kick_requeue_list to the callers that want it instead. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-17-hch@lst.de Signed-off-by: Jens Axboe commit 2394395cd598f6404c57ae0b63afb5d37e94924d Author: Christoph Hellwig Date: Thu Apr 13 08:40:52 2023 +0200 blk-mq: don't run the hw_queue from blk_mq_request_bypass_insert blk_mq_request_bypass_insert takes a bool parameter to control how to run the queue at the end of the function. Move the blk_mq_run_hw_queue call to the callers that want it instead. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-16-hch@lst.de Signed-off-by: Jens Axboe commit f0dbe6e88e1bf4003ef778527b975ff60dbdd35a Author: Christoph Hellwig Date: Thu Apr 13 08:40:51 2023 +0200 blk-mq: don't run the hw_queue from blk_mq_insert_request blk_mq_insert_request takes two bool parameters to control how to run the queue at the end of the function. Move the blk_mq_run_hw_queue call to the callers that want it instead. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-15-hch@lst.de Signed-off-by: Jens Axboe commit e1f44ac0d7f48ec44a1eacfe637e545c408ede40 Author: Christoph Hellwig Date: Thu Apr 13 08:40:50 2023 +0200 blk-mq: fold __blk_mq_try_issue_directly into its two callers Due to the wildly different behavior based on the bypass_insert argument, not a whole lot of code in __blk_mq_try_issue_directly is actually shared between blk_mq_try_issue_directly and blk_mq_request_issue_directly. Remove __blk_mq_try_issue_directly and fold the code into the two callers instead. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-14-hch@lst.de Signed-off-by: Jens Axboe commit 2b71b8770710f2913e29053f01b6c7df1a5c7f75 Author: Christoph Hellwig Date: Thu Apr 13 08:40:49 2023 +0200 blk-mq: factor out a blk_mq_get_budget_and_tag helper Factor out a helper from __blk_mq_try_issue_directly in preparation of folding that function into its two callers. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-13-hch@lst.de Signed-off-by: Jens Axboe commit a1e948b81ad21d635b99c1284f945423cb02b4c4 Author: Christoph Hellwig Date: Thu Apr 13 08:40:48 2023 +0200 blk-mq: refactor the DONTPREP/SOFTBARRIER andling in blk_mq_requeue_work Split the RQF_DONTPREP and RQF_SOFTBARRIER in separate branches to make the code more readable. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-12-hch@lst.de Signed-off-by: Jens Axboe commit 53548d2a945eb2c277332c66f57505881392e5a9 Author: Christoph Hellwig Date: Thu Apr 13 08:40:47 2023 +0200 blk-mq: refactor passthrough vs flush handling in blk_mq_insert_request While both passthrough and flush requests call directly into blk_mq_request_bypass_insert, the parameters aren't the same. Split the handling into two separate conditionals and turn the whole function into an if/elif/elif/else flow instead of the gotos. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-11-hch@lst.de Signed-off-by: Jens Axboe commit a4fa57ffb7671c2df4ce597d03ef9f7d6d905a60 Author: Christoph Hellwig Date: Thu Apr 13 08:40:46 2023 +0200 blk-mq: remove blk_flush_queue_rq Just call blk_mq_add_to_requeue_list directly from the two callers. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-10-hch@lst.de Signed-off-by: Jens Axboe commit 4ec5c0553c33e42f2d650785309de17d4cb8f5ba Author: Christoph Hellwig Date: Thu Apr 13 08:40:45 2023 +0200 blk-mq: fold __blk_mq_insert_req_list into blk_mq_insert_request Remove this very small helper and fold it into the only caller. Note that this moves the trace_block_rq_insert out of ctx->lock, matching the other calls to this tracepoint. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-9-hch@lst.de Signed-off-by: Jens Axboe commit a88db1e0003eda8adbe3c499b81f736d8065b952 Author: Christoph Hellwig Date: Thu Apr 13 08:40:44 2023 +0200 blk-mq: fold __blk_mq_insert_request into blk_mq_insert_request There is no good point in keeping the __blk_mq_insert_request around for two function calls and a singler caller. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-8-hch@lst.de Signed-off-by: Jens Axboe commit 2bd215df791b5d36ca1d20c07683100b48310cc2 Author: Christoph Hellwig Date: Thu Apr 13 08:40:43 2023 +0200 blk-mq: move blk_mq_sched_insert_request to blk-mq.c blk_mq_sched_insert_request is the main request insert helper and not directly I/O scheduler related. Move blk_mq_sched_insert_request to blk-mq.c, rename it to blk_mq_insert_request and mark it static. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-7-hch@lst.de Signed-off-by: Jens Axboe commit 05a93117703e7b2e40fa9193e622079b30395bcc Author: Christoph Hellwig Date: Thu Apr 13 08:40:42 2023 +0200 blk-mq: fold blk_mq_sched_insert_requests into blk_mq_dispatch_plug_list blk_mq_dispatch_plug_list is the only caller of blk_mq_sched_insert_requests, and it makes sense to just fold it there as blk_mq_sched_insert_requests isn't specific to I/O schedulers despite the name. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-6-hch@lst.de Signed-off-by: Jens Axboe commit 94aa228c2a2f6edc8e9b7c4745942ea4c5978977 Author: Christoph Hellwig Date: Thu Apr 13 08:40:41 2023 +0200 blk-mq: move more logic into blk_mq_insert_requests Move all logic related to the direct insert (including the call to blk_mq_run_hw_queue) into blk_mq_insert_requests to streamline the code flow up a bit, and to allow marking blk_mq_try_issue_list_directly static. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-5-hch@lst.de Signed-off-by: Jens Axboe commit 90110e04f265b95f59fbae09c228c5920b8a302f Author: Christoph Hellwig Date: Thu Apr 13 08:40:40 2023 +0200 blk-mq: include in block/blk-mq.h block/blk-mq.h needs various definitions from , include it there instead of relying on the source files to include both. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-4-hch@lst.de Signed-off-by: Jens Axboe commit bebe84ebeec4d030aa65af58376305749762e5a0 Author: Christoph Hellwig Date: Thu Apr 13 08:40:39 2023 +0200 blk-mq: remove blk-mq-tag.h blk-mq-tag.h is always included by blk-mq.h, and causes recursive inclusion hell with further changes. Just merge it into blk-mq.h instead. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-3-hch@lst.de Signed-off-by: Jens Axboe commit 50947d7fe9fa6abe3ddc40769dfb02a51c58edb6 Author: Christoph Hellwig Date: Thu Apr 13 08:40:38 2023 +0200 blk-mq: don't plug for head insertions in blk_execute_rq_nowait Plugs never insert at head, so don't plug for head insertions. Fixes: 1c2d2fff6dc0 ("block: wire-up support for passthrough plugging") Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20230413064057.707578-2-hch@lst.de Signed-off-by: Jens Axboe commit 0c5f48599bed55c13d6f979ea824554bdebdf2ad Author: Kal Conley Date: Mon Apr 10 14:18:41 2023 +0200 xsk: Simplify xp_aligned_validate_desc implementation Perform the chunk boundary check like the page boundary check in xp_desc_crosses_non_contig_pg(). This simplifies the implementation and reduces the number of branches. Signed-off-by: Kal Conley Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20230410121841.643254-1-kal.conley@dectris.com commit 8e15dfbd9ae21e518979e3823e335073e725f445 Author: Chengming Zhou Date: Thu Apr 13 14:28:05 2023 +0800 blk-throttle: only enable blk-stat when BLK_DEV_THROTTLING_LOW blk_throtl_register() will unconditionally enable blk-stat for gendisk when register, even when we have no BLK_DEV_THROTTLING_LOW config. Since the kernel always has only BLK_DEV_THROTTLING config and the BLK_DEV_THROTTLING_LOW config is still in EXPERIMENTAL state, we can just skip blk-stat when !BLK_DEV_THROTTLING_LOW. Signed-off-by: Chengming Zhou Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230413062805.2081970-2-chengming.zhou@linux.dev Signed-off-by: Jens Axboe commit 20de765f6d9da0c47b756429c60b41063b990a10 Author: Chengming Zhou Date: Thu Apr 13 14:28:04 2023 +0800 blk-stat: fix QUEUE_FLAG_STATS clear We need to set QUEUE_FLAG_STATS for two cases: 1. blk_stat_enable_accounting() 2. blk_stat_add_callback() So we should clear it only when ((q->stats->accounting == 0) && list_empty(&q->stats->callbacks)). blk_stat_disable_accounting() only check if q->stats->accounting is 0 before clear the flag, this patch fix it. Also add list_empty(&q->stats->callbacks)) check when enable, or the flag is already set. The bug can be reproduced on kernel without BLK_DEV_THROTTLING (since it unconditionally enable accounting, see the next patch). # cat /sys/block/sr0/queue/scheduler none mq-deadline [bfq] # cat /sys/kernel/debug/block/sr0/state SAME_COMP|IO_STAT|INIT_DONE|STATS|REGISTERED|NOWAIT|30 # echo none > /sys/block/sr0/queue/scheduler # cat /sys/kernel/debug/block/sr0/state SAME_COMP|IO_STAT|INIT_DONE|REGISTERED|NOWAIT # cat /sys/block/sr0/queue/wbt_lat_usec 75000 We can see that after changing elevator from "bfq" to "none", "STATS" flag is lost even though WBT callback still need it. Fixes: 68497092bde9 ("block: make queue stat accounting a reference") Cc: # v5.17+ Signed-off-by: Chengming Zhou Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230413062805.2081970-1-chengming.zhou@linux.dev Signed-off-by: Jens Axboe commit a13696b83da4f1e53e192ec3e239afd3a96ff747 Author: Tejun Heo Date: Wed Apr 12 14:06:49 2023 -1000 blk-iolatency: Make initialization lazy Other rq_qos policies such as wbt and iocost are lazy-initialized when they are configured for the first time for the device but iolatency is initialized unconditionally from blkcg_init_disk() during gendisk init. Lazy init is beneficial because rq_qos policies add runtime overhead when initialized as every IO has to walk all registered rq_qos callbacks. This patch switches iolatency to lazy initialization too so that it only registered its rq_qos policy when it is first configured. Note that there is a known race condition between blkcg config file writes and del_gendisk() and this patch makes iolatency susceptible to it by exposing the init path to race against the deletion path. However, that problem already exists in iocost and is being worked on. Signed-off-by: Tejun Heo Reviewed-by: Christoph Hellwig Cc: Josef Bacik Link: https://lore.kernel.org/r/20230413000649.115785-5-tj@kernel.org Signed-off-by: Jens Axboe commit 3304918758125a0eb18fb480c82945e327b81f78 Author: Tejun Heo Date: Wed Apr 12 14:06:48 2023 -1000 blk-iolatency: s/blkcg_rq_qos/iolat_rq_qos/ The name was too generic given that there are multiple blkcg rq-qos policies. Signed-off-by: Tejun Heo Reviewed-by: Christoph Hellwig Cc: Josef Bacik Link: https://lore.kernel.org/r/20230413000649.115785-4-tj@kernel.org Signed-off-by: Jens Axboe commit faffaab2895914a803e011600164683bf747fee3 Author: Tejun Heo Date: Wed Apr 12 14:06:47 2023 -1000 blkcg: Restructure blkg_conf_prep() and friends We want to support lazy init of rq-qos policies so that iolatency is enabled lazily on configuration instead of gendisk initialization. The way blkg config helpers are structured now is a bit awkward for that. Let's restructure: * blkcg_conf_open_bdev() is renamed to blkg_conf_open_bdev(). The blkcg_ prefix was used because the bdev opening step is blkg-independent. However, the distinction is too subtle and confuses more than helps. Let's switch to blkg prefix so that it's consistent with the type and other helper names. * struct blkg_conf_ctx now remembers the original input string and is always initialized by the new blkg_conf_init(). * blkg_conf_open_bdev() is updated to take a pointer to blkg_conf_ctx like blkg_conf_prep() and can be called multiple times safely. Instead of modifying the double pointer to input string directly, blkg_conf_open_bdev() now sets blkg_conf_ctx->body. * blkg_conf_finish() is renamed to blkg_conf_exit() for symmetry and now must be called on all blkg_conf_ctx's which were initialized with blkg_conf_init(). Combined, this allows the users to either open the bdev first or do it altogether with blkg_conf_prep() which will help implementing lazy init of rq-qos policies. blkg_conf_init/exit() will also be used implement synchronization against device removal. This is necessary because iolat / iocost are configured through cgroupfs instead of one of the files under /sys/block/DEVICE. As cgroupfs operations aren't synchronized with block layer, the lazy init and other configuration operations may race against device removal. This patch makes blkg_conf_init/exit() used consistently for all cgroup-orginating configurations making them a good place to implement explicit synchronization. Users are updated accordingly. No behavior change is intended by this patch. v2: bfq wasn't updated in v1 causing a build error. Fixed. v3: Update the description to include future use of blkg_conf_init/exit() as synchronization points. Signed-off-by: Tejun Heo Cc: Josef Bacik Cc: Christoph Hellwig Cc: Yu Kuai Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230413000649.115785-3-tj@kernel.org Signed-off-by: Jens Axboe commit 83462a6c971cdc550475b672cf29bd3b53bedf84 Author: Tejun Heo Date: Wed Apr 12 14:06:46 2023 -1000 blkcg: Drop unnecessary RCU read [un]locks from blkg_conf_prep/finish() Now that all RCU flavors have been combined either holding a spin lock, disabling irq or disabling preemption implies RCU read lock, so there's no need to use rcu_read_[un]lock() explicitly while holding queue_lock. This shouldn't cause any behavior changes. v2: Description updated. Leave __acquires/release on queue_lock alone. Signed-off-by: Tejun Heo Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230413000649.115785-2-tj@kernel.org Signed-off-by: Jens Axboe commit ee5059a64dbad4806a3c11babd0dbed5a5d04ead Author: Andrii Nakryiko Date: Wed Apr 12 10:06:55 2023 -0700 selftests/bpf: Remove stand-along test_verifier_log test binary test_prog's prog_tests/verifier_log.c is superseding test_verifier_log stand-alone test. It cover same checks and adds more, and is also integrated into test_progs test runner. Just remove test_verifier_log.c. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230412170655.1866831-1-andrii@kernel.org commit 2995f9a8d427b9ff6f3cf4e85c0f9d4456ef324d Author: Song Liu Date: Wed Apr 12 14:04:23 2023 -0700 selftests/bpf: Keep the loop in bpf_testmod_loop_test Some compilers (for example clang-15) optimize bpf_testmod_loop_test and remove the loop: gcc version (gdb) disassemble bpf_testmod_loop_test Dump of assembler code for function bpf_testmod_loop_test: 0x0000000000000570 <+0>: callq 0x575 0x0000000000000575 <+5>: xor %eax,%eax 0x0000000000000577 <+7>: test %edi,%edi 0x0000000000000579 <+9>: jle 0x587 0x000000000000057b <+11>: xor %edx,%edx 0x000000000000057d <+13>: add %edx,%eax 0x000000000000057f <+15>: add $0x1,%edx 0x0000000000000582 <+18>: cmp %edx,%edi 0x0000000000000584 <+20>: jne 0x57d 0x0000000000000586 <+22>: retq 0x0000000000000587 <+23>: retq clang-15 version (gdb) disassemble bpf_testmod_loop_test Dump of assembler code for function bpf_testmod_loop_test: 0x0000000000000450 <+0>: nopl 0x0(%rax,%rax,1) 0x0000000000000455 <+5>: test %edi,%edi 0x0000000000000457 <+7>: jle 0x46b 0x0000000000000459 <+9>: lea -0x1(%rdi),%eax 0x000000000000045c <+12>: lea -0x2(%rdi),%ecx 0x000000000000045f <+15>: imul %rax,%rcx 0x0000000000000463 <+19>: shr %rcx 0x0000000000000466 <+22>: lea -0x1(%rdi,%rcx,1),%eax 0x000000000000046a <+26>: retq 0x000000000000046b <+27>: xor %eax,%eax 0x000000000000046d <+29>: retq Note: The jne instruction is removed in clang-15 version. Force the compile to keep the loop by making sum volatile. Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230412210423.900851-4-song@kernel.org commit c1e07a80cf23d3a6e96172bc9a73bfa912a9fcbc Author: Song Liu Date: Wed Apr 12 14:04:22 2023 -0700 selftests/bpf: Fix leaked bpf_link in get_stackid_cannot_attach skel->links.oncpu is leaked in one case. This causes test perf_branches fails when it runs after get_stackid_cannot_attach: ./test_progs -t get_stackid_cannot_attach,perf_branches 84 get_stackid_cannot_attach:OK test_perf_branches_common:PASS:test_perf_branches_load 0 nsec test_perf_branches_common:PASS:attach_perf_event 0 nsec test_perf_branches_common:PASS:set_affinity 0 nsec check_good_sample:FAIL:output not valid no valid sample from prog 146/1 perf_branches/perf_branches_hw:FAIL 146/2 perf_branches/perf_branches_no_hw:OK 146 perf_branches:FAIL All error logs: test_perf_branches_common:PASS:test_perf_branches_load 0 nsec test_perf_branches_common:PASS:attach_perf_event 0 nsec test_perf_branches_common:PASS:set_affinity 0 nsec check_good_sample:FAIL:output not valid no valid sample from prog 146/1 perf_branches/perf_branches_hw:FAIL 146 perf_branches:FAIL Summary: 1/1 PASSED, 0 SKIPPED, 1 FAILED Fix this by adding the missing bpf_link__destroy(). Fixes: 346938e9380c ("selftests/bpf: Add get_stackid_cannot_attach") Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230412210423.900851-3-song@kernel.org commit de6d014a09bf12a9a8959d60c0a1d4a41d394a89 Author: Song Liu Date: Wed Apr 12 14:04:21 2023 -0700 selftests/bpf: Use read_perf_max_sample_freq() in perf_event_stackmap Currently, perf_event sample period in perf_event_stackmap is set too low that the test fails randomly. Fix this by using the max sample frequency, from read_perf_max_sample_freq(). Move read_perf_max_sample_freq() to testing_helpers.c. Replace the CHECK() with if-printf, as CHECK is not available in testing_helpers.c. Fixes: 1da4864c2b20 ("selftests/bpf: Add callchain_stackid") Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230412210423.900851-2-song@kernel.org commit 0af4d704ba8e5ee632b6e65015ffe4d229c1a9a9 Author: Uwe Kleine-König Date: Wed Apr 12 13:56:36 2023 +0200 pwm: Delete deprecated functions pwm_request() and pwm_free() Since commit 5a7fbe452ad9 ("backlight: pwm_bl: Drop support for legacy PWM probing") the last user of pwm_request() and pwm_free() is gone. So remove these functions that were deprecated over 10 years ago in commit 8138d2ddbcca ("pwm: Add table-based lookup for static mappings"). Signed-off-by: Uwe Kleine-König [thierry.reding@gmail.com: clean up a bit after removal] Signed-off-by: Thierry Reding commit 5a674611d116a5fc28c5429beea2b78c6e2933ef Author: Lorenz Bauer Date: Thu Apr 13 10:47:40 2023 +0100 selftests/bpf: Fix use of uninitialized op_name in log tests One of the test assertions uses an uninitialized op_name, which leads to some headscratching if it fails. Use a string constant instead. Fixes: b1a7a480a112 ("selftests/bpf: Add fixed vs rotating verifier log tests") Signed-off-by: Lorenz Bauer Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230413094740.18041-1-lmb@isovalent.com commit 4033eaa68af6e3e9a8ec3819a9369d29aee8a2c4 Merge: 21cdc87fa9d8e 9a714997386ba Author: Paolo Abeni Date: Thu Apr 13 13:30:22 2023 +0200 Merge branch 'net-use-read_once-write_once-for-ring-index-accesses' Jakub Kicinski says: ==================== net: use READ_ONCE/WRITE_ONCE for ring index accesses Small follow up to the lockless ring stop/start macros. Update the doc and the drivers suggested by Eric: https://lore.kernel.org/all/CANn89iJrBGSybMX1FqrhCEMWT3Nnz2=2+aStsbbwpWzKHjk51g@mail.gmail.com/ ==================== Link: https://lore.kernel.org/r/20230412015038.674023-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit 9a714997386ba110154dc444cdd0279f966151b2 Author: Jakub Kicinski Date: Tue Apr 11 18:50:38 2023 -0700 mlx4: use READ_ONCE/WRITE_ONCE for ring indexes Eric points out that we should make sure that ring index updates are wrapped in the appropriate READ_ONCE/WRITE_ONCE macros. Suggested-by: Eric Dumazet Reviewed-by: Eric Dumazet Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski Reviewed-by: Tariq Toukan Signed-off-by: Paolo Abeni commit 36647b206c014a0bf3ab17bc88f2c840eefd796c Author: Jakub Kicinski Date: Tue Apr 11 18:50:37 2023 -0700 bnxt: use READ_ONCE/WRITE_ONCE for ring indexes Eric points out that we should make sure that ring index updates are wrapped in the appropriate READ_ONCE/WRITE_ONCE macros. Suggested-by: Eric Dumazet Reviewed-by: Eric Dumazet Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski Reviewed-by: Michael Chan Signed-off-by: Paolo Abeni commit 50762d9af307b1c466fe0e1441c7923975927d98 Author: Jakub Kicinski Date: Tue Apr 11 18:50:36 2023 -0700 net: docs: update the sample code in driver.rst The sample code talks about single-queue devices and uses locks. Update it to something resembling more modern code. Make sure we mention use of READ_ONCE() / WRITE_ONCE(). Change the comment which talked about consumer on the xmit side. AFAIU xmit is the producer and completions are a consumer. Reviewed-by: Eric Dumazet Reviewed-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit de1702f65feb516d5394e81a78519de9dc567031 Author: Mark Rutland Date: Wed Apr 12 17:01:34 2023 +0100 arm64: move PAC masks to Now that we use XPACLRI to strip PACs within the kernel, the ptrauth_user_pac_mask() and ptrauth_kernel_pac_mask() definitions no longer need to live in . Move them to , and ensure that this header is included where they are used. Signed-off-by: Mark Rutland Cc: Amit Daniel Kachhap Cc: Catalin Marinas Cc: James Morse Cc: Kristina Martsenko Cc: Will Deacon Link: https://lore.kernel.org/r/20230412160134.306148-4-mark.rutland@arm.com Signed-off-by: Will Deacon commit ca708599ca43567cdd69f799454f95d1c80ffee5 Author: Mark Rutland Date: Wed Apr 12 17:01:33 2023 +0100 arm64: use XPACLRI to strip PAC Currently we strip the PAC from pointers using C code, which requires generating bitmasks, and conditionally clearing/setting bits depending on bit 55. We can do better by using XPACLRI directly. When the logic was originally written to strip PACs from user pointers, contemporary toolchains used for the kernel had assemblers which were unaware of the PAC instructions. As stripping the PAC from userspace pointers required unconditional clearing of a fixed set of bits (which could be performed with a single instruction), it was simpler to implement the masking in C than it was to make use of XPACI or XPACLRI. When support for in-kernel pointer authentication was added, the stripping logic was extended to cover TTBR1 pointers, requiring several instructions to handle whether to clear/set bits dependent on bit 55 of the pointer. This patch simplifies the stripping of PACs by using XPACLRI directly, as contemporary toolchains do within __builtin_return_address(). This saves a number of instructions, especially where __builtin_return_address() does not implicitly strip the PAC but is heavily used (e.g. with tracepoints). As the kernel might be compiled with an assembler without knowledge of XPACLRI, it is assembled using the 'HINT #7' alias, which results in an identical opcode. At the same time, I've split ptrauth_strip_insn_pac() into ptrauth_strip_user_insn_pac() and ptrauth_strip_kernel_insn_pac() helpers so that we can avoid unnecessary PAC stripping when pointer authentication is not in use in userspace or kernel respectively. The underlying xpaclri() macro uses inline assembly which clobbers x30. The clobber causes the compiler to save/restore the original x30 value in a frame record (protected with PACIASP and AUTIASP when in-kernel authentication is enabled), so this does not provide a gadget to alter the return address. Similarly this does not adversely affect unwinding due to the presence of the frame record. The ptrauth_user_pac_mask() and ptrauth_kernel_pac_mask() are exported from the kernel in ptrace and core dumps, so these are retained. A subsequent patch will move them out of . Signed-off-by: Mark Rutland Cc: Amit Daniel Kachhap Cc: Catalin Marinas Cc: James Morse Cc: Kristina Martsenko Cc: Will Deacon Link: https://lore.kernel.org/r/20230412160134.306148-3-mark.rutland@arm.com Signed-off-by: Will Deacon commit 9df3f5082ff94c55e84523a28c040445220b2f64 Author: Mark Rutland Date: Wed Apr 12 17:01:32 2023 +0100 arm64: avoid redundant PAC stripping in __builtin_return_address() In old versions of GCC and Clang, __builtin_return_address() did not strip the PAC. This was not the behaviour we desired, and so we wrapped this with code to strip the PAC in commit: 689eae42afd7a916 ("arm64: mask PAC bits of __builtin_return_address") Since then, both GCC and Clang decided that __builtin_return_address() *should* strip the PAC, and the existing behaviour was a bug. GCC was fixed in 11.1.0, with those fixes backported to 10.2.0, 9.4.0, 8.5.0, but not earlier: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94891 Clang was fixed in 12.0.0, though this was not backported: https://reviews.llvm.org/D75044 When using a compiler whose __builtin_return_address() strips the PAC, our wrapper to strip the PAC is redundant. Similarly, when pointer authentication is not in use within the kernel pointers will not have a PAC, and so there's no point stripping those pointers. To avoid this redundant work, this patch updates the __builtin_return_address() wrapper to only be used when in-kernel pointer authentication is configured and the compiler's __builtin_return_address() does not strip the PAC. This is a cleanup/optimization, and not a fix that requires backporting. Stripping a PAC should be an idempotent operation, and so redundantly stripping the PAC is not harmful. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Amit Daniel Kachhap Cc: Catalin Marinas Cc: James Morse Cc: Kristina Martsenko Cc: Will Deacon Link: https://lore.kernel.org/r/20230412160134.306148-2-mark.rutland@arm.com Signed-off-by: Will Deacon commit 52cc189b4fc6af6accc45fe7b7053d76d8724059 Author: Patrik Dahlström Date: Sat Apr 8 13:48:25 2023 +0200 iio: adc: palmas: don't alter event config on suspend/resume The event config is controlled through the IIO events subsystem and device wakeup is controlled by /sys/devices/.../power/wakeup. Let's keep those two knobs independent. Signed-off-by: Patrik Dahlström Link: https://lore.kernel.org/r/20230408114825.824505-10-risca@dalakolonin.se Signed-off-by: Jonathan Cameron commit a99544c6c883f5fdd1b326b245572ca22cabc421 Author: Patrik Dahlström Date: Sat Apr 8 13:48:24 2023 +0200 iio: adc: palmas: add support for iio threshold events The palmas gpadc block has support for monitoring up to 2 ADC channels and issue an interrupt if they reach past a set threshold. This change hooks into the IIO events system and exposes to userspace the ability to configure these threshold values for each channel, but only allow up to 2 such thresholds to be enabled at any given time. Trying to enable a third channel will result in an error. Userspace is expected to input calibrated, as opposed to raw, values as threshold. However, it is not enough to do the opposite of what is done when converting the other way around. To account for tolerances in the ADC, the calculated raw threshold should be adjusted based on the ADC specifications for the device. These specifications include the integral nonlinearity (INL), offset, and gain error. To adjust the high threshold, use the following equation: (calibrated value + INL) * Gain error + offset = maximum value [1] Likewise, use the following equation for the low threshold: (calibrated value - INL) * Gain error - offset = minimum value The gain error is a combination of gain error, as listed in the datasheet, and gain error drift due to temperature and supply. The exact values for these specifications vary between palmas devices. This patch sets the values found in TWL6035, TWL6037 datasheet. [1] TI Application Report, SLIA087A, Guide to Using the GPADC in TPS65903x, TPS65917-Q1, TPS65919-Q1, and TPS65916 Devices. Signed-off-by: Patrik Dahlström Link: https://lore.kernel.org/r/20230408114825.824505-9-risca@dalakolonin.se Signed-off-by: Jonathan Cameron commit f100ce3bbd6aa0093075b20b9dbd006686f6aedf Author: Benjamin Gaignard Date: Thu Apr 13 12:47:56 2023 +0200 media: verisilicon: Fix crash when probing encoder ctx->vpu_dst_fmt is no more initialized before calling hantro_try_fmt() so assigne it to vpu_fmt led to crash the kernel. Like for decoder case use 'fmt' as format for encoder and clean up the code. Signed-off-by: Benjamin Gaignard Tested-by: Marek Szyprowski Fixes: db6f68b51e5c ("media: verisilicon: Do not set context src/dst formats in reset functions") Signed-off-by: Hans Verkuil commit 21cdc87fa9d8e0f0104db5499a16e2be1f53516a Merge: f032d8a9c8b35 b68376191c69e Author: Paolo Abeni Date: Thu Apr 13 12:50:47 2023 +0200 Merge branch 'add-emac3-support-for-sa8540p-ride' Andrew Halaney says: ==================== Add EMAC3 support for sa8540p-ride This is a forward port / upstream refactor of code delivered downstream by Qualcomm over at [0] to enable the DWMAC5 based implementation called EMAC3 on the sa8540p-ride dev board. From what I can tell with the board schematic in hand, as well as the code delivered, the main changes needed are: 1. A new address space layout for dwmac5/EMAC3 MTL/DMA regs 2. A new programming sequence required for the EMAC3 based platforms This series makes the changes above as well as other housekeeping items such as converting dt-bindings to yaml, etc. As requested[1], it has been split up by compilation deps / maintainer tree. I will post a link to the associated devicetree changes that together with this series get the hardware functioning. Patches 1-3 are clean ups of the currently supported dt-bindings and IMO could be picked up as is independent of the rest of the series to improve the current codebase. They've all been reviewed in prior versions of the series. Patches 5-7 are also clean ups of the driver and are worth picking up independently as well. They don't all have explicit reviews but should be good to go (trivial changes on non-reviewed bits). The rest of the patches have new changes, lack review, or are specificly being made to support the new hardware, so they should wait until the series as a whole is deemed ready to go by the community. ==================== Link: https://lore.kernel.org/r/20230411200409.455355-1-ahalaney@redhat.com Signed-off-by: Paolo Abeni commit b68376191c69e621cba9cae4f9d5cead36cddb43 Author: Andrew Halaney Date: Tue Apr 11 15:04:09 2023 -0500 net: stmmac: dwmac-qcom-ethqos: Add EMAC3 support Add the new programming sequence needed for EMAC3 based platforms such as the sc8280xp family. Signed-off-by: Andrew Halaney Reviewed-by: Jesse Brandeburg Tested-by: Brian Masney Signed-off-by: Paolo Abeni commit 030f1d5972aaac8584a8ecad4d2739c6da4a20ea Author: Andrew Halaney Date: Tue Apr 11 15:04:08 2023 -0500 net: stmmac: dwmac-qcom-ethqos: Use loopback_en for all speeds It seems that this variable should be used for all speeds, not just 1000/100. While at it refactor it slightly to be more readable, including fixing the typo in the variable name. Signed-off-by: Andrew Halaney Reviewed-by: Jesse Brandeburg Tested-by: Brian Masney Signed-off-by: Paolo Abeni commit 164a9ebe97420cbe801140bb3de039695e09e205 Author: Andrew Halaney Date: Tue Apr 11 15:04:07 2023 -0500 net: stmmac: dwmac-qcom-ethqos: Respect phy-mode and TX delay The driver currently sets a MAC TX delay of 2 ns no matter what the phy-mode is. If the phy-mode indicates the phy is in charge of the TX delay (rgmii-txid, rgmii-id), don't do it in the MAC. Signed-off-by: Andrew Halaney Reviewed-by: Jesse Brandeburg Tested-by: Brian Masney Signed-off-by: Paolo Abeni commit 33719b57f52e5b761234373f98f55f4e036d61c9 Author: Andrew Halaney Date: Tue Apr 11 15:04:06 2023 -0500 net: stmmac: dwmac4: Allow platforms to specify some DMA/MTL offsets Some platforms have dwmac4 implementations that have a different address space layout than the default, resulting in the need to define their own DMA/MTL offsets. Extend the functions to allow a platform driver to indicate what its addresses are, overriding the defaults. Signed-off-by: Andrew Halaney Reviewed-by: Jesse Brandeburg Tested-by: Brian Masney Signed-off-by: Paolo Abeni commit 1d84b487bc2d9061bd00203f571e5cb99fe0a312 Author: Andrew Halaney Date: Tue Apr 11 15:04:05 2023 -0500 net: stmmac: Pass stmmac_priv in some callbacks Passing stmmac_priv to some of the callbacks allows hwif implementations to grab some data that platforms can customize. Adjust the callbacks accordingly in preparation of such a platform customization. Signed-off-by: Andrew Halaney Reviewed-by: Jesse Brandeburg Tested-by: Brian Masney Signed-off-by: Paolo Abeni commit 0c3f3c4f4b15a2c105e1ca882d100048074a2865 Author: Andrew Halaney Date: Tue Apr 11 15:04:04 2023 -0500 net: stmmac: Remove some unnecessary void pointers There's a few spots in the hardware interface where a void pointer is used, but what's passed in and later cast out is always the same type. Just use the proper type directly. Reviewed-by: Simon Horman Signed-off-by: Andrew Halaney Reviewed-by: Jesse Brandeburg Tested-by: Brian Masney Signed-off-by: Paolo Abeni commit d638dcb52b099e9123bef2690ffe2e2bf9d39746 Author: Andrew Halaney Date: Tue Apr 11 15:04:03 2023 -0500 net: stmmac: Fix DMA typo DAM is supposed to be DMA. Fix it to improve readability. Signed-off-by: Andrew Halaney Reviewed-by: Jesse Brandeburg Tested-by: Brian Masney Signed-off-by: Paolo Abeni commit 7c6b942b81caec74fab53dac508e3f2541867d0a Author: Andrew Halaney Date: Tue Apr 11 15:04:02 2023 -0500 net: stmmac: Remove unnecessary if statement brackets The brackets are unnecessary, remove them to match the coding style used in the kernel. Signed-off-by: Andrew Halaney Reviewed-by: Jesse Brandeburg Tested-by: Brian Masney Signed-off-by: Paolo Abeni commit 25926a703ec155c99a28f6730b79e9da3acc0b10 Author: Andrew Halaney Date: Tue Apr 11 15:04:01 2023 -0500 dt-bindings: net: qcom,ethqos: Add Qualcomm sc8280xp compatibles The sc8280xp has a new version of the ETHQOS hardware in it, EMAC v3. Add a compatible for this. Acked-by: Krzysztof Kozlowski Signed-off-by: Andrew Halaney Tested-by: Brian Masney Signed-off-by: Paolo Abeni commit 02e98ce3db149919d6aa35f873e5d74c1ac36640 Author: Bhupesh Sharma Date: Tue Apr 11 15:04:00 2023 -0500 dt-bindings: net: qcom,ethqos: Convert bindings to yaml Convert Qualcomm ETHQOS Ethernet devicetree binding to YAML. In doing so add a new property for iommus since newer platforms support using one, and without such make dtbs_check fails on them. While at it, also update the MAINTAINERS file to point to the yaml version of the bindings. Signed-off-by: Bhupesh Sharma [halaney: Remove duplicated properties, add MAINTAINERS and iommus] Reviewed-by: Krzysztof Kozlowski Signed-off-by: Andrew Halaney Tested-by: Brian Masney Signed-off-by: Paolo Abeni commit d70c215bdd17b92358e90c4e4d190e749a48d982 Author: Bhupesh Sharma Date: Tue Apr 11 15:03:59 2023 -0500 dt-bindings: net: snps,dwmac: Add Qualcomm Ethernet ETHQOS compatibles Add Qualcomm Ethernet ETHQOS compatible checks in snps,dwmac YAML binding document. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bhupesh Sharma Signed-off-by: Andrew Halaney Tested-by: Brian Masney Signed-off-by: Paolo Abeni commit d554ba0ea03cbd1cc1455f6133d03cd9b7967ac6 Author: Bhupesh Sharma Date: Tue Apr 11 15:03:58 2023 -0500 dt-bindings: net: snps,dwmac: Update interrupt-names As commit fc191af1bb0d ("net: stmmac: platform: Fix misleading interrupt error msg") noted, not every stmmac based platform makes use of the 'eth_wake_irq' or 'eth_lpi' interrupts. So, update the 'interrupt-names' inside 'snps,dwmac' YAML bindings to reflect the same. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bhupesh Sharma Signed-off-by: Andrew Halaney Tested-by: Brian Masney Signed-off-by: Paolo Abeni commit 6d87552c0b86b9677d762002082df5f5b7e3c33f Author: Rohit Ner Date: Wed Apr 12 13:20:09 2023 -0700 spi: spi-loopback-test: Add module param for iteration length SPI test framework is designed to run each test case for a list of lengths. Introduce a module parameter to limit the iterations to a single value among the list of lengths. Signed-off-by: Rohit Ner Link: https://lore.kernel.org/r/20230412202009.3750955-2-rohitner@google.com Signed-off-by: Mark Brown commit c6c3581a3e178882c8815462ca129e60be50fde8 Author: Christophe JAILLET Date: Thu Apr 13 07:28:33 2023 +0200 ASoC: da7218: Use devm_clk_get_optional() Use devm_clk_get_optional() instead of hand writing it. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/51976b2515d7007ba5c8aa7524892f147d7cdd51.1681363691.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 2c17277893747e30e41d1a7b57b80f2b298da278 Author: David Rau Date: Thu Apr 13 02:41:34 2023 +0000 ASoC: da7219: Improve the relability of AAD IRQ process - Configure the default gound switch delay time before enabling IRQ to avoid the unexpected delay time is set up - Apply DA7219 AAD own work queue to handle AAD events - Replace msleep with queue_delayed_work to have better relability This commit improves the control of ground switches in AAD IRQ Signed-off-by: David Rau Link: https://lore.kernel.org/r/20230413024134.8612-1-David.Rau.opensource@dm.renesas.com Signed-off-by: Mark Brown commit 773597aeee455d646bff12ce68a68884bc2d9113 Author: Patrik Dahlström Date: Sat Apr 8 13:48:23 2023 +0200 iio: adc: palmas: always reset events on unload This prevents leaving the adc in freerunning mode when removing the driver. Signed-off-by: Patrik Dahlström Link: https://lore.kernel.org/r/20230408114825.824505-8-risca@dalakolonin.se Signed-off-by: Jonathan Cameron commit 2d48dbdfc7d4714973de48e601d69854b21b69de Author: Patrik Dahlström Date: Sat Apr 8 13:48:22 2023 +0200 iio: adc: palmas: move eventX_enable into palmas_adc_event It just makes more sense to have all information regarding adc events in one place. Signed-off-by: Patrik Dahlström Link: https://lore.kernel.org/r/20230408114825.824505-7-risca@dalakolonin.se Signed-off-by: Jonathan Cameron commit 7501a3a97e4f000c1881f228132ead7a2fa5725c Author: Patrik Dahlström Date: Sat Apr 8 13:48:21 2023 +0200 iio: adc: palmas: use iio_event_direction for threshold polarity Instead of having high_threshold > 0 as an indicator for upper threshold event and lower threshold event otherwise, use enum iio_event_direction instead. This is hopefully less ambiguous. Signed-off-by: Patrik Dahlström Link: https://lore.kernel.org/r/20230408114825.824505-6-risca@dalakolonin.se Signed-off-by: Jonathan Cameron commit d2ab4eea732dd2e235ba2a488344612a07a20334 Author: Patrik Dahlström Date: Sat Apr 8 13:48:20 2023 +0200 iio: adc: palmas: replace "wakeup" with "event" The palmas gpadc block has support for monitoring up to 2 ADC channels and issue an interrupt if they reach past a set threshold. This is currently used to wake up the system from sleep, but the functionality is more generic than that. As such, change the naming of functions and variables to refer to it as events instead, except during suspend and resume where wakeup still make sense. Signed-off-by: Patrik Dahlström Link: https://lore.kernel.org/r/20230408114825.824505-5-risca@dalakolonin.se Signed-off-by: Jonathan Cameron commit 79d9622d622d49d6c14c51edec2059b8591e7975 Author: Patrik Dahlström Date: Sat Apr 8 13:48:19 2023 +0200 iio: adc: palmas: remove adc_wakeupX_data It does not seem to be used by anyone and later patches in this series are made simpler by first removing this. There is now a lot of dead code that cannot be reached, until later patches revive it. Arguably, this is preferred over removing the code only to add it again. Signed-off-by: Patrik Dahlström Link: https://lore.kernel.org/r/20230408114825.824505-4-risca@dalakolonin.se Signed-off-by: Jonathan Cameron commit 6d52b0e706989d48e1aa3b5263f6185770ab4af3 Author: Jonathan Cameron Date: Sat Mar 18 16:30:39 2023 +0000 iio: adc: palmas: Take probe fully device managed. Review of a recent fix highlighted that this driver could be trivially converted to be entirely devm managed. That fix should be applied to resolve the fix in a fashion easy to back port even though this change removes the relevant code. [1] https://patchwork.kernel.org/project/linux-iio/patch/20230313205029.1881745-1-risca@dalakolonin.se/ Signed-off-by: Jonathan Cameron Tested-by: Patrik Dahlström Reviewed-by: Patrik Dahlström Link: https://lore.kernel.org/r/20230318163039.56115-1-jic23@kernel.org commit dc3d25f22b889a326abc8331075849ea11b4f2bb Author: Jonathan Cameron Date: Mon Jan 30 20:10:18 2023 +0000 iio: imu: lsm6dsx: Add ACPI mount matrix retrieval DSDT ROTM method seen in the wild with SMO8B30 _HID. Making assumption it is similar to that used for bmc150 plus information from Darrell that the rotation is out by 90 degrees at boot. Method (ROTM, 0, NotSerialized) { Name (RBUF, Package (0x03) { "0 -1 0", "1 0 0", "0 0 1" }) Return (RBUF) /* \_SB_.PCI0.I2C5.DEV_.ROTM.RBUF */ } Reported-by: Darrell Kavanagh Signed-off-by: Jonathan Cameron Tested-by: Darrell Kavanagh Link: https://lore.kernel.org/r/20230130201018.981024-3-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 50e9cc9a4a1798371bafabcc1ba7dfd882c71b2f Author: Jeffrey Hugo Date: Wed Apr 12 07:57:44 2023 -0600 Revert "accel/qaic: Add mhi_qaic_cntl" This reverts commit 566fc96198b4bb07ca6806386956669881225271. This exposes a userspace API that is still under debate. Revert the change before the uAPI gets exposed to avoid making a mistake. QAIC is otherwise still functional. Suggested-by: Daniel Vetter Signed-off-by: Jeffrey Hugo Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Stanislaw Gruszka Acked-by: Daniel Vetter Acked-by: Greg Kroah-Hartman Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/1681307864-3782-1-git-send-email-quic_jhugo@quicinc.com commit e60d63e32d239c4c20b370106b57079d7f0994cf Author: Tina Zhang Date: Thu Apr 13 12:06:45 2023 +0800 iommu/vt-d: Remove BUG_ON in dmar_insert_dev_scope() The dmar_insert_dev_scope() could fail if any unexpected condition is encountered. However, in this situation, the kernel should attempt recovery and proceed with execution. Remove BUG_ON with WARN_ON, so that kernel can avoid being crashed when an unexpected condition occurs. Signed-off-by: Tina Zhang Link: https://lore.kernel.org/r/20230406065944.2773296-8-tina.zhang@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit ff45ab96465f013bee39ac88b756bb1129a7bc9d Author: Tina Zhang Date: Thu Apr 13 12:06:44 2023 +0800 iommu/vt-d: Remove a useless BUG_ON(dev->is_virtfn) When dmar_alloc_pci_notify_info() is being invoked, the invoker has ensured the dev->is_virtfn is false. So, remove the useless BUG_ON in dmar_alloc_pci_notify_info(). Signed-off-by: Tina Zhang Link: https://lore.kernel.org/r/20230406065944.2773296-7-tina.zhang@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit cbf2f9e8badd483e2ee17a56ad8dbd1cfdcead20 Author: Tina Zhang Date: Thu Apr 13 12:06:43 2023 +0800 iommu/vt-d: Remove BUG_ON in map/unmap() Domain map/unmap with invalid parameters shouldn't crash the kernel. Therefore, using if() replaces the BUG_ON. Signed-off-by: Tina Zhang Link: https://lore.kernel.org/r/20230406065944.2773296-6-tina.zhang@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 998d4c2db30c7279ce6070faf06b914c98f2ae30 Author: Tina Zhang Date: Thu Apr 13 12:06:42 2023 +0800 iommu/vt-d: Remove BUG_ON when domain->pgd is NULL When performing domain_context_mapping or getting dma_pte of a pfn, the availability of the domain page table directory is ensured. Therefore, the domain->pgd checkings are unnecessary. Signed-off-by: Tina Zhang Link: https://lore.kernel.org/r/20230406065944.2773296-5-tina.zhang@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 4a627a2593b457336047c6803b5d5c097183a9ca Author: Tina Zhang Date: Thu Apr 13 12:06:41 2023 +0800 iommu/vt-d: Remove BUG_ON in handling iotlb cache invalidation VT-d iotlb cache invalidation request with unexpected type is considered as a bug to developers, which can be fixed. So, when such kind of issue comes out, it needs to be reported through the kernel log, instead of halting the system. Replacing BUG_ON with warning reporting. Signed-off-by: Tina Zhang Link: https://lore.kernel.org/r/20230406065944.2773296-4-tina.zhang@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 35dc5d8998efa0f87a25bb184a9c54c46100fec3 Author: Tina Zhang Date: Thu Apr 13 12:06:40 2023 +0800 iommu/vt-d: Remove BUG_ON on checking valid pfn range When encountering an unexpected invalid pfn range, the kernel should attempt recovery and proceed with execution. Therefore, using WARN_ON to replace BUG_ON to avoid halting the machine. Besides, one redundant checking is reduced. Signed-off-by: Tina Zhang Link: https://lore.kernel.org/r/20230406065944.2773296-3-tina.zhang@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit b31064f881eec6047874ef58df4376b20432859c Author: Tina Zhang Date: Thu Apr 13 12:06:39 2023 +0800 iommu/vt-d: Make size of operands same in bitwise operations This addresses the following issue reported by klocwork tool: - operands of different size in bitwise operations Suggested-by: Yongwei Ma Signed-off-by: Tina Zhang Link: https://lore.kernel.org/r/20230406065944.2773296-2-tina.zhang@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 113a031becc8a1b904d7fd873fb3d329f203d2f0 Author: Jacob Pan Date: Thu Apr 13 12:06:38 2023 +0800 iommu/vt-d: Remove PASID supervisor request support There's no more usage, remove PASID supervisor support. Suggested-by: Lu Baolu Reviewed-by: Lu Baolu Signed-off-by: Jacob Pan Link: https://lore.kernel.org/r/20230331231137.1947675-3-jacob.jun.pan@linux.intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit a7050fbde36e0634f89d41e6384c140fe4ae011e Author: Jacob Pan Date: Thu Apr 13 12:06:37 2023 +0800 iommu/vt-d: Use non-privileged mode for all PASIDs Supervisor Request Enable (SRE) bit in a PASID entry is for permission checking on DMA requests. When SRE = 0, DMA with supervisor privilege will be blocked. However, for in-kernel DMA this is not necessary in that we are targeting kernel memory anyway. There's no need to differentiate user and kernel for in-kernel DMA. Let's use non-privileged (user) permission for all PASIDs used in kernel, it will be consistent with DMA without PASID (RID_PASID) as well. Signed-off-by: Jacob Pan Link: https://lore.kernel.org/r/20230331231137.1947675-2-jacob.jun.pan@linux.intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit a06c2ecec113fa882f48eb71e9d7e8fb520b1c78 Author: Lu Baolu Date: Thu Apr 13 12:06:36 2023 +0800 iommu/vt-d: Remove extern from function prototypes The kernel coding style does not require 'extern' in function prototypes in .h files, so remove them from drivers/iommu/intel/iommu.h as they are not needed. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230331045452.500265-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 41d71e09a155a05bd9bec08dd195d8d8e0146ad8 Author: Christophe JAILLET Date: Thu Apr 13 12:06:35 2023 +0800 iommu/vt-d: Do not use GFP_ATOMIC when not needed There is no need to use GFP_ATOMIC here. GFP_KERNEL is already used for some other memory allocations just a few lines above. Commit e3a981d61d15 ("iommu/vt-d: Convert allocations to GFP_KERNEL") has changed the other memory allocation flags. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/e2a8a1019ffc8a86b4b4ed93def3623f60581274.1675542576.git.christophe.jaillet@wanadoo.fr Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 7b8aa998d627afeef576ab61bf8e286f56439bb2 Author: Lu Baolu Date: Thu Apr 13 12:06:34 2023 +0800 iommu/vt-d: Remove unnecessary checks in iopf disabling path iommu_unregister_device_fault_handler() and iopf_queue_remove_device() are called after device has stopped issuing new page falut requests and all outstanding page requests have been drained. They should never fail. Trigger a warning if it happens unfortunately. Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230324120234.313643-7-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit fbcde5bb92bd3d299688d615dce26c59d3f63694 Author: Lu Baolu Date: Thu Apr 13 12:06:33 2023 +0800 iommu/vt-d: Move PRI handling to IOPF feature path PRI is only used for IOPF. With this move, the PCI/PRI feature could be controlled by the device driver through iommu_dev_enable/disable_feature() interfaces. Reviewed-by: Jacob Pan Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230324120234.313643-6-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 5ae4008055fed503f7bf42aeed45d3b032a79876 Author: Lu Baolu Date: Thu Apr 13 12:06:32 2023 +0800 iommu/vt-d: Move pfsid and ats_qdep calculation to device probe path They should be part of the per-device iommu private data initialization. Reviewed-by: Jacob Pan Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230324120234.313643-5-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 3d4c7cc3d168dc728dd3472688b2360b6db124e3 Author: Lu Baolu Date: Thu Apr 13 12:06:31 2023 +0800 iommu/vt-d: Move iopf code from SVA to IOPF enabling path Generally enabling IOMMU_DEV_FEAT_SVA requires IOMMU_DEV_FEAT_IOPF, but some devices manage I/O Page Faults themselves instead of relying on the IOMMU. Move IOPF related code from SVA to IOPF enabling path. For the device drivers that relies on the IOMMU for IOPF through PCI/PRI, IOMMU_DEV_FEAT_IOPF must be enabled before and disabled after IOMMU_DEV_FEAT_SVA. Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230324120234.313643-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit a86fb7717320bf2c05701cbcfaab5afc452d1480 Author: Lu Baolu Date: Thu Apr 13 12:06:30 2023 +0800 iommu/vt-d: Allow SVA with device-specific IOPF Currently enabling SVA requires IOPF support from the IOMMU and device PCI PRI. However, some devices can handle IOPF by itself without ever sending PCI page requests nor advertising PRI capability. Allow SVA support with IOPF handled either by IOMMU (PCI PRI) or device driver (device-specific IOPF). As long as IOPF could be handled, SVA should continue to work. Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230324120234.313643-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 84c9ef72b64d9bd0d8a219a75019ec4c2da77a08 Author: Lu Baolu Date: Thu Apr 13 12:06:29 2023 +0800 dmaengine: idxd: Add enable/disable device IOPF feature The iommu subsystem requires IOMMU_DEV_FEAT_IOPF must be enabled before and disabled after IOMMU_DEV_FEAT_SVA, if device's I/O page faults rely on the IOMMU. Add explicit IOMMU_DEV_FEAT_IOPF enabling/disabling in this driver. At present, missing IOPF enabling/disabling doesn't cause any real issue, because the IOMMU driver places the IOPF enabling/disabling in the path of SVA feature handling. But this may change. Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu Reviewed-by: Kevin Tian Acked-by: Vinod Koul Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230324120234.313643-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 391d0feb3b55912218163c8fb6d3311f405270a8 Merge: e8d018dd0257f ca08b2a65b5cf Author: Joerg Roedel Date: Thu Apr 13 12:01:05 2023 +0200 Merge tag 'arm-smmu-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu Arm SMMU updates for 6.4 - Device-tree binding updates: * Allow Qualcomm GPU SMMUs to accept relevant clock properties * Document Qualcomm 8550 SoC as implementing an MMU-500 * Favour new "qcom,smmu-500" binding for Adreno SMMUs - Fix S2CR quirk detection on non-architectural Qualcomm SMMU implementations - Acknowledge SMMUv3 PRI queue overflow when consuming events - Document (in a comment) why ATS is disabled for bypass streams commit f543028451d1361b7e6ab45b42503a31047c3102 Author: Yong Wu Date: Tue Apr 11 17:31:44 2023 +0800 arm64: dts: mt8186: Add dma-ranges for the parent "soc" node Prepare for the MM nodes whose dma-ranges(iova range) is 16GB. Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230411093144.2690-15-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit 88c531b42a986c02a2630b84521d3dfe19b01686 Author: Yong Wu Date: Tue Apr 11 17:31:43 2023 +0800 arm64: dts: mt8195: Add dma-ranges for the parent "soc" node After commit f1ad5338a4d5 ("of: Fix "dma-ranges" handling for bus controllers"), the dma-ranges property is not allowed for the leaf node. But our iommu/dma-ranges is 16GB, we still expect separate the 16GB dma-range like: a) display is in 0 - 4GB; b) vcodec is in 4GB - 8GB; c) camera is in 8GB - 12GB. We can not expect all the masters add a parent node for them, especial for the existed drivers/nodes. Thus, we add whole the 16GB dma-ranges in the parent "soc" node. Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230411093144.2690-14-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit 2aa6e5f63ea2b1768afbde763a948534c190254e Author: Yong Wu Date: Tue Apr 11 17:31:42 2023 +0800 arm64: dts: mt8195: Remove the unnecessary dma-ranges After we add the dma-ranges in the parent "soc" node, this property is unnecessary for the leaf node. Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230411093144.2690-13-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit aa0ee7b4d5221127a0fe80afb716a1ac72473d72 Author: Yong Wu Date: Tue Apr 11 17:31:41 2023 +0800 media: mediatek: vcodec: Remove the setting for dma_mask In order to simplify the masters to set their respective dma masks, MTK IOMMU helps to centralize the processing. Because all the dma ranges is set in IOMMU, IOMMU knows well the dma mask requirements of masters. After this patch, the masters(codec here) code does not need care dma-ranges/dma_mask related information. Cc: Tiffany Lin Cc: Andrew-CT Chen Cc: Yunfei Dong Cc: Mauro Carvalho Chehab Cc: irui wang Signed-off-by: Yong Wu Acked-by: Hans Verkuil Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230411093144.2690-12-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit 7d35584d9c6d2a78d8ab95450fafec40620ddf19 Author: Yong Wu Date: Tue Apr 11 17:31:40 2023 +0800 media: mtk-jpegdec: Remove the setting for dma_mask In order to simplify the masters to set their respective dma masks, MTK IOMMU helps to centralize the processing. Because all the dma ranges is set in IOMMU, IOMMU knows well the dma mask requirements of masters. After this patch, the masters code does not need care dma-ranges/dma_mask related information. Cc: Bin Liu Cc: Mauro Carvalho Chehab Cc: kyrie wu Signed-off-by: Yong Wu Acked-by: Hans Verkuil Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230411093144.2690-11-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit f7da2da8675b061f9397f2701c6cc21cb908291b Author: Yong Wu Date: Tue Apr 11 17:31:39 2023 +0800 iommu/mediatek: Set dma_mask for the master devices MediaTek iommu arranges dma ranges for all the masters, this patch is to help them set dma mask. This is to avoid each master setting their own mask, but also to avoid a real issue, such as JPEG uses "mediatek,mtk-jpgenc" for 2701/8183/8186/8188, then JPEG could ignore its different dma_mask in different SoC to achieve common code. Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230411093144.2690-10-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit 3df9bdd4ae8e41b526906f2f6e9fa2470a9bbbe0 Author: Yong Wu Date: Tue Apr 11 17:31:38 2023 +0800 iommu/mediatek: Add a gap for the iova regions As the removed property in the vcodec dt-binding, the property is: dma-ranges = <0x1 0x0 0x0 0x40000000 0x0 0xfff00000>; The length is 0xfff0_0000 rather than 0x1_0000_0000, this means it requires 1M as a gap. This is because the end address for some vcodec HW is (address + size). If the size is 4G, the end address may be 0x2_0000_0000, and the width for vcodec register only is 32, then the HW may get the ZERO address. Currently the consumer's dma-ranges property doesn't work, IOMMU has to consider this case. Add a bigger gap(8M) for all the regions to avoid it. Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230411093144.2690-9-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit f5d4233ad373a1b0ab7c5d10f9b6e79619ecf194 Author: Yong Wu Date: Tue Apr 11 17:31:37 2023 +0800 iommu/mediatek: mt8186: Add iova_region_larb_msk Add iova_region_larb_msk for mt8186. We separate the 16GB iova regions by each device's larbid/portid. Note: larb5/6/10/12/14/15/18 connect nothing in this SoC. Refer to include/dt-bindings/memory/mt8186-memory-port.h Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230411093144.2690-8-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit a43e767d4e1b913a22a80074a703bd29c644a41b Author: Yong Wu Date: Tue Apr 11 17:31:36 2023 +0800 iommu/mediatek: mt8195: Add iova_region_larb_msk Add iova_region_larb_msk for mt8195. We separate the 16GB iova regions by each device's larbid/portid. Refer to include/dt-bindings/memory/mt8195-memory-port.h Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230411093144.2690-7-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit 6b1317f92874cc82719d9f38b7c298dadfc16a6b Author: Yong Wu Date: Tue Apr 11 17:31:35 2023 +0800 iommu/mediatek: mt8192: Add iova_region_larb_msk Add iova_region_larb_msk for mt8192. We separate the 16GB iova regions by each device's larbid/portid. Note: larb3/6/8/10/12/15 connect nothing in this SoC. Refer to the comment in include/dt-bindings/memory/mt8192-larb-port.h Define a new macro MT8192_MULTI_REGION_NR_MAX to indicate the index of mt8xxx_larb_region_msk and "struct mtk_iommu_iova_region mt8192_multi_dom" are the same. Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230411093144.2690-6-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit b2a6876d215b3e980d8ac89ccc704667ad266205 Author: Yong Wu Date: Tue Apr 11 17:31:34 2023 +0800 iommu/mediatek: Get regionid from larb/port id After commit f1ad5338a4d5 ("of: Fix "dma-ranges" handling for bus controllers"), the dma-ranges is not allowed for dts leaf node. but we still would like to separate to different masters into different iova regions. Thus we have to separate it by the HW larbid and portid. For example, larb1/2 are in region2 and larb3 is in region3. The problem is that some ports inside a larb are in region4 while some ports inside this larb are in region5. Therefore I define a "iova_region_larb_msk" to help record the information for each a port. Take a example for a larb: [1] = ~0: means all ports in this larb are in region1; [2] = BIT(3) | BIT(4): means port3/4 in this larb are region2; [3] = ~(BIT(3) | BIT(4)): means all the other ports except port3/4 in this larb are region3. This method also avoids the users forget/abuse the iova regions. Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230411093144.2690-5-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit ae6693453ac665015929d2b05104d5a2951375af Author: Yong Wu Date: Tue Apr 11 17:31:33 2023 +0800 iommu/mediatek: Improve comment for the current region/bank No functional change. Just add more comment about the current region/bank in the code. Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230411093144.2690-4-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit 559549b1f250a1b5bec3c6c3a9354deead371bde Author: Yong Wu Date: Tue Apr 11 17:31:32 2023 +0800 dt-bindings: media: mediatek,jpeg: Remove dma-ranges property After commit f1ad5338a4d5 ("of: Fix "dma-ranges" handling for bus controllers"), the dma-ranges of the leaf node doesn't work. Remove it for jpeg here. Currently there is only mt8195 jpeg node has this property in upstream, and it already uses parent-child node, this property did work. But instead, MediaTek iommu will control the masters' iova ranges by the master's larb/port id internally, then this property is unnecessary. Cc: Mauro Carvalho Chehab Cc: Matthias Brugger Cc: Bin Liu Cc: kyrie wu Cc: Xia Jiang Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Reviewed-by: Hans Verkuil Link: https://lore.kernel.org/r/20230411093144.2690-3-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit e494245c756e270e3450983b654c38e6f8aa0b18 Author: Yong Wu Date: Tue Apr 11 17:31:31 2023 +0800 dt-bindings: media: mediatek,vcodec: Remove dma-ranges property After commit f1ad5338a4d5 ("of: Fix "dma-ranges" handling for bus controllers"), the dma-ranges of the leaf node doesn't work. Remove it for vcodec here. For mediatek,vcodec-decoder.yaml and mediatek,vcodec-encoder.yaml, this property is in the leaf node, it is invalid as the above comment. Currently there is only mt8195 VENC node has this property in upstream. Indeed, VENC is affected, but it is not a fatal issue. Originally it expects its iova range locate at 4GB-8GB. However after that commit, its expectation doesn't come true, it will fall back to 0-4GB iova and also could work well. Cc: Tiffany Lin Cc: Andrew-CT Chen Cc: Yunfei Dong Cc: Mauro Carvalho Chehab Cc: Matthias Brugger Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Acked-by: Hans Verkuil Link: https://lore.kernel.org/r/20230411093144.2690-2-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit ccc62b827775915a9b82db42a29813d04f92df7a Author: Kishon Vijay Abraham I Date: Wed Apr 5 13:03:17 2023 +0000 iommu/amd: Fix "Guest Virtual APIC Table Root Pointer" configuration in IRTE commit b9c6ff94e43a ("iommu/amd: Re-factor guest virtual APIC (de-)activation code") while refactoring guest virtual APIC activation/de-activation code, stored information for activate/de-activate in "struct amd_ir_data". It used 32-bit integer data type for storing the "Guest Virtual APIC Table Root Pointer" (ga_root_ptr), though the "ga_root_ptr" is actually a 40-bit field in IRTE (Interrupt Remapping Table Entry). This causes interrupts from PCIe devices to not reach the guest in the case of PCIe passthrough with SME (Secure Memory Encryption) enabled as _SME_ bit in the "ga_root_ptr" is lost before writing it to the IRTE. Fix it by using 64-bit data type for storing the "ga_root_ptr". While at that also change the data type of "ga_tag" to u32 in order to match the IOMMU spec. Fixes: b9c6ff94e43a ("iommu/amd: Re-factor guest virtual APIC (de-)activation code") Cc: stable@vger.kernel.org # v5.4+ Reported-by: Alejandro Jimenez Reviewed-by: Suravee Suthikulpanit Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20230405130317.9351-1-kvijayab@amd.com Signed-off-by: Joerg Roedel commit 8f880d19e6ad645a4b8066d5ff091c980b3231e7 Author: Jerry Snitselaar Date: Tue Apr 4 00:27:42 2023 -0700 iommu/amd: Set page size bitmap during V2 domain allocation With the addition of the V2 page table support, the domain page size bitmap needs to be set prior to iommu core setting up direct mappings for reserved regions. When reserved regions are mapped, if this is not done, it will be looking at the V1 page size bitmap when determining the page size to use in iommu_pgsize(). When it gets into the actual amd mapping code, a check of see if the page size is supported can fail, because at that point it is checking it against the V2 page size bitmap which only supports 4K, 2M, and 1G. Add a check to __iommu_domain_alloc() to not override the bitmap if it was already set by the iommu ops domain_alloc() code path. Cc: Vasant Hegde Cc: Suravee Suthikulpanit Cc: Robin Murphy Cc: Will Deacon Cc: Joerg Roedel Fixes: 4db6c41f0946 ("iommu/amd: Add support for using AMD IOMMU v2 page table for DMA-API") Signed-off-by: Jerry Snitselaar Reviewed-by: Vasant Hegde Link: https://lore.kernel.org/r/20230404072742.1895252-1-jsnitsel@redhat.com Signed-off-by: Joerg Roedel commit 25c2325575cc7f960c9f81f2b77606478f6b911f Author: Steven Price Date: Fri Mar 31 10:51:54 2023 +0100 iommu/rockchip: Add missing set_platform_dma_ops callback Similar to exynos, we need a set_platform_dma_ops() callback for proper operation on ARM 32 bit after recent changes in the IOMMU framework (detach ops removal). But also the use of a NULL domain is confusing. Rework the code to add support for IOMMU_DOMAIN_IDENTITY and a singleton rk_identity_domain which is assigned to domain when using an identity mapping rather than "detaching". This makes the code easier to reason about. Signed-off-by: Steven Price Acked-by: Heiko Stuebner Tested-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230331095154.2671129-1-steven.price@arm.com Signed-off-by: Joerg Roedel commit 5e799a7ceed815e71e364b22d0bc5efe3a9ed39f Author: Christophe JAILLET Date: Sun Mar 26 14:37:50 2023 +0200 iommu/exynos: Use the devm_clk_get_optional() helper Use devm_clk_get_optional() instead of hand writing it. This saves some loC and improves the semantic. Signed-off-by: Christophe JAILLET Acked-by: Marek Szyprowski Link: https://lore.kernel.org/r/99c0d5ce643737ee0952df41fd60433a0bbeb447.1679834256.git.christophe.jaillet@wanadoo.fr Signed-off-by: Joerg Roedel commit 9e4fa80ab7ef9eb4f7b1ea9fc31e0eb040e85e25 Author: Heiner Kallweit Date: Tue Apr 11 07:34:11 2023 +0200 pwm: meson: Fix g12a ao clk81 name Fix the name of the aoclk81 clock. Apparently name aoclk81 as used by the vendor driver was changed when mainlining the g12a clock driver. Fixes: f41efceb46e6 ("pwm: meson: Add clock source configuration for Meson G12A") Cc: stable@vger.kernel.org Signed-off-by: Heiner Kallweit Reviewed-by: Martin Blumenstingl Signed-off-by: Thierry Reding commit eb411c0cf59ae6344b34bc6f0d298a22b300627e Author: Heiner Kallweit Date: Sun Apr 9 17:15:52 2023 +0200 pwm: meson: Fix axg ao mux parents This fix is basically the same as 9bce02ef0dfa ("pwm: meson: Fix the G12A AO clock parents order"). Vendor driver referenced there has xtal as first parent also for axg ao. In addition fix the name of the aoclk81 clock. Apparently name aoclk81 as used by the vendor driver was changed when mainlining the axg clock driver. Fixes: bccaa3f917c9 ("pwm: meson: Add clock source configuration for Meson-AXG") Cc: stable@vger.kernel.org Signed-off-by: Heiner Kallweit Reviewed-by: Martin Blumenstingl Signed-off-by: Thierry Reding commit f032d8a9c8b353806366cb3786512b80f478efab Author: Ivan Vecera Date: Tue Apr 11 14:04:42 2023 +0200 bnxt_en: Allow to set switchdev mode without existing VFs Remove an inability of bnxt_en driver to set eswitch to switchdev mode without existing VFs by: 1. Allow to set switchdev mode in bnxt_dl_eswitch_mode_set() so representors are created only when num_vfs > 0 otherwise just set bp->eswitch_mode 2. Do not automatically change bp->eswitch_mode during bnxt_vf_reps_create() and bnxt_vf_reps_destroy() calls so the eswitch mode is managed only by an user by devlink. Just set temporarily bp->eswitch_mode to legacy to avoid re-opening of representors during destroy. 3. Create representors in bnxt_sriov_enable() if current eswitch mode is switchdev one Tested by this sequence: 1. Set PF interface up 2. Set PF's eswitch mode to switchdev 3. Created N VFs 4. Checked that N representors were created 5. Set eswitch mode to legacy 6. Checked that representors were deleted 7. Set eswitch mode back to switchdev 8. Checked that representors exist again for VFs 9. Deleted all VFs 10. Checked that all representors were deleted as well 11. Checked that current eswitch mode is still switchdev Signed-off-by: Ivan Vecera Acked-by: Venkat Duvvuru Link: https://lore.kernel.org/r/20230411120443.126055-1-ivecera@redhat.com Signed-off-by: Paolo Abeni commit 04ebdc354895e1609ac133b40f8e8d2e0f16e450 Author: Rob Herring Date: Mon Apr 10 18:27:26 2023 -0500 bus: vexpress-config: Add explicit of_platform.h include vexpress-config uses of_platform_* functions which are declared in of_platform.h. of_platform.h gets implicitly included by of_device.h, but that is going to be removed soon. Nothing else depends on of_device.h so it can be dropped. Signed-off-by: Rob Herring Acked-by: Liviu Dudau Link: https://lore.kernel.org/r/20230410232727.1562115-1-robh@kernel.org Signed-off-by: Sudeep Holla commit e103d55465db06c5344201fd5fa11bb19bc479c5 Author: Radu Rendec Date: Wed Apr 12 14:57:59 2023 -0400 cacheinfo: Allow early level detection when DT/ACPI info is missing/broken Recent work enables cacheinfo memory for secondary CPUs to be allocated early, while still running on the primary CPU. That allows cacheinfo memory to be allocated safely on RT kernels. To make that work, the number of cache levels/leaves must be defined in the device tree or ACPI tables. Further work adds a path for early detection of the number of cache levels/leaves, which makes it possible to allocate the cacheinfo memory early without requiring extra DT/ACPI information. This patch addresses a specific issue with ACPI systems with no PPTT. In that case, parse_acpi_topology() returns an error code, which in turn makes init_cpu_topology() return early, before fetch_cache_info() is called. In that case, the early cache level detection doesn't run. The solution is to simply remove the "return" statement and let the code flow fall through to calling fetch_cache_info(). Signed-off-by: Radu Rendec Reported-by: Pierre Gondois Link: https://lore.kernel.org/all/dea94484-797f-3034-7b86-6d88801c0d91@arm.com/ Reviewed-by: Pierre Gondois Link: https://lore.kernel.org/r/20230412185759.755408-4-rrendec@redhat.com Signed-off-by: Sudeep Holla commit c931680cfa958c8fe9ace31a1dbeefff75597d54 Author: Radu Rendec Date: Wed Apr 12 14:57:58 2023 -0400 cacheinfo: Add arm64 early level initializer implementation This patch adds an architecture specific early cache level detection handler for arm64. This is basically the CLIDR_EL1 based detection that was previously done (only) in init_cache_level(). This is part of a patch series that attempts to further the work in commit 5944ce092b97 ("arch_topology: Build cacheinfo from primary CPU"). Previously, in the absence of any DT/ACPI cache info, architecture specific cache detection and info allocation for secondary CPUs would happen in non-preemptible context during early CPU initialization and trigger a "BUG: sleeping function called from invalid context" splat on an RT kernel. This patch does not solve the problem completely for RT kernels. It relies on the assumption that on most systems, the CPUs are symmetrical and therefore have the same number of cache leaves. The cacheinfo memory is allocated early (on the primary CPU), relying on the new handler. If later (when CLIDR_EL1 based detection runs again on the secondary CPU) the initial assumption proves to be wrong and the CPU has in fact more leaves, the cacheinfo memory is reallocated, and that still triggers a splat on an RT kernel. In other words, asymmetrical CPU systems *must* still provide cacheinfo data in DT/ACPI to avoid the splat on RT kernels (unless secondary CPUs happen to have less leaves than the primary CPU). But symmetrical CPU systems (the majority) can now get away without the additional DT/ACPI data and rely on CLIDR_EL1 based detection. Signed-off-by: Radu Rendec Reviewed-by: Pierre Gondois Link: https://lore.kernel.org/r/20230412185759.755408-3-rrendec@redhat.com Signed-off-by: Sudeep Holla commit 6539cffa94957241c096099a57d05fa4d8c7db8a Author: Radu Rendec Date: Wed Apr 12 14:57:57 2023 -0400 cacheinfo: Add arch specific early level initializer This patch gives architecture specific code the ability to initialize the cache level and allocate cacheinfo memory early, when cache level initialization runs on the primary CPU for all possible CPUs. This is part of a patch series that attempts to further the work in commit 5944ce092b97 ("arch_topology: Build cacheinfo from primary CPU"). Previously, in the absence of any DT/ACPI cache info, architecture specific cache detection and info allocation for secondary CPUs would happen in non-preemptible context during early CPU initialization and trigger a "BUG: sleeping function called from invalid context" splat on an RT kernel. More specifically, this patch adds the early_cache_level() function, which is called by fetch_cache_info() as a fallback when the number of cache leaves cannot be extracted from DT/ACPI. In the default generic (weak) implementation, this new function returns -ENOENT, which preserves the original behavior for architectures that do not implement the function. Since early detection can get the number of cache leaves wrong in some cases*, additional logic is added to still call init_cache_level() later on the secondary CPU, therefore giving the architecture specific code an opportunity to go back and fix the initial guess. Again, the original behavior is preserved for architectures that do not implement the new function. * For example, on arm64, CLIDR_EL1 detection works only when it runs on the current CPU. In other words, a CPU cannot detect the cache depth for any other CPU than itself. Signed-off-by: Radu Rendec Reviewed-by: Pierre Gondois Link: https://lore.kernel.org/r/20230412185759.755408-2-rrendec@redhat.com Signed-off-by: Sudeep Holla commit 55b5bac15939dec3cbcbee1f6271bc3a4afd4534 Author: Marc Zyngier Date: Sat Apr 8 17:04:23 2023 +0100 KVM: arm64: nvhe: Synchronise with page table walker on vcpu run When taking an exception between the EL1&0 translation regime and the EL2 translation regime, the page table walker is allowed to complete the walks started from EL0 or EL1 while running at EL2. It means that altering the system registers that define the EL1&0 translation regime is fraught with danger *unless* we wait for the completion of such walk with a DSB (R_LFHQG and subsequent statements in the ARM ARM). We already did the right thing for other external agents (SPE, TRBE), but not the PTW. Rework the existing SPE/TRBE synchronisation to include the PTW, and add the missing DSB on guest exit. Signed-off-by: Marc Zyngier Reviewed-by: Oliver Upton commit 7d4f0b0df7c5ec0cec834f87591423a7bbd1bab2 Author: Chia-Wei Wang Date: Mon Mar 20 16:11:33 2023 +0800 ARM: dts: aspeed-g6: Add UDMA node Add the device tree node for the UART DMA (UDMA) controller. Signed-off-by: Chia-Wei Wang Link: https://lore.kernel.org/r/20230320081133.23655-6-chiawei_wang@aspeedtech.com Signed-off-by: Joel Stanley commit 8d250f34cd2678acfa249a10b92fa5976b61336f Author: Delphine CC Chiu Date: Wed Mar 29 16:32:35 2023 +0800 ARM: dts: aspeed: greatlakes: add mctp device Add mctp node on I2C bus Signed-off-by: Delphine CC Chiu Link: https://lore.kernel.org/r/20230329083235.24123-3-Delphine_CC_Chiu@Wiwynn.com Signed-off-by: Joel Stanley commit 2ecdcd68e3871af219793e4ae35f9e96f3feb9a6 Author: Delphine CC Chiu Date: Wed Mar 29 16:32:34 2023 +0800 ARM: dts: aspeed: greatlakes: Add gpio names Add GPIO names for SOC lines. Signed-off-by: Delphine CC Chiu Link: https://lore.kernel.org/r/20230329083235.24123-2-Delphine_CC_Chiu@Wiwynn.com Signed-off-by: Joel Stanley commit 9bdc19fb94581fb805f5033825f41c363f5c3e85 Author: Lakshmi Yadlapati Date: Wed Apr 12 00:23:05 2023 -0500 ARM: dts: aspeed: p10bmc: Change power supply info Bonnell system supports new ACBEL FSG032 power supply on I2C addresses 5A and 5B. Update the device tree with new power supply information and device addresses. Signed-off-by: Lakshmi Yadlapati Reviewed-by: Eddie James Link: https://lore.kernel.org/r/20230412052305.1369521-6-lakshmiy@us.ibm.com Signed-off-by: Joel Stanley commit 4f86a6ff6fbd891232dda3ca97fd1b9630b59809 Author: Ming Lei Date: Wed Apr 12 16:49:04 2023 +0800 nvme-fcloop: fix "inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage" fcloop_fcp_op() could be called from flush request's ->end_io(flush_end_io) in which the spinlock of fq->mq_flush_lock is grabbed with irq saved/disabled. So fcloop_fcp_op() can't call spin_unlock_irq(&tfcp_req->reqlock) simply which enables irq unconditionally. Fixes the warning by switching to spin_lock_irqsave()/spin_unlock_irqrestore() Fixes: c38dbbfab1bc ("nvme-fcloop: fix inconsistent lock state warnings") Reported-by: Yi Zhang Signed-off-by: Ming Lei Reviewed-by: Ewan D. Milne Tested-by: Yi Zhang Signed-off-by: Christoph Hellwig commit edde9e70bb48301c853299f1bd7c0aa0745a38ea Author: Sagi Grimberg Date: Wed Mar 22 14:37:03 2023 +0200 blk-mq-rdma: remove queue mapping helper for rdma devices No rdma device exposes its irq vectors affinity today. So the only mapping that we have left, is the default blk_mq_map_queues, which we fallback to anyways. Also fixup the only consumer of this helper (nvme-rdma). Remove this now dead code. Signed-off-by: Sagi Grimberg Acked-by: Keith Busch Signed-off-by: Christoph Hellwig commit 015ad2b1e4b9e04628b459ad8d5324673f6cbc9f Author: zhenwei pi Date: Fri Apr 7 17:15:57 2023 +0800 nvme-rdma: minor cleanup in nvme_rdma_create_cq() Before cleanup: enum ib_poll_context poll_ctx; if (nvme_rdma_poll_queue(queue)) { poll_ctx = IB_POLL_DIRECT; queue->ib_cq = ib_alloc_cq(ibdev, queue, queue->cq_size, comp_vector, poll_ctx); } else { poll_ctx = IB_POLL_SOFTIRQ; queue->ib_cq = ib_cq_pool_get(ibdev, queue->cq_size, comp_vector, poll_ctx); } After cleanup: if (nvme_rdma_poll_queue(queue)) queue->ib_cq = ib_alloc_cq(ibdev, queue, queue->cq_size, comp_vector, IB_POLL_DIRECT); else queue->ib_cq = ib_cq_pool_get(ibdev, queue->cq_size, comp_vector, IB_POLL_SOFTIRQ); IB_POLL_SOFTIRQ/IB_POLL_SOFTIRQ gets used directly in function, this seems more accessible. Signed-off-by: zhenwei pi Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit d4f1d5f7a4d8d998739c3d699476cd0247d580c6 Author: Lei Yin Date: Thu Apr 6 23:39:11 2023 +0800 nvme: fix double blk_mq_complete_request for timeout request with low probability When nvme_cancel_tagset traverses all tagsets and executes nvme_cancel_request, this request may be executing blk_mq_free_request that is called by nvme_rdma_complete_timed_out/nvme_tcp_complete_timed_out. When blk_mq_free_request executes to WRITE_ONCE(rq->state, MQ_RQ_IDLE) and __blk_mq_free_request(rq), it will cause double blk_mq_complete_request for this request, and it will cause a null pointer error in the second execution of this function because rq->mq_hctx has set to NULL in first execution. Signed-off-by: Lei Yin Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 6622b76fe922b94189499a90ccdb714a4a8d0773 Author: Keith Busch Date: Wed Apr 5 14:57:20 2023 -0700 nvme: fix async event trace event Mixing AER Event Type and Event Info has masking clashes. Just print the event type, but also include the event info of the AER result in the trace. Fixes: 09bd1ff4b15143b ("nvme-core: add async event trace helper") Reported-by: Nate Thornton Reviewed-by: Sagi Grimberg Reviewed-by: Minwoo Im Reviewed-by: Chaitanya Kulkarni Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig commit cf806e3ab1c1878e357fd91205e020ea0dfdafe6 Author: Chaitanya Kulkarni Date: Sun Mar 26 22:48:38 2023 -0700 nvme-apple: return directly instead of else There is no need for the else when direct return is used at the end of the function. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Eric Curtin Signed-off-by: Christoph Hellwig commit 2ce525d40aa61c87884b100995e59ba68b4ea059 Author: Chaitanya Kulkarni Date: Sun Mar 26 22:48:37 2023 -0700 nvme-apple: return directly instead of else There is no need for the else when direct return is used at the end of the function. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Eric Curtin Signed-off-by: Christoph Hellwig commit 6fe240bc0d97902ecebd811bb22bd85b36d75ee2 Author: Chaitanya Kulkarni Date: Sun Mar 26 22:37:24 2023 -0700 nvmet-tcp: validate idle poll modparam value The module parameter idle_poll_period_usecs is passed to the function usecs_to_jiffies() which has following prototype and expect idle_poll_period_usecs arg type to be unsigned int:- unsigned long usecs_to_jiffies(const unsigned int u); Use similar module parameter validation callback as previous patch. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 44aef3b850757a371adde7e47c5c243d3988aa73 Author: Chaitanya Kulkarni Date: Sun Mar 26 22:37:23 2023 -0700 nvmet-tcp: validate so_priority modparam value The module parameter so_priority is passed to the function sock_set_priority() which has following prototype and expect priotity arg type to be u32:- void sock_set_priority(struct sock *sk, u32 priority); Add a module parameter validation callback to reject any negative values for the so_priority as it is defigned as int. Use this oppurtunity to update the module parameter description and print the default value. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit aeacfcefa218f4ed11da478e9b7915a37d1afaff Author: Chris Leech Date: Tue Mar 21 09:30:25 2023 -0700 nvme-tcp: fence TCP socket on receive error Ensure that no further socket reads occur after a receive processing error, either from io_work being re-scheduled or nvme_tcp_poll. Failing to do so can result in unrecognised PDU payloads or TCP stream garbage being processed as a C2H data PDU, and potentially start copying the payload to an invalid destination after looking up a request using a bogus command id. Signed-off-by: Chris Leech Reviewed-by: Sagi Grimberg Reviewed-by: John Meneghini Signed-off-by: Christoph Hellwig commit c5a9abfad9fb010c39defeee0c939bfa9430a5a3 Author: Christoph Hellwig Date: Wed Mar 22 09:08:59 2023 +0100 nvmet: remove nvmet_req_cns_error_complete Just fold it into the only caller. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg commit 932635356618c19317c5b306b320368525cd1961 Author: Christoph Hellwig Date: Wed Mar 15 15:14:31 2023 +0100 nvmet: rename nvmet_execute_identify_cns_cs_ns nvmet_execute_identify_ns_zns is a more descriptive name for the function handling the "I/O Command Set Specific Identify Namespace Data Structure for the Zoned Namespace Command Set". Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Damien Le Moal commit 2f17f42c7f52a34abff2c92766806b58ea142c23 Author: Christoph Hellwig Date: Wed Mar 15 15:13:35 2023 +0100 nvmet: fix Identify Identification Descriptor List handling The Identification Descriptor List CNS value does not check the CSI value, so remove the code trying to handle it. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Damien Le Moal commit 145f0dbb8aac48f2e3abd4bd09582c78afef07a7 Author: Damien Le Moal Date: Wed Mar 15 19:59:39 2023 +0900 nvmet: cleanup nvmet_execute_identify() Change the order of the cases in nvmet_execute_identify() main switch-case to match the NVMe 2.0 specification order as defined in table 273. This is also the increasing order of CNS values. While at it, for clarity, make it explicit that identify with cns set to NVME_ID_CNS_CS_NS does not support NVM command set specific data. No functional changes are introduced by this cleanup. Signed-off-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Tested-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit a5a6ab0950b46ab1ef4a5c83c80234018b81b38a Author: Damien Le Moal Date: Wed Mar 15 19:59:38 2023 +0900 nvmet: fix I/O Command Set specific Identify Controller For an identify command with cns set to NVME_ID_CNS_CS_CTRL, the NVMe 2.0 specification states that: If the I/O Command Set specified by the CSI field does not have an Identify Controller data structure, then the controller shall return a zero filled data structure. If the host requests a data structure for an I/O Command Set that the controller does not support, the controller shall abort the command with a status code of Invalid Field in Command. However, the current implementation of this identify command in nvmet_execute_identify() only handles the ZNS command set, returning an error for the NVM command set, which is not compliant with the specifications as we do support this command set. Fix this by: 1) Renaming nvmet_execute_identify_cns_cs_ctrl() to nvmet_execute_identify_ctrl_zns() to continue handling the ZNS command set as is. 2) Introduce a nvmet_execute_identify_ctrl_ns() helper to handle the NVM command set, returning a zero filled nvme_id_ctrl_nvm data structure. 3) Modify nvmet_execute_identify() to call these helpers based on the csi specified, returning an error for unsupported command sets. Fixes: aaf2e048af27 ("nvmet: add ZBD over ZNS backend support") Signed-off-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Tested-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 97416f67d55fb8b866ff1815ca7ef26b6dfa6a5e Author: Damien Le Moal Date: Wed Mar 15 19:59:37 2023 +0900 nvmet: fix Identify Active Namespace ID list handling The identify command with cns set to NVME_ID_CNS_NS_ACTIVE_LIST does not depend on the command set. The execution of this command should thus not look at the csi field specified in the command. Simplify nvmet_execute_identify() to directly call nvmet_execute_identify_nslist() without the csi switch-case. Fixes: ab5d0b38c047 ("nvmet: add Command Set Identifier support") Signed-off-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Tested-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 62904b3b333e7f3c0f879dc3513295eee5765c9f Author: Damien Le Moal Date: Wed Mar 15 19:59:36 2023 +0900 nvmet: fix Identify Controller handling The identify command with cns set to NVME_ID_CNS_CTRL does not depend on the command set. The execution of this command should thus not look at the csi specified in the command. Simplify nvmet_execute_identify() to directly call nvmet_execute_identify_ctrl() without the csi switch-case. Fixes: ab5d0b38c047 ("nvmet: add Command Set Identifier support") Signed-off-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Tested-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 8c098aa00118c35108f0c19bd3cdc45e11574948 Author: Damien Le Moal Date: Wed Mar 15 19:59:35 2023 +0900 nvmet: fix Identify Namespace handling The identify command with cns set to NVME_ID_CNS_NS does not directly depend on the command set. The NVMe specifications is rather confusing here as it appears that this command only applies to the NVM command set. However, footnote 8 of Figure 273 in the NVMe 2.0 base specifications clearly state that this command applies to NVM command sets that support logical blocks, that is, NVM and ZNS. Both the NVM and ZNS command set specifications also list this identify as mandatory. The command handling should thus not look at the csi field since it is defined as unused for this command. Given that we do not support the KV command set, simply remove the csi switch-case for that command handling and call directly nvmet_execute_identify_ns() in nvmet_execute_identify(). Fixes: ab5d0b38c047 ("nvmet: add Command Set Identifier support") Signed-off-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Tested-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit ab76e7206b672b2e8818cb121a04506956d6b223 Author: Damien Le Moal Date: Tue Mar 14 15:20:36 2023 +0900 nvmet: fix error handling in nvmet_execute_identify_cns_cs_ns() Nvme specifications state that: If the I/O Command Set associated with the namespace identified by the NSID field does not support the Identify Namespace data structure specified by the CSI field, the controller shall abort the command with a status code of Invalid Field in Command. In other words, if nvmet_execute_identify_cns_cs_ns() is called for a target with a block device that is not zoned, we should not return any data and set the status to NVME_SC_INVALID_FIELD. While at it, it is also better to revalidate the ns block devie *before* checking if the block device is zoned, to ensure that nvmet_execute_identify_cns_cs_ns() operates against updated device characteristics. Fixes: aaf2e048af27 ("nvmet: add ZBD over ZNS backend support") Signed-off-by: Damien Le Moal Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 1ad11eafc63ac16e667853bee4273879226d2d1b Author: Bjorn Helgaas Date: Tue Mar 7 14:32:43 2023 -0600 nvme-pci: drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 1f62ed00a56bf01becaccd81bf30f2fcb0322fd2 Author: Guo Ren Date: Thu Apr 6 04:46:49 2023 -0400 csky: mmu: Prevent spurious page faults C-SKY MMU would pre-fetch invalid pte entries, and it could work with flush_tlb_fix_spurious_fault, but the additional page fault exceptions would reduce performance. So flushing the entry of the TLB would prevent the following spurious page faults. Here is the test code: define DATA_LEN 4096 define COPY_NUM (504*100) unsigned char src[DATA_LEN*COPY_NUM] = {0}; unsigned char dst[DATA_LEN*COPY_NUM] = {0}; unsigned char func_src[DATA_LEN*COPY_NUM] = {0}; unsigned char func_dst[DATA_LEN*COPY_NUM] = {0}; void main(void) { int j; for (j = 0; j < COPY_NUM; j++) memcpy(&dst[j*DATA_LEN], &src[j*DATA_LEN], 4); } perf stat -e page-faults ./main.elf The amount of page fault traps would be reduced in half with the patch. Signed-off-by: Guo Ren Signed-off-by: Guo Ren commit 73c4b0f83693604ae5964c68fb23159b823b12ac Author: Hawking Zhang Date: Wed Apr 12 00:01:13 2023 +0800 drm/amdgpu: drop temp programming for pagefault handling Was introduced as workaround. not needed anymore Signed-off-by: Hawking Zhang Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit ff742e0ca3db876eb152a5d6bdcf7654ef6f9398 Author: Shashank Sharma Date: Fri Feb 24 21:27:57 2023 +0100 drm/amdgpu: include protection for doorbell.h This patch adds double include protection for doorbell.h Cc: Christian Koenig Cc: Alex Deucher Reviewed-by: Christian Koenig Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit 0512e9ffebca0f9a91f6e54b0da90976dce2b025 Author: Shashank Sharma Date: Fri Feb 24 11:25:07 2023 +0100 drm/amdgpu: rename num_doorbells Rename doorbell.num_doorbells to doorbell.num_kernel_doorbells to make it more readable. Cc: Alex Deucher Cc: Christian Koenig Acked-by: Christian Koenig Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit f03eb1d26c2739b75580f58bbab4ab2d5d3eba46 Author: Jesse Zhang Date: Wed Apr 12 18:17:32 2023 +0800 drm/amdgpu: switch to golden tsc registers for raven/raven2 Due to raven/raven2 maybe enable  sclk slow down, they cannot get clock count by the RLC at the auto level of dpm performance. So switch to golden tsc register. Suggested-by: shanshengwang Reviewed-by: Evan Quan Signed-off-by: Jesse Zhang Signed-off-by: Alex Deucher commit 6fe2ecdba34445a17049cda73a399d9685189efc Author: Evan Quan Date: Fri Apr 7 17:12:15 2023 +0800 drm/amd/pm: correct the pcie link state check for SMU13 Update the driver implementations to fit those data exposed by PMFW. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit fd784a418ed832fbadfa846cef61741fdab0377a Author: YiPeng Chai Date: Tue Apr 11 10:27:12 2023 +0800 drm/amdgpu: add gfx v11_0_3 fed irq handling for sriov Add gfx v11_0_3 fed irq handling for sriov. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit dd299441654fd8209056c7985ddf2373ebaba6ed Author: Mukul Joshi Date: Tue Apr 11 16:32:38 2023 -0400 drm/amdgpu: Rework retry fault removal Rework retry fault removal from the software filter by storing an expired timestamp for a fault that is being removed. When a new fault comes, and it matches an entry in the sw filter, it will be added as a new fault only when its timestamp is greater than the timestamp expiry of the fault in the sw filter. This helps in avoiding stale faults being added back into the filter and preventing legitimate faults from being handled. Suggested-by: Felix Kuehling Signed-off-by: Mukul Joshi Reviewed-by: Philip Yang Signed-off-by: Alex Deucher commit 318e431b306e966d2ee99e900a11bdc9a701ee83 Author: Mukul Joshi Date: Tue Apr 11 16:32:29 2023 -0400 drm/amdgpu: Enable IH retry CAM on GFX9 This patch enables the IH retry CAM on GFX9 series cards. This retry filter is used to prevent sending lots of retry interrupts in a short span of time and overflowing the IH ring buffer. This will also help reduce CPU interrupt workload. Signed-off-by: Mukul Joshi Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit e69c373c3f0c1888b4b758e37d05e2e7b76585f2 Author: Tom Rix Date: Fri Mar 31 12:40:41 2023 -0400 drm/amd/pm: remove unused num_of_active_display variable clang with W=1 reports drivers/gpu/drm/amd/amdgpu/../pm/swsmu/amdgpu_smu.c:1700:6: error: variable 'num_of_active_display' set but not used [-Werror,-Wunused-but-set-variable] int num_of_active_display = 0; ^ This variable is not used so remove it. Fixes: 75145aab7a0d ("drm/amdgpu/swsmu: clean up a bunch of stale interfaces") Reviewed-by: Nick Desaulniers Reviewed-by: Evan Quan Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit 6246059a19d4cd32ef1af42a6ab016b779cd68c4 Author: Alex Deucher Date: Mon Mar 27 20:09:08 2023 -0400 drm/amdgpu: simplify amdgpu_ras_eeprom.c All chips that support RAS also support IP discovery, so use the IP versions rather than a mix of IP versions and asic types. Checking the validity of the atom_ctx pointer is not required as the vbios is already fetched at this point. v2: add comments to id asic types based on feedback from Luben Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher Cc: Luben Tuikov commit f2b3b6a22df7294a601dc18014d9f7c84d6d2ebc Merge: 37f9b2a6c086b 9c60f2a4446ca Author: Jakub Kicinski Date: Wed Apr 12 21:09:14 2023 -0700 Merge branch 'net-thunderbolt-fix-for-sparse-warnings-and-typos' Mika Westerberg says: ==================== net: thunderbolt: Fix for sparse warnings and typos This series tries to fix the rest of the sparse warnings generated against the driver. While there fix the two typos in comments as well. The previous version of the series can be found here: https://lore.kernel.org/netdev/20230404053636.51597-1-mika.westerberg@linux.intel.com/ ==================== Link: https://lore.kernel.org/r/20230411091049.12998-1-mika.westerberg@linux.intel.com Signed-off-by: Jakub Kicinski commit 9c60f2a4446cae273c62bbe865e141c4be816552 Author: Mika Westerberg Date: Tue Apr 11 12:10:49 2023 +0300 net: thunderbolt: Fix typos in comments Fix two typos in comments: blongs -> belongs UPD -> UDP No functional changes. Signed-off-by: Mika Westerberg Reviewed-by: Simon Horman Reviewed-by: Andy Shevchenko Signed-off-by: Jakub Kicinski commit 5bbec0adfa03899cbf91ba99d4fdb4975d30a631 Author: Mika Westerberg Date: Tue Apr 11 12:10:48 2023 +0300 net: thunderbolt: Fix sparse warnings in tbnet_xmit_csum_and_map() Fixes the following warning when the driver is built with sparse checks enabled: main.c:993:23: warning: incorrect type in initializer (different base types) main.c:993:23: expected restricted __wsum [usertype] wsum main.c:993:23: got restricted __be32 [usertype] No functional changes intended. Signed-off-by: Mika Westerberg Reviewed-by: Simon Horman Reviewed-by: Andy Shevchenko Signed-off-by: Jakub Kicinski commit 185367221503f6bc4745d944ed372c9dfef99fa2 Author: Mika Westerberg Date: Tue Apr 11 12:10:47 2023 +0300 net: thunderbolt: Fix sparse warnings in tbnet_check_frame() and tbnet_poll() Fixes the following warnings when the driver is built with sparse checks enabled: main.c:767:47: warning: restricted __le32 degrades to integer main.c:775:47: warning: restricted __le16 degrades to integer main.c:776:44: warning: restricted __le16 degrades to integer main.c:876:40: warning: incorrect type in assignment (different base types) main.c:876:40: expected restricted __le32 [usertype] frame_size main.c:876:40: got unsigned int [assigned] [usertype] frame_size main.c:877:41: warning: incorrect type in assignment (different base types) main.c:877:41: expected restricted __le32 [usertype] frame_count main.c:877:41: got unsigned int [usertype] main.c:878:41: warning: incorrect type in assignment (different base types) main.c:878:41: expected restricted __le16 [usertype] frame_index main.c:878:41: got unsigned short [usertype] main.c:879:38: warning: incorrect type in assignment (different base types) main.c:879:38: expected restricted __le16 [usertype] frame_id main.c:879:38: got unsigned short [usertype] main.c:880:62: warning: restricted __le32 degrades to integer main.c:880:35: warning: restricted __le16 degrades to integer No functional changes intended. Signed-off-by: Mika Westerberg Reviewed-by: Simon Horman Reviewed-by: Andy Shevchenko Signed-off-by: Jakub Kicinski commit 37f9b2a6c086bb28487a0682b8098f907861c4a1 Author: Andrew Lunn Date: Sun Apr 9 17:02:04 2023 +0200 net: ethernet: Add missing depends on MDIO_DEVRES A number of MDIO drivers make use of devm_mdiobus_alloc_size(). This is only available when CONFIG_MDIO_DEVRES is enabled. Add missing depends or selects, depending on if there are circular dependencies or not. This avoids linker errors, especially for randconfig builds. Signed-off-by: Andrew Lunn Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/20230409150204.2346231-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit d94772154e524b329a168678836745d2773a6e02 Author: Jaegeuk Kim Date: Thu Apr 6 11:18:48 2023 -0700 f2fs: fix potential corruption when moving a directory F2FS has the same issue in ext4_rename causing crash revealed by xfstests/generic/707. See also commit 0813299c586b ("ext4: Fix possible corruption when moving a directory") CC: stable@vger.kernel.org Signed-off-by: Jaegeuk Kim commit d09bd853005c720d5578f80b34e144ff3bc3eae8 Author: Yohan Joung Date: Mon Mar 27 22:58:00 2023 +0900 f2fs: add radix_tree_preload_end in error case To prevent excessive increase in preemption count add radix_tree_preload_end in retry Signed-off-by: Yohan Joung Signed-off-by: Jaegeuk Kim commit e1bb7d3d9cbf3ddcb8367d87b2f70757ec55f951 Author: Chao Yu Date: Sun Apr 2 19:27:06 2023 +0800 f2fs: fix to recover quota data correctly With -O quota mkfs option, xfstests generic/417 fails due to fsck detects data corruption on quota inodes. [ASSERT] (fsck_chk_quota_files:2051) --> Quota file is missing or invalid quota file content found. The root cause is there is a hole f2fs doesn't hold quota inodes, so all recovered quota data will be dropped due to SBI_POR_DOING flag was set. - f2fs_fill_super - f2fs_recover_orphan_inodes - f2fs_enable_quota_files - f2fs_quota_off_umount <--- quota inodes were dropped ---> - f2fs_recover_fsync_data - f2fs_enable_quota_files - f2fs_quota_off_umount This patch tries to eliminate the hole by holding quota inodes during entire recovery flow as below: - f2fs_fill_super - f2fs_recover_quota_begin - f2fs_recover_orphan_inodes - f2fs_recover_fsync_data - f2fs_recover_quota_end Then, recovered quota data can be persisted after SBI_POR_DOING is cleared. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d78dfefcde9d311284434560d69c0478c55a657e Author: Chao Yu Date: Tue Apr 4 23:28:07 2023 +0800 f2fs: fix to check readonly condition correctly With below case, it can mount multi-device image w/ rw option, however one of secondary device is set as ro, later update will cause panic, so let's introduce f2fs_dev_is_readonly(), and check multi-devices rw status in f2fs_remount() w/ it in order to avoid such inconsistent mount status. mkfs.f2fs -c /dev/zram1 /dev/zram0 -f blockdev --setro /dev/zram1 mount -t f2fs dev/zram0 /mnt/f2fs mount: /mnt/f2fs: WARNING: source write-protected, mounted read-only. mount -t f2fs -o remount,rw mnt/f2fs dd if=/dev/zero of=/mnt/f2fs/file bs=1M count=8192 kernel BUG at fs/f2fs/inline.c:258! RIP: 0010:f2fs_write_inline_data+0x23e/0x2d0 [f2fs] Call Trace: f2fs_write_single_data_page+0x26b/0x9f0 [f2fs] f2fs_write_cache_pages+0x389/0xa60 [f2fs] __f2fs_write_data_pages+0x26b/0x2d0 [f2fs] f2fs_write_data_pages+0x2e/0x40 [f2fs] do_writepages+0xd3/0x1b0 __writeback_single_inode+0x5b/0x420 writeback_sb_inodes+0x236/0x5a0 __writeback_inodes_wb+0x56/0xf0 wb_writeback+0x2a3/0x490 wb_do_writeback+0x2b2/0x330 wb_workfn+0x6a/0x260 process_one_work+0x270/0x5e0 worker_thread+0x52/0x3e0 kthread+0xf4/0x120 ret_from_fork+0x29/0x50 Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 562abda40188ee20113c21e8bfad725d6fd61056 Author: Wang Han Date: Sun Apr 9 13:29:51 2023 +0800 docs: f2fs: Correct instruction to disable checkpoint This should be 'disable' rather than 'disabled'. Reported-by: LoveSy Signed-off-by: Wang Han Signed-off-by: Jaegeuk Kim commit 6fd257cb35e8478ed551324ccf7c13723e654fcc Author: Chao Yu Date: Mon Apr 10 10:11:40 2023 +0800 f2fs: fix to keep consistent i_gc_rwsem lock order i_gc_rwsem[WRITE] and i_gc_rwsem[READ] lock order is reversed in gc_data_segment() and f2fs_dio_write_iter(), fix to keep consistent lock order as below: 1. lock i_gc_rwsem[WRITE] 2. lock i_gc_rwsem[READ] Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d319f344561de23e810515d109c7278919bff7b0 Author: Alexei Starovoitov Date: Mon Apr 10 19:43:44 2023 +0200 mm: Fix copy_from_user_nofault(). There are several issues with copy_from_user_nofault(): - access_ok() is designed for user context only and for that reason it has WARN_ON_IN_IRQ() which triggers when bpf, kprobe, eprobe and perf on ppc are calling it from irq. - it's missing nmi_uaccess_okay() which is a nop on all architectures except x86 where it's required. The comment in arch/x86/mm/tlb.c explains the details why it's necessary. Calling copy_from_user_nofault() from bpf, [ke]probe without this check is not safe. - __copy_from_user_inatomic() under CONFIG_HARDENED_USERCOPY is calling check_object_size()->__check_object_size()->check_heap_object()->find_vmap_area()->spin_lock() which is not safe to do from bpf, [ke]probe and perf due to potential deadlock. Fix all three issues. At the end the copy_from_user_nofault() becomes equivalent to copy_from_user_nmi() from safety point of view with a difference in the return value. Reported-by: Hsin-Wei Hung Signed-off-by: Alexei Starovoitov Signed-off-by: Florian Lehner Tested-by: Hsin-Wei Hung Tested-by: Florian Lehner Link: https://lore.kernel.org/r/20230410174345.4376-2-dev@der-flo.net Signed-off-by: Alexei Starovoitov commit 4ce1f694eb5d8ca607fed8542d32a33b4f1217a5 Author: Paul Moore Date: Wed Apr 12 13:29:11 2023 -0400 selinux: ensure av_permissions.h is built when needed The Makefile rule responsible for building flask.h and av_permissions.h only lists flask.h as a target which means that av_permissions.h is only generated when flask.h needs to be generated. This patch fixes this by adding av_permissions.h as a target to the rule. Fixes: 8753f6bec352 ("selinux: generate flask headers during kernel build") Signed-off-by: Paul Moore commit bbc73e6855b80144cd43d165696f1ff56d6192c9 Merge: ed17aa92dc56b d9688f898c08c Author: Alexei Starovoitov Date: Wed Apr 12 16:40:39 2023 -0700 Merge branch 'Add FOU support for externally controlled ipip devices' Christian Ehrig says: ==================== This patch set adds support for using FOU or GUE encapsulation with an ipip device operating in collect-metadata mode and a set of kfuncs for controlling encap parameters exposed to a BPF tc-hook. BPF tc-hooks allow us to read tunnel metadata (like remote IP addresses) in the ingress path of an externally controlled tunnel interface via the bpf_skb_get_tunnel_{key,opt} bpf-helpers. Packets can then be redirected to the same or a different externally controlled tunnel interface by overwriting metadata via the bpf_skb_set_tunnel_{key,opt} helpers and a call to bpf_redirect. This enables us to redirect packets between tunnel interfaces - and potentially change the encapsulation type - using only a single BPF program. Today this approach works fine for a couple of tunnel combinations. For example: redirecting packets between Geneve and GRE interfaces or GRE and plain ipip interfaces. However, redirecting using FOU or GUE is not supported today. The ip_tunnel module does not allow us to egress packets using additional UDP encapsulation from an ipip device in collect-metadata mode. Patch 1 lifts this restriction by adding a struct ip_tunnel_encap to the tunnel metadata. It can be filled by a new BPF kfunc introduced in Patch 2 and evaluated by the ip_tunnel egress path. This will allow us to use FOU and GUE encap with externally controlled ipip devices. Patch 2 introduces two new BPF kfuncs: bpf_skb_{set,get}_fou_encap. These helpers can be used to set and get UDP encap parameters from the BPF tc-hook doing the packet redirect. Patch 3 adds BPF tunnel selftests using the two kfuncs. --- v3: - Integrate selftest into test_progs (Alexei) v2: - Fixes for checkpatch.pl - Fixes for kernel test robot ==================== Signed-off-by: Alexei Starovoitov commit d9688f898c08c8f96fb0e7879262877ffd319bfd Author: Christian Ehrig Date: Fri Apr 7 15:38:55 2023 +0200 selftests/bpf: Test FOU kfuncs for externally controlled ipip devices Add tests for FOU and GUE encapsulation via the bpf_skb_{set,get}_fou_encap kfuncs, using ipip devices in collect-metadata mode. These tests make sure that we can successfully set and obtain FOU and GUE encap parameters using ingress / egress BPF tc-hooks. Signed-off-by: Christian Ehrig Link: https://lore.kernel.org/r/040193566ddbdb0b53eb359f7ac7bbd316f338b5.1680874078.git.cehrig@cloudflare.com Signed-off-by: Alexei Starovoitov commit c50e96099edb134bf107fafc02715fbc4aa2277f Author: Christian Ehrig Date: Fri Apr 7 15:38:54 2023 +0200 bpf,fou: Add bpf_skb_{set,get}_fou_encap kfuncs Add two new kfuncs that allow a BPF tc-hook, installed on an ipip device in collect-metadata mode, to control FOU encap parameters on a per-packet level. The set of kfuncs is registered with the fou module. The bpf_skb_set_fou_encap kfunc is supposed to be used in tandem and after a successful call to the bpf_skb_set_tunnel_key bpf-helper. UDP source and destination ports can be controlled by passing a struct bpf_fou_encap. A source port of zero will auto-assign a source port. enum bpf_fou_encap_type is used to specify if the egress path should FOU or GUE encap the packet. On the ingress path bpf_skb_get_fou_encap can be used to read UDP source and destination ports from the receiver's point of view and allows for packet multiplexing across different destination ports within a single BPF program and ipip device. Signed-off-by: Christian Ehrig Link: https://lore.kernel.org/r/e17c94a646b63e78ce0dbf3f04b2c33dc948a32d.1680874078.git.cehrig@cloudflare.com Signed-off-by: Alexei Starovoitov commit ac931d4cdec3df8b6eac3bc40a6871123021f078 Author: Christian Ehrig Date: Fri Apr 7 15:38:53 2023 +0200 ipip,ip_tunnel,sit: Add FOU support for externally controlled ipip devices Today ipip devices in collect-metadata mode don't allow for sending FOU or GUE encapsulated packets. This patch lifts the restriction by adding a struct ip_tunnel_encap to the tunnel metadata. On the egress path, the members of this struct can be set by the bpf_skb_set_fou_encap kfunc via a BPF tc-hook. Instead of dropping packets wishing to use additional UDP encapsulation, ip_md_tunnel_xmit now evaluates the contents of this struct and adds the corresponding FOU or GUE header. Furthermore, it is making sure that additional header bytes are taken into account for PMTU discovery. On the ingress path, an ipip device in collect-metadata mode will fill this struct and a BPF tc-hook can obtain the information via a call to the bpf_skb_get_fou_encap kfunc. The minor change to ip_tunnel_encap, which now takes a pointer to struct ip_tunnel_encap instead of struct ip_tunnel, allows us to control FOU encap type and parameters on a per packet-level. Signed-off-by: Christian Ehrig Link: https://lore.kernel.org/r/cfea47de655d0f870248abf725932f851b53960a.1680874078.git.cehrig@cloudflare.com Signed-off-by: Alexei Starovoitov commit ed17aa92dc56b6d8883e4b7a8f1c6fbf5ed6cd29 Author: Xin Liu Date: Thu Apr 6 20:26:22 2023 +0800 bpf, sockmap: fix deadlocks in the sockhash and sockmap When huang uses sched_switch tracepoint, the tracepoint does only one thing in the mounted ebpf program, which deletes the fixed elements in sockhash ([0]) It seems that elements in sockhash are rarely actively deleted by users or ebpf program. Therefore, we do not pay much attention to their deletion. Compared with hash maps, sockhash only provides spin_lock_bh protection. This causes it to appear to have self-locking behavior in the interrupt context. [0]:https://lore.kernel.org/all/CABcoxUayum5oOqFMMqAeWuS8+EzojquSOSyDA3J_2omY=2EeAg@mail.gmail.com/ Reported-by: Hsin-Wei Hung Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: Xin Liu Acked-by: John Fastabend Link: https://lore.kernel.org/r/20230406122622.109978-1-liuxin350@huawei.com Signed-off-by: Alexei Starovoitov commit 80e9552e843b2ec7d813cfdb71f84f738df0d044 Merge: fe15c26ee26ef 8a05f5cccdbe8 Author: Stephen Boyd Date: Wed Apr 12 16:19:39 2023 -0700 Merge tag 'clk-imx-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux into clk-imx Pull i.MX clk driver updates from Abel Vesa: - Add clock generic devm_clk_hw_register_gate_parent_data. - Add audiomix block control for i.MX8MP. - Add support for determine_rate to composite-8m. - Add new macro for composite-8m to allow custom flags. - Let the LCDIF Pixel clock of i.MX8MM and i.MX8MN set parent rate. - Provide clock name in error message for clk-gpr-mux on get parent failure. - Drop duplicate imx_clk_mux_flags macro. - Register the i.MX8MP Media Disp2 Pix clock as bus clock. - Add Media LDB root clock to i.MX8MP. - Make i.MX8MP nand_usdhc_bus clock as non-critical. - Fix the rate table for fracn-gppll. - Disable HW control for the fracn-gppll in order to be controlled by register write. - Add support for interger PLL in fracn-gppll. - Add mcore_booted module parameter to i.MX93 provider. - Add NIC, A55 and ARM PLL clocks to i.MX93. - Fix i.MX8ULP XBAR_DIVBUS and AD_SLOW clock parents. - Use "divider closest" clock type for PLL4_PFD dividers on i.MX8ULP to get more accurate clock rates. - Mark the MU0_Bi and TPM5 clocks on i.MX8ULP as critical. - Update some of the critical clocks flags to allow glitchless on-the-fly rate change. * tag 'clk-imx-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux: (25 commits) clk: imx: imx8ulp: update clk flag for system critical clock clk: imx: imx8ulp: Add tpm5 clock as critical gate clock clk: imx: imx8ulp: keep MU0_B clock enabled always clk: imx: imx8ulp: Add divider closest support to get more accurate clock rate clk: imx: imx8ulp: Fix XBAR_DIVBUS and AD_SLOW clock parents clk: imx: imx93: Add nic and A55 clk dt-bindings: clock: imx93: add NIC, A55 and ARM PLL CLK clk: imx: imx93: add mcore_booted module paratemter clk: imx: fracn-gppll: Add 300MHz freq support for imx9 clk: imx: fracn-gppll: support integer pll clk: imx: fracn-gppll: disable hardware select control clk: imx: fracn-gppll: fix the rate table clk: imx: imx8mp: change the 'nand_usdhc_bus' clock to non-critical clk: imx: imx8mp: Add LDB root clock dt-bindings: clock: imx8mp: Add LDB clock entry clk: imx: imx8mp: correct DISP2 pixel clock type clk: imx: drop duplicated macro clk: imx: clk-gpr-mux: Provide clock name in error message clk: imx: Let IMX8MN_CLK_DISP_PIXEL set parent rate clk: imx8mm: Let IMX8MM_CLK_LCDIF_PIXEL set parent rate ... commit 4453deacf44615b2d45a0b5226ff132e830bd03d Author: Chunxin Zang Date: Tue Mar 28 14:00:57 2023 +0800 perf sched: Fix sched latency analysis incorrection when using 'sched:sched_wakeup' 'perf sched latency' is incorrect to get process schedule latency when it used 'sched:sched_wakeup' to analysis perf.data. Because 'perf record' prefers to use 'sched:sched_waking' to 'sched:sched_wakeup' since commit d566a9c2d482 ("perf sched: Prefer sched_waking event when it exists"). It's very reasonable to evaluate process schedule latency. Similarly, update sched latency/map/replay to use sched_waking events. Signed-off-by: Chunxin Zang Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230328060038.2346935-1-zangchunxin@lixiang.com Signed-off-by: Jerry Zhou Signed-off-by: Arnaldo Carvalho de Melo commit bd66b6acd20ba72d1779fa1abe55eb0fcc20f2c3 Author: Jonathan Cameron Date: Mon Jan 30 20:10:17 2023 +0000 iio: imu: lsm6dsx: Support SMO8B30 ACPI ID for LSM6DS3TR-C ID seen in the wild and it is a valid ST micro ID. An offset of 1 for the device ID enum is needed when adding support for retrieving the ID from device_get_match_data() to allow detection of NULL pointer and fallback to i2c_device_id table. DSDT chunk cropped for relevant parts. Scope (_SB.PCI0.I2C5) { Device (DEV) { Name (_HID, EisaId ("SMO8B30")) // _HID: Hardware ID Name (_CID, EisaId ("SMO8B30")) // _CID: Compatible ID Name (_UID, Zero) // _UID: Unique ID Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings { Name (RBUF, ResourceTemplate () { I2cSerialBusV2 (0x006A, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.PCI0.I2C5", 0x00, ResourceConsumer, , Exclusive, ) }) Return (RBUF) /* \_SB_.PCI0.I2C5.DEV_._CRS.RBUF */ } Method (ROTM, 0, NotSerialized) { Name (RBUF, Package (0x03) { "0 -1 0", "1 0 0", "0 0 1" }) Return (RBUF) /* \_SB_.PCI0.I2C5.DEV_.ROTM.RBUF */ } ... Link: https://lore.kernel.org/all/20230129182441.082f29d0@jic23-huawei/ Reported-by: Darrell Kavanagh Tested-by: Darrell Kavanagh Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20230130201018.981024-2-jic23@kernel.org commit ec48599abee3a16fdc93c1c3c3e153a4f4d29420 Author: David Vernet Date: Mon Apr 10 23:16:33 2023 -0500 bpf,docs: Remove references to bpf_cgroup_kptr_get() The bpf_cgroup_kptr_get() kfunc has been removed, and bpf_cgroup_acquire() / bpf_cgroup_release() now have the same semantics as bpf_task_acquire() / bpf_task_release(). This patch updates the BPF documentation to reflect this. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230411041633.179404-3-void@manifault.com Signed-off-by: Alexei Starovoitov commit 6499fe6edc4fd5b91aed4d5cd84bd113e1c58d5f Author: David Vernet Date: Mon Apr 10 23:16:32 2023 -0500 bpf: Remove bpf_cgroup_kptr_get() kfunc Now that bpf_cgroup_acquire() is KF_RCU | KF_RET_NULL, bpf_cgroup_kptr_get() is redundant. Let's remove it, and update selftests to instead use bpf_cgroup_acquire() where appropriate. The next patch will update the BPF documentation to not mention bpf_cgroup_kptr_get(). Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230411041633.179404-2-void@manifault.com Signed-off-by: Alexei Starovoitov commit 1d71283987c729dceccce834a864c27301ba155e Author: David Vernet Date: Mon Apr 10 23:16:31 2023 -0500 bpf: Make bpf_cgroup_acquire() KF_RCU | KF_RET_NULL struct cgroup is already an RCU-safe type in the verifier. We can therefore update bpf_cgroup_acquire() to be KF_RCU | KF_RET_NULL, and subsequently remove bpf_cgroup_kptr_get(). This patch does the first of these by updating bpf_cgroup_acquire() to be KF_RCU | KF_RET_NULL, and also updates selftests accordingly. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230411041633.179404-1-void@manifault.com Signed-off-by: Alexei Starovoitov commit bd4e3d82f4ccb422672029b099e402e5b3acd5ee Author: Miquel Raynal Date: Tue Apr 11 11:01:22 2023 +0200 MAINTAINERS: Add wpan patchwork This patchwork instance is hosted on kernel.org and has been used for a long time already, it was just not mentioned in MAINTAINERS. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20230411090122.419761-2-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit e3a0877e7e66b465588f6262680437024edccb9f Author: Miquel Raynal Date: Tue Apr 11 11:01:21 2023 +0200 MAINTAINERS: Update wpan tree The wpan maintainers group is switching from Stefan's tree to a group tree called 'wpan'. We will now maintain: * wpan/wpan.git master: Fixes targeting the 'net' tree * wpan/wpan-next.git master: Features targeting the 'net-next' tree * wpan/wpan-next.git staging: Same as the wpan-next master branch, but we will push there first, expecting robots to parse the tree and report mistakes we would have not catch. This branch can be rebased and force pushed, unlike the others. Signed-off-by: Miquel Raynal Acked-by: Alexander Aring [Fixed two small typos stefan@datenfreihafen.org] Link: https://lore.kernel.org/r/20230411090122.419761-1-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt commit a61675294735570daca3779bd1dbb3715f7232bd Author: Chen Aotian Date: Sun Apr 9 10:20:48 2023 +0800 ieee802154: hwsim: Fix possible memory leaks After replacing e->info, it is necessary to free the old einfo. Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb") Reviewed-by: Miquel Raynal Reviewed-by: Alexander Aring Signed-off-by: Chen Aotian Link: https://lore.kernel.org/r/20230409022048.61223-1-chenaotian2@163.com Signed-off-by: Stefan Schmidt commit 27ff688a402016c418a1f2f0be37556c71f674d7 Merge: b599a4d7d905a 59322d3517998 Author: Mark Brown Date: Wed Apr 12 19:59:27 2023 +0100 ASoC: cs35l56: Add system suspend handling Merge series from Richard Fitzgerald : This set of patches adds handling for system suspend. Patches 1..4 make some code changes that simplify the suspend implementation, mainly to avoid race conditions. There are two seperate aspects to suspend, and these have been done as two patches: - the main suspend-resume handling, - re-loading the firmware if necessary after resume. commit 9efe423e4387893498e11c75207bc9a1c9121246 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 14:56:28 2023 -0300 perf pmu: Use perf_cpu_map__set_nr() in perf_pmu__cpus_match() to allow for refcnt checking One more step to allow for checking reference counting, user after free, etc. Cc: Adrian Hunter Cc: Alexey Bayduraev Cc: Dmitriy Vyukov Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Riccardo Mancini Cc: Stephane Eranian Cc: Stephen Brennan Link: https://lore.kernel.org/ZDb9dycHQ11UIXwx@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d581076b6a85c6f8308a4ba2bdcd82651f5183df Author: Pavel Begunkov Date: Tue Apr 11 12:06:08 2023 +0100 io_uring/rsrc: extract SCM file put helper SCM file accounting is a slow path and is only used for UNIX files. Extract a helper out of io_rsrc_file_put() that does the SCM unaccounting. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/58cc7bffc2ee96bec8c2b89274a51febcbfa5556.1681210788.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 2933ae6eaa05e8db6ad33a3ca12af18d2a25358c Author: Pavel Begunkov Date: Tue Apr 11 12:06:07 2023 +0100 io_uring/rsrc: refactor io_rsrc_node_switch We use io_rsrc_node_switch() coupled with io_rsrc_node_switch_start() for a bunch of cases including initialising ctx->rsrc_node, i.e. by passing NULL instead of rsrc_data. Leave it to only deal with actual node changing. For that, first remove it from io_uring_create() and add a function allocating the first node. Then also remove all calls to io_rsrc_node_switch() from files/buffers register as we already have a node installed and it does essentially nothing. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d146fe306ff98b1a5a60c997c252534f03d423d7.1681210788.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 13c223962eac16f161cf9b6355209774c609af28 Author: Pavel Begunkov Date: Tue Apr 11 12:06:06 2023 +0100 io_uring/rsrc: zero node's rsrc data on alloc struct io_rsrc_node::rsrc_data field is initialised on rsrc removal and shouldn't be used before that, still let's play safe and zero the field on alloc. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/09bd03cedc8da8a7974c5e6e4bf0489fd16593ab.1681210788.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 528407b1e0ea51260fff2cc8b669c632a65d7a09 Author: Pavel Begunkov Date: Tue Apr 11 12:06:05 2023 +0100 io_uring/rsrc: consolidate node caching We store one pre-allocated rsrc node in ->rsrc_backup_node, merge it with ->rsrc_node_cache. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/6d5410e51ccd29be7a716be045b51d6b371baef6.1681210788.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 786788a8cfe03056e9c7b1c6e418c1db92a0ce80 Author: Pavel Begunkov Date: Tue Apr 11 12:06:04 2023 +0100 io_uring/rsrc: add lockdep checks Add a lockdep chek to make sure that file and buffer updates hold ->uring_lock. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/961bbe6e433ec9bc0375127f23468b37b729df99.1681210788.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 8ce4269eeedc5b31f5817f610b42cba8be8fa9de Author: Pavel Begunkov Date: Tue Apr 11 12:06:03 2023 +0100 io_uring: add irq lockdep checks We don't post CQEs from the IRQ context, add a check catching that. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f23f7a24dbe8027b3d37873fece2b6488f878b31.1681210788.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit ceac766a5581e4e671ec8e5236b8fdaed8e4c8c9 Author: Pavel Begunkov Date: Tue Apr 11 12:06:02 2023 +0100 io_uring/kbuf: remove extra ->buf_ring null check The kernel test robot complains about __io_remove_buffers(). io_uring/kbuf.c:221 __io_remove_buffers() warn: variable dereferenced before check 'bl->buf_ring' (see line 219) That check is not needed as ->buf_ring will always be set, so we can remove it and so silence the warning. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9a632bbf749d9d911e605255652ce08d18e7d2c6.1681210788.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 8b1df11f97333d6d8647f1c6c0554eb2d9774396 Author: Pavel Begunkov Date: Tue Apr 11 12:06:01 2023 +0100 io_uring: shut io_prep_async_work warning io_uring/io_uring.c:432 io_prep_async_work() error: we previously assumed 'req->file' could be null (see line 425). Even though it's a false positive as there will not be REQ_F_ISREG set without a file, let's add a simple check to make the kernel test robot happy. We don't care about performance here, but assumingly it'll be optimised out by the compiler. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a6cfbe92c74b789c0b4f046f7f98d19b1ca2e5b7.1681210788.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 27a67079c0e548d5c3232c40951517cfa630fe51 Author: Jens Axboe Date: Wed Apr 12 12:07:36 2023 -0600 io_uring/uring_cmd: take advantage of completion batching We know now what the completion context is for the uring_cmd completion handling, so use that to have io_req_task_complete() decide what the best way to complete the request is. This allows batching of the posted completions if we have multiple pending, rather than always doing them one-by-one. Signed-off-by: Jens Axboe commit b277851417e0149aff5e6986e1ad6e2d8054e4a6 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 14:53:35 2023 -0300 libperf: Add a perf_cpu_map__set_nr() available as an internal function for tools/perf to use We'll need to reference count check 'struct perf_cpu_map', so wrap accesses to its internal state to allow intercepting accesses to its instances. Cc: Adrian Hunter Cc: Alexey Bayduraev Cc: Dmitriy Vyukov Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Riccardo Mancini Cc: Stephane Eranian Cc: Stephen Brennan Link: https://lore.kernel.org/ Signed-off-by: Arnaldo Carvalho de Melo commit f2dc327131b5cbb2cbb467cec23836f2e9d4cf46 Author: Dave Jiang Date: Fri Apr 7 13:31:43 2023 -0700 dmaengine: idxd: add per wq PRS disable Add sysfs knob for per wq Page Request Service disable. This knob disables PRS support for the specific wq. When this bit is set, it also overrides the wq's block on fault enabling. Tested-by: Tony Zhu Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230407203143.2189681-17-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit a62b8f87c770fa4109ce515e4d8a0d4701a4ca5f Author: Dave Jiang Date: Fri Apr 7 13:31:42 2023 -0700 dmaengine: idxd: add pid to exported sysfs attribute for opened file Provide the pid of the application for the opened file. This allows the monitor daemon to easily correlate which app opened the file and easily kill the app by pid if that is desired action. Tested-by: Tony Zhu Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230407203143.2189681-16-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 244009b07e7d0728726f266cc3485d7fd400d0d5 Author: Dave Jiang Date: Fri Apr 7 13:31:41 2023 -0700 dmaengine: idxd: expose fault counters to sysfs Expose cr_faults and cr_fault_failures counters to the user space. This allows a user app to keep track of how many fault the application is causing with the completion record (CR) and also the number of failures of the CR writeback. Having a high number of cr_fault_failures is bad as the app is submitting descriptors with the CR addresses that are bad. User monitoring daemon may want to consider killing the application as it may be malicious and attempting to flood the device event log. Tested-by: Tony Zhu Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230407203143.2189681-15-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit e6fd6d7e5f0fe4a17a08e892afb5db800e7794ec Author: Dave Jiang Date: Fri Apr 7 13:31:40 2023 -0700 dmaengine: idxd: add a device to represent the file opened Embed a struct device for the user file context in order to export sysfs attributes related with the opened file. Tie the lifetime of the file context to the device. The sysfs entry will be added under the char device. Tested-by: Tony Zhu Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230407203143.2189681-14-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit fecae134ee10b7de69461c197450f7c05677e733 Author: Dave Jiang Date: Fri Apr 7 13:31:39 2023 -0700 dmaengine: idxd: add per file user counters for completion record faults Add counters per opened file for the char device in order to keep track how many completion record faults occurred and how many of those faults failed the writeback by the driver after attempt to fault in the page. The counters are managed by xarray that associates the PASID with struct idxd_user_context. Tested-by: Tony Zhu Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230407203143.2189681-13-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 2442b7473ad03671378d2d95651bd6bbe09a0943 Author: Dave Jiang Date: Fri Apr 7 13:31:38 2023 -0700 dmaengine: idxd: process batch descriptor completion record faults Add event log processing for faulting of user batch descriptor completion record. When encountering an event log entry for a page fault on a completion record, the driver is expected to do the following: 1. If the "first error in batch" bit in event log entry error info is set, discard any previously recorded errors associated with the "batch identifier". 2. Fix the page fault according to the fault address in the event log. If successful, write the completion record to the fault address in user space. 3. If an error is encountered while writing the completion record and it is associated to a descriptor in the batch, the driver associates the error with the batch identifier of the event log entry and tracks it until the event log entry for the corresponding batch desc is encountered. While processing an event log entry for a batch descriptor with error indicating that one or more descs in the batch had event log entries, the driver will do the following before writing the batch completion record: 1. If the status field of the completion record is 0x1, the driver will change it to error code 0x5 (one or more operations in batch completed with status not successful) and changes the result field to 1. 2. If the status is error code 0x6 (page fault on batch descriptor list address), change the result field to 1. 3. If status is any other value, the completion record is not changed. 4. Clear the recorded error in preparation for next batch with same batch identifier. The result field is for user software to determine whether to set the "Batch Error" flag bit in the descriptor for continuation of partial batch descriptor completion. See DSA spec 2.0 for additional information. If no error has been recorded for the batch, the batch completion record is written to user space as is. Tested-by: Tony Zhu Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230407203143.2189681-12-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 6926987185a3ae92c31b99ce1bfdfb04e95057c0 Author: Dave Jiang Date: Fri Apr 7 13:31:37 2023 -0700 dmaengine: idxd: add descs_completed field for completion record The descs_completed field for a completion record is part of a batch descriptor completion record. It takes the same location as bytes_completed in a normal descriptor field. Add to expose to user. Tested-by: Tony Zhu Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230407203143.2189681-11-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit c40bd7d9737bdcfb02d42765bc6c59b338151123 Author: Dave Jiang Date: Fri Apr 7 13:31:36 2023 -0700 dmaengine: idxd: process user page faults for completion record DSA supports page fault handling through PRS. However, the DMA engine that's processing the descriptor is blocked until the PRS response is received. Other workqueues sharing the engine are also blocked. Page fault handing by the driver with PRS disabled can be used to mitigate the stalling. With PRS disabled while ATS remain enabled, DSA handles page faults on a completion record by reporting an event in the event log. In this instance, the descriptor is completed and the event log contains the completion record address and the contents of the completion record. Add support to the event log handling code to fault in the completion record and copy the content of the completion record to user memory. A bitmap is introduced to keep track of discarded event log entries. When the user process initiates ->release() of the char device, it no longer is interested in any remaining event log entries tied to the relevant wq and PASID. The driver will mark the event log entry index in the bitmap. Upon encountering the entries during processing, the event log handler will just clear the bitmap bit and skip the entry rather than attempt to process the event log entry. Tested-by: Tony Zhu Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230407203143.2189681-10-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit b022f59725f0ae846191abbd6d2e611d7f60f826 Author: Fenghua Yu Date: Fri Apr 7 13:31:35 2023 -0700 dmaengine: idxd: add idxd_copy_cr() to copy user completion record during page fault handling Define idxd_copy_cr() to copy completion record to fault address in user address that is found by work queue (wq) and PASID. It will be used to write the user's completion record that the hardware device is not able to write due to user completion record page fault. An xarray is added to associate the PASID and mm with the struct idxd_user_context so mm can be found by PASID and wq. It is called when handling the completion record fault in a kernel thread context. Switch to the mm using kthread_use_vm() and copy the completion record to the mm via copy_to_user(). Once the copy is completed, switch back to the current mm using kthread_unuse_mm(). Suggested-by: Christoph Hellwig Suggested-by: Jason Gunthorpe Suggested-by: Tony Luck Tested-by: Tony Zhu Signed-off-by: Fenghua Yu Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20230407203143.2189681-9-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit c2f156bf168fb42cd6ecd0a8e2204dbe542b8516 Author: Dave Jiang Date: Fri Apr 7 13:31:34 2023 -0700 dmaengine: idxd: create kmem cache for event log fault items Add a kmem cache per device for allocating event log fault context. The context allows an event log entry to be copied and passed to a software workqueue to be processed. Due to each device can have different sized event log entry depending on device type, it's not possible to have a global kmem cache. Tested-by: Tony Zhu Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230407203143.2189681-8-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 2f30decd2f23a376d2ed73dfe4c601421edf501a Author: Dave Jiang Date: Fri Apr 7 13:31:33 2023 -0700 dmaengine: idxd: add per DSA wq workqueue for processing cr faults Add a workqueue for user submitted completion record fault processing. The workqueue creation and destruction lifetime will be tied to the user sub-driver since it will only be used when the wq is a user type. Tested-by: Tony Zhu Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230407203143.2189681-7-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 5fbe6503b52f5665560584f62adab5db70ac910e Author: Dave Jiang Date: Fri Apr 7 13:31:32 2023 -0700 dmanegine: idxd: add debugfs for event log dump Add debugfs entry to dump the content of the event log for debugging. The function will dump all non-zero entries in the event log. It will note which entries are processed and which entries are still pending processing at the time of the dump. The entries may not always be in chronological order due to the log is a circular buffer. Tested-by: Tony Zhu Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230407203143.2189681-6-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 2f431ba908d2ef05da478d10925207728f1ff483 Author: Dave Jiang Date: Fri Apr 7 13:31:31 2023 -0700 dmaengine: idxd: add interrupt handling for event log An event log interrupt is raised in the misc interrupt INTCAUSE register when an event is written by the hardware. Add basic event log processing support to the interrupt handler. The event log is a ring where the hardware owns the tail and the software owns the head. The hardware will advance the tail index when an additional event has been pushed to memory. The software will process the log entry and then advances the head. The log is full when (tail + 1) % log_size = head. The hardware will stop writing when the log is full. The user is expected to create a log size large enough to handle all the expected events. Tested-by: Tony Zhu Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230407203143.2189681-5-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 244da66cda359227d80ccb41dbcb99da40eae186 Author: Dave Jiang Date: Fri Apr 7 13:31:30 2023 -0700 dmaengine: idxd: setup event log configuration Add setup of event log feature for supported device. Event log addresses error reporting that was lacking in gen 1 DSA devices where a second error event does not get reported when a first event is pending software handling. The event log allows a circular buffer that the device can push error events to. It is up to the user to create a large enough event log ring in order to capture the expected events. The evl size can be set in the device sysfs attribute. By default 64 entries are supported as minimal when event log is enabled. Tested-by: Tony Zhu Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230407203143.2189681-4-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 1649091f9180470f96f001724a4902d5d82bbd75 Author: Dave Jiang Date: Fri Apr 7 13:31:29 2023 -0700 dmaengine: idxd: add event log size sysfs attribute Add support for changing of the event log size. Event log is a feature added to DSA 2.0 hardware to improve error reporting. It supersedes the SWERROR register on DSA 1.0 hardware and hope to prevent loss of reported errors. The error log size determines how many error entries supported for the device. It can be configured by the user via sysfs attribute. Tested-by: Tony Zhu Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230407203143.2189681-3-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 0c40bfb4c2dfad00a15337bb6213f92a797e3695 Author: Dave Jiang Date: Fri Apr 7 13:31:28 2023 -0700 dmaengine: idxd: make misc interrupt one shot Current code continuously processes the interrupt as long as the hardware is setting the status bit. There's no reason to do that since the threaded handler will get called again if another interrupt is asserted. Also through testing, it has shown that if a misprogrammed (or malicious) agent can continuously submit descriptors with bad completion record and causes errors to be reported via the misc interrupt. Continuous processing by the thread can cause software hang watchdog to kick off since the thread isn't giving up the CPU. Reported-by: Sanjay Kumar Tested-by: Tony Zhu Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230407203143.2189681-2-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit c9566127f021c891e14c937b1b711874b7880e48 Author: Walker Chen Date: Wed Mar 22 17:48:17 2023 +0800 dt-bindings: dma: snps,dw-axi-dmac: constrain the items of resets for JH7110 dma The DMA controller needs two reset items to work properly on JH7110 SoC, so there is need to constrain the items' value to 2, other platforms have 1 reset item at most. Reviewed-by: Rob Herring Signed-off-by: Walker Chen Link: https://lore.kernel.org/r/20230322094820.24738-2-walker.chen@starfivetech.com Signed-off-by: Vinod Koul commit 894abe0dcfe2ad76dac25691264a85fdc2d524c3 Author: Rob Herring Date: Fri Mar 31 13:21:41 2023 -0500 dt-bindings: dma: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Acked-by: Peter Ujfalusi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230331182141.1900348-1-robh@kernel.org Signed-off-by: Vinod Koul commit 09ebe227c2236c6d0ce427ce10da3e4d66946f57 Author: Claudiu Beznea Date: Tue Feb 14 17:18:27 2023 +0200 dmaengine: at_xdmac: align declaration of ret with the rest of variables Align the declaration of ret in atmel_xdmac_resume() with the rest of variables. Do this by adding ret to the line with declaration for i variable. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230214151827.1050280-8-claudiu.beznea@microchip.com Signed-off-by: Vinod Koul commit 5056eae6c32d709bab506ca032ac4f7effc9db2f Author: Claudiu Beznea Date: Tue Feb 14 17:18:26 2023 +0200 dmaengine: at_xdmac: add a warning message regarding for unpaused channels Add a warning message on suspend to let the user that there are channels not paused by their consumers. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230214151827.1050280-7-claudiu.beznea@microchip.com Signed-off-by: Vinod Koul commit f8435befd81dd85b7b610598551fadf675849bc1 Author: Claudiu Beznea Date: Tue Feb 14 17:18:25 2023 +0200 dmaengine: at_xdmac: do not enable all cyclic channels Do not global enable all the cyclic channels in at_xdmac_resume(). Instead save the global status in at_xdmac_suspend() and re-enable the cyclic channel only if it was active before suspend. Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230214151827.1050280-6-claudiu.beznea@microchip.com Signed-off-by: Vinod Koul commit 7c5eb63d16b01c202aaa95f374ae15a807745a73 Author: Claudiu Beznea Date: Tue Feb 14 17:18:24 2023 +0200 dmaengine: at_xdmac: restore the content of grws register In case the system suspends to a deep sleep state where power to DMA controller is cut-off we need to restore the content of GRWS register. This is a write only register and writing bit X tells the controller to suspend read and write requests for channel X. Thus set GRWS before restoring the content of GE (Global Enable) regiter. Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230214151827.1050280-5-claudiu.beznea@microchip.com Signed-off-by: Vinod Koul commit 44fe8440bda545b5d167329df88c47609a645168 Author: Claudiu Beznea Date: Tue Feb 14 17:18:23 2023 +0200 dmaengine: at_xdmac: do not resume channels paused by consumers In case there are DMA channels not paused by consumers in suspend process (valid on AT91 SoCs for serial driver when no_console_suspend) the driver pauses them (using at_xdmac_device_pause() which is also the same function called by dmaengine_pause()) and then in the resume process the driver resumes them calling at_xdmac_device_resume() which is the same function called by dmaengine_resume()). This is good for DMA channels not paused by consumers but for drivers that calls dmaengine_pause()/dmaegine_resume() on suspend/resume path this may lead to DMA channel being enabled before the IP is enabled. For IPs that needs strict ordering with regards to DMA channel enablement this will lead to wrong behavior. To fix this add a new set of functions at_xdmac_device_pause_internal()/at_xdmac_device_resume_internal() to be called only on suspend/resume. Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230214151827.1050280-4-claudiu.beznea@microchip.com Signed-off-by: Vinod Koul commit e53957e1ec5196671e49a48f90a5c9555153189a Author: Claudiu Beznea Date: Tue Feb 14 17:18:22 2023 +0200 dmaengine: at_xdmac: fix imbalanced runtime PM reference counter In case there are channels not paused during suspend (which on AT91 case is valid for serial driver when no_console_suspend boot argument is used) the at_xdmac_runtime_suspend_descriptors() was called more than one time due to at_xdmac_off(). To fix this add a new argument to at_xdmac_off() to specify if runtime PM reference counter needs to be decremented for queued active descriptors. Along with it moved the at_xdmac_runtime_suspend_descriptors() call under at_xdmac_chan_is_paused() check on suspend path as for the rest of channels the suspend is delayed by atmel_xdmac_prepare() in case channel is enabled. Same approach has been applied on resume path. Fixes: 650b0e990cbd ("dmaengine: at_xdmac: add runtime pm support") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230214151827.1050280-3-claudiu.beznea@microchip.com Signed-off-by: Vinod Koul commit 2de5ddb5e68c94b781b3789bca1ce52000d7d0e0 Author: Claudiu Beznea Date: Tue Feb 14 17:18:21 2023 +0200 dmaengine: at_xdmac: disable/enable clock directly on suspend/resume Runtime PM APIs for at_xdmac just plays with clk_enable()/clk_disable() letting aside the clk_prepare()/clk_unprepare() that needs to be executed as the clock is also prepared on probe. Thus instead of using runtime PM force suspend/resume APIs use clk_disable_unprepare() + pm_runtime_put_noidle() on suspend and clk_prepare_enable() + pm_runtime_get_noresume() on resume. This approach as been chosen instead of using runtime PM force suspend/resume with clk_unprepare()/clk_prepare() as it looks simpler and the final code is better. While at it added the missing pm_runtime_mark_last_busy() on suspend before decrementing the reference counter. Fixes: 650b0e990cbd ("dmaengine: at_xdmac: add runtime pm support") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230214151827.1050280-2-claudiu.beznea@microchip.com Signed-off-by: Vinod Koul commit ce62432cb8bb56a5fde544d01213e952c3a92f8b Author: Walker Chen Date: Wed Mar 22 17:48:19 2023 +0800 dmaengine: dw-axi-dmac: Increase polling time to DMA transmission completion status The bit DMAC_CHEN[0] is automatically cleared by hardware to disable the channel after the last AMBA transfer of the DMA transfer to the destination has completed. Software can therefore poll this bit to determine when this channel is free for a new DMA transfer. This time requires at least 40 milliseconds on JH7110 SoC, otherwise an error message 'failed to stop' will be reported. Signed-off-by: Walker Chen Link: https://lore.kernel.org/r/20230322094820.24738-4-walker.chen@starfivetech.com Signed-off-by: Vinod Koul commit 790f3c8b8f9f63b1f5a3ffd06630ed3d0df9804c Author: Walker Chen Date: Wed Mar 22 17:48:18 2023 +0800 dmaengine: dw-axi-dmac: Add support for StarFive JH7110 DMA Add DMA reset operation in device probe and use different configuration on CH_CFG registers according to match data. Update all uses of of_device_is_compatible with of_device_get_match_data. Signed-off-by: Walker Chen Reviewed-by: Emil Renner Berthing Link: https://lore.kernel.org/r/20230322094820.24738-3-walker.chen@starfivetech.com Signed-off-by: Vinod Koul commit 1f94479edb4decdcec3e902528abb47f0ccd5d16 Author: Ian Rogers Date: Wed Apr 12 12:54:44 2023 -0300 libperf: Make perf_cpu_map__alloc() available as an internal function for tools/perf to use We had the open coded equivalent in perf_cpu_map__empty_new(), so reuse what is in libperf. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexey Bayduraev Cc: Dmitriy Vyukov Cc: Jiri Olsa Cc: Namhyung Kim Cc: Riccardo Mancini Cc: Stephane Eranian Cc: Stephen Brennan Link: https://lore.kernel.org/lkml/20230407230405.2931830-3-irogers@google.com [ Split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit 7bb1d048bdfe1c7d36fdd72be9abd5f552b6246a Author: Ian Rogers Date: Wed Apr 12 12:45:45 2023 -0300 perf cpumap: Use perf_cpu_map__nr(cpus) to access cpus->nr So that we can have a single point where to refcount check 'struct perf_cpu_map' instances for use after free, etc. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexey Bayduraev Cc: Dmitriy Vyukov Cc: Jiri Olsa Cc: Namhyung Kim Cc: Riccardo Mancini Cc: Stephane Eranian Cc: Stephen Brennan Link: https://lore.kernel.org/lkml/20230407230405.2931830-3-irogers@google.com [ Split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo commit bcab1adeaad4b39a1e04cb98979a367d08253f03 Author: Ondrej Mosnacek Date: Wed Apr 12 15:59:19 2023 +0200 selinux: fix Makefile dependencies of flask.h Make the flask.h target depend on the genheaders binary instead of classmap.h to ensure that it is rebuilt if any of the dependencies of genheaders are changed. Notably this fixes flask.h not being rebuilt when initial_sid_to_string.h is modified. Fixes: 8753f6bec352 ("selinux: generate flask headers during kernel build") Signed-off-by: Ondrej Mosnacek Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit 10fd5f70c397782a97f411f25bfb312ea92b55bc Author: Alexei Starovoitov Date: Wed Apr 12 10:12:52 2023 -0700 bpf: Handle NULL in bpf_local_storage_free. During OOM bpf_local_storage_alloc() may fail to allocate 'storage' and call to bpf_local_storage_free() with NULL pointer will cause a crash like: [ 271718.917646] BUG: kernel NULL pointer dereference, address: 00000000000000a0 [ 271719.019620] RIP: 0010:call_rcu+0x2d/0x240 [ 271719.216274] bpf_local_storage_alloc+0x19e/0x1e0 [ 271719.250121] bpf_local_storage_update+0x33b/0x740 Fixes: 7e30a8477b0b ("bpf: Add bpf_local_storage_free()") Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230412171252.15635-1-alexei.starovoitov@gmail.com commit 970b17dfe264a9085ba4e593730ecfd496b950ab Author: Shunsuke Mie Date: Tue Apr 11 19:17:58 2023 +0900 dmaengine: dw-edma: Fix to enable to issue dma request on DMA processing The issue_pending request is ignored while driver is processing a DMA request. Fix to issue the pending requests on any dma channel status. Fixes: e63d79d1ffcd ("dmaengine: Add Synopsys eDMA IP core driver") Signed-off-by: Shunsuke Mie Link: https://lore.kernel.org/r/20230411101758.438472-2-mie@igel.co.jp Signed-off-by: Vinod Koul commit a251994a441ee0a69ba7062c8cd2d08ead3db379 Author: Shunsuke Mie Date: Tue Apr 11 19:17:57 2023 +0900 dmaengine: dw-edma: Fix to change for continuous transfer The dw-edma driver stops after processing a DMA request even if a request remains in the issued queue, which is not the expected behavior. The DMA engine API requires continuous processing. Add a trigger to start after one processing finished if there are requests remain. Fixes: e63d79d1ffcd ("dmaengine: Add Synopsys eDMA IP core driver") Signed-off-by: Shunsuke Mie Link: https://lore.kernel.org/r/20230411101758.438472-1-mie@igel.co.jp Signed-off-by: Vinod Koul commit 619d8ea96d984d007be88b1e7a4ff9159bf44594 Author: Rob Herring Date: Mon Apr 10 18:26:54 2023 -0500 dmaengine: qcom_hidma: Add explicit platform_device.h and of_device.h includes qcom_hidma uses of_dma_configure() which is declared in of_device.h. platform_device.h and of_device.h get implicitly included by of_platform.h, but that is going to be removed soon. Signed-off-by: Rob Herring Acked-by: Sinan Kaya Link: https://lore.kernel.org/r/20230410232654.1561462-1-robh@kernel.org Signed-off-by: Vinod Koul commit 91d6a468e335571f1e67e046050dea9af5fa4ebe Author: Dmitry Baryshkov Date: Mon Apr 10 02:33:55 2023 +0300 dma: gpi: remove spurious unlock in gpi_ch_init gpi_ch_init() doesn't lock the ctrl_lock mutex, so there is no need to unlock it too. Instead the mutex is handled by the function gpi_alloc_chan_resources(), which properly locks and unlocks the mutex. ===================================== WARNING: bad unlock balance detected! 6.3.0-rc5-00253-g99792582ded1-dirty #15 Not tainted ------------------------------------- kworker/u16:0/9 is trying to release lock (&gpii->ctrl_lock) at: [] gpi_alloc_chan_resources+0x108/0x5bc but there are no more locks to release! other info that might help us debug this: 6 locks held by kworker/u16:0/9: #0: ffff575740010938 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x220/0x594 #1: ffff80000809bdd0 (deferred_probe_work){+.+.}-{0:0}, at: process_one_work+0x220/0x594 #2: ffff575740f2a0f8 (&dev->mutex){....}-{3:3}, at: __device_attach+0x38/0x188 #3: ffff57574b5570f8 (&dev->mutex){....}-{3:3}, at: __device_attach+0x38/0x188 #4: ffffb99d06a2f180 (of_dma_lock){+.+.}-{3:3}, at: of_dma_request_slave_channel+0x138/0x280 #5: ffffb99d06a2ee20 (dma_list_mutex){+.+.}-{3:3}, at: dma_get_slave_channel+0x28/0x10c stack backtrace: CPU: 7 PID: 9 Comm: kworker/u16:0 Not tainted 6.3.0-rc5-00253-g99792582ded1-dirty #15 Hardware name: Google Pixel 3 (DT) Workqueue: events_unbound deferred_probe_work_func Call trace: dump_backtrace+0xa0/0xfc show_stack+0x18/0x24 dump_stack_lvl+0x60/0xac dump_stack+0x18/0x24 print_unlock_imbalance_bug+0x130/0x148 lock_release+0x270/0x300 __mutex_unlock_slowpath+0x48/0x2cc mutex_unlock+0x20/0x2c gpi_alloc_chan_resources+0x108/0x5bc dma_chan_get+0x84/0x188 dma_get_slave_channel+0x5c/0x10c gpi_of_dma_xlate+0x110/0x1a0 of_dma_request_slave_channel+0x174/0x280 dma_request_chan+0x3c/0x2d4 geni_i2c_probe+0x544/0x63c platform_probe+0x68/0xc4 really_probe+0x148/0x2ac __driver_probe_device+0x78/0xe0 driver_probe_device+0x3c/0x160 __device_attach_driver+0xb8/0x138 bus_for_each_drv+0x84/0xe0 __device_attach+0x9c/0x188 device_initial_probe+0x14/0x20 bus_probe_device+0xac/0xb0 device_add+0x60c/0x7d8 of_device_add+0x44/0x60 of_platform_device_create_pdata+0x90/0x124 of_platform_bus_create+0x15c/0x3c8 of_platform_populate+0x58/0xf8 devm_of_platform_populate+0x58/0xbc geni_se_probe+0xf0/0x164 platform_probe+0x68/0xc4 really_probe+0x148/0x2ac __driver_probe_device+0x78/0xe0 driver_probe_device+0x3c/0x160 __device_attach_driver+0xb8/0x138 bus_for_each_drv+0x84/0xe0 __device_attach+0x9c/0x188 device_initial_probe+0x14/0x20 bus_probe_device+0xac/0xb0 deferred_probe_work_func+0x8c/0xc8 process_one_work+0x2bc/0x594 worker_thread+0x228/0x438 kthread+0x108/0x10c ret_from_fork+0x10/0x20 Fixes: 5d0c3533a19f ("dmaengine: qcom: Add GPI dma driver") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230409233355.453741-1-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 50f9a76ef127367847cf62999c79304e48018cfa Author: Josh Poimboeuf Date: Wed Apr 12 10:46:48 2023 -0600 iov_iter: Mark copy_compat_iovec_from_user() noinline After commit 6376ce56feb6 ("iov_iter: import single vector iovecs as ITER_UBUF"), GCC does an inter-procedural compiler optimization which moves the user_access_begin() out of copy_compat_iovec_from_user() and into its callers: lib/iov_iter.o: warning: objtool: .altinstr_replacement+0x0: redundant UACCESS disable lib/iov_iter.o: warning: objtool: iovec_from_user.part.0+0xc7: call to copy_compat_iovec_from_user.part.0() with UACCESS enabled lib/iov_iter.o: warning: objtool: __import_iovec+0x21d: call to copy_compat_iovec_from_user.part.0() with UACCESS enabled Enforce the "no UACCESS enable across function boundaries" rule by disabling cloning for copy_compat_iovec_from_user(). Fixes: 6376ce56feb6 ("iov_iter: import single vector iovecs as ITER_UBUF") Reported-by: Stephen Rothwell https://lkml.kernel.org/lkml/20230327120017.6bb826d7@canb.auug.org.au Signed-off-by: Josh Poimboeuf Tested-by: Jens Axboe Signed-off-by: Jens Axboe commit a0106132372120dd0abf5ad7636614e5aeb5da08 Author: Sinthu Raja Date: Tue Mar 14 13:01:37 2023 +0530 phy: cadence: cdns-dphy-rx: Add common module reset support DPHY RX module has a common module reset (RSTB_CMN) which is expected to be released during configuration. In J721E SR1.0 the RSTB_CMN is internally tied to CSI_RX_RST and is hardware controlled, for all other newer platforms the common module reset is software controlled. Add support to control common module reset during configuration and also skip common module reset based on soc_device_match() for J721E SR1.0. Signed-off-by: Sinthu Raja Co-developed-by: Vaishnav Achath Signed-off-by: Vaishnav Achath Reviewed-by: Jai Luthra Link: https://lore.kernel.org/r/20230314073137.2153-1-vaishnav.a@ti.com Signed-off-by: Vinod Koul commit ec318c51b686841e36c924bc0e5a13a75e75b27b Author: Siddharth Vadapalli Date: Thu Mar 9 14:54:34 2023 +0530 phy: ti: j721e-wiz: Add SGMII support in WIZ driver for J721E Enable full rate divider configuration support for J721E_WIZ_16G for SGMII. Signed-off-by: Siddharth Vadapalli Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20230309092434.443550-1-s-vadapalli@ti.com Signed-off-by: Vinod Koul commit 1944caa8e8dcb2d93d99d8364719ad8d07aa163f Author: Benno Lossin Date: Sat Apr 8 12:26:33 2023 +0000 rust: sync: add functions for initializing `UniqueArc>` Add two functions `init_with` and `pin_init_with` to `UniqueArc>` to initialize the memory of already allocated `UniqueArc`s. This is useful when you want to allocate memory check some condition inside of a context where allocation is forbidden and then conditionally initialize an object. Signed-off-by: Benno Lossin Reviewed-by: Gary Guo Reviewed-by: Alice Ryhl Reviewed-by: Andreas Hindborg Link: https://lore.kernel.org/r/20230408122429.1103522-16-y86-dev@protonmail.com Signed-off-by: Miguel Ojeda commit 701608bd030a888f654862295a49c5d0f42f864c Author: Benno Lossin Date: Sat Apr 8 12:26:27 2023 +0000 rust: sync: reduce stack usage of `UniqueArc::try_new_uninit` `UniqueArc::try_new_uninit` calls `Arc::try_new(MaybeUninit::uninit())`. This results in the uninitialized memory being placed on the stack, which may be arbitrarily large due to the generic `T` and thus could cause a stack overflow for large types. Change the implementation to use the pin-init API which enables in-place initialization. In particular it avoids having to first construct and then move the uninitialized memory from the stack into the final location. Signed-off-by: Benno Lossin Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Reviewed-by: Andreas Hindborg Link: https://lore.kernel.org/r/20230408122429.1103522-15-y86-dev@protonmail.com Signed-off-by: Miguel Ojeda commit 692e8935e23efab6c5d5fc4b003816b33c8082f7 Author: Benno Lossin Date: Sat Apr 8 12:26:22 2023 +0000 rust: types: add `Opaque::ffi_init` This function allows to easily initialize `Opaque` with the pin-init API. `Opaque::ffi_init` takes a closure and returns a pin-initializer. This pin-initiailizer calls the given closure with a pointer to the inner `T`. Co-developed-by: Gary Guo Signed-off-by: Gary Guo Signed-off-by: Benno Lossin Reviewed-by: Andreas Hindborg Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20230408122429.1103522-14-y86-dev@protonmail.com [ Fixed typo. ] Signed-off-by: Miguel Ojeda commit 8586f1acd314a47d68d189331606ca235a05b972 Author: Benno Lossin Date: Sat Apr 8 12:26:17 2023 +0000 rust: prelude: add `pin-init` API items to prelude Add `pin-init` API macros and traits to the prelude. Signed-off-by: Benno Lossin Reviewed-by: Gary Guo Reviewed-by: Alice Ryhl Reviewed-by: Andreas Hindborg Link: https://lore.kernel.org/r/20230408122429.1103522-13-y86-dev@protonmail.com Signed-off-by: Miguel Ojeda commit 38cde0bd7b6772003a37b9aa6822568409556ee9 Author: Benno Lossin Date: Sat Apr 8 12:26:12 2023 +0000 rust: init: add `Zeroable` trait and `init::zeroed` function Add the `Zeroable` trait which marks types that can be initialized by writing `0x00` to every byte of the type. Also add the `init::zeroed` function that creates an initializer for a `Zeroable` type that writes `0x00` to every byte. Signed-off-by: Benno Lossin Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Reviewed-by: Andreas Hindborg Link: https://lore.kernel.org/r/20230408122429.1103522-12-y86-dev@protonmail.com Signed-off-by: Miguel Ojeda commit 6841d45a303029c54d6ad1ebb5dc72f7b2a74700 Author: Benno Lossin Date: Sat Apr 8 12:26:07 2023 +0000 rust: init: add `stack_pin_init!` macro The `stack_pin_init!` macro allows pin-initializing a value on the stack. It accepts a `impl PinInit` to initialize a `T`. It allows propagating any errors via `?` or handling it normally via `match`. Signed-off-by: Benno Lossin Reviewed-by: Alice Ryhl Reviewed-by: Andreas Hindborg Reviewed-by: Gary Guo Link: https://lore.kernel.org/r/20230408122429.1103522-11-y86-dev@protonmail.com Signed-off-by: Miguel Ojeda commit d0fdc3961270617826e4794fca1d092853847707 Author: Benno Lossin Date: Sat Apr 8 12:26:01 2023 +0000 rust: init: add `PinnedDrop` trait and macros The `PinnedDrop` trait that facilitates destruction of pinned types. It has to be implemented via the `#[pinned_drop]` macro, since the `drop` function should not be called by normal code, only by other destructors. It also only works on structs that are annotated with `#[pin_data(PinnedDrop)]`. Co-developed-by: Gary Guo Signed-off-by: Gary Guo Signed-off-by: Benno Lossin Reviewed-by: Alice Ryhl Reviewed-by: Andreas Hindborg Link: https://lore.kernel.org/r/20230408122429.1103522-10-y86-dev@protonmail.com Signed-off-by: Miguel Ojeda commit 92c4a1e7e81cc775b2ad6bedb348098230f7ed87 Author: Benno Lossin Date: Sat Apr 8 12:25:56 2023 +0000 rust: init/sync: add `InPlaceInit` trait to pin-initialize smart pointers The `InPlaceInit` trait that provides two functions, for initializing using `PinInit` and `Init`. It is implemented by `Arc`, `UniqueArc` and `Box`. Signed-off-by: Benno Lossin Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Reviewed-by: Andreas Hindborg Link: https://lore.kernel.org/r/20230408122429.1103522-9-y86-dev@protonmail.com Signed-off-by: Miguel Ojeda commit fc6c6baa1f40ded13e539d0c1a17bcefc00abad9 Author: Benno Lossin Date: Sat Apr 8 12:25:51 2023 +0000 rust: init: add initialization macros Add the following initializer macros: - `#[pin_data]` to annotate structurally pinned fields of structs, needed for `pin_init!` and `try_pin_init!` to select the correct initializer of fields. - `pin_init!` create a pin-initializer for a struct with the `Infallible` error type. - `try_pin_init!` create a pin-initializer for a struct with a custom error type (`kernel::error::Error` is the default). - `init!` create an in-place-initializer for a struct with the `Infallible` error type. - `try_init!` create an in-place-initializer for a struct with a custom error type (`kernel::error::Error` is the default). Also add their needed internal helper traits and structs. Co-developed-by: Gary Guo Signed-off-by: Gary Guo Signed-off-by: Benno Lossin Reviewed-by: Alice Ryhl Reviewed-by: Andreas Hindborg Link: https://lore.kernel.org/r/20230408122429.1103522-8-y86-dev@protonmail.com [ Fixed three typos. ] Signed-off-by: Miguel Ojeda commit 90e53c5e70a69159ec255fec361f7dcf9cf36eae Author: Benno Lossin Date: Sat Apr 8 12:25:45 2023 +0000 rust: add pin-init API core This API is used to facilitate safe pinned initialization of structs. It replaces cumbersome `unsafe` manual initialization with elegant safe macro invocations. Due to the size of this change it has been split into six commits: 1. This commit introducing the basic public interface: traits and functions to represent and create initializers. 2. Adds the `#[pin_data]`, `pin_init!`, `try_pin_init!`, `init!` and `try_init!` macros along with their internal types. 3. Adds the `InPlaceInit` trait that allows using an initializer to create an object inside of a `Box` and other smart pointers. 4. Adds the `PinnedDrop` trait and adds macro support for it in the `#[pin_data]` macro. 5. Adds the `stack_pin_init!` macro allowing to pin-initialize a struct on the stack. 6. Adds the `Zeroable` trait and `init::zeroed` function to initialize types that have `0x00` in all bytes as a valid bit pattern. -- In this section the problem that the new pin-init API solves is outlined. This message describes the entirety of the API, not just the parts introduced in this commit. For a more granular explanation and additional information on pinning and this issue, view [1]. Pinning is Rust's way of enforcing the address stability of a value. When a value gets pinned it will be impossible for safe code to move it to another location. This is done by wrapping pointers to said object with `Pin

`. This wrapper prevents safe code from creating mutable references to the object, preventing mutable access, which is needed to move the value. `Pin

` provides `unsafe` functions to circumvent this and allow modifications regardless. It is then the programmer's responsibility to uphold the pinning guarantee. Many kernel data structures require a stable address, because there are foreign pointers to them which would get invalidated by moving the structure. Since these data structures are usually embedded in structs to use them, this pinning property propagates to the container struct. Resulting in most structs in both Rust and C code needing to be pinned. So if we want to have a `mutex` field in a Rust struct, this struct also needs to be pinned, because a `mutex` contains a `list_head`. Additionally initializing a `list_head` requires already having the final memory location available, because it is initialized by pointing it to itself. But this presents another challenge in Rust: values have to be initialized at all times. There is the `MaybeUninit` wrapper type, which allows handling uninitialized memory, but this requires using the `unsafe` raw pointers and a casting the type to the initialized variant. This problem gets exacerbated when considering encapsulation and the normal safety requirements of Rust code. The fields of the Rust `Mutex` should not be accessible to normal driver code. After all if anyone can modify the fields, there is no way to ensure the invariants of the `Mutex` are upheld. But if the fields are inaccessible, then initialization of a `Mutex` needs to be somehow achieved via a function or a macro. Because the `Mutex` must be pinned in memory, the function cannot return it by value. It also cannot allocate a `Box` to put the `Mutex` into, because that is an unnecessary allocation and indirection which would hurt performance. The solution in the rust tree (e.g. this commit: [2]) that is replaced by this API is to split this function into two parts: 1. A `new` function that returns a partially initialized `Mutex`, 2. An `init` function that requires the `Mutex` to be pinned and that fully initializes the `Mutex`. Both of these functions have to be marked `unsafe`, since a call to `new` needs to be accompanied with a call to `init`, otherwise using the `Mutex` could result in UB. And because calling `init` twice also is not safe. While `Mutex` initialization cannot fail, other structs might also have to allocate memory, which would result in conditional successful initialization requiring even more manual accommodation work. Combine this with the problem of pin-projections -- the way of accessing fields of a pinned struct -- which also have an `unsafe` API, pinned initialization is riddled with `unsafe` resulting in very poor ergonomics. Not only that, but also having to call two functions possibly multiple lines apart makes it very easy to forget it outright or during refactoring. Here is an example of the current way of initializing a struct with two synchronization primitives (see [3] for the full example): struct SharedState { state_changed: CondVar, inner: Mutex, } impl SharedState { fn try_new() -> Result> { let mut state = Pin::from(UniqueArc::try_new(Self { // SAFETY: `condvar_init!` is called below. state_changed: unsafe { CondVar::new() }, // SAFETY: `mutex_init!` is called below. inner: unsafe { Mutex::new(SharedStateInner { token_count: 0 }) }, })?); // SAFETY: `state_changed` is pinned when `state` is. let pinned = unsafe { state.as_mut().map_unchecked_mut(|s| &mut s.state_changed) }; kernel::condvar_init!(pinned, "SharedState::state_changed"); // SAFETY: `inner` is pinned when `state` is. let pinned = unsafe { state.as_mut().map_unchecked_mut(|s| &mut s.inner) }; kernel::mutex_init!(pinned, "SharedState::inner"); Ok(state.into()) } } The pin-init API of this patch solves this issue by providing a comprehensive solution comprised of macros and traits. Here is the example from above using the pin-init API: #[pin_data] struct SharedState { #[pin] state_changed: CondVar, #[pin] inner: Mutex, } impl SharedState { fn new() -> impl PinInit { pin_init!(Self { state_changed <- new_condvar!("SharedState::state_changed"), inner <- new_mutex!( SharedStateInner { token_count: 0 }, "SharedState::inner", ), }) } } Notably the way the macro is used here requires no `unsafe` and thus comes with the usual Rust promise of safe code not introducing any memory violations. Additionally it is now up to the caller of `new()` to decide the memory location of the `SharedState`. They can choose at the moment `Arc`, `Box` or the stack. -- The API has the following architecture: 1. Initializer traits `PinInit` and `Init` that act like closures. 2. Macros to create these initializer traits safely. 3. Functions to allow manually writing initializers. The initializers (an `impl PinInit`) receive a raw pointer pointing to uninitialized memory and their job is to fully initialize a `T` at that location. If initialization fails, they return an error (`E`) by value. This way of initializing cannot be safely exposed to the user, since it relies upon these properties outside of the control of the trait: - the memory location (slot) needs to be valid memory, - if initialization fails, the slot should not be read from, - the value in the slot should be pinned, so it cannot move and the memory cannot be deallocated until the value is dropped. This is why using an initializer is facilitated by another trait that ensures these requirements. These initializers can be created manually by just supplying a closure that fulfills the same safety requirements as `PinInit`. But this is an `unsafe` operation. To allow safe initializer creation, the `pin_init!` is provided along with three other variants: `try_pin_init!`, `try_init!` and `init!`. These take a modified struct initializer as a parameter and generate a closure that initializes the fields in sequence. The macros take great care in upholding the safety requirements: - A shadowed struct type is used as the return type of the closure instead of `()`. This is to prevent early returns, as these would prevent full initialization. - To ensure every field is only initialized once, a normal struct initializer is placed in unreachable code. The type checker will emit errors if a field is missing or specified multiple times. - When initializing a field fails, the whole initializer will fail and automatically drop fields that have been initialized earlier. - Only the correct initializer type is allowed for unpinned fields. You cannot use a `impl PinInit` to initialize a structurally not pinned field. To ensure the last point, an additional macro `#[pin_data]` is needed. This macro annotates the struct itself and the user specifies structurally pinned and not pinned fields. Because dropping a pinned struct is also not allowed to break the pinning invariants, another macro attribute `#[pinned_drop]` is needed. This macro is introduced in a following commit. These two macros also have mechanisms to ensure the overall safety of the API. Additionally, they utilize a combined proc-macro, declarative macro design: first a proc-macro enables the outer attribute syntax `#[...]` and does some important pre-parsing. Notably this prepares the generics such that the declarative macro can handle them using token trees. Then the actual parsing of the structure and the emission of code is handled by a declarative macro. For pin-projections the crates `pin-project` [4] and `pin-project-lite` [5] had been considered, but were ultimately rejected: - `pin-project` depends on `syn` [6] which is a very big dependency, around 50k lines of code. - `pin-project-lite` is a more reasonable 5k lines of code, but contains a very complex declarative macro to parse generics. On top of that it would require modification that would need to be maintained independently. Link: https://rust-for-linux.com/the-safe-pinned-initialization-problem [1] Link: https://github.com/Rust-for-Linux/linux/tree/0a04dc4ddd671efb87eef54dde0fb38e9074f4be [2] Link: https://github.com/Rust-for-Linux/linux/blob/f509ede33fc10a07eba3da14aa00302bd4b5dddd/samples/rust/rust_miscdev.rs [3] Link: https://crates.io/crates/pin-project [4] Link: https://crates.io/crates/pin-project-lite [5] Link: https://crates.io/crates/syn [6] Co-developed-by: Gary Guo Signed-off-by: Gary Guo Signed-off-by: Benno Lossin Reviewed-by: Alice Ryhl Reviewed-by: Wedson Almeida Filho Reviewed-by: Andreas Hindborg Link: https://lore.kernel.org/r/20230408122429.1103522-7-y86-dev@protonmail.com Signed-off-by: Miguel Ojeda commit 3ff6e785ad99893f1d502156d23560efd30fec4d Author: Benno Lossin Date: Sat Apr 8 12:25:39 2023 +0000 rust: types: add `Opaque::raw_get` This function mirrors `UnsafeCell::raw_get`. It avoids creating a reference and allows solely using raw pointers. The `pin-init` API will be using this, since uninitialized memory requires raw pointers. Signed-off-by: Benno Lossin Reviewed-by: Gary Guo Reviewed-by: Andreas Hindborg Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20230408122429.1103522-6-y86-dev@protonmail.com Signed-off-by: Miguel Ojeda commit d6dbca3592209d29c10e171224c34803805e88ca Author: Benno Lossin Date: Sat Apr 8 12:25:29 2023 +0000 rust: sync: change error type of constructor functions Change the error type of the constructors of `Arc` and `UniqueArc` to be `AllocError` instead of `Error`. This makes the API more clear as to what can go wrong when calling `try_new` or its variants. Signed-off-by: Benno Lossin Reviewed-by: Andreas Hindborg Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Link: https://lore.kernel.org/r/20230408122429.1103522-4-y86-dev@protonmail.com Signed-off-by: Miguel Ojeda commit 70a21e54a42232f1056db7f05a194f56e03e7d3e Author: Gary Guo Date: Sat Apr 8 12:25:23 2023 +0000 rust: macros: add `quote!` macro Add the `quote!` macro for creating `TokenStream`s directly via the given Rust tokens. It also supports repetitions using iterators. It will be used by the pin-init API proc-macros to generate code. Signed-off-by: Gary Guo Signed-off-by: Benno Lossin Reviewed-by: Andreas Hindborg Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20230408122429.1103522-3-y86-dev@protonmail.com Signed-off-by: Miguel Ojeda commit 2d19d369c0c6dade11b8e3448c158655dbaa7b77 Author: Benno Lossin Date: Sat Apr 8 12:25:18 2023 +0000 rust: enable the `pin_macro` feature This feature enables the use of the `pin!` macro for the `stack_pin_init!` macro. This feature is already stabilized in Rust version 1.68. Signed-off-by: Benno Lossin Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Reviewed-by: Andreas Hindborg Acked-by: Boqun Feng Link: https://lore.kernel.org/r/20230408122429.1103522-2-y86-dev@protonmail.com Signed-off-by: Miguel Ojeda commit ef4dc4cc7001e9cce8a3b556362171648be9ad92 Author: Wedson Almeida Filho Date: Mon Apr 3 18:48:15 2023 +0900 rust: error: Add from_result() helper Add a helper function to easily return C result codes from a Rust function that calls functions which return a Result. Lina: Imported from rust-for-linux/rust, originally developed by Wedson as part of file_operations.rs. Added the allow() flags since there is no user in the kernel crate yet and fixed a typo in a comment. Replaced the macro with a function taking a closure, per discussion on the ML. Co-developed-by: Fox Chen Signed-off-by: Fox Chen Co-developed-by: Miguel Ojeda Signed-off-by: Miguel Ojeda Signed-off-by: Wedson Almeida Filho Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Asahi Lina Link: https://lore.kernel.org/r/20230224-rust-error-v3-6-03779bddc02b@asahilina.net Signed-off-by: Miguel Ojeda commit 752417b3f0e7721f1d630f40da22d57e0dae043e Author: Sven Van Asbroeck Date: Mon Apr 3 18:48:14 2023 +0900 rust: error: Add a helper to convert a C ERR_PTR to a `Result` Some kernel C API functions return a pointer which embeds an optional `errno`. Callers are supposed to check the returned pointer with `IS_ERR()` and if this returns `true`, retrieve the `errno` using `PTR_ERR()`. Create a Rust helper function to implement the Rust equivalent: transform a `*mut T` to `Result<*mut T>`. Lina: Imported from rust-for-linux/linux, with subsequent refactoring and contributions squashed in and attributed below. Renamed the function to from_err_ptr(). Co-developed-by: Boqun Feng Signed-off-by: Boqun Feng Co-developed-by: Miguel Ojeda Signed-off-by: Miguel Ojeda Co-developed-by: Fox Chen Signed-off-by: Fox Chen Co-developed-by: Gary Guo Signed-off-by: Gary Guo Signed-off-by: Sven Van Asbroeck Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Asahi Lina Link: https://lore.kernel.org/r/20230224-rust-error-v3-5-03779bddc02b@asahilina.net [ Add a removal of `#[allow(dead_code)]`. ] Signed-off-by: Miguel Ojeda commit 086fbfa3b328901fa8b369093ba468864e20544e Author: Wedson Almeida Filho Date: Mon Apr 3 18:48:13 2023 +0900 rust: error: Add to_result() helper Add a to_result() helper to convert kernel C return values to a Rust Result, mapping >=0 values to Ok(()) and negative values to Err(...), with Error::from_errno() ensuring that the errno is within range. Lina: Imported from rust-for-linux/rust, originally developed by Wedson as part of the AMBA device driver support. Signed-off-by: Wedson Almeida Filho Reviewed-by: Andreas Hindborg Reviewed-by: Gary Guo Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Asahi Lina Link: https://lore.kernel.org/r/20230224-rust-error-v3-4-03779bddc02b@asahilina.net [ Add a removal of `#[allow(dead_code)]`. ] Signed-off-by: Miguel Ojeda commit 6551a7fe0acbbc816802350414b37d9b42daccc8 Author: Miguel Ojeda Date: Mon Apr 3 18:48:12 2023 +0900 rust: error: Add Error::from_errno{_unchecked}() Add a function to create `Error` values out of a kernel error return, which safely upholds the invariant that the error code is well-formed (negative and greater than -MAX_ERRNO). If a malformed code is passed in, it will be converted to EINVAL. Lina: Imported from rust-for-linux/rust as authored by Miguel and Fox with refactoring from Wedson, renamed from_kernel_errno() to from_errno(). Co-developed-by: Fox Chen Signed-off-by: Fox Chen Co-developed-by: Wedson Almeida Filho Signed-off-by: Wedson Almeida Filho Signed-off-by: Miguel Ojeda Reviewed-by: Andreas Hindborg Reviewed-by: Gary Guo Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Asahi Lina Link: https://lore.kernel.org/r/20230224-rust-error-v3-3-03779bddc02b@asahilina.net [ Mark the new associated functions as `#[allow(dead_code)]`. ] Signed-off-by: Miguel Ojeda commit c7e20faa5fcad7a177cf6c306138010343dd6d3e Author: Asahi Lina Date: Mon Apr 3 18:48:11 2023 +0900 rust: error: Add Error::to_ptr() This is the Rust equivalent to ERR_PTR(), for use in C callbacks. Marked as #[allow(dead_code)] for now, since it does not have any consumers yet. Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Asahi Lina Reviewed-by: Gary Guo Link: https://lore.kernel.org/r/20230224-rust-error-v3-2-03779bddc02b@asahilina.net Signed-off-by: Miguel Ojeda commit 46384d0990bf99ed8b597e8794ea581e2a647710 Author: Asahi Lina Date: Mon Apr 3 18:48:10 2023 +0900 rust: error: Rename to_kernel_errno() -> to_errno() This is kernel code, so specifying "kernel" is redundant. Let's simplify things and just call it to_errno(). Reviewed-by: Gary Guo Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Asahi Lina Link: https://lore.kernel.org/r/20230224-rust-error-v3-1-03779bddc02b@asahilina.net Signed-off-by: Miguel Ojeda commit 31d95c2f99bf16e59b996cf6a227e198a64e835c Author: Asahi Lina Date: Mon Apr 3 19:01:12 2023 +0900 rust: sync: arc: Add UniqueArc::assume_init() We can already create `UniqueArc>` instances with `UniqueArc::try_new_uninit()` and write to them with `write()`. Add the missing unsafe `assume_init()` function to promote it to `UniqueArc`, so users can do piece-wise initialization of the contents instead of doing it all at once as long as they keep the invariants (the same requirements as `MaybeUninit::assume_init()`). This mirrors the std `Arc::assume_init()` function. In the kernel, since we have `UniqueArc`, arguably this only belongs there since most use cases will initialize it immediately after creating it, before demoting it to `Arc` to share it. [ Miguel: The "Rust pin-init API for pinned initialization of structs" patch series [1] from Benno Lossin contains a very similar patch: rust: sync: add `assume_init` to `UniqueArc` Adds the `assume_init` function to `UniqueArc>` that unsafely assumes the value to be initialized and yields a value of type `UniqueArc`. This function is used when manually initializing the pointee of an `UniqueArc`. To make that patch a noop and thus drop it, I adjusted the `SAFETY` comment here to be the same as in the current latest version of that series (v7). I have also brought the `Reviewed-by`s there into here, and reworded the `Co-authored-by` into `Co-developed-by`. ] Link: https://lore.kernel.org/r/20230408122429.1103522-5-y86-dev@protonmail.com [1] Co-developed-by: Benno Lossin Signed-off-by: Benno Lossin Signed-off-by: Asahi Lina Reviewed-by: Gary Guo Reviewed-by: Wedson Almeida Filho Reviewed-by: Andreas Hindborg Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20230224-rust-arc-v2-2-5c97a865b276@asahilina.net Signed-off-by: Miguel Ojeda commit 73b46467cac027fe6cbe6585946726b53b80bfdb Author: Siddharth Vadapalli Date: Wed Mar 15 14:54:08 2023 +0530 dt-bindings: phy: ti: phy-gmii-sel: Add support for J784S4 CPSW9G The CPSW9G instance of CPSW Ethernet Switch on TI's J784S4 SoC supports additional PHY modes like QSGMII. Add a compatible for it. Enable the use of "ti,qsgmii-main-ports" property for J784S4 CPSW9G. Signed-off-by: Siddharth Vadapalli Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230315092408.1722114-1-s-vadapalli@ti.com Signed-off-by: Vinod Koul commit 57c0e1362fdd57d0cea7ab1e583b58abf4bd8c2d Author: Siddharth Vadapalli Date: Mon Apr 3 15:15:52 2023 +0530 phy: ti: j721e-wiz: Fix unreachable code in wiz_mode_select() In the wiz_mode_select() function, the configuration performed for PHY_TYPE_USXGMII is unreachable. Fix it. Fixes: b64a85fb8f53 ("phy: ti: phy-j721e-wiz.c: Add usxgmii support in wiz driver") Signed-off-by: Siddharth Vadapalli Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20230403094552.929108-1-s-vadapalli@ti.com Signed-off-by: Vinod Koul commit 0cfa43ab46b577804a3e89cc5aa7922fe4d9b74f Author: Swapnil Jakhade Date: Mon Apr 3 10:56:44 2023 +0200 phy: cadence: Sierra: Add PCIe + SGMII PHY multilink configuration Add register sequences for PCIe + SGMII PHY multilink configuration. This has been validated on TI J7 platforms. Signed-off-by: Swapnil Jakhade Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20230403085644.10187-1-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 59322d35179987e85b593e504fd334de8683c835 Author: Richard Fitzgerald Date: Tue Apr 11 16:25:28 2023 +0100 ASoC: cs35l56: Re-patch firmware after system suspend Check during cs35l56_system_resume() whether the firmware patch must be applied again. The FIRMWARE_MISSING flag in the PROTECTION_STATUS register indicates whether the firmware has been patched. In non-secure mode the FIRMWARE_MISSING flag is cleared at the end of dsp_work(). If it is set after system-resume we know that dsp_work() must be run again. In secure mode the pre-OS loader will have done the secure patching and cleared the FIRMWARE_MISSING flag. So this flag does not tell us whether firmware memory was lost. But the driver could only be downloading non-secure tunings, which is always safe to do. If the driver has control of RESET we will have asserted it during suspend so the firmware patch will have been lost. The driver would only have control of RESET in non-secure mode. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/168122674550.26.8545058503709956172@mailman-core.alsa-project.org Signed-off-by: Mark Brown commit 39a594dc0b4ac949edf221db33c7061c45e2c90b Author: Richard Fitzgerald Date: Tue Apr 11 16:25:23 2023 +0100 ASoC: cs35l56: Remove quick-cancelling of dsp_work() Delete the 'removing' flag and don't kick init_completion to make a quick cancel of dsp_work(). Just let it timeout on the wait for the completion. Simplify the code to standard cancelling or flushing of the work. This avoids introducing corner cases from a layer of custom signalling. It also avoids potential race conditions when system-suspend handling is added. Unless the hardware is broken, the dsp_work() will already have started and passed the completion before the driver would want to cancel it. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/168122674746.26.16881587647873355224@mailman-core.alsa-project.org Signed-off-by: Mark Brown commit f9dc6b875ec0a6a6d4091cd9603d193ec98c75a2 Author: Richard Fitzgerald Date: Tue Apr 11 16:25:27 2023 +0100 ASoC: cs35l56: Add basic system suspend handling This adds the main handling for system suspend but does not handle re-patching the firmware after system resume. This is a multi-stage suspend and resume because if there is a RESET line it is almost certain that it will be shared by all the amps. So every amp must have done its suspend before we can assert RESET. Likewise we must de-assert RESET before the amps can resume. It's preferable to assert RESET before we turning off regulators, and while they power up. The actual suspend and resume is done by using the pair pm_runtime_force_suspend() and pm_runtime_force_resume() to re-use our runtime suspend/resume sequences. pm_runtime_force_suspend() will disable our pm_runtime. If we were runtime-resumed it calls our runtime_suspend(). pm_runtime_force_resume() re-enables pm_runtime and if we were originally runtime-resumed before the pm_runtime_force_suspend() it calls our runtime_resume(). Otherwise it leaves us runtime-suspended. The general process is therefore: suspend() -> finish dsp_work and then run our runtime_suspend suspend_late() -> assert RESET and turn off supplies resume_early() -> enable supplies and de-assert RESET resume() -> pm_runtime_force_resume() In addition, to prevent the IRQ handler running in the period between pm_runtime_force_suspend() and pm_runtime_force_resume() the parent IRQ is temporarily disabled: - from suspend until suspend_noirq - from resume_noirq until resume Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230411152528.329803-6-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit f00abaddf0300bd9ca87918148a26bdb748129db Author: Richard Fitzgerald Date: Tue Apr 11 16:25:26 2023 +0100 ASoC: cs35l56: Always wait for firmware boot in runtime-resume When we are resuming from a system suspend the CS35L56 has probably been hard reset (usually a power-on reset). So we must wait for the firmware to boot. On SoundWire we also need it to re-initialize before we can read the registers to check the CS35L56 state. The simplest way to handle this is for runtime-resume to always wait for firmware boot. If the firmware is already booted the overhead is only one register read. The system-resume will have to runtime-resume the driver anyway before attempting any register access. So this will automatically include the wait for initialization on SoundWire. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230411152528.329803-5-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 7816e3407110d887726687740aa18c9ce8eeb0d2 Author: Richard Fitzgerald Date: Tue Apr 11 16:25:25 2023 +0100 ASoC: cs35l56: Skip first init_completion wait in dsp_work if init_done At the start of dsp_work() only wait for init_completion if !init_done. This allows system suspend to re-queue dsp_work() without having to do a dummy complete() of init_completion. A dummy completion in system suspend would have to be conditional on init_done. But that would create a possible race condition between our system resume and cs35l56_init() in the corner case that we suspend right after the SoundWire core has enumerated and reported ATTACHED. It is safer and simpler to have cs35l56_init() as the only place that init_completion is completed, and dsp_work() as the only place that it is consumed. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230411152528.329803-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 7b98a1efbabfd729441f46823b24432f2c32deeb Author: Richard Fitzgerald Date: Tue Apr 11 16:25:24 2023 +0100 ASoC: cs35l56: Use DAPM widget for firmware PLAY/PAUSE If we use a DAPM widget instead of mute_stream() to send the PLAY command we can issue the plays to multiple amps in parallel. With mute_stream each codec driver instance is called one at a time so we get N * PS0 delay time. DAPM does each stage on every widget in a card before moving to the next stage. So all amps will do the PRE_PMU then all will do the POST_PMU. The PLAY is sent in the PRE_PMU so that they all power-up in parallel. After the PS0 wait in the first POST_PMU all the other amps will also be ready so there won't be any extra delay, or it will be negligible. There's also no point waiting for the MBOX ack in the PRE_PMU. We won't see a PS0 state in POST_PMU if it didn't ack the PLAY command. So we can save a little extra time. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230411152528.329803-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit d877cad6eda345bc32179219d28745850409b7e3 Merge: c4a413e56d16a 0271b61ba3bb0 Author: Mark Brown Date: Wed Apr 12 17:33:37 2023 +0100 regulator: da9063: disable unused voltage monitors Merge series from Benjamin Bara : Follow-up for my initial patch regarding the disabling of unused voltage monitors. We use the PWR_OK functionality, which asserts GP_FB2 if every monitored voltage is in range. This patch should provide the possibility to deactivate a voltage monitor from the DT if the regulator might be disabled during run time. For this purpose, the regulator notification support is used: https://lore.kernel.org/all/cover.1622628333.git.matti.vaittinen@fi.rohmeurope.com/ commit 45810d486bb44bd60213d5f09a713df81b987972 Author: Guillaume Ranquet Date: Thu Feb 16 17:02:27 2023 +0100 phy: mediatek: add support for phy-mtk-hdmi-mt8195 Add support for the mediatek hdmi phy on MT8195 SoC Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Guillaume Ranquet Link: https://lore.kernel.org/r/20220919-v8-3-a84c80468fe9@baylibre.com Signed-off-by: Vinod Koul commit 605b90371912edb2214088e69f5e7e1121507062 Author: Guillaume Ranquet Date: Thu Feb 16 17:02:26 2023 +0100 phy: phy-mtk-hdmi: Add generic phy configure callback Some phys, such as mt8195, needs to have a configure callback defined. Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Signed-off-by: Guillaume Ranquet Link: https://lore.kernel.org/r/20220919-v8-2-a84c80468fe9@baylibre.com Signed-off-by: Vinod Koul commit c78fe548b062db5a0c90390078601dfbc9b4daa9 Author: Guillaume Ranquet Date: Thu Feb 16 17:02:25 2023 +0100 dt-bindings: phy: mediatek: hdmi-phy: Add mt8195 compatible Add a compatible for the HDMI PHY on MT8195 Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Signed-off-by: Guillaume Ranquet Link: https://lore.kernel.org/r/20220919-v8-1-a84c80468fe9@baylibre.com Signed-off-by: Vinod Koul commit e024854048e733391b31fe5a398704b31b9af803 Author: Gaosheng Cui Date: Tue Nov 29 19:16:34 2022 +0800 phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port The tegra_xusb_port_unregister should be called when usb2_port and ulpi_port map fails in tegra_xusb_add_usb2_port() or in tegra_xusb_add_ulpi_port(), fix it. Fixes: 53d2a715c240 ("phy: Add Tegra XUSB pad controller support") Signed-off-by: Gaosheng Cui Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20221129111634.1547747-1-cuigaosheng1@huawei.com Signed-off-by: Vinod Koul commit a50abe2e6d4906c4d83c6da155dc1fc4624e1280 Author: Krzysztof Kozlowski Date: Tue Apr 4 21:01:15 2023 +0200 dt-bindings: phy: ti,phy-j721e-wiz: document clock-output-names Document the clock-output-names property of clock children, even though the nodes are actually deprecated, to fix dtbs_check warnings like: k3-j7200-common-proc-board.dtb: wiz@5060000: refclk-dig: 'clock-output-names' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230404190115.546973-5-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit c042ea2a9ee2a41c45c0e70812a1e64ae38ed919 Author: Krzysztof Kozlowski Date: Tue Apr 4 21:01:14 2023 +0200 dt-bindings: phy: ti,phy-j721e-wiz: drop assigned-clocks The meta schema from DT schema already defines assigned-clocks, so there is no need for device schema to mention it at all. There are also no benefits of having it here and a board could actually need more of clock assignments than the schema allows. Keep however the assigned-clocks in children nodes, as apparently their proper parenting is required. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230404190115.546973-4-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 1ca60781e387df1ca753117e2507eaf154057ff8 Author: Krzysztof Kozlowski Date: Tue Apr 4 21:01:13 2023 +0200 dt-bindings: phy: ti,phy-am654-serdes: drop assigned-clocks type The meta schema from DT schema already defines assigned-clocks, so there is no need for device schema to mention it at all. The specific parenting of the first input and output clock is apparently important, thus keep them as required, but without defining type. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230404190115.546973-3-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit e458b7aa67cdaf3e63d6a1feecf4f52edb225561 Author: Krzysztof Kozlowski Date: Tue Apr 4 21:01:12 2023 +0200 dt-bindings: phy: cadence-torrent: drop assigned-clocks The meta schema from DT schema already defines assigned-clocks, so there is no need for device schema to mention it at all. There are also no benefits of having it here and a board could actually need more of clock assignments than the schema allows. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230404190115.546973-2-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 60671c4feee550e5597565866a9d8e1001ffa770 Author: Krzysztof Kozlowski Date: Tue Apr 4 21:01:11 2023 +0200 dt-bindings: phy: cadence-sierra: drop assigned-clocks The meta schema from DT schema already defines assigned-clocks, so there is no need for device schema to mention it at all. There are also no benefits of having it here and a board could actually need more of clock assignments than the schema allows. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230404190115.546973-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 49e6833f9d65a3321021eb8827d0c4c0e1c0441d Author: Tom Rix Date: Fri Mar 24 09:26:49 2023 -0400 phy: rockchip: remove unused hw_to_inno function clang with W=1 reports drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c:284:36: error: unused function 'hw_to_inno' [-Werror,-Wunused-function] static inline struct inno_dsidphy *hw_to_inno(struct clk_hw *hw) ^ This function is not used so remove it. Signed-off-by: Tom Rix Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20230324132649.2649166-1-trix@redhat.com Signed-off-by: Vinod Koul commit 607c101fe9f2f618ef8db9f9b589a365125c16ee Author: Bartosz Golaszewski Date: Tue Apr 11 15:04:44 2023 +0200 phy: qualcomm: phy-qcom-qmp-ufs: add definitions for sa8775p Add QMP PHY config for sa8775p and add support for the new compatible. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20230411130446.401440-4-brgl@bgdev.pl Signed-off-by: Vinod Koul commit e5796a9cdf73ed08f8d7fbca4749d7097ee2ca0b Author: Bartosz Golaszewski Date: Tue Apr 11 15:04:43 2023 +0200 dt-bindings: phy: qmp-ufs: describe the UFS PHY for sa8775p Add a new compatible for the QMP UFS PHY found on sa8775p platforms and update the clocks property to accommodate three clocks. Signed-off-by: Bartosz Golaszewski Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230411130446.401440-3-brgl@bgdev.pl Signed-off-by: Vinod Koul commit d08076678ce72140a40553d226f90d189fbe06d1 Author: Uwe Kleine-König Date: Fri Dec 30 13:44:31 2022 +0100 ipmi:ssif: Drop if blocks with always false condition For both variants (platform and i2c driver) after a successful bind (i.e. .probe completed without error) driver data is set to a non-NULL value. So the return value of i2c_get_clientdata and dev_get_drvdata respectively are not NULL and so the if blocks are never executed. (And if you fear they might, they shouldn't return silently and yield a resource leak.) Signed-off-by: Uwe Kleine-König Message-Id: <20221230124431.202474-1-u.kleine-koenig@pengutronix.de> Signed-off-by: Corey Minyard commit 67a00d29c360f4d7b2ca7b1ccf24b145f60d14b8 Author: Bob Pearson Date: Wed Mar 29 14:33:09 2023 -0500 RDMA/rxe: Fix incorrect TASKLET_STATE_SCHED check in rxe_task.c In a previous patch TASKLET_STATE_SCHED was used as a mask but it is a bit position instead. Add the missing shift. Link: https://lore.kernel.org/r/20230329193308.7489-1-rpearsonhpe@gmail.com Reported-by: Dan Carpenter Link: https://lore.kernel.org/linux-rdma/8a054b78-6d50-4bc6-8d8a-83f85fbdb82f@kili.mountain/ Fixes: d94671632572 ("RDMA/rxe: Rewrite rxe_task.c") Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 4e8db2d7520f780f86055465c680e20327008a34 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 12:36:58 2023 -0300 perf map: Add map__refcnt() accessor to use in the maps test To remove one more direct access to 'struct map' so that we can intecept accesses to its instantiations and refcount check it to catch use after free, etc. Cc: Adrian Hunter Cc: Alexey Bayduraev Cc: Dmitriy Vyukov Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Riccardo Mancini Cc: Stephane Eranian Cc: Stephen Brennan Link: https://lore.kernel.org/lkml/ZDbRIJknafLnDwtO@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5af507bef93c09a94fb8f058213b489178f4cbe5 Author: Saurabh Sengar Date: Tue Mar 28 00:30:04 2023 -0700 x86/ioapic: Don't return 0 from arch_dynirq_lower_bound() arch_dynirq_lower_bound() is invoked by the core interrupt code to retrieve the lowest possible Linux interrupt number for dynamically allocated interrupts like MSI. The x86 implementation uses this to exclude the IO/APIC GSI space. This works correctly as long as there is an IO/APIC registered, but returns 0 if not. This has been observed in VMs where the BIOS does not advertise an IO/APIC. 0 is an invalid interrupt number except for the legacy timer interrupt on x86. The return value is unchecked in the core code, so it ends up to allocate interrupt number 0 which is subsequently considered to be invalid by the caller, e.g. the MSI allocation code. The function has already a check for 0 in the case that an IO/APIC is registered, as ioapic_dynirq_base is 0 in case of device tree setups. Consolidate this and zero check for both ioapic_dynirq_base and gsi_top, which is used in the case that no IO/APIC is registered. Fixes: 3e5bedc2c258 ("x86/apic: Fix arch_dynirq_lower_bound() bug for DT enabled machines") Signed-off-by: Saurabh Sengar Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/1679988604-20308-1-git-send-email-ssengar@linux.microsoft.com commit f1f67db9d64ffb85af04dbbf59e3f213fbf86add Author: Lars-Peter Clausen Date: Sun Apr 9 18:44:58 2023 -0700 clk: qcom: rpm: Use managed `of_clk_add_hw_provider()` Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230410014502.27929-7-lars@metafoo.de commit 984abd349d0f76d4b267abc0d8e1a86af3ec2d84 Author: Alexander Pantyukhin Date: Sat Jan 14 18:05:33 2023 +0500 perf scripts python intel-pt-events: Delete unused 'event_attr variable The 'event_attr' is never used later, the var is ok be deleted. Additional code simplification is to substitute string slice comparison with "substring" function. This case no need to know the length specific words. Signed-off-by: Alexander Pantyukhin Acked-by: Adrian Hunter Cc: Andrew Morton Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230114130533.2877-1-apantykhin@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit bf81de760a8364656441a1fe067c17fa5261da5c Author: Benjamin Tissoires Date: Fri Feb 17 14:04:41 2023 +0100 selftests: hid: import hid-tools usb-crash tests These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. This one gets skipped when run by vmtest.sh as we currently need to test against actual kernel modules (.ko), not built-in to fetch the list of supported devices. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Signed-off-by: Benjamin Tissoires commit a4ee40b6ac281125c3b7aa3e42401b271c50c7bc Author: Benjamin Tissoires Date: Fri Feb 17 13:56:04 2023 +0100 selftests: hid: import hid-tools hid-sony and hid-playstation tests These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. The code is taken from [1] to fix a change in v6.3. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Link: https://gitlab.freedesktop.org/libevdev/hid-tools/-/merge_requests/143 [1] Cc: Roderick Colenbrander Cc: Jose Torreguitar Signed-off-by: Roderick Colenbrander Signed-off-by: Benjamin Tissoires commit ff3b2228e3c886863f13d694480e36bfdcbe33e0 Author: Benjamin Tissoires Date: Fri Feb 17 13:49:33 2023 +0100 selftests: hid: import hid-tools hid-ite tests These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Peter Hutterer Cc: Roderick Colenbrander Signed-off-by: Peter Hutterer Signed-off-by: Roderick Colenbrander Signed-off-by: Benjamin Tissoires commit 9898fa566596a259dee3407ba684f9ff0d514944 Author: Benjamin Tissoires Date: Fri Feb 17 13:45:00 2023 +0100 selftests: hid: import hid-tools hid-apple tests These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Roderick Colenbrander Signed-off-by: Roderick Colenbrander Signed-off-by: Benjamin Tissoires commit 1dec39d489be13b416ab03d19355c712f1bcb21b Author: Benjamin Tissoires Date: Fri Feb 17 13:37:52 2023 +0100 selftests: hid: import hid-tools wacom tests These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Jason Gerecke Signed-off-by: Benjamin Tissoires commit 0bb3ed717d9f4f204643e3fd0791be2ddd8eaf4c Author: Benjamin Tissoires Date: Fri Feb 17 13:28:45 2023 +0100 selftests: hid: import hid-tools hid-multitouch and hid-tablets tests These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. There are a lot of multitouch tests, and the default timeout of 45 seconds is not big enough. Bump it to 200 seconds. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Peter Hutterer Cc: Kai-Heng Feng Cc: Roderick Colenbrander Cc: наб Cc: Blaž Hrastnik Signed-off-by: Ahelenia Ziemiańska Signed-off-by: Peter Hutterer Signed-off-by: Roderick Colenbrander Signed-off-by: Benjamin Tissoires commit 356888cb08890a61f4d4565c5950c070feafada1 Author: Benjamin Tissoires Date: Fri Feb 17 13:26:06 2023 +0100 selftests: hid: import hid-tools hid-mouse tests These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Peter Hutterer Cc: Roderick Colenbrander Signed-off-by: Peter Hutterer Signed-off-by: Roderick Colenbrander Signed-off-by: Benjamin Tissoires commit b2c4944e16744aee54e312b3be9c044130297f50 Author: Benjamin Tissoires Date: Fri Feb 17 13:23:23 2023 +0100 selftests: hid: import hid-tools hid-keyboards tests These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Nicolas Saenz Julienne Cc: Peter Hutterer Cc: Roderick Colenbrander Signed-off-by: Peter Hutterer Signed-off-by: Roderick Colenbrander Signed-off-by: Benjamin Tissoires commit 8837469ac4de8e72ed972d7123d40218a7922f80 Author: Benjamin Tissoires Date: Fri Feb 17 12:27:39 2023 +0100 selftests: hid: import hid-tools hid-gamepad tests These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Candle Sun Cc: Jose Torreguitar Cc: Peter Hutterer Cc: Roderick Colenbrander Cc: Silvan Jegen Signed-off-by: Silvan Jegen Signed-off-by: Peter Hutterer Signed-off-by: Roderick Colenbrander Signed-off-by: Benjamin Tissoires commit ffb85d5c9e80892466fe8cfead60a71f1ee7c918 Author: Benjamin Tissoires Date: Fri Feb 17 12:25:14 2023 +0100 selftests: hid: import hid-tools hid-core tests These tests have been developed in the hid-tools[0] tree for a while. Now that we have a proper selftests/hid kernel entry and that the tests are more reliable, it is time to directly include those in the kernel tree. I haven't imported all of hid-tools, the python module, but only the tests related to the kernel. We can rely on pip to fetch the latest hid-tools release, and then run the tests directly from the tree. This should now be easier to request tests when something is not behaving properly in the HID subsystem. [0] https://gitlab.freedesktop.org/libevdev/hid-tools Cc: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Benjamin Tissoires commit 7d0b3f100b144d6910d75158c586b047f7e634a2 Author: Benjamin Tissoires Date: Mon Jan 23 10:54:09 2023 +0100 selftests: hid: make vmtest rely on make Having a default binary is simple enough, but this also means that we need to keep the targets in sync as we are adding them in the Makefile. So instead of doing that manual work, make vmtest.sh generic enough to actually be capable of running 'make -C tools/testing/selftests/hid'. The new image we use has make installed, which the base fedora image doesn't. Signed-off-by: Benjamin Tissoires commit ec108d3cc7663db06dc3fe38a25391b3b7f925f6 Author: Anna Schumaker Date: Tue Apr 4 15:12:52 2023 -0400 NFS: Convert readdir page array functions to use a folio Signed-off-by: Anna Schumaker commit 61f02e0ab81e7c9415dc32e36fe45fc380dce2f0 Author: Anna Schumaker Date: Tue Apr 4 12:05:22 2023 -0400 NFS: Convert the readdir array-of-pages into an array-of-folios This patch only converts the actual array, but doesn't touch the individual nfs_cache_array pages and related functions (that will be done in the next patch). I also adjust the names of the fields in the nfs_readdir_descriptor to say "folio" instead of "page". Signed-off-by: Anna Schumaker commit 9b8e17813aeccc29c2f9f2e6e68997a6eac2d26d Author: Josh Poimboeuf Date: Tue Apr 11 22:26:41 2023 -0700 sched/core: Make sched_dynamic_mutex static The sched_dynamic_mutex is only used within the file. Make it static. Fixes: e3ff7c609f39 ("livepatch,sched: Add livepatch task switching to cond_resched()") Reported-by: kernel test robot Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/oe-kbuild-all/202304062335.tNuUjgsl-lkp@intel.com/ commit d1115de6aff33a947adf6645dbdacdd956cc3feb Author: Konrad Dybcio Date: Thu Apr 6 20:47:28 2023 +0200 dt-bindings: iommu: Convert QCOM IOMMU to YAML Convert the Qualcomm IOMMU bindings to YAML. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230406-topic-qciommu-v3-1-aa0e4f018191@linaro.org Signed-off-by: Rob Herring commit d8dab40a8b37fe8207e1edf68205c709b477e0a4 Merge: 55bf14961db9d fd35174e13f98 Author: Daniel Vetter Date: Wed Apr 12 16:22:41 2023 +0200 Merge tag 'drm-misc-next-2023-04-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v6.4-rc1: Cross-subsystem Changes: - Convert MIPI DSIM bridge dt to yaml. Core Changes: - Fix UAF race in drm scheduler. Driver Changes: - Add primary plane positioning support to VKMS. - Convert omapdrm fbdev emulation to in-kernel client. - Assorted small fixes to vkms, vc4, nouveau, vmwgfx. Signed-off-by: Daniel Vetter From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/b7c37d4e-8f16-85dc-0f5f-3bd98f961395@linux.intel.com commit eab5051788f6111adb88268a784af0c981616579 Author: Hangliang Lai Date: Tue Apr 11 09:32:24 2023 +0800 perf top: Expand the range of multithreaded phase In __cmd_top(), perf_set_multithreaded() is used to enable pthread_rwlock, thus down_read() and down_write () are not nops, handling concurrency problems Then 'perf top' uses perf_set_singlethreaded(), switching to the single threaded phase, assuming that no thread concurrency will happen later. However, a use after free problem could occur in the single threaded phase, the concurrent procedure is this: display_thread process_thread -------------- -------------- thread__comm_len -> thread__comm_str -> __thread__comm_str(thread) thread__delete -> comm__free -> comm_str__put -> zfree(&cs->str) -> thread->comm_len = strlen(comm); Since in single thread phase, perf_singlethreaded is true, down_read() and down_write() do nothing to avoid concurrency problems. This patch moves the perf_set_singlethreaded() call to the function tail to expand the multithreaded phase range, making display_thread() and process_thread() concurrency safe. Reviewed-by: Yunfeng Ye Signed-off-by: Hangliang Lai Co-developed-by: Wenyu Liu Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Christian Brauner Cc: Feilong Lin Cc: Hewenliang Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Link: https://lore.kernel.org/r/20230411013224.2079-1-laihangliang1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit ed4da0d3de1e1781f8fbdc9cf1028b39cc658c7f Author: Tiezhu Yang Date: Fri Apr 7 10:21:30 2023 +0800 tools headers: Remove s390 ptrace.h in check-headers.sh After commit 1f265d2aea0dff1f ("selftests/bpf: Remove not used headers"), tools/arch/s390/include/uapi/asm/ptrace.h has been removed, so remove it in check-headers.sh too, otherwise we can see the following build warning: diff: tools/arch/s390/include/uapi/asm/ptrace.h: No such file or directory Fixes: 1f265d2aea0dff1f ("selftests/bpf: Remove not used headers") Reported-by: kernel test robot Signed-off-by: Tiezhu Yang Acked-by: Daniel Borkmann Acked-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Tiezhu Yang Cc: bpf@vger.kernel.org Cc: loongson-kernel@lists.loongnix.cn Link: https://lore.kernel.org/oe-kbuild-all/202304050029.38NdbQPf-lkp@intel.com/ Link: https://lore.kernel.org/r/1680834090-2322-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit 20470a68a049de3b118e31ab01474c622934c500 Author: Thomas Bogendoerfer Date: Wed Apr 12 15:21:38 2023 +0200 Revert "MIPS: generic: Enable all CPUs supported by virt board in Kconfig" This reverts commit de34007751aaba992373f2d659001a846aeb8811. There are too many build errors, which needs to be sorted out first. Signed-off-by: Thomas Bogendoerfer commit 57f14b5ae1a97537f2abd2828ee7212cada7036e Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 10:23:35 2023 -0300 perf pmu: zfree() expects a pointer to a pointer to zero it after freeing its contents An audit showed just this one problem with zfree(), fix it. Fixes: 9fbc61f832ebf432 ("perf pmu: Add support for PMU capabilities") Signed-off-by: Arnaldo Carvalho de Melo commit c025c7e5dbf4706279183c16788fa83001b8331e Author: Manivannan Sadhasivam Date: Tue Apr 11 17:44:42 2023 +0530 dt-bindings: PCI: qcom: Document msi-map and msi-map-mask properties The Qcom PCIe controller is capable of using either internal MSI controller or the external GIC-ITS for signaling MSIs sent by endpoint devices. Currently, the binding only documents the internal MSI implementation. Let's document the GIC-ITS imeplementation by making use of msi-map and msi-map-mask properties. Only one of the implementation should be used at a time and the drivers can choose the preferred one. Link: https://lore.kernel.org/r/20230411121442.22227-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 6276a403c0ff2908a05d1ff4f80f961478baebbd Author: Abel Vesa Date: Mon Mar 20 16:46:58 2023 +0200 PCI: qcom: Add SM8550 PCIe support SM8550 requires two additional clocks for proper working. Add these two clocks as optional clocks (as only required by this platform) and compatible for this platform. While at it, let's also rename the reset variable to "rst" from "pci_reset" to match the existing naming preference. Link: https://lore.kernel.org/r/20230320144658.1794991-2-abel.vesa@linaro.org Signed-off-by: Abel Vesa [lpieralisi@kernel.org: commit log rewording] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam Reviewed-by: Johan Hovold commit 1a24edc38dbfa9e77461b5e2bb84441351181574 Author: Abel Vesa Date: Mon Mar 20 16:46:57 2023 +0200 dt-bindings: PCI: qcom: Add SM8550 compatible Add the SM8550 platform to the binding. Link: https://lore.kernel.org/r/20230320144658.1794991-1-abel.vesa@linaro.org Signed-off-by: Abel Vesa Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Kozlowski Reviewed-by: Johan Hovold commit 11ff9bcd7dfeefa6a9a9fcd4c7775b8066c46a31 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf metricgroups: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. This file already used zfree() in other places, so this just plugs some leftovers. Signed-off-by: Arnaldo Carvalho de Melo commit 2e384400549be734795072b1d904880efc0db2f9 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf arm-spe: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Signed-off-by: Arnaldo Carvalho de Melo commit 9ccbc21166ce149c5f7429cad22f9073d3fab0b1 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf tests api-io: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Signed-off-by: Arnaldo Carvalho de Melo commit 6ca176fa3a23652513a9d593a6742fb896c7c49f Author: Jiaxun Yang Date: Tue Apr 11 12:12:24 2023 +0100 MIPS: octeon_switch: Remove duplicated labels EXPORT macro already have labels defined by itself. Remove duplicated labels outside to silent assembler warnings. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 97d0dd1e283a9a11ede495928c9c2a148b47cef4 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf bench inject-buildid: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Signed-off-by: Arnaldo Carvalho de Melo commit e413f9f13f6a8a591af0ac39ef50af02b42a0df8 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf genelf: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Signed-off-by: Arnaldo Carvalho de Melo commit f0e7c06f2be9673d008e866bff1a97e1823637e9 Author: Jiaxun Yang Date: Tue Apr 11 12:12:20 2023 +0100 MIPS: loongson2ef: Add missing break in cs5536_isa Fixes build error: arch/mips/loongson2ef/common/cs5536/cs5536_isa.c:217:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough] default: ^ arch/mips/loongson2ef/common/cs5536/cs5536_isa.c:217:2: note: insert 'break;' to avoid fall-through default: ^ break; Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 2bfc8134f95852bd8b0190641c2d2b059cb1c8cc Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf evlist: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Signed-off-by: Arnaldo Carvalho de Melo commit afa624ff96e8e79136a46ddaf6debb030546d7c6 Author: Tiezhu Yang Date: Tue Apr 11 15:17:48 2023 +0800 MIPS: Remove set_swbp() in uprobes.c set_swbp() in arch/mips/kernel/uprobes.c is same with the weak version in kernel/events/uprobes.c, remove it. Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit f5748b8c79d1eea924c50487bdb33351f58ef7bb Author: Tiezhu Yang Date: Tue Apr 11 15:17:47 2023 +0800 MIPS: Use def_bool y for ARCH_SUPPORTS_UPROBES Like all the other archs, use def_bool y for ARCH_SUPPORTS_UPROBES, then no need to select ARCH_SUPPORTS_UPROBES. Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit c77ceb2eb03eefd92e6b84a509ecec1db8d97858 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf annotate: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Also include the missing linux/zalloc.h header directive. Signed-off-by: Arnaldo Carvalho de Melo commit ee1809ed7bc456a72dc8410b475b73021a3a68d5 Author: Jiaxun Yang Date: Tue Apr 11 12:14:26 2023 +0100 MIPS: fw: Allow firmware to pass a empty env fw_getenv will use env entry to determine style of env, however it is legal for firmware to just pass a empty list. Check if first entry exist before running strchr to avoid null pointer dereference. Cc: stable@vger.kernel.org Link: https://github.com/clbr/n64bootloader/issues/5 Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 25feb605fe3b2674142d084379e0737a99945aba Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf parse-events: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Also remove one NULL test before free(), as it accepts a NULL arg and we get one line shaved not doing it explicitely. Signed-off-by: Arnaldo Carvalho de Melo commit a77f8184a07cbe81cdee30582640ed1b412705fc Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf expr: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Also remove one NULL test before free(), as it accepts a NULL arg and we get one line shaved not doing it explicitely. Signed-off-by: Arnaldo Carvalho de Melo commit cdf13c0918c9b1b233d6db690fc4c06afbc29e57 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf evsel: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Also remove one NULL test before free(), as it accepts a NULL arg and we get one line shaved not doing it explicitely. Signed-off-by: Arnaldo Carvalho de Melo commit efe98a7a39777ce266142159f303fb52c3b817c0 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf pmu: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Signed-off-by: Arnaldo Carvalho de Melo commit 7fb6f7b0af6742601e0efe315c78c26e88d30ff1 Author: Thomas Bogendoerfer Date: Wed Apr 5 20:51:27 2023 +0200 MIPS: Remove deprecated CONFIG_MIPS_CMP Commit 5cac93b35c14 ("MIPS: Deprecate CONFIG_MIPS_CMP") deprecated CONFIG_MIPS_CMP and after 9 years it's time to remove it. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Jiaxun Yang Acked-by: Marc Zyngier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit 9fbde6c8002bce61acd0c2187cc41c43a7c99968 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf env: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Signed-off-by: Arnaldo Carvalho de Melo commit 313b4c1ccdb273f6733e8c44948f8c7141f592a4 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf x86 iostat: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Signed-off-by: Arnaldo Carvalho de Melo commit d729163d0641d8b4c50fdca1b2b9d5d24d9d376d Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf symbol: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Signed-off-by: Arnaldo Carvalho de Melo commit b20c63084eb2c591006109aefbdeb3cad7a57d23 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf list: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Signed-off-by: Arnaldo Carvalho de Melo commit 190de75481439205f3a9362bd0511fd48ad1a718 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf c2c: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Signed-off-by: Arnaldo Carvalho de Melo commit 9997d5dd177c52017fa0541bf236a4232c8148e6 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf trace: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Signed-off-by: Arnaldo Carvalho de Melo commit 789eae7f203edc1301d7122ad9b3046e7c56937c Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf daemon: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Signed-off-by: Arnaldo Carvalho de Melo commit b2a777d68434375dc05a6fda5fec34a474bbf21f Author: Martin Blumenstingl Date: Wed Apr 5 22:07:29 2023 +0200 wifi: rtw88: Add support for the SDIO based RTL8821CS chipset Wire up RTL8821CS chipset support using the new rtw88 SDIO HCI code as well as the existing RTL8821C chipset code. Reviewed-by: Ping-Ke Shih Tested-by: Chris Morgan Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230405200729.632435-10-martin.blumenstingl@googlemail.com commit 6fdacb78f7999f5c14d9dae10d47de50959297d9 Author: Martin Blumenstingl Date: Wed Apr 5 22:07:28 2023 +0200 wifi: rtw88: Add support for the SDIO based RTL8822CS chipset Wire up RTL8822CS chipset support using the new rtw88 SDIO HCI code as well as the existing RTL8822C chipset code. Reviewed-by: Ping-Ke Shih Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230405200729.632435-9-martin.blumenstingl@googlemail.com commit 095e62dd74276dd801c04d9a2a9afcd922811218 Author: Jernej Skrabec Date: Wed Apr 5 22:07:27 2023 +0200 wifi: rtw88: Add support for the SDIO based RTL8822BS chipset Wire up RTL8822BS chipset support using the new rtw88 SDIO HCI code as well as the existing RTL8822B chipset code. Signed-off-by: Jernej Skrabec Reviewed-by: Ping-Ke Shih Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230405200729.632435-8-martin.blumenstingl@googlemail.com commit 7d6d2dd326a8a8d32091e9748f3428dd3be68367 Author: Martin Blumenstingl Date: Wed Apr 5 22:07:26 2023 +0200 mmc: sdio: add Realtek SDIO vendor ID and various wifi device IDs Add the SDIO vendor ID for Realtek and some device IDs extracted from their GPL vendor driver. This will be useful in the future when the rtw88 driver gains support for these chips. Acked-by: Ulf Hansson Reviewed-by: Ping-Ke Shih Reviewed-by: Pali Rohár Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230405200729.632435-7-martin.blumenstingl@googlemail.com commit 02461d9368c59510ef51cc8a1db1f0f31cfbf9ad Author: Martin Blumenstingl Date: Wed Apr 5 22:07:25 2023 +0200 wifi: rtw88: main: Reserve 8 bytes of extra TX headroom for SDIO cards For SDIO host controllers with DMA support the TX buffer physical memory address need to be aligned at an 8-byte boundary. Reserve 8 bytes of extra TX headroom so we can align the data without re-allocating the transmit buffer. While here, also remove the TODO comment regarding extra headroom for USB and SDIO. For SDIO the extra headroom is now handled and for USB it was not needed so far. Reviewed-by: Ping-Ke Shih Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230405200729.632435-6-martin.blumenstingl@googlemail.com commit a5d25f9ff91831f3a87aca96480a8b080546ccb8 Author: Martin Blumenstingl Date: Wed Apr 5 22:07:24 2023 +0200 wifi: rtw88: main: Add the {cpwm,rpwm}_addr for SDIO based chipsets Initialize the rpwm_addr and cpwm_addr for power-saving support on SDIO based chipsets. Reviewed-by: Ping-Ke Shih Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230405200729.632435-5-martin.blumenstingl@googlemail.com commit b722e5b130bcaa8224c93c6625685d8276742cbd Author: Martin Blumenstingl Date: Wed Apr 5 22:07:23 2023 +0200 wifi: rtw88: mac: Support SDIO specific bits in the power on sequence Add the code specific to SDIO HCI in the MAC power on sequence. This is based on the RTL8822BS and RTL8822CS vendor drivers. Co-developed-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Reviewed-by: Ping-Ke Shih Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230405200729.632435-4-martin.blumenstingl@googlemail.com commit 65371a3f14e73979958aea0db1e3bb456a296149 Author: Martin Blumenstingl Date: Wed Apr 5 22:07:22 2023 +0200 wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets Add a sub-driver for SDIO based chipsets which implements the following functionality: - register accessors for 8, 16 and 32 bits for all states of the card (including usage of 4x 8 bit access for one 32 bit buffer if the card is not fully powered on yet - or if it's fully powered on then 1x 32 bit access is used) - checking whether there's space in the TX FIFO queue to transmit data - transfers from the host to the device for actual network traffic, reserved pages (for firmware download) and H2C (host-to-card) transfers - receiving data from the device - deep power saving state The transmit path is optimized so DMA-capable SDIO host controllers can directly use the buffers provided because the buffer's physical addresses are 8 byte aligned. The receive path is prepared to support RX aggregation where the chipset combines multiple MAC frames into one bigger buffer to reduce SDIO transfer overhead. Co-developed-by: Jernej Skrabec Signed-off-by: Jernej Skrabec Reviewed-by: Ulf Hansson Signed-off-by: Martin Blumenstingl Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230405200729.632435-3-martin.blumenstingl@googlemail.com commit 6a92566088b1a37c1cf2c4b6b5fb733dc5bdc6a6 Author: Martin Blumenstingl Date: Wed Apr 5 22:07:21 2023 +0200 wifi: rtw88: Clear RTW_FLAG_POWERON early in rtw_mac_power_switch() The SDIO HCI implementation needs to know when the MAC is powered on. This is needed because 32-bit register access has to be split into 4x 8-bit register access when the MAC is not fully powered on or while powering off. When the MAC is powered on 32-bit register access can be used to reduce the number of transfers but splitting into 4x 8-bit register access still works in that case. During the power on sequence is how RTW_FLAG_POWERON is only set when the power on sequence has completed successfully. During power off however RTW_FLAG_POWERON is set. This means that the upcoming SDIO HCI implementation does not know that it has to use 4x 8-bit register accessors. Clear the RTW_FLAG_POWERON flag early when powering off the MAC so the whole power off sequence is processed with RTW_FLAG_POWERON unset. This will make it possible to use the RTW_FLAG_POWERON flag in the upcoming SDIO HCI implementation. Note that a failure in rtw_pwr_seq_parser() while applying chip->pwr_off_seq can theoretically result in the RTW_FLAG_POWERON flag being cleared while the chip is still powered on. However, depending on when the failure occurs in the power off sequence the chip may be on or off. Even the original approach of clearing RTW_FLAG_POWERON only when the power off sequence has been applied successfully could end up in some corner case where the chip is powered off but RTW_FLAG_POWERON was not cleared. Reviewed-by: Ping-Ke Shih Signed-off-by: Martin Blumenstingl Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230405200729.632435-2-martin.blumenstingl@googlemail.com commit 49e5d16b6fc003407a33a9961b4bcbb970bd1c76 Author: Oliver Upton Date: Wed Apr 12 06:27:33 2023 +0000 KVM: arm64: vgic: Don't acquire its_lock before config_lock commit f00327731131 ("KVM: arm64: Use config_lock to protect vgic state") was meant to rectify a longstanding lock ordering issue in KVM where the kvm->lock is taken while holding vcpu->mutex. As it so happens, the aforementioned commit introduced yet another locking issue by acquiring the its_lock before acquiring the config lock. This is obviously wrong, especially considering that the lock ordering is well documented in vgic.c. Reshuffle the locks once more to take the config_lock before the its_lock. While at it, sprinkle in the lockdep hinting that has become popular as of late to keep lockdep apprised of our ordering. Cc: stable@vger.kernel.org Fixes: f00327731131 ("KVM: arm64: Use config_lock to protect vgic state") Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230412062733.988229-1-oliver.upton@linux.dev commit 79b40a1b182bcca381bb59d0219e1dd681a64981 Author: Arnaldo Carvalho de Melo Date: Wed Apr 12 09:50:08 2023 -0300 perf inject: Use zfree() to reduce chances of use after free Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Signed-off-by: Arnaldo Carvalho de Melo commit f00e589228d1d60a664dc13fef53acbde4a1d941 Author: Ian Rogers Date: Tue Apr 11 16:44:39 2023 -0700 perf vendor events: Update icelakex to v1.20 Update from v1.19 to v1.20 affecting the uncore UNC_CHA_CORE_SNP.REMOTE_GTONE event's umask. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230411234440.3313680-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 588c8a2da99eac937069a4189eba9f375e38e592 Author: Ian Rogers Date: Tue Apr 11 16:44:38 2023 -0700 perf vendor events: Update alderlake to v1.20 Update from v1.19 to v1.20 affecting the performance/goldencove events. Adds cmask=1 for ARITH.IDIV_ACTIVE, and updates event descriptions. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230411234440.3313680-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 13961ef828cbc254cc272221b7fc54851caa39a7 Author: AngeloGioacchino Del Regno Date: Wed Apr 12 13:27:39 2023 +0200 arm64: dts: mediatek: mt6795-xperia-m5: Add Bosch BMM050 Magnetometer This smartphone features a Bosch BMM050 Magnetometer on I2C3: enable it with the BMM150 binding, as that driver supports BMM050 as well. For this sensor, there is no interrupt pin; readings were validated in sysfs. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230412112739.160376-28-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 9b42966d4c7db49140c6a66e81905edd5a1846f0 Author: AngeloGioacchino Del Regno Date: Wed Apr 12 13:27:38 2023 +0200 arm64: dts: mediatek: mt6795-xperia-m5: Add Bosch BMA255 Accelerometer Add the BMA255 Accelerometer on I2C3 and its pin definitions. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230412112739.160376-27-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 0dd58c077325b4260aa87e9db256d41806c2c9c5 Author: AngeloGioacchino Del Regno Date: Wed Apr 12 13:27:32 2023 +0200 arm64: dts: mediatek: mt6795: Add tertiary PWM node The PWM at 0x11006000 is the tertiary PWM; unlike PWM0, PWM1, this is not display specific and can be used as a generic PWM controller. This node is left disabled as usage is board-specific. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230412112739.160376-21-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 6d2555cde2918409b0331560e66f84a0ad4849c6 Author: Zhang Yuchen Date: Wed Apr 12 15:49:07 2023 +0800 ipmi: fix SSIF not responding under certain cond. The ipmi communication is not restored after a specific version of BMC is upgraded on our server. The ipmi driver does not respond after printing the following log: ipmi_ssif: Invalid response getting flags: 1c 1 I found that after entering this branch, ssif_info->ssif_state always holds SSIF_GETTING_FLAGS and never return to IDLE. As a result, the driver cannot be loaded, because the driver status is checked during the unload process and must be IDLE in shutdown_ssif(): while (ssif_info->ssif_state != SSIF_IDLE) schedule_timeout(1); The process trigger this problem is: 1. One msg timeout and next msg start send, and call ssif_set_need_watch(). 2. ssif_set_need_watch()->watch_timeout()->start_flag_fetch() change ssif_state to SSIF_GETTING_FLAGS. 3. In msg_done_handler() ssif_state == SSIF_GETTING_FLAGS, if an error message is received, the second branch does not modify the ssif_state. 4. All retry action need IS_SSIF_IDLE() == True. Include retry action in watch_timeout(), msg_done_handler(). Sending msg does not work either. SSIF_IDLE is also checked in start_next_msg(). 5. The only thing that can be triggered in the SSIF driver is watch_timeout(), after destory_user(), this timer will stop too. So, if enter this branch, the ssif_state will remain SSIF_GETTING_FLAGS and can't send msg, no timer started, can't unload. We did a comparative test before and after adding this patch, and the result is effective. Fixes: 259307074bfc ("ipmi: Add SMBus interface driver (SSIF)") Cc: stable@vger.kernel.org Signed-off-by: Zhang Yuchen Message-Id: <20230412074907.80046-1-zhangyuchen.lcr@bytedance.com> Signed-off-by: Corey Minyard commit b67b3813ab0e7b010fbcf9c3f95131fa6a373c92 Merge: 86169e657aaa4 152674ab2e98b Author: Linus Walleij Date: Wed Apr 12 14:21:13 2023 +0200 Merge tag 'qcom-pinctrl-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into devel Qualcomm pinctrl Devicetree bindings changes for v6.4 Cleanup and improvement of the bindings to use "unevaluatedProperties" instead of "additionalProperties", which allows to accept all the properties already parsed by referenced common qcom,tlmm-common.yaml schema. That common qcom,tlmm-common.yaml binding is going to remove "input-enable" property, thus using "unevaluatedProperties" allows such change to propagate to other bindings automatically. commit b599a4d7d905a8e8cf5c36ccae0b3dd97c956075 Author: Alexander Sverdlin Date: Tue Apr 11 18:59:51 2023 +0200 ASoC: ep93xx: Add OF support Add the new cirrus,ep9301-ac97 and cirrus,ep9301-i2s compatibles. Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20230411165951.2335899-2-alexander.sverdlin@gmail.com Signed-off-by: Mark Brown commit 13b1b95245a7c2dc959b06ed7f02f4832e401cd2 Author: Alexander Sverdlin Date: Tue Apr 11 18:59:50 2023 +0200 ASoC: ep93xx: Add I2S description Add device tree bindings for Cirrus Logic EP93xx internal SoCs' I2S controller. Signed-off-by: Alexander Sverdlin Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230411165951.2335899-1-alexander.sverdlin@gmail.com Signed-off-by: Mark Brown commit c4a413e56d16a2ae84e6d8992f215c4dcc7fac20 Author: YAN SHI Date: Wed Apr 12 11:35:29 2023 +0800 regulator: stm32-pwr: fix of_iomap leak Smatch reports: drivers/regulator/stm32-pwr.c:166 stm32_pwr_regulator_probe() warn: 'base' from of_iomap() not released on lines: 151,166. In stm32_pwr_regulator_probe(), base is not released when devm_kzalloc() fails to allocate memory or devm_regulator_register() fails to register a new regulator device, which may cause a leak. To fix this issue, replace of_iomap() with devm_platform_ioremap_resource(). devm_platform_ioremap_resource() is a specialized function for platform devices. It allows 'base' to be automatically released whether the probe function succeeds or fails. Besides, use IS_ERR(base) instead of !base as the return value of devm_platform_ioremap_resource() can either be a pointer to the remapped memory or an ERR_PTR() encoded error code if the operation fails. Fixes: dc62f951a6a8 ("regulator: stm32-pwr: Fix return value check in stm32_pwr_regulator_probe()") Signed-off-by: YAN SHI Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304111750.o2643eJN-lkp@intel.com/ Reviewed-by: Dongliang Mu Link: https://lore.kernel.org/r/20230412033529.18890-1-m202071378@hust.edu.cn Signed-off-by: Mark Brown commit 0271b61ba3bb06fff4726951667f46e68412b8c2 Author: Benjamin Bara Date: Wed Apr 5 19:14:36 2023 +0200 dt-bindings: mfd: dlg,da9063: document voltage monitoring Document that the da9063 only provides under- *and* over-voltage monitoring in one, and therefore requires both to be configured with the same severity and value. Add an example for clarification. Signed-off-by: Benjamin Bara Acked-by: Krzysztof Kozlowski Reviewed-by: Adam Ward Link: https://lore.kernel.org/r/20230403-da9063-disable-unused-v3-3-cc4dc698864c@skidata.com Signed-off-by: Mark Brown commit b8717a80e6ee6500ae396d21aac2a00947bba993 Author: Benjamin Bara Date: Wed Apr 5 19:14:35 2023 +0200 regulator: da9063: implement setter for voltage monitoring Allow to en- and disable voltage monitoring from the device tree. Consider that the da9063 only monitors under- *and* over-voltage together, so both must be set to the same severity and value. Reviewed-by: Adam Ward Signed-off-by: Benjamin Bara Link: https://lore.kernel.org/r/20230403-da9063-disable-unused-v3-2-cc4dc698864c@skidata.com Signed-off-by: Mark Brown commit 13186dae182ab1a2a52a53424672f49cf3e81f9b Author: Benjamin Bara Date: Wed Apr 5 19:14:34 2023 +0200 regulator: da9063: add voltage monitoring registers Add the definitions for the registers responsible for voltage monitoring. Add a voltage monitor enable bitfield per regulator. Reviewed-by: Matti Vaittinen Reviewed-by: Adam Ward Signed-off-by: Benjamin Bara Link: https://lore.kernel.org/r/20230403-da9063-disable-unused-v3-1-cc4dc698864c@skidata.com Signed-off-by: Mark Brown commit bddcfb0802eb69b0f51293eab5db33d344c0262f Author: Syed Saba Kareem Date: Wed Apr 12 14:46:16 2023 +0530 ASoC: amd: Add check for acp config flags We have SOF and generic ACP support enabled for Rembrandt and pheonix platforms on some machines. Since we have same PCI id used for probing, add check for machine configuration flag to avoid conflict with newer pci drivers. Such machine flag has been initialized via dmi match on few Chrome machines. If no flag is specified probe and register older platform device. Signed-off-by: Syed Saba Kareem Reviewed-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20230412091638.1158901-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown commit d93ee84e3eb5d1afc081e57ca37f1411a01f2c94 Author: Ying Liu Date: Wed Apr 12 01:09:12 2023 +0800 ASoC: tas5720: add missing unwind goto in tas5720_codec_probe Smatch complains that missing unwind goto in tas5720_codec_probe. When tas5720 has an invalid devtype, it is expected to invoke regulator_bulk_disable to handle the failure. But the default option return an error code directly. Fix it by reusing the probe_fail label. Signed-off-by: Ying Liu Link: https://lore.kernel.org/r/20230411170912.1939906-1-lyre@hust.edu.cn Signed-off-by: Mark Brown commit ef0128afa1655f8d024dc5058fbfa0c6deecf117 Author: Fred Oh Date: Wed Apr 12 09:14:57 2023 +0300 ASoC: SOF: Intel: mtl: fix page fault in dspless mode when DSP is disabled The patch to make DSPless mode work even if the DSP is disabled in BIOS missed to touch the MTL code to add the needed checks. If the DSP is disabled this can lead to page fault due to not accesible registers. Fixes: 9fc6786f549c ("ASoC: SOF: Intel: hda: make DSPless mode work with DSP disabled in BIOS") Signed-off-by: Fred Oh Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230412061457.27937-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit a8f5da0bf4d85a6ad03810d902aba61c572102a6 Author: Baishan Jiang Date: Wed Apr 12 16:40:43 2023 +0800 ASoC: amd: yc: Add ThinkBook 14 G5+ ARP to quirks list for acp6x ThinkBook 14 G5+ ARP uses Ryzen 7735H processor, and has the same microphone problem as ThinkBook 14 G4+ ARA. Adding 21HY to acp6x quirks table enables microphone for ThinkBook 14 G5+ ARP. Signed-off-by: Baishan Jiang Link: https://lore.kernel.org/r/OS3P286MB1711DD6556284B69C79C0C4FE19B9@OS3P286MB1711.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Mark Brown commit 67572c8dc64412880b81d4bbc2f354dd5eddaa7d Author: Pierre-Louis Bossart Date: Thu Mar 23 10:52:28 2023 +0800 soundwire: intel_auxdevice: improve pm_prepare step In the case where multiple peripherals are attached on the same link, it's possible that they are in different pm_runtime states. The device_for_each_child() loop to resume all devices before a system suspend would not work if one peripheral was active and others suspended. pm_runtime_resume() returns 1 in the former case, which is taken as a error. As a result, a pm_runtime suspended device might be skipped if the first device was active. This patch changes the behavior of the helper function to only return zero or a negative error. A Fixes tag is not provided since there are no existing configurations on Intel platforms with different types of devices on the same link. Amplifiers may be used on the same link, but they are used by the same dailink so their pm_runtime state is always matching. This assumption may not be true in the future, so we should improve the behavior and align with AMD. Reported-by: Mukunda,Vijendar Link: https://lore.kernel.org/lkml/4cbbff8a-c596-e9cc-a6cf-6f8b66607505@amd.com/ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230323025228.1537107-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit e9537962519e88969f5f69cd0571eb4f6984403c Author: Richard Fitzgerald Date: Thu Apr 6 14:46:40 2023 +0100 soundwire: bus: Fix unbalanced pm_runtime_put() causing usage count underflow This reverts commit 443a98e649b4 ("soundwire: bus: use pm_runtime_resume_and_get()") Change calls to pm_runtime_resume_and_get() back to pm_runtime_get_sync(). This fixes a usage count underrun caused by doing a pm_runtime_put() even though pm_runtime_resume_and_get() returned an error. The three affected functions ignore -EACCES error from trying to get pm_runtime, and carry on, including a put at the end of the function. But pm_runtime_resume_and_get() does not increment the usage count if it returns an error. So in the -EACCES case you must not call pm_runtime_put(). The documentation for pm_runtime_get_sync() says: "Consider using pm_runtime_resume_and_get() ... as this is likely to result in cleaner code." In this case I don't think it results in cleaner code because the pm_runtime_put() at the end of the function would have to be conditional on the return value from pm_runtime_resume_and_get() at the top of the function. pm_runtime_get_sync() doesn't have this problem because it always increments the count, so always needs a put. The code can just flow through and do the pm_runtime_put() unconditionally. Signed-off-by: Richard Fitzgerald Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230406134640.8582-1-rf@opensource.cirrus.com Signed-off-by: Vinod Koul commit b9235aef84929e5330cb87125a6baf1cf7988983 Author: Cai Huoqing Date: Thu Mar 23 19:26:11 2023 +0800 wifi: ath12k: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230323112613.7550-3-cai.huoqing@linux.dev commit 76008fc13b09a89e4251e6af5062043427babaa2 Author: Cai Huoqing Date: Thu Mar 23 19:26:10 2023 +0800 wifi: ath10k: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230323112613.7550-2-cai.huoqing@linux.dev commit f812e2a9f85d6bea78957ccb5197e4491316848b Author: Cai Huoqing Date: Thu Mar 23 19:26:09 2023 +0800 wifi: ath11k: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230323112613.7550-1-cai.huoqing@linux.dev commit 0a0d1740bd8fd7dafb81fcb102fb5d0b83b1ce73 Author: Pierre-Louis Bossart Date: Tue Mar 21 10:26:42 2023 +0800 soundwire: intel: don't save hw_params for use in prepare The existing code copies the hw_params pointer and reuses it later in .prepare, specifically to re-initialize the ALH DMA channel information that's lost in suspend-resume cycles. This is not needed, we can directly access the information from the substream/rtd - as done for the HDAudio DAIs in sound/soc/sof/intel/hda-dai.c In addition, using the saved pointer causes the suspend-resume test cases to fail on specific platforms, depending on which version of GCC is used. Péter Ujfalusi and I have spent long hours to root-cause this problem that was reported by the Intel CI first with 6.2-rc1 and again v6.3-rc1. In the latter case we were lucky that the problem was 100% reproducible on local test devices, and found out that adding a dev_dbg() or adding a call to usleep_range() just before accessing the saved pointer "fixed" the issue. With errors appearing just by changing the compiler version or minor changes in the code generated, clearly we have a memory management Heisenbug. The root-cause seems to be that the hw_params pointer is not persistent. The soc-pcm code allocates the hw_params structure on the stack, and passes it to the BE dailink hw_params and DAIs hw_params. Saving such a pointer and reusing it later during the .prepare stage cannot possibly work reliably, it's broken-by-design since v5.10. It's astonishing that the problem was not seen earlier. This simple fix will have to be back-ported to -stable, due to changes to avoid the use of the get/set_dmadata routines this patch will only apply on kernels older than v6.1. Fixes: a5a0239c27fe ("soundwire: intel: reinitialize IP+DSP in .prepare(), but only when resuming") Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230321022642.1426611-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit e89a51aedf380bc60219dc9afa96c36507060fb3 Author: Manikanta Pubbisetty Date: Wed Mar 15 21:48:17 2023 +0530 wifi: ath11k: Send 11d scan start before WMI_START_SCAN_CMDID Firmwares advertising the support of triggering 11d algorithm on the scan results of a regular scan expects driver to send WMI_11D_SCAN_START_CMDID before sending WMI_START_SCAN_CMDID. Triggering 11d algorithm on the scan results of a normal scan helps in completely avoiding a separate 11d scan for determining regdomain. This indirectly helps in speeding up connections on station interfaces on the chipsets supporting 11D scan. To enable this feature, send WMI_11D_SCAN_START_CMDID just before sending WMI_START_SCAN_CMDID if the firmware advertises WMI_TLV_SERVICE_SUPPORT_11D_FOR_HOST_SCAN service flag. WCN6750 & WCN6855 supports this feature. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-01160-QCAMSLSWPLZ-1 Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 Signed-off-by: Manikanta Pubbisetty Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230315161817.29627-1-quic_mpubbise@quicinc.com commit 756a7f90878f0866fd2fe167ef37e90b47326b96 Author: P Praneesh Date: Fri Mar 24 16:57:01 2023 +0200 wifi: ath11k: fix writing to unintended memory region While initializing spectral, the magic value is getting written to the invalid memory address leading to random boot-up crash. This occurs due to the incorrect index increment in ath11k_dbring_fill_magic_value function. Fix it by replacing the existing logic with memset32 to ensure there is no invalid memory access. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01838-QCAHKSWPL_SILICONZ-1 Fixes: d3d358efc553 ("ath11k: add spectral/CFR buffer validation support") Signed-off-by: P Praneesh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230321052900.16895-1-quic_ppranees@quicinc.com commit d005ea713dd721c1ce9010e608eb416a3890d6b4 Author: Charles Keepax Date: Wed Mar 22 16:49:48 2023 +0000 soundwire: bus: Update sdw_nread/nwrite_no_pm to handle page boundaries Currently issuing a sdw_nread/nwrite_no_pm across a page boundary will silently fail to write correctly as nothing updates the page registers, meaning the same page of the chip will get rewritten with each successive page of data. As the sdw_msg structure contains page information it seems reasonable that a single sdw_msg should always be within one page. It is also mostly simpler to handle the paging at the bus level rather than each master having to handle it in their xfer_msg callback. As such add handling to the bus code to split up a transfer into multiple sdw_msg's when they go across page boundaries. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20230322164948.566962-3-ckeepax@opensource.cirrus.com Signed-off-by: Vinod Koul commit d94e1e01c70375fcc102a8d09a00d28efeeef51c Author: Charles Keepax Date: Wed Mar 22 16:49:47 2023 +0000 soundwire: bus: Update kernel doc for no_pm functions The kernel doc should really have been updated when the no_pm versions of the sdw_write/read functions were exported in commits: commit 167790abb90f ("soundwire: export sdw_write/read_no_pm functions") commit 62dc9f3f2fd0 ("soundwire: bus: export sdw_nwrite_no_pm and sdw_nread_no_pm functions") Add the missing kernel doc. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20230322164948.566962-2-ckeepax@opensource.cirrus.com Signed-off-by: Vinod Koul commit ff9608c32e64da465c2939af261a3850fdb8ddbb Author: Charles Keepax Date: Wed Mar 22 16:49:46 2023 +0000 soundwire: bus: Remove now outdated comments on no_pm IO Things have moved more towards end drivers using the no_pm versions of the IO functions. See commits: commit 167790abb90f ("soundwire: export sdw_write/read_no_pm functions") commit 62dc9f3f2fd0 ("soundwire: bus: export sdw_nwrite_no_pm and sdw_nread_no_pm functions") As such this comment is now misleading, so remove it. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20230322164948.566962-1-ckeepax@opensource.cirrus.com Signed-off-by: Vinod Koul commit 68d9bfb668d6eecb37abf80b4c77aed7120a1376 Author: Pierre-Louis Bossart Date: Wed Mar 22 11:55:24 2023 +0800 soundwire: stream: uniquify dev_err() logs There are a couple of duplicate logs which makes harder than needed to follow the error flows. Add __func__ or make the log unique. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230322035524.1509029-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit d014688eb3734c4101e3f03e3dc90f557021b7e8 Author: Pierre-Louis Bossart Date: Wed Mar 22 11:55:23 2023 +0800 soundwire: stream: remove bus->dev from logs on multiple buses A stream may depend on multiple managers/buses, e.g. for the multiple amplifier case. It's incorrect to use bus->dev in this case. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230322035524.1509029-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 9cf1efc5ed2dde138acee54c0d00cf3664e2f465 Author: Vijendar Mukunda Date: Tue Mar 21 10:39:01 2023 +0530 soundwire: amd: add pm_prepare callback and pm ops support Add pm_prepare callback and System level pm ops support for AMD SoundWire manager driver. Signed-off-by: Vijendar Mukunda Signed-off-by: Mastan Katragadda Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/lkml/20230310162554.699766-9-Vijendar.Mukunda@amd.com Link: https://lore.kernel.org/r/20230321050901.115439-9-Vijendar.Mukunda@amd.com Signed-off-by: Vinod Koul commit 66c878838f37912ba295c41e749a25fc356341ea Author: Vijendar Mukunda Date: Tue Mar 21 10:39:00 2023 +0530 soundwire: amd: handle SoundWire wake enable interrupt Add wake enable interrupt support for both the SoundWire manager instances. Signed-off-by: Vijendar Mukunda Signed-off-by: Mastan Katragadda Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/lkml/20230227154801.50319-8-Vijendar.Mukunda@amd.com Link: https://lore.kernel.org/r/20230321050901.115439-8-Vijendar.Mukunda@amd.com Signed-off-by: Vinod Koul commit 81ff58ff71ad9dcddf5caffcf912cde6589d07bd Author: Vijendar Mukunda Date: Tue Mar 21 10:38:59 2023 +0530 soundwire: amd: add runtime pm ops for AMD SoundWire manager driver Add support for runtime pm ops for AMD SoundWire manager driver. Signed-off-by: Vijendar Mukunda Signed-off-by: Mastan Katragadda Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/lkml/20230227154801.50319-7-Vijendar.Mukunda@amd.com Link: https://lore.kernel.org/r/20230321050901.115439-7-Vijendar.Mukunda@amd.com Signed-off-by: Vinod Koul commit 65f93e4096a07abd41acf0d240715bd8c7ef7eeb Author: Vijendar Mukunda Date: Tue Mar 21 10:38:58 2023 +0530 soundwire: amd: add SoundWire manager interrupt handling Add support for handling SoundWire manager interrupts. Signed-off-by: Vijendar Mukunda Signed-off-by: Mastan Katragadda Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/lkml/20230227154801.50319-6-Vijendar.Mukunda@amd.com Link: https://lore.kernel.org/r/20230321050901.115439-6-Vijendar.Mukunda@amd.com Signed-off-by: Vinod Koul commit c0bf349ea95be03e9903381297b7ef4d8ce1053f Author: Vijendar Mukunda Date: Tue Mar 21 10:38:57 2023 +0530 soundwire: amd: enable build for AMD SoundWire manager driver Enable build for SoundWire manager driver for AMD platforms. Signed-off-by: Vijendar Mukunda Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/lkml/20230220100418.76754-5-Vijendar.Mukunda@amd.com Link: https://lore.kernel.org/r/20230321050901.115439-5-Vijendar.Mukunda@amd.com Signed-off-by: Vinod Koul commit 2b13596f7c9c03b1653b21a440ce672c3d7e5233 Author: Vijendar Mukunda Date: Tue Mar 21 10:38:56 2023 +0530 soundwire: amd: register SoundWire manager dai ops Register dai ops for SoundWire manager instances. Signed-off-by: Vijendar Mukunda Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/lkml/20230227154801.50319-4-Vijendar.Mukunda@amd.com Link: https://lore.kernel.org/r/20230321050901.115439-4-Vijendar.Mukunda@amd.com Signed-off-by: Vinod Koul commit d8f48fbdfd9af268e92b33462472559d2840228c Author: Vijendar Mukunda Date: Tue Mar 21 10:38:55 2023 +0530 soundwire: amd: Add support for AMD Manager driver AMD ACP(v6.x) IP block has two SoundWire manager devices. Add support for - Manager driver probe & remove sequence - Helper functions to enable/disable interrupts, Initialize sdw manager, enable sdw pads - Manager driver sdw_master_ops & port_ops callbacks Signed-off-by: Vijendar Mukunda Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/lkml/20230310162554.699766-3-Vijendar.Mukunda@amd.com Link: https://lore.kernel.org/r/20230321050901.115439-3-Vijendar.Mukunda@amd.com Signed-off-by: Vinod Koul commit f346fdf977209b1f2a6fd701a853372d398cce91 Author: Vijendar Mukunda Date: Tue Mar 21 10:38:54 2023 +0530 soundwire: export sdw_compute_slave_ports() function Export sdw_compute_slave_ports() function to use it in another soundwire manager module. Move sdw_transport_data structure to bus header file to export sdw_compute_slave_ports() function. Signed-off-by: Vijendar Mukunda Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/lkml/20230201165944.3169125-1-Vijendar.Mukunda@amd.com Link: https://lore.kernel.org/r/20230321050901.115439-2-Vijendar.Mukunda@amd.com Signed-off-by: Vinod Koul commit acdae4632e40f05e0f0731c5a383e461324aea65 Author: Shuming Fan Date: Thu Mar 16 09:30:41 2023 +0800 soundwire: stream: restore cumulative bus bandwidth when compute_params callback failed The _sdw_prepare_stream function just returns the error code when compute_params callback failed. The cumulative bus bandwidth will keep the value and won't be decreased by sdw_deprepare_stream function. We should restore the value of cumulative bus bandwidth when compute_params callback failed. Signed-off-by: Shuming Fan Reviewed-by: Paul Olaru Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230316013041.1008003-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 9ddae9dad09e8bdaa33909bdcbb062c883c3c332 Author: Richard Fitzgerald Date: Wed Mar 15 14:50:51 2023 +0000 soundwire: bandwidth allocation: Use hweight32() to calculate set bits Replace the call to sdw_ch_mask_to_ch() with a call to hweight32(). sdw_ch_mask_to_ch() is counting the number of set bits. The hweight() family of functions already do this, and they have an advantage of using a bit-counting instruction if it is available on the target CPU. This also fixes a potential infinite loop bug in the implementation of sdw_ch_mask_to_ch(). Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230315145051.2299822-1-rf@opensource.cirrus.com Signed-off-by: Vinod Koul commit 2367e0ecb498764e95cfda691ff0828f7d25f9a4 Author: Krzysztof Kozlowski Date: Wed Feb 22 15:44:12 2023 +0100 soundwire: qcom: gracefully handle too many ports in DT There are two issues related to the number of ports coming from Devicetree when exceeding in total QCOM_SDW_MAX_PORTS. Both lead to incorrect memory accesses: 1. With DTS having too big value of input or output ports, the driver, when copying port parameters from local/stack arrays into 'pconfig' array in 'struct qcom_swrm_ctrl', will iterate over their sizes. 2. If DTS also has too many parameters for these ports (e.g. qcom,ports-sinterval-low), the driver will overflow buffers on the stack when reading these properties from DTS. Add a sanity check so incorrect DTS will not cause kernel memory corruption. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230222144412.237832-2-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 208a03ee9db815f28059d3399ee31577aeba0dd7 Author: Krzysztof Kozlowski Date: Wed Feb 22 15:44:11 2023 +0100 soundwire: qcom: define hardcoded version magic numbers Use a define instead of hard-coded register values for Soundwire hardware version number, because it is a bit easier to read and allows to drop explaining comment. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230222144412.237832-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 447b0398a9cd41ca343dfd43e555af92d6214487 Author: Bhagavathi Perumal S Date: Fri Mar 24 16:57:00 2023 +0200 wifi: ath11k: Fix invalid management rx frame length issue The WMI management rx event has multiple arrays of TLVs, however the common WMI TLV parser won't handle multiple TLV tags of same type. So the multiple array tags of WMI management rx TLV is parsed incorrectly and the length calculated becomes wrong when the target sends multiple array tags. Add separate TLV parser to handle multiple arrays for WMI management rx TLV. This fixes invalid length issue when the target sends multiple array tags. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Bhagavathi Perumal S Co-developed-by: Nagarajan Maran Signed-off-by: Nagarajan Maran Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230320133840.30162-1-quic_nmaran@quicinc.com commit bd934f77eeac377e81ddac8673803e7334b82d3d Author: Krzysztof Kozlowski Date: Wed Feb 22 15:03:43 2023 +0100 soundwire: qcom: correct setting ignore bit on v1.5.1 According to the comment and to downstream sources, the SWRM_CONTINUE_EXEC_ON_CMD_IGNORE in SWRM_CMD_FIFO_CFG_ADDR register should be set for v1.5.1 and newer, so fix the >= operator. Fixes: 542d3491cdd7 ("soundwire: qcom: set continue execution flag for ignored commands") Cc: Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230222140343.188691-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 031ffa6c2cd305a57ccc6d610f2decd956b2e7f6 Author: P Praneesh Date: Fri Mar 24 16:57:00 2023 +0200 wifi: ath11k: fix rssi station dump not updated in QCN9074 In QCN9074, station dump signal values display default value which is -95 dbm, since there is firmware header change for HAL_RX_MPDU_START between QCN9074 and IPQ8074 which cause wrong peer_id fetch from msdu. Fix this by updating hal_rx_mpdu_info with corresponding QCN9074 tlv format. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01695-QCAHKSWPL_SILICONZ-1 Signed-off-by: P Praneesh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230320110312.20639-1-quic_ppranees@quicinc.com commit 813968c24126cc5c8320cd5db0e262069a535063 Author: Ganesh Babu Jothiram Date: Fri Mar 24 16:57:00 2023 +0200 wifi: ath11k: Configure the FTM responder role using firmware capability flag Fine Time Measurement(FTM) is offloaded feature to firmware. Hence, the configuration of FTM responder role is done using firmware capability flag instead of hw param. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Ganesh Babu Jothiram Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230317072034.8217-1-quic_gjothira@quicinc.com commit 8b4d2f080afbd4280ecca0f4b3ceea943a7a86d0 Author: Manikanta Pubbisetty Date: Thu Mar 23 11:39:13 2023 +0530 wifi: ath11k: Optimize 6 GHz scan time Currently, time taken to scan all supported channels on WCN6750 is ~8 seconds and connection time is almost 10 seconds. WCN6750 supports three Wi-Fi bands (i.e., 2.4/5/6 GHz) and the numbers of channels for scan come around ~100 channels (default case). Since the chip doesn't have support for DBS (Dual Band Simultaneous), scans cannot be parallelized resulting in longer scan times. Among the 100 odd channels, ~60 channels are in 6 GHz band. Therefore, optimizing the scan for 6 GHz channels will bring down the overall scan time. WCN6750 firmware has support to scan a 6 GHz channel based on co-located AP information i.e., RNR IE which is found in the legacy 2.4/5 GHz scan results. When a scan request with all supported channel list is enqueued to the firmware, then based on WMI_SCAN_CHAN_FLAG_SCAN_ONLY_IF_RNR_FOUND scan channel flag, firmware will scan only those 6 GHz channels for which RNR IEs are found in the legacy scan results. In the proposed design, based on NL80211_SCAN_FLAG_COLOCATED_6GHZ scan flag, driver will set the WMI_SCAN_CHAN_FLAG_SCAN_ONLY_IF_RNR_FOUND flag for non-PSC channels. Since there is high probability to find 6 GHz APs on PSC channels, these channels are always scanned. Only non-PSC channels are selectively scanned based on cached RNR information from the legacy scan results. If NL80211_SCAN_FLAG_COLOCATED_6GHZ is not set in the scan flags, then scan will happen on all supported channels (default behavior). With these optimizations, scan time is improved by 1.5-1.8 seconds on WCN6750. Similar savings have been observed on WCN6855. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.16 Signed-off-by: Manikanta Pubbisetty Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230323060913.10097-1-quic_mpubbise@quicinc.com commit 5e60ec02ec30e2db3088196a10fd20be5432bb6d Author: Chris Morgan Date: Fri Nov 25 19:14:32 2022 -0600 arm64: dts: rockchip: add panel to Anbernic RG353 series Add support for the newly mainlined panel to the RG353 series of devices. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20221126011432.22891-2-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 81b21c0f0138ff5a499eafc3eb0578ad2a99622c Author: Tetsuo Handa Date: Tue Apr 11 19:57:33 2023 +0900 fs: hfsplus: remove WARN_ON() from hfsplus_cat_{read,write}_inode() syzbot is hitting WARN_ON() in hfsplus_cat_{read,write}_inode(), for crafted filesystem image can contain bogus length. There conditions are not kernel bugs that can justify kernel to panic. Reported-by: syzbot Link: https://syzkaller.appspot.com/bug?extid=e2787430e752a92b8750 Reported-by: syzbot Link: https://syzkaller.appspot.com/bug?extid=4913dca2ea6e4d43f3f1 Signed-off-by: Tetsuo Handa Reviewed-by: Viacheslav Dubeyko Message-Id: <15308173-5252-d6a3-ae3b-e96d46cb6f41@I-love.SAKURA.ne.jp> Signed-off-by: Christian Brauner commit 60261442c1b91d9e0cdc611222034286aeb18946 Merge: 1881b4d64700e c76c6c4ecbec0 Author: Russell King (Oracle) Date: Wed Apr 12 10:05:07 2023 +0100 Merge branches 'misc' and 'fixes' into for-next commit c76c6c4ecbec0deb56a4f9e932b26866024a508f Author: Ard Biesheuvel Date: Wed Apr 12 09:50:20 2023 +0100 ARM: 9294/2: vfp: Fix broken softirq handling with instrumentation enabled Commit 62b95a7b44d1 ("ARM: 9282/1: vfp: Manipulate task VFP state with softirqs disabled") replaced the en/disable preemption calls inside the VFP state handling code with en/disabling of soft IRQs, which is necessary to allow kernel use of the VFP/SIMD unit when handling a soft IRQ. Unfortunately, when lockdep is enabled (or other instrumentation that enables TRACE_IRQFLAGS), the disable path implemented in asm fails to perform the lockdep and RCU related bookkeeping, resulting in spurious warnings and other badness. Set let's rework the VFP entry code a little bit so we can make the local_bh_disable() call from C, with all the instrumentations that happen to have been configured. Calling local_bh_enable() can be done from asm, as it is a simple wrapper around __local_bh_enable_ip(), which is always a callable function. Link: https://lore.kernel.org/all/ZBBYCSZUJOWBg1s8@localhost.localdomain/ Fixes: 62b95a7b44d1 ("ARM: 9282/1: vfp: Manipulate task VFP state with softirqs disabled") Signed-off-by: Ard Biesheuvel Reviewed-by: Linus Walleij Tested-by: Guenter Roeck Signed-off-by: Russell King (Oracle) commit 152674ab2e98bfd8677117314a77d223a2a1bedf Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:46 2023 +0200 dt-bindings: pinctrl: qcom,sm8550-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-40-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit ede4773a2fa9d380bc32e027710b874cce0dbc69 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:45 2023 +0200 dt-bindings: pinctrl: qcom,sm8450-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-39-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit a3c355b59bfc1f33be343b581d1a4953fc802605 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:44 2023 +0200 dt-bindings: pinctrl: qcom,sm8350-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-38-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 4134e65a6339d1f8991f59eb3cff98efb2ecb0e5 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:43 2023 +0200 dt-bindings: pinctrl: qcom,sm8250: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-37-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 5a81d7222ec84d1573685e7aa9e6c9453240f971 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:42 2023 +0200 dt-bindings: pinctrl: qcom,sm8150: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-36-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 13bb968b819061a0429d82c18133d7e5bdff3b93 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:40 2023 +0200 dt-bindings: pinctrl: qcom,sm6375-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-34-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit ae4331560778a21ead4e910e3c3aa2516533f902 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:39 2023 +0200 dt-bindings: pinctrl: qcom,sm6350-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-33-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 312f79584f632384d63972582d353c777d66dfab Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:38 2023 +0200 dt-bindings: pinctrl: qcom,sm6125-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-32-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 5c470d4e8bdbcb7cf39af5c1b850dc759d0259fa Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:37 2023 +0200 dt-bindings: pinctrl: qcom,sm6115-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-31-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 810e171ed033cfc771201ddf4f5781453847735c Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:36 2023 +0200 dt-bindings: pinctrl: qcom,sdx65-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-30-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit a38e276c27e77a7c5b802559c4d7865dcf1b0760 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:35 2023 +0200 dt-bindings: pinctrl: qcom,sdx55: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-29-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 5c9177c2a5efe9608fa414e40cb351e04398fe58 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:34 2023 +0200 dt-bindings: pinctrl: qcom,sdm845: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. This also fixes warnings like: sdm845-cheza-r1.dtb: pinctrl@3400000: qspi-sleep-state: 'oneOf' conditional failed, one must be fixed: 'output-disable' does not match any of the regexes: 'pinctrl-[0-9]+' Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-28-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 9703041392715d560966fdfdf2929f9cb48a8f60 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:33 2023 +0200 dt-bindings: pinctrl: qcom,sdm670-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-27-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 9d2b46e2787f051af2211748fc3a048b2452d170 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:32 2023 +0200 dt-bindings: pinctrl: qcom,sdm630: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-26-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 2eac142c941b7499451afc3dcdfce1ec9c9c4981 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:30 2023 +0200 dt-bindings: pinctrl: qcom,sc8180x-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-24-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 64688acfac28ccd11b07cadca91041e9987a9361 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:29 2023 +0200 dt-bindings: pinctrl: qcom,sc7280-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. This also fixes warnings like: sc7280-herobrine-evoker.dtb: pinctrl@f100000: qspi-sleep-state: 'oneOf' conditional failed, one must be fixed: 'output-disable' does not match any of the regexes: 'pinctrl-[0-9]+' Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-23-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit ffa4c15883f0929ace6228e079e29766013d7da0 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:28 2023 +0200 dt-bindings: pinctrl: qcom,sc7180-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. This also fixes warnings like: c7180-trogdor-coachz-r1.dtb: pinctrl@3500000: qspi-sleep-state: 'oneOf' conditional failed, one must be fixed: 'output-disable' does not match any of the regexes: 'pinctrl-[0-9]+' Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-22-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit ece8e9affc942b4a04c41bc08aae2bd4488e6ba5 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:27 2023 +0200 dt-bindings: pinctrl: qcom,sa8775p-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-21-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit c512c27ae0e65e74845c76ecdf47712ed7c1e2a7 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:26 2023 +0200 dt-bindings: pinctrl: qcom,qdu1000-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-20-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 3b589a83c79e90a9587a7f491d98a71e402bb45b Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:25 2023 +0200 dt-bindings: pinctrl: qcom,qcs404: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-19-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 06a4b73fe94b4615dcc07b653b2c0c3239685740 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:23 2023 +0200 dt-bindings: pinctrl: qcom,msm8998: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-17-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 9de7c1721696af6387dc27661f957c58400ef763 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:22 2023 +0200 dt-bindings: pinctrl: qcom,msm8996: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-16-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 6f65e8ca2832dc402f272012f2eabcb969fd2ace Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:21 2023 +0200 dt-bindings: pinctrl: qcom,msm8994: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-15-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 327a846dba7100b33fda682cb7caf2f647940d77 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:20 2023 +0200 dt-bindings: pinctrl: qcom,msm8976: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-14-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 679b065e5ea942cd485b2258c35ecdd54c2ac40e Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:19 2023 +0200 dt-bindings: pinctrl: qcom,msm8974: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-13-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit b066f2150028e36c7e52effb42ad76a4734e903e Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:18 2023 +0200 dt-bindings: pinctrl: qcom,msm8960: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-12-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 7d6154c728d86cdd2a5e753076c8e870b0c51efd Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:17 2023 +0200 dt-bindings: pinctrl: qcom,msm8953: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-11-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 941f8b694051ce99fb079d503b8fbc979eeda2bf Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:16 2023 +0200 dt-bindings: pinctrl: qcom,msm8916: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-10-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 3a5dad993735e9acd7ffac8577e2b405b8334cbb Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:15 2023 +0200 dt-bindings: pinctrl: qcom,msm8909-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-9-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 1c53c43c4f89be48ccdfecefe45d19b600b4bfb2 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:14 2023 +0200 dt-bindings: pinctrl: qcom,msm8660: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-8-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 34a433bf7f468b6cf9f4a927444698a34e31bc2d Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:13 2023 +0200 dt-bindings: pinctrl: qcom,msm8226: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-7-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit a64ad105c17e56975bd3a4bcc9c9bdec60299834 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:12 2023 +0200 dt-bindings: pinctrl: qcom,mdm9615: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-6-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 867bf1502fbba5e505f055b47783f7236ac70985 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:11 2023 +0200 dt-bindings: pinctrl: qcom,mdm9607-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-5-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 42842d91c0c582c252291fb63d1d9bf5940a7226 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:09 2023 +0200 dt-bindings: pinctrl: qcom,ipq8074: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit b64e16983f8cfc9cdf8662f04f762a3e8498fcb0 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:08 2023 +0200 dt-bindings: pinctrl: qcom,ipq6018: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 2cf599ed720e353c1a4e7d7932d4252ce30360dd Author: Krzysztof Kozlowski Date: Fri Apr 7 20:45:07 2023 +0200 dt-bindings: pinctrl: qcom,ipq5332-tlmm: simplify with unevaluatedProperties All Qualcomm SoC Top Level Mode Multiplexer pin controllers have similar capabilities regarding pin properties, thus we can just accept entire set provided by qcom,tlmm-common.yaml schema. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230407184546.161168-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 97b5576b01166a6aed6a267df059128e5d98b15e Author: Dongxu Sun Date: Fri Mar 17 20:49:15 2023 +0800 arm64/sme: Fix some comments of ARM SME When TIF_SME is clear, fpsimd_restore_current_state will disable SME trap during ret_to_user, then SME access trap is impossible in userspace, not SVE. Besides, fix typo: alocated->allocated. Signed-off-by: Dongxu Sun Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230317124915.1263-5-sundongxu3@huawei.com Signed-off-by: Will Deacon commit 19e99e7d59bc421373e82af818197576b1a3940f Author: Dongxu Sun Date: Fri Mar 17 20:49:13 2023 +0800 arm64/signal: Alloc tpidr2 sigframe after checking system_supports_tpidr2() Move tpidr2 sigframe allocation from under the checking of system_supports_sme() to the checking of system_supports_tpidr2(). Signed-off-by: Dongxu Sun Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230317124915.1263-3-sundongxu3@huawei.com Signed-off-by: Will Deacon commit e9d14f3f3fb76c1e89f1648c0a2bc890de58bf11 Author: Dongxu Sun Date: Fri Mar 17 20:49:12 2023 +0800 arm64/signal: Use system_supports_tpidr2() to check TPIDR2 Since commit a9d6915859501("arm64/sme: Implement support for TPIDR2"), We introduced system_supports_tpidr2() for TPIDR2 handling. Let's use the specific check instead. No functional changes. Signed-off-by: Dongxu Sun Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230317124915.1263-2-sundongxu3@huawei.com Signed-off-by: Will Deacon commit ed72bd5a6790a0c3747cb32b0427f921bd03bb71 Author: Simon Horman Date: Sat Apr 8 09:47:54 2023 +0200 ksz884x: Remove unused functions Remove unused functions. These functions may have some value in documenting the hardware. But that information may be accessed via SCM history. Flagged by clang-16 with W=1. No functional change intended. Compile tested only. Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit be690daa224ec41889bf8f293a5bcd8a3ea6a420 Author: Brett Creeley Date: Fri Apr 7 11:45:39 2023 -0700 ionic: Don't overwrite the cyclecounter bitmask The driver was incorrectly overwriting the cyclecounter bitmask, which was truncating it and not aligning to the hardware mask value. This isn't causing any issues, but it's wrong. Fix this by not constraining the cyclecounter/hardware mask. Luckily, this seems to cause no issues, which is why this change doesn't have a fixes tag and isn't being sent to net. However, if any transformations from time->cycles are needed in the future, this change will be needed. Suggested-by: Allen Hubbe Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 81900e3a37750d8c6ad705045310e002f6dd0356 Author: Lionel Landwerlin Date: Fri Apr 7 12:32:37 2023 +0300 drm/i915: disable sampler indirect state in bindless heap By default the indirect state sampler data (border colors) are stored in the same heap as the SAMPLER_STATE structure. For userspace drivers that can be 2 different heaps (dynamic state heap & bindless sampler state heap). This means that border colors have to copied in 2 different places so that the same SAMPLER_STATE structure find the right data. This change is forcing the indirect state sampler data to only be in the dynamic state pool (more convenient for userspace drivers, they only have to have one copy of the border colors). This is reproducing the behavior of the Windows drivers. BSpec: 46052 Signed-off-by: Lionel Landwerlin Cc: stable@vger.kernel.org Reviewed-by: Haridhar Kalvala Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230407093237.3296286-1-lionel.g.landwerlin@intel.com (cherry picked from commit 16fc9c08f0ec7b1c95f1ea4a16097acdb3fc943d) Signed-off-by: Joonas Lahtinen commit f9408a83278f340e5e38bac06cc31251be385e51 Merge: bbda0f0d151cc db21973263f8c Author: David S. Miller Date: Wed Apr 12 09:21:27 2023 +0100 Merge branch 'rk3588-error-prints' Sebastian Reichel says: ==================== stmmac: Fix RK3588 error prints This fixes a couple of false positive error messages printed by stmmac on RK3588. I expect them to go via net-next since the fixes are not critical. Changes since PATCHv1: * https://lore.kernel.org/all/20230317174243.61500-1-sebastian.reichel@collabora.com/ * Add Fixes tags * Use loop to request clocks ==================== Signed-off-by: David S. Miller commit db21973263f8c56750cb610f1d5e8bee00a513b9 Author: Sebastian Reichel Date: Fri Apr 7 18:11:29 2023 +0200 net: ethernet: stmmac: dwmac-rk: fix optional phy regulator handling The usual devm_regulator_get() call already handles "optional" regulators by returning a valid dummy and printing a warning that the dummy regulator should be described properly. This code open coded the same behaviour, but masked any errors that are not -EPROBE_DEFER and is quite noisy. This change effectively unmasks and propagates regulators errors not involving -ENODEV, downgrades the error print to warning level if no regulator is specified and captures the probe defer message for /sys/kernel/debug/devices_deferred. Fixes: 2e12f536635f ("net: stmmac: dwmac-rk: Use standard devicetree property for phy regulator") Signed-off-by: Sebastian Reichel Signed-off-by: David S. Miller commit ea449f7fa0bf3fcd02e04a770b9ff707bf5e8f96 Author: Sebastian Reichel Date: Fri Apr 7 18:11:28 2023 +0200 net: ethernet: stmmac: dwmac-rk: rework optional clock handling The clock requesting code is quite repetitive. Fix this by requesting the clocks via devm_clk_bulk_get_optional. The optional variant has been used, since this is effectively what the old code did. The exact clocks required depend on the platform and configuration. As a side effect this change adds correct -EPROBE_DEFER handling. Suggested-by: Jakub Kicinski Suggested-by: Andrew Lunn Fixes: 7ad269ea1a2b ("GMAC: add driver for Rockchip RK3288 SoCs integrated GMAC") Signed-off-by: Sebastian Reichel Signed-off-by: David S. Miller commit 7394d0a85d6f847946dfe3f114f4d3f6a3988a36 Author: Manivannan Sadhasivam Date: Wed Mar 8 13:54:24 2023 +0530 PCI: qcom: Add support for SDX55 SoC Add support for SDX55 SoC reusing the 1.9.0 config. The PCIe controller is of version 1.10.0 but it is compatible with the 1.9.0 config. This SoC also requires "sleep" clock which is added as an optional clock in the driver, since it is not required on other SoCs. Link: https://lore.kernel.org/r/20230308082424.140224-14-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi commit e12b6893d2333f08dc108ab045b7744adc198bed Author: Manivannan Sadhasivam Date: Wed Mar 8 13:54:15 2023 +0530 dt-bindings: PCI: qcom-ep: Fix the unit address used in example Unit address of PCIe EP node should be 0x1c00000 as it has to match the first address specified in the reg property. Link: https://lore.kernel.org/r/20230308082424.140224-5-manivannan.sadhasivam@linaro.org Fixes: 31c9ef002580 ("dt-bindings: PCI: Add Qualcomm PCIe Endpoint controller") Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Kozlowski commit 1bc7ae328cedd5fefbda443c70c304fa66963437 Author: Manivannan Sadhasivam Date: Wed Mar 8 13:54:14 2023 +0530 dt-bindings: PCI: qcom: Add SDX55 SoC Add support for the PCIe controller on the Qcom SDX55 SoC to the binding. Link: https://lore.kernel.org/r/20230308082424.140224-4-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Kozlowski commit e18a7e9a2d34a32482e4069fcedf30a7bc9e9ef5 Author: Laurent Pinchart Date: Wed Feb 15 17:18:39 2023 +0200 media: Use designated initializers for all subdev pad ops Structures passed to subdev pad operations are all zero-initialized when declaring variables. In most cases, this is done with designated initializers to initialize some of the fields to specific values, but in a minority of cases the structures are zero-initialized by assigning them to '{ 0 }' or '{ }'. Improve coding style consistency by using designated initializers where possible, always initializing the 'which' field. Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Reviewed-by: Tomi Valkeinen Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil commit e3a69496a1cde364c74a600d7a370179b58aed29 Author: Laurent Pinchart Date: Wed Feb 15 17:18:39 2023 +0200 media: Prefer designated initializers over memset for subdev pad ops Structures passed to subdev pad operations are all zero-initialized, but not always with the same kind of code constructs. While most drivers used designated initializers, which zero all the fields that are not specified, when declaring variables, some use memset(). Those two methods lead to the same end result, and, depending on compiler optimizations, may even be completely equivalent, but they're not consistent. Improve coding style consistency by using designated initializers instead of calling memset(). Where applicable, also move the variables to inner scopes of for loops to ensure correct initialization in all iterations. Signed-off-by: Laurent Pinchart Reviewed-by: Lad Prabhakar # For am437x Acked-by: Sakari Ailus Reviewed-by: Tomi Valkeinen Reviewed-by: Kieran Bingham Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil commit ecefa105cc44fff6d170ac5f441e76cb229f8e19 Author: Laurent Pinchart Date: Wed Feb 15 17:18:39 2023 +0200 media: Zero-initialize all structures passed to subdev pad operations Several drivers call subdev pad operations, passing structures that are not fully zeroed. While the drivers initialize the fields they care about explicitly, this results in reserved fields having uninitialized values. Future kernel API changes that make use of those fields thus risk breaking proper driver operation in ways that could be hard to detect. To avoid this, make the code more robust by zero-initializing all the structures passed to subdev pad operation. Maintain a consistent coding style by preferring designated initializers (which zero-initialize all the fields that are not specified) over memset() where possible, and make variable declarations local to inner scopes where applicable. One notable exception to this rule is in the ipu3 driver, where a memset() is needed as the structure is not a local variable but a function parameter provided by the caller. Not all fields of those structures can be initialized when declaring the variables, as the values for those fields are computed later in the code. Initialize the 'which' field in all cases, and other fields when the variable declaration is so close to the v4l2_subdev_call() call that it keeps all the context easily visible when reading the code, to avoid hindering readability. Signed-off-by: Laurent Pinchart Acked-by: Shuah Khan # For vimc Reviewed-by: Lad Prabhakar # For am437x Acked-by: Sakari Ailus Reviewed-by: Tomi Valkeinen Reviewed-by: Kieran Bingham Reviewed-by: Philipp Zabel # For drivers/staging/media/imx/ Signed-off-by: Hans Verkuil commit a8ca0cf1ff53c011e7654c4c2e9c1bcf297204b3 Author: Laurent Pinchart Date: Wed Feb 15 17:35:45 2023 +0200 media: imx-jpeg: Fix incorrect indentation Variable initialization code in notify_src_chg() is incorrectly indented. Fix it. Signed-off-by: Laurent Pinchart Reviewed-by: Sakari Ailus Signed-off-by: Hans Verkuil commit a1e259872f3ea282ba3c5d600c99eee286512443 Author: Laurent Pinchart Date: Wed Feb 15 17:24:57 2023 +0200 media: Fix indentation issues introduced by subdev-wide state struct Commit 0d346d2a6f54 ("media: v4l2-subdev: add subdev-wide state struct") applied a large media tree-wide change produced by coccinelle. It was so large that a set of identical indentation issues went unnoticed during review. Fix them. While at it, and because it's easy to review both changes together, add a trailing comma for the last (and only) struct member initialization of the related structures, to avoid future changes should new fields need to be initialized. Fixes: 0d346d2a6f54 ("media: v4l2-subdev: add subdev-wide state struct") Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Hans Verkuil commit fba51482b6c0a6743b441bd57d53be11beb35a9b Merge: 5790d407daa30 c86b0e73f0beb Author: Greg Kroah-Hartman Date: Wed Apr 12 09:45:34 2023 +0200 Merge tag 'iio-for-6.4a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: 1st set of IIO new device support, features and cleanups for the 6.4 cycle. New device support * bosch,bmp280 - Add support for BMP580 - includes significant refactoring and general driver cleanup + support for non-volatile memory for trimming and config parameters. * rohm BU27034 - New driver for this 3 channel ambient light sensor. - New support library for devices where both integration time and amplifier gain are configurable. In these cases a scale change may require changing bother underlying values. This library module provides code to help with this. * st,accel - Add support for IIS328DQ (ID only as compatible wtih LIS331DL) * st,lsm6dsx - Add support for ASM330LHB automotive MEMS sensor. * ti,ads1100, ads1000 - New driver for these 16 bit ADCs. * ti,tmp117 - Add support for older tmp116 device. Includes some general driver cleanup. Staging driver drops * adi,ade7854 - Driver was a very long way from compliant with IIO infrastructure and ABI. If anyone wants a non staging version of this driver they are better off starting from scratch. Hence drop it and the associated meter.h header. Features * adi,ad7441r - Add DT binding to set sink current for digital input. * semtech,sx9324,9360 - Support older register mapping from firmware designed for windows. Core improvements. * Move iio_trigger_poll() docs to next to the implementation and add a note on expected caller context. * Rename iio_trigger_poll_chained() to iio_trigger_poll_nested() so as to use more standard / common terminology. * Improve main ABI docs references to offset and scale for raw values by making them consistent and clear. Cleanups and minor fixes: * adi,ad5592r - Add GPIO names - useful for debug. * adi,ad7441r - Fix current input, loop powered mode configuration setup. * adi,adis16475 - Fix wrong commented value for minimum advised lower rate. * adi,admv1013 - Use devm_clk_get_enabled() to reduce boilerplate. * adi,ads1210 - Fix wrong bits for writing config register (late fix and has been broken a long time so not rushed upstream) * amlogic,meson-saradc - Improve cleanup in error handling if BL30 handshake fails. * apex-embedded,stx104 - Migrate to regmap and use regmap_read_poll_timeout() to neatly handle retries. - Add local mutex to close various races. - Use define U16_MAX rather than value for limit. - Improve code readability with minor reorganization. * atmel,ad91-sama5d2 - Drop trivial dead code. * kionix,kx022a - Drop unused structure element. * linear,ltc2983 - Reorganize bindings doc to enable unevaluatedProperties to be set in one place for all child nodes. - Make binding for adi,custom-thermocouple accept signed values. * maxim,max44000 - Add OF Device matching (of_match_table was not correctly set). * maxim,max5522 - Missing static * measurement-computing,cio-dac - Fix wrong part name in comments. - Migrate to regmap. - Improve includes by replacing bitops.h with more direct bits.h * qcom,pm8xxx-xoadc - Remove a check that can never fail. * renesas,rcar-gyroadc - DT binding documentation improvements. - Tidy up an unused warning with __maybe_unused. * semtech,sx_common - Drop docs for a structure element that doesn't exist. * semtech,sx9500 - Drop ACPI_PTR() and of_match_ptr() protections that just complicate the code / block some firmware registration types that would otherwise work. * sensiron,sps30 - Comment formatting tidy up. * st,sensors - Drop duplicate text in DT binding. * st,stm32-adc - Add some missing static markings. * ti,ads1100 - Use correct return code in dev_err_probe() call. * x-powers,axp20x_adc - precursor series to simplify addition of AXP192. - General code cleanup / minor refactoring for better readabilty of code. - Switch from boolean value to mask for adc_en2 field to avoid hard coding a mask that will be different in AXP192 * tag 'iio-for-6.4a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (63 commits) MAINTAINERS: Add ROHM BU27034 iio: light: ROHM BU27034 Ambient Light Sensor dt-bindings: iio: light: Support ROHM BU27034 MAINTAINERS: Add IIO gain-time-scale helpers iio: light: Add gain-time-scale helpers doc: Make sysfs-bus-iio doc more exact iio: dac: set variable max5522_channels storage-class-specifier to static dt-bindings: iio: temperature: ltc2983: Make 'adi,custom-thermocouple' signed dt-bindings: iio: temperature: ltc2983: Fix child node unevaluated properties iio: addac: stx104: Use regmap_read_poll_timeout() for conversion poll iio: addac: stx104: Migrate to the regmap API iio: addac: stx104: Improve indentation in stx104_write_raw() iio: addac: stx104: Use define rather than hardcoded limit for write val iio: addac: stx104: Fix race condition when converting analog-to-digital iio: addac: stx104: Fix race condition for stx104_write_raw() dt-bindings: iio: st-sensors: Fix repeated text staging: iio: resolver: ads1210: fix config mode iio: adc: ti-ads1100: fix error code in probe() iio: accel: add support for IIS328DQ variant dt-bindings: iio: st-sensors: Add IIS328DQ accelerometer ... commit bbda0f0d151cc05b830bb41ed65c4dc2b616c21e Merge: 18bb56ab4477b 02020bd70fa6a Author: David S. Miller Date: Wed Apr 12 08:36:07 2023 +0100 Merge branch 'dsa-trace-events' Vladimir Oltean says: ==================== DSA trace events This series introduces the "dsa" trace event class, with the following events: $ trace-cmd list | grep dsa dsa dsa:dsa_fdb_add_hw dsa:dsa_mdb_add_hw dsa:dsa_fdb_del_hw dsa:dsa_mdb_del_hw dsa:dsa_fdb_add_bump dsa:dsa_mdb_add_bump dsa:dsa_fdb_del_drop dsa:dsa_mdb_del_drop dsa:dsa_fdb_del_not_found dsa:dsa_mdb_del_not_found dsa:dsa_lag_fdb_add_hw dsa:dsa_lag_fdb_add_bump dsa:dsa_lag_fdb_del_hw dsa:dsa_lag_fdb_del_drop dsa:dsa_lag_fdb_del_not_found dsa:dsa_vlan_add_hw dsa:dsa_vlan_del_hw dsa:dsa_vlan_add_bump dsa:dsa_vlan_del_drop dsa:dsa_vlan_del_not_found These are useful to debug refcounting issues on CPU and DSA ports, where entries may remain lingering, or may be removed too soon, depending on bugs in higher layers of the network stack. ==================== Signed-off-by: David S. Miller commit 02020bd70fa6abcb1c2a8525ce7c1500dd4f44a8 Author: Vladimir Oltean Date: Fri Apr 7 17:14:51 2023 +0300 net: dsa: add trace points for VLAN operations These are not as critical as the FDB/MDB trace points (I'm not aware of outstanding VLAN related bugs), but maybe they are useful to somebody, either debugging something or simply trying to learn more. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 9538ebce88ffa074202d592d468521995cb1e714 Author: Vladimir Oltean Date: Fri Apr 7 17:14:50 2023 +0300 net: dsa: add trace points for FDB/MDB operations DSA performs non-trivial housekeeping of unicast and multicast addresses on shared (CPU and DSA) ports, and puts a bit of pressure on higher layers, requiring them to behave correctly (remove these addresses exactly as many times as they were added). Otherwise, either addresses linger around forever, or DSA returns -ENOENT complaining that entries that were already deleted must be deleted again. To aid debugging, introduce some trace points specifically for FDB and MDB - that's where some of the bugs still are right now. Some bugs I have seen were also due to race conditions, see: - 630fd4822af2 ("net: dsa: flush switchdev workqueue on bridge join error path") - a2614140dc0f ("net: dsa: mv88e6xxx: flush switchdev FDB workqueue before removing VLAN") so it would be good to not disturb the timing too much, hence the choice to use trace points vs regular dev_dbg(). I've had these for some time on my computer in a less polished form, and they've proven useful. What I found most useful was to enable CONFIG_BOOTTIME_TRACING, add "trace_event=dsa" to the kernel cmdline, and run "cat /sys/kernel/debug/tracing/trace". This is to debug more complex environments with network managers started by the init system, things like that. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit a47a3ae5fcc06369bbaa32067d7edf10cb65bdc1 Author: Fritz Koenig Date: Fri Feb 10 11:26:46 2023 -0800 media: venus: Correct P010 buffer alignment According to msm_media_info.h the correct alignment for the stride of P010 buffers is 128. Signed-off-by: Fritz Koenig Reviewed-by: Vikash Garodia Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil commit 7493db46e4c4aa5126dd32f8eae12a4cdcf7a401 Author: Dikshita Agarwal Date: Wed Apr 5 12:45:23 2023 +0530 venus: venc: add handling for VIDIOC_ENCODER_CMD Add handling for below commands in encoder: 1. V4L2_ENC_CMD_STOP 2. V4L2_ENC_CMD_START Signed-off-by: Dikshita Agarwal Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil commit 90655e2e79b4547fbae6bd0ce737db0df93465c4 Author: Viswanath Boma Date: Thu Mar 23 14:40:52 2023 +0530 venus: Add support for min/max qp range. Currently QP range set from client is not communicated to video firmware. Add support for the QP range HFI to set the same to firmware. Signed-off-by: Viswanath Boma Signed-off-by: Vikash Garodia Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil commit a9d45ec74c8e68aaafe90191928eddbf79f4644f Author: Javier Martinez Canillas Date: Fri Feb 10 09:18:35 2023 +0100 media: venus: dec: Fix capture formats enumeration order Commit 9593126dae3e ("media: venus: Add a handling of QC08C compressed format") and commit cef92b14e653 ("media: venus: Add a handling of QC10C compressed format") added support for the QC08C and QC10C compressed formats respectively. But these also caused a regression, because the new formats where added at the beginning of the vdec_formats[] array and the vdec_inst_init() function sets the default format output and capture using fixed indexes of that array: static void vdec_inst_init(struct venus_inst *inst) { ... inst->fmt_out = &vdec_formats[8]; inst->fmt_cap = &vdec_formats[0]; ... } Since now V4L2_PIX_FMT_NV12 is not the first entry in the array anymore, the default capture format is not set to that as it was done before. Both commits changed the first index to keep inst->fmt_out default format set to V4L2_PIX_FMT_H264, but did not update the latter to keep .fmt_out default format set to V4L2_PIX_FMT_NV12. Rather than updating the index to the current V4L2_PIX_FMT_NV12 position, let's reorder the entries so that this format is the first entry again. This would also make VIDIOC_ENUM_FMT report the V4L2_PIX_FMT_NV12 format with an index 0 as it did before the QC08C and QC10C formats were added. Fixes: 9593126dae3e ("media: venus: Add a handling of QC08C compressed format") Fixes: cef92b14e653 ("media: venus: Add a handling of QC10C compressed format") Signed-off-by: Javier Martinez Canillas Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil commit bfe1326573ff9ddd9032f556f0f5aba581b6688c Author: Viswanath Boma Date: Tue Nov 15 17:40:04 2022 +0530 venus: Fix for H265 decoding failure. Aligned the mismatch of persist1 and scratch1 buffer calculation, as per the firmware requirements. Signed-off-by: Vikash Garodia Signed-off-by: Viswanath Boma Tested-by: Nathan Hebert Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil commit 50248ad9f190d527cbd578190ca769729518b703 Author: Michał Krawczyk Date: Mon Jan 30 13:54:18 2023 +0000 media: venus: dec: Fix handling of the start cmd The decoder driver should clear the last_buffer_dequeued flag of the capture queue upon receiving V4L2_DEC_CMD_START. The last_buffer_dequeued flag is set upon receiving EOS (which always happens upon receiving V4L2_DEC_CMD_STOP). Without this patch, after issuing the V4L2_DEC_CMD_STOP and V4L2_DEC_CMD_START, the vb2_dqbuf() function will always fail, even if the buffers are completed by the hardware. Fixes: beac82904a87 ("media: venus: make decoder compliant with stateful codec API") Signed-off-by: Michał Krawczyk Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil commit 9c592f8ab114875fdb3b2040f01818e53de44991 Author: Florian Fainelli Date: Fri Mar 24 13:38:33 2023 -0700 media: rc: gpio-ir-recv: Fix support for wake-up The driver was intended from the start to be a wake-up source for the system, however due to the absence of a suitable call to device_set_wakeup_capable(), the device_may_wakeup() call used to decide whether to enable the GPIO interrupt as a wake-up source would never happen. Lookup the DT standard "wakeup-source" property and call device_init_wakeup() to ensure the device is flagged as being wakeup capable. Reported-by: Matthew Lear Fixes: fd0f6851eb46 ("[media] rc: Add support for GPIO based IR Receiver driver") Signed-off-by: Florian Fainelli Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit 9fffbf9ca00f1ba05368189c8cc40881e75c57c4 Author: Florian Fainelli Date: Fri Mar 24 13:38:32 2023 -0700 dt-bindings: media: gpio-ir-receiver: Document wakeup-souce property The GPIO IR receiver can be used as a wake-up source for the system, document that. Signed-off-by: Florian Fainelli Acked-by: Krzysztof Kozlowski Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit a4c716706f3f1725ebf578d9c8db63b36b9570e1 Author: Manivannan Sadhasivam Date: Wed Mar 8 13:54:12 2023 +0530 dt-bindings: PCI: qcom: Update maintainers entry Stan is no longer working with MMSOL and expressed his interest to not continue maintaining Qcom PCIe driver. Since I took over the driver maintainership, I'm stepping in to maintain the binding also. Link: https://lore.kernel.org/r/20230308082424.140224-2-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi Acked-by: Krzysztof Kozlowski commit c0e1eb441b1de42500cbc081b8d754caae6b27b1 Author: Manivannan Sadhasivam Date: Mon Mar 20 12:16:44 2023 +0530 PCI: qcom: Enable async probe by default Qcom PCIe RC driver waits for the PHY link to be up during the probe; this consumes several milliseconds during boot. Enable async probe by default so that other drivers can load in parallel while this driver waits for the link to be up. Suggested-by: Rob Herring Link: https://lore.kernel.org/r/20230320064644.5217-1-manivannan.sadhasivam@linaro.org Tested-by: Johan Hovold Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi Reviewed-by: Johan Hovold commit ad9b9b6e36c920234af6e86982dd48be560385b1 Author: Manivannan Sadhasivam Date: Mon Apr 3 21:19:22 2023 +0530 PCI: qcom: Add support for system suspend and resume During the system suspend, vote for minimal interconnect bandwidth (1KiB) to keep the interconnect path active for config access and also turn OFF the resources like clock and PHY if there are no active devices connected to the controller. For the controllers with active devices, the resources are kept ON as removing the resources will trigger access violation during the late end of suspend cycle as kernel tries to access the config space of PCIe devices to mask the MSIs. Also, it is not desirable to put the link into L2/L3 state as that implies VDD supply will be removed and the devices may go into powerdown state. This will affect the lifetime of storage devices like NVMe. And finally, during resume, turn ON the resources if the controller was truly suspended (resources OFF) and update the interconnect bandwidth based on PCIe Gen speed. Suggested-by: Krishna chaitanya chundru Link: https://lore.kernel.org/r/20230403154922.20704-2-manivannan.sadhasivam@linaro.org Tested-by: Johan Hovold Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi Reviewed-by: Johan Hovold Acked-by: Dhruva Gole commit 8ee81ed581ff35882b006a5205100db0b57bf070 Author: Ye Bin Date: Wed Apr 12 15:49:44 2023 +1000 xfs: fix BUG_ON in xfs_getbmap() There's issue as follows: XFS: Assertion failed: (bmv->bmv_iflags & BMV_IF_DELALLOC) != 0, file: fs/xfs/xfs_bmap_util.c, line: 329 ------------[ cut here ]------------ kernel BUG at fs/xfs/xfs_message.c:102! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 14612 Comm: xfs_io Not tainted 6.3.0-rc2-next-20230315-00006-g2729d23ddb3b-dirty #422 RIP: 0010:assfail+0x96/0xa0 RSP: 0018:ffffc9000fa178c0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffff888179a18000 RDX: 0000000000000000 RSI: ffff888179a18000 RDI: 0000000000000002 RBP: 0000000000000000 R08: ffffffff8321aab6 R09: 0000000000000000 R10: 0000000000000001 R11: ffffed1105f85139 R12: ffffffff8aacc4c0 R13: 0000000000000149 R14: ffff888269f58000 R15: 000000000000000c FS: 00007f42f27a4740(0000) GS:ffff88882fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000b92388 CR3: 000000024f006000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: xfs_getbmap+0x1a5b/0x1e40 xfs_ioc_getbmap+0x1fd/0x5b0 xfs_file_ioctl+0x2cb/0x1d50 __x64_sys_ioctl+0x197/0x210 do_syscall_64+0x39/0xb0 entry_SYSCALL_64_after_hwframe+0x63/0xcd Above issue may happen as follows: ThreadA ThreadB do_shared_fault __do_fault xfs_filemap_fault __xfs_filemap_fault filemap_fault xfs_ioc_getbmap -> Without BMV_IF_DELALLOC flag xfs_getbmap xfs_ilock(ip, XFS_IOLOCK_SHARED); filemap_write_and_wait do_page_mkwrite xfs_filemap_page_mkwrite __xfs_filemap_fault xfs_ilock(XFS_I(inode), XFS_MMAPLOCK_SHARED); iomap_page_mkwrite ... xfs_buffered_write_iomap_begin xfs_bmapi_reserve_delalloc -> Allocate delay extent xfs_ilock_data_map_shared(ip) xfs_getbmap_report_one ASSERT((bmv->bmv_iflags & BMV_IF_DELALLOC) != 0) -> trigger BUG_ON As xfs_filemap_page_mkwrite() only hold XFS_MMAPLOCK_SHARED lock, there's small window mkwrite can produce delay extent after file write in xfs_getbmap(). To solve above issue, just skip delalloc extents. Signed-off-by: Ye Bin Reviewed-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 22ed903eee23a5b174e240f1cdfa9acf393a5210 Author: Darrick J. Wong Date: Wed Apr 12 15:49:23 2023 +1000 xfs: verify buffer contents when we skip log replay syzbot detected a crash during log recovery: XFS (loop0): Mounting V5 Filesystem bfdc47fc-10d8-4eed-a562-11a831b3f791 XFS (loop0): Torn write (CRC failure) detected at log block 0x180. Truncating head block from 0x200. XFS (loop0): Starting recovery (logdev: internal) ================================================================== BUG: KASAN: slab-out-of-bounds in xfs_btree_lookup_get_block+0x15c/0x6d0 fs/xfs/libxfs/xfs_btree.c:1813 Read of size 8 at addr ffff88807e89f258 by task syz-executor132/5074 CPU: 0 PID: 5074 Comm: syz-executor132 Not tainted 6.2.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x290 lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:306 print_report+0x107/0x1f0 mm/kasan/report.c:417 kasan_report+0xcd/0x100 mm/kasan/report.c:517 xfs_btree_lookup_get_block+0x15c/0x6d0 fs/xfs/libxfs/xfs_btree.c:1813 xfs_btree_lookup+0x346/0x12c0 fs/xfs/libxfs/xfs_btree.c:1913 xfs_btree_simple_query_range+0xde/0x6a0 fs/xfs/libxfs/xfs_btree.c:4713 xfs_btree_query_range+0x2db/0x380 fs/xfs/libxfs/xfs_btree.c:4953 xfs_refcount_recover_cow_leftovers+0x2d1/0xa60 fs/xfs/libxfs/xfs_refcount.c:1946 xfs_reflink_recover_cow+0xab/0x1b0 fs/xfs/xfs_reflink.c:930 xlog_recover_finish+0x824/0x920 fs/xfs/xfs_log_recover.c:3493 xfs_log_mount_finish+0x1ec/0x3d0 fs/xfs/xfs_log.c:829 xfs_mountfs+0x146a/0x1ef0 fs/xfs/xfs_mount.c:933 xfs_fs_fill_super+0xf95/0x11f0 fs/xfs/xfs_super.c:1666 get_tree_bdev+0x400/0x620 fs/super.c:1282 vfs_get_tree+0x88/0x270 fs/super.c:1489 do_new_mount+0x289/0xad0 fs/namespace.c:3145 do_mount fs/namespace.c:3488 [inline] __do_sys_mount fs/namespace.c:3697 [inline] __se_sys_mount+0x2d3/0x3c0 fs/namespace.c:3674 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f89fa3f4aca Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 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 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fffd5fb5ef8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00646975756f6e2c RCX: 00007f89fa3f4aca RDX: 0000000020000100 RSI: 0000000020009640 RDI: 00007fffd5fb5f10 RBP: 00007fffd5fb5f10 R08: 00007fffd5fb5f50 R09: 000000000000970d R10: 0000000000200800 R11: 0000000000000206 R12: 0000000000000004 R13: 0000555556c6b2c0 R14: 0000000000200800 R15: 00007fffd5fb5f50 The fuzzed image contains an AGF with an obviously garbage agf_refcount_level value of 32, and a dirty log with a buffer log item for that AGF. The ondisk AGF has a higher LSN than the recovered log item. xlog_recover_buf_commit_pass2 reads the buffer, compares the LSNs, and decides to skip replay because the ondisk buffer appears to be newer. Unfortunately, the ondisk buffer is corrupt, but recovery just read the buffer with no buffer ops specified: error = xfs_buf_read(mp->m_ddev_targp, buf_f->blf_blkno, buf_f->blf_len, buf_flags, &bp, NULL); Skipping the buffer leaves its contents in memory unverified. This sets us up for a kernel crash because xfs_refcount_recover_cow_leftovers reads the buffer (which is still around in XBF_DONE state, so no read verification) and creates a refcountbt cursor of height 32. This is impossible so we run off the end of the cursor object and crash. Fix this by invoking the verifier on all skipped buffers and aborting log recovery if the ondisk buffer is corrupt. It might be smarter to force replay the log item atop the buffer and then see if it'll pass the write verifier (like ext4 does) but for now let's go with the conservative option where we stop immediately. Link: https://syzkaller.appspot.com/bug?extid=7e9494b8b399902e994e Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit c95356ca884885db702670e24933ee7f2b9f1754 Author: Darrick J. Wong Date: Wed Apr 12 15:49:10 2023 +1000 xfs: _{attr,data}_map_shared should take ILOCK_EXCL until iread_extents is completely done While fuzzing the data fork extent count on a btree-format directory with xfs/375, I observed the following (excerpted) splat: XFS: Assertion failed: xfs_isilocked(ip, XFS_ILOCK_EXCL), file: fs/xfs/libxfs/xfs_bmap.c, line: 1208 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 43192 at fs/xfs/xfs_message.c:104 assfail+0x46/0x4a [xfs] Call Trace: xfs_iread_extents+0x1af/0x210 [xfs 09f66509ece4938760fac7de64732a0cbd3e39cd] xchk_dir_walk+0xb8/0x190 [xfs 09f66509ece4938760fac7de64732a0cbd3e39cd] xchk_parent_count_parent_dentries+0x41/0x80 [xfs 09f66509ece4938760fac7de64732a0cbd3e39cd] xchk_parent_validate+0x199/0x2e0 [xfs 09f66509ece4938760fac7de64732a0cbd3e39cd] xchk_parent+0xdf/0x130 [xfs 09f66509ece4938760fac7de64732a0cbd3e39cd] xfs_scrub_metadata+0x2b8/0x730 [xfs 09f66509ece4938760fac7de64732a0cbd3e39cd] xfs_scrubv_metadata+0x38b/0x4d0 [xfs 09f66509ece4938760fac7de64732a0cbd3e39cd] xfs_ioc_scrubv_metadata+0x111/0x160 [xfs 09f66509ece4938760fac7de64732a0cbd3e39cd] xfs_file_ioctl+0x367/0xf50 [xfs 09f66509ece4938760fac7de64732a0cbd3e39cd] __x64_sys_ioctl+0x82/0xa0 do_syscall_64+0x2b/0x80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 The cause of this is a race condition in xfs_ilock_data_map_shared, which performs an unlocked access to the data fork to guess which lock mode it needs: Thread 0 Thread 1 xfs_need_iread_extents xfs_ilock(..., ILOCK_EXCL) xfs_iread_extents xfs_need_iread_extents xfs_ilock(..., ILOCK_SHARED) xfs_iunlock(..., ILOCK_EXCL) xfs_iread_extents *BOOM* Fix this race by adding a flag to the xfs_ifork structure to indicate that we have not yet read in the extent records and changing the predicate to look at the flag state, not if_height. The memory barrier ensures that the flag will not be set until the very end of the function. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner commit 4b827b3f305d1fcf837265f1e12acc22ee84327c Author: Dave Chinner Date: Wed Apr 12 15:48:59 2023 +1000 xfs: remove WARN when dquot cache insertion fails It just creates unnecessary bot noise these days. Reported-by: syzbot+6ae213503fb12e87934f@syzkaller.appspotmail.com Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner commit aa88019851a85df80cb77f143758b13aee09e3d9 Author: Dave Chinner Date: Wed Apr 12 15:48:50 2023 +1000 xfs: don't consider future format versions valid In commit fe08cc504448 we reworked the valid superblock version checks. If it is a V5 filesystem, it is always valid, then we checked if the version was less than V4 (reject) and then checked feature fields in the V4 flags to determine if it was valid. What we missed was that if the version is not V4 at this point, we shoudl reject the fs. i.e. the check current treats V6+ filesystems as if it was a v4 filesystem. Fix this. cc: stable@vger.kernel.org Fixes: fe08cc504448 ("xfs: open code sb verifier feature checks") Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner commit 18bb56ab4477b966e2974b96a5e3bf9ba052aac5 Author: Andrew Lunn Date: Tue Apr 11 04:35:41 2023 +0200 net: dsa: mv88e6xxx: Correct cmode to PHY_INTERFACE_ The switch can either take the MAC or the PHY role in an MII or RMII link. There are distinct PHY_INTERFACE_ macros for these two roles. Correct the mapping so that the `REV` version is used for the PHY role. Signed-off-by: Andrew Lunn Reviewed-by: Russell King (Oracle) Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230411023541.2372609-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 108ff8215b55903545abafa198f83624a20f44c8 Author: Yevgeny Kliteynik Date: Tue Aug 30 01:20:54 2022 +0300 net/mlx5: DR, Add modify-header-pattern ICM pool There is a new ICM area for that memory, so we need to handle it as we did for the others ICM types. The patch added that specific pool with its requirements and management. Signed-off-by: Muhammad Sammar Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 1e5cc7369bb08808813d2795ae4adbd7591b31d0 Author: Yevgeny Kliteynik Date: Tue Aug 30 01:20:49 2022 +0300 net/mlx5: DR, Prepare sending new WQE type The send engine should be ready to handle more opcodes in addition to RDMA_WRITE/RDMA_READ. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 977c4a3e7c89d5b48fdc548773fb9ed3e6c50cf8 Author: Yevgeny Kliteynik Date: Tue Aug 30 01:20:40 2022 +0300 net/mlx5: Add new WQE for updating flow table Add new WQE type: FLOW_TBL_ACCESS, which will be used for writing modify header arguments. This type has specific control segment and special data segment. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 9fa7f1de3dda0bc74c964b5127b3f22bd8ef8fd2 Author: Yevgeny Kliteynik Date: Tue Aug 30 01:20:30 2022 +0300 net/mlx5: Add mlx5_ifc bits for modify header argument Add enum value for modify-header argument object and mlx5_bits for the related capabilities. Signed-off-by: Muhammad Sammar Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit cee6484eddc1066f009cc82ad12a1739892172b8 Author: Yevgeny Kliteynik Date: Wed Mar 1 00:16:34 2023 +0200 net/mlx5: DR, Set counter ID on the last STE for STEv1 TX In STEv1 counter action can be set either by filling counter ID on STE, in which case it is executed before other actions on this STE, or as a single action, in which case it is executed in accordance with the actions order. FW steering on STEv1 devices implements counter as counter ID on STE, and this counter is set on the last STE. Fix SMFS to be consistent with this behaviour - move TX counter to the last STE, this way the counter will include all actions of the previous STEs that might have changed packet headers length, e.g. encap, vlan push, etc. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 9df839a711aee437390b16ee39cf0b5c1620be6a Author: Parav Pandit Date: Thu Apr 23 08:27:59 2020 -0500 net/mlx5: Create a new profile for SFs Create a new profile for SFs in order to disable the command cache. Each function command cache consumes ~500KB of memory, when using a large number of SFs this savings is notable on memory constarined systems. Use a new profile to provide for future differences between SFs and PFs. The mr_cache not used for non-PF functions, so it is excluded from the new profile. Signed-off-by: Parav Pandit Reviewed-by: Bodong Wang Signed-off-by: Saeed Mahameed commit 55f3e740f7f697a2287447678c09d93238a6635a Author: Vlad Buslov Date: Tue Feb 14 22:00:41 2023 +0100 net/mlx5: Bridge, add tracepoints for multicast Pass target struct net_device to mdb attach/detach handler in order to expose the port name to the new tracepoints. Implemented following tracepoints: - Attach mdb to port. - Detach mdb from port. Usage example: ># cd /sys/kernel/debug/tracing ># echo mlx5:mlx5_esw_bridge_port_mdb_attach >> set_event ># cat trace ... kworker/0:0-19071 [000] ..... 259004.253848: mlx5_esw_bridge_port_mdb_attach: net_device=enp8s0f0_0 addr=33:33:ff:00:00:01 vid=0 num_ports=1 offloaded=1 Signed-off-by: Vlad Buslov Reviewed-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 70f0302b3f2053b64a6a653a76a20cb95438dc85 Author: Vlad Buslov Date: Sat Feb 4 07:58:54 2023 +0100 net/mlx5: Bridge, implement mdb offload Implement support for add/del SWITCHDEV_OBJ_ID_PORT_MDB events. For mdb destination addresses configure egress table rules to replicate to per-port multicast tables of all ports that are member of the multicast group as illustrated by 'MDB1' rule in the following diagram: +--------+--+ +---------------------------------------> Port 1 | | | +-^------+--+ | | | | +-----------------------------------------+ | +---------------------------+ | | EGRESS table | | +--> PORT 1 multicast table | | +----------------------------------+ +-----------------------------------------+ | | +---------------------------+ | | INGRESS table | | | | | | | | +----------------------------------+ | dst_mac=P1,vlan=X -> pop vlan, goto P1 +--+ | | FG0: | | | | | dst_mac=P1,vlan=Y -> pop vlan, goto P1 | | | src_port=dst_port -> drop | | | src_mac=M1,vlan=X -> goto egress +---> dst_mac=P2,vlan=X -> pop vlan, goto P2 +--+ | | FG1: | | | ... | | dst_mac=P2,vlan=Y -> goto P2 | | | | VLAN X -> pop, goto port | | | | | dst_mac=MDB1,vlan=Y -> goto mcast P1,P2 +-----+ | ... | | +----------------------------------+ | | | | | VLAN Y -> pop, goto port +-------+ +-----------------------------------------+ | | | FG3: | | | | matchall -> goto port | | | | | | | +---------------------------+ | | | | | | +--------+--+ +---------------------------------------> Port 2 | | | +-^------+--+ | | | | | +---------------------------+ | +--> PORT 2 multicast table | | +---------------------------+ | | | | | FG0: | | | src_port=dst_port -> drop | | | FG1: | | | VLAN X -> pop, goto port | | | ... | | | | | | FG3: | | | matchall -> goto port +-------+ | | +---------------------------+ MDB is managed by extending mlx5 bridge to store an entry in mlx5_esw_bridge->mdb_list linked list (used to iterate over all offloaded MDBs) and mlx5_esw_bridge->mdb_ht hash table (used to lookup existing MDB by MAC+VLAN). Every MDB entry can be attached to arbitrary amount of bridge ports that are stored in mlx5_esw_bridge_mdb_entry->ports xarray in order to allow both efficient lookup of the port and also iteration over all ports that the entry is attached to. Every time MDB is attached/detached to/from a port, the hardware rule is recreated with list of destinations corresponding to all attached ports. When the entry is detached from the last port it is removed from mdb and destroyed which means that the ports xarray also acts as implicit reference counting mechanism. Signed-off-by: Vlad Buslov Reviewed-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit b5e80625d1687c75e51b3dc9543a1b769d964250 Author: Vlad Buslov Date: Wed Feb 22 13:13:32 2023 +0100 net/mlx5: Bridge, support multicast VLAN pop When VLAN with 'untagged' flag is created on port also provision the per-port multicast table rule to pop the VLAN during packet replication. This functionality must be in per-port table because some subset of ports that are member of multicast group can require just a match on VLAN (trunk mode) while other subset can be configured to remove the VLAN tag from packets received on the ports (access mode). Signed-off-by: Vlad Buslov Reviewed-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 272ecfc92f6f141f3381da65c2966851bd77baae Author: Vlad Buslov Date: Wed Feb 22 13:10:02 2023 +0100 net/mlx5: Bridge, add per-port multicast replication tables Multicast replication requires adding one more level of FDB_BR_OFFLOAD priority flow tables. The new level is used for per-port multicast-specific tables that have following flow groups structure (flow highest to lowest priority): - Flow group of size one that matches on source port metadata. This will have a static single rule that prevent packets from being replicated to their source port. - Flow group of size one that matches all packets and forwards them to the port that owns the table. Initialize the table dynamically on all bridge ports when adding a port to the bridge that has multicast enabled and on all existing bridge ports when receiving multicast enable notification. Signed-off-by: Vlad Buslov Reviewed-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 18c2916cee12137f32669d42ac1fbb87cba343bb Author: Vlad Buslov Date: Tue Feb 21 21:31:48 2023 +0100 net/mlx5: Bridge, snoop igmp/mld packets Handle SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED attribute notification to dynamically toggle bridge multicast offload. Set new MLX5_ESW_BRIDGE_MCAST_FLAG bridge flag when multicast offload is enabled. Put multicast-specific code into new bridge_mcast.c file. When initializing bridge multicast pipeline create a static rule for snooping on IGMP traffic and three rules for snooping on MLD traffic (for query, report and done message types). Note that matching MLD traffic requires having flexparser MLX5_FLEX_PROTO_ICMPV6 capability enabled. By default Linux bridge is created with multicast enabled which can be modified by 'mcast_snooping' argument: $ ip link set name my_bridge type bridge mcast_snooping 0 Signed-off-by: Vlad Buslov Reviewed-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit b99c4ef29e278ab0b91406e52df4fa9b634b117e Author: Vlad Buslov Date: Mon Mar 13 16:22:49 2023 +0100 net/mlx5: Bridge, extract code to lookup parent bridge of port The pattern when function looks up a port by vport_num+vhca_id tuple in order to just obtain its parent bridge is repeated multiple times in bridge.c file. Further commits in this series use the pattern even more. Extract the pattern to standalone mlx5_esw_bridge_from_port_lookup() function to improve code readability. This commits doesn't change functionality. Signed-off-by: Vlad Buslov Reviewed-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 6767c97d7adc3c4283c0167a9716de3953f251b1 Author: Vlad Buslov Date: Sun Feb 19 18:27:04 2023 +0100 net/mlx5: Bridge, move additional data structures to priv header Following patches in series will require accessing flow tables and groups sizes, table levels and struct mlx5_esw_bridge from new the new source file dedicated to multicast code. Expose these data in bridge_priv.h to reduce clutter in following patches that will implement the actual functionality. Signed-off-by: Vlad Buslov Reviewed-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 9071b423c302b70eff80da715d724c4e75c1c46a Author: Vlad Buslov Date: Thu Jan 5 15:28:29 2023 +0100 net/mlx5: Bridge, increase bridge tables sizes Bridge ingress and egress tables got more flow groups recently for QinQ support and will get more in following patches of this series. Increase the sizes of the tables to allow offloading more flows in each mode. Signed-off-by: Vlad Buslov Reviewed-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit e5688f6fb9e3d0254a8fb1c714c38e407f0baa64 Author: Vlad Buslov Date: Wed Mar 1 10:33:55 2023 +0100 net/mlx5: Add mlx5_ifc definitions for bridge multicast support Add the required hardware definitions to mlx5_ifc: fdb_uplink_hairpin, fdb_multi_path_any_table_limit_regc, fdb_multi_path_any_table. Signed-off-by: Vlad Buslov Reviewed-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 04839139213cf60d4c5fc792214a08830e294ff8 Author: Eric Biggers Date: Thu Apr 6 14:31:11 2023 -0700 fsverity: reject FS_IOC_ENABLE_VERITY on mode 3 fds Commit 56124d6c87fd ("fsverity: support enabling with tree block size < PAGE_SIZE") changed FS_IOC_ENABLE_VERITY to use __kernel_read() to read the file's data, instead of direct pagecache accesses. An unintended consequence of this is that the 'WARN_ON_ONCE(!(file->f_mode & FMODE_READ))' in __kernel_read() became reachable by fuzz tests. This happens if FS_IOC_ENABLE_VERITY is called on a fd opened with access mode 3, which means "ioctl access only". Arguably, FS_IOC_ENABLE_VERITY should work on ioctl-only fds. But ioctl-only fds are a weird Linux extension that is rarely used and that few people even know about. (The documentation for FS_IOC_ENABLE_VERITY even specifically says it requires O_RDONLY.) It's probably not worthwhile to make the ioctl internally open a new fd just to handle this case. Thus, just reject the ioctl on such fds for now. Fixes: 56124d6c87fd ("fsverity: support enabling with tree block size < PAGE_SIZE") Reported-by: syzbot+51177e4144d764827c45@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=2281afcbbfa8fdb92f9887479cc0e4180f1c6b28 Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230406215106.235829-1-ebiggers@kernel.org Reviewed-by: Christoph Hellwig Reviewed-by: Christian Brauner Signed-off-by: Eric Biggers commit 39049b69ec9fc125fa1f314165dcc86f72cb72ec Author: Eric Biggers Date: Mon Mar 27 21:15:05 2023 -0700 fsverity: explicitly check for buffer overflow in build_merkle_tree() The new Merkle tree construction algorithm is a bit fragile in that it may overflow the 'root_hash' array if the tree actually generated does not match the calculated tree parameters. This should never happen unless there is a filesystem bug that allows the file size to change despite deny_write_access(), or a bug in the Merkle tree logic itself. Regardless, it's fairly easy to check for buffer overflow here, so let's do so. This is a robustness improvement only; this case is not currently known to be reachable. I've added a Fixes tag anyway, since I recommend that this be included in kernels that have the mentioned commit. Fixes: 56124d6c87fd ("fsverity: support enabling with tree block size < PAGE_SIZE") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230328041505.110162-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 8eb8af4b3df5965dc65a24a32768043f39d82d59 Author: Eric Biggers Date: Mon Mar 27 21:03:26 2023 -0700 fsverity: use WARN_ON_ONCE instead of WARN_ON As per Linus's suggestion (https://lore.kernel.org/r/CAHk-=whefxRGyNGzCzG6BVeM=5vnvgb-XhSeFJVxJyAxAF8XRA@mail.gmail.com), use WARN_ON_ONCE instead of WARN_ON. This barely adds any extra overhead, and it makes it so that if any of these ever becomes reachable (they shouldn't, but that's the point), the logs can't be flooded. Link: https://lore.kernel.org/r/20230406181542.38894-1-ebiggers@kernel.org Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christian Brauner Signed-off-by: Eric Biggers commit 7ba83850ca2691865713b307ed001bde5fddb084 Author: Darrick J. Wong Date: Tue Apr 11 19:05:19 2023 -0700 xfs: deprecate the ascii-ci feature This feature is a mess -- the hash function has been broken for the entire 15 years of its existence if you create names with extended ascii bytes; metadump name obfuscation has silently failed for just as long; and the feature clashes horribly with the UTF8 encodings that most systems use today. There is exactly one fstest for this feature. In other words, this feature is crap. Let's deprecate it now so we can remove it from the codebase in 2030. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 6db09a8d0377866b99882f8d44e4ba1a1bf6c6a1 Author: Darrick J. Wong Date: Tue Apr 11 19:05:05 2023 -0700 xfs: test the ascii case-insensitive hash Now that we've made kernel and userspace use the same tolower code for computing directory index hashes, add that to the selftest code. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit a9248538facc3d9e769489e50a544509c2f9cebe Author: Darrick J. Wong Date: Tue Apr 11 19:05:04 2023 -0700 xfs: stabilize the dirent name transformation function used for ascii-ci dir hash computation Back in the old days, the "ascii-ci" feature was created to implement case-insensitive directory entry lookups for latin1-encoded names and remove the large overhead of Samba's case-insensitive lookup code. UTF8 names were not allowed, but nobody explicitly wrote in the documentation that this was only expected to work if the system used latin1 names. The kernel tolower function was selected to prepare names for hashed lookups. There's a major discrepancy in the function that computes directory entry hashes for filesystems that have ASCII case-insensitive lookups enabled. The root of this is that the kernel and glibc's tolower implementations have differing behavior for extended ASCII accented characters. I wrote a program to spit out characters for which the tolower() return value is different from the input: glibc tolower: 65:A 66:B 67:C 68:D 69:E 70:F 71:G 72:H 73:I 74:J 75:K 76:L 77:M 78:N 79:O 80:P 81:Q 82:R 83:S 84:T 85:U 86:V 87:W 88:X 89:Y 90:Z kernel tolower: 65:A 66:B 67:C 68:D 69:E 70:F 71:G 72:H 73:I 74:J 75:K 76:L 77:M 78:N 79:O 80:P 81:Q 82:R 83:S 84:T 85:U 86:V 87:W 88:X 89:Y 90:Z 192:À 193:Á 194:Â 195:Ã 196:Ä 197:Å 198:Æ 199:Ç 200:È 201:É 202:Ê 203:Ë 204:Ì 205:Í 206:Î 207:Ï 208:Ð 209:Ñ 210:Ò 211:Ó 212:Ô 213:Õ 214:Ö 215:× 216:Ø 217:Ù 218:Ú 219:Û 220:Ü 221:Ý 222:Þ Which means that the kernel and userspace do not agree on the hash value for a directory filename that contains those higher values. The hash values are written into the leaf index block of directories that are larger than two blocks in size, which means that xfs_repair will flag these directories as having corrupted hash indexes and rewrite the index with hash values that the kernel now will not recognize. Because the ascii-ci feature is not frequently enabled and the kernel touches filesystems far more frequently than xfs_repair does, fix this by encoding the kernel's toupper predicate and tolower functions into libxfs. Give the new functions less provocative names to make it really obvious that this is a pre-hash name preparation function, and nothing else. This change makes userspace's behavior consistent with the kernel. Found by auditing obfuscate_name in xfs_metadump as part of working on parent pointers, wondering how it could possibly work correctly with ci filesystems, writing a test tool to create a directory with hash-colliding names, and watching xfs_repair flag it. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 4f5e304248ab4939e9aef58244041c194f01f0b5 Author: Darrick J. Wong Date: Tue Apr 11 19:00:39 2023 -0700 xfs: cross-reference rmap records with refcount btrees Strengthen the rmap btree record checker a little more by comparing OWN_REFCBT reverse mappings against the refcount btrees. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 0abe6fc53bdb10a5b0b5235043ca1acc749fe069 Author: Darrick J. Wong Date: Tue Apr 11 19:00:39 2023 -0700 xfs: cross-reference rmap records with inode btrees Strengthen the rmap btree record checker a little more by comparing OWN_INOBT reverse mappings against the inode btrees. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 3a3108ea8c1d4f33ca49fa9fc80e6a6e450654cf Author: Darrick J. Wong Date: Tue Apr 11 19:00:38 2023 -0700 xfs: cross-reference rmap records with free space btrees Strengthen the rmap btree record checker a little more by comparing OWN_AG reverse mappings against the free space btrees, the rmap btree, and the AGFL. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit fed050f3452da070fa90fc1b02c2bc2219d687a7 Author: Darrick J. Wong Date: Tue Apr 11 19:00:38 2023 -0700 xfs: cross-reference rmap records with ag btrees Strengthen the rmap btree record checker a little more by comparing OWN_FS and OWN_LOG reverse mappings against the AG headers and internal logs, respectively. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit a47bd1e0e690d0296c3e48fc3d6f2d359c222d6c Author: Darrick J. Wong Date: Tue Apr 11 19:00:37 2023 -0700 xfs: introduce bitmap type for AG blocks Create a typechecked bitmap for extents within an AG. Online repair uses bitmaps to store various different types of numbers, so let's make it obvious when we're storing xfs_agblock_t (and later xfs_fsblock_t) versus anything else. In subsequent patches, we're going to use agblock bitmaps to enhance the rmapbt checker to look for discrepancies between the rmapbt records and AG metadata block usage. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 6772fcc8890ae34595253fcfb8196c1aea65e111 Author: Darrick J. Wong Date: Tue Apr 11 19:00:36 2023 -0700 xfs: convert xbitmap to interval tree Convert the xbitmap code to use interval trees instead of linked lists. This reduces the amount of coding required to handle the disunion operation and in the future will make it easier to set bits in arbitrary order yet later be able to extract maximally sized extents, which we'll need for rebuilding certain structures. We define our own interval tree type so that it can deal with 64-bit indices even on 32-bit machines. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 7296a6d6fb8fef515352dac5d8af2ffe7a78e5cf Author: Darrick J. Wong Date: Tue Apr 11 19:00:36 2023 -0700 xfs: drop the _safe behavior from the xbitmap foreach macro It's not safe to edit bitmap intervals while we're iterating them with for_each_xbitmap_extent. None of the existing callers actually need that ability anyway, so drop the safe variable. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 44af6c7e59b12d740809cf25a60c9f90f03e6d20 Author: Darrick J. Wong Date: Tue Apr 11 19:00:35 2023 -0700 xfs: don't load local xattr values during scrub Local extended attributes store their values within the same leaf block. There's no header for the values themselves, nor are they separately checksummed. Hence we can save a bit of time in the attr scrubber by not wasting time retrieving the values. Regrettably, shortform attributes do not set XFS_ATTR_LOCAL so this offers us no advantage there, but at least there are very few attrs in that case. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 178b48d588ea5424a54423dc9c406416de0547c8 Author: Darrick J. Wong Date: Tue Apr 11 19:00:35 2023 -0700 xfs: remove the for_each_xbitmap_ helpers Remove the for_each_xbitmap_ macros in favor of proper iterator functions. We'll soon be switching this data structure over to an interval tree implementation, which means that we can't allow callers to modify the bitmap during iteration without telling us. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 674f0d0dc6b5b2228c4e9d597a62d5aa6b54a9c5 Author: Darrick J. Wong Date: Tue Apr 11 19:00:34 2023 -0700 xfs: only allocate free space bitmap for xattr scrub if needed The free space bitmap is only required if we're going to check the bestfree space at the end of an xattr leaf block. Therefore, we can reduce the memory requirements of this scrubber if we can determine that the xattr is in short format. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 6cee51e6d02bac7ee72969aa23e32c9bdcd7bb6e Author: Darrick J. Wong Date: Tue Apr 11 19:00:34 2023 -0700 xfs: clean up xattr scrub initialization Clean up local variable initialization and error returns in xchk_xattr. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit ae0506eba78fd1d6236b46ca5aa089c8fc6050cf Author: Darrick J. Wong Date: Tue Apr 11 19:00:33 2023 -0700 xfs: check used space of shortform xattr structures Make sure that the records used inside a shortform xattr structure do not overlap. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 5b02a3e8391c703638c5a97513c353aa0c3fd5b0 Author: Darrick J. Wong Date: Tue Apr 11 19:00:32 2023 -0700 xfs: move xattr scrub buffer allocation to top level function Move the xchk_setup_xattr_buf call from xchk_xattr_block to xchk_xattr, since we only need to set up the leaf block bitmaps once. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit f58977edc0b50bf6aee5a63bff34581b22b2ce63 Author: Darrick J. Wong Date: Tue Apr 11 19:00:32 2023 -0700 xfs: remove flags argument from xchk_setup_xattr_buf All callers pass XCHK_GFP_FLAGS as the flags argument to xchk_setup_xattr_buf, so get rid of the argument. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit b996c9a80664b970b73961c83bede243b999341e Author: Darrick J. Wong Date: Tue Apr 11 19:00:31 2023 -0700 xfs: split valuebuf from xchk_xattr_buf.buf Move the xattr value buffer from somewhere in xchk_xattr_buf.buf[] to an explicit pointer. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 80069284b5eb63e48bc7cb9d4bd179711ae6e77a Author: Darrick J. Wong Date: Tue Apr 11 19:00:31 2023 -0700 xfs: split usedmap from xchk_xattr_buf.buf Move the used space bitmap from somewhere in xchk_xattr_buf.buf[] to an explicit pointer. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 91781ff549379a867d8fbe588a4c95f6598b1fa9 Author: Darrick J. Wong Date: Tue Apr 11 19:00:30 2023 -0700 xfs: split freemap from xchk_xattr_buf.buf Move the free space bitmap from somewhere in xchk_xattr_buf.buf[] to an explicit pointer. This is the start of removing the complex overloaded memory buffer that is the source of weird memory misuse bugs. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 4cb76025208925f697de66ac4d2d821cafabd367 Author: Darrick J. Wong Date: Tue Apr 11 19:00:30 2023 -0700 xfs: remove unnecessary dstmap in xattr scrubber Replace bitmap_and with bitmap_intersects in the xattr leaf block scrubber, since we only care if there's overlap between the used space bitmap and the free space bitmap. This means we don't need dstmap any more, and can thus reduce the memory requirements. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit ee366fe4f519f0739a2c62cf998f58932e77c6a9 Author: Darrick J. Wong Date: Tue Apr 11 19:00:29 2023 -0700 xfs: don't shadow @leaf in xchk_xattr_block Don't shadow the leaf variable here, because it's misleading to have one place in the codebase where two variables with different types have the same name. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit c12ad41468a5f4112b98566dcb1ee9096579106a Author: Darrick J. Wong Date: Tue Apr 11 19:00:29 2023 -0700 xfs: xattr scrub should ensure one namespace bit per name Check that each extended attribute exists in only one namespace. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 1c1646afc96783702f92356846d6e47e0bbd6b11 Author: Darrick J. Wong Date: Tue Apr 11 19:00:28 2023 -0700 xfs: check for reverse mapping records that could be merged Enhance the rmap scrubber to flag adjacent records that could be merged. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 29ab991b4fe9df3cb6f943bea9e256fbdfa93589 Author: Darrick J. Wong Date: Tue Apr 11 19:00:27 2023 -0700 xfs: check overlapping rmap btree records The rmap btree scrubber doesn't contain sufficient checking for records that cannot overlap but do anyway. For the other btrees, this is enforced by the inorder checks in xchk_btree_rec, but the rmap btree is special because it allows overlapping records to handle shared data extents. Therefore, enhance the rmap btree record check function to compare each record against the previous one so that we can detect overlapping rmap records for space allocations that do not allow sharing. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit db0502b39c21d1cab6b6778a416a5b407170be90 Author: Darrick J. Wong Date: Tue Apr 11 19:00:27 2023 -0700 xfs: flag refcount btree records that could be merged Complain if we encounter refcount btree records that could be merged. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 1e59fdb7d6157ff685a250e0873a015a2b16a4f2 Author: Darrick J. Wong Date: Tue Apr 11 19:00:26 2023 -0700 xfs: don't call xchk_bmap_check_rmaps for btree-format file forks The logic at the end of xchk_bmap_want_check_rmaps tries to detect a file fork that has been zapped by what will become the online inode repair code. Zapped forks are in FMT_EXTENTS with zero extents, and some sort of hint that there's supposed to be data somewhere in the filesystem. Unfortunately, the inverted logic here is confusing and has the effect that we always call xchk_bmap_check_rmaps for FMT_BTREE forks. This is horribly inefficient and unnecessary, so invert the logic to get rid of this performance problem. This has caused 8h delays in generic/333 and generic/334. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit d5784ae82778d94a18aba25ccbddc16f8ae13001 Author: Darrick J. Wong Date: Tue Apr 11 19:00:26 2023 -0700 xfs: flag free space btree records that could be merged Complain if we encounter free space btree records that could be merged. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit e8882f69b941b20704ea509ebfca2d8a123ad6e3 Author: Darrick J. Wong Date: Tue Apr 11 19:00:25 2023 -0700 xfs: split the xchk_bmap_check_rmaps into a predicate This function has two parts: the second part scans every reverse mapping record for this file fork to make sure that there's a corresponding mapping in the fork, and the first part decides if we even want to do that. Split the first part into a separate predicate so that we can make more changes to it in the next patch. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 336642f79283715e4535bfaa05f5593dd91da6e8 Author: Darrick J. Wong Date: Tue Apr 11 19:00:25 2023 -0700 xfs: alert the user about data/attr fork mappings that could be merged If the data or attr forks have mappings that could be merged, let the user know that the structure could be optimized. This isn't a filesystem corruption since the regular filesystem does not try to be smart about merging bmbt records. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit c0d5a92f7aaf41b1ab70869358d534757b569a1f Author: Darrick J. Wong Date: Tue Apr 11 19:00:24 2023 -0700 xfs: split xchk_bmap_xref_rmap into two functions There's more special-cased functionality than not in this function. Split it into two so that each can be far more cohesive. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 634d4a79e76691020ba73f50416da37a30779e9e Author: Darrick J. Wong Date: Tue Apr 11 19:00:24 2023 -0700 xfs: accumulate iextent records when checking bmap Currently, the bmap scrubber checks file fork mappings individually. In the case that the file uses multiple mappings to a single contiguous piece of space, the scrubber repeatedly locks the AG to check the existence of a reverse mapping that overlaps this file mapping. If the reverse mapping starts before or ends after the mapping we're checking, it will also crawl around in the bmbt checking correspondence for adjacent extents. This is not very time efficient because it does the crawling while holding the AGF buffer, and checks the middle mappings multiple times. Instead, create a custom iextent record iterator function that combines multiple adjacent allocated mappings into one large incore bmbt record. This is feasible because the incore bmbt record length is 64-bits wide. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 971ee3a6706abf1074349c124922e4e4d513fa45 Author: Darrick J. Wong Date: Tue Apr 11 19:00:23 2023 -0700 xfs: change bmap scrubber to store the previous mapping Convert the inode data/attr/cow fork scrubber to remember the entire previous mapping, not just the next expected offset. No behavior changes here, but this will enable some better checking in subsequent patches. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 1fc7a0597d237c17b6501f8c33b76d3eaaae9079 Author: Darrick J. Wong Date: Tue Apr 11 19:00:22 2023 -0700 xfs: don't take the MMAPLOCK when scrubbing file metadata The MMAPLOCK stabilizes mappings in a file's pagecache. Therefore, we do not need it to check directories, symlinks, extended attributes, or file-based metadata. Reduce its usage to the one case that requires it, which is when we want to scrub the data fork of a regular file. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 38bb13108479f5cac955bb291ea6aa6d24268f4f Author: Darrick J. Wong Date: Tue Apr 11 19:00:22 2023 -0700 xfs: retain the AGI when we can't iget an inode to scrub the core xchk_get_inode is not quite the right function to be calling from the inode scrubber setup function. The common get_inode function either gets an inode and installs it in the scrub context, or it returns an error code explaining what happened. This is acceptable for most file scrubbers because it is not in their scope to fix corruptions in the inode core and fork areas that cause iget to fail. Dealing with these problems is within the scope of the inode scrubber, however. If iget fails with EFSCORRUPTED, we need to xchk_inode to flag that as corruption. Since we can't get our hands on an incore inode, we need to hold the AGI to prevent inode allocation activity so that nothing changes in the inode metadata. Looking ahead to the inode core repair patches, we will also need to hold the AGI buffer into xrep_inode so that we can make modifications to the xfs_dinode structure without any other thread swooping in to allocate or free the inode. Adapt the xchk_get_inode into xchk_setup_inode since this is a one-off use case where the error codes we check for are a little different, and the return state is much different from the common function. xchk_setup_inode prepares to check or repair an inode record, so it must continue the scrub operation even if the inode/inobt verifiers cause xfs_iget to return EFSCORRUPTED. This is done by attaching the locked AGI buffer to the scrub transaction and returning 0 to move on to the actual scrub. (Later, the online inode repair code will also want the xfs_imap structure so that it can reset the ondisk xfs_dinode structure.) xchk_get_inode retrieves an inode on behalf of a scrubber that operates on an incore inode -- data/attr/cow forks, directories, xattrs, symlinks, parent pointers, etc. If the inode/inobt verifiers fail and xfs_iget returns EFSCORRUPTED, we want to exit to userspace (because the caller should be fix the inode first) and drop everything we acquired along the way. A behavior common to both functions is that it's possible that xfs_scrub asked for a scrub-by-handle concurrent with the inode being freed or the passed-in inumber is invalid. In this case, we call xfs_imap to see if the inobt index thinks the inode is allocated, and return ENOENT ("nothing to check here") to userspace if this is not the case. The imap lookup is why both functions call xchk_iget_agi. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 46e0dd89659923dd02cfa45080675fc4f0926528 Author: Darrick J. Wong Date: Tue Apr 11 19:00:21 2023 -0700 xfs: rename xchk_get_inode -> xchk_iget_for_scrubbing Dave Chinner suggested renaming this function to make more obvious what it does. The function returns an incore inode to callers that want to scrub a metadata structure that hangs off an inode. If the iget fails with EINVAL, it will single-step the loading process to distinguish between actually free inodes or impossible inumbers (ENOENT); discrepancies between the inobt freemask and the free status in the inode record (EFSCORRUPTED). Any other negative errno is returned unchanged. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 302436c27c3fc61c1dab83f4c995dec12eb43161 Author: Darrick J. Wong Date: Tue Apr 11 19:00:21 2023 -0700 xfs: fix an inode lookup race in xchk_get_inode In commit d658e, we tried to improve the robustnes of xchk_get_inode in the face of EINVAL returns from iget by calling xfs_imap to see if the inobt itself thinks that the inode is allocated. Unfortunately, that commit didn't consider the possibility that the inode gets allocated after iget but before imap. In this case, the imap call will succeed, but we turn that into a corruption error and tell userspace the inode is corrupt. Avoid this false corruption report by grabbing the AGI header and retrying the iget before calling imap. If the iget succeeds, we can proceed with the usual scrub-by-handle code. Fix all the incorrect comments too, since unreadable/corrupt inodes no longer result in EINVAL returns. Fixes: d658e72b4a09 ("xfs: distinguish between corrupt inode and invalid inum in xfs_scrub_get_inode") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 0916056eba4fd816f8042a3960597c316ea10256 Author: Darrick J. Wong Date: Tue Apr 11 19:00:20 2023 -0700 xfs: fix parent pointer scrub racing with subdirectory reparenting Jan Kara pointed out that rename() doesn't lock a subdirectory that is being moved from one parent to another, even though the move requires an update to the subdirectory's dotdot entry. This means that it's *not* sufficient to hold a directory's IOLOCK to stabilize the dotdot entry. We must hold the ILOCK of both the child and the alleged parent, and there's no use in holding the parent's IOLOCK. With that in mind, we can get rid of all the messy code that tries to grab the parent's IOLOCK, which means we don't need to let go of the ILOCK of the directory whose parent we are checking. We still have to use nonblocking mode to take the ILOCK of the alleged parent, so the revalidation loop has to stay. However, we can remove the retry counter, since threads aren't supposed to hold the ILOCK for long periods of time. Remove the inverted ilock helper from the common code since nobody uses it. Remove the entire source of -EDEADLOCK-based "retry harder" scrub executions. Link: https://lore.kernel.org/linux-xfs/20230117123735.un7wbamlbdihninm@quack3/ Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit a03297a0ca9f21800c9b88028a3722715b2eb5ba Author: Darrick J. Wong Date: Tue Apr 11 19:00:20 2023 -0700 xfs: manage inode DONTCACHE status at irele time Right now, there are statements scattered all over the online fsck codebase about how we can't use XFS_IGET_DONTCACHE because of concerns about scrub's unusual practice of releasing inodes with transactions held. However, iget is the wrong place to handle this -- the DONTCACHE state doesn't matter at all until we try to *release* the inode, and here we get things wrong in multiple ways: First, if we /do/ have a transaction, we must NOT drop the inode, because the inode could have dirty pages, dropping the inode will trigger writeback, and writeback can trigger a nested transaction. Second, if the inode already had an active reference and the DONTCACHE flag set, the icache hit when scrub grabs another ref will not clear DONTCACHE. This is sort of by design, since DONTCACHE is now used to initiate cache drops so that sysadmins can change a file's access mode between pagecache and DAX. Third, if we do actually have the last active reference to the inode, we can set DONTCACHE to avoid polluting the cache. This is the /one/ case where we actually want that flag. Create an xchk_irele helper to encode all that logic and switch the online fsck code to use it. Since this now means that nearly all scrubbers use the same xfs_iget flags, we can wrap them too. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit b049962c0f6eb6fb17e8294721f948285a44a672 Author: Darrick J. Wong Date: Tue Apr 11 19:00:19 2023 -0700 xfs: simplify xchk_parent_validate This function is unnecessarily long because it contains code to revalidate a dotdot entry after cycling locks to try to confirm a subdirectory parent pointer. Shorten the codebase by making the parent's lookup call do double duty as the revalidation code. This weakeans the efficacy of this scrub function temporarily, but the next patch will resolve this as part of fixing an unhandled race that is the result of the VFS rename locking model not working the way Darrick thought it did. Rename this stupid 'dnum' variable too. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit cbab28f4c0719c956fa7b83613a3591c361126c7 Author: Darrick J. Wong Date: Tue Apr 11 19:00:19 2023 -0700 xfs: remove xchk_parent_count_parent_dentries This helper is now trivial, so get rid of it. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 6bb9209ceebb07fd07cec25af04eed1809c654de Author: Darrick J. Wong Date: Tue Apr 11 19:00:18 2023 -0700 xfs: always check the existence of a dirent's child inode When we're scrubbing directory entries, we always need to iget the child inode to make sure that the inode pointer points to a valid inode. The original directory scrub code (commit a5c4) only set us up to do this for ftype=1 filesystems, which is not sufficient; and then commit 4b80 made it worse by exempting the dot and dotdot entries. Sorta-fixes: a5c46e5e8912 ("xfs: scrub directory metadata") Sorta-fixes: 4b80ac64450f ("xfs: scrub should mark a directory corrupt if any entries cannot be iget'd") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit d9a94480f978d5fbf1235a12a476f9f39a029ea5 Author: Darrick J. Wong Date: Tue Apr 11 19:00:17 2023 -0700 xfs: xfs_iget in the directory scrubber needs to use UNTRUSTED In commit 4b80ac64450f, we tried to strengthen the directory scrubber by using the iget call to detect directory entries that point to unallocated inodes. Unfortunately, that commit neglected to pass XFS_IGET_UNTRUSTED to xfs_iget, so we don't check the inode btree first. If the inode number points to something that isn't even an inode cluster, iget will throw corruption errors and return -EFSCORRUPTED, which means that we fail to mark the directory corrupt. Fixes: 4b80ac64450f ("xfs: scrub should mark a directory corrupt if any entries cannot be iget'd") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 4c233b5c4f29dff11eeb64b2b1cc0831b9904a4f Author: Darrick J. Wong Date: Tue Apr 11 19:00:17 2023 -0700 xfs: streamline the directory iteration code for scrub Currently, online scrub reuses the xfs_readdir code to walk every entry in a directory. This isn't awesome for performance, since we end up cycling the directory ILOCK needlessly and coding around the particular quirks of the VFS dir_context interface. Create a streamlined version of readdir that keeps the ILOCK (since the walk function isn't going to copy stuff to userspace), skips a whole lot of directory walk cursor checks (since we start at 0 and walk to the end) and has a sane way to return error codes. Note: Porting the dotdot checking code is left for a subsequent patch. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 30f8ee5e7e0ccce396dff209c6cbce49d0d7e167 Author: Darrick J. Wong Date: Tue Apr 11 19:00:16 2023 -0700 xfs: ensure that single-owner file blocks are not owned by others For any file fork mapping that can only have a single owner, make sure that there are no other rmap owners for that mapping. This patch requires the more detailed checking provided by xfs_rmap_count_owners so that we can know how many rmap records for a given range of space had a matching owner, how many had a non-matching owner, and how many conflicted with the records that have a matching owner. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 9dceccc5822f2ecea12a89f24d7cad1f3e5eab7c Author: Darrick J. Wong Date: Tue Apr 11 19:00:16 2023 -0700 xfs: use the directory name hash function for dir scrubbing The directory code has a directory-specific hash computation function that includes a modified hash function for case-insensitive lookups. Hence we must use that function (and not the raw da_hashname) when checking the dabtree structure. Found by accidentally breaking xfs/188 to create an abnormally huge case-insensitive directory and watching scrub break. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit efc0845f5d3e253f7f46a60b66a94c3164d76ee3 Author: Darrick J. Wong Date: Tue Apr 11 19:00:15 2023 -0700 xfs: convert xfs_ialloc_has_inodes_at_extent to return keyfill scan results Convert the xfs_ialloc_has_inodes_at_extent function to return keyfill scan results because for a given range of inode numbers, we might have no indexed inodes at all; the entire region might be allocated ondisk inodes; or there might be a mix of the two. Unfortunately, sparse inodes adds to the complexity, because each inode record can have holes, which means that we cannot use the generic btree _scan_keyfill function because we must look for holes in individual records to decide the result. On the plus side, online fsck can now detect sub-chunk discrepancies in the inobt. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 69115f775f6e8e972a40aa6aa1523bcb0b252b1c Author: Darrick J. Wong Date: Tue Apr 11 19:00:15 2023 -0700 xfs: teach scrub to check for sole ownership of metadata objects Strengthen online scrub's checking even further by enabling us to check that a range of blocks are owned solely by a given owner. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit bc0f3b55467e1b5833bebae011a07e72a35afc2e Author: Darrick J. Wong Date: Tue Apr 11 19:00:14 2023 -0700 xfs: directly cross-reference the inode btrees with each other Improve the cross-referencing of the two inode btrees by directly checking the free and hole state of each inode with the other btree. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit c01868b60e8c19888572f90fd3426c0652c0e2a9 Author: Darrick J. Wong Date: Tue Apr 11 19:00:13 2023 -0700 xfs: clean up broken eearly-exit code in the inode btree scrubber Corrupt inode chunks should cause us to exit early after setting the CORRUPT flag on the scrub state. While we're at it, collapse trivial helpers. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit cc1207662d1a08e253520654e956f5e699826caa Author: Darrick J. Wong Date: Tue Apr 11 19:00:13 2023 -0700 xfs: remove pointless shadow variable from xfs_difree_inobt In xfs_difree_inobt, the pag passed in was previously used to look up the AGI buffer. There's no need to extract it again, so remove the shadow variable and shut up -Wshadow. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 7ac14fa2bd22e99a06ae16382b394f697cfe2b8a Author: Darrick J. Wong Date: Tue Apr 11 19:00:12 2023 -0700 xfs: ensure that all metadata and data blocks are not cow staging extents Make sure that all filesystem metadata blocks and file data blocks are not also marked as CoW staging extents. The extra checking added here was inspired by an actual VM host filesystem corruption incident due to bugs in the CoW handling of 4.x kernels. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Dave Chinner commit 7ad9ea6398feae3ae4ce79fe08457f93b79a9a43 Author: Darrick J. Wong Date: Tue Apr 11 19:00:12 2023 -0700 xfs: check the reference counts of gaps in the refcount btree Gaps in the reference count btree are also significant -- for these regions, there must not be any overlapping reverse mappings. We don't currently check this, so make the refcount scrubber more complete. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Dave Chinner commit 4a200a0978288f919aba3f015f374f6ed279e658 Author: Darrick J. Wong Date: Tue Apr 11 19:00:11 2023 -0700 xfs: implement masked btree key comparisons for _has_records scans For keyspace fullness scans, we want to be able to mask off the parts of the key that we don't care about. For most btree types we /do/ want the full keyspace, but for checking that a given space usage also has a full complement of rmapbt records (even if different/multiple owners) we need this masking so that we only track sparseness of rm_startblock, not the whole keyspace (which is extremely sparse). Augment the ->diff_two_keys and ->keys_contiguous helpers to take a third union xfs_btree_key argument, and wire up xfs_rmap_has_records to pass this through. This third "mask" argument should contain a nonzero value in each structure field that should be used in the key comparisons done during the scan. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 6abc7aef85b1f42cb39a3149f4ab64ca255e41e6 Author: Darrick J. Wong Date: Tue Apr 11 19:00:10 2023 -0700 xfs: replace xfs_btree_has_record with a general keyspace scanner The current implementation of xfs_btree_has_record returns true if it finds /any/ record within the given range. Unfortunately, that's not sufficient for scrub. We want to be able to tell if a range of keyspace for a btree is devoid of records, is totally mapped to records, or is somewhere in between. By forcing this to be a boolean, we conflated sparseness and fullness, which caused scrub to return incorrect results. Fix the API so that we can tell the caller which of those three is the current state. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit bd7e795108ccd8d0f3dc34e16957cbba7e89f342 Author: Darrick J. Wong Date: Tue Apr 11 19:00:10 2023 -0700 xfs: refactor ->diff_two_keys callsites Create wrapper functions around ->diff_two_keys so that we don't have to remember what the return values mean, and adjust some of the code comments to reflect the longtime code behavior. We're going to introduce more uses of ->diff_two_keys in the next patch, so reduce the cognitive load for readers by doing this refactoring now. Suggested-by: Dave Chinner Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 2bea8df0a52b05bc0dddd54e950ae37c83533b03 Author: Darrick J. Wong Date: Tue Apr 11 19:00:09 2023 -0700 xfs: always scrub record/key order of interior records In commit d47fef9342d0, we removed the firstrec and firstkey fields of struct xchk_btree because Christoph thought they were unnecessary because we could use the record index in the btree cursor. This is incorrect because bc_ptrs (now bc_levels[].ptr) tracks the cursor position within a specific btree block, not within the entire level. The end result is that scrub no longer detects situations where the rightmost record of a block is identical to the leftmost record of that block's right sibling. Fix this regression by reintroducing record validity booleans so that order checking skips *only* the leftmost record/key in each level. Fixes: d47fef9342d0 ("xfs: don't track firstrec/firstkey separately in xchk_btree") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit ee5fe8ff6d19b35e7547af789cba877dbf04517b Author: Darrick J. Wong Date: Tue Apr 11 19:00:09 2023 -0700 xfs: refactor converting btree irec to btree key We keep doing these conversions to support btree queries, so refactor this into a helper. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Dave Chinner commit c99f99fa3eafc824ea6859590f5d2e4c6a7f4359 Author: Darrick J. Wong Date: Tue Apr 11 19:00:08 2023 -0700 xfs: check btree keys reflect the child block When scrub is checking a non-root btree block, it should make sure that the keys in the parent btree block accurately capture the keyspace that the child block stores. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Dave Chinner commit 38384569a2a8a721623d80c5ae3bcf80614ab792 Author: Darrick J. Wong Date: Tue Apr 11 19:00:07 2023 -0700 xfs: detect unwritten bit set in rmapbt node block keys In the last patch, we changed the rmapbt code to remove the UNWRITTEN bit when creating an rmapbt key from an rmapbt record, and we changed the rmapbt key comparison code to start considering the ATTR and BMBT flags during lookup. This brought the behavior of the rmapbt implementation in line with its specification. However, there may exist filesystems that have the unwritten bit still set in the rmapbt keys. We should detect these situations and flag the rmapbt as one that would benefit from optimization. Eventually, online repair will be able to do something in response to this. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 08c987deca56687c0930f308f5148ef1af38dc14 Author: Darrick J. Wong Date: Tue Apr 11 19:00:07 2023 -0700 xfs: fix rm_offset flag handling in rmap keys Keys for extent interval records in the reverse mapping btree are supposed to be computed as follows: (physical block, owner, fork, is_btree, offset) This provides users the ability to look up a reverse mapping from a file block mapping record -- start with the physical block; then if there are multiple records for the same block, move on to the owner; then the inode fork type; and so on to the file offset. Unfortunately, the code that creates rmap lookup keys from rmap records forgot to mask off the record attribute flags, leading to ondisk keys that look like this: (physical block, owner, fork, is_btree, unwritten state, offset) Fortunately, this has all worked ok for the past six years because the key comparison functions incorrectly ignore the fork/bmbt/unwritten information that's encoded in the on-disk offset. This means that lookup comparisons are only done with: (physical block, owner, offset) Queries can (theoretically) return incorrect results because of this omission. On consistent filesystems this isn't an issue because xattr and bmbt blocks cannot be shared and hence the comparisons succeed purely on the contents of the rm_startblock field. For the one case where we support sharing (written data fork blocks) all flag bits are zero, so the omission in the comparison has no ill effects. Unfortunately, this bug prevents scrub from detecting incorrect fork and bmbt flag bits in the rmap btree, so we really do need to fix the compare code. Old filesystems with the unwritten bit erroneously set in the rmap key struct will work fine on new kernels since we still ignore the unwritten bit. New filesystems on older kernels will work fine since the old kernels never paid attention to the unwritten bit. A previous version of this patch forgot to keep the (un)written state flag masked during the comparison and caused a major regression in 5.9.x since unwritten extent conversion can update an rmap record without requiring key updates. Note that blocks cannot go directly from data fork to attr fork without being deallocated and reallocated, nor can they be added to or removed from a bmbt without a free/alloc cycle, so this should not cause any regressions. Found by fuzzing keys[1].attrfork = ones on xfs/371. Fixes: 4b8ed67794fe ("xfs: add rmap btree operations") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit de1a9ce225e93b22d189f8ffbce20074bc803121 Author: Darrick J. Wong Date: Tue Apr 11 19:00:06 2023 -0700 xfs: hoist inode record alignment checks from scrub Move the inobt record alignment checks from xchk_iallocbt_rec into xfs_inobt_check_irec so that they are applied everywhere. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit e774b2ea0bb130d00e3cb1c29cd91028d0c0c83d Author: Darrick J. Wong Date: Tue Apr 11 19:00:06 2023 -0700 xfs: hoist rmap record flag checks from scrub Move the rmap record flag checks from xchk_rmapbt_rec into xfs_rmap_check_irec so that they are applied everywhere. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 6a3bd8fcf9afb47c703cb268f30f60aa2e7af86a Author: Darrick J. Wong Date: Tue Apr 11 19:00:05 2023 -0700 xfs: complain about bad file mapping records in the ondisk bmbt Similar to what we've just done for the other btrees, create a function to log corrupt bmbt records and call it whenever we encounter a bad record in the ondisk btree. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 7d7d6d2fd0444904f12e70d9c930556c4eb44337 Author: Darrick J. Wong Date: Tue Apr 11 19:00:05 2023 -0700 xfs: hoist rmap record flag checks from scrub Move the rmap record flag checks from xchk_rmapbt_rec into xfs_rmap_check_irec so that they are applied everywhere. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit ee12eaaa435a7be17152ac50943ee77249de624a Author: Darrick J. Wong Date: Tue Apr 11 19:00:04 2023 -0700 xfs: complain about bad records in query_range helpers For every btree type except for the bmbt, refactor the code that complains about bad records into a helper and make the ->query_range helpers call it so that corruptions found via that avenue are logged. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 69010fe3ac1fe9932a64268c32b67964fe5c06a8 Author: Darrick J. Wong Date: Tue Apr 11 19:00:04 2023 -0700 xfs: standardize ondisk to incore conversion for bmap btrees Fix all xfs_bmbt_disk_get_all callsites to call xfs_bmap_validate_extent and bubble up corruption reports. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit c4e34172da26cb57f56c471728853d3a428ec832 Author: Darrick J. Wong Date: Tue Apr 11 19:00:03 2023 -0700 xfs: standardize ondisk to incore conversion for rmap btrees Create a xfs_rmap_check_irec function to detect corruption in btree records. Fix all xfs_rmap_btrec_to_irec callsites to call the new helper and bubble up corruption reports. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 39ab26d59f039c6190bbaa8118a8f0ffed84492a Author: Darrick J. Wong Date: Tue Apr 11 19:00:02 2023 -0700 xfs: return a failure address from xfs_rmap_irec_offset_unpack Currently, xfs_rmap_irec_offset_unpack returns only 0 or -EFSCORRUPTED. Change this function to return the code address of a failed conversion in preparation for the next patch, which standardizes localized record checking and reporting code. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 2b30cc0bf0589d1ea0506c019b9b81de77535c87 Author: Darrick J. Wong Date: Tue Apr 11 19:00:02 2023 -0700 xfs: standardize ondisk to incore conversion for refcount btrees Create a xfs_refcount_check_irec function to detect corruption in btree records. Fix all xfs_refcount_btrec_to_irec callsites to call the new helper and bubble up corruption reports. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 366a0b8d49c3a7edcb5331f254af195716ba4bdf Author: Darrick J. Wong Date: Tue Apr 11 19:00:01 2023 -0700 xfs: standardize ondisk to incore conversion for inode btrees Create a xfs_inobt_check_irec function to detect corruption in btree records. Fix all xfs_inobt_btrec_to_irec callsites to call the new helper and bubble up corruption reports. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 35e3b9a11740b53387e7af151768c13700f80696 Author: Darrick J. Wong Date: Tue Apr 11 19:00:01 2023 -0700 xfs: standardize ondisk to incore conversion for free space btrees Create a xfs_alloc_btrec_to_irec function to convert an ondisk record to an incore record, and a xfs_alloc_check_irec function to detect corruption. Replace all the open-coded logic with calls to the new helpers and bubble up corruption reports. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 88accf17226733088923635b580779a3c86b6f23 Author: Darrick J. Wong Date: Tue Apr 11 19:00:00 2023 -0700 xfs: scrub should use ECHRNG to signal that the drain is needed In the previous patch, we added jump labels to the intent drain code so that regular filesystem operations need not pay the price of checking for someone (scrub) waiting on intents to drain from some part of the filesystem when that someone isn't running. However, I observed that xfs/285 now spends a lot more time pushing the AIL from the inode btree scrubber than it used to. This is because the inobt scrubber will try push the AIL to try to get logged inode cores written to the filesystem when it sees a weird discrepancy between the ondisk inode and the inobt records. This AIL push is triggered when the setup function sees TRY_HARDER is set; and the requisite EDEADLOCK return is initiated when the discrepancy is seen. The solution to this performance slow down is to use a different result code (ECHRNG) for scrub code to signal that it needs to wait for deferred intent work items to drain out of some part of the filesystem. When this happens, set a new scrub state flag (XCHK_NEED_DRAIN) so that setup functions will activate the jump label. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 466c525d6d35e69115852c004f405f0711b8f91a Author: Darrick J. Wong Date: Tue Apr 11 18:59:59 2023 -0700 xfs: minimize overhead of drain wakeups by using jump labels To reduce the runtime overhead even further when online fsck isn't running, use a static branch key to decide if we call wake_up on the drain. For compilers that support jump labels, the call to wake_up is replaced by a nop sled when nobody is waiting for intents to drain. From my initial microbenchmarking, every transition of the static key between the on and off states takes about 22000ns to complete; this is paid entirely by the xfs_scrub process. When the static key is off (which it should be when fsck isn't running), the nop sled adds an overhead of approximately 0.36ns to runtime code. The post-atomic lockless waiter check adds about 0.03ns, which is basically free. For the few compilers that don't support jump labels, runtime code pays the cost of calling wake_up on an empty waitqueue, which was observed to be about 30ns. However, most architectures that have sufficient memory and CPU capacity to run XFS also support jump labels, so this is not much of a worry. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 3f64c718d06eae168208faaadb522007e0048e7b Author: Darrick J. Wong Date: Tue Apr 11 18:59:59 2023 -0700 xfs: clean up scrub context if scrub setup returns -EDEADLOCK It has been a longstanding convention that online scrub and repair functions can return -EDEADLOCK to signal that they weren't able to obtain some necessary resource. When this happens, the scrub framework is supposed to release all resources attached to the scrub context, set the TRY_HARDER flag in the scrub context flags, and try again. In this context, individual scrub functions are supposed to take all the resources they (incorrectly) speculated were not necessary. We're about to make it so that the functions that lock and wait for a filesystem AG can also return EDEADLOCK to signal that we need to try again with the drain waiters enabled. Therefore, refactor xfs_scrub_metadata to support this behavior for ->setup() functions. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit d5c88131dbf01a30a222ad82d58e0c21a15f0d8e Author: Darrick J. Wong Date: Tue Apr 11 18:59:58 2023 -0700 xfs: allow queued AG intents to drain before scrubbing When a writer thread executes a chain of log intent items, the AG header buffer locks will cycle during a transaction roll to get from one intent item to the next in a chain. Although scrub takes all AG header buffer locks, this isn't sufficient to guard against scrub checking an AG while that writer thread is in the middle of finishing a chain because there's no higher level locking primitive guarding allocation groups. When there's a collision, cross-referencing between data structures (e.g. rmapbt and refcountbt) yields false corruption events; if repair is running, this results in incorrect repairs, which is catastrophic. Fix this by adding to the perag structure the count of active intents and make scrub wait until it has both AG header buffer locks and the intent counter reaches zero. One quirk of the drain code is that deferred bmap updates also bump and drop the intent counter. A fundamental decision made during the design phase of the reverse mapping feature is that updates to the rmapbt records are always made by the same code that updates the primary metadata. In other words, callers of bmapi functions expect that the bmapi functions will queue deferred rmap updates. Some parts of the reflink code queue deferred refcount (CUI) and bmap (BUI) updates in the same head transaction, but the deferred work manager completely finishes the CUI before the BUI work is started. As a result, the CUI drops the intent count long before the deferred rmap (RUI) update even has a chance to bump the intent count. The only way to keep the intent count elevated between the CUI and RUI is for the BUI to bump the counter until the RUI has been created. A second quirk of the intent drain code is that deferred work items must increment the intent counter as soon as the work item is added to the transaction. When a BUI completes and queues an RUI, the RUI must increment the counter before the BUI decrements it. The only way to accomplish this is to require that the counter be bumped as soon as the deferred work item is created in memory. In the next patches we'll improve on this facility, but this patch provides the basic functionality. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 901489030441f30970f507b071a2f7ac3b194499 Author: Darrick J. Wong Date: Tue Apr 11 18:59:58 2023 -0700 xfs: add a tracepoint to report incorrect extent refcounts Add a new tracepoint so that I can see exactly what and where we failed the refcount check. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit ecc73f8a58c7844b04186726f8699ba97cec2ef9 Author: Darrick J. Wong Date: Tue Apr 11 18:59:57 2023 -0700 xfs: update copyright years for scrub/ files Update the copyright years in the scrub/ source code files. This isn't required, but it's helpful to remind myself just how long it's taken to develop this feature. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 739a2fe0428f24c11fe652252c2f19ef7a697209 Author: Darrick J. Wong Date: Tue Apr 11 18:59:56 2023 -0700 xfs: fix author and spdx headers on scrub/ files Fix the spdx tags to match current practice, and update the author contact information. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 9b2e5a234c89f097ec36f922763dfa1465dc06f8 Author: Darrick J. Wong Date: Tue Apr 11 18:59:55 2023 -0700 xfs: create traced helper to get extra perag references There are a few places in the XFS codebase where a caller has either an active or a passive reference to a perag structure and wants to give a passive reference to some other piece of code. Btree cursor creation and inode walks are good examples of this. Replace the open-coded logic with a helper to do this. The new function adds a few safeguards -- it checks that there's at least one reference to the perag structure passed in, and it records the refcount bump in the ftrace information. This makes it much easier to debug perag refcounting problems. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 00e7b3bac1dc8961bd5aa9d39e79131c6bd81181 Author: Darrick J. Wong Date: Tue Apr 11 18:59:55 2023 -0700 xfs: give xfs_refcount_intent its own perag reference Give the xfs_refcount_intent a passive reference to the perag structure data. This reference will be used to enable scrub intent draining functionality in subsequent patches. Any space being modified by a refcount intent is already allocated, so we need to be able to operate even if the AG is being shrunk or offlined. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit c13418e8eb375872ad297aeec5fa26277febc155 Author: Darrick J. Wong Date: Tue Apr 11 18:59:54 2023 -0700 xfs: give xfs_rmap_intent its own perag reference Give the xfs_rmap_intent a passive reference to the perag structure data. This reference will be used to enable scrub intent draining functionality in subsequent patches. The space we're (reverse) mapping is already allocated, so we need to be able to operate even if the AG is being shrunk or offlined. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit f6b384631e1e3482c24e35b53adbd3da50e47e8f Author: Darrick J. Wong Date: Tue Apr 11 18:59:54 2023 -0700 xfs: give xfs_extfree_intent its own perag reference Give the xfs_extfree_intent an passive reference to the perag structure data. This reference will be used to enable scrub intent draining functionality in subsequent patches. The space being freed must already be allocated, so we need to able to run even if the AG is being offlined or shrunk. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit b2ccab3199aa7cea9154d80ea2585312c5f6eba0 Author: Darrick J. Wong Date: Tue Apr 11 18:59:53 2023 -0700 xfs: pass per-ag references to xfs_free_extent Pass a reference to the per-AG structure to xfs_free_extent. Most callers already have one, so we can eliminate unnecessary lookups. The one exception to this is the EFI code, which the next patch will fix. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 774a99b47b588bf0bd9f65d3b241d5bba0b2fcb0 Author: Darrick J. Wong Date: Tue Apr 11 18:59:53 2023 -0700 xfs: give xfs_bmap_intent its own perag reference Give the xfs_bmap_intent an active reference to the perag structure data. This reference will be used to enable scrub intent draining functionality in subsequent patches. Later, shrink will use these passive references to know if an AG is quiesced or not. The reason why we take a passive ref for a file mapping operation is simple: we're committing to some sort of action involving space in an AG, so we want to indicate our interest in that AG. The space is already allocated, so we need to be able to operate on AGs that are offline or being shrunk. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 03786f0afb2ed5705a0478e14fea50a7f1a44f7e Author: Darrick J. Wong Date: Tue Apr 11 18:59:52 2023 -0700 xfs: document future directions of online fsck Add the seventh and final chapter of the online fsck documentation, where we talk about future functionality that can tie in with the functionality provided by the online fsck patchset. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit af051dfb81111610eed89a1098874932d59e7d8f Author: Darrick J. Wong Date: Tue Apr 11 18:59:51 2023 -0700 xfs: document the userspace fsck driver program Add the sixth chapter of the online fsck design documentation, where we discuss the details of the data structures and algorithms used by the driver program xfs_scrub. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit a26aa25247bc91fefa08e4127a16046135f30a5f Author: Darrick J. Wong Date: Tue Apr 11 18:59:51 2023 -0700 xfs: document directory tree repairs Directory tree repairs are the least complete part of online fsck, due to the lack of directory parent pointers. However, even without that feature, we can still make some corrections to the directory tree -- we can salvage as many directory entries as we can from a damaged directory, and we can reattach orphaned inodes to the lost+found, just as xfs_repair does now. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 2f754f7fb9fdd4e051cb273010c4244f95095835 Author: Darrick J. Wong Date: Tue Apr 11 18:59:50 2023 -0700 xfs: document metadata file repair File-based metadata (such as xattrs and directories) can be extremely large. To reduce the memory requirements and maximize code reuse, it is very convenient to create a temporary file, use the regular dir/attr code to store salvaged information, and then atomically swap the extents between the file being repaired and the temporary file. Record the high level concepts behind how temporary files and atomic content swapping should work, and then present some case studies of what the actual repair functions do. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit a0d856eede5a3ccfc7f0a4e02ee2e91ffab7f784 Author: Darrick J. Wong Date: Tue Apr 11 18:59:50 2023 -0700 xfs: document full filesystem scans for online fsck Certain parts of the online fsck code need to scan every file in the entire filesystem. It is not acceptable to block the entire filesystem while this happens, which means that we need to be clever in allowing scans to coordinate with ongoing filesystem updates. We also need to hook the filesystem so that regular updates propagate to the staging records. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit d697887193ef25df3d6e6a77d4108e7924eba2ca Author: Darrick J. Wong Date: Tue Apr 11 18:59:49 2023 -0700 xfs: document online file metadata repair code Add to the fifth chapter of the online fsck design documentation, where we discuss the details of the data structures and algorithms used by the kernel to repair file metadata. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 7fb8ccffd36946a055cc89b8f0acf49cb59403b1 Author: Darrick J. Wong Date: Tue Apr 11 18:59:49 2023 -0700 xfs: document btree bulk loading Add a discussion of the btree bulk loading code, which makes it easy to take an in-memory recordset and write it out to disk in an efficient manner. This also enables atomic switchover from the old to the new structure with minimal potential for leaking the old blocks. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 5f658dad233b2c92afddc011565d7e337d527a37 Author: Darrick J. Wong Date: Tue Apr 11 18:59:48 2023 -0700 xfs: document pageable kernel memory Add a discussion of pageable kernel memory, since online fsck needs quite a bit more memory than most other parts of the filesystem to stage records and other information. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit bae43864c08884bacde35c5aba36d0335f659868 Author: Darrick J. Wong Date: Tue Apr 11 18:59:48 2023 -0700 xfs: document how online fsck deals with eventual consistency Writes to an XFS filesystem employ an eventual consistency update model to break up complex multistep metadata updates into small chained transactions. This is generally good for performance and scalability because XFS doesn't need to prepare for enormous transactions, but it also means that online fsck must be careful not to attempt a fsck action unless it can be shown that there are no other threads processing a transaction chain. This part of the design documentation covers the thinking behind the consistency model and how scrub deals with it. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit e5edad526262d4ce389f7259396184975a9bc14e Author: Darrick J. Wong Date: Tue Apr 11 18:59:47 2023 -0700 xfs: document the filesystem metadata checking strategy Begin the fifth chapter of the online fsck design documentation, where we discuss the details of the data structures and algorithms used by the kernel to examine filesystem metadata and cross-reference it around the filesystem. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 4f7f64697025cd738685a3497e7d5252f3adf825 Author: Darrick J. Wong Date: Tue Apr 11 18:59:47 2023 -0700 xfs: document the user interface for online fsck Start the fourth chapter of the online fsck design documentation, which discusses the user interface and the background scrubbing service. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 9a30b5b52180bc37c7b3cf0efb57ba1297178856 Author: Darrick J. Wong Date: Tue Apr 11 18:59:46 2023 -0700 xfs: document the testing plan for online fsck Start the third chapter of the online fsck design documentation. This covers the testing plan to make sure that both online and offline fsck can detect arbitrary problems and correct them without making things worse. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson Reviewed-by: Dave Chinner commit 88757e04c985271b593fe298855a048ca0e9907f Author: Darrick J. Wong Date: Tue Apr 11 18:59:45 2023 -0700 xfs: document the general theory underlying online fsck design Start the second chapter of the online fsck design documentation. This covers the general theory underlying how online fsck works. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit a8f6c2e54ddc1f1bedf3dfc92407e2b6678dd109 Author: Darrick J. Wong Date: Tue Apr 11 18:59:45 2023 -0700 xfs: document the motivation for online fsck design Start the first chapter of the online fsck design documentation. This covers the motivations for creating this in the first place. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit d8898ee50edecacdf0141f26fd90acf43d7e9cd7 Author: Stefan Haberland Date: Wed Apr 5 16:20:17 2023 +0200 s390/dasd: fix hanging blockdevice after request requeue The DASD driver does not kick the requeue list when requeuing IO requests to the blocklayer. This might lead to hanging blockdevice when there is no other trigger for this. Fix by automatically kick the requeue list when requeuing DASD requests to the blocklayer. Fixes: e443343e509a ("s390/dasd: blk-mq conversion") CC: stable@vger.kernel.org # 4.14+ Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Reviewed-by: Halil Pasic Link: https://lore.kernel.org/r/20230405142017.2446986-8-sth@linux.ibm.com Signed-off-by: Jens Axboe commit d9ee2bee4a63844cd9d1e0d00b1e3c49eacd1c2f Author: Stefan Haberland Date: Wed Apr 5 16:20:16 2023 +0200 s390/dasd: add autoquiesce event for start IO error Add a check for errors in the start_io function that signal a not working device. Trigger an autoquiesce event in that case. Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Reviewed-by: Halil Pasic Link: https://lore.kernel.org/r/20230405142017.2446986-7-sth@linux.ibm.com Signed-off-by: Jens Axboe commit 0c1a14748133024a33aa8ffd763ca7f5c03bb27e Author: Stefan Haberland Date: Wed Apr 5 16:20:15 2023 +0200 s390/dasd: add aq_timeouts autoquiesce trigger Add a sysfs attribute aq_timeouts that controls after how many timeouts a autoquiesce event might be triggered. The default value is 32768 which is the maximum number of retries for the DASD device driver DASD_RETRIES_MAX. This means that the timeout trigger will never happen. The default value for DASD retries is 255. Setting the value to below 255 will trigger the timeout autoquiesce event before an IO error is generated. Also add the check for the configured amount of timeouts and trigger an autoquiesce event if exceeded. Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Reviewed-by: Halil Pasic Link: https://lore.kernel.org/r/20230405142017.2446986-6-sth@linux.ibm.com Signed-off-by: Jens Axboe commit bdac94e29564bab9f24c2700f16ff11f31af7c11 Author: Stefan Haberland Date: Wed Apr 5 16:20:14 2023 +0200 s390/dasd: add aq_requeue sysfs attribute Add a sysfs attribute to control if all IO requests will be requeued to the blocklayer in case of an autoquiesce event or not. A value of 1 means that in case of an autoquiesce event all IO requests will be requeued to the blocklayer. A value of 0 means that the device will only be stopped. Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Reviewed-by: Halil Pasic Link: https://lore.kernel.org/r/20230405142017.2446986-5-sth@linux.ibm.com Signed-off-by: Jens Axboe commit 9558a8e9d4a681e67b3abe9cabf3e3d8825af57e Author: Stefan Haberland Date: Wed Apr 5 16:20:13 2023 +0200 s390/dasd: add aq_mask sysfs attribute Add sysfs attribute that controls the DASD autoquiesce feature. The autoquiesce is disabled when 0 is echoed to the attribute. A value greater than 0 will enable the feature. The aq_mask attribute will accept an unsigned integer and the value will be interpreted as bitmask defining the trigger events that will lead to an automatic quiesce. The following autoquiesce triggers will currently be available: DASD_EER_FATALERROR 1 - any final I/O error DASD_EER_NOPATH 2 - no remaining paths for the device DASD_EER_STATECHANGE 3 - a state change interrupt occurred DASD_EER_PPRCSUSPEND 4 - the device is PPRC suspended DASD_EER_NOSPC 5 - there is no space remaining on an ESE device DASD_EER_TIMEOUT 6 - a certain amount of timeouts occurred DASD_EER_STARTIO 7 - the IO start function encountered an error The currently supported maximum value is 255. Bit 31 is reserved for internal usage. Bit 0 is not used. Example: - deactivate autoquiesce $ echo 0 > /sys/bus/ccw/0.0.1234/aq_mask - enable autoquiesce for FATALERROR, NOPATH and TIMEOUT (0000 0000 0000 0000 0000 0000 0100 0110 => 70) $ echo 70 > /sys/bus/ccw/0.0.1234/aq_mask Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Reviewed-by: Halil Pasic Link: https://lore.kernel.org/r/20230405142017.2446986-4-sth@linux.ibm.com Signed-off-by: Jens Axboe commit 1cee2975bbabd89df1097c354867192106b058ea Author: Stefan Haberland Date: Wed Apr 5 16:20:12 2023 +0200 s390/dasd: add autoquiesce feature Add the internal logic to check for autoquiesce triggers and handle them. Quiesce and resume are functions that tell Linux to stop/resume issuing I/Os to a specific DASD. The DASD driver allows a manual quiesce/resume via ioctl. Autoquiesce will define an amount of triggers that will lead to an automatic quiesce if a certain event occurs. There is no automatic resume. All events will be reported via DASD Extended Error Reporting (EER) if configured. Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Reviewed-by: Halil Pasic Link: https://lore.kernel.org/r/20230405142017.2446986-3-sth@linux.ibm.com Signed-off-by: Jens Axboe commit 861d53dbed4cad8cf1bbef692111f2215e02c38e Author: Stefan Haberland Date: Wed Apr 5 16:20:11 2023 +0200 s390/dasd: remove unused DASD EER defines Remove definitions that have never been used. Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Reviewed-by: Halil Pasic Link: https://lore.kernel.org/r/20230405142017.2446986-2-sth@linux.ibm.com Signed-off-by: Jens Axboe commit 3c85f087faeca3ca9ec9e7b085e1eff370e3f0db Author: Avri Altman Date: Wed Mar 29 13:13:03 2023 +0300 scsi: ufs: mcq: Use pointer arithmetic in ufshcd_send_command() Make sqe_base_addr the UTRD pointer it is, instead of an opaque void *. Signed-off-by: Avri Altman Link: https://lore.kernel.org/r/20230329101303.18377-3-avri.altman@wdc.com Signed-off-by: Martin K. Petersen commit 4de243c40c0f6c701123eb12938a5d9caee08679 Author: Avri Altman Date: Wed Mar 29 13:13:02 2023 +0300 scsi: ufs: mcq: Annotate ufshcd_inc_sq_tail() appropriately Allow Sparse and such to know that the hwq lock should be held here. Signed-off-by: Avri Altman Link: https://lore.kernel.org/r/20230329101303.18377-2-avri.altman@wdc.com Signed-off-by: Martin K. Petersen commit e7a985d50841e43ea1794b3597fd7f646ed95a32 Author: Marek Vasut Date: Thu Apr 6 18:01:15 2023 +0200 dt-bindings: arm: Add Data Modul i.MX8M Plus eDM SBC Add DT compatible for Data Modul i.MX8M Plus eDM SBC board. This is an evaluation board for various custom display units. Acked-by: Krzysztof Kozlowski Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 98896cf432398c8e2c59347190f3efda53bc3670 Author: Stefan Wahren Date: Tue Apr 4 10:02:41 2023 +0200 dt-bindings: arm: fsl: Add chargebyte Tarragon This adds the compatibles for the chargebyte Tarragon boards. Signed-off-by: Stefan Wahren Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit fcb8b72db5800be7ca97ba7fa419d8aff2ffcaf1 Author: Stefan Wahren Date: Tue Apr 4 10:02:38 2023 +0200 dt-bindings: vendor-prefixes: add chargebyte chargebyte supplies hardware and software products for all aspects of charging communication. https://chargebyte.com/ Signed-off-by: Stefan Wahren Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit cabb637465116771742390c89b15634eb491960a Author: Geert Uytterhoeven Date: Tue Apr 11 12:18:20 2023 +0200 scsi: cxlflash: s/semahpore/semaphore/ Fix misspellings of "semaphore". Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/d7d04004b818d7ab5d62002f286b0a1b0b493193.1681208251.git.geert+renesas@glider.be Signed-off-by: Martin K. Petersen commit 8bfb89f6149ea8e790f58abad1f4a84066d86c91 Author: Jun Chen Date: Mon Apr 10 10:37:23 2023 +0800 scsi: lpfc: Silence an incorrect device output In lpfc_sli4_pci_mem_unset(), case LPFC_SLI_INTF_IF_TYPE_1 does not have a break statement, resulting in an incorrect device output. Fix this by adding a break statement before the default option. Signed-off-by: Jun Chen Link: https://lore.kernel.org/r/20230410023724.3209455-1-jun_c@hust.edu.cn Reviewed-by: Dongliang Mu Reviewed-by: Justin Tee Signed-off-by: Martin K. Petersen commit 2acc635a0e5e91c267f2cb1c25748e8d06888e63 Author: Ranjan Kumar Date: Thu Apr 6 15:48:19 2023 +0530 scsi: mpi3mr: Use IRQ save variants of spinlock to protect chain frame allocation Driver uses spin lock without irqsave when it needs to acquire a chain frame. This is done to protect chain frame allocation from multiple submission threads. If there is any I/O queued from an interrupt context, and if that requires a chain frame, and if the chain lock is held by the CPU which got interrupted, then there will be a possible deadlock. Signed-off-by: Ranjan Kumar Link: https://lore.kernel.org/r/20230406101819.10109-1-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit b32283d75335d8263fc9f5ae16c8a196f1d8b5d5 Author: Harshit Mogalapalli Date: Thu Apr 6 00:46:07 2023 -0700 scsi: scsi_debug: Fix missing error code in scsi_debug_init() Smatch reports: drivers/scsi/scsi_debug.c:6996 scsi_debug_init() warn: missing error code 'ret' Although it is unlikely that KMEM_CACHE might fail, but if it does then ret might be zero. So to fix this explicitly mark ret as "-ENOMEM" and then goto driver_unreg. Fixes: 1107c7b24ee3 ("scsi: scsi_debug: Dynamically allocate sdebug_queued_cmd") Signed-off-by: Harshit Mogalapalli Link: https://lore.kernel.org/r/20230406074607.3637097-1-harshit.m.mogalapalli@oracle.com Reviewed-by: John Garry Signed-off-by: Martin K. Petersen commit e01e2290f0948ea6d383a5b715738911308b4d2b Author: Arnd Bergmann Date: Wed Apr 5 10:36:04 2023 +0200 scsi: hisi_sas: Work around build failure in suspend function The suspend/resume functions in this driver seem to have multiple problems, the latest one just got introduced by a bugfix: drivers/scsi/hisi_sas/hisi_sas_v3_hw.c: In function '_suspend_v3_hw': drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:5142:39: error: 'struct dev_pm_info' has no member named 'usage_count' 5142 | if (atomic_read(&device->power.usage_count)) { drivers/scsi/hisi_sas/hisi_sas_v3_hw.c: In function '_suspend_v3_hw': drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:5142:39: error: 'struct dev_pm_info' has no member named 'usage_count' 5142 | if (atomic_read(&device->power.usage_count)) { As far as I can tell, the 'usage_count' is not meant to be accessed by device drivers at all, though I don't know what the driver is supposed to do instead. Another problem is the use of the deprecated UNIVERSAL_DEV_PM_OPS(), and marking functions as __maybe_unused to avoid warnings about unused functions. This should probably be changed to using DEFINE_RUNTIME_DEV_PM_OPS(). Both changes require actually understanding what the driver needs to do, and being able to test this, so instead here is the simplest patch to make it pass the randconfig builds instead. Fixes: e368d38cb952 ("scsi: hisi_sas: Exit suspend state when usage count is greater than 0") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230405083611.3376739-1-arnd@kernel.org Reviewed-by: Xiang Chen Signed-off-by: Martin K. Petersen commit 91a0c0c1413239d0548b5aac4c82f38f6d53a91e Author: Shuchang Li Date: Tue Apr 4 15:21:32 2023 +0800 scsi: lpfc: Fix ioremap issues in lpfc_sli4_pci_mem_setup() When if_type equals zero and pci_resource_start(pdev, PCI_64BIT_BAR4) returns false, drbl_regs_memmap_p is not remapped. This passes a NULL pointer to iounmap(), which can trigger a WARN() on certain arches. When if_type equals six and pci_resource_start(pdev, PCI_64BIT_BAR4) returns true, drbl_regs_memmap_p may has been remapped and ctrl_regs_memmap_p is not remapped. This is a resource leak and passes a NULL pointer to iounmap(). To fix these issues, we need to add null checks before iounmap(), and change some goto labels. Fixes: 1351e69fc6db ("scsi: lpfc: Add push-to-adapter support to sli4") Signed-off-by: Shuchang Li Link: https://lore.kernel.org/r/20230404072133.1022-1-lishuchang@hust.edu.cn Reviewed-by: Justin Tee Signed-off-by: Martin K. Petersen commit 85140baf096bdca07cd5ab2fdc507db9cd4ba4e7 Author: Tomas Henzl Date: Mon Apr 3 20:47:36 2023 +0200 scsi: mpt3sas: Fix an issue when driver is being removed Warnings may be logged during driver removal: mpt3sas 0000:01:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT .., Fix this by deallocating DMA memory later. Signed-off-by: Tomas Henzl Link: https://lore.kernel.org/r/20230403184736.6399-1-thenzl@redhat.com Signed-off-by: Martin K. Petersen commit 3fc5d6d6dcac1f98139c8f16c69dd03f4fe4152c Author: Ranjan Kumar Date: Wed Mar 22 14:57:13 2023 +0530 scsi: mpt3sas: Remove HBA BIOS version in the kernel log This is done to avoid ambiguity between BIOS and UEFI versions. Management tools can be used for getting accurate firmware version information. Signed-off-by: Ranjan Kumar Link: https://lore.kernel.org/r/20230322092713.6961-1-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit cd99dac6ec5fff763852d8ccb8a79f5de50ed830 Author: Nicholas Piggin Date: Fri Apr 7 14:09:24 2023 +1000 powerpc/boot: Fix crt0.S current address branch form Use the preferred form of branch-and-link for finding the current address so objtool doesn't think it is an unannotated intra-function call. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230407040924.231023-1-npiggin@gmail.com commit a0fde512f7030e7fbdd5f0d8d70908d37389aae2 Author: Maurizio Lombardi Date: Fri Apr 7 15:00:33 2023 +0200 scsi: target: core: Fix invalid memory access nr_attrs should start counting from zero, otherwise we will end up dereferencing an invalid memory address. $ targetcli /loopback create general protection fault RIP: 0010:configfs_create_file+0x12/0x70 Call Trace: configfs_attach_item.part.0+0x5f/0x150 configfs_attach_group.isra.0+0x49/0x120 configfs_mkdir+0x24f/0x4d0 vfs_mkdir+0x192/0x240 do_mkdirat+0x131/0x160 __x64_sys_mkdir+0x48/0x70 do_syscall_64+0x5c/0x90 Fixes: 31177b74790c ("scsi: target: core: Add RTPI attribute for target port") Signed-off-by: Maurizio Lombardi Link: https://lore.kernel.org/r/20230407130033.556644-1-mlombard@redhat.com Acked-by: Dmitry Bogdanov Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit 6a24915145c922b79d3ac78f681137a4c14a6d6b Author: Song Shuai Date: Wed Mar 8 14:47:34 2023 +0800 Revert "riscv: Set more data to cacheinfo" This reverts commit baf7cbd94b5688f167443a2cc3dcea3300132099. There are some duplicate cache attributes populations executed in both ci_leaf_init() and later cache_setup_properties(). Revert the commit baf7cbd94b56 ("riscv: Set more data to cacheinfo") to setup only the level and type attributes at this early place. Signed-off-by: Song Shuai Acked-by: Sudeep Holla Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230308064734.512457-1-suagrfillet@gmail.com Signed-off-by: Palmer Dabbelt commit e74b2b58ff715ca17bb49c3ad89f665a7150e14b Author: Mika Westerberg Date: Tue Apr 4 15:32:55 2023 -0500 PCI/PM: Drop pci_bridge_wait_for_secondary_bus() timeout parameter All callers of pci_bridge_wait_for_secondary_bus() supply a timeout of PCIE_RESET_READY_POLL_MS, so drop the parameter. Move the definition of PCIE_RESET_READY_POLL_MS into pci.c, the only user. [bhelgaas: extracted from https://lore.kernel.org/r/20230404052714.51315-3-mika.westerberg@linux.intel.com] Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas commit e8b908146d44310473e43b3382eca126e12d279c Author: Mika Westerberg Date: Tue Apr 4 08:27:13 2023 +0300 PCI/PM: Increase wait time after resume PCIe r6.0 sec 6.6.1 prescribes that a device must be able to respond to config requests within 1.0 s (PCI_RESET_WAIT) after exiting conventional reset and this same delay is prescribed when coming out of D3cold (as that involves reset too). A device that requires more than 1 second to initialize after reset may respond to config requests with Request Retry Status completions (sec 2.3.1), and we accommodate that in Linux with a 60 second cap (PCIE_RESET_READY_POLL_MS). Previously we waited up to PCIE_RESET_READY_POLL_MS only in the reset code path, not in the resume path. However, a device has surfaced, namely Intel Titan Ridge xHCI, which requires a longer delay also in the resume code path. Make the resume code path to use this same extended delay as the reset path. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216728 Link: https://lore.kernel.org/r/20230404052714.51315-2-mika.westerberg@linux.intel.com Reported-by: Chris Chiu Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas Cc: Lukas Wunner commit b645fc696bec7653f3396e933015dd8728bbb10f Author: Florian Fainelli Date: Sun Apr 2 06:54:14 2023 -0700 Documentation: firmware: Clarify firmware path usage Newline characters will be taken into account for the firmware search path parameter, warn users about that and provide an example using 'echo -n' such that it clarifies the typical use of that parameter. Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20230402135423.3235-1-f.fainelli@gmail.com Signed-off-by: Jonathan Corbet commit 7332f9e45d2e13fa93acd16e2e3f122a765ff965 Author: Kim Phillips Date: Fri Mar 31 11:52:54 2023 -0500 docs/mm: Physical Memory: Fix grammar it's -> its referenced to by -> referenced by Signed-off-by: Kim Phillips Reviewed-by: Mike Rapoport (IBM) Link: https://lore.kernel.org/r/20230331165254.207526-1-kim.phillips@amd.com Signed-off-by: Jonathan Corbet commit 27488686cb1835f1c69d3efb0eedeb411f675d73 Author: Graham Sider Date: Thu Mar 30 13:47:05 2023 -0400 drm/amdgpu: Enable GFX11 SDMA context empty interrupt Enable SDMA queue empty context switching. SDMA context switch due to quantum programming no longer done here (as of sdma v6), so re-name sdma_v6_0_ctx_switch_enable to sdma_v6_0_ctxempty_int_enable to reflect this. Also program SDMAx_QUEUEx_SCHEDULE_CNTL for context switch due to quantum in KFD. Set to amdgpu_sdma_phase_quantum (defaults to 32 i.e. 3200us). Signed-off-by: Graham Sider Reviewed-by: Harish Kasiviswanathan Reviewed-by: Stanley Yang Signed-off-by: Alex Deucher commit 00fa40353bf3894adb495f8cce10a8bce43cd375 Author: Sreekant Somasekharan Date: Mon Mar 13 18:05:41 2023 -0400 drm/amdkfd: Check PCIe atomics support on GFX11 to set CP_HQD_HQ_STATUS0[29] CP_HQD_HQ_STATUS0[29] bit will be used by CPFW to acknowledge whether PCIe atomics are supported. The default value of this bit is set to 0. Driver will check whether PCIe atomics are supported and set the bit to 1 if supported. This will force CPFW to use real atomic ops. If the bit is not set, CPFW will default to read/modify/write using the firmware itself. This is applicable only to GFX11 RS64 CP with MEC FW >= 509. If MEC FW < 509 and for all GFX11 F32 CP, PCIe atomics needs to be supported else it will skip the device. This commit also involves moving amdgpu_amdkfd_device_probe() function call after per-IP early_init loop in amdgpu_device_ip_early_init() function so as to check for RS64 enabled device. Signed-off-by: Sreekant Somasekharan Reviewed-by: Graham Sider Signed-off-by: Alex Deucher commit 3e3320a7d96c1a5c66b60fbabb38af1f4c4fae1a Author: Srinivasan Shanmugam Date: Fri Apr 7 14:22:53 2023 +0530 drm/amd/display: Add logging for DP link traning Test Pattern Seqeunces Add some more logging for DP link traning test pattern seqeunces for better debugging. Cc: Fangzhi Zuo Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Fangzhi Zuo Signed-off-by: Alex Deucher commit 58bc2a9cbfdd4abdbfaafd835a0cd78bdad11423 Author: Stanley.Yang Date: Mon Apr 10 19:43:16 2023 +0800 drm/amdgpu: correct ras enabled flag XGMI RAS should be according to the gmc xgmi physical nodes number, XGMI RAS should not be enabled if xgmi num_physical_nodes is zero. Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit caa4dffa9abd80f3360432cf89236f018be355ca Author: Stanley.Yang Date: Mon Apr 10 18:20:23 2023 +0800 drm/amdgpu: fix unexpected block id Aldebaran supports VCN and JPEG RAS, it reports unexpected block id message during VCN and JPEG RAS initialization if VCN and JPEG block id not defined. Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit febc9c65b37f6f5cc03ed0b6d613fb045c39b376 Author: Pierre-Eric Pelloux-Prayer Date: Wed Apr 5 10:23:31 2023 +0200 drm/amdgpu: use sdma_v6 single packet invalidation This achieves the same result as the sequence used in emit_flush_gpu_tlb but the invalidation is now a single packet instead of the 3 packets required to implement reg_write_reg_wait. Signed-off-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Christian König Reviewed-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit aee89b7d0929bfc6530a1468d34e0befc1991389 Author: Srinivasan Shanmugam Date: Sun Apr 9 22:35:38 2023 +0530 drm/amd/display : Log DP link training downspread info Update the existing log with DP LT downspread info: [Downstream devices shall support down spreading of the link clock. The down-spread amplitude shall either be disabled (0.0%) or up to 0.5%, as written by the upstream device to the DOWNSPREAD_CTRL register (DPCD 00107h). The modulation frequency range shall be 30 to 33 kHz] Besides, fix checkpatch warning: CHECK: Alignment should match open parenthesis Cc: Mario Limonciello Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit fdf8ea814ae48d7f5670bc7c3bf34101fb58f7c8 Author: Tom Rix Date: Sat Mar 25 09:45:03 2023 -0400 drm/amd/display: remove unused matching_stream_ptrs variable clang with W=1 reports drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_enc_cfg.c:625:6: error: variable 'matching_stream_ptrs' set but not used [-Werror,-Wunused-but-set-variable] int matching_stream_ptrs = 0; ^ This variable is not used so remove it. Reviewed-by: Nick Desaulniers Signed-off-by: Tom Rix Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 94aec514c872250887e435faee333c9da741cd72 Author: Tom Rix Date: Sat Apr 8 09:43:48 2023 -0400 drm/amd/display: set variables dml*_funcs storage-class-specifier to static smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.c:44:24: warning: symbol 'dml20_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.c:51:24: warning: symbol 'dml20v2_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.c:58:24: warning: symbol 'dml21_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.c:65:24: warning: symbol 'dml30_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.c:72:24: warning: symbol 'dml31_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.c:79:24: warning: symbol 'dml314_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.c:86:24: warning: symbol 'dml32_funcs' was not declared. Should it be static? These variables are only used in one file so should be static. Cleanup whitespace, use tabs consistently for indents. Signed-off-by: Tom Rix Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 75bf1df75d5e9a22898c5b6c3410ef8ec3a0de70 Author: Tom Rix Date: Thu Apr 6 15:58:18 2023 -0400 drm/amd/display: set variables aperture_default_system and context0_default_system storage-class-specifier to static smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hubp.c:758:10: warning: symbol 'aperture_default_system' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hubp.c:759:10: warning: symbol 'context0_default_system' was not declared. Should it be static? These variables are only used in one file so should be static. Signed-off-by: Tom Rix Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit ff38d974bc2842797d1d75f5060afd1cea4a76a9 Author: Tom Rix Date: Thu Apr 6 14:44:34 2023 -0400 drm/amd/display: set variable dcn3_14_soc storage-class-specifier to static smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/dcn314_fpu.c:100:37: warning: symbol 'dcn3_14_soc' was not declared. Should it be static? This variable is only used in one file so should be static. Signed-off-by: Tom Rix Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 418431bcc9ae6509263f4f3bf4b6a80f39da0772 Author: Lijo Lazar Date: Wed Apr 5 15:07:06 2023 +0530 drm/amdgpu: Fix warnings Fix below warning due to incompatible types in conditional operator ../pm/swsmu/smu13/smu_v13_0_6_ppt.c:315:17: sparse: sparse: incompatible types in conditional expression (different base types): Signed-off-by: Lijo Lazar Reported-by: kernel test robot Reviewed-by: Luben Tuikov Reviewed-by: Guchun Chen Link: https://lore.kernel.org/oe-kbuild-all/202303082135.NjdX1Bij-lkp@intel.com/ Signed-off-by: Alex Deucher commit 86f3a961f367f5796ed1915cc8253e21c2a329fa Author: Horatio Zhang Date: Thu Apr 6 13:32:14 2023 +0800 drm/amd/pm: correct SMU13.0.7 max shader clock reporting Correct the max shader clock reporting on SMU 13.0.7. Signed-off-by: Horatio Zhang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 52a3a40ee4f89c89026837838f7df386d64c2892 Author: Horatio Zhang Date: Thu Apr 6 11:17:38 2023 +0800 drm/amd/pm: correct SMU13.0.7 pstate profiling clock settings Correct the pstate standard/peak profiling mode clock settings for SMU13.0.7. Signed-off-by: Horatio Zhang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 5591a051b86be170a84943698ab140342602ff7b Author: Tong Liu01 Date: Thu Apr 6 15:58:31 2023 +0800 drm/amdgpu: refine get gpu clock counter method [why] regGOLDEN_TSC_COUNT_LOWER/regGOLDEN_TSC_COUNT_UPPER are protected and unaccessible under sriov. The clock counter high bit may update during reading process. [How] Replace regGOLDEN_TSC_COUNT_LOWER/regGOLDEN_TSC_COUNT_UPPER with regCP_MES_MTIME_LO/regCP_MES_MTIME_HI to get gpu clock under sriov. Refine get gpu clock counter method to make the result more precise. Signed-off-by: Tong Liu01 Acked-by: Luben Tuikov Signed-off-by: Alex Deucher commit fc926faefcb7fade1abc05043db540f5c0fef79e Author: YiPeng Chai Date: Mon Mar 27 14:27:12 2023 +0800 drm/amdgpu: optimize redundant code in umc_v6_7 Optimize redundant code in umc_v6_7. Signed-off-by: YiPeng Chai Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 5e08e9c742a00384e5abe74bd40cf4dc15cb3a2e Author: lyndonli Date: Thu Apr 6 15:30:34 2023 +0800 drm/amdgpu: Fix sdma v4 sw fini error Fix sdma v4 sw fini error for sdma 4.2.2 to solve the following general protection fault [ +0.108196] general protection fault, probably for non-canonical address 0xd5e5a4ae79d24a32: 0000 [#1] PREEMPT SMP PTI [ +0.000018] RIP: 0010:free_fw_priv+0xd/0x70 [ +0.000022] Call Trace: [ +0.000012] [ +0.000011] release_firmware+0x55/0x80 [ +0.000021] amdgpu_ucode_release+0x11/0x20 [amdgpu] [ +0.000415] amdgpu_sdma_destroy_inst_ctx+0x4f/0x90 [amdgpu] [ +0.000360] sdma_v4_0_sw_fini+0xce/0x110 [amdgpu] Signed-off-by: lyndonli Reviewed-by: Likun Gao Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit edd48e6d8f341dcaf1c0a45f4822172d33e75129 Author: Shane Xiao Date: Wed Apr 5 23:09:14 2023 +0800 drm/amdgpu: DROP redundant drm_prime_sg_to_dma_addr_array For DMA-MAP userptr on other GPUs, the dma address array will be populated in amdgpu_ttm_backend_bind. Remove the redundant call from the driver. v2: update the comment Signed-off-by: Shane Xiao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit e86bd8b21d57670e38c23ed435a053e7e4cc9e21 Author: YiPeng Chai Date: Mon Mar 27 14:23:30 2023 +0800 drm/amdgpu: optimize redundant code in umc_v8_10 Optimize redundant code in umc_v8_10 Signed-off-by: YiPeng Chai Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit af152c2120587b02e03dfe370b52ba75c40f8952 Author: Shane Xiao Date: Thu Apr 6 12:37:16 2023 +0800 amd/amdgpu: Inherit coherence flags base on original BO flags For SG BO to DMA-map userptrs on other GPUs, the SG BO need inherit MTYPEs in PTEs from original BO. If we set the flags, the device can be coherent with the CPUs and other GPUs. v2: 1. Drop unnecessary flags check 2. Remove local variable align Signed-off-by: Shane Xiao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 89317d4255122f05aaa0ac16d189a9ab3022653c Author: Guilherme G. Piccoli Date: Thu Mar 30 11:40:45 2023 -0300 drm/amd/pm: Fix incorrect comment about Vangogh power cap support The comment mentions that power1 cap attributes are not supported on Vangogh, but the opposite is indeed valid: for APUs, only Vangogh is supported. While at it, also fixed the Renoir comment below (thanks Melissa for noticing that!). Cc: Lijo Lazar Cc: Melissa Wen Signed-off-by: Guilherme G. Piccoli Signed-off-by: Alex Deucher commit 207bbfb63dc0eb491f71e96baa5db9c25626a247 Author: Shane Xiao Date: Wed Apr 5 22:33:11 2023 +0800 drm/amdgpu: Add userptr bo support for mGPUs when iommu is on For userptr bo with iommu on, multiple GPUs use same system memory dma mapping address when both adev and bo_adev are in identity mode or in the same iommu group. If RAM direct map to one GPU, other GPUs can share the original BO in order to reduce dma address array usage when RAM can direct map to these GPUs. However, we should explicit check whether RAM can direct map to all these GPUs. This patch fixes a potential issue that where RAM is direct mapped on some but not all GPUs. v2: 1. Update comment 2. Add helper function reuse_dmamap Signed-off-by: Shane Xiao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 11f25c844e29f85abb0b3ffdb360a2f82a2c4ed0 Author: Srinivasan Shanmugam Date: Wed Apr 5 20:41:09 2023 +0530 drm/amd/amdgpu: Drop the hang limit parameter The driver doesn't resubmit jobs on hangs any more, hence drop the hang limit parameter - amdgpu_job_hang_limit, wherever it is used. Suggested-by: Christian König Cc: Alex Deucher Cc: Mario Limonciello Cc: Kent Russell Signed-off-by: Srinivasan Shanmugam Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 52f1783ff4146344342422c1cd94fcb4ce39b6fe Author: Igor Artemiev Date: Mon Apr 3 16:10:37 2023 +0300 drm/amd/display: Fix potential null dereference The adev->dm.dc pointer can be NULL and dereferenced in amdgpu_dm_fini() without checking. Add a NULL pointer check before calling dc_dmub_srv_destroy(). Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 9a71c7d31734 ("drm/amd/display: Register DMUB service with DC") Signed-off-by: Igor Artemiev Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit e38dddcaed60c0692b77a7af355d34a13183cee1 Author: Aric Cyr Date: Mon Mar 27 01:45:02 2023 -0400 drm/amd/display: 3.2.230 This DC version brings along: - FW Release 0.0.161.0 - Improvements on FPO/FAMS - Correction to DML calculation - Fix to multiple clock related issues Acked-by: Qingqing Zhuo Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d116db180decec1b21bba31d2ff495ac4d8e1b83 Author: Mario Limonciello Date: Thu Mar 23 14:07:06 2023 -0500 drm/amd: Fix an out of bounds error in BIOS parser The array is hardcoded to 8 in atomfirmware.h, but firmware provides a bigger one sometimes. Deferencing the larger array causes an out of bounds error. commit 4fc1ba4aa589 ("drm/amd/display: fix array index out of bound error in bios parser") fixed some of this, but there are two other cases not covered by it. Fix those as well. Reported-by: erhard_f@mailbox.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=214853 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2473 Signed-off-by: Mario Limonciello Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 9dce8c2a5f1bf5a304aae39342816f099247d7da Author: Anthony Koo Date: Sat Mar 25 09:55:13 2023 -0400 drm/amd/display: [FW Promotion] Release 0.0.161.0 - Add command to idle opt. - Rename d3 entry event and add idle trigger param on notify event. - Add bit to fw boot status to notify status when hardware is powered up. Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7727e7b60f82e8265a1061b81379f5a7bce0dba6 Author: Michael Strauss Date: Fri Mar 24 10:48:37 2023 -0400 drm/amd/display: Improve robustness of FIXED_VS link training at DP1 rates [WHY] New sequence for transparent mode DP1.x link training was provided by LTTPR vendor [HOW] Implement new FIXED_VS sequence, increase LT retry count to minimize any potential intermittent lightup failures Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 554836cc24411e4d3645db5392655f8d28d1d47a Author: Yifan Zha Date: Wed Mar 29 17:18:47 2023 +0800 drm/amdgpu: Add MES KIQ clear to tell RLC that KIQ is dequeued [Why] As MES KIQ is dequeued, tell RLC that KIQ is inactive [How] Clear the RLC_CP_SCHEDULERS Active bit which RLC checks KIQ status In addition, driver can halt MES under SRIOV when unloading driver v2: Use scheduler0 mask to clear KIQ portion of RLC_CP_SCHEDULERS Signed-off-by: Yifan Zha Reviewed-by: Horace Chen Signed-off-by: Alex Deucher commit a2a0bdf1989c38ca2fc356edd23a114172ee09a2 Author: Charlene Liu Date: Fri Mar 24 12:31:07 2023 -0400 drm/amd/display: add dscclk instance offset check [why] based on dscclk instance offset check conditiona program dscclk Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d170e938f01fc8c5c41f8a12f0c12491580829ef Author: Alvin Lee Date: Fri Mar 24 12:01:09 2023 -0400 drm/amd/display: On clock init, maintain DISPCLK freq [Description] - 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) - Read the current DISPCLK freq and request the same value to ensure the timing is valid and unchanged - However, add option to do a full pipe power down (including link) which will also avoid audio related issues - Disabled for the time being on dcn32 Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0289e0ed1b9ae20e7b682fc7ca30d2d324a47618 Author: Alvin Lee Date: Thu Mar 23 15:48:41 2023 -0400 drm/amd/display: Add FPO + VActive support [Description] - When determining FPO support, include FPO + VActive support - Support FPO + VActive if one display meets regular requirements for FPO and the second display is able to switch in VACTIVE with a given amount of margin Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 385c3e4c29e1d4ce8f68687a8c84621e4c0e0416 Author: Paul Hsieh Date: Wed Mar 22 17:46:31 2023 +0800 drm/amd/display: Correct DML calculation to follow HW SPEC [Why] In 2560x1600@240p eDP panel, driver use lowest voltage level to play 1080p video cause underflow. According to HW SPEC, the senario should use high voltage level. [How] ChromaPre value is zero when bandwidth validation. Correct ChromaPre calculation. Reviewed-by: Nicholas Kazlauskas Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Paul Hsieh Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6f6869dcf415f7c222057a3f07c23667e1758585 Author: Hamza Mahfooz Date: Tue Mar 21 16:35:28 2023 -0400 drm/amd/display: prep work for root clock optimization enablement for DCN314 To enable root clock optimizations, we need a number of register writes and need to account for the difference in DPSTREAMCLK between DCN31 and DCN314. To prevent issues, add a number of register writes to DCCG_MASK_SH_LIST_DCN314_COMMON(), and define dccg314_init() which is mostly in alignment with dccg31_init() but accounts for the new DPSTREAMCLK sequence. Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Hamza Mahfooz Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0efa70356882ec2a843122f02892391ae61fc4d3 Author: Zhikai Zhai Date: Wed Mar 15 11:16:12 2023 +0800 drm/amd/display: add scaler control for dcn32 [WHY] It will introduce the extra warnning log on some asic that doesn't register [HOW] Add the register on dcn32 Reviewed-by: Dmytro Laktyushkin Acked-by: Qingqing Zhuo Signed-off-by: Zhikai Zhai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit abaeafb1b1fbeeb9e18638c6edbe9db31750c163 Author: Alvin Lee Date: Tue Mar 21 13:35:44 2023 -0400 drm/amd/display: Clear FAMS flag if FAMS doesn't reduce vlevel [Description] - If we find that applying FAMS doesn't reduce the voltage level, we will not use it - Ensure to clear the stream flags indicating FAMS if we hit this case Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9eb28ac1a25a2117ea5544ffcce59fcc1f128e1f Author: Yifan Zha Date: Wed Mar 29 16:18:01 2023 +0800 drm/amdgpu: Add MES KIQ dequeue in MES hw fini [Why] Need dequeue MES KIQ under SRIOV when unloading driver [How] Modify mes_v11_0_kiq_dequeue_sched which was used to dequeue MES SCHED to support veriable pipe. Add MES KIQ dequeue in hw fini Signed-off-by: Yifan Zha Reviewed-by: Horace Chen Signed-off-by: Alex Deucher commit 583da1b82ac51f0631b6ab699153f16b241dd40e Author: Tom Rix Date: Thu Mar 30 20:10:32 2023 -0400 drm/amd/display: remove unused average_render_time_in_us and i variables clang with W=1 reports drivers/gpu/drm/amd/amdgpu/../display/modules/freesync/freesync.c:1132:15: error: variable 'average_render_time_in_us' set but not used [-Werror,-Wunused-but-set-variable] unsigned int average_render_time_in_us = 0; ^ This variable is not used so remove it, which caused i to be unused so remove that as well. Signed-off-by: Tom Rix Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 63a4d258ae1b975cd0dd1f0623f50c119953abda Author: Arvind Yadav Date: Fri Mar 31 18:52:56 2023 +0530 drm/amdgpu: add new parameters in v11_struct Added some new parameters defined for the gfx usermode queues use cases in the v11_mqd_struct. Cc: Alex Deucher Cc: Christian Koenig Reviewed-by: Shashank Sharma Signed-off-by: Arvind Yadav Signed-off-by: Alex Deucher commit 97998b893c3000b27a780a4982e16cfc8f4ea555 Author: Jack Xiao Date: Fri Mar 24 16:55:15 2023 +0800 drm/amd/amdgpu: introduce gc_*_mes_2.bin v2 To avoid new mes fw running with old driver, rename mes schq fw to gc_*_mes_2.bin. v2: add MODULE_FIRMWARE declaration v3: squash in fixup patch Signed-off-by: Jack Xiao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 980d5baeb25cd65b7a791d7499daa07b34346def Author: Tim Huang Date: Thu Mar 30 10:33:02 2023 +0800 drm/amdgpu: allow more APUs to do mode2 reset when go to S4 Skip mode2 reset only for IMU enabled APUs when do S4. This patch is to fix the regression issue https://gitlab.freedesktop.org/drm/amd/-/issues/2483 It is generated by commit b589626674de ("drm/amdgpu: skip ASIC reset for APUs when go to S4"). Fixes: b589626674de ("drm/amdgpu: skip ASIC reset for APUs when go to S4") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2483 Tested-by: Yuan Perry Signed-off-by: Tim Huang Signed-off-by: Alex Deucher commit b2ad9d4e249ea28be5c9678bf1feec6d50f07613 Author: Mark Brown Date: Thu Mar 23 22:06:32 2023 +0000 arm64/idreg: Don't disable SME when disabling SVE SVE and SME are separate features which can be implemented without each other but currently if the user specifies arm64.nosve then we disable SME as well as SVE. There is already a separate override for SME so remove the implicit disablement from the SVE override. One usecase for this would be testing SME only support on a system which implements both SVE and SME. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230315-arm64-override-sve-sme-v2-1-bab7593e842b@kernel.org Signed-off-by: Will Deacon commit 3db63daabe210af32a09533fe7d8d47c711a103c Author: NeilBrown Date: Wed Mar 22 09:27:04 2023 +1100 NFSv3: handle out-of-order write replies. NFSv3 includes pre/post wcc attributes which allow the client to determine if all changes to the file have been made by the client itself, or if any might have been made by some other client. If there are gaps in the pre/post ctime sequence it must be assumed that some other client changed the file in that gap and the local cache must be suspect. The next time the file is opened the cache should be invalidated. Since Commit 1c341b777501 ("NFS: Add deferred cache invalidation for close-to-open consistency violations") in linux 5.3 the Linux client has been triggering this invalidation. The chunk in nfs_update_inode() in particularly triggers. Unfortunately Linux NFS assumes that all replies will be processed in the order sent, and will arrive in the order processed. This is not true in general. Consequently Linux NFS might ignore the wcc info in a WRITE reply because the reply is in response to a WRITE that was sent before some other request for which a reply has already been seen. This is detected by Linux using the gencount tests in nfs_inode_attr_cmp(). Also, when the gencount tests pass it is still possible that the request were processed on the server in a different order, and a gap seen in the ctime sequence might be filled in by a subsequent reply, so gaps should not immediately trigger delayed invalidation. The net result is that writing to a server and then reading the file back can result in going to the server for the read rather than serving it from cache - all because a couple of replies arrived out-of-order. This is a performance regression over kernels before 5.3, though the change in 5.3 is a correctness improvement. This has been seen with Linux writing to a Netapp server which occasionally re-orders requests. In testing the majority of requests were in-order, but a few (maybe 2 or three at a time) could be re-ordered. This patch addresses the problem by recording any gaps seen in the pre/post ctime sequence and not triggering invalidation until either there are too many gaps to fit in the table, or until there are no more active writes and the remaining gaps cannot be resolved. We allocate a table of 16 gaps on demand. If the allocation fails we revert to current behaviour which is of little cost as we are unlikely to be able to cache the writes anyway. In the table we store "start->end" pair when iversion is updated and "end<-start" pairs pre/post pairs reported by the server. Usually these exactly cancel out and so nothing is stored. When there are out-of-order replies we do store gaps and these will eventually be cancelled against later replies when this client is the only writer. If the final write is out-of-order there may be one gap remaining when the file is closed. This will be noticed and if there is precisely on gap and if the iversion can be advanced to match it, then we do so. This patch makes no attempt to handle directories correctly. The same problem potentially exists in the out-of-order replies to create/unlink requests can cause future lookup requires to be sent to the server unnecessarily. A similar scheme using the same primitives could be used to notice and handle out-of-order replies. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker commit 266679ffd867cb247c36717ea4d7998e9304823b Author: Mark Brown Date: Thu Apr 6 17:19:12 2023 +0100 kselftest/arm64: Convert za-fork to use kselftest.h Now that kselftest.h can be used with nolibc convert the za-fork test to use it. We do still have to open code ksft_print_msg() but that's not the end of the world. Some of the advantage comes from using printf() which we could have been using already. This does change the output when tests are skipped, bringing it in line with the standard kselftest output by removing the test name - we move from ok 0 skipped to ok 1 # SKIP fork_test The old output was not following KTAP format for skips, and the numbering was not standard or consistent with the reported plan. Signed-off-by: Mark Brown Signed-off-by: Shuah Khan commit 9e38be732da8fe3c970c2c9f6169d5aa38bf0d72 Author: Mark Brown Date: Thu Apr 6 17:19:11 2023 +0100 kselftest: Support nolibc Rather than providing headers for inclusion which replace any offered by the system nolibc is provided in the form of a header which should be added to the build via the compiler command line. In order to build with nolibc we need to not include the standard C headers, especially not stdio.h where the definitions of stdout, stdin and stderr will actively conflict with nolibc. Add an include guard which suppresses the inclusion of the standard headers when building with nolibc, allowing us to build tests using the nolibc headers. This allows us to avoid open coding of KTAP output for selftests that need to use nolibc in order to test interfaces that are controlled by libc. Signed-off-by: Mark Brown Signed-off-by: Shuah Khan commit 322759f98336b2c12113c3052289c5d83ff9b572 Author: Mark Brown Date: Thu Apr 6 17:19:10 2023 +0100 tools/nolibc/stdio: Implement vprintf() vprintf() is equivalent to vfprintf() to stdout so implement it as a simple wrapper for the existing vfprintf(), allowing us to build kselftest.h. Suggested-by: Willy Tarreau Signed-off-by: Mark Brown Acked-by: Willy Tarreau Acked-by: Paul E. McKenney Acked-by: Shuah Khan Signed-off-by: Shuah Khan commit 8a4adcf67a39b3f308bb8cf686e41c0e26aa12e8 Author: Linus Walleij Date: Tue Apr 11 10:28:06 2023 +0200 gpio: gpiolib: Simplify gpiochip_add_data_with_key() fwnode The code defaulting to the parents fwnode if no fwnode was assigned is unnecessarily convoluted, probably due to refactoring. Simplify it and make it more human-readable. Signed-off-by: Linus Walleij Reviewed-by: Anders Roxell Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit abe4f5ae5efa6a63c7d5abfa07eb02bb56b4654e Author: Hans de Goede Date: Tue Apr 4 13:02:51 2023 +0200 ACPI: video: Remove desktops without backlight DMI quirks After the recent backlight changes acpi_video# backlight devices are only registered when explicitly requested from the cmdline, by DMI quirk or by the GPU driver. This means that we no longer get false-positive backlight control support advertised on desktop boards. Remove the 3 DMI quirks for desktop boards where the false-positive issue was fixed through quirks before. Note many more desktop boards were affected but we never build a full quirk list for this. Reviewed-by: Mario Limonciello Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 67abe9c6a8077819aae490dcd3b9629c2e87bfc2 Author: Hans de Goede Date: Tue Apr 4 13:02:50 2023 +0200 ACPI: video: Remove register_backlight_delay module option and code Since commit 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default"), the delayed registering of acpi_video# backlight devices has been disabled by default. The few bugreports where this option was used as a workaround were all cases where the GPU driver did not call acpi_video_register_backlight() and the workaround was to pass video.register_backlight_delay=1. With the recent "ACPI: video: Make acpi_backlight=video work independent from GPU driver" changes acpi_backlight=video can be used to achieve the same result. So there is no need for the register_backlight_delay option + code anymore. Reviewed-by: Mario Limonciello Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 11fa52fe619acfa945712d94a0bc27c0f5bc49de Author: Tom Rix Date: Mon Apr 3 20:33:37 2023 -0400 cpufreq: amd-pstate: Make varaiable mode_state_machine static smatch reports drivers/cpufreq/amd-pstate.c:907:25: warning: symbol 'mode_state_machine' was not declared. Should it be static? This variable is only used in one file so it should be static. Signed-off-by: Tom Rix Reviewed-by: Wyes Karny Tested-by: Wyes Karny Reviewed-by: Dhruva Gole [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki commit a1d68507c1cd3192785d0b9a1a476590c63e9a3c Merge: 3e5f79723dc3f 681f27f302ff8 Author: Mark Brown Date: Tue Apr 11 19:47:17 2023 +0100 ASoC: SOF: Intel: hda-mlink: HDaudio multi-link Merge series from Peter Ujfalusi : The following series adds the core support to handle the recently updated HDaudio multi-link support to hanlde non HDA links, like SoundWire/DMIC/SSP on Intel platform. For details, please see the first patch which documents the current mlink support (introduced at Skylake) and the new extensions, arriving with LNL. There is no change in functionality for existing HDA support, the extension is backwards compatible with existing implementations. commit 75dcef8d3609d0b1d3497d6ed4809096513e0b83 Author: Feng Zhou Date: Mon Apr 10 16:59:08 2023 +0800 selftests/bpf: Add test to access u32 ptr argument in tracing program Adding verifier test for accessing u32 pointer argument in tracing programs. The test program loads 1nd argument of bpf_fentry_test9 function which is u32 pointer and checks that verifier allows that. Co-developed-by: Chengming Zhou Signed-off-by: Chengming Zhou Signed-off-by: Feng Zhou Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20230410085908.98493-3-zhoufeng.zf@bytedance.com commit 91f2dc6838c19342f7f2993627c622835cc24890 Author: Feng Zhou Date: Mon Apr 10 16:59:07 2023 +0800 bpf/btf: Fix is_int_ptr() When tracing a kernel function with arg type is u32*, btf_ctx_access() would report error: arg2 type INT is not a struct. The commit bb6728d75611 ("bpf: Allow access to int pointer arguments in tracing programs") added support for int pointer, but did not skip modifiers before checking it's type. This patch fixes it. Fixes: bb6728d75611 ("bpf: Allow access to int pointer arguments in tracing programs") Co-developed-by: Chengming Zhou Signed-off-by: Chengming Zhou Signed-off-by: Feng Zhou Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20230410085908.98493-2-zhoufeng.zf@bytedance.com commit 504cae453f8222884486f77f1fd3e8e0aa317dd7 Author: Baoquan He Date: Fri Apr 7 09:15:07 2023 +0800 arm64: kdump: defer the crashkernel reservation for platforms with no DMA memory zones In commit 031495635b46 ("arm64: Do not defer reserve_crashkernel() for platforms with no DMA memory zones"), reserve_crashkernel() is called much earlier in arm64_memblock_init() to avoid causing base apge mapping on platforms with no DMA meomry zones. With taking off protection on crashkernel memory region, no need to call reserve_crashkernel() specially in advance. The deferred invocation of reserve_crashkernel() in bootmem_init() can cover all cases. So revert the whole commit now. Signed-off-by: Baoquan He Reviewed-by: Zhen Lei Link: https://lore.kernel.org/r/20230407011507.17572-4-bhe@redhat.com Signed-off-by: Will Deacon commit 04a2a7af3d977f5a54aed26ab54cf734b59dcdf3 Author: Baoquan He Date: Fri Apr 7 09:15:06 2023 +0800 arm64: kdump: do not map crashkernel region specifically After taking off the protection functions on crashkernel memory region, there's no need to map crashkernel region with page granularity during linear mapping. With this change, the system can make use of block or section mapping on linear region to largely improve perforcemence during system bootup and running. Signed-off-by: Baoquan He Acked-by: Catalin Marinas Acked-by: Mike Rapoport (IBM) Reviewed-by: Zhen Lei Link: https://lore.kernel.org/r/20230407011507.17572-3-bhe@redhat.com Signed-off-by: Will Deacon commit 0d124e96051b1dcee88624efea972c826b3dfc83 Author: Baoquan He Date: Fri Apr 7 09:15:05 2023 +0800 arm64: kdump : take off the protection on crashkernel memory region Problem: ======= On arm64, block and section mapping is supported to build page tables. However, currently it enforces to take base page mapping for the whole linear mapping if CONFIG_ZONE_DMA or CONFIG_ZONE_DMA32 is enabled and crashkernel kernel parameter is set. This will cause longer time of the linear mapping process during bootup and severe performance degradation during running time. Root cause: ========== On arm64, crashkernel reservation relies on knowing the upper limit of low memory zone because it needs to reserve memory in the zone so that devices' DMA addressing in kdump kernel can be satisfied. However, the upper limit of low memory on arm64 is variant. And the upper limit can only be decided late till bootmem_init() is called [1]. And we need to map the crashkernel region with base page granularity when doing linear mapping, because kdump needs to protect the crashkernel region via set_memory_valid(,0) after kdump kernel loading. However, arm64 doesn't support well on splitting the built block or section mapping due to some cpu reststriction [2]. And unfortunately, the linear mapping is done before bootmem_init(). To resolve the above conflict on arm64, the compromise is enforcing to take base page mapping for the entire linear mapping if crashkernel is set, and CONFIG_ZONE_DMA or CONFIG_ZONE_DMA32 is enabed. Hence performance is sacrificed. Solution: ========= Comparing with the base page mapping for the whole linear region, it's better to take off the protection on crashkernel memory region for the time being because the anticipated stamping on crashkernel memory region could only happen in a chance in one million, while the base page mapping for the whole linear region is mitigating arm64 systems with crashkernel set always. [1] https://lore.kernel.org/all/YrIIJkhKWSuAqkCx@arm.com/T/#u [2] https://lore.kernel.org/linux-arm-kernel/20190911182546.17094-1-nsaenzjulienne@suse.de/T/ Signed-off-by: Baoquan He Acked-by: Catalin Marinas Acked-by: Mike Rapoport (IBM) Reviewed-by: Zhen Lei Link: https://lore.kernel.org/r/20230407011507.17572-2-bhe@redhat.com Signed-off-by: Will Deacon commit f5eff5591b8f9c5effd25c92c758a127765f74c1 Author: Lukas Wunner Date: Tue Apr 11 08:21:02 2023 +0200 PCI: pciehp: Fix AB-BA deadlock between reset_lock and device_lock In 2013, commits 2e35afaefe64 ("PCI: pciehp: Add reset_slot() method") 608c388122c7 ("PCI: Add slot reset option to pci_dev_reset()") amended PCIe hotplug to mask Presence Detect Changed events during a Secondary Bus Reset. The reset thus no longer causes gratuitous slot bringdown and bringup. However the commits neglected to serialize reset with code paths reading slot registers. For instance, a slot bringup due to an earlier hotplug event may see the Presence Detect State bit cleared during a concurrent Secondary Bus Reset. In 2018, commit 5b3f7b7d062b ("PCI: pciehp: Avoid slot access during reset") retrofitted the missing locking. It introduced a reset_lock which serializes a Secondary Bus Reset with other parts of pciehp. Unfortunately the locking turns out to be overzealous: reset_lock is held for the entire enumeration and de-enumeration of hotplugged devices, including driver binding and unbinding. Driver binding and unbinding acquires device_lock while the reset_lock of the ancestral hotplug port is held. A concurrent Secondary Bus Reset acquires the ancestral reset_lock while already holding the device_lock. The asymmetric locking order in the two code paths can lead to AB-BA deadlocks. Michael Haeuptle reports such deadlocks on simultaneous hot-removal and vfio release (the latter implies a Secondary Bus Reset): pciehp_ist() # down_read(reset_lock) pciehp_handle_presence_or_link_change() pciehp_disable_slot() __pciehp_disable_slot() remove_board() pciehp_unconfigure_device() pci_stop_and_remove_bus_device() pci_stop_bus_device() pci_stop_dev() device_release_driver() device_release_driver_internal() __device_driver_lock() # device_lock() SYS_munmap() vfio_device_fops_release() vfio_device_group_close() vfio_device_close() vfio_device_last_close() vfio_pci_core_close_device() vfio_pci_core_disable() # device_lock() __pci_reset_function_locked() pci_reset_bus_function() pci_dev_reset_slot_function() pci_reset_hotplug_slot() pciehp_reset_slot() # down_write(reset_lock) Ian May reports the same deadlock on simultaneous hot-removal and an AER-induced Secondary Bus Reset: aer_recover_work_func() pcie_do_recovery() aer_root_reset() pci_bus_error_reset() pci_slot_reset() pci_slot_lock() # device_lock() pci_reset_hotplug_slot() pciehp_reset_slot() # down_write(reset_lock) Fix by releasing the reset_lock during driver binding and unbinding, thereby splitting and shrinking the critical section. Driver binding and unbinding is protected by the device_lock() and thus serialized with a Secondary Bus Reset. There's no need to additionally protect it with the reset_lock. However, pciehp does not bind and unbind devices directly, but rather invokes PCI core functions which also perform certain enumeration and de-enumeration steps. The reset_lock's purpose is to protect slot registers, not enumeration and de-enumeration of hotplugged devices. That would arguably be the job of the PCI core, not the PCIe hotplug driver. After all, an AER-induced Secondary Bus Reset may as well happen during boot-time enumeration of the PCI hierarchy and there's no locking to prevent that either. Exempting *de-enumeration* from the reset_lock is relatively harmless: A concurrent Secondary Bus Reset may foil config space accesses such as PME interrupt disablement. But if the device is physically gone, those accesses are pointless anyway. If the device is physically present and only logically removed through an Attention Button press or the sysfs "power" attribute, PME interrupts as well as DMA cannot come through because pciehp_unconfigure_device() disables INTx and Bus Master bits. That's still protected by the reset_lock in the present commit. Exempting *enumeration* from the reset_lock also has limited impact: The exempted call to pci_bus_add_device() may perform device accesses through pcibios_bus_add_device() and pci_fixup_device() which are now no longer protected from a concurrent Secondary Bus Reset. Otherwise there should be no impact. In essence, the present commit seeks to fix the AB-BA deadlocks while still retaining a best-effort reset protection for enumeration and de-enumeration of hotplugged devices -- until a general solution is implemented in the PCI core. Link: https://lore.kernel.org/linux-pci/CS1PR8401MB0728FC6FDAB8A35C22BD90EC95F10@CS1PR8401MB0728.NAMPRD84.PROD.OUTLOOK.COM Link: https://lore.kernel.org/linux-pci/20200615143250.438252-1-ian.may@canonical.com Link: https://lore.kernel.org/linux-pci/ce878dab-c0c4-5bd0-a725-9805a075682d@amd.com Link: https://lore.kernel.org/linux-pci/ed831249-384a-6d35-0831-70af191e9bce@huawei.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=215590 Fixes: 5b3f7b7d062b ("PCI: pciehp: Avoid slot access during reset") Link: https://lore.kernel.org/r/fef2b2e9edf245c049a8c5b94743c0f74ff5008a.1681191902.git.lukas@wunner.de Reported-by: Michael Haeuptle Reported-by: Ian May Reported-by: Andrey Grodzovsky Reported-by: Rahul Kumar Reported-by: Jialin Zhang Tested-by: Anatoli Antonovitch Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v4.19+ Cc: Dan Stein Cc: Ashok Raj Cc: Alex Michon Cc: Xiongfeng Wang Cc: Alex Williamson Cc: Mika Westerberg Cc: Sathyanarayanan Kuppuswamy commit 73e68984cf18ca00fd66e6cb53b3bc06492aafa4 Author: Teo Couprie Diaz Date: Tue Mar 14 14:00:38 2023 +0000 arm64: compat: Remove defines now in asm-generic Some generic COMPAT definitions have been consolidated in asm-generic/compat.h by commit 84a0c977ab98 ("asm-generic: compat: Cleanup duplicate definitions") Remove those that are already defined to the same value there from arm64 asm/compat.h. Signed-off-by: Teo Couprie Diaz Reviewed-by: Guo Ren Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230314140038.252908-1-teo.coupriediaz@arm.com Signed-off-by: Will Deacon commit 606012dddebbc4123d51a2223e2b26ed6c746696 Author: Ron Lee Date: Wed Apr 12 00:02:13 2023 +0800 PCI: Fix up L1SS capability for Intel Apollo Lake Root Port On Google Coral and Reef family Chromebooks with Intel Apollo Lake SoC, firmware clobbers the header of the L1 PM Substates capability and the previous capability when returning from D3cold to D0. Save those headers at enumeration-time and restore them at resume. [bhelgaas: The main benefit is to make the lspci output after resume correct. Apparently there's little or no effect on power consumption.] Link: https://lore.kernel.org/linux-pci/CAFJ_xbq0cxcH-cgpXLU4Mjk30+muWyWm1aUZGK7iG53yaLBaQg@mail.gmail.com/T/#u Link: https://lore.kernel.org/r/20230411160213.4453-1-ron.lee@intel.com Signed-off-by: Ron Lee Signed-off-by: Bjorn Helgaas commit 414c109bdf496195269bc03d40841fe67fc2f839 Author: Mark Rutland Date: Thu Apr 6 16:27:59 2023 +0100 arm64: mm: always map fixmap at page granularity Today the fixmap code largely maps elements at PAGE_SIZE granularity, but we special-case the FDT mapping such that it can be mapped with 2M block mappings when 4K pages are in use. The original rationale for this was simplicity, but it has some unfortunate side-effects, and complicates portions of the fixmap code (i.e. is not so simple after all). The FDT can be up to 2M in size but is only required to have 8-byte alignment, and so it may straddle a 2M boundary. Thus when using 2M block mappings we may map up to 4M of memory surrounding the FDT. This is unfortunate as most of that memory will be unrelated to the FDT, and any pages which happen to share a 2M block with the FDT will by mapped with Normal Write-Back Cacheable attributes, which might not be what we want elsewhere (e.g. for carve-outs using Non-Cacheable attributes). The logic to handle mapping the FDT with 2M blocks requires some special cases in the fixmap code, and ties it to the early page table configuration by virtue of the SWAPPER_TABLE_SHIFT and SWAPPER_BLOCK_SIZE constants used to determine the granularity used to map the FDT. This patch simplifies the FDT logic and removes the unnecessary mappings of surrounding pages by always mapping the FDT at page granularity as with all other fixmap mappings. To do so we statically reserve multiple PTE tables to cover the fixmap VA range. Since the FDT can be at most 2M, for 4K pages we only need to allocate a single additional PTE table, and for 16K and 64K pages the existing single PTE table is sufficient. The PTE table allocation scales with the number of slots reserved in the fixmap, and so this also makes it easier to add more fixmap entries if we require those in future. Our VA layout means that the fixmap will always fall within a single PMD table (and consequently, within a single PUD/P4D/PGD entry), which we can verify at compile time with a static_assert(). With that assert a number of runtime warnings become impossible, and are removed. I've boot-tested this patch with both 4K and 64K pages. Signed-off-by: Mark Rutland Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Ryan Roberts Cc: Will Deacon Reviewed-by: Ryan Roberts Link: https://lore.kernel.org/r/20230406152759.4164229-4-mark.rutland@arm.com Signed-off-by: Will Deacon commit b97547761b02cc95e0e6be827dc9ca9da8142761 Author: Mark Rutland Date: Thu Apr 6 16:27:58 2023 +0100 arm64: mm: move fixmap code to its own file Over time, arm64's mm/mmu.c has become increasingly large and painful to navigate. Move the fixmap code to its own file where it can be understood in isolation. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Ryan Roberts Cc: Will Deacon Reviewed-by: Ryan Roberts Link: https://lore.kernel.org/r/20230406152759.4164229-3-mark.rutland@arm.com Signed-off-by: Will Deacon commit 32f5b6995f790ac8fc048d3afd6b83c82074aedf Author: Mark Rutland Date: Thu Apr 6 16:27:57 2023 +0100 arm64: add FIXADDR_TOT_{START,SIZE} Currently arm64's FIXADDR_{START,SIZE} definitions only cover the runtime fixmap slots (and not the boot-time fixmap slots), but the code for creating the fixmap assumes that these definitions cover the entire fixmap range. This means that the ptdump boundaries are reported in a misleading way, missing the VA region of the runtime slots. In theory this could also cause the fixmap creation to go wrong if the boot-time fixmap slots end up spilling into a separate PMD entry, though luckily this is not currently the case in any configuration. While it seems like we could extend FIXADDR_{START,SIZE} to cover the entire fixmap area, core code relies upon these *only* covering the runtime slots. For example, fix_to_virt() and virt_to_fix() try to reject manipulation of the boot-time slots based upon FIXADDR_{START,SIZE}, while __fix_to_virt() and __virt_to_fix() can handle any fixmap slot. This patch follows the lead of x86 in commit: 55f49fcb879fbeeb ("x86/mm: Fix overlap of i386 CPU_ENTRY_AREA with FIX_BTMAP") ... and add new FIXADDR_TOT_{START,SIZE} definitions which cover the entire fixmap area, using these for the fixmap creation and ptdump code. As the boot-time fixmap slots are now rejected by fix_to_virt(), the early_fixmap_init() code is changed to consistently use __fix_to_virt(), as it already does in a few cases. Signed-off-by: Mark Rutland Cc: Anshuman Khandual Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Ryan Roberts Cc: Will Deacon Reviewed-by: Ryan Roberts Link: https://lore.kernel.org/r/20230406152759.4164229-2-mark.rutland@arm.com Signed-off-by: Will Deacon commit fd35174e13f98f9232c4aa66689816731d34ca28 Author: Tom Rix Date: Tue Mar 21 14:24:14 2023 -0400 drm/vmwgfx: remove unused vmw_overlay function clang with W=1 reports drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:56:35: error: unused function 'vmw_overlay' [-Werror,-Wunused-function] static inline struct vmw_overlay *vmw_overlay(struct drm_device *dev) ^ This function is not used, so remove it. Signed-off-by: Tom Rix Reviewed-by: Nick Desaulniers Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20230321182414.1826372-1-trix@redhat.com commit b5ecc19e684eee1df32a035b7d981932f344fc67 Author: Mark Rutland Date: Tue Apr 11 17:29:43 2023 +0100 arm64: stacktrace: always inline core stacktrace functions The arm64 stacktrace code can be used in kprobe context, and so cannot be safely probed. Some (but not all) of the unwind functions are annotated with `NOKPROBE_SYMBOL()` to ensure this, with others markes as `__always_inline`, relying on the top-level unwind function being marked as `noinstr`. This patch has stacktrace.c consistently mark the internal stacktrace functions as `__always_inline`, removing the need for NOKPROBE_SYMBOL() as the top-level unwind function (arch_stack_walk()) is marked as `noinstr`. This is more consistent and is a simpler pattern to follow for future additions to stacktrace.c. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Reviewed-by: Kalesh Singh Cc: Catalin Marinas Cc: Madhavan T. Venkataraman Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20230411162943.203199-4-mark.rutland@arm.com Signed-off-by: Will Deacon commit ead6122c289eec06bc1bd167442dfab358fafefb Author: Mark Rutland Date: Tue Apr 11 17:29:42 2023 +0100 arm64: stacktrace: move dump functions to end of file For historical reasons, the backtrace dumping functions are placed in the middle of stacktrace.c, despite using functions defined later. For clarity, and to make subsequent refactoring easier, move the dumping functions to the end of stacktrace.c There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Reviewed-by: Kalesh Singh Cc: Catalin Marinas Cc: Madhavan T. Venkataraman Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20230411162943.203199-3-mark.rutland@arm.com Signed-off-by: Will Deacon commit 9e09d445f1cab518eedf4454d119ead27979b8f4 Author: Mark Rutland Date: Tue Apr 11 17:29:41 2023 +0100 arm64: stacktrace: recover return address for first entry The function which calls the top-level backtracing function may have been instrumented with ftrace and/or kprobes, and hence the first return address may have been rewritten. Factor out the existing fgraph / kretprobes address recovery, and use this for the first address. As the comment for the fgraph case isn't all that helpful, I've also dropped that. Signed-off-by: Mark Rutland Reviewed-by: Kalesh Singh Cc: Catalin Marinas Cc: Madhavan T. Venkataraman Cc: Mark Brown Cc: Will Deacon Link: https://lore.kernel.org/r/20230411162943.203199-2-mark.rutland@arm.com Signed-off-by: Will Deacon commit 03a405b7a522700a654b79903312d0a305bdce0d Author: Aaron Lewis Date: Tue Apr 4 17:45:20 2023 -0700 KVM: selftests: Add test to verify KVM's supported XCR0 Check both architectural rules and KVM's ABI for KVM_GET_SUPPORTED_CPUID to ensure the supported xfeatures[1] don't violate any of them. The architectural rules[2] and KVM's contract with userspace ensure for a given feature, e.g. sse, avx, amx, etc... their associated xfeatures are either all sets or none of them are set, and any dependencies are enabled if needed. [1] EDX:EAX of CPUID.(EAX=0DH,ECX=0) [2] SDM vol 1, 13.3 ENABLING THE XSAVE FEATURE SET AND XSAVE-ENABLED FEATURES Cc: Mingwei Zhang Signed-off-by: Aaron Lewis [sean: expand comments, use a fancy X86_PROPERTY] Reviewed-by: Aaron Lewis Tested-by: Aaron Lewis Link: https://lore.kernel.org/r/20230405004520.421768-7-seanjc@google.com Signed-off-by: Sean Christopherson commit 28f2302584af8ed60e2108bf40762a5c40ecb372 Author: Aaron Lewis Date: Tue Apr 4 17:45:19 2023 -0700 KVM: selftests: Add all known XFEATURE masks to common code Add all known XFEATURE masks to processor.h to make them more broadly available in KVM selftests. Relocate and clean up the exiting AMX (XTILE) defines in processor.h, e.g. drop the intermediate define and use BIT_ULL. Signed-off-by: Aaron Lewis Reviewed-by: Aaron Lewis Tested-by: Aaron Lewis Link: https://lore.kernel.org/r/20230405004520.421768-6-seanjc@google.com Signed-off-by: Sean Christopherson commit 7040e54fddf681758800d7375e728557213366f9 Author: Sean Christopherson Date: Tue Apr 4 17:45:18 2023 -0700 KVM: selftests: Rework dynamic XFeature helper to take mask, not bit Take the XFeature mask in __vm_xsave_require_permission() instead of the bit so that there's no need to define macros for both the bit and the mask. Asserting that only a single bit is set and retrieving said bit is easy enough via log2 helpers. Opportunistically clean up the error message for the ARCH_REQ_XCOMP_GUEST_PERM sanity check. Reviewed-by: Aaron Lewis Tested-by: Aaron Lewis Link: https://lore.kernel.org/r/20230405004520.421768-5-seanjc@google.com Signed-off-by: Sean Christopherson commit b213812d3f4c29502d46f82e40a82cf959670e58 Author: Aaron Lewis Date: Tue Apr 4 17:45:17 2023 -0700 KVM: selftests: Move XGETBV and XSETBV helpers to common code The instructions XGETBV and XSETBV are useful to other tests. Move them to processor.h to make them more broadly available. No functional change intended. Reviewed-by: Jim Mattson Signed-off-by: Aaron Lewis Reviewed-by: Mingwei Zhang [sean: reword shortlog] Reviewed-by: Aaron Lewis Tested-by: Aaron Lewis Link: https://lore.kernel.org/r/20230405004520.421768-4-seanjc@google.com Signed-off-by: Sean Christopherson commit 55cd57b596e86140503214eafc8fb62c9c544e8f Author: Sean Christopherson Date: Tue Apr 4 17:45:16 2023 -0700 KVM: x86: Filter out XTILE_CFG if XTILE_DATA isn't permitted Filter out XTILE_CFG from the supported XCR0 reported to userspace if the current process doesn't have access to XTILE_DATA. Attempting to set XTILE_CFG in XCR0 will #GP if XTILE_DATA is also not set, and so keeping XTILE_CFG as supported results in explosions if userspace feeds KVM_GET_SUPPORTED_CPUID back into KVM and the guest doesn't sanity check CPUID. Fixes: 445ecdf79be0 ("kvm: x86: Exclude unpermitted xfeatures at KVM_GET_SUPPORTED_CPUID") Reported-by: Aaron Lewis Reviewed-by: Aaron Lewis Tested-by: Aaron Lewis Link: https://lore.kernel.org/r/20230405004520.421768-3-seanjc@google.com Signed-off-by: Sean Christopherson commit 6be3ae45f567cdebb5b9938137bf3445ceacf9fb Author: Aaron Lewis Date: Tue Apr 4 17:45:15 2023 -0700 KVM: x86: Add a helper to handle filtering of unpermitted XCR0 features Add a helper, kvm_get_filtered_xcr0(), to dedup code that needs to account for XCR0 features that require explicit opt-in on a per-process basis. In addition to documenting when KVM should/shouldn't consult xstate_get_guest_group_perm(), the helper will also allow sanitizing the filtered XCR0 to avoid enumerating architecturally illegal XCR0 values, e.g. XTILE_CFG without XTILE_DATA. No functional changes intended. Signed-off-by: Aaron Lewis Reviewed-by: Mingwei Zhang [sean: rename helper, move to x86.h, massage changelog] Reviewed-by: Aaron Lewis Tested-by: Aaron Lewis Link: https://lore.kernel.org/r/20230405004520.421768-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 3c497f624d40171ebead1a6705793100d92ecb85 Author: Mathieu Poirier Date: Fri Apr 7 10:14:29 2023 -0600 remoteproc: imx_dsp_rproc: Fix kernel test robot sparse warning This patch fixes the kernel test robot warning reported here: https://lore.kernel.org/bpf/642f916b.pPIKZ%2Fl%2F%2Fbw8tvIH%25lkp@intel.com/T/ Fixes: 408ec1ff0caa ("remoteproc: imx_dsp_rproc: Add custom memory copy implementation for i.MX DSP Cores") Link: https://lore.kernel.org/r/20230407161429.3973177-1-mathieu.poirier@linaro.org Tested-by: Iuliana Prodan Reviewed-by: Iuliana Prodan Signed-off-by: Mathieu Poirier commit 03f5bd75a4c19714a929a0f4e7bbf36b49e874c1 Author: Dave Wysochanski Date: Mon Feb 20 08:43:08 2023 -0500 NFS: Remove fscache specific trace points and NFS_INO_FSCACHE bit The NFS specific trace points are no longer needed as tracing is well covered by netfs and fscache. Signed-off-by: Dave Wysochanski Reviewed-by: Jeff Layton Tested-by: Daire Byrne Signed-off-by: Anna Schumaker commit 0631d5e02a1c722b90c11a47dcb6d83ef88ab47b Author: Dave Wysochanski Date: Mon Feb 20 08:43:07 2023 -0500 NFS: Remove all NFSIOS_FSCACHE counters due to conversion to netfs API The old NFSIOS_FSCACHE counters are no longer accurate or useful with the conversion to the new netfs API. The new API does not have a page based interface, and so the counters in nfs_stat_fscachecounters are no longer obtainable. The new netfs the API has extensive statistics inside /proc/fs/fscache/stats so we no longer need NFS specific fscache stats. Note this also removes the 'fsc:' line from /proc/self/mountstats so it will be a user-visible change. Signed-off-by: Dave Wysochanski Reviewed-by: Jeff Layton Tested-by: Daire Byrne Signed-off-by: Anna Schumaker commit 000dbe0bec058cbf2ca9e156e4a5584f5158b0f9 Author: Dave Wysochanski Date: Mon Feb 20 08:43:06 2023 -0500 NFS: Convert buffered read paths to use netfs when fscache is enabled Convert the NFS buffered read code paths to corresponding netfs APIs, but only when fscache is configured and enabled. The netfs API defines struct netfs_request_ops which must be filled in by the network filesystem. For NFS, we only need to define 5 of the functions, the main one being the issue_read() function. The issue_read() function is called by the netfs layer when a read cannot be fulfilled locally, and must be sent to the server (either the cache is not active, or it is active but the data is not available). Once the read from the server is complete, netfs requires a call to netfs_subreq_terminated() which conveys either how many bytes were read successfully, or an error. Note that issue_read() is called with a structure, netfs_io_subrequest, which defines the IO requested, and contains a start and a length (both in bytes), and assumes the underlying netfs will return a either an error on the whole region, or the number of bytes successfully read. The NFS IO path is page based and the main APIs are the pgio APIs defined in pagelist.c. For the pgio APIs, there is no way for the caller to know how many RPCs will be sent and how the pages will be broken up into underlying RPCs, each of which will have their own completion and return code. In contrast, netfs is subrequest based, a single subrequest may contain multiple pages, and a single subrequest is initiated with issue_read() and terminated with netfs_subreq_terminated(). Thus, to utilze the netfs APIs, NFS needs some way to accommodate the netfs API requirement on the single response to the whole subrequest, while also minimizing disruptive changes to the NFS pgio layer. The approach taken with this patch is to allocate a small structure for each nfs_netfs_issue_read() call, store the final error and number of bytes successfully transferred in the structure, and update these values as each RPC completes. The refcount on the structure is used as a marker for the last RPC completion, is incremented in nfs_netfs_read_initiate(), and decremented inside nfs_netfs_read_completion(), when a nfs_pgio_header contains a valid pointer to the data. On the final put (which signals the final outstanding RPC is complete) in nfs_netfs_read_completion(), call netfs_subreq_terminated() with either the final error value (if one or more READs complete with an error) or the number of bytes successfully transferred (if all RPCs complete successfully). Note that when all RPCs complete successfully, the number of bytes transferred is capped to the length of the subrequest. Capping the transferred length to the subrequest length prevents "Subreq overread" warnings from netfs. This is due to the "aligned_len" in nfs_pageio_add_page(), and the corner case where NFS requests a full page at the end of the file, even when i_size reflects only a partial page (NFS overread). Signed-off-by: Dave Wysochanski Tested-by: Daire Byrne Signed-off-by: Anna Schumaker commit 0f59dca63bf2c329e9afeddae2a7ff91cce4cb44 Author: Florent Revest Date: Wed Apr 5 20:02:47 2023 +0200 arm64: ftrace: Simplify get_ftrace_plt Following recent refactorings, the get_ftrace_plt function only ever gets called with addr = FTRACE_ADDR so its code can be simplified to always return the ftrace trampoline plt. Signed-off-by: Florent Revest Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20230405180250.2046566-3-revest@chromium.org Signed-off-by: Will Deacon commit 2aa6ac03516d078cf0c35aaa273b5cd11ea9734c Author: Florent Revest Date: Wed Apr 5 20:02:46 2023 +0200 arm64: ftrace: Add direct call support This builds up on the CALL_OPS work which extends the ftrace patchsite on arm64 with an ops pointer usable by the ftrace trampoline. This ops pointer is valid at all time. Indeed, it is either pointing to ftrace_list_ops or to the single ops which should be called from that patchsite. There are a few cases to distinguish: - If a direct call ops is the only one tracing a function: - If the direct called trampoline is within the reach of a BL instruction -> the ftrace patchsite jumps to the trampoline - Else -> the ftrace patchsite jumps to the ftrace_caller trampoline which reads the ops pointer in the patchsite and jumps to the direct call address stored in the ops - Else -> the ftrace patchsite jumps to the ftrace_caller trampoline and its ops literal points to ftrace_list_ops so it iterates over all registered ftrace ops, including the direct call ops and calls its call_direct_funcs handler which stores the direct called trampoline's address in the ftrace_regs and the ftrace_caller trampoline will return to that address instead of returning to the traced function Signed-off-by: Florent Revest Co-developed-by: Mark Rutland Signed-off-by: Mark Rutland Link: https://lore.kernel.org/r/20230405180250.2046566-2-revest@chromium.org Signed-off-by: Will Deacon commit f89b30b8555a853d47fe1affd4da9e9405bcdc8c Merge: e8d018dd0257f fee86a4ed536f Author: Will Deacon Date: Tue Apr 11 18:04:05 2023 +0100 Merge tag 'trace-direct-v6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace into for-next/ftrace Pull in ftrace trampoline updates from Steve so that we can implement support for direct calls for arm64 on top: tracing: Direct trampoline updates Updates to the direct trampoline to allow ARM64 to have direct trampolines. commit 88a4d7bdeec97890cd543b58dd3588f1f879f51b Author: Dave Wysochanski Date: Mon Feb 20 08:43:05 2023 -0500 NFS: Configure support for netfs when NFS fscache is configured As first steps for support of the netfs library when NFS_FSCACHE is configured, add NETFS_SUPPORT to Kconfig and add the required netfs_inode into struct nfs_inode. Using netfs requires we move the VFS inode structure to be stored inside struct netfs_inode, along with the fscache_cookie. Thus, if NFS_FSCACHE is configured, place netfs_inode inside an anonymous union so the vfs_inode memory is the same and we do not need to modify other non-fscache areas of NFS. In addition, inside the NFS fscache code, use the new helpers, netfs_inode() and netfs_i_cookie() helpers, and remove our own helper, nfs_i_fscache(). Later patches will convert NFS fscache to fully use netfs. Signed-off-by: Dave Wysochanski Tested-by: Daire Byrne Signed-off-by: Anna Schumaker commit 01c3a40084a42b7a242776d1e9f8e10d4e96c6ef Author: Dave Wysochanski Date: Mon Feb 20 08:43:04 2023 -0500 NFS: Rename readpage_async_filler to nfs_read_add_folio Rename readpage_async_filler to nfs_read_add_folio to better reflect what this function does (add a folio to the nfs_pageio_descriptor), and simplify arguments to this function by removing struct nfs_readdesc. Signed-off-by: Dave Wysochanski Tested-by: Daire Byrne Signed-off-by: Anna Schumaker commit d56f39f705080f4ff96b92f054b90c6f0826fd02 Author: Alexander Stein Date: Thu Apr 6 11:55:51 2023 +0200 media: i2c: imx290: Add missing \n on dev_err_probe() message Also dev_err_probe message require a trailing \n. Signed-off-by: Alexander Stein Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 66c3b67a687537fbd56b9835ff6eea5d29ad0170 Author: Sakari Ailus Date: Tue Mar 28 14:18:59 2023 +0300 media: ccs: Document CCS static data file names Document the firmware file names for CCS static data for CCS, SMIA++ and SMIA devices. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 86190c53c900cbadbb45b3cd6ab92268627f9992 Author: Sakari Ailus Date: Fri May 13 16:12:54 2022 +0300 media: ccs: Differentiate SMIA and MIPI vendors in static data MIPI CCS uses a 16-bit MIPI manufacturer identifier for firmware filenames compared to older 8-bit identifier used by SMIA. The requested firmware files used the MIPI manufacturer ID even for SMIA compliant devices, effectively making the manufacturer ID 0. While CCS static data is a feature of CCS 1.1, it has no hardware dependencies. Making this feature available for SMIA devices helps adding support for them and avoids requesting ill-generated CCS static data file names. The files are named as: ccs/smiapp-module-vv-mmmm-rrrr.fw, ccs/smiapp-sensor-vv-mmmm-rr.fw and ccs/smia-sensor-vv-mmmm-rr.fw where vv is the manufacturer ID, mmmm is the model ID and rr or rrrr is the revision number. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c31d11e3878e1437a33dae18f31b0ed0dca6a477 Author: Sakari Ailus Date: Thu Apr 6 19:41:03 2023 +0300 media: ccs: Apply module manufacturer hack on non-CCS devices only Some modules don't have any model identification information in the register address space. The driver as a SMIA++ driver attempted to use sensor information in this case. This workaround is definitely not for CCS devices. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 2bef63370bbad0b356d346aad19981e08d2b7776 Author: Sakari Ailus Date: Tue Mar 28 14:11:00 2023 +0300 media: ccs: Support 16-bit sensor revision number register Read 16-bit sensor revision number if the 8-bit register has value 0. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c2fc1693ab3051382f62738f3289910470f3bf39 Author: Sakari Ailus Date: Tue Mar 28 14:39:26 2023 +0300 media: ccs: Add V4L2 controls from properties Add V4L2 controls (currently CAMERA_SENSOR_ROTATION and CAMERA_SENSOR_ORIENTATION) from properties. Signed-off-by: Sakari Ailus Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil commit 6b3980e045bb99a8c54091eb4eca07d2ea484468 Author: Sakari Ailus Date: Tue Mar 28 14:34:42 2023 +0300 media: ccs: Align flipping behaviour with other drivers No longer mirror flipping controls if the sensor is mounted upside down. This way the behaviour of the flipping controls and rotation of the sensor are aligned with the rest of the drivers. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 23c3b904b17360403c2ea7e5af870212a2a2ba3b Author: Jacopo Mondi Date: Tue Jan 17 11:06:03 2023 +0100 media: imx258: Remove mandatory 180 degrees rotation The "rotation" fwnode device property is intended to allow specify the sensor's physical mounting rotation, so that it can be exposed through the read-only V4L2_CID_CAMERA_SENSOR_ROTATION control and applications can decide how to compensate for that. The imx258 driver has read-only VFLIP and HFLIP enabled, resulting in a 180 degrees image rotation being produced by the sensor. But this doesn't imply that the physical mounting rotation should match the driver's implementation. Now that the driver registers V4L2_CID_CAMERA_SENSOR_ROTATION and V4L2_CID_HFLIP/VFLIP correctly, userspace has all the required information to handle the rotation correctly, hence it is not necessary to require the 'rotation' property to be fixed to 180 degrees in DTS. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 6e4731e756cd511e96342f317526d05605c26e8a Author: Jacopo Mondi Date: Tue Jan 17 11:06:02 2023 +0100 media: imx258: Register H/V flip controls Register controls for V4L2_CID_HFLIP and V4L2_CID_VFLIP. The controls are registered as read-only and enabled by default, as the driver embeds a 180 degrees rotation in its programming sequences and only supports that mode of operations. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit c8f30770c62809968ddf584b8ce4400101daa58f Author: Sakari Ailus Date: Fri Mar 31 12:17:45 2023 +0300 media: dt-bindings: ov8856: Assign maintainership to myself Dongchun's e-mail mailbox is no longer available, assign the maintainership to myself. The following message to was undeliverable. The reason for the problem: 5.1.0 - Unknown address error 550-'Relaying mail to dongchun.zhu@mediatek.com is not allowed' Signed-off-by: Sakari Ailus Acked-by: Rob Herring Signed-off-by: Hans Verkuil commit f311baff04083f3ab03359baae6906241700e4ba Author: Sakari Ailus Date: Fri Mar 31 11:57:53 2023 +0300 MAINTAINERS: Assume ov8856 driver maintainership Dongchun's e-mail address is no longer valid, assign the ov8856 driver to myself. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 69f39773a3e9da6345862be9651867c74ba80e60 Author: Bingbu Cao Date: Sat Mar 4 02:15:03 2023 +0800 media: ipu3-cio2: support more camera sensors in cio2-bridge Add more camera sensors into the supported camera sensors list to make cio2-bridge to support more camera sensors. Signed-off-by: Bingbu Cao Reviewed-by: Daniel Scally Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c0bc1ca0b3fe5d27a34e1710fa649b32134fe570 Author: Jim Lai Date: Wed Oct 26 09:35:45 2022 +0800 media: hi556: add 2592x1444 resolution Adding additional cropped 2592x1444 resolution for QHD output from Hi556 sensor Also implement the get_selection pad operation for the Hi556 sensor driver. The supported targets report the sensor's native size, the crop default rectangle and the crop rectangle. Signed-off-by: Jim Lai Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 8255140ee6e17c4547b85b35a94e614ea97e0ff3 Author: Krzysztof Kozlowski Date: Tue Dec 27 15:35:09 2022 +0100 media: venus: drop unused opp_table field documentation The struct venus_format does not have a "opp_table" field. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit af4273b43f2bd9eed313654f49b40e0d19faaae0 Author: Wolfram Sang Date: Tue Mar 7 17:30:33 2023 +0100 media: renesas: fdp1: remove R-Car H3 ES1.* handling R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Reviewed-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 2f13170906607ab7899f106813ea06ee19cc6b75 Author: Wolfram Sang Date: Tue Mar 7 17:30:32 2023 +0100 media: rcar-vin: csi2: remove R-Car H3 ES1.* handling R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Signed-off-by: Wolfram Sang Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 8584e4bea31c678316521b90b58d87179f341fe7 Author: Wolfram Sang Date: Tue Mar 7 17:30:31 2023 +0100 media: rcar-vin: remove R-Car H3 ES1.* handling R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 0f4afd529224aec36cc6d01d08ac7d5e92fb217c Author: Rob Herring Date: Fri Mar 10 08:47:11 2023 -0600 media: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Reviewed-by: Laurent Pinchart Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 567f97bd381fd79fa8563808118fc757cb6fa4ff Author: Bingbu Cao Date: Fri Mar 10 23:19:10 2023 +0800 media: ipu3-cio2: support multiple sensors and VCMs with same HID In current cio2-bridge, it is using the hid name to register software node and software node will create kobject and sysfs entry according to the node name, if there are multiple sensors and VCMs which are sharing same HID name, it will cause the software nodes registration failure: sysfs: cannot create duplicate filename '/kernel/software_nodes/dw9714' ... Call Trace: software_node_register_nodes cio2_bridge_init ... kobject_add_internal failed for dw9714 with -EEXIST, don't try to register things with the same name in the same directory. One solution is appending the sensor link(Mipi Port) in SSDB as suffix of the node name to fix this problem. Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit bd5a03bc5be8cc74c607896cb780a2819389a4dd Author: Laurent Pinchart Date: Fri Mar 24 12:35:29 2023 +0200 media: Accept non-subdev sinks in v4l2_create_fwnode_links_to_pad() The v4l2_create_fwnode_links_to_pad() helper requires the sink pad passed to it to belong to a subdev. This requirement can be lifted easily. Make the function usable for non-subdev sinks, which allows using it with video_device sinks. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 68a9ca452a413d9ce4a9a61926ebf3788adbfb80 Author: Laurent Pinchart Date: Sat Mar 25 22:56:10 2023 +0200 media: i2c: adv7604: Fix range of hue control The ADV7604, ADV7611 and ADV7612 software manuals document the CP_HUE value differently: - For ADV7604 and ADV7611, the hue is specified as an unsigned 8-bit value, and calculated as (CP_HUE[7:0] * 180) / 256 - 90 with the range set to [-90°, 90°]. Additionally, the values 0x00, 0x0f and 0xff are documented as corresponding to -90°, 0° and 90° respectively. - For ADV7612, the hue is specified as a signed 8-bit value in the range [0°, 360°[ without any formula. Additionally, the value 0x00 is documented as corresponding to 0°. The ADV7604 and ADV7611 documentation is clearly wrong as the example values don't correspond to the formula. Furthermore, the [-90°, 90°] range seems incorrect as it would cover only half of the hue space. The ADV7612 documentation is better, although the range should likely be [-180°, 180°[ if the value is signed. Given that the values wrap around, this makes no difference in practice. The hue values have been verified on ADV7612 to follow the documentation. There is a high chance they do as well on ADV7604 and ADV7611. In any case, all software manuals document the register as 8-bit, so the current range of the V4L2 hue control [0, 128] is not correct. Expand it to cover the full 8-bit space, using unsigned values to avoid breaking any application that may rely on 128 being a valid value. Signed-off-by: Laurent Pinchart Reviewed-by: Hans Verkuil Tested-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 4c5681acd75d0449ab5b6054142da93559598e39 Author: Laurent Pinchart Date: Sat Mar 25 22:56:09 2023 +0200 media: i2c: adv7604: Enable video adjustment The video adjustments (contrast, brightness, saturation and hue) are ignored by default by the device when the VID_ADJ_EN bit is clear. The corresponding V4L2 controls exposed by the drivers have thus no effect. Fix this by setting the VID_ADJ_EN bit. Signed-off-by: Laurent Pinchart Reviewed-by: Hans Verkuil Tested-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 0482fbb1c1cc54c9589744690e38316f140647a8 Author: Luca Weiss Date: Thu Mar 23 18:57:51 2023 +0100 media: i2c: ov2685: Make reset gpio optional In some setups XSHUTDOWN is connected to DOVDD when it's unused, therefore treat the reset gpio as optional. Reviewed-by: Jacopo Mondi Signed-off-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 8d561d78aeab47c63825d660eda45d0f75ea1e0f Author: Luca Weiss Date: Thu Mar 23 18:57:50 2023 +0100 media: dt-bindings: ov2685: convert to dtschema Convert the text-based dt-bindings to yaml. Changes from original txt: * Take wording for various properties from other yaml bindings, this removes e.g. volt amount from schema since it isn't really relevant and the datasheet is a better source. * Don't make reset-gpios a required property since it can be tied to DOVDD instead. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Luca Weiss [Sakari Ailus: bump the maxItems for data-lanes to two] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 9d73363d3bcd17a9bb0e8b7cdcdf61cf89d37b04 Author: Luca Weiss Date: Thu Mar 23 18:57:49 2023 +0100 media: dt-bindings: media: rkisp1: complete ov2685 example With the upcoming conversion of ov2685 to dt-schema let's complete the example so validation succeeds. At the same time fix the indentation of the port node in this example. Acked-by: Krzysztof Kozlowski Signed-off-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit a7687fec197596f23954225c99e183e90208bcbb Author: Jason Kim Date: Tue Mar 28 12:14:59 2023 +0900 media: mc-device: remove unnecessary __must_check In the file mc-device.c, the function media_device_register_entity_notify() does not need to have the __must_check attribute since it returns only a value of 0. Therefore, we can remove this attribute and change the function's return type. Signed-off-by: Jason Kim Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 2649c1a20e8e399ee955d0e22192f9992662c3d2 Author: Wei Chen Date: Mon Mar 27 11:58:09 2023 +0000 media: hi846: Fix memleak in hi846_init_controls() hi846_init_controls doesn't clean the allocated ctrl_hdlr in case there is a failure, which causes memleak. Add v4l2_ctrl_handler_free to free the resource properly. Fixes: e8c0882685f9 ("media: i2c: add driver for the SK Hynix Hi-846 8M pixel camera") Signed-off-by: Wei Chen Reviewed-by: Martin Kepplinger Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 5a4e1b5aed2a36a10d6a3b30fafb6b3bf41c3186 Author: Ricardo Ribalda Date: Thu Mar 23 23:44:20 2023 +0100 media: ov8856: Do not check for for module version It the device is probed in non-zero ACPI D state, the module identification is delayed until the first streamon. The module identification has two parts: deviceID and version. To rea the version we have to enable OTP read. This cannot be done during streamon, becase it modifies REG_MODE_SELECT. Since the driver has the same behaviour for all the module versions, do not read the module version from the sensor's OTP. Cc: stable@vger.kernel.org Fixes: 0e014f1a8d54 ("media: ov8856: support device probe in non-zero ACPI D state") Signed-off-by: Ricardo Ribalda Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit ab190665276b8fac178663753f0a745156fcc0f5 Author: Rob Herring Date: Mon Mar 20 18:39:42 2023 -0500 media: dt-bindings: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Reviewed-by: Joe Tessler Reviewed-by: Heiko Stuebner #rockchip Acked-by: Jernej Skrabec Reviewed-by: Laurent Pinchart Reviewed-by: Philipp Zabel Reviewed-by: Neil Armstrong [Sakari Ailus: Drop changes for files in which they had been done already] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit bb4e2e24acdf3316d18138298936c3c8aff2dbfb Author: Christophe JAILLET Date: Sun Mar 26 16:21:16 2023 +0200 media: i2c: ov7670: Use the devm_clk_get_optional() helper Use devm_clk_get_optional() instead of hand writing it. This saves some loC and improves the semantic. Signed-off-by: Christophe JAILLET Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 5276c9df9c2ab9a43b534bfb56bdb10899cd3a22 Author: Sakari Ailus Date: Tue Mar 7 15:49:44 2023 +0200 media: v4l: async: Return async sub-devices to subnotifier list When an async notifier is unregistered, the async sub-devices in the notifier's done list will disappear with the notifier. However this is currently also done to the sub-notifiers that remain registered. Their sub-devices only need to be unbound while the async sub-devices themselves need to be returned to the sub-notifier's waiting list. Do this now. Fixes: 2cab00bb076b ("media: v4l: async: Allow binding notifiers to sub-devices") Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 3a07e82edca0e3fc95970e8e5a6b7838f27cbbe0 Author: Krzysztof Kozlowski Date: Sat Mar 4 13:33:01 2023 +0100 arm64: dts: mediatek: mt8173: correct GPIO keys wakeup gpio-keys,wakeup is a deprecated property. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230304123301.33952-1-krzysztof.kozlowski@linaro.org Signed-off-by: Matthias Brugger commit f010d1b6867c618ee687b101622e827d90b284b9 Author: AngeloGioacchino Del Regno Date: Mon Mar 27 10:36:47 2023 +0200 arm64: dts: mediatek: mt6795-xperia-m5: Add NXP PN547 NFC on I2C3 Add support for the NXP PN547 NFC chip found on this smartphone and configure its pins. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230327083647.22017-18-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit d5ed9a0445fa6c29a17948245ac611159d63daa4 Author: AngeloGioacchino Del Regno Date: Mon Mar 27 10:36:46 2023 +0200 arm64: dts: mediatek: mt6795-xperia-m5: Add Sensortek STK3310 Proximity Add the STK3310 Proximity sensor and its pins. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230327083647.22017-17-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 703c6d03f165183b97526c182aa1d701b40f0453 Author: Luis Chamberlain Date: Sat Mar 11 15:39:44 2023 -0800 sunrpc: simplify one-level sysctl registration for debug_table There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 32e356be32b6676d2d641ed4a4fe088c6d211d92 Author: Luis Chamberlain Date: Sat Mar 11 15:39:43 2023 -0800 sunrpc: move sunrpc_table and proc routines above No need to do a forward declaration for sunrpc_table, just move the sysctls up as everyone else does it. This will make the next change easier to read. This change produces no functional changes. Signed-off-by: Luis Chamberlain Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit c946cb69f238b2bd3e42790b8450f76b62b491f4 Author: Luis Chamberlain Date: Sat Mar 11 15:39:42 2023 -0800 sunrpc: simplify one-level sysctl registration for xs_tunables_table There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 17c6d0ce83406aebc98f8ce16c66f5416106963d Author: Luis Chamberlain Date: Sat Mar 11 15:39:41 2023 -0800 sunrpc: simplify one-level sysctl registration for xr_tunables_table There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 9e49cbef6c723ec6336d06450d2c07c87d6e86d3 Author: AngeloGioacchino Del Regno Date: Mon Mar 27 10:36:43 2023 +0200 arm64: dts: mediatek: mt6795-xperia-m5: Add Synaptics RMI4 Touchscreen Add the RMI4 Touchscreen on I2C2 and its pin definitions. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230327083647.22017-14-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 9415e246ac7376b098eda6aba761b25808434e3c Author: AngeloGioacchino Del Regno Date: Mon Mar 27 10:36:42 2023 +0200 arm64: dts: mediatek: mt6795-xperia-m5: Enable I2C 0-3 busses Properly configure and enable the three i2c controllers that have devices attached on the Sony Xperia M5 smartphone. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230327083647.22017-13-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 7eb1f2c61fb0edf4211ac379a6f2c1c250460f9e Author: AngeloGioacchino Del Regno Date: Mon Mar 27 10:36:40 2023 +0200 arm64: dts: mediatek: mt6795: Add VDECSYS and VENCSYS clocks In prepration for adding the IOMMUs and LARBs of this SoC, add the VDECSYS and VENCSYS clock controller nodes, providing clocks for the vcodec stateful decoder and stateful decoder hardware. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230327083647.22017-11-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 4984563823f0034d3533854c1b50e729f5191089 Author: Sean Christopherson Date: Tue Apr 4 17:23:59 2023 -0700 KVM: nVMX: Emulate NOPs in L2, and PAUSE if it's not intercepted Extend VMX's nested intercept logic for emulated instructions to handle "pause" interception, in quotes because KVM's emulator doesn't filter out NOPs when checking for nested intercepts. Failure to allow emulation of NOPs results in KVM injecting a #UD into L2 on any NOP that collides with the emulator's definition of PAUSE, i.e. on all single-byte NOPs. For PAUSE itself, honor L1's PAUSE-exiting control, but ignore PLE to avoid unnecessarily injecting a #UD into L2. Per the SDM, the first execution of PAUSE after VM-Entry is treated as the beginning of a new loop, i.e. will never trigger a PLE VM-Exit, and so L1 can't expect any given execution of PAUSE to deterministically exit. ... the processor considers this execution to be the first execution of PAUSE in a loop. (It also does so for the first execution of PAUSE at CPL 0 after VM entry.) All that said, the PLE side of things is currently a moot point, as KVM doesn't expose PLE to L1. Note, vmx_check_intercept() is still wildly broken when L1 wants to intercept an instruction, as KVM injects a #UD instead of synthesizing a nested VM-Exit. That issue extends far beyond NOP/PAUSE and needs far more effort to fix, i.e. is a problem for the future. Fixes: 07721feee46b ("KVM: nVMX: Don't emulate instructions in guest mode") Cc: Mathias Krause Cc: stable@vger.kernel.org Reviewed-by: Paolo Bonzini Link: https://lore.kernel.org/r/20230405002359.418138-1-seanjc@google.com Signed-off-by: Sean Christopherson commit a37a512db3fa1b65fe9087003e5b2072cefb3667 Author: Martin Krastev Date: Mon Mar 20 22:09:49 2023 -0400 drm/vmwgfx: Fix Legacy Display Unit atomic drm support Legacy Display Unit (LDU) fb dirty support used a custom fb dirty callback. Latter handled only the DIRTYFB IOCTL presentation path but not the ADDFB2/PAGE_FLIP/RMFB IOCTL path, common for Wayland compositors. Get rid of the custom callback in favor of drm_atomic_helper_dirtyfb and unify the handling of the presentation paths inside of vmw_ldu_primary_plane_atomic_update. This also homogenizes the fb dirty callbacks across all DUs: LDU, SOU and STDU. Signed-off-by: Martin Krastev Reviewed-by: Maaz Mombasawala Fixes: 2f5544ff0300 ("drm/vmwgfx: Use atomic helper function for dirty fb IOCTL") Cc: # v5.0+ Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20230321020949.335012-3-zack@kde.org commit 35d86fb626a2554de5d5916b6e2d47d06b483d37 Author: Zack Rusin Date: Mon Mar 20 22:09:48 2023 -0400 drm/vmwgfx: Print errors when running on broken/unsupported configs virtualbox implemented an incomplete version of the svga device which they decided to drop soon after the initial release. The device was always broken in various ways and never supported by vmwgfx. vmwgfx should refuse to load on those configurations but currently drm has no way of reloading fbdev when the specific pci driver refuses to load, which would leave users without a usable fb. Instead of refusing to load print an error and disable a bunch of functionality that virtualbox never implemented to at least get fb to work on their setup. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Maaz Mombasawala Link: https://patchwork.freedesktop.org/patch/msgid/20230321020949.335012-2-zack@kde.org commit 490438469d493e8f764bea14d47eaf4c2ae7cc80 Author: Martin Krastev Date: Mon Mar 20 22:09:47 2023 -0400 drm/vmwgfx: Drop mksstat_init_record fn as currently unused This internal helper handles a type of mksstat event counter which is currently unused. Remove the routine to avoid compile warnings. Reported-by: kernel test robot Signed-off-by: Martin Krastev Reviewed-by: Maaz Mombasawala Reviewed-by: Zack Rusin Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20230321020949.335012-1-zack@kde.org commit 5ba1cc41bf39fdff1f0a092b34bf2d5bc811dab9 Author: Laurent Pinchart Date: Thu Jul 7 03:26:40 2022 +0300 staging: media: imx: Make imx_media_of_add_csi() static The imx_media_of_add_csi() function is only called in its compilation unit. Make it static and don't export it. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Signed-off-by: Hans Verkuil commit 66ed61b91eaf95645aff39159070b55cc4857cf7 Author: Laurent Pinchart Date: Tue May 10 14:27:40 2022 +0300 staging: media: imx: Drop unused helper functions The imx_media_find_subdev_by_fwnode(), imx_media_find_subdev_by_devname(), imx_media_pipeline_csi2_channel() and imx_media_pipeline_video_device() helper functions are not used. Drop them. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Signed-off-by: Hans Verkuil commit a11c03f063c83214eec9e7cfc151b756d158c358 Author: Laurent Pinchart Date: Sun Feb 6 08:07:33 2022 +0200 staging: media: imx: Drop IMX_MEDIA_GRP_ID_CSI The IMX_MEDIA_GRP_ID_CSI group ID isn't used anymore. Drop it. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Signed-off-by: Hans Verkuil commit c9b79c5d1e0fd6cdaa277114eaa11ea4c74b6e27 Author: Laurent Pinchart Date: Sun Feb 6 07:42:20 2022 +0200 staging: media: imx: Drop imx_media_subdev_bound() The imx_media_subdev_bound() function is a no-op, and the async notifier .bound() operation is optional. Drop it. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Signed-off-by: Hans Verkuil commit bc85e79d4f4224fffb112a4900a943e0e1824f6a Author: Martin Kepplinger Date: Tue Mar 7 16:00:47 2023 +0100 media: imx: imx8mq-mipi-csi2: Remove unneeded state variable and function Clean up the driver a bit by inlining the imx8mq_mipi_csi_system_enable() function to the callsites and removing the hs_settle variable from the driver state. Signed-off-by: Martin Kepplinger Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 36f6b2a33cd995b3cedd1c5c71788c24b9ef2516 Author: Martin Kepplinger Date: Tue Mar 7 16:00:46 2023 +0100 media: imx: imx8mq-mipi-csi2: Use V4L2 subdev active state Simplify the driver by using the V4L2 subdev active state API to store the active format. Signed-off-by: Martin Kepplinger Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 6cf9e3572ee8aa4d8e847850cedf45e12ac94cfe Author: Alexander Stein Date: Tue Mar 21 08:27:07 2023 +0100 media: imx: imx7-media-csi: Fail on invalid type in VIDIOC_G_SELECTION This device only supports video capture, so bail out if invalid selection type is passed. Signed-off-by: Alexander Stein Reviewed-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit e6f68b1c4048e97bb01b770fd9c487ecce6c5cab Author: Alexander Stein Date: Tue Mar 21 08:27:06 2023 +0100 media: imx: imx7-media-csi: Fix mbus framefmt field init 'field' is zero-initialized to V4L2_FIELD_ANY, which is an invalid value to return to userspace. Instead default to non-interleaving. Signed-off-by: Alexander Stein Reviewed-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit a56b3e151e30da1f71fcb0b5726bb592ee4e30b6 Author: Frieder Schrempf Date: Wed Feb 15 18:16:38 2023 +0100 media: imx: imx7-media-csi: Fix error handling in imx7_csi_async_register() The CSI requires a connected source subdev to operate. If fwnode_graph_get_endpoint_by_id() fails and returns NULL, there is no point in going on. Print an error message and abort instead. Also we don't need to check for an existing asd. Any failure of v4l2_async_nf_add_fwnode_remote() should abort the probe. Suggested-by: Laurent Pinchart Signed-off-by: Frieder Schrempf Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 3664ff82dae1ef9f14f7763d3dd30565e7ef9e14 Author: Yangtao Li Date: Mon Apr 10 00:43:37 2023 +0800 dm: add helper macro for simple DM target module init and exit Eliminate duplicate boilerplate code for simple modules that contain a single DM target driver without any additional setup code. Add a new module_dm() macro, which replaces the module_init() and module_exit() with template functions that call dm_register_target() and dm_unregister_target() respectively. Signed-off-by: Yangtao Li Signed-off-by: Mike Snitzer commit 255f0e14b9b0f8afe53dd6607c7b8ba489100a66 Merge: eafa92152e2ec 054b6c7866c7a Author: Daniel Borkmann Date: Tue Apr 11 18:05:44 2023 +0200 Merge branch 'bpf-verifier-log-rotation' Andrii Nakryiko says: ==================== This patch set changes BPF verifier log behavior to behave as a rotating log, by default. If user-supplied log buffer is big enough to contain entire verifier log output, there is no effective difference. But where previously user supplied too small log buffer and would get -ENOSPC error result and the beginning part of the verifier log, now there will be no error and user will get ending part of verifier log filling up user-supplied log buffer. Which is, in absolute majority of cases, is exactly what's useful, relevant, and what users want and need, as the ending of the verifier log is containing details of verifier failure and relevant state that got us to that failure. So this rotating mode is made default, but for some niche advanced debugging scenarios it's possible to request old behavior by specifying additional BPF_LOG_FIXED (8) flag. This patch set adjusts libbpf to allow specifying flags beyond 1 | 2 | 4. We also add --log-size and --log-fixed options to veristat to be able to both test this functionality manually, but also to be used in various debugging scenarios. We also add selftests that tries many variants of log buffer size to stress-test correctness of internal verifier log bookkeeping code. Further, this patch set is merged with log_size_actual v1 patchset ([0]), which adds ability to get required log buffer size to fit entire verifier log output. This addresses a long-standing limitation, which causes users and BPF loader library writers to guess and pre-size log buffer, often allocating unnecessary extra memory for this or doing extra program verifications just to size logs better, ultimately wasting resources. This was requested most recently by Go BPF library maintainers ([1]). See respective patches for details. A bunch of them some drive-by fixes detecting during working with the code. Some other further refactor and compratmentalize verifier log handling code into kernel/bpf/log.c, which should also make it simpler to integrate such verbose log for other complicated bpf() syscall commands, if necessary. The rest are actual logic to calculate maximum log buffer size needed and return it to user-space. Few patches wire this on libbpf side, and the rest add selftests to test proper log truncation and log_buf==NULL handling. This turned into a pretty sizable patch set with lots of arithmetics, but hopefully the set of features added to verifier log in this patch set are both useful for BPF users and are self-contained and isolated enough to not cause troubles going forward. v3->v4: - s/log_size_actual/log_true_size/ (Alexei); - log_buf==NULL && log_size==0 don't trigger -ENOSPC (Lorenz); - added WARN_ON_ONCE if we try bpf_vlog_reset() forward (Lorenz); - added selftests for truncation in BPF_LOG_FIXED mode; - fixed edge case in BPF_LOG_FIXED when log_size==1, leaving buf not zero terminated; v2->v3: - typos and comment improvement (Lorenz); - merged with log_size_actual v1 ([0]) patch set (Alexei); - added log_buf==NULL condition allowed (Lorenz); - added BPF_BTF_LOAD logs tests (Lorenz); - more clean up and refactoring of internal verifier log API; v1->v2: - return -ENOSPC even in rotating log mode for preserving backwards compatibility (Lorenz); [0] https://patchwork.kernel.org/project/netdevbpf/list/?series=735213&state=* [1] https://lore.kernel.org/bpf/CAN+4W8iNoEbQzQVbB_o1W0MWBDV4xCJAq7K3f6psVE-kkCfMqg@mail.gmail.com/ ==================== Signed-off-by: Daniel Borkmann commit 054b6c7866c7a2537fffd4aa12d88aac47db60f9 Author: Andrii Nakryiko Date: Thu Apr 6 16:42:05 2023 -0700 selftests/bpf: Add verifier log tests for BPF_BTF_LOAD command Add verifier log tests for BPF_BTF_LOAD command, which are very similar, conceptually, to BPF_PROG_LOAD tests. These are two separate commands dealing with verbose verifier log, so should be both tested separately. Test that log_buf==NULL condition *does not* return -ENOSPC. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-20-andrii@kernel.org commit be983f44274f575e42025130e3c62b8718b0a29a Author: Andrii Nakryiko Date: Thu Apr 6 16:42:04 2023 -0700 selftests/bpf: Add testing of log_buf==NULL condition for BPF_PROG_LOAD Add few extra test conditions to validate that it's ok to pass log_buf==NULL and log_size==0 to BPF_PROG_LOAD command with the intent to get log_true_size without providing a buffer. Test that log_buf==NULL condition *does not* return -ENOSPC. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-19-andrii@kernel.org commit 5787540827a9e2cdecf38166e648b2924a57443f Author: Andrii Nakryiko Date: Thu Apr 6 16:42:03 2023 -0700 selftests/bpf: Add tests to validate log_true_size feature Add additional test cases validating that log_true_size is consistent between fixed and rotating log modes, and that log_true_size can be used *exactly* without causing -ENOSPC, while using just 1 byte shorter log buffer would cause -ENOSPC. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-18-andrii@kernel.org commit 097d8002b754a865beef880e5c1cdc3ef7c2163d Author: Andrii Nakryiko Date: Thu Apr 6 16:42:02 2023 -0700 libbpf: Wire through log_true_size for bpf_btf_load() API Similar to what we did for bpf_prog_load() in previous patch, wire returning of log_true_size value from kernel back to the user through OPTS out field. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230406234205.323208-17-andrii@kernel.org commit 94e55c0fdaf4268bdda2d3b375bc61daba056e85 Author: Andrii Nakryiko Date: Thu Apr 6 16:42:01 2023 -0700 libbpf: Wire through log_true_size returned from kernel for BPF_PROG_LOAD Add output-only log_true_size field to bpf_prog_load_opts to return bpf_attr->log_true_size value back from bpf() syscall. Note, that we have to drop const modifier from opts in bpf_prog_load(). This could potentially cause compilation error for some users. But the usual practice is to define bpf_prog_load_ops as a local variable next to bpf_prog_load() call and pass pointer to it, so const vs non-const makes no difference and won't even come up in most (if not all) cases. There are no runtime and ABI backwards/forward compatibility issues at all. If user provides old struct bpf_prog_load_opts, libbpf won't set new fields. If old libbpf is provided new bpf_prog_load_opts, nothing will happen either as old libbpf doesn't yet know about this new field. Adding a new variant of bpf_prog_load() just for this seems like a big and unnecessary overkill. As a corroborating evidence is the fact that entire selftests/bpf code base required not adjustment whatsoever. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230406234205.323208-16-andrii@kernel.org commit fac08d45e2531f91d8fb3d11fc6576f588049476 Author: Andrii Nakryiko Date: Thu Apr 6 16:42:00 2023 -0700 bpf: Relax log_buf NULL conditions when log_level>0 is requested Drop the log_size>0 and log_buf!=NULL condition when log_level>0. This allows users to request log_true_size of a full log without providing actual (even if small) log buffer. Verifier log handling code was mostly ready to handle NULL log->ubuf, so only few small changes were necessary to prevent NULL log->ubuf from causing problems. Note, that if user provided NULL log_buf with log_level>0 we don't consider this a log truncation, and thus won't return -ENOSPC. We also enforce that either (log_buf==NULL && log_size==0) or (log_buf!=NULL && log_size>0). Suggested-by: Lorenz Bauer Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Reviewed-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-15-andrii@kernel.org commit bdcab4144f5da97cc0fa7e1dd63b8475e10c8f0a Author: Andrii Nakryiko Date: Thu Apr 6 16:41:59 2023 -0700 bpf: Simplify internal verifier log interface Simplify internal verifier log API down to bpf_vlog_init() and bpf_vlog_finalize(). The former handles input arguments validation in one place and makes it easier to change it. The latter subsumes -ENOSPC (truncation) and -EFAULT handling and simplifies both caller's code (bpf_check() and btf_parse()). For btf_parse(), this patch also makes sure that verifier log finalization happens even if there is some error condition during BTF verification process prior to normal finalization step. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-14-andrii@kernel.org commit 47a71c1f9af0a334c9dfa97633c41de4feda4287 Author: Andrii Nakryiko Date: Thu Apr 6 16:41:58 2023 -0700 bpf: Add log_true_size output field to return necessary log buffer size Add output-only log_true_size and btf_log_true_size field to BPF_PROG_LOAD and BPF_BTF_LOAD commands, respectively. It will return the size of log buffer necessary to fit in all the log contents at specified log_level. This is very useful for BPF loader libraries like libbpf to be able to size log buffer correctly, but could be used by users directly, if necessary, as well. This patch plumbs all this through the code, taking into account actual bpf_attr size provided by user to determine if these new fields are expected by users. And if they are, set them from kernel on return. We refactory btf_parse() function to accommodate this, moving attr and uattr handling inside it. The rest is very straightforward code, which is split from the logging accounting changes in the previous patch to make it simpler to review logic vs UAPI changes. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-13-andrii@kernel.org commit fa1c7d5cc404ac3b6e6b4ab6d00b07c76bd819be Author: Andrii Nakryiko Date: Thu Apr 6 16:41:57 2023 -0700 bpf: Keep track of total log content size in both fixed and rolling modes Change how we do accounting in BPF_LOG_FIXED mode and adopt log->end_pos as *logical* log position. This means that we can go beyond physical log buffer size now and be able to tell what log buffer size should be to fit entire log contents without -ENOSPC. To do this for BPF_LOG_FIXED mode, we need to remove a short-circuiting logic of not vsnprintf()'ing further log content once we filled up user-provided buffer, which is done by bpf_verifier_log_needed() checks. We modify these checks to always keep going if log->level is non-zero (i.e., log is requested), even if log->ubuf was NULL'ed out due to copying data to user-space, or if entire log buffer is physically full. We adopt bpf_verifier_vlog() routine to work correctly with log->ubuf == NULL condition, performing log formatting into temporary kernel buffer, doing all the necessary accounting, but just avoiding copying data out if buffer is full or NULL'ed out. With these changes, it's now possible to do this sort of determination of log contents size in both BPF_LOG_FIXED and default rolling log mode. We need to keep in mind bpf_vlog_reset(), though, which shrinks log contents after successful verification of a particular code path. This log reset means that log->end_pos isn't always increasing, so to return back to users what should be the log buffer size to fit all log content without causing -ENOSPC even in the presence of log resetting, we need to keep maximum over "lifetime" of logging. We do this accounting in bpf_vlog_update_len_max() helper. A related and subtle aspect is that with this logical log->end_pos even in BPF_LOG_FIXED mode we could temporary "overflow" buffer, but then reset it back with bpf_vlog_reset() to a position inside user-supplied log_buf. In such situation we still want to properly maintain terminating zero. We will eventually return -ENOSPC even if final log buffer is small (we detect this through log->len_max check). This behavior is simpler to reason about and is consistent with current behavior of verifier log. Handling of this required a small addition to bpf_vlog_reset() logic to avoid doing put_user() beyond physical log buffer dimensions. Another issue to keep in mind is that we limit log buffer size to 32-bit value and keep such log length as u32, but theoretically verifier could produce huge log stretching beyond 4GB. Instead of keeping (and later returning) 64-bit log length, we cap it at UINT_MAX. Current UAPI makes it impossible to specify log buffer size bigger than 4GB anyways, so we don't really loose anything here and keep everything consistently 32-bit in UAPI. This property will be utilized in next patch. Doing the same determination of maximum log buffer for rolling mode is trivial, as log->end_pos and log->start_pos are already logical positions, so there is nothing new there. These changes do incidentally fix one small issue with previous logging logic. Previously, if use provided log buffer of size N, and actual log output was exactly N-1 bytes + terminating \0, kernel logic coun't distinguish this condition from log truncation scenario which would end up with truncated log contents of N-1 bytes + terminating \0 as well. But now with log->end_pos being logical position that could go beyond actual log buffer size, we can distinguish these two conditions, which we do in this patch. This plays nicely with returning log_size_actual (implemented in UAPI in the next patch), as we can now guarantee that if user takes such log_size_actual and provides log buffer of that exact size, they will not get -ENOSPC in return. All in all, all these changes do conceptually unify fixed and rolling log modes much better, and allow a nice feature requested by users: knowing what should be the size of the buffer to avoid -ENOSPC. We'll plumb this through the UAPI and the code in the next patch. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-12-andrii@kernel.org commit 8a6ca6bc553e3c878fa53c506bc6ec281efdc039 Author: Andrii Nakryiko Date: Thu Apr 6 16:41:56 2023 -0700 bpf: Simplify logging-related error conditions handling Move log->level == 0 check into bpf_vlog_truncated() instead of doing it explicitly. Also remove unnecessary goto in kernel/bpf/verifier.c. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-11-andrii@kernel.org commit cbedb42a0da3bb48819b2200af4b4cb5d922c518 Author: Andrii Nakryiko Date: Thu Apr 6 16:41:55 2023 -0700 bpf: Avoid incorrect -EFAULT error in BPF_LOG_KERNEL mode If verifier log is in BPF_LOG_KERNEL mode, no log->ubuf is expected and it stays NULL throughout entire verification process. Don't erroneously return -EFAULT in such case. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-10-andrii@kernel.org commit 971fb5057d787d0a7e7c8cb910207c82e2db920e Author: Andrii Nakryiko Date: Thu Apr 6 16:41:54 2023 -0700 bpf: Fix missing -EFAULT return on user log buf error in btf_parse() btf_parse() is missing -EFAULT error return if log->ubuf was NULL-ed out due to error while copying data into user-provided buffer. Add it, but handle a special case of BPF_LOG_KERNEL in which log->ubuf is always NULL. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-9-andrii@kernel.org commit 24bc80887adb4d6fc0057d4f14fabeaa4502b2a0 Author: Andrii Nakryiko Date: Thu Apr 6 16:41:53 2023 -0700 bpf: Ignore verifier log reset in BPF_LOG_KERNEL mode Verifier log position reset is meaningless in BPF_LOG_KERNEL mode, so just exit early in bpf_vlog_reset() if log->level is BPF_LOG_KERNEL. This avoid meaningless put_user() into NULL log->ubuf. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-8-andrii@kernel.org commit b1a7a480a1120d4f70305f5e8859f527e0efe4a5 Author: Andrii Nakryiko Date: Thu Apr 6 16:41:52 2023 -0700 selftests/bpf: Add fixed vs rotating verifier log tests Add selftests validating BPF_LOG_FIXED behavior, which used to be the only behavior, and now default rotating BPF verifier log, which returns just up to last N bytes of full verifier log, instead of returning -ENOSPC. To stress test correctness of in-kernel verifier log logic, we force it to truncate program's verifier log to all lengths from 1 all the way to its full size (about 450 bytes today). This was a useful stress test while developing the feature. For both fixed and rotating log modes we expect -ENOSPC if log contents doesn't fit in user-supplied log buffer. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-7-andrii@kernel.org commit d0d75c67c45abd3930967dcafc82fd4505400665 Author: Andrii Nakryiko Date: Thu Apr 6 16:41:51 2023 -0700 veristat: Add more veristat control over verifier log options Add --log-size to be able to customize log buffer sent to bpf() syscall for BPF program verification logging. Add --log-fixed to enforce BPF_LOG_FIXED behavior for BPF verifier log. This is useful in unlikely event that beginning of truncated verifier log is more important than the end of it (which with rotating verifier log behavior is the default now). Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230406234205.323208-6-andrii@kernel.org commit e0aee1facccf9f12136600031be4ce21eb810a78 Author: Andrii Nakryiko Date: Thu Apr 6 16:41:50 2023 -0700 libbpf: Don't enforce unnecessary verifier log restrictions on libbpf side This basically prevents any forward compatibility. And we either way just return -EINVAL, which would otherwise be returned from bpf() syscall anyways. Similarly, drop enforcement of non-NULL log_buf when log_level > 0. This won't be true anymore soon. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-5-andrii@kernel.org commit 1216640938035e63bdbd32438e91c9bcc1fd8ee1 Author: Andrii Nakryiko Date: Thu Apr 6 16:41:49 2023 -0700 bpf: Switch BPF verifier log to be a rotating log by default Currently, if user-supplied log buffer to collect BPF verifier log turns out to be too small to contain full log, bpf() syscall returns -ENOSPC, fails BPF program verification/load, and preserves first N-1 bytes of the verifier log (where N is the size of user-supplied buffer). This is problematic in a bunch of common scenarios, especially when working with real-world BPF programs that tend to be pretty complex as far as verification goes and require big log buffers. Typically, it's when debugging tricky cases at log level 2 (verbose). Also, when BPF program is successfully validated, log level 2 is the only way to actually see verifier state progression and all the important details. Even with log level 1, it's possible to get -ENOSPC even if the final verifier log fits in log buffer, if there is a code path that's deep enough to fill up entire log, even if normally it would be reset later on (there is a logic to chop off successfully validated portions of BPF verifier log). In short, it's not always possible to pre-size log buffer. Also, what's worse, in practice, the end of the log most often is way more important than the beginning, but verifier stops emitting log as soon as initial log buffer is filled up. This patch switches BPF verifier log behavior to effectively behave as rotating log. That is, if user-supplied log buffer turns out to be too short, verifier will keep overwriting previously written log, effectively treating user's log buffer as a ring buffer. -ENOSPC is still going to be returned at the end, to notify user that log contents was truncated, but the important last N bytes of the log would be returned, which might be all that user really needs. This consistent -ENOSPC behavior, regardless of rotating or fixed log behavior, allows to prevent backwards compatibility breakage. The only user-visible change is which portion of verifier log user ends up seeing *if buffer is too small*. Given contents of verifier log itself is not an ABI, there is no breakage due to this behavior change. Specialized tools that rely on specific contents of verifier log in -ENOSPC scenario are expected to be easily adapted to accommodate old and new behaviors. Importantly, though, to preserve good user experience and not require every user-space application to adopt to this new behavior, before exiting to user-space verifier will rotate log (in place) to make it start at the very beginning of user buffer as a continuous zero-terminated string. The contents will be a chopped off N-1 last bytes of full verifier log, of course. Given beginning of log is sometimes important as well, we add BPF_LOG_FIXED (which equals 8) flag to force old behavior, which allows tools like veristat to request first part of verifier log, if necessary. BPF_LOG_FIXED flag is also a simple and straightforward way to check if BPF verifier supports rotating behavior. On the implementation side, conceptually, it's all simple. We maintain 64-bit logical start and end positions. If we need to truncate the log, start position will be adjusted accordingly to lag end position by N bytes. We then use those logical positions to calculate their matching actual positions in user buffer and handle wrap around the end of the buffer properly. Finally, right before returning from bpf_check(), we rotate user log buffer contents in-place as necessary, to make log contents contiguous. See comments in relevant functions for details. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Reviewed-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-4-andrii@kernel.org commit 03cc3aa6a53394481f01c16231f99298332066f9 Author: Andrii Nakryiko Date: Thu Apr 6 16:41:48 2023 -0700 bpf: Remove minimum size restrictions on verifier log buffer It's not clear why we have 128 as minimum size, but it makes testing harder and seems unnecessary, as we carefully handle truncation scenarios and use proper snprintf variants. So remove this limitation and just enforce positive length for log buffer. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-3-andrii@kernel.org commit 4294a0a7ab6282c3d92f03de84e762dda993c93d Author: Andrii Nakryiko Date: Thu Apr 6 16:41:47 2023 -0700 bpf: Split off basic BPF verifier log into separate file kernel/bpf/verifier.c file is large and growing larger all the time. So it's good to start splitting off more or less self-contained parts into separate files to keep source code size (somewhat) somewhat under control. This patch is a one step in this direction, moving some of BPF verifier log routines into a separate kernel/bpf/log.c. Right now it's most low-level and isolated routines to append data to log, reset log to previous position, etc. Eventually we could probably move verifier state printing logic here as well, but this patch doesn't attempt to do that yet. Subsequent patches will add more logic to verifier log management, so having basics in a separate file will make sure verifier.c doesn't grow more with new changes. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20230406234205.323208-2-andrii@kernel.org commit 7cfb35d3a80029d1fa697d6fe5a5e89990b5c508 Author: Paul Elder Date: Thu Jul 21 02:22:31 2022 +0900 media: rkisp1: Implement ENUM_FRAMESIZES Implement VIDIOC_ENUM_FRAMESIZES for the rkisp1 capture devices. Signed-off-by: Paul Elder Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil commit 7cb7018c1ae4ed4313c00d367d1030a99f223b0e Author: Paul Elder Date: Wed Jul 13 16:24:58 2022 +0900 media: rkisp1: Add NV16M and NV61M to output formats Add support for NV16M and NV61M as output formats. As NV16, NV61, NV12M and NV21M are already supported, the infrastructure is already in place to support NV16M and NV61M, so it is sufficient to simply add relevant entries to the list of output formats. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil commit 306fbc2e041c227be7c934efe8a49ddb87bd31f1 Author: Tom Rix Date: Thu Mar 30 17:27:53 2023 -0400 dm raid: remove unused d variable clang with W=1 reports drivers/md/dm-raid.c:2212:15: error: variable 'd' set but not used [-Werror,-Wunused-but-set-variable] unsigned int d; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Signed-off-by: Mike Snitzer commit 26cb62a285802ab6d26cdbf11305cd8516871d1a Author: Yu Zhe Date: Fri Mar 17 09:35:54 2023 +0800 dm: remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe Signed-off-by: Mike Snitzer commit 990f61e43c4d3235486707568edf59d67488a575 Author: Yangtao Li Date: Tue Apr 4 11:44:33 2023 -0400 dm mirror: add DMERR message if alloc_workqueue fails Signed-off-by: Yangtao Li Signed-off-by: Mike Snitzer commit b362c733ed7bf312ed729847bc26ba89febc556e Author: Yangtao Li Date: Sat Mar 18 21:16:33 2023 +0800 dm: push error reporting down to dm_register_target() Simplifies each DM target's init method by making dm_register_target() responsible for its error reporting (on behalf of targets). Signed-off-by: Yangtao Li Signed-off-by: Mike Snitzer commit c766c90faf93897b77c9c5daa603cffab85ba907 Author: Miaoqian Lin Date: Fri Jan 6 11:58:09 2023 +0400 media: rcar_fdp1: Fix refcount leak in probe and remove function rcar_fcp_get() take reference, which should be balanced with rcar_fcp_put(). Add missing rcar_fcp_put() in fdp1_remove and the error paths of fdp1_probe() to fix this. Fixes: 4710b752e029 ("[media] v4l: Add Renesas R-Car FDP1 Driver") Signed-off-by: Miaoqian Lin Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart [hverkuil: resolve merge conflict, remove() is now void] Signed-off-by: Hans Verkuil commit 1dc30075fb0fe02b74b1ea7fd1c1c734a89f1448 Author: Tomi Valkeinen Date: Thu Feb 16 11:41:15 2023 +0200 media: vsp1: Add underrun debug print Print underrun interrupts with ratelimited print. Note that we don't enable the underrun interrupt. If we have underruns, we don't want to get flooded with interrupts about them. It's enough to see that an underrun happened at the end of a frame. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 52d8caca3d533cc499f1255be25576ffd936ec95 Author: Laurent Pinchart Date: Fri Jan 20 22:20:31 2023 +0200 media: vsp1: Replace vb2_is_streaming() with vb2_start_streaming_called() The vsp1 driver uses the vb2_is_streaming() function in its .buf_queue() handler to check if the .start_streaming() operation has been called, and decide whether to just add the buffer to an internal queue, or also trigger a hardware run. vb2_is_streaming() relies on the vb2_queue structure's streaming field, which used to be set only after calling the .start_streaming() operation. Commit a10b21532574 ("media: vb2: add (un)prepare_streaming queue ops") changed this, setting the .streaming field in vb2_core_streamon() before enqueuing buffers to the driver and calling .start_streaming(). This broke the vsp1 driver which now believes that .start_streaming() has been called when it hasn't, leading to a crash: [ 881.058705] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020 [ 881.067495] Mem abort info: [ 881.070290] ESR = 0x0000000096000006 [ 881.074042] EC = 0x25: DABT (current EL), IL = 32 bits [ 881.079358] SET = 0, FnV = 0 [ 881.082414] EA = 0, S1PTW = 0 [ 881.085558] FSC = 0x06: level 2 translation fault [ 881.090439] Data abort info: [ 881.093320] ISV = 0, ISS = 0x00000006 [ 881.097157] CM = 0, WnR = 0 [ 881.100126] user pgtable: 4k pages, 48-bit VAs, pgdp=000000004fa51000 [ 881.106573] [0000000000000020] pgd=080000004f36e003, p4d=080000004f36e003, pud=080000004f7ec003, pmd=0000000000000000 [ 881.117217] Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP [ 881.123494] Modules linked in: rcar_fdp1 v4l2_mem2mem [ 881.128572] CPU: 0 PID: 1271 Comm: yavta Tainted: G B 6.2.0-rc1-00023-g6c94e2e99343 #556 [ 881.138061] Hardware name: Renesas Salvator-X 2nd version board based on r8a77965 (DT) [ 881.145981] pstate: 400000c5 (nZcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 881.152951] pc : vsp1_dl_list_add_body+0xa8/0xe0 [ 881.157580] lr : vsp1_dl_list_add_body+0x34/0xe0 [ 881.162206] sp : ffff80000c267710 [ 881.165522] x29: ffff80000c267710 x28: ffff000010938ae8 x27: ffff000013a8dd98 [ 881.172683] x26: ffff000010938098 x25: ffff000013a8dc00 x24: ffff000010ed6ba8 [ 881.179841] x23: ffff00000faa4000 x22: 0000000000000000 x21: 0000000000000020 [ 881.186998] x20: ffff00000faa4000 x19: 0000000000000000 x18: 0000000000000000 [ 881.194154] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 [ 881.201309] x14: 0000000000000000 x13: 746e696174206c65 x12: ffff70000157043d [ 881.208465] x11: 1ffff0000157043c x10: ffff70000157043c x9 : dfff800000000000 [ 881.215622] x8 : ffff80000ab821e7 x7 : 00008ffffea8fbc4 x6 : 0000000000000001 [ 881.222779] x5 : ffff80000ab821e0 x4 : ffff70000157043d x3 : 0000000000000020 [ 881.229936] x2 : 0000000000000020 x1 : ffff00000e4f6400 x0 : 0000000000000000 [ 881.237092] Call trace: [ 881.239542] vsp1_dl_list_add_body+0xa8/0xe0 [ 881.243822] vsp1_video_pipeline_run+0x270/0x2a0 [ 881.248449] vsp1_video_buffer_queue+0x1c0/0x1d0 [ 881.253076] __enqueue_in_driver+0xbc/0x260 [ 881.257269] vb2_start_streaming+0x48/0x200 [ 881.261461] vb2_core_streamon+0x13c/0x280 [ 881.265565] vb2_streamon+0x3c/0x90 [ 881.269064] vsp1_video_streamon+0x2fc/0x3e0 [ 881.273344] v4l_streamon+0x50/0x70 [ 881.276844] __video_do_ioctl+0x2bc/0x5d0 [ 881.280861] video_usercopy+0x2a8/0xc80 [ 881.284704] video_ioctl2+0x20/0x40 [ 881.288201] v4l2_ioctl+0xa4/0xc0 [ 881.291525] __arm64_sys_ioctl+0xe8/0x110 [ 881.295543] invoke_syscall+0x68/0x190 [ 881.299303] el0_svc_common.constprop.0+0x88/0x170 [ 881.304105] do_el0_svc+0x4c/0xf0 [ 881.307430] el0_svc+0x4c/0xa0 [ 881.310494] el0t_64_sync_handler+0xbc/0x140 [ 881.314773] el0t_64_sync+0x190/0x194 [ 881.318450] Code: d50323bf d65f03c0 91008263 f9800071 (885f7c60) [ 881.324551] ---[ end trace 0000000000000000 ]--- [ 881.329173] note: yavta[1271] exited with preempt_count 1 A different regression report sent to the linux-media mailing list ([1]) was answered with a claim that the vb2_is_streaming() function has never been meant for this purpose. The document of the function, as well as of the struct vb2_queue streaming field, is sparse, so this claim may be hard to verify. The information needed by the vsp1 driver to decide how to process queued buffers is also available from the vb2_start_streaming_called() function. Use it instead of vb2_is_streaming() to fix the problem. [1] https://lore.kernel.org/linux-media/545610e7-3446-2b82-60dc-7385fea3774f@redhat.com/ Fixes: a10b21532574 ("media: vb2: add (un)prepare_streaming queue ops") Signed-off-by: Laurent Pinchart Reviewed-by: Hans Verkuil Tested-by: Duy Nguyen Signed-off-by: Hans Verkuil commit 1821d0abb68d095ffaeb559c71228174157ac46f Author: Gaosheng Cui Date: Sun Sep 11 17:15:13 2022 +0800 media: vsp1: Remove unused vsp1_subdev_internal_ops declaration vsp1_subdev_internal_ops has been removed since commit 0efdf0f5eaaf ("[media] v4l: vsp1: Implement and use the subdev pad::init_cfg configuration"), so remove it. Signed-off-by: Gaosheng Cui Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit eafa92152e2ec6318e32b6ddda9c1d95d161000a Author: Alejandro Colomar Date: Tue Apr 11 15:47:47 2023 +0100 bpf: Remove extra whitespace in SPDX tag for syscall/helpers man pages There is an extra whitespace in the SPDX tag, before the license name, in the script for generating man pages for the bpf() syscall and the helpers. It has caused problems in Debian packaging, in the tool that autodetects licenses. Let's clean it up. Fixes: 5cb62b7598f2 ("bpf, docs: Use SPDX license identifier in bpf_doc.py") Signed-off-by: Alejandro Colomar Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230411144747.66734-1-quentin@isovalent.com commit 9c2598d43510eff09c658f9c0e0f921ba1871c4b Author: Björn Töpel Date: Mon Apr 3 08:52:07 2023 +0200 riscv: entry: Save a0 prior syscall_enter_from_user_mode() The RISC-V calling convention passes the first argument, and the return value in the a0 register. For this reason, the a0 register needs some extra care; When handling syscalls, the a0 register is saved into regs->orig_a0, so a0 can be properly restored for, e.g. interrupted syscalls. This functionality was broken with the introduction of the generic entry patches. Here, a0 was saved into orig_a0 after calling syscall_enter_from_user_mode(), which can change regs->a0 for some paths, incorrectly restoring a0. This is resolved, by saving a0 prior doing the syscall_enter_from_user_mode() call. Fixes: f0bddf50586d ("riscv: entry: Convert to generic entry") Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Björn Töpel Reported-by: Conor Dooley Reviewed-by: Conor Dooley Tested-by: Conor Dooley Tested-by: Geert Uytterhoeven Tested-by: Andy Chiu Link: https://lore.kernel.org/r/20230403065207.1070974-1-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit b4e5219985e85dd037a4441884edb62cb58b2671 Author: Moudy Ho Date: Mon Mar 27 11:13:35 2023 +0800 media: platform: mtk-mdp3: reconfigure shared memory For performance and multi-chip support, use dynamic layout instead of statically configured pools. Divide the shared memory into the 3 64-bit aligned layouts listed below: vpu->param_addr -> +-----------------------------------------+ | | | To SCP : Input frame parameters | | (struct img_ipi_frameparam) | | | +-----------------------------------------+ vpu->work_addr -> +-----------------------------------------+ | | | In SCP : Reserve for SCP calculation | | | +-----------------------------------------+ vpu->config_addr -> +-----------------------------------------+ | | | From SCP : Output component config | | (struct img_config) | | | +-----------------------------------------+ Signed-off-by: Moudy Ho Signed-off-by: Hans Verkuil commit 09e694f1e9da4fd9c00e268c41f02c8b8c31cc50 Author: Moudy Ho Date: Mon Mar 27 11:13:34 2023 +0800 media: platform: mtk-mdp3: decompose hardware-related information in shared memory The communication between the MDP3 kernel driver and SCP is to pass a shared memory through the cooperation of "mtk-mdp3-vpu.c" and remoteproc driver. The data structure of this shared memory is defined in "mtk-img-ipi.h", as shown below: vpu->work_addr -> +-----------------------------------------+ | | | To SCP : Input frame parameters | | (struct img_ipi_frameparam) | | | vpu->pool -> +-----------------------------------------+ | | | From SCP : Output component config pool | | (struct img_config) | | | | *struct img_config 1 | | | | | | | | v | | *struct img_config N | | (N = MDP_CONFIG_POOL_SIZE) | +-----------------------------------------+ One output component configuration contains the components currently used by the pipeline, and has the register settings that each component needs to set. Since the quantity, type and function of components on each chip will vary, the effect is that the size of the "struct img_config" and its substructures will be different on each chip. In addition, all chips will have to update their SCP firmware for every change if the output component config structure is defined and shared by a common header. Therefore, all functions that operate on "struct img_config" and its substructures must be separated by chips and so are the relevant definations. Signed-off-by: Moudy Ho Signed-off-by: Hans Verkuil commit da1a8a4f932d336492441b5c81621653eedb21ca Author: Moudy Ho Date: Mon Mar 27 11:13:33 2023 +0800 media: platform: mtk-mdp3: Split general definitions used in MDP3 Separate the generic definitions used in MDP3 to avoid recursive includes when splitting chip-related definitions in further. Signed-off-by: Moudy Ho Signed-off-by: Hans Verkuil commit c4320f9721fd0afe4a3eb8aa87154e66f0f08dfa Author: Moudy Ho Date: Mon Mar 27 11:13:32 2023 +0800 media: platform: mtk-mdp3: dynamically allocate component clocks For extensibility of adding more MDP3 components in the further, the magic number is removed by dynamically allocating component clocks. Signed-off-by: Moudy Ho Signed-off-by: Hans Verkuil commit a5b400ea1c7d83f30dba3562182ffae1f8d1c119 Author: Moudy Ho Date: Mon Mar 27 11:13:31 2023 +0800 media: platform: mtk-mdp3: extend mdp_color format for compressed mode Due to future support for hardware compression formats, the MDP3 internal color format expression needs to be extended. Signed-off-by: Moudy Ho Signed-off-by: Hans Verkuil commit 50709e6343e325c61dd7612afddfd8f38c8eba7c Author: Moudy Ho Date: Mon Mar 27 11:13:30 2023 +0800 media: platform: mtk-mdp3: chip config split about pipe info In MDP3, a pipe is used to represent a data path which consisting of different components and MUTEX, as shown in the following diagram: +----------------------------+ | MUTEX [*1] | +----------------------------+ S ^ S ^ S ^ S ^ S ^ | | | | | | | | | | | | | | | | | | | | +--------------+ | | | | | | | | +-------------+ | +--------------+ | | | | | | +-------------+ | | | +------+ | | | | +------+ | | | | | +------+ | | +------+ | | | | | | | | | | | | | | | | | | | | | | | v E v E v E v E v E +-------+ +-----+ +-------+ +-----+ +-------+ B>--->| RDMA0 |>-->| PQ |>-->| RSZ0 |>-->| PQ |>-->| WROT0 |>-->B +-------+ +-----+ +-------+ +-----+ +-------+ [*1] MUTEX is SOF/EOF signal controller [*2] S = Start of frame (SOF) [*3] E = End of frame (EOF) [*4] B = frame buffer More pipes will be introduced in future chips for applications such as higher frame rate frequency, which should integrate and reorder related information into specific chip config file. Signed-off-by: Moudy Ho Signed-off-by: Hans Verkuil commit b35bf333ff8e7ad6bf4fb40257e27f989ad51cf3 Author: Moudy Ho Date: Mon Mar 27 11:13:29 2023 +0800 media: platform: mtk-mdp3: chip config split about resolution limitations Due to differences in hardware design, the supported max and min resolutions and scaling capabilities will vary, and should be integrated into specific config file. Signed-off-by: Moudy Ho Signed-off-by: Hans Verkuil commit 6b8910e3cb5e9923e75f50ef2d8f8148cc56d3f3 Author: Moudy Ho Date: Mon Mar 27 11:13:28 2023 +0800 media: platform: mtk-mdp3: chip config split about color format Due to differences in hardware design, the supported color formats will vary and should be integrated into specific config file. Signed-off-by: Moudy Ho Signed-off-by: Hans Verkuil commit b385b991ef2f48a45537ce28ce33151a89b32ef2 Author: Moudy Ho Date: Mon Mar 27 11:13:27 2023 +0800 media: platform: mtk-mdp3: chip config split about subcomponents Integrate subcomponent related information into specific config file for further multi-chip compatibility. Signed-off-by: Moudy Ho Signed-off-by: Hans Verkuil commit b59ed26fb48930902614915f185103e2ca54d7d7 Author: Moudy Ho Date: Mon Mar 27 11:13:26 2023 +0800 media: platform: mtk-mdp3: chip config split about component settings For different chips, different types and numbers of components are configured in the MDP3 to achieve the desired application, which will cause ID compatibility problems in the same driver. Subdivide the component ID into two kinds: 1. public_id (compatible with other chips) 2. inner_id (what the current chip actually owns) In addition, the chip configuration related structures of MDP3 components are integrated into specific file. Signed-off-by: Moudy Ho Signed-off-by: Hans Verkuil commit 0cbfa7c9054c164528f2416099eb8f399df707b4 Author: Moudy Ho Date: Mon Mar 27 11:13:25 2023 +0800 media: platform: mtk-mdp3: add files for chip configuration In order to be compatible with more MDP3 chip settings in further, integrate and separate chip-related configurations into specific files. Signed-off-by: Moudy Ho Signed-off-by: Hans Verkuil commit 4168720753ce6c14c5d3a35302fc2e1841383443 Author: Moudy Ho Date: Mon Mar 27 11:13:24 2023 +0800 media: platform: mtk-mdp3: fix potential frame size overflow in mdp_try_fmt_mplane() Fix overflow risk when setting certain formats whose frame size exceeds a RGB24 with 7723x7723 resolution. For example, a 7723x7724 RGB24 frame: 1. bpl (byte per line) = 7723 * 3. 2. Overflow occurs when bpl * 7724 * depth. Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver") Signed-off-by: Moudy Ho Signed-off-by: Hans Verkuil commit 5ce5e0d08e340ab13169a5f33ed5f98000891a61 Author: AngeloGioacchino Del Regno Date: Mon Apr 3 11:33:04 2023 +0200 soc: mediatek: Kconfig: Add MTK_CMDQ dependency to MTK_MMSYS The mtk-mmsys and mutex drivers do have a dependency on MTK_CMDQ, even though both can work with *or* without it: since CMDQ support can be enabled either as module or as built-in, it is necessary to add a depends rule in Kconfig, so that we disallow building both mtk-mmsys and mtk-mutex as built-in if mtk-cmdq-helper is built as a module, otherwise obvious linker issues appear. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230403093304.276418-1-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 53e59b5c4645236f0014d3cc5c24bc71ad3f6120 Merge: 60bbee7db43b9 a27e71a66ee0f Author: Mark Brown Date: Tue Apr 11 16:11:32 2023 +0100 Add support for Rockchip RK860X regulators Merge series from Cristian Ciocaltea : This patch series introduces support for the Rockchip RK860X regulators, while also providing a few fixes and improvements to the existing fan53555 driver. RK8600/RK8601 are quite similar to the FAN53555 regulators. RK8602/RK8603 are a bit different, having a wider output voltage selection range, from 0.5 V to 1.5 V in 6.25 mV steps. They are used in the Rock 5B board to power the ARM Cortex-A76 cores and the NPU. commit 0356c10dbf19b9e1ff3573fb5d1e6fc673b29a3d Author: Yu Zhe Date: Mon Mar 20 14:57:14 2023 +0800 media: au0828: remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe Signed-off-by: Hans Verkuil commit 30cf57da176cca80f11df0d9b7f71581fe601389 Author: Zheng Wang Date: Sat Mar 18 16:50:23 2023 +0800 media: saa7134: fix use after free bug in saa7134_finidev due to race condition In saa7134_initdev, it will call saa7134_hwinit1. There are three function invoking here: saa7134_video_init1, saa7134_ts_init1 and saa7134_vbi_init1. All of them will init a timer with same function. Take saa7134_video_init1 as an example. It'll bound &dev->video_q.timeout with saa7134_buffer_timeout. In buffer_activate, the timer funtcion is started. If we remove the module or device which will call saa7134_finidev to make cleanup, there may be a unfinished work. The possible sequence is as follows, which will cause a typical UAF bug. Fix it by canceling the timer works accordingly before cleanup in saa7134_finidev. CPU0 CPU1 |saa7134_buffer_timeout saa7134_finidev | kfree(dev); | | | saa7134_buffer_next | //use dev Fixes: 1e7126b4a86a ("media: saa7134: Convert timers to use timer_setup()") Signed-off-by: Zheng Wang Signed-off-by: Hans Verkuil commit 5abda7a16698d4d1f47af1168d8fa2c640116b4a Author: Zheng Wang Date: Sat Mar 18 16:15:06 2023 +0800 media: dm1105: Fix use after free bug in dm1105_remove due to race condition In dm1105_probe, it called dm1105_ir_init and bound &dm1105->ir.work with dm1105_emit_key. When it handles IRQ request with dm1105_irq, it may call schedule_work to start the work. When we call dm1105_remove to remove the driver, there may be a sequence as follows: Fix it by finishing the work before cleanup in dm1105_remove CPU0 CPU1 |dm1105_emit_key dm1105_remove | dm1105_ir_exit | rc_unregister_device | rc_free_device | rc_dev_release | kfree(dev); | | | rc_keydown | //use Fixes: 34d2f9bf189c ("V4L/DVB: dm1105: use dm1105_dev & dev instead of dm1105dvb") Signed-off-by: Zheng Wang Signed-off-by: Hans Verkuil commit 91f1312069bdf51ed5f4eb979f90b78351876cc0 Author: Oliver Neukum Date: Thu Mar 16 14:15:07 2023 +0100 usbtv: usbtv_set_regs: the pipe is output We are setting a value. That is output and the pipe has to match that. Signed-off-by: Oliver Neukum Signed-off-by: Hans Verkuil commit b6f790a5767bbc272d2904dedc92227f5457e9f5 Author: Yang Li Date: Tue Mar 14 13:58:26 2023 +0800 media: atmel: atmel-isc: Use devm_platform_ioremap_resource() According to commit 7945f929f1a7 ("drivers: provide devm_platform_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to use devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Reviewed-by: Claudiu Beznea Signed-off-by: Hans Verkuil commit 092e321ab05459b1eb2147b3d01b05a8629f59e5 Author: Niklas Söderlund Date: Wed Feb 22 23:12:49 2023 +0100 media: i2c: adv748x: Report correct DV timings for pattern generator If the pattern generator is enabled the device shall not be queried for timings. Instead the timings programmed shall be reported as they are the ones being used to generate the pattern. Before this change an external HDMI source needed to be connected for the pattern generator to work. The driver would query this external HDMI source for timings and program the pattern generator using those. With this change the user can control the timings and have the pattern generator work without the need of an external HDMI source being connected. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil commit 8a7bc891b9ebe4ba65154d38bbe1b8b43bbb6ef4 Author: Niklas Söderlund Date: Wed Feb 22 23:12:48 2023 +0100 media: i2c: adv748x: Write initial DV timings to device When initializing the HDMI block during probe an initial set of timings are selected. These timings are stored in the drivers private data, but not written to the device. This in itself is not bad, but in s_dv_timings() the timings stored in the drivers private data are compared to the new timings, if they match no action is taken. This creates the corner-case where the timing selected at initialization is the first timings a user want to use as the driver then never writes it to the device preventing proper operation. Fix this by writing the timings to the device at initialization in addition to storing them in the drivers private data. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil commit 1e293874fabf41fb34d58e22153766fd2bf8c6aa Author: Niklas Söderlund Date: Wed Feb 22 23:12:47 2023 +0100 media: i2c: adv748x: Fix lookup of DV timings The loop to match the requested timings with the ones supported by the driver is incorrect. It always iterates thru the whole array of supported modes. The bounds check after the loop always triggers resulting in adv748x_hdmi_set_video_timings() always returning -EINVAL. Fix this by correcting the lookup to break the loop when a match is found. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil commit 89013969e23247661f0514c77f26d60fa083216c Author: Milen Mitkov Date: Fri Dec 9 11:40:37 2022 +0200 media: camss: sm8250: Pipeline starting and stopping for multiple virtual channels Use the multistream series function video_device_pipeline_alloc_start to allows multiple clients of the same pipeline. If the VFE entity is used by another instance of the pipeline, the pipeline won't be stopped. This allows for stopping and starting streams at any point without disrupting the other running streams. To prepare and start multiple virtual channels each CSID source pad corresponding to a virtual channel must be linked to the corresponding IFE entity. CSID pad 1 (1st source pad) corresponds to virtual channel 0, CSID pad 2 corresponds to virtual channel 1 and so on. Each of these must be linked to corresponding IFE RDI port. E.g. to enable vc 0 on CSID0: media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]' To enable vc1 on CSID0: media-ctl -l '"msm_csid0":2->"msm_vfe0_rdi1":0[1]' And so on. Note that on SM8250 each CSID is connected, at the hardware level, to only one IFE. Thus, you must link CSID0 with IFE0, you can't link it with IFE1. Example: the following media controller setup expects multiplexed sensor data on CSIPHY2. Data will be passed on to CSID0, which will demux it to 2 streams - for RDI0 and RD1 ports of IFE0: media-ctl -v -d /dev/media0 -V '"imx577 '22-001a'":0[fmt:SRGGB10/3840x2160 field:none]' media-ctl -V '"msm_csiphy2":0[fmt:SRGGB10/3840x2160]' media-ctl -V '"msm_csid0":0[fmt:SRGGB10/3840x2160]' media-ctl -V '"msm_csid0":1[fmt:SRGGB10/3840x2160]' media-ctl -V '"msm_csid0":2[fmt:SRGGB10/3840x2160]' media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB10/3840x2160]' media-ctl -V '"msm_vfe0_rdi1":0[fmt:SRGGB10/3840x2160]' media-ctl -l '"msm_csiphy2":1->"msm_csid0":0[1]' media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]' media-ctl -l '"msm_csid0":2->"msm_vfe0_rdi1":0[1]' Note: CSID's entity pad 0 is a sink pad, pads 1..4 are source pads To start streaming a v4l2 client must open the corresponding /dev/videoN node. For example, with yavta: yavta -B capture-mplane -c -I -n 5 -f SRGGB10P -s 3840x2160 -F /dev/video0 yavta -B capture-mplane -c -I -n 5 -f SRGGB10P -s 3840x2160 -F /dev/video1 Note that IFEs (vfe0, vfe1) on SM8250 have 3 RDI ports and a single PIX port and IFELites (vfe2, vfe3) have 4 RDI ports and no PIX port. Signed-off-by: Milen Mitkov Reviewed-by: Robert Foss Tested-by: Bryan O'Donoghue Acked-by: Robert Foss Signed-off-by: Hans Verkuil commit 1c4abf0246d2ad5fabc830f1d9cc3944d5a4ae95 Author: Milen Mitkov Date: Fri Dec 9 11:40:36 2022 +0200 media: camss: vfe-480: Multiple outputs support for SM8250 On SM8250 each VFE supports at least 3 RDI channels, or 4 in case of VFE-Lite, so add appropriate IRQ setup and handling. Signed-off-by: Milen Mitkov Reviewed-by: Robert Foss Tested-by: Bryan O'Donoghue Acked-by: Robert Foss Signed-off-by: Hans Verkuil commit 8ce158c1be981bfe49d239c6a33977c65a5d193e Author: Milen Mitkov Date: Fri Dec 9 11:40:35 2022 +0200 media: camss: vfe: Reserve VFE lines on stream start and link to CSID For multiple virtual channels support, each VFE line can be in either ON, RESERVED or OFF states. This allows the starting and stopping of a VFE line independently of other active VFE lines (e.g. already- running lines stay in ON state, and newly-added lines are RESERVED) Also, link the CSID entity's source ports to corresponding VFE lines. Signed-off-by: Milen Mitkov Reviewed-by: Robert Foss Tested-by: Bryan O'Donoghue Acked-by: Robert Foss Signed-off-by: Hans Verkuil commit 3c4ed72a16bc6733cda9c65048af74a2e8eaa0eb Author: Milen Mitkov Date: Fri Dec 9 11:40:34 2022 +0200 media: camss: sm8250: Virtual channels for CSID CSID hardware on SM8250 can demux up to 4 simultaneous streams based on virtual channel (vc) or datatype (dt). The CSID subdevice entity now has 4 source ports that can be enabled/disabled and thus can control which virtual channels are enabled. Datatype demuxing not tested. In order to keep a valid internal state of the subdevice, implicit format propagation from the sink to the source pads has been preserved. However, the format on each source pad can be different and in that case it must be configured explicitly. CSID's s_stream is called when any stream is started or stopped. It will call configure_streams() that will rewrite IRQ settings to HW. When multiple streams are running simultaneously there is an issue when writing IRQ settings for one stream while another is still running, thus avoid re-writing settings if they were not changed in link setup, or by fully powering off the CSID hardware. Signed-off-by: Milen Mitkov Reviewed-by: Robert Foss Tested-by: Bryan O'Donoghue Acked-by: Robert Foss Signed-off-by: Hans Verkuil commit b8aa52913b84f8b59816b95c28d03424a100df7f Author: ruanjinjie Date: Sat Sep 24 15:39:57 2022 +0800 drm/nouveau/disp: make gv100_disp_core_mthd_base static The symbol is not used outside of the file, so mark it static. Fixes the following warning: ./drivers/gpu/drm/nouveau/nvkm/engine/disp/gv100.c:591:1: warning: symbol 'gv100_disp_core_mthd_base' was not declared. Should it be static? Signed-off-by: ruanjinjie Reviewed-by: Karol Herbst Signed-off-by: Karol Herbst Link: https://patchwork.freedesktop.org/patch/msgid/20220924073957.4140388-1-ruanjinjie@huawei.com commit ac9aa21bdf40828583f73ae755dcee6bb1e9b3cb Author: Ben Dooks Date: Thu Dec 29 15:52:49 2022 +0000 drm/nouveau/mc/ga100: make ga100_mc_device static Make ga100_mc_device static as it isn't exported, to fix the following sparse warning: drivers/gpu/drm/nouveau/nvkm/subdev/mc/ga100.c:51:1: warning: symbol 'ga100_mc_device' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Karol Herbst Link: https://patchwork.freedesktop.org/patch/msgid/20221229155249.669436-1-ben-linux@fluff.org commit 24e79e3d1508cb2bed650b0dff45109362c19812 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:24 2023 +0200 media: it913x: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit fc63c5b12a7d1f4bd6c78a2133691dc370930434 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:23 2023 +0200 media: vivid-core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 1727b7164705c09553f1213217501eaf8fbad9ad Author: Uwe Kleine-König Date: Sun Mar 26 16:32:22 2023 +0200 media: visl-core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 19136807ad6931f2a3bc92dc9aa3deb29024b0c3 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:21 2023 +0200 media: vimc-core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit a4e1d46f632a94d2a66c0d9f78fd833b1c25c11a Author: Uwe Kleine-König Date: Sun Mar 26 16:32:20 2023 +0200 media: vim2m: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit b8b615b530a228feb81a0e91e16ffcf60102ebff Author: Uwe Kleine-König Date: Sun Mar 26 16:32:19 2023 +0200 media: vidtv_bridge: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit f3675a017f236a7ffa37c63b0f314167d18287d7 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:18 2023 +0200 media: vicodec-core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 04b5c28bb4387c7f01d8df19fcd90d57994e6a27 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:17 2023 +0200 media: sunxi-cir: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Signed-off-by: Hans Verkuil commit 41d64f00d3409194928ccb6a920a090907244037 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:16 2023 +0200 media: st_rc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit d6db10b14b43cf3614e01f5884cc09ffe3e4e9a3 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:15 2023 +0200 media: mtk-cir: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit e6c0447418d01793c8d92e4edddebcc718dda470 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:14 2023 +0200 media: meson-ir: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit bd8bf77ff80f5457ea9772590d7eba2b93d522dd Author: Uwe Kleine-König Date: Sun Mar 26 16:32:13 2023 +0200 media: meson-ir-tx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit ea4e628f21aaa9bfbf1ba82e3f865be89e36825f Author: Uwe Kleine-König Date: Sun Mar 26 16:32:12 2023 +0200 media: ir-hix5hd2: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit f6fc05fa3e289bb84ff4073b5c3ea7917649f927 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:11 2023 +0200 media: img-ir-core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 66774df1545d909c22436fad58a1d4c4d49fe6d2 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:10 2023 +0200 media: gpio-ir-recv: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 3c1dd02566e168f6abc59a27fdb545050a748a42 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:09 2023 +0200 media: radio-platform-si4713: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 8d4de3f79864bf6a256e3591588368d1ec56af5d Author: Uwe Kleine-König Date: Sun Mar 26 16:32:08 2023 +0200 media: radio-wl1273: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 070003a89f09167b8921dcfc9cfc3278d1123d73 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:07 2023 +0200 media: radio-timb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 830d1151f91885aad30826b1968a376906f28a8a Author: Uwe Kleine-König Date: Sun Mar 26 16:32:06 2023 +0200 media: radio-si476x: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit dbb836e239687d1b3db2d7b65ae207c1249f98a5 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:05 2023 +0200 media: xilinx-vtc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit b8368fbee737b9e6cbc97a812e3790ea2f16160f Author: Uwe Kleine-König Date: Sun Mar 26 16:32:04 2023 +0200 media: xilinx-vipp: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 70a7faec29db31058c69a7fba113f877a9d214fd Author: Uwe Kleine-König Date: Sun Mar 26 16:32:03 2023 +0200 media: xilinx-tpg: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 993bfd14d20010d62f54ee0c7dce1a251f886d96 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:02 2023 +0200 media: xilinx-csi2rxss: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 7234c7258cb4adb51f8474f4fe299381155f41f3 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:01 2023 +0200 media: video-mux: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit e65db25b8d7a3d06b96f735df13a3f7d88c8b688 Author: Uwe Kleine-König Date: Sun Mar 26 16:32:00 2023 +0200 media: via-camera: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit b9294ba9285e555e0e6daafac95704be4a9125c2 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:59 2023 +0200 media: hantro_drv: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit f0f431d3c3aae3be8f40155c21141fd90023a7f5 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:58 2023 +0200 media: vpe: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 5599fadaf861d90b971023ac01592e6625d9305a Author: Uwe Kleine-König Date: Sun Mar 26 16:31:57 2023 +0200 media: isp: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 0a44e5f60617eeb0aa4e7f75bda3943b448a9845 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:56 2023 +0200 media: omap_vout: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 801edb6571286b04eb6ac8ac8175d573f302b3cc Author: Uwe Kleine-König Date: Sun Mar 26 16:31:55 2023 +0200 media: vpif_display: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 973be9663e047c1d08a452a2aecc8f795020c0d2 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:54 2023 +0200 media: vpif_capture: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit add8eb46e72b834a82b9e72b28e71ee0ca344d22 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:53 2023 +0200 media: vpif: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit f57329adcc52d367c605dfe49a83958ab627ca6f Author: Uwe Kleine-König Date: Sun Mar 26 16:31:52 2023 +0200 media: cal: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 2c4727edc8ca9dbc08cca2aedafa66d16a226499 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:51 2023 +0200 media: am437x-vpfe: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 17d32ccde1f313c783bc3cd56128c0731f32d92c Author: Uwe Kleine-König Date: Sun Mar 26 16:31:50 2023 +0200 media: sun8i_rotate: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Signed-off-by: Hans Verkuil commit 98e3987ae6f309bd68582438541ba1ff722b471e Author: Uwe Kleine-König Date: Sun Mar 26 16:31:49 2023 +0200 media: sun8i-di: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Signed-off-by: Hans Verkuil commit d09a2fffe61e88f4051e488ed70bafc54cb2d747 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:48 2023 +0200 media: sun8i_a83t_mipi_csi2: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Signed-off-by: Hans Verkuil commit cdf5e3835c47447aa6995828df1d420859f769f7 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:47 2023 +0200 media: sun6i_mipi_csi2: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Signed-off-by: Hans Verkuil commit 2fc7c4f35338dc9a6576304abfb70628bd90ccd9 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:46 2023 +0200 media: sun6i_csi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Signed-off-by: Hans Verkuil commit a72b9869ece50cdd258c122b5ba403ae66a17d7f Author: Uwe Kleine-König Date: Sun Mar 26 16:31:45 2023 +0200 media: sun4i_csi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Signed-off-by: Hans Verkuil commit 65becc29c9bcd3239cbc592c978cab7b2a9fa717 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:44 2023 +0200 media: stm32-dcmi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 41579d570d8fb568ec4f6267027a01890aefe64d Author: Uwe Kleine-König Date: Sun Mar 26 16:31:43 2023 +0200 media: dma2d: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit b7186d940d21ff8bb7e991b1ad030a290fe004e8 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:42 2023 +0200 media: hva-v4l2: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit cd9a1c4ffda6b0a4568f16c86eb8c94c1e059a72 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:41 2023 +0200 media: delta-v4l2: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 5c5fce0fa617a0e6f9bccf4ac099db93ce35419c Author: Uwe Kleine-König Date: Sun Mar 26 16:31:40 2023 +0200 media: c8sectpfe-core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 5efb273ec9dd9d0575958e028bd04596500aa51d Author: Uwe Kleine-König Date: Sun Mar 26 16:31:39 2023 +0200 media: bdisp-v4l2: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 9709cf5bfc6ca0ce9d6351175f99b98c8b762f4d Author: Uwe Kleine-König Date: Sun Mar 26 16:31:38 2023 +0200 media: s5p_mfc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit f23f0e63ec878ec1d095e4826417a08ad3a0d744 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:37 2023 +0200 media: jpeg-core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 63a99bedf36325bea6ca53e9bba22700520d1b02 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:36 2023 +0200 media: g2d: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 10ded2312724b44fb98f7a94e589c10ad4b602cb Author: Uwe Kleine-König Date: Sun Mar 26 16:31:35 2023 +0200 media: camif-core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 742b0f1d41aa19bfd0d40bcbe936cea5638245c4 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:34 2023 +0200 media: mipi-csis: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 98c58c97fd4dc16b686b8b2899d94f77ed31327e Author: Uwe Kleine-König Date: Sun Mar 26 16:31:33 2023 +0200 media: media-dev: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 323dee6e0002c4f3f6f2046cd7264713c70cd535 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:32 2023 +0200 media: fimc-lite: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit f3af72a278dadab338306ff2b3427ed988e5f025 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:31 2023 +0200 media: fimc-is: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 459ce2141f141aca2e217154287e0ebdb2a18f18 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:30 2023 +0200 media: fimc-is-i2c: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 5de68c11e1ee2ab8091296030b42b4e5ead3ae49 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:29 2023 +0200 media: fimc-core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit ff11de42f8377b2a34409259467472d8890c1511 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:28 2023 +0200 media: gsc-core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 073dcc081b928b4cd4a3f8f5aa2cbb7fa8ba5fb8 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:27 2023 +0200 media: rkisp1-dev: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 067df5670f243996f3979493d00682c7a8c9a651 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:26 2023 +0200 media: rga: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 1f669271ae7e78fb857f47c5072193904c96911d Author: Uwe Kleine-König Date: Sun Mar 26 16:31:25 2023 +0200 media: vsp1_drv: 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 (mostly) ignored 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. 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: Geert Uytterhoeven Signed-off-by: Hans Verkuil commit 23f4acfa8125f29690e3cffd337bc33e05373d7a Author: Uwe Kleine-König Date: Sun Mar 26 16:31:24 2023 +0200 media: sh_vou: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 569d4328d8f294bbe5928fddbe8197d73e37ba73 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:23 2023 +0200 media: rzg2l-csi2: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 76710bde524f24765304524d12709496c5bfe380 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:22 2023 +0200 media: rzg2l-core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit deb64aa72c2e8d422c999edcaa936cc5f6e31f87 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:21 2023 +0200 media: renesas-ceu: 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 (mostly) ignored 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. 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: Geert Uytterhoeven Signed-off-by: Hans Verkuil commit 1031765c5799117fe40d0620c4dfc11e020cf533 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:20 2023 +0200 media: rcar_jpu: 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 (mostly) ignored 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. 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: Geert Uytterhoeven Signed-off-by: Hans Verkuil commit 0e82d3715fd208de567b8e4307fbf91ae5e57db4 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:19 2023 +0200 media: rcar_fdp1: 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 (mostly) ignored 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. 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: Geert Uytterhoeven Signed-off-by: Hans Verkuil commit 2ff72c6c42b98323545c0c3e79b0edd3cef93f66 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:18 2023 +0200 media: rcar_drif: 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 (mostly) ignored 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. 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: Geert Uytterhoeven Signed-off-by: Hans Verkuil commit 4a70c1aafbcae54057f65dd382b7d244849f1e69 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:17 2023 +0200 media: rcar-csi2: 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 (mostly) ignored 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. 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: Geert Uytterhoeven Signed-off-by: Hans Verkuil commit 8ce6911d296869ae40e869095e64871d870eec8c Author: Uwe Kleine-König Date: Sun Mar 26 16:31:16 2023 +0200 media: rcar-core: 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 (mostly) ignored 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. 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: Geert Uytterhoeven Signed-off-by: Hans Verkuil commit b65efa9136d7899ad61485f0549f5749c21b906b Author: Uwe Kleine-König Date: Sun Mar 26 16:31:15 2023 +0200 media: rcar-isp: 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 (mostly) ignored 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. 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: Geert Uytterhoeven Signed-off-by: Hans Verkuil commit f469bdd2cac73b27b3746a08f217b118a6eb7fa9 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:14 2023 +0200 media: rcar-fcp: 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 (mostly) ignored 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. 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: Geert Uytterhoeven Signed-off-by: Hans Verkuil commit 63b9173119e05d4425e7c1869a5b30970b93ddee Author: Uwe Kleine-König Date: Sun Mar 26 16:31:13 2023 +0200 media: venc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 68f9c1de782232c7ffc775b665f4a2d6d6cf14d7 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:12 2023 +0200 media: vdec: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 9283f534ea2e22847a643d6fd874eae79e502a68 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:11 2023 +0200 media: venus: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit d80250819e59c76ee447fd58cbffb6f750a21918 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:10 2023 +0200 media: venus: Warn only once about problems in .remove() The only effect of returning an error code in a remove callback is that the driver core emits a warning. The device is unbound anyhow. As the remove callback already emits a (quite verbose) warning when ret is non-zero, return zero to suppress the additional warning. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 428bbf4be4018aefa26e4d6531779fa8925ecaaf Author: Uwe Kleine-König Date: Sun Mar 26 16:31:09 2023 +0200 media: camss: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 8a7033f806c3679fe02fe0ef98299631cea406cf Author: Uwe Kleine-König Date: Sun Mar 26 16:31:08 2023 +0200 media: mx2_emmaprp: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 1b289dbc937a176bb9397df5eaff8575c55c7771 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:07 2023 +0200 media: imx7-media-csi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 7505faa08cb6152513cb7763be189f47cc721976 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:06 2023 +0200 media: imx-pxp: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 9457f2d955105da62f80cbdf7e6940a4e4037479 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:05 2023 +0200 media: imx-mipi-csis: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 447925334c0614cc78b915b27bca328ee4d470a7 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:04 2023 +0200 media: mxc-jpeg: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 0c43a7413c8ed940d1aa0df758f2b849682a480a Author: Uwe Kleine-König Date: Sun Mar 26 16:31:03 2023 +0200 media: dw100: 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 (mostly) ignored 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. 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: Xavier Roumegue Signed-off-by: Hans Verkuil commit 9045184b76ea4cf2b114ea4700aae8079bdce037 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:02 2023 +0200 media: vde: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 447728bd1c1213fc3e7585129692edf7d2a23342 Author: Uwe Kleine-König Date: Sun Mar 26 16:31:01 2023 +0200 media: microchip-sama7g5-isc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 61263f17195f3b42f6ced26a9c3d243d3c9de54b Author: Uwe Kleine-König Date: Sun Mar 26 16:31:00 2023 +0200 media: microchip-sama5d2-isc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 0b36a5eee515964455e1a3cb80f6eca917eec59c Author: Uwe Kleine-König Date: Sun Mar 26 16:30:59 2023 +0200 media: microchip-csi2dc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit ce27e3315a8a319d540625261c562518016f5083 Author: Uwe Kleine-König Date: Sun Mar 26 16:30:58 2023 +0200 media: mtk_vpu: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit ff183b8b9044473a336d1bdd439928f0ad2003e7 Author: Uwe Kleine-König Date: Sun Mar 26 16:30:57 2023 +0200 media: mtk_vcodec_enc_drv: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit a3afc5b10661fff3e6695ada744c04d030becf73 Author: Uwe Kleine-König Date: Sun Mar 26 16:30:56 2023 +0200 media: mtk_vcodec_dec_drv: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 61a6187dd51b6fffae4be6866af27e87bf6a632b Author: Uwe Kleine-König Date: Sun Mar 26 16:30:55 2023 +0200 media: mtk-mdp3-core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 542c20262613d7ff27f7ed5776595e52983be7d8 Author: Uwe Kleine-König Date: Sun Mar 26 16:30:54 2023 +0200 media: mtk_mdp_core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 413c0d74ed55c39b87a55de1f20fba01dccf6238 Author: Uwe Kleine-König Date: Sun Mar 26 16:30:53 2023 +0200 media: mtk_jpeg_core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 100290bf4040adbe8523ccca003ca563e1b384e0 Author: Uwe Kleine-König Date: Sun Mar 26 16:30:52 2023 +0200 media: marvell: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 94eca0c00aaf5c7f2440effb1587d01a6562198c Author: Uwe Kleine-König Date: Sun Mar 26 16:30:51 2023 +0200 media: marvell: Simplify remove callback Fold mmpcam_remove() into its only caller mmpcam_platform_remove(). Note that cam can never be zero, as the probe function calls platform_set_drvdata() with a non-NULL argument (or returns an error code in which case .remove() won't be called). Also use mmpcam_remove() as the function name for the remove callback to align to mmpcam_probe() for .probe(). Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit c65cee0b875098716fb4198aa331bac04ec0d737 Author: Uwe Kleine-König Date: Sun Mar 26 16:30:50 2023 +0200 media: m2m-deinterlace: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 3c56717a585784edaf01edcfa8650cd7a8c0c47d Author: Uwe Kleine-König Date: Sun Mar 26 16:30:49 2023 +0200 media: pxa_camera: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 42f8f4cddf918433c1c2c9366e166a0ee1c2a64f Author: Uwe Kleine-König Date: Sun Mar 26 16:30:48 2023 +0200 media: coda-common: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 60fa2efb3aedd2cf2ed7ceb311b879e3e81a961e Author: Uwe Kleine-König Date: Sun Mar 26 16:30:47 2023 +0200 media: cdns-csi2tx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit bbb3f635b0e9942b7f1e98acb809b83509560463 Author: Uwe Kleine-König Date: Sun Mar 26 16:30:46 2023 +0200 media: cdns-csi2rx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit a5a86c2ee0050c8162fdf968b42bf8174a238aaa Author: Uwe Kleine-König Date: Sun Mar 26 16:30:45 2023 +0200 media: atmel-isi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 399e00180bb8e29fce5d4fd355c24a6656fbf6b6 Author: Uwe Kleine-König Date: Sun Mar 26 16:30:44 2023 +0200 media: aspeed-video: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit a79495b0423daf34009046280094f324867bcd1b Author: Uwe Kleine-König Date: Sun Mar 26 16:30:43 2023 +0200 media: vpu_drv: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit a3b4ab60bb705d3693caabedc64a44bbb63403ed Author: Uwe Kleine-König Date: Sun Mar 26 16:30:42 2023 +0200 media: vpu_core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 06fc46cae9c40f8b6a9525a26cc96bca58ae25c0 Author: Uwe Kleine-König Date: Sun Mar 26 16:30:41 2023 +0200 media: ge2d: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit cca3af8df861ba98527b65ca07d82b887951170b Author: Uwe Kleine-König Date: Sun Mar 26 16:30:40 2023 +0200 media: allegro-core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit f5b11862ae4b302c788e1fde423a3a6db8191c23 Author: Uwe Kleine-König Date: Sun Mar 26 16:30:39 2023 +0200 media: zd1301_demod: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 297bb597a967e8c912732580180c14e4dc97c6ad Author: Uwe Kleine-König Date: Sun Mar 26 16:30:38 2023 +0200 media: rtl2832_sdr: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 6faac71d36cc9aa0a804bd9c3cb109d0afaeb4dc Author: Uwe Kleine-König Date: Sun Mar 26 16:30:37 2023 +0200 media: tegra_cec: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 1bef2ac893f113107688fc8f90e55d7bad1fcc4a Author: Uwe Kleine-König Date: Sun Mar 26 16:30:36 2023 +0200 media: stm32-cec: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 3cdae5bf29ed3b896518d7ee8fb5dbb0ba6cc4d5 Author: Uwe Kleine-König Date: Sun Mar 26 16:30:35 2023 +0200 media: stih-cec: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit ba878edae2230d4de2fbedf2c58159ca56d41bc5 Author: Uwe Kleine-König Date: Sun Mar 26 16:30:34 2023 +0200 media: seco-cec: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 3f8b9bbc968a1930332095702735a7c7bb881469 Author: Uwe Kleine-König Date: Sun Mar 26 16:30:33 2023 +0200 media: s5p_cec: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 9cc5b012af48d6fda55ab7d351a71bb3fe93fde4 Author: Uwe Kleine-König Date: Sun Mar 26 16:30:32 2023 +0200 media: ao-cec: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 202779456dc5b75d07b214064161ef6a2421e8be Author: Uwe Kleine-König Date: Sun Mar 26 16:30:31 2023 +0200 media: ao-cec-g12a: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 45848b2834371f7fd2f5a6eae5056f556f8d7a5a Author: Uwe Kleine-König Date: Sun Mar 26 16:30:30 2023 +0200 media: cros-ec-cec: 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 (mostly) ignored 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. 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: Guenter Roeck Signed-off-by: Hans Verkuil commit 0ff7aee24e47beb4306ce050824b54147f2fabfa Author: Uwe Kleine-König Date: Sun Mar 26 16:30:29 2023 +0200 media: cros-ec-cec: Don't exit early in .remove() callback Exiting early in remove without releasing all acquired resources yields leaks. Note that e.g. memory allocated with devm_zalloc() is freed after .remove() returns, even if the return code was negative. While blocking_notifier_chain_unregister() won't fail and so the change is somewhat cosmetic, platform driver's .remove callbacks are about to be converted to return void. To prepare that, keep the error message but don't return early. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 4948ea58e7335e00d6556f884151b0dae1fb344f Author: Uwe Kleine-König Date: Sun Mar 26 16:30:26 2023 +0200 media: cec-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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Hans Verkuil commit 3e5f79723dc3f22fed30ba5a559db11b53b632ae Author: Saalim Quadri Date: Thu Apr 6 02:04:19 2023 +0530 ASoC: dt-bindings: wm8523: Convert to dtschema Convert the WM8523 audio CODEC bindings to DT schema Signed-off-by: Saalim Quadri Link: https://lore.kernel.org/r/20230405203419.5621-1-danascape@gmail.com Signed-off-by: Mark Brown commit 25500613de4a867d16068b28faa963cd3ce0a11a Author: Saalim Quadri Date: Thu Apr 6 02:28:20 2023 +0530 ASoC: dt-bindings: wm8711: Convert to dtschema Convert the WM8711 audio CODEC bindings to DT schema Signed-off-by: Saalim Quadri Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230405205820.6836-1-danascape@gmail.com Signed-off-by: Mark Brown commit 48edd3d1670f4fe749df7a1dd8c1df89882f4c60 Author: Saalim Quadri Date: Thu Apr 6 02:20:25 2023 +0530 ASoC: dt-bindings: wm8580: Convert to dtschema Convert the WM8580 and WM8581 audio CODEC bindings to DT schema Signed-off-by: Saalim Quadri Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230405205025.6448-1-danascape@gmail.com Signed-off-by: Mark Brown commit 39724217447fc3b3ca76ff6fd5086e26165ba6d8 Author: Luis Chamberlain Date: Fri Mar 10 14:58:42 2023 -0800 nfs: simplify two-level sysctl registration for nfs_cb_sysctls There is no need to declare two tables to just create directories, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit a2183160ca7e2bcb210954ad69d7cbf012fea0f1 Author: Luis Chamberlain Date: Fri Mar 10 14:58:41 2023 -0800 nfs: simplify two-level sysctl registration for nfs4_cb_sysctls There is no need to declare two tables to just create directories, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit c1d889cf99b8f9b548f45d0d15b7d4108bbc715f Author: Luis Chamberlain Date: Fri Mar 10 14:58:40 2023 -0800 lockd: simplify two-level sysctl registration for nlm_sysctls There is no need to declare two tables to just create directories, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit d1192184cc31d8f1fc6336d17a89f3e2926f284a Merge: beed115c2ce78 24f934becf605 Author: Mark Brown Date: Tue Apr 11 15:17:18 2023 +0100 ASoC: ep93xx: Prepare for DT transition Merge series from Alexander Sverdlin : This is a preparatory series for EP93xx transition to DT. This patchset is a pre-requisite and has been tested with the full DT patchset [1]. [1]. git://git.maquefel.me/linux.git branch ep93xx/6.2-rc4-v0 Alexander Sverdlin (3): ASoC: ep93xx: i2s: move enable call to startup callback ASoC: cs4271: flat regcache, trivial simplifications ASoC: ep93xx: i2s: Make it individually selectable sound/soc/cirrus/Kconfig | 6 +++++- sound/soc/cirrus/ep93xx-i2s.c | 12 +++++++++++- sound/soc/codecs/cs4271-i2c.c | 1 - sound/soc/codecs/cs4271-spi.c | 1 - sound/soc/codecs/cs4271.c | 4 ++-- 5 files changed, 18 insertions(+), 6 deletions(-) -- 2.40.0 commit 4de00f0acc722f43046dca06fe1336597d1250ab Author: Shailend Chand Date: Fri Apr 7 11:48:30 2023 -0700 gve: Unify duplicate GQ min pkt desc size constants The two constants accomplish the same thing. Signed-off-by: Shailend Chand Reviewed-by: Jakub Kicinski Link: https://lore.kernel.org/r/20230407184830.309398-1-shailend@google.com Signed-off-by: Paolo Abeni commit ec185b18c22323cb0cde0319fa90b3e467b1ed2d Author: Uwe Kleine-König Date: Tue Apr 11 13:38:16 2023 +0200 mtd: nand: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Acked-by: Tudor Ambarus Acked-by: Nicolas Ferre # atmel Reviewed-by: Paul Cercueil # ingenic Reviewed-by: Philippe Mathieu-Daudé # ingenic Acked-by: Martin Blumenstingl # intel Reviewed-by: Martin Blumenstingl # meson Acked-by: Roger Quadros # omap_elm Reviewed-by: Geert Uytterhoeven # renesas Reviewed-by: Heiko Stuebner # rockchip Acked-by: Jernej Skrabec # sunxi Acked-by: Thierry Reding # tegra Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230411113816.3472237-1-u.kleine-koenig@pengutronix.de commit 94b8f77fdb6e10118d9df29351e11949d1799415 Author: Jean Delvare Date: Fri Apr 7 19:04:53 2023 +0200 mtd: onenand: omap2: Drop obsolete dependency on COMPILE_TEST Since commit 0166dc11be91 ("of: make CONFIG_OF user selectable"), it is possible to test-build any driver which depends on OF on any architecture by explicitly selecting OF. Therefore depending on COMPILE_TEST as an alternative is no longer needed. It is actually better to always build such drivers with OF enabled, so that the test builds are closer to how each driver will actually be built on its intended target. Building them without OF may not test much as the compiler will optimize out potentially large parts of the code. In the worst case, this could even pop false positive warnings. Dropping COMPILE_TEST here improves the quality of our testing and avoids wasting time on non-existent issues. Signed-off-by: Jean Delvare Cc: Kyungmin Park Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230407190453.66efdf9d@endymion.delvare commit e3e0ca32cf478e78c579b02cd9c1657d93c97add Author: Aloka Dixit Date: Mon Apr 10 13:03:32 2023 -0700 wifi: mac80211: set EHT support flag in AP mode Set 'eht_support' flag if EHT capabilities are present. Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/20230410200332.32265-1-quic_alokad@quicinc.com Signed-off-by: Johannes Berg commit 2bef4d1fb8b3401d70f28e5d62380a25cefc9d3e Author: Eric Dumazet Date: Tue Apr 4 17:16:58 2023 +0000 wifi: mac80211_hwsim: fix potential NULL deref in hwsim_pmsr_report_nl() syzbot reported a NULL dereference caused by a missing check in hwsim_pmsr_report_nl(), and bisected the issue to cited commit. v2: test the nlattr before using nla_data() on it (Simon Horman) general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 0 PID: 5084 Comm: syz-executor104 Not tainted 6.3.0-rc4-next-20230331-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 RIP: 0010:jhash+0x339/0x610 include/linux/jhash.h:95 Code: 83 fd 01 0f 84 5f ff ff ff eb de 83 fd 05 74 3a e8 ac f5 71 fd 48 8d 7b 05 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 08 84 c0 0f 85 96 02 00 00 RSP: 0018:ffffc90003abf298 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000004 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffff84111ba4 RDI: 0000000000000009 RBP: 0000000000000006 R08: 0000000000000005 R09: 000000000000000c R10: 0000000000000006 R11: 0000000000000000 R12: 000000004d2c27cd R13: 000000002bd9e6c2 R14: 000000002bd9e6c2 R15: 000000002bd9e6c2 FS: 0000555556847300(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000045ad50 CR3: 0000000078aa6000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: 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 include/linux/rhashtable.h:672 [inline] get_hwsim_data_ref_from_addr+0xb9/0x600 drivers/net/wireless/virtual/mac80211_hwsim.c:757 hwsim_pmsr_report_nl+0xe7/0xd50 drivers/net/wireless/virtual/mac80211_hwsim.c:3764 genl_family_rcv_msg_doit.isra.0+0x1e6/0x2d0 net/netlink/genetlink.c:968 genl_family_rcv_msg net/netlink/genetlink.c:1048 [inline] genl_rcv_msg+0x4ff/0x7e0 net/netlink/genetlink.c:1065 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2572 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1076 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1942 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 ____sys_sendmsg+0x71c/0x900 net/socket.c:2501 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2555 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2584 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Fixes: 2af3b2a631b1 ("mac80211_hwsim: add PMSR report support via virtio") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Jaewan Kim Cc: Johannes Berg Reviewed-by: Simon Horman Reviewed-by: Jaewan Kim Link: https://lore.kernel.org/r/20230404171658.917361-1-edumazet@google.com Signed-off-by: Johannes Berg commit ebe3bdc4359e07b4e347af8d5324fb436302bbe1 Author: Jakub Kicinski Date: Fri Apr 7 07:56:09 2023 -0700 tools: ynl: throw a more meaningful exception if family not supported cli.py currently throws a pure KeyError if kernel doesn't support a netlink family. Users who did not write ynl (hah) may waste their time investigating what's wrong with the Python code. Improve the error message: Traceback (most recent call last): File "/home/kicinski/devel/linux/tools/net/ynl/lib/ynl.py", line 362, in __init__ self.family = GenlFamily(self.yaml['name']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/kicinski/devel/linux/tools/net/ynl/lib/ynl.py", line 331, in __init__ self.genl_family = genl_family_name_to_id[family_name] ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ KeyError: 'netdev' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/kicinski/devel/linux/./tools/net/ynl/cli.py", line 52, in main() File "/home/kicinski/devel/linux/./tools/net/ynl/cli.py", line 31, in main ynl = YnlFamily(args.spec, args.schema) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/kicinski/devel/linux/tools/net/ynl/lib/ynl.py", line 364, in __init__ raise Exception(f"Family '{self.yaml['name']}' not supported by the kernel") Exception: Family 'netdev' not supported by the kernel Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20230407145609.297525-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit a0108409c715dbaad1848aa3dfe1c9502fada272 Author: Vignesh Raghavendra Date: Fri Apr 7 10:21:11 2023 +0530 dt-bindings: irqchip: ti,sci-inta: Add optional power-domains property On certain SoCs, Interrupt Aggregator may have a power-domain dependency to be on before accessing. Add DT binding for the same Signed-off-by: Vignesh Raghavendra Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230407045111.531107-1-vigneshr@ti.com Signed-off-by: Rob Herring commit 8002725b9e3369ce8616d32dc2e7a57870475142 Author: Nathan Chancellor Date: Thu Apr 6 10:51:30 2023 -0700 powerpc/32: Include thread_info.h in head_booke.h When building with W=1 after commit 80b6093b55e3 ("kbuild: add -Wundef to KBUILD_CPPFLAGS for W=1 builds"), the following warning occurs. In file included from arch/powerpc/kvm/bookehv_interrupts.S:26: arch/powerpc/kvm/../kernel/head_booke.h:20:6: warning: "THREAD_SHIFT" is not defined, evaluates to 0 [-Wundef] 20 | #if (THREAD_SHIFT < 15) | ^~~~~~~~~~~~ THREAD_SHIFT is defined in thread_info.h but it is not directly included in head_booke.h, so it is possible for THREAD_SHIFT to be undefined. Add the include to ensure that THREAD_SHIFT is always defined. Reported-by: kernel test robot Link: https://lore.kernel.org/202304050954.yskLdczH-lkp@intel.com/ Signed-off-by: Nathan Chancellor Reviewed-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Signed-off-by: Michael Ellerman Link: https://msgid.link/20230406-wundef-thread_shift_booke-v1-1-8deffa4d84f9@kernel.org commit 89fb39134ae3b1e1f207af44a037721d92b32f70 Author: Nicholas Piggin Date: Sat Mar 25 22:29:04 2023 +1000 powerpc: copy_thread don't set PPR in user interrupt frame regs syscalls do not set the PPR field in their interrupt frame and return from syscall always sets the default PPR for userspace, so setting the value in the ret_from_fork frame is not necessary and mildly inconsistent. Remove it. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230325122904.2375060-9-npiggin@gmail.com commit d195ce4695ca1061993424e2d6c8995e5fc81606 Author: Nicholas Piggin Date: Sat Mar 25 22:29:03 2023 +1000 powerpc: copy_thread don't set _TIF_RESTOREALL In the kernel user thread path, don't set _TIF_RESTOREALL because the thread is required to call kernel_execve() before it returns, which will set _TIF_RESTOREALL if necessary via start_thread(). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230325122904.2375060-8-npiggin@gmail.com commit b504b6aade0403eaffa9ce51b8207d710705beaf Author: Nicholas Piggin Date: Sat Mar 25 22:29:02 2023 +1000 powerpc: differentiate kthread from user kernel thread start Kernel created user threads start similarly to kernel threads in that they call a kernel function after first returning from _switch, so they share ret_from_kernel_thread for this. Kernel threads never return from that function though, whereas user threads often do (although some don't, e.g., IO threads). Split these startup functions in two, and catch kernel threads that improperly return from their function. This is intended to make the complicated code a little bit easier to understand. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230325122904.2375060-7-npiggin@gmail.com commit eed7c420aac7fde5e5915d2747c3ebbbda225835 Author: Nicholas Piggin Date: Sat Mar 25 22:29:01 2023 +1000 powerpc: copy_thread differentiate kthreads and user mode threads When copy_thread is given a kernel function to run in arg->fn, this does not necessarily mean it is a kernel thread. User threads can be created this way (e.g., kernel_init, see also x86's copy_thread()). These threads run a kernel function which may call kernel_execve() and return, which returns like a userspace exec(2) syscall. Kernel threads are to be differentiated with PF_KTHREAD, will always have arg->fn set, and should never return from that function, instead calling kthread_exit() to exit. Create separate paths for the kthread and user kernel thread creation logic. The kthread path will never exit and does not require a user interrupt frame, so it gets a minimal stack frame. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230325122904.2375060-6-npiggin@gmail.com commit 5088a6246bd3dcfea504376f356683f750136f7f Author: Nicholas Piggin Date: Sat Mar 25 22:29:00 2023 +1000 powerpc/64: ret_from_fork avoid restoring regs twice If the system call return path always restores NVGPRs then there is no need for ret_from_fork to do it. The HANDLER_RESTORE_NVGPRS does the right thing for this. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230325122904.2375060-5-npiggin@gmail.com commit af5ca9d5c8b45244b237d7a5534e1ec2d01cce8e Author: Nicholas Piggin Date: Sat Mar 25 22:28:59 2023 +1000 powerpc: use switch frame for ret_from_kernel_thread parameters The kernel thread path in copy_thread creates a user interrupt frame on stack and stores the function and arg parameters there, and ret_from_kernel_thread loads them. This is a slightly confusing way to overload that frame. Non-volatile registers are loaded from the switch frame, so the parameters can be stored there. The user interrupt frame is now only used by user threads when they return to user. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230325122904.2375060-4-npiggin@gmail.com commit 959791e45fd2a580403e03611a5aefb9e7abcfc0 Author: Nicholas Piggin Date: Sat Mar 25 22:28:58 2023 +1000 powerpc: copy_thread make ret_from_fork register setup consistent The ret_from_fork code for 64e and 32-bit set r3 for syscall_exit_prepare the same way that 64s does, so there should be no need to special-case them in copy_thread. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230325122904.2375060-3-npiggin@gmail.com commit c013e9f2bbe1d2be5e1c7f4a84216cd10837f20d Author: Nicholas Piggin Date: Sat Mar 25 22:28:57 2023 +1000 powerpc: copy_thread remove unused pkey code The pkey registers (AMR, IAMR) do not get loaded from the switch frame so it is pointless to save anything there. Remove the dead code. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230325122904.2375060-2-npiggin@gmail.com commit 78f0929884d4811c225fd2c57ecc602c84c07392 Author: Michael Ellerman Date: Tue Apr 4 20:28:47 2023 +1000 powerpc/64: Always build with 128-bit long double The amdgpu driver builds some of its code with hard-float enabled, whereas the rest of the kernel is built with soft-float. When building with 64-bit long double, if soft-float and hard-float objects are linked together, the build fails due to incompatible ABI tags. In the past there have been build errors in the amdgpu driver caused by this, some of those were due to bad intermingling of soft & hard-float code, but those issues have now all been fixed since commit 58ddbecb14c7 ("drm/amd/display: move remaining FPU code to dml folder"). However it's still possible for soft & hard-float objects to end up linked together, if the amdgpu driver is built-in to the kernel along with the test_emulate_step.c code, which uses soft-float. That happens in an allyesconfig build. Currently those build errors are avoided because the amdgpu driver is gated on 128-bit long double being enabled. But that's not a detail the amdgpu driver should need to be aware of, and if another driver starts using hard-float the same problem would occur. All versions of the 64-bit ABI specify that long-double is 128-bits. However some compilers, notably the kernel.org ones, are built to use 64-bit long double by default. Apart from this issue of soft vs hard-float, the kernel doesn't care what size long double is. In particular the kernel using 128-bit long double doesn't impact userspace's ability to use 64-bit long double, as musl does. So always build the 64-bit kernel with 128-bit long double. That should avoid any build errors due to the incompatible ABI tags. Excluding the code that uses soft/hard-float, the vmlinux is identical with/without the flag. It does mean any code which is incorrectly intermingling soft & hard-float code will build without error, so those bugs will need to be caught by testing rather than at build time. For more background see: - commit d11219ad53dc ("amdgpu: disable powerpc support for the newer display engine") - commit c653c591789b ("drm/amdgpu: Re-enable DCN for 64-bit powerpc") - https://lore.kernel.org/r/dab9cbd8-2626-4b99-8098-31fe76397d2d@app.fastmail.com Signed-off-by: Michael Ellerman Reviewed-by: Segher Boessenkool Link: https://msgid.link/20230404102847.3303623-1-mpe@ellerman.id.au commit ca08b2a65b5cf2814e4db40bfa5a240600e88cee Merge: 67ea0b7ce4184 3ad6585509dc8 Author: Will Deacon Date: Tue Apr 11 14:05:06 2023 +0100 Merge branch 'for-joerg/arm-smmu/bindings' into for-joerg/arm-smmu/updates Updates to the Arm SMMU device-tree bindings. * for-joerg/arm-smmu/bindings: dt-bindings: arm-smmu: Document SM61[12]5 GPU SMMU dt-bindings: arm-smmu: Add SM8350 Adreno SMMU dt-bindings: arm-smmu: Use qcom,smmu compatible for MMU500 adreno SMMUs dt-bindings: arm-smmu: Add compatible for SM8550 SoC commit fc3c2f0ed86b65dff4b6844c59c597b977cae533 Author: Gregory Greenman Date: Mon Apr 10 17:07:21 2023 +0300 wifi: iwlwifi: fix duplicate entry in iwl_dev_info_table There're two identical entries for ax1650 device in iwl_dev_info_table. Remove one of the duplicate entries. Fixes: 953e66a7238b ("iwlwifi: add new ax1650 killer device") Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230410140721.897683-2-gregory.greenman@intel.com Signed-off-by: Johannes Berg commit d8f975594da8dc59b463db9bcc0bec3fd961630b Author: Gregory Greenman Date: Mon Apr 10 17:07:20 2023 +0300 wifi: iwlwifi: mvm: fix the order of TIMING_MEASUREMENT notifications Host commands and notifications are expected to be ordered in iwl_mvm_groups array. Fix the order of two new TIMING_MEASUREMENT notifications. Fixes: c7eca79def44 ("wifi: iwlwifi: mvm: report hardware timestamps in RX/TX status") Reported-by: Nathan Chancellor Link: https://lore.kernel.org/linux-wireless/20230331175121.GA3127046@dev-arch.thelio-3990X/ Signed-off-by: Gregory Greenman Tested-by: Nathan Chancellor Link: https://lore.kernel.org/r/20230410140721.897683-1-gregory.greenman@intel.com Signed-off-by: Johannes Berg commit 8d58a8c0d930c52dd30bd50af24b786d55509cbf Author: Bhupesh Sharma Date: Tue Apr 11 12:58:39 2023 +0530 arm64: dts: qcom: Add base qrb4210-rb2 board dts Add DTS for Qualcomm qrb4210-rb2 board which uses SM4250 SoC. This adds debug uart, emmc, uSD and tlmm support along with regulators found on this board. Also defines the 'xo_board' and 'sleep_clk' frequencies for this board. Signed-off-by: Bhupesh Sharma [bjorn: Squashed separate patch specifying regulator-system-load] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230411072840.2751813-3-bhupesh.sharma@linaro.org commit 4e859ef0bae3c0839ad362408d2f7321332e4850 Author: Bhupesh Sharma Date: Tue Apr 11 12:58:38 2023 +0530 dt-bindings: arm: qcom: Document the Qualcomm qrb4210-rb2 board Document the Qualcomm qrb4210-rb2 board based on Robotics version of the Snapdragon SM4250 Soc, i.e. QRB4210. Acked-by: Krzysztof Kozlowski Signed-off-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230411072840.2751813-2-bhupesh.sharma@linaro.org commit a27e71a66ee0f887fefcc31b85a804b0905fa865 Author: Cristian Ciocaltea Date: Thu Apr 6 22:41:58 2023 +0300 regulator: fan53555: Add support for RK860X Extend the existing fan53555 driver to support the Rockchip RK860X regulators. RK8600/RK8601 are pretty similar to the FAN53555 regulators. RK8602/RK8603 are a bit different, having a wider output voltage selection range, from 0.5 V to 1.5 V in 6.25 mV steps. They also use additional VSEL0/VSEL1 registers for the voltage selector, but the enable and mode bits are still located in the original FAN53555 specific VSEL0/VSEL1 registers. Signed-off-by: Cristian Ciocaltea Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230406194158.963352-9-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit 2c82f5b8ae6d0b5bbac1526021d9c3120d183555 Author: Cristian Ciocaltea Date: Thu Apr 6 22:41:57 2023 +0300 regulator: fan53555: Use dev_err_probe Use dev_err_probe() instead of dev_err() in the probe function, which ensures the error code is always printed and, additionally, simplifies the code a bit. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230406194158.963352-8-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit 6bb18339c6b54e0241344280fe4d14909db9356c Author: Cristian Ciocaltea Date: Thu Apr 6 22:41:56 2023 +0300 regulator: fan53555: Improve vsel_mask computation In preparation for introducing support for additional regulators which do not use the maximum number of voltage selectors available for a given mask, improve the mask computation formula by using fls(). Note fls() requires the bitops header, hence include it explicitly and drop bits.h which is already pulled by bitops.h. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230406194158.963352-7-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit d25016618c0845b2a0f9ae64d084a66efd39b03c Author: Cristian Ciocaltea Date: Thu Apr 6 22:41:55 2023 +0300 regulator: fan53555: Make use of the bit macros For consistency and improved clarity, use BIT() and GENMASK() macros for defining the bitfields inside the registers. No functional changes intended. While here, also fix DIE_{ID,REV} inconsistent indentation. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230406194158.963352-6-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit d5edc0e36bb1657d2c46b7521010d4f0894a5c74 Author: Cristian Ciocaltea Date: Thu Apr 6 22:41:54 2023 +0300 regulator: fan53555: Remove unused *_SLEW_SHIFT definitions Commit b61ac767db4d ("regulator: fan53555: Convert to use regulator_set_ramp_delay_regmap") removed the slew_shift member from struct fan53555_device_info, hence the {CTL,TCS}_SLEW_SHIFT definitions remained unused. Drop them. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230406194158.963352-5-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit e7abf7134beaeb9be9075214a32863e06cde4a0b Author: Cristian Ciocaltea Date: Thu Apr 6 22:41:51 2023 +0300 regulator: dt-bindings: fcs,fan53555: Add support for RK860X Add compatibles to support Rockchip RK860X regulators. RK8600/RK8601 are pretty similar to the FAN53555 regulators, while RK8602/RK8603 are a bit different, having a wider voltage selection range. Signed-off-by: Cristian Ciocaltea Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230406194158.963352-2-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit e013733612854f446fae9193a42addfe7a926b9c Author: Ian Rogers Date: Mon Apr 10 22:17:18 2023 -0700 perf bperf: Avoid use after free via unrelated 'struct evsel' anonymous union field If bperf (perf tools that use BPF skels) sets evsel->leader_skel or evsel->follower_skel then it appears that evsel->bpf_skel is set and can trigger the following use-after-free: ==13575==ERROR: AddressSanitizer: heap-use-after-free on address 0x60c000014080 at pc 0x55684b939880 bp 0x7ffdfcf30d70 sp 0x7ffdfcf30d68 READ of size 8 at 0x60c000014080 thread T0 #0 0x55684b93987f in sample_filter_bpf__destroy tools/perf/bpf_skel/sample_filter.skel.h:44:11 #1 0x55684b93987f in perf_bpf_filter__destroy tools/perf/util/bpf-filter.c:155:2 #2 0x55684b98f71e in evsel__exit tools/perf/util/evsel.c:1521:2 #3 0x55684b98a352 in evsel__delete tools/perf/util/evsel.c:1547:2 #4 0x55684b981918 in evlist__purge tools/perf/util/evlist.c:148:3 #5 0x55684b981918 in evlist__delete tools/perf/util/evlist.c:169:2 #6 0x55684b887d60 in cmd_stat tools/perf/builtin-stat.c:2598:2 .. 0x60c000014080 is located 0 bytes inside of 128-byte region [0x60c000014080,0x60c000014100) freed by thread T0 here: #0 0x55684b780e86 in free compiler-rt/lib/asan/asan_malloc_linux.cpp:52:3 #1 0x55684b9462da in bperf_cgroup_bpf__destroy tools/perf/bpf_skel/bperf_cgroup.skel.h:61:2 #2 0x55684b9462da in bperf_cgrp__destroy tools/perf/util/bpf_counter_cgroup.c:282:2 #3 0x55684b944c75 in bpf_counter__destroy tools/perf/util/bpf_counter.c:819:2 #4 0x55684b98f716 in evsel__exit tools/perf/util/evsel.c:1520:2 #5 0x55684b98a352 in evsel__delete tools/perf/util/evsel.c:1547:2 #6 0x55684b981918 in evlist__purge tools/perf/util/evlist.c:148:3 #7 0x55684b981918 in evlist__delete tools/perf/util/evlist.c:169:2 #8 0x55684b887d60 in cmd_stat tools/perf/builtin-stat.c:2598:2 ... previously allocated by thread T0 here: #0 0x55684b781338 in calloc compiler-rt/lib/asan/asan_malloc_linux.cpp:77:3 #1 0x55684b944e25 in bperf_cgroup_bpf__open_opts tools/perf/bpf_skel/bperf_cgroup.skel.h:73:35 #2 0x55684b944e25 in bperf_cgroup_bpf__open tools/perf/bpf_skel/bperf_cgroup.skel.h:97:9 #3 0x55684b944e25 in bperf_load_program tools/perf/util/bpf_counter_cgroup.c:55:9 #4 0x55684b944e25 in bperf_cgrp__load tools/perf/util/bpf_counter_cgroup.c:178:23 #5 0x55684b889289 in __run_perf_stat tools/perf/builtin-stat.c:713:7 #6 0x55684b889289 in run_perf_stat tools/perf/builtin-stat.c:949:8 #7 0x55684b888029 in cmd_stat tools/perf/builtin-stat.c:2537:12 Resolve by clearing 'evsel->bpf_skel' as part of bpf_counter__destroy(). Suggested-by: Namhyung Kim Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20230411051718.267228-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit c2ba16cddd6d13bfed8c8f0f288058f2a6eebaec Author: Tom Rix Date: Thu Apr 6 11:12:03 2023 -0400 drm/vc4: remove unused render_wait variable smatch reports drivers/gpu/drm/vc4/vc4_irq.c:60:1: warning: symbol 'render_wait' was not declared. Should it be static? This variable is not used so remove it. Signed-off-by: Tom Rix Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230406151203.1953812-1-trix@redhat.com commit 909fac05b92653f860ecaa1e59b23fc25d27166e Author: Martin Kurbanov Date: Mon Apr 3 21:32:17 2023 +0300 spi: add support for Amlogic A1 SPI Flash Controller This is a driver for the Amlogic SPI flash controller support on A113L SoC. Signed-off-by: Martin Kurbanov Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230403183217.13280-3-mmkurbanov@sberdevices.ru Signed-off-by: Mark Brown commit d040fe8f9fa94cf17cb3558bd061cb580a4d63c8 Author: Martin Kurbanov Date: Mon Apr 3 21:32:16 2023 +0300 dt-bindings: spi: add Amlogic A1 SPI controller Add YAML devicetree Amlogic A1 (A113L SoC) SPIFC. Signed-off-by: Martin Kurbanov Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230403183217.13280-2-mmkurbanov@sberdevices.ru Signed-off-by: Mark Brown commit 60bbee7db43b97bf8c0978cc91f78d1746351871 Author: Devi Priya Date: Fri Apr 7 21:27:24 2023 +0530 regulator: qcom_smd: Add MP5496 S1 regulator Adding support for MP5496 S1 regulator on IPQ9574 SoC. Co-developed-by: Praveenkumar I Signed-off-by: Praveenkumar I Signed-off-by: Devi Priya Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230407155727.20615-3-quic_devipriy@quicinc.com Signed-off-by: Mark Brown commit e953450cf0f622e3249202e985c79d3faf9a58f2 Author: Devi Priya Date: Fri Apr 7 21:27:23 2023 +0530 regulator: qcom_smd: Add s1 sub-node to mp5496 regulator Adding s1 sub-node entry to mp5496 regulator node. Reviewed-by: Rob Herring Signed-off-by: Devi Priya Link: https://lore.kernel.org/r/20230407155727.20615-2-quic_devipriy@quicinc.com Signed-off-by: Mark Brown commit beed115c2ce78f990222a29abed042582df4e87c Author: Aashish Sharma Date: Tue Apr 11 06:04:31 2023 +0530 ASoC: mediatek: common: Fix refcount leak in parse_dai_link_info Add missing of_node_put()s before the returns to balance of_node_get()s and of_node_put()s, which may get unbalanced in case the for loop 'for_each_available_child_of_node' returns early. Fixes: 4302187d955f ("ASoC: mediatek: common: add soundcard driver common code") Reported-by: kernel test robot Reported-by: Julia Lawall Link: https://lore.kernel.org/r/202304090504.2K8L6soj-lkp@intel.com/ Signed-off-by: Aashish Sharma Reviewed-by: Guenter Roeck Reviewed-by: Trevor Wu Link: https://lore.kernel.org/r/20230411003431.4048700-1-shraash@google.com Signed-off-by: Mark Brown commit faf15233e59052f4d61cad2da6e56daf33124d96 Author: Cem Kaya Date: Mon Apr 10 20:38:15 2023 +0200 ASoC: amd: Add Dell G15 5525 to quirks list Add Dell G15 5525 Ryzen Edition to quirks list for acp6x so that internal mic works. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217155 Signed-off-by: Cem Kaya Link: https://lore.kernel.org/r/20230410183814.260518-1-cemkaya.boun@gmail.com Signed-off-by: Mark Brown commit 24f934becf60598fdec9c9f2e06437c831ffa374 Author: Alexander Sverdlin Date: Tue Apr 11 00:39:02 2023 +0200 ASoC: ep93xx: i2s: Make it individually selectable This is necessary to replace EDB93XX specific SoC audio driver with generic "simple-audio-card". Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20230410223902.2321834-4-alexander.sverdlin@gmail.com Signed-off-by: Mark Brown commit 2e9688c81cfc48b210af6f313cb04589b7943e86 Author: Alexander Sverdlin Date: Tue Apr 11 00:39:01 2023 +0200 ASoC: cs4271: flat regcache, trivial simplifications - Switch to REGCACHE_FLAT, the whole overhead of RBTREE is not worth it with non sparse register set in the address range 1..7. - Move register width to central location Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20230410223902.2321834-3-alexander.sverdlin@gmail.com Signed-off-by: Mark Brown commit 80f47122538d40b1a6a2c1a3c2d37b6e51b74224 Author: Alexander Sverdlin Date: Tue Apr 11 00:39:00 2023 +0200 ASoC: ep93xx: i2s: move enable call to startup callback Make startup/shutdown callbacks symmetric to avoid clock subsystem warnings (reproduced with "aplay --dump-hw-params" + ctrl-c): WARNING: CPU: 0 PID: 102 at drivers/clk/clk.c:1048 clk_core_disable lrclk already disabled CPU: 0 PID: 102 Comm: aplay Not tainted 6.2.0-rc4 #1 Hardware name: Generic DT based system ... clk_core_disable from clk_core_disable_lock clk_core_disable_lock from ep93xx_i2s_shutdown ep93xx_i2s_shutdown from snd_soc_dai_shutdown snd_soc_dai_shutdown from soc_pcm_clean soc_pcm_clean from soc_pcm_close soc_pcm_close from snd_pcm_release_substream.part.0 snd_pcm_release_substream.part.0 from snd_pcm_release snd_pcm_release from __fput __fput from task_work_run ... WARNING: CPU: 0 PID: 102 at drivers/clk/clk.c:907 clk_core_unprepare lrclk already unprepared CPU: 0 PID: 102 Comm: aplay Tainted: G W 6.2.0-rc4 #1 Hardware name: Generic DT based system ... clk_core_unprepare from clk_unprepare clk_unprepare from ep93xx_i2s_shutdown ep93xx_i2s_shutdown from snd_soc_dai_shutdown snd_soc_dai_shutdown from soc_pcm_clean soc_pcm_clean from soc_pcm_close soc_pcm_close from snd_pcm_release_substream.part.0 snd_pcm_release_substream.part.0 from snd_pcm_release snd_pcm_release from __fput __fput from task_work_run ... Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20230410223902.2321834-2-alexander.sverdlin@gmail.com Signed-off-by: Mark Brown commit a30b87e6bd7db112deb1e3014b23fb90111bc6c4 Author: Stephane Eranian Date: Tue Apr 11 11:38:09 2023 +0200 arm64: pmuv3: dynamically map PERF_COUNT_HW_BRANCH_INSTRUCTIONS The mapping of perf_events generic hardware events to actual PMU events on ARM PMUv3 may not always be correct. This is in particular true for the PERF_COUNT_HW_BRANCH_INSTRUCTIONS event. Although the mapping points to an architected event, it may not always be available. This can be seen with a simple: $ perf stat -e branches sleep 0 Performance counter stats for 'sleep 0': branches 0.001401081 seconds time elapsed Yet the hardware does have an event that could be used for branches. Dynamically check for a supported hardware event which can be used for PERF_COUNT_HW_BRANCH_INSTRUCTIONS at mapping time. And with that: $ perf stat -e branches sleep 0 Performance counter stats for 'sleep 0': 166,739 branches 0.000832163 seconds time elapsed Co-developed-by: Stephane Eranian Signed-off-by: Stephane Eranian Co-developed-by: Mark Rutland Signed-off-by: Mark Rutland Co-developed-by: Peter Newman Signed-off-by: Peter Newman Link: https://lore.kernel.org/all/YvunKCJHSXKz%2FkZB@FVFF77S0Q05N Link: https://lore.kernel.org/r/20230411093809.657501-1-peternewman@google.com Signed-off-by: Will Deacon commit 714b2f025d767e7df1fe9da18bd70537d64cc157 Author: Fred Oh Date: Thu Apr 6 10:25:00 2023 -0500 ALSA: hda: LNL: add HD Audio PCI ID Add HD Audio PCI ID for Intel Lunarlake platform. Signed-off-by: Fred Oh Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20230406152500.15104-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 89863a3b5f0240cc89b7cbf6756e5c6c220c056e Author: Jiapeng Chong Date: Fri Apr 7 11:41:57 2023 +0800 net: fddi: skfp: rmt: Clean up some inconsistent indenting No functional modification involved. drivers/net/fddi/skfp/rmt.c:236 rmt_fsm() warn: if statement not indented. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4736 Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20230407034157.61276-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Paolo Abeni commit 55bf14961db9da61220e6f04bc9919c94b1a6585 Merge: b8d85bb50511c 9243d70e05c59 Author: Daniel Vetter Date: Tue Apr 11 12:28:09 2023 +0200 Merge tag 'mediatek-drm-next-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next Mediatek DRM Next for Linux 6.4 1. Add support for 10-bit overlays 2. Add MediaTek SoC DRM (vdosys1) support for mt8195 3. Change mmsys compatible for mt8195 mediatek-drm 4. Only trigger DRM HPD events if bridge is attached 5. Change the aux retries times when receiving AUX_DEFER Signed-off-by: Daniel Vetter From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20230410233005.2572-1-chunkuang.hu@kernel.org commit b8d85bb50511c901d48fc34ea8f0bb958042fbf0 Merge: 838ac90d8d8a8 ac7e7c9c65ecf Author: Daniel Vetter Date: Tue Apr 11 12:11:32 2023 +0200 Merge tag 'drm-msm-next-2023-04-10' of https://gitlab.freedesktop.org/drm/msm into drm-next main pull request for v6.4 Core Display: ============ * Bugfixes for error handling during probe * rework UBWC decoder programming * prepare_commit cleanup * bindings for SM8550 (MDSS, DPU), SM8450 (DP) * timeout calculation fixup * atomic: use drm_crtc_next_vblank_start() instead of our own custom thing to calculate the start of next vblank DP: == * interrupts cleanup DPU: === * DSPP sub-block flush on sc7280 * support AR30 in addition to XR30 format * Allow using REC_0 and REC_1 to handle wide (4k) RGB planes * Split the HW catalog into individual per-SoC files DSI: === * rework DSI instance ID detection on obscure platforms GPU: === * uapi C++ compatibility fix * a6xx: More robust gdsc reset * a3xx and a4xx devfreq support * update generated headers * various cleanups and fixes * GPU and GEM updates to avoid allocations which could trigger reclaim (shrinker) in fence signaling path * dma-fence deadline hint support and wait-boost * a640 speedbin support * a650 speedbin support Conflicts in drivers/gpu/drm/msm/adreno/adreno_gpu.c: Conflict between the 7fa5047a436b ("drm: Use of_property_present() for testing DT property presence") and 9f251f934012 ("drm/msm/adreno: Use OPP for every GPU generation"). The latter removed the of_ function call outright, so I went with what's in the PR unchanged. From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvwuj5tabyW910+N-B=5kFNAC7QNYoQ=0xi3roBjQvFFQ@mail.gmail.com Signed-off-by: Daniel Vetter commit 3a2bdad0b46649cc73fb3b3f9e2b91ef97a7fa63 Author: Ard Biesheuvel Date: Tue Mar 21 12:01:51 2023 +0100 ARM: 9293/1: vfp: Pass successful return address via register R3 In preparation for reimplementing the do_vfp()->vfp_support_entry() handover in C code, switch to using R3 to pass the 'success' return address, rather than R9, as it cannot be used for parameter passing. Signed-off-by: Ard Biesheuvel Reviewed-by: Linus Walleij Tested-by: Guenter Roeck Signed-off-by: Russell King (Oracle) commit dae904d96ad6a5fa79bd9d99a3decf93685d398b Author: Ard Biesheuvel Date: Tue Mar 21 12:01:02 2023 +0100 ARM: 9292/1: vfp: Pass thread_info pointer to vfp_support_entry Instead of dereferencing thread_info in do_vfp, pass the thread_info pointer to vfp_support_entry via R1. That way, we only use a single caller save register, which makes it easier to convert do_vfp to C code in a subsequent patch. Note that, unlike the CPU number, which can change due to preemption, passing the thread_info pointer can safely be done with preemption enabled. Signed-off-by: Ard Biesheuvel Reviewed-by: Linus Walleij Tested-by: Guenter Roeck Signed-off-by: Russell King (Oracle) commit 838ac90d8d8a806102298d3121acac525c193497 Merge: 4d877b1a6e855 56499c4615896 Author: Daniel Vetter Date: Tue Apr 11 12:02:38 2023 +0200 Merge tag 'drm-habanalabs-next-2023-04-10' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into drm-next This tag contains additional habanalabs driver changes for v6.4: - uAPI changes: - Add a definition of a new Gaudi2 server type. This is used by userspace to know what is the connectivity between the accelerators inside the server - New features and improvements: - speedup h/w queues test in Gaudi2 to reduce device initialization times. - Firmware related fixes: - Fixes to the handshake protocol during f/w initialization. - Sync f/w events interrupt in hard reset to avoid warning message. - Improvements to extraction of the firmware version. - Misc bug fixes and code cleanups. Notable fixes are: - Multiple fixes for interrupt handling in Gaudi2. - Unmap mapped memory in case TLB invalidation fails. Signed-off-by: Daniel Vetter From: Oded Gabbay Link: https://patchwork.freedesktop.org/patch/msgid/20230410124637.GA2441888@ogabbay-vm-u20.habana-labs.com commit 1881b4d64700e54ab8706a43c1ad119c3ad653dc Author: Masahiro Yamada Date: Tue Mar 14 08:43:51 2023 +0100 ARM: 9291/1: decompressor: simplify the path to the top vmlinux With commit 8debed3efe3a ("kbuild: export top-level LDFLAGS_vmlinux only to scripts/Makefile.vmlinux") applied, we no longer see the error message while building the ARM zImage, but we do not have a good reason to complicate the file path either. '$(obj)/../../../../vmlinux' is canonicalized to 'vmlinux'. Signed-off-by: Masahiro Yamada Signed-off-by: Russell King (Oracle) commit 05f4646409625b45e315ed0c5ab1078445f5ef43 Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:17 2023 +0530 PCI: qcom: Expose link transition counts via debugfs Qualcomm PCIe controllers have debug registers in the MHI region that count PCIe link transitions. Expose them over debugfs to userspace to help debug the low power issues. Note that even though the registers are prefixed as PARF_, they don't live under the "parf" register region. The register naming is following the Qualcomm's internal documentation as like other registers. While at it, let's arrange the local variables in probe function to follow reverse XMAS tree order. Link: https://lore.kernel.org/r/20230316081117.14288-20-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi commit 0f80edf8447d23e9eb07fcdbdec19b431ea7ad89 Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:13 2023 +0530 dt-bindings: PCI: qcom: Add "mhi" register region to supported SoCs "mhi" register region contains the MHI registers that could be used by the PCIe controller drivers to get debug information like PCIe link transition counts on newer SoCs. Link: https://lore.kernel.org/r/20230316081117.14288-16-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Kozlowski commit 1f70939871b260b52e9d1941f1cad740b7295c2c Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:12 2023 +0530 PCI: qcom: Rename qcom_pcie_config_sid_sm8250() to reflect IP version qcom_pcie_config_sid_sm8250() function no longer applies only to SM8250. So let's rename it to reflect the actual IP version and also move its definition to keep it sorted as per IP revisions. Link: https://lore.kernel.org/r/20230316081117.14288-15-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi commit 656a08820e7b10d5b6dfecdb8035e2c9411b5474 Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:11 2023 +0530 PCI: qcom: Use macros for defining total no. of clocks & supplies To keep uniformity, let's use macros to define the total number of clocks and supplies in qcom_pcie_resources_{2_7_0/2_9_0} structs. Link: https://lore.kernel.org/r/20230316081117.14288-14-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi commit fb0eacb2972e2f330b188e5b22955d020599bf38 Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:10 2023 +0530 PCI: qcom: Use bulk reset APIs for handling resets for IP rev 2.4.0 All the resets are asserted and deasserted at the same time. So the bulk reset APIs can be used to handle them together. This simplifies the code a lot. It should be noted that there were delays in-between the reset asserts and deasserts. But going by the config used by other revisions, those delays are not really necessary. So a single delay after all asserts and one after deasserts is used. The total number of resets supported is 12 but only ipq4019 is using all of them. Link: https://lore.kernel.org/r/20230316081117.14288-13-manivannan.sadhasivam@linaro.org Tested-by: Sricharan Ramabadhran Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi commit 157fecca3558dd21b33038d6a935e8533c16043d Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:09 2023 +0530 PCI: qcom: Use bulk reset APIs for handling resets for IP rev 2.3.3 All the resets are asserted and deasserted at the same time. So the bulk reset APIs can be used to handle them together. This simplifies the code a lot. Link: https://lore.kernel.org/r/20230316081117.14288-12-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi commit b699ed9b03de4fbf6eed51dfdec3c437fe3d653c Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:08 2023 +0530 PCI: qcom: Use bulk clock APIs for handling clocks for IP rev 2.3.3 All the clocks are enabled and disabled at the same time. So the bulk clock APIs can be used to handle them together. This simplifies the code a lot. Link: https://lore.kernel.org/r/20230316081117.14288-11-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi commit 5329bcc4a1e7dc41fcdffaa55c73b17b527b804f Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:07 2023 +0530 PCI: qcom: Use bulk clock APIs for handling clocks for IP rev 2.3.2 All the clocks are enabled and disabled at the same time. So the bulk clock APIs can be used to handle them together. This simplifies the code a lot. Link: https://lore.kernel.org/r/20230316081117.14288-10-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi commit 5d4ffe5ec5e91c78de51f095673f1ad74438f60a Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:06 2023 +0530 PCI: qcom: Use bulk clock APIs for handling clocks for IP rev 1.0.0 All the clocks are enabled and disabled at the same time. So the bulk clock APIs can be used to handle them together. This simplifies the code a lot. Link: https://lore.kernel.org/r/20230316081117.14288-9-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi commit 383215dd2fd716f151608886ff19bbe1e1a9cf91 Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:05 2023 +0530 PCI: qcom: Use bulk reset APIs for handling resets for IP rev 2.1.0 All the resets are asserted and deasserted at the same time. So the bulk reset APIs can be used to handle them together. This simplifies the code a lot. While at it, let's also move the qcom_pcie_resources_2_1_0 struct below qcom_pcie_resources_1_0_0 to keep it sorted. Link: https://lore.kernel.org/r/20230316081117.14288-8-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi commit 94ebd232dbc84dfdfbf0c406137a8b2aa8b37a01 Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:04 2023 +0530 PCI: qcom: Use lower case for hex To maintain uniformity, let's use lower case for representing hexadecimal numbers. Link: https://lore.kernel.org/r/20230316081117.14288-7-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi commit 17804668ca545232e94dee5fe87ab3eaf6391cbe Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:03 2023 +0530 PCI: qcom: Add missing macros for register fields Some of the registers are changed using hardcoded bitfields without macros. This provides no information on what the register setting is about. So add the macros to those fields for making the code more understandable. Link: https://lore.kernel.org/r/20230316081117.14288-6-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi commit 57eddec8dc30ed968f31664f76548ee8d7c47c5e Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:02 2023 +0530 PCI: qcom: Use bitfield definitions for register fields To maintain uniformity throughout the driver and also to make the code easier to read, let's make use of bitfield definitions for register fields. Link: https://lore.kernel.org/r/20230316081117.14288-5-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi commit 769e49d87b15c302c9aadd87c7d114cfe7052320 Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:01 2023 +0530 PCI: qcom: Sort and group registers and bitfield definitions Sorting the registers and their bit definitions will make it easier to add more definitions in the future and it also helps in maintenance. While at it, let's also group the registers and bit definitions separately as done in the pcie-qcom-ep driver. Link: https://lore.kernel.org/r/20230316081117.14288-4-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi commit 39171b33f6523f28c1c1256427e5f50c74b69639 Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:00 2023 +0530 PCI: qcom: Remove PCIE20_ prefix from register definitions The PCIE part is redundant and 20 doesn't represent anything across the SoCs supported now. So let's get rid of the prefix. This involves adding the IP version suffix to one definition of PARF_SLV_ADDR_SPACE_SIZE that defines offset specific to that version. The other definition is generic for the rest of the versions. Also, the register PCIE20_LNK_CONTROL2_LINK_STATUS2 is not used anywhere, hence removed. Link: https://lore.kernel.org/r/20230316081117.14288-3-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi commit 2542e16c392508800f1d9037feee881a9c444951 Author: Manivannan Sadhasivam Date: Thu Mar 16 13:40:59 2023 +0530 PCI: qcom: Fix the incorrect register usage in v2.7.0 config Qcom PCIe IP version v2.7.0 and its derivatives don't contain the PCIE20_PARF_AXI_MSTR_WR_ADDR_HALT register. Instead, they have the new PCIE20_PARF_AXI_MSTR_WR_ADDR_HALT_V2 register. So fix the incorrect register usage which is modifying a different register. Also in this IP version, this register change doesn't depend on MSI being enabled. So remove that check also. Link: https://lore.kernel.org/r/20230316081117.14288-2-manivannan.sadhasivam@linaro.org Fixes: ed8cc3b1fc84 ("PCI: qcom: Add support for SDM845 PCIe controller") Signed-off-by: Manivannan Sadhasivam Signed-off-by: Lorenzo Pieralisi Cc: # 5.6+ commit 5b309e80f457ebb41770e0122766825a78cfc11b Author: Hans de Goede Date: Mon Apr 10 21:35:12 2023 +0200 platform/x86: amd: pmc: Remove __maybe_unused from amd_pmc_suspend_handler() Now that the pmc code has switched to DEFINE_SIMPLE_DEV_PM_OPS() the __maybe_unused is no longer necessary, drop it. Signed-off-by: Hans de Goede Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20230410193512.64232-1-hdegoede@redhat.com commit 336ba968d3e30038c13b03a71f5a672db6c9e303 Author: David E. Box Date: Sun Apr 9 12:25:35 2023 -0700 platform/x86/intel/pmc/mtl: Put GNA/IPU/VPU devices in D3 On Meteor Lake, the GNA, IPU, and VPU devices are booted in D0 power state and will block the SoC from going into the deepest Package C-state if a driver is not present. Put each device in D3hot if no driver is found. Signed-off-by: David E. Box Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230409192535.914540-1-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 8d99129eef8f42377b41c1bacee9f8ce806e9f44 Author: Shyam Sundar S K Date: Mon Apr 10 00:23:46 2023 +0530 platform/x86/amd: pmc: Move out of BIOS SMN pair for STB init The current SMN index used for the driver probe seems to be meant for the BIOS pair and there are potential concurrency problems that can occur with an inopportune SMI. It is been advised to use SMN_INDEX_0 instead of SMN_INDEX_6, which is what amd_nb.c provides and this function has protections to ensure that only one caller can use it at a time. Fixes: 426c0ff27b83 ("platform/x86: amd-pmc: Add support for AMD Smart Trace Buffer") Co-developed-by: Sanket Goswami Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20230409185348.556161-7-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 310e782a99c7f16fb533a45d8f9c16defefa5aab Author: Shyam Sundar S K Date: Mon Apr 10 00:23:45 2023 +0530 platform/x86/amd: pmc: Utilize SMN index 0 for driver probe The current SMN index used for the driver probe seems to be meant for the BIOS pair and there are potential concurrency problems that can occur with an inopportune SMI. It is been advised to use SMN_INDEX_0 instead of SMN_INDEX_2, which is what amd_nb.c provides and this function has protections to ensure that only one caller can use it at a time. Fixes: 156ec4731cb2 ("platform/x86: amd-pmc: Add AMD platform support for S2Idle") Co-developed-by: Sanket Goswami Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20230409185348.556161-6-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 9217bd1d7699f34a01b26ba14ff38c1714ce1185 Author: Mario Limonciello Date: Mon Apr 10 00:23:44 2023 +0530 platform/x86/amd: pmc: Move idlemask check into `amd_pmc_idlemask_read` The version check requirement for idle mask support actually only applies to RN/CZN/BRC platforms. So far no issues have happened because the PMFW version string is bigger on other supported systems. This can be reset for any new platform so move the check to only RN/CZN/BRC case. Fixes: f6045de1f532 ("platform/x86: amd-pmc: Export Idlemask values based on the APU") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20230409185348.556161-5-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 7abc3618b65304d409d9489d77e4a8f047842fb7 Author: Mario Limonciello Date: Mon Apr 10 00:23:43 2023 +0530 platform/x86/amd: pmc: Don't dump data after resume from s0i3 on picasso This command isn't supported on Picasso, so guard against running it to avoid errors like `SMU cmd unknown. err: 0xfe` in the logs. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2449 Fixes: 766205674962 ("platform/x86: amd-pmc: Add support for logging SMU metrics") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20230409185348.556161-4-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 5ec9ee0d464750d72972d5685edf675824e259a1 Author: Mario Limonciello Date: Mon Apr 10 00:23:42 2023 +0530 platform/x86/amd: pmc: Hide SMU version and program attributes for Picasso As the command to get version isn't supported on Picasso, we shouldn't be exposing this into sysfs either. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2449 Fixes: 7f1ea75d499a ("platform/x86/amd: pmc: Add sysfs files for SMU") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20230409185348.556161-3-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit b845772677ea19b8e4c032bc07393ef32de4ee39 Author: Mario Limonciello Date: Mon Apr 10 00:23:41 2023 +0530 platform/x86/amd: pmc: Don't try to read SMU version on Picasso Picasso doesn't support the command in the uPEP mailbox to try to read the SMU version. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2449 Fixes: f6045de1f532 ("platform/x86: amd-pmc: Export Idlemask values based on the APU") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20230409185348.556161-2-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit aec8298c093f052fc8a86f9411b69b23953b0edb Author: Shyam Sundar S K Date: Thu Apr 6 22:18:07 2023 +0530 platform/x86/amd/pmf: Move out of BIOS SMN pair for driver probe The current SMN index used for the driver probe seems to be meant for the BIOS pair and there are potential concurrency problems that can occur with an inopportune SMI. It is been advised to use SMN_INDEX_0 instead of SMN_INDEX_2, which is what amd_nb.c provides and this function has protections to ensure that only one caller can use it at a time. Fixes: da5ce22df5fe ("platform/x86/amd/pmf: Add support for PMF core layer") 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/20230406164807.50969-4-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 8ae8a494eae4e7e262a7212061db90210efd2d28 Author: Herbert Xu Date: Sun Apr 9 15:46:59 2023 +0800 crypto: ixp4xx - Do not check word size when compile testing The BUILD_BUG_ON preventing compilation on foreign architectures should be disabled when we're doing compile testing. Fixes: 1bc7fdbf2677 ("crypto: ixp4xx - Move driver to...") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304061846.G6cpPXiQ-lkp@intel.com/ Signed-off-by: Herbert Xu commit 9bc11460bea751b5c805ac793de35a55629adb9b Author: Simon Horman Date: Fri Apr 7 15:26:51 2023 +0200 net: ethernet: mtk_eth_soc: use be32 type to store be32 values n_addr is used to store be32 values, so a sparse-friendly array of be32 to store these values. Flagged by sparse: .../mtk_ppe_debugfs.c:59:27: warning: incorrect type in assignment (different base types) .../mtk_ppe_debugfs.c:59:27: expected unsigned int .../mtk_ppe_debugfs.c:59:27: got restricted __be32 [usertype] .../mtk_ppe_debugfs.c:161:46: warning: cast to restricted __be16 No functional changes intended. Compile tested only. Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20230401-mtk_eth_soc-sparse-v2-1-963becba3cb7@kernel.org Signed-off-by: Jakub Kicinski commit cf57cf51d7c63595a50359694537b41aa05dda7e Author: Ian Rogers Date: Mon Apr 10 13:56:59 2023 -0700 perf evsel: Avoid SEGV if delete is called on NULL Seen in "perf stat --bpf-counters --for-each-cgroup test" running in a container: libbpf: Failed to bump RLIMIT_MEMLOCK (err = -1), you might need to do it explicitly! libbpf: Error in bpf_object__probe_loading():Operation not permitted(1). Couldn't load trivial BPF program. Make sure your kernel supports BPF (CONFIG_BPF_SYSCALL=y) and/or that RLIMIT_MEMLOCK is set to big enough value. libbpf: failed to load object 'bperf_cgroup_bpf' libbpf: failed to load BPF skeleton 'bperf_cgroup_bpf': -1 Failed to load cgroup skeleton #0 0x55f28a650981 in list_empty tools/include/linux/list.h:189 #1 0x55f28a6593b4 in evsel__exit util/evsel.c:1518 #2 0x55f28a6596af in evsel__delete util/evsel.c:1544 #3 0x55f28a89d166 in bperf_cgrp__destroy util/bpf_counter_cgroup.c:283 #4 0x55f28a899e9a in bpf_counter__destroy util/bpf_counter.c:816 #5 0x55f28a659455 in evsel__exit util/evsel.c:1520 #6 0x55f28a6596af in evsel__delete util/evsel.c:1544 #7 0x55f28a640d4d in evlist__purge util/evlist.c:148 #8 0x55f28a640ea6 in evlist__delete util/evlist.c:169 #9 0x55f28a4efbf2 in cmd_stat tools/perf/builtin-stat.c:2598 #10 0x55f28a6050c2 in run_builtin tools/perf/perf.c:330 #11 0x55f28a605633 in handle_internal_command tools/perf/perf.c:384 #12 0x55f28a6059fb in run_argv tools/perf/perf.c:428 #13 0x55f28a6061d3 in main tools/perf/perf.c:562 Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Florian Fischer Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230410205659.3131608-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 6c6d5349454d1a8200a348672bb17e8030372a7d Merge: 490fde262f17c 301f227fc8606 Author: Jakub Kicinski Date: Mon Apr 10 17:56:20 2023 -0700 Merge branch 'net-lockless-stop-wake-combo-macros' Jakub Kicinski says: ==================== net: lockless stop/wake combo macros A lot of drivers follow the same scheme to stop / start queues without introducing locks between xmit and NAPI tx completions. I'm guessing they all copy'n'paste each other's code. The original code dates back all the way to e1000 and Linux 2.6.19. v3: https://lore.kernel.org/all/20230405223134.94665-1-kuba@kernel.org/ v2: https://lore.kernel.org/all/20230401051221.3160913-2-kuba@kernel.org/ v1: https://lore.kernel.org/all/20230322233028.269410-1-kuba@kernel.org/ rfc: https://lore.kernel.org/all/20230311050130.115138-1-kuba@kernel.org/ ==================== Link: https://lore.kernel.org/r/20230407012536.273382-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 301f227fc860624d37ba5dae9da57dcf371268db Author: Jakub Kicinski Date: Thu Apr 6 18:25:36 2023 -0700 net: piggy back on the memory barrier in bql when waking queues Drivers call netdev_tx_completed_queue() right before netif_txq_maybe_wake(). If BQL is enabled netdev_tx_completed_queue() should issue a memory barrier, so we can depend on that separating the stop check from the consumer index update, instead of adding another barrier in netif_txq_maybe_wake(). This matters more than the barriers on the xmit path, because the wake condition is almost always true. So we issue the consumer side barrier often. Wrap netdev_tx_completed_queue() in a local helper to issue the barrier even if BQL is disabled. Keep the same semantics as netdev_tx_completed_queue() (barrier only if bytes != 0) to make it clear that the barrier is conditional. Plus since macro gets pkt/byte counts as arguments now - we can skip waking if there were no packets completed. Signed-off-by: Jakub Kicinski commit 08a096780d9239e69909c48f4b1fcd99c860b2ef Author: Jakub Kicinski Date: Thu Apr 6 18:25:35 2023 -0700 bnxt: use new queue try_stop/try_wake macros Convert bnxt to use new macros rather than open code the logic. Two differences: (1) bnxt_tx_int() will now only issue a memory barrier if it sees enough space on the ring to wake the queue. This should be fine, the mb() is between the writes to the ring pointers and checking queue state. (2) we'll start the queue instead of waking on race, this should be safe inside the xmit handler. Reviewed-by: Michael Chan Signed-off-by: Jakub Kicinski commit 9ded5bc77fe5f396a58da95627695a89a427c962 Author: Jakub Kicinski Date: Thu Apr 6 18:25:34 2023 -0700 ixgbe: use new queue try_stop/try_wake macros Convert ixgbe to use the new macros, I think a lot of people copy the ixgbe code. The only functional change is that the unlikely() in ixgbe_clean_tx_irq() turns into a likely() inside the new macro and no longer includes total_packets && netif_carrier_ok(tx_ring->netdev) which is probably for the best, anyway. Signed-off-by: Jakub Kicinski commit c91c46de6bbc1147ae5dfe046b87f5f3d6593215 Author: Jakub Kicinski Date: Thu Apr 6 18:25:33 2023 -0700 net: provide macros for commonly copied lockless queue stop/wake code A lot of drivers follow the same scheme to stop / start queues without introducing locks between xmit and NAPI tx completions. I'm guessing they all copy'n'paste each other's code. The original code dates back all the way to e1000 and Linux 2.6.19. Smaller drivers shy away from the scheme and introduce a lock which may cause deadlocks in netpoll. Provide macros which encapsulate the necessary logic. The macros do not prevent false wake ups, the extra barrier required to close that race is not worth it. See discussion in: https://lore.kernel.org/all/c39312a2-4537-14b4-270c-9fe1fbb91e89@gmail.com/ Acked-by: Herbert Xu Signed-off-by: Jakub Kicinski commit 8336462539ae751cbf7d59822eb331602a69df99 Author: Jakub Kicinski Date: Thu Apr 6 18:25:32 2023 -0700 docs: net: use C syntax highlight in driver.rst Use syntax highlight, comment out the "..." since they are not valid C. Signed-off-by: Jakub Kicinski commit da4f0f82ee9d5a128b48c959e8db7f41b59848c8 Author: Jakub Kicinski Date: Thu Apr 6 18:25:31 2023 -0700 docs: net: move the probe and open/close sections of driver.rst up Somehow it feels more right to start from the probe then open, then tx... Much like the lifetime of the driver itself. Signed-off-by: Jakub Kicinski commit d2f5c68e3f7157e874a759e382a5eaffa775b869 Author: Jakub Kicinski Date: Thu Apr 6 18:25:30 2023 -0700 docs: net: reformat driver.rst from a list to sections driver.rst had a historical form of list of common problems. In the age os Sphinx and rendered documentation it's better to use the more usual title + text format. This will allow us to render kdoc into the output more naturally. No changes to the actual text. Signed-off-by: Jakub Kicinski commit cb9eee590a77320b997a47cae18662af23dcb726 Author: Tom Rix Date: Wed Apr 5 21:09:35 2023 -0400 clk: mediatek: fhctl: Mark local variables static smatch reports drivers/clk/mediatek/clk-fhctl.c:17:27: warning: symbol 'fhctl_offset_v1' was not declared. Should it be static? drivers/clk/mediatek/clk-fhctl.c:30:27: warning: symbol 'fhctl_offset_v2' was not declared. Should it be static? These variables are only used in one file so should be static. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230406010935.1944976-1-trix@redhat.com Fixes: 8da312d6574c ("clk: mediatek: fhctl: Add support for older fhctl register layout") Signed-off-by: Stephen Boyd commit 483a14418661878d89216be0f02918892227833b Author: Daniel Golle Date: Mon Apr 10 16:55:44 2023 -0700 Input: edt-ft5x06 - select REGMAP_I2C After starting to use regmap API to access registers the edt-ft5x06 driver depends on symbols provided by REGMAP_I2C: edt-ft5x06.o: in function `edt_ft5x06_ts_probe': edt-ft5x06.c:1154: undefined reference to `__regmap_init_i2c' edt-ft5x06.o: in function `edt_ft5x06_ts_identify': edt-ft5x06.c:897: undefined reference to `__regmap_init_i2c' Make sure support for I2C regmap is actually selected by adding this dependency to Kconfig. Fixes: 9dfd9708ffba ("Input: edt-ft5x06 - convert to use regmap API") Signed-off-by: Daniel Golle Link: https://lore.kernel.org/r/ZDRBExF1xmxalMZc@makrotopia.org Signed-off-by: Dmitry Torokhov commit 210f8cab0751eb95dc56453e3dbf8a962d4d1e17 Author: JungHoon Hyun Date: Sun Apr 9 19:36:57 2023 -0700 Input: melfas_mip4 - report palm touches The driver had the code to differentiate between finger and palm touches, but did not use this information when reporting contacts. Change it so that proper "tool" type is assigned to reported contacts. Signed-off-by: JungHoon Hyun Signed-off-by: Dmitry Torokhov commit 4c32fb7dcf65b16cc7b2837ccfc35d00be92bddb Author: Rob Herring Date: Wed Mar 29 10:51:59 2023 -0500 of: Move of_device_(add|register|unregister) to of_platform.h As of_device_(add|register|unregister) functions work on struct platform_device, they should be declared in of_platform.h instead. This move is transparent for now as both headers include each other. Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-2-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit 1dd5474ee6ee1d6ddc95f1423966ab8d4afda448 Author: Rob Herring Date: Wed Mar 29 10:51:58 2023 -0500 of: Make devtree_lock declaration private Sparc is the only place devtree_lock is used outside of drivers/of/. Move the devtree_lock declaration into of_private.h and Sparc's prom.h so pulling in spinlock.h to of.h can be avoided for everything besides Sparc. Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-1-581e2605fe47@kernel.org Signed-off-by: Rob Herring commit 911ac7979dde0ca31fdfcc4fbd27d2fa3f2bf376 Author: Feng Tang Date: Fri Apr 7 12:12:35 2023 +0800 Documentation: Add document for false sharing When doing performance tuning or debugging performance regressions, more and more cases are found to be related to false sharing [1][2][3], and the situation can be worse for newer platforms with hundreds of CPUs. There are already many commits in current kernel specially for mitigating the performance degradation due to false sharing. False sharing could harm the performance silently without being noticed, due to reasons like: * data members of a big data structure randomly sitting together in one cache line * global data of small size are linked compactly together So it's better to make a simple document about the normal pattern of false sharing, basic ways to mitigate it and call out to developers to pay attention during code-writing. [ Many thanks to Dave Hansen, Ying Huang, Tim Chen, Julie Du and Yu Chen for their contributions ] [1]. https://lore.kernel.org/lkml/20220619150456.GB34471@xsang-OptiPlex-9020/ [2]. https://lore.kernel.org/lkml/20201102091543.GM31092@shao2-debian/ [3]. https://lore.kernel.org/lkml/20230307125538.818862491@linutronix.de/ Signed-off-by: Feng Tang Reviewed-by: Randy Dunlap Reviewed-by: Shakeel Butt Link: https://lore.kernel.org/r/20230407041235.37886-1-feng.tang@intel.com Signed-off-by: Jonathan Corbet commit 2ca956cf883458a713d7e2f4c37554b374b39907 Author: Michael S. Tsirkin Date: Fri Apr 7 06:54:51 2023 -0400 dma-api-howto: typo fix Stumbled upon a typo while reading the doc, here's a fix. Signed-off-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/af1505348a67981f63ccff4e3c3d45b686cda43f.1680864874.git.mst@redhat.com Signed-off-by: Jonathan Corbet commit 790a6c21c111ba7dcddf762f791fb3178711b82f Author: Jonathan Corbet Date: Thu Mar 30 13:48:12 2023 -0600 docs: move m68k architecture documentation under Documentation/arch/ Architecture-specific documentation is being moved into Documentation/arch/ as a way of cleaning up the top-level documentation directory and making the docs hierarchy more closely match the source hierarchy. Move Documentation/m68k into arch/ and fix all in-tree references. Reviewed-by: Geert Uytterhoeven Signed-off-by: Jonathan Corbet commit 92b3de3f8ad7daddaf90ae7ce6162ca28db20370 Author: Jonathan Corbet Date: Thu Mar 30 13:28:50 2023 -0600 docs: move parisc documentation under Documentation/arch/ Architecture-specific documentation is being moved into Documentation/arch/ as a way of cleaning up the top-level documentation directory and making the docs hierarchy more closely match the source hierarchy. Move Documentation/parisc into arch/ and fix all in-tree references. Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Alex Shi Reviewed-by: Yanteng Si Signed-off-by: Jonathan Corbet commit 71dbc487283233bd8a34e1a4d7efe62db8c7af2a Author: Jonathan Corbet Date: Thu Mar 30 13:25:00 2023 -0600 docs: move ia64 architecture docs under Documentation/arch/ Architecture-specific documentation is being moved into Documentation/arch/ as a way of cleaning up the top-level documentation directory and making the docs hierarchy more closely match the source hierarchy. Move Documentation/ia64 into arch/ and fix all in-tree references. Signed-off-by: Jonathan Corbet commit fde2e40fb50bc268889178bcae1f33cbbacf05c7 Author: Jonathan Corbet Date: Thu Mar 30 13:08:45 2023 -0600 docs: Move arc architecture docs under Documentation/arch/ Architecture-specific documentation is being moved into Documentation/arch/ as a way of cleaning up the top-level documentation directory and making the docs hierarchy more closely match the source hierarchy. Move Documentation/arc into arch/ and fix all in-tree references. Acked-by: Vineet Gupta Signed-off-by: Jonathan Corbet commit 3d3a3a49e20f006fa88e4fec5ad236864faa3a35 Author: Ravi Bangoria Date: Fri Apr 7 16:54:59 2023 +0530 perf script ibs: Change bit description according to latest AMD PPR ("Processor Programming Reference") Some of the IBS_OP_DATA2 bit descriptions were stale (taken from old version of PPR). Change it according to latest PPR. Signed-off-by: Ravi Bangoria Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Ananth Narayan Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Link: https://lore.kernel.org/r/20230407112459.548-5-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit 4953c8979d19a34fa98f4e8e55eae603cffe128a Author: Ravi Bangoria Date: Fri Apr 7 16:54:58 2023 +0530 perf mem: Increase HISTC_MEM_LVL column size to 39 chars 39 is taken from the length of longest printable new API string: "Remote socket, same board Any cache hit". Although, using old API can result into even longer strings, let's not overkill by making it dynamic length. Signed-off-by: Ravi Bangoria Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Ananth Narayan Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Link: https://lore.kernel.org/r/20230407112459.548-5-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit ddeac198e1990715a162bf14faeab6000376ed1e Author: Ravi Bangoria Date: Fri Apr 7 16:54:57 2023 +0530 perf mem: Refactor perf_mem__lvl_scnprintf() to process 'union perf_mem_data_src' more intuitively Interpretation of 'union perf_mem_data_src' by perf_mem__lvl_scnprintf() is non-intuitive. For ex, it ignores 'mem_lvl' when 'mem_hops' is set but considers it otherwise. It prints both 'mem_lvl_num' and 'mem_lvl' when 'mem_hops' is not set. Refactor this function such that it behaves more intuitively: Use new API 'mem_lvl_num'|'mem_remote'|'mem_hops' if 'mem_lvl_num' contains value other than PERF_MEM_LVLNUM_NA. Otherwise, fallback to old API 'mem_lvl'. Since new API has no way to indicate MISS, use it from old api, otherwise don't club old and new APIs while parsing as well as printing. Before: $ sudo ./perf mem report -F sample,mem --stdio # Samples Memory access # ............ ........................ # 250097 N/A 188907 L1 hit 4116 L2 hit 3496 Remote Cache (1 hop) hit 3271 Remote Cache (2 hops) hit 873 L3 hit 598 Local RAM hit 438 Remote RAM (1 hop) hit 1 Uncached hit After: $ sudo ./perf mem report -F sample,mem --stdio # Samples Memory access # ............ ....................................... # 255517 N/A 189989 L1 hit 4541 L2 hit 3363 Remote core, same node Any cache hit 3336 Remote node, same socket Any cache hit 1275 L3 hit 743 RAM hit 545 Remote node, same socket RAM hit 4 Uncached hit Signed-off-by: Ravi Bangoria Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Ananth Narayan Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Link: https://lore.kernel.org/r/20230407112459.548-5-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit d5fa7e9d0c13d67be30305dff689811478ae53cb Author: Ravi Bangoria Date: Fri Apr 7 16:54:56 2023 +0530 perf mem: Add support for printing PERF_MEM_LVLNUM_UNC Add support for printing PERF_MEM_LVLNUM_UNC in perf mem report. Signed-off-by: Ravi Bangoria Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Ananth Narayan Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Link: https://lore.kernel.org/r/20230407112459.548-5-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit fd359ec81399f5cec92ac774df1c3b95f4d699a6 Author: Ravi Bangoria Date: Fri Apr 7 16:54:55 2023 +0530 perf mem: Add PERF_MEM_LVLNUM_NA to PERF_MEM_DATA_SRC_NONE Add PERF_MEM_LVLNUM_NA wherever PERF_MEM_DATA_SRC_NONE is used to set default values. Signed-off-by: Ravi Bangoria Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Ananth Narayan Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Link: https://lore.kernel.org/r/20230407112459.548-5-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit cf9f4c0eb1699d306e348b1fd0225af7b2c282d3 Author: Sean Christopherson Date: Tue Apr 4 17:26:08 2023 -0700 KVM: x86/mmu: Refresh CR0.WP prior to checking for emulated permission faults Refresh the MMU's snapshot of the vCPU's CR0.WP prior to checking for permission faults when emulating a guest memory access and CR0.WP may be guest owned. If the guest toggles only CR0.WP and triggers emulation of a supervisor write, e.g. when KVM is emulating UMIP, KVM may consume a stale CR0.WP, i.e. use stale protection bits metadata. Note, KVM passes through CR0.WP if and only if EPT is enabled as CR0.WP is part of the MMU role for legacy shadow paging, and SVM (NPT) doesn't support per-bit interception controls for CR0. Don't bother checking for EPT vs. NPT as the "old == new" check will always be true under NPT, i.e. the only cost is the read of vcpu->arch.cr4 (SVM unconditionally grabs CR0 from the VMCB on VM-Exit). Reported-by: Mathias Krause Link: https://lkml.kernel.org/r/677169b4-051f-fcae-756b-9a3e1bb9f8fe%40grsecurity.net Fixes: fb509f76acc8 ("KVM: VMX: Make CR0.WP a guest owned bit") Tested-by: Mathias Krause Link: https://lore.kernel.org/r/20230405002608.418442-1-seanjc@google.com Signed-off-by: Sean Christopherson commit e0999b0e2149a0ec97f88547ab3658032d8ed70d Author: Ravi Bangoria Date: Fri Apr 7 16:54:54 2023 +0530 tools include UAPI: Sync uapi/linux/perf_event.h with the kernel sources ... to bring PERF_MEM_LVLNUM_UNC definition to userspace Signed-off-by: Ravi Bangoria Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Ananth Narayan Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Sandipan Das Cc: Santosh Shukla Cc: Stephane Eranian Link: https://lore.kernel.org/r/20230407112459.548-5-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit 86169e657aaa4fb619552394364573d797792b44 Merge: b391efeeaf0b4 45e6cc8ef1cd8 Author: Linus Walleij Date: Tue Apr 11 00:23:27 2023 +0200 Merge tag 'renesas-pinctrl-for-v6.4-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v6.4 (take two) - Retain POCCTRL0 register across s2ram on R-Car D3, - Add support for Ethernet power-sources on R-Car V3M, V3H, E3, D3, and V4H, - Annotate sentinels in tables, - Add bias pinconf support and PWM pin groups on R-Car H1, - Miscellaneous fixes and improvements. commit 51924ae69eea5bc90b5da525fbcf4bbd5f8551b3 Author: Ian Rogers Date: Mon Apr 10 09:09:05 2023 -0700 perf build: Warn for BPF skeletons if endian mismatches Done as a warning as I'm not fully confident of the test's robustness of comparing the macro definition of __BYTE_ORDER__. v2. Is a rebase following patch 1 being merged. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230410160905.3052640-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b391efeeaf0b47966137ef93be430fda4486ada9 Author: Douglas Anderson Date: Fri Apr 7 14:29:14 2023 -0700 pinctrl: qcom: Add "and" to PIN_CONFIG_INPUT_ENABLE comment The comment recently added talking about PIN_CONFIG_INPUT_ENABLE is clearly missing the word "and". Comments live forever, so let's fix it. Fixes: e49eabe3e13f ("pinctrl: qcom: Support OUTPUT_ENABLE; deprecate INPUT_ENABLE") Reported-by: Stephen Boyd Link: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4409769/comment/9a1d5def_e1e71db7/ Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20230407142859.1.Ia5d70e320b60d6707c6182879097708e49b8b519@changeid Signed-off-by: Linus Walleij commit ea0c52399d99d2e48cafdf97e2d8589bf8beb7c2 Author: Ian Rogers Date: Mon Apr 10 09:25:11 2023 -0700 perf util: Move perf_guest/host declarations The definitions are in util.c so move the declarations to match. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Chengdong Li Cc: Denis Nikitin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Raul Silvera Cc: Ravi Bangoria Cc: Rob Herring Cc: Sean Christopherson Cc: Suzuki Poulouse Cc: Will Deacon Cc: Xing Zhengjun Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230410162511.3055900-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f12ad2727bbed890cbc2890470fb00c95b089b28 Author: Ian Rogers Date: Mon Apr 10 09:25:10 2023 -0700 perf util: Move input_name to util 'input_name' is the name of the input perf.data file, it is used by data convert and ui code. Move it to util to make it more consistent with other global state. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Chengdong Li Cc: Denis Nikitin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Raul Silvera Cc: Ravi Bangoria Cc: Rob Herring Cc: Sean Christopherson Cc: Suzuki Poulouse Cc: Will Deacon Cc: Xing Zhengjun Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230410162511.3055900-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2176f9e21cc5cf4c1e7c9f5772625755dcb32d7b Author: Ian Rogers Date: Mon Apr 10 09:25:09 2023 -0700 perf version: Use regular verbose flag Remove additional version_verbose flag by using the existing verbose variable. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Chengdong Li Cc: Denis Nikitin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Raul Silvera Cc: Ravi Bangoria Cc: Rob Herring Cc: Sean Christopherson Cc: Suzuki Poulouse Cc: Will Deacon Cc: Xing Zhengjun Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230410162511.3055900-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8641661cb7ee90f623276511ddb9ba901b15f904 Author: Ian Rogers Date: Mon Apr 10 09:25:08 2023 -0700 perf header: Move perf_version_string declaration Move to match the definition in header.c. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Chengdong Li Cc: Denis Nikitin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Raul Silvera Cc: Ravi Bangoria Cc: Rob Herring Cc: Sean Christopherson Cc: Suzuki Poulouse Cc: Will Deacon Cc: Xing Zhengjun Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230410162511.3055900-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0adea51ab2e6a0d9c8336673c7c07abb7a8b858a Author: Ian Rogers Date: Mon Apr 10 09:25:07 2023 -0700 perf usage: Move usage strings The usage function is part of util.h, move the usage strings there too. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Chengdong Li Cc: Denis Nikitin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Raul Silvera Cc: Ravi Bangoria Cc: Rob Herring Cc: Sean Christopherson Cc: Suzuki Poulouse Cc: Will Deacon Cc: Xing Zhengjun Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230410162511.3055900-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit cd8ef949203c0fe88b031530cb5b63afd582e0f7 Author: Ian Rogers Date: Mon Apr 10 09:25:06 2023 -0700 perf ui: Move window resize signal functions Move under tools/perf/ui rather than in perf.c. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Chengdong Li Cc: Denis Nikitin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Raul Silvera Cc: Ravi Bangoria Cc: Rob Herring Cc: Sean Christopherson Cc: Suzuki Poulouse Cc: Will Deacon Cc: Xing Zhengjun Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230410162511.3055900-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 29a66a6c71d6fdec7786fdeff0209f64998bcbe3 Author: Alexandre Mergnat Date: Tue Apr 4 18:29:51 2023 +0200 dt-bindings: pinctrl: mediatek,mt8365-pinctrl: add drive strength property This SoC is able to drive the following output current: - 2 mA - 4 mA - 6 mA - 8 mA - 10 mA - 12 mA - 14 mA - 16 mA Then drive-strength property is set with enum to reflect its HW capability. Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Acked-by: Krzysztof Kozlowski Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20230327-cleanup-pinctrl-binding-v3-3-6f56d5c7a8de@baylibre.com Signed-off-by: Linus Walleij commit e34bdc71ee5b6db9810dbd7f5b36409cb7be2ca9 Author: Alexandre Mergnat Date: Tue Apr 4 18:29:50 2023 +0200 dt-bindings: pinctrl: mediatek: deprecate custom bias pull properties for mt8365 In order to be more generic, "mediatek,pull-up-adv" and "mediatek,pull-down-adv" should be deprecated. Use "bias-pull-up" and "bias-pull-down" instead. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230327-cleanup-pinctrl-binding-v3-2-6f56d5c7a8de@baylibre.com Signed-off-by: Linus Walleij commit 000602e6d9b0fe3d441234d28c8a7297fd783727 Author: Alexandre Mergnat Date: Tue Apr 4 18:29:49 2023 +0200 dt-bindings: pinctrl: mediatek: deprecate custom drive strength property Deprecate mediatek,drive-strength-adv which shall not exist, that was an unnecessary property that leaked upstream from downstream kernels and there's no reason to use it. The generic property drive-strength-microamp should be used instead. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230327-cleanup-pinctrl-binding-v3-1-6f56d5c7a8de@baylibre.com Signed-off-by: Linus Walleij commit 9ed3bf411226f446a9795f2b49a15b9df98d7cf5 Author: Sean Christopherson Date: Tue Apr 4 17:31:33 2023 -0700 KVM: x86/mmu: Move filling of Hyper-V's TLB range struct into Hyper-V code Refactor Hyper-V's range-based TLB flushing API to take a gfn+nr_pages pair instead of a struct, and bury said struct in Hyper-V specific code. Passing along two params generates much better code for the common case where KVM is _not_ running on Hyper-V, as forwarding the flush on to Hyper-V's hv_flush_remote_tlbs_range() from kvm_flush_remote_tlbs_range() becomes a tail call. Cc: David Matlack Reviewed-by: David Matlack Reviewed-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20230405003133.419177-3-seanjc@google.com Signed-off-by: Sean Christopherson commit 8a1300ff95185b23baff9c226a001c269108f9ea Author: Sean Christopherson Date: Tue Apr 4 17:31:32 2023 -0700 KVM: x86: Rename Hyper-V remote TLB hooks to match established scheme Rename the Hyper-V hooks for TLB flushing to match the naming scheme used by all the other TLB flushing hooks, e.g. in kvm_x86_ops, vendor code, arch hooks from common code, etc. Reviewed-by: David Matlack Reviewed-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20230405003133.419177-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 760eafb2a3dd568a8eec519bf21c9a24582930f3 Author: Ian Rogers Date: Fri Apr 7 22:44:56 2023 -0700 perf test stat+json_output: Write JSON output to a file Write the JSON output to a file, then sanity check this output. This avoids problems with debug/warning/error output corrupting the file format. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sumanth Korikkar Cc: Thomas Richter Link: https://lore.kernel.org/r/20230408054456.3001367-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 4228df84f952ff12540510a5c6cd00e976d992ab Author: Ian Rogers Date: Fri Apr 7 22:44:55 2023 -0700 perf stat: Don't write invalid "started on" comment for JSON output JSON files don't support comments. Disable the "started on" comment when writing json output to file. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sumanth Korikkar Cc: Thomas Richter Link: https://lore.kernel.org/r/20230408054456.3001367-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 220368293a010d39fe41f130b99b666394034b08 Author: Ian Rogers Date: Fri Apr 7 22:44:54 2023 -0700 perf test stat+csv_output: Write CSV output to a file Write the CSV output to a file, then sanity check this output. This avoids problems with debug/warning/error output corrupting the file format. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sumanth Korikkar Cc: Thomas Richter Link: https://lore.kernel.org/r/20230408054456.3001367-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0538897a01a15c4eff15ee7a06caf5a45480d043 Author: Bartosz Golaszewski Date: Mon Mar 27 14:53:11 2023 +0200 pinctrl: qcom: spmi-gpio: add support for pmm8654au-gpio Add support for the GPIO controller present on the pmm8654au PMIC. Signed-off-by: Bartosz Golaszewski Cc: Linus Walleij Reviewed-by: Konrad Dybcio Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20230327125316.210812-14-brgl@bgdev.pl Signed-off-by: Linus Walleij commit fd9820d86d78e2dda3e709a645a7955a5370167c Author: Bartosz Golaszewski Date: Mon Mar 27 14:53:10 2023 +0200 dt-bindings: pinctrl: qcom,pmic-gpio: add compatible for pmm8654au-gpio Add a new compatible for the GPIO controller on the pm8654au PMIC. It has 12 pins with no holes. Signed-off-by: Bartosz Golaszewski Cc: Linus Walleij Acked-by: Rob Herring Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20230327125316.210812-13-brgl@bgdev.pl Signed-off-by: Linus Walleij commit 3a8b8fc3174891c4c12f5766d82184a82d4b2e3e Author: Ian Rogers Date: Fri Apr 7 22:52:08 2023 -0700 perf bpf filter: Support pre-5.16 kernels where 'mem_hops' isn't in 'union perf_mem_data_src' The 'mem_hops' bits were added in 5.16 with no prior equivalent. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230408055208.1283832-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 1edd03378e50ff1071004c80cb878e4bad73a68f Author: Asahi Lina Date: Mon Apr 3 19:01:11 2023 +0900 rust: sync: arc: Implement Arc::downcast() This mirrors the standard library's alloc::sync::Arc::downcast(). Based on the Rust standard library implementation, ver 1.62.0, licensed under "Apache-2.0 OR MIT", from: https://github.com/rust-lang/rust/tree/1.62.0/library/alloc/src For copyright details, please see: https://github.com/rust-lang/rust/blob/1.62.0/COPYRIGHT Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Andreas Hindborg Reviewed-by: Vincenzo Palazzo Reviewed-by: Gary Guo Signed-off-by: Asahi Lina Link: https://lore.kernel.org/r/20230224-rust-arc-v2-1-5c97a865b276@asahilina.net [ Moved `mod std_vendor;` up. ] Signed-off-by: Miguel Ojeda commit 39867fec2855cf37e5542dc6a972bce8ee191a9c Author: Asahi Lina Date: Thu Mar 23 21:35:10 2023 +0900 rust: macros: Allow specifying multiple module aliases Modules can (and usually do) have multiple alias tags, in order to specify multiple possible device matches for autoloading. Allow this by changing the alias ModuleInfo field to an Option>. Note: For normal device IDs this is autogenerated by modpost (which is not properly integrated with Rust support yet), so it is useful to be able to manually add device match aliases for now, and should still be useful in the future for corner cases that modpost does not handle. This pulls in the expect_group() helper from the rfl/rust branch (with credit to authors). Co-developed-by: Miguel Ojeda Signed-off-by: Miguel Ojeda Co-developed-by: Finn Behrens Signed-off-by: Finn Behrens Co-developed-by: Sumera Priyadarsini Signed-off-by: Sumera Priyadarsini Reviewed-by: Vincenzo Palazzo Signed-off-by: Asahi Lina Link: https://lore.kernel.org/r/20230224-rust-macros-v2-1-7396e8b7018d@asahilina.net Signed-off-by: Miguel Ojeda commit 318c3cc8e107c2b36108132057ca90d0d56d1bd9 Author: Miguel Ojeda Date: Fri Feb 24 18:11:50 2023 +0900 rust: alloc: vec: Add some try_* methods we need Add some missing fallible methods that we need. They are all marked as: #[stable(feature = "kernel", since = "1.0.0")] for easy identification. Lina: Extracted from commit 487d7578bd03 ("rust: alloc: add some `try_*` methods we need") in rust-for-linux/rust. Signed-off-by: Miguel Ojeda Signed-off-by: Asahi Lina Link: https://github.com/Rust-for-Linux/linux/commit/487d7578bd03 Link: https://lore.kernel.org/r/20230224-rust-vec-v1-4-733b5b5a57c5@asahilina.net [ Match the non-fallible methods from version 1.62.0, since those in commit 487d7578bd03 were written for 1.54.0-beta.1. ] Signed-off-by: Miguel Ojeda commit 3dcb652a3afc4b32cf8d3c1605c8cf22ad174a07 Author: Asahi Lina Date: Fri Feb 24 18:11:49 2023 +0900 rust: Add SPDX headers to alloc::vec::{spec_extend, set_len_on_drop} Add the missing SPDX headers to these modules, which were just imported from the Rust stdlib. Doing this in a separate commit makes it easier to audit that the files have not been modified in the original import. See the preceding two commits for attribution and licensing details. Signed-off-by: Asahi Lina Link: https://lore.kernel.org/r/20230224-rust-vec-v1-3-733b5b5a57c5@asahilina.net [ Reworded for typo. ] Signed-off-by: Miguel Ojeda commit 0c1228486befa3d6e943488406f1e3c05679721b Author: Ian Rogers Date: Fri Apr 7 22:52:07 2023 -0700 perf lock contention: Support pre-5.14 kernels 'struct rq's member '__lock' was renamed from 'lock' in 5.14. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230408055208.1283832-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit fb8b9d23f15f1440671d0127f7ad68d679fd29a3 Author: Conor Dooley Date: Thu Apr 6 21:57:47 2023 +0100 clk: sifive: make SiFive clk drivers depend on ARCH_ symbols As part of converting RISC-V SOC_FOO symbols to ARCH_FOO to match the use of such symbols on other architectures, convert the SiFive clk drivers to use the new symbol. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20230406-groovy-trustable-15853ac0a130@spud Signed-off-by: Stephen Boyd commit c0e19528439db9051c7847f1c91f22bd1e87e0ce Author: Lars-Peter Clausen Date: Sun Apr 9 18:45:02 2023 -0700 clk: uniphier: Use managed `of_clk_add_hw_provider()` Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230410014502.27929-11-lars@metafoo.de Signed-off-by: Stephen Boyd commit 361dde3c283324b71494dec4f51e829054d0822f Author: Lars-Peter Clausen Date: Sun Apr 9 18:45:01 2023 -0700 clk: si5351: Use managed `of_clk_add_hw_provider()` Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230410014502.27929-10-lars@metafoo.de Signed-off-by: Stephen Boyd commit bda73391c8efea9de9d69503c9ab5a1ecabb1786 Author: Lars-Peter Clausen Date: Sun Apr 9 18:45:00 2023 -0700 clk: si570: Use managed `of_clk_add_hw_provider()` Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230410014502.27929-9-lars@metafoo.de Signed-off-by: Stephen Boyd commit a7f3b6757acde808e1558ffa23b4a80f6831a081 Author: Lars-Peter Clausen Date: Sun Apr 9 18:44:59 2023 -0700 clk: si514: Use managed `of_clk_add_hw_provider()` Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230410014502.27929-8-lars@metafoo.de Signed-off-by: Stephen Boyd commit 40882deb83c29d8df4470d4e5e7f137b6acf7ad1 Author: Trond Myklebust Date: Mon Mar 13 18:45:53 2023 -0400 NFSv4.1: Always send a RECLAIM_COMPLETE after establishing lease The spec requires that we always at least send a RECLAIM_COMPLETE when we're done establishing the lease and recovering any state. Fixes: fce5c838e133 ("nfs41: RECLAIM_COMPLETE functionality") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 56fc9a343a2001bf64a7370b3e3cf2256c60af3e Author: Lars-Peter Clausen Date: Sun Apr 9 18:44:57 2023 -0700 clk: lmk04832: Use managed `of_clk_add_hw_provider()` Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230410014502.27929-6-lars@metafoo.de Signed-off-by: Stephen Boyd commit 56d144d0344aaa3810e2d18229f315480fc72a89 Author: Lars-Peter Clausen Date: Sun Apr 9 18:44:56 2023 -0700 clk: hsdk-pll: Use managed `of_clk_add_hw_provider()` Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230410014502.27929-5-lars@metafoo.de Signed-off-by: Stephen Boyd commit c2e59c7f27c8a001eba725ba48e6d647d7b1f3d0 Author: Lars-Peter Clausen Date: Sun Apr 9 18:44:55 2023 -0700 clk: cdce706: Use managed `of_clk_add_hw_provider()` Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230410014502.27929-4-lars@metafoo.de Signed-off-by: Stephen Boyd commit 7bed704f803cabfd7d5c3e92b0e8ecd29eefe5a3 Author: Lars-Peter Clausen Date: Sun Apr 9 18:44:54 2023 -0700 clk: axs10x: Use managed `of_clk_add_hw_provider()` Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230410014502.27929-3-lars@metafoo.de Signed-off-by: Stephen Boyd commit f042ebcfccaa9761b4f36ffa33b0663d6f6eaaa4 Author: Lars-Peter Clausen Date: Sun Apr 9 18:44:53 2023 -0700 clk: axm5516: Use managed `of_clk_add_hw_provider()` Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230410014502.27929-2-lars@metafoo.de Signed-off-by: Stephen Boyd commit a301528f79d1ec27cd34122d655e0200a950f960 Author: Lars-Peter Clausen Date: Sun Apr 9 18:44:52 2023 -0700 clk: axi-clkgen: Use managed `of_clk_add_hw_provider()` Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230410014502.27929-1-lars@metafoo.de Signed-off-by: Stephen Boyd commit 6aa252ae8888382769200159b1573bb996bceb44 Merge: e44fdd114cc3c 5e96c2e0e88d3 Author: Stephen Boyd Date: Mon Apr 10 12:42:50 2023 -0700 Merge tag 'renesas-clk-for-v6.4-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull one more Renesas clk driver update from Geert Uytterhoeven: - Add I2C5 clock on R-Car V3H * tag 'renesas-clk-for-v6.4-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r8a77980: Add I2C5 clock commit 5874a6a187f2e814542d7fdf918fd29f79ff25c3 Author: Ilpo Järvinen Date: Wed Feb 15 15:06:05 2023 +0200 selftests/resctrl: Correct get_llc_perf() param in function comment get_llc_perf() function comment refers to cpu_no parameter that does not exist. Correct get_llc_perf() the comment to document llc_perf_miss instead. Signed-off-by: Ilpo Järvinen Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit a967e17f918400226e57335e6131572d9f456a9f Author: Ilpo Järvinen Date: Wed Feb 15 15:06:04 2023 +0200 selftests/resctrl: Use remount_resctrlfs() consistently with boolean remount_resctrlfs() accepts a boolean value as an argument. Some tests pass 0/1 and some tests pass true/false. Make all the callers of remount_resctrlfs() use true/false so that the parameter usage is consistent across tests. Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Signed-off-by: Ilpo Järvinen Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit e48c32306bce38a7b2617543fe0d8d51ca49a448 Author: Fenghua Yu Date: Wed Feb 15 15:06:03 2023 +0200 selftests/resctrl: Change name from CBM_MASK_PATH to INFO_PATH CBM_MASK_PATH is actually the path to resctrl/info. Change the macro name to correctly indicate what it represents. [ ij: Tweaked the changelog. ] Signed-off-by: Fenghua Yu Signed-off-by: Ilpo Järvinen Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit 9ce29d23a13399b44b8e52505464c5d0365ce086 Author: Ilpo Järvinen Date: Wed Feb 15 15:06:02 2023 +0200 selftests/resctrl: Change initialize_llc_perf() return type to void initialize_llc_perf() unconditionally returns 0. initialize_llc_perf() performs only memory initialization, none of which can fail. Change the return type from int to void to accurately reflect that its return value doesn't need to be checked. Remove the error checking from the only callsite. Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Signed-off-by: Ilpo Järvinen Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit 5d869d7bb4b8d8f2e5fd207e521419f27f7ad115 Author: Ilpo Järvinen Date: Wed Feb 15 15:06:01 2023 +0200 selftests/resctrl: Replace obsolete memalign() with posix_memalign() memalign() is obsolete according to its manpage. Replace memalign() with posix_memalign() and remove malloc.h include that was there for memalign(). As a pointer is passed into posix_memalign(), initialize *p to NULL to silence a warning about the function's return value being used as uninitialized (which is not valid anyway because the error is properly checked before p is returned). Suggested-by: Reinette Chatre Signed-off-by: Ilpo Järvinen Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit 0d45c83b95da414e98ad333e723141a94f6e2c64 Author: Ilpo Järvinen Date: Wed Feb 15 15:06:00 2023 +0200 selftests/resctrl: Check for return value after write_schemata() MBA test case writes schemata but it does not check if the write is successful or not. Add the error check and return error properly. Fixes: 01fee6b4d1f9 ("selftests/resctrl: Add MBA test") Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Signed-off-by: Ilpo Järvinen Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit fa10366cc6f4cc862871f8938426d85c2481f084 Author: Ilpo Järvinen Date: Wed Feb 15 15:05:59 2023 +0200 selftests/resctrl: Allow ->setup() to return errors resctrl_val() assumes ->setup() always returns either 0 to continue tests or < 0 in case of the normal termination of tests after x runs. The latter overlaps with normal error returns. Define END_OF_TESTS (=1) to differentiate the normal termination of tests and return errors as negative values. Alter callers of ->setup() to handle errors properly. Fixes: 790bf585b0ee ("selftests/resctrl: Add Cache Allocation Technology (CAT) selftest") Fixes: ecdbb911f22d ("selftests/resctrl: Add MBM test") Signed-off-by: Ilpo Järvinen Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit c90b3b588e369c20087699316259fa5ebbb16f2d Author: Ilpo Järvinen Date: Wed Feb 15 15:05:58 2023 +0200 selftests/resctrl: Move ->setup() call outside of test specific branches resctrl_val() function is called only by MBM, MBA, and CMT tests which means the else branch is never used. Both test branches call param->setup(). Remove the unused else branch and place the ->setup() call outside of the test specific branches reducing code duplication. Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Signed-off-by: Ilpo Järvinen Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit 22a8be280383812235131dda18a8212a59fadd2d Author: Ilpo Järvinen Date: Wed Feb 15 15:05:57 2023 +0200 selftests/resctrl: Return NULL if malloc_and_init_memory() did not alloc mem malloc_and_init_memory() in fill_buf isn't checking if memalign() successfully allocated memory or not before accessing the memory. Check the return value of memalign() and return NULL if allocating aligned memory fails. Fixes: a2561b12fe39 ("selftests/resctrl: Add built in benchmark") Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Signed-off-by: Ilpo Järvinen Reviewed-by: Reinette Chatre Signed-off-by: Shuah Khan commit c9b3649a934d131151111354bcbb638076f03a30 Author: Chao Yu Date: Mon Apr 10 10:12:22 2023 +0800 f2fs: fix to drop all dirty pages during umount() if cp_error is set xfstest generic/361 reports a bug as below: f2fs_bug_on(sbi, sbi->fsync_node_num); kernel BUG at fs/f2fs/super.c:1627! RIP: 0010:f2fs_put_super+0x3a8/0x3b0 Call Trace: generic_shutdown_super+0x8c/0x1b0 kill_block_super+0x2b/0x60 kill_f2fs_super+0x87/0x110 deactivate_locked_super+0x39/0x80 deactivate_super+0x46/0x50 cleanup_mnt+0x109/0x170 __cleanup_mnt+0x16/0x20 task_work_run+0x65/0xa0 exit_to_user_mode_prepare+0x175/0x190 syscall_exit_to_user_mode+0x25/0x50 do_syscall_64+0x4c/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc During umount(), if cp_error is set, f2fs_wait_on_all_pages() should not stop waiting all F2FS_WB_CP_DATA pages to be writebacked, otherwise, fsync_node_num can be non-zero after f2fs_wait_on_all_pages() causing this bug. In this case, to avoid deadloop in f2fs_wait_on_all_pages(), it needs to drop all dirty pages rather than redirtying them. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5cdb422c839134273866208dad5360835ddb9794 Author: Chao Yu Date: Mon Apr 10 10:14:02 2023 +0800 f2fs: fix to avoid use-after-free for cached IPU bio xfstest generic/019 reports a bug: kernel BUG at mm/filemap.c:1619! RIP: 0010:folio_end_writeback+0x8a/0x90 Call Trace: end_page_writeback+0x1c/0x60 f2fs_write_end_io+0x199/0x420 bio_endio+0x104/0x180 submit_bio_noacct+0xa5/0x510 submit_bio+0x48/0x80 f2fs_submit_write_bio+0x35/0x300 f2fs_submit_merged_ipu_write+0x2a0/0x2b0 f2fs_write_single_data_page+0x838/0x8b0 f2fs_write_cache_pages+0x379/0xa30 f2fs_write_data_pages+0x30c/0x340 do_writepages+0xd8/0x1b0 __writeback_single_inode+0x44/0x370 writeback_sb_inodes+0x233/0x4d0 __writeback_inodes_wb+0x56/0xf0 wb_writeback+0x1dd/0x2d0 wb_workfn+0x367/0x4a0 process_one_work+0x21d/0x430 worker_thread+0x4e/0x3c0 kthread+0x103/0x130 ret_from_fork+0x2c/0x50 The root cause is: after cp_error is set, f2fs_submit_merged_ipu_write() in f2fs_write_single_data_page() tries to flush IPU bio in cache, however f2fs_submit_merged_ipu_write() missed to check validity of @bio parameter, result in submitting random cached bio which belong to other IO context, then it will cause use-after-free issue, fix it by adding additional validity check. Fixes: 0b20fcec8651 ("f2fs: cache global IPU bio") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c277991d7cf07cf68673abea52d4a96c4ee6272d Author: Chao Yu Date: Mon Apr 10 10:20:12 2023 +0800 f2fs: remove unneeded in-memory i_crtime copy i_crtime will never change after inode creation, so we don't need to copy it into f2fs_inode_info.i_disk_time[3], and monitor its change to decide whether updating inode page, remove related stuff. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 68f0453dabdb99e76f75ce52ce40bc4bc71389a8 Author: Chao Yu Date: Mon Apr 10 10:17:22 2023 +0800 f2fs: use f2fs_hw_is_readonly() instead of bdev_read_only() f2fs has supported multi-device feature, to check devices' rw status, it should use f2fs_hw_is_readonly() rather than bdev_read_only(), fix it. Meanwhile, it removes f2fs_hw_is_readonly() check condition in: - f2fs_write_checkpoint() - f2fs_convert_inline_inode() As it has checked f2fs_readonly() condition, and if f2fs' devices were readonly, f2fs_readonly() must be true. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0c9f4521958ff52b74967c8a39a8b5747ba8df41 Author: Weizhao Ouyang Date: Tue Apr 4 11:28:44 2023 +0800 f2fs: use common implementation of file type Use common implementation of file type conversion helpers. Signed-off-by: Weizhao Ouyang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3094e5579b4d5d8343fdb05e9a3a35cc85a14c1c Author: Yangtao Li Date: Fri Mar 31 00:49:47 2023 +0800 f2fs: merge lz4hc_compress_pages() to lz4_compress_pages() Remove unnecessary lz4hc_compress_pages(). Signed-off-by: Yangtao Li Reviewed-by: Chao Yu [Jaegeuk Kim: clean up] Signed-off-by: Jaegeuk Kim commit 084e15ea14bbb1ad40163438cfa74a76a1521c16 Author: Yangtao Li Date: Fri Mar 31 19:33:05 2023 +0800 f2fs: convert to use sysfs_emit Let's use sysfs_emit. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c2c14ca5b1f3591ebf7f75e374ddd65c574c9d42 Author: Yangtao Li Date: Fri Mar 31 00:56:48 2023 +0800 f2fs: set default compress option only when sb_has_compression If the compress feature is not enabled, there is no need to set compress-related parameters. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d11cef14f8146f3babd286c2cc8ca09c166295e2 Author: Yonggil Song Date: Tue Mar 21 09:12:51 2023 +0900 f2fs: Fix system crash due to lack of free space in LFS When f2fs tries to checkpoint during foreground gc in LFS mode, system crash occurs due to lack of free space if the amount of dirty node and dentry pages generated by data migration exceeds free space. The reproduction sequence is as follows. - 20GiB capacity block device (null_blk) - format and mount with LFS mode - create a file and write 20,000MiB - 4k random write on full range of the file RIP: 0010:new_curseg+0x48a/0x510 [f2fs] Code: 55 e7 f5 89 c0 48 0f af c3 48 8b 5d c0 48 c1 e8 20 83 c0 01 89 43 6c 48 83 c4 28 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc <0f> 0b f0 41 80 4f 48 04 45 85 f6 0f 84 ba fd ff ff e9 ef fe ff ff RSP: 0018:ffff977bc397b218 EFLAGS: 00010246 RAX: 00000000000027b9 RBX: 0000000000000000 RCX: 00000000000027c0 RDX: 0000000000000000 RSI: 00000000000027b9 RDI: ffff8c25ab4e74f8 RBP: ffff977bc397b268 R08: 00000000000027b9 R09: ffff8c29e4a34b40 R10: 0000000000000001 R11: ffff977bc397b0d8 R12: 0000000000000000 R13: ffff8c25b4dd81a0 R14: 0000000000000000 R15: ffff8c2f667f9000 FS: 0000000000000000(0000) GS:ffff8c344ec80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000c00055d000 CR3: 0000000e30810003 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: allocate_segment_by_default+0x9c/0x110 [f2fs] f2fs_allocate_data_block+0x243/0xa30 [f2fs] ? __mod_lruvec_page_state+0xa0/0x150 do_write_page+0x80/0x160 [f2fs] f2fs_do_write_node_page+0x32/0x50 [f2fs] __write_node_page+0x339/0x730 [f2fs] f2fs_sync_node_pages+0x5a6/0x780 [f2fs] block_operations+0x257/0x340 [f2fs] f2fs_write_checkpoint+0x102/0x1050 [f2fs] f2fs_gc+0x27c/0x630 [f2fs] ? folio_mark_dirty+0x36/0x70 f2fs_balance_fs+0x16f/0x180 [f2fs] This patch adds checking whether free sections are enough before checkpoint during gc. Signed-off-by: Yonggil Song [Jaegeuk Kim: code clean-up] Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 19e0e21a51183d4e0784602f27e4db7b965077be Author: Yangtao Li Date: Tue Apr 4 12:00:51 2023 +0800 f2fs: remove struct victim_selection default_v_ops There is only single instance of these ops, and Jaegeuk point out that: Originally this was intended to give a chance to provide other allocation option. Anyway, it seems quit hard to do it anymore. So remove the indirection and call f2fs_get_victim() directly. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5de6ef496eee0c0063aceec7b9843fb824bd85ce Author: Markus Elfring Date: Thu Apr 6 22:00:24 2023 +0200 remoteproc: imx_dsp_rproc: Improve exception handling in imx_dsp_rproc_mbox_alloc() The label “err_out” was used to jump to another pointer check despite of the detail in the implementation of the function “imx_dsp_rproc_mbox_alloc” that it was determined already that the corresponding variable contained an error pointer because of a failed call of the function “mbox_request_channel_byname”. Thus perform the following adjustments: 1. Return directly after a call of the function “mbox_request_channel_byname” failed for the input parameter “tx”. 2. Use more appropriate labels instead. 3. Reorder jump targets at the end. 4. Omit a function call and three extra checks. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/d0e18bb1-afc4-8b6f-bb1c-b74b3bad908e@web.de Signed-off-by: Mathieu Poirier commit 3ec0e1ea4770e40575bfb2bb4e9ebbbaa3c80d3f Author: Alexandre Mergnat Date: Fri Apr 7 11:13:51 2023 +0200 memory: mtk-smi: mt8365: Add SMI Support Add MT8365 SMI common support. Reviewed-by: Yong Wu Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20230407-smi-driver-v2-1-8da6683cdb5c@baylibre.com Signed-off-by: Krzysztof Kozlowski commit 4ad9a801a3597ccfd406c911638aca2c61e57bdf Author: Alexandre Mergnat Date: Fri Apr 7 11:13:53 2023 +0200 dt-bindings: memory-controllers: mediatek,smi-larb: add mt8365 Add binding description for mediatek,mt8365-smi-larb Reviewed-by: Matthias Brugger Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20230407-smi-driver-v2-3-8da6683cdb5c@baylibre.com Signed-off-by: Krzysztof Kozlowski commit 67025255ee8b1ec496b01f74e8c298d211bc7a82 Author: Alexandre Mergnat Date: Fri Apr 7 11:13:52 2023 +0200 dt-bindings: memory-controllers: mediatek,smi-common: add mt8365 Add binding description for mediatek,mt8365-smi-common Reviewed-by: Matthias Brugger Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20230407-smi-driver-v2-2-8da6683cdb5c@baylibre.com Signed-off-by: Krzysztof Kozlowski commit be4c5c6e84429e87cfdf1c8be350a49a714a93e2 Author: Diogo Ivo Date: Wed Mar 22 23:40:50 2023 +0000 memory: tegra: read values from correct device When reading MR18 for Dev1 the code was incorrectly reading the value corresponding to Dev0, so fix this by adjusting the index according to the Tegra X1 TRM. Signed-off-by: Diogo Ivo Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20230322234050.47332-1-diogo.ivo@tecnico.ulisboa.pt Signed-off-by: Krzysztof Kozlowski commit c4d3b488a90be95f4f9413dc7eae5fc113d15fe9 Author: Manu Bretelle Date: Fri Apr 7 19:29:19 2023 -0700 selftests/bpf: Reset err when symbol name already exist in kprobe_multi_test When trying to add a name to the hashmap, an error code of EEXIST is returned and we continue as names are possibly duplicated in the sys file. If the last name in the file is a duplicate, we will continue to the next iteration of the while loop, and exit the loop with a value of err set to EEXIST and enter the error label with err set, which causes the test to fail when it should not. This change reset err to 0 before continue-ing into the next iteration, this way, if there is no more data to read from the file we iterate through, err will be set to 0. Behaviour prior to this change: ``` test_kprobe_multi_bench_attach:FAIL:get_syms unexpected error: -17 (errno 2) All error logs: test_kprobe_multi_bench_attach:FAIL:get_syms unexpected error: -17 (errno 2) Summary: 0/1 PASSED, 0 SKIPPED, 1 FAILED ``` After this change: ``` Summary: 1/2 PASSED, 0 SKIPPED, 0 FAILED ``` Signed-off-by: Manu Bretelle Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230408022919.54601-1-chantr4@gmail.com commit 96ae3995c6930d2b6c11a48dad9a59ddd34abaad Author: Qiuxu Zhuo Date: Mon Apr 10 21:15:31 2023 +0800 EDAC/i10nm: Add Intel Sierra Forest server support The Sierra Forest CPU model uses similar memory controller registers as Granite Rapids server. Add Sierra Forest CPU model ID for EDAC support. Tested-by: Li Zhang Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20230410131531.11914-1-qiuxu.zhuo@intel.com commit 1d1493bdc25f498468a606a4ece947d155cfa3a9 Author: Jeffrey Hugo Date: Mon Apr 10 09:58:12 2023 -0600 bus: mhi: host: Use mhi_tryset_pm_state() for setting fw error state If firmware loading fails, the controller's pm_state is updated to MHI_PM_FW_DL_ERR unconditionally. This can corrupt the pm_state as the update is not done under the proper lock, and also does not validate the state transition. The firmware loading can fail due to a detected syserr, but if MHI_PM_FW_DL_ERR is unconditionally set as the pm_state, the handling of the syserr can break when it attempts to transition from syserr detect, to syserr process. By grabbing the lock, we ensure we don't race with some other pm_state update. By using mhi_try_set_pm_state(), we check that the transition to MHI_PM_FW_DL_ERR is valid via the state machine logic. If it is not valid, then some other transition is occurring like syserr processing, and we assume that will resolve the firmware loading error. Fixes: 12e050c77be0 ("bus: mhi: core: Move to an error state on any firmware load failure") Cc: stable@vger.kernel.org Signed-off-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1681142292-27571-3-git-send-email-quic_jhugo@quicinc.com Signed-off-by: Manivannan Sadhasivam commit d469d9448a0f1a33c175d3280b1542fa0158ad7a Author: Jeffrey Hugo Date: Mon Apr 10 09:58:11 2023 -0600 bus: mhi: host: Remove duplicate ee check for syserr If we detect a system error via intvec, we only process the syserr if the current ee is different than the last observed ee. The reason for this check is to prevent bhie from running multiple times, but with the single queue handling syserr, that is not possible. The check can cause an issue with device recovery. If PBL loads a bad SBL via BHI, but that SBL hangs before notifying the host of an ee change, then issuing soc_reset to crash the device and retry (after supplying a fixed SBL) will not recover the device as the host will observe a PBL->PBL transition and not process the syserr. The device will be stuck until either the driver is reloaded, or the host is rebooted. Instead, remove the check so that we can attempt to recover the device. Fixes: ef2126c4e2ea ("bus: mhi: core: Process execution environment changes serially") Cc: stable@vger.kernel.org Signed-off-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1681142292-27571-2-git-send-email-quic_jhugo@quicinc.com Signed-off-by: Manivannan Sadhasivam commit 813a2398907c2f8b94afc5d5f80e0f581b585a45 Author: Dmitry Baryshkov Date: Fri Mar 31 18:12:50 2023 +0300 phy: qcom-qmp-pcie: drop sdm845_qhp_pcie_rx_tbl The SDM845 QHP PHY doesn't have designated RX region. Corresponding RX table is empty, so we can drop it completely. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230331151250.4049-2-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 1db6b0a4246ce708b89f5136571130b9987741d1 Author: Dmitry Baryshkov Date: Fri Mar 31 18:12:49 2023 +0300 phy: qcom-qmp-pcie: sc8180x PCIe PHY has 2 lanes All PCIe PHYs on sc8180x platform have 2 lanes, so change the number of lanes to 2. Fixes: f839f14e24f2 ("phy: qcom-qmp: Add sc8180x PCIe support") Cc: stable@vger.kernel.org # 5.15 Sgned-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230331151250.4049-1-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 3228cec23b8b29215e18090c6ba635840190993d Author: Zheng Wang Date: Mon Mar 13 16:42:20 2023 +0000 media: rkvdec: fix use after free bug in rkvdec_remove In rkvdec_probe, rkvdec->watchdog_work is bound with rkvdec_watchdog_func. Then rkvdec_vp9_run may be called to start the work. If we remove the module which will call rkvdec_remove to make cleanup, there may be a unfinished work. The possible sequence is as follows, which will cause a typical UAF bug. Fix it by canceling the work before cleanup in rkvdec_remove. CPU0 CPU1 |rkvdec_watchdog_func rkvdec_remove | rkvdec_v4l2_cleanup| v4l2_m2m_release | kfree(m2m_dev); | | | v4l2_m2m_get_curr_priv | m2m_dev->curr_ctx //use Fixes: cd33c830448b ("media: rkvdec: Add the rkvdec driver") Signed-off-by: Zheng Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 50d0a7aea4809cef87979d4669911276aa23b71f Author: Zheng Wang Date: Mon Mar 13 16:31:20 2023 +0000 media: cedrus: fix use after free bug in cedrus_remove due to race condition In cedrus_probe, dev->watchdog_work is bound with cedrus_watchdog function. In cedrus_device_run, it will started by schedule_delayed_work. If there is an unfinished work in cedrus_remove, there may be a race condition and trigger UAF bug. CPU0 CPU1 |cedrus_watchdog cedrus_remove | v4l2_m2m_release | kfree(m2m_dev) | | | v4l2_m2m_get_curr_priv | m2m_dev //use Fix it by canceling the worker in cedrus_remove. Fixes: 7c38a551bda1 ("media: cedrus: Add watchdog for job completion") Signed-off-by: Zheng Wang Acked-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3d77e23c998872caf3f2f4b4fcd05f8ae2e7b651 Author: Benjamin Gaignard Date: Mon Feb 20 10:48:49 2023 +0000 media: verisilicon: VP9: Only propose 10 bits compatible pixels formats When decoding a 10bits bitstreams VP9 driver should only expose 10bits pixel formats. To fulfill this requirement it is needed to call hantro_reset_raw_fmt() when bit depth change and to correctly set match_depth in pixel formats enumeration. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ac5d3db4c1db6697a9bbd251b60e78df803587f3 Author: Benjamin Gaignard Date: Mon Feb 20 10:48:48 2023 +0000 media: verisilicon: HEVC: Only propose 10 bits compatible pixels formats When decoding a 10bits bitstreams HEVC driver should only expose 10bits pixel formats. To fulfill this requirement it is needed to call hantro_reset_raw_fmt() when bit depth change and to correctly set match_depth in pixel formats enumeration. Signed-off-by: Benjamin Gaignard Reviewed-by: Nicolas Dufresne Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3c32d94c9c52f9a49b4e9626e96bcc7528fe1b27 Author: Benjamin Gaignard Date: Mon Feb 20 10:48:47 2023 +0000 media: verisilicon: Do not change context bit depth before validating the format It is needed to check if the proposed pixels format is valid before updating context bit depth and other internal states. Stop using ctx->bit_depth to check format depth match and return result to the caller. Signed-off-by: Benjamin Gaignard Reviewed-by: Nicolas Dufresne Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6aa3b9c5da6e15a8b60322b3fdd058856de30305 Author: Benjamin Gaignard Date: Mon Feb 20 10:48:46 2023 +0000 media: verisilicon: Do not set ctx->bit_depth in hantro_try_ctrl() In hantro_try_ctrl() we should only check the values inside control parameters and not set ctx->bit_depth. That must be done in controls set function. Create a set control function for hevc where ctx->bit_depth is set at the right time. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3b93a6f009c97b9e007bdf889be9d4e50d84e82b Author: Benjamin Gaignard Date: Mon Feb 20 10:48:45 2023 +0000 media: verisilicon: Do not use ctx fields as format storage when resetting Source and destination pixel formats fields of context structure should not be used as storage when resetting the format. Use local variables instead and let hantro_set_fmt_out() and hantro_set_fmt_cap() set them correctly later. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit db6f68b51e5c7b432185c6d872d03901c07136d2 Author: Benjamin Gaignard Date: Mon Feb 20 10:48:44 2023 +0000 media: verisilicon: Do not set context src/dst formats in reset functions Setting context source and destination formats should only be done in hantro_set_fmt_out() and hantro_set_fmt_cap() after check that the targeted queue is not busy. Remove these calls from hantro_reset_encoded_fmt() and hantro_reset_raw_fmt() to clean the driver. Signed-off-by: Benjamin Gaignard Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 960badda95f10fb0c60f6f64978b19eafa9507a7 Author: Yunfei Dong Date: Wed Feb 1 07:33:16 2023 +0000 media: mediatek: vcodec: change lat thread decode error condition If lat thread can't get lat buffer, it should be that current instance don't be schedulded, the driver can't free the src buffer directly. Fixes: 7b182b8d9c85 ("media: mediatek: vcodec: Refactor get and put capture buffer flow") Signed-off-by: Yunfei Dong Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2e0ef56d81cb2569624d288b7e95a8a2734a7c74 Author: Yunfei Dong Date: Wed Feb 1 07:33:15 2023 +0000 media: mediatek: vcodec: making sure queue_work successfully Putting core work to work queue using queue_work maybe fail, call queue_work again when the count of core work in work queue is less than core_list_cnt, making sure all the buffer in core list can be scheduled. Fixes: 365e4ba01df4 ("media: mtk-vcodec: Add work queue for core hardware decode") Signed-off-by: Yunfei Dong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit af50b13dd3d7d5dbc1f08add1c462398e926a053 Author: Yunfei Dong Date: Wed Feb 1 07:33:14 2023 +0000 media: mediatek: vcodec: remove unused lat_buf Remove unused lat_buf from core list, or leading to core list access NULL point. Fixes: 365e4ba01df4 ("media: mtk-vcodec: Add work queue for core hardware decode") Signed-off-by: Yunfei Dong Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d227af847ac2d7d90350124a1b2451e4fc1f050c Author: Yunfei Dong Date: Wed Feb 1 07:33:13 2023 +0000 media: mediatek: vcodec: add core decode done event Need to make sure core decode done before current instance is free. Fixes: 365e4ba01df4 ("media: mtk-vcodec: Add work queue for core hardware decode") Signed-off-by: Yunfei Dong Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4308c6878acfb58eda46483644b516abd732b6dd Author: Vivek Pernamitta Date: Tue Apr 4 15:14:16 2023 +0530 bus: mhi: host: Avoid ringing EV DB if there are no elements to process Currently, mhi_process_data_event_ring()/mhi_process_ctrl_ev_ring() APIs are ringing DB even if there are no ring elements to process. This could cause the device to process the DB event in the absence of ring elements. So to avoid this unnecessary device processing, let's ring event DB only if there are any ring elements to process. Signed-off-by: Vivek Pernamitta Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1680601458-9105-1-git-send-email-quic_vpernami@quicinc.com [mani: massaged the commit message a bit] Signed-off-by: Manivannan Sadhasivam commit 2cfca6c1bf8074175ea7a3b6b47f77ebdef8f701 Author: Yunfei Dong Date: Wed Feb 1 07:33:12 2023 +0000 media: mediatek: vcodec: move lat_buf to the top of core list Current instance will decode done when begin to wait lat buf full, move the lat_buf of current instance to the top of core list to make sure current instance's lat_buf will be used firstly. Fixes: 365e4ba01df4 ("media: mtk-vcodec: Add work queue for core hardware decode") Signed-off-by: Yunfei Dong Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f7a3780cf96925670736582b9a623a2c9ffb4166 Author: Yunfei Dong Date: Wed Feb 1 07:33:11 2023 +0000 media: mediatek: vcodec: using each instance lat_buf count replace core ready list Core Hardware decoder depends on each instance lat_buf count, calling queue_work decode again when the lat_buf count of each instance isn't zero. Fixes: 365e4ba01df4 ("media: mtk-vcodec: Add work queue for core hardware decode") Signed-off-by: Yunfei Dong Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5bbb6e2ca67477ab41163b32e6b3444faea74a5e Author: Yunfei Dong Date: Wed Feb 1 07:33:10 2023 +0000 media: mediatek: vcodec: add params to record lat and core lat_buf count Using lat_buf to share decoder information between lat and core work queue, adding params to record the buf count. Fixes: 365e4ba01df4 ("media: mtk-vcodec: Add work queue for core hardware decode") Signed-off-by: Yunfei Dong Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3b514e79e314d09c60b48d2b7a895b3bd146accf Author: Ming Qian Date: Tue Jan 17 02:31:55 2023 +0000 media: amphion: support to decode RealVideo video amphion decoder add support for the RealVideo video. RV30 and RV40 are support by amphion decoder. Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ec9aa62a1e4d151e9f14b7bda0b13438a901f904 Author: Ming Qian Date: Tue Jan 17 02:31:54 2023 +0000 media: add RealVideo format RV30 and RV40 RealVideo, or also spelled as Real Video, is a suite of proprietary video compression formats developed by RealNetworks - the specific format changes with the version. RealVideo codecs are identified by four-character codes. RV30 and RV40 are RealNetworks' proprietary H.264-based codecs. Reviewed-by: Nicolas Dufresne Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9de92986daac2d859376bace6f0a4b5e85198117 Author: Ming Qian Date: Thu Jan 12 09:04:48 2023 +0000 media: amphion: support to decode sorenson spark video Sorenson Spark is an implementation of H.263 for use in Flash Video and Adobe Flash files. amphion decoder can support it by insert some startcode before sequence and picture. Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ae77d1391445f1357d888990c07b5288a4cacac5 Author: Ming Qian Date: Thu Jan 12 09:04:47 2023 +0000 media: add Sorenson Spark video format Sorenson Spark is an implementation of H.263 for use in Flash Video and Adobe Flash files. Sorenson Spark is an incomplete implementation of H.263. It differs mostly in header structure and ranges of the coefficients. Signed-off-by: Ming Qian Reviewed-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 68c7df527657a9e962da7b5b9c0308557357d8dc Author: Yunfei Dong Date: Sat Mar 18 03:56:51 2023 +0000 media: mediatek: vcodec: Force capture queue format to MM21 While the decoder can produce frames in both MM21 and MT21C formats, only MM21 is currently supported by userspace tools (like gstreamer and libyuv). In order to ensure userspace keeps working after the SCP firmware is updated to support both MM21 and MT21C formats, force the MM21 format for the capture queue. This is meant as a stopgap solution while dynamic format switching between MM21 and MT21C isn't implemented in the driver. Fixes: 7501edef6b1f ("media: mediatek: vcodec: Different codec using different capture format") Signed-off-by: Yunfei Dong Reviewed-by: Nicolas F. R. A. Prado Tested-by: Nicolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6d020d81b91af80a977061e82de25cafa4456af5 Author: Yunfei Dong Date: Sat Mar 18 03:56:50 2023 +0000 media: mediatek: vcodec: Make MM21 the default capture format Given that only the MM21 capture format is supported by userspace tools (like gstreamer and libyuv), make it the default capture format. This allows us to force the MM21 format even when a MM21 and MT21C capable firmware is available (which is needed while dynamic format switching isn't implemented in the driver), without causing the following regressions on v4l2-compliance: fail: v4l2-test-formats.cpp(478): pixelformat 3132544d (MT21) for buftype 9 not reported by ENUM_FMT test VIDIOC_G_FMT: FAIL fail: v4l2-test-formats.cpp(478): pixelformat 3132544d (MT21) for buftype 9 not reported by ENUM_FMT test VIDIOC_TRY_FMT: FAIL fail: v4l2-test-formats.cpp(478): pixelformat 3132544d (MT21) for buftype 9 not reported by ENUM_FMT test VIDIOC_S_FMT: FAIL Fixes: 7501edef6b1f ("media: mediatek: vcodec: Different codec using different capture format") Signed-off-by: Yunfei Dong Reviewed-by: Nicolas F. R. A. Prado Tested-by: Nicolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e25528e1dbe52784ac250071653104a8adc848e2 Author: Pin-yen Lin Date: Tue Mar 14 10:22:41 2023 +0000 media: mediatek: vcodec: Use 4K frame size when supported by stateful decoder After commit b018be06f3c7 ("media: mediatek: vcodec: Read max resolution from dec_capability"), the stateful video decoder driver never really sets its output frame size to 4K. Parse the decoder capability reported by the firmware, and update the output frame size in mtk_init_vdec_params to enable 4K frame size when available. Fixes: b018be06f3c7 ("media: mediatek: vcodec: Read max resolution from dec_capability") Signed-off-by: Pin-yen Lin Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cdc1068ab63abe13d696c9985f86ca8a40c2798f Author: Yunfei Dong Date: Fri Mar 3 01:38:41 2023 +0000 media: dt-bindings: media: mediatek: vcodec: Change the max reg value to 2 Need to add racing control register base in device node for mt8195 support inner racing mode. Changing the max reg value from 1 to 2. Adding the description for VDEC_SYS and VDEC_MISC. Signed-off-by: Yunfei Dong Signed-off-by: Allen-KH Cheng Acked-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 355e9472ccb05f3744b757e5174d476d2b7d5cbc Author: Yunfei Dong Date: Fri Mar 3 01:38:40 2023 +0000 media: dt-bindings: media: mediatek: vcodec: adapt to the 'clock-names' of different platforms mt8195 and mt8192 have different clock numbers, separate 'clock-names' according to compatible name. Signed-off-by: Yunfei Dong Signed-off-by: Allen-KH Cheng Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fa87b0615c19b847b8049da5b67d3d3ec771713c Author: Allen-KH Cheng Date: Fri Mar 3 01:38:38 2023 +0000 media: dt-bindings: media: mediatek: Remove "dma-ranges" property for decoder Because the decoder nodes already make use of the iommus property to configure the IOMMU for address translations, having a dma-ranges property makes no sense. In fact, after commit f1ad5338a4d5 ("of: Fix "dma-ranges" handling for bus controllers"), having a dma-ranges property causes IOMMU faults. Remove the dma-ranges property and update the example. Signed-off-by: Allen-KH Cheng Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Reviewed-by: Nícolas F. R. A. Prado Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 52e69517061c2d50c370fa4d47d32692e3113bc8 Author: Allen-KH Cheng Date: Fri Mar 3 01:38:37 2023 +0000 media: dt-bindings: media: mediatek: Rename child node names for decoder In order to make the names of the child nodes more generic, we rename "vcodec-lat" and "vcodec-core" to "video-codec" for decoder in patternProperties and example. Signed-off-by: Allen-KH Cheng Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0a2f03bbdca75de955ac550aa33a347d55850fee Author: kyrie wu Date: Fri Mar 10 06:23:55 2023 +0000 media: mtk-jpeg: refactor hw dev initializaiton Add a atomic_t variable for initialization of hw dev. Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 09aea13ecf6f89ed7f18114953695563f64f461c Author: kyrie wu Date: Fri Mar 10 06:23:54 2023 +0000 media: mtk-jpeg: refactor some variables Refactor some variables to reduce redundancy and optimize the initialization process. Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6a7a883f020fb2c25b33a6144fc3481a6b9bf560 Author: kyrie wu Date: Fri Mar 10 06:23:53 2023 +0000 media: mtk-jpeg: Remove some unnecessary variables remove is_jpgenc_multihw, is_jpgdec_multihw, and unnecessary initialization. Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d40e95274925f48f9c973b49c297d7cf5ad27c76 Author: kyrie wu Date: Fri Mar 10 06:23:52 2023 +0000 media: mtk-jpeg: reconstructs the initialization mode of worker exclude is_jpgenc_multihw or is_jpgdec_multihw for judgment, and re-initialize jpeg worker. Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 86379bd9d399e2c5fd638a869af223d4910725c3 Author: kyrie wu Date: Fri Mar 10 06:23:51 2023 +0000 media: mtk-jpeg: Fixes jpeg enc&dec worker sw flow 1. Move removing buffer after sw setting and before hw setting in enc&dec worker to prevents the operation of removing the buffer twice if the sw setting fails. 2. Remove the redundant operation of queue work in the jpegenc irq handler because the jpegenc worker has called v4l2_m2m_job_finish to do it. Fixes: 5fb1c2361e56 ("mtk-jpegenc: add jpeg encode worker interface") Fixes: dedc21500334 ("media: mtk-jpegdec: add jpeg decode worker interface") Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9ceca28e4f9811c9f659764b8b86198432b39412 Author: kyrie wu Date: Fri Mar 10 06:23:50 2023 +0000 media: mtk-jpeg: add jpeg single core initial function add single core initial function to init reg_base, irq and clk. Signed-off-by: kyrie wu Signed-off-by: irui wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 75c38caf66a10983acc5a59069bfc9492c43d682 Author: kyrie wu Date: Fri Mar 10 06:23:49 2023 +0000 media: mtk-jpeg: Fixes jpeghw multi-core judgement some chips have multi-hw, but others have only one, modify the condition of multi-hw judgement Fixes: 934e8bccac95 ("mtk-jpegenc: support jpegenc multi-hardware") Signed-off-by: kyrie wu Signed-off-by: irui wang Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c86b0e73f0bebbb0245ef2bac4cf269d61ff828c Author: Matti Vaittinen Date: Fri Mar 31 15:42:17 2023 +0300 MAINTAINERS: Add ROHM BU27034 Add myself as a maintainer for ROHM BU27034 ALS driver. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/eac4b5f7fc8adcaac59ffa73e46cd7bb9c90edfa.1680263956.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit e52afbd61039e2c5a4e611e23b4aa963d34a4aef Author: Matti Vaittinen Date: Fri Mar 31 15:41:58 2023 +0300 iio: light: ROHM BU27034 Ambient Light Sensor ROHM BU27034 is an ambient light sensor with 3 channels and 3 photo diodes capable of detecting a very wide range of illuminance. Typical application is adjusting LCD and backlight power of TVs and mobile phones. Add initial support for the ROHM BU27034 ambient light sensor. NOTE: - Driver exposes 4 channels. One IIO_LIGHT channel providing the calculated lux values based on measured data from diodes #0 and #1. In addition, 3 IIO_INTENSITY channels are emitting the raw register data from all diodes for more intense user-space computations. - Sensor has GAIN values that can be adjusted from 1x to 4096x. - Sensor has adjustible measurement times of 5, 55, 100, 200 and 400 mS. Driver does not support 5 mS which has special limitations. - Driver exposes standard 'scale' adjustment which is implemented by: 1) Trying to adjust only the GAIN 2) If GAIN adjustment alone can't provide requested scale, adjusting both the time and the gain is attempted. - Driver exposes writable INT_TIME property that can be used for adjusting the measurement time. Time adjustment will also cause the driver to try to adjust the GAIN so that the overall scale is kept as close to the original as possible. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/2a7efb6f335da5526fbe34b95137c5e45db5c5d3.1680263956.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 0dca5c9730dcfcf9ba05362e5e36b1ea0c85066d Author: Matti Vaittinen Date: Fri Mar 31 15:41:33 2023 +0300 dt-bindings: iio: light: Support ROHM BU27034 ROHM BU27034 is an ambient light sesnor with 3 channels and 3 photo diodes capable of detecting a very wide range of illuminance. Typical application is adjusting LCD and backlight power of TVs and mobile phones. Add dt-bindings. Signed-off-by: Matti Vaittinen Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/66a222574176ee2adbfccf6d9a591c04571a18d9.1680263956.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit ca11e4a3515430a083fd59822bce0d418f6b6541 Author: Matti Vaittinen Date: Fri Mar 31 15:41:06 2023 +0300 MAINTAINERS: Add IIO gain-time-scale helpers Add myself as a maintainer for IIO light sensor helpers (helpers for maintaining the scale while adjusting intergration time or gain) and related Kunit tests. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/d46414eabe8dd4cd3edb15f859f3b93cd406d9aa.1680263956.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 38416c28e16890b52fdd5eb73479299ec3f062f3 Author: Matti Vaittinen Date: Fri Mar 31 15:40:28 2023 +0300 iio: light: Add gain-time-scale helpers Some light sensors can adjust both the HW-gain and integration time. There are cases where adjusting the integration time has similar impact to the scale of the reported values as gain setting has. IIO users do typically expect to handle scale by a single writable 'scale' entry. Driver should then adjust the gain/time accordingly. It however is difficult for a driver to know whether it should change gain or integration time to meet the requested scale. Usually it is preferred to have longer integration time which usually improves accuracy, but there may be use-cases where long measurement times can be an issue. Thus it can be preferable to allow also changing the integration time - but mitigate the scale impact by also changing the gain underneath. Eg, if integration time change doubles the measured values, the driver can reduce the HW-gain to half. The theory of the computations of gain-time-scale is simple. However, some people (undersigned) got that implemented wrong for more than once. Add some gain-time-scale helpers in order to not dublicate errors in all drivers needing these computations. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/268d418e7cffcdaa2ece6738478bbc57692c213e.1680263956.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit b27f0b40e49f4b109353c62e8eae74f96f842745 Author: Matti Vaittinen Date: Sat Feb 25 15:56:16 2023 +0200 doc: Make sysfs-bus-iio doc more exact A few IIC channel descriptions explained used units as: data is in foo "that can be processed into an" [unit] value. The "can be processed into" is quite broad statement as it does not really explain what this processing means. This makes units pretty much useless. After discussion with Jonathan, it seems the units for these channels should also be well-defined as for all other channels. The processing means the standard scale and offset application that is used throughout the IIO. Let's make it more obvious by stating that the units are [unit] after scale ane offset are applied. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/41eafb0caa510cddf650cf5ff940639a184f3005.1677331779.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit f1caa90085ef31078076990c2ac64d05dd035278 Author: Tom Rix Date: Mon Apr 3 21:38:28 2023 -0400 iio: dac: set variable max5522_channels storage-class-specifier to static smatch reports drivers/iio/dac/max5522.c:55:28: warning: symbol 'max5522_channels' was not declared. Should it be static? This variable is only used in one file so it should be static. Signed-off-by: Tom Rix Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20230404013828.1914523-1-trix@redhat.com Signed-off-by: Jonathan Cameron commit ac2babe70a9b8ab11a408481cad69b71a8b5fa91 Author: Rob Herring Date: Tue Apr 4 15:50:14 2023 -0500 dt-bindings: iio: temperature: ltc2983: Make 'adi,custom-thermocouple' signed The 'adi,custom-thermocouple' property is signed based on the example and driver, so it's type should be int64-matrix rather than uint64-matrix. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230404205014.644336-2-robh@kernel.org Signed-off-by: Jonathan Cameron commit 543c8f2f3cc4706ab0dd2e70dc87bdcbcf8126b3 Author: Rob Herring Date: Tue Apr 4 15:50:13 2023 -0500 dt-bindings: iio: temperature: ltc2983: Fix child node unevaluated properties The child node schemas are missing 'unevaluatedProperties' constraints, so any unknown properties are allowed. The current structure with multiple patternProperties schemas doesn't work for unevaluatedProperties as each sub-schema is evaluated independently. To fix this, move the sub-schema for all child nodes to a $defs entry and reference it from each named child node. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230404205014.644336-1-robh@kernel.org Signed-off-by: Jonathan Cameron commit 7c95a3f51a54db694d3eeef60e77e3a8558ef25e Author: William Breathitt Gray Date: Thu Apr 6 10:40:15 2023 -0400 iio: addac: stx104: Use regmap_read_poll_timeout() for conversion poll ADC sample captures take a certain amount of time to complete after initiated; this conversion time range can be anywhere from 5 microseconds to 53.68 seconds depending on the configuration of the Analog Input Frame Timer register. When the conversion is in progress, the ADC Status register CNV bit is high. Call regmap_read_poll_timeout() to poll until the ADC conversion is completed (or timeout if more than 53.68 seconds passes). Suggested-by: Jonathan Cameron Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/9ef433f107afd1d4dcd2d97ef0e932d7045c2bbd.1680790580.git.william.gray@linaro.org Signed-off-by: Jonathan Cameron commit c7301b848191f18719c5a6247300998269059c0b Author: William Breathitt Gray Date: Thu Apr 6 10:40:14 2023 -0400 iio: addac: stx104: Migrate to the regmap API The regmap API supports IO port accessors so we can take advantage of regmap abstractions rather than handling access to the device registers directly in the driver. In addition, to improve code organization in stx104_probe(), the devm_iio_device_register() call is moved above GPIO configuration in order to keep relevant code closer together. Suggested-by: Andy Shevchenko Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/0bcdfc4738cc019fb2ff83f61eb46a3488bc166d.1680790580.git.william.gray@linaro.org Signed-off-by: Jonathan Cameron commit a94abc74c5248d3c09bb18aa8437e85a6a31eadd Author: William Breathitt Gray Date: Thu Apr 6 10:40:13 2023 -0400 iio: addac: stx104: Improve indentation in stx104_write_raw() By bailing out early if chan->output is false for the IIO_CHAN_INFO_RAW, indentation can be decreased by a tab and code readability improved. Suggested-by: Andy Shevchenko Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/487d17da9e2612f3e6b2bd1c3def2fa1b955db9b.1680790580.git.william.gray@linaro.org Signed-off-by: Jonathan Cameron commit 46a4cac7f841a2a2cb397bcb2fd24324004c853e Author: William Breathitt Gray Date: Thu Apr 6 10:40:12 2023 -0400 iio: addac: stx104: Use define rather than hardcoded limit for write val The DAC register is 16 bits wide, so the value passed by write_raw() should be checked against that limit. Rather than hardcoding the 16-bit maximum value limit, use a define to improve readability and make the intention of the code clearer. The explicit cast is also avoided by instead explicitly checking for negative values. Suggested-by: Andy Shevchenko Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/4c9f4f1b4a270d133be70c82a091351b531b5e3e.1680790580.git.william.gray@linaro.org Signed-off-by: Jonathan Cameron commit 4f9b80aefb9e2f542a49d9ec087cf5919730e1dd Author: William Breathitt Gray Date: Thu Apr 6 10:40:11 2023 -0400 iio: addac: stx104: Fix race condition when converting analog-to-digital The ADC conversion procedure requires several device I/O operations performed in a particular sequence. If stx104_read_raw() is called concurrently, the ADC conversion procedure could be clobbered. Prevent such a race condition by utilizing a mutex. Fixes: 4075a283ae83 ("iio: stx104: Add IIO support for the ADC channels") Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/2ae5e40eed5006ca735e4c12181a9ff5ced65547.1680790580.git.william.gray@linaro.org Cc: Signed-off-by: Jonathan Cameron commit 9740827468cea80c42db29e7171a50e99acf7328 Author: William Breathitt Gray Date: Thu Apr 6 10:40:10 2023 -0400 iio: addac: stx104: Fix race condition for stx104_write_raw() The priv->chan_out_states array and actual DAC value can become mismatched if stx104_write_raw() is called concurrently. Prevent such a race condition by utilizing a mutex. Fixes: 97a445dad37a ("iio: Add IIO support for the DAC on the Apex Embedded Systems STX104") Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/c95c9a77fcef36b2a052282146950f23bbc1ebdc.1680790580.git.william.gray@linaro.org Cc: Signed-off-by: Jonathan Cameron commit 86fb8b3aebd7f2236c11521ee0c460cceb0e4d6f Author: Linus Walleij Date: Wed Mar 29 09:46:14 2023 +0200 dt-bindings: iio: st-sensors: Fix repeated text The description oddly contains a copy of the initial paragraph. Let's not repeat ourselves. Suggested-by: Diederik de Haas Signed-off-by: Linus Walleij Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230329074614.1037625-1-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit 87441b31232577050a55503362bba4aad439db48 Author: Nuno Sá Date: Mon Mar 27 16:54:14 2023 +0200 staging: iio: resolver: ads1210: fix config mode As stated in the device datasheet [1], bits a0 and a1 have to be set to 1 for the configuration mode. [1]: https://www.analog.com/media/en/technical-documentation/data-sheets/ad2s1210.pdf Fixes: b19e9ad5e2cb9 ("staging:iio:resolver:ad2s1210 general driver cleanup") Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20230327145414.1505537-1-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit c4351b646123536048ea71cbcabe1cbd7f4e40c8 Author: Dan Carpenter Date: Thu Mar 23 18:23:56 2023 +0300 iio: adc: ti-ads1100: fix error code in probe() This code has a copy and paste bug so it accidentally returns "PTR_ERR(data->reg_vdd)" which is a valid pointer cast to int. It should return "ret" instead. Fixes: 541880542f2b ("iio: adc: Add TI ADS1100 and ADS1000") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/36fa2aeb-f392-4793-8b38-ae15514033c8@kili.mountain Signed-off-by: Jonathan Cameron commit 8e86652e3e7152bba80c3b4d03814e40ede1abc7 Merge: 0246b15bbb434 09a9639e56c01 Author: Greg Kroah-Hartman Date: Mon Apr 10 08:56:59 2023 +0200 Merge 6.3-rc6 into usb-next We need the USB fixes in here for testing, and this resolves two merge conflicts, one pointed out by linux-next: drivers/usb/dwc3/dwc3-pci.c drivers/usb/host/xhci-pci.c Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman commit 039535ecf18e8dc93fe4b294fdf175a31bd023b2 Merge: b2ea273a477cd 09a9639e56c01 Author: Greg Kroah-Hartman Date: Mon Apr 10 08:51:09 2023 +0200 Merge 6.3-rc6 into tty-next We need the tty/serial fixes in here for testing. Signed-off-by: Greg Kroah-Hartman commit 5790d407daa30356669758180b68144a9518da0a Merge: a8642cd11635a 09a9639e56c01 Author: Greg Kroah-Hartman Date: Mon Apr 10 08:49:26 2023 +0200 Merge 6.3-rc6 into char-misc-next We need it here to apply other char/misc driver changes to. Signed-off-by: Greg Kroah-Hartman commit ae12ae137270e2e8890dd375aeca6d90556d2629 Author: Asahi Lina Date: Fri Feb 24 18:11:48 2023 +0900 rust: Import upstream `alloc::vec::spec_extend` module This is a subset of the Rust standard library `alloc` crate, version 1.62.0, licensed under "Apache-2.0 OR MIT", from: https://github.com/rust-lang/rust/tree/1.62.0/library/alloc/src The file is copied as-is, with no modifications whatsoever (not even adding the SPDX identifiers). For copyright details, please see: https://github.com/rust-lang/rust/blob/1.62.0/COPYRIGHT Signed-off-by: Asahi Lina Link: https://lore.kernel.org/r/20230224-rust-vec-v1-2-733b5b5a57c5@asahilina.net [ Import version 1.62.0 instead, to match the one in mainline. ] Signed-off-by: Miguel Ojeda commit 65b571afdfdcefa09508274488086b218e34906d Author: Asahi Lina Date: Fri Feb 24 18:11:47 2023 +0900 rust: Import upstream `alloc::vec::set_len_on_drop` module This is a subset of the Rust standard library `alloc` crate, version 1.62.0, licensed under "Apache-2.0 OR MIT", from: https://github.com/rust-lang/rust/tree/1.62.0/library/alloc/src The file is copied as-is, with no modifications whatsoever (not even adding the SPDX identifiers). For copyright details, please see: https://github.com/rust-lang/rust/blob/1.62.0/COPYRIGHT Signed-off-by: Asahi Lina Link: https://lore.kernel.org/r/20230224-rust-vec-v1-1-733b5b5a57c5@asahilina.net [ Import version 1.62.0 instead, to match the one in mainline. ] Signed-off-by: Miguel Ojeda commit 3c01a424a37fe625052c68c8620f6aa701f77769 Author: Asahi Lina Date: Fri Feb 24 17:09:47 2023 +0900 rust: Enable the new_uninit feature for kernel and driver crates The unstable new_uninit feature enables various library APIs to create uninitialized containers, such as `Box::assume_init()`. This is necessary to build abstractions that directly initialize memory at the target location, instead of doing copies through the stack. Will be used by the DRM scheduler abstraction in the kernel crate, and by field-wise initialization (e.g. using `place!()` or a future replacement macro which may itself live in `kernel`) in driver crates. Link: https://github.com/Rust-for-Linux/linux/issues/879 Link: https://github.com/Rust-for-Linux/linux/issues/2 Link: https://github.com/rust-lang/rust/issues/63291 Signed-off-by: Asahi Lina Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Gary Guo Reviewed-by: Andreas Hindborg Reviewed-by: Vincenzo Palazzo Link: https://lore.kernel.org/r/20230224-rust-new_uninit-v1-1-c951443d9e26@asahilina.net [ Reworded to use `Link` tags. ] Signed-off-by: Miguel Ojeda commit f431c5c581fa176f608ba3fdebb3c1051bad5774 Author: Boqun Feng Date: Tue Feb 7 10:52:16 2023 -0800 samples: rust: print: Add sample code for Arc printing This both demonstrates the usage of different print format in Rust and serves as a selftest for the `Display` and `Debug` implementation of `Arc` and its friends. Signed-off-by: Boqun Feng Reviewed-by: Björn Roy Baron Reviewed-by: Finn Behrens Reviewed-by: Vincenzo Palazzo Reviewed-by: Gary Guo Reviewed-by: Andreas Hindborg Link: https://lore.kernel.org/r/20230207185216.1314638-3-boqun.feng@gmail.com [ Applied suggestions and reworded for fixing title typos. ] Signed-off-by: Miguel Ojeda commit 00140a8308367208d56e93cf08fa1636202a0dc7 Author: Boqun Feng Date: Tue Feb 7 10:52:15 2023 -0800 rust: sync: impl {Debug,Display} for {Unique,}Arc This allows printing the inner data of `Arc` and its friends if the inner data implements `Display` or `Debug`. It's useful for logging and debugging purpose. Signed-off-by: Boqun Feng Reviewed-by: Vincenzo Palazzo Reviewed-by: Gary Guo Reviewed-by: Andreas Hindborg Reviewed-by: Björn Roy Baron Link: https://lore.kernel.org/r/20230207185216.1314638-2-boqun.feng@gmail.com Signed-off-by: Miguel Ojeda commit cd7cd6f386df21725eeab5d803226d4f74177203 Author: Jiapeng Chong Date: Sun Apr 9 19:10:24 2023 -0700 Input: cma3000_d0x - remove unneeded code Function input_set_abs_params() has already set EV_ABS bit for us. drivers/input/misc/cma3000_d0x.c:328 cma3000_init() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20230407021343.63512-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Dmitry Torokhov commit 490fde262f17c5e4db27ee871cef970846e84599 Author: Krzysztof Kozlowski Date: Fri Apr 7 16:59:11 2023 +0200 net: phy: sfp: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230407145911.79642-8-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski commit 0e76f1dcf487be6de4482e31076cb71e19c40c3d Author: Krzysztof Kozlowski Date: Fri Apr 7 16:59:10 2023 +0200 net: phy: nxp-tja11xx: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230407145911.79642-7-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski commit 2ed84c0c6f75434091552aba91c6d53e48b95ecb Author: Krzysztof Kozlowski Date: Fri Apr 7 16:59:09 2023 +0200 net: phy: mxl: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230407145911.79642-6-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski commit ff0805e2bde04bbb3a11669c40ecaf418e392ed1 Author: Krzysztof Kozlowski Date: Fri Apr 7 16:59:08 2023 +0200 net: phy: marvell: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230407145911.79642-5-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski commit 211f70be25773a2802470f8d1ea418b9baf14e61 Author: Krzysztof Kozlowski Date: Fri Apr 7 16:59:07 2023 +0200 net: phy: bcm54140: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230407145911.79642-4-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski commit 234d79a5f82698fe100ec30ab8b7b8a91c17dd34 Author: Krzysztof Kozlowski Date: Fri Apr 7 16:59:06 2023 +0200 net: phy: aquantia: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230407145911.79642-3-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski commit bc1585f611b2fe0562ef7815ed02f1fb0708ce72 Author: Krzysztof Kozlowski Date: Fri Apr 7 16:59:05 2023 +0200 net: aquantia: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230407145911.79642-2-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski commit 87f1c15e8759a006e39ddb7556f6829067f8dc3e Author: Krzysztof Kozlowski Date: Fri Apr 7 16:59:04 2023 +0200 net: nfp: constify pointers to hwmon_channel_info Statically allocated array of pointed to hwmon_channel_info can be made const for safety. Signed-off-by: Krzysztof Kozlowski Acked-by: Simon Horman Link: https://lore.kernel.org/r/20230407145911.79642-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski commit c9f28c570068f7d4cd0b32cec55566954d3e32bb Merge: 5a17818682cf4 d8cc9415a40f4 Author: Jakub Kicinski Date: Sun Apr 9 18:59:13 2023 -0700 Merge branch 'hwmon-const' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull in pre-requisite patches from Guenter Roeck to constify pointers to hwmon_channel_info. * 'hwmon-const' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: constify pointers to hwmon_channel_info Link: https://lore.kernel.org/all/3a0391e7-21f6-432a-9872-329e298e1582@roeck-us.net/ Signed-off-by: Jakub Kicinski commit 4eb3117888a923f6b9b1ad2dd093641c49a63ae5 Author: Eric Van Hensbergen Date: Mon Mar 27 01:53:10 2023 +0000 fs/9p: Rework cache modes and add new options to Documentation Switch cache modes to a bit-mask and use legacy cache names as shortcuts. Update documentation to include information on both shortcuts and bitmasks. This patch also fixes missing guards related to fscache. Update the documentation for new mount flags and cache modes. Signed-off-by: Eric Van Hensbergen commit 5a17818682cf43ad0fdd6035945f3b7a8c9dc5e9 Author: Vladimir Oltean Date: Thu Apr 6 14:42:46 2023 +0300 net: dsa: replace NETDEV_PRE_CHANGE_HWTSTAMP notifier with a stub There was a sort of rush surrounding commit 88c0a6b503b7 ("net: create a netdev notifier for DSA to reject PTP on DSA master"), due to a desire to convert DSA's attempt to deny TX timestamping on a DSA master to something that doesn't block the kernel-wide API conversion from ndo_eth_ioctl() to ndo_hwtstamp_set(). What was required was a mechanism that did not depend on ndo_eth_ioctl(), and what was provided was a mechanism that did not depend on ndo_eth_ioctl(), while at the same time introducing something that wasn't absolutely necessary - a new netdev notifier. There have been objections from Jakub Kicinski that using notifiers in general when they are not absolutely necessary creates complications to the control flow and difficulties to maintainers who look at the code. So there is a desire to not use notifiers. In addition to that, the notifier chain gets called even if there is no DSA in the system and no one is interested in applying any restriction. Take the model of udp_tunnel_nic_ops and introduce a stub mechanism, through which net/core/dev_ioctl.c can call into DSA even when CONFIG_NET_DSA=m. Compared to the code that existed prior to the notifier conversion, aka what was added in commits: - 4cfab3566710 ("net: dsa: Add wrappers for overloaded ndo_ops") - 3369afba1e46 ("net: Call into DSA netdevice_ops wrappers") this is different because we are not overloading any struct net_device_ops of the DSA master anymore, but rather, we are exposing a rather specific functionality which is orthogonal to which API is used to enable it - ndo_eth_ioctl() or ndo_hwtstamp_set(). Also, what is similar is that both approaches use function pointers to get from built-in code to DSA. There is no point in replicating the function pointers towards __dsa_master_hwtstamp_validate() once for every CPU port (dev->dsa_ptr). Instead, it is sufficient to introduce a singleton struct dsa_stubs, built into the kernel, which contains a single function pointer to __dsa_master_hwtstamp_validate(). I find this approach preferable to what we had originally, because dev->dsa_ptr->netdev_ops->ndo_do_ioctl() used to require going through struct dsa_port (dev->dsa_ptr), and so, this was incompatible with any attempts to add any data encapsulation and hide DSA data structures from the outside world. Link: https://lore.kernel.org/netdev/20230403083019.120b72fd@kernel.org/ Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 8a05f5cccdbe851265bf513643ada48c26b1267f Author: Jacky Bai Date: Fri Mar 31 14:38:14 2023 +0800 clk: imx: imx8ulp: update clk flag for system critical clock In order to support bus fabric clock frequency changed on the fly, need to update some bus clocks'flags to make sure these clocks'frequency and parent can be changed on the fly. For these clocks, HW can make sure no glitch will be introduced when changing on the fly. In order to support DDR DFS, the HW register bit for DDR_SEL and DDR_DIV clock will be modified by TF-A. So need to update these two clock's flag to make sure that the linux kernel side can correct these clocks' SW state to reflect the actual HW state. Reviewed-by: Ye Li Signed-off-by: Jacky Bai Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20230331063814.2462059-6-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit 66d72c62d20eb571b7ab624813b1b98b626ab493 Author: Jacky Bai Date: Fri Mar 31 14:38:13 2023 +0800 clk: imx: imx8ulp: Add tpm5 clock as critical gate clock The TPM5 is used for broadcast timer purpose and registered with TIMER_OF_DECLARE. As the clock driver is not ready at that stage, so the TPM5 clock is configured in bootloader(TF-A). if we just remove the TPM5 clock from linux will introduce a risk that the TPM5's parent clock will be gated, then lead to TPM's channel control config can NOT be written into register successfully. Due to the above reason, we still need to add the TPM5 clock into linux clock but register it as a simple critical gate clock to make sure its parent is always on. Reviewed-by: Peng Fan Signed-off-by: Jacky Bai Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20230331063814.2462059-5-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit 4883200d8c0b20cc3bf90fcd3b837a344a31ac66 Author: Jacky Bai Date: Fri Mar 31 14:38:12 2023 +0800 clk: imx: imx8ulp: keep MU0_B clock enabled always Keep the A35<->M33 MU0_B clock enabled always for low power communication. Reviewed-by: Peng Fan Signed-off-by: Jacky Bai Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20230331063814.2462059-4-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit 335aee51ffc72149ddf99755ba629f981f20e6b6 Author: Jacky Bai Date: Fri Mar 31 14:38:11 2023 +0800 clk: imx: imx8ulp: Add divider closest support to get more accurate clock rate If a divider's parent clock has fractional part, it will hard to round out a more accurate clock rate for this divider, add the 'CLK_DIVIDER_ROUND_CLOSEST' flags for such divider to get a more accurate clock rate. Reviewed-by: Peng Fan Signed-off-by: Jacky Bai Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20230331063814.2462059-3-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit d608c18018c897b88d66f1340fe274b7181817fa Author: Peng Fan Date: Fri Mar 31 14:38:10 2023 +0800 clk: imx: imx8ulp: Fix XBAR_DIVBUS and AD_SLOW clock parents XBAR_DIVBUS and AD_SLOW should set parent to XBAR_AD_DIVPLAT and XBAR_DIVBUS respectively, not the NIC_AD. otherwise we will get wrong clock rate. Fixes: c43a801a5789 ("clk: imx: Add clock driver for imx8ulp") Reviewed-by: Jacky Bai Signed-off-by: Ye Li Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20230331063814.2462059-2-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit 6b60c3ae3e98d036945f2d5c11d35b4c178ea423 Author: Peng Fan Date: Mon Apr 3 17:53:00 2023 +0800 clk: imx: imx93: Add nic and A55 clk The A55 clock logic as below: A55_PLL ----------------->\ A55_SEL-->A55_CORE A55_CCM_ROOT--->A55_GATE->/ Add A55 CPU clk to support freq change. Add NIC CLK to reflect the clk status Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20230403095300.3386988-8-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit 5fd7b00ca2361c81f2026f82dff93e52afd97a0b Author: Peng Fan Date: Mon Apr 3 17:52:59 2023 +0800 dt-bindings: clock: imx93: add NIC, A55 and ARM PLL CLK Add i.MX93 NIC, A55 and ARM PLL CLK. Signed-off-by: Peng Fan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230403095300.3386988-7-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit a740d7350ff77ce1ebbdc3b9c548dd3bcaf39b31 Author: Peng Fan Date: Mon Apr 3 17:52:58 2023 +0800 clk: imx: imx93: add mcore_booted module paratemter Add mcore_booted boot parameter which could simplify AMP clock management. To i.MX93, there is CCM(clock control Module) to generate clock root clock, anatop(analog PLL module) to generate PLL, and LPCG (clock gating) to gate clocks to peripherals. As below: anatop->ccm->lpcg->peripheral Linux handles the clock management and the auxiliary core is under control of Linux. Although there is per hardware domain control for LPCG and CCM, auxiliary core normally only use LPCG hardware domain control to avoid linux gate off the clk to peripherals and leave CCM ana anatop to Linux. Reviewed-by: Ye Li Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20230403095300.3386988-6-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit e040897111a12b7647b8f758336b2f14991e9371 Author: Jacky Bai Date: Mon Apr 3 17:52:57 2023 +0800 clk: imx: fracn-gppll: Add 300MHz freq support for imx9 Add 300MHz frequency config support on i.MX93 PLL. Reviewed-by: Ye Li Signed-off-by: Jacky Bai Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20230403095300.3386988-5-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit 56b8d0bf3ea8b0db8543e04a6b97348a543405ab Author: Peng Fan Date: Mon Apr 3 17:52:56 2023 +0800 clk: imx: fracn-gppll: support integer pll The fracn gppll could be configured in FRAC or INTEGER mode during hardware design. The current driver only support FRAC mode, while this patch introduces INTEGER support. When the PLL is INTEGER pll, there is no mfn, mfd, the calculation is as below: Fvco_clk = (Fref / DIV[RDIV] ) * DIV[MFI] Fclko_odiv = Fvco_clk / DIV[ODIV] In this patch, we reuse the FRAC pll logic with some condition check to simplify the driver Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20230403095300.3386988-4-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit 4435467b15b069e5a6f50ca9a9260e86b74dbc13 Author: Peng Fan Date: Mon Apr 3 17:52:55 2023 +0800 clk: imx: fracn-gppll: disable hardware select control When programming PLL, should disable Hardware control select to make PLL controlled by register, not hardware inputs through OSCPLL. Fixes: 1b26cb8a77a4 ("clk: imx: support fracn gppll") Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20230403095300.3386988-3-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit cf8dccfedce848f67eaa42e8839305d028319161 Author: Peng Fan Date: Mon Apr 3 17:52:54 2023 +0800 clk: imx: fracn-gppll: fix the rate table The Fvco should be range 2.4GHz to 5GHz, the original table voilate the spec, so update the table to fix it. Fixes: c196175acdd3 ("clk: imx: clk-fracn-gppll: Add more freq config for video pll") Fixes: 044034efbeea ("clk: imx: clk-fracn-gppll: fix mfd value") Fixes: 1b26cb8a77a4 ("clk: imx: support fracn gppll") Signed-off-by: Jacky Bai Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20230403095300.3386988-2-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit 7875ee29f877dc76dae2d04648b95811f6a05b41 Author: Haibo Chen Date: Mon Apr 3 17:46:33 2023 +0800 clk: imx: imx8mp: change the 'nand_usdhc_bus' clock to non-critical The 'nand_usdhc_bus' clock is only need to be enabled when usdhc or nand module is active, so change it to non-critical clock type. Signed-off-by: Haibo Chen Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20230403094633.3366446-4-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit 82afc344d795cb467a646a2873573298162f01b9 Author: Liu Ying Date: Mon Apr 3 17:46:32 2023 +0800 clk: imx: imx8mp: Add LDB root clock This patch adds "media_ldb_root_clk" clock for the LDB in the MEDIAMIX subsystem. Reviewed-by: Sandor Yu Signed-off-by: Liu Ying Signed-off-by: Dong Aisheng Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20230403094633.3366446-3-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit 79643567cc34ebd0743f4da3ac8f853e26202453 Author: Peng Fan Date: Mon Apr 3 17:46:31 2023 +0800 dt-bindings: clock: imx8mp: Add LDB clock entry Add LDB clock entry for i.MX8MP Signed-off-by: Peng Fan Acked-by: Krzysztof Kozlowski Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20230403094633.3366446-2-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit 3ea7c4c907119eb369d6b4cdec22af0434eb5304 Author: Peng Fan Date: Mon Apr 3 17:46:30 2023 +0800 clk: imx: imx8mp: correct DISP2 pixel clock type The MEDIA_DISP2_CLK_ROOT use ccm_ahb_channel, it is bus type. Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20230403094633.3366446-1-peng.fan@oss.nxp.com Signed-off-by: Abel Vesa commit 866694afd644cd5ee32411713c3d802fcca22ebb Author: Patrick Kelsey Date: Fri Apr 7 12:52:49 2023 -0400 IB/hfi1: Place struct mmu_rb_handler on cache line start Place struct mmu_rb_handler on cache line start like so: struct mmu_rb_handler *h; void *free_ptr; int ret; free_ptr = kzalloc(sizeof(*h) + cache_line_size() - 1, GFP_KERNEL); if (!free_ptr) return -ENOMEM; h = PTR_ALIGN(free_ptr, cache_line_size()); Additionally, move struct mmu_rb_handler fields "root" and "ops_args" to start after the next cacheline using the "____cacheline_aligned_in_smp" annotation. Allocating an additional cache_line_size() - 1 bytes to place struct mmu_rb_handler on a cache line start does increase memory consumption. However, few struct mmu_rb_handler are created when hfi1 is in use. As mmu_rb_handler->root and mmu_rb_handler->ops_args are accessed frequently, the advantage of having them both within a cache line is expected to outweigh the disadvantage of the additional memory consumption per struct mmu_rb_handler. Signed-off-by: Brendan Cunningham Signed-off-by: Patrick Kelsey Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/168088636963.3027109.16959757980497822530.stgit@252.162.96.66.static.eigbox.net Signed-off-by: Leon Romanovsky commit 00cbce5cbf88459cd1aa1d60d0f1df15477df127 Author: Patrick Kelsey Date: Fri Apr 7 12:52:44 2023 -0400 IB/hfi1: Fix bugs with non-PAGE_SIZE-end multi-iovec user SDMA requests hfi1 user SDMA request processing has two bugs that can cause data corruption for user SDMA requests that have multiple payload iovecs where an iovec other than the tail iovec does not run up to the page boundary for the buffer pointed to by that iovec.a Here are the specific bugs: 1. user_sdma_txadd() does not use struct user_sdma_iovec->iov.iov_len. Rather, user_sdma_txadd() will add up to PAGE_SIZE bytes from iovec to the packet, even if some of those bytes are past iovec->iov.iov_len and are thus not intended to be in the packet. 2. user_sdma_txadd() and user_sdma_send_pkts() fail to advance to the next iovec in user_sdma_request->iovs when the current iovec is not PAGE_SIZE and does not contain enough data to complete the packet. The transmitted packet will contain the wrong data from the iovec pages. This has not been an issue with SDMA packets from hfi1 Verbs or PSM2 because they only produce iovecs that end short of PAGE_SIZE as the tail iovec of an SDMA request. Fixing these bugs exposes other bugs with the SDMA pin cache (struct mmu_rb_handler) that get in way of supporting user SDMA requests with multiple payload iovecs whose buffers do not end at PAGE_SIZE. So this commit fixes those issues as well. Here are the mmu_rb_handler bugs that non-PAGE_SIZE-end multi-iovec payload user SDMA requests can hit: 1. Overlapping memory ranges in mmu_rb_handler will result in duplicate pinnings. 2. When extending an existing mmu_rb_handler entry (struct mmu_rb_node), the mmu_rb code (1) removes the existing entry under a lock, (2) releases that lock, pins the new pages, (3) then reacquires the lock to insert the extended mmu_rb_node. If someone else comes in and inserts an overlapping entry between (2) and (3), insert in (3) will fail. The failure path code in this case unpins _all_ pages in either the original mmu_rb_node or the new mmu_rb_node that was inserted between (2) and (3). 3. In hfi1_mmu_rb_remove_unless_exact(), mmu_rb_node->refcount is incremented outside of mmu_rb_handler->lock. As a result, mmu_rb_node could be evicted by another thread that gets mmu_rb_handler->lock and checks mmu_rb_node->refcount before mmu_rb_node->refcount is incremented. 4. Related to #2 above, SDMA request submission failure path does not check mmu_rb_node->refcount before freeing mmu_rb_node object. If there are other SDMA requests in progress whose iovecs have pointers to the now-freed mmu_rb_node(s), those pointers to the now-freed mmu_rb nodes will be dereferenced when those SDMA requests complete. Fixes: 7be85676f1d1 ("IB/hfi1: Don't remove RB entry when not needed.") Fixes: 7724105686e7 ("IB/hfi1: add driver files") Signed-off-by: Brendan Cunningham Signed-off-by: Patrick Kelsey Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/168088636445.3027109.10054635277810177889.stgit@252.162.96.66.static.eigbox.net Signed-off-by: Leon Romanovsky commit 9fe8fec5e43d5a80f43cbf61aaada1b047a1eb61 Author: Patrick Kelsey Date: Fri Apr 7 12:52:39 2023 -0400 IB/hfi1: Fix SDMA mmu_rb_node not being evicted in LRU order hfi1_mmu_rb_remove_unless_exact() did not move mmu_rb_node objects in mmu_rb_handler->lru_list after getting a cache hit on an mmu_rb_node. As a result, hfi1_mmu_rb_evict() was not guaranteed to evict truly least-recently used nodes. This could be a performance issue for an application when that application: - Uses some long-lived buffers frequently. - Uses a large number of buffers once. - Hits the mmu_rb_handler cache size or pinned-page limits, forcing mmu_rb_handler cache entries to be evicted. In this case, the one-time use buffers cause the long-lived buffer entries to eventually filter to the end of the LRU list where hfi1_mmu_rb_evict() will consider evicting a frequently-used long-lived entry instead of evicting one of the one-time use entries. Fix this by inserting new mmu_rb_node at the tail of mmu_rb_handler->lru_list and move mmu_rb_ndoe to the tail of mmu_rb_handler->lru_list when the mmu_rb_node is a hit in hfi1_mmu_rb_remove_unless_exact(). Change hfi1_mmu_rb_evict() to evict from the head of mmu_rb_handler->lru_list instead of the tail. Fixes: 0636e9ab8355 ("IB/hfi1: Add cache evict LRU list") Signed-off-by: Brendan Cunningham Signed-off-by: Patrick Kelsey Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/168088635931.3027109.10423156330761536044.stgit@252.162.96.66.static.eigbox.net Signed-off-by: Leon Romanovsky commit cf0455f1a92b7eb3075f84c7c086207ced08e0f5 Author: Ehab Ababneh Date: Fri Apr 7 12:52:34 2023 -0400 IB/hfi1: Suppress useless compiler warnings These warnings can cause build failure: In file included from ./include/trace/define_trace.h:102, from drivers/infiniband/hw/hfi1/trace_dbg.h:111, from drivers/infiniband/hw/hfi1/trace.h:15, from drivers/infiniband/hw/hfi1/trace.c:6: drivers/infiniband/hw/hfi1/./trace_dbg.h: In function ‘trace_event_get_offsets_hfi1_trace_template’: ./include/trace/trace_events.h:261:9: warning: function ‘trace_event_get_offsets_hfi1_trace_template’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] struct trace_event_raw_##call __maybe_unused *entry; \ ^~~~~~~~~~~~~~~~ drivers/infiniband/hw/hfi1/./trace_dbg.h:25:1: note: in expansion of macro ‘DECLARE_EVENT_CLASS’ DECLARE_EVENT_CLASS(hfi1_trace_template, ^~~~~~~~~~~~~~~~~~~ In file included from ./include/trace/define_trace.h:102, from drivers/infiniband/hw/hfi1/trace_dbg.h:111, from drivers/infiniband/hw/hfi1/trace.h:15, from drivers/infiniband/hw/hfi1/trace.c:6: drivers/infiniband/hw/hfi1/./trace_dbg.h: In function ‘trace_event_raw_event_hfi1_trace_template’: ./include/trace/trace_events.h:386:9: warning: function ‘trace_event_raw_event_hfi1_trace_template’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] struct trace_event_raw_##call *entry; \ ^~~~~~~~~~~~~~~~ drivers/infiniband/hw/hfi1/./trace_dbg.h:25:1: note: in expansion of macro ‘DECLARE_EVENT_CLASS’ DECLARE_EVENT_CLASS(hfi1_trace_template, ^~~~~~~~~~~~~~~~~~~ In file included from ./include/trace/define_trace.h:103, from drivers/infiniband/hw/hfi1/trace_dbg.h:111, from drivers/infiniband/hw/hfi1/trace.h:15, from drivers/infiniband/hw/hfi1/trace.c:6: drivers/infiniband/hw/hfi1/./trace_dbg.h: In function ‘perf_trace_hfi1_trace_template’: ./include/trace/perf.h:70:9: warning: function ‘perf_trace_hfi1_trace_template’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] struct hlist_head *head; \ ^~~~~~~~~~ drivers/infiniband/hw/hfi1/./trace_dbg.h:25:1: note: in expansion of macro ‘DECLARE_EVENT_CLASS’ DECLARE_EVENT_CLASS(hfi1_trace_template, ^~~~~~~~~~~~~~~~~~~ Solution adapted here is similar to the one in fbbc95a49d5b0 Signed-off-by: Ehab Ababneh Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/168088635415.3027109.5711716700328939402.stgit@252.162.96.66.static.eigbox.net Signed-off-by: Leon Romanovsky commit d2590edc93e894137e29d3fa1b5db6a2ecc14b69 Author: Dean Luick Date: Fri Apr 7 12:52:29 2023 -0400 IB/hfi1: Remove trace newlines The hfi1_cdbg trace mechanism appends a newline. Remove trailing newlines from all format strings. Signed-off-by: Dean Luick Signed-off-by: Dennis Dalessandro Link: https://lore.kernel.org/r/168088634897.3027109.10401662436950683555.stgit@252.162.96.66.static.eigbox.net Signed-off-by: Leon Romanovsky commit eca5cd9474cd26d62f9756f536e2e656d3f62f3a Author: Saravanan Vajravel Date: Wed Apr 5 21:25:49 2023 -0700 RDMA/srpt: Add a check for valid 'mad_agent' pointer When unregistering MAD agent, srpt module has a non-null check for 'mad_agent' pointer before invoking ib_unregister_mad_agent(). This check can pass if 'mad_agent' variable holds an error value. The 'mad_agent' can have an error value for a short window when srpt_add_one() and srpt_remove_one() is executed simultaneously. In srpt module, added a valid pointer check for 'sport->mad_agent' before unregistering MAD agent. This issue can hit when RoCE driver unregisters ib_device Stack Trace: ------------ BUG: kernel NULL pointer dereference, address: 000000000000004d PGD 145003067 P4D 145003067 PUD 2324fe067 PMD 0 Oops: 0002 [#1] PREEMPT SMP NOPTI CPU: 10 PID: 4459 Comm: kworker/u80:0 Kdump: loaded Tainted: P Hardware name: Dell Inc. PowerEdge R640/06NR82, BIOS 2.5.4 01/13/2020 Workqueue: bnxt_re bnxt_re_task [bnxt_re] RIP: 0010:_raw_spin_lock_irqsave+0x19/0x40 Call Trace: ib_unregister_mad_agent+0x46/0x2f0 [ib_core] IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready ? __schedule+0x20b/0x560 srpt_unregister_mad_agent+0x93/0xd0 [ib_srpt] srpt_remove_one+0x20/0x150 [ib_srpt] remove_client_context+0x88/0xd0 [ib_core] bond0: (slave p2p1): link status definitely up, 100000 Mbps full duplex disable_device+0x8a/0x160 [ib_core] bond0: active interface up! ? kernfs_name_hash+0x12/0x80 (NULL device *): Bonding Info Received: rdev: 000000006c0b8247 __ib_unregister_device+0x42/0xb0 [ib_core] (NULL device *): Master: mode: 4 num_slaves:2 ib_unregister_device+0x22/0x30 [ib_core] (NULL device *): Slave: id: 105069936 name:p2p1 link:0 state:0 bnxt_re_stopqps_and_ib_uninit+0x83/0x90 [bnxt_re] bnxt_re_alloc_lag+0x12e/0x4e0 [bnxt_re] Fixes: a42d985bd5b2 ("ib_srpt: Initial SRP Target merge for v3.3-rc1") Reviewed-by: Selvin Xavier Reviewed-by: Kashyap Desai Signed-off-by: Saravanan Vajravel Link: https://lore.kernel.org/r/20230406042549.507328-1-saravanan.vajravel@broadcom.com Reviewed-by: Bart Van Assche Signed-off-by: Leon Romanovsky commit bd9de1badac7e4ff6780365d4aa38983f5e2a436 Author: Mark Zhang Date: Thu Mar 30 10:23:51 2023 +0300 RDMA/cm: Trace icm_send_rej event before the cm state is reset Trace icm_send_rej event before the cm state is reset to idle, so that correct cm state will be logged. For example when an incoming request is rejected, the old trace log was: icm_send_rej: local_id=961102742 remote_id=3829151631 state=IDLE reason=REJ_CONSUMER_DEFINED With this patch: icm_send_rej: local_id=312971016 remote_id=3778819983 state=MRA_REQ_SENT reason=REJ_CONSUMER_DEFINED Fixes: 8dc105befe16 ("RDMA/cm: Add tracepoints to track MAD send operations") Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/20230330072351.481200-1-markzhang@nvidia.com Signed-off-by: Leon Romanovsky commit ef55ef3e6400ede7d4020f5fd0bc7aeac4de1ceb Author: Andy Shevchenko Date: Mon Mar 27 17:26:04 2023 +0300 lib/test-string_helpers: replace UNESCAPE_ANY by UNESCAPE_ALL_MASK When we get a random number to generate a flag in the valid range of UNESCAPE flags, use UNESCAPE_ALL_MASK, It's more correct and prevents from missed updates of the test coverage in the future if any. Link: https://lkml.kernel.org/r/20230327142604.48213-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Rasmus Villemoes Signed-off-by: Andrew Morton commit f19c3c2959e465209ade1a7a699e6cbf4359ce78 Author: Florian Fainelli Date: Thu Mar 23 16:16:57 2023 -0700 scripts/gdb: bail early if there are no generic PD Avoid generating an exception if there are no generic power domain(s) registered: (gdb) lx-genpd-summary domain status children /device runtime status ---------------------------------------------------------------------- Python Exception : No symbol "gpd_list" in current context. Error occurred in Python: No symbol "gpd_list" in current context. (gdb) quit [f.fainelli@gmail.com: correctly invoke gdb_eval_or_none] Link: https://lkml.kernel.org/r/20230327185746.3856407-1-f.fainelli@gmail.com Link: https://lkml.kernel.org/r/20230323231659.3319941-1-f.fainelli@gmail.com Fixes: 8207d4a88e1e ("scripts/gdb: add lx-genpd-summary command") Signed-off-by: Florian Fainelli Cc: Jan Kiszka Cc: Kieran Bingham Cc: Leonard Crestez Cc: Stephen Boyd Signed-off-by: Andrew Morton commit 1d7adbc74c009057ed9dc3112f388e91a9c79acc Author: Florian Fainelli Date: Thu Mar 23 15:52:45 2023 -0700 scripts/gdb: bail early if there are no clocks Avoid generating an exception if there are no clocks registered: (gdb) lx-clk-summary enable prepare protect clock count count count rate ------------------------------------------------------------------------ Python Exception : No symbol "clk_root_list" in current context. Error occurred in Python: No symbol "clk_root_list" in current context. Link: https://lkml.kernel.org/r/20230323225246.3302977-1-f.fainelli@gmail.com Fixes: d1e9710b63d8 ("scripts/gdb: initial clk support: lx-clk-summary") Signed-off-by: Florian Fainelli Cc: Jan Kiszka Cc: Kieran Bingham Cc: Leonard Crestez Cc: Stephen Boyd Signed-off-by: Andrew Morton commit fb15abdca64503511bb32cb6ff70da306f24fa06 Author: Bjorn Helgaas Date: Tue Mar 7 16:44:16 2023 -0600 kexec: remove unnecessary arch_kexec_kernel_image_load() arch_kexec_kernel_image_load() only calls kexec_image_load_default(), and there are no arch-specific implementations. Remove the unnecessary arch_kexec_kernel_image_load() and make kexec_image_load_default() static. No functional change intended. Link: https://lkml.kernel.org/r/20230307224416.907040-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Simon Horman Acked-by: Baoquan He Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit 7982722ff7286596a1e2f343ec4219e309ddc82a Author: Bjorn Helgaas Date: Tue Mar 7 16:44:15 2023 -0600 x86/kexec: remove unnecessary arch_kexec_kernel_image_load() Patch series "kexec: Remove unnecessary arch hook", v2. There are no arch-specific things in arch_kexec_kernel_image_load(), so remove it and just use the generic version. This patch (of 2): The x86 implementation of arch_kexec_kernel_image_load() is functionally identical to the generic arch_kexec_kernel_image_load(): arch_kexec_kernel_image_load # x86 if (!image->fops || !image->fops->load) return ERR_PTR(-ENOEXEC); return image->fops->load(image, image->kernel_buf, ...) arch_kexec_kernel_image_load # generic kexec_image_load_default if (!image->fops || !image->fops->load) return ERR_PTR(-ENOEXEC); return image->fops->load(image, image->kernel_buf, ...) Remove the x86-specific version and use the generic arch_kexec_kernel_image_load(). No functional change intended. Link: https://lkml.kernel.org/r/20230307224416.907040-1-helgaas@kernel.org Link: https://lkml.kernel.org/r/20230307224416.907040-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Simon Horman Acked-by: Baoquan He Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: Eric Biederman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit a74d9a3f4fc96520c8f85cd372a16a0b29430701 Author: Cai Huoqing Date: Thu Mar 23 19:37:09 2023 +0800 rapidio/tsi721: remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Link: https://lkml.kernel.org/r/20230323113711.10523-1-cai.huoqing@linux.dev Signed-off-by: Cai Huoqing Cc: Alexandre Bounine Cc: Matt Porter Cc: Tetsuo Handa Signed-off-by: Andrew Morton commit 890a3ee3ce416e2f1aed41718a8c1d42c82cf1b2 Author: Andy Shevchenko Date: Thu Mar 23 17:50:29 2023 +0200 kernel.h: split the hexadecimal related helpers to hex.h For the sake of cleaning up the kernel.h split the hexadecimal related helpers to own header called 'hex.h'. Link: https://lkml.kernel.org/r/20230323155029.40000-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Rasmus Villemoes Signed-off-by: Andrew Morton commit 58c9b016e12855286370dfb704c08498edbc857a Author: Paolo Abeni Date: Wed Mar 22 17:57:02 2023 +0100 epoll: use refcount to reduce ep_mutex contention We are observing huge contention on the epmutex during an http connection/rate test: 83.17% 0.25% nginx [kernel.kallsyms] [k] entry_SYSCALL_64_after_hwframe [...] |--66.96%--__fput |--60.04%--eventpoll_release_file |--58.41%--__mutex_lock.isra.6 |--56.56%--osq_lock The application is multi-threaded, creates a new epoll entry for each incoming connection, and does not delete it before the connection shutdown - that is, before the connection's fd close(). Many different threads compete frequently for the epmutex lock, affecting the overall performance. To reduce the contention this patch introduces explicit reference counting for the eventpoll struct. Each registered event acquires a reference, and references are released at ep_remove() time. The eventpoll struct is released by whoever - among EP file close() and and the monitored file close() drops its last reference. Additionally, this introduces a new 'dying' flag to prevent races between the EP file close() and the monitored file close(). ep_eventpoll_release() marks, under f_lock spinlock, each epitem as dying before removing it, while EP file close() does not touch dying epitems. The above is needed as both close operations could run concurrently and drop the EP reference acquired via the epitem entry. Without the above flag, the monitored file close() could reach the EP struct via the epitem list while the epitem is still listed and then try to put it after its disposal. An alternative could be avoiding touching the references acquired via the epitems at EP file close() time, but that could leave the EP struct alive for potentially unlimited time after EP file close(), with nasty side effects. With all the above in place, we can drop the epmutex usage at disposal time. Overall this produces a significant performance improvement in the mentioned connection/rate scenario: the mutex operations disappear from the topmost offenders in the perf report, and the measured connections/rate grows by ~60%. To make the change more readable this additionally renames ep_free() to ep_clear_and_put(), and moves the actual memory cleanup in a separate ep_free() helper. Link: https://lkml.kernel.org/r/4a57788dcaf28f5eb4f8dfddcc3a8b172a7357bb.1679504153.git.pabeni@redhat.com Signed-off-by: Paolo Abeni Co-developed-by: Eric Dumazet Signed-off-by: Eric Dumazet Tested-by: Xiumei Mu Acked-by: Soheil Hassas Yeganeh Reviewed-by: Davidlohr Bueso Cc: Alexander Viro Cc: Carlos Maiolino Cc: Christian Brauner Cc: Eric Biggers Cc: Jacob Keller Cc: Jens Axboe Signed-off-by: Andrew Morton commit f4708a82dc45fbf08bd3c68fc3eb32397e9121a1 Author: Guilherme G. Piccoli Date: Tue Mar 14 17:00:58 2023 -0300 notifiers: add tracepoints to the notifiers infrastructure Currently there is no way to show the callback names for registered, unregistered or executed notifiers. This is very useful for debug purposes, hence add this functionality here in the form of notifiers' tracepoints, one per operation. [akpm@linux-foundation.org: coding-style cleanups] Link: https://lkml.kernel.org/r/20230314200058.1326909-1-gpiccoli@igalia.com Signed-off-by: Guilherme G. Piccoli Cc: Arjan van de Ven Cc: Michael Kelley Cc: Steven Rostedt Cc: Xiaoming Ni Cc: Baoquan He Cc: Cong Wang Cc: Dmitry Osipenko Cc: Guilherme G. Piccoli Cc: Guilherme G. Piccoli Cc: Petr Mladek Cc: Rafael J. Wysocki Cc: Sebastian Andrzej Siewior Cc: Valentin Schneider Signed-off-by: Andrew Morton commit 882c5b261f404ebdfe69dcc055bfffc39f80c5a6 Author: Tom Rix Date: Sun Mar 12 12:46:45 2023 -0400 kernel/hung_task.c: set some hung_task.c variables storage-class-specifier to static smatch reports several warnings kernel/hung_task.c:31:19: warning: symbol 'sysctl_hung_task_check_count' was not declared. Should it be static? kernel/hung_task.c:50:29: warning: symbol 'sysctl_hung_task_check_interval_secs' was not declared. Should it be static? kernel/hung_task.c:52:19: warning: symbol 'sysctl_hung_task_warnings' was not declared. Should it be static? kernel/hung_task.c:75:28: warning: symbol 'sysctl_hung_task_panic' was not declared. Should it be static? These variables are only used in hung_task.c, so they should be static Link: https://lkml.kernel.org/r/20230312164645.471259-1-trix@redhat.com Signed-off-by: Tom Rix Cc: Ben Dooks Cc: fuyuanli Cc: John Ogness Cc: Peter Zijlstra Cc: Petr Mladek Cc: Rafael J. Wysocki Cc: Rasmus Villemoes Signed-off-by: Andrew Morton commit 725e374050ab0b4aa3663807a597773db30f1ae8 Author: Lukas Bulwahn Date: Wed Mar 8 16:06:25 2023 +0100 MAINTAINERS: remove the obsolete section EMBEDDED LINUX By now, many developers are working on Linux for embedded systems. There is no need to point out single developers. The linux-embedded mailing list has only little traffic, and most of it is just spam. Remove this obsolete section. Link: https://lkml.kernel.org/r/20230308150625.28732-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Acked-by: David Woodhouse Cc: Olivia Mackall Signed-off-by: Andrew Morton commit d99a4158c4483c7f47274937deb142cd8c461b77 Author: Gerhard Engleder Date: Wed Jan 4 21:15:24 2023 +0100 checkpatch: ignore ETHTOOL_LINK_MODE_ enum values Since commit 4104a20646 ("checkpatch: ignore generated CamelCase defines and enum values") enum values like ETHTOOL_LINK_MODE_Asym_Pause_BIT are ignored. But there are other enums like ETHTOOL_LINK_MODE_1000baseT_Full_BIT, which are not ignored because of the not matching '1000baseT' substring. Add regex to match all ETHTOOL_LINK_MODE enums. Link: https://lkml.kernel.org/r/20230104201524.28078-1-gerhard@engleder-embedded.com Signed-off-by: Gerhard Engleder Cc: Andy Whitcroft Cc: Dwaipayan Ray Cc: Gerhard Engleder Cc: Joe Perches Cc: Lukas Bulwahn Signed-off-by: Andrew Morton commit 4b3d049f1c567560191884d4bd8f6e99ab885e20 Author: Andrew Morton Date: Mon Mar 6 13:32:53 2023 -0800 scripts/link-vmlinux.sh: fix error message presentation This comes out as Try make KALLSYMS_EXTRA_PASS=1 as a workaround but we want quotes: Try "make KALLSYMS_EXTRA_PASS=1" as a workaround Link: https://lkml.kernel.org/r/202303042034.Cjc7JTd0-lkp@intel.com Cc: kernel test robot Signed-off-by: Andrew Morton commit 70e79866ab36feaaed8ef26dacfbcbac6a0631c9 Author: Alexey Dobriyan Date: Tue Feb 28 15:14:17 2023 +0300 ELF: fix all "Elf" typos ELF is acronym and therefore should be spelled in all caps. I left one exception at Documentation/arm/nwfpe/nwfpe.rst which looks like being written in the first person. Link: https://lkml.kernel.org/r/Y/3wGWQviIOkyLJW@p183 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton commit 2a6772ebf05a9b6bc450e42bbb459f6327f68aca Author: Alexey Dobriyan Date: Tue Feb 28 18:34:38 2023 +0300 mm: uninline kstrdup() gcc inlines kstrdup into kstrdup_const() but it can very efficiently tail call into it instead: $ ./scripts/bloat-o-meter ../vmlinux-000 ../obj/vmlinux add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-84 (-84) Function old new delta kstrdup_const 119 35 -84 Link: https://lkml.kernel.org/r/Y/4fDlbIhTLNLFHz@p183 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton commit 6d51363d53db4f5f11a13509ef28e917b97eb2b3 Author: Glenn Washburn Date: Sun Feb 26 22:06:00 2023 -0600 scripts/gdb: support getting current task struct in UML A running x86 UML kernel reports with architecture "i386:x86-64" as it is a sub-architecture. However, a difference with bare-metal x86 kernels is in how it manages tasks and the current task struct. To identify that the inferior is a UML kernel and not bare-metal, check for the existence of the UML specific symbol "cpu_tasks" which contains the current task struct. Link: https://lkml.kernel.org/r/b839d611e2906ccef2725c34d8e353fab35fe75e.1677469905.git.development@efficientek.com Signed-off-by: Glenn Washburn Reviewed-by: Jan Kiszka Cc: Anton Ivanov Cc: Johannes Berg Cc: Kieran Bingham Cc: Richard Weinberger Signed-off-by: Andrew Morton commit 56fe487062b5561ceabb9f866327cd0b041f3a09 Author: Glenn Washburn Date: Sun Feb 26 22:05:59 2023 -0600 scripts/gdb: correct indentation in get_current_task Patch series "scripts/gdb: Support getting current task struct in UML", v3. A running x86 UML kernel reports with architecture "i386:x86-64" as it is a sub-architecture. However, a difference with bare-metal x86 kernels is in how it manages tasks and the current task struct. To identify that the inferior is a UML kernel and not bare-metal, check for the existence of the UML specific symbol "cpu_tasks" which contains the current task struct. This patch (of 3): There is an extra space in a couple blocks in get_current_task. Though python does not care, let's make the spacing consistent. Also, format better an if expression, removing unneeded parenthesis. Link: https://lkml.kernel.org/r/cover.1677469905.git.development@efficientek.com Link: https://lkml.kernel.org/r/2e117b82240de6893f27cb6507242ce455ed7b5b.1677469905.git.development@efficientek.com Signed-off-by: Glenn Washburn Reviewed-by: Jan Kiszka Cc: Anton Ivanov Cc: Johannes Berg Cc: Kieran Bingham Cc: Richard Weinberger Signed-off-by: Andrew Morton commit 3ac39d208d485ef5f5518b96f23ec9ade077683f Author: Dan Carpenter Date: Mon Feb 27 13:06:12 2023 +0300 dca: delete unnecessary variable It's more readable to just pass NULL directly instead of using a variable for that. Link: https://lkml.kernel.org/r/Y/yAlDytLH0ZNLNz@kili Signed-off-by: Dan Carpenter Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton commit 7b32137bc027701cc9c57967af64fcdea0ef113b Author: Andrey Konovalov Date: Mon Feb 27 18:17:03 2023 +0100 kcov: improve documentation Improve KCOV documentation: - Use KCOV instead of kcov, as the former is more widely-used. - Mention Clang in compiler requirements. - Use ``annotations`` for inline code. - Rework remote coverage collection documentation for better clarity. - Various smaller changes. [andreyknvl@google.com: v2] Link: https://lkml.kernel.org/r/583f41c49eef15210fa813e8229730d11427efa7.1677614637.git.andreyknvl@google.com [andreyknvl@google.com: fix ``annotation`` for KCOV_REMOTE_ENABLE] Link: https://lkml.kernel.org/r/72be5c215c275f35891229b90622ed859f196a46.1677684837.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/0b5efd70e31bba7912cf9a6c951f0e76a8df27df.1677517724.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Dmitry Vyukov Reviewed-by: Bagas Sanjaya Cc: Alexander Potapenko Cc: Marco Elver Signed-off-by: Andrew Morton commit f9641a36d38daee3ccf2f3d832cbc9c3442b6078 Author: Uros Bizjak Date: Wed Nov 30 16:12:31 2022 +0100 nfs: remove empty if statement from nfs3_prepare_get_acl Remove empty if statement from nfs3_prepare_get_acl and update comment to follow the one from the referred fs/posix_acl.c:get_acl(). No functional change intended. Link: https://lkml.kernel.org/r/20221130151231.3654-1-ubizjak@gmail.com Signed-off-by: Uros Bizjak Cc: Trond Myklebust Cc: Anna Schumaker Signed-off-by: Andrew Morton commit b99b258899d7a59e60169f402e5bce6b8272ce97 Author: Chao Yu Date: Tue Jan 31 23:08:40 2023 +0800 proc: remove mark_inode_dirty() in .setattr() procfs' .setattr() has updated i_uid, i_gid and i_mode into proc dirent, we don't need to call mark_inode_dirty() for delayed update, remove it. Link: https://lkml.kernel.org/r/20230131150840.34726-1-chao@kernel.org Signed-off-by: Chao Yu Reviewed-by: Alexey Dobriyan Signed-off-by: Andrew Morton commit 0de155752b152d6bcd96b5b5bf20af336abd183a Author: Randy Dunlap Date: Wed Feb 22 19:43:09 2023 -0800 ia64: salinfo: placate defined-but-not-used warning When CONFIG_PROC_FS is not set, proc_salinfo_show() is not used. Mark the function as __maybe_unused to quieten the warning message. ../arch/ia64/kernel/salinfo.c:584:12: warning: 'proc_salinfo_show' defined but not used [-Wunused-function] 584 | static int proc_salinfo_show(struct seq_file *m, void *v) | ^~~~~~~~~~~~~~~~~ Link: https://lkml.kernel.org/r/20230223034309.13375-1-rdunlap@infradead.org Fixes: 3f3942aca6da ("proc: introduce proc_create_single{,_data}") Signed-off-by: Randy Dunlap Cc: Christoph Hellwig Signed-off-by: Andrew Morton commit 58deeb4ef3b054498747d0929d94ac53ab90981f Author: Randy Dunlap Date: Wed Feb 22 19:42:58 2023 -0800 ia64: mm/contig: fix section mismatch warning/error alloc_per_cpu_data() is called by find_memory(), which is marked as __init. Therefore alloc_per_cpu_data() can also be marked as __init to remedy this modpost problem. WARNING: modpost: vmlinux.o: section mismatch in reference: alloc_per_cpu_data (section: .text) -> memblock_alloc_try_nid (section: .init.text) Link: https://lkml.kernel.org/r/20230223034258.12917-1-rdunlap@infradead.org Fixes: 4b9ddc7cf272 ("[IA64] Fix section mismatch in contig.c version of per_cpu_init()") Signed-off-by: Randy Dunlap Cc: Christoph Hellwig Signed-off-by: Andrew Morton commit eca7de7cdc382eb6e0d344c07b1449ed75f5b435 Author: Wang Yong Date: Mon Feb 13 14:08:08 2023 +0800 delayacct: improve the average delay precision of getdelay tool to microsecond Improve the average delay precision of getdelay tool to microsecond. When using the getdelay tool, it is sometimes found that the average delay except CPU is not 0, but display is 0, because the precison is too low. For example, see delay average of SWAP below when using ZRAM. print delayacct stats ON PID 32915 CPU count real total virtual total delay total delay average 339202 2793871936 9233585504 7951112 0.000ms IO count delay total delay average 41 419296904 10ms SWAP count delay total delay average 242589 1045792384 0ms This wrong display is misleading, so improve the millisecond precision of the average delay to microsecond just like CPU. Then user would get more accurate information of delay time. Link: https://lkml.kernel.org/r/202302131408087983857@zte.com.cn Signed-off-by: Wang Yong Reviewed-by: Yang Yang Cc: David Hildenbrand Signed-off-by: Andrew Morton commit c5284f6d8ce2b9cf96643da441862434233a4ea3 Author: Colin Ian King Date: Thu Apr 6 09:02:26 2023 +0100 KVM: selftests: Fix spelling mistake "KVM_HYPERCAL_EXIT_SMC" -> "KVM_HYPERCALL_EXIT_SMC" There is a spelling mistake in a test assert message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230406080226.122955-1-colin.i.king@gmail.com commit 00e0c947118f456b622c1f2ca316c116dfb4e12c Author: Oliver Upton Date: Sat Apr 8 12:17:32 2023 +0000 KVM: arm64: Test that SMC64 arch calls are reserved Assert that the SMC64 view of the Arm architecture range is reserved by KVM and cannot be filtered by userspace. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230408121732.3411329-3-oliver.upton@linux.dev commit 5a23ad6510c82049f5ab3795841c30e8f3ca324d Author: Oliver Upton Date: Sat Apr 8 12:17:31 2023 +0000 KVM: arm64: Prevent userspace from handling SMC64 arch range Though presently unused, there is an SMC64 view of the Arm architecture calls defined by the SMCCC. The documentation of the SMCCC filter states that the SMC64 range is reserved, but nothing actually prevents userspace from applying a filter to the range. Insert a range with the HANDLE action for the SMC64 arch range, thereby preventing userspace from imposing filtering/forwarding on it. Fixes: fb88707dd39b ("KVM: arm64: Use a maple tree to represent the SMCCC filter") Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230408121732.3411329-2-oliver.upton@linux.dev commit a140b18f0cc79f5c302ecedbde8364d49effa67f Author: Cristian Ciocaltea Date: Tue Mar 21 23:56:20 2023 +0200 riscv: dts: allwinner: d1: Switch dma-names order for snps,dw-apb-uart nodes Commit 370f696e4474 ("dt-bindings: serial: snps-dw-apb-uart: add dma & dma-names properties") documented dma-names property to handle Allwinner D1 dtbs_check warnings, but relies on the rx->tx ordering, which is the reverse of what a bunch of different boards expect. The initial proposed solution was to allow a flexible dma-names order in the binding, due to potential ABI breakage concerns after fixing the DTS files. But luckily the Allwinner boards are not affected, since they are using a shared DMA channel for rx and tx. Hence, the first step in fixing the inconsistency was to change dma-names order in the binding to tx->rx. Do the same for the snps,dw-apb-uart nodes in the DTS file. Signed-off-by: Cristian Ciocaltea Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230321215624.78383-7-cristian.ciocaltea@collabora.com Signed-off-by: Jernej Skrabec commit bb9ecbee05f5fd0042caf264835fad55a132d8c7 Author: Cristian Ciocaltea Date: Tue Mar 21 23:56:19 2023 +0200 ARM: dts: sunxi: h3/h5: Switch dma-names order for snps,dw-apb-uart nodes Commit 370f696e4474 ("dt-bindings: serial: snps-dw-apb-uart: add dma & dma-names properties") documented dma-names property to handle Allwinner D1 dtbs_check warnings, but relies on the rx->tx ordering, which is the reverse of what a bunch of different boards expect. The initial proposed solution was to allow a flexible dma-names order in the binding, due to potential ABI breakage concerns after fixing the DTS files. But luckily the Allwinner boards are not affected, since they are using a shared DMA channel for rx and tx. Hence, the first step in fixing the inconsistency was to change dma-names order in the binding to tx->rx. Do the same for the snps,dw-apb-uart nodes in the DTS file. Signed-off-by: Cristian Ciocaltea Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230321215624.78383-6-cristian.ciocaltea@collabora.com Signed-off-by: Jernej Skrabec commit 1532d4f4d7803e8a5c4c70c280427b2d25b7abc2 Author: Cristian Ciocaltea Date: Tue Mar 21 23:56:18 2023 +0200 ARM: dts: sun8i: v3s: Switch dma-names order for snps,dw-apb-uart nodes Commit 370f696e4474 ("dt-bindings: serial: snps-dw-apb-uart: add dma & dma-names properties") documented dma-names property to handle Allwinner D1 dtbs_check warnings, but relies on the rx->tx ordering, which is the reverse of what a bunch of different boards expect. The initial proposed solution was to allow a flexible dma-names order in the binding, due to potential ABI breakage concerns after fixing the DTS files. But luckily the Allwinner boards are not affected, since they are using a shared DMA channel for rx and tx. Hence, the first step in fixing the inconsistency was to change dma-names order in the binding to tx->rx. Do the same for the snps,dw-apb-uart nodes in the DTS file. Signed-off-by: Cristian Ciocaltea Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230321215624.78383-5-cristian.ciocaltea@collabora.com Signed-off-by: Jernej Skrabec commit d4880d2b81d8167b2cb7e27026c42dd1df9dbf8d Author: Cristian Ciocaltea Date: Tue Mar 21 23:56:17 2023 +0200 ARM: dts: sun8i: a23/a33: Switch dma-names order for snps,dw-apb-uart nodes Commit 370f696e4474 ("dt-bindings: serial: snps-dw-apb-uart: add dma & dma-names properties") documented dma-names property to handle Allwinner D1 dtbs_check warnings, but relies on the rx->tx ordering, which is the reverse of what a bunch of different boards expect. The initial proposed solution was to allow a flexible dma-names order in the binding, due to potential ABI breakage concerns after fixing the DTS files. But luckily the Allwinner boards are not affected, since they are using a shared DMA channel for rx and tx. Hence, the first step in fixing the inconsistency was to change dma-names order in the binding to tx->rx. Do the same for the snps,dw-apb-uart nodes in the DTS file. Signed-off-by: Cristian Ciocaltea Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230321215624.78383-4-cristian.ciocaltea@collabora.com Signed-off-by: Jernej Skrabec commit a9efe94fbd0bb1c9c32393b1dd7cddd75c07db42 Author: Cristian Ciocaltea Date: Tue Mar 21 23:56:16 2023 +0200 ARM: dts: sun6i: a31: Switch dma-names order for snps,dw-apb-uart nodes Commit 370f696e4474 ("dt-bindings: serial: snps-dw-apb-uart: add dma & dma-names properties") documented dma-names property to handle Allwinner D1 dtbs_check warnings, but relies on the rx->tx ordering, which is the reverse of what a bunch of different boards expect. The initial proposed solution was to allow a flexible dma-names order in the binding, due to potential ABI breakage concerns after fixing the DTS files. But luckily the Allwinner boards are not affected, since they are using a shared DMA channel for rx and tx. Hence, the first step in fixing the inconsistency was to change dma-names order in the binding to tx->rx. Do the same for the snps,dw-apb-uart nodes in the DTS file. Signed-off-by: Cristian Ciocaltea Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230321215624.78383-3-cristian.ciocaltea@collabora.com Signed-off-by: Jernej Skrabec commit 48ce2d722f7f108f27bedddf54bee3423a57ce57 Author: Jianmin Lv Date: Fri Apr 7 16:34:53 2023 +0800 irqchip/loongson-pch-pic: Fix pch_pic_acpi_init calling For dual-bridges scenario, pch_pic_acpi_init() will be called in following path: cpuintc_acpi_init acpi_cascade_irqdomain_init(in cpuintc driver) acpi_table_parse_madt eiointc_parse_madt eiointc_acpi_init /* this will be called two times correspondingto parsing two eiointc entries in MADT under dual-bridges scenario*/ acpi_cascade_irqdomain_init(in eiointc driver) acpi_table_parse_madt pch_pic_parse_madt pch_pic_acpi_init /* this will be called depend on valid parent IRQ domain handle for one or two times corresponding to parsing two pchpic entries in MADT druring calling eiointc_acpi_init() under dual-bridges scenario*/ During the first eiointc_acpi_init() calling, the pch_pic_acpi_init() will be called just one time since only one valid parent IRQ domain handle will be found for current eiointc IRQ domain. During the second eiointc_acpi_init() calling, the pch_pic_acpi_init() will be called two times since two valid parent IRQ domain handles will be found. So in pch_pic_acpi_init(), we must have a reasonable way to prevent from creating second same pch_pic IRQ domain. The patch matches gsi base information in created pch_pic IRQ domains to check if the target domain has been created to avoid the bug mentioned above. Cc: stable@vger.kernel.org Signed-off-by: Jianmin Lv Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230407083453.6305-6-lvjianmin@loongson.cn commit c84efbba46901b187994558ee0edb15f7076c9a7 Author: Jianmin Lv Date: Fri Apr 7 16:34:52 2023 +0800 irqchip/loongson-pch-pic: Fix registration of syscore_ops When support suspend/resume for loongson-pch-pic, the syscore_ops is registered twice in dual-bridges machines where there are two pch-pic IRQ domains. Repeated registration of an same syscore_ops broke syscore_ops_list, so the patch will corret it. Fixes: 1ed008a2c331 ("irqchip/loongson-pch-pic: Add suspend/resume support") Cc: stable@vger.kernel.org Signed-off-by: Jianmin Lv Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230407083453.6305-5-lvjianmin@loongson.cn commit bdd60211eebb43ba1c4c14704965f4d4b628b931 Author: Jianmin Lv Date: Fri Apr 7 16:34:51 2023 +0800 irqchip/loongson-eiointc: Fix registration of syscore_ops When support suspend/resume for loongson-eiointc, the syscore_ops is registered twice in dual-bridges machines where there are two eiointc IRQ domains. Repeated registration of an same syscore_ops broke syscore_ops_list. Also, cpuhp_setup_state_nocalls is only needed to call for once. So the patch will corret them. Fixes: a90335c2dfb4 ("irqchip/loongson-eiointc: Add suspend/resume support") Cc: stable@vger.kernel.org Signed-off-by: Jianmin Lv Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230407083453.6305-4-lvjianmin@loongson.cn commit 64cc451e45e146b2140211b4f45f278b93b24ac0 Author: Jianmin Lv Date: Fri Apr 7 16:34:50 2023 +0800 irqchip/loongson-eiointc: Fix incorrect use of acpi_get_vec_parent In eiointc_acpi_init(), a *eiointc* node is passed into acpi_get_vec_parent() instead of a required *NUMA* node (on some chip like 3C5000L, a *NUMA* node means a *eiointc* node, but on some chip like 3C5000, a *NUMA* node contains 4 *eiointc* nodes), and node in struct acpi_vector_group is essentially a *NUMA* node, which will lead to no parent matched for passed *eiointc* node. so the patch adjusts code to use *NUMA* node for parameter node of acpi_set_vec_parent/acpi_get_vec_parent. Cc: stable@vger.kernel.org Signed-off-by: Jianmin Lv Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230407083453.6305-3-lvjianmin@loongson.cn commit 112eaa8fec5ea75f1be003ec55760b09a86799f8 Author: Jianmin Lv Date: Fri Apr 7 16:34:49 2023 +0800 irqchip/loongson-eiointc: Fix returned value on parsing MADT In pch_pic_parse_madt(), a NULL parent pointer will be returned from acpi_get_vec_parent() for second pch-pic domain related to second bridge while calling eiointc_acpi_init() at first time, where the parent of it has not been initialized yet, and will be initialized during second time calling eiointc_acpi_init(). So, it's reasonable to return zero so that failure of acpi_table_parse_madt() will be avoided, or else acpi_cascade_irqdomain_init() will return and initialization of followed pch_msi domain will be skipped. Although it does not matter when pch_msi_parse_madt() returns -EINVAL if no invalid parent is found, it's also reasonable to return zero for that. Cc: stable@vger.kernel.org Signed-off-by: Jianmin Lv Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230407083453.6305-2-lvjianmin@loongson.cn commit f8415f2def181c63486e93c511b82692e0914d9e Author: Anup Patel Date: Tue Mar 28 09:22:23 2023 +0530 irqchip/riscv-intc: Add empty irq_eoi() for chained irq handlers We add empty irq_eoi() in RISC-V INTC driver for child irqchip drivers (such as PLIC, SBI IPI, CLINT, APLIC, IMSIC, etc) which implement chained handlers for parent per-HART local interrupts. This hels us avoid unnecessary mask/unmask of per-HART local interrupts at the time of handling interrupts. Signed-off-by: Anup Patel Acked-by: Palmer Dabbelt Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230328035223.1480939-8-apatel@ventanamicro.com commit 6279228432352f43f43f5e760771151605bf6d82 Author: Anup Patel Date: Tue Mar 28 09:22:22 2023 +0530 RISC-V: Use IPIs for remote icache flush when possible If we have specialized interrupt controller (such as AIA IMSIC) which allows supervisor mode to directly inject IPIs without any assistance from M-mode or HS-mode then using such specialized interrupt controller, we can do remote icache flushe directly from supervisor mode instead of using the SBI RFENCE calls. This patch extends remote icache flush functions to use supervisor mode IPIs whenever direct supervisor mode IPIs.are supported by interrupt controller. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Acked-by: Palmer Dabbelt Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230328035223.1480939-7-apatel@ventanamicro.com commit 18d2199d81054f44e6d2a51177cc80566f43bf23 Author: Anup Patel Date: Tue Mar 28 09:22:21 2023 +0530 RISC-V: Use IPIs for remote TLB flush when possible If we have specialized interrupt controller (such as AIA IMSIC) which allows supervisor mode to directly inject IPIs without any assistance from M-mode or HS-mode then using such specialized interrupt controller, we can do remote TLB flushes directly from supervisor mode instead of using the SBI RFENCE calls. This patch extends remote TLB flush functions to use supervisor mode IPIs whenever direct supervisor mode IPIs.are supported by interrupt controller. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Acked-by: Palmer Dabbelt Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230328035223.1480939-6-apatel@ventanamicro.com commit fb0f3d281b7f81a11e210783940f3798c4744179 Author: Anup Patel Date: Tue Mar 28 09:22:20 2023 +0530 RISC-V: Allow marking IPIs as suitable for remote FENCEs To do remote FENCEs (i.e. remote TLB flushes) using IPI calls on the RISC-V kernel, we need hardware mechanism to directly inject IPI from the supervisor mode (i.e. RISC-V kernel) instead of using SBI calls. The upcoming AIA IMSIC devices allow direct IPI injection from the supervisor mode (i.e. RISC-V kernel). To support this, we extend the riscv_ipi_set_virq_range() function so that IPI provider (i.e. irqchip drivers can mark IPIs as suitable for remote FENCEs. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Acked-by: Palmer Dabbelt Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230328035223.1480939-5-apatel@ventanamicro.com commit 832f15f42646812b096bc67c0eac439291a0db1f Author: Anup Patel Date: Tue Mar 28 09:22:19 2023 +0530 RISC-V: Treat IPIs as normal Linux IRQs Currently, the RISC-V kernel provides arch specific hooks (i.e. struct riscv_ipi_ops) to register IPI handling methods. The stats gathering of IPIs is also arch specific in the RISC-V kernel. Other architectures (such as ARM, ARM64, and MIPS) have moved away from custom arch specific IPI handling methods. Currently, these architectures have Linux irqchip drivers providing a range of Linux IRQ numbers to be used as IPIs and IPI triggering is done using generic IPI APIs. This approach allows architectures to treat IPIs as normal Linux IRQs and IPI stats gathering is done by the generic Linux IRQ subsystem. We extend the RISC-V IPI handling as-per above approach so that arch specific IPI handling methods (struct riscv_ipi_ops) can be removed and the IPI handling is done through the Linux IRQ subsystem. Signed-off-by: Anup Patel Acked-by: Palmer Dabbelt Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230328035223.1480939-4-apatel@ventanamicro.com commit 0c60a31ce62ca3e93550868fd699dfc4dfc4e795 Author: Anup Patel Date: Tue Mar 28 09:22:18 2023 +0530 irqchip/riscv-intc: Allow drivers to directly discover INTC hwnode Various RISC-V drivers (such as SBI IPI, SBI Timer, SBI PMU, and KVM RISC-V) don't have associated DT node but these drivers need standard per-CPU (local) interrupts defined by the RISC-V privileged specification. We add riscv_get_intc_hwnode() in arch/riscv which allows RISC-V drivers not having DT node to discover INTC hwnode which in-turn helps these drivers to map per-CPU (local) interrupts provided by the INTC driver. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Acked-by: Palmer Dabbelt Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230328035223.1480939-3-apatel@ventanamicro.com commit 3ee92565b83ecc08e5b0c878dd87a2973eaca2ea Author: Anup Patel Date: Tue Mar 28 09:22:17 2023 +0530 RISC-V: Clear SIP bit only when using SBI IPI operations The software interrupt pending (i.e. [M|S]SIP) bit is writeable for S-mode but read-only for M-mode so we clear this bit only when using SBI IPI operations. Signed-off-by: Anup Patel Reviewed-by: Bin Meng Reviewed-by: Atish Patra Acked-by: Palmer Dabbelt Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230328035223.1480939-2-apatel@ventanamicro.com commit e80f0b6a2cf302b56b7d6d7ad3797aebc97fccb9 Author: Mason Huo Date: Tue Apr 4 11:29:08 2023 +0800 irqchip/irq-sifive-plic: Add syscore callbacks for hibernation The priority and enable registers of plic will be reset during hibernation power cycle in poweroff mode, add the syscore callbacks to save/restore those registers. Signed-off-by: Mason Huo Reviewed-by: Ley Foon Tan Reviewed-by: Sia Jee Heng Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202302140709.CdkxgtPi-lkp@intel.com/ Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230404032908.89638-1-mason.huo@starfivetech.com commit 9dfc77917e3b82dc7f93d62cebf1ebb885e9cc6a Author: Rob Herring Date: Fri Mar 10 08:47:10 2023 -0600 irqchip: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Acked-by: Guo Ren (csky) Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230310144710.1543070-1-robh@kernel.org commit 23c7ff129cf33dee5f1f4fd9fa729ab440e8f1c5 Author: Álvaro Fernández Rojas Date: Thu Mar 16 20:28:33 2023 +0100 irqchip/bcm-6345-l1: Request memory region Request memory region in order to display it in /proc/iomem. Also stop printing the MMIO address since it just displays (ptrval). Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230316192833.1603149-1-noltari@gmail.com commit 35727af2b15d98a2dd2811d631d3a3886111312e Author: Shanker Donthineni Date: Sat Mar 18 21:43:14 2023 -0500 irqchip/gicv3: Workaround for NVIDIA erratum T241-FABRIC-4 The T241 platform suffers from the T241-FABRIC-4 erratum which causes unexpected behavior in the GIC when multiple transactions are received simultaneously from different sources. This hardware issue impacts NVIDIA server platforms that use more than two T241 chips interconnected. Each chip has support for 320 {E}SPIs. This issue occurs when multiple packets from different GICs are incorrectly interleaved at the target chip. The erratum text below specifies exactly what can cause multiple transfer packets susceptible to interleaving and GIC state corruption. GIC state corruption can lead to a range of problems, including kernel panics, and unexpected behavior. >From the erratum text: "In some cases, inter-socket AXI4 Stream packets with multiple transfers, may be interleaved by the fabric when presented to ARM Generic Interrupt Controller. GIC expects all transfers of a packet to be delivered without any interleaving. The following GICv3 commands may result in multiple transfer packets over inter-socket AXI4 Stream interface: - Register reads from GICD_I* and GICD_N* - Register writes to 64-bit GICD registers other than GICD_IROUTERn* - ITS command MOVALL Multiple commands in GICv4+ utilize multiple transfer packets, including VMOVP, VMOVI, VMAPP, and 64-bit register accesses." This issue impacts system configurations with more than 2 sockets, that require multi-transfer packets to be sent over inter-socket AXI4 Stream interface between GIC instances on different sockets. GICv4 cannot be supported. GICv3 SW model can only be supported with the workaround. Single and Dual socket configurations are not impacted by this issue and support GICv3 and GICv4." Link: https://developer.nvidia.com/docs/t241-fabric-4/nvidia-t241-fabric-4-errata.pdf Writing to the chip alias region of the GICD_In{E} registers except GICD_ICENABLERn has an equivalent effect as writing to the global distributor. The SPI interrupt deactivate path is not impacted by the erratum. To fix this problem, implement a workaround that ensures read accesses to the GICD_In{E} registers are directed to the chip that owns the SPI, and disable GICv4.x features. To simplify code changes, the gic_configure_irq() function uses the same alias region for both read and write operations to GICD_ICFGR. Co-developed-by: Vikram Sethi Signed-off-by: Vikram Sethi Signed-off-by: Shanker Donthineni Acked-by: Sudeep Holla (for SMCCC/SOC ID bits) Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230319024314.3540573-2-sdonthineni@nvidia.com commit dee234032e767b3d6823fe122517770757306f04 Author: Marc Zyngier Date: Wed Mar 15 13:02:18 2023 +0000 irqchip/gic: Drop support for board files With the last non-OF, non-ACPI user of the GIC being removed in e73307b9ebc4 ("ARM: cns3xxx: remove entire platform"), we can finally drop the entry point and do some minor cleanup. We also make the driver depend on CONFIG_OF, which is required even when CONFIG_ACPI is selected. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230315130218.3212033-1-maz@kernel.org commit 56499c461589634f2c89ffbd9cfb78268191d349 Author: Tomer Tayar Date: Sun Apr 2 13:42:35 2023 +0300 accel/habanalabs: add missing error flow in hl_sysfs_init() hl_sysfs_fini() is called only if hl_sysfs_init() completes successfully. Therefore if hl_sysfs_init() fails, need to remove any sysfs group that was added until that point. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 31420f93b5c15746759cd87eaa0f572a7316ea46 Author: Moti Haimovski Date: Mon Mar 20 22:59:11 2023 +0200 accel/habanalabs: speedup h/w queues test in Gaudi2 HW queues testing at driver load and after reset takes a substantial amount of time. This commit reduces the queues test time in Gaudi2 devices by running all the tests in parallel instead of one after the other. Time measurements on tests duration shows that the new method is almost x100 faster than the serial approach. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 91204e4703aef7bcdd045126b889d7e1aab63dd5 Author: Dani Liberman Date: Tue Mar 28 20:41:35 2023 +0300 accel/habanalabs: fix handling of arc farm sei event There is only single eq entry for arc farm sei event which aggregates events from the four arc farms. Fix the code to handle this event according to this behavior. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit b207e166dbadc88f38d9550c592cc4f8413b7a15 Author: Ofir Bitton Date: Mon Mar 27 13:40:56 2023 +0300 accel/habanalabs: remove Gaudi1 multi MSI code Multi MSI interrupts aren't working in Gaudi1 and because of that, we are only using a single MSI interrupt. Therefore, let's remove this dead code in order to avoid confusion. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit a25c2f7a467265fa24d63fb6dd46fa7ba4e3b108 Author: Oded Gabbay Date: Thu Mar 30 12:30:56 2023 +0300 accel/habanalabs/uapi: new Gaudi2 server type Add definition of a new Gaudi2 server type. This represents the connectivity between the cards in that server type. Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 38f3c732fce6c57ab174800e2e5456498207d440 Author: Ofir Bitton Date: Tue Mar 28 10:59:43 2023 +0300 accel/habanalabs: fixes for unexpected error interrupt Removing redundant asic prop variable as we don't need to expose this to common code. In addition, fix some typos. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c19350efa9dae7f4474d7847ab7d6e667082fd18 Author: Koby Elbaz Date: Sun Mar 26 18:22:57 2023 +0300 accel/habanalabs: don't wait for STS_OK after sending COMMS WFE Sending COMMS_GOTO_WFE instructs the FW's CPU to halt (WFE state). Once sent, FW's CPU isn't expected to continue communicating with LKD. Therefore, the stage of waiting for COMMS_STS_OK should be skipped or else waiting for COMMS_STS_OK will simply timeout, which will trigger unexpected behavior. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 802f25b6c2c0377c681dd1e4f799a648c3df50dd Author: Tal Cohen Date: Tue Mar 21 10:59:28 2023 +0200 accel/habanalabs: sync f/w events interrupt in hard reset Receiving events from FW, while the device is in hard reset, causes a warning message in Driver log. The message may point to a problem in the Driver or FW. But It also can appear as a result of events that have been sent from FW just before the hard reset. In order to avoid receiving events from FW while the device is in reset and is already in 'disabled' mode, sync the f/w events interrupt right before setting the device to 'disabled'. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 82a1b48a4e3e8fdb945af63b6fff5304ff5c3c17 Author: Ofir Bitton Date: Sun Mar 26 11:59:44 2023 +0300 accel/habanalabs: fix wrong reset and event flags During event handling, driver sets relevant reset and user event notifier flags. Fix few wrong flags settings. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit d4801c048543115f9eddbecd6f72a3f68d562bdb Author: Tomer Tayar Date: Mon Mar 27 00:08:45 2023 +0300 accel/habanalabs: fix events mask of decoder abnormal interrupts The decoder IRQ status register may have several set bits upon an abnormal interrupt. Therefore, when setting the events mask, need to check all bits and not using if-else. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 9cf56f0d97806eaff68c4c4facd7ef94e2a072bc Author: Tomer Tayar Date: Sun Mar 26 23:51:25 2023 +0300 accel/habanalabs: remove completion from abnormal interrupt work name Decoder abnormal interrupts are for errors and not for completion, so rename the relevant work and work function to not include 'completion'. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 49fd071d1572dc8ae824146394dcda883dac3a1f Author: Ofir Bitton Date: Sun Mar 26 14:01:54 2023 +0300 accel/habanalabs: print raw binning masks in debug level There are rare cases of failures when cards are initialized due to wrong values in efuse mappings that are parsed by firmware. To help debug those cases, print (in debug level) the raw binning masks as fetched from the firmware during device initialization. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit d1943f1b97790f79474c1b55f37d24f714313bb9 Author: Ofir Bitton Date: Wed Mar 15 10:36:41 2023 +0200 accel/habanalabs: fix HBM MMU interrupt handling Current mapping between HMMU event and HMMU block is wrong. In addition the captured address in case of a page fault or an access error is scrambled, Hence we must call the descramble function. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 12f7701138846249fb09dd22e85b88563c708a41 Author: Dafna Hirschfeld Date: Thu Mar 16 10:45:47 2023 +0200 accel/habanalabs: improvements to FW ver extraction 1. Rename the func to hl_get_preboot_major_minor because we also set the extracted values in hdev fields. 2. Free the allocated string in the calling function which makes more sense Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6306e815836c753c8de5f075fd14f4a2783e882f Author: Dani Liberman Date: Thu Mar 23 19:40:22 2023 +0200 accel/habanalabs: fix access error clear event The register which needs to be cleared is the valid register instead of the address. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 3a8d7c3a7d1bf7d1f2121c1f467d6b349b7bf807 Author: Tal Cohen Date: Wed Mar 22 11:20:05 2023 +0200 accel/habanalabs: send disable pci when compute ctx is active Fix an issue in hard reset flow in which the driver didn't send a disable pci message if there was an active compute context. In hard reset, disable pci message should be sent no matter if a compute context exists or not. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit a855f710f5d40537bc2bf5f924827416653db39f Author: Tal Cohen Date: Tue Mar 21 17:27:24 2023 +0200 accel/habanalabs: remove duplicated disable pci msg The disable pci message is sent in reset device. It informs the FW not to raise more EQs. The Driver may ignore received EQs, when the device is in disabled mode. The duplication happens when hard reset is scheduled during compute reset and also performs 'escalate_reset_flow'. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 9d7fef7c5963b90160099b568f84188f394ebd11 Author: Koby Elbaz Date: Tue Mar 21 16:03:07 2023 +0200 accel/habanalabs: change COMMS warning messages to error level COMMS protocol is used for LKD <--> FW communication, and any communication failure between the two might turn out to be destructive, hence, it should be well emphasized. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit fb10da9337105d51fcc9f64801ede35e098b6ec5 Author: Dafna Hirschfeld Date: Tue Mar 21 16:17:37 2023 +0200 accel/habanalabs: check return value of add_va_block_locked since the function might fail and we should propagate the failure. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 957b247bca4309b07df991ce114ea7a617b2c9fb Author: Tal Cohen Date: Thu Mar 16 17:30:46 2023 +0200 accel/habanalabs: print event type when device is disabled When the device is in disabled state, the driver isn't suppose to receive any events from FW. Printing the event type, as part of the message that was already printed, shall help to get more info if this unexpected message is received. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 6c31c13759272818108a329f166d86846d0e3f7a Author: Koby Elbaz Date: Wed Mar 8 17:53:39 2023 +0200 accel/habanalabs: unmap mapped memory when TLB inv fails Once a memory mapping is added to the page tables, it's followed by a TLB invalidation request which could potentially fail (HW failure). Removing the mapping is simply a part of this failure handling routine. TLB invalidation failure prints were updated to be more accurate. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 248ed9e227e6cf59acb1aaf3aa30d530a0232c1a Author: Cai Huoqing Date: Thu Mar 23 16:35:49 2023 +0800 accel/habanalabs: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Reviewed-by: Stanislaw Gruszka Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit b4b992e2332fe566481939573f56675d451aae63 Author: Fabio Estevam Date: Fri Apr 7 18:14:46 2023 -0300 ARM: imx_v4_v5_defconfig: Build CONFIG_IMX_SDMA as module Build CONFIG_IMX_SDMA as a module to allow the SDMA firmware be retrieved after the rootfs is mounted. This change aligns with the one already done for imx_v6_v7_defconfig in commit 5a7374ec715d ("ARM: imx_v6_v7_defconfig: build imx sdma driver as module"). Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 562d222f23f0fbdf76a8ba87ce0c9cdcd39e30f8 Author: Marek Vasut Date: Thu Apr 6 18:01:16 2023 +0200 arm64: dts: imx8mp: Add support for Data Modul i.MX8M Plus eDM SBC Add support for Data Modul i.MX8M Plus eDM SBC board. This is an evaluation board for various custom display units. Currently supported are serial console, ethernet, eMMC, SD, SPI NOR, USB host and USB OTG. Reviewed-by: Fabio Estevam Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit df6def86b9dcbc3e8ed4964c7b79b70c9b0c3040 Author: Takahiro Kuwano Date: Fri Apr 7 15:41:04 2023 +0900 mtd: spi-nor: spansion: Add support for s25hl02gt and s25hs02gt Add ID, flags, and fixup for s25hl02gt and s25hs02gt. These parts are - Dual-die package parts - Not support chip erase - 4-byte addressing mode by default - Wrong param in SCCR map that needs to be fixed Signed-off-by: Takahiro Kuwano Link: https://lore.kernel.org/r/55021d2409bf310692db0ac1c55e71ba406438a7.1680849425.git.Takahiro.Kuwano@infineon.com Signed-off-by: Tudor Ambarus commit 91f3c430f622befb1b11f07df3bf7163f46adda6 Author: Takahiro Kuwano Date: Fri Apr 7 15:41:03 2023 +0900 mtd: spi-nor: spansion: Add a new ->ready() hook for multi-chip device For multi-chip devices, we need to make sure the all dice in the device are ready. The cypress_nor_sr_ready_and_clear() reads SR in each die and returns true only when all dice are ready. This function also takes care for program or erase error handling by reusing spansion_nor_clear_sr(). To do that, spansion_nor_clear_sr() is moved to top. Signed-off-by: Takahiro Kuwano Link: https://lore.kernel.org/r/3e4a64613ee733e002279349c75083433be45bf5.1680849425.git.Takahiro.Kuwano@infineon.com Signed-off-by: Tudor Ambarus commit f24d423a5c4fbcd9789ad54454f7c805798a597a Author: Takahiro Kuwano Date: Fri Apr 7 15:41:02 2023 +0900 mtd: spi-nor: spansion: Rework cypress_nor_quad_enable_volatile() for multi-chip device support Rework quad method for multi-chip devices by updating CFR1V in all dice in the device. Signed-off-by: Takahiro Kuwano Link: https://lore.kernel.org/r/1b5606dbcc11b3432c306a75880f05c68e927fb9.1680849425.git.Takahiro.Kuwano@infineon.com Signed-off-by: Tudor Ambarus commit 6c01ae11130ccb5f16e90ab0605198d25b7c1efa Author: Takahiro Kuwano Date: Fri Apr 7 15:41:01 2023 +0900 mtd: spi-nor: spansion: Rework cypress_nor_get_page_size() for multi-chip device support For multi-chip devices, we can use 512B page only when the all dice are configured as 512B page size. The volatile register address is calculated by using the volatile register addresses retrieved from the SCCR tables and the (configuration) register offset. The location of cypress_nor_set_page_size() call is moved from post_bfpt_fixup() to post_sfdp_fixup(), because the number of dice and volatile register offset are parsed in the optional SCCR tables. Signed-off-by: Takahiro Kuwano Link: https://lore.kernel.org/r/6f8272f3e877dee392742d2c8401c4aed57e6d83.1680849425.git.Takahiro.Kuwano@infineon.com Signed-off-by: Tudor Ambarus commit 7ab8b810757a32b083c75a61b5638bca82e17a4c Author: Takahiro Kuwano Date: Fri Apr 7 15:41:00 2023 +0900 mtd: spi-nor: sfdp: Add support for SCCR map for multi-chip device SCCR map for multi-chip devices contains the number of additional dice in the device and register offset values for each additional dice. spi_nor_parse_sccr_mc() is added to determine the number of dice and volatile register offset for each die. The volatile register offset table may already be allocated and contains offset value for die-0 via SCCR map parse. So, we should use devm_krealloc() to expand the table with preserving die-0 offset. Signed-off-by: Takahiro Kuwano Link: https://lore.kernel.org/r/89c892d52f8cbddbd14373f6a02db496885ae4f1.1680849425.git.Takahiro.Kuwano@infineon.com Signed-off-by: Tudor Ambarus commit 706fd00da031e24572216dc650d77111afc2501a Author: Takahiro Kuwano Date: Fri Apr 7 15:40:59 2023 +0900 mtd: spi-nor: Extract volatile register offset from SCCR map In use of multi-chip devices, we need to access registers in each die for configuration and status check. The number of dice in the device and volatile register offsets for each die are essential to iterate register access ops. The volatile register offset for the first die resides in the 1st DWORD of SCCR map. Allocate the table and copy the offset value. The table may be allocated when the SCCR map for multi-chip is parsed. Since we cannot assume SCCR parse is always in ahead of SCCR multi-chip, we need to check if the table is already allocated or not. Signed-off-by: Takahiro Kuwano Link: https://lore.kernel.org/r/e2cc39ad6e0e02dd8288c4def9bb201a3f564425.1680849425.git.Takahiro.Kuwano@infineon.com Signed-off-by: Tudor Ambarus commit e570f7872a34dc290014c80c7bad365d6577836b Author: Tudor Ambarus Date: Fri Apr 7 15:40:58 2023 +0900 mtd: spi-nor: Allow post_sfdp hook to return errors Multi die flashes like s25hl02gt need to determine the page_size at run-time by querying a configuration register for each die. Since the number of dice is determined in an optional SFDP table, SCCR MC, the page size configuration must be done in the post_sfdp hook. Allow post_sfdp to return errors, as reading the configuration register might return errors. Link: https://lore.kernel.org/r/924ab710f128448ec62537cfbb377336e390043c.1680849425.git.Takahiro.Kuwano@infineon.com Signed-off-by: Tudor Ambarus commit 120c94a67b26e4014597fc9f872803621e7a2514 Author: Tudor Ambarus Date: Fri Apr 7 15:40:57 2023 +0900 mtd: spi-nor: spansion: Rename method to cypress_nor_get_page_size The method queries SPINOR_REG_CYPRESS_CFR3V to determine the page size. Rename the method accordingly, s/set/get. Link: https://lore.kernel.org/r/cd3fb2cbc42a9576377ce4506eec72a58240805d.1680849425.git.Takahiro.Kuwano@infineon.com Signed-off-by: Tudor Ambarus commit a9180c298d3527f43563d02a62cb9e7e145642c6 Author: Takahiro Kuwano Date: Thu Apr 6 15:17:46 2023 +0900 mtd: spi-nor: spansion: Enable JFFS2 write buffer for S25FS256T Infineon(Cypress) SEMPER NOR flash family has on-die ECC and its program granularity is 16-byte ECC data unit size. JFFS2 supports write buffer mode for ECC'd NOR flash. Provide a way to clear the MTD_BIT_WRITEABLE flag in order to enable JFFS2 write buffer mode support. Drop the comment as the same info is now specified in cypress_nor_ecc_init(). Fixes: 6afcc84080c4 ("mtd: spi-nor: spansion: Add support for Infineon S25FS256T") Suggested-by: Tudor Ambarus Signed-off-by: Takahiro Kuwano Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/641bfb26c6e059915ae920117b7ec278df1a6f0a.1680760742.git.Takahiro.Kuwano@infineon.com Signed-off-by: Tudor Ambarus commit 4199c1719e24e73be0acc8b0146fc31ad8af9771 Author: Takahiro Kuwano Date: Thu Apr 6 15:17:45 2023 +0900 mtd: spi-nor: spansion: Enable JFFS2 write buffer for Infineon s25hx SEMPER flash Infineon(Cypress) SEMPER NOR flash family has on-die ECC and its program granularity is 16-byte ECC data unit size. JFFS2 supports write buffer mode for ECC'd NOR flash. Provide a way to clear the MTD_BIT_WRITEABLE flag in order to enable JFFS2 write buffer mode support. Fixes: b6b23833fc42 ("mtd: spi-nor: spansion: Add s25hl-t/s25hs-t IDs and fixups") Suggested-by: Tudor Ambarus Signed-off-by: Takahiro Kuwano Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/a1cc128e094db4ec141f85bd380127598dfef17e.1680760742.git.Takahiro.Kuwano@infineon.com Signed-off-by: Tudor Ambarus commit 9fd0945fe6fadfb6b54a9cd73be101c02b3e8134 Author: Takahiro Kuwano Date: Thu Apr 6 15:17:44 2023 +0900 mtd: spi-nor: spansion: Enable JFFS2 write buffer for Infineon s28hx SEMPER flash Infineon(Cypress) SEMPER NOR flash family has on-die ECC and its program granularity is 16-byte ECC data unit size. JFFS2 supports write buffer mode for ECC'd NOR flash. Provide a way to clear the MTD_BIT_WRITEABLE flag in order to enable JFFS2 write buffer mode support. A new SNOR_F_ECC flag is introduced to determine if the part has on-die ECC and if it has, MTD_BIT_WRITEABLE is unset. In vendor specific driver, a common cypress_nor_ecc_init() helper is added. This helper takes care for ECC related initialization for SEMPER flash family by setting up params->writesize and SNOR_F_ECC. Fixes: c3266af101f2 ("mtd: spi-nor: spansion: add support for Cypress Semper flash") Suggested-by: Tudor Ambarus Signed-off-by: Takahiro Kuwano Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/d586723f6f12aaff44fbcd7b51e674b47ed554ed.1680760742.git.Takahiro.Kuwano@infineon.com Signed-off-by: Tudor Ambarus commit 3ed2b549b39f57239aad50a255ece353997183fd Author: Oswald Buddenhagen Date: Wed Apr 5 22:12:19 2023 +0200 ALSA: pcm: fix wait_time calculations ... in wait_for_avail() and snd_pcm_drain(). t was calculated in seconds, so it would be pretty much always zero, to be subsequently de-facto ignored due to being max(t, 10)'d. And then it (i.e., 10) would be treated as secs, which doesn't seem right. However, fixing it to properly calculate msecs would potentially cause timeouts when using twice the period size for the default timeout (which seems reasonable to me), so instead use the buffer size plus 10 percent to be on the safe side ... but that still seems insufficient, presumably because the hardware typically needs a moment to fire up. To compensate for this, we up the minimal timeout to 100ms, which is still two orders of magnitude less than the bogus minimum. substream->wait_time was also misinterpreted as jiffies, despite being documented as being in msecs. Only the soc/sof driver sets it - to 500, which looks very much like msecs were intended. Speaking of which, shouldn't snd_pcm_drain() also use substream-> wait_time? As a drive-by, make the debug messages on timeout less confusing. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230405201219.2197774-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 48b7ea1d22ddf657e2692fb2b399138a02d31c17 Author: Eric Dumazet Date: Thu Apr 6 19:46:34 2023 +0000 net: make SO_BUSY_POLL available to all users After commit 217f69743681 ("net: busy-poll: allow preemption in sk_busy_loop()"), a thread willing to use busy polling is not hurting other threads anymore in a non preempt kernel. I think it is safe to remove CAP_NET_ADMIN check. Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20230406194634.1804691-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 039a692ad93e5d2f7327a26ba19cf37b1d763788 Merge: 07e75db6b1b2e 51fe084b17e79 Author: Jakub Kicinski Date: Fri Apr 7 20:06:05 2023 -0700 Merge branch 'net-stmmac-dwmac-anarion-address-issues-flagged-by-sparse' Simon Horman says: ==================== net: stmmac: dwmac-anarion: address issues flagged by sparse Two minor enhancements to dwmac-anarion to address issues flagged by sparse. 1. Always return struct anarion_gmac * from anarion_config_dt() 2. Add __iomem annotation to register base No functional change intended. Compile tested only. ==================== Link: https://lore.kernel.org/r/20230406-dwmac-anarion-sparse-v1-0-b0c866c8be9d@kernel.org Signed-off-by: Jakub Kicinski commit 51fe084b17e795f0315d787077510364172cc350 Author: Simon Horman Date: Thu Apr 6 19:30:10 2023 +0200 net: stmmac: dwmac-anarion: Always return struct anarion_gmac * from anarion_config_dt() Always return struct anarion_gmac * from anarion_config_dt(). In the case where ctl_block was an error pointer it was being returned directly. Which sparse flags as follows: .../dwmac-anarion.c:73:24: warning: incorrect type in return expression (different address spaces) .../dwmac-anarion.c:73:24: expected struct anarion_gmac * .../dwmac-anarion.c:73:24: got void [noderef] __iomem *[assigned] ctl_block Avoid this by converting the error pointer to an error. And then reversing the conversion. As a side effect, the error can be used for logging purposes, subjectively, leading to a minor cleanup. No functional change intended. Compile tested only. Signed-off-by: Simon Horman Signed-off-by: Jakub Kicinski commit 9f12541d684b9250ed14bfca2cc1b106db1c0e74 Author: Simon Horman Date: Thu Apr 6 19:30:09 2023 +0200 net: stmmac: dwmac-anarion: Use annotation __iomem for register base Use __iomem annotation the register base: the ctl_block field of struct anarion_gmac. I believe this is the normal practice for such variables. By doing so some casting is avoided. And sparse no longer reports: .../dwmac-anarion.c:29:23: warning: incorrect type in argument 1 (different address spaces) .../dwmac-anarion.c:29:23: expected void const volatile [noderef] __iomem *addr .../dwmac-anarion.c:29:23: got void * .../dwmac-anarion.c:34:22: warning: incorrect type in argument 2 (different address spaces) .../dwmac-anarion.c:34:22: expected void volatile [noderef] __iomem *addr .../dwmac-anarion.c:34:22: got void * No functional change intended. Compile tested only. Signed-off-by: Simon Horman Signed-off-by: Jakub Kicinski commit 07e75db6b1b2e96f2cb727c2d2f64c8ed36de5dc Author: Vladimir Oltean Date: Thu Apr 6 15:54:12 2023 +0300 net: stmmac: remove set but unused mask in stmmac_ethtool_set_link_ksettings() This was never used since the commit that added it - e58bb43f5e43 ("stmmac: initial support to manage pcs modes"). Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230406125412.48790-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 4bcdfc3ab217b2e1d1ea89ac00870b6bb247e183 Merge: 9ba3b26c0c96e b2f7b01d36a9b Author: Jakub Kicinski Date: Fri Apr 7 19:50:32 2023 -0700 Merge tag 'ipsec-esn-replay' of https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Leon Romanovsky says: ==================== Improve IPsec limits, ESN and replay window This series overcomes existing hardware limitations in Mellanox ConnectX devices around handling IPsec soft and hard limits. In addition, the ESN logic is tied and added an interface to configure replay window sequence numbers through existing iproute2 interface. ip xfrm state ... [ replay-seq SEQ ] [ replay-oseq SEQ ] [ replay-seq-hi SEQ ] [ replay-oseq-hi SEQ ] Link: https://lore.kernel.org/all/cover.1680162300.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky * tag 'ipsec-esn-replay' of https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: net/mlx5e: Simulate missing IPsec TX limits hardware functionality net/mlx5e: Generalize IPsec work structs net/mlx5e: Reduce contention in IPsec workqueue net/mlx5e: Set IPsec replay sequence numbers net/mlx5e: Remove ESN callbacks if it is not supported xfrm: don't require advance ESN callback for packet offload net/mlx5e: Overcome slow response for first IPsec ASO WQE net/mlx5e: Add SW implementation to support IPsec 64 bit soft and hard limits net/mlx5e: Prevent zero IPsec soft/hard limits net/mlx5e: Factor out IPsec ASO update function ==================== Link: https://lore.kernel.org/r/20230406071902.712388-1-leon@kernel.org Signed-off-by: Jakub Kicinski commit 9ba3b26c0c96ec92a7694446a54c108f923ef6c1 Merge: e28531143b257 8e672b560e0b5 Author: Jakub Kicinski Date: Fri Apr 7 19:46:17 2023 -0700 Merge branch 'add-support-for-j784s4-cpsw9g' Siddharth Vadapalli says: ==================== Add support for J784S4 CPSW9G This series adds a new compatible to am65-cpsw driver for the CPSW9G instance of the CPSW Ethernet Switch on TI's J784S4 SoC which has 8 external ports and 1 internal host port. The CPSW9G instance supports QSGMII and USXGMII modes for which driver support is added. Additionally, the interface mode specific configurations are moved to the am65_cpsw_nuss_mac_config() callback. Also, a TODO comment is added for verifying whether in-band mode is necessary for 10 Mbps RGMII mode. NOTE: I have verified that the mac_config() operations are preserved across link up and link down events for SGMII and USXGMII mode with the new implementation in this series, as suggested by: Russell King For patches 1 and 3 of this series, I believe that the following tag: Suggested-by: Russell King should be added. However, I did not add it since I did not yet get the permission to do so. I will be happy if the tags are added, since the new implementation is almost entirely based on Russell's suggestion, with minor changes made by me. v2: https://lore.kernel.org/r/20230403110106.983994-1-s-vadapalli@ti.com/ v1: https://lore.kernel.org/r/20230331065110.604516-1-s-vadapalli@ti.com/ ==================== Link: https://lore.kernel.org/r/20230404061459.1100519-1-s-vadapalli@ti.com Signed-off-by: Jakub Kicinski commit 8e672b560e0b52ab9497fa48f361d5c174937a3e Author: Siddharth Vadapalli Date: Tue Apr 4 11:44:59 2023 +0530 net: ethernet: ti: am65-cpsw: Enable USXGMII mode for J784S4 CPSW9G TI's J784S4 SoC supports USXGMII mode. Add USXGMII mode to the extra_modes member of the J784S4 SoC data. Configure MAC control register for supporting USXGMII mode and add MAC_5000FD in the "mac_capabilities" member of struct "phylink_config". Signed-off-by: Siddharth Vadapalli Signed-off-by: Jakub Kicinski commit 4e003d61e79504532babfb1d4e6b0767b32739d1 Author: Siddharth Vadapalli Date: Tue Apr 4 11:44:58 2023 +0530 net: ethernet: ti: am65-cpsw: Enable QSGMII for J784S4 CPSW9G TI's J784S4 SoC supports QSGMII mode with the CPSW9G instance of the CPSW Ethernet Switch. Add a new compatible for J784S4 SoC and enable QSGMII support for it by adding QSGMII mode to the extra_modes member of the "j784s4_cpswxg_pdata" SoC data. Signed-off-by: Siddharth Vadapalli Reviewed-by: Roger Quadros Signed-off-by: Jakub Kicinski commit ce639b767139b27500fa5bc3f8d7126b18d0d310 Author: Siddharth Vadapalli Date: Tue Apr 4 11:44:57 2023 +0530 net: ethernet: ti: am65-cpsw: Move mode specific config to mac_config() Move the interface mode specific configuration to the mac_config() callback am65_cpsw_nuss_mac_config(). Also, do not reset the MAC Control register on mac_link_down(). Only clear those bits that can possibly be set in mac_link_up(). Let the MAC remain in IDLE state after mac_link_down(). Bring it out of the IDLE state on mac_link_up(). Signed-off-by: Siddharth Vadapalli Signed-off-by: Jakub Kicinski commit 61b006389bb7af6da29be4b1c2b93708ffe383a4 Author: Krzysztof Kozlowski Date: Wed Apr 5 08:11:29 2023 +0200 arm64: dts: qcom: sm8550: add Soundwire controllers Add nodes for LPASS Soundwire v2.0.0 controllers. Use labels with indices matching downstream DTS, to make any comparisons easier. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230405061129.143553-1-krzysztof.kozlowski@linaro.org commit 2a50d1a038be17972220a810c28e9b777cdfcb22 Author: Konrad Dybcio Date: Fri Mar 31 03:14:53 2023 +0200 arm64: dts: qcom: sm8250: Add GPU speedbin support SM8250 has (at least) four GPU speed bins. With the support added on the driver side, wire up bin detection in the DTS to restrict lower-quality SKUs from running at frequencies they were not validated at. Tested-by: Marijn Suijten # On Sony Xperia 5 II (speed bin 0x7) Reviewed-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230331-topic-konahana_speedbin-v3-5-2dede22dd7f7@linaro.org commit b53ae6b63181f4575fc62cd0efb341c8151b0a74 Author: Konrad Dybcio Date: Fri Mar 31 03:14:52 2023 +0200 arm64: dts: qcom: sm8150: Add GPU speedbin support SM8150 has (at least) two GPU speed bins. With the support added on the driver side, wire up bin detection in the DTS to restrict lower-quality SKUs from running at frequencies they were not validated at. Tested-by: Marijn Suijten # On Sony Xperia 5 (speed bin 0x3) Reviewed-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230331-topic-konahana_speedbin-v3-4-2dede22dd7f7@linaro.org commit 1642ab96efa427f88e8a54c11b01b1b333ce58bd Author: Konrad Dybcio Date: Fri Mar 31 03:14:51 2023 +0200 arm64: dts: qcom: sm8150: Don't start Adreno in headless mode Now that there's display support, there is no reason to assume the default mode for Adreno should be headless. Keep it like that for boards that previously enabled it, so as not to create regressions though. Tested-by: Marijn Suijten # On Sony Xperia 5 Reviewed-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230331-topic-konahana_speedbin-v3-3-2dede22dd7f7@linaro.org commit 23fbf5339d4b18858bcd38811c0eb96df00e8289 Author: Manivannan Sadhasivam Date: Fri Mar 31 20:29:15 2023 +0530 ARM: dts: qcom: sdx55-fn980: Move "status" property to the end of node To align with rest of the devicetree files, let's move the "status" property to the end of the nodes. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230331145915.11653-2-manivannan.sadhasivam@linaro.org commit a6d1d862638b51f2a874948f75fd7284d066f900 Author: Manivannan Sadhasivam Date: Fri Mar 31 20:29:14 2023 +0530 ARM: dts: qcom: sdx55: Move reset and wake gpios to board dts The reset and wake properties in the PCIe EP node belong to the board dts as they can be customized per board design. So let's move them from SoC dtsi. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230331145915.11653-1-manivannan.sadhasivam@linaro.org commit f1d33c902a1be727416fce3161db37a84d3f38d1 Author: Kathiravan T Date: Thu Mar 23 15:01:20 2023 +0530 arm64: dts: qcom: ipq5332: add support for the RDP468 variant Add the initial device tree support for the Reference Design Platform(RDP) 468 based on IPQ5332 family of SoCs. This patch carries the support for Console UART, SPI NOR, eMMC. Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323093120.20558-3-quic_kathirav@quicinc.com commit f6b161efbb456b11731a4afa330c82223e883832 Author: Kathiravan T Date: Thu Mar 23 15:01:19 2023 +0530 dt-bindings: arm: qcom: document MI01.6 board based on IPQ5332 family Document the MI01.6 (Reference Design Platform 468) board based on IPQ5332 family of SoCs. Signed-off-by: Kathiravan T Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323093120.20558-2-quic_kathirav@quicinc.com commit a9e76cf1146b4911b14c102f5237e28abbbccfef Author: Krzysztof Kozlowski Date: Fri Apr 7 21:26:05 2023 +0200 arm64: dts: qcom: sdm630: move DSI opp-table out of DSI node The DSI OPP table on SDM630 is used by one DSI0, but on SDM660 is shared by two nodes (DSI0 and DSI1), thus it should be rather in top-level, not in DSI0. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407192605.168666-1-krzysztof.kozlowski@linaro.org commit 137e5c267232c89b2284ea44229545d4820bcb26 Author: Konrad Dybcio Date: Fri Apr 7 21:54:44 2023 +0200 arm64: dts: qcom: sm6115p-j606f: Enable ATH10K WiFi Enable the onboard QCA Wi-Fi. HW identifiers for reference: qmi chip_id 0x320 chip_family 0x4001 board_id 0xff soc_id 0x400e0000 Firmware sources: /vendor/firmware_mnt/image/wlanmdsp.bin -> qcom/.../wlanmdsp.mbn /vendor/firmware_mnt/image/bdwlan.bXX [1] -> [2] -> ath10k/.../board-2.bin [3] -> ath10k/.../firmware-5.bin Not sure where 3 comes from on the device itself, gotta investigate that.. According to [4], it's called WCN3990_STRAIT. [1] XX = board_id printed when the file is missing or by your downstream kernel firmware loader in the dmesg; if XX=ff, use bdwlan.bin [2] https://github.com/jhugo/linux/blob/5.5rc2_wifi/README [3] https://github.com/kvalo/ath10k-firmware/blob/master/WCN3990/hw1.0/HL3.1/WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1/firmware-5.bin [4] https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn/-/blob/LA.VENDOR.1.0.r1-20700-WAIPIO.QSSI13.0/hif/src/hif_hw_version.h#L55 Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230406-topic-lenovo_features-v2-4-625d7cb4a944@linaro.org commit 7584284537c2a82227ed2ea359b2c53f28e6abbf Author: Konrad Dybcio Date: Fri Apr 7 21:54:43 2023 +0200 arm64: dts: qcom: sm6115p-j606f: Enable remoteprocs Enable the [AC]DSP and MPSS and specify the firmware paths. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230406-topic-lenovo_features-v2-3-625d7cb4a944@linaro.org commit ecc61a207d0fad45ba991e0ce0273382b20bb226 Author: Konrad Dybcio Date: Fri Apr 7 21:54:42 2023 +0200 arm64: dts: qcom: sm6115: Add RMTFS Add a node for RMTFS and associate it with MSA and NAV IDs to enable modem functionality on SM6115. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230406-topic-lenovo_features-v2-2-625d7cb4a944@linaro.org commit 8b0ac59c2da69aaf8e65c6bd648a06b755975302 Author: Konrad Dybcio Date: Fri Apr 7 21:54:41 2023 +0200 arm64: dts: qcom: sm6115-j606f: Add ramoops node Add a ramoops node to enable retrieving crash logs. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230406-topic-lenovo_features-v2-1-625d7cb4a944@linaro.org commit 774820b362b07b903354470f9372d528b327a3e5 Author: Bjorn Helgaas Date: Fri Apr 7 12:19:46 2023 -0500 PCI/EDR: Add edr_handle_event() comments EDR documentation is a bit sketchy. Add a couple comments to edr_handle_event() about the devices involved. Link: https://lore.kernel.org/r/20230407215259.GA3825733@bhelgaas Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan commit 5855b0999de4213bf51d856a345c4b53f2304e33 Author: Eduard Zingerman Date: Fri Apr 7 18:41:25 2023 +0300 selftests/bpf: Prevent infinite loop in veristat when base file is too short The following example forces veristat to loop indefinitely: $ cat two-ok file_name,prog_name,verdict,total_states file-a,a,success,12 file-b,b,success,67 $ cat add-failure file_name,prog_name,verdict,total_states file-a,a,success,12 file-b,b,success,67 file-b,c,failure,32 $ veristat -C two-ok add-failure The loop is caused by handle_comparison_mode() not checking if `base` variable points to `fallback_stats` prior advancing joined results using `base`. Signed-off-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230407154125.896927-1-eddyz87@gmail.com commit baba1315a74d12772d4940a05d58dc03e6ec0635 Author: Chris Morgan Date: Fri Apr 7 11:18:27 2023 -0500 power: supply: rk817: Fix low SOC bugs When the SOC approaches zero, an integer overflows in the columb counter causing the driver to react poorly. This makes the driver think it's at (above) the fully charged capacity when in fact it's zero. It would then write this full capacity to NVRAM which would be used on boot if the device remained off for less than 5 hours and not plugged in. This can be fixed and guarded against by doing the following: - Changing the type of tmp in rk817_read_or_set_full_charge_on_boot() to be an int instead of a u32. That way we can account for negative numbers. - Guard against negative values for the full charge on boot by setting the charge to 0 if the system charge reports less than 0. - Catch scenarios where the battery voltage is below the design minimum voltage and set the system SOC to 0 at that time and update the columb counter with a charge level of 0. - Change the off time value from 5 hours to 30 minutes before we recalculate the current capacity based on the OCV tables. These changes allow the driver to operate better at low voltage/low capacity conditions. Fixes: 3268a4d9b0b8 ("power: supply: rk817: Fix unsigned comparison with less than zero") Fixes: 11cb8da0189b ("power: supply: Add charger driver for Rockchip RK817") Signed-off-by: Chris Morgan Signed-off-by: Sebastian Reichel commit b24f0b049e706c6fc6e822dfc519ee33c3865092 Author: Wei Yongjun Date: Fri Apr 7 08:14:26 2023 +0000 bpftool: Set program type only if it differs from the desired one After commit d6e6286a12e7 ("libbpf: disassociate section handler on explicit bpf_program__set_type() call"), bpf_program__set_type() will force cleanup the program's SEC() definition, this commit fixed the test helper but missed the bpftool, which leads to bpftool prog autoattach broken as follows: $ bpftool prog load spi-xfer-r1v1.o /sys/fs/bpf/test autoattach Program spi_xfer_r1v1 does not support autoattach, falling back to pinning This patch fix bpftool to set program type only if it differs. Fixes: d6e6286a12e7 ("libbpf: disassociate section handler on explicit bpf_program__set_type() call") Signed-off-by: Wei Yongjun Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230407081427.2621590-1-weiyongjun@huaweicloud.com commit 3ebf5212bf042954666b19fe4ff5a98911b08128 Author: Song Liu Date: Fri Apr 7 12:01:30 2023 -0700 selftests/bpf: Use PERF_COUNT_HW_CPU_CYCLES event for get_branch_snapshot perf_event with type=PERF_TYPE_RAW and config=0x1b00 turned out to be not reliable in ensuring LBR is active. Thus, test_progs:get_branch_snapshot is not reliable in some systems. Replace it with PERF_COUNT_HW_CPU_CYCLES event, which gives more consistent results. Signed-off-by: Song Liu Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20230407190130.2093736-1-song@kernel.org commit 528bd42615f4bb564613cc76dead90d7fbae76ba Author: Chris Morgan Date: Fri Apr 7 11:18:26 2023 -0500 power: supply: rk817: Drop unneeded debugging code Some code was left over from debugging the driver while it was in development. Remove this code as it's not needed. Signed-off-by: Chris Morgan Signed-off-by: Sebastian Reichel commit 12752b5db5196208a81695a75bfc933f14aae8fb Merge: ce38f3fc0f87a 06615d11cc781 Author: Sebastian Reichel Date: Sat Apr 8 00:16:01 2023 +0200 Merge tag 'for-v6.3-rc' Merge the 6.3 power-supply fixes branch, which is required for further cleanups in the rk817 driver. Signed-off-by: Sebastian Reichel commit c441b1e03da6c680a3e12da59c554f454f2ccf5e Author: Kuppuswamy Sathyanarayanan Date: Wed Mar 15 16:54:49 2023 -0700 PCI/EDR: Clear Device Status after EDR error recovery During EDR recovery, the OS must clear error status of the port that triggered DPC even if firmware retains control of DPC and AER (see the implementation note in the PCI Firmware spec r3.3, sec 4.6.12). Prior to 068c29a248b6 ("PCI/ERR: Clear PCIe Device Status errors only if OS owns AER"), the port Device Status was cleared in this path: edr_handle_event dpc_process_error(dev) # "dev" triggered DPC pcie_do_recovery(dev, dpc_reset_link) dpc_reset_link # exit DPC pcie_clear_device_status(dev) # clear Device Status After 068c29a248b6, pcie_do_recovery() no longer clears Device Status when firmware controls AER, so the error bit remains set even after recovery. Per the "Downstream Port Containment configuration control" bit in the returned _OSC Control Field (sec 4.5.1), the OS is allowed to clear error status until it evaluates _OST, so clear Device Status in edr_handle_event() if the error recovery was successful. [bhelgaas: commit log] Fixes: 068c29a248b6 ("PCI/ERR: Clear PCIe Device Status errors only if OS owns AER") Link: https://lore.kernel.org/r/20230315235449.1279209-1-sathyanarayanan.kuppuswamy@linux.intel.com Reported-by: Tsaur Erwin Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bjorn Helgaas commit 72a31ff9d71c69ed787b8276bfd033065aae4f89 Author: Bjorn Helgaas Date: Tue Mar 7 14:33:56 2023 -0600 efi/cper: Remove unnecessary aer.h include is unused, so remove it. Link: https://lore.kernel.org/r/20230307203356.882479-1-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Acked-by: Ard Biesheuvel commit d4a7e17f402de8ebdbae4844b011a5b18f93e341 Author: Krzysztof Kozlowski Date: Fri Mar 24 21:22:40 2023 +0100 arm64: dts: qcom: msm8916-thwc-ufi001c: add function to pin config Bindings require pin configuration nodes to have the function, even if it is GPIO: msm8916-thwc-ufi001c.dtb: pinctrl@1000000: sim-ctrl-default-state: 'oneOf' conditional failed, one must be fixed: 'esim-sel-pins', 'sim-en-pins', 'sim-sel-pins' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230324202244.744271-1-krzysztof.kozlowski@linaro.org commit f6ff91a47ac57cb1118d94020302617b6b22c0d1 Author: Abel Vesa Date: Fri Apr 7 13:50:24 2023 +0300 dt-bindings: crypto: Add Qualcomm Inline Crypto Engine Add schema file for new Qualcomm Inline Crypto Engine driver. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Reviewed-by: Eric Biggers Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407105029.2274111-2-abel.vesa@linaro.org commit b8630c48b43fcf77039c04a1d30153e283cf41b4 Author: Abel Vesa Date: Fri Apr 7 13:50:29 2023 +0300 arm64: dts: qcom: sm8550: Add the Inline Crypto Engine node Add support for UFS ICE by adding the qcom,ice property and the ICE dedicated devicetree node. Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407105029.2274111-7-abel.vesa@linaro.org commit 1f2aa2ff2f5eac9c06fb5730b53f7c92270401d4 Merge: 1ad3efe52cd10 2afbf43a4aec6 Author: Bjorn Andersson Date: Fri Apr 7 12:12:27 2023 -0700 Merge tag '20230407105029.2274111-4-abel.vesa@linaro.org' into drivers-for-6.4 The dedicated ICE driver was merged through a immutable tag, to make it available to other maintainers. commit 2afbf43a4aec6e31dac7835e65d52c867f2be400 Author: Abel Vesa Date: Fri Apr 7 13:50:26 2023 +0300 soc: qcom: Make the Qualcomm UFS/SDCC ICE a dedicated driver This takes the already existing duplicated support in both ufs-qcom and sdhci-msm drivers and makes it a dedicated driver that can be used by both mentioned drivers. The reason for this is because, staring with SM8550, the ICE IP block is shared between UFS and SDCC, which means we need to probe a dedicated device and share it between those two consumers. So let's add the ICE dedicated driver as a soc driver. Platforms that already have ICE supported, will use it as a library as the of_qcom_ice_get will return an ICE instance created for the consumer device. This allows the backwards compatibility with old-style devicetree approach. Also, add support to HW version 4.x since it works out-of-the-box with the current driver. The 4.x HW version is found on SM8550 platform. Signed-off-by: Abel Vesa Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407105029.2274111-4-abel.vesa@linaro.org commit e58d100fa24309291ec500f9d161ff1ade20cabd Author: Adam Skladowski Date: Fri Apr 7 18:53:44 2023 +0200 arm64: dts: MSM8953: Add lpass nodes Add nodes for remoteproc, smp2p and smsm in preparation for audio support on this platform. Signed-off-by: Adam Skladowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407165345.42800-4-a39.skl@gmail.com commit 2bbada24e8a6c9eaf5caf015688dba0dcc3925d7 Author: Adam Skladowski Date: Fri Apr 7 18:53:43 2023 +0200 arm64: dts: MSM8953: Add mpss nodes Add nodes for remoteproc, smp2p and smsm to make it possible to use modem functionality on this platform. Signed-off-by: Adam Skladowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407165345.42800-3-a39.skl@gmail.com commit b12428640ebeea3ee7e7ae817e1bd345612537df Author: Adam Skladowski Date: Fri Apr 7 18:53:42 2023 +0200 arm64: dts: MSM8953: Add wcnss nodes Add nodes for remoteproc, smp2p and smsm to make it possible to use wifi/bt functionality on this platform. Signed-off-by: Adam Skladowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407165345.42800-2-a39.skl@gmail.com commit a72768eecb9d98ed5b5f75f5be02a365b5541456 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:06:55 2023 +0200 arm64: dts: qcom: sm8350: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407180655.128771-2-krzysztof.kozlowski@linaro.org commit 087fc87e1882a44637a48cc537b49df9bec91780 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:06:54 2023 +0200 arm64: dts: qcom: sm8150: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407180655.128771-1-krzysztof.kozlowski@linaro.org commit 8624e6063cb15cc7ceeee6d54fc1761ab3d0baf7 Author: Krzysztof Kozlowski Date: Fri Apr 7 20:00:45 2023 +0200 arm64: dts: qcom: apq8016: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Cc: Douglas Anderson Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407180045.126952-1-krzysztof.kozlowski@linaro.org commit 47ce7e168486de0a581f5903e72ba2cbc68123ec Author: Krzysztof Kozlowski Date: Fri Apr 7 20:07:10 2023 +0200 arm64: dts: qcom: sc8280xp-lenovo-thinkpad: correct pin drive-strength Fix typo in drive-strength property name. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407180710.128815-1-krzysztof.kozlowski@linaro.org commit 536ba6c48d8e1a47d688326dfbd04ab37a6eb8dc Author: Krzysztof Kozlowski Date: Fri Apr 7 20:15:41 2023 +0200 arm64: dts: qcom: sc8280xp-crd: correct pin drive-strength Fix typo in drive-strength property name. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407181541.139349-1-krzysztof.kozlowski@linaro.org commit d1333bce9e019f1e529a8f1c83f4e2a1a8612bbf Author: Krzysztof Kozlowski Date: Fri Apr 7 19:58:07 2023 +0200 arm64: dts: qcom: sm8450: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407175807.124394-10-krzysztof.kozlowski@linaro.org commit 5a5fd14b22881d60911541750a4d6f66e501ea6e Author: Krzysztof Kozlowski Date: Fri Apr 7 19:58:06 2023 +0200 arm64: dts: qcom: sm8250: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407175807.124394-9-krzysztof.kozlowski@linaro.org commit a3752cc30e1557a7c5bbd5bda8ccd91dba0f3a06 Author: Krzysztof Kozlowski Date: Fri Apr 7 19:58:05 2023 +0200 arm64: dts: qcom: sm6350: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407175807.124394-8-krzysztof.kozlowski@linaro.org commit 36f038ad3a0779b58c2fea6b1b1df18d12d6c06d Author: Krzysztof Kozlowski Date: Fri Apr 7 19:58:04 2023 +0200 arm64: dts: qcom: sm6125: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407175807.124394-7-krzysztof.kozlowski@linaro.org commit 2ee8a1525223af4d691aaa620e2d88d4ee2266c7 Author: Krzysztof Kozlowski Date: Fri Apr 7 19:58:03 2023 +0200 arm64: dts: qcom: sdm845: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407175807.124394-6-krzysztof.kozlowski@linaro.org commit 87e1f7b1a041a37390bf4fa7913683fb4f8d00d8 Author: Krzysztof Kozlowski Date: Fri Apr 7 19:58:02 2023 +0200 arm64: dts: qcom: sc8280xp: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407175807.124394-5-krzysztof.kozlowski@linaro.org commit 8b58f799056b561e349bb56014f87a71ae517d10 Author: Krzysztof Kozlowski Date: Fri Apr 7 19:58:01 2023 +0200 arm64: dts: qcom: qcs404: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407175807.124394-4-krzysztof.kozlowski@linaro.org commit ecdc2fe1204ff515f59385a87994ea17a8d0d6c4 Author: Krzysztof Kozlowski Date: Fri Apr 7 19:58:00 2023 +0200 arm64: dts: qcom: msm8998: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407175807.124394-3-krzysztof.kozlowski@linaro.org commit 8db80be2af20ccdfca2c8d3a2adaf60621c2f34e Author: Krzysztof Kozlowski Date: Fri Apr 7 19:57:59 2023 +0200 arm64: dts: qcom: msm8996: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407175807.124394-2-krzysztof.kozlowski@linaro.org commit e10121114e8fe10067c4c4dd1eb1241bd30c2bb3 Author: Krzysztof Kozlowski Date: Fri Apr 7 19:57:58 2023 +0200 arm64: dts: qcom: msm8994: remove superfluous "input-enable" Pin configuration property "input-enable" was used with the intention to disable the output, but this is done by default by Linux drivers. Since patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") the property is not accepted anymore. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407175807.124394-1-krzysztof.kozlowski@linaro.org commit b76c8ceabe871470cee17990289e8dd39b96054e Author: Lux Aliaga Date: Mon Mar 6 14:08:16 2023 -0300 arm64: dts: qcom: sm6125: Initial support for xiaomi-laurel-sprout Add support for the Xiaomi Mi A3 (xiaomi-laurel-sprout). Here's a summary on what's defined. - dmesg output to bootloader preconfigured display - USB - UFS - SD card - SMD RPM regulators - Volume Up, Down and Power buttons - Thermistors Signed-off-by: Lux Aliaga Reviewed-by: Konrad Dybcio Reviewed-by: Marijn Suijten Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230306170817.3806-7-they@mint.lgbt commit f8399e8a2f80adfac2e7f5dbe223eb428fdb6fe9 Author: Lux Aliaga Date: Mon Mar 6 14:08:14 2023 -0300 arm64: dts: qcom: sm6125: Add UFS nodes Adds a UFS host controller node and its corresponding PHY to the sm6125 platform. Signed-off-by: Lux Aliaga Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230306170817.3806-5-they@mint.lgbt commit 814e1461feb3491807668359bfbda14a324486c1 Author: Lux Aliaga Date: Mon Mar 6 14:08:15 2023 -0300 dt-bindings: arm: qcom: Document xiaomi,laurel-sprout board Document the Xiaomi Mi A3 (xiaomi-laurel-sprout) smartphone which is based on the Snapdragon 665 SoC. Signed-off-by: Lux Aliaga Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230306170817.3806-6-they@mint.lgbt commit 8a786036c7b682c4d77abf7f396b87bc7eec98f9 Author: Jianhua Lu Date: Thu Mar 23 08:59:25 2023 +0800 arm64: dts: qcom: sm8250-xiaomi-elish-csot: Add Xiaomi Mi Pad 5 Pro CSOT variant Add support for the Xiaomi Mi Pad 5 Pro CSOT variant. The CSOT variant uses China Star Optoelectronics Technology (CSOT) panel based on NT36523 display controller. Signed-off-by: Jianhua Lu Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323005925.23179-3-lujianhua000@gmail.com commit 51c4c2bd6f314de8b1bb7b5c949d2432be19d419 Author: Jianhua Lu Date: Thu Mar 23 08:59:24 2023 +0800 arm64: dts: qcom: sm8250-xiaomi-elish-boe: Add mdss and dsi panel Add nodes for BOE NT36523 panel found in xiaomi-elish. This panel is a dual dsi mode panel and the dsi phy type is cphy. Signed-off-by: Jianhua Lu Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323005925.23179-2-lujianhua000@gmail.com commit 68434024dae509455bdd2a9e321a2cf58a6d0a75 Author: Jianhua Lu Date: Thu Mar 23 08:59:23 2023 +0800 arm64: dts: qcom: Split elish dts into common dtsi and elish-boe dts There are two panel variants of xiaomi-elish, BOE and CSOT panels. In order to support both panels, so split elish dts into common dtsi and elish-boe dts. Signed-off-by: Jianhua Lu Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323005925.23179-1-lujianhua000@gmail.com commit 9b2e284a5dc2d23a7102ff87fac3aa9d6b88118e Author: Krzysztof Kozlowski Date: Wed Mar 22 18:41:48 2023 +0100 arm64: dts: qcom: sm8150: add compatible fallback to mailbox SC8150 mailbox is compatible with SDM845. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322174148.810938-12-krzysztof.kozlowski@linaro.org commit c1393bdf181143b21cb1ad8dbad6f3840b171855 Author: Krzysztof Kozlowski Date: Wed Mar 22 18:41:47 2023 +0100 arm64: dts: qcom: sc7180: add compatible fallback to mailbox SC7180 mailbox is compatible with SDM845. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322174148.810938-11-krzysztof.kozlowski@linaro.org commit 4c90ceae6ec093ee9a73a48c8dacaa6d1404770b Author: Krzysztof Kozlowski Date: Wed Mar 22 18:41:46 2023 +0100 arm64: dts: qcom: qcs404: add compatible fallback to mailbox QCS404 mailbox is compatible with MSM8916. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322174148.810938-10-krzysztof.kozlowski@linaro.org commit 61799f9d573fe31222b0224acbb545fae259366a Author: Krzysztof Kozlowski Date: Wed Mar 22 18:41:45 2023 +0100 arm64: dts: qcom: sm6125: add compatible fallback to mailbox SM6125 mailbox is compatible with MSM8994. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322174148.810938-9-krzysztof.kozlowski@linaro.org commit fb6198bb4980cd4a7a89affe6bef4e6e81e97316 Author: Krzysztof Kozlowski Date: Wed Mar 22 18:41:44 2023 +0100 arm64: dts: qcom: sm6115: add compatible fallback to mailbox SM6115 mailbox is compatible with MSM8994. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322174148.810938-8-krzysztof.kozlowski@linaro.org commit 2d034324fdba6555fb642b127167ae5ba0e30158 Author: Krzysztof Kozlowski Date: Wed Mar 22 18:41:43 2023 +0100 arm64: dts: qcom: sdm630: add compatible fallback to mailbox SDM630 mailbox is compatible with MSM8994. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322174148.810938-7-krzysztof.kozlowski@linaro.org commit 112f33b369e5e38119910a3365537bcc5d3d4135 Author: Krzysztof Kozlowski Date: Wed Mar 22 18:41:42 2023 +0100 arm64: dts: qcom: msm8998: add compatible fallback to mailbox MSM8998 mailbox is compatible with MSM8994. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322174148.810938-6-krzysztof.kozlowski@linaro.org commit 81cd4883b1a2d7c612df9f526598e6a841ab3881 Author: Krzysztof Kozlowski Date: Wed Mar 22 18:41:41 2023 +0100 arm64: dts: qcom: msm8976: add compatible fallback to mailbox MSM8976 mailbox is compatible with MSM8994. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322174148.810938-5-krzysztof.kozlowski@linaro.org commit d93bd4630ce163f3761aedc0b342b072bee6db6b Author: Krzysztof Kozlowski Date: Wed Mar 22 18:41:40 2023 +0100 arm64: dts: qcom: ipq8074: add compatible fallback to mailbox IPQ8074 mailbox is compatible with IPQ6018. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322174148.810938-4-krzysztof.kozlowski@linaro.org commit e18771961336647121c40cad4585caa794980887 Author: Konrad Dybcio Date: Wed Apr 5 17:50:34 2023 +0200 arm64: dts: qcom: Add initial QTI RB1 device tree Add an initial device tree for the QTI RB1 development board, based on the QRB2210 (QCM2290 derivative) SoC. This device tree targets the SoM revision 4, a.k.a. the Mass Production SKU. To get a successful boot, run: cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/qrb2210-rb1.dtb >\ .Image.gz-dtb mkbootimg \ --kernel .Image.gz-dtb \ --ramdisk some_initrd \ --output rb1-boot.img \ --pagesize 4096 \ --base 0x8000 \ --cmdline 'some cmdline' fastboot boot rb1-boot.img There's no dtbo or other craziness to worry about. For the best dev experience, you can erase boot and use fastboot boot everytime, so that the bootloader doesn't mess with you. If you have a SoM revision 3 or older (there should be a sticker on it with text like -r00, where r is the revision), you will need to apply this additional diff: aliases { - serial0 = &uart0; + serial0 = &uart4; /* UART connected to the Micro-USB port via a FTDI chip */ - &uart0 { + &uart4 { That should however only concern preproduction boards. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230403-topic-rb1_qcm-v2-5-dae06f8830dc@linaro.org commit c309b9a54039053892cc5417193e9f0089073ae3 Author: Konrad Dybcio Date: Wed Apr 5 17:50:33 2023 +0200 arm64: dts: qcom: Add initial PM2250 device tree Introduce an initial device tree for the PM2250 (sometimes known as PM4125) PMIC. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230403-topic-rb1_qcm-v2-4-dae06f8830dc@linaro.org commit a64a0192b70cfe7537072ae61a5e0d1d99f976bc Author: Konrad Dybcio Date: Wed Apr 5 17:50:32 2023 +0200 arm64: dts: qcom: Add initial QCM2290 device tree Add an initial device tree for the QCM2290 low-end SoC, featuring 4 "customized" Cortex-A53 cores and up to 4 GiB of LPDDR(3/4X). This revision brings support for: - TSENS & thermal zones - SDHCI1/2 - I2C, SPI, UART - MPSS - ADSP - Wi-Fi Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230403-topic-rb1_qcm-v2-3-dae06f8830dc@linaro.org commit 941a8a4505cd44e826536ce41ffb863196d68769 Author: Konrad Dybcio Date: Wed Apr 5 17:50:31 2023 +0200 dt-bindings: arm: qcom: Add QRB2210/QCM2290 and RB1 board Document QRB210, a QRB version of QCM2290. Document QTI Robotics RB1 as a QRB2210 device. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230403-topic-rb1_qcm-v2-2-dae06f8830dc@linaro.org commit 1ad3efe52cd10a94bdee63216cc5c09e813594ee Author: Konrad Dybcio Date: Wed Apr 5 17:50:30 2023 +0200 dt-bindings: firmware: document Qualcomm QCM2290 SCM Add a compatible for Qualcomm QCM2290 SCM and add it to the core clock users list. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230403-topic-rb1_qcm-v2-1-dae06f8830dc@linaro.org commit fbc3a1df2866608ca43e7e6d602f66208a5afd88 Author: Konrad Dybcio Date: Thu Apr 6 14:55:45 2023 +0200 arm64: dts: qcom: sdm845-polaris: Drop inexistent properties Drop the qcom,snoc-host-cap-skip-quirk that was never introduced to solve schema warnings. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230406-topic-ath10k_bindings-v3-2-00895afc7764@linaro.org commit be5418dfc1460e82a005dfb9dd76e4ef846c203d Author: Krzysztof Kozlowski Date: Fri Apr 7 19:00:32 2023 +0200 ASoC: dt-bindings: asahi-kasei,ak4458: fix missing quotes around hash The yamllint expect comments to start with hash and space ('# '), so quote the description to fix: asahi-kasei,ak4458.yaml:40:30: [error] missing starting space in comment (comments) Reported-by: Rob Herring Closes: https://lore.kernel.org/all/CAL_JsqJzxQb1g=yVgHduLnYOpk8-Q3jppA1qQT1Ce51_gNWjhg@mail.gmail.com/ Fixes: 009e83b591dd ("ASoC: dt-bindings: ak4458: Convert to dtschema") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230407170032.102412-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 48bd05786ec72b991430d5493743293df5da56a8 Author: Dylan Van Assche Date: Thu Apr 6 19:31:48 2023 +0200 arm64: dts: qcom: sdm845-shift-axolotl: enable SLPI Enable the SLPI DSP on the SHIFTPHONES SHIFT6mq phone with a Qualcomm SDM845 SoC. Signed-off-by: Dylan Van Assche Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230406173148.28309-6-me@dylanvanassche.be commit c3998dc09f0e70c1e359b819b1b5d0c482f30500 Author: Dylan Van Assche Date: Thu Apr 6 19:31:47 2023 +0200 arm64: dts: qcom: sdm845-oneplus: enable SLPI Enable the SLPI DSP on the Oneplus 6 phone with a Qualcomm SDM845 SoC. Signed-off-by: Dylan Van Assche Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230406173148.28309-5-me@dylanvanassche.be commit 755b5e094feb974f65cc51371c3482042d5fbadc Author: Dylan Van Assche Date: Thu Apr 6 19:31:46 2023 +0200 arm64: dts: qcom: sdm845: add SLPI FastRPC support Qualcomm SDM845 SoC features a SLPI DSP which uses FastRPC through an allocated memory region to load files from the host filesystem such as sensor configuration files. Add a FastRPC node at /dev/fastrpc-sdsp and a DMA region, similar to downstream, to allow userspace to communicate with the SLPI via the FastRPC interface for initializing the sensors on the SLPI. Signed-off-by: Dylan Van Assche Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230406173148.28309-4-me@dylanvanassche.be commit 77c7a41e052502f0d8827c63eddae6dd5d717b20 Author: Dylan Van Assche Date: Thu Apr 6 19:31:45 2023 +0200 dt-bindings: firmware: qcom: scm: add SSC_Q6 and ADSP_Q6 VMIDs SSC_Q6 and ADSP_Q6 are used in the FastRPC driver for accessing the secure world. Signed-off-by: Dylan Van Assche Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230406173148.28309-3-me@dylanvanassche.be commit 74588aada59a9870139ef4c39d640939dcc08381 Author: Dylan Van Assche Date: Thu Apr 6 19:31:44 2023 +0200 arm64: dts: qcom: sdm845: add SLPI remoteproc Add the SLPI remoteproc to the SDM845 Qualcomm SoC which is responsible for exposing the sensors connected to the SoC. The SLPI communicates over GLink edge 'dsps' and is similar to other DSPs e.g. ADSP or CDSP. This patch allows the SLPI to boot and expose itself over QRTR as service 400. Signed-off-by: Dylan Van Assche Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230406173148.28309-2-me@dylanvanassche.be commit 27eba11291b0f9a8e9ca1f50ba0f6fd3fdda486b Author: Bartosz Golaszewski Date: Thu Apr 6 21:28:11 2023 +0200 arm64: dts: qcom: sa8775p-ride: add PMIC regulators Add PMIC regulators for sa8775p-ride. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230406192811.460888-4-brgl@bgdev.pl commit 149959d0b18113881cb0a47ad8f8d36b60ff6f9f Author: Konrad Dybcio Date: Fri Apr 7 15:28:36 2023 +0200 arm64: dts: qcom: sdm845-oneplus: Fix speaker GPIO node Drop the unnecessary mux{} level to make dtbs check happy. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407-topic-msm_dtb-v1-6-6efb4196f51f@linaro.org commit 7891372d6c5b3d73c304e26fa1e3b17c022281a1 Author: Konrad Dybcio Date: Fri Apr 7 15:28:35 2023 +0200 arm64: dts: qcom: pm8916: Fix pm8941-misc node name Fix the node name to make dtbs_check happy: qcom/apq8016-sbc.dtb: pmic@0: 'extcon@1300' does not match any of the regexes: '(.*)?(wled|leds)@[0-9a-f]+$', '^adc-tm@[0-9a-f]+$', '^adc@[0-9a-f]+$', '^audio-codec@[0-9a-f]+$', '^charger@[0-9a-f]+$', '^mpps@[0-9a-f]+$', '^nvram@[0-9a-f]+$', '^rtc@[0-9a-f]+$', '^temp-alarm@[0-9a-f]+$', '^usb-detect@[0-9a-f]+$', '^usb-vbus-regulator@[0-9a-f]+$', '^vibrator@[0-9a-f]+$', 'gpio@[0-9a-f]+$', 'pinctrl-[0-9]+', 'pon@[0-9a-f]+$' Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407-topic-msm_dtb-v1-5-6efb4196f51f@linaro.org commit 04b5840664822cefff61deb727f497b59c341e0e Author: Konrad Dybcio Date: Fri Apr 7 15:28:34 2023 +0200 arm64: dts: qcom: sc7280: Fix up the gic node Fix the following schema warning: gic-its@17a40000: False schema does not allow {'compatible': ['arm,gic-v3-its'], 'msi-controller': True, '#msi-cells': [[1]], 'reg': [[0, 396623872, 0, 131072]], 'status': ['disabled']} And reorder the properties to be more in order with all other nodes. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230407-topic-msm_dtb-v1-4-6efb4196f51f@linaro.org commit 9f5cdeb7031062a36e135ebb88bd99c03f32e5ee Author: Douglas Anderson Date: Thu Mar 23 10:30:18 2023 -0700 arm64: dts: qcom: sdm845: Fix cheza qspi pin config Cheza's SPI flash hookups (qspi) are exactly the same as trogdor's. Apply the same solution that's described in the patch ("arm64: dts: qcom: sc7180: Fix trogdor qspi pin config") Signed-off-by: Douglas Anderson Acked-by: Linus Walleij Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323102605.14.I82951106ab8170f973a4c1c7d9b034655bbe2f60@changeid commit 5f89df31096d67c244d8f36502f651ce701ddcde Author: Douglas Anderson Date: Thu Mar 23 10:30:17 2023 -0700 arm64: dts: qcom: sc7280: Fix qspi pin config Similar to sc7180 (see the patch ("arm64: dts: qcom: sc7180: Fix trogdor qspi pin config")), we should adjust the qspi pin config for sc7280. I won't re-describe all the research/arguments in the sc7180 patch here, but there are a few differences for sc7280 worth noting: 1. On herobrine the SPI flash (qspi) is wired up differently on the board. Rather than Cr50 and the AP being wired directly together, there's actually a mux that will _either_ connect the AP to the flash or Cr50 to the flash. This means that the internal pulls on Cr50 don't affect us and we should enable our own pulldowns. 2. On herobrine, EEs added an external pulldown on the MISO line. The argument in the schematic said that we added it (but not one on MOSI and CLK) because Cr50 already enabled pulldowns on MOSI and CLK. ...though, as per #1, those Cr50 pulldowns would only affect the line when the mux was swung to Cr50. The ironic result of #1 and #2 is that the external pulldowns on CLK/MISO/MOSI on herobrine are _exactly opposite_ of the ones on trogdor. 3. While I still don't have the actual exact schematics for all variants of IDP/CRD that were produced, I have some reference schematics that give me a belief of how the qspi is hooked up there. From this, I'm fairly certain that all of the older variants of IDP/CRD either have a pulldown on the CLK/MOSI/MISO lines (maybe through a direct connect to Cr50) or have no pull (in other words, they don't have a pullup). I'll go ahead and enable internal pulldowns on all the lines since that won't hurt to double-pull if there's an external pulldown and it's nice to have a pulldown if there's nothing external. Note that this only affects _older_ CRDs. Newer revs are considered "herobrine" (see the hoglin/zoglin device trees). 4. I didn't find the same strange "auto-switch-to-keeper" at suspend when probing on sc7280. Whatever pulls (or lack thereof) I left at suspend time seemed to persist into suspend. Signed-off-by: Douglas Anderson Acked-by: Linus Walleij Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323102605.13.Ib44c3e417c414a4227db8def75ded37ad368212c@changeid commit ab752f03e2feb3323dfd9c1ce161ac759ce09634 Author: Douglas Anderson Date: Thu Mar 23 10:30:16 2023 -0700 arm64: dts: qcom: sc7180: Fix trogdor qspi pin config In commit 7ec3e67307f8 ("arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt") we specified the pull settings on the boot SPI (the qspi) data lines as pullups to "park" the lines. This seemed like the right thing to do, but I never really probed the lines to confirm. Since that time, I've done A LOT of research, experiements and poking of the lines with a voltmeter. A first batch of discoveries: - There is an external pullup on CS (clearly shown on schematics) - There are weak external pulldowns on CLK/MOSI (believed to be Cr50's internal pulldowns) - There is no pull on MISO. - When qspi isn't actively transferring it still drives CS, CLK, and MOSI. CS and MOSI are driven high and CLK is driven low. It does not drive MISO and (if no internal pulls are enabled) the line floats. The above means that it's good to have some sort of pull on MISO, at the very least. The pullup that we had before was actually fine (and my voltmeter confirms that it actually affected the state of the pin) but a pulldown would work equally well (and would match MOSI and CLK better). The above also means that we could save a tiny bit of power (not measurable by my setup) by setting up a sleep state for these pins. If nothing else this prevents us from driving high against Cr50's internal pulldown on MOSI. However, Qualcomm has also asserted in the past that it burns a little extra power to drive a pin, especially since these are configured with a slightly higher drive strength Let's fix all this. Since the external pulls are different for the two data lines, we'll split them into separate configs. Then we'll change the MISO pin to a pulldown and add a sleep state. On a slightly tangental (but not totally unrelated note), I also discovered some interesting things with these pins in suspend. First, I found that if we don't switch the pins to GPIO that the qspi peripheral continues to drive them in suspend. That'll be solved by what we're already doing above. Second, I found that something in the system suspend path (after Linux stops running) reconfigures these pins so that they don't have their normal pulls enabled but instead change to "keepers" (bias-bus-hold in DT speak). If a pin was floating before we entered suspend then it would stop floating. I found that I could manually pull a pin to a different level and then probe it and it would stay there. This is exactly keeper behavior. With the solution we have the switch to "keeper" doesn't matter too much but it's good to document. While talking about "keepers", it can also be noted that I found that the "keepers" on these pins were at least enough to win a fight against Cr50's internal pulls. That means it's best to make sure that the state of the pins are already correct before the mysterious transition to a keeper. Otherwise we'll burn (a small amount of) power in S3 via this fight. Luckily with the current solution we don't hit this case. NOTE: I've left "sc7180-idp" behavior totally alone in this patch. I didn't add a sleep state and I didn't change any pulls--I just adapted it to the fact that the data lines have separate configs. Qualcomm doesn't provide me with schematics for IDP and thus I don't actually know how the pulls are configured. Since this is just a development platform and worked well enough, it seems safer to leave it alone. Dependencies: - This patch has a hard dependency on ("pinctrl: qcom: Support OUTPUT_ENABLE; deprecate INPUT_ENABLE"). Something in the boot code seemed to have been confused and thought it needed to set the "OUTPUT ENABLE" bit for these pins even though it was using them as SPI. Thus if we don't honor the "output-disable" property we could end up driving the SPI pins while in sleep mode. - In general, it's probably best not to backport this to a kernel that doesn't have commit d21f4b7ffc22 ("pinctrl: qcom: Avoid glitching lines when we first mux to output"). That landed a while ago, but it's still good to be explicit in case someone was backporting. If we don't have that then there might be a glitch when we first switch over to GPIO before we disable the output. - This patch _doesn't_ really have any dependency on the qspi driver patch that supports setting the pinctrl sleep state--they can go in either order. If we define the sleep state and the driver never selects it that's fine. If the driver tries to select a sleep state that we don't define that's fine. Signed-off-by: Douglas Anderson Acked-by: Linus Walleij Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323102605.12.I6f03f86546e6ce9abb1d24fd9ece663c3a5b950c@changeid commit 406fed87083578d07c7cea9483b85b51469594e0 Author: Douglas Anderson Date: Thu Mar 23 10:30:15 2023 -0700 arm64: dts: qcom: sdm845: Remove superfluous "input-enable"s from cheza As talked about in the patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable"), using "input-enable" in pinctrl states for Qualcomm TLMM pinctrl devices was either superfluous or there to disable a pin's output. Looking at cheza * ec_ap_int_l, h1_ap_int_odl: Superfluous. The pins will be configured as inputs automatically by the Linux GPIO subsystem (presumably the reference for other OSes using these device trees). * bios_flash_wp_l: Superfluous. This pin is exposed to userspace through the kernel's GPIO API and will be configured automatically. That means that in none of the cases for cheza did we need to change "input-enable" to "output-disable" and we can just remove these superfluous properties. Signed-off-by: Douglas Anderson Acked-by: Linus Walleij Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323102605.11.Ia439c29517b1c0625325a54387b047f099d16425@changeid commit 6d4794d658a0967a7f257f16d6a7a48afb8c8e05 Author: Douglas Anderson Date: Thu Mar 23 10:30:14 2023 -0700 arm64: dts: qcom: sc7280: Remove superfluous "input-enable"s from idp-ec-h1 As talked about in the patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable"), using "input-enable" in pinctrl states for Qualcomm TLMM pinctrl devices was either superfluous or there to disable a pin's output. Looking at the sc7280-idp-ec-h1.dtsi file: * ap_ec_int_l, h1_ap_int_odl: Superfluous. The pins will be configured as inputs automatically by the Linux GPIO subsystem (presumably the reference for other OSes using these device trees). That means that in none of the cases for sc7280-idp-ec-h1.dtsi did we need to change "input-enable" to "output-disable" and we can just remove these superfluous properties. Signed-off-by: Douglas Anderson Acked-by: Linus Walleij Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323102605.10.I1343c20f4aaac8e2c1918b756f7ed66f6ceace9c@changeid commit e8df226339fa032c49f8db4281903930d018a22c Author: Douglas Anderson Date: Thu Mar 23 10:30:13 2023 -0700 arm64: dts: qcom: sc7180: Remove superfluous "input-enable"s from trogdor As talked about in the patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable"), using "input-enable" in pinctrl states for Qualcomm TLMM pinctrl devices was either superfluous or there to disable a pin's output. Looking at trogdor: * ap_ec_int_l, fp_to_ap_irq_l, h1_ap_int_odl, p_sensor_int_l: Superfluous. The pins will be configured as inputs automatically by the Linux GPIO subsystem (presumably the reference for other OSes using these device trees). * bios_flash_wp_l: Superfluous. This pin is exposed to userspace through the kernel's GPIO API and will be configured automatically. That means that in none of the cases for trogdor did we need to change "input-enable" to "output-disable" and we can just remove these superfluous properties. Signed-off-by: Douglas Anderson Acked-by: Linus Walleij Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323102605.9.I94dbc53176e8adb0d7673b7feb2368e85418f938@changeid commit ced32c299e5d6c447ad0b80d7a16b44e0e72e8e0 Author: Douglas Anderson Date: Thu Mar 23 10:30:08 2023 -0700 arm64: dts: qcom: sc7180: Annotate l13a on trogdor to always-on The l13a rail on trogdor devices has always been intended to be always-on on both S0 and S3. Different trogdor variants use l13a in slightly different ways, but the overall theme is that it's a 1.8V rail that the board uses for things that it wants powered in on S0 and S3. On many boards this includes the boot SPI (AKA qspi). For all intents and purposes this patch is actually a no-op since something else in the system seems to already be keeping the rail on all the time (confirmed via multimeter). That "something else" was postulated to be the modem but the rail is on / stays on even without the modem/wifi coming up so it's likely the boot config. In any case, making the fact that this is always-on explicit seems like a good idea. Signed-off-by: Douglas Anderson Acked-by: Linus Walleij Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323102605.4.I9f47a8a53eacff6229711a827993792ceeb36971@changeid commit 37f7349b56decc91c66f8039712e63740b1f25f9 Author: Douglas Anderson Date: Thu Mar 23 10:30:07 2023 -0700 arm64: dts: sdm845: Rename qspi data12 as data23 There are 4 qspi data pins: data0, data1, data2, and data3. Currently we have a shared pin state for data0 and data1 (2 lane config) and a pin state for data2 and data3 (you'd enable both this and the 2 lane state for 4 lanes). The second state is obviously misnamed. Fix it. Fixes: e1ce853932b7 ("arm64: dts: qcom: sdm845: Add qspi (quad SPI) node") Signed-off-by: Douglas Anderson Acked-by: Linus Walleij Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323102605.3.I88528d037b7fda4e53a40f661be5ac61628691cd@changeid commit 14acf21c0d3f7b7298ffcd2e5b5db4a476ec6202 Author: Douglas Anderson Date: Thu Mar 23 10:30:06 2023 -0700 arm64: dts: sc7280: Rename qspi data12 as data23 There are 4 qspi data pins: data0, data1, data2, and data3. Currently we have a shared pin state for data0 and data1 (2 lane config) and a pin state for data2 and data3 (you'd enable both this and the 2 lane state for 4 lanes). The second state is obviously misnamed. Fix it. Fixes: 7720ea001b52 ("arm64: dts: qcom: sc7280: Add QSPI node") Signed-off-by: Douglas Anderson Acked-by: Linus Walleij Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323102605.2.I4043491bb24b1e92267c5033d76cdb0fe60934da@changeid commit d84f8f2687bdc67f20262e822b206419bcfd0038 Author: Douglas Anderson Date: Thu Mar 23 10:30:05 2023 -0700 arm64: dts: sc7180: Rename qspi data12 as data23 There are 4 qspi data pins: data0, data1, data2, and data3. Currently we have a shared pin state for data0 and data1 (2 lane config) and a pin state for data2 and data3 (you'd enable both this and the 2 lane state for 4 lanes). The second state is obviously misnamed. Fix it. Fixes: ba3fc6496366 ("arm64: dts: sc7180: Add qupv3_0 and qupv3_1") Signed-off-by: Douglas Anderson Acked-by: Linus Walleij Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323102605.1.Ifc1b5be04653f4ab119698a5944bfecded2080d6@changeid commit 876a6d25ac423b206944995bd5f056c4f280756b Merge: 97cb36ff52a10 e49eabe3e13f2 Author: Bjorn Andersson Date: Fri Apr 7 10:51:26 2023 -0700 Merge branch 'ib-qcom-quad-spi' of https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl into arm64-for-6.4 Merge the support for output-enable/disable in the pinctrl-msm driver, to ensure that bisection across the following SC7180/SC7280 DeviceTree changes result in something electrically sound. Signed-off-by: Bjorn Andersson commit 97cb36ff52a1061a0d3ef4bf448813acef207140 Author: Devi Priya Date: Thu Mar 16 12:59:39 2023 +0530 arm64: dts: qcom: Add ipq9574 SoC and AL02 board support Add initial device tree support for Qualcomm IPQ9574 SoC and AL02 board Co-developed-by: Anusha Rao Signed-off-by: Anusha Rao Co-developed-by: Poovendhan Selvaraj Signed-off-by: Poovendhan Selvaraj Signed-off-by: Devi Priya Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230316072940.29137-6-quic_devipriy@quicinc.com commit 5602dfc37a6bd8d80aaf90abd4f229b398cde0ec Merge: c85c8a992794d b065b23d3c3bc Author: Bjorn Andersson Date: Fri Apr 7 10:35:12 2023 -0700 Merge branch '20230316072940.29137-2-quic_devipriy@quicinc.com' into HEAD Merge the IPQ9574 Global Clock Controller Devicetree binding, to make available the clock definitions used in the Devicetree source. commit 34d1a90bdb8a2759b9646c8596eea495b4cb02ac Author: Devi Priya Date: Thu Mar 16 12:59:40 2023 +0530 arm64: defconfig: Enable IPQ9574 SoC base configs Enables clk & pinctrl related configs for Qualcomm IPQ9574 SoC Reviewed-by: Krzysztof Kozlowski Signed-off-by: Devi Priya Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230316072940.29137-7-quic_devipriy@quicinc.com commit d75b82cff48883b5e75abfd3930afa7a148ab440 Author: Devi Priya Date: Thu Mar 16 12:59:36 2023 +0530 clk: qcom: Add Global Clock Controller driver for IPQ9574 Add Global Clock Controller (GCC) driver for ipq9574 based devices Co-developed-by: Anusha Rao Signed-off-by: Anusha Rao Signed-off-by: Devi Priya Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230316072940.29137-3-quic_devipriy@quicinc.com commit 3a5c7ed3d8ade828ad10dc69094acc56dc58332d Merge: 93f21d925f787 b065b23d3c3bc Author: Bjorn Andersson Date: Fri Apr 7 10:27:28 2023 -0700 Merge branch '20230316072940.29137-2-quic_devipriy@quicinc.com' into clk-for-6.4 Merge IPQ9574 Global Clock Controller binding through a topic branch to allow it also be introduced in the Devicetree source tree. commit b065b23d3c3bc91f7e54f9bff4294a7bfbd2afb6 Author: Devi Priya Date: Thu Mar 16 12:59:35 2023 +0530 dt-bindings: clock: Add ipq9574 clock and reset definitions Add clock and reset ID definitions for ipq9574 Reviewed-by: Krzysztof Kozlowski Co-developed-by: Anusha Rao Signed-off-by: Anusha Rao Signed-off-by: Devi Priya Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230316072940.29137-2-quic_devipriy@quicinc.com commit c85c8a992794dfcd7cea7a41871710c27c5592a6 Author: Petr Vorel Date: Tue Jan 31 21:04:14 2023 +0100 arm64: dts: qcom: msm8994-angler: removed clash with smem_region This fixes memory overlap error: [ 0.000000] reserved@6300000 (0x0000000006300000--0x0000000007000000) overlaps with smem_region@6a00000 (0x0000000006a00000--0x0000000006c00000) smem_region is the same as in downstream (qcom,smem) [1], therefore split reserved memory into two sections on either side of smem_region. Not adding labels as it's not expected to be used. [1] https://android.googlesource.com/kernel/msm/+/refs/heads/android-msm-angler-3.10-marshmallow-mr1/arch/arm/boot/dts/qcom/msm8994.dtsi#948 Fixes: 380cd3a34b7f ("arm64: dts: msm8994-angler: fix the memory map") Signed-off-by: Petr Vorel Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230131200414.24373-3-pvorel@suse.cz commit fe88480a6be92ecbf6f205ff3a7d7e5ded0562dd Author: Petr Vorel Date: Tue Jan 31 21:04:13 2023 +0100 arm64: dts: qcom: msm8994-angler: Fix cont_splash_mem mapping Angler's cont_splash_mem mapping is shorter in downstream [1], therefore 380cd3a34b7f was wrong. Obviously also 0e5ded926f2a was wrong (workaround which fixed booting at the time). This fixes error: [ 0.000000] memory@3401000 (0x0000000003401000--0x0000000005601000) overlaps with tzapp@4800000 (0x0000000004800000--0x0000000006100000) [1] https://android.googlesource.com/kernel/msm/+/refs/heads/android-msm-angler-3.10-marshmallow-mr1/arch/arm64/boot/dts/huawei/huawei_msm8994_angler_row_vn1/huawei-fingerprint.dtsi#16 Fixes: 380cd3a34b7f ("arm64: dts: msm8994-angler: fix the memory map") Fixes: 0e5ded926f2a ("arm64: dts: qcom: msm8994-angler: Disable cont_splash_mem") Signed-off-by: Petr Vorel Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230131200414.24373-2-pvorel@suse.cz commit cb5d1dd3a74a7c7c3ad31d5fa2cc00e86c209dcc Author: Douglas Anderson Date: Thu Mar 30 14:11:00 2023 -0700 MAINTAINERS: qcom: Add reviewer for Qualcomm Chromebooks Developers on the ChromeOS team generally want to be notified to review changes that affect Chromebook device tree files. While we could individually add developers, the set of developers and the time each one has available to review patches will change over time. Let's try adding a group list as a reviewer and see if that's an effective way to manage things. A few notes: * Though this email address is actually backed by a mailing list, I'm adding it as "R"eviewer and not "L"ist since it's not a publicly readable mailing list and it's intended just to have a few people on it. This also hopefully conveys a little more responisbility for the people that are part of this group. * I've added all sc7180 and sc7280 files here. At the moment I'm not aware of any non-Chromebooks being supported that use these chips. If later something shows up then we can try to narrow down. * I've added "sdm845-cheza" to this list but not the rest of "sdm845". Cheza never shipped but some developers still find the old developer boards useful and thus it continues to get minimal maintenance. Most sdm845 device tree work, however, seems to be for non-Chromebooks. Cc: Stephen Boyd Cc: Matthias Kaehlcke Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Acked-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230330141051.1.If8eb4f30cb53a00a5bef1b7d3cc645c3536615ec@changeid commit 3d439b1a2ad36c8b4ea151c8de25309d60d17407 Author: Daniel Lezcano Date: Tue Apr 4 09:51:37 2023 +0200 thermal/core: Alloc-copy-free the thermal zone parameters structure The caller of the function thermal_zone_device_register_with_trips() can pass a thermal_zone_params structure parameter. This one is used by the thermal core code until the thermal zone is destroyed. That forces the caller, so the driver, to keep the pointer valid until it unregisters the thermal zone if we want to make the thermal zone device structure private the core code. As the thermal zone device structure would be private, the driver can not access to thermal zone device structure to retrieve the tzp field after it passed it to register the thermal zone. So instead of forcing the users of the function to deal with the tzp structure life cycle, make the usage easier by allocating our own thermal zone params, copying the parameter content and by freeing at unregister time. The user can then create the parameters on the stack, pass it to the registering function and forget about it. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230404075138.2914680-3-daniel.lezcano@linaro.org commit ac614a9b4c35bf766dec40d73cbbc7f37c1734f7 Author: Daniel Lezcano Date: Tue Apr 4 09:51:36 2023 +0200 thermal/of: Unexport unused OF functions The functions thermal_of_zone_register() and thermal_of_zone_unregister() are no longer needed from the drivers as the devm_ variant is always used. Make them static in the C file and remove their declaration from thermal.h Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230404075138.2914680-2-daniel.lezcano@linaro.org commit 8454c8c09c7768fd86cda61f1a07b9c746050c80 Author: Daniel Lezcano Date: Tue Apr 4 09:51:35 2023 +0200 thermal/drivers/bcm2835: Remove buggy call to thermal_of_zone_unregister The driver is using the devm_thermal_of_zone_device_register(). In the error path of the function calling devm_thermal_of_zone_device_register(), the function devm_thermal_of_zone_unregister() should be called instead of thermal_of_zone_unregister(), otherwise this one will be called twice when the device is freed. The same happens for the remove function where the devm_ guarantee the thermal_of_zone_unregister() will be called, so adding this call in the remove function will lead to a double free also. Use devm_ variant in the error path of the probe function. Remove thermal_of_zone_unregister() in the remove function. Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230404075138.2914680-1-daniel.lezcano@linaro.org commit 4a670ac3e75e517c96cbd01ef870dbd598c3ce71 Author: Maxime Chevallier Date: Fri Apr 7 17:26:04 2023 +0200 regmap: allow upshifting register addresses before performing operations Similar to the existing reg_downshift mechanism, that is used to translate register addresses on busses that have a smaller address stride, it's also possible to want to upshift register addresses. Such a case was encountered when network PHYs and PCS that usually sit on a MDIO bus (16-bits register with a stride of 1) are integrated directly as memory-mapped devices. Here, the same register layout defined in 802.3 is used, but the register now have a larger stride. Introduce a mechanism to also allow upshifting register addresses. Re-purpose reg_downshift into a more generic, signed reg_shift, whose sign indicates the direction of the shift. To avoid confusion, also introduce macros to explicitly indicate if we want to downshift or upshift. For bisectability, change any use of reg_downshift to use reg_shift. Signed-off-by: Maxime Chevallier Tested-by: Colin Foster Link: https://lore.kernel.org/r/20230407152604.105467-1-maxime.chevallier@bootlin.com Signed-off-by: Mark Brown commit 93f21d925f787eb4a91e7ade77a544df30be0605 Author: Konrad Dybcio Date: Wed Mar 29 16:01:35 2023 +0200 clk: qcom: gpucc-sm6375: Configure CX_GDSC disable wait value Configure the disable wait value on the CX GDSC to ensure we don't get any undefined behavior. This was omitted when first adding the driver. Fixes: 8397e24278b3 ("clk: qcom: Add GPU clock controller driver for SM6375") Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230329140135.2178957-1-konrad.dybcio@linaro.org commit dfdeda67ea2dac57d2d7506d65cfe5a0878ad285 Author: Aaron Lewis Date: Tue Mar 7 14:13:56 2023 +0000 KVM: x86/pmu: Prevent the PMU from counting disallowed events When counting "Instructions Retired" (0xc0) in a guest, KVM will occasionally increment the PMU counter regardless of if that event is being filtered. This is because some PMU events are incremented via kvm_pmu_trigger_event(), which doesn't know about the event filter. Add the event filter to kvm_pmu_trigger_event(), so events that are disallowed do not increment their counters. Fixes: 9cd803d496e7 ("KVM: x86: Update vPMCs when retiring instructions") Signed-off-by: Aaron Lewis Reviewed-by: Like Xu Link: https://lore.kernel.org/r/20230307141400.1486314-2-aaronlewis@google.com [sean: prepend "pmc" to the new function] Signed-off-by: Sean Christopherson commit 672029caa5708934817a331f3323bbe48d456c5c Author: Tom Rix Date: Fri Apr 7 07:55:53 2023 -0400 ASoC: mediatek: mt8186: set variable aud_pinctrl to static smatch reports sound/soc/mediatek/mt8186/mt8186-afe-gpio.c:14:16: warning: symbol 'aud_pinctrl' was not declared. Should it be static? This variable is only used in one file so should be static. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230407115553.1968111-1-trix@redhat.com Signed-off-by: Mark Brown commit 996c32b745a15a637e8244a25f06b74acce98976 Author: Konrad Dybcio Date: Wed Apr 5 00:47:19 2023 +0200 clk: qcom: gcc-sm6115: Mark RCGs shared where applicable The vast majority of shared RCGs were not marked as such. Fix it. Fixes: cbe63bfdc54f ("clk: qcom: Add Global Clock controller (GCC) driver for SM6115") Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230404224719.909746-1-konrad.dybcio@linaro.org commit 88704a0cd71909c3107561261412a5d5beb23358 Author: Tushar Nimkar Date: Thu Apr 6 17:27:32 2023 +0530 soc: qcom: rpmh-rsc: Support RSC v3 minor versions RSC v3 register offsets are same for all minor versions of v3. Fix a minor version check to pick correct offsets for all v3 minor versions. Fixes: 40482e4f7364 ("soc: qcom: rpmh-rsc: Add support for RSC v3 register offsets") Signed-off-by: Tushar Nimkar Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230406115732.9293-1-quic_tnimkar@quicinc.com commit 4fa5843d81fdce9ba7e03f8a666e2f8e592aec2b Author: Like Xu Date: Fri Mar 10 19:33:49 2023 +0800 KVM: x86/pmu: Fix a typo in kvm_pmu_request_counter_reprogam() Fix a "reprogam" => "reprogram" typo in kvm_pmu_request_counter_reprogam(). Fixes: 68fb4757e867 ("KVM: x86/pmu: Defer reprogram_counter() to kvm_pmu_handle_event()") Signed-off-by: Like Xu Link: https://lore.kernel.org/r/20230310113349.31799-1-likexu@tencent.com [sean: trim the changelog] Signed-off-by: Sean Christopherson commit d8cc9415a40f479b666fc03e7b1f4601868e6dc8 Author: Krzysztof Kozlowski Date: Thu Apr 6 22:29:56 2023 +0200 hwmon: constify pointers to hwmon_channel_info HWmon core receives an array of pointers to hwmon_channel_info and it does not modify it, thus it can be array of const pointers for safety. This allows drivers to make them also const. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guenter Roeck commit 218669c662e3a38fdbd7e0ce56a20784da29546e Author: Andrew Lunn Date: Fri Apr 7 17:18:39 2023 +0200 ARM64: dts: marvell: cn9310: Add missing phy-mode The DSA framework has got more picky about always having a phy-mode for the CPU port. The SoC Ethernet is being configured to 10gbase-r. Set the switch phy-mode based on this. Additionally, the SoC Ethernet is using in-band signalling to determine the link speed, so add same parameter to the switch. Additionally, the cpu label has never actually been used in the binding, so remove it. Signed-off-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 0939de7d89d2efc4f565ce1961b4020787e9f297 Author: Andrew Lunn Date: Fri Apr 7 17:17:22 2023 +0200 ARM: dts: armada: Add missing phy-mode and fixed links The DSA framework has got more picky about always having a phy-mode for the CPU port. The Armada Ethernet supports RGMII, SGMII, 1000base-x and 2500Base-X. Set the switch phy-mode based on how the SoC Ethernet ports is been configured. For RGMII mode, have the switch add the delays. Additionally, the cpu label has never actually been used in the binding, so remove it. Lastly, add a fixed-link node indicating the expected speed/duplex of the link to the SoC. Signed-off-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit e2e1bcb19b7522a582026460bf5d49fd2ac15e62 Author: Andrew Lunn Date: Fri Apr 7 17:17:21 2023 +0200 ARM: dts: orion5: Add missing phy-mode and fixed links The DSA framework has got more picky about always having a phy-mode for the CPU port. The Orion5x Ethernet is an RGMII port. Set the switch to impose the RGMII delays. Additionally, the cpu label has never actually been used in the binding, so remove it. Lastly, add a fixed-link node indicating the expected speed/duplex of the link to the SoC. Signed-off-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 8aea8659a5f3ae8dc63c9f632ce1f676a1483556 Author: Andrew Lunn Date: Fri Apr 7 17:17:20 2023 +0200 ARM: dts: kirkwood: Add missing phy-mode and fixed links The DSA framework has got more picky about always having a phy-mode for the CPU port. The Kirkwood Ethernet is an RGMII port. Set the switch to impose the RGMII delays. Additionally, the cpu label has never actually been used in the binding, so remove it. Signed-off-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 6d5a6740f6df4c41a96d57d542207a7d5cab0393 Author: Enrico Mioso Date: Thu Feb 2 10:37:06 2023 +0100 arm64: dts: marvell: add DTS for GL.iNet GL-MV1000 The GL-MV1000 (Brume) is a small form-factor gateway router. It is based on the Marvell Armada 88F3720 SOC (1GHz), has 3 gigabit ethernet ports, 1 GB RAM, 16M SPI flash, 8GB eMMC and an uSD slot, as well as an USB 2.0 type A and an USB 3.0 type C port. Signed-off-by: Enrico Mioso CC: Pali Reviewed-by: Pali Rohár Signed-off-by: Gregory CLEMENT commit f326e72a6e0baacea42ecaa9aaa4d7e7a355c972 Author: Thomas Weißschuh Date: Fri Mar 24 16:27:50 2023 +0000 firmware: turris-mox-rwtm: make kobj_type structure constant Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Signed-off-by: Thomas Weißschuh Reviewed-by: Marek Behún Signed-off-by: Gregory CLEMENT commit 4b6a412ee561ce8d530b6a0dfcf05d2ae7691fd9 Author: Krzysztof Kozlowski Date: Sun Mar 12 21:13:13 2023 +0100 arm64: dts: marvell: align thermal node names with bindings Bindings expect thermal node names to end with '-thermal': armada-8040-db.dtb: thermal-zones: 'ap-thermal-cpu0', ... do not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT commit 22a9554e548424a15b744273d4509c884c9f14b1 Author: Robert Marko Date: Sun Feb 19 13:14:18 2023 +0100 arm64: dts: marvell: mochabin: enlarge PCI memory window Armada 7040 uses a rather small 15MB memory window for every PCI adapter, however this is not sufficient for Qualcomm QCA6390 802.11ax cards that are shipped along with the OpenWrt WLAN model of MOCHAbin as ath11k requires at least 16MB of memory. So, similar to what MACCHIATOBin has been doing for years, lets move to using the second PCIe 2 memory window and expand it to 128MB to make it future proof. Signed-off-by: Robert Marko Signed-off-by: Gregory CLEMENT commit 4f59630a5ed0a4e7d275bd7e5d253a8f5a425c5a Author: Srinivas Pandruvada Date: Thu Mar 30 07:59:39 2023 -0700 platform/x86: intel-uncore-freq: Add client processors Make Intel uncore frequency driver support to client processor starting from Alder Lake. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20230330145939.1022261-1-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit f96fb2df3eb31ede1b34b0521560967310267750 Author: Uros Bizjak Date: Mon Feb 27 17:09:17 2023 +0100 x86/apic: Fix atomic update of offset in reserve_eilvt_offset() The detection of atomic update failure in reserve_eilvt_offset() is not correct. The value returned by atomic_cmpxchg() should be compared to the old value from the location to be updated. If these two are the same, then atomic update succeeded and "eilvt_offsets[offset]" location is updated to "new" in an atomic way. Otherwise, the atomic update failed and it should be retried with the value from "eilvt_offsets[offset]" - exactly what atomic_try_cmpxchg() does in a correct and more optimal way. Fixes: a68c439b1966c ("apic, x86: Check if EILVT APIC registers are available (AMD only)") Signed-off-by: Uros Bizjak Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230227160917.107820-1-ubizjak@gmail.com commit 73d73f5ee7fb0c42ff87091d105bee720a9565f1 Author: Li zeming Date: Sun Mar 26 06:19:35 2023 +0800 PM: core: Remove unnecessary (void *) conversions Assignments from pointer variables of type (void *) do not require explicit type casts, so remove such type cases from the code in drivers/base/power/main.c where applicable. Signed-off-by: Li zeming [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit a038895e25b296ca1ef0254f92673ea64bc1a2ee Author: Viresh Kumar Date: Tue Apr 4 05:09:10 2023 +0530 cpufreq: drivers with target_index() must set freq_table Since the cpufreq core directly uses freq_table, for cpufreq drivers that set their target_index() callback, make it mandatory for them to set the same. Since this is set per policy and normally from policy->init(), do this from cpufreq_table_validate_and_sort() which gets called right after ->init(). Reported-by: Yajun Deng Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit e3adc46da349d4a4cda1c58d8186c5bce0b011fd Author: Javier Martinez Canillas Date: Thu Apr 6 13:02:35 2023 +0200 drm/vkms: Remove include The driver doesn't use simple-KMS helpers to set a simple display pipeline but only the drm_simple_encoder_init() function to initialize an encoder. That helper is just a wrapper of drm_encoder_init(), but passing a struct drm_encoder_funcs that sets the .destroy handler to drm_encoder_cleanup(). Since the header is only included for this helper and because the connector is initialized with drm_connector_init() as well, do the same for the encoder and drop the header include. Signed-off-by: Javier Martinez Canillas Reviewed-by: Daniel Vetter Reviewed-by: Thomas Zimmermann Reviewed-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230406110235.3092055-3-javierm@redhat.com commit ca0376ba196ff7ca5fb55e333a94ea23530ee888 Author: Javier Martinez Canillas Date: Thu Apr 6 13:02:34 2023 +0200 drm/vkms: Drop vkms_connector_destroy() wrapper This helper is just a wrapper that calls drm_connector_cleanup(), there's no need to have another level of indirection. Signed-off-by: Javier Martinez Canillas Reviewed-by: Daniel Vetter Reviewed-by: Thomas Zimmermann Reviewed-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230406110235.3092055-2-javierm@redhat.com commit 561538f770a362e704fa0f1b2f2fe78c8e61db6b Author: Balsam CHIHI Date: Tue Mar 7 16:45:22 2023 +0100 thermal/drivers/mediatek/lvts_thermal: Add AP domain for mt8195 Add MT8195 AP Domain support to LVTS Driver. Take the opportunity to update the comments to show calibration data information related to the new domain. [dlezcano]: Massaged a bit the changelog Signed-off-by: Balsam CHIHI Tested-by: Chen-Yu Tsai Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230307154524.118541-3-bchihi@baylibre.com commit 05aaa7fdb0736262e224369b9b9f1410320fc71b Author: Balsam CHIHI Date: Tue Mar 7 16:45:21 2023 +0100 dt-bindings: thermal: mediatek: Add AP domain to LVTS thermal controllers for mt8195 Add AP Domain to LVTS thermal controllers dt-binding definition for mt8195. Signed-off-by: Balsam CHIHI Acked-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230307154524.118541-2-bchihi@baylibre.com commit 46d6cbb820854759df2a7ebefc8d2c52ebc364f9 Author: Ye Xingchen Date: Fri Mar 24 10:20:11 2023 +0800 thermal: amlogic: Use dev_err_probe() Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/202303241020110014476@zte.com.cn commit 13f03bcd02e4b0498c8ccb066b4eddf61dee6681 Author: Chen-Yu Tsai Date: Tue Mar 28 11:10:17 2023 +0800 thermal/drivers/mediatek/lvts_thermal: Fix sensor 1 interrupt status bitmask The binary representation for sensor 1 interrupt status was incorrectly assembled, when compared to the full table given in the same comment section. The conversion into hex was also incorrect, leading to incorrect interrupt status bitmask for sensor 1. This would cause the driver to incorrectly identify changes for sensor 1, when in fact it was sensor 0, or a sensor access time out. Fix the binary and hex representations in the comments, and the actual bitmask macro. Fixes: f5f633b18234 ("thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver") Signed-off-by: Chen-Yu Tsai Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230328031017.1360976-1-wenst@chromium.org commit 45cc9c4f765b72b06132cfddcd41e44f12edf9e4 Author: Lukas Bulwahn Date: Tue Mar 28 11:17:37 2023 +0200 MAINTAINERS: adjust entry in THERMAL/POWER_ALLOCATOR after header movement Commit 32a7a02117de ("thermal/core: Relocate the traces definition in thermal directory") moves include/trace/events/thermal_power_allocator.h to drivers/thermal/thermal_trace_ipa.h, but misses to adjust the file entry for the THERMAL/POWER_ALLOCATOR section. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Adjust this file entry in THERMAL/POWER_ALLOCATOR. Signed-off-by: Lukas Bulwahn Reviewed-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230328091737.6785-1-lukas.bulwahn@gmail.com commit e4fdcfb1a1f55b498e0be5f0827a0f009a4bb58d Author: Rob Herring Date: Mon Mar 27 12:02:33 2023 -0500 dt-bindings: thermal: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Reviewed-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230327170233.4109156-1-robh@kernel.org commit ded2d383b1b441f380552897791ffb85a1377f08 Author: Zhang Rui Date: Thu Mar 30 18:45:26 2023 +0800 thermal/core: Remove thermal_bind_params structure Remove struct thermal_bind_params because no one is using it for thermal binding now. Signed-off-by: Zhang Rui Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230330104526.3196-1-rui.zhang@intel.com commit cdd6076b0a0c8f1e57be309a41bd9cedcf6795d6 Author: Mikko Perttunen Date: Thu Mar 30 12:49:04 2023 +0300 thermal/drivers/tegra-bpmp: Handle offline zones Thermal zones located in power domains may not be accessible when the domain is powergated. In this situation, reading the temperature will return -BPMP_EFAULT. When evaluating trips, BPMP will internally use -256C as the temperature for offline zones. For smooth operation, for offline zones, return -EAGAIN when reading the temperature and allow registration of zones even if they are offline during probe. Signed-off-by: Mikko Perttunen Acked-by: Thierry Reding Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230330094904.2589428-1-cyndis@kapsi.fi commit fee5caec88b3d1948453c55474cf16b81026a1b2 Author: Ye Xingchen Date: Fri Mar 24 11:08:55 2023 +0800 thermal/drivers/rockchip: use devm_reset_control_array_get_exclusive() Switch devm_reset_control_array_get() to devm_reset_control_array_get_exclusive(). Signed-off-by: Ye Xingchen Reviewed-by: Philipp Zabel Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/202303241108553006227@zte.com.cn commit c3d2718ae6483fa77625390a6409c687d31f58f4 Author: Sebastian Reichel Date: Wed Mar 8 12:22:53 2023 +0100 dt-bindings: rockchip-thermal: Support the RK3588 SoC compatible Add a new compatible for the thermal sensor device on RK3588 SoCs. Reviewed-by: Heiko Stuebner Acked-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230308112253.15659-8-sebastian.reichel@collabora.com commit 45d7b3867a5cabb97fc31f16122cda8540c3a30c Author: Finley Xiao Date: Wed Mar 8 12:22:52 2023 +0100 thermal/drivers/rockchip: Support RK3588 SoC in the thermal driver The RK3588 SoC has seven temperature sensor ADC channels: - Chip Center - CPU Cluster 1 (Dual A76 "Big" Cores) - CPU Cluster 2 (Dual A76 "Big" Cores) - CPU Cluster 0 (Quad A55 "Little" Cores) - Power Domain Center - Graphics Processing Unit - Neural Processing Unit Signed-off-by: Finley Xiao [rebase, squash fixes] Reviewed-by: Heiko Stuebner Signed-off-by: Sebastian Reichel Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230308112253.15659-7-sebastian.reichel@collabora.com commit 267f596585abc78efbdda51a80dd36c65c0f6ad0 Author: Sebastian Reichel Date: Wed Mar 8 12:22:51 2023 +0100 thermal/drivers/rockchip: Support dynamic sized sensor array Dynamically allocate the sensors array based on the amount of platform sensors in preparation for rk3588 support, which needs 7 sensors. Reviewed-by: Heiko Stuebner Signed-off-by: Sebastian Reichel Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230308112253.15659-6-sebastian.reichel@collabora.com commit f7cef1b743e84bdc7b1f2e5711615aaddf101ca8 Author: Sebastian Reichel Date: Wed Mar 8 12:22:50 2023 +0100 thermal/drivers/rockchip: Simplify channel id logic Replace the channel ID lookup table by a simple offset, since the channel IDs are consecutive. Signed-off-by: Sebastian Reichel Signed-off-by: Daniel Lezcano Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230308112253.15659-5-sebastian.reichel@collabora.com commit cb71c5f904c5b7e84d770c87bebc5df0bec200a4 Author: Sebastian Reichel Date: Wed Mar 8 12:22:49 2023 +0100 thermal/drivers/rockchip: Use dev_err_probe Use dev_err_probe to simplify error printing in the driver's probe routine. Reviewed-by: Heiko Stuebner Signed-off-by: Sebastian Reichel Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230308112253.15659-4-sebastian.reichel@collabora.com commit 2f6916f12c0e46ecd4c2b793a014132140730560 Author: Sebastian Reichel Date: Wed Mar 8 12:22:48 2023 +0100 thermal/drivers/rockchip: Simplify clock logic By using devm_clk_get_enabled() the clock acquisition and enabling can be done in one step with automatic error handling. Reviewed-by: Heiko Stuebner Signed-off-by: Sebastian Reichel Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230308112253.15659-3-sebastian.reichel@collabora.com commit f1d2427cb458fd8ecb709c27f43088d6e250a7aa Author: Sebastian Reichel Date: Wed Mar 8 12:22:47 2023 +0100 thermal/drivers/rockchip: Simplify getting match data It's possible to directly get the match data in a generic way nowadays. Reviewed-by: Heiko Stuebner Signed-off-by: Sebastian Reichel Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230308112253.15659-2-sebastian.reichel@collabora.com commit b10f82380eeb408bf6bc006d17faca492d5fb649 Author: Richard Zhu Date: Wed Feb 15 14:18:32 2023 +0800 dt-bindings: imx6q-pcie: Restruct i.MX PCIe schema Restruct i.MX PCIe schema, derive the common properties, thus they can be shared by both the RC and Endpoint schema. Update the description of fsl,imx6q-pcie.yaml, and move the EP mode compatible to fsl,imx6q-pcie-ep.yaml. Add support for i.MX8M PCIe Endpoint modes, and update the MAINTAINER accordingly. Link: https://lore.kernel.org/r/1676441915-1394-2-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 49f1d0b65f87692a11386a8b8cd3a4aa3a1d0daa Author: Roan van Dijk Date: Thu Mar 30 11:16:13 2023 +0200 ARM: stm32: add initial documentation for STM32MP151 This patch adds initial documentation of STM32MP151 microprocessor (MPU) based on Arm Cortex-A7. Signed-off-by: Roan van Dijk Signed-off-by: Alexandre Torgue commit e28531143b257a4cbfdc1c3358eff18cc3024783 Author: Felix Fietkau Date: Wed Apr 5 17:10:26 2023 +0200 net: ethernet: mtk_eth_soc: mtk_ppe: prefer newly added l2 flows When a device is roaming between interfaces and a new flow entry is created, we should assume that its output device is more up to date than whatever entry existed already. Signed-off-by: Felix Fietkau Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 05f3ab7780b3c0cfe26a8134606bdf641c4f4bb2 Author: Felix Fietkau Date: Wed Apr 5 17:10:25 2023 +0200 net: ethernet: mtk_eth_soc: add code for offloading flows from wlan devices WED version 2 (on MT7986 and later) can offload flows originating from wireless devices. In order to make that work, ndo_setup_tc needs to be implemented on the netdevs. This adds the required code to offload flows coming in from WED, while keeping track of the incoming wed index used for selecting the correct PPE device. Signed-off-by: Felix Fietkau Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit c00a60d6f4a14b06264bb6f9fcc754b8ddbf67e3 Author: Jiaxun Yang Date: Sat Apr 1 10:15:31 2023 +0100 of: address: always use dma_default_coherent for default coherency As for now all arches have dma_default_coherent reflecting default DMA coherency for of devices, so there is no need to have a standalone config option. Signed-off-by: Jiaxun Yang Reviewed-by: Rob Herring Acked-by: Michael Ellerman (powerpc) Signed-off-by: Christoph Hellwig commit 1d3f56b295302fdb4ac9caf6ce09f5ae7d2e651a Author: Jiaxun Yang Date: Sat Apr 1 10:15:30 2023 +0100 dma-mapping: provide CONFIG_ARCH_DMA_DEFAULT_COHERENT Provide a kconfig option to allow arches to manipulate default value of dma_default_coherent in Kconfig. Signed-off-by: Jiaxun Yang Signed-off-by: Christoph Hellwig commit fe4e5efa401fe15eab9259e358730145449e83a2 Author: Jiaxun Yang Date: Sat Apr 1 10:15:29 2023 +0100 dma-mapping: provide a fallback dma_default_coherent dma_default_coherent was decleared unconditionally at kernel/dma/mapping.c but only decleared when any of non-coherent options is enabled in dma-map-ops.h. Guard the declaration in mapping.c with non-coherent options and provide a fallback definition. Signed-off-by: Jiaxun Yang Signed-off-by: Christoph Hellwig commit 92d2c594aa096bba674da5fdcdc0e89cba79a147 Merge: a9fda7a0b0331 b0d87ed27be78 Author: Jakub Kicinski Date: Thu Apr 6 19:08:56 2023 -0700 Merge tag 'mlx5-updates-2023-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2023-04-05 From Paul: - TC action parsing cleanups - Correctly report stats for missed packets - Many CT actions limitations removed due to hw misses will now continue from the relevant tc ct action in software. From Adham: - RQ/SQ devlink health diagnostics layout fixes From Gal And Rahul: - PTP code cleanup and cyclecounter shift value improvement * tag 'mlx5-updates-2023-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5e: Fix SQ SW state layout in SQ devlink health diagnostics net/mlx5e: Fix RQ SW state layout in RQ devlink health diagnostics net/mlx5e: Rename misleading skb_pc/cc references in ptp code net/mlx5: Update cyclecounter shift value to improve ptp free running mode precision net/mlx5e: Remove redundant macsec code net/mlx5e: TC, Remove sample and ct limitation net/mlx5e: TC, Remove mirror and ct limitation net/mlx5e: TC, Remove tuple rewrite and ct limitation net/mlx5e: TC, Remove multiple ct actions limitation net/mlx5e: TC, Remove special handling of CT action net/mlx5e: TC, Remove CT action reordering net/mlx5e: CT: Use per action stats net/mlx5e: TC, Move main flow attribute cleanup to helper func net/mlx5e: TC, Remove unused vf_tun variable net/mlx5e: Set default can_offload action ==================== Link: https://lore.kernel.org/r/20230406020232.83844-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit a9fda7a0b0331250c4af006f1862752dbefcab9c Author: Petr Machata Date: Wed Apr 5 16:25:12 2023 +0200 selftests: forwarding: hw_stats_l3: Detect failure to install counters Running this test makes little sense if the enabled l3_stats are not actually reported as "used". This can signify a failure of a driver to install the necessary counters, or simply lack of support for enabling in-HW counters on a given netdevice. It is generally impossible to tell from the outside which it is. But more likely than not, if somebody is running this on veth pairs, they do not intend to actually test that a certain piece of HW can install in-HW counters for the veth. It is more likely they are e.g. running the test by mistake. Therefore detect that the counter has not been actually installed. In that case, if the netdevice is one end of a veth pair, SKIP. Otherwise FAIL. Suggested-by: Hangbin Liu Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson Tested-by: Hangbin Liu Link: https://lore.kernel.org/r/a86817961903cca5cb0aebf2b2a06294b8aa7dea.1680704172.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit f8b648bf6628eb0a6c25be68e512bed6df2e5f24 Author: Simon Horman Date: Wed Apr 5 19:29:48 2023 +0200 net: sunhme: move asm includes to below linux includes A recent rearrangement of includes has lead to a problem on m68k as flagged by the kernel test robot. Resolve this by moving the block asm includes to below linux includes. A side effect i that non-Sparc asm includes are now immediately before Sparc asm includes, which seems nice. Using sparse v0.6.4 I was able to reproduce this problem as follows using the config provided by the kernel test robot: $ wget https://download.01.org/0day-ci/archive/20230404/202304041748.0sQc4K4l-lkp@intel.com/config $ cp config .config $ make ARCH=m68k oldconfig $ make ARCH=m68k C=2 M=drivers/net/ethernet/sun CC [M] drivers/net/ethernet/sun/sunhme.o In file included from drivers/net/ethernet/sun/sunhme.c:19: ./arch/m68k/include/asm/irq.h:78:11: error: expected ‘;’ before ‘void’ 78 | asmlinkage void do_IRQ(int irq, struct pt_regs *regs); | ^~~~~ | ; ./arch/m68k/include/asm/irq.h:78:40: warning: ‘struct pt_regs’ declared inside parameter list will not be visible outside of this definition or declaration 78 | asmlinkage void do_IRQ(int irq, struct pt_regs *regs); | ^~~~~~~ Compile tested only. Fixes: 1ff4f42aef60 ("net: sunhme: Alphabetize includes") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304041748.0sQc4K4l-lkp@intel.com/ Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20230405-sunhme-includes-fix-v1-1-bf17cc5de20d@kernel.org Signed-off-by: Jakub Kicinski commit f3f21349779776135349a8e6f114a1485b2476b7 Author: Barret Rhoden Date: Thu Apr 6 20:18:08 2023 -0400 bpf: ensure all memory is initialized in bpf_get_current_comm BPF helpers that take an ARG_PTR_TO_UNINIT_MEM must ensure that all of the memory is set, including beyond the end of the string. Signed-off-by: Barret Rhoden Link: https://lore.kernel.org/r/20230407001808.1622968-1-brho@google.com Signed-off-by: Alexei Starovoitov commit ec417ad4c691b5d90ab13cf26789e8719468ae39 Author: Ian Rogers Date: Tue Apr 4 13:59:49 2023 -0700 perf map: Changes to reference counting When a pointer to a map exists do a get, when that pointer is overwritten or freed, put the map. This avoids issues with gets and puts being inconsistently used causing, use after puts, etc. For example, the map in struct addr_location is changed to hold a reference count. Reference count checking and address sanitizer were used to identify issues. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230404205954.2245628-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 392cf49ec54f0c7ba825ce9b04bf32bb85998135 Author: Ian Rogers Date: Tue Apr 4 13:59:48 2023 -0700 perf maps: Modify maps_by_name to hold a reference to a map To make it clearer about the ownership of a reference count split the by-name case from the regular start-address sorted tree. Put the reference count when maps_by_name is freed, which requires moving a decrement to nr_maps in maps__remove. Add two missing map puts in maps__fixup_overlappings in the event maps__insert fails. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230404205954.2245628-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 93c9f1c287d00ab396f76955a79beac46efca2d5 Author: Ian Rogers Date: Tue Apr 4 13:59:47 2023 -0700 perf test: Add extra diagnostics to maps test Dump the resultant and comparison maps on failure. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230404205954.2245628-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2a6e5e8a2ab68c9048f80d174d1698427fbd9c8c Author: Ian Rogers Date: Tue Apr 4 13:59:46 2023 -0700 perf map: Add accessors for ->pgoff and ->reloc Later changes will add reference count checking for 'struct map'. Add accessors so that the reference count check is only necessary in one place. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230404205954.2245628-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit ddee3f2bddc11f850f7f6fcfc04bc26ceeab23ce Author: Ian Rogers Date: Tue Apr 4 13:59:45 2023 -0700 perf map: Add accessors for ->prot, ->priv and ->flags Later changes will add reference count checking for 'struct map'. Add an accessor so that the reference count check is only necessary in one place. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230404205954.2245628-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 78a1f7cd9000d5d633268a2acb2d9b62d41a2f2c Author: Ian Rogers Date: Tue Apr 4 13:59:44 2023 -0700 perf map: Add helper for ->map_ip() and ->unmap_ip() Later changes will add reference count checking for struct map, add a helper function to invoke the map_ip and unmap_ip function pointers. The helper allows the reference count check to be in fewer places. Committer notes: Add missing conversions to: tools/perf/util/map.c tools/perf/util/cs-etm.c tools/perf/util/annotate.c tools/perf/arch/powerpc/util/sym-handling.c tools/perf/arch/s390/annotate/instructions.c Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230404205954.2245628-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0e6aa013bbc545f3ac04ba79c884466e47136d5d Author: Ian Rogers Date: Tue Apr 4 13:59:43 2023 -0700 perf map: Rename map_ip() and unmap_ip() Add dso to match comment. This avoids a naming conflict with later added accessor functions for variables in struct map. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230404205954.2245628-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 5a4f5be9c91ab79762747f39c14ad43d27a389dc Author: Ian Rogers Date: Thu Apr 6 17:13:22 2023 -0700 perf vendor events intel: Update free running tigerlake events Fix the topic, PMU name, event code and umask. These updates were generated by: https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py with this PR: https://github.com/intel/perfmon/pull/66 Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230407001322.2776268-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 4781f1f270fea983a6579ddad5e8dc8ad33f1fed Author: Ian Rogers Date: Thu Apr 6 17:13:21 2023 -0700 perf vendor events intel: Update free running snowridgex events Fix the PMU names, event code and umask. Remove UNC_IIO_BANDWIDTH_OUT events that aren't supported. These updates were generated by: https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py with this PR: https://github.com/intel/perfmon/pull/66 Signed-off-by: Ian Rogers : Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230407001322.2776268-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 54bc363afa5bbc97d9ce3423ec54ac907a95c669 Author: Ian Rogers Date: Thu Apr 6 17:13:20 2023 -0700 perf vendor events intel: Correct knightslanding memory topic Correct the memory topic of events for the imc related PMUs. These updates were generated by: https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py with this PR: https://github.com/intel/perfmon/pull/66 Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230407001322.2776268-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 5a45940b56fe0c67674ffa964b85f44b4fbb4e38 Author: Ian Rogers Date: Thu Apr 6 17:13:19 2023 -0700 perf vendor events intel: Update free running icelakex events Fix the PMU names, event code and umask. Remove UNC_IIO_BANDWIDTH_OUT events that aren't supported. These updates were generated by: https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py with this PR: https://github.com/intel/perfmon/pull/66 Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230407001322.2776268-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2e4555b015de6b1429f70263633c622c06c5c6eb Author: Ian Rogers Date: Thu Apr 6 17:13:18 2023 -0700 perf vendor events intel: Update free running alderlake events Fix the PMU name, event code and umask. These updates were generated by: https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py with this PR: https://github.com/intel/perfmon/pull/66 Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230407001322.2776268-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit ac7e7c9c65ecfb1fcc99de91cfd6b17a8d4cb9c1 Author: Dmitry Baryshkov Date: Tue Apr 4 16:06:22 2023 +0300 drm/msm/dpu: drop unused macros from hw catalog Drop the version comparison macros from dpu_hw_catalog.h, they are unused. Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530889/ Link: https://lore.kernel.org/r/20230404130622.509628-43-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit dac76a0144d31285a4d088a9874f81578d7061b1 Author: Dmitry Baryshkov Date: Tue Apr 4 16:06:21 2023 +0300 drm/msm/dpu: fetch DPU configuration from match data In email discussion it was noted that there can be different SoC device having slightly different SoC features, but sharing the same DPU hw revision. Stop fetching catalog data using core_rev and use platform's match data instead. Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530891/ Link: https://lore.kernel.org/r/20230404130622.509628-42-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 3f980eab56d1c4226bcb91a5f21c9c32a56edb5a Author: Ian Rogers Date: Thu Apr 6 16:52:56 2023 -0700 perf pmu: Sort and remove duplicates using JSON PMU name We may have a lot of copies of a particular uncore PMU, such as uncore_cha_0 to uncore_cha_59 on Intel sapphirerapids. The JSON events may match each of PMUs and so the events are copied to it. In 'perf list' this means we see the same JSON event 60 times as events on different PMUs don't have duplicates removed. There are 284 uncore_cha events on sapphirerapids. Rather than use the PMU's name to sort and remove duplicates, use the JSON PMU name. This reduces the 60 copies back down to 1 and has the side effect of speeding things like the "perf all PMU test" shell test. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sean Christopherson Cc: Suzuki Poulouse Link: https://lore.kernel.org/r/20230406235256.2768773-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 240e6fd0a923933493192e71f191d9326ba53f0b Author: Ian Rogers Date: Thu Apr 6 16:52:55 2023 -0700 perf pmu: Improve name/comments, avoid a memory allocation Improve documentation around perf_pmu_alias pmu_name and on functions. Reduce the scope of pmu_uncore_alias_match to just file. Rename perf_pmu__valid_suffix to the more revealing perf_pmu__match_ignoring_suffix. Add a short-cut to perf_pmu__match_ignoring_suffix for PMU names that don't also have a socket value, and can therefore avoid a memory allocation. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sean Christopherson Cc: Suzuki Poulouse Link: https://lore.kernel.org/r/20230406235256.2768773-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 330f40a0d951d7f23995ccbfeea9be7282942e93 Author: Ian Rogers Date: Thu Apr 6 16:52:54 2023 -0700 perf pmu: Fewer const casts struct pmu_event has const char*s, only unit needs to be non-const for the sake of passing as an out argument to strtod(). Reduce the const casts from 4 down to 1. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sean Christopherson Cc: Suzuki Poulouse Link: https://lore.kernel.org/r/20230406235256.2768773-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 222de5e53926252bf8815751ba555778cf8ff6ca Author: Namhyung Kim Date: Thu Apr 6 14:06:11 2023 -0700 perf lock contention: Do not try to update if hash map is full It doesn't delete data in the task_data and lock_stat maps. The data is kept there until it's consumed by userspace at the end. But it calls bpf_map_update_elem() again and again, and the data will be discarded if the map is full. This is not good. Worse, in the bpf_map_update_elem(), it keeps trying to get a new node even if the map was full. I guess it makes sense if it deletes some node like in the tstamp map (that's why I didn't make the change there). In a pre-allocated hash map, that means it'd iterate all CPU to check the freelist. And it has a bad performance impact on large machines. I've checked it on my 64 CPU machine with this. $ perf bench sched messaging -g 1000 # Running 'sched/messaging' benchmark: # 20 sender and receiver processes per group # 1000 groups == 40000 processes run Total time: 2.825 [sec] And I used the task mode, so that it can guarantee the map is full. The default map entry size is 16K and this workload has 40K tasks. Before: $ sudo ./perf lock con -abt -E3 -- perf bench sched messaging -g 1000 # Running 'sched/messaging' benchmark: # 20 sender and receiver processes per group # 1000 groups == 40000 processes run Total time: 11.299 [sec] contended total wait max wait avg wait pid comm 19284 3.51 s 3.70 ms 181.91 us 1305863 sched-messaging 243 84.09 ms 466.67 us 346.04 us 1336608 sched-messaging 177 66.35 ms 12.08 ms 374.88 us 1220416 node For some reason, it didn't report the data failures. But you can see the total time in the workload is increased a lot (2.8 -> 11.3). If it fails early when the map is full, it goes back to normal. After: $ sudo ./perf lock con -abt -E3 -- perf bench sched messaging -g 1000 # Running 'sched/messaging' benchmark: # 20 sender and receiver processes per group # 1000 groups == 40000 processes run Total time: 3.044 [sec] contended total wait max wait avg wait pid comm 18743 591.92 ms 442.96 us 31.58 us 1431454 sched-messaging 51 210.64 ms 207.45 ms 4.13 ms 1468724 sched-messaging 81 68.61 ms 65.79 ms 847.07 us 1463183 sched-messaging === output for debug === bad: 1164137, total: 2253341 bad rate: 51.66 % histogram of failure reasons task: 0 stack: 0 time: 0 data: 1164137 Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Juri Lelli Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230406210611.1622492-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0fba226548501099616b7f1cc73c853ffd560511 Author: Namhyung Kim Date: Thu Apr 6 14:06:10 2023 -0700 perf lock contention: Revise needs_callstack() condition It needs callstacks for two reasons: * for stack aggregation mode, the map key is the stack id and it can also show the full stack traces when -v is used * for other aggregation modes, the stack filter can be used to limit lock contentions from known call paths The -v option is meaningful (in terms of stack trace) only for stack aggregation mode, so it should not set the save_callstack for other mode like with -t or -l options. I've noticed this with the following command line: $ sudo ./perf lock con -ablv -E 3 -M 16 -- ./perf bench sched messaging ... contended total wait max wait avg wait address symbol 88 4.59 ms 108.07 us 52.13 us ffff935757f46ec0 (spinlock) 33 905.22 us 73.67 us 27.43 us ffff935757f41700 (spinlock) 28 703.69 us 79.28 us 25.13 us ffff938a3d9b0c80 rq_lock (spinlock) === output for debug === bad: 12272, total: 12421 bad rate: 98.80 % histogram of failure reasons task: 8285 stack: 3987 <---------- here time: 0 data: 0 It should not have any failure on stacks since it doesn't use it. No functional change intended. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Juri Lelli Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230406210611.1622492-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit aae7e4534adbd96598d06e449d4f05867b0ed23f Author: Namhyung Kim Date: Thu Apr 6 14:06:09 2023 -0700 perf lock contention: Update total/bad stats for hidden entries When -E option is used, it only prints the given number of entries but the event stat at the end should have the numbers for entire entries. Likewise, -S option will hide entries that don't have the named function in the callstack. Also update event stat for them. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Juri Lelli Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230406210611.1622492-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 954cdac74e1e7aca518c8ef49d4fa70c8ae72d7b Author: Namhyung Kim Date: Thu Apr 6 14:06:08 2023 -0700 perf lock contention: Add data failure stat It's possible to fail to update the data when the lock_stat map is full. We should check that case and show the number at the end. $ sudo ./perf lock con -ablv -E3 -- ./perf bench sched messaging ... contended total wait max wait avg wait address symbol 6157 208.48 ms 69.29 us 33.86 us ffff934c001c1f00 (spinlock) 4030 72.04 ms 61.84 us 17.88 us ffff934c000415c0 (spinlock) 3201 50.30 ms 47.73 us 15.71 us ffff934c2eead850 (spinlock) === output for debug === bad: 0, total: 13388 bad rate: 0.00 % histogram of failure reasons task: 0 stack: 0 time: 0 data: 0 <----- added Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Juri Lelli Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230406210611.1622492-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2d8d016527928ad65ad1fe11c9943d8b81f05d18 Author: Namhyung Kim Date: Thu Apr 6 14:06:07 2023 -0700 perf lock contention: Update default map size to 16384 The BPF hash map will align the map size to a power of 2. So 10k would be 16k anyway. Let's have the actual size to avoid confusions. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Juri Lelli Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230406210611.1622492-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 84b91920304f5e640ac922cb721f5c70617a83e8 Author: Namhyung Kim Date: Thu Apr 6 14:06:06 2023 -0700 perf lock contention: Use -M for --map-nr-entries Users often want to change the map size, let's add a short option (-M) for that. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Juri Lelli Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230406210611.1622492-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d783ea8f62c4e58cea1d04567048368691128d5e Author: Namhyung Kim Date: Thu Apr 6 14:06:05 2023 -0700 perf lock contention: Simplify parse_lock_type() The get_type_flag() should check both str and name fields in the lock_type_table so that it can find the appropriate flag without retrying with ':R' or ':W' suffix from the caller. Also fix a typo in the rt-mutex. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Juri Lelli Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230406210611.1622492-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e5edf654536fc67fa663f9c69cbe6fbb3732a226 Author: Dmitry Baryshkov Date: Tue Apr 4 16:06:15 2023 +0300 drm/msm/dpu: inline IRQ_n_MASK defines IRQ masks are rarely shared between different DPU revisions. Inline them to the dpu_mdss_cfg intances and drop them from the dpu_hw_catalog.c Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530875/ Link: https://lore.kernel.org/r/20230404130622.509628-36-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit d16b77dd8658ec96fbacc6cb1aa01951ec312e59 Author: Dmitry Baryshkov Date: Tue Apr 4 16:06:13 2023 +0300 drm/msm/dpu: drop duplicate vig_sblk instances After fixing scaler version we are sure that sm8450 and sc8280xp vig sblk's are duplicates of sm8250_vig_sblk and thus can be dropped. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530876/ Link: https://lore.kernel.org/r/20230404130622.509628-34-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 5a7e3c008d3522e7eb92c645ce4ec7d285f40d1c Author: Dmitry Baryshkov Date: Tue Apr 4 16:06:10 2023 +0300 drm/msm/dpu: catalog: add comments regarding DPU_CTL_SPLIT_DISPLAY For sm8150+ the DPU_CTL_SPLIT_DISPLAY should be replaced with DPU_CTL_ACTIVE_CFG support (which supports having a single CTL for both interfaces in a split). Add comments where this conversion is required. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/530871/ Link: https://lore.kernel.org/r/20230404130622.509628-31-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 8f41187a0649d6da7d18fb7256b565657c2cdd47 Author: Dmitry Baryshkov Date: Tue Apr 4 16:06:09 2023 +0300 drm/msm/dpu: use defined symbol for sc8280xp's maxwidth Use defined name DEFAULT_DPU_OUTPUT_LINE_WIDTH instead of open coding the value. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530866/ Link: https://lore.kernel.org/r/20230404130622.509628-30-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 463ba323aeb48a6f84410a88b1880fc879130110 Author: Dmitry Baryshkov Date: Tue Apr 4 16:06:08 2023 +0300 drm/msm/dpu: expand sm8550 catalog Duplicate sm8450 catalog entries to sm8550 to remove dependencies between DPU instances. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/530864/ Link: https://lore.kernel.org/r/20230404130622.509628-29-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 5ce224840b9e9f9d4c1e8fdb8fd467a462864b7a Author: Dmitry Baryshkov Date: Tue Apr 4 16:06:07 2023 +0300 drm/msm/dpu: expand sm6115 catalog Duplicate qcm2290 catalog entries to sm6115 to remove dependencies between DPU instances. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/530862/ Link: https://lore.kernel.org/r/20230404130622.509628-28-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 02538790a8d49f37a678478e6727019c0ed9553b Author: Dmitry Baryshkov Date: Tue Apr 4 16:06:06 2023 +0300 drm/msm/dpu: expand sc7180 catalog Duplicate sm8250 catalog entries to sc7180 to remove dependencies between DPU instances. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/530861/ Link: https://lore.kernel.org/r/20230404130622.509628-27-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 2861ce202cd83077f2884a3033fcacff78574eec Author: Dmitry Baryshkov Date: Tue Apr 4 16:06:05 2023 +0300 drm/msm/dpu: expand sc8180x catalog Duplicate sm8150 catalog entries to sc8180x to remove dependencies between DPU instances. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/530859/ Link: https://lore.kernel.org/r/20230404130622.509628-26-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 9bea40825512de625f4c26d0a277bf7f53bd6ed9 Author: Dmitry Baryshkov Date: Tue Apr 4 16:06:04 2023 +0300 drm/msm/dpu: duplicate sm8350 catalog entries Duplicate some of sm8350 catalog entries to remove dependencies between DPU major generations. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530857/ Link: https://lore.kernel.org/r/20230404130622.509628-25-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 586c11233ea862221e9a8b1adf27b373bcd1dde3 Author: Dmitry Baryshkov Date: Tue Apr 4 16:06:03 2023 +0300 drm/msm/dpu: duplicate sm8250 catalog entries Duplicate some of sm8250 catalog entries to remove dependencies between DPU major generations. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530855/ Link: https://lore.kernel.org/r/20230404130622.509628-24-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 8589ccd710672b9685e34085a0df994d929ee05e Author: Dmitry Baryshkov Date: Tue Apr 4 16:06:02 2023 +0300 drm/msm/dpu: duplicate sm8150 catalog entries Duplicate some of sm8150 catalog entries to remove dependencies between DPU major generations. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530853/ Link: https://lore.kernel.org/r/20230404130622.509628-23-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 7ea3e251a84ea74f44c93f50eae34a86f2a0753b Author: Dmitry Baryshkov Date: Tue Apr 4 16:06:01 2023 +0300 drm/msm/dpu: duplicate sc7180 catalog entries Duplicate some of sc7180 catalog entries to remove dependencies between DPU major generations. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530851/ Link: https://lore.kernel.org/r/20230404130622.509628-22-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 460c410f02e4f12d5200e6178f4b8bd1a18b7081 Author: Dmitry Baryshkov Date: Tue Apr 4 16:06:00 2023 +0300 drm/msm/dpu: duplicate sdm845 catalog entries Duplicate some of sdm845 catalog entries to remove dependencies between DPU major generations. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530849/ Link: https://lore.kernel.org/r/20230404130622.509628-21-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 9a4425f404c3611a186a8fcd2148088ef78ab0cd Author: Dmitry Baryshkov Date: Tue Apr 4 16:05:59 2023 +0300 drm/msm/dpu: split SDM845 catalog entry to the separate file Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530846/ Link: https://lore.kernel.org/r/20230404130622.509628-20-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 1c611c481e8d1edd2d5535c23ebc905ba3da6b02 Author: Dmitry Baryshkov Date: Tue Apr 4 16:05:58 2023 +0300 drm/msm/dpu: split MSM8998 catalog entry to the separate file Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530839/ Link: https://lore.kernel.org/r/20230404130622.509628-19-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 25035306871ec64577aec7b2e75c261e8e6ce758 Author: Dmitry Baryshkov Date: Tue Apr 4 16:05:57 2023 +0300 drm/msm/dpu: split SM8150 catalog entry to the separate file Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530844/ Link: https://lore.kernel.org/r/20230404130622.509628-18-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 97e2c8037694c2710e63e8cec35bb0ed490d7b9c Author: Dmitry Baryshkov Date: Tue Apr 4 16:05:56 2023 +0300 drm/msm/dpu: split SC8180X catalog entry to the separate file Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530842/ Link: https://lore.kernel.org/r/20230404130622.509628-17-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 2f36168e325749f5d9e582894fdea88c3b622cc7 Author: Dmitry Baryshkov Date: Tue Apr 4 16:05:55 2023 +0300 drm/msm/dpu: split SM8250 catalog entry to the separate file Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530836/ Link: https://lore.kernel.org/r/20230404130622.509628-16-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit c9cd1552e95b66847773383f58b47878116a8fb9 Author: Dmitry Baryshkov Date: Tue Apr 4 16:05:54 2023 +0300 drm/msm/dpu: split SC7180 catalog entry to the separate file Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530835/ Link: https://lore.kernel.org/r/20230404130622.509628-15-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit c22a42bd3eb7cf8699f8517bbd489c16c80195e2 Author: Dmitry Baryshkov Date: Tue Apr 4 16:05:53 2023 +0300 drm/msm/dpu: split QCM2290 catalog entry to the separate file Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530837/ Link: https://lore.kernel.org/r/20230404130622.509628-14-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 01f2e9a70be1bcd5d8f1bdd202b91d03a573da86 Author: Dmitry Baryshkov Date: Tue Apr 4 16:05:52 2023 +0300 drm/msm/dpu: split SM6115 catalog entry to the separate file Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530830/ Link: https://lore.kernel.org/r/20230404130622.509628-13-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit b8ece0c61e13ef17e8d36180990ade97b6f39d0b Author: Dmitry Baryshkov Date: Tue Apr 4 16:05:51 2023 +0300 drm/msm/dpu: split SM8350 catalog entry to the separate file Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530832/ Link: https://lore.kernel.org/r/20230404130622.509628-12-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit f0f2c32a662c211b3ab40851130dd58aca29abf2 Author: Dmitry Baryshkov Date: Tue Apr 4 16:05:50 2023 +0300 drm/msm/dpu: split SC7280 catalog entry to the separate file Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530828/ Link: https://lore.kernel.org/r/20230404130622.509628-11-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 225978f439862258b362a70e39061a430b5e175c Author: Dmitry Baryshkov Date: Tue Apr 4 16:05:49 2023 +0300 drm/msm/dpu: split SC8280XP catalog entry to the separate file Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530825/ Link: https://lore.kernel.org/r/20230404130622.509628-10-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 9cc547933636fa0656b52691f24373ccd7ec61cb Author: Dmitry Baryshkov Date: Tue Apr 4 16:05:47 2023 +0300 drm/msm/dpu: split SM8550 catalog entry to the separate file Reviewed-by: Konrad DYbcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530824/ Link: https://lore.kernel.org/r/20230404130622.509628-8-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit fbbd8cce803a2ca86ae20fe37b1642571e9dd971 Author: Dmitry Baryshkov Date: Tue Apr 4 16:05:46 2023 +0300 drm/msm/dpu: move UBWC/memory configuration to separate struct UBWC and highest bank settings differ slightly between different DPU units of the same generation, while the dpu_caps and dpu_mdp_cfg are much more stable. To ease configuration reuse move ubwc_swizzle and highest_bank_bit data to separate structure. Reviewed-by: Konrad Dybcio Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530820/ Link: https://lore.kernel.org/r/20230404130622.509628-7-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit ac1c5ed678e81a8d95355fb5485e3b1df31c801f Author: Dmitry Baryshkov Date: Tue Apr 4 16:05:45 2023 +0300 drm/msm/dpu: mark remaining pp data as const Fix several leftover _pp strutures and mark them as const, making all hw catalog fit into the rodata section. Reviewed-by: Konrad Dybcio Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530821/ Link: https://lore.kernel.org/r/20230404130622.509628-6-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit fc4fcfb0744b00291bc979e72ced499cc7448a98 Author: Dmitry Baryshkov Date: Tue Apr 4 16:05:44 2023 +0300 drm/msm/dpu: constify DSC data structures DSC hw catalog data is not supposed to be changed, so mark it as const data. Reviewed-by: Konrad Dybcio Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530818/ Link: https://lore.kernel.org/r/20230404130622.509628-5-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 8399a5ff18dc634d3245d993ee8a906b5c6ffba3 Author: Konrad Dybcio Date: Tue Apr 4 16:05:43 2023 +0300 drm/msm/dpu: Allow variable INTF_BLK size These blocks are of variable length on different SoCs. Set the correct values where I was able to retrieve it from downstream DTs and leave the old defaults (0x280) otherwise. Signed-off-by: Konrad Dybcio [DB: fixed some lengths, split the INTF changes away] Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/530816/ Link: https://lore.kernel.org/r/20230404130622.509628-4-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 8f940ddbc4f1b6cc454d9487f9cd735310fb0cfa Author: Konrad Dybcio Date: Tue Apr 4 16:05:42 2023 +0300 drm/msm/dpu: Allow variable SSPP_BLK size These blocks are of variable length on different SoCs. Set the correct values where I was able to retrieve it from downstream DTs and leave the old defaults (0x1c8) otherwise. Signed-off-by: Konrad Dybcio [DB: fixed some of lengths, split the INTF changes away] Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530814/ Link: https://lore.kernel.org/r/20230404130622.509628-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit f7a858bffcddaaf70c71b6b656e7cc21b6107cec Author: Liam Howlett Date: Fri Nov 25 15:50:16 2022 +0000 tools: Rename __fallthrough to fallthrough Rename the fallthrough attribute to better align with the kernel version. Copy the definition from include/linux/compiler_attributes.h including the #else clause. Adding the #else clause allows the tools compiler.h header to drop the check for a definition entirely and keeps both definitions together. Change any __fallthrough statements to fallthrough anywhere it was used within perf. This allows other tools to use the same key word as the kernel. Committer notes: Did some missing conversions to: builtin-list.c Also included gtk.h before the 'fallthrough' definition in: tools/perf/ui/gtk/hists.c tools/perf/ui/gtk/helpline.c tools/perf/ui/gtk/browser.c As it is the arg name for a macro in glib.h: /var/home/acme/git/perf-tools-next/tools/include/linux/compiler-gcc.h:16:55: error: missing binary operator before token "(" 16 | # define fallthrough __attribute__((__fallthrough__)) | ^ /usr/include/glib-2.0/glib/gmacros.h:637:28: note: in expansion of macro ‘fallthrough’ 637 | #if g_macro__has_attribute(fallthrough) Reviewed-by: Miguel Ojeda Signed-off-by: Liam Howlett Cc: Ingo Molnar Cc: Mark Rutland Cc: Miguel Ojeda Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Rasmus Villemoes Cc: Tom Rix Cc: linux-sparse@vger.kernel.org Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20221125154947.2163498-1-Liam.Howlett@oracle.com Signed-off-by: Arnaldo Carvalho de Melo commit 0ea8920e86e3232c56dc812c1f363fd20fce46c6 Author: Ian Rogers Date: Wed Apr 5 23:52:24 2023 -0700 perf pmu: Fix a few potential fd leaks Ensure fd is closed on error paths. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Gaosheng Cui Cc: German Gomez Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Leo Yan Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sean Christopherson Cc: Suzuki Poulouse Link: https://lore.kernel.org/r/20230406065224.2553640-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3d88aec0d42eec26b633fb2a473e294a1125bbd7 Author: Ian Rogers Date: Wed Apr 5 23:52:23 2023 -0700 perf pmu: Make parser reentrant By default bison uses global state for compatibility with yacc. Make the parser reentrant so that it may be used in asynchronous and multithreaded situations. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Gaosheng Cui Cc: German Gomez Cc: Ingo Molnar Cc: James Clark Cc: Jing Zhang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Rob Herring Cc: Sean Christopherson Cc: Suzuki Poulouse Link: https://lore.kernel.org/r/20230406065224.2553640-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 649bccd7fac98225525c79cf4b1cecc4bafdfc54 Author: Like Xu Date: Tue Feb 14 13:07:48 2023 +0800 KVM: x86/pmu: Rewrite reprogram_counters() to improve performance A valid pmc is always tested before using pmu->reprogram_pmi. Eliminate this part of the redundancy by setting the counter's bitmask directly, and in addition, trigger KVM_REQ_PMU only once to save more cpu cycles. Signed-off-by: Like Xu Link: https://lore.kernel.org/r/20230214050757.9623-4-likexu@tencent.com Signed-off-by: Sean Christopherson commit 8bca8c5ce40b03862d782b9991da146909199327 Author: Sean Christopherson Date: Thu Jan 26 17:08:03 2023 -0800 KVM: VMX: Refactor intel_pmu_{g,}set_msr() to align with other helpers Invert the flows in intel_pmu_{g,s}et_msr()'s case statements so that they follow the kernel's preferred style of: if () return return which is also the style used by every other {g,s}et_msr() helper (except AMD's PMU variant, which doesn't use a switch statement). Modify the "set" paths with costly side effects, i.e. that reprogram counters, to skip only the side effects, i.e. to perform reserved bits checks even if the value is unchanged. None of the reserved bits checks are expensive, so there's no strong justification for skipping them, and guarding only the side effect makes it slightly more obvious what is being skipped and why. No functional change intended (assuming no reserved bit bugs). Link: https://lkml.kernel.org/r/Y%2B6cfen%2FCpO3%2FdLO%40google.com Signed-off-by: Sean Christopherson commit cdd2fbf6360e84c02ac4cea11733083c2ca8dace Author: Like Xu Date: Tue Feb 14 13:07:46 2023 +0800 KVM: x86/pmu: Rename pmc_is_enabled() to pmc_is_globally_enabled() The name of function pmc_is_enabled() is a bit misleading. A PMC can be disabled either by PERF_CLOBAL_CTRL or by its corresponding EVTSEL. Append global semantics to its name. Suggested-by: Jim Mattson Signed-off-by: Like Xu Link: https://lore.kernel.org/r/20230214050757.9623-2-likexu@tencent.com Signed-off-by: Sean Christopherson commit 4daf0b327f2032ecacd2fb00c46999619f530972 Merge: a5f1da6601a0b 23a88fae9f20d Author: Alexei Starovoitov Date: Thu Apr 6 15:26:08 2023 -0700 Merge branch 'bpf: Improve verifier for cond_op and spilled loop index variables' Yonghong Song says: ==================== LLVM commit [1] introduced hoistMinMax optimization like (i < VIRTIO_MAX_SGS) && (i < out_sgs) to upper = MIN(VIRTIO_MAX_SGS, out_sgs) ... i < upper ... and caused the verification failure. Commit [2] workarounded the issue by adding some bpf assembly code to prohibit the above optimization. This patch improved verifier such that verification can succeed without the above workaround. Without [2], the current verifier will hit the following failures: ... 119: (15) if r1 == 0x0 goto pc+1 The sequence of 8193 jumps is too complex. verification time 525829 usec stack depth 64 processed 156616 insns (limit 1000000) max_states_per_insn 8 total_states 1754 peak_states 1712 mark_read 12 -- END PROG LOAD LOG -- libbpf: prog 'trace_virtqueue_add_sgs': failed to load: -14 libbpf: failed to load object 'loop6.bpf.o' ... The failure is due to verifier inadequately handling ' ' which will go through both pathes and generate the following verificaiton states: ... 89: (07) r2 += 1 ; R2_w=5 90: (79) r8 = *(u64 *)(r10 -48) ; R8_w=scalar() R10=fp0 91: (79) r1 = *(u64 *)(r10 -56) ; R1_w=scalar(umax=5,var_off=(0x0; 0x7)) R10=fp0 92: (ad) if r2 < r1 goto pc+41 ; R0_w=scalar() R1_w=scalar(umin=6,umax=5,var_off=(0x4; 0x3)) R2_w=5 R6_w=scalar(id=385) R7_w=0 R8_w=scalar() R9_w=scalar(umax=21474836475,var_off=(0x0; 0x7ffffffff)) R10=fp0 fp-8=mmmmmmmm fp-16=mmmmmmmm fp-24=mmmm???? fp-32= fp-40_w=4 fp-48=mmmmmmmm fp-56= fp-64=mmmmmmmm ... 89: (07) r2 += 1 ; R2_w=6 90: (79) r8 = *(u64 *)(r10 -48) ; R8_w=scalar() R10=fp0 91: (79) r1 = *(u64 *)(r10 -56) ; R1_w=scalar(umax=5,var_off=(0x0; 0x7)) R10=fp0 92: (ad) if r2 < r1 goto pc+41 ; R0_w=scalar() R1_w=scalar(umin=7,umax=5,var_off=(0x4; 0x3)) R2_w=6 R6=scalar(id=388) R7=0 R8_w=scalar() R9_w=scalar(umax=25769803770,var_off=(0x0; 0x7ffffffff)) R10=fp0 fp-8=mmmmmmmm fp-16=mmmmmmmm fp-24=mmmm???? fp-32= fp-40=5 fp-48=mmmmmmmm fp-56= fp-64=mmmmmmmm ... 89: (07) r2 += 1 ; R2_w=4088 90: (79) r8 = *(u64 *)(r10 -48) ; R8_w=scalar() R10=fp0 91: (79) r1 = *(u64 *)(r10 -56) ; R1_w=scalar(umax=5,var_off=(0x0; 0x7)) R10=fp0 92: (ad) if r2 < r1 goto pc+41 ; R0=scalar() R1=scalar(umin=4089,umax=5,var_off=(0x0; 0x7)) R2=4088 R6=scalar(id=12634) R7=0 R8=scalar() R9=scalar(umax=17557826301960,var_off=(0x0; 0xfffffffffff)) R10=fp0 fp-8=mmmmmmmm fp-16=mmmmmmmm fp-24=mmmm???? fp-32= fp-40=4087 fp-48=mmmmmmmm fp-56= fp-64=mmmmmmmm Patch 3 fixed the above issue by handling ' ' properly. During developing selftests for Patch 3, I found some issues with bound deduction with BPF_EQ/BPF_NE and fixed the issue in Patch 1. After the above issue is fixed, the second issue shows up. ... 67: (07) r1 += -16 ; R1_w=fp-16 ; bpf_probe_read_kernel(&sgp, sizeof(sgp), sgs + i); 68: (b4) w2 = 8 ; R2_w=8 69: (85) call bpf_probe_read_kernel#113 ; R0_w=scalar() fp-16=mmmmmmmm ; return sgp; 70: (79) r6 = *(u64 *)(r10 -16) ; R6=scalar() R10=fp0 ; for (n = 0, sgp = get_sgp(sgs, i); sgp && (n < SG_MAX); 71: (15) if r6 == 0x0 goto pc-49 ; R6=scalar() 72: (b4) w1 = 0 ; R1_w=0 73: (05) goto pc-46 ; for (i = 0; (i < VIRTIO_MAX_SGS) && (i < out_sgs); i++) { 28: (bc) w7 = w1 ; R1_w=0 R7_w=0 ; bpf_probe_read_kernel(&len, sizeof(len), &sgp->length); ... 23: (79) r3 = *(u64 *)(r10 -40) ; R3_w=2 R10=fp0 ; for (i = 0; (i < VIRTIO_MAX_SGS) && (i < out_sgs); i++) { 24: (07) r3 += 1 ; R3_w=3 ; for (i = 0; (i < VIRTIO_MAX_SGS) && (i < out_sgs); i++) { 25: (79) r1 = *(u64 *)(r10 -56) ; R1_w=scalar(umax=5,var_off=(0x0; 0x7)) R10=fp0 26: (ad) if r3 < r1 goto pc+34 61: R0=scalar() R1_w=scalar(umin=4,umax=5,var_off=(0x4; 0x1)) R3_w=3 R6=scalar(id=1658) R7=0 R8=scalar(id=1653) R9=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) R10=fp0 fp-8=mmmmmmmm fp-16=mmmmmmmm fp-24=mmmm???? fp-32= fp-40=2 fp-56= fp-64=mmmmmmmm ; if (sg_is_chain(&sg)) 61: (7b) *(u64 *)(r10 -40) = r3 ; R3_w=3 R10=fp0 fp-40_w=3 ... 67: (07) r1 += -16 ; R1_w=fp-16 ; bpf_probe_read_kernel(&sgp, sizeof(sgp), sgs + i); 68: (b4) w2 = 8 ; R2_w=8 69: (85) call bpf_probe_read_kernel#113 ; R0_w=scalar() fp-16=mmmmmmmm ; return sgp; 70: (79) r6 = *(u64 *)(r10 -16) ; for (n = 0, sgp = get_sgp(sgs, i); sgp && (n < SG_MAX); infinite loop detected at insn 71 verification time 90800 usec stack depth 64 processed 25017 insns (limit 1000000) max_states_per_insn 20 total_states 491 peak_states 169 mark_read 12 -- END PROG LOAD LOG -- libbpf: prog 'trace_virtqueue_add_sgs': failed to load: -22 Further analysis found the index variable 'i' is spilled but since it is not marked as precise. This is more tricky as identifying induction variable is not easy in verifier. Although a heuristic is possible, let us leave it for now. [1] https://reviews.llvm.org/D143726 [2] Commit 3c2611bac08a ("selftests/bpf: Fix trace_virtqueue_add_sgs test issue with LLVM 17.") ==================== Signed-off-by: Alexei Starovoitov commit 23a88fae9f20d47bb3aed99b1e08d0d6cf65cf0c Author: Yonghong Song Date: Thu Apr 6 09:45:10 2023 -0700 selftests/bpf: Add verifier tests for code pattern ' ' Add various tests for code pattern ' ' to exercise the previous verifier patch. The following are veristat changed number of processed insns stat comparing the previous patch vs. this patch: File Program Insns (A) Insns (B) Insns (DIFF) ----------------------------------------------------- ---------------------------------------------------- --------- --------- ------------- test_seg6_loop.bpf.linked3.o __add_egr_x 12423 12314 -109 (-0.88%) Only one program is affected with minor change. Signed-off-by: Yonghong Song Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230406164510.1047757-1-yhs@fb.com Signed-off-by: Alexei Starovoitov commit 953d9f5beaf75e88c69a13d70ce424cd606a29f5 Author: Yonghong Song Date: Thu Apr 6 09:45:05 2023 -0700 bpf: Improve handling of pattern ' ' in verifier Currently, the verifier does not handle ' ' well. For example, ... 10: (79) r1 = *(u64 *)(r10 -16) ; R1_w=scalar() R10=fp0 11: (b7) r2 = 0 ; R2_w=0 12: (2d) if r2 > r1 goto pc+2 13: (b7) r0 = 0 14: (95) exit 15: (65) if r1 s> 0x1 goto pc+3 16: (0f) r0 += r1 ... At insn 12, verifier decides both true and false branch are possible, but actually only false branch is possible. Currently, the verifier already supports patterns ' . Add support for patterns ' ' in a similar way. Also fix selftest 'verifier_bounds_mix_sign_unsign/bounds checks mixing signed and unsigned, variant 10' due to this change. Signed-off-by: Yonghong Song Acked-by: Dave Marchevsky Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230406164505.1046801-1-yhs@fb.com Signed-off-by: Alexei Starovoitov commit aec08d677b4d0adeb7412fa98547cf07bfce6fea Author: Yonghong Song Date: Thu Apr 6 09:45:00 2023 -0700 selftests/bpf: Add tests for non-constant cond_op NE/EQ bound deduction Add various tests for code pattern ' NE/EQ ' implemented in the previous verifier patch. Without the verifier patch, these new tests will fail. Signed-off-by: Yonghong Song Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230406164500.1045715-1-yhs@fb.com Signed-off-by: Alexei Starovoitov commit 13fbcee55706db45ce047a7cea14811d68f94ee3 Author: Yonghong Song Date: Thu Apr 6 09:44:55 2023 -0700 bpf: Improve verifier JEQ/JNE insn branch taken checking Currently, for BPF_JEQ/BPF_JNE insn, verifier determines whether the branch is taken or not only if both operands are constants. Therefore, for the following code snippet, 0: (85) call bpf_ktime_get_ns#5 ; R0_w=scalar() 1: (a5) if r0 < 0x3 goto pc+2 ; R0_w=scalar(umin=3) 2: (b7) r2 = 2 ; R2_w=2 3: (1d) if r0 == r2 goto pc+2 6 At insn 3, since r0 is not a constant, verifier assumes both branch can be taken which may lead inproper verification failure. Add comparing umin/umax value and the constant. If the umin value is greater than the constant, or umax value is smaller than the constant, for JEQ the branch must be not-taken, and for JNE the branch must be taken. The jmp32 mode JEQ/JNE branch taken checking is also handled similarly. The following lists the veristat result w.r.t. changed number of processes insns during verification: File Program Insns (A) Insns (B) Insns (DIFF) ----------------------------------------------------- ---------------------------------------------------- --------- --------- --------------- test_cls_redirect.bpf.linked3.o cls_redirect 64980 73472 +8492 (+13.07%) test_seg6_loop.bpf.linked3.o __add_egr_x 12425 12423 -2 (-0.02%) test_tcp_hdr_options.bpf.linked3.o estab 2634 2558 -76 (-2.89%) test_parse_tcp_hdr_opt.bpf.linked3.o xdp_ingress_v6 1421 1420 -1 (-0.07%) test_parse_tcp_hdr_opt_dynptr.bpf.linked3.o xdp_ingress_v6 1238 1237 -1 (-0.08%) test_tc_dtime.bpf.linked3.o egress_fwdns_prio100 414 411 -3 (-0.72%) Mostly a small improvement but test_cls_redirect.bpf.linked3.o has a 13% regression. I checked with verifier log and found it this is due to pruning. For some JEQ/JNE branches impacted by this patch, one branch is explored and the other has state equivalence and pruned. Signed-off-by: Yonghong Song Acked-by: Dave Marchevsky Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230406164455.1045294-1-yhs@fb.com Signed-off-by: Alexei Starovoitov commit 360cd42c4e95ff06d8d7b0a54e42236c7e7c187f Author: Pavel Begunkov Date: Thu Apr 6 14:20:14 2023 +0100 io_uring: optimise io_req_local_work_add Chains of memory accesses are never good for performance. The req->task->io_uring->in_cancel in io_req_local_work_add() is there so that when a task is exiting via io_uring_try_cancel_requests() and starts waiting for completions, it gets woken up by every new task_work item queued. Do a little trick by announcing waiting in io_uring_try_cancel_requests(), making io_req_local_work_add() wake us up. We also need to check for deferred tw items after prepare_to_wait(TASK_INTERRUPTIBLE); Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/fb11597e9bbcb365901824f8c5c2cf0d6ee100d0.1680782017.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c66ae3ec38f946edb1776d25c1c8cd63803b8ec3 Author: Pavel Begunkov Date: Thu Apr 6 14:20:13 2023 +0100 io_uring: refactor __io_cq_unlock_post_flush() Separate ->task_complete path in __io_cq_unlock_post_flush(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/baa9b8d822f024e4ee01c40209dbbe38d9c8c11d.1680782017.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 8751d15426a31baaf40f7570263c27c3e5d1dc44 Author: Pavel Begunkov Date: Thu Apr 6 14:20:12 2023 +0100 io_uring: reduce scheduling due to tw Every task_work will try to wake the task to be executed, which causes excessive scheduling and additional overhead. For some tw it's justified, but others won't do much but post a single CQE. When a task waits for multiple cqes, every such task_work will wake it up. Instead, the task may give a hint about how many cqes it waits for, io_req_local_work_add() will compare against it and skip wake ups if #cqes + #tw is not enough to satisfy the waiting condition. Task_work that uses the optimisation should be simple enough and never post more than one CQE. It's also ignored for non DEFER_TASKRUN rings. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d2b77e99d1e86624d8a69f7037d764b739dcd225.1680782017.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 5150940079a3ce94d7474f6f5b0d6276569dc1de Author: Pavel Begunkov Date: Thu Apr 6 14:20:11 2023 +0100 io_uring: inline llist_add() We'll need to grab some information from the previous request in the tw list, inline llist_add(), it'll be used in the following patch. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f0165493af7b379943c792114b972f331e7d7d10.1680782017.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 8501fe70ae9855076ffb03a3670e02a7b3437304 Author: Pavel Begunkov Date: Thu Apr 6 14:20:10 2023 +0100 io_uring: add tw add flags We pass 'allow_local' into io_req_task_work_add() but will need more flags. Replace it with a flags bit field and name this allow_local flag. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4c0f01e7ef4e6feebfb199093cc995af7a19befa.1680782017.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 6e7248adf8f7adb5e36ec1e91efcc85a83bf8aeb Author: Pavel Begunkov Date: Thu Apr 6 14:20:09 2023 +0100 io_uring: refactor io_cqring_wake() Instead of smp_mb() + __io_cqring_wake() in __io_cq_unlock_post_flush() use equivalent io_cqring_wake(). With that we can clean it up further and remove __io_cqring_wake(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/662ee5d898168ac206be06038525e97b64072a46.1680782017.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit d73a572df24661851465c821d33c03e70e4b68e5 Author: Pavel Begunkov Date: Thu Apr 6 14:20:08 2023 +0100 io_uring: optimize local tw add ctx pinning We currently pin the ctx for io_req_local_work_add() with percpu_ref_get/put, which implies two rcu_read_lock/unlock pairs and some extra overhead on top in the fast path. Replace it with a pure rcu read and let io_ring_exit_work() synchronise against it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/cbdfcb6b232627f30e9e50ef91f13c4f05910247.1680782017.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit ab1c590f5c9b96d8d8843d351aed72469f8f2ef0 Author: Pavel Begunkov Date: Thu Apr 6 14:20:07 2023 +0100 io_uring: move pinning out of io_req_local_work_add Move ctx pinning from io_req_local_work_add() to the caller, looks better and makes working with the code a bit easier. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/49c0dbed390b0d6d04cb942dd3592879fd5bfb1b.1680782017.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 650e2cb50f3fc45d0585ed8609db9519f6c9bcd8 Author: Chengming Zhou Date: Thu Apr 6 22:50:50 2023 +0800 blk-cgroup: delete cpd_init_fn of blkcg_policy blkcg_policy cpd_init_fn() is used to just initialize some default fields of policy data, which is enough to do in cpd_alloc_fn(). This patch delete the only user bfq_cpd_init(), and remove cpd_init_fn from blkcg_policy. Signed-off-by: Chengming Zhou Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230406145050.49914-4-zhouchengming@bytedance.com Signed-off-by: Jens Axboe commit d1023165eef83dace7cc6299af904f26272baaca Author: Chengming Zhou Date: Thu Apr 6 22:50:49 2023 +0800 blk-cgroup: delete cpd_bind_fn of blkcg_policy cpd_bind_fn is just used for update default weight when block subsys attached to a hierarchy. No any policy need it anymore. Signed-off-by: Chengming Zhou Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230406145050.49914-3-zhouchengming@bytedance.com Signed-off-by: Jens Axboe commit e9f2f3f590289681c71d0137d4e5e88421f934c6 Author: Chengming Zhou Date: Thu Apr 6 22:50:48 2023 +0800 block, bfq: remove BFQ_WEIGHT_LEGACY_DFL BFQ_WEIGHT_LEGACY_DFL is the same as CGROUP_WEIGHT_DFL, which means we don't need cpd_bind_fn() callback to update default weight when attached to a hierarchy. This patch remove BFQ_WEIGHT_LEGACY_DFL and cpd_bind_fn(). Signed-off-by: Chengming Zhou Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230406145050.49914-2-zhouchengming@bytedance.com Signed-off-by: Jens Axboe commit d8f992e9fde8dc23b6fe649fa1b0ed5c123738fe Author: Sean Christopherson Date: Fri Mar 10 16:46:18 2023 -0800 KVM: selftests: Verify LBRs are disabled if vPMU is disabled Verify that disabling the guest's vPMU via CPUID also disables LBRs. KVM has had at least one bug where LBRs would remain enabled even though the intent was to disable everything PMU related. Link: https://lore.kernel.org/r/20230311004618.920745-22-seanjc@google.com Signed-off-by: Sean Christopherson commit 8b95b4155523dcb5412a73c631c680098bcbbb40 Author: Sean Christopherson Date: Fri Mar 10 16:46:17 2023 -0800 KVM: selftests: Add negative testcase for PEBS format in PERF_CAPABILITIES Expand the immutable features sub-test for PERF_CAPABILITIES to verify KVM rejects any attempt to use a PEBS format other than the host's. Link: https://lore.kernel.org/r/20230311004618.920745-21-seanjc@google.com Signed-off-by: Sean Christopherson commit 8ac2f774b9ead749720fe7a648e6c6ada57e01f3 Author: Sean Christopherson Date: Fri Mar 10 16:46:16 2023 -0800 KVM: selftests: Refactor LBR_FMT test to avoid use of separate macro Rework the LBR format test to use the bitfield instead of a separate mask macro, mainly so that adding a nearly-identical PEBS format test doesn't have to copy-paste-tweak the macro too. No functional change intended. Link: https://lore.kernel.org/r/20230311004618.920745-20-seanjc@google.com Signed-off-by: Sean Christopherson commit bc7bb0082960d030171e11ed4e4b518950415625 Author: Sean Christopherson Date: Fri Mar 10 16:46:15 2023 -0800 KVM: selftests: Drop "all done!" printf() from PERF_CAPABILITIES test Drop the arbitrary "done" message from the VMX PMU caps test, it's pretty obvious the test is done when the process exits. Link: https://lore.kernel.org/r/20230311004618.920745-19-seanjc@google.com Signed-off-by: Sean Christopherson commit 81fd92411264e4f7b982bb6066b4bc04311bc48a Author: Sean Christopherson Date: Fri Mar 10 16:46:14 2023 -0800 KVM: selftests: Test post-KVM_RUN writes to PERF_CAPABILITIES Now that KVM disallows changing PERF_CAPABILITIES after KVM_RUN, expand the host side checks to verify KVM rejects any attempts to change bits from userspace. Link: https://lore.kernel.org/r/20230311004618.920745-18-seanjc@google.com Signed-off-by: Sean Christopherson commit baa36dac6ca8ecd709dafb87a79d3bead40e48fe Author: Sean Christopherson Date: Fri Mar 10 16:46:13 2023 -0800 KVM: selftests: Expand negative testing of guest writes to PERF_CAPABILITIES Test that the guest can't write 0 to PERF_CAPABILITIES, can't write the current value, and can't toggle _any_ bits. There is no reason to special case the LBR format. Link: https://lore.kernel.org/r/20230311004618.920745-17-seanjc@google.com Signed-off-by: Sean Christopherson commit a2a34d148e75c242fd059e8c7ab31e88396013b6 Author: Sean Christopherson Date: Fri Mar 10 16:46:12 2023 -0800 KVM: selftests: Test all immutable non-format bits in PERF_CAPABILITIES Add negative testing of all immutable bits in PERF_CAPABILITIES, i.e. single bits that are reserved-0 or are effectively reserved-1 by KVM. Omit LBR and PEBS format bits from the test as it's easier to test them manually than it is to add safeguards to the comment path, e.g. toggling a single bit can yield a format of '0', which is legal as a "disable" value. Link: https://lore.kernel.org/r/20230311004618.920745-16-seanjc@google.com Signed-off-by: Sean Christopherson commit 37f4e79c43e5750e75b3de8726b4c21bae6ab7aa Author: Sean Christopherson Date: Fri Mar 10 16:46:11 2023 -0800 KVM: selftests: Test all fungible features in PERF_CAPABILITIES Verify that userspace can set all fungible features in PERF_CAPABILITIES. Drop the now unused #define of the "full-width writes" flag. Link: https://lore.kernel.org/r/20230311004618.920745-15-seanjc@google.com Signed-off-by: Sean Christopherson commit 69713940d2b4de34a6923fc202e1796dc2f79604 Author: Sean Christopherson Date: Fri Mar 10 16:46:10 2023 -0800 KVM: selftests: Drop now-redundant checks on PERF_CAPABILITIES writes Now that vcpu_set_msr() verifies the expected "read what was wrote" semantics of all durable MSRs, including PERF_CAPABILITIES, drop the now-redundant manual checks in the VMX PMU caps test. Link: https://lore.kernel.org/r/20230311004618.920745-14-seanjc@google.com Signed-off-by: Sean Christopherson commit f138258565d18f0f9a8d07f04162c68eee997ce6 Author: Sean Christopherson Date: Fri Mar 10 16:46:09 2023 -0800 KVM: selftests: Verify KVM preserves userspace writes to "durable" MSRs Assert that KVM provides "read what you wrote" semantics for all "durable" MSRs (for lack of a better name). The extra coverage is cheap from a runtime performance perspective, and verifying the behavior in the common helper avoids gratuitous copy+paste in individual tests. Note, this affects all tests that set MSRs from userspace! Link: https://lore.kernel.org/r/20230311004618.920745-13-seanjc@google.com Signed-off-by: Sean Christopherson commit 22234c2495eafd6b8f1f26c6c6adc12aca60fd7f Author: Sean Christopherson Date: Fri Mar 10 16:46:08 2023 -0800 KVM: selftests: Print out failing MSR and value in vcpu_set_msr() Reimplement vcpu_set_msr() as a macro and pretty print the failing MSR (when possible) and the value if KVM_SET_MSRS fails instead of using the using the standard KVM_IOCTL_ERROR(). KVM_SET_MSRS is somewhat odd in that it returns the index of the last successful write, i.e. will be '0' on failure barring an entirely different KVM bug. And for writing MSRs, the MSR being written and the value being written are almost always relevant to the failure, i.e. just saying "failed!" doesn't help debug. Place the string goo in a separate macro in anticipation of using it to further expand MSR testing. Link: https://lore.kernel.org/r/20230311004618.920745-12-seanjc@google.com Signed-off-by: Sean Christopherson commit b1b705627cb3c23333e04637d7a90833b560584e Author: Sean Christopherson Date: Fri Mar 10 16:46:07 2023 -0800 KVM: selftests: Assert that full-width PMC writes are supported if PDCM=1 KVM emulates full-width PMC writes in software, assert that KVM reports full-width writes as supported if PERF_CAPABILITIES is supported. Link: https://lore.kernel.org/r/20230311004618.920745-11-seanjc@google.com Signed-off-by: Sean Christopherson commit 710fb612672e0c05fe3f56fb4e81fae22ef492a2 Author: Sean Christopherson Date: Fri Mar 10 16:46:06 2023 -0800 KVM: selftests: Move 0/initial value PERF_CAPS checks to dedicated sub-test Use a separate sub-test to verify userspace can clear PERF_CAPABILITIES and restore it to the KVM-supported value, as the testcase isn't unique to the LBR format. Link: https://lore.kernel.org/r/20230311004618.920745-10-seanjc@google.com Signed-off-by: Sean Christopherson commit 957d0f70e97bb2257d8bf746ff2f524b793751b3 Author: Sean Christopherson Date: Fri Mar 10 16:46:05 2023 -0800 KVM: x86/pmu: Zero out LBR capabilities during PMU refresh Zero out the LBR capabilities during PMU refresh to avoid exposing LBRs to the guest against userspace's wishes. If userspace modifies the guest's CPUID model or invokes KVM_CAP_PMU_CAPABILITY to disable vPMU after an initial KVM_SET_CPUID2, but before the first KVM_RUN, KVM will retain the previous LBR info due to bailing before refreshing the LBR descriptor. Note, this is a very theoretical bug, there is no known use case where a VMM would deliberately enable the vPMU via KVM_SET_CPUID2, and then later disable the vPMU. Link: https://lore.kernel.org/r/20230311004618.920745-9-seanjc@google.com Signed-off-by: Sean Christopherson commit 3a6de51a437fb4d2433f8a99fb59f43866cdbb98 Author: Sean Christopherson Date: Fri Mar 10 16:46:04 2023 -0800 KVM: x86/pmu: WARN and bug the VM if PMU is refreshed after vCPU has run Now that KVM disallows changing feature MSRs, i.e. PERF_CAPABILITIES, after running a vCPU, WARN and bug the VM if the PMU is refreshed after the vCPU has run. Note, KVM has disallowed CPUID updates after running a vCPU since commit feb627e8d6f6 ("KVM: x86: Forbid KVM_SET_CPUID{,2} after KVM_RUN"), i.e. PERF_CAPABILITIES was the only remaining way to trigger a PMU refresh after KVM_RUN. Cc: Like Xu Link: https://lore.kernel.org/r/20230311004618.920745-8-seanjc@google.com Signed-off-by: Sean Christopherson commit 0094f62c7eaaaf53a011a4e46f9f32e5f3295e8c Author: Sean Christopherson Date: Fri Mar 10 16:46:03 2023 -0800 KVM: x86: Disallow writes to immutable feature MSRs after KVM_RUN Disallow writes to feature MSRs after KVM_RUN to prevent userspace from changing the vCPU model after running the vCPU. Similar to guest CPUID, KVM uses feature MSRs to configure intercepts, determine what operations are/aren't allowed, etc. Changing the capabilities while the vCPU is active will at best yield unpredictable guest behavior, and at worst could be dangerous to KVM. Allow writing the current value, e.g. so that userspace can blindly set all MSRs when emulating RESET, and unconditionally allow writes to MSR_IA32_UCODE_REV so that userspace can emulate patch loads. Special case the VMX MSRs to keep the generic list small, i.e. so that KVM can do a linear walk of the generic list without incurring meaningful overhead. Cc: Like Xu Cc: Yu Zhang Reviewed-by: Xiaoyao Li Link: https://lore.kernel.org/r/20230311004618.920745-7-seanjc@google.com Signed-off-by: Sean Christopherson commit e4d86fb910dfdeb4320d5a7b9ebf6e81f10b1380 Author: Sean Christopherson Date: Fri Mar 10 16:46:02 2023 -0800 KVM: selftests: Split PMU caps sub-tests to avoid writing MSR after KVM_RUN Split the PERF_CAPABILITIES subtests into two parts so that the LBR format testcases don't execute after KVM_RUN. Similar to the guest CPUID model, KVM will soon disallow changing PERF_CAPABILITIES after KVM_RUN, at which point attempting to set the MSR after KVM_RUN will yield false positives and/or false negatives depending on what the test is trying to do. Land the LBR format test in a more generic "immutable features" test in anticipation of expanding its scope to other immutable features. Link: https://lore.kernel.org/r/20230311004618.920745-6-seanjc@google.com Signed-off-by: Sean Christopherson commit 9eb6ba31db27253a11441368d2801c1eedc48b4f Author: Sean Christopherson Date: Fri Mar 10 16:46:01 2023 -0800 KVM: x86: Generate set of VMX feature MSRs using first/last definitions Add VMX MSRs to the runtime list of feature MSRs by iterating over the range of emulated MSRs instead of manually defining each MSR in the "all" list. Using the range definition reduces the cost of emulating a new VMX MSR, e.g. prevents forgetting to add an MSR to the list. Extracting the VMX MSRs from the "all" list, which is a compile-time constant, also shrinks the list to the point where the compiler can heavily optimize code that iterates over the list. No functional change intended. Reviewed-by: Xiaoyao Li Link: https://lore.kernel.org/r/20230311004618.920745-5-seanjc@google.com Signed-off-by: Sean Christopherson commit 5757f5b9562244e4b63f65576c16ca9eb21f81d2 Author: Sean Christopherson Date: Fri Mar 10 16:46:00 2023 -0800 KVM: x86: Add macros to track first...last VMX feature MSRs Add macros to track the range of VMX feature MSRs that are emulated by KVM to reduce the maintenance cost of extending the set of emulated MSRs. Note, KVM doesn't necessarily emulate all known/consumed VMX MSRs, e.g. PROCBASED_CTLS3 is consumed by KVM to enable IPI virtualization, but is not emulated as KVM doesn't emulate/virtualize IPI virtualization for nested guests. No functional change intended. Reviewed-by: Xiaoyao Li Link: https://lore.kernel.org/r/20230311004618.920745-4-seanjc@google.com Signed-off-by: Sean Christopherson commit fb3146b4dc3bc6d0c0402a75f21d628eccf9bf8c Author: Sean Christopherson Date: Fri Mar 10 16:45:59 2023 -0800 KVM: x86: Add a helper to query whether or not a vCPU has ever run Add a helper to query if a vCPU has run so that KVM doesn't have to open code the check on last_vmentry_cpu being set to a magic value. No functional change intended. Suggested-by: Xiaoyao Li Cc: Like Xu Reviewed-by: Xiaoyao Li Link: https://lore.kernel.org/r/20230311004618.920745-3-seanjc@google.com Signed-off-by: Sean Christopherson commit b1932c5c19ddcbe9140b0583a0931b620c21ca02 Author: Sean Christopherson Date: Fri Mar 10 16:45:58 2023 -0800 KVM: x86: Rename kvm_init_msr_list() to clarify it inits multiple lists Rename kvm_init_msr_list() to kvm_init_msr_lists() to clarify that it initializes multiple lists: MSRs to save, emulated MSRs, and feature MSRs. No functional change intended. Reviewed-by: Xiaoyao Li Link: https://lore.kernel.org/r/20230311004618.920745-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 5376ced54ce310256e9cd67a3fcb613ac005a032 Author: Cai Huoqing Date: Wed Mar 29 10:47:31 2023 +0800 PCI/P2PDMA: Fix pci_p2pmem_find_many() kernel-doc Remove reference to pci_p2pmem_dma(), which has never existed. Link: https://lore.kernel.org/r/20230329024731.5604-1-cai.huoqing@linux.dev Signed-off-by: Cai Huoqing Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit 5a94aa77bb7f970c6ae35cd7537121501f015a7f Author: Asahi Lina Date: Thu Apr 6 01:37:39 2023 +0900 drm/scheduler: Fix UAF race in drm_sched_entity_push_job() After a job is pushed into the queue, it is owned by the scheduler core and may be freed at any time, so we can't write nor read the submit timestamp after that point. Fixes oopses observed with the drm/asahi driver, found with kASAN. Signed-off-by: Asahi Lina Link: https://lore.kernel.org/r/20230406-scheduler-uaf-2-v1-1-972531cf0a81@asahilina.net Reviewed-by: Luben Tuikov Signed-off-by: Luben Tuikov commit 97740266de26e5dfe6e4fbecacb6995b66c2e378 Author: Kirill A. Shutemov Date: Mon Apr 3 14:10:20 2023 +0300 x86/mm/iommu/sva: Do not allow to set FORCE_TAGGED_SVA bit from outside arch_prctl(ARCH_FORCE_TAGGED_SVA) overrides the default and allows LAM and SVA to co-exist in the process. It is expected by called by the process when it knows what it is doing. arch_prctl() operates on the current process, but the same code is reachable from ptrace where it can be called on arbitrary task. Make it strict and only allow to set MM_CONTEXT_FORCE_TAGGED_SVA for the current process. Fixes: 23e5d9ec2bab ("x86/mm/iommu/sva: Make LAM and SVA mutually exclusive") Suggested-by: Dmitry Vyukov Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Reviewed-by: Dmitry Vyukov Link: https://lore.kernel.org/all/20230403111020.3136-3-kirill.shutemov%40linux.intel.com commit fca1fdd2b0a6fcd491ec520afac80bc72b4c811e Author: Kirill A. Shutemov Date: Mon Apr 3 14:10:19 2023 +0300 x86/mm/iommu/sva: Fix error code for LAM enabling failure due to SVA Normally, LAM and SVA are mutually exclusive. LAM enabling will fail if SVA is already in use. Correct error code for the failure. EINTR is nonsensical there. Fixes: 23e5d9ec2bab ("x86/mm/iommu/sva: Make LAM and SVA mutually exclusive") Reported-by: Dmitry Vyukov Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Reviewed-by: Dmitry Vyukov Link: https://lore.kernel.org/all/CACT4Y+YfqSMsZArhh25TESmG-U4jO5Hjphz87wKSnTiaw2Wrfw@mail.gmail.com Link: https://lore.kernel.org/all/20230403111020.3136-2-kirill.shutemov%40linux.intel.com commit ba0887a6b94ea7f77df1e464aeca45758b4d92c3 Author: Bartosz Golaszewski Date: Thu Apr 6 21:28:09 2023 +0200 regulator: qcom,rpmh: add compatible for pmm8654au RPMH Add the compatible for the pmm8654au RPMH regulators present on the sa8775p-ride development board. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20230406192811.460888-2-brgl@bgdev.pl Signed-off-by: Mark Brown commit 65f1b1dc0cc90236ed9be3970f4a763e853f3aab Author: Bartosz Golaszewski Date: Thu Apr 6 21:28:10 2023 +0200 regulator: qcom-rpmh: add support for pmm8654au regulators Add the RPMH regulators exposed by the PMM8654au PMIC and its variants. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230406192811.460888-3-brgl@bgdev.pl Signed-off-by: Mark Brown commit d9c960675adcc6e26bb6464b6b500fd75fd55dcf Merge: 0ebd4fd6b9064 f2afccfefe7be Author: Jakub Kicinski Date: Thu Apr 6 11:58:36 2023 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Conflicts: drivers/net/ethernet/google/gve/gve.h 3ce934558097 ("gve: Secure enough bytes in the first TX desc for all TCP pkts") 75eaae158b1b ("gve: Add XDP DROP and TX support for GQI-QPL format") https://lore.kernel.org/all/20230406104927.45d176f5@canb.auug.org.au/ https://lore.kernel.org/all/c5872985-1a95-0bc8-9dcc-b6f23b439e9d@tessares.net/ Adjacent changes: net/can/isotp.c 051737439eae ("can: isotp: fix race between isotp_sendsmg() and isotp_release()") 96d1c81e6a04 ("can: isotp: add module parameter for maximum pdu size") Signed-off-by: Jakub Kicinski commit 5808c532ca0a983d643319caca44f2bcb148298f Author: Rob Clark Date: Mon Mar 20 07:43:42 2023 -0700 soc: qcom: smd-rpm: Use GFP_ATOMIC in write path Preparing for better lockdep annotations for things that happen in runpm suspend/resume path vs shrinker/reclaim in the following patches, we need to avoid allocations that can trigger reclaim in the icc_set_bw() path. In the RPMh case, rpmh_write_batch() already uses GFP_ATOMIC, so it should be reasonable to use in the smd-rpm case as well. Alternatively, 256bytes is small enough for a function that isn't called recursively to allocate on-stack. Signed-off-by: Rob Clark Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230320144356.803762-21-robdclark@gmail.com commit d0367098dc1e925d22a6706e358636d12371116c Author: Kathiravan T Date: Mon Mar 20 16:15:30 2023 +0530 arm64: dts: qcom: ipq5332: add few device nodes Add the nodes for QUP peripheral, PRNG and WDOG. While at it, enable the I2C device for MI01.2 board. Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230320104530.30411-3-quic_kathirav@quicinc.com commit a10e2244f49a838e2274672dfeb4ab1bc9349230 Author: Krzysztof Kozlowski Date: Fri Mar 10 14:49:25 2023 +0100 arm64: dts: qcom: sm8550: add ADSP audio codec macros Add the Low Power Audio SubSystem (LPASS) / ADSP audio codec macros on Qualcomm SM8550. The nodes are very similar to SM8450, except missing NPL clock which is not exposed on SM8550 and should not be touched. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230310134925.514125-1-krzysztof.kozlowski@linaro.org commit 45166620b7254a9e9329a2b6cdfa369bc3ca9c5b Author: Rob Herring Date: Wed Apr 5 15:27:24 2023 -0500 ACPI: Replace irqdomain.h include with struct declarations linux/acpi.h includes irqdomain.h which includes of.h. Break the include chain by replacing the irqdomain include with forward declarations for struct irq_domain and irq_domain_ops which is sufficient for acpi.h. of.h also includes mod_devicetable.h which many drivers implicitly depend on. As acpi.h already includes it, just move it out of the '#ifdef CONFIG_ACPI'. Reviewed-by: Jacob Keller Reviewed-by: Greg Kroah-Hartman Signed-off-by: Rob Herring Signed-off-by: Rafael J. Wysocki commit 2febc5dda35e519886140e62780211a10ebeb463 Author: Rob Herring Date: Wed Apr 5 15:27:23 2023 -0500 fpga: lattice-sysconfig-spi: Add explicit include for of.h With linux/acpi.h (in spi/spi.h) no longer implicitly including of.h, add an explicit include of of.h to fix the following errors: drivers/fpga/lattice-sysconfig-spi.c:146:35: error: implicit declaration of function 'of_match_ptr' [-Werror=implicit-function-declaration] Reported-by: Stephen Rothwell Signed-off-by: Rob Herring Signed-off-by: Rafael J. Wysocki commit 8edd49ce8da7b5c24e751c41e6bb882424b47fc5 Author: Rob Herring Date: Wed Apr 5 15:27:22 2023 -0500 tpm: atmel: Add explicit include for of.h With linux/acpi.h (in linux/tpm.h) no longer implicitly including of.h, add an explicit include of of.h to fix the following errors: drivers/char/tpm/tpm_atmel.h:50:14: error: implicit declaration of function 'of_find_node_by_name'; did you mean 'bus_find_device_by_name'? [-Werror=implicit-function-declaration] drivers/char/tpm/tpm_atmel.h:50:12: error: assignment to 'struct device_node *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion] drivers/char/tpm/tpm_atmel.h:55:14: error: implicit declaration of function 'of_device_is_compatible'; did you mean 'fwnode_device_is_compatible'? [-Werror=implicit-function-declaration] ... Reported-by: Stephen Rothwell Signed-off-by: Rob Herring Signed-off-by: Rafael J. Wysocki commit c5111a5b1a603cbad4bb3b49ae9a77dbc2252a59 Author: Rob Herring Date: Wed Apr 5 15:27:21 2023 -0500 virtio-mmio: Add explicit include for of.h With linux/acpi.h no longer implicitly including of.h, add an explicit include of of.h to fix the following error: drivers/virtio/virtio_mmio.c:492:13: error: implicit declaration of function 'of_property_read_bool'; did you mean 'fwnode_property_read_bool'? [-Werror=implicit-function-declaration] Reported-by: Stephen Rothwell Signed-off-by: Rob Herring Signed-off-by: Rafael J. Wysocki commit 5d6f12c381071d2206a2b73140f7f1e7c86bc104 Author: Rob Herring Date: Wed Apr 5 15:27:20 2023 -0500 pata: ixp4xx: Add explicit include for of.h With linux/acpi.h no longer implicitly including of.h, add an explicit include of of.h to fix the following error: drivers/ata/pata_ixp4xx_cf.c:258:15: error: implicit declaration of function 'of_property_read_u32_index'; did you mean 'fwnode_property_read_u32_array'? [-Werror=implicit-function-declaration] Reported-by: Stephen Rothwell Signed-off-by: Rob Herring Signed-off-by: Rafael J. Wysocki commit cf02f71c3ef870f0376a723fd9c95d288f381984 Author: Rob Herring Date: Wed Apr 5 15:27:19 2023 -0500 ata: pata_macio: Add explicit include of irqdomain.h With linux/acpi.h no longer including irqdomain.h, add an explicit include of irqdomain.h to fix the following error: drivers/ata/pata_macio.c:1172:23: error: implicit declaration of function 'irq_create_mapping' [-Werror=implicit-function-declaration] Reported-by: Stephen Rothwell Signed-off-by: Rob Herring Signed-off-by: Rafael J. Wysocki commit 933c9f190543007385ccf899e257328c525ce7e5 Author: Rob Herring Date: Wed Apr 5 15:27:18 2023 -0500 serial: 8250_tegra: Add explicit include for of.h With linux/acpi.h no longer implicitly including of.h, add an explicit include of of.h to fix the following error: drivers/tty/serial/8250/8250_tegra.c:68:15: error: implicit declaration of function 'of_alias_get_id' [-Werror=implicit-function-declaration] Reviewed-by: Jon Hunter Reviewed-by: Jacob Keller Reviewed-by: Greg Kroah-Hartman Signed-off-by: Rob Herring Acked-by: Thierry Reding Signed-off-by: Rafael J. Wysocki commit 75c7124ef3bafe0e9d1801d6449196dc3105df24 Author: Rob Herring Date: Wed Apr 5 15:27:17 2023 -0500 net: rfkill-gpio: Add explicit include for of.h With linux/acpi.h no longer implicitly including of.h, add an explicit include of of.h to fix the following error: net/rfkill/rfkill-gpio.c:181:21: error: implicit declaration of function 'of_match_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] Acked-by: Johannes Berg Reviewed-by: Jacob Keller Reviewed-by: Greg Kroah-Hartman Signed-off-by: Rob Herring Signed-off-by: Rafael J. Wysocki commit 98aeb3b0b6bd2704b2c687b084eeebdee49b073b Author: Rob Herring Date: Wed Apr 5 15:27:16 2023 -0500 staging: iio: resolver: ad2s1210: Add explicit include for of.h With linux/acpi.h no longer implicitly including of.h, add an explicit include of of.h to fix the following error: drivers/staging/iio/resolver/ad2s1210.c:706:21: error: implicit declaration of function 'of_match_ptr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] Acked-by: Jonathan Cameron Reviewed-by: Jacob Keller Reviewed-by: Greg Kroah-Hartman Signed-off-by: Rob Herring Signed-off-by: Rafael J. Wysocki commit ff7f85e35479243e86c31726bb2c54b24fef07cd Author: Rob Herring Date: Wed Apr 5 15:27:15 2023 -0500 iio: adc: ad7292: Add explicit include for of.h With linux/acpi.h no longer implicitly including of.h, add an explicit include of of.h to fix the following error: drivers/iio/adc/ad7292.c:307:9: error: implicit declaration of function 'for_each_available_child_of_node'; did you mean 'fwnode_for_each_available_child_node'? [-Werror=implicit-function-declaration] Acked-by: Jonathan Cameron Acked-by: Marcelo Schmitt Reviewed-by: Jacob Keller Reviewed-by: Greg Kroah-Hartman Signed-off-by: Rob Herring Signed-off-by: Rafael J. Wysocki commit 6340b391e15094575911ab0d96bfff09deadafba Author: Manivannan Sadhasivam Date: Wed Mar 8 13:26:48 2023 +0530 arm64: dts: qcom: Remove "iommus" property from PCIe nodes Currently, most of the Qualcomm SoCs specify both "iommus" and "iommu-map" properties for the PCIe nodes. First one passes the SMR mask to the iommu driver and the latter specifies the SID for each PCIe device. But with "iommus" property, the PCIe controller will be added to the iommu group along with the devices. This makes no sense because the controller will not initiate any DMA transaction on its own. And moreover, it is not strictly required to pass the SMR mask to the iommu driver. If the "iommus" property is not present, then the default mask of "0" would be used which should work for all PCIe devices. On the other side, if the SMR mask specified doesn't match the one expected by the hypervisor, then all the PCIe transactions will end up triggering "Unidentified Stream Fault" by the SMMU. So to get rid of these hassles and also prohibit PCIe controllers from adding to the iommu group, let's remove the "iommus" property from PCIe nodes. Reported-by: Rob Herring Link: https://lore.kernel.org/linux-arm-msm/20230227195535.GA749409-robh@kernel.org Signed-off-by: Manivannan Sadhasivam Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308075648.134119-1-manivannan.sadhasivam@linaro.org commit df2286655ce126ed6f54a76e1cb66d53cd185242 Author: Bob Moore Date: Wed Apr 5 15:59:37 2023 +0200 ACPICA: Update version to 20230331 ACPICA commit 4578e0e94d945e56547749316691017880c8ee74 Version 20230331. Link: https://github.com/acpica/acpica/commit/4578e0e9 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit beadd51f74f606105b558ec69bbbe2305066d0ea Author: Najumon Date: Wed Apr 5 15:59:00 2023 +0200 ACPICA: add os specific support for Zephyr RTOS ACPICA commit 463d30f0a8edc5dccad20c2d189dc55111d51aae The acpica will be integrated as module into Zephyr project for enable acpi bus driver. This patch is for enable os specific support layer for Zephyr. Link: https://github.com/acpica/acpica/commit/463d30f0 Signed-off-by: Najumon Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit ae5a0eccc85fc960834dd66e3befc2728284b86c Author: void0red <30990023+void0red@users.noreply.github.com> Date: Wed Apr 5 15:57:57 2023 +0200 ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects ACPICA commit 0d5f467d6a0ba852ea3aad68663cbcbd43300fd4 ACPI_ALLOCATE_ZEROED may fails, object_info might be null and will cause null pointer dereference later. Link: https://github.com/acpica/acpica/commit/0d5f467d Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 376b0fb3ad621ca507c1bdf5636232959bf827e6 Author: Kees Cook Date: Wed Apr 5 15:56:59 2023 +0200 ACPICA: acpi_resource_irq: Replace 1-element arrays with flexible array ACPICA commit bfdd3446e7caf795c85c70326c137023942972c5 Similar to "Replace one-element array with flexible-array", replace the 1-element array with a proper flexible array member as defined by C99. This allows the code to operate without tripping compile-time and run- time bounds checkers (e.g. via __builtin_object_size(), -fsanitize=bounds, and/or -fstrict-flex-arrays=3). Note that the spec requires there be at least one interrupt, so use a union to keep space allocated for this. The only binary change in .text and .data sections is some rearrangement by the compiler of acpi_dm_address_common(), but appears to be harmless. Link: https://github.com/acpica/acpica/commit/bfdd3446 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 2a85fc5626797f9057311a419b1d5d847d86c527 Author: Kees Cook Date: Wed Apr 5 15:56:06 2023 +0200 ACPICA: acpi_madt_oem_data: Fix flexible array member definition ACPICA commit e7f6d8c1b7f79eb4b9b07f1bc09c549a2acbd6e8 Use ACPI_FLEX_ARRAY() helper to define flexible array member alone in a struct. Fixes issue #812. No binary changes appear in the .text nor .data sections. Link: https://github.com/acpica/acpica/commit/e7f6d8c1 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 49bd783e4fe19c03d3ce97ab066e865acc6c7b15 Author: Kees Cook Date: Wed Apr 5 15:55:13 2023 +0200 ACPICA: acpi_dmar_andd: Replace 1-element array with flexible array ACPICA commit 3c19ae70424e9ab1e1b805203d300d2660f9a2f7 Similar to "Replace one-element array with flexible-array", replace the 1-element array with a proper flexible array member as defined by C99. This allows the code to operate without tripping compile-time and run- time bounds checkers (e.g. via __builtin_object_size(), -fsanitize=bounds, and/or -fstrict-flex-arrays=3). The handling of struct acpi_dmar_andd by acpi_dm_dump_dmar() appears to expect a single trailing char for calculating table offsets. Keep a char in the union to avoid any code changes appearing in the .text or .data sections. Link: https://github.com/acpica/acpica/commit/3c19ae70 Signed-off-by: Kees Cook Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 3a287932da6a97c84437669a6fec1486401893d2 Author: Kees Cook Date: Wed Apr 5 15:54:25 2023 +0200 ACPICA: acpi_pci_routing_table: Replace fixed-size array with flex array member ACPICA commit f4a3afd78c28dede0907f47951f0b73c9a776d4e The "Source" array is actually a dynamically sized array, but it is defined as a fixed-size 4 byte array. This results in tripping both compile-time and run-time bounds checkers (e.g. via either __builtin_object_size() or -fsanitize=bounds). To retain the padding, create a union with an unused Pad variable of size 4, and redefine Source as a proper flexible array member. No binary changes appear in the .text nor .data sections. Link: https://github.com/acpica/acpica/commit/f4a3afd7 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 6671709c6ee5a9970ad94fe80823dc2fab711f84 Author: Kees Cook Date: Wed Apr 5 15:53:20 2023 +0200 ACPICA: struct acpi_resource_dma: Replace 1-element array with flexible array ACPICA commit 8409bb869a1790f6e02391c3f0eaf9c5fa63e33f Similar to "Replace one-element array with flexible-array", replace the 1-element array with a proper flexible array member as defined by C99, but without changing the structure size. This allows the code to operate without tripping compile-time and run- time bounds checkers (e.g. via __builtin_object_size(), -fsanitize=bounds, and/or -fstrict-flex-arrays=3). As with IRQs, leave a single element in a union. No binary changes appear in the .text nor .data sections. Link: https://github.com/acpica/acpica/commit/8409bb86 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 11132ad0176e9a6a847a9bfca77c39c2857cf85b Author: Kees Cook Date: Wed Apr 5 15:52:23 2023 +0200 ACPICA: Introduce ACPI_FLEX_ARRAY ACPICA commit e73b227e8e475c20cc394f237ea35d592fdf9ec3 In order to enable using -fstrict-flex-arrays with GCC and Clang in the Linux kernel, each trailing dynamically sized array must be defined as proper C99 "flexible array members" (FAM). Unfortunately, ACPICA has a bunch of technical debt, dating back to before even the GNU extension of 0-length arrays, meaning the code base has many 1-element and 0-length arrays defined at the end of structures that should actually be FAMs. One limitation of the C99 FAM specification is the accidental requirement that they cannot be in unions or alone in structs. There is no real-world reason for this, though, and, actually, the existing GNU extension permits this for 0-length arrays (which get treated as FAMs). Add the ACPI_FLEX_ARRAY() helper macro to work around this requirement so that FAMs can be defined in unions or alone in structs. Since this behavior still depends on GNU extensions, keep the macro specific to GCC (and Clang) builds. In this way, MSVC will continue to use 0-length arrays (since it does not support the union work-around). When MSVC grows support for this in the future, the macro can be updated. Link: https://github.com/acpica/acpica/commit/e73b227e Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 2a5ab99847bd41ad5f0461f519d0825f163874a6 Author: Kees Cook Date: Wed Apr 5 15:51:25 2023 +0200 ACPICA: struct acpi_nfit_interleave: Replace 1-element array with flexible array ACPICA commit e66decc6fca36b59194b0947d87d6a9bec078bc3 Similar to "Replace one-element array with flexible-array", replace the 1-element array with a proper flexible array member as defined by C99. This allows the code to operate without tripping compile-time and run- time bounds checkers (e.g. via __builtin_object_size(), -fsanitize=bounds, and/or -fstrict-flex-arrays=3). Unlike struct acpi_nfit_flush_address and struct acpi_nfit_smbios, which had their sizeof() uses adjusted in code, struct acpi_nfit_interleave did not. This appears to have been a bug. After this change, there is a binary difference in acpi_dm_dump_nfit() since the size of the structure now has the correct size, as the prior result was including the trailing U32: - mov $0x14,%ebp + mov $0x10,%ebp Link: https://github.com/acpica/acpica/commit/e66decc6 Signed-off-by: Bob Moore Reviewed-by: Dan Williams Tested-by: Dan Williams Signed-off-by: Rafael J. Wysocki commit 74522fea27f8a0695f529089130da64ac98f1761 Author: Kees Cook Date: Wed Apr 5 15:50:18 2023 +0200 ACPICA: actbl2: Replace 1-element arrays with flexible arrays ACPICA commit 44f1af0664599e87bebc3a1260692baa27b2f264 Similar to "Replace one-element array with flexible-array", replace the 1-element array with a proper flexible array member as defined by C99. This allows the code to operate without tripping compile-time and run- time bounds checkers (e.g. via __builtin_object_size(), -fsanitize=bounds, and/or -fstrict-flex-arrays=3). The sizeof() uses with struct acpi_nfit_flush_address and struct acpi_nfit_smbios have been adjusted to drop the open-coded subtraction of the trailing single element. The result is no binary differences in .text nor .data sections. Link: https://github.com/acpica/acpica/commit/44f1af06 Signed-off-by: Bob Moore Co-developed-by: Dan Williams Signed-off-by: Dan Williams Signed-off-by: Rafael J. Wysocki commit 48ff467c338b184bc309ea2e0d2a9524f569d245 Author: Kees Cook Date: Wed Apr 5 15:48:56 2023 +0200 ACPICA: actbl1: Replace 1-element arrays with flexible arrays ACPICA commit 8c9bd5d151f77767b2fd937911848b7159dc8ee9 Similar to "Replace one-element array with flexible-array", replace the 1-element array with a proper flexible array member as defined by C99. This allows the code to operate without tripping compile-time and run- time bounds checkers (e.g. via __builtin_object_size(), -fsanitize=bounds, and/or -fstrict-flex-arrays=3). No .text nor .data differences result from this change. Link: https://github.com/acpica/acpica/commit/8c9bd5d1 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 94bf7c8a626d71a7c206b3e0cdfb43aca305c862 Author: Kees Cook Date: Wed Apr 5 15:48:10 2023 +0200 ACPICA: struct acpi_resource_vendor: Replace 1-element array with flexible array ACPICA commit 446d05d5ea77946b8b3b8d0c638d1a446b18503e Similar to commit 7ba2f3d91a32 ("Replace one-element array with flexible-array"), replace the 1-element array with a proper flexible array member as defined by C99. This allows the code to operate without tripping compile-time and run-time bounds checkers (e.g. via __builtin_object_size(), -fsanitize=bounds, and/or -fstrict-flex-arrays=3). No binary changes appear in the .text nor .data sections. Link: https://github.com/acpica/acpica/commit/446d05d5 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit d0a874cb4519304baeb13b7f5e4b088caefca98f Author: Tamir Duberstein Date: Wed Apr 5 15:47:18 2023 +0200 ACPICA: Avoid undefined behavior: load of misaligned address ACPICA commit b3317239749d1907ec95e7aa2057d7ea29d3c638 Before this change we see the following UBSAN stack trace in Fuchsia: #0 0x000020c1f68c9959 in acpi_rs_convert_aml_to_resource(struct acpi_resource*, union aml_resource*, struct acpi_rsconvert_info*) ../../third_party/acpica/source/components/resources/rsmisc.c:244 +0x2d0959 #1.2 0x000020e5d259f77f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x000020e5d259f77f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x000020e5d259f77f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x000020e5d25a0385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x000020e5d259fead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x000020c1f68c9959 in acpi_rs_convert_aml_to_resource(struct acpi_resource*, union aml_resource*, struct acpi_rsconvert_info*) ../../third_party/acpica/source/components/resources/rsmisc.c:244 +0x2d0959 #5 0x000020c1f68c65a9 in acpi_rs_convert_aml_to_resources(u8*, u32, u32, u8, void**) ../../third_party/acpica/source/components/resources/rslist.c:137 +0x2cd5a9 #6 0x000020c1f68efda9 in acpi_ut_walk_aml_resources(struct acpi_walk_state*, u8*, acpi_size, acpi_walk_aml_callback, void**) ../../third_party/acpica/source/components/utilities/utresrc.c:234 +0x2f6da9 #7 0x000020c1f68c1806 in acpi_rs_create_resource_list(union acpi_operand_object*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rscreate.c:199 +0x2c8806 #8 0x000020c1f68ccef2 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:770 +0x2d3ef2 #9 0x000020c1f68cd26d in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x2d426d #10 0x000020c1f66e4d48 in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0xebd48 #11 0x000020c1f66ea94d in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0xf194d #12 0x000020c1f6776af2 in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x17daf2 #13 0x000020c1f669eb44 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0xa5b44 #14 0x000020c1f66b06f7 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0xb76f7 #15.1 0x000020c1f66ba8ea in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0xc18ea #15 0x000020c1f66ba8ea in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0xc18ea #16.2 0x000020c1f68ff86c in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x30686c #16.1 0x000020c1f68ff86c in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x30686c #16 0x000020c1f68ff86c in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x30686c #17.1 0x000022d99b37bd91 in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0x4bd91 #17 0x000022d99b37bd91 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4bd91 #18 0x000022d99b374bc9 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44bc9 #19 0x000022d99b3748dd in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0x448dd #20 0x000022d99b3656a6 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x356a6 #21 0x000022d99b36c4c8 in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0x3c4c8 #22 0x000022d99b36d2c1 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0x3d2c1 #23.1 0x000022d99b37881e in λ(std::__2::unique_ptr >, fbl::ref_ptr, const driver_runtime::Dispatcher::create_with_adder::(anon class)*) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0x4881e #23 0x000022d99b37881e in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4881e #24 0x000022d99b374e7e in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44e7e #25.1 0x000022d99b36e964 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3e964 #25 0x000022d99b36e964 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0x3e964 #26 0x000022d99b36e35d in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0x3e35d #27.1 0x000022d99b378c00 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, zx_status_t, zx_packet_signal_t const*, async_dispatcher_t*, async::wait_base*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0x48c00 #27 0x000022d99b378c00 in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0x48c00 #28.1 0x000022d99b39aead in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:415 +0x6aead #28 0x000022d99b39aead in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x6aead #29 0x000022d99b39c78f in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x6c78f #30 0x00004230f4a33edc in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7edc #31 0x00004230f4b6496d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x20896d and #0 0x00002357f60edb6d in acpi_rs_convert_aml_to_resource(struct acpi_resource*, union aml_resource*, struct acpi_rsconvert_info*) ../../third_party/acpica/source/components/resources/rsmisc.c:257 +0x2d0b6d #1.2 0x0000212756f4777f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x0000212756f4777f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x0000212756f4777f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x0000212756f48385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x0000212756f47ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x00002357f60edb6d in acpi_rs_convert_aml_to_resource(struct acpi_resource*, union aml_resource*, struct acpi_rsconvert_info*) ../../third_party/acpica/source/components/resources/rsmisc.c:257 +0x2d0b6d #5 0x00002357f60ea5a9 in acpi_rs_convert_aml_to_resources(u8*, u32, u32, u8, void**) ../../third_party/acpica/source/components/resources/rslist.c:137 +0x2cd5a9 #6 0x00002357f6113d09 in acpi_ut_walk_aml_resources(struct acpi_walk_state*, u8*, acpi_size, acpi_walk_aml_callback, void**) ../../third_party/acpica/source/components/utilities/utresrc.c:234 +0x2f6d09 #7 0x00002357f60e5806 in acpi_rs_create_resource_list(union acpi_operand_object*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rscreate.c:199 +0x2c8806 #8 0x00002357f60f0e52 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:770 +0x2d3e52 #9 0x00002357f60f11cd in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x2d41cd #10 0x00002357f5f08d48 in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0xebd48 #11 0x00002357f5f0e94d in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0xf194d #12 0x00002357f5f9aaf2 in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x17daf2 #13 0x00002357f5ec2b44 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0xa5b44 #14 0x00002357f5ed46f7 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0xb76f7 #15.1 0x00002357f5ede8ea in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0xc18ea #15 0x00002357f5ede8ea in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0xc18ea #16.2 0x00002357f61237cc in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x3067cc #16.1 0x00002357f61237cc in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3067cc #16 0x00002357f61237cc in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x3067cc #17.1 0x000023df096b1d91 in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0x4bd91 #17 0x000023df096b1d91 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4bd91 #18 0x000023df096aabc9 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44bc9 #19 0x000023df096aa8dd in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0x448dd #20 0x000023df0969b6a6 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x356a6 #21 0x000023df096a24c8 in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0x3c4c8 #22 0x000023df096a32c1 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0x3d2c1 #23.1 0x000023df096ae81e in λ(std::__2::unique_ptr >, fbl::ref_ptr, const driver_runtime::Dispatcher::create_with_adder::(anon class)*) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0x4881e #23 0x000023df096ae81e in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4881e #24 0x000023df096aae7e in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44e7e #25.1 0x000023df096a4964 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3e964 #25 0x000023df096a4964 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0x3e964 #26 0x000023df096a435d in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0x3e35d #27.1 0x000023df096aec00 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, zx_status_t, zx_packet_signal_t const*, async_dispatcher_t*, async::wait_base*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0x48c00 #27 0x000023df096aec00 in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0x48c00 #28.1 0x000023df096d0ead in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:415 +0x6aead #28 0x000023df096d0ead in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x6aead #29 0x000023df096d278f in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x6c78f #30 0x0000424c7690eedc in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7edc #31 0x0000424c76a3f96d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x20896d and #0 0x000020883e0b9c01 in acpi_rs_convert_aml_to_resource(struct acpi_resource*, union aml_resource*, struct acpi_rsconvert_info*) ../../third_party/acpica/source/components/resources/rsmisc.c:334 +0x2d0c01 #1.2 0x000022cae2d8677f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x000022cae2d8677f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x000022cae2d8677f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x000022cae2d87385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x000022cae2d86ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x000020883e0b9c01 in acpi_rs_convert_aml_to_resource(struct acpi_resource*, union aml_resource*, struct acpi_rsconvert_info*) ../../third_party/acpica/source/components/resources/rsmisc.c:334 +0x2d0c01 #5 0x000020883e0b65a9 in acpi_rs_convert_aml_to_resources(u8*, u32, u32, u8, void**) ../../third_party/acpica/source/components/resources/rslist.c:137 +0x2cd5a9 #6 0x000020883e0dfd89 in acpi_ut_walk_aml_resources(struct acpi_walk_state*, u8*, acpi_size, acpi_walk_aml_callback, void**) ../../third_party/acpica/source/components/utilities/utresrc.c:234 +0x2f6d89 #7 0x000020883e0b1806 in acpi_rs_create_resource_list(union acpi_operand_object*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rscreate.c:199 +0x2c8806 #8 0x000020883e0bced2 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:770 +0x2d3ed2 #9 0x000020883e0bd24d in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x2d424d #10 0x000020883ded4d48 in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0xebd48 #11 0x000020883deda94d in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0xf194d #12 0x000020883df66af2 in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x17daf2 #13 0x000020883de8eb44 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0xa5b44 #14 0x000020883dea06f7 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0xb76f7 #15.1 0x000020883deaa8ea in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0xc18ea #15 0x000020883deaa8ea in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0xc18ea #16.2 0x000020883e0ef84c in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x30684c #16.1 0x000020883e0ef84c in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x30684c #16 0x000020883e0ef84c in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x30684c #17.1 0x000021ae7c20cd91 in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0x4bd91 #17 0x000021ae7c20cd91 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4bd91 #18 0x000021ae7c205bc9 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44bc9 #19 0x000021ae7c2058dd in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0x448dd #20 0x000021ae7c1f66a6 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x356a6 #21 0x000021ae7c1fd4c8 in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0x3c4c8 #22 0x000021ae7c1fe2c1 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0x3d2c1 #23.1 0x000021ae7c20981e in λ(std::__2::unique_ptr >, fbl::ref_ptr, const driver_runtime::Dispatcher::create_with_adder::(anon class)*) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0x4881e #23 0x000021ae7c20981e in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4881e #24 0x000021ae7c205e7e in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44e7e #25.1 0x000021ae7c1ff964 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3e964 #25 0x000021ae7c1ff964 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0x3e964 #26 0x000021ae7c1ff35d in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0x3e35d #27.1 0x000021ae7c209c00 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, zx_status_t, zx_packet_signal_t const*, async_dispatcher_t*, async::wait_base*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0x48c00 #27 0x000021ae7c209c00 in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0x48c00 #28.1 0x000021ae7c22bead in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:415 +0x6aead #28 0x000021ae7c22bead in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x6aead #29 0x000021ae7c22d78f in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x6c78f #30 0x000042b2518e3edc in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7edc #31 0x000042b251a1496d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x20896d Link: https://github.com/acpica/acpica/commit/b3317239 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit bf44c56a99774339f73e665cfbff429dd537914e Author: Tamir Duberstein Date: Wed Apr 5 15:46:30 2023 +0200 ACPICA: Avoid undefined behavior: member access within misaligned address ACPICA commit 8ea5ada64b48dada42dbd5f0f58a9ce18f882ede Before this change we see the following UBSAN stack trace in Fuchsia: #0 0x000020d00518f81a in acpi_rs_convert_aml_to_resources(u8*, u32, u32, u8, void**) ../../third_party/acpica/source/components/resources/rslist.c:104 +0x2cd81a #1.2 0x00002348b567277f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x00002348b567277f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x00002348b567277f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x00002348b5673385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x00002348b5672ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x000020d00518f81a in acpi_rs_convert_aml_to_resources(u8*, u32, u32, u8, void**) ../../third_party/acpica/source/components/resources/rslist.c:104 +0x2cd81a #5 0x000020d0051b8ea9 in acpi_ut_walk_aml_resources(struct acpi_walk_state*, u8*, acpi_size, acpi_walk_aml_callback, void**) ../../third_party/acpica/source/components/utilities/utresrc.c:234 +0x2f6ea9 #6 0x000020d00518a806 in acpi_rs_create_resource_list(union acpi_operand_object*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rscreate.c:199 +0x2c8806 #7 0x000020d005195ff2 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:770 +0x2d3ff2 #8 0x000020d00519636d in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x2d436d #9 0x000020d004fadd48 in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0xebd48 #10 0x000020d004fb394d in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0xf194d #11 0x000020d00503faf2 in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x17daf2 #12 0x000020d004f67b44 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0xa5b44 #13 0x000020d004f796f7 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0xb76f7 #14.1 0x000020d004f838ea in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0xc18ea #14 0x000020d004f838ea in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0xc18ea #15.2 0x000020d0051c896c in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x30696c #15.1 0x000020d0051c896c in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x30696c #15 0x000020d0051c896c in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x30696c #16.1 0x00002061a33d3d91 in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0x4bd91 #16 0x00002061a33d3d91 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4bd91 #17 0x00002061a33ccbc9 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44bc9 #18 0x00002061a33cc8dd in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0x448dd #19 0x00002061a33bd6a6 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x356a6 #20 0x00002061a33c44c8 in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0x3c4c8 #21 0x00002061a33c52c1 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0x3d2c1 #22.1 0x00002061a33d081e in λ(std::__2::unique_ptr >, fbl::ref_ptr, const driver_runtime::Dispatcher::create_with_adder::(anon class)*) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0x4881e #22 0x00002061a33d081e in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4881e #23 0x00002061a33cce7e in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44e7e #24.1 0x00002061a33c6964 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3e964 #24 0x00002061a33c6964 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0x3e964 #25 0x00002061a33c635d in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0x3e35d #26.1 0x00002061a33d0c00 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, zx_status_t, zx_packet_signal_t const*, async_dispatcher_t*, async::wait_base*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0x48c00 #26 0x00002061a33d0c00 in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0x48c00 #27.1 0x00002061a33f2ead in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:415 +0x6aead #27 0x00002061a33f2ead in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x6aead #28 0x00002061a33f478f in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x6c78f #29 0x00004262135b7edc in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7edc #30 0x00004262136e896d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x20896d Link: https://github.com/acpica/acpica/commit/8ea5ada6 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 5bd2315bd2e480cb1462a01d44186d3a767b19ba Author: Tamir Duberstein Date: Wed Apr 5 15:45:45 2023 +0200 ACPICA: Avoid undefined behavior: member access within misaligned address ACPICA commit 60cbb20c009fd67e7b973d67b5dcb4a7b12681d9 Before this change we see the following UBSAN stack traces in Fuchsia: #0 0x0000219ce3426bd7 in acpi_rs_get_list_length(u8*, u32, acpi_size*) ../../third_party/acpica/source/components/resources/rscalc.c:631 +0x2cbbd7 #1.2 0x00002240d84b077f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x00002240d84b077f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x00002240d84b077f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x00002240d84b1385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x00002240d84b0ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x0000219ce3426bd7 in acpi_rs_get_list_length(u8*, u32, acpi_size*) ../../third_party/acpica/source/components/resources/rscalc.c:631 +0x2cbbd7 #5 0x0000219ce3423777 in acpi_rs_create_resource_list(union acpi_operand_object*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rscreate.c:178 +0x2c8777 #6 0x0000219ce342f1b2 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:770 +0x2d41b2 #7 0x0000219ce342f52d in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x2d452d #8 0x0000219ce3246d48 in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0xebd48 #9 0x0000219ce324c94d in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0xf194d #10 0x0000219ce32d8af2 in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x17daf2 #11 0x0000219ce3200b44 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0xa5b44 #12 0x0000219ce32126f7 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0xb76f7 #13.1 0x0000219ce321c8ea in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0xc18ea #13 0x0000219ce321c8ea in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0xc18ea #14.2 0x0000219ce3461b2c in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x306b2c #14.1 0x0000219ce3461b2c in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x306b2c #14 0x0000219ce3461b2c in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x306b2c #15.1 0x000022cc55016d91 in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0x4bd91 #15 0x000022cc55016d91 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4bd91 #16 0x000022cc5500fbc9 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44bc9 #17 0x000022cc5500f8dd in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0x448dd #18 0x000022cc550006a6 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x356a6 #19 0x000022cc550074c8 in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0x3c4c8 #20 0x000022cc550082c1 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0x3d2c1 #21.1 0x000022cc5501381e in λ(std::__2::unique_ptr >, fbl::ref_ptr, const driver_runtime::Dispatcher::create_with_adder::(anon class)*) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0x4881e #21 0x000022cc5501381e in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4881e #22 0x000022cc5500fe7e in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44e7e #23.1 0x000022cc55009964 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3e964 #23 0x000022cc55009964 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0x3e964 #24 0x000022cc5500935d in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0x3e35d #25.1 0x000022cc55013c00 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, zx_status_t, zx_packet_signal_t const*, async_dispatcher_t*, async::wait_base*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0x48c00 #25 0x000022cc55013c00 in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0x48c00 #26.1 0x000022cc55035ead in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:415 +0x6aead #26 0x000022cc55035ead in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x6aead #27 0x000022cc5503778f in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x6c78f #28 0x000042d43f9f1edc in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7edc #29 0x000042d43fb2296d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x20896d and #0 0x000022db2bfa3753 in acpi_rs_get_list_length(u8*, u32, acpi_size*) ../../third_party/acpica/source/components/resources/rscalc.c:704 +0x2cb753 #1.2 0x000020c421f9777f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x000020c421f9777f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x000020c421f9777f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x000020c421f98385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x000020c421f97ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x000022db2bfa3753 in acpi_rs_get_list_length(u8*, u32, acpi_size*) ../../third_party/acpica/source/components/resources/rscalc.c:704 +0x2cb753 #5 0x000022db2bfa0777 in acpi_rs_create_resource_list(union acpi_operand_object*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rscreate.c:178 +0x2c8777 #6 0x000022db2bfac0f2 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:770 +0x2d40f2 #7 0x000022db2bfac46d in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x2d446d #8 0x000022db2bdc3d48 in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0xebd48 #9 0x000022db2bdc994d in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0xf194d #10 0x000022db2be55af2 in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x17daf2 #11 0x000022db2bd7db44 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0xa5b44 #12 0x000022db2bd8f6f7 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0xb76f7 #13.1 0x000022db2bd998ea in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0xc18ea #13 0x000022db2bd998ea in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0xc18ea #14.2 0x000022db2bfdea6c in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x306a6c #14.1 0x000022db2bfdea6c in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x306a6c #14 0x000022db2bfdea6c in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x306a6c #15.1 0x0000216d819f2d91 in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0x4bd91 #15 0x0000216d819f2d91 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4bd91 #16 0x0000216d819ebbc9 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44bc9 #17 0x0000216d819eb8dd in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0x448dd #18 0x0000216d819dc6a6 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x356a6 #19 0x0000216d819e34c8 in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0x3c4c8 #20 0x0000216d819e42c1 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0x3d2c1 #21.1 0x0000216d819ef81e in λ(std::__2::unique_ptr >, fbl::ref_ptr, const driver_runtime::Dispatcher::create_with_adder::(anon class)*) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0x4881e #21 0x0000216d819ef81e in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4881e #22 0x0000216d819ebe7e in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44e7e #23.1 0x0000216d819e5964 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3e964 #23 0x0000216d819e5964 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0x3e964 #24 0x0000216d819e535d in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0x3e35d #25.1 0x0000216d819efc00 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, zx_status_t, zx_packet_signal_t const*, async_dispatcher_t*, async::wait_base*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0x48c00 #25 0x0000216d819efc00 in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0x48c00 #26.1 0x0000216d81a11ead in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:415 +0x6aead #26 0x0000216d81a11ead in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x6aead #27 0x0000216d81a1378f in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x6c78f #28 0x0000417ba4b4bedc in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7edc #29 0x0000417ba4c7c96d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x20896d Link: https://github.com/acpica/acpica/commit/60cbb20c Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 218387e6cf49d0a81d1428dac91f827a13d2cd4b Author: Tamir Duberstein Date: Wed Apr 5 15:44:55 2023 +0200 ACPICA: Avoid undefined behavior: member access within misaligned address ACPICA commit 7b23bdc37432f0b7fb6c3b6aa76debdcb7eb18c3 Before this change we see the following UBSAN stack trace in Fuchsia: #0 0x00002132da6299a1 in acpi_ut_validate_resource(struct acpi_walk_state*, void*, u8*) ../../third_party/acpica/source/components/utilities/utresrc.c:426 +0x2f79a1 #1.2 0x000023e6cd58577f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x000023e6cd58577f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x000023e6cd58577f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x000023e6cd586385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x000023e6cd585ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x00002132da6299a1 in acpi_ut_validate_resource(struct acpi_walk_state*, void*, u8*) ../../third_party/acpica/source/components/utilities/utresrc.c:426 +0x2f79a1 #5 0x00002132da628ffe in acpi_ut_walk_aml_resources(struct acpi_walk_state*, u8*, acpi_size, acpi_walk_aml_callback, void**) ../../third_party/acpica/source/components/utilities/utresrc.c:216 +0x2f6ffe #6 0x00002132da5b2405 in acpi_ex_concat_template(union acpi_operand_object*, union acpi_operand_object*, union acpi_operand_object**, struct acpi_walk_state*) ../../third_party/acpica/source/components/executer/exconcat.c:414 +0x280405 #7 0x00002132da5ad5a4 in acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state*) ../../third_party/acpica/source/components/executer/exoparg2.c:383 +0x27b5a4 #8 0x00002132da57ee7d in acpi_ds_exec_end_op(struct acpi_walk_state*) ../../third_party/acpica/source/components/dispatcher/dswexec.c:482 +0x24ce7d #9 0x00002132da5ed196 in acpi_ps_parse_loop(struct acpi_walk_state*) ../../third_party/acpica/source/components/parser/psloop.c:554 +0x2bb196 #10 0x00002132da5ea458 in acpi_ps_parse_aml(struct acpi_walk_state*) ../../third_party/acpica/source/components/parser/psparse.c:525 +0x2b8458 #11 0x00002132da5f8a92 in acpi_ps_execute_method(struct acpi_evaluate_info*) ../../third_party/acpica/source/components/parser/psxface.c:244 +0x2c6a92 #12 0x00002132da55c2b2 in acpi_ns_evaluate(struct acpi_evaluate_info*) ../../third_party/acpica/source/components/namespace/nseval.c:250 +0x22a2b2 #13 0x00002132da61fd45 in acpi_ut_evaluate_object(struct acpi_namespace_node*, const char*, u32, union acpi_operand_object**) ../../third_party/acpica/source/components/utilities/uteval.c:100 +0x2edd45 #14 0x00002132da606197 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:757 +0x2d4197 #15 0x00002132da60652d in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x2d452d #16 0x00002132da41dd48 in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0xebd48 #17 0x00002132da42394d in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0xf194d #18 0x00002132da4afaf2 in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x17daf2 #19 0x00002132da3d7b44 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0xa5b44 #20 0x00002132da3e96f7 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0xb76f7 #21.1 0x00002132da3f38ea in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0xc18ea #21 0x00002132da3f38ea in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0xc18ea #22.2 0x00002132da638c6c in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x306c6c #22.1 0x00002132da638c6c in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x306c6c #22 0x00002132da638c6c in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x306c6c #23.1 0x000022c67b305d91 in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0x4bd91 #23 0x000022c67b305d91 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4bd91 #24 0x000022c67b2febc9 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44bc9 #25 0x000022c67b2fe8dd in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0x448dd #26 0x000022c67b2ef6a6 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x356a6 #27 0x000022c67b2f64c8 in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0x3c4c8 #28 0x000022c67b2f72c1 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0x3d2c1 #29.1 0x000022c67b30281e in λ(std::__2::unique_ptr >, fbl::ref_ptr, const driver_runtime::Dispatcher::create_with_adder::(anon class)*) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0x4881e #29 0x000022c67b30281e in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0x4881e #30 0x000022c67b2fee7e in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x44e7e #31.1 0x000022c67b2f8964 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x3e964 #31 0x000022c67b2f8964 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0x3e964 #32 0x000022c67b2f835d in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0x3e35d #33.1 0x000022c67b302c00 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, zx_status_t, zx_packet_signal_t const*, async_dispatcher_t*, async::wait_base*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0x48c00 #33 0x000022c67b302c00 in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0x48c00 #34.1 0x000022c67b324ead in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:415 +0x6aead #34 0x000022c67b324ead in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x6aead #35 0x000022c67b32678f in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x6c78f #36 0x0000431cc3246edc in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7edc #37 0x0000431cc337796d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x20896d Link: https://github.com/acpica/acpica/commit/7b23bdc3 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 24d9609b3cd2e7ddf7b9417a96c5b474086a38e2 Author: Tamir Duberstein Date: Wed Apr 5 15:44:12 2023 +0200 ACPICA: Avoid undefined behavior: member access within misaligned address ACPICA commit c14708336bd18552b28643575de7b5beb9b864e9 Before this change we see the following UBSAN stack trace in Fuchsia: #0 0x0000220c98288eba in acpi_rs_get_address_common(struct acpi_resource*, union aml_resource*) ../../third_party/acpica/source/components/resources/rsaddr.c:331 +0x8f6eba #1.2 0x000023625f46077f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x000023625f46077f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x000023625f46077f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x000023625f461385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x000023625f460ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x0000220c98288eba in acpi_rs_get_address_common(struct acpi_resource*, union aml_resource*) ../../third_party/acpica/source/components/resources/rsaddr.c:331 +0x8f6eba #5 0x0000220c9828ea57 in acpi_rs_convert_aml_to_resource(struct acpi_resource*, union aml_resource*, struct acpi_rsconvert_info*) ../../third_party/acpica/source/components/resources/rsmisc.c:352 +0x8fca57 #6 0x0000220c9828992c in acpi_rs_convert_aml_to_resources(u8*, u32, u32, u8, void**) ../../third_party/acpica/source/components/resources/rslist.c:132 +0x8f792c #7 0x0000220c982d1cfc in acpi_ut_walk_aml_resources(struct acpi_walk_state*, u8*, acpi_size, acpi_walk_aml_callback, void**) ../../third_party/acpica/source/components/utilities/utresrc.c:234 +0x93fcfc #8 0x0000220c98281e46 in acpi_rs_create_resource_list(union acpi_operand_object*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rscreate.c:199 +0x8efe46 #9 0x0000220c98293b51 in acpi_rs_get_method_data(acpi_handle, const char*, struct acpi_buffer*) ../../third_party/acpica/source/components/resources/rsutils.c:770 +0x901b51 #10 0x0000220c9829438d in acpi_walk_resources(acpi_handle, char*, acpi_walk_resource_callback, void*) ../../third_party/acpica/source/components/resources/rsxface.c:731 +0x90238d #11 0x0000220c97db272b in acpi::acpi_impl::walk_resources(acpi::acpi_impl*, acpi_handle, const char*, acpi::Acpi::resources_callable) ../../src/devices/board/lib/acpi/acpi-impl.cc:41 +0x42072b #12 0x0000220c97dcec59 in acpi::device_builder::gather_resources(acpi::device_builder*, acpi::Acpi*, fidl::any_arena&, acpi::Manager*, acpi::device_builder::gather_resources_callback) ../../src/devices/board/lib/acpi/device-builder.cc:52 +0x43cc59 #13 0x0000220c97f94a3f in acpi::Manager::configure_discovered_devices(acpi::Manager*) ../../src/devices/board/lib/acpi/manager.cc:75 +0x602a3f #14 0x0000220c97c642c7 in publish_acpi_devices(acpi::Manager*, zx_device_t*, zx_device_t*) ../../src/devices/board/drivers/x86/acpi-nswalk.cc:102 +0x2d22c7 #15 0x0000220c97caf3e6 in x86::X86::do_init(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:65 +0x31d3e6 #16 0x0000220c97cd72ae in λ(x86::X86::ddk_init::(anon class)*) ../../src/devices/board/drivers/x86/x86.cc:82 +0x3452ae #17 0x0000220c97cd7223 in fit::internal::target<(lambda at../../src/devices/board/drivers/x86/x86.cc:81:19), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 +0x345223 #18 0x0000220c97f48eb0 in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0x5b6eb0 #19 0x0000220c97f48d2a in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0x5b6d2a #20 0x0000220c982f9245 in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 +0x967245 #21 0x000022e2aa1cd91e in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0xed91e #22 0x000022e2aa1cd621 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0xed621 #23 0x000022e2aa1a8482 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0xc8482 #24 0x000022e2aa1a80f8 in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0xc80f8 #25 0x000022e2aa17fc76 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x9fc76 #26 0x000022e2aa18c7ef in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0xac7ef #27 0x000022e2aa18fd67 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0xafd67 #28 0x000022e2aa1bc9a2 in λ(const driver_runtime::Dispatcher::create_with_adder::(anon class)*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0xdc9a2 #29 0x000022e2aa1bc6d2 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0xdc6d2 #30 0x000022e2aa1aa1e5 in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0xca1e5 #31 0x000022e2aa1a9e32 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0xc9e32 #32 0x000022e2aa193444 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0xb3444 #33 0x000022e2aa192feb in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0xb2feb #34 0x000022e2aa1bcf74 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0xdcf74 #35 0x000022e2aa1bd1cb in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0xdd1cb #36 0x000022e2aa2303a9 in async_loop_dispatch_wait(async_loop_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async-loop/loop.c:381 +0x1503a9 #37 0x000022e2aa229a82 in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:330 +0x149a82 #38 0x000022e2aa229102 in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x149102 #39 0x000022e2aa22aeb7 in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x14aeb7 #40 0x000041a874980f1c in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7f1c #41 0x000041a874aabe8d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x202e8d Link: https://github.com/acpica/acpica/commit/c1470833 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 4cf8a60602f724d07e0c8d4bb639dfd38b36aaa4 Author: Tamir Duberstein Date: Wed Apr 5 15:43:28 2023 +0200 ACPICA: Avoid undefined behavior: member access within null pointer ACPICA commit 2411e11ef88f42b08f33c38ed9c0d40282780e8c 84449c1eef1c0d092b037dc4c2c60cec5d5cc6c4 fixed this for Linux kernel builds, but not Linux userspace builds. Before this change we see the following UBSAN stack trace in Fuchsia: ../../third_party/acpica/source/components/tables/tbfadt.c:536:39: runtime error: member access within null pointer of type 'struct acpi_table_fadt' (aka 'struct acpi_table_fadt') #0 0x564860b5ee9b in acpi_tb_convert_fadt ../../third_party/acpica/source/components/tables/tbfadt.c:536:39 #1 0x564860b5edb4 in acpi_tb_create_local_fadt ../../third_party/acpica/source/components/tables/tbfadt.c:461:5 #2 0x564860b5e5c6 in acpi_tb_parse_fadt ../../third_party/acpica/source/components/tables/tbfadt.c:371:5 #3 0x564860b5c485 in acpi_tb_parse_root_table ../../third_party/acpica/source/components/tables/tbutils.c:407:13 #4 0x564860b6401a in acpi_initialize_tables ../../third_party/acpica/source/components/tables/tbxface.c:160:14 #5 0x5648608fb417 in acpi_host_test::acpi_host_test::init_acpi_with_tables(char const*) ../../src/devices/board/tests/acpi-host-tests/acpi-host-test.cc:36:5 #6 0x5648608f9095 in acpi_host_test::acpi_host_test_device_is_child_of_scope_test_Test::test_body() ../../src/devices/board/tests/acpi-host-tests/acpi-host-test.cc:85:3 #7 0x564860c6007e in void testing::internal::handle_seh_exceptions_in_method_if_supported(testing::Test*, void (testing::Test::*)(), char const*) ../../third_party/googletest/src/googletest/src/gtest.cc:2609:10 #8 0x564860bbd5df in void testing::internal::handle_exceptions_in_method_if_supported(testing::Test*, void (testing::Test::*)(), char const*) ../../third_party/googletest/src/googletest/src/gtest.cc:2664:12 #9 0x564860bbd141 in testing::Test::Run() ../../third_party/googletest/src/googletest/src/gtest.cc:2684:5 #10 0x564860bbff0a in testing::test_info::Run() ../../third_party/googletest/src/googletest/src/gtest.cc:2864:11 #11 0x564860bc40f1 in testing::test_suite::Run() ../../third_party/googletest/src/googletest/src/gtest.cc:3023:30 #12 0x564860beba40 in testing::internal::unit_test_impl::run_all_tests() ../../third_party/googletest/src/googletest/src/gtest.cc:5882:44 #13 0x564860c7db6e in bool testing::internal::handle_seh_exceptions_in_method_if_supported(testing::internal::unit_test_impl*, bool (testing::internal::unit_test_impl::*)(), char const*) ../../third_party/googletest/src/googletest/src/gtest.cc:2609:10 #14 0x564860bea71f in bool testing::internal::handle_exceptions_in_method_if_supported(testing::internal::unit_test_impl*, bool (testing::internal::unit_test_impl::*)(), char const*) ../../third_party/googletest/src/googletest/src/gtest.cc:2664:12 #15 0x564860bea1c5 in testing::unit_test::Run() ../../third_party/googletest/src/googletest/src/gtest.cc:5456:10 #16 0x5648608fccc0 in RUN_ALL_TESTS() ../../third_party/googletest/src/googletest/include/gtest/gtest.h:2304:73 #17 0x5648608fcb7e in main ../../src/devices/board/tests/acpi-host-tests/acpi-host-test.cc:121:10 #18 0x7f6defa2d189 (/lib/x86_64-linux-gnu/libc.so.6+0x27189) (build_id: c4f6727c560b1c33527ff9e0ca0cef13a7db64d2) #19 0x7f6defa2d244 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x27244) (build_id: c4f6727c560b1c33527ff9e0ca0cef13a7db64d2) #20 0x56486082e598 (/usr/local/google/home/tamird/src/fuchsia/out/core.x64/host_x64/acpi-host-test-bin+0x359598) (build_id: 851423b0e664df6a) Link: https://github.com/acpica/acpica/commit/2411e11e Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 05bb0167c80b8f93c6a4e0451b7da9b96db990c2 Author: Tamir Duberstein Date: Wed Apr 5 15:42:43 2023 +0200 ACPICA: Avoid undefined behavior: applying zero offset to null pointer ACPICA commit 770653e3ba67c30a629ca7d12e352d83c2541b1e Before this change we see the following UBSAN stack trace in Fuchsia: #0 0x000021e4213b3302 in acpi_ds_init_aml_walk(struct acpi_walk_state*, union acpi_parse_object*, struct acpi_namespace_node*, u8*, u32, struct acpi_evaluate_info*, u8) ../../third_party/acpica/source/components/dispatcher/dswstate.c:682 +0x233302 #1.2 0x000020d0f660777f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x000020d0f660777f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x000020d0f660777f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x000020d0f660b96d in handlepointer_overflow_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:809 +0x4196d #3 0x000020d0f660b50d in compiler-rt/lib/ubsan/ubsan_handlers.cpp:815 +0x4150d #4 0x000021e4213b3302 in acpi_ds_init_aml_walk(struct acpi_walk_state*, union acpi_parse_object*, struct acpi_namespace_node*, u8*, u32, struct acpi_evaluate_info*, u8) ../../third_party/acpica/source/components/dispatcher/dswstate.c:682 +0x233302 #5 0x000021e4213e2369 in acpi_ds_call_control_method(struct acpi_thread_state*, struct acpi_walk_state*, union acpi_parse_object*) ../../third_party/acpica/source/components/dispatcher/dsmethod.c:605 +0x262369 #6 0x000021e421437fac in acpi_ps_parse_aml(struct acpi_walk_state*) ../../third_party/acpica/source/components/parser/psparse.c:550 +0x2b7fac #7 0x000021e4214464d2 in acpi_ps_execute_method(struct acpi_evaluate_info*) ../../third_party/acpica/source/components/parser/psxface.c:244 +0x2c64d2 #8 0x000021e4213aa052 in acpi_ns_evaluate(struct acpi_evaluate_info*) ../../third_party/acpica/source/components/namespace/nseval.c:250 +0x22a052 #9 0x000021e421413dd8 in acpi_ns_init_one_device(acpi_handle, u32, void*, void**) ../../third_party/acpica/source/components/namespace/nsinit.c:735 +0x293dd8 #10 0x000021e421429e98 in acpi_ns_walk_namespace(acpi_object_type, acpi_handle, u32, u32, acpi_walk_callback, acpi_walk_callback, void*, void**) ../../third_party/acpica/source/components/namespace/nswalk.c:298 +0x2a9e98 #11 0x000021e4214131ac in acpi_ns_initialize_devices(u32) ../../third_party/acpica/source/components/namespace/nsinit.c:268 +0x2931ac #12 0x000021e42147c40d in acpi_initialize_objects(u32) ../../third_party/acpica/source/components/utilities/utxfinit.c:304 +0x2fc40d #13 0x000021e42126d603 in acpi::acpi_impl::initialize_acpi(acpi::acpi_impl*) ../../src/devices/board/lib/acpi/acpi-impl.cc:224 +0xed603 Add a simple check that avoids incrementing a pointer by zero, but otherwise behaves as before. Note that our findings are against ACPICA 20221020, but the same code exists on master. Link: https://github.com/acpica/acpica/commit/770653e3 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit d56ba92b0ce659a235d8ed541c785fdb2f760449 Author: Tamir Duberstein Date: Wed Apr 5 15:41:50 2023 +0200 ACPICA: Avoid undefined behavior: load of misaligned address ACPICA commit 807665510f1ea71bbdc063c27782a1da56e8e10a Before this change we see the following UBSAN stack trace in Fuchsia: #0 0x00002234800696e6 in acpi_tb_get_root_table_entry(u8*, u32) ../../third_party/acpica/source/components/tables/tbutils.c:231 +0x9106e6 #1.2 0x0000233d72c8777f in ubsan_get_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:41 +0x3d77f #1.1 0x0000233d72c8777f in maybe_print_stack_trace() compiler-rt/lib/ubsan/ubsan_diag.cpp:51 +0x3d77f #1 0x0000233d72c8777f in ~scoped_report() compiler-rt/lib/ubsan/ubsan_diag.cpp:387 +0x3d77f #2 0x0000233d72c88385 in handletype_mismatch_impl() compiler-rt/lib/ubsan/ubsan_handlers.cpp:137 +0x3e385 #3 0x0000233d72c87ead in compiler-rt/lib/ubsan/ubsan_handlers.cpp:142 +0x3dead #4 0x00002234800696e6 in acpi_tb_get_root_table_entry(u8*, u32) ../../third_party/acpica/source/components/tables/tbutils.c:231 +0x9106e6 #5 0x00002234800691dd in acpi_tb_parse_root_table(acpi_physical_address) ../../third_party/acpica/source/components/tables/tbutils.c:385 +0x9101dd #6 0x0000223480070b06 in acpi_initialize_tables(struct acpi_table_desc*, u32, u8) ../../third_party/acpica/source/components/tables/tbxface.c:160 +0x917b06 #7 0x000022347fb803b4 in acpi::acpi_impl::initialize_acpi(acpi::acpi_impl*) ../../src/devices/board/lib/acpi/acpi-impl.cc:200 +0x4273b4 #8 0x000022347fa30d14 in x86::X86::early_acpi_init(x86::X86*) ../../src/devices/board/drivers/x86/init.cc:34 +0x2d7d14 #9 0x000022347fa310cf in x86::X86::early_init(x86::X86*) ../../src/devices/board/drivers/x86/init.cc:43 +0x2d80cf #10 0x000022347fa79410 in x86::X86::Bind(x86::X86*) ../../src/devices/board/drivers/x86/x86.cc:144 +0x320410 #11 0x000022347fa78ec0 in x86::X86::create_and_bind(void*, zx_device_t*) ../../src/devices/board/drivers/x86/x86.cc:123 +0x31fec0 #12 0x000020dc8908502f in λ(const zx_driver::bind_op::(anon class)*) ../../src/devices/bin/driver_host/zx_driver.cc:36 <>+0x41502f #13 0x000020dc89084e03 in fit::internal::target<(lambda at../../src/devices/bin/driver_host/zx_driver.cc:34:61), false, false, void>::invoke(void*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:181 <>+0x414e03 #14 0x000020dc8935a930 in fit::internal::function_base<16UL, false, void()>::invoke(const fit::internal::function_base<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 <>+0x6ea930 #15 0x000020dc893e2f8a in fit::function_impl<16UL, false, void()>::operator()(const fit::function_impl<16UL, false, void ()>*) ../../sdk/lib/fit/include/lib/fit/function.h:300 <>+0x772f8a #16 0x000020dc8948dec5 in async::internal::retained_task::Handler(async_dispatcher_t*, async_task_t*, zx_status_t) ../../zircon/system/ulib/async/task.cc:25 <>+0x81dec5 #17 0x000023ab5abcf91e in λ(const driver_runtime::Dispatcher::post_task::(anon class)*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/dispatcher.cc:715 +0xed91e #18 0x000023ab5abcf621 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:714:7), true, false, void, std::__2::unique_ptr>, int>::invoke(void*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0xed621 #19 0x000023ab5abaa482 in fit::internal::function_base<24UL, true, void(std::__2::unique_ptr>, int)>::invoke(const fit::internal::function_base<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0xc8482 #20 0x000023ab5abaa0f8 in fit::callback_impl<24UL, true, void(std::__2::unique_ptr>, int)>::operator()(fit::callback_impl<24UL, true, void (std::__2::unique_ptr >, int)>*, std::__2::unique_ptr >, int) ../../sdk/lib/fit/include/lib/fit/function.h:451 +0xc80f8 #21 0x000023ab5ab81c76 in driver_runtime::callback_request::Call(driver_runtime::callback_request*, std::__2::unique_ptr >, zx_status_t) ../../src/devices/bin/driver_runtime/callback_request.h:67 +0x9fc76 #22 0x000023ab5ab8e7ef in driver_runtime::Dispatcher::dispatch_callback(driver_runtime::Dispatcher*, std::__2::unique_ptr >) ../../src/devices/bin/driver_runtime/dispatcher.cc:1093 +0xac7ef #23 0x000023ab5ab91d67 in driver_runtime::Dispatcher::dispatch_callbacks(driver_runtime::Dispatcher*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:1169 +0xafd67 #24 0x000023ab5abbe9a2 in λ(const driver_runtime::Dispatcher::create_with_adder::(anon class)*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.cc:338 +0xdc9a2 #25 0x000023ab5abbe6d2 in fit::internal::target<(lambda at../../src/devices/bin/driver_runtime/dispatcher.cc:337:7), true, false, void, std::__2::unique_ptr>, fbl::ref_ptr>::invoke(void*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:128 +0xdc6d2 #26 0x000023ab5abac1e5 in fit::internal::function_base<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::invoke(const fit::internal::function_base<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/internal/function.h:505 +0xca1e5 #27 0x000023ab5ababe32 in fit::function_impl<8UL, true, void(std::__2::unique_ptr>, fbl::ref_ptr)>::operator()(const fit::function_impl<8UL, true, void (std::__2::unique_ptr >, fbl::ref_ptr)>*, std::__2::unique_ptr >, fbl::ref_ptr) ../../sdk/lib/fit/include/lib/fit/function.h:300 +0xc9e32 #28 0x000023ab5ab95444 in driver_runtime::Dispatcher::event_waiter::invoke_callback(driver_runtime::Dispatcher::event_waiter*, std::__2::unique_ptr >, fbl::ref_ptr) ../../src/devices/bin/driver_runtime/dispatcher.h:299 +0xb3444 #29 0x000023ab5ab94feb in driver_runtime::Dispatcher::event_waiter::handle_event(std::__2::unique_ptr >, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/dispatcher.cc:1259 +0xb2feb #30 0x000023ab5abbef74 in async_loop_owned_event_handler::handle_event(async_loop_owned_event_handler*, async_dispatcher_t*, async::wait_base*, zx_status_t, zx_packet_signal_t const*) ../../src/devices/bin/driver_runtime/async_loop_owned_event_handler.h:59 +0xdcf74 #31 0x000023ab5abbf1cb in async::wait_method, &async_loop_owned_event_handler::handle_event>::call_handler(async_dispatcher_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async/include/lib/async/cpp/wait.h:201 +0xdd1cb #32 0x000023ab5ac323a9 in async_loop_dispatch_wait(async_loop_t*, async_wait_t*, zx_status_t, zx_packet_signal_t const*) ../../zircon/system/ulib/async-loop/loop.c:381 +0x1503a9 #33 0x000023ab5ac2ba82 in async_loop_run_once(async_loop_t*, zx_time_t) ../../zircon/system/ulib/async-loop/loop.c:330 +0x149a82 #34 0x000023ab5ac2b102 in async_loop_run(async_loop_t*, zx_time_t, _Bool) ../../zircon/system/ulib/async-loop/loop.c:288 +0x149102 #35 0x000023ab5ac2ceb7 in async_loop_run_thread(void*) ../../zircon/system/ulib/async-loop/loop.c:840 +0x14aeb7 #36 0x000040b3be411f1c in start_c11(void*) ../../zircon/third_party/ulib/musl/pthread/pthread_create.c:55 +0xd7f1c #37 0x000040b3be53ce8d in thread_trampoline(uintptr_t, uintptr_t) ../../zircon/system/ulib/runtime/thread.cc:100 +0x202e8d Link: https://github.com/acpica/acpica/commit/80766551 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 003567a3b70d0dc5adf71ca0b2bd43d2b4a1ee26 Author: Sunil V L Date: Wed Apr 5 15:40:57 2023 +0200 ACPICA: Add structure definitions for RISC-V RHCT ACPICA commit 82afd0434e79f74b96a6be88115ddc8343a1ba40 RISC-V Hart Capabilities Table (RHCT) is a new static table. The ECR to add RHCT is approved by the UEFI forum and will be available in the next version of the ACPI spec. Link: https://github.com/acpica/acpica/commit/82afd043 Signed-off-by: Sunil V L Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit f2ca92d08325b8d4668a6b3ee4b3d5622b75b952 Author: Sunil V L Date: Wed Apr 5 15:40:12 2023 +0200 ACPICA: MADT: Add RISC-V INTC interrupt controller ACPICA commit bd6d1ae1e13abe78e149c8b61b4bc7bc7feab015 The ECR to add RISC-V INTC interrupt controller is approved by the UEFI forum and will be available in the next revision of the ACPI specification. Link: https://github.com/acpica/acpica/commit/bd6d1ae1 Signed-off-by: Sunil V L Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 520d4a0ee5b6d9c7a1258ace6caa13a94ac35ef8 Author: Niyas Sait Date: Wed Apr 5 15:39:23 2023 +0200 ACPICA: add support for ClockInput resource (v6.5) ACPICA commit 661feab5ee01a34af95a389a18c82e79f1aba05a Link: https://github.com/acpica/acpica/commit/661feab5 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 612c29328466bdc1454ce76959fc03a1e2f7087a Author: Bob Moore Date: Wed Apr 5 15:38:21 2023 +0200 ACPICA: Update all copyrights/signons to 2023 ACPICA commit 25bddd1824b1e450829468a64bbdcb38074ba3d2 Copyright updates to 2023. Link: https://github.com/acpica/acpica/commit/25bddd18 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 47920aae34e295f4ffbeac0b10698ceda52eec99 Author: Hesham Almatary Date: Wed Apr 5 15:37:35 2023 +0200 ACPICA: Add support for Arm's MPAM ACPI table version 2 ACPICA commit 005e24bcaa6e4c7db327b4f81fb63b2715aac7e6 Complies with ACPI for Memory System Resource Partitioning and Monitoring 2.0 [1]. Document number: DEN0065, as of December 2022. Support for all types of MPAM resources. No support yet for: 1) MPAM PCC Interface Type 2) The optional Resource-specific data per MSC node, introduced in v2 of the MPAM ACPI spec. [1] https://developer.arm.com/documentation/den0065/latest Link: https://github.com/acpica/acpica/commit/005e24bc Signed-off-by: Hesham Almatary Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit f5325cb1041479b2ae7d78173dfd51092c20c16b Author: Jeremi Piotrowski Date: Wed Apr 5 15:36:51 2023 +0200 ACPICA: Add support for ASPT table in disassembler ACPICA commit 6771f8b758299bd383bab145d5fd36ec229b2d70 ASPT is the AMD Secure Processor table, found in Hyper-V VMs when SNP isolation is exposed to the VM and in some high-end AMD servers. This commit adds support for rev 1 of the ASPT spec in the disassembler. Link: https://github.com/acpica/acpica/commit/6771f8b7 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit a47a0c2a1fe1e4975c7214e1efeabc68171dc5c5 Author: Huacai Chen Date: Wed Apr 5 15:36:09 2023 +0200 ACPICA: Add support for 64 bit loong_arch compilation ACPICA commit d809b69cf43c632c8fe5b42372a891216fdd9223 Add 64 bit loong_arch architecture by defining ACPI_MACHINE_WIDTH to 64. Useful for acpica tools and incorporating ACPICA into the Firmware Test Suite. Link: https://github.com/acpica/acpica/commit/d809b69c Signed-off-by: Huacai Chen Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 9737ff46f7dc16753d7f276c476d0211d1ac33c1 Author: Pedro Falcato Date: Wed Apr 5 15:35:31 2023 +0200 ACPICA: acpisrc: Add missing tables to astable ACPICA commit d4a2c93198cdd9c6f4a83798345851fee96d5ca5 Also renames struct acpi_data_table_mapping's struct to struct acpi_data_table_mapping, just so conversion goes smoothly. Link: https://github.com/acpica/acpica/commit/d4a2c931 Signed-off-by: Pedro Falcato Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 9db8a1c217e3f653ec8e2837911c83bcae26809f Author: Xiongfeng Wang Date: Wed Apr 5 15:34:51 2023 +0200 ACPICA: Add missing macro ACPI_FUNCTION_TRACE() for acpi_ns_repair_HID() ACPICA commit 2d85f3d30cdf9ceeb516e76bdc3c5c5d1d9b9fea The following commit add function tracing macros for the namespace repiar mechanism. commit 87b8dba05b4cf8c111948327023c710e2b6b5a05 Add function trace macros to improve namespace debugging But it missed the trace macro for the entry of ns_repair_HID(). Let's add it. Link: https://github.com/acpica/acpica/commit/2d85f3d3 Signed-off-by: Xiongfeng Wang Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 377421fcfb9716cbaef57dbc3d37ddeccd41f9fe Author: Xiongfeng Wang Date: Wed Apr 5 15:33:07 2023 +0200 ACPICA: ACPI 6.5: MADT: add support for trace buffer extension in GICC ACPICA commit 1363e35dc6976143d118588b5124d72017365588 Link: https://github.com/acpica/acpica/commit/1363e35d Signed-off-by: Xiongfeng Wang Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 86f240a2f7e953840f3b837bc23e39d515a653ed Author: Jessica Clarke Date: Wed Apr 5 15:32:06 2023 +0200 ACPICA: Headers: Delete bogus node_array array of pointers from AEST table ACPICA commit f0c4a06f1dfc4886d4e0c2aa30bc57b10c5a8c53 Like many tables, this is a header followed by multiple subtables of varying self-identifying types, and ACPICA does not normally add a field for the subtables, instead relying on pointer arithmetic past the end of the first header struct, since indexing a flexible array member is meaningless for variable-length entries. If we really wanted a field for this, we could use a u8 flexible array member, but it contradicts the current style. Using void *, however, is categorically wrong, as ACPI tables never contain native C-language pointers. Link: https://github.com/acpica/acpica/commit/f0c4a06f Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 83e57e47906ce0e99bd61c70fae514e69960d274 Author: Eric Biggers Date: Thu Apr 6 11:12:45 2023 -0700 fscrypt: optimize fscrypt_initialize() fscrypt_initialize() is a "one-time init" function that is called whenever the key is set up for any inode on any filesystem. Make it implement "one-time init" more efficiently by not taking a global mutex in the "already initialized case" and doing fewer pointer dereferences. Link: https://lore.kernel.org/r/20230406181245.36091-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit d6573b4c202e75edd8b7ffbef6496613a1ef89df Author: Krzysztof Kozlowski Date: Wed Apr 5 08:09:06 2023 +0200 arm64: dts: qcom: sm8450: simplify interrupts-extended The parent controller for both interrupts is GIC, so no need for interrupts-extended. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230405060906.143058-5-krzysztof.kozlowski@linaro.org commit 563065020d9ae67999f3f3f3a6ec3508e17a4d88 Author: Krzysztof Kozlowski Date: Wed Apr 5 08:09:05 2023 +0200 arm64: dts: qcom: sm8250: simplify interrupts-extended The parent controller for the interrupt is GIC, so no need for interrupts-extended. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230405060906.143058-4-krzysztof.kozlowski@linaro.org commit 465b99f3b4ca55f25124adff6d6ccac4371f1930 Author: Krzysztof Kozlowski Date: Wed Apr 5 08:09:04 2023 +0200 arm64: dts: qcom: sc8280xp: simplify interrupts-extended The parent controller for both interrupts is GIC, so no need for interrupts-extended. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230405060906.143058-3-krzysztof.kozlowski@linaro.org commit add214009d0632bf3f28158f81e4d202d8c9aa0e Author: Krzysztof Kozlowski Date: Wed Apr 5 08:09:03 2023 +0200 arm64: dts: qcom: sm8450: label the Soundwire nodes Use labels, instead of comments, for Soundwire controllers. Naming them is useful, because they are specialized and have also naming in datasheet/programming guide. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230405060906.143058-2-krzysztof.kozlowski@linaro.org commit f77256439ccb794ec02eb07dfc6f1f96972a8cff Author: Krzysztof Kozlowski Date: Wed Apr 5 08:09:02 2023 +0200 arm64: dts: qcom: sc8280xp: label the Soundwire nodes Use labels, instead of comments, for Soundwire controllers. Naming them is useful, because they are specialized and have also naming in datasheet/programming guide. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230405060906.143058-1-krzysztof.kozlowski@linaro.org commit a5f1da6601a0b0b0ee747bd91225bda5aad2e3af Merge: 34bf93472f8fb c0801598e5430 Author: Martin KaFai Lau Date: Thu Apr 6 09:53:05 2023 -0700 Merge branch 'xsk: Fix unaligned descriptor validation' Kal Conley says: ==================== This patchset includes the test with the bugfix as requested here: https://lore.kernel.org/all/f1a32d5a-03e7-fce1-f5a5-6095f365f0a9@linux.dev/ Patch #1 (the bugfix) is identical to the previous submission except that I improved the commit message slightly. Magnus: I improved the test code a little different than you asked since I thought this was a little simpler than having a separate function for now. Hopefully, you can live with this :-). ==================== Signed-off-by: Martin KaFai Lau commit c0801598e5430d9da2d406ed32fcedbef23977fc Author: Kal Conley Date: Thu Apr 6 01:59:19 2023 +0200 selftests: xsk: Add test UNALIGNED_INV_DESC_4K1_FRAME_SIZE Add unaligned descriptor test for frame size of 4001. Using an odd frame size ensures that the end of the UMEM is not near a page boundary. This allows testing descriptors that staddle the end of the UMEM but not a page. This test used to fail without the previous commit ("xsk: Fix unaligned descriptor validation"). Signed-off-by: Kal Conley Link: https://lore.kernel.org/r/20230405235920.7305-3-kal.conley@dectris.com Signed-off-by: Martin KaFai Lau commit e9ebecf266c6657de5865a02a47c0d6b2460c526 Author: Matthew Wilcox Date: Fri Mar 24 18:01:29 2023 +0000 ext4: Use a folio in ext4_read_merkle_tree_page This is an implementation of fsverity_operations read_merkle_tree_page, so it must still return the precise page asked for, but we can use the folio API to reduce the number of conversions between folios & pages. Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230324180129.1220691-30-willy@infradead.org Signed-off-by: Theodore Ts'o commit b23fb762785babc1d6194770c88432da037c8a64 Author: Matthew Wilcox Date: Fri Mar 24 18:01:28 2023 +0000 ext4: Convert pagecache_read() to use a folio Use the folio API and support folios of arbitrary sizes. Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230324180129.1220691-29-willy@infradead.org Signed-off-by: Theodore Ts'o commit 3060b6ef05603cf3c05b2b746f739b0169bd75f9 Author: Matthew Wilcox Date: Fri Mar 24 18:01:27 2023 +0000 ext4: Convert mext_page_mkuptodate() to take a folio Use a folio throughout. Does not support large folios due to an array sized for MAX_BUF_PER_PAGE, but it does remove a few calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230324180129.1220691-28-willy@infradead.org Signed-off-by: Theodore Ts'o commit f2b229a8c6c2633c35cb7446cfabea5a6f721edc Author: Matthew Wilcox Date: Fri Mar 24 18:01:26 2023 +0000 ext4: Use a folio iterator in __read_end_io() Iterate once per folio, not once per page. Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230324180129.1220691-27-willy@infradead.org Signed-off-by: Theodore Ts'o commit 9ea0e45bd2f6cbfba787360f5ba8e18deabb7671 Author: Matthew Wilcox Date: Fri Mar 24 18:01:25 2023 +0000 ext4: Use a folio in ext4_page_mkwrite() Convert to the folio API, saving a few calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230324180129.1220691-26-willy@infradead.org Signed-off-by: Theodore Ts'o commit 86b38c273cc68ce7b50649447d8ac0ddf3228026 Author: Matthew Wilcox Date: Fri Mar 24 18:01:24 2023 +0000 ext4: Convert ext4_block_write_begin() to take a folio All the callers now have a folio, so pass that in and operate on folios. Removes four calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Ritesh Harjani (IBM) Link: https://lore.kernel.org/r/20230324180129.1220691-25-willy@infradead.org Signed-off-by: Theodore Ts'o commit c0be8e6f081b3e966e21f52679b2f809b7df10b8 Author: Matthew Wilcox Date: Fri Mar 24 18:01:23 2023 +0000 ext4: Convert ext4_mpage_readpages() to work on folios This definitely doesn't include support for large folios; there are all kinds of assumptions about the number of buffers attached to a folio. But it does remove several calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230324180129.1220691-24-willy@infradead.org Signed-off-by: Theodore Ts'o commit 0b5a254395dc6db5c38d89e606c0298ed4c9e984 Author: Matthew Wilcox Date: Fri Mar 24 18:01:22 2023 +0000 ext4: Use a folio in ext4_da_write_begin() Remove a few calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230324180129.1220691-23-willy@infradead.org Signed-off-by: Theodore Ts'o commit 02e4b04c56d03a518b958783900b22f33c6643d6 Author: Matthew Wilcox Date: Fri Mar 24 18:01:21 2023 +0000 ext4: Convert ext4_page_nomap_can_writeout to ext4_folio_nomap_can_writeout Its one caller already uses a folio. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230324180129.1220691-22-willy@infradead.org Signed-off-by: Theodore Ts'o commit 9d3973de9a3745ea9d38bdfb953a4c4bee81ac2a Author: Matthew Wilcox Date: Fri Mar 24 18:01:20 2023 +0000 ext4: Convert __ext4_block_zero_page_range() to use a folio Use folio APIs throughout. Saves many calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Ritesh Harjani (IBM) Link: https://lore.kernel.org/r/20230324180129.1220691-21-willy@infradead.org Signed-off-by: Theodore Ts'o commit 86324a21627a40f949bf787b55c45b9856523f9d Author: Matthew Wilcox Date: Fri Mar 24 18:01:19 2023 +0000 ext4: Convert ext4_journalled_zero_new_buffers() to use a folio Remove a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230324180129.1220691-20-willy@infradead.org Signed-off-by: Theodore Ts'o commit feb22b77b855a6529675b4e998970ab461c0f446 Author: Matthew Wilcox Date: Fri Mar 24 18:01:18 2023 +0000 ext4: Use a folio in ext4_journalled_write_end() Convert the incoming page to a folio to remove a few calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230324180129.1220691-19-willy@infradead.org Signed-off-by: Theodore Ts'o commit 64fb31367598188a0a230b81c6f4397fa71fd033 Author: Matthew Wilcox Date: Fri Mar 24 18:01:17 2023 +0000 ext4: Convert ext4_write_end() to use a folio Convert the incoming struct page to a folio. Replaces two implicit calls to compound_head() with one explicit call. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230324180129.1220691-18-willy@infradead.org Signed-off-by: Theodore Ts'o commit 4d934a5e6caa6dcdd3fbee7b96fe512a455863b6 Author: Matthew Wilcox Date: Fri Mar 24 18:01:16 2023 +0000 ext4: Convert ext4_write_begin() to use a folio Remove a lot of calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230324180129.1220691-17-willy@infradead.org Signed-off-by: Theodore Ts'o commit 6b90d4130ac8ee9cf2a179a617cfced71a18d252 Author: Matthew Wilcox Date: Fri Mar 24 18:01:15 2023 +0000 ext4: Convert ext4_write_inline_data_end() to use a folio Convert the incoming page to a folio so that we call compound_head() only once instead of seven times. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230324180129.1220691-16-willy@infradead.org Signed-off-by: Theodore Ts'o commit 6b87fbe4155007c3ab8e950c72db657f6cd990c6 Author: Matthew Wilcox Date: Fri Mar 24 18:01:14 2023 +0000 ext4: Convert ext4_read_inline_page() to ext4_read_inline_folio() All callers now have a folio, so pass it and use it. The folio may be large, although I doubt we'll want to use a large folio for an inline file. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230324180129.1220691-15-willy@infradead.org Signed-off-by: Theodore Ts'o commit 9a9d01f081ea29a5a8afc4504b1bc48daffa5cc1 Author: Matthew Wilcox Date: Fri Mar 24 18:01:13 2023 +0000 ext4: Convert ext4_da_write_inline_data_begin() to use a folio Saves a number of calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230324180129.1220691-14-willy@infradead.org Signed-off-by: Theodore Ts'o commit 4ed9b598ac30913987ab46e0069620e6e8af82f0 Author: Matthew Wilcox Date: Fri Mar 24 18:01:12 2023 +0000 ext4: Convert ext4_da_convert_inline_data_to_extent() to use a folio Saves a number of calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230324180129.1220691-13-willy@infradead.org Signed-off-by: Theodore Ts'o commit f8f8c89f59f7ab037bfca8797e2cc613a5684f21 Author: Matthew Wilcox Date: Fri Mar 24 18:01:11 2023 +0000 ext4: Convert ext4_try_to_write_inline_data() to use a folio Saves a number of calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230324180129.1220691-12-willy@infradead.org Signed-off-by: Theodore Ts'o commit 83eba701cf6e582afa92987e34abc0b0dbcb690e Author: Matthew Wilcox Date: Fri Mar 24 18:01:10 2023 +0000 ext4: Convert ext4_convert_inline_data_to_extent() to use a folio Saves a number of calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230324180129.1220691-11-willy@infradead.org Signed-off-by: Theodore Ts'o commit 3edde93e07954a8860d67be4a2165514a083b6e8 Author: Matthew Wilcox Date: Fri Mar 24 18:01:09 2023 +0000 ext4: Convert ext4_readpage_inline() to take a folio Use the folio API in this function, saves a few calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230324180129.1220691-10-willy@infradead.org Signed-off-by: Theodore Ts'o commit e8d6062c50acbf1aba88ca6adaa1bcda058abeab Author: Matthew Wilcox Date: Fri Mar 24 18:01:08 2023 +0000 ext4: Convert ext4_bio_write_page() to ext4_bio_write_folio() The only caller now has a folio so pass it in directly and avoid the call to page_folio() at the beginning. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230324180129.1220691-9-willy@infradead.org Signed-off-by: Theodore Ts'o commit 33483b3b6ee4328f37c3dcf702ba979e6a00bf8f Author: Matthew Wilcox Date: Fri Mar 24 18:01:07 2023 +0000 ext4: Convert mpage_page_done() to mpage_folio_done() All callers now have a folio so we can pass one in and use the folio APIs to support large folios as well as save instructions by eliminating a call to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230324180129.1220691-8-willy@infradead.org Signed-off-by: Theodore Ts'o commit 81a0d3e126a0bb4300d1db259d89b839124f2cff Author: Matthew Wilcox Date: Fri Mar 24 18:01:06 2023 +0000 ext4: Convert mpage_submit_page() to mpage_submit_folio() All callers now have a folio so we can pass one in and use the folio APIs to support large folios as well as save instructions by eliminating calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230324180129.1220691-7-willy@infradead.org Signed-off-by: Theodore Ts'o commit 4da2f6e3c45999e904de1edcd06c8533715cc1b5 Author: Matthew Wilcox Date: Fri Mar 24 18:01:05 2023 +0000 ext4: Turn mpage_process_page() into mpage_process_folio() The page/folio is only used to extract the buffers, so this is a simple change. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230324180129.1220691-6-willy@infradead.org Signed-off-by: Theodore Ts'o commit bb64c08bff6a6edbd85786c92a2cb980ed99b29f Author: Matthew Wilcox Date: Fri Mar 24 18:01:04 2023 +0000 ext4: Convert ext4_finish_bio() to use folios Prepare ext4 to support large folios in the page writeback path. Also set the actual error in the mapping, not just -EIO. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230324180129.1220691-5-willy@infradead.org Signed-off-by: Theodore Ts'o commit cd57b77197a434709aec0e7fb8b2e6ec8479aa4e Author: Matthew Wilcox Date: Fri Mar 24 18:01:03 2023 +0000 ext4: Convert ext4_bio_write_page() to use a folio Remove several calls to compound_head() and the last caller of set_page_writeback_keepwrite(), so remove the wrapper too. Also export bio_add_folio() as this is the first caller from a module. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230324180129.1220691-4-willy@infradead.org Signed-off-by: Theodore Ts'o commit c76e14dc13bcf89f3b55fd9dcd036a453a822d79 Author: Matthew Wilcox Date: Fri Mar 24 18:01:02 2023 +0000 fscrypt: Add some folio helper functions fscrypt_is_bounce_folio() is the equivalent of fscrypt_is_bounce_page() and fscrypt_pagecache_folio() is the equivalent of fscrypt_pagecache_page(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Ritesh Harjani (IBM) Link: https://lore.kernel.org/r/20230324180129.1220691-3-willy@infradead.org Signed-off-by: Theodore Ts'o commit e999a5c5a19cf3b679f3d93c49ad5f5c04e4806c Author: Matthew Wilcox Date: Fri Mar 24 18:01:01 2023 +0000 fs: Add FGP_WRITEBEGIN This particular combination of flags is used by most filesystems in their ->write_begin method, although it does find use in a few other places. Before folios, it warranted its own function (grab_cache_page_write_begin()), but I think that just having specialised flags is enough. It certainly helps the few places that have been converted from grab_cache_page_write_begin() to __filemap_get_folio(). Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20230324180129.1220691-2-willy@infradead.org Signed-off-by: Theodore Ts'o commit 400d2132288edbd6d500f45eab5d85526ca94e46 Author: Sean Christopherson Date: Tue Mar 21 18:14:40 2023 -0700 KVM: SVM: Return the local "r" variable from svm_set_msr() Rename "r" to "ret" and actually return it from svm_set_msr() to reduce the probability of repeating the mistake of commit 723d5fb0ffe4 ("kvm: svm: Add IA32_FLUSH_CMD guest support"), which set "r" thinking that it would be propagated to the caller. Alternatively, the declaration of "r" could be moved into the handling of MSR_TSC_AUX, but that risks variable shadowing in the future. A wrapper for kvm_set_user_return_msr() would allow eliding a local variable, but that feels like delaying the inevitable. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20230322011440.2195485-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit da3db168fb671f15e393b227f5c312c698ecb6ea Author: Sean Christopherson Date: Tue Mar 21 18:14:39 2023 -0700 KVM: x86: Virtualize FLUSH_L1D and passthrough MSR_IA32_FLUSH_CMD Virtualize FLUSH_L1D so that the guest can use the performant L1D flush if one of the many mitigations might require a flush in the guest, e.g. Linux provides an option to flush the L1D when switching mms. Passthrough MSR_IA32_FLUSH_CMD for write when it's supported in hardware and exposed to the guest, i.e. always let the guest write it directly if FLUSH_L1D is fully supported. Forward writes to hardware in host context on the off chance that KVM ends up emulating a WRMSR, or in the really unlikely scenario where userspace wants to force a flush. Restrict these forwarded WRMSRs to the known command out of an abundance of caution. Passing through the MSR means the guest can throw any and all values at hardware, but doing so in host context is arguably a bit more dangerous. Link: https://lkml.kernel.org/r/CALMp9eTt3xzAEoQ038bJQ9LN0ZOXrSWsN7xnNUD%2B0SS%3DWwF7Pg%40mail.gmail.com Link: https://lore.kernel.org/all/20230201132905.549148-2-eesposit@redhat.com Signed-off-by: Sean Christopherson Message-Id: <20230322011440.2195485-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 903358c7eddb9a8a83013f967909805e6af050d4 Author: Sean Christopherson Date: Tue Mar 21 18:14:38 2023 -0700 KVM: x86: Move MSR_IA32_PRED_CMD WRMSR emulation to common code Dedup the handling of MSR_IA32_PRED_CMD across VMX and SVM by moving the logic to kvm_set_msr_common(). Now that the MSR interception toggling is handled as part of setting guest CPUID, the VMX and SVM paths are identical. Opportunistically massage the code to make it a wee bit denser. Signed-off-by: Sean Christopherson Reviewed-by: Xiaoyao Li Message-Id: <20230322011440.2195485-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit bff903e8cd743cddb42ef1690edd33130f12c40a Author: Sean Christopherson Date: Tue Mar 21 18:14:37 2023 -0700 KVM: SVM: Passthrough MSR_IA32_PRED_CMD based purely on host+guest CPUID Passthrough MSR_IA32_PRED_CMD based purely on whether or not the MSR is supported and enabled, i.e. don't wait until the first write. There's no benefit to deferred passthrough, and the extra logic only adds complexity. Signed-off-by: Sean Christopherson Message-Id: <20230322011440.2195485-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 9a4c4850137e929d49958fb62d4275bd2f5b8c7a Author: Sean Christopherson Date: Tue Mar 21 18:14:36 2023 -0700 KVM: VMX: Passthrough MSR_IA32_PRED_CMD based purely on host+guest CPUID Passthrough MSR_IA32_PRED_CMD based purely on whether or not the MSR is supported and enabled, i.e. don't wait until the first write. There's no benefit to deferred passthrough, and the extra logic only adds complexity. Signed-off-by: Sean Christopherson Reviewed-by: Xiaoyao Li Message-Id: <20230322011440.2195485-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 52887af5650e35ea78b37602722313ff7b3c0c30 Author: Sean Christopherson Date: Tue Mar 21 18:14:35 2023 -0700 KVM: x86: Revert MSR_IA32_FLUSH_CMD.FLUSH_L1D enabling Revert the recently added virtualizing of MSR_IA32_FLUSH_CMD, as both the VMX and SVM are fatally buggy to guests that use MSR_IA32_FLUSH_CMD or MSR_IA32_PRED_CMD, and because the entire foundation of the logic is flawed. The most immediate problem is an inverted check on @cmd that results in rejecting legal values. SVM doubles down on bugs and drops the error, i.e. silently breaks all guest mitigations based on the command MSRs. The next issue is that neither VMX nor SVM was updated to mark MSR_IA32_FLUSH_CMD as being a possible passthrough MSR, which isn't hugely problematic, but does break MSR filtering and triggers a WARN on VMX designed to catch this exact bug. The foundational issues stem from the MSR_IA32_FLUSH_CMD code reusing logic from MSR_IA32_PRED_CMD, which in turn was likely copied from KVM's support for MSR_IA32_SPEC_CTRL. The copy+paste from MSR_IA32_SPEC_CTRL was misguided as MSR_IA32_PRED_CMD (and MSR_IA32_FLUSH_CMD) is a write-only MSR, i.e. doesn't need the same "deferred passthrough" shenanigans as MSR_IA32_SPEC_CTRL. Revert all MSR_IA32_FLUSH_CMD enabling in one fell swoop so that there is no point where KVM advertises, but does not support, L1D_FLUSH. This reverts commits 45cf86f26148e549c5ba4a8ab32a390e4bde216e, 723d5fb0ffe4c02bd4edf47ea02c02e454719f28, and a807b78ad04b2eaa348f52f5cc7702385b6de1ee. Reported-by: Nathan Chancellor Link: https://lkml.kernel.org/r/20230317190432.GA863767%40dev-arch.thelio-3990X Cc: Emanuele Giuseppe Esposito Cc: Pawan Gupta Cc: Jim Mattson Signed-off-by: Sean Christopherson Tested-by: Mathias Krause Message-Id: <20230322011440.2195485-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6bfb8b589c17a6f417ee8b96954507a18ace955d Merge: 2470e93289af9 eef01b4e98087 7360fc8bdc492 6fda1c9420f27 db1072e1c38cd Author: Dmitry Baryshkov Date: Thu Apr 6 20:30:06 2023 +0300 Merge branches 'msm-next-lumag-dp', 'msm-next-lumag-dsi', 'msm-next-lumag-mdp5' and 'msm-next-lumag-mdp4' into msm-next-lumag Core: - Bugfixes for error handling during probe - rework UBWC decoder programming - prepare_commit cleanup - bindings for SM8550 (MDSS, DPU), SM8450 (DP) - uapi C++ compatibility fix - timeout calculation fixup - msm_fbdev conversion to drm_client DP: - interrupts cleanup DPU: - DSPP sub-block flush on sc7280 - support AR30 in addition to XR30 format - Allow using REC_0 and REC_1 to handle wide (4k) RGB planes DSI: - rework DSI instance ID detection on obscure platforms and misc small fixes as usual. Signed-off-by: Dmitry Baryshkov commit 2470e93289af9df0efc9695a126b87aeeabb0c1c Merge: 6ec593812f9c0 c6c6556857e22 Author: Dmitry Baryshkov Date: Thu Apr 6 20:29:50 2023 +0300 Merge branch 'msm-next-lumag-dpu' into msm-next-lumag Merge DPU changes, resolving conflicts between branches. Full changelog will be present in the final merge commit. DPU: - DSPP sub-block flush on sc7280 - support AR30 in addition to XR30 format - Allow using REC_0 and REC_1 to handle wide (4k) RGB planes Signed-off-by: Dmitry Baryshkov commit db1072e1c38cd874e6ab007359d4e1c0c4e05ce2 Author: Jessica Zhang Date: Tue Feb 21 10:42:56 2023 -0800 drm/msm/mdp4: Remove empty prepare_commit() function Remove empty prepare_commit() function from MDP4 driver. Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/523608/ Link: https://lore.kernel.org/r/20230221184256.1436-5-quic_jesszhan@quicinc.com Signed-off-by: Dmitry Baryshkov commit 7360fc8bdc492441e21da4c983b34f8f0376e537 Author: Konrad Dybcio Date: Sat Mar 18 14:42:54 2023 +0100 dt-bindings: display/msm: dsi-controller-main: Add SM6115 Add a compatible for the DSI on SM6115. Acked-by: Rob Herring Reviewed-by: Marijn Suijten Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/527664/ Link: https://lore.kernel.org/r/20230307-topic-dsi_qcm-v6-8-70e13b1214fa@linaro.org Signed-off-by: Dmitry Baryshkov commit 6fda1c9420f27824f0a37d4d451349204a7bc8e5 Author: Tom Rix Date: Tue Apr 4 14:53:29 2023 -0400 drm/msm/mdp5: set varaiable msm8x76_config storage-class-specifier to static smatch reports drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c:658:26: warning: symbol 'msm8x76_config' was not declared. Should it be static? This variable is only used in one file so should be static. Signed-off-by: Tom Rix Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530950/ Link: https://lore.kernel.org/r/20230404185329.1925964-1-trix@redhat.com Signed-off-by: Dmitry Baryshkov commit 50da84c091a65c67394477ad942e11e80a7779b1 Author: Konrad Dybcio Date: Sat Mar 18 14:42:53 2023 +0100 drm/msm/dsi: Remove custom DSI config handling Now that the only user is handled by common code, remove the option to specify custom handlers through match data. This is effectively a revert of commit: 5ae15e76271 ("drm/msm/dsi: Allow to specify dsi config as pdata") Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/527662/ Link: https://lore.kernel.org/r/20230307-topic-dsi_qcm-v6-7-70e13b1214fa@linaro.org Signed-off-by: Dmitry Baryshkov commit da9887adffd6543addd7670389b82051dc99a9db Author: Konrad Dybcio Date: Sat Mar 18 14:42:52 2023 +0100 drm/msm/dsi: Switch the QCM2290-specific compatible to index autodetection Now that the logic can handle multiple sets of registers, move the QCM2290 to the common logic and mark it deprecated. This allows us to remove a couple of structs, saving some memory. Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/527656/ Link: https://lore.kernel.org/r/20230307-topic-dsi_qcm-v6-6-70e13b1214fa@linaro.org Signed-off-by: Dmitry Baryshkov commit eef01b4e98087b402c731f076cd93b26009b5168 Author: Colin Ian King Date: Tue Mar 14 08:20:50 2023 +0000 drm/msm/dp: Fix spelling mistake "Capabiity" -> "Capability" There is a spelling mistake in a drm_dbg_dp message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/526658/ Link: https://lore.kernel.org/r/20230314082050.26331-1-colin.i.king@gmail.com Signed-off-by: Dmitry Baryshkov commit 61dbf8d2e7c2495a5c23d1ebff6b831cdaedddcf Author: Konrad Dybcio Date: Sat Mar 18 14:42:51 2023 +0100 drm/msm/dsi: dsi_cfg: Merge SC7180 config into SDM845 The configs are identical, other than the number of *maximum* DSI hosts allowed. This isn't an issue, unless somebody deliberately tries to access the inexistent host by adding a dt node for it. Remove the SC7180 struct and point the hw revision match to the SDM845's one. On a note, this could have been done back when 7180 support was introduced. Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/527654/ Link: https://lore.kernel.org/r/20230307-topic-dsi_qcm-v6-5-70e13b1214fa@linaro.org Signed-off-by: Dmitry Baryshkov commit 8707ba050b6579bf5cf91a70ebabf3211cf78c42 Author: Neil Armstrong Date: Fri Mar 17 16:06:32 2023 +0100 dt-bindings: display: msm: dp-controller: document SM8450 compatible The SM8450 & SM350 shares the same DT TX IP version, use the SM8350 compatible as fallback for SM8450. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Patchwork: https://patchwork.freedesktop.org/patch/527564/ Link: https://lore.kernel.org/r/20230206-topic-sm8450-upstream-dp-controller-v6-1-d78313cbc41d@linaro.org Signed-off-by: Dmitry Baryshkov commit 5da326f4232d8d2caf9e66cb4201ec1ac4635329 Author: Konrad Dybcio Date: Sat Mar 18 14:42:50 2023 +0100 drm/msm/dsi: dsi_cfg: Deduplicate identical structs Some structs were defined multiple times for no apparent reason. Deduplicate them. Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/527653/ Link: https://lore.kernel.org/r/20230307-topic-dsi_qcm-v6-4-70e13b1214fa@linaro.org Signed-off-by: Dmitry Baryshkov commit bfc12020e63d017ea8f85cda9c39cbd1314ecd77 Author: Douglas Anderson Date: Thu Jan 26 17:09:13 2023 -0800 drm/msm/dp: Return IRQ_NONE for unhandled interrupts If our interrupt handler gets called and we don't really handle the interrupt then we should return IRQ_NONE. The current interrupt handler didn't do this, so let's fix it. NOTE: for some of the cases it's clear that we should return IRQ_NONE and some cases it's clear that we should return IRQ_HANDLED. However, there are a few that fall somewhere in between. Specifically, the documentation for when to return IRQ_NONE vs. IRQ_HANDLED is probably best spelled out in the commit message of commit d9e4ad5badf4 ("Document that IRQ_NONE should be returned when IRQ not actually handled"). That commit makes it clear that we should return IRQ_HANDLED if we've done something to make the interrupt stop happening. The case where it's unclear is, for instance, in dp_aux_isr() after we've read the interrupt using dp_catalog_aux_get_irq() and confirmed that "isr" is non-zero. The function dp_catalog_aux_get_irq() not only reads the interrupts but it also "ack"s all the interrupts that are returned. For an "unknown" interrupt this has a very good chance of actually stopping the interrupt from happening. That would mean we've identified that it's our device and done something to stop them from happening and should return IRQ_HANDLED. Specifically, it should be noted that most interrupts that need "ack"ing are ones that are one-time events and doing an "ack" is enough to clear them. However, since these interrupts are unknown then, by definition, it's unknown if "ack"ing them is truly enough to clear them. It's possible that we also need to remove the original source of the interrupt. In this case, IRQ_NONE would be a better choice. Given that returning an occasional IRQ_NONE isn't the absolute end of the world, however, let's choose that course of action. The IRQ framework will forgive a few IRQ_NONE returns now and again (and it won't even log them, which is why we have to log them ourselves). This means that if we _do_ end hitting an interrupt where "ack"ing isn't enough the kernel will eventually detect the problem and shut our device down. Signed-off-by: Douglas Anderson Tested-by: Kuogee Hsieh Reviewed-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/520660/ Link: https://lore.kernel.org/r/20230126170745.v2.2.I2d7aec2fadb9c237cd0090a47d6a8ba2054bf0f8@changeid [DB: reformatted commit message to make checkpatch happy] Signed-off-by: Dmitry Baryshkov commit ff83e76b0fcbe033b949cc047debad7fa1a33890 Author: Konrad Dybcio Date: Sat Mar 18 14:42:49 2023 +0100 drm/msm/dsi: Fix DSI index detection when version clash occurs Currently, we allow for MAX_DSI entries in io_start to facilitate for MAX_DSI number of DSI hosts at different addresses. The configuration is matched against the DSI CTRL hardware revision read back from the component. We need a way to resolve situations where multiple SoCs with different register maps may use the same version of DSI CTRL. In preparation to do so, make msm_dsi_config a 2d array where each entry represents a set of configurations adequate for a given SoC. This is totally fine to do, as the only differentiating factors between same-version-different-SoCs configurations are the number of DSI hosts (1 or 2, at least as of today) and the set of base registers. The regulator setup is the same, because the DSI hardware is the same, regardless of the SoC it was implemented in. In addition to that, update the matching logic such that it will loop over VARIANTS_MAX variants, making sure they are all taken into account. Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/527652/ Link: https://lore.kernel.org/r/20230307-topic-dsi_qcm-v6-3-70e13b1214fa@linaro.org Signed-off-by: Dmitry Baryshkov commit b20566cdef05cd40d95f10869d2a7646f48b1bbe Author: Douglas Anderson Date: Thu Jan 26 17:09:12 2023 -0800 drm/msm/dp: Clean up handling of DP AUX interrupts The DP AUX interrupt handling was a bit of a mess. * There were two functions (one for "native" transfers and one for "i2c" transfers) that were quite similar. It was hard to say how many of the differences between the two functions were on purpose and how many of them were just an accident of how they were coded. * Each function sometimes used "else if" to test for error bits and sometimes didn't and again it was hard to say if this was on purpose or just an accident. * The two functions wouldn't notice whether "unknown" bits were set. For instance, there seems to be a bit "DP_INTR_PLL_UNLOCKED" and if it was set there would be no indication. * The two functions wouldn't notice if more than one error was set. Let's fix this by being more consistent / explicit about what we're doing. By design this could cause different handling for AUX transfers, though I'm not actually aware of any bug fixed as a result of this patch (this patch was created because we simply noticed how odd the old code was by code inspection). Specific notes here: 1. In the old native transfer case if we got "done + wrong address" we'd ignore the "wrong address" (because of the "else if"). Now we won't. 2. In the old native transfer case if we got "done + timeout" we'd ignore the "timeout" (because of the "else if"). Now we won't. 3. In the old native transfer case we'd see "nack_defer" and translate it to the error number for "nack". This differed from the i2c transfer case where "nack_defer" was given the error number for "nack_defer". This 100% can't matter because the only user of this error number treats "nack defer" the same as "nack", so it's clear that the difference between the "native" and "i2c" was pointless here. 4. In the old i2c transfer case if we got "done" plus any error besides "nack" or "defer" then we'd ignore the error. Now we don't. 5. If there is more than one error signaled by the hardware it's possible that we'll report a different one than we used to. I don't know if this matters. If someone is aware of a case this matters we should document it and change the code to make it explicit. 6. One quirk we keep (I don't know if this is important) is that in the i2c transfer case if we see "done + defer" we report that as a "nack". That seemed too intentional in the old code to just drop. After this change we will add extra logging, including: * A warning if we see more than one error bit set. * A warning if we see an unexpected interrupt. * A warning if we get an AUX transfer interrupt when shouldn't. It actually turns out that as a result of this change then at boot we sometimes see an error: [drm:dp_aux_isr] *ERROR* Unexpected DP AUX IRQ 0x01000000 when not busy That means that, during init, we are seeing DP_INTR_PLL_UNLOCKED. For now I'm going to say that leaving this error reported in the logs is OK-ish and hopefully it will encourage someone to track down what's going on at init time. One last note here is that this change renames one of the interrupt bits. The bit named "i2c done" clearly was used for native transfers being done too, so I renamed it to indicate this. Signed-off-by: Douglas Anderson Tested-by: Kuogee Hsieh Reviewed-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/520658/ Link: https://lore.kernel.org/r/20230126170745.v2.1.I90ffed3ddd21e818ae534f820cb4d6d8638859ab@changeid Signed-off-by: Dmitry Baryshkov commit 3c606134342ec0f1a394f7ade73ea1329e392d24 Author: Konrad Dybcio Date: Sat Mar 18 14:42:48 2023 +0100 drm/msm/dsi: Get rid of msm_dsi_config::num_dsi In preparation for supporting multiple sets of possible base registers, remove the num_dsi variable. We're comparing the io_start array contents with the reg value from the DTS, so it will either match one of the expected values or don't match against a zero (which we get from partial array initialization). Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/527658/ Link: https://lore.kernel.org/r/20230307-topic-dsi_qcm-v6-2-70e13b1214fa@linaro.org Signed-off-by: Dmitry Baryshkov commit 36b0d6c177020b82e3d2587085f1140107b5b75c Author: Konrad Dybcio Date: Sat Mar 18 14:42:47 2023 +0100 dt-bindings: display/msm: dsi-controller-main: Fix deprecated QCM2290 compatible The point of the previous cleanup was to disallow "qcom,mdss-dsi-ctrl" alone. This however didn't quite work out and the property became undocumented instead of deprecated. Fix that. Additionally, the "qcom," prefix was missed previously. Fix it. Fixes: 0c0f65c6dd44 ("dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC") Acked-by: Rob Herring Reviewed-by: Marijn Suijten Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/527651/ Link: https://lore.kernel.org/r/20230307-topic-dsi_qcm-v6-1-70e13b1214fa@linaro.org Signed-off-by: Dmitry Baryshkov commit c6c6556857e229c8c117c3b7aaee33b6f5d03c57 Author: Vinod Polimera Date: Fri Mar 31 19:28:33 2023 +0530 msm/disp/dpu: allow atomic_check in PSR usecase Certain flags like dirty_fb will be updated into the plane state during crtc atomic_check. Allow those updates during PSR commit. Reported-by: Bjorn Andersson Link: https://lore.kernel.org/all/20230326162723.3lo6pnsfdwzsvbhj@ripper/ Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov Tested-by: Douglas Anderson Patchwork: https://patchwork.freedesktop.org/patch/530208/ Link: https://lore.kernel.org/r/1680271114-1534-3-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit 501bd8dea55d641422d2a06b94f7276f21f7be21 Author: Vinod Polimera Date: Fri Mar 31 19:28:32 2023 +0530 drm/msm/dpu: set dirty_fb flag while in self refresh mode While in virtual terminal mode with PSR enabled, there will be no atomic commits triggered without dirty_fb being set. This will create a notion of no screen update. Allow atomic commit when dirty_fb ioctl is issued, so that it can trigger a PSR exit and shows update on the screen. Reported-by: Bjorn Andersson Link: https://lore.kernel.org/all/20230326162723.3lo6pnsfdwzsvbhj@ripper/ Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov Tested-by: Douglas Anderson Patchwork: https://patchwork.freedesktop.org/patch/530206/ Link: https://lore.kernel.org/r/1680271114-1534-2-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit 82836692d5d7424660f8fb5f52432cfe2d9e633c Author: Kalyan Thota Date: Mon Feb 13 03:11:44 2023 -0800 drm/msm/dpu: manage DPU resources if CTM is requested Allow modeset to be triggered during CTM enable/disable. In the modeset callbacks, DPU resources required for the CTM feature are managed appropriately. Signed-off-by: Kalyan Thota Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/522448/ Link: https://lore.kernel.org/r/1676286704-818-5-git-send-email-quic_kalyant@quicinc.com Signed-off-by: Dmitry Baryshkov commit f4eddf1d78744d9e4d1664236ad6c9b76be9a877 Author: Kalyan Thota Date: Mon Feb 13 03:11:43 2023 -0800 drm/msm/dpu: avoid unnecessary check in DPU reservations Return immediately on failure, this will make dpu reservations part look cleaner. Signed-off-by: Kalyan Thota Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/522442/ Link: https://lore.kernel.org/r/1676286704-818-4-git-send-email-quic_kalyant@quicinc.com [DB: fixed merge conflict with b6975693846b, retain those changes] Signed-off-by: Dmitry Baryshkov commit 8aa22aaa1fc316b93a39209299227d5f78434828 Author: Kalyan Thota Date: Mon Feb 13 03:11:42 2023 -0800 drm/msm/dpu: add DSPPs into reservation upon a CTM request Add DSPP blocks into the topology for reservation, if there is a CTM request for that composition. Signed-off-by: Kalyan Thota Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/522445/ Link: https://lore.kernel.org/r/1676286704-818-3-git-send-email-quic_kalyant@quicinc.com Signed-off-by: Dmitry Baryshkov commit 4760be481dc075cd13f95f4650f5d5b53b4b336d Author: Geert Uytterhoeven Date: Mon Mar 6 10:06:33 2023 +0100 drm/msm/dpu: Fix bit-shifting UB in DPU_HW_VER() macro With gcc-5 and CONFIG_UBSAN_SHIFT=y: drivers/gpu/drm/msm/msm_mdss.c: In function 'msm_mdss_enable': drivers/gpu/drm/msm/msm_mdss.c:296:2: error: case label does not reduce to an integer constant case DPU_HW_VER_800: ^ drivers/gpu/drm/msm/msm_mdss.c:299:2: error: case label does not reduce to an integer constant case DPU_HW_VER_810: ^ drivers/gpu/drm/msm/msm_mdss.c:300:2: error: case label does not reduce to an integer constant case DPU_HW_VER_900: ^ This happens because for major revisions 8 or greather, the non-sign bit of the major revision number is shifted into bit 31 of a signed integer, which is undefined behavior. Fix this by casting the major revision number to unsigned int. Fixes: efcd0107727c4f04 ("drm/msm/dpu: add support for SM8550") Fixes: 4a352c2fc15aec1e ("drm/msm/dpu: Introduce SC8280XP") Fixes: 100d7ef6995d1f86 ("drm/msm/dpu: add support for SM8450") Signed-off-by: Geert Uytterhoeven Reviewed-by: Randy Dunlap Reviewed-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/525152/ Link: https://lore.kernel.org/r/20230306090633.65918-1-geert+renesas@glider.be Signed-off-by: Dmitry Baryshkov commit 27cfd5d7340e2ca49cb541fee3bdcc581c5359db Author: Abhinav Kumar Date: Thu Mar 16 19:16:53 2023 +0300 drm/msm/dpu: remove unused dpu_plane_validate_multirect_v2 function After cleaning up the older multirect support the function dpu_plane_validate_multirect_v2() is unused. Lets remove it. Signed-off-by: Abhinav Kumar [DB: also drop struct dpu_multirect_plane_states and R0/R1/R_MAX] Signed-off-by: Dmitry Baryshkov Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527348/ Link: https://lore.kernel.org/r/20230316161653.4106395-33-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit b7bb8967aa1249d682b1b99fae2891f3dfea53e6 Author: Abhinav Kumar Date: Thu Mar 16 19:16:52 2023 +0300 drm/msm/dpu: log the multirect_index in _dpu_crtc_blend_setup_pipe Lets print the multirect_index as well in _dpu_crtc_blend_setup_pipe() as it will give the complete information of the sw_pipe as well. Signed-off-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527350/ Link: https://lore.kernel.org/r/20230316161653.4106395-32-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit dcb3f7c9042d1c1aa637b58d47bd45c00b2ac153 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:51 2023 +0300 drm/msm/dpu: drop smart_dma_rev from dpu_caps The code doesn't use dpu_caps::smart_dma_rev field. It checks if the corresponding feature is enabled in the SSPP features. Drop the smart_dma_rev field completely. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527369/ Link: https://lore.kernel.org/r/20230316161653.4106395-31-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 8b409996ebdce009777dfb17e542c06f749b02d5 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:49 2023 +0300 drm/msm/dpu: populate SmartDMA features in hw catalog Downstream driver uses dpu->caps->smart_dma_rev to update sspp->cap->features with the bit corresponding to the supported SmartDMA version. Upstream driver does not do this, resulting in SSPP subdriver not enabling setup_multirect callback. Add corresponding SmartDMA SSPP feature bits to dpu hw catalog. Per Abhinav's request enable the SmartDMA features only on the platforms where the multirect was actually verified visually (sdm845 and sm8250). An (untested) enablement on the rest of the platforms comes in the next patch. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527362/ Link: https://lore.kernel.org/r/20230316161653.4106395-29-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 80e8ae3b38ab99a0648e07966595ba06c6302d2e Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:48 2023 +0300 drm/msm/dpu: add support for wide planes It is possible to use multirect feature and split source to use the SSPP to output two consecutive rectangles. This commit brings in this capability to support wider screen resolutions. Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/527358/ Link: https://lore.kernel.org/r/20230316161653.4106395-28-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit dc0b5a61d2d5b682a84ed76fdb16a7c8b7e08533 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:47 2023 +0300 drm/msm/dpu: split pipe handling from _dpu_crtc_blend_setup_mixer Rework _dpu_crtc_blend_setup_mixer() to split away pipe handling to a separate functon. This is a preparation for the r_pipe support. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527354/ Link: https://lore.kernel.org/r/20230316161653.4106395-27-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 6270e5240227bc014c452720220776c30ff3765b Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:46 2023 +0300 drm/msm/dpu: rework static color fill code Rework static color fill code to separate the pipe / pipe_cfg handling. This is a preparation for the r_pipe support. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527340/ Link: https://lore.kernel.org/r/20230316161653.4106395-26-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit ea2d3612fdf9d51dc3747362633d438b5c216894 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:45 2023 +0300 drm/msm/dpu: rework plane CSC setting Rework the code flushing CSC settings for the plane. Separate out the pipe and pipe_cfg as a preparation for r_pipe support. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527347/ Link: https://lore.kernel.org/r/20230316161653.4106395-25-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 6d7e1ca701df8b3e77c5e79c5b5672eda0b27da1 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:44 2023 +0300 drm/msm/dpu: rework dpu_plane_atomic_check() Split pipe-dependent code from dpu_plane_atomic_check() into the separate function dpu_plane_atomic_check_pipe(). This is one of preparational steps to add r_pipe support. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527336/ Link: https://lore.kernel.org/r/20230316161653.4106395-24-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 27653c574ad47f2fa9cedd0df44fabe23ce4a47f Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:43 2023 +0300 drm/msm/dpu: rework dpu_plane_sspp_atomic_update() Split pipe-dependent code from dpu_plane_sspp_atomic_update() into the separate function dpu_plane_sspp_update_pipe(). This is one of preparational steps to add r_pipe support. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527337/ Link: https://lore.kernel.org/r/20230316161653.4106395-23-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 55d3f857dde6af2e60385938899f48badd023efe Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:42 2023 +0300 drm/msm/dpu: simplify dpu_plane_validate_src() The plane's clipped coordinates has already been validated against FB size in the drm_atomic_plane_check(). There is no need to check them again. Remove corresponding checks and inline dpu_plane_validate_src(). Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527364/ Link: https://lore.kernel.org/r/20230316161653.4106395-22-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 6e0ce9ec184a1b412d2eb920dbc946c49a998652 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:41 2023 +0300 drm/msm/dpu: add dpu_hw_sspp_cfg to dpu_plane_state Now as all accesses to pipe_cfg and pstate have been cleaned, add struct dpu_hw_sspp_cfg to struct dpu_plane_state, so that dpu_plane_atomic_check() and dpu_plane_atomic_update() do not have a chance to disagree about src/dst rectangles (currently dpu_plane_atomic_check() uses unclipped rectangles, while dpu_plane_atomic_update() uses clipped rectangles calculated by drm_atomic_helper_check_plane_state()). Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527352/ Link: https://lore.kernel.org/r/20230316161653.4106395-21-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 7c68ed04c389691b2f82e7853530096601a55b0c Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:40 2023 +0300 drm/msm/dpu: make _dpu_plane_calc_clk accept mode directly Rework bandwidth/clock calculation functions to use mode directly rather than fetching it through the plane data. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527344/ Link: https://lore.kernel.org/r/20230316161653.4106395-20-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 7b5c207a4f1db1fdb09cb53e5f561c6c7121fa7e Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:39 2023 +0300 drm/msm/dpu: rewrite plane's QoS-related functions to take dpu_sw_pipe and dpu_format Rewrite dpu_plane's QoS related functions to take struct dpu_sw_pipe and struct dpu_format as arguments rather than fetching them from the pstate or drm_framebuffer. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527339/ Link: https://lore.kernel.org/r/20230316161653.4106395-19-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit f2bf133f7fcccc5d0a570deddca39f8a7ed35e27 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:38 2023 +0300 drm/msm/dpu: drop redundant plane dst check from dpu_crtc_atomic_check() The helper drm_atomic_helper_check_plane_state() already checks whether the scaled and clipped plane falls into the CRTC visible region (and clears plane_state->visible if it doesn't). Drop the redundant check from dpu_crtc_atomic_check(). Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527343/ Link: https://lore.kernel.org/r/20230316161653.4106395-18-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit bbc2c7bd7f19d6ebbf0c0710cd3b1efc667e340c Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:37 2023 +0300 drm/msm/dpu: move the rest of plane checks to dpu_plane_atomic_check() Move plane state updates from dpu_crtc_atomic_check() to the function where they belong: to dpu_plane_atomic_check(). Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527335/ Link: https://lore.kernel.org/r/20230316161653.4106395-17-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit a1d38f1152c570b882cdf4f96b75113d7c703ab1 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:36 2023 +0300 drm/msm/dpu: don't use unsupported blend stages The dpu_crtc_atomic_check() compares blending stage with DPU_STAGE_MAX (maximum amount of blending stages supported by the driver), however we should compare it against .max_mixer_blendstages, the maximum blend stage supported by the mixer. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527338/ Link: https://lore.kernel.org/r/20230316161653.4106395-16-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit e35f68d18bad460a9af33213d97c90a8d91b49eb Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:35 2023 +0300 drm/msm/dpu: drop src_split and multirect check from dpu_crtc_atomic_check Neither source split nor multirect are properly supported at this moment. Both of these checks depend on normalized_zpos being equal for several planes (which is never the case for normalized zpos). Drop these checks to simplify dpu_crtc_atomic_check(). The actual support for either of these features is not removed from the backend code (sspp, ctl, etc). Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527332/ Link: https://lore.kernel.org/r/20230316161653.4106395-15-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 0d06fb9068fd61d3b8eaf54370abbb3a6a54fab2 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:34 2023 +0300 drm/msm/dpu: rename dpu_hw_sspp_cfg to dpu_sw_pipe_cfg As struct dpu_hw_sspp_cfg describes only the source and destination rectangles, it is a software pipe configuration now. Rename it accordingly. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527334/ Link: https://lore.kernel.org/r/20230316161653.4106395-14-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit dfdc94e4934bc6051545c9283c5c94153ac359d8 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:33 2023 +0300 drm/msm/dpu: remove dpu_hw_fmt_layout from struct dpu_hw_sspp_cfg Remove dpu_hw_fmt_layout instance from struct dpu_hw_sspp_cfg, leaving only src_rect and dst_rect. This way all the pipes used by the plane will have a common layout instance (as the framebuffer is shared between them), while still keeping a separate src/dst rectangle configuration for each pipe. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527329/ Link: https://lore.kernel.org/r/20230316161653.4106395-13-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 62791e695e0370ed4e3200bbf05182443dab09f6 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:32 2023 +0300 drm/msm/dpu: move stride programming to dpu_hw_sspp_setup_sourceaddress Move stride programming to dpu_hw_sspp_setup_sourceaddress(), so that dpu_hw_sspp_setup_rects() programs only source and destination rectangles. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527330/ Link: https://lore.kernel.org/r/20230316161653.4106395-12-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 0cb17768bc6bc9599c48da34626225a6340dbe62 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:31 2023 +0300 drm/msm/dpu: clean up SRC addresses when setting up SSPP for solid fill Set SSPP_SRCn_ADDR registers to 0 while setting up solid fill, as we can not be sure that the previous address is still valid. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527324/ Link: https://lore.kernel.org/r/20230316161653.4106395-11-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 6edb12d119e2551a52586e3ff45f4176aeac89d7 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:30 2023 +0300 drm/msm/dpu: pass dpu_format to _dpu_hw_sspp_setup_scaler3() There is no need to pass full dpu_hw_sspp_cfg instance to _dpu_hw_sspp_setup_scaler3, pass just struct dpu_format pointer. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527328/ Link: https://lore.kernel.org/r/20230316161653.4106395-10-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 74fd7fda0f1ff6157ac2ff922e71b86ffab8ce23 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:29 2023 +0300 drm/msm/dpu: use dpu_sw_pipe for dpu_hw_sspp callbacks Where feasible, use dpu_sw_pipe rather than a combo of dpu_hw_sspp and multirect_index/_mode arguments. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527333/ Link: https://lore.kernel.org/r/20230316161653.4106395-9-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 3cfcd1307af8f96420dd998c1c3fc07ce1e6d03a Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:28 2023 +0300 drm/msm/dpu: introduce struct dpu_sw_pipe Wrap SSPP and multirect index/mode into a single structure that represents software view on the pipe used. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527326/ Link: https://lore.kernel.org/r/20230316161653.4106395-8-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 19e98654e7a48ea65bae9fd9bcac453fdb4fda0a Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:27 2023 +0300 drm/msm/dpu: drop dpu_plane_pipe function There no more need for the dpu_plane_pipe() function, crtc code can access pstate->pipe_hw.idx directly. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527320/ Link: https://lore.kernel.org/r/20230316161653.4106395-7-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 7f38ec140d9c1f257eb55d45d224a7203998d3cc Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:26 2023 +0300 drm/msm/dpu: move pipe_hw to dpu_plane_state In preparation to adding fully virtualized planes, move struct dpu_hw_sspp instance from struct dpu_plane to struct dpu_plane_state, as it will become a part of state (variable, changes during runtime) rather than part of a plane (ideally should be statically allocated during boot). The sspp pointer is set at the dpu_plane_reset(), since this is the function which allocates the state. Once we have fully virtual plane<->SSPP relationship, the SSPP will be allocated dynamically in the dpu_plane_atomic_check() function. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527322/ Link: https://lore.kernel.org/r/20230316161653.4106395-6-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 5d1b072aa89c73ada5bbe95299c2058990875c99 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:25 2023 +0300 drm/msm/dpu: drop EAGAIN check from dpu_format_populate_layout The pipe's layout is not cached, corresponding data structure is zeroed out each time in the dpu_plane_sspp_atomic_update(), right before the call to _dpu_plane_set_scanout() -> dpu_format_populate_layout(). Drop plane_addr comparison against previous layout and corresponding EAGAIN handling. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527314/ Link: https://lore.kernel.org/r/20230316161653.4106395-5-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit dab5ace44cdaa6aa2a5795d027b9268dd83a32c0 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:24 2023 +0300 drm/msm/dpu: move SSPP debugfs creation to dpu_kms.c As SSPP blocks are now visible through dpu_kms->rm.sspp_blocks, move SSPP debugfs creation from dpu_plane to dpu_kms. We are going to break the 1:1 correspondence between planes and SSPPs, so it makes no sense anymore to create SSPP debugfs entries in dpu_plane.c Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527317/ Link: https://lore.kernel.org/r/20230316161653.4106395-4-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 64caf60dd9f71f25508695ec58abce9ebb15987d Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:23 2023 +0300 drm/msm/dpu: move SSPP allocation to the RM Follow the example of all other hw blocks and initialize SSPP blocks in Resource Manager. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527313/ Link: https://lore.kernel.org/r/20230316161653.4106395-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit b187794e70d5b0ba953f6964744dd6a67f708e49 Author: Dmitry Baryshkov Date: Thu Mar 16 19:16:22 2023 +0300 drm/msm/dpu: rename struct dpu_hw_pipe(_cfg) to dpu_hw_sspp(_cfg) For all hardware blocks except SSPP the corresponding struct is named after the block. Rename dpu_hw_pipe (SSPP structure) to dpu_hw_sspp. Also rename struct dpu_hw_pipe_cfg to dpu_hw_sspp_cfg to follow this change. Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar # sc7280 Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/527312/ Link: https://lore.kernel.org/r/20230316161653.4106395-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit ffbbed63e6450225972deb75094b3ebe65d9b56b Author: Leonard Lausen Date: Tue Mar 21 02:58:04 2023 +0000 drm/msm/dpu: Add support for AR30 format Commit da7716a249b699978fb5 ("drm/msm/dpu: Add support for XR30 format") enabled support for the 10-bit XR30 color format but missed enabling support for the corresponding per-pixel alpha-blending AR30 color format. Declaring only XR30 but not AR30 color format support can trigger bugs in userspace. KDE KWin compositor versions prior to 5.27.3 for example prefer 10-bit color formats, rendering a 1cm^2 black box around the cursor due to missing per-pixel alpha-blending. Signed-off-by: Leonard Lausen Reviewed-by: Jessica Zhang Tested-by: Jessica Zhang # Trogdor (sc7180) Patchwork: https://patchwork.freedesktop.org/patch/527985/ Link: https://lore.kernel.org/r/6f33219dc848ccd7122bce6933338033aa18c33c@lausen.nl Signed-off-by: Dmitry Baryshkov commit 83a58b20c9b340000d508181f9d4ecec1437a771 Author: Kalyan Thota Date: Fri Jan 27 02:14:47 2023 -0800 drm/msm/disp/dpu1: add support for dspp sub block flush in sc7280 Flush mechanism for DSPP blocks has changed in sc7280 family, it allows individual sub blocks to be flushed in coordination with master flush control. Representation: master_flush && (PCC_flush | IGC_flush .. etc ) This change adds necessary support for the above design. Changes in v1: - Few nits (Doug, Dmitry) - Restrict sub-block flush programming to dpu_hw_ctl file (Dmitry) Changes in v2: - Move the address offset to flush macro (Dmitry) - Separate ops for the sub block flush (Dmitry) Changes in v3: - Reuse the DPU_DSPP_xx enum instead of a new one (Dmitry) Changes in v4: - Use shorter version for unsigned int (Stephen) Changes in v5: - Spurious patch please ignore. Changes in v6: - Add SOB tag (Doug, Dmitry) Changes in v7: - Cache flush mask per dspp (Dmitry) - Few nits (Marijn) Changes in v8: - Few nits (Marijn) Changes in v9: - Use DSPP enum while accessing flush mask to make it readable (Dmitry) - Few nits (Dmitry) Changes in v10: - Fix white spaces in a separate patch (Dmitry) Changes in v11: - Define a macro for dspp flush selection (Marijn) - Few nits (Marijn) Changes in v12: - Minor comments (reorder macros and a condition) (Marijn) Signed-off-by: Kalyan Thota Tested-by: Douglas Anderson Patchwork: https://patchwork.freedesktop.org/patch/520701/ Link: https://lore.kernel.org/r/1674814487-2112-1-git-send-email-quic_kalyant@quicinc.com Signed-off-by: Dmitry Baryshkov commit b6dde3a06f2e00d2c4c902a581ef72c101f50bcc Author: Neil Armstrong Date: Mon Jan 9 11:15:18 2023 +0100 dt-bindings: display/msm: document DPU on SM8550 Document the DPU hardware found on the Qualcomm SM8550 platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Patchwork: https://patchwork.freedesktop.org/patch/517511/ Link: https://lore.kernel.org/r/20230103-topic-sm8550-upstream-mdss-dsi-v3-2-660c3bcb127f@linaro.org [DB: removed interconnect header inclusion] Signed-off-by: Dmitry Baryshkov commit 51aeb3997feb81d316cb98fdcabafc41c8abf9f0 Author: Jessica Zhang Date: Tue Feb 21 10:42:55 2023 -0800 drm/msm/dpu: Remove empty prepare_commit() function Now that the TE setup has been moved to prepare_for_kickoff(), we have not prepare_commit() callbacks left. This makes dpu_encoder_prepare_commit() do nothing. Remove prepare_commit() from DPU driver. Changes in V3: - Reworded commit message to be more clear - Corrected spelling mistake in commit message Changes in V4: - Reworded commit message for clarity Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/523606/ Link: https://lore.kernel.org/r/20230221184256.1436-4-quic_jesszhan@quicinc.com [DB: fixed merge conflict] Signed-off-by: Dmitry Baryshkov commit 6ec593812f9c08de303675aa3d5cf07df33e4290 Author: Colin Ian King Date: Wed Mar 29 10:30:26 2023 +0100 drm/msm/mdss: Fix spelling mistake "Unuspported" -> "Unsupported" There is a spelling mistake in a dev_error message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/529400/ Link: https://lore.kernel.org/r/20230329093026.418847-1-colin.i.king@gmail.com Signed-off-by: Dmitry Baryshkov commit 677b64577f818eb7edac82a61df5eacfd38c4179 Author: Jessica Zhang Date: Tue Feb 21 10:42:53 2023 -0800 drm/msm/dpu: Move TE setup to prepare_for_kickoff() Currently, DPU will enable TE during prepare_commit(). However, this will cause a crash and reboot to sahara when trying to read/write to register in get_autorefresh_config(), because the core clock rates aren't set at that time. This used to work because phys_enc->hw_pp is only initialized in mode set [1], so the first prepare_commit() will return before any register read/write as hw_pp would be NULL. However, when we try to implement support for INTF TE, we will run into the clock issue described above as hw_intf will *not* be NULL on the first prepare_commit(). This is because the initialization of dpu_enc->hw_intf has been moved to dpu_encoder_setup() [2]. To avoid this issue, let's enable TE during prepare_for_kickoff() instead as the core clock rates are guaranteed to be set then. Depends on: "Implement tearcheck support on INTF block" [3] Changes in V3: - Added function prototypes - Reordered function definitions to make change more legible - Removed prepare_commit() function from dpu_encoder_phys_cmd Changes in V4: - Reworded commit message to be more specific - Removed dpu_encoder_phys_cmd_is_ongoing_pptx() prototype [1] https://gitlab.freedesktop.org/drm/msm/-/blob/msm-next/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c#L1109 [2] https://gitlab.freedesktop.org/drm/msm/-/blob/msm-next/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c#L2339 [3] https://patchwork.freedesktop.org/series/112332/ Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/523602/ Link: https://lore.kernel.org/r/20230221184256.1436-2-quic_jesszhan@quicinc.com Signed-off-by: Dmitry Baryshkov commit 940b869c2f2fb75696d7a3104b23caac9d5da841 Author: Thomas Zimmermann Date: Mon Apr 3 14:45:38 2023 +0200 drm/msm: Implement fbdev emulation as in-kernel client Move code from ad-hoc fbdev callbacks into DRM client functions and remove the old callbacks. The functions instruct the client to poll for changed output or restore the display. The DRM core calls both, the old callbacks and the new client helpers, from the same places. The new functions perform the same operation as before, so there's no change in functionality. Replace all code that initializes or releases fbdev emulation throughout the driver. Instead initialize the fbdev client by a single call to msm_fbdev_setup() after msm has registered its DRM device. As in most drivers, msm's fbdev emulation now acts like a regular DRM client. The fbdev client setup consists of the initial preparation and the hot-plugging of the display. The latter creates the fbdev device and sets up the fbdev framebuffer. The setup performs display hot-plugging once. If no display can be detected, DRM probe helpers re-run the detection on each hotplug event. A call to drm_dev_unregister() releases the client automatically. No further action is required within msm. If the fbdev framebuffer has been fully set up, struct fb_ops.fb_destroy implements the release. For partially initialized emulation, the fbdev client reverts the initial setup. v2: * handle fbdev module parameter correctly (kernel test robot) Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov # RB5 Patchwork: https://patchwork.freedesktop.org/patch/530560/ Link: https://lore.kernel.org/r/20230403124538.8497-9-tzimmermann@suse.de Signed-off-by: Dmitry Baryshkov commit 841ef552b1410f9a6aa5f399ce794c3b0d6b6559 Author: Thomas Zimmermann Date: Mon Apr 3 14:45:37 2023 +0200 drm/msm: Initialize fbdev DRM client Initialize the fbdev client in the fbdev code with empty helper functions. Also clean up the client. The helpers will later implement various functionality of the DRM client. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530557/ Link: https://lore.kernel.org/r/20230403124538.8497-8-tzimmermann@suse.de Signed-off-by: Dmitry Baryshkov commit 6479f5b4e5a84310748903e7dabd62c8a7d5e6e5 Author: Thomas Zimmermann Date: Mon Apr 3 14:45:36 2023 +0200 drm/msm: Move module parameter 'fbdev' to fbdev code Define the module's parameter 'fbdev' in fbdev code. No other code uses it. No functional changes, but simplifies the later conversion to struct drm_client. Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530555/ Link: https://lore.kernel.org/r/20230403124538.8497-7-tzimmermann@suse.de Signed-off-by: Dmitry Baryshkov commit e13446341f9750198592a337bf87e8f0519ecd87 Author: Thomas Zimmermann Date: Mon Apr 3 14:45:35 2023 +0200 drm/msm: Remove fbdev from struct msm_drm_private The DRM device stores a pointer to the fbdev helper. Remove struct msm_drm_private.fbdev, which contains the same value. No functional changes. v2: * test for fb_helper->fb in debugfs code Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530559/ Link: https://lore.kernel.org/r/20230403124538.8497-6-tzimmermann@suse.de Signed-off-by: Dmitry Baryshkov commit b0b3d253eb7fb7bce8fbbf2384b4085c260dc133 Author: Thomas Zimmermann Date: Mon Apr 3 14:45:34 2023 +0200 drm/msm: Remove struct msm_fbdev Remove struct msm_fbdev, which is an empty wrapper around struct drm_fb_helper. Use the latter directly. No functional changes. v2: * kfree fbdev helper instance on init errors (Dmitri) Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530554/ Link: https://lore.kernel.org/r/20230403124538.8497-5-tzimmermann@suse.de Signed-off-by: Dmitry Baryshkov commit 0c8d263957f1c9adde6ac99dbf56d24a6e787d14 Author: Thomas Zimmermann Date: Mon Apr 3 14:45:33 2023 +0200 drm/msm: Remove fb from struct msm_fbdev Fbdev's struct fb_helper stores a pointer to the framebuffer. Remove struct msm_fbdev.fb, which contains thre same value. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530552/ Link: https://lore.kernel.org/r/20230403124538.8497-4-tzimmermann@suse.de Signed-off-by: Dmitry Baryshkov commit 3aa4e828be97b9bacad5679201e22796f15e763b Author: Thomas Zimmermann Date: Mon Apr 3 14:45:32 2023 +0200 drm/msm: Clear aperture ownership outside of fbdev code Move aperture management out of the fbdev code. It is unrelated and needs to run even if fbdev support has been disabled. Call the helper at the top of msm_drm_init() to take over hardware from other drivers. v2: * bind all subdevices before acquiring device (Dmitri) Signed-off-by: Thomas Zimmermann Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530553/ Link: https://lore.kernel.org/r/20230403124538.8497-3-tzimmermann@suse.de Signed-off-by: Dmitry Baryshkov commit 25c83fd999e6eb787f08f4e3293e8bca45e7b14b Author: Thomas Zimmermann Date: Mon Apr 3 14:45:31 2023 +0200 drm/msm: Include Include to get the declaration of devm_ioremap() on sparc64. No functional changes. Signed-off-by: Thomas Zimmermann Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303301856.zSmpwZjj-lkp@intel.com/ Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530550/ Link: https://lore.kernel.org/r/20230403124538.8497-2-tzimmermann@suse.de Signed-off-by: Dmitry Baryshkov commit 4969bccd5f4e9d59e9aca7e873834be9519be013 Author: Rob Clark Date: Fri Mar 24 15:00:13 2023 -0700 drm/msm: Avoid rounding down to zero jiffies If userspace asked for a timeout greater than zero, but less than a jiffy, they clearly weren't planning on spinning. So it is better to round up to one. This fixes an issue with supertuxkart that was (for some reason) spinning on a gl sync with 1ms timeout. CPU time for a demo lap drops from: 15.83user 20.98system 0:47.46elapsed 77%CPU drops to: 8.84user 2.30system 0:46.67elapsed 23%CPU Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/528725/ Link: https://lore.kernel.org/r/20230324220013.191795-1-robdclark@gmail.com Signed-off-by: Dmitry Baryshkov commit f1af066bcfd38daa9eee7195ef772dadaaa18520 Author: Danylo Piliaiev Date: Sun Mar 26 09:38:13 2023 -0700 drm/msm: Rename drm_msm_gem_submit_reloc::or in C++ code Clashes with C++ `or` keyword Signed-off-by: Danylo Piliaiev Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/528751/ Link: https://lore.kernel.org/r/20230326163813.535762-1-robdclark@gmail.com Signed-off-by: Dmitry Baryshkov commit 45d96836978701f7e507ddc0f6cfc5e6d5c33d01 Author: Neil Armstrong Date: Fri Mar 24 10:28:46 2023 +0100 dt-bindings: display: msm: sm8450-mdss: Fix DSI compatible The DSI compatible changed between patchset revisions, but that wasn't reflected in the bindings. Fix it. Fixes: 0eda3c6cb1c5 ("dt-bindings: display/msm: add support for the display on SM8450") Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/528589/ Link: https://lore.kernel.org/r/20230323-topic-sm8450-upstream-dt-bindings-fixes-v2-1-0ca1bea1a843@linaro.org Signed-off-by: Dmitry Baryshkov commit b92e01b4eaaa545920ec1edc8f9016753dd8d0b9 Author: Maíra Canal Date: Fri Feb 24 18:41:33 2023 -0300 drm/msm: Use drm_sched_job_add_syncobj_dependency() As msm_parse_deps() performs the same steps as drm_sched_job_add_syncobj_dependency(), replace the open-coded implementation in msm in order to simply use the DRM function. Signed-off-by: Maíra Canal Patchwork: https://patchwork.freedesktop.org/patch/524090/ Link: https://lore.kernel.org/r/20230224214133.411966-2-mcanal@igalia.com Signed-off-by: Dmitry Baryshkov commit 648cb68309e36ebf88ae938d7e52aea0c75ff93f Author: Johan Hovold Date: Mon Mar 6 11:07:22 2023 +0100 drm/msm: move include directive Move the include of of_address.h to the top of the file where it belongs. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/525105/ Link: https://lore.kernel.org/r/20230306100722.28485-11-johan+linaro@kernel.org Signed-off-by: Dmitry Baryshkov commit a75b49db6529b2af049eafd938fae888451c3685 Author: Johan Hovold Date: Mon Mar 6 11:07:20 2023 +0100 drm/msm: fix workqueue leak on bind errors Make sure to destroy the workqueue also in case of early errors during bind (e.g. a subcomponent failing to bind). Since commit c3b790ea07a1 ("drm: Manage drm_mode_config_init with drmm_") the mode config will be freed when the drm device is released also when using the legacy interface, but add an explicit cleanup for consistency and to facilitate backporting. Fixes: 060530f1ea67 ("drm/msm: use componentised device support") Cc: stable@vger.kernel.org # 3.15 Cc: Rob Clark Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/525093/ Link: https://lore.kernel.org/r/20230306100722.28485-9-johan+linaro@kernel.org Signed-off-by: Dmitry Baryshkov commit ca090c837b430752038b24e56dd182010d77f6f6 Author: Johan Hovold Date: Mon Mar 6 11:07:19 2023 +0100 drm/msm: fix missing wq allocation error handling Add the missing sanity check to handle workqueue allocation failures. Fixes: c8afe684c95c ("drm/msm: basic KMS driver for snapdragon") Cc: stable@vger.kernel.org # 3.12 Cc: Rob Clark Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/525102/ Link: https://lore.kernel.org/r/20230306100722.28485-8-johan+linaro@kernel.org Signed-off-by: Dmitry Baryshkov commit 60d476af96015891c7959f30838ae7a9749932bf Author: Johan Hovold Date: Mon Mar 6 11:07:18 2023 +0100 drm/msm: fix vram leak on bind errors Make sure to release the VRAM buffer also in a case a subcomponent fails to bind. Fixes: d863f0c7b536 ("drm/msm: Call msm_init_vram before binding the gpu") Cc: stable@vger.kernel.org # 5.11 Cc: Craig Tatlor Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/525094/ Link: https://lore.kernel.org/r/20230306100722.28485-7-johan+linaro@kernel.org Signed-off-by: Dmitry Baryshkov commit 214b09db61978497df24efcb3959616814bca46b Author: Johan Hovold Date: Mon Mar 6 11:07:17 2023 +0100 drm/msm: fix drm device leak on bind errors Make sure to free the DRM device also in case of early errors during bind(). Fixes: 2027e5b3413d ("drm/msm: Initialize MDSS irq domain at probe time") Cc: stable@vger.kernel.org # 5.17 Cc: Dmitry Baryshkov Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/525097/ Link: https://lore.kernel.org/r/20230306100722.28485-6-johan+linaro@kernel.org Signed-off-by: Dmitry Baryshkov commit cd459c005de3e2b855a8cc7768e633ce9d018e9f Author: Johan Hovold Date: Mon Mar 6 11:07:16 2023 +0100 drm/msm: fix NULL-deref on irq uninstall In case of early initialisation errors and on platforms that do not use the DPU controller, the deinitilisation code can be called with the kms pointer set to NULL. Fixes: f026e431cf86 ("drm/msm: Convert to Linux IRQ interfaces") Cc: stable@vger.kernel.org # 5.14 Cc: Thomas Zimmermann Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/525104/ Link: https://lore.kernel.org/r/20230306100722.28485-5-johan+linaro@kernel.org Signed-off-by: Dmitry Baryshkov commit a465353b9250802f87b97123e33a17f51277f0b1 Author: Johan Hovold Date: Mon Mar 6 11:07:15 2023 +0100 drm/msm: fix NULL-deref on snapshot tear down In case of early initialisation errors and on platforms that do not use the DPU controller, the deinitilisation code can be called with the kms pointer set to NULL. Fixes: 98659487b845 ("drm/msm: add support to take dpu snapshot") Cc: stable@vger.kernel.org # 5.14 Cc: Abhinav Kumar Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/525099/ Link: https://lore.kernel.org/r/20230306100722.28485-4-johan+linaro@kernel.org Signed-off-by: Dmitry Baryshkov commit 652eadfde81031c7b3d8b21bdbcfdd6eb217dec8 Author: Johan Hovold Date: Mon Mar 6 11:07:14 2023 +0100 Revert "drm/msm: Fix failure paths in msm_drm_init()" This reverts commit 8636500300a01740d92b345c680b036b94555b1b. A recent commit tried to address a drm device leak in the early msm_drm_uninit() error paths but ended up making things worse. Specifically, it moved the drm device reference put in msm_drm_uninit() to msm_drm_init() which means that the drm would now be leaked on normal unbind. For reasons that were never spelled out, it also added kms NULL pointer checks to a couple of helper functions that had nothing to do with the paths modified by the patch. Instead of trying to salvage this incrementally, let's revert the bad commit so that clean and backportable fixes can be added in its place. Fixes: 8636500300a0 ("drm/msm: Fix failure paths in msm_drm_init()") Cc: Akhil P Oommen Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/525092/ Link: https://lore.kernel.org/r/20230306100722.28485-3-johan+linaro@kernel.org Signed-off-by: Dmitry Baryshkov commit dfa70344d1b5f5ff08525a8c872c8dd5e82fc5d9 Author: Johan Hovold Date: Mon Mar 6 11:07:13 2023 +0100 Revert "drm/msm: Add missing check and destroy for alloc_ordered_workqueue" This reverts commit 643b7d0869cc7f1f7a5ac7ca6bd25d88f54e31d0. A recent patch that tried to fix up the msm_drm_init() paths with respect to the workqueue but only ended up making things worse: First, the newly added calls to msm_drm_uninit() on early errors would trigger NULL-pointer dereferences, for example, as the kms pointer would not have been initialised. (Note that these paths were also modified by a second broken error handling patch which in effect cancelled out this part when merged.) Second, the newly added allocation sanity check would still leak the previously allocated drm device. Instead of trying to salvage what was badly broken (and clearly not tested), let's revert the bad commit so that clean and backportable fixes can be added in its place. Fixes: 643b7d0869cc ("drm/msm: Add missing check and destroy for alloc_ordered_workqueue") Cc: Jiasheng Jiang Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/525107/ Link: https://lore.kernel.org/r/20230306100722.28485-2-johan+linaro@kernel.org Signed-off-by: Dmitry Baryshkov commit 9cffae4a130c9c46ed0cf80ca75f3ef84b62adfd Author: Dmitry Baryshkov Date: Wed Jan 18 03:04:28 2023 +0200 drm/msm/mdss: add the sdm845 data for completeness Add the platform data for sdm845 platform. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/518783/ Link: https://lore.kernel.org/r/20230118010428.1671443-4-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit aeff6bb5b1ef64f4751b491cb4777404594a1ed7 Author: Dmitry Baryshkov Date: Wed Jan 18 03:04:27 2023 +0200 drm/msm/mdss: add data for sc8180xp Add platform data for sc8180xp based on sdmshrike-sde.dtsi. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/518782/ Link: https://lore.kernel.org/r/20230118010428.1671443-3-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit d68db6069a8e58644d103d5235f13085294aca70 Author: Dmitry Baryshkov Date: Wed Jan 18 03:04:26 2023 +0200 drm/msm/mdss: convert UBWC setup to use match data To simplify adding new platforms and to make settings more obvious, rewrite the UBWC setup to use the data structure to pass platform config rather than just calling the functions direcly. Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/518781/ Link: https://lore.kernel.org/r/20230118010428.1671443-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 9cf4fc47dd0b375519b3707fcf32799ede84fde5 Author: Neil Armstrong Date: Mon Jan 9 11:15:19 2023 +0100 dt-bindings: display/msm: document MDSS on SM8550 Document the MDSS hardware found on the Qualcomm SM8550 platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Patchwork: https://patchwork.freedesktop.org/patch/517513/ Link: https://lore.kernel.org/r/20230103-topic-sm8550-upstream-mdss-dsi-v3-3-660c3bcb127f@linaro.org [DB: Fixed the schema to follow changes since the patch was posted] Signed-off-by: Dmitry Baryshkov commit 078f6ec8657db604a1620da6698fb236e9b96bec Author: Jessica Zhang Date: Tue Feb 21 10:42:54 2023 -0800 drm/msm: Check for NULL before calling prepare_commit() Add a NULL check before calling prepare_commit() in msm_atomic_commit_tail() Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/523604/ Link: https://lore.kernel.org/r/20230221184256.1436-3-quic_jesszhan@quicinc.com Signed-off-by: Dmitry Baryshkov commit ef736f30548951870e2a5bfc41b6b0bb1d455641 Author: Peter Ujfalusi Date: Thu Apr 6 10:52:19 2023 -0500 ASoC: SOF: Intel: hda-dai: Print the format_val as hexadecimal number The format_val is a set of bitfileds, printing it as a decimal just makes interpreting it complicated. In other HDA core code the format_val is printed as hexadecimal also. Signed-off-by: Peter Ujfalusi Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Jaska Uimonen Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20230406155219.18997-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f747eb86e4a82d0823328f642a667bffce703028 Author: Yong Zhi Date: Thu Apr 6 10:44:54 2023 -0500 ASoC: SOF: Intel: MTL: conditionally wake WPIO1PG domain Wake IO1 from power gating if there is SoundWire enabled link discovered by ACPI scan. Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Link: https://lore.kernel.org/r/20230406154454.18163-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a7fe7e24b2cddbe995b5b49e274d3a69dde7c7d9 Author: Curtis Malainey Date: Thu Apr 6 10:37:02 2023 -0500 ASoC: Intel: Add rpl_mx98360_rt5682 driver Boards were using this in older kernels before adl and rpl ids were split. Add this back to maintain support. Signed-off-by: Curtis Malainey Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20230406153703.17194-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 280ecc191281892bf33ed6bfdea46b4c27ce582c Author: Alex Elder Date: Mon Mar 27 14:56:05 2023 -0500 ARM: dts: qcom: sdx65: move status properties to end of nodes Move a few device tree "status" properties so that they are the last specified property, in "qcom-sdx65-mtp.dts" and "qcom-sdx65.dtsi". Note that properties must always be specified before sub-nodes. Reviewed-by: Konrad Dybcio Suggested-by: Konrad Dybcio Signed-off-by: Alex Elder Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327195605.2854123-3-elder@linaro.org commit 14079448cccc2fb8e2709d5ea194bd5e6a11ded9 Author: Alex Elder Date: Mon Mar 27 14:56:04 2023 -0500 ARM: dts: qcom: sdx65: add IPA information Add IPA-related nodes and definitions to "sdx65.dtsi". The SMP2P nodes (ipa_smp2p_out and ipa_smp2p_in) are already present. Enable IPA in "sdx65-mtp.dts"; this GSI firmware is loaded by Trust Zone on this platform. Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Tested-by: Rohit Agarwal Signed-off-by: Alex Elder Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327195605.2854123-2-elder@linaro.org commit d769ccaf957fe7391f357c0a923de71f594b8a2b Author: Kal Conley Date: Thu Apr 6 01:59:18 2023 +0200 xsk: Fix unaligned descriptor validation Make sure unaligned descriptors that straddle the end of the UMEM are considered invalid. Currently, descriptor validation is broken for zero-copy mode which only checks descriptors at page granularity. For example, descriptors in zero-copy mode that overrun the end of the UMEM but not a page boundary are (incorrectly) considered valid. The UMEM boundary check needs to happen before the page boundary and contiguity checks in xp_desc_crosses_non_contig_pg(). Do this check in xp_unaligned_validate_desc() instead like xp_check_unaligned() already does. Fixes: 2b43470add8c ("xsk: Introduce AF_XDP buffer allocation API") Signed-off-by: Kal Conley Acked-by: Magnus Karlsson Link: https://lore.kernel.org/r/20230405235920.7305-2-kal.conley@dectris.com Signed-off-by: Martin KaFai Lau commit 1f0d40d88f7aeaeb4316fe86ffa04a295954b918 Author: Jagan Teki Date: Mon Apr 3 23:30:57 2023 -0300 dt-bindings: bridge: Convert Samsung MIPI DSIM bridge to yaml Samsung MIPI DSIM bridge can be found on Exynos and NXP's i.MX8M Mini/Nano/Plus SoCs. Convert exynos_dsim.txt to yaml. Used the example node from exynos5433.dtsi instead of the one used in the legacy exynos_dsim.txt. Signed-off-by: Jagan Teki Signed-off-by: Fabio Estevam Reviewed-by: Marek Vasut Link: https://lore.kernel.org/r/20230404023057.510329-1-festevam@gmail.com Signed-off-by: Rob Herring commit 681f27f302ff85ddf3f6e7fd0231059f99c0f26e Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:27 2023 +0300 ASoC: SOF: Intel: hda-mlink: add helper to retrieve eml_lock For SoundWire usages, we need to use the global eml_lock to serialize/protect all accesses to shared registers. Due to the split implementation across two subsystems, we need to pass a pointer around. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-19-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 82958c406da4fec8f818826624c33cf2e62f4147 Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:26 2023 +0300 ASoC: SOF: Intel: hda-mlink: add helper to offload link ownership For DMIC and SSP, the DSP will be responsible for programming the blobs and link registers. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-18-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 2b864e969be29958eb810fb611d1eac50eb7104b Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:25 2023 +0300 ASoC: SOF: Intel: hda-mlink: add helpers to retrieve DMIC/SSP hlink Small helpers to make DAI ops simpler. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-17-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 87a6ddc0cf1c62dbc7c2cc4b5f764a2e992c5ba6 Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:24 2023 +0300 ASoC: SOF: Intel: hda-mlink: program SoundWire LSDIID registers Each SoundWire peripheral can be programmed from the manager side either with a regular command FIFO, or with the HDaudio CORB/RIRB DMA-based mechanism. The mapping between SoundWire peripheral and SDI address is handled with the LSDIID register. This mapping only works of course if each peripheral has a unique address across all links. This has already been enforced in previous Intel contributions allowing for an IDA-based solution for the device number allocation. The checks on the dev_num are handled at the SoundWire level, but the locking is handled at the hda-mlink level. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-16-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit d56d205857a2f6e10a1047532134321072f758b7 Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:23 2023 +0300 ASoC: SOF: Intel: hda-mlink: add helper to check cmdsync This helper is an optimization where sync_go is only called when the cmdsync field is actually set to a non-zero value. Since this is also only used by SoundWire for now, only expose the _unlocked version. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-15-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 1f5a6e8b5147b7bc49c0e091f8b458e45d8ee56c Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:22 2023 +0300 ASoC: SOF: Intel: hda-mlink: add helpers for sync_arm/sync_go The multi-link synchronization uses the same concept and registers, but moved to the HDAudio extended links. Add helpers for sync_arm and sync_go which are the basic for the bus reset, bank switch and clock stop. Since SoundWire is the only user of those helpers, only expose the _unlocked versions for now. Note that SYNCGO is a write-only bit, so no error can be reported. We still return 0 for compatibility with the SoundWire stream management headers. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-14-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 02ba1b021c28670011b361be3be4bda49f348c43 Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:21 2023 +0300 ASoC: SOF: Intel: hda-mlink: add helpers to set link SYNC frequency These helpers configure the ratio between the base clock and the hardware signal used for link synchronization. The SYNCPRD is written before the first sublink is powered-up. The SYNCPU bit is set, but it will only be cleared after the link is powered-up, hence the implementation with a set/wait pattern. These helpers are currently only needed by SoundWire support, where the lock is taken at a higher level, so only the _unlocked versions are exposed for now. Note that the _wait_bit() implementation is similar to previous helpers in drivers/soundwire, but with sleep duration and timeout aligned with hardware recommendations. If desired, this helper could be modified in a second step with e.g. readl_poll_timeout(). Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-13-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 2e4288319ad3e18a266461d3e63c86eb36f7a152 Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:20 2023 +0300 ASoC: SOF: Intel: hda-mlink: add helpers to enable/check interrupts When INTC is set, LCTL exposes INTEN and INTSTS fields. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-12-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 6857c7ee202cf4b8224882bcee8e3b97c26b6484 Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:19 2023 +0300 ASoC: SOF: Intel: hda-mlink: add helper to return sublink count This is needed for SoundWire integration. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-11-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 725218f1d8210ee6eba2c2e923ea26a312fb3f46 Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:18 2023 +0300 ASoC: SOF: Intel: hda-mlink: add convenience helpers for SoundWire PM The updated SoundWire Intel driver will need to rely on Extended HDaudio links for power management, but it doesn't need to be aware of all the HDaudio structures. Add convenience helpers to avoid polluting SoundWire drivers too much with HDaudio information. Since the SoundWire/Intel solution already takes the lock at a higher level, the _unlocked PM helpers are used. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-10-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit fc7dab8ec0b4a451dd5737aa4f06a0e8bd6efa32 Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:17 2023 +0300 ASoC: SOF: Intel: hda-mlink: introduce helpers for 'extended links' PM Add helpers to program SPA/CPA bits, using a mutex to access the shared LCTL register if required. All links are managed with the same LCTLx.SPA bits. However there are quite a few implementation details to be aware of: Legacy HDaudio multi-links are powered-up when exiting reset, which requires the ref_count to be manually set to one when initializing the link. Alternate links for SoundWire/DMIC/SSP need to be explicitly powered-up before accessing the SHIM/IP/Vendor-Specific SHIM space for each sublink. DMIC/SSP/SoundWire are all different cases with a different device/dai/hlink relationship. SoundWire will handle power management with the auxiliary device resume/suspend routine. The ref_count is not necessary in this case. The DMIC/SSP will by contrast handle the power management from DAI .startup and .shutdown callbacks. The SSP has a 1:1 mapping between sublink and DAI, but it's bidirectional so the ref_count will help avoid turning off the sublink when one of the two directions is still in use. The DMIC has a single link but two DAIs for data generated at different sampling frequencies, again the ref_count will make sure the two DAIs can be used concurrently. And last the SoundWire Intel require power-up/down and bank switch to be handled with a lock already taken, so the 'eml_lock' is made optional with the _unlocked versions of the helpers. Note that the _check_power_active() implementation is similar to previous helpers in sound/hda/ext, with sleep duration and timeout aligned with hardware recommendations. If desired, this helper could be modified in a second step with .e.g. readl_poll_timeout() Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-9-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 4c2d4e446d5673db2c653a6e53ca9be908582c4e Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:16 2023 +0300 ASoC: SOF: Intel: hda-mlink: special-case HDaudio regular links For backwards compatibility, HDaudio/iDISP links are powered-on when exiting reset, and the existing driver forces them to be powered-off when entering S0ix. In addition, the get/put helpers are invoked directly by the ASoC codec drivers, which a historical layering violation. Extended links are powered-on by software only, during the probe and DAI startup phases. This calls for a different handling of the 'regular' and 'extended' audio links. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 17c9b6ec35c0d6228db4f94590702a0cb03cd96a Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:15 2023 +0300 ASoC: SOF: Intel: hda-mlink: add structures to parse ALT links Extend hdac_ext_link to store information needed for ALT links. Follow-up patches will include more functional patches for power-up and down. Note that this patch suggests the use of an 'eml_lock' to serialize access to shared registers. SoundWire-specific sequence require the lock to be taken at a higher level, as a result the helpers added in follow-up patches will provide 'unlocked' versions when needed. Also note that the low-level sequences with the 'hdaml_' prefix are taken directly from the hardware specifications - naming conventions included. The code will be split in two, with locking and linked-list management handled separately to avoid mixing required hardware setup and Linux-based resource management. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 18227585d8374ce16d3a2792deb125794710de43 Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:14 2023 +0300 ASoC: SOF: Intel: hda-mlink: move to a dedicated module Some of the functions will be used for SoundWire enumeration and power management, to avoid cycles in module dependencies and simplify integration all the HDaudio multi-link needs to move to a dedicated module. Drop no longer needed headers at the same time. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 68376a3ef41f0a2d6c1c603e7293ba0e00b293da Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:13 2023 +0300 ASoC: SOF: Intel: hda-mlink: add return value for hda_bus_ml_get_capabilities() Add return value - this will need additional work in the caller. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 8a55786a1875bd0b9c22156e800557a931baacb8 Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:12 2023 +0300 ASoC: SOF: Intel: hda-mlink: improve hda_bus_ml_free() helper Use list_for_each_entry_safe() instead of open-coding. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 34e582b559c78746c544442b3925554e0665351b Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:11 2023 +0300 ALSA: hda: add HDaudio Extended link definitions Add new definitions for the HDaudio Extended link support, specifically new registers for SoundWire, Intel DMIC and INTEL SSP interfaces. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit c7a92574ec03692a057db541db12e41744a862fa Author: Pierre-Louis Bossart Date: Tue Apr 4 13:41:10 2023 +0300 Documentation: sound: add description of Intel HDaudio multi-links Add description of 'Skylake' multi-link structure added in 2015 and recent extensions to support SoundWire/DMIC/SSP interfaces. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20230404104127.5629-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit e41e1f4ae47499061bec3446c927bdfd2210a329 Author: Pierre-Louis Bossart Date: Thu Apr 6 10:29:37 2023 -0500 ASoC: SOF: Intel: hda: add __func__ in SoundWire lcount() error logs Make sure SoundWire lcount helpers have unique error logs, but a common pattern for reporting issues. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230406152937.15347-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 80a4623eb1910d099e3d3de1564a6dfe16750e60 Author: Tom Rix Date: Thu Apr 6 11:23:00 2023 -0400 ASoC: max98363: Make soc_codec_dev_max98363 static smatch reports sound/soc/codecs/max98363.c:392:39: warning: symbol 'soc_codec_dev_max98363' was not declared. Should it be static? This variable is only used in one file so should be static. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230406152300.1954292-1-trix@redhat.com Signed-off-by: Mark Brown commit 539adfedbd2d5cda2f9e2d83b35b364834b67d58 Author: Bastien Nocera Date: Wed Apr 5 11:27:54 2023 +0200 USB: core: Fix docs warning caused by wireless_status feature Fix wrongly named 'dev' parameter in doc block, should have been iface: drivers/usb/core/message.c:1939: warning: Function parameter or member 'iface' not described in 'usb_set_wireless_status' drivers/usb/core/message.c:1939: warning: Excess function parameter 'dev' description in 'usb_set_wireless_status' And fix missing struct member doc in kernel API, and reorder to match struct: include/linux/usb.h:270: warning: Function parameter or member 'wireless_status_work' not described in 'usb_interface' Reported-by: Stephen Rothwell Link: https://lore.kernel.org/linux-next/20230405114807.5a57bf46@canb.auug.org.au/T/#t Fixes: 0a4db185f078 ("USB: core: Add API to change the wireless_status") Signed-off-by: Bastien Nocera Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230405092754.36579-1-hadess@hadess.net [bentiss: fix checkpatch warning] Signed-off-by: Benjamin Tissoires commit 23b2fd83948952ffee2e96ce6a982be9d8e96f9f Author: Robin Murphy Date: Mon Apr 3 12:49:05 2023 +0100 perf/arm-cmn: Validate cycles events fully DTC cycle count events don't have anything to validate or initialise in themselves, but we should not forget to still validate their whole group context. Otherwise, we may fail to correctly reject a contrived group containing an impossible number of cycles events. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/3124e8c276a1f513c1a415dc839ca4181b3c8bc8.1680522545.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 8a0cfac697777bda216d73a2b3b8fe02fcaa7e38 Merge: 63a511284c9ea e2e5308863592 Author: Mark Brown Date: Thu Apr 6 16:02:24 2023 +0100 ASoC: qcom: fixes for Click/Pop Noise Merge series from Srinivas Kandagatla : Click/Pop Noise was a long pending issue with WSA Codecs which are prone to accumlate DC when ports are active but without any data streams. There are multiple places in the current setup, where this could happen in both startup as well as shutdown path. commit 79260355593f96a7580a1995f07a9662c0d5a9ae Author: Mark Brown Date: Wed Mar 8 15:20:42 2023 +0000 arm64/sysreg: Update ID_AA64PFR1_EL1 for DDI0601 2022-12 Version 2022-12 of DDI0601 has defined a number of new fields in previously RES0 space in ID_AA64PFR1_EL1, update our definition to include them. No functional changes. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230308-arm64-aa64pfr1-2022-12-v1-1-f03c1ea39611@kernel.org Signed-off-by: Will Deacon commit 102882b5c62f6bfe403178bb36adef3ba542d148 Author: Oswald Buddenhagen Date: Thu Apr 6 15:25:21 2023 +0200 ALSA: document that struct __snd_pcm_mmap_control64 is messed up I'm not the first one to run into this, see e.g. https://lore.kernel.org/all/29QBMJU8DE71E.2YZSH8IHT5HMH@mforney.org/ Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230406132521.2252019-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit cc077e7facbe23856702dca1d78aebcc19683680 Author: Mark Brown Date: Thu Mar 23 20:44:53 2023 +0000 arm64/sysreg: Convert HFG[RW]TR_EL2 to automatic generation Convert the fine grained traps read and write control registers to automatic generation as per DDI0601 2022-12. No functional changes. Reviewed-by: Joey Gouly Acked-by: Catalin Marinas Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230306-arm64-fgt-reg-gen-v3-1-decba93cbaab@kernel.org Signed-off-by: Will Deacon commit d0a4564bd024eaa81cab8c7255e7c44230bdd8a2 Author: Olivier Moysan Date: Tue Dec 13 11:27:07 2022 +0100 pwm: stm32: Enforce settings for PWM capture The PWM capture assumes that the input selector is set to default input and that the slave mode is disabled. Force reset state for TISEL and SMCR registers to match this requirement. Note that slave mode disabling is not a pre-requisite by itself for capture mode, as hardware supports it for PWM capture. However, the current implementation of the driver does not allow slave mode for PWM capture. Setting slave mode for PWM capture results in wrong capture values. Signed-off-by: Olivier Moysan Acked-by: Lee Jones Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit de614ac31955fe20f71021fd5f4a9a811e90028f Author: Sasha Finkelstein Date: Mon Apr 3 16:19:23 2023 +0200 MAINTAINERS: Add entries for Apple PWM driver Add the MAINTAINERS entries for the driver Signed-off-by: Sasha Finkelstein Acked-by: Sven Peter Signed-off-by: Thierry Reding commit bafbbef85fd788074c27892c2391faf249eb7b29 Author: Sasha Finkelstein Date: Mon Apr 3 16:19:20 2023 +0200 pwm: Add Apple PWM controller Adds the Apple PWM controller driver. Signed-off-by: Sasha Finkelstein Acked-by: Sven Peter Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 87a3a3929c710b863c3a288f6b094edc97662858 Author: Sasha Finkelstein Date: Mon Apr 3 16:19:19 2023 +0200 dt-bindings: pwm: Add Apple PWM controller Apple SoCs such as the M1 contain a PWM controller used among other things to control the keyboard backlight. Signed-off-by: Sasha Finkelstein Reviewed-by: Krzysztof Kozlowski Acked-by: Sven Peter Signed-off-by: Thierry Reding commit 4d877b1a6e855d1c8685fa0e27ad7a521b31b6ca Merge: 8904a1e20ba8e b358793c3bf23 Author: Daniel Vetter Date: Thu Apr 6 16:31:32 2023 +0200 Merge tag 'drm-intel-next-2023-04-06' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Fix DPT+shmem combo and add i915.enable_dpt modparam (Ville) - i915.enable_sagv module parameter (Ville) - Correction to QGV related register addresses (Vinod) - IPS debugfs per-crtc and new file for false_color (Ville) - More clean-up and reorganization of Display code (Jani) - DP DSC related fixes and improvements (Stanislav, Ankit, Suraj, Swati) - Make utility pin asserts more accurate (Ville) - Meteor Lake enabling (Daniele) - High refresh rate PSR fixes (Jouni) - Cursor and Plane chicken register fixes (Ville) - Align the ADL-P TypeC sequences with hardware specification (Imre) - Documentation build fixes and improvements to catch bugs earlier (Lee, Jani) - PL1 power limit hwmon entry changed to use 0 as disabled state (Ashutosh) - DP aux sync fix and improvements (Ville) - DP MST fixes and w/a (Stanislav) - Limit PXP drm-errors or warning on firmware API failures (Alan) Signed-off-by: Daniel Vetter From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ZC7RR3Laet8ywHRo@intel.com commit 013ecd4439784bc98fe83bfe3413924db97c3b38 Author: Mark Rutland Date: Mon Mar 6 11:48:36 2023 +0000 arm64/sysreg: allow *Enum blocks in SysregFields blocks We'd like to support Enum/SignedEnum/UnsignedEnum blocks within SysregFields blocks, so that we can define enumerations for sets of registers. This isn't currently supported by gen-sysreg.awk due to the way we track the active block, which can't handle more than a single layer of nesting, which imposes an awkward requirement that when ending a block we know what the parent block is when calling change_block() Make this nicer by using a stack of active blocks, with block_push() to start a block, and block_pop() to end a block. Doing so means that we only need to check the active block at the start of parsing a line: for the start of a block we can check the parent is valid, and for the end of a block we check that the active block is valid. This structure makes the block parsing simpler and makes it easy to permit a block to live under several potential parents (e.g. by permitting Enum to start when the active block is Sysreg or SysregFields). It also permits further nesting, if we need that in future. To aid debugging, the stack of active blocks is reported for fatal errors, and an error is raised if the file is terminated without ending the active block. For clarity I've renamed the top-level element from "None" to "Root". The Fields element it intended only for use within Sysreg blocks, and does not make sense within SysregFields blocks, and so remains forbidden within a SysregFields block. I've verified using sha1sum that this patch does not change the current generated contents of . Signed-off-by: Mark Rutland Cc: Anshuman Khandual Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Brown Cc: Will Deacon Reviewed-by: Anshuman Khandual Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20230306114836.2575432-1-mark.rutland@arm.com Signed-off-by: Will Deacon commit b16c310115f2084b8826a35b77ef42bab6786d9f Author: AngeloGioacchino Del Regno Date: Mon Apr 3 15:30:54 2023 +0200 pwm: mtk-disp: Configure double buffering before reading in .get_state() The DISP_PWM controller's default behavior is to always use register double buffering: all reads/writes are then performed on shadow registers instead of working registers and this becomes an issue in case our chosen configuration in Linux is different from the default (or from the one that was pre-applied by the bootloader). An example of broken behavior is when the controller is configured to use shadow registers, but this driver wants to configure it otherwise: what happens is that the .get_state() callback is called right after registering the pwmchip and checks whether the PWM is enabled by reading the DISP_PWM_EN register; At this point, if shadow registers are enabled but their content was not committed before booting Linux, we are *not* reading the current PWM enablement status, leading to the kernel knowing that the hardware is actually enabled when, in reality, it's not. The aforementioned issue emerged since this driver was fixed with commit 0b5ef3429d8f ("pwm: mtk-disp: Fix the parameters calculated by the enabled flag of disp_pwm") making it to read the enablement status from the right register. Configure the controller in the .get_state() callback to avoid this desync issue and get the backlight properly working again. Fixes: 3f2b16734914 ("pwm: mtk-disp: Implement atomic API .get_state()") Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Reviewed-by: Alexandre Mergnat Tested-by: Alexandre Mergnat Signed-off-by: Thierry Reding commit 36dd7f530ae7d9ce9e853ffb8aa337de65c6600b Author: AngeloGioacchino Del Regno Date: Mon Apr 3 15:30:53 2023 +0200 pwm: mtk-disp: Disable shadow registers before setting backlight values If shadow registers usage is not desired, disable that before performing any write to CON0/1 registers in the .apply() callback, otherwise we may lose clkdiv or period/width updates. Fixes: cd4b45ac449a ("pwm: Add MediaTek MT2701 display PWM driver support") Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Reviewed-by: Alexandre Mergnat Tested-by: Alexandre Mergnat Signed-off-by: Thierry Reding commit e2e530886359246ae782c779be248c59bc2ed111 Author: Srinivas Kandagatla Date: Thu Mar 23 16:44:01 2023 +0000 ASoC: qcom: sdw: do not restart soundwire ports for every prepare unpreparing/disabling and preparing/reenabling soundwire ports is not required for every prepare call, this add lots of click and pop noise if we do this in middle of playback or capture. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230323164403.6654-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit c52615e494f17f44b076ac8ae5a53cfc0041a0dd Author: Srinivas Kandagatla Date: Thu Mar 23 16:44:00 2023 +0000 ASoC: qcom: q6apm-lpass-dai: close graphs before opening a new one On multiple prepare calls, its possible that the playback graphs are not unloaded from the DSP, which can have some wierd side-effects, one of them is that the data not consumed without any errors. Fixes: c2ac3aec474d("ASoC: qcom: q6apm-lpass-dai: unprepare stream if its already prepared") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230323164403.6654-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit cba6cfdc7c3f1516f0d08ddfb24e689af0932573 Author: Douglas Anderson Date: Wed Mar 29 14:33:54 2023 -0700 regulator: core: Avoid lockdep reports when resolving supplies An automated bot told me that there was a potential lockdep problem with regulators. This was on the chromeos-5.15 kernel, but I see nothing that would be different downstream compared to upstream. The bot said: ============================================ WARNING: possible recursive locking detected 5.15.104-lockdep-17461-gc1e499ed6604 #1 Not tainted -------------------------------------------- kworker/u16:4/115 is trying to acquire lock: ffffff8083110170 (regulator_ww_class_mutex){+.+.}-{3:3}, at: create_regulator+0x398/0x7ec but task is already holding lock: ffffff808378e170 (regulator_ww_class_mutex){+.+.}-{3:3}, at: ww_mutex_trylock+0x3c/0x7b8 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(regulator_ww_class_mutex); lock(regulator_ww_class_mutex); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by kworker/u16:4/115: #0: ffffff808006a948 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x520/0x1348 #1: ffffffc00e0a7cc0 ((work_completion)(&entry->work)){+.+.}-{0:0}, at: process_one_work+0x55c/0x1348 #2: ffffff80828a2260 (&dev->mutex){....}-{3:3}, at: __device_attach_async_helper+0xd0/0x2a4 #3: ffffff808378e170 (regulator_ww_class_mutex){+.+.}-{3:3}, at: ww_mutex_trylock+0x3c/0x7b8 stack backtrace: CPU: 2 PID: 115 Comm: kworker/u16:4 Not tainted 5.15.104-lockdep-17461-gc1e499ed6604 #1 9292e52fa83c0e23762b2b3aa1bacf5787a4d5da Hardware name: Google Quackingstick (rev0+) (DT) Workqueue: events_unbound async_run_entry_fn Call trace: dump_backtrace+0x0/0x4ec show_stack+0x34/0x50 dump_stack_lvl+0xdc/0x11c dump_stack+0x1c/0x48 __lock_acquire+0x16d4/0x6c74 lock_acquire+0x208/0x750 __mutex_lock_common+0x11c/0x11f8 ww_mutex_lock+0xc0/0x440 create_regulator+0x398/0x7ec regulator_resolve_supply+0x654/0x7c4 regulator_register_resolve_supply+0x30/0x120 class_for_each_device+0x1b8/0x230 regulator_register+0x17a4/0x1f40 devm_regulator_register+0x60/0xd0 reg_fixed_voltage_probe+0x728/0xaec platform_probe+0x150/0x1c8 really_probe+0x274/0xa20 __driver_probe_device+0x1dc/0x3f4 driver_probe_device+0x78/0x1c0 __device_attach_driver+0x1ac/0x2c8 bus_for_each_drv+0x11c/0x190 __device_attach_async_helper+0x1e4/0x2a4 async_run_entry_fn+0xa0/0x3ac process_one_work+0x638/0x1348 worker_thread+0x4a8/0x9c4 kthread+0x2e4/0x3a0 ret_from_fork+0x10/0x20 The problem was first reported soon after we made many of the regulators probe asynchronously, though nothing I've seen implies that the problems couldn't have also happened even without that. I haven't personally been able to reproduce the lockdep issue, but the issue does look somewhat legitimate. Specifically, it looks like in regulator_resolve_supply() we are holding a "rdev" lock while calling set_supply() -> create_regulator() which grabs the lock of a _different_ "rdev" (the one for our supply). This is not necessarily safe from a lockdep perspective since there is no documented ordering between these two locks. In reality, we should always be locking a regulator before the supplying regulator, so I don't expect there to be any real deadlocks in practice. However, the regulator framework in general doesn't express this to lockdep. Let's fix the issue by simply grabbing the two locks involved in the same way we grab multiple locks elsewhere in the regulator framework: using the "wound/wait" mechanisms. Fixes: eaa7995c529b ("regulator: core: avoid regulator_resolve_supply() race condition") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230329143317.RFC.v2.2.I30d8e1ca10cfbe5403884cdd192253a2e063eb9e@changeid Signed-off-by: Mark Brown commit b83a1772be854f87602de14726737d3e5b06e1f4 Author: Douglas Anderson Date: Wed Mar 29 14:33:53 2023 -0700 regulator: core: Consistently set mutex_owner when using ww_mutex_lock_slow() When a codepath locks a rdev using ww_mutex_lock_slow() directly then that codepath is responsible for incrementing the "ref_cnt" and also setting the "mutex_owner" to "current". The regulator core consistently got that right for "ref_cnt" but didn't always get it right for "mutex_owner". Let's fix this. It's unlikely that this truly matters because the "mutex_owner" is only needed if we're going to do subsequent locking of the same rdev. However, even though it's not truly needed it seems less surprising if we consistently set "mutex_owner" properly. Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230329143317.RFC.v2.1.I4e9d433ea26360c06dd1381d091c82bb1a4ce843@changeid Signed-off-by: Mark Brown commit 63a511284c9ea72696a5dd0a2d2721bdef19f774 Author: Shuming Fan Date: Thu Apr 6 16:55:35 2023 +0800 ASoC: rt712-sdca: Add RT712 SDCA driver for Mic topology This is the initial codec driver for rt712 SDCA (Mic topology). The host should connect with rt712 SdW2 interface. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20230406085535.52002-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 3456aeb02a28e82235d45da434752e6f441427f0 Author: Kuninori Morimoto Date: Wed Apr 5 22:57:55 2023 +0000 ASoC: soc-dapm.c: tidyup dapm_connect_dai_pair() dapm_connect_dai_pair() handles "Normal/Codec2Codec" x "CPU/Codec" x "Playback/Capture". (A) is "Codec2Codec" case of "CPU" widget x "Playback/Capture", (B) is "Normal" case of "CPU" widget x "Playback/Capture", (C) is each case of "Codec" widget. (X) is handling "Playback" case DAI connecting, (Y) is handling "Capture" case DAI connecting. static void dapm_connect_dai_pair(...) { ... (A) if (dai_link->params) { playback_cpu = ... capture_cpu = ... (B) } else { playback_cpu = ... capture_cpu = ... } ^ /* connect BE DAI playback if widgets are valid */ | stream = SNDRV_PCM_STREAM_PLAYBACK; | (C) codec = codec_dai->playback_widget; | | if (playback_cpu && codec) { (X) if (dai_link->params && !rtd->c2c_widget[stream]) { | ... | } | | (z) dapm_connect_dai_routes(...); v } capture: ^ /* connect BE DAI capture if widgets are valid */ | stream = SNDRV_PCM_STREAM_CAPTURE; | (C) codec = codec_dai->capture_widget; | | if (codec && capture_cpu) { (Y) if (dai_link->params && !rtd->c2c_widget[stream]) { | ... | } | | (z) dapm_connect_dai_routes(...); v } } (X) part and (Y) part are almost same. Main purpose of these parts (and this function) is calling dapm_connect_dai_routes() (= z) on each cases. The difference is "parameter" (= Normal/Codec2Codec x CPU/Codec x Playback/Capture). This patch cleanup these, but nothing changed for meaning. Link: https://lore.kernel.org/r/87ilen6ni4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877cuqvswc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0ebd4fd6b9064764a3af3d671463b1350abffb6c Author: Yinjun Zhang Date: Wed Apr 5 14:08:29 2023 +0200 nfp: initialize netdev's dev_port with correct id `dev_port` is used to differentiate devices that instantiate from the same function, which is the case in most of NFP NICs. In some customized scenario, `dev_port` is used to rename netdev instead of `phys_port_name`. Example rules using `dev_port`: SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:e1:00.0", ATTR{dev_port}=="0", NAME:="ens8np0" SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:e1:00.0", ATTR{dev_port}=="1", NAME:="ens8np1" To take port split case into account, here we initialize `dev_port` according to the port sequence in eth_table from management firmware instead of using port label id directly. And management firmware makes sure that port sequence matches its label id. Signed-off-by: Yinjun Zhang Acked-by: Simon Horman Signed-off-by: Louis Peens Link: https://lore.kernel.org/r/20230405120829.28817-1-louis.peens@corigine.com Signed-off-by: Paolo Abeni commit fa359c1938adbd04cf7e68786ea58366dddc3ad7 Author: Krzysztof Kozlowski Date: Sun Mar 12 14:51:20 2023 +0100 pwm: stm32-lp: Drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes the following compile error: drivers/pwm/pwm-stm32-lp.c:245:34: error: ‘stm32_pwm_lp_of_match’ defined but not used [-Werror=unused-const-variable=] for builds with CONFIG_OF=n, CONFIG_PWM_STM32_LP=y and W=1. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding commit d6a436c76dd5789a22b091c0a32dee72684f17ce Author: Krzysztof Kozlowski Date: Sun Mar 12 14:51:19 2023 +0100 pwm: rcar: Drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes the following compiler warning: drivers/pwm/pwm-rcar.c:252:34: error: ‘rcar_pwm_of_table’ defined but not used [-Werror=unused-const-variable=] for builds with CONFIG_OF=n, CONFIG_PWM_RCAR=y and W=1. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding commit 43a1c4ff3977f0ccd1d99e36d74e525aced5bb3a Author: Heiner Kallweit Date: Mon Feb 20 22:19:30 2023 +0100 dt-bindings: pwm: Convert Amlogic Meson PWM binding Convert Amlogic Meson PWM binding to yaml. Reviewed-by: Rob Herring Signed-off-by: Heiner Kallweit Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit b3ad52353f9ffd652c9ffff376697e3a07cbd309 Author: Daniel Golle Date: Wed Feb 15 13:34:39 2023 +0000 dt-bindings: pwm: mediatek: Add mediatek,mt7986 compatible Since commit 241eab76657f ("pwm: mediatek: Add support for MT7986") support for the 2 PWM channels implemented in MediaTek MT7986 SoCs has been added. Also add the compatible string to dt-bindings now that they have been converted to YAML. Acked-by: Krzysztof Kozlowski Acked-by: Uwe Kleine-König Reviewed-by: Matthias Brugger Signed-off-by: Daniel Golle Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Thierry Reding commit 8904a1e20ba8ee82c1d24d6f8091ba464b878a54 Merge: 52b113e968be6 2429b3c529da2 Author: Daniel Vetter Date: Thu Apr 6 15:02:16 2023 +0200 Merge tag 'drm/tegra/for-6.4-rc1' of https://gitlab.freedesktop.org/drm/tegra into drm-next drm/tegra: Changes for v6.4-rc1 The majority of this is minor cleanups and fixes. Other than those, this contains Uwe's conversion to the new driver remove callback and Thomas' fbdev DRM client conversion. The driver can now also be built on other architectures to easy compile coverage. Finally, this adds Mikko as a second maintainer for the driver. As a next step we also want Tegra DRM to move into drm-misc to streamline the maintenance process. Signed-off-by: Daniel Vetter From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20230406121404.967704-1-thierry.reding@gmail.com commit 4ea2a8d84c75e20b4d9b5d9010879cdb89f2e384 Author: Christian Brauner Date: Tue Mar 28 18:13:07 2023 +0200 pnode: pass mountpoint directly Currently, we use a global variable to stash the destination mountpoint. All global variables are changed in propagate_one(). The mountpoint variable is one of the few which doesn't change after initialization. Instead, just pass the destination mountpoint directly making it easy to verify directly in propagate_mnt() that the destination mountpoint never changes. Reviewed-by: Seth Forshee (DigitalOcean) Message-Id: <20230202-fs-move-mount-replace-v2-2-f53cd31d6392@kernel.org> Signed-off-by: Christian Brauner commit 9e69bcd88e4593a32c472d878cf02115ef5dac43 Author: Thomas Zimmermann Date: Mon Apr 3 12:40:35 2023 +0200 drm/omapdrm: Implement fbdev emulation as in-kernel client Move code from ad-hoc fbdev callbacks into DRM client functions and remove the old callbacks. The functions instruct the client to poll for changed output or restore the display. The DRM core calls both, the old callbacks and the new client helpers, from the same places. The new functions perform the same operation as before, so there's no change in functionality. Replace all code that initializes or releases fbdev emulation throughout the driver. Instead initialize the fbdev client by a single call to omapdrm_fbdev_setup() after omapdrm has registered its DRM device. As in most drivers, omapdrm's fbdev emulation now acts like a regular DRM client. The fbdev client setup consists of the initial preparation and the hot-plugging of the display. The latter creates the fbdev device and sets up the fbdev framebuffer. The setup performs display hot-plugging once. If no display can be detected, DRM probe helpers re-run the detection on each hotplug event. A call to drm_dev_unregister() releases the client automatically. No further action is required within omapdrm. If the fbdev framebuffer has been fully set up, struct fb_ops.fb_destroy implements the release. For partially initialized emulation, the fbdev client reverts the initial setup. v2: * init drm_client in this patch (Tomi) * don't handle non-atomic modesetting (Tomi) Signed-off-by: Thomas Zimmermann Reviewed-by: Tomi Valkeinen Reviewed-by: Emil Velikov Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230403104035.15288-6-tzimmermann@suse.de commit 8e3aac3bba0f3ecc9fd7cc9f99b21d42418bba17 Author: Thomas Zimmermann Date: Mon Apr 3 12:40:34 2023 +0200 drm/omapdrm: Remove fbdev from struct omap_drm_private The DRM device stores a pointer to the fbdev helper. Remove struct omap_drm_private.fbdev, which contains the same value. No functional changes. v2: * don't clear dev->fb_helper unnecessarily (Tomi) * include omap_fbdev.h in omap_fbdev.c (kernel test robot) Signed-off-by: Thomas Zimmermann Reviewed-by: Tomi Valkeinen Reviewed-by: Emil Velikov Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230403104035.15288-5-tzimmermann@suse.de commit 194c9e20954a0b08418aa452be8c4fce5258fe04 Author: Thomas Zimmermann Date: Mon Apr 3 12:40:33 2023 +0200 drm/omapdrm: Remove bo from struct omap_fbdev Fbdev's framebuffer stores a pointer to the GEM object. Remove struct omap_fbdev.bo, which contains the same value. No functional changes. v2: * fix commit message (Tomi) Signed-off-by: Thomas Zimmermann Reviewed-by: Tomi Valkeinen Reviewed-by: Emil Velikov Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230403104035.15288-4-tzimmermann@suse.de commit 38129bc9260d3394b2e5d4e5eebc6baaeac02e8f Author: Thomas Zimmermann Date: Mon Apr 3 12:40:32 2023 +0200 drm/omapdrm: Remove fb from struct omap_fbdev Fbdev's struct fb_helper stores a pointer to the framebuffer. Remove struct omap_fbdev.fb, which contains the same value. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Tomi Valkeinen Reviewed-by: Emil Velikov Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230403104035.15288-3-tzimmermann@suse.de commit 6fe30712088e9eea58db32a01c9ed69abb13c77b Author: Thomas Zimmermann Date: Mon Apr 3 12:40:31 2023 +0200 drm/omapdrm: Include Include to get the contained declarations. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Tomi Valkeinen Reviewed-by: Emil Velikov Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230403104035.15288-2-tzimmermann@suse.de commit b358793c3bf231c455c55e0173256a86483997a8 Author: Jani Nikula Date: Wed Apr 5 13:41:42 2023 +0300 drm/i915/wakeref: fix kernel-doc comment Fix the warning: drivers/gpu/drm/i915/intel_wakeref.h:118: warning: expecting prototype for intel_wakeref_get_if_in_use(). Prototype was for intel_wakeref_get_if_active() instead Signed-off-by: Jani Nikula Reviewed-by: Vinod Govindapillai Link: https://patchwork.freedesktop.org/patch/msgid/20230405104142.766598-2-jani.nikula@intel.com commit efd8127454054d6d52040c17f7fa1656ac3befdc Author: Jani Nikula Date: Wed Apr 5 13:41:41 2023 +0300 drm/i915/tc: demote a kernel-doc comment to a regular comment There's not much point in a static work function having a kernel-doc comment. Just clean it up and make it a regular comment. This fixes the kernel-doc warnings: drivers/gpu/drm/i915/display/intel_tc.c:1370: warning: Function parameter or member 'work' not described in 'intel_tc_port_disconnect_phy_work' drivers/gpu/drm/i915/display/intel_tc.c:1370: warning: Excess function parameter 'dig_port' description in 'intel_tc_port_disconnect_phy_work' Signed-off-by: Jani Nikula Reviewed-by: Vinod Govindapillai Link: https://patchwork.freedesktop.org/patch/msgid/20230405104142.766598-1-jani.nikula@intel.com commit 52b113e968be66b57f792b2e2a9b8b77f382bd5f Merge: f86286569e92a e44f18c6ff8be Author: Daniel Vetter Date: Thu Apr 6 14:37:14 2023 +0200 Merge tag 'drm-misc-next-2023-04-06' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v6.4-rc1: UAPI Changes: Cross-subsystem Changes: - Document port and rotation dt bindings better. - For panel timing DT bindings, document that vsync and hsync are first, rather than last in image. - Fix video/aperture typos. Core Changes: - Reject prime DMA-Buf attachment if get_sg_table is missing. (For self-importing dma-buf only.) - Add prime import/export to vram-helper. - Fix oops in drm/vblank when init is not called. - Fixup xres/yres_virtual and other fixes in fb helper. - Improve SCDC debugs. - Skip setting deadline on modesets. - Assorted TTM fixes. Driver Changes: - Add lima usage stats. - Assorted fixes to bridge/lt8192b, tc358767, ivpu, bridge/ti-sn65dsi83, ps8640. - Use pci aperture helpers in drm/ast lynxfb, radeonfb. - Revert some lima patches, as they required a commit that has been reverted upstream. - Add AUO NE135FBM-N41 v8.1 eDP panel. - Add QAIC accel driver. Signed-off-by: Daniel Vetter From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/64bb9696-a76a-89d9-1866-bcdf7c69c284@linux.intel.com commit 7bef7eea539dac6182e25e2e8d4a33063d458878 Author: Khalil Blaiech Date: Wed Apr 5 09:16:29 2023 -0400 platform/mellanox: add firmware reset support Add a new sysfs to initiate firmware reset in isolation mode. Reviewed-by: David Thompson Signed-off-by: Khalil Blaiech Link: https://lore.kernel.org/r/10da04fa43e8acce5d4ec173e225c28b9e979e4b.1675790783.git.kblaiech@nvidia.com Signed-off-by: Hans de Goede commit fb131c472df92b2885262e747906c0a4038c82e5 Author: Hans de Goede Date: Tue Apr 4 13:19:55 2023 +0200 platform/x86: apple-gmux: Fix iomem_base __iomem annotation Fix the __iomem annotation of the iomem_base pointers in the apple-gmux code. The __iomem should go before the *. This fixes a bunch of sparse warnings like this one: drivers/platform/x86/apple-gmux.c:224:48: sparse: expected void const [noderef] __iomem * got unsigned char [usertype] * Fixes: 0c18184de990 ("platform/x86: apple-gmux: support MMIO gmux on T2 Macs") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304040401.IMxt7Ubi-lkp@intel.com/ Suggested-by: Dan Carpenter Signed-off-by: Hans de Goede Reviewed-by: Orlando Chamberlain Link: https://lore.kernel.org/r/20230404111955.43266-1-hdegoede@redhat.com commit f86286569e92a260fbf8a1975f9421b4a66581d8 Merge: 1138398d71e8e 4b51210f98c2b Author: Daniel Vetter Date: Thu Apr 6 14:21:00 2023 +0200 Merge tag 'drm-intel-gt-next-2023-04-06' of git://anongit.freedesktop.org/drm/drm-intel into drm-next UAPI Changes: - (Build-time only, should not have any impact) drm/i915/uapi: Replace fake flex-array with flexible-array member "Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead." This is on core kernel request moving towards GCC 13. Driver Changes: - Fix context runtime accounting on sysfs fdinfo for heavy workloads (Tvrtko) - Add support for OA media units on MTL (Umesh) - Add new workarounds for Meteorlake (Daniele, Radhakrishna, Haridhar) - Fix sysfs to read actual frequency for MTL and Gen6 and earlier (Ashutosh) - Synchronize i915/BIOS on C6 enabling on MTL (Vinay) - Fix DMAR error noise due to GPU error capture (Andrej) - Fix forcewake during BAR resize on discrete (Andrzej) - Flush lmem contents after construction on discrete (Chris) - Fix GuC loading timeout on systems where IFWI programs low boot frequency (John) - Fix race condition UAF in i915_perf_add_config_ioctl (Min) - Sanitycheck MMIO access early in driver load and during forcewake (Matt) - Wakeref fixes for GuC RC error scenario and active VM tracking (Chris) - Cancel HuC delayed load timer on reset (Daniele) - Limit double GT reset to pre-MTL (Daniele) - Use i915 instead of dev_priv insied the file_priv structure (Andi) - Improve GuC load error reporting (John) - Simplify VCS/BSD engine selection logic (Tvrtko) - Perform uc late init after probe error injection (Andrzej) - Fix format for perf_limit_reasons in debugfs (Vinay) - Create per-gt debugfs files (Andi) - Documentation and kerneldoc fixes (Nirmoy, Lee) - Selftest improvements (Fei, Jonathan) Signed-off-by: Daniel Vetter From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZC6APj/feB+jBf2d@jlahtine-mobl.ger.corp.intel.com commit 4a1b5d183273ef402edb7c7ff58052ae97259a2d Author: Maíra Canal Date: Fri Mar 24 13:42:26 2023 -0300 drm/vkms: allow the primary plane to be positioned Before commit bc0d7fdefec6 ("drm: vkms: Supports to the case where primary plane doesn't match the CRTC"), the composition was executed on top of the primary plane. Therefore, the primary plane needed to cover the entire CRTC. After commit bc0d7fdefec6, this is no longer necessary, as the composition is now executed on top of the CRTC. Then, allow the primary plane to be positioned in such a way that it doesn't cover the entire CRTC. This patch was tested with the vkms IGT testlist and all tests passed successfully. Moreover, the test igt@kms_universal_plane@universal-plane-pageflip-windowed-pipe-A used to fail and now is passing. Signed-off-by: Maíra Canal Reviewed-by: Melissa Wen Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230324164226.256084-3-mcanal@igalia.com commit 4dee3c4b32a65d6b140ed506a7a8859d5cab6611 Author: Maíra Canal Date: Fri Mar 24 13:42:25 2023 -0300 drm/vkms: remove the need for the primary plane to be visible Before commit bc0d7fdefec6 ("drm: vkms: Supports to the case where primary plane doesn't match the CRTC"), the composition was executed on top of the primary plane. Therefore, the primary plane needed to be visible and full screen. After commit bc0d7fdefec6, this is no longer necessary, as the composition is now executed on top of the CRTC. Then, remove the conditional expression that forced the primary plane to be visible and full screen. This allows vkms to accept non-null framebuffers when the CRTC is disabled. This patch was tested with the vkms IGT testlist and all tests passed successfully. Moreover, the tests igt@kms_universal_plane@universal-plane-pipe-a-functional and igt@kms_universal_plane@disable-primary-vs-flip-pipe-a used to fail and now are passing. Signed-off-by: Maíra Canal Reviewed-by: Melissa Wen Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230324164226.256084-2-mcanal@igalia.com commit 2429b3c529da29d4277d519bd66d034842dcd70c Author: Nur Hussein Date: Thu Apr 6 04:25:59 2023 +0800 drm/tegra: Avoid potential 32-bit integer overflow In tegra_sor_compute_config(), the 32-bit value mode->clock is multiplied by 1000, and assigned to the u64 variable pclk. We can avoid a potential 32-bit integer overflow by casting mode->clock to u64 before we do the arithmetic and assignment. Signed-off-by: Nur Hussein Signed-off-by: Thierry Reding commit 905a9eb5f636f3312964b162362e4d6ca4e37378 Author: Eric Dumazet Date: Wed Apr 5 07:15:56 2023 +0000 selftests/net: fix typo in tcp_mmap kernel test robot reported the following warning: All warnings (new ones prefixed by >>): tcp_mmap.c: In function 'child_thread': >> tcp_mmap.c:211:61: warning: 'lu' may be used uninitialized in this function [-Wmaybe-uninitialized] 211 | zc.length = min(chunk_size, FILE_SZ - lu); We want to read FILE_SZ bytes, so the correct expression should be (FILE_SZ - total) Fixes: 5c5945dc695c ("selftests/net: Add SHA256 computation over data sent in tcp_mmap") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304042104.UFIuevBp-lkp@intel.com/ Signed-off-by: Eric Dumazet Cc: Xiaoyan Li Cc: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20230405071556.1019623-1-edumazet@google.com Signed-off-by: Paolo Abeni commit c69fec50ec2e3aeea46b13235b72d9d5a1bf095a Author: Hans de Goede Date: Sat Apr 1 17:07:37 2023 +0200 platform/x86: x86-android-tablets: Add Lenovo Yoga Book X90F/L data The Lenovo Yoga Book X90F/L is a x86 ACPI tablet which ships with Android x86 as factory OS. Its DSDT contains a bunch of I2C devices which are not actually there, causing various resource conflicts. Enumeration of these is skipped through the acpi_quirk_skip_i2c_client_enumeration(). Add support for manually instantiating the I2C + other devices which are actually present on this tablet by adding the necessary device info to the x86-android-tablets module. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230401150737.597417-3-hdegoede@redhat.com commit ec5a4565fd6e15ccbe5710a326a2f283c0507389 Author: Hans de Goede Date: Sat Apr 1 17:07:36 2023 +0200 platform/x86: x86-android-tablets: Share lp855x_platform_data between different models Various Lenovo models use a TI LP8557 LED backlight controller and the necessary platform_data is the same for the different models. Currently there are 2 identical copies and the upcoming support for the Lenovo Yoga Book X90F/L would add a 3th identical copy. Move to sharing the lp855x_platform_data between different models to avoid this duplication. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230401150737.597417-2-hdegoede@redhat.com commit 01862d01cb36ad36233939c07d6438a2f83dcd46 Author: Hans de Goede Date: Sat Apr 1 17:07:35 2023 +0200 platform/x86: x86-android-tablets: Use LP8557 in direct mode on both the Yoga 830 and the 1050 Both the Lenovo Yoga Tablet 2 830 and 1050 models use an TI LP8557 LED backlight controller. On the 1050 the LP8557's PWM input is connected to the PMIC's PWM output and everything works fine with the defaults programmed into the LP8557 by the BIOS. But on the 830 the LP8557's PWM input is connected to a PWM output coming from the LCD panel's controller. The Android code has a hack in the i915 driver to write the non-standard DSI reg 0x9f with the desired backlight level to set the duty-cycle of the LCD's PWM output. To avoid having to have a similar hack in the mainline kernel the LP8557 entry in lenovo_yoga_tab2_830_1050_i2c_clients instead just programs the LP8557 to directly set the level, ignoring the PWM input. So far we have only been instantiating the LP8557 i2c_client for direct backlight control on the 830 model. But we want hide/disable the intel_backlight interface on the 830 model to avoid having 2 backlight interfaces for the same LCD panel. And the 830 and 1050 share the same DMI strings. So this will hide the intel_backlight interface on the 1050 model too. To avoid this causing problems make the backlight handling consistent between the 2 models and always directly use the LP8557. This also simplifies the code. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230401150737.597417-1-hdegoede@redhat.com commit 3e9adae9336f1d530f342e5d5fbfc7d349f25b95 Author: Thomas Weißschuh Date: Wed Mar 29 04:50:25 2023 +0000 platform/x86: think-lmi: Remove unnecessary casts for attributes These casts are unnecessary and could break if structure layouts are randomized or implementation details change. Use the proper syntax that works without casts. Also remove some unnecessary braces that checkpatch complains about. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230329-think-lmi-attrs-v1-1-5794f2367cc2@weissschuh.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit e82882cdd241b78d305df1441c624fbbbd07af05 Author: Gergo Koteles Date: Tue Mar 28 18:45:59 2023 -0700 platform/x86: Add driver for Yoga Tablet Mode switch This WMI driver for the tablet mode control switch for Lenovo Yoga notebooks was originally written by Gergo Koteles. The mode is mapped to a SW_TABLET_MODE switch capable input device. Andrew followed the suggestions that were posted in reply to Gergo's RFC patch, and on the v1 & v2 versions of this patch to follow-up and get it merged. Changes from Gergo's RFC: - Refactored obtaining a reference to the EC ACPI device needed for the quirk implementation as suggested by Hans de Goede - Applied small fixes and switched to always registering handles with the driver for automatic cleanup as suggested by Barnabás Pőcze. - Merged the lenovo_ymc_trigger_ec function with the ideapad_trigger_ymc_next_read function since it was no longer external. - Added the word "Tablet" to the driver description to hopefully make it more clear. - Fixed the LENOVO_YMC_QUERY_METHOD ID and the name string for the EC APCI device trigged for the quirk - Triggered the input event on probe so that the initial tablet mode state when the driver is loaded is reported to userspace as suggested by Armin Wolf. - Restricted the permissions of the ec_trigger parameter as suggested by Armin Wolf. Also updated the description. We have tested this on the Yoga 7 14AIL7 for the non-quirk path and on the Yoga 7 14ARB7 which has the firmware bug that requires triggering the embedded controller to send the mode change events. This workaround is also used by the Windows drivers. According to reports at https://github.com/lukas-w/yoga-usage-mode, which uses the same WMI devices, the following models should also work: Yoga C940, Ideapad flex 14API, Yoga 9 14IAP7, Yoga 7 14ARB7, etc. Signed-off-by: Gergo Koteles Co-developed-by: Andrew Kallmeyer Signed-off-by: Andrew Kallmeyer Link: https://lore.kernel.org/r/20221004214332.35934-1-soyer@irl.hu/ Link: https://lore.kernel.org/r/20230310041726.217447-1-kallmeyeras@gmail.com/ Link: https://lore.kernel.org/r/20230323025200.5462-1-kallmeyeras@gmail.com/ Tested-by: André Apitzsch Link: https://lore.kernel.org/r/20230329014559.44494-3-kallmeyeras@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 0de0ab9a659a419d1aa9c2516887e95a51455da0 Author: Andrew Kallmeyer Date: Tue Mar 28 18:45:58 2023 -0700 platform/x86: Move ideapad ACPI helpers to a new header These functions will be used by a driver written by Gergo Koteles to detect the tablet mode switch in Lenovo Yoga laptops. These changes were discussed in review of that patch. This is the minimal set of functions needed in that driver, there are several more small functions left in the ACPI Helpers section in ideapad-laptop.c. The only change is the functions are now marked inline as requested in the review comments. Signed-off-by: Andrew Kallmeyer Link: https://lore.kernel.org/r/20221004214332.35934-1-soyer@irl.hu/ Tested-by: André Apitzsch Link: https://lore.kernel.org/r/20230329014559.44494-2-kallmeyeras@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 71ec16f45ef8d10e20c58e85f7d3644e324d3c13 Author: Thomas Zimmermann Date: Thu Mar 30 10:36:07 2023 +0200 drm/tegra: Implement fbdev emulation as in-kernel client Move code from ad-hoc fbdev callbacks into DRM client functions and remove the old callbacks. The functions instruct the client to poll for changed output or restore the display. The DRM core calls both, the old callbacks and the new client helpers, from the same places. The new functions perform the same operation as before, so there's no change in functionality. Replace all code that initializes or releases fbdev emulation throughout the driver. Instead initialize the fbdev client by a single call to tegra_fbdev_setup() after tegra has registered its DRM device. As in most drivers, tegra's fbdev emulation now acts like a regular DRM client. The fbdev client setup consists of the initial preparation and the hot-plugging of the display. The latter creates the fbdev device and sets up the fbdev framebuffer. The setup performs display hot-plugging once. If no display can be detected, DRM probe helpers re-run the detection on each hotplug event. A call to drm_dev_unregister() releases the client automatically. No further action is required within tegra. If the fbdev framebuffer has been fully set up, struct fb_ops.fb_destroy implements the release. For partially initialized emulation, the fbdev client reverts the initial setup. Signed-off-by: Thomas Zimmermann Signed-off-by: Thierry Reding commit 25dda38e0b07941f291a442ac470b0637b7b3e60 Author: Thomas Zimmermann Date: Thu Mar 30 10:36:06 2023 +0200 drm/tegra: Initialize fbdev DRM client Initialize the fbdev client in the fbdev code with empty helper functions. Also clean up the client. The helpers will later implement various functionality of the DRM client. No functional changes. Signed-off-by: Thomas Zimmermann Signed-off-by: Thierry Reding commit 1ac45068af9d6994dd6679bfbd0ff6cb0fc076da Author: Thomas Zimmermann Date: Thu Mar 30 10:36:05 2023 +0200 drm/tegra: Hide fbdev support behind config option Only build tegra's fbdev emulation if CONFIG_DRM_FBDEV_EMULATION has been enabled. As part of this change, move the code into its own source file. No functional changes. Signed-off-by: Thomas Zimmermann Signed-off-by: Thierry Reding commit 430cac487400494c19a8b85299e979bb07b4671f Author: Sabrina Dubroca Date: Tue Apr 4 15:12:16 2023 +0200 xfrm: don't check the default policy if the policy allows the packet The current code doesn't let a simple "allow" policy counteract a default policy blocking all incoming packets: ip x p setdefault in block ip x p a src 192.168.2.1/32 dst 192.168.2.2/32 dir in action allow At this stage, we have an allow policy (with or without transforms) for this packet. It doesn't matter what the default policy says, since the policy we looked up lets the packet through. The case of a blocking policy is already handled separately, so we can remove this check. Fixes: 2d151d39073a ("xfrm: Add possibility to set the default to block if we have no policy") Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert commit d95debbdc528d50042807754d6085c15abc21768 Author: Tobias Klauser Date: Tue Mar 14 13:34:14 2023 +0100 selftests/clone3: fix number of tests in ksft_set_plan Commit 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME") added an additional test, so the number passed to ksft_set_plan needs to be bumped accordingly. Also use ksft_finished() to print results and exit. This will catch future mismatches between ksft_set_plan() and the number of tests being run. Fixes: 515bddf0ec41 ("selftests/clone3: test clone3 with CLONE_NEWTIME") Cc: Christian Brauner Signed-off-by: Tobias Klauser Reviewed-by: Christian Brauner Signed-off-by: Christian Brauner commit 0f72997036f32264fbecefb6a329de8e8d1bb5ce Merge: b536f32b5b034 3c2e6b54e4e98 Author: Paolo Abeni Date: Thu Apr 6 11:34:47 2023 +0200 Merge branch 'net-dsa-microchip-ksz8-enhance-static-mac-table-operations-and-error-handling' Oleksij Rempel says: ==================== net: dsa: microchip: ksz8: Enhance static MAC table operations and error handling This patch series improves the Microchip ksz8 driver by refactoring static MAC table operations for code reuse, implementing add/del_fdb functions, and making better use of error values in ksz8_r_sta_mac_table() and ksz8_w_sta_mac_table(). The changes aim to provide a more robust and maintainable driver with improved error handling. ==================== Link: https://lore.kernel.org/r/20230404101842.1382986-1-o.rempel@pengutronix.de Signed-off-by: Paolo Abeni commit 3c2e6b54e4e98f85bc9e17e20d6c702dd907afd3 Author: Oleksij Rempel Date: Tue Apr 4 12:18:42 2023 +0200 net: dsa: microchip: Utilize error values in ksz8_w_sta_mac_table() To handle potential read/write operation failures, update ksz8_w_sta_mac_table() to make use of the return values provided by read/write functions. Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Signed-off-by: Paolo Abeni commit c8e04374f9e1194a99c1c67980a21aa3f56a79d0 Author: Oleksij Rempel Date: Tue Apr 4 12:18:41 2023 +0200 net: dsa: microchip: Make ksz8_w_sta_mac_table() static Since ksz8_w_sta_mac_table() is only used within ksz8795.c, make it static to limit its scope. Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Signed-off-by: Paolo Abeni commit ec2312f337356cd48f538c49f7cf1c2047ec1866 Author: Oleksij Rempel Date: Tue Apr 4 12:18:40 2023 +0200 net: dsa: microchip: ksz8_r_sta_mac_table(): Utilize error values from read/write functions Take advantage of the return values provided by read/write functions in ksz8_r_sta_mac_table() to handle cases where read/write operations may fail. Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Signed-off-by: Paolo Abeni commit 559901b46810e82ba5321a5e789f994b65d3bc3d Author: Oleksij Rempel Date: Tue Apr 4 12:18:39 2023 +0200 net: dsa: microchip: ksz8_r_sta_mac_table(): Avoid using error code for empty entries Prepare for the next patch by ensuring that ksz8_r_sta_mac_table() does not use error codes for empty entries. This change will enable better handling of read/write errors in the upcoming patch. Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni commit b5751cdd7dbe618a03951bdd4c982a71ba448b1b Author: Oleksij Rempel Date: Tue Apr 4 12:18:38 2023 +0200 net: dsa: microchip: ksz8: Make ksz8_r_sta_mac_table() static As ksz8_r_sta_mac_table() is only used within ksz8795.c, there is no need to export it. Make the function static for better encapsulation. Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean Acked-by: Arun Ramadoss Signed-off-by: Paolo Abeni commit 57795412a447812553a8b61bbd968d06a54a41b4 Author: Oleksij Rempel Date: Tue Apr 4 12:18:37 2023 +0200 net: dsa: microchip: ksz8: Implement add/del_fdb and use static MAC table operations Add support for add/del_fdb operations and utilize the refactored static MAC table code. This resolves kernel warnings caused by the lack of fdb add function support in the current driver. Signed-off-by: Oleksij Rempel Signed-off-by: Paolo Abeni commit f6636ff69ec4f2c94a5ee1d032b21cfe1e0a5678 Author: Oleksij Rempel Date: Tue Apr 4 12:18:36 2023 +0200 net: dsa: microchip: ksz8: Separate static MAC table operations for code reuse Move static MAC table operations to separate functions in order to reuse the code for add/del_fdb. This is needed to address kernel warnings caused by the lack of fdb add function support in the current driver. Signed-off-by: Oleksij Rempel Reviewed-by: Vladimir Oltean Signed-off-by: Paolo Abeni commit a2216e1874715a8b4a6f4da2ddbe9277e5613c49 Author: David Yang Date: Sun Apr 2 00:44:40 2023 +0800 crypto: hisilicon/trng - add support for HiSTB TRNG HiSTB TRNG are found on some HiSilicon STB SoCs. Signed-off-by: David Yang Signed-off-by: Herbert Xu commit e93c60851ba1ee28324445c34af7e3dea8aee9f3 Author: Ryan Wanner Date: Tue Mar 28 12:56:29 2023 -0700 crypto: atmel-aes - Match cfb block size with generic implementation Change blocksize to match the cfb(aes) generic implementation. Signed-off-by: Ryan Wanner Signed-off-by: Herbert Xu commit 2fbe4829f758e0b588470fb53f6cd087fe92b8d3 Author: Ryan Wanner Date: Tue Mar 28 12:56:28 2023 -0700 crypto: atmel-aes - Detecting in-place operations two sg lists Avoiding detecting finely in-place operations with different scatter lists. Copying the source data for decryption into rctx->lastc regardless if the operation is in-place or not. This allows in-place operations with different scatter lists. This approach takes less resources than parsing both scatter lists to check if they are equal. Signed-off-by: Ryan Wanner Signed-off-by: Herbert Xu commit c13357fd4a8a56b345db25b875239a740deea18c Author: Ryan Wanner Date: Tue Mar 28 12:56:27 2023 -0700 crypto: atmel-tdes - Detecting in-place operations with two sg lists Avoiding detecting finely in-place operations with different scatter lists. Copying the source data for decryption into rctx->lastc regardless if the operation is in-place or not. This allows in-place operations with different scatter lists without affecting other operations. This approach takes less resources than parsing both scatter lists to check if they are equal. Signed-off-by: Ryan Wanner Signed-off-by: Herbert Xu commit 232c1e8e19ff8e60237012fadead02557aafca5a Author: Ryan Wanner Date: Tue Mar 28 12:56:26 2023 -0700 crypto: atmel-sha - Add zero length message digest support for hmac Add softare padding to hmac-sha digest for zero length messages. Using the atmel_sha_fill_padding() to fill the buffer with a padded empty message with a length of the block size. Create a temporary scatter list from the padded buffer to pass into the data processing functions. Signed-off-by: Ryan Wanner Signed-off-by: Herbert Xu commit a4b16dad46576ce08ecb660fc923d0857dcae107 Author: Tom Zanussi Date: Tue Mar 28 10:39:51 2023 -0500 crypto: qat - Move driver to drivers/crypto/intel/qat With the growing number of Intel crypto drivers, it makes sense to group them all into a single drivers/crypto/intel/ directory. Signed-off-by: Tom Zanussi Signed-off-by: Herbert Xu commit f09673770e767f862bd992b612f14018d0ab3857 Merge: 7b59bdbc3965c 782eea0c89f7d Author: Bartosz Golaszewski Date: Thu Apr 6 10:39:45 2023 +0200 Merge tag 'intel-gpio-v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into gpio/for-next intel-gpio for v6.4-2 * Fixed suspend issue on Clevo NL5xNU * Split a new Intel Tangier (library) driver for current and new platforms * Introduced a new driver for Intel Elkhart Lake PSE GPIO (see also above) * Contained a few fixes for the previous of_gpio.h cleanup * Miscellaneous cleanups here and there The following is an automated git shortlog grouped by driver: elkhartlake: - Introduce Intel Elkhart Lake PSE GPIO gpiolib: - acpi: Add a ignore wakeup quirk for Clevo NL5xNU - acpi: Move ACPI device NULL check to acpi_get_driver_gpio_data() - acpi: use the fwnode in acpi_gpiochip_find() ich: - Use devm_gpiochip_add_data() to simplify remove path merrifield: - Utilise temporary variable for struct device - Use dev_err_probe() - Adapt to Intel Tangier GPIO driver mips: - ar7: include linux/gpio/driver.h mm-lantiq: - Fix typo in the newly added header filename powerpc/40x: - Add missing select OF_GPIO_MM_GPIOCHIP sh: - mach-x3proto: Add missing #include tangier: - Introduce Intel Tangier GPIO driver commit 1bc7fdbf2677cc1866c025e5a393811ea8e25486 Author: Tom Zanussi Date: Tue Mar 28 10:39:50 2023 -0500 crypto: ixp4xx - Move driver to drivers/crypto/intel/ixp4xx With the growing number of Intel crypto drivers, it makes sense to group them all into a single drivers/crypto/intel/ directory. Create a separate drivers/crypto/intel/ixp4xx directory and move drivers/crypto/ixp4xx_crypto.c to it, along with a new Kconfig and Makefile to contain the config and make bits. Also add a COMPILE_TEST dependency to CRYPTO_DEV_IXP4XX so it can be more easily compile-tested. Signed-off-by: Tom Zanussi Acked-by: Corentin LABBE Signed-off-by: Herbert Xu commit fbf31dd599875cb132d764cf4d05d7985e332c05 Author: Tom Zanussi Date: Tue Mar 28 10:39:49 2023 -0500 crypto: keembay - Move driver to drivers/crypto/intel/keembay With the growing number of Intel crypto drivers, it makes sense to group them all into a single drivers/crypto/intel/ directory. Signed-off-by: Tom Zanussi Acked-by: Daniele Alessandrelli Signed-off-by: Herbert Xu commit 45121ad4a1750ca47ce3f32bd434bdb0cdbf0043 Author: Jeremi Piotrowski Date: Tue Mar 28 15:16:36 2023 +0000 crypto: ccp - Clear PSP interrupt status register before calling handler The PSP IRQ is edge-triggered (MSI or MSI-X) in all cases supported by the psp module so clear the interrupt status register early in the handler to prevent missed interrupts. sev_irq_handler() calls wake_up() on a wait queue, which can result in a new command being submitted from a different CPU. This then races with the clearing of isr and can result in missed interrupts. A missed interrupt results in a command waiting until it times out, which results in the psp being declared dead. This is unlikely on bare metal, but has been observed when running virtualized. In the cases where this is observed, sev->cmdresp_reg has PSP_CMDRESP_RESP set which indicates that the command was processed correctly but no interrupt was asserted. The full sequence of events looks like this: CPU 1: submits SEV cmd #1 CPU 1: calls wait_event_timeout() CPU 0: enters psp_irq_handler() CPU 0: calls sev_handler()->wake_up() CPU 1: wakes up; finishes processing cmd #1 CPU 1: submits SEV cmd #2 CPU 1: calls wait_event_timeout() PSP: finishes processing cmd #2; interrupt status is still set; no interrupt CPU 0: clears intsts CPU 0: exits psp_irq_handler() CPU 1: wait_event_timeout() times out; psp_dead=true Fixes: 200664d5237f ("crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support") Cc: stable@vger.kernel.org Signed-off-by: Jeremi Piotrowski Acked-by: Tom Lendacky Signed-off-by: Herbert Xu commit 283480f0ce9ac234bce4d8ad4654372a37c1d4d3 Merge: 748d3c3cce57d f3040daab8104 Author: Arnd Bergmann Date: Thu Apr 6 10:19:33 2023 +0200 Merge tag 'optee-load-for-v6.4' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers Add SMC for OP-TEE image loading Adds an SMC call for loading OP-TEE by the kernel. * tag 'optee-load-for-v6.4' of https://git.linaro.org/people/jens.wiklander/linux-tee: tee: optee: Add SMC for loading OP-TEE image Link: https://lore.kernel.org/r/20230405062701.GA3391925@rayden Signed-off-by: Arnd Bergmann commit 9697b328d11152d7b918ee82438d4283d4edb563 Author: Herbert Xu Date: Tue Mar 28 11:57:09 2023 +0800 crypto: hash - Remove maximum statesize limit Remove the HASH_MAX_STATESIZE limit now that it is unused. Signed-off-by: Herbert Xu commit acc03d8908fdd8f24d5c0510a7c1767e176da4bc Author: Herbert Xu Date: Tue Mar 28 11:54:24 2023 +0800 crypto: algif_hash - Allocate hash state with kmalloc Allocating the hash state on the stack limits its size. Change this to use kmalloc so the limit can be removed for new drivers. Signed-off-by: Herbert Xu commit 686cd976b6ddedeeb1a1fb09ba53a891d3cc9a03 Author: Herbert Xu Date: Tue Mar 28 11:35:23 2023 +0800 crypto: drbg - Only fail when jent is unavailable in FIPS mode When jent initialisation fails for any reason other than ENOENT, the entire drbg fails to initialise, even when we're not in FIPS mode. This is wrong because we can still use the kernel RNG when we're not in FIPS mode. Change it so that it only fails when we are in FIPS mode. Fixes: 57225e679788 ("crypto: drbg - Use callback API for random readiness") Signed-off-by: Herbert Xu Reviewed-by: Stephan Mueller Signed-off-by: Herbert Xu commit 3fde2fe99aa6dacd4151c87382b07ce7f30f0a52 Author: Stephan Müller Date: Mon Mar 27 09:03:52 2023 +0200 crypto: jitter - permanent and intermittent health errors According to SP800-90B, two health failures are allowed: the intermittend and the permanent failure. So far, only the intermittent failure was implemented. The permanent failure was achieved by resetting the entire entropy source including its health test state and waiting for two or more back-to-back health errors. This approach is appropriate for RCT, but not for APT as APT has a non-linear cutoff value. Thus, this patch implements 2 cutoff values for both RCT/APT. This implies that the health state is left untouched when an intermittent failure occurs. The noise source is reset and a new APT powerup-self test is performed. Yet, whith the unchanged health test state, the counting of failures continues until a permanent failure is reached. Any non-failing raw entropy value causes the health tests to reset. The intermittent error has an unchanged significance level of 2^-30. The permanent error has a significance level of 2^-60. Considering that this level also indicates a false-positive rate (see SP800-90B section 4.2) a false-positive must only be incurred with a low probability when considering a fleet of Linux kernels as a whole. Hitting the permanent error may cause a panic(), the following calculation applies: Assuming that a fleet of 10^9 Linux kernels run concurrently with this patch in FIPS mode and on each kernel 2 health tests are performed every minute for one year, the chances of a false positive is about 1:1000 based on the binomial distribution. In addition, any power-up health test errors triggered with jent_entropy_init are treated as permanent errors. A permanent failure causes the entire entropy source to permanently return an error. This implies that a caller can only remedy the situation by re-allocating a new instance of the Jitter RNG. In a subsequent patch, a transparent re-allocation will be provided which also changes the implied heuristic entropy assessment. In addition, when the kernel is booted with fips=1, the Jitter RNG is defined to be part of a FIPS module. The permanent error of the Jitter RNG is translated as a FIPS module error. In this case, the entire FIPS module must cease operation. This is implemented in the kernel by invoking panic(). The patch also fixes an off-by-one in the RCT cutoff value which is now set to 30 instead of 31. This is because the counting of the values starts with 0. Reviewed-by: Vladis Dronov Signed-off-by: Stephan Mueller Reviewed-by: Marcelo Henrique Cerri Signed-off-by: Herbert Xu commit d3330cb8e36a50184a1a7d36019937c1f62f2a04 Author: Oswald Buddenhagen Date: Wed Apr 5 22:12:20 2023 +0200 ALSA: emu10k1: documentation updates - Less misinformation - Language and whitespace fixups Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230405201220.2197893-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 3ab06bf1389f2649e73bfa0d524d1a4890bd68d5 Author: Oswald Buddenhagen Date: Wed Apr 5 22:12:20 2023 +0200 ALSA: emu10k1: update label & help in config system The newer E-MU cards weren't mentioned at all. The "partially supported" is removed ahead of it becoming mostly untrue. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230405201220.2197908-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai commit 113348a44b8622b497fb884f41c8659481ad0b04 Author: Wen Yang Date: Thu Apr 6 03:20:02 2023 +0800 eventfd: use wait_event_interruptible_locked_irq() helper wait_event_interruptible_locked_irq was introduced by commit 22c43c81a51e ("wait_event_interruptible_locked() interface"), but older code such as eventfd_{write,read} still uses the open code implementation. Inspired by commit 8120a8aadb20 ("fs/timerfd.c: make use of wait_event_interruptible_locked_irq()"), this patch replaces the open code implementation with a single macro call. No functional change intended. Signed-off-by: Wen Yang Reviewed-by: Eric Biggers Reviewed-by: Jens Axboe Cc: Alexander Viro Cc: Christoph Hellwig Cc: Dylan Yudaken Cc: Jens Axboe Cc: David Woodhouse Cc: Fu Wei Cc: Paolo Bonzini Cc: Michal Nazarewicz Cc: Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Message-Id: Signed-off-by: Christian Brauner commit e44f18c6ff8beef7b2b10592287f0a9766376d9b Author: Thomas Hellström Date: Tue Apr 4 22:06:50 2023 +0200 drm/ttm: Make the call to ttm_tt_populate() interruptible when faulting When swapping in, or under memory pressure ttm_tt_populate() may sleep for a substantiable amount of time. Allow interrupts during the sleep. This will also allow us to inject -EINTR errors during swapin in upcoming patches. Also avoid returning VM_FAULT_OOM, since that will confuse the core mm, making it print out a confused message and retrying the fault. Return VM_FAULT_SIGBUS also under OOM conditions. Signed-off-by: Thomas Hellström Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230404200650.11043-4-thomas.hellstrom@linux.intel.com commit 322458c2bb1a0398c5775333e1e71e1ece8a461f Author: Thomas Hellström Date: Tue Apr 4 22:06:49 2023 +0200 drm/ttm: Reduce the number of used allocation orders for TTM pages When swapping out, we will split multi-order pages both in order to move them to the swap-cache and to be able to return memory to the swap cache as soon as possible on a page-by-page basis. Reduce the page max order to the system PMD size, as we can then be nicer to the system and avoid splitting gigantic pages. Looking forward to when we might be able to swap out PMD size folios without splitting, this will also be a benefit. v2: - Include all orders up to the PMD size (Christian König) v3: - Avoid compilation errors for architectures with special PFN_SHIFTs Signed-off-by: Thomas Hellström Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230404200650.11043-3-thomas.hellstrom@linux.intel.com commit 379989e7cbdc7aa7496a00ee286ec146c7599cf0 Author: Thomas Hellström Date: Tue Apr 4 22:06:48 2023 +0200 drm/ttm/pool: Fix ttm_pool_alloc error path When hitting an error, the error path forgot to unmap dma mappings and could call set_pages_wb() on already uncached pages. Fix this by introducing a common ttm_pool_free_range() function that does the right thing. v2: - Simplify that common function (Christian König) v3: - Rename that common function to ttm_pool_free_range() (Christian König) Fixes: d099fc8f540a ("drm/ttm: new TT backend allocation pool v3") Cc: Christian König Cc: Dave Airlie Cc: Christian Koenig Cc: Huang Rui Cc: dri-devel@lists.freedesktop.org Signed-off-by: Thomas Hellström Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230404200650.11043-2-thomas.hellstrom@linux.intel.com commit b2f7b01d36a9b94fbd7489bd1228025ea7e7a2f4 Author: Leon Romanovsky Date: Thu Mar 30 11:02:31 2023 +0300 net/mlx5e: Simulate missing IPsec TX limits hardware functionality ConnectX-7 devices don't have ability to send TX hard/soft limits events. As a possible workaround, let's rely on existing infrastructure and use periodic check of cached flow counter. In these periodic checks, we call to xfrm_state_check_expire() to check and mark state accordingly. Once the state is marked as XFRM_STATE_EXPIRED, the SA flow rule is changed to drop all the traffic. Link: https://lore.kernel.org/r/94a5d82c0c399747117d8a558f9beebfbcf26154.1680162300.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky commit 4562116f8a565fdeadb0af5503cb7edb8e9d5761 Author: Leon Romanovsky Date: Thu Mar 30 11:02:30 2023 +0300 net/mlx5e: Generalize IPsec work structs IPsec logic has two work structs which are submitted to same workqueue. As a preparation to addition of new work which needs to be submitted too, let's generalize struct mlx5e_ipsec_work. Link: https://lore.kernel.org/r/285a1550242363de181bab3a07a69296f66ad9a8.1680162300.git.leonro@nvidia.com Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky commit 20fbdab21e2e21bc1e9f0a0dd736c087a9fe0382 Author: Leon Romanovsky Date: Thu Mar 30 11:02:29 2023 +0300 net/mlx5e: Reduce contention in IPsec workqueue IPsec workqueue shouldn't be declared as ordered queue with one work per-CPU, and can be safely changed to be unordered with default number of works per-CPU. Link: https://lore.kernel.org/r/5dc224a4decd09c14f645d38173e1a1710802cd8.1680162300.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky commit 7db21ef4566ef7a24e46808e8668a603531163c3 Author: Leon Romanovsky Date: Thu Mar 30 11:02:28 2023 +0300 net/mlx5e: Set IPsec replay sequence numbers "ip xfrm state ..." command allows users to configure replay sequence numbers with replay-seq* arguments for RX and replay-oseq* for TX. Add the needed driver logic to support setting them. Link: https://lore.kernel.org/r/a9b17827eff2b29a4951225efa684a6cd38f74fe.1680162300.git.leonro@nvidia.com Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky commit f4979e2667c56f031a3c2e84364dbcde01c2cdf3 Author: Leon Romanovsky Date: Thu Mar 30 11:02:27 2023 +0300 net/mlx5e: Remove ESN callbacks if it is not supported There is no need in implementation of .xdo_dev_state_advance_esn() and setting work as it will never be called in packet offload mode. Link: https://lore.kernel.org/r/2fc9fade32e31f03b100d6086a82ad36269349dc.1680162300.git.leonro@nvidia.com Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky commit 3e1c957f9a3b248f47f8b39b607002d948fd17d4 Author: Leon Romanovsky Date: Thu Mar 30 11:02:26 2023 +0300 xfrm: don't require advance ESN callback for packet offload In packet offload mode, the hardware is responsible to manage replay window and advance ESN. In that mode, there won't any call to .xdo_dev_state_advance_esn callback. So relax current check for existence of that callback. Link: https://lore.kernel.org/r/9f3dfc3fef2cfcd191f0c5eee7cf0aa74e7f7786.1680162300.git.leonro@nvidia.com Reviewed-by: Raed Salem Acked-by: Steffen Klassert Signed-off-by: Leon Romanovsky commit 864b438085df0a9b93f264e3c8a0f68db1e93bdc Author: Jeffrey Hugo Date: Mon Mar 27 09:54:57 2023 -0600 MAINTAINERS: Add entry for QAIC driver Add MAINTAINERS entry for the Qualcomm Cloud AI 100 driver. Signed-off-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Stanislaw Gruszka Reviewed-by: Jacek Lawrynowicz Acked-by: Oded Gabbay Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/1679932497-30277-9-git-send-email-quic_jhugo@quicinc.com commit 759662e4f1f8cd6ea0ec466e10cf29fe7c1fec36 Author: Jeffrey Hugo Date: Mon Mar 27 09:54:56 2023 -0600 accel/qaic: Add qaic driver to the build system Now that we have all the components of a minimum QAIC which can boot and run an AIC100 device, add the infrastructure that allows the QAIC driver to be built. Signed-off-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Stanislaw Gruszka Reviewed-by: Jacek Lawrynowicz Acked-by: Oded Gabbay Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/1679932497-30277-8-git-send-email-quic_jhugo@quicinc.com commit 566fc96198b4bb07ca6806386956669881225271 Author: Pranjal Ramajor Asha Kanojiya Date: Mon Mar 27 09:54:55 2023 -0600 accel/qaic: Add mhi_qaic_cntl Some of the MHI channels for an AIC100 device need to be routed to userspace so that userspace can communicate directly with QSM. The MHI bus does not support this, and while the WWAN subsystem does (for the same reasons), AIC100 is not a WWAN device. Also, MHI is not something that other accelerators are expected to share, thus an accel subsystem function that meets this usecase is unlikely. Create a QAIC specific MHI userspace shim that exposes these channels. Start with QAIC_SAHARA which is required to boot AIC100 and is consumed by the kickstart application as documented in aic100.rst Each AIC100 instance (currently, up to 16) in a system will create a chardev for QAIC_SAHARA. This chardev will be found as /dev/_QAIC_SAHARA For example - /dev/mhi0_QAIC_SAHARA Signed-off-by: Pranjal Ramajor Asha Kanojiya Signed-off-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Reviewed-by: Stanislaw Gruszka Reviewed-by: Jacek Lawrynowicz Acked-by: Oded Gabbay Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/1679932497-30277-7-git-send-email-quic_jhugo@quicinc.com commit ff13be8303336ead5621712f2c55012d738878b5 Author: Jeffrey Hugo Date: Mon Mar 27 09:54:54 2023 -0600 accel/qaic: Add datapath Add the datapath component that manages BOs and submits them to running workloads on the qaic device via the dma_bridge hardware. This allows QAIC clients to interact with their workloads (run inferences) via the following ioctls along with mmap(): DRM_IOCTL_QAIC_CREATE_BO DRM_IOCTL_QAIC_MMAP_BO DRM_IOCTL_QAIC_ATTACH_SLICE_BO DRM_IOCTL_QAIC_EXECUTE_BO DRM_IOCTL_QAIC_PARTIAL_EXECUTE_BO DRM_IOCTL_QAIC_WAIT_BO DRM_IOCTL_QAIC_PERF_STATS_BO Signed-off-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Stanislaw Gruszka Reviewed-by: Jacek Lawrynowicz Acked-by: Oded Gabbay Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/1679932497-30277-6-git-send-email-quic_jhugo@quicinc.com commit 129776ac2e38231fa9c02ce20e116c99de291666 Author: Jeffrey Hugo Date: Mon Mar 27 09:54:53 2023 -0600 accel/qaic: Add control path Add the control path component that talks to the management processor (QSM) to load workloads onto the AIC100 device. This implements the KMD portion of the NNC protocol over the QAIC_CONTROL MHI channel and the DRM_IOCTL_QAIC_MANAGE IOCTL to userspace. With this functionality, QAIC clients are able to load, run, and cleanup their workloads on the device but not interact with the workloads (run inferences). Signed-off-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Stanislaw Gruszka Reviewed-by: Jacek Lawrynowicz Acked-by: Oded Gabbay Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/1679932497-30277-5-git-send-email-quic_jhugo@quicinc.com commit a36bf7af868b4b84f026a752671df66f0809bd3d Author: Jeffrey Hugo Date: Mon Mar 27 09:54:52 2023 -0600 accel/qaic: Add MHI controller An AIC100 device contains a MHI interface with a number of different channels for controlling different aspects of the device. The MHI controller works with the MHI bus to enable and drive that interface. AIC100 uses the BHI protocol in PBL to load SBL. The MHI controller expects the SBL to be located at /lib/firmware/qcom/aic100/sbl.bin and expects the MHI bus to manage the process of loading and sending SBL to the device. Signed-off-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Stanislaw Gruszka Reviewed-by: Jacek Lawrynowicz Acked-by: Oded Gabbay Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/1679932497-30277-4-git-send-email-quic_jhugo@quicinc.com commit c501ca23a6a306a7c11631e02a26c8e0a768d64b Author: Jeffrey Hugo Date: Mon Mar 27 09:54:51 2023 -0600 accel/qaic: Add uapi and core driver file Add the QAIC driver uapi file and core driver file that binds to the PCIe device. The core driver file also creates the accel device and manages all the interconnections between the different parts of the driver. The driver can be built as a module. If so, it will be called "qaic.ko". Signed-off-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Stanislaw Gruszka Reviewed-by: Jacek Lawrynowicz Acked-by: Oded Gabbay Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/1679932497-30277-3-git-send-email-quic_jhugo@quicinc.com commit 830f3f27a388220c8f7e3fad1a00feb708cb066e Author: Jeffrey Hugo Date: Mon Mar 27 09:54:50 2023 -0600 accel/qaic: Add documentation for AIC100 accelerator driver The Qualcomm Cloud AI 100 (AIC100) device is an Artificial Intelligence accelerator PCIe card. It contains a number of components both in the SoC and on the card which facilitate running workloads: QSM: management processor NSPs: workload compute units DMA Bridge: dedicated data mover for the workloads MHI: multiplexed communication channels DDR: workload storage and memory The Linux kernel driver for AIC100 is called "QAIC" and is located in the accel subsystem. Signed-off-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Stanislaw Gruszka Reviewed-by: Jacek Lawrynowicz Acked-by: Oded Gabbay Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/1679932497-30277-2-git-send-email-quic_jhugo@quicinc.com commit f2c7ca890182d24ac817fa321489346000271c5c Author: Daniel Vetter Date: Wed Apr 5 15:31:05 2023 +0200 drm/atomic-helper: Don't set deadline for modesets If the crtc is being switched on or off then the semantics of computing the timestampe of the next vblank is somewhat ill-defined. And indeed, the code splats with a warning in the timestamp computation code. Specifically it hits the check to make sure that atomic drivers have full set up the timing constants in the drm_vblank structure, and that's just not the case before the crtc is actually on. For robustness it seems best to just not set deadlines for modesets. v2: Also skip on inactive crtc (Ville) Link: https://lore.kernel.org/dri-devel/dfc21f18-7e1e-48f0-c05a-d659b9c90b91@linaro.org/ Fixes: d39e48ca80c0 ("drm/atomic-helper: Set fence deadline for vblank") Cc: Ville Syrjälä Cc: Rob Clark Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Reported-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov # test patch only Cc: Dmitry Baryshkov Reviewed-by: Ville Syrjälä Reviewed-by: Rob Clark Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20230405133105.947834-1-daniel.vetter@ffwll.ch commit 361eb69fc99f1a8f1d653d69ecd742f3cbb896be Author: Ojaswin Mujoo Date: Sat Mar 25 13:43:42 2023 +0530 ext4: Remove the logic to trim inode PAs Earlier, inode PAs were stored in a linked list. This caused a need to periodically trim the list down inorder to avoid growing it to a very large size, as this would severly affect performance during list iteration. Recent patches changed this list to an rbtree, and since the tree scales up much better, we no longer need to have the trim functionality, hence remove it. Signed-off-by: Ojaswin Mujoo Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/c409addceaa3ade4b40328e28e3b54b2f259689e.1679731817.git.ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o commit 3872778664e36528caf8b27f355e75482f6d562d Author: Ojaswin Mujoo Date: Sat Mar 25 13:43:41 2023 +0530 ext4: Use rbtrees to manage PAs instead of inode i_prealloc_list Currently, the kernel uses i_prealloc_list to hold all the inode preallocations. This is known to cause degradation in performance in workloads which perform large number of sparse writes on a single file. This is mainly because functions like ext4_mb_normalize_request() and ext4_mb_use_preallocated() iterate over this complete list, resulting in slowdowns when large number of PAs are present. Patch 27bc446e2 partially fixed this by enforcing a limit of 512 for the inode preallocation list and adding logic to continually trim the list if it grows above the threshold, however our testing revealed that a hardcoded value is not suitable for all kinds of workloads. To optimize this, add an rbtree to the inode and hold the inode preallocations in this rbtree. This will make iterating over inode PAs faster and scale much better than a linked list. Additionally, we also had to remove the LRU logic that was added during trimming of the list (in ext4_mb_release_context()) as it will add extra overhead in rbtree. The discards now happen in the lowest-logical-offset-first order. ** Locking notes ** With the introduction of rbtree to maintain inode PAs, we can't use RCU to walk the tree for searching since it can result in partial traversals which might miss some nodes(or entire subtrees) while discards happen in parallel (which happens under a lock). Hence this patch converts the ei->i_prealloc_lock spin_lock to rw_lock. Almost all the codepaths that read/modify the PA rbtrees are protected by the higher level inode->i_data_sem (except ext4_mb_discard_group_preallocations() and ext4_clear_inode()) IIUC, the only place we need lock protection is when one thread is reading "searching" the PA rbtree (earlier protected under rcu_read_lock()) and another is "deleting" the PAs in ext4_mb_discard_group_preallocations() function (which iterates all the PAs using the grp->bb_prealloc_list and deletes PAs from the tree without taking any inode lock (i_data_sem)). So, this patch converts all rcu_read_lock/unlock() paths for inode list PA to use read_lock() and all places where we were using ei->i_prealloc_lock spinlock will now be using write_lock(). Note that this makes the fast path (searching of the right PA e.g. ext4_mb_use_preallocated() or ext4_mb_normalize_request()), now use read_lock() instead of rcu_read_lock/unlock(). Ths also will now block due to slow discard path (ext4_mb_discard_group_preallocations()) which uses write_lock(). But this is not as bad as it looks. This is because - 1. The slow path only occurs when the normal allocation failed and we can say that we are low on disk space. One can argue this scenario won't be much frequent. 2. ext4_mb_discard_group_preallocations(), locks and unlocks the rwlock for deleting every individual PA. This gives enough opportunity for the fast path to acquire the read_lock for searching the PA inode list. Suggested-by: Ritesh Harjani (IBM) Signed-off-by: Ojaswin Mujoo Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/4137bce8f6948fedd8bae134dabae24acfe699c6.1679731817.git.ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o commit a8e38fd37cff911638ac288adb138265f71e50c0 Author: Ojaswin Mujoo Date: Sat Mar 25 13:43:40 2023 +0530 ext4: Convert pa->pa_inode_list and pa->pa_obj_lock into a union ** Splitting pa->pa_inode_list ** Currently, we use the same pa->pa_inode_list to add a pa to either the inode preallocation list or the locality group preallocation list. For better clarity, split this list into a union of 2 list_heads and use either of the them based on the type of pa. ** Splitting pa->pa_obj_lock ** Currently, pa->pa_obj_lock is either assigned &ei->i_prealloc_lock for inode PAs or lg_prealloc_lock for lg PAs, and is then used to lock the lists containing these PAs. Make the distinction between the 2 PA types clear by changing this lock to a union of 2 locks. Explicitly use the pa_lock_node.inode_lock for inode PAs and pa_lock_node.lg_lock for lg PAs. This patch is required so that the locality group preallocation code remains the same as in upcoming patches we are going to make changes to inode preallocation code to move from list to rbtree based implementation. This patch also makes it easier to review the upcoming patches. There are no functional changes in this patch. Suggested-by: Ritesh Harjani (IBM) Signed-off-by: Ojaswin Mujoo Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/1d7ac0557e998c3fc7eef422b52e4bc67bdef2b0.1679731817.git.ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o commit 93cdf49f6eca5e23f6546b8f28457b2e6a6961d9 Author: Ojaswin Mujoo Date: Sat Mar 25 13:43:39 2023 +0530 ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa() When the length of best extent found is less than the length of goal extent we need to make sure that the best extent atleast covers the start of the original request. This is done by adjusting the ac_b_ex.fe_logical (logical start) of the extent. While doing so, the current logic sometimes results in the best extent's logical range overflowing the goal extent. Since this best extent is later added to the inode preallocation list, we have a possibility of introducing overlapping preallocations. This is discussed in detail here [1]. As per Jan's suggestion, to fix this, replace the existing logic with the below logic for adjusting best extent as it keeps fragmentation in check while ensuring logical range of best extent doesn't overflow out of goal extent: 1. Check if best extent can be kept at end of goal range and still cover original start. 2. Else, check if best extent can be kept at start of goal range and still cover original start. 3. Else, keep the best extent at start of original request. Also, add a few extra BUG_ONs that might help catch errors faster. [1] https://lore.kernel.org/r/Y+OGkVvzPN0RMv0O@li-bb2b2a4c-3307-11b2-a85c-8fa5c3a69313.ibm.com Suggested-by: Jan Kara Signed-off-by: Ojaswin Mujoo Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/f96aca6d415b36d1f90db86c1a8cd7e2e9d7ab0e.1679731817.git.ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o commit 0830344c953aeabee91ac88281585756d047df39 Author: Ojaswin Mujoo Date: Sat Mar 25 13:43:38 2023 +0530 ext4: Abstract out overlap fix/check logic in ext4_mb_normalize_request() Abstract out the logic of fixing PA overlaps in ext4_mb_normalize_request to improve readability of code. This also makes it easier to make changes to the overlap logic in future. There are no functional changes in this patch Signed-off-by: Ojaswin Mujoo Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/9b35f3955a1d7b66bbd713eca1e63026e01f78c1.1679731817.git.ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o commit 7692094ac513e48ee37d0f1fb057f3f7f8d53385 Author: Ojaswin Mujoo Date: Sat Mar 25 13:43:37 2023 +0530 ext4: Move overlap assert logic into a separate function Abstract out the logic to double check for overlaps in normalize_pa to a separate function. Since there has been no reports in past where we have seen any overlaps which hits this bug_on(), in future we can consider calling this function under "#ifdef AGGRESSIVE_CHECK" only. There are no functional changes in this patch Signed-off-by: Ojaswin Mujoo Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/35dd5d94fa0b2d1cd2d2947adf8967279c72967d.1679731817.git.ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o commit bcf434992145dd08bb5c8d0bd4bf34811e0a5d78 Author: Ojaswin Mujoo Date: Sat Mar 25 13:43:36 2023 +0530 ext4: Refactor code in ext4_mb_normalize_request() and ext4_mb_use_preallocated() Change some variable names to be more consistent and refactor some of the code to make it easier to read. There are no functional changes in this patch Signed-off-by: Ojaswin Mujoo Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/8edcab489c06cf861b19d87207d9b0ff7ac7f3c1.1679731817.git.ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o commit 820897258ad342e78388ee9f5814fc485e79102a Author: Ojaswin Mujoo Date: Sat Mar 25 13:43:35 2023 +0530 ext4: Refactor code related to freeing PAs This patch makes the following changes: * Rename ext4_mb_pa_free to ext4_mb_pa_put_free to better reflect its purpose * Add new ext4_mb_pa_free() which only handles freeing * Refactor ext4_mb_pa_callback() to use ext4_mb_pa_free() There are no functional changes in this patch Signed-off-by: Ojaswin Mujoo Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/b273bc9cbf5bd278f641fa5bc6c0cc9e6cb3330c.1679731817.git.ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o commit e86a718228b61eef747b8deb446f807b2be73148 Author: Ojaswin Mujoo Date: Sat Mar 25 13:43:34 2023 +0530 ext4: Stop searching if PA doesn't satisfy non-extent file If we come across a PA that matches the logical offset but is unable to satisfy a non-extent file due to its physical start being higher than that supported by non extent files, then simply stop searching for another PA and break out of loop. This is because, since PAs don't overlap, we won't be able to find another inode PA which can satisfy the original request. Signed-off-by: Ojaswin Mujoo Reviewed-by: Ritesh Harjani (IBM) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/42404ca29bd304ae2c962184c3c32a02e8eefcd0.1679731817.git.ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o commit 19b8b035a776939ceb3de0f45aded4751d7849ef Author: Theodore Ts'o Date: Thu Mar 16 17:07:32 2023 -0400 ext4: convert some BUG_ON's in mballoc to use WARN_RATELIMITED instead In cases where we have an obvious way of continuing, let's use WARN_RATELIMITED() instead of BUG_ON(). Signed-off-by: Theodore Ts'o commit 91a48aaf59d0da6b93e49de87420c30aba0acaa8 Author: Kemeng Shi Date: Sun Mar 12 01:09:49 2023 +0800 ext4: avoid unnecessary pointer dereference in ext4_mb_normalize_request Result of EXT4_SB(ac->ac_sb) is already stored in sbi at beginning of ext4_mb_normalize_request. Use sbi instead of EXT4_SB(ac->ac_sb) to remove unnecessary pointer dereference. Signed-off-by: Kemeng Shi Reviewed-by: Ritesh Harjani (IBM) Link: https://lore.kernel.org/r/20230311170949.1047958-3-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 1221b235019f9e3bbc38cfc53f7c03456bee53b4 Author: Kemeng Shi Date: Sun Mar 12 01:09:48 2023 +0800 ext4: fix typos in mballoc pa_plen -> pa_len pa_start -> pa_pstart Signed-off-by: Kemeng Shi Reviewed-by: Ritesh Harjani (IBM) Link: https://lore.kernel.org/r/20230311170949.1047958-2-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 253cacb0de89235673ad5889d61f275a73dbee79 Author: Kemeng Shi Date: Sat Mar 4 01:21:20 2023 +0800 ext4: simplify calculation of blkoff in ext4_mb_new_blocks_simple We try to allocate a block from goal in ext4_mb_new_blocks_simple. We only need get blkoff in first group with goal and set blkoff to 0 for the rest groups. Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230303172120.3800725-21-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 46825e949057481ccb1f0e52c512fd52f1938cb3 Author: Kemeng Shi Date: Sat Mar 4 01:21:19 2023 +0800 ext4: remove comment code ext4_discard_preallocations Just remove comment code in ext4_discard_preallocations. Signed-off-by: Kemeng Shi Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230303172120.3800725-20-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 3a037b1b889745b32c37d876223c7692721e8e95 Author: Kemeng Shi Date: Sat Mar 4 01:21:18 2023 +0800 ext4: remove repeat assignment to ac_f_ex Call trace to assign ac_f_ex: ext4_mb_use_best_found ac->ac_f_ex = ac->ac_b_ex; ext4_mb_new_preallocation ext4_mb_new_group_pa ac->ac_f_ex = ac->ac_b_ex; ext4_mb_new_inode_pa ac->ac_f_ex = ac->ac_b_ex; Actually allocated blocks is already stored in ac_f_ex in ext4_mb_use_best_found, so there is no need to assign ac_f_ex in ext4_mb_new_group_pa and ext4_mb_new_inode_pa. Just remove repeat assignment to ac_f_ex in ext4_mb_new_group_pa and ext4_mb_new_inode_pa. Signed-off-by: Kemeng Shi Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230303172120.3800725-19-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit fb28f9ceec5622803e189a6ced7fdf26b7f17e7f Author: Kemeng Shi Date: Sat Mar 4 01:21:17 2023 +0800 ext4: remove unnecessary goto in ext4_mb_mark_diskspace_used When ext4_read_block_bitmap fails, we can return PTR_ERR(bitmap_bh) to remove unnecessary NULL check of bitmap_bh. Signed-off-by: Kemeng Shi Reviewed-by: Ritesh Harjani (IBM) Link: https://lore.kernel.org/r/20230303172120.3800725-18-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit c7f2bafa3c242d4c69ba347d8983858a5137387b Author: Kemeng Shi Date: Sat Mar 4 01:21:16 2023 +0800 ext4: remove unnecessary count2 in ext4_free_data_in_buddy count2 is always 1 in mb_debug, just remove unnecessary count2. Signed-off-by: Kemeng Shi Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230303172120.3800725-17-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit df11909514c5243a62fcd5e122f40f19f3a7076c Author: Kemeng Shi Date: Sat Mar 4 01:21:15 2023 +0800 ext4: remove unnecessary exit_meta_group_info tag We goto exit_meta_group_info only to return -ENOMEM. Return -ENOMEM directly instead of goto to remove this unnecessary tag. Signed-off-by: Kemeng Shi Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230303172120.3800725-16-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 78dc9f844f4ec999a30517313040948a4c4bbc00 Author: Kemeng Shi Date: Sat Mar 4 01:21:14 2023 +0800 ext4: use best found when complex scan of group finishs If any bex which meets bex->fe_len >= gex->fe_len is found, then it will always be used when complex scan of group that bex belongs to finishs. So there will not be any lock-unlock period. Signed-off-by: Kemeng Shi Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230303172120.3800725-15-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 32c0869370194ae5ac9f9f501953ef693040f6a1 Author: Kemeng Shi Date: Sat Mar 4 01:21:13 2023 +0800 ext4: remove ac->ac_found > sbi->s_mb_min_to_scan dead check in ext4_mb_check_limits Only call trace of ext4_mb_check_limits is as following: ext4_mb_complex_scan_group ext4_mb_measure_extent ext4_mb_check_limits(ac, e4b, 0); ext4_mb_check_limits(ac, e4b, 1); If the first ac->ac_found > sbi->s_mb_max_to_scan check in ext4_mb_check_limits is met, we will set ac_status to AC_STATUS_BREAK and call ext4_mb_try_best_found to try to use ac->ac_b_ex. If ext4_mb_try_best_found successes, then block allocation finishs, the removed ac->ac_found > sbi->s_mb_min_to_scan check is not reachable. If ext4_mb_try_best_found fails, then we set EXT4_MB_HINT_FIRST and reset ac->ac_b_ex to retry block allocation. We will use any found free extent in ext4_mb_measure_extent before reach the removed ac->ac_found > sbi->s_mb_min_to_scan check. In summary, the removed ac->ac_found > sbi->s_mb_min_to_scan check is not reachable and we can remove that dead check. Signed-off-by: Kemeng Shi Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230303172120.3800725-14-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 976620bd261025c86bafe79c15170dc3da7a66f4 Author: Kemeng Shi Date: Sat Mar 4 01:21:12 2023 +0800 ext4: remove dead check in mb_buddy_mark_free We always adjust first to even number and adjust last to odd number, so first == last will never happen. Remove this dead check. Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230303172120.3800725-13-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit aaae558dae6f804407a50e0eaf66c93b46b9a493 Author: Kemeng Shi Date: Sat Mar 4 01:21:11 2023 +0800 ext4: remove unnecessary check in ext4_mb_new_blocks 1. remove unnecessary ac check: We always go to out tag before ac is successfully allocated, then we can move out tag after free of ac and remove NULL check of ac. 2. remove unnecessary *errp check: We always go to errout tag if *errp is non-zero, then we can move errout tag into error handle if *errp is non-zero. Signed-off-by: Kemeng Shi Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230303172120.3800725-12-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 285164b80175157c18a06425cf25591c9f942b1a Author: Kemeng Shi Date: Sat Mar 4 01:21:10 2023 +0800 ext4: remove unnecessary e4b->bd_buddy_page check in ext4_mb_load_buddy_gfp e4b->bd_buddy_page is only set if we initialize ext4_buddy successfully. So e4b->bd_buddy_page is always NULL in error handle branch. Just remove the dead check. Signed-off-by: Kemeng Shi Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230303172120.3800725-11-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 139f46d3b5e69937025faa38cb0a3711b9808158 Author: Kemeng Shi Date: Sat Mar 4 01:21:09 2023 +0800 ext4: Remove unnecessary release when memory allocation failed in ext4_mb_init_cache If we alloc array of buffer_head failed, there is no resource need to be freed and we can simpily return error. Signed-off-by: Kemeng Shi Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230303172120.3800725-10-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 85b67ffb7d2bab27cc6c479e949e6fab7fb41aee Author: Kemeng Shi Date: Sat Mar 4 01:21:08 2023 +0800 ext4: remove unused return value of ext4_mb_try_best_found and ext4_mb_free_metadata Return value static function ext4_mb_try_best_found and ext4_mb_free_metadata is not used. Just remove unused return value. Signed-off-by: Kemeng Shi Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230303172120.3800725-9-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 1b5c9d349455c84e5211354357870f64913b3020 Author: Kemeng Shi Date: Sat Mar 4 01:21:07 2023 +0800 ext4: add missed brelse in ext4_free_blocks_simple Release bitmap buffer_head we got if error occurs. Besides, this patch remove unused assignment to err. Signed-off-by: Kemeng Shi Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230303172120.3800725-8-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 36cb0f52aeb929b141f3f580481eb04c65b6e2b9 Author: Kemeng Shi Date: Sat Mar 4 01:21:06 2023 +0800 ext4: protect pa->pa_free in ext4_discard_allocated_blocks If ext4_mb_mark_diskspace_used fails in ext4_mb_new_blocks, we may discard pa already in list. Protect pa with pa_lock to avoid race. Signed-off-by: Kemeng Shi Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230303172120.3800725-7-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 1afdc5889427110c8466da2b23360a27be711ff0 Author: Kemeng Shi Date: Sat Mar 4 01:21:05 2023 +0800 ext4: correct start of used group pa for debug in ext4_mb_use_group_pa As we don't correct pa_lstart here, so there is no need to subtract pa_lstart with consumed len. Signed-off-by: Kemeng Shi Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230303172120.3800725-6-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit abc075d4a5dc48b68bd44b5ecb4e44e936d01195 Author: Kemeng Shi Date: Sat Mar 4 01:21:04 2023 +0800 ext4: correct calculation of s_mb_preallocated We will add pa_free to s_mb_preallocated when new ext4_prealloc_space is created. In ext4_mb_new_inode_pa, we will call ext4_mb_use_inode_pa before adding pa_free to s_mb_preallocated. However, ext4_mb_use_inode_pa will consume pa_free for block allocation which triggerred the creation of ext4_prealloc_space. Add pa_free to s_mb_preallocated before ext4_mb_use_inode_pa to correct calculation of s_mb_preallocated. There is no such problem in ext4_mb_new_group_pa as pa_free of group pa is consumed in ext4_mb_release_context instead of ext4_mb_use_group_pa. Signed-off-by: Kemeng Shi Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230303172120.3800725-5-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 22fab984025313198559278814147c57901106f6 Author: Kemeng Shi Date: Sat Mar 4 01:21:03 2023 +0800 ext4: get correct ext4_group_info in ext4_mb_prefetch_fini We always get ext4_group_desc with group + 1 and ext4_group_info with group to check if we need do initialize ext4_group_info for the group. Just get ext4_group_desc with group for ext4_group_info initialization check. Signed-off-by: Ritesh Harjani (IBM) Signed-off-by: Ojaswin Mujoo Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230303172120.3800725-4-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 01e4ca29451760b9ac10b4cdc231c52150842643 Author: Kemeng Shi Date: Sat Mar 4 01:21:02 2023 +0800 ext4: allow to find by goal if EXT4_MB_HINT_GOAL_ONLY is set If EXT4_MB_HINT_GOAL_ONLY is set, ext4_mb_regular_allocator will only allocate blocks from ext4_mb_find_by_goal. Allow to find by goal in ext4_mb_find_by_goal if EXT4_MB_HINT_GOAL_ONLY is set or allocation with EXT4_MB_HINT_GOAL_ONLY set will always fail. EXT4_MB_HINT_GOAL_ONLY is not used at all, so the problem is not found for now. Signed-off-by: Kemeng Shi Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20230303172120.3800725-3-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit b07ffe6927c75d99af534d685282ea188d9f71a6 Author: Kemeng Shi Date: Sat Mar 4 01:21:01 2023 +0800 ext4: set goal start correctly in ext4_mb_normalize_request We need to set ac_g_ex to notify the goal start used in ext4_mb_find_by_goal. Set ac_g_ex instead of ac_f_ex in ext4_mb_normalize_request. Besides we should assure goal start is in range [first_data_block, blocks_count) as ext4_mb_initialize_context does. [ Added a check to make sure size is less than ar->pright; otherwise we could end up passing an underflowed value of ar->pright - size to ext4_get_group_no_and_offset(), which will trigger a BUG_ON later on. - TYT ] Signed-off-by: Kemeng Shi Reviewed-by: Ritesh Harjani (IBM) Link: https://lore.kernel.org/r/20230303172120.3800725-2-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 34bf93472f8fb60b4189aa2872471017e739cf0a Author: Viktor Malik Date: Thu Mar 30 12:20:01 2023 +0200 kallsyms: move module-related functions under correct configs Functions for searching module kallsyms should have non-empty definitions only if CONFIG_MODULES=y and CONFIG_KALLSYMS=y. Until now, only CONFIG_MODULES check was used for many of these, which may have caused complilation errors on some configs. This patch moves all relevant functions under the correct configs. Fixes: bd5314f8dd2d ("kallsyms, bpf: Move find_kallsyms_symbol_value out of internal header") Signed-off-by: Viktor Malik Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303181535.RFDCnz3E-lkp@intel.com/ Link: https://lore.kernel.org/r/20230330102001.2183693-1-vmalik@redhat.com Signed-off-by: Alexei Starovoitov commit c6ebae4ccc43aaf279e36bb9bbe627137d7e88e1 Merge: 5af607a861d43 7319296855f1b Author: Alexei Starovoitov Date: Wed Apr 5 21:27:27 2023 -0700 Merge branch 'bpftool: Add inline annotations when dumping program CFGs' Quentin Monnet says: ==================== This set contains some improvements for bpftool's "visual" program dump option, which produces the control flow graph in a DOT format. The main objective is to add support for inline annotations on such graphs, so that we can have the C source code for the program showing up alongside the instructions, when available. The last commits also make it possible to display the line numbers or the bare opcodes in the graph, as supported by regular program dumps. v3: - Fixed formatting of DOT graph: escape spaces, and remove indent that would cause some unwanted spaces to show up in the resulting graph. - Don't print line information if the record is empty. - Add '<' and ' ' to the list of escaped characters for generting the DOT graph. - Truncate long file paths, use shorter field names ("line", "col") for code location information in the graph, add missing separator space. - Add a commit to return an error if JSON output and CFG are both required. - Add a drive-by, clean up commit for bash completion (avoid unnecessary calls to _bpftool_once_attr()). v2: Replace fputc(..., stdout) with putchar(...) in dotlabel_puts(). ==================== Signed-off-by: Alexei Starovoitov commit 7319296855f1bac0e7fb003388f44ecbd4515102 Author: Quentin Monnet Date: Wed Apr 5 14:21:20 2023 +0100 bpftool: Clean up _bpftool_once_attr() calls in bash completion In bpftool's bash completion file, function _bpftool_once_attr() is able to process multiple arguments. There are a few locations where this function is called multiple times in a row, each time for a single argument; let's pass all arguments instead to minimize the number of function calls required for the completion. Signed-off-by: Quentin Monnet Link: https://lore.kernel.org/r/20230405132120.59886-8-quentin@isovalent.com Signed-off-by: Alexei Starovoitov commit 7483a7a70a12d7c00c9f80574d533b01689d39a7 Author: Quentin Monnet Date: Wed Apr 5 14:21:19 2023 +0100 bpftool: Support printing opcodes and source file references in CFG Add support for displaying opcodes or/and file references (filepath, line and column numbers) when dumping the control flow graphs of loaded BPF programs with bpftool. The filepaths in the records are absolute. To avoid blocks on the graph to get too wide, we truncate them when they get too long (but we always keep the entire file name). In the unlikely case where the resulting file name is ambiguous, it remains possible to get the full path with a regular dump (no CFG). Signed-off-by: Quentin Monnet Link: https://lore.kernel.org/r/20230405132120.59886-7-quentin@isovalent.com Signed-off-by: Alexei Starovoitov commit 9b79f02722bbf24f060b2ab79513ad6e22c8e2f0 Author: Quentin Monnet Date: Wed Apr 5 14:21:18 2023 +0100 bpftool: Support "opcodes", "linum", "visual" simultaneously When dumping a program, the keywords "opcodes" (for printing the raw opcodes), "linum" (for displaying the filename, line number, column number along with the source code), and "visual" (for generating the control flow graph for translated programs) are mutually exclusive. But there's no reason why they should be. Let's make it possible to pass several of them at once. The "file FILE" option, which makes bpftool output a binary image to a file, remains incompatible with the others. Signed-off-by: Quentin Monnet Link: https://lore.kernel.org/r/20230405132120.59886-6-quentin@isovalent.com Signed-off-by: Alexei Starovoitov commit 05a06be722896e51f65dbbb6a3610f85a8353d6b Author: Quentin Monnet Date: Wed Apr 5 14:21:17 2023 +0100 bpftool: Return an error on prog dumps if both CFG and JSON are required We do not support JSON output for control flow graphs of programs with bpftool. So far, requiring both the CFG and JSON output would result in producing a null JSON object. It makes more sense to raise an error directly when parsing command line arguments and options, so that users know they won't get any output they might expect. If JSON is required for the graph, we leave it to Graphviz instead: # bpftool prog dump xlated visual | dot -Tjson Suggested-by: Eduard Zingerman Signed-off-by: Quentin Monnet Link: https://lore.kernel.org/r/20230405132120.59886-5-quentin@isovalent.com Signed-off-by: Alexei Starovoitov commit 9fd496848b1c4cd04fee5f152bb7bcec11e1b901 Author: Quentin Monnet Date: Wed Apr 5 14:21:16 2023 +0100 bpftool: Support inline annotations when dumping the CFG of a program We support dumping the control flow graph of loaded programs to the DOT format with bpftool, but so far this feature wouldn't display the source code lines available through BTF along with the eBPF bytecode. Let's add support for these annotations, to make it easier to read the graph. In prog.c, we move the call to dump_xlated_cfg() in order to pass and use the full struct dump_data, instead of creating a minimal one in draw_bb_node(). We pass the pointer to this struct down to dump_xlated_for_graph() in xlated_dumper.c, where most of the logics is added. We deal with BTF mostly like we do for plain or JSON output, except that we cannot use a "nr_skip" value to skip a given number of linfo records (we don't process the BPF instructions linearly, and apart from the root of the graph we don't know how many records we should skip, so we just store the last linfo and make sure the new one we find is different before printing it). When printing the source instructions to the label of a DOT graph node, there are a few subtleties to address. We want some special newline markers, and there are some characters that we must escape. To deal with them, we introduce a new dedicated function btf_dump_linfo_dotlabel() in btf_dumper.c. We'll reuse this function in a later commit to format the filepath, line, and column references as well. Signed-off-by: Quentin Monnet Link: https://lore.kernel.org/r/20230405132120.59886-4-quentin@isovalent.com Signed-off-by: Alexei Starovoitov commit 67cf52cdb6c8fa6365d29106555dacf95c9fd374 Author: Quentin Monnet Date: Wed Apr 5 14:21:15 2023 +0100 bpftool: Fix bug for long instructions in program CFG dumps When dumping the control flow graphs for programs using the 16-byte long load instruction, we need to skip the second part of this instruction when looking for the next instruction to process. Otherwise, we end up printing "BUG_ld_00" from the kernel disassembler in the CFG. Fixes: efcef17a6d65 ("tools: bpftool: generate .dot graph from CFG information") Signed-off-by: Quentin Monnet Link: https://lore.kernel.org/r/20230405132120.59886-3-quentin@isovalent.com Signed-off-by: Alexei Starovoitov commit e27f0f1620b693ecf312c21ff8a52affb8a5be08 Author: Quentin Monnet Date: Wed Apr 5 14:21:14 2023 +0100 bpftool: Fix documentation about line info display for prog dumps The documentation states that when line_info is available when dumping a program, the source line will be displayed "by default". There is no notion of "default" here: the line is always displayed if available, there is no way currently to turn it off. In the next sentence, the documentation states that if "linum" is used on the command line, the relevant filename, line, and column will be displayed "on top of the source line". This is incorrect, as they are currently displayed on the right side of the source line (or on top of the eBPF instruction, not the source). This commit fixes the documentation to address these points. Signed-off-by: Quentin Monnet Link: https://lore.kernel.org/r/20230405132120.59886-2-quentin@isovalent.com Signed-off-by: Alexei Starovoitov commit 38be89514b88f53ff772d1e016a68b59814aef72 Author: Uwe Kleine-König Date: Tue Mar 21 16:40:39 2023 +0100 rpmsg: qcom_smd: 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 (mostly) ignored 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. qcom_smd_remove() always returned zero, though that isn't completely trivial to see. So explain that in a comment and convert to .remove_new(). Signed-off-by: Uwe Kleine-König Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230321154039.355098-4-u.kleine-koenig@pengutronix.de commit 49446e573bf591eef71c1e8c7cf87ec19aa2569f Author: Uwe Kleine-König Date: Tue Mar 21 16:40:38 2023 +0100 rpmsg: qcom_glink_rpm: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230321154039.355098-3-u.kleine-koenig@pengutronix.de commit 810c03d9d7c978b4ee5287d8987043a9be1d614e Author: Uwe Kleine-König Date: Tue Mar 21 16:40:37 2023 +0100 rpmsg: qcom_smd: Make qcom_smd_unregister_edge() return void This function returned zero unconditionally. Convert it to return no value instead. This makes it more obvious what happens in the callers. One caller is converted to return zero explicitly. The only other caller (smd_subdev_stop() in drivers/remoteproc/qcom_common.c) already ignored the return value before. Signed-off-by: Uwe Kleine-König Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230321154039.355098-2-u.kleine-koenig@pengutronix.de commit 74c53b5717ba762d8648ee9e3d961093df2d7300 Author: Lukas Bulwahn Date: Thu Mar 30 13:07:10 2023 +0200 csky: remove obsolete config CPU_TLB_SIZE Commit 9d35dc3006a9 ("csky: Revert mmu ASID mechanism") removes the only use of CONFIG_CPU_TLB_SIZE. Since then, this config has no effect and can be deleted. Remove the obsolete config CPU_TLB_SIZE. Signed-off-by: Lukas Bulwahn Signed-off-by: Guo Ren commit d46031f40e0f7f7bf63914bb3f2e404ad3886ecd Author: Raghavendra K T Date: Wed Mar 1 17:49:03 2023 +0530 sched/numa: use hash_32 to mix up PIDs accessing VMA before: last 6 bits of PID is used as index to store information about tasks accessing VMA's. after: hash_32 is used to take of cases where tasks are created over a period of time, and thus improve collision probability. Result: The patch series overall improves autonuma cost. Kernbench around more than 5% improvement and system time in mmtest autonuma showed more than 80% improvement Link: https://lkml.kernel.org/r/d5a9f75513300caed74e5c8570bba9317b963c2b.1677672277.git.raghavendra.kt@amd.com Signed-off-by: Raghavendra K T Suggested-by: Peter Zijlstra Cc: Bharata B Rao Cc: David Hildenbrand Cc: Disha Talreja Cc: Ingo Molnar Cc: Mel Gorman Cc: Mike Rapoport Signed-off-by: Andrew Morton commit 20f586486b87dcfe10b8c79398e24e720885588a Author: Raghavendra K T Date: Wed Mar 1 17:49:02 2023 +0530 sched/numa: implement access PID reset logic This helps to ensure that only recently accessed PIDs scan the VMAs. Current implementation: (idea supported by PeterZ) 1. Accessing PID information is maintained in two windows. access_pids[1] being newest. 2. Reset old access PID info i.e. access_pid[0] every (4 * sysctl_numa_balancing_scan_delay) interval after initial scan delay period expires. The above interval seemed to be experimentally optimum since it avoids frequent reset of access info as well as helps clearing the old access info regularly. The reset logic is implemented in scan path. Link: https://lkml.kernel.org/r/f7a675f66d1442d048b4216b2baf94515012c405.1677672277.git.raghavendra.kt@amd.com Signed-off-by: Raghavendra K T Suggested-by: Mel Gorman Cc: Bharata B Rao Cc: David Hildenbrand Cc: Disha Talreja Cc: Ingo Molnar Cc: Mike Rapoport Cc: Peter Zijlstra Signed-off-by: Andrew Morton commit fc137c0ddab29b591db6a091dc6d7ce20ccb73f2 Author: Raghavendra K T Date: Wed Mar 1 17:49:01 2023 +0530 sched/numa: enhance vma scanning logic During Numa scanning make sure only relevant vmas of the tasks are scanned. Before: All the tasks of a process participate in scanning the vma even if they do not access vma in it's lifespan. Now: Except cases of first few unconditional scans, if a process do not touch vma (exluding false positive cases of PID collisions) tasks no longer scan all vma Logic used: 1) 6 bits of PID used to mark active bit in vma numab status during fault to remember PIDs accessing vma. (Thanks Mel) 2) Subsequently in scan path, vma scanning is skipped if current PID had not accessed vma. 3) First two times we do allow unconditional scan to preserve earlier behaviour of scanning. Acknowledgement to Bharata B Rao for initial patch to store pid information and Peter Zijlstra (Usage of test and set bit) Link: https://lkml.kernel.org/r/092f03105c7c1d3450f4636b1ea350407f07640e.1677672277.git.raghavendra.kt@amd.com Signed-off-by: Raghavendra K T Suggested-by: Mel Gorman Cc: David Hildenbrand Cc: Disha Talreja Cc: Ingo Molnar Cc: Mike Rapoport Signed-off-by: Andrew Morton commit ef6a22b70f6d90449a5c797b8968a682824e2011 Author: Mel Gorman Date: Wed Mar 1 17:49:00 2023 +0530 sched/numa: apply the scan delay to every new vma Pach series "sched/numa: Enhance vma scanning", v3. The patchset proposes one of the enhancements to numa vma scanning suggested by Mel. This is continuation of [3]. Reposting the rebased patchset to akpm mm-unstable tree (March 1) Existing mechanism of scan period involves, scan period derived from per-thread stats. Process Adaptive autoNUMA [1] proposed to gather NUMA fault stats at per-process level to capture aplication behaviour better. During that course of discussion, Mel proposed several ideas to enhance current numa balancing. One of the suggestion was below Track what threads access a VMA. The suggestion was to use an unsigned long pid_mask and use the lower bits to tag approximately what threads access a VMA. Skip VMAs that did not trap a fault. This would be approximate because of PID collisions but would reduce scanning of areas the thread is not interested in. The above suggestion intends not to penalize threads that has no interest in the vma, thus reduce scanning overhead. V3 changes are mostly based on PeterZ comments (details below in changes) Summary of patchset: Current patchset implements: 1. Delay the vma scanning logic for newly created VMA's so that additional overhead of scanning is not incurred for short lived tasks (implementation by Mel) 2. Store the information of tasks accessing VMA in 2 windows. It is regularly cleared in (4*sysctl_numa_balancing_scan_delay) interval. The above time is derived from experimenting (Suggested by PeterZ) to balance between frequent clearing vs obsolete access data 3. hash_32 used to encode task index accessing VMA information 4. VMA's acess information is used to skip scanning for the tasks which had not accessed VMA Changes since V2: patch1: - Renaming of structure, macro to function, - Add explanation to heuristics - Adding more details from result (PeterZ) Patch2: - Usage of test and set bit (PeterZ) - Move storing access PID info to numa_migrate_prep() - Add a note on fainess among tasks allowed to scan (PeterZ) Patch3: - Maintain two windows of access PID information (PeterZ supported implementation and Gave idea to extend to N if needed) Patch4: - Apply hash_32 function to track VMA accessing PIDs (PeterZ) Changes since RFC V1: - Include Mel's vma scan delay patch - Change the accessing pid store logic (Thanks Mel) - Fencing structure / code to NUMA_BALANCING (David, Mel) - Adding clearing access PID logic (Mel) - Descriptive change log ( Mike Rapoport) Things to ponder over: ========================================== - Improvement to clearing accessing PIDs logic (discussed in-detail in patch3 itself (Done in this patchset by implementing 2 window history) - Current scan period is not changed in the patchset, so we do see frequent tries to scan. Relaxing scan period dynamically could improve results further. [1] sched/numa: Process Adaptive autoNUMA Link: https://lore.kernel.org/lkml/20220128052851.17162-1-bharata@amd.com/T/ [2] RFC V1 Link: https://lore.kernel.org/all/cover.1673610485.git.raghavendra.kt@amd.com/ [3] V2 Link: https://lore.kernel.org/lkml/cover.1675159422.git.raghavendra.kt@amd.com/ Results: Summary: Huge autonuma cost reduction seen in mmtest. Kernbench improvement is more than 5% and huge system time (80%+) improvement from mmtest autonuma. (dbench had huge std deviation to post) kernbench =========== 6.2.0-mmunstable-base 6.2.0-mmunstable-patched Amean user-256 22002.51 ( 0.00%) 22649.95 * -2.94%* Amean syst-256 10162.78 ( 0.00%) 8214.13 * 19.17%* Amean elsp-256 160.74 ( 0.00%) 156.92 * 2.38%* Duration User 66017.43 67959.84 Duration System 30503.15 24657.03 Duration Elapsed 504.61 493.12 6.2.0-mmunstable-base 6.2.0-mmunstable-patched Ops NUMA alloc hit 1738835089.00 1738780310.00 Ops NUMA alloc local 1738834448.00 1738779711.00 Ops NUMA base-page range updates 477310.00 392566.00 Ops NUMA PTE updates 477310.00 392566.00 Ops NUMA hint faults 96817.00 87555.00 Ops NUMA hint local faults % 10150.00 2192.00 Ops NUMA hint local percent 10.48 2.50 Ops NUMA pages migrated 86660.00 85363.00 Ops AutoNUMA cost 489.07 442.14 autonumabench =============== 6.2.0-mmunstable-base 6.2.0-mmunstable-patched Amean syst-NUMA01 399.50 ( 0.00%) 52.05 * 86.97%* Amean syst-NUMA01_THREADLOCAL 0.21 ( 0.00%) 0.22 * -5.41%* Amean syst-NUMA02 0.80 ( 0.00%) 0.78 * 2.68%* Amean syst-NUMA02_SMT 0.65 ( 0.00%) 0.68 * -3.95%* Amean elsp-NUMA01 313.26 ( 0.00%) 313.11 * 0.05%* Amean elsp-NUMA01_THREADLOCAL 1.06 ( 0.00%) 1.08 * -1.76%* Amean elsp-NUMA02 3.19 ( 0.00%) 3.24 * -1.52%* Amean elsp-NUMA02_SMT 3.72 ( 0.00%) 3.61 * 2.92%* Duration User 396433.47 324835.96 Duration System 2808.70 376.66 Duration Elapsed 2258.61 2258.12 6.2.0-mmunstable-base 6.2.0-mmunstable-patched Ops NUMA alloc hit 59921806.00 49623489.00 Ops NUMA alloc miss 0.00 0.00 Ops NUMA interleave hit 0.00 0.00 Ops NUMA alloc local 59920880.00 49622594.00 Ops NUMA base-page range updates 152259275.00 50075.00 Ops NUMA PTE updates 152259275.00 50075.00 Ops NUMA PMD updates 0.00 0.00 Ops NUMA hint faults 154660352.00 39014.00 Ops NUMA hint local faults % 138550501.00 23139.00 Ops NUMA hint local percent 89.58 59.31 Ops NUMA pages migrated 8179067.00 14147.00 Ops AutoNUMA cost 774522.98 195.69 This patch (of 4): Currently whenever a new task is created we wait for sysctl_numa_balancing_scan_delay to avoid unnessary scanning overhead. Extend the same logic to new or very short-lived VMAs. [raghavendra.kt@amd.com: add initialization in vm_area_dup())] Link: https://lkml.kernel.org/r/cover.1677672277.git.raghavendra.kt@amd.com Link: https://lkml.kernel.org/r/7a6fbba87c8b51e67efd3e74285bb4cb311a16ca.1677672277.git.raghavendra.kt@amd.com Signed-off-by: Mel Gorman Signed-off-by: Raghavendra K T Cc: Bharata B Rao Cc: David Hildenbrand Cc: Ingo Molnar Cc: Mike Rapoport Cc: Peter Zijlstra Cc: Disha Talreja Signed-off-by: Andrew Morton commit e06f47a16573decc57498f2d02f9af3bb3e84cf2 Author: Heiko Carstens Date: Tue Mar 14 14:28:08 2023 +0100 s390/mm: try VMA lock-based page fault handling first Attempt VMA lock-based page fault handling first, and fall back to the existing mmap_lock-based handling if that fails. This is the s390 variant of "x86/mm: try VMA lock-based page fault handling first". Link: https://lkml.kernel.org/r/20230314132808.1266335-1-hca@linux.ibm.com Signed-off-by: Heiko Carstens Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Gerald Schaefer Cc: Suren Baghdasaryan Cc: Sven Schnelle Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit c7f8f31c00d187a2c71a241c7f2bd6aa102a4e6f Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:32 2023 -0800 mm: separate vma->lock from vm_area_struct vma->lock being part of the vm_area_struct causes performance regression during page faults because during contention its count and owner fields are constantly updated and having other parts of vm_area_struct used during page fault handling next to them causes constant cache line bouncing. Fix that by moving the lock outside of the vm_area_struct. All attempts to keep vma->lock inside vm_area_struct in a separate cache line still produce performance regression especially on NUMA machines. Smallest regression was achieved when lock is placed in the fourth cache line but that bloats vm_area_struct to 256 bytes. Considering performance and memory impact, separate lock looks like the best option. It increases memory footprint of each VMA but that can be optimized later if the new size causes issues. Note that after this change vma_init() does not allocate or initialize vma->lock anymore. A number of drivers allocate a pseudo VMA on the stack but they never use the VMA's lock, therefore it does not need to be allocated. The future drivers which might need the VMA lock should use vm_area_alloc()/vm_area_free() to allocate the VMA. Link: https://lkml.kernel.org/r/20230227173632.3292573-34-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 0d2ebf9c3f7822e7ba3e4792ea3b6b19aa2da34a Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:31 2023 -0800 mm/mmap: free vm_area_struct without call_rcu in exit_mmap call_rcu() can take a long time when callback offloading is enabled. Its use in the vm_area_free can cause regressions in the exit path when multiple VMAs are being freed. Because exit_mmap() is called only after the last mm user drops its refcount, the page fault handlers can't be racing with it. Any other possible user like oom-reaper or process_mrelease are already synchronized using mmap_lock. Therefore exit_mmap() can free VMAs directly, without the use of call_rcu(). Expose __vm_area_free() and use it from exit_mmap() to avoid possible call_rcu() floods and performance regressions caused by it. Link: https://lkml.kernel.org/r/20230227173632.3292573-33-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 70d4cbc80c88251de0a5b3e8df3275901f1fa99a Author: Laurent Dufour Date: Mon Feb 27 09:36:30 2023 -0800 powerc/mm: try VMA lock-based page fault handling first Attempt VMA lock-based page fault handling first, and fall back to the existing mmap_lock-based handling if that fails. Copied from "x86/mm: try VMA lock-based page fault handling first" [ldufour@linux.ibm.com: powerpc/mm: fix mmap_lock bad unlock] Link: https://lkml.kernel.org/r/20230306154244.17560-1-ldufour@linux.ibm.com Link: https://lore.kernel.org/linux-mm/842502FB-F99C-417C-9648-A37D0ECDC9CE@linux.ibm.com Link: https://lkml.kernel.org/r/20230227173632.3292573-32-surenb@google.com Signed-off-by: Laurent Dufour Signed-off-by: Suren Baghdasaryan Cc: Sachin Sant Signed-off-by: Andrew Morton commit cd7f176aea5f5929a09a91c661a26912cc995d1b Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:29 2023 -0800 arm64/mm: try VMA lock-based page fault handling first Attempt VMA lock-based page fault handling first, and fall back to the existing mmap_lock-based handling if that fails. Link: https://lkml.kernel.org/r/20230227173632.3292573-31-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 0bff0aaea03e2a3ed6bfa302155cca8a432a1829 Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:28 2023 -0800 x86/mm: try VMA lock-based page fault handling first Attempt VMA lock-based page fault handling first, and fall back to the existing mmap_lock-based handling if that fails. Link: https://lkml.kernel.org/r/20230227173632.3292573-30-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 52f238653e452e0fda61e880f263a173d219acd1 Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:27 2023 -0800 mm: introduce per-VMA lock statistics Add a new CONFIG_PER_VMA_LOCK_STATS config option to dump extra statistics about handling page fault under VMA lock. Link: https://lkml.kernel.org/r/20230227173632.3292573-29-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 444eeb17437a0ef526c606e9141a415d3b7dfddd Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:26 2023 -0800 mm: prevent userfaults to be handled under per-vma lock Due to the possibility of handle_userfault dropping mmap_lock, avoid fault handling under VMA lock and retry holding mmap_lock. This can be handled more gracefully in the future. Link: https://lkml.kernel.org/r/20230227173632.3292573-28-surenb@google.com Signed-off-by: Suren Baghdasaryan Suggested-by: Peter Xu Signed-off-by: Andrew Morton commit 17c05f18e54158a3eed0c22c85b7a756b63dcc01 Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:25 2023 -0800 mm: prevent do_swap_page from handling page faults under VMA lock Due to the possibility of do_swap_page dropping mmap_lock, abort fault handling under VMA lock and retry holding mmap_lock. This can be handled more gracefully in the future. Link: https://lkml.kernel.org/r/20230227173632.3292573-27-surenb@google.com Signed-off-by: Suren Baghdasaryan Reviewed-by: Laurent Dufour Signed-off-by: Andrew Morton commit 55324e46eb8b886ecd08c9a089d3a694c705b3b0 Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:24 2023 -0800 mm: add FAULT_FLAG_VMA_LOCK flag Add a new flag to distinguish page faults handled under protection of per-vma lock. [surenb@google.com: document FAULT_FLAG_VMA_LOCK flag] Link: https://lkml.kernel.org/r/20230301022720.1380780-2-surenb@google.com Link: https://lore.kernel.org/all/20230301113648.7c279865@canb.auug.org.au/ Link: https://lkml.kernel.org/r/20230227173632.3292573-26-surenb@google.com Signed-off-by: Suren Baghdasaryan Reviewed-by: Laurent Dufour Cc: Dan Carpenter Cc: David Hildenbrand Cc: David Howells Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: Liam R. Howlett Cc: Mathieu Desnoyers Cc: Matthew Wilcox Cc: Pavel Tatashin Cc: Yu Zhao Signed-off-by: Andrew Morton commit 2ac0af1b66e3b66307f53b1cc446514308ec466d Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:23 2023 -0800 mm: fall back to mmap_lock if vma->anon_vma is not yet set When vma->anon_vma is not set, page fault handler will set it by either reusing anon_vma of an adjacent VMA if VMAs are compatible or by allocating a new one. find_mergeable_anon_vma() walks VMA tree to find a compatible adjacent VMA and that requires not only the faulting VMA to be stable but also the tree structure and other VMAs inside that tree. Therefore locking just the faulting VMA is not enough for this search. Fall back to taking mmap_lock when vma->anon_vma is not set. This situation happens only on the first page fault and should not affect overall performance. Link: https://lkml.kernel.org/r/20230227173632.3292573-25-surenb@google.com Signed-off-by: Suren Baghdasaryan Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Andrew Morton commit 50ee32537206140e4cf6e47024be29a84d458d49 Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:22 2023 -0800 mm: introduce lock_vma_under_rcu to be used from arch-specific code Introduce lock_vma_under_rcu function to lookup and lock a VMA during page fault handling. When VMA is not found, can't be locked or changes after being locked, the function returns NULL. The lookup is performed under RCU protection to prevent the found VMA from being destroyed before the VMA lock is acquired. VMA lock statistics are updated according to the results. For now only anonymous VMAs can be searched this way. In other cases the function returns NULL. Link: https://lkml.kernel.org/r/20230227173632.3292573-24-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 457f67be5910a2b5f1fda8af06bfe4d3492a0a4f Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:21 2023 -0800 mm: introduce vma detached flag Per-vma locking mechanism will search for VMA under RCU protection and then after locking it, has to ensure it was not removed from the VMA tree after we found it. To make this check efficient, introduce a vma->detached flag to mark VMAs which were removed from the VMA tree. Link: https://lkml.kernel.org/r/20230227173632.3292573-23-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit eeff9a5d47f89bc641034fea05501c8a6de131cb Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:20 2023 -0800 mm/mmap: prevent pagefault handler from racing with mmu_notifier registration Page fault handlers might need to fire MMU notifications while a new notifier is being registered. Modify mm_take_all_locks to write-lock all VMAs and prevent this race with page fault handlers that would hold VMA locks. VMAs are locked before i_mmap_rwsem and anon_vma to keep the same locking order as in page fault handlers. Link: https://lkml.kernel.org/r/20230227173632.3292573-22-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit f2e13784c16a98e269b3111ac02ae44446dd589c Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:19 2023 -0800 kernel/fork: assert no VMA readers during its destruction Assert there are no holders of VMA lock for reading when it is about to be destroyed. Link: https://lkml.kernel.org/r/20230227173632.3292573-21-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 98e51a2239d9d419d819cd61a2e720ebf19a8b0a Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:18 2023 -0800 mm: conditionally write-lock VMA in free_pgtables Normally free_pgtables needs to lock affected VMAs except for the case when VMAs were isolated under VMA write-lock. munmap() does just that, isolating while holding appropriate locks and then downgrading mmap_lock and dropping per-VMA locks before freeing page tables. Add a parameter to free_pgtables for such scenario. Link: https://lkml.kernel.org/r/20230227173632.3292573-20-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 73046fd00b069ffd198eda099dae966e152fae39 Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:17 2023 -0800 mm: write-lock VMAs before removing them from VMA tree Write-locking VMAs before isolating them ensures that page fault handlers don't operate on isolated VMAs. [surenb@google.com: mm/nommu: remove unnecessary VMA locking] Link: https://lkml.kernel.org/r/20230301190457.1498985-1-surenb@google.com Link: https://lore.kernel.org/all/Y%2F8CJQGNuMUTdLwP@localhost/ Link: https://lkml.kernel.org/r/20230227173632.3292573-19-surenb@google.com Signed-off-by: Suren Baghdasaryan Cc: David Hildenbrand Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Andrew Morton commit d6ac235de4ba6dc659eebb5f4e5ba0a8523d8424 Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:16 2023 -0800 mm/mremap: write-lock VMA while remapping it to a new address range Write-lock VMA as locked before copying it and when copy_vma produces a new VMA. Link: https://lkml.kernel.org/r/20230227173632.3292573-18-surenb@google.com Signed-off-by: Suren Baghdasaryan Reviewed-by: Laurent Dufour Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Andrew Morton commit 10fca64a661199910c7d13077e9678c9a06bf285 Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:15 2023 -0800 mm/mmap: write-lock VMAs in vma_prepare before modifying them Write-lock all VMAs which might be affected by a merge, split, expand or shrink operations. All these operations use vma_prepare() before making the modifications, therefore it provides a centralized place to perform VMA locking. [surenb@google.com: remove unnecessary vp->vma check in vma_prepare] Link: https://lkml.kernel.org/r/20230301022720.1380780-1-surenb@google.com Link: https://lore.kernel.org/r/202302281802.J93Nma7q-lkp@intel.com/ Link: https://lkml.kernel.org/r/20230227173632.3292573-17-surenb@google.com Signed-off-by: Suren Baghdasaryan Reviewed-by: David Hildenbrand Reviewed-by: Liam R. Howlett Cc: David Howells Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: Laurent Dufour Cc: Mathieu Desnoyers Cc: Matthew Wilcox Cc: Pavel Tatashin Cc: Stephen Rothwell Cc: Yu Zhao Signed-off-by: Andrew Morton commit 55fd6fccad3172c0feaaa817f0a1283629ff183e Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:14 2023 -0800 mm/khugepaged: write-lock VMA while collapsing a huge page Protect VMA from concurrent page fault handler while collapsing a huge page. Page fault handler needs a stable PMD to use PTL and relies on per-VMA lock to prevent concurrent PMD changes. pmdp_collapse_flush(), set_huge_pmd() and collapse_and_free_pmd() can modify a PMD, which will not be detected by a page fault handler without proper locking. Before this patch, page tables can be walked under any one of the mmap_lock, the mapping lock, and the anon_vma lock; so when khugepaged unlinks and frees page tables, it must ensure that all of those either are locked or don't exist. This patch adds a fourth lock under which page tables can be traversed, and so khugepaged must also lock out that one. [surenb@google.com: vm_lock/i_mmap_rwsem inversion in retract_page_tables] Link: https://lkml.kernel.org/r/20230303213250.3555716-1-surenb@google.com [surenb@google.com: build fix] Link: https://lkml.kernel.org/r/CAJuCfpFjWhtzRE1X=J+_JjgJzNKhq-=JT8yTBSTHthwp0pqWZw@mail.gmail.com Link: https://lkml.kernel.org/r/20230227173632.3292573-16-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit ccf1d78d8b86e28502fa1b575a459a402177def4 Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:13 2023 -0800 mm/mmap: move vma_prepare before vma_adjust_trans_huge vma_prepare() acquires all locks required before VMA modifications. Move vma_prepare() before vma_adjust_trans_huge() so that VMA is locked before any modification. Link: https://lkml.kernel.org/r/20230227173632.3292573-15-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit c732293331a22187d59cd485879276a1da398387 Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:12 2023 -0800 mm: mark VMA as being written when changing vm_flags Updates to vm_flags have to be done with VMA marked as being written for preventing concurrent page faults or other modifications. Link: https://lkml.kernel.org/r/20230227173632.3292573-14-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 5e31275cc997f8ec5d9e8d65fe9840ebed89db19 Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:11 2023 -0800 mm: add per-VMA lock and helper functions to control it Introduce per-VMA locking. The lock implementation relies on a per-vma and per-mm sequence counters to note exclusive locking: - read lock - (implemented by vma_start_read) requires the vma (vm_lock_seq) and mm (mm_lock_seq) sequence counters to differ. If they match then there must be a vma exclusive lock held somewhere. - read unlock - (implemented by vma_end_read) is a trivial vma->lock unlock. - write lock - (vma_start_write) requires the mmap_lock to be held exclusively and the current mm counter is assigned to the vma counter. This will allow multiple vmas to be locked under a single mmap_lock write lock (e.g. during vma merging). The vma counter is modified under exclusive vma lock. - write unlock - (vma_end_write_all) is a batch release of all vma locks held. It doesn't pair with a specific vma_start_write! It is done before exclusive mmap_lock is released by incrementing mm sequence counter (mm_lock_seq). - write downgrade - if the mmap_lock is downgraded to the read lock, all vma write locks are released as well (effectivelly same as write unlock). Link: https://lkml.kernel.org/r/20230227173632.3292573-13-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 438b6e12cd603a9416ca7c5462ab75b2a8c4d5b9 Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:10 2023 -0800 mm: move mmap_lock assert function definitions Move mmap_lock assert function definitions up so that they can be used by other mmap_lock routines. Link: https://lkml.kernel.org/r/20230227173632.3292573-12-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 20cce633f4254cc0df39665449726e3172518f6c Author: Michel Lespinasse Date: Mon Feb 27 09:36:09 2023 -0800 mm: rcu safe VMA freeing This prepares for page faults handling under VMA lock, looking up VMAs under protection of an rcu read lock, instead of the usual mmap read lock. Link: https://lkml.kernel.org/r/20230227173632.3292573-11-surenb@google.com Signed-off-by: Michel Lespinasse Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 0b6cc04f3db3604c1485049bc9582523c2b44b75 Author: Suren Baghdasaryan Date: Mon Feb 27 09:36:08 2023 -0800 mm: introduce CONFIG_PER_VMA_LOCK Patch series "Per-VMA locks", v4. LWN article describing the feature: https://lwn.net/Articles/906852/ Per-vma locks idea that was discussed during SPF [1] discussion at LSF/MM last year [2], which concluded with suggestion that “a reader/writer semaphore could be put into the VMA itself; that would have the effect of using the VMA as a sort of range lock. There would still be contention at the VMA level, but it would be an improvement.” This patchset implements this suggested approach. When handling page faults we lookup the VMA that contains the faulting page under RCU protection and try to acquire its lock. If that fails we fall back to using mmap_lock, similar to how SPF handled this situation. One notable way the implementation deviates from the proposal is the way VMAs are read-locked. During some of mm updates, multiple VMAs need to be locked until the end of the update (e.g. vma_merge, split_vma, etc). Tracking all the locked VMAs, avoiding recursive locks, figuring out when it's safe to unlock previously locked VMAs would make the code more complex. So, instead of the usual lock/unlock pattern, the proposed solution marks a VMA as locked and provides an efficient way to: 1. Identify locked VMAs. 2. Unlock all locked VMAs in bulk. We also postpone unlocking the locked VMAs until the end of the update, when we do mmap_write_unlock. Potentially this keeps a VMA locked for longer than is absolutely necessary but it results in a big reduction of code complexity. Read-locking a VMA is done using two sequence numbers - one in the vm_area_struct and one in the mm_struct. VMA is considered read-locked when these sequence numbers are equal. To read-lock a VMA we set the sequence number in vm_area_struct to be equal to the sequence number in mm_struct. To unlock all VMAs we increment mm_struct's seq number. This allows for an efficient way to track locked VMAs and to drop the locks on all VMAs at the end of the update. The patchset implements per-VMA locking only for anonymous pages which are not in swap and avoids userfaultfs as their implementation is more complex. Additional support for file-back page faults, swapped and user pages can be added incrementally. Performance benchmarks show similar although slightly smaller benefits as with SPF patchset (~75% of SPF benefits). Still, with lower complexity this approach might be more desirable. Since RFC was posted in September 2022, two separate Google teams outside of Android evaluated the patchset and confirmed positive results. Here are the known usecases when per-VMA locks show benefits: Android: Apps with high number of threads (~100) launch times improve by up to 20%. Each thread mmaps several areas upon startup (Stack and Thread-local storage (TLS), thread signal stack, indirect ref table), which requires taking mmap_lock in write mode. Page faults take mmap_lock in read mode. During app launch, both thread creation and page faults establishing the active workinget are happening in parallel and that causes lock contention between mm writers and readers even if updates and page faults are happening in different VMAs. Per-vma locks prevent this contention by providing more granular lock. Google Fibers: We have several dynamically sized thread pools that spawn new threads under increased load and reduce their number when idling. For example, Google's in-process scheduling/threading framework, UMCG/Fibers, is backed by such a thread pool. When idling, only a small number of idle worker threads are available; when a spike of incoming requests arrive, each request is handled in its own "fiber", which is a work item posted onto a UMCG worker thread; quite often these spikes lead to a number of new threads spawning. Each new thread needs to allocate and register an RSEQ section on its TLS, then register itself with the kernel as a UMCG worker thread, and only after that it can be considered by the in-process UMCG/Fiber scheduler as available to do useful work. In short, during an incoming workload spike new threads have to be spawned, and they perform several syscalls (RSEQ registration, UMCG worker registration, memory allocations) before they can actually start doing useful work. Removing any bottlenecks on this thread startup path will greatly improve our services' latencies when faced with request/workload spikes. At high scale, mmap_lock contention during thread creation and stack page faults leads to user-visible multi-second serving latencies in a similar pattern to Android app startup. Per-VMA locking patchset has been run successfully in limited experiments with user-facing production workloads. In these experiments, we observed that the peak thread creation rate was high enough that thread creation is no longer a bottleneck. TCP zerocopy receive: From the point of view of TCP zerocopy receive, the per-vma lock patch is massively beneficial. In today's implementation, a process with N threads where N - 1 are performing zerocopy receive and 1 thread is performing madvise() with the write lock taken (e.g. needs to change vm_flags) will result in all N -1 receive threads blocking until the madvise is done. Conversely, on a busy process receiving a lot of data, an madvise operation that does need to take the mmap lock in write mode will need to wait for all of the receives to be done - a lose:lose proposition. Per-VMA locking _removes_ by definition this source of contention entirely. There are other benefits for receive as well, chiefly a reduction in cacheline bouncing across receiving threads for locking/unlocking the single mmap lock. On an RPC style synthetic workload with 4KB RPCs: 1a) The find+lock+unlock VMA path in the base case, without the per-vma lock patchset, is about 0.7% of cycles as measured by perf. 1b) mmap_read_lock + mmap_read_unlock in the base case is about 0.5% cycles overall - most of this is within the TCP read hotpath (a small fraction is 'other' usage in the system). 2a) The find+lock+unlock VMA path, with the per-vma patchset and a trivial patch written to take advantage of it in TCP, is about 0.4% of cycles (down from 0.7% above) 2b) mmap_read_lock + mmap_read_unlock in the per-vma patchset is < 0.1% cycles and is out of the TCP read hotpath entirely (down from 0.5% before, the remaining usage is the 'other' usage in the system). So, in addition to entirely removing an onerous source of contention, it also reduces the CPU cycles of TCP receive zerocopy by about 0.5%+ (compared to overall cycles in perf) for the 'small' RPC scenario. In https://lkml.kernel.org/r/87fsaqouyd.fsf_-_@stealth, Punit demonstrated throughput improvements of as much as 188% from this patchset. This patch (of 25): This configuration variable will be used to build the support for VMA locking during page fault handling. This is enabled on supported architectures with SMP and MMU set. The architecture support is needed since the page fault handler is called from the architecture's page faulting code which needs modifications to handle faults under VMA lock. Link: https://lkml.kernel.org/r/20230227173632.3292573-1-surenb@google.com Link: https://lkml.kernel.org/r/20230227173632.3292573-10-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 58ef47ef7db9dfc2730dc039498cc76130ea3c3d Author: Matthew Wilcox (Oracle) Date: Mon Mar 27 18:45:15 2023 +0100 mm: hold the RCU read lock over calls to ->map_pages Prevent filesystems from doing things which sleep in their map_pages method. This is in preparation for a pagefault path protected only by RCU. Link: https://lkml.kernel.org/r/20230327174515.1811532-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Darrick J. Wong Cc: Dave Chinner Cc: David Howells Signed-off-by: Andrew Morton commit 0050d7f5ee532f92e8ab1efcec6547bfac527973 Author: Matthew Wilcox (Oracle) Date: Mon Mar 27 18:45:14 2023 +0100 afs: split afs_pagecache_valid() out of afs_validate() For the map_pages() method, we need a test that does not sleep. The page fault handler will continue to call the fault() method where we can sleep and do the full revalidation there. Link: https://lkml.kernel.org/r/20230327174515.1811532-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: David Howells Tested-by: David Howells Cc: Darrick J. Wong Cc: Dave Chinner Signed-off-by: Andrew Morton commit 945ea457b5a57cd34cbacce6f1f9e4a2e88432c2 Author: Matthew Wilcox (Oracle) Date: Mon Mar 27 18:45:13 2023 +0100 xfs: remove xfs_filemap_map_pages() wrapper Patch series "Prevent ->map_pages from sleeping", v2. In preparation for a larger patch series which will handle (some, easy) page faults protected only by RCU, change the two filesystems which have sleeping locks to not take them and hold the RCU lock around calls to ->map_page to prevent other filesystems from adding sleeping locks. This patch (of 3): XFS doesn't actually need to be holding the XFS_MMAPLOCK_SHARED to do this. filemap_map_pages() cannot bring new folios into the page cache and the folio lock is taken during filemap_map_pages() which provides sufficient protection against a truncation or hole punch. Link: https://lkml.kernel.org/r/20230327174515.1811532-1-willy@infradead.org Link: https://lkml.kernel.org/r/20230327174515.1811532-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Dave Chinner Cc: Darrick J. Wong Cc: David Howells Signed-off-by: Andrew Morton commit 02cd4eb81c14ee64b062383c7e25fd8599b18f3d Author: Thomas Weißschuh Date: Fri Mar 24 15:35:27 2023 +0000 mm/damon/sysfs: make more kobj_type structures constant Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. These structures were not constified in commit e56397e8c40d ("mm/damon/sysfs: make kobj_type structures constant") as they didn't exist when that patch was written. Link: https://lkml.kernel.org/r/20230324-b4-kobj_type-damon2-v1-1-48ddbf1c8fcf@weissschuh.net Signed-off-by: Thomas Weißschuh Reviewed-by: SeongJae Park Reviewed-by: Muhammad Usama Anjum Signed-off-by: Andrew Morton commit d6c2789778c59c1768567099eb2fdd32d790c38a Author: Chaitanya S Prakash Date: Thu Mar 23 11:31:21 2023 +0530 selftests/mm: set overcommit_policy as OVERCOMMIT_ALWAYS The kernel's default behaviour is to obstruct the allocation of high virtual address as it handles memory overcommit in a heuristic manner. Setting the parameter as OVERCOMMIT_ALWAYS, ensures kernel isn't susceptible to the availability of a platform's physical memory when denying a memory allocation request. Link: https://lkml.kernel.org/r/20230323060121.1175830-4-chaitanyas.prakash@arm.com Signed-off-by: Chaitanya S Prakash Cc: David Hildenbrand Cc: Shuah Khan Signed-off-by: Andrew Morton commit 3f9bea2b8a7e4952f03582d8137ab8bf6e96985b Author: Chaitanya S Prakash Date: Thu Mar 23 11:31:20 2023 +0530 selftests/mm: change NR_CHUNKS_HIGH for aarch64 Although there is a provision for 52 bit VA on arm64 platform, it remains unutilised and higher addresses are not allocated. In order to accommodate 4PB [2^52] virtual address space where supported, NR_CHUNKS_HIGH is changed accordingly. Array holding addresses is changed from static allocation to dynamic allocation to accommodate its voluminous nature which otherwise might overflow the stack. Link: https://lkml.kernel.org/r/20230323060121.1175830-3-chaitanyas.prakash@arm.com Signed-off-by: Chaitanya S Prakash Cc: David Hildenbrand Cc: Shuah Khan Signed-off-by: Andrew Morton commit 3cce258ea4009992b7b4b64c2bebaf98948180ae Author: Chaitanya S Prakash Date: Thu Mar 23 11:31:19 2023 +0530 selftests/mm: change MAP_CHUNK_SIZE Patch series "selftests: Fix virtual address range for arm64", v2. When the virtual address range selftest is run on arm64 and x86 platforms, it is observed that both the low and high VA range iterations are skipped when the MAP_CHUNK_SIZE is set to 16GB. The MAP_CHUNK_SIZE is changed to 1GB to resolve this issue, following which support for arm64 platform is added by changing the NR_CHUNKS_HIGH for aarch64 to accommodate up to 4PB of virtual address space allocation requests. Dynamic memory allocation of array holding addresses is introduced to prevent overflow of the stack. Finally, the overcommit_policy is set as OVERCOMMIT_ALWAYS to prevent the kernel from denying a memory allocation request based on a platform's physical memory availability. This patch (of 3): mmap() fails to allocate 16GB virtual space chunk, skipping both low and high VA range iterations. Hence, reduce MAP_CHUNK_SIZE to 1GB and update relevant macros as required. Link: https://lkml.kernel.org/r/20230323060121.1175830-1-chaitanyas.prakash@arm.com Link: https://lkml.kernel.org/r/20230323060121.1175830-2-chaitanyas.prakash@arm.com Signed-off-by: Chaitanya S Prakash Cc: David Hildenbrand Cc: Shuah Khan Signed-off-by: Andrew Morton commit c710fac6bfc8c2bcfedbaba27e31524c98eb6188 Author: Wenchao Hao Date: Thu Mar 23 19:41:36 2023 +0800 trace: cma: remove unnecessary event class cma_alloc_class After commit cb6c33d4dc09 ("cma: tracing: print alloc result in trace_cma_alloc_finish"), cma_alloc_class has only one event which is cma_alloc_busy_retry. So we can remove the cma_alloc_class. Link: https://lkml.kernel.org/r/20230323114136.177677-1-haowenchao2@huawei.com Signed-off-by: Wenchao Hao Acked-by: Steven Rostedt (Google) Cc: Feilong Lin Cc: Hongxiang Lou Cc: Masami Hiramatsu Signed-off-by: Andrew Morton commit dd31bad21980990d903133d2855ea0e2eccade5e Author: Tomas Krcka Date: Thu Mar 23 17:43:49 2023 +0000 mm: be less noisy during memory hotplug Turn a pr_info() into a pr_debug() to prevent dmesg spamming on systems where memory hotplug is a frequent operation. Link: https://lkml.kernel.org/r/20230323174349.35990-1-krckatom@amazon.de Signed-off-by: Tomas Krcka Suggested-by: Jan H. Schönherr Acked-by: David Hildenbrand Reviewed-by: Pasha Tatashin Signed-off-by: Andrew Morton commit 0173db4f7f526540e2cc0a6a61e42771acd4c197 Author: Lorenzo Stoakes Date: Wed Mar 22 20:19:00 2023 +0000 mm/mmap/vma_merge: init cleanup, be explicit about the non-mergeable case Rather than setting err = -1 and only resetting if we hit merge cases, explicitly check the non-mergeable case to make it abundantly clear that we only proceed with the rest if something is mergeable, default err to 0 and only update if an error might occur. Move the merge_prev, merge_next cases closer to the logic determining curr, next and reorder initial variables so they are more logically grouped. This has no functional impact. Link: https://lkml.kernel.org/r/99259fbc6403e80e270e1cc4612abbc8620b121b.1679516210.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Vlastimil Babka Cc: David Hildenbrand Cc: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Vernon Yang Signed-off-by: Andrew Morton commit b0729ae0ae67a1a001e8d577b8be9ba44c4bdb26 Author: Lorenzo Stoakes Date: Wed Mar 22 20:18:59 2023 +0000 mm/mmap/vma_merge: explicitly assign res, vma, extend invariants Previously, vma was an uninitialised variable which was only definitely assigned as a result of the logic covering all possible input cases - for it to have remained uninitialised, prev would have to be NULL, and next would _have_ to be mergeable. The value of res defaults to NULL, so we can neatly eliminate the assignment to res and vma in the if (prev) block and ensure that both res and vma are both explicitly assigned, by just setting both to prev. In addition we add an explanation as to under what circumstances both might change, and since we absolutely do rely on addr == curr->vm_start should curr exist, assert that this is the case. Link: https://lkml.kernel.org/r/83938bed24422cbe5954bbf491341674becfe567.1679516210.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Vlastimil Babka Reviewed-by: Liam R. Howlett Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Vernon Yang Signed-off-by: Andrew Morton commit 00cd00a6a2b1cc0b7d35e56444dab96879def809 Author: Lorenzo Stoakes Date: Wed Mar 22 20:18:58 2023 +0000 mm/mmap/vma_merge: fold curr, next assignment logic Use find_vma_intersection() and vma_lookup() to both simplify the logic and to fold the end == next->vm_start condition into one block. This groups all of the simple range checks together and establishes the invariant that, if prev, curr or next are non-NULL then their positions are as expected. This has no functional impact. Link: https://lkml.kernel.org/r/c6d960641b4ba58fa6ad3d07bf68c27d847963c8.1679516210.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Vlastimil Babka Reviewed-by: Liam R. Howlett Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Vernon Yang Signed-off-by: Andrew Morton commit fcfccd91841c6f3faf561a45f56bc381ab631956 Author: Lorenzo Stoakes Date: Tue Mar 21 20:45:55 2023 +0000 mm/mmap/vma_merge: further improve prev/next VMA naming Patch series "further cleanup of vma_merge()", v2. Following on from Vlastimil Babka's patch series "cleanup vma_merge() and improve mergeability tests" which was in turn based on Liam's prior cleanups, this patch series introduces changes discussed in review of Vlastimil's series and goes further in attempting to make the logic as clear as possible. Nearly all of this should have absolutely no functional impact, however it does add a singular VM_WARN_ON() case. With many thanks to Vernon for helping kick start the discussion around simplification - abstract use of vma did indeed turn out not to be necessary - and to Liam for his excellent suggestions which greatly simplified things. This patch (of 4): Previously the ASCII diagram above vma_merge() and the accompanying variable naming was rather confusing, however recent efforts by Liam Howlett and Vlastimil Babka have significantly improved matters. This patch goes a little further - replacing 'X' with 'N' which feels a lot more natural and replacing what was 'N' with 'C' which stands for 'concurrent' VMA. No word quite describes a VMA that has coincident start as the input span, concurrent, abbreviated to 'curr' (and which can be thought of also as 'current') however fits intuitions well alongside prev and next. This has no functional impact. Link: https://lkml.kernel.org/r/cover.1679431180.git.lstoakes@gmail.com Link: https://lkml.kernel.org/r/6001e08fa7e119470cbb1d2b6275ad8d742ff9a7.1679431180.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Cc: David Hildenbrand Cc: Liam Howlett Cc: Matthew Wilcox (Oracle) Cc: Vernon Yang Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 4c91c07c93bbbdd7f2d9de2beb7ee5c2a48ad8e7 Author: Lorenzo Stoakes Date: Wed Mar 22 18:57:04 2023 +0000 mm: vmalloc: convert vread() to vread_iter() Having previously laid the foundation for converting vread() to an iterator function, pull the trigger and do so. This patch attempts to provide minimal refactoring and to reflect the existing logic as best we can, for example we continue to zero portions of memory not read, as before. Overall, there should be no functional difference other than a performance improvement in /proc/kcore access to vmalloc regions. Now we have eliminated the need for a bounce buffer in read_kcore_iter(), we dispense with it, and try to write to user memory optimistically but with faults disabled via copy_page_to_iter_nofault(). We already have preemption disabled by holding a spin lock. We continue faulting in until the operation is complete. Additionally, we must account for the fact that at any point a copy may fail (most likely due to a fault not being able to occur), we exit indicating fewer bytes retrieved than expected. [sfr@canb.auug.org.au: fix sparc64 warning] Link: https://lkml.kernel.org/r/20230320144721.663280c3@canb.auug.org.au [lstoakes@gmail.com: redo Stephen's sparc build fix] Link: https://lkml.kernel.org/r/8506cbc667c39205e65a323f750ff9c11a463798.1679566220.git.lstoakes@gmail.com [akpm@linux-foundation.org: unbreak uio.h includes] Link: https://lkml.kernel.org/r/941f88bc5ab928e6656e1e2593b91bf0f8c81e1b.1679511146.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Signed-off-by: Stephen Rothwell Reviewed-by: Baoquan He Cc: Alexander Viro Cc: David Hildenbrand Cc: Jens Axboe Cc: Jiri Olsa Cc: Liu Shixin Cc: Matthew Wilcox (Oracle) Cc: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton commit 4f80818b4a58c9458dce0df7cce9abe107da445e Author: Lorenzo Stoakes Date: Wed Mar 22 18:57:03 2023 +0000 iov_iter: add copy_page_to_iter_nofault() Provide a means to copy a page to user space from an iterator, aborting if a page fault would occur. This supports compound pages, but may be passed a tail page with an offset extending further into the compound page, so we cannot pass a folio. This allows for this function to be called from atomic context and _try_ to user pages if they are faulted in, aborting if not. The function does not use _copy_to_iter() in order to not specify might_fault(), this is similar to copy_page_from_iter_atomic(). This is being added in order that an iteratable form of vread() can be implemented while holding spinlocks. Link: https://lkml.kernel.org/r/19734729defb0f498a76bdec1bef3ac48a3af3e8.1679511146.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Baoquan He Cc: Alexander Viro Cc: David Hildenbrand Cc: Jens Axboe Cc: Jiri Olsa Cc: Liu Shixin Cc: Matthew Wilcox (Oracle) Cc: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton commit 46c0d6d0904a10785faabee53fe53ee1aa718fea Author: Lorenzo Stoakes Date: Wed Mar 22 18:57:02 2023 +0000 fs/proc/kcore: convert read_kcore() to read_kcore_iter() For the time being we still use a bounce buffer for vread(), however in the next patch we will convert this to interact directly with the iterator and eliminate the bounce buffer altogether. Link: https://lkml.kernel.org/r/ebe12c8d70eebd71f487d80095605f3ad0d1489c.1679511146.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Reviewed-by: David Hildenbrand Reviewed-by: Baoquan He Cc: Alexander Viro Cc: Jens Axboe Cc: Jiri Olsa Cc: Liu Shixin Cc: Matthew Wilcox (Oracle) Cc: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton commit 2e1c0170771e6bf31bc785ea43a44e6e85e36268 Author: Lorenzo Stoakes Date: Wed Mar 22 18:57:01 2023 +0000 fs/proc/kcore: avoid bounce buffer for ktext data Patch series "convert read_kcore(), vread() to use iterators", v8. While reviewing Baoquan's recent changes to permit vread() access to vm_map_ram regions of vmalloc allocations, Willy pointed out [1] that it would be nice to refactor vread() as a whole, since its only user is read_kcore() and the existing form of vread() necessitates the use of a bounce buffer. This patch series does exactly that, as well as adjusting how we read the kernel text section to avoid the use of a bounce buffer in this case as well. This has been tested against the test case which motivated Baoquan's changes in the first place [2] which continues to function correctly, as do the vmalloc self tests. This patch (of 4): Commit df04abfd181a ("fs/proc/kcore.c: Add bounce buffer for ktext data") introduced the use of a bounce buffer to retrieve kernel text data for /proc/kcore in order to avoid failures arising from hardened user copies enabled by CONFIG_HARDENED_USERCOPY in check_kernel_text_object(). We can avoid doing this if instead of copy_to_user() we use _copy_to_user() which bypasses the hardening check. This is more efficient than using a bounce buffer and simplifies the code. We do so as part an overall effort to eliminate bounce buffer usage in the function with an eye to converting it an iterator read. Link: https://lkml.kernel.org/r/cover.1679566220.git.lstoakes@gmail.com Link: https://lore.kernel.org/all/Y8WfDSRkc%2FOHP3oD@casper.infradead.org/ [1] Link: https://lore.kernel.org/all/87ilk6gos2.fsf@oracle.com/T/#u [2] Link: https://lkml.kernel.org/r/fd39b0bfa7edc76d360def7d034baaee71d90158.1679511146.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Reviewed-by: David Hildenbrand Reviewed-by: Baoquan He Cc: Alexander Viro Cc: Jens Axboe Cc: Jiri Olsa Cc: Liu Shixin Cc: Matthew Wilcox (Oracle) Cc: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton commit 3f6dac0fd1b83178137e7b4e722d8f29612cbec1 Author: Kirill A. Shutemov Date: Tue Mar 21 03:24:15 2023 +0300 mm/page_alloc: make deferred page init free pages in MAX_ORDER blocks Normal page init path frees pages during the boot in MAX_ORDER chunks, but deferred page init path does it in pageblock blocks. Change deferred page init path to work in MAX_ORDER blocks. For cases when MAX_ORDER is larger than pageblock, set migrate type to MIGRATE_MOVABLE for all pageblocks covered by the page. Link: https://lkml.kernel.org/r/20230321002415.20843-1-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Reviewed-by: Vlastimil Babka Acked-by: David Hildenbrand Acked-by: Mel Gorman Acked-by: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit 4a06f6f3d395d15eb285606f28b74ce5dbc77e52 Author: Lorenzo Stoakes Date: Sun Mar 12 23:40:15 2023 +0000 drm/ttm: remove comment referencing now-removed vmf_insert_mixed_prot() This function no longer exists, however the prot != vma->vm_page_prot case discussion has been retained and moved to vmf_insert_pfn_prot() so refer to this instead. Link: https://lkml.kernel.org/r/db403b3622b94a87bd93528cc1d6b44ae88adcdd.1678661628.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Reviewed-by: Christian König Cc: Dan Williams Cc: Jason Gunthorpe Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Thomas Hellström Cc: Aaron Tomlin Cc: Christoph Lameter Cc: Frederic Weisbecker Cc: Heiko Carstens Cc: Huacai Chen Cc: Marcelo Tosatti Cc: Peter Xu Cc: "Russell King (Oracle)" Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 7b806d229ef151c2997c041b791dfa89593e0e1b Author: Lorenzo Stoakes Date: Sun Mar 12 23:40:14 2023 +0000 mm: remove vmf_insert_pfn_xxx_prot() for huge page-table entries This functionality's sole user, the drm ttm module, removed support for it in commit 0d979509539e ("drm/ttm: remove ttm_bo_vm_insert_huge()") as the whole approach is currently unworkable without a PMD/PUD special bit and updates to GUP. Link: https://lkml.kernel.org/r/604c2ad79659d4b8a6e3e1611c6219d5d3233988.1678661628.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Cc: Christian König Cc: Dan Williams Cc: Jason Gunthorpe Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Thomas Hellström Cc: Aaron Tomlin Cc: Christoph Lameter Cc: Frederic Weisbecker Cc: Heiko Carstens Cc: Huacai Chen Cc: Marcelo Tosatti Cc: Peter Xu Cc: "Russell King (Oracle)" Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 28d8b812e97b31231e95864f36a6b32f4b307daa Author: Lorenzo Stoakes Date: Sun Mar 12 23:40:13 2023 +0000 mm: remove unused vmf_insert_mixed_prot() Patch series "Remove drm/ttm-specific mm changes". Functionality was added specifically for the DRM TTM driver to support mapping memory for VM_MIXEDMAP VMAs with customised protection flags, however this has now been rolled back as issues were found with this approach. This series removes the mm changes too, retaining some of the useful comments. This patch (of 3): The sole user of vmf_insert_mixed_prot(), the drm ttm module, stopped using this in commit f91142c62161 ("drm/ttm: nuke VM_MIXEDMAP on BO mappings v3") citing use of VM_MIXEDMAP in this case being terribly broken. Remove this now-dead code and references to it, but retain the useful description of the prot != vma->vm_page_prot case, moving it to vmf_insert_pfn_prot() instead. Link: https://lkml.kernel.org/r/cover.1678661628.git.lstoakes@gmail.com Link: https://lkml.kernel.org/r/a069644388e6f1593a7020d15840e6fc9f39bcaf.1678661628.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Cc: Christian König Cc: Dan Williams Cc: Jason Gunthorpe Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Thomas Hellström Cc: Aaron Tomlin Cc: Christoph Lameter Cc: Frederic Weisbecker Cc: Heiko Carstens Cc: Huacai Chen Cc: Marcelo Tosatti Cc: Peter Xu Cc: "Russell King (Oracle)" Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit bd23024b9774e681cbe6cc3afcb24244dfcb2390 Author: Tomas Mudrunka Date: Tue Mar 21 11:34:30 2023 +0100 mm/memtest: add results of early memtest to /proc/meminfo Currently the memtest results were only presented in dmesg. When running a large fleet of devices without ECC RAM it's currently not easy to do bulk monitoring for memory corruption. You have to parse dmesg, but that's a ring buffer so the error might disappear after some time. In general I do not consider dmesg to be a great API to query RAM status. In several companies I've seen such errors remain undetected and cause issues for way too long. So I think it makes sense to provide a monitoring API, so that we can safely detect and act upon them. This adds /proc/meminfo entry which can be easily used by scripts. Link: https://lkml.kernel.org/r/20230321103430.7130-1-tomas.mudrunka@gmail.com Signed-off-by: Tomas Mudrunka Cc: Jonathan Corbet Cc: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit c9bb52738b39fabc8b6b9446f0d194eedb3e5a10 Author: Mike Rapoport (IBM) Date: Tue Mar 21 19:05:13 2023 +0200 MAINTAINERS: extend memblock entry to include MM initialization and add mm/mm_init.c to memblock entry in MAINTAINERS Link: https://lkml.kernel.org/r/20230321170513.2401534-15-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Acked-by: Vlastimil Babka Cc: Doug Berger Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit b671491199acd3609f87754d268f2f5cb10de18d Author: Mike Rapoport (IBM) Date: Tue Mar 21 19:05:12 2023 +0200 mm: move vmalloc_init() declaration to mm/internal.h vmalloc_init() is called only from mm_core_init(), there is no need to declare it in include/linux/vmalloc.h Move vmalloc_init() declaration to mm/internal.h Link: https://lkml.kernel.org/r/20230321170513.2401534-14-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Doug Berger Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit d5d2c02a4980c2e22037679457bf2d921b86a503 Author: Mike Rapoport (IBM) Date: Tue Mar 21 19:05:11 2023 +0200 mm: move kmem_cache_init() declaration to mm/slab.h kmem_cache_init() is called only from mm_core_init(), there is no need to declare it in include/linux/slab.h Move kmem_cache_init() declaration to mm/slab.h Link: https://lkml.kernel.org/r/20230321170513.2401534-13-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Doug Berger Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit eb8589b4f8c107c346421881963c0ee0b8367c2c Author: Mike Rapoport (IBM) Date: Tue Mar 21 19:05:10 2023 +0200 mm: move mem_init_print_info() to mm_init.c mem_init_print_info() is only called from mm_core_init(). Move it close to the caller and make it static. Link: https://lkml.kernel.org/r/20230321170513.2401534-12-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Doug Berger Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit de57807e6f267a658a046dbca44dc40fe806d60f Author: Mike Rapoport (IBM) Date: Tue Mar 21 19:05:09 2023 +0200 init,mm: fold late call to page_ext_init() to page_alloc_init_late() When deferred initialization of struct pages is enabled, page_ext_init() must be called after all the deferred initialization is done, but there is no point to keep it a separate call from kernel_init_freeable() right after page_alloc_init_late(). Fold the call to page_ext_init() into page_alloc_init_late() and localize deferred_struct_pages variable. Link: https://lkml.kernel.org/r/20230321170513.2401534-11-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Doug Berger Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit f2fc4b44ec2bb94c51c7ae1af9b1177d72705992 Author: Mike Rapoport (IBM) Date: Tue Mar 21 19:05:08 2023 +0200 mm: move init_mem_debugging_and_hardening() to mm/mm_init.c init_mem_debugging_and_hardening() is only called from mm_core_init(). Move it close to the caller, make it static and rename it to mem_debugging_and_hardening_init() for consistency with surrounding convention. Link: https://lkml.kernel.org/r/20230321170513.2401534-10-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Doug Berger Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 4cd1e9edf60efb20fad35cf5e9ade7ad75b34cd1 Author: Mike Rapoport (IBM) Date: Tue Mar 21 19:05:07 2023 +0200 mm: call {ptlock,pgtable}_cache_init() directly from mm_core_init() and drop pgtable_init() as it has no real value and its name is misleading. Link: https://lkml.kernel.org/r/20230321170513.2401534-9-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Doug Berger Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Thomas Bogendoerfer Cc: Sergei Shtylyov Signed-off-by: Andrew Morton commit b7ec1bf3e7b9dd9d3335c937f5d834680d74addf Author: Mike Rapoport (IBM) Date: Tue Mar 21 19:05:06 2023 +0200 init,mm: move mm_init() to mm/mm_init.c and rename it to mm_core_init() Make mm_init() a part of mm/ codebase. mm_core_init() better describes what the function does and does not clash with mm_init() in kernel/fork.c Link: https://lkml.kernel.org/r/20230321170513.2401534-8-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Doug Berger Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 9cca18390d8d7af387c57e7d13d6a58615ece6a0 Author: Mike Rapoport (IBM) Date: Tue Mar 21 19:05:05 2023 +0200 init: fold build_all_zonelists() and page_alloc_init_cpuhp() to mm_init() Both build_all_zonelists() and page_alloc_init_cpuhp() must be called after SMP setup is complete but before the page allocator is set up. Still, they both are a part of memory management initialization, so move them to mm_init(). Link: https://lkml.kernel.org/r/20230321170513.2401534-7-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Doug Berger Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit c4fbed4b0284d91797ee3cf60983b94c84c396b6 Author: Mike Rapoport (IBM) Date: Tue Mar 21 19:05:04 2023 +0200 mm/page_alloc: rename page_alloc_init() to page_alloc_init_cpuhp() The page_alloc_init() name is really misleading because all this function does is sets up CPU hotplug callbacks for the page allocator. Rename it to page_alloc_init_cpuhp() so that name will reflect what the function does. Link: https://lkml.kernel.org/r/20230321170513.2401534-6-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Doug Berger Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 534ef4e19160b1034430c4c4fbc1bf94c0253a51 Author: Mike Rapoport (IBM) Date: Tue Mar 21 19:05:03 2023 +0200 mm: handle hashdist initialization in mm/mm_init.c The hashdist variable must be initialized before the first call to alloc_large_system_hash() and free_area_init() looks like a better place for it than page_alloc_init(). Move hashdist handling to mm/mm_init.c Link: https://lkml.kernel.org/r/20230321170513.2401534-5-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Doug Berger Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 9420f89db2dd611c5b436a13e13f74d65ecc3a6a Author: Mike Rapoport (IBM) Date: Tue Mar 21 19:05:02 2023 +0200 mm: move most of core MM initialization to mm/mm_init.c The bulk of memory management initialization code is spread all over mm/page_alloc.c and makes navigating through page allocator functionality difficult. Move most of the functions marked __init and __meminit to mm/mm_init.c to make it better localized and allow some more spare room before mm/page_alloc.c reaches 10k lines. No functional changes. Link: https://lkml.kernel.org/r/20230321170513.2401534-4-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: David Hildenbrand Acked-by: Vlastimil Babka Cc: Doug Berger Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit fce0b4213edb960859dcc65ea414c8efb11948e1 Author: Mike Rapoport (IBM) Date: Tue Mar 21 19:05:01 2023 +0200 mm/page_alloc: add helper for checking if check_pages_enabled Instead of duplicating long static_branch_enabled(&check_pages_enabled) wrap it in a helper function is_check_pages_enabled() Link: https://lkml.kernel.org/r/20230321170513.2401534-3-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Cc: Doug Berger Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 12b9ac6d4385e6a2ffe08e94f810cd34ee53dcdb Author: Mike Rapoport (IBM) Date: Tue Mar 21 19:05:00 2023 +0200 mips: fix comment about pgtable_init() Patch series "mm: move core MM initialization to mm/mm_init.c", v2. This set moves most of the core MM initialization to mm/mm_init.c. This largely includes free_area_init() and its helpers, functions used at boot time, mm_init() from init/main.c and some of the functions it calls. Aside from gaining some more space before mm/page_alloc.c hits 10k lines, this makes mm/page_alloc.c to be mostly about buddy allocator and moves the init code out of the way, which IMO improves maintainability. Besides, this allows to move a couple of declarations out of include/linux and make them private to mm/. And as an added bonus there a slight decrease in vmlinux size. For tinyconfig and defconfig on x86 I've got tinyconfig: text data bss dec hex filename 853206 289376 1200128 2342710 23bf36 a/vmlinux 853198 289344 1200128 2342670 23bf0e b/vmlinux defconfig: text data bss dec hex filename 26152959 9730634 2170884 38054477 244aa4d a/vmlinux 26152945 9730602 2170884 38054431 244aa1f b/vmlinux This patch (of 14): Comment about fixrange_init() says that its called from pgtable_init() while the actual caller is pagetabe_init(). Update comment to match the code. Link: https://lkml.kernel.org/r/20230321170513.2401534-1-rppt@kernel.org Link: https://lkml.kernel.org/r/20230321170513.2401534-2-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Reviewed-by: Philippe Mathieu-Daud Reviewed-by: Vlastimil Babka Cc: Doug Berger Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Michal Hocko Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 307eecd5810cb71ddaac233eee8acb3bcac3a735 Author: Lorenzo Stoakes Date: Tue Mar 21 18:09:55 2023 +0000 MAINTAINERS: add Lorenzo as vmalloc reviewer I have recently been involved in both reviewing and submitting patches to the vmalloc code in mm and would be willing and happy to help out with review going forward if it would be helpful! Link: https://lkml.kernel.org/r/55f663af6100c84a71a0065ac0ed22463aa340de.1679421959.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Acked-by: Uladzislau Rezki (Sony) Cc: Baoquan He Cc: Christoph Hellwig Signed-off-by: Andrew Morton commit 5d671eb4ef7e1423a78fc0c12dd419c1dc1f6967 Author: Mike Rapoport (IBM) Date: Sun Mar 19 13:42:14 2023 +0200 mm: move get_page_from_free_area() to mm/page_alloc.c The get_page_from_free_area() helper is only used in mm/page_alloc.c so move it there to reduce noise in include/linux/mmzone.h Link: https://lkml.kernel.org/r/20230319114214.2133332-1-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Reviewed-by: Lorenzo Stoakes Acked-by: Kirill A. Shutemov Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 53d36a56d8c494554e816300ebc0f7c23274b3ae Author: Lorenzo Stoakes Date: Fri Mar 17 21:58:26 2023 +0000 mm: prefer fault_around_pages to fault_around_bytes All use of this value is now at page granularity, so specify the variable as such too. This simplifies the logic. We maintain the debugfs entry to ensure that there are no user-visible changes. Link: https://lkml.kernel.org/r/4995bad07fe9baa51c786fa0d81819dddfb57654.1679089214.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 9042599e81c295f0b12d940248d6608e87e7b6b6 Author: Lorenzo Stoakes Date: Fri Mar 17 21:58:25 2023 +0000 mm: refactor do_fault_around() Patch series "Refactor do_fault_around()" Refactor do_fault_around() to avoid bitwise tricks and rather difficult to follow logic. Additionally, prefer fault_around_pages to fault_around_bytes as the operations are performed at a base page granularity. This patch (of 2): The existing logic is confusing and fails to abstract a number of bitwise tricks. Use ALIGN_DOWN() to perform alignment, pte_index() to obtain a PTE index and represent the address range using PTE offsets, which naturally make it clear that the operation is intended to occur within only a single PTE and prevent spanning of more than one page table. We rely on the fact that fault_around_bytes will always be page-aligned, at least one page in size, a power of two and that it will not exceed PAGE_SIZE * PTRS_PER_PTE in size (i.e. the address space mapped by a PTE). These are all guaranteed by fault_around_bytes_set(). Link: https://lkml.kernel.org/r/cover.1679089214.git.lstoakes@gmail.com Link: https://lkml.kernel.org/r/d125db1c3665a63b80cea29d56407825482e2262.1679089214.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 1c06b6a599b5b7be74a6baffafa00b0f70cbe523 Author: Baolin Wang Date: Thu Mar 16 19:06:47 2023 +0800 mm: compaction: fix the possible deadlock when isolating hugetlb pages When trying to isolate a migratable pageblock, it can contain several normal pages or several hugetlb pages (e.g. CONT-PTE 64K hugetlb on arm64) in a pageblock. That means we may hold the lru lock of a normal page to continue to isolate the next hugetlb page by isolate_or_dissolve_huge_page() in the same migratable pageblock. However in the isolate_or_dissolve_huge_page(), it may allocate a new hugetlb page and dissolve the old one by alloc_and_dissolve_hugetlb_folio() if the hugetlb's refcount is zero. That means we can still enter the direct compaction path to allocate a new hugetlb page under the current lru lock, which may cause possible deadlock. To avoid this possible deadlock, we should release the lru lock when trying to isolate a hugetbl page. Moreover it does not make sense to take the lru lock to isolate a hugetlb, which is not in the lru list. Link: https://lkml.kernel.org/r/7ab3bffebe59fb419234a68dec1e4572a2518563.1678962352.git.baolin.wang@linux.alibaba.com Fixes: 369fa227c219 ("mm: make alloc_contig_range handle free hugetlb pages") Signed-off-by: Baolin Wang Reviewed-by: Vlastimil Babka Reviewed-by: Mike Kravetz Acked-by: Mel Gorman Cc: Oscar Salvador Cc: William Lam Signed-off-by: Andrew Morton commit 56d48d8dbefb1cae3aeae54284f7d6f52a41ec23 Author: Baolin Wang Date: Thu Mar 16 19:06:46 2023 +0800 mm: compaction: consider the number of scanning compound pages in isolate fail path commit b717d6b93b54 ("mm: compaction: include compound page count for scanning in pageblock isolation") added compound page statistics for scanning in pageblock isolation, to make sure the number of scanned pages is always larger than the number of isolated pages when isolating mirgratable or free pageblock. However, when failing to isolate the pages when scanning the migratable or free pageblocks, the isolation failure path did not consider the scanning statistics of the compound pages, which result in showing the incorrect number of scanned pages in tracepoints or in vmstats which will confuse people about the page scanning pressure in memory compaction. Thus we should take into account the number of scanning pages when failing to isolate the compound pages to make the statistics accurate. Link: https://lkml.kernel.org/r/73d6250a90707649cc010731aedc27f946d722ed.1678962352.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Reviewed-by: Vlastimil Babka Acked-by: Mel Gorman Cc: Mike Kravetz Cc: Oscar Salvador Cc: William Lam Signed-off-by: Andrew Morton commit 4bfbe371dbc508411162d1a62e3211ed9f47f614 Author: Vlastimil Babka Date: Thu Mar 9 12:12:58 2023 +0100 mm/mremap: simplify vma expansion again This effectively reverts d014cd7c1c35 ("mm, mremap: fix mremap() expanding for vma's with vm_ops->close()"). After the recent changes, vma_merge() is able to handle the expansion properly even when the vma being expanded has a vm_ops->close operation, so we don't need to special case it anymore. Link: https://lkml.kernel.org/r/20230309111258.24079-11-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 714965ca8252f880d794f9524c6eae5f97f408c1 Author: Vlastimil Babka Date: Thu Mar 9 12:12:57 2023 +0100 mm/mmap: start distinguishing if vma can be removed in mergeability test Since pre-git times, is_mergeable_vma() returns false for a vma with vm_ops->close, so that no owner assumptions are violated in case the vma is removed as part of the merge. This check is currently very conservative and can prevent merging even situations where vma can't be removed, such as simple expansion of previous vma, as evidenced by commit d014cd7c1c35 ("mm, mremap: fix mremap() expanding for vma's with vm_ops->close()") In order to allow more merging when appropriate and simplify the code that was made more complex by commit d014cd7c1c35, start distinguishing cases where the vma can be really removed, and allow merging with vm_ops->close otherwise. As a first step, add a may_remove_vma parameter to is_mergeable_vma(). can_vma_merge_before() sets it to true, because when called from vma_merge(), a removal of the vma is possible. In can_vma_merge_after(), pass the parameter as false, because no removal can occur in each of its callers: - vma_merge() calls it on the 'prev' vma, which is never removed - mmap_region() and do_brk_flags() call it to determine if it can expand a vma, which is not removed As a result, vma's with vm_ops->close may now merge with compatible ranges in more situations than previously. We can also revert commit d014cd7c1c35 as the next step to simplify mremap code again. [vbabka@suse.cz: adjust comment as suggested by Lorenzo] Link: https://lkml.kernel.org/r/74f2ea6c-f1a9-6dd7-260c-25e660f42379@suse.cz Link: https://lkml.kernel.org/r/20230309111258.24079-10-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 2dbf401045038469e6afab1307a3cf9799c38425 Author: Vlastimil Babka Date: Thu Mar 9 12:12:56 2023 +0100 mm/mmap/vma_merge: convert mergeability checks to return bool The comments already mention returning 'true' so make the code match them. Link: https://lkml.kernel.org/r/20230309111258.24079-9-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 1e76454f936178fd4e8052ddc92ce18c8937f043 Author: Vlastimil Babka Date: Thu Mar 9 12:12:55 2023 +0100 mm/mmap/vma_merge: rename adj_next to adj_start The variable 'adj_next' holds the value by which we adjust vm_start of a vma in variable 'adjust', that's either 'next' or 'mid', so the current name is inaccurate. Rename it to 'adj_start'. Link: https://lkml.kernel.org/r/20230309111258.24079-8-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 9e8a39d2a9772aed7b97b58961e70701bd1d5899 Author: Vlastimil Babka Date: Thu Mar 9 12:12:54 2023 +0100 mm/mmap/vma_merge: set mid to NULL if not applicable There are several places where we test if 'mid' is really the area NNNN in the diagram and the tests have two variants and are non-obvious to follow. Instead, set 'mid' to NULL up-front if it's not the NNNN area, and simplify the tests. Also update the description in comment accordingly. [vbabka@suse.cz: adjust/add comments as suggested by Lorenzo] Link: https://lkml.kernel.org/r/def43190-53f7-a607-d1b0-b657565f4288@suse.cz Link: https://lkml.kernel.org/r/20230309111258.24079-7-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 5cd70b96debbce9182e903cc6f4ed261ae55fa8b Author: Vlastimil Babka Date: Thu Mar 9 12:12:53 2023 +0100 mm/mmap/vma_merge: initialize mid and next in natural order It is more intuitive to go from prev to mid and then next. No functional change. Link: https://lkml.kernel.org/r/20230309111258.24079-6-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 183b7a60d349abeb3067867c8bdbdd6e0d3b7d86 Author: Vlastimil Babka Date: Thu Mar 9 12:12:52 2023 +0100 mm/mmap/vma_merge: use the proper vma pointer in case 4 Almost all cases now use the 'next' pointer for the vma following the merged area, and the cases diagram shows it as XXXX. Case 4 is different as it uses 'mid' and NNNN, so change it for consistency. No functional change. Link: https://lkml.kernel.org/r/20230309111258.24079-5-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 5ff783f15176e85323e9d9349fefcd4de6e435bb Author: Vlastimil Babka Date: Thu Mar 9 12:12:51 2023 +0100 mm/mmap/vma_merge: use the proper vma pointers in cases 1 and 6 Case 1 is now shown in the comment as next vma being merged with prev, so use 'next' instead of 'mid'. In case 1 they both point to the same vma. As a consequence, in case 6, the dup_anon_vma() is now tried first on 'next' and then on 'mid', before it was the opposite order. This is not a functional change, as those two vma's cannnot have a different anon_vma, as that would have prevented the merging in the first place. Link: https://lkml.kernel.org/r/20230309111258.24079-4-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 097d70c6272f236eb4a29b3fb74b72df3a5344cf Author: Vlastimil Babka Date: Thu Mar 9 12:12:50 2023 +0100 mm/mmap/vma_merge: use the proper vma pointer in case 3 In case 3 we we use 'next' for everything but vma_pgoff. So use 'next' for that as well, instead of 'mid', for consistency. Then in case 8 we have to use 'mid' explicitly, which should also make the intent more obvious. Adjust the diagram for cases 1-3 in the comment to match the code - we are using 'next' for case 3 so mark the range with XXXX instead of NNNN. For case 2 that's a no-op as the code doesn't touch 'next' or 'mid'. For case 1 it's now wrong but that will be fixed next. No functional change. Link: https://lkml.kernel.org/r/20230309111258.24079-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 50dac01113ad7ecac86384998103d6a98020d0c4 Author: Vlastimil Babka Date: Thu Mar 9 12:12:49 2023 +0100 mm/mmap/vma_merge: use only primary pointers for preparing merge Patch series "cleanup vma_merge() and improve mergeability tests". My initial goal here was to try making the check for vm_ops->close in is_mergeable_vma() only be applied for vma's that would be truly removed as part of the merge (see Patch 9). This would then allow reverting the quick fix d014cd7c1c35 ("mm, mremap: fix mremap() expanding for vma's with vm_ops->close()"). This was successful enough to allow the revert (Patch 10). Checks using can_vma_merge_before() are still pessimistic about possible vma removal, and making them precise would probably complicate the vma_merge() code too much. Liam's 6.3-rc1 simplification of vma_merge() and removal of __vma_adjust() was very much helpful in understanding the vma_merge() implementation and especially when vma removals can happen, which is now very obvious. While studing the code, I've found ways to make it hopefully even more easy to follow, so that's the patches 1-8. That made me also notice a bug that's now already fixed in 6.3-rc1. This patch (of 10): In the merging preparation part of vma_merge(), some vma pointer variables are assigned for later execution of the merge, but also read from in the block itself. The code is easier follow and check against the cases diagram in the comment if the code reads only from the "primary" vma variables prev, mid, next instead. No functional change. Link: https://lkml.kernel.org/r/20230309111258.24079-1-vbabka@suse.cz Link: https://lkml.kernel.org/r/20230309111258.24079-2-vbabka@suse.cz Signed-off-by: Vlastimil Babka Reviewed-by: Lorenzo Stoakes ] Reviewed-by: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 0289184476c845968ad6ac9083c96cc0f75ca505 Author: Axel Rasmussen Date: Tue Mar 14 15:12:50 2023 -0700 mm: userfaultfd: add UFFDIO_CONTINUE_MODE_WP to install WP PTEs UFFDIO_COPY already has UFFDIO_COPY_MODE_WP, so when installing a new PTE to resolve a missing fault, one can install a write-protected one. This is useful when using UFFDIO_REGISTER_MODE_{MISSING,WP} in combination. This was motivated by testing HugeTLB HGM [1], and in particular its interaction with userfaultfd features. Existing userfaultfd code supports using WP and MINOR modes together (i.e. you can register an area with both enabled), but without this CONTINUE flag the combination is in practice unusable. So, add an analogous UFFDIO_CONTINUE_MODE_WP, which does the same thing as UFFDIO_COPY_MODE_WP, but for *minor* faults. Update the selftest to do some very basic exercising of the new flag. Update Documentation/ to describe how these flags are used (neither the COPY nor the new CONTINUE versions of this mode flag were described there before). [1]: https://patchwork.kernel.org/project/linux-mm/cover/20230218002819.1486479-1-jthoughton@google.com/ Link: https://lkml.kernel.org/r/20230314221250.682452-5-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Acked-by: Peter Xu Acked-by: Mike Rapoport (IBM) Cc: Al Viro Cc: Hugh Dickins Cc: Jan Kara Cc: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Mike Kravetz Cc: Muchun Song Cc: Nadav Amit Cc: Shuah Khan Signed-off-by: Andrew Morton commit d9712937037e0ce887920f321429826e9dbfd960 Author: Axel Rasmussen Date: Tue Mar 14 15:12:49 2023 -0700 mm: userfaultfd: combine 'mode' and 'wp_copy' arguments Many userfaultfd ioctl functions take both a 'mode' and a 'wp_copy' argument. In future commits we plan to plumb the flags through to more places, so we'd be proliferating the very long argument list even further. Let's take the time to simplify the argument list. Combine the two arguments into one - and generalize, so when we add more flags in the future, it doesn't imply more function arguments. Since the modes (copy, zeropage, continue) are mutually exclusive, store them as an integer value (0, 1, 2) in the low bits. Place combine-able flag bits in the high bits. This is quite similar to an earlier patch proposed by Nadav Amit ("userfaultfd: introduce uffd_flags" [1]). The main difference is that patch only handled flags, whereas this patch *also* combines the "mode" argument into the same type to shorten the argument list. [1]: https://lore.kernel.org/all/20220619233449.181323-2-namit@vmware.com/ Link: https://lkml.kernel.org/r/20230314221250.682452-4-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Acked-by: James Houghton Acked-by: Peter Xu Acked-by: Mike Rapoport (IBM) Cc: Al Viro Cc: Hugh Dickins Cc: Jan Kara Cc: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Mike Kravetz Cc: Muchun Song Cc: Shuah Khan Signed-off-by: Andrew Morton commit 61c5004022f56c443b86800e8985d8803f3a22aa Author: Axel Rasmussen Date: Tue Mar 14 15:12:48 2023 -0700 mm: userfaultfd: don't pass around both mm and vma Quite a few userfaultfd functions took both mm and vma pointers as arguments. Since the mm is trivially accessible via vma->vm_mm, there's no reason to pass both; it just needlessly extends the already long argument list. Get rid of the mm pointer, where possible, to shorten the argument list. Link: https://lkml.kernel.org/r/20230314221250.682452-3-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Acked-by: Peter Xu Acked-by: Mike Rapoport (IBM) Cc: Al Viro Cc: Hugh Dickins Cc: James Houghton Cc: Jan Kara Cc: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Mike Kravetz Cc: Muchun Song Cc: Nadav Amit Cc: Shuah Khan Signed-off-by: Andrew Morton commit a734991ccaec1985fff42fb26bb6d789d35defb4 Author: Axel Rasmussen Date: Tue Mar 14 15:12:47 2023 -0700 mm: userfaultfd: rename functions for clarity + consistency Patch series "mm: userfaultfd: refactor and add UFFDIO_CONTINUE_MODE_WP", v5. - Commits 1-3 refactor userfaultfd ioctl code without behavior changes, with the main goal of improving consistency and reducing the number of function args. - Commit 4 adds UFFDIO_CONTINUE_MODE_WP. This patch (of 4): The basic problem is, over time we've added new userfaultfd ioctls, and we've refactored the code so functions which used to handle only one case are now re-used to deal with several cases. While this happened, we didn't bother to rename the functions. Similarly, as we added new functions, we cargo-culted pieces of the now-inconsistent naming scheme, so those functions too ended up with names that don't make a lot of sense. A key point here is, "copy" in most userfaultfd code refers specifically to UFFDIO_COPY, where we allocate a new page and copy its contents from userspace. There are many functions with "copy" in the name that don't actually do this (at least in some cases). So, rename things into a consistent scheme. The high level idea is that the call stack for userfaultfd ioctls becomes: userfaultfd_ioctl -> userfaultfd_(particular ioctl) -> mfill_atomic_(particular kind of fill operation) -> mfill_atomic /* loops over pages in range */ -> mfill_atomic_pte /* deals with single pages */ -> mfill_atomic_pte_(particular kind of fill operation) -> mfill_atomic_install_pte There are of course some special cases (shmem, hugetlb), but this is the general structure which all function names now adhere to. Link: https://lkml.kernel.org/r/20230314221250.682452-1-axelrasmussen@google.com Link: https://lkml.kernel.org/r/20230314221250.682452-2-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Acked-by: Peter Xu Acked-by: Mike Rapoport (IBM) Cc: Al Viro Cc: Hugh Dickins Cc: James Houghton Cc: Jan Kara Cc: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Cc: Mike Kravetz Cc: Muchun Song Cc: Nadav Amit Cc: Shuah Khan Signed-off-by: Andrew Morton commit 60bcbe70bff5fa8a36bf2ed3a6629ea42e1c147d Author: Mike Rapoport (IBM) Date: Wed Mar 22 10:15:20 2023 +0200 mips: drop ranges for definition of ARCH_FORCE_MAX_ORDER MIPS defines insane ranges for ARCH_FORCE_MAX_ORDER allowing MAX_ORDER up to 63, which implies maximal contiguous allocation size of 2^63 pages. Drop bogus definitions of ranges for ARCH_FORCE_MAX_ORDER and leave it a simple integer with sensible defaults. Users that *really* need to change the value of ARCH_FORCE_MAX_ORDER will be able to do so but they won't be mislead by the bogus ranges. Link: https://lkml.kernel.org/r/20230322081520.2516226-1-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: Thomas Bogendoerfer Acked-by: Kirill A. Shutemov Reviewed-by: David Hildenbrand Cc: Huacai Chen Cc: WANG Xuerui Signed-off-by: Andrew Morton commit 7ce6048d3a7d2f9b43f3d8a34a52e4122bdc2f23 Author: Mike Rapoport (IBM) Date: Wed Mar 22 10:17:27 2023 +0200 loongarch: drop ranges for definition of ARCH_FORCE_MAX_ORDER LoongArch defines insane ranges for ARCH_FORCE_MAX_ORDER allowing MAX_ORDER up to 63, which implies maximal contiguous allocation size of 2^63 pages. Drop bogus definitions of ranges for ARCH_FORCE_MAX_ORDER and leave it a simple integer with sensible defaults. Users that *really* need to change the value of ARCH_FORCE_MAX_ORDER will be able to do so but they won't be mislead by the bogus ranges. Link: https://lkml.kernel.org/r/20230322081727.2516291-1-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) Acked-by: Kirill A. Shutemov Reviewed-by: David Hildenbrand Cc: Huacai Chen Cc: WANG Xuerui Signed-off-by: Andrew Morton commit 23baf831a32c04f9a968812511540b1b3e648bf5 Author: Kirill A. Shutemov Date: Wed Mar 15 14:31:33 2023 +0300 mm, treewide: redefine MAX_ORDER sanely MAX_ORDER currently defined as number of orders page allocator supports: user can ask buddy allocator for page order between 0 and MAX_ORDER-1. This definition is counter-intuitive and lead to number of bugs all over the kernel. Change the definition of MAX_ORDER to be inclusive: the range of orders user can ask from buddy allocator is 0..MAX_ORDER now. [kirill@shutemov.name: fix min() warning] Link: https://lkml.kernel.org/r/20230315153800.32wib3n5rickolvh@box [akpm@linux-foundation.org: fix another min_t warning] [kirill@shutemov.name: fixups per Zi Yan] Link: https://lkml.kernel.org/r/20230316232144.b7ic4cif4kjiabws@box.shutemov.name [akpm@linux-foundation.org: fix underlining in docs] Link: https://lore.kernel.org/oe-kbuild-all/202303191025.VRCTk6mP-lkp@intel.com/ Link: https://lkml.kernel.org/r/20230315113133.11326-11-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Reviewed-by: Michael Ellerman [powerpc] Cc: "Kirill A. Shutemov" Cc: Zi Yan Signed-off-by: Andrew Morton commit 61883d3c32418f16e35e030ca0cfd5d2de95a649 Author: Kirill A. Shutemov Date: Wed Mar 15 14:31:32 2023 +0300 iommu: fix MAX_ORDER usage in __iommu_dma_alloc_pages() MAX_ORDER is not inclusive: the maximum allocation order buddy allocator can deliver is MAX_ORDER-1. Fix MAX_ORDER usage in __iommu_dma_alloc_pages(). Also use GENMASK() instead of hard to read "(2U << order) - 1" magic. Link: https://lkml.kernel.org/r/20230315113133.11326-10-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Acked-by: Robin Murphy Reviewed-by: Jacob Pan Acked-by: Joerg Roedel Signed-off-by: Andrew Morton commit 7a16d7c7619b26e5e9bfc1360de0d02a94f7d9eb Author: Kirill A. Shutemov Date: Wed Mar 15 14:31:31 2023 +0300 mm/slub: fix MAX_ORDER usage in calculate_order() MAX_ORDER is not inclusive: the maximum allocation order buddy allocator can deliver is MAX_ORDER-1. Fix MAX_ORDER usage in calculate_order(). Link: https://lkml.kernel.org/r/20230315113133.11326-9-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Pekka Enberg Signed-off-by: Andrew Morton commit 668a89907c6b908c4a72ef22e70bbc95efca2000 Author: Kirill A. Shutemov Date: Wed Mar 15 14:31:30 2023 +0300 mm/page_reporting: fix MAX_ORDER usage in page_reporting_register() MAX_ORDER is not inclusive: the maximum allocation order buddy allocator can deliver is MAX_ORDER-1. Fix MAX_ORDER usage in page_reporting_register(). Link: https://lkml.kernel.org/r/20230315113133.11326-8-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Alexander Duyck Signed-off-by: Andrew Morton commit 934487e98fdd2d7762e893af7cbe788cfd39ff84 Author: Kirill A. Shutemov Date: Wed Mar 15 14:31:29 2023 +0300 perf/core: fix MAX_ORDER usage in rb_alloc_aux_page() MAX_ORDER is not inclusive: the maximum allocation order buddy allocator can deliver is MAX_ORDER-1. Fix MAX_ORDER usage in rb_alloc_aux_page(). Link: https://lkml.kernel.org/r/20230315113133.11326-7-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Ian Rogers Cc: Adrian Hunter Signed-off-by: Andrew Morton commit fd54349ddb61445a8a42459b3dc09237c55e6f78 Author: Kirill A. Shutemov Date: Wed Mar 15 14:31:28 2023 +0300 genwqe: fix MAX_ORDER usage MAX_ORDER is not inclusive: the maximum allocation order buddy allocator can deliver is MAX_ORDER-1. Fix MAX_ORDER usage in genwqe driver. Link: https://lkml.kernel.org/r/20230315113133.11326-6-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Frank Haverkamp Signed-off-by: Andrew Morton commit 50c00d2c686e52c0dd9b5bddc6727f6c442cbcc0 Author: Kirill A. Shutemov Date: Wed Mar 15 14:31:27 2023 +0300 drm/i915: fix MAX_ORDER usage in i915_gem_object_get_pages_internal() MAX_ORDER is not inclusive: the maximum allocation order buddy allocator can deliver is MAX_ORDER-1. Fix MAX_ORDER usage in i915_gem_object_get_pages_internal(). Link: https://lkml.kernel.org/r/20230315113133.11326-5-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Acked-by: Tvrtko Ursulin Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Signed-off-by: Andrew Morton commit 5f29298fba1ad1e7139381e19e09c272db337b13 Author: Kirill A. Shutemov Date: Wed Mar 15 14:31:26 2023 +0300 floppy: fix MAX_ORDER usage MAX_ORDER is not inclusive: the maximum allocation order buddy allocator can deliver is MAX_ORDER-1. Fix MAX_ORDER usage in floppy code. Also allocation buffer exactly PAGE_SIZE << MAX_ORDER bytes is okay. Fix MAX_LEN check. Link: https://lkml.kernel.org/r/20230315113133.11326-4-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Acked-by: Mike Rapoport (IBM) Cc: Denis Efremov Signed-off-by: Andrew Morton commit 254ca6d261d4b6ce00591de110f6f96c3556dfbe Author: Kirill A. Shutemov Date: Wed Mar 15 14:31:25 2023 +0300 um: fix MAX_ORDER usage in linux_main() MAX_ORDER is not inclusive: the maximum allocation order buddy allocator can deliver is MAX_ORDER-1. Fix MAX_ORDER usage in linux_main(). Link: https://lkml.kernel.org/r/20230315113133.11326-3-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Acked-by: Mike Rapoport (IBM) Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Signed-off-by: Andrew Morton commit 75558ad315488d40a18cb2c230ccacee24d20526 Author: Kirill A. Shutemov Date: Wed Mar 15 14:31:24 2023 +0300 sparc/mm: fix MAX_ORDER usage in tsb_grow() Patch series "Fix confusion around MAX_ORDER". MAX_ORDER currently defined as number of orders page allocator supports: user can ask buddy allocator for page order between 0 and MAX_ORDER-1. This definition is counter-intuitive and lead to number of bugs all over the kernel. Fix the bugs and then change the definition of MAX_ORDER to be inclusive: the range of orders user can ask from buddy allocator is 0..MAX_ORDER now. This patch (of 10): MAX_ORDER is not inclusive: the maximum allocation order buddy allocator can deliver is MAX_ORDER-1. Fix MAX_ORDER usage in tsb_grow(). Link: https://lkml.kernel.org/r/20230315113133.11326-1-kirill.shutemov@linux.intel.com Link: https://lkml.kernel.org/r/20230315113133.11326-2-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Reviewed-by: Mike Kravetz Acked-by: Mike Rapoport (IBM) Cc: David Miller Cc: David Hildenbrand Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 47fba2b6d5bae89df5b1434bfdad4a56c7e88059 Author: Peter Xu Date: Thu Mar 9 17:37:11 2023 -0500 selftests/mm: smoke test UFFD_FEATURE_WP_UNPOPULATED Enable it by default on the stress test, and add some smoke tests for the pte markers on anonymous. Link: https://lkml.kernel.org/r/20230309223711.823547-3-peterx@redhat.com Signed-off-by: Peter Xu Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: David Hildenbrand Cc: Mike Rapoport Cc: Muhammad Usama Anjum Cc: Nadav Amit Cc: Paul Gofman Signed-off-by: Andrew Morton commit 2bad466cc9d9b4c3b4b16eb9c03c919b59561316 Author: Peter Xu Date: Thu Mar 9 17:37:10 2023 -0500 mm/uffd: UFFD_FEATURE_WP_UNPOPULATED Patch series "mm/uffd: Add feature bit UFFD_FEATURE_WP_UNPOPULATED", v4. The new feature bit makes anonymous memory acts the same as file memory on userfaultfd-wp in that it'll also wr-protect none ptes. It can be useful in two cases: (1) Uffd-wp app that needs to wr-protect none ptes like QEMU snapshot, so pre-fault can be replaced by enabling this flag and speed up protections (2) It helps to implement async uffd-wp mode that Muhammad is working on [1] It's debatable whether this is the most ideal solution because with the new feature bit set, wr-protect none pte needs to pre-populate the pgtables to the last level (PAGE_SIZE). But it seems fine so far to service either purpose above, so we can leave optimizations for later. The series brings pte markers to anonymous memory too. There's some change in the common mm code path in the 1st patch, great to have some eye looking at it, but hopefully they're still relatively straightforward. This patch (of 2): This is a new feature that controls how uffd-wp handles none ptes. When it's set, the kernel will handle anonymous memory the same way as file memory, by allowing the user to wr-protect unpopulated ptes. File memories handles none ptes consistently by allowing wr-protecting of none ptes because of the unawareness of page cache being exist or not. For anonymous it was not as persistent because we used to assume that we don't need protections on none ptes or known zero pages. One use case of such a feature bit was VM live snapshot, where if without wr-protecting empty ptes the snapshot can contain random rubbish in the holes of the anonymous memory, which can cause misbehave of the guest when the guest OS assumes the pages should be all zeros. QEMU worked it around by pre-populate the section with reads to fill in zero page entries before starting the whole snapshot process [1]. Recently there's another need raised on using userfaultfd wr-protect for detecting dirty pages (to replace soft-dirty in some cases) [2]. In that case if without being able to wr-protect none ptes by default, the dirty info can get lost, since we cannot treat every none pte to be dirty (the current design is identify a page dirty based on uffd-wp bit being cleared). In general, we want to be able to wr-protect empty ptes too even for anonymous. This patch implements UFFD_FEATURE_WP_UNPOPULATED so that it'll make uffd-wp handling on none ptes being consistent no matter what the memory type is underneath. It doesn't have any impact on file memories so far because we already have pte markers taking care of that. So it only affects anonymous. The feature bit is by default off, so the old behavior will be maintained. Sometimes it may be wanted because the wr-protect of none ptes will contain overheads not only during UFFDIO_WRITEPROTECT (by applying pte markers to anonymous), but also on creating the pgtables to store the pte markers. So there's potentially less chance of using thp on the first fault for a none pmd or larger than a pmd. The major implementation part is teaching the whole kernel to understand pte markers even for anonymously mapped ranges, meanwhile allowing the UFFDIO_WRITEPROTECT ioctl to apply pte markers for anonymous too when the new feature bit is set. Note that even if the patch subject starts with mm/uffd, there're a few small refactors to major mm path of handling anonymous page faults. But they should be straightforward. With WP_UNPOPUATED, application like QEMU can avoid pre-read faults all the memory before wr-protect during taking a live snapshot. Quotting from Muhammad's test result here [3] based on a simple program [4]: (1) With huge page disabled echo madvise > /sys/kernel/mm/transparent_hugepage/enabled ./uffd_wp_perf Test DEFAULT: 4 Test PRE-READ: 1111453 (pre-fault 1101011) Test MADVISE: 278276 (pre-fault 266378) Test WP-UNPOPULATE: 11712 (2) With Huge page enabled echo always > /sys/kernel/mm/transparent_hugepage/enabled ./uffd_wp_perf Test DEFAULT: 4 Test PRE-READ: 22521 (pre-fault 22348) Test MADVISE: 4909 (pre-fault 4743) Test WP-UNPOPULATE: 14448 There'll be a great perf boost for no-thp case, while for thp enabled with extreme case of all-thp-zero WP_UNPOPULATED can be slower than MADVISE, but that's low possibility in reality, also the overhead was not reduced but postponed until a follow up write on any huge zero thp, so potentially it is faster by making the follow up writes slower. [1] https://lore.kernel.org/all/20210401092226.102804-4-andrey.gruzdev@virtuozzo.com/ [2] https://lore.kernel.org/all/Y+v2HJ8+3i%2FKzDBu@x1n/ [3] https://lore.kernel.org/all/d0eb0a13-16dc-1ac1-653a-78b7273781e3@collabora.com/ [4] https://github.com/xzpeter/clibs/blob/master/uffd-test/uffd-wp-perf.c [peterx@redhat.com: comment changes, oneliner fix to khugepaged] Link: https://lkml.kernel.org/r/ZB2/8jPhD3fpx5U8@x1n Link: https://lkml.kernel.org/r/20230309223711.823547-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20230309223711.823547-2-peterx@redhat.com Signed-off-by: Peter Xu Acked-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Mike Rapoport Cc: Muhammad Usama Anjum Cc: Nadav Amit Cc: Paul Gofman Signed-off-by: Andrew Morton commit c6a690e0c978bda8106e7a489c13323f90b087d0 Author: Andrey Konovalov Date: Sat Mar 11 00:43:33 2023 +0100 kasan: suppress recursive reports for HW_TAGS KASAN suppresses reports for bad accesses done by the KASAN reporting code. The reporting code might access poisoned memory for reporting purposes. Software KASAN modes do this by suppressing reports during reporting via current->kasan_depth, the same way they suppress reports during accesses to poisoned slab metadata. Hardware Tag-Based KASAN does not use current->kasan_depth, and instead resets pointer tags for accesses to poisoned memory done by the reporting code. Despite that, a recursive report can still happen: 1. On hardware with faulty MTE support. This was observed by Weizhao Ouyang on a faulty hardware that caused memory tags to randomly change from time to time. 2. Theoretically, due to a previous MTE-undetected memory corruption. A recursive report can happen via: 1. Accessing a pointer with a non-reset tag in the reporting code, e.g. slab->slab_cache, which is what Weizhao Ouyang observed. 2. Theoretically, via external non-annotated routines, e.g. stackdepot. To resolve this issue, resetting tags for all of the pointers in the reporting code and all the used external routines would be impractical. Instead, disable tag checking done by the CPU for the duration of KASAN reporting for Hardware Tag-Based KASAN. Without this fix, Hardware Tag-Based KASAN reporting code might deadlock. [andreyknvl@google.com: disable preemption instead of migration, fix comment typo] Link: https://lkml.kernel.org/r/d14417c8bc5eea7589e99381203432f15c0f9138.1680114854.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/59f433e00f7fa985e8bf9f7caf78574db16b67ab.1678491668.git.andreyknvl@google.com Fixes: 2e903b914797 ("kasan, arm64: implement HW_TAGS runtime") Signed-off-by: Andrey Konovalov Reported-by: Weizhao Ouyang Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Peter Collingbourne Cc: Vincenzo Frascino Cc: Will Deacon Signed-off-by: Andrew Morton commit 0d3c9468bef98f703c369ced4ec61b0d4a5210ee Author: Andrey Konovalov Date: Sat Mar 11 00:43:32 2023 +0100 kasan, arm64: add arch_suppress_tag_checks_start/stop Add two new tagging-related routines arch_suppress_tag_checks_start/stop that suppress MTE tag checking via the TCO register. These rouines are used in the next patch. [andreyknvl@google.com: drop __ from mte_disable/enable_tco names] Link: https://lkml.kernel.org/r/7ad5e5a9db79e3aba08d8f43aca24350b04080f6.1680114854.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/75a362551c3c54b70ae59a3492cabb51c105fa6b.1678491668.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Peter Collingbourne Cc: Vincenzo Frascino Cc: Weizhao Ouyang Cc: Will Deacon Signed-off-by: Andrew Morton commit 2cc029a08493b08581a2f12a584b9e0ef6d7891e Author: Vincenzo Frascino Date: Sat Mar 11 00:43:31 2023 +0100 arm64: mte: rename TCO routines The TCO related routines are used in uaccess methods and load_unaligned_zeropad() but are unrelated to both even if the naming suggest otherwise. Improve the readability of the code moving the away from uaccess.h and pre-pending them with "mte". [andreyknvl@google.com: drop __ from mte_disable/enable_tco names] Link: https://lkml.kernel.org/r/74d26337b2360733956114069e96ff11c296a944.1680114854.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/a48e7adce1248c0f9603a457776d59daa0ef734b.1678491668.git.andreyknvl@google.com Signed-off-by: Vincenzo Frascino Signed-off-by: Catalin Marinas Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Peter Collingbourne Cc: Weizhao Ouyang Cc: Will Deacon Signed-off-by: Andrew Morton commit 0eafff1c5a56893ca9708fb8ff1327a738b242e9 Author: Andrey Konovalov Date: Sat Mar 11 00:43:30 2023 +0100 kasan, arm64: rename tagging-related routines Rename arch_enable_tagging_sync/async/asymm to arch_enable_tag_checks_sync/async/asymm, as the new name better reflects their function. Also rename kasan_enable_tagging to kasan_enable_hw_tags for the same reason. Link: https://lkml.kernel.org/r/069ef5b77715c1ac8d69b186725576c32b149491.1678491668.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Peter Collingbourne Cc: Vincenzo Frascino Cc: Weizhao Ouyang Cc: Will Deacon Signed-off-by: Andrew Morton commit e34f1e2ee0982a0ebed9e71f18d1b9529df43cd5 Author: Andrey Konovalov Date: Sat Mar 11 00:43:29 2023 +0100 kasan: drop empty tagging-related defines mm/kasan/kasan.h provides a number of empty defines for a few arch-specific tagging-related routines, in case the architecture code didn't define them. The original idea was to simplify integration in case another architecture starts supporting memory tagging. However, right now, if any of those routines are not provided by an architecture, Hardware Tag-Based KASAN won't work. Drop the empty defines, as it would be better to get compiler errors rather than runtime crashes when adding support for a new architecture. Also drop empty hw_enable_tagging_sync/async/asymm defines for !CONFIG_KASAN_HW_TAGS case, as those are only used in mm/kasan/hw_tags.c. Link: https://lkml.kernel.org/r/bc919c144f8684a7fd9ba70c356ac2a75e775e29.1678491668.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Catalin Marinas [arm64] Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Peter Collingbourne Cc: Vincenzo Frascino Cc: Weizhao Ouyang Cc: Will Deacon Signed-off-by: Andrew Morton commit 66dabbb65d673aef40dd17bf62c042be8f6d4a4b Author: Christoph Hellwig Date: Tue Mar 7 15:34:10 2023 +0100 mm: return an ERR_PTR from __filemap_get_folio Instead of returning NULL for all errors, distinguish between: - no entry found and not asked to allocated (-ENOENT) - failed to allocate memory (-ENOMEM) - would block (-EAGAIN) so that callers don't have to guess the error based on the passed in flags. Also pass through the error through the direct callers: filemap_get_folio, filemap_lock_folio filemap_grab_folio and filemap_get_incore_folio. [hch@lst.de: fix null-pointer deref] Link: https://lkml.kernel.org/r/20230310070023.GA13563@lst.de Link: https://lkml.kernel.org/r/20230310043137.GA1624890@u2004 Link: https://lkml.kernel.org/r/20230307143410.28031-8-hch@lst.de Signed-off-by: Christoph Hellwig Acked-by: Ryusuke Konishi [nilfs2] Cc: Andreas Gruenbacher Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Naoya Horiguchi Signed-off-by: Andrew Morton commit 48c9d11375fc66f1e59d0e9b27d121e015a50904 Author: Christoph Hellwig Date: Tue Mar 7 15:34:09 2023 +0100 mm: remove FGP_ENTRY FGP_ENTRY is unused now, so remove it. Link: https://lkml.kernel.org/r/20230307143410.28031-7-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Andreas Gruenbacher Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Ryusuke Konishi Signed-off-by: Andrew Morton commit aaeb94eb86c58a89e70ae2dda46e137a72508ae3 Author: Christoph Hellwig Date: Tue Mar 7 15:34:08 2023 +0100 shmem: open code the page cache lookup in shmem_get_folio_gfp Use the very low level filemap_get_entry helper to look up the entry in the xarray, and then: - don't bother locking the folio if only doing a userfault notification - open code locking the page and checking for truncation in a related code block This will allow to eventually remove the FGP_ENTRY flag. [hughd@google.com: adjust the new comment line] Link: https://lkml.kernel.org/r/af178ebb-1076-a38c-1dc1-2a37ccce4a3@google.com Link: https://lkml.kernel.org/r/20230307143410.28031-6-hch@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Hugh Dickins Acked-by: Hugh Dickins Cc: Andreas Gruenbacher Cc: Matthew Wilcox (Oracle) Cc: Ryusuke Konishi Signed-off-by: Andrew Morton commit 81914aff84e83561ab556dab380e7bbe9c2102b1 Author: Hugh Dickins Date: Sun Mar 19 22:19:21 2023 -0700 shmem: shmem_get_partial_folio use filemap_get_entry To avoid use of the FGP_ENTRY flag, adapt shmem_get_partial_folio() to use filemap_get_entry() and folio_lock() instead of __filemap_get_folio(). Update "page" in the comments there to "folio". Link: https://lkml.kernel.org/r/9d1aaa4-1337-fb81-6f37-74ebc96f9ef@google.com Signed-off-by: Hugh Dickins Cc: Andreas Gruenbacher Cc: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Ryusuke Konishi Signed-off-by: Andrew Morton commit 097b3e59b25e61481d93c6da5472319c0b7249e8 Author: Christoph Hellwig Date: Tue Mar 7 15:34:06 2023 +0100 mm: use filemap_get_entry in filemap_get_incore_folio filemap_get_incore_folio wants to look at the details of xa_is_value entries, but doesn't need any of the other logic in filemap_get_folio. Switch it to use the lower-level filemap_get_entry interface. Link: https://lkml.kernel.org/r/20230307143410.28031-4-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Matthew Wilcox (Oracle) Cc: Andreas Gruenbacher Cc: Hugh Dickins Cc: Ryusuke Konishi Signed-off-by: Andrew Morton commit 263e721e3ba1f3b42ad61aed3d504f3c8c9c0eb6 Author: Christoph Hellwig Date: Tue Mar 7 15:34:05 2023 +0100 mm: make mapping_get_entry available outside of filemap.c mapping_get_entry is useful for page cache API users that need to know about xa_value internals. Rename it and make it available in pagemap.h. Link: https://lkml.kernel.org/r/20230307143410.28031-3-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Matthew Wilcox (Oracle) Cc: Andreas Gruenbacher Cc: Hugh Dickins Cc: Ryusuke Konishi Signed-off-by: Andrew Morton commit 1fb130b226a6385362899381e0025ba413cb27e6 Author: Christoph Hellwig Date: Tue Mar 7 15:34:04 2023 +0100 mm: don't look at xarray value entries in split_huge_pages_in_file Patch series "return an ERR_PTR from __filemap_get_folio", v3. __filemap_get_folio and its wrappers can return NULL for three different conditions, which in some cases requires the caller to reverse engineer the decision making. This is fixed by returning an ERR_PTR instead of NULL and thus transporting the reason for the failure. But to make that work we first need to ensure that no xa_value special case is returned and thus return the FGP_ENTRY flag. It turns out that flag is barely used and can usually be deal with in a better way. This patch (of 7): split_huge_pages_in_file never wants to do anything with the special value enties. Switch to using filemap_get_folio to not even see them. Link: https://lkml.kernel.org/r/20230307143410.28031-1-hch@lst.de Link: https://lkml.kernel.org/r/20230307143410.28031-2-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Matthew Wilcox (Oracle) Cc: Hugh Dickins Cc: Andreas Gruenbacher Cc: Ryusuke Konishi Signed-off-by: Andrew Morton commit 2d55c16c0c54325bf15286cfa6ba6c268036b9e4 Author: Keith Busch Date: Thu Jan 26 13:51:25 2023 -0800 dmapool: create/destroy cleanup Set the 'empty' bool directly from the result of the function that determines its value instead of adding additional logic. Link: https://lkml.kernel.org/r/20230126215125.4069751-13-kbusch@meta.com Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Cc: Tony Battersby Signed-off-by: Andrew Morton commit a4de12a032fa6d0670aa0bb43a2bf9f812680d0f Author: Keith Busch Date: Thu Jan 26 13:51:24 2023 -0800 dmapool: link blocks across pages The allocated dmapool pages are never freed for the lifetime of the pool. There is no need for the two level list+stack lookup for finding a free block since nothing is ever removed from the list. Just use a simple stack, reducing time complexity to constant. The implementation inserts the stack linking elements and the dma handle of the block within itself when freed. This means the smallest possible dmapool block is increased to at most 16 bytes to accommodate these fields, but there are no exisiting users requesting a dma pool smaller than that anyway. Removing the list has a significant change in performance. Using the kernel's micro-benchmarking self test: Before: # modprobe dmapool_test dmapool test: size:16 blocks:8192 time:57282 dmapool test: size:64 blocks:8192 time:172562 dmapool test: size:256 blocks:8192 time:789247 dmapool test: size:1024 blocks:2048 time:371823 dmapool test: size:4096 blocks:1024 time:362237 After: # modprobe dmapool_test dmapool test: size:16 blocks:8192 time:24997 dmapool test: size:64 blocks:8192 time:26584 dmapool test: size:256 blocks:8192 time:33542 dmapool test: size:1024 blocks:2048 time:9022 dmapool test: size:4096 blocks:1024 time:6045 The module test allocates quite a few blocks that may not accurately represent how these pools are used in real life. For a more marco level benchmark, running fio high-depth + high-batched on nvme, this patch shows submission and completion latency reduced by ~100usec each, 1% IOPs improvement, and perf record's time spent in dma_pool_alloc/free were reduced by half. [kbusch@kernel.org: push new blocks in ascending order] Link: https://lkml.kernel.org/r/20230221165400.1595247-1-kbusch@meta.com Link: https://lkml.kernel.org/r/20230126215125.4069751-12-kbusch@meta.com Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Tested-by: Bryan O'Donoghue Cc: Matthew Wilcox Cc: Tony Battersby Signed-off-by: Andrew Morton commit 9d062a8a4c6d5e6d1591cde41ac844d11f953ad8 Author: Keith Busch Date: Thu Jan 26 13:51:23 2023 -0800 dmapool: don't memset on free twice If debug is enabled, dmapool will poison the range, so no need to clear it to 0 immediately before writing over it. Link: https://lkml.kernel.org/r/20230126215125.4069751-11-kbusch@meta.com Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Cc: Tony Battersby Signed-off-by: Andrew Morton commit 887aef615818dba18333be6f08de1922a475a15b Author: Keith Busch Date: Thu Jan 26 13:51:22 2023 -0800 dmapool: simplify freeing The actions for busy and not busy are mostly the same, so combine these and remove the unnecessary function. Also, the pool is about to be freed so there's no need to poison the page data since we only check for poison on alloc, which can't be done on a freed pool. Link: https://lkml.kernel.org/r/20230126215125.4069751-10-kbusch@meta.com Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Cc: Tony Battersby Signed-off-by: Andrew Morton commit 2591b516533ba2564f086bd88f1f5e97084e4b1c Author: Keith Busch Date: Thu Jan 26 13:51:21 2023 -0800 dmapool: consolidate page initialization Various fields of the dma pool are set in different places. Move it all to one function. Link: https://lkml.kernel.org/r/20230126215125.4069751-9-kbusch@meta.com Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Cc: Tony Battersby Signed-off-by: Andrew Morton commit 36d1a28921a4012288e17ef5ac98329ce440d410 Author: Keith Busch Date: Thu Jan 26 13:51:20 2023 -0800 dmapool: rearrange page alloc failure handling Handle the error in a condition so the good path can be in the normal flow. Link: https://lkml.kernel.org/r/20230126215125.4069751-8-kbusch@meta.com Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Cc: Tony Battersby Signed-off-by: Andrew Morton commit 52e7d56539794b20fb9458c06292dfd24bba6a2d Author: Keith Busch Date: Thu Jan 26 13:51:19 2023 -0800 dmapool: move debug code to own functions Clean up the normal path by moving the debug code outside it. Link: https://lkml.kernel.org/r/20230126215125.4069751-7-kbusch@meta.com Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Cc: Tony Battersby Signed-off-by: Andrew Morton commit 19f504584038f6d27846b19ee413a6ac1ee0f765 Author: Tony Battersby Date: Thu Jan 26 13:51:18 2023 -0800 dmapool: speedup DMAPOOL_DEBUG with init_on_alloc Avoid double-memset of the same allocated memory in dma_pool_alloc() when both DMAPOOL_DEBUG is enabled and init_on_alloc=1. Link: https://lkml.kernel.org/r/20230126215125.4069751-6-kbusch@meta.com Signed-off-by: Tony Battersby Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 347e4e44c0a98abcee3caadd222e3e3896c6d2a8 Author: Tony Battersby Date: Thu Jan 26 13:51:17 2023 -0800 dmapool: cleanup integer types To represent the size of a single allocation, dmapool currently uses 'unsigned int' in some places and 'size_t' in other places. Standardize on 'unsigned int' to reduce overhead, but use 'size_t' when counting all the blocks in the entire pool. Link: https://lkml.kernel.org/r/20230126215125.4069751-5-kbusch@meta.com Signed-off-by: Tony Battersby Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 65216545436bb072b1ab575aa37173a05f3993c0 Author: Tony Battersby Date: Thu Jan 26 13:51:16 2023 -0800 dmapool: use sysfs_emit() instead of scnprintf() Use sysfs_emit instead of scnprintf, snprintf or sprintf. Link: https://lkml.kernel.org/r/20230126215125.4069751-4-kbusch@meta.com Signed-off-by: Tony Battersby Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit 7f796d141c07c6d1984d17885d2276980726ba64 Author: Tony Battersby Date: Thu Jan 26 13:51:15 2023 -0800 dmapool: remove checks for dev == NULL dmapool originally tried to support pools without a device because dma_alloc_coherent() supports allocations without a device. But nobody ended up using dma pools without a device, and trying to do so will result in an oops. So remove the checks for pool->dev == NULL since they are unneeded bloat. [kbusch@kernel.org: add check for null dev on create] Link: https://lkml.kernel.org/r/20230126215125.4069751-3-kbusch@meta.com Signed-off-by: Tony Battersby Signed-off-by: Keith Busch Reviewed-by: Christoph Hellwig Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit def8574308edbc3bca821fb965e429a2fe5f4971 Author: Keith Busch Date: Thu Jan 26 13:51:14 2023 -0800 dmapool: add alloc/free performance test Patch series "dmapool enhancements", v4. Time spent in dma_pool alloc/free increases linearly with the number of pages backing the pool. We can reduce this to constant time with minor changes to how free pages are tracked. This patch (of 12): Provide a module that allocates and frees many blocks of various sizes and report how long it takes. This is intended to provide a consistent way to measure how changes to the dma_pool_alloc/free routines affect timing. Link: https://lkml.kernel.org/r/20230126215125.4069751-1-kbusch@meta.com Link: https://lkml.kernel.org/r/20230126215125.4069751-2-kbusch@meta.com Signed-off-by: Keith Busch Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Tony Battersby Signed-off-by: Andrew Morton commit b536f32b5b034f592df0f0ba129ad59fa0f3e532 Author: Shenwei Wang Date: Mon Apr 3 17:23:02 2023 -0500 net: stmmac: dwmac-imx: use platform specific reset for imx93 SoCs The patch addresses an issue with the reset logic on the i.MX93 SoC, which requires configuration of the correct interface speed under RMII mode to complete the reset. The patch implements a fix_soc_reset function and uses it specifically for the i.MX93 SoCs. Reviewed-by: Fabio Estevam Signed-off-by: Shenwei Wang Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230403222302.328262-2-shenwei.wang@nxp.com Signed-off-by: Jakub Kicinski commit 10739ea3132861b1344264b110ea48d951a0e3b0 Author: Shenwei Wang Date: Mon Apr 3 17:23:01 2023 -0500 net: stmmac: add support for platform specific reset This patch adds support for platform-specific reset logic in the stmmac driver. Some SoCs require a different reset mechanism than the standard dwmac IP reset. To support these platforms, a new function pointer 'fix_soc_reset' is added to the plat_stmmacenet_data structure. The stmmac_reset in hwif.h is modified to call the 'fix_soc_reset' function if it exists. This enables the driver to use the platform-specific reset logic when necessary. Signed-off-by: Shenwei Wang Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230403222302.328262-1-shenwei.wang@nxp.com Signed-off-by: Jakub Kicinski commit b0d87ed27be7853af8f897c3cfcb9ddc5179a2a3 Author: Adham Faris Date: Wed Mar 15 16:36:22 2023 +0200 net/mlx5e: Fix SQ SW state layout in SQ devlink health diagnostics Remove nesting level before SQ's SW state title and before SQ's SW state capabilities line. Preceding the SQ's SW state with a nameless nesting, wraps the inner SW state map/dictionary with a nameless dictionary which is prohibited in JSON file format. Removing preceding SW state nest by removing function call devlink_fmsg_obj_nest_start() and devlink_fmsg_obj_nest_end(). Signed-off-by: Adham Faris Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 6bd0f349ae70ce1fd325edee23fbe1d27dfbecb6 Author: Adham Faris Date: Wed Mar 15 15:12:45 2023 +0200 net/mlx5e: Fix RQ SW state layout in RQ devlink health diagnostics Remove nesting level before RQ's SW state title and before RQ's SW state capabilities line. Preceding the RQ's SW state with a nameless nesting, wraps the inner SW state map/dictionary with a nameless dictionary which is prohibited in JSON file format. Removing preceding SW state nest by removing function call devlink_fmsg_obj_nest_start() and devlink_fmsg_obj_nest_end(). Signed-off-by: Adham Faris Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit cf1cccae79836aceaecc1d6a2d1c955d1e2e8b0c Author: Gal Pressman Date: Mon Jan 30 15:52:08 2023 +0200 net/mlx5e: Rename misleading skb_pc/cc references in ptp code The 'skb_pc/cc' naming is misleading as the values hold the producer/consumer indices (masked values), not the counters. Rename to 'skb_pi/ci'. Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Reviewed-by: Rahul Rameshbabu Signed-off-by: Saeed Mahameed Reviewed-by: Adham Faris commit 6a40109275626267ebf413ceda81c64719b5c431 Author: Rahul Rameshbabu Date: Wed Mar 8 08:18:22 2023 -0800 net/mlx5: Update cyclecounter shift value to improve ptp free running mode precision Multiplier values are equivalent to 2^(shift constant) since all mlx5 devices advertise a 1Ghz frequency for the internal timer. The previous shift constant of 23 led to internal timer adjustments only taking place when the provided adjustment values were greater than or equal to ~120 ppb or ~7864 scaled ppm. Using a shift constant of 31 enables adjustments when an adjustment parameter is greater than or equal to ~0.47 ppb or ~30.8 scaled ppm. Signed-off-by: Rahul Rameshbabu Reviewed-by: Gal Pressman Reviewed-by: Bar Shapira Signed-off-by: Saeed Mahameed commit 1a62ffcaaabfbefe2094d98f94a241b0b6fa34be Author: Emeel Hakim Date: Thu Dec 29 17:17:47 2022 +0200 net/mlx5e: Remove redundant macsec code Currently macsec_fs_tx_create uses memset to set two parameters to zeros when they are already initialized to zeros. Don't pass macsec_ctx to mlx5e_macsec_fs_add_rule since it's not used. Signed-off-by: Emeel Hakim Reviewed-by: Leon Romanovsky Reviewed-by: Raed Salem Signed-off-by: Saeed Mahameed commit 35c8de16d84632dd73ac17f619f3cb824803c89e Author: Paul Blakey Date: Wed Jan 25 12:03:58 2023 +0200 net/mlx5e: TC, Remove sample and ct limitation Sample action before a ct nat action was not supported when only chain was restored on misses. As to work around that limitation, ct action was reordered to be first (so if hw misses on ct action, packet wasn't modified). This reordering wasn't possible if there was a sample action before the ct nat action, as we had to sample the packet before the nat operation. Now that the misses continue from the relevant tc ct action in software and ct action is no longer reordered, this case is supported. Remove this limitation. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit dc614025e22810eab057fe683cd0042abde3930c Author: Paul Blakey Date: Wed Jan 25 12:01:47 2023 +0200 net/mlx5e: TC, Remove mirror and ct limitation Mirror action before a ct nat action was not supported when only chain was restored on misses. As to work around that limitation, ct action was reordered to be first (so if hw misses on ct action, packet wasn't modified). This reordering wasn't possible if there was mirror action before the ct nat action, as we had to mirror the packet before the nat operation. Now that the misses continue from the relevant tc ct action in software and ct action is no longer reordered, this case is supported. Remove this limitation. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 5d7cb06eb91a3a45de6b7248dd30a93d7c820022 Author: Paul Blakey Date: Wed Jan 25 11:56:28 2023 +0200 net/mlx5e: TC, Remove tuple rewrite and ct limitation Tuple rewrite and ct action was not supported when only chain was restored on misses. To work around that limitation, ct action was reordered to be first (so if hw misses on ct action, packet wasn't modified). This reordering wasn't possible for tuple rewrite actions before ct action since the ct action result was dependent on the tuple info. Now that the misses continue from the relevant tc ct action in software and ct action is no longer reordered, this case is supported. Remove this limitation. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit d0cc0853640d81397572d8152d068cd673a3e739 Author: Paul Blakey Date: Mon Jan 23 10:46:10 2023 +0200 net/mlx5e: TC, Remove multiple ct actions limitation Multiple ct actions was not supported when only chain was restored on misses, as CT is a modifying action which could modify the packet and cause the sw ct rule to not match again and continue processing. Now that the misses continue from the relevant tc ct action in software, this case is supported. Remove this limitation. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 08fe94ec5f77136177197c297a794ea00c3677d7 Author: Paul Blakey Date: Wed Jan 25 16:41:05 2023 +0200 net/mlx5e: TC, Remove special handling of CT action CT action has special treating as a per-flow action since it was assumed to be singular and reordered to be first on the action list. This isn't the case anymore, and can be converted to just a FWD to pre_ct + MODIFY_HEAD, and handled per post_act rule. Remove special handling of CT action, and offload it while post parsing each ct attribute. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 67efaf45930df662111acf7c706d545c83f83999 Author: Paul Blakey Date: Sun Dec 4 16:53:56 2022 +0200 net/mlx5e: TC, Remove CT action reordering CT action reordering was done as a workaround when CT misses used to restore the relevant filter's tc chain and continuing sw processing from that chain. As such, there was a need to reorder CT action to be before any packet modifying actions (e.g mac rewrite). Currently (after patch "net/mlx5e: TC, Set CT miss to the specific ct action instance"), CT misses continues from the relevant ct action in software, and so reordering isn't needed anymore. Remove the reordering. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 13aca17b450e87a8de4e4a3b3ad454efbc576740 Author: Paul Blakey Date: Sun Feb 12 19:11:07 2023 +0200 net/mlx5e: CT: Use per action stats CT action can miss in a middle of an action list, use per action stats to correctly report stats for missed packets. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit a830ec485e8368a29e328d08e2eb28750bbc483f Author: Paul Blakey Date: Wed Jan 25 11:54:22 2023 +0200 net/mlx5e: TC, Move main flow attribute cleanup to helper func Actions that can be setup per flow attribute (so per split rule) are cleaned up from mlx5_free_flow_attr(), mlx5e_tc_del_fdb_flow(), and free_flow_post_acts(). Remove the duplication by re-using the helper function for the main flow attribute and split rules attributes. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 7195d9a0c8df0ab78c9d7a587809d16b00432426 Author: Paul Blakey Date: Thu Dec 1 12:04:58 2022 +0200 net/mlx5e: TC, Remove unused vf_tun variable vf_tun is being assigned but never being used so remove it. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 0840c9f7d80b1baf959d0ddcedc97c9f383ded1c Author: Paul Blakey Date: Mon Mar 13 15:38:52 2023 +0200 net/mlx5e: Set default can_offload action Many parsers of tc actions just return true on their can_offload() implementation, without checking the input flow/action. Set the default can_offload action to true (allow), and avoid having many can_offload implementations that do just that. This patch doesn't change any functionality. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit eda09fe149df41a0493137df946834133a87330d Author: Marek Vasut Date: Wed Apr 5 18:52:14 2023 +0200 arm64: dts: imx8mp: Add display pipeline components Add LCDIF scanout engine and DSIM bridge nodes for i.MX8M Plus. This makes the DSI display pipeline available on this SoC. Reviewed-by: Fabio Estevam Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit d825fb6455d5c5f8689e1b54f5c03a1aac094608 Author: Marek Vasut Date: Wed Apr 5 18:52:13 2023 +0200 arm64: dts: imx8mn: Add display pipeline components Add LCDIF scanout engine and DSIM bridge nodes for i.MX8M Nano. This makes the DSI display pipeline available on this SoC. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit c8c96afa6e7ab025c345b84be2c9d65eb87d86e0 Author: Marek Vasut Date: Wed Apr 5 18:52:12 2023 +0200 arm64: dts: imx8mm: Add display pipeline components Add LCDIF scanout engine and DSIM bridge nodes for i.MX8M Mini. This makes the DSI display pipeline available on this SoC. Reviewed-by: Alexander Stein Reviewed-by: Fabio Estevam Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 27cc508d61d8b7a44b7b79450e2df9cf13dbe616 Author: Stefan Wahren Date: Tue Apr 4 10:02:43 2023 +0200 ARM: imx_v6_v7_defconfig: Enable Tarragon peripheral drivers We need to enable some drivers in order to use the following peripherals of Tarragon: * QCA7000/7005 Powerline chip * One-Wire Master DS2484 with external thermal sensors * external 4 pin PWM fan * ST IIS328DQ I2C accelerometer Signed-off-by: Stefan Wahren Signed-off-by: Shawn Guo commit 5e4f393ccbf0af0828ab0914695649a5b90db230 Author: Stefan Wahren Date: Tue Apr 4 10:02:42 2023 +0200 ARM: dts: imx6ull: Add chargebyte Tarragon support This adds the support for chargebyte Tarragon, which is an Electrical Vehicle Supply Equipment (EVSE) for AC charging stations (according to IEC 61851, ISO 15118). The Tarragon board is based on an i.MX6ULL SoC and is available in 4 variants (Master, Slave, SlaveXT, Micro), which provide more or less peripherals. Supported features: * 512 MB DDR RAM * eMMC * Debug UART * 100 Mbit Ethernet * USB 2.0 Host interface * Powerline communication (QCA700x) * 2x RS485 * Digital in- and outputs (12 V) * One-Wire master for external temp sensors * 2x relay outputs * 2x motor interfaces Link: https://chargebyte.com/products/charging-station-communication/charge-control-c Signed-off-by: Stefan Wahren Signed-off-by: Shawn Guo commit 2faf4ebcee2e587e9a82dd14c9584acab2ce0fce Author: Frank Li Date: Mon Mar 27 10:55:23 2023 -0400 arm64: dts: freescale: imx8qxp-mek: enable cadence usb3 Enable USB3 controller, phy and typec related nodes. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit a8bd7f155126912e39568e3cfa59a4699d985583 Author: Frank Li Date: Mon Mar 27 10:55:22 2023 -0400 arm64: dts: imx8qxp: add cadence usb3 support There are cadence usb3.0 controller in 8qxp and 8qm. Add usb3 node at common connect subsystem. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit 2858e62e5d192e7579ce9152457705ff98c62387 Author: Peng Fan Date: Tue Mar 28 14:11:23 2023 +0800 arm64: dts: imx8mq-librem5: add missing #clock-cells '#clock-cells' is a dependency of 'clock-output-names', following binding doc, add it. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit cb562edda04242b9b37d27e26175c562d798e54c Author: Peng Fan Date: Tue Mar 28 11:36:40 2023 +0800 arm64: dts: imx8mm-prt8mm: update pinctrl to match dtschema The dtschema requires 'grp' in the end, so update the name Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 4629e559d95ef811bb28bc799828d6225a68749b Author: Peng Fan Date: Tue Mar 28 11:36:39 2023 +0800 arm64: dts: imx8mn-bsh-smm: update pinctrl to match dtschema The dtschema requires 'grp' in the end, so update the name Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 6de2a9e20f7450150206d785efcb209b848e1aba Author: Peng Fan Date: Tue Mar 28 11:36:38 2023 +0800 arm64: dts: imx8mm-emcon: update pinctrl to match dtschema The dtschema requires 'grp' in the end, so update the name Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 72783d652005d6732903c35a323170d57f5dab8f Author: Peng Fan Date: Tue Mar 28 11:36:37 2023 +0800 arm64: dts: imx8mq-librem5: update pinctrl to match dtschema The dtschema requires 'grp' in the end, so update the name. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 523306b6608c49a39aff772039e96510f2ebc0bf Author: Peng Fan Date: Tue Mar 28 11:36:36 2023 +0800 arm64: dts: imx8mm-ddr4-evk: update gpmi pinctrl to match dtschema The dtschema requires 'grp' in the end, so update the name. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 788fd97b244627347519c392f30b63850f6667a4 Author: Peng Fan Date: Tue Mar 28 11:36:35 2023 +0800 arm64: dts: imx8mn-evk: update i2c pinctrl to match dtschema The dtschema requires 'grp' in the end, so update the name. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 7c0277ab8c209ec9fb5d5c112577958a6236b57b Author: Uwe Kleine-König Date: Mon Mar 27 19:35:26 2023 +0200 arm64: dts: imx8mp: Add GPT blocks The i.MX8MP includes the same GPT blocks as the i.MX6DL. Add all 6 instances. Signed-off-by: Uwe Kleine-König Signed-off-by: Shawn Guo commit 30c6a9a64211300c93cb261f1f8509983e273100 Author: Peng Fan Date: Wed Mar 22 13:25:03 2023 +0800 arm64: dts: imx8-apalis-v1.1: drop ci-disable-lpm This is an NXP downstream property. And no binding doc, and no driver use this property. So drop it Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 8b0f256530d97f2a2310c4f8336ea2c477c8e6c4 Author: Pedro Tammela Date: Tue Apr 4 17:34:49 2023 -0300 net/sched: sch_mqprio: use netlink payload helpers For the sake of readability, use the netlink payload helpers from the 'nla_get_*()' family to parse the attributes. tdc results: 1..5 ok 1 9903 - Add mqprio Qdisc to multi-queue device (8 queues) ok 2 453a - Delete nonexistent mqprio Qdisc ok 3 5292 - Delete mqprio Qdisc twice ok 4 45a9 - Add mqprio Qdisc to single-queue device ok 5 2ba9 - Show mqprio class Acked-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230404203449.1627033-1-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit f037897669051d53551a2b198b2519356d59d491 Author: Rob Herring Date: Tue Apr 4 15:41:52 2023 -0500 dt-bindings: net: dsa: brcm,sf2: Drop unneeded "#address-cells/#size-cells" There's no need for "#address-cells/#size-cells" in the brcm,sf2 node as no immediate child nodes have an address. What was probably intended was to put them in the 'ports' node, but that's not necessary as that is covered by ethernet-switch.yaml via dsa.yaml. Signed-off-by: Rob Herring Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230404204152.635400-1-robh@kernel.org Signed-off-by: Jakub Kicinski commit c8f1f2e946757e5130882d23c6beded32d87ed0c Author: Rob Herring Date: Tue Apr 4 15:42:13 2023 -0500 dt-bindings: net: ethernet-switch: Make "#address-cells/#size-cells" required The schema doesn't allow for a single (unaddressed) ethernet port node nor does a single port switch make much sense. So if there's always multiple child nodes, "#address-cells" and "#size-cells" should be required. Signed-off-by: Rob Herring Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230404204213.635773-1-robh@kernel.org Signed-off-by: Jakub Kicinski commit acd11255ca466557f63ee8d676f26ba465eb1b15 Merge: 2acbeb5db2b45 cbef9a83c51df Author: Jakub Kicinski Date: Wed Apr 5 17:25:02 2023 -0700 Merge tag 'wireless-next-2023-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.3 Smaller pull request this time, sending this early to fix the conflict in mac80211. Nothing really special this time, only smaller changes. * enable Wi-Fi 7 (EHT) mesh support * tag 'wireless-next-2023-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (37 commits) wifi: rt2x00: Fix memory leak when handling surveys wifi: b43legacy: Remove the unused function prev_slot() wifi: rtw89: Remove redundant pci_clear_master wifi: rtw89: fix potential race condition between napi_init and napi_enable wifi: rtw89: config EDCCA threshold during scan to prevent TX failed wifi: rtw89: fix incorrect channel info during scan due to ppdu_sts filtering wifi: rtw89: remove superfluous H2C of join_info wifi: rtw89: set data lowest rate according to AP supported rate wifi: rtw89: add counters of register-based H2C/C2H wifi: rtw89: coex: Update Wi-Fi Bluetooth coexistence version to 7.0.1 wifi: rtw89: coex: Add report control v5 variation wifi: rtw89: coex: Update RTL8852B LNA2 hardware parameter wifi: rtw89: coex: Not to enable firmware report when WiFi is power saving wifi: rtw89: coex: Add LPS protocol radio state for RTL8852B bcma: remove unused mips_read32 function bcma: Use of_address_to_resource() wifi: mwifiex: remove unused evt_buf variable wifi: brcmsmac: ampdu: remove unused suc_mpdu variable wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_reg() wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_rfreg() ... ==================== Link: https://lore.kernel.org/r/20230405111037.4792BC43443@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 2acbeb5db2b45ebf22ef1197490f07d3813d4e25 Merge: 054fbf7ff8143 1afae605e0b2d Author: Jakub Kicinski Date: Wed Apr 5 17:06:02 2023 -0700 Merge tag 'linux-can-next-for-6.4-20230404-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2023-04-04-2 The first patch is by Oliver Hartkopp and makes the maximum pdu size of the CAN ISOTP protocol configurable. The following 5 patches are by Dario Binacchi and add support for the bxCAN controller by ST. Geert Uytterhoeven's patch for the rcar_canfd driver fixes a sparse warning. Peng Fan's patch adds an optional power-domains property to the flexcan device tree binding. Frank Jungclaus adds support for CAN_CTRLMODE_BERR_REPORTING to the esd_usb driver. The last patch is by Oliver Hartkopp and converts the USB IDs of the kvaser_usb driver to hexadecimal values. * tag 'linux-can-next-for-6.4-20230404-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: kvaser_usb: convert USB IDs to hexadecimal values can: esd_usb: Add support for CAN_CTRLMODE_BERR_REPORTING dt-bindings: can: fsl,flexcan: add optional power-domains property can: rcar_canfd: rcar_canfd_probe(): fix plain integer in transceivers[] init can: bxcan: add support for ST bxCAN controller ARM: dts: stm32: add pin map for CAN controller on stm32f4 ARM: dts: stm32: add CAN support on stm32f429 dt-bindings: net: can: add STM32 bxcan DT bindings dt-bindings: arm: stm32: add compatible for syscon gcan node can: isotp: add module parameter for maximum pdu size ==================== Link: https://lore.kernel.org/r/20230404145908.1714400-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 7712145073876092e9aa81f0b836fef8b5694b14 Author: Hao Ge Date: Wed Apr 5 18:13:50 2023 +0800 KVM: selftests: Close opened file descriptor in stable_tsc_check_supported() Close the "current_clocksource" file descriptor before returning or exiting from stable_tsc_check_supported() in vmx_nested_tsc_scaling_test. Signed-off-by: Hao Ge Reviewed-by: Vipin Sharma Link: https://lore.kernel.org/r/20230405101350.259000-1-gehao@kylinos.cn Signed-off-by: Sean Christopherson commit 098f4c061ea10b777033b71c10bd9fd706820ee9 Author: Sean Christopherson Date: Sat Jan 28 00:14:27 2023 +0000 KVM: x86/pmu: Disallow legacy LBRs if architectural LBRs are available Disallow enabling LBR support if the CPU supports architectural LBRs. Traditional LBR support is absent on CPU models that have architectural LBRs, and KVM doesn't yet support arch LBRs, i.e. KVM will pass through non-existent MSRs if userspace enables LBRs for the guest. Cc: stable@vger.kernel.org Cc: Yang Weijiang Cc: Like Xu Reported-by: Paolo Bonzini Fixes: be635e34c284 ("KVM: vmx/pmu: Expose LBR_FMT in the MSR_IA32_PERF_CAPABILITIES") Tested-by: Like Xu Link: https://lore.kernel.org/r/20230128001427.2548858-1-seanjc@google.com Signed-off-by: Sean Christopherson commit 944a8dad8b4eb0b565cc36600ee1339c21278d76 Author: Tom Rix Date: Mon Apr 3 21:01:41 2023 -0400 KVM: x86: set "mitigate_smt_rsb" storage-class-specifier to static smatch reports arch/x86/kvm/x86.c:199:20: warning: symbol 'mitigate_smt_rsb' was not declared. Should it be static? This variable is only used in one file so it should be static. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230404010141.1913667-1-trix@redhat.com Signed-off-by: Sean Christopherson commit 7e768ce8278bafe43e2a4771a82b61856190a3fc Author: Like Xu Date: Tue Apr 4 15:17:59 2023 +0800 KVM: x86/pmu: Zero out pmu->all_valid_pmc_idx each time it's refreshed The kvm_pmu_refresh() may be called repeatedly (e.g. configure guest CPUID repeatedly or update MSR_IA32_PERF_CAPABILITIES) and each call will use the last pmu->all_valid_pmc_idx value, with the residual bits introducing additional overhead later in the vPMU emulation. Fixes: b35e5548b411 ("KVM: x86/vPMU: Add lazy mechanism to release perf_event per vPMC") Suggested-by: Sean Christopherson Signed-off-by: Like Xu Link: https://lore.kernel.org/r/20230404071759.75376-1-likexu@tencent.com Signed-off-by: Sean Christopherson commit 5d844091f2370f01752c3129b147861b9dcd3d98 Author: Ville Syrjälä Date: Tue Apr 4 01:36:52 2023 +0300 drm/scdc-helper: Pimp SCDC debugs Include the device and connector information in the SCDC debugs. Makes it easier to figure out who did what. v2: Rely on connector->ddc (Maxime) Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: Thierry Reding Cc: Emma Anholt Cc: Maxime Ripard Cc: intel-gfx@lists.freedesktop.org Cc: linux-tegra@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230403223652.18848-1-ville.syrjala@linux.intel.com Reviewed-by: Laurent Pinchart Acked-by: Maxime Ripard Reviewed-by: Andrzej Hajda Acked-by: Thierry Reding commit 5af607a861d43ffff830fc1890033e579ec44799 Author: YiFei Zhu Date: Wed Apr 5 19:33:54 2023 +0000 selftests/bpf: Wait for receive in cg_storage_multi test In some cases the loopback latency might be large enough, causing the assertion on invocations to be run before ingress prog getting executed. The assertion would fail and the test would flake. This can be reliably reproduced by arbitrarily increasing the loopback latency (thanks to [1]): tc qdisc add dev lo root handle 1: htb default 12 tc class add dev lo parent 1:1 classid 1:12 htb rate 20kbps ceil 20kbps tc qdisc add dev lo parent 1:12 netem delay 100ms Fix this by waiting on the receive end, instead of instantly returning to the assert. The call to read() will wait for the default SO_RCVTIMEO timeout of 3 seconds provided by start_server(). [1] https://gist.github.com/kstevens715/4598301 Reported-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/9c5c8b7e-1d89-a3af-5400-14fde81f4429@linux.dev/ Fixes: 3573f384014f ("selftests/bpf: Test CGROUP_STORAGE behavior on shared egress + ingress") Acked-by: Stanislav Fomichev Signed-off-by: YiFei Zhu Link: https://lore.kernel.org/r/20230405193354.1956209-1-zhuyifei@google.com Signed-off-by: Martin KaFai Lau commit 4cd4beb98fe5ac2c4bcb995ba6e82322be174abb Merge: e77da13b8e362 54baba33392d4 Author: Conor Dooley Date: Wed Apr 5 22:20:55 2023 +0100 Merge branch 'riscv-jh7110_initial_dts' into riscv-dt-for-next Merge Hal's series adding support for the new StarFive JH7110 SoC. There's a few bindings here for core components that were not picked up by the various maintainers for the subsystems (previously Palmer would pick these up via the RISC-V tree) & the first two commits in the branch are shared with the clk tree, since the dts depends on defines in the dt-binding headers. This is based on -rc2, as the board does not actually boot on -rc1 due to the bug Linus introduced. Signed-off-by: Conor Dooley commit 383b3232732dca5b084a8f90b529d53c18b03e74 Merge: fac79bad889bb 7697c64b9e490 Author: Mark Brown Date: Wed Apr 5 21:56:44 2023 +0100 Migrate the PCIe-IDIO-24 and WS16C48 GPIO drivers Merge series from William Breathitt Gray : The regmap API supports IO port accessors so we can take advantage of regmap abstractions rather than handling access to the device registers directly in the driver. A patch to pass irq_drv_data as a parameter for struct regmap_irq_chip set_type_config() is included. This is needed by the idio_24_set_type_config() and ws16c48_set_type_config() callbacks in order to update the type configuration on their respective devices. commit ee4cce0a8f03a3332ccf48ef8b420a65d02d1fcf Author: Daniel Vetter Date: Tue Apr 4 21:40:38 2023 +0200 drm/fb-helper: fix input validation gaps in check_var Apparently drivers need to check all this stuff themselves, which for most things makes sense I guess. And for everything else we luck out, because modern distros stopped supporting any other fbdev drivers than drm ones and I really don't want to argue anymore about who needs to check stuff. Therefore fixing all this just for drm fbdev emulation is good enough. Note that var->active is not set or validated. This is just control flow for fbmem.c and needs to be validated in there as needed. Reviewed-by: Javier Martinez Canillas Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230404194038.472803-3-daniel.vetter@ffwll.ch commit 36e239b5d509c1b564669e7ca3d016c444bbf808 Author: Daniel Vetter Date: Tue Apr 4 21:40:37 2023 +0200 drm/fb-helper: drop redundant pixclock check from drm_fb_helper_set_par() The fb_check_var hook is supposed to validate all this stuff. Any errors from fb_set_par are considered driver/hw issues and resulting in dmesg warnings. Luckily we do fix up the pixclock already, so this is all fine. Signed-off-by: Daniel Vetter Reviewed-by: Javier Martinez Canillas Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230404194038.472803-2-daniel.vetter@ffwll.ch commit 1935f0deb6116dd785ea64d8035eab0ff441255b Author: Daniel Vetter Date: Tue Apr 4 21:40:36 2023 +0200 drm/fb-helper: set x/yres_virtual in drm_fb_helper_check_var Drivers are supposed to fix this up if needed if they don't outright reject it. Uncovered by 6c11df58fd1a ("fbmem: Check virtual screen sizes in fb_set_var()"). Reported-by: syzbot+20dcf81733d43ddff661@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=c5faf983bfa4a607de530cd3bb008888bf06cefc Cc: stable@vger.kernel.org # v5.4+ Cc: Daniel Vetter Cc: Javier Martinez Canillas Cc: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20230404194038.472803-1-daniel.vetter@ffwll.ch commit e62fc18213632ee11e35ea1e954a9156cd67a792 Author: Rob Herring Date: Tue Jan 24 17:02:28 2023 -0600 dt-bindings: Add missing (unevaluated|additional)Properties on child node schemas Just as unevaluatedProperties or additionalProperties are required at the top level of schemas, they should (and will) also be required for child node schemas. That ensures only documented properties are present. Add unevaluatedProperties or additionalProperties as appropriate, and then add any missing properties flagged by the addition. Acked-by: Sebastian Reichel Acked-by: Guenter Roeck Acked-by: Greg Kroah-Hartman Acked-by: Mark Brown Acked-by: Lee Jones Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230124230228.372305-1-robh@kernel.org Signed-off-by: Rob Herring commit 73afb20716e163cdaf662af30d3597aeaacc6a0b Merge: bd81feb8cdbf0 fcbfe8121a451 Author: Arnd Bergmann Date: Wed Apr 5 22:20:00 2023 +0200 Merge branch 'asm-generic-io' into asm-generic * asm-generic-io: Kconfig: introduce HAS_IOPORT option and select it as necessary commit fcbfe8121a45152a3cfbe1c28c96a3b611b7347d Author: Niklas Schnelle Date: Thu Mar 23 17:33:52 2023 +0100 Kconfig: introduce HAS_IOPORT option and select it as necessary We introduce a new HAS_IOPORT Kconfig option to indicate support for I/O Port access. In a future patch HAS_IOPORT=n will disable compilation of the I/O accessor functions inb()/outb() and friends on architectures which can not meaningfully support legacy I/O spaces such as s390. The following architectures do not select HAS_IOPORT: * ARC * C-SKY * Hexagon * Nios II * OpenRISC * s390 * User-Mode Linux * Xtensa All other architectures select HAS_IOPORT at least conditionally. The "depends on" relations on HAS_IOPORT in drivers as well as ifdefs for HAS_IOPORT specific sections will be added in subsequent patches on a per subsystem basis. Co-developed-by: Arnd Bergmann Signed-off-by: Arnd Bergmann Acked-by: Johannes Berg # for ARCH=um Acked-by: Geert Uytterhoeven Signed-off-by: Niklas Schnelle Signed-off-by: Arnd Bergmann commit e34a6ba53e80d7f6c6eb61d0438842d9ba63504a Author: Andy Shevchenko Date: Thu Mar 30 19:24:33 2023 +0300 EISA: Drop unused pci_bus_for_each_resource() index argument pci_bus_for_each_resource() can hide the iterator index if it is not needed otherwise. Drop the index from pci_eisa_init() since it's not needed there. Link: https://lore.kernel.org/r/20230330162434.35055-7-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński Reviewed-by: Philippe Mathieu-Daudé commit 02992064bdffc97403b6058491094cd41d1a11ef Author: Andy Shevchenko Date: Tue Apr 4 10:45:25 2023 -0500 PCI: Make pci_bus_for_each_resource() index optional Refactor pci_bus_for_each_resource() in the same way as pci_dev_for_each_resource(). This allows the index to be hidden inside the implementation so the caller can omit it when it's not used otherwise. No functional changes intended. Link: https://lore.kernel.org/r/20230330162434.35055-6-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński Reviewed-by: Philippe Mathieu-Daudé commit 68e7322142f5e731af222892d384d311835db0f1 Author: Kal Conley Date: Mon Apr 3 14:03:59 2023 +0200 selftests: xsk: Deflakify STATS_RX_DROPPED test Fix flaky STATS_RX_DROPPED test. The receiver calls getsockopt after receiving the last (valid) packet which is not the final packet sent in the test (valid and invalid packets are sent in alternating fashion with the final packet being invalid). Since the last packet may or may not have been dropped already, both outcomes must be allowed. This issue could also be fixed by making sure the last packet sent is valid. This alternative is left as an exercise to the reader (or the benevolent maintainers of this file). This problem was quite visible on certain setups. On one machine this failure was observed 50% of the time. Also, remove a redundant assignment of pkt_stream->nb_pkts. This field is already initialized by __pkt_stream_alloc. Fixes: 27e934bec35b ("selftests: xsk: make stat tests not spin on getsockopt") Signed-off-by: Kal Conley Acked-by: Magnus Karlsson Link: https://lore.kernel.org/r/20230403120400.31018-1-kal.conley@dectris.com Signed-off-by: Martin KaFai Lau commit f2b50f17268390567bc0e95642170d88f336c8f4 Author: Kal Conley Date: Wed Apr 5 10:29:04 2023 +0200 selftests: xsk: Disable IPv6 on VETH1 This change fixes flakiness in the BIDIRECTIONAL test: # [is_pkt_valid] expected length [60], got length [90] not ok 1 FAIL: SKB BUSY-POLL BIDIRECTIONAL When IPv6 is enabled, the interface will periodically send MLDv1 and MLDv2 packets. These packets can cause the BIDIRECTIONAL test to fail since it uses VETH0 for RX. For other tests, this was not a problem since they only receive on VETH1 and IPv6 was already disabled on VETH0. Fixes: a89052572ebb ("selftests/bpf: Xsk selftests framework") Signed-off-by: Kal Conley Link: https://lore.kernel.org/r/20230405082905.6303-1-kal.conley@dectris.com Signed-off-by: Martin KaFai Lau commit 14e985482111a2c6bc75a0348701a4acdc5558d8 Author: Christophe JAILLET Date: Sun Apr 2 11:42:07 2023 +0200 clk: Remove mmask and nmask fields in struct clk_fractional_divider All users of these fields have been removed. They are now computed when needed with [mn]shift and [mn]width. This shrinks the size of struct clk_fractional_divider from 72 to 56 bytes. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/680357e5acb338433bfc94114b65b4a4ce2c99e2.1680423909.git.christophe.jaillet@wanadoo.fr Reviewed-by: Heiko Stuebner Signed-off-by: Stephen Boyd commit 645a5198ddba6d6b2dea8346ca796064e931a0c3 Author: Christophe JAILLET Date: Sun Apr 2 11:42:06 2023 +0200 clk: rockchip: Remove values for mmask and nmask in struct clk_fractional_divider Now that fractional_divider clk computes mmask and nmask when needed, there is no more need to provide them explicitly anymore. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/58e1950566e40e2fbb31004baee57a164ca6a390.1680423909.git.christophe.jaillet@wanadoo.fr Reviewed-by: Heiko Stuebner Signed-off-by: Stephen Boyd commit c1e0e392d65dc38e0bf61b6df2f02b9c9e7046a2 Author: Christophe JAILLET Date: Sun Apr 2 11:42:05 2023 +0200 clk: imx: Remove values for mmask and nmask in struct clk_fractional_divider Now that fractional_divider clk computes mmask and nmask when needed, there is no more need to provide them explicitly anymore. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/187a2266c3a034a593a151d6e5e6b21118043b5d.1680423909.git.christophe.jaillet@wanadoo.fr Reviewed-by: Abel Vesa Signed-off-by: Stephen Boyd commit 141b3251c526797769f541b660ed198138f5b23a Author: Christophe JAILLET Date: Sun Apr 2 11:42:04 2023 +0200 clk: Compute masks for fractional_divider clk when needed. There is no real need to pre-compute mmask and nmask when handling fractional_divider clk. They can be computed when needed. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/0fd6357242c974259c9e034c6e28a0391c480bf0.1680423909.git.christophe.jaillet@wanadoo.fr Reviewed-by: Heiko Stuebner Signed-off-by: Stephen Boyd commit 548bd27428b924cb725ab7c1418c0203e61f9ed7 Author: Binbin Wu Date: Tue Apr 4 11:25:02 2023 +0800 KVM: VMX: Use is_64_bit_mode() to check 64-bit mode in SGX handler sgx_get_encls_gva() uses is_long_mode() to check 64-bit mode, however, SGX system leaf instructions are valid in compatibility mode, should use is_64_bit_mode() instead. Fixes: 70210c044b4e ("KVM: VMX: Add SGX ENCLS[ECREATE] handler to enforce CPUID restrictions") Signed-off-by: Binbin Wu Reviewed-by: Kai Huang Link: https://lore.kernel.org/r/20230404032502.27798-1-binbin.wu@linux.intel.com Signed-off-by: Sean Christopherson commit a42077b787680cbc365a96446b30f32399fa3f6f Author: Rae Moar Date: Mon Apr 3 20:19:30 2023 +0000 kunit: add tests for using current KUnit test field Create test suite called "kunit_current" to add test coverage for the use of current->kunit_test, which returns the current KUnit test. Add two test cases: - kunit_current_test to test current->kunit_test and the method kunit_get_current_test(), which utilizes current->kunit_test. - kunit_current_fail_test to test the method kunit_fail_current_test(), which utilizes current->kunit_test. Signed-off-by: Rae Moar Reviewed-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 8110a3cab05ee4a26f36015f0423fb2b5cea1392 Author: Geert Uytterhoeven Date: Tue Feb 28 11:31:03 2023 +0100 kunit: tool: Add support for SH under QEMU Add basic support to run SH under QEMU via kunit_tool using the virtualized r2d platform. Signed-off-by: Geert Uytterhoeven Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 5ffb8629b133fecf7cdd36134ae6d6a1efb46eb5 Author: Geert Uytterhoeven Date: Tue Feb 28 11:31:02 2023 +0100 kunit: tool: Add support for overriding the QEMU serial port On some platforms, the console is not the first serial port. To make this work, the first serial port in QEMU must be set to "null". Add support for this by adding an optional "serial" parameter, which defaults to "stdio", and can be overridden by platform-specific configuration. Signed-off-by: Geert Uytterhoeven Reviewed-by: David Gow Signed-off-by: Shuah Khan commit cb8865fd865f5b2f656d0d91f3b0146ef1acb10d Author: Andy Shevchenko Date: Fri Jan 27 16:57:08 2023 +0200 .gitignore: Unignore .kunitconfig There are almost dozen of .kunitconfig files that are ignored but tracked. Unignore them. Signed-off-by: Andy Shevchenko Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 756aaf2a9a321bf54e9aac75cd9d3a590b1cf392 Merge: 9af87166944b3 ccd1b2933f8cb Author: Martin KaFai Lau Date: Wed Apr 5 11:29:35 2023 -0700 Merge branch 'selftests: xsk: Add test case for packets at end of UMEM' Kal Conley says: ==================== This patchset fixes a minor bug in xskxceiver.c then adds a test case for valid packets at the end of the UMEM. ==================== Signed-off-by: Martin KaFai Lau commit ccd1b2933f8cbc09a8667992425996f19bf62c15 Author: Kal Conley Date: Mon Apr 3 16:50:47 2023 +0200 selftests: xsk: Add test case for packets at end of UMEM Add test case to testapp_invalid_desc for valid packets at the end of the UMEM. Signed-off-by: Kal Conley Acked-by: Magnus Karlsson Link: https://lore.kernel.org/r/20230403145047.33065-3-kal.conley@dectris.com Signed-off-by: Martin KaFai Lau commit 7a2050df244e2c9a4e90882052b7907450ad10ed Author: Kal Conley Date: Mon Apr 3 16:50:46 2023 +0200 selftests: xsk: Use correct UMEM size in testapp_invalid_desc Avoid UMEM_SIZE macro in testapp_invalid_desc which is incorrect when the frame size is not XSK_UMEM__DEFAULT_FRAME_SIZE. Also remove the macro since it's no longer being used. Fixes: 909f0e28207c ("selftests: xsk: Add tests for 2K frame size") Signed-off-by: Kal Conley Acked-by: Magnus Karlsson Link: https://lore.kernel.org/r/20230403145047.33065-2-kal.conley@dectris.com Signed-off-by: Martin KaFai Lau commit 601e5d464d535d655917c2cfb29c394d367fb676 Merge: eeac8ede17557 63a30e1f44d5e Author: Stephen Boyd Date: Wed Apr 5 11:21:30 2023 -0700 Merge tag 'riscv-jh7110-clk-reset-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into clk-starfive Pull Starfive clk driver updates from Conor Dooley: - Initial JH7110 clk/reset support A rake of patches, initially worked on by Emil & later picked up by Hal that add support for the sys/aon clock & reset controllers on StarFive's JH7110 SoC. This SoC is largely similar to the existing JH7100, so a bunch of refactoring is done to share as many bits as possible between the two. What's here (plus the already applied pinctrl bits) should be sufficient to boot a basic initramfs. Signed-off-by: Conor Dooley * tag 'riscv-jh7110-clk-reset-for-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: MAINTAINERS: generalise StarFive clk/reset entries reset: starfive: Add StarFive JH7110 reset driver clk: starfive: Add StarFive JH7110 always-on clock driver clk: starfive: Add StarFive JH7110 system clock driver reset: starfive: jh71x0: Use 32bit I/O on 32bit registers reset: starfive: Rename "jh7100" to "jh71x0" for the common code reset: starfive: Extract the common JH71X0 reset code reset: starfive: Factor out common JH71X0 reset code reset: Create subdirectory for StarFive drivers reset: starfive: Replace SOC_STARFIVE with ARCH_STARFIVE clk: starfive: Rename "jh7100" to "jh71x0" for the common code clk: starfive: Rename clk-starfive-jh7100.h to clk-starfive-jh71x0.h clk: starfive: Factor out common JH7100 and JH7110 code clk: starfive: Replace SOC_STARFIVE with ARCH_STARFIVE dt-bindings: clock: Add StarFive JH7110 always-on clock and reset generator dt-bindings: clock: Add StarFive JH7110 system clock and reset generator commit 0e5c9a9d6548e9b178d4696c696ae4a21c39ae58 Author: Marc Zyngier Date: Wed Apr 5 12:48:58 2023 +0100 KVM: arm64: Expose SMC/HVC width to userspace When returning to userspace to handle a SMCCC call, we consistently set PC to point to the instruction immediately after the HVC/SMC. However, should userspace need to know the exact address of the trapping instruction, it needs to know about the *size* of that instruction. For AArch64, this is pretty easy. For AArch32, this is a bit more funky, as Thumb has 16bit encodings for both HVC and SMC. Expose this to userspace with a new flag that directly derives from ESR_EL2.IL. Also update the documentation to reflect the PC state at the point of exit. Finally, this fixes a small buglet where the hypercall.{args,ret} fields would not be cleared on exit, and could contain some random junk. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/86pm8iv8tj.wl-maz@kernel.org commit 9af87166944b3ff33d1399f7a1924ef0175e96b2 Author: Kal Conley Date: Mon Apr 3 15:01:51 2023 +0200 selftests: xsk: Add xskxceiver.h dependency to Makefile xskxceiver depends on xskxceiver.h so tell make about it. Signed-off-by: Kal Conley Link: https://lore.kernel.org/r/20230403130151.31195-1-kal.conley@dectris.com Signed-off-by: Martin KaFai Lau commit 36168bc061b4368ad19e82b06a6463c95d3bb9a7 Author: Tony Luck Date: Tue Apr 4 14:21:24 2023 -0700 x86/cpu: Add Xeon Emerald Rapids to list of CPUs that support PPIN This should be the last addition to this table. Future CPUs will enumerate PPIN support using CPUID. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230404212124.428118-1-tony.luck@intel.com commit a8642cd11635a35a5f1dc31857887900d6610778 Author: Tom Rix Date: Tue Apr 4 18:21:48 2023 +0100 nvmem: layouts: sl28vpd: set varaiable sl28vpd_layout storage-class-specifier to static smatch reports drivers/nvmem/layouts/sl28vpd.c:144:21: warning: symbol 'sl28vpd_layout' was not declared. Should it be static? This variable is only used in one file so it should be static. Signed-off-by: Tom Rix Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-41-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6b13e4b6a9a45028ac730e550380077df1845912 Author: Miquel Raynal Date: Tue Apr 4 18:21:47 2023 +0100 nvmem: layouts: onie-tlv: Drop wrong module alias The MODULE_ALIAS macro is misused here as it carries the description. There is currently no relevant alias to provide so let's just drop it. Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-40-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit d119eb38faab61125aaa4f63c74eef61585cf34c Author: Miquel Raynal Date: Tue Apr 4 18:21:46 2023 +0100 nvmem: layouts: onie-tlv: Use module_nvmem_layout_driver() Stop open-coding the module init/exit functions. Use the module_nvmem_layout_driver() instead. Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-39-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0abdf99fe0c86252ba274703425f8d543d7e7f0d Author: Miquel Raynal Date: Tue Apr 4 18:21:45 2023 +0100 nvmem: layouts: sl28vpd: Use module_nvmem_layout_driver() Stop open-coding the module init/exit functions. Use the module_nvmem_layout_driver() instead. Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-38-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 814c978f02db17f16e6aa2efa2a929372f06da09 Author: Miquel Raynal Date: Tue Apr 4 18:21:44 2023 +0100 nvmem: Add macro to register nvmem layout drivers Provide a module_nvmem_layout_driver() macro at the end of the nvmem-provider.h header to reduce the boilerplate when registering nvmem layout drivers. Suggested-by: Srinivas Kandagatla Signed-off-by: Miquel Raynal Acked-by: Rafał Miłecki Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-37-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit c49f1a8af6bcf6d18576bca898f8083ca4b129e1 Author: Rafał Miłecki Date: Tue Apr 4 18:21:43 2023 +0100 nvmem: u-boot-env: post-process "ethaddr" env variable U-Boot environment variables are stored in ASCII format so "ethaddr" requires parsing into binary to make it work with Ethernet interfaces. This includes support for indexes to support #nvmem-cell-cells = <1>. Signed-off-by: Rafał Miłecki Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-36-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 55d4980ce55b6bb4be66877de4dbec513911b988 Author: Rafał Miłecki Date: Tue Apr 4 18:21:42 2023 +0100 nvmem: core: support specifying both: cell raw data & post read lengths Callback .read_post_process() is designed to modify raw cell content before providing it to the consumer. So far we were dealing with modifications that didn't affect cell size (length). In some cases however cell content needs to be reformatted and resized. It's required e.g. to provide properly formatted MAC address in case it's stored in a non-binary format (e.g. using ASCII). There were few discussions how to optimally handle that. Following possible solutions were considered: 1. Allow .read_post_process() to realloc (resize) content buffer 2. Allow .read_post_process() to adjust (decrease) just buffer length 3. Register NVMEM cells using post-read sizes The preferred solution was the last one. The problem is that simply adjusting "bytes" in NVMEM providers would result in core code NOT passing whole raw data to .read_post_process() callbacks. It means callback functions couldn't do their job without somehow manually reading original cell content on their own. This patch deals with that by registering NVMEM cells with both lengths: raw content one and post read one. It allows: 1. Core code to read whole raw cell content 2. Callbacks to return content they want Signed-off-by: Rafał Miłecki Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-35-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7e2805c203a6c8dc85c1cfda205161ed39ae82d5 Author: Rafał Miłecki Date: Tue Apr 4 18:21:41 2023 +0100 dt-bindings: nvmem: u-boot,env: add MAC's #nvmem-cell-cells U-Boot's "ethaddr" environment variable is very often used to store *base* MAC address. It's used as a base for calculating addresses for multiple interfaces. It's done by adding proper values. Actual offsets are picked by manufacturers and vary across devices. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-34-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit c2367aa60d5e34d48582362c6de34b4131d92be7 Author: Yang Li Date: Tue Apr 4 18:21:40 2023 +0100 nvmem: vf610-ocotp: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-33-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 649409990d2e93fac657be7c6960c28a2c601d65 Author: Yang Li Date: Tue Apr 4 18:21:39 2023 +0100 nvmem: nintendo-otp: Use devm_platform_ioremap_resource() According to commit 7945f929f1a7 ("drivers: provide devm_platform_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to use devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-32-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1dc552fa33cf98af3e784dbc0500da93cae3b24a Author: Yang Li Date: Tue Apr 4 18:21:38 2023 +0100 nvmem: bcm-ocotp: Use devm_platform_ioremap_resource() According to commit 7945f929f1a7 ("drivers: provide devm_platform_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to use devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-31-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit cc25eba0b88200730ce03b066f7569ca6c29605d Author: Konrad Dybcio Date: Tue Apr 4 18:21:37 2023 +0100 dt-bindings: nvmem: Add compatible for SM6375 Docuemnt the QFPROM on SM6375. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-30-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 796d160c4ed032c66415120d67aea8ecd502879f Author: Konrad Dybcio Date: Tue Apr 4 18:21:36 2023 +0100 dt-bindings: nvmem: Add compatible for SM6350 Docuemnt the QFPROM on SM6350. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-29-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit de6e05097f7db066afb0ad4c88b730949f7b7749 Author: AngeloGioacchino Del Regno Date: Tue Apr 4 18:21:35 2023 +0100 nvmem: mtk-efuse: Support postprocessing for GPU speed binning data On some MediaTek SoCs GPU speed binning data is available for read in the SoC's eFuse array but it has a format that is incompatible with what the OPP API expects, as we read a number from 0 to 7 but opp-supported-hw is expecting a bitmask to enable an OPP entry: being what we read limited to 0-7, it's straightforward to simply convert the value to BIT(value) as a post-processing action. So, introduce post-processing support and enable it by evaluating the newly introduced platform data's `uses_post_processing` member, currently enabled only for MT8186. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-28-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit a4fb434ef96ace5af758ca2c52c3a3f8f3abc87c Author: Krzysztof Kozlowski Date: Tue Apr 4 18:21:34 2023 +0100 nvmem: stm32-romem: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/nvmem/stm32-romem.c:271:34: error: ‘stm32_romem_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-27-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit d14d9f0e737e0602c17f416c26e56e57df4985b1 Author: Rob Herring Date: Tue Apr 4 18:21:33 2023 +0100 dt-bindings: nvmem: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Acked-by: Jernej Skrabec Reviewed-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-26-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit f126612181fbd706c7a43d6c7d0758898815ad38 Author: Miquel Raynal Date: Tue Apr 4 18:21:32 2023 +0100 MAINTAINERS: Add myself as ONIE tlv NVMEM layout maintainer Following the introduction of the bindings for this NVMEM parser and the layout driver, add myself as maintainer. Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-25-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit d3c0d12f6474216bf386101e2449cc73e5c5b61d Author: Miquel Raynal Date: Tue Apr 4 18:21:31 2023 +0100 nvmem: layouts: onie-tlv: Add new layout driver This layout applies on top of any non volatile storage device containing an ONIE table factory flashed. This table follows the tlv (type-length-value) organization described in the link below. We cannot afford using regular parsers because the content of these tables is manufacturer specific and must be dynamically discovered. Link: https://opencomputeproject.github.io/onie/design-spec/hw_requirements.html Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-24-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit fe191489d66f2bcd7be3cd78645bcefea5a3f68d Author: Michael Walle Date: Tue Apr 4 18:21:30 2023 +0100 MAINTAINERS: add myself as sl28vpd nvmem layout driver Add myself as a maintainer for the new sl28vpd nvmem layout driver. Signed-off-by: Michael Walle Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-23-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit d9fae023fe86069750092fc1c2f3a73e2fb18512 Author: Michael Walle Date: Tue Apr 4 18:21:29 2023 +0100 nvmem: layouts: sl28vpd: Add new layout driver This layout applies to the VPD of the Kontron sl28 boards. The VPD only contains a base MAC address. Therefore, we have to add an individual offset to it. This is done by taking the second argument of the nvmem phandle into account. Also this let us checking the VPD version and the checksum. Signed-off-by: Michael Walle Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-22-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8a134fd9f9323f4c39ec27055b3d3723cfb5c1e9 Author: Michael Walle Date: Tue Apr 4 18:21:28 2023 +0100 nvmem: core: provide own priv pointer in post process callback It doesn't make any more sense to have a opaque pointer set up by the nvmem device. Usually, the layout isn't associated with a particular nvmem device. Instead, let the caller who set the post process callback provide the priv pointer. Signed-off-by: Michael Walle Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-21-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 011e40a166fdaa65fb9946b7cd91efec85b70dbb Author: Michael Walle Date: Tue Apr 4 18:21:27 2023 +0100 nvmem: cell: drop global cell_post_process There are no users anymore for the global cell_post_process callback anymore. New users should use proper nvmem layouts. Signed-off-by: Michael Walle Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-20-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6c56a82d7895a213a43182a5d01a21a906a79847 Author: Michael Walle Date: Tue Apr 4 18:21:26 2023 +0100 nvmem: imx-ocotp: replace global post processing with layouts In preparation of retiring the global post processing hook change this driver to use layouts. The layout will be supplied during registration and will be used to add the post processing hook to all added cells. Signed-off-by: Michael Walle Tested-by: Michael Walle # on kontron-pitx-imx8m Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-19-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit de12c9691501ccba41a154c223869f82be4c12fd Author: Michael Walle Date: Tue Apr 4 18:21:25 2023 +0100 nvmem: core: allow to modify a cell before adding it Provide a way to modify a cell before it will get added. This is useful to attach a custom post processing hook via a layout. Signed-off-by: Michael Walle Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-18-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 345ec382cd4b736c36e01f155d08c913b225b736 Author: Michael Walle Date: Tue Apr 4 18:21:24 2023 +0100 nvmem: core: add per-cell post processing Instead of relying on the name the consumer is using for the cell, like it is done for the nvmem .cell_post_process configuration parameter, provide a per-cell post processing hook. This can then be populated by the NVMEM provider (or the NVMEM layout) when adding the cell. Signed-off-by: Michael Walle Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-17-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit b1c37bec1ccfe5ccab72bc0ddc0dfa45c43e2de2 Author: Miquel Raynal Date: Tue Apr 4 18:21:23 2023 +0100 nvmem: core: request layout modules loading When a storage device like an eeprom or an mtd device probes, it registers an nvmem device if the nvmem subsystem has been enabled (bool symbol). During nvmem registration, if the device is using layouts to expose dynamic nvmem cells, the core will first try to get a reference over the layout driver callbacks. In practice there is not relationship that can be described between the storage driver and the nvmem layout. So there is no way we can enforce both drivers will be built-in or both will be modules. If the storage device driver is built-in but the layout is built as a module, instead of badly failing with an endless probe deferral loop, lets just make a modprobe call in case the driver was made available in an initramfs with of_device_node_request_module(), and offer a fully functional system to the user. Signed-off-by: Miquel Raynal Tested-by: Michael Walle Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-16-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6468a6f45148fb5e95c86b4efebf63f9abcd2137 Author: Miquel Raynal Date: Tue Apr 4 18:21:22 2023 +0100 nvmem: core: handle the absence of expected layouts Make nvmem_layout_get() return -EPROBE_DEFER while the expected layout is not available. This condition cannot be triggered today as nvmem layout drivers are initialed as part of an early init call, but soon these drivers will be converted into modules and be initialized with a standard priority, so the unavailability of the drivers might become a reality that must be taken care of. Let's anticipate this by telling the caller the layout might not yet be available. A probe deferral is requested in this case. Please note this does not affect any nvmem device not using layouts, because an early check against the "nvmem-layout" container presence will return NULL in this case. Signed-off-by: Miquel Raynal Tested-by: Michael Walle Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-15-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 266570f496b90dea8fda893c2cf7c28d63ae2bd9 Author: Michael Walle Date: Tue Apr 4 18:21:21 2023 +0100 nvmem: core: introduce NVMEM layouts NVMEM layouts are used to generate NVMEM cells during runtime. Think of an EEPROM with a well-defined conent. For now, the content can be described by a device tree or a board file. But this only works if the offsets and lengths are static and don't change. One could also argue that putting the layout of the EEPROM in the device tree is the wrong place. Instead, the device tree should just have a specific compatible string. Right now there are two use cases: (1) The NVMEM cell needs special processing. E.g. if it only specifies a base MAC address offset and you need to add an offset, or it needs to parse a MAC from ASCII format or some proprietary format. (Post processing of cells is added in a later commit). (2) u-boot environment parsing. The cells don't have a particular offset but it needs parsing the content to determine the offsets and length. Co-developed-by: Miquel Raynal Signed-off-by: Miquel Raynal Signed-off-by: Michael Walle Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-14-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2f555f58f5ce33b201235e104823662d5573c4a5 Author: Miquel Raynal Date: Tue Apr 4 18:21:20 2023 +0100 of: device: Kill of_device_request_module() A new helper has been introduced, of_request_module(). Users have been converted, this helper can now be deleted. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-13-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 19697537708643091d64c8ec9a809883166dcb3f Author: Miquel Raynal Date: Tue Apr 4 18:21:19 2023 +0100 usb: ulpi: Use of_request_module() There is a new helper supposed to replace of_device_request_module(), called of_request_module(). They are both strictly equivalent, besides the fact the latter receives a "struct device_node" directly. Use it. Cc: Heikki Krogerus Cc: Greg Kroah-Hartman Signed-off-by: Miquel Raynal Acked-by: Rob Herring Acked-by: Heikki Krogerus Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-12-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit e6506f06d5e82765666902ccf9e9162f3e31d518 Author: Miquel Raynal Date: Tue Apr 4 18:21:18 2023 +0100 of: Move the request module helper logic to module.c Depending on device.c for pure OF handling is considered backwards. Let's extract the content of of_device_request_module() to have the real logic under module.c. The next step will be to convert users of of_device_request_module() to use the new helper. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-11-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit bd7a7ed774afd1a4174df34227626c95573be517 Author: Miquel Raynal Date: Tue Apr 4 18:21:17 2023 +0100 of: Move of_modalias() to module.c Create a specific .c file for OF related module handling. Move of_modalias() inside as a first step. The helper is exposed through of.h even though it is only used by core files because the users from device.c will soon be split into an OF-only helper in module.c as well as a device-oriented inline helper in of_device.h. Putting this helper in of_private.h would require to include of_private.h from of_device.h, which is not acceptable. Suggested-by: Rob Herring Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-10-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 673aa1ed1c9b6710bf24e3f0957d85e2f46c77db Author: Miquel Raynal Date: Tue Apr 4 18:21:16 2023 +0100 of: Rename of_modalias_node() This helper does not produce a real modalias, but tries to get the "product" compatible part of the "vendor,product" compatibles only. It is far from creating a purely useful modalias string and does not seem to be used like that directly anyway, so let's try to give this helper a more meaningful name before moving there a real modalias helper (already existing under of/device.c). Also update the various documentations to refer to the strings as "aliases" rather than "modaliases" which has a real meaning in the Linux kernel. There is no functional change. Cc: Rafael J. Wysocki Cc: Len Brown Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: Sebastian Reichel Cc: Wolfram Sang Cc: Mark Brown Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Acked-by: Mark Brown Signed-off-by: Srinivas Kandagatla Acked-by: Sebastian Reichel Link: https://lore.kernel.org/r/20230404172148.82422-9-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5c3d15e127ebfc0754cd18def7124633b6d46672 Author: Miquel Raynal Date: Tue Apr 4 18:21:15 2023 +0100 of: Update of_device_get_modalias() This function only needs a "struct device_node" to work, but for convenience the author (and only user) of this helper did use a "struct device" and put it in device.c. Let's convert this helper to take a "struct device node" instead. This change asks for two additional changes: renaming it "of_modalias()" to fit the current naming, and moving it outside of device.c which will be done in a follow-up commit. Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2187af84e5d0062090f5e0e89281a00d0b8afa40 Author: Colin Ian King Date: Tue Apr 4 18:21:14 2023 +0100 dt-bindings: nvmem: Fix spelling mistake "platforn" -> "platform" There is a spelling mistake in platforn-name. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Miquel Raynal Acked-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit ce030eb191b7bf4af32fd76f7456d2291e292e2e Author: Neil Armstrong Date: Tue Apr 4 18:21:13 2023 +0100 dt-bindings: nvmem: convert amlogic-efuse.txt to dt-schema Convert the Amlogic Meson GX eFuse bindings to dt-schema. Take in account the used variant with amlogic,meson-gx-efuse. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9f4615338a35dd0f882cc385a8f960191ce0cc82 Author: Neil Armstrong Date: Tue Apr 4 18:21:12 2023 +0100 dt-bindings: nvmem: convert amlogic-meson-mx-efuse.txt to dt-schema Convert the Amlogic Meson6 eFuse bindings to dt-schema. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit bcd1fe07def0f070eb5f31594620aaee6f81d31a Author: Nick Alcock Date: Tue Apr 4 18:21:11 2023 +0100 nvmem: xilinx: zynqmp: make modular This driver has a MODULE_LICENSE but is not tristate so cannot be built as a module, unlike all its peers: make it modular to match. Signed-off-by: Nick Alcock Suggested-by: Michal Simek Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Srinivas Kandagatla Cc: Michal Simek Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1ca28dc907b3725940fe88bfd91bc3a53081e2d3 Author: Johan Hovold Date: Tue Apr 4 18:21:10 2023 +0100 dt-bindings: nvmem: qcom,spmi-sdam: fix example 'reg' property The SPMI PMIC register region width is fixed and should not be encoded in the devicetree. Amend the example with a parent pmic node with the expected '#address-cells' and '#size-cells' and fix up the 'reg' property. Fixes: 9664a6b54c57 ("dt-bindings: nvmem: add binding for QTI SPMI SDAM") Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit b19a4266c52de78496fe40f0b37580a3b762e67d Author: Miquel Raynal Date: Tue Apr 4 18:21:09 2023 +0100 of: Fix modalias string generation The helper generating an OF based modalias (of_device_get_modalias()) works fine, but due to the use of snprintf() internally it needs a buffer one byte longer than what should be needed just for the entire string (excluding the '\0'). Most users of this helper are sysfs hooks providing the modalias string to users. They all provide a PAGE_SIZE buffer which is way above the number of bytes required to fit the modalias string and hence do not suffer from this issue. There is another user though, of_device_request_module(), which is only called by drivers/usb/common/ulpi.c. This request module function is faulty, but maybe because in most cases there is an alternative, ULPI driver users have not noticed it. In this function, of_device_get_modalias() is called twice. The first time without buffer just to get the number of bytes required by the modalias string (excluding the null byte), and a second time, after buffer allocation, to fill the buffer. The allocation asks for an additional byte, in order to store the trailing '\0'. However, the buffer *length* provided to of_device_get_modalias() excludes this extra byte. The internal use of snprintf() with a length that is exactly the number of bytes to be written has the effect of using the last available byte to store a '\0', which then smashes the last character of the modalias string. Provide the actual size of the buffer to of_device_get_modalias() to fix this issue. Note: the "str[size - 1] = '\0';" line is not really needed as snprintf will anyway end the string with a null byte, but there is a possibility that this function might be called on a struct device_node without compatible, in this case snprintf() would not be executed. So we keep it just to avoid possible unbounded strings. Cc: Stephen Boyd Cc: Peter Chen Fixes: 9c829c097f2f ("of: device: Support loading a module with OF based modalias") Signed-off-by: Miquel Raynal Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230404172148.82422-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 07099a551803e05d3ee42fae152bf404f8dc21f9 Author: Krzysztof Kozlowski Date: Sun Mar 26 22:45:18 2023 +0200 arm64: dts: rockchip: correct panel supplies on Odroid Go Super The Anbernic and Odroid Go have different panels and take differently named supplies, so move all the supplies to DTS defining actual panel to fix warnings like: rk3326-odroid-go3.dtb: panel@0: 'IOVCC-supply' is a required property rk3326-odroid-go3.dtb: panel@0: 'iovcc-supply', 'vdd-supply' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230326204520.80859-1-krzysztof.kozlowski@linaro.org Signed-off-by: Heiko Stuebner commit ae13381da5ff0e8e084c0323c3cc0a945e43e9c7 Author: Dae R. Jeong Date: Mon Mar 27 21:01:53 2023 +0900 vmci_host: fix a race condition in vmci_host_poll() causing GPF During fuzzing, a general protection fault is observed in vmci_host_poll(). general protection fault, probably for non-canonical address 0xdffffc0000000019: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x00000000000000c8-0x00000000000000cf] RIP: 0010:__lock_acquire+0xf3/0x5e00 kernel/locking/lockdep.c:4926 <- omitting registers -> Call Trace: lock_acquire+0x1a4/0x4a0 kernel/locking/lockdep.c:5672 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xb3/0x100 kernel/locking/spinlock.c:162 add_wait_queue+0x3d/0x260 kernel/sched/wait.c:22 poll_wait include/linux/poll.h:49 [inline] vmci_host_poll+0xf8/0x2b0 drivers/misc/vmw_vmci/vmci_host.c:174 vfs_poll include/linux/poll.h:88 [inline] do_pollfd fs/select.c:873 [inline] do_poll fs/select.c:921 [inline] do_sys_poll+0xc7c/0x1aa0 fs/select.c:1015 __do_sys_ppoll fs/select.c:1121 [inline] __se_sys_ppoll+0x2cc/0x330 fs/select.c:1101 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4e/0xa0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Example thread interleaving that causes the general protection fault is as follows: CPU1 (vmci_host_poll) CPU2 (vmci_host_do_init_context) ----- ----- // Read uninitialized context context = vmci_host_dev->context; // Initialize context vmci_host_dev->context = vmci_ctx_create(); vmci_host_dev->ct_type = VMCIOBJ_CONTEXT; if (vmci_host_dev->ct_type == VMCIOBJ_CONTEXT) { // Dereferencing the wrong pointer poll_wait(..., &context->host_context); } In this scenario, vmci_host_poll() reads vmci_host_dev->context first, and then reads vmci_host_dev->ct_type to check that vmci_host_dev->context is initialized. However, since these two reads are not atomically executed, there is a chance of a race condition as described above. To fix this race condition, read vmci_host_dev->context after checking the value of vmci_host_dev->ct_type so that vmci_host_poll() always reads an initialized context. Reported-by: Dae R. Jeong Fixes: 8bf503991f87 ("VMCI: host side driver implementation.") Signed-off-by: Dae R. Jeong Link: https://lore.kernel.org/r/ZCGFsdBAU4cYww5l@dragonet Signed-off-by: Greg Kroah-Hartman commit b2ea273a477cd6e83daedbfa1981cd1a7468f73a Author: Hanno Böck Date: Thu Mar 30 21:35:57 2023 +0200 tty: Fix typo in LEGACY_TIOCSTI Kconfig description Fix typo in LEGACY_TIOCSTI Kconfig description There is a stray ' in the description before the Y. It appears this was meant as a quote for the 'Y'. However, it is more common to use unquoted Y in Kconfig descriptions. Signed-off-by: Hanno Böck Link: https://lore.kernel.org/r/20230330213557.60cf1533.hanno@hboeck.de Signed-off-by: Greg Kroah-Hartman commit 55529fe3f32d8c2fdb70981f2e151735e090a1e0 Author: Cristian Ciocaltea Date: Sun Apr 2 12:50:54 2023 +0300 arm64: dts: rockchip: Add rk3588-rock-5b analog audio Add the necessary DT nodes for the Rock 5B board to enable the analog audio support provided by the Everest Semi ES8316 codec. Signed-off-by: Cristian Ciocaltea Reviewed-by: Christopher Obbard Link: https://lore.kernel.org/r/20230402095054.384739-6-cristian.ciocaltea@collabora.com [adapted to the fan addition I applied slightly earlier] Signed-off-by: Heiko Stuebner commit 86c276b91c4a4faea90e8399b1aba580e9df1cb5 Author: Peng Fan Date: Tue Mar 28 13:43:55 2023 +0800 dt-bindings: serial: fsl-lpuart: add optional power-domains property Add optional power-domains property for i.MX8 usage. Signed-off-by: Peng Fan Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230328054355.1973397-1-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 6f48c6f5859296eaf54a55f436db3a248f772e4d Author: Cristian Ciocaltea Date: Sun Apr 2 12:50:53 2023 +0300 arm64: dts: rockchip: Add I2S rk3588 nodes In addition to the five I2S/PCM/TDM controllers and the two I2S/PCM controllers shared between the RK3588 and RK3588S SoCs, RK3588 provides another group of four I2S/PCM/TDM controllers. Add the DT nodes corresponding to the additional controllers. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230402095054.384739-5-cristian.ciocaltea@collabora.com Signed-off-by: Heiko Stuebner commit 8ae112a5554fb1580fc5564f8610cef85f2e3f7b Author: Cristian Ciocaltea Date: Sun Apr 2 12:50:52 2023 +0300 arm64: dts: rockchip: Add rk3588s I2S nodes There are five I2S/PCM/TDM controllers and two I2S/PCM controllers embedded in the RK3588 and RK3588S SoCs. Add the DT nodes corresponding to the above mentioned Rockchip controllers. Also note RK3588 SoC contains four additional I2S/PCM/TDM controllers, which are handled via a separate patch. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230402095054.384739-4-cristian.ciocaltea@collabora.com Signed-off-by: Heiko Stuebner commit b46a22dea7530cf530a45c6b84c03300083b813d Author: Cristian Ciocaltea Date: Sun Apr 2 12:50:51 2023 +0300 arm64: dts: rockchip: Assign PLL_PPLL clock rate to 1.1 GHz on rk3588s The clock rate for PLL_PPLL has been wrongly initialized to 100 MHz instead of 1.1 GHz. Fix it. Fixes: c9211fa2602b ("arm64: dts: rockchip: Add base DT for rk3588 SoC") Reported-by: Sebastian Reichel Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230402095054.384739-3-cristian.ciocaltea@collabora.com Signed-off-by: Heiko Stuebner commit 87810bda8a8472a9a106c6de34a032fb6a4b425b Author: Cristian Ciocaltea Date: Sun Apr 2 12:50:50 2023 +0300 arm64: dts: rockchip: Fix SCMI assigned clocks on rk3588s Since commit df4fdd0db475 ("dt-bindings: firmware: arm,scmi: Restrict protocol child node properties") the following dtbs_check warning is shown: rk3588-rock-5b.dtb: scmi: protocol@14: Unevaluated properties are not allowed ('assigned-clock-rates', 'assigned-clocks' were unexpected) Because adding the missing properties to firmware/arm,scmi.yaml binding document was not an acceptable solution, move SCMI_CLK_CPUB01 and SCMI_CLK_CPUB23 assigned clocks to the related CPU nodes and also add the missing SCMI_CLK_CPUL. Additionally, adjust frequency to 816 MHz for all the above mentioned assigned clocks, in order to match the firmware defaults. Suggested-by: Sebastian Reichel Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230402095054.384739-2-cristian.ciocaltea@collabora.com Signed-off-by: Heiko Stuebner commit 0246b15bbb43404d8d6f0ec86121c05515e0ed0b Author: Krzysztof Kozlowski Date: Mon Apr 3 21:18:50 2023 +0200 dt-bindings: usb: ti,keystone-dwc3: drop assigned-clocks The meta schema from DT schema already defines assigned-clocks, so there is no need for device schema to mention it at all. There are also no benefits of having it here. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230403191850.374839-3-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit d024ebb274573baaf999914ba33a361141b66bef Author: Krzysztof Kozlowski Date: Mon Apr 3 21:18:49 2023 +0200 dt-bindings: usb: ti,j721e-usb: drop assigned-clocks The meta schema from DT schema already defines assigned-clocks, so there is no need for device schema to mention it at all. There are also no benefits of having it here. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230403191850.374839-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 72958d337859626c8538fcd3a5f905825820b72e Author: Krzysztof Kozlowski Date: Mon Apr 3 21:18:48 2023 +0200 dt-bindings: usb: mediatek,mtk-xhci: drop assigned-clocks The meta schema from DT schema already defines assigned-clocks, so there is no need for device schema to mention it at all. There are also no benefits of having it here. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230403191850.374839-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit c336fae2c5be3689a7a74562458a23afb88b655e Author: Thomas Ballasi Date: Thu Mar 30 18:16:37 2023 -0400 usb: chipidea: imx: avoid unnecessary probe defer The changes brought by commit 73de93440186 have been inadvertidly removed, causing ci_hdrc_imx's probe to be loaded before usbmisc_imx's, despite ci_hdrc_imx needing usbmisc_imx. This condition may cause unexpected behaviors, especially when the ChipIdea node is being referred to under /sys/class/udc/: $ ls -l /sys/class/udc/ $ when it should show as the following: $ ls -l /sys/class/udc/ ci_hdrc.0 -> ../../devices/[...]/ci_hdrc.0/udc/ci_hdrc.0 Some userspace tools may depend on this feature[1]. [1]: https://github.com/nxp-imx/imx-uuc/blob/69029e71b0642ded83a6c9bfa03102bb310c88ed/linuxrc#L148 Fixes: 95caa2ae70fd ("usb: chipidea: allow disabling glue drivers if EMBEDDED") Signed-off-by: Thomas Ballasi Link: https://lore.kernel.org/r/20230330221637.1605161-1-thomas.ballasi@savoirfairelinux.com Signed-off-by: Greg Kroah-Hartman commit 32641b8ab1a5bd08e898cec3d46a8ecb4b4e895e Author: Sebastian Reichel Date: Tue Apr 4 17:44:29 2023 +0200 arm64: dts: rockchip: add rk3588 thermal sensor Add thermal sensor IP, which allows monitoring temperatures at seven different places in the SoC: * Chip Center * CPU Cluster 1 (Dual A76 "Big" Cores) * CPU Cluster 2 (Dual A76 "Big" Cores) * CPU Cluster 0 (Quad A55 "Little" Cores) * Power Domain Center * Graphics Processing Unit * Neural Processing Unit Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20230404154429.51601-1-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner commit f36bb17653e4b9e26bbdb1224027d20614e77636 Author: Cristian Ciocaltea Date: Tue Apr 4 20:38:07 2023 +0300 arm64: dts: rockchip: Add pwm-fan to rk3588-rock-5b Add the necessary DT changes for the Rock 5B board to enable support for the PWM controlled heat sink fan. Signed-off-by: Cristian Ciocaltea Reviewed-by: Christopher Obbard Link: https://lore.kernel.org/r/20230404173807.490520-3-cristian.ciocaltea@collabora.com Signed-off-by: Heiko Stuebner commit 1e9c2404d8870ec08bfc338ae7113c3f7fe0b171 Author: Shreeya Patel Date: Wed Apr 5 13:57:11 2023 +0530 arm64: dts: rockchip: Enable RTC support for Rock 5B Add DT node to enable RTC support for Rock 5B board. Signed-off-by: Shreeya Patel Reviewed-by: Christopher Obbard Link: https://lore.kernel.org/r/20230405082711.46303-1-shreeya.patel@collabora.com Signed-off-by: Heiko Stuebner commit 326e1c208f3f24d14b93f910b8ae32c94923d22c Author: Samuel Čavoj Date: Wed Apr 5 16:44:56 2023 +0300 usb: typec: ucsi: acpi: add quirk for ASUS Zenbook UM325 On some ACPI platforms (namely the ASUS Zenbook UM325) the _DSM method must not be called after a notification is received but instead the mailbox should be read immediately from RAM. This is because the ACPI interrupt handler destroys the CCI in ERAM after copying to system memory, and when _DSM is later called to perform a second copy, it retrieves a garbage value. Instead, the _DSM(read) method should only be called when necessary, i.e. for polling the state after reset and for retrieving the version. Other reads should not call _DSM and only peek into the RAM region. This adds a separate read operation for the Zenbook that syncs the ACPI mailbox only with polled commands. Link: https://lore.kernel.org/linux-usb/20210823180626.tb6m7h5tp6adhvt2@fastboi.localdomain/ Signed-off-by: Samuel Čavoj [ heikki : handling everything in ucsi_acpi.c with DMI quirk ] Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230405134456.49607-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 917dc99b659114a4aad2ee8b20bcdc05c80e5f09 Author: Andy Shevchenko Date: Wed Apr 5 14:20:01 2023 +0300 usb: dwc3: pci: Change PCI device macros Use PCI_DEVICE_DATA() macro. No functional changes are expected. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230405112001.39695-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 03f009a9d41f902e4e9e2dd618b35b712e4b67df Author: Roger Quadros Date: Fri Mar 24 15:37:41 2023 +0200 dt-bindings: usb: tps6598x: make interrupts optional The driver can poll for interrupt status so interrupts can be optional. It is still recommended to use the interrupt line. Polling should only be used for debug and prototyping. Signed-off-by: Roger Quadros Acked-by: Heikki Krogerus Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230324133741.43408-1-rogerq@kernel.org Signed-off-by: Greg Kroah-Hartman commit be15c65ad027f467c856ae9d2cbabaa62680506a Author: Peng Fan Date: Thu Mar 30 17:17:36 2023 +0800 dt-bindings: usb: typec-tcpci: convert to DT schema format Convert the binding to DT schema format, and rename it to nxp,ptn5110.yaml Signed-off-by: Peng Fan Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230330091736.1873121-1-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit d56de8c9a17d8f5202d0f37dd06ce186cc512586 Author: Li Jun Date: Tue Mar 28 16:23:04 2023 +0800 usb: typec: tcpm: try to get role switch from tcpc fwnode Try to get usb role switch from tcpc fwnode if failed to get role switch from port dev, this is for case the port for role switch endpoint is located in connector node, as per connector binding doc, port@0 for HS is required. ptn5110: tcpc@50 { compatible = "nxp,ptn5110"; ... status = "okay"; connector { compatible = "usb-c-connector"; label = "USB-C"; ... ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; typec_conn: endpoint { remote-endpoint = <&usb2_controller>; }; }; }; }; }; Signed-off-by: Li Jun Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/1679991784-25500-1-git-send-email-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 8000540218439e06ee1161b039a1472718798646 Author: Uwe Kleine-König Date: Wed Apr 5 16:10:09 2023 +0200 usb: musb: ux500: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230405141009.3400693-11-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 969c9528ad05763f468a60b7287486afa62deb23 Author: Uwe Kleine-König Date: Wed Apr 5 16:10:08 2023 +0200 usb: musb: tusb6010: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230405141009.3400693-10-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 2a21aceed2fe94816d596969a761f6829954d879 Author: Uwe Kleine-König Date: Wed Apr 5 16:10:07 2023 +0200 usb: musb: sunxi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230405141009.3400693-9-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit cb020bf52253327fe382e10bcae02a4f1da33c04 Author: Uwe Kleine-König Date: Wed Apr 5 16:10:06 2023 +0200 usb: musb: omap2430: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230405141009.3400693-8-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit e6547b5e5c2c493bbd3b6add3177e8498ff0e063 Author: Uwe Kleine-König Date: Wed Apr 5 16:10:05 2023 +0200 usb: musb: musb_dsps: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230405141009.3400693-7-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit aa846a29e1cc733e6c966bde918bdd1d3a5c5e8a Author: Uwe Kleine-König Date: Wed Apr 5 16:10:04 2023 +0200 usb: musb: musb_core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230405141009.3400693-6-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 37e7750091ad5f3911a8266564e89394c6ac94a1 Author: Uwe Kleine-König Date: Wed Apr 5 16:10:03 2023 +0200 usb: musb: mpfs: 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 (mostly) ignored 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. 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: Conor Dooley Link: https://lore.kernel.org/r/20230405141009.3400693-5-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit ace4e2637c016d0e693a15760df9f4add1bcbe9c Author: Uwe Kleine-König Date: Wed Apr 5 16:10:02 2023 +0200 usb: musb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230405141009.3400693-4-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit c5477ce3bc3d137c553180eaccf88f4b85fa70fc Author: Uwe Kleine-König Date: Wed Apr 5 16:10:01 2023 +0200 usb: musb: jz4740: 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 (mostly) ignored 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. 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: Paul Cercueil Link: https://lore.kernel.org/r/20230405141009.3400693-3-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit a9042796f9d00643856c31bd3f216305cc5d9dfa Author: Uwe Kleine-König Date: Wed Apr 5 16:10:00 2023 +0200 usb: musb: da8xx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230405141009.3400693-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 3a87fc6f68128d31a77c03887185dbd75ed0f62a Author: Simon Horman Date: Tue Apr 4 14:44:53 2023 +0200 remoteproc: pru: Remove always true check positive unsigned value In both cases the type of da is u32. And PRU_PDRAM_DA is 0. So the check da >= PRU_PDRAM_DA is always true and can be removed. Flagged by Smatch: drivers/remoteproc/pru_rproc.c:660 pru_d_da_to_va() warn: always true condition '(da >= 0) => (0-u32max >= 0)' drivers/remoteproc/pru_rproc.c:709 pru_i_da_to_va() warn: always true condition '(da >= 0) => (0-u32max >= 0)' No functional changes intended. Compile tested only. Reported-by: kernel test robot Link: https://www.spinics.net/lists/kernel/msg4025983.html Signed-off-by: Simon Horman Reviewed-by: Mukesh Ojha Link: https://lore.kernel.org/r/20230404-pru-always-true-v1-1-b1b55eeff188@kernel.org [Fixed typo in changelog] Signed-off-by: Mathieu Poirier commit 1d1e434dbe58ef31abc60135957e0735b62fdcad Author: Jani Nikula Date: Mon Apr 3 15:24:28 2023 +0300 drm/i915/clock: mass rename dev_priv to i915 Follow the contemporary naming style. Include some indentation fixes while at it on the affected statements. One function needs to keep using dev_priv due to implicit dev_priv usage in a macro. Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230403122428.3526263-2-jani.nikula@intel.com commit d670c78ea7564f9baf915c8e1dc5898a9e6c360b Author: Jani Nikula Date: Mon Apr 3 15:24:27 2023 +0300 drm/i915: rename intel_pm.[ch] to intel_clock_gating.[ch] Observe that intel_pm.[ch] is now purely about clock gating, so rename them to intel_clock_gating.[ch]. Rename the functions to intel_clock_gating_*() to follow coding conventions. Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230403122428.3526263-1-jani.nikula@intel.com commit 69e6dd149212cdd681201352a79e6634665004e8 Author: Alan Previn Date: Thu Mar 23 11:41:56 2023 -0700 drm/i915/pxp: limit drm-errors or warning on firmware API failures MESA driver is creating protected context on every driver handle creation to query caps bits for app. So when running CI tests, they are observing hundreds of drm_errors when enabling PXP in .config but using SOC fusing or BIOS configuration that cannot support PXP sessions. The fixes tag referenced below was to resolve a related issue where we wanted to silence error messages, but that case was due to outdated IFWI (firmware) that definitely needed an upgrade and was, at that point, considered a one-off case as opposed to today's realization that default CI was enabling PXP in kernel config for all testing. So with this patch, let's strike a balance between issues that is critical but are root-caused from HW/platform gaps (louder drm-warn but just ONCE) vs other cases where it could also come from session state machine (which cannot be a WARN_ONCE since it can be triggered due to runtime operation events). Let's use helpers for these so as more functions are added in future features / HW (or as FW designers continue to bless upstreaming of the error codes and meanings), we only need to update the helpers. NOTE: Don't completely remove FW errors (via drm_debug) or else cusomer apps that really needs to know that content protection failed won't be aware of it. v2: - Add fixes tag (Trvtko) v3: - Break multi-line drm_dbg strings into separate drm_dbg (Daniele) - Fix couple of typecasting nits (Daniele) v4: - Unsuccessful PXP FW cmd due to platform configuration shouldn't use drm_WARN_once (Tvrtko), Switched to use drm_info_once. v5: - Added "reported-and-tested" by Eero. Reported-and-tested-by: Eero Tamminen Fixes: b762787bf767 ("drm/i915/pxp: Use drm_dbg if arb session failed due to fw version") Signed-off-by: Alan Previn Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20230323184156.4140659-1-alan.previn.teres.alexis@intel.com commit 7697c64b9e4908196f0ae68aa6d423dd40607973 Author: William Breathitt Gray Date: Wed Apr 5 11:45:42 2023 -0400 regmap: Pass irq_drv_data as a parameter for set_type_config() Allow the struct regmap_irq_chip set_type_config() callback to access irq_drv_data by passing it as a parameter. Signed-off-by: William Breathitt Gray Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20e15cd3afae80922b7e0577c7741df86b3390c5.1680708357.git.william.gray@linaro.org Signed-off-by: Mark Brown commit 1e6e0c1c971e5e02047a05c015510cc203530dc2 Author: Konrad Dybcio Date: Sat Mar 18 14:42:55 2023 +0100 arm64: dts: qcom: sm6115: Use the correct DSI compatible Use the non-deprecated, SoC-specific DSI compatible. Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307-topic-dsi_qcm-v6-9-70e13b1214fa@linaro.org commit de93e515db306767549bb29a926f523ca2a601ab Author: Casey Schaufler Date: Wed Apr 5 08:46:14 2023 -0700 Smack: Improve mount process memory use The existing mount processing code in Smack makes many unnecessary copies of Smack labels. Because Smack labels never go away once imported it is safe to use pointers to them rather than copies. Replace the use of copies of label names to pointers to the global label list entries. Signed-off-by: Casey Schaufler commit 99fddc1618ff64cc71bd51dbf83bd13e74778fe0 Merge: 72456c24c8357 1ea63f29c2771 Author: Mark Brown Date: Wed Apr 5 16:35:09 2023 +0100 ASoC: clarify Codec2Codec params Merge series from Kuninori Morimoto : ASoC is supporting Codec2Codec, but its parameter name is "params" and "num_params" which are very unclear naming. This patch-set clarifies it by replacing to c2c_params / num_c2c_params. commit 77d08a2de6a43521f5a02848f11185b6f46af21c Author: Alexander Stein Date: Wed Apr 5 15:51:27 2023 +0200 drm/bridge: ti-sn65dsi86: Allow GPIO operations to sleep There is no need to require non-sleeping GPIO access. Silence the WARN_ON() if GPIO is using e.g. I2C expanders. Signed-off-by: Alexander Stein Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20230405135127.769665-1-alexander.stein@ew.tq-group.com commit 758d5d64b619ddbbf96a5605d8d5a919aafaafab Author: Jens Axboe Date: Wed Apr 5 08:21:45 2023 -0600 io_uring/uring_cmd: assign ioucmd->cmd at async prep time Rather than check this in the fast path issue, it makes more sense to just assign the copy of the data when we're setting it up anyway. This makes the code a bit cleaner, and removes the need for this check in the issue path. Reviewed-by: Gabriel Krisman Bertazi Reviewed-by: Keith Busch Signed-off-by: Jens Axboe commit c1087c29e96a48e9080377e168d35dcb52fb068b Author: H. Nikolaus Schaller Date: Sun Apr 2 13:12:59 2023 +0200 leds: tca6507: Fix error handling of using fwnode_property_read_string Commit 96f524105b9c ("leds: tca6507: use fwnode API instead of OF") changed to fwnode API but did not take into account that a missing property "linux,default-trigger" now seems to return an error and as a side effect sets value to -1. This seems to be different from of_get_property() which always returned NULL in any case of error. Neglecting this side-effect leads to [ 11.201965] Unable to handle kernel paging request at virtual address ffffffff when read in the strcmp() of led_trigger_set_default() if there is no led-trigger defined in the DTS. I don't know if this was recently introduced somewhere in the fwnode lib or if the effect was missed in initial testing. Anyways it seems to be a bug to ignore the error return value of an optional value here in the driver. Fixes: 96f524105b9c ("leds: tca6507: use fwnode API instead of OF") Signed-off-by: H. Nikolaus Schaller Acked-by: Pavel Machek Reviewed-by: Marek Behún Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/cbae7617db83113de726fcc423a805ebaa1bfca6.1680433978.git.hns@goldelico.com commit a80c882183e36b483734681c830a332add912186 Author: AngeloGioacchino Del Regno Date: Wed Apr 5 12:04:52 2023 +0200 drm/panel-edp: Add AUO NE135FBM-N41 v8.1 panel entry Add a panel entry with delay_200_500_e50 for the AUO NE135FBM-N41 version 8.1, found on a number of ACER laptops, including the Swift 3 (SF313-52, SF313-53), Chromebook Spin 513 (CP513-2H) and others. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20230405100452.44225-1-angelogioacchino.delregno@collabora.com commit 821d96e3a006d09ca9aa3d982c50f3d86fa55500 Author: Kartik Date: Tue Jan 17 14:00:55 2023 +0530 soc/tegra: fuse: Remove nvmem root only access To read fuse values, various "non-root" userspace applications require access to nvmem binary interface. Remove root only access for nvmem userspace binary interface. Signed-off-by: Kartik Signed-off-by: Thierry Reding commit 434434608a918f33dbb613995f2b18d3007968c1 Author: Thomas Zimmermann Date: Thu Mar 30 10:36:04 2023 +0200 drm/tegra: Remove struct tegra_fbdev Remove struct tegra_fbdev, which is an empty wrapper around struct drm_fb_helper. Use the latter directly. No functional changes. Signed-off-by: Thomas Zimmermann Signed-off-by: Thierry Reding commit 08263e91f26025cbaa7049a322f7f9b13c56f2ee Author: Thomas Zimmermann Date: Thu Mar 30 10:36:03 2023 +0200 drm/tegra: Removed fb from struct tegra_fbdev Fbdev's struct fb_helper stores a pointer to the framebuffer. Remove struct tegra_fbdev.fb, which contains the same value. No functional changes. Signed-off-by: Thomas Zimmermann Signed-off-by: Thierry Reding commit dc06f4a495df1cf88c7cb0a383a97bdd8eddcf95 Author: Thomas Zimmermann Date: Thu Mar 30 10:36:02 2023 +0200 drm/tegra: Include Include to get the contained declarations. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Sui Jingfeng commit f68b63ebc433e8715b400f8dadf93a6ed02e2d3b Author: Thomas Zimmermann Date: Thu Mar 30 10:36:01 2023 +0200 drm/tegra: Include Include to get the contained declarations. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Sui Jingfeng Reviewed-by: Sui Jingfeng commit bd3fd923121dfadc834b3a8a803b51f066987dde Author: Christian König Date: Wed Apr 5 13:44:43 2023 +0200 drm/tegra: Fix another missing include Since Tegra now compile tests on other platforms the kernel test robot started to complain that this here is not pulled in under all conditions. Signed-off-by: Christian König Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304050946.yGGTKkcr-lkp@intel.com/ Signed-off-by: Thierry Reding commit 4b51210f98c2b89ce37aede5b8dc5105be0572c6 Author: Haridhar Kalvala Date: Tue Apr 4 23:02:20 2023 +0530 drm/i915/mtl: Add Wa_14017856879 Wa_14017856879 implementation for mtl. Bspec: 46046 Signed-off-by: Haridhar Kalvala Reviewed-by: Gustavo Sousa Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230404173220.3175577-1-haridhar.kalvala@intel.com commit 63a30e1f44d5e3afbb47efe8a15fd86feeb62b4b Author: Emil Renner Berthing Date: Sun Apr 2 19:40:43 2023 +0100 MAINTAINERS: generalise StarFive clk/reset entries Update the MAINTAINERS entry for StarFive's clock and reset drivers to account for the addition of JH7110 support and Hal's role in that. Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Reviewed-by: Emil Renner Berthing [conor: split this out from the binding patch, since it touches more than the binding; resort the entries per Hal's request] Signed-off-by: Conor Dooley commit 54baba33392d428a8be4942441a92a9b05cf537e Author: Emil Renner Berthing Date: Sat Apr 1 19:19:33 2023 +0800 riscv: dts: starfive: Add StarFive JH7110 VisionFive 2 board device tree Add a minimal device tree for StarFive JH7110 VisionFive 2 board which has version A and version B. Support booting and basic clock/reset/pinctrl/uart drivers. Tested-by: Tommaso Merciai Reviewed-by: Conor Dooley Acked-by: Conor Dooley Signed-off-by: Emil Renner Berthing Co-developed-by: Jianlong Huang Signed-off-by: Jianlong Huang Co-developed-by: Hal Feng Signed-off-by: Hal Feng Reviewed-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit e22f09e598d12e46e7c96df3c10271d037e1fd39 Author: Jianlong Huang Date: Sat Apr 1 19:19:32 2023 +0800 riscv: dts: starfive: Add StarFive JH7110 pin function definitions Add pin function definitions for StarFive JH7110 SoC. Tested-by: Tommaso Merciai Co-developed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Jianlong Huang Signed-off-by: Hal Feng Reviewed-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit 60bf0a39842eb042bbdc4539285c7e524011fc2d Author: Emil Renner Berthing Date: Sat Apr 1 19:19:31 2023 +0800 riscv: dts: starfive: Add initial StarFive JH7110 device tree Add initial device tree for the JH7110 RISC-V SoC by StarFive Technology Ltd. Tested-by: Tommaso Merciai Reviewed-by: Conor Dooley Signed-off-by: Emil Renner Berthing Co-developed-by: Jianlong Huang Signed-off-by: Jianlong Huang Co-developed-by: Hal Feng Signed-off-by: Hal Feng [conor: squashed in the removal of the S7's non-existent mmu] Reviewed-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit 8868caa2a073cdac8a3c28e4e30cf72fe6b44f22 Author: Hal Feng Date: Sat Apr 1 19:19:30 2023 +0800 dt-bindings: riscv: Add SiFive S7 compatible Add a new compatible string in cpu.yaml for SiFive S7 CPU core which is used on SiFive U74-MC core complex etc. Reviewed-by: Conor Dooley Acked-by: Krzysztof Kozlowski Reviewed-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit 8406d19ca0493aa8b4b83314efe57219c8bb92b6 Author: Emil Renner Berthing Date: Sat Apr 1 19:19:29 2023 +0800 dt-bindings: interrupt-controller: Add StarFive JH7110 plic Add compatible string for StarFive JH7110 plic. Reviewed-by: Conor Dooley Acked-by: Krzysztof Kozlowski Reviewed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit 1ff5482ab9a5565a56b15626a6bc5bf20dab3465 Author: Emil Renner Berthing Date: Sat Apr 1 19:19:28 2023 +0800 dt-bindings: timer: Add StarFive JH7110 clint Add compatible string for the StarFive JH7110 clint. Reviewed-by: Conor Dooley Acked-by: Krzysztof Kozlowski Reviewed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit 82327b127d4117e5b867cca945f97a5074aef786 Author: Hal Feng Date: Sat Apr 1 19:19:27 2023 +0800 reset: starfive: Add StarFive JH7110 reset driver Add auxiliary driver to support StarFive JH7110 system and always-on resets. Tested-by: Tommaso Merciai Reviewed-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit b2ab3c94f41f888f9bec6ac6bf75935e2e2e253a Author: Emil Renner Berthing Date: Sat Apr 1 19:19:26 2023 +0800 clk: starfive: Add StarFive JH7110 always-on clock driver Add driver for the StarFive JH7110 always-on clock controller and register an auxiliary device for always-on reset controller which is named as "rst-aon". Tested-by: Tommaso Merciai Reviewed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Co-developed-by: Hal Feng Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit edab7204afe55bdf2d17d3490eb88497ba60f628 Author: Emil Renner Berthing Date: Sat Apr 1 19:19:25 2023 +0800 clk: starfive: Add StarFive JH7110 system clock driver Add driver for the StarFive JH7110 system clock controller and register an auxiliary device for system reset controller which is named as "rst-sys". Tested-by: Tommaso Merciai Reviewed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Co-developed-by: Hal Feng Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit b6d7406cd7a199fabf93008e9fc0aa0358695a79 Author: Emil Renner Berthing Date: Sat Apr 1 19:19:24 2023 +0800 reset: starfive: jh71x0: Use 32bit I/O on 32bit registers We currently use 64bit I/O on the 32bit registers. This works because there are an even number of assert and status registers, so they're only ever accessed in pairs on 64bit boundaries. There are however other reset controllers for audio and video on the JH7100 SoC with only one status register that isn't 64bit aligned so 64bit I/O results in an unaligned access exception. Switch to 32bit I/O in preparation for supporting these resets too. Tested-by: Tommaso Merciai Reviewed-by: Conor Dooley Reviewed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit 0333103ee96069a7a53d8f599e70d86d4c18a53c Author: Emil Renner Berthing Date: Sat Apr 1 19:19:23 2023 +0800 reset: starfive: Rename "jh7100" to "jh71x0" for the common code For the common code will be shared with the StarFive JH7110 SoC. Tested-by: Tommaso Merciai Reviewed-by: Conor Dooley Reviewed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit ed36fcd160f3a703e0264539abdf0da2f3e0fc35 Author: Emil Renner Berthing Date: Sat Apr 1 19:19:22 2023 +0800 reset: starfive: Extract the common JH71X0 reset code Extract the common JH71X0 reset code for reusing them to support JH7110 SoC. Tested-by: Tommaso Merciai Reviewed-by: Conor Dooley Reviewed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit 1ec3d20e4e2fef33c618b2ef550cbf3b4728e4cd Author: Emil Renner Berthing Date: Sat Apr 1 19:19:21 2023 +0800 reset: starfive: Factor out common JH71X0 reset code The StarFive JH7100 SoC has additional reset controllers for audio and video, but the registers follow the same structure. On the JH7110 the reset registers don't get their own memory range, but instead follow the clock control registers. The registers still follow the same structure though, so let's factor out the common code to handle all these cases. Tested-by: Tommaso Merciai Reviewed-by: Conor Dooley Reviewed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit 69bfec7548f4c1595bac0e3ddfc0458a5af31f4c Author: Emil Renner Berthing Date: Sat Apr 1 19:19:20 2023 +0800 reset: Create subdirectory for StarFive drivers This moves the StarFive JH7100 reset driver to a new subdirectory in preparation for adding more StarFive reset drivers. Reviewed-by: Philipp Zabel Tested-by: Tommaso Merciai Reviewed-by: Conor Dooley Reviewed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit c49a757a5a9e2eab2202ecd28aedc22a0aedfbe8 Author: Hal Feng Date: Sat Apr 1 19:19:19 2023 +0800 reset: starfive: Replace SOC_STARFIVE with ARCH_STARFIVE Using ARCH_FOO symbol is preferred than SOC_FOO. Reviewed-by: Philipp Zabel Reviewed-by: Conor Dooley Reviewed-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit 147455edfe8a2a3748d411d588ad952124773efe Author: Emil Renner Berthing Date: Sat Apr 1 19:19:18 2023 +0800 clk: starfive: Rename "jh7100" to "jh71x0" for the common code Rename some variables from "jh7100" or "JH7100" to "jh71x0" or "JH71X0". Tested-by: Tommaso Merciai Reviewed-by: Conor Dooley Reviewed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit e19aa7861fccced5f72745fcd14b87d281c9bb99 Author: Emil Renner Berthing Date: Sat Apr 1 19:19:17 2023 +0800 clk: starfive: Rename clk-starfive-jh7100.h to clk-starfive-jh71x0.h Rename clk-starfive-jh7100.h to clk-starfive-jh71x0.h for making the code to be common. Tested-by: Tommaso Merciai Reviewed-by: Conor Dooley Reviewed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit 00f1cb17aeb71daf3d9ead5d11412c650329d6cf Author: Emil Renner Berthing Date: Sat Apr 1 19:19:16 2023 +0800 clk: starfive: Factor out common JH7100 and JH7110 code The clock control registers on the StarFive JH7100 and JH7110 work identically, so factor out the code then drivers for the two SoCs can share it without depending on each other. No functional change. Tested-by: Tommaso Merciai Reviewed-by: Conor Dooley Reviewed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit c61f19ec3be35271fc005dac34390d9c5e1a2737 Author: Hal Feng Date: Sat Apr 1 19:19:15 2023 +0800 clk: starfive: Replace SOC_STARFIVE with ARCH_STARFIVE Using ARCH_FOO symbol is preferred than SOC_FOO. Set obj-y for starfive/ in Makefile, so the StarFive drivers can be compiled with COMPILE_TEST=y but ARCH_STARFIVE=n. Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Reviewed-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit 3de0c91032580d4923624fe6ee773eddd1b574bc Author: Emil Renner Berthing Date: Sat Apr 1 19:19:14 2023 +0800 dt-bindings: clock: Add StarFive JH7110 always-on clock and reset generator Add bindings for the always-on clock and reset generator (AONCRG) on the JH7110 RISC-V SoC by StarFive Ltd. Reviewed-by: Conor Dooley Reviewed-by: Rob Herring Reviewed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit 7fce1e39f01900a294cd2c456c77f3e2512e0634 Author: Emil Renner Berthing Date: Sat Apr 1 19:19:13 2023 +0800 dt-bindings: clock: Add StarFive JH7110 system clock and reset generator Add bindings for the system clock and reset generator (SYSCRG) on the JH7110 RISC-V SoC by StarFive Ltd. Reviewed-by: Conor Dooley Reviewed-by: Rob Herring Reviewed-by: Emil Renner Berthing Signed-off-by: Emil Renner Berthing Signed-off-by: Hal Feng Signed-off-by: Conor Dooley commit 41500f45356277f20dbca6e40b33f799f3d1e72a Author: Sumitra Sharma Date: Tue Apr 4 23:30:03 2023 -0700 staging: rtl8192e: Add blank lines after declarations Add blank lines after declarations to adhere to the Linux kernel coding-style. Check reported by checkpatch.pl "CHECK: Please use a blank line after function/struct/union/enum declarations" Signed-off-by: Sumitra Sharma Link: https://lore.kernel.org/r/20230405063003.GA218972@sumitra.com Signed-off-by: Greg Kroah-Hartman commit 85f76d9301ff439ef2c11ce0f854468285133f0e Author: Khadija Kamran Date: Sun Apr 2 19:32:46 2023 +0500 staging: rtl8192e: avoid CamelCase Linux kernel coding-style suggests to not use mixed-case names. Fix checkpatch issue by changing the variable name from camel case to snake case. Signed-off-by: Khadija Kamran Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/d29ff5db6f19d79ee762a835db88155bee2aefba.1680445545.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman commit f60fc1311bcc7601750ec38bb215d6202c1c9461 Author: Khadija Kamran Date: Sun Apr 2 19:32:45 2023 +0500 staging: rtl8192e: avoid CamelCase Linux kernel coding-style suggests to not use mixed-case names. Fix checkpatch issue by changing the variable name from camel case to snake case. Signed-off-by: Khadija Kamran Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/7166160c0face9e32dbb28c44727eb8856173f0a.1680445545.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman commit 73749c7fb4ab99eb9930ed400ce56eb18a077983 Author: Khadija Kamran Date: Sun Apr 2 19:32:44 2023 +0500 staging: rtl8192e: avoid CamelCase Linux kernel coding-style suggests to not use mixed-case names. Fix checkpatch issue by changing the variable name from camel case to snake case. Signed-off-by: Khadija Kamran Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/ebfd9c40400eac872b9af2a5120b0829ff71e077.1680445545.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7cf3f17b58e20c8a3b9266b8aa205cafb2e10d3c Author: Khadija Kamran Date: Sun Apr 2 19:32:43 2023 +0500 staging: rtl8192e: fix alignment to match open parenthesis Fix alignemnt to match opening parenthesis as suggested by Linux kernel coding-style. This issue is reported by checkpatch. Signed-off-by: Khadija Kamran Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/76814f7a2a026ef195334b0c42ecd2aeb8e8ea40.1680445545.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman commit f395d3f9d2d08a8b312eab72b9094f4f9cb72636 Author: Khadija Kamran Date: Sun Apr 2 19:32:42 2023 +0500 staging: rtl8192e: remove extra blank lines in rtllib_crypt_ccmp.c Remove extra blank lines as suggested by the Linux kernel coding-style. These issues were reported by checkpatch. "CHECK: Please don't use multiple blank lines" Signed-off-by: Khadija Kamran Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/283265f6a5ff938f8425e14af86cee9e2da36318.1680445545.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3642e50acc63b92123b95bf8a63da204e44c4efb Author: Philipp Hortmann Date: Sun Apr 2 11:52:13 2023 +0200 staging: rtl8192e: Remove case customer_id = RT_CID_DEFAULT, .. customer_id is initialize to zero. Changing customer_id to RT_CID_DEFAULT will not change customer_id as it is already zero. default and EEPROM_CID_WHQL contain only a break. Remove useless code lines to increase readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/58df9db5da84991206266e739b2a12c893d1be8e.1680427945.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 795916c1c8be85fc49bf50823343b075517fe573 Author: Philipp Hortmann Date: Sun Apr 2 11:52:05 2023 +0200 staging: rtl8192e: Remove case customer_id = RT_CID_819x_CAMEO, .. customer_id is initialize to zero. Changing customer_id to RT_CID_819x_CAMEO, RT_CID_819x_RUNTOP, RT_CID_Nettronix or RT_CID_PRONET would not change the program execution as there is no equation for RT_CID_819x_CAMEO, RT_CID_819x_RUNTOP, RT_CID_Nettronix or RT_CID_PRONET. Remove useless code lines to increase readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b546933897acc20a6ac5be2bd5ef5ad979599c66.1680427945.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8e45222d792cf50ff17632892d4ab932a61e62f0 Author: Philipp Hortmann Date: Sun Apr 2 11:51:59 2023 +0200 staging: rtl8192e: Remove case customer_id = RT_CID_DLINK customer_id is initialize to zero. Changing customer_id to RT_CID_DLINK would not change the program execution as there is no equation for RT_CID_DLINK. Remove useless code lines to increase readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/e4ecef11015c32c9909cd07e0939c4de53fd501a.1680427945.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0be699ab84b1e796173bbc8a055f8a1b30da85a9 Author: Philipp Hortmann Date: Sun Apr 2 11:51:54 2023 +0200 staging: rtl8192e: Remove local variable Value and powerlevelOFDM24G powerlevelOFDM24G is set to priv->pwr_track. Then Value is set to powerlevelOFDM24G and then only once used. Remove both variables to increase readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/2076dc2f8f5afc11cbab23bc3f5d4ace9bf33bfd.1680427945.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit b7119698bcca83d6d755b866bcf7328314d9cde0 Author: Philipp Hortmann Date: Sun Apr 2 11:51:47 2023 +0200 staging: rtl8192e: Remove enum RF_1T2R and RF_Type enum RF_1T2R is used to initialize a local variable RF_Type that is then shifted. The result of the shift is zero. Remove code that has always the same result to increase readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/6c29e709f5c328703870ca8e7d61ee6338886fa7.1680427945.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit d8571801a61c01841ac1813e0fb97048c2505a6a Author: Philipp Hortmann Date: Sun Apr 2 11:51:42 2023 +0200 staging: rtl8192e: Remove RF_Type from .._dm_tx_update_tssi_weak_signal Remove RF_Type from _rtl92e_dm_tx_update_tssi_weak_signal and _rtl92e_dm_tx_update_tssi_strong_signal as it is unused. Reported-by: kernel test robot Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/95744a9d271723b44b92465809d092f90edf9bc9.1680427945.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7c2455436242b1187e86e954aae4b04cfc81b14c Author: Daniel Watson Date: Fri Mar 31 16:00:24 2023 -0700 staging: rtl8723bs: indent with tab, align with space Use tabs to indent code and spaces to align in order to make the code consistent and easier to read. Signed-off-by: Daniel Watson Link: https://lore.kernel.org/r/ZCdmCBIdabBGqm11@trent-reznor Signed-off-by: Greg Kroah-Hartman commit 80472350d9d1b8c4094b48a2dc8fdea172dab85b Author: Lukas Bulwahn Date: Wed Mar 29 09:43:42 2023 +0200 staging: vme: clean up duplicate definitions of dependencies The file staging/vme_user/Kconfig is only included by the top-level staging/Kconfig if STAGING is enabled. So, there is no need to mention the dependency on STAGING within the vme_user Kconfig file. Further, the config VME_USER is already within the "if VME_BUS" block, so there is no need to mention the dependency on VME_BUS. Clean up these duplications of dependencies. No semantic change. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20230329074342.27595-1-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8ae99857748bece993962dd8d04e096f9e76731f Merge: 3c1566bca3f83 09853fb89f6bc 1eacac3255495 cefc0a599b19d 5c5552d6297a2 6bc6e6b275243 Author: Joel Fernandes (Google) Date: Wed Apr 5 13:50:37 2023 +0000 Merge branches 'rcu/staging-core', 'rcu/staging-docs' and 'rcu/staging-kfree', remote-tracking branches 'paul/srcu-cf.2023.04.04a', 'fbq/rcu/lockdep.2023.03.27a' and 'fbq/rcu/rcutorture.2023.03.20a' into rcu/staging commit 1eacac3255495be7502d406e2ba5444fb5c3607c Author: Joel Fernandes (Google) Date: Mon Mar 6 14:33:58 2023 +0000 checkpatch: Error out if deprecated RCU API used Single-argument kvfree_rcu() usage is being deprecated [1] [2]. However, till all users are converted, we would like to introduce checkpatch errors for new patches submitted. This patch adds support for the same. Tested with a trial patch. For now, we are only considering usages that don't have compound nesting, for example ignore: kvfree_rcu( (rcu_head_obj), rcu_head_name). This is sufficient as such usages are unlikely. Once all users are converted and we remove the old API, we can also revert this checkpatch patch then. [1] https://lore.kernel.org/rcu/CAEXW_YRhHaVuq+5f+VgCZM=SF+9xO+QXaxe0yE7oA9iCXK-XPg@mail.gmail.com/ [2] https://lore.kernel.org/rcu/CAEXW_YSY=q2_uaE2qo4XSGjzs4+C102YMVJ7kWwuT5LGmJGGew@mail.gmail.com/ Acked-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit eb56a4cbc3ea348dc07fbe82531c27cce83df3b9 Author: Joel Fernandes (Google) Date: Fri Mar 10 01:18:12 2023 +0000 mac802154: Rename kfree_rcu() to kvfree_rcu_mightsleep() The k[v]free_rcu() macro's single-argument form is deprecated. Therefore switch to the new k[v]free_rcu_mightsleep() variant. The goal is to avoid accidental use of the single-argument forms, which can introduce functionality bugs in atomic contexts and latency bugs in non-atomic contexts. The callers are holding a mutex so the context allows blocking. Hence using the API with a single argument will be fine, but use its new name. There is no functionality change with this patch. Fixes: 57588c71177f ("mac802154: Handle passive scanning") Acked-by: Stefan Schmidt Reviewed-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 936c7e19c695d624adac28ea390fd8d53c653542 Author: Uladzislau Rezki (Sony) Date: Wed Feb 1 16:09:52 2023 +0100 rcuscale: Rename kfree_rcu() to kfree_rcu_mightsleep() The kfree_rcu() and kvfree_rcu() macros' single-argument forms are deprecated. Therefore switch to the new kfree_rcu_mightsleep() and kvfree_rcu_mightsleep() variants. The goal is to avoid accidental use of the single-argument forms, which can introduce functionality bugs in atomic contexts and latency bugs in non-atomic contexts. Acked-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 10e4f310a887fd908b6800088f64fe21d7cc75a6 Author: Uladzislau Rezki (Sony) Date: Wed Feb 1 16:08:15 2023 +0100 ext4/super: Rename kfree_rcu() to kfree_rcu_mightsleep() The kfree_rcu() and kvfree_rcu() macros' single-argument forms are deprecated. Therefore switch to the new kfree_rcu_mightsleep() and kvfree_rcu_mightsleep() variants. The goal is to avoid accidental use of the single-argument forms, which can introduce functionality bugs in atomic contexts and latency bugs in non-atomic contexts. Cc: Theodore Ts'o Cc: Lukas Czerner Acked-by: Theodore Ts'o Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 23532061ad3047c014eacab048e9cef2d6463742 Author: Uladzislau Rezki (Sony) Date: Wed Feb 1 16:08:14 2023 +0100 net/mlx5: Rename kfree_rcu() to kfree_rcu_mightsleep() The kfree_rcu() and kvfree_rcu() macros' single-argument forms are deprecated. Therefore switch to the new kfree_rcu_mightsleep() and kvfree_rcu_mightsleep() variants. The goal is to avoid accidental use of the single-argument forms, which can introduce functionality bugs in atomic contexts and latency bugs in non-atomic contexts. Cc: Ariel Levkovich Cc: Saeed Mahameed Cc: Vlad Buslov Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit aef3b8b8dd55a8bdfd7ef96cfde0aa71fd82ed10 Author: Uladzislau Rezki (Sony) Date: Wed Feb 1 16:08:12 2023 +0100 net/sysctl: Rename kvfree_rcu() to kvfree_rcu_mightsleep() The kfree_rcu() and kvfree_rcu() macros' single-argument forms are deprecated. Therefore switch to the new kfree_rcu_mightsleep() and kvfree_rcu_mightsleep() variants. The goal is to avoid accidental use of the single-argument forms, which can introduce functionality bugs in atomic contexts and latency bugs in non-atomic contexts. Acked-by: Jakub Kicinski Cc: Eric Dumazet Cc: David S. Miller Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit c779b97281d52faac253e9afb004537e50ada4e8 Author: Uladzislau Rezki (Sony) Date: Wed Feb 1 16:08:11 2023 +0100 lib/test_vmalloc.c: Rename kvfree_rcu() to kvfree_rcu_mightsleep() The kvfree_rcu() macro's single-argument form is deprecated. Therefore switch to the new kvfree_rcu_mightsleep() variant. The goal is to avoid accidental use of the single-argument forms, which can introduce functionality bugs in atomic contexts and latency bugs in non-atomic contexts. Acked-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit cae16f2c2e11c60c888715f4d98c12740683d6a2 Author: Uladzislau Rezki (Sony) Date: Wed Feb 1 16:08:10 2023 +0100 tracing: Rename kvfree_rcu() to kvfree_rcu_mightsleep() The kvfree_rcu() macro's single-argument form is deprecated. Therefore switch to the new kvfree_rcu_mightsleep() variant. The goal is to avoid accidental use of the single-argument forms, which can introduce functionality bugs in atomic contexts and latency bugs in non-atomic contexts. Cc: Steven Rostedt (VMware) Acked-by: Daniel Bristot de Oliveira Acked-by: Paul E. McKenney Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 09b2286af617bc6f9480404b565393628f86037d Author: Uladzislau Rezki (Sony) Date: Wed Feb 1 16:08:09 2023 +0100 misc: vmw_vmci: Rename kvfree_rcu() to kvfree_rcu_mightsleep() The kvfree_rcu() macro's single-argument form is deprecated. Therefore switch to the new kvfree_rcu_mightsleep() variant. The goal is to avoid accidental use of the single-argument forms, which can introduce functionality bugs in atomic contexts and latency bugs in non-atomic contexts. Cc: Bryan Tan Cc: Vishnu Dasa Reviewed-by: Vishnu Dasa Acked-by: Greg Kroah-Hartman Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit a77b2109f71e0a963325869123b9b5f159b2ae5e Author: Uladzislau Rezki (Sony) Date: Wed Feb 1 16:08:08 2023 +0100 drbd: Rename kvfree_rcu() to kvfree_rcu_mightsleep() The kvfree_rcu() macro's single-argument form is deprecated. Therefore switch to the new kvfree_rcu_mightsleep() variant. The goal is to avoid accidental use of the single-argument forms, which can introduce functionality bugs in atomic contexts and latency bugs in non-atomic contexts. Cc: Jens Axboe Cc: Philipp Reisner Cc: Lars Ellenberg Begrudgingly-acked-by: Jens Axboe Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 3c1566bca3f8349f12b75d0a2d5e4a20ad6262ec Author: Zqiang Date: Sat Dec 24 13:25:53 2022 +0800 rcu: Protect rcu_print_task_exp_stall() ->exp_tasks access For kernels built with CONFIG_PREEMPT_RCU=y, the following scenario can result in a NULL-pointer dereference: CPU1 CPU2 rcu_preempt_deferred_qs_irqrestore rcu_print_task_exp_stall if (special.b.blocked) READ_ONCE(rnp->exp_tasks) != NULL raw_spin_lock_rcu_node np = rcu_next_node_entry(t, rnp) if (&t->rcu_node_entry == rnp->exp_tasks) WRITE_ONCE(rnp->exp_tasks, np) .... raw_spin_unlock_irqrestore_rcu_node raw_spin_lock_irqsave_rcu_node t = list_entry(rnp->exp_tasks->prev, struct task_struct, rcu_node_entry) (if rnp->exp_tasks is NULL, this will dereference a NULL pointer) The problem is that CPU2 accesses the rcu_node structure's->exp_tasks field without holding the rcu_node structure's ->lock and CPU2 did not observe CPU1's change to rcu_node structure's ->exp_tasks in time. Therefore, if CPU1 sets rcu_node structure's->exp_tasks pointer to NULL, then CPU2 might dereference that NULL pointer. This commit therefore holds the rcu_node structure's ->lock while accessing that structure's->exp_tasks field. [ paulmck: Apply Frederic Weisbecker feedback. ] Acked-by: Joel Fernandes (Google) Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 7a29fb4a4771124bc61de397dbfc1554dbbcc19c Author: Zheng Yejian Date: Fri Jan 6 15:09:34 2023 +0800 rcu: Avoid stack overflow due to __rcu_irq_enter_check_tick() being kprobe-ed Registering a kprobe on __rcu_irq_enter_check_tick() can cause kernel stack overflow as shown below. This issue can be reproduced by enabling CONFIG_NO_HZ_FULL and booting the kernel with argument "nohz_full=", and then giving the following commands at the shell prompt: # cd /sys/kernel/tracing/ # echo 'p:mp1 __rcu_irq_enter_check_tick' >> kprobe_events # echo 1 > events/kprobes/enable This commit therefore adds __rcu_irq_enter_check_tick() to the kprobes blacklist using NOKPROBE_SYMBOL(). Insufficient stack space to handle exception! ESR: 0x00000000f2000004 -- BRK (AArch64) FAR: 0x0000ffffccf3e510 Task stack: [0xffff80000ad30000..0xffff80000ad38000] IRQ stack: [0xffff800008050000..0xffff800008058000] Overflow stack: [0xffff089c36f9f310..0xffff089c36fa0310] CPU: 5 PID: 190 Comm: bash Not tainted 6.2.0-rc2-00320-g1f5abbd77e2c #19 Hardware name: linux,dummy-virt (DT) pstate: 400003c5 (nZcv DAIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __rcu_irq_enter_check_tick+0x0/0x1b8 lr : ct_nmi_enter+0x11c/0x138 sp : ffff80000ad30080 x29: ffff80000ad30080 x28: ffff089c82e20000 x27: 0000000000000000 x26: 0000000000000000 x25: ffff089c02a8d100 x24: 0000000000000000 x23: 00000000400003c5 x22: 0000ffffccf3e510 x21: ffff089c36fae148 x20: ffff80000ad30120 x19: ffffa8da8fcce148 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: ffffa8da8e44ea6c x14: ffffa8da8e44e968 x13: ffffa8da8e03136c x12: 1fffe113804d6809 x11: ffff6113804d6809 x10: 0000000000000a60 x9 : dfff800000000000 x8 : ffff089c026b404f x7 : 00009eec7fb297f7 x6 : 0000000000000001 x5 : ffff80000ad30120 x4 : dfff800000000000 x3 : ffffa8da8e3016f4 x2 : 0000000000000003 x1 : 0000000000000000 x0 : 0000000000000000 Kernel panic - not syncing: kernel stack overflow CPU: 5 PID: 190 Comm: bash Not tainted 6.2.0-rc2-00320-g1f5abbd77e2c #19 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0xf8/0x108 show_stack+0x20/0x30 dump_stack_lvl+0x68/0x84 dump_stack+0x1c/0x38 panic+0x214/0x404 add_taint+0x0/0xf8 panic_bad_stack+0x144/0x160 handle_bad_stack+0x38/0x58 __bad_stack+0x78/0x7c __rcu_irq_enter_check_tick+0x0/0x1b8 arm64_enter_el1_dbg.isra.0+0x14/0x20 el1_dbg+0x2c/0x90 el1h_64_sync_handler+0xcc/0xe8 el1h_64_sync+0x64/0x68 __rcu_irq_enter_check_tick+0x0/0x1b8 arm64_enter_el1_dbg.isra.0+0x14/0x20 el1_dbg+0x2c/0x90 el1h_64_sync_handler+0xcc/0xe8 el1h_64_sync+0x64/0x68 __rcu_irq_enter_check_tick+0x0/0x1b8 arm64_enter_el1_dbg.isra.0+0x14/0x20 el1_dbg+0x2c/0x90 el1h_64_sync_handler+0xcc/0xe8 el1h_64_sync+0x64/0x68 __rcu_irq_enter_check_tick+0x0/0x1b8 [...] el1_dbg+0x2c/0x90 el1h_64_sync_handler+0xcc/0xe8 el1h_64_sync+0x64/0x68 __rcu_irq_enter_check_tick+0x0/0x1b8 arm64_enter_el1_dbg.isra.0+0x14/0x20 el1_dbg+0x2c/0x90 el1h_64_sync_handler+0xcc/0xe8 el1h_64_sync+0x64/0x68 __rcu_irq_enter_check_tick+0x0/0x1b8 arm64_enter_el1_dbg.isra.0+0x14/0x20 el1_dbg+0x2c/0x90 el1h_64_sync_handler+0xcc/0xe8 el1h_64_sync+0x64/0x68 __rcu_irq_enter_check_tick+0x0/0x1b8 el1_interrupt+0x28/0x60 el1h_64_irq_handler+0x18/0x28 el1h_64_irq+0x64/0x68 __ftrace_set_clr_event_nolock+0x98/0x198 __ftrace_set_clr_event+0x58/0x80 system_enable_write+0x144/0x178 vfs_write+0x174/0x738 ksys_write+0xd0/0x188 __arm64_sys_write+0x4c/0x60 invoke_syscall+0x64/0x180 el0_svc_common.constprop.0+0x84/0x160 do_el0_svc+0x48/0xe8 el0_svc+0x34/0xd0 el0t_64_sync_handler+0xb8/0xc0 el0t_64_sync+0x190/0x194 SMP: stopping secondary CPUs Kernel Offset: 0x28da86000000 from 0xffff800008000000 PHYS_OFFSET: 0xfffff76600000000 CPU features: 0x00000,01a00100,0000421b Memory Limit: none Acked-by: Joel Fernandes (Google) Link: https://lore.kernel.org/all/20221119040049.795065-1-zhengyejian1@huawei.com/ Fixes: aaf2bc50df1f ("rcu: Abstract out rcu_irq_enter_check_tick() from rcu_nmi_enter()") Signed-off-by: Zheng Yejian Cc: stable@vger.kernel.org Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit a4533cc0a59f0956e1b78e6013b75014b4857fce Author: Neeraj Upadhyay Date: Wed Jan 11 13:15:00 2023 +0530 rcu-tasks: Report stalls during synchronize_srcu() in rcu_tasks_postscan() The call to synchronize_srcu() from rcu_tasks_postscan() can be stalled by a task getting stuck in do_exit() between that function's calls to exit_tasks_rcu_start() and exit_tasks_rcu_finish(). To ease diagnosis of this situation, print a stall warning message every rcu_task_stall_info period when rcu_tasks_postscan() is stalled. [ paulmck: Adjust to handle CONFIG_SMP=n. ] Acked-by: Frederic Weisbecker Reviewed-by: Joel Fernandes (Google) Reported-by: Mark Brown Link: https://lore.kernel.org/rcu/20230111212736.GA1062057@paulmck-ThinkPad-P17-Gen-1/ Signed-off-by: Neeraj Upadhyay Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 7ea91307ad2dbdd15ed0b762a2d994f816039b9d Author: Zqiang Date: Thu Jan 12 10:48:29 2023 -0800 rcu: Permit start_poll_synchronize_rcu_expedited() to be invoked early According to the commit log of the patch that added it to the kernel, start_poll_synchronize_rcu_expedited() can be invoked very early, as in long before rcu_init() has been invoked. But before rcu_init(), the rcu_data structure's ->mynode field has not yet been initialized. This means that the start_poll_synchronize_rcu_expedited() function's attempt to set the CPU's leaf rcu_node structure's ->exp_seq_poll_rq field will result in a segmentation fault. This commit therefore causes start_poll_synchronize_rcu_expedited() to set ->exp_seq_poll_rq only after rcu_init() has initialized all CPUs' rcu_data structures' ->mynode fields. It also removes the check from the rcu_init() function so that start_poll_synchronize_rcu_expedited( is unconditionally invoked. Yes, this might result in an unnecessary boot-time grace period, but this is down in the noise. Signed-off-by: Zqiang Reviewed-by: Frederic Weisbecker Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 46103fe01b02169150f16d8d6e028217c5a7abe5 Author: Zqiang Date: Wed Jan 18 15:30:14 2023 +0800 rcu: Remove never-set needwake assignment from rcu_report_qs_rdp() The rcu_accelerate_cbs() function is invoked by rcu_report_qs_rdp() only if there is a grace period in progress that is still blocked by at least one CPU on this rcu_node structure. This means that rcu_accelerate_cbs() should never return the value true, and thus that this function should never set the needwake variable and in turn never invoke rcu_gp_kthread_wake(). This commit therefore removes the needwake variable and the invocation of rcu_gp_kthread_wake() in favor of a WARN_ON_ONCE() on the call to rcu_accelerate_cbs(). The purpose of this new WARN_ON_ONCE() is to detect situations where the system's opinion differs from ours. Signed-off-by: Zqiang Reviewed-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 2450b78e0bb1e034eaa2a33dca689282bd8c892a Author: Zqiang Date: Mon Jan 30 15:17:37 2023 +0800 rcu: Register rcu-lazy shrinker only for CONFIG_RCU_LAZY=y kernels The lazy_rcu_shrink_count() shrinker function is registered even in kernels built with CONFIG_RCU_LAZY=n, in which case this function uselessly consumes cycles learning that no CPU has any lazy callbacks queued. This commit therefore registers this shrinker function only in the kernels built with CONFIG_RCU_LAZY=y, where it might actually do something useful. Signed-off-by: Zqiang Reviewed-by: Frederic Weisbecker Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit db7b464df9d820186e98a65aa6a10f0d51fbf8ce Author: Zqiang Date: Tue Dec 20 22:16:25 2022 +0800 rcu: Fix missing TICK_DEP_MASK_RCU_EXP dependency check This commit adds checks for the TICK_DEP_MASK_RCU_EXP bit, thus enabling RCU expedited grace periods to actually force-enable scheduling-clock interrupts on holdout CPUs. Fixes: df1e849ae455 ("rcu: Enable tick for nohz_full CPUs slow to provide expedited QS") Signed-off-by: Zqiang Cc: Steven Rostedt Cc: Masami Hiramatsu Cc: Frederic Weisbecker Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Anna-Maria Behnsen Acked-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit e22abe180cd8ccf12eb68e7c40f99c33fb48a9ce Author: Zqiang Date: Tue Dec 20 19:25:20 2022 +0800 rcu: Fix set/clear TICK_DEP_BIT_RCU_EXP bitmask race For kernels built with CONFIG_NO_HZ_FULL=y, the following scenario can result in the scheduling-clock interrupt remaining enabled on a holdout CPU after its quiescent state has been reported: CPU1 CPU2 rcu_report_exp_cpu_mult synchronize_rcu_expedited_wait acquires rnp->lock mask = rnp->expmask; for_each_leaf_node_cpu_mask(rnp, cpu, mask) rnp->expmask = rnp->expmask & ~mask; rdp = per_cpu_ptr(&rcu_data, cpu1); for_each_leaf_node_cpu_mask(rnp, cpu, mask) rdp = per_cpu_ptr(&rcu_data, cpu1); if (!rdp->rcu_forced_tick_exp) continue; rdp->rcu_forced_tick_exp = true; tick_dep_set_cpu(cpu1, TICK_DEP_BIT_RCU_EXP); The problem is that CPU2's sampling of rnp->expmask is obsolete by the time it invokes tick_dep_set_cpu(), and CPU1 is not guaranteed to see CPU2's store to ->rcu_forced_tick_exp in time to clear it. And even if CPU1 does see that store, it might invoke tick_dep_clear_cpu() before CPU2 got around to executing its tick_dep_set_cpu(), which would still leave the victim CPU with its scheduler-clock tick running. Either way, an nohz_full real-time application running on the victim CPU would have its latency needlessly degraded. Note that expedited RCU grace periods look at context-tracking information, and so if the CPU is executing in nohz_full usermode throughout, that CPU cannot be victimized in this manner. This commit therefore causes synchronize_rcu_expedited_wait to hold the rcu_node structure's ->lock when checking for holdout CPUs, setting TICK_DEP_BIT_RCU_EXP, and invoking tick_dep_set_cpu(), thus preventing this race. Signed-off-by: Zqiang Reviewed-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 16d78e8cda8b4447812f375480c8cb780f396c1e Author: Xu Panda Date: Thu Jan 5 20:17:57 2023 +0800 rcu/trace: use strscpy() to instead of strncpy() This commit saves a line of code by switching from strncpy() to strscpy() by permitting the later NUL assignment to be removed. While in the area, save another line by taking advantage of 100 characters. Acked-by: Joel Fernandes (Google) Signed-off-by: Xu Panda Signed-off-by: Yang Yang Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 58d7668242647e661a20efe065519abd6454287e Author: Joel Fernandes (Google) Date: Tue Jan 24 17:31:26 2023 +0000 tick/nohz: Fix cpu_is_hotpluggable() by checking with nohz subsystem For CONFIG_NO_HZ_FULL systems, the tick_do_timer_cpu cannot be offlined. However, cpu_is_hotpluggable() still returns true for those CPUs. This causes torture tests that do offlining to end up trying to offline this CPU causing test failures. Such failure happens on all architectures. Fix the repeated error messages thrown by this (even if the hotplug errors are harmless) by asking the opinion of the nohz subsystem on whether the CPU can be hotplugged. [ Apply Frederic Weisbecker feedback on refactoring tick_nohz_cpu_down(). ] For drivers/base/ portion: Acked-by: Greg Kroah-Hartman Acked-by: Frederic Weisbecker Cc: Frederic Weisbecker Cc: "Paul E. McKenney" Cc: Zhouyi Zhou Cc: Will Deacon Cc: Marc Zyngier Cc: rcu Cc: stable@vger.kernel.org Fixes: 2987557f52b9 ("driver-core/cpu: Expose hotpluggability to the rest of the kernel") Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 424d7b3ea99d13d7787432df8a6d2327fc6fda3c Author: Joel Fernandes (Google) Date: Thu Mar 23 19:18:07 2023 +0000 MAINTAINERS: Add Zqiang as a RCU reviewer I have spent about two years studying and contributing to RCU, and sharing RCU-related knowledge within my team, if possible, please consider me as R ;-). Acked-by: Paul E. McKenney Signed-off-by: Zqiang Signed-off-by: Joel Fernandes (Google) commit d4957c531a8ab44522c45daf43bb32a04220848d Author: Boqun Feng Date: Thu Mar 16 20:29:05 2023 -0700 MAINTAINERS: Add Boqun to RCU entry Just to be clear, the "M:" tag before my name is short of "Minions" ;-) Acked-by: Frederic Weisbecker Acked-by: Paul E. McKenney Signed-off-by: Boqun Feng Signed-off-by: Joel Fernandes (Google) commit 0fb09f8bdd9de0297cd1b970fd0655b9bd3908ef Author: Joel Fernandes (Google) Date: Fri Mar 17 19:44:04 2023 +0000 MAINTAINERS: Change Joel Fernandes from R: to M: I have spent years learning / contributing to RCU with several features, talks and presentations, with my most recent work being on Lazy-RCU. Please consider me for M, so I can tell my wife why I spend a lot of my weekends and evenings on this complicated and mysterious thing -- which is mostly in the hopes of preventing the world from burning down because everything runs on this one way or another. ;-) Acked-by: Frederic Weisbecker Acked-by: Paul E. McKenney Cc: "Paul E. McKenney" Cc: Frederic Weisbecker Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Joel Fernandes (Google) commit d276134ed4843d98f19acd10f8ad196eee0c1c0c Author: Paul E. McKenney Date: Fri Mar 24 13:52:46 2023 -0700 arch/x86: Remove "select SRCU" Now that the SRCU Kconfig option is unconditionally selected, there is no longer any point in selecting it. Therefore, remove the "select SRCU" Kconfig statements. Signed-off-by: Paul E. McKenney Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Reviewed-by: John Ogness Signed-off-by: Joel Fernandes (Google) commit 79cf833be68bd96c48ead083527cc04b37ee0898 Author: Paul E. McKenney Date: Fri Mar 24 13:52:47 2023 -0700 kvm: Remove "select SRCU" Now that the SRCU Kconfig option is unconditionally selected, there is no longer any point in selecting it. Therefore, remove the "select SRCU" Kconfig statements from the various KVM Kconfig files. Acked-by: Sean Christopherson (x86) Signed-off-by: Paul E. McKenney Cc: Huacai Chen Cc: Aleksandar Markovic Cc: Thomas Bogendoerfer Cc: Michael Ellerman Cc: Christophe Leroy Cc: Sean Christopherson Cc: Paolo Bonzini Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Acked-by: Marc Zyngier (arm64) Acked-by: Michael Ellerman (powerpc) Acked-by: Anup Patel (riscv) Acked-by: Heiko Carstens (s390) Reviewed-by: John Ogness Signed-off-by: Joel Fernandes (Google) commit 54a32d29dd6dcbec7fd9db60a6526166efd5288f Author: Paul E. McKenney Date: Fri Mar 24 13:52:48 2023 -0700 mm: Remove "select SRCU" Now that the SRCU Kconfig option is unconditionally selected, there is no longer any point in selecting it. Therefore, remove the "select SRCU" Kconfig statements. Signed-off-by: Paul E. McKenney Cc: Andrew Morton Cc: Reviewed-by: John Ogness Signed-off-by: Joel Fernandes (Google) commit e035e8876e6c2aa887c43edbd245c22f9f66de6d Author: Paul E. McKenney Date: Fri Mar 24 13:52:49 2023 -0700 rcu: Remove CONFIG_SRCU Now that all references to CONFIG_SRCU have been removed, it is time to remove CONFIG_SRCU itself. Signed-off-by: Paul E. McKenney Cc: John Ogness Cc: Petr Mladek Reviewed-by: John Ogness Signed-off-by: Joel Fernandes (Google) commit 09853fb89f6bc46727ccd325c0f6f266df51d155 Author: Paul E. McKenney Date: Sat Mar 4 13:40:55 2023 -0800 rcu: Add comment to rcu_do_batch() identifying rcuoc code path This commit adds a comment to help explain why the "else" clause of the in_serving_softirq() "if" statement does not need to enforce a time limit. The reason is that this "else" clause handles rcuoc kthreads that do not block handlers for other softirq vectors. Acked-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 81573694a48599f1edf928f390c6dcab5cbb6f49 Author: Uladzislau Rezki (Sony) Date: Wed Feb 1 16:09:53 2023 +0100 doc: Update whatisRCU.rst The kfree_rcu() macro is deprecated. Rename it to its new kfree_rcu_mightsleep() name in this documentation. Acked-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit c4af9e00894575797395e6cdd98b3a227ee70e29 Author: Randy Dunlap Date: Sun Jan 29 15:10:49 2023 -0800 Documentation: RCU: Correct spelling Correct spelling problems for Documentation/RCU/ as reported by codespell. Note: in RTFP.txt, there are other misspellings that are left as is since they were used that way in email Subject: lines or in LWN.net articles. [preemptable, Preemptable, synchonisation] Acked-by: Joel Fernandes (Google) Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: "Paul E. McKenney" Cc: Frederic Weisbecker Cc: Neeraj Upadhyay Cc: Josh Triplett Cc: rcu@vger.kernel.org Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 754aa6427efeb8a059233e18e810263a108fdd71 Author: Joel Fernandes (Google) Date: Sat Jan 28 03:59:01 2023 +0000 srcu: Clarify comments on memory barrier "E" There is an smp_mb() named "E" in srcu_flip() immediately before the increment (flip) of the srcu_struct structure's ->srcu_idx. The purpose of E is to order the preceding scan's read of lock counters against the flipping of the ->srcu_idx, in order to prevent new readers from continuing to use the old ->srcu_idx value, which might needlessly extend the grace period. However, this ordering is already enforced because of the control dependency between the preceding scan and the ->srcu_idx flip. This control dependency exists because atomic_long_read() is used to scan the counts, because WRITE_ONCE() is used to flip ->srcu_idx, and because ->srcu_idx is not flipped until the ->srcu_lock_count[] and ->srcu_unlock_count[] counts match. And such a match cannot happen when there is an in-flight reader that started before the flip (observation courtesy Mathieu Desnoyers). The litmus test below (courtesy of Frederic Weisbecker, with changes for ctrldep by Boqun and Joel) shows this: C srcu (* * bad condition: P0's first scan (SCAN1) saw P1's idx=0 LOCK count inc, though P1 saw flip. * * So basically, the ->po ordering on both P0 and P1 is enforced via ->ppo * (control deps) on both sides, and both P0 and P1 are interconnected by ->rf * relations. Combining the ->ppo with ->rf, a cycle is impossible. *) {} // updater P0(int *IDX, int *LOCK0, int *UNLOCK0, int *LOCK1, int *UNLOCK1) { int lock1; int unlock1; int lock0; int unlock0; // SCAN1 unlock1 = READ_ONCE(*UNLOCK1); smp_mb(); // A lock1 = READ_ONCE(*LOCK1); // FLIP if (lock1 == unlock1) { // Control dep smp_mb(); // E // Remove E and still passes. WRITE_ONCE(*IDX, 1); smp_mb(); // D // SCAN2 unlock0 = READ_ONCE(*UNLOCK0); smp_mb(); // A lock0 = READ_ONCE(*LOCK0); } } // reader P1(int *IDX, int *LOCK0, int *UNLOCK0, int *LOCK1, int *UNLOCK1) { int tmp; int idx1; int idx2; // 1st reader idx1 = READ_ONCE(*IDX); if (idx1 == 0) { // Control dep tmp = READ_ONCE(*LOCK0); WRITE_ONCE(*LOCK0, tmp + 1); smp_mb(); /* B and C */ tmp = READ_ONCE(*UNLOCK0); WRITE_ONCE(*UNLOCK0, tmp + 1); } else { tmp = READ_ONCE(*LOCK1); WRITE_ONCE(*LOCK1, tmp + 1); smp_mb(); /* B and C */ tmp = READ_ONCE(*UNLOCK1); WRITE_ONCE(*UNLOCK1, tmp + 1); } } exists (0:lock1=1 /\ 1:idx1=1) More complicated litmus tests with multiple SRCU readers also show that memory barrier E is not needed. This commit therefore clarifies the comment on memory barrier E. Why not also remove that redundant smp_mb()? Because control dependencies are quite fragile due to their not being recognized by most compilers and tools. Control dependencies therefore exact an ongoing maintenance burden, and such a burden cannot be justified in this slowpath. Therefore, that smp_mb() stays until such time as its overhead becomes a measurable problem in a real workload running on a real production system, or until such time as compilers start paying attention to this sort of control dependency. Co-developed-by: Frederic Weisbecker Signed-off-by: Frederic Weisbecker Co-developed-by: Mathieu Desnoyers Signed-off-by: Mathieu Desnoyers Co-developed-by: Boqun Feng Signed-off-by: Boqun Feng Reviewed-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit e5ad8b68f8d49211a5a2a20fdccac4180451f7f6 Author: Qiuxu Zhuo Date: Fri Jan 13 16:31:08 2023 +0800 Documentation/RCU: s/not/note/ in checklist.rst "Please not that you *cannot* rely..." has a typo. Fix it. Acked-by: Joel Fernandes (Google) Signed-off-by: Qiuxu Zhuo Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit e15a19306004b3d7b6a5fe269e4e7cb7934aa3fe Author: Pingfan Liu Date: Wed Jan 4 12:29:01 2023 -0800 srcu: Add comments for srcu_size_state The SRCU_SIZE_* names are not self-explanatory, so this commit therefore adds comments to the definitions. Signed-off-by: Pingfan Liu Cc: Lai Jiangshan Cc: "Paul E. McKenney" Cc: Frederic Weisbecker Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: "Zhang, Qiang1" To: rcu@vger.kernel.org Reviewed-by: Paul E. McKenney Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 3636d8d114c648af2484f8049eb7ecb204c542c6 Author: Frederic Weisbecker Date: Thu Jan 19 14:29:34 2023 +0100 rcu: Further comment and explain the state space of GP sequences The state space of the GP sequence number isn't documented and the definitions of its special values are scattered. This commit therefore gathers some common knowledge near the grace-period sequence-number definitions. Signed-off-by: Frederic Weisbecker Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) commit 4c4dd04e75e8177311d17387326253674cb0558b Author: Ondrej Kozina Date: Wed Apr 5 13:12:23 2023 +0200 sed-opal: Add command to read locking range parameters. It returns following attributes: locking range start locking range length read lock enabled write lock enabled lock state (RW, RO or LK) It can be retrieved by user authority provided the authority was added to locking range via prior IOC_OPAL_ADD_USR_TO_LR ioctl command. The command was extended to add user in ACE that allows to read attributes listed above. Signed-off-by: Ondrej Kozina Tested-by: Luca Boccassi Tested-by: Milan Broz Link: https://lore.kernel.org/r/20230405111223.272816-6-okozina@redhat.com Signed-off-by: Jens Axboe commit baf82b679cb2c76eb6f4b2881a60380e328ccc79 Author: Ondrej Kozina Date: Wed Apr 5 13:12:22 2023 +0200 sed-opal: add helper to get multiple columns at once. Refactors current code querying single column to use the new helper. Real multi column usage will be added later. Signed-off-by: Ondrej Kozina Tested-by: Luca Boccassi Tested-by: Milan Broz Acked-by: Christian Brauner Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230405111223.272816-5-okozina@redhat.com Signed-off-by: Jens Axboe commit 8be19a02f1e373d406b3d9e0c17a90c786c51c1f Author: Ondrej Kozina Date: Wed Apr 5 13:12:21 2023 +0200 sed-opal: allow user authority to get locking range attributes. Extend ACE set of locking range attributes accessible to user authority. This patch allows user authority to get following locking range attribues when user get added to locking range via IOC_OPAL_ADD_USR_TO_LR: locking range start locking range end read lock enabled write lock enabled read locked write locked lock on reset active key Note: Admin1 authority always remains in the ACE. Otherwise it breaks current userspace expecting Admin1 in the ACE (sedutils). See TCG OPAL2 s.4.3.1.7 "ACE_Locking_RangeNNNN_Get_RangeStartToActiveKey". Signed-off-by: Ondrej Kozina Tested-by: Luca Boccassi Tested-by: Milan Broz Acked-by: Christian Brauner Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230405111223.272816-4-okozina@redhat.com Signed-off-by: Jens Axboe commit 175b654402a11b01870e823f4eaa913b27ed8a63 Author: Ondrej Kozina Date: Wed Apr 5 13:12:20 2023 +0200 sed-opal: add helper for adding user authorities in ACE. Move ACE construction away from add_user_to_lr routine and refactor it to be used also in later code. Also adds boolean operators defines from TCG Core specification. Signed-off-by: Ondrej Kozina Tested-by: Luca Boccassi Tested-by: Milan Broz Link: https://lore.kernel.org/r/20230405111223.272816-3-okozina@redhat.com Signed-off-by: Jens Axboe commit 2fce95b196d34a17ac3f531933d156a8550d5b82 Author: Ondrej Kozina Date: Wed Apr 5 13:12:19 2023 +0200 sed-opal: do not add same authority twice in boolean ace. While adding user authority in boolean ace value of uid OPAL_LOCKINGRANGE_ACE_WRLOCKED or OPAL_LOCKINGRANGE_ACE_RDLOCKED, it was added twice. It seemed redundant when only single authority was added in the set method aka { authority1, authority1, OR }: TCG Storage Architecture Core Specification, 5.1.3.3 ACE_expression "This is an alternative type where the options are either a uidref to an Authority object or one of the boolean_ACE (AND = 0 and OR = 1) options. This type is used within the AC_element list to form a postfix Boolean expression of Authorities." Signed-off-by: Ondrej Kozina Tested-by: Luca Boccassi Tested-by: Milan Broz Reviewed-by: Christoph Hellwig Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20230405111223.272816-2-okozina@redhat.com Signed-off-by: Jens Axboe commit 28e0377c3af08848982af3f072622fca3a7b937f Merge: 4084c8ca1266b 45d2af82e0e6f Author: Mark Brown Date: Wed Apr 5 14:42:24 2023 +0100 spi: mchp-pci1xxxx: Fix minor bugs in spi-pci1xxxx Merge series from Tharun Kumar P : This patch series fixes the following bugs in spi-pci1xxxx driver: 1. Length of SPI transactions is improper 2. SPI transactions fail after suspend and resume 3. Incorrect implementation of pci1xxxx_spi_set_cs API commit 056a6e1db2f1cd6faa8c62c508c84850fe300f05 Author: Yang Yingliang Date: Thu Oct 27 14:56:25 2022 +0800 soc/tegra: cbb: tegra194: Use of_address_count() helper After commit 16988c742968 ("of/address: introduce of_address_count() helper"), We can use of_address_count() to instead of open-coding it. Signed-off-by: Yang Yingliang Signed-off-by: Thierry Reding commit f462eb1d0df39499eff2407b2581ddf2fe89e744 Author: Besar Wicaksono Date: Tue Mar 21 15:05:35 2023 -0500 arm64: defconfig: Enable ARM CoreSight PMU driver Enable driver for Coresight PMU arch device. Signed-off-by: Besar Wicaksono Signed-off-by: Thierry Reding commit 6854f2759842baf94c8970b52f443aaee18af1bf Author: Nick Alcock Date: Tue Feb 28 13:02:15 2023 +0000 soc/tegra: cbb: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Signed-off-by: Thierry Reding commit e8476011f04b1ee4360f755ed19cbbddf12dc83e Author: Nick Alcock Date: Fri Feb 17 14:10:44 2023 +0000 ARM: tegra: Remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Signed-off-by: Thierry Reding commit 42c67aa26271fd3c12947dc3983051ff5c0d3a73 Author: Ye Xingchen Date: Wed Feb 15 17:18:03 2023 +0800 soc/tegra: flowctrl: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Signed-off-by: Thierry Reding commit 72456c24c8357793bacf5e67549db1f8c3fafe11 Author: Saalim Quadri Date: Wed Apr 5 16:46:05 2023 +0530 ASoC: dt-bindings: wm8510: Convert to dtschema Convert the WM8510 audio CODEC bindings to DT schema Signed-off-by: Saalim Quadri Link: https://lore.kernel.org/r/20230405111605.5250-1-danascape@gmail.com Signed-off-by: Mark Brown commit 5c0ddb4e715d89e4ea94821cd85bcac220bd7ea4 Author: Ben Dooks Date: Fri Jan 27 09:39:10 2023 +0000 arm64: tegra: Add vccmq on Jetson TX2 The TX2 SoM's SDIO WiFI card is connected via mmc@3440000 however it does not look like the upstream kernel is even bothering to power this (and the regulator framework shuts down this power rail post kernel init). The issue seems to be a missing link for vccq from the MAX77620 PMIC's LDO5 which is labeled vddio_sdmmc3 (and not used anywhere else) to the mmc@3440000 node to ensure there is at leasr bus power. Note this does not fix the WiFi issue on upstream kernels, there is still something else missing that gets the BCM WiFi device to detect properly. Signed-off-by: Ben Dooks Signed-off-by: Thierry Reding commit 4224011374d1b4228a59b73149320c61eeb700b3 Author: Pin-yen Lin Date: Fri Mar 31 11:02:04 2023 +0800 drm/bridge: ps8640: Use constant sleep time for polling hpd The default hpd_wait_us in panel_edp.c is 2 seconds. This makes the sleep time in the polling of _ps8640_wait_hpd_asserted become 200ms. Change it to a constant 20ms to speed up the function. Signed-off-by: Pin-yen Lin Reviewed-by: Douglas Anderson Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20230331030204.1179524-1-treapking@chromium.org commit c299a2e6bf944b4218acc194a1cdf500b34e80aa Author: Uwe Kleine-König Date: Mon Dec 12 23:25:49 2022 +0100 soc: tegra: cbb: Drop empty platform remove function A remove callback just returning 0 is equivalent to no remove callback at all. So drop the useless function. Signed-off-by: Uwe Kleine-König Reviewed-by: Sumit Gupta Signed-off-by: Thierry Reding commit 16744314ee57928c24aca95aa15f1381657edcfe Author: Jon Hunter Date: Tue Jan 31 17:57:47 2023 +0000 arm64: tegra: Populate USB Type-C Controller for Jetson AGX Orin Add the USB Type-C controller that is present on the Jetson AGX Orin board. The ports for the Type-C controller are not populated yet, but will be added later once the USB host and device support for Jetson AGX Orin is enabled. This is based upon a patch from Wayne Chang . Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 4084c8ca1266ba09554de8df19aac82b6dd2e079 Author: Christophe Leroy Date: Sat Apr 1 19:59:50 2023 +0200 spi: fsl-spi: No need to check transfer length versus word size The verification is already do in the SPI core by function __spi_validate(), not it to check it again in fsl_spi_bufs(). Signed-off-by: Christophe Leroy Link: https://lore.kernel.org/r/9ace69a8085e22fafd9159e99edd7bbfae2f9940.1680371809.git.christophe.leroy@csgroup.eu Signed-off-by: Mark Brown commit 99aebb3c1b418d865461aa0813ef1b55285cbda4 Author: Christophe Leroy Date: Sat Apr 1 19:59:49 2023 +0200 spi: fsl-spi: Change mspi_apply_cpu_mode_quirks() to void mspi_apply_cpu_mode_quirks() always returns the passed bits_per_word unmodified. Make it return void, then don't check bits_per_word anymore on return as it doesn't change. bits_per_word is already checked by __spi_validate() so no risk to have bits_per_word higher than 32. Signed-off-by: Christophe Leroy Link: https://lore.kernel.org/r/3142a7c40af12a160f4e134764f2c34da3d8e1e2.1680371809.git.christophe.leroy@csgroup.eu Signed-off-by: Mark Brown commit fc96ec826bced75cc6b9c07a4ac44bbf651337ab Author: Christophe Leroy Date: Sat Apr 1 19:59:48 2023 +0200 spi: fsl-cpm: Use 16 bit mode for large transfers with even size On CPM, the RISC core is a lot more efficiant when doing transfers in 16-bits chunks than in 8-bits chunks, but unfortunately the words need to be byte swapped as seen in a previous commit. So, for large tranfers with an even size, allocate a temporary tx buffer and byte-swap data before and after transfer. This change allows setting higher speed for transfer. For instance on an MPC 8xx (CPM1 comms RISC processor), the documentation tells that transfer in byte mode at 1 kbit/s uses 0.200% of CPM load at 25 MHz while a word transfer at the same speed uses 0.032% of CPM load. This means the speed can be 6 times higher in word mode for the same CPM load. For the time being, only do it on CPM1 as there must be a trade-off between the CPM load reduction and the CPU load required to byte swap the data. Signed-off-by: Christophe Leroy Link: https://lore.kernel.org/r/f2e981f20f92dd28983c3949702a09248c23845c.1680371809.git.christophe.leroy@csgroup.eu Signed-off-by: Mark Brown commit 8a5299a1278eadf1e08a598a5345c376206f171e Author: Christophe Leroy Date: Sat Apr 1 19:59:47 2023 +0200 spi: fsl-spi: Re-organise transfer bits_per_word adaptation For different reasons, fsl-spi driver performs bits_per_word modifications for different reasons: - On CPU mode, to minimise amount of interrupts - On CPM/QE mode to work around controller byte order For CPU mode that's done in fsl_spi_prepare_message() while for CPM mode that's done in fsl_spi_setup_transfer(). Reunify all of it in fsl_spi_prepare_message(), and catch impossible cases early through master's bits_per_word_mask instead of returning EINVAL later. Signed-off-by: Christophe Leroy Link: https://lore.kernel.org/r/0ce96fe96e8b07cba0613e4097cfd94d09b8919a.1680371809.git.christophe.leroy@csgroup.eu Signed-off-by: Mark Brown commit c20c57d9868d7f9fd1b2904c7801b07e128f6322 Author: Christophe Leroy Date: Sat Apr 1 19:59:46 2023 +0200 spi: fsl-spi: Fix CPM/QE mode Litte Endian CPM has the same problem as QE so for CPM also use the fix added by commit 0398fb70940e ("spi/spi_mpc8xxx: Fix QE mode Litte Endian"): CPM mode uses Little Endian so words > 8 bits are byte swapped. Workaround this by always enforcing wordsize 8 for 16 and 32 bits words. Unfortunately this will not work for LSB transfers where wordsize is > 8 bits so disable these for now. Also limit the workaround to 16 and 32 bits words because it can only work for multiples of 8-bits. Signed-off-by: Christophe Leroy Cc: Joakim Tjernlund Fixes: 0398fb70940e ("spi/spi_mpc8xxx: Fix QE mode Litte Endian") Link: https://lore.kernel.org/r/1b7d3e84b1128f42c1887dd2fb9cdf390f541bc1.1680371809.git.christophe.leroy@csgroup.eu Signed-off-by: Mark Brown commit 45d2af82e0e6f662d0d0db20993b35cb1d8da646 Author: Tharun Kumar P Date: Tue Apr 4 22:46:13 2023 +0530 spi: mchp-pci1xxxx: Fix improper implementation of disabling chip select lines Hardware does not have support to disable individual chip select lines. Disable all chip select lines by using SPI_FORCE_CE bit. Fixes: 1cc0cbea7167 ("spi: microchip: pci1xxxx: Add driver for SPI controller of PCI1XXXX PCIe switch") Signed-off-by: Tharun Kumar P Link: https://lore.kernel.org/r/20230404171613.1336093-4-tharunkumar.pasumarthi@microchip.com Signed-off-by: Mark Brown commit 4266d21669de62cf3fb6774f7d404c1eb95a5ab3 Author: Tharun Kumar P Date: Tue Apr 4 22:46:12 2023 +0530 spi: mchp-pci1xxxx: Fix SPI transactions not working after suspend and resume pci1xxxx_spi_resume API masks SPI interrupt bit which prohibits interrupt from coming to the host at the end of the transaction after suspend-resume. This patch unmasks this bit at resume. Fixes: 1cc0cbea7167 ("spi: microchip: pci1xxxx: Add driver for SPI controller of PCI1XXXX PCIe switch") Signed-off-by: Tharun Kumar P Link: https://lore.kernel.org/r/20230404171613.1336093-3-tharunkumar.pasumarthi@microchip.com Signed-off-by: Mark Brown commit 35c8c5e503a82e0a4bf251d32096211eba8c2be6 Author: Tharun Kumar P Date: Tue Apr 4 22:46:11 2023 +0530 spi: mchp-pci1xxxx: Fix length of SPI transactions not set properly in driver In pci1xxxx_spi_transfer_one API, length of SPI transaction gets cleared by setting of length mask. Set length of transaction only after masking length field. Fixes: 1cc0cbea7167 ("spi: microchip: pci1xxxx: Add driver for SPI controller of PCI1XXXX PCIe switch") Signed-off-by: Tharun Kumar P Link: https://lore.kernel.org/r/20230404171613.1336093-2-tharunkumar.pasumarthi@microchip.com Signed-off-by: Mark Brown commit ad813605f77553f5e73cd23913fa7591b0d794f6 Author: Tom Rix Date: Tue Mar 21 14:12:55 2023 -0400 USB: serial: quatech2: remove unused qt2_setdevice function clang with W=1 reports drivers/usb/serial/quatech2.c:179:19: error: unused function 'qt2_setdevice' [-Werror,-Wunused-function] static inline int qt2_setdevice(struct usb_device *dev, u8 *data) ^ This function is not used, so remove it. Signed-off-by: Tom Rix Signed-off-by: Johan Hovold commit 1ea63f29c27712d6b9c45af67cd71299d849c5e3 Author: Kuninori Morimoto Date: Sun Apr 2 23:00:17 2023 +0000 ASoC: soc.h: remove unused params/num_params No drivers are using params/num_params any more. Let's remove these. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87iledc2ke.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e7a73b05542d82e209af450dd90b730255f6e775 Author: Kuninori Morimoto Date: Sun Apr 2 23:00:07 2023 +0000 ASoC: samsung: switch to use c2c_params instead of params ASoC is now using c2c_params instead of params. This patch replace it. num_c2c_params (was num_params) was not mandatory before, but let's set it by this patch. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87jzytc2kp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 433f4a1697fae78c34377de1ef3abd26aec8214e Author: Kuninori Morimoto Date: Sun Apr 2 22:59:57 2023 +0000 ASoC: meson: switch to use c2c_params instead of params ASoC is now using c2c_params instead of params. This patch replace it. num_c2c_params (was num_params) was not mandatory before, but let's set it by this patch. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lej9c2ky.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a1cd7e8017aabe4dded887dcca30e126ec2753c3 Author: Kuninori Morimoto Date: Sun Apr 2 22:59:45 2023 +0000 ASoC: audio-graph-card2: switch to use c2c_params instead of params ASoC is now using c2c_params instead of params. This patch replace it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87mt3pc2la.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 7ddc7f91beb285246e926e3adf0b292b071aea33 Author: Kuninori Morimoto Date: Sun Apr 2 22:59:35 2023 +0000 ASoC: soc.h: clarify Codec2Codec params snd_soc_dai_link has params/num_params, but it is unclear that params for what. This patch clarify it is params for Codec2Codec. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o7o5c2lk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 60e7dade498eb881bcdf0d9a420c97625f73acc1 Author: Oliver Upton Date: Tue Apr 4 15:40:50 2023 +0000 KVM: selftests: Add test for SMCCC filter Add a selftest for the SMCCC filter, ensuring basic UAPI constraints (e.g. reserved ranges, non-overlapping ranges) are upheld. Additionally, test that the DENIED and FWD_TO_USER work as intended. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230404154050.2270077-14-oliver.upton@linux.dev commit fab19915f498b0e76fabd4d78841c99b7b6d7851 Author: Oliver Upton Date: Tue Apr 4 15:40:49 2023 +0000 KVM: selftests: Add a helper for SMCCC calls with SMC instruction Build a helper for doing SMCs in selftests by macro-izing the current HVC implementation and taking the conduit instruction as an argument. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230404154050.2270077-13-oliver.upton@linux.dev commit 37c8e494794786aa8e4acba1f0f5b45f37b11699 Author: Oliver Upton Date: Tue Apr 4 15:40:48 2023 +0000 KVM: arm64: Let errors from SMCCC emulation to reach userspace Typically a negative return from an exit handler is used to request a return to userspace with the specified error. KVM's handling of SMCCC emulation (i.e. both HVCs and SMCs) deviates from the trend and resumes the guest instead. Stop handling negative returns this way and instead let the error percolate to userspace. Suggested-by: Suzuki K Poulose Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230404154050.2270077-12-oliver.upton@linux.dev commit 7e484d2785e2a2e526a6b2679d3e4c1402ffe0ec Author: Oliver Upton Date: Tue Apr 4 15:40:47 2023 +0000 KVM: arm64: Return NOT_SUPPORTED to guest for unknown PSCI version A subsequent change to KVM will allow negative returns from SMCCC handlers to exit to userspace. Make way for this change by explicitly returning SMCCC_RET_NOT_SUPPORTED to the guest if the VM is configured to use an unknown PSCI version. Add a WARN since this is undoubtedly a KVM bug. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230404154050.2270077-11-oliver.upton@linux.dev commit 821d935c87bc95253f82deec3cbb457ccf3de003 Author: Oliver Upton Date: Tue Apr 4 15:40:46 2023 +0000 KVM: arm64: Introduce support for userspace SMCCC filtering As the SMCCC (and related specifications) march towards an 'everything and the kitchen sink' interface for interacting with a system it becomes less likely that KVM will support every related feature. We could do better by letting userspace have a crack at it instead. Allow userspace to define an 'SMCCC filter' that applies to both HVCs and SMCs initiated by the guest. Supporting both conduits with this interface is important for a couple of reasons. Guest SMC usage is table stakes for a nested guest, as HVCs are always taken to the virtual EL2. Additionally, guests may want to interact with a service on the secure side which can now be proxied by userspace. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230404154050.2270077-10-oliver.upton@linux.dev commit d824dff1919bbd523d4d5c860437d043c0ad121d Author: Oliver Upton Date: Tue Apr 4 15:40:45 2023 +0000 KVM: arm64: Add support for KVM_EXIT_HYPERCALL In anticipation of user hypercall filters, add the necessary plumbing to get SMCCC calls out to userspace. Even though the exit structure has space for KVM to pass register arguments, let's just avoid it altogether and let userspace poke at the registers via KVM_GET_ONE_REG. This deliberately stretches the definition of a 'hypercall' to cover SMCs from EL1 in addition to the HVCs we know and love. KVM doesn't support EL1 calls into secure services, but now we can paint that as a userspace problem and be done with it. Finally, we need a flag to let userspace know what conduit instruction was used (i.e. SMC vs. HVC). Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230404154050.2270077-9-oliver.upton@linux.dev commit fb88707dd39bd1d5ec4a058776de9ee99bcc7b72 Author: Oliver Upton Date: Tue Apr 4 15:40:44 2023 +0000 KVM: arm64: Use a maple tree to represent the SMCCC filter Maple tree is an efficient B-tree implementation that is intended for storing non-overlapping intervals. Such a data structure is a good fit for the SMCCC filter as it is desirable to sparsely allocate the 32 bit function ID space. To that end, add a maple tree to kvm_arch and correctly init/teardown along with the VM. Wire in a test against the hypercall filter for HVCs which does nothing until the controls are exposed to userspace. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230404154050.2270077-8-oliver.upton@linux.dev commit a8308b3fc9494953c453480fb277e24f82f7d2b9 Author: Oliver Upton Date: Tue Apr 4 15:40:43 2023 +0000 KVM: arm64: Refactor hvc filtering to support different actions KVM presently allows userspace to filter guest hypercalls with bitmaps expressed via pseudo-firmware registers. These bitmaps have a narrow scope and, of course, can only allow/deny a particular call. A subsequent change to KVM will introduce a generalized UAPI for filtering hypercalls, allowing functions to be forwarded to userspace. Refactor the existing hypercall filtering logic to make room for more than two actions. While at it, generalize the function names around SMCCC as it is the basis for the upcoming UAPI. No functional change intended. Reviewed-by: Suzuki K Poulose Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230404154050.2270077-7-oliver.upton@linux.dev commit c2d2e9b3d8ce9db825a5630d9d52d542f5138ae0 Author: Oliver Upton Date: Tue Apr 4 15:40:42 2023 +0000 KVM: arm64: Start handling SMCs from EL1 Whelp, the architecture gods have spoken and confirmed that the function ID space is common between SMCs and HVCs. Not only that, the expectation is that hypervisors handle calls to both SMC and HVC conduits. KVM recently picked up support for SMCCCs in commit bd36b1a9eb5a ("KVM: arm64: nv: Handle SMCs taken from virtual EL2") but scoped it only to a nested hypervisor. Let's just open the floodgates and let EL1 access our SMCCC implementation with the SMC instruction as well. Reviewed-by: Suzuki K Poulose Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230404154050.2270077-6-oliver.upton@linux.dev commit aac94968126beb9846c12a940f1302ece7849b4f Author: Oliver Upton Date: Tue Apr 4 15:40:41 2023 +0000 KVM: arm64: Rename SMC/HVC call handler to reflect reality KVM handles SMCCC calls from virtual EL2 that use the SMC instruction since commit bd36b1a9eb5a ("KVM: arm64: nv: Handle SMCs taken from virtual EL2"). Thus, the function name of the handler no longer reflects reality. Normalize the name on SMCCC, since that's the only hypercall interface KVM supports in the first place. No fuctional change intended. Reviewed-by: Suzuki K Poulose Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230404154050.2270077-5-oliver.upton@linux.dev commit e0fc6b21616dd917899ee4a2d4126b4a963c0871 Author: Oliver Upton Date: Tue Apr 4 15:40:40 2023 +0000 KVM: arm64: Add vm fd device attribute accessors A subsequent change will allow userspace to convey a filter for hypercalls through a vm device attribute. Add the requisite boilerplate for vm attribute accessors. Reviewed-by: Suzuki K Poulose Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230404154050.2270077-4-oliver.upton@linux.dev commit de40bb8abb764f6866d82c4e2a43acdb22892cf4 Author: Oliver Upton Date: Tue Apr 4 15:40:39 2023 +0000 KVM: arm64: Add a helper to check if a VM has ran once The test_bit(...) pattern is quite a lot of keystrokes. Replace existing callsites with a helper. No functional change intended. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230404154050.2270077-3-oliver.upton@linux.dev commit e65733b5c59a1ea20324a03494364958bef3fc68 Author: Oliver Upton Date: Tue Apr 4 15:40:38 2023 +0000 KVM: x86: Redefine 'longmode' as a flag for KVM_EXIT_HYPERCALL The 'longmode' field is a bit annoying as it blows an entire __u32 to represent a boolean value. Since other architectures are looking to add support for KVM_EXIT_HYPERCALL, now is probably a good time to clean it up. Redefine the field (and the remaining padding) as a set of flags. Preserve the existing ABI by using bit 0 to indicate if the guest was in long mode and requiring that the remaining 31 bits must be zero. Cc: Paolo Bonzini Acked-by: Sean Christopherson Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230404154050.2270077-2-oliver.upton@linux.dev commit ca161b259cc84fe1f4a2ce4c73c3832cf6f713f1 Author: Marek Vasut Date: Mon Apr 3 21:02:42 2023 +0200 drm/bridge: ti-sn65dsi83: Do not generate HFP/HBP/HSA and EOT packet Do not generate the HS front and back porch gaps, the HSA gap and EOT packet, as per "SN65DSI83 datasheet SLLSEC1I - SEPTEMBER 2012 - REVISED OCTOBER 2020", page 22, these packets are not required. This makes the TI SN65DSI83 bridge work with Samsung DSIM on i.MX8MN. Signed-off-by: Marek Vasut Reviewed-by: Laurent Pinchart Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20230403190242.224490-1-marex@denx.de commit fac79bad889bb167a37492181646992c8c48903b Author: Mark Brown Date: Tue Apr 4 20:42:28 2023 +0100 regmap: Use mas_walk() instead of mas_find() Liam recommends using mas_walk() instead of mas_find() for our use case so let's do that, it avoids some minor overhead associated with being able to restart the operation which we don't need since we do a simple search. Suggested-by: Liam R. Howlett Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230403-regmap-maple-walk-fine-v2-1-c07371c8a867@kernel.org Signed-off-by: Mark Brown commit 009e83b591ddcd945f0d48209debfb8dca967166 Author: Saalim Quadri Date: Tue Mar 28 14:48:31 2023 +0530 ASoC: dt-bindings: ak4458: Convert to dtschema Convert the AK4458 audio DAC bindings to DT schema. Signed-off-by: Saalim Quadri Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230328091831.55690-1-danascape@gmail.com Signed-off-by: Mark Brown commit aa7b93eb94ad6d883016bffda670e028fe168051 Author: Chris Wilson Date: Fri Mar 31 16:16:36 2023 +0200 drm/i915/gt: Hold a wakeref for the active VM There may be a disconnect between the GT used by the engine and the GT used for the VM, requiring us to hold a wakeref on both while the GPU is active with this request. v2: added explanation to __queue_and_release_pm Signed-off-by: Chris Wilson [ahajda: removed not-yet-upstremed wakeref tracking bits] Signed-off-by: Andrzej Hajda Reviewed-by: Tvrtko Ursulin Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230330-hold_wakeref_for_active_vm-v2-1-724d201499c2@intel.com commit 8364f6d000ede4185a82b1f2514543ed172d4b51 Author: Huacai Chen Date: Wed Mar 1 16:55:45 2023 +0800 efi/loongarch: Reintroduce efi_relocate_kernel() to relocate kernel Since Linux-6.3, LoongArch supports PIE kernel now, so let's reintroduce efi_relocate_kernel() to relocate the core kernel. Signed-off-by: Huacai Chen Signed-off-by: Ard Biesheuvel commit ec49843332dfffe85408b0a33acc818ff6c068b8 Merge: 9d2e77ff2bd3b 4b6d621c9d859 Author: Ulf Hansson Date: Wed Apr 5 11:45:35 2023 +0200 mmc: Merge branch fixes into next Merge the mmc fixes for v6.3-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.4. Signed-off-by: Ulf Hansson commit 899ff790d1a94dda9bd09a4a6bde01fb7ff0bec8 Author: Jani Nikula Date: Tue Apr 4 12:05:28 2023 +0300 drm/i915: run kernel-doc on headers as part of HDRTEST Enabling kernel-doc warnings in commit aaee4bbe8a1a ("drm/i915: enable kernel-doc warnings for CONFIG_DRM_I915_WERROR=y") actually only covers the .c files. And it's good for avoiding warnings in W= builds. However, we need something more to check for kernel-doc issues in headers. Add it as part of the existing HDRTEST. We have tons of issues, and this unleashes warnings galore on CONFIG_DRM_I915_WERROR=y. It doesn't fail the build because (at least for now) we don't pass -Werror to kernel-doc. Cc: Rodrigo Vivi Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Acked-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20230404090528.173075-1-jani.nikula@intel.com commit e09220f42b5c28dae51a3cf2810afcb4fad9909d Author: Luca Ceresoli Date: Wed Apr 5 10:10:57 2023 +0200 drm: bridge: ldb: add support for using channel 1 only The LDB driver currently checks whether dual mode is used, otherwise it assumes only channel 0 is in use. Add support for using only channel 1. In device tree terms, this means linking port 2 only. Doing this cleanly requires changing the logic of the probe functions from this: 1. use of_graph_get_remote_node() on port 1 to find the panel 2. use drm_of_lvds_get_dual_link_pixel_order() to detect dual mode to this: 1. use of_graph_get_remote_node() twice to find remote ports 2. reuse the result of the above to know whether each channel is enabled and to find the panel 3. if (both channels as enabled) use drm_of_lvds_get_dual_link_pixel_order() to detect dual mode Also add a dev_dbg() to log the detected mode and log an error in case no panel was found (no channel enabled). Signed-off-by: Luca Ceresoli Reviewed-by: Marek Vasut Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20230405081058.2347130-2-luca.ceresoli@bootlin.com commit 8cc0b604f2345c304b7ddc828b880f4f3f21816a Author: Luca Ceresoli Date: Wed Apr 5 10:10:56 2023 +0200 drm: bridge: ldb: add missing \n in dev_warn() string dev_warn() and similar require a training \n. Signed-off-by: Luca Ceresoli Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20230405081058.2347130-1-luca.ceresoli@bootlin.com commit ce7498acaa88ac3db5385dad2317c03006c49837 Author: Alexander Stein Date: Wed Apr 5 09:52:23 2023 +0200 drm/bridge: ti-sn65dsi83: use dev_err_probe if host attach failed There might be cases where the host attach is deferred, use dev_err_probe to add more detailed information to /sys/kernel/debug/devices_deferred. Signed-off-by: Alexander Stein Reviewed-by: Laurent Pinchart Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20230405075223.579461-1-alexander.stein@ew.tq-group.com commit 9f68ff79ec2cb303f360a35eef5dd8f1f0f817e1 Author: Cristian Marussi Date: Tue Apr 4 12:50:26 2023 +0100 firmware: arm_scmi: Add support for unidirectional mailbox channels Extend the SCMI transport layer to support mailbox controllers that expose communication channels that are unidirectional by nature. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20230404115026.2828149-3-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 92ac94f7e176bb9f5a9735bc1be6d69e96d4d5c1 Author: Cristian Marussi Date: Tue Apr 4 12:50:25 2023 +0100 dt-bindings: firmware: arm,scmi: Support mailboxes unidirectional channels SCMI defines two kinds of communication channels between the agent and the platform: one bidirectional 'a2p' channel used by the agent to send SCMI commands and synchronously receive the related replies, and an optional 'p2a' unidirectional channel used to asynchronously receive delayed responses and notifications emitted from the platform. When configuring an SCMI transport based on mailboxes, the current binding supports only mailboxes providing bidirectional channels: in such a case one mailbox channel can be easily assigned to each SCMI channel as above described. In case, instead, to have to deal with mailboxes providing only distinct unidirectional channels, it becomes necessary to extend the binding in order to be able to bind 2 distinct unidirectional mailbox channels to the same SCMI 'a2p' channel. Bidirectional and unidirectional channels support for the SCMI mailbox transport can coexist by carefully considering the effective combination of defined 'mboxes' and 'shmem' descriptors. Signed-off-by: Cristian Marussi Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230404115026.2828149-2-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit b7590f3841f47d5c6732db9a6d6474162109f487 Author: Konrad Dybcio Date: Wed Mar 15 15:11:19 2023 +0100 dt-bindings: interconnect: qcom,msm8998-bwmon: Resolve MSM8998 support BWMONv4 has two sets of registers: one for handling the monitor itself and one called "global" which hosts some sort of a headswitch and an interrupt control register. We did not handle that one before, as on SoCs starting with SDM845 they have been merged into a single contiguous range. To make the qcom,msm8998-bwmon less confusing and in preparation for actual MSM8998 support, describe the global register space and introduce new "qcom,sdm845-cpu-bwmon" compatible while keeping the "qcom,sdm845-bwmon" as a fallback for SoCs with this merged register space scheme. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230304-topic-ddr_bwmon-v3-1-77a050c2fbda@linaro.org Signed-off-by: Georgi Djakov commit e0c35141f9ca5869a51d7c135688350c06ebdded Author: Konrad Dybcio Date: Thu Mar 16 15:12:51 2023 +0100 dt-bindings: interconnect: OSM L3: Add SM6375 CPUCP compatible SM6375 includes a CPUCP block responsible for managing different APSS- related tasks, such as scaling the voltage and frequency of the components within the ARM DSU cluster. Add a compatible for the L3 cache DVFS scaler within. Acked-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230303-topic-sm6375_features0_dts-v2-2-708b8191f7eb@linaro.org Signed-off-by: Georgi Djakov commit 82a4b285abcaa3631446e7e4103ef61d0787362d Author: Konrad Dybcio Date: Wed Mar 8 22:40:09 2023 +0100 interconnect: qcom: Sort kerneldoc entries Sort the kerneldoc entries the same way the struct members are sorted. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230228-topic-qos-v7-3-815606092fff@linaro.org Signed-off-by: Georgi Djakov commit 02819953b33a4410e6aa4595a043c052408c90d3 Author: Konrad Dybcio Date: Wed Mar 8 22:40:08 2023 +0100 interconnect: qcom: rpm: Add support for specifying channel num Some nodes, like EBI0 (DDR) or L3/LLCC, may be connected over more than one channel. This should be taken into account in bandwidth calcualtion, as we're supposed to feed msmbus with the per-channel bandwidth. Add support for specifying that and use it during bandwidth aggregation. Reviewed-by: Bryan O'Donoghue Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230228-topic-qos-v7-2-815606092fff@linaro.org Signed-off-by: Georgi Djakov commit 1d779317eb6529d89bfe6d7900a2cf9e03149aeb Author: Konrad Dybcio Date: Wed Mar 8 22:40:07 2023 +0100 interconnect: qcom: rpm: make QoS INVALID default Currently NOC_QOS_MODE_FIXED is defined as 0x0 which makes it the default option (partial struct initialization). The default option however should be NOC_QOS_MODE_INVALID. That results in bogus QoS configurations being sent for port 0 (which is used for the DRAM endpoint on BIMC, for example) coming from all nodes with .qos.ap_owned = true and uninitialized .qos.qos_mode. It's also an issue for newer SoCs where all nodes are treated as if they were ap_owned, but not all of them have QoS configuration. The NOC_QOS_MODEs are defined as preprocessor constants and are not used anywhere outside qcom_icc_set_noc_qos(), which is easily worked around. Separate the desc->type values from the values sent to msmbus in the aforementioned function. Make the former an enum for better mainainability. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230228-topic-qos-v7-1-815606092fff@linaro.org Signed-off-by: Georgi Djakov commit 72b2720c18ecde92e6a36c4ac897dd5848e3f379 Author: Johan Hovold Date: Mon Mar 13 09:49:53 2023 +0100 interconnect: qcom: rpm: drop bogus pm domain attach Any power domain would already have been attached by the platform bus code so drop the bogus power domain attach which always succeeds from probe. This effectively reverts commit 7de109c0abe9 ("interconnect: icc-rpm: Add support for bus power domain"). Fixes: 7de109c0abe9 ("interconnect: icc-rpm: Add support for bus power domain") Cc: Yassine Oudjana Signed-off-by: Johan Hovold Tested-by: Konrad Dybcio # MSM8996 Sony Kagura Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230313084953.24088-3-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit b2d110cd5d28ded813f060b735cd68bfe2e5010f Author: Johan Hovold Date: Mon Mar 6 08:56:51 2023 +0100 interconnect: drop unused icc_link_destroy() interface Now that the link array is deallocated when destroying nodes and the explicit link removal has been dropped from the exynos driver there are no further users of and no need for the icc_link_destroy() interface. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230306075651.2449-24-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit 045c340c86f8a9d7cb675e179dc6297caa6ebc01 Author: Aleksander Jan Bajkowski Date: Wed Mar 29 23:03:28 2023 +0200 MIPS: lantiq: remove unused function declaration The removed function declaration is a leftover of the old gphy firmware loader, that has been removed in d5103604f78e1afc29e586785af540c82b573f3a. Signed-off-by: Aleksander Jan Bajkowski Signed-off-by: Thomas Bogendoerfer commit 275aca650e76e203e3efc71835d7195e18d2e718 Author: Nathan Chancellor Date: Tue Apr 4 14:18:41 2023 -0700 MIPS: Drop unused positional parameter in local_irq_{dis,en}able When building with clang's integrated assembler, it points out that the CONFIG_CPU_HAS_DIEI versions of local_irq_enable and local_irq_disable have a named parameter that is not used in the body of the macro and it thinks that $8 is a positional parameter, rather than a register: arch/mips/include/asm/asmmacro.h:48:2: warning: macro defined with named parameters which are not used in macro body, possible positional parameter found in body which will have no effect .macro local_irq_enable reg=$8 ^ The comment above the function that performs this check in LLVM notes that the warning may trigger in this case, even though it is not problematic. It is easy enough to clean this up by just omitting the named parameter for this version of the macro, as it is entirely unused. Reported-by: Nick Desaulniers Link: https://github.com/ClangBuiltLinux/linux/issues/1415 Link: https://github.com/llvm/llvm-project/commit/81c944cadb7f9e55b3517b7423a820e2577b9279 Signed-off-by: Nathan Chancellor Signed-off-by: Thomas Bogendoerfer commit c86df6c0d4fee0028bb208705bcceae548164fde Author: Thomas Bogendoerfer Date: Mon Apr 3 11:41:12 2023 +0200 MIPS: mm: Remove local_cache_flush_page After ide.h is gone, there are no users of local_cache_flush_page() left. Signed-off-by: Thomas Bogendoerfer commit 461ba3e7e663a5c87e7b388b073904149b199593 Author: Thomas Bogendoerfer Date: Mon Apr 3 11:41:11 2023 +0200 MIPS: Remove no longer used ide.h There are only three drivers left using ide.h, which are all m68k only. Signed-off-by: Thomas Bogendoerfer commit db9947cea855eb0b0cbf9724a3aa69f7b39b3d73 Author: Thomas Bogendoerfer Date: Mon Apr 3 11:41:10 2023 +0200 MIPS: mm: Remove unused *cache_page_indexed flush functions The *cache_page_indexed flush functions are no (longer) used. Signed-off-by: Thomas Bogendoerfer commit 764b1c8df40daf618b293b367f9be1f4fcd1b6fb Author: Stanislav Lisovskiy Date: Fri Mar 24 15:51:25 2023 +0200 drm/i915: Implement UHBR bandwidth check According to spec, we should check if output_bpp * pixel_rate is less than DDI clock * 72, if UHBR is used. v2: - s/pipe_config/crtc_state/ (Jani Nikula) - Merged previous patch into that one, to remove empty function(Jani Nikula) v3: - Make that constraint check to be DSC-related only - Limit this to only DISPLAY_VER <= 13 v4: - Move constraint check to the top(Vinod Govindapillai) HSDES: 1406899791 BSPEC: 49259 Signed-off-by: Stanislav Lisovskiy Reviewed-by: Vinod Govindapillai Link: https://patchwork.freedesktop.org/patch/msgid/20230324135125.6720-1-stanislav.lisovskiy@intel.com commit d82caa273565b45fcf103148950549af76c314b0 Author: Domenico Cerasuolo Date: Thu Mar 30 12:54:18 2023 +0200 sched/psi: Allow unprivileged polling of N*2s period PSI offers 2 mechanisms to get information about a specific resource pressure. One is reading from /proc/pressure/, which gives average pressures aggregated every 2s. The other is creating a pollable fd for a specific resource and cgroup. The trigger creation requires CAP_SYS_RESOURCE, and gives the possibility to pick specific time window and threshold, spawing an RT thread to aggregate the data. Systemd would like to provide containers the option to monitor pressure on their own cgroup and sub-cgroups. For example, if systemd launches a container that itself then launches services, the container should have the ability to poll() for pressure in individual services. But neither the container nor the services are privileged. This patch implements a mechanism to allow unprivileged users to create pressure triggers. The difference with privileged triggers creation is that unprivileged ones must have a time window that's a multiple of 2s. This is so that we can avoid unrestricted spawning of rt threads, and use instead the same aggregation mechanism done for the averages, which runs independently of any triggers. Suggested-by: Johannes Weiner Signed-off-by: Domenico Cerasuolo Signed-off-by: Peter Zijlstra (Intel) Acked-by: Johannes Weiner Link: https://lore.kernel.org/r/20230330105418.77061-5-cerasuolodomenico@gmail.com commit 4468fcae49f08e88fbbffe05b29496192df89991 Author: Domenico Cerasuolo Date: Thu Mar 30 12:54:17 2023 +0200 sched/psi: Extract update_triggers side effect This change moves update_total flag out of update_triggers function, currently called only in psi_poll_work. In the next patch, update_triggers will be called also in psi_avgs_work, but the total update information is specific to psi_poll_work. Returning update_total value to the caller let us avoid differentiating the implementation of update_triggers for different aggregators. Suggested-by: Johannes Weiner Signed-off-by: Domenico Cerasuolo Signed-off-by: Peter Zijlstra (Intel) Acked-by: Johannes Weiner Link: https://lore.kernel.org/r/20230330105418.77061-4-cerasuolodomenico@gmail.com commit 65457b74aa9437418e552e8d52d7112d4f9901a6 Author: Domenico Cerasuolo Date: Thu Mar 30 12:54:16 2023 +0200 sched/psi: Rename existing poll members in preparation Renaming in PSI implementation to make a clear distinction between privileged and unprivileged triggers code to be implemented in the next patch. Suggested-by: Johannes Weiner Signed-off-by: Domenico Cerasuolo Signed-off-by: Peter Zijlstra (Intel) Acked-by: Johannes Weiner Link: https://lore.kernel.org/r/20230330105418.77061-3-cerasuolodomenico@gmail.com commit 7fab21fa0d000a0ea32d73ce8eec68557c6c268b Author: Domenico Cerasuolo Date: Thu Mar 30 12:54:15 2023 +0200 sched/psi: Rearrange polling code in preparation Move a few functions up in the file to avoid forward declaration needed in the patch implementing unprivileged PSI triggers. Suggested-by: Johannes Weiner Signed-off-by: Domenico Cerasuolo Signed-off-by: Peter Zijlstra (Intel) Acked-by: Johannes Weiner Link: https://lore.kernel.org/r/20230330105418.77061-2-cerasuolodomenico@gmail.com commit 39afe5d6fc59237ff7738bf3ede5a8856822d59d Author: Libo Chen Date: Wed Aug 10 15:33:13 2022 -0700 sched/fair: Fix inaccurate tally of ttwu_move_affine There are scenarios where non-affine wakeups are incorrectly counted as affine wakeups by schedstats. When wake_affine_idle() returns prev_cpu which doesn't equal to nr_cpumask_bits, it will slip through the check: target == nr_cpumask_bits in wake_affine() and be counted as if target == this_cpu in schedstats. Replace target == nr_cpumask_bits with target != this_cpu to make sure affine wakeups are accurately tallied. Fixes: 806486c377e33 (sched/fair: Do not migrate if the prev_cpu is idle) Suggested-by: Daniel Jordan Signed-off-by: Libo Chen Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Gautham R. Shenoy Link: https://lore.kernel.org/r/20220810223313.386614-1-libo.chen@oracle.com commit e154a338e16cc3b3bbd54c891253319d22383746 Author: Krzysztof Kozlowski Date: Tue Feb 7 20:28:49 2023 +0100 dt-bindings: soc: samsung: exynos-pmu: allow phys as child on Exynos3 and Exynos4 Just like on Exynos5250, Exynos5420 and Exynos5433 the MIPI phy is actually part of the Power Management Unit system controller thus allow it as PMU's child. Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230207192851.549242-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit de34007751aaba992373f2d659001a846aeb8811 Author: Jiaxun Yang Date: Tue Apr 4 10:33:51 2023 +0100 MIPS: generic: Enable all CPUs supported by virt board in Kconfig Enable extra CPUs that may be supported by virt board, including R4x00 (R4000 in QEMU), Cavium Octeon (Octeon68XX in QEMU), loongson2e, loongson2f. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 03be534e1bac6d92cbcebdddfc4242e1e3588350 Author: Jiaxun Yang Date: Tue Apr 4 10:33:50 2023 +0100 MIPS: Add board config for virt board Aligned with QEMU MIPS virt board. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 78073b8f1ffe4085309808815746403209bfd6bc Author: Jiaxun Yang Date: Tue Apr 4 10:33:49 2023 +0100 MIPS: Octeon: Disable CVMSEG by default on other platforms QEMU can't emulate CVMSEG on generic platform for now. Just disable it by default. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 0c6ff92773a9c004c44af47b0609f67dcc97ba82 Author: Jiaxun Yang Date: Tue Apr 4 10:33:48 2023 +0100 MIPS: Loongson: Don't select platform features with CPU ARCH_HAS_PHYS_TO_DMA and GPIOLIB are all platform level features they shouldn't be selected with CPU. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 194a835210521282ad31e8f7047556318611f596 Author: Jiaxun Yang Date: Tue Apr 4 10:33:47 2023 +0100 MIPS: Loongson: Move arch cflags to MIPS top level Makefile Arch cflags should be independent to Platform. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit b6007ff809682350515936539eb91a2e8a5f799c Author: Jiaxun Yang Date: Tue Apr 4 10:33:46 2023 +0100 MIPS: Octeon: Allow CVMSEG to be disabled Don't include cvmseg states into thread_status when CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE is not defined or 0. Fix compile for kernel without this feature. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 6e90049162b92e683641966e4cdc67febe3c8fc5 Author: Jiaxun Yang Date: Tue Apr 4 10:33:45 2023 +0100 MIPS: c-octeon: Provide alternative SMP cache flush function Currently c-octeon relies on octeon's own smp function to flush I-Cache. However this function is not available on generic platform. Just use smp_call_function_many on generic platform. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit f641519409a73403ee6612b8648b95a688ab85c2 Author: Jiaxun Yang Date: Tue Apr 4 10:33:44 2023 +0100 MIPS: cpu-features: Enable octeon_cache by cpu_type cpu_has_octeon_cache was tied to 0 for generic cpu-features, whith this generic kernel built for octeon CPU won't boot. Just enable this flag by cpu_type. It won't hurt orther platforms because compiler will eliminate the code path on other processors. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 918d779569dafd81fce4257c552aa4205c918c4a Author: Jiaxun Yang Date: Tue Apr 4 10:33:43 2023 +0100 MIPS: Octeon: Opt-out 4k_cache feature Octeon has a different cache interface with traditional R4K one, just opt-out this flag for octeon to avoid run R4K cache initialization code accidentally. Also remove ISA level assumption for 4k cache. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit e1aa1dfef69320141f5d00eddbf279b41e70d4e7 Author: Jiaxun Yang Date: Tue Apr 4 10:33:42 2023 +0100 MIPS: mips-cm: Check availability of config registers Prevent reading unsupported config register during probing process. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit aa45787c0db0a5f7b21bd16b917ff44761a2c6ac Author: Jiaxun Yang Date: Tue Apr 4 10:33:41 2023 +0100 MIPS: smp-cps: Disable coherence setup for unsupported ISA We don't know how to do coherence setup on ISA before MIPS Release 1. As CPS support only servers simulation purpose on those cores, and simulators are always coherent, just disable initialization code and provide user a warning in case coherence is not setup properly. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 393a759647061bc29c1d62f83c7d36cacc912a89 Author: Jiaxun Yang Date: Tue Apr 4 10:33:40 2023 +0100 MIPS: Move declaration of bcache ops to cache.c bcache is not tied to CPU's cache interface. Just move those declaration to cache.c so it can be avaialble to CPU with all cache types. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit cb949ce504e829193234e26cb3042bb448465d52 Author: Karol Wachowski Date: Mon Apr 3 14:15:45 2023 +0200 accel/ivpu: Remove D3hot delay for Meteorlake VPU on MTL has hardware optimizations and does not require 10ms D0 - D3hot transition delay imposed by PCI specification (PCIe r6.0, sec 5.9.) . The delay removal is traditionally done by adding PCI ID to quirk_remove_d3hot_delay() in drivers/pci/quirks.c . But since we do not need that optimization before driver probe and we can better specify in the ivpu driver on what (future) hardware use the optimization, we do not use quirk_remove_d3hot_delay() for that. Signed-off-by: Karol Wachowski Signed-off-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20230403121545.2995279-1-stanislaw.gruszka@linux.intel.com commit 105560b4fca4df0d42dba6656105b5e4131d8ad3 Author: Steev Klimaszewski Date: Sun Mar 26 18:38:12 2023 -0500 arm64: dts: qcom: sc8280xp-x13s: Add bluetooth The Lenovo Thinkpad X13s has a WCN6855 Bluetooth controller on uart2, add this. Signed-off-by: Steev Klimaszewski Reviewed-by: Johan Hovold Tested-by: Johan Hovold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230326233812.28058-5-steev@kali.org commit 9db28f297526f17c6575ec0eefc93a8b1642cff7 Author: Bjorn Andersson Date: Sun Mar 26 18:38:11 2023 -0500 arm64: dts: qcom: sc8280xp: Define uart2 Add the definition for uart2 for sc8280xp devices. Signed-off-by: Bjorn Andersson Signed-off-by: Steev Klimaszewski Reviewed-by: Brian Masney Reviewed-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230326233812.28058-4-steev@kali.org commit de7d3d2f9ddef9a3305decccdd3b95b09fd2bd46 Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:16 2023 +0530 arm64: dts: qcom: sc8280xp: Add "mhi" region to the PCIe nodes The "mhi" region contains the debug registers that could be used to monitor the PCIe link transitions. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230316081117.14288-19-manivannan.sadhasivam@linaro.org commit 89210342406b91954c514d171baeabb91f85f0a5 Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:15 2023 +0530 arm64: dts: qcom: sm8250: Add "mhi" region to the PCIe nodes The "mhi" region contains the debug registers that could be used to monitor the PCIe link transitions. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230316081117.14288-18-manivannan.sadhasivam@linaro.org commit b8e0ed06d1a569694c8976c3563bbd0aae728e1d Author: Manivannan Sadhasivam Date: Thu Mar 16 13:41:14 2023 +0530 arm64: dts: qcom: sdm845: Add "mhi" region to the PCIe nodes The "mhi" region contains the debug registers that could be used to monitor the PCIe link transitions. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230316081117.14288-17-manivannan.sadhasivam@linaro.org commit 81767c1591dcb711f1f78a80e510b667b1fb5718 Author: Bartosz Golaszewski Date: Mon Mar 27 14:53:13 2023 +0200 arm64: dts: qcom: sa8775p-ride: set gpio-line-names for PMIC GPIOs Set line names for GPIO lines exposed by PMICs on sa8775p-ride. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327125316.210812-16-brgl@bgdev.pl commit e5a893a7cec5776e10c25d7fa80b5ad1edf88c17 Author: Bartosz Golaszewski Date: Mon Mar 27 14:53:12 2023 +0200 arm64: dts: qcom: sa8775p: add PMIC GPIO controller nodes Add GPIO controller nodes to PMICs that have the GPIO hooked up on sa8775p-ride. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327125316.210812-15-brgl@bgdev.pl commit fa40ca07e943333a14d247988ef5008a59949153 Author: Bartosz Golaszewski Date: Mon Mar 27 14:53:09 2023 +0200 arm64: dts: qcom: sa8775p: pmic: add thermal zones Add the thermal zones and associated alarm nodes for the PMICs that have them hooked up on sa8775p-ride. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327125316.210812-12-brgl@bgdev.pl commit cecff1f5429d975df9649376e2bd5a2fb004f988 Author: Bartosz Golaszewski Date: Mon Mar 27 14:53:08 2023 +0200 arm64: dts: qcom: sa8775p: pmic: add support for the pmm8654 RESIN input Add the RESIN input for sa8775p platforms' PMIC. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327125316.210812-11-brgl@bgdev.pl commit b3a755ba16e6f61d93c811b827edacc9946b0500 Author: Bartosz Golaszewski Date: Mon Mar 27 14:53:07 2023 +0200 arm64: dts: qcom: sa8775p: pmic: add the power key Add the power key node under the PON node for PMIC #0 on sa8775p. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327125316.210812-10-brgl@bgdev.pl commit d2d9a592746cd454bd5b8f72193f2d3db2e62a44 Author: Bartosz Golaszewski Date: Mon Mar 27 14:53:06 2023 +0200 arm64: dts: qcom: sa8775p: add the Power On device node Add the PON node to PMIC #0 for sa8775p platforms. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327125316.210812-9-brgl@bgdev.pl commit 634a3de323fc5c67c144919e298259d8d9d44a4b Author: Bartosz Golaszewski Date: Mon Mar 27 14:53:05 2023 +0200 arm64: dts: qcom: sa8775p: add support for the on-board PMICs Add a new .dtsi file for sa8775p PMICs and add the four PMICs interfaced to the SoC via SPMI. Enable the PMICs for sa8775p-ride. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327125316.210812-8-brgl@bgdev.pl commit fdd55b3babedce5abd1c1f90afc3ab2199a772ad Author: Bartosz Golaszewski Date: Mon Mar 27 14:53:03 2023 +0200 arm64: dts: qcom: sa8775p: add the spmi node Add the SPMI PMIC Arbiter node for SA8775p platforms. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327125316.210812-6-brgl@bgdev.pl commit 8696cd072e955bd6f5df757774e47f0b9dd29920 Author: Bartosz Golaszewski Date: Mon Mar 27 14:53:02 2023 +0200 arm64: dts: qcom: sa8775p: add the pdc node Add the Power Domain Controller node for SA8775p. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327125316.210812-5-brgl@bgdev.pl commit f95f988cf7b609157630dd1f2f7e8d297aadbe2b Author: Bartosz Golaszewski Date: Mon Mar 27 14:53:00 2023 +0200 arm64: dts: qcom: sa8775p: sort soc nodes by reg property Sort all children of the soc node by the first address in their reg property. This was mostly already the case but there were some nodes that didn't follow it so fix it now for consistency. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327125316.210812-3-brgl@bgdev.pl commit 3fd7e2eec8f4fedbe3b252cf436be8527f7a5f82 Author: Bartosz Golaszewski Date: Mon Mar 27 14:52:59 2023 +0200 arm64: dts: qcom: sa8775p: pad reg properties to 8 digits The file has inconsistent padding of the address part of soc node children's reg properties. Fix it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327125316.210812-2-brgl@bgdev.pl commit 894e258b6a38922f9860a20ca07cf2f745e3b090 Author: Krzysztof Kozlowski Date: Mon Apr 3 15:23:28 2023 +0200 arm64: dts: qcom: sc8280xp: correct Soundwire wakeup interrupt name The bindings expect second Soundwire interrupt to be "wakeup" (Linux driver takes by index): sc8280xp-crd.dtb: soundwire-controller@3330000: interrupt-names:1: 'wakeup' was expected Fixes: c18773d162a6 ("arm64: dts: qcom: sc8280xp: add SoundWire and LPASS") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230403132328.61414-1-krzysztof.kozlowski@linaro.org commit da51e2ceedc2df7248bad6bec45ae3280de9ada2 Author: Konrad Dybcio Date: Wed Mar 29 21:41:23 2023 +0200 arm64: dts: qcom: sdm845-tama: Enable GPI_DMA0/1 Enable both GPI DMAs. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-tama_disp-v3-6-2b1567c039d7@linaro.org commit ff9108ea69adc0b38e5bbc8575434355f0e20579 Author: Konrad Dybcio Date: Wed Mar 29 21:41:22 2023 +0200 arm64: dts: qcom: sdm845-tama: Enable GPU Enable the A630 GPU and its GMU. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-tama_disp-v3-5-2b1567c039d7@linaro.org commit 39e0f8076f6fc5022902c62f5046ad91cf2b7a59 Author: Konrad Dybcio Date: Wed Mar 29 21:41:21 2023 +0200 arm64: dts: qcom: sdm845-tama: Enable remoteprocs Enable ADSP, CDSP and Venus. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-tama_disp-v3-4-2b1567c039d7@linaro.org commit 1d99fee382a6ada0cd05ae8afaea2dd1884c58a3 Author: Konrad Dybcio Date: Wed Mar 29 21:41:20 2023 +0200 arm64: dts: qcom: sdm845-tama: Add regulator-system-load to l14a/l28a Add the properties to ensure the ever so delicate touchscreen setup matches downstream. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-tama_disp-v3-3-2b1567c039d7@linaro.org commit 3ab8216de2fab6a6efeb5b22d8d61676b67964dc Author: Konrad Dybcio Date: Wed Mar 29 21:41:19 2023 +0200 arm64: dts: qcom: sdm845-tama: Add Synaptics Touchscreen Add required pins and RMI4 node to the common DT and remove it from Akatsuki, as it uses a different touch. Since the panels are super high tech proprietary incell, they need to be handled with very precise timings. As such the panel driver sets up the power rails and GPIOs and the touchscreen driver *has to* probe afterwards. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-tama_disp-v3-2-2b1567c039d7@linaro.org commit 5dcc6587fde26fa03fe6993278d9bd01daed09b1 Author: Konrad Dybcio Date: Wed Mar 29 21:41:18 2023 +0200 arm64: dts: qcom: sdm845-tama: Add display nodes Add required nodes to support display on XZ2/XZ2c. XZ3 has a different power rail setup and needs to be handled separately. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-tama_disp-v3-1-2b1567c039d7@linaro.org commit c78ad8597ed961e822bf86ce7f1916dbfba255ef Author: Vinod Koul Date: Sat Mar 25 17:54:33 2023 +0530 dt-bindings: firmware: document Qualcomm SC8180X SCM Document the compatible for Qualcomm sc8180x SCM. Acked-by: Krzysztof Kozlowski Signed-off-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230325122444.249507-2-vkoul@kernel.org commit 26aae2310fd7375a5ca0dd772cd3bc57cf5e02bb Author: Adam Skladowski Date: Sat Mar 25 12:28:52 2023 +0100 arm64: dts: msm8953: Pad regs to 8 digits Follow other dtses and pad regs to 8 digits. Signed-off-by: Adam Skladowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230325112852.18841-4-a39.skl@gmail.com commit c0494df2cdac723f4c7df834c05d548ea3a804e9 Author: Adam Skladowski Date: Sat Mar 25 12:28:51 2023 +0100 arm64: dts: msm8953: Drop unsupported dwc3 flag Property phy_mode according to binding checker does not exist, drop it. Signed-off-by: Adam Skladowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230325112852.18841-3-a39.skl@gmail.com commit 635abd877516f6d5e35343d3c3eb233ab195ebc5 Author: Adam Skladowski Date: Sat Mar 25 12:28:50 2023 +0100 arm64: dts: msm8953: Provide dsi_phy clocks to gcc Provide clocks from dsi_phy to gcc, this will make sure we don't fallback to global name lookup. Signed-off-by: Adam Skladowski Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230325112852.18841-2-a39.skl@gmail.com commit 3042fb4b61c8a6ce692a4914b1970daa56e6f04e Author: Adam Skladowski Date: Sat Mar 25 12:28:49 2023 +0100 arm64: dts: msm8953: Replace xo_board with rpmcc sourced xo Assign RPM_SMD_XO_CLK_SRC from rpmcc in place of fixed-clock where possible. Signed-off-by: Adam Skladowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230325112852.18841-1-a39.skl@gmail.com commit 7b4c00e9cc36e24e60d9907e6c3161791b11695c Author: Neil Armstrong Date: Fri Mar 24 10:37:54 2023 +0100 arm64: defconfig: remove duplicate TYPEC_UCSI & QCOM_PMIC_GLINK Both configs were already applied by 2 separate changes, fix this to avoid: arch/arm64/configs/defconfig:989:warning: override: reassigning to symbol TYPEC_UCSI arch/arm64/configs/defconfig:1232:warning: override: reassigning to symbol QCOM_PMIC_GLINK Fixes: 4ffd0b001956 ("arm64: defconfig: add PMIC GLINK modules") Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230324-topic-sm8450-upstream-defconfig-fixup-v1-1-2d75cc9b3c3d@linaro.org commit 35fa9a7fc577a4d1ed541ff37d9dda83b0635e4b Author: Neil Armstrong Date: Fri Mar 24 10:28:47 2023 +0100 arm64: dts: qcom: sm8450: remove invalid properties in cluster-sleep nodes Fixes the following DT bindings check error: domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+' domain-idle-states: cluster-sleep-1: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+' Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323-topic-sm8450-upstream-dt-bindings-fixes-v2-2-0ca1bea1a843@linaro.org commit ea1811e2614cd66608961ae3c5a9ee6038fc424b Author: Krzysztof Kozlowski Date: Fri Mar 24 08:38:13 2023 +0100 arm64: dts: qcom: sc8280xp: drop incorrect domain idle states properties Domain idle states do not use 'idle-state-name': sc8280xp-crd.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name' does not match any of the regexes: 'pinctrl-[0-9]+' Reported-by: Neil Armstrong Link: https://lore.kernel.org/all/20230323-topic-sm8450-upstream-dt-bindings-fixes-v1-4-3ead1e418fe4@linaro.org/ Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230324073813.22158-6-krzysztof.kozlowski@linaro.org commit 7983224c6a6cea77aa0b9b4e23bb7651241df961 Author: Krzysztof Kozlowski Date: Fri Mar 24 08:38:12 2023 +0100 arm64: dts: qcom: sm8350: drop incorrect domain idle states properties Domain idle states do not use 'idle-state-name' and 'local-timer-stop': sm8350-mtp.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+' Reported-by: Neil Armstrong Link: https://lore.kernel.org/all/20230323-topic-sm8450-upstream-dt-bindings-fixes-v1-4-3ead1e418fe4@linaro.org/ Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230324073813.22158-5-krzysztof.kozlowski@linaro.org commit 770f85c19536fde3591f4f2f70ac32f33d86b975 Author: Krzysztof Kozlowski Date: Fri Mar 24 08:38:11 2023 +0100 arm64: dts: qcom: sm8150: drop incorrect domain idle states properties Domain idle states do not use 'idle-state-name' and 'local-timer-stop': sm8150-hdk.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+' Reported-by: Neil Armstrong Link: https://lore.kernel.org/all/20230323-topic-sm8450-upstream-dt-bindings-fixes-v1-4-3ead1e418fe4@linaro.org/ Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230324073813.22158-4-krzysztof.kozlowski@linaro.org commit ac7944f01b771af7718a81793ca5b38b0e3a0c21 Author: Krzysztof Kozlowski Date: Fri Mar 24 08:38:10 2023 +0100 arm64: dts: qcom: sm6375: drop incorrect domain idle states properties Domain idle states do not use 'idle-state-name' and 'local-timer-stop': sm6375-sony-xperia-murray-pdx225.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+' Reported-by: Neil Armstrong Link: https://lore.kernel.org/all/20230323-topic-sm8450-upstream-dt-bindings-fixes-v1-4-3ead1e418fe4@linaro.org/ Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230324073813.22158-3-krzysztof.kozlowski@linaro.org commit 1766e9155d086cd238c24113a7be9740d35c2ebe Author: Krzysztof Kozlowski Date: Fri Mar 24 08:38:09 2023 +0100 arm64: dts: qcom: sdm845: drop incorrect domain idle states properties Domain idle states do not use 'idle-state-name' and 'local-timer-stop': sdm845-shift-axolotl.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+' Reported-by: Neil Armstrong Link: https://lore.kernel.org/all/20230323-topic-sm8450-upstream-dt-bindings-fixes-v1-4-3ead1e418fe4@linaro.org/ Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230324073813.22158-2-krzysztof.kozlowski@linaro.org commit dffc4b5c086cf1d3dae4761427122a56b9d1253a Author: Krzysztof Kozlowski Date: Fri Mar 24 08:38:08 2023 +0100 arm64: dts: qcom: sm8250: drop incorrect domain idle states properties Domain idle states do not use 'idle-state-name' and 'local-timer-stop': sm8250-hdk.dtb: domain-idle-states: cluster-sleep-0: 'idle-state-name', 'local-timer-stop' do not match any of the regexes: 'pinctrl-[0-9]+' Reported-by: Neil Armstrong Link: https://lore.kernel.org/all/20230323-topic-sm8450-upstream-dt-bindings-fixes-v1-4-3ead1e418fe4@linaro.org/ Signed-off-by: Krzysztof Kozlowski Reviewed-by: Ulf Hansson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230324073813.22158-1-krzysztof.kozlowski@linaro.org commit 795ee50e55f4e869ad1d56f0262d0baa401f6c3d Author: Konrad Dybcio Date: Thu Mar 16 15:13:03 2023 +0100 arm64: dts: qcom: sm6375-pdx225: Add volume down GPIO key Add the required nodes to enable the volume down key on the Sony Xperia 10 IV. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230303-topic-sm6375_features0_dts-v2-14-708b8191f7eb@linaro.org commit dbe38b9cba6d0de56ca186151f3f54f9c776f9d9 Author: Konrad Dybcio Date: Thu Mar 16 15:13:02 2023 +0100 arm64: dts: qcom: sm6375: Introduce C3 power state for both ARM clusters Introduce the C3 power state, which - to the best of my understanding - gates the CPU clock, but does not shut off the power rail. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230303-topic-sm6375_features0_dts-v2-13-708b8191f7eb@linaro.org commit 097d6525af378f4be768c05cc1d77183a4e742e3 Author: Konrad Dybcio Date: Thu Mar 16 15:13:01 2023 +0100 arm64: dts: qcom: sm6375: Bump CPU rail power collapse index In preparation for supporting a less-deep sleep state, rename the existing rail power off from _0 to _1. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230303-topic-sm6375_features0_dts-v2-12-708b8191f7eb@linaro.org commit 33555cdae863984c7840ba742cfffe839a0f71e4 Author: Konrad Dybcio Date: Thu Mar 16 15:13:00 2023 +0100 arm64: dts: qcom: sm6375: Configure TSENS thermal zones Add a thermal zones configuration for all 15+11 TSENS sensors. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230303-topic-sm6375_features0_dts-v2-11-708b8191f7eb@linaro.org commit 3f54391526b407a419d2dfd4055fdc9e6e223551 Author: Konrad Dybcio Date: Thu Mar 16 15:12:59 2023 +0100 arm64: dts: qcom: sm6375: Add TSENS Add nodes for the two TSENS v2.8.0 controllers present on the SoC. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230303-topic-sm6375_features0_dts-v2-10-708b8191f7eb@linaro.org commit 2f51d9231485250c0e4cf4d7326c30109c553382 Author: Konrad Dybcio Date: Thu Mar 16 15:12:58 2023 +0100 arm64: dts: qcom: sm6375: Add CPUCP L3 node Configure the L3 cache DVFS scaler within the CPUCP block to allow for dynamic frequency switching. Reviewed-by: Sibi Sankar Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230303-topic-sm6375_features0_dts-v2-9-708b8191f7eb@linaro.org commit 31cc61104f6894f686491dbbb5c8ece97b06e75d Author: Konrad Dybcio Date: Thu Mar 16 15:12:57 2023 +0100 arm64: dts: qcom: sm6375: Add modem nodes Add required nodes to make the embedded 5G modem boot up on SM6375. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230303-topic-sm6375_features0_dts-v2-8-708b8191f7eb@linaro.org commit 149d179d1408bc67b6af10af160ac13b48fa3399 Author: Konrad Dybcio Date: Thu Mar 16 15:12:56 2023 +0100 arm64: dts: qcom: sm6375: Add wifi node Add a node for ATH10K_SNoC wifi on SM6375. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230303-topic-sm6375_features0_dts-v2-7-708b8191f7eb@linaro.org commit 528630df2fa6d34eca0268a293fe354c71e48556 Author: Konrad Dybcio Date: Thu Mar 16 15:12:54 2023 +0100 arm64: dts: qcom: sm6375: Add IMEM Add a node for the IMEM block on SM6375. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230303-topic-sm6375_features0_dts-v2-5-708b8191f7eb@linaro.org commit 2cecb9c2419f78e939e6e902895591ce3e3a7cc7 Author: Konrad Dybcio Date: Thu Mar 16 15:12:53 2023 +0100 arm64: dts: qcom: sm6375: Add RPM sleep stats Add a node for RPM sleep stats to enable sleep monitoring. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230303-topic-sm6375_features0_dts-v2-4-708b8191f7eb@linaro.org commit feffd767971e25f43ba47bf2ab23a660f3a3758c Author: Konrad Dybcio Date: Wed Mar 15 15:11:25 2023 +0100 arm64: dts: qcom: sm8550: Use the correct BWMON fallback compatible Use the correct fallback compatible for the BWMONv4 with merged global and monitor register spaces. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304-topic-ddr_bwmon-v3-7-77a050c2fbda@linaro.org commit e95b60f1207dee16e0d3d66254ece655fd4e73c0 Author: Konrad Dybcio Date: Wed Mar 15 15:11:24 2023 +0100 arm64: dts: qcom: sdm845: Use the correct BWMON compatible Drop the incorrect msm8998 fallback and use the new qcom,sdm845-cpu-bwmon compatible to distinguish the CPU BWMON found on this platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304-topic-ddr_bwmon-v3-6-77a050c2fbda@linaro.org commit 5e1b11c00ffc0a2d105af5a92053fa10ca15fcd0 Author: Konrad Dybcio Date: Wed Mar 15 15:11:23 2023 +0100 arm64: dts: qcom: sc8280xp: Use the correct BWMON fallback compatible Use the correct fallback compatible for the BWMONv4 with merged global and monitor register spaces. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304-topic-ddr_bwmon-v3-5-77a050c2fbda@linaro.org commit bad26511c4cb5469545834886e8df1d2b4c117d8 Author: Konrad Dybcio Date: Wed Mar 15 15:11:22 2023 +0100 arm64: dts: qcom: sc7280: Use the correct BWMON fallback compatible Use the correct fallback compatible for the BWMONv4 with merged global and monitor register spaces. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304-topic-ddr_bwmon-v3-4-77a050c2fbda@linaro.org commit fc7c39d61cf8cd03e197ac492241fa5a007dd2c0 Author: Konrad Dybcio Date: Wed Mar 15 11:52:09 2023 +0100 arm64: dts: qcom: sm6115: Add GPUCC and Adreno SMMU Add GPUCC and Adreno SMMU nodes in preparation for adding the GPU itself. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230315-topic-kamorta_adrsmmu-v1-2-d1c0dea90bd9@linaro.org commit 7c3a3554ba96dccf80e20a7ee2fca8a07e3c1ddb Merge: a9eaa4798473f c413f34e7aafb Author: Bjorn Andersson Date: Tue Apr 4 20:14:39 2023 -0700 Merge branch '20230208091340.124641-1-konrad.dybcio@linaro.org' into HEAD Introduce SM6115 GPUCC devicetree bindings, to make it possible to use clock defines in the devicetree source. commit df90ded69043400c01c552d672f198a99bd531e6 Author: Konrad Dybcio Date: Thu Mar 16 15:12:52 2023 +0100 dt-bindings: sram: qcom,imem: document SM6375 IMEM Add a compatible for SM6375 IMEM. Acked-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230303-topic-sm6375_features0_dts-v2-3-708b8191f7eb@linaro.org commit 002c3fb6f4f38b50ef0514247c2d55fc6ed8c6d4 Author: Konrad Dybcio Date: Thu Mar 16 12:48:05 2023 +0100 clk: qcom: dispcc-qcm2290: Add MDSS_CORE reset Add the MDSS_CORE reset which can be asserted to reset the state of the entire MDSS. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230316-topic-qcm_dispcc_reset-v1-2-dd3708853014@linaro.org commit 25dac40a6340765ada1d6c864d4860adb72e4540 Merge: c7ef7fbb1ccfc 123ee7550e527 Author: Bjorn Andersson Date: Tue Apr 4 19:55:56 2023 -0700 Merge branch '20230316-topic-qcm_dispcc_reset-v1-1-dd3708853014@linaro.org' into clk-for-6.4 Merge dt-binding include file additions through topic branch, to allow them to be made available in DT source tree as well. commit 123ee7550e52700475eff4d673723e03339e629f Author: Konrad Dybcio Date: Thu Mar 16 12:48:04 2023 +0100 dt-bindings: clock: dispcc-qcm2290: Add MDSS_CORE reset Add the MDSS_CORE reset which can be asserted to reset the state of the entire MDSS. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230316-topic-qcm_dispcc_reset-v1-1-dd3708853014@linaro.org commit 054fbf7ff8143d35ca7d3bb5414bb44ee1574194 Author: Simon Horman Date: Mon Apr 3 17:43:16 2023 +0200 net: qrtr: correct types of trace event parameters The arguments passed to the trace events are of type unsigned int, however the signature of the events used __le32 parameters. I may be missing the point here, but sparse flagged this and it does seem incorrect to me. net/qrtr/ns.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, include/trace/events/qrtr.h): ./include/trace/events/qrtr.h:11:1: warning: cast to restricted __le32 ./include/trace/events/qrtr.h:11:1: warning: restricted __le32 degrades to integer ./include/trace/events/qrtr.h:11:1: warning: restricted __le32 degrades to integer ... (a lot more similar warnings) net/qrtr/ns.c:115:47: expected restricted __le32 [usertype] service net/qrtr/ns.c:115:47: got unsigned int service net/qrtr/ns.c:115:61: warning: incorrect type in argument 2 (different base types) ... (a lot more similar warnings) Fixes: dfddb54043f0 ("net: qrtr: Add tracepoint support") Reviewed-by: Manivannan Sadhasivam Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20230402-qrtr-trace-types-v1-1-92ad55008dd3@kernel.org Signed-off-by: Jakub Kicinski commit 992e76908e9288d0c725addbbd72b5930e99b2de Author: Heiner Kallweit Date: Mon Apr 3 21:35:46 2023 +0200 net: phy: meson-gxl: enable edpd tunable support for G12A internal PHY Enable EDPD PHY tunable support for the G12A internal PHY, reusing the recently added tunable support in the smsc driver. Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/8d309575-067c-7321-33cf-6ffac11f7c8d@gmail.com Signed-off-by: Jakub Kicinski commit 8678c8b305bb0de99eb05d6dae74e04ca46827a4 Author: Qiang Yu Date: Tue Apr 4 08:26:01 2023 +0800 Revert "drm/lima: add usage counting method to ctx_mgr" This reverts commit bccafec957a5c4b22ac29e53a39e82d0a0008348. This is due to the depend commit has been reverted on upstream: commit baad10973fdb ("Revert "drm/scheduler: track GPU active time per entity"") Acked-by: Emil Velikov Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20230404002601.24136-4-yq882255@163.com commit 4ad17bf571730475bf62290399d52b26ece8228c Author: Qiang Yu Date: Tue Apr 4 08:26:00 2023 +0800 Revert "drm/lima: allocate unique id per drm_file" This reverts commit 87767de835edf527b879a363d518c33da68adb81. This is due to the depend commit has been reverted on upstream: commit baad10973fdb ("Revert "drm/scheduler: track GPU active time per entity"") Acked-by: Emil Velikov Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20230404002601.24136-3-yq882255@163.com commit 7e4d0b09a9f268dad595c3ea92d692a14389131a Author: Qiang Yu Date: Tue Apr 4 08:25:59 2023 +0800 Revert "drm/lima: add show_fdinfo for drm usage stats" This reverts commit 4a66f3da99dcb4dcbd28544110636b50adfb0f0d. This is due to the depend commit has been reverted on upstream: commit baad10973fdb ("Revert "drm/scheduler: track GPU active time per entity"") Acked-by: Emil Velikov Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20230404002601.24136-2-yq882255@163.com commit d099f594ad5650e8d8232b5f31f5f90104e65def Author: Jiri Olsa Date: Tue Apr 4 00:02:54 2023 +0200 kallsyms: Disable preemption for find_kallsyms_symbol_value Artem reported suspicious RCU usage [1]. The reason is that verifier calls find_kallsyms_symbol_value with preemption enabled which will trigger suspicious RCU usage warning in rcu_dereference_sched call. Disabling preemption in find_kallsyms_symbol_value and adding __find_kallsyms_symbol_value function. Fixes: 31bf1dbccfb0 ("bpf: Fix attaching fentry/fexit/fmod_ret/lsm to modules") Reported-by: Artem Savkov Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Tested-by: Artem Savkov Reviewed-by: Zhen Lei Link: https://lore.kernel.org/bpf/20230403220254.2191240-1-jolsa@kernel.org [1] https://lore.kernel.org/bpf/ZBrPMkv8YVRiWwCR@samus.usersys.redhat.com/ commit e8f59d84f43deab59bb86ff9e12cd4d542a4bb34 Merge: 8fc59c26d212c 69f41a7877616 Author: Andrii Nakryiko Date: Tue Apr 4 16:53:31 2023 -0700 Merge branch 'bpf: Follow up to RCU enforcement in the verifier.' Alexei Starovoitov says: ==================== From: Alexei Starovoitov The patch set is addressing a fallout from commit 6fcd486b3a0a ("bpf: Refactor RCU enforcement in the verifier.") It was too aggressive with PTR_UNTRUSTED marks. Patches 1-6 are cleanup and adding verifier smartness to address real use cases in bpf programs that broke with too aggressive PTR_UNTRUSTED. The partial revert is done in patch 7 anyway. ==================== Signed-off-by: Andrii Nakryiko commit 69f41a787761633b752d71166786eb642bad4913 Author: Alexei Starovoitov Date: Mon Apr 3 21:50:29 2023 -0700 selftests/bpf: Add tracing tests for walking skb and req. Add tracing tests for walking skb->sk and req->sk. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230404045029.82870-9-alexei.starovoitov@gmail.com commit afeebf9f57a4965e0be90e4dc87f8f3a1417376d Author: Alexei Starovoitov Date: Mon Apr 3 21:50:28 2023 -0700 bpf: Undo strict enforcement for walking untagged fields. The commit 6fcd486b3a0a ("bpf: Refactor RCU enforcement in the verifier.") broke several tracing bpf programs. Even in clang compiled kernels there are many fields that are not marked with __rcu that are safe to read and pass into helpers, but the verifier doesn't know that they're safe. Aggressively marking them as PTR_UNTRUSTED was premature. Fixes: 6fcd486b3a0a ("bpf: Refactor RCU enforcement in the verifier.") Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230404045029.82870-8-alexei.starovoitov@gmail.com commit 30ee9821f9430c34a6254134a5f0e8db227510be Author: Alexei Starovoitov Date: Mon Apr 3 21:50:27 2023 -0700 bpf: Allowlist few fields similar to __rcu tag. Allow bpf program access cgrp->kn, mm->exe_file, skb->sk, req->sk. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230404045029.82870-7-alexei.starovoitov@gmail.com commit add68b843f33d4e5dcbdc7ba6dffe7750a964159 Author: Alexei Starovoitov Date: Mon Apr 3 21:50:26 2023 -0700 bpf: Refactor NULL-ness check in check_reg_type(). check_reg_type() unconditionally disallows PTR_TO_BTF_ID | PTR_MAYBE_NULL. It's problematic for helpers that allow ARG_PTR_TO_BTF_ID_OR_NULL like bpf_sk_storage_get(). Allow passing PTR_TO_BTF_ID | PTR_MAYBE_NULL into such helpers. That technically includes bpf_kptr_xchg() helper, but in practice: bpf_kptr_xchg(..., bpf_cpumask_create()); is still disallowed because bpf_cpumask_create() returns ref counted pointer with ref_obj_id > 0. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230404045029.82870-6-alexei.starovoitov@gmail.com commit 91571a515d1bcdc280bb46423bb697ea7eb42ff3 Author: Alexei Starovoitov Date: Mon Apr 3 21:50:25 2023 -0700 bpf: Teach verifier that certain helpers accept NULL pointer. bpf_[sk|inode|task|cgrp]_storage_[get|delete]() and bpf_get_socket_cookie() helpers perform run-time check that sk|inode|task|cgrp pointer != NULL. Teach verifier about this fact and allow bpf programs to pass PTR_TO_BTF_ID | PTR_MAYBE_NULL into such helpers. It will be used in the subsequent patch that will do bpf_sk_storage_get(.., skb->sk, ...); Even when 'skb' pointer is trusted the 'sk' pointer may be NULL. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230404045029.82870-5-alexei.starovoitov@gmail.com commit 63260df1396578226ac3134cf7f764690002e70e Author: Alexei Starovoitov Date: Mon Apr 3 21:50:24 2023 -0700 bpf: Refactor btf_nested_type_is_trusted(). btf_nested_type_is_trusted() tries to find a struct member at corresponding offset. It works for flat structures and falls apart in more complex structs with nested structs. The offset->member search is already performed by btf_struct_walk() including nested structs. Reuse this work and pass {field name, field btf id} into btf_nested_type_is_trusted() instead of offset to make BTF_TYPE_SAFE*() logic more robust. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230404045029.82870-4-alexei.starovoitov@gmail.com commit b7e852a9ec96635168c04204fb7cf1f7390b9a8c Author: Alexei Starovoitov Date: Mon Apr 3 21:50:23 2023 -0700 bpf: Remove unused arguments from btf_struct_access(). Remove unused arguments from btf_struct_access() callback. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230404045029.82870-3-alexei.starovoitov@gmail.com commit 7d64c513284408fee5178a0953a686e9410f2399 Author: Alexei Starovoitov Date: Mon Apr 3 21:50:22 2023 -0700 bpf: Invoke btf_struct_access() callback only for writes. Remove duplicated if (atype == BPF_READ) btf_struct_access() from btf_struct_access() callback and invoke it only for writes. This is possible to do because currently btf_struct_access() custom callback always delegates to generic btf_struct_access() helper for BPF_READ accesses. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230404045029.82870-2-alexei.starovoitov@gmail.com commit 8fc59c26d212c23d6fd5ad47a10651cf72d83b4a Author: Ilya Leoshkevich Date: Mon Apr 3 19:29:35 2023 +0200 selftests/bpf: Add RESOLVE_BTFIDS dependency to bpf_testmod.ko bpf_testmod.ko sometimes fails to build from a clean checkout: BTF [M] linux/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.ko /bin/sh: 1: linux-build//tools/build/resolve_btfids/resolve_btfids: not found The reason is that RESOLVE_BTFIDS may not yet be built. Fix by adding a dependency. Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20230403172935.1553022-1-iii@linux.ibm.com commit da6ea0b050fa720302b56fbb59307e7c7531a342 Author: Jaegeuk Kim Date: Mon Apr 3 09:37:24 2023 -0700 f2fs: fix null pointer panic in tracepoint in __replace_atomic_write_block We got a kernel panic if old_addr is NULL. https://bugzilla.kernel.org/show_bug.cgi?id=217266 BUG: kernel NULL pointer dereference, address: 0000000000000000 Call Trace: f2fs_commit_atomic_write+0x619/0x990 [f2fs a1b985b80f5babd6f3ea778384908880812bfa43] __f2fs_ioctl+0xd8e/0x4080 [f2fs a1b985b80f5babd6f3ea778384908880812bfa43] ? vfs_write+0x2ae/0x3f0 ? vfs_write+0x2ae/0x3f0 __x64_sys_ioctl+0x91/0xd0 do_syscall_64+0x5c/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f69095fe53f Fixes: 2f3a9ae990a7 ("f2fs: introduce trace_f2fs_replace_atomic_write_block") Cc: Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 144f1cd40bf91fb3ac1d41806470756ce774f389 Author: Qilin Tan Date: Fri Mar 31 17:26:56 2023 +0800 f2fs: fix iostat lock protection Made iostat lock irq safe to avoid potentinal deadlock. Deadlock scenario: f2fs_attr_store -> f2fs_sbi_store -> _sbi_store -> spin_lock(sbi->iostat_lock) -> scsi_end_request -> bio_endio -> f2fs_dio_read_end_io -> f2fs_update_iostat -> spin_lock_irqsave(sbi->iostat_lock) ===> Dead lock here Fixes: 61803e984307 ("f2fs: fix iostat related lock protection") Fixes: a1e09b03e6f5 ("f2fs: use iomap for direct I/O") Signed-off-by: Qilin Tan Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f26aaee60a9f14035c1a659b5b00a6c8767b4126 Author: Yohan Joung Date: Sun Apr 2 12:12:59 2023 +0900 f2fs: fix align check for npo2 Fix alignment check to be correct in npo2 as well Signed-off-by: Yohan Joung Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d4998b7895ab3a590bcf85f08033166ee9502b03 Author: Yangtao Li Date: Sun Mar 19 15:51:30 2023 +0800 f2fs: add compression feature check for all compress mount opt Opt_compress_chksum, Opt_compress_mode and Opt_compress_cache lack the necessary check to see if the image supports compression, let's add it. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c0abbdf2b5d6e6f53e872f67c7b483977bd1a7b3 Author: Yangtao Li Date: Sun Mar 19 15:58:22 2023 +0800 f2fs: convert is_extension_exist() to return bool type is_extension_exist() only return two values, 0 or 1. So there is no need to use int type. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e0e3aca997f7f2b9b5b5e27f878e9bf5b573720a Author: Stephen Boyd Date: Tue Apr 4 13:45:53 2023 -0700 clk: mediatek: Use right match table, include mod_devicetable This is copy/pasta that breaks modular builds. Fix the match table to use the right pointer, or the right device table type. And while we're including the header, fix the order to be linux, dt-bindings, and finally local. Cc: Garmin.Chang Cc: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Fixes: f42b9e9a43e3 ("clk: mediatek: Add MT8188 wpesys clock support") Fixes: 0d2f2cefba64 ("clk: mediatek: Add MT8188 adsp clock support") Fixes: e4aaa60eae16 ("clk: mediatek: Add MT8188 vdosys0 clock support") Fixes: cfa4609f9bbe ("clk: mediatek: Add MT8188 vdosys1 clock support") Fixes: bb87c1109ce2 ("clk: mediatek: Add MT8188 vencsys clock support") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304011039.UBDX1UOT-lkp@intel.com/ Link: https://lore.kernel.org/oe-kbuild-all/202304020649.QO2HlpD5-lkp@intel.com/ Link: https://lore.kernel.org/oe-kbuild-all/202304021055.WDhQPcoS-lkp@intel.com/ Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20230404204553.1256263-1-sboyd@kernel.org commit 5462ade6871e96646502cc95e7e05f0ab4fc84de Author: Kirill A. Shutemov Date: Thu Mar 30 14:49:43 2023 +0300 x86/boot: Centralize __pa()/__va() definitions Replace multiple __pa()/__va() definitions with a single one in misc.h. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport Reviewed-by: Dave Hansen Link: https://lore.kernel.org/all/20230330114956.20342-2-kirill.shutemov%40linux.intel.com commit 6f1ccbf07453eb1ee6bb24d6b531b88dd44ad229 Author: Rob Clark Date: Mon Apr 3 09:03:14 2023 -0700 drm/vblank: Fix for drivers that do not drm_vblank_init() This should fix a crash that was reported on ast (and possibly other drivers which do not initialize vblank). fbcon: Taking over console Unable to handle kernel NULL pointer dereference at virtual address 0000000000000074 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 CM = 0, WnR = 0 user pgtable: 4k pages, 48-bit VAs, pgdp=0000080009d16000 [0000000000000074] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 0000000096000004 [#1] SMP Modules linked in: ip6table_nat tun 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 rfkill ip_set nf_tables nfnetlink qrtr sunrpc binfmt_misc vfat fat xfs snd_usb_audio snd_hwdep snd_usbmidi_lib snd_seq snd_pcm snd_rawmidi snd_timer snd_seq_device snd soundcore joydev mc ipmi_ssif ipmi_devintf ipmi_msghandler arm_spe_pmu arm_cmn arm_dsu_pmu arm_dmc620_pmu cppc_cpufreq loop zram crct10dif_ce polyval_ce nvme polyval_generic ghash_ce sbsa_gwdt igb nvme_core ast nvme_common i2c_algo_bit xgene_hwmon gpio_dwapb scsi_dh_rdac scsi_dh_emc scsi_dh_alua ip6_tables ip_tables dm_multipath fuse CPU: 12 PID: 469 Comm: kworker/12:1 Not tainted 6.3.0-rc2-00008-gd39e48ca80c0 #1 Hardware name: ADLINK AVA Developer Platform/AVA Developer Platform, BIOS TianoCore 2.04.100.07 (SYS: 2.06.20220308) 09/08/2022 Workqueue: events fbcon_register_existing_fbs pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : drm_crtc_next_vblank_start+0x2c/0x98 lr : drm_atomic_helper_wait_for_fences+0x90/0x240 sp : ffff80000d583960 x29: ffff80000d583960 x28: ffff07ff8fc187b0 x27: 0000000000000000 x26: ffff07ff99c08c00 x25: 0000000000000038 x24: ffff07ff99c0c000 x23: 0000000000000001 x22: 0000000000000038 x21: 0000000000000000 x20: ffff07ff9640a280 x19: 0000000000000000 x18: ffffffffffffffff x17: 0000000000000000 x16: ffffb24d2eece1c0 x15: 0000003038303178 x14: 3032393100000048 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000000 x9 : ffffb24d2eeeaca0 x8 : ffff80000d583628 x7 : 0000080077783000 x6 : 0000000000000000 x5 : ffff80000d584000 x4 : ffff07ff99c0c000 x3 : 0000000000000130 x2 : 0000000000000000 x1 : ffff80000d5839c0 x0 : ffff07ff99c0cc08 Call trace: drm_crtc_next_vblank_start+0x2c/0x98 drm_atomic_helper_wait_for_fences+0x90/0x240 drm_atomic_helper_commit+0xb0/0x188 drm_atomic_commit+0xb0/0xf0 drm_client_modeset_commit_atomic+0x218/0x280 drm_client_modeset_commit_locked+0x64/0x1a0 drm_client_modeset_commit+0x38/0x68 __drm_fb_helper_restore_fbdev_mode_unlocked+0xb0/0xf8 drm_fb_helper_set_par+0x44/0x88 fbcon_init+0x1e0/0x4a8 visual_init+0xbc/0x118 do_bind_con_driver.isra.0+0x194/0x3a0 do_take_over_console+0x50/0x70 do_fbcon_takeover+0x74/0xf8 do_fb_registered+0x13c/0x158 fbcon_register_existing_fbs+0x78/0xc0 process_one_work+0x1ec/0x478 worker_thread+0x74/0x418 kthread+0xec/0x100 ret_from_fork+0x10/0x20 Code: f9400004 b9409013 f940a082 9ba30a73 (b9407662) ---[ end trace 0000000000000000 ]--- v2: Use drm_dev_has_vblank() Reported-by: Nathan Chancellor Fixes: d39e48ca80c0 ("drm/atomic-helper: Set fence deadline for vblank") Signed-off-by: Rob Clark Reviewed-by: Thomas Zimmermann Tested-by: Nathan Chancellor Tested-by: Geert Uytterhoeven Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20230403160314.1210533-1-robdclark@gmail.com commit e5116f46d44b72ede59a6923829f68a8b8f84e76 Author: Ian Rogers Date: Mon Mar 20 14:22:36 2023 -0700 perf map: Add accessor for start and end Later changes will add reference count checking for struct map, start and end are frequently accessed variables. Add an accessor so that the reference count check is only necessary in one place. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230320212248.1175731-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8c47b8253f4cfd8b4dbda8c9adc1d0b1d7f3009d Author: Rob Herring Date: Fri Mar 10 08:47:04 2023 -0600 firmware: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Acked-by: Sudeep Holla Signed-off-by: Thierry Reding commit 63df0e4bc368adbd12ed70ed4789d8d52d65661d Author: Ian Rogers Date: Mon Mar 20 14:22:35 2023 -0700 perf map: Add accessor for dso Later changes will add reference count checking for struct map, with dso being the most frequently accessed variable. Add an accessor so that the reference count check is only necessary in one place. Additional changes: - add a dso variable to avoid repeated map__dso calls. - in builtin-mem.c dump_raw_samples, code only partially tested for dso == NULL. Make the possibility of NULL consistent. - in thread.c thread__memcpy fix use of spaces and use tabs. Committer notes: Did missing conversions on these files: tools/perf/arch/powerpc/util/skip-callchain-idx.c tools/perf/arch/powerpc/util/sym-handling.c tools/perf/ui/browsers/hists.c tools/perf/ui/gtk/annotate.c tools/perf/util/cs-etm.c tools/perf/util/thread.c tools/perf/util/unwind-libunwind-local.c tools/perf/util/unwind-libunwind.c Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230320212248.1175731-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 40fa907e5a69edbae503a4937f8f487ed1ca92ea Author: Vipin Sharma Date: Tue Mar 21 15:00:21 2023 -0700 KVM: x86/mmu: Merge all handle_changed_pte*() functions Merge __handle_changed_pte() and handle_changed_spte_acc_track() into a single function, handle_changed_pte(), as the two are always used together. Remove the existing handle_changed_pte(), as it's just a wrapper that calls __handle_changed_pte() and handle_changed_spte_acc_track(). Signed-off-by: Vipin Sharma Reviewed-by: Ben Gardon Reviewed-by: David Matlack [sean: massage changelog] Link: https://lore.kernel.org/r/20230321220021.2119033-14-seanjc@google.com Signed-off-by: Sean Christopherson commit 1f9973456e802199e863030ed09493419a02f6c7 Author: Vipin Sharma Date: Tue Mar 21 15:00:20 2023 -0700 KVM: x86/mmu: Remove handle_changed_spte_dirty_log() Remove handle_changed_spte_dirty_log() as there is no code flow which sets 4KiB SPTE writable and hit this path. This function marks the page dirty in a memslot only if new SPTE is 4KiB in size and writable. Current users of handle_changed_spte_dirty_log() are: 1. set_spte_gfn() - Create only non writable SPTEs. 2. write_protect_gfn() - Change an SPTE to non writable. 3. zap leaf and roots APIs - Everything is 0. 4. handle_removed_pt() - Sets SPTEs to REMOVED_SPTE 5. tdp_mmu_link_sp() - Makes non leaf SPTEs. There is also no path which creates a writable 4KiB without going through make_spte() and this functions takes care of marking SPTE dirty in the memslot if it is PT_WRITABLE. Signed-off-by: Vipin Sharma Reviewed-by: David Matlack [sean: add blurb to __handle_changed_spte()'s comment] Link: https://lore.kernel.org/r/20230321220021.2119033-13-seanjc@google.com Signed-off-by: Sean Christopherson commit 0b7cc2547d5329b996b6687e04a82ed4eef1adda Author: Vipin Sharma Date: Tue Mar 21 15:00:19 2023 -0700 KVM: x86/mmu: Remove "record_acc_track" in __tdp_mmu_set_spte() Remove bool parameter "record_acc_track" from __tdp_mmu_set_spte() and refactor the code. This variable is always set to true by its caller. Remove single and double underscore prefix from tdp_mmu_set_spte() related APIs: 1. Change __tdp_mmu_set_spte() to tdp_mmu_set_spte() 2. Change _tdp_mmu_set_spte() to tdp_mmu_iter_set_spte() Signed-off-by: Vipin Sharma Reviewed-by: David Matlack Link: https://lore.kernel.org/r/20230321220021.2119033-12-seanjc@google.com Signed-off-by: Sean Christopherson commit 891f115960682b84440bdfb1ea72ab2824206db7 Author: Vipin Sharma Date: Tue Mar 21 15:00:18 2023 -0700 KVM: x86/mmu: Bypass __handle_changed_spte() when aging TDP MMU SPTEs Drop everything except the "tdp_mmu_spte_changed" tracepoint part of __handle_changed_spte() when aging SPTEs in the TDP MMU, as clearing the accessed status doesn't affect the SPTE's shadow-present status, whether or not the SPTE is a leaf, or change the PFN. I.e. none of the functional updates handled by __handle_changed_spte() are relevant. Losing __handle_changed_spte()'s sanity checks does mean that a bug could theoretical go unnoticed, but that scenario is extremely unlikely, e.g. would effectively require a misconfigured MMU or a locking bug elsewhere. Link: https://lore.kernel.org/all/Y9HcHRBShQgjxsQb@google.com Signed-off-by: Vipin Sharma Reviewed-by: David Matlack [sean: massage changelog] Link: https://lore.kernel.org/r/20230321220021.2119033-11-seanjc@google.com Signed-off-by: Sean Christopherson commit 6141df067d04599706994b616e1a4b4c19ae5d07 Author: Vipin Sharma Date: Tue Mar 21 15:00:17 2023 -0700 KVM: x86/mmu: Drop unnecessary dirty log checks when aging TDP MMU SPTEs Drop the unnecessary call to handle dirty log updates when aging TDP MMU SPTEs, as neither clearing the Accessed bit nor marking a SPTE for access tracking can _set_ the Writable bit, i.e. can't trigger marking a gfn dirty in its memslot. The access tracking path can _clear_ the Writable bit, e.g. if the XCHG races with fast_page_fault() and writes the stale value without the Writable bit set, but clearing the Writable bit outside of mmu_lock is not allowed, i.e. access tracking can't spuriously set the Writable bit. Signed-off-by: Vipin Sharma [sean: split to separate patch, apply to dirty path, write changelog] Link: https://lore.kernel.org/r/20230321220021.2119033-10-seanjc@google.com Signed-off-by: Sean Christopherson commit 7ee131e3a3c38dc7939ce35861a71f4ee55d9b02 Author: Vipin Sharma Date: Tue Mar 21 15:00:16 2023 -0700 KVM: x86/mmu: Clear only A-bit (if enabled) when aging TDP MMU SPTEs Use tdp_mmu_clear_spte_bits() when clearing the Accessed bit in TDP MMU SPTEs so as to use an atomic-AND instead of XCHG to clear the A-bit. Similar to the D-bit story, this will allow KVM to bypass __handle_changed_spte() by ensuring only the A-bit is modified. Link: https://lore.kernel.org/all/Y9HcHRBShQgjxsQb@google.com Signed-off-by: Vipin Sharma Reviewed-by: David Matlack [sean: massage changelog] Link: https://lore.kernel.org/r/20230321220021.2119033-9-seanjc@google.com Signed-off-by: Sean Christopherson commit e73008705d0c88ac69e3fe262bb03d86af23c521 Author: Vipin Sharma Date: Tue Mar 21 15:00:15 2023 -0700 KVM: x86/mmu: Remove "record_dirty_log" in __tdp_mmu_set_spte() Remove bool parameter "record_dirty_log" from __tdp_mmu_set_spte() and refactor the code as this variable is always set to true by its caller. Signed-off-by: Vipin Sharma Reviewed-by: David Matlack Link: https://lore.kernel.org/r/20230321220021.2119033-8-seanjc@google.com Signed-off-by: Sean Christopherson commit 1e0f42985ffad5c60e7a0a627405e1ff00208289 Author: Vipin Sharma Date: Tue Mar 21 15:00:14 2023 -0700 KVM: x86/mmu: Bypass __handle_changed_spte() when clearing TDP MMU dirty bits Drop everything except marking the PFN dirty and the relevant tracepoint parts of __handle_changed_spte() when clearing the dirty status of gfns in the TDP MMU. Clearing only the Dirty (or Writable) bit doesn't affect the SPTEs shadow-present status, whether or not the SPTE is a leaf, or change the SPTE's PFN. I.e. other than marking the PFN dirty, none of the functional updates handled by __handle_changed_spte() are relevant. Losing __handle_changed_spte()'s sanity checks does mean that a bug could theoretical go unnoticed, but that scenario is extremely unlikely, e.g. would effectively require a misconfigured or a locking bug elsewhere. Opportunistically remove a comment blurb from __handle_changed_spte() about all modifications to TDP MMU SPTEs needing to invoke said function, that "rule" hasn't been true since fast page fault support was added for the TDP MMU (and perhaps even before). Tested on a VM (160 vCPUs, 160 GB memory) and found that performance of clear dirty log stage improved by ~40% in dirty_log_perf_test (with the full optimization applied). Before optimization: -------------------- Iteration 1 clear dirty log time: 3.638543593s Iteration 2 clear dirty log time: 3.145032742s Iteration 3 clear dirty log time: 3.142340358s Clear dirty log over 3 iterations took 9.925916693s. (Avg 3.308638897s/iteration) After optimization: ------------------- Iteration 1 clear dirty log time: 2.318988110s Iteration 2 clear dirty log time: 1.794470164s Iteration 3 clear dirty log time: 1.791668628s Clear dirty log over 3 iterations took 5.905126902s. (Avg 1.968375634s/iteration) Link: https://lore.kernel.org/all/Y9hXmz%2FnDOr1hQal@google.com Signed-off-by: Vipin Sharma Reviewed-by: David Matlack [sean: split the switch to atomic-AND to a separate patch] Link: https://lore.kernel.org/r/20230321220021.2119033-7-seanjc@google.com Signed-off-by: Sean Christopherson commit cf05e8c7325e341d7e1b1920fa580a130ec2c350 Author: Vipin Sharma Date: Tue Mar 21 15:00:13 2023 -0700 KVM: x86/mmu: Drop access tracking checks when clearing TDP MMU dirty bits Drop the unnecessary call to handle access-tracking changes when clearing the dirty status of TDP MMU SPTEs. Neither the Dirty bit nor the Writable bit has any impact on the accessed state of a page, i.e. clearing only the aforementioned bits doesn't make an accessed SPTE suddently not accessed. Signed-off-by: Vipin Sharma [sean: split to separate patch, write changelog] Link: https://lore.kernel.org/r/20230321220021.2119033-6-seanjc@google.com Signed-off-by: Sean Christopherson commit 89c313f20c1ed30e04cedae735994c902ee93ddb Author: Vipin Sharma Date: Tue Mar 21 15:00:12 2023 -0700 KVM: x86/mmu: Atomically clear SPTE dirty state in the clear-dirty-log flow Optimize the clearing of dirty state in TDP MMU SPTEs by doing an atomic-AND (on SPTEs that have volatile bits) instead of the full XCHG that currently ends up being invoked (see kvm_tdp_mmu_write_spte()). Clearing _only_ the bit in question will allow KVM to skip the many irrelevant checks in __handle_changed_spte() by avoiding any collateral damage due to the XCHG writing all SPTE bits, e.g. the XCHG could race with fast_page_fault() setting the W-bit and the CPU setting the D-bit, and thus incorrectly drop the CPU's D-bit update. Link: https://lore.kernel.org/all/Y9hXmz%2FnDOr1hQal@google.com Signed-off-by: Vipin Sharma Reviewed-by: David Matlack [sean: split the switch to atomic-AND to a separate patch] Link: https://lore.kernel.org/r/20230321220021.2119033-5-seanjc@google.com Signed-off-by: Sean Christopherson commit 697c89bed94effde145d84e618142dd89b2b54af Author: Vipin Sharma Date: Tue Mar 21 15:00:11 2023 -0700 KVM: x86/mmu: Consolidate Dirty vs. Writable clearing logic in TDP MMU Deduplicate the guts of the TDP MMU's clearing of dirty status by snapshotting whether to check+clear the Dirty bit vs. the Writable bit, which is the only difference between the two flavors of dirty tracking. Note, kvm_ad_enabled() is just a wrapper for shadow_accessed_mask, i.e. is constant after kvm-{intel,amd}.ko is loaded. Link: https://lore.kernel.org/all/Yz4Qi7cn7TWTWQjj@google.com Signed-off-by: Vipin Sharma [sean: split to separate patch, apply to dirty log, write changelog] Link: https://lore.kernel.org/r/20230321220021.2119033-4-seanjc@google.com Signed-off-by: Sean Christopherson commit 5982a5392663b30f57ee90b0372c19a7e9cb655a Author: Vipin Sharma Date: Tue Mar 21 15:00:10 2023 -0700 KVM: x86/mmu: Use kvm_ad_enabled() to determine if TDP MMU SPTEs need wrprot Use the constant-after-module-load kvm_ad_enabled() to check if SPTEs in the TDP MMU need to be write-protected when clearing accessed/dirty status instead of manually checking every SPTE. The per-SPTE A/D enabling is specific to nested EPT MMUs, i.e. when KVM is using EPT A/D bits but L1 is not, and so cannot happen in the TDP MMU (which is non-nested only). Keep the original code as sanity checks buried under MMU_WARN_ON(). MMU_WARN_ON() is more or less useless at the moment, but there are plans to change that. Link: https://lore.kernel.org/all/Yz4Qi7cn7TWTWQjj@google.com Signed-off-by: Vipin Sharma [sean: split to separate patch, apply to dirty path, write changelog] Link: https://lore.kernel.org/r/20230321220021.2119033-3-seanjc@google.com Signed-off-by: Sean Christopherson commit 41e07665f1a683064f4c69b0d652dff1baf5d689 Author: Vipin Sharma Date: Tue Mar 21 15:00:09 2023 -0700 KVM: x86/mmu: Add a helper function to check if an SPTE needs atomic write Move conditions in kvm_tdp_mmu_write_spte() to check if an SPTE should be written atomically or not to a separate function. This new function, kvm_tdp_mmu_spte_need_atomic_write(), will be used in future commits to optimize clearing bits in SPTEs. Signed-off-by: Vipin Sharma Reviewed-by: David Matlack Reviewed-by: Ben Gardon Link: https://lore.kernel.org/r/20230321220021.2119033-2-seanjc@google.com Signed-off-by: Sean Christopherson commit b6e9fb7ac236bc48cc2c667e0b51153d2daa5268 Author: Konrad Dybcio Date: Wed Mar 15 15:11:21 2023 +0100 soc: qcom: icc-bwmon: Handle global registers correctly The BWMON hardware has two sets of registers: one for the monitor itself and one called "global". It has what seems to be some kind of a head switch and an interrupt control register. It's usually 0x200 in size. On fairly recent SoCs (with the starting point seemingly being moving the OSM programming to the firmware) these two register sets are contiguous and overlapping, like this (on sm8450): /* notice how base.start == global_base.start+0x100 */ reg = <0x90b6400 0x300>, <0x90b6300 0x200>; reg-names = "base", "global_base"; Which led to some confusion and the assumption that since the "interesting" global registers begin right after global_base+0x100, there's no need to map two separate regions and one can simply subtract 0x100 from the offsets. This is however not the case for anything older than SDM845, as the global region can appear in seemingly random spots on the register map. Handle the case where the global registers are mapped separately to allow proper functioning of BWMONv4 on MSM8998 and older. Add specific compatibles for 845, 8280xp, 7280 and 8550 (all of which use the single reg space scheme) to keep backwards compatibility with old DTs. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304-topic-ddr_bwmon-v3-3-77a050c2fbda@linaro.org commit 452c165e3597691a953e3f4c4c0442c41c8e02f4 Author: Konrad Dybcio Date: Wed Mar 15 15:11:20 2023 +0100 soc: qcom: icc-bwmon: Remove unused struct member bwmon->regmap was never used, as the regmap for bwmon is registered through devres and accessed through bwmon's regmap_field members. Remove it Fixes: ec63dcd3c863 ("soc: qcom: icc-bwmon: use regmap and prepare for BWMON v5") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304-topic-ddr_bwmon-v3-2-77a050c2fbda@linaro.org commit a9eaa4798473fd3cfe39210c64e403d6cbc31984 Author: Konrad Dybcio Date: Tue Mar 14 14:28:35 2023 +0100 arm64: dts: qcom: msm8998-yoshino: Use actual pin names for pin nodes With the gpio-line-names in place coming from SONY themselves, we can now make the pin nodes and their labels to more closely resemble the actual thing. 4k has been renamed to four_k due to dtc limitations. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314-topic-yoshino_gpio-v2-2-4cb80e187e38@linaro.org commit 900007f26aa82e28ac4f494cd0121a75673d39ff Author: Konrad Dybcio Date: Tue Mar 14 14:28:34 2023 +0100 arm64: dts: qcom: msm8998-yoshino: Use SONY GPIO names Sony ever so graciously provides GPIO line names in their downstream kernel (though sometimes they are not 100% accurate and you can judge that by simply looking at them and with what drivers they are used). Add these to the Yoshino devices DTs to better document the hardware. Lilac and Poplar have identical pin assignments. Diff between these two and maple: TLMM: - "NC", + "TS_VDDIO_EN", PMI8998: - "NC" + "USB_SWITCH_SEL" - "NC" + "4K_DISP_DCDC_EN" PM8005: - "NC" + "EAR_EN" Which is probably due to Maple being designed and released quite a bit earlier than the other two and it having a super high tech true-4K display. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314-topic-yoshino_gpio-v2-1-4cb80e187e38@linaro.org commit d20ad168b7d024d8cbe6b54e9c029537aa412576 Author: Joel Selvaraj Date: Mon Mar 13 10:42:26 2023 -0500 arm64: dts: qcom: sdm845-xiaomi-beryllium: add notification LED The Poco F1 has a single color white notification LED. Enable the Qualcomm Light Pulse Generator (LPG) driver based notification LED. Signed-off-by: Joel Selvaraj Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313154226.136726-1-joelselvaraj.oss@gmail.com commit 6209038f131fee84ff1536dc59864f54d06740f2 Author: Komal Bajaj Date: Mon Mar 13 18:27:31 2023 +0530 arm64: dts: qcom: qdu1000: Add LLCC/system-cache-controller Add a DT node for Last level cache (aka. system cache) controller which provides control over the last level cache present on QDU1000 and QRU1000 SoCs. Signed-off-by: Komal Bajaj Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313125731.17745-1-quic_kbajaj@quicinc.com commit ec57cbce1a6d9384f8ac1ff966b204dc262f4927 Author: Krzysztof Kozlowski Date: Sun Mar 12 19:36:22 2023 +0100 arm64: dts: qcom: apq8096-db820c: drop unit address from PMI8994 regulator The PMIC regulators are not supposed to have unit addresses. Fixes: 2317b87a2a6f ("arm64: dts: qcom: db820c: Add vdd_gfx and tie it into mmcc") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230312183622.460488-8-krzysztof.kozlowski@linaro.org commit 7a202df0f3eed006e4a9e7c06d62cf67be56c14c Author: Krzysztof Kozlowski Date: Sun Mar 12 19:36:21 2023 +0100 arm64: dts: qcom: msm8994-msft-lumia-octagon: drop unit address from PMI8994 regulator The PMIC regulators are not supposed to have unit addresses. Fixes: 60b214effb80 ("arm64: dts: qcom: msm8994-octagon: Configure regulators") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230312183622.460488-7-krzysztof.kozlowski@linaro.org commit 3555dd528ba9c08d6ccd56239c695dbeac3b63e3 Author: Krzysztof Kozlowski Date: Sun Mar 12 19:36:20 2023 +0100 arm64: dts: qcom: msm8994-kitakami: drop unit address from PMI8994 regulator The PMIC regulators are not supposed to have unit addresses. Fixes: e9783584c9b7 ("arm64: dts: qcom: msm8994-kitakami: Add VDD_GFX regulator") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230312183622.460488-6-krzysztof.kozlowski@linaro.org commit 97b4fdc6b82d6d5cfb92a9b164540278720fb700 Author: Krzysztof Kozlowski Date: Sun Mar 12 19:36:19 2023 +0100 arm64: dts: qcom: msm8998-oneplus-cheeseburger: revert "fix backlight pin function" This reverts commit 46546f28825cf3a5ef6873b9cf947cd85c8a7258 because it mistakenly took PMIC pinctrl/GPIO as TLMM. The TLMM pinctrl uses "gpio" function, but PMIC uses "normal", so original code was correct: msm8998-oneplus-cheeseburger.dtb: pmic@2: gpio@c000:button-backlight-state: 'oneOf' conditional failed, one must be fixed: 'gpio' is not one of ['normal', 'paired', 'func1', 'func2', 'dtest1', 'dtest2', 'dtest3', 'dtest4', 'func3', 'func4'] Fixes: 46546f28825c ("arm64: dts: qcom: msm8998-oneplus-cheeseburger: fix backlight pin function") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230312183622.460488-5-krzysztof.kozlowski@linaro.org commit 24f39eec6a70768e7c2eb2f3d8158f45050ff75a Author: Krzysztof Kozlowski Date: Sun Mar 12 19:36:18 2023 +0100 arm64: dts: qcom: sc7180-trogdor-pazquel: correct trackpad supply The hid-over-i2c takes VDD, not VCC supply. Fix copy-pasta from other boards which use elan,ekth3000 with valid VCC: sc7180-trogdor-pazquel360-lte.dtb: trackpad@15: 'vcc-supply' does not match any of the regexes: 'pinctrl-[0-9]+' Fixes: fb69f6adaf88 ("arm64: dts: qcom: sc7180: Add pazquel dts files") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230312183622.460488-4-krzysztof.kozlowski@linaro.org commit 52e2996f253d82520011340d40dbc1c76ea79208 Author: Krzysztof Kozlowski Date: Sun Mar 12 19:36:17 2023 +0100 arm64: dts: qcom: sc7180-trogdor-lazor: correct trackpad supply The hid-over-i2c takes VDD, not VCC supply. Fix copy-pasta from other boards which use elan,ekth3000 with valid VCC: sc7180-trogdor-lazor-limozeen-nots-r4.dtb: trackpad@2c: 'vcc-supply' does not match any of the regexes: 'pinctrl-[0-9]+' Fixes: 2c26adb8dbab ("arm64: dts: qcom: Add sc7180-lazor-limozeen skus") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230312183622.460488-3-krzysztof.kozlowski@linaro.org commit de88b1759b35086d5e63736fb604ea2d06486b1a Author: Krzysztof Kozlowski Date: Sun Mar 12 19:36:16 2023 +0100 arm64: dts: qcom: sc7280-herobrine-villager: correct trackpad supply The hid-over-i2c takes VDD, not VCC supply. Fix copy-pasta from other Herobrine boards which use elan,ekth3000 with valid VCC: sc7280-herobrine-villager-r1-lte.dtb: trackpad@2c: 'vcc-supply' does not match any of the regexes: 'pinctrl-[0-9]+' Fixes: ee2a62116015 ("arm64: dts: qcom: sc7280: Add device tree for herobrine villager") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230312183622.460488-2-krzysztof.kozlowski@linaro.org commit 0d8d77228aa1efec69f92ef92e1cd9270c1151c4 Author: Krzysztof Kozlowski Date: Sun Mar 12 19:36:15 2023 +0100 arm64: dts: qcom: sda660-inforce: correct key node name gpio-key bindings expect children to be named with generic prefix: sda660-inforce-ifc6560.dtb: gpio-keys: 'volup' does not match any of the regexes: ... Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230312183622.460488-1-krzysztof.kozlowski@linaro.org commit 7a888e143f0c87017d91490ea9d0ecc2dc21f2a9 Author: Yang Xiwen Date: Fri Mar 10 22:33:30 2023 +0800 arm64: dts: qcom: msm8916-yiming-uz801v3: Add initial device tree This commit adds support for the uz801 v3.0 WiFi/LTE dongle made by Henan Yiming Technology Co., Ltd. based on MSM8916. Note: The original firmware does not support 64-bit OS. It is necessary to flash 64-bit TZ firmware to boot arm64. Currently supported: - All CPU cores - Buttons - LEDs - Modem - SDHC - USB Device Mode - UART Signed-off-by: Yang Xiwen Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/tencent_62395CA0D608DD0078DD3D889F6E4E22BA05@qq.com commit 26c56dbddc304cf7304346df4b25b3be0c086e36 Author: Yang Xiwen Date: Fri Mar 10 22:33:29 2023 +0800 dt-bindings: arm: qcom: Add Yiming LTE dongle uz801-v3.0 (yiming-uz801v3) Add a compatible for Yiming LTE dongle uz801-v3.0 Signed-off-by: Yang Xiwen Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/tencent_61B4697855AD14BA2930AC7B21FFC75C4406@qq.com commit d27580366db0fb6fa1f6b6ca94bc89dcbf9fd496 Author: Yang Xiwen Date: Fri Mar 10 22:33:28 2023 +0800 dt-bindings: vendor-prefixes: Add Henan Yiming Technology Co., Ltd. Henan Yiming Technology Co., Ltd. was established in 2021. The business scope of the company includes: communication equipment (excluding radio control equipment). Link: https://gw.yimingkeji.net Signed-off-by: Yang Xiwen Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/tencent_27DD0718C3FD9C5F7D6E2FBA225CAA760405@qq.com commit 3244442406ff49e8f75a1f2def211c497710570f Author: Stephan Gerhold Date: Thu Mar 9 10:14:52 2023 +0100 arm64: dts: qcom: msm8916: Move WCN compatible to boards On MSM8916 the wireless connectivity functionality (WiFi/Bluetooth) is split into the digital part inside the SoC and the analog RF part inside a supplementary WCN36xx chip. For MSM8916, three different options exist: - WCN3620 (WLAN 802.11 b/g/n 2.4 GHz + Bluetooth) - WCN3660B (WLAN 802.11 a/b/g/n 2.4/5 GHz + Bluetooth) - WCN3680B (WLAN 802.11ac 2.4/5 GHz + Bluetooth) Choosing one of these is up to the board vendor. This means that the compatible belongs into the board-specific DT part so people porting new boards pay attention to set the correct compatible. Right now msm8916.dtsi sets "qcom,wcn3620" as default compatible, which does not work at all for boards that have WCN3660B or WCN3680B. Remove the default compatible from msm8196.dtsi and move it to the board DT as follows: - Boards with only &pronto { status = "okay"; } used the default "qcom,wcn3620" so far. They now set this explicitly for &wcnss_iris. - Boards with &pronto { ... iris { compatible = "qcom,wcn3660b"; }}; already had an override that just moves to &wcnss_iris now. - For msm8916-samsung-a2015-common.dtsi the WCN compatible differs for boards making use of it (a3u: wcn3620, a5u: wcn3660b, e2015: wcn3620) so the definitions move to the board-specific DT part. Since this requires touching all the board DTs, use this as a chance to name the WCNSS-related labels consistently, so everything is grouped properly when sorted alphabetically. No functional change, just clean-up for more clarity & easier porting. Aside from ordering the generated DTBs are identical. Signed-off-by: Stephan Gerhold Reviewed-by: Bryan O'Donoghue Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230309091452.1011776-1-stephan.gerhold@kernkonzept.com commit 5ab6d715c32f6249415bcd1972bae7e6c03636f0 Author: Ian Rogers Date: Mon Mar 20 14:22:34 2023 -0700 perf maps: Add functions to access maps Introduce functions to access struct maps. These functions reduce the number of places reference counting is necessary. While tidying APIs do some small const-ification, in particlar to unwind_libunwind_ops. Committer notes: Fixed up tools/perf/util/unwind-libunwind.c: - return ops->get_entries(cb, arg, thread, data, max_stack); + return ops->get_entries(cb, arg, thread, data, max_stack, best_effort); Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230320212248.1175731-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit d82dcd9e21b77d338dc4875f3d4111f0db314a7c Author: Roberto Sassu Date: Fri Mar 31 14:32:18 2023 +0200 reiserfs: Add security prefix to xattr name in reiserfs_security_write() Reiserfs sets a security xattr at inode creation time in two stages: first, it calls reiserfs_security_init() to obtain the xattr from active LSMs; then, it calls reiserfs_security_write() to actually write that xattr. Unfortunately, it seems there is a wrong expectation that LSMs provide the full xattr name in the form 'security.'. However, LSMs always provided just the suffix, causing reiserfs to not write the xattr at all (if the suffix is shorter than the prefix), or to write an xattr with the wrong name. Add a temporary buffer in reiserfs_security_write(), and write to it the full xattr name, before passing it to reiserfs_xattr_set_handle(). Also replace the name length check with a check that the full xattr name is not larger than XATTR_NAME_MAX. Cc: stable@vger.kernel.org # v2.6.x Fixes: 57fe60df6241 ("reiserfs: add atomic addition of selinux attributes during inode creation") Signed-off-by: Roberto Sassu Signed-off-by: Paul Moore commit c0d0ce9b5a851895f34fd401c9dddc70616711a4 Author: Xinghui Li Date: Mon Apr 3 17:52:00 2023 +0800 KVM: SVM: Remove a duplicate definition of VMCB_AVIC_APIC_BAR_MASK VMCB_AVIC_APIC_BAR_MASK is defined twice with the same value in svm.h, which is meaningless. Delete the duplicate one. Fixes: 391503528257 ("KVM: x86: SVM: move avic definitions from AMD's spec to svm.h") Signed-off-by: Xinghui Li Reviewed-by: Like Xu Link: https://lore.kernel.org/r/20230403095200.1391782-1-korantwork@gmail.com [sean: tweak shortlog] Signed-off-by: Sean Christopherson commit 750e1a226cd73930f9e66ad897b1fe13acb336e2 Merge: 194f8692302cb 5962c2a527b52 Author: Mark Brown Date: Tue Apr 4 18:40:48 2023 +0100 ASoC: SOF: core/Intel: Introduce DSPless mode Merge series from Peter Ujfalusi : This series will add support for SOF Linux stack to run without using the DSP. DSPless mode provides a good tool for verification that the hardware itself works correctly by taking the DSP use out from the picture. It can only work with interfaces which supports this mode: Intel HDA at the moment but with LNL it could be possible to support other audio interfaces. The main driver for this mode is to be able to test programming sequences, low-level code and for low-level verification of a platform. The feature is not targetted for end-users and it will not make the SOF stack to work on hardware without DSP, but it is giving us a tool to debug and enable platforms earlier (when for example t he firmware is not mature enough). commit 6b79a428c02769f2a11f8ae76bf866226d134887 Author: Mike Snitzer Date: Tue Apr 4 13:34:28 2023 -0400 dm integrity: call kmem_cache_destroy() in dm_integrity_init() error path Otherwise the journal_io_cache will leak if dm_register_target() fails. Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit 6827af4a9a9f5bb664c42abf7c11af4978d72201 Author: Mike Snitzer Date: Tue Apr 4 11:59:00 2023 -0400 dm clone: call kmem_cache_destroy() in dm_clone_init() error path Otherwise the _hydration_cache will leak if dm_register_target() fails. Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit b6bcb84446810df0c9364ee6e23e07866316beaf Author: Mikulas Patocka Date: Tue Apr 4 11:22:10 2023 -0400 dm error: add discard support Add io_err_io_hints() and set discard limits so that the zero target advertises support for discards. The error target will return -EIO for discards. This is useful when the user combines dm-error with other discard-supporting targets in the same table; without dm-error support, discards would be disabled for the whole combined device. Signed-off-by: Mikulas Patocka Tested-by: Milan Broz Signed-off-by: Mike Snitzer commit 00065f925efb077ade3e7fea49150d798cf87d05 Author: Mikulas Patocka Date: Tue Apr 4 11:19:33 2023 -0400 dm zero: add discard support Add zero_io_hints() and set discard limits so that the zero target advertises support for discards. The zero target will ignore discards. This is useful when the user combines dm-zero with other discard-supporting targets in the same table; without dm-zero support, discards would be disabled for the whole combined device. Signed-off-by: Mikulas Patocka Tested-by: Milan Broz Signed-off-by: Mike Snitzer commit 85c938e8914f8f0e276b8e82d4f2e4bcab044e96 Author: Mikulas Patocka Date: Tue Apr 4 11:14:26 2023 -0400 dm table: allow targets without devices to set ->io_hints In dm_calculate_queue_limits, add call to ->io_hints hook if the target doesn't provide ->iterate_devices. This is needed so the "error" and "zero" targets may support discards. The 2 following commits will add their respective discard support. Signed-off-by: Mikulas Patocka Tested-by: Milan Broz Signed-off-by: Mike Snitzer commit 074c44664f60f62ef932eae9ee89d663563cf307 Author: Michael Weiß Date: Wed Mar 1 12:34:15 2023 +0100 dm verity: emit audit events on verification failure and more dm-verity signals integrity violations by returning I/O errors to user space. To identify integrity violations by a controlling instance, the kernel audit subsystem can be used to emit audit events to user space. Analogous to dm-integrity, we also use the dm-audit submodule allowing to emit audit events on verification failures of metadata and data blocks as well as if max corrupted errors are reached. The construction and destruction of verity device mappings are also relevant for auditing a system. Thus, those events are also logged as audit events. Tested by starting a container with the container manager (cmld) of GyroidOS which uses a dm-verity protected rootfs image root.img mapped to /dev/mapper/-root. One block was manipulated in the underlying image file and repeated reads of the verity device were performed again until the max corrupted errors is reached, e.g.: dd if=/dev/urandom of=root.img bs=512 count=1 seek=1000 for i in range {1..101}; do \ dd if=/dev/mapper/-root of=/dev/null bs=4096 \ count=1 skip=1000 \ done The resulting audit log looks as follows: type=DM_CTRL msg=audit(1677618791.876:962): module=verity op=ctr ppid=4876 pid=29102 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=44 comm="cmld" exe="/usr/sbin/cml/cmld" subj=unconfined dev=254:3 error_msg='success' res=1 type=DM_EVENT msg=audit(1677619463.786:1074): module=verity op=verify-data dev=7:0 sector=1000 res=0 ... type=DM_EVENT msg=audit(1677619596.727:1162): module=verity op=verify-data dev=7:0 sector=1000 res=0 type=DM_EVENT msg=audit(1677619596.731:1163): module=verity op=max-corrupted-errors dev=254:3 sector=? res=0 Signed-off-by: Michael Weiß Acked-by: Paul Moore Signed-off-by: Mike Snitzer commit 5eac0bdc787e3252869a49b50d90b52b830aed35 Author: Geert Uytterhoeven Date: Fri Mar 31 09:52:30 2023 +0200 of: address: Reshuffle to remove forward declarations Reshuffle the code to get rid of the forward declarations, which improves readability. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/b8701c04d27e51618444a747c4f4be5cc889ce28.1680248888.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit 65b6b046e2b4cec2bd9d4849324d319122d6f2b2 Author: Geert Uytterhoeven Date: Fri Mar 31 09:52:29 2023 +0200 of: address: Fix documented return value of of_pci_range_to_resource() of_pci_range_to_resource() returns a negative instead of a positive error code. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/bcdaa9332e9c6dfa27af68d79fda121eac2975dc.1680248888.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit 7be5e675c86d6c473220a0c9e9420a1fdb0d04da Author: Geert Uytterhoeven Date: Fri Mar 31 09:52:28 2023 +0200 of: address: Document return value of of_address_to_resource() Add the missing return value documentation to the linuxdoc comment block for the of_address_to_resource() function. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/61ffcb5e87511dfa21af169efd04806101c48b8a.1680248888.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit dc8ea9204b242cd93e63585396ac7d13f622802d Author: Conor Dooley Date: Thu Mar 30 18:32:56 2023 +0100 dt-bindings: move cache controller bindings to a cache directory There's a bunch of bindings for (mostly l2) cache controllers scattered to the four winds, move them to a common directory. I renamed the freescale l2cache.txt file, as while that might make sense when the parent dir is fsl, it's confusing after the move. The two Marvell bindings have had a "marvell," prefix added to match their compatibles. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20230330173255.109731-1-conor@kernel.org Signed-off-by: Rob Herring commit 0291b586ef5df4fe9a626d01dbd53e01f8c41e3c Author: Neil Armstrong Date: Mon Apr 3 09:24:06 2023 +0200 dt-bindings: timer: convert timer/amlogic,meson6-timer.txt to dt-schema Convert the Amlogic Meson6 SoCs Timer Controller bindings to dt-schema. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20221117-b4-amlogic-bindings-convert-v5-1-63781bed4452@linaro.org Signed-off-by: Rob Herring commit 41d7e4f257f328d0131c46fb6092b08087721efd Author: Krzysztof Kozlowski Date: Sun Mar 26 17:57:19 2023 +0200 dt-bindings: vendor-prefixes: document Novatek Document Novatek vendor prefix already used for Novatek nt36672a panel. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230326155719.91780-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit ef998faf9fc343fd170dbfe3eafcb82f80a4cfe6 Author: Peng Fan Date: Thu Mar 23 20:39:07 2023 +0800 dt-bindings: crypto: sec-v4.0-mon: add snvs power off support Add SNVS power off support. The SNVS_LP LPCR register could drive signal to PMIC to turn off system power. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20230323123907.103719-1-peng.fan@oss.nxp.com Signed-off-by: Rob Herring commit 68b8960a65e341294766dab276e60aba51cd852d Author: Rob Herring Date: Wed Mar 22 12:34:48 2023 -0500 dt-bindings: mailbox: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230322173449.3970718-1-robh@kernel.org Signed-off-by: Rob Herring commit a65f2cf65f6a7df405264aadd1379c47f0a4994c Author: Rob Herring Date: Wed Mar 22 12:35:07 2023 -0500 dt-bindings: reset: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Reviewed-by: Philipp Zabel Reviewed-by: Krzysztof Kozlowski Acked-by: Florian Fainelli # Broadcom Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230322173508.3971182-1-robh@kernel.org Signed-off-by: Rob Herring commit fcb52d7deafe04eb6cc26ff89c0b3c9e3acd849a Author: Rob Herring Date: Mon Mar 20 18:47:18 2023 -0500 dt-bindings: input: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Mattijs Korpershoek # for mediatek,mt6779-keypad.yaml Link: https://lore.kernel.org/r/20230320234718.2930154-1-robh@kernel.org Signed-off-by: Rob Herring commit 81c00b588116abc524668070eb3dd7922632c033 Author: Rob Herring Date: Fri Mar 17 18:36:42 2023 -0500 dt-bindings: watchdog: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Acked-by: Nicolas Ferre Acked-by: Hector Martin Acked-by: Guenter Roeck Acked-by: Florian Fainelli #brcm,bcm7038-wdt.yaml Acked-by: Jernej Skrabec Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230317233643.3969019-1-robh@kernel.org Signed-off-by: Rob Herring commit f550162395e6068f7726a1a0255c7374056e21ef Author: Rob Herring Date: Mon Mar 20 18:39:11 2023 -0500 dt-bindings: PCI: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230320233911.2920364-1-robh@kernel.org Signed-off-by: Rob Herring commit ff583dc43dc8b62c9ec639604adae641ba38a91d Author: Ian Rogers Date: Mon Mar 20 14:22:33 2023 -0700 perf maps: Remove rb_node from struct map struct map is reference counted, having it also be a node in an red-black tree complicates the reference counting. Switch to having a map_rb_node which is a red-block tree node but points at the reference counted struct map. This reference is responsible for a single reference count. Committer notes: Fixed up tools/perf/util/unwind-libunwind-local.c to use map_rb_node as well. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230320212248.1175731-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 72e418c478c7b978d12a13d15fefb8c9d439b371 Author: Rob Herring Date: Mon Mar 27 12:01:22 2023 -0500 dt-bindings: reserved-memory: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Reviewed-by: Thierry Reding Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230327170122.4103518-1-robh@kernel.org Signed-off-by: Rob Herring commit 5bae6ac11938dc8215503440a7166fa59fa66c6e Author: Rob Herring Date: Mon Mar 27 12:00:53 2023 -0500 dt-bindings: ata: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Acked-by: Damien Le Moal Reviewed-by: Geert Uytterhoeven Reviewed-by: Sergey Shtylyov Link: https://lore.kernel.org/r/20230327170053.4100949-1-robh@kernel.org Signed-off-by: Rob Herring commit 43d78445da006ef8d81684b2ade6f4cf22d01b2f Author: Rob Herring Date: Mon Mar 20 18:39:27 2023 -0500 dt-bindings: interrupt-controller: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Reviewed-by: Linus Walleij Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230320233928.2920693-1-robh@kernel.org Signed-off-by: Rob Herring commit 83720209961f5cfed17214bc78978a02e3414a41 Author: Ian Rogers Date: Mon Mar 20 14:22:32 2023 -0700 perf map: Move map list node into symbol Using a perf map as a list node is only done in symbol. Move the list_node struct into symbol as a single pointer to the map. This makes reference count behavior more obvious and easy to check. Committer notes: Some changes to reduce the number of lines touched by keeping, for instance, the 'new_map' variable and setting it to new_node->map, so that we keep more of the project history in place and keep as much as possible the value of the 'git blame' tool. Also use map__zput() when putting a struct members, so that when we free the container struct we can get use-after-free errors as NULL pointer derefs sometimes. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230320212248.1175731-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b94c0ebb1ec752016a3e41bfb66bb51ea905e533 Author: Heiko Carstens Date: Mon Mar 27 11:37:28 2023 +0200 s390: 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. Enabling this feature is quite expensive: e.g. after instrumenting the getpid() system call function to have a 4kb stack the result is an increased runtime of the system call by a factor of 3. Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 22ca1e7738025ae38d07c05bae2af934b1b2c11f Author: Heiko Carstens Date: Mon Mar 27 11:37:27 2023 +0200 s390: move on_thread_stack() to processor.h As preparation for the stackleak feature move on_thread_stack() to processor.h like x86. Also make it __always_inline, and slightly optimize it by reading current task's kernel stack pointer from lowcore. Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 60afa6d1662c08dd266463231acc129488fffe6e Author: Heiko Carstens Date: Mon Mar 27 11:37:26 2023 +0200 s390: remove arch_early_irq_init() Allocate early async stack like other early stacks and get rid of arch_early_irq_init(). This way the async stack is allocated earlier, and handled like all other stacks. Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 23be82f0deb8ce02fbb94d9baac7c2434d5e217e Author: Heiko Carstens Date: Mon Mar 27 11:37:25 2023 +0200 s390/stacktrace: remove call_on_stack_noreturn() There is no user left of call_on_stack_noreturn() - remove it. Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 944c78376a39b86a57c0b36c73d1316bd97846bc Author: Heiko Carstens Date: Mon Mar 27 11:37:24 2023 +0200 s390: use init_thread_union aka initial stack for the first process s390 is the only architecture which switches from the initial stack to a later on allocated different stack for the first process. This is (at least) problematic for the stackleak feature, which instruments functions to save the current stackpointer within the task structure of the running process. The stackleak code compares stack pointers of the current process - and doesn't expect that the kernel stack of a task can change. Even though the stackleak feature itself will not cause any harm, the assumption about kernel stacks being consistent is there, and only s390 doesn't follow that. Therefore switch back to use init_thread_union, just like all other architectures. Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit cfea9bc78bc3f99abcef3efbe7631d3ed3b70406 Author: Heiko Carstens Date: Mon Mar 27 11:37:23 2023 +0200 s390/stack: set lowcore kernel stack pointer early Make sure the lowcore kernel stack pointer reflects the kernel stack of the current task as early as possible, instead of having a NULL pointer there. Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit c2c3258fb55a0f51ea4a3c2cd4c29b23a64b151e Author: Heiko Carstens Date: Mon Mar 27 11:37:22 2023 +0200 s390/stack: use STACK_INIT_OFFSET where possible Make STACK_INIT_OFFSET also available for assembler code, and use it everywhere instead of open-coding it at several places. Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit e6badee94027a4e9586e6b5d087bc96e9e4d554c Author: Heiko Carstens Date: Mon Mar 27 11:37:21 2023 +0200 s390/dumpstack: simplify in stack logic code The pattern for all in__stack() functions is the same; especially also the size of all stacks is the same. Simplify the code by passing only the stack address to the generic in_stack() helper, which then can assume a THREAD_SIZE sized stack. Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 0f2d4fee91e9bdba9ee4f2cfdc9d7cddb033d4a5 Author: Harald Freudenberger Date: Wed Mar 22 15:22:11 2023 +0100 s390/zcrypt: simplify prep of CCA key token The preparation of the key data struct for a CCA RSA ME operation had some improvement to skip leading zeros in the key's exponent. However, all supported CCA cards nowadays support leading zeros in key tokens. So for simplifying the CCA key preparing code, this patch simply removes this optimization code. Signed-off-by: Harald Freudenberger Reviewed-by: Juergen Christ Reviewed-by: Holger Dengler Signed-off-by: Vasily Gorbik commit bd922f33d4a3255cc33eb7082c47d973ed1da75d Author: Harald Freudenberger Date: Wed Mar 22 15:15:08 2023 +0100 s390/zcrypt: remove unused ancient padding code There was some ancient code which padded the results of a clear key ME or CRT operation with some PKCS 1.2 header. According to the comment this was only needed by crypto cards older than the CEX2. These cards are not supported any more and so this patch removes this obscure result padding code. Signed-off-by: Harald Freudenberger Reviewed-by: Juergen Christ Reviewed-by: Holger Dengler Signed-off-by: Vasily Gorbik commit b46650d56bd31dca8b09b5670ee9441a8f7b8869 Author: Vasily Gorbik Date: Tue Mar 28 10:00:33 2023 +0200 s390: make extables read-only Currently, exception tables are marked as ro_after_init. However, since they are sorted during compile time using scripts/sorttable, they can be moved to RO_DATA using the RO_EXCEPTION_TABLE_ALIGN macro, which is specifically designed for this purpose. Suggested-by: Heiko Carstens Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 385bf43c48ffe44af881039779a6be09ac8a77c8 Author: Vasily Gorbik Date: Tue Mar 28 11:09:09 2023 +0200 s390/entry: rely on long-displacement facility Since commit 4efd417f298b ("s390: raise minimum supported machine generation to z10"), the long-displacement facility is assumed and required for the kernel. Clean up a couple of places in the entry code, where long-displacement could be used directly instead of using a base register. However, there are still a few other places where a base register has to be used to extend short-displacement for the second lowcore page access. Notably, boot/head.S still has to be built for z900, and in mcck_int_handler, spt and lbear, which don't have long-displacements, but need to access save areas at the second lowcore page. Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit f62f8b716da158f94bf191ea89b34d01bf94b261 Merge: 85206bf95313c 49d6e68f66132 Author: Vasily Gorbik Date: Tue Apr 4 18:29:28 2023 +0200 Merge branch 'uaccess-inline-asm-cleanup' into features Heiko Carstens says: =================== There are a couple of oddities within the s390 uaccess library functions. Therefore cleanup the whole uaccess.c file. There is no functional change, only improved readability. The output of "objdump -Dr" was always compared before/after each patch to make sure that the generated object file is identical, if that could be expected. Therefore the series also includes more patches than really required to cleanup the code. Furthermore the kunit usercopy tests also still pass. =================== Signed-off-by: Vasily Gorbik commit 49d6e68f66132ee521d587ce97645ed2d3183d90 Author: Heiko Carstens Date: Fri Mar 24 15:00:24 2023 +0100 s390/uaccess: remove extra blank line In order to get uaccess.c (nearly) checkpatch warning free remove an extra blank line: CHECK: Blank lines aren't necessary before a close brace '}' + +} Reviewed-by: Gerald Schaefer Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit c3bd834328a6b642cfebc8a1a6cd5e5447cbbd12 Author: Heiko Carstens Date: Fri Mar 24 15:00:23 2023 +0100 s390/uaccess: get rid of not needed local variable Get rid of the not needed val local variable and pass the constant value directly as operand value. In addition this turns the val operand into an input operand, since it is not changed within the inline assemblies. This in turn requires also to add the earlyclobber contraint modifier to all output operands, since the (former) val operand is used after all output variants have been modified. The usercopy kunit tests still pass after this change. Reviewed-by: Gerald Schaefer Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 7f65d18329a2546ce6f64ac6bf141c38b15c2ab3 Author: Heiko Carstens Date: Fri Mar 24 15:00:22 2023 +0100 s390/uaccess: rename tmp1 and tmp2 variables Rename tmp1 and tmp2 variables to more meaningful val (for value) and rem (for remainder). Except for debug sections the output of "objdump -Dr" of the uaccess object file is identical before/after this change. Reviewed-by: Gerald Schaefer Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit afdcc2ce3970ccad0ec4fb2d2c614e444c59f770 Author: Heiko Carstens Date: Fri Mar 24 15:00:21 2023 +0100 s390/uaccess: sort EX_TABLE list for inline assemblies Reviewed-by: Gerald Schaefer Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 4e0b0ad45c6616d85564cb27dbae04a962d068bd Author: Heiko Carstens Date: Fri Mar 24 15:00:20 2023 +0100 s390/uaccess: rename/sort labels in inline assemblies Rename and sort labels in uaccess inline assemblies to increase readability. In addition have only one EX_TABLE entry per line - also to increase readability. Except for debug sections the output of "objdump -Dr" of the uaccess object file is identical before/after this change. Reviewed-by: Gerald Schaefer Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit b96adf0d03e01fa10483f38e302a5f93bb733ed0 Author: Heiko Carstens Date: Fri Mar 24 15:00:19 2023 +0100 s390/uaccess: remove unused label in inline assemblies Remove an unused label in all three uaccess inline assemblies. Reviewed-by: Gerald Schaefer Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 10679e4d9848a04694eb99ec7390a6585d1b7ca9 Author: Heiko Carstens Date: Fri Mar 24 15:00:18 2023 +0100 s390/uaccess: use symbolic names for inline assembly operands Improve readability of the uaccess inline assemblies by using symbolic names for all input and output operands. Except for debug sections the output of "objdump -Dr" of the uaccess object file is identical before/after this change. Reviewed-by: Gerald Schaefer Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit dc67c7837a832952459c4f7829e89b9d8d15f420 Author: Ian Rogers Date: Mon Apr 3 13:35:45 2023 -0700 perf jit: Fix a few memory leaks As reported by leak sanitizer. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Brian Robbins Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yuan Can Link: https://lore.kernel.org/r/20230403203545.1872196-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3ad45105dc44ca8419441032760c04d81504c0e6 Author: Ian Rogers Date: Mon Apr 3 14:10:20 2023 -0700 perf build: Allow C++ demangle without libelf The cxa demangle support isn't dependent on libelf and so we no longer need to disable demangling if libelf isn't present. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230403211021.1892231-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 75a616c6d332342291c45b0381abe00bd597036c Author: Ian Rogers Date: Mon Apr 3 11:40:33 2023 -0700 perf srcline: Avoid addr2line SIGPIPEs Ignore SIGPIPEs when addr2line is configured. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Tom Rix Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230403184033.1836023-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2c4b928074839425b64155cb3f6d4e0e5e67e835 Author: Ian Rogers Date: Mon Apr 3 11:40:32 2023 -0700 perf srcline: Support for llvm-addr2line The sentinel value differs for llvm-addr2line. Configure this once and then detect when reading records. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Tom Rix Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230403184033.1836023-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b3801e7912316c7a100a05de152a80df4121871e Author: Ian Rogers Date: Mon Apr 3 11:40:31 2023 -0700 perf srcline: Simplify addr2line subprocess Don't wrap stdin and stdout of subprocess with streams, use the api/io library for buffering. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Tom Rix Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230403184033.1836023-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit c9dc580c43b8d83de0c14158e826f79e41098822 Author: Ian Rogers Date: Mon Apr 3 11:40:30 2023 -0700 tools api: Add io__getline Reads a line to allocated memory up to a newline following the getline API. Committer notes: It also adds this new function to the 'api io' 'perf test' entry: $ perf test "api io" 64: Test api io : Ok $ Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Tom Rix Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230403184033.1836023-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 98b7ce0ed8f7a93ac0f6e0a0576c70093b669a71 Author: Namhyung Kim Date: Fri Mar 31 13:29:49 2023 -0700 perf intel-pt: Use perf_pmu__scan_file_at() if possible Intel-PT calls perf_pmu__scan_file() a lot, let's use relative address when it accesses multiple files at one place. Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Acked-by: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230331202949.810326-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3a69672e881afc1dcc8ed60272197af8958b5404 Author: Namhyung Kim Date: Fri Mar 31 13:29:48 2023 -0700 perf pmu: Add perf_pmu__{open,scan}_file_at() These two helpers will also use openat() to reduce the overhead with relative pathnames. Convert other functions in pmu_lookup() to use the new helpers. Committer testing: Before: ⬢[acme@toolbox perf-tools-next]$ perf bench internals pmu-scan # Running 'internals/pmu-scan' benchmark: Computing performance of sysfs PMU event scan for 100 times Average PMU scanning took: 2729.040 usec (+- 7.117 usec) ⬢[acme@toolbox perf-tools-next]$ After: ⬢[acme@toolbox perf-tools-next]$ perf bench internals pmu-scan # Running 'internals/pmu-scan' benchmark: Computing performance of sysfs PMU event scan for 100 times Average PMU scanning took: 2419.870 usec (+- 9.057 usec) ⬢[acme@toolbox perf-tools-next]$ Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230331202949.810326-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 463786658d234df43ad1d9dfcf8aba25176d071c Author: Namhyung Kim Date: Fri Mar 31 13:29:47 2023 -0700 perf pmu: Use relative path in setup_pmu_alias_list() Likewise, x86 needs to traverse the PMU list to build alias. Let's use the new helpers to use relative paths. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230331202949.810326-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b39094d37d0c1f6399a1a1a24453ff48b4a0c7a6 Author: Namhyung Kim Date: Fri Mar 31 13:29:46 2023 -0700 perf pmu: Use relative path in perf_pmu__caps_parse() Likewise, it needs to traverse the pmu/caps directory, let's use openat() with the dirfd instead of open() using the absolute path. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Link: https://lore.kernel.org/r/20230331202949.810326-2-namhyung@kernel.org Cc: Peter Zijlstra Cc: Adrian Hunter Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Ingo Molnar Cc: Leo Yan Cc: Kan Liang Cc: LKML Cc: linux-perf-users@vger.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e293a5e816c03b57f07078db60497933f3400b2a Author: Namhyung Kim Date: Fri Mar 31 13:29:45 2023 -0700 perf pmu: Use relative path for sysfs scan The PMU information is in the kernel sysfs so it needs to scan the directory to get the whole information like event aliases, formats and so on. During the traversal, it opens a lot of files and directories like below: dir = opendir("/sys/bus/event_source/devices"); while (dentry = readdir(dir)) { char buf[PATH_MAX]; snprintf(buf, sizeof(buf), "%s/%s", "/sys/bus/event_source/devices", dentry->d_name); fd = open(buf, O_RDONLY); ... } But this is not good since it needs to copy the string to build the absolute pathname, and it makes redundant pathname walk (from the /sys) unnecessarily. We can use openat(2) to open the file in the given directory. While it's not a problem ususally, it can be a problem when the kernel has contentions on the sysfs. Add a couple of new helper to return the file descriptor of PMU directory so that it can use it with relative paths. * perf_pmu__event_source_devices_fd() - returns a fd for the PMU root ("/sys/bus/event_source/devices") * perf_pmu__pathname_fd() - returns a fd for "/" under the PMU root Now the above code can be converted something like below: dirfd = perf_pmu__event_source_devices_fd(); dir = fdopendir(dirfd); while (dentry = readdir(dir)) { fd = openat(dirfd, dentry->d_name, O_RDONLY); ... } Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230331202949.810326-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f6a7bbbfe61cc34c4e443141d3eb110a80473d8c Author: Namhyung Kim Date: Fri Mar 31 13:29:44 2023 -0700 perf bench: Add pmu-scan benchmark The pmu-scan benchmark will repeatedly scan the sysfs to get the available PMU information. $ ./perf bench internals pmu-scan # Running 'internals/pmu-scan' benchmark: Computing performance of sysfs PMU event scan for 100 times Average PMU scanning took: 6850.990 usec (+- 48.445 usec) Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230331202949.810326-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit eec1131091c88e5e72cb012a2e3b3789fbb53c15 Author: Namhyung Kim Date: Fri Mar 31 13:29:43 2023 -0700 perf pmu: Add perf_pmu__destroy() function It seems there's no function to delete the perf pmu struct. Add the perf_pmu__destroy() to do the job. While at it, add some more helper functions to delete pmu aliases and caps. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230331202949.810326-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 66c9598bd8916c6c1319d0100ac916cac89d4b0e Author: Namhyung Kim Date: Fri Mar 31 13:29:42 2023 -0700 perf tools: Fix a asan issue in parse_events_multi_pmu_add() In the parse_events_multi_pmu_add() it passes the 'config' variable twice to parse_events_term__num() - one for config and another for loc_term. I'm not sure about the second one as it's converted to YYLTYPE variable. Asan reports it like below: In function ‘parse_events_term__num’, inlined from ‘parse_events_multi_pmu_add’ at util/parse-events.c:1602:6: util/parse-events.c:2653:64: error: array subscript ‘YYLTYPE[0]’ is partly outside array bounds of ‘char[8]’ [-Werror=array-bounds] 2653 | .err_term = loc_term ? loc_term->first_column : 0, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ util/parse-events.c: In function ‘parse_events_multi_pmu_add’: util/parse-events.c:1587:15: note: object ‘config’ of size 8 1587 | char *config; | ^~~~~~ cc1: all warnings being treated as errors Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230331202949.810326-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 00462d8eaca4eb48e4c07a9a9b49cea2a871fd35 Author: Namhyung Kim Date: Fri Mar 31 13:29:41 2023 -0700 perf list: Use relative path for tracepoint scan Committer notes: Added missing #include for the close() prototype to fix this on Alma Linux 8: 1 21.54 almalinux:8 : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-16) (GCC) util/print-events.c: In function 'print_tracepoint_events': util/print-events.c:103:4: error: implicit declaration of function 'close'; did you mean 'clone'? [-Werror=implicit-function-declaration] close(evt_fd); ^~~~~ clone Also use the newly added scandirat feature test to check if that function is available, providing a HAVE_SCANDIRAT_SUPPORT conditional warning to the user if it isn't available. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230331202949.810326-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9e03608e93858620317d54bc88a9a0069bce003d Author: Arnaldo Carvalho de Melo Date: Tue Apr 4 11:05:57 2023 -0300 tools build: Add a feature test for scandirat(), that is not implemented so far in musl and uclibc We use it just when listing tracepoint events, and for root, so just emit a warning about it to get users to ask the library maintainers to implement it, as suggested in this systemd ticket: https://github.com/systemd/casync/issues/129 Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZCwv4z5Dh%2FdHUMG6@kernel.org/ Signed-off-by: Arnaldo Carvalho de Melo commit b903a6c5aaa862f8b88f4be4431ccca3b6fbc187 Author: Sameer Pujar Date: Mon Feb 13 10:14:34 2023 +0530 arm64: tegra: Audio codec support on Jetson AGX Orin Jetson AGX Orin has onboard RT5640 audio codec. This patch adds the codec device node and the bindings to I2S1 interface. Signed-off-by: Sameer Pujar Signed-off-by: Thierry Reding commit 62e37c86bf0718e1ec0156c7a88a43ced6cdf201 Author: Jason Gunthorpe Date: Fri Mar 31 12:32:27 2023 -0300 iommufd/selftest: Cover domain unmap with huge pages and access Inspired by the syzkaller reproducer check the batch carry path with a simple test. Link: https://lore.kernel.org/r/4-v1-ceab6a4d7d7a+94-iommufd_syz_jgg@nvidia.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 539813e4184a3ee4125123cc39cc9fc29691d299 Author: Stephen Smalley Date: Mon Apr 3 12:37:53 2023 -0400 selinux: stop returning node from avc_insert() The callers haven't used the returned node since commit 21193dcd1f3570dd ("SELinux: more careful use of avd in avc_has_perm_noaudit") and the return value assignments were removed in commit 0a9876f36b08706d ("selinux: Remove redundant assignments"). Stop returning the node altogether and make the functions return void. Signed-off-by: Stephen Smalley PM: minor subj tweak, repair whitespace damage Signed-off-by: Paul Moore commit b22fd0b9639ed61e379b3b9bba00629ebf8e6946 Author: Diogo Ivo Date: Mon Nov 28 16:28:49 2022 +0000 drm/tegra: dsi: Clear enable register if powered by bootloader In cases where the DSI module is left on by the bootloader some panels may fail to initialize if the enable register is not cleared before the panel's initialization sequence is sent, so clear it if that is the case. Signed-off-by: Diogo Ivo Signed-off-by: Thierry Reding commit e752eef028c363445f3fc06221ed479e71a0e971 Author: Cai Huoqing Date: Thu Sep 16 15:37:21 2021 +0800 drm/tegra: plane: Improve use of dev_err_probe() Return dev_err_probe() directly, because the return value of dev_err_probe() is the appropriate error code, and it can reduce code size, simplify the code. Signed-off-by: Cai Huoqing Signed-off-by: Thierry Reding commit fc75e4fcbd1e4252a0481ebb23cd4516c127a8e2 Author: Cai Huoqing Date: Thu Sep 16 18:56:40 2021 +0800 drm/tegra: dsi: Make use of the helper function dev_err_probe() When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. And using dev_err_probe() can reduce code size, the error value gets printed. Signed-off-by: Cai Huoqing Signed-off-by: Thierry Reding commit d4281c016d84d56abd5fc19eb0e24ca7c5138e8c Author: Cai Huoqing Date: Fri Sep 17 10:07:41 2021 +0800 drm/tegra: sor: Make use of the helper function dev_err_probe() When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. And using dev_err_probe() can reduce code size, the error value gets printed. Reported-by: kernel test robot Signed-off-by: Cai Huoqing Signed-off-by: Thierry Reding commit 3105e42c75e0f80a6933e29291a94f669b869dbd Author: Deepak R Varma Date: Thu Mar 2 01:18:06 2023 +0530 drm/tegra: sor: Remove redundant error logging A call to platform_get_irq() already prints an error on failure within its own implementation. So printing another error based on its return value in the caller is redundant and should be removed. The clean up also makes if condition block braces unnecessary. Remove that as well. Issue identified using platform_get_irq.cocci coccicheck script. Signed-off-by: Deepak R Varma Reviewed-by: Ashutosh Dixit Signed-off-by: Thierry Reding commit 13fcbcb97d05be14c5ada46b5b6cf71f8c96ad50 Author: Lee Jones Date: Fri Mar 17 08:16:50 2023 +0000 drm/tegra: dc: Remove set but unused variable 'state' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/tegra/dc.c: In function ‘tegra_crtc_calculate_memory_bandwidth’: drivers/gpu/drm/tegra/dc.c:2384:38: warning: variable ‘old_state’ set but not used [-Wunused-but-set-variable] Cc: Thierry Reding Cc: David Airlie Cc: Daniel Vetter Cc: Jonathan Hunter Cc: Philipp Zabel Cc: dri-devel@lists.freedesktop.org Cc: linux-tegra@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Thierry Reding commit f75d19827b731c6f24930ef77e5a46cf2242bc68 Author: Christian König Date: Wed Mar 22 11:39:15 2023 +0100 drm/tegra: Allow compile test on !ARM v2 This compile tests on x86 just perfectly fine. v2: fix missing include complained by kernel test robot Signed-off-by: Christian König CC: Thierry Reding CC: Jonathan Hunter CC: linux-tegra@vger.kernel.org Signed-off-by: Thierry Reding commit ceb928be5cab32043f230bcb1adeb0a9a9b8f0f2 Author: Andy Shevchenko Date: Thu Mar 30 19:24:31 2023 +0300 PCI: Document pci_bus_for_each_resource() There might be confusion about why pci_bus_for_each_resource() uses Logical OR. Document the entire macro and explain how it works and why the conditional needs to be like that. Link: https://lore.kernel.org/r/20230330162434.35055-5-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Bjorn Helgaas commit 09cc900632400079619e9154604fd299c2cc9a5a Author: Mika Westerberg Date: Thu Mar 30 19:24:30 2023 +0300 PCI: Introduce pci_dev_for_each_resource() Instead of open-coding it everywhere introduce a tiny helper that can be used to iterate over each resource of a PCI device, and convert the most obvious users into it. While at it drop doubled empty line before pdev_sort_resources(). No functional changes intended. Suggested-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230330162434.35055-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński commit 144d204df78e40e6250201e71ef7d0e42d2a13fc Author: Andy Shevchenko Date: Thu Mar 30 19:24:29 2023 +0300 PCI: Introduce pci_resource_n() Introduce pci_resource_n() and replace open-coded implementations of it in pci.h. Link: https://lore.kernel.org/r/20230330162434.35055-3-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Bjorn Helgaas Reviewed-by: Philippe Mathieu-Daudé commit 43bac5158bcc5fe392a17457fda1f8e33a13e458 Merge: 69d286c5293a3 dea8e70f68f41 Author: Mark Brown Date: Tue Apr 4 16:40:21 2023 +0100 spi: qup: Convert to platform remove callback Merge series from Uwe Kleine-König : After fixing the error handling in the .remove() callback of the qup driver, convert it to .remove_new() preparing to make platform driver's remove functions return void. commit cefc0a599b19d8dd0e26d0b2e43311bae7530ca1 Author: Paul E. McKenney Date: Sat Mar 18 12:31:53 2023 -0700 srcu: Fix long lines in srcu_funnel_gp_start() This commit creates an srcu_usage pointer named "sup" as a shorter synonym for the "ssp->srcu_sup" that was bloating several lines of code. Cc: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 6c366522e10f2b5e916b3f08ac042df1a1cd512a Author: Paul E. McKenney Date: Sat Mar 18 10:52:48 2023 -0700 srcu: Fix long lines in srcu_gp_end() This commit creates an srcu_usage pointer named "sup" as a shorter synonym for the "ssp->srcu_sup" that was bloating several lines of code. Cc: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 5ff8319f07db11c3b9347ce1dc0a6d951ae96d29 Author: Paul E. McKenney Date: Sat Mar 18 10:51:50 2023 -0700 srcu: Fix long lines in cleanup_srcu_struct() This commit creates an srcu_usage pointer named "sup" as a shorter synonym for the "ssp->srcu_sup" that was bloating several lines of code. Cc: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit eabe7625f053050e4cecbbe98bd944f7e8eb14f5 Author: Paul E. McKenney Date: Sat Mar 18 09:34:52 2023 -0700 srcu: Fix long lines in srcu_get_delay() This commit creates an srcu_usage pointer named "sup" as a shorter synonym for the "ssp->srcu_sup" that was bloating several lines of code. Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Cc: Christoph Hellwig Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit a7bf4d7c16c1cf9753873879630a5d5169eb3206 Author: Paul E. McKenney Date: Fri Mar 24 09:05:50 2023 -0700 srcu: Check for readers at module-exit time If a given statically allocated in-module srcu_struct structure was ever used for updates, srcu_module_going() will invoke cleanup_srcu_struct() at module-exit time. This will check for the error case of SRCU readers persisting past module-exit time. On the other hand, if this srcu_struct structure never went through a grace period, srcu_module_going() only invokes free_percpu(), which would result in strange failures if SRCU readers persisted past module-exit time. This commit therefore adds a srcu_readers_active() check to srcu_module_going(), splatting if readers have persisted and refraining from invoking free_percpu() in that case. Better to leak memory than to suffer silent memory corruption! [ paulmck: Apply Zhang, Qiang1 feedback on memory leak. ] Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit fd1b3f8e097b7fbbab8ac4a802b24fc23c703dcf Author: Paul E. McKenney Date: Fri Mar 17 21:30:32 2023 -0700 srcu: Move work-scheduling fields from srcu_struct to srcu_usage This commit moves the ->reschedule_jiffies, ->reschedule_count, and ->work fields from the srcu_struct structure to the srcu_usage structure to reduce the size of the former in order to improve cache locality. However, this means that the container_of() calls cannot get a pointer to the srcu_struct because they are no longer in the srcu_struct. This issue is addressed by adding a ->srcu_ssp field in the srcu_usage structure that references the corresponding srcu_struct structure. And given the presence of the sup pointer to the srcu_usage structure, replace some ssp->srcu_usage-> instances with sup->. [ paulmck Apply feedback from kernel test robot. ] Link: https://lore.kernel.org/oe-kbuild-all/202303191400.iO5BOqka-lkp@intel.com/ Suggested-by: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit d20162e0bfc222183a7c94cd00e74b6bbf1a605b Author: Paul E. McKenney Date: Fri Mar 17 21:08:18 2023 -0700 srcu: Move srcu_barrier() fields from srcu_struct to srcu_usage This commit moves the ->srcu_barrier_seq, ->srcu_barrier_mutex, ->srcu_barrier_completion, and ->srcu_barrier_cpu_cnt fields from the srcu_struct structure to the srcu_usage structure to reduce the size of the former in order to improve cache locality. Suggested-by: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 660349ac79cb22bb64c44b026d879069783e97d5 Author: Paul E. McKenney Date: Fri Mar 17 20:22:58 2023 -0700 srcu: Move ->sda_is_static from srcu_struct to srcu_usage This commit moves the ->sda_is_static field from the srcu_struct structure to the srcu_usage structure to reduce the size of the former in order to improve cache locality. Suggested-by: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 3b46679c623c2766f4c56fd3f9ce8edbb38c5d20 Author: Paul E. McKenney Date: Fri Mar 17 20:01:02 2023 -0700 srcu: Move heuristics fields from srcu_struct to srcu_usage This commit moves the ->srcu_size_jiffies, ->srcu_n_lock_retries, and ->srcu_n_exp_nodelay fields from the srcu_struct structure to the srcu_usage structure to reduce the size of the former in order to improve cache locality. Suggested-by: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 03200b5ca3b4d4edf634dc052bf3b8eb8dc8bbbc Author: Paul E. McKenney Date: Fri Mar 17 19:30:50 2023 -0700 srcu: Move grace-period fields from srcu_struct to srcu_usage This commit moves the ->srcu_gp_seq, ->srcu_gp_seq_needed, ->srcu_gp_seq_needed_exp, ->srcu_gp_start, and ->srcu_last_gp_end fields from the srcu_struct structure to the srcu_usage structure to reduce the size of the former in order to improve cache locality. Suggested-by: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit e3a6ab25cfa0fcdcb31c346b9871a566d440980d Author: Paul E. McKenney Date: Fri Mar 17 19:13:16 2023 -0700 srcu: Move ->srcu_gp_mutex from srcu_struct to srcu_usage This commit moves the ->srcu_gp_mutex field from the srcu_struct structure to the srcu_usage structure to reduce the size of the former in order to improve cache locality. Suggested-by: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit b3fb11f7e9c3c64dd86403409a070c996d8ac081 Author: Paul E. McKenney Date: Fri Mar 17 18:29:38 2023 -0700 srcu: Move ->lock from srcu_struct to srcu_usage This commit moves the ->lock field from the srcu_struct structure to the srcu_usage structure to reduce the size of the former in order to improve cache locality. Suggested-by: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 0839ade94bdef395bab02b3a579416c112062026 Author: Paul E. McKenney Date: Fri Mar 17 17:35:21 2023 -0700 srcu: Move ->lock initialization after srcu_usage allocation Currently, both __init_srcu_struct() in CONFIG_DEBUG_LOCK_ALLOC=y kernels and init_srcu_struct() in CONFIG_DEBUG_LOCK_ALLOC=n kernel initialize the srcu_struct structure's ->lock before the srcu_usage structure has been allocated. This of course prevents the ->lock from being moved to the srcu_usage structure, so this commit moves the initialization into the init_srcu_struct_fields() after the srcu_usage structure has been allocated. Cc: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 574dc1a7efe490dffe5c1ce0285306feec16a880 Author: Paul E. McKenney Date: Fri Mar 17 17:22:27 2023 -0700 srcu: Move ->srcu_cb_mutex from srcu_struct to srcu_usage This commit moves the ->srcu_cb_mutex field from the srcu_struct structure to the srcu_usage structure to reduce the size of the former in order to improve cache locality. Suggested-by: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit a0d8cbd3821369dc9478cabd605417afb9eb24dc Author: Paul E. McKenney Date: Fri Mar 17 17:16:30 2023 -0700 srcu: Move ->srcu_size_state from srcu_struct to srcu_usage This commit moves the ->srcu_size_state field from the srcu_struct structure to the srcu_usage structure to reduce the size of the former in order to improve cache locality. Suggested-by: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 208f41b1312443401353bec0c1939e2bfc28adce Author: Paul E. McKenney Date: Fri Mar 17 14:43:08 2023 -0700 srcu: Move ->level from srcu_struct to srcu_usage This commit moves the ->level[] array from the srcu_struct structure to the srcu_usage structure to reduce the size of the former in order to improve cache locality. Suggested-by: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 95433f7263011e0e6e83caef85d98896dd99cab7 Author: Paul E. McKenney Date: Thu Mar 16 17:58:51 2023 -0700 srcu: Begin offloading srcu_struct fields to srcu_update The current srcu_struct structure is on the order of 200 bytes in size (depending on architecture and .config), which is much better than the old-style 26K bytes, but still all too inconvenient when one is trying to achieve good cache locality on a fastpath involving SRCU readers. However, only a few fields in srcu_struct are used by SRCU readers. The remaining fields could be offloaded to a new srcu_update structure, thus shrinking the srcu_struct structure down to a few tens of bytes. This commit begins this noble quest, a quest that is complicated by open-coded initialization of the srcu_struct within the srcu_notifier_head structure. This complication is addressed by updating the srcu_notifier_head structure's open coding, given that there does not appear to be a straightforward way of abstracting that initialization. This commit moves only the ->node pointer to srcu_update. Later commits will move additional fields. [ paulmck: Fold in qiang1.zhang@intel.com's memory-leak fix. ] Link: https://lore.kernel.org/all/20230320055751.4120251-1-qiang1.zhang@intel.com/ Suggested-by: Christoph Hellwig Cc: "Rafael J. Wysocki" Cc: "Michał Mirosław" Cc: Dmitry Osipenko Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Acked-by: Rafael J. Wysocki Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit f4d01a259374ef358cd6b00a96b4dfc0fb05a844 Author: Paul E. McKenney Date: Fri Mar 17 13:28:04 2023 -0700 srcu: Use static init for statically allocated in-module srcu_struct Further shrinking the srcu_struct structure is eased by requiring that in-module srcu_struct structures rely more heavily on static initialization. In particular, this preserves the property that a module-load-time srcu_struct initialization can fail only due to memory-allocation failure of the per-CPU srcu_data structures. It might also slightly improve robustness by keeping the number of memory allocations that must succeed down percpu_alloc() call. This is in preparation for splitting an srcu_usage structure out of the srcu_struct structure. [ paulmck: Fold in qiang1.zhang@intel.com feedback. ] Cc: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 3e67cb8a3c6251c86e5d058d8ee4e1909bc25af0 Author: Paul E. McKenney Date: Fri Mar 17 08:06:56 2023 -0700 srcu: Add whitespace to __SRCU_STRUCT_INIT() & __DEFINE_SRCU() This is a whitespace-only commit with no change in functionality. Its purpose is to prepare for later commits that: (1) Cause statically allocated srcu_struct structures to rely on compile-time initialization and (2) Move fields from the srcu_struct structure to a new srcu_usage structure. Cc: Christoph Hellwig Tested-by: Sachin Sant Tested-by: "Zhang, Qiang1" Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 2b4be54830681cc023877d3b33a9b7ae9122e551 Author: Paul E. McKenney Date: Sun Mar 19 17:29:20 2023 -0700 rcu-tasks: Fix warning for unused tasks_rcu_exit_srcu The tasks_rcu_exit_srcu variable is used only by kernels built with CONFIG_TASKS_RCU=y, but is defined for all kernesl with CONFIG_TASKS_RCU_GENERIC=y. Therefore, in kernels built with CONFIG_TASKS_RCU_GENERIC=y but CONFIG_TASKS_RCU=n, this gives a "defined but not used" warning. This commit therefore moves this variable under CONFIG_TASKS_RCU. Link: https://lore.kernel.org/oe-kbuild-all/202303191536.XzMSyzTl-lkp@intel.com/ Reported-by: kernel test robot Reviewed-by: Frederic Weisbecker Tested-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 69bbc6ade9d9d4e3c556cb83e77b6f3cd9ad3d18 Author: Pavel Begunkov Date: Tue Apr 4 13:39:57 2023 +0100 io_uring/rsrc: add custom limit for node caching The number of entries in the rsrc node cache is limited to 512, which still seems unnecessarily large. Add per cache thresholds and set to to 32 for the rsrc node cache. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d0cd538b944dac0bf878e276fc0199f21e6bccea.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 757ef4682b6aa29fdf752ad47f0d63eb48b261cf Author: Pavel Begunkov Date: Tue Apr 4 13:39:56 2023 +0100 io_uring/rsrc: optimise io_rsrc_data refcounting Every struct io_rsrc_node takes a struct io_rsrc_data reference, which means all rsrc updates do 2 extra atomics. Replace atomics refcounting with a int as it's all done under ->uring_lock. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e73c3d6820cf679532696d790b5b8fae23537213.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 1f2c8f610aa6c6a3dc3523f93eaf28c25051df6f Author: Pavel Begunkov Date: Tue Apr 4 13:39:55 2023 +0100 io_uring/rsrc: add lockdep sanity checks We should hold ->uring_lock while putting nodes with io_put_rsrc_node(), add a lockdep check for that. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b50d5f156ac41450029796738c1dfd22a521df7a.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 9eae8655f9cd2eeed99fb7a0d2bb22816c17e497 Author: Pavel Begunkov Date: Tue Apr 4 13:39:54 2023 +0100 io_uring/rsrc: cache struct io_rsrc_node Add allocation cache for struct io_rsrc_node, it's always allocated and put under ->uring_lock, so it doesn't need any extra synchronisation around caches. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/252a9d9ef9654e6467af30fdc02f57c0118fb76e.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 36b9818a5a84cb7c977fb723babca1c8d74f288f Author: Pavel Begunkov Date: Tue Apr 4 13:39:53 2023 +0100 io_uring/rsrc: don't offload node free struct delayed_work rsrc_put_work was previously used to offload node freeing because io_rsrc_node_ref_zero() was previously called by RCU in the IRQ context. Now, as percpu refcounting is gone, we can do it eagerly at the spot without pushing it to a worker. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/13fb1aac1e8d068ad8fd4a0c6d0d157ab61b90c0.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit ff7c75ecaa9e6b251f76c24e289d4bfe413ffe31 Author: Pavel Begunkov Date: Tue Apr 4 13:39:52 2023 +0100 io_uring/rsrc: optimise io_rsrc_put allocation Every io_rsrc_node keeps a list of items to put, and all entries are kmalloc()'ed. However, it's quite often to queue up only one entry per node, so let's add an inline entry there to avoid extra allocations. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c482c1c652c45c85ac52e67c974bc758a50fed5f.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c824986c113f15e2ef2c00da9a226c09ecaac74c Author: Pavel Begunkov Date: Tue Apr 4 13:39:51 2023 +0100 io_uring/rsrc: rename rsrc_list We have too many "rsrc" around which makes the name of struct io_rsrc_node::rsrc_list confusing. The field is responsible for keeping a list of files or buffers, so call it item_list and add comments around. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3e34d4dfc1fdbb6b520f904ee6187c2ccf680efe.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 0a4813b1abdf06e44ce60cdebfd374cfd27c46bf Author: Pavel Begunkov Date: Tue Apr 4 13:39:50 2023 +0100 io_uring/rsrc: kill rsrc_ref_lock We use ->rsrc_ref_lock spinlock to protect ->rsrc_ref_list in io_rsrc_node_ref_zero(). Now we removed pcpu refcounting, which means io_rsrc_node_ref_zero() is not executed from the irq context as an RCU callback anymore, and we also put it under ->uring_lock. io_rsrc_node_switch(), which queues up nodes into the list, is also protected by ->uring_lock, so we can safely get rid of ->rsrc_ref_lock. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/6b60af883c263551190b526a55ff2c9d5ae07141.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit ef8ae64ffa9578c12e44de42604004c2cc3e9c27 Author: Pavel Begunkov Date: Tue Apr 4 13:39:49 2023 +0100 io_uring/rsrc: protect node refs with uring_lock Currently, for nodes we have an atomic counter and some cached (non-atomic) refs protected by uring_lock. Let's put all ref manipulations under uring_lock and get rid of the atomic part. It's free as in all cases we care about we already hold the lock. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/25b142feed7d831008257d90c8b17c0115d4fc15.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 03adabe81abb20221079b48343783b4327bd1186 Author: Pavel Begunkov Date: Tue Apr 4 13:39:48 2023 +0100 io_uring: io_free_req() via tw io_free_req() is not often used but nevertheless problematic as there is no way to know the current context, it may be used from the submission path or even by an irq handler. Push it to a fresh context using task_work. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3a92fe80bb068757e51aaa0b105cfbe8f5dfee9e.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 2ad4c6d08018e4eec130c29992028dc356ab2181 Author: Pavel Begunkov Date: Tue Apr 4 13:39:47 2023 +0100 io_uring: don't put nodes under spinlocks io_req_put_rsrc() doesn't need any locking, so move it out of a spinlock section in __io_req_complete_post() and adjust helpers. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d5b87a5f31270dade6805f7acafc4cc34b84b241.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 8e15c0e71b8ae64fb7163532860f8d608165281f Author: Pavel Begunkov Date: Tue Apr 4 13:39:46 2023 +0100 io_uring/rsrc: keep cached refs per node We cache refs of the current node (i.e. ctx->rsrc_node) in ctx->rsrc_cached_refs. We'll be moving away from atomics, so move the cached refs in struct io_rsrc_node for now. It's a prep patch and shouldn't change anything in practise. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9edc3669c1d71b06c2dca78b2b2b8bb9292738b9.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b8fb5b4fdd67f9d18109c5d21d44a8bd4ddb608b Author: Pavel Begunkov Date: Tue Apr 4 13:39:45 2023 +0100 io_uring/rsrc: use non-pcpu refcounts for nodes One problem with the current rsrc infra is that often updates will generates lots of rsrc nodes, each carry pcpu refs. That takes quite a lot of memory, especially if there is a stall, and takes lots of CPU cycles. Only pcpu allocations takes >50 of CPU with a naive benchmark updating files in a loop. Replace pcpu refs with normal refcounting. There is already a hot path avoiding atomics / refs, but following patches will further improve it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e9ed8a9457b331a26555ff9443afc64cdaab7247.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 49aba1c5896b745a093318914f3fd128f5c9191e Author: Yang Li Date: Tue Apr 4 10:25:57 2023 +0800 EDAC/amd64: Fix indentation in umc_determine_edac_cap() Use consistent indentation to improve the readability and fix: drivers/edac/amd64_edac.c:1279 umc_determine_edac_cap() warn: inconsistent indenting Fixes: f6a4b4a1aa16 ("EDAC/amd64: Split determine_edac_cap() into dct/umc functions") Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230404022557.46409-1-yang.lee@linux.alibaba.com commit e8c5d45f82ce0c238a4817739892fe8897a3dcc3 Author: Yeongjin Gil Date: Mon Mar 20 15:59:32 2023 +0900 dm verity: fix error handling for check_at_most_once on FEC In verity_end_io(), if bi_status is not BLK_STS_OK, it can be return directly. But if FEC configured, it is desired to correct the data page through verity_verify_io. And the return value will be converted to blk_status and passed to verity_finish_io(). BTW, when a bit is set in v->validated_blocks, verity_verify_io() skips verification regardless of I/O error for the corresponding bio. In this case, the I/O error could not be returned properly, and as a result, there is a problem that abnormal data could be read for the corresponding block. To fix this problem, when an I/O error occurs, do not skip verification even if the bit related is set in v->validated_blocks. Fixes: 843f38d382b1 ("dm verity: add 'check_at_most_once' option to only validate hashes once") Cc: stable@vger.kernel.org Reviewed-by: Sungjong Seo Signed-off-by: Yeongjin Gil Signed-off-by: Mike Snitzer commit 1afae605e0b2da606d5fff4a8a5849da207128b3 Author: Oliver Hartkopp Date: Wed Mar 29 11:09:15 2023 +0200 kvaser_usb: convert USB IDs to hexadecimal values USB IDs are usually represented in 16 bit hexadecimal values. To match the common representation in lsusb and for searching USB IDs in the internet convert the decimal values to lowercase hexadecimal. changes since v1: https://lore.kernel.org/all/20230327175344.4668-1-socketcan@hartkopp.net - drop the aligned block indentation (suggested by Jimmy) - use lowercase hex values (suggested by Alex) Signed-off-by: Oliver Hartkopp Acked-by: Jimmy Assarsson Reviewed-by: Alexander Dahl Link: https://lore.kernel.org/all/20230329090915.3127-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit c42fc36949234bc8f8b5afe734acf6b49377f37a Author: Frank Jungclaus Date: Thu Mar 30 20:44:46 2023 +0200 can: esd_usb: Add support for CAN_CTRLMODE_BERR_REPORTING Announce that the driver supports CAN_CTRLMODE_BERR_REPORTING by means of priv->can.ctrlmode_supported. Until now berr reporting always has been active without taking care of the berr-reporting parameter given to an "ip link set ..." command. Additionally apply some changes to function esd_usb_rx_event(): - If berr reporting is off and it is also no state change, then immediately return. - Unconditionally (even in case of the above "immediate return") store tx- and rx-error counters, so directly use priv->bec.txerr and priv->bec.rxerr instead of intermediate variables. - Not directly related, but to better point out the linkage between a failed alloc_can_err_skb() and stats->rx_dropped++: Move the increment of the rx_dropped statistic counter (back) to directly behind the err_skb allocation. Signed-off-by: Frank Jungclaus Link: https://lore.kernel.org/all/20230330184446.2802135-1-frank.jungclaus@esd.eu Signed-off-by: Marc Kleine-Budde commit 066b41a599d687fb0409bd0b0f3c41615f070d77 Author: Peng Fan Date: Tue Mar 28 13:46:02 2023 +0800 dt-bindings: can: fsl,flexcan: add optional power-domains property Add optional power-domains property for i.MX8 usage. Signed-off-by: Peng Fan Acked-by: Rob Herring Link: https://lore.kernel.org/all/20230328054602.1974255-1-peng.fan@oss.nxp.com Signed-off-by: Marc Kleine-Budde commit 8e85d550c127d8c559d94c8a2bb7b48e1d75432d Author: Geert Uytterhoeven Date: Wed Mar 29 08:40:55 2023 +0200 can: rcar_canfd: rcar_canfd_probe(): fix plain integer in transceivers[] init Fix the following compile warning with C=1: | drivers/net/can/rcar/rcar_canfd.c:1852:59: warning: Using plain integer as NULL pointer Fixes: a0340df7eca4f28e ("can: rcar_canfd: Add transceiver support") Reported-by: Jakub Kicinski Link: https://lore.kernel.org/r/20230328145658.7fdbc394@kernel.org Signed-off-by: Geert Uytterhoeven Reviewed-by: Steen Hegelund Link: https://lore.kernel.org/all/7f7b0dde0caa2d2977b4fb5b65b63036e75f5022.1680071972.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit 5ca2653011a4f4217ebd16144ddd5c2dca177cc0 Author: Neil Armstrong Date: Mon Apr 3 09:42:19 2023 +0200 ARM: oxnas: remove OXNAS support Due to lack of maintainance and stall of development for a few years now, and since no new features will ever be added upstream, remove support for OX810 and OX820 ARM support. Acked-by: Linus Walleij Acked-by: Arnd Bergmann Acked-by: Daniel Golle Signed-off-by: Neil Armstrong Signed-off-by: Arnd Bergmann commit c00574bb43cfaf6758368fbec674559534205162 Merge: fb481b2e5a591 c29313d58c42f Author: Arnd Bergmann Date: Tue Apr 4 16:31:30 2023 +0200 Merge tag 'omap-for-v6.4/omap1-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/arm Clean-up for omap1 for v6.4 merge window Two clean-up patches to fix Kconfig indentation and to simplify the return path for ams_delta_modem_init(). * tag 'omap-for-v6.4/omap1-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: omap1: remove redundant variables err ARM: omap1: Kconfig: Fix indentation Link: https://lore.kernel.org/r/pull-1680180485-415954@atomide.com Signed-off-by: Arnd Bergmann commit fb481b2e5a591770e01c364c7fa95c3a23d694e3 Merge: d6053666ef2b6 19050da1d1057 Author: Arnd Bergmann Date: Tue Apr 4 16:30:45 2023 +0200 Merge tag 'omap-for-v6.4/cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/arm Clean-up for omaps for v6.4 Some clean-up changes for omaps mostly to use of_property_read_bool() and of_address_to_resource(). Also included is removal for an obsolete Kconfig option, a typo fix, a return path change for am33xx_suspend_init(), and a change to use kzalloc instead of kcalloc for a single element. * tag 'omap-for-v6.4/cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: hwmod: Use kzalloc for allocating only one element ARM: OMAP2+: Remove the unneeded result variable ARM: OMAP2+: fix repeated words in comments ARM: OMAP2+: remove obsolete config OMAP3_SDRC_AC_TIMING ARM: OMAP2+: Use of_address_to_resource() ARM: OMAP2+: Use of_property_read_bool() for boolean properties Link: https://lore.kernel.org/r/pull-1680180293-92168@atomide.com Signed-off-by: Arnd Bergmann commit 837be1cc222f8f29bb2e39d3bf7ebaa2a80d83b3 Merge: 9514e519320d5 0262f2736978b Author: Arnd Bergmann Date: Tue Apr 4 16:28:16 2023 +0200 Merge tag 'amlogic-arm64-dt-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/dt Amlogic ARM64 DT changes for v6.4: - set of DT bindings check fixes - adjust order of some compatibles to match dt-schema migration - add support for BananaPi M2S variants - gxbb-kii-pro: add audio & bluetooth support - meson-a1: add gpio_intc node - gxl: use gxl mdio multiplexer - Add initial support for BPI-CM4 module with BPI-CM4IO baseboard * tag 'amlogic-arm64-dt-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: arm64: dts: amlogic: Add initial support for BPI-CM4 module with BPI-CM4IO baseboard dt-bindings: arm: amlogic: Document the boards with the BPI-CM4 connected arm64: dts: amlogic: gxl: use gxl mdio multiplexer arm64: dts: meson-a1: add gpio_intc node arm64: dts: meson: gxbb-kii-pro: add initial audio support arm64: dts: meson: gxbb-kii-pro: complete the bluetooth node arm64: dts: meson: gxbb-kii-pro: sort and tidy the dts arm64: dts: meson: adjust order of some compatibles arm64: dts: meson: add support for BananaPi M2S variants dt-bindings: arm: amlogic: add support for BananaPi M2S variants arm64: dts: amlogic: meson-gxm-s912-libretech-pc: remove unused pinctrl-names from phy node arm64: dts: amlogic: meson-sm1: use correct enable-gpios arm64: dts: amlogic: meson-s4: fix apb4 bus node name arm64: dts: amlogic: meson-g12b-odroid-go-ultra: rename keypad-gpio pinctrl node arm64: dts: amlogic: meson-g12b-radxa-zero2: fix pwm clock names arm64: dts: amlogic: meson-axg-jethome-jethub-j1xx: remove invalid #gpio-cells in onewire node arm64: dts: amlogic: meson-gxm-s912-libretech-pc: add simple connector node in fusb302 node arm64: dts: amlogic: meson-sm1-bananapi: correct usb-hub hog node name Link: https://lore.kernel.org/r/1b955bb7-1a35-8d67-beb6-dd289533ff6f@linaro.org Signed-off-by: Arnd Bergmann commit 9514e519320d501b916b128ed66137c9c85f5409 Merge: 03216cdbd7df3 8446b84c894f7 Author: Arnd Bergmann Date: Tue Apr 4 16:27:38 2023 +0200 Merge tag 'amlogic-arm-dt-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/dt Amlogic ARM DT changes for v6.4: - adjust order of some compatibles - meson8: add the xtal_32k_out pin - meson8: add the SDXC_A pins - mxiii-plus: Enable Bluetooth and WiFi support * tag 'amlogic-arm-dt-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: ARM: dts: meson8m2: mxiii-plus: Enable Bluetooth and WiFi support ARM: dts: meson8: add the SDXC_A pins ARM: dts: meson8: add the xtal_32k_out pin arm: dts: meson: adjust order of some compatibles Link: https://lore.kernel.org/r/eb1f32f8-822d-9cfc-fca6-9e044bf4a5ab@linaro.org Signed-off-by: Arnd Bergmann commit 03216cdbd7df38aabf5fffac588a366177f5434a Author: Neil Armstrong Date: Mon Apr 3 09:42:21 2023 +0200 dt-bindings: arm: oxnas: remove obsolete bindings Due to lack of maintainance and stall of development for a few years now, and since no new features will ever be added upstream, remove the OX810 and OX820 SoC and boards bindings. Acked-by: Krzysztof Kozlowski Acked-by: Linus Walleij Acked-by: Arnd Bergmann Acked-by: Daniel Golle Signed-off-by: Neil Armstrong Signed-off-by: Arnd Bergmann commit a9414bef866c575bf33465f55b1a3e7951eb2e4a Author: Neil Armstrong Date: Mon Apr 3 09:42:18 2023 +0200 ARM: dts: oxnas: remove obsolete device tree files Due to lack of maintainance and stall of development for a few years now, and since no new features will ever be added upstream, remove support for OX810 and OX820 devices. Acked-by: Linus Walleij Acked-by: Arnd Bergmann Acked-by: Daniel Golle Signed-off-by: Neil Armstrong Signed-off-by: Arnd Bergmann commit 63d2b92754aaac3317c50a18ee83d3196a25542e Merge: 8f9abca2f4a20 2c0a1faa4da53 Author: Arnd Bergmann Date: Tue Apr 4 16:24:46 2023 +0200 Merge tag 'at91-dt-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/dt AT91 device tree updates for 6.4: It contains: - Update to maximum frequency for QSPI on several boards thanks to the additon of the new spi-cs-setup-ns property. * tag 'at91-dt-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sam9x60ek: Set sst26vf064b SPI NOR flash at its maximum frequency ARM: dts: at91: sama5d2_icp: Set sst26vf064b SPI NOR flash at its maximum frequency ARM: dts: at91-sama5d27_som1: Set sst26vf064b SPI NOR flash at its maximum frequency ARM: dts: at91-sama5d27_wlsom1: Set sst26vf064b SPI NOR flash at its maximum frequency Link: https://lore.kernel.org/r/20230331142751.41522-1-nicolas.ferre@microchip.com Signed-off-by: Arnd Bergmann commit 8f9abca2f4a20e395eb5b37a08d70a9dab1beb7c Merge: c2f714150b7fe a63945c3b5617 Author: Arnd Bergmann Date: Tue Apr 4 16:20:32 2023 +0200 Merge tag 'omap-for-v6.4/dt-overlays-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/dt Devicetree overlays for omaps for v6.4 Devicetree overlays for omaps to enable the optional LCD and touchscreen modules on am57xx-evm and am57xx-idk boards. * tag 'omap-for-v6.4/dt-overlays-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am57xx-idk: Add IDK displays and touchscreens ARM: dts: ti: Add AM57xx GP EVM Rev A3 board support ARM: dts: ti: Add AM57xx GP EVM board support Link: https://lore.kernel.org/r/pull-1680180448-508978@atomide.com Signed-off-by: Arnd Bergmann commit c2f714150b7febcb56d96d11b31571a16889f560 Merge: d707810efa909 e341f338180c8 Author: Arnd Bergmann Date: Tue Apr 4 16:19:30 2023 +0200 Merge tag 'omap-for-v6.4/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/dt Devicetree changes for omaps for v6.4 Devicetree changes for omaps for gta04, Phytec am335x devices, and to drop a obsolete compatible property: - A non-urgent fix for gta04 to enable more dma channels for some audio configurations - Update the dts compatible and vendor prefixes for gta04 - A series of updates for Phytec am335x based boards to configure more devices like rtc and audio, and a few clean-up patches - A change to drop the usage of "ti,omap36xx" compatible, the driver code already checks for "ti,omap3630" that is also alread set in the dts files. This makes the yaml binding conversion a bit simpler. * tag 'omap-for-v6.4/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: omap: Drop ti,omap36xx compatible ARM: dts: am335x-phycore-som: Remove superseded/invalid GPMC NAND type. ARM: dts: am335x-pcm-953: Remove superseded/invalid LED trigger. ARM: dts: am335x-phycore-som: Remove underscore in node names. ARM: dts: am335x-regor: Remove underscore in node names. ARM: dts: am335x-pcm-935: Remove underscore in node names. ARM: dts: am335x-wega: Change node name of sound card, remove underscores. ARM: dts: am335x-wega: Fix audio codec by using simple-audio-card driver. ARM: dts: am335x-phycore-som: Add alias for TPS65910 RTC ARM: dts: omap3-gta04: fix compatible record for GTA04 board ARM: dts: gta04: fix excess dma channel usage Link: https://lore.kernel.org/r/pull-1680180389-756753@atomide.com Signed-off-by: Arnd Bergmann commit d707810efa90926e94afb990dc03869f62a705bc Merge: 5b9d72921f15c 4db0ce4038dec Author: Arnd Bergmann Date: Tue Apr 4 16:17:15 2023 +0200 Merge tag 'renesas-dts-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DTS updates for v6.4 - Add USB3 support for the RZ/V2M SoC and the RZ/V2M Evaluation Kit 2.0, - Add uSD card and eMMC support for the RZ/V2M Evaluation Kit 2.0, - Add CAN-FD, thermal, GMSL2 video capture, and sound support for the R-Car V4H SoC and the White-Hawk development board, - Add PMU support for the RZ/G2UL, RZ/G2L{,C}, and RZ/V2L SoCs, - Drop support for the obsolete R-Car H3 ES1.* (R8A77950) SoC, - Add I2C EEPROM support for the Atmark Techno Armadillo-800-EVA, and the Renesas Condor and ULCB development boards, - Miscellaneous fixes and improvements. * tag 'renesas-dts-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (30 commits) arm64: dts: renesas: r8a779a0: Update CAN-FD to R-Car Gen4 compatible value arm64: dts: renesas: ulcb: Add I2C EEPROM for PMIC arm64: dts: renesas: condor: Add I2C EEPROM for PMIC ARM: dts: armadillo800eva: Add I2C EEPROM for MAC address arm64: dts: renesas: Remove R-Car H3 ES1.* devicetrees arm64: dts: renesas: white-hawk: Add R-Car Sound support arm64: dts: renesas: r8a779g0: R-Car Sound support arm64: dts: renesas: r9a07g043: Update IRQ numbers for SSI channels arm64: dts: renesas: r9a07g054: Update IRQ numbers for SSI channels arm64: dts: renesas: r9a07g044: Update IRQ numbers for SSI channels arm64: dts: renesas: r8a774c0: Remove bogus voltages from OPP table arm64: dts: renesas: r8a77990: Remove bogus voltages from OPP table arm64: dts: renesas: r9a07g054: Add Cortex-A55 PMU node arm64: dts: renesas: white-hawk-csi-dsi: Add and connect MAX96712 arm64: dts: renesas: r8a779g0: Add and connect all CSI-2, ISP and VIN nodes arm64: dts: renesas: r8a779f0: Use proper labels for thermal zones arm64: dts: renesas: r8a779g0: Add thermal nodes arm64: dts: renesas: rzv2mevk2: Add uart0 pins arm64: dts: renesas: Drop specifying the GIC_CPU_MASK_SIMPLE() for GICv3 systems arm64: dts: renesas: r9a07g044: Add Cortex-A55 PMU node ... Link: https://lore.kernel.org/r/cover.1679907064.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 5b9d72921f15c40f15ec530e34fb18bc9bbebf5a Merge: 07fcd6bfce178 d35ad1030a6bc Author: Arnd Bergmann Date: Tue Apr 4 16:16:18 2023 +0200 Merge tag 'renesas-dt-bindings-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DT binding updates for v6.4 - Document support for the Renesas RZ/N1 EB board with an RZ/N1D-DB daughter board, - Drop support for the obsolete R-Car H3 ES1.* (R8A77950) SoC. * tag 'renesas-dt-bindings-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: soc: renesas: Remove R-Car H3 ES1.* dt-bindings: soc: renesas: renesas.yaml: Add renesas,rzn1d400-eb compatible Link: https://lore.kernel.org/r/cover.1679907062.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 748d3c3cce57d7d5d5f9d5ab8f338b2f83b7ef3e Merge: 0d3becec770e6 1b61fdfdd656b Author: Arnd Bergmann Date: Tue Apr 4 16:10:21 2023 +0200 Merge tag 'amlogic-drivers-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/drivers Amlogic Drivers changes for v6.4: - convert clk-measure.txt to dt-schema - meson-pwrc: Use dev_err_probe() - meson_sm: populate platform devices from sm device tree data - dt-bindings: Drop unneeded quotes * tag 'amlogic-drivers-for-v6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: dt-bindings: soc: amlogic: Drop unneeded quotes firmware: meson_sm: populate platform devices from sm device tree data soc: amlogic: meson-pwrc: Use dev_err_probe() dt-bindings: soc: amlogic: convert clk-measure.txt to dt-schema Link: https://lore.kernel.org/r/aebef87f-e0a3-17dd-12b7-7231ca6b0923@linaro.org Signed-off-by: Arnd Bergmann commit 0d3becec770e694896fadfcbe0a01968266c2c85 Merge: a5eb3469199ec b3b4ced12c1bc Author: Arnd Bergmann Date: Tue Apr 4 16:09:31 2023 +0200 Merge tag 'optee-per-cpu-irq-for-v6.4' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers Add OP-TEE per cpu asynchronous notification Adds support for signalling from secure world with per-cpu interrupts in addition to edge-triggered peripheral interrupts. * tag 'optee-per-cpu-irq-for-v6.4' of https://git.linaro.org/people/jens.wiklander/linux-tee: optee: add per cpu asynchronous notification dt-bindings: optee driver interrupt can be a per-cpu interrupt Link: https://lore.kernel.org/r/20230404062727.GA2765560@rayden Signed-off-by: Arnd Bergmann commit a5eb3469199ece6617309dd2fde65f05680ebf0b Merge: 4e7b171f4e596 69d170c4c28ba Author: Arnd Bergmann Date: Tue Apr 4 16:08:43 2023 +0200 Merge tag 'memory-controller-drv-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers Memory controller drivers for v6.4 1. STM32 FMC2: allow using driver on all STM32MP SoCs. 2. Cleanups: - Atmel EBI: use preferred of_property_present() API. - Tegra210 MC: drop redundant variable initialization. - Drop redundant quotes in Devicetree bindings. - Remove MODULE_LICENSE in non-modules (several drivers). * tag 'memory-controller-drv-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: dt-bindings: memory-controller: Drop unneeded quotes memory: stm32-fmc2-ebi: depends on ARCH_STM32 instead of MACH_STM32MP157 memory: tegra: remove redundant variable initialization memory: atmel-ebi: Use of_property_present() for testing DT property presence memory: remove MODULE_LICENSE in non-modules memory: tegra: remove MODULE_LICENSE in non-modules Link: https://lore.kernel.org/r/20230403161427.328128-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 4e7b171f4e596804443f2e229a3abc3f7f1a2225 Merge: 33063e5acfcd9 b79ad2307a1df Author: Arnd Bergmann Date: Tue Apr 4 16:07:26 2023 +0200 Merge tag 'omap-for-v6.4/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/drivers Clean-up for ti-sysc driver for v6.4 Clean-up for ti-sysc interconnect target module driver mostly to remove open coded ranges property parsing, to use of_property_present(), and to use list_for_each_entry(). Also included is one comment typo change. * tag 'omap-for-v6.4/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: bus: ti-sysc: Fix comment typo bus: ti-sysc: Use list_for_each_entry() helper bus: ti-sysc: Use of_property_present() for testing DT property presence bus: ti-sysc: Remove open coded "ranges" parsing Link: https://lore.kernel.org/r/pull-1680180355-69164@atomide.com Signed-off-by: Arnd Bergmann commit 743d3336029ffe2bb38e982a3b572ced243c6d43 Author: Tom Rix Date: Mon Apr 3 20:45:01 2023 -0400 pinctrl: mlxbf3: set varaiable mlxbf3_pmx_funcs storage-class-specifier to static smatch reports drivers/pinctrl/pinctrl-mlxbf3.c:162:20: warning: symbol 'mlxbf3_pmx_funcs' was not declared. Should it be static? This variable is only used in one file so it should be static. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230404004501.1913144-1-trix@redhat.com Signed-off-by: Linus Walleij commit 692d42d411b7db6a76382537fccbee3a12a2bcdb Merge: c52159b5be789 13a0d1ae7ee6b Author: Jason Gunthorpe Date: Tue Apr 4 11:03:24 2023 -0300 Merge branch 'iommufd/for-rc' into for-next The following selftest patch requires both the bug fixes and the improvements of the selftest framework. * iommufd/for-rc: iommufd: Do not corrupt the pfn list when doing batch carry iommufd: Fix unpinning of pages when an access is present iommufd: Check for uptr overflow Linux 6.3-rc5 Signed-off-by: Jason Gunthorpe commit c52159b5be7894540acdc7a35791c0b57097fa4c Author: Tom Rix Date: Mon Apr 3 20:23:17 2023 -0400 iommufd/selftest: Set varaiable mock_iommu_device storage-class-specifier to static smatch reports: drivers/iommu/iommufd/selftest.c:295:21: warning: symbol 'mock_iommu_device' was not declared. Should it be static? This variable is only used in one file so it should be static. Fixes: 65c619ae0680 ("iommufd/selftest: Make selftest create a more complete mock device") Link: https://lore.kernel.org/r/20230404002317.1912530-1-trix@redhat.com Signed-off-by: Tom Rix Signed-off-by: Jason Gunthorpe commit 983652c691990b3257a07f67f4263eb847baa82d Author: Chung-Chiang Cheng Date: Wed Mar 22 14:25:19 2023 +0800 splice: report related fsnotify events The fsnotify ACCESS and MODIFY event are missing when manipulating a file with splice(2). Signed-off-by: Chung-Chiang Cheng Reviewed-by: Amir Goldstein Acked-by: Jan Kara Message-Id: <20230322062519.409752-1-cccheng@synology.com> Signed-off-by: Christian Brauner commit 9a8d94711dfc0c1e9bfbb064cce8ff9d656ea9df Author: Lakshmi Sowjanya D Date: Mon Apr 3 17:32:35 2023 +0530 dt-bindings: pinctrl: Remove bindings for Intel Thunderbay pinctrl driver Remove Thunder Bay specific code as the product got cancelled and there are no end customers or users. Signed-off-by: Lakshmi Sowjanya D Link: https://lore.kernel.org/r/20230403120235.939-2-lakshmi.sowjanya.d@intel.com Signed-off-by: Linus Walleij commit 7edfe0eeeffa03c61bceee27f3c2699a2af851c3 Author: Lakshmi Sowjanya D Date: Mon Apr 3 17:32:34 2023 +0530 pinctrl: Remove Intel Thunder Bay pinctrl driver Remove Thunder Bay specific code as the product got cancelled and there are no end customers or users. Signed-off-by: Lakshmi Sowjanya D Link: https://lore.kernel.org/r/20230403120235.939-1-lakshmi.sowjanya.d@intel.com Signed-off-by: Linus Walleij commit 33063e5acfcd988ac2a55ba77707601a0e0d7155 Merge: eeac8ede17557 2653d5bf1c9d1 Author: Arnd Bergmann Date: Tue Apr 4 15:44:38 2023 +0200 Merge tag 'renesas-drivers-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers Renesas driver updates for v6.4 - Drop support for the obsolete R-Car H3 ES1.* (R8A77950) SoC, - Miscellaneous fixes and improvements. * tag 'renesas-drivers-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: Use "#ifdef" for single-symbol definition checks soc: renesas: pwc-rzv2m: drop of_match_ptr for ID table soc: renesas: mark OF related data as maybe unused soc: renesas: rmobile-sysc: Use of_fwnode_handle() helper soc: renesas: Remove r8a77950 arch soc: renesas: rcar-sysc: Remove R-Car H3 ES1.* handling Link: https://lore.kernel.org/r/cover.1679907059.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit fc746270c2a5cc6eecaec9d81d000aaaa02b2f86 Author: Neil Armstrong Date: Mon Apr 3 09:42:20 2023 +0200 ARM: configs: remove oxnas_v6_defconfig Due to lack of maintainance and stall of development for a few years now, and since no new features will ever be added upstream, remove support for OX820 specific defconfig. Acked-by: Linus Walleij Acked-by: Arnd Bergmann Acked-by: Daniel Golle Signed-off-by: Neil Armstrong Signed-off-by: Arnd Bergmann commit f0cda04203c4cecb1cbbbc94fcd2089ffa8ffc81 Merge: 3dffd4755f41c 93582bdfd0cf5 Author: Arnd Bergmann Date: Tue Apr 4 15:39:46 2023 +0200 Merge tag 'renesas-arm-defconfig-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/defconfig Renesas ARM defconfig updates for v6.4 - Enable support for the Dialog Semiconductor DA7213 Codec, and the Renesas RZ/V2M xHCI and USB3.1 DRD controllers in the arm64 defconfig, - Disable support for the obsolete R-Car H3 ES1.* (R8A77950) SoC in the arm64 defconfig, - Refresh shmobile_defconfig for v6.3-rc1, - Enable additional support for RZ/N1 platforms in multi_v7_defconfig. * tag 'renesas-arm-defconfig-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: defconfig: Enable RZ/V2M xHCI and USB3.1 DRD controller support ARM: multi_v7_defconfig: Enable additional support for RZ/N1 platforms ARM: shmobile: defconfig: Refresh for v6.3-rc1 arm64: defconfig: Disable R-Car H3 ES1.* arm64: defconfig: Enable DA7213 Codec Link: https://lore.kernel.org/r/cover.1679907057.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit c94673e80377d67ba36ee4059d7814b2ab98fa71 Author: Rob Herring Date: Fri Mar 31 13:21:59 2023 -0500 dt-bindings: arm: nvidia: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding commit 9b539c4d1b921bc9c8c578d4d50f0a7e7874d384 Author: Daniel Vetter Date: Wed Jan 11 16:41:08 2023 +0100 fbdev/radeon: use pci aperture helpers It's not exactly the same since the open coded version doesn't set primary correctly. But that's a bugfix, so shouldn't hurt really. Signed-off-by: Daniel Vetter Cc: Benjamin Herrenschmidt Cc: linux-fbdev@vger.kernel.org Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230111154112.90575-7-daniel.vetter@ffwll.ch commit deddc9127beb0409559aecf6f76aab10eb844579 Author: Daniel Vetter Date: Wed Jan 11 16:41:07 2023 +0100 staging/lynxfb: Use pci aperture helper It exists! Note that since this is an exact copy, there shouldn't be any functional difference here. Signed-off-by: Daniel Vetter Cc: Sudip Mukherjee Cc: Teddy Wang Cc: linux-fbdev@vger.kernel.org Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230111154112.90575-6-daniel.vetter@ffwll.ch commit c1ebead36099deb85384f6fb262fe619a04cee73 Author: Daniel Vetter Date: Wed Jan 11 16:41:02 2023 +0100 drm/ast: Use drm_aperture_remove_conflicting_pci_framebuffers It's just open coded and matches. Note that Thomas said that his version apparently failed for some reason, but hey maybe we should try again. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Tested-by: Thomas Zimmmermann Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230111154112.90575-1-daniel.vetter@ffwll.ch commit 430635a0ef1ce958b7b4311f172694ece2c692b8 Author: Adrian Hunter Date: Mon Apr 3 18:48:31 2023 +0300 perf intel-pt: Fix CYC timestamps after standalone CBR After a standalone CBR (not associated with TSC), update the cycles reference timestamp and reset the cycle count, so that CYC timestamps are calculated relative to that point with the new frequency. Fixes: cc33618619cefc6d ("perf tools: Add Intel PT support for decoding CYC packets") Signed-off-by: Adrian Hunter Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230403154831.8651-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 1f9f33ccf0320be21703d9195dd2b36a1c9a07cb Author: Adrian Hunter Date: Mon Apr 3 18:48:30 2023 +0300 perf auxtrace: Fix address filter entire kernel size kallsyms is not completely in address order. In find_entire_kern_cb(), calculate the kernel end from the maximum address not the last symbol. Example: Before: $ sudo cat /proc/kallsyms | grep ' [twTw] ' | tail -1 ffffffffc00b8bd0 t bpf_prog_6deef7357e7b4530 [bpf] $ sudo cat /proc/kallsyms | grep ' [twTw] ' | sort | tail -1 ffffffffc15e0cc0 t iwl_mvm_exit [iwlmvm] $ perf.d093603a05aa record -v --kcore -e intel_pt// --filter 'filter *' -- uname |& grep filter Address filter: filter 0xffffffff93200000/0x2ceba000 After: $ perf.8fb0f7a01f8e record -v --kcore -e intel_pt// --filter 'filter *' -- uname |& grep filter Address filter: filter 0xffffffff93200000/0x2e3e2000 Fixes: 1b36c03e356936d6 ("perf record: Add support for using symbols in address filters") Signed-off-by: Adrian Hunter Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230403154831.8651-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 34fb60400e3257f3a046ee8e6b49242cf65cc1a3 Author: Rob Herring Date: Mon Mar 27 11:20:57 2023 -0500 perf arm-spe: Add raw decoding for SPEv1.3 MTE and MOPS load/store Arm SPEv1.3 adds new load/store operation subclasses for Memory Tagging Extension (MTE) and memory operations (MOPS). The memory operations are memcpy and memset. Add support for decoding these new subclasses in the raw decoding. Reviewed-by: Leo Yan Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230327162057.4057188-1-robh@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b6521ea2a033b0c49669bd60d69ca16d0746dcea Author: Mike Leach Date: Fri Mar 31 06:56:45 2023 +0100 perf cs-etm: Handle PERF_RECORD_AUX_OUTPUT_HW_ID packet When using dynamically assigned CoreSight trace IDs the drivers can output the ID / CPU association as a PERF_RECORD_AUX_OUTPUT_HW_ID packet. Update cs-etm decoder to handle this packet by setting the CPU/Trace ID mapping. Reviewed-by: James Clark Signed-off-by: Mike Leach Acked-by: Suzuki Poulouse Cc: Alexander Shishkin Cc: Darren Hart Cc: Ganapatrao Kulkarni Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230331055645.26918-2-mike.leach@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit e5fa5b4110fe7d0ab08252943fc47072a7ff6c9d Author: Mike Leach Date: Fri Mar 31 06:56:44 2023 +0100 perf cs-etm: Update record event to use new Trace ID protocol Trace IDs are now dynamically allocated. Previously used the static association algorithm that is no longer used. The 'cpu * 2 + seed' was outdated and broken for systems with high core counts (>46). as it did not scale and was broken for larger core counts. Trace ID will now be sent in PERF_RECORD_AUX_OUTPUT_HW_ID record. Legacy ID algorithm renamed and retained for limited backward compatibility use. Reviewed-by: James Clark Signed-off-by: Mike Leach Acked-by: Suzuki Poulouse Cc: Alexander Shishkin Cc: Darren Hart Cc: Ganapatrao Kulkarni Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230331055645.26918-2-mike.leach@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 092772955568fa848b1e782e6cb3fa395eccea81 Author: Mike Leach Date: Fri Mar 31 06:56:43 2023 +0100 perf cs-etm: Move mapping of Trace ID and cpu into helper function The information to associate Trace ID and CPU will be changing. Drivers will start outputting this as a hardware ID packet in the data file which if present will be used in preference to the AUXINFO values. To prepare for this we provide a helper functions to do the individual ID mapping, and one to extract the IDs from the completed metadata blocks. Reviewed-by: James Clark Signed-off-by: Mike Leach Acked-by: Suzuki Poulouse Cc: Alexander Shishkin Cc: Darren Hart Cc: Ganapatrao Kulkarni Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230331055645.26918-2-mike.leach@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 84c3a2bb4c513ca9fd1326cf24d3729b769d9cf1 Author: Namhyung Kim Date: Mon Mar 27 15:57:11 2023 -0700 perf lock contention: Show detail failure reason for BPF It can fail to collect lock stat from BPF for various reasons. For example, I've got a report that sometimes time calculation seems wrong in case of contended spinlocks. I suspect the time delta went negative for some reason. Count them separately and show in the output like below: $ sudo perf lock contention -abE5 sleep 10 contended total wait max wait avg wait type caller 13 785.61 us 79.36 us 60.43 us spinlock remove_wait_queue+0x14 10 469.02 us 87.51 us 46.90 us spinlock prepare_to_wait+0x27 9 289.09 us 69.08 us 32.12 us spinlock finish_wait+0x36 114 251.05 us 8.56 us 2.20 us spinlock try_to_wake_up+0x1f5 132 188.63 us 5.01 us 1.43 us spinlock __wake_up_common_lock+0x62 === output for debug === bad: 1, total: 279 bad rate: 0.36 % histogram of failure reasons task: 1 stack: 0 time: 0 Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230327225711.245738-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 35bf007e2ee0447166081646c0797bfa831b062f Author: Namhyung Kim Date: Mon Mar 27 15:57:10 2023 -0700 perf lock contention: Fix debug stat if no contention It should not divide if the total number is 0. Otherwise it'd show NaN in the bad rate output. Also add a whitespace in the "output for debug" message. $ sudo perf lock contention -abv true Looking at the vmlinux_path (8 entries long) symsrc__init: cannot get elf header. Using /proc/kcore for kernel data Using /proc/kallsyms for symbols contended total wait max wait avg wait type caller === output for debug=== bad: 0, total: 0 bad rate: -nan % <------------------------- (here) histogram of events caused bad sequence acquire: 0 acquired: 0 contended: 0 release: 0 Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230327225711.245738-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 319593215260da74a78c7de1dccd877ea13916fb Author: Ian Rogers Date: Tue Mar 28 16:41:42 2023 -0700 perf vendor events intel: Update ivybridge and ivytown Update to versions 24 and 23 respectively. Adds the event BR_MISP_EXEC.INDIRECT. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230328234142.1080045-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 337fa2db04785c60fc3aa736af98ce8358f87d34 Author: Andreas Herrmann Date: Thu Mar 30 09:42:02 2023 +0200 perf bench numa: Fix type of loop iterator in do_work, it should be 'long' 'j' is of type int and start/end are of type 'long'. Thus 'j' might become negative and cause segfault in access_data(). Fix it by using 'long' for 'j' as well. Reviewed-by: James Clark Signed-off-by: Andreas Herrmann Link: https://lore.kernel.org/r/20230330074202.14052-1-aherrmann@suse.de Signed-off-by: Arnaldo Carvalho de Melo commit 5a892c3da39fae73d008cc43706ff29456fa8cf1 Author: Adrian Hunter Date: Thu Mar 30 16:18:33 2023 +0300 perf symbol: Remove unused branch_callstack branch_callstack was added by commit 8b7bad58efb7 ("perf callchain: Support handling complete branch stacks as histograms") but never used. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230330131833.12864-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 5ef506130c739a0601d234b36f5dfd2129f966c0 Author: Adrian Hunter Date: Thu Mar 30 16:18:32 2023 +0300 perf top: Add --branch-history option Add --branch-history option, to act the same as that option does for perf report. Example: $ cat tcallf.c volatile a = 10000, b = 100000, c; __attribute__((noinline)) f2() { c = a / b; } __attribute__((noinline)) f1() { f2(); f2(); } main() { while (1) f1(); } $ gcc -w -g -o tcallf tcallf.c $ ./tcallf & [1] 29409 $ perf top -e cycles:u -t $(pidof tcallf) --stdio --no-children --branch-history PerfTop: 3819 irqs/sec kernel: 0.0% exact: 0.0% lost: 0/0 drop: 0/0 [4000Hz cycles:u], (target_tid: 29409) -------------------------------------------------------------------------------------------------------------------- 49.01% tcallf.c:5 [.] f2 tcallf | |--24.91%--f2 tcallf.c:4 | | | |--17.14%--f1 tcallf.c:11 (cycles:1) | | f1 tcallf.c:11 | | f2 tcallf.c:6 (cycles:3) | | f2 tcallf.c:4 | | f1 tcallf.c:10 (cycles:2) | | f1 tcallf.c:9 | | main tcallf.c:16 (cycles:1) | | main tcallf.c:16 | | main tcallf.c:16 (cycles:1) | | main tcallf.c:16 | | f1 tcallf.c:12 (cycles:1) | | f1 tcallf.c:12 | | f2 tcallf.c:6 (cycles:3) | | f2 tcallf.c:4 | | f1 tcallf.c:11 (cycles:1 iter:1 avg_cycles:12) | | f1 tcallf.c:11 | | f2 tcallf.c:6 (cycles:3 iter:1 avg_cycles:12) | | f2 tcallf.c:4 | | f1 tcallf.c:10 (cycles:2 iter:1 avg_cycles:12) | | | --7.78%--f1 tcallf.c:10 (cycles:2) | f1 tcallf.c:9 | main tcallf.c:16 (cycles:1) | main tcallf.c:16 | main tcallf.c:16 (cycles:1) | main tcallf.c:16 | f1 tcallf.c:12 (cycles:1) | f1 tcallf.c:12 | f2 tcallf.c:6 (cycles:3) | f2 tcallf.c:4 | f1 tcallf.c:11 (cycles:1) | f1 tcallf.c:11 | f2 tcallf.c:6 (cycles:3) | f2 tcallf.c:4 | f1 tcallf.c:10 (cycles:2 iter:1 avg_cycles:12) | f1 tcallf.c:9 | main tcallf.c:16 (cycles:1 iter:1 avg_cycles:12) | main tcallf.c:16 | main tcallf.c:16 (cycles:1 iter:1 avg_cycles:12) ... $ pkill tcallf [1]+ Terminated ./tcallf Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230330131833.12864-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 616b14b47a86d880ba21a363440f20f82152d8f2 Author: Ian Rogers Date: Thu Mar 30 11:38:27 2023 -0700 perf build: Conditionally define NDEBUG When a build is done without DEBUG=1 then define NDEBUG. This will compile out asserts and other debug code. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Sean Christopherson Link: https://lore.kernel.org/r/20230330183827.1412303-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 984a785f25e5b5db5fa673130b60dca6ca794406 Author: Ian Rogers Date: Thu Mar 30 11:38:26 2023 -0700 perf block-range: Move debug code behind ifndef NDEBUG Make good on a comment and avoid a unused-but-set-variable warning. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Sean Christopherson Link: https://lore.kernel.org/r/20230330183827.1412303-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit d1babea9c38282b58a6f822ab95027cba3165a42 Author: Ian Rogers Date: Thu Mar 30 11:38:25 2023 -0700 perf bench: Avoid NDEBUG warning With NDEBUG set the asserts are compiled out. This yields "unused-but-set-variable" variables. Move these variables behind NDEBUG to avoid the warning. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Sean Christopherson Link: https://lore.kernel.org/r/20230330183827.1412303-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0372358a094011663e86f695e81be3b96a93b468 Author: Ian Rogers Date: Wed Mar 29 09:23:18 2023 -0700 perf vendor events: Update Alderlake for E-Core TMA v2.3 https://github.com/intel/perfmon/pull/65 Generated by: https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py The PR notes state: - E-Core TMA version 2.3. - FP_UOPS changed to FPDIV_Uops - Added BR_MISP breakdown stats - Frontend_Bandwidth/Latency changed to Fetch_Bandwidth/Latency - Load_Store_Bound changed to Memory_Bound - Icache changed to ICache_Misses - ITLB changed to ITLB_Misses - Store_Fwd changed to Store_Fwd_Blk Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230329162318.1227114-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 57594454ceb92defaa0707cf29289f0c3c266ede Author: Ian Rogers Date: Tue Mar 28 16:55:43 2023 -0700 perf symbol: Add command line support for addr2line path Allow addr2line to be set either on the command line or via the perfconfig file. This doesn't currently work with llvm-addr2line as the addr2line code emits two things: 1) the address to decode, 2) a bogus ',' value. The expectation is the bogus value will generate: ?? ??:0 that terminates the addr2line reading. However, the output from llvm-addr2line is a single line with just the input ',' locking up the addr2line reading that is expecting a second line. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Andres Freund Cc: German Gomez Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Sandipan Das Cc: Tom Rix Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230328235543.1082207-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0b02b47e71fa0e006407efd4f647b0e1336a2e8c Author: Ian Rogers Date: Tue Mar 28 16:55:42 2023 -0700 perf annotate: Allow objdump to be set in perfconfig Allow the setting of the objdump command in the perfconfig. Update man page for this new option. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Andres Freund Cc: German Gomez Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Sandipan Das Cc: Tom Rix Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230328235543.1082207-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 56d9117c5004e7192d8062da67fef220e4fdcd19 Author: Ian Rogers Date: Tue Mar 28 16:55:41 2023 -0700 perf annotate: Own objdump_path and disassembler_style strings Make struct annotation_options own the strings objdump_path and disassembler_style, freeing them on exit. Add missing strdup for disassembler_style when read from a config file. Committer notes: Converted free(obj->member) to zfree(&obj->member) in annotation_options__exit() Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Andres Freund Cc: German Gomez Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Sandipan Das Cc: Tom Rix Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230328235543.1082207-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 217b7d41ea2038e52991b7a600a0b958330d8ae6 Author: Ian Rogers Date: Tue Mar 28 16:55:40 2023 -0700 perf annotate: Add init/exit to annotation_options remove default The annotation__default_options global variable was used to initialize annotation_options. Switch to the init/exit pattern as later changes will give ownership over strings and this will be necessary to avoid memory leaks. Committer note: Fix the GTK2=1 build, hist_entry__gtk_annotate() needs to receive a 'struct annotation_options' pointer. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Andres Freund Cc: German Gomez Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Sandipan Das Cc: Tom Rix Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230328235543.1082207-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8f08c363fd6c682d10f2b055d4287ad1e54e76ea Author: Ian Rogers Date: Tue Mar 28 16:55:39 2023 -0700 perf report: Additional config warnings If the default_sort_order isn't correctly strdup-ed warn and return an error. Debug warn if no option is matched. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Andres Freund Cc: German Gomez Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Sandipan Das Cc: Tom Rix Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230328235543.1082207-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 333b1b11179b7908e3f3a06a2208dcecb0c971ef Author: Ian Rogers Date: Tue Mar 28 16:55:38 2023 -0700 perf annotate: Delete session for debug builds Use the debug build indicator as the guide to free the session. This implements a behavior described in a comment, which is consequentially removed. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Andres Freund Cc: German Gomez Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Sandipan Das Cc: Tom Rix Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230328235543.1082207-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f5ceb159d30b87975a49b8a230ffa76bae6684b2 Author: Adrian Hunter Date: Thu Mar 16 21:41:56 2023 +0200 perf tools: Avoid warning in do_realloc_array_as_needed() do_realloc_array_as_needed() used memcpy() of zero size with a NULL pointer. Check the size first to avoid sanitize warning. Discovered using EXTRA_CFLAGS="-fsanitize=undefined -fsanitize=address". Reported-by: kernel test robot Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/oe-lkp/202303061424.6ad43294-yujie.liu@intel.com Link: https://lore.kernel.org/r/20230316194156.8320-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a2410b579c72242ac0f77b3768093d8c1b48012e Author: Adrian Hunter Date: Thu Mar 16 21:41:55 2023 +0200 perf symbols: Fix unaligned access in get_x86_64_plt_disp() Use memcpy() to avoid unaligned access. Discovered using EXTRA_CFLAGS="-fsanitize=undefined -fsanitize=address". Fixes: ce4c8e7966f317ef ("perf symbols: Get symbols for .plt.got for x86-64") Reported-by: kernel test robot Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/oe-lkp/202303061424.6ad43294-yujie.liu@intel.com Link: https://lore.kernel.org/r/20230316194156.8320-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c8bb2d76a40ac0ccf6303d369e536fddcde847fb Author: Adrian Hunter Date: Thu Mar 16 21:41:54 2023 +0200 perf symbols: Fix use-after-free in get_plt_got_name() Fix use-after-free in get_plt_got_name(). Discovered using EXTRA_CFLAGS="-fsanitize=undefined -fsanitize=address". Fixes: ce4c8e7966f317ef ("perf symbols: Get symbols for .plt.got for x86-64") Reported-by: kernel test robot Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/oe-lkp/202303061424.6ad43294-yujie.liu@intel.com Link: https://lore.kernel.org/r/20230316194156.8320-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 5d9df8731c0941f3add30f96745a62586a0c9d52 Author: Kajol Jain Date: Tue Mar 28 16:59:08 2023 +0530 perf vendor events power9: Remove UTF-8 characters from JSON files Commit 3c22ba5243040c13 ("perf vendor events powerpc: Update POWER9 events") added and updated power9 PMU JSON events. However some of the JSON events which are part of other.json and pipeline.json files, contains UTF-8 characters in their brief description. Having UTF-8 character could breaks the perf build on some distros. Fix this issue by removing the UTF-8 characters from other.json and pipeline.json files. Result without the fix: [command]# file -i pmu-events/arch/powerpc/power9/* pmu-events/arch/powerpc/power9/cache.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/floating-point.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/frontend.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/marked.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/memory.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/metrics.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/nest_metrics.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/other.json: application/json; charset=utf-8 pmu-events/arch/powerpc/power9/pipeline.json: application/json; charset=utf-8 pmu-events/arch/powerpc/power9/pmc.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/translation.json: application/json; charset=us-ascii [command]# Result with the fix: [command]# file -i pmu-events/arch/powerpc/power9/* pmu-events/arch/powerpc/power9/cache.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/floating-point.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/frontend.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/marked.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/memory.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/metrics.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/nest_metrics.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/other.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/pipeline.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/pmc.json: application/json; charset=us-ascii pmu-events/arch/powerpc/power9/translation.json: application/json; charset=us-ascii [command]# Fixes: 3c22ba5243040c13 ("perf vendor events powerpc: Update POWER9 events") Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Kajol Jain Acked-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Athira Rajeev Cc: Disha Goel Cc: Jiri Olsa Cc: Madhavan Srinivasan Cc: Sukadev Bhattiprolu Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/lkml/ZBxP77deq7ikTxwG@kernel.org/ Link: https://lore.kernel.org/r/20230328112908.113158-1-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit ecd4960d908e27e40b63a7046df2f942c148c6f6 Author: Yang Jihong Date: Fri Mar 24 03:27:02 2023 +0000 perf ftrace: Make system wide the default target for latency subcommand If no target is specified for 'latency' subcommand, the execution fails because - 1 (invalid value) is written to set_ftrace_pid tracefs file. Make system wide the default target, which is the same as the default behavior of 'trace' subcommand. Before the fix: # perf ftrace latency -T schedule failed to set ftrace pid After the fix: # perf ftrace latency -T schedule ^C# DURATION | COUNT | GRAPH | 0 - 1 us | 0 | | 1 - 2 us | 0 | | 2 - 4 us | 0 | | 4 - 8 us | 2828 | #### | 8 - 16 us | 23953 | ######################################## | 16 - 32 us | 408 | | 32 - 64 us | 318 | | 64 - 128 us | 4 | | 128 - 256 us | 3 | | 256 - 512 us | 0 | | 512 - 1024 us | 1 | | 1 - 2 ms | 4 | | 2 - 4 ms | 0 | | 4 - 8 ms | 0 | | 8 - 16 ms | 0 | | 16 - 32 ms | 0 | | 32 - 64 ms | 0 | | 64 - 128 ms | 0 | | 128 - 256 ms | 4 | | 256 - 512 ms | 2 | | 512 - 1024 ms | 0 | | 1 - ... s | 0 | | Fixes: 53be50282269b46c ("perf ftrace: Add 'latency' subcommand") Signed-off-by: Yang Jihong Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230324032702.109964-1-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit ece7f7c0507cc147f72e117e22732091db758885 Author: Tiezhu Yang Date: Tue Mar 21 14:57:01 2023 +0800 perf bench syscall: Add fork syscall benchmark This is a follow up patch for the execve bench which is actually fork + execve, it makes sense to add the fork syscall benchmark to compare the execve part precisely. Some archs have no __NR_fork definition which is used only as a check condition to call test_fork(), let us just define it as -1 to avoid build error. Suggested-by: Namhyung Kim Signed-off-by: Tiezhu Yang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: loongson-kernel@lists.loongnix.cn Link: https://lore.kernel.org/r/1679381821-22736-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit 51ea4cb96f35ae2f31d45d9a0dbf30da13bbe441 Author: Thomas Richter Date: Thu Mar 16 08:49:46 2023 +0100 perf stat: Suppress warning when using cpum_cf events on s390 Running command perf stat -vv -e cpu_cycles -C0 -- true displays this warning: Attempting to add event pmu 'cpum_cf' with 'cpu_cycles,' that may result in non-fatal errors Make the PMU cpum_cf selectable and avoid this warning. While at it also fix this warning for PMUs pai_crypto and pai_ext. Output before: # ./perf stat -vv -e cpu_cycles -C0 -- true Using CPUID IBM,3931,704,A01,3.7,002f Attempting to add event pmu 'cpum_cf' with 'cpu_cycles,' that may result in non-fatal errors After aliases, add event pmu 'cpum_cf' with 'event,' that may result in non-fatal errors cpu_cycles -> cpum_cf/event=0/ Control descriptor is not initialized ------------------------------------------------------------ perf_event_attr: type 10 size 128 config 0x1001 sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 = 3 cpu_cycles: 0: 290434 2479172 2479172: cpu_cycles: 290434 2479172 2479172 Performance counter stats for 'CPU(s) 0': 290,434 cpu_cycles 0.002465617 seconds time elapsed # Now the warning "Attempting to add event pmu 'cpum_cf' ..." does not show up anymore. Output after: # ./perf stat -vv -e cpu_cycles -C0 -- true Using CPUID IBM,3931,704,A01,3.7,002f After aliases, add event pmu 'cpum_cf' with 'event,' that may result in non-fatal errors cpu_cycles -> cpum_cf/event=0/ Control descriptor is not initialized .... Performance counter stats for 'CPU(s) 0': 357,023 cpu_cycles 0.002454995 seconds time elapsed # Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20230316074946.41110-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 7f8d3fbe094be59a286f3b43431668221123ff30 Author: Patrice Duroux Date: Fri Mar 3 20:20:56 2023 +0100 perf tests test_bridge_fdb_stress.sh: Fix redirection of stderr to stdin It's not 2&>1, the correct is 2>&1. Signed-off-by: Patrice Duroux Cc: linux-kselftest@vger.kernel.org Link: https://lore.kernel.org/r/20230303193058.21274-1-patrice.duroux@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 9835b742ac3ee16dee361e7ccda8022f99d1cd94 Author: Patrice Duroux Date: Fri Mar 3 20:30:58 2023 +0100 perf tests record_offcpu.sh: Fix redirection of stderr to stdin It's not 2&>1, the correct is 2>&1 Fixes: ade1d0307b2fb3d9 ("perf offcpu: Update offcpu test for child process") Signed-off-by: Patrice Duroux Acked-by: Ian Rogers Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230303193058.21274-1-patrice.duroux@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 31c5ba6c2556f80842d464ed743aff50890c8208 Author: Ian Rogers Date: Fri Mar 24 00:22:18 2023 -0700 perf vendor events intel: Update metrics to detect pmem at runtime By detecting whether nvdimms are installed at runtime the number of events can be reduced if it isn't. These changes come from this PR: https://github.com/intel/perfmon/pull/63 Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Dan Williams Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Samantha Alt Cc: Weilin Wang Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit c3bf86f11dc9a11afb83b33f9640bf86adfb1b28 Author: Ian Rogers Date: Fri Mar 24 00:22:17 2023 -0700 perf metrics: Add has_pmem literal Add literal so that if nvdimms aren't installed we can record fewer events. The file detection mechanism was suggested by Dan Williams in: https://lore.kernel.org/linux-perf-users/641bbe1eced26_1b98bb29440@dwillia2-xfh.jf.intel.com.notmuch/ Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Dan Williams Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Samantha Alt Cc: Weilin Wang Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit e559b6f53b1b36fd69291962104fa86edf3dadf4 Author: Ian Rogers Date: Fri Mar 24 00:22:16 2023 -0700 perf vendor events intel: Sandybridge v19 events Adds BR_MISP_EXEC.INDIRECT event. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Dan Williams Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Samantha Alt Cc: Weilin Wang Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 101a25b5d96d5ca06e11d07bb83fd72886407fe4 Author: Ian Rogers Date: Fri Mar 24 00:22:15 2023 -0700 perf vendor events intel: Jaketown v23 events Adds BR_MISP_EXEC.INDIRECT event. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Dan Williams Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Samantha Alt Cc: Weilin Wang Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 6e884dad09722abd6ea23a27acc041ba767bdb88 Author: Ian Rogers Date: Fri Mar 24 00:22:14 2023 -0700 perf vendor events intel: Haswellx v27 events Updates descriptions and encodings. Adds BR_MISP_EXEC.INDIRECT events. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Dan Williams Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Samantha Alt Cc: Weilin Wang Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 67245a7eea604b61ce7973329c1bb99d5e35dcf7 Author: Ian Rogers Date: Fri Mar 24 00:22:13 2023 -0700 perf vendor events intel: Haswell v33 events Updates descriptions and encodings. Adds BR_MISP_EXEC.INDIRECT events. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Dan Williams Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Samantha Alt Cc: Weilin Wang Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 74a87b6aa275ced4908cd04ba443e49cda2294e1 Author: Ian Rogers Date: Fri Mar 24 00:22:12 2023 -0700 perf vendor events intel: Broadwellx v20 events Updates descriptions and encodings. Adds BR_MISP_EXEC.INDIRECT events. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Dan Williams Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Samantha Alt Cc: Weilin Wang Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8aae803f66aa070fc5062fdaabaeaddb4cf18bf8 Author: Ian Rogers Date: Fri Mar 24 00:22:11 2023 -0700 perf vendor events intel: Broadwellde v9 events Updates descriptions and encodings. Adds BR_MISP_EXEC.INDIRECT events. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Dan Williams Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Samantha Alt Cc: Weilin Wang Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 7803654576db93c49be73ff02d53030558c971b7 Author: Ian Rogers Date: Fri Mar 24 00:22:10 2023 -0700 perf vendor events intel: Broadwell v27 events Description updates and formatting changes. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Dan Williams Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Cc: Samantha Alt Cc: Weilin Wang Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230324072218.181880-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 5d8c0f0e11852d22fc3464c82453ddd1286f5d72 Author: Namhyung Kim Date: Thu Mar 23 17:19:22 2023 -0700 perf lock contention: Fix msan issue in lock_contention_read() I got a report of a msan failure like below: $ sudo perf lock con -ab -- sleep 1 ... ==224416==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x5651160d6c96 in lock_contention_read util/bpf_lock_contention.c:290:8 #1 0x565115f90870 in __cmd_contention builtin-lock.c:1919:3 #2 0x565115f90870 in cmd_lock builtin-lock.c:2385:8 #3 0x565115f03a83 in run_builtin perf.c:330:11 #4 0x565115f03756 in handle_internal_command perf.c:384:8 #5 0x565115f02d53 in run_argv perf.c:428:2 #6 0x565115f02d53 in main perf.c:562:3 #7 0x7f43553bc632 in __libc_start_main #8 0x565115e865a9 in _start It was because the 'key' variable is not initialized. Actually it'd be set by bpf_map_get_next_key() but msan didn't seem to understand it. Let's make msan happy by initializing the variable. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230324001922.937634-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit eb2feb68cb7d404288493c41480843bc9f404789 Author: Thomas Richter Date: Thu Mar 23 13:25:32 2023 +0100 perf vendor events s390: Remove UTF-8 characters from JSON file Commit 7f76b31130680fb3 ("perf list: Add IBM z16 event description for s390") contains the verbal description for z16 extended counter set. However some entries of the public description contain UTF-8 characters which breaks the build on some distros. Fix this and remove the UTF-8 characters. Fixes: 7f76b31130680fb3 ("perf list: Add IBM z16 event description for s390") Reported-by: Arnaldo Carvalho de Melo Suggested-by: Heiko Carstens Signed-off-by: Thomas Richter Tested-by: Arnaldo Carvalho de Melo Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Thomas Richter Cc: Vasily Gorbik Link: https://lore.kernel.org/r/ZBwkl77/I31AQk12@osiris Signed-off-by: Arnaldo Carvalho de Melo commit 6094c7744bb0563e833e81d8df8513f9a4e7a257 Author: Namhyung Kim Date: Wed Mar 22 19:50:05 2023 -0700 perf hist: Improve srcfile sort key performance (really) The earlier commit f0cdde28fecc0d7f ("perf hist: Improve srcfile sort key performance") updated the srcfile logic but missed to change the ->cmp() callback which is called for every sample. It should use the same logic like in the srcline to speed up the processing because it'd return the same information repeatedly for the same address. The real processing will be done in sort__srcfile_collapse(). Fixes: f0cdde28fecc0d7f ("perf hist: Improve srcfile sort key performance") Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230323025005.191239-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 30df88a80f32ccca5c5cdcf2710d1fb2de5e314d Author: Thomas Richter Date: Wed Mar 22 10:47:31 2023 +0100 perf test: Fix wrong size expectation for 'Setup struct perf_event_attr' The test case "perf test 'Setup struct perf_event_attr'" is failing. On s390 this output is observed: # ./perf test -Fvvvv 17 17: Setup struct perf_event_attr : --- start --- running './tests/attr/test-stat-C0' Using CPUID IBM,8561,703,T01,3.6,002f ..... Event event:base-stat fd = 1 group_fd = -1 flags = 0|8 cpu = * type = 0 size = 128 <<<--- wrong, specified in file base-stat config = 0 sample_period = 0 sample_type = 65536 ... 'PERF_TEST_ATTR=/tmp/tmpgw574wvg ./perf stat -o \ /tmp/tmpgw574wvg/perf.data -e cycles -C 0 kill >/dev/null \ 2>&1 ret '1', expected '1' loading result events Event event-0-0-4 fd = 4 group_fd = -1 cpu = 0 pid = -1 flags = 8 type = 0 size = 136 <<<--- actual size used in system call ..... compare matching [event-0-0-4] to [event:base-stat] [cpu] 0 * [flags] 8 0|8 [type] 0 0 [size] 136 128 ->FAIL match: [event-0-0-4] matches [] expected size=136, got 128 FAILED './tests/attr/test-stat-C0' - match failure This mismatch is caused by commit 09519ec3b19e ("perf: Add perf_event_attr::config3") which enlarges the structure perf_event_attr by 8 bytes. Fix this by adjusting the expected value of size. Output after: # ./perf test -Fvvvv 17 17: Setup struct perf_event_attr : --- start --- running './tests/attr/test-stat-C0' Using CPUID IBM,8561,703,T01,3.6,002f ... matched compare matching [event-0-0-4] to [event:base-stat] [cpu] 0 * [flags] 8 0|8 [type] 0 0 [size] 136 136 .... ->OK match: [event-0-0-4] matches ['event:base-stat'] matched Fixes: 09519ec3b19e4144 ("perf: Add perf_event_attr::config3") Signed-off-by: Thomas Richter Acked-by: Namhyung Kim Cc: Heiko Carstens Cc: Rob Herring Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Will Deacon Link: https://lore.kernel.org/r/20230322094731.1768281-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 1d7966547e11b1355f88086c26eb2086f6ea4770 Author: Ian Rogers Date: Wed Mar 22 11:31:08 2023 -0700 perf build: Add warning for when vmlinux.h generation fails The warning advises on the NO_BPF_SKEL=1 option. Suggested-by: Stephen Rothwell Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230322183108.1380882-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 46d21ec067490ab9cdcc89b9de5aae28786a8b8e Author: Artem Savkov Date: Thu Mar 16 14:35:57 2023 +0100 perf report: Append inlines to non-DWARF callchains Append information about inlined functions to FP and LBR callchains from DWARF debuginfo when available. Do so by calling append_inlines() from add_callchain_ip(). Testing it: Frame-pointer mode recorded with 'perf record --call-graph=fp --freq=max -- ./a.out' #include #include static __attribute__((noinline)) uint32_t func5(uint32_t i) { return i + 10; } static uint32_t func4(uint32_t i) { return func5(i + 5); } static inline uint32_t func3(uint32_t i) { return func4(i + 4); } static __attribute__((noinline)) uint32_t func2(uint32_t i) { return func3(i + 3); } static uint32_t func1(uint32_t i) { return func2(i + 2); } __attribute__((noinline)) uint64_t entry(void) { uint64_t ret = 0; uint32_t i = 0; for (i = 0; i < 1000000; i++) { ret += func1(i); ret -= func2(i); ret += func3(i); ret += func4(i); ret -= func5(i); } return ret; } int main(int argc, char **argv) { printf("%s\n", __func__); return entry(); } ====== Here is the output I get with '--call-graph callee --no-children' ====== # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 250 of event 'cycles:u' # Event count (approx.): 26819859 # # Overhead Command Shared Object Symbol # ........ ....... .................... ..................................... # 43.58% a.out a.out [.] func5 | |--28.93%--entry | main | __libc_start_call_main | --14.65%--func4 (inlined) | |--10.45%--entry | main | __libc_start_call_main | --4.20%--func3 (inlined) entry main __libc_start_call_main 38.80% a.out a.out [.] entry | |--23.27%--func4 (inlined) | | | |--20.28%--func3 (inlined) | | func2 | | main | | __libc_start_call_main | | | --2.99%--entry | main | __libc_start_call_main | |--8.17%--func5 | main | __libc_start_call_main | |--3.89%--func1 (inlined) | entry | main | __libc_start_call_main | --3.48%--entry main __libc_start_call_main 13.07% a.out a.out [.] func2 | ---func5 main __libc_start_call_main 1.54% a.out [unknown] [k] 0xffffffff81e011b7 1.16% a.out [unknown] [k] 0xffffffff81e00193 | --0.57%--__mmap64 (inlined) __mmap64 (inlined) 0.34% a.out ld-linux-x86-64.so.2 [.] __tunable_get_val 0.34% a.out ld-linux-x86-64.so.2 [.] strcmp 0.32% a.out libc.so.6 [.] strchr 0.31% a.out ld-linux-x86-64.so.2 [.] _dl_relocate_object 0.22% a.out ld-linux-x86-64.so.2 [.] _dl_init_paths 0.18% a.out ld-linux-x86-64.so.2 [.] get_common_cache_info.constprop.0 0.14% a.out ld-linux-x86-64.so.2 [.] __GI___tunables_init # # (Tip: Show individual samples with: perf script) # ====== It does not seem to be out of order, or at least it is consistent with what I get with dwarf unwinders. Committer notes: Adrian Hunter pointed out that this breaks --branch-history, so don't do it for branches, see the second Link below. Suggested-by: Andrii Nakryiko Signed-off-by: Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Milian Wolff Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230316133557.868731-2-asavkov@redhat.com Link: https://lore.kernel.org/r/54129783-2960-84e1-05e9-97ac70ffb432@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 13a53ebc229996f424bbf7db466f1ff96f73e8a5 Author: Maxim Schwalm Date: Wed Mar 29 12:04:01 2023 +0300 ARM: tegra30: Use cpu* labels Replace cpu paths with labels since those already exist in tree. Signed-off-by: Maxim Schwalm Signed-off-by: Svyatoslav Ryhel Signed-off-by: Thierry Reding commit b3f65f45303f2453f477044cd02f8285a4c65bf0 Author: Svyatoslav Ryhel Date: Wed Mar 29 12:04:03 2023 +0300 ARM: tegra30: peripherals: Add 266.5MHz nodes LG Optimus Vu (p895) and Optimus 4X HD (p880) have 266.5MHz RAM clock and require this entry to work with it correctly. Signed-off-by: Svyatoslav Ryhel Signed-off-by: Thierry Reding commit 62a4276877d21fe8f42085b25db8351de9406643 Author: Svyatoslav Ryhel Date: Wed Mar 29 12:04:02 2023 +0300 ARM: tegra: asus-tf101: Fix accelerometer mount matrix Accelerometer mount matrix used in tf101 downstream is inverted. This new matrix was generated on actual device using calibration script, like on other transformers. Tested-by: Robert Eckelmann Signed-off-by: Svyatoslav Ryhel Signed-off-by: Thierry Reding commit 9eb75fbf0569cc3280d545e138d6137da671d3ec Author: Uwe Kleine-König Date: Wed Mar 22 18:02:23 2023 +0100 drm/tegra: vic: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 3b6f890043d22955f860ec31710c746bc45955fd Author: Uwe Kleine-König Date: Wed Mar 22 18:02:22 2023 +0100 drm/tegra: sor: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 312f9e92e7749ecb565023aa3004cb8edec80c1b Author: Uwe Kleine-König Date: Wed Mar 22 18:02:21 2023 +0100 drm/tegra: nvdec: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit f9998eef32ad1128240e70861bcafc3bfb588719 Author: Uwe Kleine-König Date: Wed Mar 22 18:02:20 2023 +0100 drm/tegra: hub: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 4ef19206b23b49041a3eeb4ea132a213e4f7b78c Author: Uwe Kleine-König Date: Wed Mar 22 18:02:19 2023 +0100 drm/tegra: hdmi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit de9fce20c020db33d85f87687e6b30855d8d3e0f Author: Uwe Kleine-König Date: Wed Mar 22 18:02:18 2023 +0100 drm/tegra: gr3d: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit e12ce931bd4dc1040025e18ff08a872912542057 Author: Uwe Kleine-König Date: Wed Mar 22 18:02:17 2023 +0100 drm/tegra: gr2d: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 50a2a987c2a29f738885d9a9ebc7985c6a7e4e42 Author: Uwe Kleine-König Date: Wed Mar 22 18:02:16 2023 +0100 drm/tegra: dsi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 4b9aeb8d4a96567ae25ac9f4f42f8682f45c7b2b Author: Uwe Kleine-König Date: Wed Mar 22 18:02:15 2023 +0100 drm/tegra: dpaux: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 30d92e0fcd902bb8b1e465f5a0c7ea9596a9e381 Author: Uwe Kleine-König Date: Wed Mar 22 18:02:14 2023 +0100 drm/tegra: dc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 437405403ab4496cee65add5733f45a40b08c8c8 Author: Uwe Kleine-König Date: Wed Mar 22 18:02:13 2023 +0100 drm/tegra: rgb: Make tegra_dc_rgb_remove() return void This function returned zero unconditionally. Make it return no value and simplify all callers accordingly. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 55879dad0f3ae8468444b42f785ad79eac05fe5b Author: Yang Yingliang Date: Sat Nov 26 15:33:15 2022 +0800 gpu: host1x: Fix memory leak of device names The device names allocated by dev_set_name() need be freed before module unloading, but they can not be freed because the kobject's refcount which was set in device_initialize() has not be decreased to 0. As comment of device_add() says, if it fails, use only put_device() drop the refcount, then the name will be freed in kobejct_cleanup(). device_del() and put_device() can be replaced with device_unregister(), so call it to unregister the added successfully devices, and just call put_device() to the not added device. Add a release() function to device to avoid null release() function WARNING in device_release(), it's empty, because the context devices are freed together in host1x_memory_context_list_free(). Fixes: 8aa5bcb61612 ("gpu: host1x: Add context device management code") Signed-off-by: Yang Yingliang Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 8466ff24a37a9a18fb935e90dda64f049131ae28 Author: Yang Yingliang Date: Sat Nov 26 15:33:14 2022 +0800 gpu: host1x: Fix potential double free if IOMMU is disabled If context device has no IOMMU, the 'cdl->devs' is freed in error path, but host1x_memory_context_list_init() doesn't return an error code, so the module can be loaded successfully, when it's unloading, the host1x_memory_context_list_free() is called in host1x_remove(), it will cause double free. Set the 'cdl->devs' to NULL after freeing it to avoid double free. Fixes: 8aa5bcb61612 ("gpu: host1x: Add context device management code") Signed-off-by: Yang Yingliang Reviewed-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 791b5ecece5e6c22aa9aa55b7a9ee827a971a799 Author: Ye Xingchen Date: Wed Feb 8 15:41:56 2023 +0800 gpu: host1x: mipi: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Signed-off-by: Thierry Reding commit c1aaee94380874fd40f7bb8417c597aba3f72c75 Author: Mikko Perttunen Date: Wed Mar 1 15:51:06 2023 +0200 gpu: host1x: Don't rely on dma_fence_wait_timeout return value dma_fence_wait_timeout (along with a host of other jiffies-based timeouting functions) returns zero both in case of timeout and when the wait completes during the last jiffy before timeout. As such, we can't rely on it to distinguish between success and timeout. To prevent confusing callers by returning -EAGAIN before the timeout period has elapsed, check if the fence got signaled again after the wait. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 6ce7995a43febe693d4894033c6e29314970646a Author: Corey Minyard Date: Tue Apr 4 12:09:14 2023 +0000 ipmi:ssif: Add send_retries increment A recent change removed an increment of send_retries, re-add it. Fixes: 95767ed78a18 ipmi:ssif: resend_msg() cannot fail Reported-by: Pavel Machek Cc: stable@vger.kernel.org Signed-off-by: Corey Minyard commit b0bbe5a2915201e3231e788d716d39dc54493b03 Author: Nysal Jan K.A Date: Fri Feb 24 16:09:40 2023 +0530 powerpc/atomics: Remove unused function Remove arch_atomic_try_cmpxchg_lock function as it is no longer used since commit 9f61521c7a28 ("powerpc/qspinlock: powerpc qspinlock implementation") Signed-off-by: Nysal Jan K.A Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20230224103940.1328725-1-nysal@linux.ibm.com commit ac9c8901cb10aab043bf3599d19eebacfcda2858 Author: Nicholas Miehlbradt Date: Tue Feb 28 05:43:55 2023 +0000 powerpc: Implement arch_within_stack_frames Walks the stack when copy_{to,from}_user address is in the stack to ensure that the object being copied is entirely a single stack frame and does not contain stack metadata. Substantially similar to the x86 implementation. The back chain is used to traverse the stack and identify stack frame boundaries. Signed-off-by: Nicholas Miehlbradt Signed-off-by: Michael Ellerman Link: https://msgid.link/20230228054355.300628-1-nicholas@linux.ibm.com commit 2500763dd3db37fad94d9b506907c59c2f5e97c6 Author: Rob Herring Date: Wed Mar 29 17:03:36 2023 -0500 powerpc: Use of_address_to_resource() Replace open coded reading of "reg" or of_get_address()/ of_translate_address() calls with a single call to of_address_to_resource(). Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman Link: https://msgid.link/20230329220337.141295-1-robh@kernel.org commit 83a8fe569ef84d6eefcb99420a731cb87508f004 Author: Rob Herring Date: Mon Mar 27 17:31:09 2023 -0500 powerpc/usbgecko: Use of_iomap() Replace of_get_property()+of_translate_address()+ioremap() with a call to of_iomap() which does all those steps. Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman Link: https://msgid.link/20230327223109.820381-1-robh@kernel.org commit de8d11bc6ec412a498acf795911c8597ae37d4e7 Author: Rob Herring Date: Mon Mar 27 17:31:02 2023 -0500 powerpc/fsl_rio: Use of_iomap() Replace of_address_to_resource()+ioremap() with a call to of_iomap() which does both of those steps. Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman Link: https://msgid.link/20230327223103.820229-1-robh@kernel.org commit 037c47a436eab2d336d5e131ab1c1394f223a57b Author: Rob Herring Date: Mon Mar 27 17:30:56 2023 -0500 powerpc/xics: Use of_address_count() icp_native_init_one_node() only needs the number of entries in "reg". Replace the open coded "reg" parsing with of_address_count() to get the number of "reg" entries. Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman Link: https://msgid.link/20230327223056.820086-1-robh@kernel.org commit e4ab08be5b4902e5b350b0e1e1a3c25eb21d76d4 Author: Rob Herring Date: Mon Mar 27 17:30:45 2023 -0500 powerpc/isa-bridge: Remove open coded "ranges" parsing "ranges" is a standard property with common parsing functions. Users shouldn't be implementing their own parsing of it. Reimplement the ISA brige "ranges" parsing using the common ranges iterator functions. The common routines are flexible enough to work on PCI and non-PCI to ISA bridges, so refactor pci_process_ISA_OF_ranges() and isa_bridge_init_non_pci() into a single implementation. Signed-off-by: Rob Herring [mpe: Unsplit some strings and use pr_xxx()] Signed-off-by: Michael Ellerman Link: https://msgid.link/20230327223045.819852-1-robh@kernel.org commit 2837dbcef122c0ed2ae47a6c50211725c0dd373f Merge: 87b626a66dd4a a3800ef9c48c4 Author: Michael Ellerman Date: Tue Apr 4 22:10:32 2023 +1000 Merge branch 'topic/ppc-kvm' into next Merge our KVM topic branch to bring some KVM commits into next for wider testing. commit 1d83d1a2df0bfb6bd79400746c289e2c4edc5909 Author: Uwe Kleine-König Date: Wed Mar 22 18:02:12 2023 +0100 gpu: host1x: Make host1x_client_unregister() return void This function returned zero unconditionally. Make it return no value and simplify all callers accordingly. Signed-off-by: Uwe Kleine-König Acked-by: Hans Verkuil Signed-off-by: Thierry Reding commit 22b9442a6ad8f43994ff96d2a38bee9cea4d6641 Author: Thierry Reding Date: Tue Apr 4 13:55:20 2023 +0200 MAINTAINERS: Add Mikko as backup maintainer for Tegra DRM Mikko has been involved as the primary author of the host1x driver and has volunteered to help out with maintenance. Signed-off-by: Thierry Reding commit 9d2e77ff2bd3b94c930a1f5b75abada7e196fa6d Author: Aswath Govindraju Date: Fri Mar 31 15:46:18 2023 +0530 mmc: sdhci_am654: Add support for PM suspend/resume Add support for suspend/resume and pm_runtime resume/suspend. Signed-off-by: Aswath Govindraju Signed-off-by: Georgi Vlaev Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230331101619.4117312-1-vigneshr@ti.com Signed-off-by: Ulf Hansson commit dea8e70f68f4105279bbc6de4d68d89fb07665c2 Author: Uwe Kleine-König Date: Thu Mar 30 23:03:41 2023 +0200 spi: qup: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230330210341.2459548-3-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 69d286c5293a35cbf2de3efe3cf4a47bdd264b92 Author: Yang Li Date: Tue Mar 28 14:10:31 2023 +0800 spi: tegra210-quad: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230328061031.70140-2-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 05c79f71e357a566de887efa55672c8a36569f60 Author: Yang Li Date: Tue Mar 28 14:10:30 2023 +0800 spi: tegra114: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230328061031.70140-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 75c1b5fc493c21ebe524e9e5bb8501bb351ad94a Author: Yang Li Date: Tue Mar 28 14:18:39 2023 +0800 spi: stm32: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230328061839.82185-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit d909451ce1db59ba0281fc65ee03d8933d623574 Author: Yang Li Date: Tue Mar 28 14:26:00 2023 +0800 spi: imx: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230328062600.93160-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 87c614175bbf28d3fd076dc2d166bac759e41427 Author: Kevin Groeneveld Date: Sat Mar 18 18:21:32 2023 -0400 spi: spi-imx: fix MX51_ECSPI_* macros when cs > 3 When using gpio based chip select the cs value can go outside the range 0 – 3. The various MX51_ECSPI_* macros did not take this into consideration resulting in possible corruption of the configuration. For example for any cs value over 3 the SCLKPHA bits would not be set and other values in the register possibly corrupted. One way to fix this is to just mask the cs bits to 2 bits. This still allows all 4 native chip selects to work as well as gpio chip selects (which can use any of the 4 chip select configurations). Signed-off-by: Kevin Groeneveld Link: https://lore.kernel.org/r/20230318222132.3373-1-kgroeneveld@lenbrook.com Signed-off-by: Mark Brown commit 61f49171a43ab1f80c73c5c88c508770c461e0f2 Author: Uwe Kleine-König Date: Thu Mar 30 23:03:40 2023 +0200 spi: qup: Don't skip cleanup in remove's error path Returning early in a platform driver's remove callback is wrong. In this case the dma resources are not released in the error path. this is never retried later and so this is a permanent leak. To fix this, only skip hardware disabling if waking the device fails. Fixes: 64ff247a978f ("spi: Add Qualcomm QUP SPI controller support") Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230330210341.2459548-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 451941ac1ee2be125ac5029593a64b04badaa314 Author: Mark Brown Date: Mon Apr 3 21:02:39 2023 +0100 regmap: Fix double unlock in the maple cache Doing the dance to drop the maple tree's internal spinlock means we need multiple exit paths in our error handling. Reported-by: Liam R. Howlett Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230403-regmap-maple-unlock-v1-1-89998991b16c@kernel.org Signed-off-by: Mark Brown commit 194f8692302cbf31d8072f3fc2710fb04720d8a0 Author: Zihao Wang Date: Tue Apr 4 16:46:22 2023 +0800 ASoC: tegra20_ac97: Add missing unwind goto in tegra20_ac97_platform_probe() Smatch Warns: sound/soc/tegra/tegra20_ac97.c:321 tegra20_ac97_platform_probe() warn: missing unwind goto? The goto will set the "soc_ac97_ops" and "soc_ac97_bus" operations to NULL. But they are already NULL at this point so it is a no-op. However, just for consistency, change the direct return to a goto. No functional change. Signed-off-by: Zihao Wang Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20230404084622.1202-1-u202012060@hust.edu.cn Signed-off-by: Mark Brown commit 5962c2a527b52b95426167ba59a2ef01a522d077 Author: Peter Ujfalusi Date: Tue Apr 4 12:21:15 2023 +0300 ASoC: SOF: Intel: pci-tgl: Allow DSPless mode set the dspless_mode_supported flag to true for tgl/adl family to allow DSPless mode. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230404092115.27949-13-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit f45b1fd61e874cae0217c04406f8e99d57ddfacc Author: Peter Ujfalusi Date: Tue Apr 4 12:21:14 2023 +0300 ASoC: SOF: Intel: pci-skl: Allow DSPless mode set the dspless_mode_supported flag to true for skl family to allow DSPless mode. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230404092115.27949-12-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit b58bbd067585af1f38cc24dbeccf98218c717281 Author: Peter Ujfalusi Date: Tue Apr 4 12:21:13 2023 +0300 ASoC: SOF: Intel: pci-mtl: Allow DSPless mode set the dspless_mode_supported flag to true for mtl family to allow DSPless mode. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230404092115.27949-11-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 937a7fb441f5f1796398e171eef479de34a7c64f Author: Peter Ujfalusi Date: Tue Apr 4 12:21:12 2023 +0300 ASoC: SOF: Intel: pci-icl: Allow DSPless mode set the dspless_mode_supported flag to true for icl/jsl family to allow DSPless mode. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230404092115.27949-10-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit a417d71fd3f6a60d1cda0abf62e7961489908dca Author: Peter Ujfalusi Date: Tue Apr 4 12:21:11 2023 +0300 ASoC: SOF: Intel: pci-cnl: Allow DSPless mode set the dspless_mode_supported flag to true for cnl/cfl/cml family to allow DSPless mode. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230404092115.27949-9-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 04957f87ae7e862216a3bc901710c82de55c4078 Author: Peter Ujfalusi Date: Tue Apr 4 12:21:10 2023 +0300 ASoC: SOF: Intel: pci-apl: Allow DSPless mode set the dspless_mode_supported flag to true for apl family to allow DSPless mode. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230404092115.27949-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 9fc6786f549c4d71e55bd646ffb4814933286072 Author: Pierre-Louis Bossart Date: Tue Apr 4 12:21:09 2023 +0300 ASoC: SOF: Intel: hda: make DSPless mode work with DSP disabled in BIOS When the DSP is disabled in the BIOS, the DSP_BAR and PP_BAR cannot be accessed. One possible objection noted in initial reviews is that this patch adds a number of branches. However the number of branches is actually limited in probe/suspend/resume routines mostly, so there isn't really a degradation in terms of readability and maintainability. Adding yet another level of abstraction/ops/callbacks would increase complexity and not really help in terms of code reuse or readability and maintainability. A split between controller and DSP driver would be even more invasive. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230404092115.27949-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 1f7b5d52be130e16fda60be446b30136698738c6 Author: Peter Ujfalusi Date: Tue Apr 4 12:21:08 2023 +0300 ASoC: SOF: Intel: hda: Add support for DSPless mode Via the SOF_DBG_DSPLESS_MODE sof_debug flag the SOF stack can be asked to not use the DSP for audio. The use of DSPless mode is governed by the sdev->dspless_mode_selected flag which is only going to be set if the user sets sof_debug=0x8000 and the platform advertises that the DSPless mode is supported on them. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230404092115.27949-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 4a3b1433a8d384ff8d668b4f8665d6c67dbb30d3 Author: Peter Ujfalusi Date: Tue Apr 4 12:21:07 2023 +0300 ASoC: SOF: Intel: hda: Skip interfaces not supported on a platform Not all interfaces (SSP/DMIC/HDA/SDW) are available on all platforms. If the interface is not even supported then there is no point in executing a probe or query for that interface. Introduce a simple function (hda_get_interface_mask) to query the interfaces supported on the platform. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230404092115.27949-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 28d40e7adfd4108c11c9397c6fe9d9f80fed31e9 Author: Peter Ujfalusi Date: Tue Apr 4 12:21:06 2023 +0300 ASoC: SOF: Add support for DSPless mode Via the SOF_DBG_DSPLESS_MODE sof_debug flag the SOF stack can be asked to not use the DSP for audio. The core's support for DSPless mode is only going to be enabled if the platform reports that it can be used without DSP. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230404092115.27949-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 59611370f92923089ceb284072d01445164a0191 Author: Peter Ujfalusi Date: Tue Apr 4 12:21:05 2023 +0300 ASoC: SOF: Add flag and state which will be used for DSP-less mode The DSPless mode of the ASoC/SOF driver can be used for hardware verification and debug on platforms with HDaudio codecs. The DSP mode is still needed on existing platforms for SSP, DMIC, SoundWire interfaces managed by the GP-DMA. This mode is also helpful to compare the legacy HDaudio driver with the ASoC/SOF driver wrt. codec management and handling. In theory we use the same code but differences are sometimes seen on jack detection and event handling. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230404092115.27949-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 09255c7ed8ca1f1ed99357b845d2f63fe2ef3e1e Author: Peter Ujfalusi Date: Tue Apr 4 12:21:04 2023 +0300 ASoC: SOF: Intel: hda-stream: Do not dereference hstream until it is safe Only access hext_stream->hstream after it has been checked for NULL pointer Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20230404092115.27949-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit e63472eda5ea84424e4bff2b809389b0ba266613 Author: Thierry Reding Date: Fri Mar 31 18:29:14 2023 +0200 arm64: tegra: Support Jetson Orin NX reference platform Add support for the combination of the NVIDIA Jetson Orin NX (P3767, SKU 0) module and the P3768 carrier board. Signed-off-by: Thierry Reding commit 13b0aca303e97500e6aa6fa7965c620394c67775 Author: Thierry Reding Date: Fri Mar 31 18:29:13 2023 +0200 arm64: tegra: Support Jetson Orin NX This adds a device tree for the Jetson Orin NX module, which is Jetson AGX Orin's little sibling with 6 or 8 ARM Cortex-A78AE cores, an Ampere GPU (1024 GPU and 32 tensor cores) and a number of accelerators for machine learning, image processing and more. The Jetson Orin NX comes with either 8 or 16 GiB of 128-bit LPDDR5 and supports NVME for mass storage. Signed-off-by: Thierry Reding commit d89baa52929f00e9052f61b4eef838ccc8ebf180 Author: Thierry Reding Date: Fri Mar 31 18:29:12 2023 +0200 dt-bindings: tegra: Document Jetson Orin NX reference platform Document the combination of the P3768 carrier board with the P3767 (Jetson Orin NX) module. Acked-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding commit 062dfd995e8cbaf47f6cbf8bcdf5525439ebaa5e Author: Thierry Reding Date: Fri Mar 31 18:29:11 2023 +0200 dt-bindings: tegra: Document Jetson Orin NX The Jetson Orin NX is the latest iteration in the NX family of Jetson products. Document the compatible strings used for these devices. Acked-by: Rob Herring Signed-off-by: Thierry Reding commit b103bab0944be030954e5de23851b37980218f54 Merge: b3803399196e9 b5d54eb5899a7 Author: Paolo Abeni Date: Tue Apr 4 12:46:26 2023 +0200 Merge branch 'vsock-return-errors-other-than-enomem-to-socket' Arseniy Krasnov says: ==================== vsock: return errors other than -ENOMEM to socket this patchset removes behaviour, where error code returned from any transport was always switched to ENOMEM. This works in the same way as patch from Bobby Eshleman: commit c43170b7e157 ("vsock: return errors other than -ENOMEM to socket"), but for receive calls. VMCI transport is also updated (both tx and rx SOCK_STREAM callbacks), because it returns VMCI specific error code to af_vsock.c (like VMCI_ERROR_*). Tx path is already merged to net, so it was excluded from patchset in v4. At the same time, virtio and Hyper-V transports are using general error codes, so there is no need to update them. vsock_test suite is also updated. Link to v1: https://lore.kernel.org/netdev/97f19214-ba04-c47e-7486-72e8aa16c690@sberdevices.ru/ Link to v2: https://lore.kernel.org/netdev/60abc0da-0412-6e25-eeb0-8e32e3ec21e7@sberdevices.ru/ Link to v3: https://lore.kernel.org/netdev/dead4842-333a-015e-028b-302151336ff9@sberdevices.ru/ ==================== Link: https://lore.kernel.org/r/0d20e25a-640c-72c1-2dcb-7a53a05e3132@sberdevices.ru Signed-off-by: Paolo Abeni commit b5d54eb5899a7c2d478909041446499f379c716c Author: Arseniy Krasnov Date: Mon Apr 3 14:26:18 2023 +0300 vsock/test: update expected return values This updates expected return values for invalid buffer test. Now such values are returned from transport, not from af_vsock.c. Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: Paolo Abeni commit 02ab696febab622c4c837d509f6825884c952c22 Author: Arseniy Krasnov Date: Mon Apr 3 14:25:12 2023 +0300 vsock: return errors other than -ENOMEM to socket This removes behaviour, where error code returned from any transport was always switched to ENOMEM. This works in the same way as: commit c43170b7e157 ("vsock: return errors other than -ENOMEM to socket"), but for receive calls. Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: Paolo Abeni commit f59f3006ca7b2fc9bf38fbf44e3dc4b1fbd686c1 Author: Arseniy Krasnov Date: Mon Apr 3 14:24:17 2023 +0300 vsock/vmci: convert VMCI error code to -ENOMEM on receive This adds conversion of VMCI specific error code to general -ENOMEM. It is preparation for the next patch, which changes af_vsock.c behaviour on receive to pass value returned from transport to the user. Signed-off-by: Arseniy Krasnov Reviewed-by: Vishnu Dasa Reviewed-by: Stefano Garzarella Signed-off-by: Paolo Abeni commit 92ba67347a3a6caa1843c81b0b48c48ccadf6915 Author: Sui Jingfeng Date: Tue Apr 4 12:01:01 2023 +0800 video/aperture: Fix typos in comments EFI FB, VESA FB or VGA FB etc belong to firmware based framebuffer driver. Signed-off-by: Sui Jingfeng Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230404040101.2165600-1-suijingfeng@loongson.cn commit fc187a46a8e682f0f1167b230792b88de01ceaa0 Author: Li Yang Date: Fri Mar 31 17:55:44 2023 +0800 soc: renesas: renesas-soc: Release 'chipid' from ioremap() Smatch reports: drivers/soc/renesas/renesas-soc.c:536 renesas_soc_init() warn: 'chipid' from ioremap() not released on lines: 475. If soc_dev_atrr allocation is failed, function renesas_soc_init() will return without releasing 'chipid' from ioremap(). Fix this by adding function iounmap(). Fixes: cb5508e47e60 ("soc: renesas: Add support for reading product revision for RZ/G2L family") Signed-off-by: Li Yang Reviewed-by: Dan Carpenter Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230331095545.31823-1-lidaxian@hust.edu.cn Signed-off-by: Geert Uytterhoeven commit 2f04079bf5920b5120407421478dff1d5692d959 Author: Geert Uytterhoeven Date: Tue Apr 4 09:10:08 2023 +0200 arm64: dts: renesas: r8a779a0: Revise renesas,ipmmu-main Since IMSSTR register was undocumented on the latest datasheet and dt-bindings of renesas,ipmmu-vmsa was updated about the renesas,ipmmu-main property, revise the property on each cache IPMMU node. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/ed4c21150e42dd23412a8f4af7976f81edc1c9c2.1680592069.git.geert+renesas@glider.be commit 741f99c7ff7c508cfc0ede760ea089993b2327c3 Author: Niklas Söderlund Date: Fri Mar 31 16:14:31 2023 +0200 arm64: dts: renesas: falcon-csi-dsi: Set bus-type for MAX96712 Specify the bus-type property for all three connected MAX96712. The default behavior when parsing a node without this property is to default to D-PHY. Making this explicit plays it safe and future proofs things as the default parsing comes from the V4L2 core and not the driver itself. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230331141431.3820311-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 166e023478696be40af1dd639af7ac89fea09003 Author: Yoshihiro Shimoda Date: Mon Jan 23 10:34:48 2023 +0900 arm64: dts: renesas: r8a779g0: Add iommus to MMC node Add iommus property to the MMC node for r8a779g0. Signed-off-by: Yoshihiro Shimoda Tested-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230123013448.1250991-6-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 00a9526b218edeb51bd5ee5b49c257e2214a1a26 Author: Yoshihiro Shimoda Date: Mon Jan 23 10:34:47 2023 +0900 arm64: dts: renesas: r8a779g0: Add iommus to DMAC nodes Add iommus properties to the DMAC nodes for r8a779g0. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230123013448.1250991-5-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 432d5fedafe686c9894f303107473938856b0a4b Author: Yoshihiro Shimoda Date: Mon Jan 23 10:34:46 2023 +0900 arm64: dts: renesas: r8a779g0: Add IPMMU nodes Add IPMMU nodes for r8a779g0. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20230123013448.1250991-4-yoshihiro.shimoda.uh@renesas.com [geert: Drop indices from renesas,ipmmu-main properties] [geert: s/hsc/hc/, s/vc0/vc/] Signed-off-by: Geert Uytterhoeven commit a1c11b345943ddebcc493bc18b7dc6e968834904 Author: Yoshihiro Shimoda Date: Mon Jan 23 10:34:44 2023 +0900 arm64: dts: renesas: r8a779f0: Revise renesas,ipmmu-main Since IMSSTR register was undocumented on the latest datasheet and dt-bindings of renesas,ipmmu-vmsa was updated about the renesas,ipmmu-main property, revise the property on each cache IPMMU node. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20230123013448.1250991-2-yoshihiro.shimoda.uh@renesas.com [geert: Drop indices from renesas,ipmmu-main properties] Signed-off-by: Geert Uytterhoeven commit aaee4bbe8a1aa6833d6c42c7015ae63c489fdeeb Author: Jani Nikula Date: Mon Apr 3 15:57:10 2023 +0300 drm/i915: enable kernel-doc warnings for CONFIG_DRM_I915_WERROR=y Increase awareness of kernel-doc issues by enabling doc check locally when CONFIG_DRM_I915_WERROR=y is enabled. Once the warnings have been fixed, we can pass -Werror to kernel-doc locally, and fail the build when there are kernel-doc warnings in i915. v2: Don't check for KBUILD_EXTRA_WARN (Masahiro) Cc: Masahiro Yamada Signed-off-by: Jani Nikula Acked-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230403125710.3617230-1-jani.nikula@intel.com commit 7f6947fd36f2c562040ad5a2d3d1783440a4aeb6 Author: Jani Nikula Date: Fri Mar 31 12:09:49 2023 +0300 drm/i915/psr: split out PSR regs to a separate file Clean up i915_reg.h by splitting out PSR regs to display/intel_psr_regs.h. Cc: Ville Syrjälä Reviewed-by: Nirmoy Das Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331090949.2858951-2-jani.nikula@intel.com commit 689e61a4fd6872537913b998101f364fe79a4f70 Author: Jani Nikula Date: Fri Mar 31 12:09:48 2023 +0300 drm/i915/wm: split out SKL+ watermark regs to a separate file Clean up i915_reg.h by splitting out SKL+ watermark regs to display/skl_watermark_regs.h. v2: Rebased Cc: Ville Syrjälä Reviewed-by: Nirmoy Das # v1 Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331090949.2858951-1-jani.nikula@intel.com commit c87c9b11c53cecab8e8a93290fa3b488e6838dab Author: Takahiro Kuwano Date: Fri Mar 31 07:46:06 2023 +0000 mtd: spi-nor: spansion: Determine current address mode Internal address mode (3- or 4-byte) affects to the address length in Read Any Reg op. Read Any Reg op is used in SMPT parse and other setup functions. Current driver assumes that address mode is factory default but users can change it via volatile and non-volatile registers. Current address mode can be checked by CFR2V[7] but Read Any Reg op is needed to read CFR2V (chicken-and-egg). Introduce a way to determine current address mode by comparing status register 1 values read by different address length. Suggested-by: Tudor Ambarus Signed-off-by: Takahiro Kuwano Link: https://lore.kernel.org/r/20230331074606.3559258-11-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit b6094ac83dd4fb4fa2849b804cc9fc1c70054852 Author: Tudor Ambarus Date: Fri Mar 31 07:46:05 2023 +0000 mtd: spi-nor: core: Introduce spi_nor_set_4byte_addr_mode() Make the method public, as it will be used as a last resort to enable 4byte address mode when we can't determine the address mode at runtime. Update the addr_nbytes and current address mode while exiting the 4byte address mode too, as it may be used in the future by manufacturer drivers. No functional change. spi_nor_restore didn't update the address mode nbytes, but updating them now doesn't harm as the method is called in the driver's remove and shutdown paths. Link: https://lore.kernel.org/r/20230331074606.3559258-10-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit 37513c56139b79dd43c1774513c28f8ab2b05224 Author: Tudor Ambarus Date: Fri Mar 31 07:46:04 2023 +0000 mtd: spi-nor: core: Update flash's current address mode when changing address mode The bug was obswerved while reading code. There are not many users of addr_mode_nbytes. Anyway, we should update the flash's current address mode when changing the address mode, fix it. We don't care for now about the set_4byte_addr_mode(nor, false) from spi_nor_restore(), as it is used at driver remove and shutdown. Fixes: d7931a215063 ("mtd: spi-nor: core: Track flash's internal address mode") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230331074606.3559258-9-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit 7fe1b00d92eaceb83f95200b5114cf5df0919892 Author: Tudor Ambarus Date: Fri Mar 31 07:46:03 2023 +0000 mtd: spi-nor: Stop exporting spi_nor_restore() Some SPI NOR controllers that used this method were moved to drivers/spi/. We don't accept new support for the existing SPI NOR controllers drivers under drivers/mtd/spi-nor/controllers/ and we encourage their owners to move the drivers under drivers/spi/. Make spi_nor_restore() private as we're going to use it just in core.c. Link: https://lore.kernel.org/r/20230331074606.3559258-8-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit 4e53ab0c292db99eff5dd65670bfdba79bbf338f Author: Tudor Ambarus Date: Fri Mar 31 07:46:02 2023 +0000 mtd: spi-nor: Set the 4-Byte Address Mode method based on SFDP data JESD216 SFDP defines in BFPT methods to enter and exit the 4-Byte Address Mode. The flash parameters and settings that are retrieved from SFDP have higher precedence than the static initialized ones, because they should be more accurate and less error prone than those initialized statically. Parse and favor the BFPT-parsed set_4byte_addr_mode methods. Some regressions may be introduced by this patch, because the params->set_4byte_addr_mode method that was set either in spi_nor_init_default_params() or later overwritten in default_init() hooks, are now be overwritten with a different value based on the BFPT data. If that's the case, the fix is to introduce a post_bfpt fixup hook where one should fix the wrong BFPT info. Link: https://lore.kernel.org/r/20230331074606.3559258-7-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit 3a4d5f4af9e668e59ce65115221fd964b3041da5 Author: Tudor Ambarus Date: Fri Mar 31 07:46:01 2023 +0000 mtd: spi-nor: core: Make spi_nor_set_4byte_addr_mode_brwr public This method can be retrieved at BFPT parsing time. The method is described in JESD216 BFPT[SFDP_DWORD(16)], BIT(28) and BIT(20). Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20230331074606.3559258-6-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit d75c22f376f6c31b6f16da3989c8f07ccc6cb2ca Author: Tudor Ambarus Date: Fri Mar 31 07:46:00 2023 +0000 mtd: spi-nor: core: Update name and description of spi_nor_set_4byte_addr_mode Rename method to spi_nor_set_4byte_addr_mode_en4b_ex4b and extend its description. This method is described in JESD216 BFPT[SFDP_DWORD(16)], BIT(31) and BIT(23). Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20230331074606.3559258-5-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit f1f1976224f3b2e0197cddf57b905a995c5528ca Author: Tudor Ambarus Date: Fri Mar 31 07:45:59 2023 +0000 mtd: spi-nor: core: Update name and description of spansion_set_4byte_addr_mode Rename method to spi_nor_set_4byte_addr_mode_brwr and extend its description. This method is described in JESD216 BFPT[SFDP_DWORD(16)], BIT(28) and BIT(20). Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20230331074606.3559258-4-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit 288df43783199dd796eb58552b997d92a115ebbd Author: Tudor Ambarus Date: Fri Mar 31 07:45:58 2023 +0000 mtd: spi-nor: core: Update name and description of micron_st_nor_set_4byte_addr_mode Rename method to spi_nor_set_4byte_addr_mode_wren_en4b_ex4b and extend its description. This method is described in JESD216 BFPT[SFDP_DWORD(16)], BIT(30) and BIT(22). Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20230331074606.3559258-3-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit 076aa4eac8b3f7e8ade56a64a7197836d6bd3a72 Author: Tudor Ambarus Date: Fri Mar 31 07:45:57 2023 +0000 mtd: spi-nor: core: Move generic method to core - micron_st_nor_set_4byte_addr_mode This method is described in JESD216 BFPT[SFDP_DWORD(16)], BIT(30) and BIT(22). Move the method to core. Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20230331074606.3559258-2-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit f0a499acb4b6f4c9a169ce35195b8021578ea14a Author: Miquel Raynal Date: Fri Mar 31 21:46:20 2023 +0200 mtd: spi-nor: macronix: Add support for mx25uw51245g with RWW Describe this new part and provide the RWW flag for it. There is no public datasheet, but here are the sfdp tables plus base testing to show it works. $ cat /sys/bus/spi/devices/spi0.0/spi-nor/partname mx25uw51245g $ cat /sys/bus/spi/devices/spi0.0/spi-nor/jedec_id c2813a $ cat /sys/bus/spi/devices/spi0.0/spi-nor/manufacturer macronix $ xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp 53464450080104fd00070114400000ff8701011c900000ff0a0001080001 00ff05000105200100ff84000102340100ff0000000000000000ffffffff ffffffffe5208affffffff1f00ff00ff00ff00ffeeffffffffff00ffffff 00ff0c2010d800ff00ff87790100821200e27704674630b030b0f4bdd55c 000000ff101000200000000000007ca14800000000008888000000000000 00400fd1fff30fd1fff300050090000500b1002b0095002b0096727103b8 727103b80000000090a3188200c069960000000000000000727100987271 00b8727100990000000072710098727100f872710099727100f900000000 00000000011501d0727106d8000086500000060100000000020001030002 00000000060100000000000072060002000000eec0697272717100d8f7f6 000a00001445988043060f0021dcffff $ md5sum /sys/bus/spi/devices/spi0.0/spi-nor/sfdp 047a884cf44d9ffc2a94d3ab37b48c63 /sys/bus/spi/devices/spi0.0/spi-nor/sfdp $ dd if=/dev/urandom of=./qspi_test bs=1M count=6 6+0 records in 6+0 records out $ mtd_debug write /dev/mtd1 0 6291456 qspi_test Copied 6291456 bytes from qspi_test to address 0x00000000 in flash $ mtd_debug erase /dev/mtd1 0 6291456 Erased 6291456 bytes from address 0x00000000 in flash $ mtd_debug read /dev/mtd1 0 6291456 qspi_read Copied 6291456 bytes from address 0x00000000 in flash to qspi_read $ hexdump qspi_read 0000000 ffff ffff ffff ffff ffff ffff ffff ffff * 0600000 $ mtd_debug write /dev/mtd1 0 6291456 qspi_test Copied 6291456 bytes from qspi_test to address 0x00000000 in flash $ mtd_debug read /dev/mtd1 0 6291456 qspi_read Copied 6291456 bytes from address 0x00000000 in flash to qspi_read $ sha1sum qspi_test qspi_read d24a9523db829a0df688f34b8dc76a1383b74024 qspi_test d24a9523db829a0df688f34b8dc76a1383b74024 qspi_read Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230331194620.839899-2-miquel.raynal@bootlin.com Signed-off-by: Tudor Ambarus commit 79a4db50192c196757e1dffa7f590fc7080ad746 Author: Miquel Raynal Date: Fri Mar 31 21:46:19 2023 +0200 mtd: spi-nor: Delay the initialization of bank_size Bank size is derived from the chip's size, which in spi_nor_init_default_params() can still be zero if the flash size is not specified at flash declaration. Let the flash size be updated by parsing SFDP and do the initialization of the bank size in spi_nor_late_init_params(). Flashes that don't define the SFDP tables must specify the flash size at declaration. Fixes: 9d6c5d64f028 ("mtd: spi-nor: Introduce the concept of bank") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230331194620.839899-1-miquel.raynal@bootlin.com [ta: drop superfluous initialization in spi_nor_init_default_params(), reword commit message, add Fixes tag.] Signed-off-by: Tudor Ambarus commit f13bcef04ba0467b7901998c22408d5847d314a1 Author: Selvin Xavier Date: Thu Mar 30 02:45:40 2023 -0700 RDMA/bnxt_re: Enable congestion control by default Enable Congesion control by default. Issue FW command enable the CC during driver load and disable it during unload. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1680169540-10029-8-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit c682c6eda08140c4706bc9e3e763867fd705dd1c Author: Selvin Xavier Date: Thu Mar 30 02:45:39 2023 -0700 RDAM/bnxt_re: Use tlv apis while processing the slow path commands Use the new TLV APIs for existing slow path commands. The TLV APIs will be used to populate extended headers for some of the Firmware commands, which will be introduced in the patches that follow. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1680169540-10029-7-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 0722f1f7bf85c83a8ed62c626e49f97d6ebd09c3 Author: Selvin Xavier Date: Thu Mar 30 02:45:38 2023 -0700 RDMA/bnxt_re: RoCE slow path TLV support Header file to support TLV encapsulated commands. These functions will be used by the driver in the follow up patches. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1680169540-10029-6-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit ff015bcd213b5d8e234482394e1a7c5c92e5da39 Author: Selvin Xavier Date: Thu Mar 30 02:45:37 2023 -0700 RDMA/bnxt_re: Reduce number of argumets to control path command APIs Reducing the number of arguments to bnxt_qplib_rcfw_send_message by enclosing all its arguments into a command message structure. Use the same struct while passing the command information to send_message. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1680169540-10029-5-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit e576adf583b52542f16940d33af5c968be4f1253 Author: Selvin Xavier Date: Thu Mar 30 02:45:36 2023 -0700 RDMA/bnxt_re: Convert RCFW_CMD_PREP macro to static inline function Convert RCFW_CMD_PREP macro to static inline function. Also, remove the cmd_flags passed as none of the functions are using it. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1680169540-10029-4-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit b400acee0622d550d325078558d3bd3f0c60967d Author: Selvin Xavier Date: Thu Mar 30 02:45:35 2023 -0700 RDMA/bnxt_re: Remove HW queue mapping from RoCE Driver bnxt_en driver does the queue mapping for RoCE traffic. Removing the queue mapping from RoCE driver. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1680169540-10029-3-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit a9a457f338e7711af391f618b60d8a4b15ba8050 Author: Selvin Xavier Date: Thu Mar 30 02:45:34 2023 -0700 RDMA/bnxt_re: Update HW interface headers Updating the HW structures to the latest version. This is copied from the code maintained internally. No functionality changes in this patch. Code is re-organized to match the file maintained in the internal tree. Also, New HW interface structures are added, which will be used by the drivers in future. CC: Michael Chan Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1680169540-10029-2-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 705c9ef831ce505f007d0af3fed2475764619533 Author: Miquel Raynal Date: Fri Mar 31 21:47:26 2023 +0200 mtd: spi-nor: Fix a trivial typo Fix a trivial typo in one of the core's comments. Fixes: 620df2497415 ("mtd: spi-nor: Introduce spi_nor_get_flash_info()") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230331194726.840208-1-miquel.raynal@bootlin.com Signed-off-by: Tudor Ambarus commit b3803399196e961ca190561d26ccf567f26841e6 Merge: 7b600f8da8fe6 ad47655eadc89 Author: Jakub Kicinski Date: Mon Apr 3 19:02:53 2023 -0700 Merge branch 'sfc-support-unicast-ptp' Íñigo Huguet says: ==================== sfc: support unicast PTP Unicast PTP was not working with sfc NICs. The reason was that these NICs don't timestamp all incoming packets, but instead they only timestamp packets of the queues that are selected for that. Currently, only one RX queue is configured for timestamp: the RX queue of the PTP channel. The packets that are put in the PTP RX queue are selected according to firmware filters configured from the driver. Multicast PTP was already working because the needed filters are known in advance, so they're inserted when PTP is enabled. This patches add the ability to dynamically add filters for unicast addresses, extracted from the TX PTP-event packets. Since we don't know in advance how many filters we'll need, some info about the filters need to be saved. This will allow to check if a filter already exists or if a filter is too old and should be removed. Note that the previous point is unnecessary for multicast filters, but I've opted to change how they're handled to match the new unicast's filters to avoid having duplicate insert/remove_filters functions, once for each type of filter. Tested: With ptp4l, all combinations of IPv4/IPv6, master/slave and unicast/multicast Reported-by: Yalin Li ==================== Link: https://lore.kernel.org/r/20230331111404.17256-1-ihuguet@redhat.com Signed-off-by: Jakub Kicinski commit ad47655eadc8918a60c4165237a4c7da383c1d08 Author: Íñigo Huguet Date: Fri Mar 31 13:14:04 2023 +0200 sfc: remove expired unicast PTP filters Filters inserted to support unicast PTP mode might become unused after some time, so we need to remove them to avoid accumulating many of them. Refresh the expiration time of a filter each time it's used. Then check periodically if any filter hasn't been used for a long time (30s) and remove it. Reported-by: Yalin Li Signed-off-by: Íñigo Huguet Reviewed-by: Edward Cree Signed-off-by: Jakub Kicinski commit 49ed35a0b6aafacd5e4d7c24ed6c02fbfbadaedc Author: Íñigo Huguet Date: Fri Mar 31 13:14:03 2023 +0200 sfc: support unicast PTP When sending a PTP event packet, add the correct filters that will make that future incoming unicast PTP event packets will be timestamped. The unicast address for the filter is gotten from the outgoing skb before sending it. Until now they were not timestamped because only filters that match with the PTP multicast addressed were being configured into the NIC for the PTP special channel. Packets received through different channels are not timestamped, getting "received SYNC without timestamp" error in ptp4l. Note that the inserted filters are never removed unless the NIC is stopped or reconfigured, so efx_ptp_stop is called. Removal of old filters will be handled by the next patch. Additionally, cleanup a bit efx_ptp_xmit_skb_mc to use the reverse xmas tree convention and remove an unnecessary assignment to rc variable in void function. Reported-by: Yalin Li Signed-off-by: Íñigo Huguet Reviewed-by: Edward Cree Signed-off-by: Jakub Kicinski commit 75687cd06620e5229a74c127e6a46048aa6307f3 Author: Íñigo Huguet Date: Fri Mar 31 13:14:02 2023 +0200 sfc: allow insertion of filters for unicast PTP Add a second list for unicast filters and generalize the efx_ptp_insert/remove_filters functions to allow acting in any of the 2 lists. No filters for unicast are inserted yet. That will be done in the next patch. The reason to use 2 different lists instead of a single one is that, in next patches, we will want to check if unicast filters are already added and if they're expired. We don't need that for multicast filters. Reported-by: Yalin Li Signed-off-by: Íñigo Huguet Reviewed-by: Edward Cree Signed-off-by: Jakub Kicinski commit e790fc15bfbf3d9e6edd4e42b6288a4dd678e2f4 Author: Íñigo Huguet Date: Fri Mar 31 13:14:01 2023 +0200 sfc: store PTP filters in a list Instead of using a fixed sized array for the PTP filters, use a list. This is not actually necessary at this point because the filters for multicast PTP are a fixed number, but this is a preparation for the following patches adding support for unicast PTP. To avoid confusion with the new struct type efx_ptp_rxfilter, change the name of some local variables from rxfilter to spec, given they're of the type efx_filter_spec. Reported-by: Yalin Li Signed-off-by: Íñigo Huguet Reviewed-by: Edward Cree Signed-off-by: Jakub Kicinski commit 26bfc3f36f2104c174dfc72415547d5c28ef3f1c Author: Ville Syrjälä Date: Wed Mar 29 20:24:34 2023 +0300 drm/i915: Explain the magic numbers for AUX SYNC/precharge length Replace the hardcoded final numbers in the AUX SYNC/precharge setup, and derive those from numbers from the (e)DP specs. The new functions can serve as the single point of truth for the number of SYNC pulses we use. Cc: Jouni Högander Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230329172434.18744-2-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 605f7c73133341d4b762cbd9a22174cc22d4c38b Author: Ville Syrjälä Date: Wed Mar 29 20:24:33 2023 +0300 drm/i915: Fix fast wake AUX sync len Fast wake should use 8 SYNC pulses for the preamble and 10-16 SYNC pulses for the precharge. Reduce our fast wake SYNC count to match the maximum value. We also use the maximum precharge length for normal AUX transactions. Cc: Jouni Högander Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230329172434.18744-1-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit f6a6a5a976288e4d0d94eb1c6c9e983e8e5cdb31 Author: Dave Marchevsky Date: Mon Apr 3 13:00:27 2023 -0700 bpf: Fix struct_meta lookup for bpf_obj_free_fields kfunc call bpf_obj_drop_impl has a void return type. In check_kfunc_call, the "else if" which sets insn_aux->kptr_struct_meta for bpf_obj_drop_impl is surrounded by a larger if statement which checks btf_type_is_ptr. As a result: * The bpf_obj_drop_impl-specific code will never execute * The btf_struct_meta input to bpf_obj_drop is always NULL * __bpf_obj_drop_impl will always see a NULL btf_record when called from BPF program, and won't call bpf_obj_free_fields * program-allocated kptrs which have fields that should be cleaned up by bpf_obj_free_fields may instead leak resources This patch adds a btf_type_is_void branch to the larger if and moves special handling for bpf_obj_drop_impl there, fixing the issue. Fixes: ac9f06050a35 ("bpf: Introduce bpf_obj_drop") Cc: Kumar Kartikeya Dwivedi Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230403200027.2271029-1-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 643980fb08d00d7e750af03fe0101c9910ab4c1f Author: Christophe JAILLET Date: Sat Apr 1 17:52:12 2023 +0200 clk: stm32h7: Remove an unused field in struct stm32_fractional_divider 'mmask' has never been used in this driver. Remove it. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/e08a470fbd6151ebd83a548714c08807a80a8ad0.1680364296.git.christophe.jaillet@wanadoo.fr Signed-off-by: Stephen Boyd commit 79ef82c55a37b9c3605602c4909db84481c9fb2f Author: Peng Fan Date: Mon Apr 3 16:27:28 2023 +0800 clk: imx: drop duplicated macro Drop duplicated macro definition Signed-off-by: Peng Fan Reviewed-by: Ahmad Fatoum Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230403082728.3199849-1-peng.fan@oss.nxp.com commit c3fbced9af885a6f217fd95509a613d6590916ce Author: Zhaoyang Li Date: Mon Mar 27 19:54:22 2023 +0800 soc: bcm: brcmstb: biuctrl: fix of_iomap leak Smatch reports: drivers/soc/bcm/brcmstb/biuctrl.c:291 setup_hifcpubiuctrl_regs() warn: 'cpubiuctrl_base' from of_iomap() not released on lines: 291. This is because in setup_hifcpubiuctrl_regs(), cpubiuctrl_base is not released when handle error, which may cause a leak. To fix this, iounmap is added when handle error. Fixes: 22f7a9116eba ("soc: brcmstb: Correct CPU_CREDIT_REG offset for Brahma-B53 CPUs") Signed-off-by: Zhaoyang Li Reviewed-by: Dan Carpenter Reviewed-by: Dongliang Mu Link: https://lore.kernel.org/r/20230327115422.1536615-1-lizhaoyang04@hust.edu.cn Signed-off-by: Florian Fainelli commit e3e1e149176c7c9371b04d3b96c873cca31f520e Author: Uwe Kleine-König Date: Mon Apr 3 17:40:14 2023 +0200 staging: vc04_services: vchiq_arm: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230403154014.2564054-25-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 360365104dca5d3f6e5f1c00dd16e7a9996406f8 Author: Uwe Kleine-König Date: Mon Apr 3 17:40:13 2023 +0200 staging: vc04_services: bcm2835-camera: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230403154014.2564054-24-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit c46d4073ec6871c3531fa96c49bf45c8598bf791 Author: Uwe Kleine-König Date: Mon Apr 3 17:40:12 2023 +0200 staging: octeon: ethernet: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230403154014.2564054-23-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit cedff4e3e23c5b26c64e901b139fe88b89678540 Author: Uwe Kleine-König Date: Mon Apr 3 17:40:11 2023 +0200 staging: nvec_ps2: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230403154014.2564054-22-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit f1e870c45be5b6262dc452b7131ab81290ad7180 Author: Uwe Kleine-König Date: Mon Apr 3 17:40:10 2023 +0200 staging: nvec_power: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230403154014.2564054-21-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 46ea3230264b591dcabbceb06e87fc33236900a4 Author: Uwe Kleine-König Date: Mon Apr 3 17:40:09 2023 +0200 staging: nvec: nvec_kbd: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230403154014.2564054-20-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 398296fd509df4d36b8b09bb0c839e80ebb9a05b Author: Uwe Kleine-König Date: Mon Apr 3 17:40:08 2023 +0200 staging: nvec: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230403154014.2564054-19-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 51559b8e9bf9e3324413ab1c171df05d408dd81b Author: Uwe Kleine-König Date: Mon Apr 3 17:40:07 2023 +0200 staging: most: dim2: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230403154014.2564054-18-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 7846a2ae5ccd1d08bcfff4a6cfedbc33680cf6cc Author: Uwe Kleine-König Date: Mon Apr 3 17:39:55 2023 +0200 staging: greybus: arche: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230403154014.2564054-6-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 9b19a31c20f1040004e4cbda4945023e2ce86ad3 Author: Uwe Kleine-König Date: Mon Apr 3 17:39:54 2023 +0200 staging: greybus: arche-apb-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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230403154014.2564054-5-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit ba110722924c1b2c111170736278d87ee381484b Author: Uwe Kleine-König Date: Mon Apr 3 17:39:53 2023 +0200 staging: fieldbus: arcx-anybus: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230403154014.2564054-4-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 68c8e9ff5d32d0ce34f972746b96d1e4a2f5b042 Author: Uwe Kleine-König Date: Mon Apr 3 17:39:52 2023 +0200 staging: emxx_udc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230403154014.2564054-3-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 63b2af49654b11b57ca1746e48c1ac63e0bd6de1 Author: Uwe Kleine-König Date: Mon Apr 3 17:39:51 2023 +0200 staging: axis-fifo: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230403154014.2564054-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 862d8312eed994a8a9af7aa8e9e15456183b10a7 Author: Greg Kroah-Hartman Date: Sun Apr 2 19:58:50 2023 +0200 tty: make tty_class a static const structure Now that the driver core allows for struct class to be in read-only memory, move the tty_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: "Ilpo Järvinen" Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/2023040250-landowner-unfitted-11f4@gregkh Signed-off-by: Greg Kroah-Hartman commit 2243acd50ac4026e93ac4f024109be6dbd7f9098 Author: Greg Kroah-Hartman Date: Sun Apr 2 19:58:49 2023 +0200 driver core: class: remove struct class_interface * from callbacks The add_dev and remove_dev callbacks in struct class_interface currently pass in a pointer back to the class_interface structure that is calling them, but none of the callback implementations actually use this pointer as it is pointless (the structure is known, the driver passed it in in the first place if it is really needed again.) So clean this up and just remove the pointer from the callbacks and fix up all callback functions. Cc: Jean Delvare Cc: Guenter Roeck Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Kurt Schwemmer Cc: Jon Mason Cc: Dave Jiang Cc: Allen Hubbe Cc: Dominik Brodowski Cc: Matt Porter Cc: Alexandre Bounine Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Doug Gilbert Cc: John Stultz Cc: Thomas Gleixner Cc: Stephen Boyd Cc: Hans de Goede Cc: Andrew Morton Cc: Wang Weiyang Cc: Yang Yingliang Cc: Jakob Koschel Cc: Cai Xinchen Acked-by: Rafael J. Wysocki Acked-by: Logan Gunthorpe Link: https://lore.kernel.org/r/2023040250-pushover-platter-509c@gregkh Signed-off-by: Greg Kroah-Hartman commit 6b0d49be81cf4f1cf30ebd079cbf4643cab0a01d Author: Greg Kroah-Hartman Date: Sun Apr 2 19:58:48 2023 +0200 driver core: class: mark the struct class in struct class_interface constant The struct class pointer in struct class_interface is never modified, so mark it as const so that no one accidentally tries to modify it in the future. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/2023040249-handball-gruffly-5da7@gregkh Signed-off-by: Greg Kroah-Hartman commit 43a7206b0963c2153c95d6985624d1dc1b3abd4d Author: Greg Kroah-Hartman Date: Sun Apr 2 19:58:47 2023 +0200 driver core: class: make class_register() take a const * Now that the class code is cleaned up to not modify the class pointer registered with it, change class_register() to take a const * to allow the structure to be placed into read-only memory. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/2023040248-customary-release-4aec@gregkh Signed-off-by: Greg Kroah-Hartman commit 979207cac517833c828133ffb2633bcdf6edce00 Author: Greg Kroah-Hartman Date: Sun Apr 2 19:58:46 2023 +0200 driver core: class: mark class_release() as taking a const * The struct class callback, class_release(), is only called in 2 places, the pcmcia cardservices code, and in the class driver core code. Both places it is safe to mark the structure as a const *, to allow us to in the future mark all struct class usages as constant and move into read-only memory. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/2023040248-outrage-obsolete-5a9a@gregkh Signed-off-by: Greg Kroah-Hartman commit 4dd472bdafcb660bea17bc63a97d06e24fcb36ed Author: Conor Dooley Date: Fri Mar 31 08:18:17 2023 +0100 soc: microchip: mpfs: add a prefix to rx_callback() Add a prefix to the function name to match the rest of the file. Signed-off-by: Conor Dooley commit ef382228d25a93aa9dcb8be6e82322c272831cda Merge: fe15c26ee26ef babb3e6a8a8e5 Author: Stephen Boyd Date: Mon Apr 3 12:05:23 2023 -0700 Merge tag 'samsung-clk-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into clk-samsung Pull Samsung SoC clk drivers updates from Krzysztof Kozlowski: - Exynos850: Add CMU_G3D clock controller for the Mali GPU. This brings new PLLs and few cleanups/simplifications in core Exynos clock controller code, so they can be easier re-used in Exynos850 clock controller driver. New CMU_G3D clock controller needs Devicetree bindings header changes with clock indices which are pulled from Samsung SoC repository. - Extract Exynos5433 (ARM64) clock controller power management code to common driver parts, so later it can be re-used by other Exynos clock controller drivers. This only prepares for such re-usage, which is expected to come later for Exynos850. - Exynos850: make PMU_ALIVE_PCLK clock critical, because it is needed for core block - Power Management Unit. - Cleanup: remove() callback returns void. * tag 'samsung-clk-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: clk: samsung: exynos850: Make PMU_ALIVE_PCLK critical clk: samsung: Convert to platform remove callback returning void clk: samsung: exynos5433: Extract PM support to common ARM64 layer clk: samsung: Extract parent clock enabling to common function clk: samsung: Extract clocks registration to common function clk: samsung: exynos850: Add AUD and HSI main gate clocks clk: samsung: exynos850: Implement CMU_G3D domain clk: samsung: clk-pll: Implement pll0818x PLL type clk: samsung: Set dev in samsung_clk_init() clk: samsung: Don't pass reg_base to samsung_clk_register_pll() clk: samsung: Remove np argument from samsung_clk_init() dt-bindings: clock: exynos850: Add AUD and HSI main gate clocks dt-bindings: clock: exynos850: Add Exynos850 CMU_G3D commit 75f74a907164eaeb1bd5334b01504a84b2b63bf5 Merge: cd246fa969ec9 0c492be4002b7 Author: Rafael J. Wysocki Date: Mon Apr 3 20:43:32 2023 +0200 Merge tag 'thermal-v6.4-rc1-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal control material for 6.4-rc1 from Daniel Lezcano: "- Add more thermal zone device encapsulation: prevent setting structure field directly, access the sensor device instead the thermal zone's device for trace, relocate the traces in drivers/thermal (Daniel Lezcano) - Use the generic trip point for the i.MX and remove the get_trip_temp ops (Daniel Lezcano) - Use the devm_platform_ioremap_resource() in the Hisilicon driver (Yang Li) - Remove R-Car H3 ES1.* handling as public has only access to the ES2 version and the upstream support for the ES1 has been shutdown (Wolfram Sang) - Add a delay after initializing the bank in order to let the time to the hardware to initialze itself before reading the temperature (Amjad Ouled-Ameur) - Add MT8365 support (Amjad Ouled-Ameur)" * tag 'thermal-v6.4-rc1-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: thermal/drivers/ti: Use fixed update interval thermal/drivers/stm: Don't set no_hwmon to false thermal/drivers/db8500: Use driver dev instead of tz->device thermal/core: Relocate the traces definition in thermal directory thermal/drivers/hisi: Use devm_platform_ioremap_resource() thermal/drivers/imx: Use the thermal framework for the trip point thermal/drivers/imx: Remove get_trip_temp ops thermal/drivers/rcar_gen3_thermal: Remove R-Car H3 ES1.* handling thermal/drivers/mediatek: Add delay after thermal banks initialization thermal/drivers/mediatek: Add support for MT8365 SoC thermal/drivers/mediatek: Control buffer enablement tweaks dt-bindings: thermal: mediatek: Add binding documentation for MT8365 SoC commit cd246fa969ec9f31a244f4056361c694ca8d99d3 Author: Rafael J. Wysocki Date: Wed Mar 22 20:34:12 2023 +0100 thermal: core: Clean up thermal_list_lock locking Once thermal_list_lock has been acquired in __thermal_cooling_device_register(), it is not necessary to drop it and take it again until all of the thermal zones have been updated, so change the code accordingly. No expected functional impact. Signed-off-by: Rafael J. Wysocki commit 5ee40e8d7630b9f3665c9cd990ac00e6e4bc7957 Merge: 49f965b6fbca6 8f943dd12eeff Author: Conor Dooley Date: Mon Apr 3 19:21:09 2023 +0100 Merge patch series "mailbox,soc: mpfs: add support for fallible services" Conor Dooley says: Here are some fixes for the system controller on PolarFire SoC that I ran into while implementing support for using the system controller to re-program the FPGA. A few are just minor bits that I fixed in passing, but the bulk of the patchset is changes to how the mailbox figures out if a "service" has completed. Prior to implementing this particular functionality, the services requested from the system controller, via its mailbox interface, always triggered an interrupt when the system controller was finished with the service. Unfortunately some of the services used to validate the FPGA images before programming them do not trigger an interrupt if they fail. For example, the service that checks whether an FPGA image is actually a newer version than what is already programmed, does not trigger an interrupt, unless the image is actually newer than the one currently programmed. If it has an earlier version, no interrupt is triggered and a status is set in the system controller's status register to signify the reason for the failure. In order to differentiate between the service succeeding & the system controller being inoperative or otherwise unable to function, I had to switch the controller to poll a busy bit in the system controller's registers to see if it has completed a service. This makes sense anyway, as the interrupt corresponds to "data ready" rather than "tx done", so I have changed the mailbox controller driver to do that & left the interrupt solely for signalling data ready. It just so happened that all of the services that I had worked with and tested up to this point were "infallible" & did not set a status, so the particular code paths were never tested. Link: https://lore.kernel.org/r/20230307202257.1762151-1-conor@kernel.org Signed-off-by: Conor Dooley commit 8f943dd12eeff71857b9a1ca45adbaaba379bf30 Author: Conor Dooley Date: Tue Mar 7 20:22:58 2023 +0000 soc: microchip: mpfs: handle timeouts and failed services differently The system controller will only deliver an interrupt if a service succeeds. This leaves us in the unfortunate position with current code where there is no way to differentiate between a legitimate timeout where the service has not completed & where it has completed, but failed. mbox_send_message() has its own completion, and it will time out of the system controller does not lower the busy flag. In this case, a timeout has occurred and the error can be propagated back to the caller. If the busy flag is lowered, but no interrupt has arrived to trigger the rx callback, the service can be deemed to have failed. Report -EBADMSG in this case so that callers can differentiate. Tested-by: Valentina Fernandez Signed-off-by: Conor Dooley commit 7606f4dfffa7a4e4aadd8aef918cc8ac1f1e2196 Author: Conor Dooley Date: Tue Mar 7 20:22:57 2023 +0000 soc: microchip: mpfs: simplify error handling in mpfs_blocking_transaction() The error handling has a kinda weird nested-if setup that is not really adding anything. Switch it to more of an early return arrangement as a predatory step for adding different handing for timeouts and failed services. Tested-by: Valentina Fernandez Signed-off-by: Conor Dooley commit 4f739af1934ad7195db35f74cfbdca264668d8fc Author: Conor Dooley Date: Tue Mar 7 20:22:56 2023 +0000 soc: microchip: mpfs: use a consistent completion timeout Completion timeouts use jiffies, so passing a number directly will produce inconsistent timeouts depending on config. Define the timeout in ms and convert it to jiffies instead. Tested-by: Valentina Fernandez Signed-off-by: Conor Dooley commit 5ca631ec757bed5843e39c91c8f52d1789991756 Author: Conor Dooley Date: Tue Mar 7 20:22:55 2023 +0000 soc: microchip: mpfs: fix some horrible alignment mpfs_sys_controller_delete() has some horrible alignment that upsets my OCD... Move the RHS of the assignment to a new line for greater satifaction. Tested-by: Valentina Fernandez Signed-off-by: Conor Dooley commit 37e3430176ff333afb013314a6c949660d75cc92 Author: Conor Dooley Date: Tue Mar 7 20:22:54 2023 +0000 mailbox: mpfs: check the service status in .tx_done() Services are supposed to generate an interrupt once completed, whether or not they have do so successfully. What appears to be a bug in the system controller means that interrupts are only generated for *successful* services. Currently, the status of a service is only checked in the mpfs_mbox_rx_data() once an interrupt is received. As it turns out, this is not really helpful where the potentially buggy behaviour is present, as we'll only see the status for successes where it is moot anyway. Jassi suggested moving the check to the .tx_done() callback instead. This makes sense, as the busy bit that tx_done() is polling will be lowered on completion, regardless of whether the service passed or failed. That allows us to check the status bits for all services, whether they generate an interrupt or not & pass something more informative than -EBADMSG back to the drivers implementing individual services. Suggested-by: Jassi Brar Acked-by: Jassi Brar Tested-by: Valentina Fernandez Signed-off-by: Conor Dooley commit da82f95f7c0752f36cdb8ff99d543004e4e3acdf Author: Conor Dooley Date: Tue Mar 7 20:22:53 2023 +0000 mailbox: mpfs: ditch a useless busy check mpfs_mbox_rx_data() already checks if the system controller is busy before attempting to do anything, so drop the second check before reading any data. No functional change intended. Acked-by: Jassi Brar Tested-by: Valentina Fernandez Signed-off-by: Conor Dooley commit b5984a9844fc45cd301a28fb56f3de95f7e20f3c Author: Conor Dooley Date: Tue Mar 7 20:22:52 2023 +0000 mailbox: mpfs: switch to txdone_poll The system controller on PolarFire SoC has no interrupt to signify that the TX has been completed. The interrupt instead signals that a service requested by the mailbox client has succeeded. If a service fails, there will be no interrupt delivered. Switch to polling the busy register to determine whether transmission has completed. Fixes: 83d7b1560810 ("mbox: add polarfire soc system controller mailbox") Acked-by: Jassi Brar Tested-by: Valentina Fernandez Signed-off-by: Conor Dooley commit 75dfbcbfd781f826c73ebe42b78d49c23179d082 Author: Conor Dooley Date: Tue Mar 7 20:22:51 2023 +0000 mailbox: mpfs: fix an incorrect mask width The system controller registers on PolarFire SoC are 32 bits wide, so 16 + 16 as the first input to GENMASK_ULL() gives a 33 bit wide mask. It probably should have been immediately obvious when it was pointed out during review that the width required using GENMASK_ULL() - but I scarcely knew what I was doing at the time and missed it. The mistake ends up being moot as it is a mask after all, but it is incorrect and should be fixed. No functional change intended. Acked-by: Jassi Brar Tested-by: Valentina Fernandez Signed-off-by: Conor Dooley commit 266e9b3475ba82212062771fdbc40be0e3c06ec8 Author: Tetsuo Handa Date: Sun Apr 2 14:10:13 2023 +0900 RDMA/siw: Remove namespace check from siw_netdev_event() syzbot is reporting that siw_netdev_event(NETDEV_UNREGISTER) cannot destroy siw_device created after unshare(CLONE_NEWNET) due to net namespace check. It seems that this check was by error there and should be removed. Reported-by: syzbot Link: https://syzkaller.appspot.com/bug?extid=5e70d01ee8985ae62a3b Suggested-by: Jason Gunthorpe Suggested-by: Leon Romanovsky Fixes: bdcf26bf9b3a ("rdma/siw: network and RDMA core interface") Signed-off-by: Tetsuo Handa Link: https://lore.kernel.org/r/a44e9ac5-44e2-d575-9e30-02483cc7ffd1@I-love.SAKURA.ne.jp Reviewed-by: Bernard Metzler Signed-off-by: Leon Romanovsky commit a131e33715fca8a047bdfc3d67b10eb743eea4b0 Author: Greg Kroah-Hartman Date: Sun Apr 2 11:11:18 2023 +0200 driver core: remove incorrect comment for device_create* The device_create() and device_create_with_groups() function comments incorrectly state that they only work with a struct class that was created using class_create(), but that is not true now and I am not sure if it ever was. So just remove the comment as it's not needed now. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/2023040218-scouts-unplowed-24d2@gregkh Signed-off-by: Greg Kroah-Hartman commit 5b524e4d16685a548ba143551709ded609d8ee05 Author: Greg Kroah-Hartman Date: Sun Apr 2 11:05:45 2023 +0200 MIPS: vpe-cmp: remove module owner pointer from struct class usage. In commit 6e30a66433af ("driver core: class: remove struct module owner out of struct class"), the module owner pointer was removed from struct class, but this was missed for the mips vpe-cmp code due to lack of build testing (and it being burried under a very unused config settings.) Fix this up by removing the module pointer to resolve the build error. Note, there are other problems with the driver model usage in this file (static struct device usage, empty device release function, etc.), so it probably could use some good cleaning up, but odds are this driver really isn't used so hopefully it will just be removed entirely someday soon as part of the general "remove unused arches" cleanup that is slowly happening. Cc: Dengcheng Zhu Cc: John Crispin Cc: Qais Yousef Cc: Steven J. Hill Cc: Yang Yingliang Cc: linux-mips@vger.kernel.org Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202304020802.xbRTJKjW-lkp@intel.com/ Fixes: 6e30a66433af ("driver core: class: remove struct module owner out of struct class") Acked-by: Thomas Bogendoerfer Link: https://lore.kernel.org/r/2023040242-pursuable-frown-48d8@gregkh Signed-off-by: Greg Kroah-Hartman commit 4ed22f1e52426635873416007d2c12e09615165f Author: Ashutosh Dixit Date: Fri Mar 31 19:41:46 2023 -0700 drm/i915/hwmon: Use 0 to designate disabled PL1 power limit On ATSM the PL1 limit is disabled at power up. The previous uapi assumed that the PL1 limit is always enabled and therefore did not have a notion of a disabled PL1 limit. This results in erroneous PL1 limit values when the PL1 limit is disabled. For example at power up, the disabled ATSM PL1 limit was previously shown as 0 which means a low PL1 limit whereas the limit being disabled actually implies a high effective PL1 limit value. To get round this problem, the PL1 limit uapi is expanded to include a special value 0 to designate a disabled PL1 limit. A read value of 0 means that the PL1 power limit is disabled, writing 0 disables the limit. The link between this patch and the bugs mentioned below is as follows: * Because on ATSM the PL1 power limit is disabled on power up and there were no means to enable it, we previously implemented the means to enable the limit when the PL1 hwmon entry (power1_max) was written to. * Now there is a IGT igt@i915_hwmon@hwmon_write which (a) reads orig value from all hwmon sysfs (b) does a bunch of random writes and finally (c) restores the orig value read. On ATSM since the orig value is 0, when the IGT restores the 0 value, the PL1 limit is now enabled with a value of 0. * PL1 limit of 0 implies a low PL1 limit which causes GPU freq to fall to 100 MHz. This causes GuC FW load and several IGT's to start timing out and gives rise to these Intel CI bugs. After this patch, writing 0 would disable the PL1 limit instead of enabling it, avoiding the freq drop issue. v2: Add explanation for bugs mentioned below (Rodrigo) v3: Eliminate race during PL1 disable and verify (Tvrtko) Change return to -ENODEV if verify fails (Tvrtko) Link: https://gitlab.freedesktop.org/drm/intel/-/issues/8062 Link: https://gitlab.freedesktop.org/drm/intel/-/issues/8060 Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230401024146.1826092-1-ashutosh.dixit@intel.com commit 96af01cdc34a39f04118b2c0f3a4c0c52bd7f973 Author: Arnaud Pouliquen Date: Mon Apr 3 18:24:23 2023 +0200 dt-bindings: remoteproc: stm32-rproc: Typo fix Fix "communnication" typo error. Fixes: aca8f94e5b69 ("dt-bindings: remoteproc: stm32-rproc: add new mailbox channel for detach") Signed-off-by: Arnaud Pouliquen Acked-by: Krzysztof Kozlowski [Fixed title to read "stm32-rproc" instead of "st,stm32-rproc"] Link: https://lore.kernel.org/r/20230403162423.3325968-1-arnaud.pouliquen@foss.st.com Signed-off-by: Mathieu Poirier commit 35bdafda40cc343ad2ba2cce105eba03a70241cc Author: Arnaud Pouliquen Date: Fri Mar 31 18:06:34 2023 +0200 remoteproc: stm32_rproc: Add mutex protection for workqueue The workqueue may execute late even after remoteproc is stopped or stopping, some resources (rpmsg device and endpoint) have been released in rproc_stop_subdevices(), then rproc_vq_interrupt() accessing these resources will cause kernel dump. Call trace: virtqueue_add_inbuf virtqueue_add_inbuf rpmsg_recv_single rpmsg_recv_done vring_interrupt stm32_rproc_mb_vq_work process_one_work worker_thread kthread Suggested-by: Mathieu Poirier Signed-off-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20230331160634.3113031-1-arnaud.pouliquen@foss.st.com Signed-off-by: Mathieu Poirier commit 8666071391f473bfb1c0935576e3bf9c94b04f4e Author: Yu Zhe Date: Tue Mar 28 10:49:07 2023 +0800 remoteproc: Remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe Link: https://lore.kernel.org/r/20230328024907.29791-1-yuzhe@nfschina.com [Fixed merge conflict in xlnx_r5_remoteproc.c] Signed-off-by: Mathieu Poirier commit e0e01de8ee146986872e54e8365f4b4654819412 Author: Mathieu Poirier Date: Mon Mar 20 16:18:26 2023 -0600 remoteproc: imx_dsp_rproc: Call of_node_put() on iteration error Function of_phandle_iterator_next() calls of_node_put() on the last device_node it iterated over, but when the loop exits prematurely it has to be called explicitly. Fixes: ec0e5549f358 ("remoteproc: imx_dsp_rproc: Add remoteproc driver for DSP on i.MX") Cc: stable@vger.kernel.org Signed-off-by: Mathieu Poirier Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20230320221826.2728078-6-mathieu.poirier@linaro.org Signed-off-by: Mathieu Poirier commit 5ef074e805ecfd9a16dbb7b6b88bbfa8abad7054 Author: Mathieu Poirier Date: Mon Mar 20 16:18:25 2023 -0600 remoteproc: imx_rproc: Call of_node_put() on iteration error Function of_phandle_iterator_next() calls of_node_put() on the last device_node it iterated over, but when the loop exits prematurely it has to be called explicitly. Fixes: b29b4249f8f0 ("remoteproc: imx_rproc: add i.MX specific parse fw hook") Cc: stable@vger.kernel.org Signed-off-by: Mathieu Poirier Reviewed-by: Peng Fan Link: https://lore.kernel.org/r/20230320221826.2728078-5-mathieu.poirier@linaro.org Signed-off-by: Mathieu Poirier commit f8bae637d3d5e082b4ced71e28b16eb3ee0683c1 Author: Mathieu Poirier Date: Mon Mar 20 16:18:24 2023 -0600 remoteproc: rcar_rproc: Call of_node_put() on iteration error Function of_phandle_iterator_next() calls of_node_put() on the last device_node it iterated over, but when the loop exits prematurely it has to be called explicitly. Fixes: 285892a74f13 ("remoteproc: Add Renesas rcar driver") Cc: stable@vger.kernel.org Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20230320221826.2728078-4-mathieu.poirier@linaro.org Signed-off-by: Mathieu Poirier commit 8a74918948b40317a5b5bab9739d13dcb5de2784 Author: Mathieu Poirier Date: Mon Mar 20 16:18:23 2023 -0600 remoteproc: st: Call of_node_put() on iteration error Function of_phandle_iterator_next() calls of_node_put() on the last device_node it iterated over, but when the loop exits prematurely it has to be called explicitly. Fixes: 3df52ed7f269 ("remoteproc: st: add reserved memory support") Cc: stable@vger.kernel.org Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20230320221826.2728078-3-mathieu.poirier@linaro.org Signed-off-by: Mathieu Poirier commit 9243d70e05c5989f84f840612965f96b524da925 Author: Xinlei Lee Date: Wed Mar 29 14:43:23 2023 +0800 drm/mediatek: dp: Change the aux retries times when receiving AUX_DEFER DP 1.4a Section 2.8.7.1.5.6.1: A DP Source device shall retry at least seven times upon receiving AUX_DEFER before giving up the AUX transaction. The drm_dp_i2c_do_msg() function in the drm_dp_helper.c file will judge the status of the msg->reply parameter passed to aux_transfer for different processing. Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver") Signed-off-by: Xinlei Lee Link: https://patchwork.kernel.org/project/linux-mediatek/patch/1680072203-10394-1-git-send-email-xinlei.lee@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit ccadca5baf5124a880f2bb50ed1ec265415f025b Author: Mathieu Poirier Date: Mon Mar 20 16:18:22 2023 -0600 remoteproc: stm32: Call of_node_put() on iteration error Function of_phandle_iterator_next() calls of_node_put() on the last device_node it iterated over, but when the loop exits prematurely it has to be called explicitly. Fixes: 13140de09cc2 ("remoteproc: stm32: add an ST stm32_rproc driver") Cc: stable@vger.kernel.org Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20230320221826.2728078-2-mathieu.poirier@linaro.org Signed-off-by: Mathieu Poirier commit 3ddba33dc270209868de79f695e5b27afa49e230 Author: Henrik Grimler Date: Sun Apr 2 16:47:24 2023 +0200 ARM: dts: exynos: add mmc aliases Add aliases for eMMC, SD card and WiFi where applicable, so that assigned mmc indeces are always the same. Co-developed-by: Anton Bambura Signed-off-by: Anton Bambura [ Tested on exynos5800-peach-pi ] Tested-by: Valentine Iourine Signed-off-by: Henrik Grimler Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20230402144724.17839-3-henrik@grimler.se Signed-off-by: Krzysztof Kozlowski commit 37f9514e618f3b95125d7eda8991a7ae3b17da96 Author: Henrik Grimler Date: Sun Apr 2 16:47:23 2023 +0200 ARM: dts: exynos: replace mshc0 alias with mmc-ddr-1_8v property Previously, the mshc0 alias has been necessary so that MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA are set for mshc_0/mmc_0. However, these capabilities should be described in the device tree so that we do not have to rely on the alias. The property mmc-ddr-1_8v replaces MMC_CAP_1_8V_DDR, while bus_width = <8>, which is already set for all the mshc0/mmc0 nodes, replaces MMC_CAP_8_BIT_DATA. Also drop other mshc aliases as they are not needed. Signed-off-by: Henrik Grimler Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20230402144724.17839-2-henrik@grimler.se Signed-off-by: Krzysztof Kozlowski commit d74c36480a679b27ce8a70c2e88fed31b86323d9 Author: Chuanhong Guo Date: Wed Mar 29 14:42:40 2023 +0300 mtd: spinand: add support for ESMT F50x1G41LB This patch adds support for ESMT F50L1G41LB and F50D1G41LB. It seems that ESMT likes to use random JEDEC ID from other vendors. Their 1G chips uses 0xc8 from GigaDevice and 2G/4G chips uses 0x2c from Micron. For this reason, the ESMT entry is named esmt_c8 with explicit JEDEC ID in variable name. Datasheets: https://www.esmt.com.tw/upload/pdf/ESMT/datasheets/F50L1G41LB(2M).pdf https://www.esmt.com.tw/upload/pdf/ESMT/datasheets/F50D1G41LB(2M).pdf Signed-off-by: Chuanhong Guo Signed-off-by: Martin Kurbanov Signed-off-by: Dmitry Rokosov Tested-by: Martin Kurbanov Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230329114240.378722-1-mmkurbanov@sberdevices.ru commit 7b59bdbc3965ca8add53e084af394c13a2be22a8 Author: Andy Shevchenko Date: Tue Mar 21 15:53:32 2023 +0200 gpiolib: Add gpiochip_set_data() helper There are too many 'data' parameters here and there. For the better maintenance keep access GPIO device data via getter and setter. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 8deb779d36cb86c1c1c37d767317f5899b32fc76 Author: Andy Shevchenko Date: Tue Mar 21 15:53:31 2023 +0200 gpiolib: Move gpiochip_get_data() higher in the code Move gpiochip_get_data() higher in the code as a preparation for further refactoring. Signed-off-by: Andy Shevchenko [Bartosz: tweak the commit message] Signed-off-by: Bartosz Golaszewski commit a915450e0e44e9ed2a87fc5b3208d5ce01554a8a Author: Lee Jones Date: Fri Mar 31 10:26:04 2023 +0100 drm/i915/i915_vma: Provide one missing param and demote another non-kerneldoc header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/i915_vma.c:756: warning: Function parameter or member 'ww' not described in 'i915_vma_insert' drivers/gpu/drm/i915/i915_vma.c:1744: warning: Function parameter or member 'vma' not described in 'i915_vma_destroy_locked' Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-17-lee@kernel.org commit 2447c731fe55a36accdd7aff96670d69c06c2372 Author: Lee Jones Date: Fri Mar 31 10:26:03 2023 +0100 drm/i915/gt/uc/intel_guc_hwconfig: Demote a few non-conforming kerneldoc headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c:112: warning: Function parameter or member 'gt' not described in 'guc_hwconfig_init' drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c:112: warning: expecting prototype for intel_guc_hwconfig_init(). Prototype was for guc_hwconfig_init() instead drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c:145: warning: Function parameter or member 'gt' not described in 'intel_gt_init_hwconfig' drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c:158: warning: Function parameter or member 'gt' not described in 'intel_gt_fini_hwconfig' Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: John Harrison Cc: Matt Roper Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-16-lee@kernel.org commit 5d9543162fd6686e83f86a448fe2ba2e7a5ebbb5 Author: Lee Jones Date: Fri Mar 31 10:26:02 2023 +0100 drm/i915/i915_gem: Provide function names to complete the expected kerneldoc format Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/i915_gem.c:447: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/i915/i915_gem.c:536: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/i915/i915_gem.c:726: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/i915/i915_gem.c:811: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: Eric Anholt Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula [Jani: fix i915_gem_sw_finish_ioctl while applying] Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-15-lee@kernel.org commit 81d4baaf4b876589a72a500d45f2c67bbe82bcc2 Author: Lee Jones Date: Fri Mar 31 10:26:01 2023 +0100 drm/i915/gem/i915_gem_object: Demote non-kerneldoc header with no param descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/gem/i915_gem_object.c:887: warning: Function parameter or member 'obj' not described in 'i915_gem_object_has_unknown_state' Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: Matthew Auld Cc: Nirmoy Das Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-14-lee@kernel.org commit 0f923778f47bfc8c47fabb6a93721ae71a6e6702 Author: Lee Jones Date: Fri Mar 31 10:26:00 2023 +0100 drm/i915/gem/i915_gem_wait: Provide function name to validate the kerneldoc header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/gem/i915_gem_wait.c:164: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: Chris Wilson Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-13-lee@kernel.org commit 6adba2903fa16c0c55b1f1e3f6506c407a26ff88 Author: Lee Jones Date: Fri Mar 31 10:25:59 2023 +0100 drm/i915/gem/i915_gem_ttm_move: Provide a couple of missing descriptions for 'num_pages' and 'ctx' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c:272: warning: Function parameter or member 'num_pages' not described in 'i915_ttm_memcpy_arg' drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c:569: warning: Function parameter or member 'ctx' not described in 'i915_ttm_move' Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-12-lee@kernel.org commit 98a1dacc246dad474c9f7ddf4f0c7e92d49a15c3 Author: Lee Jones Date: Fri Mar 31 10:25:58 2023 +0100 drm/i915/gem/i915_gem_ttm: Demote half-filled kerneldoc Hopefully someone knowledgable will follow-up to complete it. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1292: warning: Function parameter or member 'offset' not described in '__i915_gem_ttm_object_init' drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1292: warning: Function parameter or member 'page_size' not described in '__i915_gem_ttm_object_init' Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: Matthew Auld Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-11-lee@kernel.org commit 71d93eac585a5f94433d7d4a7340a0d7081d925c Author: Lee Jones Date: Fri Mar 31 10:25:57 2023 +0100 drm/i915/gem/i915_gem_ttm_pm: Provide a couple of missing descriptions for 'flags' and remove some superfluous ones Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c:156: warning: Function parameter or member 'flags' not described in 'i915_ttm_backup_region' drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c:156: warning: Excess function parameter 'allow_gpu' description in 'i915_ttm_backup_region' drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c:156: warning: Excess function parameter 'backup_pinned' description in 'i915_ttm_backup_region' drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c:223: warning: Function parameter or member 'flags' not described in 'i915_ttm_restore_region' drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c:223: warning: Excess function parameter 'allow_gpu' description in 'i915_ttm_restore_region' Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: Matthew Auld Cc: Nirmoy Das Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-10-lee@kernel.org commit 0b81afa5b6d245809d3cc0613adfe6098695253d Author: Lee Jones Date: Fri Mar 31 10:25:56 2023 +0100 drm/i915/gem/i915_gem_domain: Provide function names to complete proper kerneldoc Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/gem/i915_gem_domain.c:119: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/i915/gem/i915_gem_domain.c:180: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/i915/gem/i915_gem_domain.c:265: warning: expecting prototype for Changes the cache(). Prototype was for i915_gem_object_set_cache_level() instead drivers/gpu/drm/i915/gem/i915_gem_domain.c:470: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/i915/gem/i915_gem_domain.c:514: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-9-lee@kernel.org commit b29b32a2ae5a6753cdbe13cf2e64c752743f1923 Author: Lee Jones Date: Fri Mar 31 10:25:55 2023 +0100 drm/i915/gem/i915_gem_create: Provide the function names for proper kerneldoc headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/gem/i915_gem_create.c:147: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/i915/gem/i915_gem_create.c:218: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/i915/gem/i915_gem_create.c:402: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: Matthew Auld Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula [Jani: fixed i915_gem_create_ext_ioctl while applying] Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-8-lee@kernel.org commit 376b1446153ca67e7028e6b9555d9b17477f568b Author: Yang Li Date: Tue Mar 28 13:38:53 2023 +0800 PM / devfreq: exynos-ppmu: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Reviewed-by: Andi Shyti Signed-off-by: Chanwoo Choi commit fc4fef625decc80cf3a72e884a4e37288bfa0f9b Author: Vinod Koul Date: Sat Mar 25 17:54:40 2023 +0530 regulator: dt-bindings: qcom,rpmh: Add compatible for PMC8180 Commit 71ca776a8885 ("regulator: qcom-rpmh: Add pmc8180 and pmc8180c") introduced these compatible's but the yaml conversion commit 7255f98d08c7 ("regulator: Convert RPMh regulator bindings to YAML") seems to have dropped it So bring it back! Signed-off-by: Vinod Koul Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230325122444.249507-9-vkoul@kernel.org Signed-off-by: Mark Brown commit 8e0ae0fb4b91655bcdca2a4d7d16ebb81fc5d786 Author: Jon Hunter Date: Mon Mar 6 15:01:57 2023 +0000 arm64: tegra: Add DSU PMUs for Tegra234 Populate the DynamIQ Shared Unit (DSU) Performance Monitor Unit (PMU) devices for Tegra234 which has one DSU PMU per CPU cluster. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 71de0a054d0ee1f9d0b13401330069cdb8f3e50a Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:43 2023 +0100 arm64: tegra: Drop serial clock-names and reset-names The serial node does not use clock-names and reset-names: tegra234-sim-vdk.dtb: serial@3100000: Unevaluated properties are not allowed ('clock-names', 'reset-names' were unexpected) Signed-off-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding commit 445a1b818e20fbfff5905bb9070da703101a5c00 Author: Lee Jones Date: Fri Mar 31 10:25:54 2023 +0100 drm/i915/gt/intel_rps: Demote a kerneldoc abuse for ips_ping_for_i915_load() Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/gt/intel_rps.c:2646: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-7-lee@kernel.org commit 5c908cd57eeb857f107732773a653c89ad08e9ce Author: Lee Jones Date: Fri Mar 31 10:25:50 2023 +0100 drm/i915/intel_region_ttm: Provide missing description for 'offset' param Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/intel_region_ttm.c:201: warning: Function parameter or member 'offset' not described in 'intel_region_ttm_resource_alloc' Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-3-lee@kernel.org commit e6a1e701edd0ef8fd51fd50e11bf29bbb2f37313 Author: Lee Jones Date: Fri Mar 31 10:25:49 2023 +0100 drm/i915/i915_scatterlist: Fix kerneldoc formatting issue - missing '@' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/i915_scatterlist.c:62: warning: Function parameter or member 'size' not described in 'i915_refct_sgt_init' Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-2-lee@kernel.org commit 3eeca5e5f3100435b06a5b5d86daa3d135a8a4bd Author: Konrad Dybcio Date: Fri Mar 31 01:15:16 2023 +0200 drm/msm/adreno: adreno_gpu: Use suspend() instead of idle() on load error The adreno_load_gpu() path is guarded by an error check on adreno_load_fw(). This function is responsible for loading Qualcomm-only-signed binaries (e.g. SQE and GMU FW for A6XX), but it does not take the vendor-signed ZAP blob into account. By embedding the SQE (and GMU, if necessary) firmware into the initrd/kernel, we can trigger and unfortunate path that would not bail out early and proceed with gpu->hw_init(). That will fail, as the ZAP loader path will not find the firmware and return back to adreno_load_gpu(). This error path involves pm_runtime_put_sync() which then calls idle() instead of suspend(). This is suboptimal, as it means that we're not going through the clean shutdown sequence. With at least A619_holi, this makes the GPU not wake up until it goes through at least one more start-fail-stop cycle. The pm_runtime_put_sync that appears in the error path actually does not guarantee that because of the earlier enabling of runtime autosuspend. Fix that by using pm_runtime_put_sync_suspend to force a clean shutdown. Test cases: 1. All firmware baked into kernel 2. error loading ZAP fw in initrd -> load from rootfs at DE start Both succeed on A619_holi (SM6375) and A630 (SDM845). Fixes: 0d997f95b70f ("drm/msm/adreno: fix runtime PM imbalance at gpu load") Signed-off-by: Konrad Dybcio Reviewed-by: Johan Hovold Patchwork: https://patchwork.freedesktop.org/patch/530001/ Link: https://lore.kernel.org/r/20230330231517.2747024-1-konrad.dybcio@linaro.org Signed-off-by: Rob Clark commit 0332bd042eb674bc430757d21a705b4f698cd262 Author: Konrad Dybcio Date: Sat Apr 1 13:54:38 2023 +0200 drm/msm/adreno: adreno_gpu: Don't set OPP scaling clock w/ GMU Recently I contributed the switch to OPP API for all Adreno generations. I did however also skip over the fact that GPUs with a GMU don't specify a core clock of any kind in the GPU node. While that didn't break anything, it did introduce unwanted spam in the dmesg: adreno 5000000.gpu: error -ENOENT: _opp_set_clknames: Couldn't find clock with name: core_clk Guard the entire logic so that it's not used with GMU-equipped GPUs. Fixes: 9f251f934012 ("drm/msm/adreno: Use OPP for every GPU generation") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/530347/ Link: https://lore.kernel.org/r/20230223-topic-gmuwrapper-v6-1-2034115bb60c@linaro.org Signed-off-by: Rob Clark commit 3e66f493e136e615ada3c0dc691119679b1df837 Author: Marek Vasut Date: Tue Feb 21 21:04:07 2023 +0100 dt-bindings: display: Start the info graphics with HS/VS change The VS signal change is synchronized to HS signal change, start the info graphics with that event, instead of having that event occur in the middle of it. Scope trace of DPI bus with HS/VS active HIGH looks as follows: ________________...__ VS...___/__ __ \______... HS...___/ \_______/ \__...__/ \___... ^ ^ | | | Used to start here -' | '--- Start info graphics here Signed-off-by: Marek Vasut Reviewed-by: Sam Ravnborg Acked-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20230221200407.16531-1-marex@denx.de commit 2792aed16ca7e594916893698f526ff31eeed237 Author: Marek Vasut Date: Sun Oct 16 02:36:32 2022 +0200 drm/bridge: tc358767: Enable DSI burst mode, LPM, non-continuous clock The TC358767/TC358867/TC9595 are capable of DSI burst mode, which is more energy efficient than the non-burst modes. Make use of it. The TC358767/TC358867/TC9595 are capable of DSI non-continuous clock, since it sources the internal PLL clock from external clock source. The DSI non-continuous clock further reduces power utilization. The TC358767/TC358867/TC9595 may use DSI LPM for command transmissions, make sure this is configured correctly in the DSI mode flags. Signed-off-by: Marek Vasut Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20221016003632.406468-1-marex@denx.de commit cbef9a83c51dfcb07f77cfa6ac26f53a1ea86f49 Author: Armin Wolf Date: Thu Mar 30 23:56:37 2023 +0200 wifi: rt2x00: Fix memory leak when handling surveys When removing a rt2x00 device, its associated channel surveys are not freed, causing a memory leak observable with kmemleak: unreferenced object 0xffff9620f0881a00 (size 512): comm "systemd-udevd", pid 2290, jiffies 4294906974 (age 33.768s) hex dump (first 32 bytes): 70 44 12 00 00 00 00 00 92 8a 00 00 00 00 00 00 pD.............. 00 00 00 00 00 00 00 00 ab 87 01 00 00 00 00 00 ................ backtrace: [] __kmalloc+0x4b/0x130 [] rt2800_probe_hw+0xc2b/0x1380 [rt2800lib] [] rt2800usb_probe_hw+0xe/0x60 [rt2800usb] [] rt2x00lib_probe_dev+0x21a/0x7d0 [rt2x00lib] [] rt2x00usb_probe+0x1be/0x980 [rt2x00usb] [] usb_probe_interface+0xe2/0x310 [usbcore] [] really_probe+0x1a5/0x410 [] __driver_probe_device+0x78/0x180 [] driver_probe_device+0x1e/0x90 [] __driver_attach+0xd2/0x1c0 [] bus_for_each_dev+0x77/0xd0 [] bus_add_driver+0x112/0x210 [] driver_register+0x5c/0x120 [] usb_register_driver+0x88/0x150 [usbcore] [] do_one_initcall+0x44/0x220 [] do_init_module+0x4c/0x220 Fix this by freeing the channel surveys on device removal. Tested with a RT3070 based USB wireless adapter. Fixes: 5447626910f5 ("rt2x00: save survey for every channel visited") Signed-off-by: Armin Wolf Reviewed-by: Simon Horman Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230330215637.4332-1-W_Armin@gmx.de commit e83ce86aa7d914484038b181725718136387c7e1 Author: Jiapeng Chong Date: Thu Mar 30 10:18:41 2023 +0800 wifi: b43legacy: Remove the unused function prev_slot() The function prev_slot is defined in the dma.c file, but not called elsewhere, so remove this unused function. drivers/net/wireless/broadcom/b43legacy/dma.c:130:19: warning: unused function 'prev_slot'. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4642 Signed-off-by: Jiapeng Chong Reviewed-by: Simon Horman Acked-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230330021841.67724-1-jiapeng.chong@linux.alibaba.com commit 5995f746310108b11c7e377b0ebac4c98e53f9dc Author: Cai Huoqing Date: Thu Mar 23 19:26:13 2023 +0800 wifi: rtw89: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Reviewed-by: Simon Horman Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230323112613.7550-5-cai.huoqing@linux.dev commit 47515664ecfbde11425dff121f298ae4499425c9 Author: Ping-Ke Shih Date: Thu Mar 23 16:28:39 2023 +0800 wifi: rtw89: fix potential race condition between napi_init and napi_enable A race condition can happen if netdev is registered, but NAPI isn't initialized yet, and meanwhile user space starts the netdev that will enable NAPI. Then, it hits BUG_ON(): kernel BUG at net/core/dev.c:6423! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI CPU: 0 PID: 417 Comm: iwd Not tainted 6.2.7-slab-dirty #3 eb0f5a8a9d91 Hardware name: LENOVO 21DL/LNVNB161216, BIOS JPCN20WW(V1.06) 09/20/2022 RIP: 0010:napi_enable+0x3f/0x50 Code: 48 89 c2 48 83 e2 f6 f6 81 89 08 00 00 02 74 0d 48 83 ... RSP: 0018:ffffada1414f3548 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffffa01425802080 RCX: 0000000000000000 RDX: 00000000000002ff RSI: ffffada14e50c614 RDI: ffffa01425808dc0 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000100 R12: ffffa01425808f58 R13: 0000000000000000 R14: ffffa01423498940 R15: 0000000000000001 FS: 00007f5577c0a740(0000) GS:ffffa0169fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f5577a19972 CR3: 0000000125a7a000 CR4: 0000000000750ef0 PKRU: 55555554 Call Trace: rtw89_pci_ops_start+0x1c/0x70 [rtw89_pci 6cbc75429515c181cbc386478d5cfb32ffc5a0f8] rtw89_core_start+0xbe/0x160 [rtw89_core fe07ecb874820b6d778370d4acb6ef8a37847f22] rtw89_ops_start+0x26/0x40 [rtw89_core fe07ecb874820b6d778370d4acb6ef8a37847f22] drv_start+0x42/0x100 [mac80211 c07fa22af8c3cf3f7d7ab3884ca990784d72e2d2] ieee80211_do_open+0x311/0x7d0 [mac80211 c07fa22af8c3cf3f7d7ab3884ca990784d72e2d2] ieee80211_open+0x6a/0x90 [mac80211 c07fa22af8c3cf3f7d7ab3884ca990784d72e2d2] __dev_open+0xe0/0x180 __dev_change_flags+0x1da/0x250 dev_change_flags+0x26/0x70 do_setlink+0x37c/0x12c0 ? ep_poll_callback+0x246/0x290 ? __nla_validate_parse+0x61/0xd00 ? __wake_up_common_lock+0x8f/0xd0 To fix this, follow Jonas' suggestion to switch the order of these functions and move register netdev to be the last step of PCI probe. Also, correct the error handling of rtw89_core_register_hw(). Fixes: e3ec7017f6a2 ("rtw89: add Realtek 802.11ax driver") Cc: stable@vger.kernel.org Reported-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Link: https://lore.kernel.org/linux-wireless/CAOiHx=n7EwK2B9CnBR07FVA=sEzFagb8TkS4XC_qBNq8OwcYUg@mail.gmail.com/T/#t Suggested-by: Jonas Gorski Tested-by: Larry Finger Reviewed-by: Larry Finger Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230323082839.20474-1-pkshih@realtek.com commit 280c444745aaf0ff7f2e54b000bd9fff9f1bbaf2 Author: Chih-Kang Chang Date: Wed Mar 22 14:02:38 2023 +0800 wifi: rtw89: config EDCCA threshold during scan to prevent TX failed Need to configure EDCCA threshold to default value before scan, and recall original value after scan to prevent probe request can't be sent out. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230322060238.43922-1-pkshih@realtek.com commit 40711486c7ba91a35ba495564e45be0f2a1b3729 Author: Chih-Kang Chang Date: Mon Mar 20 17:31:12 2023 +0800 wifi: rtw89: fix incorrect channel info during scan due to ppdu_sts filtering We use ppdu_sts to obtain channel information from hardware, to ensure that the scan results have correct channel information. However, some of ppdu_sts that is filtered by the to_self check is also needed for the scan results. Therefore, we modify the filter part in front of CFO count. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230320093112.30466-3-pkshih@realtek.com commit 41209362d700f868ae7f0f30dc7634d0e0026880 Author: Chin-Yen Lee Date: Mon Mar 20 17:31:11 2023 +0800 wifi: rtw89: remove superfluous H2C of join_info We find that when starting WoWLAN, the second join_info H2C is unnecessary and leads WoWLAN not enter power save mode if using new firmware, so remove it. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230320093112.30466-2-pkshih@realtek.com commit e5307c9cd7ee50accd4e5f28d6a6e09ec11849e3 Author: Chih-Kang Chang Date: Mon Mar 20 17:31:10 2023 +0800 wifi: rtw89: set data lowest rate according to AP supported rate By default the driver uses the 1M and 6M rate (0x0) for data frames in 2 GHz and 5/6 GHz bands respectively. But the rate that might not AP supported. Therefore, We modify the data lowest rate according to the lowest of AP supported rate. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230320093112.30466-1-pkshih@realtek.com commit e749ef968f14a92155b2c3138d7720cf39e65e00 Author: Ping-Ke Shih Date: Thu Mar 16 14:39:56 2023 +0800 wifi: rtw89: add counters of register-based H2C/C2H The register-based H2C/C2H are used to exchange information between driver and firmware, but only apply to narrow area because its data size is smaller than regular packet-based H2C/C2H. This kind of H2C/C2H must be paired. To identify if any H2C/C2H is missing, update counters to help diagnose this kind of problems. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230316063956.71687-1-pkshih@realtek.com commit 7527251f77664dd19716f36f53b723845d537eec Author: Ching-Te Ku Date: Tue Mar 14 10:06:17 2023 +0800 wifi: rtw89: coex: Update Wi-Fi Bluetooth coexistence version to 7.0.1 Update driver with the supported firmware version of the below item. Bluetooth firmware BT_Coex_Ver: 0x07 Wi-Fi firmware version: RTL8852C->v0.27.56.10 RTL8852A->v0.24.36 RTL8852B->v0.29.29 Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230314020617.28193-6-pkshih@realtek.com commit d7904ca8a04062e1c926498966a9fab4abfab161 Author: Ching-Te Ku Date: Tue Mar 14 10:06:16 2023 +0800 wifi: rtw89: coex: Add report control v5 variation In order to reduce firmware code size cost, remove some counter value from the structure. But firmware didn't update version code. To parse the correct report, add another variation version v105 to parse it. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230314020617.28193-5-pkshih@realtek.com commit 20595db3c0681cc034e50fbcba85a1e6cf3325b5 Author: Ching-Te Ku Date: Tue Mar 14 10:06:15 2023 +0800 wifi: rtw89: coex: Update RTL8852B LNA2 hardware parameter The LNA gain didn't set before, it will lead some WiFi RX issue. And the setting can increase both of WiFi & BT performance while they are both RX. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230314020617.28193-4-pkshih@realtek.com commit 829b3a8b212a71b55598b9bd5861a41906a611ae Author: Ching-Te Ku Date: Tue Mar 14 10:06:14 2023 +0800 wifi: rtw89: coex: Not to enable firmware report when WiFi is power saving If driver enable firmware report during WiFi power saving, the firmware timer will lead to some power saving issue like, fail to enter LPS, can not leave LPS or some unexpected issue. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230314020617.28193-3-pkshih@realtek.com commit 70a13e5f00e9ee5497b0c25c2787347c4431b5e4 Author: Ching-Te Ku Date: Tue Mar 14 10:06:13 2023 +0800 wifi: rtw89: coex: Add LPS protocol radio state for RTL8852B This LPS state will not turn off RF, and it can still do some basic traffic, only RTL8852B has the state. Coexistence need let Bluetooth know WiFi is still alive to prevent some Bluetooth performance issue. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230314020617.28193-2-pkshih@realtek.com commit e3ef728ff07b42668e7e12f49cd2f9055e064ec1 Author: Jens Axboe Date: Thu Mar 30 10:05:31 2023 -0600 io_uring: cap io_sqring_entries() at SQ ring size We already do this manually for the !SQPOLL case, do it in general and we can also dump the ugly min3() in io_submit_sqes(). Signed-off-by: Jens Axboe commit 2ad57931db641f3de627023afb8147a8ec0b41dc Author: Jens Axboe Date: Thu Mar 30 10:03:41 2023 -0600 io_uring: rename trace_io_uring_submit_sqe() tracepoint It has nothing to do with the SQE at this point, it's a request submission. While in there, get rid of the 'force_nonblock' argument which is also dead, as we only pass in true. Signed-off-by: Jens Axboe commit a282967c848fb1d92c28334430c472da9c334e54 Author: Pavel Begunkov Date: Mon Mar 27 16:38:15 2023 +0100 io_uring: encapsulate task_work state For task works we're passing around a bool pointer for whether the current ring is locked or not, let's wrap it in a structure, that will make it more opaque preventing abuse and will also help us to pass more info in the future if needed. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1ecec9483d58696e248d1bfd52cf62b04442df1d.1679931367.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 13bfa6f15d0b39254937076ab0557da6875bb455 Author: Pavel Begunkov Date: Mon Mar 27 16:38:14 2023 +0100 io_uring: remove extra tw trylocks Before cond_resched()'ing in handle_tw_list() we also drop the current ring context, and so the next loop iteration will need to pick/pin a new context and do trylock. The chunk removed by this patch was intended to be an optimisation covering exactly this case, i.e. retaking the lock after reschedule, but in reality it's skipped for the first iteration after resched as described and will keep hammering the lock if it's contended. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1ecec9483d58696e248d1bfd52cf62b04442df1d.1679931367.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 07d99096e1635805fb7c60382dc12554886a39b8 Author: Jens Axboe Date: Mon Mar 27 13:10:21 2023 -0600 io_uring/io-wq: drop outdated comment Since the move to PF_IO_WORKER, we don't juggle memory context manually anymore. Remove that outdated part of the comment for __io_worker_idle(). Signed-off-by: Jens Axboe commit d322818ef4c752d79cd667474418691237aa9ccf Author: Pavel Begunkov Date: Mon Mar 27 16:34:48 2023 +0100 io_uring: kill unused notif declarations There are two leftover structures from the notification registration mechanism that has never been released, kill them. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f05f65aebaf8b1b5bf28519a8fdb350e3e7c9ad0.1679924536.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit eb47943f2238bf3a002128d897f18abb143612d3 Author: Gabriel Krisman Bertazi Date: Tue Mar 21 22:16:28 2023 -0300 io-wq: Drop struct io_wqe Since commit 0654b05e7e65 ("io_uring: One wqe per wq"), we have just a single io_wqe instance embedded per io_wq. Drop the extra structure in favor of accessing struct io_wq directly, cleaning up quite a bit of dereferences and backpointers. No functional changes intended. Tested with liburing's testsuite and mmtests performance microbenchmarks. I didn't observe any performance regressions. Signed-off-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/20230322011628.23359-2-krisman@suse.de Signed-off-by: Jens Axboe commit dfd63baf892c016dd0c8c6e99d0973459aabe554 Author: Gabriel Krisman Bertazi Date: Tue Mar 21 22:16:27 2023 -0300 io-wq: Move wq accounting to io_wq Since we now have a single io_wqe per io_wq instead of per-node, and in preparation to its removal, move the accounting into the parent structure. Signed-off-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/20230322011628.23359-2-krisman@suse.de Signed-off-by: Jens Axboe commit fcb46c0ccc7c07af54f818fd498e461353ea50e7 Author: Jens Axboe Date: Fri Mar 17 10:42:08 2023 -0600 io_uring/kbuf: disallow mapping a badly aligned provided ring buffer On at least parisc, we have strict requirements on how we virtually map an address that is shared between the application and the kernel. On these platforms, IOU_PBUF_RING_MMAP should be used when setting up a shared ring buffer for provided buffers. If the application is mapping these pages and asking the kernel to pin+map them as well, then we have no control over what virtual address we get in the kernel. For that case, do a sanity check if SHM_COLOUR is defined, and disallow the mapping request. The application must fall back to using IOU_PBUF_RING_MMAP for this case, and liburing will do that transparently with the set of helpers that it has. Signed-off-by: Jens Axboe commit e1fe7ee885dc0712e982ee465d9f8b96254c30c1 Author: Breno Leitao Date: Thu Feb 23 08:43:53 2023 -0800 io_uring: Add KASAN support for alloc_caches Add support for KASAN in the alloc_caches (apoll and netmsg_cache). Thus, if something touches the unused caches, it will raise a KASAN warning/exception. It poisons the object when the object is put to the cache, and unpoisons it when the object is gotten or freed. Signed-off-by: Breno Leitao Reviewed-by: Gabriel Krisman Bertazi Link: https://lore.kernel.org/r/20230223164353.2839177-2-leitao@debian.org Signed-off-by: Jens Axboe commit efba1a9e653e107577a48157b5424878c46f2285 Author: Breno Leitao Date: Thu Feb 23 08:43:52 2023 -0800 io_uring: Move from hlist to io_wq_work_node Having cache entries linked using the hlist format brings no benefit, and also requires an unnecessary extra pointer address per cache entry. Use the internal io_wq_work_node single-linked list for the internal alloc caches (async_msghdr and async_poll) This is required to be able to use KASAN on cache entries, since we do not need to touch unused (and poisoned) cache entries when adding more entries to the list. Suggested-by: Pavel Begunkov Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20230223164353.2839177-2-leitao@debian.org Signed-off-by: Jens Axboe commit da64d6db3bd304d44d7ac1eb7f319a1cc7efd611 Author: Breno Leitao Date: Fri Mar 10 12:11:07 2023 -0800 io_uring: One wqe per wq Right now io_wq allocates one io_wqe per NUMA node. As io_wq is now bound to a task, the task basically uses only the NUMA local io_wqe, and almost never changes NUMA nodes, thus, the other wqes are mostly unused. Allocate just one io_wqe embedded into io_wq, and uses all possible cpus (cpu_possible_mask) in the io_wqe->cpumask. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20230310201107.4020580-1-leitao@debian.org Signed-off-by: Jens Axboe commit c56e022c0a27142b7b59ae6bdf45f86bf4b298a1 Author: Jens Axboe Date: Tue Mar 14 11:07:19 2023 -0600 io_uring: add support for user mapped provided buffer ring The ring mapped provided buffer rings rely on the application allocating the memory for the ring, and then the kernel will map it. This generally works fine, but runs into issues on some architectures where we need to be able to ensure that the kernel and application virtual address for the ring play nicely together. This at least impacts architectures that set SHM_COLOUR, but potentially also anyone setting SHMLBA. To use this variant of ring provided buffers, the application need not allocate any memory for the ring. Instead the kernel will do so, and the allocation must subsequently call mmap(2) on the ring with the offset set to: IORING_OFF_PBUF_RING | (bgid << IORING_OFF_PBUF_SHIFT) to get a virtual address for the buffer ring. Normally the application would allocate a suitable piece of memory (and correctly aligned) and simply pass that in via io_uring_buf_reg.ring_addr and the kernel would map it. Outside of the setup differences, the kernel allocate + user mapped provided buffer ring works exactly the same. Acked-by: Helge Deller Signed-off-by: Jens Axboe commit 81cf17cd3ab3e5441e876a8e9e9c38ae9920cecb Author: Jens Axboe Date: Tue Mar 14 11:01:45 2023 -0600 io_uring/kbuf: rename struct io_uring_buf_reg 'pad' to'flags' In preparation for allowing flags to be set for registration, rename the padding and use it for that. Acked-by: Helge Deller Signed-off-by: Jens Axboe commit 25a2c188a0a00b3d9f2057798aa86fe6b04377bf Author: Jens Axboe Date: Tue Mar 14 10:59:46 2023 -0600 io_uring/kbuf: add buffer_list->is_mapped member Rather than rely on checking buffer_list->buf_pages or ->buf_nr_pages, add a separate member that tracks if this is a ring mapped provided buffer list or not. Acked-by: Helge Deller Signed-off-by: Jens Axboe commit ba56b63242d12df088ed9a701cad320e6b306dfe Author: Jens Axboe Date: Tue Mar 14 10:55:50 2023 -0600 io_uring/kbuf: move pinning of provided buffer ring into helper In preparation for allowing the kernel to allocate the provided buffer rings and have the application mmap it instead, abstract out the current method of pinning and mapping the user allocated ring. No functional changes intended in this patch. Acked-by: Helge Deller Signed-off-by: Jens Axboe commit d808459b2e31bd5123a14258a7a529995db974c8 Author: Helge Deller Date: Thu Feb 16 09:09:38 2023 +0100 io_uring: Adjust mapping wrt architecture aliasing requirements Some architectures have memory cache aliasing requirements (e.g. parisc) if memory is shared between userspace and kernel. This patch fixes the kernel to return an aliased address when asked by userspace via mmap(). Signed-off-by: Helge Deller Signed-off-by: Jens Axboe commit d4755e15386c38e4ae532ace5acc29fbfaee42e7 Author: Jens Axboe Date: Tue Mar 7 09:47:20 2023 -0700 io_uring: avoid hashing O_DIRECT writes if the filesystem doesn't need it io_uring hashes writes to a given file/inode so that it can serialize them. This is useful if the file system needs exclusive access to the file to perform the write, as otherwise we end up with a ton of io-wq threads trying to lock the inode at the same time. This can cause excessive system time. But if the file system has flagged that it supports parallel O_DIRECT writes, then there's no need to serialize the writes. Check for that through FMODE_DIO_PARALLEL_WRITE and don't hash it if we don't need to. In a basic test of 8 threads writing to a file on XFS on a gen2 Optane, with each thread writing in 4k chunks, it improves performance from ~1350K IOPS (or ~5290MiB/sec) to ~1410K IOPS (or ~5500MiB/sec). Reviewed-by: Darrick J. Wong Signed-off-by: Jens Axboe commit d8aeb44a9ae324c4b823689fabb30b6621d93c88 Author: Jens Axboe Date: Tue Mar 7 09:40:28 2023 -0700 fs: add FMODE_DIO_PARALLEL_WRITE flag Some filesystems support multiple threads writing to the same file with O_DIRECT without requiring exclusive access to it. io_uring can use this hint to avoid serializing dio writes to this inode, instead allowing them to run in parallel. XFS and ext4 both fall into this category, so set the flag for both of them. Reviewed-by: Darrick J. Wong Signed-off-by: Jens Axboe commit 75a252be27300c84c83c96399fa36fb5f6364124 Author: Lee Jones Date: Fri Mar 31 10:26:07 2023 +0100 drm/i915/display/intel_wm: Fix a little doc-rot in intel_update_watermarks() Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/display/intel_wm.c:46: warning: Function parameter or member 'i915' not described in 'intel_update_watermarks' drivers/gpu/drm/i915/display/intel_wm.c:46: warning: Excess function parameter 'dev_priv' description in 'intel_update_watermarks' Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: "Ville Syrjälä" Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-20-lee@kernel.org commit 63c154a0445aa58a1ecb933e6117327b67b6dfa0 Author: Lee Jones Date: Fri Mar 31 10:26:05 2023 +0100 drm/i915/display/intel_display_power: Fix incorrectly documented function __intel_display_power_put_async() Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/display/intel_display_power.c:712: warning: expecting prototype for intel_display_power_put_async(). Prototype was for __intel_display_power_put_async() instead Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: Imre Deak Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-18-lee@kernel.org commit 98a07b82d8ac43f1cdb4fee8c340b020372c9392 Author: Lee Jones Date: Fri Mar 31 10:25:52 2023 +0100 drm/i915/display/intel_display_debugfs: Fix incorrect param naming for 'intel_connector' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/i915/display/intel_display_debugfs.c:1668: warning: Function parameter or member 'intel_connector' not described in 'intel_connector_debugfs_add' drivers/gpu/drm/i915/display/intel_display_debugfs.c:1668: warning: Excess function parameter 'connector' description in 'intel_connector_debugfs_add' Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230331092607.700644-5-lee@kernel.org commit 08ebf57f6e1d73cc1890e1ff1b1c74887c53770b Author: Yang Li Date: Fri Mar 31 09:06:33 2023 +0800 RDMA/cma: Remove NULL check before dev_{put, hold} The call netdev_{put, hold} of dev_{put, hold} will check NULL, so there is no need to check before using dev_{put, hold}, remove it to silence the warnings: ./drivers/infiniband/core/cma.c:713:2-9: WARNING: NULL check before dev_{put, hold} functions is not needed. ./drivers/infiniband/core/cma.c:2433:2-9: WARNING: NULL check before dev_{put, hold} functions is not needed. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4668 Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230331010633.63261-1-yang.lee@linux.alibaba.com Signed-off-by: Leon Romanovsky commit e7706c4bbfe88fe5bc9b8a6b1b5a84a5d58e2f7e Author: Tom Rix Date: Thu Mar 30 19:58:00 2023 -0400 IB/qib: Remove unused cnt variable clang with W=1 reports drivers/infiniband/hw/qib/qib_file_ops.c:487:20: error: variable 'cnt' set but not used [-Werror,-Wunused-but-set-variable] u32 tid, ctxttid, cnt, limit, tidcnt; ^ drivers/infiniband/hw/qib/qib_file_ops.c:1771:9: error: variable 'cnt' set but not used [-Werror,-Wunused-but-set-variable] int i, cnt = 0, maxtid = ctxt_tidbase + dd->rcvtidcnt; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230330235800.1845815-1-trix@redhat.com Signed-off-by: Leon Romanovsky commit 081c27b3bcdbfad6fa3c16975e02e33073f1267d Author: Tom Rix Date: Thu Mar 30 11:36:07 2023 -0400 RDMA/mlx5: Remove unused num_alloc_xa_entries variable clang with W=1 reports drivers/infiniband/hw/mlx5/devx.c:1996:6: error: variable 'num_alloc_xa_entries' set but not used [-Werror,-Wunused-but-set-variable] int num_alloc_xa_entries = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230330153607.1838750-1-trix@redhat.com Signed-off-by: Leon Romanovsky commit 070fc1c0e272a03c194bb1a54565d8eda23960a5 Author: Max Gurtovoy Date: Thu Mar 30 16:13:33 2023 +0300 IB/iser: remove redundant new line This commit doesn't change any logic. Reviewed-by: Sergey Gorenko Signed-off-by: Max Gurtovoy Link: https://lore.kernel.org/r/20230330131333.37900-3-mgurtovoy@nvidia.com Reviewed-by: Sagi Grimberg Signed-off-by: Leon Romanovsky commit 92363895b6c31bb5ba846b1f04cf624b8ed893a6 Author: Max Gurtovoy Date: Thu Mar 30 16:13:32 2023 +0300 IB/iser: centralize setting desc type and done callback Move this common logic into iser_create_send_desc instead of duplicating the code. Reviewed-by: Sergey Gorenko Signed-off-by: Max Gurtovoy Link: https://lore.kernel.org/r/20230330131333.37900-2-mgurtovoy@nvidia.com Reviewed-by: Sagi Grimberg Signed-off-by: Leon Romanovsky commit b7727e231dad51150ef14e1dbcbf0d185077e54b Author: Max Gurtovoy Date: Thu Mar 30 16:13:31 2023 +0300 IB/iser: remove unused macros The removed macros are old leftovers. Reviewed-by: Sergey Gorenko Signed-off-by: Max Gurtovoy Link: https://lore.kernel.org/r/20230330131333.37900-1-mgurtovoy@nvidia.com Reviewed-by: Sagi Grimberg Signed-off-by: Leon Romanovsky commit 5762451d647cda7aa12c2c001330802f03a161a9 Author: Yu Zhe Date: Tue Mar 28 11:10:49 2023 +0800 mmc: core: remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe Link: https://lore.kernel.org/r/20230328031049.22749-1-yuzhe@nfschina.com Signed-off-by: Ulf Hansson commit a0941221c5c6d4574af69b40ac026c22c24965fc Author: Petlozu Pravareshwar Date: Thu Mar 30 17:06:21 2023 +0000 soc/tegra: pmc: Support software wake-up for SPE The Sensor Processing Engine(SPE) can trigger a software wake-up of the device. To support this wake-up for the SPE, set SR_CAPTURE_EN bit in WAKE_AOWAKE_CNTRL register associated with the wake-up for the SPE. This SR capturing logic is expected to be enabled for wakes with short pulse signalling requirements. Signed-off-by: Viswanath L Signed-off-by: Petlozu Pravareshwar Signed-off-by: Thierry Reding commit cc026ccdd502c3709f06aadfde14d1eac6cc3763 Author: Sushil Singh Date: Thu Mar 23 18:43:24 2023 +0530 soc/tegra: pmc: Add wake source interrupt for MGBE Add the GPIO wake interrupt for MGBE ethernet controller on Tegra234 SoC. Signed-off-by: Sushil Singh Signed-off-by: Thierry Reding commit 41068c8b28e16f1c2c26c854271520e1f3afaa22 Author: Simon Ser Date: Thu Mar 2 14:35:13 2023 +0000 drm/vram-helper: turn on PRIME import/export We don't populate drm_driver.gem_prime_import_sg_table so only DMA-BUFs exported from our own device can be imported. We don't populate drm_gem_object_funcs.get_sg_table so DMA-BUFs cannot be imported into another device. Still, this is useful to user-space to share buffers between processes and between API boundaries (e.g. wlroots hard-requires PRIME import/export support). v2: expand commit message Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Tian Tao Cc: Maxime Ripard Cc: Hans de Goede Acked-by: Thomas Zimmermann Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230302143502.500661-2-contact@emersion.fr commit 207395da5a97035f06360638f0c2fcd92963ce95 Author: Simon Ser Date: Thu Mar 2 14:35:09 2023 +0000 drm/prime: reject DMA-BUF attach when get_sg_table is missing drm_gem_map_dma_buf() requires drm_gem_object_funcs.get_sg_table to be implemented, or else WARNs. Allow drivers to leave this hook unimplemented to implement purely local DMA-BUFs (ie, DMA-BUFs which cannot be imported anywhere else but the device which allocated them). In that case, reject imports to other devices in drm_gem_map_attach(). v2: new patch v3: use ENOSYS Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Tian Tao Cc: Maxime Ripard Cc: Hans de Goede Acked-by: Thomas Zimmermann Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230302143502.500661-1-contact@emersion.fr commit 161e0f78b396823e8596ae5e709d93acd914dad3 Author: Jon Hunter Date: Mon Mar 6 15:09:00 2023 +0000 soc/tegra: pmc: Add the PMIC wake event for Tegra234 Add the PMIC wake event for Tegra234 that is used to bring the device out of system suspend for events such as an RTC alarm. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 61228c9b240468dba55ef8a4ac93e777c810c68b Author: Mikko Perttunen Date: Wed Mar 1 15:47:56 2023 +0200 soc/tegra: bpmp: Actually free memory on error path Within the error path, genpd->domains has not been set, so we need to pass the domains variable to kfree instead. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit f435b7ef3b360d689df2ffa8326352cd07940d92 Author: Francesco Dolcini Date: Thu Mar 30 11:31:31 2023 +0200 drm/bridge: lt8912b: Fix DSI Video Mode LT8912 DSI port supports only Non-Burst mode video operation with Sync Events and continuous clock on clock lane, correct dsi mode flags according to that removing MIPI_DSI_MODE_VIDEO_BURST flag. Cc: Fixes: 30e2ae943c26 ("drm/bridge: Introduce LT8912B DSI to HDMI bridge") Signed-off-by: Francesco Dolcini Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20230330093131.424828-1-francesco@dolcini.it commit 60b3a99a3b50c94814b84795e38e2161767ea277 Author: Mikko Perttunen Date: Wed Mar 1 15:47:55 2023 +0200 firmware: tegra: bpmp: Fix error paths in debugfs Some error paths in mrq_debug_read and bpmp_debug_show would overwrite the return error code with a subsequent call to mrq_debug_close. Change the code to only change the error code if there was no prior error. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit f033c26de5a5734625d2dd1dc196745fae186f1b Author: Mark Brown Date: Thu Mar 30 01:10:24 2023 +0100 regmap: Add maple tree based register cache The current state of the art for sparse register maps is the rbtree cache. This works well for most applications but isn't always ideal for sparser register maps since the rbtree can get deep, requiring a lot of walking. Fortunately the kernel has a data structure intended to address this very problem, the maple tree. Provide an initial implementation of a register cache based on the maple tree to start taking advantage of it. The entries stored in the maple tree are arrays of register values, with the maple tree keys holding the register addresses. We store data in host native format rather than device native format as we do for rbtree, this will be a benefit for devices where we don't marshal data within regmap and simplifies the code but will result in additional CPU overhead when syncing the cache on devices where we do marshal data in regmap. This should work well for a lot of devices, though there's some additional areas that could be looked at such as caching the last accessed entry like we do for rbtree and trying to minimise the maple tree level locking. We should also use bulk writes rather than single register writes when resyncing the cache where possible, even if we don't store in device native format. Very small register maps may continue to to better with rbtree longer term. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230325-regcache-maple-v3-2-23e271f93dc7@kernel.org Signed-off-by: Mark Brown commit 05933e2d44607767ecb4937a33df4e882bdf9ad3 Author: Mark Brown Date: Thu Mar 30 01:10:23 2023 +0100 regmap: Factor out single value register syncing In order to support sparse caches that don't store data in raw format factor out the parts of the raw block sync implementation that deal with writing a single register via _regmap_write(). Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230325-regcache-maple-v3-1-23e271f93dc7@kernel.org Signed-off-by: Mark Brown commit d9d5623f37c0a2c05b66a2a41fdbc7f90055fdc1 Author: Bastien Nocera Date: Thu Mar 2 11:55:55 2023 +0100 HID: logitech-hidpp: Set wireless_status for G935 receiver Set the USB interface "wireless_status" for the G935 receiver when receiving battery notifications. This will allow sound daemons such as Pipewire or PulseAudio to know whether or not the headset is turned on and connected. Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20230302105555.51417-6-hadess@hadess.net Signed-off-by: Benjamin Tissoires commit 0a4db185f0788dfc828512d0004c468921bf6c0a Author: Bastien Nocera Date: Thu Mar 2 11:55:54 2023 +0100 USB: core: Add API to change the wireless_status This adds the API that allows device specific drivers to tell user-space about whether the wireless device is connected to its receiver dongle. See "USB: core: Add wireless_status sysfs attribute" for a detailed explanation of what this attribute should be used for. Signed-off-by: Bastien Nocera Acked-by: Greg Kroah-Hartman Acked-by: Alan Stern Link: https://lore.kernel.org/r/20230302105555.51417-5-hadess@hadess.net Signed-off-by: Benjamin Tissoires commit f98e0640c5c6b8bb00336dae8d06ede862754c28 Author: Bastien Nocera Date: Thu Mar 2 11:55:53 2023 +0100 USB: core: Add wireless_status sysfs attribute Add a wireless_status sysfs attribute to USB devices to keep track of whether a USB device that's comprised of a receiver dongle and an emitter device over a, most of the time proprietary, wireless link has its emitter connected or disconnected. This will be used by user-space OS components to determine whether the battery-powered part of the device is wirelessly connected or not, allowing, for example: - upower to hide the battery for devices where the device is turned off but the receiver plugged in, rather than showing 0%, or other values that could be confusing to users - Pipewire to hide a headset from the list of possible inputs or outputs or route audio appropriately if the headset is suddenly turned off, or turned on - libinput to determine whether a keyboard or mouse is present when its receiver is plugged in. This is done at the USB interface level as: - the interface on which the wireless status is detected is sometimes not the same as where it could be consumed (eg. the audio interface on a headset dongle will still appear even if the headset is turned off), and we cannot have synchronisation of status across subsystems. - this behaviour is not specific to HID devices, even if the protocols used to determine whether or not the remote device is connected can be HID. This is not an attribute that is meant to replace protocol specific APIs, such as the ones available for WWAN, WLAN/Wi-Fi, or Bluetooth or any other sort of networking, but solely for wireless devices with an ad-hoc “lose it and your device is e-waste” receiver dongle. The USB interface will only be exporting the wireless_status sysfs attribute if it gets set through the API exported in the next commit. Signed-off-by: Bastien Nocera Acked-by: Greg Kroah-Hartman Acked-by: Alan Stern Link: https://lore.kernel.org/r/20230302105555.51417-4-hadess@hadess.net Signed-off-by: Benjamin Tissoires commit 4a1529f44e32f86a90bc83d29cf4d9e1e6f4d7f0 Author: Bastien Nocera Date: Thu Mar 2 11:55:52 2023 +0100 HID: logitech-hidpp: Add Logitech G935 headset Add the Logitech G935 headset that uses the HID++ protocol to the list of supported devices. Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20230302105555.51417-3-hadess@hadess.net Signed-off-by: Benjamin Tissoires commit c361982a13c9190bb9e76381e0b4c34637712b28 Author: Bastien Nocera Date: Thu Mar 2 11:55:51 2023 +0100 HID: logitech-hidpp: Add support for ADC measurement feature This is used in a number of Logitech headsets to report the voltage of the battery. Tested on a Logitech G935. Signed-off-by: Bastien Nocera BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=216483 Link: https://lore.kernel.org/r/20230302105555.51417-2-hadess@hadess.net Signed-off-by: Benjamin Tissoires commit e0138763be2d8bcc181c2f6110ef0f66979f1ce4 Author: Bastien Nocera Date: Thu Mar 2 11:55:50 2023 +0100 HID: logitech-hidpp: Simplify array length check Use the compiler to force a 100-length array, rather than check the length after the fact. Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20230302105555.51417-1-hadess@hadess.net Signed-off-by: Benjamin Tissoires commit 5b3691d15e04b6d5a32c915577b8dbc5cfb56382 Author: Bastien Nocera Date: Thu Mar 2 14:01:17 2023 +0100 HID: logitech-hidpp: Reconcile USB and Unifying serials Now that USB HID++ devices can gather a serial number that matches the one that would be gathered when connected through a Unifying receiver, remove the last difference by dropping the product ID as devices usually have different product IDs when connected through USB or Unifying. For example, on the serials on a G903 wired/wireless mouse: - Unifying before patch: 4067-e8-ce-cd-45 - USB before patch: c086-e8-ce-cd-45 - Unifying and USB after patch: e8-ce-cd-45 Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20230302130117.3975-2-hadess@hadess.net Signed-off-by: Benjamin Tissoires commit 7ad1fe0da0fa91bf920b79ab05ae97bfabecc4f4 Author: Bastien Nocera Date: Thu Mar 2 14:01:16 2023 +0100 HID: logitech-hidpp: Don't use the USB serial for USB devices For devices that support the 0x0003 feature (Device Information) version 4, set the serial based on the output of that feature, rather than relying on the usbhid code setting the USB serial. This should allow the serial when connected through USB to (nearly) match the one when connected through a unifying receiver. For example, on the serials on a G903 wired/wireless mouse: - Unifying: 4067-e8-ce-cd-45 - USB before patch: 017C385C3837 - USB after patch: c086-e8-ce-cd-45 Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20230302130117.3975-1-hadess@hadess.net Signed-off-by: Benjamin Tissoires commit 4fddc647fe5a77809eaa0be1f489694efb0590af Author: Peng Fan Date: Tue Mar 28 14:07:40 2023 +0800 dt-bindings: mmc: fsl-imx-esdhc: ref sdhci-common.yaml Since the esdhc controller is sdhci compatible, the fsl-imx-esdhc.yaml should ref sdhci-common.yaml to use 'sdhci-caps-mask' property. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20230328060740.1984239-1-peng.fan@oss.nxp.com Signed-off-by: Ulf Hansson commit 3af24372964a8f999d62427c0585d9a4693ae4e4 Author: Allen-KH Cheng Date: Wed Mar 29 16:04:18 2023 +0800 ASoC: mediatek: mt8186: Move some prints to debug level There are many log messages scattered throughout the mt8186 sound drivers, and they are frequently triggered. To avoid spamming the console, move these messages to the debug level. Signed-off-by: Allen-KH Cheng Link: https://lore.kernel.org/r/20230329080418.1100-1-allen-kh.cheng@mediatek.com Signed-off-by: Mark Brown commit dd6bdd8b4d41b8f9db4b88dff2d10c0c62dbeb1d Author: Vijendar Mukunda Date: Mon Apr 3 12:46:46 2023 +0530 ASoC: SOF: amd: refactor dmic codec platform device creation Under snd_sof_dev device scope, create platform device for dmic codec. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/168050621098.26.7486882101201297853@mailman-core.alsa-project.org Signed-off-by: Mark Brown commit c7a3662f14d7e0add7b50dc2f971e77bebb333cc Author: Vijendar Mukunda Date: Mon Apr 3 12:46:45 2023 +0530 ASoC: SOF: amd: refactor error checks in probe call Refactor error checks code in probe() callback. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20230403071651.919027-5-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 292b544ef4555ec5c69522e9c6eace6a90c4cd00 Author: Vijendar Mukunda Date: Mon Apr 3 12:46:44 2023 +0530 ASoC: SOF: amd: refactor get_chip_info callback Move get_chip_info callback to the start of API. This should be first check in probe() call. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20230403071651.919027-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 2675de62de702dbda936eb0f9a20ce3d8fed5ab5 Author: Vijendar Mukunda Date: Mon Apr 3 12:46:43 2023 +0530 ASoC: SOF: amd: remove unused variables Remove unused variables - i2s_mode, i2s_pin_config_offset from code. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20230403071651.919027-3-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 9eb48aeddd8dcf2defd94a837a65e052576cf42b Author: Vijendar Mukunda Date: Mon Apr 3 12:46:42 2023 +0530 ASoC: SOF: amd: remove acp_dai_probe() function ACP SOF driver supports different audio configurations. Explicit condition check for I2S configuration will break other audio endpoint configurations. acp_dai_probe() function is not required as we have machine select logic to select the exact machine. Remove acp_dai_probe() from existing AMD PCI driver code base. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20230403071651.919027-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 56e008146e5b46059c5469a8b47478ab78f5b895 Author: Vijendar Mukunda Date: Mon Apr 3 12:46:41 2023 +0530 ASoC: SOF: amd: remove unused code During initial SOF driver bring up on AMD platforms, only DMIC support was added. As of today, we have a complete SOF solution for I2S endpoints along with DMIC endpoint. This code is no longer required. Remove unused code from RMB and RN platform ACP PCI driver. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20230403071651.919027-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 5781c22ea87700cd1da8f8de8a82fc10ef2f14d2 Author: André Morishita Date: Sat Apr 1 15:19:29 2023 -0300 ASoC: dt-bindings: maxim,max98371: Convert to DT schema Convert the Maxim Integrated MAX98371 audio codec bindings to DT schema. Signed-off-by: André Morishita Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230401181930.533067-1-andremorishita@gmail.com Signed-off-by: Mark Brown commit ee4281de4d60288b9c802bb0906061ec355ecef2 Author: Prajna Sariputra Date: Sun Apr 2 02:21:30 2023 +1100 ASoC: amd: yc: Add DMI entries to support HP OMEN 16-n0xxx (8A42) This model requires an additional detection quirk to enable the internal microphone. Signed-off-by: Prajna Sariputra Link: https://lore.kernel.org/r/2283110.ElGaqSPkdT@n0067ax-linux62 Signed-off-by: Mark Brown commit 7a3f924cee4bdfe85eda4e636213e79d3fda6182 Author: Simon Trimmer Date: Tue Mar 28 14:10:18 2023 +0100 firmware: cs_dsp: Add a debugfs entry containing control details The file named 'controls' in the DSP's debugfs root contains a formatted table describing the controls defined within the loaded DSP firmware, it is of the form name: len region:offset addr fwname algid ctltype flags en dirty Where flags is represented as a character for each flag if set, or '-', enabled is whether the control is enabled or disabled and dirty is whether the control value is set in the cache but not the hardware. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230328131018.6820-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit bee43904dc774b35bb159693ff3f3ff222590bb1 Author: Stanislav Kinsburskii Date: Mon Mar 20 00:02:01 2023 -0700 printk: Remove obsoleted check for non-existent "user" object The original check for non-null "user" object was introduced by commit e11fea92e13f ("kmsg: export printk records to the /dev/kmsg interface") when "user" could be NULL if /dev/ksmg was opened for writing. Subsequent change 750afe7babd1 ("printk: add kernel parameter to control writes to /dev/kmsg") made "user" context required for files opened for write, but didn't remove now redundant checks for it to be non-NULL. This patch removes the dead code while preserving the current logic. Signed-off-by: Stanislav Kinsburskii CC: Petr Mladek CC: Sergey Senozhatsky CC: Steven Rostedt CC: John Ogness CC: linux-kernel@vger.kernel.org Reviewed-by: Sergey Senozhatsky Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/167929571877.2810.9926967619100618792.stgit@skinsburskii.localdomain commit 8768487fc6cc5ed13705978057f1cfa3e1ce1e4c Author: Patrice Chotard Date: Fri Mar 31 09:19:07 2023 +0200 ARM: dts: stm32: Add QSPI support on STM32MP13x SoC family Add QSPI support on STM32MP13x SoC family Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue commit eee3a0e93924f2aab8ebaa7f2e26fd0f3b33f9e7 Author: Christian Brauner Date: Mon Mar 27 20:22:53 2023 +0200 fanotify: use pidfd_prepare() We generally try to avoid installing a file descriptor into the caller's file descriptor table just to close it again via close_fd() in case an error occurs. Instead we reserve a file descriptor but don't install it into the caller's file descriptor table yet. If we fail for other, unrelated reasons we can just close the reserved file descriptor and if we make it past all meaningful error paths we just install it. Fanotify gets this right already for one fd type but not for pidfds. Use the new pidfd_prepare() helper to reserve a pidfd and a pidfd file and switch to the more common fd allocation and installation pattern. Acked-by: Jan Kara Message-Id: <20230327-pidfd-file-api-v1-3-5c0e9a3158e4@kernel.org> Signed-off-by: Christian Brauner commit ca7707f5430ad6b1c9cb7cee0a7f67d69328bb2d Author: Christian Brauner Date: Mon Mar 27 20:22:52 2023 +0200 fork: use pidfd_prepare() Stop open-coding get_unused_fd_flags() and anon_inode_getfile(). That's brittle just for keeping the flags between both calls in sync. Use the dedicated helper. Message-Id: <20230327-pidfd-file-api-v1-2-5c0e9a3158e4@kernel.org> Signed-off-by: Christian Brauner commit 6ae930d9dbf2d093157be33428538c91966d8a9f Author: Christian Brauner Date: Mon Mar 27 20:22:51 2023 +0200 pid: add pidfd_prepare() Add a new helper that allows to reserve a pidfd and allocates a new pidfd file that stashes the provided struct pid. This will allow us to remove places that either open code this function or that call pidfd_create() but then have to call close_fd() because there are still failure points after pidfd_create() has been called. Reviewed-by: Jan Kara Message-Id: <20230327-pidfd-file-api-v1-1-5c0e9a3158e4@kernel.org> Signed-off-by: Christian Brauner commit 7b600f8da8fe65183014c2b87e61da7c597476cf Merge: 56b029ddac8ee 386f5fc9061b0 Author: David S. Miller Date: Mon Apr 3 10:13:01 2023 +0100 Merge branch 'mt7988-support' Daniel Golle says: ==================== net: dsa: add support for MT7988 The MediaTek MT7988 SoC comes with a built-in switch very similar to previous MT7530 and MT7531. However, the switch address space is mapped into the SoCs memory space rather than being connected via MDIO. Using MMIO simplifies register access and also removes the need for a bus lock, and for that reason also makes interrupt handling more light-weight. Note that this is different from previous SoCs like MT7621 and MT7623N which also came with an integrated MT7530-like switch which yet had to be accessed via MDIO. Split-off the part of the driver registering an MDIO driver, then add another module acting as MMIO/platform driver. The whole series has been tested on various MediaTek boards: * MT7623A + MT7530 (BPi-R2) * MT7986A + MT7531 (BPi-R3) * MT7988A reference board Changes since v1: * use 'internal' PHY mode where appropriate * use regmap_update_bits in mt7530_rmw * improve dt-bindings Changes since RFC v3: * WARN_ON_ONCE if register read fails * move probing of the reset GPIO and reset controller link out of common probe function, as they are not actually common Changes since RFC v2: * split into many small commits to ease review * introduce helper functions to reduce code duplication * use helpers for locking to make lock-skipping easier and less ugly to implement. * add dt-bindings for mediatek,mt7988-switch Changes since initial RFC: * use regmap for register access and move register access to bus- specific driver * move initialization of MT7531 SGMII PCS to MDIO driver ==================== Signed-off-by: David S. Miller commit 386f5fc9061b0c8429c7c0cc57f12c05f8662e23 Author: Daniel Golle Date: Mon Apr 3 02:19:51 2023 +0100 dt-bindings: net: dsa: mediatek,mt7530: add mediatek,mt7988-switch Add documentation for the built-in switch which can be found in the MediaTek MT7988 SoC. Signed-off-by: Daniel Golle Signed-off-by: David S. Miller commit 110c18bfed41421edd677935dd33be5e6507ba92 Author: Daniel Golle Date: Mon Apr 3 02:19:40 2023 +0100 net: dsa: mt7530: introduce driver for MT7988 built-in switch Add driver for the built-in Gigabit Ethernet switch which can be found in the MediaTek MT7988 SoC. The switch shares most of its design with MT7530 and MT7531, but has it's registers mapped into the SoCs register space rather than being connected externally or internally via MDIO. Introduce a new platform driver to support that. Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 54d4147a121cec5004a673a58572da346e4458f8 Author: Daniel Golle Date: Mon Apr 3 02:19:28 2023 +0100 net: dsa: mt7530: skip locking if MDIO bus isn't present As MT7530 and MT7531 internally use 32-bit wide registers, each access to any register of the switch requires several operations on the MDIO bus. Hence if there is congruent access, e.g. due to PCS or PHY polling, this can mess up and interfere with another ongoing register access sequence. However, the MDIO bus mutex is only relevant for MDIO-connected switches. Prepare switches which have there registers directly mapped into the SoCs register space via MMIO which do not require such locking. There we can simply use regmap's default locking mechanism. Hence guard mutex operations to only be performed in case of MDIO connected switches. Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit cb675afcddbbeb2bfa6596e3bc236bc026cd425f Author: Daniel Golle Date: Mon Apr 3 02:19:13 2023 +0100 net: dsa: mt7530: introduce separate MDIO driver Split MT7530 switch driver into a common part and a part specific for MDIO connected switches and multi-chip modules. Move MDIO-specific functions to newly introduced mt7530-mdio.c while keeping the common parts in mt7530.c. Introduce new Kconfig symbol CONFIG_NET_DSA_MT7530_MDIO which is implied by CONFIG_NET_DSA_MT7530. Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 7f54cc9772ced2d76ac11832f0ada43798443ac9 Author: Daniel Golle Date: Mon Apr 3 02:19:02 2023 +0100 net: dsa: mt7530: split-off common parts from mt7531_setup MT7988 shares a significant part of the setup function with MT7531. Split-off those parts into a shared function which is going to be used also by mt7988_setup. Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 720d736351761574af02ed093658ab60de60576c Author: Daniel Golle Date: Mon Apr 3 02:18:50 2023 +0100 net: dsa: mt7530: introduce mt7530_remove_common helper function Move commonly used parts from mt7530_remove into new mt7530_remove_common helper function which will be used by both, mt7530_remove and the to-be-introduced mt7988_remove. Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 37c9c0d8d0b2e24f8c9af72ecd4edd31537284d3 Author: Daniel Golle Date: Mon Apr 3 02:18:39 2023 +0100 net: dsa: mt7530: introduce mt7530_probe_common helper function Move commonly used parts from mt7530_probe into new mt7530_probe_common helper function which will be used by both, mt7530_probe and the to-be-introduced mt7988_probe. Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 25d15dee34a1a40d5fd71636a205e3211f09fd1d Author: Daniel Golle Date: Mon Apr 3 02:18:28 2023 +0100 net: dsa: mt7530: move p5_intf_modes() function to mt7530.c In preparation of splitting mt7530.c into a driver for MDIO-connected as well as MDIO-accessed built-in switches on one hand and MMIO-accessed built-in switches move the p5_inft_modes() function from mt7530.h to mt7530.c. The function is only needed there and will trigger a compiler warning about a defined but unused function otherwise when including mt7530.h in the to-be-introduced bus-specific drivers. Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 1557c679f71c82a994eae0baadbaeb62b71e15bf Author: Daniel Golle Date: Mon Apr 3 02:18:16 2023 +0100 net: dsa: mt7530: introduce mutex helpers As the MDIO bus lock only needs to be involved if actually operating on an MDIO-connected switch we will need to skip locking for built-in switches which are accessed via MMIO. Create helper functions which simplify that upcoming change. Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 6de2852297737171ba96b91e89bf302ca1fda869 Author: Daniel Golle Date: Mon Apr 3 02:18:04 2023 +0100 net: dsa: mt7530: move SGMII PCS creation to mt7530_probe function Move creating the SGMII PCS from mt753x_setup() to the more appropriate mt7530_probe() function. This is done also in preparation of moving all functions related to MDIO-connected MT753x switches to a separate module. Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a08c045580e060a6886bbb656c50ae20b0c780b5 Author: Daniel Golle Date: Mon Apr 3 02:17:52 2023 +0100 net: dsa: mt7530: use regmap to access switch register space Use regmap API to access the switch register space. Signed-off-by: Daniel Golle Signed-off-by: David S. Miller commit 1bd099c49f65ed923b9f19b8c4b3cd1ff0024091 Author: Daniel Golle Date: Mon Apr 3 02:17:40 2023 +0100 net: dsa: mt7530: use unlocked regmap accessors Instead of wrapping the locked register accessor functions, use the unlocked variants and add locking wrapper functions to let regmap handle the locking. This is a preparation towards being able to always use regmap to access switch registers instead of open-coded accessor functions. Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9ecc00164dc2300dfcd40afe549a8ee951dfea9f Author: Daniel Golle Date: Mon Apr 3 02:17:30 2023 +0100 net: dsa: mt7530: refactor SGMII PCS creation Instead of macro templates use a dedidated function and allocated regmap_config when creating the regmaps for the pcs-mtk-lynxi instances. This is in preparation to switching to use unlocked regmap accessors and have regmap's locking API handle locking for us. Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit b6f56cddb5f57a0b8da0ce582232a2f1933558c6 Author: Daniel Golle Date: Mon Apr 3 02:17:19 2023 +0100 net: dsa: mt7530: make some noise if register read fails Simply returning the negative error value instead of the read value doesn't seem like a good idea. Return 0 instead and add WARN_ON_ONCE(1) so this kind of error will not go unnoticed. Suggested-by: Andrew Lunn Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 56b029ddac8eebdeb3d8a15c8aed71a1c62e4924 Merge: 858e5b06409f6 3c4c3b3e6d414 Author: David S. Miller Date: Mon Apr 3 10:08:43 2023 +0100 Merge branch 'phy-smsc-edpd-tunable' Heiner Kallweit says: ==================== net: phy: smsc: add support for edpd tunable This adds support for the EDPD PHY tunable. Per default EDPD is disabled in interrupt mode, the tunable can be used to override this, e.g. if the link partner doesn't use EDPD. The interval to check for energy can be chosen between 1000ms and 2000ms. Note that this value consists of the 1000ms phylib interval for state machine runs plus the time to wait for energy being detected. ==================== Signed-off-by: David S. Miller commit 3c4c3b3e6d414c50f6858f027a2ca2206e1ce583 Author: Heiner Kallweit Date: Sun Apr 2 17:17:35 2023 +0200 net: phy: smsc: enable edpd tunable support Enable EDPD PHY tunable support for all drivers using lan87xx_read_status. Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 657de1cf258dbe2489906c81bd91e4af536de255 Author: Heiner Kallweit Date: Sun Apr 2 17:16:56 2023 +0200 net: phy: smsc: add support for edpd tunable This adds support for the EDPD PHY tunable. Per default EDPD is disabled in interrupt mode, the tunable can be used to override this, e.g. if the link partner doesn't use EDPD. The interval to check for energy can be chosen between 1000ms and 2000ms. Note that this value consists of the 1000ms phylib interval for state machine runs plus the time to wait for energy being detected. v2: - consider that phylib core holds phydev->lock when calling the phy tunable hooks Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 1ce658693b089ee753260eae78a3ea572bc4b3fb Author: Heiner Kallweit Date: Sun Apr 2 17:14:35 2023 +0200 net: phy: smsc: prepare for making edpd wait period configurable Add a member edpd_max_wait_ms to the private data structure in preparation of making the wait period configurable by supporting the edpd phy tunable. v2: - rename constant to EDPD_MAX_WAIT_DFLT_MS Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit a620511080960a72a40c58c55945e41cc3052f6f Author: Heiner Kallweit Date: Sun Apr 2 17:13:35 2023 +0200 net: phy: smsc: add flag edpd_mode_set_by_user Add flag edpd_mode_set_by_user in preparation of adding edpd phy tunable support. This flag will allow users to override the default behavior of edpd being disabled if interrupt mode is used. Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit d56417ad1133fc41752bb9fe37da7ae3187395a4 Author: Heiner Kallweit Date: Sun Apr 2 17:13:05 2023 +0200 net: phy: smsc: clear edpd_enable if interrupt mode is used Clear edpd_enable if interupt mode is used, this avoids having to check for PHY_POLL multiple times. Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 89946e31ff4f7f43b3cf4837eb5b9f141eb6f1d6 Author: Heiner Kallweit Date: Sun Apr 2 17:12:20 2023 +0200 net: phy: smsc: add helper smsc_phy_config_edpd Add helper smsc_phy_config_edpd() and explicitly clear bit MII_LAN83C185_EDPWRDOWN is edpd_enable isn't set. Boot loader may have left whatever value. Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit fc281d78b6863ba86baec220651fef815341d3a0 Author: Heiner Kallweit Date: Sun Apr 2 17:11:40 2023 +0200 net: phy: smsc: rename flag energy_enable Rename the flag to edpd_enable, as we're not enabling energy but edpd (energy detect power down) mode. In addition change the type to a bit field member in preparation of adding further flags. Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 858e5b06409f65d09dc60e32432e4b8e12e4dba0 Merge: 51aaa68222d6c 88c0a6b503b7f Author: David S. Miller Date: Mon Apr 3 10:04:27 2023 +0100 Merge branch 'dsa_master_ioctl-notifier' Vladimir Oltean says: ==================== net: Convert dsa_master_ioctl() to netdev notifier This is preparatory work in order for Maxim Georgiev to be able to start the API conversion process of hardware timestamping from ndo_eth_ioctl() to ndo_hwtstamp_set(): https://lore.kernel.org/netdev/20230331045619.40256-1-glipus@gmail.com/ In turn, Maxim Georgiev's work is a preparation so that Köry Maincent is able to make the active hardware timestamping layer selectable by user space. https://lore.kernel.org/netdev/20230308135936.761794-1-kory.maincent@bootlin.com/ So, quite some dependency chain. Before this patch set, DSA prevented the conversion of any networking driver from the ndo_eth_ioctl() API to the ndo_hwtstamp_set() API, because it wanted to validate the hwtstamping settings on the DSA master, and it was only coded up to do this using the old API. After this patch set, a new netdev notifier exists, which does not depend on anything that would constitute the "soon-to-be-legacy" API, but rather, it uses a newly introduced struct kernel_hwtstamp_config, and it doesn't issue any ioctl at all, being thus compatible both with ndo_eth_ioctl(), and with the not-yet-introduced, but now possible, ndo_hwtstamp_set(). ==================== Signed-off-by: David S. Miller commit 88c0a6b503b7f4fffb68a8d49c3987870c5b1d6b Author: Vladimir Oltean Date: Sun Apr 2 15:37:55 2023 +0300 net: create a netdev notifier for DSA to reject PTP on DSA master The fact that PTP 2-step TX timestamping is broken on DSA switches if the master also timestamps the same packets is documented by commit f685e609a301 ("net: dsa: Deny PTP on master if switch supports it"). We attempt to help the users avoid shooting themselves in the foot by making DSA reject the timestamping ioctls on an interface that is a DSA master, and the switch tree beneath it contains switches which are aware of PTP. The only problem is that there isn't an established way of intercepting ndo_eth_ioctl calls, so DSA creates avoidable burden upon the network stack by creating a struct dsa_netdevice_ops with overlaid function pointers that are manually checked from the relevant call sites. There used to be 2 such dsa_netdevice_ops, but now, ndo_eth_ioctl is the only one left. There is an ongoing effort to migrate driver-visible hardware timestamping control from the ndo_eth_ioctl() based API to a new ndo_hwtstamp_set() model, but DSA actively prevents that migration, since dsa_master_ioctl() is currently coded to manually call the master's legacy ndo_eth_ioctl(), and so, whenever a network device driver would be converted to the new API, DSA's restrictions would be circumvented, because any device could be used as a DSA master. The established way for unrelated modules to react on a net device event is via netdevice notifiers. So we create a new notifier which gets called whenever there is an attempt to change hardware timestamping settings on a device. Finally, there is another reason why a netdev notifier will be a good idea, besides strictly DSA, and this has to do with PHY timestamping. With ndo_eth_ioctl(), all MAC drivers must manually call phy_has_hwtstamp() before deciding whether to act upon SIOCSHWTSTAMP, otherwise they must pass this ioctl to the PHY driver via phy_mii_ioctl(). With the new ndo_hwtstamp_set() API, it will be desirable to simply not make any calls into the MAC device driver when timestamping should be performed at the PHY level. But there exist drivers, such as the lan966x switch, which need to install packet traps for PTP regardless of whether they are the layer that provides the hardware timestamps, or the PHY is. That would be impossible to support with the new API. The proposal there, too, is to introduce a netdev notifier which acts as a better cue for switching drivers to add or remove PTP packet traps, than ndo_hwtstamp_set(). The one introduced here "almost" works there as well, except for the fact that packet traps should only be installed if the PHY driver succeeded to enable hardware timestamping, whereas here, we need to deny hardware timestamping on the DSA master before it actually gets enabled. This is why this notifier is called "PRE_", and the notifier that would get used for PHY timestamping and packet traps would be called NETDEV_CHANGE_HWTSTAMP. This isn't a new concept, for example NETDEV_CHANGEUPPER and NETDEV_PRECHANGEUPPER do the same thing. In expectation of future netlink UAPI, we also pass a non-NULL extack pointer to the netdev notifier, and we make DSA populate it with an informative reason for the rejection. To avoid making it go to waste, we make the ioctl-based dev_set_hwtstamp() create a fake extack and print the message to the kernel log. Link: https://lore.kernel.org/netdev/20230401191215.tvveoi3lkawgg6g4@skbuf/ Link: https://lore.kernel.org/netdev/20230310164451.ls7bbs6pdzs4m6pw@skbuf/ Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit ff6ac4d013e680a5e7a38ee83ca59ffe1846915d Author: Vladimir Oltean Date: Sun Apr 2 15:37:54 2023 +0300 net: dsa: make dsa_port_supports_hwtstamp() construct a fake ifreq dsa_master_ioctl() is in the process of getting converted to a different API, where we won't have access to a struct ifreq * anymore, but rather, to a struct kernel_hwtstamp_config. Since ds->ops->port_hwtstamp_get() still uses struct ifreq *, this creates a difficult situation where we have to make up such a dummy pointer. The conversion is a bit messy, because it forces a "good" implementation of ds->ops->port_hwtstamp_get() to return -EFAULT in copy_to_user() because of the NULL ifr->ifr_data pointer. However, it works, and it is only a transient step until ds->ops->port_hwtstamp_get() gets converted to the new API which passes struct kernel_hwtstamp_config and does not call copy_to_user(). Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit c4bffeaa8d50b7279c5a76597efa4b06e709df63 Author: Vladimir Oltean Date: Sun Apr 2 15:37:53 2023 +0300 net: add struct kernel_hwtstamp_config and make net_hwtstamp_validate() use it Jakub Kicinski suggested that we may want to add new UAPI for controlling hardware timestamping through netlink in the future, and in that case, we will be limited to the struct hwtstamp_config that is currently passed in fixed binary format through the SIOCGHWTSTAMP and SIOCSHWTSTAMP ioctls. 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_ethtool_coalesce vs struct ethtool_coalesce. Since struct hwtstamp_config is in include/uapi/linux/net_tstamp.h, here we introduce include/linux/net_tstamp.h which shadows that other header, but also includes it, so that existing includers of this header work as before. In addition to that, we add the definition for the kernel-only structure, and a helper which translates all fields by manual copying. I am doing a manual copy in order to not force the alignment (or type) of the fields of struct kernel_hwtstamp_config to be the same as of struct hwtstamp_config, even though now, they are the same. Link: https://lore.kernel.org/netdev/20230330223519.36ce7d23@kernel.org/ Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d5d5fd8f2552f6b9c50d3937c77b6783f99fbe83 Author: Vladimir Oltean Date: Sun Apr 2 15:37:52 2023 +0300 net: move copy_from_user() out of net_hwtstamp_validate() The kernel will want to start using the more meaningful struct hwtstamp_config pointer in more places, so move the copy_from_user() at the beginning of dev_set_hwtstamp() in order to get to that, and pass this argument to net_hwtstamp_validate(). Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 4ee58e1e56800b589afe31c34547e2bc0c59f586 Author: Vladimir Oltean Date: Sun Apr 2 15:37:51 2023 +0300 net: promote SIOCSHWTSTAMP and SIOCGHWTSTAMP ioctls to dedicated handlers DSA does not want to intercept all ioctls handled by dev_eth_ioctl(), only SIOCSHWTSTAMP. This can be seen from commit f685e609a301 ("net: dsa: Deny PTP on master if switch supports it"). However, the way in which the dsa_ndo_eth_ioctl() is called would suggest otherwise. Split the handling of SIOCSHWTSTAMP and SIOCGHWTSTAMP ioctls into separate case statements of dev_ifsioc(), and make each one call its own sub-function. This also removes the dsa_ndo_eth_ioctl() call from dev_eth_ioctl(), which from now on exclusively handles PHY ioctls. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 1193db2a55b6b04f296f03affdfa80c16ecc3814 Author: Vladimir Oltean Date: Sun Apr 2 15:37:50 2023 +0300 net: simplify handling of dsa_ndo_eth_ioctl() return code In the expression "x == 0 || x != -95", the term "x == 0" does not change the expression's logical value, because 0 != -95, and so, if x is 0, the expression would still be true by virtue of the second term. If x is non-zero, the expression depends on the truth value of the second term anyway. As such, the first term is redundant and can be deleted. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 00d521b39307c3232bdc685c2e9fd82ed973ac24 Author: Vladimir Oltean Date: Sun Apr 2 15:37:49 2023 +0300 net: don't abuse "default" case for unknown ioctl in dev_ifsioc() The "switch (cmd)" block from dev_ifsioc() gained a bit too much unnecessary manual handling of "cmd" in the "default" case, starting with the private ioctls. Clean that up by using the "ellipsis" gcc extension, adding separate cases for the rest of the ioctls, and letting the default case only return -EINVAL. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 1ea3bb3e4b767d074c8215c515e959c6420908bf Author: Geert Uytterhoeven Date: Mon Mar 6 13:48:37 2023 +0100 m68k: defconfig: Update defconfigs for v6.3-rc1 - Drop CONFIG_IP_NF_TARGET_CLUSTERIP=m (removed in commit 9db5d918e2c07fa0 ("netfilter: ip_tables: remove clusterip target")), - Enable modular build of the Kerberos V mechanism for Secure RPC (auto-builtin since commit dfe9a123451a6e73 ("SUNRPC: Enable rpcsec_gss_krb5.ko to be built without CRYPTO_DES")), - Enable modular build of the new Dhrystone benchmark test, - Drop accidental enablement of CONFIG_PCCARD=y in multi_defconfig. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/2b6d1357f4cb7e23bb2c7a7d39c4486e77e138ad.1678106848.git.geert@linux-m68k.org commit 48e1a66fecb4e8b64cf2a0a8978c048990181d94 Author: Andy Shevchenko Date: Mon Mar 27 17:27:21 2023 +0300 lib/vsprintf: Use isodigit() for the octal number check Use isodigit() to test the octal number instead of homegrown approach. Signed-off-by: Andy Shevchenko Reviewed-by: Sergey Senozhatsky Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230327142721.48378-1-andriy.shevchenko@linux.intel.com commit 0f752b2178c988117927154fe3b1d2e619c80c57 Author: Imre Deak Date: Thu Mar 23 16:20:35 2023 +0200 drm/i915: Remove the encoder update_prepare()/complete() hooks The encoder update_prepare()/complete() hooks were added to hold a TC port link reference for all outputs in the atomic state around the whole modeset enable sequence - thus locking the ports' TC mode - and set the TBT/DP-alt PLL type corresponding to the current TC mode. Since nothing depends on the PLL selection before/after then encoder's pre_pll_enable/post_pll_disable hooks are called, the above steps can be moved to these hooks, so do that and remove the update_prepare()/complete() hooks. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-30-imre.deak@intel.com commit 450c27fc9e9cf74ff9b96dd813817133e0f50cf1 Author: Imre Deak Date: Thu Mar 23 16:20:34 2023 +0200 drm/i915: Remove TC PHY disconnect workaround After the previous patch the workaround for a TC PHY hang issue is not required any more, remove it. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-29-imre.deak@intel.com commit b108bdd0e22a402bd3e4a6391acbb6aefad31a9e Author: Imre Deak Date: Thu Mar 23 16:20:33 2023 +0200 drm/i915: Disable DPLLs before disconnecting the TC PHY Bspec requires disabling the DPLLs on TC ports before disconnecting the port's PHY. Add a post_pll_disable encoder hook and move the call to disconnect the port's PHY from the post_disable hook to the new hook. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-28-imre.deak@intel.com commit 3acac2d06a7e0f0b182b86b25bb8a2e9b3300406 Author: Imre Deak Date: Thu Mar 23 16:20:32 2023 +0200 drm/i915: Move shared DPLL disabling into CRTC disable hook The spec requires disabling the PLL on TC ports before disconnecting the port's PHY. Prepare for that by moving the PLL disabling to the CRTC disable hook, while disconnecting the PHY will be moved to the post_pll_disable() encoder hook in the next patch. v2: Move the call from intel_crtc_disable_noatomic() as well. Reviewed-by: Mika Kahola # v1 Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-27-imre.deak@intel.com commit 9796a5b2725d1b3ddbbe7b1f3dec56af8cc6af22 Author: Imre Deak Date: Thu Mar 23 16:20:31 2023 +0200 drm/i915/adlp/tc: Align the connect/disconnect PHY sequence with bspec Bspec has updated the TC connect/disconnect sequences, add the required platform hooks for these. The difference wrt. the old sequence is the order of taking the PHY ownership - while holding a port power reference this requires - and blocking the TC-cold power state. Bspec: 49294 Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-26-imre.deak@intel.com commit ebcabb8b15708023b71b7044fdf928454613d118 Author: Imre Deak Date: Thu Mar 23 16:20:30 2023 +0200 drm/i915/tc: Don't connect the PHY in intel_tc_port_connected() Connecting the PHY for connector probing - also blocking TC-cold - isn't required and has some overhead. Taking only the mutex is sufficient, so do that. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-25-imre.deak@intel.com commit 8979918af711b057620c7c5f9d29a0043f927753 Author: Imre Deak Date: Thu Mar 23 16:20:29 2023 +0200 drm/i915/tc: Get power ref for reading the HPD live status register Enable the power required for the HPD live status register access instead of depending on the caller blocking the TC-cold power state (during HW readout and connector probing). A follow up patch will remove connecting/disconnecting the PHY around connector probing, so querying the HPD status can happen in this case without TC-cold being blocked. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-24-imre.deak@intel.com commit 825535f44fef606e5b4484ebb8cb3827db59037e Author: Imre Deak Date: Thu Mar 23 16:20:28 2023 +0200 drm/i915/adlp/tc: Use the DE HPD ISR register for hotplug detection The spec says to use the CPU ISR registers for DP-alt/TBT HPD detection on ADLP, so do that instead of using the related IOM/TCSS registers. Bspec: 55480, 55482, 49212, 49305 Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-23-imre.deak@intel.com commit c55b73f391a726a45cc014464ba7ebea5f1d7386 Author: Imre Deak Date: Thu Mar 23 16:20:27 2023 +0200 drm/i915/tc: Add TC PHY hook to init the PHY Add a hook for platform specific PHY initialization. Move the detection of modular FIAs to the TGL handler, skipping this on ADLP+ where the FIAs are always modular, not requiring a detection. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-22-imre.deak@intel.com commit 7e696546353f659f60fd10616e04a2aa59ab2ac0 Author: Imre Deak Date: Thu Mar 23 16:20:26 2023 +0200 drm/i915/tc: Add asserts in TC PHY hooks that the required power is on Add an assert to each TC PHY hook that their required power domain is enabled. While at it add a comment describing the domains used on each platform and TC mode. v2: Fix non kernel-doc multiline comments. (Jani) Cc: Jani Nikula Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-21-imre.deak@intel.com commit 16cf693e31bdb423f35ab24081575ec9699303fc Author: Imre Deak Date: Thu Mar 23 16:20:25 2023 +0200 drm/i915/tc: Add TC PHY hook to get the TC-cold blocking power domain Instead of the corresponding if ladder, add a TC PHY hook to get the platform and TC mode specific power domain used for blocking the TC-cold power state. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-20-imre.deak@intel.com commit bc5f983a3d8d8e5a5eddfaf11275bbcef04017f5 Author: Imre Deak Date: Thu Mar 23 16:20:24 2023 +0200 drm/i915/tc: Drop tc_cold_block()/unblock()'s power domain parameter Simplify tc_cold_block()/unblock() by dropping their power domain parameter. The power domain depends on the current TC mode, which - after the previous patch - can't change while the PHY is connected, holding a TC-cold-off power domain reference. Based on this the domain can be deducted from the current TC mode instead of having to pass this as a parameter. Blocking TC-cold for the PHY HW readout happens before the current TC mode is determined, so here the initial power domain must be still manually passed. For debugging still keep track of the domain used for tc_cold_block() and verify that it remained the same until tc_cold_unblock(). While at it rename tc_cold_get_power_domain() to tc_phy_cold_off_domain(), reflecting the name of platform specific hook added in the next patch. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-19-imre.deak@intel.com commit 430ce0c7d3a3b2cdfdafb527d2f89be4267ac45c Author: Imre Deak Date: Thu Mar 23 16:20:23 2023 +0200 drm/i915/tc: Remove redundant wakeref=0 check from unblock_tc_cold() After the previous patch unblock_tc_cold() will not be called in a disconnected mode, so the wakeref passed to it will be always non-zero. Remove the redundant check. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-18-imre.deak@intel.com commit 976a368b7198bf666ad3d273e10ed82b3713af3b Author: Imre Deak Date: Thu Mar 23 16:20:22 2023 +0200 drm/i915/tc: Block/unblock TC-cold in the PHY connect/disconnect hooks Move blocking/unblocking the TC-cold power state to the platform specific PHY connect / disconnect hooks. This allows for adjusting the connect/disconnect sequence as required for each platform. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-17-imre.deak@intel.com commit e0b1ef58d98ae0feba98190c9faf192aabceb811 Author: Imre Deak Date: Thu Mar 23 16:20:21 2023 +0200 drm/i915/tc: Check TC mode instead of the VBT legacy flag After the previous patch the TC mode in the connect/disconnect functions is always in sync with the VBT legacy port flag, so for consistency with the rest of the function check the TC mode instead of the VBT flag. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-16-imre.deak@intel.com commit 3b7d5663702373358d58987a3684f6c59443d9d4 Author: Imre Deak Date: Thu Mar 23 16:20:20 2023 +0200 drm/i915/tc: Fix up the legacy VBT flag only in disconnected mode A follow-up patch simplifies the tc_cold_block()/unblock() functions, dropping the power domain parameter. For this it must be ensured that the power domain - which depends on the actual TC mode and so the VBT legacy port flag - can't change while the PHY is in a connected state and accordingly TC-cold is blocked. Make this so, by fixing up the VBT legacy flag only in the disconnected TC mode, instead of whenever the HPD state is retrieved. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-15-imre.deak@intel.com commit bd0fdd31c1023b9d94a470ed5bc301c3f9d80519 Author: Imre Deak Date: Thu Mar 23 16:20:19 2023 +0200 drm/i915/tc: Add TC PHY hooks to connect/disconnect the PHY Add TC PHY hooks to connect/disconnect the PHY. A follow-up patch will add the ADLP specific hooks for these. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-14-imre.deak@intel.com commit 712f422ed70c6778018152896d6b4e5ff70fb2b4 Author: Imre Deak Date: Thu Mar 23 16:20:18 2023 +0200 drm/i915/tc: Factor out tc_phy_verify_legacy_or_dp_alt_mode() Factor out a function verifying the PHY connected state in legacy or DP-alt mode. This is common to all platforms, which can be reused in platform specific connect hooks added in follow-up patches. No functional changes. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-13-imre.deak@intel.com commit d1fc4e391fbd321dff166208e58e30d3196626ba Author: Imre Deak Date: Thu Mar 23 16:20:17 2023 +0200 drm/i915/tc: Add generic TC PHY connect/disconnect handlers Add generic handlers to connect/disconnect a PHY. Setting the TC mode to the target mode deducted from the HPD state and - if connecting to this mode fails - falling back to connecting to the default (TBT) mode are common to all platforms; move the logic for this from the ICL specific connect / disconnect handlers to the generic ones. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-12-imre.deak@intel.com commit ab639f326e48385eeaf65fd129d3ff6d006cbeef Author: Imre Deak Date: Thu Mar 23 16:20:16 2023 +0200 drm/i915/tc: Add TC PHY hook to read out the PHY HW state Add a TC PHY hook to read out the PHY HW state on each platform, move the common parts to the generic helper. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-11-imre.deak@intel.com commit 87107261bb73d7a8945f3cd37a6abc7befc327bf Author: Imre Deak Date: Thu Mar 23 16:20:15 2023 +0200 drm/i915/tc: Add TC PHY hooks to get the PHY ready/owned state Add TC PHY hooks to get the PHY ready/owned state on each platform, replacing the corresponding if ladder. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-10-imre.deak@intel.com commit 34a658b7e7128b35daf71cc003fbb659f914f7a7 Author: Imre Deak Date: Thu Mar 23 16:20:14 2023 +0200 drm/i915/tc: Add TC PHY hook to get the PHY HPD live status Add a table of TC PHY hooks which can be used to call platform specific TC PHY handlers, replacing the corresponding if ladders. Add the hook to retrieve the PHY's HPD live status. Move the common part fixing up the VBT legacy port flag to the generic helper. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-9-imre.deak@intel.com commit c5879999641f7860495cb9655de6775c96999103 Author: Imre Deak Date: Thu Mar 23 16:20:13 2023 +0200 drm/i915/tc: Move the intel_tc_port struct declaration to intel_tc.c Move the intel_tc_port struct to intel_tc.c for better isolation. This requires allocating the struct dynamically. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-8-imre.deak@intel.com commit 711762415ddacf54b1c973b208073438de5879b4 Author: Imre Deak Date: Thu Mar 23 16:20:12 2023 +0200 drm/i915/tc: Check for TC PHY explicitly in intel_tc_port_fia_max_lane_count() Check explicitly if the port passed to intel_tc_port_fia_max_lane_count() has a TC PHY, instead of relying on the default TC mode value set for non-TC PHY ports. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-7-imre.deak@intel.com commit 3eafcddf766b6bb8e6308ec2d587d4ef7a4381e4 Author: Imre Deak Date: Thu Mar 23 16:20:11 2023 +0200 drm/i915/tc: Move TC port fields to a new intel_tc_port struct Move the TC port specific fields from intel_digital_port to a new intel_tc_port struct. Pass an intel_tc_port pointer to all static functions in intel_tc.c keeping dig_port accessible for these via a pointer stored in the new struct. The next patch will allocate the intel_tc_port dynamically, allowing moving the struct definition to intel_tc.c. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-6-imre.deak@intel.com commit 39feb7b16b107625a0071e5bb8ea19ee89be2a9f Author: Imre Deak Date: Thu Mar 23 16:20:10 2023 +0200 drm/i915/tc: Use the tc_phy prefix for all TC PHY functions For consistency use the tc_phy prefix for all TC PHY functions. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-5-imre.deak@intel.com commit 89b154091ab44098668614b52553ae3917eb8215 Author: Imre Deak Date: Thu Mar 23 16:20:09 2023 +0200 drm/i915/tc: Rename tc_phy_status_complete() to tc_phy_is_ready() For consistency rename tc_phy_status_complete() to tc_phy_is_ready() following the terminology of new platforms. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-4-imre.deak@intel.com commit 359d36e67da9de877c13c4b4ea6209a5e07264b3 Author: Imre Deak Date: Thu Mar 23 16:20:08 2023 +0200 drm/i915/tc: Use the adlp prefix for ADLP TC PHY functions Use the usual adlp prefix for all ADLP specific TC PHY functions. Other ADL platforms don't support TC. Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-3-imre.deak@intel.com commit a33c8f71d3d85ff1c0284270f710b071d480d547 Author: Imre Deak Date: Thu Mar 23 16:20:07 2023 +0200 drm/i915/tc: Group the TC PHY setup/query functions per platform Arrange the TC PHY HW state setup/query functions into platform specific and generic groups. This prepares for upcoming patches adding generic TC PHY handlers and platform specific hooks for these, replacing the corresponding if ladders. No functional changes. v2: Fix non kernel-doc multiline comments. (Jani) Cc: Jani Nikula Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230323142035.1432621-2-imre.deak@intel.com commit 1138398d71e8e583669fcec96784471332e488d4 Merge: 63758fec651f2 feae1bd80ec69 Author: Daniel Vetter Date: Mon Apr 3 10:25:44 2023 +0200 Merge tag 'amd-drm-next-6.4-2023-03-31' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.4-2023-03-31: amdgpu: - Misc code cleanups - S4 fixes - MES fixes - SR-IOV fixes - Link DC backlight to connector device rather than PCI device - W=1 fixes - ASPM quirk - RAS fixes - DC dynamic split fixes and enablement for remaining chips - Navi1x SMU fix - Initial NBIO 7.9 support - Initial GC 9.4.3 support - Initial GFXHUB 1.2 support - Initial MMHUB 1.8 support - DCN 3.1.5 fixes - Initial DC FAMs infrastructure - Add support for 6.75Gbps link rates - Add sysfs nodes for secondary VCN clocks amdkfd: - Initial support for GC 9.4.3 radeon: - Convert to client-based fbdev emulation Signed-off-by: Daniel Vetter From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230331221955.7896-1-alexander.deucher@amd.com commit 645a603783633a9d6e2bbaaa98d4cac847d97b2c Author: Christophe Kerello Date: Tue Mar 28 19:07:11 2023 +0200 ARM: dts: stm32: add FMC support on STM32MP13x SoC family Add FMC support on STM32MP13x SoC family. Signed-off-by: Christophe Kerello Signed-off-by: Alexandre Torgue commit fc8d2b21bc5d5d7a6eadaa8c2a5d2e6856689480 Author: Pierre-Yves MORDRET Date: Mon Apr 3 10:01:06 2023 +0200 ARM: dts: stm32: YAML validation fails for Argon Boards "make dtbs_check" gives following output : stm32mp157c-emstamp-argon.dtb: gpu@59000000: 'contiguous-area' does not match any of the regexes: 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/gpu/vivante,gc.yaml Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Alexandre Torgue commit 84a34e1862aae43e4dcdfb743a7dd3ade1fe4a3c Author: Pierre-Yves MORDRET Date: Mon Apr 3 09:58:31 2023 +0200 ARM: dts: stm32: YAML validation fails for Odyssey Boards "make dtbs_check" gives following output : stm32mp157c-odyssey.dt.yaml: gpu@59000000: 'contiguous-area' does not match any of the regexes: 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/gpu/vivante,gc.yaml Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Alexandre Torgue commit 3c3e8a92ae57e5d5cc03abdf15970432d80ac4a5 Author: Pierre-Yves MORDRET Date: Mon Apr 3 09:54:15 2023 +0200 ARM: dts: stm32: YAML validation fails for STM32MP15 ST Boards "make dtbs_check" gives following output : stm32mp157x-xxx.dt.yaml: gpu@59000000: 'contiguous-area' does not match any of the regexes: 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/gpu/vivante,gc.yaml Solve this trouble for STM32MPU Boards : - stm32mp157c-ed1 - stm32mp157x-dkx Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Alexandre Torgue commit cd8fe5b6dbb3a487bea5f1601437c013a3d56163 Merge: 43ba3d4af7a73 7e364e56293bb Author: Greg Kroah-Hartman Date: Mon Apr 3 09:33:30 2023 +0200 Merge 6.3-rc5 into driver-core-next We need the fixes in here for testing, as well as the driver core changes for documentation updates to build on. Signed-off-by: Greg Kroah-Hartman commit 364595a6851bf64e1c38224ae68f5dd6651906d1 Author: Jeff Layton Date: Thu Mar 30 06:41:43 2023 -0400 fs: consolidate duplicate dt_type helpers There are three copies of the same dt_type helper sprinkled around the tree. Convert them to use the common fs_umode_to_dtype function instead, which has the added advantage of properly returning DT_UNKNOWN when given a mode that contains an unrecognized type. Cc: Chuck Lever Cc: Phillip Potter Suggested-by: Christian Brauner Signed-off-by: Jeff Layton Acked-by: Greg Kroah-Hartman Reviewed-by: Christian Brauner Message-Id: <20230330104144.75547-1-jlayton@kernel.org> Signed-off-by: Christian Brauner commit 63758fec651f2fe7eab0c5a833f84795911c36e9 Merge: 82bbec189ab34 7d690f936e9bc Author: Daniel Vetter Date: Mon Apr 3 09:20:51 2023 +0200 Merge tag 'drm-misc-next-2023-03-31' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v6.4-rc1: Cross-subsystem Changes: - DT bindings update for adding Mali MT81xx devices. - Assorted DT binding updates. Core Changes: - Documentation update to scheduler. Driver Changes: - Add support for the same mali devices. - Add support for speed binning to panfrost. - Add B133UAN01.0 eDP panel. - Assorted small fixes to bridge/ps8640, bridge/it6505, panel/magnachip. - Use of_property_read_bool in ps8622 and ofdrm. Signed-off-by: Daniel Vetter From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/36f4efa4-26e9-49df-287e-d193422c990d@linux.intel.com commit d4d17377e01f017fd5a22f68f13e7ab342f97551 Author: Swati Sharma Date: Thu Mar 9 11:58:55 2023 +0530 drm/i915/dsc: Add debugfs entry to validate DSC output formats DSC_Output_Format_Sink_Support entry is added to i915_dsc_fec_support_show to depict if sink supports DSC output formats (RGB/YCbCr420/YCbCr444). Also, new debugfs entry is created to enforce output format. This is required because of our driver policy. For ex. if a mode is supported in both RGB and YCbCr420 output formats by the sink, our policy is to try RGB first and fall back to YCbCr420, if mode cannot be shown using RGB. So, to test other output formats like YCbCr420 or YCbCr444, we need a debugfs entry (force_dsc_output_format) to force this output format. v2: -Func name changed to intel_output_format_name() (Jani N) -Return forced o/p format from intel_dp_output_format() (Jani N) v3: -output_format_str[] to remain static (Jani N) Signed-off-by: Swati Sharma Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20230309062855.393087-8-suraj.kandpal@intel.com commit 16e7a0db6ec9426fea36313b95c36624d983258b Author: Suraj Kandpal Date: Thu Mar 9 11:58:54 2023 +0530 drm/i915/vdsc: Check slice design requirement Add function to check if slice design requirements are being met as defined in Bspec: 49259 in the section Slice Design Requirement --v7 -remove full bspec link [Jani] -rename intel_dsc_check_slice_design_req to intel_dsc_slice_dimensions_valid [Jani] --v8 -fix condition to check if slice width and height are of two -fix minimum pixel in slice condition --v10 -condition should be < rather then >= [Uma] Cc: Uma Shankar Signed-off-by: Suraj Kandpal Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20230309062855.393087-7-suraj.kandpal@intel.com commit 9aeabe1988551f797f6e0cba0e7c2d4549cc3a4b Author: Suraj Kandpal Date: Thu Mar 9 11:58:53 2023 +0530 drm/i915/dsc: Fill in native_420 field Now that we have laid the groundwork for YUV420 Enablement we fill up native_420 field in vdsc_cfg and add appropriate checks wherever required. ---v2 -adding native_422 field as 0 [Vandita] -filling in second_line_bpg_offset, second_line_offset_adj and nsl_bpg_offset in vds_cfg when native_420 is true ---v3 -adding display version check to solve igt issue --v7 -remove is_pipe_dsc check as its always true for D14 [Jani] --v10 -keep sink capability check [Jani] -move from !(x == y || w == z) to x !=y && w != z [Jani] --v11 -avoid native_420 computation if not gen14 [Uma] --v12 -fix state mismatch issue of compressed_bpp Cc: Uma Shankar Cc: Jani Nikula Signed-off-by: Suraj Kandpal Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20230309062855.393087-6-suraj.kandpal@intel.com commit dd4d6791eb0164ba59d3e105135188c355d80fa2 Author: Suraj Kandpal Date: Thu Mar 9 11:58:52 2023 +0530 drm/i915/dsc: Enable YCbCr420 for VDSC Implementation of VDSC for YCbCr420. Add QP tables for 8,10,12 BPC from rc_tables.h in intel_qp_tables.c (Derived from C-Model, which is given along with DSC1.2a Spec from Vesa) intel_lookup_range_min/max_qp functons need to take into account the output format. Based on that appropriate qp table need to be chosen. Other rc_parameters need to be set where currently values for 444 format is hardcoded in calculate_rc_parameters( ). vdsc_cfg struct needs to be filled with output format information, where these are hardcoded for 444 format. Bspec: 49259 Signed-off-by: Suraj Kandpal Reviewed-by: Vandita Kulkarni Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20230309062855.393087-5-suraj.kandpal@intel.com commit ac754358c68214f9945bdf9cc565fa18ce1b0185 Author: Suraj Kandpal Date: Thu Mar 9 11:58:51 2023 +0530 drm/i915/dsc: Adding the new registers for DSC Adding new DSC register which are introducted MTL onwards Signed-off-by: Suraj Kandpal Reviewed-by: Vandita Kulkarni Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20230309062855.393087-4-suraj.kandpal@intel.com commit 5011f2915b70703a0347f97b8f2ca0b56ab49978 Author: Ankit Nautiyal Date: Thu Mar 9 11:58:50 2023 +0530 drm/i915/dp: Check if DSC supports the given output_format Go with DSC only if the given output_format is supported. v2: Use drm helper to get DSC format support for sink. v3: remove drm_dp_dsc_compute_bpp. Cc: Uma Shankar Signed-off-by: Ankit Nautiyal Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20230309062855.393087-3-suraj.kandpal@intel.com commit a389789c0aaf8428cd44cac4f92c8786505f5f1e Author: Ankit Nautiyal Date: Thu Mar 9 11:58:49 2023 +0530 drm/dp_helper: Add helper to check DSC support with given o/p format Add helper to check if the DP sink supports DSC with the given o/p format. v2: Add documentation for the helper. (Uma Shankar) v3: /** instead of /* (Uma Shankar) Signed-off-by: Ankit Nautiyal Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20230309062855.393087-2-suraj.kandpal@intel.com commit f3040daab8104ac68e2b241bc93288f63b88a3c7 Author: Jeffrey Kardatzke Date: Fri Mar 31 11:35:47 2023 -0700 tee: optee: Add SMC for loading OP-TEE image Adds an SMC call that will pass an OP-TEE binary image to EL3 and instruct it to load it as the BL32 payload. This works in conjunction with a feature added to Trusted Firmware for ARMv8 and above architectures that supports this. The main purpose of this change is to facilitate updating the OP-TEE component on devices via a rootfs change rather than having to do a firmware update. Further details are linked to in the Kconfig file. Signed-off-by: Jeffrey Kardatzke Reviewed-by: Sumit Garg Signed-off-by: Jeffrey Kardatzke Signed-off-by: Jens Wiklander commit 76e463f6508b5909887df3c360ca55f1caa3b94a Author: Leon Romanovsky Date: Thu Mar 30 11:02:25 2023 +0300 net/mlx5e: Overcome slow response for first IPsec ASO WQE First ASO WQE causes to cache miss in hardware, which can't return result immediately. It causes to the situation where such WQE is polled earlier than it is needed. Add logic to retry ASO CQ polling operation. Link: https://lore.kernel.org/r/eb92a758c533ff3f058e0dcb4f8d2324355304ad.1680162300.git.leonro@nvidia.com Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky commit d05971a413d3c3dd207c604a6dbfc702070da63e Author: Leon Romanovsky Date: Thu Mar 30 11:02:24 2023 +0300 net/mlx5e: Add SW implementation to support IPsec 64 bit soft and hard limits The CX7 cards which support IPsec packet offload use 32 bits to configure soft and hard packet limits. This is not enough as the software part using 64 bits. The needed functionality of supporting 64 bits is implemented through mlx5 abstraction layer, which will ensure that HW is reconfigured on-demand every 2^31 packets. To simulate the 64 bit IPsec soft/hard limits, we divide the soft/hard limits to multiple interrupts (rounds). Each round counts 2^31 packets. Once the counter is less than or equal to 2^31, the soft event is raised and software sets the bit 31 of the counter and decrement the round counter. Link: https://lore.kernel.org/r/5a86c890b6dccb6865acf9042a8b03f899d1f3f9.1680162300.git.leonro@nvidia.com Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky commit 2da961d21663a72610f36a4f69b1090f2c61f23f Author: Leon Romanovsky Date: Thu Mar 30 11:02:23 2023 +0300 net/mlx5e: Prevent zero IPsec soft/hard limits Hardware triggers limit events when the packets arrive and are processed through the device. In case zero was configured as a limit, the HW won't be able to arm event as it happens at the end of execution pipeline. Let's prevent such configuration. Link: https://lore.kernel.org/r/80d0ba33e21fb28b1b91d306d1da39df3d990b68.1680162300.git.leonro@nvidia.com Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky commit 509541b440e64e155201dd304411e2daa152fe8f Author: Leon Romanovsky Date: Thu Mar 30 11:02:22 2023 +0300 net/mlx5e: Factor out IPsec ASO update function The ASO update is common operation which is going to be used in next patch, so as a preparation, let's refactor the code for future reuse. As part of this refactoring, not used function argument was removed too. Link: https://lore.kernel.org/r/d04770b959822fed51c22c13e798f04d760a682e.1680162300.git.leonro@nvidia.com Reviewed-by: Raed Salem Signed-off-by: Leon Romanovsky commit a3800ef9c48c4497dafe5ede1b65d91d9ef9cf1e Author: Paul Mackerras Date: Wed Mar 8 17:36:11 2023 +1100 KVM: PPC: Enable prefixed instructions for HV KVM and disable for PR KVM Now that we can read prefixed instructions from a HV KVM guest and emulate prefixed load/store instructions to emulated MMIO locations, we can add HFSCR_PREFIXED into the set of bits that are set in the HFSCR for a HV KVM guest on POWER10, allowing the guest to use prefixed instructions. PR KVM has not yet been extended to handle prefixed instructions in all situations where we might need to emulate them, so prevent the guest from enabling prefixed instructions in the FSCR for now. Reviewed-by: Nicholas Piggin Tested-by: Nicholas Piggin Signed-off-by: Paul Mackerras Tested-by: Sachin Sant Signed-off-by: Michael Ellerman Link: https://msgid.link/ZAgs25dCmLrVkBdU@cleo commit 953e37397fb61be61f095d36972188bac5235021 Author: Paul Mackerras Date: Wed Mar 8 17:35:23 2023 +1100 KVM: PPC: Fetch prefixed instructions from the guest In order to handle emulation of prefixed instructions in the guest, this first makes vcpu->arch.last_inst be an unsigned long, i.e. 64 bits on 64-bit platforms. For prefixed instructions, the upper 32 bits are used for the prefix and the lower 32 bits for the suffix, and both halves are byte-swapped if the guest endianness differs from the host. Next, vcpu->arch.emul_inst is now 64 bits wide, to match the HEIR register on POWER10. Like HEIR, for a prefixed instruction it is defined to have the prefix is in the top 32 bits and the suffix in the bottom 32 bits, with both halves in the correct byte order. kvmppc_get_last_inst is extended on 64-bit machines to put the prefix and suffix in the right places in the ppc_inst_t being returned. kvmppc_load_last_inst now returns the instruction in an unsigned long in the same format as vcpu->arch.last_inst. It makes the decision about whether to fetch a suffix based on the SRR1_PREFIXED bit in the MSR image stored in the vcpu struct, which generally comes from SRR1 or HSRR1 on an interrupt. This bit is defined in Power ISA v3.1B to be set if the interrupt occurred due to a prefixed instruction and cleared otherwise for all interrupts except for instruction storage interrupt, which does not come to the hypervisor. It is set to zero for asynchronous interrupts such as external interrupts. In previous ISA versions it was always set to 0 for all interrupts except instruction storage interrupt. The code in book3s_hv_rmhandlers.S that loads the faulting instruction on a HDSI is only used on POWER8 and therefore doesn't ever need to load a suffix. [npiggin@gmail.com - check that the is-prefixed bit in SRR1 matches the type of instruction that was fetched.] Reviewed-by: Nicholas Piggin Tested-by: Nicholas Piggin Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://msgid.link/ZAgsq9h1CCzouQuV@cleo commit acf17878da680a0c11c0bcb8a54b4f676ff39c80 Author: Paul Mackerras Date: Wed Mar 8 17:34:48 2023 +1100 KVM: PPC: Make kvmppc_get_last_inst() produce a ppc_inst_t This changes kvmppc_get_last_inst() so that the instruction it fetches is returned in a ppc_inst_t variable rather than a u32. This will allow us to return a 64-bit prefixed instruction on those 64-bit machines that implement Power ISA v3.1 or later, such as POWER10. On 32-bit platforms, ppc_inst_t is 32 bits wide, and is turned back into a u32 by ppc_inst_val, which is an identity operation on those platforms. Reviewed-by: Nicholas Piggin Tested-by: Nicholas Piggin Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://msgid.link/ZAgsiPlL9O7KnlZZ@cleo commit 1f15af76784cc902a1fe85e864c7ddf3d74b4130 Author: Andy Shevchenko Date: Thu Mar 30 13:23:42 2023 +0300 thunderbolt: Introduce usb4_port_sb_opcode_err_to_errno() helper The usb4_port_sb_opcode_err_to_errno() converts from USB4 error codes to the Linux errno space. In particular, this makes the intention of the repeating usb4_port_retimer_read() call in the usb4_port_retimer_nvm_authenticate_status() clearer. Signed-off-by: Andy Shevchenko Signed-off-by: Mika Westerberg commit c2dbd34f6a9558b7e99849d4f73eb9b95a45a83c Author: Slark Xiao Date: Wed Mar 29 15:22:39 2023 +0800 bus: mhi: pci_generic: Add Foxconn T99W510 The Foxconn T99W510 device is designed based on Qualcomm SDX24. Add 3 variants for different potential customer. Signed-off-by: Slark Xiao Link: https://lore.kernel.org/r/20230329072239.93632-1-slark_xiao@163.com Signed-off-by: Manivannan Sadhasivam commit 446271e5d7bcb5f1c70bc35b11abbd92e6bb4378 Author: Jeffrey Hugo Date: Fri Mar 24 10:21:00 2023 -0600 bus: mhi: host: Use ERANGE for BHIOFF/BHIEOFF range check If the BHIOFF or BHIEOFF range checks fail, they return EINVAL. ERANGE is a better error code since it implies an out of range condition. Suggested-by: Manivannan Sadhasivam Signed-off-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1679674860-28229-1-git-send-email-quic_jhugo@quicinc.com Signed-off-by: Manivannan Sadhasivam commit 6a0c637bfee69a74c104468544d9f2a6579626d0 Author: Jeffrey Hugo Date: Fri Mar 24 10:13:04 2023 -0600 bus: mhi: host: Range check CHDBOFF and ERDBOFF If the value read from the CHDBOFF and ERDBOFF registers is outside the range of the MHI register space then an invalid address might be computed which later causes a kernel panic. Range check the read value to prevent a crash due to bad data from the device. Fixes: 6cd330ae76ff ("bus: mhi: core: Add support for ringing channel/event ring doorbells") Cc: stable@vger.kernel.org Signed-off-by: Jeffrey Hugo Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1679674384-27209-1-git-send-email-quic_jhugo@quicinc.com Signed-off-by: Manivannan Sadhasivam commit 6cd5c1db9983600f1848822e86e4906377b4a899 Author: Nicholas Piggin Date: Thu Mar 30 20:32:24 2023 +1000 KVM: PPC: Book3S HV: Set SRR1[PREFIX] bit on injected interrupts Pass the hypervisor (H)SRR1[PREFIX] indication through to synchronous interrupts injected into the guest. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20230330103224.3589928-3-npiggin@gmail.com commit 460ba21d83fef766a5d34260e464c9ab8f10aa05 Author: Nicholas Piggin Date: Thu Mar 30 20:32:23 2023 +1000 KVM: PPC: Permit SRR1 flags in more injected interrupt types The prefix architecture in ISA v3.1 introduces a prefixed bit in SRR1 for many types of synchronous interrupts which is set when the interrupt is caused by a prefixed instruction. This requires KVM to be able to set this bit when injecting interrupts into a guest. Plumb through the SRR1 "flags" argument to the core_queue APIs where it's missing for this. For now they are set to 0, which is no change. Signed-off-by: Nicholas Piggin [mpe: Fixup kvmppc_core_queue_alignment() in booke.c] Signed-off-by: Michael Ellerman Link: https://msgid.link/20230330103224.3589928-2-npiggin@gmail.com commit 43d05c6123ca1ace5982ca326c156502e735b7d5 Author: Michael Ellerman Date: Mon Apr 3 14:46:36 2023 +1000 KVM: PPC: BookE: Fix W=1 warnings Fix various W=1 warnings in booke.c: arch/powerpc/kvm/booke.c:1008:5: error: no previous prototype for ‘kvmppc_handle_exit’ [-Werror=missing-prototypes] 1008 | int kvmppc_handle_exit(struct kvm_vcpu *vcpu, unsigned int exit_nr) | ^~~~~~~~~~~~~~~~~~ arch/powerpc/kvm/booke.c:1009: warning: Function parameter or member 'vcpu' not described in 'kvmppc_handle_exit' arch/powerpc/kvm/booke.c:1009: warning: Function parameter or member 'exit_nr' not described in 'kvmppc_handle_exit' Reported-by: kernel test robot Link: https://lore.kernel.org/r/202304020827.3LEZ86WB-lkp@intel.com/ Signed-off-by: Michael Ellerman Link: https://msgid.link/20230403045314.3095410-1-mpe@ellerman.id.au commit 0df28e7166e803028c380c59dda530ffada0503c Author: Dario Binacchi Date: Sun Apr 2 21:36:46 2023 -0700 Input: edt-ft5x06 - calculate points data length only once It is pointless and expensive to calculate data in the interrupt that depends on the type of touchscreen, which is detected on the driver probe and cannot then be changed. So calculate the size of the data buffer on the driver probe, as well as the data retrieval command, and then use them in the ISR. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20230402200951.1032513-10-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov commit 079e60a53c25aeb1920e783fa7f7390eabb6afc0 Author: Dario Binacchi Date: Sun Apr 2 21:36:33 2023 -0700 Input: edt-ft5x06 - unify the crc check With this patch, the CRC is always verified by the same function, even in the case of accessing registers where the number of bytes is minimal. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20230402200951.1032513-9-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov commit 9dfd9708ffba1e7969af5e4ecda660151146de98 Author: Dario Binacchi Date: Sun Apr 2 21:36:23 2023 -0700 Input: edt-ft5x06 - convert to use regmap API It replaces custom read/write functions with regmap API, making the driver code more generic. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20230402200951.1032513-8-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov commit 24642661e956b268459bea31e11cbc3bc8dda136 Author: Dario Binacchi Date: Sun Apr 2 21:36:12 2023 -0700 Input: edt-ft5x06 - don't print error messages with dev_dbg() In some parts of the code, error messages were improperly printed with dev_dbg() calls. In those cases, dev_dbg() has been replaced with dev_err(). Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20230402200951.1032513-7-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov commit 65c67985a0305f444f3f88f3506c6e7ee237423b Author: Dario Binacchi Date: Sun Apr 2 21:27:48 2023 -0700 Input: edt-ft5x06 - remove code duplication The use of the macros M06_REG_ADDR and M06_REG_CMD avoids code duplication without impacting the application load, and reduces the chances of errors or mistakes. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20230402200951.1032513-6-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov commit 38e8cf7b97612a7e615e498987bd0758a65633c6 Author: Dario Binacchi Date: Sun Apr 2 21:27:34 2023 -0700 Input: edt-ft5x06 - don't recalculate the CRC There is no need to recalculate the CRC when the data has not changed. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20230402200951.1032513-5-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov commit f8a2257056d9e60e4339072e8e89a5a708a99d40 Author: Dario Binacchi Date: Sun Apr 2 16:58:29 2023 -0700 Input: edt-ft5x06 - add spaces to ensure format specification It adds spaces around '-' as recommended by the Linux coding style. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20230402200951.1032513-4-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov commit 6114f4749b4662d4f444e2a184e236d9d9df9115 Author: Dario Binacchi Date: Sun Apr 2 16:58:14 2023 -0700 Input: edt-ft5x06 - remove unnecessary blank lines It removes unnecessary blank lines so that checkpatch doesn't complain anymore. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20230402200951.1032513-3-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov commit d19ec82c74a50aec614530b0e7d795913be77221 Author: Dario Binacchi Date: Sun Apr 2 16:57:04 2023 -0700 Input: edt-ft5x06 - fix indentation Matches the alignment to the open parenthesis as suggested by checkpatch. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20230402200951.1032513-2-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov commit 1661f60adc3b7e6864b4cb6790d579b468bd243f Author: Benjamin Bara Date: Sun Apr 2 16:55:27 2023 -0700 Input: tsc2007 - enable cansleep pendown GPIO When a hard IRQ is triggered, the soft IRQ, which decides if an actual pen down happened, should always be triggered. This enables the usage of "can_sleep" GPIO chips as "pen down" GPIO, as the value is not read during the hard IRQ anymore. This might be the case if the GPIO chip is an expander behind i2c. Signed-off-by: Benjamin Bara Signed-off-by: Richard Leitner Link: https://lore.kernel.org/r/20230328-tsc2007-sleep-v5-1-fc55e76d0ced@skidata.com Signed-off-by: Dmitry Torokhov commit 528f2d8d540a3c374d6b765c769620d91536b176 Author: Viresh Kumar Date: Wed Feb 22 16:36:38 2023 +0530 OPP: Move required opps configuration to specialized callback The required-opps configuration is closely tied to genpd and performance states at the moment and it is not very obvious that required-opps can live without genpds. Though we don't support configuring required-opps for non-genpd cases currently. This commit aims at separating these parts, where configuring genpds would be a special case of configuring the required-opps. Add a specialized callback, set_required_opps(), to the opp table and set it to different callbacks accordingly. This shouldn't result in any functional changes for now. Signed-off-by: Viresh Kumar Reviewed-by: Ulf Hansson commit 29b1a92e5e953214388ac1f3656cb3af266ca74f Author: Viresh Kumar Date: Wed Feb 22 16:36:37 2023 +0530 OPP: Handle all genpd cases together in _set_required_opps() There is no real need of keeping separate code for single genpd case, it can be made to work with a simple change. Signed-off-by: Viresh Kumar Reviewed-by: Ulf Hansson commit d6dc3cdcc8b55ff58aea8b729f870024ac5f7fbf Author: Nancy.Lin Date: Thu Mar 30 11:26:14 2023 +0800 drm/mediatek: Add ovl_adaptor get format function 1. Add ovl_adaptor get_format and get_num_formats component function. The two functions are needed for getting the supported format in mtk_plane_init(). 2. Get supported format from the ovl_adaptor's rdma engine - mdp_rdma. Signed-off-by: Nancy.Lin Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230330032614.18837-3-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit df4752441d6bad238ca5df628dd11bc92225777b Author: Nancy.Lin Date: Thu Mar 30 11:26:13 2023 +0800 drm/mediatek: Add mdp_rdma get format function Add mdp_rdma get_format and get_num_formats function. Signed-off-by: Nancy.Lin Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230330032614.18837-2-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit dc70c9615c067dbc34a1af736477f7d2b7f75319 Merge: 60b3f355c7a38 f1437cd1e535c Author: Martin K. Petersen Date: Sun Apr 2 22:10:40 2023 -0400 Merge patch series "Fix shost command overloading issues" John Garry says: It's easy to get scsi_debug to error on throughput testing when we have multiple shosts: $ lsscsi [7:0:0:0] disk Linux scsi_debug 0191 [0:0:0:0] disk Linux scsi_debug 0191 $ fio --filename=/dev/sda --filename=/dev/sdb --direct=1 --rw=read --bs=4k --iodepth=256 --runtime=60 --numjobs=40 --time_based --name=jpg --eta-newline=1 --readonly --ioengine=io_uring --hipri --exitall_on_error jpg: (g=0): rw=read, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=io_uring, iodepth=256 ... fio-3.28 Starting 40 processes [ 27.521809] hrtimer: interrupt took 33067 ns [ 27.904660] sd 7:0:0:0: [sdb] tag#171 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK cmd_age=0s [ 27.904660] sd 0:0:0:0: [sda] tag#58 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK cmd_age=0s fio: io_u error [ 27.904667] sd 0:0:0:0: [sda] tag#58 CDB: Read(10) 28 00 00 00 27 00 00 01 18 00 on file /dev/sda[ 27.904670] sd 0:0:0:0: [sda] tag#62 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK cmd_age=0s The issue is related to how the driver manages submit queues and tags. A single array of submit queues - sdebug_q_arr - with its own set of tags is shared among all shosts. As such, for occasions when we have more than one host it is possible to overload the submit queues and run out of tags. Another separate issue that we may reduce the shost submit queue depth, sdebug_max_queue, dynamically causing the shost to be overloaded. How many IOs which the shost may be sent is fixed at can_queue at init time, which is the same initial value for sdebug_max_queue. So reducing sdebug_max_queue means that the shost may be sent more IOs than it is configured to handle, causing overloading. This series removes the scsi_debug submit queue concept and uses pre-existing APIs to manage and examine tags, like scsi_block_requests() and blk_mq_tagset_busy_iter(). Using standard APIs makes the driver more maintainable and extensible in future. A restriction is also added to allow sdebug_max_queue only be modified when no shosts are present, i.e. we need to remove shosts, modify sdebug_max_queue, and then re-add the shosts. Link: https://lore.kernel.org/r/20230327074310.1862889-1-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit f1437cd1e535c5d5cc9f6e5bfdfc9b1cd3141bc4 Author: John Garry Date: Mon Mar 27 07:43:10 2023 +0000 scsi: scsi_debug: Drop sdebug_queue It's easy to get scsi_debug to error on throughput testing when we have multiple shosts: $ lsscsi [7:0:0:0] disk Linux scsi_debug 0191 [0:0:0:0] disk Linux scsi_debug 0191 $ fio --filename=/dev/sda --filename=/dev/sdb --direct=1 --rw=read --bs=4k --iodepth=256 --runtime=60 --numjobs=40 --time_based --name=jpg --eta-newline=1 --readonly --ioengine=io_uring --hipri --exitall_on_error jpg: (g=0): rw=read, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=io_uring, iodepth=256 ... fio-3.28 Starting 40 processes [ 27.521809] hrtimer: interrupt took 33067 ns [ 27.904660] sd 7:0:0:0: [sdb] tag#171 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK cmd_age=0s [ 27.904660] sd 0:0:0:0: [sda] tag#58 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK cmd_age=0s fio: io_u error [ 27.904667] sd 0:0:0:0: [sda] tag#58 CDB: Read(10) 28 00 00 00 27 00 00 01 18 00 on file /dev/sda[ 27.904670] sd 0:0:0:0: [sda] tag#62 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK cmd_age=0s The issue is related to how the driver manages submit queues and tags. A single array of submit queues - sdebug_q_arr - with its own set of tags is shared among all shosts. As such, for occasions when we have more than one shost it is possible to overload the submit queues and run out of tags. The struct sdebug_queue is to manage tags and hold the associated queued command entry pointer (for that tag). Since the tagset iters are now used for functions like sdebug_blk_mq_poll(), there is no need to manage these queues. Indeed, blk-mq already provides what we need for managing tags and queues. Drop sdebug_queue and all its usage in the driver. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230327074310.1862889-12-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit 57f7225a4fe25425c29402adad990c7409958c40 Author: John Garry Date: Mon Mar 27 07:43:09 2023 +0000 scsi: scsi_debug: Only allow sdebug_max_queue be modified when no shosts The shost->can_queue value is initially used to set per-HW queue context tag depth in the block layer. This ensures that the shost is not sent too many commands which it can deal with. However lowering sdebug_max_queue separately means that we can easily overload the shost, as in the following example: $ cat /sys/bus/pseudo/drivers/scsi_debug/max_queue 192 $ cat /sys/class/scsi_host/host0/can_queue 192 $ echo 100 > /sys/bus/pseudo/drivers/scsi_debug/max_queue $ cat /sys/class/scsi_host/host0/can_queue 192 $ fio --filename=/dev/sda --direct=1 --rw=read --bs=4k --iodepth=256 --runtime=1200 --numjobs=10 --time_based --group_reporting --name=iops-test-job --eta-newline=1 --readonly --ioengine=io_uring --hipri --exitall_on_error iops-test-job: (g=0): rw=read, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=io_uring, iodepth=256 ... fio-3.28 Starting 10 processes [ 111.269885] scsi_io_completion_action: 400 callbacks suppressed [ 111.269885] blk_print_req_error: 400 callbacks suppressed [ 111.269889] I/O error, dev sda, sector 440 op 0x0:(READ) flags 0x1200000 phys_seg 1 prio class 2 [ 111.269892] sd 0:0:0:0: [sda] tag#132 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK cmd_age=0s [ 111.269897] sd 0:0:0:0: [sda] tag#132 CDB: Read(10) 28 00 00 00 01 68 00 00 08 00 [ 111.277058] I/O error, dev sda, sector 360 op 0x0:(READ) flags 0x1200000 phys_seg 1 prio class 2 [...] Ensure that this cannot happen by allowing sdebug_max_queue be modified only when we have no shosts. As such, any shost->can_queue value will match sdebug_max_queue, and sdebug_max_queue cannot be modified separately. Since retired_max_queue is no longer set, remove support. Continue to apply the restriction that sdebug_host_max_queue cannot be modified when sdebug_host_max_queue is set. Adding support for that would mean extra code, and no one has complained about this restriction previously. A command like the following may be used to remove a shost: echo -1 > /sys/bus/pseudo/drivers/scsi_debug/add_host Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230327074310.1862889-11-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit 12f3eef016ea7a72c6e0d0fe6f66882086d9c4a9 Author: John Garry Date: Mon Mar 27 07:43:08 2023 +0000 scsi: scsi_debug: Use scsi_host_busy() in delay_store() and ndelay_store() The functions to update ndelay and delay value first check whether we have any in-flight IO for any host. It does this by checking if any tag is used in the global submit queues. We can achieve the same by setting the host as blocked and then ensuring that we have no in-flight commands with scsi_host_busy(). Note that scsi_host_busy() checks SCMD_STATE_INFLIGHT flag, which is only set per command after we ensure that the host is not blocked, i.e. we see more commands active after the check for scsi_host_busy() returns 0. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230327074310.1862889-10-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit 9c559c9b4748fed11687694e65e5d6d1eb2919cd Author: John Garry Date: Mon Mar 27 07:43:07 2023 +0000 scsi: scsi_debug: Use blk_mq_tagset_busy_iter() in stop_all_queued() Instead of iterating all deferred commands in the submission queue structures, use blk_mq_tagset_busy_iter(), which is a standard API for this. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230327074310.1862889-9-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit 600d9ead3936b2f22e664c59345a2e006ff324c5 Author: John Garry Date: Mon Mar 27 07:43:06 2023 +0000 scsi: scsi_debug: Use blk_mq_tagset_busy_iter() in sdebug_blk_mq_poll() Instead of iterating all deferred commands in the submission queue structures, use blk_mq_tagset_busy_iter(), which is a standard API for this. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230327074310.1862889-8-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit 1107c7b24ee3280abfc59f1b9186e285cabdd3ec Author: John Garry Date: Mon Mar 27 07:43:05 2023 +0000 scsi: scsi_debug: Dynamically allocate sdebug_queued_cmd Eventually we will drop the sdebug_queue struct as it is not really required, so start with making the sdebug_queued_cmd dynamically allocated for the lifetime of the scsi_cmnd in the driver. As an interim measure, make sdebug_queued_cmd.sd_dp a pointer to struct sdebug_defer. Also keep a value of the index allocated in sdebug_queued_cmd.qc_arr in struct sdebug_queued_cmd. To deal with an races in accessing the scsi cmnd allocated struct sdebug_queued_cmd, add a spinlock for the scsi command in its priv area. Races may be between scheduling a command for completion, aborting a command, and the command actually completing and freeing the struct sdebug_queued_cmd. [mkp: typo fix] Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230327074310.1862889-7-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit a0473bf31df5bf2da7ecb50023c129659ce0a835 Author: John Garry Date: Mon Mar 27 07:43:04 2023 +0000 scsi: scsi_debug: Use scsi_block_requests() to block queues The feature to block queues is quite dubious, since it races with in-flight IO. Indeed, it seems unnecessary for block queues for any times we do so. Anyway, to keep the same behaviour, use standard SCSI API to stop IO being sent - scsi_{un}block_requests(). Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230327074310.1862889-6-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit 25b80b2c7582ea15ba90b8007f1e1f1b8fc762b9 Author: John Garry Date: Mon Mar 27 07:43:03 2023 +0000 scsi: scsi_debug: Protect block_unblock_all_queues() with mutex There is no reason that calls to block_unblock_all_queues() from different context can't race with one another, so protect with the sdebug_host_list_mutex. There's no need for a more fine-grained per shost locking here (and we don't have a per-host lock anyway). Also simplify some touched code in sdebug_change_qdepth(). Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230327074310.1862889-5-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit 0aaa3fad4fd931ba3accac3a1fcc7334ca780591 Author: John Garry Date: Mon Mar 27 07:43:02 2023 +0000 scsi: scsi_debug: Change shost list lock to a mutex The shost list lock, sdebug_host_list_lock, is a spinlock. We would only lock in non-atomic context in this driver, so use a mutex instead, which is friendlier if we need to schedule when iterating. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230327074310.1862889-4-john.g.garry@oracle.com Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit 00f9d622e8b237d8403569ee51f7bfb9bf89a2d5 Author: John Garry Date: Mon Mar 27 07:43:01 2023 +0000 scsi: scsi_debug: Don't iter all shosts in clear_luns_changed_on_target() In clear_luns_changed_on_target(), we iter all devices for all shosts to conditionally clear the SDEBUG_UA_LUNS_CHANGED flag in the per-device uas_bm. One condition to see whether we clear the flag is to test whether the host for the device under consideration is the same as the matching device's (devip) host. This check will only ever pass for devices for the same shost, so only iter the devices for the matching device shost. We can now drop the spinlock'ing of the sdebug_host_list_lock in the same function. This will allow us to use a mutex instead of the spinlock for the global shost lock, as clear_luns_changed_on_target() could be called in non-blocking context, in scsi_debug_queuecommand() -> make_ua() -> clear_luns_changed_on_target() (which is why required a spinlock). Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230327074310.1862889-3-john.g.garry@oracle.com Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit 6500d2045d5247cfb2ac31cc1691d7191096389b Author: John Garry Date: Mon Mar 27 07:43:00 2023 +0000 scsi: scsi_debug: Fix check for sdev queue full There is a report that the blktests scsi/004 test for "TASK SET FULL" (TSF) now fails. The condition upon we should issue this TSF is when the sdev queue is full. The check for a full queue has an off-by-1 error. Previously we would increment the number of requests in the queue after testing if the queue would be full, i.e. test if one less than full. Since we now use scsi_device_busy() to count the number of requests in the queue, this would already account for the current request, so fix the test for queue full accordingly. Fixes: 151f0ec9ddb5 ("scsi: scsi_debug: Drop sdebug_dev_info.num_in_q") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-lkp/202303201334.18b30edc-oliver.sang@intel.com Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230327074310.1862889-2-john.g.garry@oracle.com Acked-by: Douglas Gilbert Tested-by: Yi Zhang Signed-off-by: Martin K. Petersen commit 60b3f355c7a3808a16dbef34dc61971a2b9bc80d Merge: 3d2efb5470f58 e368d38cb9524 Author: Martin K. Petersen Date: Sun Apr 2 21:58:22 2023 -0400 Merge patch series "scsi: hisi_sas: Some misc changes" chenxiang says: This series contain some fixes including: - Grab sas_dev lock when traversing sas_dev list to avoid NULL pointer - Handle NCQ error when IPTT is valid - Ensure all enabled PHYs up during controller reset - Exit suspend state when usage count of runtime PM is greater than 0 https://lore.kernel.org/r/1679283265-115066-1-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen commit e368d38cb9524415ceb5b2b54a0dacdfb9f73b6c Author: Yihang Li Date: Mon Mar 20 11:34:25 2023 +0800 scsi: hisi_sas: Exit suspend state when usage count is greater than 0 When the current status of the host controller is suspended, enabling a local PHY just after disabling all local PHYs in expander environment, a hang as follows occurs: [ 486.854655] INFO: task kworker/u256:1:899 blocked for more than 120 seconds. [ 486.862207] Not tainted 6.1.0-rc4+ #1 [ 486.870545] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 486.878893] task:kworker/u256:1 state:D stack:0 pid:899 ppid:2 flags:0x00000008 [ 486.887745] Workqueue: 0000:74:02.0_disco_q sas_discover_domain [libsas] [ 486.894704] Call trace: [ 486.897400] __switch_to+0xf0/0x170 [ 486.901146] __schedule+0x3e4/0x1160 [ 486.904970] schedule+0x64/0x104 [ 486.908442] rpm_resume+0x158/0x6a0 [ 486.912163] __pm_runtime_resume+0x5c/0x84 [ 486.916489] smp_execute_task_sg+0x1f8/0x264 [libsas] [ 486.921773] sas_discover_expander.part.0+0xbc/0x720 [libsas] [ 486.927750] sas_discover_root_expander+0x90/0x154 [libsas] [ 486.933552] sas_discover_domain+0x444/0x6d0 [libsas] [ 486.938826] process_one_work+0x1e0/0x450 [ 486.943057] worker_thread+0x150/0x44c [ 486.947015] kthread+0x114/0x120 [ 486.950447] ret_from_fork+0x10/0x20 [ 486.954292] INFO: task kworker/u256:2:1780 blocked for more than 120 seconds. [ 486.961637] Not tainted 6.1.0-rc4+ #1 [ 486.966087] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 486.974356] task:kworker/u256:2 state:D stack:0 pid:1780 ppid:2 flags:0x00000208 [ 486.983141] Workqueue: 0000:74:02.0_event_q sas_port_event_worker [libsas] [ 486.990252] Call trace: [ 486.992930] __switch_to+0xf0/0x170 [ 486.996645] __schedule+0x3e4/0x1160 [ 487.000439] schedule+0x64/0x104 [ 487.003886] schedule_timeout+0x17c/0x1c0 [ 487.008102] wait_for_completion+0x7c/0x160 [ 487.012488] __flush_workqueue+0x104/0x3e0 [ 487.016782] sas_porte_bytes_dmaed+0x414/0x454 [libsas] [ 487.022203] sas_port_event_worker+0x38/0x60 [libsas] [ 487.027449] process_one_work+0x1e0/0x450 [ 487.031645] worker_thread+0x150/0x44c [ 487.035594] kthread+0x114/0x120 [ 487.039017] ret_from_fork+0x10/0x20 [ 487.042828] INFO: task bash:11488 blocked for more than 121 seconds. [ 487.049366] Not tainted 6.1.0-rc4+ #1 [ 487.053746] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 487.061953] task:bash state:D stack:0 pid:11488 ppid:10977 flags:0x00000204 [ 487.070698] Call trace: [ 487.073355] __switch_to+0xf0/0x170 [ 487.077050] __schedule+0x3e4/0x1160 [ 487.080833] schedule+0x64/0x104 [ 487.084270] schedule_timeout+0x17c/0x1c0 [ 487.088474] wait_for_completion+0x7c/0x160 [ 487.092851] __flush_workqueue+0x104/0x3e0 [ 487.097137] drain_workqueue+0xb8/0x160 [ 487.101159] __sas_drain_work+0x50/0x90 [libsas] [ 487.105963] sas_suspend_ha+0x64/0xd4 [libsas] [ 487.110590] suspend_v3_hw+0x198/0x1e8 [hisi_sas_v3_hw] [ 487.115989] pci_pm_runtime_suspend+0x5c/0x1d0 [ 487.120606] __rpm_callback+0x50/0x150 [ 487.124535] rpm_callback+0x74/0x80 [ 487.128204] rpm_suspend+0x110/0x640 [ 487.131955] rpm_idle+0x1f4/0x2d0 [ 487.135447] __pm_runtime_idle+0x58/0x94 [ 487.139538] queue_phy_enable+0xcc/0xf0 [libsas] [ 487.144330] store_sas_phy_enable+0x74/0x100 [ 487.148770] dev_attr_store+0x20/0x34 [ 487.152606] sysfs_kf_write+0x4c/0x5c [ 487.156437] kernfs_fop_write_iter+0x120/0x1b0 [ 487.161049] vfs_write+0x2d0/0x36c [ 487.164625] ksys_write+0x70/0x100 [ 487.168194] __arm64_sys_write+0x24/0x30 [ 487.172280] invoke_syscall+0x50/0x120 [ 487.176186] el0_svc_common.constprop.0+0x168/0x190 [ 487.181214] do_el0_svc+0x34/0xc0 [ 487.184680] el0_svc+0x2c/0xb4 [ 487.187879] el0t_64_sync_handler+0xb8/0xbc [ 487.192205] el0t_64_sync+0x19c/0x1a0 We find that when all local PHYs are disabled, all the devices will be removed, the ->runtime_suspend() callback suspend_v3_hw() directly execute since the controller usage count drop to 0. On the other side, the first local PHY is enabled through the sysfs interface, and ensures that function phy_up_v3_hw() is completed due to suspend_v3_hw()-> interrupt_disable_v3_hw(). In the expander scenario, sas_discover_root_expander() is executed in event work DISCE_DISCOVER_DOMAIN, which will increases the controller usage count and carry out a resume and sends SMPIO, it cannot be completed because the runtime PM status of the controller is RPM_SUSPENDING. At the same time, the ->runtime_suspend() callback suspend_v3_hw() also cannot complete the process because of drain libsas event queue in sas_suspend_ha(), so hung occurs. (thread 1) | (thread 2) ... | rpm_idle() | ... | __update_runtime_status(RPM_SUSPENDING)| ... | ... suspend_v3_hw() | smp_execute_task_sg() ... | ... interrupt_disable_v3_hw() | pm_runtime_get_sync() | ... ... | rpm_resume() //RPM_SUSPENDING | __sas_drain_work() | To fix this, check if the current runtime PM status of the controller allows to be suspended continue after interrupt_disable_v3_hw(), return immediately if not. Signed-off-by: Yihang Li Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1679283265-115066-5-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen commit 89954f024c3ae5e8674d9b5313a7cc08e79c6f6d Author: Yihang Li Date: Mon Mar 20 11:34:24 2023 +0800 scsi: hisi_sas: Ensure all enabled PHYs up during controller reset For the controller reset operation, hisi_sas_phy_enable() is executed for each enabled local PHY, and refresh the port id of each device based on the latest hisi_sas_phy->port_id after 1 second sleep, hisi_sas_phy->port_id is configured in the interrupt processing function phy_up_v3_hw(). However, in directly attached scenario, for some SATA disks the amount of time for phyup more than 1s sometimes. In this case, incorrect port id may be configured in hisi_sas_refresh_port_id(). As a result, all the internal IOs fail and disk lost, such as follows: [10717.666565] hisi_sas_v3_hw 0000:74:02.0: phyup: phy1 link_rate=10(sata) [10718.826813] hisi_sas_v3_hw 0000:74:02.0: erroneous completion iptt=63 task=00000000c1ab1c2b dev id=200 addr=5000000000000501 CQ hdr: 0x8000007 0xc8003f 0x0 0x0 Error info: 0x0 0x0 0x0 0x0 [10718.843428] sas: TMF task open reject failed 5000000000000501 [10718.849242] hisi_sas_v3_hw 0000:74:02.0: erroneous completion iptt=64 task=00000000c1ab1c2b dev id=200 addr=5000000000000501 CQ hdr: 0x8000007 0xc80040 0x0 0x0 Error info: 0x0 0x0 0x0 0x0 [10718.865856] sas: TMF task open reject failed 5000000000000501 [10718.871670] hisi_sas_v3_hw 0000:74:02.0: erroneous completion iptt=65 task=00000000c1ab1c2b dev id=200 addr=5000000000000501 CQ hdr: 0x8000007 0xc80041 0x0 0x0 Error info: 0x0 0x0 0x0 0x0 [10718.888284] sas: TMF task open reject failed 5000000000000501 [10718.894093] sas: executing TMF for 5000000000000501 failed after 3 attempts! [10718.901114] hisi_sas_v3_hw 0000:74:02.0: ata disk 5000000000000501 reset failed [10718.908410] hisi_sas_v3_hw 0000:74:02.0: controller reset complete ..... [10773.298633] ata216.00: revalidation failed (errno=-19) [10773.303753] ata216.00: disable device So the time of waitting for PHYs up is 1s which may be not enough. To solve the issue, running hisi_sas_phy_enable() in parallel through async operations and use wait_for_completion_timeout() to wait for PHYs come up instead of directly sleep for 1 second. Signed-off-by: Yihang Li Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1679283265-115066-4-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen commit bb544224da77b96b2c11a13872bf91ede1e015be Author: Xingui Yang Date: Mon Mar 20 11:34:23 2023 +0800 scsi: hisi_sas: Handle NCQ error when IPTT is valid If an NCQ error occurs when the IPTT is valid and slot->abort flag is set in completion path, sas_task_abort() will be called to abort only one NCQ command now, and the host would be set to SHOST_RECOVERY state. But this may not kick-off EH Immediately until other outstanding QCs timeouts. As a result, the host may remain in the SHOST_RECOVERY state for up to 30 seconds, such as follows: [7972317.645234] hisi_sas_v3_hw 0000:74:04.0: erroneous completion iptt=3264 task=00000000466116b8 dev id=2 sas_addr=0x5000000000000502 CQ hdr: 0x1883 0x20cc0 0x40000 0x20420000 Error info: 0x0 0x0 0x200000 0x0 [7972341.508264] sas: Enter sas_scsi_recover_host busy: 32 failed: 32 [7972341.984731] sas: --- Exit sas_scsi_recover_host: busy: 0 failed: 32 tries: 1 All NCQ commands that are in the queue should be aborted when an NCQ error occurs in this scenario. Fixes: 05d91b557af9 ("scsi: hisi_sas: Directly trigger SCSI error handling for completion errors") Signed-off-by: Xingui Yang Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1679283265-115066-3-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen commit 71fb36b5ff113a7674710b9d6063241eada84ff7 Author: Xingui Yang Date: Mon Mar 20 11:34:22 2023 +0800 scsi: hisi_sas: Grab sas_dev lock when traversing the members of sas_dev.list When freeing slots in function slot_complete_v3_hw(), it is possible that sas_dev.list is being traversed elsewhere, and it may trigger a NULL pointer exception, such as follows: ==>cq thread ==>scsi_eh_6 ==>scsi_error_handler() ==>sas_eh_handle_sas_errors() ==>sas_scsi_find_task() ==>lldd_abort_task() ==>slot_complete_v3_hw() ==>hisi_sas_abort_task() ==>hisi_sas_slot_task_free() ==>dereg_device_v3_hw() ==>list_del_init() ==>list_for_each_entry_safe() [ 7165.434918] sas: Enter sas_scsi_recover_host busy: 32 failed: 32 [ 7165.434926] sas: trying to find task 0x00000000769b5ba5 [ 7165.434927] sas: sas_scsi_find_task: aborting task 0x00000000769b5ba5 [ 7165.434940] hisi_sas_v3_hw 0000:b4:02.0: slot complete: task(00000000769b5ba5) aborted [ 7165.434964] hisi_sas_v3_hw 0000:b4:02.0: slot complete: task(00000000c9f7aa07) ignored [ 7165.434965] hisi_sas_v3_hw 0000:b4:02.0: slot complete: task(00000000e2a1cf01) ignored [ 7165.434968] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 7165.434972] hisi_sas_v3_hw 0000:b4:02.0: slot complete: task(0000000022d52d93) ignored [ 7165.434975] hisi_sas_v3_hw 0000:b4:02.0: slot complete: task(0000000066a7516c) ignored [ 7165.434976] Mem abort info: [ 7165.434982] ESR = 0x96000004 [ 7165.434991] Exception class = DABT (current EL), IL = 32 bits [ 7165.434992] SET = 0, FnV = 0 [ 7165.434993] EA = 0, S1PTW = 0 [ 7165.434994] Data abort info: [ 7165.434994] ISV = 0, ISS = 0x00000004 [ 7165.434995] CM = 0, WnR = 0 [ 7165.434997] user pgtable: 4k pages, 48-bit VAs, pgdp = 00000000f29543f2 [ 7165.434998] [0000000000000000] pgd=0000000000000000 [ 7165.435003] Internal error: Oops: 96000004 [#1] SMP [ 7165.439863] Process scsi_eh_6 (pid: 4109, stack limit = 0x00000000c43818d5) [ 7165.468862] pstate: 00c00009 (nzcv daif +PAN +UAO) [ 7165.473637] pc : dereg_device_v3_hw+0x68/0xa8 [hisi_sas_v3_hw] [ 7165.479443] lr : dereg_device_v3_hw+0x2c/0xa8 [hisi_sas_v3_hw] [ 7165.485247] sp : ffff00001d623bc0 [ 7165.488546] x29: ffff00001d623bc0 x28: ffffa027d03b9508 [ 7165.493835] x27: ffff80278ed50af0 x26: ffffa027dd31e0a8 [ 7165.499123] x25: ffffa027d9b27f88 x24: ffffa027d9b209f8 [ 7165.504411] x23: ffffa027c45b0d60 x22: ffff80278ec07c00 [ 7165.509700] x21: 0000000000000008 x20: ffffa027d9b209f8 [ 7165.514988] x19: ffffa027d9b27f88 x18: ffffffffffffffff [ 7165.520276] x17: 0000000000000000 x16: 0000000000000000 [ 7165.525564] x15: ffff0000091d9708 x14: ffff0000093b7dc8 [ 7165.530852] x13: ffff0000093b7a23 x12: 6e7265746e692067 [ 7165.536140] x11: 0000000000000000 x10: 0000000000000bb0 [ 7165.541429] x9 : ffff00001d6238f0 x8 : ffffa027d877af00 [ 7165.546718] x7 : ffffa027d6329600 x6 : ffff7e809f58ca00 [ 7165.552006] x5 : 0000000000001f8a x4 : 000000000000088e [ 7165.557295] x3 : ffffa027d9b27fa8 x2 : 0000000000000000 [ 7165.562583] x1 : 0000000000000000 x0 : 000000003000188e [ 7165.567872] Call trace: [ 7165.570309] dereg_device_v3_hw+0x68/0xa8 [hisi_sas_v3_hw] [ 7165.575775] hisi_sas_abort_task+0x248/0x358 [hisi_sas_main] [ 7165.581415] sas_eh_handle_sas_errors+0x258/0x8e0 [libsas] [ 7165.586876] sas_scsi_recover_host+0x134/0x458 [libsas] [ 7165.592082] scsi_error_handler+0xb4/0x488 [ 7165.596163] kthread+0x134/0x138 [ 7165.599380] ret_from_fork+0x10/0x18 [ 7165.602940] Code: d5033e9f b9000040 aa0103e2 eb03003f (f9400021) [ 7165.609004] kernel fault(0x1) notification starting on CPU 75 [ 7165.700728] ---[ end trace fc042cbbea224efc ]--- [ 7165.705326] Kernel panic - not syncing: Fatal exception To fix the issue, grab sas_dev lock when traversing the members of sas_dev.list in dereg_device_v3_hw() and hisi_sas_release_tasks() to avoid concurrency of adding and deleting member. When function hisi_sas_release_tasks() calls hisi_sas_do_release_task() to free slot, the lock cannot be grabbed again in hisi_sas_slot_task_free(), then a bool parameter need_lock is added. Signed-off-by: Xingui Yang Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1679283265-115066-2-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen commit 3d2efb5470f58707a9120720af238d1dacdf77b5 Author: Tom Rix Date: Fri Mar 31 13:57:57 2023 -0400 scsi: qla4xxx: Remove unused 'count' variable clang with W=1 reports: drivers/scsi/qla4xxx/ql4_isr.c:475:11: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable] uint32_t count = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230331175757.1860780-1-trix@redhat.com Signed-off-by: Martin K. Petersen commit 4e0966a4829178b3cc7d8dc8686d9d6fcc221187 Author: Tom Rix Date: Mon Mar 27 20:16:47 2023 -0400 scsi: snic: Remove unused 'xfer_len' variable clang with W=1 reports: drivers/scsi/snic/snic_scsi.c:490:6: error: variable 'xfer_len' set but not used [-Werror,-Wunused-but-set-variable] u64 xfer_len = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230328001647.1778448-1-trix@redhat.com Signed-off-by: Martin K. Petersen commit 7866e03b9825e1e08fc5136d3ab9a35ebabdc7f5 Author: Tom Rix Date: Thu Mar 30 16:34:44 2023 -0400 scsi: qedf: Remove unused 'num_handled' variable clang with W=1 reports: drivers/scsi/qedf/qedf_main.c:2227:6: error: variable 'num_handled' set but not used [-Werror,-Wunused-but-set-variable] int num_handled = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230330203444.1842425-1-trix@redhat.com Signed-off-by: Martin K. Petersen commit 0a07d3c7a1d205b47d9f3608ff4e9d1065d63b6d Author: Adrian Hunter Date: Tue Mar 28 13:58:32 2023 +0300 scsi: ufs: ufs-pci: Add support for Intel Lunar Lake Add PCI ID to support Intel Lunar Lake, same as MTL. Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20230328105832.3495-1-adrian.hunter@intel.com Signed-off-by: Martin K. Petersen commit e324dd00fd17906ad9f0386f5e15d78da2e2b9fe Author: Tom Rix Date: Sat Mar 25 20:32:22 2023 -0400 scsi: scsi_transport_fc: Remove unused 'desc_cnt' variable clang with W=1 reports: drivers/scsi/scsi_transport_fc.c:908:6: error: variable 'desc_cnt' set but not used [-Werror,-Wunused-but-set-variable] u32 desc_cnt = 0, bytes_remain; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230326003222.1343671-1-trix@redhat.com Reviewed-by: Himanshu Madhani Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit ca62009eff728c0a62ea76184adcc6be411f4066 Author: Enze Li Date: Mon Mar 27 11:02:37 2023 +0800 scsi: sr: Simplify the sr_open() function Simplify the sr_open() by removing the goto label as the function only returns one error code. Signed-off-by: Enze Li Link: https://lore.kernel.org/r/20230327030237.3407253-1-lienze@kylinos.cn Reviewed-by: Bart Van Assche Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen commit aa4d7812cf2cb0847e027d0e2a124926eea9d4fb Author: Tom Rix Date: Wed Mar 29 09:24:21 2023 -0400 scsi: target: core: Remove unused 'prod_len' variable clang with W=1 reports: drivers/target/target_core_spc.c:229:6: error: variable 'prod_len' set but not used [-Werror,-Wunused-but-set-variable] u32 prod_len; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230329132421.1809362-1-trix@redhat.com Reviewed-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen commit ae9f5ccea4c268a96763e51239b32d6b5172c18c Author: Ming Lei Date: Thu Mar 30 19:36:24 2023 +0800 block: ublk_drv: cleanup 'struct ublk_map_data' 'struct ublk_map_data' is passed to ublk_copy_user_pages() for copying data between userspace buffer and request pages. Here what matters is userspace buffer address/len and 'struct request', so replace ->io field with user buffer address, and rename max_bytes as len. Meantime remove 'ubq' field from ublk_map_data, since it isn't used any more. Then code becomes more readable. Reviewed-by: Ziyang Zhang Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 96cf2f5404c8bc979628a2b495852d735a56c5b5 Author: Ming Lei Date: Thu Mar 30 19:36:23 2023 +0800 block: ublk_drv: clean up several helpers Convert the following pattern in several helpers if (Z) return true return false into: return Z; Reviewed-by: Ziyang Zhang Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 2f3af723447c35c16f3c6a1b4b317c61dc41d6c3 Author: Ming Lei Date: Thu Mar 30 19:36:22 2023 +0800 block: ublk_drv: add two helpers to clean up map/unmap request Add two helpers for checking if map/unmap is needed, since we may have passthrough request which needs map or unmap in future, such as for supporting report zones. Meantime don't mark ublk_copy_user_pages as inline since this function is a bit fat now. Reviewed-by: Ziyang Zhang Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 23ef8220f287abe5bf741ddfc278e7359742d3b1 Author: Ming Lei Date: Thu Mar 30 19:36:21 2023 +0800 block: ublk_drv: don't consider flush request in map/unmap io There isn't data in request of REQ_OP_FLUSH always, so don't consider it in both ublk_map_io() and ublk_unmap_io(). Reviewed-by: Ziyang Zhang Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 903f8aeea9fd1b97fba4ab805ddd639f57f117f8 Author: Ming Lei Date: Thu Mar 30 19:36:20 2023 +0800 block: ublk_drv: add common exit handling Simplify exit handling a bit, and prepare for supporting fused command. Reviewed-by: Ziyang Zhang Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 0e4b1791d9b192ac263a03707d876132eb0f8dab Author: Jason Yan Date: Thu Mar 30 19:09:30 2023 +0800 scsi: libsas: Abort all in-flight requests when device is gone When a disk is removed with in-flight I/O, the application needs to wait for 30 seconds (depending on the timeout configuration) to hear back from the kernel. Xingui tried to fix this issue by aborting the ATA link for SATA devices[1], however this approach left the SAS devices unresolved. Try to fix this issue by aborting all in-flight requests when the device is gone. This is implemented by iterating over the tagset. [1] https://lore.kernel.org/lkml/234e04db-7539-07e4-a6b8-c6b05f78193d@opensource.wdc.com/T/ Cc: Xingui Yang Cc: John Garry Cc: Damien Le Moal Cc: Hannes Reinecke Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20230330110930.175539-1-yanaijie@huawei.com Reviewed-by: John Garry Signed-off-by: Martin K. Petersen commit 543a827b1db3ef0a123dc7a48e8feb6585eae0a6 Author: Stanley Chu Date: Thu Mar 30 09:29:18 2023 +0800 scsi: core: Clean up struct ufs_saved_pwr_info The "is_valid" field of the struct ufs_saved_pwr_info is no longer used, and this struct can be replaced by struct ufs_pa_layer_attr without any changes to the functionality. Signed-off-by: Stanley Chu Link: https://lore.kernel.org/r/20230330012918.13748-1-stanley.chu@mediatek.com Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen commit 16b7c970cc8192e929dbd5192ccc1867e19d7bda Author: Dave Thaler Date: Sun Mar 26 05:49:46 2023 +0000 bpf, docs: Add docs on extended 64-bit immediate instructions Add docs on extended 64-bit immediate instructions, including six instructions previously undocumented. Include a brief description of maps and variables, as used by those instructions. V1 -> V2: rebased on top of latest master V2 -> V3: addressed comments from Alexei V3 -> V4: addressed comments from David Vernet Signed-off-by: Dave Thaler Link: https://lore.kernel.org/r/20230326054946.2331-1-dthaler1968@googlemail.com Signed-off-by: Alexei Starovoitov commit a73a7c41de593ea08f5a659b2b6ff4b5af493bbb Author: Ye Xingchen Date: Fri Mar 24 10:17:29 2023 +0800 soc: mediatek: mutex: Use dev_err_probe() Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/202303241017290414354@zte.com.cn Signed-off-by: Matthias Brugger commit 80dd5ca523c5bbef082c31fad67825009bfb04d6 Author: AngeloGioacchino Del Regno Date: Mon Mar 27 10:36:36 2023 +0200 arm64: dts: mediatek: mt6795: Add SoC power domains Add power domain tree for various hardware blocks on MT6795. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230327083647.22017-7-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 80d9c0734330729210b30a46bd28a40ad48e7256 Author: AngeloGioacchino Del Regno Date: Mon Mar 27 10:36:35 2023 +0200 arm64: dts: mediatek: mt6795: Add nodes for I2C controllers Add all four I2C controller nodes but keep them in disabled state as usage is board-dependant. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230327083647.22017-6-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit c63e6a4640c7b7d0c800bc7c5c42565779eaa702 Author: AngeloGioacchino Del Regno Date: Mon Mar 27 10:36:33 2023 +0200 arm64: dts: mediatek: mt6795: xperia-m5: Enable Frequency Hopping Enable FHCTL with Spread Spectrum for MAINPLL, MPLL and MSDCPLL as found on the downstream kernel for this smartphone. Which one to enable, and at what SSC percentage, was found by dumping the debugging data from a running downstream kernel and checking the downstream code. /proc/freqhopping # cat status FH status: =============================================== id == fh_status == pll_status == setting_id == curr_freq == user_defined 0 0 1 0 1599000 0 1 0 1 0 1716000 0 2 1 1 2 1092000 0 3 1 1 2 2912000 0 4 1 0 2 1600000 0 5 0 0 0 0 0 6 0 1 0 1518002 0 7 0 0 0 0 0 8 0 0 0 0 0 Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230327083647.22017-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit befae66a462bf42816394a23e3f710a068e8310c Author: AngeloGioacchino Del Regno Date: Mon Mar 27 10:36:32 2023 +0200 arm64: dts: mediatek: mt6795: Add apmixedsys syscon node Add the APMIXEDSYS node, providing a syscon to the APMIXED iospace and also providing PLLs. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230327083647.22017-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 03a750a7a7b5b278b82b0fcdeca0bba26ebecb7e Author: AngeloGioacchino Del Regno Date: Mon Mar 27 10:36:31 2023 +0200 arm64: dts: mediatek: mt6795: Add Frequency Hopping Controller node Add FHCTL node but keep it disabled as the PLL clocks that should be handled through FHCTL and the Spread Spectrum Clocking parameters are board specific. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230327083647.22017-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit e9a6f5bca5ea56f05d92a966034ed472408821b8 Author: AngeloGioacchino Del Regno Date: Thu Mar 9 11:26:18 2023 +0100 soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10 Add MMSYS support for the MT6795 SoC using the same mmsys routing table as MT8173 as, for the currently supported usecases (DSI0, DPI0 with no WDMA), these are identical. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230309102618.114157-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit b427d857a8eae5cd2d22469371c4625c59dfbb2f Author: AngeloGioacchino Del Regno Date: Thu Mar 9 11:26:17 2023 +0100 soc: mediatek: mtk-mmsys: Change MT8173 num_resets to 64 The MT8173 SoC has 64 MMSYS resets, split in two contiguous 32-bits registers, MMSYS_SW0_RST_B (0x140) and MMSYS_SW1_RST_B (0x144), as also stated in the downstream kernel for the Amazon Fire TV 2 (Sloane) in the ddp_reg.h header. Please note that managing more than 32 reset bits is supported since commit 2004f8be8483 ("soc: mediatek: mmsys: add mmsys for support 64 reset bits") This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230309102618.114157-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 2a0a8d8700ef4f75b1b3e87b3b314b07246b4c27 Author: AngeloGioacchino Del Regno Date: Thu Mar 9 11:26:16 2023 +0100 soc: mediatek: mtk-mmsys: Split out MT8173 mmsys DDP routing table MT2701, MT2712 and MT8173 were relying on a "default" DDP I/O routing table, describing all of the possible connections between display block components: while this is definitely working it's suboptimal for the actual routing description, as we may be enabling outputs and inputs that are not needed, possibly impacting on actual DDP performance other than slightly prolonging boot times by having to parse a table that is bigger than needed. Seen that all of the other supported SoCs have got their own table and seen that a comment in mtk-mmsys.h explicitly mentions that the wanted way is to have one table per SoC, create a new routing table that is specifically tailored to MT8173 and, while at it, remove mentions to said SoC from the comment in mtk-mmsys.h. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230309102618.114157-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit b34884b4c878a6ad2a4f70d7c88ef60ac39ad408 Author: AngeloGioacchino Del Regno Date: Wed Feb 22 10:42:53 2023 +0100 soc: mediatek: Cleanup ifdefs for IS_REACHABLE(CONFIG_MTK_CMDQ) Now that the mtk-cmdq.h header contains inline functions for cases in which the driver is not enabled (either module or built-in), we can safely go on with cleaning up ifdefs for CMDQ handling. This also shows in a clearer manner that writing through CMDQ HW is optional and used only for performance purposes when/where wanted, needed and/or required. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230222094253.23678-10-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit eb0d8623b9b805cbcab87620a363292552c19359 Author: AngeloGioacchino Del Regno Date: Wed Feb 22 10:42:52 2023 +0100 soc: mediatek: cmdq: Add inline functions for !CONFIG_MTK_CMDQ In preparation for a cleanup of ifdef instances of IS_REACHABLE() for the CONFIG_MTK_CMDQ configuration option, add inline functions that will either return a failure or, for void functions, do nothing. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230222094253.23678-9-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 1fccd1ef65b2b100b53b534894366f575b390e70 Author: AngeloGioacchino Del Regno Date: Wed Feb 22 10:42:51 2023 +0100 soc: mediatek: mtk-mutex: Use module_platform_driver() macro Replace open-coded init/exit calls with the module_platform_driver() macro being equivalent. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230222094253.23678-8-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit dc36768d05bc877b1227b09af1bb304a28284ce3 Author: AngeloGioacchino Del Regno Date: Wed Feb 22 10:42:50 2023 +0100 soc: mediatek: mtk-mutex: Replace max handles number with definition Replace the magic number "10", defining the maximum number of supported handles with a MTK_MUTEX_MAX_HANDLES definition. While at it, also change the type for `id` from a signed integer to a unsigned 8 bits integer to save some (small) memory footprint, as this number is never higher than 10. This cleanup brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230222094253.23678-7-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 00ee1db7016b73ecd3214d6dc2df4fa02beb694d Author: AngeloGioacchino Del Regno Date: Wed Feb 22 10:42:49 2023 +0100 soc: mediatek: mtk-mutex: Compress of_device_id array entries Compress entries of the of_match_mtk_mmsys array to reduce the amount of lines and increase readability; this brings us to a maximum of 95 columns. While at it, also add a sentinel comment to the last entry for the sole purpose of consistency. This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230222094253.23678-6-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 10687632307c08d9183b1859a01a5848e50e4334 Author: AngeloGioacchino Del Regno Date: Wed Feb 22 10:42:48 2023 +0100 soc: mediatek: mtk-mmsys: Add MODULE_DEVICE_TABLE() to allow auto-load Allow module auto-loading by adding a MODULE_DEVICE_TABLE for of_match_mmsys. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230222094253.23678-5-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 0fe09bf32a79933c741118a7346711c2a7d05d05 Author: AngeloGioacchino Del Regno Date: Wed Feb 22 10:42:47 2023 +0100 soc: mediatek: mtk-mmsys: Compress of_device_id array entries Compress entries of the of_match_mtk_mmsys array to reduce the amount of lines and increase readability; this brings us to a maximum of 90 columns. While at it, also add a sentinel comment to the last entry for the sole purpose of consistency. This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230222094253.23678-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 683c7d383fbd413cabe1203eb7df1cc8f39c70d5 Author: AngeloGioacchino Del Regno Date: Wed Feb 22 10:42:46 2023 +0100 soc: mediatek: mtk-mmsys: Use module_platform_driver() macro Instead of open-coding init/exit calls, switch to using the module_platform_driver() macro instead, doing the exact same. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230222094253.23678-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 1ef3e78ac207d5194c18d2b75cb2119273816cb5 Author: AngeloGioacchino Del Regno Date: Wed Feb 22 10:42:45 2023 +0100 soc: mediatek: mtk-mmsys: Add .remove() callback Add a .remove() callback to correctly unregister the multimedia clocks and DRM drivers. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230222094253.23678-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 92b2e810f0d3a2c05d8cf12a800592b238d458df Author: Anton Protopopov Date: Sun Apr 2 11:43:40 2023 +0000 bpf: compute hashes in bloom filter similar to hashmap If the value size in a bloom filter is a multiple of 4, then the jhash2() function is used to compute hashes. The length parameter of this function equals to the number of 32-bit words in input. Compute it in the hot path instead of pre-computing it, as this is translated to one extra shift to divide the length by four vs. one extra memory load of a pre-computed length. Signed-off-by: Anton Protopopov Link: https://lore.kernel.org/r/20230402114340.3441-1-aspsk@isovalent.com Signed-off-by: Alexei Starovoitov commit 51aaa68222d6c34f0373cf95223ce2f230329e8f Author: Tom Rix Date: Fri Mar 31 16:55:45 2023 -0400 net: alteon: remove unused len variable clang with W=1 reports drivers/net/ethernet/alteon/acenic.c:2438:10: error: variable 'len' set but not used [-Werror,-Wunused-but-set-variable] int i, len = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit f85b882441585fceb5cef690660933ccbb5d5bc0 Merge: dd2d6604407da cc19439f703b8 Author: David S. Miller Date: Sun Apr 2 13:42:30 2023 +0100 Merge branch 'mlxsw-transceiver-trip-points' Petr Machata says: ==================== mlxsw: Use static trip points for transceiver modules Ido Schimmel writes: See patch #1 for motivation and implementation details. Patches #2-#3 are simple cleanups as a result of the changes in the first patch. ==================== Signed-off-by: David S. Miller commit cc19439f703b8c979133bf91690d6c0dffd8dc46 Author: Ido Schimmel Date: Fri Mar 31 16:17:32 2023 +0200 mlxsw: core_thermal: Simplify transceiver module get_temp() callback The get_temp() callback of a thermal zone associated with a transceiver module no longer needs to read the temperature thresholds of the module. Therefore, simplify the callback by only reading the temperature. Signed-off-by: Ido Schimmel Reviewed-by: Vadim Pasternak Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit c1536d856e18c6d37a6b7d1fc68d3d27aa7f8e9d Author: Ido Schimmel Date: Fri Mar 31 16:17:31 2023 +0200 mlxsw: core_thermal: Make mlxsw_thermal_module_init() void The function can no longer fail so make it void and remove the associated error path. Signed-off-by: Ido Schimmel Reviewed-by: Vadim Pasternak Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 5601ef91fba8efea483a7ca3bd6c42a581e4daa1 Author: Ido Schimmel Date: Fri Mar 31 16:17:30 2023 +0200 mlxsw: core_thermal: Use static trip points for transceiver modules The driver registers a thermal zone for each transceiver module and tries to set the trip point temperatures according to the thresholds read from the transceiver. If a threshold cannot be read or if a transceiver is unplugged, the trip point temperature is set to zero, which means that it is disabled as far as the thermal subsystem is concerned. A recent change in the thermal core made it so that such trip points are no longer marked as disabled, which lead the thermal subsystem to incorrectly set the associated cooling devices to the their maximum state [1]. A fix to restore this behavior was merged in commit f1b80a3878b2 ("thermal: core: Restore behavior regarding invalid trip points"). However, the thermal maintainer suggested to not rely on this behavior and instead always register a valid array of trip points [2]. Therefore, create a static array of trip points with sane defaults (suggested by Vadim) and register it with the thermal zone of each transceiver module. User space can choose to override these defaults using the thermal zone sysfs interface since these files are writeable. Before: $ cat /sys/class/thermal/thermal_zone11/type mlxsw-module11 $ cat /sys/class/thermal/thermal_zone11/trip_point_*_temp 65000 75000 80000 After: $ cat /sys/class/thermal/thermal_zone11/type mlxsw-module11 $ cat /sys/class/thermal/thermal_zone11/trip_point_*_temp 55000 65000 80000 Also tested by reverting commit f1b80a3878b2 ("thermal: core: Restore behavior regarding invalid trip points") and making sure that the associated cooling devices are not set to their maximum state. [1] https://lore.kernel.org/linux-pm/ZA3CFNhU4AbtsP4G@shredder/ [2] https://lore.kernel.org/linux-pm/f78e6b70-a963-c0ca-a4b2-0d4c6aeef1fb@linaro.org/ Signed-off-by: Ido Schimmel Reviewed-by: Vadim Pasternak Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit dd2d6604407da5b1b260faee409cd601fe914ce9 Author: Jakub Kicinski Date: Thu Mar 30 21:47:31 2023 -0700 net: minor reshuffle of napi_struct napi_id is read by GRO and drivers to mark skbs, and it currently sits at the end of the structure, in a mostly unused cache line. Move it up into a hole, and separate the clearly control path fields from the important ones. Before: struct napi_struct { struct list_head poll_list; /* 0 16 */ long unsigned int state; /* 16 8 */ int weight; /* 24 4 */ int defer_hard_irqs_count; /* 28 4 */ long unsigned int gro_bitmask; /* 32 8 */ int (*poll)(struct napi_struct *, int); /* 40 8 */ int poll_owner; /* 48 4 */ /* XXX 4 bytes hole, try to pack */ struct net_device * dev; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ struct gro_list gro_hash[8]; /* 64 192 */ /* --- cacheline 4 boundary (256 bytes) --- */ struct sk_buff * skb; /* 256 8 */ struct list_head rx_list; /* 264 16 */ int rx_count; /* 280 4 */ /* XXX 4 bytes hole, try to pack */ struct hrtimer timer; /* 288 64 */ /* XXX last struct has 4 bytes of padding */ /* --- cacheline 5 boundary (320 bytes) was 32 bytes ago --- */ struct list_head dev_list; /* 352 16 */ struct hlist_node napi_hash_node; /* 368 16 */ /* --- cacheline 6 boundary (384 bytes) --- */ unsigned int napi_id; /* 384 4 */ /* XXX 4 bytes hole, try to pack */ struct task_struct * thread; /* 392 8 */ /* size: 400, cachelines: 7, members: 17 */ /* sum members: 388, holes: 3, sum holes: 12 */ /* paddings: 1, sum paddings: 4 */ /* last cacheline: 16 bytes */ }; After: struct napi_struct { struct list_head poll_list; /* 0 16 */ long unsigned int state; /* 16 8 */ int weight; /* 24 4 */ int defer_hard_irqs_count; /* 28 4 */ long unsigned int gro_bitmask; /* 32 8 */ int (*poll)(struct napi_struct *, int); /* 40 8 */ int poll_owner; /* 48 4 */ /* XXX 4 bytes hole, try to pack */ struct net_device * dev; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ struct gro_list gro_hash[8]; /* 64 192 */ /* --- cacheline 4 boundary (256 bytes) --- */ struct sk_buff * skb; /* 256 8 */ struct list_head rx_list; /* 264 16 */ int rx_count; /* 280 4 */ unsigned int napi_id; /* 284 4 */ struct hrtimer timer; /* 288 64 */ /* XXX last struct has 4 bytes of padding */ /* --- cacheline 5 boundary (320 bytes) was 32 bytes ago --- */ struct task_struct * thread; /* 352 8 */ struct list_head dev_list; /* 360 16 */ struct hlist_node napi_hash_node; /* 376 16 */ /* size: 392, cachelines: 7, members: 17 */ /* sum members: 388, holes: 1, sum holes: 4 */ /* paddings: 1, sum paddings: 4 */ /* forced alignments: 1 */ /* last cacheline: 8 bytes */ } __attribute__((__aligned__(8))); Signed-off-by: Jakub Kicinski Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit ceb29474bbbc377e11be3a70589a0005305e4fc3 Author: Sylwester Dziedziuch Date: Thu Mar 30 10:00:22 2023 -0700 i40e: Add support for VF to specify its primary MAC address Currently in the i40e driver there is no implementation of different MAC address handling depending on whether it is a legacy or primary. Introduce new checks for VF to be able to specify its primary MAC address based on the VIRTCHNL_ETHER_ADDR_PRIMARY type. Primary MAC address are treated differently compared to legacy ones in a scenario where: 1. If a unicast MAC is being added and it's specified as VIRTCHNL_ETHER_ADDR_PRIMARY, then replace the current default_lan_addr.addr. 2. If a unicast MAC is being deleted and it's type is specified as VIRTCHNL_ETHER_ADDR_PRIMARY, then zero the hw_lan_addr.addr. Signed-off-by: Sylwester Dziedziuch Signed-off-by: Mateusz Palczewski Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 4a66f3da99dcb4dcbd28544110636b50adfb0f0d Author: Erico Nunes Date: Mon Mar 13 00:30:52 2023 +0100 drm/lima: add show_fdinfo for drm usage stats This exposes an accumulated active time per client via the fdinfo infrastructure per execution engine, following Documentation/gpu/drm-usage-stats.rst. In lima, the exposed execution engines are gp and pp. Signed-off-by: Erico Nunes Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20230312233052.21095-4-nunes.erico@gmail.com commit 87767de835edf527b879a363d518c33da68adb81 Author: Erico Nunes Date: Mon Mar 13 00:30:51 2023 +0100 drm/lima: allocate unique id per drm_file To track if fds are pointing to the same execution context and export the expected information to fdinfo, similar to what is done in other drivers. Signed-off-by: Erico Nunes Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20230312233052.21095-3-nunes.erico@gmail.com commit bccafec957a5c4b22ac29e53a39e82d0a0008348 Author: Erico Nunes Date: Mon Mar 13 00:30:50 2023 +0100 drm/lima: add usage counting method to ctx_mgr lima maintains a context manager per drm_file, similar to amdgpu. In order to account for the complete usage per drm_file, all of the associated contexts need to be considered. Previously released contexts also need to be accounted for but their drm_sched_entity info is gone once they get released, so account for it in the ctx_mgr. Signed-off-by: Erico Nunes Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20230312233052.21095-2-nunes.erico@gmail.com commit c5647cae2704e58d1c4e5fedbf63f11bca6376c9 Author: Harshit Mogalapalli Date: Mon Mar 13 22:27:11 2023 -0700 drm/lima/lima_drv: Add missing unwind goto in lima_pdev_probe() Smatch reports: drivers/gpu/drm/lima/lima_drv.c:396 lima_pdev_probe() warn: missing unwind goto? Store return value in err and goto 'err_out0' which has lima_sched_slab_fini() before returning. Fixes: a1d2a6339961 ("drm/lima: driver for ARM Mali4xx GPUs") Signed-off-by: Harshit Mogalapalli Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20230314052711.4061652-1-harshit.m.mogalapalli@oracle.com commit 43ba3d4af7a73ae958207caada6af0612d67f08e Author: Greg Kroah-Hartman Date: Fri Mar 31 18:47:24 2023 +0200 pktcdvd: simplify the class_pktcdvd logic There is no need to dynamically create and destroy the class_pktcdvd structure, just make it static and remove the memory allocation logic which simplifies and cleans up the logic a lot. Cc: linux-block@vger.kernel.org Cc: Jens Axboe Link: https://lore.kernel.org/r/20230331164724.319703-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit fdefcbdd6f3618410a0afb2ac0071c04036f9602 Author: Javier Martinez Canillas Date: Sat Apr 1 22:45:09 2023 -0700 Input: Add KUnit tests for some of the input core helper functions The input subsystem doesn't currently have any unit tests, let's add a CONFIG_INPUT_KUNIT_TEST option that builds a test suite to be executed with the KUnit test infrastructure. For now, only three tests were added for some of the input core helper functions that are trivial to test: * input_test_polling: set/get poll interval and set-up a poll handler. * input_test_timestamp: set/get input event timestamps. * input_test_match_device_id: match a device by bus, vendor, product, version and events capable of handling. But having the minimal KUnit support allows to add more tests and suites as follow-up changes. The tests can be run with the following command: $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/input/tests/ Signed-off-by: Javier Martinez Canillas Tested-by: Enric Balletbo i Serra config: powerpc-allnoconfig (https://download.01.org/0day-ci/archive/20230330/202303301815.kRKFM3NH-lkp@intel.com/config) Link: https://lore.kernel.org/r/20230330081831.2291351-1-javierm@redhat.com Signed-off-by: Dmitry Torokhov commit 57d94d150d17754ae1b4e87e9a883155cbb3ab05 Author: Hans de Goede Date: Sat Apr 1 14:21:43 2023 -0700 Input: add a new Novatek NVT-ts driver Add a new driver for the Novatek i2c touchscreen controller as found on the Acer Iconia One 7 B1-750 tablet. Unfortunately the touchscreen controller model-number is unknown. Even with the tablet opened up it is impossible to read the model-number. Android calls this a "NVT-ts" touchscreen, but that may apply to other Novatek controller models too. This appears to be the same controller as the one supported by https://github.com/advx9600/android/blob/master/touchscreen/NVTtouch_Android4.0/NVTtouch.c but unfortunately that does not give us a model-number either. Signed-off-by: Hans de Goede Reviewed-by: Jeff LaBundy Link: https://lore.kernel.org/r/20230326212308.55730-1-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit db7220c48d8d71476f881a7ae1285e1df4105409 Author: Vicki Pfau Date: Fri Mar 24 10:42:27 2023 -0700 Input: xpad - fix support for some third-party controllers Some third-party controllers, such as the HORPIAD FPS for Nintendo Switch and Gamesir-G3w, require a specific packet that the first-party XInput driver sends before it will start sending reports. It's not currently known what this packet does, but since the first-party driver always sends it's unlikely that this could cause issues with existing controllers. Co-authored-by: Andrey Smirnov Signed-off-by: Vicki Pfau Link: https://lore.kernel.org/r/20230324040446.3487725-3-vi@endrift.com Signed-off-by: Dmitry Torokhov commit 8fb1bcd0baffd42fc44e6fb6f0633914cd48ec8d Author: Pierre-Loup A. Griffais Date: Fri Mar 24 10:40:39 2023 -0700 Input: xpad - treat Qanba controllers as Xbox360 controllers They act that way in PC mode. Reviewed-by: Lyude Paul Signed-off-by: Pierre-Loup A. Griffais Signed-off-by: Vicki Pfau Link: https://lore.kernel.org/r/20230324040446.3487725-2-vi@endrift.com Signed-off-by: Dmitry Torokhov commit 0d11f3cf279c5ad20a41f29242f170ba3c02f2da Author: Christoph Böhmwalder Date: Thu Mar 30 12:27:44 2023 +0200 drbd: Pass a peer device to the resync and online verify functions Originally-from: Andreas Grünbacher Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20230330102744.2128122-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit ad878a0d8815a291a1cbb2dc8279dc2910c999cc Author: Christoph Böhmwalder Date: Thu Mar 30 12:27:43 2023 +0200 drbd: pass drbd_peer_device to __req_mod In preparation to support multiple connections, we need to know which one we need to modify the request state for. Originally-from: Lars Ellenberg Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20230330102744.2128122-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit db445db1cde540f819265dcae2d916a35616bda0 Author: Christoph Böhmwalder Date: Thu Mar 30 12:27:42 2023 +0200 drbd: drbd_uuid_compare: pass a peer_device Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20230330102744.2128122-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit 5e54c2a6010bc88e33a5a66aa16c95fa5d017065 Author: Andreas Gruenbacher Date: Thu Mar 30 12:27:41 2023 +0200 drbd: INFO_bm_xfer_stats(): Pass a peer device argument Signed-off-by: Andreas Gruenbacher Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20230330102744.2128122-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit 8164dd6c8ae158ec0740bf37f0f14645a1fb5355 Author: Andreas Gruenbacher Date: Thu Mar 30 12:27:40 2023 +0200 drbd: Add peer device parameter to whole-bitmap I/O handlers Pass a peer device parameter through the bitmap I/O functions to the I/O handlers. In after_state_ch(), set that parameter when queuing the drbd_send_bitmap operation so that this operation knows where to send the bitmap. Signed-off-by: Andreas Gruenbacher Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20230330102744.2128122-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit 33f7d31673eb43298b25b0cca30acc487e8a332a Author: Andreas Gruenbacher Date: Thu Mar 30 12:27:39 2023 +0200 drbd: Rip out the ERR_IF_CNT_IS_NEGATIVE macro Signed-off-by: Andreas Gruenbacher Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20230330102744.2128122-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit 15ce79bd9daf956f2840959f81f8c97dce9d87c2 Author: Christoph Böhmwalder Date: Thu Mar 30 12:27:38 2023 +0200 genetlink: make _genl_cmd_to_str static Primarily to silence warnings like: warning: no previous prototype for 'xxx_genl_cmd_to_str' [-Wmissing-prototypes] Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20230330102744.2128122-2-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe commit acc3c8799b9723d0b6a8cd67f8036dfdaa280825 Author: Chaitanya Kulkarni Date: Thu Mar 30 11:49:26 2023 -0700 null_blk: use kmap_local_page() and kunmap_local() Replace the deprecated API kmap_atomic() and kunmap_atomic() with kmap_local_page() and kunmap_local() in null_flush_cache_page(). Signed-off-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20230330184926.64209-2-kch@nvidia.com Signed-off-by: Jens Axboe commit fbb5615f9f812acb660b8bd7b51e57ddbdbc7315 Author: Chaitanya Kulkarni Date: Thu Mar 30 11:49:25 2023 -0700 null_blk: use non-deprecated lib functions Use library helper memcpy_page() to copy source page into destination instead of having duplicate code in copy_to_nullb() & copy_from_nullb(). In copy_from_nullb() also replace the memset call with zero_user(). Use library helper memset_page() to set the buffer to 0xFF instead of having duplicate code. This also removes deprecated API kmap_atomic() from copy_to_nullb() copy_from_nullb() and nullb_fill_pattern(), from :include/linux/highmem.h: "kmap_atomic - Atomically map a page for temporary usage - Deprecated!" Signed-off-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20230330184926.64209-2-kch@nvidia.com Signed-off-by: Jens Axboe commit 5b85575ad4280171c382e888b006cb8d12c35bde Author: Anton Protopopov Date: Sat Apr 1 20:06:02 2023 +0000 bpf: optimize hashmap lookups when key_size is divisible by 4 The BPF hashmap uses the jhash() hash function. There is an optimized version of this hash function which may be used if hash size is a multiple of 4. Apply this optimization to the hashmap in a similar way as it is done in the bloom filter map. On practice the optimization is only noticeable for smaller key sizes, which, however, is sufficient for many applications. An example is listed in the following table of measurements (a hashmap of 65536 elements was used): -------------------------------------------------------------------- | key_size | fullness | lookups /sec | lookups (opt) /sec | gain | -------------------------------------------------------------------- | 4 | 25% | 42.990M | 46.000M | 7.0% | | 4 | 50% | 37.910M | 39.094M | 3.1% | | 4 | 75% | 34.486M | 36.124M | 4.7% | | 4 | 100% | 31.760M | 32.719M | 3.0% | -------------------------------------------------------------------- | 8 | 25% | 43.855M | 49.626M | 13.2% | | 8 | 50% | 38.328M | 42.152M | 10.0% | | 8 | 75% | 34.483M | 38.088M | 10.5% | | 8 | 100% | 31.306M | 34.686M | 10.8% | -------------------------------------------------------------------- | 12 | 25% | 38.398M | 43.770M | 14.0% | | 12 | 50% | 33.336M | 37.712M | 13.1% | | 12 | 75% | 29.917M | 34.440M | 15.1% | | 12 | 100% | 27.322M | 30.480M | 11.6% | -------------------------------------------------------------------- | 16 | 25% | 41.491M | 41.921M | 1.0% | | 16 | 50% | 36.206M | 36.474M | 0.7% | | 16 | 75% | 32.529M | 33.027M | 1.5% | | 16 | 100% | 29.581M | 30.325M | 2.5% | -------------------------------------------------------------------- | 20 | 25% | 34.240M | 36.787M | 7.4% | | 20 | 50% | 30.328M | 32.663M | 7.7% | | 20 | 75% | 27.536M | 29.354M | 6.6% | | 20 | 100% | 24.847M | 26.505M | 6.7% | -------------------------------------------------------------------- | 24 | 25% | 36.329M | 40.608M | 11.8% | | 24 | 50% | 31.444M | 35.059M | 11.5% | | 24 | 75% | 28.426M | 31.452M | 10.6% | | 24 | 100% | 26.278M | 28.741M | 9.4% | -------------------------------------------------------------------- | 28 | 25% | 31.540M | 31.944M | 1.3% | | 28 | 50% | 27.739M | 28.063M | 1.2% | | 28 | 75% | 24.993M | 25.814M | 3.3% | | 28 | 100% | 23.513M | 23.500M | -0.1% | -------------------------------------------------------------------- | 32 | 25% | 32.116M | 33.953M | 5.7% | | 32 | 50% | 28.879M | 29.859M | 3.4% | | 32 | 75% | 26.227M | 26.948M | 2.7% | | 32 | 100% | 23.829M | 24.613M | 3.3% | -------------------------------------------------------------------- | 64 | 25% | 22.535M | 22.554M | 0.1% | | 64 | 50% | 20.471M | 20.675M | 1.0% | | 64 | 75% | 19.077M | 19.146M | 0.4% | | 64 | 100% | 17.710M | 18.131M | 2.4% | -------------------------------------------------------------------- The following script was used to gather the results (SMT & frequency off): cd tools/testing/selftests/bpf for key_size in 4 8 12 16 20 24 28 32 64; do for nr_entries in `seq 16384 16384 65536`; do fullness=$(printf '%3s' $((nr_entries*100/65536))) echo -n "key_size=$key_size: $fullness% full: " sudo ./bench -d2 -a bpf-hashmap-lookup --key_size=$key_size --nr_entries=$nr_entries --max_entries=65536 --nr_loops=2000000 --map_flags=0x40 | grep cpu done echo done Signed-off-by: Anton Protopopov Link: https://lore.kernel.org/r/20230401200602.3275-1-aspsk@isovalent.com Signed-off-by: Alexei Starovoitov commit ce38f3fc0f87a358a9560a3815265a94f1b38c37 Author: Hans de Goede Date: Sat Apr 1 17:06:51 2023 +0200 power: supply: axp288_charger: Use alt usb-id extcon on some x86 android tablets x86 ACPI boards which ship with only Android as their factory image may have pretty broken ACPI tables. This includes broken _AEI ACPI GPIO event handlers, which are normally used to listen to the micro-USB ID pin and: 1. Switch the USB-mux to the host / device USB controllers 2. Disable Vbus path before enabling the 5V boost (AXP reg 0x30 bit 7) 3. Turn 5V Vboost on / off On non broken systems where this is not done through an ACPI GPIO event handler, there is an ACPI INT3496 device describing the involved GPIOs which are handled by the extcon-intel-int3496 driver; and axp288-charger.ko listens to this extcon-device and disables the Vbus path when necessary. On x86 Android boards, with broken ACPI GPIO event handlers, these are disabled by acpi_quirk_skip_gpio_event_handlers() and an intel-int3496 extcon device is manually instantiated by x86-android-tablets.ko . Add support to the axp288-charger code for this setup, so that it properly disables the Vbus path when necessary. Note this uses acpi_quirk_skip_gpio_event_handlers() to identify these systems, to avoid the need to add a separate DMI match table for this. Signed-off-by: Hans de Goede Signed-off-by: Sebastian Reichel commit 9d6ff170b5ee56cf2817cbe91dd0e5e7f9d742dd Merge: 7cc7478e09378 e8d018dd0257f Author: Sebastian Reichel Date: Sat Apr 1 22:59:10 2023 +0200 Merge tag 'v6.3-rc3' Merge v6.3-rc3, so that 'acpi_quirk_skip_gpio_event_handlers' is available, which is needed for adding x86 android tablet support in axp288_charger. Signed-off-by: Sebastian Reichel commit 0c492be4002b7411a1587b429e68e0cf3f562488 Author: Daniel Lezcano Date: Tue Mar 7 14:37:30 2023 +0100 thermal/drivers/ti: Use fixed update interval Currently the TI thermal driver sets the sensor update interval based on the polling of the thermal zone. In order to get the polling rate, the code inspects the thermal zone device structure internals, thus breaking the self-encapsulation of the thermal framework core framework. On the other side, we see the common polling rates set in the device tree for the platforms using this driver are 500 or 1000 ms. Setting the polling rate to 250 ms would be far enough to cover the combination we found in the device tree. Instead of accessing the thermal zone device structure polling rate, let's use a common update interval of 250 ms for the driver. Cc: Keerthy Signed-off-by: Daniel Lezcano Reviewed-by: Dhruva Gole Acked-by: Keerthy Link: https://lore.kernel.org/r/20230307133735.90772-7-daniel.lezcano@linaro.org commit 0fb6c6493fa240048e6afa2b810b45007129a4a0 Author: Daniel Lezcano Date: Tue Mar 7 14:37:29 2023 +0100 thermal/drivers/stm: Don't set no_hwmon to false The thermal->tzp->no_hwmon parameter is only used when calling thermal_zone_device_register(). Setting it to 'false' before calling thermal_add_hwmon_sysfs() has no effect. Remove the call and again prevent the drivers to access the thermal internals. Cc: Maxime Coquelin Cc: Alexandre Torgue Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230307133735.90772-6-daniel.lezcano@linaro.org commit 311526b7e38fb35ab6dcdec290babda3d2b4f8d3 Author: Daniel Lezcano Date: Tue Mar 7 14:37:28 2023 +0100 thermal/drivers/db8500: Use driver dev instead of tz->device The db8500 driver uses the thermal zone device instead of the device attached to it. In order to prevent the drivers to access the thermal zone device structure, replace the thermal zone device by the driver to show the debug message. Cc: Linus Walleij Signed-off-by: Daniel Lezcano Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20230307133735.90772-5-daniel.lezcano@linaro.org commit 32a7a02117de01199ce15ec121ac7af417c340eb Author: Daniel Lezcano Date: Tue Mar 7 14:37:25 2023 +0100 thermal/core: Relocate the traces definition in thermal directory The traces are exported but only local to the thermal core code. On the other side, the traces take the thermal zone device structure as argument, thus they have to rely on the exported thermal.h header file. As we want to move the structure to the private thermal core header, first we have to relocate those traces to the same place as many drivers do. Cc: Steven Rostedt Suggested-by: Steven Rostedt Signed-off-by: Daniel Lezcano Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20230307133735.90772-2-daniel.lezcano@linaro.org commit e45c9a2fc59da2d5f8004ce1e6894cd5d74788e3 Author: Yang Li Date: Wed Mar 8 14:27:19 2023 +0800 thermal/drivers/hisi: Use devm_platform_ioremap_resource() According to commit 7945f929f1a7 ("drivers: provide devm_platform_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to Use devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230308062719.79522-1-yang.lee@linux.alibaba.com Signed-off-by: Daniel Lezcano commit ed4b51b8fd0bebfb4181a44c6458d8e3c07989b2 Author: Daniel Lezcano Date: Thu Mar 9 10:28:21 2023 +0100 thermal/drivers/imx: Use the thermal framework for the trip point The thermal framework provides an API to get the trip related to a trip point id. We want to consolidate the generic trip points code, thus preventing the different drivers to deal with the trip points after they registered them. The set_trip_temp ops will be changed regarding the above changes but first we need to rework a bit the different implementation in the drivers. The goal is to prevent using the trip id but use a trip point passed as parameter which will contain all the needed information. As we don't have the trip point passed as parameter yet, we get the trip point using the generic trip thermal framewrok APIs and use it to take exactly the same decisions. The difference with this change and the previous code is from where we get the thermal trip point (which is the same). No functional change intended. Signed-off-by: Daniel Lezcano Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/20230309092821.1590586-2-daniel.lezcano@linaro.org Signed-off-by: Daniel Lezcano commit 53c9ce497dd79fb567214452f4cea5bb4c541b5e Author: Daniel Lezcano Date: Thu Mar 9 10:28:20 2023 +0100 thermal/drivers/imx: Remove get_trip_temp ops The i.MX thermal sensor uses the generic trip points. The thermal framework can return the critical temperature directly. Remove the pointless get_trip_temp ops. Signed-off-by: Daniel Lezcano Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/20230309092821.1590586-1-daniel.lezcano@linaro.org Signed-off-by: Daniel Lezcano commit 3f2f689559f77a47972dede0483b7b8f2ead2125 Author: Wolfram Sang Date: Tue Mar 7 17:30:34 2023 +0100 thermal/drivers/rcar_gen3_thermal: Remove R-Car H3 ES1.* handling R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20230307163041.3815-7-wsa+renesas@sang-engineering.com Signed-off-by: Daniel Lezcano commit 10debf8c2da8011c8009dd4b3f6d0ab85891c81b Author: Amjad Ouled-Ameur Date: Fri Jan 27 16:44:46 2023 +0100 thermal/drivers/mediatek: Add delay after thermal banks initialization Thermal sensor reads performed immediately after thermal bank initialization returns bogus values. This is currently tackled by returning 0 if the temperature is bogus (exceeding 200000). Instead, add a delay between the bank init and the thermal zone device register to properly fix this. Signed-off-by: Michael Kao Signed-off-by: Hsin-Yi Wang Signed-off-by: Amjad Ouled-Ameur Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221018-up-i350-thermal-bringup-v9-5-55a1ae14af74@baylibre.com Signed-off-by: Daniel Lezcano commit a033907e7b34505ab281b6207750f55c98c69156 Merge: 8585005823863 db9d479ab59b2 Author: Alexei Starovoitov Date: Sat Apr 1 09:07:21 2023 -0700 Merge branch 'Enable RCU semantics for task kptrs' David Vernet says: ==================== In commit 22df776a9a86 ("tasks: Extract rcu_users out of union"), the 'refcount_t rcu_users' field was extracted out of a union with the 'struct rcu_head rcu' field. This allows us to use the field for refcounting struct task_struct with RCU protection, as the RCU callback no longer flips rcu_users to be nonzero after the callback is scheduled. This patch set leverages this to do a few things: 1. Marks struct task_struct as RCU safe in the verifier, allowing referenced kptr tasks stored in maps to be accessed in an RCU read region without acquiring a reference (with just a NULL check). 2. Makes bpf_task_acquire() a KF_ACQUIRE | KF_RCU | KF_RET_NULL kfunc. 3. Removes bpf_task_kptr_get() and bpf_task_acquire_not_zero(), as they're now redundant with the above two changes. 4. Updates selftests and documentation accordingly. --- Changelog: v1: https://lore.kernel.org/all/20230331005733.406202-1-void@manifault.com/ v1 -> v2: - Remove testcases validating nested trust inheritance. The first version used 'struct task_struct __rcu *parent', but because that field has the __rcu tag it functions differently on gcc and llvm and causes gcc selftests to fail. Alexei is reworking nested trust, anyways so let's leave it off for now (Alexei). ==================== Signed-off-by: Alexei Starovoitov commit db9d479ab59b21d719486e6bf673f83f129dae32 Author: David Vernet Date: Fri Mar 31 14:57:33 2023 -0500 bpf,docs: Update documentation to reflect new task kfuncs Now that struct task_struct objects are RCU safe, and bpf_task_acquire() can return NULL, we should update the BPF task kfunc documentation to reflect the current state of the API. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230331195733.699708-4-void@manifault.com Signed-off-by: Alexei Starovoitov commit f85671c6ef46d490a90dac719e0c0e0adbacfd9b Author: David Vernet Date: Fri Mar 31 14:57:32 2023 -0500 bpf: Remove now-defunct task kfuncs In commit 22df776a9a86 ("tasks: Extract rcu_users out of union"), the 'refcount_t rcu_users' field was extracted out of a union with the 'struct rcu_head rcu' field. This allows us to safely perform a refcount_inc_not_zero() on task->rcu_users when acquiring a reference on a task struct. A prior patch leveraged this by making struct task_struct an RCU-protected object in the verifier, and by bpf_task_acquire() to use the task->rcu_users field for synchronization. Now that we can use RCU to protect tasks, we no longer need bpf_task_kptr_get(), or bpf_task_acquire_not_zero(). bpf_task_kptr_get() is truly completely unnecessary, as we can just use RCU to get the object. bpf_task_acquire_not_zero() is now equivalent to bpf_task_acquire(). In addition to these changes, this patch also updates the associated selftests to no longer use these kfuncs. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230331195733.699708-3-void@manifault.com Signed-off-by: Alexei Starovoitov commit d02c48fa113953aba0b330ec6c35f50c7d1d7986 Author: David Vernet Date: Fri Mar 31 14:57:31 2023 -0500 bpf: Make struct task_struct an RCU-safe type struct task_struct objects are a bit interesting in terms of how their lifetime is protected by refcounts. task structs have two refcount fields: 1. refcount_t usage: Protects the memory backing the task struct. When this refcount drops to 0, the task is immediately freed, without waiting for an RCU grace period to elapse. This is the field that most callers in the kernel currently use to ensure that a task remains valid while it's being referenced, and is what's currently tracked with bpf_task_acquire() and bpf_task_release(). 2. refcount_t rcu_users: A refcount field which, when it drops to 0, schedules an RCU callback that drops a reference held on the 'usage' field above (which is acquired when the task is first created). This field therefore provides a form of RCU protection on the task by ensuring that at least one 'usage' refcount will be held until an RCU grace period has elapsed. The qualifier "a form of" is important here, as a task can remain valid after task->rcu_users has dropped to 0 and the subsequent RCU gp has elapsed. In terms of BPF, we want to use task->rcu_users to protect tasks that function as referenced kptrs, and to allow tasks stored as referenced kptrs in maps to be accessed with RCU protection. Let's first determine whether we can safely use task->rcu_users to protect tasks stored in maps. All of the bpf_task* kfuncs can only be called from tracepoint, struct_ops, or BPF_PROG_TYPE_SCHED_CLS, program types. For tracepoint and struct_ops programs, the struct task_struct passed to a program handler will always be trusted, so it will always be safe to call bpf_task_acquire() with any task passed to a program. Note, however, that we must update bpf_task_acquire() to be KF_RET_NULL, as it is possible that the task has exited by the time the program is invoked, even if the pointer is still currently valid because the main kernel holds a task->usage refcount. For BPF_PROG_TYPE_SCHED_CLS, tasks should never be passed as an argument to the any program handlers, so it should not be relevant. The second question is whether it's safe to use RCU to access a task that was acquired with bpf_task_acquire(), and stored in a map. Because bpf_task_acquire() now uses task->rcu_users, it follows that if the task is present in the map, that it must have had at least one task->rcu_users refcount by the time the current RCU cs was started. Therefore, it's safe to access that task until the end of the current RCU cs. With all that said, this patch makes struct task_struct is an RCU-protected object. In doing so, we also change bpf_task_acquire() to be KF_ACQUIRE | KF_RCU | KF_RET_NULL, and adjust any selftests as necessary. A subsequent patch will remove bpf_task_kptr_get(), and bpf_task_acquire_not_zero() respectively. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230331195733.699708-2-void@manifault.com Signed-off-by: Alexei Starovoitov commit 8585005823863230afe37e5794ecd992ffc5f34d Merge: 9af0f555ae4ad ebf390c9d0136 Author: Alexei Starovoitov Date: Sat Apr 1 09:05:57 2023 -0700 Merge branch 'Prepare veristat for packaging' Andrii Nakryiko says: ==================== This patch set relicenses veristat.c to dual GPL-2.0/BSD-2 license and prepares it to be mirrored to Github at libbpf/veristat repo. Few small issues in the source code are fixed, found during Github sync preparetion. v2->v3: - fix few warnings about uninitialized variable uses; v1->v2: - drop linux/compiler.h and define own ARRAY_SIZE macro; ==================== Signed-off-by: Alexei Starovoitov commit ebf390c9d0136e01f327439c012ab5741971e72d Author: Andrii Nakryiko Date: Fri Mar 31 15:24:05 2023 -0700 veristat: small fixed found in -O2 mode Fix few potentially unitialized variables uses, found while building veristat.c in release (-O2) mode. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230331222405.3468634-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit e3b65c0c1a5b8ed06818b7eeb0c44165ea817d52 Author: Andrii Nakryiko Date: Fri Mar 31 15:24:04 2023 -0700 veristat: avoid using kernel-internal headers Drop linux/compiler.h include, which seems to be needed for ARRAY_SIZE macro only. Redefine own version of ARRAY_SIZE instead. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230331222405.3468634-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 71c8c39f517787af19d9f35fe60463f7eec914e1 Author: Andrii Nakryiko Date: Fri Mar 31 15:24:03 2023 -0700 veristat: improve version reporting For packaging version of the tool is important, so add a simple way to specify veristat version for upstream mirror at Github. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230331222405.3468634-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 3ed85ae80283885ef8491d07cdcd7124328bed35 Author: Andrii Nakryiko Date: Fri Mar 31 15:24:02 2023 -0700 veristat: relicense veristat.c as dual GPL-2.0-only or BSD-2-Clause licensed Dual-license veristat.c to dual GPL-2.0-only or BSD-2-Clause license. This is needed to mirror it to Github to make it convenient for distro packagers to package veristat as a separate package. Veristat grew into a useful tool by itself, and there are already a bunch of users relying on veristat as generic BPF loading and verification helper tool. So making it easy to packagers by providing Github mirror just like we do for bpftool and libbpf is the next step to get veristat into the hands of users. Apart from few typo fixes, I'm the sole contributor to veristat.c so far, so no extra Acks should be needed for relicensing. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230331222405.3468634-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit e088d80e2a1e72646c4be64edcbd58ac71b96251 Author: Nick Alcock Date: Fri Feb 17 14:10:58 2023 +0000 EDAC/altera: Remove MODULE_LICENSE in non-module Since 8b41fc4454e3 ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. altera_edac is not a module for a while now, remove the macro call. Suggested-by: Luis Chamberlain Signed-off-by: Nick Alcock Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230217141059.392471-24-nick.alcock@oracle.com commit f326ea63ecc683b3dc88d8ee4f598598d4ed3b39 Author: Greg Kroah-Hartman Date: Sat Apr 1 12:09:26 2023 +0200 driver core: class: fix slab-use-after-free Read in class_register() Syzbot found that we had forgotten to unregister the lock_class_key when using it in commit dcfbb67e48a2 ("driver core: class: use lock_class_key already present in struct subsys_private") so fix that up and correctly release it when done. Cc: "Rafael J. Wysocki" Reported-and-tested-by: Fixes: dcfbb67e48a2 ("driver core: class: use lock_class_key already present in struct subsys_private") Link: https://lore.kernel.org/r/2023040126-blandness-duckling-bd55@gregkh Signed-off-by: Greg Kroah-Hartman commit 1aff44abf68a8000fcb3502fc2b704f20de4535f Author: Rob Herring Date: Mon Mar 27 13:28:16 2023 -0500 openrisc: Use common of_get_cpu_node() instead of open-coding The common of_get_cpu_node() is equivalent to setup_find_cpu_node(), so use it instead. Signed-off-by: Rob Herring Signed-off-by: Stafford Horne commit d74aab2ca19842d16815a97d4dd605deaae73c69 Merge: 54fd494af9d40 503d473c983bf Author: Jakub Kicinski Date: Fri Mar 31 21:41:11 2023 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-03-30 (documentation, ice) This series contains updates to driver documentation and the ice driver. Tony removes links and addresses related to the out-of-tree driver from the Intel ethernet driver documentation. Jake removes a comment that is no longer valid to the ice driver. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: remove comment about not supporting driver reinit Documentation/eth/intel: Remove references to SourceForge Documentation/eth/intel: Update address for driver support ==================== Link: https://lore.kernel.org/r/20230330165935.2503604-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit f467b865cf5b25aac3feee3fb5e25b90f5df35c4 Merge: 882f4adac9a84 d684a7a26f7d2 Author: Martin K. Petersen Date: Fri Mar 31 21:45:14 2023 -0400 Merge branch '6.3/scsi-fixes' into 6.4/scsi-staging Pull in the fixes branch to resolve an mpi3mr conflict reported by sfr. Signed-off-by: Martin K. Petersen commit 69d170c4c28ba0490bd42630cc09d7e1834bbb3d Author: Rob Herring Date: Fri Mar 31 13:21:18 2023 -0500 dt-bindings: memory-controller: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230331182119.1899919-1-robh@kernel.org Signed-off-by: Krzysztof Kozlowski commit 175caafa787a4f0657850513ab3866f560c94aac Author: Krzysztof Kozlowski Date: Sun Mar 26 22:42:24 2023 +0200 dt-bindings: display: sitronix,st7701: document port and rotation Panels are supposed to have one port (defined in panel-common.yaml binding) and can have also rotation: rk3326-odroid-go3.dtb: panel@0: 'port', 'rotation' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Reviewed-by: Jagan Teki Link: https://lore.kernel.org/r/20230326204224.80181-4-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 9eef9c216e71adc1ed8f8e815de6e2d19939e965 Author: Krzysztof Kozlowski Date: Sun Mar 26 22:42:23 2023 +0200 dt-bindings: display: elida,kd35t133: document port and rotation Panels are supposed to have one port (defined in panel-common.yaml binding) and can have also rotation: rk3326-odroid-go2.dtb: panel@0: 'port', 'rotation' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Reviewed-by: Jagan Teki Link: https://lore.kernel.org/r/20230326204224.80181-3-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 6ffbfa280851320bdd5d4ccdae97421dd1c8510c Author: Krzysztof Kozlowski Date: Sun Mar 26 22:42:22 2023 +0200 dt-bindings: display: feiyang,fy07024di26a30d: document port Panels are supposed to have one port (defined in panel-common.yaml binding): rk3399-rockpro64.dtb: panel@0: 'port' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Jagan Teki Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230326204224.80181-2-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 52fb6663a8df16bcf6a68aa98cece0a13ab4c804 Author: Krzysztof Kozlowski Date: Sun Mar 26 22:42:21 2023 +0200 dt-bindings: display: xinpeng,xpp055c272: document port Panels are supposed to have one port (defined in panel-common.yaml binding): px30-evb.dtb: panel@0: 'port' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Jagan Teki Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230326204224.80181-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 65fda4b226d2886f6479d2282b097143bfb5fd63 Author: Krzysztof Kozlowski Date: Sun Mar 26 18:47:00 2023 +0200 dt-bindings: display: sitronix,st7789v: document dc-gpios The device comes with DCX pin which is already used in canaan/sipeed_maixduino.dts (although not in Linux driver). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230326164700.104570-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 0d2f2cefba64729a0730ce183ad58cf3e7929b94 Author: Garmin.Chang Date: Fri Mar 31 20:36:21 2023 +0800 clk: mediatek: Add MT8188 adsp clock support Add MT8188 adsp clock controller which provides clock gate control for Audio DSP. Signed-off-by: Garmin.Chang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-20-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit 1b5e5299dd35da0dff2d454826a60870237837da Author: Garmin.Chang Date: Fri Mar 31 20:36:20 2023 +0800 clk: mediatek: Add MT8188 imp i2c wrapper clock support Add MT8188 imp i2c wrapper clock controllers which provide clock gate control in I2C IP blocks. Signed-off-by: Garmin.Chang Reviewed-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-19-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit f42b9e9a43e300ef94c3dc0381cc60f50e46e1fe Author: Garmin.Chang Date: Fri Mar 31 20:36:19 2023 +0800 clk: mediatek: Add MT8188 wpesys clock support Add MT8188 wpesys clock controllers which provide clock gate control in Wrapping Engine. Signed-off-by: Garmin.Chang Reviewed-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-18-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit 4898e77f47e5b028a72c711c97841d74608e61ed Author: Garmin.Chang Date: Fri Mar 31 20:36:18 2023 +0800 clk: mediatek: Add MT8188 vppsys1 clock support Add MT8188 vppsys1 clock controller which provides clock gate controller for Video Processor Pipe. Signed-off-by: Garmin.Chang Reviewed-by: Matthias Brugger Reviewed-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-17-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit eb48cccda09597a309d66331744e1b8edf196a67 Author: Garmin.Chang Date: Fri Mar 31 20:36:17 2023 +0800 clk: mediatek: Add MT8188 vppsys0 clock support Add MT8188 vppsys0 clock controller which provides clock gate controller for Video Processor Pipe. Signed-off-by: Garmin.Chang Reviewed-by: Matthias Brugger Reviewed-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-16-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit bb87c1109ce2f4c947b5b92a1f82ec75f8f969f8 Author: Garmin.Chang Date: Fri Mar 31 20:36:16 2023 +0800 clk: mediatek: Add MT8188 vencsys clock support Add MT8188 vencsys clock controllers which provide clock gate control for video encoder. Signed-off-by: Garmin.Chang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-15-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit cfa4609f9bbedcbd80e387bc880c2e1cf6b45fe0 Author: Garmin.Chang Date: Fri Mar 31 20:36:15 2023 +0800 clk: mediatek: Add MT8188 vdosys1 clock support Add MT8188 vdosys1 clock controller which provides clock gate control in video system. This is integrated with mtk-mmsys driver which will populate device by platform_device_register_data to start vdosys clock driver. Signed-off-by: Garmin.Chang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-14-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit e4aaa60eae166f5085a4b9e3c4ad3b698120a486 Author: Garmin.Chang Date: Fri Mar 31 20:36:14 2023 +0800 clk: mediatek: Add MT8188 vdosys0 clock support Add MT8188 vdosys0 clock controller which provides clock gate control in video system. This is integrated with mtk-mmsys driver which will populate device by platform_device_register_data to start vdosys clock driver. Signed-off-by: Garmin.Chang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-13-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit 72753163899d78b4f693c5f6eb35c0706c3f0968 Author: Garmin.Chang Date: Fri Mar 31 20:36:13 2023 +0800 clk: mediatek: Add MT8188 vdecsys clock support Add MT8188 vdec clock controllers which provide clock gate control for video decoder. Signed-off-by: Garmin.Chang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-12-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit 3e26f30fe42d76d0163416e4ea198901fa02fc19 Author: Garmin.Chang Date: Fri Mar 31 20:36:12 2023 +0800 clk: mediatek: Add MT8188 mfgcfg clock support Add MT8188 mfg clock controller which provides clock gate control for GPU. Signed-off-by: Garmin.Chang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-11-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit 49c9abe1c89203d69875a5c90bc52bf308fab5b4 Author: Garmin.Chang Date: Fri Mar 31 20:36:11 2023 +0800 clk: mediatek: Add MT8188 ipesys clock support Add MT8188 ipesys clock controller which provides clock gate control for Image Process Engine. Signed-off-by: Garmin.Chang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-10-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit b281039a7b4939c62196fd2c690a9a13a093ed2e Author: Garmin.Chang Date: Fri Mar 31 20:36:10 2023 +0800 clk: mediatek: Add MT8188 imgsys clock support Add MT8188 imgsys clock controllers which provide clock gate control for image IP blocks. Signed-off-by: Garmin.Chang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-9-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit 87d06fa9d21e6e38c41132c5f546531f6b755f8d Author: Garmin.Chang Date: Fri Mar 31 20:36:09 2023 +0800 clk: mediatek: Add MT8188 ccusys clock support Add MT8188 ccusys clock controller which provides clock gate control in Camera Computing Unit. Signed-off-by: Garmin.Chang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-8-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit 9b42835684a5e8fd1f5bcf66050c3be194790aee Author: Garmin.Chang Date: Fri Mar 31 20:36:08 2023 +0800 clk: mediatek: Add MT8188 camsys clock support Add MT8188 camsys clock controllers which provide clock gate control for camera IP blocks. Signed-off-by: Garmin.Chang Reviewed-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-7-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit fce4c7a22861eb374eac86b7f3d0642878182df0 Author: Garmin.Chang Date: Fri Mar 31 20:36:07 2023 +0800 clk: mediatek: Add MT8188 infrastructure clock support Add MT8188 infrastructure clock controller which provides clock gate control for basic IP like pwm, uart, spi and so on. Signed-off-by: Garmin.Chang Reviewed-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-6-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit 643c06dc535be1501ce7e3092a1d3ad0da7296bb Author: Garmin.Chang Date: Fri Mar 31 20:36:06 2023 +0800 clk: mediatek: Add MT8188 peripheral clock support Add MT8188 peripheral clock controller which provides clock gate control for ethernet/flashif/pcie/ssusb. Signed-off-by: Garmin.Chang Reviewed-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-5-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit 6c0d1dc233ee7278f02eba0c49ed66209d885925 Author: Garmin.Chang Date: Fri Mar 31 20:36:05 2023 +0800 clk: mediatek: Add MT8188 topckgen clock support Add MT8188 topckgen clock controller which provides muxes, dividers to handle variety clock selection in other IP blocks. Signed-off-by: Garmin.Chang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-4-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit 28b2bc99fa76f9a8eaf22ee40fdc2a1e65fff81c Author: Garmin.Chang Date: Fri Mar 31 20:36:04 2023 +0800 clk: mediatek: Add MT8188 apmixedsys clock support Add MT8188 apmixedsys clock controller which provides Plls generated from SoC 26m and ssusb clock gate control. Signed-off-by: Garmin.Chang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230331123621.16167-3-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit 1086a5310f9c9421398cd12c00f605866aad24a5 Author: Garmin.Chang Date: Fri Mar 31 20:36:03 2023 +0800 dt-bindings: clock: mediatek: Add new MT8188 clock Add the new binding documentation for system clock and functional clock on MediaTek MT8188. Signed-off-by: Garmin.Chang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230331123621.16167-2-Garmin.Chang@mediatek.com Signed-off-by: Stephen Boyd commit 9af0f555ae4add25f0950753fb410c509aa71f50 Author: James Hilliard Date: Fri Mar 31 01:58:42 2023 -0600 selftests/bpf: Fix conflicts with built-in functions in bench_local_storage_create The fork function in gcc is considered a built in function due to being used by libgcov when building with gnu extensions. Rename fork to sched_process_fork to prevent this conflict. See details: https://github.com/gcc-mirror/gcc/commit/d1c38823924506d389ca58d02926ace21bdf82fa https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82457 Fixes the following error: In file included from progs/bench_local_storage_create.c:6: progs/bench_local_storage_create.c:43:14: error: conflicting types for built-in function 'fork'; expected 'int(void)' [-Werror=builtin-declaration-mismatch] 43 | int BPF_PROG(fork, struct task_struct *parent, struct task_struct *child) | ^~~~ Fixes: cbe9d93d58b1 ("selftests/bpf: Add bench for task storage creation") Signed-off-by: James Hilliard Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230331075848.1642814-1-james.hilliard1@gmail.com commit fa041c4d38fc309547fea525e970667fe91d6174 Author: Alexandre Mergnat Date: Thu Mar 9 15:23:04 2023 +0100 dt-bindings: soc: mediatek: add display mutex for MT8365 SoC Add compatible for the MT8365 SoC. Signed-off-by: Alexandre Mergnat Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230220-display-v1-15-45cbc68e188b@baylibre.com Signed-off-by: Matthias Brugger commit 54fd494af9d40393f7e60a26229d4d9fbf258c01 Merge: 99b3a769cd8ac 9b7c68b3911ae Author: Jakub Kicinski Date: Fri Mar 31 10:39:33 2023 -0700 Merge tag 'nf-next-2023-03-30' of https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Florian Westphal says: ==================== netfilter updates for net-next 1. No need to disable BH in nfnetlink proc handler, freeing happens via call_rcu. 2. Expose classid in nfetlink_queue, from Eric Sage. 3. Fix nfnetlink message description comments, from Matthieu De Beule. 4. Allow removal of offloaded connections via ctnetlink, from Paul Blakey. * tag 'nf-next-2023-03-30' of https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: netfilter: ctnetlink: Support offloaded conntrack entry deletion netfilter: Correct documentation errors in nf_tables.h netfilter: nfnetlink_queue: enable classid socket info retrieval netfilter: nfnetlink_log: remove rcu_bh usage ==================== Link: https://lore.kernel.org/r/20230331104809.2959-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit 99b3a769cd8ace9e2d38b3c41208a5a261510e70 Author: Peng Fan Date: Tue Mar 28 14:15:18 2023 +0800 dt-bindings: net: fec: add power-domains property Add optional power domains property Signed-off-by: Peng Fan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230328061518.1985981-1-peng.fan@oss.nxp.com Signed-off-by: Jakub Kicinski commit d4d8516624e1042d33011cf93b6e9c220a22c9f0 Merge: ae817e618d4b5 85b52122e5426 Author: Rafael J. Wysocki Date: Fri Mar 31 19:32:43 2023 +0200 Merge back Intel thermal driver changes for 6.4-rc1. commit 63899a73190c280644448b0115dc7a1dc0cdb8da Author: Konrad Dybcio Date: Fri Mar 31 03:14:50 2023 +0200 drm/msm/a6xx: Add support for A650 speed binning Add support for matching QFPROM fuse values to get the correct speed bin on A650 (SM8250) GPUs. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/530043/ Link: https://lore.kernel.org/r/20230331-topic-konahana_speedbin-v3-2-2dede22dd7f7@linaro.org Signed-off-by: Rob Clark commit 9a06cd9a0fd7e418545b0ee4ae208163d7708037 Author: Konrad Dybcio Date: Fri Mar 31 03:14:49 2023 +0200 drm/msm/a6xx: Add support for A640 speed binning Add support for matching QFPROM fuse values to get the correct speed bin on A640 (SM8150) GPUs. Reviewed-by: Akhil P Oommen Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/530042/ Link: https://lore.kernel.org/r/20230331-topic-konahana_speedbin-v3-1-2dede22dd7f7@linaro.org Signed-off-by: Rob Clark commit 0c7d069297a098af05f9ecc130c4d6f1973bfed7 Merge: 896c5150edfd5 86df7d19083c6 Author: Rafael J. Wysocki Date: Fri Mar 31 19:31:56 2023 +0200 Merge back thermal control material for 6.4-rc1. commit 9fdf791612866da2ae09930774fe5c8604962691 Merge: fd8c1a4aee973 7d12578c5d508 Author: Jason Gunthorpe Date: Fri Mar 31 13:43:57 2023 -0300 Merge branch 'vfio_mdev_ops' into iommufd.git for-next Yi Liu says =================== The .bind_iommufd op of vfio emulated devices are either empty or does nothing. This is different with the vfio physical devices, to add vfio device cdev, need to make them act the same. This series first makes the .bind_iommufd op of vfio emulated devices to create iommufd_access, this introduces a new iommufd API. Then let the driver that does not provide .bind_iommufd op to use the vfio emulated iommufd op set. This makes all vfio device drivers have consistent iommufd operations, which is good for adding new device uAPIs in the device cdev =================== * branch 'vfio_mdev_ops': vfio: Check the presence for iommufd callbacks in __vfio_register_dev() vfio/mdev: Uses the vfio emulated iommufd ops set in the mdev sample drivers vfio-iommufd: Make vfio_iommufd_emulated_bind() return iommufd_access ID vfio-iommufd: No need to record iommufd_ctx in vfio_device iommufd: Create access in vfio_iommufd_emulated_bind() iommu/iommufd: Pass iommufd_ctx pointer in iommufd_get_ioas() Signed-off-by: Jason Gunthorpe commit 7d12578c5d508050554bcd9ca3d2331914d86d71 Author: Yi Liu Date: Mon Mar 27 02:33:51 2023 -0700 vfio: Check the presence for iommufd callbacks in __vfio_register_dev() After making the no-DMA drivers (samples/vfio-mdev) providing iommufd callbacks, __vfio_register_dev() should check the presence of the iommufd callbacks if CONFIG_IOMMUFD is enabled. Link: https://lore.kernel.org/r/20230327093351.44505-7-yi.l.liu@intel.com Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Tested-by: Terrence Xu Tested-by: Nicolin Chen Signed-off-by: Yi Liu Acked-by: Alex Williamson Signed-off-by: Jason Gunthorpe commit 0a782d15e1d406e8074954405b1dc143a7645344 Author: Yi Liu Date: Mon Mar 27 02:33:50 2023 -0700 vfio/mdev: Uses the vfio emulated iommufd ops set in the mdev sample drivers This harmonizes the no-DMA devices (the vfio-mdev sample drivers) with the emulated devices (gvt-g, vfio-ap etc.). It makes it easier to add BIND_IOMMUFD user interface which requires to return an iommufd ID to represent the device/iommufd bond. Link: https://lore.kernel.org/r/20230327093351.44505-6-yi.l.liu@intel.com Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Tested-by: Terrence Xu Tested-by: Nicolin Chen Signed-off-by: Yi Liu Acked-by: Alex Williamson Signed-off-by: Jason Gunthorpe commit 632fda7f912c845f98ff20e69c600160a189d803 Author: Yi Liu Date: Mon Mar 27 02:33:49 2023 -0700 vfio-iommufd: Make vfio_iommufd_emulated_bind() return iommufd_access ID vfio device cdev needs to return iommufd_access ID to userspace if bind_iommufd succeeds. Link: https://lore.kernel.org/r/20230327093351.44505-5-yi.l.liu@intel.com Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Tested-by: Terrence Xu Tested-by: Nicolin Chen Signed-off-by: Yi Liu Acked-by: Alex Williamson Signed-off-by: Jason Gunthorpe commit 4508a533fce4db0004c1e8dd047c1e77046fc9c5 Author: Yi Liu Date: Mon Mar 27 02:33:48 2023 -0700 vfio-iommufd: No need to record iommufd_ctx in vfio_device iommufd_ctx is stored in vfio_device for emulated devices per bind_iommufd. However, as iommufd_access is created in bind, no more need to stored it since iommufd_access implicitly stores it. Link: https://lore.kernel.org/r/20230327093351.44505-4-yi.l.liu@intel.com Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Tested-by: Terrence Xu Tested-by: Nicolin Chen Signed-off-by: Yi Liu Acked-by: Alex Williamson Signed-off-by: Jason Gunthorpe commit 54b47585db6658a5eb898d4d45be18d1e581c1bf Author: Nicolin Chen Date: Mon Mar 27 02:33:47 2023 -0700 iommufd: Create access in vfio_iommufd_emulated_bind() There are needs to created iommufd_access prior to have an IOAS and set IOAS later. Like the vfio device cdev needs to have an iommufd object to represent the bond (iommufd_access) and IOAS replacement. Moves the iommufd_access_create() call into vfio_iommufd_emulated_bind(), making it symmetric with the __vfio_iommufd_access_destroy() call in the vfio_iommufd_emulated_unbind(). This means an access is created/destroyed by the bind()/unbind(), and the vfio_iommufd_emulated_attach_ioas() only updates the access->ioas pointer. Since vfio_iommufd_emulated_bind() does not provide ioas_id, drop it from the argument list of iommufd_access_create(). Instead, add a new access API iommufd_access_attach() to set the access->ioas pointer. Also, set vdev->iommufd_attached accordingly, similar to the physical pathway. Link: https://lore.kernel.org/r/20230327093351.44505-3-yi.l.liu@intel.com Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Tested-by: Terrence Xu Tested-by: Nicolin Chen Signed-off-by: Nicolin Chen Signed-off-by: Yi Liu Acked-by: Alex Williamson Signed-off-by: Jason Gunthorpe commit e941933c4944b34fb4c7713d8c247108cede10f3 Merge: 67efbd57bc6e5 dcc46f51d770b Author: Alexei Starovoitov Date: Fri Mar 31 09:40:16 2023 -0700 Merge branch 'selftests/bpf: Add read_build_id function' Jiri Olsa says: ==================== hi, this selftests cleanup was previously posted as part of file build id changes [1], which might take more time, so I'm sending the selftests changes separately so it won't get stuck. v4 changes: - added size argument to read_build_id [Andrii] - condition changes in parse_build_id_buf [Andrii] - use ELF_C_READ_MMAP in elf_begin [Andrii] - return -ENOENT in read_build_id if build id is not found [Andrii] - dropped elf class check [Andrii] thanks, jirka [1] https://lore.kernel.org/bpf/20230316170149.4106586-1-jolsa@kernel.org/ ==================== Signed-off-by: Alexei Starovoitov commit dcc46f51d770bde625e4845cac42e808b3302b62 Author: Jiri Olsa Date: Fri Mar 31 11:31:57 2023 +0200 selftests/bpf: Replace extract_build_id with read_build_id Replacing extract_build_id with read_build_id that parses out build id directly from elf without using readelf tool. Acked-by: Andrii Nakryiko Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20230331093157.1749137-4-jolsa@kernel.org Signed-off-by: Alexei Starovoitov commit 88dc8b3605b38a440fba45edcc53a6c7a98eee3b Author: Jiri Olsa Date: Fri Mar 31 11:31:56 2023 +0200 selftests/bpf: Add read_build_id function Adding read_build_id function that parses out build id from specified binary. It will replace extract_build_id and also be used in following changes. Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20230331093157.1749137-3-jolsa@kernel.org Signed-off-by: Alexei Starovoitov commit 328bafc9a373da5f268d82533dd8f2e66526d168 Author: Jiri Olsa Date: Fri Mar 31 11:31:55 2023 +0200 selftests/bpf: Add err.h header Moving error macros from profiler.inc.h to new err.h header. It will be used in following changes. Also adding PTR_ERR macro that will be used in following changes. Acked-by: Andrii Nakryiko Signed-off-by: Jiri Olsa Link: https://lore.kernel.org/r/20230331093157.1749137-2-jolsa@kernel.org Signed-off-by: Alexei Starovoitov commit 980c05616e5d554c46176fe08b5601801f2f8192 Author: Greg Kroah-Hartman Date: Fri Mar 31 11:33:18 2023 +0200 driver core: make sysfs_dev_char_kobj static Nothing outside of drivers/base/core.c uses sysfs_dev_char_kobj, so make it static and document what it is used for so we remember it the next time we touch it 15 years from now. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230331093318.82288-7-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 575ab414c90a317158db48475a88de42f37e0afa Author: Greg Kroah-Hartman Date: Fri Mar 31 11:33:17 2023 +0200 driver core: make sysfs_dev_block_kobj static Nothing outside of drivers/base/core.c uses sysfs_dev_block_kobj, so make it static and document what it is used for so we remember it the next time we touch it 15 years from now. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230331093318.82288-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit e78195d52981fc634a4e1e66610a316088bd7458 Author: Greg Kroah-Hartman Date: Fri Mar 31 11:33:16 2023 +0200 driver core: class: remove dev_kobj from struct class The dev_kobj field in struct class is now only written to, but never read from, so it can be removed as it is useless. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230331093318.82288-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit d6bdbbdfb0d45a92407b90209e377bf8c0ed49e9 Author: Greg Kroah-Hartman Date: Fri Mar 31 11:33:15 2023 +0200 driver core: clean up the logic to determine which /sys/dev/ directory to use When a dev_t is set in a struct device, an symlink in /sys/dev/ is created for it either under /sys/dev/block/ or /sys/dev/char/ depending on the device type. The logic to determine this would trigger off of the class of the object, and the kobj_type set in that location. But it turns out that this deep nesting isn't needed at all, as it's either a choice of block or "everything else" which is a char device. So make the logic a lot more simple and obvious, and remove the incorrect comments in the code that tried to document something that was not happening at all (it is impossible to set class->dev_kobj to NULL as the class core prevented that from happening. This removes the only place that class->dev_kobj was being used, so after this, it can be removed entirely. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230331093318.82288-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 2df418cf4b720fe3a0db4b4aab67be43d26af9dd Author: Greg Kroah-Hartman Date: Fri Mar 31 11:33:14 2023 +0200 driver core: class: remove subsystem private pointer from struct class Now that the last users of the subsystem private pointer in struct class are gone, the pointer can be removed, as no one is using it. One step closer to allowing struct class to be const and moved into read-only memory. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230331093318.82288-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 6f14c02220c791d5c46b0f965b9340c58f3d503d Author: Greg Kroah-Hartman Date: Fri Mar 31 11:33:13 2023 +0200 driver core: create class_is_registered() Some classes (i.e. gpio), want to know if they have been registered or not, and poke around in the class's internal structures to try to figure this out. Because this is not really a good idea, provide a function for classes to call to try to figure this out. Note, this is racy as the state of the class could change at any moment in time after the call is made, but as usually a class only wants to know if it has been registered yet or not, it should be fairly safe to use, and is just as safe as the previous "poke at the class internals" check was. Move the gpiolib code to use this function as proof that it works properly. Cc: Bartosz Golaszewski Cc: Sebastian Reichel Cc: Benjamin Tissoires Cc: linux-gpio@vger.kernel.org Reviewed-by: Linus Walleij Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230331093318.82288-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 57b4f760f94da13104cd596d5fb1643ae09c4d49 Author: Sadiya Kazi Date: Fri Mar 31 06:45:29 2023 +0000 list: test: Test the klist structure Add KUnit tests to the klist linked-list structure. These perform testing for different variations of node add and node delete in the klist data structure (). Limitation: Since we use a static global variable, and if multiple instances of this test are run concurrently, the test may fail. Signed-off-by: Sadiya Kazi Reviewed-by: Brendan Higgins Reviewed-by: David Gow Signed-off-by: Shuah Khan commit feae1bd80ec69a3a0011ba1fb88994785f705e3e Author: Tong Liu01 Date: Thu Mar 30 11:10:31 2023 +0800 drm/amd/pm: enable sysfs node vclk1 and dclk1 for NV3X Enable node pp_dpm_vclk1 and pp_dpm_dclk1 for gc11.0.2 and gc11.0.3 Signed-off-by: Tong Liu01 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 0b872f653915dcefebba845949f968c01d91bde5 Author: Tong Liu01 Date: Thu Mar 30 11:09:37 2023 +0800 drm/amd/pm: enable sysfs node vclk1 and dclk1 for NV2X Enable vclk1 and dclk1 node for gc10.3.0 and gc10.3.1 Signed-off-by: Tong Liu01 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit d7001e7285f933584788edefb7350dd5a09a7463 Author: Tong Liu01 Date: Thu Mar 30 11:07:08 2023 +0800 drm/amd/pm: add sysfs node vclk1 and dclk1 User can check pp_dpm_vclk1 and pp_dpm_dclk1 for DPM frequency of vcn and dcn Signed-off-by: Tong Liu01 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit fac7c51d62f3536a66e47f3da076803016cc355f Author: Caio Novais Date: Wed Mar 29 15:05:34 2023 -0300 drm/amd/display: Mark function 'optc3_wait_drr_doublebuffer_pending_clear' as static Compiling AMD GPU drivers displays a warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_optc.c:294:6: warning: no previous prototype for ‘optc3_wait_drr_doublebuffer_pending_clear’ [-Wmissing-prototypes] Get rid of it by marking the function as static Signed-off-by: Caio Novais Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit e5a6702e513627f6924c43ec9dddc526ef6dd145 Author: Amber Lin Date: Mon Dec 6 17:22:42 2021 +0800 drm/amdkfd: Set TG_CHUNK_SIZE for GC 9.4.3 On GC 9.4.3, DW 41 in MQD is repurposed as compute_tg_chunk_size for cooperative dispatch. When it's a AQL queue, set compute_tg_chunk_size as 1 to spread work groups evenly among XCCs. If it's PM4 queue, unset compute_tg_chunk_size to disable cooperative mode. v3: set compute_tg_chunk_size as 1 instead of #CUs per XCC v2: set compute_tg_chunk_size as #CUs per XCC instead of total wave slots per XCC Signed-off-by: Amber Lin Reviewed-by: Sean Keely Signed-off-by: Alex Deucher commit 1d44ff3d7a71d290d351bffab6160a26a966db7e Author: Jay Cornwall Date: Sat Jul 23 17:29:43 2022 +0800 drm/amdkfd: Trap handler changes for GC 9.4.3 v2 v1: Check new exception bits in TRAPSTS register Remove single step exception workaround, now part of exception bits v2: GC 9.4.3 uses ttmp11 to store {1’b0, dispatch index [24:0], wave_id_in_workgroup[5:0]}, so use ttmp13 instead of ttmp11 to preserve ib_sts. (Laurent) Signed-off-by: Jay Cornwall Signed-off-by: Laurent Morichetti Reviewed-by: Laurent Morichetti Signed-off-by: Alex Deucher commit 16b34622f7b18d017c59bd648415cfb64a842d96 Author: Caio Novais Date: Tue Mar 28 19:09:46 2023 -0300 drm/amd/display: Remove unused variable 'scl_enable' Compiling AMD GPU drivers displays a warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_rq_dlg_calc_314.c: In function ‘dml_rq_dlg_get_dlg_params’: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_rq_dlg_calc_314.c:991:14: warning: variable ‘scl_enable’ set but not used [-Wunused-but-set-variable] Get rid of it by removing the variable 'scl_enable'. Signed-off-by: Caio Novais Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit cebbfdd5f099a16d57d9221cec76882867839ad3 Author: Amber Lin Date: Wed Jun 9 12:36:35 2021 -0400 drm/amdkfd: Set noretry/xnack for GC 9.4.3 For GC 9.4.3, disable retry as default and XNACK can be different modes per process. Signed-off-by: Amber Lin Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3335a13535312c9fad4d8d1307a621e6617d6ed8 Author: Uwe Kleine-König Date: Mon Mar 27 18:07:54 2023 +0200 drm/amd/display: Whitespace cleanup Commit 075e2099c32c ("drm/amd/display: Fix race condition in DPIA AUX transfer") was backported to stable, which I noticed because of git saying linux-6.1/.git/rebase-apply/patch:37154: space before tab in indent. while applying patch-6.1.21. While fixing the code location that issued that warning, improve in few more places. Signed-off-by: Uwe Kleine-König Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 828d9a872cdfffa7c650b9cead166d33187cd942 Author: Hawking Zhang Date: Mon Dec 6 17:25:46 2021 +0800 drm/amdkfd: Add GC 9.4.3 KFD support Add initial KFD support Convert a few structures to IP version checking (Hawking) Signed-off-by: Elena Sakhnovitch Signed-off-by: Hawking Zhang Reviewed-by: Amber Lin Signed-off-by: Alex Deucher commit a2f00188137940432e898952fa61e45adaaa68ff Author: Aric Cyr Date: Mon Mar 20 01:26:59 2023 -0400 drm/amd/display: Promote DAL to 3.2.229 This DC version brings along: - Enable FPO optimization - Support for 6.75 GBps link rate - Fixes to underflow, black screen and more Acked-by: Qingqing Zhuo Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b0d58d1147b8b08241f4a0de018241dad804b1db Author: Alvin Lee Date: Fri Mar 17 17:56:39 2023 -0400 drm/amd/display: Uncomment assignments after HW headers are promoted [Description] Assign the correct info now that FW headers are promoted Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d3981ee76dda3370d2f51ac0c528dd4dfb45cb97 Author: Anthony Koo Date: Sat Mar 18 11:17:16 2023 -0400 drm/amd/display: [FW Promotion] Release 0.0.160.0 - New parameter to define extra vblank stretch required when doing FPO + Vactive - Pass in pipe index for FPO Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a1c9a1e27022d13c70a14c4faeab6ce293ad043b Author: Peichen Huang Date: Mon Mar 20 09:34:23 2023 +0800 drm/amd/display: skip CLEAR_PAYLOAD_ID_TABLE if device mst_en is 0 [Why] Some dock and mst monitor don't like to receive CLEAR_PAYLOAD_ID_TABLE when mst_en is set to 0. It doesn't make sense to do so in source side, either. [How] Don't send CLEAR_PAYLOAD_ID_TABLE if mst_en is 0 Reviewed-by: George Shen Acked-by: Qingqing Zhuo Signed-off-by: Peichen Huang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0cdf91bf67b782bf3548cb3cce8ab923a13ca6fe Author: Alvin Lee Date: Fri Mar 17 15:18:03 2023 -0400 drm/amd/display: Enable FPO optimization [Description] Enable optimization for preferring FPO if it achieves a lower voltage level Reviewed-by: George Shen Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cf31994d0b7c2489d0b83a53b510fdc1e4c731a9 Author: Alvin Lee Date: Fri Mar 17 14:08:55 2023 -0400 drm/amd/display: Only keep cursor p-state force for FPO [Description] If transitioning from an FPO config -> FPO config, we want to keep cursor P-State force disallowed. Any other transition from FPO config -> non FPO config should unforce the cursor P-State disallow Reviewed-by: Wesley Chalmers Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 53c8ed46e81636c39528aeb7c3db353a906ecee3 Author: Artem Grishin Date: Wed Mar 15 18:17:59 2023 -0400 drm/amd/display: Conditionally enable 6.75 GBps link rate [Why] The 6.75 GBps link rate is part of the new eDP specification version 1.5 is going to be supported in the future. Since this standard is very new and there are no existing 6.75 GBps panels on the market yet, we should put a condition in the driver on enabling this feature until we can validate it with real hardware. [How] - Add boolean flag support_eDP1_5 in struct dc_debug_options. - Enable the 6.75 link rate in reduce_link_rate(...) only when the flag is true. Reviewed-by: Charlene Liu Acked-by: Qingqing Zhuo Signed-off-by: Artem Grishin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a78d43738ead68a40acf7da8a873f47a9f6e6eb3 Author: Artem Grishin Date: Tue Mar 14 16:11:39 2023 -0400 drm/amd/display: Add support for 6.75 GBps link rate [Why] The latest eDP spec version 1.5 defines a new generic link rate of 6.75 Gbps/Lane, which needs to be supported in the driver. [How] Added new element to the dc_link_rate enum Reviewed-by: Charlene Liu Acked-by: Qingqing Zhuo Signed-off-by: Artem Grishin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 37403ced9f2873fab7f39ab4ac963bbb33fb0bc0 Author: Ayush Gupta Date: Thu Mar 16 15:57:30 2023 -0400 drm/amd/display: fixed dcn30+ underflow issue [Why] Observing underflow on dcn30+ system config at 4k144hz [How] We set the UCLK hardmax on AC/DC switch if softmax is enabled and also on boot. While booting up the UCLK Hardmax is set to softmax before the init sequence and the init sequence resets the hardmax to UCLK max which enables P-state switching. Just added a conditional check to avoid setting hardmax on init. Reviewed-by: Alvin Lee Reviewed-by: Martin Leung Acked-by: Qingqing Zhuo Signed-off-by: Ayush Gupta Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4ed793083afc2bbf22a7fb5993efccf3b5bcde25 Author: Alvin Lee Date: Wed Mar 15 17:40:49 2023 -0400 drm/amd/display: Use per pipe P-State force for FPO [Description] * Pass in pipe index for FPO cmd to DMCUB - This change will pass in the pipe index for each stream that is using FPO - This change is in preparation to enable FPO + VActive * Use per pipe P-State force for FPO - For FPO, instead of using max watermarks value for P-State disallow, use per pipe p-state force instead - This is in preparation to enable FPO + VActive Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e8e5cc645b2d6cfcff58d02743543eeb37e2795e Author: Qingqing Zhuo Date: Mon Mar 20 05:24:41 2023 -0400 drm/amd/display: Add infrastructure for enabling FAMS for DCN30 As part of the FAMS work, we need code infrastructure in DC. dcn30_fpu.c changes went missing during previous upstream activity. Reviewed-by: Rodrigo Siqueira Acked-by: Qingqing Zhuo Signed-off-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8ef23f9268fc4364fc79bd017c2ed6a6495133ec Author: Taimur Hassan Date: Tue Mar 14 17:39:03 2023 -0400 drm/amd/display: Add 90Mhz to video_optimized_pixel_rates [Why & How] Needed to get certain EDID to light up during TMDS compliance. Reviewed-by: Charlene Liu Acked-by: Qingqing Zhuo Signed-off-by: Taimur Hassan Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 79978cc76f050d6cf24880645519f54aa6843da3 Author: Dmytro Laktyushkin Date: Tue Mar 14 10:20:33 2023 -0400 drm/amd/display: w/a for dcn315 inconsistent smu clock table [Why & How] w/a for dcn315 inconsistent smu clock. Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7b1b3f5818c33da2ab78fe62d34ee7bacc93cef0 Author: Charlene Liu Date: Fri Mar 10 21:18:06 2023 -0500 drm/amd/display: update dig enable sequence [why] HW delta follow up Reviewed-by: Chris Park Reviewed-by: Jun Lei Reviewed-by: Jerry Zuo Acked-by: Qingqing Zhuo Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f5442b35e69e42015ef3082008c0d85cdcc0ca05 Author: Martin Leung Date: Tue Mar 14 09:27:20 2023 -0400 drm/amd/display: fix double memory allocation [Why & How] when trying to fix a nullptr dereference on VMs, accidentally doubly allocated memory for the non VM case. removed the extra link_srv creation since dc_construct_ctx is called in both VM and non VM cases Also added a proper fail check for if kzalloc fails Cc: stable@vger.kernel.org Cc: Mario Limonciello Reviewed-by: Leo Ma Acked-by: Qingqing Zhuo Signed-off-by: Martin Leung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bf224e00a9f54e2bf14b4d720a09c3d2f4aa4aa8 Author: Nicholas Kazlauskas Date: Mon Mar 13 13:23:45 2023 -0400 drm/amd/display: Fix 4to1 MPC black screen with DPP RCO [Why] DPP Root clock optimization when combined with 4to1 MPC combine results in the screen turning black. This is because the DPPCLK is stopped during the middle of an optimize_bandwidth sequence during commit_minimal_transition without going through plane power down/power up. [How] The intent of a 0Hz DPP clock through update_clocks is to disable the DTO. This differs from the behavior of stopping the DPPCLK entirely (utilizing a 0Hz clock on some ASIC) so it's better to move this logic to reside next to plane power up/power down where we gate the HUBP/DPP DOMAIN. The new sequence should be: Power down: PG enabled -> RCO on Power up: RCO off -> PG disabled Rename power_on_plane to power_on_plane_resources to reflect the actual operation that's occurring. Cc: stable@vger.kernel.org Cc: Mario Limonciello Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1991481828a84dcc5168f1e9b818311cbde86876 Author: Alvin Lee Date: Mon Mar 13 18:06:34 2023 -0400 drm/amd/display: Update FCLK change latency [Descrtipion] - Driver hardcoded FCLK P-State latency was incorrect - Use the value provided by PMFW header instead Reviewed-by: Nevenko Stupar Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ac18b610fd95762125cd6a7194cc7e2e3b94e3ed Author: Alvin Lee Date: Mon Mar 13 12:54:49 2023 -0400 drm/amd/display: Enable FPO for configs that could reduce vlevel [Description] - On high refresh rate DRR displays that support VBLANK naturally, UCLK could be idling at DPM1 instead of DPM0 since it doesn't use FPO - To achieve DPM0, enable FPO on these configs even though it can support P-State without FPO - Default disable for now, have debug option to enable Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d29fb7baab09b6a1dc484c9c67933253883e770a Author: Nicholas Kazlauskas Date: Sat Mar 11 09:11:29 2023 -0500 drm/amd/display: Add NULL plane_state check for cursor disable logic [Why] While scanning the top_pipe connections we can run into a case where the bottom pipe is still connected to a top_pipe but with a NULL plane_state. [How] Treat a NULL plane_state the same as the plane being invisible for pipe cursor disable logic. Cc: stable@vger.kernel.org Cc: Mario Limonciello Reviewed-by: Charlene Liu Acked-by: Qingqing Zhuo Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9c224e058dd9ae9b03602d6c86d44f0d11e21ba3 Author: Hawking Zhang Date: Tue Mar 28 18:47:39 2023 +0800 drm/amdgpu: Correct xgmi_wafl block name Fix backward compatibility issue to stay with the old name of xgmi_wafl node. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit f7f28f268b861c29dd18086bb636abedf0ff59ff Author: Tim Huang Date: Wed Mar 22 14:39:16 2023 +0800 drm/amd/pm: re-enable the gfx imu when smu resume If the gfx imu is poweroff when suspend, then it need to be re-enabled when resume. Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit d2cdc01451973235e2b83ea85493817705a48263 Author: Yifan Zha Date: Tue Mar 28 11:42:24 2023 +0800 drm/amdgpu: Add JPEG IP block to SRIOV reinit [Why] Reset(mode1) failed as JPRG IP did not reinit under sriov. [How] Add JPEG IP block to sriov reinit function. Signed-off-by: Yifan Zha Reviewed-by: Horace Chen Signed-off-by: Alex Deucher commit e86c30e951b50301fbc80e0ba7f6ffdc16e4fe85 Author: Srinivasan Shanmugam Date: Mon Mar 27 23:28:47 2023 +0530 drm/amd/amdgpu: Remove initialisation of globals to 0 or NULL Global variables do not need to be initialized to 0 or NULL and checkpatch flags this error in drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c: ERROR: do not initialise globals to NULL +char *amdgpu_disable_cu = NULL; +char *amdgpu_virtual_display = NULL; Fix this checkpatch error. Cc: Christian König Cc: Alex Deucher Cc: Mario Limonciello Cc: Hamza Mahfooz Signed-off-by: Srinivasan Shanmugam Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 69bacf1545206ddf5e1cdcfe868b78f33bb4ea5c Author: Hawking Zhang Date: Mon Oct 3 15:38:50 2022 -0400 drm/amdgpu: add GMC ip block for GC 9.4.3 Add GMC IP handling for GC 9.4.3 Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 018f7300d4f73522ae02868234b13c4b7c433fd9 Author: Le Ma Date: Wed Jul 14 16:04:39 2021 +0800 drm/amdgpu: initialize gfxhub v1_2 and mmhub v1_8 funcs Initialize gfxhub1.2 and mmhub1.8 function calls Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4d77b7e53410dd4b1fe3e1313c3982e682cadef1 Author: Le Ma Date: Wed Jul 14 15:48:28 2021 +0800 drm/amdgpu: add mmhub v1_8 support Hack the mmhub 1.7 reg offset for initial support v2: squash in header switch, CG funcs (Alex) Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8e7a49e09e5c19a3a9073894a9d41a7ea0a0981d Author: Hawking Zhang Date: Sun Apr 24 14:31:00 2022 +0800 drm/amdgpu: add mmhub v1_8_0 ip headers Add mmhub v1_8_0 register offset and shift masks header files v2: update headers (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 6d4496bcfe1c73d5c97b133c31c8f779b4acbac9 Author: Le Ma Date: Wed Jul 14 15:46:28 2021 +0800 drm/amdgpu: add gfxhub v1_2 support Hack the gc 9.0 reg offset for initial support v2: squash in header switch (Alex) Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ab1a157ea7e13a9cf93fa913f59a6bc2ffa6fa5a Author: Hawking Zhang Date: Thu Nov 25 22:15:49 2021 +0800 drm/amdgpu: add gmc ip block support for GC 9.4.3 Initialize various gmc sw/hw settings/configurations for GC 9.4.3. Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit b11e193093fb9dc9bb5a2468b81ba3a76f7871b3 Author: Hawking Zhang Date: Wed May 11 15:02:57 2022 +0800 drm/amdgpu: add gc v9_4_3 ip headers Add gc v9_4_3 register offset and shift masks header files v2: update headers (Alex) v3: more updates (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 40a9634b4f09a63f69a373af5d4ca7e69e6a78ad Author: Hawking Zhang Date: Sun Apr 24 14:40:13 2022 +0800 drm/amdgpu: add osssys v4_4_2 ip headers Add osssys v4_4_2 register offset and shift masks header files v2: update headers (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 1b0f0f7b8be58b378657c1dc6a0806b5e7bc4783 Author: Hawking Zhang Date: Sun Apr 24 14:22:37 2022 +0800 drm/amdgpu: add athub v1_8_0 ip headers Add athub v1_8_0 register offset and shift masks header files v2: update headers (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit f3409f76a6588137946c96313ed500b68bbc6021 Author: Hawking Zhang Date: Mon Oct 3 15:44:40 2022 -0400 drm/amdgpu: Set family for GC 9.4.3 Set family for GC 9.4.3 Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 5d55e1d02a49a7f27893a5ca5a3c3ef28efcfc42 Author: Hawking Zhang Date: Thu Nov 25 23:33:30 2021 +0800 drm/amdgpu: init nbio v7_9 callbacks switch to the new nbio generation for NBIO 7.9.0. Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 39def24f8c0f86a2d2edc52c694a1cbb41aee69e Author: Hawking Zhang Date: Tue May 17 22:13:35 2022 +0800 drm/amdgpu: add nbio v7_9 support v7_9 is a new nbio generation ip. Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 52b36510a175607b653e6ab0fffaca64ab8903e2 Author: Hawking Zhang Date: Sun Apr 24 14:36:37 2022 +0800 drm/amdgpu: add nbio v7_9_0 ip headers Add nbio v7_9_0 register offset and shift masks header files v2: update headers (Alex) v3: squash in updates (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 9b926bcf26369ffbe347b9e76977f8425dd10f8b Author: Thomas Zimmermann Date: Thu Mar 16 10:37:38 2023 +0100 drm/radeon: Only build fbdev if DRM_FBDEV_EMULATION is set Make building fbdev emulation depend on DRM_FBDEV_EMULATION. Also rename the source file to radeon_fbdev.c to align with other fbdev files. Reviewed-by: Alex Deucher Signed-off-by: Thomas Zimmermann Signed-off-by: Alex Deucher commit e317a69fe891382a8be712d4aa03bf01b9af229f Author: Thomas Zimmermann Date: Thu Mar 16 10:37:37 2023 +0100 drm/radeon: Implement client-based fbdev emulation Implement fbdev emulation on top of struct drm_client and its helpers. Replaces ad-hoc interfaces for restoring and closing fbdev emulation with per-client callbacks for hotplugging, restoring and unregistering. A single function, radeon_fbdev_setup(), starts fbdev emulation after the DRM device has been registered. Hence, fbdev acts like a regular DRM client. The setup call prepares the fbdev emulation and invokes connector hotplugging. The first successful hotplug event initializes fbdev emulation with a framebuffer, device file, etc. Unregistering depends on the hotplug status. Fully initialized emulation is cleaned up through drm_fb_helper_unregister_info() and fb_destroy. For prepared-only setups, unregistering unprepares the emulation and releases all resources. In both cases, fbdev emulation will be cleaned up. Reviewed-by: Alex Deucher Signed-off-by: Thomas Zimmermann Signed-off-by: Alex Deucher commit 3a745f6ac13216f85c3804654f4c703995c17180 Author: Thomas Zimmermann Date: Thu Mar 16 10:37:36 2023 +0100 drm/radeon: Correctly clean up failed display probing Improve the fbdev probing function to fully clean up if it failed. Allows to remove special cases from fb_destroy as well. This change is reorders the operations within radeonfb_probe(). It first allocates a buffer object, then builds a DRM framebuffer for the object and finally creates the fbdev device. If every step succeeded, the probe function clears the framebuffer memory. This is the optimal order to rollback any changes if any of the steps fails. No functional changes. Reviewed-by: Alex Deucher Signed-off-by: Thomas Zimmermann Signed-off-by: Alex Deucher commit 62bb839d48ae87d6aa07259ff6bc8d049538d1f2 Author: Thomas Zimmermann Date: Thu Mar 16 10:37:35 2023 +0100 drm/radeon: Move fbdev cleanup code into fb_destroy callback Fbdev calls struct fb_ops.fb_destroy after cleaning up the final reference to an fbdev framebuffer. Move radeon's fbdev cleanup code there. Reviewed-by: Alex Deucher Signed-off-by: Thomas Zimmermann Signed-off-by: Alex Deucher commit 041f5c416217e375c4d27a7ea905548e70d1a3b8 Author: Thomas Zimmermann Date: Thu Mar 16 10:37:34 2023 +0100 drm/radeon: Fix coding style in fbdev emulation Fix the coding style in several places in the fbdev-emulation code. Also rename functions and structure file by comments. No functional changes. Reviewed-by: Alex Deucher Signed-off-by: Thomas Zimmermann Signed-off-by: Alex Deucher commit b4bbe4761ee2d4127eb751737dcbf47a310a9f86 Author: Thomas Zimmermann Date: Thu Mar 16 10:37:33 2023 +0100 drm/radeon: Move fbdev object helpers before struct fb_ops et al Move the helpers for creating and destroying fbdev GEM objects to the top of the source file. Makes them available to fb_ops functions. This will allow to implement framebuffer cleanup in fb_destroy. No functional changes. Reviewed-by: Alex Deucher Signed-off-by: Thomas Zimmermann Signed-off-by: Alex Deucher commit 11b6005865e47c4cba862678936628175acfa16e Author: Thomas Zimmermann Date: Thu Mar 16 10:37:32 2023 +0100 drm/radeon: Remove test for !screen_base in fbdev probing The screen_base field comes from the fbdev BO and contains the fbdev framebuffer base address. We get the BO memory via radeon_bo_kmap(), which already reports the error -ENOMEM if the buffer could not be mapped. So remove the later test for screen_base, which will never be NULL at this point. Reviewed-by: Alex Deucher Signed-off-by: Thomas Zimmermann Signed-off-by: Alex Deucher commit c4aab3499be2abd8671e5f3f70a9d38acd8e4ce4 Author: Thomas Zimmermann Date: Thu Mar 16 10:37:31 2023 +0100 drm/radeon: Remove struct radeon_fbdev Both data fields in struct radeon_fbdev, the framebuffer and the device, are already available in struct drm_fb_helper. Simplify radeon by converting all callers and removing struct radeon_fbdev. Reviewed-by: Alex Deucher Signed-off-by: Thomas Zimmermann Signed-off-by: Alex Deucher commit 276f7b4bd52425cd0ae38fd7bf870d94abac6b82 Author: Thomas Zimmermann Date: Thu Mar 16 10:37:30 2023 +0100 drm/radeon: Improve fbdev object-test helper Look up the framebuffer GEM object in fbdev object test with the respective helper drm_gem_fb_get_obj(). The look-up helper warns if no GEM object has been installed. Upcasting types prevents runtime type checking, so avoid upcast to struct radeon_bo. Reviewed-by: Alex Deucher Signed-off-by: Thomas Zimmermann Signed-off-by: Alex Deucher commit f04b8af5e9fc42a8e3b26ebf3b8ccf681a064985 Author: Thomas Zimmermann Date: Thu Mar 16 10:37:29 2023 +0100 drm/radeon: Move radeon_align_pitch() next to dumb-buffer helpers Move radeon_align_pitch() next to its caller in the dumb-buffer code. Removes the only dependency on the radeon's fbdev source file that is not related to fbdev emulation. No functional changes. Reviewed-by: Alex Deucher Signed-off-by: Thomas Zimmermann Signed-off-by: Alex Deucher commit 120ceaf78e28f20ec7244c021d24d1e409572be1 Author: Srinivasan Shanmugam Date: Mon Mar 27 22:35:33 2023 +0530 drm/amd/amdgpu: Fix error do not initialise globals to 0 Global variables do not need to be initialized to 0 and checkpatch flags this error in drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c: ERROR: do not initialise globals to 0 +int amdgpu_no_queue_eviction_on_vm_fault = 0; Fix this checkpatch error. Cc: Christian König Cc: Alex Deucher Cc: Mario Limonciello Signed-off-by: Srinivasan Shanmugam Reviewed-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 8782007b5f5795f118c5167f46d8c8142abcc92f Author: Luben Tuikov Date: Thu Mar 23 01:46:41 2023 -0400 drm/amdgpu: Return from switch early for EEPROM I2C address As soon as control->i2c_address is set, return; remove the "break;" from the switch--it is unnecessary. This mimics what happens when for some cases in the switch, we call helper functions with "return ". Remove final function "return true;" to indicate that the switch is final and terminal, and that there should be no code after the switch. Cc: Candice Li Cc: Kent Russell Cc: Alex Deucher Signed-off-by: Luben Tuikov Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1bb745d7596d2b368fd9afb90473f3581495e39d Author: Luben Tuikov Date: Thu Mar 23 00:56:26 2023 -0400 drm/amdgpu: Remove second moot switch to set EEPROM I2C address Remove second switch since it already has its own function and case in the first switch. This also avoids requalifying the EEPROM I2C address for VEGA20, SIENNA CICHLID, and ALDEBARAN, as those have been set by the first switch and shouldn't match SMU v13.0.x. Cc: Candice Li Cc: Kent Russell Cc: Alex Deucher Fixes: 158225294683 ("drm/amdgpu: Add EEPROM I2C address for smu v13_0_0") Fixes: c9bdc6c3cf39 ("drm/amdgpu: Add EEPROM I2C address support for ip discovery") Signed-off-by: Luben Tuikov Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 059478929a91acfeaa5cd2c15b6815e1a2c63f17 Author: Stanley.Yang Date: Thu Mar 23 15:51:19 2023 +0800 drm/amdgpu: print ras drv fw debug info Signed-off-by: Stanley.Yang Reviewed-by: Candice Li Signed-off-by: Alex Deucher commit 9af357bc3e05400eb632f3975986e1eac196f159 Author: Hawking Zhang Date: Thu Mar 23 10:21:49 2023 +0800 drm/amdgpu: Add fatal error handling in nbio v4_3 GPU will stop working once fatal error is detected. it will inform driver to do reset to recover from the fatal error. v2: squash in logic fix (Srinivasan) v3: squash in logic fix (Dan) Signed-off-by: Hawking Zhang Reviewed-by: Candice Li Signed-off-by: Alex Deucher commit 62f03dad76441ee3a58c26a0bbe703028e846db0 Author: Hans de Goede Date: Sun Mar 12 20:17:51 2023 +0100 drm/amd/display/amdgpu_dm: Pass proper parent for backlight device registration v3 The parent for the backlight device should be the drm-connector object, not the PCI device. Userspace relies on this to be able to detect which backlight class device to use on hybrid gfx devices where there may be multiple native (raw) backlight devices registered. Specifically gnome-settings-daemon expects the parent device to have an "enabled" sysfs attribute (as drm_connector devices do) and tests that this returns "enabled" when read. This aligns the parent of the backlight device with i915, nouveau, radeon. Note that drivers/gpu/drm/amd/amdgpu/atombios_encoders.c also already uses the drm_connector as parent, only amdgpu_dm.c used the PCI device as parent before this change. Changes in v3: Make amdgpu_dm_register_backlight_device() check bl_idx != 1 before registering the backlight since amdgpu_dm_connector_late_register() now calls it for _all_ connectors. Changes in v2: Together with changing the parent, also move the registration to drm_connector_funcs.late_register() this is necessary because the parent device (which now is the drm_connector) must be registered before the backlight class device is, otherwise the backlight class device ends up without any parent set at all. This brings the backlight class device registration timing inline with nouveau and i915 which also use drm_connector_funcs.late_register() for this. Note this slightly changes backlight_device_register() error handling, instead of not increasing dm->num_of_edps and re-using the current bl_idx for a potential other backlight device, dm->backlight_dev[bl_idx] is now simply left NULL on failure. This is ok because all code looking at dm->backlight_dev[i] also checks it is not NULL. Link: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/issues/730 Reviewed-by: Rodrigo Siqueira Signed-off-by: Hans de Goede Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 213eca2b0c042b024bf9697a278619f887bab4e5 Author: Hans de Goede Date: Sun Mar 12 20:17:50 2023 +0100 drm/amd/display/amdgpu_dm: Make amdgpu_dm_register_backlight_device() take an amdgpu_dm_connector Make amdgpu_dm_register_backlight_device() take an amdgpu_dm_connector pointer to the connector for which it should register the backlight as its only argument. This is a preparation patch for moving the actual backlight class device registering to drm_connector_funcs.late_register. Reviewed-by: Rodrigo Siqueira Signed-off-by: Hans de Goede Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 618e51cd526cbbb2ea9ad01ef1f67719b775f792 Author: Hans de Goede Date: Sun Mar 12 20:17:49 2023 +0100 drm/amd/display/amdgpu_dm: Move most backlight setup into setup_backlight_device() Rename register_backlight_device() to setup_backlight_device() and move all backlight setup related calls from amdgpu_dm_register_backlight_device() and from amdgpu_dm_initialize_drm_device() there. This leaves amdgpu_dm_register_backlight_device() dealing purely with registering the actual backlight class device. This is a preparation patch for moving the actual backlight class device registering to drm_connector_funcs.late_register. Reviewed-by: Rodrigo Siqueira Signed-off-by: Hans de Goede Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit f196198cafb8f0f2bedf1d8abc755f791fc03648 Author: Hans de Goede Date: Sun Mar 12 20:17:48 2023 +0100 drm/amd/display/amdgpu_dm: Add a bl_idx to amdgpu_dm_connector Currently functions like update_connector_ext_caps() and amdgpu_dm_connector_destroy() are iterating over dm->backlight_link[i] to find the index of the (optional) backlight_dev associated with the connector. Instead make register_backlight_device() store the dm->backlight_dev[] index used for the connector inside the amdgpu_dm_connector struct. This removes the need to iterate over the dm->backlight_link[] array and this is necessary as a preparation patch for moving the actual backlight_device_register() call to drm_connector_funcs.late_register. While reworking update_connector_ext_caps() also remove the aconnector and aconnector->dc_link NULL checks in this function. These are both never NULL and are unconditionally derefed in its callers. Reviewed-by: Rodrigo Siqueira Signed-off-by: Hans de Goede Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 21898a40b2f84deb9438c2ef63f7a5072d6ab2af Author: Tom Rix Date: Fri Mar 24 15:06:47 2023 -0400 bcma: remove unused mips_read32 function clang with W=1 reports drivers/bcma/driver_mips.c:49:19: error: unused function 'mips_read32' [-Werror,-Wunused-function] static inline u32 mips_read32(struct bcma_drv_mips *mcore, ^ This function is not used so remove it. Signed-off-by: Tom Rix Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230324190647.2654293-1-trix@redhat.com commit 767d011dc39dc504b17a373ecba4966aef2b0205 Author: Rob Herring Date: Sun Mar 19 11:31:59 2023 -0500 bcma: Use of_address_to_resource() Replace of_get_address() and of_translate_address() calls with single call to of_address_to_resource(). Signed-off-by: Rob Herring Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230319163159.225773-1-robh@kernel.org commit a4d432e9132c0b29d857b09ca2ec4c1f455b5948 Author: Syed Saba Kareem Date: Fri Mar 31 10:50:23 2023 +0530 ASoC: amd: ps: update the acp clock source. Updating the clock source from ACLK to default clock Signed-off-by: Syed Saba Kareem Link: https://lore.kernel.org/r/20230331052102.2211115-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown commit 3267197782a9160c558efc80ce8e57e5bee56f01 Author: Rob Herring Date: Wed Mar 22 12:35:48 2023 -0500 dt-bindings: clock: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Reviewed-by: Chanwoo Choi Reviewed-by: Linus Walleij Reviewed-by: Krzysztof Kozlowski Acked-by: Stephen Boyd Acked-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230322173549.3972106-1-robh@kernel.org Signed-off-by: Rob Herring commit 074d0a1ae1fefce3dfe73bdda855e62eb8eb2a78 Author: Tom Rix Date: Wed Mar 29 09:14:44 2023 -0400 wifi: mwifiex: remove unused evt_buf variable clang with W=1 reports drivers/net/wireless/marvell/mwifiex/11h.c:198:6: error: variable 'evt_buf' set but not used [-Werror,-Wunused-but-set-variable] u8 *evt_buf; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230329131444.1809018-1-trix@redhat.com commit 2f73f04b7f93f031c94a5c473dd9b7f1cdf91bc0 Author: Tom Rix Date: Mon Mar 27 11:11:51 2023 -0400 wifi: brcmsmac: ampdu: remove unused suc_mpdu variable clang with W=1 reports drivers/net/wireless/broadcom/brcm80211/brcmsmac/ampdu.c:848:5: error: variable 'suc_mpdu' set but not used [-Werror,-Wunused-but-set-variable] u8 suc_mpdu = 0, tot_mpdu = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230327151151.1771350-1-trix@redhat.com commit 5dbe1f8eb8c5ac69394400a5b86fd81775e96c43 Author: Wei Chen Date: Sun Mar 26 05:42:17 2023 +0000 wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_reg() If there is a failure during copy_from_user or user-provided data buffer is invalid, rtl_debugfs_set_write_reg should return negative error code instead of a positive value count. Fix this bug by returning correct error code. Moreover, the check of buffer against null is removed since it will be handled by copy_from_user. Fixes: 610247f46feb ("rtlwifi: Improve debugging by using debugfs") Signed-off-by: Wei Chen Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230326054217.93492-1-harperchen1110@gmail.com commit 905a9241e4e8c15d2c084fee916280514848fe35 Author: Wei Chen Date: Sun Mar 26 05:31:38 2023 +0000 wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_rfreg() If there is a failure during copy_from_user or user-provided data buffer is invalid, rtl_debugfs_set_write_rfreg should return negative error code instead of a positive value count. Fix this bug by returning correct error code. Moreover, the check of buffer against null is removed since it will be handled by copy_from_user. Fixes: 610247f46feb ("rtlwifi: Improve debugging by using debugfs") Signed-off-by: Wei Chen Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230326053138.91338-1-harperchen1110@gmail.com commit 5aeb763a27c2b444928639d35cbe94520c405969 Author: Tom Rix Date: Sat Mar 25 09:03:43 2023 -0400 wifi: brcmsmac: remove unused has_5g variable clang with W=1 reports drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c:1051:6: error: variable 'has_5g' set but not used [-Werror,-Wunused-but-set-variable] int has_5g = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230325130343.1334209-1-trix@redhat.com commit 4c7f8c237d322a98026a57f6ba846fc997f165df Author: Tom Rix Date: Fri Mar 24 09:50:22 2023 -0400 wifi: b43legacy: remove unused freq_r3A_value function clang with W=1 reports drivers/net/wireless/broadcom/b43legacy/radio.c:1713:5: error: unused function 'freq_r3A_value' [-Werror,-Wunused-function] u16 freq_r3A_value(u16 frequency) ^ This function is not used so remove it. Signed-off-by: Tom Rix Acked-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230324135022.2649735-1-trix@redhat.com commit 82d6077901c673546490daa0c1715d6662b06bcf Author: Gustavo A. R. Silva Date: Thu Mar 23 19:11:35 2023 -0600 wifi: rtlwifi: Replace fake flex-array with flex-array member Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Address the following warning found with GCC-13 and -fstrict-flex-arrays=3 enabled: In function ‘fortify_memset_chk’, inlined from ‘rtl_usb_probe’ at drivers/net/wireless/realtek/rtlwifi/usb.c:1044:2: ./include/linux/fortify-string.h:430:25: warning: call to ‘__write_overflow_field’ declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning] 430 | __write_overflow_field(p_size_field, size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/277 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Simon Horman Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/ZBz4x+MWoI/f65o1@work commit e665c6d67e541ac7520fa8c5175ad2c0213f247e Author: Cai Huoqing Date: Thu Mar 23 19:26:12 2023 +0800 wifi: rtw88: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Reviewed-by: Simon Horman Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230323112613.7550-4-cai.huoqing@linux.dev commit 06dabcccc08b6323c56062c7fdbb9dba88168565 Author: Gustavo A. R. Silva Date: Wed Mar 22 12:26:53 2023 -0600 wifi: rndis_wlan: Replace fake flex-array with flexible-array member Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Address the following warning found with GCC-13 and -fstrict-flex-array=3 enabled: drivers/net/wireless/rndis_wlan.c:2902:23: warning: array subscript 0 is outside array bounds of ‘struct ndis_80211_auth_request[0]’ [-Warray-bounds=] This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/274 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/ZBtIbU77L9eXqa4j@work commit 703f15b6dce1e3d38b2455b10c660fafd22e5528 Author: Dan Carpenter Date: Wed Mar 22 12:07:31 2023 +0300 wifi: rndis_wlan: clean up a type issue The rndis_bss_info_update() returns type bool. Change the NULL returns to false. Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/d1f250a3-653a-497d-9c92-12dd628b7927@kili.mountain commit c9b6111a6f94bd186d1f0f7a04a9b37030a27738 Author: Tom Rix Date: Mon Mar 20 19:34:48 2023 -0400 wifi: rtw88: remove unused rtw_pci_get_tx_desc function clang with W=1 reports drivers/net/wireless/realtek/rtw88/pci.c:92:21: error: unused function 'rtw_pci_get_tx_desc' [-Werror,-Wunused-function] static inline void *rtw_pci_get_tx_desc(struct rtw_pci_tx_ring *tx_ring, u8 idx) ^ This function is not used, so remove it. Signed-off-by: Tom Rix Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230320233448.1729899-1-trix@redhat.com commit 8de7838acfa3309fcc4c6160cb230ee79f582b18 Author: Christophe JAILLET Date: Mon Mar 20 17:13:42 2023 +0100 wifi: rsi: Slightly simplify rsi_set_channel() There is no point in allocating 'skb' and then freeing it if !channel. Make the sanity check first to slightly simplify the code. Signed-off-by: Christophe JAILLET Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/29bf0296bd939e3f6952272bfdcc73b22edbc374.1679328588.git.christophe.jaillet@wanadoo.fr commit c7e39d70613c113b5ac667beeb3cacb242c6a4cb Author: Tom Rix Date: Sun Mar 19 09:54:18 2023 -0400 wifi: ipw2x00: remove unused _ipw_read16 function clang with W=1 reports drivers/net/wireless/intel/ipw2x00/ipw2200.c:381:19: error: unused function '_ipw_read16' [-Werror,-Wunused-function] static inline u16 _ipw_read16(struct ipw_priv *ipw, unsigned long ofs) ^ This function and its wrapping marco are not used, so remove them. Signed-off-by: Tom Rix Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230319135418.1703380-1-trix@redhat.com commit 59e9c5e2bdabf134b03229a6cd8b50e7c658b05f Author: Alexandre Mergnat Date: Thu Mar 9 15:23:03 2023 +0100 dt-bindings: soc: mediatek: specify which compatible requires clocks property According to the mtk-mutex.c driver and the SoC DTS, the clock isn't required to work properly for some of MTK SoC. Improve the clock requirement by adding a condition which is function to the compatible. Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20230220-display-v1-14-45cbc68e188b@baylibre.com Signed-off-by: Matthias Brugger commit 868c2a6ceead022aa61b94b7173c177cf0169be2 Author: David Wronek Date: Sun Mar 12 02:17:33 2023 +0300 phy: qcom-qmp-ufs: Add SM7150 support Add the tables and constants for init sequences for UFS QMP phy found in SM7150 SoC. Signed-off-by: David Wronek Signed-off-by: Danila Tikhonov Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230311231733.141806-3-danila@jiaxyga.com Signed-off-by: Vinod Koul commit 001c00efdb0441a6133674ea103ae7505400813d Author: David Wronek Date: Sun Mar 12 02:17:32 2023 +0300 dt-bindings: phy: Add QMP UFS PHY comptible for SM7150 Document the QMP UFS PHY compatible for SM7150. Signed-off-by: David Wronek Signed-off-by: Danila Tikhonov Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230311231733.141806-2-danila@jiaxyga.com Signed-off-by: Vinod Koul commit a03c4427725301328ccbe414d0a19ad39e90d008 Author: Lucas Tanure Date: Tue Mar 14 13:55:55 2023 +0000 phy: rockchip: Add naneng combo phy support for RK3588 Add support for RK3588 combo phy This is based on prior work from XiaoDong Huang and Peter Geis fixing this issue specifically for Rockchip 356x. Co-developed-by: Andrew Powers-Holmes Signed-off-by: Andrew Powers-Holmes Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20230314135555.44162-4-lucas.tanure@collabora.com Signed-off-by: Vinod Koul commit c3becf9cd857606582eea7a5393dc29fb695f59c Author: Lucas Tanure Date: Tue Mar 14 13:55:54 2023 +0000 dt-bindings: phy: rockchip: Add rk3588 compatible RK3568 Naneng Combo Phy driver can support RK3588 with the additional clocks and initial configuration, so add the compatible line. Signed-off-by: Lucas Tanure Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230314135555.44162-3-lucas.tanure@collabora.com Signed-off-by: Vinod Koul commit 13803c86e24f5a409406cd428ed0aa69cfcf61f0 Author: Lucas Tanure Date: Tue Mar 14 13:55:53 2023 +0000 dt-bindings: PCI: dwc: Add rk3588 compatible PCIe for RK3588 is the same as RK3568. Signed-off-by: Lucas Tanure Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230314135555.44162-2-lucas.tanure@collabora.com Signed-off-by: Vinod Koul commit 92bd868f529a7771f15a141e8db6b6b62b32310a Author: Rohit Agarwal Date: Fri Mar 17 12:08:34 2023 +0530 phy: qcom-qmp: Add support for SDX65 QMP PCIe PHY The PCIe PHY version used in SDX65 is v5.20 which has different register offsets compared to the v5.0x and v4.0x PHYs. So separate register defines are used for init sequence and PHY status. Signed-off-by: Rohit Agarwal Link: https://lore.kernel.org/r/1679035114-19879-3-git-send-email-quic_rohiagar@quicinc.com Signed-off-by: Vinod Koul commit 0d678713118352614b14aba0c1fb066b1ba39f53 Author: Rohit Agarwal Date: Fri Mar 17 12:08:33 2023 +0530 dt-bindings: phy: qcom,qmp: Add SDX65 QMP PHY Add devicetree YAML binding for Qualcomm QMP Super Speed (SS) PHY found in SDX65. Signed-off-by: Rohit Agarwal Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1679035114-19879-2-git-send-email-quic_rohiagar@quicinc.com Signed-off-by: Vinod Koul commit 64cdc036081153981d01406d0a847c535d8e6a75 Author: Tom Rix Date: Tue Mar 21 08:25:03 2023 -0400 phy: rockchip-pcie: remove unused phy_rd_cfg function clang with W=1 reports drivers/phy/rockchip/phy-rockchip-pcie.c:122:19: error: unused function 'phy_rd_cfg' [-Werror,-Wunused-function] static inline u32 phy_rd_cfg(struct rockchip_pcie_phy *rk_phy, ^ This function is not used, so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230321122503.1783311-1-trix@redhat.com Signed-off-by: Vinod Koul commit 623cb3e22c9d7ecb655df8e32701c8a92313746b Author: Ye Xingchen Date: Thu Mar 23 15:45:52 2023 +0800 phy: omap-usb2-phy: Use dev_err_probe() Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/202303231545522162256@zte.com.cn Signed-off-by: Vinod Koul commit d414c14c2d162f379f62bc48ef8eb7dfd1c08be5 Author: Yang Li Date: Thu Mar 23 15:35:34 2023 +0800 phy: dphy: Use devm_platform_ioremap_resource() According to commit 7945f929f1a7 ("drivers: provide devm_platform_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to use devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230323073534.75037-1-yang.lee@linux.alibaba.com Signed-off-by: Vinod Koul commit eb016875080cf035f588fa31c7d1e43dfe462451 Author: Dmitry Baryshkov Date: Thu Mar 23 17:47:26 2023 +0300 phy: qcom-qmp-combo: use qmp_combo_offsets_v3 instead of _v6 The qmp_combo_offsets_v3 table is already used for v3 and v4 PHYs. Reuse it for v6 too, dropping the separate qmp_combo_offsets_v6. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230323144726.1614344-2-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 4546334fc14fc1176384c7c7a426be9fef738c3e Author: Dmitry Baryshkov Date: Thu Mar 23 17:47:25 2023 +0300 phy: qcom-qmp-combo: fix v3 offsets table SM8350 and SM8450 use qmp_combo_offsets_v3 table, which doesn't have PCS_USB offset. Add the usb3_pcs_usb entry to program correct registers while setting up sm8350 and sm8450 USB+DP combo PHYs. Fixes: 05bd18348b88 ("phy: qcom-qmp-combo: Add config for SM6350") Cc: Neil Armstrong Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230323144726.1614344-1-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit e43462c15b33a15816d8d6373ff721c17f5436e1 Author: Rob Herring Date: Mon Mar 20 18:39:52 2023 -0500 dt-bindings: phy: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Acked-by: Jernej Skrabec Acked-by: Marc Kleine-Budde # for ti,tcan104x-can.yaml Reviewed-by: Krzysztof Kozlowski Acked-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20230320233955.2921179-1-robh@kernel.org Signed-off-by: Vinod Koul commit a59f6006cc07a676aff7c0e2ae70a8094b670034 Author: Lars-Peter Clausen Date: Sat Mar 25 18:14:16 2023 -0700 phy: cadence: Sierra: Use clk_parent_data to provide parent information Rather than requesting the parent reference clocks for the sierra PHY PLLs and then assigning the parents as a struct clk. Use the clk_parent_data feature for the clock framework and only specify the firmware names of the parent clocks. The clock framework internally will then translate this to the actual clocks. This allows to remove a bit of boilerplate code. It also allows to only specify a single reference clock for both PLLs, which is a valid use case. The clock framework can handle the case where not all inputs for a clock mux are connected, while the custom implementation in the driver could not. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230326011416.363318-2-lars@metafoo.de Signed-off-by: Vinod Koul commit 6ef7aa323bd8c1f02bbf83afd1987f5dd7eaaef4 Author: Lars-Peter Clausen Date: Sat Mar 25 18:14:15 2023 -0700 phy: cadence: Sierra: Replace `clk_register(`) with `clk_hw_register()` The `devm_clk_register()` API is deprecated. Switch to `devm_clk_hw_register()`. Since the driver enables its own internal PLLs using the clock API we still need to get a reference to the PLL clocks using the `devm_clk_hw_get_clk()` API. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230326011416.363318-1-lars@metafoo.de Signed-off-by: Vinod Koul commit c8481d996f2f68244a5b3cf59915b43128f40db8 Author: Radhey Shyam Pandey Date: Mon Mar 27 23:36:47 2023 +0530 phy: xilinx: phy-zynqmp: mention SGMII as supported protocol SGMII is validated on kria KR260 robotics starter kit. So modify the comment description to include it in supported controllers list. Signed-off-by: Radhey Shyam Pandey Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/1679940407-13131-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Vinod Koul commit c8879d3f87ffbaf6954dabec2199905616b0139e Author: Michael Grzeschik Date: Mon Feb 27 16:13:19 2023 +0100 phy: stm32-usphyc: add 200 to 300 us delay to fix timeout on some machines An minimum udelay of 200 us seems to be necessary on some machines. After the setup of the pll, which needs about 100 us to be locked there seem to be additional 100 us to get the phy really functional. Without this delay the usb runs not functional. With this additional short udelay this issue was not reported again. Signed-off-by: Michael Grzeschik Reviewed-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20230227151318.1894938-1-m.grzeschik@pengutronix.de Signed-off-by: Vinod Koul commit 7d90e81a2d5edbd04037100bdd54d955bdd9b0d0 Author: Greg Kroah-Hartman Date: Fri Mar 31 11:33:12 2023 +0200 driver core: core: move to use class_to_subsys() There are a number of places in core.c that need access to the private subsystem structure of struct class, so move them to use class_to_subsys() instead of accessing it directly. This requires exporting class_to_subsys() out of class.c, but keeping it local to the driver core. Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230331093318.82288-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 82e6051a48957a89066d15b17bb85d2f662f2bad Author: Apurva Nandan Date: Thu Mar 9 01:45:13 2023 +0530 dmaengine: ti: k3-psil: Add PSI-L thread support for J784s4 Add psil thread IDs for J784s4 and include J784s4 in the set of "k3_soc_devices" in k3-psil.c. Signed-off-by: Apurva Nandan Signed-off-by: Hari Nagalla Signed-off-by: Siddharth Vadapalli Signed-off-by: Vignesh Raghavendra [vaishnav.a@ti.com: add MCSPI-TX and 3rd CSI2RX instance entries] Signed-off-by: Vaishnav Achath [j-choudhary@ti.com: add sa2ul entries, minor cleanups] Signed-off-by: Jayesh Choudhary Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230308201513.116638-1-j-choudhary@ti.com Signed-off-by: Vinod Koul commit f60a150822a7946c97059dad3416ea3de501eaed Author: Rob Herring Date: Sun Mar 19 11:32:22 2023 -0500 dmaengine: bestcomm: Use of_address_to_resource() Replace of_get_address() and of_translate_address() calls with single call to of_address_to_resource(). Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230319163222.226377-1-robh@kernel.org Signed-off-by: Vinod Koul commit f47a669ffa11c6c14b463d762562fe9681345c6e Author: Stefan Wahren Date: Wed Mar 8 19:46:03 2023 +0100 clk: imx: clk-gpr-mux: Provide clock name in error message In error case the error message doesn't provide much context: imx:clk-gpr-mux: failed to get parent (-EINVAL) So additionally provide the clock name in the message, in order to simplify the further analyze. Signed-off-by: Stefan Wahren Reviewed-by: Peng Fan Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230308184603.10049-1-stefan.wahren@i2se.com commit c436561687421493fe745c2cc26a8ad0f8dc208b Author: Aleksander Jan Bajkowski Date: Thu Mar 30 23:22:25 2023 +0200 dt-bindings: pinctrl: xway: drop the deprecated compatible strings This code are marked as deprecated since kernel 4.5[1]. Downstream OpenWRT and upstream switched to the new string compatible 7 years ago. The old compatible strings can safely be dropped. [1] commit be14811c03cf ("pinctrl/lantiq: introduce new dedicated devicetree bindings") Signed-off-by: Aleksander Jan Bajkowski Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230330212225.10214-2-olek2@wp.pl Signed-off-by: Linus Walleij commit 33a36b8188b530f6ed8a0fba6626bd0702d6f11d Author: Aleksander Jan Bajkowski Date: Thu Mar 30 23:22:24 2023 +0200 pinctrl: xway: drop the deprecated compatible strings This code are marked as deprecated since kernel 4.5[1]. Downstream OpenWRT and upstream switched to the new string compatible 7 years ago. The old compatible strings can safely be dropped. [1] commit be14811c03cf ("pinctrl/lantiq: introduce new dedicated devicetree bindings") Signed-off-by: Aleksander Jan Bajkowski Link: https://lore.kernel.org/r/20230330212225.10214-1-olek2@wp.pl Signed-off-by: Linus Walleij commit 49cd1dd15f74d73d4752b2c4f23f99b0753d2b3d Author: Rob Herring Date: Thu Mar 30 15:03:58 2023 -0500 dt-bindings: pinctrl: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Reviewed-by: Linus Walleij Acked-by: Hector Martin Acked-by: Geert Uytterhoeven Acked-by: Jernej Skrabec Reviewed-by: Heiko Stuebner #rockchip Reviewed-by: Damien Le Moal Reviewed-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230330200402.2731992-1-robh@kernel.org Signed-off-by: Linus Walleij commit d77c4502d6238bbfed7cb9422748477839d506f2 Author: Tom Rix Date: Mon Mar 20 19:49:06 2023 -0400 dmaengine: dw-edma: remove unused readq_ch and writeq_ch functions clang with W=1 reports drivers/dma/dw-edma/dw-edma-v0-core.c:162:20: error: unused function 'writeq_ch' [-Werror,-Wunused-function] static inline void writeq_ch(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch, ^ drivers/dma/dw-edma/dw-edma-v0-core.c:185:19: error: unused function 'readq_ch' [-Werror,-Wunused-function] static inline u64 readq_ch(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch, ^ These functions and their wrapping macros are not used, so remove them. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230320234906.1730308-1-trix@redhat.com Signed-off-by: Vinod Koul commit 3366c6fe2769fe653107626b3273e03156d9cac8 Author: Tom Rix Date: Mon Mar 20 19:12:09 2023 -0400 dmaengine: ti: edma: remove unused edma_and function clang with W=1 reports drivers/dma/ti/edma.c:321:20: error: unused function 'edma_and' [-Werror,-Wunused-function] static inline void edma_and(struct edma_cc *ecc, int offset, unsigned and) ^ This function is not used, so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230320231209.1728940-1-trix@redhat.com Signed-off-by: Vinod Koul commit 46a974433ea7fa468b45db70536f7cea81feb87c Author: Adam Ford Date: Thu Mar 23 18:01:27 2023 -0500 clk: imx: Let IMX8MN_CLK_DISP_PIXEL set parent rate By default the display pixel clock needs to be evenly divide down from the video_pll_out clock which rules out a significant number of resolution and refresh rates. The current clock tree looks something like: video_pll 594000000 video_pll_bypass 594000000 video_pll_out 594000000 disp_pixel 148500000 disp_pixel_clk 148500000 Now that composite-8m supports determine_rate, we can allow disp_pixel to set the parent rate which then switches every clock in the chain to a new frequency when disp_pixel cannot evenly divide from video_pll_out. Signed-off-by: Adam Ford Reviewed-by: Fabio Estevam Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230323230127.120883-5-aford173@gmail.com commit 5fe6ec93f10b0765d59e0efb6ecba419a6a49d48 Author: Adam Ford Date: Thu Mar 23 18:01:26 2023 -0500 clk: imx8mm: Let IMX8MM_CLK_LCDIF_PIXEL set parent rate By default the display pixel clock needs to be evenly divide down from 594MHz which rules out a significant number of resolution and refresh rates. The current clock tree looks something like: video_pll1 594000000 video_pll1_bypass 594000000 video_pll1_out 594000000 lcdif_pixel 148500000 Now that composite-8m supports determine_rate, we can allow lcdif_pixel to set the parent rate which then switches every clock in the chain to a new frequency when lcdif_pixel cannot evenly divide from video_pll1_out. Signed-off-by: Adam Ford Reviewed-by: Fabio Estevam Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230323230127.120883-4-aford173@gmail.com commit 784a9b3916e949c00666588fd167c4ab245ec9d6 Author: Adam Ford Date: Thu Mar 23 18:01:25 2023 -0500 clk: imx: Add imx8m_clk_hw_composite_flags macro In order to set custom flags to imx8m_clk_hw_composite, split it off into a separate macro which can accept additional flags. Signed-off-by: Adam Ford Reviewed-by: Fabio Estevam Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230323230127.120883-3-aford173@gmail.com commit 156e96ff2172518b6f83e97d8f11f677bc668e22 Author: Adam Ford Date: Thu Mar 23 18:01:24 2023 -0500 clk: imx: composite-8m: Add support to determine_rate Similar to imx/clk-composite-93 and imx/clk-divider-gate, the imx8m_clk_composite_divider_ops can support determine_rate. Without this the parent clocks are set to a fixed value, and if a consumer needs a slower reate, the clock is divided, but the division is only as good as the parent clock rate. With this added, the system can attempt to adjust the parent rate if the proper flags are set which can lead to a more precise clock value. Signed-off-by: Adam Ford Reviewed-by: Peng Fan Reviewed-by: Fabio Estevam Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230323230127.120883-2-aford173@gmail.com commit e9f92b9999055110249dacdc5f1a6dfda2a155f6 Author: Harini Katakam Date: Thu Mar 16 15:03:18 2023 +0530 dmaengine: zynqmp_dma: Sync DMA and coherent masks Align ZDMA DMA as well as coherent memory masks to 44 bit. This is required when using >32 bit memory regions. Signed-off-by: Harini Katakam Acked-by: Michal Simek Link: https://lore.kernel.org/r/20230316093318.6722-1-harini.katakam@amd.com Signed-off-by: Vinod Koul commit 010f493d90ee1dbc32fa1ce51398f20d494c20c2 Author: Mario Limonciello Date: Tue Mar 28 12:42:31 2023 -0500 pinctrl: amd: Add fields for interrupt status and wake status If the firmware has misconfigured a GPIO it may cause interrupt status or wake status bits to be set and not asserted. Add these to debug output to catch this case. Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20230328174231.8924-3-mario.limonciello@amd.com Signed-off-by: Linus Walleij commit 75358cf3319d5fed595946019deda5c2c26a203d Author: Mario Limonciello Date: Tue Mar 28 12:42:30 2023 -0500 pinctrl: amd: Adjust debugfs output More fields are to be added, so to keep the display from being too busy, adjust it. 1) Add a header to all columns 2) Except for interrupt, when fields have no data show empty 3) Remove otherwise blank whitespace Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20230328174231.8924-2-mario.limonciello@amd.com Signed-off-by: Linus Walleij commit 74b7d42300a8aabf975ac48d077c6a57e7811df3 Author: Tom Rix Date: Fri Mar 31 08:03:25 2023 -0400 reiserfs: remove unused iter variable clang with W=1 reports fs/reiserfs/stree.c:1265:6: error: variable 'iter' set but not used [-Werror,-Wunused-but-set-variable] int iter = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Signed-off-by: Jan Kara Message-Id: <20230331120325.1855111-1-trix@redhat.com> commit a747051efa16d4304aacaf44fa0771667e28ca54 Author: Tom Rix Date: Wed Mar 22 08:10:01 2023 -0400 dmaengine: tegra-apb: remove unused tdma_read function clang with W=1 reports drivers/dma/tegra20-apb-dma.c:236:19: error: unused function 'tdma_read' [-Werror,-Wunused-function] static inline u32 tdma_read(struct tegra_dma *tdma, u32 reg) ^ This function is not used so remove it. Signed-off-by: Tom Rix Reviewed-by: Jon Hunter Link: https://lore.kernel.org/r/20230322121001.2569909-1-trix@redhat.com Signed-off-by: Vinod Koul commit f806bea3093cb3568e01b4375d5e1d7c8c47c1d4 Author: Vignesh Raghavendra Date: Thu Mar 23 17:31:07 2023 +0530 dmaengine: ti: k3-udma: Workaround errata i2234 Per [1], UDMA TR15 transactions may hang if ICNT0 is less than 64B Work around is to set EOL flag is to 1 for ICNT0. Since, there is no performance penalty / side effects of setting EOL flag event ICNTO > 64B, just set the flag for all UDMAP TR15 descriptors. [1] https://www.ti.com/lit/er/sprz455a/sprz455a.pdf Errata doc for J721E DRA829/TDA4VM Processors Silicon Revision 1.1/1.0 (Rev. A) Signed-off-by: Vignesh Raghavendra [j-choudhary@ti.com: minor cleanups] Signed-off-by: Jayesh Choudhary Link: https://lore.kernel.org/r/20230323120107.27638-1-j-choudhary@ti.com Signed-off-by: Vinod Koul commit 95a0aa7bb10e79cfbe8a1dc4b993d21dd58c253f Author: Marek Vasut Date: Wed Mar 1 17:32:55 2023 +0100 dt-bindings: clock: imx8mp: Add audiomix block control Unlike the other block control IPs in i.MX8M, the audiomix is mostly a series of clock gates and muxes. Add DT bindings for this IP. Reviewed-by: Fabio Estevam Reviewed-by: Marco Felsch Reviewed-by: Peng Fan Reviewed-by: Rob Herring Tested-by: Adam Ford #imx8mp-beacon-kit Tested-by: Alexander Stein Signed-off-by: Marek Vasut Tested-by: Richard Leitner Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230301163257.49005-3-marex@denx.de commit 6cd95f7b151cdd7852ed9f212faeea8f98ecba10 Author: Marek Vasut Date: Wed Mar 1 17:32:54 2023 +0100 clk: imx: imx8mp: Add audiomix block control Unlike the other block control IPs in i.MX8M, the audiomix is mostly a series of clock gates and muxes. Model it as a large static table of gates and muxes with one exception, which is the PLL14xx . The PLL14xx SAI PLL has to be registered separately. Reviewed-by: Marco Felsch Reviewed-by: Peng Fan Reviewed-by: Fabio Estevam Tested-by: Adam Ford #imx8mp-beacon-kit Tested-by: Alexander Stein Tested-by: Luca Ceresoli Signed-off-by: Marek Vasut Tested-by: Richard Leitner Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230301163257.49005-2-marex@denx.de commit 27fc5ec673b527dbc2f44787246a39c5ecc01de5 Author: Marek Vasut Date: Wed Mar 1 17:32:53 2023 +0100 clk: Introduce devm_clk_hw_register_gate_parent_data() Add an API for clock gate that uses parent_data for the parent instead of a string parent_name. Reviewed-by: Peng Fan Reviewed-by: Fabio Estevam Tested-by: Adam Ford #imx8mp-beacon-kit Tested-by: Alexander Stein Signed-off-by: Marek Vasut Tested-by: Richard Leitner Reviewed-by: Stephen Boyd Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20230301163257.49005-1-marex@denx.de commit 86de3bbfe45e5a7e64d4f24a1c034725072420d8 Author: Geert Uytterhoeven Date: Mon Mar 27 11:48:33 2023 +0200 dmaengine: sh: rz-dmac: Remove unused rz_dmac_chan.*_word_size The src_word_size and dst_word_size members of the rz_dmac_chan structure were never used, so they can be removed. Signed-off-by: Geert Uytterhoeven Reviewed-by: Biju Das Link: https://lore.kernel.org/r/021bdf56f1716276a55bcfb1ea81bba5f1d42b3d.1679910274.git.geert+renesas@glider.be Signed-off-by: Vinod Koul commit 1119f009005ea89dafac298aeb3231cf2cf2a9ef Author: Ville Syrjälä Date: Wed Mar 29 22:04:45 2023 +0300 drm/i915: Define cursor chicken reg Define CUR_CHICKEN so we don't have to remember the offset. Looks like it's getting introduced in mtl. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230329190445.13456-3-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 7732e289c557809a4a92a218abe04a5f658ea5c2 Author: Ville Syrjälä Date: Wed Mar 29 22:04:44 2023 +0300 drm/i915: Document that PLANE_CHICKEN are for tgl+ Add tgl+ comments to the PLANE_CHICKEN registers which I apparently forgot to add when defining the registers. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230329190445.13456-2-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit bd80b0dd6a431aa23b70ff91b6905c1b1eed2f9c Author: Ville Syrjälä Date: Wed Mar 29 22:04:43 2023 +0300 drm/i915: Skip cursor when writing PLANE_CHICKEN Cursor is not a universal plane and thus doesn't have the PLANE_CHICKEN register. Skip it. Fixes: c5de248484af ("drm/i915/dpt: Add a modparam to disable DPT via the chicken bit") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230329190445.13456-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 9f0d99b327edd217462852635498694aaf471b33 Author: Dave Jiang Date: Fri Mar 3 13:37:32 2023 -0800 dmaengine: idxd: expose IAA CAP register via sysfs knob Add IAA (IAX) capability mask sysfs attribute to expose to applications. The mask provides application knowledge of what capabilities this IAA device supports. This mask is available for IAA 2.0 device or later. Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230303213732.3357494-3-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 34ca00662eb7f184f249dd2168ebea78d945e3e4 Author: Dave Jiang Date: Fri Mar 3 13:37:31 2023 -0800 dmaengine: idxd: reformat swerror output to standard Linux bitmap output SWERROR register is 4 64bit wide registers. Currently the sysfs attribute just outputs 4 64bit hex integers. Convert to output with %*pb format specifier. Signed-off-by: Dave Jiang Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Link: https://lore.kernel.org/r/20230303213732.3357494-2-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 6fec8938b7b4fe2b2c503fe87b2783a50bff0415 Author: Fenghua Yu Date: Fri Mar 3 13:34:13 2023 -0800 dmaengine: idxd: Add descriptor definitions for translation fetch operation The translation fetch operation (0x0A) fetches address translations for the address range specified in the descriptor by issuing address translation (ATS) requests to the IOMMU. Add descriptor definitions for the operation so that user can use DSA to accelerate translation fetch. Signed-off-by: Fenghua Yu Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20230303213413.3357431-4-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 12bbc2c2605516e781cd86e3cde9fe1f889b72cc Author: Fenghua Yu Date: Fri Mar 3 13:34:12 2023 -0800 dmaengine: idxd: Add descriptor definitions for DIX generate operation The Data Integrity Extension (DIX) generate operation (0x17) computes the Data Integrity Field (DIF) on the source data and writes only the computed DIF for each source block to the PI destination address. Add descriptor definitions for this operation so that user can use DSA to accelerate DIX generate operation. Signed-off-by: Fenghua Yu Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20230303213413.3357431-3-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 9e410fe3dc9a938bc47f71dff254be7419bd40d2 Author: Fenghua Yu Date: Fri Mar 3 13:34:11 2023 -0800 dmaengine: idxd: Add descriptor definitions for 16 bytes of pattern in memory fill operation The memory fill operation (0x04) can fill in memory with either 8 bytes or 16 bytes of pattern. To fill in memory with 16 bytes of pattern, the first 8 bytes are provided in pattern lower in bytes 16-23 and the next 8 bytes are in pattern upper in bytes 40-47 in the descriptor. Currently only 8 bytes of pattern is enabled. Add descriptor definitions for pattern lower and pattern upper so that user can use 16 bytes of pattern to fill memory. Signed-off-by: Fenghua Yu Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20230303213413.3357431-2-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit c2912d42e86e494935722669e4d9eade69649072 Author: Mika Westerberg Date: Fri Mar 31 08:28:12 2023 +0300 spi: intel-pci: Add support for Meteor Lake-S SPI serial flash Intel Meteor Lake-S has the same SPI serial flash controller as Meteor Lake-P. Add Meteor Lake-S PCI ID to the driver list of supported devices. Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20230331052812.39983-1-mika.westerberg@linux.intel.com Signed-off-by: Mark Brown commit 497667ab9016ba508bb0591b6e9d15597127b034 Author: Uwe Kleine-König Date: Thu Mar 30 23:10:22 2023 +0200 spi: bcm2835: 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 (mostly) ignored 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. Convert this driver from always returning zero in the remove callback to the void returning variant. Now that bcm2835_spi_remove returns no error code any more, bcm2835_spi_shutdown() does the same thing as bcm2835_spi_remove(). So drop the shutdown function and use bcm2835_spi_remove() as .shutdown callback. Signed-off-by: Uwe Kleine-König Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20230330211022.2460233-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 276d8c08e82b9f6062f6febc7bc63913829bde27 Author: Ryan Lee Date: Thu Mar 30 16:43:19 2023 -0700 ASoC: dt-bindings: max98363: add soundwire amplifier Add dt-bindings information for Analog Devices MAX98363 SoundWire Amplifier Signed-off-by: Ryan Lee Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230330234319.6841-2-ryan.lee.analog@gmail.com Signed-off-by: Mark Brown commit 18c0af945fa35766730d3f729adcf417a3d1ad5d Author: Ryan Lee Date: Thu Mar 30 16:43:18 2023 -0700 ASoC: max98363: add soundwire amplifier driver Added Analog Devices MAX98363 SoundWire Amplifier Driver. The MAX98363 is a SoundWire peripheral device that supports MIPI SoundWire v1.2-compatible digital interface for audio and control data. Signed-off-by: Ryan Lee Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230330234319.6841-1-ryan.lee.analog@gmail.com Signed-off-by: Mark Brown commit 376c2c9b04e97ddb1fbb9d9156456e2331891506 Author: Christophe JAILLET Date: Sun Mar 26 09:06:38 2023 +0200 dmaengine: mv_xor_v2: Use some clk_ helper functions to simplify code Use devm_clk_get_[optional_]enabled() instead of hand writing it. It saves some LoC. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/cc14e490f4e6002a17c9c7d283fe6a93179766c2.1679814350.git.christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul commit 827026ae2e56ec05ef1155661079badbbfc0b038 Author: Christophe JAILLET Date: Sun Mar 26 09:06:37 2023 +0200 dmaengine: mv_xor_v2: Fix an error code. If the probe is deferred, -EPROBE_DEFER should be returned, not +EPROBE_DEFER. Fixes: 3cd2c313f1d6 ("dmaengine: mv_xor_v2: Fix clock resource by adding a register clock") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/201170dff832a3c496d125772e10070cd834ebf2.1679814350.git.christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul commit ee508454fd555099d51f3c704fc2ff292c5e152f Author: AngeloGioacchino Del Regno Date: Thu Feb 23 15:54:26 2023 +0100 arm64: dts: mediatek: cherry: Add configuration for display backlight Configure the hardware PWM for the integrated display's backlight: all Cherry devices enable the backlight with GPIO82 and manage the PWM via MediaTek disp-pwm on GPIO97. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230223145426.193590-5-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit b86b9464467de6687f58f6ef9a866696a69be5f3 Author: AngeloGioacchino Del Regno Date: Thu Feb 23 15:54:25 2023 +0100 arm64: dts: mediatek: mt8195: Add display pwm nodes Add the two hardware PWMs for display backlighting but keep them disabled by default, as usage is board-specific. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230223145426.193590-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 7f2fc184a966c0bc46fd2e2b23d049d6bdf0e20b Author: Balsam CHIHI Date: Thu Feb 9 11:56:28 2023 +0100 arm64: dts: mediatek: mt8195: Add temperature mitigation threshold The mt8195 SoC has several hotspots around the CPUs. Specify the targeted temperature threshold when to apply the mitigation and define the associated cooling devices. Signed-off-by: Balsam CHIHI Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230209105628.50294-7-bchihi@baylibre.com Signed-off-by: Matthias Brugger commit fd1c6f13cfc3db3b7bb4ab10d4599e9ed374cd53 Author: Balsam CHIHI Date: Thu Feb 9 11:56:27 2023 +0100 arm64: dts: mediatek: mt8195: Add thermal zones and thermal nodes Add thermal zones and thermal nodes for the mt8195. Signed-off-by: Balsam CHIHI Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230209105628.50294-6-bchihi@baylibre.com Signed-off-by: Matthias Brugger commit d6cb9ab4bfeaaa69147948e42d7cff080db82d07 Author: Christophe JAILLET Date: Sun Mar 26 16:14:25 2023 +0200 crypto: mxs-dcp - Use the devm_clk_get_optional_enabled() helper Use devm_clk_get_optional_enabled() instead of hand writing it. This saves some loC and improves the semantic. update the error handling path and the remove function accordingly. Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu commit 75120ef34247b6ca4f1b9e1e6fedd221e2af77d5 Author: Krzysztof Kozlowski Date: Sun Mar 26 10:50:27 2023 +0200 crypto: img-hash - Fix img_hash_match unused warning Mark the of_device_id table as maybe_unused. This fixes a W=1 warning: drivers/crypto/img-hash.c:930:34: error: ‘img_hash_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit 8832023efd20966e29944dac92118dfbf1fa1bc0 Author: Suman Anna Date: Fri Mar 24 20:28:12 2023 +0530 crypto: sa2ul - Select CRYPTO_DES The SA2UL Crypto driver provides support for couple of DES3 algos "cbc(des3_ede)" and "ecb(des3_ede)", and enabling the crypto selftest throws the following errors (as seen on K3 J721E SoCs): saul-crypto 4e00000.crypto: Error allocating fallback algo cbc(des3_ede) alg: skcipher: failed to allocate transform for cbc-des3-sa2ul: -2 saul-crypto 4e00000.crypto: Error allocating fallback algo ecb(des3_ede) alg: skcipher: failed to allocate transform for ecb-des3-sa2ul: -2 Fix this by selecting CRYPTO_DES which was missed while adding base driver support. Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver") Signed-off-by: Suman Anna Signed-off-by: Jayesh Choudhary Signed-off-by: Herbert Xu commit c616fb0cbae8af5f3f837f54c625700992dcd78d Author: Herbert Xu Date: Fri Mar 24 17:59:38 2023 +0800 crypto: lib/utils - Move utilities into new header The utilities have historically resided in algapi.h as they were first used internally before being exported. Move them into a new header file so external users don't see internal API details. Signed-off-by: Herbert Xu commit 9c19fb86a8cb2ee82a832c95e139f29ea05c4d08 Author: Christophe JAILLET Date: Tue Mar 21 07:59:30 2023 +0100 crypto: caam - Clear some memory in instantiate_rng According to the comment at the end of the 'for' loop just a few lines below, it looks needed to clear 'desc'. So it should also be cleared for the first iteration. Move the memset() to the beginning of the loop to be safe. Fixes: 281922a1d4f5 ("crypto: caam - add support for SEC v5.x RNG4") Signed-off-by: Christophe JAILLET Reviewed-by: Gaurav Jain Signed-off-by: Herbert Xu commit 7d690f936e9bc9fbd6394fb3d4ad181af03ee393 Author: AngeloGioacchino Del Regno Date: Thu Mar 23 10:08:22 2023 +0100 drm/panfrost: Add basic support for speed binning Some SoCs implementing ARM Mali GPUs are subject to speed binning: this means that some versions of the same SoC model may need to be limited to a slower frequency compared to the other: this is being addressed by reading nvmem (usually, an eFuse array) containing a number that identifies the speed binning of the chip, which is usually related to silicon quality. To address such situation, add basic support for reading the speed-bin through nvmem, as to make it possible to specify the supported hardware in the OPP table for GPUs. This commit also keeps compatibility with any platform that does not specify (and does not even support) speed-binning. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Boris Brezillon Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20230323090822.61766-3-angelogioacchino.delregno@collabora.com commit 191308bae4ef67df627158c7effb4f397fa992d4 Author: AngeloGioacchino Del Regno Date: Thu Mar 23 10:08:21 2023 +0100 dt-bindings: gpu: mali-bifrost: Document nvmem for speedbin support Some SoCs implementing ARM Mali GPUs may be subject to speed binning and the usable bin is read from nvmem: document the addition of nvmem and nvmem-cells for 'speed-bin'. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20230323090822.61766-2-angelogioacchino.delregno@collabora.com commit df1875c4f345092716f1529d6e8c43e7fc7f250a Author: Ryder Lee Date: Tue Mar 28 01:07:42 2023 +0800 wifi: mac80211: enable EHT mesh support Similar to AP beacon, this enables the basic mesh EHT mode, including EHT operation IE and the fixed field of EHT operation information IE. As for the optional part (i.e. preamble puncturing bitmap) will be added in future patch. Tested-by: Lian Chen Signed-off-by: Ryder Lee Link: https://lore.kernel.org/r/1e0ddb9001312451c3e99c4eed2072caf8075f61.1679935259.git.ryder.lee@mediatek.com Signed-off-by: Johannes Berg commit 0b354b8b09be37f672ca0f91855f86331d08f1a4 Merge: aa2aa818cd119 12b220a6171fa Author: Johannes Berg Date: Fri Mar 31 10:51:45 2023 +0200 Merge wireless/main into wireless-next/main There are a few merge conflicts due to overlapping fixes and changes, merge wireless/main to fix them. Signed-off-by: Johannes Berg commit 6332a6ced62ac0c9ad7617be34aa2ee4543a52ab Author: Greg Kroah-Hartman Date: Wed Mar 29 08:01:32 2023 +0200 media: pvrusb2: clean up unneeded complexity in pvrusb2 class logic The pvrusb2 driver struct class logic was dynamically creating a class that should have just been static as it did not do anything special and was only a wrapper around a stock "struct class" implementation. Clean this all up by making a static struct class and modifying the code to correctly reference it. By doing so, lots of unneeded lines of code were removed, and #ifdef logic was cleaned up so that the .c files are not cluttered up with extra complexity following the proper kernel coding style. Cc: Mike Isely Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Reviewed-by: Hans Verkuil Link: https://lore.kernel.org/r/20230329060132.2688621-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b3e70051879c665acdd3a1ab50d0ed58d6a8001f Author: Tvrtko Ursulin Date: Mon Mar 20 15:14:23 2023 +0000 drm/i915: Fix context runtime accounting When considering whether to mark one context as stopped and another as started we need to look at whether the previous and new _contexts_ are different and not just requests. Otherwise the software tracked context start time was incorrectly updated to the most recent lite-restore time- stamp, which was in some cases resulting in active time going backward, until the context switch (typically the heartbeat pulse) would synchronise with the hardware tracked context runtime. Easiest use case to observe this behaviour was with a full screen clients with close to 100% engine load. Signed-off-by: Tvrtko Ursulin Fixes: bb6287cb1886 ("drm/i915: Track context current active time") Cc: # v5.19+ Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20230320151423.1708436-1-tvrtko.ursulin@linux.intel.com [tursulin: Fix spelling in commit msg.] commit ee05d90d0ac7f1f6e8e3403f02a39d83e0ce6729 Author: Kuniyuki Iwashima Date: Wed Mar 29 13:13:48 2023 -0700 tcp: Refine SYN handling for PAWS. Our Network Load Balancer (NLB) [0] has multiple nodes with different IP addresses, and each node forwards TCP flows from clients to backend targets. NLB has an option to preserve the client's source IP address and port when routing packets to backend targets. [1] When a client connects to two different NLB nodes, they may select the same backend target. Then, if the client has used the same source IP and port, the two flows at the backend side will have the same 4-tuple. While testing around such cases, I saw these sequences on the backend target. IP 10.0.0.215.60000 > 10.0.3.249.10000: Flags [S], seq 2819965599, win 62727, options [mss 8365,sackOK,TS val 1029816180 ecr 0,nop,wscale 7], length 0 IP 10.0.3.249.10000 > 10.0.0.215.60000: Flags [S.], seq 3040695044, ack 2819965600, win 62643, options [mss 8961,sackOK,TS val 1224784076 ecr 1029816180,nop,wscale 7], length 0 IP 10.0.0.215.60000 > 10.0.3.249.10000: Flags [.], ack 1, win 491, options [nop,nop,TS val 1029816181 ecr 1224784076], length 0 IP 10.0.0.215.60000 > 10.0.3.249.10000: Flags [S], seq 2681819307, win 62727, options [mss 8365,sackOK,TS val 572088282 ecr 0,nop,wscale 7], length 0 IP 10.0.3.249.10000 > 10.0.0.215.60000: Flags [.], ack 1, win 490, options [nop,nop,TS val 1224794914 ecr 1029816181,nop,nop,sack 1 {4156821004:4156821005}], length 0 It seems to be working correctly, but the last ACK was generated by tcp_send_dupack() and PAWSEstab was increased. This is because the second connection has a smaller timestamp than the first one. In this case, we should send a dup ACK in tcp_send_challenge_ack() to increase the correct counter and rate-limit it properly. Let's check the SYN flag after the PAWS tests to avoid adding unnecessary overhead for most packets. Link: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html [0] Link: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation [1] Signed-off-by: Kuniyuki Iwashima Reviewed-by: Jason Xing Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 816c698c052471f525bea92ff0aeeda8a5844a85 Author: Chunyan Zhang Date: Fri Mar 31 11:31:24 2023 +0800 iommu/sprd: Add support for reattaching an existing domain This IOMMU driver should allow a domain to be attached more than once. If IOMMU is reattaching to the same domain which is attached, there's nothing to be done. If reattching to a previously-used domain, do not alloc DMA buffer again which stores address mapping table to avoid memory leak. Signed-off-by: Chunyan Zhang Link: https://lore.kernel.org/r/20230331033124.864691-3-zhang.lyra@gmail.com Signed-off-by: Joerg Roedel commit 9afea57384d4ae7b2034593eac7fa76c7122762a Author: Chunyan Zhang Date: Fri Mar 31 11:31:23 2023 +0800 iommu/sprd: Release dma buffer to avoid memory leak When attaching to a domain, the driver would alloc a DMA buffer which is used to store address mapping table, and it need to be released when the IOMMU domain is freed. Signed-off-by: Chunyan Zhang Link: https://lore.kernel.org/r/20230331033124.864691-2-zhang.lyra@gmail.com Signed-off-by: Joerg Roedel commit fbe05149e40bc6891b1ed6097ac26dbaa32d2bf8 Author: Vignesh Raghavendra Date: Wed Mar 29 21:23:49 2023 +0530 dmaengine: ti: k3-udma: Add system suspend/resume support The K3 platforms configure the DMA resources with the help of the TI's System Firmware's Device Manager(DM) over TISCI. The group of DMA related Resource Manager[1] TISCI messages includes: INTA, RINGACC, UDMAP, and PSI-L. This configuration however, does not persist in the DM after leaving from Suspend-to-RAM state. We have to restore the DMA channel configuration over TISCI for all configured channels when returning from suspend. The TISCI resource management calls for each DMA type (UDMA, PKTDMA, BCDMA) happen in device_free_chan_resources() and device_alloc_chan_resources(). In pm_suspend() we store the current udma_chan_config for channels that still have attached clients and call device_free_chan_resources(). In pm_resume() restore the udma_channel_config from backup and call device_alloc_chan_resources() for those channels. Drivers like CPSW that use k3-udma-glue already do their own DMA resource management so use the late system suspend/resume hooks. [1] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/index.html#resource-management-rm Signed-off-by: Vignesh Raghavendra [g-vlaev@ti.com: Add patch description and config backup] [g-vlaev@ti.com: Supend only channels with clients] Signed-off-by: Georgi Vlaev Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230329155349.2566010-1-vigneshr@ti.com Signed-off-by: Vinod Koul commit 7511f28792c6c724cc584a42f3eeb2fa5af689c4 Author: Mark Salter Date: Wed Mar 29 13:21:29 2023 -0400 dmaengine: tegra: explicitly select DMA_VIRTUAL_CHANNELS Enabling TEGRA186_GPC_DMA will cause this build failure unless some other DMA driver which uses DMA_VIRTUAL_CHANNELS is enabled: ERROR: modpost: "vchan_dma_desc_free_list" [drivers/dma/tegra186-gpc-dma.ko] undefined! ERROR: modpost: "vchan_init" [drivers/dma/tegra186-gpc-dma.ko] undefined! ERROR: modpost: "vchan_tx_submit" [drivers/dma/tegra186-gpc-dma.ko] undefined! ERROR: modpost: "vchan_tx_desc_free" [drivers/dma/tegra186-gpc-dma.ko] undefined! ERROR: modpost: "vchan_find_desc" [drivers/dma/tegra186-gpc-dma.ko] undefined! make[1]: *** [scripts/Makefile.modpost:136: Module.symvers] Error 1 Add an explicit select of DMA_VIRTUAL_CHANNELS to avoid this. Signed-off-by: Mark Salter Link: https://lore.kernel.org/r/20230329172129.88403-1-msalter@redhat.com Signed-off-by: Vinod Koul commit 99b5726b44230329f35b4c4d7fe1577d4f4edb31 Author: Jason Gunthorpe Date: Wed Mar 22 13:08:03 2023 -0700 iommu: Remove ioasid infrastructure This has no use anymore, delete it all. Reviewed-by: Kevin Tian Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe Signed-off-by: Jacob Pan Link: https://lore.kernel.org/r/20230322200803.869130-8-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit fffaed1e24b8d114e958d180cb4a8aed3febbb5a Author: Jacob Pan Date: Wed Mar 22 13:08:02 2023 -0700 iommu/ioasid: Rename INVALID_IOASID INVALID_IOASID and IOMMU_PASID_INVALID are duplicated. Rename INVALID_IOASID and consolidate since we are moving away from IOASID infrastructure. Reviewed-by: Dave Jiang Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Reviewed-by: Lu Baolu Signed-off-by: Jacob Pan Link: https://lore.kernel.org/r/20230322200803.869130-7-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit 1a14bf0fc7ed9476284cd6ab358c783fd9a0cb5b Author: Jacob Pan Date: Wed Mar 22 13:08:01 2023 -0700 iommu/sva: Use GFP_KERNEL for pasid allocation We’re not using spinlock-protected IOASID allocation anymore, there’s no need for GFP_ATOMIC. Reviewed-by: Kevin Tian Reviewed-by: Lu Baolu Reviewed-by: Jason Gunthorpe Signed-off-by: Jacob Pan Link: https://lore.kernel.org/r/20230322200803.869130-6-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit 4e14176ab13fb6986dd079c711d46b70712da2f1 Author: Jason Gunthorpe Date: Wed Mar 22 13:08:00 2023 -0700 iommu/sva: Stop using ioasid_set for SVA Instead SVA drivers can use a simple global IDA to allocate PASIDs for each mm_struct. Future work would be to allow drivers using the SVA APIs to reserve global PASIDs from this IDA for their internal use, eg with the DMA API PASID support. Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe Signed-off-by: Jacob Pan Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20230322200803.869130-5-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit 2bef9ba8aefc211674427a0db046a773001b3329 Author: Jacob Pan Date: Wed Mar 22 13:07:59 2023 -0700 iommu/sva: Remove PASID to mm lookup function There is no user of iommu_sva_find() function, remove it so that PASID allocator can be a simple IDA. Device drivers are expected to store and keep track of their own PASID metadata. Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe Signed-off-by: Jacob Pan Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20230322200803.869130-4-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit cd3891158a77685aee6129f7374a018d13540b2c Author: Jacob Pan Date: Wed Mar 22 13:07:58 2023 -0700 iommu/sva: Move PASID helpers to sva code Preparing to remove IOASID infrastructure, PASID management will be under SVA code. Decouple mm code from IOASID. Reviewed-by: Jason Gunthorpe Signed-off-by: Jacob Pan Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20230322200803.869130-3-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit 760f41d182ec94a651977e70045fd61b57973408 Author: Jacob Pan Date: Wed Mar 22 13:07:57 2023 -0700 iommu/vt-d: Remove virtual command interface Virtual command interface was introduced to allow using host PASIDs inside VMs. It is unused and abandoned due to architectural change. With this patch, we can safely remove this feature and the related helpers. Link: https://lore.kernel.org/r/20230210230206.3160144-2-jacob.jun.pan@linux.intel.com Signed-off-by: Jacob Pan Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/20230322200803.869130-2-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit 421b6093f5ac3edf9cb79f36e79b7e2d51d6182b Author: Uwe Kleine-König Date: Tue Mar 21 09:41:25 2023 +0100 iommu/sprd: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230321084125.337021-11-u.kleine-koenig@pengutronix.de Signed-off-by: Joerg Roedel commit 5930df68aec6cc63ea8525c75561dfb203a9441f Author: Uwe Kleine-König Date: Tue Mar 21 09:41:24 2023 +0100 iommu/omap: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230321084125.337021-10-u.kleine-koenig@pengutronix.de Signed-off-by: Joerg Roedel commit 85e1049e50da9409678fc247ebad4c019d68041f Author: Uwe Kleine-König Date: Tue Mar 21 09:41:23 2023 +0100 iommu/mtk_iommu_v1: 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 (mostly) ignored 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. 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: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230321084125.337021-9-u.kleine-koenig@pengutronix.de Signed-off-by: Joerg Roedel commit d8149d39299ec89125a1cb35cdd77defd7a79deb Author: Uwe Kleine-König Date: Tue Mar 21 09:41:22 2023 +0100 iommu/mtk: 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 (mostly) ignored 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. 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: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230321084125.337021-8-u.kleine-koenig@pengutronix.de Signed-off-by: Joerg Roedel commit 816a4afce133e75f5977bbf0f4c24c02280b1a99 Author: Uwe Kleine-König Date: Tue Mar 21 09:41:21 2023 +0100 iommu/msm: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230321084125.337021-7-u.kleine-koenig@pengutronix.de Signed-off-by: Joerg Roedel commit 7471ea50eae448953126c285e8ee0351db5e2b44 Author: Uwe Kleine-König Date: Tue Mar 21 09:41:20 2023 +0100 iommu/ipmmu-vmsa: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230321084125.337021-6-u.kleine-koenig@pengutronix.de Signed-off-by: Joerg Roedel commit 62565a77c2323d32f2be737455729ac7d3efe6ad Author: Uwe Kleine-König Date: Tue Mar 21 09:41:19 2023 +0100 iommu/arm-smmu: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230321084125.337021-5-u.kleine-koenig@pengutronix.de Signed-off-by: Joerg Roedel commit 66c7076f7636f197d8a67416961037d6d2d7b4df Author: Uwe Kleine-König Date: Tue Mar 21 09:41:18 2023 +0100 iommu/arm-smmu-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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230321084125.337021-4-u.kleine-koenig@pengutronix.de Signed-off-by: Joerg Roedel commit f80473183b40bb98a7499c61091c3c55b646f387 Author: Uwe Kleine-König Date: Tue Mar 21 09:41:17 2023 +0100 iommu/apple-dart: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230321084125.337021-3-u.kleine-koenig@pengutronix.de Signed-off-by: Joerg Roedel commit a2972cb89935160bfe515b15d28a77694723ac06 Author: Uwe Kleine-König Date: Tue Mar 21 09:41:16 2023 +0100 iommu/arm-smmu: Drop if with an always false condition The remove and shutdown callback are only called after probe completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so smmu is never NULL. Other functions in this driver also don't check for smmu being non-NULL before using it. Also note that returning an error code from a remove callback doesn't result in the device staying bound. It's still removed and devm allocated resources are freed (among others *smmu and the register mapping). So after an early exit to iommu device stayed around and using it probably oopses. Signed-off-by: Uwe Kleine-König Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20230321084125.337021-2-u.kleine-koenig@pengutronix.de Signed-off-by: Joerg Roedel commit ae63ad9b2cc766bc4b3b6328e68dd27995abb0fe Author: Herbert Xu Date: Wed Mar 29 16:45:33 2023 +0800 macvlan: Fix mc_filter calculation On Wed, Mar 29, 2023 at 08:10:26AM +0000, patchwork-bot+netdevbpf@kernel.org wrote: > > Here is the summary with links: > - [1/2] macvlan: Skip broadcast queue if multicast with single receiver > https://git.kernel.org/netdev/net-next/c/d45276e75e90 > - [2/2] macvlan: Add netlink attribute for broadcast cutoff > https://git.kernel.org/netdev/net-next/c/954d1fa1ac93 Sorry, I made an error and posted my patches from an earlier revision so a follow-up fix was missing: ---8<--- The bc_cutoff patch broke the calculation of mc_filter causing some multicast packets to not make it through to the targeted device. Fix this by checking whether vlan is set instead of cutoff >= 0. Also move the cutoff < 0 logic into macvlan_recompute_bc_filter so that it doesn't change the mc_filter at all. Fixes: d45276e75e90 ("macvlan: Skip broadcast queue if multicast with single receiver") Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit ce7928f7cf988e3f20ec3cca050838b266e9ef14 Merge: dee1efb301f4c aa2aa818cd119 Author: Jakub Kicinski Date: Thu Mar 30 23:52:20 2023 -0700 Merge tag 'wireless-next-2023-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Johannes Berg says: ==================== Major stack changes: * TC offload support for drivers below mac80211 * reduced neighbor report (RNR) handling for AP mode * mac80211 mesh fast-xmit and fast-rx support * support for another mesh A-MSDU format (seems nobody got the spec right) Major driver changes: Kalle moved the drivers that were just plain C files in drivers/net/wireless/ to legacy/ and virtual/ dirs. hwsim * multi-BSSID support * some FTM support ath11k * MU-MIMO parameters support * ack signal support for management packets rtl8xxxu * support for RTL8710BU aka RTL8188GU chips rtw89 * support for various newer firmware APIs ath10k * enabled threaded NAPI on WCN3990 iwlwifi * lots of work for multi-link/EHT (wifi7) * hardware timestamping support for some devices/firwmares * TX beacon protection on newer hardware * tag 'wireless-next-2023-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (181 commits) wifi: clean up erroneously introduced file wifi: iwlwifi: mvm: correctly use link in iwl_mvm_sta_del() wifi: iwlwifi: separate AP link management queues wifi: iwlwifi: mvm: free probe_resp_data later wifi: iwlwifi: bump FW API to 75 for AX devices wifi: iwlwifi: mvm: move max_agg_bufsize into host TLC lq_sta wifi: iwlwifi: mvm: send full STA during HW restart wifi: iwlwifi: mvm: rework active links counting wifi: iwlwifi: mvm: update mac config when assigning chanctx wifi: iwlwifi: mvm: use the correct link queue wifi: iwlwifi: mvm: clean up mac_id vs. link_id in MLD sta wifi: iwlwifi: mvm: fix station link data leak wifi: iwlwifi: mvm: initialize max_rc_amsdu_len per-link wifi: iwlwifi: mvm: use appropriate link for rate selection wifi: iwlwifi: mvm: use the new lockdep-checking macros wifi: iwlwifi: mvm: remove chanctx WARN_ON wifi: iwlwifi: mvm: avoid sending MAC context for idle wifi: iwlwifi: mvm: remove only link-specific AP keys wifi: iwlwifi: mvm: skip inactive links wifi: iwlwifi: mvm: adjust iwl_mvm_scan_respect_p2p_go_iter() for MLO ... ==================== Link: https://lore.kernel.org/r/20230330205612.921134-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit dee1efb301f4c380f454bc84c2258b3d594c9615 Merge: 709d0b880ceae f3d07b02b2b8e Author: Jakub Kicinski Date: Thu Mar 30 23:29:58 2023 -0700 Merge branch 'tools-ynl-fill-in-some-gaps-of-ethtool-spec' Stanislav Fomichev says: ==================== tools: ynl: fill in some gaps of ethtool spec I was trying to fill in the spec while exploring ethtool API for some related work. I don't think I'll have the patience to fill in the rest, so decided to share whatever I currently have. Patches 1-2 add the be16 + spec. Patches 3-4 implement an ethtool-like python tool to test the spec. Patches 3-4 are there because it felt more fun do the tool instead of writing the actual tests; feel free to drop it; sharing mostly to show that the spec is not a complete nonsense. The spec is not 100% complete, see patch 2 for what's missing. I was hoping to finish the stats-get message, but I'm too dump to implement bitmask marshaling (multi-attr). ==================== Link: https://lore.kernel.org/r/20230329221655.708489-1-sdf@google.com Signed-off-by: Jakub Kicinski commit f3d07b02b2b8eba5b0e168405614e15cd6617a43 Author: Stanislav Fomichev Date: Wed Mar 29 15:16:55 2023 -0700 tools: ynl: ethtool testing tool This is what I've been using to see whether the spec makes sense. A small subset of getters (mostly the unprivileged ones) is implemented. Some setters (channels) also work. Setters for messages with bitmasks are not implemented. Initially I was trying to make this tool look 1:1 like real ethtool, but eventually gave up :-) Sample output: $ ./tools/net/ynl/ethtool enp0s31f6 Settings for enp0s31f6: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: no Supports auto-negotiation: yes Supported FEC modes: Not reported Speed: Unknown! Duplex: Unknown! (255) Auto-negotiation: on Port: Twisted Pair PHYAD: 2 Transceiver: Internal MDI-X: Unknown (auto) Current message level: drv probe link Link detected: no Signed-off-by: Stanislav Fomichev Signed-off-by: Jakub Kicinski commit 48993e22d23ae1bda1db3616f5d9baa4e7b18d35 Author: Stanislav Fomichev Date: Wed Mar 29 15:16:54 2023 -0700 tools: ynl: replace print with NlError Instead of dumping the error on the stdout, make the callee and opportunity to decide what to do with it. This is mostly for the ethtool testing. Signed-off-by: Stanislav Fomichev Signed-off-by: Jakub Kicinski commit a353318ebf24100bcc7254d293cd9f041f4075dd Author: Stanislav Fomichev Date: Wed Mar 29 15:16:53 2023 -0700 tools: ynl: populate most of the ethtool spec Things that are not implemented: - cable tests - bitmaks in the requests don't work (needs multi-attr support in ynl.py) - stats-get seems to return nonsense (not passing a bitmask properly?) - notifications are not tested Signed-off-by: Stanislav Fomichev Signed-off-by: Jakub Kicinski commit 9f7cc57fe5508c495d3a75efd7f942aeec0013e0 Author: Stanislav Fomichev Date: Wed Mar 29 15:16:52 2023 -0700 tools: ynl: support byte-order in cli Used by ethtool spec. Signed-off-by: Stanislav Fomichev Signed-off-by: Jakub Kicinski commit 709d0b880ceae9503ce4282fcfaf4cb59c6dd267 Author: Simon Horman Date: Wed Mar 29 13:23:56 2023 +0200 octeontx2-af: update type of prof fields in nix_aw_enq_req Update type of prof and prof_mask fields in nix_as_enq_req from u64 to struct nix_bandprof_s, which is 128 bits wide. This is to address warnings with compiling with gcc-12 W=1 regarding string fortification. Although the union of which these fields are a member is 128bits wide, and thus writing a 128bit entity is safe, the compiler flags a problem as the field being written is only 64 bits wide. CC [M] drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.o scripts/Makefile.build:252: ./drivers/net/ethernet/marvell/octeontx2/nic/Makefile: otx2_dcbnl.o is added to multiple modules: rvu_nicpf rvu_nicvf CC [M] drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.o CC [M] drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.o CC [M] drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.o CC [M] drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.o In file included from ./include/linux/string.h:254, from ./include/linux/bitmap.h:11, from ./include/linux/cpumask.h:12, from ./arch/x86/include/asm/paravirt.h:17, from ./arch/x86/include/asm/cpuid.h:62, from ./arch/x86/include/asm/processor.h:19, from ./arch/x86/include/asm/timex.h:5, from ./include/linux/timex.h:67, from ./include/linux/time32.h:13, from ./include/linux/time.h:60, from ./include/linux/stat.h:19, from ./include/linux/module.h:13, from drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:8: In function 'fortify_memcpy_chk', inlined from 'rvu_nix_blk_aq_enq_inst' at drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:969:4: ./include/linux/fortify-string.h:529:25: error: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror=attribute-warning] 529 | __read_overflow2_field(q_size_field, size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function 'fortify_memcpy_chk', inlined from 'rvu_nix_blk_aq_enq_inst' at drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:984:4: ./include/linux/fortify-string.h:529:25: error: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror=attribute-warning] 529 | __read_overflow2_field(q_size_field, size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Compile tested only! Signed-off-by: Simon Horman Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20230329112356.458072-1-horms@kernel.org Signed-off-by: Jakub Kicinski commit f76b9bba255a5ba1594d6c6d027f3a1603159d00 Merge: 46e9acb7ae2a3 533a89b1940f5 Author: Jakub Kicinski Date: Thu Mar 30 23:24:26 2023 -0700 Merge branch 'net-sched-act_tunnel_key-add-support-for-tunnel_dont_fragment' Davide Caratti says: ==================== net/sched: act_tunnel_key: add support for TUNNEL_DONT_FRAGMENT - patch 1 extends TC tunnel_key action to add support for TUNNEL_DONT_FRAGMENT - patch 2 extends tdc to skip tests when iproute2 support is missing - patch 3 adds a tdc test case to verify functionality of the control plane - patch 4 adds a net/forwarding test case to verify functionality of the data plane ==================== Link: https://lore.kernel.org/r/cover.1680082990.git.dcaratti@redhat.com Signed-off-by: Jakub Kicinski commit 533a89b1940f527c6819f046e2aefb60df8a13d3 Author: Davide Caratti Date: Wed Mar 29 11:54:55 2023 +0200 selftests: forwarding: add tunnel_key "nofrag" test case Add a selftest that configures metadata tunnel encapsulation using the TC "tunnel_key" action: it includes a test case for setting "nofrag" flag. Example output: # selftests: net/forwarding: tc_tunnel_key.sh # TEST: tunnel_key nofrag (skip_hw) [ OK ] # INFO: Could not test offloaded functionality ok 1 selftests: net/forwarding: tc_tunnel_key.sh Signed-off-by: Davide Caratti Signed-off-by: Jakub Kicinski commit b8617f8eed84e12c26f2220733280187466a0615 Author: Davide Caratti Date: Wed Mar 29 11:54:54 2023 +0200 selftests: tc-testing: add tunnel_key "nofrag" test case # ./tdc.py -e 6bda -l 6bda: (actions, tunnel_key) Add tunnel_key action with nofrag option Acked-by: Jamal Hadi Salim Signed-off-by: Davide Caratti Signed-off-by: Jakub Kicinski commit 7f3f86402609315d6b98f6c76713e07b5a9562aa Author: Davide Caratti Date: Wed Mar 29 11:54:53 2023 +0200 selftests: tc-testing: add "depends_on" property to skip tests currently, users can skip individual test cases by means of writing "skip": "yes" in the scenario file. Extend this functionality, introducing 'dependsOn': it's optional property like "skip", but the value contains a command (for example, a probe on iproute2 to check if it supports a specific feature). If such property is present, tdc executes that command and skips the test when the return value is non-zero. Reviewed-by: Pedro Tammela Signed-off-by: Davide Caratti Signed-off-by: Jakub Kicinski commit 2384127e98db52a6ac2577924ad9cae25f3e7472 Author: Davide Caratti Date: Wed Mar 29 11:54:52 2023 +0200 net/sched: act_tunnel_key: add support for "don't fragment" extend "act_tunnel_key" to allow specifying TUNNEL_DONT_FRAGMENT. Suggested-by: Ilya Maximets Reviewed-by: Pedro Tammela Acked-by: Jamal Hadi Salim Signed-off-by: Davide Caratti Signed-off-by: Jakub Kicinski commit 46e9acb7ae2a36643b8c43f5107c072cbbc48572 Author: Petr Machata Date: Wed Mar 29 17:24:53 2023 +0200 selftests: rtnetlink: Fix do_test_address_proto() This selftest was introduced recently in the commit cited below. It misses several check_err() invocations to actually verify that the previous command succeeded. When these are added, the first one fails, because besides the addresses added by hand, there can be a link-local address added by the kernel. Adjust the check to expect at least three addresses instead of exactly three, and add the missing check_err's. Furthermore, the explanatory comments assume that the address with no protocol is $addr2, when in fact it is $addr3. Update the comments. Fixes: 6a414fd77f61 ("selftests: rtnetlink: Add an address proto test") Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/53a579bc883e1bf2fe490d58427cf22c2d1aa21f.1680102695.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 3292004c90c8aba74600a5cd8d10f8186fd48269 Author: Nathan Chancellor Date: Wed Mar 29 08:08:01 2023 -0700 net: ethernet: ti: Fix format specifier in netcp_create_interface() After commit 3948b05950fd ("net: introduce a config option to tweak MAX_SKB_FRAGS"), clang warns: drivers/net/ethernet/ti/netcp_core.c:2085:4: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] MAX_SKB_FRAGS); ^~~~~~~~~~~~~ include/linux/dev_printk.h:144:65: note: expanded from macro 'dev_err' dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap' _p_func(dev, fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ include/linux/skbuff.h:352:23: note: expanded from macro 'MAX_SKB_FRAGS' #define MAX_SKB_FRAGS CONFIG_MAX_SKB_FRAGS ^~~~~~~~~~~~~~~~~~~~ ./include/generated/autoconf.h:11789:30: note: expanded from macro 'CONFIG_MAX_SKB_FRAGS' #define CONFIG_MAX_SKB_FRAGS 17 ^~ 1 warning generated. Follow the pattern of the rest of the tree by changing the specifier to '%u' and casting MAX_SKB_FRAGS explicitly to 'unsigned int', which eliminates the warning. Fixes: 3948b05950fd ("net: introduce a config option to tweak MAX_SKB_FRAGS") Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20230329-net-ethernet-ti-wformat-v1-1-83d0f799b553@kernel.org Signed-off-by: Jakub Kicinski commit eb1ab7650d358b553cc946035fd7c7bdda1856e3 Author: Vladimir Oltean Date: Wed Mar 29 16:38:19 2023 +0300 net: dsa: fix db type confusion in host fdb/mdb add/del We have the following code paths: Host FDB (unicast RX filtering): dsa_port_standalone_host_fdb_add() dsa_port_bridge_host_fdb_add() | | +--------------+ +------------+ | | v v dsa_port_host_fdb_add() dsa_port_standalone_host_fdb_del() dsa_port_bridge_host_fdb_del() | | +--------------+ +------------+ | | v v dsa_port_host_fdb_del() Host MDB (multicast RX filtering): dsa_port_standalone_host_mdb_add() dsa_port_bridge_host_mdb_add() | | +--------------+ +------------+ | | v v dsa_port_host_mdb_add() dsa_port_standalone_host_mdb_del() dsa_port_bridge_host_mdb_del() | | +--------------+ +------------+ | | v v dsa_port_host_mdb_del() The logic added by commit 5e8a1e03aa4d ("net: dsa: install secondary unicast and multicast addresses as host FDB/MDB") zeroes out db.bridge.num if the switch doesn't support ds->fdb_isolation (the majority doesn't). This is done for a reason explained in commit c26933639b54 ("net: dsa: request drivers to perform FDB isolation"). Taking a single code path as example - dsa_port_host_fdb_add() - the others are similar - the problem is that this function handles: - DSA_DB_PORT databases, when called from dsa_port_standalone_host_fdb_add() - DSA_DB_BRIDGE databases, when called from dsa_port_bridge_host_fdb_add() So, if dsa_port_host_fdb_add() were to make any change on the "bridge.num" attribute of the database, this would only be correct for a DSA_DB_BRIDGE, and a type confusion for a DSA_DB_PORT bridge. However, this bug is without consequences, for 2 reasons: - dsa_port_standalone_host_fdb_add() is only called from code which is (in)directly guarded by dsa_switch_supports_uc_filtering(ds), and that function only returns true if ds->fdb_isolation is set. So, the code only executed for DSA_DB_BRIDGE databases. - Even if the code was not dead for DSA_DB_PORT, we have the following memory layout: struct dsa_bridge { struct net_device *dev; unsigned int num; bool tx_fwd_offload; refcount_t refcount; }; struct dsa_db { enum dsa_db_type type; union { const struct dsa_port *dp; // DSA_DB_PORT struct dsa_lag lag; struct dsa_bridge bridge; // DSA_DB_BRIDGE }; }; So, the zeroization of dsa_db :: bridge :: num on a dsa_db structure of type DSA_DB_PORT would access memory which is unused, because we only use dsa_db :: dp for DSA_DB_PORT, and this is mapped at the same address with dsa_db :: dev for DSA_DB_BRIDGE, thanks to the union definition. It is correct to fix up dsa_db :: bridge :: num only from code paths that come from the bridge / switchdev, so move these there. Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230329133819.697642-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 9a865a98a3360d06f92549839abda1bc96104aea Author: Tom Rix Date: Wed Mar 29 08:59:29 2023 -0400 net: ksz884x: remove unused change variable clang with W=1 reports drivers/net/ethernet/micrel/ksz884x.c:3216:6: error: variable 'change' set but not used [-Werror,-Wunused-but-set-variable] int change = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230329125929.1808420-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit 1164c92b2d13648fb156fe547dd1273111f05e3d Author: Jouni Högander Date: Wed Mar 29 18:07:03 2023 +0300 drm/i915/psr: Implement Display WA #1136 Implement Display WA #1136 for Pre-ICL. Bspec: 21664 v2: Handle disable psr in pre/post plane hooks Signed-off-by: Jouni Högander Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230329150703.432072-7-jouni.hogander@intel.com commit 8d18373a0ef91845781755492510e00b5a912a0a Author: Jouni Högander Date: Wed Mar 29 18:07:02 2023 +0300 drm/i915/psr: Check that vblank is long enough for psr2 Ensure vblank >= psr2 vblank where Psr2 vblank = PSR2_CTL Block Count Number maximum line count. Bspec: 71580, 49274 v2: Use calculated block count number maximum line count Signed-off-by: Jouni Högander Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230329150703.432072-6-jouni.hogander@intel.com commit f389e7ac8d8a9a17bf59507d02ffb756c19b4af5 Author: Jouni Högander Date: Wed Mar 29 18:07:01 2023 +0300 drm/i915/psr: Add helpers for block count number handling Add helpers to make it more clear how PSR2_CTL[Block Count Number] is configured. Signed-off-by: Jouni Högander Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230329150703.432072-5-jouni.hogander@intel.com commit cdb015a61190060094152ff8ff6c6f34b616c13c Author: Jouni Högander Date: Wed Mar 29 18:07:00 2023 +0300 drm/i915/psr: Implement Wa_14015648006 PSR WM optimization should be disabled based on any wm level being disabled. Also same WA should be applied for ICL as well. Bspec: 71580 v5: - Set in pre plane hook and clear in post plane hook v4: - Handle mode change in psr enable/disable - Handle wm_level_disable changes separately in pre plane hook v3: - Split patch v2: - set/clear chicken bit in post_plane_update - apply for ICL as well Signed-off-by: Jouni Högander Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230329150703.432072-4-jouni.hogander@intel.com commit 44222656ecff73974c637b6b9c9bb5415978ed08 Author: Jouni Högander Date: Wed Mar 29 18:06:59 2023 +0300 drm/i915/psr: Modify/Fix Wa_16013835468 and prepare for Wa_14015648006 Wa_16013835468 is a separate from Wa_14015648006 and needs to be applied for display version 12. Fix this by removing all the references to Wa_14015648006 and apply Wa_16013835468 according to Bspec. Also move workaround into separate function as a preparation for Wa_14015648006 implementation. Bspec: 55378 v3: - apply for display version 12 only v2: - keep applying the wa in intel_psr_enable_source Signed-off-by: Jouni Högander Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230329150703.432072-3-jouni.hogander@intel.com commit 19d06582c47572be9635cf126195135df0720118 Author: Jouni Högander Date: Wed Mar 29 18:06:58 2023 +0300 drm/i915/psr: Unify pre/post hooks pre/post hooks are doing things differently. Unify them. Signed-off-by: Jouni Högander Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230329150703.432072-2-jouni.hogander@intel.com commit 79548b7984e4c606c6caaad72a0864a83855ebc9 Merge: da617cd8d9060 b2bc47e9b2011 Author: Jakub Kicinski Date: Thu Mar 30 14:43:03 2023 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Conflicts: drivers/net/ethernet/mediatek/mtk_ppe.c 3fbe4d8c0e53 ("net: ethernet: mtk_eth_soc: ppe: add support for flow accounting") 924531326e2d ("net: ethernet: mtk_eth_soc: add missing ppe cache flush when deleting a flow") Signed-off-by: Jakub Kicinski commit 8d8d062be6b96b1ba95a3f1a9ecaf218c9458497 Author: Daniele Ceraolo Spurio Date: Mon Mar 27 18:24:30 2023 -0700 drm/i915/mtl: Fix MTL stolen memory GGTT mapping The PTEs expect the offset from the base of the fake LMEM region (i.e. the base of stolen) and not from the base of the DSM. Quoting the specs: "Driver will set the Device Memory bit = 1 in the PTE when pointing to a page in DSM and program the PTE with offset from LMEM_BAR. Device Memory Offset from LMEM_BAR is same as offset from BGSM." DSM starts 8MBs from BGSM, so we set dsm_base = 8MB. Signed-off-by: Daniele Ceraolo Spurio Cc: Aravind Iddamsetty Cc: Matt Roper Cc: Lucas De Marchi Cc: Jani Nikula Cc: Nirmoy Das Cc: Fei Yang Cc: Radhakrishna Sripada Reviewed-by: Andi Shyti Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20230328012430.2524330-1-daniele.ceraolospurio@intel.com commit 67efbd57bc6e57de276b964f023f8f947bc52460 Author: David Vernet Date: Thu Mar 30 09:52:03 2023 -0500 selftests/bpf: Add testcases for ptr_*_or_null_ in bpf_kptr_xchg The second argument of the bpf_kptr_xchg() helper function is ARG_PTR_TO_BTF_ID_OR_NULL. A recent patch fixed a bug whereby the verifier would fail with an internal error message if a program invoked the helper with a PTR_TO_BTF_ID | PTR_MAYBE_NULL register. This testcase adds some testcases to ensure that it fails gracefully moving forward. Before the fix, these testcases would have failed an error resembling the following: ; p = bpf_kfunc_call_test_acquire(&(unsigned long){0}); 99: (7b) *(u64 *)(r10 -16) = r7 ; frame1: ... 100: (bf) r1 = r10 ; frame1: ... 101: (07) r1 += -16 ; frame1: ... ; p = bpf_kfunc_call_test_acquire(&(unsigned long){0}); 102: (85) call bpf_kfunc_call_test_acquire#13908 ; frame1: R0_w=ptr_or_null_prog_test_ref_kfunc... ; p = bpf_kptr_xchg(&v->ref_ptr, p); 103: (bf) r1 = r6 ; frame1: ... 104: (bf) r2 = r0 ; frame1: R0_w=ptr_or_null_prog_test_ref_kfunc... 105: (85) call bpf_kptr_xchg#194 verifier internal error: invalid PTR_TO_BTF_ID register for type match Signed-off-by: David Vernet Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230330145203.80506-2-void@manifault.com commit e4c2acab95a5947fe7948140a83e4f4918c6c048 Author: David Vernet Date: Thu Mar 30 09:52:02 2023 -0500 bpf: Handle PTR_MAYBE_NULL case in PTR_TO_BTF_ID helper call arg When validating a helper function argument, we use check_reg_type() to ensure that the register containing the argument is of the correct type. When the register's base type is PTR_TO_BTF_ID, there is some supplemental logic where we do extra checks for various combinations of PTR_TO_BTF_ID type modifiers. For example, for PTR_TO_BTF_ID, PTR_TO_BTF_ID | PTR_TRUSTED, and PTR_TO_BTF_ID | MEM_RCU, we call map_kptr_match_type() for bpf_kptr_xchg() calls, and btf_struct_ids_match() for other helper calls. When an unhandled PTR_TO_BTF_ID type modifier combination is passed to check_reg_type(), the verifier fails with an internal verifier error message. This can currently be triggered by passing a PTR_MAYBE_NULL pointer to helper functions (currently just bpf_kptr_xchg()) with an ARG_PTR_TO_BTF_ID_OR_NULL arg type. For example, by callin bpf_kptr_xchg(&v->kptr, bpf_cpumask_create()). Whether or not passing a PTR_MAYBE_NULL arg to an ARG_PTR_TO_BTF_ID_OR_NULL argument is valid is an interesting question. In a vacuum, it seems fine. A helper function with an ARG_PTR_TO_BTF_ID_OR_NULL arg would seem to be implying that it can handle either a NULL or non-NULL arg, and has logic in place to detect and gracefully handle each. This is the case for bpf_kptr_xchg(), which of course simply does an xchg(). On the other hand, bpf_kptr_xchg() also specifies OBJ_RELEASE, and refcounting semantics for a PTR_MAYBE_NULL pointer is different than handling it for a NULL _OR_ non-NULL pointer. For example, with a non-NULL arg, we should always fail if there was not a nonzero refcount for the value in the register being passed to the helper. For PTR_MAYBE_NULL on the other hand, it's unclear. If the pointer is NULL it would be fine, but if it's not NULL, it would be incorrect to load the program. The current solution to this is to just fail if PTR_MAYBE_NULL is passed, and to instead require programs to have a NULL check to explicitly handle the NULL and non-NULL cases. This seems reasonable. Not only would it possibly be quite complicated to correctly handle PTR_MAYBE_NULL refcounting in the verifier, but it's also an arguably odd programming pattern in general to not explicitly handle the NULL case anyways. For example, it seems odd to not care about whether a pointer you're passing to bpf_kptr_xchg() was successfully allocated in a program such as the following: private(MASK) static struct bpf_cpumask __kptr * global_mask; SEC("tp_btf/task_newtask") int BPF_PROG(example, struct task_struct *task, u64 clone_flags) { struct bpf_cpumask *prev; /* bpf_cpumask_create() returns PTR_MAYBE_NULL */ prev = bpf_kptr_xchg(&global_mask, bpf_cpumask_create()); if (prev) bpf_cpumask_release(prev); return 0; } This patch therefore updates the verifier to explicitly check for PTR_MAYBE_NULL in check_reg_type(), and fail gracefully if it's observed. This isn't really "fixing" anything unsafe or incorrect. We're just updating the verifier to fail gracefully, and explicitly handle this pattern rather than unintentionally falling back to an internal verifier error path. A subsequent patch will update selftests. Signed-off-by: David Vernet Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230330145203.80506-1-void@manifault.com commit d816129530e77b905b492631651eb09a18789692 Author: Andrii Nakryiko Date: Thu Mar 30 12:01:15 2023 -0700 veristat: change guess for __sk_buff from CGROUP_SKB to SCHED_CLS SCHED_CLS seems to be a better option as a default guess for freplace programs that have __sk_buff as a context type. Reported-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230330190115.3942962-1-andrii@kernel.org Signed-off-by: Martin KaFai Lau commit aa2aa818cd1198cfa2498116d57cd9f13fea80e4 Author: Johannes Berg Date: Thu Mar 30 22:48:45 2023 +0200 wifi: clean up erroneously introduced file Evidently Gregory sent this file but I (apparently every else) missed it entirely, remove that. Fixes: cf85123a210f ("wifi: iwlwifi: mvm: support enabling and disabling HW timestamping") Signed-off-by: Johannes Berg commit 9b7c68b3911aef84afa4cbfc31bce20f10570d51 Author: Paul Blakey Date: Wed Mar 22 09:35:32 2023 +0200 netfilter: ctnetlink: Support offloaded conntrack entry deletion Currently, offloaded conntrack entries (flows) can only be deleted after they are removed from offload, which is either by timeout, tcp state change or tc ct rule deletion. This can cause issues for users wishing to manually delete or flush existing entries. Support deletion of offloaded conntrack entries. Example usage: # Delete all offloaded (and non offloaded) conntrack entries # whose source address is 1.2.3.4 $ conntrack -D -s 1.2.3.4 # Delete all entries $ conntrack -F Signed-off-by: Paul Blakey Reviewed-by: Simon Horman Acked-by: Pablo Neira Ayuso Signed-off-by: Florian Westphal commit a25b8b7136ad43760bd876af62b6e59abd30496c Author: Matthieu De Beule Date: Wed Mar 29 12:52:18 2023 +0000 netfilter: Correct documentation errors in nf_tables.h NFTA_RANGE_OP incorrectly says nft_cmp_ops instead of nft_range_ops. NFTA_LOG_GROUP and NFTA_LOG_QTHRESHOLD claim NLA_U32 instead of NLA_U16 NFTA_EXTHDR_SREG isn't documented as a register Signed-off-by: Matthieu De Beule Signed-off-by: Florian Westphal commit 28c1b6df436819a7ed8a781835766e45139771a3 Author: Eric Sage Date: Mon Mar 27 13:44:49 2023 -0400 netfilter: nfnetlink_queue: enable classid socket info retrieval This enables associating a socket with a v1 net_cls cgroup. Useful for applying a per-cgroup policy when processing packets in userspace. Signed-off-by: Eric Sage Signed-off-by: Florian Westphal commit 356e2adb3f3b9fe4427224eec2f8819a3078665f Author: Florian Westphal Date: Tue Mar 28 18:44:15 2023 +0200 netfilter: nfnetlink_log: remove rcu_bh usage structure is free'd via call_rcu, so its safe to use rcu_read_lock only. While at it, skip rcu_read_lock for lookup from packet path, its always called with rcu held. Signed-off-by: Florian Westphal commit 00168b415a60cec7558608efb4fc50f2a73daae2 Author: Gustavo A. R. Silva Date: Thu Mar 23 14:41:16 2023 -0600 uapi: net: ipv6: Replace fake flex-array with flex-array member Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Address the following warning found with GCC-13 and -fstrict-flex-arrays=3 enabled: net/ipv6/exthdrs.c: In function ‘fl6_update_dst’: net/ipv6/exthdrs.c:1393:28: warning: array subscript 0 is outside array bounds of ‘struct in6_addr[0]’ [-Warray-bounds=] 1393 | fl6->daddr = *((struct rt0_hdr *)opt->srcrt)->addr; | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ./include/linux/ipv6.h:5, from ./include/linux/icmpv6.h:6, from net/ipv6/exthdrs.c:27: ./include/uapi/linux/ipv6.h:84:33: note: while referencing ‘addr’ 84 | struct in6_addr addr[0]; | ^~~~ net/ipv6/exthdrs.c: In function ‘ipv6_push_rthdr0.isra’: net/ipv6/exthdrs.c:1125:19: warning: array subscript is outside array bounds of ‘struct in6_addr[0]’ [-Warray-bounds=] 1125 | phdr->addr[hops - 1] = **addr_p; | ~~~~~~~~~~^~~~~~~~~~ ./include/uapi/linux/ipv6.h:84:33: note: while referencing ‘addr’ 84 | struct in6_addr addr[0]; | ^~~~ This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/276 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva commit 363b7fd76c91dc611a56d992e9550bb1ba070e1a Author: Joe Thornber Date: Wed Mar 29 10:29:34 2023 -0400 dm: improve hash_locks sizing and hash function Both bufio and bio-prison-v1 use the identical model for splitting their respective locks and rbtrees. Improve dm_num_hash_locks() to distribute across more rbtrees to improve overall performance -- but the maximum number of locks/rbtrees is still 64. Also factor out a common hash function named dm_hash_locks_index(), the magic numbers used were determined to be best using this program: https://gist.github.com/jthornber/e05c47daa7b500c56dc339269c5467fc Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit b6279f82eb11a1f380af3a26acf921c37505fc86 Author: Mike Snitzer Date: Mon Mar 27 14:30:46 2023 -0400 dm bio prison v1: intelligently size dm_bio_prison's prison_regions Size the dm_bio_prison's number of prison_region structs using dm_num_hash_locks(). Signed-off-by: Mike Snitzer commit c6273411d1803ed03d4f0628bc629a8c45774351 Author: Mike Snitzer Date: Mon Mar 27 14:09:45 2023 -0400 dm bio prison v1: prepare to intelligently size dm_bio_prison's prison_regions Add num_locks member to dm_bio_prison struct and use it rather than the NR_LOCKS magic value (64). Next commit will size the dm_bio_prison's prison_regions according to dm_num_hash_locks(). Signed-off-by: Mike Snitzer commit 1e84c4b7322d44a5b7d7f83eced1f60cc0ecf1a4 Author: Mike Snitzer Date: Mon Mar 27 14:30:46 2023 -0400 dm bufio: intelligently size dm_buffer_cache's buffer_trees Size the dm_buffer_cache's number of buffer_tree structs using dm_num_hash_locks(). Signed-off-by: Mike Snitzer commit 36c18b86390824f93ed1580500df9698978e2006 Author: Mike Snitzer Date: Mon Mar 27 14:09:45 2023 -0400 dm bufio: prepare to intelligently size dm_buffer_cache's buffer_trees Add num_locks member to dm_buffer_cache struct and use it rather than the NR_LOCKS magic value (64). Next commit will size the dm_buffer_cache's buffer_trees according to dm_num_hash_locks(). Signed-off-by: Mike Snitzer commit 0bac3f2f28b87b520e50a196c42409485acfe5cf Author: Mike Snitzer Date: Mon Mar 27 13:59:25 2023 -0400 dm: add dm_num_hash_locks() Simple helper to use when DM core code needs to appropriately size, based on num_online_cpus(), its data structures that split locks. dm_num_hash_locks() rounds up num_online_cpus() to next power of 2 but caps return at DM_HASH_LOCKS_MAX (64). This heuristic may evolve as warranted, but as-is it will serve as a more informed basis for sizing the sharded lock structs in dm-bufio's dm_buffer_cache (buffer_trees) and dm-bio-prison-v1's dm_bio_prison (prison_regions). Signed-off-by: Mike Snitzer commit 3f8d3f5432078a558151e27230e20bcf93c23ffe Author: Mike Snitzer Date: Sat Mar 25 17:52:01 2023 -0400 dm bio prison v1: add dm_cell_key_has_valid_range Don't have bio_detain() BUG_ON if a dm_cell_key is beyond BIO_PRISON_MAX_RANGE or spans a boundary. Update dm-thin.c:build_key() to use dm_cell_key_has_valid_range() which will do this checking without using BUG_ON. Also update process_discard_bio() to check the discard bio that DM core passes in (having first imposed max_discard_granularity based splitting). dm_cell_key_has_valid_range() will merely WARN_ON_ONCE if it returns false because if it does: it is programmer error that should be caught with proper testing. So relax the BUG_ONs to be WARN_ON_ONCE. Signed-off-by: Mike Snitzer commit e2dd8aca2d76f937f1f08d03041684f3532e9df4 Author: Joe Thornber Date: Thu Mar 2 09:35:37 2023 +0000 dm bio prison v1: improve concurrent IO performance Split the bio prison into multiple regions, with a separate rbtree and associated lock for each region. To get fast bio prison locking and not damage the performance of discards too much the bio-prison now stipulates that discards should not cross a BIO_PRISON_MAX_RANGE boundary. Because the range of a key (block_end - block_begin) must not exceed BIO_PRISON_MAX_RANGE: break_up_discard_bio() now ensures the data range reflected in PHYSICAL key doesn't exceed BIO_PRISON_MAX_RANGE. And splitting the thin target's discards (handled with VIRTUAL key) is achieved by updating dm-thin.c to set limits->max_discard_sectors in terms of BIO_PRISON_MAX_RANGE _and_ setting the thin and thin-pool targets' max_discard_granularity to true. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit 06961c487a33a222fd3d84998dc6398ed0449373 Author: Mike Snitzer Date: Wed Mar 1 12:48:43 2023 -0500 dm: split discards further if target sets max_discard_granularity The block core (bio_split_discard) will already split discards based on the 'discard_granularity' and 'max_discard_sectors' queue_limits. But the DM thin target also needs to ensure that it doesn't receive a discard that spans a 'max_discard_sectors' boundary. Introduce a dm_target 'max_discard_granularity' flag that if set will cause DM core to split discard bios relative to 'max_discard_sectors'. This treats 'discard_granularity' as a "min_discard_granularity" and 'max_discard_sectors' as a "max_discard_granularity". Requested-by: Joe Thornber Signed-off-by: Mike Snitzer commit bb46c56165faf284cf42c197317bff24f899835a Author: Joe Thornber Date: Wed Mar 22 13:34:49 2023 +0000 dm thin: speed up cell_defer_no_holder() Reduce the time that a spinlock is held in cell_defer_no_holder(). Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit 56c5de4406f8234123ad08d4615865dbc13f743a Author: Mikulas Patocka Date: Tue Mar 21 10:18:10 2023 -0400 dm bufio: use multi-page bio vector The kernel supports multi page bio vector entries, so we can use them in dm-bufio as an optimization. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit f5f93541202f2e619c1395f5d98868b70cf60f50 Author: Mikulas Patocka Date: Thu Mar 23 11:25:49 2023 -0400 dm bufio: use waitqueue_active in __free_buffer_wake Save one spinlock by using waitqueue_active. We hold the bufio lock at this place, so no one can add entries to the waitqueue at this point. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 530f683ddcd211a4dc5d60a13e6f4918a541bb8d Author: Mike Snitzer Date: Tue Mar 21 12:06:38 2023 -0400 dm bufio: move dm_bufio_client members to avoid spanning cachelines Movement also consolidates holes in dm_bufio_client struct. But the overall size of the struct isn't changed. Signed-off-by: Mike Snitzer commit 791188065be0d3715e6696412ab9c7a5f6b52bd3 Author: Joe Thornber Date: Fri Mar 24 23:01:03 2023 -0400 dm bufio: add lock_history optimization for cache iterators Sometimes it is beneficial to repeatedly get and drop locks as part of an iteration. Introduce lock_history struct to help avoid redundant drop and gets of the same lock. Optimizes cache_iterate, cache_mark_many and cache_evict. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit 450e8dee51aa6fa1dd0f64073e88235f1a77b035 Author: Joe Thornber Date: Fri Mar 10 16:02:29 2023 +0000 dm bufio: improve concurrent IO performance When multiple threads perform IO to a thin device, the underlying dm_bufio object can become a bottleneck; slowing down access to btree nodes that store the thin metadata. Prior to this commit, each bufio instance had a single mutex that was taken for every bufio operation. This commit concentrates on improving the common case where: a user of dm_bufio wishes to access, but not modify, a buffer which is already within the dm_bufio cache. Implementation:: The code has been refactored; pulling out an 'lru' abstraction and a 'buffer cache' abstraction (see 2 previous commits). This commit updates higher level bufio code (that performs allocation of buffers, IO and eviction/cache sizing) to leverage both abstractions. It also deals with the delicate locking requirements of both abstractions to provide finer grained locking. The result is significantly better concurrent IO performance. Before this commit, bufio has a global lru list it used to evict the oldest, clean buffers from _all_ clients. With the new locking we don’t want different ways to access the same buffer, so instead do_global_cleanup() loops around the clients asking them to free buffers older than a certain time. This commit also converts many old BUG_ONs to WARN_ON_ONCE, see the lru_evict and cache_evict code in particular. They will return ER_DONT_EVICT if a given buffer somehow meets the invariants that should _never_ happen. [Aside from revising this commit's header and fixing coding style and whitespace nits: this switching to WARN_ON_ONCE is Mike Snitzer's lone contribution to this commit] Testing:: Some of the low level functions have been unit tested using dm-unit: https://github.com/jthornber/dm-unit/blob/main/src/tests/bufio.rs Higher level concurrency and IO is tested via a test only target found here: https://github.com/jthornber/linux/blob/2023-03-24-thin-concurrency-9/drivers/md/dm-bufio-test.c The associated userland side of these tests is here: https://github.com/jthornber/dmtest-python/blob/main/src/dmtest/bufio/bufio_tests.py In addition the full dmtest suite of tests (dm-thin, dm-cache, etc) has been run (~450 tests). Performance:: Most bufio operations have unchanged performance. But if multiple threads are attempting to get buffers concurrently, and these buffers are already in the cache then there's a big speed up. Eg, one test has 16 'hotspot' threads simulating btree lookups while another thread dirties the whole device. In this case the hotspot threads acquire the buffers about 25 times faster. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit 2cd7a6d41fe8ec85f82e1ca31bceb0dc0d849f60 Author: Joe Thornber Date: Fri Mar 10 16:02:29 2023 +0000 dm bufio: add dm_buffer_cache abstraction The buffer cache is responsible for managing the holder count, tracking clean/dirty state, and choosing buffers via predicates. Higher level code is responsible for allocation of buffers, IO and eviction/cache sizing. The buffer cache has thread safe methods for acquiring a reference to an existing buffer. All other methods in buffer cache are _not_ threadsafe, and only contain enough locking to guarantee the safe methods. Rather than a single mutex, sharded rw_semaphores are used to allow concurrent threads to 'get' buffers. Each rw_semaphore protects its own rbtree of buffer entries. Code that uses this new dm_buffer_cache abstraction will be introduced in a following commit. This commit moves the dm_buffer struct in preparation for finer grained dm_buffer changes, in the next commit, to be more easily seen. It also introduces temporary dm_buffer struct members to allow compilation of this intermediate commit (they will be elided in the next commit). This commit will cause "defined but not used" compiler warnings that will be resolved by the next commit. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit be845babda1bb168d3f9f47c171f0a24a3312cba Author: Joe Thornber Date: Fri Mar 10 15:37:20 2023 +0000 dm bufio: add LRU abstraction A CLOCK algorithm is used in this LRU abstraction. This avoids relinking list nodes, which would require a write lock protecting it. None of the LRU methods are threadsafe; locking must be done at a higher level. Code that uses this new LRU will be introduced in the next 2 commits. As such, this commit will cause "defined but not used" compiler warnings that will be resolved by the next 2 commits. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit b75a80f4f5a956f3d335ebf29c7cee1b234ac3cf Author: Mike Snitzer Date: Fri Mar 24 20:49:25 2023 -0400 dm bufio: don't bug for clear developer oversight Reasonable to relax to WARN_ON because these are easily avoided but do offer some assurance future coding mistakes won't occur (if changes tested properly). Signed-off-by: Mike Snitzer commit 0511228752eaa5264ada8b1f4baeded916c65945 Author: Mike Snitzer Date: Fri Mar 24 21:36:26 2023 -0400 dm bufio: never crash if dm_bufio_in_request() All these instances are entirely avoidable given that they speak to coding mistakes that result in inappropriate use. Proper testing during development will catch any such coding bug so its best to relax all of these from BUG_ON to WARN_ON_ONCE. Signed-off-by: Mike Snitzer commit 555977dd6818da3bcf39ca5a3c1cb7e8ca4298c1 Author: Mike Snitzer Date: Fri Mar 24 21:17:43 2023 -0400 dm bufio: use WARN_ON in dm_bufio_client_destroy and dm_bufio_exit Using BUG_ON when tearing down is excessive. Relax these to WARN_ONs. Signed-off-by: Mike Snitzer commit 96a2ff2a6373259cd3bbc5dcaa79865ce271fa4b Author: Joe Thornber Date: Mon Mar 20 17:45:02 2023 -0400 dm bufio: remove unused dm_bufio_release_move interface Was used by multi-snapshot DM target that never went upstream. Signed-off-by: Joe Thornber Acked-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 9079363eda1ea0d9fa2cc5635e65821d8ed4f994 Author: Radhakrishna Sripada Date: Wed Mar 29 18:23:36 2023 -0300 drm/i915/mtl: Add Wa_22015279794 Wa_22015279794 applies to MTL P from stepping A0 to B0 (exclusive). Signed-off-by: Radhakrishna Sripada Signed-off-by: Gustavo Sousa Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230329212336.106161-3-gustavo.sousa@intel.com commit 5fba65efa7cfb8cef227a2c555deb10327a5e27b Author: Radhakrishna Sripada Date: Wed Mar 29 18:23:35 2023 -0300 drm/i915/mtl: Add workarounds Wa_14017066071 and Wa_14017654203 Both workarounds require the same implementation and apply to MTL P and M from stepping A0 to B0 (exclusive). v2: - Remove unrelated brace removal. (Matt) Signed-off-by: Radhakrishna Sripada Signed-off-by: Gustavo Sousa Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230329212336.106161-2-gustavo.sousa@intel.com commit 2c0a1faa4da5324a2ad6621b69fb7db26134b994 Author: Tudor Ambarus Date: Tue Mar 28 10:15:17 2023 +0000 ARM: dts: at91: sam9x60ek: Set sst26vf064b SPI NOR flash at its maximum frequency sam9x60ek populates an sst26vf064b SPI NOR flash. Its maximum operating frequency for 2.7-3.6V is 104 MHz. As the flash is operated at 3.3V, increase its maximum supported frequency to 104MHz. The increasing of the spi-max-frequency value requires the setting of the "CE# Not Active Hold Time", thus set the spi-cs-setup-ns to a value of 7. The sst26vf064b datasheet specifies just a minimum value for the "CE# Not Active Hold Time" and it advertises it to 5 ns. There's no maximum time specified. I determined experimentally that 5 ns for the spi-cs-setup-ns is not enough when the flash is operated close to its maximum frequency and tests showed that 7 ns is just fine, so set the spi-cs-setup-ns dt property to 7. With the increase of frequency the reads are now faster with ~33%. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20230328101517.1595738-5-tudor.ambarus@linaro.org Signed-off-by: Nicolas Ferre commit 46a8a137d8f60929923a609cdddde06e7007b0df Author: Tudor Ambarus Date: Tue Mar 28 10:15:16 2023 +0000 ARM: dts: at91: sama5d2_icp: Set sst26vf064b SPI NOR flash at its maximum frequency sama5d2_icp populates an sst26vf064b SPI NOR flash. Its maximum operating frequency for 2.7-3.6V is 104 MHz. As the flash is operated at 3.3V, increase its maximum supported frequency to 104MHz. The increasing of the spi-max-frequency value requires the setting of the "CE# Not Active Hold Time", thus set the spi-cs-setup-ns to a value of 7. The sst26vf064b datasheet specifies just a minimum value for the "CE# Not Active Hold Time" and it advertises it to 5 ns. There's no maximum time specified. I determined experimentally that 5 ns for the spi-cs-setup-ns is not enough when the flash is operated close to its maximum frequency and tests showed that 7 ns is just fine, so set the spi-cs-setup-ns dt property to 7. With the increase of frequency the reads are now faster with ~37%. Signed-off-by: Tudor Ambarus Tested-by: Nicolas Ferre # on sama5d2 ICP Link: https://lore.kernel.org/r/20230328101517.1595738-4-tudor.ambarus@linaro.org Signed-off-by: Nicolas Ferre commit 09ce8651229bb2d8e10ce0499e07da6f9bfaf5d8 Author: Tudor Ambarus Date: Tue Mar 28 10:15:15 2023 +0000 ARM: dts: at91-sama5d27_som1: Set sst26vf064b SPI NOR flash at its maximum frequency sama5d27-som1 populates an sst26vf064b SPI NOR flash. Its maximum operating frequency for 2.7-3.6V is 104 MHz. As the flash is operated at 3.3V, increase its maximum supported frequency to 104MHz. The increasing of the spi-max-frequency value requires the setting of the "CE# Not Active Hold Time", thus set the spi-cs-setup-ns to a value of 7. The sst26vf064b datasheet specifies just a minimum value for the "CE# Not Active Hold Time" and it advertises it to 5 ns. There's no maximum time specified. I determined experimentally that 5 ns for the spi-cs-setup-ns is not enough when the flash is operated close to its maximum frequency and tests showed that 7 ns is just fine, so set the spi-cs-setup-ns dt property to 7. With the increase of frequency the reads are now faster with ~37%. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20230328101517.1595738-3-tudor.ambarus@linaro.org Signed-off-by: Nicolas Ferre commit 417e58ea41abe4c7f8be22ab5034b5e11f952240 Author: Tudor Ambarus Date: Tue Mar 28 10:15:14 2023 +0000 ARM: dts: at91-sama5d27_wlsom1: Set sst26vf064b SPI NOR flash at its maximum frequency sama5d27-wlsom1 populates an sst26vf064b SPI NOR flash. Its maximum operating frequency for 2.7-3.6V is 104 MHz. As the flash is operated at 3.3V, increase its maximum supported frequency to 104MHz. The increasing of the spi-max-frequency value requires the setting of the "CE# Not Active Hold Time", thus set the spi-cs-setup-ns to a value of 7. The sst26vf064b datasheet specifies just a minimum value for the "CE# Not Active Hold Time" and it advertises it to 5 ns. There's no maximum time specified. I determined experimentally that 5 ns for the spi-cs-setup-ns is not enough when the flash is operated close to its maximum frequency and tests showed that 7 ns is just fine, so set the spi-cs-setup-ns dt property to 7. With the increase of frequency the reads are now faster with ~37%. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20230328101517.1595738-2-tudor.ambarus@linaro.org Signed-off-by: Nicolas Ferre commit c3806d572040af7270ddb2bead501e5589cd75c8 Author: Jonathan Corbet Date: Thu Mar 23 14:59:48 2023 -0600 docs: move nios2 documentation under Documentation/arch/ Architecture-specific documentation is being moved into Documentation/arch/ as a way of cleaning up the top-level documentation directory and making the docs hierarchy more closely match the source hierarchy. Move Documentation/nios2 into arch/ and fix all in-tree references. Signed-off-by: Jonathan Corbet commit 0e9ab8e4d44ae9d9aaf213bfd2c90bbe7289337b Author: Jonathan Corbet Date: Thu Mar 23 14:30:24 2023 -0600 docs: move openrisc documentation under Documentation/arch/ Architecture-specific documentation is being moved into Documentation/arch/ as a way of cleaning up the top-level documentation directory and making the docs hierarchy more closely match the source hierarchy. Move Documentation/openrisc into arch/ and fix all in-tree references. Cc: Jonas Bonn Cc: Stefan Kristiansson Cc: Stafford Horne Acked-by: Alex Shi Reviewed-by: Yanteng Si Signed-off-by: Jonathan Corbet commit d47a97bd38a3ac295ff8a23b979ef1f9a9fc36e7 Author: Jonathan Corbet Date: Thu Mar 23 14:17:42 2023 -0600 docs: move superh documentation under Documentation/arch/ Architecture-specific documentation is being moved into Documentation/arch/ as a way of cleaning up the top-level documentation directory and making the docs hierarchy more closely match the source hierarchy. Move Documentation/sh into arch/ and fix all in-tree references. Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Signed-off-by: Jonathan Corbet commit 1a2ac6d7ecdcde74a4e16f31de64124160fc7237 Author: Jonathan Corbet Date: Thu Mar 23 14:15:28 2023 -0600 docs: move sparc documentation under Documentation/arch/ Architecture-specific documentation is being moved into Documentation/arch/ as a way of cleaning up the top-level documentation directory and making the docs hierarchy more closely match the source hierarchy. Move Documentation/sparc into arch/ and fix all in-tree references. Cc: "David S. Miller" Signed-off-by: Jonathan Corbet commit 87670c577041dc6d9daa1e39a3953002c6733d7f Author: Jonathan Corbet Date: Thu Mar 23 14:08:44 2023 -0600 docs: move xtensa documentation under Documentation/arch/ Architecture-specific documentation is being moved into Documentation/arch/ as a way of cleaning up the top-level documentation directory and making the docs hierarchy more closely match the source hierarchy. Move Documentation/xtensa into arch/ and fix all in-tree references. Cc: Chris Zankel Reviewed-by: Max Filippov Signed-off-by: Jonathan Corbet commit 0c25e10091111cd4af2a979fbe77f438f1921788 Author: Jonathan Corbet Date: Thu Mar 23 15:08:04 2023 -0600 docs: zh_CN: create the architecture-specific top-level directory This mirrors commit 4f1bb0386dfc ("docs: create a top-level arch/ directory"), creating a top-level directory to hold architecture-specific documentation. Acked-by: Alex Shi Reviewed-by: Yanteng Si Signed-off-by: Jonathan Corbet commit ff61f0791ce969d2db6c9f3b71d74ceec0a2e958 Author: Jonathan Corbet Date: Tue Mar 14 17:06:44 2023 -0600 docs: move x86 documentation into Documentation/arch/ Move the x86 documentation under Documentation/arch/ as a way of cleaning up the top-level directory and making the structure of our docs more closely match the structure of the source directories it describes. All in-kernel references to the old paths have been updated. Acked-by: Dave Hansen Cc: linux-arch@vger.kernel.org Cc: x86@kernel.org Cc: Borislav Petkov Cc: Thomas Gleixner Link: https://lore.kernel.org/lkml/20230315211523.108836-1-corbet@lwn.net/ Signed-off-by: Jonathan Corbet commit e27a85c1757655e2e7bd09164b87bf75627e5604 Author: Rob Herring Date: Fri Mar 10 08:47:05 2023 -0600 drm: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to of_property_read_bool(). Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20230310144706.1542295-1-robh@kernel.org Signed-off-by: Rob Herring commit c12cc1bc7d70f0efa46e5afad5775daef2f4cc81 Author: Rob Herring Date: Mon Feb 6 13:45:04 2023 -0600 bus: uniphier-system-bus: Remove open coded "ranges" parsing "ranges" is a standard property and we have common helper functions for parsing it, so let's use them. Tested-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230206194503.1162108-1-robh@kernel.org Signed-off-by: Rob Herring commit 891db0c48efb48c3af334006f9d7ea6a0aa49cb9 Author: Apurva Nandan Date: Mon Mar 27 14:01:00 2023 +0530 arm64: dts: ti: k3-j784s4-evm: Add eMMC mmc0 support Add support for eMMC connected to main sdhci0 instance. Signed-off-by: Apurva Nandan Reviewed-by: Bhavya Kapoor Link: https://lore.kernel.org/r/20230327083100.12587-1-a-nandan@ti.com Signed-off-by: Nishanth Menon commit 767cc0501bbb51f2daad35d1bc4f6eaa857ed057 Author: Mark Brown Date: Mon Mar 6 16:15:07 2023 +0000 KVM: selftests: Comment newly defined aarch64 ID registers All otherwise unspecified aarch64 ID registers should be read as zero so we cover the whole ID register space in the get-reg-list test but we've added comments for those that have been named. Add comments for ID_AA64PFR2_EL1, ID_AA64SMFR0_EL1, ID_AA64ISAR2_EL1, ID_AA64MMFR3_EL1 and ID_AA64MMFR4_EL1 which have been defined since the comments were added so someone looking for them will see that they are covered. Signed-off-by: Mark Brown Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230210-kvm-arm64-getreg-comments-v1-1-a16c73be5ab4@kernel.org commit e17071754cf50e5f6ff8ebee077e0e4114d3bea5 Author: Ryan Roberts Date: Wed Mar 8 11:09:48 2023 +0000 KVM: selftests: arm64: Fix ttbr0_el1 encoding for PA bits > 48 Bits [51:48] of the pgd address are stored at bits [5:2] of ttbr0_el1. page_table_test stores its page tables at the far end of IPA space so was tripping over this when run on a system that supports FEAT_LPA (or FEAT_LPA2). Signed-off-by: Ryan Roberts Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230308110948.1820163-4-ryan.roberts@arm.com commit e659babfc5a693553cf9473470840464f0ed5d77 Author: Ryan Roberts Date: Wed Mar 8 11:09:47 2023 +0000 KVM: selftests: arm64: Fix pte encode/decode for PA bits > 48 The high bits [51:48] of a physical address should appear at [15:12] in a 64K pte, not at [51:48] as was previously being programmed. Fix this with new helper functions that do the conversion correctly. This also sets us up nicely for adding LPA2 encodings in future. Fixes: 7a6629ef746d ("kvm: selftests: add virt mem support for aarch64") Signed-off-by: Ryan Roberts Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230308110948.1820163-3-ryan.roberts@arm.com commit a2bed39057b434c4fd816005d1b950fefc61569d Author: Ryan Roberts Date: Wed Mar 8 11:09:46 2023 +0000 KVM: selftests: Fixup config fragment for access_tracking_perf_test access_tracking_perf_test requires CONFIG_IDLE_PAGE_TRACKING. However this is missing from the config fragment, so add it in so that this test is no longer skipped. Signed-off-by: Ryan Roberts Reviewed-by: Sean Christopherson Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230308110948.1820163-2-ryan.roberts@arm.com commit 2fe9e0fc21602339b82cdba58ef81a5a97d90ca2 Author: Marc Zyngier Date: Thu Mar 30 18:48:00 2023 +0100 KVM: arm64: selftests: Augment existing timer test to handle variable offset Allow a user to specify the global offset on the command-line. Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-21-maz@kernel.org commit 056c15669a01677ba3e44456580bf4a351f71ff7 Author: Marc Zyngier Date: Thu Mar 30 18:47:59 2023 +0100 KVM: arm64: selftests: Deal with spurious timer interrupts Make sure the timer test can properly handle a spurious timer interrupt, something that is far from being unlikely. This involves checking for the GIC IAR return value (don't bother handling the interrupt if it was spurious) as well as the timer control register (don't do anything if the interrupt is masked or the timer disabled). Take this opportunity to rewrite the timer handler in a more readable way. This solves a bunch of failures that creep up on systems that are slow to retire the interrupt, something that the GIC architecture makes no guarantee about. Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-20-maz@kernel.org commit 0630fb8e0a4873e436f0c1c1b27fa60a37eb960c Author: Marc Zyngier Date: Thu Mar 30 18:47:58 2023 +0100 KVM: arm64: selftests: Add physical timer registers to the sysreg list Now that KVM exposes CNTPCT_EL0, CNTP_CTL_EL0 and CNT_CVAL_EL0 to userspace, add them to the get-reg-list selftest. Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-19-maz@kernel.org commit 81dc9504a7006b484cfcf074796094ee526b0c45 Author: Marc Zyngier Date: Thu Mar 30 18:47:57 2023 +0100 KVM: arm64: nv: timers: Support hyp timer emulation Emulating EL2 also means emulating the EL2 timers. To do so, we expand our timer framework to deal with at most 4 timers. At any given time, two timers are using the HW timers, and the two others are purely emulated. The role of deciding which is which at any given time is left to a mapping function which is called every time we need to make such a decision. Reviewed-by: Colton Lewis Co-developed-by: Christoffer Dall Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-18-maz@kernel.org commit 1e0eec09d43a55125ff80e40b2d6e2f369a338b9 Author: Marc Zyngier Date: Thu Mar 30 18:47:56 2023 +0100 KVM: arm64: nv: timers: Add a per-timer, per-vcpu offset Being able to set a global offset isn't enough. With NV, we also need to a per-vcpu, per-timer offset (for example, CNTVCT_EL0 being offset by CNTVOFF_EL2). Use a similar method as the VM-wide offset to have a timer point to the shadow register that contains the offset value. Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-17-maz@kernel.org commit 1935d34afaebe01ddb75bfaa62fb7fe957ddc210 Author: Marc Zyngier Date: Thu Mar 30 18:47:55 2023 +0100 KVM: arm64: Document KVM_ARM_SET_CNT_OFFSETS and co Add some basic documentation on the effects of KVM_ARM_SET_CNT_OFFSETS. Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-16-maz@kernel.org commit 476fcd4b7bb54ac959b683f30d0cf305c3e11f3c Author: Marc Zyngier Date: Thu Mar 30 18:47:54 2023 +0100 KVM: arm64: timers: Abstract the number of valid timers per vcpu We so far have a pretty fixed number of timers to take care of. This is about to change as NV brings another two into the picture, and we must be careful not to try and emulate non-valid timers in a given VM. For this, abstract the number of timers for a given vcpu behind an accessor, which helpfully returns a constant for now. Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-15-maz@kernel.org commit e9adde432bf7371f1c83f67d9f8d75b95810f124 Author: Marc Zyngier Date: Thu Mar 30 18:47:53 2023 +0100 KVM: arm64: timers: Fast-track CNTPCT_EL0 trap handling Now that it is likely that CNTPCT_EL0 accesses will trap, fast-track the emulation of the counter read which doesn't need more that a simple offsetting. One day, we'll have CNTPOFF everywhere. One day. Suggested-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-14-maz@kernel.org commit 1a6511eb8430533920559c5f01f487f4901081cd Author: Marc Zyngier Date: Thu Mar 30 18:47:52 2023 +0100 KVM: arm64: Elide kern_hyp_va() in VHE-specific parts of the hypervisor For VHE-specific hypervisor code, kern_hyp_va() is a NOP. Actually, it is a whole range of NOPs. It'd be much better if this code simply didn't exist. Let's just do that. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-13-maz@kernel.org commit 8a5eb2d210807e7dbe9ece7075533014cf4b9c27 Author: Marc Zyngier Date: Thu Mar 30 18:47:51 2023 +0100 KVM: arm64: timers: Move the timer IRQs into arch_timer_vm_data Having the timer IRQs duplicated into each vcpu isn't great, and becomes absolutely awful with NV. So let's move these into the per-VM arch_timer_vm_data structure. This simplifies a lot of code, but requires us to introduce a mutex so that we can reason about userspace trying to change an interrupt number while another vcpu is running, something that wasn't really well handled so far. Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-12-maz@kernel.org commit 33c549460ef9119eb115484e81f54521122341db Author: Marc Zyngier Date: Thu Mar 30 18:47:50 2023 +0100 KVM: arm64: timers: Abstract per-timer IRQ access As we are about to move the location of the per-timer IRQ into the VM structure, abstract the location of the IRQ behind an accessor. This will make the repainting sligntly less painful. Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-11-maz@kernel.org commit 5591805d2c21b70838b723b71b8ff613de51cfff Author: Marc Zyngier Date: Thu Mar 30 18:47:49 2023 +0100 KVM: arm64: timers: Rationalise per-vcpu timer init The way we initialise our timer contexts may be satisfactory for two timers, but will be getting pretty annoying with four. Cleanup the whole thing by removing the code duplication and getting rid of unused IRQ configuration elements. Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-10-maz@kernel.org commit 680232a94c1289aad25ffae02f2785823763b456 Author: Marc Zyngier Date: Thu Mar 30 18:47:48 2023 +0100 KVM: arm64: timers: Allow save/restoring of the physical timer Nothing like being 10 year late to a party! Now that userspace can set counter offsets, we can save/restore the physical timer as well! Nobody really cared so far, but you're welcome anyway. Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-9-maz@kernel.org commit 30ec7997d175cd689fc61bfc4059f4d35b11858c Author: Marc Zyngier Date: Thu Mar 30 18:47:47 2023 +0100 KVM: arm64: timers: Allow userspace to set the global counter offset And this is the moment you have all been waiting for: setting the counter offset from userspace. We expose a brand new capability that reports the ability to set the offset for both the virtual and physical sides. In keeping with the architecture, the offset is expressed as a delta that is substracted from the physical counter value. Once this new API is used, there is no going back, and the counters cannot be written to to set the offsets implicitly (the writes are instead ignored). Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-8-maz@kernel.org commit 96906a9150a86a86b0464939625279b8e19f6e88 Author: Marc Zyngier Date: Thu Mar 30 18:47:46 2023 +0100 KVM: arm64: Expose {un,}lock_all_vcpus() to the rest of KVM Being able to lock/unlock all vcpus in one go is a feature that only the vgic has enjoyed so far. Let's be brave and expose it to the world. Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-7-maz@kernel.org commit c605ee245097d02ed5933e63ac601a8571712457 Author: Marc Zyngier Date: Thu Mar 30 18:47:45 2023 +0100 KVM: arm64: timers: Allow physical offset without CNTPOFF_EL2 CNTPOFF_EL2 is awesome, but it is mostly vapourware, and no publicly available implementation has it. So for the common mortals, let's implement the emulated version of this thing. It means trapping accesses to the physical counter and timer, and emulate some of it as necessary. As for CNTPOFF_EL2, nobody sets the offset yet. Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-6-maz@kernel.org commit 2b4825a8694018901e641ccc2eafd0fff58d1415 Author: Marc Zyngier Date: Thu Mar 30 18:47:44 2023 +0100 KVM: arm64: timers: Use CNTPOFF_EL2 to offset the physical timer With ECV and CNTPOFF_EL2, it is very easy to offer an offset for the physical timer. So let's do just that. Nothing can set the offset yet, so this should have no effect whatsoever (famous last words...). Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-5-maz@kernel.org commit 326349943ed181890b8b2af2755bd0eac93bd66d Author: Marc Zyngier Date: Thu Mar 30 18:47:43 2023 +0100 arm64: Add HAS_ECV_CNTPOFF capability Add the probing code for the FEAT_ECV variant that implements CNTPOFF_EL2. Why it is optional is a mystery, but let's try and detect it. Reviewed-by: Reiji Watanabe Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-4-maz@kernel.org commit eaacaa4f26ade43dfdfdd3707c95d734b5ffc530 Author: Marc Zyngier Date: Thu Mar 30 18:47:42 2023 +0100 arm64: Add CNTPOFF_EL2 register definition Add the definition for CNTPOFF_EL2 in the description file. Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-3-maz@kernel.org commit 0d0ae656b71155ccc0be9388beef77a1f7e7558e Author: Marc Zyngier Date: Thu Mar 30 18:47:41 2023 +0100 KVM: arm64: timers: Use a per-vcpu, per-timer accumulator for fractional ns Instead of accumulating the fractional ns value generated every time we compute a ns delta in a global variable, use a per-vcpu, per-timer variable. This keeps the fractional ns local to the timer instead of contributing to any odd, unrelated timer. Reviewed-by: Colton Lewis Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230330174800.2677007-2-maz@kernel.org commit 91e217d4b6ea3903f6052fa1fd5179037171b2a5 Author: Alexandre Mergnat Date: Wed Mar 29 10:54:33 2023 +0200 arm64: dts: mediatek: add ethernet support for mt8365 SoC This IP is a 10/100 MAC controller compliant with IEEE 802.3 standards. It supports power management with Energy Efficient Ethernet and Wake-on-LAN specification. Flow control is provided for half-duplex and full-duplex mode. For packet transmission and reception, the controller supports IPv4/UDP/TCP checksum offload and VLAN tag insertion. Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230203-evk-board-support-v3-12-0003e80e0095@baylibre.com Signed-off-by: Matthias Brugger commit 86df7d19083c66fb1e2e1b3800f29586429a4d92 Author: Rob Herring Date: Fri Mar 10 08:47:26 2023 -0600 thermal: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 8b5db516c9416d72d49c95656662fa1fbea446e1 Author: Alexandre Mergnat Date: Wed Mar 29 10:54:29 2023 +0200 arm64: dts: mediatek: add mmc support for mt8365 SoC There are three ports of MSDC (MMC and SD Controller), which are: - MSDC0: EMMC5.1 - MSDC1: SD3.0/SDIO3.0 - MSDC2: SDIO3.0+ Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20230203-evk-board-support-v3-8-0003e80e0095@baylibre.com Signed-off-by: Matthias Brugger commit a00d1c915df3db5e8f2ea8e06a1a63245fc5b861 Author: Alexandre Mergnat Date: Wed Mar 29 10:54:27 2023 +0200 arm64: dts: mediatek: add pwrap support to mt8365 SoC In order to use the PMIC, the pwrap support should be added to allow communication between the SoC and the PMIC. Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230203-evk-board-support-v3-6-0003e80e0095@baylibre.com Signed-off-by: Matthias Brugger commit 55749bb478f8ea6e72c376f332e0bc01bdd9af15 Author: Fabien Parent Date: Wed Mar 29 10:54:26 2023 +0200 arm64: dts: mediatek: add mt6357 device-tree This new device-tree add the regulators, rtc and keys support for the MT6357 PMIC. Signed-off-by: Fabien Parent Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20230203-evk-board-support-v3-5-0003e80e0095@baylibre.com Signed-off-by: Matthias Brugger commit 47d26684185d09e083669bbbd0c465ab3493a51f Author: Jean-Philippe Brucker Date: Mon Mar 20 18:05:29 2023 +0000 ACPI: VIOT: Initialize the correct IOMMU fwspec When setting up DMA for a PCI device, we need to initialize its iommu_fwspec with all possible alias RIDs (such as PCI bridges). To do this we use pci_for_each_dma_alias() which calls viot_pci_dev_iommu_init(). This function incorrectly initializes the fwspec of the bridge instead of the device being configured. Fix it by passing the original device as context to pci_for_each_dma_alias(). Fixes: 3cf485540e7b ("ACPI: Add driver for the VIOT table") Link: https://lore.kernel.org/all/Y8qzOKm6kvhGWG1T@myrica Reported-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Rafael J. Wysocki commit 2d98d0d2d53720a365e0c1a2984215815337607c Author: Alexandre Bailon Date: Wed Mar 29 10:54:24 2023 +0200 arm64: dts: mediatek: Increase the size BL31 reserved memory The reserved size for BL31 is too small. This has been highlighted by the MPU that now restrict access to BL31 memory to secure world only. This increase the size of the reserved memory. Signed-off-by: Alexandre Bailon Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230203-evk-board-support-v3-3-0003e80e0095@baylibre.com Signed-off-by: Matthias Brugger commit 988eff6543618d2cfd4690c30bfce68b69b88424 Author: Alexandre Mergnat Date: Tue Mar 28 11:04:48 2023 +0200 arm64: dts: mediatek: enable i2c0 for mt8365-evk board Enable the I2C0 bus provides communication with: - The integrated RT9466 Switching Battery Charger. - The integrated MT6691 LP4X buck for VDDQ. - The integrated MT6691 LP4X buck for VDD2. - The pin header, to plug external I2C devices. Signed-off-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221122-mt8365-i2c-support-v6-2-e1009c8afd53@baylibre.com [mb: move bias-pull-up below pinmux] Signed-off-by: Matthias Brugger commit dbf17e13f04ac04ef8d70158b002fd53f07ccc88 Author: Alexandre Mergnat Date: Tue Mar 28 11:04:47 2023 +0200 arm64: dts: mediatek: add i2c support for mt8365 SoC There are four I2C master channels in MT8365 with a same HW architecture. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20221122-mt8365-i2c-support-v6-1-e1009c8afd53@baylibre.com Signed-off-by: Matthias Brugger commit 0dc9a715578b041b6159714f23f94cf71a214411 Author: Jiangshan Yi Date: Tue Mar 28 11:16:29 2023 +0800 ACPI: thermal: Replace ternary operator with min_t() Modify the code in accordance with the coccicheck warning: drivers/acpi/thermal.c:422: WARNING opportunity for min(). min_t() macro is defined in include/linux/minmax.h. It avoids multiple evaluations of the arguments when non-constant and performs strict type-checking. Signed-off-by: Jiangshan Yi [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit b94b43715e91646a7023e5837941a514c9e2f934 Author: Jai Luthra Date: Thu Mar 30 15:14:06 2023 +0530 arm64: dts: ti: Enable audio on SK-AM62(-LP) Add nodes for audio codec and sound card, enable the audio serializer (McASP1) under use from SK-AM62 E2 [1] onwards and update pinmux. Keep all audio related nodes in the common dtsi as they are exactly the same between SK-AM62 and SK-AM62-LP [2]. Link: https://www.ti.com/lit/zip/sprr448 [1] Link: https://www.ti.com/lit/zip/sprr471 [2] Signed-off-by: Jai Luthra Reviewed-by: Jayesh Choudhary Link: https://lore.kernel.org/r/20230313-mcasp_upstream-v10-2-94332149657a@ti.com Signed-off-by: Nishanth Menon commit d4b0379af83b67ef85bf90639cd38eb910dc507d Author: Jayesh Choudhary Date: Thu Mar 30 15:14:05 2023 +0530 arm64: dts: ti: k3-am62-main: Add McASP nodes Add the nodes for McASP 0-2. Use the audio-friendly 96MHz main_1_hsdivout6_clk as clock parent instead of the default 100Mhz main_2_hsdivout8_clk source. Signed-off-by: Jayesh Choudhary Signed-off-by: Jai Luthra Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20230313-mcasp_upstream-v10-1-94332149657a@ti.com Signed-off-by: Nishanth Menon commit e23d5a3d116dce2152c56ee55d802630c92636bc Author: Vaishnav Achath Date: Tue Mar 21 13:58:27 2023 +0530 arm64: dts: ti: k3-j784s4: Add MCSPI nodes J784S4 has 8 MCSPI instances in the main domain and 3 instances in the MCU domain. Add the DT nodes for all the 11 instances and keep them disabled. MAIN_MCSPI4 is connected as a slave to MCU_MCSPI2 by default at power-up, MAIN_MCSPI4 and MCU_MCSPI2 are not pinned out externally. Signed-off-by: Vaishnav Achath Reviewed-by: Keerthy Link: https://lore.kernel.org/r/20230321082827.14274-5-vaishnav.a@ti.com Signed-off-by: Nishanth Menon commit 04d7cb647b8527398e292c0b6960980de5359d09 Author: Vaishnav Achath Date: Tue Mar 21 13:58:26 2023 +0530 arm64: dts: ti: k3-j721s2: Add MCSPI nodes J721S2 has 8 MCSPI instances in the main domain and 3 instances in the MCU domain. Add the DT nodes for all the 11 instances and keep them disabled. MAIN_MCSPI4 is connected as a slave to MCU_MCSPI2 by default at power-up, MAIN_MCSPI4 and MCU_MCSPI2 are not pinned out externally. Signed-off-by: Vaishnav Achath Reviewed-by: Keerthy Link: https://lore.kernel.org/r/20230321082827.14274-4-vaishnav.a@ti.com Signed-off-by: Nishanth Menon commit 8f6c475f4ca7a82d5203e20d33a6bb522902b44c Author: Vaishnav Achath Date: Tue Mar 21 13:58:25 2023 +0530 arm64: dts: ti: k3-j7200: Add MCSPI nodes J7200 has 8 MCSPI instances in the main domain and 3 instances in the MCU domain. Add the DT nodes for all the 11 instances and keep them disabled. MAIN_MCSPI4 is connected as a slave to MCU_MCSPI2 by default at power-up, MAIN_MCSPI4 and MCU_MCSPI2 are not pinned out externally. Signed-off-by: Vaishnav Achath Reviewed-by: Keerthy Link: https://lore.kernel.org/r/20230321082827.14274-3-vaishnav.a@ti.com Signed-off-by: Nishanth Menon commit 76aa309f9fa7e8c9b25234e1d1641d0b05e43e52 Author: Vaishnav Achath Date: Tue Mar 21 13:58:24 2023 +0530 arm64: dts: ti: k3-j721e: Add MCSPI nodes J721E has 8 MCSPI instances in the main domain and 3 instances in the MCU domain. Add the DT nodes for all the 11 instances and keep them disabled. MAIN_MCSPI4 is connected as a slave to MCU_MCSPI2 by default at power-up, MAIN_MCSPI4 and MCU_MCSPI2 are not pinned out externally. Co-developed-by: Keerthy Signed-off-by: Keerthy Signed-off-by: Vaishnav Achath Reviewed-by: Jai Luthra Link: https://lore.kernel.org/r/20230321082827.14274-2-vaishnav.a@ti.com Signed-off-by: Nishanth Menon commit e6a51ffabfc16b1df9607e674ddf377673627513 Author: Anand Gadiyar Date: Wed Mar 22 18:09:22 2023 +0530 arm64: ti: dts: Add support for AM62x LP SK The AM62x LP SK board is similar to the AM62x SK board, but has some not-so-minor changes that requires different device tree. The differences are mainly: - AM62x SoC in the AMC package that meets AECQ100 automotive standard. - LPDDR4 versus DDR4 on the AM62x SK. - TPS65219 PMIC instead of discrete regulators. - IO expander pin names are wired differently. - Second ethernet port is currently disabled as the boards do not have the part physically installed. - OSPI NAND vs OSPI NOR. - No WLAN chip instead a SDIO M.2 connector. Signed-off-by: Anand Gadiyar [vigneshr@ti.com: Add PMIC node] Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230321-am62-lp-sk-v2-3-0a56e1694804@ti.com Signed-off-by: Nishanth Menon commit a841581451af7beaf4c77b0c48ae3dd3205ab3bc Author: Anand Gadiyar Date: Wed Mar 22 18:09:21 2023 +0530 arm64: dts: ti: Refractor AM625 SK dts To prepare for upcoming derivative boards based on the AM625 SK, refactor the dts file for this board into a common dtsi file that the derivative boards will inherit and retain only those parts that are different in the current dts file. Signed-off-by: Anand Gadiyar Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230321-am62-lp-sk-v2-2-0a56e1694804@ti.com Signed-off-by: Nishanth Menon commit 3bc4f501be71766e5988d8233fc29196f552b9b0 Author: Vignesh Raghavendra Date: Wed Mar 22 18:09:20 2023 +0530 dt-bindings: arm: ti: k3: Add compatible for AM62x LP SK Add compatible for AM62x SoC based Low Power Starter Kit board[1] [1] https://www.ti.com/tool/SK-AM62-LP Signed-off-by: Vignesh Raghavendra Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230321-am62-lp-sk-v2-1-0a56e1694804@ti.com Signed-off-by: Nishanth Menon commit 4b71618cb772f20dfeeba826e9d1713a04f9687f Author: Dhruva Gole Date: Tue Mar 28 15:43:14 2023 +0300 arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1 The property "ti,vbus-divider" is needed for both usbss0 and usbss1 as both USB0 and USB1 have the same external voltage divider circuit. Fixes: 2d94dfc43885 ("arm64: dts: ti: k3-am625-sk: Add support for USB") Signed-off-by: Dhruva Gole Signed-off-by: Roger Quadros Link: https://lore.kernel.org/r/20230328124315.123778-2-rogerq@kernel.org Signed-off-by: Nishanth Menon commit fee4f08db8ae40114cf729ebd022fc43df55f68b Author: Sinthu Raja Date: Wed Mar 15 17:39:34 2023 +0530 arm64: dts: ti: k3-am68-sk-base-board: Update IO EXP GPIO lines for Rev E2 Rev E2 of the AM68 SK baseboard has updated the GPIO IO expander pins functionality. To match the Rev E2 schematics, update existing IO expander GPIO line names and the corresponding node which uses the expansion(exp1) node. Signed-off-by: Sinthu Raja Link: https://lore.kernel.org/r/20230315120934.16954-1-sinthu.raja@ti.com Signed-off-by: Nishanth Menon commit f5a731f0787fd63d81ab0e1457c44c65fa9d7b41 Author: Robert Nelson Date: Thu Mar 16 10:21:42 2023 -0500 arm64: dts: ti: Add k3-am625-beagleplay BeagleBoard.org BeaglePlay is an easy to use, affordable open source hardware single board computer based on the Texas Instruments AM625 SoC that allows you to create connected devices that work even at long distances using IEEE 802.15.4g LR-WPAN and IEEE 802.3cg 10Base-T1L. Expansion is provided over open standards based mikroBUS, Grove and QWIIC headers among other interfaces. This board family can be identified by the 24c32 eeprom: [aa 55 33 ee 01 37 00 10 2e 00 42 45 41 47 4c 45 |.U3..7....BEAGLE|] [50 4c 41 59 2d 41 30 2d 00 00 30 32 30 30 37 38 |PLAY-A0-..020078|] https://beagleplay.org/ https://git.beagleboard.org/beagleplay/beagleplay Signed-off-by: Robert Nelson Reviewed-by: Andrew Davis Reviewed-by: Dhruva Gole Link: https://lore.kernel.org/r/20230316152143.2438928-3-nm@ti.com Co-developed-by: Nishanth Menon Signed-off-by: Nishanth Menon commit 3bd554e03ef412438b42862cb088ddc4e2a2561b Author: Armin Wolf Date: Fri Mar 24 21:26:28 2023 +0100 ACPI: SBS: Fix handling of Smart Battery Selectors The "Smart Battery Selector" standard says that when writing SelectorState (0x1), the nibbles which should not be modified need to be masked with 0xff. This is necessary since in contrast to a "Smart Battery Manager", the last three nibbles are writable. Failing to do so might trigger the following cycle: 1. Host accidentally changes power source of the system (3rd nibble) when selecting a battery. 2. Power source is invalid, Selector changes to another power source. 3. Selector notifies host that it changed the power source. 4. Host re-reads some batteries. 5. goto 1 for each re-read battery. This loop might also be entered when a battery which is not present is selected for SMBus access. In the end some workqueues fill up, which causes the system to lockup upon suspend/shutdown. Fix this by correctly masking the value to be written, and avoid selecting batteries which are absent. Tested on a Acer Travelmate 4002WLMi. Signed-off-by: Armin Wolf Signed-off-by: Rafael J. Wysocki commit e5b492c6bb900fcf9722e05f4a10924410e170c1 Author: Armin Wolf Date: Fri Mar 24 21:26:27 2023 +0100 ACPI: EC: Fix oops when removing custom query handlers When removing custom query handlers, the handler might still be used inside the EC query workqueue, causing a kernel oops if the module holding the callback function was already unloaded. Fix this by flushing the EC query workqueue when removing custom query handlers. Tested on a Acer Travelmate 4002WLMi Signed-off-by: Armin Wolf Signed-off-by: Rafael J. Wysocki commit 28f7b85895fce996c0f34827a7623ef6a031e4f3 Author: Armin Wolf Date: Fri Mar 24 21:26:26 2023 +0100 ACPI: EC: Limit explicit removal of query handlers to custom query handlers According to the ACPI spec part 5.6.4.1.2, EC query handlers discovered thru ACPI should not be removed when a driver removes his custom query handler. On the Acer Travelmate 4002WLMi for example, such a query handler is used as a fallback to handle the EC SMBus alert when no driver is present. Change acpi_ec_remove_query_handlers() so that only custom query handlers are removed then remove_all is false. Query handlers discovered thru ACPI will still get removed when remove_all is true, which happens on device removal. Also add a simple check to ensure that acpi_ec_add_query_handler() is always called with either handle or func being set, since custom query handlers are detected based whether handlers->func is set or not. Tested on a Acer Travelmate 4002WLMi. Signed-off-by: Armin Wolf [ rjw: Comment adjustment ] Signed-off-by: Rafael J. Wysocki commit 44b263bf040a8e819da11c45f14a80de8866461a Author: Jai Luthra Date: Thu Mar 30 15:14:07 2023 +0530 arm64: defconfig: Enable audio drivers for AM62-SK TI's K3 platform uses McASP as the digital audio interface on the SoCs. AM62-SK, AM62-LP-SK and AM62A-SK also use the TLV320AIC3106 codec with a 3.5mm jack for analog audio input and output. Signed-off-by: Jai Luthra Reviewed-by: Devarsh Thakkar Link: https://lore.kernel.org/r/20230313-mcasp_upstream-v10-3-94332149657a@ti.com Signed-off-by: Nishanth Menon commit 38f250cf9615d762a4dc1179bb063c66762a76e6 Author: Nishanth Menon Date: Thu Mar 16 10:21:43 2023 -0500 arm64: defconfig: Enable drivers for BeaglePlay Enable drivers used on BeaglePlay[1]: * MDIO_GPIO driver to workaround erratum i2329, DP83TD510 SPE phy (enabled in-kernel to ease usage) * TPS65219 PMIC, regulator as built-in for sd boot and power button as modules. (note: this is also used by am62x-lp-sk as well) * BQ32K battery backedup RTC and the K3 RTC drivers as modules * OMAP2 SPI driver as module for accessing mikrobus bloat-o-meter reports after this change (v6.3-rc1, clang 17.0.0): add/remove: 63/2 grow/shrink: 3/0 up/down: 17660/-16 (17644) [...] Total: Before=27747186, After=27764830, chg +0.06% [1] https://beagleplay.org Reviewed-by: Dhruva Gole Link: https://lore.kernel.org/r/20230316152143.2438928-4-nm@ti.com Signed-off-by: Nishanth Menon commit 780668dfefa009a977af386c00f26b686e5a8688 Author: Dmitry Baryshkov Date: Tue Feb 14 15:35:04 2023 +0300 drm/msm/a5xx: add devcoredump support to the fault handler Use adreno_fault_handler() to implement a5xx_fault_handler(). This enables devcoredump support on a5xx platforms, allowing one to capture the crashed GPU state at the time of context fault. Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/522724/ Link: https://lore.kernel.org/r/20230214123504.3729522-4-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 503d473c983bf04b978d97f522e6039723caf224 Author: Jacob Keller Date: Mon Feb 27 14:15:00 2023 -0800 ice: remove comment about not supporting driver reinit Since commit 31c8db2c4fa7 ("ice: implement devlink reinit action"), the ice driver does support driver re-initialization via devlink reload. Remove the stale comment indicating that the driver lacks this support from the ice_devlink_ops structure. Signed-off-by: Jacob Keller Cc: Michal Swiatkowski Reviewed-by: Michal Swiatkowski Signed-off-by: Tony Nguyen commit 79d872c62b16e6c640e125fd4613c6beadac5210 Author: Tony Nguyen Date: Wed Mar 29 10:22:56 2023 -0700 Documentation/eth/intel: Remove references to SourceForge The out-of-tree driver is hosted on SourceForge, as this does not apply to the kernel driver remove references to it. Also do some minor formatting changes around this section. Suggested-by: Jesse Brandeburg Signed-off-by: Tony Nguyen Reviewed-by: Jesse Brandeburg commit 8ba732befd6ff44cd8ecc809bd6df850e246f31a Author: Tony Nguyen Date: Wed Mar 29 10:22:55 2023 -0700 Documentation/eth/intel: Update address for driver support Update the email address for support to use Intel Wired LAN, the mailing list used for kernel development. Suggested-by: Jesse Brandeburg Signed-off-by: Tony Nguyen Reviewed-by: Jesse Brandeburg commit 9df56e5632c5055ba2bbb6c8c593a4da15181be2 Author: Jani Nikula Date: Thu Mar 16 15:29:36 2023 +0200 drm/i915/dsb: split out DSB regs to a separate file Clean up i915_reg.h by splitting out DSB regs to display/intel_dsb_regs.h. Signed-off-by: Jani Nikula Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/d74b3c564b2d080bf689b3360f1a5e62e47f2e7c.1678973283.git.jani.nikula@intel.com commit 04500bfd7053482a1a4a81f86b57faff5c788199 Author: Jani Nikula Date: Thu Mar 16 15:29:33 2023 +0200 drm/i915/fdi: split out FDI regs to a separate file Clean up i915_reg.h by splitting out FDI regs to display/intel_fdi_regs.h. Signed-off-by: Jani Nikula Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/bba37e46d767e2193d49d1d2e289040c6bf8229b.1678973282.git.jani.nikula@intel.com commit 89e790ec1a1ed930b58b0aebe50792acad90723d Author: Jani Nikula Date: Thu Mar 16 15:29:32 2023 +0200 drm/i915/aux: split out DP AUX regs to a separate file Clean up i915_reg.h by splitting out DP AUX regs to display/intel_dp_aux_regs.h. Signed-off-by: Jani Nikula Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/aa93b34e786c5566acf8f053ffed96c160a23898.1678973282.git.jani.nikula@intel.com commit f84a27f9eea51df5c704ca16a00c6df85a31f805 Author: Jani Nikula Date: Thu Mar 16 15:29:31 2023 +0200 drm/i915/tv: split out TV regs to a separate file Clean up i915_reg.h by splitting out TV regs to display/intel_tv_regs.h. Signed-off-by: Jani Nikula Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/be4a946a7772f5b4483ad9e078cb62158849683e.1678973282.git.jani.nikula@intel.com commit 065695b3da984aa1ed5d619f3c307be1f564bec2 Author: Jani Nikula Date: Thu Mar 16 15:29:30 2023 +0200 drm/i915/pps: split out PPS regs to a separate file Clean up i915_reg.h by splitting out PPS regs to display/intel_pps_regs.h. Signed-off-by: Jani Nikula Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/80d66ee6d7e56153a0ab25640ac2dad239b1ef6e.1678973282.git.jani.nikula@intel.com commit a0f5276716c80415230b47e321e1c46357d70993 Author: Jason Gerecke Date: Wed Oct 19 08:18:32 2022 -0700 HID: Recognize "Digitizer" as a valid input application "Digitizer" is a generic usage that may be used by various devices but which is particularly used by non-display pen tablets. This patch adds the usage to the list of values matched by the IS_INPUT_APPLICATION() macro that determines if an input device should be allocated or not. Signed-off-by: Jason Gerecke Reviewed-by: Ping Cheng Link: https://lore.kernel.org/r/20221019151832.44522-1-jason.gerecke@wacom.com Signed-off-by: Benjamin Tissoires commit 7bd6680b47fa4cd53ee1047693c09825e212a6f5 Author: Will Deacon Date: Thu Mar 30 16:23:03 2023 +0100 Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()"" This reverts commit b7d9aae404841d9999b7476170867ae441e948d2. With the Qualcomm remoteproc driver now modified to use a carveout memory region in 57f72170a2b2 ("remoteproc: qcom_q6v5_mss: Use a carveout to authenticate modem headers"), we can reinstate c44094eee32f ("arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()") which relaxes the arm64 implementation of arch_dma_prep_coherent() to perform only a data cache clean operation, rather than a clean-and-invalidate. Signed-off-by: Will Deacon commit 67ea0b7ce41844eae7c10bb04dfe66a23318c224 Author: Tomas Krcka Date: Wed Mar 29 12:34:19 2023 +0000 iommu/arm-smmu-v3: Acknowledge pri/event queue overflow if any When an overflow occurs in the PRI queue, the SMMU toggles the overflow flag in the PROD register. To exit the overflow condition, the PRI thread is supposed to acknowledge it by toggling this flag in the CONS register. Unacknowledged overflow causes the queue to stop adding anything new. Currently, the priq thread always writes the CONS register back to the SMMU after clearing the queue. The writeback is not necessary if the OVFLG in the PROD register has not been changed, no overflow has occured. This commit checks the difference of the overflow flag between CONS and PROD register. If it's different, toggles the OVACKFLG flag in the CONS register and write it to the SMMU. The situation is similar for the event queue. The acknowledge register is also toggled after clearing the event queue but never propagated to the hardware. This would only be done the next time when executing evtq thread. Unacknowledged event queue overflow doesn't affect the event queue, because the SMMU still adds elements to that queue when the overflow condition is active. But it feel nicer to keep SMMU in sync when possible, so use the same way here as well. Signed-off-by: Tomas Krcka Link: https://lore.kernel.org/r/20230329123420.34641-1-tomas.krcka@gmail.com Signed-off-by: Will Deacon commit 665d30119af9ca557fc8811ea1c0e8609c165c8a Author: Takashi Iwai Date: Thu Mar 30 15:28:47 2023 +0200 ALSA: ac97: Define dummy functions for snd_ac97_suspend() and resume() For allowing the build without CONFIG_PM, add definitions of dummy functions for snd_ac97_suspend() and snd_ac97_resume() without CONFIG_PM, too. Link: https://lore.kernel.org/r/20230330132847.12882-1-tiwai@suse.de Reviewed-by: Jaroslav Kysela Reviewed-by: Tasos Sahanidis Signed-off-by: Takashi Iwai commit 5e96c2e0e88d3617477313b071cf199bfc29d794 Author: Nikita Yushchenko Date: Tue Mar 28 09:39:02 2023 +0600 clk: renesas: r8a77980: Add I2C5 clock The MSSR clock definition for I2C5 was missing. Add it. Signed-off-by: Nikita Yushchenko Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230328033902.830269-1-nikita.yoush@cogentembedded.com Signed-off-by: Geert Uytterhoeven commit 9a2273a16157b9429f07571b3a9d40407b68dbe1 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:45 2023 +0100 pwm: xilinx: 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 (mostly) ignored 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. 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: Sean Anderson Signed-off-by: Thierry Reding commit 22e1d1f44d3fabbfb88690d06cf7249addbc3691 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:44 2023 +0100 pwm: vt8500: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 91e92e82b1da6d5da355594179bca5131fa67746 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:43 2023 +0100 pwm: tiehrpwm: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit dc75f6bc5b6c6993d63267fcd1e315d8c04a7162 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:42 2023 +0100 pwm: tiecap: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit e39cb6f9be7ead36ec64aab9f3e51352aab9695d Author: Uwe Kleine-König Date: Fri Mar 3 19:54:41 2023 +0100 pwm: tegra: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 0bda6b0187fd57761bbe4cc6101f2297b01b90fb Author: Uwe Kleine-König Date: Fri Mar 3 19:54:40 2023 +0100 pwm: sun4i: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Signed-off-by: Thierry Reding commit 000b97ab8737ed0e7f4a20b493749e2a21dfef1a Author: Uwe Kleine-König Date: Fri Mar 3 19:54:39 2023 +0100 pwm: stm32: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit e13cec3617c6ace4fc389b60d2a7d5b305b62683 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:38 2023 +0100 pwm: sti: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit c51638065bb436901e639782e9c27f7a4ba10c8c Author: Uwe Kleine-König Date: Fri Mar 3 19:54:37 2023 +0100 pwm: sprd: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit f113c11bf28cb0ce0ba28576feafd651638c1132 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:36 2023 +0100 pwm: spear: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 533d29471b3c9405cf6e5f211ae5079f64dac257 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:35 2023 +0100 pwm: sifive: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 1d4f9972dca4905650b858ec493e7b36db7ecc71 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:34 2023 +0100 pwm: samsung: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 18a95d363098bc2a77d4921f0e2483e21589d980 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:33 2023 +0100 pwm: rockchip: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit e7fa6e8447a74582382dbbe72d5c7af72f9f3157 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:32 2023 +0100 pwm: rcar: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit fed5d59d82dd11e1a651384225a8f054bee4a1b6 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:31 2023 +0100 pwm: omap-dmtimer: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit a19cf5a571c49d289cccee7c17d185fc2eb4af88 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:30 2023 +0100 pwm: mtk-disp: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 9a9174eadd8ca8fc2c6b43710b8a5e7e95f64268 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:29 2023 +0100 pwm: lpss-platform: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit fbd2d733e3b7313d396bca6398cd7605fdb63394 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:28 2023 +0100 pwm: lpc18xx-sct: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit ed60a877affc9ae1a14f59d253d6346273a5ebda Author: Uwe Kleine-König Date: Fri Mar 3 19:54:27 2023 +0100 pwm: imx-tpm: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit f365a94660f76599541f7deb83a5d6b388da7dec Author: Uwe Kleine-König Date: Fri Mar 3 19:54:26 2023 +0100 pwm: img: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 1b6d6ce5a5f3800b98a7db76036c822c52d1ba63 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:25 2023 +0100 pwm: hibvt: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 159a61a7b5b01dc158cbe718a181f1943ab6dcac Author: Uwe Kleine-König Date: Fri Mar 3 19:54:24 2023 +0100 pwm: cros-ec: 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 (mostly) ignored 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. 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: Guenter Roeck Signed-off-by: Thierry Reding commit d5806ac636a9e7c2751435ee5c06731261155fd2 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:23 2023 +0100 pwm: clk: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit e577bffd7afc48f9388fd2652b8a015523448a32 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:22 2023 +0100 pwm: brcmstb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 9baa8a00de7db7655e333c1749b3acb87401f62f Author: Uwe Kleine-König Date: Fri Mar 3 19:54:21 2023 +0100 pwm: berlin: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit c49670108b76af7d5aca63f2d7a4bc2a9f15f49e Author: Uwe Kleine-König Date: Fri Mar 3 19:54:20 2023 +0100 pwm: bcm2835: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit bbacca0ee408d94fa08d932cb0f1a6200b4f409a Author: Uwe Kleine-König Date: Fri Mar 3 19:54:19 2023 +0100 pwm: bcm-iproc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit a3c28bca114b9f62d58b8a053aa0240b277e5959 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:18 2023 +0100 pwm: atmel: 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 (mostly) ignored 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. 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: Claudiu Beznea Signed-off-by: Thierry Reding commit 9609284a76978daf53a54e05cff36873a75e4d13 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:17 2023 +0100 pwm: atmel-tcb: 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 (mostly) ignored 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. 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: Claudiu Beznea Signed-off-by: Thierry Reding commit 5fce94170ad8a67b839f3dd8e8e8a87039ba0251 Author: Uwe Kleine-König Date: Fri Mar 3 19:54:16 2023 +0100 pwm: atmel-hlcdc: 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 (mostly) ignored 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. 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: Claudiu Beznea Signed-off-by: Thierry Reding commit 3b2deb0e46da9798b694cf50bd8bea1b26dcc789 Author: Jens Axboe Date: Fri Mar 24 14:37:19 2023 -0600 iov_iter: import single vector iovecs as ITER_UBUF Add a special case to __import_iovec(), which imports a single segment iovec as an ITER_UBUF rather than an ITER_IOVEC. ITER_UBUF is cheaper to iterate than ITER_IOVEC, and for a single segment iovec, there's no point in using a segmented iterator. Signed-off-by: Jens Axboe commit e03ad4ee2783e41afc90cc7848468aef10741c0e Author: Jens Axboe Date: Fri Mar 24 14:35:49 2023 -0600 iov_iter: convert import_single_range() to ITER_UBUF Since we're just importing a single vector, we don't have to turn it into an ITER_IOVEC. Instead turn it into an ITER_UBUF, which is cheaper to iterate. Signed-off-by: Jens Axboe commit 747b1f65d39ae729b7914075899b0c82d7f667db Author: Jens Axboe Date: Tue Mar 28 14:21:06 2023 -0600 iov_iter: overlay struct iovec and ubuf/len Add an internal struct iovec that we can return as a pointer, with the fields of the iovec overlapping with the ITER_UBUF ubuf and length fields. Then we can have iter_iov() check for the appropriate type, and return &iter->__ubuf_iovec for ITER_UBUF and iter->__iov for ITER_IOVEC and things will magically work out for a single segment request regardless of either type. Signed-off-by: Jens Axboe commit cd0bd57a9de59019fe99e9305a2337a66a4f9d39 Author: Jens Axboe Date: Tue Mar 28 14:29:03 2023 -0600 iov_iter: set nr_segs = 1 for ITER_UBUF To avoid needing to check if a given user backed iov_iter is of type ITER_IOVEC or ITER_UBUF, set the number of segments for the ITER_UBUF case to 1 as we're carrying a single segment. Signed-off-by: Jens Axboe commit 6eb203e1a868187cbc23ae3bad443dc929ca6cca Author: Jens Axboe Date: Wed Mar 29 09:18:26 2023 -0600 iov_iter: remove iov_iter_iovec() No more users are left of this function. Signed-off-by: Jens Axboe commit 95e49cf8373a0a4d1ec85f0512080bb4f945df74 Author: Jens Axboe Date: Wed Mar 29 09:16:45 2023 -0600 iov_iter: add iter_iov_addr() and iter_iov_len() helpers These just return the address and length of the current iovec segment in the iterator. Convert existing iov_iter_iovec() users to use them instead of getting a copy of the current vec. Signed-off-by: Jens Axboe commit e4d3202c18329ba2733c9e04489b6ef05d3bce08 Author: Jens Axboe Date: Tue Mar 28 14:35:31 2023 -0600 ALSA: pcm: check for user backed iterator, not specific iterator type In preparation for switching single segment iterators to using ITER_UBUF, swap the check for whether we are user backed or not. Signed-off-by: Jens Axboe commit da67ba07b4aa0a192e2957540eca15f8cb2e1ee7 Author: Jens Axboe Date: Tue Mar 28 14:34:06 2023 -0600 IB/qib: check for user backed iterator, not specific iterator type In preparation for switching single segment iterators to using ITER_UBUF, swap the check for whether we are user backed or not. Signed-off-by: Jens Axboe commit 23ecdcd0c070e200f52b58e131af2b276b3d800e Author: Jens Axboe Date: Tue Mar 28 14:32:38 2023 -0600 IB/hfi1: check for user backed iterator, not specific iterator type In preparation for switching single segment iterators to using ITER_UBUF, swap the check for whether we are user backed or not. While at it, move it outside the srcu locking area to clean up the code a bit. Signed-off-by: Jens Axboe commit de4f5fed3f231a8ff4790bf52975f847b95b85ea Author: Jens Axboe Date: Wed Mar 29 08:52:15 2023 -0600 iov_iter: add iter_iovec() helper This returns a pointer to the current iovec entry in the iterator. Only useful with ITER_IOVEC right now, but it prepares us to treat ITER_UBUF and ITER_IOVEC identically for the first segment. Rename struct iov_iter->iov to iov_iter->__iov to find any potentially troublesome spots, and also to prevent anyone from adding new code that accesses iter->iov directly. Signed-off-by: Jens Axboe commit 6050cb1c7ad40b5673cd6ee7cfd36db3ca9be5fe Author: Rob Herring Date: Mon Mar 27 15:52:28 2023 -0500 ARM: sh-mobile: Use of_cpu_node_to_id() to read CPU node 'reg' Replace open coded CPU nodes reading of "reg" and translation to logical ID with of_cpu_node_to_id(). The original code called of_parse_phandle() CONFIG_NR_CPUS times regardless of the length of 'cpus'. Optimize the loop to bail out once of_parse_phandle() fails as the end of 'cpus' property has been reached. Signed-off-by: Rob Herring Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230327205228.573456-1-robh@kernel.org Signed-off-by: Geert Uytterhoeven commit 3d52973db7457362e54b5b62242671eee80b2c14 Author: Lad Prabhakar Date: Wed Mar 22 12:56:48 2023 +0000 arm64: dts: renesas: rzg2l-smarc: Enable CRU, CSI support Enable CRU, CSI on RZ/G2L SMARC EVK and tie the CSI to OV5645 sensor using Device Tree overlay. rz-smarc-cru-csi-ov5645.dtsi is created so that RZ/G2L alike EVKs can make use of it. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230322125648.24948-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 95c91e77664866517a999abdb246ffb207882c30 Author: Lad Prabhakar Date: Wed Mar 22 12:56:47 2023 +0000 arm64: dts: renesas: r9a07g044: Add CSI and CRU nodes Add CSI and CRU nodes r9a07g044 (RZ/G2L) SoC DTSI. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230322125648.24948-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 52a3554bdf9dbaff42b42f0e0360f456890894d9 Author: Biju Das Date: Tue Mar 21 11:47:53 2023 +0000 arm64: dts: renesas: r9a07g044: Enable SCI0 using DT overlay Enable sci0 node using dt overlay and disable can{0,1}-stb-hog nodes in DT overlay as its pins are shared with sci0 pins. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230321114753.75038-6-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c21a1fc21727defdba1ad00e75c94bd497681dd3 Author: Geert Uytterhoeven Date: Mon Mar 20 17:49:27 2023 +0100 ARM: dts: r8a7790: Add PWM device nodes Add support for the 7 PWM channels provided by PWM Timers on R-Car H2, by adding device nodes describing the PWM Timers. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/9755b3af4296060ee31c4652def639574cbbd2fb.1679330878.git.geert+renesas@glider.be commit 82e6c62820d758c37eabb9b4bee157068ff6835d Author: Geert Uytterhoeven Date: Mon Mar 20 17:47:44 2023 +0100 ARM: dts: r8a7790: Add TPU device node Add support for the 4 PWM channels provided by the 16-bit Timer Pulse Unit on R-Car H2, by adding a device node describing the TPU. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/75da1e63135a3fc8a3aaafbff7139bd5d7509be3.1679330727.git.geert+renesas@glider.be commit 1b4d507e89136e60c6b1db4543cae5f8e20085ae Author: Geert Uytterhoeven Date: Mon Mar 20 17:34:24 2023 +0100 ARM: dts: marzen: Enable I2C support Enable the single I2C bus available on the Marzen development board. As this bus contains an AK4643 codec, it must be limited to 100 kHz. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/77b87378397fd26f39c73f68e3ea465db6d38fb1.1679330016.git.geert+renesas@glider.be commit cab3511ea7a0b1fc0c664e654f948f7ebe4f9072 Author: Geert Uytterhoeven Date: Mon Mar 20 17:33:22 2023 +0100 ARM: dts: marzen: Add slide switches Describe the four General Purpose Switches on the Marzen development board, so they can be used for user input and/or for wake-up from s2ram. The GPIO block on R-Car H1 does not support triggering interrupts on both edges of a changing input signal, hence one cannot use gpio-keys with gpios properties. Instead, one of two alternatives needs to be used: 1. Use gpio-keys with interrupts instead of gpios properties, at the expense of receiving only key presses (release events will be auto-generated), 2. Use gpio-keys-polled with gpios properties, at the expense of making these keys unusable as wake-up sources. As the DTS for the Marzen development board serves mainly as an example, the approach taken is to use the first alternative for the first two switches, and the second alternative for the last two switches. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/f834a3c397362f2424fcae6a0c0440356208b182.1679329829.git.geert+renesas@glider.be commit 2114ab85f3fc8f833508d763a59459be8f2e9ad2 Author: Geert Uytterhoeven Date: Mon Mar 20 17:30:06 2023 +0100 ARM: dts: r8a7779: Add PWM support Add support for the 7 PWM channels provided by PWM Timers on R-Car H1, by describing the PWM Timers and their module clock. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/71622584db692f571d542ef2dcf088ce549aed3f.1679329211.git.geert+renesas@glider.be commit f0545078e13973ca032cf131eb7580d86b78d147 Author: Geert Uytterhoeven Date: Mon Mar 20 17:30:05 2023 +0100 dt-bindings: clock: r8a7779: Add PWM module clock Add the module clock used by the PWM Timers on the Renesas R-Car H1 (R8A7779) SoC. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1397b517fccbe716a71cfae770512ed577730a25.1679329211.git.geert+renesas@glider.be commit 05d11e2f4460752fa5f7ce7657e1b040056c1736 Author: Biju Das Date: Wed Mar 15 06:47:26 2023 +0000 arm64: dts: renesas: rzg2l: Add clock-names and reset-names to DMAC nodes Add clock-names and reset-names to RZ/G2{L,LC,UL}, RZ/V2L and RZ/Five DMAC nodes. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230315064726.22739-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit e3d53ded577328f2b26d361f2e62fc70e85ab6a3 Author: Jaewon Kim Date: Mon Mar 6 10:42:39 2023 +0900 spi: s3c64xx: add no_cs description This patch adds missing variable no_cs descriptions. Signed-off-by: Jaewon Kim Reviewed-by: Krzysztof Kozlowski Reviewed-by: Andi Shyti Link: https://lore.kernel.org/r/20230306014239.80570-1-jaewon02.kim@samsung.com Signed-off-by: Mark Brown commit 1e135922f608572f216c959202d0ef303aa2a0c1 Author: Geert Uytterhoeven Date: Fri Mar 17 08:59:00 2023 +0100 MAINTAINERS: renesas: Add "renesas," file contents pattern Add a keyword match pattern for the word "renesas," in files to the ARM/RISC-V/RENESAS ARCHITECTURE section. This make sure patches changing drivers that match against "renesas," (as used mostly for Renesas on-SoC components) are CCed to the linux-renesas-soc mailing list. Signed-off-by: Geert Uytterhoeven Acked-by: Wolfram Sang Acked-by: Niklas Söderlund Link: https://lore.kernel.org/r/c1be1e97c5457eade25b0eb5118196677cecfc08.1679039809.git.geert+renesas@glider.be commit 45e6cc8ef1cd8576707506a4eeffef858e4a1a83 Author: Geert Uytterhoeven Date: Tue Mar 21 17:28:00 2023 +0100 pinctrl: renesas: core: Drop unneeded #ifdef CONFIG_OF As the of_node member of struct device always exists, and there is a dummy of of_device_get_match_data() for the !CONFIG_OF case, there is no longer a need to protect code using these interfaces with an #ifdef. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/55d72ce46b43ec2f41681cb5ba7ca7fcebdb98d1.1679416005.git.geert+renesas@glider.be commit 890c3a6ff25fbbcedcd9c77fc97ac4d54d7a5a61 Author: Geert Uytterhoeven Date: Mon Mar 20 17:18:58 2023 +0100 pinctrl: renesas: r8a7779: Add PWM pins, groups, and functions Add pins, groups, and functions for the PWM Timers on the Renesas R-Car H1 (R8A7779) SoC. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/cea9723e9c3df4b1408750caa38886aac1fab5f7.1679329090.git.geert+renesas@glider.be commit 63a66eb8ff1d620333ce388d121eb101a353b014 Author: Geert Uytterhoeven Date: Mon Mar 20 17:17:47 2023 +0100 pinctrl: renesas: r8a7779: Add bias pinconf support Implement support for pull-up handling for the R-Car H1 SoC, using the common R-Car bias handling. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/dd966cfc916ef881051ec53bc3393dce7eea8e03.1679328215.git.geert+renesas@glider.be commit 0256b6aeee11d705ae248c5a47aa0867976b00a5 Author: Geert Uytterhoeven Date: Wed Mar 8 11:44:27 2023 +0100 pinctrl: renesas: Annotate sentinels in tables It does not make sense to have a comma after a sentinel, as any new elements must be added before the sentinel. Hence drop all such commas. Add comments to clarify the purpose of the empty elements. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/845f1d8285dd44522af1b0f429d4c6bd4759eb9e.1678272180.git.geert+renesas@glider.be commit 3c2465067f32beacc61ff898af7d8add1390aa95 Author: Geert Uytterhoeven Date: Wed Mar 8 11:42:44 2023 +0100 pinctrl: renesas: r8a779g0: Add support for AVB/TSN power-sources Add support for configuring the I/O voltage levels of the Ethernet AVB and Ethernet TSN pins on the R-Car V4H SoC. "PIN_VDDQ_AVB[012]" and "PIN_VDDQ_TSN0" can be configured for 1.8V or 2.5V operation. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/c046e0be7d26302061d7aa629180a451734ddf8f.1678271030.git.geert+renesas@glider.be commit d04b961dd44d02c47ca7b716b493478d4a3f3967 Author: Geert Uytterhoeven Date: Wed Mar 8 11:42:43 2023 +0100 pinctrl: renesas: r8a77995: Add support for AVB power-source Add support for configuring the I/O voltage level of the Ethernet AVB pins on the R-Car D3 SoC. "PIN_VDDQ_AVB0" can be configured for 2.5V or 3.3V operation. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/8f9164487715d8a4898ca651038c0b4d5013764c.1678271030.git.geert+renesas@glider.be commit 7f25d5b04af2ec0b85a18071ab59f9a6e456dfe0 Author: Geert Uytterhoeven Date: Wed Mar 8 11:42:42 2023 +0100 pinctrl: renesas: r8a77990: Add support for AVB power-source Add support for configuring the I/O voltage level of the Ethernet AVB pins on the R-Car E3 SoC. "PIN_VDDQ_AVB0" can be configured for 2.5V or 3.3V operation. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/57883cd2d94c7919dc0f0db07cf6169ca89538e6.1678271030.git.geert+renesas@glider.be commit 6cd853a45324e26d71d7848b7f0fe28b5c023375 Author: Geert Uytterhoeven Date: Wed Mar 8 11:42:41 2023 +0100 pinctrl: renesas: r8a77980: Add support for AVB/GE power-sources Add support for configuring the I/O voltage levels of the Ethernet AVB and Gigabit Ethernet pins on the R-Car V3H SoC. "PIN_VDDQ_AVB" and "PIN_VDDQ_GE" can be configured for 2.5V or 3.3V operation. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/3c26c4f3735a6d071685c507c065172e63af5d70.1678271030.git.geert+renesas@glider.be commit a7bebdc5905ed23a3d33ec194a800b04b4161d3c Author: Geert Uytterhoeven Date: Wed Mar 8 11:42:40 2023 +0100 pinctrl: renesas: r8a77970: Add support for AVB power-source Add support for configuring the I/O voltage level of the Ethernet AVB pins on the R-Car V3M SoC. "PIN_VDDQ_AVB0" can be configured for 2.5V or 3.3V operation. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/eb4db82bdeb67507a1a77f63b9d90280d6f38ba4.1678271030.git.geert+renesas@glider.be commit b88e733ac5170efe5f26c62606ff97901dad9248 Author: Geert Uytterhoeven Date: Wed Mar 8 11:42:39 2023 +0100 pinctrl: renesas: Add support for 1.8V/2.5V I/O voltage levels Currently, the Renesas pin control driver supports pins that can switch their I/O voltage levels between either 1.8V and 3.3V, or between 2.5V and 3.3V. However, some SoCs have pins that can switch between 1.8V and 2.5V. Add support for this by replacing the separate SH_PFC_PIN_CFG_IO_VOLTAGE capability and voltage level flags by a 2-bit field, to cover three possible I/O voltage switching options. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/0c04925457bf3f7e78e7e3851528d9a4c29246da.1678271030.git.geert+renesas@glider.be commit a3ca1e18931e60c9f1765f630b677cad8372d1b7 Author: Geert Uytterhoeven Date: Wed Mar 8 11:42:38 2023 +0100 pinctrl: renesas: rcar: Phase out old SH_PFC_PIN_CFG_IO_VOLTAGE flag Commit 537db25ca330dce0 ("pinctrl: renesas: Add I/O voltage level flag") introduced new flags to support pins that can switch their voltage levels between either 1.8V and 3.3V, or between 2.5V and 3.3V. The old SH_PFC_PIN_CFG_IO_VOLTAGE flag was retained to avoid having to change existing drivers. Replace SH_PFC_PIN_CFG_IO_VOLTAGE by SH_PFC_PIN_CFG_IO_VOLTAGE_18_33, to make the voltage configuration explicit, and to prepare for the advent of support for more voltage levels. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/ae5f879c093f3e3cd50ba1495975bccfad81237b.1678271030.git.geert+renesas@glider.be commit 31f0a454d3dff997eb6570297e0c555d511dbdd6 Author: Geert Uytterhoeven Date: Wed Mar 8 11:42:37 2023 +0100 pinctrl: renesas: r8a77995: Retain POCCTRL0 register across suspend/resume The POC Control Register 0 (POCCTRL0) on R-Car D3 is not registered in the pinmux_ioctrl_regs[] array. Hence it is not saved/restored during suspend/resume, and its contents may be lost after s2ram. This went unnoticed when improving suspend/resume support in commit d92ee9cf8ec8d7fe ("pinctrl: sh-pfc: rcar-gen3: Retain TDSELCTRL register across suspend/resume"). Fix this by moving the pinmux_ioctrl_regs[] array up, and adding the POCCTRL0 register. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/d17402b83b1f3fa0f572527c0382027bccb86205.1678271030.git.geert+renesas@glider.be commit da617cd8d90608582eb8d0b58026f31f1a9bfb1d Author: Wolfram Sang Date: Wed Mar 29 08:44:14 2023 +0200 smsc911x: remove superfluous variable init phydev is assigned a value right away, no need to initialize it. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230329064414.25028-1-wsa+renesas@sang-engineering.com Signed-off-by: Paolo Abeni commit cfad817095e111b640c7d538b9f182d2535ee065 Author: Krzysztof Kozlowski Date: Thu Mar 30 13:34:05 2023 +0200 ASoC: dt-bindings: qcom,lpass-va-macro: Add missing NPL clock Several devices (e.g. SC8280XP and SM8450) expect a NPL (Near Pad Logic) clock. Add the clock and customize allowed clocks per each variant. The clocks are also required by ADSP in all variants. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230330113405.55722-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 22dc3789b737fe29d8f54f0d084047aede5550ad Author: Tom Rix Date: Fri Mar 17 15:13:41 2023 -0400 leds: flash: Set variables mvflash_{3,4}ch_regs storage-class-specifier to static Smatch reports: drivers/leds/flash/leds-qcom-flash.c:103:18: warning: symbol 'mvflash_3ch_regs' was not declared. Should it be static? drivers/leds/flash/leds-qcom-flash.c:115:18: warning: symbol 'mvflash_4ch_regs' was not declared. Should it be static? These variables are only used locally, so it should be static. Signed-off-by: Tom Rix Acked-by: Pavel Machek Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230317191341.1670660-1-trix@redhat.com commit 560f2eb7d6a775e488832b724b25bde33ce71b9f Author: Lukas Bulwahn Date: Thu Mar 23 11:54:10 2023 +0100 leds: rgb: mt6370: Correct config name to select in LEDS_MT6370_RGB Commit 55a8a5c16eb3 ("leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support") introduces the config LEDS_MT6370_RGB, which selects the non-existing config LINEAR_RANGE. As the driver includes linux/linear_range.h, it is a safe guess that the config actually intends to select LINEAR_RANGES, which provides the library implementation for the function prototypes defined in the linear_range header file. Correct this naming confusion in the LEDS_MT6370_RGB config definition. Fixes: 55a8a5c16eb3 ("leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support") Signed-off-by: Lukas Bulwahn Acked-by: Pavel Machek Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230323105410.10396-1-lukas.bulwahn@gmail.com commit 87b626a66dd4ab7d5caf5199d98ec0b5953d73f8 Author: Rob Herring Date: Fri Mar 10 08:47:35 2023 -0600 macintosh: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman Link: https://msgid.link/20230310144735.1546817-1-robh@kernel.org commit 4d57e3515e3838b12eccbeb5e0e52f053e3f638a Author: Rob Herring Date: Fri Mar 10 08:46:57 2023 -0600 powerpc: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to of_property_read_bool(). Signed-off-by: Rob Herring Signed-off-by: Michael Ellerman Link: https://msgid.link/20230310144659.1541127-1-robh@kernel.org commit 857d423c74228cfa064f79ff3a16b163fdb8d542 Author: Rob Herring Date: Fri Mar 10 08:46:56 2023 -0600 powerpc: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring [mpe: Drop change in ppc4xx_probe_pci_bridge(), formatting] Signed-off-by: Michael Ellerman Link: https://msgid.link/20230310144657.1541039-1-robh@kernel.org commit af8bc68263b2184e63ee67ca70cecff4636f7901 Author: Nathan Lynch Date: Mon Mar 6 15:33:45 2023 -0600 powerpc/rtas: lockdep annotations Add lockdep annotations for the following properties that must hold: * Any error log retrieval must be atomically coupled with the prior RTAS call, without a window for another RTAS call to occur before the error log can be retrieved. * All users of the core rtas_args parameter block must hold rtas_lock. Move the definitions of rtas_lock and rtas_args up in the file so that __do_enter_rtas_trace() can refer to them. Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://msgid.link/20230220-rtas-queue-for-6-4-v1-6-010e4416f13f@linux.ibm.com commit 32740fce09f98d30f3c71a09ee4e9d90b3965427 Author: Nathan Lynch Date: Mon Mar 6 15:33:43 2023 -0600 powerpc/rtas: fix miswording in rtas_function kerneldoc The 'filter' member is a pointer, not a bool; fix the wording accordingly. Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://msgid.link/20230220-rtas-queue-for-6-4-v1-4-010e4416f13f@linux.ibm.com commit 1792e46ed0cfc1fa27c8c805f8098f806bcc5fc3 Author: Nathan Lynch Date: Mon Mar 6 15:33:42 2023 -0600 powerpc/rtas: rtas_call_unlocked() kerneldoc Add documentation for rtas_call_unlocked(), including details on how it differs from rtas_call(). Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://msgid.link/20230220-rtas-queue-for-6-4-v1-3-010e4416f13f@linux.ibm.com commit 271208ee5e335cb1ad280d22784940daf7ddf820 Author: Nathan Lynch Date: Mon Mar 6 15:33:41 2023 -0600 powerpc/rtas: use memmove for potentially overlapping buffer copy Using memcpy() isn't safe when buf is identical to rtas_err_buf, which can happen during boot before slab is up. Full context which may not be obvious from the diff: if (altbuf) { buf = altbuf; } else { buf = rtas_err_buf; if (slab_is_available()) buf = kmalloc(RTAS_ERROR_LOG_MAX, GFP_ATOMIC); } if (buf) memcpy(buf, rtas_err_buf, RTAS_ERROR_LOG_MAX); This was found by inspection and I'm not aware of it causing problems in practice. It appears to have been introduced by commit 033ef338b6e0 ("powerpc: Merge rtas.c into arch/powerpc/kernel"); the old ppc64 version of this code did not have this problem. Use memmove() instead. Fixes: 033ef338b6e0 ("powerpc: Merge rtas.c into arch/powerpc/kernel") Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://msgid.link/20230220-rtas-queue-for-6-4-v1-2-010e4416f13f@linux.ibm.com commit f40b0f6c5c27de167fdd10e541e0a4b5f2bc772b Author: Nathan Lynch Date: Mon Mar 6 15:33:40 2023 -0600 powerpc/rtas: ensure 8-byte alignment for struct rtas_args CHRP and PAPR agree: "In order to make an RTAS call, the operating system must construct an argument call buffer aligned on an eight byte boundary in physically contiguous real memory [...]." (7.2.7 Calling Mechanism and Conventions). struct rtas_args is the type used for this argument call buffer. The unarchitected 'rets' member happens to produce 8-byte alignment for the struct on 64-bit targets in practice. But without an alignment directive the structure will have only 4-byte alignment on 32-bit targets: $ nm b/{before,after}/chrp32/vmlinux | grep rtas_args c096881c b rtas_args c0968820 b rtas_args Add an alignment directive to the struct rtas_args declaration so all instances have the alignment required by the specs. rtas-types.h no longer refers to any spinlock types, so drop the spinlock_types.h inclusion while we're here. Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://msgid.link/20230220-rtas-queue-for-6-4-v1-1-010e4416f13f@linux.ibm.com commit 05dce4ba125336875cd3eed3c1503fa81cd2f691 Author: Randy Dunlap Date: Wed Feb 22 17:42:41 2023 -0800 macintosh: via-pmu-led: requires ATA to be set LEDS_TRIGGER_DISK depends on ATA, so selecting LEDS_TRIGGER_DISK when ATA is not set/enabled causes a Kconfig warning: WARNING: unmet direct dependencies detected for LEDS_TRIGGER_DISK Depends on [n]: NEW_LEDS [=y] && LEDS_TRIGGERS [=y] && ATA [=n] Selected by [y]: - ADB_PMU_LED_DISK [=y] && MACINTOSH_DRIVERS [=y] && ADB_PMU_LED [=y] && LEDS_CLASS [=y] Fix this by making ADB_PMU_LED_DISK depend on ATA. Seen on both PPC32 and PPC64. Fixes: 0e865a80c135 ("macintosh: Remove dependency on IDE_GD_ATA if ADB_PMU_LED_DISK is selected") Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://msgid.link/20230223014241.20878-1-rdunlap@infradead.org commit 55d8bd02cc1b9f1063993b5c42c9cabf4af67dea Author: Randy Dunlap Date: Wed Feb 22 23:01:16 2023 -0800 powerpc/sysdev/tsi108: fix resource printk format warnings Use "%pa" format specifier for resource_size_t to avoid a compiler printk format warning. arch/powerpc/sysdev/tsi108_pci.c: In function 'tsi108_setup_pci': include/linux/kern_levels.h:5:25: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'resource_size_t' Fixes: c4342ff92bed ("[POWERPC] Update mpc7448hpc2 board irq support using device tree") Fixes: 2b9d7467a6db ("[POWERPC] Add tsi108 pci and platform device data register function") Signed-off-by: Randy Dunlap [mpe: Use pr_info() and unsplit string] Signed-off-by: Michael Ellerman Link: https://msgid.link/20230223070116.660-5-rdunlap@infradead.org commit 7b69600d4da0049244e9be2f5ef5a2f8e04fcd9a Author: Randy Dunlap Date: Wed Feb 22 23:01:14 2023 -0800 powerpc/wii: fix resource printk format warnings Use "%pa" format specifier for resource_size_t to avoid compiler printk format warnings. ../arch/powerpc/platforms/embedded6xx/flipper-pic.c: In function 'flipper_pic_init': ../include/linux/kern_levels.h:5:25: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=] ../arch/powerpc/platforms/embedded6xx/flipper-pic.c:148:9: note: in expansion of macro 'pr_info' 148 | pr_info("controller at 0x%08x mapped to 0x%p\n", res.start, io_base); | ^~~~~~~ ../arch/powerpc/platforms/embedded6xx/hlwd-pic.c: In function 'hlwd_pic_init': ../include/linux/kern_levels.h:5:25: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=] ../arch/powerpc/platforms/embedded6xx/hlwd-pic.c:174:9: note: in expansion of macro 'pr_info' 174 | pr_info("controller at 0x%08x mapped to 0x%p\n", res.start, io_base); | ^~~~~~~ ../arch/powerpc/platforms/embedded6xx/wii.c: In function 'wii_ioremap_hw_regs': ../include/linux/kern_levels.h:5:25: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=] ../arch/powerpc/platforms/embedded6xx/wii.c:77:17: note: in expansion of macro 'pr_info' 77 | pr_info("%s at 0x%08x mapped to 0x%p\n", name, | ^~~~~~~ Fixes: 028ee972f032 ("powerpc: gamecube/wii: flipper interrupt controller support") Fixes: 9c21025c7845 ("powerpc: wii: hollywood interrupt controller support") Fixes: 5a7ee3198dfa ("powerpc: wii: platform support") Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://msgid.link/20230223070116.660-3-rdunlap@infradead.org commit 7538c97e2b80ff6b7a8ea2ecf16a04355461b439 Author: Randy Dunlap Date: Wed Feb 22 23:01:13 2023 -0800 powerpc/mpc512x: fix resource printk format warning Use "%pa" format specifier for resource_size_t to avoid a compiler printk format warning. ../arch/powerpc/platforms/512x/clock-commonclk.c: In function 'mpc5121_clk_provide_backwards_compat': ../arch/powerpc/platforms/512x/clock-commonclk.c:989:44: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=] 989 | snprintf(devname, sizeof(devname), "%08x.%s", res.start, np->name); \ | ^~~~~~~~~ ~~~~~~~~~ | | | resource_size_t {aka long long unsigned int} Prevents 24 such warnings. Fixes: 01f25c371658 ("clk: mpc512x: add backwards compat to the CCF code") Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://msgid.link/20230223070116.660-2-rdunlap@infradead.org commit e7299f961fe5e4496db0bfaa9e819f5e97f3846b Author: Christophe Leroy Date: Mon Feb 27 16:54:45 2023 +0100 powerpc/perf: Properly detect mpc7450 family Unlike PVR_POWER8, etc ...., PVR_7450 represents a full PVR value and not a family value. To avoid confusion, do like E500 family and define the relevant PVR_VER_xxxx values for the 7450 family: 0x8000 ==> 7450 0x8001 ==> 7455 0x8002 ==> 7447 0x8003 ==> 7447A 0x8004 ==> 7448 And use them to detect 7450 family for perf events. Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202302260657.7dM9Uwev-lkp@intel.com/ Fixes: ec3eb9d941a9 ("powerpc/perf: Use PVR rather than oprofile field to determine CPU version") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/99ca1da2e5a6cf82a8abf4bc034918e500e31781.1677513277.git.christophe.leroy@csgroup.eu commit d3cf1662b665f20444a08bff52b6daae912e0d1d Author: Benjamin Gray Date: Tue Feb 28 11:07:09 2023 +1100 selftests/powerpc: Make dd output quiet dd logs info to stderr by default. This info is pointless in the selftests and makes legitimate issues harder to spot. Pass the option to silence the info logs. Actual errors would still be printed. Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://msgid.link/20230228000709.124727-4-bgray@linux.ibm.com commit 4ecd0868c5138238dec8a1549bb6ff8e5b48208b Author: Benjamin Gray Date: Tue Feb 28 11:07:08 2023 +1100 selftests/powerpc: Pass make context to children Make supports passing the 'jobserver' (parallel make support) to child invocations of make when either 1. The target command uses $(MAKE) directly 2. The command starts with '+' This context is not passed through expansions that result in $(MAKE), so the macros used in several places fail to pass on the jobserver context. Warnings are also raised by the child mentioning this. Prepend macros lines that invoke $(MAKE) with '+' to allow passing the jobserver context to these children. Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://msgid.link/20230228000709.124727-3-bgray@linux.ibm.com commit 69608683a65be5322ef44091eaeb9890472b2eea Author: Benjamin Gray Date: Tue Feb 28 11:07:07 2023 +1100 selftests/powerpc: Use CLEAN macro to fix make warning The CLEAN macro was added in 337f1e36 to prevent the Makefile:50: warning: overriding recipe for target 'clean' ../../lib.mk:124: warning: ignoring old recipe for target 'clean' style warnings. Expand it's use to fix another case of redefining a target directly. Signed-off-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://msgid.link/20230228000709.124727-2-bgray@linux.ibm.com commit 2747fd26f801c98d0a8177278b4f5c91b8de9c94 Author: Petr Vaněk Date: Fri Mar 24 23:00:41 2023 +0100 powerpc/pseries: Add spaces around / operator This is follow up change after 14b5d59a261b ("powerpc/pseries: Fix formatting to make code look more beautiful") to conform to kernel coding style. Signed-off-by: Petr Vaněk Signed-off-by: Michael Ellerman Link: https://msgid.link/20230324220041.11378-1-arkamar@atlas.cz commit 631cf002826007ab7415258ee647dcaf8845ad5a Author: Liang He Date: Thu Mar 30 11:35:58 2023 +0800 macintosh/windfarm_smu_sat: Add missing of_node_put() We call of_node_get() in wf_sat_probe() after sat is created, so we need the of_node_put() before *kfree(sat)*. Fixes: ac171c46667c ("[PATCH] powerpc: Thermal control for dual core G5s") Signed-off-by: Liang He Signed-off-by: Michael Ellerman Link: https://msgid.link/20230330033558.2562778-1-windhl@126.com commit 5b422b9bb7318b5ab8d0c124d623db4d3f6b2771 Merge: 805ae9dc3b1c4 3d91c53729679 Author: Thomas Gleixner Date: Thu Mar 30 14:10:31 2023 +0200 Merge branch 'x86/cc' into x86/apic Pick up the cc_vendor changes. commit 87efe384109f7938c94e74b1ce9c613136f50fd9 Merge: 812b0597fb404 3d91c53729679 Author: Thomas Gleixner Date: Thu Mar 30 14:07:05 2023 +0200 Merge branch 'x86/cc' into x86/sev Pick up the cc_vendor changes. commit 3d91c537296794d5d0773f61abbe7b63f2f132d8 Author: Borislav Petkov (AMD) Date: Sat Mar 18 12:56:33 2023 +0100 x86/coco: Export cc_vendor It will be used in different checks in future changes. Export it directly and provide accessor functions and stubs so this can be used in general code when CONFIG_ARCH_HAS_CC_PLATFORM is not set. No functional changes. [ tglx: Add accessor functions ] Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230318115634.9392-2-bp@alien8.de commit 287bfaf6fee974caba7dc7b874b29c27b1a2dde9 Author: Ville Syrjälä Date: Tue Mar 28 19:49:38 2023 +0300 drm/i915: Make utility pin asserts more accurate Only the PWM output mode of the utility pin is incompatible with DC6/LCPLL disable. Check for that specifically. References: https://gitlab.freedesktop.org/drm/intel/-/issues/6609 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230328164938.8193-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 4ddd6375c3ef6756d492ea5466408cace097121b Merge: 7079d5e61aaa1 8b43fd3d1d7d8 Author: Paolo Abeni Date: Thu Mar 30 13:40:04 2023 +0200 Merge branch 'net-rps-rfs-improvements' Eric Dumazet says: ==================== net: rps/rfs improvements Jason Xing attempted to optimize napi_schedule_rps() by avoiding unneeded NET_RX_SOFTIRQ raises: [1], [2] This is quite complex to implement properly. I chose to implement the idea, and added a similar optimization in ____napi_schedule() Overall, in an intensive RPC workload, with 32 TX/RX queues with RFS I was able to observe a ~10% reduction of NET_RX_SOFTIRQ invocations. While this had no impact on throughput or cpu costs on this synthetic benchmark, we know that firing NET_RX_SOFTIRQ from softirq handler can force __do_softirq() to wakeup ksoftirqd when need_resched() is true. This can have a latency impact on stressed hosts. [1] https://lore.kernel.org/lkml/20230325152417.5403-1-kerneljasonxing@gmail.com/ [2] https://lore.kernel.org/netdev/20230328142112.12493-1-kerneljasonxing@gmail.com/ ==================== Link: https://lore.kernel.org/r/20230328235021.1048163-1-edumazet@google.com Signed-off-by: Paolo Abeni commit 8b43fd3d1d7d88293eb15e92090826e6b7cc13e4 Author: Eric Dumazet Date: Tue Mar 28 23:50:21 2023 +0000 net: optimize ____napi_schedule() to avoid extra NET_RX_SOFTIRQ ____napi_schedule() adds a napi into current cpu softnet_data poll_list, then raises NET_RX_SOFTIRQ to make sure net_rx_action() will process it. Idea of this patch is to not raise NET_RX_SOFTIRQ when being called indirectly from net_rx_action(), because we can process poll_list from this point, without going to full softirq loop. This needs a change in net_rx_action() to make sure we restart its main loop if sd->poll_list was updated without NET_RX_SOFTIRQ being raised. Signed-off-by: Eric Dumazet Cc: Jason Xing Reviewed-by: Jason Xing Tested-by: Jason Xing Signed-off-by: Paolo Abeni commit 821eba962d95806beb0440742c4062a9da8a386b Author: Eric Dumazet Date: Tue Mar 28 23:50:20 2023 +0000 net: optimize napi_schedule_rps() Based on initial patch from Jason Xing. Idea is to not raise NET_RX_SOFTIRQ from napi_schedule_rps() when we queued a packet into another cpu backlog. We can do this only in the context of us being called indirectly from net_rx_action(), to have the guarantee our rps_ipi_list will be processed before we exit from net_rx_action(). Link: https://lore.kernel.org/lkml/20230325152417.5403-1-kerneljasonxing@gmail.com/ Signed-off-by: Eric Dumazet Cc: Jason Xing Reviewed-by: Jason Xing Tested-by: Jason Xing Signed-off-by: Paolo Abeni commit c59647c0dc679008886756a888368da1c6d4ccd3 Author: Eric Dumazet Date: Tue Mar 28 23:50:19 2023 +0000 net: add softnet_data.in_net_rx_action We want to make two optimizations in napi_schedule_rps() and ____napi_schedule() which require to know if these helpers are called from net_rx_action(), instead of being called from other contexts. sd.in_net_rx_action is only read/written by the owning cpu. Signed-off-by: Eric Dumazet Reviewed-by: Jason Xing Tested-by: Jason Xing Signed-off-by: Paolo Abeni commit 8fcb76b934daff12cde76adeab3d502eeb0734b1 Author: Eric Dumazet Date: Tue Mar 28 23:50:18 2023 +0000 net: napi_schedule_rps() cleanup napi_schedule_rps() return value is ignored, remove it. Change the comment to clarify the intent. Signed-off-by: Eric Dumazet Reviewed-by: Jason Xing Tested-by: Jason Xing Signed-off-by: Paolo Abeni commit 387b3bbac5ea6a0a105d685237f033ffe0f184f1 Author: Tianling Shen Date: Sat Mar 25 15:40:22 2023 +0800 arm64: dts: rockchip: Add Xunlong OrangePi R1 Plus LTS The OrangePi R1 Plus LTS is a minor variant of OrangePi R1 Plus with the on-board NIC chip changed from rtl8211e to yt8531c, and otherwise identical to OrangePi R1 Plus. Signed-off-by: Tianling Shen Link: https://lore.kernel.org/r/20230325074022.9818-5-cnsztl@gmail.com Signed-off-by: Heiko Stuebner commit 564cfdb866535662d74a6a1c5b5e7e99845d7e25 Author: Tianling Shen Date: Sat Mar 25 15:40:21 2023 +0800 dt-bindings: Add doc for Xunlong OrangePi R1 Plus LTS Add devicetree binding documentation for the Xunlong OrangePi R1 Plus LTS. Signed-off-by: Tianling Shen Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230325074022.9818-4-cnsztl@gmail.com Signed-off-by: Heiko Stuebner commit 004589ff9df5b75672a78b6c3c4cba93202b14c9 Author: Tianling Shen Date: Sat Mar 25 15:40:20 2023 +0800 arm64: dts: rockchip: Add FriendlyARM NanoPi R2C The NanoPi R2C is a minor variant of NanoPi R2S with the on-board NIC chip changed from rtl8211e to yt8521s, and otherwise identical to R2S. Signed-off-by: Tianling Shen Link: https://lore.kernel.org/r/20230325074022.9818-3-cnsztl@gmail.com Signed-off-by: Heiko Stuebner commit ceb2e18487c322f3becae0959d48ef12a829a2dc Author: Tianling Shen Date: Sat Mar 25 15:40:19 2023 +0800 dt-bindings: Add doc for FriendlyARM NanoPi R2C Add devicetree binding documentation for the FriendlyARM NanoPi R2C. Signed-off-by: Tianling Shen Reviewed-by: Jagan Teki Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230325074022.9818-2-cnsztl@gmail.com Signed-off-by: Heiko Stuebner commit 2238959b6ad27040275439edd6893e309bc729a3 Author: Mark Brown Date: Sun Mar 26 15:11:13 2023 +0100 regmap: Add some basic kunit tests On the theory that it's better to make a start let's add some KUnit tests for regmap. Currently this is a bit of a mess but it passes and hopefully will at some point help catch problems. We provide very basic cover for most of the core functionality that operates at the register level, repeating each test for each cache type in order to exercise the caches. There is no coverage of anything to do with the bulk operations at the bus level or formatting for byte stream buses yet. Each test creates it's own regmap since the cache structures are built incrementally, meaning we gain coverage from the different access patterns, and some of the tests cover different init scenarios. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230324-regmap-kunit-v2-2-b208801dc2c8@kernel.org commit f6352424e37e7bf72291ceab87dc620172be0999 Author: Mark Brown Date: Sun Mar 26 15:11:12 2023 +0100 regmap: Add RAM backed register map Add a register map that is a simple array of memory, for use in KUnit testing of the framework. This is not exposed in regmap.h since I can't think of a non-test use case, it is purely for use internally. To facilitate testing we track if registers have been read or written to. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230324-regmap-kunit-v2-1-b208801dc2c8@kernel.org commit 59257015ac8813d2430988aa01c2f4609a60e8e7 Author: Krzysztof Kozlowski Date: Thu Mar 30 09:13:33 2023 +0200 ASoC: dt-bindings: qcom,lpass-rx-macro: correct minItems for clocks The RX macro codec comes on some platforms in two variants - ADSP and ADSP bypassed - thus the clock-names varies from 3 to 5. The clocks must vary as well: sc7280-idp.dtb: codec@3200000: clocks: [[202, 8], [202, 7], [203]] is too short Fixes: 852fda58d99a ("ASoC: qcom: dt-bindings: Update bindings for clocks in lpass digital codes") Cc: Acked-by: Rob Herring Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230330071333.24308-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 0b57a2d87b4de2a1f01edaf3b00b3d1939792948 Author: Saalim Quadri Date: Tue Mar 28 02:46:29 2023 +0530 ASoC: dt-bindings: alc5632: Convert to dtschema Convert the ALC5632 audio codec bindings to DT schema. Signed-off-by: Saalim Quadri Link: https://lore.kernel.org/r/20230327211629.28643-1-danascape@gmail.com Signed-off-by: Mark Brown commit 17a23ce930e35d5a84889441efd9208d0445bf18 Author: Martijn Braam Date: Tue Mar 28 09:33:09 2023 +0200 arm64: dts: rockchip: Add touchscreen support to rk3399-pinephone-pro The phone has a Goodix GT1158 touchscreen, add a DT node for it. Signed-off-by: Martijn Braam Co-developed-by: Kamil Trzciński Signed-off-by: Kamil Trzciński Co-developed-by: Ondrej Jirman Signed-off-by: Ondrej Jirman Signed-off-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20230328073309.1743112-3-javierm@redhat.com Signed-off-by: Heiko Stuebner commit 3e987e1f22b9b9fdb652a5f3f4aff24265c9af05 Author: Martijn Braam Date: Tue Mar 28 09:33:08 2023 +0200 arm64: dts: rockchip: Add internal display support to rk3399-pinephone-pro The phone's display is using a Hannstar LCD panel. Support it by adding a panel DT node and all needed nodes (backlight, MIPI DSI, regulators, etc). Signed-off-by: Martijn Braam Co-developed-by: Kamil Trzciński Signed-off-by: Kamil Trzciński Co-developed-by: Ondrej Jirman Signed-off-by: Ondrej Jirman Signed-off-by: Javier Martinez Canillas Tested-by: Ondrej Jirman Link: https://lore.kernel.org/r/20230328073309.1743112-2-javierm@redhat.com Signed-off-by: Heiko Stuebner commit e1a234eb3d1507b942c25e5a5ae0d6fb9036f1ff Author: Shreeya Patel Date: Wed Mar 29 02:30:48 2023 +0530 dt-bindings: watchdog: rockchip: Add rockchip,rk3588-wdt string Add rockchip,rk3588-wdt compatible string. Signed-off-by: Shreeya Patel Acked-by: Guenter Roeck Reviewed-by: Guenter Roeck Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230328210048.195124-3-shreeya.patel@collabora.com Signed-off-by: Heiko Stuebner commit 932d139e4db18d535dea271df51db5216b8787b3 Author: Shreeya Patel Date: Wed Mar 29 02:30:47 2023 +0530 arm64: dts: rockchip: Enable watchdog support for RK3588 Add DT node for watchdog support in RK3588. Signed-off-by: Shreeya Patel Link: https://lore.kernel.org/r/20230328210048.195124-2-shreeya.patel@collabora.com Signed-off-by: Heiko Stuebner commit 91b8961eaf051bd437a357a604bb420ce5274003 Author: Bagas Sanjaya Date: Sun Mar 19 15:46:04 2023 +0700 MAINTAINERS: Add entry for LED devices documentation When given patches that only touch documentation directory for LED devices (Documentation/leds/), get_maintainer doesn't list mailing list for LED subsystem. However, the patch should be seen on that list in order to be applied. Add the entry for Documentation/leds/. Signed-off-by: Bagas Sanjaya Acked-by: Pavel Machek Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230319084604.19749-1-bagasdotme@gmail.com commit a6ef8a88fc38cc1bf5c440be73fe520d04301424 Author: Johannes Berg Date: Wed Mar 29 10:05:40 2023 +0300 wifi: iwlwifi: mvm: correctly use link in iwl_mvm_sta_del() This function can be invoked for both MLO and non-MLO, so it must deal with multi-link correctly. Notable, on auth timeout, we'd otherwise get a warning due to the erroneous deflink usage in MLO cases. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100040.b85f6052d51a.Iedfef4b4c4f3ca557aebc0093fdc3f5cfb49b507@changeid Signed-off-by: Johannes Berg commit de50140b701911a34c4652d3a4212cce8f4fccd7 Author: Johannes Berg Date: Wed Mar 29 10:05:39 2023 +0300 wifi: iwlwifi: separate AP link management queues The link management queues associated with the broadcast stations were forgotten and so the same queue was used with both broadcast stations. This leads to lost frames and warnings on cleanup and HW restart. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100040.0671fa976832.Id5aa9856fd5984e447f247e6d0c3979d9794a21a@changeid Signed-off-by: Johannes Berg commit 8ca86d61798f04c98fc2c303d52e552247dc433b Author: Johannes Berg Date: Wed Mar 29 10:05:38 2023 +0300 wifi: iwlwifi: mvm: free probe_resp_data later In the MLD code, we free probe_resp_data before we remove the MAC from the firmware, so we might receive another one from the device after freeing, and thus might leak it. Fix that by moving the free later. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100040.152b1715fc13.Ibd37fed1b24cd25012923ad9170d1fe33ab35c5c@changeid Signed-off-by: Johannes Berg commit e0c7ee3a20cee04d39ac466e7c4b74bfc1328f14 Author: Gregory Greenman Date: Wed Mar 29 10:05:37 2023 +0300 wifi: iwlwifi: bump FW API to 75 for AX devices Start supporting API version 75 for AX devices. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100040.f08a27944fc6.Iafe3a2db2b91072a559038b85eca7b6b322be3ff@changeid Signed-off-by: Johannes Berg commit 59c2d94bba838b61733186e490d4febaec8e93a6 Author: Gregory Greenman Date: Wed Mar 29 10:05:36 2023 +0300 wifi: iwlwifi: mvm: move max_agg_bufsize into host TLC lq_sta This field is used only for host TLC, so it can reside inside the corresponding lq_sta struct. Also, TLC lq_sta is cleared in iwl_mvm_rs_rate_init() upon association, but max_agg_bufsize is set earlier in iwl_mvm_sta_init(). Thus, place this field in the persistent part of lq_sta to retain its value. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100040.d55361064e39.Ib79d30f27d94607d097f0192af2aacd455a17958@changeid Signed-off-by: Johannes Berg commit 164a52d45e4aac669be811d7a345856cccd8cc8e Author: Johannes Berg Date: Wed Mar 29 10:05:35 2023 +0300 wifi: iwlwifi: mvm: send full STA during HW restart By using the internal station add the station is installed in firmware with zeroed MAC addresses, which is wrong. Use the full installation function instead, to fill all data. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100040.62d5371bb3c7.Ie25b62125a3a022f76a36bae5fed9796c18698aa@changeid Signed-off-by: Johannes Berg commit 9deccfcd48b7c358245ed05c11b142cc945daf5e Author: Gregory Greenman Date: Wed Mar 29 10:05:34 2023 +0300 wifi: iwlwifi: mvm: rework active links counting Remove fw_active_links_num counter since we now have a bitmap of active links in vif. Also, update link activation status only when LINK_CONTEXT_MODIFY_ACTIVE bit set in changes parameter. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100040.1ecfb27b6b84.I3a5e0bc32b3728e4caae8a231bc3f04ea1d89cad@changeid Signed-off-by: Johannes Berg commit ef36f1df198b57e2c9c1fe249f537cd64a762f9f Author: Gregory Greenman Date: Wed Mar 29 10:05:33 2023 +0300 wifi: iwlwifi: mvm: update mac config when assigning chanctx Some mac parameters, such as HE support, can change at this stage. Update mac config before updating links. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100040.d7882a0d6e04.Ie38cd854a237c46cf85fd7143dc757326f30da6e@changeid Signed-off-by: Johannes Berg commit f699f039cdb6e028d1f40cb54e73f85cd5d459bd Author: Shaul Triebitz Date: Wed Mar 29 10:05:32 2023 +0300 wifi: iwlwifi: mvm: use the correct link queue For bcase/mcast tx frames use the link queue. Signed-off-by: Shaul Triebitz Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100040.ccd7218e4be2.I40f608a0441190cc26137b039f7cb7b065fd4e0c@changeid Signed-off-by: Johannes Berg commit 2152662d4e14610aaec84b8aba1266114ee78dd5 Author: Johannes Berg Date: Wed Mar 29 10:05:31 2023 +0300 wifi: iwlwifi: mvm: clean up mac_id vs. link_id in MLD sta Here we always have a link ID, not MAC ID, so clean up the naming. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100040.3def62de34b5.I10c9cf5dbfd1fc1e9c9c7d6d4cefcf0c08f1f2da@changeid Signed-off-by: Johannes Berg commit 881d054896f700ca80b3bb2e5ad0b93631bf0113 Author: Johannes Berg Date: Wed Mar 29 10:05:30 2023 +0300 wifi: iwlwifi: mvm: fix station link data leak When we remove the station, we call iwl_mvm_sta_del() which returns true if we cannot remove it from the firmware yet, which happens if this is the station ID for the AP station that's still used because the MAC is still associated. However, we still must free the link data as the station is only kept alive in the firmware, in mac80211 and driver the data structures are destroyed. To fix that, we need to make iwl_mvm_mld_free_sta_link() track whether or not the station is still alive in FW, as otherwise we might reuse the station ID in the meantime and iwl_mvm_mld_rm_sta_from_fw() would reject the later delete from the firmware. Add an argument to it for that. Then we can use the return value of iwl_mvm_sta_del() for that to fix the issue, and call iwl_mvm_mld_rm_sta_from_fw() only if we need to not keep the station in FW. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.1d81d4c71f35.I8fc60ac28ffc1147e9b1250e5e6237b3cb5516ac@changeid Signed-off-by: Johannes Berg commit 24dc33cc54e61a7a97049d6f663c5ac92e097d68 Author: Benjamin Berg Date: Wed Mar 29 10:05:29 2023 +0300 wifi: iwlwifi: mvm: initialize max_rc_amsdu_len per-link Initialize max_rc_amsdu_len per-link both on state change and when a new link is added. Signed-off-by: Benjamin Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.5bf521fe58b8.I73fe585f0ff75d41b5afd32077e3d6e48c90db2a@changeid Signed-off-by: Johannes Berg commit 9213f809bb6319f87296103db39401834bdbe0cd Author: Benjamin Berg Date: Wed Mar 29 10:05:28 2023 +0300 wifi: iwlwifi: mvm: use appropriate link for rate selection We were still using the deflink in most cases, update the code to use the appropriate link. Signed-off-by: Benjamin Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.fa1025502fb4.Iaba0c64740fdcf04a521e2f213bd3f3e27862472@changeid Signed-off-by: Johannes Berg commit 0d504ca1f19b1a150fa17e59c38e1fb42a585b4f Author: Johannes Berg Date: Wed Mar 29 10:05:27 2023 +0300 wifi: iwlwifi: mvm: use the new lockdep-checking macros Use the new macros from mac80211 that do lockdep checking on the RCU dereferences, instead of hard-coding 1 as the argument to rcu_dereference_protected(). Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.112df5c8dec2.I1a1008f5566e509953d988f254d15c9e58630418@changeid Signed-off-by: Johannes Berg commit 3aff89d0b392c9bdf8a3297f8ac0cb22e398f5b3 Author: Johannes Berg Date: Wed Mar 29 10:05:26 2023 +0300 wifi: iwlwifi: mvm: remove chanctx WARN_ON During link switching there might be a link that's marked active but has no chanctx assigned (so it's not active from our driver's POV), skip such links in power recalculation without any warning. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.c629090bd5d2.If7a680d5e349d454f2122f936c21522b9528a55f@changeid Signed-off-by: Johannes Berg commit 8930ed56734d2975f954e0447e65472c142aa88b Author: Johannes Berg Date: Wed Mar 29 10:05:25 2023 +0300 wifi: iwlwifi: mvm: avoid sending MAC context for idle If we change only idle, avoid sending the MAC context command since it doesn't depend on idle state. This also fixes an issue with the firmware because without this we send the command during link switching, as we just deactivated the first link, and we cannot send this command when there's no active link. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.f5218f8453ec.I1325ff14ec07a27dd7ea2c1c210a1721d969839f@changeid Signed-off-by: Johannes Berg commit 072573f6971dcedeb0e221259a41718e42154c8f Author: Johannes Berg Date: Wed Mar 29 10:05:24 2023 +0300 wifi: iwlwifi: mvm: remove only link-specific AP keys When we remove the AP station, we iterate over the links and remove all the keys, however, the key iteration will return all keys for all links, so skip the ones that we don't need based on the link ID. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.e724878f502e.I66870d4629244b4b309be79e11cbbd384bdf93be@changeid Signed-off-by: Johannes Berg commit f14ad95a5d9086efba664eeb9f1f02fd8bc08c65 Author: Johannes Berg Date: Wed Mar 29 10:05:23 2023 +0300 wifi: iwlwifi: mvm: skip inactive links When iterating station links, skip the links that are not yet active by checking for mvmvif->link[] existence. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.bd9b4e64c478.Ie21422c3bf2589d22942c3c57d26e6330d2e3afc@changeid Signed-off-by: Johannes Berg commit 2f17227d65804ae83c20ecfd3175a56ee8671e63 Author: Avraham Stern Date: Wed Mar 29 10:05:22 2023 +0300 wifi: iwlwifi: mvm: adjust iwl_mvm_scan_respect_p2p_go_iter() for MLO When looking for a GO on for setting the scan parameters, iterate over all the available links. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.4eb25d5655d0.Ie69f7313e4337f78c262a835aea3f707273a4209@changeid Signed-off-by: Johannes Berg commit b8a85a1d42d76916bd476a5c91bd7bc98751378f Author: Johannes Berg Date: Wed Mar 29 10:05:21 2023 +0300 wifi: iwlwifi: mvm: rxmq: report link ID to mac80211 Add a fw_id_to_link_sta array in mvm to track the link STA for each firmware station ID, and then use that to report the link a frame was received on (since we know the station ID from firmware). Notably, this fixes beacon tracking for the correct link since mac80211 now queues and processes those on the one link identified by the link ID only. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.c7dd3ec18077.I12ef9eb4a5b8b5c2b9d6bcaa1fda73b59eba39d8@changeid Signed-off-by: Johannes Berg commit 6e3ac4260bc8918919f5cedc7735fb8dcda22143 Author: Shaul Triebitz Date: Wed Mar 29 10:05:20 2023 +0300 wifi: iwlwifi: mvm: use bcast/mcast link station id For an MLD AP, use the correct link mcast or bcast station id. Signed-off-by: Shaul Triebitz Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.0cffa6c45242.I342e17e7bca87b7f05939eb2ebd36fc2aff0b49f@changeid Signed-off-by: Johannes Berg commit 90723da664f53928c8a72c87b2b6d875ef657043 Author: Shaul Triebitz Date: Wed Mar 29 10:05:19 2023 +0300 wifi: iwlwifi: mvm: translate management frame address For management frames sent by an AP interface, translate the MLD addresses to LINK addresses (for an MLD AP). AP (non-bufferable) management frames are sent via the broadcast station so the translation cannot be done by the firmware. Signed-off-by: Shaul Triebitz Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.3cb4292f51e8.Ia662c00ff271c70eda927c12ed49b045b1eb8489@changeid Signed-off-by: Johannes Berg commit 6e4198d35c2e7e107328866c183e14d2b17c740b Author: Shaul Triebitz Date: Wed Mar 29 10:05:18 2023 +0300 wifi: iwlwifi: mvm: implement mac80211 callback change_sta_links Add/removed from iwl driver and firmware station links. Update the station queues accordingly (which station links are connected to the station queues). Signed-off-by: Shaul Triebitz Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.156d1aae5de1.I32973141be1190222169879f8caf7038c1a8f769@changeid Signed-off-by: Johannes Berg commit 29df2a64811914f8399fc2d1fb5b13df03336f50 Author: Shaul Triebitz Date: Wed Mar 29 10:05:17 2023 +0300 wifi: iwlwifi: mvm: use the link sta address Replace the deflink.addr with the proper link address for setting the peer_link_address in the station command. For a non-MLD station, it will be the deflink. Signed-off-by: Shaul Triebitz Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.03ab287da0ae.I88fb5ab4e3ea9c886a3fac7ce09c4791469c3c8e@changeid Signed-off-by: Johannes Berg commit f53be9c4bef6858df46d7bd9246a72789e63d5fc Author: Gregory Greenman Date: Wed Mar 29 10:05:16 2023 +0300 wifi: iwlwifi: mvm: adjust rs init to MLO Rate scale initialization needs some parameters stored separately for each link. Pass link_conf and link_sta pointers and adjust the relevant code accordingly. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.e2f458198844.I98bf3ea807dd8ae8d703915ce9c01e7b7d5ccb42@changeid Signed-off-by: Johannes Berg commit 5ae9daf1e31cc9a4c0898ea660ee96016f3c1729 Author: Gregory Greenman Date: Wed Mar 29 10:05:15 2023 +0300 wifi: iwlwifi: mvm: adjust radar detection to MLO Make the decision about radar detection status depending on each active MLO link. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.a61b1d3f681a.I27bb8726d8806ad725c22bc7256856b1b6636745@changeid Signed-off-by: Johannes Berg commit ba9eef6ba636e72c00b565610d29d10984711d68 Author: Gregory Greenman Date: Wed Mar 29 10:05:14 2023 +0300 wifi: iwlwifi: mvm: adjust iwl_mvm_sec_key_remove_ap to MLO It has to be done per link. We still don't support keys configuration for several links, but the single vif link can still point to a link different from deflink. For now handle the removal of keys for the default link. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.19d729cc4654.I4ebe8e3eb5fc00a994761f7c0ad40107382705ca@changeid Signed-off-by: Johannes Berg commit 6a2a71e563d5cb53037d01785d3817650371213a Author: Johannes Berg Date: Wed Mar 29 10:05:13 2023 +0300 wifi: iwlwifi: mvm: make a few warnings only trigger once We're hitting these while starting to enable MLO in the driver, but getting them each and every time isn't very useful one way or the other. Make these warnings trigger only once. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.f333741d3dcf.If063d4cfe8a583f0f980a1b0ae4e63e17ba4ddc9@changeid Signed-off-by: Johannes Berg commit 3ca2207932fbe227c29fbfdb62f72b824a16ba8e Author: Johannes Berg Date: Wed Mar 29 10:05:12 2023 +0300 wifi: iwlwifi: mvm: coex: start handling multiple links Iterate all the links here and check which ones are active, then adjust them accordingly. This is still wrong as far as the RSSI event is concerned (calling iwl_mvm_bt_coex_enable_rssi_event) since we call that now multiple times, which could overwrite the data; we need to either make that per link or call it only once, but need to sort out first what the firmware will be doing for beacon filtering/beacon abort in MLO. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.fe813fd8de5d.I216236717876510e51e4c21c7fac7691925443f1@changeid Signed-off-by: Johannes Berg commit 42564a74507c450a0edc93f4f06b5537967283fe Author: Johannes Berg Date: Wed Mar 29 10:05:11 2023 +0300 wifi: iwlwifi: mvm: rs-fw: don't crash on missing channel This is more of a workaround, with MLO we can get here with the deflink not assigned. It's not critical right now that we have this right, so WARN_ON_ONCE() and don't crash until we can fix this area of the code. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.2b0d31bdb60b.I39d23c76eec16ac49f6ae3a6d5f7652041bde855@changeid Signed-off-by: Johannes Berg commit b7e39d565fe1d32c6d8253340d577cc53fad03d8 Author: Johannes Berg Date: Wed Mar 29 10:05:10 2023 +0300 wifi: iwlwifi: mvm: use STA link address For now we only support a single link, so just use the deflink's address for the link address, instead of the STA's (MLD) address, but use the link address anyway in order to facilitate MLO connections. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.c853c8ced3ba.I2e1915d1090c526e6a4c718440b45a7192bbbb03@changeid Signed-off-by: Johannes Berg commit 6c07b73e70c89269c534620b20d5946ec2d6e217 Author: Johannes Berg Date: Wed Mar 29 10:05:09 2023 +0300 wifi: iwlwifi: mvm: skip MEI update for MLO For now, if using MLO, skip the MEI update. It probably needs new API for multiple channels. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.aeaa746b14e7.I42b084f3cdc20bb52cf867700a3c2e1f5e7b4ecb@changeid Signed-off-by: Johannes Berg commit 6e1b59565d7bacd7e4b91c81ec4b7780c81bfb07 Author: Johannes Berg Date: Wed Mar 29 10:05:08 2023 +0300 wifi: iwlwifi: mvm: fix narrow RU check for MLO This needs to apply to the link, not deflink. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.0347fa77d522.Ibdf7a40cbe86e64ce086f243330fc27f43aeb3aa@changeid Signed-off-by: Johannes Berg commit ef2b47b89514ae2a7090d4552bae9229c5c54ca8 Author: Johannes Berg Date: Wed Mar 29 10:05:07 2023 +0300 wifi: iwlwifi: mvm: make some HW flags conditional With newer MLD firmware API we no longer need beacon timing information from the host, so disable TIMING_BEACON_ONLY. If MLO is enabled (currently only for testing), then we must not have DEAUTH_NEED_MGD_TX_PREP because mac80211 doesn't support it yet, we'll have to fix that later. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230329100039.28ec631487bf.I6eb27c3d4c0289a5ec3682f573aae3424f45619f@changeid Signed-off-by: Johannes Berg commit bf976c814c864ec45fa32303e7080fc2e6efe4f2 Author: Johannes Berg Date: Tue Mar 28 10:59:11 2023 +0300 wifi: iwlwifi: mvm: implement link change ops Implement the link change ops for links and stations. Note that the stations one is empty for now as we only have support for a single link so far, and then the stations are created with the first link as deflink by mac80211, so right now we don't really need anything. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.6186c5a37e99.Ifd00d3ee93356ddef273aa18f1e081cd8f2c84ae@changeid Signed-off-by: Johannes Berg commit 79faae3a408e2a03e550de2d60f9619902251248 Author: Gregory Greenman Date: Tue Mar 28 10:59:10 2023 +0300 wifi: iwlwifi: mvm: adjust some cleanup functions to MLO Clean up data for all allocated links of a vif. Invalidate all link sta pointers. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.948a7bee8b09.Ic6b202959c158258d391ccce77f66e1281879690@changeid Signed-off-by: Johannes Berg commit 57974a55d995468a9a476e24693eb741c649b25f Author: Gregory Greenman Date: Tue Mar 28 10:59:09 2023 +0300 wifi: iwlwifi: mvm: refactor iwl_mvm_mac_sta_state_common() Move code handling specific state transitions into separate handlers and adjust them for MLO. Adjust relevant callbacks as well. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.5a3f8a849723.I0670d20436858a1cd3c055e03c7528db81292811@changeid Signed-off-by: Johannes Berg commit 2c9b92209fce94cbd586e46ef8ffb0faaf180525 Author: Gregory Greenman Date: Tue Mar 28 10:59:08 2023 +0300 wifi: iwlwifi: mvm: update iwl_mvm_tx_reclaim() for MLO vif->bss_conf is used in this function only when TLC is not offloaded, so not in MLO flow. Simplify the related "if" condition and call iwl_mvm_hwrate_to_tx_status() only for driver rate scale. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.c6826d5b5477.Ib56ec6025c0da3a381aaf88e71085ce9b96a9e65@changeid Signed-off-by: Johannes Berg commit 4263ac7fe5b2d6d5b3acc4c4192cebe7054bc623 Author: Gregory Greenman Date: Tue Mar 28 10:59:07 2023 +0300 wifi: iwlwifi: mvm: adjust to MLO assign/unassign/switch_vif_chanctx() Pass link_conf when it's necessary and change the code accordingly. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.dc1074239c5b.I30db722af9009f1b274fa929f276fd2b78520dea@changeid Signed-off-by: Johannes Berg commit d6f6b0d804e08e1cab1dcebe4f62dc949bb646e9 Author: Gregory Greenman Date: Tue Mar 28 10:59:06 2023 +0300 wifi: iwlwifi: mvm: add fw link id allocation Driver uses link_id as an index in the array. FW currently can support only 2 concurrently active links per vif with the ids in the range 0-3. Add a mapping of dirver link ids to fw link id and track the number of active link ids. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.a53e5df49c33.I02b25648d2d5ca370c0697bf19d0d34724eae8a1@changeid Signed-off-by: Johannes Berg commit 62e0ccb2170e7a20d62d38f781f90a8ef031c450 Author: Gregory Greenman Date: Tue Mar 28 10:59:05 2023 +0300 wifi: iwlwifi: mvm: adjust internal stations to MLO Internal stations are mcast/bcast and sniffer. They need some link specific data like bss id/phy id. Add link_conf as a parameter. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.25b013fd30de.I7f9f5906123acae05040cceec470c9acb07b9d42@changeid Signed-off-by: Johannes Berg commit 22c588343529d34e971b7cafae99d23f80dff7e9 Author: Gregory Greenman Date: Tue Mar 28 10:59:04 2023 +0300 wifi: iwlwifi: mvm: replace bss_info_changed() with vif_cfg/link_info_changed() These are two new handlers for MLO. As the configurations done in bss_info_changed() are now split into two separate flows, use MLO specific implementation instead of common functions with the non-MLO code. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.7b238cae0895.Ieb87f204787fb1c7cb7562e1cbf54ef518d87123@changeid Signed-off-by: Johannes Berg commit cacc1d42a489f6f61cd5bdc42d216ec29b144317 Author: Gregory Greenman Date: Tue Mar 28 10:59:03 2023 +0300 wifi: iwlwifi: mvm: add link_conf parameter for add/remove/change link Add link_conf parameter and change all the relevant calls accordingly. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.374015eed2e3.Icbf15a18e2599b53f4fa1c92fe3db64b551b84b1@changeid Signed-off-by: Johannes Berg commit ac251da91afa209fc4eba504fc42a504f9d31d5d Author: Johannes Berg Date: Tue Mar 28 10:59:02 2023 +0300 wifi: iwlwifi: mvm: don't check dtim_period in new API In newer firmware APIs the firmware is responsible for tracking the DTIM period and other beacon timing, so we don't need to wait with setting associated. In real MLO operation, mac80211 isn't tracking this anyway, and connections wouldn't work. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.02354241fede.Id957bed3851fdf1fe902d79a1b0338c6d80bc0e1@changeid Signed-off-by: Johannes Berg commit 1a3e70391e55d12010073935e383629ab856528a Author: Gregory Greenman Date: Tue Mar 28 10:59:01 2023 +0300 wifi: iwlwifi: mvm: adjust SMPS for MLO Configure SMPS per-link. Add link_id parameter to iwl_mvm_update_smps() and refactor iwl_mvm_intf_dual_chain_req() since it has to handle all active links. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.da6a19db562c.Ic88b02338c8973f2934439ac3ee77c7451bc0054@changeid Signed-off-by: Johannes Berg commit be8897e24415f2c23b05711c68d32392ba8541f7 Author: Avraham Stern Date: Tue Mar 28 10:59:00 2023 +0300 wifi: iwlwifi: mvm: add set_hw_timestamp to mld ops In mld ops, set_hw_timestamp was not set. Fix it. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.7b24a582b763.Ieb3139d41f1a01b2b566adecd32450da1bcdd5fa@changeid Signed-off-by: Johannes Berg commit cb145863e7abbbf4248ab11d2783a1b619349d1b Author: Johannes Berg Date: Tue Mar 28 10:58:59 2023 +0300 wifi: iwlwifi: mvm: add link to firmware earlier The firmware now allows adding a link that's not yet bound to a PHY context. Make use of that to align the driver with mac80211's API expectations. For now, just add the link at the same time as the MAC since we don't yet have real MLD support, but that'll obviously change later. This fixes an issue with apStaId tracking in the firmware. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.097e5008b637.I4e75c6c11e21c08d28ff6a066be36629d3975db6@changeid Signed-off-by: Johannes Berg commit f551d013bd3111413a1c57214796ab3fe3b2f694 Author: Gregory Greenman Date: Tue Mar 28 10:58:58 2023 +0300 wifi: iwlwifi: mvm: adjust some PS and PM methods to MLD When using mvm vif PS/PM related properties, consider all links. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.8d9e18f7d74b.I048fc17405ecdddc1f6fe72859013cc4878b2a3b@changeid Signed-off-by: Johannes Berg commit 36cf537798cb6c738b94a67ec1604c571e15b2b8 Author: Gregory Greenman Date: Tue Mar 28 10:58:57 2023 +0300 wifi: iwlwifi: mvm: adjust mld_mac_ctxt_/beacon_changed() for MLO HE/EHT support is reported to FW if there's at least one link that supports it. Configure beacon separately for each link. Don't send the beacon template before adding the MAC. Co-developed-by: Johannes Berg Co-developed-by: Emmanuel Grumbach Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.5ef4efeda2dd.I6ebda2b71c964b9aa63240c9fa1ee0d28099fe6e@changeid Signed-off-by: Johannes Berg commit 203b22acb1a93ca154c104fe29cfbc312571f2a0 Author: Gregory Greenman Date: Tue Mar 28 10:58:56 2023 +0300 wifi: iwlwifi: mvm: adjust smart fifo configuration to MLO Consider properties of all available links for smart FIFO configuration. Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104949.870ff175b82c.Iada56a474a0770ae5469b31d635cc05405dbfb87@changeid Signed-off-by: Johannes Berg commit 6b5a87df8ec8e3e24ffde62b1356aad9b4e9182d Author: Miri Korenblit Date: Tue Mar 28 10:58:55 2023 +0300 wifi: iwlwifi: mvm: align to the LINK cmd update in the FW The LINK cmd host api has been updated. Align the driver to the new changes. Also, temporary use mac_id for link_id. Using the phy_id as the link_id is wrong since we might have 2 macs operating on the same phy - in this case we will have 2 different links (one for each mac) with the same link_id. On the other hand, since we don't have MLO implemented yet, we won't have 2 different links of the same mac. Therefore, we can use the mac_id as the link_id. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104948.78ae716884fe.Icfeb2794d9652baaccf9b0cdddbd751d0db4f952@changeid Signed-off-by: Johannes Berg commit 5ed461be3ca93197cef6e8fc7fe2b523a892b317 Author: Miri Korenblit Date: Tue Mar 28 10:58:54 2023 +0300 wifi: iwlwifi: mvm: always use the sta->addr as the peers addr Currently we're setting the sta->addr as the peers address only if the iftype is NL80211_IFTYPE_AP, otherwise we are setting the bssid to be the addr. This causes bugs in TDLS. Fix this by always using the sta->addr. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104948.4c104c3074c4.I78912bb85251033e60db99a65165890779203612@changeid Signed-off-by: Johannes Berg commit 786810de9cf735ebfdbd0a09a0126364ae217ca7 Author: Miri Korenblit Date: Tue Mar 28 10:58:53 2023 +0300 wifi: iwlwifi: mvm: modify link instead of removing it during csa During CSA the PHY used by the link is changing, So the driver needs to modify the links phy to the FW. Currently the driver is doing it by removing the link and adding a new one with the new phy_id, but the FW expects the link only to be modified. Fix this by modifying the links phy_id instead of removing it and adding a new one Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104948.c07ca7aace29.I4ed5c77f4afe1b5da19322734e2f84d51aa541ad@changeid Signed-off-by: Johannes Berg commit 75700ee1644f23ccb2742dbe623a1094a9aab753 Author: Miri Korenblit Date: Tue Mar 28 10:58:52 2023 +0300 wifi: iwlwifi: mvm: fix crash on queue removal for MLD API too The patch linked below fixes the crash on queue removal bug only for the non-MLD API. Do the same for the MLD API. Fixes: c5a976cf6a75 ("wifi: iwlwifi: modify new queue allocation command") Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104948.527dace26147.Ia215df5833634f95688a979f39fae70c1ac4e027@changeid Signed-off-by: Johannes Berg commit cea05a8651759135ee3c92d35bd13553669635d0 Author: Miri Korenblit Date: Tue Mar 28 10:58:51 2023 +0300 wifi: iwlwifi: mvm: fix "modify_mask" value in the link cmd. This bitmap indicates what fields of the cmd got changed. A field will be ignored by the FW if the corresponding flag wasn't set. There are a few cases in which we currently set the wrong bits when sending this cmd, which caused FW asserts. Fix this by setting the correct bits in each case. Fixes: 1ab26632332e ("wifi: iwlwifi: mvm: Add an add_interface() callback for mld mode") Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104948.19ddbee0c98d.I595abb79d0419c9a21e5234303c2c3fd5290a52a@changeid Signed-off-by: Johannes Berg commit cbce62a315f67e3badfd3f4a7b33e21c90ddc415 Author: Miri Korenblit Date: Tue Mar 28 10:58:50 2023 +0300 wifi: iwlwifi: mvm: add all missing ops to iwl_mvm_mld_ops Add all the callbacks that are not changing with the new MLD API and register to mac80211 with the new ops. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104948.a2f724342522.I5d1d6a8f5f14e6275da56ea704c3c0063fee5226@changeid Signed-off-by: Johannes Berg commit 03117f30b998430d83842057a1ecf0382618acfb Author: Miri Korenblit Date: Tue Mar 28 10:58:49 2023 +0300 wifi: iwlwifi: mvm: add support for post_channel_switch in MLD mode Adjust the existing iwl_mvm_post_channel_switch() to the new MLD API and use it in the new MLD ieee80211_ops Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104948.fa3992f7dfd2.Ie298a9b1522e956d7b699f0432795548bc6e47f9@changeid Signed-off-by: Johannes Berg commit 56f4f12ba8f6d8cb52f776dfcd261f2e1040d38c Author: Miri Korenblit Date: Tue Mar 28 10:58:48 2023 +0300 wifi: iwlwifi: mvm: unite sta_modify_disable_tx flows These flows are the same in both MLD API and the current API, except for the commands that are being sent during this flows. Instead of checking each time before calling these floews what API we use and then call the correct function, call always the old one, which in turn will call the new one in case we're using the MLD API. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104948.5692d8dea9be.Ib1882b2c2f0b0603abc4b7d4a0ecc45cd1fbf9a7@changeid Signed-off-by: Johannes Berg commit fe8b2ad361fb92f4b2b7b003c4609a2a7ed1fbda Author: Miri Korenblit Date: Tue Mar 28 10:58:47 2023 +0300 wifi: iwlwifi: mvm: add cancel/remain_on_channel for MLD mode Add an MLD version of the remain_on_channel and cancel_remain_on_channel callbacks. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104948.b51813dbebd4.Ia25bbd63d3138e4759237ce2be0cd0436fe01c0a@changeid Signed-off-by: Johannes Berg commit feebebae1fc3a9c02395ce48074e763cbcdecc8e Author: Miri Korenblit Date: Tue Mar 28 10:58:46 2023 +0300 wifi: iwlwifi: mvm: refactor iwl_mvm_roc() This flow is almost the same for both MLD and non-MLD modes, except for some function calls. Therefore there is no reason to add an MLD version of this flow. Instead - put the parts that are unique for each mode in helper functions, and in the next patch each version of this flow will call the common part with pointers to its specific helper functions. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104948.61bc077a7f3c.Ia3aa81d3293792bf8f80528dbc67a711ce334b32@changeid Signed-off-by: Johannes Berg commit 660eba5af0ddf80f04efd970a63958d23c4d1052 Author: Miri Korenblit Date: Tue Mar 28 10:58:45 2023 +0300 wifi: iwlwifi: mvm: add some new MLD ops Add MLD version of bss_info_changed/switch_vif_chanctx/ config_iface_filter and conf_tx() callbacks. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104948.9c83c253d610.Ibf2006be9ece87896c17cb43dfe3654ac73d81ff@changeid Signed-off-by: Johannes Berg commit 87f7e2435cb7ddafbc644b759aa1a9dffaab1515 Author: Miri Korenblit Date: Tue Mar 28 10:58:44 2023 +0300 wifi: iwlwifi: mvm: add sta handling flows for MLD mode In MLD mode we have a new STA cmd. As a result, it is also changes the flows of adding/updating/removing and handling state of a station. Add these flows. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104948.b5548cfd8fe3.I70f9c8f3c95e18d5c9af0a5681e0830893509531@changeid Signed-off-by: Johannes Berg commit 9e2de88d28b235a65db6209e331496f8f2fd203a Author: Miri Korenblit Date: Tue Mar 28 10:58:43 2023 +0300 wifi: iwlwifi: mvm: add an indication that the new MLD API is used WE can't mix between the new MLD API and the old API. I.e. - we can't send one of the new cmds and then one of the old ones. This will cause a FW assert. So we need an indication what API should be used. We use the new API if: 1. FW supports it 2. We are registered to mac80211 with the new MLD ops Add an indication which will only be true if both conditions are true. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104948.5756b0907403.I0adce36d1783cce23d0e080e3c4a8953db33b515@changeid Signed-off-by: Johannes Berg commit c8ee33e184e4163586cc6c786d5c14dcdf6f4e07 Author: Gregory Greenman Date: Tue Mar 28 10:58:42 2023 +0300 wifi: iwlwifi: mvm: sta preparation for MLO Split iwl_mvm_sta into general and link specific parts. As a first step, all link dependent parameters reside in deflink. The change was done mostly using the spatch below with some manual adjustments. @iwl_mvm_sta@ struct iwl_mvm_sta *s; identifier var = {sta_id, lq_sta, avg_energy}; @@ ( s-> - var + deflink.var ) Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104948.34eace06d583.I1f8c5e919a71b21030460fbdd220d42401b688b1@changeid Signed-off-by: Johannes Berg commit 650cadb730105f1894b6c8afacc57a368dd18b91 Author: Gregory Greenman Date: Tue Mar 28 10:58:41 2023 +0300 wifi: iwlwifi: mvm: vif preparation for MLO In MLO, some fields of iwl_mvm_vif should be defined in the context of a link. Define a separate structure for these fields and add a deflink object to hold it as part of iwl_mvm_vif. Non-MLO legacy code will use only deflink object while MLO related code will use the corresponding link from the link array. It follows the strategy applied in mac80211 for introducing MLO changes. The below spatch takes care of updating all driver code to access fields separated into MLD specific data structure via deflink (need to convert all references to the fields listed in var to deflink.var and also to take care of calls like iwl_mvm_vif_from_mac80211(vif)->field). @iwl_mld_vif@ struct iwl_mvm_vif *v; struct ieee80211_vif *vv; identifier fn; identifier var = {bssid, ap_sta_id, bcast_sta, mcast_sta, beacon_stats, smps_requests, probe_resp_data, he_ru_2mhz_block, cab_queue, phy_ctxt, queue_params}; @@ ( v-> - var + deflink.var | fn(vv)-> - var + deflink.var ) Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230328104948.4896576f0a9f.Ifaf0187c96b9fe52b24bd629331165831a877691@changeid Signed-off-by: Johannes Berg commit 9a8aac92eba90b3b7c71d0531db535f5588388f5 Author: Kieran Frewen Date: Fri Feb 24 10:29:17 2023 +1300 wifi: nl80211: support advertising S1G capabilities Include S1G capabilities in netlink band info messages. Signed-off-by: Kieran Frewen Co-developed-by: Gilad Itzkovitch Signed-off-by: Gilad Itzkovitch Link: https://lore.kernel.org/r/20230223212917.4010246-1-gilad.itzkovitch@virscient.com Signed-off-by: Johannes Berg commit 0333a81bc83431d7f90391d38aa09e856c5e5b25 Author: Kieran Frewen Date: Thu Feb 23 16:25:12 2023 +1300 wifi: mac80211: S1G capabilities information element in probe request Add the missing S1G capabilities information element to probe requests. Signed-off-by: Kieran Frewen Co-developed-by: Gilad Itzkovitch Signed-off-by: Gilad Itzkovitch Link: https://lore.kernel.org/r/20230223032512.3848105-1-gilad.itzkovitch@virscient.com Signed-off-by: Johannes Berg commit bd0a62a667c4a4ee790376641e06f7b17000496f Author: Roger Lu Date: Thu Feb 2 20:41:04 2023 +0800 soc: mediatek: mtk-svs: add thermal voltage compensation if needed Some extreme test environment may keep IC temperature very low or very high during system boot stage. For stability concern, we add thermal voltage compenstation if needed no matter svs bank phase is in init02 or mon mode. Signed-off-by: Roger Lu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230202124104.16504-4-roger.lu@mediatek.com Signed-off-by: Matthias Brugger commit edecdcccc1e971b1f0c077ef1f1f714251864aa1 Author: Roger Lu Date: Thu Feb 16 21:25:43 2023 +0800 soc: mediatek: mtk-svs: fix passing zero to 'PTR_ERR' nvmem_cell_get() cannot return NULL so checking for NULL is wrong here. Signed-off-by: Roger Lu Fixes: 6c7174fd90a4690 ("soc: mediatek: mtk-svs: use svs get efuse common function") Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202302160720.N64SWT4l-lkp@intel.com/ Link: https://lore.kernel.org/r/20230216132543.814-1-roger.lu@mediatek.com Signed-off-by: Matthias Brugger commit 968a768d28530cadd13aab51531f8fec70bf9eae Author: Tom Rix Date: Sat Mar 25 09:26:10 2023 -0400 mac80211: minstrel_ht: remove unused n_supported variable clang with W=1 reports net/mac80211/rc80211_minstrel_ht.c:1711:6: error: variable 'n_supported' set but not used [-Werror,-Wunused-but-set-variable] int n_supported = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230325132610.1334820-1-trix@redhat.com Signed-off-by: Johannes Berg commit 6cf882d9aa9e8f1f2d63182e179ac4b2e59c00db Author: Nathan Chancellor Date: Wed Mar 29 10:32:46 2023 -0700 wifi: iwlwifi: mvm: Use 64-bit division helper in iwl_mvm_get_crosstimestamp_fw() There is a 64-bit division in iwl_mvm_get_crosstimestamp_fw(), which results in a link failure when building 32-bit architectures with clang: ld.lld: error: undefined symbol: __udivdi3 >>> referenced by ptp.c >>> drivers/net/wireless/intel/iwlwifi/mvm/ptp.o:(iwl_mvm_phc_get_crosstimestamp) in archive vmlinux.a GCC has optimizations for division by a constant that clang does not implement, so this issue is not visible when building with GCC. Use the 64-bit division helper div_u64(), which takes a u64 dividend and u32 divisor, which matches this situation and prevents the emission of a libcall for the division. Fixes: 21fb8da6ebe4 ("wifi: iwlwifi: mvm: read synced time from firmware if supported") Reported-by: Arnd Bergmann Link: https://github.com/ClangBuiltLinux/linux/issues/1826 Reported-by: "kernelci.org bot" Link: https://lore.kernel.org/6423173a.620a0220.3d5cc.6358@mx.google.com/ Signed-off-by: Nathan Chancellor Signed-off-by: Johannes Berg commit 9467af61bf6a92bb0e2f783fcfc379f943fa4e0d Author: Greg Kroah-Hartman Date: Wed Mar 29 08:01:27 2023 +0200 mISDN: remove unneeded mISDN_class_release() The mISDN_class_release() is not needed at all, as the class structure is static, and it does not actually do anything either, so it is safe to remove as struct class does not require a release callback. Cc: Karsten Keil Cc: netdev@vger.kernel.org Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230329060127.2688492-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 92d2c23dc269985fdf098735710b2ac3f91801dd Author: Nancy.Lin Date: Thu Mar 23 09:37:30 2023 +0800 arm64: dts: mt8195: add display node for vdosys1 Add display node for vdosys1. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230323013730.1378-1-nancy.lin@mediatek.com Signed-off-by: Matthias Brugger commit 61ac25e5296015c7a5d49cd7405459d4f47f28e6 Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:23 2023 +0100 arm64: dts: mediatek: mt8183-evb: Override vgpu/vsram_gpu constraints Override the PMIC-default voltage constraints for VGPU and VSRAM_GPU with the platform specific vmin/vmax for the highest possible SoC binning. Signed-off-by: AngeloGioacchino Del Regno Suggested-by: Chen-Yu Tsai Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-20-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit ba4927d16e3a841e3d8380092b5dc33604bc90f4 Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:22 2023 +0100 arm64: dts: mediatek: mt8183-pumpkin: Override vgpu/vsram_gpu constraints Override the PMIC-default voltage constraints for VGPU and VSRAM_GPU with the platform specific vmin/vmax for the highest possible SoC binning. Signed-off-by: AngeloGioacchino Del Regno Suggested-by: Chen-Yu Tsai Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-19-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit ee63f4144d8c55ada20216c862fdf46b2cd02998 Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:21 2023 +0100 arm64: dts: mediatek: mt8186: Add GPU node Add a GPU node for MT8186 SoC but keep it disabled. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-18-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 673f8b60c610e9ac3d09c8ba97805df24c034024 Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:20 2023 +0100 arm64: dts: mediatek: mt8195-cherry: Enable Mali-G57 GPU Enable the Mali-G57 found on this platform with the open-source Panfrost driver. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-17-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 9a512b4d7a7b262496dbf68c01c11b0536dfcf0b Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:19 2023 +0100 arm64: dts: mt8195: Add panfrost node for Mali-G57 Valhall Natt GPU Add GPU support through panfrost for the Mali-G57 GPU on MT8195 with its OPP table but keep it in disabled state. This is expected to be enabled only on boards which make use of the GPU. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-16-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit d434abbb560aae20b31caa34088c3677fe925be6 Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:18 2023 +0100 arm64: dts: mediatek: mt8195: Add mfg_core_tmp clock to MFG1 domain Similarly to what can be seen in MT8192, on MT8195 the mfg_core_tmp clock is a mux used to switch between different "safe" (and slower) clock sources for the GPU: this is used during MFGPLL reconfiguration and eventually during idling at very low frequencies. This clock getting turned off means that the GPU will occasionally be unclocked, producing obvious consequences such as system crash or unpredictable behavior: assigning it to the top level MFG power domain will make sure that this stays on at all times during any operation on the MFG domain (only GPU-related transactions). Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-15-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 309460b6260195ae0631c8f15ddb1c23a00b4562 Author: Alyssa Rosenzweig Date: Wed Mar 1 10:55:17 2023 +0100 arm64: dts: mediatek: mt8192-asurada: Enable GPU Enable the GPU with its power supplies described. Signed-off-by: Alyssa Rosenzweig [wenst@: patch split out from MT8192 GPU node patch] Signed-off-by: Chen-Yu Tsai [Angelo: Minor commit title fix] Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-14-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit c4ce03bf0f9dcccf630a4091a038cd8ad11646ff Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:16 2023 +0100 arm64: dts: mediatek: mt8192-asurada: Couple VGPU and VSRAM_OTHER regulators Add coupling for these regulators, as VSRAM_OTHER is used to power the GPU SRAM, and they have a strict voltage output relation to satisfy in order to ensure GPU stable operation. While at it, also add voltage constraint overrides for the GPU SRAM regulator "mt6359_vsram_others" so that we stay in a safe range of 0.75-0.80V. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-13-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit ff4c868ba8df9dcd144ab4943a50adca1cf33ba2 Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:15 2023 +0100 arm64: dts: mediatek: mt8192-asurada: Fix voltage constraint for Vgpu The MT8192 SoC specifies a maximum voltage for the GPU's digital supply of 0.88V and the GPU OPPs are declaring a maximum voltage of 0.80V. In order to keep the GPU voltage in the safe range, change the maximum voltage for mt6315@7's vbuck1 to 0.80V as sending, for any mistake, 1.193V would be catastrophic. Fixes: 3183cb62b033 ("arm64: dts: mediatek: asurada: Add SPMI regulators") Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-12-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 3daabcb2392678c1d5997404b29c13bc27dac306 Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:14 2023 +0100 arm64: dts: mediatek: mt8192-asurada: Assign sram supply to MFG1 pd Add a phandle to the MT8192_POWER_DOMAIN_MFG1 power domain and assign the GPU VSRAM supply to this in mt8192-asurada: this allows to keep the sram powered up while the GPU is used. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-11-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 6fe90cc51988f929d96a2b69417b442413145732 Author: Nícolas F. R. A. Prado Date: Wed Mar 1 10:55:13 2023 +0100 arm64: dts: mediatek: mt8192-asurada: Add MFG0 domain supply The mfg0 power domain encompasses the whole GPU and its surrounding glue logic. This power domain has a separate power rail. Add its power supply for Asurada. Signed-off-by: Nícolas F. R. A. Prado [wenst@chromium.org: fix subject prefix and add commit message] Signed-off-by: Chen-Yu Tsai [Angelo: Reordered commits to address DVFS stability issues] Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-10-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 61348fe9e75b7edb25b26ce789a9aec617b20090 Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:12 2023 +0100 arm64: dts: mediatek: mt8192: Add mfg_ref_sel clock to MFG0 domain The mfg_ref_sel clock is a mux used to switch between different "safe" (and slower) clock sources for the GPU: this is used during MFGPLL reconfiguration and eventually during idling at very low frequencies. This clock getting turned off means that the GPU will occasionally be unclocked, producing obvious consequences such as system crash or unpredictable behavior: assigning it to the top level MFG power domain will make sure that this stays on at all times during any operation on the MFG domain (only GPU-related transactions). Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-9-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit e12333451e76e1fe9121a3ce30b930c719fc04dd Author: Alyssa Rosenzweig Date: Wed Mar 1 10:55:11 2023 +0100 arm64: dts: mediatek: mt8192: Add GPU nodes The MediaTek MT8192 includes a Mali-G57 GPU supported in Panfrost. Add the GPU node to the device tree to enable 3D acceleration. The GPU node is disabled by default. It should be enabled by board with its power supplies correctly assigned. Signed-off-by: Alyssa Rosenzweig [nfraprado: removed sram supply, tweaked opp node name, adjusted commit message] Signed-off-by: Nícolas F. R. A. Prado [wenst@: disable GPU by default; adjusted prefix; split out board change] Signed-off-by: Chen-Yu Tsai [Angelo: cosmetic fixes] Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-8-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit c78838d803150644e33aeb1bd0df07c9e357302a Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:10 2023 +0100 arm64: dts: mediatek: mt8183: Use mediatek,mt8183b-mali as GPU compatible Use the new GPU related compatible to finally enable GPU DVFS on the MT8183 SoC. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-7-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 85ae8a51437e8ff1d08b266129bddd0561c1bdfe Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:09 2023 +0100 arm64: dts: mediatek: mt8183-evb: Couple VGPU and VSRAM_GPU regulators Add coupling for these regulators, as they have a strict voltage output relation to satisfy in order to ensure GPU stable operation. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-6-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 5dba6621771d37587c1fe929acde21759e3d56d7 Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:08 2023 +0100 arm64: dts: mt8183-pumpkin: Couple VGPU and VSRAM_GPU regulators Add coupling for these regulators, as they have a strict voltage output relation to satisfy in order to ensure GPU stable operation. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-5-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit dbe602b27793afd18e4dbc15c8d308ef28f49056 Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:07 2023 +0100 arm64: dts: mediatek: mt8183: Remove second opp-microvolt entries from gpu table This was done to keep a strict relation between VSRAM and VGPU, but it never worked: now we're doing it transparently with the new mediatek-regulator-coupler driver. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-4-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 31c6732da9d549af92732d8126f46c1c9d7fa8d4 Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:06 2023 +0100 arm64: dts: mediatek: mt8183-kukui: Override vgpu/vsram_gpu constraints Override the PMIC-default voltage constraints for VGPU and VSRAM_GPU with the platform specific vmin/vmax for the highest possible SoC binning. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-3-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit 2690e80bc29e8f1a369e36458b4a72c151178fbc Author: AngeloGioacchino Del Regno Date: Wed Mar 1 10:55:05 2023 +0100 arm64: dts: mediatek: mt8183-kukui: Couple VGPU and VSRAM_GPU regulators Add coupling for these regulators, as they have a strict voltage output relation to satisfy in order to ensure GPU stable operation. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230301095523.428461-2-angelogioacchino.delregno@collabora.com Signed-off-by: Matthias Brugger commit b2d2d8decc8d239875420af6e412158ac5a2cb1f Author: Fabio Estevam Date: Wed Mar 29 17:11:50 2023 -0300 dt-bindings: display: seiko,43wvf1g: Change the maintainer's contact Marco's NXP email is no longer valid. Marco told me offline that he has no interest to be listed as the maintainer contact for this binding, so add my contact. Signed-off-by: Fabio Estevam Acked-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230329201150.741106-1-festevam@gmail.com commit b6ba68555d75fd99f7daa9c5a5e476f8635cb155 Author: Leon Romanovsky Date: Wed Mar 29 21:14:01 2023 +0300 RDMA/rxe: Clean kzalloc failure paths There is no need to print any debug messages after failure to allocate memory, because kernel will print OOM dumps anyway. Together with removal of these messages, remove useless goto jumps. Fixes: 5bf944f24129 ("RDMA/rxe: Add error messages") Reported-by: Dan Carpenter Link: https://lore.kernel.org/all/ea43486f-43dd-4054-b1d5-3a0d202be621@kili.mountain Link: https://lore.kernel.org/r/d3cedf723b84e73e8062a67b7489d33802bafba2.1680113597.git.leon@kernel.org Reviewed-by: Bob Pearson Signed-off-by: Leon Romanovsky commit 8ba264f418f734aade3a77086bb1d51d0e2723ce Merge: fbb3b3500f76e 82bbec189ab34 Author: Maarten Lankhorst Date: Thu Mar 30 08:53:12 2023 +0200 Merge remote-tracking branch 'drm/drm-next' into drm-misc-next Backmerge to get rc4. Signed-off-by: Maarten Lankhorst commit 4f704d9a8352f5c0a8fcdb6213b934630342bd44 Author: Christian Brauner Date: Tue Mar 14 12:51:10 2023 +0100 nfs: use vfs setgid helper We've aligned setgid behavior over multiple kernel releases. The details can be found in the following two merge messages: cf619f891971 ("Merge tag 'fs.ovl.setgid.v6.2') 426b4ca2d6a5 ("Merge tag 'fs.setgid.v6.0') Consistent setgid stripping behavior is now encapsulated in the setattr_should_drop_sgid() helper which is used by all filesystems that strip setgid bits outside of vfs proper. Switch nfs to rely on this helper as well. Without this patch the setgid stripping tests in xfstests will fail. Signed-off-by: Christian Brauner (Microsoft) Reviewed-by: Christoph Hellwig Message-Id: <20230313-fs-nfs-setgid-v2-1-9a59f436cfc0@kernel.org> Signed-off-by: Christian Brauner commit b3b4ced12c1bc829888803ce07fff317e590ec1c Author: Etienne Carriere Date: Wed Mar 22 14:22:12 2023 +0100 optee: add per cpu asynchronous notification Implements use of per-cpu irq for optee asynchronous notification. Existing optee async notif implementation allows OP-TEE world to raise an interrupt on which Linux optee driver will query some pending events. This change allows the signaling interrupt to be a per-cpu interrupt as with Arm GIC PPIs. Using a PPI instead of an SPI is useful when no GIC lines are provisioned in the chip design and there are spare PPI lines. Cc: Jens Wiklander Cc: Sumit Garg Cc: Marc Zyngier Co-developed-by: Alexandre Torgue Signed-off-by: Alexandre Torgue Signed-off-by: Etienne Carriere Reviewed-by: Sumit Garg [JW: fixing a spell error in @notif_pcpu_wq description] Signed-off-by: Jens Wiklander commit 0d0eaa780ba3b8a02a1ac87f38c34dfe365f27d6 Author: Etienne Carriere Date: Wed Mar 22 14:22:11 2023 +0100 dt-bindings: optee driver interrupt can be a per-cpu interrupt Explicit in optee firmware device tree bindings that the interrupt used by optee driver for async notification can be a peripheral interrupt or a per-cpu interrupt. Signed-off-by: Etienne Carriere Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit 7079d5e61aaa14cd04fd2fe7a8a2b6eca7833fdb Merge: c5370374bb1bf 3905f8d64ccc2 Author: Jakub Kicinski Date: Wed Mar 29 22:15:24 2023 -0700 Merge tag 'mlx5-updates-2023-03-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2023-03-28 Dragos Tatulea says: ==================== net/mlx5e: RX, Drop page_cache and fully use page_pool For page allocation on the rx path, the mlx5e driver has been using an internal page cache in tandem with the page pool. The internal page cache uses a queue for page recycling which has the issue of head of queue blocking. This patch series drops the internal page_cache altogether and uses the page_pool to implement everything that was done by the page_cache before: * Let the page_pool handle dma mapping and unmapping. * Use fragmented pages with fragment counter instead of tracking via page ref. * Enable skb recycling. The patch series has the following effects on the rx path: * Improved performance for the cases when there was low page recycling due to head of queue blocking in the internal page_cache. The test for this was running a single iperf TCP stream to a rx queue which is bound on the same cpu as the application. |-------------+--------+--------+------+---------| | rq type | before | after | unit | diff | |-------------+--------+--------+------+---------| | striding rq | 30.1 | 31.4 | Gbps | 4.14 % | | legacy rq | 30.2 | 33.0 | Gbps | 8.48 % | |-------------+--------+--------+------+---------| * Small XDP performance degradation. The test was is XDP drop program running on a single rx queue with small packets incoming it looks like this: |-------------+----------+----------+------+---------| | rq type | before | after | unit | diff | |-------------+----------+----------+------+---------| | striding rq | 19725449 | 18544617 | pps | -6.37 % | | legacy rq | 19879931 | 18631841 | pps | -6.70 % | |-------------+----------+----------+------+---------| This will be handled in a different patch series by adding support for multi-packet per page. * For other cases the performance is roughly the same. The above numbers were obtained on the following system: 24 core Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz 32 GB RAM ConnectX-7 single port The breakdown on the patch series is the following: * Preparations for introducing the mlx5e_frag_page struct. * Delete the mlx5e_page_cache struct. * Enable dma mapping from page_pool. * Enable skb recycling and fragment counting. * Do deferred release of pages (just before alloc) to ensure better page_pool cache utilization. ==================== * tag 'mlx5-updates-2023-03-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5e: RX, Remove unnecessary recycle parameter and page_cache stats net/mlx5e: RX, Break the wqe bulk refill in smaller chunks net/mlx5e: RX, Increase WQE bulk size for legacy rq net/mlx5e: RX, Split off release path for xsk buffers for legacy rq net/mlx5e: RX, Defer page release in legacy rq for better recycling net/mlx5e: RX, Change wqe last_in_page field from bool to bit flags net/mlx5e: RX, Defer page release in striding rq for better recycling net/mlx5e: RX, Rename xdp_xmit_bitmap to a more generic name net/mlx5e: RX, Enable skb page recycling through the page_pool net/mlx5e: RX, Enable dma map and sync from page_pool allocator net/mlx5e: RX, Remove internal page_cache net/mlx5e: RX, Store SHAMPO header pages in array net/mlx5e: RX, Remove alloc unit layout constraint for striding rq net/mlx5e: RX, Remove alloc unit layout constraint for legacy rq net/mlx5e: RX, Remove mlx5e_alloc_unit argument in page allocation ==================== Link: https://lore.kernel.org/r/20230328205623.142075-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit c5370374bb1bf692167c7276be8b56c02565d535 Author: Simon Horman Date: Tue Mar 28 17:19:58 2023 +0200 net: ena: removed unused tx_bytes variable clang 16.0.0 with W=1 reports: drivers/net/ethernet/amazon/ena/ena_netdev.c:1901:6: error: variable 'tx_bytes' set but not used [-Werror,-Wunused-but-set-variable] u32 tx_bytes = 0; The variable is not used so remove it. Signed-off-by: Simon Horman Acked-by: Shay Agroskin Link: https://lore.kernel.org/r/20230328151958.410687-1-horms@kernel.org Signed-off-by: Jakub Kicinski commit 765f3604641e1524389e1d6431974d2bbcab14a7 Author: Dan Carpenter Date: Wed Mar 29 09:51:37 2023 +0300 octeon_ep: unlock the correct lock on error path The h and the f letters are swapped so it unlocks the wrong lock. Fixes: 577f0d1b1c5f ("octeon_ep: add separate mailbox command and response queues") Signed-off-by: Dan Carpenter Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/251aa2a2-913e-4868-aac9-0a90fc3eeeda@kili.mountain Signed-off-by: Jakub Kicinski commit 615927f1a487bd9066425df48d06cec3bb3d8dbb Author: Tianfei Zhang Date: Tue Mar 28 10:24:55 2023 -0400 ptp: add ToD device driver for Intel FPGA cards Adding a DFL (Device Feature List) device driver of ToD device for Intel FPGA cards. The Intel FPGA Time of Day(ToD) IP within the FPGA DFL bus is exposed as PTP Hardware clock(PHC) device to the Linux PTP stack to synchronize the system clock to its ToD information using phc2sys utility of the Linux PTP stack. The DFL is a hardware List within FPGA, which defines a linked list of feature headers within the device MMIO space to provide an extensible way of adding subdevice features. Signed-off-by: Raghavendra Khadatare Signed-off-by: Tianfei Zhang Acked-by: Richard Cochran Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230328142455.481146-1-tianfei.zhang@intel.com Signed-off-by: Jakub Kicinski commit e2b47e585931a988c856fd4ba31e1296f749aee3 Author: Bjorn Andersson Date: Thu Mar 23 15:33:43 2023 -0700 cpufreq: qcom-cpufreq-hw: Revert adding cpufreq qos The OSM/EPSS hardware controls the frequency of each CPU cluster based on requests from the OS and various throttling events in the system. While throttling is in effect the related dcvs interrupt will be kept high. The purpose of the code handling this interrupt is to continuously report the thermal pressure based on the throttled frequency. The reasoning for adding QoS control to this mechanism is not entirely clear, but the introduction of commit 'c4c0efb06f17 ("cpufreq: qcom-cpufreq-hw: Add cpufreq qos for LMh")' causes the scaling_max_frequncy to be set to the throttled frequency. On the next iteration of polling, the throttled frequency is above or equal to the newly requested frequency, so the polling is stopped. With cpufreq limiting the max frequency, the hardware no longer report a throttling state and no further updates to thermal pressure or qos state are made. The result of this is that scaling_max_frequency can only go down, and the system becomes slower and slower every time a thermal throttling event is reported by the hardware. Even if the logic could be improved, there is no reason for software to limit the max freqency in response to the hardware limiting the max frequency. At best software will follow the reported hardware state, but typically it will cause slower backoff of the throttling. This reverts commit c4c0efb06f17fa4a37ad99e7752b18a5405c76dc. Fixes: c4c0efb06f17 ("cpufreq: qcom-cpufreq-hw: Add cpufreq qos for LMh") Reported-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Signed-off-by: Viresh Kumar commit e69003202434131510ab18acda7d251b1975ecb1 Author: Konrad Dybcio Date: Wed Mar 8 02:27:00 2023 +0100 dt-bindings: cpufreq: cpufreq-qcom-hw: Add QCM2290 Document the OSM CPUFREQ_HW present on QCM2290, featuring just one lonely frequency domain. Signed-off-by: Konrad Dybcio Reviewed-by: Rob Herring Signed-off-by: Viresh Kumar commit 7ae24e054f753ff40ca1adaa631edd7476590a5f Author: Konrad Dybcio Date: Wed Mar 8 02:26:59 2023 +0100 dt-bindings: cpufreq: cpufreq-qcom-hw: Sanitize data per compatible Introduce per-SoC compatibles for OSM targets (read: pre-sm8250) and sanitize the number of interrupt{s,-names} and reg/-names per-compatible. Signed-off-by: Konrad Dybcio Reviewed-by: Rob Herring Signed-off-by: Viresh Kumar commit 287143d886961194c23c98ebbde5c0fad39e12b8 Author: Konrad Dybcio Date: Wed Mar 8 02:26:58 2023 +0100 dt-bindings: cpufreq: cpufreq-qcom-hw: Allow just 1 frequency domain Some SoCs implementing CPUFREQ-HW only have a single frequency domain. Allow such case. Signed-off-by: Konrad Dybcio Acked-by: Rob Herring Signed-off-by: Viresh Kumar commit 417598f998520b1484a7cef2ac0563de7d975937 Author: Luca Weiss Date: Fri Mar 24 15:06:24 2023 +0100 cpufreq: Add SM7225 to cpufreq-dt-platdev blocklist The Qualcomm SM7225 platform uses the qcom-cpufreq-hw driver, so add it to the cpufreq-dt-platdev driver's blocklist. Signed-off-by: Luca Weiss Signed-off-by: Viresh Kumar commit ba5e770c9698782bc203bbf5cf3b36a77720bdbe Author: Krzysztof Kozlowski Date: Thu Mar 23 18:40:26 2023 +0100 cpufreq: qcom-cpufreq-hw: fix double IO unmap and resource release on exit Commit 054a3ef683a1 ("cpufreq: qcom-hw: Allocate qcom_cpufreq_data during probe") moved getting memory resource and iomap from qcom_cpufreq_hw_cpu_init() to the probe function, however it left untouched cleanup in qcom_cpufreq_hw_cpu_exit(). During device unbind this will lead to doule release of resource and double iounmap(), first by qcom_cpufreq_hw_cpu_exit() and second via managed resources: resource: Trying to free nonexistent resource <0x0000000018593000-0x0000000018593fff> Trying to vunmap() nonexistent vm area (0000000088a7d4dc) ... vunmap (mm/vmalloc.c:2771 (discriminator 1)) iounmap (mm/ioremap.c:60) devm_ioremap_release (lib/devres.c:19) devres_release_all (drivers/base/devres.c:506 drivers/base/devres.c:535) device_unbind_cleanup (drivers/base/dd.c:523) device_release_driver_internal (drivers/base/dd.c:1248 drivers/base/dd.c:1263) device_driver_detach (drivers/base/dd.c:1300) unbind_store (drivers/base/bus.c:243) drv_attr_store (drivers/base/bus.c:127) sysfs_kf_write (fs/sysfs/file.c:137) kernfs_fop_write_iter (fs/kernfs/file.c:334) vfs_write (include/linux/fs.h:1851 fs/read_write.c:491 fs/read_write.c:584) ksys_write (fs/read_write.c:637) __arm64_sys_write (fs/read_write.c:646) invoke_syscall (arch/arm64/include/asm/current.h:19 arch/arm64/kernel/syscall.c:57) el0_svc_common.constprop.0 (arch/arm64/include/asm/daifflags.h:28 arch/arm64/kernel/syscall.c:150) do_el0_svc (arch/arm64/kernel/syscall.c:194) el0_svc (arch/arm64/include/asm/daifflags.h:28 arch/arm64/kernel/entry-common.c:133 arch/arm64/kernel/entry-common.c:142 arch/arm64/kernel/entry-common.c:638) el0t_64_sync_handler (arch/arm64/kernel/entry-common.c:656) el0t_64_sync (arch/arm64/kernel/entry.S:591) Fixes: 054a3ef683a1 ("cpufreq: qcom-hw: Allocate qcom_cpufreq_data during probe") Cc: Cc: Manivannan Sadhasivam Signed-off-by: Krzysztof Kozlowski Reviewed-by: Manivannan Sadhasivam Reviewed-by: Bjorn Andersson Signed-off-by: Viresh Kumar commit 0883426fd07e39355362e3f2eb9aee1a154dcaf6 Author: AngeloGioacchino Del Regno Date: Fri Mar 24 18:11:30 2023 +0800 cpufreq: mediatek: Raise proc and sram max voltage for MT7622/7623 During the addition of SRAM voltage tracking for CCI scaling, this driver got some voltage limits set for the vtrack algorithm: these were moved to platform data first, then enforced in a later commit 6a17b3876bc8 ("cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()") using these as max values for the regulator_set_voltage() calls. In this case, the vsram/vproc constraints for MT7622 and MT7623 were supposed to be the same as MT2701 (and a number of other SoCs), but that turned out to be a mistake because the aforementioned two SoCs' maximum voltage for both VPROC and VPROC_SRAM is 1.36V. Fix that by adding new platform data for MT7622/7623 declaring the right {proc,sram}_max_volt parameter. Fixes: ead858bd128d ("cpufreq: mediatek: Move voltage limits to platform data") Fixes: 6a17b3876bc8 ("cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()") Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Jia-Wei Chang Signed-off-by: Viresh Kumar commit d3296bb4cafd4bad4a5cf2eeab9d19cc94f9e30e Author: Jia-Wei Chang Date: Fri Mar 24 18:11:29 2023 +0800 cpufreq: mediatek: raise proc/sram max voltage for MT8516 Since the upper boundary of proc/sram voltage of MT8516 is 1300 mV, which is greater than the value of MT2701 1150 mV, we fix it by adding the corresponding platform data and specify proc/sram_max_volt to support MT8516. Signed-off-by: Jia-Wei Chang Fixes: ead858bd128d ("cpufreq: mediatek: Move voltage limits to platform data") Fixes: 6a17b3876bc8 ("cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()") Reported-by: Nick Hainke Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Viresh Kumar commit d51e106240bc755cbe59634b70d567c192b045b2 Author: Jia-Wei Chang Date: Fri Mar 24 18:11:28 2023 +0800 cpufreq: mediatek: fix KP caused by handler usage after regulator_put/clk_put Any kind of failure in mtk_cpu_dvfs_info_init() will lead to calling regulator_put() or clk_put() and the KP will occur since the regulator/clk handlers are used after released in mtk_cpu_dvfs_info_release(). To prevent the usage after regulator_put()/clk_put(), the regulator/clk handlers are addressed in a way of "Free the Last Thing Style". Signed-off-by: Jia-Wei Chang Fixes: 4b9ceb757bbb ("cpufreq: mediatek: Enable clocks and regulators") Suggested-by: AngeloGioacchino Del Regno Suggested-by: Dan Carpenter Signed-off-by: Viresh Kumar commit d51c63230994f167126d9d8381011b4cb2b0ad22 Author: Jia-Wei Chang Date: Fri Mar 24 18:11:27 2023 +0800 cpufreq: mediatek: fix passing zero to 'PTR_ERR' In order to prevent passing zero to 'PTR_ERR' in mtk_cpu_dvfs_info_init(), we fix the return value of of_get_cci() using error pointer by explicitly casting error number. Signed-off-by: Jia-Wei Chang Fixes: 0daa47325bae ("cpufreq: mediatek: Link CCI device to CPU") Reported-by: Dan Carpenter Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Viresh Kumar commit 7232282dd47cce6a780c9414bd9baccf232c7686 Author: Heiko Carstens Date: Mon Mar 27 13:53:31 2023 +0200 kunit: increase KUNIT_LOG_SIZE to 2048 bytes The s390 specific test_unwind kunit test has 39 parameterized tests. The results in debugfs are truncated since the full log doesn't fit into 1500 bytes. Therefore increase KUNIT_LOG_SIZE to 2048 bytes in a similar way like it was done recently with commit "kunit: fix bug in debugfs logs of parameterized tests". With that the whole test result is present. Reported-by: Alexander Egorenkov Signed-off-by: Heiko Carstens Reviewed-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 8a8f944ff26092f957c41a8419d36e3fe7945d6b Merge: 24e9e57f581dd b3a2e00e20671 Author: Mark Brown Date: Thu Mar 30 01:26:47 2023 +0100 ASoC: SoundWire codecs: simplify/fix set_stream Merge series from Bard Liao : Simplify set_stream in SoundWire codecs. commit 24e9e57f581dd3e90c4b63f066dab96c6ba4e05f Author: Mark Brown Date: Fri Mar 24 16:33:28 2023 +0000 ASoC: dapm: Sort speakers after other outputs Currently we sequence speakers with line and headphone outputs in DAPM. This works well when speakers are integrate into a CODEC but when there is an external speaker driver connected to a line or headphone output it can mean that the speaker driver ends up getting sequenced such that it picks up pops and clicks from the CODEC. Mask this by moving speakers after the other outputs in DAPM. We may want to consider doing this for headphones too but separate drivers are less common there and headphone drivers often also function as line outputs so the situation is less clear. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230324-asoc-dapm-spk-v1-1-e1f27f766505@kernel.org Signed-off-by: Mark Brown commit 4ca13d1002f37c10038ff4ed3cfdc70dbe049d60 Author: Xu Kuohai Date: Tue Mar 28 21:10:48 2023 -0400 selftests/bpf: Rewrite two infinite loops in bound check cases The two infinite loops in bound check cases added by commit 1a3148fc171f ("selftests/bpf: Check when bounds are not in the 32-bit range") increased the execution time of test_verifier from about 6 seconds to about 9 seconds. Rewrite these two infinite loops to finite loops to get rid of this extra time cost. Signed-off-by: Xu Kuohai Link: https://lore.kernel.org/r/20230329011048.1721937-1-xukuohai@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 8a9abe0293294fee279750058a509bbfab0c57a3 Merge: 8b52cc2a2fef5 fa7cc90620870 Author: Alexei Starovoitov Date: Wed Mar 29 17:22:02 2023 -0700 Merge branch 'veristat: add better support of freplace programs' Andrii Nakryiko says: ==================== Teach veristat how to deal with freplace BPF programs. As they can't be directly loaded by veristat without custom user-space part that sets correct target program FD, veristat always fails freplace programs. This patch set teaches veristat to guess target program type that will be inherited by freplace program itself, and subtitute it for BPF_PROG_TYPE_EXT (freplace) one for the purposes of BPF verification. Patch #1 fixes bug in libbpf preventing overriding freplace with specific program type. Patch #2 adds convenient -d flag to request veristat to emit libbpf debug logs. It help debugging why a specific BPF program fails to load, if the problem is not due to BPF verification itself. v3->v4: - fix optional kern_name check when guessing prog type (Alexei); v2->v3: - fix bpf_obj_id selftest that uses legacy bpf_prog_test_load() helper, which always sets program type programmatically; teach the helper to do it only if actually necessary (Stanislav); v1->v2: - fix compilation error reported by old GCC (my GCC v11 doesn't produce even a warning) and Clang (see CI failure at [0]): GCC version: veristat.c: In function ‘fixup_obj’: veristat.c:908:1: error: label at end of compound statement 908 | skip_freplace_fixup: | ^~~~~~~~~~~~~~~~~~~ Clang version: veristat.c:909:1: error: label at end of compound statement is a C2x extension [-Werror,-Wc2x-extensions] } ^ 1 error generated. [0] https://github.com/kernel-patches/bpf/actions/runs/4515972059/jobs/7953845335 ==================== Acked-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov commit fa7cc90620870e4444bb5184c08148495b1627c6 Author: Andrii Nakryiko Date: Mon Mar 27 11:52:02 2023 -0700 veristat: guess and substitue underlying program type for freplace (EXT) progs SEC("freplace") (i.e., BPF_PROG_TYPE_EXT) programs are not loadable as is through veristat, as kernel expects actual program's FD during BPF_PROG_LOAD time, which veristat has no way of knowing. Unfortunately, freplace programs are a pretty important class of programs, especially when dealing with XDP chaining solutions, which rely on EXT programs. So let's do our best and teach veristat to try to guess the original program type, based on program's context argument type. And if guessing process succeeds, we manually override freplace/EXT with guessed program type using bpf_program__set_type() setter to increase chances of proper BPF verification. We rely on BTF and maintain a simple lookup table. This process is obviously not 100% bulletproof, as valid program might not use context and thus wouldn't have to specify correct type. Also, __sk_buff is very ambiguous and is the context type across many different program types. We pick BPF_PROG_TYPE_CGROUP_SKB for now, which seems to work fine in practice so far. Similarly, some program types require specifying attach type, and so we pick one out of possible few variants. Best effort at its best. But this makes veristat even more widely applicable. Signed-off-by: Andrii Nakryiko Tested-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230327185202.1929145-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit b3c63d7ad81ad6f43921d59af18fc25c64327a74 Author: Andrii Nakryiko Date: Mon Mar 27 11:52:01 2023 -0700 veristat: add -d debug mode option to see debug libbpf log Add -d option to allow requesting libbpf debug logs from veristat. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230327185202.1929145-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit d6e6286a12e7b8a4ddc66237c4ccf6f531ef1c82 Author: Andrii Nakryiko Date: Mon Mar 27 11:52:00 2023 -0700 libbpf: disassociate section handler on explicit bpf_program__set_type() call If user explicitly overrides programs's type with bpf_program__set_type() API call, we need to disassociate whatever SEC_DEF handler libbpf determined initially based on program's SEC() definition, as it's not goind to be valid anymore and could lead to crashes and/or confusing failures. Also, fix up bpf_prog_test_load() helper in selftests/bpf, which is force-setting program type (even if that's completely unnecessary; this is quite a legacy piece of code), and thus should expect auto-attach to not work, yet one of the tests explicitly relies on auto-attach for testing. Instead, force-set program type only if it differs from the desired one. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230327185202.1929145-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit b31507dcaf3566d8ec3bdbf9922d8d5748b08a0f Author: Geert Uytterhoeven Date: Wed Mar 29 09:14:05 2023 +0200 dma-debug: Use %pa to format phys_addr_t On 32-bit without LPAE: kernel/dma/debug.c: In function ‘debug_dma_dump_mappings’: kernel/dma/debug.c:537:7: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 9 has type ‘phys_addr_t’ {aka ‘unsigned int’} [-Wformat=] kernel/dma/debug.c: In function ‘dump_show’: kernel/dma/debug.c:568:59: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 11 has type ‘phys_addr_t’ {aka ‘unsigned int’} [-Wformat=] Fixes: bd89d69a529fbef3 ("dma-debug: add cacheline to user/kernel space dump messages") Reported-by: kernel test robot Link: https://lore.kernel.org/r/202303160548.ReyuTsGD-lkp@intel.com Reported-by: noreply@ellerman.id.au Signed-off-by: Geert Uytterhoeven Signed-off-by: Christoph Hellwig commit 51723657be6865c3eb86e4fa7778cfaa4a97bddd Author: Devarsh Thakkar Date: Mon Mar 27 20:58:32 2023 +0530 remoteproc: k3-r5: Use separate compatible string for TI AM62x SoC family AM62 and AM62A SoCs use single core R5F which is a new scenario different than the one being used with CLUSTER_MODE_SINGLECPU which is for utilizing a single core from a set of cores available in R5F cluster present in the SoC. To support this single core scenario map it with newly defined CLUSTER_MODE_SINGLECORE and use it when compatible is set to ti,am62-r5fss. Also set PROC_BOOT_CFG_FLAG_R5_SINGLE_CORE config for CLUSTER_MODE_SINGLECORE too as it is required by R5 core when it is being as general purpose core instead of device manager. For IPC-only mode when config flag PROC_BOOT_CFG_FLAG_R5_SINGLE_CORE is set, skip overriding to CLUSTER_MODE_SINGLECPU when CLUSTER_MODE_SINGLECORE is set as same flag is applicable for single core configuration too. Signed-off-by: Devarsh Thakkar Link: https://lore.kernel.org/r/20230327152832.923480-4-devarsht@ti.com Signed-off-by: Mathieu Poirier commit f3d81b4537a5dab6fb97b7802ce73ff6b75e10b5 Author: Devarsh Thakkar Date: Mon Mar 27 20:58:31 2023 +0530 dt-bindings: remoteproc: ti: Add new compatible for AM62 SoC family AM62 family of devices don't have a R5F cluster, instead they have single core DM R5F. Add new compatible string ti,am62-r5fss to support this scenario. When this new compatible is used cluster-mode property can only be set to value 3 i.e. CLUSTER_MODE_SINGLECORE which is also the default value in case cluster-mode is not defined in device-tree. While at it, also sort the compatible lists in alphabetical order. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Devarsh Thakkar Link: https://lore.kernel.org/r/20230327152832.923480-3-devarsht@ti.com Signed-off-by: Mathieu Poirier commit 7f402919278aa5b8eec82a7dad2e0cb8e6bdee14 Author: Devarsh Thakkar Date: Mon Mar 27 20:58:30 2023 +0530 remoteproc: k3-r5: Simplify cluster mode setting usage Check the validity of mode against SoC supported modes right at the probe to minimize the usage of same check further in the code. Set default value of cluster-mode only if cluster-mode device tree property is empty. In case devicetree provided cluster-mode property is invalid For e.g. using CLUSTER_MODE_SINGLECPU on any SoC other than am64x then return error. If firmware has set the PROC_BOOT_STATUS_FLAG_R5_SINGLECORE_ONLY flag then what it means is that only CLUSTER_MODE_SINGLECPU is possible to use [1] and hence there is no need to check for soc_data->single_cpu_mode first and then checking cluster mode. PROC_BOOT_CFG_FLAG_R5_SINGLE_CORE flag can be set directly for CLUSTER_MODE_SINGLECPU without checking for soc_data->single_cpu_mode since that check has already been done during probe. For IPC-only mode, directly override cluster mode as per config flag set by bootloader without checking for soc specific data. This because config flag would already have been validated by firmware when bootloader was setting it. Link: [1] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/security/PROC_BOOT.html?highlight=singlecore_only#arm-r5 Signed-off-by: Devarsh Thakkar Link: https://lore.kernel.org/r/20230327152832.923480-2-devarsht@ti.com Signed-off-by: Mathieu Poirier commit 461b56f26119b9fc47a83113a59c05be05e4c6fa Merge: f769fcefa683e e3720f92e0237 Author: Mark Brown Date: Thu Mar 30 00:14:00 2023 +0100 ASoC: Merge fixes So they can be used as a basis for new work. commit b4a2adbf3586efa12fe78b9dec047423e01f3010 Author: Arnd Bergmann Date: Mon Feb 27 09:59:10 2023 +0100 clk: tegra20: fix gcc-7 constant overflow warning Older gcc versions get confused by comparing a u32 value to a negative constant in a switch()/case block: drivers/clk/tegra/clk-tegra20.c: In function 'tegra20_clk_measure_input_freq': drivers/clk/tegra/clk-tegra20.c:581:2: error: case label does not reduce to an integer constant case OSC_CTRL_OSC_FREQ_12MHZ: ^~~~ drivers/clk/tegra/clk-tegra20.c:593:2: error: case label does not reduce to an integer constant case OSC_CTRL_OSC_FREQ_26MHZ: Make the constants unsigned instead. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230227085914.2560984-1-arnd@kernel.org Signed-off-by: Stephen Boyd commit 1aa161e43106d46ca8e9a86f4aa28d420258134b Author: Jaegeuk Kim Date: Thu Mar 23 15:37:54 2023 -0700 f2fs: fix scheduling while atomic in decompression path [ 16.945668][ C0] Call trace: [ 16.945678][ C0] dump_backtrace+0x110/0x204 [ 16.945706][ C0] dump_stack_lvl+0x84/0xbc [ 16.945735][ C0] __schedule_bug+0xb8/0x1ac [ 16.945756][ C0] __schedule+0x724/0xbdc [ 16.945778][ C0] schedule+0x154/0x258 [ 16.945793][ C0] bit_wait_io+0x48/0xa4 [ 16.945808][ C0] out_of_line_wait_on_bit+0x114/0x198 [ 16.945824][ C0] __sync_dirty_buffer+0x1f8/0x2e8 [ 16.945853][ C0] __f2fs_commit_super+0x140/0x1f4 [ 16.945881][ C0] f2fs_commit_super+0x110/0x28c [ 16.945898][ C0] f2fs_handle_error+0x1f4/0x2f4 [ 16.945917][ C0] f2fs_decompress_cluster+0xc4/0x450 [ 16.945942][ C0] f2fs_end_read_compressed_page+0xc0/0xfc [ 16.945959][ C0] f2fs_handle_step_decompress+0x118/0x1cc [ 16.945978][ C0] f2fs_read_end_io+0x168/0x2b0 [ 16.945993][ C0] bio_endio+0x25c/0x2c8 [ 16.946015][ C0] dm_io_dec_pending+0x3e8/0x57c [ 16.946052][ C0] clone_endio+0x134/0x254 [ 16.946069][ C0] bio_endio+0x25c/0x2c8 [ 16.946084][ C0] blk_update_request+0x1d4/0x478 [ 16.946103][ C0] scsi_end_request+0x38/0x4cc [ 16.946129][ C0] scsi_io_completion+0x94/0x184 [ 16.946147][ C0] scsi_finish_command+0xe8/0x154 [ 16.946164][ C0] scsi_complete+0x90/0x1d8 [ 16.946181][ C0] blk_done_softirq+0xa4/0x11c [ 16.946198][ C0] _stext+0x184/0x614 [ 16.946214][ C0] __irq_exit_rcu+0x78/0x144 [ 16.946234][ C0] handle_domain_irq+0xd4/0x154 [ 16.946260][ C0] gic_handle_irq.33881+0x5c/0x27c [ 16.946281][ C0] call_on_irq_stack+0x40/0x70 [ 16.946298][ C0] do_interrupt_handler+0x48/0xa4 [ 16.946313][ C0] el1_interrupt+0x38/0x68 [ 16.946346][ C0] el1h_64_irq_handler+0x20/0x30 [ 16.946362][ C0] el1h_64_irq+0x78/0x7c [ 16.946377][ C0] finish_task_switch+0xc8/0x3d8 [ 16.946394][ C0] __schedule+0x600/0xbdc [ 16.946408][ C0] preempt_schedule_common+0x34/0x5c [ 16.946423][ C0] preempt_schedule+0x44/0x48 [ 16.946438][ C0] process_one_work+0x30c/0x550 [ 16.946456][ C0] worker_thread+0x414/0x8bc [ 16.946472][ C0] kthread+0x16c/0x1e0 [ 16.946486][ C0] ret_from_fork+0x10/0x20 Fixes: bff139b49d9f ("f2fs: handle decompress only post processing in softirq") Fixes: 95fa90c9e5a7 ("f2fs: support recording errors into superblock") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 92318f20d703885d0602bb5654a52d593ca45e30 Author: Hans Holmberg Date: Mon Feb 20 13:20:04 2023 +0100 f2fs: preserve direct write semantics when buffering is forced In some cases, e.g. for zoned block devices, direct writes are forced into buffered writes that will populate the page cache and be written out just like buffered io. Direct reads, on the other hand, is supported for the zoned block device case. This has the effect that applications built for direct io will fill up the page cache with data that will never be read, and that is a waste of resources. If we agree that this is a problem, how do we fix it? A) Supporting proper direct writes for zoned block devices would be the best, but it is currently not supported (probably for a good but non-obvious reason). Would it be feasible to implement proper direct IO? B) Avoid the cost of keeping unwanted data by syncing and throwing out the cached pages for buffered O_DIRECT writes before completion. This patch implements B) by reusing the code for how partial block writes are flushed out on the "normal" direct write path. Note that this changes the performance characteristics of f2fs quite a bit. Direct IO performance for zoned block devices is lower for small writes after this patch, but this should be expected with direct IO and in line with how f2fs behaves on top of conventional block devices. Another open question is if the flushing should be done for all cases where buffered writes are forced. Signed-off-by: Hans Holmberg Reviewed-by: Yonggil Song Signed-off-by: Jaegeuk Kim commit babedcbac164cec970872b8097401ca913a80e61 Author: Yangtao Li Date: Tue Mar 21 01:22:18 2023 +0800 f2fs: compress: fix to call f2fs_wait_on_page_writeback() in f2fs_write_raw_pages() BUG_ON() will be triggered when writing files concurrently, because the same page is writtenback multiple times. 1597 void folio_end_writeback(struct folio *folio) 1598 { ...... 1618 if (!__folio_end_writeback(folio)) 1619 BUG(); ...... 1625 } kernel BUG at mm/filemap.c:1619! Call Trace: f2fs_write_end_io+0x1a0/0x370 blk_update_request+0x6c/0x410 blk_mq_end_request+0x15/0x130 blk_complete_reqs+0x3c/0x50 __do_softirq+0xb8/0x29b ? sort_range+0x20/0x20 run_ksoftirqd+0x19/0x20 smpboot_thread_fn+0x10b/0x1d0 kthread+0xde/0x110 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x22/0x30 Below is the concurrency scenario: [Process A] [Process B] [Process C] f2fs_write_raw_pages() - redirty_page_for_writepage() - unlock page() f2fs_do_write_data_page() - lock_page() - clear_page_dirty_for_io() - set_page_writeback() [1st writeback] ..... - unlock page() generic_perform_write() - f2fs_write_begin() - wait_for_stable_page() - f2fs_write_end() - set_page_dirty() - lock_page() - f2fs_do_write_data_page() - set_page_writeback() [2st writeback] This problem was introduced by the previous commit 7377e853967b ("f2fs: compress: fix potential deadlock of compress file"). All pagelocks were released in f2fs_write_raw_pages(), but whether the page was in the writeback state was ignored in the subsequent writing process. Let's fix it by waiting for the page to writeback before writing. Cc: Christoph Hellwig Fixes: 4c8ff7095bef ("f2fs: support data compression") Fixes: 7377e853967b ("f2fs: compress: fix potential deadlock of compress file") Signed-off-by: Qi Han Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c948be797da8ddbb1ec2f5cccad1c8629c69db79 Author: Yangtao Li Date: Tue Mar 21 01:31:36 2023 +0800 f2fs: remove else in f2fs_write_cache_pages() As Christoph Hellwig point out: Please avoid the else by doing the goto in the branch. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0b37ed21e3367539b79284e0b0af2246ffcf0dca Author: Jaegeuk Kim Date: Tue Mar 21 15:58:04 2023 -0700 f2fs: apply zone capacity to all zone type If we manage the zone capacity per zone type, it'll break the GC assumption. And, the current logic complains valid block count mismatch. Let's apply zone capacity to all zone type, if specified. Fixes: de881df97768 ("f2fs: support zone capacity less than zone size") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b822dc914917f9381e7a04ff6872c1b6883dd4ae Author: Yangtao Li Date: Thu Mar 2 17:55:09 2023 +0800 f2fs: fix to handle filemap_fdatawrite() error in f2fs_ioc_decompress_file/f2fs_ioc_compress_file It seems inappropriate that the current logic does not handle filemap_fdatawrite() errors, so let's fix it. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5bb9c111cd98ad844d48ace9924e29f56312f036 Author: Yangtao Li Date: Wed Mar 8 22:06:23 2023 +0800 f2fs: convert to MAX_SBI_FLAG instead of 32 in stat_show() BIW reduce the s_flag array size and make s_flag constant. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6797ebc4ac55e7539391a5155f8a27f614da6bc5 Author: Yonggil Song Date: Mon Mar 13 18:48:25 2023 +0900 f2fs: Fix discard bug on zoned block devices with 2MiB zone size When using f2fs on a zoned block device with 2MiB zone size, IO errors occurs because f2fs tries to write data to a zone that has not been reset. The cause is that f2fs tries to discard multiple zones at once. This is caused by a condition in f2fs_clear_prefree_segments that does not check for zoned block devices when setting the discard range. This leads to invalid reset commands and write pointer mismatches. This patch fixes the zoned block device with 2MiB zone size to reset one zone at a time. Signed-off-by: Yonggil Song Signed-off-by: Jaegeuk Kim commit bf21acf9959a48d90dd32869a0649525eb21be56 Author: Jaegeuk Kim Date: Fri Mar 10 11:49:57 2023 -0800 f2fs: remove entire rb_entry sharing This is a last part to remove the memory sharing for rb_tree in extent_cache. This should also fix arm32 memory alignment issue. [struct extent_node] [struct rb_entry] [0] struct rb_node rb_node; [0] struct rb_node rb_node; union { union { struct { struct { [16] unsigned int fofs; [12] unsigned int ofs; unsigned int len; unsigned int len; }; unsigned long long key; } __packed; Cc: Fixes: 13054c548a1c ("f2fs: introduce infra macro and data structure of rb-tree extent cache") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f69475dd4878e5f2e316a6573044d55f294baa51 Author: Jaegeuk Kim Date: Fri Mar 10 11:12:35 2023 -0800 f2fs: factor out discard_cmd usage from general rb_tree use This is a second part to remove the mixed use of rb_tree in discard_cmd from extent_cache. This should also fix arm32 memory alignment issue caused by shared rb_entry. [struct discard_cmd] [struct rb_entry] [0] struct rb_node rb_node; [0] struct rb_node rb_node; union { union { struct { struct { [16] block_t lstart; [12] unsigned int ofs; block_t len; unsigned int len; }; unsigned long long key; } __packed; Cc: Fixes: 004b68621897 ("f2fs: use rb-tree to track pending discard commands") Signed-off-by: Jaegeuk Kim commit 043d2d00b44310f84c0593c63e51fae88c829cdd Author: Jaegeuk Kim Date: Fri Mar 10 10:04:26 2023 -0800 f2fs: factor out victim_entry usage from general rb_tree use Let's reduce the complexity of mixed use of rb_tree in victim_entry from extent_cache and discard_cmd. This should fix arm32 memory alignment issue caused by shared rb_entry. [struct victim_entry] [struct rb_entry] [0] struct rb_node rb_node; [0] struct rb_node rb_node; union { struct { unsigned int ofs; unsigned int len; }; [16] unsigned long long mtime; [12] unsigned long long key; } __packed; Cc: Fixes: 093749e296e2 ("f2fs: support age threshold based garbage collection") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c17caf0ba3aa3411b96c71b4ce24be1040b8f3e8 Author: Yonggil Song Date: Thu Feb 16 16:13:50 2023 +0900 f2fs: fix uninitialized skipped_gc_rwsem When f2fs skipped a gc round during victim migration, there was a bug which would skip all upcoming gc rounds unconditionally because skipped_gc_rwsem was not initialized. It fixes the bug by correctly initializing the skipped_gc_rwsem inside the gc loop. Fixes: 6f8d4455060d ("f2fs: avoid fi->i_gc_rwsem[WRITE] lock in f2fs_gc") Signed-off-by: Yonggil Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8051692f5f23260215bfe9a72e712d93606acc5f Author: Yangtao Li Date: Tue Feb 21 22:45:50 2023 +0800 f2fs: handle dqget error in f2fs_transfer_project_quota() We should set the error code when dqget() failed. Fixes: 2c1d03056991 ("f2fs: support F2FS_IOC_FS{GET,SET}XATTR") Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim commit 447286ebadaafa551550704ff0b42eb08b1d1cb2 Author: Yangtao Li Date: Thu Feb 16 21:53:24 2023 +0800 f2fs: convert to use bitmap API Let's use BIT() and GENMASK() instead of open it. Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 960fa2c828a0af7a3b03b295e6aa17b2afeb5e07 Author: Yangtao Li Date: Thu Feb 16 22:09:35 2023 +0800 f2fs: export compress_percent and compress_watermark entries This patch export below sysfs entries for better control cached compress page count. /sys/fs/f2fs//compress_watermark /sys/fs/f2fs//compress_percent Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 60630375064f6f5124316dc372cdbed482a11f1e Author: Li Zetao Date: Thu Feb 23 01:25:13 2023 +0000 f2fs: make f2fs_sync_inode_meta() static After commit 26b5a079197c ("f2fs: cleanup dirty pages if recover failed"), f2fs_sync_inode_meta() is only used in checkpoint.c, so f2fs_sync_inode_meta() should only be visible inside. Delete the declaration in the header file and change f2fs_sync_inode_meta() to static. Signed-off-by: Li Zetao Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6cba789f8982b38be37daa1b67b8488710b47b29 Author: Minghao Chi Date: Fri Nov 11 14:39:35 2022 +0800 clock: milbeaut: use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Minghao Chi Link: https://lore.kernel.org/r/202211111439357842458@zte.com.cn Signed-off-by: Stephen Boyd commit 27a6e1b09a782517fddac91259970ac466a3f7b6 Author: Clément Léger Date: Tue Jan 31 09:32:27 2023 +0100 clk: add missing of_node_put() in "assigned-clocks" property parsing When returning from of_parse_phandle_with_args(), the np member of the of_phandle_args structure should be put after usage. Add missing of_node_put() calls in both __set_clk_parents() and __set_clk_rates(). Fixes: 86be408bfbd8 ("clk: Support for clock parents and rates assigned from device tree") Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20230131083227.10990-1-clement.leger@bootlin.com Signed-off-by: Stephen Boyd commit 7cc7478e093782d2ac176c11a966de00bd0792dc Author: Sebastian Reichel Date: Fri Mar 17 23:57:07 2023 +0100 power: supply: generic-adc-battery: style fixes This does the following code-style changes: * fix inconsistent indentation in 'struct gab' * remove unused cable_plugged from 'struct gab' * remove pointless temporary is_plugged variable * add gab_ prefix to read_channel No functionality changes are intended. Signed-off-by: Sebastian Reichel commit 4fc1befb3a30d76a3f4b19833d45fb81ab1652b1 Author: Sebastian Reichel Date: Fri Mar 17 23:57:06 2023 +0100 power: supply: generic-adc-battery: improve error message Add device context and error code to the error messages to make it useful. Reviewed-by: Linus Walleij Reviewed-by: Matti Vaittinen Signed-off-by: Sebastian Reichel commit ca0f6e0d1499e8e23e340d8b7187eeec5c4f6593 Author: Sebastian Reichel Date: Fri Mar 17 23:57:05 2023 +0100 power: supply: generic-adc-battery: update copyright info jz4740-battery.c and s3c_adc_battery.c have been removed from the tree and after all of my restructuring the driver is basically no longer based on them. Thus update the copyright information and switch to SPDX license identifier while being at it. Reviewed-by: Linus Walleij Reviewed-by: Matti Vaittinen Signed-off-by: Sebastian Reichel commit 165663addf0ea9cf6e18c8d1ab9b9a8ef6f5a5b7 Author: Sebastian Reichel Date: Fri Mar 17 23:57:04 2023 +0100 power: supply: generic-adc-battery: add DT support This adds full DT support to the driver. Because of the previous changes just adding a compatible value is enough. Reviewed-by: Linus Walleij Reviewed-by: Matti Vaittinen Signed-off-by: Sebastian Reichel commit 33088c0513818d1d4cf2c510fd67456fd577d887 Author: Sebastian Reichel Date: Fri Mar 17 23:57:03 2023 +0100 power: supply: generic-adc-battery: add temperature support Another typical thing to monitor via an ADC line is the battery temperature. Reviewed-by: Matti Vaittinen Reviewed-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 9489d1bdb763a3dd954e61522043190a9fd1cb4c Author: Sebastian Reichel Date: Fri Mar 17 23:57:02 2023 +0100 power: supply: generic-adc-battery: simplify read_channel logic Drop mostly useless gab_prop_to_chan() function by directly supplying the correct enum value to read_channel(). Reviewed-by: Linus Walleij Reviewed-by: Matti Vaittinen Signed-off-by: Sebastian Reichel commit 1b27bf793fd46219c882b8e545ec736cfadc0841 Author: Sebastian Reichel Date: Fri Mar 17 23:57:01 2023 +0100 power: supply: generic-adc-battery: use simple-battery API Constant battery data is available through power-supply's simple-battery API. This works automatically, so the manual handling can be removed without loosing any feature :) Note, that the POWER_SUPPLY_STATUS_FULL check for the level variable can be dropped, since the variable is never written. It can be re-introduced properly once the driver gets functionality to calculate the current charge level. Apart from that the check must be done fuzzy anyways, since charge estimation usually is not precise enough to always return exactly the full charge capacity for a full battery. Reviewed-by: Linus Walleij Reviewed-by: Matti Vaittinen Signed-off-by: Sebastian Reichel commit 2f25b9750fa0d79090cadf6e7d0e3edba4fa58e3 Author: Sebastian Reichel Date: Fri Mar 17 23:57:00 2023 +0100 power: supply: generic-adc-battery: drop memory alloc error message Error printing happens automatically for memory allocation problems. Reviewed-by: Linus Walleij Reviewed-by: Matti Vaittinen Signed-off-by: Sebastian Reichel commit 3b6fd262bfcd696aa98af99d71dcf952f289cbee Author: Sebastian Reichel Date: Fri Mar 17 23:56:59 2023 +0100 power: supply: generic-adc-battery: drop charge now support Drop CHARGE_NOW support, which requires a platform specific calculation method. Reviewed-by: Linus Walleij Reviewed-by: Matti Vaittinen Signed-off-by: Sebastian Reichel commit c8f573f312f36861db8e40d9953b6d4b84f1321b Author: Sebastian Reichel Date: Fri Mar 17 23:56:58 2023 +0100 power: supply: generic-adc-battery: drop jitter delay support Drop support for configuring IRQ jitter delay by using big enough fixed value. Reviewed-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 44263f50065969f2344808388bd589740f026167 Author: Sebastian Reichel Date: Fri Mar 17 23:56:57 2023 +0100 power: supply: generic-adc-battery: fix unit scaling power-supply properties are reported in µV, µA and µW. The IIO API provides mV, mA, mW, so the values need to be multiplied by 1000. Fixes: e60fea794e6e ("power: battery: Generic battery driver using IIO") Reviewed-by: Linus Walleij Reviewed-by: Matti Vaittinen Signed-off-by: Sebastian Reichel commit 93297ef6920f071ed109cbdcf640edfc693d0456 Author: Sebastian Reichel Date: Fri Mar 17 23:56:56 2023 +0100 power: supply: generic-adc-battery: convert to managed resources Convert driver to use managed resources to simplify driver code. Reviewed-by: Linus Walleij Reviewed-by: Matti Vaittinen Signed-off-by: Sebastian Reichel commit 27a2195efa8d26447c40dd4a6299ea0247786d75 Author: Sebastian Reichel Date: Fri Mar 17 23:56:55 2023 +0100 power: supply: core: auto-exposure of simple-battery data Automatically expose data from the simple-battery firmware node for all battery drivers. Reviewed-by: Linus Walleij Reviewed-by: Matti Vaittinen Signed-off-by: Sebastian Reichel commit 8b52cc2a2fef541d605debb7efc7dc1bae7b2876 Merge: d8d8b008629ff 4239561b69feb Author: Martin KaFai Lau Date: Wed Mar 29 13:10:56 2023 -0700 Merge branch 'Allow BPF TCP CCs to write app_limited' Yixin Shen says: ==================== This series allow BPF TCP CCs to write app_limited of struct tcp_sock. A built-in CC or one from a kernel module is already able to write to app_limited of struct tcp_sock. Until now, a BPF CC doesn't have write access to this member of struct tcp_sock. v2: - Merge the test of writing app_limited into the test of writing sk_pacing. (Martin KaFai Lau) ==================== Signed-off-by: Martin KaFai Lau commit 4239561b69feb94e52e43d93685cc46fb9dbcae5 Author: Yixin Shen Date: Wed Mar 29 07:35:58 2023 +0000 selftests/bpf: test a BPF CC writing app_limited Test whether a TCP CC implemented in BPF is allowed to write app_limited in struct tcp_sock. This is already allowed for the built-in TCP CC. Signed-off-by: Yixin Shen Link: https://lore.kernel.org/r/20230329073558.8136-3-bobankhshen@gmail.com Signed-off-by: Martin KaFai Lau commit 562dc56a88983421a6c5a46e0feb891873d118a1 Author: Yixin Shen Date: Wed Mar 29 07:35:57 2023 +0000 bpf: allow a TCP CC to write app_limited A CC that implements tcp_congestion_ops.cong_control() should be able to write app_limited. A built-in CC or one from a kernel module is already able to write to this member of struct tcp_sock. For a BPF program, write access has not been allowed, yet. Signed-off-by: Yixin Shen Link: https://lore.kernel.org/r/20230329073558.8136-2-bobankhshen@gmail.com Signed-off-by: Martin KaFai Lau commit 325de950297b4295890715b041a143d152ea4971 Author: Yi Liu Date: Mon Mar 27 02:33:46 2023 -0700 iommu/iommufd: Pass iommufd_ctx pointer in iommufd_get_ioas() No need to pass the iommufd_ucmd pointer. Link: https://lore.kernel.org/r/20230327093351.44505-2-yi.l.liu@intel.com Signed-off-by: Yi Liu Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Tested-by: Nicolin Chen Signed-off-by: Jason Gunthorpe commit fbb3b3500f76ec8b741bd2d0e761ca3e856ad924 Author: Krzysztof Kozlowski Date: Sun Mar 26 17:54:25 2023 +0200 dt-bindings: display: boe,tv101wum-nl6: document rotation Allow 'rotation' property (coming from panel-common.yaml) already used in DTS: sc7180-trogdor-quackingstick-r0.dtb: panel@0: 'rotation' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230326155425.91181-6-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 5ffd1f3f9a8e44ed816817bb5b0193cc64c9dba1 Author: Krzysztof Kozlowski Date: Sun Mar 26 17:54:24 2023 +0200 dt-bindings: display: visionox,rm69299: document reg Panels are supposed to have one reg. This fixes dtbs_check warnings like: sc7180-idp.dtb: panel@0: 'reg' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230326155425.91181-5-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 2727dbacb016d5a0124c54a39822f169d807b6a1 Author: Krzysztof Kozlowski Date: Sun Mar 26 17:54:23 2023 +0200 dt-bindings: display: panel-simple-dsi: document port Panels are supposed to have one port (coming from panel-common.yaml binding): msm8916-samsung-a3u-eur.dtb: panel@0: 'port' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230326155425.91181-4-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit dd049e8f7616e74cb9c3c2f8e88aac0ac20dd8af Author: Krzysztof Kozlowski Date: Sun Mar 26 17:54:22 2023 +0200 dt-bindings: display: panel-simple-dsi: allow vddio variant Few panels like Samsung s6e3fc2x01 and sofef00 use vddio-supply instead of power-supply (in DTS and Linux driver), so allow it to fix: sdm845-oneplus-enchilada.dtb: panel@0: 'power-supply' is a required property Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230326155425.91181-3-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 331b569fd21755bb9acd2ee021addf689b5a07f4 Author: Krzysztof Kozlowski Date: Sun Mar 26 17:54:21 2023 +0200 dt-bindings: display: novatek,nt36672a: correct VDDIO supply The nt36672a bindings were added with a mistake on VDDIO supply calling it in one place vddio and in other vddi0. Typical name is rather vddio which is also now used by DTS (sdm845-xiaomi-beryllium-common.dtsi) and Linux driver. Fixes: c2abcf30efb8 ("dt-bindings: display: novatek,nt36672a: Fix unevaluated properties warning") Fixes: 9528a02430df ("dt-bindings: display: panel: Add bindings for Novatek nt36672a") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230326155425.91181-2-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 5e78066767c9f2c108b949336faa5773cd266908 Author: Krzysztof Kozlowski Date: Sun Mar 26 17:54:20 2023 +0200 dt-bindings: display: panel-simple: merge Innolux p120zdg-bf1 There is nothing special in Innolux p120zdg-bf1 panel, so just like other Innolux panels it can be made part of panel-simple. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230326155425.91181-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit fc114c75680da73c3815512d880f69cecc9a9b87 Author: Rob Herring Date: Wed Mar 22 12:35:29 2023 -0500 dt-bindings: i2c: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Reviewed-by: Nicolas Ferre Reviewed-by: Alain Volmat Signed-off-by: Wolfram Sang commit d34a6b715a23ccd9c9d0bc7a475bea59dc3e28b2 Author: Conor Dooley Date: Fri Mar 24 12:12:41 2023 +0000 RISC-V: convert new selectors of RISCV_ALTERNATIVE to dependencies for-next contains two additional extensions that select RISCV_ALTERNATIVE. RISCV_ALTERNATIVE no longer needs to be selected by individual config options as it is now selected for !XIP_KERNEL builds by the top level RISCV option. These extensions rely on the alternative framework, so convert the "select"s to "depends on"s instead. Signed-off-by: Conor Dooley Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230324121240.3594777-1-conor.dooley@microchip.com Signed-off-by: Palmer Dabbelt commit be693ef2a4aeac0d65d83a22d5fb6941f164a675 Merge: e97be4fbc1b16 1ee7fc3f4d0a9 Author: Palmer Dabbelt Date: Wed Mar 29 11:56:08 2023 -0700 Merge patch series "RISC-V: Fixes for riscv_has_extension[un]likely()'s alternative dependency" Conor Dooley says: Here's my attempt at fixing both the use of an FPU on XIP kernels and the issue that Jason ran into where CONFIG_FPU, which needs the alternatives frame work for has_fpu() checks, could be enabled without the alternatives actually being present. For the former, a "slow" fallback that does not use alternatives is added to riscv_has_extension_[un]likely() that can be used with XIP. Obviously, we want to make use of Jisheng's alternatives based approach where possible, so any users of riscv_has_extension_[un]likely() will want to make sure that they select RISCV_ALTERNATIVE. If they don't however, they'll hit the fallback path which (should, sparing a silly mistake from me!) behave in the same way, thus succeeding silently. Sounds like a To prevent "depends on !XIP_KERNEL; select RISCV_ALTERNATIVE" spreading like the plague through the various places that want to check for the presence of extensions, and sidestep the potential silent "success" mentioned above, all users RISCV_ALTERNATIVE are converted from selects to dependencies, with the option being selected for all !XIP_KERNEL builds. I know that the VDSO was a key place that Jisheng wanted to use the new helper rather than static branches, and I think the fallback path should not cause issues there. See the thread at [1] for the prior discussion. 1 - https://lore.kernel.org/linux-riscv/20230128172856.3814-1-jszhang@kernel.org/T/#m21390d570997145d31dd8bb95002fd61f99c6573 [Palmer: these were also merged into fixes, but there's a cleanup that depends on the merge so I'm taking it into for-next as well.] * b4-shazam-merge: RISC-V: always select RISCV_ALTERNATIVE for non-xip kernels RISC-V: add non-alternative fallback for riscv_has_extension_[un]likely() Link: https://lore.kernel.org/r/20230324100538.3514663-1-conor.dooley@microchip.com Signed-off-by: Palmer Dabbelt * commit '1ee7fc3f4d0a93831a20d5566f203d5ad6d44de8': RISC-V: always select RISCV_ALTERNATIVE for non-xip kernels RISC-V: add non-alternative fallback for riscv_has_extension_[un]likely() commit 2a37dec127892212f74c26ba7d1e03baa27d6b1a Author: Ye Xingchen Date: Tue Mar 21 19:44:06 2023 +0800 i2c: brcmstb: use devm_platform_ioremap_resource_byname() Convert platform_get_resource_byname(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource_byname(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Acked-by: Florian Fainelli Signed-off-by: Wolfram Sang commit ba064873ce5d193005e4fac66cdc436587a0dee2 Author: Lars-Peter Clausen Date: Fri Mar 17 07:54:41 2023 -0700 i2c: cadence: Detect maximum transfer size The maximum transfer length is a synthesis configuration parameters of the Cadence I2C IP. Different SoCs might use different values for these parameters. Currently the driver has the maximum transfer length hardcoded to 255. Trying to use the driver with an IP instance that uses smaller values for these will work for short transfers. But longer transfers will fail. The maximum transfer length can easily be detected at runtime since the unused MSBs of the transfer length register are hardwired to 0. Writing 0xff and then reading back the value will give the maximum transfer length. These changes have been tested with 1) The Xilinx MPSoC for which this driver was originally written which has the previous hardcoded settings of 16 and 255. 2) Another instance of the Cadence I2C IP with FIFO depth of 8 and maximum transfer length of 16. Without these changes the latter would fail for I2C transfers longer than 16. With the updated driver both work fine even for longer transfers. Note that the IP core and driver support chaining multiple transfers into a single longer transfer using the HOLD bit. So the maximum transfer size is not the limit for the length of the I2C transfer, but the limit for how much data can be transferred without having to reprogram the control registers. Signed-off-by: Lars-Peter Clausen Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit a069fcd9fa1822b81d9db1a67de6b4efd6b788e9 Author: Lars-Peter Clausen Date: Fri Mar 17 07:54:40 2023 -0700 i2c: cadence: Allow to specify the FIFO depth The FIFO depth is a synthesis configuration parameters of the Cadence I2C IP. Different SoCs might use different values for these parameters. Currently the driver has the FIFO depth hardcoded to 16. Trying to use the driver with an IP instance that uses smaller values for these will work for short transfers. But longer transfers will fail. Introduce a new devicetree property that allows to describe the FIFO depth of the I2C controller. These changes have been tested with 1) The Xilinx MPSoC for which this driver was originally written which has the previous hardcoded settings of 16 and 255. 2) Another instance of the Cadence I2C IP with FIFO depth of 8 and maximum transfer length of 16. Without these changes the latter would fail for I2C transfers longer than 8. With the updated driver both work fine even for longer transfers. Signed-off-by: Lars-Peter Clausen Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit 6ff0ddb3051e33372a22b1fac11ee74315f9d12e Author: Lars-Peter Clausen Date: Fri Mar 17 07:54:39 2023 -0700 dt-bindings: i2c: cadence: Document `fifo-depth` property The depth of the FIFO of the Cadence I2C controller IP is a synthesis configuration parameter. Different instances of the IP can have different values. For correct operation software needs to be aware of the size of the FIFO. Add the documentation for the devicetree property that describes the FIFO depth of the IP core. The default value of 16 is for backwards compatibility reasons with existing hardware descriptions where this property is not specified and software has assumed that the FIFO depth is 16. Signed-off-by: Lars-Peter Clausen Acked-by: Michal Simek Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 0cc98416709210e93e0ae154b336f954df298b6c Author: Yang Li Date: Thu Mar 16 13:43:25 2023 +0800 i2c: xiic: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Reviewed-by: Michal Simek Signed-off-by: Wolfram Sang commit d8a5a922d5268bec9bff0ed6d19bc84228d4910e Author: Andi Shyti Date: Sat Mar 18 00:33:38 2023 +0100 i2c: mpc: Use i2c-scl-clk-low-timeout-us i2c property "fsl,timeout" is marked as deprecated and replaced by the "i2c-scl-clk-low-timeout-us" i2c property. Use this latter and, in case it is missing, for back compatibility, check whether we still have "fsl,timeout" defined. Signed-off-by: Andi Shyti Reviewed-by: Chris Packham Tested-by: Chris Packham Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit be40a3ae719f406069cb4a0f59332dac51850d2a Author: Andi Shyti Date: Sat Mar 18 00:33:37 2023 +0100 i2c: mpc: Use of_property_read_u32 instead of of_get_property "of_property_read_u32()" is preferred to "of_get_property()" for retrieving u32 from the device tree. Replace it. Suggested-by: Chris Packham Signed-off-by: Andi Shyti Tested-by: Chris Packham Reviewed-by: Chris Packham Signed-off-by: Wolfram Sang commit ba085a8d6fb55b150bb1f4e6a955c00dc197c651 Author: Andi Shyti Date: Sat Mar 18 00:33:36 2023 +0100 dt-bindings: i2c: mpc: Mark "fsl,timeout" as deprecated Now we have the i2c-scl-clk-low-timeout-us property defined in the i2c schema. Mark "fsl,timeout" as deprecated and update the example. Signed-off-by: Andi Shyti Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 58c043d988d8dbf928f4d779d40d4b256242678d Author: Krzysztof Kozlowski Date: Sat Mar 11 12:16:56 2023 +0100 i2c: xiic: hide OF related data for COMPILE_TEST The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/i2c/busses/i2c-xiic.c:1202:39: error: ‘xiic_2_00’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Signed-off-by: Wolfram Sang commit 79a1725028e0ba9982e31b3b8820a92cce704416 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:16:58 2023 +0100 i2c: synquacer: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/i2c/busses/i2c-synquacer.c:632:34: error: ‘synquacer_i2c_dt_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Signed-off-by: Wolfram Sang commit 12ca59b91d04df32e41be5a52f0cabba912c11de Author: Konrad Dybcio Date: Tue Mar 7 14:29:28 2023 +0100 clk: Print an info line before disabling unused clocks Currently, the regulator framework informs us before calling into their unused cleanup paths, which eases at least some debugging. The same could be beneficial for clocks, so that random shutdowns shortly after most initcalls are done can be less of a guess. Add a pr_info before disabling unused clocks to do so. Reviewed-by: Marijn Suijten Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230307132928.3887737-1-konrad.dybcio@linaro.org Signed-off-by: Stephen Boyd commit 7d8b59a9482af9cc3808bb064cd9b7a0eb231faa Author: AngeloGioacchino Del Regno Date: Mon Mar 27 10:36:34 2023 +0200 dt-bindings: i2c: i2c-mt65xx: Add compatible for MT6795 Helio X10 The MT6795 SoC uses the same I2C controller parameters as MT8173: add a new compatible string for it. Signed-off-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit 1bf33285d98536da6b015627341e4f789fee067e Author: Waiman Long Date: Fri Mar 17 11:15:08 2023 -0400 cgroup/cpuset: Minor updates to test_cpuset_prs.sh This patch makes the following minor updates to the cpuset partition testing script test_cpuset_prs.sh. - Remove online_cpus function call as it will be called anyway on exit in cleanup. - Make the enabling of sched/verbose debugfs flag conditional on the "-v" verbose option and set DELAY_FACTOR to 2 in this case as cpuset partition operations are likely to be slowed down by enabling that. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 6667439f51c446fead5d991ff49b842a811a6195 Author: Waiman Long Date: Fri Mar 17 11:15:07 2023 -0400 cgroup/cpuset: Include offline CPUs when tasks' cpumasks in top_cpuset are updated Similar to commit 3fb906e7fabb ("group/cpuset: Don't filter offline CPUs in cpuset_cpus_allowed() for top cpuset tasks"), the whole set of possible CPUs including offline ones should be used for setting cpumasks for tasks in the top cpuset when a cpuset partition is modified as the hotplug code won't update cpumasks for tasks in the top cpuset when CPUs become online or offline. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit df59b72cd8fb8ca00301f47e65853efed195d23f Author: Waiman Long Date: Fri Mar 17 11:15:06 2023 -0400 cgroup/cpuset: Skip task update if hotplug doesn't affect current cpuset If a hotplug event doesn't affect the current cpuset, there is no point to call hotplug_update_tasks() or hotplug_update_tasks_legacy(). So just skip it. Signed-off-by: Waiman Long Reviewed-by: Michal Koutný Signed-off-by: Tejun Heo commit d9dc06009b35dd2942561bf5c939a1c91bb5d9e4 Author: Rafael J. Wysocki Date: Wed Mar 29 19:44:21 2023 +0200 thermal: thermal_hwmon: Revert recent message adjustment For the sake of consistency, revert the second part of the thermal_hwmon.c hunk from commit dec07d399cc8 ("thermal: Don't use 'device' internal thermal zone structure field") after the first part of it has been reverted. Link: https://lore.kernel.org/linux-pm/5b084360-898b-aad0-0b8e-33acc585d71d@linaro.org Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit 5dcad50636a5d416135bafae86fc4979b911a7c6 Merge: 8e4645226b493 292fd843de26c Author: Tejun Heo Date: Wed Mar 29 08:39:46 2023 -1000 Merge branch 'for-6.3-fixes' into for-6.4 To receive 292fd843de26 ("cgroup/cpuset: Fix partition root's cpuset.cpus update bug") in preparation for further cpuset updates. commit f030c8fd64cea916d57d40bb7b59c1cff9ea3bc3 Author: Bagas Sanjaya Date: Wed Mar 15 17:02:46 2023 +0700 Documentation: kernel-parameters: Remove meye entry Commit ba47652ba65523 ("media: meye: remove this deprecated driver") removes meye driver but forgets to purge its kernel-parameters.txt entry, hence broken reference. Remove the entry. Link: https://lore.kernel.org/all/202302070341.OVqstpMM-lkp@intel.com/ Fixes: ba47652ba655 ("media: meye: remove this deprecated driver") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20230315100246.62324-1-bagasdotme@gmail.com Signed-off-by: Jonathan Corbet commit 526c2966fca3337f01c513b1f0d85c839f8d8175 Author: Yang Li Date: Wed Mar 29 14:24:50 2023 +0800 spi: rockchip-sfc: Use devm_platform_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20230329062450.58924-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit d8d8b008629ffd69f1e204010cb3299bb633877e Author: Manu Bretelle Date: Wed Mar 29 00:30:02 2023 -0700 tools: bpftool: json: Fix backslash escape typo in jsonw_puts This is essentially a backport of iproute2's commit ed54f76484b5 ("json: fix backslash escape typo in jsonw_puts") Also added the stdio.h include in json_writer.h to be able to compile and run the json_writer test as used below). Before this fix: $ gcc -D notused -D TEST -I../../include -o json_writer json_writer.c json_writer.h $ ./json_writer { "Vyatta": { "url": "http://vyatta.com", "downloads": 2000000, "stock": 8.16, "ARGV": [], "empty": [], "NIL": {}, "my_null": null, "special chars": [ "slash": "/", "newline": "\n", "tab": "\t", "ff": "\f", "quote": "\"", "tick": "'", "backslash": "\n" ] } } After: $ gcc -D notused -D TEST -I../../include -o json_writer json_writer.c json_writer.h $ ./json_writer { "Vyatta": { "url": "http://vyatta.com", "downloads": 2000000, "stock": 8.16, "ARGV": [], "empty": [], "NIL": {}, "my_null": null, "special chars": [ "slash": "/", "newline": "\n", "tab": "\t", "ff": "\f", "quote": "\"", "tick": "'", "backslash": "\\" ] } } Signed-off-by: Manu Bretelle Signed-off-by: Andrii Nakryiko Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20230329073002.2026563-1-chantr4@gmail.com commit 1d6f52a7c847efcfd9c43622a5d6ce88b8e1fb53 Author: Federico Vaga Date: Sun Mar 26 15:02:13 2023 +0200 doc:it_IT: translation alignment Italian translation updated following these changes: commit 901578a45950 ("docs: recommend using Link: whenever using Reported-by:")" commit 775a445d9a63 ("coding-style: fix title of Greg K-H's talk") commit 1d2ed9234c85 ("Documentation: process: Document suitability of Proton Mail for kernel development") commit 9d0f5cd16744 ("docs: promote the title of process/index.rst") commit d4563201f33a ("Documentation: simplify and clarify DCO contribution example language") commit e7b4311ebcac ("Replace HTTP links with HTTPS ones: Documentation/process") commit 0b02076f9953 ("docs: programming-language: add Rust programming language section") commit 38484a1d0c50 ("docs: programming-language: remove mention of the Intel compiler") commit b8885e2615f4 ("Documentation: front page: use recommended heading adornments") Signed-off-by: Federico Vaga Link: https://lore.kernel.org/r/20230326130213.28755-1-federico.vaga@vaga.pv.it Signed-off-by: Jonathan Corbet commit 6928a3c082f19404bd41bf33beeae112915dc666 Author: ChiYuan Huang Date: Wed Mar 29 08:43:26 2023 +0800 regulator: Add Richtek RT4803 boost regulator RT4803 is a boost converter that integrates an internal bypass FET. It will automatically transform the operation mode between bypass and boost based on the voltage difference of the input and output voltage. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1680050606-461-2-git-send-email-cy_huang@richtek.com Signed-off-by: Mark Brown commit e126cdaad15c4206f27b450e5d87391d5066615c Author: ChiYuan Huang Date: Wed Mar 29 08:43:25 2023 +0800 regulator: dt-bindings: Add Richtek RT4803 Add the binding document for Richtek RT4803. Signed-off-by: ChiYuan Huang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1680050606-461-1-git-send-email-cy_huang@richtek.com Signed-off-by: Mark Brown commit bd2c35d0247a2825332c25a014ee10e804b4d7ad Author: Akira Yokosawa Date: Wed Mar 29 14:22:28 2023 +0900 docs/sp_SP: Remove ZERO WIDTH SPACE in memory-barriers.txt As this file is included literally, ZERO WIDTH SPACE causes "make pdfdocs" to emit messages which read: Missing character: There is no ​ (U+200B) in font DejaVu Sans Mono/OT:script=latn;language=dflt;! Missing character: There is no ​ (U+200B) in font DejaVu Sans Mono/OT:script=latn;language=dflt;! U+200B (ZERO WIDTH SPADE) has no effect in literal blocks. Remove them and get rid of those noises. Signed-off-by: Akira Yokosawa Acked-by: Carlos Bilbao Link: https://lore.kernel.org/r/c38176c7-c30a-4c2c-3516-8d3be1c267dc@gmail.com Signed-off-by: Jonathan Corbet commit f769fcefa683e150456555e2a280668509d834df Author: Krzysztof Kozlowski Date: Mon Mar 27 15:22:52 2023 +0200 ASoC: dt-bindings: qcom,lpass-va-macro: Add SM8550 VA macro Add the VA macro codec on Qualcomm SM8550, which comes without NPL clock exposed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230327132254.147975-9-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 6a7c51b4d91b5d73aae2647356990573643b2ae4 Author: Kuninori Morimoto Date: Wed Mar 29 00:21:03 2023 +0000 ASoC: soc-topology.c: dai_link->platform again On SOF, many topology is assuming dai_link->platform exists, and is allowed to be overwritten on each link_load(). This patch restore the removed dai_link->platform for SOF, and add the comment. Fixes: e7098ba9b378 ("ASoC: soc-topology.c: remove unnecessary dai_link->platform") Reported-by: Peter Ujfalusi Link: https://lore.kernel.org/r/87jzz7jczp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Tested-by: Peter Ujfalusi Link: https://lore.kernel.org/r/87v8ikcsr5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4ea0c97776bf8c63805eb0f8182d9c20072219d9 Author: Andy Shevchenko Date: Tue Mar 21 15:54:12 2023 +0200 gpiolib: Check array_info for NULL only once in gpiod_get_array() gpiod_get_array() has a long if-else-if branching where each of them tests for the same variable to be not NULL. Instead, check for NULL before even going to that flow. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 79736429c97f517247645e73e75c956efd09ad03 Author: Andy Shevchenko Date: Tue Mar 21 15:54:11 2023 +0200 gpiolib: Replace open coded krealloc() gpiod_get_array() does a new allocation in some cases, followed by copying previously allocated placeholder for the descriptors. Replace that with krealloc(__GFP_ZERO), since it was kzalloc() originally. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 4eb7c2f3a3d7cd6c50f391ac555b50c3fc5b3799 Author: Zhang Rui Date: Wed Mar 29 17:00:55 2023 +0800 thermal: thermal_hwmon: Fix a kernel NULL pointer dereference When the hwmon device node of a thermal zone device is not found, using hwmon->device causes a kernel NULL pointer dereference. Fixes: dec07d399cc8 ("thermal: Don't use 'device' internal thermal zone structure field") Reported-by: Preble Adam C Signed-off-by: Zhang Rui Acked-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 0a2481cde24f78f503cbc066df2c9c160e64cfd6 Author: Jens Axboe Date: Tue Mar 28 15:10:31 2023 -0600 block: ensure bio_alloc_map_data() deals with ITER_UBUF correctly This helper blindly copies the iovec, even if we don't have one. Make this case a bit smarter by only doing so if we have an iovec array to copy. Signed-off-by: Jens Axboe commit a8fd44cbd283cb9825f9d799da14234148e5a4dd Author: Bagas Sanjaya Date: Sun Mar 19 14:49:03 2023 +0700 Documentation: leds: MT6370: Use bullet lists for timing variables The timing description contains list of timing pattern variables, but it uses code block without indentation instead. Switch to bullet list as it is better fit for this purpose. While at it, substitute "load" for "duty" because the variables control timing for current load into the device. Link: https://lore.kernel.org/oe-kbuild-all/202303182310.tB1mUzU7-lkp@intel.com/ Fixes: 4ba9df04b7ac66 ("docs: leds: Add MT6370 RGB LED pattern document") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230319074903.13075-4-bagasdotme@gmail.com commit c458290702441f2e9eac22001ef52ae82717160a Author: Uwe Kleine-König Date: Fri Mar 24 17:49:57 2023 +0100 pinctrl: mcp23s08: Implement gpio bulk functions To speed up some usecases implement reading and writing several IO lines at once. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230324164957.485924-3-u.kleine-koenig@pengutronix.de Signed-off-by: Linus Walleij commit d490be6dd8aa3194d8b5d509846275b4b2b2ac38 Author: Uwe Kleine-König Date: Fri Mar 24 17:49:56 2023 +0100 pinctrl: mcp23s08: Rename and change function that wraps regmap_update_bits() The semantic of mcp_set_mask() was surprising to me when I first read that driver. So it was unexpected that in the call mcp_set_mask(mcp, MCP_OLAT, mask, value); value was a bool. Make the function a thinner wrapper around regmap_update_bits() and rename it to also have a similar name. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230324164957.485924-2-u.kleine-koenig@pengutronix.de Signed-off-by: Linus Walleij commit 61f21988d806a5c93c39179f2d91ea2d3219b025 Author: Conor Dooley Date: Wed Mar 29 13:34:26 2023 +0100 docs: driver-api: firmware_loader: fix missing argument in usage example By the time firmware-upload support landed in commit 97730bbb242c ("firmware_loader: Add firmware-upload support"), the arguments for firmware_upload_register() had changed, and while this is automagically represented in the kernel doc bits, the usage example was not kept in sync. Add the missing argument as per the driver. Fixes: 97730bbb242c ("firmware_loader: Add firmware-upload support") Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20230329123425.4177084-1-conor.dooley@microchip.com Signed-off-by: Greg Kroah-Hartman commit b3a2e00e20671091f7175f8f36b7f9c9ea2e77bb Author: Pierre-Louis Bossart Date: Fri Mar 24 09:44:08 2023 +0800 ASoC: codecs: rt5682-sdw: simplify set_stream Using a dynamic allocation to store a single pointer is not very efficient/useful. Worse, the memory is released in the SoundWire stream.c file, but still accessed in the DAI shutdown, leading to kmemleak reports. And last the API requires the previous stream information to be cleared when the argument is NULL. Simplify the code to address all 3 problems. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230324014408.1677505-14-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit cf1d6a3ad07c982a09455bf8720dc75754909932 Author: Pierre-Louis Bossart Date: Fri Mar 24 09:44:07 2023 +0800 ASoC: codecs: rt715-sdca: simplify set_stream Using a dynamic allocation to store a single pointer is not very efficient/useful. Worse, the memory is released in the SoundWire stream.c file, but still accessed in the DAI shutdown, leading to kmemleak reports. And last the API requires the previous stream information to be cleared when the argument is NULL. Simplify the code to address all 3 problems. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230324014408.1677505-13-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit e506b2bd1d2e9daaedd1db2ef9868f7b8c4c86c3 Author: Pierre-Louis Bossart Date: Fri Mar 24 09:44:06 2023 +0800 ASoC: codecs: rt715: simplify set_stream Using a dynamic allocation to store a single pointer is not very efficient/useful. Worse, the memory is released in the SoundWire stream.c file, but still accessed in the DAI shutdown, leading to kmemleak reports. And last the API requires the previous stream information to be cleared when the argument is NULL. Simplify the code to address all 3 problems. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230324014408.1677505-12-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 278432084b093f7257cf96c75bb33f155e4a8232 Author: Pierre-Louis Bossart Date: Fri Mar 24 09:44:05 2023 +0800 ASoC: codecs: rt712-sdca: simplify set_stream Using a dynamic allocation to store a single pointer is not very efficient/useful. Worse, the memory is released in the SoundWire stream.c file, but still accessed in the DAI shutdown, leading to kmemleak reports. And last the API requires the previous stream information to be cleared when the argument is NULL. Simplify the code to address all 3 problems. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230324014408.1677505-11-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit b2790eccc0bc755d37ed5cd8d225cec0d72798c8 Author: Pierre-Louis Bossart Date: Fri Mar 24 09:44:04 2023 +0800 ASoC: codecs: rt711-sdca: simplify set_stream Using a dynamic allocation to store a single pointer is not very efficient/useful. Worse, the memory is released in the SoundWire stream.c file, but still accessed in the DAI shutdown, leading to kmemleak reports. And last the API requires the previous stream information to be cleared when the argument is NULL. Simplify the code to address all 3 problems. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230324014408.1677505-10-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit fa55b31fb65347ceab617af7541f0a31b53901f1 Author: Pierre-Louis Bossart Date: Fri Mar 24 09:44:03 2023 +0800 ASoC: codecs: rt711-sdw: simplify set_stream Using a dynamic allocation to store a single pointer is not very efficient/useful. Worse, the memory is released in the SoundWire stream.c file, but still accessed in the DAI shutdown, leading to kmemleak reports. And last the API requires the previous stream information to be cleared when the argument is NULL. Simplify the code to address all 3 problems. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230324014408.1677505-9-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 3bcced019eb266e91b7eecc1f8fd3da5f55ca4cd Author: Pierre-Louis Bossart Date: Fri Mar 24 09:44:02 2023 +0800 ASoC: codecs: rt700-sdw: simplify set_stream Using a dynamic allocation to store a single pointer is not very efficient/useful. Worse, the memory is released in the SoundWire stream.c file, but still accessed in the DAI shutdown, leading to kmemleak reports. And last the API requires the previous stream information to be cleared when the argument is NULL. Simplify the code to address all 3 problems. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230324014408.1677505-8-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit be8e5a850eb1780bae360b9b48b6d2ab70e5fb03 Author: Pierre-Louis Bossart Date: Fri Mar 24 09:44:01 2023 +0800 ASoC: codecs: rt1318-sdw: simplify set_stream Using a dynamic allocation to store a single pointer is not very efficient/useful. Worse, the memory is released in the SoundWire stream.c file, but still accessed in the DAI shutdown, leading to kmemleak reports. And last the API requires the previous stream information to be cleared when the argument is NULL. Simplify the code to address all 3 problems. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230324014408.1677505-7-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 1294d7d71f6abad6299a12cf6911f8e5622c7865 Author: Pierre-Louis Bossart Date: Fri Mar 24 09:44:00 2023 +0800 ASoC: codecs: rt1316-sdw: simplify set_stream Using a dynamic allocation to store a single pointer is not very efficient/useful. Worse, the memory is released in the SoundWire stream.c file, but still accessed in the DAI shutdown, leading to kmemleak reports. And last the API requires the previous stream information to be cleared when the argument is NULL. Simplify the code to address all 3 problems. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230324014408.1677505-6-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit ce8ffc1bac7bee5015eb68faf214b39fcbd65d15 Author: Pierre-Louis Bossart Date: Fri Mar 24 09:43:59 2023 +0800 ASoC: codecs: rt1308-sdw: simplify set_stream Using a dynamic allocation to store a single pointer is not very efficient/useful. Worse, the memory is released in the SoundWire stream.c file, but still accessed in the DAI shutdown, leading to kmemleak reports. And last the API requires the previous stream information to be cleared when the argument is NULL. Simplify the code to address all 3 problems. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230324014408.1677505-5-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 658d6f7381b1be5a6fec7d90c865fb593b8c78b6 Author: Pierre-Louis Bossart Date: Fri Mar 24 09:43:58 2023 +0800 ASoC: codecs: max98373-sdw: simplify set_stream Using a dynamic allocation to store a single pointer is not very efficient/useful. Worse, the memory is released in the SoundWire stream.c file, but still accessed in the DAI shutdown, leading to kmemleak reports. And last the API requires the previous stream information to be cleared when the argument is NULL. Simplify the code to address all 3 problems. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230324014408.1677505-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit f3def177876450df07fab6f28ad24a70397dc94d Author: Pierre-Louis Bossart Date: Fri Mar 24 09:43:57 2023 +0800 ASoC: codecs: sdw-mockup: simplify set_stream Using a dynamic allocation to store a single pointer is not very efficient/useful. Worse, the memory is released in the SoundWire stream.c file, but still accessed in the DAI shutdown, leading to kmemleak reports. And last the API requires the previous stream information to be cleared when the argument is NULL. Simplify the code to address all 3 problems. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230324014408.1677505-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 892855d57c47c32f475e9efa36c1a3452cc19918 Author: Pierre-Louis Bossart Date: Fri Mar 24 09:43:56 2023 +0800 ASoC: codecs: cs42l42-sdw: clear stream The API requires the stream info to be cleared when the argument is NULL. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230324014408.1677505-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 82bbec189ab34873688484cd14189a5392946fbb Merge: 929ae7c2e3adb 197b6b60ae7bc Author: Daniel Vetter Date: Wed Mar 29 16:00:23 2023 +0200 Merge v6.3-rc4 into drm-next I just landed the fence deadline PR from Rob that a bunch of drivers want/need to apply driver-specific patches. Backmerge -rc4 so that they don't have to be stuck on -rc2 for no reason at all. Signed-off-by: Daniel Vetter commit 929ae7c2e3adbbb2c2bddcd16854a6b11b56e95a Merge: 2fcc1fa5f9068 d39e48ca80c09 Author: Daniel Vetter Date: Wed Mar 29 15:45:37 2023 +0200 Merge tag 'dma-fence-deadline' of https://gitlab.freedesktop.org/drm/msm into drm-next This series adds a deadline hint to fences, so realtime deadlines such as vblank can be communicated to the fence signaller for power/ frequency management decisions. This is partially inspired by a trick i915 does, but implemented via dma-fence for a couple of reasons: 1) To continue to be able to use the atomic helpers 2) To support cases where display and gpu are different drivers See https://patchwork.freedesktop.org/series/93035/ This does not yet add any UAPI, although this will be needed in a number of cases: 1) Workloads "ping-ponging" between CPU and GPU, where we don't want the GPU freq governor to interpret time stalled waiting for GPU as "idle" time 2) Cases where the compositor is waiting for fences to be signaled before issuing the atomic ioctl, for example to maintain 60fps cursor updates even when the GPU is not able to maintain that framerate. Signed-off-by: Daniel Vetter From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGt5nDQpa6J86V1oFKPA30YcJzPhAVpmF7N1K1g2N3c=Zg@mail.gmail.com commit f00327731131d1b5aa6a1aa9f50bcf8d620ace4c Author: Oliver Upton Date: Mon Mar 27 16:47:47 2023 +0000 KVM: arm64: Use config_lock to protect vgic state Almost all of the vgic state is VM-scoped but accessed from the context of a vCPU. These accesses were serialized on the kvm->lock which cannot be nested within a vcpu->mutex critical section. Move over the vgic state to using the config_lock. Tweak the lock ordering where necessary to ensure that the config_lock is acquired after the vcpu->mutex. Acquire the config_lock in kvm_vgic_create() to avoid a race between the converted flows and GIC creation. Where necessary, continue to acquire kvm->lock to avoid a race with vCPU creation (i.e. flows that use lock_all_vcpus()). Finally, promote the locking expectations in comments to lockdep assertions and update the locking documentation for the config_lock as well as vcpu->mutex. Cc: stable@vger.kernel.org Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230327164747.2466958-5-oliver.upton@linux.dev commit 4bba7f7def6f278266dadf845da472cfbfed784e Author: Oliver Upton Date: Mon Mar 27 16:47:46 2023 +0000 KVM: arm64: Use config_lock to protect data ordered against KVM_RUN There are various bits of VM-scoped data that can only be configured before the first call to KVM_RUN, such as the hypercall bitmaps and the PMU. As these fields are protected by the kvm->lock and accessed while holding vcpu->mutex, this is yet another example of lock inversion. Change out the kvm->lock for kvm->arch.config_lock in all of these instances. Opportunistically simplify the locking mechanics of the PMU configuration by holding the config_lock for the entirety of kvm_arm_pmu_v3_set_attr(). Note that this also addresses a couple of bugs. There is an unguarded read of the PMU version in KVM_ARM_VCPU_PMU_V3_FILTER which could race with KVM_ARM_VCPU_PMU_V3_SET_PMU. Additionally, until now writes to the per-vCPU vPMU irq were not serialized VM-wide, meaning concurrent calls to KVM_ARM_VCPU_PMU_V3_IRQ could lead to a false positive in pmu_irq_is_valid(). Cc: stable@vger.kernel.org Tested-by: Jeremy Linton Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230327164747.2466958-4-oliver.upton@linux.dev commit c43120afb5c66a3465c7468f5cf9806a26484cde Author: Oliver Upton Date: Mon Mar 27 16:47:45 2023 +0000 KVM: arm64: Avoid lock inversion when setting the VM register width kvm->lock must be taken outside of the vcpu->mutex. Of course, the locking documentation for KVM makes this abundantly clear. Nonetheless, the locking order in KVM/arm64 has been wrong for quite a while; we acquire the kvm->lock while holding the vcpu->mutex all over the shop. All was seemingly fine until commit 42a90008f890 ("KVM: Ensure lockdep knows about kvm->lock vs. vcpu->mutex ordering rule") caught us with our pants down, leading to lockdep barfing: ====================================================== WARNING: possible circular locking dependency detected 6.2.0-rc7+ #19 Not tainted ------------------------------------------------------ qemu-system-aar/859 is trying to acquire lock: ffff5aa69269eba0 (&host_kvm->lock){+.+.}-{3:3}, at: kvm_reset_vcpu+0x34/0x274 but task is already holding lock: ffff5aa68768c0b8 (&vcpu->mutex){+.+.}-{3:3}, at: kvm_vcpu_ioctl+0x8c/0xba0 which lock already depends on the new lock. Add a dedicated lock to serialize writes to VM-scoped configuration from the context of a vCPU. Protect the register width flags with the new lock, thus avoiding the need to grab the kvm->lock while holding vcpu->mutex in kvm_reset_vcpu(). Cc: stable@vger.kernel.org Reported-by: Jeremy Linton Link: https://lore.kernel.org/kvmarm/f6452cdd-65ff-34b8-bab0-5c06416da5f6@arm.com/ Tested-by: Jeremy Linton Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230327164747.2466958-3-oliver.upton@linux.dev commit 0acc7239c20a8401b8968c2adace8f7c9b0295ae Author: Oliver Upton Date: Mon Mar 27 16:47:44 2023 +0000 KVM: arm64: Avoid vcpu->mutex v. kvm->lock inversion in CPU_ON KVM/arm64 had the lock ordering backwards on vcpu->mutex and kvm->lock from the very beginning. One such example is the way vCPU resets are handled: the kvm->lock is acquired while handling a guest CPU_ON PSCI call. Add a dedicated lock to serialize writes to kvm_vcpu_arch::{mp_state, reset_state}. Promote all accessors of mp_state to {READ,WRITE}_ONCE() as readers do not acquire the mp_state_lock. While at it, plug yet another race by taking the mp_state_lock in the KVM_SET_MP_STATE ioctl handler. As changes to MP state are now guarded with a dedicated lock, drop the kvm->lock acquisition from the PSCI CPU_ON path. Similarly, move the reader of reset_state outside of the kvm->lock and instead protect it with the mp_state_lock. Note that writes to reset_state::reset have been demoted to regular stores as both readers and writers acquire the mp_state_lock. While the kvm->lock inversion still exists in kvm_reset_vcpu(), at least now PSCI CPU_ON no longer depends on it for serializing vCPU reset. Cc: stable@vger.kernel.org Tested-by: Jeremy Linton Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230327164747.2466958-2-oliver.upton@linux.dev commit 0398abca61482ae47a41ae8f2401338aea366327 Author: Ira Weiny Date: Wed Mar 15 16:20:55 2023 -0700 powerpc: Remove memcpy_page_flushcache() Commit 21b56c847753 ("iov_iter: get rid of separate bvec and xarray callbacks") removed the calls to memcpy_page_flushcache(). Remove the unnecessary memcpy_page_flushcache() call. Signed-off-by: Ira Weiny Signed-off-by: Michael Ellerman Link: https://msgid.link/20221230-kmap-x86-v1-2-15f1ecccab50@intel.com commit 84f02f3363382d45b8ab75361f7d69beb8f27f32 Author: Tom Rix Date: Sun Mar 26 16:57:12 2023 -0400 ALSA: asihpi: remove unused loop_count variable clang with W=1 reports sound/pci/asihpi/hpi6000.c:1256:6: error: variable 'loop_count' set but not used [-Werror,-Wunused-but-set-variable] u32 loop_count = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230326205712.1358918-1-trix@redhat.com Signed-off-by: Takashi Iwai commit 1e2bae6ae8f6b404b295edd5ba11a0bb1566544c Author: Mark Brown Date: Fri Mar 24 16:21:49 2023 +0000 regmap: Removed compressed cache support The compressed register cache support has assumptions that make it hard to cover in testing, mainly that it requires raw registers defaults be provided. Rather than either address these assumptions or leave it untested by the forthcoming KUnit tests let's remove it, the use case is quite thin and there are no current users. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230324-regcache-lzo-v1-1-08c5d63e2a5e@kernel.org commit 63e280a549140d0c162e5b958ddf02840bf35f0f Author: Krzysztof Kozlowski Date: Mon Mar 27 15:22:54 2023 +0200 ASoC: codecs: lpass-wsa-macro: add support for SM8550 Add support for the WSA macro codec on Qualcomm SM8550. SM8550 does not use NPL clock, thus add flags allowing to skip it. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230327132254.147975-11-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 5d83b5ce86624e3cf3802fbcb41d9dbfbd0fe964 Author: Krzysztof Kozlowski Date: Mon Mar 27 15:22:53 2023 +0200 ASoC: dt-bindings: qcom,lpass-wsa-macro: Add SM8550 WSA macro Add the WSA macro codec on Qualcomm SM8550, which comes without NPL clock exposed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230327132254.147975-10-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 84054a8d0d8db7670142c5f74ee82d369ef5bc75 Author: Krzysztof Kozlowski Date: Mon Mar 27 15:22:52 2023 +0200 ASoC: dt-bindings: qcom,lpass-va-macro: Add SM8550 VA macro Add the VA macro codec on Qualcomm SM8550, which comes without NPL clock exposed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230327132254.147975-9-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit f03038baacb8e1d8a16556215807ac9ee2dbeada Author: Krzysztof Kozlowski Date: Mon Mar 27 15:22:50 2023 +0200 ASoC: codecs: lpass-tx-macro: add support for SM8550 Add support for the TX macro codec on Qualcomm SM8550. SM8550 does not use NPL clock, thus add flags allowing to skip it. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230327132254.147975-7-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 3e226b4db21fc339423c318ec7d238424c884d11 Author: Krzysztof Kozlowski Date: Mon Mar 27 15:22:47 2023 +0200 ASoC: codecs: lpass-rx-macro: add support for SM8550 Add support for the RX macro codec on Qualcomm SM8550. SM8550 does not use NPL clock, thus add flags allowing to skip it. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230327132254.147975-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit ef36ca92754b4e50289aee99453e69c6ff13edad Author: Kuninori Morimoto Date: Wed Mar 29 00:21:03 2023 +0000 ASoC: soc-topology.c: dai_link->platform again On SOF, many topology is assuming dai_link->platform exists, and is allowed to be overwritten on each link_load(). This patch restore the removed dai_link->platform for SOF, and add the comment. Fixes: e7098ba9b378 ("ASoC: soc-topology.c: remove unnecessary dai_link->platform") Reported-by: Peter Ujfalusi Link: https://lore.kernel.org/r/87jzz7jczp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Tested-by: Peter Ujfalusi Link: https://lore.kernel.org/r/87v8ikcsr5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 78b26a335310a097d6b22581b706050db42f196c Author: Bob Pearson Date: Mon Mar 27 16:56:44 2023 -0500 RDMA/rxe: Remove tasklet call from rxe_cq.c Remove the tasklet call in rxe_cq.c and also the is_dying in the cq struct. There is no reason for the rxe driver to defer the call to the cq completion handler by scheduling a tasklet. rxe_cq_post() is not called in a hard irq context. The rxe driver currently is incorrect because the tasklet call is made without protecting the cq pointer with a reference from having the underlying memory freed before the deferred routine is called. Executing the comp_handler inline fixes this problem. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Bob Pearson Link: https://lore.kernel.org/r/20230327215643.10410-1-rpearsonhpe@gmail.com Acked-by: Zhu Yanjun Signed-off-by: Leon Romanovsky commit cba968e33e5df086b6e681179d199f959bc71f33 Author: Tom Rix Date: Sun Mar 26 08:09:59 2023 -0400 RDMA/ocrdma: remove unused discard_cnt variable clang with W=1 reports drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:1592:6: error: variable 'discard_cnt' set but not used [-Werror,-Wunused-but-set-variable] int discard_cnt = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230326120959.1351948-1-trix@redhat.com Signed-off-by: Leon Romanovsky commit 1b69f1e3d7449d0c66f7bc0f429ed94fc03dfeb3 Author: Tom Rix Date: Sat Mar 25 10:05:59 2023 -0400 RDMA/bnxt_re: remove unused num_srqne_processed and num_cqne_processed variables clang with W=1 reports drivers/infiniband/hw/bnxt_re/qplib_fp.c:303:6: error: variable 'num_srqne_processed' set but not used [-Werror,-Wunused-but-set-variable] int num_srqne_processed = 0; ^ drivers/infiniband/hw/bnxt_re/qplib_fp.c:304:6: error: variable 'num_cqne_processed' set but not used [-Werror,-Wunused-but-set-variable] int num_cqne_processed = 0; ^ These variables are not used so remove them. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230325140559.1336056-1-trix@redhat.com Acked-by: Selvin Xavier Signed-off-by: Leon Romanovsky commit 88fe1ec75fcb296579e05eaf3807da3ee83137e4 Author: Steven Rostedt (Google) Date: Tue Mar 28 11:10:57 2023 -0400 tracing: Unbreak user events The user events was added a bit prematurely, and there were a few kernel developers that had issues with it. The API also needed a bit of work to make sure it would be stable. It was decided to make user events "broken" until this was settled. Now it has a new API that appears to be as stable as it will be without the use of a crystal ball. It's being used within Microsoft as is, which means the API has had some testing in real world use cases. It went through many discussions in the bi-weekly tracing meetings, and there's been no more comments about updates. I feel this is good to go. Cc: Mathieu Desnoyers Signed-off-by: Steven Rostedt (Google) commit 4bec284cc0b99d880c3fb00fe0d2af7a0c285db3 Author: Steven Rostedt (Google) Date: Tue Mar 28 15:14:13 2023 -0400 tracing/user_events: Use print_format_fields() for trace output Currently, user events are shown using the "hex" output for "safety" reasons as one cannot trust user events behaving nicely. But the hex output is not the only utility for safe outputting of trace events. The print_event_fields() is just as safe and gives user readable output. Before: example-839 [001] ..... 43.222244: 00000000: b1 06 00 00 47 03 00 00 00 00 00 00 ....G....... example-839 [001] ..... 43.564433: 00000000: b1 06 00 00 47 03 00 00 01 00 00 00 ....G....... example-839 [001] ..... 43.763917: 00000000: b1 06 00 00 47 03 00 00 02 00 00 00 ....G....... example-839 [001] ..... 43.967929: 00000000: b1 06 00 00 47 03 00 00 03 00 00 00 ....G....... After: example-837 [006] ..... 55.739249: test: count=0x0 (0) example-837 [006] ..... 111.104784: test: count=0x1 (1) example-837 [006] ..... 111.268444: test: count=0x2 (2) example-837 [006] ..... 111.416533: test: count=0x3 (3) example-837 [006] ..... 111.542859: test: count=0x4 (4) Link: https://lore.kernel.org/linux-trace-kernel/20230328151413.4770b8d7@gandalf.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit a4c40c1349e32f9510707ed09e0961626980d8cb Author: Beau Belgrave Date: Tue Mar 28 16:52:19 2023 -0700 tracing/user_events: Align structs with tabs for readability Add tabs to make struct members easier to read and unify the style of the code. Link: https://lkml.kernel.org/r/20230328235219.203-13-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit ce58e96e9fe24022312ee1eeefb18ed460efdb18 Author: Beau Belgrave Date: Tue Mar 28 16:52:18 2023 -0700 tracing/user_events: Limit global user_event count Operators want to be able to ensure enough tracepoints exist on the system for kernel components as well as for user components. Since there are only up to 64K events, by default allow up to half to be used by user events. Add a kernel sysctl parameter (kernel.user_events_max) to set a global limit that is honored among all groups on the system. This ensures hard limits can be setup to prevent user processes from consuming all event IDs on the system. Link: https://lkml.kernel.org/r/20230328235219.203-12-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit f9cce238ee287a2aa580de1a0187390d6ffdcdeb Author: Beau Belgrave Date: Tue Mar 28 16:52:17 2023 -0700 tracing/user_events: Charge event allocs to cgroups Operators need a way to limit how much memory cgroups use. User events need to be included into that accounting. Fix this by using GFP_KERNEL_ACCOUNT for allocations generated by user programs for user_event tracing. Link: https://lkml.kernel.org/r/20230328235219.203-11-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 27dc2ae7c8d88a23014a74171b2194f8d47ecca7 Author: Beau Belgrave Date: Tue Mar 28 16:52:16 2023 -0700 tracing/user_events: Update documentation for ABI The ABI for user_events has changed from mmap() based to remote writes. Update the documentation to reflect these changes, add new section for unregistering events since lifetime is now tied to tasks instead of files. Link: https://lkml.kernel.org/r/20230328235219.203-10-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 9211ddaa78261373b50711c84de978cff8e2bd17 Author: Beau Belgrave Date: Tue Mar 28 16:52:15 2023 -0700 tracing/user_events: Use write ABI in example The ABI has changed to use a remote write approach. Update the example to show the expected use of this new ABI. Also remove debugfs path and use tracefs to ensure example works in more environments. Link: https://lkml.kernel.org/r/20230328235219.203-9-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 60b1af8de8c17f0edc86dc55c0bea9be3bb41626 Author: Beau Belgrave Date: Tue Mar 28 16:52:14 2023 -0700 tracing/user_events: Add ABI self-test Add ABI specific self-test to ensure enablements work in various scenarios such as fork, VM_CLONE, and basic event enable/disable. Ensure ABI contracts/limits are also being upheld, such as bit limits and data size limits. Link: https://lkml.kernel.org/r/20230328235219.203-8-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 0d309f04f8089759bed62bf6c8a805b31d725cb8 Author: Beau Belgrave Date: Tue Mar 28 16:52:13 2023 -0700 tracing/user_events: Update self-tests to write ABI ABI has been changed to remote writes, update existing test cases to use this new ABI to ensure existing functionality continues to work. Link: https://lkml.kernel.org/r/20230328235219.203-7-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit dcb8177c13953872c9e5ce4a99b63a87a3c2f683 Author: Beau Belgrave Date: Tue Mar 28 16:52:12 2023 -0700 tracing/user_events: Add ioctl for disabling addresses Enablements are now tracked by the lifetime of the task/mm. User processes need to be able to disable their addresses if tracing is requested to be turned off. Before unmapping the page would suffice. However, we now need a stronger contract. Add an ioctl to enable this. A new flag bit is added, freeing, to user_event_enabler to ensure that if the event is attempted to be removed while a fault is being handled that the remove is delayed until after the fault is reattempted. Link: https://lkml.kernel.org/r/20230328235219.203-6-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 81f8fb65499817a4d1d5d66d9e74a903061ce637 Author: Beau Belgrave Date: Tue Mar 28 16:52:11 2023 -0700 tracing/user_events: Fixup enable faults asyncly When events are enabled within the various tracing facilities, such as ftrace/perf, the event_mutex is held. As events are enabled pages are accessed. We do not want page faults to occur under this lock. Instead queue the fault to a workqueue to be handled in a process context safe way without the lock. The enable address is marked faulting while the async fault-in occurs. This ensures that we don't attempt to fault-in more than is necessary. Once the page has been faulted in, an address write is re-attempted. If the page couldn't fault-in, then we wait until the next time the event is enabled to prevent any potential infinite loops. Link: https://lkml.kernel.org/r/20230328235219.203-5-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 7235759084a4f8524a46bd2638885ff3b34ce279 Author: Beau Belgrave Date: Tue Mar 28 16:52:10 2023 -0700 tracing/user_events: Use remote writes for event enablement As part of the discussions for user_events aligned with user space tracers, it was determined that user programs should register a aligned value to set or clear a bit when an event becomes enabled. Currently a shared page is being used that requires mmap(). Remove the shared page implementation and move to a user registered address implementation. In this new model during the event registration from user programs 3 new values are specified. The first is the address to update when the event is either enabled or disabled. The second is the bit to set/clear to reflect the event being enabled. The third is the size of the value at the specified address. This allows for a local 32/64-bit value in user programs to support both kernel and user tracers. As an example, setting bit 31 for kernel tracers when the event becomes enabled allows for user tracers to use the other bits for ref counts or other flags. The kernel side updates the bit atomically, user programs need to also update these values atomically. User provided addresses must be aligned on a natural boundary, this allows for single page checking and prevents odd behaviors such as a enable value straddling 2 pages instead of a single page. Currently page faults are only logged, future patches will handle these. Link: https://lkml.kernel.org/r/20230328235219.203-4-beaub@linux.microsoft.com Suggested-by: Mathieu Desnoyers Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit fd593511cdfc0b0e38af2eb21c99f5154a1d7acf Author: Beau Belgrave Date: Tue Mar 28 16:52:09 2023 -0700 tracing/user_events: Track fork/exec/exit for mm lifetime During tracefs discussions it was decided instead of requiring a mapping within a user-process to track the lifetime of memory descriptors we should hook the appropriate calls. Do this by adding the minimal stubs required for task fork, exec, and exit. Currently this is just a NOP. Future patches will implement these calls fully. Link: https://lkml.kernel.org/r/20230328235219.203-3-beaub@linux.microsoft.com Suggested-by: Mathieu Desnoyers Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit e5a26a4048eeb9558e5c84f340a989c78db4adf4 Author: Beau Belgrave Date: Tue Mar 28 16:52:08 2023 -0700 tracing/user_events: Split header into uapi and kernel The UAPI parts need to be split out from the kernel parts of user_events now that other parts of the kernel will reference it. Do so by moving the existing include/linux/user_events.h into include/uapi/linux/user_events.h. Link: https://lkml.kernel.org/r/20230328235219.203-2-beaub@linux.microsoft.com Signed-off-by: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit 80a76994b2d88161697bd92b8b6367d9040dbe2a Author: Steven Rostedt (Google) Date: Tue Mar 28 14:51:56 2023 -0400 tracing: Add "fields" option to show raw trace event fields The hex, raw and bin formats come from the old PREEMPT_RT patch set latency tracer. That actually gave real alternatives to reading the ascii buffer. But they have started to bit rot and they do not give a good representation of the tracing data. Add "fields" option that will read the trace event fields and parse the data from how the fields are defined: With "fields" = 0 (default) echo 1 > events/sched/sched_switch/enable cat trace -0 [003] d..2. 540.078653: sched_switch: prev_comm=swapper/3 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=kworker/3:1 next_pid=83 next_prio=120 kworker/3:1-83 [003] d..2. 540.078860: sched_switch: prev_comm=kworker/3:1 prev_pid=83 prev_prio=120 prev_state=I ==> next_comm=swapper/3 next_pid=0 next_prio=120 -0 [003] d..2. 540.206423: sched_switch: prev_comm=swapper/3 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=sshd next_pid=807 next_prio=120 sshd-807 [003] d..2. 540.206531: sched_switch: prev_comm=sshd prev_pid=807 prev_prio=120 prev_state=S ==> next_comm=swapper/3 next_pid=0 next_prio=120 -0 [001] d..2. 540.206597: sched_switch: prev_comm=swapper/1 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=kworker/u16:4 next_pid=58 next_prio=120 kworker/u16:4-58 [001] d..2. 540.206617: sched_switch: prev_comm=kworker/u16:4 prev_pid=58 prev_prio=120 prev_state=I ==> next_comm=bash next_pid=830 next_prio=120 bash-830 [001] d..2. 540.206678: sched_switch: prev_comm=bash prev_pid=830 prev_prio=120 prev_state=R ==> next_comm=kworker/u16:4 next_pid=58 next_prio=120 kworker/u16:4-58 [001] d..2. 540.206696: sched_switch: prev_comm=kworker/u16:4 prev_pid=58 prev_prio=120 prev_state=I ==> next_comm=bash next_pid=830 next_prio=120 bash-830 [001] d..2. 540.206713: sched_switch: prev_comm=bash prev_pid=830 prev_prio=120 prev_state=R ==> next_comm=kworker/u16:4 next_pid=58 next_prio=120 echo 1 > options/fields <...>-998 [002] d..2. 538.643732: sched_switch: next_prio=0x78 (120) next_pid=0x0 (0) next_comm=swapper/2 prev_state=0x20 (32) prev_prio=0x78 (120) prev_pid=0x3e6 (998) prev_comm=trace-cmd -0 [001] d..2. 538.643806: sched_switch: next_prio=0x78 (120) next_pid=0x33e (830) next_comm=bash prev_state=0x0 (0) prev_prio=0x78 (120) prev_pid=0x0 (0) prev_comm=swapper/1 bash-830 [001] d..2. 538.644106: sched_switch: next_prio=0x78 (120) next_pid=0x3a (58) next_comm=kworker/u16:4 prev_state=0x0 (0) prev_prio=0x78 (120) prev_pid=0x33e (830) prev_comm=bash kworker/u16:4-58 [001] d..2. 538.644130: sched_switch: next_prio=0x78 (120) next_pid=0x33e (830) next_comm=bash prev_state=0x80 (128) prev_prio=0x78 (120) prev_pid=0x3a (58) prev_comm=kworker/u16:4 bash-830 [001] d..2. 538.644180: sched_switch: next_prio=0x78 (120) next_pid=0x3a (58) next_comm=kworker/u16:4 prev_state=0x0 (0) prev_prio=0x78 (120) prev_pid=0x33e (830) prev_comm=bash kworker/u16:4-58 [001] d..2. 538.644185: sched_switch: next_prio=0x78 (120) next_pid=0x33e (830) next_comm=bash prev_state=0x80 (128) prev_prio=0x78 (120) prev_pid=0x3a (58) prev_comm=kworker/u16:4 bash-830 [001] d..2. 538.644204: sched_switch: next_prio=0x78 (120) next_pid=0x0 (0) next_comm=swapper/1 prev_state=0x1 (1) prev_prio=0x78 (120) prev_pid=0x33e (830) prev_comm=bash -0 [003] d..2. 538.644211: sched_switch: next_prio=0x78 (120) next_pid=0x327 (807) next_comm=sshd prev_state=0x0 (0) prev_prio=0x78 (120) prev_pid=0x0 (0) prev_comm=swapper/3 sshd-807 [003] d..2. 538.644340: sched_switch: next_prio=0x78 (120) next_pid=0x0 (0) next_comm=swapper/3 prev_state=0x1 (1) prev_prio=0x78 (120) prev_pid=0x327 (807) prev_comm=sshd It traces the data safely without using the trace print formatting. Link: https://lore.kernel.org/linux-trace-kernel/20230328145156.497651be@gandalf.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Beau Belgrave Signed-off-by: Steven Rostedt (Google) commit c2f92e8b2d24615acda3fc571180d8b44a710df5 Author: Ross Zwisler Date: Mon Mar 13 15:17:45 2023 -0600 tools/kvm_stat: use canonical ftrace path The canonical location for the tracefs filesystem is at /sys/kernel/tracing. But, from Documentation/trace/ftrace.rst: Before 4.1, all ftrace tracing control files were within the debugfs file system, which is typically located at /sys/kernel/debug/tracing. For backward compatibility, when mounting the debugfs file system, the tracefs file system will be automatically mounted at: /sys/kernel/debug/tracing A comment in kvm_stat still refers to this older debugfs path, so let's update it to avoid confusion. Link: https://lkml.kernel.org/r/20230313211746.1541525-3-zwisler@kernel.org Cc: "Tobin C. Harding" Cc: Andrew Morton Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Shuah Khan Cc: Tycho Andersen Acked-by: Paolo Bonzini Reviewed-by: Steven Rostedt (Google) Reviewed-by: Mukesh Ojha Signed-off-by: Ross Zwisler Signed-off-by: Steven Rostedt (Google) commit d1c27c55427e3fe54c1bc22bd4d40fc21ff5406c Author: Ross Zwisler Date: Mon Mar 13 15:17:44 2023 -0600 leaking_addresses: also skip canonical ftrace path The canonical location for the tracefs filesystem is at /sys/kernel/tracing. But, from Documentation/trace/ftrace.rst: Before 4.1, all ftrace tracing control files were within the debugfs file system, which is typically located at /sys/kernel/debug/tracing. For backward compatibility, when mounting the debugfs file system, the tracefs file system will be automatically mounted at: /sys/kernel/debug/tracing scripts/leaking_addresses.pl only skipped this older debugfs path, so let's add the canonical path as well. Link: https://lkml.kernel.org/r/20230313211746.1541525-2-zwisler@kernel.org Cc: "Tobin C. Harding" Cc: Andrew Morton Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Shuah Khan Acked-by: Tycho Andersen Reviewed-by: Steven Rostedt (Google) Signed-off-by: Ross Zwisler Signed-off-by: Steven Rostedt (Google) commit 4336cc15b9f7b34bc0ddc85c76f71be6a0355028 Author: Ross Zwisler Date: Mon Mar 13 15:17:43 2023 -0600 selftests: use canonical ftrace path The canonical location for the tracefs filesystem is at /sys/kernel/tracing. But, from Documentation/trace/ftrace.rst: Before 4.1, all ftrace tracing control files were within the debugfs file system, which is typically located at /sys/kernel/debug/tracing. For backward compatibility, when mounting the debugfs file system, the tracefs file system will be automatically mounted at: /sys/kernel/debug/tracing A few spots in tools/testing/selftests still refer to this older debugfs path, so let's update them to avoid confusion. Link: https://lkml.kernel.org/r/20230313211746.1541525-1-zwisler@kernel.org Cc: "Tobin C. Harding" Cc: Andrew Morton Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Shuah Khan Cc: Tycho Andersen Reviewed-by: Steven Rostedt (Google) Reviewed-by: Mukesh Ojha Signed-off-by: Ross Zwisler Signed-off-by: Steven Rostedt (Google) commit 74df43b3f626a3594a4de50556048852bf2753f7 Author: Miquel Raynal Date: Tue Mar 28 17:41:04 2023 +0200 mtd: spi-nor: Enhance locking to support reads while writes On devices featuring several banks, the Read While Write (RWW) feature is here to improve the overall performance when performing parallel reads and writes at different locations (different banks). The following constraints have to be taken into account: 1#: A single operation can be performed in a given bank. 2#: Only a single program or erase operation can happen on the entire chip (common hardware limitation to limit costs) 3#: Reads must remain serialized even though reads crossing bank boundaries are allowed. 4#: The I/O bus is unique and thus is the most constrained resource, all spi-nor operations requiring access to the spi bus (through the spi controller) must be serialized until the bus exchanges are over. So we must ensure a single operation can be "sent" at a time. 5#: Any other operation that would not be either a read or a write or an erase is considered requiring access to the full chip and cannot be parallelized, we then need to ensure the full chip is in the idle state when this occurs. All these constraints can easily be managed with a proper locking model: 1#: Is enforced by a bitfield of the in-use banks, so that only a single operation can happen in a specific bank at any time. 2#: Is handled by the ongoing_pe boolean which is set before any write or erase, and is released only at the very end of the operation. This way, no other destructive operation on the chip can start during this time frame. 3#: An ongoing_rd boolean allows to track the ongoing reads, so that only one can be performed at a time. 4#: An ongoing_io boolean is introduced in order to capture and serialize bus accessed. This is the one being released "sooner" than before, because we only need to protect the chip against other SPI accesses during the I/O phase, which for the destructive operations is the beginning of the operation (when we send the command cycles and possibly the data), while the second part of the operation (the erase delay or the programmation delay) is when we can do something else in another bank. 5#: Is handled by the three booleans presented above, if any of them is set, the chip is not yet ready for the operation and must wait. All these internal variables are protected by the existing lock, so that changes in this structure are atomic. The serialization is handled with a wait queue. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230328154105.448540-8-miquel.raynal@bootlin.com Signed-off-by: Tudor Ambarus commit 4eddee70140b3ae183398b246a609756546c51f1 Author: Miquel Raynal Date: Tue Mar 28 17:41:03 2023 +0200 mtd: spi-nor: Add a RWW flag Introduce a new (no SFDP) flag for the feature that we are about to support: Read While Write. This means, if the chip has several banks and supports RWW, once a page of data to write has been transferred into the chip's internal SRAM, another read operation happening on a different bank can be performed during the tPROG delay. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230328154105.448540-7-miquel.raynal@bootlin.com Signed-off-by: Tudor Ambarus commit e96d4605b024495d42279ae8e899969b29f7ce5f Author: Miquel Raynal Date: Tue Mar 28 17:41:02 2023 +0200 mtd: spi-nor: Prepare the introduction of a new locking mechanism This commit alone just introduces two new "prepare and lock" pairs of helpers which do the exact same thing as before. They will soon be improved in a followup commit which actually brings the logic, but I figured out it was more readable to do it this way. One new pair is suffixed _pe which stands for "program and erase" and hence is being called by spi_nor_write() and spi_nor_erase(). The other pair is suffixed _rd which stands for "read" and hence is being called by spi_nor_read(). One note however, these extra helpers will need to know the operation range, so they come with two new parameters to define it. Otherwise there is no functional change. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230328154105.448540-6-miquel.raynal@bootlin.com Signed-off-by: Tudor Ambarus commit c154dbd28003d8fcc857d88596b2f0383617d1e7 Author: Miquel Raynal Date: Tue Mar 28 17:41:01 2023 +0200 mtd: spi-nor: Separate preparation and locking While this operation will remain a single function call in the end, let's extract the logic of the [un]prepare calls within their own static helper. We will soon add new flavors of the *_[un]prepare_and_[un]lock() helpers, having the preparation logic outside will save us from duplicating code over and over again. There is no functional change. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230328154105.448540-5-miquel.raynal@bootlin.com Signed-off-by: Tudor Ambarus commit 3204634772353ba965ac1f2effa948e32044efbc Author: Miquel Raynal Date: Tue Mar 28 17:41:00 2023 +0200 mtd: spi-nor: Reorder the preparation vs. locking steps The ->prepare()/->unprepare() hooks are now legacy, we no longer accept new drivers supporting them. The only remaining controllers using them acquires a per-chip mutex, which should not interfere with the rest of the operation done in the core. As a result, we should be safe to reorganize these helpers to first perform the preparation, before acquiring the core locks. This is necessary in order to be able to improve the locking mechanism in the core (coming next). No side effects are expected. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20230328154105.448540-4-miquel.raynal@bootlin.com Signed-off-by: Tudor Ambarus commit ccff2cfa1ac347ee91f1b21ee99ca7ecc1d201fc Author: Miquel Raynal Date: Tue Mar 28 17:40:59 2023 +0200 mtd: spi-nor: Add a macro to define more banks Most of the chips on the market only feature a single bank. However, new chips may support more than a single bank, with the possibility to parallelize some operations. Let's introduce an INFOB() macro which also takes a n_bank parameter. Signed-off-by: Miquel Raynal Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20230328154105.448540-3-miquel.raynal@bootlin.com Signed-off-by: Tudor Ambarus commit 9d6c5d64f0288a814d4435b7da39e360a4c39e40 Author: Miquel Raynal Date: Tue Mar 28 17:40:58 2023 +0200 mtd: spi-nor: Introduce the concept of bank SPI NOR chips are made of pages, which gathered in small groups make (erase) sectors. Sectors, gathered together, make banks inside the chip. Until now, there was only one bank per device supported, but we are about to introduce support for new chips featuring several banks (up to 4 so far) where different operations may happen in parallel. Let's allow describing these additional bank parameters, and let's do this independently of any other value (like the number of sectors) with an absolute value. By default we consider that all chips have a single bank. Signed-off-by: Miquel Raynal Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20230328154105.448540-2-miquel.raynal@bootlin.com Signed-off-by: Tudor Ambarus commit 48a6c7bced2a781c911497f073347bec5ab4d7a5 Author: Nipun Gupta Date: Mon Mar 13 18:56:36 2023 +0530 cdx: add device attributes Create sysfs entry for CDX devices. Sysfs entries provided in each of the CDX device detected by the CDX controller - vendor id - device id - remove - reset of the device. - driver override Signed-off-by: Puneet Gupta Signed-off-by: Nipun Gupta Signed-off-by: Tarak Reddy Reviewed-by: Pieter Jansen van Vuuren Tested-by: Nikhil Agarwal Link: https://lore.kernel.org/r/20230313132636.31850-8-nipun.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit 2a226927d9b836ddec674aebbcea311727d04240 Author: Nipun Gupta Date: Mon Mar 13 18:56:35 2023 +0530 cdx: add rpmsg communication channel for CDX RPMsg is used as a transport communication channel. This change introduces RPMsg driver and integrates it with the CDX controller. Signed-off-by: Abhijit Gangurde Signed-off-by: Nipun Gupta Reviewed-by: Pieter Jansen van Vuuren Tested-by: Nikhil Agarwal Link: https://lore.kernel.org/r/20230313132636.31850-7-nipun.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit 8a7923df35d3a0fa44985148cee5b7fde4a370ba Author: Nipun Gupta Date: Mon Mar 13 18:56:34 2023 +0530 cdx: add cdx controller CDX controller uses MCDI interface as a protocol to communicate with the RPU firmware and registers the detected CDX devices on the CDX bus. It also uses RPMsg as the communication channel with the Firmware. Signed-off-by: Nipun Gupta Signed-off-by: Puneet Gupta Signed-off-by: Abhijit Gangurde Signed-off-by: Nikhil Agarwal Reviewed-by: Pieter Jansen van Vuuren Tested-by: Nikhil Agarwal Link: https://lore.kernel.org/r/20230313132636.31850-6-nipun.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit eb96b740192b2a09720aaed8a8c132e6a29d5bdb Author: Nipun Gupta Date: Mon Mar 13 18:56:33 2023 +0530 cdx: add MCDI protocol interface for firmware interaction The MCDI (Management CPU Driver Interface) is used as a protocol to communicate with the RPU firmware. It has pre-defined set of messages for different message exchanges between APU and RPU. Signed-off-by: Puneet Gupta Signed-off-by: Nipun Gupta Signed-off-by: Tarak Reddy Reviewed-by: Pieter Jansen van Vuuren Tested-by: Nikhil Agarwal Link: https://lore.kernel.org/r/20230313132636.31850-5-nipun.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit c47a88e1930fa0f2df8aaa643a5cc86bcf5812bf Author: Nipun Gupta Date: Mon Mar 13 18:56:32 2023 +0530 dt-bindings: bus: add CDX bus controller for versal net Add CDX bus controller device tree bindings for versal-net devices. Signed-off-by: Nipun Gupta Reviewed-by: Rob Herring Reviewed-by: Pieter Jansen van Vuuren Tested-by: Nikhil Agarwal Link: https://lore.kernel.org/r/20230313132636.31850-4-nipun.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit 3f47d3e44df0072c340ce417f6509a7cbd51ef7c Author: Nipun Gupta Date: Mon Mar 13 18:56:31 2023 +0530 iommu: Add iommu probe for CDX bus Add CDX bus to iommu_buses so that IOMMU probe is called for it. Signed-off-by: Nipun Gupta Reviewed-by: Pieter Jansen van Vuuren Reviewed-by: Lu Baolu Tested-by: Nikhil Agarwal Link: https://lore.kernel.org/r/20230313132636.31850-3-nipun.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit 2959ab247061e67485d83b6af8feb3761ec08cb9 Author: Nipun Gupta Date: Mon Mar 13 18:56:30 2023 +0530 cdx: add the cdx bus driver Introduce AMD CDX bus, which provides a mechanism for scanning and probing CDX devices. These devices are memory mapped on system bus for Application Processors(APUs). CDX devices can be changed dynamically in the Fabric and CDX bus interacts with CDX controller to rescan the bus and rediscover the devices. Signed-off-by: Nipun Gupta Reviewed-by: Pieter Jansen van Vuuren Tested-by: Nikhil Agarwal Link: https://lore.kernel.org/r/20230313132636.31850-2-nipun.gupta@amd.com Signed-off-by: Greg Kroah-Hartman commit 06fb4736139fde0e1431fe2a5b4912dcb7588d09 Author: Imran Khan Date: Thu Mar 9 22:09:32 2023 +1100 kernfs: change kernfs_rename_lock into a read-write lock. kernfs_rename_lock protects a node's ->parent and thus kernfs topology. Thus it can be used in cases that rely on a stable kernfs topology. Change it to a read-write lock for better scalability. Suggested by: Al Viro Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Imran Khan Link: https://lore.kernel.org/r/20230309110932.2889010-4-imran.f.khan@oracle.com Signed-off-by: Greg Kroah-Hartman commit c9f2dfb7b59e5a6db054f821a6e1a6db8fa57d64 Author: Imran Khan Date: Thu Mar 9 22:09:31 2023 +1100 kernfs: Use a per-fs rwsem to protect per-fs list of kernfs_super_info. Right now per-fs kernfs_rwsem protects list of kernfs_super_info instances for a kernfs_root. Since kernfs_rwsem is used to synchronize several other operations across kernfs and since most of these operations don't impact kernfs_super_info, we can use a separate per-fs rwsem to synchronize access to list of kernfs_super_info. This helps in reducing contention around kernfs_rwsem and also allows operations that change/access list of kernfs_super_info to proceed without contending for kernfs_rwsem. Signed-off-by: Imran Khan Link: https://lore.kernel.org/r/20230309110932.2889010-3-imran.f.khan@oracle.com Signed-off-by: Greg Kroah-Hartman commit 9caf696142252a466fb89e629d0eddcdced027b0 Author: Imran Khan Date: Thu Mar 9 22:09:30 2023 +1100 kernfs: Introduce separate rwsem to protect inode attributes. Right now a global per-fs rwsem (kernfs_rwsem) synchronizes multiple kernfs operations. On a large system with few hundred CPUs and few hundred applications simultaneoulsy trying to access sysfs, this results in multiple sys_open(s) contending on kernfs_rwsem via kernfs_iop_permission and kernfs_dop_revalidate. For example on a system with 384 cores, if I run 200 instances of an application which is mostly executing the following loop: for (int loop = 0; loop <100 ; loop++) { for (int port_num = 1; port_num < 2; port_num++) { for (int gid_index = 0; gid_index < 254; gid_index++ ) { char ret_buf[64], ret_buf_lo[64]; char gid_file_path[1024]; int ret_len; int ret_fd; ssize_t ret_rd; ub4 i, saved_errno; memset(ret_buf, 0, sizeof(ret_buf)); memset(gid_file_path, 0, sizeof(gid_file_path)); ret_len = snprintf(gid_file_path, sizeof(gid_file_path), "/sys/class/infiniband/%s/ports/%d/gids/%d", dev_name, port_num, gid_index); ret_fd = open(gid_file_path, O_RDONLY | O_CLOEXEC); if (ret_fd < 0) { printf("Failed to open %s\n", gid_file_path); continue; } /* Read the GID */ ret_rd = read(ret_fd, ret_buf, 40); if (ret_rd == -1) { printf("Failed to read from file %s, errno: %u\n", gid_file_path, saved_errno); continue; } close(ret_fd); } } I see contention around kernfs_rwsem as follows: path_openat | |----link_path_walk.part.0.constprop.0 | | | |--49.92%--inode_permission | | | | | --48.69%--kernfs_iop_permission | | | | | |--18.16%--down_read | | | | | |--15.38%--up_read | | | | | --14.58%--_raw_spin_lock | | | | | ----- | | | |--29.08%--walk_component | | | | | --29.02%--lookup_fast | | | | | |--24.26%--kernfs_dop_revalidate | | | | | | | |--14.97%--down_read | | | | | | | --9.01%--up_read | | | | | --4.74%--__d_lookup | | | | | --4.64%--_raw_spin_lock | | | | | ---- Having a separate per-fs rwsem to protect kernfs inode attributes, will avoid the above mentioned contention and result in better performance as can bee seen below: path_openat | |----link_path_walk.part.0.constprop.0 | | | | | |--27.06%--inode_permission | | | | | --25.84%--kernfs_iop_permission | | | | | |--9.29%--up_read | | | | | |--8.19%--down_read | | | | | --7.89%--_raw_spin_lock | | | | | ---- | | | |--22.42%--walk_component | | | | | --22.36%--lookup_fast | | | | | |--16.07%--__d_lookup | | | | | | | --16.01%--_raw_spin_lock | | | | | | | ---- | | | | | --6.28%--kernfs_dop_revalidate | | | | | |--3.76%--down_read | | | | | --2.26%--up_read As can be seen from the above data the overhead due to both kerfs_iop_permission and kernfs_dop_revalidate have gone down and this also reduces overall run time of the earlier mentioned loop. Signed-off-by: Imran Khan Link: https://lore.kernel.org/r/20230309110932.2889010-2-imran.f.khan@oracle.com Signed-off-by: Greg Kroah-Hartman commit 02fe26f25325b547b7a31a65deb0326c04bb5174 Author: Amadeusz Sławiński Date: Fri Mar 17 23:47:29 2023 +0100 firmware_loader: Add debug message with checksum for FW file Enable dynamic-debug logging of firmware filenames and SHA256 checksums to clearly identify the firmware files that are loaded by the system. Example output: [ 34.944619] firmware_class:_request_firmware: i915 0000:00:02.0: Loaded FW: i915/kbl_dmc_ver1_04.bin, sha256: 2cde41c3e5ad181423bcc3e98ff9c49f743c88f18646af4d0b3c3a9664b831a1 [ 48.155884] firmware_class:_request_firmware: snd_soc_avs 0000:00:1f.3: Loaded FW: intel/avs/cnl/dsp_basefw.bin, sha256: 43f6ac1b066e9bd0423d914960fbbdccb391af27d2b1da1085eee3ea8df0f357 [ 49.579540] firmware_class:_request_firmware: snd_soc_avs 0000:00:1f.3: Loaded FW: intel/avs/rt274-tplg.bin, sha256: 4b3580da96dc3d2c443ba20c6728d8b665fceb3ed57223c3a57582bbad8e2413 [ 49.798196] firmware_class:_request_firmware: snd_soc_avs 0000:00:1f.3: Loaded FW: intel/avs/hda-8086280c-tplg.bin, sha256: 5653172579b2be1b51fd69f5cf46e2bac8d63f2a1327924311c13b2f1fe6e601 [ 49.859627] firmware_class:_request_firmware: snd_soc_avs 0000:00:1f.3: Loaded FW: intel/avs/dmic-tplg.bin, sha256: 00fb7fbdb74683333400d7e46925dae60db448b88638efcca0b30215db9df63f Reviewed-by: Cezary Rojewski Reviewed-by: Russ Weight Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20230317224729.1025879-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 67ca1b9346fe255cfe503b967407fd24ec76da37 Author: Heiner Kallweit Date: Fri Mar 17 13:37:05 2023 +0100 soc: amlogic: meson-gx-socinfo: use new soc_device_register functionality to populate machine name A new fallback mechanism has been added to soc_device_register that populates machine with the DT model information if machine isn't set yet. This allows to remove this code here. Signed-off-by: Heiner Kallweit Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/ac3b4356-d4c3-25e4-9bc2-c5b369c676b2@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3f84aa5ec052dba960baca4ab8a352d43d47028e Author: Heiner Kallweit Date: Fri Mar 17 13:36:18 2023 +0100 base: soc: populate machine name in soc_device_register if empty Several SoC drivers use the same of-based mechanism to populate the machine name. Therefore move this to the core and try to populate the machine name in soc_device_register if it's not set yet. Signed-off-by: Heiner Kallweit Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/6dbdf458-9f46-613e-de58-b4a56a6cdd9f@gmail.com Signed-off-by: Greg Kroah-Hartman commit 71d74aaa15b49d2ea6927706ee2a7debc88fe3c2 Author: Tom Rix Date: Mon Mar 20 20:02:03 2023 -0400 misc: alcor_pci: remove unused alcor functions clang with W=1 reports drivers/misc/cardreader/alcor_pci.c:98:20: error: unused function 'alcor_mask_sd_irqs' [-Werror,-Wunused-function] static inline void alcor_mask_sd_irqs(struct alcor_pci_priv *priv) ^ drivers/misc/cardreader/alcor_pci.c:103:20: error: unused function 'alcor_unmask_sd_irqs' [-Werror,-Wunused-function] static inline void alcor_unmask_sd_irqs(struct alcor_pci_priv *priv) ^ drivers/misc/cardreader/alcor_pci.c:111:20: error: unused function 'alcor_mask_ms_irqs' [-Werror,-Wunused-function] static inline void alcor_mask_ms_irqs(struct alcor_pci_priv *priv) ^ drivers/misc/cardreader/alcor_pci.c:116:20: error: unused function 'alcor_unmask_ms_irqs' [-Werror,-Wunused-function] static inline void alcor_unmask_ms_irqs(struct alcor_pci_priv *priv) ^ These functions are not used, so remove them. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230321000203.1730802-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 52a7a5e91f9f63c99632687e85a7531d9ac9a706 Author: Tom Rix Date: Sun Mar 19 13:04:47 2023 -0400 misc: hpilo: remove unused is_device_reset function clang with W=1 reports drivers/misc/hpilo.c:395:19: error: unused function 'is_device_reset' [-Werror,-Wunused-function] static inline int is_device_reset(struct ilo_hwinfo *hw) ^ This function is not used, so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230319170447.1707655-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit fc36ce35e9458589ed7443985d11d044d17c6456 Author: Cai Huoqing Date: Thu Mar 23 19:57:42 2023 +0800 RDMA/usnic: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Link: https://lore.kernel.org/r/20230323115742.13836-1-cai.huoqing@linux.dev Signed-off-by: Leon Romanovsky commit 9e1fb91bcbad7e329a93f66c150e8bb607b418f7 Author: Jan Kara Date: Wed Mar 29 11:45:00 2023 +0200 quota: Use register_sysctl_init() for registering fs_dqstats_table register_sysctl_init() also prints information that may be useful for further debugging when we fail to register sysctl table. Use it when registering fs_dqstats_table. Suggested-by: Luis Chamberlain Signed-off-by: Jan Kara commit 8ace883815a2a9f5ef638807f6133c1720ac325a Author: Tom Rix Date: Sun Mar 26 16:44:59 2023 -0400 reiserfs: remove unused sched_count variable clang with W=1 reports fs/reiserfs/journal.c:3034:6: error: variable 'sched_count' set but not used [-Werror,-Wunused-but-set-variable] int sched_count = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Signed-off-by: Jan Kara Message-Id: <20230326204459.1358553-1-trix@redhat.com> commit a8a9e95243581d4f30295960f968d56a401c0eb1 Author: Daniel Watson Date: Tue Mar 28 17:29:58 2023 -0700 staging: rtl8723bs: conform if's braces to kernel style Move the open brace of if-statements to the same line. This matches the brace placement style described in the kernel's style guide. Signed-off-by: Daniel Watson Link: https://lore.kernel.org/r/ZCOGhkLvLtBEo92Y@trent-reznor Signed-off-by: Greg Kroah-Hartman commit 49f6f6483b652108bcb73accd0204a464b922395 Author: Min Li Date: Tue Mar 28 17:36:27 2023 +0800 drm/i915: fix race condition UAF in i915_perf_add_config_ioctl Userspace can guess the id value and try to race oa_config object creation with config remove, resulting in a use-after-free if we dereference the object after unlocking the metrics_lock. For that reason, unlocking the metrics_lock must be done after we are done dereferencing the object. Signed-off-by: Min Li Fixes: f89823c21224 ("drm/i915/perf: Implement I915_PERF_ADD/REMOVE_CONFIG interface") Cc: # v4.14+ Reviewed-by: Andi Shyti Reviewed-by: Umesh Nerlige Ramappa Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230328093627.5067-1-lm0963hack@gmail.com [tursulin: Manually added stable tag.] commit d30a28a764a8221874ab53b7cbe79f842c30b671 Author: Cristian Ciocaltea Date: Tue Mar 21 23:56:20 2023 +0200 riscv: dts: allwinner: d1: Switch dma-names order for snps,dw-apb-uart nodes Commit 370f696e4474 ("dt-bindings: serial: snps-dw-apb-uart: add dma & dma-names properties") documented dma-names property to handle Allwinner D1 dtbs_check warnings, but relies on the rx->tx ordering, which is the reverse of what a bunch of different boards expect. The initial proposed solution was to allow a flexible dma-names order in the binding, due to potential ABI breakage concerns after fixing the DTS files. But luckily the Allwinner boards are not affected, since they are using a shared DMA channel for rx and tx. Hence, the first step in fixing the inconsistency was to change dma-names order in the binding to tx->rx. Do the same for the snps,dw-apb-uart nodes in the DTS file. Signed-off-by: Cristian Ciocaltea Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230321215624.78383-7-cristian.ciocaltea@collabora.com Signed-off-by: Greg Kroah-Hartman commit 28cbc3a4473fa607e4501112d700585b1ee4ce75 Author: Cristian Ciocaltea Date: Tue Mar 21 23:56:19 2023 +0200 ARM: dts: sunxi: h3/h5: Switch dma-names order for snps,dw-apb-uart nodes Commit 370f696e4474 ("dt-bindings: serial: snps-dw-apb-uart: add dma & dma-names properties") documented dma-names property to handle Allwinner D1 dtbs_check warnings, but relies on the rx->tx ordering, which is the reverse of what a bunch of different boards expect. The initial proposed solution was to allow a flexible dma-names order in the binding, due to potential ABI breakage concerns after fixing the DTS files. But luckily the Allwinner boards are not affected, since they are using a shared DMA channel for rx and tx. Hence, the first step in fixing the inconsistency was to change dma-names order in the binding to tx->rx. Do the same for the snps,dw-apb-uart nodes in the DTS file. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230321215624.78383-6-cristian.ciocaltea@collabora.com Signed-off-by: Greg Kroah-Hartman commit 646a203a661bdb5777dd57fb1abd76fc6ed01bc1 Author: Cristian Ciocaltea Date: Tue Mar 21 23:56:18 2023 +0200 ARM: dts: sun8i: v3s: Switch dma-names order for snps,dw-apb-uart nodes Commit 370f696e4474 ("dt-bindings: serial: snps-dw-apb-uart: add dma & dma-names properties") documented dma-names property to handle Allwinner D1 dtbs_check warnings, but relies on the rx->tx ordering, which is the reverse of what a bunch of different boards expect. The initial proposed solution was to allow a flexible dma-names order in the binding, due to potential ABI breakage concerns after fixing the DTS files. But luckily the Allwinner boards are not affected, since they are using a shared DMA channel for rx and tx. Hence, the first step in fixing the inconsistency was to change dma-names order in the binding to tx->rx. Do the same for the snps,dw-apb-uart nodes in the DTS file. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230321215624.78383-5-cristian.ciocaltea@collabora.com Signed-off-by: Greg Kroah-Hartman commit 0b796ffab3b4fe5eea7b2b613a5710c323a24d44 Author: Cristian Ciocaltea Date: Tue Mar 21 23:56:17 2023 +0200 ARM: dts: sun8i: a23/a33: Switch dma-names order for snps,dw-apb-uart nodes Commit 370f696e4474 ("dt-bindings: serial: snps-dw-apb-uart: add dma & dma-names properties") documented dma-names property to handle Allwinner D1 dtbs_check warnings, but relies on the rx->tx ordering, which is the reverse of what a bunch of different boards expect. The initial proposed solution was to allow a flexible dma-names order in the binding, due to potential ABI breakage concerns after fixing the DTS files. But luckily the Allwinner boards are not affected, since they are using a shared DMA channel for rx and tx. Hence, the first step in fixing the inconsistency was to change dma-names order in the binding to tx->rx. Do the same for the snps,dw-apb-uart nodes in the DTS file. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230321215624.78383-4-cristian.ciocaltea@collabora.com Signed-off-by: Greg Kroah-Hartman commit a4b7c361602fefd1120b58b327aef156768e846a Author: Cristian Ciocaltea Date: Tue Mar 21 23:56:16 2023 +0200 ARM: dts: sun6i: a31: Switch dma-names order for snps,dw-apb-uart nodes Commit 370f696e4474 ("dt-bindings: serial: snps-dw-apb-uart: add dma & dma-names properties") documented dma-names property to handle Allwinner D1 dtbs_check warnings, but relies on the rx->tx ordering, which is the reverse of what a bunch of different boards expect. The initial proposed solution was to allow a flexible dma-names order in the binding, due to potential ABI breakage concerns after fixing the DTS files. But luckily the Allwinner boards are not affected, since they are using a shared DMA channel for rx and tx. Hence, the first step in fixing the inconsistency was to change dma-names order in the binding to tx->rx. Do the same for the snps,dw-apb-uart nodes in the DTS file. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230321215624.78383-3-cristian.ciocaltea@collabora.com Signed-off-by: Greg Kroah-Hartman commit ec956e2c6f4e65c797a7107b32e22484f687f88d Author: Cristian Ciocaltea Date: Tue Mar 21 23:56:15 2023 +0200 dt-bindings: serial: snps-dw-apb-uart: Switch dma-names order Commit 370f696e4474 ("dt-bindings: serial: snps-dw-apb-uart: add dma & dma-names properties") documented dma-names property to handle Allwinner D1 dtbs_check warnings, but relies on the rx->tx ordering, which is the reverse of what a different board expects: rk3326-odroid-go2.dtb: serial@ff030000: dma-names:0: 'rx' was expected A quick and incomplete check shows the inconsistency is present in many other DTS files: $ git grep -A10 snps,dw-apb-uart | grep dma-names | sort -u arch/arm64/boot/dts/rockchip/px30.dtsi- dma-names = "tx", "rx"; arch/arm64/boot/dts/rockchip/rk3328.dtsi- dma-names = "tx", "rx"; arch/arm64/boot/dts/rockchip/rk3588s.dtsi- dma-names = "tx", "rx"; arch/arm/boot/dts/rk3066a.dtsi- dma-names = "tx", "rx"; arch/arm/boot/dts/rk3128.dtsi- dma-names = "tx", "rx"; arch/arm/boot/dts/rk3288.dtsi- dma-names = "tx", "rx"; arch/arm/boot/dts/rv1126.dtsi- dma-names = "tx", "rx"; arch/arm/boot/dts/socfpga.dtsi- dma-names = "tx", "rx"; arch/arm/boot/dts/sun6i-a31.dtsi- dma-names = "rx", "tx"; arch/arm/boot/dts/sun8i-a23-a33.dtsi- dma-names = "rx", "tx"; arch/arm/boot/dts/sun8i-v3s.dtsi- dma-names = "rx", "tx"; arch/arm/boot/dts/sunxi-h3-h5.dtsi- dma-names = "rx", "tx"; arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi- dma-names = "rx", "tx"; The initial proposed solution was to allow a flexible dma-names order in the binding, due to potential ABI breakage concerns after fixing the DTS files. But luckily the Allwinner boards are not really affected, since all of them are using a shared DMA channel for rx and tx: $ git grep -A10 snps,dw-apb-uart | grep 'sun.*dmas' | sort -u arch/arm/boot/dts/sun6i-a31.dtsi- dmas = <&dma 10>, <&dma 10>; arch/arm/boot/dts/sun6i-a31.dtsi- dmas = <&dma 22>, <&dma 22>; arch/arm/boot/dts/sun6i-a31.dtsi- dmas = <&dma 6>, <&dma 6>; arch/arm/boot/dts/sun6i-a31.dtsi- dmas = <&dma 7>, <&dma 7>; arch/arm/boot/dts/sun6i-a31.dtsi- dmas = <&dma 8>, <&dma 8>; arch/arm/boot/dts/sun6i-a31.dtsi- dmas = <&dma 9>, <&dma 9>; arch/arm/boot/dts/sun8i-a23-a33.dtsi- dmas = <&dma 10>, <&dma 10>; arch/arm/boot/dts/sun8i-a23-a33.dtsi- dmas = <&dma 6>, <&dma 6>; arch/arm/boot/dts/sun8i-a23-a33.dtsi- dmas = <&dma 7>, <&dma 7>; arch/arm/boot/dts/sun8i-a23-a33.dtsi- dmas = <&dma 8>, <&dma 8>; arch/arm/boot/dts/sun8i-a23-a33.dtsi- dmas = <&dma 9>, <&dma 9>; arch/arm/boot/dts/sun8i-v3s.dtsi- dmas = <&dma 6>, <&dma 6>; arch/arm/boot/dts/sun8i-v3s.dtsi- dmas = <&dma 7>, <&dma 7>; arch/arm/boot/dts/sun8i-v3s.dtsi- dmas = <&dma 8>, <&dma 8>; arch/arm/boot/dts/sunxi-h3-h5.dtsi- dmas = <&dma 6>, <&dma 6>; arch/arm/boot/dts/sunxi-h3-h5.dtsi- dmas = <&dma 7>, <&dma 7>; arch/arm/boot/dts/sunxi-h3-h5.dtsi- dmas = <&dma 8>, <&dma 8>; arch/arm/boot/dts/sunxi-h3-h5.dtsi- dmas = <&dma 9>, <&dma 9>; arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi- dmas = <&dma 14>, <&dma 14>; arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi- dmas = <&dma 15>, <&dma 15>; arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi- dmas = <&dma 16>, <&dma 16>; arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi- dmas = <&dma 17>, <&dma 17>; arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi- dmas = <&dma 18>, <&dma 18>; arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi- dmas = <&dma 19>, <&dma 19>; Switch dma-names order to tx->rx as the first step in fixing the inconsistency. The remaining DTS fixes will be handled by separate patches. Signed-off-by: Cristian Ciocaltea Reviewed-by: Conor Dooley Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230321215624.78383-2-cristian.ciocaltea@collabora.com Signed-off-by: Greg Kroah-Hartman commit 146a37e05d620cef4ad430e5d1c9c077fe6fa76f Author: Ilpo Järvinen Date: Fri Mar 17 13:33:18 2023 +0200 serial: 8250: Fix serial8250_tx_empty() race with DMA Tx There's a potential race before THRE/TEMT deasserts when DMA Tx is starting up (or the next batch of continuous Tx is being submitted). This can lead to misdetecting Tx empty condition. It is entirely normal for THRE/TEMT to be set for some time after the DMA Tx had been setup in serial8250_tx_dma(). As Tx side is definitely not empty at that point, it seems incorrect for serial8250_tx_empty() claim Tx is empty. Fix the race by also checking in serial8250_tx_empty() whether there's DMA Tx active. Note: This fix only addresses in-kernel race mainly to make using TCSADRAIN/FLUSH robust. Userspace can still cause other races but they seem userspace concurrency control problems. Fixes: 9ee4b83e51f74 ("serial: 8250: Add support for dmaengine") Cc: stable@vger.kernel.org Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230317113318.31327-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 094fb49a2d0d6827c86d2e0840873e6db0c491d2 Author: Ilpo Järvinen Date: Fri Mar 17 13:33:17 2023 +0200 tty: Prevent writing chars during tcsetattr TCSADRAIN/FLUSH If userspace races tcsetattr() with a write, the drained condition might not be guaranteed by the kernel. There is a race window after checking Tx is empty before tty_set_termios() takes termios_rwsem for write. During that race window, more characters can be queued by a racing writer. Any ongoing transmission might produce garbage during HW's ->set_termios() call. The intent of TCSADRAIN/FLUSH seems to be preventing such a character corruption. If those flags are set, take tty's write lock to stop any writer before performing the lower layer Tx empty check and wait for the pending characters to be sent (if any). The initial wait for all-writers-done must be placed outside of tty's write lock to avoid deadlock which makes it impossible to use tty_wait_until_sent(). The write lock is retried if a racing write is detected. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230317113318.31327-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a4312fd4444b289147e21541fe7d4ef62e9b7353 Author: Lukas Bulwahn Date: Thu Mar 23 08:10:53 2023 +0100 serial: sb1250-duart: clean up after SIBYTE_BCM1x55 removal With commit b984d7b56dfc ("MIPS: sibyte: Remove unused config option SIBYTE_BCM1x55"), an #if in the Broadcom SiByte DUART driver can be simplified. Simplify the prepreprocessor condition after config SIBYTE_BCM1x55 removal. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20230323071053.417-1-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 945de8be2f7ff7d4dd578d97307ae650b95de294 Author: Arend van Spriel Date: Wed Mar 22 23:39:56 2023 +0100 serial: bcm63xx-uart: add polling support The tty framework can support polling console to allow operation in situations where interrupts are turned off. Adding polling mode support allows using KGDB over serial console, Signed-off-by: Arend van Spriel Link: https://lore.kernel.org/r/20230322223956.84647-1-arend.vanspriel@broadcom.com Signed-off-by: Greg Kroah-Hartman commit f1d81e3cf0e91bf3455a643b87184c2288cfba8e Author: Biju Das Date: Wed Mar 22 07:47:17 2023 +0000 tty: serial: sh-sci: Remove setting {src,dst}_{addr,addr_width} based on DMA direction The direction field in the DMA config is deprecated. The sh-sci driver sets {src,dst}_{addr,addr_width} based on the DMA direction and it results in dmaengine_slave_config() failure as RZ DMAC driver validates {src,dst}_addr_width values independent of DMA direction. Fix this issue by passing both {src,dst}_{addr,addr_width} values independent of DMA direction. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230322074717.6057-1-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit dedd376e0c7096daf4171d54957a679b4dfeadbf Author: Krzysztof Kozlowski Date: Fri Mar 17 16:57:12 2023 +0100 dt-bindings: serial: snps-dw-apb-uart: correct number of DMAs The "minItems" alone does not impose any upper limit of DMAs, so switch it to "maxItems" which also implies same value for minItems. Fixes: 370f696e4474 ("dt-bindings: serial: snps-dw-apb-uart: add dma & dma-names properties") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230317155712.99654-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit cd74c5e35546362fdb410551fe650e7e3fa2208e Author: Ilpo Järvinen Date: Mon Mar 20 15:50:09 2023 +0200 serial: cpm_uart: Use uart_circ_empty() Use uart_circ_empty() instead of open coding it. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230320135009.47170-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b7313f1d65d668ad0056ca1d93a9017ebb78aeaf Author: Ilpo Järvinen Date: Mon Mar 20 15:50:08 2023 +0200 serial: ucc_uart: Use uart_circ_empty() Use uart_circ_empty() rather than open coding it. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230320135009.47170-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7553574900f37847a25c4d572b13c512811604ed Author: Tom Rix Date: Fri Mar 17 16:57:10 2023 -0400 serial: imx: remove unused imx_uart_is_imx* functions clang with W=1 reports drivers/tty/serial/imx.c:292:19: error: unused function 'imx_uart_is_imx21' [-Werror,-Wunused-function] static inline int imx_uart_is_imx21(struct imx_port *sport) ^ drivers/tty/serial/imx.c:297:19: error: unused function 'imx_uart_is_imx53' [-Werror,-Wunused-function] static inline int imx_uart_is_imx53(struct imx_port *sport) ^ drivers/tty/serial/imx.c:302:19: error: unused function 'imx_uart_is_imx6q' [-Werror,-Wunused-function] static inline int imx_uart_is_imx6q(struct imx_port *sport) ^ These static functions are not used, so remove them. Signed-off-by: Tom Rix Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230317205710.1672232-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 5953ab340df0585d345291ace718548f5e5de942 Author: Lukas Bulwahn Date: Fri Mar 17 08:15:38 2023 +0100 tty: serial: remove obsolete config SERIAL_SAMSUNG_UARTS_4 Commit 1ea35b355722 ("ARM: s3c: remove s3c24xx specific hacks"), allows simplifying the whole config logic for SERIAL_SAMSUNG_UARTS, and did this config simplification. However, it misses that SERIAL_SAMSUNG_UARTS_4's effect was just to control SERIAL_SAMSUNG_UARTS, and with the commit's change, the config SERIAL_SAMSUNG_UARTS_4 has no remaining effect and can be deleted. Remove this obsolete config SERIAL_SAMSUNG_UARTS_4. Signed-off-by: Lukas Bulwahn Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230317071538.29366-1-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman commit d8851a96ba25d5fa2a3d89550f8333db5b694919 Author: Douglas Anderson Date: Thu Mar 16 13:20:57 2023 -0700 tty: serial: qcom-geni-serial: Add a poll_init() function On sc7180 Chromebooks, I did the following: * Didn't enable earlycon in the kernel command line. * Didn't enable serial console in the kernel command line. * Didn't enable an agetty or any other client of "/dev/ttyMSM0". * Added "kgdboc=ttyMSM0" to the kernel command line. After I did that, I tried to enter kdb with this command over an ssh session: echo g > /proc/sysrq-trigger When I did that the system just hung. Although I thought I'd tested this scenario before, I couldn't go back and find a time when it was working. Previous testing must have relied on either the UART acting as the kernel console or an agetty running. It turns out to be pretty easy to fix: we can just use qcom_geni_serial_port_setup() as the .poll_init() function. This, together with the patch ("serial: uart_poll_init() should power on the UART"), allows the debugger to work even if there are no other users of the serial port. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316132027.RESEND.2.Ie678853bb101091afe78cc8c22344bf3ff3aed74@changeid Signed-off-by: Greg Kroah-Hartman commit 5e227ef2aa388f14ceeafa65eb8a38fa37918eb4 Author: Douglas Anderson Date: Thu Mar 16 13:20:56 2023 -0700 serial: uart_poll_init() should power on the UART On Qualcomm devices which use the "geni" serial driver, kdb/kgdb won't be very happy if you use it but the resources of the port haven't been powered on. Today kdb/kgdb rely on someone else powering the port on. This could be the normal kernel console or an agetty running. Let's fix this to explicitly power things on when setting up a polling driver. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316132027.RESEND.1.I106c39498d8094c6f5e7ada42c7db17aa5c64e48@changeid Signed-off-by: Greg Kroah-Hartman commit afe3154ba87e798de87ab65c72d6e3f6cd32d9d1 Author: Daniel Starke Date: Wed Mar 15 11:53:54 2023 +0100 tty: n_gsm: add ioctl for DLC config via ldisc handle The application which initializes the n_gsm ldisc may like to set individual default parameters for each DLCI or take over of the application specific DLCI configuration completely. This is currently not possible. It is either possible to set common default parameters for all DLCIs or let the user application set its DLCI specific configuration parameters. Add support of GSMIOC_GETCONF_DLCI and GSMIOC_SETCONF_DLCI for the n_gsm ldisc handle to support DLCI specific parameter configuration upfront. Add a code example for this use case to the n_gsm documentation. Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20230315105354.6234-3-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman commit 8629745ccc21ba1c20bbb2aead2800cf96643536 Author: Daniel Starke Date: Wed Mar 15 11:53:53 2023 +0100 tty: n_gsm: allow window size configuration n_gsm is based on the 3GPP 07.010 and its newer version is the 3GPP 27.010. See https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1516 The changes from 07.010 to 27.010 are non-functional. Therefore, I refer to the newer 27.010 here. Chapter 6 describes the error recovery mode option which is based on I frames. The k parameter defines the maximum number of I frames that a DLC can have unacknowledged as described in chapter 5.7.4. The current n_gsm implementation does not support the error recovery mode option. However, the k parameter is also part of the parameter negotiation message as described in chapter 5.4.6.3.1. Chapter 5.7.4 also notes that the allowed value range for k is 1-7. That means a 0 is counted as invalid here. This means that the user needs to configure a valid value here even if the function itself is not supported. Otherwise, parameter negotiation may fail. Allow setting of k via ioctl in gsm_config(). Range checks are already included. Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20230315105354.6234-2-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman commit 4ca589661d964840d0d5de4b3baabbef78f453e3 Author: Daniel Starke Date: Wed Mar 15 11:53:52 2023 +0100 tty: n_gsm: add ioctl for DLC specific parameter configuration Parameter negotiation has been introduced with commit 92f1f0c3290d ("tty: n_gsm: add parameter negotiation support") However, means to set individual parameters per DLCI are not yet implemented. Furthermore, it is currently not possible to keep a DLCI half open until the user application sets the right parameters for it. This is required to allow a user application to set its specific parameters before the underlying link is established. Otherwise, the link is opened and re-established right afterwards if the user application sets incompatible parameters. This may be an unexpected behavior for the peer. Add parameter 'wait_config' to 'gsm_config' to support setups where the DLCI specific user application sets its specific parameters after open() and before the link gets fully established. Setting this to zero disables the user application specific DLCI configuration option. Add the ioctls 'GSMIOC_GETCONF_DLCI' and 'GSMIOC_SETCONF_DLCI' for the ldisc and virtual ttys. This gets/sets the DLCI specific parameters and may trigger a reconnect of the DLCI if incompatible values have been set. Only the parameters for the DLCI associated with the virtual tty can be set or retrieved if called on these. Add remark within the documentation to introduce the new ioctls. Link: https://lore.kernel.org/oe-kbuild-all/202302281856.S9Lz4gHB-lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: Daniel Starke Link: https://lore.kernel.org/r/20230315105354.6234-1-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman commit ed4cdfbeb8735c36a2e31009866dfc2dfa26db3f Merge: 8f0293bf7aeb9 ae65a5211d90e Author: Vlastimil Babka Date: Wed Mar 29 10:48:39 2023 +0200 Merge branch 'slab/for-6.4/slob-removal' into slab/for-next A series by myself to remove CONFIG_SLOB: The SLOB allocator was deprecated in 6.2 and there have been no complaints so far so let's proceed with the removal. Besides the code cleanup, the main immediate benefit will be allowing kfree() family of function to work on kmem_cache_alloc() objects, which was incompatible with SLOB. This includes kfree_rcu() which had no kmem_cache_free_rcu() counterpart yet and now it shouldn't be necessary anymore. Otherwise it's all straightforward removal. After this series, 'git grep slob' or 'git grep SLOB' will have 3 remaining relevant hits in non-mm code: - tomoyo - patch submitted and carried there, doesn't need to wait for this series - skbuff - patch to cleanup now-unnecessary #ifdefs will be posted to netdev after this is merged, as requested to avoid conflicts - ftrace ring_buffer - patch to remove obsolete comment is carried there The rest of 'git grep SLOB' hits are false positives, or intentional (CREDITS, and mm/Kconfig SLUB_TINY description to help those that will happen to migrate later). commit 2a6ac65c941dc1c6c00d0f765eec898bcb96fc63 Merge: 94df03a452761 e49eabe3e13f2 Author: Linus Walleij Date: Wed Mar 29 10:47:18 2023 +0200 Merge branch 'ib-qcom-quad-spi' into devel commit e49eabe3e13f295e4f46daa897a0575654789a8c Author: Douglas Anderson Date: Thu Mar 23 10:30:12 2023 -0700 pinctrl: qcom: Support OUTPUT_ENABLE; deprecate INPUT_ENABLE The Qualcomm pinctrl driver has been violating the documented meaning of PIN_CONFIG_INPUT_ENABLE. That documentation says: Note that this does not affect the pin's ability to drive output. ...yet the Qualcomm driver's sole action when asked to "enable input" on a pin is to disable its output. The Qualcomm driver's implementation stems from the fact that "output-disable" is a "new" property from 2017. It was introduced in commit 425562429d4f ("pinctrl: generic: Add output-enable property"). The "input-enable" handling in Qualcomm drivers is from 2015 introduced in commit 407f5e392f9c ("pinctrl: qcom: handle input-enable pinconf property"). Let's change the Qualcomm driver to move us in the right direction. As part of this: 1. We'll now support PIN_CONFIG_OUTPUT_ENABLE 2. We'll still support using PIN_CONFIG_INPUT_ENABLE to disable a pin's output (in violation of the docs) with a big comment in the code. This is needed because old device trees have "input-enable" in them and, in some cases, people might need the old behavior. While we could programmatically change all old device trees, it doesn't really hurt to keep supporting the old behavior and we're _supposed_ to try to be compatible with old device trees anyway. It can also be noted that the PIN_CONFIG_INPUT_ENABLE handling code seems to have purposefully ignored its argument. That means that old boards that had _either_ "input-disable" or "input-enable" in them would have had the effect of disabling a pin's output. While we could change this behavior, since we're only leaving the PIN_CONFIG_INPUT_ENABLE there for backward compatibility we might as well be fully backward compatible. NOTE: despite the fact that we'll still support PIN_CONFIG_INPUT_ENABLE for _setting_ config, we take it away from msm_config_group_get(). This appears to be only used for populating debugfs and fixing debugfs to "output enabled" where relevant instead of "input enabled" makes more sense and has more truthiness. Signed-off-by: Douglas Anderson Reviewed-by: Bjorn Andersson Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20230323102605.8.Id740ae6a993f9313b58add6b10f6a92795d510d4@changeid Signed-off-by: Linus Walleij commit 988a9eab4d9a0eb07339b9d3f2bc9bee66af47b1 Author: Douglas Anderson Date: Thu Mar 23 10:30:11 2023 -0700 dt-bindings: pinctrl: qcom: Add output-enable In the patch ("dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable") we allowed setting "output-disable" for TLMM pinctrl states. Let's also add "output-enable". At first blush this seems a needless thing to do. Specifically: - In Linux (and presumably any other OSes using the same device trees) the GPIO/pinctrl driver knows to automatically enable the output when a GPIO is changed to an output. Thus in most cases specifying "output-enable" is superfluous and should be avoided. - If we need to set a pin's default state we already have "output-high" and "output-low" and these properties already imply "output-enabled" (at least on the Linux Qualcomm TLMM driver). However, there is one instance where "output-enable" seems like it could be useful: sleep states. It's not uncommon to want to configure pins as inputs (with appropriate pulls) when the driver controlling them is in a low power state. Then we want the pins back to outputs when the driver wants things running normally. To accomplish this we'd want to be able to use "output-enable". Then the "default" state could have "output-enable" and the "sleep" state could have "output-disable". NOTE: in all instances I'm aware of, we'd only want to use "output-enable" on pins that are configured as "gpio". The Qualcomm documentation that I have access to says that "output-enable" only does something useful when in GPIO mode. Signed-off-by: Douglas Anderson Reviewed-by: Krzysztof Kozlowski Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20230323102605.7.I7874c00092115c45377c2a06f7f133356956686e@changeid Signed-off-by: Linus Walleij commit c4a48b0df8bfcf45256e8690f959a5af39c20ce7 Author: Douglas Anderson Date: Thu Mar 23 10:30:10 2023 -0700 dt-bindings: pinctrl: qcom: tlmm should use output-disable, not input-enable As evidenced by the Qualcomm TLMM Linux driver, the TLMM IP block in Qualcomm SoCs has a bit to enable/disable the output for a pin that's configured as a GPIO but _not_ a bit to enable/disable an input buffer. Current device trees that are specifying "input-enable" for pins managed by TLMM are either doing so needlessly or are using it to mean "output-disable". Presumably the current convention of using "input-enable" to mean "output-disable" stems from the fact that "output-disable" is a "new" property from 2017. It was introduced in commit 425562429d4f ("pinctrl: generic: Add output-enable property"). The "input-enable" handling in Qualcomm drivers is from 2015 introduced in commit 407f5e392f9c ("pinctrl: qcom: handle input-enable pinconf property"). Given that there's no other use for "input-enable" for TLMM, we can still handle old device trees in code, but let's encourage people to move to the proper / documented property by updating the bindings. Signed-off-by: Douglas Anderson Reviewed-by: Krzysztof Kozlowski Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20230323102605.6.I291ce0ba2c6ea80b341659c4f75a567a76dd7ca6@changeid Signed-off-by: Linus Walleij commit 8f0293bf7aeb9339f724e306e7a0a741f633c738 Merge: 197b6b60ae7bc 220a20ad14029 Author: Vlastimil Babka Date: Wed Mar 29 10:45:38 2023 +0200 Merge branch 'slab/for-6.4/trivial' into slab/for-next Trivial slab and slub fixes for 6.4. A comment fix, a structure constification, and a config SLUB_DEBUG help text fix. commit cb95de8d4317b9335f1e8b687bca714cd5713502 Author: Rob Herring Date: Mon Mar 27 12:01:36 2023 -0500 dt-bindings: serial: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230327170137.4104272-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2b76ffe81e32afd6d318dc4547e2ba8c46207b77 Author: Randy Dunlap Date: Tue Mar 28 19:15:29 2023 -0700 linux/vt_buffer.h: allow either builtin or modular for macros Fix build errors on ARCH=alpha when CONFIG_MDA_CONSOLE=m. This allows the ARCH macros to be the only ones defined. In file included from ../drivers/video/console/mdacon.c:37: ../arch/alpha/include/asm/vga.h:17:40: error: expected identifier or '(' before 'volatile' 17 | static inline void scr_writew(u16 val, volatile u16 *addr) | ^~~~~~~~ ../include/linux/vt_buffer.h:24:34: note: in definition of macro 'scr_writew' 24 | #define scr_writew(val, addr) (*(addr) = (val)) | ^~~~ ../include/linux/vt_buffer.h:24:40: error: expected ')' before '=' token 24 | #define scr_writew(val, addr) (*(addr) = (val)) | ^ ../arch/alpha/include/asm/vga.h:17:20: note: in expansion of macro 'scr_writew' 17 | static inline void scr_writew(u16 val, volatile u16 *addr) | ^~~~~~~~~~ ../arch/alpha/include/asm/vga.h:25:29: error: expected identifier or '(' before 'volatile' 25 | static inline u16 scr_readw(volatile const u16 *addr) | ^~~~~~~~ Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Link: https://lore.kernel.org/r/20230329021529.16188-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit ae65a5211d90e54ae604012ce9cf234c48780929 Author: Vlastimil Babka Date: Thu Mar 2 16:01:00 2023 +0100 mm/slab: document kfree() as allowed for kmem_cache_alloc() objects This will make it easier to free objects in situations when they can come from either kmalloc() or kmem_cache_alloc(), and also allow kfree_rcu() for freeing objects from kmem_cache_alloc(). For the SLAB and SLUB allocators this was always possible so with SLOB gone, we can document it as supported. Signed-off-by: Vlastimil Babka Reviewed-by: Mike Rapoport (IBM) Cc: Jonathan Corbet Cc: "Paul E. McKenney" Cc: Frederic Weisbecker Cc: Neeraj Upadhyay Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: Joel Fernandes commit 6630e950d532ffabce3a4bdbac7be844bad193fe Author: Vlastimil Babka Date: Tue Feb 28 15:38:07 2023 +0100 mm/slob: remove slob.c Remove the SLOB implementation. RIP SLOB allocator (2006 - 2023) Signed-off-by: Vlastimil Babka Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Lorenzo Stoakes Acked-by: Roman Gushchin Acked-by: Mike Rapoport (IBM) commit d629c0e221cd99198b843d8351a0a9bfec6c0423 Author: Lukas Bulwahn Date: Wed Mar 29 09:51:25 2023 +0200 usb: move config USB_USS720 to usb's misc Kconfig The USS720 parport driver source code is in drivers/usb/misc/, the corresponding config is defined in drivers/usb/Kconfig. Some digging in the kernel's history revealed no good reason why it needs to be defined in USB's top-level Kconfig file, and why the config for the USS720 parport driver should be the first in the list of USB port drivers, while all other configs for drivers in drivers/usb/misc are in the USB Miscellaneous driver configuration file. Most probably, it was simply considered a bit more special when the USB Miscellaneous driver configuration file (drivers/usb/misc/Config.in back then) was initially created, and this config simply survived to remain at the top-level USB Kconfig file with all further code/Kconfig transformations and additions later on. Users rarely notice this config being at this position, as CONFIG_PARPORT (Parallel port support) needs to be enabled and only few users enable that. Nowadays, this USB_USS720 driver is probably not that special that it needs to be listed as first item of the USB port drivers. Move the configuration of the USS720 parport driver to the top of the USB Miscellaneous drivers section, as the configurations does not have a lot of specific ordering USB Miscellaneous drivers. This way, the USS720 parport driver is moved to the comment "USB Miscellaneous drivers", fitting to the driver's source code location, but still is at the top of the list for those few acquainted users of Kconfig UIs that might be looking for the config that was once at the top of the list of the USB port drivers. Put this config definition to a more local place. No semantic change. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20230329075125.32352-1-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman commit de4d6089b9271ed172e92148a04f31578b375525 Author: Vlastimil Babka Date: Tue Feb 28 15:34:17 2023 +0100 mm/slab: remove CONFIG_SLOB code from slab common code CONFIG_SLOB has been removed from Kconfig. Remove code and #ifdef's specific to SLOB in the slab headers and common code. Signed-off-by: Vlastimil Babka Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Lorenzo Stoakes Acked-by: Mike Rapoport (IBM) commit d88e2a2bd20562048a263ca6a0f939c2695ffb2e Author: Vlastimil Babka Date: Tue Feb 28 11:07:44 2023 +0100 mm, pagemap: remove SLOB and SLQB from comments and documentation SLOB has been removed and SLQB never merged, so remove their mentions from comments and documentation of pagemap. In stable_page_flags() also correct an outdated comment mentioning that PageBuddy() means a page->_refcount of -1, and remove compound_head() from the PageSlab() call, as that's already implicitly there thanks to PF_NO_TAIL. Signed-off-by: Vlastimil Babka Acked-by: Lorenzo Stoakes Acked-by: Mike Rapoport (IBM) commit c4ba69f00c18524eb89990e9afda9d2a9b54de2f Author: Vlastimil Babka Date: Tue Feb 28 10:59:54 2023 +0100 mm, page_flags: remove PG_slob_free With SLOB removed we no longer need the PG_slob_free alias for PG_private. Also update tools/mm/page-types. Signed-off-by: Vlastimil Babka Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Lorenzo Stoakes Acked-by: Mike Rapoport (IBM) commit c9929f0e344a28b3a57b3b84fc237a7dd4134ef8 Author: Vlastimil Babka Date: Mon Feb 27 17:46:13 2023 +0100 mm/slob: remove CONFIG_SLOB Remove SLOB from Kconfig and Makefile. Everything under #ifdef CONFIG_SLOB, and mm/slob.c is now dead code. Signed-off-by: Vlastimil Babka Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Lorenzo Stoakes Acked-by: Mike Rapoport (IBM) commit 0a1af6dfa0772ffedaef422127f1338fa0ddfed3 Author: Elson Roy Serrao Date: Fri Mar 24 14:48:02 2023 -0700 usb: gadget: f_ecm: Add suspend/resume and remote wakeup support When host sends suspend notification to the device, handle the suspend callbacks in the function driver. Depending on the remote wakeup capability the device can either trigger a remote wakeup or wait for the host initiated resume to resume data transfer. Signed-off-by: Elson Roy Serrao Reviewed-by: Thinh Nguyen Link: https://lore.kernel.org/r/1679694482-16430-7-git-send-email-quic_eserrao@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 481c225c4802be62e52aabddae5338ed1705b232 Author: Elson Roy Serrao Date: Fri Mar 24 14:48:01 2023 -0700 usb: gadget: Handle function suspend feature selector When host sends function suspend feature selector to the device, inspect the received packet and trigger function suspend or function resume accordingly. Inspect the remote wakeup bit and arm the function for remote wakeup if it is wakeup capable. Also host queries the function wakeup capability through a get status request before sending function resume. Handle such requests in composite layer. Signed-off-by: Elson Roy Serrao Reviewed-by: Thinh Nguyen Link: https://lore.kernel.org/r/1679694482-16430-6-git-send-email-quic_eserrao@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 92c08a84b53e5dd1f2150e870db2ae9e5a5459e1 Author: Elson Roy Serrao Date: Fri Mar 24 14:48:00 2023 -0700 usb: dwc3: Add function suspend and function wakeup support USB host sends function suspend and function resume notifications to the interface through SET_FEATURE/CLEAR_FEATURE setup packets. Add support to handle these packets by delegating the requests to composite layer. Also add support to handle function wake notification requests to exit from function suspend state. Acked-by: Thinh Nguyen Signed-off-by: Elson Roy Serrao Link: https://lore.kernel.org/r/1679694482-16430-5-git-send-email-quic_eserrao@quicinc.com Signed-off-by: Greg Kroah-Hartman commit f0db885fb05d35befa81896db6b19eb3ee9ccdfe Author: Elson Roy Serrao Date: Fri Mar 24 14:47:59 2023 -0700 usb: gadget: Add function wakeup support USB3.2 spec section 9.2.5.4 quotes that a function may signal that it wants to exit from Function Suspend by sending a Function Wake Notification to the host if it is enabled for function remote wakeup. Add an api in composite layer that can be used by the function drivers to support this feature. Also expose a gadget op so that composite layer can trigger a wakeup request to the UDC driver. Reviewed-by: Thinh Nguyen Signed-off-by: Elson Roy Serrao Link: https://lore.kernel.org/r/1679694482-16430-4-git-send-email-quic_eserrao@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 047161686b813ae9035a3fb342ba8b6932053492 Author: Elson Roy Serrao Date: Fri Mar 24 14:47:58 2023 -0700 usb: dwc3: Add remote wakeup handling An usb device can initate a remote wakeup and bring the link out of suspend as dictated by the DEVICE_REMOTE_WAKEUP feature selector. Add support to handle this packet and set the remote wakeup capability. Some hosts may take longer time to initiate the resume signaling after device triggers a remote wakeup. So add async support to the wakeup API by enabling link status change events. Acked-by: Thinh Nguyen Signed-off-by: Elson Roy Serrao Link: https://lore.kernel.org/r/1679694482-16430-3-git-send-email-quic_eserrao@quicinc.com Signed-off-by: Greg Kroah-Hartman commit b93c2a68f3d9dc98ec30dcb342ae47c1c8d09d18 Author: Elson Roy Serrao Date: Fri Mar 24 14:47:57 2023 -0700 usb: gadget: Properly configure the device for remote wakeup The wakeup bit in the bmAttributes field indicates whether the device is configured for remote wakeup. But this field should be allowed to set only if the UDC supports such wakeup mechanism. So configure this field based on UDC capability. Also inform the UDC whether the device is configured for remote wakeup by implementing a gadget op. Reviewed-by: Thinh Nguyen Signed-off-by: Elson Roy Serrao Link: https://lore.kernel.org/r/1679694482-16430-2-git-send-email-quic_eserrao@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 79e94aa19736ec8f38ec02880eeec37cc5900bd8 Author: Peng Fan Date: Wed Mar 22 13:25:04 2023 +0800 ARM64: dts: imx7ulp: update usb compatible Per binding doc, update the compatible Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20230322052504.2629429-11-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 6304876355fb6ac60fef306fff6da71bb08401b7 Author: Peng Fan Date: Wed Mar 22 13:25:02 2023 +0800 arm64: dts: imx8dxl: drop #stream-id-cells for usb node There is no SMMU in i.MX8DXL, drop #stream-id-cells which is for SMMU-v2. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20230322052504.2629429-9-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 2656e9f5119f8dfb9796e4ba11082ffe49d8cecc Author: Peng Fan Date: Wed Mar 22 13:25:01 2023 +0800 arm64: dts: imx8dxl: update usb compatible Update usb compatible per binding doc Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20230322052504.2629429-8-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 276dd9a66e7157a0f317a7a59bf9fbe8ec0cd3d0 Author: Peng Fan Date: Wed Mar 22 13:25:00 2023 +0800 arm64: dts: imx8: update usb compatible Update usb compatible per binding doc Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20230322052504.2629429-7-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 69fef68e4c8f5f80539b6a7d4f76af0de0732da3 Author: Peng Fan Date: Wed Mar 22 13:24:59 2023 +0800 arm64: dts: imx8mm: update usb compatible Update usb compatible per binding doc Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20230322052504.2629429-6-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 835765da87d8d07db20218a5676bb5b3d9f2e7c6 Author: Peng Fan Date: Wed Mar 22 13:24:58 2023 +0800 arm64: dts: imx8mn: update usb compatible Update usb compatible per binding doc Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20230322052504.2629429-5-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 64de129680a45a25b822bd0bf4c4aeb62f1b9c2f Author: Peng Fan Date: Wed Mar 22 13:24:57 2023 +0800 dt-bindings: usb: usb-nop-xceiv: add power-domains property Add power-domains optional property Acked-by: Rob Herring Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20230322052504.2629429-4-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 4c8375d35f72f2daef1ac0c35831c43a36357d81 Author: Peng Fan Date: Wed Mar 22 13:24:56 2023 +0800 dt-bindings: usb: ci-hdrc-usb2: convert to DT schema format Convert the binding to DT schema format. To fix the dtbs_check error, some properties were also added, such as nvidia,phy, reset-names ulpi; missing compatibles are added. Signed-off-by: Peng Fan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230322052504.2629429-3-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 580f4ea2cd1666bac76a67167d0901536e93c58c Author: Peng Fan Date: Wed Mar 22 13:24:55 2023 +0800 dt-bindings: usb: usbmisc-imx: convert to DT schema Convert usbmisc-imx to DT schema format, add missing compatibles Reviewed-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20230322052504.2629429-2-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 3b064f541be822dc095991c6dda20a75eb51db5e Author: Hao Lan Date: Mon Mar 27 21:55:04 2023 +0800 net: hns3: support wake on lan configuration and query The HNS3 driver supports Wake-on-LAN, which can wake up the server from power off state to power on state by magic packet or magic security packet. ChangeLog: v1->v2: Deleted the debugfs function that overlaps with the ethtool function from suggestion of Andrew Lunn. v2->v3: Return the wol configuration stored in driver, suggested by Alexander H Duyck. v3->v4: Add a helper to go from netdev to the local struct, suggested by Simon Horman and Jakub Kicinski. Reviewed-by: Simon Horman Signed-off-by: Hao Lan Signed-off-by: David S. Miller commit ea1deabc6f11575eb3375b454457eaa3c9837abc Author: Stanislav Lisovskiy Date: Mon Mar 27 09:42:17 2023 +0300 drm/i915: Use compressed bpp when calculating m/n value for DP MST DSC For obvious reasons, we use compressed bpp instead of pipe bpp for DSC DP SST case. Lets be consistent and use compressed bpp instead of pipe bpp, also in DP MST DSC case. Signed-off-by: Stanislav Lisovskiy Reviewed-by: Vinod Govindapillai Fixes: d51f25eb479a ("drm/i915: Add DSC support to MST path") Link: https://patchwork.freedesktop.org/patch/msgid/20230327064217.24033-1-stanislav.lisovskiy@intel.com commit be435af51f7feef836429eab7cb7fd91d54789fb Merge: 37018b5a29103 17654d84b47c6 Author: David S. Miller Date: Wed Mar 29 09:06:09 2023 +0100 Merge branch 'sfc-tc-decap-support' Edward Cree says: ==================== sfc: support TC decap rules This series adds support for offloading tunnel decapsulation TC rules to ef100 NICs, allowing matching encapsulated packets to be decapsulated in hardware and redirected to VFs. For now an encap match must be on precisely the following fields: ethertype (IPv4 or IPv6), source IP, destination IP, ipproto UDP, UDP destination port. This simplifies checking for overlaps in the driver; the hardware supports a wider range of match fields which future driver work may expose. ==================== Signed-off-by: David S. Miller commit 17654d84b47c69ca788fea7afbdb275504e4c6dc Author: Edward Cree Date: Mon Mar 27 11:36:08 2023 +0100 sfc: add offloading of 'foreign' TC (decap) rules A 'foreign' rule is one for which the net_dev is not the sfc netdevice or any of its representors. The driver registers indirect flow blocks for tunnel netdevs so that it can offload decap rules. For example: tc filter add dev vxlan0 parent ffff: protocol ipv4 flower \ enc_src_ip 10.1.0.2 enc_dst_ip 10.1.0.1 \ enc_key_id 1000 enc_dst_port 4789 \ action tunnel_key unset \ action mirred egress redirect dev $REPRESENTOR When notified of a rule like this, register an encap match on the IP and dport tuple (creating an Outer Rule table entry) and insert an MAE action rule to perform the decapsulation and deliver to the representee. Moved efx_tc_delete_rule() below efx_tc_flower_release_encap_match() to avoid the need for a forward declaration. Signed-off-by: Edward Cree Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 746224cdef013e2a7a4b83fa52881c5482f0c47d Author: Edward Cree Date: Mon Mar 27 11:36:07 2023 +0100 sfc: add code to register and unregister encap matches Add a hashtable to detect duplicate and conflicting matches. If match is not a duplicate, call MAE functions to add/remove it from OR table. Calling code not added yet, so mark the new functions as unused. Signed-off-by: Edward Cree Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 2245eb0086d81e54dfc6492f649059465ebbed79 Author: Edward Cree Date: Mon Mar 27 11:36:06 2023 +0100 sfc: add functions to insert encap matches into the MAE An encap match corresponds to an entry in the exact-match Outer Rule table; the lookup response includes the encap type (protocol) allowing the hardware to continue parsing into the inner headers. Signed-off-by: Edward Cree Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit b7f5e17b3bb96165979f55f2821190a77f984d0e Author: Edward Cree Date: Mon Mar 27 11:36:05 2023 +0100 sfc: handle enc keys in efx_tc_flower_parse_match() Translate the fields from flow dissector into struct efx_tc_match. In efx_tc_flower_replace(), reject filters that match on them, because only 'foreign' filters (i.e. those for which the ingress dev is not the sfc netdev or any of its representors, e.g. a tunnel netdev) can use them. Signed-off-by: Edward Cree Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit b9d5c9b7d8a47ca4af5e32f576265c388a467af5 Author: Edward Cree Date: Mon Mar 27 11:36:04 2023 +0100 sfc: add notion of match on enc keys to MAE machinery Extend the MAE caps check to validate that the hardware supports these outer-header matches where used by the driver. Extend efx_mae_populate_match_criteria() to fill in the outer rule ID and VNI match fields. Nothing yet populates these match fields, nor creates outer rules. Signed-off-by: Edward Cree Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit edd025ca088719770c77a27266bf03f2f39ce83d Author: Edward Cree Date: Mon Mar 27 11:36:03 2023 +0100 sfc: document TC-to-EF100-MAE action translation concepts Includes an explanation of the lifetime of the 'cursor' action-set `act`. Signed-off-by: Edward Cree Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 5d88366807fce55ab5bd1bf94055e1d1d0032604 Author: Andy Shevchenko Date: Mon Mar 27 20:20:17 2023 +0300 thunderbolt: Make use of SI units from units.h In a couple of places it seems reasonable to use MEGA intead of explicit number. It makes code more readable and robust. Signed-off-by: Andy Shevchenko Signed-off-by: Mika Westerberg commit 4e99c98e3071bd7fd4d7f20440f1a5c3bf533149 Author: Andy Shevchenko Date: Mon Mar 27 20:20:16 2023 +0300 thunderbolt: 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 Signed-off-by: Mika Westerberg commit 37018b5a291032b8c8c9f5e1b6292fff75cd9329 Merge: 6fc5f5bcc0c34 954d1fa1ac93a Author: David S. Miller Date: Wed Mar 29 09:03:33 2023 +0100 Merge branch 'macvlan-broadcast-queue-bypass' Herbert Xu says: ==================== macvlan: Allow some packets to bypass broadcast queue This patch series allows some packets to bypass the broadcast queue on receive. Currently all multicast packets are queued on receive and then processed in a work queue. This is to avoid an unbounded amount of work occurring in the receive path, as one broadcast packet could easily translate into 4,000 packets. However, for multicast packets with just one receiver (possible for IPv6 ND), this introduces unnecessary latency as the packet will go to exactly one device. This series allows such multicast packets to be processed inline. It also adds a toggle which lets the admin control what threshold to set between queueing and not queueing. A follow-up patch for iproute will be posted. ==================== Signed-off-by: David S. Miller commit 954d1fa1ac93aa8a66f7d9a9ba545cf7f020d348 Author: Herbert Xu Date: Tue Mar 28 10:57:59 2023 +0800 macvlan: Add netlink attribute for broadcast cutoff Make the broadcast cutoff configurable through netlink. Note that macvlan is weird because there is no central device for us to configure (the lowerdev could be anything). So all the options are duplicated over what could be thousands of child devices. IFLA_MACVLAN_BC_QUEUE_LEN took the approach of taking the maximum of all child device settings. This is unnecessary as we could simply store the option in the port device and take the last child device that gets updated as the value to use. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit d45276e75e90f1b67eb689fb3b4c556963796351 Author: Herbert Xu Date: Tue Mar 28 10:57:56 2023 +0800 macvlan: Skip broadcast queue if multicast with single receiver As it stands all broadcast and multicast packets are queued and processed in a work queue. This is so that we don't overwhelm the receive softirq path by generating thousands of packets or more (see commit 412ca1550cbe "macvlan: Move broadcasts into a work queue"). As such all multicast packets will be delayed, even if they will be received by a single macvlan device. As using a workqueue is not free in terms of latency, we should avoid this where possible. This patch adds a new filter to determine which addresses should be delayed and which ones won't. This is done using a crude counter of how many times an address has been added to the macvlan port (ha->synced). For now if an address has been added more than once, then it will be considered to be broadcast. This could be tuned further by making this threshold configurable. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 6fc5f5bcc0c34138d955a51642f1c4fbb353f0af Merge: 9380d89104ead 9095ce97bf8a4 Author: David S. Miller Date: Wed Mar 29 09:01:28 2023 +0100 Merge branch 'mptcp-cleanups' Matthieu Baerts says: ==================== mptcp: a couple of cleanups and improvements Patch 1 removes an unneeded address copy in subflow_syn_recv_sock(). Patch 2 simplifies subflow_syn_recv_sock() to postpone some actions and to avoid a bunch of conditionals. Patch 3 stops reporting limits that are not taken into account when the userspace PM is used. Patch 4 adds a new test to validate that the 'subflows' field reported by the kernel is correct. Such info can be retrieved via Netlink (e.g. with ss) or getsockopt(SOL_MPTCP, MPTCP_INFO). --- Changes in v2: - Patch 3/4's commit message has been updated to use the correct SHA - Rebased on latest net-next - Link to v1: https://lore.kernel.org/r/20230324-upstream-net-next-20230324-misc-features-v1-0-5a29154592bd@tessares.net ==================== Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 9095ce97bf8a4f5123dc9dbfd1cabcf2a78f5883 Author: Geliang Tang Date: Mon Mar 27 12:22:24 2023 +0200 selftests: mptcp: add mptcp_info tests This patch adds the mptcp_info fields tests in endpoint_tests(). Add a new function chk_mptcp_info() to check the given number of the given mptcp_info field. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/330 Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit e925a0322ada48a3bfdfaf37be46945af3ad6e2e Author: Matthieu Baerts Date: Mon Mar 27 12:22:23 2023 +0200 mptcp: do not fill info not used by the PM in used Only the in-kernel PM uses the number of address and subflow limits allowed per connection. It then makes more sense not to display such info when other PMs are used not to confuse the userspace by showing limits not being used. While at it, we can get rid of the "val" variable and add indentations instead. It would have been good to have done this modification directly in commit 4d25247d3ae4 ("mptcp: bypass in-kernel PM restrictions for non-kernel PMs") but as we change a bit the behaviour, it is fine not to backport it to stable. Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit a88d0092b24b8cddce57fe0e88e60a9e29e0b515 Author: Paolo Abeni Date: Mon Mar 27 12:22:22 2023 +0200 mptcp: simplify subflow_syn_recv_sock() Postpone the msk cloning to the child process creation so that we can avoid a bunch of conditionals. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/61 Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 2bb9a37f0e194ed95c70603b0efc7898a5a0d9b4 Author: Paolo Abeni Date: Mon Mar 27 12:22:21 2023 +0200 mptcp: avoid unneeded address copy In the syn_recv fallback path, the msk is unused. We can skip setting the socket address. Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 9380d89104ead5d03a0977ce0b9226a6e94a8911 Merge: 5a8c8b72f65f6 be689c719eb61 Author: David S. Miller Date: Wed Mar 29 08:22:52 2023 +0100 Merge branch 'in6addr_any-cleanups' Kuniyuki Iwashima says: ==================== ipv6: Random cleanup for in6addr_any. The first patch removes in6addr_any alternatives and the second removes redundant initialisation of a local variable. Changes: v2: Use ipv6_addr_any() in patch 1. (David Ahern) v1: https://lore.kernel.org/netdev/20230322012204.33157-1-kuniyu@amazon.com/ ==================== Signed-off-by: David S. Miller commit be689c719eb6153b0fbd83536ae656dca8981f12 Author: Kuniyuki Iwashima Date: Mon Mar 27 16:54:55 2023 -0700 6lowpan: Remove redundant initialisation. We'll call memset(&tmp, 0, sizeof(tmp)) later. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller commit 8cdc3223e78c43e1b60ea1c536a103e32fdca3c5 Author: Kuniyuki Iwashima Date: Mon Mar 27 16:54:54 2023 -0700 ipv6: Remove in6addr_any alternatives. Some code defines the IPv6 wildcard address as a local variable and use it with memcmp() or ipv6_addr_equal(). Let's use in6addr_any and ipv6_addr_any() instead. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Mark Bloch Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 5a8c8b72f65f6b80b52b21a207a4ddc3011d6440 Merge: 24265c2c91ad6 d61bd8c1fd02c Author: David S. Miller Date: Wed Mar 29 08:19:38 2023 +0100 Merge branch 'vsock-sockmap-support' Bobby Eshleman says: ==================== Add support for sockmap to vsock. We're testing usage of vsock as a way to redirect guest-local UDS requests to the host and this patch series greatly improves the performance of such a setup. Compared to copying packets via userspace, this improves throughput by 121% in basic testing. Tested as follows. Setup: guest unix dgram sender -> guest vsock redirector -> host vsock server Threads: 1 Payload: 64k No sockmap: - 76.3 MB/s - The guest vsock redirector was "socat VSOCK-CONNECT:2:1234 UNIX-RECV:/path/to/sock" Using sockmap (this patch): - 168.8 MB/s (+121%) - The guest redirector was a simple sockmap echo server, redirecting unix ingress to vsock 2:1234 egress. - Same sender and server programs *Note: these numbers are from RFC v1 Only the virtio transport has been tested. The loopback transport was used in writing bpf/selftests, but not thoroughly tested otherwise. This series requires the skb patch. Changes in v4: - af_vsock: fix parameter alignment in vsock_dgram_recvmsg() - af_vsock: add TCP_ESTABLISHED comment in vsock_dgram_connect() - vsock/bpf: change ret type to bool Changes in v3: - vsock/bpf: Refactor wait logic in vsock_bpf_recvmsg() to avoid backwards goto - vsock/bpf: Check psock before acquiring slock - vsock/bpf: Return bool instead of int of 0 or 1 - vsock/bpf: Wrap macro args __sk/__psock in parens - vsock/bpf: Place comment trailer */ on separate line Changes in v2: - vsock/bpf: rename vsock_dgram_* -> vsock_* - vsock/bpf: change sk_psock_{get,put} and {lock,release}_sock() order to minimize slock hold time - vsock/bpf: use "new style" wait - vsock/bpf: fix bug in wait log - vsock/bpf: add check that recvmsg sk_type is one dgram, seqpacket, or stream. Return error if not one of the three. - virtio/vsock: comment __skb_recv_datagram() usage - virtio/vsock: do not init copied in read_skb() - vsock/bpf: add ifdef guard around struct proto in dgram_recvmsg() - selftests/bpf: add vsock loopback config for aarch64 - selftests/bpf: add vsock loopback config for s390x - selftests/bpf: remove vsock device from vmtest.sh qemu machine - selftests/bpf: remove CONFIG_VIRTIO_VSOCKETS=y from config.x86_64 - vsock/bpf: move transport-related (e.g., if (!vsk->transport)) checks out of fast path ==================== Signed-off-by: Bobby Eshleman Signed-off-by: David S. Miller commit d61bd8c1fd02cfc8aed00a58c20bd58c72549e3a Author: Bobby Eshleman Date: Mon Mar 27 19:11:53 2023 +0000 selftests/bpf: add a test case for vsock sockmap Add a test case testing the redirection from connectible AF_VSOCK sockets to connectible AF_UNIX sockets. Signed-off-by: Bobby Eshleman Acked-by: Stefano Garzarella Signed-off-by: David S. Miller commit c7c605c982d63b2140280d005a9df321d74f81dc Author: Bobby Eshleman Date: Mon Mar 27 19:11:52 2023 +0000 selftests/bpf: add vsock to vmtest.sh Add vsock loopback to the test kernel. This allows sockmap for vsock to be tested. Signed-off-by: Bobby Eshleman Acked-by: Stefano Garzarella Signed-off-by: David S. Miller commit 634f1a7110b439c65fd8a809171c1d2d28bcea6f Author: Bobby Eshleman Date: Mon Mar 27 19:11:51 2023 +0000 vsock: support sockmap This patch adds sockmap support for vsock sockets. It is intended to be usable by all transports, but only the virtio and loopback transports are implemented. SOCK_STREAM, SOCK_DGRAM, and SOCK_SEQPACKET are all supported. Signed-off-by: Bobby Eshleman Acked-by: Michael S. Tsirkin Reviewed-by: Stefano Garzarella Signed-off-by: David S. Miller commit d22467a71ebe96ff5ab7e000dbef60d4ea76e5b0 Author: Patrisious Haddad Date: Thu Mar 23 12:13:52 2023 +0200 RDMA/mlx5: Expand switchdev Q-counters to expose representor statistics Previously for switchdev only per device counters were supported. Currently we allocate counters for switchdev per port, which also includes the ports that belong to VF representors in order to expose them to users through the rdma tool, allowing the host to track the VFs statistics through their representors counters. Signed-off-by: Patrisious Haddad Link: https://lore.kernel.org/r/ea31e1103c125cd27931ba213f307cde30d2eaed.1679566038.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit bbe371399ed004f4deb57151ad36dcc720a0d687 Merge: d54bd5abf4d26 77f7eb9f3416a Author: Leon Romanovsky Date: Wed Mar 29 10:09:02 2023 +0300 Merge branch 'mlx5-next' into wip/leon-for-next * mlx5-next: net/mlx5: Introduce other vport query for Q-counters commit 77f7eb9f3416aace703971156133926e44e2195b Author: Patrisious Haddad Date: Thu Mar 23 12:13:51 2023 +0200 net/mlx5: Introduce other vport query for Q-counters These new fields in QUERY_Q_COUNTER command allow us to access another vport counters during the query command, which is specially useful to query representor vports. In addition also add the required caps to check if this capability is actually supported. Signed-off-by: Patrisious Haddad Reviewed-by: Michael Guralnik Link: https://lore.kernel.org/r/75c73a4a0e60f18c37b35a4a11ca2e2415e4a6f3.1679566038.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit d54bd5abf4d26e1b6722238f75e36069ea91def9 Author: Selvin Xavier Date: Wed Mar 15 01:16:55 2023 -0700 RDMA/bnxt_re: Add resize_cq support Add resize_cq verb support for user space CQs. Resize operation for kernel CQs are not supported now. Driver should free the current CQ only after user library polls for all the completions and switch to new CQ. So after the resize_cq is returned from the driver, user library polls for existing completions and store it as temporary data. Once library reaps all completions in the current CQ, it invokes the ibv_cmd_poll_cq to inform the driver about the resize_cq completion. Adding a check for user CQs in driver's poll_cq and complete the resize operation for user CQs. Updating uverbs_cmd_mask with poll_cq to support this. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1678868215-23626-1-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 2926c5275028e44f6a2ac31b37d75d6d6e260306 Author: Roger Quadros Date: Fri Mar 24 13:44:29 2023 +0200 usb: dwc3-am62: Fix up wake-up configuration and spurious wake up Explicitly set and clear wakeup config so we don't leave anything to chance. Clear wakeup status on suspend so we know what caused wake up. The LINESTATE wake up should not be enabled in device mode if we are not connected to a USB host and in USB suspend (U2/L3) else it will cause spurious wake up. For now, don't enable LINESTATE. This means wake up from USB resume will not work but at least we won't have any spurious wake ups. Signed-off-by: Roger Quadros Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20230324114429.21838-1-rogerq@kernel.org Signed-off-by: Greg Kroah-Hartman commit db2c2b161d4a8f4a81e6f643848b1531517a67a5 Author: Mingxuan Xiang Date: Fri Mar 24 14:09:34 2023 +0800 usb: dwc3: host: remove dead code in dwc3_host_get_irq() According to the description of platform_get_irq() * Return: non-zero IRQ number on success, negative error number on failure. and the code, platform_get_irq() will return -EINVAL instead of IRQ0. So platform_get_irq() no longer returns 0, there is no need to check whether the return value is 0. Found by Smatch: drivers/usb/dwc3/host.c:60 dwc3_host_get_irq() warn: platform_get_irq() does not return zero Signed-off-by: Mingxuan Xiang Reviewed-by: Dan Carpenter Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20230324060934.1686859-1-mx_xiang@hust.edu.cn Signed-off-by: Greg Kroah-Hartman commit c03ff66dc0e0cbad9ed0c29500843e1da8533118 Author: Christophe JAILLET Date: Thu Mar 23 20:40:22 2023 +0100 usb: pci-quirks: Reduce the length of a spinlock section in usb_amd_find_chipset_info() 'info' is local to the function. There is no need to zeroing it within a spin_lock section. Moreover, there is no need to explicitly initialize the .need_pll_quirk field. Initialize the structure when defined and remove the now useless memset(). Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/08ee42fced6af6bd56892cd14f2464380ab071fa.1679600396.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit df9ba6a245b34332e82df07b078988abf0ac1f09 Author: Deming Wang Date: Sat Mar 25 02:38:32 2023 -0400 usb: dwc2: Fix spelling mistake "schduler" -> "scheduler" There is a spelling mistakes in dev_warn messages. Fix them. Signed-off-by: Deming Wang Link: https://lore.kernel.org/r/20230325063832.1642-1-wangdeming@inspur.com Signed-off-by: Greg Kroah-Hartman commit 130eac4170859fb368681e00d390f20f44bbf27b Author: Arnd Bergmann Date: Tue Mar 28 15:10:43 2023 +0200 xhci: use pm_ptr() instead of #ifdef for CONFIG_PM conditionals A recent patch caused an unused-function warning in builds with CONFIG_PM disabled, after the function became marked 'static': drivers/usb/host/xhci-pci.c:91:13: error: 'xhci_msix_sync_irqs' defined but not used [-Werror=unused-function] 91 | static void xhci_msix_sync_irqs(struct xhci_hcd *xhci) | ^~~~~~~~~~~~~~~~~~~ This could be solved by adding another #ifdef, but as there is a trend towards removing CONFIG_PM checks in favor of helper macros, do the same conversion here and use pm_ptr() to get either a function pointer or NULL but avoid the warning. As the hidden functions reference some other symbols, make sure those are visible at compile time, at the minimal cost of a few extra bytes for 'struct usb_device'. Fixes: 9abe15d55dcc ("xhci: Move xhci MSI sync function to to xhci-pci") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230328131114.1296430-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit f54134b3fc7954dbaa4da42198286e49bcb48ed7 Author: Linyu Yuan Date: Mon Mar 27 18:12:15 2023 +0800 usb: gadget: ffs: remove ENTER() macro ENTER() used to show function name which called during runtime, ftrace can be used to get same information, let's remove it. Signed-off-by: Linyu Yuan Link: https://lore.kernel.org/r/1679911940-4727-1-git-send-email-quic_linyyuan@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 24265c2c91ad6aae9446e18472566cd83e92b602 Author: Bobby Eshleman Date: Mon Mar 27 22:16:06 2023 +0000 testing/vsock: add vsock_perf to gitignore This adds the vsock_perf binary to the gitignore file. Fixes: 8abbffd27ced ("test/vsock: vsock_perf utility") Signed-off-by: Bobby Eshleman Reviewed-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Link: https://lore.kernel.org/r/20230327-vsock-add-vsock-perf-to-ignore-v1-1-f28a84f3606b@bytedance.com Signed-off-by: Jakub Kicinski commit 35fae44e8e1ab170885b3a77594f674660d147e3 Merge: de7494524da53 04eac39361d35 Author: Jakub Kicinski Date: Tue Mar 28 23:54:45 2023 -0700 Merge branch 'ynl-add-support-for-user-headers-and-struct-attrs' Donald Hunter says: ==================== ynl: add support for user headers and struct attrs Add support for user headers and struct attrs to YNL. This patchset adds features to ynl and add a partial spec for openvswitch that demonstrates use of the features. Patch 1-4 add features to ynl Patch 5 adds partial openvswitch specs that demonstrate the new features Patch 6-7 add documentation for legacy structs and for sub-type ==================== Link: https://lore.kernel.org/r/20230327083138.96044-1-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 04eac39361d3506c82ccf932cb288e84d5746969 Author: Donald Hunter Date: Mon Mar 27 09:31:38 2023 +0100 docs: netlink: document the sub-type attribute property Add a definition for sub-type to the protocol spec doc and a description of its usage for C arrays in genetlink-legacy. Signed-off-by: Donald Hunter Reviewed-by: Bagas Sanjaya Signed-off-by: Jakub Kicinski commit 88e288968412ec1ca3d3b2d96956baa543fdfe82 Author: Donald Hunter Date: Mon Mar 27 09:31:37 2023 +0100 docs: netlink: document struct support for genetlink-legacy Describe the genetlink-legacy support for using struct definitions for fixed headers and for binary attributes. Signed-off-by: Donald Hunter Reviewed-by: Bagas Sanjaya Signed-off-by: Jakub Kicinski commit 643ef4a676e3a1ff1312e9fea6ae777c9a92fcd3 Author: Donald Hunter Date: Mon Mar 27 09:31:36 2023 +0100 netlink: specs: add partial specification for openvswitch The openvswitch family has a fixed header, uses struct attrs and has array values. This partial spec demonstrates these features in the YNL CLI. These specs are sufficient to create, delete and dump datapaths and to dump vports: $ ./tools/net/ynl/cli.py \ --spec Documentation/netlink/specs/ovs_datapath.yaml \ --do dp-new --json '{ "dp-ifindex": 0, "name": "demo", "upcall-pid": 0}' None $ ./tools/net/ynl/cli.py \ --spec Documentation/netlink/specs/ovs_datapath.yaml \ --dump dp-get --json '{ "dp-ifindex": 0 }' [{'dp-ifindex': 3, 'masks-cache-size': 256, 'megaflow-stats': {'cache-hits': 0, 'mask-hit': 0, 'masks': 0, 'pad1': 0, 'padding': 0}, 'name': 'test', 'stats': {'flows': 0, 'hit': 0, 'lost': 0, 'missed': 0}, 'user-features': {'dispatch-upcall-per-cpu', 'tc-recirc-sharing', 'unaligned'}}, {'dp-ifindex': 48, 'masks-cache-size': 256, 'megaflow-stats': {'cache-hits': 0, 'mask-hit': 0, 'masks': 0, 'pad1': 0, 'padding': 0}, 'name': 'demo', 'stats': {'flows': 0, 'hit': 0, 'lost': 0, 'missed': 0}, 'user-features': set()}] $ ./tools/net/ynl/cli.py \ --spec Documentation/netlink/specs/ovs_datapath.yaml \ --do dp-del --json '{ "dp-ifindex": 0, "name": "demo"}' None $ ./tools/net/ynl/cli.py \ --spec Documentation/netlink/specs/ovs_vport.yaml \ --dump vport-get --json '{ "dp-ifindex": 3 }' [{'dp-ifindex': 3, 'ifindex': 3, 'name': 'test', 'port-no': 0, 'stats': {'rx-bytes': 0, 'rx-dropped': 0, 'rx-errors': 0, 'rx-packets': 0, 'tx-bytes': 0, 'tx-dropped': 0, 'tx-errors': 0, 'tx-packets': 0}, 'type': 'internal', 'upcall-pid': [0], 'upcall-stats': {'fail': 0, 'success': 0}}] Signed-off-by: Donald Hunter Signed-off-by: Jakub Kicinski commit f036d936ca57e8bc1f39b92cadfbac27095dc4e7 Author: Donald Hunter Date: Mon Mar 27 09:31:35 2023 +0100 tools: ynl: Add fixed-header support to ynl Add support for netlink families that add an optional fixed header structure after the genetlink header and before any attributes. The fixed-header can be specified on a per op basis, or once for all operations, which serves as a default value that can be overridden. Signed-off-by: Donald Hunter Signed-off-by: Jakub Kicinski commit 2607191395bd4db544db05452625cd7e98bc0848 Author: Donald Hunter Date: Mon Mar 27 09:31:34 2023 +0100 tools: ynl: Add struct attr decoding to ynl Add support for decoding attributes that contain C structs. Signed-off-by: Donald Hunter Signed-off-by: Jakub Kicinski commit b423c3c86325192259380ac870aafd370a683e73 Author: Donald Hunter Date: Mon Mar 27 09:31:33 2023 +0100 tools: ynl: Add C array attribute decoding to ynl Add support for decoding C arrays from binay blobs in genetlink-legacy messages. Signed-off-by: Donald Hunter Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski commit bec0b7a2db358718a371e6fe0103220685552fae Author: Donald Hunter Date: Mon Mar 27 09:31:32 2023 +0100 tools: ynl: Add struct parsing to nlspec Add python classes for struct definitions to nlspec Signed-off-by: Donald Hunter Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski commit de7494524da53d92d2f0bc4d67ec7206ea08ff3b Merge: e70f94c6c75c2 fb0a6a268dcd6 Author: Jakub Kicinski Date: Tue Mar 28 23:52:12 2023 -0700 Merge tag 'mlx5-updates-2023-03-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2023-03-20 mlx5 dynamic msix This patch series adds support for dynamic msix vectors allocation in mlx5. Eli Cohen Says: ================ The following series of patches modifies mlx5_core to work with the dynamic MSIX API. Currently, mlx5_core allocates all the interrupt vectors it needs and distributes them amongst the consumers. With the introduction of dynamic MSIX support, which allows for allocation of interrupts more than once, we now allocate vectors as we need them. This allows other drivers running on top of mlx5_core to allocate interrupt vectors for their own use. An example for this is mlx5_vdpa, which uses these vectors to propagate interrupts directly from the hardware to the vCPU [1]. As a preparation for using this series, a use after free issue is fixed in lib/cpu_rmap.c and the allocator for rmap entries has been modified. A complementary API for irq_cpu_rmap_add() has also been introduced. [1] https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git/patch/?id=0f2bf1fcae96a83b8c5581854713c9fc3407556e ================ * tag 'mlx5-updates-2023-03-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: Provide external API for allocating vectors net/mlx5: Use one completion vector if eth is disabled net/mlx5: Refactor calculation of required completion vectors net/mlx5: Move devlink registration before mlx5_load net/mlx5: Use dynamic msix vectors allocation net/mlx5: Refactor completion irq request/release code net/mlx5: Improve naming of pci function vectors net/mlx5: Use newer affinity descriptor net/mlx5: Modify struct mlx5_irq to use struct msi_map net/mlx5: Fix wrong comment net/mlx5e: Coding style fix, add empty line lib: cpu_rmap: Add irq_cpu_rmap_remove to complement irq_cpu_rmap_add lib: cpu_rmap: Use allocator for rmap entries lib: cpu_rmap: Avoid use after free on rmap->obj array entries ==================== Link: https://lore.kernel.org/r/20230324231341.29808-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 7bf1c56a90decd3bec4d49815289d2e40bb771ae Author: Daniel Scally Date: Thu Mar 9 10:58:25 2023 +0000 usb: gadget: uvc: Make bmControls attr read/write For the Processing Unit and Camera Terminal descriptors defined in the UVC Gadget we currently hard-code values into their bmControls fields, which enumerates which controls the gadget is able to support. This isn't appropriate since only the userspace companion program to the kernel driver will know which controls are supported. Make the configfs attributes that point to those fields read/write so userspace can set them to appropriate values. Document the new behaviour at the same time so the functionality is clear. Signed-off-by: Daniel Scally Link: https://lore.kernel.org/r/20230309105825.216745-1-dan.scally@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit e70f94c6c75c2e3274df474b4c0bf6153e0533c3 Author: Jakub Kicinski Date: Mon Mar 27 10:26:46 2023 -0700 docs: netdev: clarify the need to sending reverts as patches We don't state explicitly that reverts need to be submitted as a patch. It occasionally comes up. Reviewed-by: Jacob Keller Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230327172646.2622943-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 0d6a119cecd7ffa059970dbc5b557bfce737945f Author: Aswath Govindraju Date: Fri Mar 24 15:18:53 2023 +0200 usb: typec: tps6598x: Add support for polling interrupts status Some development boards don't have the interrupt line connected. In such cases we can resort to polling the interrupt status. Signed-off-by: Aswath Govindraju Signed-off-by: Roger Quadros Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230324131853.41102-1-rogerq@kernel.org Signed-off-by: Greg Kroah-Hartman commit e48cefb9c8d1308cd64c40ebabfd51d79bf6e93b Author: Tom Rix Date: Mon Mar 27 19:54:23 2023 -0400 net: ethernet: 8390: axnet_cs: remove unused xfer_count variable clang with W=1 reports drivers/net/ethernet/8390/axnet_cs.c:653:9: error: variable 'xfer_count' set but not used [-Werror,-Wunused-but-set-variable] int xfer_count = count; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230327235423.1777590-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit 2fa98a4283c165715e6d36f5cd3acbc6f3c029f2 Author: Tasos Sahanidis Date: Wed Mar 29 07:39:18 2023 +0300 ALSA: ymfpci: Use register macro in place of integer literal The macro for said register already exists, so just use it, to make the code more readable. Signed-off-by: Tasos Sahanidis Link: https://lore.kernel.org/r/20230329043918.179352-1-tasos@tasossah.com Signed-off-by: Takashi Iwai commit a8752868b74c0ce4491d0b62805fc99b0f6c3b15 Author: Tasos Sahanidis Date: Wed Mar 29 07:36:27 2023 +0300 ALSA: ymfpci: Use u16 consistently for old_legacy_ctrl There's no need to switch between unsigned short and u16, especially since all the functions that end up using old_legacy_ctrl specify u16 anyway. Signed-off-by: Tasos Sahanidis Link: https://lore.kernel.org/r/20230329043627.178899-1-tasos@tasossah.com Signed-off-by: Takashi Iwai commit 4fa4a14773fbf1cd848aaec4f7cf129816d7b2f1 Author: Tasos Sahanidis Date: Wed Mar 29 07:14:40 2023 +0300 ALSA: ymfpci: Store additional legacy registers on suspend YMF744 and newer store the base IO ports in separate PCI config registers. Since these registers were not restored, when set to a non-default value, features that rely on them (FM, MPU401, gameport) were not functional after restore, as their respective IO ports were reset to their defaults. Signed-off-by: Tasos Sahanidis Link: https://lore.kernel.org/r/20230329041440.177363-5-tasos@tasossah.com Signed-off-by: Takashi Iwai commit 39fef76ce533dd1fe3b55e929cdceb3269a91c99 Author: Tasos Sahanidis Date: Wed Mar 29 07:14:39 2023 +0300 ALSA: ymfpci: Store saved legacy registers in an array In preparation for storing more than two legacy PCI registers, the existing ones are moved into a new array. Signed-off-by: Tasos Sahanidis Link: https://lore.kernel.org/r/20230329041440.177363-4-tasos@tasossah.com Signed-off-by: Takashi Iwai commit 69a6c1ba4238ef5ce01afb6f9e1b9be79b765d5f Author: Tasos Sahanidis Date: Wed Mar 29 07:14:38 2023 +0300 ALSA: ymfpci: Move allocation of saved registers to struct snd_ymfpci The registers were previously allocated when CONFIG_PM_SLEEP was set, however this only saved an insignificant amount of memory otherwise. Signed-off-by: Tasos Sahanidis Link: https://lore.kernel.org/r/20230329041440.177363-3-tasos@tasossah.com Signed-off-by: Takashi Iwai commit 081364d7039395d5759dda17f6904d7e99d39f4b Author: Tasos Sahanidis Date: Wed Mar 29 07:14:37 2023 +0300 ALSA: ymfpci: Switch to DEFINE_SIMPLE_DEV_PM_OPS() Since commit 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones") SIMPLE_DEV_PM_OPS has been marked deprecated. The intent is to remove CONFIG_PM_SLEEP guards for PM callbacks. As such the ifdefs are now removed. Signed-off-by: Tasos Sahanidis Link: https://lore.kernel.org/r/20230329041440.177363-2-tasos@tasossah.com Signed-off-by: Takashi Iwai commit f09467e06b8add14fa294d38a1a2e91e36c97157 Author: Tasos Sahanidis Date: Wed Mar 29 06:42:04 2023 +0300 ALSA: ymfpci: Add error messages for abritrary IO ports on older chips As an end user, it can be confusing to request an arbitrary IO port be used only to find out that it doesn't work without an obvious reason, especially since /sys/module/snd_ymfpci/parameters/{fm,joystick,mpu}_port indicate 0 after the module has been loaded. In my case, I was unaware that the YMF724 did not support such usage, and thus ended up spending time attempting to debug the issue. Now, when a user attempts to request an IO port that isn't supported by the hardware, the following message is printed: [ 25.549530] snd_ymfpci 0000:06:05.0: The Yamaha DS-1 (YMF724F) does not support arbitrary IO ports for FM (requested 0x1234) Signed-off-by: Tasos Sahanidis Link: https://lore.kernel.org/r/20230329034204.171901-1-tasos@tasossah.com Signed-off-by: Takashi Iwai commit 7b884b7f24b42fa25e92ed724ad82f137610afaf Author: Greg Kroah-Hartman Date: Sat Mar 25 20:42:34 2023 +0100 driver core: class.c: convert to only use class_to_subsys Now that class_to_subsys() can be used to get access to the internal class private pointer, convert the remaining few places in class.c that were accessing the pointer directly to use class_to_subsys() instead. By doing this, the need for class_get() and class_put() goes away as no one actually tries to increment the class structures anymore, only the internal dynamic one. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230325194234.46588-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 884f8ce42ccec9d0bf11d8bf9f111e5961ca1c82 Author: Greg Kroah-Hartman Date: Sat Mar 25 20:42:33 2023 +0100 driver core: class: implement class_get/put without the private pointer. Much like what was done in commit 273afac615ad ("driver core: bus: implement bus_get/put() without the private pointer"), it is time to move the driver core away from using the internal private pointer in struct class in order to enable it to be always a constant and be placed in read-only memory in the future. First step in doing this is to create a helper function that turns a 'struct class' into 'struct subsys_private' called class_to_subsys(). class_to_subsys() walks the list of registered busses in the system and finds the matching one based on the pointer to the class itself. As this is a short list, and this function is not on any fast path, it should not be noticable. Implement class_get() and class_put() using this new helper function. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230325194234.46588-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 75a2d4226b53710380d1017b3f4c88f937ddba78 Author: Greg Kroah-Hartman Date: Sat Mar 25 09:45:37 2023 +0100 driver core: class: mark the struct class for sysfs callbacks as constant struct class should never be modified in a sysfs callback as there is nothing in the structure to modify, and frankly, the structure is almost never used in a sysfs callback, so mark it as constant to allow struct class to be moved to read-only memory. While we are touching all class sysfs callbacks also mark the attribute as constant as it can not be modified. The bonding code still uses this structure so it can not be removed from the function callbacks. Cc: "David S. Miller" Cc: "Rafael J. Wysocki" Cc: Bartosz Golaszewski Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Jens Axboe Cc: Johannes Berg Cc: Linus Walleij Cc: Minchan Kim Cc: Miquel Raynal Cc: Namjae Jeon Cc: Paolo Abeni Cc: Russ Weight Cc: Sergey Senozhatsky Cc: Steve French Cc: Vignesh Raghavendra Cc: linux-cifs@vger.kernel.org Cc: linux-gpio@vger.kernel.org Cc: linux-mtd@lists.infradead.org Cc: linux-rdma@vger.kernel.org Cc: linux-s390@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: netdev@vger.kernel.org Reviewed-by: Luis Chamberlain Link: https://lore.kernel.org/r/20230325084537.3622280-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit ce1c5f840fb7cf080523eb94396f0182ab74ac4f Author: Uwe Kleine-König Date: Sun Mar 12 17:15:12 2023 +0100 clk: xilinx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-31-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit 4690d24624e27fe5294185b5f7cf02df25c7d113 Author: Uwe Kleine-König Date: Sun Mar 12 17:15:11 2023 +0100 clk: x86: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-30-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit 0d086cc521e71e2714f740e2d63060f51e5224e8 Author: Uwe Kleine-König Date: Sun Mar 12 17:15:10 2023 +0100 clk: uniphier: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-29-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit c8bb21be9fc48df65e25bea69400e84b8c1084f6 Author: Uwe Kleine-König Date: Sun Mar 12 17:15:09 2023 +0100 clk: ti: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-28-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit 3fd43a2c3acdd4565f961afb3cf327af2a9c6af0 Author: Uwe Kleine-König Date: Sun Mar 12 17:15:08 2023 +0100 clk: tegra: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-27-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit 0d65f746957bb7784574cb03a4014ee8305d7e69 Author: Uwe Kleine-König Date: Sun Mar 12 17:15:07 2023 +0100 clk: stm32: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-26-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit d9f139da6f245fd8a4c106ffa31e8017da797c07 Author: Uwe Kleine-König Date: Sun Mar 12 17:15:03 2023 +0100 clk: mvebu: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-22-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit 65ef13feb7ae5c0fe38c00db8ebffeb4f64a8297 Author: Uwe Kleine-König Date: Sun Mar 12 17:15:02 2023 +0100 clk: mmp: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-21-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit 678471d83a568f3195b5b4cea7325297c56a0e37 Author: Uwe Kleine-König Date: Sun Mar 12 17:15:00 2023 +0100 clk: keystone: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-19-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit bfa8370b283d5791e3667c0f8041a4b4f8af6c82 Author: Uwe Kleine-König Date: Sun Mar 12 17:14:59 2023 +0100 clk: hisilicon: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-18-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit 8ad00c147dc615db1dc8d85b6d34e09ee696404a Author: Uwe Kleine-König Date: Sun Mar 12 17:14:58 2023 +0100 clk: stm32mp1: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-17-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit dd904848b484bd48dca843d6633472ea07062ac4 Author: Uwe Kleine-König Date: Sun Mar 12 17:14:57 2023 +0100 clk: scpi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-16-u.kleine-koenig@pengutronix.de Acked-by: Sudeep Holla Signed-off-by: Stephen Boyd commit 34014ff811c6e6423a0215e90fb5a02cf80d4e3c Author: Uwe Kleine-König Date: Sun Mar 12 17:14:56 2023 +0100 clk: s2mps11: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-15-u.kleine-koenig@pengutronix.de Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd commit e72cdad50cdd1401525b37ac30519361d73fd139 Author: Uwe Kleine-König Date: Sun Mar 12 17:14:55 2023 +0100 clk: pwm: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-14-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit 8ffd6c28c95524e6e701a4210bf706e9f21060cb Author: Uwe Kleine-König Date: Sun Mar 12 17:14:54 2023 +0100 clk: palmas: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-13-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit 601b2f146084bc16c5280a5d2945b2d13b4bc1fa Author: Uwe Kleine-König Date: Sun Mar 12 17:14:53 2023 +0100 clk: hsdk-pll: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-12-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit 57e20d68f90fcd6276e7fc0e064ed0e27fc6c9ab Author: Uwe Kleine-König Date: Sun Mar 12 17:14:52 2023 +0100 clk: fixed-rate: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-11-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit 6f149b65891d7b6302c19ad6d0c44c89367b7e17 Author: Uwe Kleine-König Date: Sun Mar 12 17:14:51 2023 +0100 clk: fixed-mmio: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-10-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit 27237f4b37b0ff8d8d48912780176c626c734720 Author: Uwe Kleine-König Date: Sun Mar 12 17:14:50 2023 +0100 clk: fixed-factor: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-9-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit 1920aa93a8d09034f16f307c522792c1b5805116 Author: Uwe Kleine-König Date: Sun Mar 12 17:14:49 2023 +0100 clk: axm5516: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-8-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit 778dc8bb1dd44dd09c2da67a6cedebb2903e7945 Author: Uwe Kleine-König Date: Sun Mar 12 17:14:48 2023 +0100 clk: axi-clkgen: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-7-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit 04d19184d266d40af5e77c2b90e1d2195c17e849 Author: Uwe Kleine-König Date: Sun Mar 12 17:14:47 2023 +0100 clk: bcm: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-6-u.kleine-koenig@pengutronix.de Reviewed-by: Florian Fainelli Signed-off-by: Stephen Boyd commit b3438f55f06ef9e9449ef366ef531738c1cb74ef Author: Uwe Kleine-König Date: Sun Mar 12 17:14:46 2023 +0100 clk: axs10x: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-5-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit b46d59cb18321705d7fe8cf84c20e01553116418 Author: Uwe Kleine-König Date: Sun Mar 12 17:14:45 2023 +0100 clk: xilinx: Drop if block with always false condition xvcu_remove() is only called for a device after after xvcu_probe() completed successfully. In that case dev_set_drvdata() was called for that device with a non-NULL parameter, so platform_get_drvdata() won't return NULL and the if condition is never true. Drop the if, preparing a conversion to make platform driver's remove callback return void. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-4-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit c73e435e9b754d43aa8925152caedd54758e55be Author: Uwe Kleine-König Date: Sun Mar 12 17:14:44 2023 +0100 clk: tegra: Don't warn three times about failure to unregister tegra124_dfll_fcpu_remove() calls tegra_dfll_unregister() and the former emits an error message if the latter fails. In that case tegra_dfll_unregister() already printed an error message. Additionally tegra124_dfll_fcpu_remove() returns an error code which results in yet another warning emitted by platform_remove(). So drop the error message from tegra124_dfll_fcpu_remove() and let it return 0. (Retuning 0 has no side effect but suppressing the error message in platform_remove().) Also add two comments about exiting early being wrong. This is something that needs fixing separately. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-3-u.kleine-koenig@pengutronix.de Signed-off-by: Stephen Boyd commit cdeccd13a03fc6e97c090c12a27566d02dace6d9 Author: Wolfram Sang Date: Mon Mar 27 17:21:12 2023 +0200 Revert "sh_eth: remove open coded netif_running()" This reverts commit ce1fdb065695f49ef6f126d35c1abbfe645d62d5. It turned out this actually introduces a race condition. netif_running() is not a suitable check for get_stats. Reported-by: Sergey Shtylyov Signed-off-by: Wolfram Sang Reviewed-by: Sergey Shtylyov Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230327152112.15635-1-wsa+renesas@sang-engineering.com Signed-off-by: Jakub Kicinski commit 2600badfea0d78b90a3583b52bc2858bbbc21a05 Merge: b133fffe57ae9 bc9d3a9f2afca Author: Jakub Kicinski Date: Tue Mar 28 18:53:30 2023 -0700 Merge branch 'net-refcount-address-dst_entry-reference-count-scalability-issues' Thomas Gleixner says: ==================== net, refcount: Address dst_entry reference count scalability issues This is version 3 of this series. Version 2 can be found here: https://lore.kernel.org/lkml/20230307125358.772287565@linutronix.de Wangyang and Arjan reported a bottleneck in the networking code related to struct dst_entry::__refcnt. Performance tanks massively when concurrency on a dst_entry increases. This happens when there are a large amount of connections to or from the same IP address. The memtier benchmark when run on the same host as memcached amplifies this massively. But even over real network connections this issue can be observed at an obviously smaller scale (due to the network bandwith limitations in my setup, i.e. 1Gb). How to reproduce: Run memcached with -t $N and memtier_benchmark with -t $M and --ratio=1:100 on the same machine. localhost connections amplify the problem. Start with the defaults for $N and $M and increase them. Depending on your machine this will tank at some point. But even in reasonably small $N, $M scenarios the refcount operations and the resulting false sharing fallout becomes visible in perf top. At some point it becomes the dominating issue. There are two factors which make this reference count a scalability issue: 1) False sharing dst_entry:__refcnt is located at offset 64 of dst_entry, which puts it into a seperate cacheline vs. the read mostly members located at the beginning of the struct. That prevents false sharing vs. the struct members in the first 64 bytes of the structure, but there is also dst_entry::lwtstate which is located after the reference count and in the same cache line. This member is read after a reference count has been acquired. The other problem is struct rtable, which embeds a struct dst_entry at offset 0. struct dst_entry has a size of 112 bytes, which means that the struct members of rtable which follow the dst member share the same cache line as dst_entry::__refcnt. Especially rtable::rt_genid is also read by the contexts which have a reference count acquired already. When dst_entry:__refcnt is incremented or decremented via an atomic operation these read accesses stall and contribute to the performance problem. 2) atomic_inc_not_zero() A reference on dst_entry:__refcnt is acquired via atomic_inc_not_zero() and released via atomic_dec_return(). atomic_inc_not_zero() is implemted via a atomic_try_cmpxchg() loop, which exposes O(N^2) behaviour under contention with N concurrent operations. Contention scalability is degrading with even a small amount of contenders and gets worse from there. Lightweight instrumentation exposed an average of 8!! retry loops per atomic_inc_not_zero() invocation in a inc()/dec() loop running concurrently on 112 CPUs. There is nothing which can be done to make atomic_inc_not_zero() more scalable. The following series addresses these issues: 1) Reorder and pad struct dst_entry to prevent the false sharing. 2) Implement and use a reference count implementation which avoids the atomic_inc_not_zero() problem. It is slightly less performant in the case of the final 0 -> -1 transition, but the deconstruction of these objects is a low frequency event. get()/put() pairs are in the hotpath and that's what this implementation optimizes for. The algorithm of this reference count is only suitable for RCU managed objects. Therefore it cannot replace the refcount_t algorithm, which is also based on atomic_inc_not_zero(), due to a subtle race condition related to the 0 -> -1 transition and the final verdict to mark the reference count dead. See details in patch 2/3. It might be just my lack of imagination which declares this to be impossible and I'd be happy to be proven wrong. As a bonus the new rcuref implementation provides underflow/overflow detection and mitigation while being performance wise on par with open coded atomic_inc_not_zero() / atomic_dec_return() pairs even in the non-contended case. The combination of these two changes results in performance gains in micro benchmarks and also localhost and networked memtier benchmarks talking to memcached. It's hard to quantify the benchmark results as they depend heavily on the micro-architecture and the number of concurrent operations. The overall gain of both changes for localhost memtier ranges from 1.2X to 3.2X and from +2% to %5% range for networked operations on a 1Gb connection. A micro benchmark which enforces maximized concurrency shows a gain between 1.2X and 4.7X!!! Obviously this is focussed on a particular problem and therefore needs to be discussed in detail. It also requires wider testing outside of the cases which this is focussed on. Though the false sharing issue is obvious and should be addressed independent of the more focussed reference count changes. The series is also available from git: git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git rcuref Changes vs. V2: - Rename __refcnt to __rcuref (Linus) - Fix comments and changelogs (Mark, Qiuxu) - Fixup kernel doc of generated atomic_add_negative() variants I want to say thanks to Wangyang who analyzed the issue and provided the initial fix for the false sharing problem. Further thanks go to Arjan Peter, Marc, Will and Borislav for valuable input and providing test results on machines which I do not have access to, and to Linus and Eric, Qiuxu and Mark for helpful feedback. ==================== Link: https://lore.kernel.org/r/20230323102649.764958589@linutronix.de Signed-off-by: Jakub Kicinski commit bc9d3a9f2afca189a6ae40225b6985e3c775375e Author: Thomas Gleixner Date: Thu Mar 23 21:55:32 2023 +0100 net: dst: Switch to rcuref_t reference counting Under high contention dst_entry::__refcnt becomes a significant bottleneck. atomic_inc_not_zero() is implemented with a cmpxchg() loop, which goes into high retry rates on contention. Switch the reference count to rcuref_t which results in a significant performance gain. Rename the reference count member to __rcuref to reflect the change. The gain depends on the micro-architecture and the number of concurrent operations and has been measured in the range of +25% to +130% with a localhost memtier/memcached benchmark which amplifies the problem massively. Running the memtier/memcached benchmark over a real (1Gb) network connection the conversion on top of the false sharing fix for struct dst_entry::__refcnt results in a total gain in the 2%-5% range over the upstream baseline. Reported-by: Wangyang Guo Reported-by: Arjan Van De Ven Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230307125538.989175656@linutronix.de Link: https://lore.kernel.org/r/20230323102800.215027837@linutronix.de Signed-off-by: Jakub Kicinski commit d288a162dd1c73507da582966f17dd226e34a0c0 Author: Wangyang Guo Date: Thu Mar 23 21:55:29 2023 +0100 net: dst: Prevent false sharing vs. dst_entry:: __refcnt dst_entry::__refcnt is highly contended in scenarios where many connections happen from and to the same IP. The reference count is an atomic_t, so the reference count operations have to take the cache-line exclusive. Aside of the unavoidable reference count contention there is another significant problem which is caused by that: False sharing. perf top identified two affected read accesses. dst_entry::lwtstate and rtable::rt_genid. dst_entry:__refcnt is located at offset 64 of dst_entry, which puts it into a seperate cacheline vs. the read mostly members located at the beginning of the struct. That prevents false sharing vs. the struct members in the first 64 bytes of the structure, but there is also dst_entry::lwtstate which is located after the reference count and in the same cache line. This member is read after a reference count has been acquired. struct rtable embeds a struct dst_entry at offset 0. struct dst_entry has a size of 112 bytes, which means that the struct members of rtable which follow the dst member share the same cache line as dst_entry::__refcnt. Especially rtable::rt_genid is also read by the contexts which have a reference count acquired already. When dst_entry:__refcnt is incremented or decremented via an atomic operation these read accesses stall. This was found when analysing the memtier benchmark in 1:100 mode, which amplifies the problem extremly. Move the rt[6i]_uncached[_list] members out of struct rtable and struct rt6_info into struct dst_entry to provide padding and move the lwtstate member after that so it ends up in the same cache line. The resulting improvement depends on the micro-architecture and the number of CPUs. It ranges from +20% to +120% with a localhost memtier/memcached benchmark. [ tglx: Rearrange struct ] Signed-off-by: Wangyang Guo Signed-off-by: Arjan van de Ven Signed-off-by: Thomas Gleixner Reviewed-by: Eric Dumazet Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20230323102800.042297517@linutronix.de Signed-off-by: Jakub Kicinski commit b133fffe57ae941dedf607142a9616b8701cdcb2 Merge: 163c2c7059178 ee1ee6db07795 Author: Jakub Kicinski Date: Tue Mar 28 18:49:35 2023 -0700 Merge branch 'locking/rcuref' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pulling rcurefs from Peter for tglx's work. Link: https://lore.kernel.org/all/20230328084534.GE4253@hirez.programming.kicks-ass.net/ Signed-off-by: Jakub Kicinski commit 3c556d2425b04054e22045d4ef7d34f163b7a71a Author: Peter Xu Date: Wed Mar 15 13:16:42 2023 -0400 mm/thp: rename TRANSPARENT_HUGEPAGE_NEVER_DAX to _UNSUPPORTED TRANSPARENT_HUGEPAGE_NEVER_DAX has nothing to do with DAX. It's set when has_transparent_hugepage() returns false, checked in hugepage_vma_check() and will disable THP completely if false. Rename it to TRANSPARENT_HUGEPAGE_UNSUPPORTED to reflect its real purpose. [peterx@redhat.com: fix comment, per David] Link: https://lkml.kernel.org/r/ZBMzQW674oHQJV7F@x1n Link: https://lkml.kernel.org/r/20230315171642.1244625-1-peterx@redhat.com Signed-off-by: Peter Xu Acked-by: David Hildenbrand Cc: Aneesh Kumar K.V Cc: Yang Shi Signed-off-by: Andrew Morton commit 611b9fd80fb53e79079744fb29d8c1363f4b5c02 Author: Kefeng Wang Date: Mon Mar 13 13:39:29 2023 +0800 mm: memory-failure: directly use IS_ENABLED(CONFIG_HWPOISON_INJECT) It's more clear and simple to just use IS_ENABLED(CONFIG_HWPOISON_INJECT) to check whether or not to enable HWPoison injector module instead of CONFIG_HWPOISON_INJECT/CONFIG_HWPOISON_INJECT_MODULE. Link: https://lkml.kernel.org/r/20230313053929.84607-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: David Hildenbrand Acked-by: Naoya Horiguchi Cc: Miaohe Lin Signed-off-by: Andrew Morton commit cf2e309ebca7bb0916771839f9b580b06c778530 Author: Qi Zheng Date: Mon Mar 13 19:28:19 2023 +0800 mm: shrinkers: convert shrinker_rwsem to mutex Now there are no readers of shrinker_rwsem, so we can simply replace it with mutex lock. Link: https://lkml.kernel.org/r/20230313112819.38938-9-zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Acked-by: Vlastimil Babka Acked-by: Kirill Tkhai Acked-by: Roman Gushchin Cc: Christian König Cc: David Hildenbrand Cc: Davidlohr Bueso Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Paul E. McKenney Cc: Shakeel Butt Cc: Sultan Alsawaf Cc: Tetsuo Handa Cc: Yang Shi Signed-off-by: Andrew Morton commit 1643db98d9b314e0a592d152603094fbf7ab906e Author: Qi Zheng Date: Mon Mar 13 19:28:18 2023 +0800 mm: vmscan: remove shrinker_rwsem from synchronize_shrinkers() Currently, the synchronize_shrinkers() is only used by TTM pool. It only requires that no shrinkers run in parallel, and doesn't care about registering and unregistering of shrinkers. Since slab shrink is protected by SRCU, synchronize_srcu() is sufficient to ensure that no shrinker is running in parallel. So the shrinker_rwsem in synchronize_shrinkers() is no longer needed, just remove it. Link: https://lkml.kernel.org/r/20230313112819.38938-8-zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Acked-by: Vlastimil Babka Acked-by: Kirill Tkhai Acked-by: Roman Gushchin Cc: Christian König Cc: David Hildenbrand Cc: Davidlohr Bueso Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Paul E. McKenney Cc: Shakeel Butt Cc: Sultan Alsawaf Cc: Tetsuo Handa Cc: Yang Shi Signed-off-by: Andrew Morton commit b3cabea3c9153fd42fe5cb851ac58b51ea2b32b8 Author: Qi Zheng Date: Mon Mar 13 19:28:17 2023 +0800 mm: vmscan: hold write lock to reparent shrinker nr_deferred For now, reparent_shrinker_deferred() is the only holder of read lock of shrinker_rwsem. And it already holds the global cgroup_mutex, so it will not be called in parallel. Therefore, in order to convert shrinker_rwsem to shrinker_mutex later, here we change to hold the write lock of shrinker_rwsem to reparent. Link: https://lkml.kernel.org/r/20230313112819.38938-7-zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Acked-by: Vlastimil Babka Acked-by: Kirill Tkhai Acked-by: Roman Gushchin Cc: Christian König Cc: David Hildenbrand Cc: Davidlohr Bueso Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Paul E. McKenney Cc: Shakeel Butt Cc: Sultan Alsawaf Cc: Tetsuo Handa Cc: Yang Shi Signed-off-by: Andrew Morton commit 20cd1892fcc3efc10a7ac327cc3790494bec46b5 Author: Qi Zheng Date: Mon Mar 13 19:28:16 2023 +0800 mm: shrinkers: make count and scan in shrinker debugfs lockless Like global and memcg slab shrink, also use SRCU to make count and scan operations in memory shrinker debugfs lockless. Link: https://lkml.kernel.org/r/20230313112819.38938-6-zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Acked-by: Vlastimil Babka Acked-by: Kirill Tkhai Acked-by: Roman Gushchin Cc: Christian König Cc: David Hildenbrand Cc: Davidlohr Bueso Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Paul E. McKenney Cc: Shakeel Butt Cc: Sultan Alsawaf Cc: Tetsuo Handa Cc: Yang Shi Signed-off-by: Andrew Morton commit 475733dda5aedba9e086379aafe6b5ffd53e8f5e Author: Kirill Tkhai Date: Mon Mar 13 19:28:15 2023 +0800 mm: vmscan: add shrinker_srcu_generation After we make slab shrink lockless with SRCU, the longest sleep unregister_shrinker() will be a sleep waiting for all do_shrink_slab() calls. To avoid long unbreakable action in the unregister_shrinker(), add shrinker_srcu_generation to restore a check similar to the rwsem_is_contendent() check that we had before. And for memcg slab shrink, we unlock SRCU and continue iterations from the next shrinker id. Link: https://lkml.kernel.org/r/20230313112819.38938-5-zhengqi.arch@bytedance.com Signed-off-by: Kirill Tkhai Signed-off-by: Qi Zheng Acked-by: Vlastimil Babka Acked-by: Roman Gushchin Cc: Christian König Cc: David Hildenbrand Cc: Davidlohr Bueso Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Paul E. McKenney Cc: Shakeel Butt Cc: Sultan Alsawaf Cc: Tetsuo Handa Cc: Yang Shi Signed-off-by: Andrew Morton commit caa05325c9126c77ebf114edce51536a0d0a9a08 Author: Qi Zheng Date: Mon Mar 13 19:28:14 2023 +0800 mm: vmscan: make memcg slab shrink lockless Like global slab shrink, this commit also uses SRCU to make memcg slab shrink lockless. We can reproduce the down_read_trylock() hotspot through the following script: ``` DIR="/root/shrinker/memcg/mnt" do_create() { mkdir -p /sys/fs/cgroup/memory/test mkdir -p /sys/fs/cgroup/perf_event/test echo 4G > /sys/fs/cgroup/memory/test/memory.limit_in_bytes for i in `seq 0 $1`; do mkdir -p /sys/fs/cgroup/memory/test/$i; echo $$ > /sys/fs/cgroup/memory/test/$i/cgroup.procs; echo $$ > /sys/fs/cgroup/perf_event/test/cgroup.procs; mkdir -p $DIR/$i; done } do_mount() { for i in `seq $1 $2`; do mount -t tmpfs $i $DIR/$i; done } do_touch() { for i in `seq $1 $2`; do echo $$ > /sys/fs/cgroup/memory/test/$i/cgroup.procs; echo $$ > /sys/fs/cgroup/perf_event/test/cgroup.procs; dd if=/dev/zero of=$DIR/$i/file$i bs=1M count=1 & done } case "$1" in touch) do_touch $2 $3 ;; test) do_create 4000 do_mount 0 4000 do_touch 0 3000 ;; *) exit 1 ;; esac ``` Save the above script, then run test and touch commands. Then we can use the following perf command to view hotspots: perf top -U -F 999 1) Before applying this patchset: 32.31% [kernel] [k] down_read_trylock 19.40% [kernel] [k] pv_native_safe_halt 16.24% [kernel] [k] up_read 15.70% [kernel] [k] shrink_slab 4.69% [kernel] [k] _find_next_bit 2.62% [kernel] [k] shrink_node 1.78% [kernel] [k] shrink_lruvec 0.76% [kernel] [k] do_shrink_slab 2) After applying this patchset: 27.83% [kernel] [k] _find_next_bit 16.97% [kernel] [k] shrink_slab 15.82% [kernel] [k] pv_native_safe_halt 9.58% [kernel] [k] shrink_node 8.31% [kernel] [k] shrink_lruvec 5.64% [kernel] [k] do_shrink_slab 3.88% [kernel] [k] mem_cgroup_iter At the same time, we use the following perf command to capture IPC information: perf stat -e cycles,instructions -G test -a --repeat 5 -- sleep 10 1) Before applying this patchset: Performance counter stats for 'system wide' (5 runs): 454187219766 cycles test ( +- 1.84% ) 78896433101 instructions test # 0.17 insn per cycle ( +- 0.44% ) 10.0020430 +- 0.0000366 seconds time elapsed ( +- 0.00% ) 2) After applying this patchset: Performance counter stats for 'system wide' (5 runs): 841954709443 cycles test ( +- 15.80% ) (98.69%) 527258677936 instructions test # 0.63 insn per cycle ( +- 15.11% ) (98.68%) 10.01064 +- 0.00831 seconds time elapsed ( +- 0.08% ) We can see that IPC drops very seriously when calling down_read_trylock() at high frequency. After using SRCU, the IPC is at a normal level. Link: https://lkml.kernel.org/r/20230313112819.38938-4-zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Acked-by: Kirill Tkhai Acked-by: Vlastimil Babka Acked-by: Roman Gushchin Cc: Christian König Cc: David Hildenbrand Cc: Davidlohr Bueso Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Paul E. McKenney Cc: Shakeel Butt Cc: Sultan Alsawaf Cc: Tetsuo Handa Cc: Yang Shi Signed-off-by: Andrew Morton commit f95bdb700bc6bb74e1199b1f5f90c613e152cfa7 Author: Qi Zheng Date: Mon Mar 13 19:28:13 2023 +0800 mm: vmscan: make global slab shrink lockless The shrinker_rwsem is a global read-write lock in shrinkers subsystem, which protects most operations such as slab shrink, registration and unregistration of shrinkers, etc. This can easily cause problems in the following cases. 1) When the memory pressure is high and there are many filesystems mounted or unmounted at the same time, slab shrink will be affected (down_read_trylock() failed). Such as the real workload mentioned by Kirill Tkhai: ``` One of the real workloads from my experience is start of an overcommitted node containing many starting containers after node crash (or many resuming containers after reboot for kernel update). In these cases memory pressure is huge, and the node goes round in long reclaim. ``` 2) If a shrinker is blocked (such as the case mentioned in [1]) and a writer comes in (such as mount a fs), then this writer will be blocked and cause all subsequent shrinker-related operations to be blocked. Even if there is no competitor when shrinking slab, there may still be a problem. If we have a long shrinker list and we do not reclaim enough memory with each shrinker, then the down_read_trylock() may be called with high frequency. Because of the poor multicore scalability of atomic operations, this can lead to a significant drop in IPC (instructions per cycle). So many times in history ([2],[3],[4],[5]), some people wanted to replace shrinker_rwsem trylock with SRCU in the slab shrink, but all these patches were abandoned because SRCU was not unconditionally enabled. But now, since commit 1cd0bd06093c ("rcu: Remove CONFIG_SRCU"), the SRCU is unconditionally enabled. So it's time to use SRCU to protect readers who previously held shrinker_rwsem. This commit uses SRCU to make global slab shrink lockless, the memcg slab shrink is handled in the subsequent patch. [1]. https://lore.kernel.org/lkml/20191129214541.3110-1-ptikhomirov@virtuozzo.com/ [2]. https://lore.kernel.org/all/1437080113.3596.2.camel@stgolabs.net/ [3]. https://lore.kernel.org/lkml/1510609063-3327-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp/ [4]. https://lore.kernel.org/lkml/153365347929.19074.12509495712735843805.stgit@localhost.localdomain/ [5]. https://lore.kernel.org/lkml/20210927074823.5825-1-sultan@kerneltoast.com/ Link: https://lkml.kernel.org/r/20230313112819.38938-3-zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Acked-by: Vlastimil Babka Acked-by: Kirill Tkhai Acked-by: Roman Gushchin Cc: Christian König Cc: David Hildenbrand Cc: Davidlohr Bueso Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Paul E. McKenney Cc: Shakeel Butt Cc: Yang Shi Signed-off-by: Andrew Morton commit 42c9db39704839eeb77b27db4c1d57bfa2a54a5b Author: Qi Zheng Date: Mon Mar 13 19:28:12 2023 +0800 mm: vmscan: add a map_nr_max field to shrinker_info Patch series "make slab shrink lockless", v5. This patch series aims to make slab shrink lockless. 1. Background ============= On our servers, we often find the following system cpu hotspots: 52.22% [kernel] [k] down_read_trylock 19.60% [kernel] [k] up_read 8.86% [kernel] [k] shrink_slab 2.44% [kernel] [k] idr_find 1.25% [kernel] [k] count_shadow_nodes 1.18% [kernel] [k] shrink lruvec 0.71% [kernel] [k] mem_cgroup_iter 0.71% [kernel] [k] shrink_node 0.55% [kernel] [k] find_next_bit And we used bpftrace to capture its calltrace as follows: @[ down_read_trylock+1 shrink_slab+128 shrink_node+371 do_try_to_free_pages+232 try_to_free_pages+243 _alloc_pages_slowpath+771 _alloc_pages_nodemask+702 pagecache_get_page+255 filemap_fault+1361 ext4_filemap_fault+44 __do_fault+76 handle_mm_fault+3543 do_user_addr_fault+442 do_page_fault+48 page_fault+62 ]: 1161690 @[ down_read_trylock+1 shrink_slab+128 shrink_node+371 balance_pgdat+690 kswapd+389 kthread+246 ret_from_fork+31 ]: 8424884 @[ down_read_trylock+1 shrink_slab+128 shrink_node+371 do_try_to_free_pages+232 try_to_free_pages+243 __alloc_pages_slowpath+771 __alloc_pages_nodemask+702 __do_page_cache_readahead+244 filemap_fault+1674 ext4_filemap_fault+44 __do_fault+76 handle_mm_fault+3543 do_user_addr_fault+442 do_page_fault+48 page_fault+62 ]: 20917631 We can see that down_read_trylock() of shrinker_rwsem is being called with high frequency at that time. Because of the poor multicore scalability of atomic operations, this can lead to a significant drop in IPC (instructions per cycle). And more, the shrinker_rwsem is a global read-write lock in shrinkers subsystem, which protects most operations such as slab shrink, registration and unregistration of shrinkers, etc. This can easily cause problems in the following cases. 1) When the memory pressure is high and there are many filesystems mounted or unmounted at the same time, slab shrink will be affected (down_read_trylock() failed). Such as the real workload mentioned by Kirill Tkhai: ``` One of the real workloads from my experience is start of an overcommitted node containing many starting containers after node crash (or many resuming containers after reboot for kernel update). In these cases memory pressure is huge, and the node goes round in long reclaim. ``` 2) If a shrinker is blocked (such as the case mentioned in [1]) and a writer comes in (such as mount a fs), then this writer will be blocked and cause all subsequent shrinker-related operations to be blocked. [1]. https://lore.kernel.org/lkml/20191129214541.3110-1-ptikhomirov@virtuozzo.com/ All the above cases can be solved by replacing the shrinker_rwsem trylocks with SRCU. 2. Survey ========= Before doing the code implementation, I found that there were many similar submissions in the community: a. Davidlohr Bueso submitted a patch in 2015. Subject: [PATCH -next v2] mm: srcu-ify shrinkers Link: https://lore.kernel.org/all/1437080113.3596.2.camel@stgolabs.net/ Result: It was finally merged into the linux-next branch, but failed on arm allnoconfig (without CONFIG_SRCU) b. Tetsuo Handa submitted a patchset in 2017. Subject: [PATCH 1/2] mm,vmscan: Kill global shrinker lock. Link: https://lore.kernel.org/lkml/1510609063-3327-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp/ Result: Finally chose to use the current simple way (break when rwsem_is_contended()). And Christoph Hellwig suggested to using SRCU, but SRCU was not unconditionally enabled at the time. c. Kirill Tkhai submitted a patchset in 2018. Subject: [PATCH RFC 00/10] Introduce lockless shrink_slab() Link: https://lore.kernel.org/lkml/153365347929.19074.12509495712735843805.stgit@localhost.localdomain/ Result: At that time, SRCU was not unconditionally enabled, and there were some objections to enabling SRCU. Later, because Kirill's focus was moved to other things, this patchset was not continued to be updated. d. Sultan Alsawaf submitted a patch in 2021. Subject: [PATCH] mm: vmscan: Replace shrinker_rwsem trylocks with SRCU protection Link: https://lore.kernel.org/lkml/20210927074823.5825-1-sultan@kerneltoast.com/ Result: Rejected because SRCU was not unconditionally enabled. We can find that almost all these historical commits were abandoned because SRCU was not unconditionally enabled. But now SRCU has been unconditionally enable by Paul E. McKenney in 2023 [2], so it's time to replace shrinker_rwsem trylocks with SRCU. [2] https://lore.kernel.org/lkml/20230105003759.GA1769545@paulmck-ThinkPad-P17-Gen-1/ 3. Reproduction and testing =========================== We can reproduce the down_read_trylock() hotspot through the following script: ``` #!/bin/bash DIR="/root/shrinker/memcg/mnt" do_create() { mkdir -p /sys/fs/cgroup/memory/test mkdir -p /sys/fs/cgroup/perf_event/test echo 4G > /sys/fs/cgroup/memory/test/memory.limit_in_bytes for i in `seq 0 $1`; do mkdir -p /sys/fs/cgroup/memory/test/$i; echo $$ > /sys/fs/cgroup/memory/test/$i/cgroup.procs; echo $$ > /sys/fs/cgroup/perf_event/test/cgroup.procs; mkdir -p $DIR/$i; done } do_mount() { for i in `seq $1 $2`; do mount -t tmpfs $i $DIR/$i; done } do_touch() { for i in `seq $1 $2`; do echo $$ > /sys/fs/cgroup/memory/test/$i/cgroup.procs; echo $$ > /sys/fs/cgroup/perf_event/test/cgroup.procs; dd if=/dev/zero of=$DIR/$i/file$i bs=1M count=1 & done } case "$1" in touch) do_touch $2 $3 ;; test) do_create 4000 do_mount 0 4000 do_touch 0 3000 ;; *) exit 1 ;; esac ``` Save the above script, then run test and touch commands. Then we can use the following perf command to view hotspots: perf top -U -F 999 1) Before applying this patchset: 32.31% [kernel] [k] down_read_trylock 19.40% [kernel] [k] pv_native_safe_halt 16.24% [kernel] [k] up_read 15.70% [kernel] [k] shrink_slab 4.69% [kernel] [k] _find_next_bit 2.62% [kernel] [k] shrink_node 1.78% [kernel] [k] shrink_lruvec 0.76% [kernel] [k] do_shrink_slab 2) After applying this patchset: 27.83% [kernel] [k] _find_next_bit 16.97% [kernel] [k] shrink_slab 15.82% [kernel] [k] pv_native_safe_halt 9.58% [kernel] [k] shrink_node 8.31% [kernel] [k] shrink_lruvec 5.64% [kernel] [k] do_shrink_slab 3.88% [kernel] [k] mem_cgroup_iter At the same time, we use the following perf command to capture IPC information: perf stat -e cycles,instructions -G test -a --repeat 5 -- sleep 10 1) Before applying this patchset: Performance counter stats for 'system wide' (5 runs): 454187219766 cycles test ( +- 1.84% ) 78896433101 instructions test # 0.17 insn per cycle ( +- 0.44% ) 10.0020430 +- 0.0000366 seconds time elapsed ( +- 0.00% ) 2) After applying this patchset: Performance counter stats for 'system wide' (5 runs): 841954709443 cycles test ( +- 15.80% ) (98.69%) 527258677936 instructions test # 0.63 insn per cycle ( +- 15.11% ) (98.68%) 10.01064 +- 0.00831 seconds time elapsed ( +- 0.08% ) We can see that IPC drops very seriously when calling down_read_trylock() at high frequency. After using SRCU, the IPC is at a normal level. This patch (of 8): To prepare for the subsequent lockless memcg slab shrink, add a map_nr_max field to struct shrinker_info to records its own real shrinker_nr_max. Link: https://lkml.kernel.org/r/20230313112819.38938-1-zhengqi.arch@bytedance.com Link: https://lkml.kernel.org/r/20230313112819.38938-2-zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Suggested-by: Kirill Tkhai Acked-by: Vlastimil Babka Acked-by: Kirill Tkhai Acked-by: Roman Gushchin Cc: Christian König Cc: David Hildenbrand Cc: Davidlohr Bueso Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Paul E. McKenney Cc: Qi Zheng Cc: Shakeel Butt Cc: Sultan Alsawaf Cc: Tetsuo Handa Cc: Yang Shi Signed-off-by: Andrew Morton commit dcc1be119071f034f3123d3c618d2ef70c80125e Author: Lorenzo Stoakes Date: Mon Mar 13 12:27:14 2023 +0000 mm: prefer xxx_page() alloc/free functions for order-0 pages Update instances of alloc_pages(..., 0), __get_free_pages(..., 0) and __free_pages(..., 0) to use alloc_page(), __get_free_page() and __free_page() respectively in core code. Link: https://lkml.kernel.org/r/50c48ca4789f1da2a65795f2346f5ae3eff7d665.1678710232.git.lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Reviewed-by: David Hildenbrand Reviewed-by: Mike Rapoport (IBM) Acked-by: Mel Gorman Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Uladzislau Rezki (Sony) Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 0a54864f8dfb64b64c84c9db6ff70e0e93690a33 Author: Peter Collingbourne Date: Thu Mar 9 20:29:14 2023 -0800 kasan: remove PG_skip_kasan_poison flag Code inspection reveals that PG_skip_kasan_poison is redundant with kasantag, because the former is intended to be set iff the latter is the match-all tag. It can also be observed that it's basically pointless to poison pages which have kasantag=0, because any pages with this tag would have been pointed to by pointers with match-all tags, so poisoning the pages would have little to no effect in terms of bug detection. Therefore, change the condition in should_skip_kasan_poison() to check kasantag instead, and remove PG_skip_kasan_poison and associated flags. Link: https://lkml.kernel.org/r/20230310042914.3805818-3-pcc@google.com Link: https://linux-review.googlesource.com/id/I57f825f2eaeaf7e8389d6cf4597c8a5821359838 Signed-off-by: Peter Collingbourne Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Catalin Marinas Cc: Evgenii Stepanov Cc: Vincenzo Frascino Cc: Will Deacon Signed-off-by: Andrew Morton commit 7eb16f23b9a415f062db22739e59bb144e0b24ab Author: Sebastian Andrzej Siewior Date: Fri Mar 10 17:29:05 2023 +0100 io-mapping: don't disable preempt on RT in io_mapping_map_atomic_wc(). io_mapping_map_atomic_wc() disables preemption and pagefaults for historical reasons. The conversion to io_mapping_map_local_wc(), which only disables migration, cannot be done wholesale because quite some call sites need to be updated to accommodate with the changed semantics. On PREEMPT_RT enabled kernels the io_mapping_map_atomic_wc() semantics are problematic due to the implicit disabling of preemption which makes it impossible to acquire 'sleeping' spinlocks within the mapped atomic sections. PREEMPT_RT replaces the preempt_disable() with a migrate_disable() for more than a decade. It could be argued that this is a justification to do this unconditionally, but PREEMPT_RT covers only a limited number of architectures and it disables some functionality which limits the coverage further. Limit the replacement to PREEMPT_RT for now. This is also done kmap_atomic(). Link: https://lkml.kernel.org/r/20230310162905.O57Pj7hh@linutronix.de Signed-off-by: Sebastian Andrzej Siewior Reported-by: Richard Weinberger Link: https://lore.kernel.org/CAFLxGvw0WMxaMqYqJ5WgvVSbKHq2D2xcXTOgMCpgq9nDC-MWTQ@mail.gmail.com Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit 2c6efe9cf2d7841b75fe38ed1adbd41a90f51ba0 Author: Luis Chamberlain Date: Thu Mar 9 15:05:45 2023 -0800 shmem: add support to ignore swap In doing experimentations with shmem having the option to avoid swap becomes a useful mechanism. One of the *raves* about brd over shmem is you can avoid swap, but that's not really a good reason to use brd if we can instead use shmem. Using brd has its own good reasons to exist, but just because "tmpfs" doesn't let you do that is not a great reason to avoid it if we can easily add support for it. I don't add support for reconfiguring incompatible options, but if we really wanted to we can add support for that. To avoid swap we use mapping_set_unevictable() upon inode creation, and put a WARN_ON_ONCE() stop-gap on writepages() for reclaim. Link: https://lkml.kernel.org/r/20230309230545.2930737-7-mcgrof@kernel.org Signed-off-by: Luis Chamberlain Acked-by: Christian Brauner Tested-by: Xin Hao Reviewed-by: Davidlohr Bueso Cc: Adam Manzanares Cc: David Hildenbrand Cc: Davidlohr Bueso Cc: Hugh Dickins Cc: Kees Cook Cc: Matthew Wilcox Cc: Pankaj Raghav Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit d0f5a85442d1a0552eae681b2e8cdc86ac08aba2 Author: Luis Chamberlain Date: Thu Mar 9 15:05:44 2023 -0800 shmem: update documentation Update the docs to reflect a bit better why some folks prefer tmpfs over ramfs and clarify a bit more about the difference between brd ramdisks. While at it, add THP docs for tmpfs, both the mount options and the sysfs file. Link: https://lkml.kernel.org/r/20230309230545.2930737-6-mcgrof@kernel.org Signed-off-by: Luis Chamberlain Reviewed-by: Christian Brauner Reviewed-by: David Hildenbrand Tested-by: Xin Hao Reviewed-by: Davidlohr Bueso Cc: Adam Manzanares Cc: Davidlohr Bueso Cc: Hugh Dickins Cc: Kees Cook Cc: Matthew Wilcox Cc: Pankaj Raghav Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 9a976f0c847b67d22ed694556a3626ed92da0422 Author: Luis Chamberlain Date: Thu Mar 9 15:05:43 2023 -0800 shmem: skip page split if we're not reclaiming In theory when info->flags & VM_LOCKED we should not be getting shem_writepage() called so we should be verifying this with a WARN_ON_ONCE(). Since we should not be swapping then best to ensure we also don't do the folio split earlier too. So just move the check early to avoid folio splits in case its a dubious call. We also have a similar early bail when !total_swap_pages so just move that earlier to avoid the possible folio split in the same situation. Link: https://lkml.kernel.org/r/20230309230545.2930737-5-mcgrof@kernel.org Signed-off-by: Luis Chamberlain Acked-by: David Hildenbrand Reviewed-by: Christian Brauner Reviewed-by: Yosry Ahmed Tested-by: Xin Hao Reviewed-by: Davidlohr Bueso Cc: Adam Manzanares Cc: Davidlohr Bueso Cc: Hugh Dickins Cc: Kees Cook Cc: Matthew Wilcox Cc: Pankaj Raghav Signed-off-by: Andrew Morton commit cf7992bf6105b93d1b275001e043d8c8643015e3 Author: Luis Chamberlain Date: Thu Mar 9 15:05:42 2023 -0800 shmem: move reclaim check early on writepages() i915_gem requires huge folios to be split when swapping. However we have check for usage of writepages() to ensure it used only for swap purposes later. Avoid the splits if we're not being called for reclaim, even if they should in theory not happen. This makes the conditions easier to follow on shem_writepage(). Link: https://lkml.kernel.org/r/20230309230545.2930737-4-mcgrof@kernel.org Signed-off-by: Luis Chamberlain Acked-by: David Hildenbrand Reviewed-by: Yosry Ahmed Reviewed-by: Christian Brauner Tested-by: Xin Hao Reviewed-by: Davidlohr Bueso Cc: Adam Manzanares Cc: Davidlohr Bueso Cc: Hugh Dickins Cc: Kees Cook Cc: Matthew Wilcox Cc: Pankaj Raghav Signed-off-by: Andrew Morton commit 8ccee8c19c605a7d74f02413c59d4d3a822827d5 Author: Luis Chamberlain Date: Thu Mar 9 15:05:41 2023 -0800 shmem: set shmem_writepage() variables early shmem_writepage() sets up variables typically used *after* a possible huge page split. However even if that does happen the address space mapping should not change, and the inode does not change either. So it should be safe to set that from the very beginning. This commit makes no functional changes. Link: https://lkml.kernel.org/r/20230309230545.2930737-3-mcgrof@kernel.org Signed-off-by: Luis Chamberlain Acked-by: David Hildenbrand Reviewed-by: Christian Brauner Tested-by: Xin Hao Reviewed-by: Davidlohr Bueso Cc: Adam Manzanares Cc: Davidlohr Bueso Cc: Hugh Dickins Cc: Kees Cook Cc: Matthew Wilcox Cc: Pankaj Raghav Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 1f514bee0c086e70fb8137c15dc91c9711a3feeb Author: Luis Chamberlain Date: Thu Mar 9 15:05:40 2023 -0800 shmem: remove check for folio lock on writepage() Patch series "tmpfs: add the option to disable swap", v2. I'm doing this work as part of future experimentation with tmpfs and the page cache, but given a common complaint found about tmpfs is the innability to work without the page cache I figured this might be useful to others. It turns out it is -- at least Christian Brauner indicates systemd uses ramfs for a few use-cases because they don't want to use swap and so having this option would let them move over to using tmpfs for those small use cases, see systemd-creds(1). To see if you hit swap: mkswap /dev/nvme2n1 swapon /dev/nvme2n1 free -h With swap - what we see today ============================= mount -t tmpfs -o size=5G tmpfs /data-tmpfs/ dd if=/dev/urandom of=/data-tmpfs/5g-rand2 bs=1G count=5 free -h total used free shared buff/cache available Mem: 3.7Gi 2.6Gi 1.2Gi 2.2Gi 2.2Gi 1.2Gi Swap: 99Gi 2.8Gi 97Gi Without swap ============= free -h total used free shared buff/cache available Mem: 3.7Gi 387Mi 3.4Gi 2.1Mi 57Mi 3.3Gi Swap: 99Gi 0B 99Gi mount -t tmpfs -o size=5G -o noswap tmpfs /data-tmpfs/ dd if=/dev/urandom of=/data-tmpfs/5g-rand2 bs=1G count=5 free -h total used free shared buff/cache available Mem: 3.7Gi 2.6Gi 1.2Gi 2.3Gi 2.3Gi 1.1Gi Swap: 99Gi 21Mi 99Gi The mix and match remount testing ================================= # Cannot disable swap after it was first enabled: mount -t tmpfs -o size=5G tmpfs /data-tmpfs/ mount -t tmpfs -o remount -o size=5G -o noswap tmpfs /data-tmpfs/ mount: /data-tmpfs: mount point not mounted or bad option. dmesg(1) may have more information after failed mount system call. dmesg -c tmpfs: Cannot disable swap on remount # Remount with the same noswap option is OK: mount -t tmpfs -o size=5G -o noswap tmpfs /data-tmpfs/ mount -t tmpfs -o remount -o size=5G -o noswap tmpfs /data-tmpfs/ dmesg -c # Trying to enable swap with a remount after it first disabled: mount -t tmpfs -o size=5G -o noswap tmpfs /data-tmpfs/ mount -t tmpfs -o remount -o size=5G tmpfs /data-tmpfs/ mount: /data-tmpfs: mount point not mounted or bad option. dmesg(1) may have more information after failed mount system call. dmesg -c tmpfs: Cannot enable swap on remount if it was disabled on first mount This patch (of 6): Matthew notes we should not need to check the folio lock on the writepage() callback so remove it. This sanity check has been lingering since linux-history days. We remove this as we tidy up the writepage() callback to make things a bit clearer. Link: https://lkml.kernel.org/r/20230309230545.2930737-1-mcgrof@kernel.org Link: https://lkml.kernel.org/r/20230309230545.2930737-2-mcgrof@kernel.org Signed-off-by: Luis Chamberlain Suggested-by: Matthew Wilcox Acked-by: David Hildenbrand Reviewed-by: Christian Brauner Tested-by: Xin Hao Reviewed-by: Davidlohr Bueso Cc: Adam Manzanares Cc: Davidlohr Bueso Cc: Hugh Dickins Cc: Kees Cook Cc: Pankaj Raghav Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 5da1a8687a9685d60a92abf4f6b735579ebe6b40 Author: Jingyu Wang Date: Thu Mar 9 18:48:13 2023 +0800 mm/gup.c: fix typo in comments Link: https://lkml.kernel.org/r/20230309104813.170309-1-jingyuwang_vip@163.com Signed-off-by: Jingyu Wang Signed-off-by: Andrew Morton commit 5c63a7c32a94a7e2fecdd6754a6ff47cd4226ee1 Author: Danilo Krummrich Date: Thu Mar 2 02:10:35 2023 +0100 maple_tree: export symbol mas_preallocate() Fix missing EXPORT_SYMBOL_GPL() statement for mas_preallocate(). It isn't actually used by anything yet, but mas_preallocate() is part of the maple tree's 'Advanced API'. All other functions of this API are exported already. Link: https://lkml.kernel.org/r/20230302011035.4928-1-dakr@redhat.com Signed-off-by: Danilo Krummrich Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 452a8f40728065800b5a5b81f1152e9a16d39656 Author: Christoph Hellwig Date: Tue Mar 7 15:31:25 2023 +0100 mm,jfs: move write_one_page/folio_write_one to jfs The last remaining user of folio_write_one through the write_one_page wrapper is jfs, so move the functionality there and hard code the call to metapage_writepage. Note that the use of the pagecache by the JFS 'metapage' buffer cache is a bit odd, and we could probably do without VM-level dirty tracking at all, but that's a change for another time. Link: https://lkml.kernel.org/r/20230307143125.27778-4-hch@lst.de Signed-off-by: Christoph Hellwig Acked-by: Dave Kleikamp Cc: Changwei Ge Cc: Evgeniy Dushistov Cc: Gang He Cc: Jan Kara Cc: Jan Kara via Ocfs2-devel Cc: Joel Becker Cc: Joseph Qi Cc: Joseph Qi Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit a0d50b11bff644a6e4339874ba48f4bc02b842bc Author: Christoph Hellwig Date: Tue Mar 7 15:31:24 2023 +0100 ocfs2: don't use write_one_page in ocfs2_duplicate_clusters_by_page Use filemap_write_and_wait_range to write back the range of the dirty page instead of write_one_page in preparation of removing write_one_page and eventually ->writepage. Link: https://lkml.kernel.org/r/20230307143125.27778-3-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Joseph Qi Cc: Changwei Ge Cc: Dave Kleikamp Cc: Evgeniy Dushistov Cc: Gang He Cc: Jan Kara via Ocfs2-devel Cc: Joel Becker Cc: Joseph Qi Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 8b8d9a2d328164083b84e5b2515fa4d040bcdcdd Author: Christoph Hellwig Date: Tue Mar 7 15:31:23 2023 +0100 ufs: don't flush page immediately for DIRSYNC directories Patch series "remove most callers of write_one_page", v4. This series removes most users of the write_one_page API. These helpers internally call ->writepage which we are gradually removing from the kernel. This patch (of 3): We do not need to writeout modified directory blocks immediately when modifying them while the page is locked. It is enough to do the flush somewhat later which has the added benefit that inode times can be flushed as well. It also allows us to stop depending on write_one_page() function. Ported from an ext2 patch by Jan Kara. Link: https://lkml.kernel.org/r/20230307143125.27778-1-hch@lst.de Link: https://lkml.kernel.org/r/20230307143125.27778-2-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Dave Kleikamp Cc: Evgeniy Dushistov Cc: Jan Kara via Ocfs2-devel Cc: Joel Becker Cc: Matthew Wilcox (Oracle) Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Cc: Jan Kara Cc: Joseph Qi Signed-off-by: Andrew Morton commit 6204c9ab4a5a05a72e04c12276fffdd6c6636489 Author: Alexander Potapenko Date: Mon Mar 6 12:13:22 2023 +0100 kmsan: add test_stackdepot_roundtrip Ensure that KMSAN does not report false positives in instrumented callers of stack_depot_save(), stack_depot_print(), and stack_depot_fetch(). Link: https://lkml.kernel.org/r/20230306111322.205724-2-glider@google.com Signed-off-by: Alexander Potapenko Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Marco Elver Cc: syzbot Signed-off-by: Andrew Morton commit 8e00b2dffd822b34d8d1c627dc19f0743f9f5ac6 Author: Alexander Potapenko Date: Mon Mar 6 12:13:21 2023 +0100 lib/stackdepot: kmsan: mark API outputs as initialized KMSAN does not instrument stackdepot and may treat memory allocated by it as uninitialized. This is not a problem for KMSAN itself, because its functions calling stackdepot API are also not instrumented. But other kernel features (e.g. netdev tracker) may access stack depot from instrumented code, which will lead to false positives, unless we explicitly mark stackdepot outputs as initialized. Link: https://lkml.kernel.org/r/20230306111322.205724-1-glider@google.com Signed-off-by: Alexander Potapenko Reported-by: syzbot Reviewed-by: Dmitry Vyukov Suggested-by: Dmitry Vyukov Reviewed-by: Andrey Konovalov Cc: Marco Elver Signed-off-by: Andrew Morton commit 2178e20c24406548c97b18a2d9781d16c35b8881 Author: Yue Zhao Date: Mon Mar 6 23:41:38 2023 +0800 mm, memcg: Prevent memory.soft_limit_in_bytes load/store tearing The knob for cgroup v1 memory controller: memory.soft_limit_in_bytes is not protected by any locking so it can be modified while it is used. This is not an actual problem because races are unlikely. But it is better to use [READ|WRITE]_ONCE to prevent compiler from doing anything funky. The access of memcg->soft_limit is lockless, so it can be concurrently set at the same time as we are trying to read it. All occurrences of memcg->soft_limit are updated with [READ|WRITE]_ONCE. [findns94@gmail.com: v3] Link: https://lkml.kernel.org/r/20230308162555.14195-5-findns94@gmail.com Link: https://lkml.kernel.org/r/20230306154138.3775-5-findns94@gmail.com Signed-off-by: Yue Zhao Acked-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Tang Yizhou Signed-off-by: Andrew Morton commit 17c56de6a8c9970f56375c13f8654bbcbc94c090 Author: Yue Zhao Date: Mon Mar 6 23:41:37 2023 +0800 mm, memcg: Prevent memory.oom_control load/store tearing The knob for cgroup v1 memory controller: memory.oom_control is not protected by any locking so it can be modified while it is used. This is not an actual problem because races are unlikely. But it is better to use [READ|WRITE]_ONCE to prevent compiler from doing anything funky. The access of memcg->oom_kill_disable is lockless, so it can be concurrently set at the same time as we are trying to read it. All occurrences of memcg->oom_kill_disable are updated with [READ|WRITE]_ONCE. [findns94@gmail.com: v3] Link: https://lkml.kernel.org/r/20230308162555.14195-4-findns94@gmail.com Link: https://lkml.kernel.org/r/20230306154138.377-4-findns94@gmail.com Signed-off-by: Yue Zhao Acked-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Tang Yizhou Signed-off-by: Andrew Morton commit 82b3aa2681ca92421c4b508e7c390000273c53fe Author: Yue Zhao Date: Mon Mar 6 23:41:36 2023 +0800 mm, memcg: Prevent memory.swappiness load/store tearing The knob for cgroup v1 memory controller: memory.swappiness is not protected by any locking so it can be modified while it is used. This is not an actual problem because races are unlikely. But it is better to use [READ|WRITE]_ONCE to prevent compiler from doing anything funky. The access of memcg->swappiness and vm_swappiness is lockless, so both of them can be concurrently set at the same time as we are trying to read them. All occurrences of memcg->swappiness and vm_swappiness are updated with [READ|WRITE]_ONCE. [findns94@gmail.com: v3] Link: https://lkml.kernel.org/r/20230308162555.14195-3-findns94@gmail.com Link: https://lkml.kernel.org/r/20230306154138.3775-3-findns94@gmail.com Signed-off-by: Yue Zhao Acked-by: Michal Hocko Acked-by: Shakeel Butt Acked-by: Roman Gushchin Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Tang Yizhou Signed-off-by: Andrew Morton commit eaf7b66b76f85ce340c50b76e482c6f91593b8b0 Author: Yue Zhao Date: Mon Mar 6 23:41:35 2023 +0800 mm, memcg: Prevent memory.oom.group load/store tearing Patch series "mm, memcg: cgroup v1 and v2 tunable load/store tearing fixes", v2. This patch series helps to prevent load/store tearing in several cgroup knobs. As kindly pointed out by Michal Hocko and Roman Gushchin , the changelog has been rephrased. Besides, more knobs were checked, according to kind suggestions from Shakeel Butt and Muchun Song. This patch (of 4): The knob for cgroup v2 memory controller: memory.oom.group is not protected by any locking so it can be modified while it is used. This is not an actual problem because races are unlikely (the knob is usually configured long before any workloads hits actual memcg oom) but it is better to use READ_ONCE/WRITE_ONCE to prevent compiler from doing anything funky. The access of memcg->oom_group is lockless, so it can be concurrently set at the same time as we are trying to read it. Link: https://lkml.kernel.org/r/20230306154138.3775-1-findns94@gmail.com Link: https://lkml.kernel.org/r/20230306154138.3775-2-findns94@gmail.com Signed-off-by: Yue Zhao Acked-by: Michal Hocko Acked-by: Shakeel Butt Acked-by: Roman Gushchin Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Tang Yizhou Signed-off-by: Andrew Morton commit dd63bd7df41a8f9393a2e3ff9157a441c08eb996 Author: Zi Yan Date: Mon Mar 6 11:09:07 2023 -0500 selftests/mm: fix split huge page tests Fix two inputs to check_anon_huge() and one if condition, so the tests work as expected. Link: https://lkml.kernel.org/r/20230306160907.16804-1-zi.yan@sent.com Fixes: c07c343cda8e ("selftests/vm: dedup THP helpers") Signed-off-by: Zi Yan Reviewed-by: Zach O'Keefe Tested-by: Zach O'Keefe Acked-by: David Hildenbrand Cc: Shuah Khan Signed-off-by: Andrew Morton commit 99c29133639a29fa803ea27ec79bf9e732efd062 Author: Gerald Schaefer Date: Mon Mar 6 17:15:48 2023 +0100 mm: add PTE pointer parameter to flush_tlb_fix_spurious_fault() s390 can do more fine-grained handling of spurious TLB protection faults, when there also is the PTE pointer available. Therefore, pass on the PTE pointer to flush_tlb_fix_spurious_fault() as an additional parameter. This will add no functional change to other architectures, but those with private flush_tlb_fix_spurious_fault() implementations need to be made aware of the new parameter. Link: https://lkml.kernel.org/r/20230306161548.661740-1-gerald.schaefer@linux.ibm.com Signed-off-by: Gerald Schaefer Reviewed-by: Alexander Gordeev Acked-by: Catalin Marinas [arm64] Acked-by: Michael Ellerman [powerpc] Acked-by: David Hildenbrand Cc: Anshuman Khandual Cc: Borislav Petkov (AMD) Cc: Christophe Leroy Cc: Dave Hansen Cc: Ingo Molnar Cc: Matthew Wilcox (Oracle) Cc: Nicholas Piggin Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton commit e1807d5d27ddf1c1388fea0e9af3ed9273844e67 Author: Sergey Senozhatsky Date: Sat Mar 4 12:48:35 2023 +0900 zsmalloc: show per fullness group class stats We keep the old fullness (3/4 threshold) reporting in zs_stats_size_show(). Switch from allmost full/empty stats to fine-grained per inuse ratio (fullness group) reporting, which gives signicantly more data on classes fragmentation. Link: https://lkml.kernel.org/r/20230304034835.2082479-5-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 5a845e9f2d660907a7e1f9f333f7927b6f81b894 Author: Sergey Senozhatsky Date: Sat Mar 4 12:48:34 2023 +0900 zsmalloc: rework compaction algorithm The zsmalloc compaction algorithm has the potential to waste some CPU cycles, particularly when compacting pages within the same fullness group. This is due to the way it selects the head page of the fullness list for source and destination pages, and how it reinserts those pages during each iteration. The algorithm may first use a page as a migration destination and then as a migration source, leading to an unnecessary back-and-forth movement of objects. Consider the following fullness list: PageA PageB PageC PageD PageE During the first iteration, the compaction algorithm will select PageA as the source and PageB as the destination. All of PageA's objects will be moved to PageB, and then PageA will be released while PageB is reinserted into the fullness list. PageB PageC PageD PageE During the next iteration, the compaction algorithm will again select the head of the list as the source and destination, meaning that PageB will now serve as the source and PageC as the destination. This will result in the objects being moved away from PageB, the same objects that were just moved to PageB in the previous iteration. To prevent this avalanche effect, the compaction algorithm should not reinsert the destination page between iterations. By doing so, the most optimal page will continue to be used and its usage ratio will increase, reducing internal fragmentation. The destination page should only be reinserted into the fullness list if: - It becomes full - No source page is available. TEST ==== It's very challenging to reliably test this series. I ended up developing my own synthetic test that has 100% reproducibility. The test generates significan fragmentation (for each size class) and then performs compaction for each class individually and tracks the number of memcpy() in zs_object_copy(), so that we can compare the amount work compaction does on per-class basis. Total amount of work (zram mm_stat objs_moved) ---------------------------------------------- Old fullness grouping, old compaction algorithm: 323977 memcpy() in zs_object_copy(). Old fullness grouping, new compaction algorithm: 262944 memcpy() in zs_object_copy(). New fullness grouping, new compaction algorithm: 213978 memcpy() in zs_object_copy(). Per-class compaction memcpy() comparison (T-test) ------------------------------------------------- x Old fullness grouping, old compaction algorithm + Old fullness grouping, new compaction algorithm N Min Max Median Avg Stddev x 140 349 3513 2461 2314.1214 806.03271 + 140 289 2778 2006 1878.1714 641.02073 Difference at 95.0% confidence -435.95 +/- 170.595 -18.8387% +/- 7.37193% (Student's t, pooled s = 728.216) x Old fullness grouping, old compaction algorithm + New fullness grouping, new compaction algorithm N Min Max Median Avg Stddev x 140 349 3513 2461 2314.1214 806.03271 + 140 226 2279 1644 1528.4143 524.85268 Difference at 95.0% confidence -785.707 +/- 159.331 -33.9527% +/- 6.88516% (Student's t, pooled s = 680.132) Link: https://lkml.kernel.org/r/20230304034835.2082479-4-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 4c7ac97285d8dcb970d22b6dda9872f2c9d5f8b4 Author: Sergey Senozhatsky Date: Sat Mar 4 12:48:33 2023 +0900 zsmalloc: fine-grained inuse ratio based fullness grouping Each zspage maintains ->inuse counter which keeps track of the number of objects stored in the zspage. The ->inuse counter also determines the zspage's "fullness group" which is calculated as the ratio of the "inuse" objects to the total number of objects the zspage can hold (objs_per_zspage). The closer the ->inuse counter is to objs_per_zspage, the better. Each size class maintains several fullness lists, that keep track of zspages of particular "fullness". Pages within each fullness list are stored in random order with regard to the ->inuse counter. This is because sorting the zspages by ->inuse counter each time obj_malloc() or obj_free() is called would be too expensive. However, the ->inuse counter is still a crucial factor in many situations. For the two major zsmalloc operations, zs_malloc() and zs_compact(), we typically select the head zspage from the corresponding fullness list as the best candidate zspage. However, this assumption is not always accurate. For the zs_malloc() operation, the optimal candidate zspage should have the highest ->inuse counter. This is because the goal is to maximize the number of ZS_FULL zspages and make full use of all allocated memory. For the zs_compact() operation, the optimal source zspage should have the lowest ->inuse counter. This is because compaction needs to move objects in use to another page before it can release the zspage and return its physical pages to the buddy allocator. The fewer objects in use, the quicker compaction can release the zspage. Additionally, compaction is measured by the number of pages it releases. This patch reworks the fullness grouping mechanism. Instead of having two groups - ZS_ALMOST_EMPTY (usage ratio below 3/4) and ZS_ALMOST_FULL (usage ration above 3/4) - that result in too many zspages being included in the ALMOST_EMPTY group for specific classes, size classes maintain a larger number of fullness lists that give strict guarantees on the minimum and maximum ->inuse values within each group. Each group represents a 10% change in the ->inuse ratio compared to neighboring groups. In essence, there are groups for zspages with 0%, 10%, 20% usage ratios, and so on, up to 100%. This enhances the selection of candidate zspages for both zs_malloc() and zs_compact(). A printout of the ->inuse counters of the first 7 zspages per (random) class fullness group: class-768 objs_per_zspage 16: fullness 100%: empty fullness 99%: empty fullness 90%: empty fullness 80%: empty fullness 70%: empty fullness 60%: 8 8 9 9 8 8 8 fullness 50%: empty fullness 40%: 5 5 6 5 5 5 5 fullness 30%: 4 4 4 4 4 4 4 fullness 20%: 2 3 2 3 3 2 2 fullness 10%: 1 1 1 1 1 1 1 fullness 0%: empty The zs_malloc() function searches through the groups of pages starting with the one having the highest usage ratio. This means that it always selects a zspage from the group with the least internal fragmentation (highest usage ratio) and makes it even less fragmented by increasing its usage ratio. The zs_compact() function, on the other hand, begins by scanning the group with the highest fragmentation (lowest usage ratio) to locate the source page. The first available zspage is selected, and then the function moves downward to find a destination zspage in the group with the lowest internal fragmentation (highest usage ratio). Link: https://lkml.kernel.org/r/20230304034835.2082479-3-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit a40a71e8343e281fedce9747ac1972c5556a982b Author: Sergey Senozhatsky Date: Sat Mar 4 12:48:32 2023 +0900 zsmalloc: remove insert_zspage() ->inuse optimization Patch series "zsmalloc: fine-grained fullness and new compaction algorithm", v4. Existing zsmalloc page fullness grouping leads to suboptimal page selection for both zs_malloc() and zs_compact(). This patchset reworks zsmalloc fullness grouping/classification. Additinally it also implements new compaction algorithm that is expected to use less CPU-cycles (as it potentially does fewer memcpy-s in zs_object_copy()). Test (synthetic) results can be seen in patch 0003. This patch (of 4): This optimization has no effect. It only ensures that when a zspage was added to its corresponding fullness list, its "inuse" counter was higher or lower than the "inuse" counter of the zspage at the head of the list. The intention was to keep busy zspages at the head, so they could be filled up and moved to the ZS_FULL fullness group more quickly. However, this doesn't work as the "inuse" counter of a zspage can be modified by obj_free() but the zspage may still belong to the same fullness list. So, fix_fullness_group() won't change the zspage's position in relation to the head's "inuse" counter, leading to a largely random order of zspages within the fullness list. For instance, consider a printout of the "inuse" counters of the first 10 zspages in a class that holds 93 objects per zspage: ZS_ALMOST_EMPTY: 36 67 68 64 35 54 63 52 As we can see the zspage with the lowest "inuse" counter is actually the head of the fullness list. Remove this pointless "optimisation". Link: https://lkml.kernel.org/r/20230304034835.2082479-1-senozhatsky@chromium.org Link: https://lkml.kernel.org/r/20230304034835.2082479-2-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 3ccefdea226ba3f3b69f9e868d2b1c9995b56615 Author: Jaewon Kim Date: Fri Mar 3 14:03:32 2023 +0900 dma-buf: system_heap: avoid reclaim for order 4 Using order 4 pages would be helpful for IOMMUs mapping, but trying to get order 4 pages could spend quite much time in the page allocation. From the perspective of responsiveness, the deterministic memory allocation speed, I think, is quite important. The order 4 allocation with __GFP_RECLAIM may spend much time in reclaim and compation logic. __GFP_NORETRY also may affect. These cause unpredictable delay. To get reasonable allocation speed from dma-buf system heap, use HIGH_ORDER_GFP for order 4 to avoid reclaim. And let me remove meaningless __GFP_COMP for order 0. According to my tests, order 4 with MID_ORDER_GFP could get more number of order 4 pages but the elapsed times could be very slow. time order 8 order 4 order 0 584 usec 0 160 0 28,428 usec 0 160 0 100,701 usec 0 160 0 76,645 usec 0 160 0 25,522 usec 0 160 0 38,798 usec 0 160 0 89,012 usec 0 160 0 23,015 usec 0 160 0 73,360 usec 0 160 0 76,953 usec 0 160 0 31,492 usec 0 160 0 75,889 usec 0 160 0 84,551 usec 0 160 0 84,352 usec 0 160 0 57,103 usec 0 160 0 93,452 usec 0 160 0 If HIGH_ORDER_GFP is used for order 4, the number of order 4 could be decreased but the elapsed time results were quite stable and fast enough. time order 8 order 4 order 0 1,356 usec 0 155 80 1,901 usec 0 11 2384 1,912 usec 0 0 2560 1,911 usec 0 0 2560 1,884 usec 0 0 2560 1,577 usec 0 0 2560 1,366 usec 0 0 2560 1,711 usec 0 0 2560 1,635 usec 0 28 2112 544 usec 10 0 0 633 usec 2 128 0 848 usec 0 160 0 729 usec 0 160 0 1,000 usec 0 160 0 1,358 usec 0 160 0 2,638 usec 0 31 2064 Link: https://lkml.kernel.org/r/20230303050332.10138-1-jaewon31.kim@samsung.com Signed-off-by: Jaewon Kim Reviewed-by: John Stultz Cc: Daniel Vetter Cc: Johannes Weiner Cc: Michal Hocko Cc: Sumit Semwal Cc: T.J. Mercier Signed-off-by: Andrew Morton commit 78c74aeee5c82f68955bdff6a9511d04cde1a3c3 Author: Alexander Potapenko Date: Fri Mar 3 15:14:33 2023 +0100 kmsan: add memsetXX tests Add tests ensuring that memset16()/memset32()/memset64() are instrumented by KMSAN and correctly initialize the memory. Link: https://lkml.kernel.org/r/20230303141433.3422671-4-glider@google.com Signed-off-by: Alexander Potapenko Reviewed-by: Marco Elver Cc: Daniel Vetter Cc: Geert Uytterhoeven Cc: Helge Deller Cc: Kees Cook Cc: Tetsuo Handa Signed-off-by: Andrew Morton commit 27f644dc5a77f8d9ab6d08bc7b95f8631c1530c8 Author: Alexander Potapenko Date: Fri Mar 3 15:14:32 2023 +0100 x86: kmsan: use C versions of memset16/memset32/memset64 KMSAN must see as many memory accesses as possible to prevent false positive reports. Fall back to versions of memset16()/memset32()/memset64() implemented in lib/string.c instead of those written in assembly. Link: https://lkml.kernel.org/r/20230303141433.3422671-3-glider@google.com Signed-off-by: Alexander Potapenko Suggested-by: Tetsuo Handa Reviewed-by: Marco Elver Cc: Geert Uytterhoeven Cc: Daniel Vetter Cc: Helge Deller Cc: Kees Cook Signed-off-by: Andrew Morton commit d340292553ab48d32d3e768bbb1d11fb942fe02e Author: Alexander Potapenko Date: Fri Mar 3 15:14:31 2023 +0100 kmsan: another take at fixing memcpy tests commit 5478afc55a21 ("kmsan: fix memcpy tests") uses OPTIMIZER_HIDE_VAR() to hide the uninitialized var from the compiler optimizations. However OPTIMIZER_HIDE_VAR(uninit) enforces an immediate check of @uninit, so memcpy tests did not actually check the behavior of memcpy(), because they always contained a KMSAN report. Replace OPTIMIZER_HIDE_VAR() with a file-local macro that just clobbers the memory with a barrier(), and add a test case for memcpy() that does not expect an error report. Also reflow kmsan_test.c with clang-format. Link: https://lkml.kernel.org/r/20230303141433.3422671-2-glider@google.com Signed-off-by: Alexander Potapenko Reviewed-by: Marco Elver Cc: Daniel Vetter Cc: Geert Uytterhoeven Cc: Helge Deller Cc: Kees Cook Cc: Tetsuo Handa Signed-off-by: Andrew Morton commit 6dc4bd4e2fe395f8c9d5d0892e45ff7fed5c66f3 Author: Alexander Potapenko Date: Fri Mar 3 15:14:30 2023 +0100 x86: kmsan: don't rename memintrinsics in uninstrumented files clang -fsanitize=kernel-memory already replaces calls to memset/memcpy/memmove and their __builtin_ versions with __msan_memset/__msan_memcpy/__msan_memmove in instrumented files, so there is no need to override them. In non-instrumented versions we are now required to leave memset() and friends intact, so we cannot replace them with __msan_XXX() functions. Link: https://lkml.kernel.org/r/20230303141433.3422671-1-glider@google.com Signed-off-by: Alexander Potapenko Suggested-by: Marco Elver Reviewed-by: Marco Elver Cc: Kees Cook Cc: Daniel Vetter Cc: Geert Uytterhoeven Cc: Helge Deller Cc: Tetsuo Handa Signed-off-by: Andrew Morton commit 7cb1d7ef667716a9ff4e692e7ba1c3817d872222 Author: Peter Xu Date: Fri Mar 3 10:12:18 2023 -0500 mm/khugepaged: cleanup memcg uncharge for failure path Explicit memcg uncharging is not needed when the memcg accounting has the same lifespan of the page/folio. That becomes the case for khugepaged after Yang & Zach's recent rework so the hpage will be allocated for each collapse rather than being cached. Cleanup the explicit memcg uncharge in khugepaged failure path and leave that for put_page(). Link: https://lkml.kernel.org/r/20230303151218.311015-1-peterx@redhat.com Signed-off-by: Peter Xu Suggested-by: Zach O'Keefe Reviewed-by: Zach O'Keefe Reviewed-by: Yang Shi Cc: David Stevens Cc: Johannes Weiner Signed-off-by: Andrew Morton commit 9dabf6e1374519f89d9fc326a129b5cc35088479 Author: Anshuman Khandual Date: Thu Mar 2 17:18:45 2023 +0530 mm/debug_vm_pgtable: replace pte_mkhuge() with arch_make_huge_pte() Since the following commit arch_make_huge_pte() should be used directly in generic memory subsystem as a platform provided page table helper, instead of pte_mkhuge(). Change hugetlb_basic_tests() to call arch_make_huge_pte() directly, and update its relevant documentation entry as required. 'commit 16785bd77431 ("mm: merge pte_mkhuge() call into arch_make_huge_pte()")' Link: https://lkml.kernel.org/r/20230302114845.421674-1-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reported-by: Christophe Leroy Link: https://lore.kernel.org/all/1ea45095-0926-a56a-a273-816709e9075e@csgroup.eu/ Cc: Jonathan Corbet Cc: David Hildenbrand Cc: Mike Kravetz Cc: Mike Rapoport Signed-off-by: Andrew Morton commit 1da28f1b5ab1dd15919e75bb9a47e17912fd756c Author: Anshuman Khandual Date: Thu Mar 2 08:23:49 2023 +0530 mm/migrate: drop pte_mkhuge() in remove_migration_pte() Since the following commit, arch_make_huge_pte() should be used directly in generic memory subsystem as a platform provided page table helper, instead of pte_mkhuge(). This just drops pte_mkhuge() from remove_migration_pte(), which has now become redundant. 'commit 16785bd77431 ("mm: merge pte_mkhuge() call into arch_make_huge_pte()")' Link: https://lkml.kernel.org/r/20230302025349.358341-1-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reported-by: Christophe Leroy Link: https://lore.kernel.org/all/1ea45095-0926-a56a-a273-816709e9075e@csgroup.eu/ Reviewed-by: David Hildenbrand Cc: Mike Kravetz Signed-off-by: Andrew Morton commit 3e4fb13ac34bad94cf390415b1e6bc3ca9520d65 Author: Kefeng Wang Date: Thu Mar 2 19:58:35 2023 +0800 mm: swap: remove unneeded cgroup_throttle_swaprate() All the callers of cgroup_throttle_swaprate() are converted to folio_throttle_swaprate(), so make __cgroup_throttle_swaprate() to take a folio, and rename it to __folio_throttle_swaprate(), also rename gfp_mask to gfp and drop redundant extern keyword. finally, drop unused cgroup_throttle_swaprate(). Link: https://lkml.kernel.org/r/20230302115835.105364-8-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 68fa572b503ce8bfd0d0c2e5bb185134086d7d7d Author: Kefeng Wang Date: Thu Mar 2 19:58:34 2023 +0800 mm: memory: use folio_throttle_swaprate() in do_cow_fault() Directly use folio_throttle_swaprate() instead of cgroup_throttle_swaprate(). Link: https://lkml.kernel.org/r/20230302115835.105364-7-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit e2bf3e2caa62f72d6a67048df440d83a12ae1a2a Author: Kefeng Wang Date: Thu Mar 2 19:58:33 2023 +0800 mm: memory: use folio_throttle_swaprate() in do_anonymous_page() Directly use folio_throttle_swaprate() instead of cgroup_throttle_swaprate(). Link: https://lkml.kernel.org/r/20230302115835.105364-6-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 4d4f75bf3293f35ae1eb1ecf8b70bffdde58ffbe Author: Kefeng Wang Date: Thu Mar 2 19:58:32 2023 +0800 mm: memory: use folio_throttle_swaprate() in wp_page_copy() Directly use folio_throttle_swaprate() instead of cgroup_throttle_swaprate(). Link: https://lkml.kernel.org/r/20230302115835.105364-5-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit e601ded4247f959702adb5170ca8abac17a0313f Author: Kefeng Wang Date: Thu Mar 2 19:58:31 2023 +0800 mm: memory: use folio_throttle_swaprate() in page_copy_prealloc() Directly use folio_throttle_swaprate() instead of cgroup_throttle_swaprate(). Link: https://lkml.kernel.org/r/20230302115835.105364-4-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 4231f8425833b144f165f01f33887b67f494acf0 Author: Kefeng Wang Date: Thu Mar 2 19:58:30 2023 +0800 mm: memory: use folio_throttle_swaprate() in do_swap_page() Directly use folio_throttle_swaprate() instead of cgroup_throttle_swaprate(). Link: https://lkml.kernel.org/r/20230302115835.105364-3-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit cfe3236d32d07bf261760472fee5d7029eb02779 Author: Kefeng Wang Date: Thu Mar 2 19:58:29 2023 +0800 mm: huge_memory: convert __do_huge_pmd_anonymous_page() to use a folio Patch series "mm: remove cgroup_throttle_swaprate() completely", v2. Convert all the caller functions of cgroup_throttle_swaprate() to use folios, and use folio_throttle_swaprate(), which allows us to remove cgroup_throttle_swaprate() completely. This patch (of 7): Convert from page to folio within __do_huge_pmd_anonymous_page(), as we need the precise page which is to be stored at this PTE in the folio, the function still keep a page as the parameter. Link: https://lkml.kernel.org/r/20230302115835.105364-1-wangkefeng.wang@huawei.com Link: https://lkml.kernel.org/r/20230302115835.105364-2-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 16d91faf09be148d9c1cf4999f4d15fb24a7cd72 Author: Peter Collingbourne Date: Thu Feb 16 11:59:24 2023 -0800 kasan: call clear_page with a match-all tag instead of changing page tag Instead of changing the page's tag solely in order to obtain a pointer with a match-all tag and then changing it back again, just convert the pointer that we get from kmap_atomic() into one with a match-all tag before passing it to clear_page(). On a certain microarchitecture, this has been observed to cause a measurable improvement in microbenchmark performance, presumably as a result of being able to avoid the atomic operations on the page tag. Link: https://lkml.kernel.org/r/20230216195924.3287772-1-pcc@google.com Signed-off-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/I0249822cc29097ca7a04ad48e8eb14871f80e711 Reviewed-by: Andrey Konovalov Reviewed-by: Catalin Marinas Cc: Andrey Ryabinin Cc: Evgenii Stepanov Cc: Peter Collingbourne Cc: Vincenzo Frascino Cc: Will Deacon Signed-off-by: Andrew Morton commit af7df1c986adfe0684cb0b91114e0ac442b942e9 Author: Ivan Orlov Date: Sun Feb 26 16:16:33 2023 +0300 selftests: cgroup: add 'malloc' failures checks in test_memcontrol There are several 'malloc' calls in test_memcontrol, which can be unsuccessful. This patch will add 'malloc' failures checking to give more details about test's fail reasons and avoid possible undefined behavior during the future null dereference (like the one in alloc_anon_50M_check_swap function). Link: https://lkml.kernel.org/r/20230226131634.34366-1-ivan.orlov0322@gmail.com Signed-off-by: Ivan Orlov Reviewed-by: Muchun Song Acked-by: Shakeel Butt Acked-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Shuah Khan Cc: Tejun Heo Cc: Zefan Li Signed-off-by: Andrew Morton commit bdeb91881088810ab1d8ae620862c3b4d78f4041 Author: Uros Bizjak Date: Mon Feb 27 22:42:28 2023 +0100 mm/rmap: use atomic_try_cmpxchg in set_tlb_ubc_flush_pending Use atomic_try_cmpxchg instead of atomic_cmpxchg (*ptr, old, new) == old in set_tlb_ubc_flush_pending. 86 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. No functional change intended. Link: https://lkml.kernel.org/r/20230227214228.3533299-1-ubizjak@gmail.com Signed-off-by: Uros Bizjak Signed-off-by: Andrew Morton commit f2421a16f42a2f121c587c89b60cc8f3f2df36c2 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Mon Jan 30 13:25:14 2023 +0900 mm/debug: use %pGt to display page_type in dump_page() Some page flags are stored in page_type rather than ->flags field. Use newly introduced page type %pGt in dump_page(). Below are some examples: page:00000000da7184dd refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101cb3 flags: 0x2ffff0000000000(node=0|zone=2|lastcpupid=0xffff) page_type: 0xffffffff() raw: 02ffff0000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: newly allocated page page:00000000da7184dd refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x101cb3 flags: 0x2ffff0000000000(node=0|zone=2|lastcpupid=0xffff) page_type: 0xffffff7f(buddy) raw: 02ffff0000000000 ffff88813fff8e80 ffff88813fff8e80 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffff7f 0000000000000000 page dumped because: freed page page:0000000042202316 refcount:3 mapcount:2 mapping:0000000000000000 index:0x7f634722a pfn:0x11994e memcg:ffff888100135000 anon flags: 0x2ffff0000080024(uptodate|active|swapbacked|node=0|zone=2|lastcpupid=0xffff) page_type: 0x1() raw: 02ffff0000080024 0000000000000000 dead000000000122 ffff8881193398f1 raw: 00000007f634722a 0000000000000000 0000000300000001 ffff888100135000 page dumped because: user-mapped page Link: https://lkml.kernel.org/r/20230130042514.2418-4-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Andy Shevchenko Cc: David Hildenbrand Cc: Joe Perches Cc: John Ogness Cc: Matthew Wilcox Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Steven Rostedt (Google) Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 4c85c0be3d7a9a7ffe48bfe0954eacc0ba9d3c75 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Mon Jan 30 13:25:13 2023 +0900 mm, printk: introduce new format %pGt for page_type %pGp format is used to display 'flags' field of a struct page. However, some page flags (i.e. PG_buddy, see page-flags.h for more details) are stored in page_type field. To display human-readable output of page_type, introduce %pGt format. It is important to note the meaning of bits are different in page_type. if page_type is 0xffffffff, no flags are set. Setting PG_buddy (0x00000080) flag results in a page_type of 0xffffff7f. Clearing a bit actually means setting a flag. Bits in page_type are inverted when displaying type names. Only values for which page_type_has_type() returns true are considered as page_type, to avoid confusion with mapcount values. if it returns false, only raw values are displayed and not page type names. Link: https://lkml.kernel.org/r/20230130042514.2418-3-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Petr Mladek [vsprintf part] Cc: Andy Shevchenko Cc: David Hildenbrand Cc: Joe Perches Cc: John Ogness Cc: Matthew Wilcox Cc: Sergey Senozhatsky Cc: Steven Rostedt (Google) Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit e26fcc02c7f6c76cba42d043756e35a78ce9ac11 Author: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Mon Jan 30 13:25:12 2023 +0900 mmflags.h: use less error prone method to define pageflag_names Patch series "mm, printk: introduce new format for page_type", v4. This series moves PG_slab page flag to page_type, freeing one bit in page->flags and introduces %pGt format that prints human-readable page_type like %pGp for printing page flags. See changelog of patch 2 for more implementation details. Thanks everyone that gave valuable comments. This patch (of 3): Use helper macro to decrease chances of typo when defining pageflag_names. Link: https://lkml.kernel.org/r/20230130042514.2418-1-42.hyeyoo@gmail.com Link: https://lore.kernel.org/lkml/Y6AycLbpjVzXM5I9@smile.fi.intel.com Link: https://lkml.kernel.org/r/20230130042514.2418-2-42.hyeyoo@gmail.com Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Cc: David Hildenbrand Cc: Joe Perches Cc: Matthew Wilcox Cc: Petr Mladek Cc: Steven Rostedt (Google) Cc: Vlastimil Babka Cc: Sergey Senozhatsky Cc: Steven Rostedt Cc: John Ogness Signed-off-by: Andrew Morton commit 739100c88f49a67c6487bb2d826b0b5a2ddc80e2 Author: Stefan Roesch Date: Fri Feb 10 13:46:45 2023 -0800 mm: add tracepoints to ksm This adds the following tracepoints to ksm: - start / stop scan - ksm enter / exit - merge a page - merge a page with ksm - remove a page - remove a rmap item This patch has been split off from the RFC patch series "mm: process/cgroup ksm support". Link: https://lkml.kernel.org/r/20230210214645.2720847-1-shr@devkernel.io Signed-off-by: Stefan Roesch Reviewed-by: Steven Rostedt (Google) Signed-off-by: Andrew Morton commit 77f68ebeee201e8960944863c03bd7ac613ca7ed Author: Nicholas Piggin Date: Fri Feb 3 17:18:37 2023 +1000 powerpc/64s: enable MMU_LAZY_TLB_SHOOTDOWN On a 16-socket 192-core POWER8 system, the context_switch1_threads benchmark from will-it-scale (see earlier changelog), upstream can achieve a rate of about 1 million context switches per second, due to contention on the mm refcount. 64s meets the prerequisites for CONFIG_MMU_LAZY_TLB_SHOOTDOWN, so enable the option. This increases the above benchmark to 118 million context switches per second. This generates 314 additional IPI interrupts on a 144 CPU system doing a kernel compile, which is in the noise in terms of kernel cycles. Link: https://lkml.kernel.org/r/20230203071837.1136453-6-npiggin@gmail.com Signed-off-by: Nicholas Piggin Acked-by: Linus Torvalds Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Christophe Leroy Cc: Dave Hansen Cc: Michael Ellerman Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Signed-off-by: Andrew Morton commit 2655421ae69fa479df1575cb2630af9131d28939 Author: Nicholas Piggin Date: Fri Feb 3 17:18:36 2023 +1000 lazy tlb: shoot lazies, non-refcounting lazy tlb mm reference handling scheme On big systems, the mm refcount can become highly contented when doing a lot of context switching with threaded applications. user<->idle switch is one of the important cases. Abandoning lazy tlb entirely slows this switching down quite a bit in the common uncontended case, so that is not viable. Implement a scheme where lazy tlb mm references do not contribute to the refcount, instead they get explicitly removed when the refcount reaches zero. The final mmdrop() sends IPIs to all CPUs in the mm_cpumask and they switch away from this mm to init_mm if it was being used as the lazy tlb mm. Enabling the shoot lazies option therefore requires that the arch ensures that mm_cpumask contains all CPUs that could possibly be using mm. A DEBUG_VM option IPIs every CPU in the system after this to ensure there are no references remaining before the mm is freed. Shootdown IPIs cost could be an issue, but they have not been observed to be a serious problem with this scheme, because short-lived processes tend not to migrate CPUs much, therefore they don't get much chance to leave lazy tlb mm references on remote CPUs. There are a lot of options to reduce them if necessary, described in comments. The near-worst-case can be benchmarked with will-it-scale: context_switch1_threads -t $(($(nproc) / 2)) This will create nproc threads (nproc / 2 switching pairs) all sharing the same mm that spread over all CPUs so each CPU does thread->idle->thread switching. [ Rik came up with basically the same idea a few years ago, so credit to him for that. ] Link: https://lore.kernel.org/linux-mm/20230118080011.2258375-1-npiggin@gmail.com/ Link: https://lore.kernel.org/all/20180728215357.3249-11-riel@surriel.com/ Link: https://lkml.kernel.org/r/20230203071837.1136453-5-npiggin@gmail.com Signed-off-by: Nicholas Piggin Acked-by: Linus Torvalds Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Christophe Leroy Cc: Dave Hansen Cc: Michael Ellerman Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Signed-off-by: Andrew Morton commit 88e3009b5283bbd41447f0352d0b9df16cf6f183 Author: Nicholas Piggin Date: Fri Feb 3 17:18:35 2023 +1000 lazy tlb: allow lazy tlb mm refcounting to be configurable Add CONFIG_MMU_TLB_REFCOUNT which enables refcounting of the lazy tlb mm when it is context switched. This can be disabled by architectures that don't require this refcounting if they clean up lazy tlb mms when the last refcount is dropped. Currently this is always enabled, so the patch introduces no functional change. Link: https://lkml.kernel.org/r/20230203071837.1136453-4-npiggin@gmail.com Signed-off-by: Nicholas Piggin Acked-by: Linus Torvalds Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Christophe Leroy Cc: Dave Hansen Cc: Michael Ellerman Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Signed-off-by: Andrew Morton commit aa464ba9a1e444d5ef95bb63ee3b2ef26fc96ed7 Author: Nicholas Piggin Date: Fri Feb 3 17:18:34 2023 +1000 lazy tlb: introduce lazy tlb mm refcount helper functions Add explicit _lazy_tlb annotated functions for lazy tlb mm refcounting. This makes the lazy tlb mm references more obvious, and allows the refcounting scheme to be modified in later changes. There is no functional change with this patch. Link: https://lkml.kernel.org/r/20230203071837.1136453-3-npiggin@gmail.com Signed-off-by: Nicholas Piggin Acked-by: Linus Torvalds Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Christophe Leroy Cc: Dave Hansen Cc: Michael Ellerman Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Signed-off-by: Andrew Morton commit 6cad87b0d216c6acdc40c5531c7b62db33fef5b1 Author: Nicholas Piggin Date: Fri Feb 3 17:18:33 2023 +1000 kthread: simplify kthread_use_mm refcounting Patch series "shoot lazy tlbs (lazy tlb refcount scalability improvement)", v7. This series improves scalability of context switching between user and kernel threads on large systems with a threaded process spread across a lot of CPUs. Discussion of v6 here: https://lore.kernel.org/linux-mm/20230118080011.2258375-1-npiggin@gmail.com/ This patch (of 5): Remove the special case avoiding refcounting when the mm to be used is the same as the kernel thread's active (lazy tlb) mm. kthread_use_mm() should not be such a performance critical path that this matters much. This simplifies a later change to lazy tlb mm refcounting. Link: https://lkml.kernel.org/r/20230203071837.1136453-1-npiggin@gmail.com Link: https://lkml.kernel.org/r/20230203071837.1136453-2-npiggin@gmail.com Signed-off-by: Nicholas Piggin Acked-by: Linus Torvalds Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Dave Hansen Cc: Linus Torvalds Cc: Nadav Amit Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Signed-off-by: Andrew Morton commit 62bf1258ec90554c3c0925951149cfe4b67a3e98 Author: Taejoon Song Date: Mon Feb 6 04:00:36 2023 +0900 mm/zswap: try to avoid worst-case scenario on same element pages The worst-case scenario on finding same element pages is that almost all elements are same at the first glance but only last few elements are different. Since the same element tends to be grouped from the beginning of the pages, if we check the first element with the last element before looping through all elements, we might have some chances to quickly detect non-same element pages. 1. Test is done under LG webOS TV (64-bit arch) 2. Dump the swap-out pages (~819200 pages) 3. Analyze the pages with simple test script which counts the iteration number and measures the speed at off-line Under 64-bit arch, the worst iteration count is PAGE_SIZE / 8 bytes = 512. The speed is based on the time to consume page_same_filled() function only. The result, on average, is listed as below: Num of Iter Speed(MB/s) Looping-Forward (Orig) 38 99265 Looping-Backward 36 102725 Last-element-check (This Patch) 33 125072 The result shows that the average iteration count decreases by 13% and the speed increases by 25% with this patch. This patch does not increase the overall time complexity, though. I also ran simpler version which uses backward loop. Just looping backward also makes some improvement, but less than this patch. A similar change has already been made to zram in 90f82cbfe502 ("zram: try to avoid worst-case scenario on same element pages"). Link: https://lkml.kernel.org/r/20230205190036.1730134-1-taejoon.song@lge.com Signed-off-by: Taejoon Song Reviewed-by: Sergey Senozhatsky Cc: Dan Streetman Cc: Seth Jennings Cc: Taejoon Song Cc: Vitaly Wool Cc: Minchan Kim Cc: Signed-off-by: Andrew Morton commit 32d32ef140de3cc3f6817999415a72f7b0cb52f5 Author: T.J. Alumbaugh Date: Tue Feb 14 03:54:45 2023 +0000 mm: multi-gen LRU: improve design doc This patch improves the design doc. Specifically, 1. add a section for the per-memcg mm_struct list, and 2. add a section for the PID controller. Link: https://lkml.kernel.org/r/20230214035445.1250139-2-talumbau@google.com Signed-off-by: T.J. Alumbaugh Cc: Yu Zhao Signed-off-by: Andrew Morton commit 9a52b2f32a0942047348b30f866b846da5fcf4e3 Author: T.J. Alumbaugh Date: Tue Feb 14 03:54:44 2023 +0000 mm: multi-gen LRU: clean up sysfs code This patch cleans up the sysfs code. Specifically, 1. use sysfs_emit(), 2. use __ATTR_RW(), and 3. constify multi-gen LRU struct attribute_group. Link: https://lkml.kernel.org/r/20230214035445.1250139-1-talumbau@google.com Signed-off-by: T.J. Alumbaugh Cc: Yu Zhao Signed-off-by: Andrew Morton commit d155df53f31068c3340733d586eb9b3ddfd70fc5 Author: Ma Wupeng Date: Fri Feb 17 10:56:15 2023 +0800 x86/mm/pat: clear VM_PAT if copy_p4d_range failed Syzbot reports a warning in untrack_pfn(). Digging into the root we found that this is due to memory allocation failure in pmd_alloc_one. And this failure is produced due to failslab. In copy_page_range(), memory alloaction for pmd failed. During the error handling process in copy_page_range(), mmput() is called to remove all vmas. While untrack_pfn this empty pfn, warning happens. Here's a simplified flow: dup_mm dup_mmap copy_page_range copy_p4d_range copy_pud_range copy_pmd_range pmd_alloc __pmd_alloc pmd_alloc_one page = alloc_pages(gfp, 0); if (!page) return NULL; mmput exit_mmap unmap_vmas unmap_single_vma untrack_pfn follow_phys WARN_ON_ONCE(1); Since this vma is not generate successfully, we can clear flag VM_PAT. In this case, untrack_pfn() will not be called while cleaning this vma. Function untrack_pfn_moved() has also been renamed to fit the new logic. Link: https://lkml.kernel.org/r/20230217025615.1595558-1-mawupeng1@huawei.com Signed-off-by: Ma Wupeng Reported-by: Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Peter Zijlstra Cc: Suresh Siddha Cc: Toshi Kani Signed-off-by: Andrew Morton commit a1b92a3f14984c96ace381f204b5d72c0805296e Author: Muhammad Usama Anjum Date: Fri Feb 17 15:55:58 2023 +0500 mm/userfaultfd: support WP on multiple VMAs mwriteprotect_range() errors out if [start, end) doesn't fall in one VMA. We are facing a use case where multiple VMAs are present in one range of interest. For example, the following pseudocode reproduces the error which we are trying to fix: - Allocate memory of size 16 pages with PROT_NONE with mmap - Register userfaultfd - Change protection of the first half (1 to 8 pages) of memory to PROT_READ | PROT_WRITE. This breaks the memory area in two VMAs. - Now UFFDIO_WRITEPROTECT_MODE_WP on the whole memory of 16 pages errors out. This is a simple use case where user may or may not know if the memory area has been divided into multiple VMAs. We need an implementation which doesn't disrupt the already present users. So keeping things simple, stop going over all the VMAs if any one of the VMA hasn't been registered in WP mode. While at it, remove the un-needed error check as well. [akpm@linux-foundation.org: s/VM_WARN_ON_ONCE/VM_WARN_ONCE/ to fix build] Link: https://lkml.kernel.org/r/20230217105558.832710-1-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum Acked-by: Peter Xu Acked-by: David Hildenbrand Reported-by: Paul Gofman Signed-off-by: Andrew Morton commit 700d2e9a36b93601270c1e15550acde2521386c5 Author: Vlastimil Babka Date: Thu Feb 16 10:51:31 2023 +0100 mm, page_alloc: reduce page alloc/free sanity checks Historically, we have performed sanity checks on all struct pages being allocated or freed, making sure they have no unexpected page flags or certain field values. This can detect insufficient cleanup and some cases of use-after-free, although on its own it can't always identify the culprit. The result is a warning and the "bad page" being leaked. The checks do need some cpu cycles, so in 4.7 with commits 479f854a207c ("mm, page_alloc: defer debugging checks of pages allocated from the PCP") and 4db7548ccbd9 ("mm, page_alloc: defer debugging checks of freed pages until a PCP drain") they were no longer performed in the hot paths when allocating and freeing from pcplists, but only when pcplists are bypassed, refilled or drained. For debugging purposes, with CONFIG_DEBUG_VM enabled the checks were instead still done in the hot paths and not when refilling or draining pcplists. With 4462b32c9285 ("mm, page_alloc: more extensive free page checking with debug_pagealloc"), enabling debug_pagealloc also moved the sanity checks back to hot pahs. When both debug_pagealloc and CONFIG_DEBUG_VM are enabled, the checks are done both in hotpaths and pcplist refill/drain. Even though the non-debug default today might seem to be a sensible tradeoff between overhead and ability to detect bad pages, on closer look it's arguably not. As most allocations go through the pcplists, catching any bad pages when refilling or draining pcplists has only a small chance, insufficient for debugging or serious hardening purposes. On the other hand the cost of the checks is concentrated in the already expensive drain/refill batching operations, and those are done under the often contended zone lock. That was recently identified as an issue for page allocation and the zone lock contention reduced by moving the checks outside of the locked section with a patch "mm: reduce lock contention of pcp buffer refill", but the cost of the checks is still visible compared to their removal [1]. In the pcplist draining path free_pcppages_bulk() the checks are still done under zone->lock. Thus, remove the checks from pcplist refill and drain paths completely. Introduce a static key check_pages_enabled to control checks during page allocation a freeing (whether pcplist is used or bypassed). The static key is enabled if either is true: - kernel is built with CONFIG_DEBUG_VM=y (debugging) - debug_pagealloc or page poisoning is boot-time enabled (debugging) - init_on_alloc or init_on_free is boot-time enabled (hardening) The resulting user visible changes: - no checks when draining/refilling pcplists - less overhead, with likely no practical reduction of ability to catch bad pages - no checks when bypassing pcplists in default config (no debugging/hardening) - less overhead etc. as above - on typical hardened kernels [2], checks are now performed on each page allocation/free (previously only when bypassing/draining/refilling pcplists) - the init_on_alloc/init_on_free enabled should be sufficient indication for preferring more costly alloc/free operations for hardening purposes and we shouldn't need to introduce another toggle - code (various wrappers) removal and simplification [1] https://lore.kernel.org/all/68ba44d8-6899-c018-dcb3-36f3a96e6bea@sra.uni-hannover.de/ [2] https://lore.kernel.org/all/63ebc499.a70a0220.9ac51.29ea@mx.google.com/ [akpm@linux-foundation.org: coding-style cleanups] [akpm@linux-foundation.org: make check_pages_enabled static] Link: https://lkml.kernel.org/r/20230216095131.17336-1-vbabka@suse.cz Reported-by: Alexander Halbuer Reported-by: Andrew Morton Signed-off-by: Vlastimil Babka Cc: Kees Cook Cc: Mel Gorman Signed-off-by: Andrew Morton commit 2ede3c13be889900f8f5c04b5dc6298201d835c4 Author: Alexander Halbuer Date: Wed Feb 1 17:25:49 2023 +0100 mm: reduce lock contention of pcp buffer refill rmqueue_bulk() batches the allocation of multiple elements to refill the per-CPU buffers into a single hold of the zone lock. Each element is allocated and checked using check_pcp_refill(). The check touches every related struct page which is especially expensive for higher order allocations (huge pages). This patch reduces the time holding the lock by moving the check out of the critical section similar to rmqueue_buddy() which allocates a single element. Measurements of parallel allocation-heavy workloads show a reduction of the average huge page allocation latency of 50 percent for two cores and nearly 90 percent for 24 cores. Link: https://lkml.kernel.org/r/20230201162549.68384-1-halbuer@sra.uni-hannover.de Signed-off-by: Alexander Halbuer Cc: Mel Gorman Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit a4a4659d86ec0395164dc346c1a7f4d2d1ff4db2 Author: Thomas Weißschuh Date: Mon Feb 20 23:23:31 2023 +0000 mm: cma: make kobj_type structure constant Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Link: https://lkml.kernel.org/r/20230220-kobj_type-mm-cma-v1-1-45996cff1a81@weissschuh.net Signed-off-by: Thomas Weißschuh Cc: Wedson Almeida Filho Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton commit 94c02ad7ff12b988bd7ccf522f23e0b1f68659e0 Author: Peter Xu Date: Wed Feb 22 14:52:47 2023 -0500 mm/khugepaged: alloc_charge_hpage() take care of mem charge errors If memory charge failed, instead of returning the hpage but with an error, allow the function to cleanup the folio properly, which is normally what a function should do in this case - either return successfully, or return with no side effect of partial runs with an indicated error. This will also avoid the caller calling mem_cgroup_uncharge() unnecessarily with either anon or shmem path (even if it's safe to do so). Link: https://lkml.kernel.org/r/20230222195247.791227-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: David Stevens Acked-by: Johannes Weiner Reviewed-by: Yang Shi Reviewed-by: Zach O'Keefe Signed-off-by: Andrew Morton commit 12318566c5507a5ff4507d5bc5fe45895ffb0e05 Author: Muchun Song Date: Thu Feb 23 14:59:47 2023 +0800 mm: hugetlb_vmemmap: simplify hugetlb_vmemmap_init() a bit The check of IS_ENABLED(CONFIG_PROC_SYSCTL) is unnecessary since register_sysctl_init() will be empty in this case. So, there is no warnings after removing the check. Link: https://lkml.kernel.org/r/20230223065947.64134-1-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Signed-off-by: Andrew Morton commit 163c2c7059178898ad7512294ca3a768df2c1515 Author: Saeed Mahameed Date: Tue Mar 28 13:07:23 2023 -0700 net/mlx5e: Fix build break on 32bit The cited commit caused the following build break in mlx5 due to a change in size of MAX_SKB_FRAGS. error: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'unsigned int' [-Werror=format=] Fix this by explicit casting. Fixes: 3948b05950fd ("net: introduce a config option to tweak MAX_SKB_FRAGS") Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230328200723.125122-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 8be098a9eb2710bc5381ba1ebaac660f8d9b6963 Author: Masami Hiramatsu (Google) Date: Thu Feb 2 00:56:55 2023 +0900 docs: tracing: Update fprobe documentation Update fprobe.rst for - the private entry_data argument - the return value of the entry handler - the nr_rethook_node field. Link: https://lkml.kernel.org/r/167526701579.433354.3057889264263546659.stgit@mhiramat.roam.corp.google.com Cc: Florent Revest Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 87de2163a36b3ffb0d2e0df8e903dc7e30566548 Author: Masami Hiramatsu (Google) Date: Thu Feb 2 00:56:46 2023 +0900 lib/test_fprobe: Add a testcase for skipping exit_handler Add a testcase for skipping exit_handler if entry_handler returns !0. Link: https://lkml.kernel.org/r/167526700658.433354.12922388040490848613.stgit@mhiramat.roam.corp.google.com Cc: Florent Revest Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 39d954200bf6ad503c722e44d0be80c7b826fa42 Author: Masami Hiramatsu (Google) Date: Thu Feb 2 00:56:38 2023 +0900 fprobe: Skip exit_handler if entry_handler returns !0 Skip hooking function return and calling exit_handler if the entry_handler() returns !0. Link: https://lkml.kernel.org/r/167526699798.433354.10998365726830117303.stgit@mhiramat.roam.corp.google.com Cc: Florent Revest Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 7e7ef1bfe5522faab6f245ced7b6749e9ac410d8 Author: Masami Hiramatsu (Google) Date: Thu Feb 2 00:56:28 2023 +0900 lib/test_fprobe: Add a test case for nr_maxactive Add a test case for nr_maxactive. If the number of active functions is more than nr_maxactive, it must be skipped. Link: https://lkml.kernel.org/r/167526698856.433354.4430007340787176666.stgit@mhiramat.roam.corp.google.com Cc: Florent Revest Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 59a7a298565aa0ce44ce8e4fbcbb89a19730013a Author: Masami Hiramatsu (Google) Date: Thu Feb 2 00:56:19 2023 +0900 fprobe: Add nr_maxactive to specify rethook_node pool size Add nr_maxactive to specify rethook_node pool size. This means the maximum number of actively running target functions concurrently for probing by exit_handler. Note that if the running function is preempted or sleep, it is still counted as 'active'. Link: https://lkml.kernel.org/r/167526697917.433354.17779774988245113106.stgit@mhiramat.roam.corp.google.com Cc: Florent Revest Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 34cabf8fd18f31c773b489d4113fbf6cb5b964c9 Author: Masami Hiramatsu (Google) Date: Thu Feb 2 00:56:10 2023 +0900 lib/test_fprobe: Add private entry_data testcases Add test cases for checking whether private entry_data is correctly passed or not. Link: https://lkml.kernel.org/r/167526697074.433354.17790288501657876219.stgit@mhiramat.roam.corp.google.com Cc: Florent Revest Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 76d0de5729c0569c4071e7f21fcab394e502f03a Author: Masami Hiramatsu (Google) Date: Thu Feb 2 00:56:01 2023 +0900 fprobe: Pass entry_data to handlers Pass the private entry_data to the entry and exit handlers so that they can share the context data, something like saved function arguments etc. User must specify the private entry_data size by @entry_data_size field before registering the fprobe. Link: https://lkml.kernel.org/r/167526696173.433354.17408372048319432574.stgit@mhiramat.roam.corp.google.com Cc: Florent Revest Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit f62ad0f6f4dd03b6fa45b5afb46084511c7d9920 Author: Dmitry Baryshkov Date: Tue Feb 14 15:35:03 2023 +0300 drm/msm/adreno: split a6xx fault handler into generic and a6xx parts Split the a6xx_fault_handler() into the generic adreno_fault_handler() and platform-specific parts. The adreno_fault_handler() can further be used by a5xx and hopefully by a4xx (at some point). Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/522722/ Link: https://lore.kernel.org/r/20230214123504.3729522-3-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 8cceb773f565f3a6e3c6c09198aef5a394154ca9 Author: Dmitry Baryshkov Date: Tue Feb 14 15:35:02 2023 +0300 drm/msm/adreno: stall translation on fault for all GPU families The commit e25e92e08e32 ("drm/msm: devcoredump iommu fault support") enabled SMMU stalling to collect GPU state, but only for a6xx. It tied enabling the stall with tha per-instance pagetables creation. Since that commit SoCs with a5xx also gained support for adreno-smmu-priv. Move stalling into generic code and add corresponding resume_translation calls. Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/522720/ Link: https://lore.kernel.org/r/20230214123504.3729522-2-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 52ff0d3073d291f53f70c87656ecce4eb6d527ff Author: Rob Clark Date: Wed Mar 8 07:53:05 2023 -0800 drm/msm/atomic: Switch to vblank_start helper Drop our custom thing and switch to drm_crtc_next_vblank_start() for calculating the time of the start of the next vblank period. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/525819/ Link: https://lore.kernel.org/r/20230308155322.344664-15-robdclark@gmail.com commit b5a24e13c8c8b2c98d114b16da40712b80d5cfc1 Author: Rob Clark Date: Wed Mar 8 07:53:04 2023 -0800 drm/msm: Add wait-boost support Add a way for various userspace waits to signal urgency. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/525817/ Link: https://lore.kernel.org/r/20230308155322.344664-14-robdclark@gmail.com commit f8b8487c0756ead2e3584550e5a4d4ce4a1e520f Author: Rob Clark Date: Wed Mar 8 07:53:03 2023 -0800 drm/msm: Add deadline based boost support Track the nearest deadline on a fence timeline and set a timer to expire shortly before to trigger boost if the fence has not yet been signaled. v2: rebase Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/525816/ Link: https://lore.kernel.org/r/20230308155322.344664-13-robdclark@gmail.com commit 1ad0510cf730d8556fa7ff067b72aa960dde454b Merge: 8559da8fdfe57 d39e48ca80c09 Author: Rob Clark Date: Tue Mar 28 15:45:53 2023 -0700 Merge tag 'dma-fence-deadline' into HEAD This series adds a deadline hint to fences, so realtime deadlines such as vblank can be communicated to the fence signaller for power/ frequency management decisions. This is partially inspired by a trick i915 does, but implemented via dma-fence for a couple of reasons: 1) To continue to be able to use the atomic helpers 2) To support cases where display and gpu are different drivers See https://patchwork.freedesktop.org/series/93035/ This does not yet add any UAPI, although this will be needed in a number of cases: 1) Workloads "ping-ponging" between CPU and GPU, where we don't want the GPU freq governor to interpret time stalled waiting for GPU as "idle" time 2) Cases where the compositor is waiting for fences to be signaled before issuing the atomic ioctl, for example to maintain 60fps cursor updates even when the GPU is not able to maintain that framerate. Signed-off-by: Rob Clark commit 1554413537fdbc6fcb284f5419203d4945a4781d Merge: 0514b376da09f 1dc40551f206d Author: Bjorn Andersson Date: Tue Mar 28 15:32:04 2023 -0700 Merge branch 'arm64-fixes-for-6.3' into arm64-for-6.4 Merge the arm64-fixes-for-6.3 branch to avoid merge conflicts with changes for v6.4. commit d39e48ca80c0960b039cb38633957f0040f63e1a Author: Rob Clark Date: Fri Sep 3 11:47:54 2021 -0700 drm/atomic-helper: Set fence deadline for vblank For an atomic commit updating a single CRTC (ie. a pageflip) calculate the next vblank time, and inform the fence(s) of that deadline. v2: Comment typo fix (danvet) v3: If there are multiple CRTCs, consider the time of the soonest vblank Signed-off-by: Rob Clark Reviewed-by: Daniel Vetter commit b2c077d001b612b1f34f7e528b2dc6072bd6794e Author: Rob Clark Date: Fri Sep 3 11:47:53 2021 -0700 drm/vblank: Add helper to get next vblank time Will be used in the next commit to set a deadline on fences that an atomic update is waiting on. v2: Calculate time at *start* of vblank period, not end v3: Fix kbuild complaints Signed-off-by: Rob Clark Reviewed-by: Mario Kleiner commit 07561769e0019d35665e8fc715c7ab2cfa2723c0 Merge: d08ab82f59d55 c63a7d8bbb54a Author: Andrii Nakryiko Date: Tue Mar 28 14:48:27 2023 -0700 Merge branch 'verifier/xdp_direct_packet_access.c converted to inline assembly' Eduard Zingerman says: ==================== verifier/xdp_direct_packet_access.c automatically converted to inline assembly using [1]. This is a leftover from [2], the last patch in a batch was blocked by mail server for being too long. This patch-set splits it in two: - one to add migrated test to progs/ - one to remove old test from verifier/ [1] Migration tool https://github.com/eddyz87/verifier-tests-migrator [2] First batch of migrated verifier/*.c tests https://lore.kernel.org/bpf/167979433109.17761.17302808621381963629.git-patchwork-notify@kernel.org/ ==================== Signed-off-by: Andrii Nakryiko commit c63a7d8bbb54a904f3ab8ff0aae39cd571b2c39c Author: Eduard Zingerman Date: Tue Mar 28 05:08:13 2023 +0300 selftests/bpf: Remove verifier/xdp_direct_packet_access.c, converted to progs/verifier_xdp_direct_packet_access.c Removing verifier/xdp_direct_packet_access.c.c as it was automatically converted to use inline assembly in the previous commit. It is available in progs/verifier_xdp_direct_packet_access.c.c. Signed-off-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230328020813.392560-3-eddyz87@gmail.com commit 6e9e141a7a28520a1cd13c96ad9127860e32ffbb Author: Eduard Zingerman Date: Tue Mar 28 05:08:12 2023 +0300 selftests/bpf: Verifier/xdp_direct_packet_access.c converted to inline assembly Test verifier/xdp_direct_packet_access.c automatically converted to use inline assembly. Original test would be removed in the next patch. Signed-off-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230328020813.392560-2-eddyz87@gmail.com commit f3823da7e4ba7d4781375c2bb786a8a78efc6591 Author: Rob Clark Date: Tue Sep 21 09:35:50 2021 -0700 drm/scheduler: Add fence deadline support As the finished fence is the one that is exposed to userspace, and therefore the one that other operations, like atomic update, would block on, we need to propagate the deadline from from the finished fence to the actual hw fence. v2: Split into drm_sched_fence_set_parent() (ckoenig) v3: Ensure a thread calling drm_sched_fence_set_deadline_finished() sees fence->parent set before drm_sched_fence_set_parent() does this test_bit(DMA_FENCE_FLAG_HAS_DEADLINE_BIT). Signed-off-by: Rob Clark Acked-by: Luben Tuikov commit 3905f8d64ccc2c640d8c1179f4452f2bf8f1df56 Author: Dragos Tatulea Date: Wed Feb 22 11:27:38 2023 +0200 net/mlx5e: RX, Remove unnecessary recycle parameter and page_cache stats The recycle parameter used during page release is no longer necessary: the page pool can detect when the page cannot be recycled to the cache or ring without any outside hint. The page pool will also take care of cleaning up after itself once all the inflight pages have been released. So no need to explicitly release pages to the system. Remove the internal page_cache stats as the mlx5e_page_cache struct no longer exists. Delete the documentation entries along with the stats. Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit cd640b050368d5be6bccf1edb51b1e4c553555e6 Author: Dragos Tatulea Date: Tue Feb 21 21:05:07 2023 +0200 net/mlx5e: RX, Break the wqe bulk refill in smaller chunks To avoid overflowing the page pool's cache, don't release the whole bulk which is usually larger than the cache refill size. Group release+alloc instead into cache refill units that allow releasing to the cache and then allocating from the cache. A refill_unit variable is added as a iteration unit over the wqe_bulk when doing release+alloc. For a single ring, single core, default MTU (1500) TCP stream test the number of pages allocated from the cache directly (rx_pp_recycle_cached) increases from 0% to 52%: +---------------------------------------------+ | Page Pool stats (/sec) | Before | After | +-------------------------+---------+---------+ |rx_pp_alloc_fast | 2145422 | 2193802 | |rx_pp_alloc_slow | 2 | 0 | |rx_pp_alloc_empty | 2 | 0 | |rx_pp_alloc_refill | 34059 | 16634 | |rx_pp_alloc_waive | 0 | 0 | |rx_pp_recycle_cached | 0 | 1145818 | |rx_pp_recycle_cache_full | 0 | 0 | |rx_pp_recycle_ring | 2179361 | 1064616 | |rx_pp_recycle_ring_full | 121 | 0 | +---------------------------------------------+ With this patch, the performance for legacy rq for the above test is back to baseline. Signed-off-by: Dragos Tatulea Signed-off-by: Saeed Mahameed commit 4ba2b4988c98ce9b56b77a1610c3a7b70ee30b57 Author: Dragos Tatulea Date: Tue Feb 21 20:42:48 2023 +0200 net/mlx5e: RX, Increase WQE bulk size for legacy rq Deferred page release was added to legacy rq but its desired effect (driver releases last fragment to page pool cache) is not yet visible due to the WQE bulks being too small. This patch increases the WQE bulk size to span 512 KB and clip it to one quarter of the rx queue size. Signed-off-by: Dragos Tatulea Signed-off-by: Saeed Mahameed commit 76238d0fbd21948dd9423e53f57e7354898967d3 Author: Dragos Tatulea Date: Tue Feb 21 20:31:39 2023 +0200 net/mlx5e: RX, Split off release path for xsk buffers for legacy rq Don't mix xsk buffer releases with page releases anymore. This is needed for handling of deferred page release. Add a new bulk free function for xsk buffers from wqe frags. Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 3f93f82988bc6b4104314bf9aa485d47fbb7e241 Author: Dragos Tatulea Date: Tue Feb 21 20:25:15 2023 +0200 net/mlx5e: RX, Defer page release in legacy rq for better recycling Currently, fragmented pages from the page pool can be released in two ways: 1) In the mlx5e driver when trimming off the unused fragments AND the associated skb fragments have been released. This path allows recycling of pages to the page pool cache (allow_direct == true). 2) On the skb release path (last fragment release), which will always release pages to the page pool ring (allow_direct == false). Whichever is releasing the last fragment will be decisive on where the page gets released: the cache or the ring. So we obviously want to maximize for doing the release from 1. This patch does that by deferring the release of page fragments right before requesting new ones from the page pool. A flag is added to make sure that there's no release before first alloc and that XDP_TX fragments are not released prematurely. This is a preparation patch that doesn't unlock the performance improvements yet. A followup patch will do that. Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 625dff29df3957f8a864c05d21a327231ebeff94 Author: Dragos Tatulea Date: Tue Feb 21 17:24:09 2023 +0200 net/mlx5e: RX, Change wqe last_in_page field from bool to bit flags Change the bool flag to a bitfield as we'll use it in a downstream patch in the series to add signaling about skipping a fragment release. Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 4c2a1323680709078736a2886c754004e9fe42e6 Author: Dragos Tatulea Date: Tue Feb 14 12:01:40 2023 +0200 net/mlx5e: RX, Defer page release in striding rq for better recycling Currently, for striding RQ, fragmented pages from the page pool can get released in two ways: 1) In the mlx5e driver when trimming off the unused fragments AND the associated skb fragments have been released. This path allows recycling of pages to the page pool cache (allow_direct == true). 2) On the skb release path (last fragment release), which will always release pages to the page pool ring (allow_direct == false). Whichever is releasing the last fragment will be decisive on where the page gets released: the cache or the ring. So we obviously want to maximize for doing the release from 1. This patch does that by deferring the release of page fragments right before requesting new ones from the page pool. Extra care needs to be taken for the corner cases: * On first call, make sure that release is not called. The skip_release_bitmap is used for this purpose. * On rq shutdown, make sure that all wqes that were not in the linked list are released. For a single ring, single core, default MTU (1500) TCP stream test the number of pages allocated from the cache directly (rx_pp_recycle_cached) increases from 31 % to 98 %: +----------------------------------------------+ | Page Pool stats (/sec) | Before | After | +-------------------------+---------+----------+ |rx_pp_alloc_fast | 2137754 | 2261033 | |rx_pp_alloc_slow | 47 | 9 | |rx_pp_alloc_empty | 47 | 9 | |rx_pp_alloc_refill | 23230 | 819 | |rx_pp_alloc_waive | 0 | 0 | |rx_pp_recycle_cached | 672182 | 2209015 | |rx_pp_recycle_cache_full | 1789 | 0 | |rx_pp_recycle_ring | 1485848 | 52259 | |rx_pp_recycle_ring_full | 3003 | 584 | +----------------------------------------------+ With this patch, the performance in striding rq for the above test is back to baseline. Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 38a36efccd902939cc415f3757fb0d9a0f0618f9 Author: Dragos Tatulea Date: Fri Feb 17 12:56:30 2023 +0200 net/mlx5e: RX, Rename xdp_xmit_bitmap to a more generic name The xdp_xmit_bitmap currently serves only one purpose: to avoid releasing pages that are still in use due to XDP TX. A following patch will use this bitmap in a slightly different context but for the same purpose. So rename the bitmap to a more generic name that reflects the purpose not the context. Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 6f5742846053c7656992e70726aad26a5129cf19 Author: Dragos Tatulea Date: Wed Jan 18 17:08:51 2023 +0200 net/mlx5e: RX, Enable skb page recycling through the page_pool Start using the page_pool skb recycling api to recycle all pages back to the page pool and stop using atomic page reference counting. The mlx5e driver used to manage in-flight pages using page refcounting: for each fragment there were 2 atomic write operations happening (one for building the skb and one on skb release). The page_pool api introduced a method to track page fragments more optimally: * The page's pp_fragment_count is set to a large bias on page alloc (1 x atomic write operation). * The driver tracks the actual page fragments in a non atomic variable. * When the skb is recycled, pp_fragment_count is decremented (atomic write operation). * When page is released in the driver, the unused number of fragments (relative to the bias) is deducted from pp_fragment_count (atomic write operation). * Last page defragmentation will only be an atomic read. So in total there are `number of fragments + 1` atomic write ops. As opposed to previously: `2 * frags` atomic writes ops. Pages are wrapped in a mlx5e_frag_page structure which also contains the number of fragments. This makes it easy to count the fragments in the driver. This change brings performance improvements for the case when the old rx page_cache had low recycling rates due to head of queue blocking. For a iperf3 TCP test with a single stream, on a single core (iperf and receive queue running on same core), the following improvements can be noticed: * Striding rq: - before (net-next baseline): bitrate = 30.1 Gbits/sec - after : bitrate = 31.4 Gbits/sec (diff: 4.14 %) * Legacy rq: - before (net-next baseline): bitrate = 30.2 Gbits/sec - after : bitrate = 33.0 Gbits/sec (diff: 8.48 %) There are 2 temporary performance degradations introduced: 1) TCP streams that had a good recycling rate with the old page_cache have a degradation for both striding and linear rq. This is due to very low page pool cache recycling: the pages are released during skb recycle which will release pages to the page pool ring for safety. The following patches in this series will tackle this problem by deferring the page release in the driver to increase the chance of having pages recycled to the cache. 2) XDP performance is now lower (4-5 %) due to the higher number of atomic operations used for fragment management. But this opens the door for supporting multiple packets per page in XDP, which will bring a big gain. Otherwise, performance is similar to baseline. Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 4a5c5e25008f374e525178f5ba2581cfa3303a0c Author: Dragos Tatulea Date: Wed Dec 14 15:44:33 2022 +0200 net/mlx5e: RX, Enable dma map and sync from page_pool allocator Remove driver dma mapping and unmapping of pages. Let the page_pool api do it. Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 08c9b61b071ca780ac2740b9de755d2ebac2a2e5 Author: Dragos Tatulea Date: Tue Dec 13 14:37:07 2022 +0200 net/mlx5e: RX, Remove internal page_cache This patch removes the internal rx page_cache and uses the generic page_pool api only. It used to be that the page_pool couldn't handle all the mlx5 driver usecases, but with the introduction of skb recycling and page fragmentaton in the page_pool full switch can now be made. Some benfits of this transition: * Better page recycling in the cases when the page_cache was suffering from head of queue blocking. The page_pool doesn't have this issue. * DMA mapping/unmapping can be managed by the page_pool. * mlx5e_rq size reduced by more than 50% due to the page_cache array being deleted. This patch only removes the page_cache. Downstream patches will enable the required page_pool features and will add further fine-tuning. Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit ca6ef9f031946134030e1b583e172c2e47c9a992 Author: Dragos Tatulea Date: Tue Mar 14 21:05:56 2023 +0200 net/mlx5e: RX, Store SHAMPO header pages in array Save allocated SHAMPO header pages to an array to which the mlx5e_dma_info page will point to. This change is a preparation for introducing mlx5e_frag_page structure in a downstream patch. There's no new functionality introduced. Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit d39092caaedf89c67170c035cad87c79988d1527 Author: Dragos Tatulea Date: Mon Jan 30 12:02:45 2023 +0200 net/mlx5e: RX, Remove alloc unit layout constraint for striding rq This change removes the usage of mlx5e_alloc_unit union for striding rq. The change is more straightforward than legacy rq as the alloc units union is already in place. This patch only moves things around: instead of an array of unions make it a union of arrays. This has the effect that each mlx5e_mpw_info will allocate the largest possible size of the array member. For xsk this means that the array of xdp_buff pointers for the wqe will still be contiguous, but there will be some extra unused bytes at the end of the array. As further patch in the series will add the mlx5e_frag_page struct for which the described size constraint will no longer hold. Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 8fb1814f58f691373c692df75b761668069e197a Author: Dragos Tatulea Date: Fri Jan 27 16:58:52 2023 +0200 net/mlx5e: RX, Remove alloc unit layout constraint for legacy rq The mlx5e_alloc_unit union is conveniently used to store arrays of pointers to struct page or struct xdp_buff (for xsk). The union is currently expected to have the size of a pointer for xsk batch allocations to work. This is conveniet for the current state of the code but makes it impossible to add a structure of a different size to the alloc unit. A further patch in the series will add the mlx5e_frag_page struct for which the described size constraint will no longer hold. This change removes the usage of mlx5e_alloc_unit union for legacy rq: - A union of arrays is introduced (mlx5e_alloc_units) to replace the array of unions to allow structures of different sizes. - Each fragment has a pointer to a unit in the mlx5e_alloc_units array. Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 09df037017799b723d03a97c3f0de069bae9f625 Author: Dragos Tatulea Date: Fri Jan 27 17:06:12 2023 +0200 net/mlx5e: RX, Remove mlx5e_alloc_unit argument in page allocation Change internal page cache and page pool api to use a struct page ** instead of a mlx5e_alloc_unit *. This is the first change in a series which is meant to remove the mlx5e_alloc_unit altogether. Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit d71c11cc79d259c059f4ad377c0f930263f77c53 Author: Rob Clark Date: Tue Feb 28 10:10:11 2023 -0800 dma-buf/sync_file: Surface sync-file uABI We had all of the internal driver APIs, but not the all important userspace uABI, in the dma-buf doc. Fix that. And re-arrange the comments slightly as otherwise the comments for the ioctl nr defines would not show up. v2: Fix docs build warning coming from newly including the uabi header in the docs build Signed-off-by: Rob Clark Acked-by: Pekka Paalanen commit d7d5a21dd6b4706c04fbba5d25db8da5f25aab68 Author: Rob Clark Date: Sat Feb 18 12:35:04 2023 -0800 dma-buf/dma-resv: Add a way to set fence deadline Add a way to set a deadline on remaining resv fences according to the requested usage. Signed-off-by: Rob Clark Reviewed-by: Christian König commit 786119ff3280dcffdf11c605534a20b4070012cf Author: Rob Clark Date: Fri Sep 3 11:47:58 2021 -0700 dma-buf/fence-chain: Add fence deadline support Propagate the deadline to all the fences in the chain. v2: Use dma_fence_chain_contained [Tvrtko] Signed-off-by: Rob Clark Reviewed-by: Christian König commit 172420865b29233f9daeb7fb97da84224dcdbf40 Author: Mark Rutland Date: Tue Mar 14 15:37:00 2023 +0000 arm64: uaccess: remove unnecessary earlyclobber Currently the asm constraints for __get_mem_asm() mark the value register as an earlyclobber operand. This means that the compiler can't reuse the same register for both the address and value, even when the value is not subsequently used. There's no need for the value register to be marked as earlyclobber, as it's only written to after the address register is consumed, even when the access faults. Remove the unnecessary earlyclobber. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Robin Murphy Cc: Will Deacon Link: https://lore.kernel.org/r/20230314153700.787701-5-mark.rutland@arm.com Signed-off-by: Will Deacon commit 4a3f806eca09f2ac042c42db0d6468f5a81ab666 Author: Mark Rutland Date: Tue Mar 14 15:36:59 2023 +0000 arm64: uaccess: permit put_{user,kernel} to use zero register Currently the asm constraints for __put_mem_asm() require that the value is placed in a "real" GPR (i.e. one other than [XW]ZR or SP). This means that for cases such as: __put_user(0, addr) ... the compiler has to move '0' into "real" GPR, e.g. mov xN, #0 sttr xN, [] This is unfortunate, as using the zero register would require fewer instructions and save a "real" GPR for other usage, allowing the compiler to generate: sttr xzr, [] Modify the asm constaints for __put_mem_asm() to permit the use of the zero register for the value. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Robin Murphy Cc: Will Deacon Link: https://lore.kernel.org/r/20230314153700.787701-4-mark.rutland@arm.com Signed-off-by: Will Deacon commit 39c8275de81cf7fb524e2ff067aa175447412284 Author: Mark Rutland Date: Tue Mar 14 15:36:58 2023 +0000 arm64: uaccess: permit __smp_store_release() to use zero register Currently the asm constraints for __smp_store_release() require that the value is placed in a "real" GPR (i.e. one other than [XW]ZR or SP). This means that for cases such as: __smp_store_release(ptr, 0) ... the compiler has to move '0' into "real" GPR, e.g. mov xN, #0 stlr xN, [] This is unfortunate, as using the zero register would require fewer instructions and save a "real" GPR for other usage, allowing the compiler to generate: stlr xzr, [] Modify the asm constaints for __smp_store_release() to permit the use of the zero register for the value. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Robin Murphy Cc: Will Deacon Link: https://lore.kernel.org/r/20230314153700.787701-3-mark.rutland@arm.com Signed-off-by: Will Deacon commit e5cacb540fd2509484d6849c0d5372bd67d174b9 Author: Mark Rutland Date: Tue Mar 14 15:36:57 2023 +0000 arm64: atomics: lse: improve cmpxchg implementation For historical reasons, the LSE implementation of cmpxchg*() hard-codes the GPRs to use, and shuffles registers around with MOVs. This is no longer necessary, and can be simplified. When the LSE cmpxchg implementation was added in commit: c342f78217e822d2 ("arm64: cmpxchg: patch in lse instructions when supported by the CPU") ... the LL/SC implementation of cmpxchg() would be placed out-of-line, and the in-line assembly for cmpxchg would default to: NOP BL NOP The LL/SC implementation of each cmpxchg() function accepted arguments as per AAPCS64 rules, to it was necessary to place the pointer in x0, the older value in X1, and the new value in x2, and acquire the return value from x0. The LL/SC implementation required a temporary register (e.g. for the STXR status value). As the LL/SC implementation preserved the old value, the LSE implementation does likewise. Since commit: addfc38672c73efd ("arm64: atomics: avoid out-of-line ll/sc atomics") ... the LSE and LL/SC implementations of cmpxchg are inlined as separate asm blocks, with another branch choosing between thw two. Due to this, it is no longer necessary for the LSE implementation to match the register constraints of the LL/SC implementation. This was partially dealt with by removing the hard-coded use of x30 in commit: 3337cb5aea594e40 ("arm64: avoid using hard-coded registers for LSE atomics") ... but we didn't clean up the hard-coding of x0, x1, and x2. This patch simplifies the LSE implementation of cmpxchg, removing the register shuffling and directly clobbering the 'old' argument. This gives the compiler greater freedom for register allocation, and avoids redundant work. The new constraints permit 'old' (Rs) and 'new' (Rt) to be allocated to the same register when the initial values of the two are the same, e.g. resulting in: CAS X0, X0, [X1] This is safe as Rs is only written back after the initial values of Rs and Rt are consumed, and there are no UNPREDICTABLE behaviours to avoid when Rs == Rt. The new constraints also permit 'new' to be allocated to the zero register, avoiding a MOV in a few cases. The same cannot be done for 'old' as it is both an input and output, and any caller of cmpxchg() should care about the output value. Note that for CAS* the use of the zero register never affects the ordering (while for SWP* the use of the zero regsiter for the 'old' value drops any ACQUIRE semantic). Compared to v6.2-rc4, a defconfig vmlinux is ~116KiB smaller, though the resulting Image is the same size due to internal alignment and padding: [mark@lakrids:~/src/linux]% ls -al vmlinux-* -rwxr-xr-x 1 mark mark 137269304 Jan 16 11:59 vmlinux-after -rwxr-xr-x 1 mark mark 137387936 Jan 16 10:54 vmlinux-before [mark@lakrids:~/src/linux]% ls -al Image-* -rw-r--r-- 1 mark mark 38711808 Jan 16 11:59 Image-after -rw-r--r-- 1 mark mark 38711808 Jan 16 10:54 Image-before This patch does not touch cmpxchg_double*() as that requires contiguous register pairs, and separate patches will replace it with cmpxchg128*(). There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Peter Zijlstra Cc: Robin Murphy Cc: Will Deacon Link: https://lore.kernel.org/r/20230314153700.787701-2-mark.rutland@arm.com Signed-off-by: Will Deacon commit 7fa5047a436ba27696e344d974811d9ea07ba249 Author: Rob Herring Date: Fri Mar 10 08:47:05 2023 -0600 drm: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Reviewed-by: Jernej Skrabec Reviewed-by: Liu Ying # i.MX bridge Reviewed-by: Dmitry Baryshkov Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20230310144705.1542207-1-robh@kernel.org Signed-off-by: Rob Herring commit b7d70b8b06edf25c4b7526e20f5b3d11175cab81 Author: Daniele Ceraolo Spurio Date: Thu Mar 23 16:18:57 2023 -0700 drm/i915/gsc: implement wa 14015076503 The WA states that we need to alert the GSC FW before doing a GSC engine reset and then wait for 200ms. The GuC owns engine reset, so on the i915 side we only need to apply this for full GT reset. Given that we do full GT resets in the resume paths to cleanup the HW state and that a long wait in those scenarios would not be acceptable, a faster path has been introduced where, if the GSC is idle, we try first to individually reset the GuC and all engines except the GSC and only fall back to full reset if that fails. Note: according to the WA specs, if the GSC is idle it should be possible to only wait for the uC wakeup time (~15ms) instead of the whole 200ms. However, the GSC FW team have mentioned that the wakeup time can change based on other things going on in the HW and pcode, so a good security margin would be required. Given that when the GSC is idle we already skip the wait & reset entirely and that this reduced wait would still likely be too long to use in resume paths, it's not worth adding support for this reduced wait. v2: add comment to explain why it is safe to skip the GSC reset (John) Signed-off-by: Daniele Ceraolo Spurio Cc: Matt Roper Cc: John Harrison Cc: Rodrigo Vivi Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20230323231857.2194435-2-daniele.ceraolospurio@intel.com commit 625af47255d9b30e22d6c98b7f5e97adc903b98e Author: Daniele Ceraolo Spurio Date: Thu Mar 23 16:18:56 2023 -0700 drm/i915: limit double GT reset to pre-MTL Commit 3db9d590557d ("drm/i915/gt: Reset twice") modified the code to always hit the GDRST register twice when doing a reset, with the reported aim to fix invalid post-reset engine state on some platforms (Jasperlake being the only one actually mentioned). This is a problem on MTL, due to the fact that we have to apply a time consuming WA (coming in the next patch) every time we hit the GDRST register in a way that can include the GSC engine. Even post MTL, the expectation is that we'll have some work to do before and after hitting the GDRST if the GSC is involved. Since the issue requiring the double reset seems to be limited to older platforms, instead of trying to handle the double-reset on MTL and future platforms it is just easier to turn it off. The default on MTL is also for GuC to own engine reset, with i915 only covering full-GT reset. Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Cc: Andi Shyti Cc: Mika Kuoppala Cc: Gwan-gyeong Mun Cc: John Harrison Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230323231857.2194435-1-daniele.ceraolospurio@intel.com commit cdf7911f7dbcb37228409a63bf75630776c45a15 Author: Daniele Ceraolo Spurio Date: Mon Mar 13 13:55:56 2023 -0700 drm/i915/huc: Cancel HuC delayed load timer on reset. In the rare case where we do a full GT reset after starting the HuC load and before it completes (which basically boils down to i915 hanging during init), we need to cancel the delayed load fence, as it will be re-initialized in the post-reset recovery. Fixes: 27536e03271d ("drm/i915/huc: track delayed HuC load with a fence") Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20230313205556.1174503-1-daniele.ceraolospurio@intel.com commit 4248d043e462bd43dbef60164d35b817d5664eb1 Author: Will Deacon Date: Tue Mar 28 18:52:14 2023 +0100 Revert "ARM: mach-virt: Select PMUv3 driver by default" This reverts commit 3b16f6268e660f15aed0bb97aefe87e893eb8882. Selecting a Kconfig option that has its own set of dependencies tends to end badly, and in this case 'randconfig' builds blew up on 32-bit ARM where ARM_PMUV3 was being selecting with HW_PERF_EVENTS=n: | drivers/perf/arm_pmuv3.c:68:5: error: use of undeclared identifier 'DTLB' | [C(DTLB)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_PMUV3_PERFCTR_L1D_TLB, | ^ | fatal error: too many errors emitted, stopping now [-ferror-limit=] | 20 errors generated. | | Kconfig warnings: (for reference only) | WARNING: unmet direct dependencies detected for ARM_PMUV3 | Depends on [n]: PERF_EVENTS [=y] && HW_PERF_EVENTS [=n] && (ARM [=y] && CPU_V7 [=y] || ARM64) | Selected by [y]: | - ARCH_VIRT [=y] && ARCH_MULTI_V7 [=y] && PERF_EVENTS [=y] As suggested by Marc, just drop the 'select' clause altogether by reverting the patch which introduced it. Link: https://lore.kernel.org/r/202303281539.zzI4vpw1-lkp@intel.com Reported-by: kernel test robot Reported-by: Arnd Bergmann Suggested-by: Marc Zyngier Signed-off-by: Will Deacon commit 2fcc1fa5f906872f4d3da3fef08fa062fa70a645 Merge: 46f28427f6f82 b2cfec52feb3b Author: Daniel Vetter Date: Tue Mar 28 19:23:05 2023 +0200 Merge tag 'exynos-drm-next-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next A patch series for moving MIPI-DSI driver for Exynos DRM to drm/bridge directory so that I.MX SoC family can also share the same device driver. Samsung MIPI DSIM device is a common IP that can be used by Exynos and I.MX8M Mini/Nano/Plus SoC. Regarding this, this patch series has added several things below to existing MIPI DSI driver, - Add exynos_dsi_type enum type to provide controller data from different platforms. - Add two pipeline detection ways support - existing Exynos DSI child node and I.MX family of-graph port or ports. - Consider component and bridged based DRM drivers. - Add device tree binding support of I.MX family. Signed-off-by: Daniel Vetter From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20230328040524.49278-1-inki.dae@samsung.com commit 8ad266d133b005e88953b08d988fac86f74a0665 Author: Saravana Kannan Date: Fri Mar 17 13:51:33 2023 -0700 driver core: Add CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT Add a build time equivalent of fw_devlink.sync_state=timeout so that board specific kernels could enable it and not have to deal with setting or cluttering the kernel commandline. Cc: Doug Anderson Signed-off-by: Saravana Kannan Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20230317205134.964098-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit d6790ae09a56dd8898ff025337c235540334d760 Merge: 7739b15277665 6b004b836ced4 Author: Mark Brown Date: Tue Mar 28 17:40:35 2023 +0100 ASoC: add audio digital codecs for Qualcomm SM8550 Merge series from Krzysztof Kozlowski : Hi, Dependencies ============ For va-macro bindings: https://lore.kernel.org/r/20221118071849.25506-2-srinivas.kandagatla@linaro.org NOT a dependency ================ The patchset can be applied independently of my previous fix: https://lore.kernel.org/linux-arm-msm/20230310100937.32485-1-krzysztof.kozlowski@linaro.org/T/#u Logically, better if they were together, but code will work fine other way. Changes since v1 ================ 1. Move the flag define to common header. Best regards, Krzysztof Krzysztof Kozlowski (9): ASoC: dt-bindings: qcom,lpass-rx-macro: narrow clocks per variants ASoC: dt-bindings: qcom,lpass-rx-macro: Add SM8550 RX macro ASoC: codecs: lpass-rx-macro: add support for SM8550 ASoC: dt-bindings: qcom,lpass-tx-macro: narrow clocks per variants ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM8550 TX macro ASoC: codecs: lpass-tx-macro: add support for SM8550 ASoC: dt-bindings: qcom,lpass-va-macro: Add SM8550 VA macro ASoC: dt-bindings: qcom,lpass-wsa-macro: Add SM8550 WSA macro ASoC: codecs: lpass-wsa-macro: add support for SM8550 .../bindings/sound/qcom,lpass-rx-macro.yaml | 76 +++++++++++++---- .../bindings/sound/qcom,lpass-tx-macro.yaml | 81 +++++++++++++++---- .../bindings/sound/qcom,lpass-va-macro.yaml | 18 +++++ .../bindings/sound/qcom,lpass-wsa-macro.yaml | 23 +++++- sound/soc/codecs/lpass-macro-common.h | 3 + sound/soc/codecs/lpass-rx-macro.c | 36 +++++++-- sound/soc/codecs/lpass-tx-macro.c | 35 ++++++-- sound/soc/codecs/lpass-wsa-macro.c | 37 +++++++-- 8 files changed, 252 insertions(+), 57 deletions(-) -- 2.34.1 commit 5290586186d24d81d7f8eee4ba837f0cbc304b09 Author: Ivan Orlov Date: Sun Mar 26 00:59:02 2023 +0400 selftests: prctl: Add new prctl test for PR_SET_VMA action This patch will add the new test, which covers the prctl call with PR_SET_VMA command. The test tries to give a name to the anonymous VMA within the process memory map, and then checks the result of the operation by parsing 'maps' virtual file. Additionally, the test tries to call the prctl PR_SET_VMA command with invalid arguments, and checks the error codes for correctness. At the moment anonymous VMA naming through prctl call functionality is not covered with any tests, so I think implementing it makes sense. In version 2 of this patch I consider the selftest Makefile rule about TARGETS entries order - I moved the 'prctl' entry in the Makefile to follow the lexicographic order. In version 1 it was placed at the end of the list. Signed-off-by: Ivan Orlov Signed-off-by: Shuah Khan commit 14f4cc631afdb3234facf8542ea094ec529a4024 Author: Ivan Orlov Date: Tue Mar 28 00:18:55 2023 +0400 selftests: sched: Add more core schedule prctl calls The core sched kselftest makes prctl calls only with correct parameters. This patch will extend this test with more core schedule prctl calls with wrong parameters to increase code coverage. Signed-off-by: Ivan Orlov Signed-off-by: Shuah Khan commit c83f320e55a49abd90629f42a72897afd579e0de Author: Ivan Orlov Date: Sun Feb 26 16:16:33 2023 +0300 selftests: cgroup: Add 'malloc' failures checks in test_memcontrol There are several 'malloc' calls in test_memcontrol, which can be unsuccessful. This patch will add 'malloc' failures checking to give more details about test's fail reasons and avoid possible undefined behavior during the future null dereference (like the one in alloc_anon_50M_check_swap function). Signed-off-by: Ivan Orlov Reviewed-by: Muchun Song Acked-by: Shakeel Butt Acked-by: Roman Gushchin Signed-off-by: Shuah Khan commit 350d216dc2507daa03074a3079f0d654eadcac13 Author: Ivan Orlov Date: Mon Feb 20 19:03:02 2023 +0300 selftests: Refactor 'peeksiginfo' ptrace test part peeksiginfo creates an array of 10 instances of 'siginfo_t', but actually uses only one. This patch will reduce amount of memory on the stack used by the peeksiginfo test. Signed-off-by: Ivan Orlov Signed-off-by: Shuah Khan commit 623ac593a360f5c5fe34a002d006844f087549ce Author: Valentin Caron Date: Tue Mar 28 17:37:23 2023 +0200 ARM: dts: stm32: add uart nodes and uart aliases on stm32mp135f-dk Update device-tree stm32mp135f-dk.dts to add usart1, uart8, usart2 and uart aliases. - Usart2 is used to interface a BT device, enable it by default. - Usart1 and uart8 are available on expansion connector. They are kept disabled. So, the pins are kept in analog state to lower power consumption by default or can be used as GPIO. - Uart4 is used for console. Signed-off-by: Valentin Caron Signed-off-by: Alexandre Torgue commit 8d696053f308cb5b242fb5b7f66500310b3087a1 Author: Valentin Caron Date: Tue Mar 28 17:37:22 2023 +0200 ARM: dts: stm32: add pins for usart2/1/4/8 in stm32mp13-pinctrl Add pins for uart4, uart8, usart1 and usart2 in stm32mp13-pinctrl.dtsi Theses pins have three states: default, sleep and idle. Signed-off-by: Valentin Caron Signed-off-by: Alexandre Torgue commit c1689f854cb9daa5f2ea098462107969452b0492 Author: Valentin Caron Date: Tue Mar 28 17:37:21 2023 +0200 ARM: dts: stm32: add uart nodes on stm32mp13 Update device-tree stm32mp131.dtsi to add some uart features. On uart 1, 2, 3, 5, 6, 7, 8 nodes, add compabible, exti interrupts, clock, reset properties, dma config. On uart 4 node, only add dma configuration and use exti interrupt. Signed-off-by: Valentin Caron Signed-off-by: Alexandre Torgue commit 92fd4848a181e1d8c118106d222d01a5172325d0 Author: Valentin Caron Date: Tue Mar 28 17:37:20 2023 +0200 ARM: dts: stm32: clean uart aliases on stm32mp15xx-exx boards Remove duplicates and clean uart aliases. Uart aliases and uart pins should be declared and associated to uart instance at the same time. Put also aliases node above chosen node as same as stm32mp157c-dk2.dts. Signed-off-by: Valentin Caron Signed-off-by: Alexandre Torgue commit abf52335762e7048e9fa5bc6f4c56a3e63b5bc80 Author: Valentin Caron Date: Tue Mar 28 17:37:19 2023 +0200 ARM: dts: stm32: clean uart aliases on stm32mp15xx-dkx boards Remove duplicates and clean uart aliases. Uart aliases and uart pins should be declared and associated to uart instance at the same time. Signed-off-by: Valentin Caron Signed-off-by: Alexandre Torgue commit dcbce56cac2676a6ca1ca33f352c8d46dd9626d6 Author: Valentin Caron Date: Tue Mar 28 17:37:18 2023 +0200 ARM: dts: stm32: fix slew-rate of USART2 on stm32mp15xx-dkx On stm32mp15xx-dkx boards: - Fix slew-rate of USART 2 to 0 like other USARTs, because frequency of USART pins doesn't exceed 10Mhz. Signed-off-by: Valentin Caron Signed-off-by: Alexandre Torgue commit 99e067637862c902f741744eaafe1472091937a5 Author: Jani Nikula Date: Mon Mar 27 13:53:30 2023 +0300 drm/i915: remove unused config DRM_I915_UNSTABLE Essentially this is a revert of commit d9d54a530a70 ("drm/i915: Put future HW and their uAPIs under STAGING & BROKEN"). We currently have no users for this config option. The last one was removed in commit 8c26491f5853 ("drm/i915: Kill the fake lmem support"). Drop it altogether; it's easy enough to resurrect if need arises. Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230327105330.312131-2-jani.nikula@intel.com commit 6915cffd4889bb2d5f1b41714ec56f9d10fa7e67 Author: Yu Zhe Date: Fri Mar 3 10:57:15 2023 +0800 arm64: kexec: remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe Link: https://lore.kernel.org/r/20230303025715.32570-1-yuzhe@nfschina.com Signed-off-by: Will Deacon commit 0e2cb49ef104738de2701d6badd08f2178c13aff Author: Yu Zhe Date: Fri Mar 3 10:50:47 2023 +0800 arm64: armv8_deprecated: remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe Link: https://lore.kernel.org/r/20230303025047.19717-1-yuzhe@nfschina.com Signed-off-by: Will Deacon commit 76afff432f262712044864e3835841b1b41835a9 Author: Roan van Dijk Date: Tue Mar 28 11:33:11 2023 +0200 ARM: stm32: add support for STM32MP151 This patch adds initial support of STM32MP151 microprocessor (MPU) based on Arm Cortex-A7. New Cortex-A infrastructure (gic, timer,...) are selected if ARCH_MULTI_V7 is defined. Signed-off-by: David Jander Signed-off-by: Roan van Dijk Signed-off-by: Alexandre Torgue commit cecdd52a3dd312564f81a39df08378b7b39a2654 Merge: 42b4c479025d9 46f28427f6f82 Author: Rodrigo Vivi Date: Tue Mar 28 10:30:57 2023 -0400 Merge drm/drm-next into drm-intel-next Catch up with 6.3-rc cycle... Signed-off-by: Rodrigo Vivi commit d2c48b2387eb89e0bf2a2e06e30987cf410acad4 Author: Pierre Gondois Date: Thu Feb 16 09:49:19 2023 +0100 firmware: arm_sdei: Fix sleep from invalid context BUG Running a preempt-rt (v6.2-rc3-rt1) based kernel on an Ampere Altra triggers: BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:46 in_atomic(): 0, irqs_disabled(): 128, non_block: 0, pid: 24, name: cpuhp/0 preempt_count: 0, expected: 0 RCU nest depth: 0, expected: 0 3 locks held by cpuhp/0/24: #0: ffffda30217c70d0 (cpu_hotplug_lock){++++}-{0:0}, at: cpuhp_thread_fun+0x5c/0x248 #1: ffffda30217c7120 (cpuhp_state-up){+.+.}-{0:0}, at: cpuhp_thread_fun+0x5c/0x248 #2: ffffda3021c711f0 (sdei_list_lock){....}-{3:3}, at: sdei_cpuhp_up+0x3c/0x130 irq event stamp: 36 hardirqs last enabled at (35): [] finish_task_switch+0xb4/0x2b0 hardirqs last disabled at (36): [] cpuhp_thread_fun+0x21c/0x248 softirqs last enabled at (0): [] copy_process+0x63c/0x1ac0 softirqs last disabled at (0): [<0000000000000000>] 0x0 CPU: 0 PID: 24 Comm: cpuhp/0 Not tainted 5.19.0-rc3-rt5-[...] Hardware name: WIWYNN Mt.Jade Server [...] Call trace: dump_backtrace+0x114/0x120 show_stack+0x20/0x70 dump_stack_lvl+0x9c/0xd8 dump_stack+0x18/0x34 __might_resched+0x188/0x228 rt_spin_lock+0x70/0x120 sdei_cpuhp_up+0x3c/0x130 cpuhp_invoke_callback+0x250/0xf08 cpuhp_thread_fun+0x120/0x248 smpboot_thread_fn+0x280/0x320 kthread+0x130/0x140 ret_from_fork+0x10/0x20 sdei_cpuhp_up() is called in the STARTING hotplug section, which runs with interrupts disabled. Use a CPUHP_AP_ONLINE_DYN entry instead to execute the cpuhp cb later, with preemption enabled. SDEI originally got its own cpuhp slot to allow interacting with perf. It got superseded by pNMI and this early slot is not relevant anymore. [1] Some SDEI calls (e.g. SDEI_1_0_FN_SDEI_PE_MASK) take actions on the calling CPU. It is checked that preemption is disabled for them. _ONLINE cpuhp cb are executed in the 'per CPU hotplug thread'. Preemption is enabled in those threads, but their cpumask is limited to 1 CPU. Move 'WARN_ON_ONCE(preemptible())' statements so that SDEI cpuhp cb don't trigger them. Also add a check for the SDEI_1_0_FN_SDEI_PRIVATE_RESET SDEI call which acts on the calling CPU. [1]: https://lore.kernel.org/all/5813b8c5-ae3e-87fd-fccc-94c9cd08816d@arm.com/ Suggested-by: James Morse Signed-off-by: Pierre Gondois Reviewed-by: James Morse Link: https://lore.kernel.org/r/20230216084920.144064-1-pierre.gondois@arm.com Signed-off-by: Will Deacon commit 0623ec17c45ed3e96880453f69461d526dc97f41 Author: Yang Li Date: Tue Mar 28 14:15:24 2023 +0800 spi: xilinx: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/20230328061524.77529-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 9aa5ef3da6742bb2228308e738c22b49efa6efcc Author: Peng Fan Date: Tue Mar 28 14:00:32 2023 +0800 dt-bindings: regulator: pf8x00: Remove restrictions for regulator-name Following commit b0de7fa706506 ("regulator: pca9450: Remove restrictions for regulator-name") to remove the constraints on the regulator-name to allow using arbitrary and descriptive names for the regulators. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20230328060032.1983381-1-peng.fan@oss.nxp.com Signed-off-by: Mark Brown commit 7739b152776655a86568103afded77aa240f3ad4 Author: Charles Keepax Date: Tue Mar 28 10:58:19 2023 +0100 ASoC: wm8903: Remove outdated DMIC comment Support for DMICs was added in commit 97945c46a23d ("ASoC: WM8903: Implement DMIC support"). Remove them from the TODO list at the top of the driver. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20230328095819.1632802-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 39db65a0a17b54915b269d3685f253a4731f344c Author: Cristian Ciocaltea Date: Tue Mar 28 12:49:01 2023 +0300 ASoC: es8316: Handle optional IRQ assignment The driver is able to work fine without relying on a mandatory interrupt being assigned to the I2C device. This is only needed when making use of the jack-detect support. However, the following warning message is always emitted when there is no such interrupt available: es8316 0-0011: Failed to get IRQ 0: -22 Do not attempt to request an IRQ if it is not available/valid. This also ensures the rather misleading message is not displayed anymore. Also note the IRQ validation relies on commit dab472eb931bc291 ("i2c / ACPI: Use 0 to indicate that device does not have interrupt assigned"). Fixes: 822257661031 ("ASoC: es8316: Add jack-detect support") Signed-off-by: Cristian Ciocaltea Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230328094901.50763-1-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit d23d50de4ad9a960b752b8b7f4ffce32e05a8971 Author: Richard Leitner Date: Tue Mar 28 13:25:14 2023 +0200 ASoC: dt-bindings: maxim,max9867: fix example Remove the common clock node from the example as suggested by Krzysztof Kozlowski in [1]. [1] https://lore.kernel.org/lkml/45d306d3-8efb-12ac-0a83-f01ca2982b0a@linaro.org/ Signed-off-by: Richard Leitner Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230328-max9867_dt_example_fix-v1-1-cdf31c3fdfc8@linux.dev Signed-off-by: Mark Brown commit 6b004b836ced4d9ce655b5f1c810833c1a880369 Author: Krzysztof Kozlowski Date: Mon Mar 13 08:54:45 2023 +0100 ASoC: codecs: lpass-wsa-macro: add support for SM8550 Add support for the WSA macro codec on Qualcomm SM8550. SM8550 does not use NPL clock, thus add flags allowing to skip it. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230313075445.17160-9-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit c1bda22bd2f382f9c3b27fb7a899f8804d92f897 Author: Krzysztof Kozlowski Date: Mon Mar 13 08:54:44 2023 +0100 ASoC: dt-bindings: qcom,lpass-wsa-macro: Add SM8550 WSA macro Add the WSA macro codec on Qualcomm SM8550, which comes without NPL clock exposed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230313075445.17160-8-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 5faf6a1c5256559af98c998b7416e4db8fb09b75 Author: Krzysztof Kozlowski Date: Mon Mar 13 08:54:42 2023 +0100 ASoC: codecs: lpass-tx-macro: add support for SM8550 Add support for the TX macro codec on Qualcomm SM8550. SM8550 does not use NPL clock, thus add flags allowing to skip it. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230313075445.17160-6-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 050578c6f18c28e95f9659493a52a67b68b4b667 Author: Krzysztof Kozlowski Date: Mon Mar 13 08:54:41 2023 +0100 ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM8550 TX macro Add the TX macro codec on Qualcomm SM8550, which comes without NPL clock exposed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230313075445.17160-5-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit bf4afbf950938d42cf0df1ecd915affeb26f4d76 Author: Krzysztof Kozlowski Date: Mon Mar 13 08:54:40 2023 +0100 ASoC: dt-bindings: qcom,lpass-tx-macro: narrow clocks per variants Currently the Qualcomm TX macro codec binding allows two different clock setups - with (for ADSP) and without macro/dcodec entries (for ADSP bypassed). With more devices coming soon, this will keep growing, thus rework the clocks/clock-names to be specific for each binding. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230313075445.17160-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 492fe974fed0754f7076580e069e1e182e7b3603 Author: Krzysztof Kozlowski Date: Mon Mar 13 08:54:39 2023 +0100 ASoC: codecs: lpass-rx-macro: add support for SM8550 Add support for the RX macro codec on Qualcomm SM8550. SM8550 does not use NPL clock, thus add flags allowing to skip it. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230313075445.17160-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 0fc109f875721f9cef29bb68095f50d67343b4b7 Author: Krzysztof Kozlowski Date: Mon Mar 13 08:54:38 2023 +0100 ASoC: dt-bindings: qcom,lpass-rx-macro: Add SM8550 RX macro Add the RX macro codec on Qualcomm SM8550, which comes without NPL clock exposed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230313075445.17160-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit e4cf7805f084772cccf2094b634a16bccf2f444f Author: Krzysztof Kozlowski Date: Mon Mar 13 08:54:37 2023 +0100 ASoC: dt-bindings: qcom,lpass-rx-macro: narrow clocks per variants Currently the Qualcomm RX macro codec binding allows two different clock setups - with (for ADSP) and without macro/dcodec entries (for ADSP bypassed). With more devices coming soon, this will keep growing, thus rework the clocks/clock-names to be specific for each binding. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230313075445.17160-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 371b27f2f3b03588bcf472763f541050e18f21a3 Author: Borislav Petkov (AMD) Date: Tue Mar 28 15:39:43 2023 +0200 EDAC: Sanitize MODULE_AUTHOR strings Fixup the remaining MODULE_AUTHOR strings to not contain newlines. Shorten and unbreak others. No functional changes. Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230328134309.23159-1-bp@alien8.de commit f594496403fa383259aa7dfad92f383a2ee07e1b Author: Vasant Hegde Date: Fri Mar 10 09:00:00 2023 +0000 iommu/amd: Add 5 level guest page table support Newer AMD IOMMU supports 5 level guest page table (v2 page table). If both processor and IOMMU supports 5 level page table then enable it. Otherwise fall back to 4 level page table. Co-developed-by: Wei Huang Signed-off-by: Wei Huang Reviewed-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20230310090000.1117786-1-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit 86e2eca4ddedc07d639c44c990e1c220cac3741e Author: Grygorii Strashko Date: Mon Mar 27 14:51:03 2023 +0530 net: ethernet: ti: am65-cpsw: enable p0 host port rx_vlan_remap By default, the tagged ingress packets to the switch from the host port P0 get internal switch priority assigned equal to the DMA CPPI channel number they came from, unless CPSW_P0_CONTROL_REG.RX_REMAP_VLAN is enabled. This causes issues with applying QoS policies and mapping packets on external port fifos, because the default configuration is vlan_aware and DMA CPPI channels are shared between all external ports. Hence enable CPSW_P0_CONTROL_REG.RX_REMAP_VLAN so packet will preserve internal switch priority assigned following the VLAN(priority) tag no matter through which DMA CPPI Channels packets enter the switch. Signed-off-by: Grygorii Strashko Signed-off-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20230327092103.3256118-1-s-vadapalli@ti.com Signed-off-by: Paolo Abeni commit 5c8560c4a19fc3e400715a347ce82bd909e3ac74 Author: Grygorii Strashko Date: Mon Mar 27 14:27:58 2023 +0530 net: ethernet: ti: am65-cpsw: add .ndo to set dma per-queue rate Enable rate limiting TX DMA queues for CPSW interface by configuring the rate in absolute Mb/s units per TX queue. Example: ethtool -L eth0 tx 4 echo 100 > /sys/class/net/eth0/queues/tx-0/tx_maxrate echo 200 > /sys/class/net/eth0/queues/tx-1/tx_maxrate echo 50 > /sys/class/net/eth0/queues/tx-2/tx_maxrate echo 30 > /sys/class/net/eth0/queues/tx-3/tx_maxrate # disable echo 0 > /sys/class/net/eth0/queues/tx-0/tx_maxrate Signed-off-by: Grygorii Strashko Signed-off-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20230327085758.3237155-1-s-vadapalli@ti.com Signed-off-by: Paolo Abeni commit 01db1030f16535fa8f9a6bb1d6af9cda06977adb Author: Jonathan Neuschäfer Date: Sun Jan 29 17:50:54 2023 +0100 EDAC/amd81[13]1: Remove trailing newline from MODULE_AUTHOR MODULE_AUTHOR strings don't usually include a newline character. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230129165054.1675554-1-j.neuschaefer@gmx.net commit f045e9df6537175d02565f21616ac1a9dd59b61c Author: Yong Wu Date: Thu Mar 16 18:14:45 2023 +0800 iommu/mediatek: Set dma_mask for PGTABLE_PA_35_EN When we enable PGTABLE_PA_35_EN, the PA for pgtable may be 35bits. Thus add dma_mask for it. Fixes: 301c3ca12576 ("iommu/mediatek: Allow page table PA up to 35bit") Signed-off-by: Chengci.Xu Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230316101445.12443-1-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit e6026eb080fa1c1ef6eec24567b733809a5e3018 Author: Tom Rix Date: Mon Mar 27 20:06:20 2023 -0400 mtd: lpddr_cmds: remove unused words variable clang with W=1 reports drivers/mtd/lpddr/lpddr_cmds.c:409:31: error: variable 'words' set but not used [-Werror,-Wunused-but-set-variable] int ret, wbufsize, word_gap, words; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230328000620.1778033-1-trix@redhat.com commit bb685c1f35c357e9b935880b2946b402d6860ee0 Author: Christophe Kerello Date: Fri Mar 24 16:51:05 2023 +0100 mtd: rawnand: stm32_fmc2: depends on ARCH_STM32 instead of MACH_STM32MP157 To be able to compile the driver on all STM32MP SOCs, we move the "depends on" on ARCH_STM32. Signed-off-by: Christophe Kerello Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230324155105.826063-3-christophe.kerello@foss.st.com commit 1f79a611e74c97dcb76054b9f28f41a122a7a93b Author: Rob Herring Date: Fri Mar 17 18:36:30 2023 -0500 dt-bindings: mtd: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Acked-by: Jernej Skrabec Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Reviewed-by: Heiko Stuebner #rockchip Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230317233631.3968509-1-robh@kernel.org commit 0cda003f1d9e662e55660c657e37f6f1e66437b6 Author: Khadija Kamran Date: Tue Mar 28 03:00:57 2023 +0500 staging: rtl8192e: fix unbalanced braces around else Balance if/else braces as recommended by checkpatch.pl Signed-off-by: Khadija Kamran Link: https://lore.kernel.org/r/ZCISGaFELBfDyGRT@khadija-virtual-machine Signed-off-by: Greg Kroah-Hartman commit 63ff870ce0e54f34c4c7a3b95883c30916801400 Author: Khadija Kamran Date: Tue Mar 28 00:49:09 2023 +0500 staging: rtl8192u: add '*/' on separate line in block comments Linux kernel coding style uses '*/' on a separate line at the end of multi line comments. Fix block comments by moving '*/' at the end of block comments on a separate line as reported by checkpatch.pl script. Signed-off-by: Khadija Kamran Link: https://lore.kernel.org/r/140e0928531e61dc7396271a5b16a6be17514c76.1679945728.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman commit ba25552a58b4e463c6716aaa775936bbb66022c5 Author: Khadija Kamran Date: Tue Mar 28 00:49:08 2023 +0500 staging: rtl8192u: add '*' on subsequent lines in block comment Linux kernel coding style for block comments uses a column of '*' on the left side. Fix block comment by adding '*' on subsequent lines as reported by checkatch.pl script. Signed-off-by: Khadija Kamran Link: https://lore.kernel.org/r/3a581aae65a152ce41fdd2db667574eba1783113.1679945728.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman commit a430e7757debd2c0ac096a808e4363eace287773 Author: Khadija Kamran Date: Tue Mar 28 00:49:07 2023 +0500 staging: rtl8192u: remove commented out code Remove all of the commented out code lines as they are not being used and can be brought back in the future if they are ever needed again. Signed-off-by: Khadija Kamran Link: https://lore.kernel.org/r/e5e2fabde70d497cc8b683ff444854299180812b.1679945728.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman commit c7177ef36c743923a093d6b0ffd73f1002fc7cd6 Author: Khadija Kamran Date: Tue Mar 28 00:49:06 2023 +0500 staging: rtl8192u: remove change history from comments Remove the change history information as it is not required in the comments. Signed-off-by: Khadija Kamran Link: https://lore.kernel.org/r/95fff39231ebb2bb683c2a8f252a93f4845fffb1.1679945728.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman commit 35c2274d3417b837097d87901705abae4e121f7a Author: Philipp Hortmann Date: Mon Mar 27 23:03:14 2023 +0200 staging: rtl8192e: Remove wireless mode WIRELESS_MODE_N_5G Remove WIRELESS_MODE_N_5G from equations as it is not supported by hardware and to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/fdefd4d706493fa3f080550d31eb5bea3f4e1a7e.1679949171.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit a993465cd1e3499bd1f5841dadfae354b8a95f06 Author: Philipp Hortmann Date: Mon Mar 27 23:03:06 2023 +0200 staging: rtl8192e: Remove wireless modes A, N_5G from rtl92e_set_channel Remove WIRELESS_MODE_N_5G and WIRELESS_MODE_A as those are not supported by hardware and to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/aaaf832fe5f90ad2c618bef22c1bdbd5209c4359.1679949171.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1bfa151cc0e10b717921630330dfd53f15b28b77 Author: Philipp Hortmann Date: Mon Mar 27 23:02:57 2023 +0200 staging: rtl8192e: Remove wireless modes A, N_5G from _rtl92e_hwconfig Remove WIRELESS_MODE_N_5G and WIRELESS_MODE_A as those are not supported by hardware and to improve readability. Combine WIRELESS_MODE_G with default to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/ab96af426f090ac2fe4a2536b052fcf8a2e38aa8.1679949171.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4648ac046624d7d59d51122277f50fed84923629 Author: Philipp Hortmann Date: Mon Mar 27 23:02:51 2023 +0200 staging: rtl8192e: Remove unused if clauses in rtl92e_set_wireless_mode Equation (support_mode & WIRELESS_MODE_N_24G) will always be true. Remove resulting dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/359ed203ab08afe5c2f449f40d2958868b4e55b4.1679949171.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1b4217b400aedad80512c389c8aef4fe7bbc0119 Author: Philipp Hortmann Date: Mon Mar 27 23:02:45 2023 +0200 staging: rtl8192e: Remove 5G wireless_mode in rtl92e_set_wireless_mode Remove wireless_mode == WIRELESS_MODE_N_5G as 5G is not supported by hardware and to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/693a34b187f21d9d48accd3b0b953dff2f0795eb.1679949171.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit f57a7f1515828cb493efb0628537e98d0747da71 Author: Philipp Hortmann Date: Mon Mar 27 23:02:37 2023 +0200 staging: rtl8192e: Remove _rtl92e_get_supported_wireless_mode Remove _rtl92e_get_supported_wireless_mode to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/f8470fff23d5870cbcda3d6f4978ba17016a8fe8.1679949171.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit bf8d1ecccb297b81bcca980dcd04fc1fb74d4209 Author: Philipp Hortmann Date: Mon Mar 27 23:02:19 2023 +0200 staging: rtl8192e: Remove rtl92e_config_phy Remove rtl92e_config_phy to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/5c433417b4e8e96a70c23a03bec30d26e45791d0.1679949171.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5ceb51dae50666635d6e5dcd4cca9582e0826bf8 Author: Sumitra Sharma Date: Mon Mar 27 10:16:53 2023 -0700 staging: rtl8192e: remove extra blank lines Remove the extra blank line in accordance with the Linux kernel coding-style regulations. These issues were reported by checkpatch.pl "CHECK: Please don't use multiple blank lines" Signed-off-by: Sumitra Sharma Link: https://lore.kernel.org/r/20230327171653.GA188371@sumitra.com Signed-off-by: Greg Kroah-Hartman commit 1068d4e910cc8e8d06dc04512287a59737292f40 Author: Sumitra Sharma Date: Mon Mar 27 10:13:51 2023 -0700 staging: rtl8192e: fix line ending with '(' Splitting function header to multiple lines because of 80 characters per line limit, results in ending the function call line with '('. This leads to CHECK reported by checkpatch.pl Move the first parameter right after the '(' in the function call line. Align the rest of the parameters to the opening parenthesis. Signed-off-by: Sumitra Sharma Link: https://lore.kernel.org/r/20230327171351.GA188288@sumitra.com Signed-off-by: Greg Kroah-Hartman commit 16313403d873ff17a587818b61f84c8cb4971cef Author: Nuno Sá Date: Mon Mar 27 16:54:14 2023 +0200 staging: iio: resolver: ads1210: fix config mode As stated in the device datasheet [1], bits a0 and a1 have to be set to 1 for the configuration mode. [1]: https://www.analog.com/media/en/technical-documentation/data-sheets/ad2s1210.pdf Fixes: b19e9ad5e2cb9 ("staging:iio:resolver:ad2s1210 general driver cleanup") Cc: stable Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20230327145414.1505537-1-nuno.sa@analog.com Signed-off-by: Greg Kroah-Hartman commit a33bfafd99e0d1e33dfe910f751426f298a218b6 Author: Yang Li Date: Thu Mar 23 16:09:52 2023 +0800 soc: ti: Use devm_platform_ioremap_resource() According to commit 7945f929f1a7 ("drivers: provide devm_platform_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to use devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230323080952.124410-1-yang.lee@linux.alibaba.com Signed-off-by: Nishanth Menon commit e9e17bcd554e29d18b065f48eca355382f06e9cb Author: Svyatoslav Ryhel Date: Mon Mar 27 18:02:19 2023 +0300 ARM: tegra: transformers: Bind RT5631 sound nodes TF201, TF300TG and TF700T support RT5631 codec. Signed-off-by: Svyatoslav Ryhel Signed-off-by: Thierry Reding commit 2b48106419288b78ff934601c4c5c1c84532fcab Author: Svyatoslav Ryhel Date: Mon Mar 27 18:02:18 2023 +0300 ARM: tegra: transformers: Update WM8903 sound nodes Fix headset detection and use device GPIO microphone detection on WM8903 Transformers. Signed-off-by: Svyatoslav Ryhel Signed-off-by: Thierry Reding commit 8d59efc33fdaa2c82072b4d3ba5f67d7dd9270d0 Author: Janne Grunau Date: Tue Feb 14 15:07:23 2023 +0100 arm64: dts: apple: t600x: Disable unused PCIe ports The PCIe ports are unused (without devices) so disable them instead of removing them. Signed-off-by: Janne Grunau Reviewed-by: Sven Peter Signed-off-by: Hector Martin commit a0189fdfb73dac856b8fa9b9f9581e5099c9391f Author: Janne Grunau Date: Tue Feb 14 15:07:22 2023 +0100 arm64: dts: apple: t8103: Disable unused PCIe ports The PCIe ports are unused (without devices) so disable them instead of removing them. Fixes: 7c77ab91b33d ("arm64: dts: apple: Add missing M1 (t8103) devices") Signed-off-by: Janne Grunau Reviewed-by: Sven Peter Signed-off-by: Hector Martin commit bdfe6de2695c5bccc663a5a7d530f81925d8bc10 Author: Martin Povišer Date: Fri Feb 24 17:21:59 2023 +0100 soc: apple: rtkit: Crop syslog messages Crop trailing whitespace, null, and newline characters in syslog messages received from coprocessors. Notably DCP sends its messages including a trailing newline, so prior to this change we would end up cluttering the kernel log by repeated newlines at the end of messages. Signed-off-by: Martin Povišer Reviewed-by: Hector Martin Signed-off-by: Hector Martin commit 223444882d9bb30d2eaa9e221f2939f881dec4aa Author: Asahi Lina Date: Fri Feb 24 15:49:44 2023 +0900 soc: apple: rtkit: Fix buffer address field width The buffer address field is missing two bits. This matters for the GPU, which uses upper-half 64-bit addresses on the ASC and those get sign extended from the mailbox message field, so the right number of high bits need to be set. Signed-off-by: Asahi Lina Reviewed-by: Sven Peter Signed-off-by: Hector Martin commit 2d5ce3fbef324295f7c210f29d724b44b5642cb2 Author: Hector Martin Date: Tue Mar 7 13:10:21 2023 +0100 arm64: dts: apple: t8112: Initial t8112 (M2) device trees This adds device trees for the following devices: - Macbook Air (M2, 2022) - Macbook Pro 13" (M2, 2022) - Mac mini (M2, 2023) This brings the hardware support of the machines to the same level as M1 and M1 Pro / Max / Ultra. Supported hardware include NVMe, PCIe, serial, pinctrl/gpio, I2C, iommu, watchdog, admac, nco, cpufreq, boot framebuffer for laptop panels and the interrupt controller. The ethernet LAN device on the M2 Mac mini is the only working PCIe device. The Wlan/BT devices are powered off and controlled by the not yet supported SMC. The ASMedia xHCI on the M2 Mac mini requires firmware to be loaded at startup. The main missing hardware support to make these devices useful are the integrated USB 2/3/4 controller, keyboard and trackpad on the laptops and SMC to power the PCIe Wlan/BT device on. The M2 Mac mini has currently no working display output. Due to changes in the display pipeline it is currently not possible to initialize the HDMI output in the bootloader. Co-developed-by: Janne Grunau Signed-off-by: Janne Grunau Reviewed-by: Sven Peter Signed-off-by: Hector Martin commit 828fe6b6245bd9b20dbf3e0dd54c79b17be758e7 Author: Janne Grunau Date: Tue Mar 7 13:10:20 2023 +0100 dt-bindings: arm: apple: Add t8112 j413/j473/j493 compatibles This adds the following apple,t8112 platforms: - apple,j413 - MacBook Air (M2, 2022) - apple,j473 - Mac mini (M2, 2023) - apple,j493 - MacBook Pro (13-inch, M2, 2022) The sort order logic here is having SoC numeric code families in release order, and SoCs within each family in release order: - t8xxx (Apple HxxP/G series, "phone"/"tablet" chips) - t8103 (Apple H13G/M1) - t8112 (Apple H14G/M2) - t6xxx (Apple HxxJ series, "desktop" chips) - t6000 (Apple H13J(S)/M1 Pro) - t6001 (Apple H13J(C)/M1 Max) - t6002 (Apple H13J(D)/M1 Ultra) Acked-by: Krzysztof Kozlowski Signed-off-by: Janne Grunau Signed-off-by: Hector Martin commit b058e9d8ceb0992dbb7c3f195248442f7f9cca93 Author: Janne Grunau Date: Tue Mar 7 13:10:18 2023 +0100 dt-bindings: clock: apple,nco: Add t8112-nco compatible The block found on Apple's M2 SoC is compatible with the existing driver so add its per-SoC compatible. Acked-by: Martin Povišer Acked-by: Krzysztof Kozlowski Signed-off-by: Janne Grunau Signed-off-by: Hector Martin commit 1e8edd6a6d5f5a604a7f71b90f5dca831c5d3490 Author: Janne Grunau Date: Tue Mar 7 13:10:17 2023 +0100 dt-bindings: i2c: apple,i2c: Add apple,t8112-i2c compatible This block on the Apple M2 is compatible with the existing driver so just add the per-SoC compatible. Acked-by: Wolfram Sang # for I2C Acked-by: Krzysztof Kozlowski Signed-off-by: Janne Grunau Signed-off-by: Hector Martin commit 43145cfe308214addb3f4ecaa48fd2c415a2938f Author: Janne Grunau Date: Tue Mar 7 13:10:16 2023 +0100 dt-bindings: pinctrl: apple,pinctrl: Add apple,t8112-pinctrl compatible This new SoC uses the same pinctrl hardware, so just add a new per-SoC compatible. Reviewed-by: Linus Walleij Acked-by: Krzysztof Kozlowski Signed-off-by: Janne Grunau Signed-off-by: Hector Martin commit 869c942fb567c9b1dcc25487200fdcf474157029 Author: Janne Grunau Date: Tue Mar 7 13:10:15 2023 +0100 dt-bindings: pci: apple,pcie: Add t8112 support The block found in the Apple M2 SoC is compatible with the existing driver, and supports 4 downstream ports like the t6000 one. Acked-by: Krzysztof Kozlowski Signed-off-by: Janne Grunau Signed-off-by: Hector Martin commit 20fa978cd98c6a44c206bfd7bcb16afa4d4e8a29 Author: Janne Grunau Date: Tue Mar 7 13:10:14 2023 +0100 dt-bindings: nvme: apple: Add apple,t8112-nvme-ans2 compatible string "apple,t8112-nvme-ans2" as found on Apple M2 SoCs is compatible with the existing driver. Add its SoC specific compatible string to allow special handling if it'll be necessary. t8112 uses only 2 power-domains as no 4 and 8 TB configurations are offered. Acked-by: Krzysztof Kozlowski Signed-off-by: Janne Grunau Signed-off-by: Hector Martin commit 695ea8cc5eb51b8baece7be07480a13a91bfdf48 Author: Janne Grunau Date: Tue Mar 7 13:10:13 2023 +0100 dt-bindings: mailbox: apple,mailbox: Add t8112 compatibles The mailbox hardware remains unchanged on M2 SoCs so just add its per-SoC compatible. Acked-by: Krzysztof Kozlowski Signed-off-by: Janne Grunau Signed-off-by: Hector Martin commit 667b44ee3aaa10a5aaf9af3f0d1f51716e3132db Author: Janne Grunau Date: Tue Mar 7 13:10:12 2023 +0100 dt-bindings: iommu: apple,sart: Add apple,t8112-sart compatible string "apple,t8112-sart" as found on the Apple M2 SoC appears to be SART3 as well. To allow for later discovered incompatibilities use '"apple,t8112-sart", "apple,t6000-sart"' as compatible string. Acked-by: Krzysztof Kozlowski Signed-off-by: Janne Grunau Signed-off-by: Hector Martin commit 93b415b2e164348bf29fb89b77a3d9585bab76a5 Author: Janne Grunau Date: Tue Mar 7 13:10:11 2023 +0100 dt-bindings: interrupt-controller: apple,aic2: Add apple,t8112-aic compatible The Apple M2 SoC uses AICv2 and is compatible with the existing driver. Add its per-SoC compatible. Since multi-die versions of the M2 are not expected decrease '#interrupt-cells' to 3 for apple,t8112-aic. This is seamlessly handled inside the driver. Acked-by: Marc Zyngier Signed-off-by: Janne Grunau Reviewed-by: Rob Herring Signed-off-by: Hector Martin commit 355d090ecbbc808bcfe21635f5ca7e25ba252846 Author: Janne Grunau Date: Tue Mar 7 13:10:10 2023 +0100 dt-bindings: arm: cpus: Add apple,avalanche & blizzard compatibles These are the CPU cores in the Apple silicon M2 SoC. Acked-by: Krzysztof Kozlowski Signed-off-by: Janne Grunau Signed-off-by: Hector Martin commit 1f21734b14b4cc93d82374108a549b42a7672c4c Author: Janne Grunau Date: Tue Mar 7 13:10:09 2023 +0100 dt-bindings: watchdog: apple,wdt: Add t8112-wdt compatible The block on the Apple M2 SoC is compatible with the existing driver so add its per-SoC compatible. Acked-by: Krzysztof Kozlowski Signed-off-by: Janne Grunau Signed-off-by: Hector Martin commit bbdd33769d319d1e7bb8fec09124a49b3573a2d3 Author: Janne Grunau Date: Tue Mar 7 13:10:08 2023 +0100 dt-bindings: arm: apple: apple,pmgr: Add t8112-pmgr compatible The block on Apple M2 SoCs is compatible with the existing driver so just add its per-SoC compatible. Acked-by: Krzysztof Kozlowski Signed-off-by: Janne Grunau Signed-off-by: Hector Martin commit 4d93b3a974a828a5d330075358d55a6a3e2df2f2 Author: Hector Martin Date: Tue Mar 7 13:10:07 2023 +0100 dt-bindings: power: apple,pmgr-pwrstate: Add t8112 compatible Add the apple,t8112-pmgr-pwrstate compatible for the Apple M2 SoC. This goes after t8103. The sort order logic here is having SoC numeric code families in release order, and SoCs within each family in release order: - t8xxx (Apple HxxP/G series, "phone"/"tablet" chips) - t8103 (Apple H13G/M1) - t8112 (Apple H14G/M2) - t6xxx (Apple HxxJ series, "desktop" chips) - t6000 (Apple H13J(S)/M1 Pro) - t6001 (Apple H13J(C)/M1 Max) - t6002 (Apple H13J(D)/M1 Ultra) Note that t600[0-2] share the t6000 compatible where the hardware is 100% compatible, which is usually the case in this highly related set of SoCs. Reviewed-by: Janne Grunau Acked-by: Krzysztof Kozlowski Signed-off-by: Janne Grunau Signed-off-by: Hector Martin commit d8b0c963e9191cbb43b6979835f31dc52f9fd095 Merge: 4cee0fb9cc4b5 e3ec366eb0d1d Author: Paolo Abeni Date: Tue Mar 28 12:03:54 2023 +0200 Merge branch 'allocate-multiple-skbuffs-on-tx' Arseniy Krasnov says: ==================== allocate multiple skbuffs on tx This adds small optimization for tx path: instead of allocating single skbuff on every call to transport, allocate multiple skbuff's until credit space allows, thus trying to send as much as possible data without return to af_vsock.c. Also this patchset includes second patch which adds check and return from 'virtio_transport_get_credit()' and 'virtio_transport_put_credit()' when these functions are called with 0 argument. This is needed, because zero argument makes both functions to behave as no-effect, but both of them always tries to acquire spinlock. Moreover, first patch always calls function 'virtio_transport_put_credit()' with zero argument in case of successful packet transmission. ==================== Link: https://lore.kernel.org/r/b0d15942-65ba-3a32-ba8d-fed64332d8f6@sberdevices.ru Signed-off-by: Paolo Abeni commit e3ec366eb0d1d5f7cbe28e747c76180f7d45f00d Author: Arseniy Krasnov Date: Sun Mar 26 01:04:50 2023 +0300 virtio/vsock: check argument to avoid no effect call Both of these functions have no effect when input argument is 0, so to avoid useless spinlock access, check argument before it. Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: Paolo Abeni commit b68ffb1b3bee3762f7579bdcc9ca3d415ed0b9b4 Author: Arseniy Krasnov Date: Sun Mar 26 01:03:52 2023 +0300 virtio/vsock: allocate multiple skbuffs on tx This adds small optimization for tx path: instead of allocating single skbuff on every call to transport, allocate multiple skbuff's until credit space allows, thus trying to send as much as possible data without return to af_vsock.c. Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Signed-off-by: Paolo Abeni commit 3678b2dd7290040603133eb94f510c5817121766 Merge: 96d1c81e6a047 f00647d8127be Author: Marc Kleine-Budde Date: Tue Mar 28 11:43:59 2023 +0200 Merge patch series "can: bxcan: add support for ST bxCAN controller" Dario Binacchi says: The series adds support for the basic extended CAN controller (bxCAN) found in many low- to middle-end STM32 SoCs. The driver has been tested on the stm32f469i-discovery board with a kernel version 5.19.0-rc2 in loopback + silent mode: ip link set can0 type can bitrate 125000 loopback on listen-only on ip link set up can0 candump can0 -L & cansend can0 300#AC.AB.AD.AE.75.49.AD.D1 For uboot and kernel compilation, as well as for rootfs creation I used buildroot: make stm32f469_disco_sd_defconfig make but I had to patch can-utils and busybox as can-utils and iproute are not compiled for MMU-less microcotrollers. In the case of can-utils, replacing the calls to fork() with vfork(), I was able to compile the package with working candump and cansend applications, while in the case of iproute, I ran into more than one problem and finally I decided to extend busybox's ip link command for CAN-type devices. I'm still wondering if it was really necessary, but this way I was able to test the driver. Changes in v10: https://lore.kernel.org/all/20230328073328.3949796-1-dario.binacchi@amarulasolutions.com - Fix errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'. Fix the "st,can-primary" description removing the "Note:" word that caused the failure. - Slightly change the note text at the top of the driver module. No functional changes. Changes in v9: https://lore.kernel.org/all/20230327201630.3874028-1-dario.binacchi@amarulasolutions.com - Fix commit description formatting. No semantic changes have been made. - Replace master/slave terms with primary/secondary. - Replace master/slave terms with primary/secondary. - Replace master/slave terms with primary/secondary. Changes in v8: https://lore.kernel.org/all/20230326160325.3771891-1-dario.binacchi@amarulasolutions.com - Do not enable the clock in probe and enable/disable it in open/close. - Return IRQ_NONE if no IRQ is active. Changes in v7: https://lore.kernel.org/all/20230116175152.2839455-1-dario.binacchi@amarulasolutions.com - Add Vincent Mailhol's Reviewed-by tag. - Remove all unused macros for reading/writing the controller registers. - Add CAN_ERR_CNT flag to notify availability of error counter. - Move the "break" before the newline in the switch/case statements. - Print the mnemotechnic instead of the error value in each netdev_err(). - Remove the debug print for timings parameter. - Do not copy the data if CAN_RTR_FLAG is set in bxcan_start_xmit(). - Populate ndev->ethtool_ops with the default timestamp info. Changes in v6: https://lore.kernel.org/all/20230109182356.141849-1-dario.binacchi@amarulasolutions.com - move can1 node before gcan to keep ordering by address. Changes in v5: https://lore.kernel.org/all/20221017164231.4192699-1-dario.binacchi@amarulasolutions.com - Add Rob Herring's Acked-by tag. - Add Rob Herring's Reviewed-by tag. - Put static in front of bxcan_enable_filters() definition. Changes in v4: https://lore.kernel.org/all/20220925175209.1528960-1-dario.binacchi@amarulasolutions.com - Remove "st,stm32f4-bxcan-core" compatible. In this way the can nodes (compatible "st,stm32f4-bxcan") are no longer children of a parent node with compatible "st,stm32f4-bxcan-core". - Add the "st,gcan" property (global can memory) to can nodes which references a "syscon" node containing the shared clock and memory addresses. - Replace the node can@40006400 (compatible "st,stm32f4-bxcan-core") with the gcan@40006600 node ("sysnode" compatible). The gcan node contains clocks and memory addresses shared by the two can nodes of which it's no longer the parent. - Add to can nodes the "st,gcan" property (global can memory) which references the gcan@40006600 node ("sysnode compatibble). - Add "dt-bindings: arm: stm32: add compatible for syscon gcan node" patch. - Drop the core driver. Thus bxcan-drv.c has been renamed to bxcan.c and moved to the drivers/net/can folder. The drivers/net/can/bxcan directory has therefore been removed. - Use the regmap_*() functions to access the shared memory registers. - Use spinlock to protect bxcan_rmw(). - Use 1 space, instead of tabs, in the macros definition. - Drop clock ref-counting. - Drop unused code. - Drop the _SHIFT macros and use FIELD_GET()/FIELD_PREP() directly. - Add BXCAN_ prefix to lec error codes. - Add the macro BXCAN_RX_MB_NUM. - Enable time triggered mode and use can_rx_offload(). - Use readx_poll_timeout() in function with timeouts. - Loop from tail to head in bxcan_tx_isr(). - Check bits of tsr register instead of pkts variable in bxcan_tx_isr(). - Don't return from bxcan_handle_state_change() if skb/cf are NULL. - Enable/disable the generation of the bus error interrupt depending on can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING. - Don't return from bxcan_handle_bus_err() if skb is NULL. - Drop statistics updating from bxcan_handle_bus_err(). - Add an empty line in front of 'return IRQ_HANDLED;' - Rename bxcan_start() to bxcan_chip_start(). - Rename bxcan_stop() to bxcan_chip_stop(). - Disable all IRQs in bxcan_chip_stop(). - Rename bxcan_close() to bxcan_ndo_stop(). - Use writel instead of bxcan_rmw() to update the dlc register. Changes in v3: https://lore.kernel.org/all/20220828133329.793324-1-dario.binacchi@amarulasolutions.com - Remove 'Dario Binacchi ' SOB. - Add description to the parent of the two child nodes. - Move "patterProperties:" after "properties: in top level before "required". - Add "clocks" to the "required:" list of the child nodes. - Remove 'Dario Binacchi ' SOB. - Add "clocks" to can@0 node. - Remove 'Dario Binacchi ' SOB. - Remove a blank line. - Remove 'Dario Binacchi ' SOB. - Fix the documentation file path in the MAINTAINERS entry. - Do not increment the "stats->rx_bytes" if the frame is remote. - Remove pr_debug() call from bxcan_rmw(). Changes in v2: https://lore.kernel.org/all/20220820082936.686924-1-dario.binacchi@amarulasolutions.com - Change the file name into 'st,stm32-bxcan-core.yaml'. - Rename compatibles: - st,stm32-bxcan-core -> st,stm32f4-bxcan-core - st,stm32-bxcan -> st,stm32f4-bxcan - Rename master property to st,can-master. - Remove the status property from the example. - Put the node child properties as required. - Remove a blank line. - Fix sparse errors. - Create a MAINTAINERS entry. - Remove the print of the registers address. - Remove the volatile keyword from bxcan_rmw(). - Use tx ring algorithm to manage tx mailboxes. - Use can_{get|put}_echo_skb(). - Update DT properties. v1: https://lore.kernel.org/all/20220817143529.257908-1-dario.binacchi@amarulasolutions.com Link: https://lore.kernel.org/all/20230328073328.3949796-1-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde commit f00647d8127be4d3f37f7e07dace24c04689ec63 Author: Dario Binacchi Date: Tue Mar 28 09:33:28 2023 +0200 can: bxcan: add support for ST bxCAN controller Add support for the basic extended CAN controller (bxCAN) found in many low- to middle-end STM32 SoCs. It supports the Basic Extended CAN protocol versions 2.0A and B with a maximum bit rate of 1 Mbit/s. The controller supports two channels (CAN1 as primary and CAN2 as secondary) and the driver can enable either or both of the channels. They share some of the required logic (e. g. clocks and filters), and that means you cannot use the secondary CAN without enabling some hardware resources managed by the primary CAN. Each channel has 3 transmit mailboxes, 2 receive FIFOs with 3 stages and 28 scalable filter banks. It also manages 4 dedicated interrupt vectors: - transmit interrupt - FIFO 0 receive interrupt - FIFO 1 receive interrupt - status change error interrupt Driver uses all 3 available mailboxes for transmission and FIFO 0 for reception. Rx filter rules are configured to the minimum. They accept all messages and assign filter 0 to CAN1 and filter 14 to CAN2 in identifier mask mode with 32 bits width. It enables and uses transmit, receive buffers for FIFO 0 and error and status change interrupts. Signed-off-by: Dario Binacchi Reviewed-by: Vincent Mailhol Link: https://lore.kernel.org/all/20230328073328.3949796-6-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde commit 559a6e75b4bcf0fc9e41d34865e72cf742f67d8e Author: Dario Binacchi Date: Tue Mar 28 09:33:27 2023 +0200 ARM: dts: stm32: add pin map for CAN controller on stm32f4 Add pin configurations for using CAN controller on stm32f469-disco board. They are located on the Arduino compatible connector CN5 (CAN1) and on the extension connector CN12 (CAN2). Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/all/20230328073328.3949796-5-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde commit 7355ad1950f41e755e6dc451834be3b94f82acd4 Author: Dario Binacchi Date: Tue Mar 28 09:33:26 2023 +0200 ARM: dts: stm32: add CAN support on stm32f429 Add support for bxcan (Basic eXtended CAN controller) to STM32F429. The chip contains two CAN peripherals, CAN1 the primary and CAN2 the secondary, that share some of the required logic like clock and filters. This means that the secondary CAN can't be used without the primary CAN. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/all/20230328073328.3949796-4-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde commit e43250c0ac8123e4560ac39777cd94ab6e75ee23 Author: Dario Binacchi Date: Tue Mar 28 09:33:25 2023 +0200 dt-bindings: net: can: add STM32 bxcan DT bindings Add documentation of device tree bindings for the STM32 basic extended CAN (bxcan) controller. Signed-off-by: Dario Binacchi Reviewed-by: Rob Herring Link: https://lore.kernel.org/all/20230328073328.3949796-3-dario.binacchi@amarulasolutions.com [mkl: drop unneeded quotes] Signed-off-by: Marc Kleine-Budde commit b341be6de98caf746100b2740ed2db68cd083261 Author: Dario Binacchi Date: Tue Mar 28 09:33:24 2023 +0200 dt-bindings: arm: stm32: add compatible for syscon gcan node Since commit ad440432d1f9 ("dt-bindings: mfd: Ensure 'syscon' has a more specific compatible") it is required to provide at least 2 compatibles string for syscon node. This patch documents the new compatible for stm32f4 SoC to support global/shared CAN registers access for bxCAN controllers. Signed-off-by: Dario Binacchi Acked-by: Rob Herring Link: https://lore.kernel.org/all/20230328073328.3949796-2-dario.binacchi@amarulasolutions.com Signed-off-by: Marc Kleine-Budde commit 1b9f0ec81af0012aae30aa3b4c711ad71d42e246 Author: Alexandre Torgue Date: Mon Mar 20 18:03:31 2023 +0100 ARM: dts: stm32: fix spi1 pin assignment on stm32mp15 Bank A and B IOs can't be handled by the pin controller 'Z'. This patch assign spi1 pin definition to the correct controller. Fixes: 9ad65d245b7b ("ARM: dts: stm32: stm32mp15-pinctrl: add spi1-1 pinmux group") Signed-off-by: Alexandre Torgue commit fdd9b7dcf1ad7115b2d997e047e8e978c474736b Author: Matt Roper Date: Mon Mar 27 21:55:47 2023 +0200 drm/i915: Check for unreliable MMIO during forcewake Although we now sanitycheck MMIO access during driver load to make sure the MMIO BAR isn't returning all 0xFFFFFFFF, there have been a few cases where (temporarily?) unreliable MMIO access has happened after GPU resets or power events. We'll often notice this on our next GT register access since forcewake handling will fail; let's change our handling slightly so that when this happens we print a more meaningful message clarifying that the problem is the MMIO access, not forcewake specifically. Signed-off-by: Matt Roper Cc: Mika Kuoppala Reviewed-by: Andi Shyti Reviewed-by: Andrzej Hajda Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230327195547.356584-3-andi.shyti@linux.intel.com commit de4149730d9d72f50d4e6dfedad0d11b1df05b7e Author: Matt Roper Date: Mon Mar 27 21:55:46 2023 +0200 drm/i915: Sanitycheck MMIO access early in driver load We occasionally see the PCI device in a non-accessible state at the point the driver is loaded. When this happens, all BAR accesses will read back as 0xFFFFFFFF. Rather than reading registers and misinterpreting their (invalid) values, let's specifically check for 0xFFFFFFFF in a register that cannot have that value to see if the device is accessible. Signed-off-by: Matt Roper Cc: Mika Kuoppala Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230327195547.356584-2-andi.shyti@linux.intel.com commit ee1ee6db07795d9637bc5e8993a8ddcf886541ef Author: Thomas Gleixner Date: Thu Mar 23 21:55:31 2023 +0100 atomics: Provide rcuref - scalable reference counting atomic_t based reference counting, including refcount_t, uses atomic_inc_not_zero() for acquiring a reference. atomic_inc_not_zero() is implemented with a atomic_try_cmpxchg() loop. High contention of the reference count leads to retry loops and scales badly. There is nothing to improve on this implementation as the semantics have to be preserved. Provide rcuref as a scalable alternative solution which is suitable for RCU managed objects. Similar to refcount_t it comes with overflow and underflow detection and mitigation. rcuref treats the underlying atomic_t as an unsigned integer and partitions this space into zones: 0x00000000 - 0x7FFFFFFF valid zone (1 .. (INT_MAX + 1) references) 0x80000000 - 0xBFFFFFFF saturation zone 0xC0000000 - 0xFFFFFFFE dead zone 0xFFFFFFFF no reference rcuref_get() unconditionally increments the reference count with atomic_add_negative_relaxed(). rcuref_put() unconditionally decrements the reference count with atomic_add_negative_release(). This unconditional increment avoids the inc_not_zero() problem, but requires a more complex implementation on the put() side when the count drops from 0 to -1. When this transition is detected then it is attempted to mark the reference count dead, by setting it to the midpoint of the dead zone with a single atomic_cmpxchg_release() operation. This operation can fail due to a concurrent rcuref_get() elevating the reference count from -1 to 0 again. If the unconditional increment in rcuref_get() hits a reference count which is marked dead (or saturated) it will detect it after the fact and bring back the reference count to the midpoint of the respective zone. The zones provide enough tolerance which makes it practically impossible to escape from a zone. The racy implementation of rcuref_put() requires to protect rcuref_put() against a grace period ending in order to prevent a subtle use after free. As RCU is the only mechanism which allows to protect against that, it is not possible to fully replace the atomic_inc_not_zero() based implementation of refcount_t with this scheme. The final drop is slightly more expensive than the atomic_dec_return() counterpart, but that's not the case which this is optimized for. The optimization is on the high frequeunt get()/put() pairs and their scalability. The performance of an uncontended rcuref_get()/put() pair where the put() is not dropping the last reference is still on par with the plain atomic operations, while at the same time providing overflow and underflow detection and mitigation. The performance of rcuref compared to plain atomic_inc_not_zero() and atomic_dec_return() based reference counting under contention: - Micro benchmark: All CPUs running a increment/decrement loop on an elevated reference count, which means the 0 to -1 transition never happens. The performance gain depends on microarchitecture and the number of CPUs and has been observed in the range of 1.3X to 4.7X - Conversion of dst_entry::__refcnt to rcuref and testing with the localhost memtier/memcached benchmark. That benchmark shows the reference count contention prominently. The performance gain depends on microarchitecture and the number of CPUs and has been observed in the range of 1.1X to 2.6X over the previous fix for the false sharing issue vs. struct dst_entry::__refcnt. When memtier is run over a real 1Gb network connection, there is a small gain on top of the false sharing fix. The two changes combined result in a 2%-5% total gain for that networked test. Reported-by: Wangyang Guo Reported-by: Arjan Van De Ven Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230323102800.158429195@linutronix.de commit e5ab9eff46b04c5a04778e40d7092fed3fda52ca Author: Thomas Gleixner Date: Thu Mar 23 21:55:30 2023 +0100 atomics: Provide atomic_add_negative() variants atomic_add_negative() does not provide the relaxed/acquire/release variants. Provide them in preparation for a new scalable reference count algorithm. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20230323102800.101763813@linutronix.de commit 0fbb60def782c40ac6338e4fed6898b690be50b0 Author: Krzysztof Kozlowski Date: Sun Mar 26 22:44:52 2023 +0200 ARM: dts: stm32: drop invalid simple-panel compatible on stm32mp157c-lxa "simple-panel" compatible is not documented and nothing in Linux kernel binds to it. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alexandre Torgue commit 42b4c479025d92b2a4869bd233f20159ae9ce692 Author: Ville Syrjälä Date: Mon Mar 27 16:39:42 2023 +0300 drm/i915/ips: Add i915_ips_false_color debugfs file Similar to FBC let's expose an debugfs file to control IPS false color. Enabling this provides an immediate visual feedback on whether IPS is working or not. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230327133942.22063-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 1fb4da5f7858d78570a9f726e98f96797447b32e Author: Ville Syrjälä Date: Mon Mar 27 16:39:41 2023 +0300 drm/i915/ips: Make IPS debugfs per-crtc IPS is a per-pipe feature, so let's move the debugfs stuff under the crtc directory, and only register it when IPS is actually available. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230327133942.22063-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 1b61fdfdd656b3940cff24c25c211777389174b0 Author: Rob Herring Date: Mon Mar 27 12:02:22 2023 -0500 dt-bindings: soc: amlogic: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230327170222.4107746-1-robh@kernel.org Signed-off-by: Neil Armstrong commit e341f338180c84cd98af3016cf5bcfde45a041fb Author: Andrew Davis Date: Thu Feb 16 09:33:38 2023 -0600 ARM: dts: omap: Drop ti,omap36xx compatible This was not matched anywhere and provides no additional information. The driver code already checks also for "ti,omap3630" compatible. Signed-off-by: Andrew Davis Message-Id: <20230216153339.19987-2-afd@ti.com> [tony@atomide.com: updated comments for ti,omap3630 compatible] Signed-off-by: Tony Lindgren commit c947af2cb2599e78dc839419ef7ef4f4adb42bdb Author: Peng Fan Date: Thu Mar 23 19:19:51 2023 +0800 arm64: dts: imx8dxl: drop clocks from scu clock controller The clocks and clock-names are not documented and not used, drop them. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 45bd868b5b4bf45efb1ac2335fb2d9cdaab73497 Author: Peng Fan Date: Wed Mar 22 16:07:22 2023 +0800 arm64: dts: imx8mp: verdin-yavia: drop disable-over-current disable-over-current is for chipidea IP, i.MX8MQ use dwc3, this property is not valid. Drop it. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 6bd577c0a42b219b26ab84b145d10b663667ed00 Author: Peng Fan Date: Wed Mar 22 16:07:21 2023 +0800 arm64: dts: imx8mq: tqma8mq-mba8mx: drop disable-over-current disable-over-current is for chipidea IP, i.MX8MQ use dwc3, this property is not valid. Drop it. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 96d1c81e6a0478535342dff6c730adb076cd84e8 Author: Oliver Hartkopp Date: Sun Mar 26 13:59:11 2023 +0200 can: isotp: add module parameter for maximum pdu size With ISO 15765-2:2016 the PDU size is not limited to 2^12 - 1 (4095) bytes but can be represented as a 32 bit unsigned integer value which allows 2^32 - 1 bytes (~4GB). The use-cases like automotive unified diagnostic services (UDS) and flashing of ECUs still use the small static buffers which are provided at socket creation time. When a use-case requires to transfer PDUs up to 1025 kByte the maximum PDU size can now be extended by setting the module parameter max_pdu_size. The extended size buffers are only allocated on a per-socket/connection base when needed at run-time. changes since v2: https://lore.kernel.org/all/20230313172510.3851-1-socketcan@hartkopp.net - use ARRAY_SIZE() to reference DEFAULT_MAX_PDU_SIZE only at one place changes since v1: https://lore.kernel.org/all/20230311143446.3183-1-socketcan@hartkopp.net - limit the minimum 'max_pdu_size' to 4095 to maintain the classic behavior before ISO 15765-2:2016 Link: https://github.com/raspberrypi/linux/issues/5371 Signed-off-by: Oliver Hartkopp Link: https://lore.kernel.org/all/20230326115911.15094-1-socketcan@hartkopp.net Signed-off-by: Marc Kleine-Budde commit 517d4927aabe488144863e72b52bb3e506fecd34 Author: Greg Kroah-Hartman Date: Sat Mar 25 09:45:26 2023 +0100 driver core: bus: constify class_unregister/destroy() The class_unregister() and class_destroy() function should be taking a const * to struct class, not just a *, so fix that up. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230325084526.3622123-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 2f9e87f5a2941b259336c7ea6c5a1499ede4554a Author: Andy Shevchenko Date: Thu Mar 23 20:26:40 2023 +0200 driver core: Add a comment to set_primary_fwnode() on nullifying Explain what parent && fn == parent->fwnode conditional does. With this refactor the code a bit. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230323182640.61085-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit cf34b880a66e3581300b997df25a7c12f7cfe7d7 Author: Greg Kroah-Hartman Date: Mon Mar 27 20:16:06 2023 +0200 powerpc/fsl: fix compiler warning in fsl_wakeup_sys_init() Commit c93bd175414a ("powerpc/fsl: move to use bus_get_dev_root()") changed to use bus_get_dev_root() but didn't consider that the function can fail and return an uninitialized value of ret (hint, the function can never fail, but the compiler doesn't know that.) Fix this up by setting ret to -EINVAL just in case something really goes wrong with the call to bus_get_dev_root(). Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org Fixes: c93bd175414a ("powerpc/fsl: move to use bus_get_dev_root()") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303280045.4oaaezcn-lkp@intel.com/ Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230327181606.1424846-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 19050da1d1057a7bc73fd9039f94b7f63a00e54e Author: Kenneth Lee Date: Tue Aug 9 00:20:50 2022 -0700 ARM: OMAP2+: hwmod: Use kzalloc for allocating only one element Use kzalloc(...) rather than kcalloc(1, ...) because the number of elements we are specifying in this case is 1, so kzalloc would accomplish the same thing and we can simplify. Signed-off-by: Kenneth Lee Message-Id: <20220809072050.1733996-1-klee33@uw.edu> Signed-off-by: Tony Lindgren commit 89e990559c378e06d2b2ef4f5dd6e963795cb7d8 Author: ye xingchen Date: Tue Sep 20 06:51:13 2022 +0000 ARM: OMAP2+: Remove the unneeded result variable Return the value amx3_common_init() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen Message-Id: <20220920065113.215685-1-ye.xingchen@zte.com.cn> Signed-off-by: Tony Lindgren commit 31006a885118ef7eb18f865f5ff615fb31868bfe Author: Jilin Yuan Date: Wed Sep 14 16:43:15 2022 +0800 ARM: OMAP2+: fix repeated words in comments Delete the redundant word 'from'. Signed-off-by: Jilin Yuan Message-Id: <20220914084315.40165-1-yuanjilin@cdjrlc.com> Signed-off-by: Tony Lindgren commit 977f54705e99b92779f2bfac2597b967772b1b16 Author: Lukas Bulwahn Date: Mon Mar 20 09:38:06 2023 +0100 ARM: OMAP2+: remove obsolete config OMAP3_SDRC_AC_TIMING Commit d42f265a5d7a ("ARM: OMAP3: clock: remove un-used core dpll re-program code") removes arch/arm/mach-omap2/sram34xx.S, which implemented the effect of the config OMAP3_SDRC_AC_TIMING. Since then, the OMAP3_SDRC_AC_TIMING config was hanging around without effect. Remove this obsolete config. Signed-off-by: Lukas Bulwahn Message-Id: <20230320083806.9545-1-lukas.bulwahn@gmail.com> Signed-off-by: Tony Lindgren commit 1238c8b91c5aca6dd13bccb1b4dc716718e7bfac Author: Luis Chamberlain Date: Thu Mar 2 12:28:24 2023 -0800 fs-verity: simplify sysctls with register_sysctl() register_sysctl_paths() is only needed if your child (directories) have entries but this does not so just use register_sysctl() so to do away with the path specification. Signed-off-by: Luis Chamberlain Link: https://lore.kernel.org/r/20230302202826.776286-10-mcgrof@kernel.org Signed-off-by: Eric Biggers commit 8b7d3fe96881e0f13c0176812b40432558882023 Author: Eric Biggers Date: Fri Feb 24 15:25:30 2023 -0800 fs/buffer.c: use b_folio for fsverity work Use b_folio now that it exists. This removes an unnecessary call to compound_head(). No actual change in behavior. Link: https://lore.kernel.org/r/20230224232530.98440-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 41b2ad80fdcaafd42fce173cb95847d0cd8614c2 Author: Eric Biggers Date: Mon Mar 20 16:39:43 2023 -0700 fscrypt: use WARN_ON_ONCE instead of WARN_ON As per Linus's suggestion (https://lore.kernel.org/r/CAHk-=whefxRGyNGzCzG6BVeM=5vnvgb-XhSeFJVxJyAxAF8XRA@mail.gmail.com), use WARN_ON_ONCE instead of WARN_ON. This barely adds any extra overhead, and it makes it so that if any of these ever becomes reachable (they shouldn't, but that's the point), the logs can't be flooded. Link: https://lore.kernel.org/r/20230320233943.73600-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 6f2656eab290f0dd437cd4b2ec956c3519172d3b Author: Luís Henriques Date: Thu Mar 16 18:14:11 2023 +0000 fscrypt: new helper function - fscrypt_prepare_lookup_partial() This patch introduces a new helper function which can be used both in lookups and in atomic_open operations by filesystems that want to handle filename encryption and no-key dentries themselves. The reason for this function to be used in atomic open is that this operation can act as a lookup if handed a dentry that is negative. And in this case we may need to set DCACHE_NOKEY_NAME. Signed-off-by: Luís Henriques Tested-by: Xiubo Li Reviewed-by: Xiubo Li [ebiggers: improved the function comment, and moved the function to just below __fscrypt_prepare_lookup()] Link: https://lore.kernel.org/r/20230320220149.21863-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 9c7fb7f7637496e375cec9f56d7e316fb7dbf6c3 Author: Eric Biggers Date: Fri Feb 24 15:25:03 2023 -0800 fs/buffer.c: use b_folio for fscrypt work Use b_folio now that it exists. This removes an unnecessary call to compound_head(). No actual change in behavior. Link: https://lore.kernel.org/r/20230224232503.98372-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit d08ab82f59d55b0e5acfeb453081278dfc33f232 Author: Eduard Zingerman Date: Tue Mar 28 03:47:38 2023 +0300 libbpf: Fix double-free when linker processes empty sections Double-free error in bpf_linker__free() was reported by James Hilliard. The error is caused by miss-use of realloc() in extend_sec(). The error occurs when two files with empty sections of the same name are linked: - when first file is processed: - extend_sec() calls realloc(dst->raw_data, dst_align_sz) with dst->raw_data == NULL and dst_align_sz == 0; - dst->raw_data is set to a special pointer to a memory block of size zero; - when second file is processed: - extend_sec() calls realloc(dst->raw_data, dst_align_sz) with dst->raw_data == and dst_align_sz == 0; - realloc() "frees" dst->raw_data special pointer and returns NULL; - extend_sec() exits with -ENOMEM, and the old dst->raw_data value is preserved (it is now invalid); - eventually, bpf_linker__free() attempts to free dst->raw_data again. This patch fixes the bug by avoiding -ENOMEM exit for dst_align_sz == 0. The fix was suggested by Andrii Nakryiko . Reported-by: James Hilliard Signed-off-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Tested-by: James Hilliard Link: https://lore.kernel.org/bpf/CADvTj4o7ZWUikKwNTwFq0O_AaX+46t_+Ca9gvWMYdWdRtTGeHQ@mail.gmail.com/ Link: https://lore.kernel.org/bpf/20230328004738.381898-3-eddyz87@gmail.com commit 4cee0fb9cc4b5477637fdeb2e965f5fc7d624622 Merge: da954ae18cdbf db88681c4885b Author: Jakub Kicinski Date: Mon Mar 27 19:55:10 2023 -0700 Merge tag 'linux-can-next-for-6.4-20230327' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2023-03-27 The first 2 patches by Geert Uytterhoeven add transceiver support and improve the error messages in the rcar_canfd driver. Cai Huoqing contributes 3 patches which remove a redundant call to pci_clear_master() in the c_can, ctucanfd and kvaser_pciefd driver. Frank Jungclaus's patch replaces the struct esd_usb_msg with a union in the esd_usb driver to improve readability. Markus Schneider-Pargmann contributes 5 patches to improve the performance in the m_can driver, especially for SPI attached controllers like the tcan4x5x. * tag 'linux-can-next-for-6.4-20230327' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: can: m_can: Keep interrupts enabled during peripheral read can: m_can: Disable unused interrupts can: m_can: Remove double interrupt enable can: m_can: Always acknowledge all interrupts can: m_can: Remove repeated check for is_peripheral can: esd_usb: Improve code readability by means of replacing struct esd_usb_msg with a union can: kvaser_pciefd: Remove redundant pci_clear_master can: ctucanfd: Remove redundant pci_clear_master can: c_can: Remove redundant pci_clear_master can: rcar_canfd: Improve error messages can: rcar_canfd: Add transceiver support ==================== Link: https://lore.kernel.org/r/20230327073354.1003134-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit da954ae18cdbff77b8dec4be544221f6860355c2 Merge: 2bcc74ffd21a7 060cdac218eaf Author: Jakub Kicinski Date: Mon Mar 27 19:50:00 2023 -0700 Merge branch 'add-tx-push-buf-len-param-to-ethtool' Shay Agroskin says: ==================== Add tx push buf len param to ethtool This patchset adds a new sub-configuration to ethtool get/set queue params (ethtool -g) called 'tx-push-buf-len'. This configuration specifies the maximum number of bytes of a transmitted packet a driver can push directly to the underlying device ('push' mode). The motivation for pushing some of the bytes to the device has the advantages of - Allowing a smart device to take fast actions based on the packet's header - Reducing latency for small packets that can be copied completely into the device This new param is practically similar to tx-copybreak value that can be set using ethtool's tunable but conceptually serves a different purpose. While tx-copybreak is used to reduce the overhead of DMA mapping and makes no sense to use if less than the whole segment gets copied, tx-push-buf-len allows to improve performance by analyzing the packet's data (usually headers) before performing the DMA operation. The configuration can be queried and set using the commands: $ ethtool -g [interface] # ethtool -G [interface] tx-push-buf-len [number of bytes] This patchset also adds support for the new configuration in ENA driver for which this parameter ensures efficient resources management on the device side. ==================== Link: https://lore.kernel.org/r/20230323163610.1281468-1-shayagr@amazon.com Signed-off-by: Jakub Kicinski commit 060cdac218eaf3650d7556e4ed8b6d2bd79d4a0c Author: Shay Agroskin Date: Thu Mar 23 18:36:10 2023 +0200 net: ena: Advertise TX push support LLQ is auto enabled by the device and disabling it isn't supported on new ENA generations while on old ones causes sub-optimal performance. This patch adds advertisement of push-mode when LLQ mode is used, but rejects an attempt to modify it. Reviewed-by: Michal Kubiak Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit b0c59e53968b55f6add088319bd31ca7dcdd8484 Author: Shay Agroskin Date: Thu Mar 23 18:36:09 2023 +0200 net: ena: Add support to changing tx_push_buf_len The ENA driver allows for two distinct values for the number of bytes of the packet's payload that can be written directly to the device. For a value of 224 the driver turns on Large LLQ Header mode in which the first 224 of the packet's payload are written to the LLQ. Reviewed-by: Michal Kubiak Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit a416cb254d35d1e53ab3d4cbb81ea3835e5a10fd Author: Shay Agroskin Date: Thu Mar 23 18:36:08 2023 +0200 net: ena: Recalculate TX state variables every device reset With the ability to modify LLQ entry size, the size of packet's payload that can be written directly to the device changes. This patch makes the driver recalculate this information every device negotiation (also called device reset). Reviewed-by: Michal Kubiak Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit 1e36668886882d51641bd57ae659e678b3f1ca9c Author: David Arinzon Date: Thu Mar 23 18:36:07 2023 +0200 net: ena: Add an option to configure large LLQ headers Allow configuring the device with large LLQ headers. The Low Latency Queue (LLQ) allows the driver to write the first N bytes of the packet, along with the rest of the TX descriptors directly into device (N can be either 96 or 224 for large LLQ headers configuration). Having L4 TCP/UDP headers contained in the first 96 bytes of the packet is required to get maximum performance from the device. Reviewed-by: Simon Horman Reviewed-by: Michal Kubiak Signed-off-by: David Arinzon Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit 3a09108446b674a544a736318a7916c5bcea3f14 Author: Shay Agroskin Date: Thu Mar 23 18:36:06 2023 +0200 net: ena: Make few cosmetic preparations to support large LLQ Move ena_calc_io_queue_size() implementation closer to the file's beginning so that it can be later called from ena_device_init() function without adding a function declaration. Also add an empty line at some spots to separate logical blocks in funcitons. Reviewed-by: Simon Horman Reviewed-by: Michal Kubiak Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit 233eb4e786b57ea686b51c13a04cc2839fd682fc Author: Shay Agroskin Date: Thu Mar 23 18:36:05 2023 +0200 ethtool: Add support for configuring tx_push_buf_len This attribute, which is part of ethtool's ring param configuration allows the user to specify the maximum number of the packet's payload that can be written directly to the device. Example usage: # ethtool -G [interface] tx-push-buf-len [number of bytes] Co-developed-by: Jakub Kicinski Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit 3e4d5ba9a3f85f21f1ebdee5a5901bb43389abc5 Author: Shay Agroskin Date: Thu Mar 23 18:36:04 2023 +0200 netlink: Add a macro to set policy message with format string Similar to NL_SET_ERR_MSG_FMT, add a macro which sets netlink policy error message with a format string. Signed-off-by: Shay Agroskin Signed-off-by: Jakub Kicinski commit 2bcc74ffd21a748fb310135175a1f6b271397e0f Author: Tom Rix Date: Sat Mar 25 20:17:33 2023 -0400 qed: remove unused num_ooo_add_to_peninsula variable clang with W=1 reports drivers/net/ethernet/qlogic/qed/qed_ll2.c:649:6: error: variable 'num_ooo_add_to_peninsula' set but not used [-Werror,-Wunused-but-set-variable] u32 num_ooo_add_to_peninsula = 0, cid; ^ This variable is not used so remove it. Signed-off-by: Tom Rix Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230326001733.1343274-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit 3948b05950fdd64002a5f182c65ba5cf2d53cf71 Author: Eric Dumazet Date: Thu Mar 23 09:28:42 2023 -0700 net: introduce a config option to tweak MAX_SKB_FRAGS Currently, MAX_SKB_FRAGS value is 17. For standard tcp sendmsg() traffic, no big deal because tcp_sendmsg() attempts order-3 allocations, stuffing 32768 bytes per frag. But with zero copy, we use order-0 pages. For BIG TCP to show its full potential, we add a config option to be able to fit up to 45 segments per skb. This is also needed for BIG TCP rx zerocopy, as zerocopy currently does not support skbs with frag list. We have used MAX_SKB_FRAGS=45 value for years at Google before we deployed 4K MTU, with no adverse effect, other than a recent issue in mlx4, fixed in commit 26782aad00cc ("net/mlx4: MLX4_TX_BOUNCE_BUFFER_SIZE depends on MAX_SKB_FRAGS") Back then, goal was to be able to receive full size (64KB) GRO packets without the frag_list overhead. Note that /proc/sys/net/core/max_skb_frags can also be used to limit the number of fragments TCP can use in tx packets. By default we keep the old/legacy value of 17 until we get more coverage for the updated values. Sizes of struct skb_shared_info on 64bit arches MAX_SKB_FRAGS | sizeof(struct skb_shared_info): ============================================== 17 320 21 320+64 = 384 25 320+128 = 448 29 320+192 = 512 33 320+256 = 576 37 320+320 = 640 41 320+384 = 704 45 320+448 = 768 This inflation might cause problems for drivers assuming they could pack both the incoming packet (for MTU=1500) and skb_shared_info in half a page, using build_skb(). v3: fix build error when CONFIG_NET=n v2: fix two build errors assuming MAX_SKB_FRAGS was "unsigned long" Signed-off-by: Eric Dumazet Reviewed-by: Nikolay Aleksandrov Reviewed-by: Jason Xing Link: https://lore.kernel.org/r/20230323162842.1935061-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit bd89d69a529fbef3559a16dbe4cee4b04225136a Author: Desnes Nunes Date: Thu Mar 16 11:09:11 2023 -0300 dma-debug: add cacheline to user/kernel space dump messages Having the cacheline also printed on the debug_dma_dump_mappings() and dump_show() is useful for debugging. Furthermore, this also standardizes the messages shown on both dump functions. Signed-off-by: Desnes Nunes Signed-off-by: Christoph Hellwig commit 479623fd0c5ad86a43ae11670f7da2a7c462acd4 Author: Desnes Nunes Date: Thu Mar 16 11:09:10 2023 -0300 dma-debug: small dma_debug_entry's comment and variable name updates Small update on dma_debug_entry's struct commentary and also standardize the usage of 'dma_addr' variable name from debug_dma_map_page() on debug_dma_unmap_page(), and similarly on debug_dma_free_coherent() Signed-off-by: Desnes Nunes Signed-off-by: Christoph Hellwig commit 25a4ce564921db0973b74c04e0ea23bd2ee12a3a Author: Petr Tesarik Date: Mon Feb 20 16:06:22 2023 +0100 dma-direct: cleanup parameters to dma_direct_optimal_gfp_mask Since both callers of dma_direct_optimal_gfp_mask() pass dev->coherent_dma_mask as the second argument, it is better to remove that parameter altogether. Not only is reducing number of parameters good for readability, but the new function signature is also more logical: The optimal flags depend only on data contained in struct device. While touching this code, let's also rename phys_mask to phys_limit in dma_direct_alloc_from_pool(), because it is indeed a limit. Signed-off-by: Petr Tesarik Signed-off-by: Christoph Hellwig commit 140b26035b2d379d94e6e3936ab2e0adf94efe46 Author: Damien Le Moal Date: Thu Mar 23 12:28:54 2023 +0900 ata: pata_parport-bpck6: Declare mode_map as static Compilation C=1 of the bpck6 protocol module generates the following message: drivers/ata/pata_parport/bpck6.c:62:5: warning: symbol 'mode_map' was not declared. Should it be static? Fix this by declaring mode_map as static. Signed-off-by: Damien Le Moal Reviewed-by: Ondrej Zary commit 0098c52745112c4387942a37559ababeaf072f0c Author: Douglas Anderson Date: Thu Mar 23 10:30:09 2023 -0700 spi: spi-qcom-qspi: Support pinctrl sleep states It's fairly common practice for drivers to switch to a "sleep" pinctrl state at the end of its runtime_suspend function and then back to "default" at the beginning of runtime_resume. Let's do that for spi-qcom-qspi. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230323102605.5.I79544b9486033bd7b27f2be55adda6d36f62a366@changeid Signed-off-by: Mark Brown commit ffaf886e249ee269f9084c21fbd8617ce9b83817 Author: Kuninori Morimoto Date: Mon Mar 27 00:34:26 2023 +0000 ASoC: soc-core.c: add snd_soc_add_pcm_runtimes() Current ASoC supports snd_soc_add_pcm_runtime(), but user need to call it one-by-one if it has multi dai_links. This patch adds snd_soc_add_pcm_runtimes() which supports multi dai_links. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h6u76nhq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8908c36dabad7dd52872034f9f42c6c077bc7270 Author: Johan Hovold Date: Mon Mar 27 16:55:55 2023 +0200 ASoC: qcom: audioreach: drop stray 'get' from error message Drop the stray 'get', which appears to be a copy-paste error, from the registration-failure error message. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230327145555.19351-1-johan+linaro@kernel.org Signed-off-by: Mark Brown commit 919c119415c7b67056449f51374939d49189a326 Author: Damien Le Moal Date: Thu Mar 23 12:25:51 2023 +0900 ata: pata_parport-bpck6: Remove dependency on 64BIT There is no reason to have compilation of the bpck6 protocol module being dependent on 64BIT. Remove this dependency. Signed-off-by: Damien Le Moal Reviewed-by: Ondrej Zary commit b2cfec52feb3bb737c4b65018ef4bfe9789e4be8 Author: Marek Vasut Date: Wed Mar 8 22:09:53 2023 +0530 drm: bridge: samsung-dsim: Add i.MX8M Plus support Add extras to support i.MX8M Plus. The main change is the removal of HS/VS/DE signal inversion in the LCDIFv3-DSIM glue logic, otherwise the implementation of this IP in i.MX8M Plus is very much compatible with the i.MX8M Mini/Nano one. Reviewed-by: Marek Vasut Reviewed-by: Frieder Schrempf Acked-by: Robert Foss Signed-off-by: Marek Vasut Signed-off-by: Jagan Teki Tested-by: Marek Szyprowski Signed-off-by: Inki Dae commit 073b8f9e8e121186574d1a133f624e9cb34ed4f8 Author: Jagan Teki Date: Wed Mar 8 22:09:52 2023 +0530 dt-bindings: display: exynos: dsim: Add NXP i.MX8M Plus support Samsung MIPI DSIM bridge can also be found in i.MX8M Plus SoC. Add dt-bingings for it. Reviewed-by: Marek Vasut Acked-by: Rob Herring Signed-off-by: Jagan Teki Signed-off-by: Inki Dae commit 4d562c70c4dc08294d6063dfa8d027d81e90e2a2 Author: Jagan Teki Date: Wed Mar 8 22:09:51 2023 +0530 drm: bridge: samsung-dsim: Add i.MX8M Mini/Nano support Samsung MIPI DSIM master can also be found in i.MX8M Mini/Nano SoC. Add compatible and associated driver_data for it. Reviewed-by: Marek Vasut Reviewed-by: Frieder Schrempf Acked-by: Robert Foss Reviewed-by: Laurent Pinchart Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki Tested-by: Adam Ford Tested-by: Marek Szyprowski Signed-off-by: Inki Dae commit 0daee58d88b856c3a327fcf5e74169d87ac2efb1 Author: Jagan Teki Date: Wed Mar 8 22:09:50 2023 +0530 dt-bindings: display: exynos: dsim: Add NXP i.MX8M Mini/Nano support Samsung MIPI DSIM bridge can also be found in i.MX8M Mini/Nano SoC. Add dt-bingings for it. Reviewed-by: Marek Vasut Acked-by: Rob Herring Signed-off-by: Jagan Teki Signed-off-by: Inki Dae commit e7447128ca4a250374d6721ee98e3e3cf99551a6 Author: Jagan Teki Date: Wed Mar 8 22:09:49 2023 +0530 drm: bridge: Generalize Exynos-DSI driver into a Samsung DSIM bridge Samsung MIPI DSIM controller is common DSI IP that can be used in various SoCs like Exynos, i.MX8M Mini/Nano. In order to access this DSI controller between various platform SoCs, the ideal way to incorporate this in the drm stack is via the drm bridge driver. We already have a consolidated code for supporting component and bridge based DRM drivers, so keep the exynos component based code in existing exynos_drm_dsi.c and move generic bridge code as part of samsung-dsim.c Tested-by: Marek Szyprowski Reviewed-by: Marek Vasut Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki Signed-off-by: Inki Dae commit 48b64ba81f6b4677f0eba812916f7e90e883764f Author: Jagan Teki Date: Wed Mar 8 22:09:48 2023 +0530 drm: exynos: dsi: Add host helper for te_irq_handler IRQ handler for te-gpio seems to be common across DSIM host. However, Exynos is handling this via CRTC drivers but there is no clear evidence on how the same has been handled in i.MX8MM. Keeping the handler as-it-is can be a viable option but adding DSIM bridge core in upcoming patches is not possible to call Exynos CRTC handler as DSIM bridge has to be common across DRM bridge core instead of platform specific DRM drivers like Exynos here. So, this patch handles the handler via platform host helper, so-that handling platform specific hook across Exynos and generic can be reasonable till it makes it generic across all platforms. Tested-by: Marek Szyprowski Reviewed-by: Marek Vasut Signed-off-by: Jagan Teki Signed-off-by: Inki Dae commit 70e360f9b548d99f959668d4f047d1363d42fe8e Author: Jagan Teki Date: Wed Mar 8 22:09:47 2023 +0530 drm: exynos: dsi: Consolidate component and bridge DSI host registration, attach and detach operations are quite different for the component and bridge-based DRM drivers. Supporting generic bridge driver to use both component and bridge based DRM drivers can be tricky and would require additional host related operation hooks. Add host operation hooks for registering and unregistering Exynos and generic drivers, where Exynos hooks are used in existing Exynos component based DRM drivers and generic hooks are used in i.MX8M bridge based DRM drivers. Add host attach and detach operation hooks for Exynos component DRM drivers and those get invoked while DSI core host attach and detach gets called. Tested-by: Marek Szyprowski Reviewed-by: Marek Vasut Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki Signed-off-by: Inki Dae commit 44d214a711d958b5c1f72e05f046f6b44a9766ea Author: Jagan Teki Date: Wed Mar 8 22:09:46 2023 +0530 drm: exynos: dsi: Add atomic_get_input_bus_fmts Finding the right input bus format throughout the pipeline is hard so add atomic_get_input_bus_fmts callback and initialize with the proper input format from list of supported output formats. This format can be used in pipeline for negotiating bus format between the DSI-end of this bridge and the other component closer to pipeline components. List of Pixel formats are taken from, AN13573 i.MX 8/RT MIPI DSI/CSI-2, Rev. 0, 21 March 2022 3.7.4 Pixel formats Table 14. DSI pixel packing formats Reviewed-by: Marek Vasut Reviewed-by: Frieder Schrempf Tested-by: Marek Szyprowski Signed-off-by: Jagan Teki Signed-off-by: Inki Dae commit 184f37e578b90a9addabc437804376a94dca79c9 Author: Jagan Teki Date: Wed Mar 8 22:09:45 2023 +0530 drm: exynos: dsi: Add input_bus_flags LCDIF-DSIM glue logic inverts the HS/VS/DE signals and expecting the i.MX8M Mini/Nano DSI host to add additional Data Enable signal active low (DE_LOW). This makes the valid data transfer on each horizontal line. So, add additional bus flags DE_LOW setting via input_bus_flags for i.MX8M Mini/Nano platforms. Tested-by: Marek Szyprowski Reviewed-by: Marek Vasut Reviewed-by: Frieder Schrempf Suggested-by: Marek Vasut Signed-off-by: Jagan Teki Signed-off-by: Inki Dae commit 88576e23885e0d3b40177b6bad6fe7e3007e41ea Author: Jagan Teki Date: Wed Mar 8 22:09:44 2023 +0530 drm: exynos: dsi: Add atomic check Look like an explicit fixing up of mode_flags is required for DSIM IP present in i.MX8M Mini/Nano SoCs. At least the LCDIF + DSIM needs active low sync polarities in order to correlate the correct sync flags of the surrounding components in the chain to make sure the whole pipeline can work properly. On the other hand the i.MX 8M Mini Applications Processor Reference Manual, Rev. 3, 11/2020 says. "13.6.3.5.2 RGB interface Vsync, Hsync, and VDEN are active high signals." i.MX 8M Mini Applications Processor Reference Manual Rev. 3, 11/2020 3.6.3.5.2 RGB interface i.MX 8M Nano Applications Processor Reference Manual Rev. 2, 07/2022 13.6.2.7.2 RGB interface both claim "Vsync, Hsync, and VDEN are active high signals.", the LCDIF must generate inverted HS/VS/DE signals, i.e. active LOW. No clear evidence about whether it can be documentation issues or something, so added proper comments on the code. Comments are suggested by Marek Vasut. Tested-by: Marek Szyprowski Reviewed-by: Marek Vasut Reviewed-by: Frieder Schrempf Signed-off-by: Jagan Teki Signed-off-by: Inki Dae commit bb57453d6aec9217ad516f97b08ba1622a674a64 Author: Marek Szyprowski Date: Wed Mar 8 22:09:43 2023 +0530 drm: exynos: dsi: Handle proper host initialization Host transfer() in the DSI master will invoke only when the DSI commands are sent from DSI devices like DSI Panel or DSI bridges and this host the transfer wouldn't invoke for I2C-based-DSI bridge drivers. Handling DSI host initialization in transfer calls misses the controller setup for I2C configured DSI bridges. This patch updates the DSI host initialization by calling host to init from bridge pre_enable as the bridge pre_enable API is invoked by core as it is common across all classes of DSI device drivers. The host init during pre_enable is conditional and not invoked for Exynos as existing downstream drm panels and bridges in Exynos are expecting the host initialization during DSI transfer. Reviewed-by: Marek Vasut Reviewed-by: Frieder Schrempf Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki Signed-off-by: Inki Dae commit 7e9f0d321ce5ea6a0ac4a6b1cdcbae8a2d4ec34c Author: Jagan Teki Date: Wed Mar 8 22:09:42 2023 +0530 drm: exynos: dsi: Introduce hw_type platform data Samsung MIPI DSIM controller is common DSI IP that can be used in various SoCs like Exynos, i.MX8M Mini/Nano/Plus. Add hw_type enum via platform_data so that accessing the different controller data between various platforms becomes easy and meaningful. Tested-by: Marek Szyprowski Reviewed-by: Marek Vasut Reviewed-by: Frieder Schrempf Suggested-by: Marek Szyprowski Signed-off-by: Jagan Teki Signed-off-by: Inki Dae commit c4f8bdad42b9bf64bc1440021b0b8e82746faf8e Author: Jagan Teki Date: Wed Mar 8 22:09:41 2023 +0530 drm: exynos: dsi: Add platform PLL_P (PMS_P) offset Look like PLL PMS_P offset value varies between platforms that have Samsung DSIM IP. However, there is no clear evidence for it as both Exynos and i.MX 8M Mini Application Processor Reference Manual is still referring the PMS_P offset as 13. The offset 13 is not working for i.MX8M Mini SoCs but the downstream NXP sec-dsim.c driver is using offset 14 for i.MX8M Mini SoC platforms [1] [2]. PMS_P value set in sec_mipi_dsim_check_pll_out using PLLCTRL_SET_P() with offset 13 and then an additional offset of one bit added in sec_mipi_dsim_config_pll via PLLCTRL_SET_PMS(). Not sure whether it is reference manual documentation or something else but this patch trusts the downstream code and handle PLL_P offset via platform driver data so-that imx8mm driver data shall use pll_p_offset to 14. Similar to Mini the i.MX8M Nano/Plus also has P=14, unlike Exynos. [1] https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/gpu/drm/bridge/sec-dsim.c?h=imx_5.4.47_2.2.0#n210 [2] https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/gpu/drm/bridge/sec-dsim.c?h=imx_5.4.47_2.2.0#n211 Tested-by: Marek Szyprowski Reviewed-by: Marek Vasut Signed-off-by: Frieder Schrempf Signed-off-by: Jagan Teki Signed-off-by: Inki Dae commit 9528af4afe5e35817e1c698f0ad84070d86632cd Author: Jagan Teki Date: Wed Mar 8 22:09:40 2023 +0530 drm: exynos: dsi: Mark PHY as optional The same Samsung MIPI DSIM master can also be used in NXP's i.MX8M Mini/Nano/Plus SoC. In i.MX8M Mini/Nano/Plus SoC the DSI Phy requires a MIPI DPHY bit to reset in order to activate the PHY and that can be done via upstream i.MX8M blk-ctrl driver. So, mark the phy get as optional. Tested-by: Marek Szyprowski Reviewed-by: Frieder Schrempf Reviewed-by: Marek Vasut Signed-off-by: Jagan Teki Signed-off-by: Inki Dae commit e39a82bf56e6a74254d1bf2e2c304b0261f3473b Author: Jagan Teki Date: Wed Mar 8 22:09:39 2023 +0530 drm: exynos: dsi: Lookup OF-graph or Child node devices In general, for MIPI DSI there are three ways to represent the pipeline for an upstream bridge to find the connected downstream panel or bridge. 1. Child panel or bridge as a conventional device tree child node. 2. Child panel or bridge as an OF-graph port node. 3. Child panel or bridge as an OF-graph ports node. There are three different downstream panels or bridges that are possible to connect an upstream DSI host bridge - DSI Panel, DSI Bridge, and I2C-Configured DSI bridge. An example of the downstream panel represented as a child node, &dsi { compatible = "samsung,exynos5433-mipi-dsi"; ports { port@0 { reg = <0>; dsi_to_mic: endpoint { remote-endpoint = <&mic_to_dsi>; }; }; }; panel@0 { reg = <0>; }; }; An example of the downstream bridge represented as a port node, &i2c4 { bridge@2c { compatible = "ti,sn65dsi84"; ports { port@0 { reg = <0>; bridge_in_dsi: endpoint { remote-endpoint = <&dsi_out_bridge>; data-lanes = <1 2>; }; }; port@2 { reg = <2>; bridge_out_panel: endpoint { remote-endpoint = <&panel_out_bridge>; }; }; }; }; }; &dsi { compatible = "fsl,imx8mm-mipi-dsim"; port { dsi_in_lcdif: endpoint@0 { reg = <0>; remote-endpoint = <&lcdif_out_dsi>; }; dsi_out_bridge: endpoint@1 { reg = <1>; remote-endpoint = <&bridge_in_dsi>; }; }; }; An example of the downstream bridge represented as a ports node, &dsi { compatible = "fsl,imx8mm-mipi-dsim"; ports { port@0 { reg = <0>; dsi_in_lcdif: endpoint@0 { reg = <0>; remote-endpoint = <&lcdif_out_dsi>; }; }; port@1 { reg = <1>; dsi_out_bridge: endpoint { remote-endpoint = <&bridge_in_dsi>; }; }; }; In, summary it is possible to represent all three downstream slaves devices using OF-graph port or ports node however only DSI Panel and DSI Bridge are possible but not possible to represent I2C-Configured DSI bridge child nodes since I2C-Configure bridges are child of I2C node, not upstream DSI host bridge and it is must represent them endpoint port linking. This indeed means, the OF-graph port or ports representation is mandatory for I2C-Configured DSI bridges. This patch tries to add an OF-graph port or ports representation detection code on top of existing child node detection. It is possible to replace the entire detection code using existing drm_of helper drm_of_find_panel_or_bridge but it will break the Exynos DSI since the pipeline doesn't support OF-graph port or ports node. Overall, this patch has a combination of child and OF-graph pipeline detections in order to support the backward compatibility of Exynos DSI child node and i.MX8M Mini/Nano/Plus OF-graph port or ports node pipelines. This is the first common DSI host bridge driver that needs to support all possible downstream connection pipeline combinations. Tested-by: Marek Szyprowski Reviewed-by: Marek Vasut Signed-off-by: Jagan Teki Signed-off-by: Inki Dae commit 56193b57cd8a65f942e064dbf499a7fa54ca5c74 Author: Jagan Teki Date: Wed Mar 8 22:09:38 2023 +0530 drm: exynos: dsi: Drop explicit call to bridge detach Exynos DSI already converted into a bridge driver, so bridge detach will suppose happened during bridge chain removal done by the bridge core. Drop the explicit call chain to detach the bridge. Tested-by: Marek Szyprowski Reviewed-by: Marek Vasut Signed-off-by: Jagan Teki Signed-off-by: Inki Dae commit 54b48080278a9e4012d72c95e92378dc6742947d Author: Nathan Lu Date: Fri Mar 24 18:05:53 2023 +0800 drm/mediatek: Add mediatek-drm of vdosys0 support for mt8188 Add driver data of mt8188 vdosys0 to mediatek-drm and the sub driver. Signed-off-by: amy zhang Signed-off-by: Nathan Lu Signed-off-by: Jason-JH.Lin Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230324100553.13719-1-jason-jh.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit e97be4fbc1b16f3e02ee004c12967e360cb06d52 Merge: e45d6a52fe2b0 77c0c966719f0 Author: Palmer Dabbelt Date: Mon Mar 27 16:27:49 2023 -0700 Merge patch series "Add RISC-V 32 NOMMU support" Jesse Taube says: This patch-set aims to add NOMMU support to RV32. Many people want to build simple emulators or HDL models of RISC-V this patch makes it possible to run linux on them. Yimin Gu is the original author of this set. Submitted here: https://lists.buildroot.org/pipermail/buildroot/2022-November/656134.html Though Jesse T rewrote the Dconf. * b4-shazam-merge: riscv: configs: Add nommu PHONY defconfig for RV32 riscv: Kconfig: Allow RV32 to build with no MMU Link: https://lore.kernel.org/r/20230301002657.352637-1-Mr.Bossman075@gmail.com Signed-off-by: Palmer Dabbelt commit 77c0c966719f07f14c82f358745f77582580cdcd Author: Jesse Taube Date: Tue Feb 28 19:26:57 2023 -0500 riscv: configs: Add nommu PHONY defconfig for RV32 32bit risc-v can be configured to run without MMU. Introduce rv32_nommu_virt_defconfig .PHONY target, that is based on nommu_virt_defconfig. This is similar to how rv32_defconfig is based on "defconfig". Suggested-by: Conor Dooley Signed-off-by: Jesse Taube Cc: Yimin Gu Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230301002657.352637-4-Mr.Bossman075@gmail.com Signed-off-by: Palmer Dabbelt commit b5e2c507b06c9d36411845149162a804ae7b04a9 Author: Yimin Gu Date: Tue Feb 28 19:26:56 2023 -0500 riscv: Kconfig: Allow RV32 to build with no MMU Some RISC-V 32bit cores do not have an MMU, and the kernel should be able to build for them. This patch enables the RV32 to be built with no MMU support. Signed-off-by: Yimin Gu CC: Jesse Taube Tested-by: Waldemar Brodkorb Signed-off-by: Jesse Taube Reviewed-by: Damien Le Moal Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230301002657.352637-3-Mr.Bossman075@gmail.com Signed-off-by: Palmer Dabbelt commit 0d8c461adbc4a43736927f93db69ae376efbc2f1 Author: Thomas Weißschuh Date: Sat Mar 25 16:45:16 2023 +0100 tools/nolibc: x86_64: add stackprotector support Enable the new stackprotector support for x86_64. Signed-off-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit ff221a6d9ae8191c97d6578f2e1900db483a289d Author: Thomas Weißschuh Date: Sat Mar 25 16:45:15 2023 +0100 tools/nolibc: i386: add stackprotector support Enable the new stackprotector support for i386. Signed-off-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 9735716830f2d52fd402b853b56cd94c0cb433c0 Author: Thomas Weißschuh Date: Sat Mar 25 16:45:14 2023 +0100 tools/nolibc: tests: add test for -fstack-protector Test the previously introduce stack protector functionality in nolibc. Signed-off-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 255ffeee718d4ba9c4e9ae05df980bb32f509046 Author: Thomas Weißschuh Date: Sat Mar 25 16:45:13 2023 +0100 tools/nolibc: tests: fold in no-stack-protector cflags For the cflags to enable stack protectors to work properly they need to be specified after -fno-stack-protector. To do this fold all cflags into a single variable and move -fno-stack-protector before the arch-specific cflags and another one specific to stack protectors since we don't want to enable them on all archs. Signed-off-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 7188d4637e95b9becde246fa08bb419a3b080f9b Author: Thomas Weißschuh Date: Sat Mar 25 16:45:12 2023 +0100 tools/nolibc: add support for stack protector This is useful when using nolibc for security-critical tools. Using nolibc has the advantage that the code is easily auditable and sandboxable with seccomp as no unexpected syscalls are used. Using compiler-assistent stack protection provides another security mechanism. For this to work the compiler and libc have to collaborate. This patch adds the following parts to nolibc that are required by the compiler: * __stack_chk_guard: random sentinel value * __stack_chk_fail: handler for detected stack smashes In addition an initialization function is added that randomizes the sentinel value. Only support for global guards is implemented. Register guards are useful in multi-threaded context which nolibc does not provide support for. Link: https://lwn.net/Articles/584225/ Signed-off-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit c4560bd8066311c7cee5d7396e7fbd7cb3b7eabc Author: Thomas Weißschuh Date: Sat Mar 25 16:45:11 2023 +0100 tools/nolibc: tests: constify test_names Nothing ever modifies this structure. Signed-off-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 8c934d4822c77818d53f5f4c948c3ace6fda1505 Author: Thomas Weißschuh Date: Sat Mar 25 16:45:10 2023 +0100 tools/nolibc: add helpers for wait() signal exits These are useful for users and will also be used in an upcoming testcase. Signed-off-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 00b7262896af69233c9c4593e6a7251adcb1e5f4 Author: Thomas Weißschuh Date: Sat Mar 25 16:45:09 2023 +0100 tools/nolibc: add definitions for standard fds These are useful for users and will also be used in an upcoming testcase. Signed-off-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit cfcdb5bad34f600aed7613c3c1a5e618111f77b7 Author: Andreas Gruenbacher Date: Tue Mar 28 00:43:16 2023 +0200 gfs2: Fix inode height consistency check The maximum allowed height of an inode's metadata tree depends on the filesystem block size; it is lower for bigger-block filesystems. When reading in an inode, make sure that the height doesn't exceed the maximum allowed height. Arrays like sd_heightsize are sized to be big enough for any filesystem block size; they will often be slightly bigger than what's needed for a specific filesystem. Reported-by: syzbot+45d4691b1ed3c48eba05@syzkaller.appspotmail.com Signed-off-by: Andreas Gruenbacher commit 981f8866754dc5aec6864b877acb248dc33a7bc8 Author: Bjorn Andersson Date: Fri Mar 24 22:29:09 2023 +0530 drm/panel-edp: Add B133UAN01.0 edp panel entry This panel is found in Lenovo Flex 5G laptop, so add the entry for it Signed-off-by: Bjorn Andersson Signed-off-by: Vinod Koul Acked-by: Neil Armstrong Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20230324165909.131831-1-vkoul@kernel.org commit 0e909e4fa8895bcef1b1ef2e39b9f1a158933ffe Author: Christophe JAILLET Date: Tue Mar 21 18:58:50 2023 +0100 drm/amd/display: Slightly optimize dm_dmub_outbox1_low_irq() A kzalloc()+memcpy() can be optimized in a single kmemdup(). This saves a few cycles because some memory doesn't need to be zeroed. Signed-off-by: Christophe JAILLET Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit a76766664a9f91dfde906fecd1409ba596a30e33 Author: Jiapeng Chong Date: Wed Mar 22 09:59:17 2023 +0800 drm/amd/display: Remove the unused variable dppclk_delay_subtotal Variable dppclk_delay_subtotal is not effectively used, so delete it. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/display_rq_dlg_calc_314.c:1004:15: warning: variable 'dppclk_delay_subtotal' set but not used. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4584 Signed-off-by: Jiapeng Chong Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 4cf3ae9d8e9a5f77e8a1f69f17c92dc59ba15154 Author: Jiapeng Chong Date: Wed Mar 22 11:14:19 2023 +0800 drm/amd/display: Clean up some inconsistent indenting No functional modification involved. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4585 Signed-off-by: Jiapeng Chong Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit f5a5b08139e8fdab024c1e52854e24fe1e8b428b Author: Tong Liu01 Date: Tue Mar 21 17:10:04 2023 +0800 drm/amdgpu: skip unload tmr when tmr is not loaded [why] Skip TMR unload for Navi12 and CHIP_SIENNA_CICHLID SRIOV as TMR is not loaded at all Signed-off-by: Tong Liu01 Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 94df03a4527611bfa7b461f2ba45370341e763b8 Author: Heiner Kallweit Date: Sat Mar 25 12:54:40 2023 +0100 dt-bindings: pinctrl: Convert Amlogic Meson pinctrl binding Convert Amlogic Meson pin controller binding to yaml. Reviewed-by: Rob Herring Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/dd29c1b7-05db-dd98-df40-20a238d89a96@gmail.com Signed-off-by: Linus Walleij commit 966b0e64b6891aa785d9e44abad069d515f6cb8f Author: Chester Lin Date: Mon Mar 27 14:27:53 2023 +0800 pinctrl: s32cc: Use generic struct data to describe pin function Replace struct s32_pmx_func with generic struct pinfunction since they have the same data fields. Suggested-by: Andy Shevchenko Signed-off-by: Chester Lin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230327062754.3326-5-clin@suse.com Signed-off-by: Linus Walleij commit 8ff169e8448ccbc569f2cc8767a4f34f3dbbc160 Author: Chester Lin Date: Mon Mar 27 14:27:52 2023 +0800 pinctrl: s32cc: embed generic struct pingroup Use generic data structure to describe pin control groups in S32 SoC family and drop duplicated struct members. Suggested-by: Andy Shevchenko Signed-off-by: Chester Lin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230327062754.3326-4-clin@suse.com Signed-off-by: Linus Walleij commit 48b016cbb2f48ce4cbefd91f63a0d0dded975932 Author: Chester Lin Date: Mon Mar 27 14:27:51 2023 +0800 pinctrl: s32cc: refactor pin config parsing Move common codes into smaller inline functions and remove argument checks that are not actually used by pull up/down bits in the S32 MSCR register. Signed-off-by: Chester Lin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230327062754.3326-3-clin@suse.com Signed-off-by: Linus Walleij commit 08b71a71f315bbb25608abc924ac209d1e079683 Author: Chester Lin Date: Mon Mar 27 14:27:50 2023 +0800 pinctrl: s32: refine error/return/config checks and simplify driver codes Improve error/return code handlings and config checks in order to have better reliability and simplify driver codes such as removing/changing improper macros, blanks, print formats and helper calls. Signed-off-by: Chester Lin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230327062754.3326-2-clin@suse.com Signed-off-by: Linus Walleij commit 617385bb273e1b15958e8bb98df8c4c234ede5b8 Merge: e0e8fbf84628f 9d7558ed8372c Author: Linus Walleij Date: Mon Mar 27 23:29:11 2023 +0200 Merge tag 'renesas-pinctrl-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v6.4 - Add pin groups for audio on R-Car V4H, - Drop support for the obsolete R-Car H3 ES1.* (R8A77950) SoC, - Miscellaneous fixes and improvements. commit 14302ab0d6550ef0ea48f213b0ab13c9249de185 Author: Dan Carpenter Date: Wed Mar 22 12:07:10 2023 +0300 drm/panel: magnachip: Prevent error pointer dereference in probe Don't dereference "db->dsi_dev" when it is an error pointer. Fixes: 249a4f5e663c ("drm/panel: Add Magnachip D53E6EA8966 Panel Driver") Signed-off-by: Dan Carpenter Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/de0273a8-8910-4ac4-b4ed-f7691c4d2ca6@kili.mountain commit 20c5db6c3d79d357c9d787edad3bbf03d98a08bf Author: Andre Przywara Date: Mon Mar 20 00:52:49 2023 +0000 ARM: dts: sunxi: add MangoPi MQ-R-T113 board The MangoPi MQ-R-T113 is a small SBC with the Allwinner T113-s3 SoC. The SoC features two Arm Cortex-A7 cores and 128 MB of co-packaged DDR3 DRAM. The board adds mostly connectors and the required regulators, plus a Realtek RTL8189FTV WiFi chip. Power comes in via a USB-C connector wired as a peripheral, and there is a second USB-C connector usable as a host port. Add a .dtsi file describing most of the board's peripherals, and include that from the actual board .dts file. This allows to re-use the .dtsi for the MQ-R-F113 RISC-V variant of that board. Signed-off-by: Andre Przywara Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230320005249.13403-5-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit c908060de362b2977db1b0ddba925353bc50aa29 Author: Andre Przywara Date: Mon Mar 20 00:52:48 2023 +0000 dt-bindings: arm: sunxi: document MangoPi MQ-R board names The MangoPi MQ-R board is a small development board, using Allwinner SoCs with co-packaged DRAM. There are versions with a RISC-V core and ones with two Arm Cortex-A7 cores. Add the board/SoC compatible string pair to the list of known boards. Signed-off-by: Andre Przywara Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230320005249.13403-4-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit 927e310e8e9d891b7621f77c369d234624d3a4fe Author: Andre Przywara Date: Mon Mar 20 00:52:47 2023 +0000 ARM: dts: sunxi: add Allwinner T113-s SoC .dtsi The Allwinner T113-s SoC is apparently using the same (or at least a very similar) die as the D1/D1s, but replaces the single RISC-V core with two Arm Cortex-A7 cores. Since the D1 core .dtsi already describes all common peripherals, we just need a DT describing the ARM specific peripherals: the CPU cores, the Generic Timer, the GIC and the PMU. We include the core .dtsi directly from the riscv DT directory. Signed-off-by: Andre Przywara Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230320005249.13403-3-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit a3eebcb61ffb9a26ca77a00ce80050cff0f0ecf3 Author: Andre Przywara Date: Mon Mar 20 00:52:46 2023 +0000 dts: add riscv include prefix link The Allwinner D1/D1s SoCs (with a RISC-V core) use an (almost?) identical die as their R528/T113-s siblings with ARM Cortex-A7 cores. To allow sharing the basic SoC .dtsi files across those two architectures as well, introduce a symlink to the RISC-V DT directory. Signed-off-by: Andre Przywara Reviewed-by: Conor Dooley Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20230320005249.13403-2-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit ba7c8d2700adf594540046d63da9a84eb92272c6 Author: Álvaro Fernández Rojas Date: Wed Mar 22 18:15:15 2023 +0100 clk: bcm: Add BCM63268 timer clock and reset driver Add driver for BCM63268 timer clock and reset controller. Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20230322171515.120353-5-noltari@gmail.com [sboyd@kernel.org: Mark reset ops const, fixup includes] Signed-off-by: Stephen Boyd commit 0514b376da09f9e4a6a4581112bcac063ee3ad9b Author: Krzysztof Kozlowski Date: Sun Mar 26 17:57:53 2023 +0200 arm64: dts: qcom: sdm845-xiaomi-beryllium: correct compatible Tianma FHD panel is supposed to be used with fallback compatible: sdm845-xiaomi-beryllium-tianma.dtb: panel@0: compatible: ['tianma,fhd-video'] is too short Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230326155753.92007-11-krzysztof.kozlowski@linaro.org commit e12482e688303d93507ae7c1346a27dbaa1811fb Author: Krzysztof Kozlowski Date: Sun Mar 26 17:57:52 2023 +0200 arm64: dts: qcom: sdm845-xiaomi-beryllium: drop invalid panel properties Panel does not have children with unit-addresses thus address/size-cells are not valid: sdm845-xiaomi-beryllium-tianma.dtb: panel@0: Unevaluated properties are not allowed ('#address-cells', '#size-cells' were unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230326155753.92007-10-krzysztof.kozlowski@linaro.org commit 9f3c858ecde007b147491d5f9d19484090fbe3b7 Author: Krzysztof Kozlowski Date: Sun Mar 26 17:57:51 2023 +0200 arm64: dts: qcom: sdm845-oneplus: drop invalid panel properties Panel does not have children with unit-addresses thus address/size-cells are not valid: panel@0: '#address-cells', '#size-cells' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230326155753.92007-9-krzysztof.kozlowski@linaro.org commit 9ec6040a48300a7527e46505e121f71a3e0f924f Author: Krzysztof Kozlowski Date: Sun Mar 26 17:57:50 2023 +0200 arm64: dts: qcom: sc7180-trogdor-lazor: correct panel compatible innolux,n116bca-ea1 is not exactly compatible witg innolux,n116bge, as they have their own driver data. Bindings do not allow fallback: sc7180-trogdor-lazor-limozeen-nots-r4.dtb: panel: compatible: ['innolux,n116bca-ea1', 'innolux,n116bge'] is too long Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230326155753.92007-8-krzysztof.kozlowski@linaro.org commit ff5508b93b9c5dd723ac68c315be1cf727845063 Author: Krzysztof Kozlowski Date: Sun Mar 26 17:57:49 2023 +0200 arm64: dts: qcom: sc7180-qcard: use just "port" in panel The panel bindings expect to have only one port, thus they do not allow to use "ports" node: sc7280-herobrine-zombie-nvme-lte.dtb: panel: 'ports' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230326155753.92007-7-krzysztof.kozlowski@linaro.org commit c28d9029f3b68a42794a0527696c91f7b31e81f3 Author: Krzysztof Kozlowski Date: Sun Mar 26 17:57:48 2023 +0200 arm64: dts: qcom: sc7180-trogdor-wormdingler: use just "port" in panel The panel bindings expect to have only one port, thus they do not allow to use "ports" node: sc7180-trogdor-wormdingler-rev1-boe.dtb: panel@0: 'ports' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230326155753.92007-6-krzysztof.kozlowski@linaro.org commit 88904a12fbcbd97e56d341080845ce0807164fb5 Author: Krzysztof Kozlowski Date: Sun Mar 26 17:57:47 2023 +0200 arm64: dts: qcom: sc7180-trogdor-quackingstick: use just "port" in panel The panel bindings expect to have only one port, thus they do not allow to use "ports" node: sc7180-trogdor-quackingstick-r0.dtb: panel@0: 'ports' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230326155753.92007-5-krzysztof.kozlowski@linaro.org commit 746bda7d9dd9518793034d7008a19e4cf5c3004d Author: Krzysztof Kozlowski Date: Sun Mar 26 17:57:46 2023 +0200 arm64: dts: qcom: sc7180-idp: use just "port" in panel The panel bindings expect to have only one port, thus they do not allow to use "ports" node: sc7180-idp.dtb: panel@0: 'ports' does not match any of the regexes: 'pinctrl-[0-9]+' sc7180-idp.dtb: panel@0: 'port' is a required property Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230326155753.92007-4-krzysztof.kozlowski@linaro.org commit 78f7be3c4c2abcd5845f6acb30754173c4aed4b3 Author: Krzysztof Kozlowski Date: Sun Mar 26 17:57:45 2023 +0200 arm64: dts: qcom: sc8280xp-crd: use just "port" in panel The panel bindings expect to have only one port, thus they do not allow to use "ports" node: sc8280xp-crd.dtb: panel: 'ports' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230326155753.92007-3-krzysztof.kozlowski@linaro.org commit e3cc58599167db818fbcba3b0c3debb3d6776f4a Author: Krzysztof Kozlowski Date: Sun Mar 26 17:57:44 2023 +0200 arm64: dts: qcom: sc8280xp-lenovo-thinkpad-x13s: use just "port" in panel The panel bindings expect to have only one port, thus they do not allow to use "ports" node: sc8280xp-lenovo-thinkpad-x13s.dtb: panel: 'ports' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230326155753.92007-2-krzysztof.kozlowski@linaro.org commit c747968cf945d7d57d117e4414465fdacb26ab4b Author: Krzysztof Kozlowski Date: Sun Mar 26 17:57:43 2023 +0200 arm64: dts: qcom: sdm845-cheza: use just "port" in Innolux panel The panel bindings expect to have only one port, thus they do not allow to use "ports" node: sdm845-cheza-r2.dtb: panel: 'ports' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230326155753.92007-1-krzysztof.kozlowski@linaro.org commit 280e05a3942a010cdd3bfd8b32ae00efb6761dea Author: Johan Hovold Date: Mon Mar 27 14:29:48 2023 +0200 arm64: dts: qcom: sc8280xp-pmics: fix pon compatible and registers The pmk8280 PMIC PON peripheral is gen3 and uses two sets of registers; hlos and pbs. This specifically fixes the following error message during boot when the pbs registers are not defined: PON_PBS address missing, can't read HW debounce time Note that this also enables the spurious interrupt workaround introduced by commit 0b65118e6ba3 ("Input: pm8941-pwrkey - add software key press debouncing support") (which may or may not be needed). Fixes: ccd3517faf18 ("arm64: dts: qcom: sc8280xp: Add reference device") Signed-off-by: Johan Hovold Tested-by: Steev Klimaszewski #Thinkpad X13s Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327122948.4323-1-johan+linaro@kernel.org commit d97e712be401a67e0db8e79612b30d65e9619f41 Author: Johan Hovold Date: Mon Mar 27 14:32:43 2023 +0200 arm64: dts: qcom: sc8280xp-x13s: drop bogus 'input-enable' The sc8280xp pin controller does not have a way to enable or disable the input buffer so drop the unnecessary 'input-enable' property which is about to be deprecated. Link: https://lore.kernel.org/lkml/20230323102605.6.I291ce0ba2c6ea80b341659c4f75a567a76dd7ca6@changeid Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230327123243.4527-1-johan+linaro@kernel.org commit cd04bbb9247c5aec393b51ce1e2a6eb3cac2e27e Author: Álvaro Fernández Rojas Date: Wed Mar 22 18:15:14 2023 +0100 dt-bindings: clock: Add BCM63268 timer binding Document the Broadcom BCM63268 Clock and Reset controller. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230322171515.120353-4-noltari@gmail.com Signed-off-by: Stephen Boyd commit 2a67e196bb5197bdca89332d2a71e708ee4d897d Author: Álvaro Fernández Rojas Date: Wed Mar 22 18:15:13 2023 +0100 dt-bindings: reset: add BCM63268 timer reset definitions Add missing timer reset definitions for BCM63268. Signed-off-by: Álvaro Fernández Rojas Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230322171515.120353-3-noltari@gmail.com Signed-off-by: Stephen Boyd commit 0ca6a0970073a14f5608f0add0e431697316cbca Author: Álvaro Fernández Rojas Date: Wed Mar 22 18:15:12 2023 +0100 dt-bindings: clk: add BCM63268 timer clock definitions Add missing timer clock definitions for BCM63268. Signed-off-by: Álvaro Fernández Rojas Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230322171515.120353-2-noltari@gmail.com Signed-off-by: Stephen Boyd commit 06965037ce942500c1ce3aa29ca217093a9c5720 Author: Chaitanya Kulkarni Date: Mon Mar 27 00:34:27 2023 -0700 block: open code __blk_account_io_done() There is only one caller for __blk_account_io_done(), the function is small enough to fit in its caller blk_account_io_done(). Remove the function and opencode in the its caller blk_account_io_done(). Signed-off-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20230327073427.4403-2-kch@nvidia.com Signed-off-by: Jens Axboe commit e165fb4dd6985b37215178e514a2e09dab8fef14 Author: Chaitanya Kulkarni Date: Mon Mar 27 00:34:26 2023 -0700 block: open code __blk_account_io_start() There is only one caller for __blk_account_io_start(), the function is small enough to fit in its caller blk_account_io_start(). Remove the function and opencode in the its caller blk_account_io_start(). Signed-off-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20230327073427.4403-2-kch@nvidia.com Signed-off-by: Jens Axboe commit acc0ccffec502be0d64f477d4341957a897e4283 Author: Yinbo Zhu Date: Thu Mar 23 10:52:29 2023 +0800 clk: clk-loongson2: add clock controller driver support This driver provides support for clock controller on Loongson-2 SoC, the Loongson-2 SoC uses a 100MHz clock as the PLL reference clock, there are five independent PLLs inside, each of which PLL can provide up to three sets of frequency dependent clock outputs. Signed-off-by: Yinbo Zhu Link: https://lore.kernel.org/r/20230323025229.2971-2-zhuyinbo@loongson.cn Signed-off-by: Stephen Boyd commit d8c0ee307a6086299157ce8eddec9aef478ef475 Author: Yinbo Zhu Date: Thu Mar 23 10:52:28 2023 +0800 dt-bindings: clock: add loongson-2 boot clock index The Loongson-2 boot clock was used to spi and lio peripheral and this patch was to add boot clock index number. Signed-off-by: Yinbo Zhu Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230323025229.2971-1-zhuyinbo@loongson.cn Signed-off-by: Stephen Boyd commit 595c88cda65d30c6b36277c232193295a45406dc Author: Shubhrajyoti Datta Date: Mon Mar 27 11:56:37 2023 +0530 clocking-wizard: Support higher frequency accuracy Change the multipliers and divisors to support a higher frequency accuracy if there is only one output. Currently only O is changed now we are changing M, D and O. For multiple output case the earlier behavior is retained. Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/20230327062637.22237-1-shubhrajyoti.datta@amd.com Signed-off-by: Stephen Boyd commit 57e3bbd2cb8f98dfd78298998d42d6c4cd414083 Author: Shubhrajyoti Datta Date: Fri Mar 24 16:19:58 2023 +0530 clk: zynqmp: pll: Remove the limit The range is taken care in the zynqmp_pll_round_rate. Remove the rate range in the zynqmp_clk_register_pll() to prevent the early truncation of the frequencies and also allow multiple combinations of child and parent to get more accurate rates. Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/20230324104958.25099-1-shubhrajyoti.datta@amd.com Signed-off-by: Stephen Boyd commit dcf0c2e06ac2f698354febab0b34a7135282164b Author: Andy Shevchenko Date: Mon Mar 27 16:25:12 2023 +0300 ACPI: SPCR: Amend indentation 1) Remove unnecessary blank lines. 2) Reformat one comment for consistency. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 1fbd9029c8d5ccd3de49cb0f5382cffc7444a32b Author: Andy Shevchenko Date: Fri Mar 24 13:41:46 2023 +0200 ACPI: property: Refactor acpi_data_prop_read_single() Refactor acpi_data_prop_read_single() for decreased indentation and better structure. No functional changes intended. Signed-off-by: Andy Shevchenko Reviewed-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki commit f1e65718ec1855263c349997dc294e186e55d67a Author: Shuai Xue Date: Thu Mar 23 09:53:57 2023 +0800 ACPI: APEI: EINJ: warn on invalid argument when explicitly indicated by platform OSPM executes an EXECUTE_OPERATION action to instruct the platform to begin the injection operation, then executes a GET_COMMAND_STATUS action to determine the status of the completed operation. The ACPI Specification documented error codes[1] are: 0 = Success (Linux #define EINJ_STATUS_SUCCESS) 1 = Unknown failure (Linux #define EINJ_STATUS_FAIL) 2 = Invalid Access (Linux #define EINJ_STATUS_INVAL) The original code report -EBUSY for both "Unknown Failure" and "Invalid Access" cases. Actually, firmware could do some platform dependent sanity checks and returns different error codes, e.g. "Invalid Access" to indicate to the user that the parameters they supplied cannot be used for injection. To this end, fix to return -EINVAL in the __einj_error_inject() error handling case instead of always -EBUSY, when explicitly indicated by the platform in the status of the completed operation. [1] ACPI Specification 6.5 18.6.1. Error Injection Table Signed-off-by: Shuai Xue Reviewed-by: Tony Luck Signed-off-by: Rafael J. Wysocki commit 4f855dcead6c5be0a48a2779eeecb170ec144534 Author: Kuppuswamy Sathyanarayanan Date: Wed Mar 22 12:13:13 2023 -0700 ACPI: sysfs: Enable ACPI sysfs support for CCEL records The Confidential Computing Event Log (CCEL) table provides the address and length of the CCEL records area in UEFI reserved memory. To allow user space access to these records, expose a sysfs interface similar to the BERT table. More details about the CCEL table can be found in the ACPI specification r6.5 [1], sec 5.2.34. Link: https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#cc-event-log-acpi-table # [1] Co-developed-by: Haibo Xu Signed-off-by: Haibo Xu Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Rafael J. Wysocki commit 7283137a7622292076dd8b7f3b8b2bb203ce5a14 Author: Hengqi Chen Date: Sun Mar 26 09:53:41 2023 +0000 selftests/bpf: Don't assume page size is 4096 The verifier test creates BPF ringbuf maps using hard-coded 4096 as max_entries. Some tests will fail if the page size of the running kernel is not 4096. Use getpagesize() instead. Signed-off-by: Hengqi Chen Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230326095341.816023-1-hengqi.chen@gmail.com commit f1cb927cdb6280e0ce283174cc1bf395dffc43d4 Author: JP Kobryn Date: Fri Mar 24 18:08:45 2023 -0700 libbpf: Ensure print callback usage is thread-safe This patch prevents races on the print function pointer, allowing the libbpf_set_print() function to become thread-safe. Signed-off-by: JP Kobryn Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230325010845.46000-1-inwardvessel@gmail.com commit 5c5552d6297a2a91464180d2790dffdca9ffc7de Author: Paul E. McKenney Date: Tue Jan 17 20:09:56 2023 -0800 rcutorture: Add srcu_lockdep.sh This commit adds an srcu_lockdep.sh script that checks whether lockdep correctly classifies SRCU-based, SRCU/mutex-based, and SRCU/rwsem-based deadlocks. Signed-off-by: Paul E. McKenney [ boqun: Fix "RCUTORTURE" with "$RCUTORTURE" ] Acked-by: Peter Zijlstra (Intel) Signed-off-by: Boqun Feng commit 6e2044887b1d8f26a8cf0042b9a340411b227e5e Author: Paul E. McKenney Date: Tue Jan 24 09:43:15 2023 -0800 rcutorture: Add RCU Tasks Trace and SRCU deadlock scenarios Add a test number 3 that creates deadlock cycles involving one RCU Tasks Trace step and L-1 SRCU steps. Please note that lockdep will not detect these deadlocks until synchronize_rcu_tasks_trace() is marked with lockdep's new "sync" annotation, which will probably not happen until some time after these markings prove their worth on SRCU. Please note that these tests are available only in kernels built with CONFIG_TASKS_TRACE_RCU=y. Signed-off-by: Paul E. McKenney Acked-by: Peter Zijlstra (Intel) Signed-off-by: Boqun Feng commit d94f12e8a46d3a8623fd77231e2dcab780368685 Author: Paul E. McKenney Date: Fri Jan 13 21:34:27 2023 -0800 rcutorture: Add SRCU deadlock scenarios In order to test the new SRCU-lockdep functionality, this commit adds an rcutorture.test_srcu_lockdep module parameter that, when non-zero, selects an SRCU deadlock scenario to execute. This parameter is a five-digit number formatted as DNNL, where "D" is 1 to force a deadlock and 0 to avoid doing so; "NN" is the test number, 0 for SRCU-based, 1 for SRCU/mutex-based, and 2 for SRCU/rwsem-based; and "L" is the number of steps in the deadlock cycle. Note that rcutorture.test_srcu_lockdep=1 will also force a hard hang. If a non-zero value of rcutorture.test_srcu_lockdep does not select a deadlock scenario, a console message is printed and testing continues. [ paulmck: Apply kernel test robot feedback, add rwsem support. ] [ paulmck: Apply Dan Carpenter feedback. ] Signed-off-by: Paul E. McKenney Acked-by: Peter Zijlstra (Intel) Signed-off-by: Boqun Feng commit 0471db447cb7de56bbe2fedd9256b4d2b8ef642a Author: Boqun Feng Date: Fri Jan 13 15:57:22 2023 -0800 locking/lockdep: Improve the deadlock scenario print for sync and read lock Lock scenario print is always a weak spot of lockdep splats. Improvement can be made if we rework the dependency search and the error printing. However without touching the graph search, we can improve a little for the circular deadlock case, since we have the to-be-added lock dependency, and know whether these two locks are read/write/sync. In order to know whether a held_lock is sync or not, a bit was "stolen" from ->references, which reduce our limit for the same lock class nesting from 2^12 to 2^11, and it should still be good enough. Besides, since we now have bit in held_lock for sync, we don't need the "hardirqoffs being 1" trick, and also we can avoid the __lock_release() if we jump out of __lock_acquire() before the held_lock stored. With these changes, a deadlock case evolved with read lock and sync gets a better print-out from: [...] Possible unsafe locking scenario: [...] [...] CPU0 CPU1 [...] ---- ---- [...] lock(srcuA); [...] lock(srcuB); [...] lock(srcuA); [...] lock(srcuB); to [...] Possible unsafe locking scenario: [...] [...] CPU0 CPU1 [...] ---- ---- [...] rlock(srcuA); [...] lock(srcuB); [...] lock(srcuA); [...] sync(srcuB); Signed-off-by: Boqun Feng Signed-off-by: Paul E. McKenney Acked-by: Peter Zijlstra (Intel) Signed-off-by: Boqun Feng commit 60a1a64ec0c08e02f2cd4372cd3971e9d5eb2b37 Author: Boqun Feng Date: Sun Mar 12 12:04:48 2023 -0700 locking: Reduce the number of locks in ww_mutex stress tests The stress test in test_ww_mutex_init() uses 4095 locks since lockdep::reference has 12 bits, and since we are going to reduce it to 11 bits to support lock_sync(), and 2047 is still a reasonable number of the max nesting level for locks, so adjust the test. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-lkp/202302011445.9d99dae2-oliver.sang@intel.com Tested-by: Paul E. McKenney Acked-by: Peter Zijlstra (Intel) Signed-off-by: Boqun Feng commit f0f44752f5f61ee4e3bd88ae033fdb888320aafe Author: Boqun Feng Date: Thu Jan 12 22:59:54 2023 -0800 rcu: Annotate SRCU's update-side lockdep dependencies Although all flavors of RCU readers are annotated correctly with lockdep as recursive read locks, they do not set the lock_acquire 'check' parameter. This means that RCU read locks are not added to the lockdep dependency graph, which in turn means that lockdep cannot detect RCU-based deadlocks. This is not a problem for RCU flavors having atomic read-side critical sections because context-based annotations can catch these deadlocks, see for example the RCU_LOCKDEP_WARN() statement in synchronize_rcu(). But context-based annotations are not helpful for sleepable RCU, especially given that it is perfectly legal to do synchronize_srcu(&srcu1) within an srcu_read_lock(&srcu2). However, we can detect SRCU-based by: (1) Making srcu_read_lock() a 'check'ed recursive read lock and (2) Making synchronize_srcu() a empty write lock critical section. Even better, with the newly introduced lock_sync(), we can avoid false positives about irq-unsafe/safe. This commit therefore makes it so. Note that NMI-safe SRCU read side critical sections are currently not annotated, but might be annotated in the future. Signed-off-by: Boqun Feng Signed-off-by: Paul E. McKenney [ boqun: Add comments for annotation per Waiman's suggestion ] [ boqun: Fix comment warning reported by Stephen Rothwell ] Acked-by: Peter Zijlstra (Intel) Signed-off-by: Boqun Feng commit 2f1f043e7bea3fbf4c1869df2f7a0312bc8ca2bf Author: Boqun Feng Date: Thu Jan 12 22:59:53 2023 -0800 locking/lockdep: Introduce lock_sync() Currently, functions like synchronize_srcu() do not have lockdep annotations resembling those of other write-side locking primitives. Such annotations might look as follows: lock_acquire(); lock_release(); Such annotations would tell lockdep that synchronize_srcu() acts like an empty critical section that waits for other (read-side) critical sections to finish. This would definitely catch some deadlock, but as pointed out by Paul Mckenney [1], this could also introduce false positives because of irq-safe/unsafe detection. Of course, there are tricks could help with this: might_sleep(); // Existing statement in __synchronize_srcu(). if (IS_ENABLED(CONFIG_PROVE_LOCKING)) { local_irq_disable(); lock_acquire(); lock_release(); local_irq_enable(); } But it would be better for lockdep to provide a separate annonation for functions like synchronize_srcu(), so that people won't need to repeat the ugly tricks above. Therefore introduce lock_sync(), which is simply an lock+unlock pair with no irq safe/unsafe deadlock check. This works because the to-be-annontated functions do not create real critical sections, and there is therefore no way that irq can create extra dependencies. [1]: https://lore.kernel.org/lkml/20180412021233.ewncg5jjuzjw3x62@tardis/ Signed-off-by: Boqun Feng Acked-by: Waiman Long Signed-off-by: Paul E. McKenney [ boqun: Fix typos reported by Davidlohr Bueso and Paul E. Mckenney ] Acked-by: Peter Zijlstra (Intel) Signed-off-by: Boqun Feng commit e44fdd114cc3c872aa5157c6b3a190bcf92a9ffb Author: Alexander Stein Date: Fri Mar 10 08:55:35 2023 +0100 clk: rs9: Add support for 9FGV0441 This model is similar to 9FGV0241, but the DIFx bits start at bit 0. Signed-off-by: Alexander Stein Reviewed-by: Marek Vasut Link: https://lore.kernel.org/r/20230310075535.3476580-4-alexander.stein@ew.tq-group.com Signed-off-by: Stephen Boyd commit 603df193ec5174ff81c32cf1a78b7819ce984b8c Author: Alexander Stein Date: Fri Mar 10 08:55:34 2023 +0100 clk: rs9: Support device specific dif bit calculation The calculation DIFx is BIT(n) +1 is only true for 9FGV0241. With additional devices this is getting more complicated. Support a base bit for the DIF calculation, currently only devices with consecutive bits are supported, e.g. the 6-channel device needs additional logic. Signed-off-by: Alexander Stein Reviewed-by: Marek Vasut Link: https://lore.kernel.org/r/20230310075535.3476580-3-alexander.stein@ew.tq-group.com Signed-off-by: Stephen Boyd commit 51f2be462f70d9c3ef06f6028c21ac8ca00fed1d Author: Alexander Stein Date: Fri Mar 10 08:55:33 2023 +0100 dt-bindings: clk: rs9: Add 9FGV0441 This is a 4-channel variant of 9FGV series. Signed-off-by: Alexander Stein Acked-by: Krzysztof Kozlowski Reviewed-by: Marek Vasut Link: https://lore.kernel.org/r/20230310075535.3476580-2-alexander.stein@ew.tq-group.com Signed-off-by: Stephen Boyd commit da751726ff2ad2322d81316ebf6aadb22dfad0d8 Author: Alexander Stein Date: Fri Mar 10 08:55:32 2023 +0100 clk: rs9: Check for vendor/device ID This is in preparation to support additional devices which have different IDs as well as a slightly different register layout. Signed-off-by: Alexander Stein Reviewed-by: Marek Vasut Link: https://lore.kernel.org/r/20230310075535.3476580-1-alexander.stein@ew.tq-group.com Signed-off-by: Stephen Boyd commit edc12763a3a29836b23c4fc97a1207baea1d11e8 Author: Marek Vasut Date: Wed Jan 18 20:15:21 2023 +0100 clk: si521xx: Clock driver for Skyworks Si521xx I2C PCIe clock generators Add driver for the Skyworks Si521xx PCIe clock generators. Supported models are Si52144/Si52146/Si52147, tested model is Si52144. It should be possible to add Si5213x series as well. Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20230118191521.15544-2-marex@denx.de [sboyd@kernel.org: Make clk_ops const] Signed-off-by: Stephen Boyd commit 66a20af59e83977c0faea08f7bebe9e812aab487 Author: Marek Vasut Date: Wed Jan 18 20:15:20 2023 +0100 dt-bindings: clk: si521xx: Add Skyworks Si521xx I2C PCIe clock generators Add binding for Skyworks Si521xx PCIe clock generators. This binding is designed to support Si52144/Si52146/Si52147 series I2C PCIe clock generators, tested model is Si52144. It should be possible to add Si5213x series as well. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20230118191521.15544-1-marex@denx.de Signed-off-by: Stephen Boyd commit 34ea427e01ea60d9a9328d2d5a72d43740be25bc Author: Xueqin Luo Date: Thu Mar 16 09:33:07 2023 +0800 PM: tools: sleepgraph: Recognize "CPU killed" messages On the arm64 platform with PSCI, the core log of CPU offline is as follows: [ 100.431501] CPU1: shutdown [ 100.454820] psci: CPU1 killed (polled 20 ms) [ 100.459266] CPU2: shutdown [ 100.482575] psci: CPU2 killed (polled 20 ms) [ 100.486057] CPU3: shutdown [ 100.513974] psci: CPU3 killed (polled 28 ms) [ 100.518068] CPU4: shutdown [ 100.541481] psci: CPU4 killed (polled 24 ms) Prevent sleepgraph from mistakenly treating the "CPU up" message as part of the suspend flow (because it should be regarded as part of the resume flow) by making it recognize the "CPU* killed" messages above. Signed-off-by: Xueqin Luo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 0417552730d0b1c30268fd32546914290b7c7ca0 Author: Todd Brandt Date: Tue Mar 14 10:39:36 2023 -0700 pm-graph: Update to v5.11 install_latest_from_github.sh: - Added a new script which allows users to install the latest pm-graph from the upstream github repo. This is useful if the kernel source version has issues that have already been fixed in github. sleepgraph.py: - Updated all the dmesg suspend/resume PM print formats to be able to process recent timelines using dmesg only. - Added ethtool output to the log for the system's ethernet device id the ethtool exists. This helps in debugging network issues. - Made the tool more robustly handle events where mangled dmesg or ftrace outputs do not include all the requisite data. The tool fails gracefully instead of creating a garbled timeline. Signed-off-by: Todd Brandt [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 175c9df15aef7a1446fb67154a186b73dd892b50 Author: Rob Herring Date: Fri Mar 10 08:47:03 2023 -0600 cpufreq: pmac32: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Acked-by: Viresh Kumar Reviewed-by: Michael Ellerman Signed-off-by: Rafael J. Wysocki commit f914bfdd7f8468e1c3e6778658550b67a677e935 Author: Rob Herring Date: Fri Mar 10 08:47:03 2023 -0600 cpuidle: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Acked-by: Ulf Hansson Acked-by: Anup Patel Signed-off-by: Rafael J. Wysocki commit 8048bb4579cfd17deb73aa0d8a02124f42ad5ff6 Author: Lukas Bulwahn Date: Thu Mar 23 13:14:37 2023 +0100 MAINTAINERS: remove obsolete file entry in MIPS/LOONGSON1 ARCHITECTURE Commit c46496119ed0 ("clk: loongson1: Remove the outdated driver") removes all files matching the pattern drivers/*/*/*loongson1*, but misses to adjust the file entry for MIPS/LOONGSON1 ARCHITECTURE in MAINTAINERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Remove this file entry in MIPS/LOONGSON1 ARCHITECTURE. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20230323121437.28239-1-lukas.bulwahn@gmail.com Acked-by: Keguang Zhang Signed-off-by: Stephen Boyd commit e724167028c310aaa3fa564a27742df337121c41 Merge: fe15c26ee26ef 72cd8436ece03 Author: Stephen Boyd Date: Mon Mar 27 09:39:40 2023 -0700 Merge tag 'renesas-clk-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull Renesas clk driver updates from Geert Uytterhoeven: - Add Audio, thermal, camera (CSI-2), Image Signal Processor/Channel Selector (ISPCS), and video capture (VIN) clocks on R-Car V4H - Add video capture (VIN) clocks on R-Car V3H - Add Cortex-A53 System CPU (Z2) clocks on R-Car V3M and V3H - Miscellaneous fixes and improvements * tag 'renesas-clk-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: Convert to platform remove callback returning void clk: renesas: r9a06g032: Improve clock tables clk: renesas: r9a06g032: Document structs clk: renesas: r9a06g032: Drop unused fields clk: renesas: r9a06g032: Improve readability clk: renesas: r8a77980: Add Z2 clock clk: renesas: r8a77970: Add Z2 clock clk: renesas: r8a77995: Fix VIN parent clock clk: renesas: r8a77980: Add VIN clocks clk: renesas: r8a779g0: Add VIN clocks clk: renesas: r8a779g0: Add ISPCS clocks clk: renesas: r8a779g0: Add CSI-2 clocks clk: renesas: r8a779g0: Add thermal clock clk: renesas: r8a779g0: Add Audio clocks clk: renesas: cpg-mssr: Update MSSR register range for R-Car V4H commit 81fe523af79f50e27647f6f18ed683e379a40d29 Author: Rob Herring Date: Sun Mar 19 11:32:17 2023 -0500 clk: ti: Use of_address_to_resource() Replace of_get_address() and of_translate_address() calls with single call to of_address_to_resource(). Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230319163217.226144-1-robh@kernel.org Reviewed-by: Tony Lindgren Signed-off-by: Stephen Boyd commit 5c9a27df4eb9a402770d5547af255a765e1c10ac Author: Greg Kroah-Hartman Date: Mon Mar 27 18:03:19 2023 +0200 driver core: move sysfs_dev_char_kobj out of class.h The structure sysfs_dev_char_kobj is local only to the driver core code, so move it out of the global class.h file and into the internal base.h file as no one else should be touching this symbol. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230327160319.513974-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 46f28427f6f824b6cff06fa025a55350b7de454a Merge: 7ed34927254ae 40f43730f4369 Author: Daniel Vetter Date: Mon Mar 27 09:31:20 2023 +0200 Merge tag 'drm-rcar-next-20230325' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux into drm-next Miscellaneous fixes and improvements for rcar-du Signed-off-by: Daniel Vetter From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20230325204922.GD19335@pendragon.ideasonboard.com commit 579d472b379983498a6a7d9f7b1dd74c20afdc50 Author: Andy Shevchenko Date: Mon Mar 27 16:01:50 2023 +0300 device property: Remove unused struct net_device forward declaration There is no users in the property.h for the struct net_device. Remove the latter for good. Signed-off-by: Andy Shevchenko Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230327130150.84114-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 386af3bdb53585405c22dae58ad99b72ed5895f5 Author: Andy Shevchenko Date: Mon Mar 27 16:01:49 2023 +0300 device property: Add headers to the Driver Core entry in MAINTAINERS The header files (fwnode.h and property.h) are part of the device property API, which in its turn is part of driver core. Add the missed headers to the corresponding record in the MAINTAINERS database. Signed-off-by: Andy Shevchenko Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230327130150.84114-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 20c082a2ba25374a13505b78cdad7f6a2cf8d763 Author: Christophe Kerello Date: Fri Mar 24 16:51:04 2023 +0100 memory: stm32-fmc2-ebi: depends on ARCH_STM32 instead of MACH_STM32MP157 To be able to compile the driver on all STM32MP SOCs, we move the "depends on" on ARCH_STM32. Signed-off-by: Christophe Kerello Link: https://lore.kernel.org/r/20230324155105.826063-2-christophe.kerello@foss.st.com Signed-off-by: Krzysztof Kozlowski commit 7cae569e6209af7082171477de06ee0eeeaab11f Author: Ira Weiny Date: Wed Mar 15 16:20:56 2023 -0700 arm: uaccess: Remove memcpy_page_flushcache() Commit 21b56c847753 ("iov_iter: get rid of separate bvec and xarray callbacks") removed the calls to memcpy_page_flushcache(). Remove the unnecessary memcpy_page_flushcache() call. Cc: Al Viro Cc: "Dan Williams" Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20221230-kmap-x86-v1-3-15f1ecccab50@intel.com Signed-off-by: Will Deacon commit bd2eefd018e5a8066b7bc66d8e200fbe3095ea5e Author: Caio Novais Date: Sat Mar 25 10:15:32 2023 -0300 drm/scheduler: Fix variable name in function description Compiling AMD GPU drivers displays two warnings: drivers/gpu/drm/scheduler/sched_main.c:738: warning: Function parameter or member 'file' not described in 'drm_sched_job_add_syncobj_dependency' drivers/gpu/drm/scheduler/sched_main.c:738: warning: Excess function parameter 'file_private' description in 'drm_sched_job_add_syncobj_dependency' Get rid of them by renaming the variable name on the function description Signed-off-by: Caio Novais Link: https://lore.kernel.org/r/20230325131532.6356-1-caionovais@usp.br Reviewed-by: Luben Tuikov Signed-off-by: Luben Tuikov commit 85206bf95313c33a244d6ea4304b01ade95b8b05 Author: Lizhe Date: Sun Mar 19 12:19:41 2023 +0800 s390/vfio-ap: remove redundant driver match function If there is no driver match function, the driver core assumes that each candidate pair (driver, device) matches, see driver_match_device(). Drop the matrix bus's match function that always returned 1 and so implements the same behaviour as when there is no match function Signed-off-by: Lizhe Reviewed-by: Tony Krowiak Link: https://lore.kernel.org/r/20230319041941.259830-1-sensor1010@163.com Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit e7615c9225d7c7562d1cd95ba8cc2cbf38c3d29e Author: Heiko Carstens Date: Fri Mar 17 10:31:40 2023 +0100 s390: enable ARCH_HAS_MEMBARRIER_SYNC_CORE s390 trivially supports the ARCH_HAS_MEMBARRIER_SYNC_CORE requirements since the used lpswe(y) instruction to return from any kernel context to user space performs CPU serialization. This is very similar to arm, arm64 and powerpc. See commit 70216e18e519 ("membarrier: Provide core serializing command, *_SYNC_CORE") for further details. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit af90d7b69c69b9b8ab91acc2ceab3706a2798373 Author: Thomas Richter Date: Thu Mar 16 16:34:46 2023 +0100 s390/cpum_sf: remove flag PERF_CPUM_SF_FULL_BLOCKS This flag is used to process only fully populated sampling buffers when an sampling event is stopped on a CPU. By default the last sampling buffer is also scanned for samples even if the sampling block full indicator is not set in the trailer entry of a sampling buffer page. This flag can be set via perf_event_attr::config1 field. It was never used and never documented. It is useless now. With PERF_CPUM_SF_FULL_BLOCKS: When a process is scheduled off the CPU, the sampling is stopped and the samples are copied to the perf ring buffer and marked invalid. When stopped at the last full sample buffer page (which is achieved with the PERF_CPUM_SF_FULL_BLOCKS options), the hardware sampling will resume at the first free sample entry in the current, partially filled sample buffer. Without PERF_CPUM_SF_FULL_BLOCKS (default behavior): The partially filled last sample buffer is scanned and valid samples are saved to the perf ring buffer. The valid samples are marked invalid. The sampling is resumed when the process is scheduled on this CPU. Again the hardware sampling will resume at the first free sample entry in the current, partially filled sample buffer. Now the next interrupt handler invocation scans the full sample block and saves the valid samples to the ring buffer. It omits the invalid samples at the top of the buffer. The default behavior is fully sufficient, therefore remove this feature. Signed-off-by: Thomas Richter Acked-by: Hendrik Brueckner Acked-by: Sumanth Korikkar Signed-off-by: Vasily Gorbik commit bfa7965b33ab79fc3b2f8adc14704075fe2416cd Author: Zhenhua Huang Date: Fri Mar 17 23:29:34 2023 +0800 mm,kfence: decouple kfence from page granularity mapping judgement Kfence only needs its pool to be mapped as page granularity, if it is inited early. Previous judgement was a bit over protected. From [1], Mark suggested to "just map the KFENCE region a page granularity". So I decouple it from judgement and do page granularity mapping for kfence pool only. Need to be noticed that late init of kfence pool still requires page granularity mapping. Page granularity mapping in theory cost more(2M per 1GB) memory on arm64 platform. Like what I've tested on QEMU(emulated 1GB RAM) with gki_defconfig, also turning off rodata protection: Before: [root@liebao ]# cat /proc/meminfo MemTotal: 999484 kB After: [root@liebao ]# cat /proc/meminfo MemTotal: 1001480 kB To implement this, also relocate the kfence pool allocation before the linear mapping setting up, arm64_kfence_alloc_pool is to allocate phys addr, __kfence_pool is to be set after linear mapping set up. LINK: [1] https://lore.kernel.org/linux-arm-kernel/Y+IsdrvDNILA59UN@FVFF77S0Q05N/ Suggested-by: Mark Rutland Signed-off-by: Zhenhua Huang Reviewed-by: Kefeng Wang Reviewed-by: Marco Elver Link: https://lore.kernel.org/r/1679066974-690-1-git-send-email-quic_zhenhuah@quicinc.com Signed-off-by: Will Deacon commit 7d0bfb7c997753ef88f4c3a29f3409c8cb052ab1 Author: Janne Grunau Date: Tue Feb 14 11:38:02 2023 +0100 drivers/perf: apple_m1: Add Apple M2 support The PMU itself is compatible with the one found on M1. We still know next to nothing about the counters so keep using CPU uarch specific compatibles/PMU names. Signed-off-by: Janne Grunau Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20230214-apple_m2_pmu-v1-2-9c9213ab9b63@jannau.net Signed-off-by: Will Deacon commit 640a3b7a3d138cb2467b75a6830144fac1c26a81 Author: Janne Grunau Date: Tue Feb 14 11:38:01 2023 +0100 dt-bindings: arm-pmu: Add PMU compatible strings for Apple M2 cores The PMUs on the Apple M2 cores avalanche and blizzard CPU are compatible with M1 ones. As on M1 we don't know exactly what the counters count so use a distinct compatible for each micro-architecture. Apple's PMU counter description omits a counter for M2 so there is some variation on the interpretation of the counters. Signed-off-by: Janne Grunau Acked-by: Rob Herring Reviewed-by: Hector Martin Link: https://lore.kernel.org/r/20230214-apple_m2_pmu-v1-1-9c9213ab9b63@jannau.net Signed-off-by: Will Deacon commit 16e15834659e9f5c05b9f12da6e86d76165c60a3 Author: Besar Wicaksono Date: Thu Mar 2 14:57:01 2023 -0600 perf: arm_cspmu: Fix variable dereference warning Fix warning message from smatch tool: | smatch warnings: | drivers/perf/arm_cspmu/arm_cspmu.c:1075 arm_cspmu_find_cpu_container() | warn: variable dereferenced before check 'cpu_dev' (see line 1073) Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202302191227.kc0V8fM7-lkp@intel.com/ Reviewed-by: Suzuki K Poulose Signed-off-by: Besar Wicaksono Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20230302205701.35323-1-bwicaksono@nvidia.com Signed-off-by: Will Deacon commit c61e5720f23273269cc67ffb2908cf9831c8ca9d Author: Jiucheng Xu Date: Thu Feb 9 19:54:01 2023 +0800 perf/amlogic: Fix config1/config2 parsing issue The 3th argument of for_each_set_bit is incorrect, fix them. Fixes: 2016e2113d35 ("perf/amlogic: Add support for Amlogic meson G12 SoC DDR PMU driver") Signed-off-by: Jiucheng Xu Link: https://lore.kernel.org/r/20230209115403.521868-1-jiucheng.xu@amlogic.com Signed-off-by: Will Deacon commit 710ddfbfda939b84794fa3912047bbc6754cbddc Author: Dan Carpenter Date: Sat Mar 25 14:08:02 2023 +0300 platform/x86: ISST: unlock on error path in tpmi_sst_init() Call mutex_unlock(&isst_tpmi_dev_lock) before returning on this error path. Fixes: d805456c712f ("platform/x86: ISST: Enumerate TPMI SST and create framework") Signed-off-by: Dan Carpenter Acked-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/dcdebbb7-7de6-4d04-8e7a-43d5ca043484@kili.mountain Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 3a2f2756c5189e03eeb3bedd04e07e8288f207e2 Author: Jithu Joseph Date: Tue Mar 21 17:33:59 2023 -0700 Documentation/ABI: Update IFS ABI doc Array BIST test doesn't need an IFS test image to operate unlike the SCAN test. Consequently current_batch and image_version files are not applicable for Array BIST IFS device instance, clarify this in the ABI doc. Also given that multiple tests are supported, take the opportunity to generalize descriptions wherever applicable. Signed-off-by: Jithu Joseph Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20230322003359.213046-10-jithu.joseph@intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 2b965dc05dc14bbe00efa3038aa1a3932ca30880 Author: Jithu Joseph Date: Tue Mar 21 17:33:58 2023 -0700 platform/x86/intel/ifs: Update IFS doc Array BIST is the second test supported by IFS. Modify IFS doc entry to be more general. Signed-off-by: Jithu Joseph Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20230322003359.213046-9-jithu.joseph@intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit fed696ce13662de882c8708ea7d0664d8e9e178b Author: Jithu Joseph Date: Tue Mar 21 17:33:57 2023 -0700 platform/x86/intel/ifs: Implement Array BIST test Array BIST test (for a particular core) is triggered by writing to MSR_ARRAY_BIST from one sibling of the core. This will initiate a test for all supported arrays on that CPU. Array BIST test may be aborted before completing all the arrays in the event of an interrupt or other reasons. In this case, kernel will restart the test from that point onwards. Array test will also be aborted when the test fails, in which case the test is stopped immediately without further retry. Signed-off-by: Jithu Joseph Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20230322003359.213046-8-jithu.joseph@intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 5210fb4e18806648b5e87ecc206f1b35e1253401 Author: Jithu Joseph Date: Tue Mar 21 17:33:56 2023 -0700 platform/x86/intel/ifs: Sysfs interface for Array BIST The interface to trigger Array BIST test and obtain its result is similar to the existing scan test. The only notable difference is that, Array BIST doesn't require any test content to be loaded. So binary load related options are not needed for this test. Add sysfs interface for array BIST test, the testing support will be added by subsequent patch. Signed-off-by: Jithu Joseph Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20230322003359.213046-7-jithu.joseph@intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit d31bbdf42b46cb8dc81deb48c4bf5234dd63d939 Author: Jithu Joseph Date: Tue Mar 21 17:33:55 2023 -0700 platform/x86/intel/ifs: Introduce Array Scan test to IFS Array BIST is a new type of core test introduced under the Intel Infield Scan (IFS) suite of tests. Emerald Rapids (EMR) is the first CPU to support Array BIST. Array BIST performs tests on some portions of the core logic such as caches and register files. These are different portions of the silicon compared to the parts tested by the first test type i.e Scan at Field (SAF). Make changes in the device driver init flow to register this new test type with the device driver framework. Each test will have its own sysfs directory (intel_ifs_0 , intel_ifs_1) under misc hierarchy to accommodate for the differences in test type and how they are initiated. Upcoming patches will add actual support. Signed-off-by: Jithu Joseph Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20230322003359.213046-6-jithu.joseph@intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit c68e3d473988b9af1f39355be57befb83607d845 Author: Jithu Joseph Date: Tue Mar 21 17:33:54 2023 -0700 x86/include/asm/msr-index.h: Add IFS Array test bits Define MSR bitfields for enumerating support for Array BIST test. Signed-off-by: Jithu Joseph Reviewed-by: Tony Luck Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230322003359.213046-5-jithu.joseph@intel.com Signed-off-by: Hans de Goede commit d847eddf0ee9c7112003becebe53fd8bf10d8671 Author: Jithu Joseph Date: Tue Mar 21 17:33:53 2023 -0700 platform/x86/intel/ifs: IFS cleanup Cleanup incorporating misc review comments - Remove the subdirectory intel_ifs/0 for devicenode [1] - Make plat_ifs_groups non static and use it directly without using a function [2] Link: https://lore.kernel.org/lkml/Y+4kQOtrHt5pdsSO@kroah.com/ [1] Link: https://lore.kernel.org/lkml/Y9nyxNesVHCUXAcH@kroah.com/ [2] Signed-off-by: Jithu Joseph Reviewed-by: Tony Luck Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230322003359.213046-4-jithu.joseph@intel.com Signed-off-by: Hans de Goede commit 54c9fcd187dd3bbc151cff9e5be01dda4f23dd0d Author: Jithu Joseph Date: Tue Mar 21 17:33:52 2023 -0700 platform/x86/intel/ifs: Reorganize driver data The struct holding device driver data contained both read only(ro) and read write(rw) fields. Separating ro fields from rw fields was recommended as a preferable design pattern during review[1]. Group ro fields into a separate const struct. Associate it to the miscdevice being registered by keeping its pointer in the same container struct as the miscdevice. Link: https://lore.kernel.org/lkml/Y+9H9otxLYPqMkUh@kroah.com/ [1] Signed-off-by: Jithu Joseph Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20230322003359.213046-3-jithu.joseph@intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 67f88ffa6d35d6b4e776f98ea64aab0bc026e2a2 Author: Jithu Joseph Date: Tue Mar 21 17:33:51 2023 -0700 platform/x86/intel/ifs: Separate ifs_pkg_auth from ifs_data In preparation to supporting additional tests, remove ifs_pkg_auth from per-test scope, as it is only applicable for one test type. This will simplify ifs_init() flow when multiple tests are added. Signed-off-by: Jithu Joseph Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20230322003359.213046-2-jithu.joseph@intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 392cacf2aa10de005e58b68a58012c0c81a100c0 Author: Nikita Kravets Date: Tue Mar 21 01:55:09 2023 +0300 platform/x86: Add new msi-ec driver Add a new driver to allow various MSI laptops' functionalities to be controlled from userspace. This includes such features as power profiles (aka shift modes), fan speed, charge thresholds, LEDs, etc. This driver contains EC memory configurations for different firmware versions and exports battery charge thresholds to userspace (note, that start and end thresholds control the same EC parameter and are always 10% apart). Link: https://github.com/BeardOverflow/msi-ec/ Link: https://github.com/BeardOverflow/msi-ec/pull/13 Cc: Aakash Singh Cc: Jose Angel Pastrana Signed-off-by: Nikita Kravets Link: https://lore.kernel.org/r/20230320225509.3559-1-teackot@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit bc12f344d5de246d0e2bd1ffcd5f950314e460d9 Author: Yang Li Date: Thu Feb 16 14:34:03 2023 +0800 drivers/perf: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Reviewed-by: Shuai Xue Link: https://lore.kernel.org/r/20230216063403.9753-1-yang.lee@linux.alibaba.com Signed-off-by: Will Deacon commit a64021d3726a096442d63a958ff0c49c12c3a1f4 Author: Nick Alcock Date: Fri Feb 17 14:10:43 2023 +0000 kbuild, drivers/perf: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230217141059.392471-9-nick.alcock@oracle.com Signed-off-by: Will Deacon commit 8540504c5136146fd5c867afd86bb4618c1ee61a Author: Yang Li Date: Wed Mar 15 10:31:08 2023 +0800 perf: qcom: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230315023108.36953-1-yang.lee@linux.alibaba.com Signed-off-by: Will Deacon commit d7f4679dc8d1a5cec497dd9f1b315ce77ab8db28 Author: Yang Li Date: Wed Mar 15 10:30:17 2023 +0800 perf: arm: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230315023017.35789-1-yang.lee@linux.alibaba.com Signed-off-by: Will Deacon commit f87e9114b5e590c2c6658ca21d7b714ca240bdd0 Author: Ilkka Koskinen Date: Wed Mar 1 09:55:40 2023 -0800 perf/arm-cmn: Move overlapping wp_combine field As eventid field was expanded to support new mesh versions, it started to overlap with wp_combine field. Move wp_combine to fix the issue. Fixes: 23760a014417 ("perf/arm-cmn: Add CMN-700 support") Signed-off-by: Ilkka Koskinen Link: https://lore.kernel.org/r/20230301175540.19891-1-ilkka@os.amperecomputing.com Signed-off-by: Will Deacon commit 788ee1605c2e9feed39c3a749fb3e47c6e15c1b9 Author: Konstantin Komarov Date: Mon Feb 20 09:39:35 2023 +0400 fs/ntfs3: Fix root inode checking Separate checking inode->i_op and inode itself. Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202302162319.bDJOuyfy-lkp@intel.com/ Signed-off-by: Konstantin Komarov commit e43f6ec224c1b428260e161f0300afbe2e1194fe Author: Konstantin Komarov Date: Wed Feb 15 16:06:56 2023 +0400 fs/ntfs3: Print details about mount fails Added error mesages with error codes. Minor refactoring and code formatting. Signed-off-by: Konstantin Komarov commit 16b3dbfb5d5cdfb0fcb66a5065369c935500a437 Author: Konstantin Komarov Date: Wed Feb 15 13:24:23 2023 +0400 fs/ntfs3: Add missed "nocase" in ntfs_show_options Sort processing ntfs3's mount options in same order they declared. Signed-off-by: Konstantin Komarov commit 96de65a9413e0422233b285368e8a9a64e461187 Author: Konstantin Komarov Date: Tue Jan 17 15:01:00 2023 +0400 fs/ntfs3: Code formatting and refactoring Added minor refactoring. Added and fixed some comments. In some places, the code has been reformatted to fit into 80 columns. clang-format-12 was used to format code according kernel's .clang-format. Signed-off-by: Konstantin Komarov commit 75c5e0c9e5cad34deeec7c131c2b1368df5a8c75 Author: Konstantin Komarov Date: Tue Feb 14 15:06:27 2023 +0400 fs/ntfs3: Changed ntfs_get_acl() to use dentry ntfs_get_acl changed to match new interface in struct inode_operations. Signed-off-by: Konstantin Komarov commit fd5aadaa218c96794f2c90a8f6f32dd1b59cc7da Merge: 6f561677c2f23 19799d3ae2ede Author: Hans de Goede Date: Mon Mar 27 15:03:06 2023 +0200 Merge remote-tracking branch 'intel-speed-select/intel-sst' into review-hans Summary of changes: Till the commit: "tools/power/x86/intel-speed-select: Get punit core mapping information" All patches just lays foundation for adding new hardware interface in addition to existing MSR/MMIO interface. All patches prefixed with "Abstract" just adds individual hardware callback for functions called from the core processing. The mailbox processing is abstracted to a new file with callbacks. In addition some changes to reduce duplicated code for display of TRL level. Patch "Introduce Punit ID concept and add related API" add further abstraction in addition to existing package and die scope. ----------- tools/power/x86/intel-speed-select: Get punit core mapping information -Adds a new way to get package/die/punit information for each CPU. ----------- Introduce TPMI interface support - Implement all abstracted callbacks above to use TPMI IOCTL interface. ----------- tools/power/x86/intel-speed-select: Display punit info - With TPMI the granularity is per punit, which can be multiple in a package/die. ---------- tools/power/x86/intel-speed-select: Remove cpu mask display for non-cpu power domain tools/power/x86/intel-speed-select: Display fact info for non-cpu power domain -There are some power domains with no CPUs, the above patches adds CPU as invalid for these domains ---------- tools/power/x86/intel-speed-select: Use cgroup v2 isolation - Adds new option to use Cgroup CPU isolation instead of offline of CPUs ---------- tools/power/x86/intel-speed-select: Change TRL display for Emerald Rapids - Emerald Rapid has multiple TRL levels and moves away from TRL level based on instruction type commit 3b16f6268e660f15aed0bb97aefe87e893eb8882 Author: Marc Zyngier Date: Fri Mar 17 15:50:27 2023 -0400 ARM: mach-virt: Select PMUv3 driver by default Since 32bit guests are not unlikely to run on an ARMv8 host, let's select the PMUv3 driver, which allows the PMU to be used on such systems. Signed-off-by: Marc Zyngier Signed-off-by: Zaid Al-Bassam Tested-by: Florian Fainelli Link: https://lore.kernel.org/r/20230317195027.3746949-9-zalbassam@google.com Signed-off-by: Will Deacon commit 009d6dc87a568db62290b8dc0a517b612217b6da Author: Marc Zyngier Date: Fri Mar 17 15:50:26 2023 -0400 ARM: perf: Allow the use of the PMUv3 driver on 32bit ARM The only thing stopping the PMUv3 driver from compiling on 32bit is the lack of defined system registers names and the handful of required helpers. This is easily solved by providing the sysreg accessors and updating the Kconfig entry. Signed-off-by: Marc Zyngier Co-developed-by: Zaid Al-Bassam Signed-off-by: Zaid Al-Bassam Tested-by: Florian Fainelli Link: https://lore.kernel.org/r/20230317195027.3746949-8-zalbassam@google.com Signed-off-by: Will Deacon commit 252309adc81f529d42c8c90a4965866ec82cb6ad Author: Marc Zyngier Date: Fri Mar 17 15:50:25 2023 -0400 ARM: Make CONFIG_CPU_V7 valid for 32bit ARMv8 implementations ARMv8 is a superset of ARMv7, and all the ARMv8 features are discoverable with a set of ID registers. It means that we can use CPU_V7 to guard ARMv8 features at compile time. This commit simply amends the CPU_V7 configuration symbol comment to reflect that CPU_V7 also covers ARMv8. Signed-off-by: Marc Zyngier Signed-off-by: Zaid Al-Bassam Tested-by: Florian Fainelli Link: https://lore.kernel.org/r/20230317195027.3746949-7-zalbassam@google.com Signed-off-by: Will Deacon commit b3a070869f39be4fad9ea4d99f2c8fab1fb7eead Author: Zaid Al-Bassam Date: Fri Mar 17 15:50:24 2023 -0400 perf: pmuv3: Change GENMASK to GENMASK_ULL GENMASK macro uses "unsigned long" (32-bit wide on arm and 64-bit on arm64), This causes build issues when enabling PMUv3 on arm as it tries to access bits > 31. This patch switches the GENMASK to GENMASK_ULL, which uses "unsigned long long" (64-bit on both arm and arm64). Signed-off-by: Zaid Al-Bassam Acked-by: Marc Zyngier Tested-by: Florian Fainelli Link: https://lore.kernel.org/r/20230317195027.3746949-6-zalbassam@google.com Signed-off-by: Will Deacon commit 11fba29a8a1f2fca08f301426b15c62d8a0b8040 Author: Zaid Al-Bassam Date: Fri Mar 17 15:50:23 2023 -0400 perf: pmuv3: Move inclusion of kvm_host.h to the arch-specific helper KVM host support is available only on arm64. By moving the inclusion of kvm_host.h to an arm64-specific file, the 32bit architecture will be able to implement dummy helpers. Signed-off-by: Zaid Al-Bassam Tested-by: Florian Fainelli Link: https://lore.kernel.org/r/20230317195027.3746949-5-zalbassam@google.com Signed-off-by: Will Deacon commit 711432770f78e5a9ae235a1a55decfb71993c958 Author: Zaid Al-Bassam Date: Fri Mar 17 15:50:22 2023 -0400 perf: pmuv3: Abstract PMU version checks The current PMU version definitions are available for arm64 only, As we want to add PMUv3 support to arm (32-bit), abstracts these definitions by using arch-specific helpers. Signed-off-by: Zaid Al-Bassam Tested-by: Florian Fainelli Link: https://lore.kernel.org/r/20230317195027.3746949-4-zalbassam@google.com Signed-off-by: Will Deacon commit df29ddf4f04b00cf60669686dc7f534c3ed7c433 Author: Marc Zyngier Date: Fri Mar 17 15:50:21 2023 -0400 arm64: perf: Abstract system register accesses away As we want to enable 32bit support, we need to distanciate the PMUv3 driver from the AArch64 system register names. This patch moves all system register accesses to an architecture specific include file, allowing the 32bit counterpart to be slotted in at a later time. Signed-off-by: Marc Zyngier Co-developed-by: Zaid Al-Bassam Signed-off-by: Zaid Al-Bassam Tested-by: Florian Fainelli Link: https://lore.kernel.org/r/20230317195027.3746949-3-zalbassam@google.com Signed-off-by: Will Deacon commit 7755cec63adeecea3cbbf4032047812c37cf7cc3 Author: Marc Zyngier Date: Fri Mar 17 15:50:20 2023 -0400 arm64: perf: Move PMUv3 driver to drivers/perf Having the ARM PMUv3 driver sitting in arch/arm64/kernel is getting in the way of being able to use perf on ARMv8 cores running a 32bit kernel, such as 32bit KVM guests. This patch moves it into drivers/perf/arm_pmuv3.c, with an include file in include/linux/perf/arm_pmuv3.h. The only thing left in arch/arm64 is some mundane perf stuff. Signed-off-by: Marc Zyngier Signed-off-by: Zaid Al-Bassam Tested-by: Florian Fainelli Link: https://lore.kernel.org/r/20230317195027.3746949-2-zalbassam@google.com Signed-off-by: Will Deacon commit 1a6be5fb156a1a7e1c81d30ca4ca48bca99b7ca1 Author: Konstantin Komarov Date: Tue Feb 14 14:00:04 2023 +0400 fs/ntfs3: Remove field sbi->used.bitmap.set_tail This field is not used in driver. Signed-off-by: Konstantin Komarov commit 63e92a0c5a0d5816803907a3e30a91ef72c903a5 Author: Konstantin Komarov Date: Tue Feb 14 13:57:09 2023 +0400 fs/ntfs3: Undo critial modificatins to keep directory consistency Affect xfstest 320. Signed-off-by: Konstantin Komarov commit e483783c7bca4169a5ed284acc01a9577c875407 Author: Konstantin Komarov Date: Tue Feb 14 13:44:22 2023 +0400 fs/ntfs3: Undo endian changes sbi->mft.reserved_bitmap is in-memory (not on-disk!) bitmap. Assumed cpu endian is faster than fixed endian. Signed-off-by: Konstantin Komarov commit 625602487a03203a732dc0d4b63da895f45def86 Author: Konstantin Komarov Date: Mon Jan 16 14:23:38 2023 +0400 fs/ntfs3: Optimization in ntfs_set_state() The current volume flags are updated only if VOLUME_FLAG_DIRTY has been changed. Signed-off-by: Konstantin Komarov commit 1842fbc8d25e629e54080fe3c5928d4ce8ccf55a Author: Konstantin Komarov Date: Mon Jan 16 13:03:24 2023 +0400 fs/ntfs3: Fix ntfs_create_inode() Previous variant creates an inode that requires update the parent directory (ea_packed_size). Operations in ntfs_create_inode have been rearranged so we insert new directory entry with correct ea_packed_size and new created inode does not require update it's parent directory. Signed-off-by: Konstantin Komarov commit 267a36ba30a7425ad59d20e7e7e33bbdcc9cfb0a Author: Konstantin Komarov Date: Mon Jan 16 12:52:10 2023 +0400 fs/ntfs3: Remove noacsrules Currently, this option does not work properly. Its use leads to unstable results. If we figure out how to implement it without errors, we will add it later. Signed-off-by: Konstantin Komarov commit c20bc9c6d8eb13ab1c3f8e5f8ad91466ae717d7f Author: Konstantin Komarov Date: Mon Jan 16 11:41:41 2023 +0400 fs/ntfs3: Use bh_read to simplify code The duplicating code is replaced by a generic function bh_read() Signed-off-by: Konstantin Komarov commit ec275bf9693d19cc0fdce8436f4c425ced86f6e7 Author: Jia-Ju Bai Date: Wed Jan 11 16:59:43 2023 +0800 fs/ntfs3: Fix a possible null-pointer dereference in ni_clear() In a previous commit c1006bd13146, ni->mi.mrec in ni_write_inode() could be NULL, and thus a NULL check is added for this variable. However, in the same call stack, ni->mi.mrec can be also dereferenced in ni_clear(): ntfs_evict_inode(inode) ni_write_inode(inode, ...) ni = ntfs_i(inode); is_rec_inuse(ni->mi.mrec) -> Add a NULL check by previous commit ni_clear(ntfs_i(inode)) is_rec_inuse(ni->mi.mrec) -> No check Thus, a possible null-pointer dereference may exist in ni_clear(). To fix it, a NULL check is added in this function. Signed-off-by: Jia-Ju Bai Reported-by: TOTE Robot Signed-off-by: Konstantin Komarov commit 6827d50b2c430c329af442b64c9176d174f56521 Author: Konstantin Komarov Date: Fri Dec 30 14:58:25 2022 +0400 fs/ntfs3: Refactoring of various minor issues Removed unused macro. Changed null pointer checking. Fixed inconsistent indenting. Signed-off-by: Konstantin Komarov commit 30200ef8d1368f0dee424d5926bd7af0cdc87b54 Author: Konstantin Komarov Date: Fri Dec 30 14:09:44 2022 +0400 fs/ntfs3: Restore overflow checking for attr size in mi_enum_attr Fixed comment. Removed explicit initialization for INDEX_ROOT. Signed-off-by: Konstantin Komarov commit 318d016e423054c143e5e58644ac93ef553013b9 Author: Konstantin Komarov Date: Thu Dec 29 15:58:56 2022 +0400 fs/ntfs3: Check for extremely large size of $AttrDef Added additional checking for size of $AttrDef. Added comment. Signed-off-by: Konstantin Komarov commit 0addfb1c2281b5ca2ac02e7dbf6f5a7dbfbc71b9 Author: Konstantin Komarov Date: Thu Dec 29 15:50:41 2022 +0400 fs/ntfs3: Improved checking of attribute's name length Added comment, added null pointer checking. Signed-off-by: Konstantin Komarov commit fc4992458e0aa2d2e82a25c922e6ac36c2d91083 Author: Konstantin Komarov Date: Thu Dec 29 15:44:43 2022 +0400 fs/ntfs3: Add null pointer checks Added null pointer checks in function ntfs_security_init. Also added le32_to_cpu in functions ntfs_security_init and indx_read. Signed-off-by: Konstantin Komarov commit e479f0a62a2a4358f25d0d0b60c333e6d881d7c6 Author: Yu Zhe Date: Thu Nov 10 15:46:40 2022 +0800 fs/ntfs3: fix spelling mistake "attibute" -> "attribute" There is a spelling mistake in comment. Fix it. Signed-off-by: Yu Zhe Signed-off-by: Konstantin Komarov commit 08e8cf5f2d9ec383a2e339a2711b62a54ff3fba0 Author: Edward Lo Date: Tue Oct 4 23:15:06 2022 +0800 fs/ntfs3: Add length check in indx_get_root This adds a length check to guarantee the retrieved index root is legit. [ 162.459513] BUG: KASAN: use-after-free in hdr_find_e.isra.0+0x10c/0x320 [ 162.460176] Read of size 2 at addr ffff8880037bca99 by task mount/243 [ 162.460851] [ 162.461252] CPU: 0 PID: 243 Comm: mount Not tainted 6.0.0-rc7 #42 [ 162.461744] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 162.462609] Call Trace: [ 162.462954] [ 162.463276] dump_stack_lvl+0x49/0x63 [ 162.463822] print_report.cold+0xf5/0x689 [ 162.464608] ? unwind_get_return_address+0x3a/0x60 [ 162.465766] ? hdr_find_e.isra.0+0x10c/0x320 [ 162.466975] kasan_report+0xa7/0x130 [ 162.467506] ? _raw_spin_lock_irq+0xc0/0xf0 [ 162.467998] ? hdr_find_e.isra.0+0x10c/0x320 [ 162.468536] __asan_load2+0x68/0x90 [ 162.468923] hdr_find_e.isra.0+0x10c/0x320 [ 162.469282] ? cmp_uints+0xe0/0xe0 [ 162.469557] ? cmp_sdh+0x90/0x90 [ 162.469864] ? ni_find_attr+0x214/0x300 [ 162.470217] ? ni_load_mi+0x80/0x80 [ 162.470479] ? entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 162.470931] ? ntfs_bread_run+0x190/0x190 [ 162.471307] ? indx_get_root+0xe4/0x190 [ 162.471556] ? indx_get_root+0x140/0x190 [ 162.471833] ? indx_init+0x1e0/0x1e0 [ 162.472069] ? fnd_clear+0x115/0x140 [ 162.472363] ? _raw_spin_lock_irqsave+0x100/0x100 [ 162.472731] indx_find+0x184/0x470 [ 162.473461] ? sysvec_apic_timer_interrupt+0x57/0xc0 [ 162.474429] ? indx_find_buffer+0x2d0/0x2d0 [ 162.474704] ? do_syscall_64+0x3b/0x90 [ 162.474962] dir_search_u+0x196/0x2f0 [ 162.475381] ? ntfs_nls_to_utf16+0x450/0x450 [ 162.475661] ? ntfs_security_init+0x3d6/0x440 [ 162.475906] ? is_sd_valid+0x180/0x180 [ 162.476191] ntfs_extend_init+0x13f/0x2c0 [ 162.476496] ? ntfs_fix_post_read+0x130/0x130 [ 162.476861] ? iput.part.0+0x286/0x320 [ 162.477325] ntfs_fill_super+0x11e0/0x1b50 [ 162.477709] ? put_ntfs+0x1d0/0x1d0 [ 162.477970] ? vsprintf+0x20/0x20 [ 162.478258] ? set_blocksize+0x95/0x150 [ 162.478538] get_tree_bdev+0x232/0x370 [ 162.478789] ? put_ntfs+0x1d0/0x1d0 [ 162.479038] ntfs_fs_get_tree+0x15/0x20 [ 162.479374] vfs_get_tree+0x4c/0x130 [ 162.479729] path_mount+0x654/0xfe0 [ 162.480124] ? putname+0x80/0xa0 [ 162.480484] ? finish_automount+0x2e0/0x2e0 [ 162.480894] ? putname+0x80/0xa0 [ 162.481467] ? kmem_cache_free+0x1c4/0x440 [ 162.482280] ? putname+0x80/0xa0 [ 162.482714] do_mount+0xd6/0xf0 [ 162.483264] ? path_mount+0xfe0/0xfe0 [ 162.484782] ? __kasan_check_write+0x14/0x20 [ 162.485593] __x64_sys_mount+0xca/0x110 [ 162.486024] do_syscall_64+0x3b/0x90 [ 162.486543] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 162.487141] RIP: 0033:0x7f9d374e948a [ 162.488324] Code: 48 8b 0d 11 fa 2a 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 008 [ 162.489728] RSP: 002b:00007ffe30e73d18 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 [ 162.490971] RAX: ffffffffffffffda RBX: 0000561cdb43a060 RCX: 00007f9d374e948a [ 162.491669] RDX: 0000561cdb43a260 RSI: 0000561cdb43a2e0 RDI: 0000561cdb442af0 [ 162.492050] RBP: 0000000000000000 R08: 0000561cdb43a280 R09: 0000000000000020 [ 162.492459] R10: 00000000c0ed0000 R11: 0000000000000206 R12: 0000561cdb442af0 [ 162.493183] R13: 0000561cdb43a260 R14: 0000000000000000 R15: 00000000ffffffff [ 162.493644] [ 162.493908] [ 162.494214] The buggy address belongs to the physical page: [ 162.494761] page:000000003e38a3d5 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x37bc [ 162.496064] flags: 0xfffffc0000000(node=0|zone=1|lastcpupid=0x1fffff) [ 162.497278] raw: 000fffffc0000000 ffffea00000df1c8 ffffea00000df008 0000000000000000 [ 162.498928] raw: 0000000000000000 0000000000240000 00000000ffffffff 0000000000000000 [ 162.500542] page dumped because: kasan: bad access detected [ 162.501057] [ 162.501242] Memory state around the buggy address: [ 162.502230] ffff8880037bc980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 162.502977] ffff8880037bca00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 162.503522] >ffff8880037bca80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 162.503963] ^ [ 162.504370] ffff8880037bcb00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 162.504766] ffff8880037bcb80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff Signed-off-by: Edward Lo Signed-off-by: Konstantin Komarov commit ab84eee4c7ab929996602eda7832854c35a6dda2 Author: Zeng Heng Date: Mon Dec 12 09:31:34 2022 +0800 fs/ntfs3: Fix slab-out-of-bounds read in hdr_delete_de() Here is a BUG report from syzbot: BUG: KASAN: slab-out-of-bounds in hdr_delete_de+0xe0/0x150 fs/ntfs3/index.c:806 Read of size 16842960 at addr ffff888079cc0600 by task syz-executor934/3631 Call Trace: memmove+0x25/0x60 mm/kasan/shadow.c:54 hdr_delete_de+0xe0/0x150 fs/ntfs3/index.c:806 indx_delete_entry+0x74f/0x3670 fs/ntfs3/index.c:2193 ni_remove_name+0x27a/0x980 fs/ntfs3/frecord.c:2910 ntfs_unlink_inode+0x3d4/0x720 fs/ntfs3/inode.c:1712 ntfs_rename+0x41a/0xcb0 fs/ntfs3/namei.c:276 Before using the meta-data in struct INDEX_HDR, we need to check index header valid or not. Otherwise, the corruptedi (or malicious) fs image can cause out-of-bounds access which could make kernel panic. Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Reported-by: syzbot+9c2811fd56591639ff5f@syzkaller.appspotmail.com Signed-off-by: Zeng Heng Signed-off-by: Konstantin Komarov commit 98bea253aa28ad8be2ce565a9ca21beb4a9419e5 Author: Edward Lo Date: Sat Nov 5 23:39:44 2022 +0800 fs/ntfs3: Validate MFT flags before replaying logs Log load and replay is part of the metadata handle flow during mount operation. The $MFT record will be loaded and used while replaying logs. However, a malformed $MFT record, say, has RECORD_FLAG_DIR flag set and contains an ATTR_ROOT attribute will misguide kernel to treat it as a directory, and try to free the allocated resources when the corresponding inode is freed, which will cause an invalid kfree because the memory hasn't actually been allocated. [ 101.368647] BUG: KASAN: invalid-free in kvfree+0x2c/0x40 [ 101.369457] [ 101.369986] CPU: 0 PID: 198 Comm: mount Not tainted 6.0.0-rc7+ #5 [ 101.370529] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 101.371362] Call Trace: [ 101.371795] [ 101.372157] dump_stack_lvl+0x49/0x63 [ 101.372658] print_report.cold+0xf5/0x689 [ 101.373022] ? ni_write_inode+0x754/0xd90 [ 101.373378] ? kvfree+0x2c/0x40 [ 101.373698] kasan_report_invalid_free+0x77/0xf0 [ 101.374058] ? kvfree+0x2c/0x40 [ 101.374352] ? kvfree+0x2c/0x40 [ 101.374668] __kasan_slab_free+0x189/0x1b0 [ 101.374992] ? kvfree+0x2c/0x40 [ 101.375271] kfree+0x168/0x3b0 [ 101.375717] kvfree+0x2c/0x40 [ 101.376002] indx_clear+0x26/0x60 [ 101.376316] ni_clear+0xc5/0x290 [ 101.376661] ntfs_evict_inode+0x45/0x70 [ 101.377001] evict+0x199/0x280 [ 101.377432] iput.part.0+0x286/0x320 [ 101.377819] iput+0x32/0x50 [ 101.378166] ntfs_loadlog_and_replay+0x143/0x320 [ 101.378656] ? ntfs_bio_fill_1+0x510/0x510 [ 101.378968] ? iput.part.0+0x286/0x320 [ 101.379367] ntfs_fill_super+0xecb/0x1ba0 [ 101.379729] ? put_ntfs+0x1d0/0x1d0 [ 101.380046] ? vsprintf+0x20/0x20 [ 101.380542] ? mutex_unlock+0x81/0xd0 [ 101.380914] ? set_blocksize+0x95/0x150 [ 101.381597] get_tree_bdev+0x232/0x370 [ 101.382254] ? put_ntfs+0x1d0/0x1d0 [ 101.382699] ntfs_fs_get_tree+0x15/0x20 [ 101.383094] vfs_get_tree+0x4c/0x130 [ 101.383675] path_mount+0x654/0xfe0 [ 101.384203] ? putname+0x80/0xa0 [ 101.384540] ? finish_automount+0x2e0/0x2e0 [ 101.384943] ? putname+0x80/0xa0 [ 101.385362] ? kmem_cache_free+0x1c4/0x440 [ 101.385968] ? putname+0x80/0xa0 [ 101.386666] do_mount+0xd6/0xf0 [ 101.387228] ? path_mount+0xfe0/0xfe0 [ 101.387585] ? __kasan_check_write+0x14/0x20 [ 101.387979] __x64_sys_mount+0xca/0x110 [ 101.388436] do_syscall_64+0x3b/0x90 [ 101.388757] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 101.389289] RIP: 0033:0x7fa0f70e948a [ 101.390048] Code: 48 8b 0d 11 fa 2a 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 008 [ 101.391297] RSP: 002b:00007ffc24fdecc8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 [ 101.391988] RAX: ffffffffffffffda RBX: 000055932c183060 RCX: 00007fa0f70e948a [ 101.392494] RDX: 000055932c183260 RSI: 000055932c1832e0 RDI: 000055932c18bce0 [ 101.393053] RBP: 0000000000000000 R08: 000055932c183280 R09: 0000000000000020 [ 101.393577] R10: 00000000c0ed0000 R11: 0000000000000202 R12: 000055932c18bce0 [ 101.394044] R13: 000055932c183260 R14: 0000000000000000 R15: 00000000ffffffff [ 101.394747] [ 101.395402] [ 101.396047] Allocated by task 198: [ 101.396724] kasan_save_stack+0x26/0x50 [ 101.397400] __kasan_slab_alloc+0x6d/0x90 [ 101.397974] kmem_cache_alloc_lru+0x192/0x5a0 [ 101.398524] ntfs_alloc_inode+0x23/0x70 [ 101.399137] alloc_inode+0x3b/0xf0 [ 101.399534] iget5_locked+0x54/0xa0 [ 101.400026] ntfs_iget5+0xaf/0x1780 [ 101.400414] ntfs_loadlog_and_replay+0xe5/0x320 [ 101.400883] ntfs_fill_super+0xecb/0x1ba0 [ 101.401313] get_tree_bdev+0x232/0x370 [ 101.401774] ntfs_fs_get_tree+0x15/0x20 [ 101.402224] vfs_get_tree+0x4c/0x130 [ 101.402673] path_mount+0x654/0xfe0 [ 101.403160] do_mount+0xd6/0xf0 [ 101.403537] __x64_sys_mount+0xca/0x110 [ 101.404058] do_syscall_64+0x3b/0x90 [ 101.404333] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 101.404816] [ 101.405067] The buggy address belongs to the object at ffff888008cc9ea0 [ 101.405067] which belongs to the cache ntfs_inode_cache of size 992 [ 101.406171] The buggy address is located 232 bytes inside of [ 101.406171] 992-byte region [ffff888008cc9ea0, ffff888008cca280) [ 101.406995] [ 101.408559] The buggy address belongs to the physical page: [ 101.409320] page:00000000dccf19dd refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x8cc8 [ 101.410654] head:00000000dccf19dd order:2 compound_mapcount:0 compound_pincount:0 [ 101.411533] flags: 0xfffffc0010200(slab|head|node=0|zone=1|lastcpupid=0x1fffff) [ 101.412665] raw: 000fffffc0010200 0000000000000000 dead000000000122 ffff888003695140 [ 101.413209] raw: 0000000000000000 00000000800e000e 00000001ffffffff 0000000000000000 [ 101.413799] page dumped because: kasan: bad access detected [ 101.414213] [ 101.414427] Memory state around the buggy address: [ 101.414991] ffff888008cc9e80: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 [ 101.415785] ffff888008cc9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 101.416933] >ffff888008cc9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 101.417857] ^ [ 101.418566] ffff888008cca000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 101.419704] ffff888008cca080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Signed-off-by: Edward Lo Signed-off-by: Konstantin Komarov commit 8dae4f6341e335a09575be60b4fdf697c732a470 Author: Abdun Nihaal Date: Sun Oct 30 12:32:51 2022 +0530 fs/ntfs3: Fix NULL dereference in ni_write_inode Syzbot reports a NULL dereference in ni_write_inode. When creating a new inode, if allocation fails in mi_init function (called in mi_format_new function), mi->mrec is set to NULL. In the error path of this inode creation, mi->mrec is later dereferenced in ni_write_inode. Add a NULL check to prevent NULL dereference. Link: https://syzkaller.appspot.com/bug?extid=f45957555ed4a808cc7a Reported-and-tested-by: syzbot+f45957555ed4a808cc7a@syzkaller.appspotmail.com Signed-off-by: Abdun Nihaal Signed-off-by: Konstantin Komarov commit 4f082a7531223a438c757bb20e304f4c941c67a8 Author: Edward Lo Date: Thu Oct 27 23:33:37 2022 +0800 fs/ntfs3: Enhance the attribute size check This combines the overflow and boundary check so that all attribute size will be properly examined while enumerating them. [ 169.181521] BUG: KASAN: slab-out-of-bounds in run_unpack+0x2e3/0x570 [ 169.183161] Read of size 1 at addr ffff8880094b6240 by task mount/247 [ 169.184046] [ 169.184925] CPU: 0 PID: 247 Comm: mount Not tainted 6.0.0-rc7+ #3 [ 169.185908] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 169.187066] Call Trace: [ 169.187492] [ 169.188049] dump_stack_lvl+0x49/0x63 [ 169.188495] print_report.cold+0xf5/0x689 [ 169.188964] ? run_unpack+0x2e3/0x570 [ 169.189331] kasan_report+0xa7/0x130 [ 169.189714] ? run_unpack+0x2e3/0x570 [ 169.190079] __asan_load1+0x51/0x60 [ 169.190634] run_unpack+0x2e3/0x570 [ 169.191290] ? run_pack+0x840/0x840 [ 169.191569] ? run_lookup_entry+0xb3/0x1f0 [ 169.192443] ? mi_enum_attr+0x20a/0x230 [ 169.192886] run_unpack_ex+0xad/0x3e0 [ 169.193276] ? run_unpack+0x570/0x570 [ 169.193557] ? ni_load_mi+0x80/0x80 [ 169.193889] ? debug_smp_processor_id+0x17/0x20 [ 169.194236] ? mi_init+0x4a/0x70 [ 169.194496] attr_load_runs_vcn+0x166/0x1c0 [ 169.194851] ? attr_data_write_resident+0x250/0x250 [ 169.195188] mi_read+0x133/0x2c0 [ 169.195481] ntfs_iget5+0x277/0x1780 [ 169.196017] ? call_rcu+0x1c7/0x330 [ 169.196392] ? ntfs_get_block_bmap+0x70/0x70 [ 169.196708] ? evict+0x223/0x280 [ 169.197014] ? __kmalloc+0x33/0x540 [ 169.197305] ? wnd_init+0x15b/0x1b0 [ 169.197599] ntfs_fill_super+0x1026/0x1ba0 [ 169.197994] ? put_ntfs+0x1d0/0x1d0 [ 169.198299] ? vsprintf+0x20/0x20 [ 169.198583] ? mutex_unlock+0x81/0xd0 [ 169.198930] ? set_blocksize+0x95/0x150 [ 169.199269] get_tree_bdev+0x232/0x370 [ 169.199750] ? put_ntfs+0x1d0/0x1d0 [ 169.200094] ntfs_fs_get_tree+0x15/0x20 [ 169.200431] vfs_get_tree+0x4c/0x130 [ 169.200714] path_mount+0x654/0xfe0 [ 169.201067] ? putname+0x80/0xa0 [ 169.201358] ? finish_automount+0x2e0/0x2e0 [ 169.201965] ? putname+0x80/0xa0 [ 169.202445] ? kmem_cache_free+0x1c4/0x440 [ 169.203075] ? putname+0x80/0xa0 [ 169.203414] do_mount+0xd6/0xf0 [ 169.203719] ? path_mount+0xfe0/0xfe0 [ 169.203977] ? __kasan_check_write+0x14/0x20 [ 169.204382] __x64_sys_mount+0xca/0x110 [ 169.204711] do_syscall_64+0x3b/0x90 [ 169.205059] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 169.205571] RIP: 0033:0x7f67a80e948a [ 169.206327] Code: 48 8b 0d 11 fa 2a 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 008 [ 169.208296] RSP: 002b:00007ffddf020f58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 [ 169.209253] RAX: ffffffffffffffda RBX: 000055e2547a6060 RCX: 00007f67a80e948a [ 169.209777] RDX: 000055e2547a6260 RSI: 000055e2547a62e0 RDI: 000055e2547aeaf0 [ 169.210342] RBP: 0000000000000000 R08: 000055e2547a6280 R09: 0000000000000020 [ 169.210843] R10: 00000000c0ed0000 R11: 0000000000000202 R12: 000055e2547aeaf0 [ 169.211307] R13: 000055e2547a6260 R14: 0000000000000000 R15: 00000000ffffffff [ 169.211913] [ 169.212304] [ 169.212680] Allocated by task 0: [ 169.212963] (stack is not available) [ 169.213200] [ 169.213472] The buggy address belongs to the object at ffff8880094b5e00 [ 169.213472] which belongs to the cache UDP of size 1152 [ 169.214095] The buggy address is located 1088 bytes inside of [ 169.214095] 1152-byte region [ffff8880094b5e00, ffff8880094b6280) [ 169.214639] [ 169.215004] The buggy address belongs to the physical page: [ 169.215766] page:000000002e324c8c refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x94b4 [ 169.218412] head:000000002e324c8c order:2 compound_mapcount:0 compound_pincount:0 [ 169.219078] flags: 0xfffffc0010200(slab|head|node=0|zone=1|lastcpupid=0x1fffff) [ 169.220272] raw: 000fffffc0010200 0000000000000000 dead000000000122 ffff888002409b40 [ 169.221006] raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000 [ 169.222320] page dumped because: kasan: bad access detected [ 169.222922] [ 169.223119] Memory state around the buggy address: [ 169.224056] ffff8880094b6100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 169.224908] ffff8880094b6180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 169.225677] >ffff8880094b6200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 169.226445] ^ [ 169.227055] ffff8880094b6280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 169.227638] ffff8880094b6300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Signed-off-by: Edward Lo Signed-off-by: Konstantin Komarov commit b8c44949044e5f7f864525fdffe8e95135ce9ce5 Author: ZhangPeng Date: Wed Dec 7 09:46:10 2022 +0000 fs/ntfs3: Fix OOB read in indx_insert_into_buffer Syzbot reported a OOB read bug: BUG: KASAN: slab-out-of-bounds in indx_insert_into_buffer+0xaa3/0x13b0 fs/ntfs3/index.c:1755 Read of size 17168 at addr ffff8880255e06c0 by task syz-executor308/3630 Call Trace: memmove+0x25/0x60 mm/kasan/shadow.c:54 indx_insert_into_buffer+0xaa3/0x13b0 fs/ntfs3/index.c:1755 indx_insert_entry+0x446/0x6b0 fs/ntfs3/index.c:1863 ntfs_create_inode+0x1d3f/0x35c0 fs/ntfs3/inode.c:1548 ntfs_create+0x3e/0x60 fs/ntfs3/namei.c:100 lookup_open fs/namei.c:3413 [inline] If the member struct INDEX_BUFFER *index of struct indx_node is incorrect, that is, the value of __le32 used is greater than the value of __le32 total in struct INDEX_HDR. Therefore, OOB read occurs when memmove is called in indx_insert_into_buffer(). Fix this by adding a check in hdr_find_e(). Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Reported-by: syzbot+d882d57193079e379309@syzkaller.appspotmail.com Signed-off-by: ZhangPeng Signed-off-by: Konstantin Komarov commit db2a3cc6a3481076da6344cc62a80a4e2525f36f Author: Ye Bin Date: Thu Nov 17 17:19:12 2022 +0800 fs/ntfs3: Fix NULL pointer dereference in 'ni_write_inode' Syzbot found the following issue: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000016 Mem abort info: ESR = 0x0000000096000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x06: level 2 translation fault Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 user pgtable: 4k pages, 48-bit VAs, pgdp=000000010af56000 [0000000000000016] pgd=08000001090da003, p4d=08000001090da003, pud=08000001090ce003, pmd=0000000000000000 Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 3036 Comm: syz-executor206 Not tainted 6.0.0-rc6-syzkaller-17739-g16c9f284e746 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : is_rec_inuse fs/ntfs3/ntfs.h:313 [inline] pc : ni_write_inode+0xac/0x798 fs/ntfs3/frecord.c:3232 lr : ni_write_inode+0xa0/0x798 fs/ntfs3/frecord.c:3226 sp : ffff8000126c3800 x29: ffff8000126c3860 x28: 0000000000000000 x27: ffff0000c8b02000 x26: ffff0000c7502320 x25: ffff0000c7502288 x24: 0000000000000000 x23: ffff80000cbec91c x22: ffff0000c8b03000 x21: ffff0000c8b02000 x20: 0000000000000001 x19: ffff0000c75024d8 x18: 00000000000000c0 x17: ffff80000dd1b198 x16: ffff80000db59158 x15: ffff0000c4b6b500 x14: 00000000000000b8 x13: 0000000000000000 x12: ffff0000c4b6b500 x11: ff80800008be1b60 x10: 0000000000000000 x9 : ffff0000c4b6b500 x8 : 0000000000000000 x7 : ffff800008be1b50 x6 : 0000000000000000 x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000 x2 : 0000000000000008 x1 : 0000000000000001 x0 : 0000000000000000 Call trace: is_rec_inuse fs/ntfs3/ntfs.h:313 [inline] ni_write_inode+0xac/0x798 fs/ntfs3/frecord.c:3232 ntfs_evict_inode+0x54/0x84 fs/ntfs3/inode.c:1744 evict+0xec/0x334 fs/inode.c:665 iput_final fs/inode.c:1748 [inline] iput+0x2c4/0x324 fs/inode.c:1774 ntfs_new_inode+0x7c/0xe0 fs/ntfs3/fsntfs.c:1660 ntfs_create_inode+0x20c/0xe78 fs/ntfs3/inode.c:1278 ntfs_create+0x54/0x74 fs/ntfs3/namei.c:100 lookup_open fs/namei.c:3413 [inline] open_last_lookups fs/namei.c:3481 [inline] path_openat+0x804/0x11c4 fs/namei.c:3688 do_filp_open+0xdc/0x1b8 fs/namei.c:3718 do_sys_openat2+0xb8/0x22c fs/open.c:1311 do_sys_open fs/open.c:1327 [inline] __do_sys_openat fs/open.c:1343 [inline] __se_sys_openat fs/open.c:1338 [inline] __arm64_sys_openat+0xb0/0xe0 fs/open.c:1338 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall arch/arm64/kernel/syscall.c:52 [inline] el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x48/0x164 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:636 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:654 el0t_64_sync+0x18c/0x190 Code: 97dafee4 340001b4 f9401328 2a1f03e0 (79402d14) ---[ end trace 0000000000000000 ]--- Above issue may happens as follows: ntfs_new_inode mi_init mi->mrec = kmalloc(sbi->record_size, GFP_NOFS); -->failed to allocate memory if (!mi->mrec) return -ENOMEM; iput iput_final evict ntfs_evict_inode ni_write_inode is_rec_inuse(ni->mi.mrec)-> As 'ni->mi.mrec' is NULL trigger NULL-ptr-deref To solve above issue if new inode failed make inode bad before call 'iput()' in 'ntfs_new_inode()'. Reported-by: syzbot+f45957555ed4a808cc7a@syzkaller.appspotmail.com Signed-off-by: Ye Bin Signed-off-by: Konstantin Komarov commit 254e69f284d7270e0abdc023ee53b71401c3ba0c Author: ZhangPeng Date: Fri Nov 25 10:21:59 2022 +0000 fs/ntfs3: Fix null-ptr-deref on inode->i_op in ntfs_lookup() Syzbot reported a null-ptr-deref bug: ntfs3: loop0: Different NTFS' sector size (1024) and media sector size (512) ntfs3: loop0: Mark volume as dirty due to NTFS errors general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] RIP: 0010:d_flags_for_inode fs/dcache.c:1980 [inline] RIP: 0010:__d_add+0x5ce/0x800 fs/dcache.c:2796 Call Trace: d_splice_alias+0x122/0x3b0 fs/dcache.c:3191 lookup_open fs/namei.c:3391 [inline] open_last_lookups fs/namei.c:3481 [inline] path_openat+0x10e6/0x2df0 fs/namei.c:3688 do_filp_open+0x264/0x4f0 fs/namei.c:3718 do_sys_openat2+0x124/0x4e0 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_open fs/open.c:1334 [inline] __se_sys_open fs/open.c:1330 [inline] __x64_sys_open+0x221/0x270 fs/open.c:1330 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd If the MFT record of ntfs inode is not a base record, inode->i_op can be NULL. And a null-ptr-deref may happen: ntfs_lookup() dir_search_u() # inode->i_op is set to NULL d_splice_alias() __d_add() d_flags_for_inode() # inode->i_op->get_link null-ptr-deref Fix this by adding a Check on inode->i_op before calling the d_splice_alias() function. Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation") Reported-by: syzbot+a8f26a403c169b7593fe@syzkaller.appspotmail.com Signed-off-by: ZhangPeng Signed-off-by: Konstantin Komarov commit e6c3cef24cb0d045f99d5cb039b344874e3cfd74 Author: Jiasheng Jiang Date: Wed Nov 23 16:48:46 2022 +0800 fs/ntfs3: Add check for kmemdup Since the kmemdup may return NULL pointer, it should be better to add check for the return value in order to avoid NULL pointer dereference. Fixes: b46acd6a6a62 ("fs/ntfs3: Add NTFS journal") Signed-off-by: Jiasheng Jiang Signed-off-by: Konstantin Komarov commit bfa434c60157c9793e9b12c9b68ade02aff9f803 Author: Chen Zhongjin Date: Tue Nov 22 17:24:14 2022 +0800 fs/ntfs3: Fix memory leak if ntfs_read_mft failed Label ATTR_ROOT in ntfs_read_mft() sets is_root = true and ni->ni_flags |= NI_FLAG_DIR, then next attr will goto label ATTR_ALLOC and alloc ni->dir.alloc_run. However two states are not always consistent and can make memory leak. 1) attr_name in ATTR_ROOT does not fit the condition it will set is_root = true but NI_FLAG_DIR is not set. 2) next attr_name in ATTR_ALLOC fits the condition and alloc ni->dir.alloc_run 3) in cleanup function ni_clear(), when NI_FLAG_DIR is set, it frees ni->dir.alloc_run, otherwise it frees ni->file.run 4) because NI_FLAG_DIR is not set in this case, ni->dir.alloc_run is leaked as kmemleak reported: unreferenced object 0xffff888003bc5480 (size 64): backtrace: [<000000003d42e6b0>] __kmalloc_node+0x4e/0x1c0 [<00000000d8e19b8a>] kvmalloc_node+0x39/0x1f0 [<00000000fc3eb5b8>] run_add_entry+0x18a/0xa40 [ntfs3] [<0000000011c9f978>] run_unpack+0x75d/0x8e0 [ntfs3] [<00000000e7cf1819>] run_unpack_ex+0xbc/0x500 [ntfs3] [<00000000bbf0a43d>] ntfs_iget5+0xb25/0x2dd0 [ntfs3] [<00000000a6e50693>] ntfs_fill_super+0x218d/0x3580 [ntfs3] [<00000000b9170608>] get_tree_bdev+0x3fb/0x710 [<000000004833798a>] vfs_get_tree+0x8e/0x280 [<000000006e20b8e6>] path_mount+0xf3c/0x1930 [<000000007bf15a5f>] do_mount+0xf3/0x110 ... Fix this by always setting is_root and NI_FLAG_DIR together. Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Signed-off-by: Chen Zhongjin Signed-off-by: Konstantin Komarov commit 0203471df1d5242ab63692ddd9e95f37f0cddadc Author: Daniel Pinto Date: Tue Nov 15 08:17:32 2022 +0000 fs/ntfs3: Fix wrong cast in xattr.c cpu_to_be32 and be32_to_cpu respectively return and receive __be32, change the cast to the correct types. Fixes the following sparse warnings: fs/ntfs3/xattr.c:811:48: sparse: sparse: incorrect type in assignment (different base types) fs/ntfs3/xattr.c:901:34: sparse: sparse: cast to restricted __be32 Reported-by: kernel test robot Signed-off-by: Daniel Pinto Signed-off-by: Konstantin Komarov commit fd6435ea32d9243d116dbf50e7f1a8b33e01262b Author: Vinod Govindapillai Date: Thu Mar 23 13:44:26 2023 +0200 drm/i915/reg: use the correct register to access SAGV block time Wrong register address is used to read the SAG block time. Fix the register address according to the bspec. Bspec: 64608 Signed-off-by: Vinod Govindapillai Reviewed-by: Stanislav Lisovskiy Signed-off-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20230323114426.41136-3-vinod.govindapillai@intel.com commit ff168b37a96736c892007730e703e74d5a23ca48 Author: Vinod Govindapillai Date: Thu Mar 23 13:44:25 2023 +0200 drm/i915/reg: fix QGV points register access offsets Wrong offsets are calculated to read QGV point registers. Fix it to read from the correct registers. Bspec: 64602 Reviewed-by: Stanislav Lisovskiy Signed-off-by: Vinod Govindapillai Signed-off-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20230323114426.41136-2-vinod.govindapillai@intel.com commit 14a585177c0f5870c82b32000d79aca1baa94bfc Author: Andrew Price Date: Tue Mar 14 13:18:29 2023 +0000 gfs2: Remove ghs[] from gfs2_unlink Replace the 3-item array with three variables for readability. Signed-off-by: Andrew Price Signed-off-by: Andreas Gruenbacher commit 2d08478060438a5af86f44adba2a16727c89ff03 Author: Andrew Price Date: Tue Mar 14 13:18:28 2023 +0000 gfs2: Remove ghs[] from gfs2_link Replace the 2-item array with two variables for readability. Signed-off-by: Andrew Price Signed-off-by: Andreas Gruenbacher commit 12261134732689b7e30c59db9978f81230965181 Author: Manivannan Sadhasivam Date: Mon Mar 27 13:30:29 2023 +0530 iommu/arm-smmu-qcom: Limit the SMR groups to 128 Some platforms support more than 128 stream matching groups than what is defined by the ARM SMMU architecture specification. But due to some unknown reasons, those additional groups don't exhibit the same behavior as the architecture supported ones. For instance, the additional groups will not detect the quirky behavior of some firmware versions intercepting writes to S2CR register, thus skipping the quirk implemented in the driver and causing boot crash. So let's limit the groups to 128 for now until the issue with those groups are fixed and issue a notice to users in that case. Reviewed-by: Johan Hovold Tested-by: Johan Hovold Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230327080029.11584-1-manivannan.sadhasivam@linaro.org [will: Reworded the comment slightly] Signed-off-by: Will Deacon commit 8dc14966ca3eb5bf4e200c50cc73199ee6de2bd7 Author: Andrew Price Date: Tue Mar 14 13:18:27 2023 +0000 gfs2: Remove duplicate i_nlink check from gfs2_link() The duplication is: struct gfs2_inode *ip = GFS2_I(inode); [...] error = -ENOENT; if (inode->i_nlink == 0) goto out_gunlock; [...] error = -EINVAL; if (!ip->i_inode.i_nlink) goto out_gunlock; The second check is removed. ENOENT is the correct error code for attempts to link a deleted inode (ref: link(2)). If we support O_TMPFILE in future the check will need to be updated with an exception for inodes flagged I_LINKABLE so sorting out this duplication now will make it a slightly cleaner change. Signed-off-by: Andrew Price Signed-off-by: Andreas Gruenbacher commit 170848d4060d40220194c0af19f977a582f08922 Author: Greg Kroah-Hartman Date: Mon Mar 27 10:18:28 2023 +0200 driver core: class: fix documentation for class_create() In commit dcfbb67e48a2 ("driver core: class: use lock_class_key already present in struct subsys_private") we removed the key parameter to the function class_create() but forgot to remove it from the kerneldoc, which causes a build warning. Fix that up by removing the key parameter from the documentation as it is now gone. Reported-by: Stephen Rothwell Fixes: dcfbb67e48a2 ("driver core: class: use lock_class_key already present in struct subsys_private") Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230327081828.1087364-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 8c153645fa402ee96ec3c2fef9db3a087b3667ac Author: Jean-Philippe Brucker Date: Tue Mar 21 10:06:00 2023 +0000 iommu/arm-smmu-v3: Explain why ATS stays disabled with bypass The SMMU does not support enabling ATS for a bypass stream. Add a comment. Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20230321100559.341981-1-jean-philippe@linaro.org Signed-off-by: Will Deacon commit ad58151fa04280a938c173bcba05ba42a4073d92 Author: Kuninori Morimoto Date: Mon Mar 27 04:33:41 2023 +0000 ASoC: audio-graph-card2-custom-sample.dtsi: use card->name to avoid long name Current Card2 Custom Sample will be too long Card name, and be error audio-graph-card2-custom-sample audio-graph-card2-custom-sample \ ASoC: driver name too long \ audio-graph-card2-custom-sample' -> 'audio-graph-car' This patch uses short name to avoid it Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87bkke7qzf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 65d4d7259bfec376b6b1483b4fe4058a5ba2259b Author: Christophe JAILLET Date: Sun Mar 26 14:43:38 2023 +0200 ASoC: meson: Use the devm_clk_get_optional() helper Use devm_clk_get_optional() instead of hand writing it. This saves some loC and improves the semantic. Signed-off-by: Christophe JAILLET Reviewed-by: Jerome Brunet Link: https://lore.kernel.org/r/8dab942d6ce47657a9c038295959be80bb2ee09e.1679834598.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 5f4f53d28cde2cc7be96f657229c8603da578500 Author: Kautuk Consul Date: Mon Mar 27 07:33:20 2023 -0400 KVM: PPC: Book3S HV: kvmppc_hv_entry: remove .global scope kvmppc_hv_entry isn't called from anywhere other than book3s_hv_rmhandlers.S itself. Remove .global scope for this function and annotate it with SYM_CODE_START_LOCAL and SYM_CODE_END. Signed-off-by: Kautuk Consul Signed-off-by: Michael Ellerman Link: https://msgid.link/20230327113320.3407491-1-kconsul@linux.vnet.ibm.com commit d98ffa1aca264ce547b9135135f83d81cfe4345f Author: Stephen Kitt Date: Sat Mar 25 09:22:32 2023 +0100 Update relatime comments to include equality relatime also updates atime if the previous atime is equal to one or both of the ctime and mtime; a non-strict interpretation of "earlier than" and "younger than" in the comments allows this, but for clarity, this makes it explicit. Pointed out by "epiii2" and "ctrl-alt-delor" in https://unix.stackexchange.com/q/740862/86440. Signed-off-by: Stephen Kitt Signed-off-by: Christian Brauner commit 85b52122e5426e15602c0b979012e50d7271ea1a Merge: ce07727aff5be 2a96243e22f88 Author: Rafael J. Wysocki Date: Mon Mar 27 13:47:11 2023 +0200 Merge branch 'thermal-intel' Merge an x86_pkg_temp_thermal Intel thermal driver fix (Zhang Rui). * thermal-intel: thermal: intel: x86_pkg_temp_thermal: Add lower bound check for sysfs input commit ce07727aff5bec20f29abe9263a51ed6a355b228 Merge: 6babf38d894be 2b6db9efa5079 Author: Rafael J. Wysocki Date: Mon Mar 27 13:46:13 2023 +0200 Merge back thermal control material for 6.4-rc1. commit 5936e77c202add2cc20c21cd4486ace1a362bd43 Author: Yang Li Date: Mon Mar 27 14:05:16 2023 +0800 spi: sprd: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Reviewed-by: Baolin Wang Link: https://lore.kernel.org/r/20230327060516.93509-2-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 8499d4b5970f5fd135ee8860075768562a5efe70 Author: Yang Li Date: Mon Mar 27 14:05:15 2023 +0800 spi: sprd-adi: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Reviewed-by: Baolin Wang Link: https://lore.kernel.org/r/20230327060516.93509-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit d10c878213b0bd2df18639f62af28e93a36d437d Author: Yang Li Date: Mon Mar 27 13:53:46 2023 +0800 spi: pic32: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230327055346.76625-3-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 36b49126afa22b7f9fe3b16360ef2ab3da6bc376 Author: Yang Li Date: Mon Mar 27 13:53:45 2023 +0800 spi: orion: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230327055346.76625-2-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 5e72620125dfa6b876ea3fe3ad25e4c11b70615a Author: Yang Li Date: Mon Mar 27 13:53:44 2023 +0800 spi: omap2-mcspi: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Reviewed-by: Dhruva Gole Link: https://lore.kernel.org/r/20230327055346.76625-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 3ad6585509dc8157e598dbd06b71efed2e45fee8 Author: Konrad Dybcio Date: Wed Mar 15 11:52:08 2023 +0100 dt-bindings: arm-smmu: Document SM61[12]5 GPU SMMU Both of these SoCs have a Qualcomm MMU500 implementation of SMMU in front of their GPUs that expect 3 clocks. Both of them also have an APPS SMMU that expects no clocks. Remove qcom,sm61[12]5-smmu-500 from the "no clocks" list (intentionally 'breaking' the schema checks of APPS SMMU, as now it *can* accept clocks - with the current structure of this file it would have taken a wastefully-long time to sort this out properly..) and add necessary yaml to describe the clocks required by the GPU SMMUs. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230315-topic-kamorta_adrsmmu-v1-1-d1c0dea90bd9@linaro.org Signed-off-by: Will Deacon commit 16d1646871fbe800c9751f0816a970f9126a6586 Author: Konrad Dybcio Date: Mon Mar 13 17:44:17 2023 +0100 dt-bindings: arm-smmu: Add SM8350 Adreno SMMU Document the Adreno SMMU present on SM8350. Acked-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230313-topic-gpu_smmu_bindings-v3-2-66ab655fbfd5@linaro.org Signed-off-by: Will Deacon commit 5c3686616b1840b3143b227eb58fb1c1621d204e Author: Konrad Dybcio Date: Mon Mar 13 17:44:16 2023 +0100 dt-bindings: arm-smmu: Use qcom,smmu compatible for MMU500 adreno SMMUs qcom,smmu-500 was introduced to prevent people from adding new compatibles for what seems to roughly be the same hardware. Use it for qcom,adreno-smmu-compatible targets as well. While at it, fix the "arm,smmu-500" -> "arm,mmu-500" typo in the comment. Acked-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230313-topic-gpu_smmu_bindings-v3-1-66ab655fbfd5@linaro.org Signed-off-by: Will Deacon commit 7f061c19f6521ef2b3e6f784ae344ebb562a5343 Author: Abel Vesa Date: Wed Feb 8 10:13:58 2023 +0100 dt-bindings: arm-smmu: Add compatible for SM8550 SoC Add the SoC specific compatible for SM8550 implementing arm,mmu-500. Signed-off-by: Abel Vesa Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230207-topic-sm8550-upstream-smmu-bindings-v3-1-cb15a7123cfe@linaro.org Signed-off-by: Will Deacon commit 0c705be9609931920c299e76811b21acc9502f1a Author: Marc Aurèle La France Date: Mon Feb 20 22:10:32 2023 -0700 Remove orphaned CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT After the commit 93d102f094be9beab2 ("printk: remove safe buffers"), CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT is no longer useful. Remove it. Signed-off-by: Marc Aurèle La France Reviewed-by: John Ogness Reviewed-by: Sergey Senozhatsky Reviewed-by: Petr Mladek [pmladek@suse.cz: Cleaned up the commit message.] Signed-off-by: Petr Mladek Fixes: 93d102f094be9beab ("printk: remove safe buffers") Link: https://lore.kernel.org/r/5c19e248-1b6b-330c-7c4c-a824688daefe@tuyoix.net commit e45f243409db98d610248c843b25435e7fb0baf3 Author: Dmitry Rokosov Date: Fri Mar 24 17:55:57 2023 +0300 firmware: meson_sm: populate platform devices from sm device tree data In some meson boards, secure monitor device has children, for example, power secure controller. By default, secure monitor isn't the bus in terms of device tree subsystem, so the of_platform initialization code doesn't populate its device tree data. As a result, secure monitor's children aren't probed at all. Run the 'of_platform_populate()' routine manually to resolve such issues. Signed-off-by: Dmitry Rokosov Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230324145557.27797-1-ddrokosov@sberdevices.ru Signed-off-by: Neil Armstrong commit 1a2dbf0303e8793444a57a2eec0c6b29523657d9 Author: Hsin-Yi Wang Date: Mon Mar 27 12:48:05 2023 +0800 drm/bridge: it6505: Add range and selector_reg There are 2 banks on it6505, and when writing to different bank, REG_BANK_SEL needs to be set to the targeted bank. The current code set this additionally, which causes a race condition when a process is writing bank 0 registers while another process set the bank to 1. Set ranges in regmap config so the regmap API would handle the bank changes. Signed-off-by: Hsin-Yi Wang Reviewed-by: Neil Armstrong Reviewed-by: Andrzej Hajda Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230327044804.3657551-1-hsinyi@chromium.org commit b2ccba9e8cdc6fb3985cc227844e7c6af309ffb1 Author: Cristian Marussi Date: Sun Mar 26 21:34:49 2023 +0100 firmware: arm_scmi: Fix xfers allocation on Rx channel Two distinct pools of xfer descriptors are allocated at initialization time: one (Tx) used to provide xfers to track commands and their replies (or delayed replies) and another (Rx) to pick xfers from to be used for processing notifications. Such pools, though, are allocated globally to be used by the whole SCMI instance, they are not allocated per-channel and as such the allocation of notifications xfers cannot be simply skipped if no Rx channel was found for the base protocol common channel, because there could be defined more optional per-protocol dedicated channels that instead support Rx channels. Change the conditional check to skip allocation for the notification pool only if no Rx channel has been detected on any per-channel protocol at all. Fixes: 4ebd8f6dea81 ("firmware: arm_scmi: Add receive buffer support for notifications") Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20230326203449.3492948-1-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 101f26c72825c5dba1dfe826e4202a9a04b435c6 Author: Thomas Bogendoerfer Date: Mon Mar 27 10:35:22 2023 +0200 MIPS: octeon: Fix compile error Commit ed6a0b6e9fd7 ("MIPS: octeon: Use of_address_to_resource()") lost a cast, which causes a compile error. Fixes: ed6a0b6e9fd7 ("MIPS: octeon: Use of_address_to_resource()") Signed-off-by: Thomas Bogendoerfer commit e5b42483ccce50d5b957f474fd332afd4ef0c27b Author: Heiner Kallweit Date: Fri Mar 24 23:11:49 2023 +0100 dev_ioctl: fix a W=1 warning This fixes the following warning when compiled with GCC 12.2.0 and W=1. net/core/dev_ioctl.c:475: warning: Function parameter or member 'data' not described in 'dev_ioctl' Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 4228c3a23adc3a4369ecf7329af34ba753be3594 Author: Heiner Kallweit Date: Fri Mar 24 22:23:58 2023 +0100 net: phy: bcm7xxx: use devm_clk_get_optional_enabled to simplify the code Use devm_clk_get_optional_enabled to simplify the code. Signed-off-by: Heiner Kallweit Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit b79ad2307a1dfd9cba3cfce6445fa0be74a757a0 Author: Jason Wang Date: Thu Aug 11 20:11:19 2022 +0800 bus: ti-sysc: Fix comment typo The double `the' is duplicated in the comment, remove one. Signed-off-by: Jason Wang Message-Id: <20220811121119.20288-1-wangborong@cdjrlc.com> Signed-off-by: Tony Lindgren commit d4f1d01d3492e18b15df5c680fcaa4e14fc77481 Author: Yang Yingliang Date: Sat Aug 27 17:46:04 2022 +0800 bus: ti-sysc: Use list_for_each_entry() helper Convert list_for_each() to list_for_each_entry() where applicable. Signed-off-by: Yang Yingliang Message-Id: <20220827094604.3325887-1-yangyingliang@huawei.com> Signed-off-by: Tony Lindgren commit dae557a5af236af2785231410c1fcf09a4b31032 Author: Steffen Hemer Date: Tue Feb 14 14:23:02 2023 +0100 ARM: dts: am335x-phycore-som: Remove superseded/invalid GPMC NAND type. According to docu and dtschema check, 'gpmc,device-nand = true' is no longer valid, so remove it. Signed-off-by: Steffen Hemer Message-Id: <20230214132302.39087-8-s.hemer@phytec.de> Signed-off-by: Tony Lindgren commit 599b0a1bc55920860affc0792894e58de2bb8931 Author: Steffen Hemer Date: Tue Feb 14 14:23:01 2023 +0100 ARM: dts: am335x-pcm-953: Remove superseded/invalid LED trigger. According to docu and dtschema check, 'linux,default-trigger = gpio' is no longer valid, so remove it. Signed-off-by: Steffen Hemer Message-Id: <20230214132302.39087-7-s.hemer@phytec.de> Signed-off-by: Tony Lindgren commit a562f0e0514c343c21a19b7575fce72ad08b2fcf Author: Steffen Hemer Date: Tue Feb 14 14:23:00 2023 +0100 ARM: dts: am335x-phycore-som: Remove underscore in node names. Remove underscore in node names following conventions. Signed-off-by: Steffen Hemer Message-Id: <20230214132302.39087-6-s.hemer@phytec.de> Signed-off-by: Tony Lindgren commit 7395d9d0d438d95a3f6517092af85dfd2ae4406d Author: Steffen Hemer Date: Tue Feb 14 14:22:59 2023 +0100 ARM: dts: am335x-regor: Remove underscore in node names. Remove underscore in node names following conventions. Signed-off-by: Steffen Hemer Message-Id: <20230214132302.39087-5-s.hemer@phytec.de> Signed-off-by: Tony Lindgren commit ca607f0bd95c1104c6e515b53064833ddc6fbf40 Author: Steffen Hemer Date: Tue Feb 14 14:22:58 2023 +0100 ARM: dts: am335x-pcm-935: Remove underscore in node names. Remove underscore in node names following conventions. Signed-off-by: Steffen Hemer Message-Id: <20230214132302.39087-4-s.hemer@phytec.de> Signed-off-by: Tony Lindgren commit 3c556f7990604433165fa052f03a88a2b6bc7638 Author: Steffen Hemer Date: Tue Feb 14 14:22:57 2023 +0100 ARM: dts: am335x-wega: Change node name of sound card, remove underscores. Change node name of sound card to recommended generic and remove also further underscores in other node names. Signed-off-by: Steffen Hemer Message-Id: <20230214132302.39087-3-s.hemer@phytec.de> Signed-off-by: Tony Lindgren commit d0c46bed1cc020c8e84685c74dec1be3383cfb73 Author: Steffen Hemer Date: Tue Feb 14 14:22:56 2023 +0100 ARM: dts: am335x-wega: Fix audio codec by using simple-audio-card driver. Sound did not work with the previous EVM sound card binding, EVM dts switched to using 'simple-audio-card', so this fixes audio codec by using simple-audio-card driver. Signed-off-by: Steffen Hemer Message-Id: <20230214132302.39087-2-s.hemer@phytec.de> Signed-off-by: Tony Lindgren commit 29f4747a19a53a949b76a587fe3674dd5d7303f9 Author: Steffen Hemer Date: Tue Feb 14 14:22:55 2023 +0100 ARM: dts: am335x-phycore-som: Add alias for TPS65910 RTC Without an alias for the TPS65910 RTC, it snatches the rtc0 device in advance to the I2C RTC assigned to that alias. Signed-off-by: Steffen Hemer Message-Id: <20230214132302.39087-1-s.hemer@phytec.de> Signed-off-by: Tony Lindgren commit f47fc3aa346a506ac8552eb12dd9240194e01474 Author: H. Nikolaus Schaller Date: Thu Feb 16 17:46:43 2023 +0100 ARM: dts: omap3-gta04: fix compatible record for GTA04 board Vendor of the GTA04 boards is and always was Golden Delicious Computers GmbH&Co. KG, Germany and not Texas Instruments. Maybe, TI was references here because the GTA04 was based on the BeagleBoard design which is designated as "ti,omap3-beagle". While we are looking at vendors of omap3 based devices, we also add the record for OpenPandora. The DTS files for the pandora device already make use of it. Signed-off-by: H. Nikolaus Schaller Message-Id: <38b49aad0cf33bb5d6a511edb458139b58e367fd.1676566002.git.hns@goldelico.com> Acked-by: Rob Herring Signed-off-by: Tony Lindgren commit a622310f7f0185da02e42cdb06475f533efaae60 Author: H. Nikolaus Schaller Date: Fri Jan 13 22:11:51 2023 +0100 ARM: dts: gta04: fix excess dma channel usage OMAP processors support 32 channels but there is no check or inspect this except booting a device and looking at dmesg reports of not available channels. Recently some more subsystems with DMA (aes1+2) were added filling the list of dma channels beyond the limit of 32 (even if other parameters indicate 96 or 128 channels). This leads to random subsystem failures i(e.g. mcbsp for audio) after boot or boot messages that DMA can not be initialized. Another symptom is that /sys/kernel/debug/dmaengine/summary has 32 entries and does not show all required channels. Fix by disabling unused (on the GTA04 hardware) mcspi1...4. Each SPI channel allocates 4 DMA channels rapidly filling the available ones. Disabling unused SPI modules on the OMAP3 SoC may also save some energy (has not been checked). Fixes: c312f066314e ("ARM: dts: omap3: Migrate AES from hwmods to sysc-omap2") Signed-off-by: H. Nikolaus Schaller [re-enabled aes2, improved commit subject line] Signed-off-by: Andreas Kemnade Message-Id: <20230113211151.2314874-1-andreas@kemnade.info> Signed-off-by: Tony Lindgren commit a63945c3b56174537a4a655676fbe965f974b6b1 Author: Andrew Davis Date: Tue Mar 7 10:17:15 2023 -0600 ARM: dts: am57xx-idk: Add IDK displays and touchscreens This is a more interesting use of DT Overlays than the previous patches. Here we have two touchscreen modules. Each is compatible with, and can be attached to, either of the two AM57xx IDK development board variants (AM571x or AM572x). Due to the way the extension header was wired on the development boards, the touch sensor on the touchscreen modules will connect to different SoC pins when connected. For this the touch sensor is modeled as an additional overlay that is specific to the development board for which it is connected. Basically the LCD overlay can be swapped, but the touchscreen overlay that attaches to the LCD must be used with the corresponding base DT and not to the LCD. AM571x -\ /- osd101t2045.dtbo -\ /- am571x-idk-touchscreen.dtbo X X AM572x -/ \- osd101t2587.dtbo -/ \- am572x-idk-touchscreen.dtbo Signed-off-by: Andrew Davis Message-Id: <20230307161715.15209-4-afd@ti.com> Signed-off-by: Tony Lindgren commit 26d03d14171c0e90654f6dcc8551bc58ee6db1e8 Author: Andrew Davis Date: Tue Mar 7 10:17:14 2023 -0600 ARM: dts: ti: Add AM57xx GP EVM Rev A3 board support The A3 revision of the AM57xx GP EVM has the same EVM feature set as the original but is paired with an updated revision C BeagleBoard X15. DT Overlays allow us to model this in the same way, we simply apply the EVM overlay to the Rev C BeagleBoard to create the Rev A3 AM57xx GP EVM. Signed-off-by: Andrew Davis Message-Id: <20230307161715.15209-3-afd@ti.com> Signed-off-by: Tony Lindgren commit 0fff0e49d72a53c51d8903fbadb2e6a84e531c4a Author: Andrew Davis Date: Tue Mar 7 10:17:13 2023 -0600 ARM: dts: ti: Add AM57xx GP EVM board support The AM57xx GP EVM boards are built on top the AM57xx BeagleBoard-X15. The EVM extends the BeagleBoard by adding a touchscreen, some buttons, and a handful of peripheral extension slots. Being a plugin extension of an existing standalone board; we define the am57xx-evm as a composite-DTB of the base am57xx-beagle-x15 and a new am57xx-evm overlay. Signed-off-by: Tero Kristo Signed-off-by: Tomi Valkeinen Signed-off-by: Suman Anna Signed-off-by: Andrew Davis Message-Id: <20230307161715.15209-2-afd@ti.com> Signed-off-by: Tony Lindgren commit dc7cb2d29805fe4fa4000fc0b09740fc24c93408 Author: Jiapeng Chong Date: Thu Mar 23 10:32:59 2023 +0800 fs/buffer: Remove redundant assignment to err Variable 'err' set but not used. fs/buffer.c:2613:2: warning: Value stored to 'err' is never read. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4589 Signed-off-by: Jiapeng Chong Signed-off-by: Christian Brauner commit 6eaf5d97bb46a625274c84ef4b320a7242630929 Author: Rob Herring Date: Sun Mar 19 11:31:35 2023 -0500 ARM: OMAP2+: Use of_address_to_resource() Replace open coded parsing of "reg" with of_address_to_resource(). Signed-off-by: Rob Herring Message-Id: <20230319163135.225076-1-robh@kernel.org> Signed-off-by: Tony Lindgren commit d26f05931fb7bcfbd0f64acc692c606fd76bbb3a Author: Rob Herring Date: Fri Mar 10 08:46:55 2023 -0600 ARM: OMAP2+: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Message-Id: <20230310144655.1540793-1-robh@kernel.org> Signed-off-by: Tony Lindgren commit 4c6170d1ae2ccb20ed8d06d191868ed01e6bece0 Author: Jakub Kicinski Date: Fri Mar 24 12:03:56 2023 -0700 tools: ynl: default to treating enums as flags for mask generation I was a bit too optimistic in commit bf51d27704c9 ("tools: ynl: fix get_mask utility routine"), not every mask we use is necessarily coming from an enum of type "flags". We also allow flipping an enum into flags on per-attribute basis. That's done by the 'enum-as-flags' property of an attribute. Restore this functionality, it's not currently used by any in-tree family. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit a504d246d2129b6fe40059d372288ffb36e4588b Author: Jakub Kicinski Date: Fri Mar 24 11:17:57 2023 -0700 selftests: tls: add a test for queuing data before setting the ULP Other tests set up the connection fully on both ends before communicating any data. Add a test which will queue up TLS records to TCP before the TLS ULP is installed. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit dd3a7d58dcc2434632bed31683ff134b7d6d1da4 Author: Michal Michalik Date: Fri Mar 24 18:52:58 2023 +0100 tools: ynl: Add missing types to encode/decode While testing the tool I noticed we miss the u16 type on payload create. On the code inspection it turned out we miss also u64 - add them. We also miss the decoding of u16 despite the fact `NlAttr` class supports it - add it. Signed-off-by: Michal Michalik Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 78e812f0406c765fc5623b1d68e3c6e86cb32e5a Author: Ye Xingchen Date: Fri Mar 24 10:16:26 2023 +0800 soc: amlogic: meson-pwrc: Use dev_err_probe() Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/202303241016261854322@zte.com.cn Signed-off-by: Neil Armstrong commit fe5b9907ba995946c30c90111886b856ff86d362 Merge: 6595d358c5536 ecdcd0428c594 Author: David S. Miller Date: Mon Mar 27 08:41:57 2023 +0100 Merge branch 'sunhme-cleanups' Sean Anderson says: ==================== net: sunhme: Probe/IRQ cleanups Well, I've had these patches kicking around in my tree since last October, so I guess I had better get around to posting them. This series is mainly a cleanup/consolidation of the probe process, with some interrupt changes as well. Some of these changes are SBUS- (AKA SPARC-) specific, so this should really get some testing there as well to ensure nothing breaks. I've CC'd a few SPARC mailing lists in hopes that someone there can try this out. I also have an SBUS card I ordered by mistake if anyone has a SPARC computer but lacks this card. Changes in v4: - Tweak variable order for yuletide - Move uninitialized return to its own commit - Use correct SBUS/PCI accessors - Rework hme_version to set the default in pci/sbus_probe and override it (if necessary) in common_probe Changes in v3: - Incorperate a fix from another series into this commit Changes in v2: - Move happy_meal_begin_auto_negotiation earlier and remove forward declaration - Make some more includes common - Clean up mac address init - Inline error returns ==================== Signed-off-by: David S. Miller commit ecdcd0428c594f6a6ee157fafb4c6265785be054 Author: Sean Anderson Date: Fri Mar 24 13:51:36 2023 -0400 net: sunhme: Consolidate common probe tasks Most of the second half of the PCI/SBUS probe functions are the same. Consolidate them into a common function. Signed-off-by: Sean Anderson Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 902fe6e903686ed36d030ae402aa86ada9f2710b Author: Sean Anderson Date: Fri Mar 24 13:51:35 2023 -0400 net: sunhme: Inline error returns The err_out label used to have cleanup. Now that it just returns, inline it everywhere. Signed-off-by: Sean Anderson Reviewed-by: Simon Horman Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit d1f088196057a0e9b65156943fba71c9b6bb610d Author: Sean Anderson Date: Fri Mar 24 13:51:34 2023 -0400 net: sunhme: Clean up mac address init Clean up some oddities suggested during review. Signed-off-by: Sean Anderson Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 273fb669c62cf7ac237036da1335d85d3e99eeba Author: Sean Anderson Date: Fri Mar 24 13:51:33 2023 -0400 net: sunhme: Consolidate mac address initialization The mac address initialization is braodly the same between PCI and SBUS, and one was clearly copied from the other. Consolidate them. We still have to have some ifdefs because pci_(un)map_rom is only implemented for PCI, and idprom is only implemented for SPARC. Signed-off-by: Sean Anderson Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit cc216e4b44ceed03774f291140fee62255d947d8 Author: Sean Anderson Date: Fri Mar 24 13:51:32 2023 -0400 net: sunhme: Switch SBUS to devres The PCI half of this driver was converted in commit 914d9b2711dd ("sunhme: switch to devres"). Do the same for the SBUS half. Signed-off-by: Sean Anderson Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 1ff4f42aef609757c334947f60612b4691b95c8a Author: Sean Anderson Date: Fri Mar 24 13:51:31 2023 -0400 net: sunhme: Alphabetize includes Alphabetize includes to make it clearer where to add new ones. Signed-off-by: Sean Anderson Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 27b9ea8f37a6f5d6bd4c6867fd1910a978371572 Author: Sean Anderson Date: Fri Mar 24 13:51:30 2023 -0400 net: sunhme: Unify IRQ requesting Instead of registering one interrupt handler for all four SBUS Quattro HMEs, let each HME register its own handler. To make this work, we don't handle the IRQ if none of the status bits are set. This reduces the complexity of the driver, and makes it easier to ensure things happen before/after enabling IRQs. I'm not really sure why we request IRQs in two different places (and leave them running after removing the driver!). A lot of things in this driver seem to just be crusty, and not necessarily intentional. I'm assuming that's the case here as well. This really needs to be tested by someone with an SBUS Quattro card. Signed-off-by: Sean Anderson Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 3427372d0bd8c75036768d017074c29c99ce6342 Author: Sean Anderson Date: Fri Mar 24 13:51:29 2023 -0400 net: sunhme: Remove residual polling code The sunhme driver never used the hardware MII polling feature. Even the if-def'd out happy_meal_poll_start was removed by 2002 [1]. Remove the various places in the driver which needlessly guard against MII interrupts which will never be enabled. [1] https://lwn.net/2002/0411/a/2.5.8-pre3.php3 Signed-off-by: Sean Anderson Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 70b1b4b86227c024c29ad54278fa5b80ec535ca9 Author: Sean Anderson Date: Fri Mar 24 13:51:28 2023 -0400 net: sunhme: Just restart autonegotiation if we can't bring the link up If we've tried regular autonegotiation and forcing the link mode, just restart autonegotiation instead of reinitializing the whole NIC. Signed-off-by: Sean Anderson Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit d61157414d0a591d10d27d0ce5873916614e5e31 Author: Sean Anderson Date: Fri Mar 24 13:51:27 2023 -0400 net: sunhme: Fix uninitialized return code Fix an uninitialized return code if we never found a qfe slot. It would be a bug if we ever got into this situation, but it's good to return something tracable. Fixes: acb3f35f920b ("sunhme: forward the error code from pci_enable_device()") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Sean Anderson Signed-off-by: David S. Miller commit 6595d358c55360e3992f06bcb8ef627a424f3fe2 Merge: fbf8ba5666638 5cb96c29aa0ea Author: David S. Miller Date: Mon Mar 27 08:37:54 2023 +0100 Merge branch 'octeon_ep-deferred-probe-and-mailbox' Veerasenareddy Burru says: ==================== octeon_ep: deferred probe and mailbox Implement Deferred probe, mailbox enhancements and heartbeat monitor. v4 -> v5: - addressed review comments https://lore.kernel.org/all/20230323104703.GD36557@unreal/ replaced atomic_inc() + atomic_read() with atomic_inc_return(). v3 -> v4: - addressed review comments on v3 https://lore.kernel.org/all/20230214051422.13705-1-vburru@marvell.com/ - 0004-xxx.patch v3 is split into 0004-xxx.patch and 0005-xxx.patch in v4. - API changes to accept function ID are moved to 0005-xxx.patch. - fixed rct violations. - reverted newly added changes that do not yet have use cases. v2 -> v3: - removed SRIOV VF support changes from v2, as new drivers which use ndo_get_vf_xxx() and ndo_set_vf_xxx() are not accepted. https://lore.kernel.org/all/20221207200204.6819575a@kernel.org/ Will implement VF representors and submit again. - 0007-xxx.patch and 0008-xxx.patch from v2 are removed and 0009-xxx.patch in v2 is now 0007-xxx.patch in v3. - accordingly, changed title for cover letter. v1 -> v2: - remove separate workqueue task to wait for firmware ready. instead defer probe when firmware is not ready. Reported-by: Leon Romanovsky - This change has resulted in update of 0001-xxx.patch and all other patches in the patchset. ==================== Signed-off-by: David S. Miller commit 5cb96c29aa0ea359e4f5d30585538dc6a847d69d Author: Veerasenareddy Burru Date: Fri Mar 24 10:47:03 2023 -0700 octeon_ep: add heartbeat monitor Monitor periodic heartbeat messages from device firmware. Presence of heartbeat indicates the device is active and running. If the heartbeat is missed for configured interval indicates firmware has crashed and device is unusable; in this case, PF driver stops and uninitialize the device. Signed-off-by: Veerasenareddy Burru Signed-off-by: Abhijit Ayarekar Signed-off-by: David S. Miller commit 0718693fb36cf891c88c64564553452406151d37 Author: Veerasenareddy Burru Date: Fri Mar 24 10:47:02 2023 -0700 octeon_ep: function id in link info and stats mailbox commands Update control mailbox API to include function id in get stats and link info. Signed-off-by: Veerasenareddy Burru Signed-off-by: Abhijit Ayarekar Signed-off-by: David S. Miller commit baa987988777545c6bf93efdf62a4b2c74f8d739 Author: Veerasenareddy Burru Date: Fri Mar 24 10:47:01 2023 -0700 octeon_ep: support asynchronous notifications Add asynchronous notification support to the control mailbox. Signed-off-by: Veerasenareddy Burru Signed-off-by: Abhijit Ayarekar Signed-off-by: David S. Miller commit f25e596755b4642225c33243753c763982605416 Author: Veerasenareddy Burru Date: Fri Mar 24 10:47:00 2023 -0700 octeon_ep: include function id in mailbox commands Extend control command structure to include vfid and update APIs to accept VF ID. Signed-off-by: Abhijit Ayarekar Signed-off-by: Veerasenareddy Burru Signed-off-by: David S. Miller commit 577f0d1b1c5f3282fa2011177b0af692a7c21aee Author: Veerasenareddy Burru Date: Fri Mar 24 10:46:59 2023 -0700 octeon_ep: add separate mailbox command and response queues Enhance control mailbox protocol to support following - separate command and response queues * command queue to send control commands to firmware. * response queue to receive responses and notifications from firmware. - variable size messages using scatter/gather Signed-off-by: Abhijit Ayarekar Signed-off-by: Veerasenareddy Burru Signed-off-by: David S. Miller commit 7c05d3d06c2382a2dee567b6ae5de4876a50de14 Author: Veerasenareddy Burru Date: Fri Mar 24 10:46:58 2023 -0700 octeon_ep: control mailbox for multiple PFs Add control mailbox support for multiple PFs. Update control mbox base address calculation based on PF function link. Signed-off-by: Veerasenareddy Burru Signed-off-by: Abhijit Ayarekar Signed-off-by: David S. Miller commit 24d4333233b378114106a1327d3d635a004f4387 Author: Veerasenareddy Burru Date: Fri Mar 24 10:46:57 2023 -0700 octeon_ep: poll for control messages Poll for control messages until interrupts are enabled. All the interrupts are enabled in ndo_open(). Add ability to listen for notifications from firmware before ndo_open(). Once interrupts are enabled, this polling is disabled and all the messages are processed by bottom half of interrupt handler. Signed-off-by: Veerasenareddy Burru Signed-off-by: Abhijit Ayarekar Signed-off-by: David S. Miller commit 10c073e404693bf501afc44ef515316e255921e1 Author: Veerasenareddy Burru Date: Fri Mar 24 10:46:56 2023 -0700 octeon_ep: defer probe if firmware not ready Defer probe if firmware is not ready for device usage. Signed-off-by: Veerasenareddy Burru Signed-off-by: Abhijit Ayarekar Signed-off-by: Satananda Burla Signed-off-by: David S. Miller commit 2ee1bdd3114f62bb542ab51d2fececb20a4481da Author: Rob Herring Date: Fri Mar 10 08:47:34 2023 -0600 bus: ti-sysc: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Message-Id: <20230310144734.1546656-1-robh@kernel.org> Signed-off-by: Tony Lindgren commit 812b0597fb4043240724e4c7bed7ba1fe15c0e3f Author: Michael Kelley Date: Sun Mar 26 06:52:01 2023 -0700 x86/hyperv: Change vTOM handling to use standard coco mechanisms Hyper-V guests on AMD SEV-SNP hardware have the option of using the "virtual Top Of Memory" (vTOM) feature specified by the SEV-SNP architecture. With vTOM, shared vs. private memory accesses are controlled by splitting the guest physical address space into two halves. vTOM is the dividing line where the uppermost bit of the physical address space is set; e.g., with 47 bits of guest physical address space, vTOM is 0x400000000000 (bit 46 is set). Guest physical memory is accessible at two parallel physical addresses -- one below vTOM and one above vTOM. Accesses below vTOM are private (encrypted) while accesses above vTOM are shared (decrypted). In this sense, vTOM is like the GPA.SHARED bit in Intel TDX. Support for Hyper-V guests using vTOM was added to the Linux kernel in two patch sets[1][2]. This support treats the vTOM bit as part of the physical address. For accessing shared (decrypted) memory, these patch sets create a second kernel virtual mapping that maps to physical addresses above vTOM. A better approach is to treat the vTOM bit as a protection flag, not as part of the physical address. This new approach is like the approach for the GPA.SHARED bit in Intel TDX. Rather than creating a second kernel virtual mapping, the existing mapping is updated using recently added coco mechanisms. When memory is changed between private and shared using set_memory_decrypted() and set_memory_encrypted(), the PTEs for the existing kernel mapping are changed to add or remove the vTOM bit in the guest physical address, just as with TDX. The hypercalls to change the memory status on the host side are made using the existing callback mechanism. Everything just works, with a minor tweak to map the IO-APIC to use private accesses. To accomplish the switch in approach, the following must be done: * Update Hyper-V initialization to set the cc_mask based on vTOM and do other coco initialization. * Update physical_mask so the vTOM bit is no longer treated as part of the physical address * Remove CC_VENDOR_HYPERV and merge the associated vTOM functionality under CC_VENDOR_AMD. Update cc_mkenc() and cc_mkdec() to set/clear the vTOM bit as a protection flag. * Code already exists to make hypercalls to inform Hyper-V about pages changing between shared and private. Update this code to run as a callback from __set_memory_enc_pgtable(). * Remove the Hyper-V special case from __set_memory_enc_dec() * Remove the Hyper-V specific call to swiotlb_update_mem_attributes() since mem_encrypt_init() will now do it. * Add a Hyper-V specific implementation of the is_private_mmio() callback that returns true for the IO-APIC and vTPM MMIO addresses [1] https://lore.kernel.org/all/20211025122116.264793-1-ltykernel@gmail.com/ [2] https://lore.kernel.org/all/20211213071407.314309-1-ltykernel@gmail.com/ [ bp: Touchups. ] Signed-off-by: Michael Kelley Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/1679838727-87310-7-git-send-email-mikelley@microsoft.com commit fbf8ba56666381dd65aaf05b6edc53f1dc58f291 Merge: bc77f7318da88 f927e8ef1e931 Author: David S. Miller Date: Mon Mar 27 08:29:54 2023 +0100 Merge branch 'bcm53134-support' Álvaro Fernández Rojas says: ==================== net: dsa: b53: mdio: add support for BCM53134 This is based on the initial work from Paul Geurts that was sent to the incorrect linux development lists and recipients. I've modified it by removing BCM53134_DEVICE_ID from is531x5() and therefore adding is53134() where needed. I also added a separate RGMII handling block for is53134() since according to Paul, BCM53134 doesn't support RGMII_CTRL_TIMING_SEL as opposed to is531x5(). ==================== Signed-off-by: David S. Miller commit f927e8ef1e93174780b7c26b239a046396914cd6 Author: Paul Geurts Date: Fri Mar 24 09:41:38 2023 +0100 net: dsa: b53: mdio: add support for BCM53134 Add support for the BCM53134 Ethernet switch in the existing b53 dsa driver. BCM53134 is very similar to the BCM58XX series. Signed-off-by: Paul Geurts Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a20869b3a7859135cd4e7800d8960966ad34a5b7 Author: Álvaro Fernández Rojas Date: Fri Mar 24 09:41:37 2023 +0100 dt-bindings: net: dsa: b53: add BCM53134 support BCM53134 are B53 switches connected by MDIO. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Acked-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 97318d6427f62b723c89f4150f8f48126ef74961 Merge: 2b947f8769be8 197b6b60ae7bc Author: Greg Kroah-Hartman Date: Mon Mar 27 09:27:01 2023 +0200 Merge 6.3-rc4 into usb-next We need the USB fixes here, and the USB gadget update for future development patches to be based on. Signed-off-by: Greg Kroah-Hartman commit e45e761b77bc0739e7e23258c4394013bbb919c7 Author: Michael Kelley Date: Wed Mar 8 18:40:06 2023 -0800 init: Call mem_encrypt_init() after Hyper-V hypercall init is done Full Hyper-V initialization, including support for hypercalls, is done as an apic_post_init callback via late_time_init(). mem_encrypt_init() needs to make hypercalls when it marks swiotlb memory as decrypted. But mem_encrypt_init() is currently called a few lines before late_time_init(), so the hypercalls don't work. Fix this by moving mem_encrypt_init() after late_time_init() and related clock initializations. The intervening initializations don't do any I/O that requires the swiotlb, so moving mem_encrypt_init() slightly later has no impact. Signed-off-by: Michael Kelley Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/1678329614-3482-6-git-send-email-mikelley@microsoft.com commit c7b5254bd802ee3868f1c59333545272dc700d6d Author: Michael Kelley Date: Wed Mar 8 18:40:05 2023 -0800 x86/mm: Handle decryption/re-encryption of bss_decrypted consistently sme_postprocess_startup() decrypts the bss_decrypted section when sme_me_mask is non-zero. mem_encrypt_free_decrypted_mem() re-encrypts the unused portion based on CC_ATTR_MEM_ENCRYPT. In a Hyper-V guest VM using vTOM, these conditions are not equivalent as sme_me_mask is always zero when using vTOM. Consequently, mem_encrypt_free_decrypted_mem() attempts to re-encrypt memory that was never decrypted. So check sme_me_mask in mem_encrypt_free_decrypted_mem() too. Hyper-V guests using vTOM don't need the bss_decrypted section to be decrypted, so skipping the decryption/re-encryption doesn't cause a problem. Signed-off-by: Michael Kelley Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tom Lendacky Link: https://lore.kernel.org/r/1678329614-3482-5-git-send-email-mikelley@microsoft.com commit 41e4f807f85d02a44426b87e01ed98b191dbbf9d Author: Rob Herring Date: Wed Feb 1 16:00:02 2023 -0600 bus: ti-sysc: Remove open coded "ranges" parsing "ranges" is a standard property and we have common helper functions for parsing it, so let's use them. Signed-off-by: Rob Herring Message-Id: <20230201220002.246907-1-robh@kernel.org> Signed-off-by: Tony Lindgren commit c29313d58c42f205cdecdd337f784f59bdf92dd7 Author: Jinpeng Cui Date: Tue Aug 30 14:21:36 2022 +0000 ARM: omap1: remove redundant variables err Return value directly from platform_device_register() instead of getting value from redundant variable err. Reported-by: Zeal Robot Signed-off-by: Jinpeng Cui Message-Id: <20220830142136.299373-1-cui.jinpeng2@zte.com.cn> Signed-off-by: Tony Lindgren commit 3ea0b91d9b48124b01e30004547238afd6b5a310 Author: Juerg Haefliger Date: Wed Mar 15 10:11:52 2023 +0100 ARM: omap1: Kconfig: Fix indentation The convention for indentation seems to be a single tab. Help text is further indented by an additional two whitespaces. Fix the lines that violate these rules. Signed-off-by: Juerg Haefliger Message-Id: <20230315091152.132443-1-juerg.haefliger@canonical.com> Signed-off-by: Tony Lindgren commit d33ddc92db8a61416473ff3d7f1c621c50733dc0 Author: Michael Kelley Date: Sun Mar 26 06:51:58 2023 -0700 Drivers: hv: Explicitly request decrypted in vmap_pfn() calls Update vmap_pfn() calls to explicitly request that the mapping be for decrypted access to the memory. There's no change in functionality since the PFNs passed to vmap_pfn() are above the shared_gpa_boundary, implicitly producing a decrypted mapping. But explicitly requesting "decrypted" allows the code to work before and after changes that cause vmap_pfn() to mask the PFNs to being below the shared_gpa_boundary. Signed-off-by: Michael Kelley Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tianyu Lan Link: https://lore.kernel.org/r/1679838727-87310-4-git-send-email-mikelley@microsoft.com commit 71290be18f2deeae013482bf79cd526df61fcfcd Author: Michael Kelley Date: Sun Mar 26 06:51:57 2023 -0700 x86/hyperv: Reorder code to facilitate future work Reorder some code to facilitate future work. No functional change. Signed-off-by: Michael Kelley Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tianyu Lan Link: https://lore.kernel.org/r/1679838727-87310-3-git-send-email-mikelley@microsoft.com commit 91fa45bd8f8bfb69b0b5af72df93031cb0962d6a Author: Fabio Estevam Date: Wed Mar 22 15:40:49 2023 -0300 ARM: imx_v6_v7_defconfig: Select CONFIG_DRM_I2C_NXP_TDA998X Select CONFIG_DRM_I2C_NXP_TDA998X so that HDMI output can work by default on a imx6sx-udoo-neo board. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 9320fad102b0d14a007fa6d4293d00eede6e730a Author: Marek Vasut Date: Fri Mar 17 10:58:27 2023 +0100 dt-bindings: soc: imx-blk-ctrl: Drop leading label in blk-ctrl in examples Drop the leading label in block controller examples, it is unused. Signed-off-by: Marek Vasut Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 706b511f0c60a844b1e61dc2091054f0a28dcc91 Author: Marek Vasut Date: Fri Mar 17 10:58:26 2023 +0100 dt-bindings: soc: imx8m-blk-ctrl: Rename blk_ctrl to blk-ctrl in examples Rename blk_ctrl@ to blk-ctrl (with dash instead of underscore) in examples so that they would match the imx8m[mn].dtsi in current Linux kernel. Signed-off-by: Marek Vasut Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 44eeddd6bd185358ecbdfb5c8f4fd24c1d58645f Author: Marek Vasut Date: Fri Mar 17 10:47:25 2023 +0100 arm64: dts: imx8mp: Add support for DH electronics i.MX8M Plus DHCOM and PDK3 Add support for DH electronics i.MX8M Plus DHCOM SoM on PDK3 carrier board. Currently supported are serial console, EQoS and FEC ethernets, eMMC, SD, SPI NOR, CAN, M.2 E-Key or M.2 M-Key PCIe, USB . Signed-off-by: Marek Vasut Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit d757845451d7169ad6dc7053fd2e8ecc4f5749ab Author: Marek Vasut Date: Fri Mar 17 10:47:24 2023 +0100 dt-bindings: arm: Add DH electronics i.MX8M Plus DHCOM on PDK3 Add DT compatible string for DH electronics i.MX8M Plus DHCOM on PDK3 evaluation board into YAML DT binding document. This setup is a general purpose SoM evaluation board. Acked-by: Krzysztof Kozlowski Signed-off-by: Marek Vasut Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit f491698935bf50dea76309eae75ef3511151f8fb Author: Andreas Kemnade Date: Fri Mar 17 09:16:18 2023 +0100 ARM: dts: imx: Add devicetree for Tolino Vison Add a devicetree for the Tolino Vision Ebook reader. It is based on boards marked with "37NB-E60Q30+4A3". It is equipped with an i.MX6SL SoC. Expected to work: - Buttons - Wifi - LEDs - uSD - eMMC - USB - RTC - Touchscreen - Backlight Signed-off-by: Andreas Kemnade Signed-off-by: Shawn Guo commit d37c36001e55137abf3569fdd182735061197db3 Author: Andreas Kemnade Date: Fri Mar 17 09:16:17 2023 +0100 dt-bindings: arm: fsl: add compatible string for Tolino Vision Add a compatible string for the Tolino Vision eBook reader. Signed-off-by: Andreas Kemnade Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 1543b4c5071c54d76aad7a7a26a6e43082269b0c Author: Eric Van Hensbergen Date: Mon Mar 27 02:06:37 2023 +0000 fs/9p: remove writeback fid and fix per-file modes This patch removes the creating of an additional writeback_fid for opened files. The patch addresses problems when files were opened write-only or getattr on files with dirty caches. This patch also incorporates information about cache behavior in the fid for every file. This allows us to reflect cache behavior from mount flags, open mode, and information from the server to inform readahead and writeback behavior. This includes adding support for a 9p semantic that qid.version==0 is used to mark a file as non-cachable which is important for synthetic files. This may have a side-effect of not supporting caching on certain legacy file servers that do not properly set qid.version. There is also now a mount flag which can disable the qid.version behavior. Signed-off-by: Eric Van Hensbergen commit 6deffc8924b59df173da5fc7a9c96d3717cd9e96 Author: Eric Van Hensbergen Date: Sun Dec 18 20:34:45 2022 +0000 fs/9p: Add new mount modes Add some additional mount modes for cache management including specifying directio as a mount option and an option for ignore qid.version for determining whether or not a file is cacheable. Signed-off-by: Eric Van Hensbergen commit 46c30cb8f5393586c6ebc7b53a235c85bfac1de8 Author: Eric Van Hensbergen Date: Sun Dec 18 18:03:54 2022 +0000 9p: Add additional debug flags and open modes Add some additional debug flags to assist with debugging cache changes. Also add some additional open modes so we can track cache state in fids more directly. Signed-off-by: Eric Van Hensbergen commit 8142db4f2792717837b97e219e5f5203dde17abb Author: Eric Van Hensbergen Date: Sat Dec 17 17:19:34 2022 +0000 fs/9p: allow disable of xattr support on mount xattr creates a lot of additional messages for 9p in the current implementation. This allows users to conditionalize xattr support on 9p mount if they are on a connection with bad latency. Using this flag is also useful when debugging other aspects of 9p as it reduces the noise in the trace files. Signed-off-by: Eric Van Hensbergen Reviewed-by: Dominique Martinet commit 740b8bf87322701b4607b77346477cbc764f5c56 Author: Eric Van Hensbergen Date: Sat Dec 17 17:05:47 2022 +0000 fs/9p: Remove unnecessary superblock flags These flags just add unnecessary extra operations. When 9p is run without cache, it inherently implements these options so we don't need them in the superblock (which ends up sending extraneous fsyncs, etc.). User can still request these options on mount, but we don't need to set them as default. Signed-off-by: Eric Van Hensbergen commit d9bc0d11e33bd7b6bfeedc570cd5738e5b4c7ca8 Author: Eric Van Hensbergen Date: Thu Dec 8 02:40:37 2022 +0000 fs/9p: Consolidate file operations and add readahead and writeback We had 3 different sets of file operations across 2 different protocol variants differentiated by cache which really only changed 3 functions. But the real problem is that certain file modes, mount options, and other factors weren't being considered when we decided whether or not to use caches. This consolidates all the operations and switches to conditionals within a common set to decide whether or not to do different aspects of caching. Signed-off-by: Eric Van Hensbergen Reviewed-by: Dominique Martinet commit 7da4734751e075db517cf6ca9cb54db6fb0975a8 Author: Michal Vokáč Date: Tue Mar 14 19:06:08 2023 +0100 ARM: dts: imx6dl-yapp43: Add support for new HW revision of the IOTA board The PCB used for all the current boards (Ursa, Draco, Hydra, Orion, Crux) was slightly redesigned and delivers some new features while some unused components were removed. - External RTC chip with supercap added. - Secure element added. - LCD display power supply enable/disable signal added. - Touch keyboard reset and interrupt signals added. - Factory reset GPIO button added. - Audio codec LM49350 (EoL) removed and replaced by PWM audio output. - QCA8334 switch was replaced by Marvell 88E6141. - PCIe completely removed. - uSD card removed and replaced by board-to-board expansion connector. There are four configuration variants of the new board: 1. Pegasus The board configuration is based on Orion with the following major changes: - Quad core SoC - 4GB of RAM - RTC with supercap added - Secure element added 2. Pegasus+ This is the very same board as Pegasus but uses the i.MX6QuadPlus SoC. 3. Lynx The board configuration is based on Draco with the following major changes: - DualLite SoC - 1GB of RAM - RTC with supercap added - Secure element added 4. Phoenix The board configuration is based on Ursa with the following major changes: - DualLite Soc - 1GB of RAM - RTC with supercap added - Secure element added - LCD display support removed - UART2 removed - Factory reset GPIO button added Signed-off-by: Michal Vokáč Signed-off-by: Shawn Guo commit 0593e164bb05eb16387b137aef8bd8b6b0e9edd0 Author: Michal Vokáč Date: Tue Mar 14 19:06:06 2023 +0100 ARM: dts: imx6dl-yapp4: Remove unneeded status "okay" Explicit status = "okay" is not needed as it is the default. Signed-off-by: Michal Vokáč Signed-off-by: Shawn Guo commit f87c9b04c6b51e0339f0d3cf7f5a965c0cf939e8 Author: Michal Vokáč Date: Tue Mar 14 19:06:05 2023 +0100 ARM: dts: imx6dl-yapp4: Move status to the end of property list The status property should always be last in the list. Signed-off-by: Michal Vokáč Signed-off-by: Shawn Guo commit 7da7b84fee58c85a6075022023d31edea40e81a1 Author: Michal Vokáč Date: Tue Mar 14 19:06:04 2023 +0100 ARM: dts: imx6dl-yapp4: Move phy reset into switch node Drop the phy-reset-duration and phy-reset-gpios deprecated properties and move reset-gpios under the switch node. Signed-off-by: Michal Vokáč Signed-off-by: Shawn Guo commit 5c984deedadae311ac057598b3aad11b3950e7bc Author: Michal Vokáč Date: Tue Mar 14 19:06:07 2023 +0100 dt-bindings: arm: fsl: Add Y Soft IOTA Phoenix, Lynx, Pegasus and Pegasus+ These i.MX6 boards are based on a facelifted PCB from the previous designs. Routing for some unused parts was completely removed (uSD card, PCIe, audio codec) and some new parts were added (supercap backed RTC, secure element, PWM audio, GPIO button). Acked-by: Krzysztof Kozlowski Signed-off-by: Michal Vokáč Signed-off-by: Shawn Guo commit 1fe5ea7cc22811ea14c7e609cacb4923fc21e050 Author: Philippe Schenker Date: Tue Mar 14 11:24:09 2023 +0100 arm64: dts: colibri-imx8x: Add iris v2 carrier board Add the Toradex Iris V2 Carrier Board for Colibri iMX8X, small form-factor production ready board. Additional details available at: https://www.toradex.com/products/carrier-boards/iris-carrier-board Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit aefb5e2d974df7567bac32f2b0d1c8bcf5d6c94c Author: Philippe Schenker Date: Tue Mar 14 11:24:08 2023 +0100 arm64: dts: colibri-imx8x: Add iris carrier board Add the Toradex Iris Carrier Board for Colibri iMX8X, small form-factor production ready board. Additional details available at: https://www.toradex.com/products/carrier-boards/iris-carrier-board Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 144f67f68af8512426f2127c68ef054815453ff2 Author: Philippe Schenker Date: Tue Mar 14 11:24:07 2023 +0100 arm64: dts: colibri-imx8x: Add aster carrier board Add the Toradex Aster Carrier Board for Colibri iMX8X, small form-factor with header compatible with Arduino Uno and Raspberry Pi (RPi) maker boards. Additional details available at: https://www.toradex.com/products/carrier-boards/aster-carrier-board Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit f018dfb3111ad9f3a6bc93d643c2e368e9ce6dbd Author: Philippe Schenker Date: Tue Mar 14 11:24:05 2023 +0100 arm64: dts: colibri-imx8x: Add todo comments Highlight what is still missing. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit cc900d0ffcae8dae159b762eca3092b24744a91b Author: Philippe Schenker Date: Tue Mar 14 11:24:04 2023 +0100 arm64: dts: colibri-imx8x: Move gpio-keys to som level SODIMM_45 that is connected to "&lsio_gpio3 10" is defined in the Colibri standard to be a wakeup pin. Move this to the SoM level device-tree and keep it disabled by default but do enable it again on the carrier-board. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit e2c7fa724626e4bde70e753cdeb7827d0d225364 Author: Philippe Schenker Date: Tue Mar 14 11:24:03 2023 +0100 arm64: dts: colibri-imx8x: Set thermal thresholds Set critical/alert thermal thresholds for all relevant SOC temperature trips to the IT value (max T_junction 105 degree Celsius) in accordance with the IT grade of the SOM. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 09fad38e261d22dc70a14ce7dd4bb081e028f465 Author: Philippe Schenker Date: Tue Mar 14 11:24:02 2023 +0100 arm64: dts: colibri-imx8x: Add no-1-8-v to sd-card Many Colibri carrier boards are using 3.3V pull-up resistors on the SD-Card connector. Letting it switch to 1.8V is an invalid state. Do prevent this from happening by keeping the signaling voltage at 3.3V. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 281506130449a197dfd8d7469240716aba6affcd Author: Philippe Schenker Date: Tue Mar 14 11:24:01 2023 +0100 arm64: dts: colibri-imx8x: eval: Add spi-to-can Add mcp2515 spi-to-can to &lpspi2. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit e74b958c8eafd0e91158401f8e6880131111b28a Author: Philippe Schenker Date: Tue Mar 14 11:24:00 2023 +0100 arm64: dts: colibri-imx8x: Add colibri pwm b, c, d Add Colibri PWM_B, PWM_C, PWM_D to the module-level device-tree and set the status to ok on the eval-board. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit ee9936d64b453c02e217d7e1b93f750d6a609ee7 Author: Philippe Schenker Date: Tue Mar 14 11:23:59 2023 +0100 arm64: dts: colibri-imx8x: Add jpegenc/dec jpeg encoder and decoder are available. Do enable them in the module level device-tree since those are self-contained. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 851884b264fe4028bfc5ba6877ac40bdfb46e1cf Author: Philippe Schenker Date: Tue Mar 14 11:23:58 2023 +0100 arm64: dts: colibri-imx8x: Disable touchscreen by default Do not enable the touchscreen. By default it is not used but should be kept to enable it from a file that includes imx8x-colibri.dtsi. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 551648021f39727481b7fd0e634411fcf4b4037b Author: Philippe Schenker Date: Tue Mar 14 11:23:57 2023 +0100 arm64: dts: colibri-imx8x: Add gpio-line-names This commit adds gpio-line-names in line with other SoM from Toradex. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit a537c9618d0fe9f7954dad0a0827da85c5c25101 Author: Philippe Schenker Date: Tue Mar 14 11:23:56 2023 +0100 arm64: dts: colibri-imx8x: Add SPI Add Colibri SPI to the board. lpspi2 is being exposed on the SoM edge. Add settings to the module-level but finally enable it on the eval-board dtsi. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 9c279d216fbc87727099baab644e8d4a810d9cc7 Author: Philippe Schenker Date: Tue Mar 14 11:23:55 2023 +0100 arm64: dts: colibri-imx8x: Add pinctrl group for hdmi hpd The colibri imx8x contains a dedicated gpio meant for HDMI hot-plug-detect. Add a pinctrl group to make this usable. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 7171ec2953ab34d87d01a8884af3c9e4ba6e515c Author: Philippe Schenker Date: Tue Mar 14 11:23:54 2023 +0100 arm64: dts: colibri-imx8x: Add separate pinctrl group for cs2 Add a separate pinctrl group for chip-select 2 for Colibri SPI. That way one is able to use it separately. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit bd74f83de7665dfb5a55db537ed514471b2205b1 Author: Philippe Schenker Date: Tue Mar 14 11:23:53 2023 +0100 arm64: dts: colibri-imx8x: Correct pull on lcdif The pads USDHC1_RESET_B and MCLK_IN1 need a pull-down instead of pull-disabled. Correct this. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 4d2adf738169a3492407065fbcefcc8765ce507a Author: Philippe Schenker Date: Tue Mar 14 11:23:52 2023 +0100 arm64: dts: colibri-imx8x: Split pinctrl_hog1 Split pinctrl_hog1 into a second group so CSI_MCLK can be muxed to a gpio on its own. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 5e634a90928b0ba40f75d28a5daa2ad66e932cfc Author: Philippe Schenker Date: Tue Mar 14 11:23:51 2023 +0100 arm64: dts: colibri-imx8x: Add pinctrl group for csi_mclk Add missing pinctrl groups that can be used to enable the correct muxing if csi_mclk is needed on SODIMM 75. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 7ece3cbc8b1efbf48d25a91043e9b410b46a0ccf Author: Philippe Schenker Date: Tue Mar 14 11:23:50 2023 +0100 arm64: dts: colibri-imx8x: Add atmel pinctrl groups Add pinctrl groups for enabling atmel touchscreen support. Remove the pads out of pinctrl_hog0 as they now can be enabled more specific using pinctrl_atmel_conn label. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 7efa409ed64847b72633573f9783b7b36da7e44a Author: Philippe Schenker Date: Tue Mar 14 11:23:49 2023 +0100 arm64: dts: colibri-imx8x: Use new bracket format Use the new bracket format as described by Rob since this seems the format that we're heading in the future. https://lore.kernel.org/all/CAL_JsqKqQdRZC08-BGJqTjzJZ8aWA41LHMbv0QyyVePVm0co7A@mail.gmail.com/ Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit e8f7a387017da912f56317252c9da64a3188a55f Author: Philippe Schenker Date: Tue Mar 14 11:23:48 2023 +0100 arm64: dts: colibri-imx8x: Update spdx license GPL-2.0+ is deprecated, update it to GPL-2.0-or-later. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 2eba243813e27a8654ec4df15b208b2a321bb5b2 Author: Philippe Schenker Date: Tue Mar 14 11:23:47 2023 +0100 arm64: dts: colibri-imx8x: Prepare for qxp and dx variants Toradex sells the Colibri iMX8X module in variants with the i.MX 8QXP and i.MX8DX SoC. Prepare for this by moving majority of stuff from imx8qxp-colibri.dtsi into imx8x-colibri.dtsi. Remove DX from the model string. This commit intends no functional change. Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit fc226f865c05a6a0e1d4f4166ba9d4ceb27e7550 Author: Philippe Schenker Date: Tue Mar 14 11:24:06 2023 +0100 dt-bindings: arm: fsl: Add colibri-imx8x carrier boards Prepare the dt-bindings for the new colibri-imx8x carrier-boards Aster and Iris. The Toradex SoM standard is called Colibri, fix the typo. Signed-off-by: Philippe Schenker Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 816aec03a043af6d0234c3e770bead2c772ef4eb Author: Peng Fan Date: Mon Mar 13 08:49:03 2023 +0800 soc: imx: imx8m-blk-ctrl: reordering the fields The clang-analyzer reports: "Excessive padding in 'struct imx8m_blk_ctrl_domain_data' (12 padding bytes, where 4 is optimal). Optimal fields order: name, clk_names, path_names, gpc_name, num_clks, num_paths, rst_mask, clk_mask, mipi_phy_rst_mask, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct imx8m_blk_ctrl_domain_data {" So reordering the fields. Reported-by: kernel test robot Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 62669328294a337a5a3cb878e098b5d27295e098 Author: Sebastian Krzyszkowiak Date: Thu Mar 9 21:46:08 2023 +0100 arm64: dts: imx8mq-librem5: Add 166MHz to DDRC OPP table This is the lowest frequency supported by older iMX8MQ SoC revisions. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit ea06362f80a11a738e8e11309923fb755471a7ae Author: Sebastian Krzyszkowiak Date: Thu Mar 9 21:46:07 2023 +0100 arm64: dts: imx8mq-librem5: Reduce I2C frequency to 384kHz According to imx8mq errata (ERR007805): > To meet the clock low period requirement in fast speed mode, > SCL must be configured to 384KHz or less. Note that the imx i2c driver already implements this erratum and works around it. This is only for the description to reflect reality. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit 94b91e3ca6688fafd6a5dd70bd89fe9d3aee88da Author: Sebastian Krzyszkowiak Date: Thu Mar 9 21:46:06 2023 +0100 arm64: dts: imx8mq-librem5: Bump BUCK1 suspend voltage to 0.81V 0.8V is outside of the operating voltage specified for imx8mq, see chapter 3.1.4 "Operating ranges" of the IMX8MDQLQCEC document. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit cfe9de291bd2bbce18c5cd79e1dd582cbbacdb4f Author: Sebastian Krzyszkowiak Date: Thu Mar 9 21:46:05 2023 +0100 arm64: dts: imx8mq-librem5: Remove dis_u3_susphy_quirk from usb_dwc3_0 This reduces power consumption in system suspend by about 10%. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit e0faf4c53c23b03d03ed8ad3eef76a39c587bb9e Author: Sebastian Krzyszkowiak Date: Thu Mar 9 21:46:04 2023 +0100 arm64: dts: imx8mq-librem5: Adjust proximity sensor's near levels Based on tests with my left ear (which appears to require lower levels than the right one), one Birch, one Dogwood and three Evergreens. It seems that the sensor reacts very weakly to hair, so let's make the thresholds rather generous to compensate. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit 536612ec0df77d521a359f3a186254cec3880c23 Author: Sebastian Krzyszkowiak Date: Thu Mar 9 21:46:03 2023 +0100 arm64: dts: imx8mq-librem5: Bump usdhc2 frequency to 100MHz RS9116 card already limits itself to 50MHz by being a high-speed card, while AP6275S can work at 100MHz just fine (technically it should work at 200MHz as well since it's a SDR104 card, but it doesn't appear to be the case in practice and further research will be needed to find out why). Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit a27f81d3d59350a196c3c7bfba4a9f45cbacc7ae Author: Angus Ainslie Date: Thu Mar 9 21:46:02 2023 +0100 arm64: dts: imx8mq-librem5: add the magnetometer mount matrix Userland needs the mount matrix to know the correct orientation of the part. Signed-off-by: Angus Ainslie Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit c24a9b698fb02cd0723fa8375abab07f94b97b10 Author: Sebastian Krzyszkowiak Date: Thu Mar 9 21:46:01 2023 +0100 arm64: dts: imx8mq-librem5: Set the DVS voltages lower They're still in the operating range according to i.MX 8M Quad datasheet. There's some headroom added over minimal values to account for voltage drop. Operational ranges (min - typ - max [selected]): - VDD_SOC (BUCK1): 0.81 - 0.9 - 0.99 [0.88] - VDD_ARM (BUCK2): 0.81 - 0.9 - 1.05 [0.84] (1000MHz) 0.90 - 1.0 - 1.05 [0.93] (1500MHz) - VDD_GPU (BUCK3): 0.81 - 0.9 - 1.05 [0.85] (800MHz) 0.90 - 1.0 - 1.05 [ -- ] (1000MHz) - VDD_VPU (BUCK4): 0.81 - 0.9 - 1.05 [ -- ] (550/500/588MHz) 0.90 - 1.0 - 1.05 [0.93] (660/600/800MHz) Idle power consumption doesn't appear to be influenced much, but a simple load test (`cat /dev/urandom | pigz - > /dev/null` combined with running Animatch) seems to show about 0.3W of difference. Care is advised, as there may be differences between each units in how low can they be undervolted - in my experience, reaching that point usually makes the phone fail to boot. In my case, it appears that my Birch phone can go down the most. This is a somewhat conservative set of values that I've seen working well on all my devices; I haven't tried very hard to optimize it, so more experiments are welcome. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit 41d208c4c8dd64c5cf0c8ec9879bacd97b0755d7 Author: Sebastian Krzyszkowiak Date: Thu Mar 9 21:46:00 2023 +0100 arm64: dts: imx8mq-librem5: Set charger parameters for each batch Correctly set regulation-voltage, termination-current and charge-current for the different librem 5 board revisions. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit 956fdfe744c9473c51b5270cbdfb087eed0c9717 Author: Martin Kepplinger Date: Thu Mar 9 21:45:59 2023 +0100 arm64: dts: imx8mq-librem5: add brightness levels to led-backlight Add brightness-levels and default-brightness-level properties to the librem5 board description that have been used for a long time. Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit 5d24b9017fe3e80f804d9a51925f2c7acf51fb72 Author: Sebastian Krzyszkowiak Date: Thu Mar 9 21:45:58 2023 +0100 arm64: dts: imx8mq-librem5: Describe MIC_2V4 regulator No functional change, but it describes the hardware better. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit 969fe9113531ee8d71796481b2ec0c01cfc9793f Author: Martin Kepplinger Date: Thu Mar 9 21:45:57 2023 +0100 arm64: dts: imx8mq-librem5: fix audio-1v8 regulator name Fix the regulator name for the audio-1v8 regulator. Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit 0a8381160244513203900f04c5f5bbd00a04ebb6 Author: Martin Kepplinger Date: Thu Mar 9 21:45:56 2023 +0100 arm64: dts: imx8mq-librem5: describe the clock for the csi sensors The CLKO2 clock is used for both camera CSI interfaces as the driving clock for the connected sensors. In order for it to be available, use this hog. We can't simply add it to 2 different sensor descriptions. Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit 92f87bcbb24aebe07b711b96c9e50031b97d4c98 Author: Martin Kepplinger Date: Thu Mar 9 21:45:55 2023 +0100 arm64: dts: imx8mq-librem5: lower the mipi csi 1 frequencies No frames are streamed when using the default frequencies. I'm not yet sure why the fastest ones don't work here but we've been using these frequencies successfully for a long time now. Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit f18ee501e233a2b830a0c84a2e780ab02d946c04 Author: Mark Brown Date: Fri Mar 24 22:58:42 2023 +0000 regmap: Support paging for buses with reg_read()/reg_write() We don't currently support paging for regmaps where the I/O happens through bus provided reg_read() and reg_write() operatons, we simply ignore the range since nothing is wired up properly. Wire things up. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230324-regmap-reg-read-write-page-v1-1-1fbc0dac67ae@kernel.org commit 2d38e8615a21e264042870f811247d5c52c27f4e Author: Mark Brown Date: Fri Mar 24 16:22:26 2023 +0000 regmap: Clarify error for unknown cache types The error message printed when we fail to locate the cache type the map requested says it can't find a compress type rather than a cache type, fix that. Since the compressed type is the only one currently compiled conditionally it's likely to be the missing type but that might not always be true and is still unclear. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230324-regcache-unknown-v1-1-80deecbf196b@kernel.org commit 2c89db8f8d1e544fd817d4c0dc508a00b78a8f7f Author: Mark Brown Date: Sat Mar 25 21:49:49 2023 +0000 regmap: Handle sparse caches in the default sync If there is no cache entry available we will get -ENOENT from the cache implementation, handle this gracefully and skip rather than treating it as an error. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230325-regcache-sparse-sync-v1-1-2a890239d061@kernel.org commit 88e378d400fa0544d51cf62037e7774d8a4b4379 Author: Michael Kelley Date: Wed Mar 8 18:40:02 2023 -0800 x86/ioremap: Add hypervisor callback for private MMIO mapping in coco VM Current code always maps MMIO devices as shared (decrypted) in a confidential computing VM. But Hyper-V guest VMs on AMD SEV-SNP with vTOM use a paravisor running in VMPL0 to emulate some devices, such as the IO-APIC and TPM. In such a case, the device must be accessed as private (encrypted) because the paravisor emulates the device at an address below vTOM, where all accesses are encrypted. Add a new hypervisor callback to determine if an MMIO address should be mapped private. The callback allows hypervisor-specific code to handle any quirks, the use of a paravisor, etc. in determining whether a mapping must be private. If the callback is not used by a hypervisor, default to returning "false", which is consistent with normal coco VM behavior. Use this callback as another special case to check for when doing ioremap(). Just checking the starting address is sufficient as an ioremap range must be all private or all shared. Also make the callback in early boot IO-APIC mapping code that uses the fixmap. [ bp: Touchups. ] Signed-off-by: Michael Kelley Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/1678329614-3482-2-git-send-email-mikelley@microsoft.com commit b07c8ef8c60a4714fad3d7c95a8e464ad83ca715 Author: Sumitra Sharma Date: Sat Mar 25 23:45:19 2023 -0700 staging: greybus: Inline pwm_chip_to_gb_pwm_chip() Convert 'pwm_chip_to_gb_pwm_chip' from a macro to a static inline function, to make the relevant types apparent in the definition and to benefit from the type checking performed by the compiler at call sites. Signed-off-by: Sumitra Sharma Link: https://lore.kernel.org/r/20230326064519.GA179449@sumitra.com Signed-off-by: Greg Kroah-Hartman commit 5f5a7d8d8bd461f515543040ad7d107cc405d30c Author: Nuno Gonçalves Date: Fri Mar 24 10:02:22 2023 +0000 xsk: allow remap of fill and/or completion rings The remap of fill and completion rings was frowned upon as they control the usage of UMEM which does not support concurrent use. At the same time this would disallow the remap of these rings into another process. A possible use case is that the user wants to transfer the socket/ UMEM ownership to another process (via SYS_pidfd_getfd) and so would need to also remap these rings. This will have no impact on current usages and just relaxes the remap limitation. Signed-off-by: Nuno Gonçalves Reviewed-by: Maciej Fijalkowski Acked-by: Magnus Karlsson Link: https://lore.kernel.org/r/20230324100222.13434-1-nunog@fr24.com Signed-off-by: Alexei Starovoitov commit 8cfee110711ed60bfdd39af0107ddef01d6b72c3 Author: Dave Thaler Date: Sun Mar 26 03:31:17 2023 +0000 bpf, docs: Add extended call instructions Add extended call instructions. Uses the term "program-local" for call by offset. And there are instructions for calling helper functions by "address" (the old way of using integer values), and for calling helper functions by BTF ID (for kfuncs). V1 -> V2: addressed comments from David Vernet V2 -> V3: make descriptions in table consistent with updated names V3 -> V4: addressed comments from Alexei V4 -> V5: fixed alignment Signed-off-by: Dave Thaler Acked-by: David Vernet Link: https://lore.kernel.org/r/20230326033117.1075-1-dthaler1968@googlemail.com Signed-off-by: Alexei Starovoitov commit 8d2759608c1f39fc2d60702bf0a7421be246d209 Merge: e99360762a9cb cbe9d93d58b16 Author: Alexei Starovoitov Date: Sat Mar 25 19:52:52 2023 -0700 Merge branch 'bpf: Use bpf_mem_cache_alloc/free in bpf_local_storage' Martin KaFai Lau says: ==================== From: Martin KaFai Lau This set is a continuation of the effort in using bpf_mem_cache_alloc/free in bpf_local_storage [1] Major change is only using bpf_mem_alloc for task and cgrp storage while sk and inode stay with kzalloc/kfree. The details is in patch 2. [1]: https://lore.kernel.org/bpf/20230308065936.1550103-1-martin.lau@linux.dev/ v3: - Only use bpf_mem_alloc for task and cgrp storage. - sk and inode storage stay with kzalloc/kfree. - Check NULL and add comments in bpf_mem_cache_raw_free() in patch 1. - Added test and benchmark for task storage. v2: - Added bpf_mem_cache_alloc_flags() and bpf_mem_cache_raw_free() to hide the internal data structure of the bpf allocator. - Fixed a typo bug in bpf_selem_free() - Simplified the test_local_storage test by directly using err returned from libbpf ==================== Signed-off-by: Alexei Starovoitov commit cbe9d93d58b16b5912498ea42b5173022fff7c04 Author: Martin KaFai Lau Date: Wed Mar 22 14:52:46 2023 -0700 selftests/bpf: Add bench for task storage creation This patch adds a task storage benchmark to the existing local-storage-create benchmark. For task storage, ./bench --storage-type task --batch-size 32: bpf_ma: Summary: creates 30.456 ± 0.507k/s ( 30.456k/prod), 6.08 kmallocs/create no bpf_ma: Summary: creates 31.962 ± 0.486k/s ( 31.962k/prod), 6.13 kmallocs/create ./bench --storage-type task --batch-size 64: bpf_ma: Summary: creates 30.197 ± 1.476k/s ( 30.197k/prod), 6.08 kmallocs/create no bpf_ma: Summary: creates 31.103 ± 0.297k/s ( 31.103k/prod), 6.13 kmallocs/create Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230322215246.1675516-6-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit d8db84d71c0e539f7ce902e2fe297e535ba4d46c Author: Martin KaFai Lau Date: Wed Mar 22 14:52:45 2023 -0700 selftests/bpf: Test task storage when local_storage->smap is NULL The current sk storage test ensures the memory free works when the local_storage->smap is NULL. This patch adds a task storage test to ensure the memory free code path works when local_storage->smap is NULL. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230322215246.1675516-5-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 6ae9d5e99e1dd26babdd9502759fa25a3fd348ad Author: Martin KaFai Lau Date: Wed Mar 22 14:52:44 2023 -0700 bpf: Use bpf_mem_cache_alloc/free for bpf_local_storage This patch uses bpf_mem_cache_alloc/free for allocating and freeing bpf_local_storage for task and cgroup storage. The changes are similar to the previous patch. A few things that worth to mention for bpf_local_storage: The local_storage is freed when the last selem is deleted. Before deleting a selem from local_storage, it needs to retrieve the local_storage->smap because the bpf_selem_unlink_storage_nolock() may have set it to NULL. Note that local_storage->smap may have already been NULL when the selem created this local_storage has been removed. In this case, call_rcu will be used to free the local_storage. Also, the bpf_ma (true or false) value is needed before calling bpf_local_storage_free(). The bpf_ma can either be obtained from the local_storage->smap (if available) or any of its selem's smap. A new helper check_storage_bpf_ma() is added to obtain bpf_ma for a deleting bpf_local_storage. When bpf_local_storage_alloc getting a reused memory, all fields are either in the correct values or will be initialized. 'cache[]' must already be all NULLs. 'list' must be empty. Others will be initialized. Cc: Namhyung Kim Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230322215246.1675516-4-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 08a7ce384e33e53e0732c500a8af67a73f8fceca Author: Martin KaFai Lau Date: Wed Mar 22 14:52:43 2023 -0700 bpf: Use bpf_mem_cache_alloc/free in bpf_local_storage_elem This patch uses bpf_mem_alloc for the task and cgroup local storage that the bpf prog can easily get a hold of the storage owner's PTR_TO_BTF_ID. eg. bpf_get_current_task_btf() can be used in some of the kmalloc code path which will cause deadlock/recursion. bpf_mem_cache_alloc is deadlock free and will solve a legit use case in [1]. For sk storage, its batch creation benchmark shows a few percent regression when the sk create/destroy batch size is larger than 32. The sk creation/destruction happens much more often and depends on external traffic. Considering it is hypothetical to be able to cause deadlock with sk storage, it can cross the bridge to use bpf_mem_alloc till a legit (ie. useful) use case comes up. For inode storage, bpf_local_storage_destroy() is called before waiting for a rcu gp and its memory cannot be reused immediately. inode stays with kmalloc/kfree after the rcu [or tasks_trace] gp. A 'bool bpf_ma' argument is added to bpf_local_storage_map_alloc(). Only task and cgroup storage have 'bpf_ma == true' which means to use bpf_mem_cache_alloc/free(). This patch only changes selem to use bpf_mem_alloc for task and cgroup. The next patch will change the local_storage to use bpf_mem_alloc also for task and cgroup. Here is some more details on the changes: * memory allocation: After bpf_mem_cache_alloc(), the SDATA(selem)->data is zero-ed because bpf_mem_cache_alloc() could return a reused selem. It is to keep the existing bpf_map_kzalloc() behavior. Only SDATA(selem)->data is zero-ed. SDATA(selem)->data is the visible part to the bpf prog. No need to use zero_map_value() to do the zeroing because bpf_selem_free(..., reuse_now = true) ensures no bpf prog is using the selem before returning the selem through bpf_mem_cache_free(). For the internal fields of selem, they will be initialized when linking to the new smap and the new local_storage. When 'bpf_ma == false', nothing changes in this patch. It will stay with the bpf_map_kzalloc(). * memory free: The bpf_selem_free() and bpf_selem_free_rcu() are modified to handle the bpf_ma == true case. For the common selem free path where its owner is also being destroyed, the mem is freed in bpf_local_storage_destroy(), the owner (task and cgroup) has gone through a rcu gp. The memory can be reused immediately, so bpf_local_storage_destroy() will call bpf_selem_free(..., reuse_now = true) which will do bpf_mem_cache_free() for immediate reuse consideration. An exception is the delete elem code path. The delete elem code path is called from the helper bpf_*_storage_delete() and the syscall bpf_map_delete_elem(). This path is an unusual case for local storage because the common use case is to have the local storage staying with its owner life time so that the bpf prog and the user space does not have to monitor the owner's destruction. For the delete elem path, the selem cannot be reused immediately because there could be bpf prog using it. It will call bpf_selem_free(..., reuse_now = false) and it will wait for a rcu tasks trace gp before freeing the elem. The rcu callback is changed to do bpf_mem_cache_raw_free() instead of kfree(). When 'bpf_ma == false', it should be the same as before. __bpf_selem_free() is added to do the kfree_rcu and call_tasks_trace_rcu(). A few words on the 'reuse_now == true'. When 'reuse_now == true', it is still racing with bpf_local_storage_map_free which is under rcu protection, so it still needs to wait for a rcu gp instead of kfree(). Otherwise, the selem may be reused by slab for a totally different struct while the bpf_local_storage_map_free() is still using it (as a rcu reader). For the inode case, there may be other rcu readers also. In short, when bpf_ma == false and reuse_now == true => vanilla rcu. [1]: https://lore.kernel.org/bpf/20221118190109.1512674-1-namhyung@kernel.org/ Cc: Namhyung Kim Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230322215246.1675516-3-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit e65a5c6edbc6ca4853e6076bd81db1a410592a09 Author: Martin KaFai Lau Date: Wed Mar 22 14:52:42 2023 -0700 bpf: Add a few bpf mem allocator functions This patch adds a few bpf mem allocator functions which will be used in the bpf_local_storage in a later patch. bpf_mem_cache_alloc_flags(..., gfp_t flags) is added. When the flags == GFP_KERNEL, it will fallback to __alloc(..., GFP_KERNEL). bpf_local_storage knows its running context is sleepable (GFP_KERNEL) and provides a better guarantee on memory allocation. bpf_local_storage has some uncommon cases that its selem cannot be reused immediately. It handles its own rcu_head and goes through a rcu_trace gp and then free it. bpf_mem_cache_raw_free() is added for direct free purpose without leaking the LLIST_NODE_SZ internal knowledge. During free time, the 'struct bpf_mem_alloc *ma' is no longer available. However, the caller should know if it is percpu memory or not and it can call different raw_free functions. bpf_local_storage does not support percpu value, so only the non-percpu 'bpf_mem_cache_raw_free()' is added in this patch. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230322215246.1675516-2-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit e99360762a9cbd93bf1d352e90df5df78daa2f90 Merge: 496f4f1b0f8e0 ffb515c933a9e Author: Alexei Starovoitov Date: Sat Mar 25 17:02:06 2023 -0700 Merge branch 'First set of verifier/*.c migrated to inline assembly' Eduard Zingerman says: ==================== This is a follow up for RFC [1]. It migrates a first batch of 38 verifier/*.c tests to inline assembly and use of ./test_progs for actual execution. The migration is done by a python script (see [2]). Each migrated verifier/xxx.c file is mapped to progs/verifier_xxx.c plus an entry in the prog_tests/verifier.c. One patch per each file. A few patches at the beginning of the patch-set extend test_loader with necessary functionality, mainly: - support for tests execution in unprivileged mode; - support for test runs for test programs. Migrated tests could be selected for execution using the following filter: ./test_progs -a verifier_* An example of the migrated test: SEC("xdp") __description("XDP pkt read, pkt_data' > pkt_end, corner case, good access") __success __retval(0) __flag(BPF_F_ANY_ALIGNMENT) __naked void end_corner_case_good_access_1(void) { asm volatile (" \ r2 = *(u32*)(r1 + %[xdp_md_data]); \ r3 = *(u32*)(r1 + %[xdp_md_data_end]); \ r1 = r2; \ r1 += 8; \ if r1 > r3 goto l0_%=; \ r0 = *(u64*)(r1 - 8); \ l0_%=: r0 = 0; \ exit; \ " : : __imm_const(xdp_md_data, offsetof(struct xdp_md, data)), __imm_const(xdp_md_data_end, offsetof(struct xdp_md, data_end)) : __clobber_all); } Changes compared to RFC: - test_loader.c is extended to support test program runs; - capabilities handling now matches behavior of test_verifier; - BPF_ST_MEM instructions are automatically replaced by BPF_STX_MEM instructions to overcome current clang limitations; - tests styling updates according to RFC feedback; - 38 migrated files are included instead of 1. I used the following means for testing: - migration tool itself has a set of self-tests; - migrated tests are passing; - manually compared each old/new file side-by-side. While doing side-by-side comparison I've noted a few defects in the original tests: - and.c: - One of the jump targets is off by one; - BPF_ST_MEM wrong OFF/IMM ordering; - array_access.c: - BPF_ST_MEM wrong OFF/IMM ordering; - value_or_null.c: - BPF_ST_MEM wrong OFF/IMM ordering. These defects would be addressed separately. [1] RFC https://lore.kernel.org/bpf/20230123145148.2791939-1-eddyz87@gmail.com/ [2] Migration tool https://github.com/eddyz87/verifier-tests-migrator ==================== Signed-off-by: Alexei Starovoitov commit ffb515c933a9e8000e50b03f76569ffb6ef4d39d Author: Eduard Zingerman Date: Sat Mar 25 04:55:23 2023 +0200 selftests/bpf: verifier/xdp.c converted to inline assembly Test verifier/xdp.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-43-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit a8036aea2d4f412c98a5fdbc0c987fa8a3c023ed Author: Eduard Zingerman Date: Sat Mar 25 04:55:22 2023 +0200 selftests/bpf: verifier/xadd.c converted to inline assembly Test verifier/xadd.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-42-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit d15f5b68b63ad7f47e05aba33c4794fb3bfaf1af Author: Eduard Zingerman Date: Sat Mar 25 04:55:21 2023 +0200 selftests/bpf: verifier/var_off.c converted to inline assembly Test verifier/var_off.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-41-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit d330528617b78ae893c405bf06c6c604bd2e6357 Author: Eduard Zingerman Date: Sat Mar 25 04:55:20 2023 +0200 selftests/bpf: verifier/value_or_null.c converted to inline assembly Test verifier/value_or_null.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-40-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 8f59e87a3bc6a5618f0ed459f1d36838c16bcad7 Author: Eduard Zingerman Date: Sat Mar 25 04:55:19 2023 +0200 selftests/bpf: verifier/value.c converted to inline assembly Test verifier/value.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-39-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 033914942da4696dcd9009ba88bc1bba06706549 Author: Eduard Zingerman Date: Sat Mar 25 04:55:18 2023 +0200 selftests/bpf: verifier/value_adj_spill.c converted to inline assembly Test verifier/value_adj_spill.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-38-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit ab839a58194633bd1c5ff42e6a9de87a746a67aa Author: Eduard Zingerman Date: Sat Mar 25 04:55:17 2023 +0200 selftests/bpf: verifier/uninit.c converted to inline assembly Test verifier/uninit.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-37-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit edff37b2f28f5c24f628981d0f26ca2fcd7e2ad5 Author: Eduard Zingerman Date: Sat Mar 25 04:55:16 2023 +0200 selftests/bpf: verifier/stack_ptr.c converted to inline assembly Test verifier/stack_ptr.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-36-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit f4fe3cfe6c3ac60a6ec086a291b1c0f59e7daaa2 Author: Eduard Zingerman Date: Sat Mar 25 04:55:15 2023 +0200 selftests/bpf: verifier/spill_fill.c converted to inline assembly Test verifier/spill_fill.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-35-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit b7e4203086eb4d85aa7bccd7f33c2835b34778d6 Author: Eduard Zingerman Date: Sat Mar 25 04:55:14 2023 +0200 selftests/bpf: verifier/ringbuf.c converted to inline assembly Test verifier/ringbuf.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-34-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 18cdc2b531fbe13450c51132a5b511c670c77585 Author: Eduard Zingerman Date: Sat Mar 25 04:55:13 2023 +0200 selftests/bpf: verifier/raw_tp_writable.c converted to inline assembly Test verifier/raw_tp_writable.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-33-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 5a77a01f3320562db51dfdd24b2921768637daf2 Author: Eduard Zingerman Date: Sat Mar 25 04:55:12 2023 +0200 selftests/bpf: verifier/raw_stack.c converted to inline assembly Test verifier/raw_stack.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-32-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 65428312e38d896ce101ee3489403cff320d9b74 Author: Eduard Zingerman Date: Sat Mar 25 04:55:11 2023 +0200 selftests/bpf: verifier/meta_access.c converted to inline assembly Test verifier/meta_access.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-31-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit ade3f08fc236ce8a5f00c1ffaf85ba42aa18ded4 Author: Eduard Zingerman Date: Sat Mar 25 04:55:10 2023 +0200 selftests/bpf: verifier/masking.c converted to inline assembly Test verifier/masking.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-30-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 05e474ecbb56a5fadea6b36b7aa7d8d237aea064 Author: Eduard Zingerman Date: Sat Mar 25 04:55:09 2023 +0200 selftests/bpf: verifier/map_ret_val.c converted to inline assembly Test verifier/map_ret_val.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-29-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit caf345cf12073eb5905b03c3c5f905cc0964dc6c Author: Eduard Zingerman Date: Sat Mar 25 04:55:08 2023 +0200 selftests/bpf: verifier/map_ptr.c converted to inline assembly Test verifier/map_ptr.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-28-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 583c7ce5be093277ef1691f35d9bec5ef9934e24 Author: Eduard Zingerman Date: Sat Mar 25 04:55:07 2023 +0200 selftests/bpf: verifier/leak_ptr.c converted to inline assembly Test verifier/leak_ptr.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-27-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit e297875580662f2fdcde1cba4ea28bf70ea2ca49 Author: Eduard Zingerman Date: Sat Mar 25 04:55:06 2023 +0200 selftests/bpf: verifier/ld_ind.c converted to inline assembly Test verifier/ld_ind.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-26-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 01481e67dd4d1c2c62eb6a506a5f4803ee50f8a6 Author: Eduard Zingerman Date: Sat Mar 25 04:55:05 2023 +0200 selftests/bpf: verifier/int_ptr.c converted to inline assembly Test verifier/int_ptr.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-25-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit ecc424827b775860119f5a5e2c521d7485bcc74f Author: Eduard Zingerman Date: Sat Mar 25 04:55:04 2023 +0200 selftests/bpf: verifier/helper_value_access.c converted to inline assembly Test verifier/helper_value_access.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-24-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 77aa2563cb44a6241990cf4f082b55ee6f0a0623 Author: Eduard Zingerman Date: Sat Mar 25 04:55:03 2023 +0200 selftests/bpf: verifier/helper_restricted.c converted to inline assembly Test verifier/helper_restricted.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-23-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit fb179fe69e6a7bf66232d72a77f53ec10c026ee7 Author: Eduard Zingerman Date: Sat Mar 25 04:55:02 2023 +0200 selftests/bpf: verifier/helper_packet_access.c converted to inline assembly Test verifier/helper_packet_access.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-22-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit b37d776b431ec056075feeeaddcdee4512c522f6 Author: Eduard Zingerman Date: Sat Mar 25 04:55:01 2023 +0200 selftests/bpf: verifier/helper_access_var_len.c converted to inline assembly Test verifier/helper_access_var_len.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-21-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 9553de70a8412a07b16703449b4b4c4e5d37c388 Author: Eduard Zingerman Date: Sat Mar 25 04:55:00 2023 +0200 selftests/bpf: verifier/div_overflow.c converted to inline assembly Test verifier/div_overflow.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-20-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 01a0925531a4ec962c88ceccb464c1c1178e9d81 Author: Eduard Zingerman Date: Sat Mar 25 04:54:59 2023 +0200 selftests/bpf: verifier/div0.c converted to inline assembly Test verifier/div0.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-19-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 84988478fb2c9068c6adf107eb630c48c00ff690 Author: Eduard Zingerman Date: Sat Mar 25 04:54:58 2023 +0200 selftests/bpf: verifier/direct_stack_access_wraparound.c converted to inline assembly Test verifier/direct_stack_access_wraparound.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-18-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit a58475a98903c756a7f731cffdf20242ed17b9b0 Author: Eduard Zingerman Date: Sat Mar 25 04:54:57 2023 +0200 selftests/bpf: verifier/ctx_sk_msg.c converted to inline assembly Test verifier/ctx_sk_msg.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-17-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit a2777eaad5d9b7b06917d5bd3e786a1733e9dc3c Author: Eduard Zingerman Date: Sat Mar 25 04:54:56 2023 +0200 selftests/bpf: verifier/const_or.c converted to inline assembly Test verifier/const_or.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-16-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 8f16f3c07e460f81ff6f4d673c7edd413db19ffe Author: Eduard Zingerman Date: Sat Mar 25 04:54:55 2023 +0200 selftests/bpf: verifier/cgroup_storage.c converted to inline assembly Test verifier/cgroup_storage.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-15-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit b1b6372535c0cc0cce4870b07a0938309f3a5d37 Author: Eduard Zingerman Date: Sat Mar 25 04:54:54 2023 +0200 selftests/bpf: verifier/cgroup_skb.c converted to inline assembly Test verifier/cgroup_skb.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-14-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 047687a7f494d45198f112b51e72228aa054732c Author: Eduard Zingerman Date: Sat Mar 25 04:54:53 2023 +0200 selftests/bpf: verifier/cgroup_inv_retcode.c converted to inline assembly Test verifier/cgroup_inv_retcode.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-13-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 2f2047c22cda4fbbe6bb889cc6c5450cd90688f8 Author: Eduard Zingerman Date: Sat Mar 25 04:54:52 2023 +0200 selftests/bpf: verifier/cfg.c converted to inline assembly Test verifier/cfg.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-12-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit b14a702afd0d2da746294ed6070668b839a77793 Author: Eduard Zingerman Date: Sat Mar 25 04:54:51 2023 +0200 selftests/bpf: verifier/bounds_mix_sign_unsign.c converted to inline assembly Test verifier/bounds_mix_sign_unsign.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-11-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 7605f94b3492328f37815c9b5749ffba5c76da84 Author: Eduard Zingerman Date: Sat Mar 25 04:54:50 2023 +0200 selftests/bpf: verifier/bounds_deduction.c converted to inline assembly Test verifier/bounds_deduction.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-10-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 0ccbe4956d6c20fa0a09a72d2033c49f0976ed6c Author: Eduard Zingerman Date: Sat Mar 25 04:54:49 2023 +0200 selftests/bpf: verifier/basic_stack.c converted to inline assembly Test verifier/basic_stack.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-9-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit a3c830ae02093315a4526fa74fb7d1f66989d895 Author: Eduard Zingerman Date: Sat Mar 25 04:54:48 2023 +0200 selftests/bpf: verifier/array_access.c converted to inline assembly Test verifier/array_access.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-8-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 9d0f1568ad5ba29feddc0897e2ccc7d6de6713c8 Author: Eduard Zingerman Date: Sat Mar 25 04:54:47 2023 +0200 selftests/bpf: verifier/and.c converted to inline assembly Test verifier/and.c automatically converted to use inline assembly. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-7-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 55108621a35e42f773de5d4b20cf7a14d6d53503 Author: Eduard Zingerman Date: Sat Mar 25 04:54:46 2023 +0200 selftests/bpf: prog_tests entry point for migrated test_verifier tests prog_tests/verifier.c would be used as a host for verifier/*.c tests migrated to use inline assembly and run from test_progs. The run_test_aux() function mimics the test_verifier behavior dropping CAP_SYS_ADMIN upon entry. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-6-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 19a8e06f5f9155caf1a5577a0f7969eee13d0cbb Author: Eduard Zingerman Date: Sat Mar 25 04:54:45 2023 +0200 selftests/bpf: Tests execution support for test_loader.c Extends test_loader.c:test_loader__run_subtests() by allowing to execute BPF_PROG_TEST_RUN bpf command for selected programs. This is similar to functionality provided by test_verifier. Adds the following new attributes controlling test_loader behavior: __retval(...) __retval_unpriv(...) * If any of these attributes is present, the annotated program would be executed using libbpf's bpf_prog_test_run_opts() function. * If __retval is present, the test run would be done for program loaded in privileged mode. * If __retval_unpriv is present, the test run would be done for program loaded in unprivileged mode. * To mimic test_verifier behavior, the actual run is initiated in privileged mode. * The value returned by a test run is compared against retval parameter. The retval attribute takes one of the following parameters: - a decimal number - a hexadecimal number (must start from '0x') - any of a three special literals (provided for compatibility with test_verifier): - INT_MIN - POINTER_VALUE - TEST_DATA_LEN An example of the attribute usage: SEC("socket") __description("return 42") __success __success_unpriv __retval(42) __naked void the_42_test(void) { asm volatile (" \ r0 = 42; \ exit; \ " ::: __clobber_all); } Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-5-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 1d56ade032a49b2042f43b3f6bdf116928064267 Author: Eduard Zingerman Date: Sat Mar 25 04:54:44 2023 +0200 selftests/bpf: Unprivileged tests for test_loader.c Extends test_loader.c:test_loader__run_subtests() by allowing to execute tests in unprivileged mode, similar to test_verifier.c. Adds the following new attributes controlling test_loader behavior: __msg_unpriv __success_unpriv __failure_unpriv * If any of these attributes is present the test would be loaded in unprivileged mode. * If only "privileged" attributes are present the test would be loaded only in privileged mode. * If both "privileged" and "unprivileged" attributes are present the test would be loaded in both modes. * If test has to be executed in both modes, __msg(text) is specified and __msg_unpriv is not specified the behavior is the same as if __msg_unpriv(text) is specified. * For test filtering purposes the name of the program loaded in unprivileged mode is derived from the usual program name by adding `@unpriv' suffix. Also adds attribute '__description'. This attribute specifies text to be used instead of a program name for display and filtering purposes. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-4-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 207b1ba3019100d862931e97b49f76ff1e0a89f2 Author: Eduard Zingerman Date: Sat Mar 25 04:54:43 2023 +0200 selftests/bpf: __imm_insn & __imm_const macro for bpf_misc.h Add two convenience macro for BPF test cases, allowing the following usage: #include ... asm volatile ( ... ".8byte %[raw_insn];" ... "r1 += %[st_foo_offset];" ... : : __imm_insn(raw_insn, BPF_RAW_INSN(...)), __imm_const(st_foo_offset, offsetof(struct st, foo)) : __clobber_all); Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-3-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 3e5329e193f463e6aaf98c33f7cb1308160880ab Author: Eduard Zingerman Date: Sat Mar 25 04:54:42 2023 +0200 selftests/bpf: Report program name on parse_test_spec error Change test_loader.c:run_subtest() behavior to show BPF program name when test spec for that program can't be parsed. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230325025524.144043-2-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 496f4f1b0f8e01baea22e6573f60af8cfd84df48 Merge: 55fbae05476df 6c831c4684124 Author: Alexei Starovoitov Date: Sat Mar 25 16:56:22 2023 -0700 Merge branch 'Don't invoke KPTR_REF destructor on NULL xchg' David Vernet says: ==================== When a map value is being freed, we loop over all of the fields of the corresponding BPF object and issue the appropriate cleanup calls corresponding to the field's type. If the field is a referenced kptr, we atomically xchg the value out of the map, and invoke the kptr's destructor on whatever was there before. Currently, we always invoke the destructor (or bpf_obj_drop() for a local kptr) on any kptr, including if no value was xchg'd out of the map. This means that any function serving as the kptr's KF_RELEASE destructor must always treat the argument as possibly NULL, and we invoke unnecessary (and seemingly unsafe) cleanup logic for the local kptr path as well. This is an odd requirement -- KF_RELEASE kfuncs that are invoked by BPF programs do not have this restriction, and the verifier will fail to load the program if the register containing the to-be-released type has any untrusted modifiers (e.g. PTR_UNTRUSTED or PTR_MAYBE_NULL). So as to simplify the expectations required for a KF_RELEASE kfunc, this patch set updates the KPTR_REF destructor logic to only be invoked when a non-NULL value is xchg'd out of the map. Additionally, the patch removes now-unnecessary KF_RELEASE calls from several kfuncs, and finally, updates the verifier to have KF_RELEASE automatically imply KF_TRUSTED_ARGS. This restriction was already implicitly happening because of the aforementioned logic in the verifier to reject any regs with untrusted modifiers, and to enforce that KF_RELEASE args are passed with a 0 offset. This change just updates the behavior to match that of other trusted args. This patch is left to the end of the series in case it happens to be controversial, as it arguably is slightly orthogonal to the purpose of the rest of the series. ==================== Signed-off-by: Alexei Starovoitov commit 6c831c4684124a544f73f7c9b83bc7b2eb0b23d3 Author: David Vernet Date: Sat Mar 25 16:31:46 2023 -0500 bpf: Treat KF_RELEASE kfuncs as KF_TRUSTED_ARGS KF_RELEASE kfuncs are not currently treated as having KF_TRUSTED_ARGS, even though they have a superset of the requirements of KF_TRUSTED_ARGS. Like KF_TRUSTED_ARGS, KF_RELEASE kfuncs require a 0-offset argument, and don't allow NULL-able arguments. Unlike KF_TRUSTED_ARGS which require _either_ an argument with ref_obj_id > 0, _or_ (ref->type & BPF_REG_TRUSTED_MODIFIERS) (and no unsafe modifiers allowed), KF_RELEASE only allows for ref_obj_id > 0. Because KF_RELEASE today doesn't automatically imply KF_TRUSTED_ARGS, some of these requirements are enforced in different ways that can make the behavior of the verifier feel unpredictable. For example, a KF_RELEASE kfunc with a NULL-able argument will currently fail in the verifier with a message like, "arg#0 is ptr_or_null_ expected ptr_ or socket" rather than "Possibly NULL pointer passed to trusted arg0". Our intention is the same, but the semantics are different due to implemenetation details that kfunc authors and BPF program writers should not need to care about. Let's make the behavior of the verifier more consistent and intuitive by having KF_RELEASE kfuncs imply the presence of KF_TRUSTED_ARGS. Our eventual goal is to have all kfuncs assume KF_TRUSTED_ARGS by default anyways, so this takes us a step in that direction. Note that it does not make sense to assume KF_TRUSTED_ARGS for all KF_ACQUIRE kfuncs. KF_ACQUIRE kfuncs can have looser semantics than KF_RELEASE, with e.g. KF_RCU | KF_RET_NULL. We may want to have KF_ACQUIRE imply KF_TRUSTED_ARGS _unless_ KF_RCU is specified, but that can be left to another patch set, and there are no such subtleties to address for KF_RELEASE. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230325213144.486885-4-void@manifault.com Signed-off-by: Alexei Starovoitov commit fb2211a57c110b4ced3cb7f8570bd7246acf2d04 Author: David Vernet Date: Sat Mar 25 16:31:45 2023 -0500 bpf: Remove now-unnecessary NULL checks for KF_RELEASE kfuncs Now that we're not invoking kfunc destructors when the kptr in a map was NULL, we no longer require NULL checks in many of our KF_RELEASE kfuncs. This patch removes those NULL checks. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230325213144.486885-3-void@manifault.com Signed-off-by: Alexei Starovoitov commit 1431d0b584a673ea690c88a5f7e1aedd9caf0e84 Author: David Vernet Date: Sat Mar 25 16:31:42 2023 -0500 bpf: Only invoke kptr dtor following non-NULL xchg When a map value is being freed, we loop over all of the fields of the corresponding BPF object and issue the appropriate cleanup calls corresponding to the field's type. If the field is a referenced kptr, we atomically xchg the value out of the map, and invoke the kptr's destructor on whatever was there before (or bpf_obj_drop() it if it was a local kptr). Currently, we always invoke the destructor (either bpf_obj_drop() or the kptr's registered destructor) on any KPTR_REF-type field in a map, even if there wasn't a value in the map. This means that any function serving as the kptr's KF_RELEASE destructor must always treat the argument as possibly NULL, as the following can and regularly does happen: void *xchgd_field; /* No value was in the map, so xchgd_field is NULL */ xchgd_field = (void *)xchg(unsigned long *field_ptr, 0); field->kptr.dtor(xchgd_field); These are odd semantics to impose on KF_RELEASE kfuncs -- BPF programs are prohibited by the verifier from passing NULL pointers to KF_RELEASE kfuncs, so it doesn't make sense to require this of BPF programs, but not the main kernel destructor path. It's also unnecessary to invoke any cleanup logic for local kptrs. If there is no object there, there's nothing to drop. So as to allow KF_RELEASE kfuncs to fully assume that an argument is non-NULL, this patch updates a KPTR_REF's destructor to only be invoked when a non-NULL value is xchg'd out of the kptr map field. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230325213144.486885-2-void@manifault.com Signed-off-by: Alexei Starovoitov commit 8559da8fdfe57f293ff200ac145dabc3e9de849c Author: Rob Clark Date: Mon Mar 20 07:43:36 2023 -0700 drm/msm/a6xx: Move ioremap out of hw_init path Move the one-time RPMh setup to a6xx_gmu_init(). To get rid of the hack for one-time init vs start, add in an extra a6xx_rpmh_stop() at the end of the init sequence. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/527854/ Link: https://lore.kernel.org/r/20230320144356.803762-15-robdclark@gmail.com commit 8ead9678316376ee1dd05ffddfa6a620047b1d4f Author: Rob Clark Date: Mon Mar 20 07:43:35 2023 -0700 drm/msm/gpu: Move BO allocation out of hw_init These allocations are only done the first (successful) time through hw_init() so they won't actually happen in the job_run() path. But lockdep doesn't know this. So dis-entangle them from the hw_init() path. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/527852/ Link: https://lore.kernel.org/r/20230320144356.803762-14-robdclark@gmail.com commit 624831b3fa3b4f7bbcf526d1b8a125add432d04f Author: Rob Clark Date: Mon Mar 20 07:43:34 2023 -0700 drm/msm/gpu: Move fw loading out of hw_init() path It is already a no-op, since we've already loaded the fw from adreno_load_gpu(), so drop the redundant call. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/527849/ Link: https://lore.kernel.org/r/20230320144356.803762-13-robdclark@gmail.com commit 44c200876a45429473ff683bd491ccf3a73eb915 Author: Rob Clark Date: Mon Mar 20 07:43:33 2023 -0700 drm/msm: Use idr_preload() Avoid allocation under idr_lock, to prevent deadlock against the job_free() path (which runs on same thread as job_run(), which makes it also part of the fence-signaling path. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/527847/ Link: https://lore.kernel.org/r/20230320144356.803762-12-robdclark@gmail.com commit e4f020c6a05db73eac49b7c3b3650251be374200 Author: Rob Clark Date: Mon Mar 20 07:43:32 2023 -0700 drm/msm: Switch idr_lock to spinlock Needed to idr_preload() which returns with preemption disabled. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/527846/ Link: https://lore.kernel.org/r/20230320144356.803762-11-robdclark@gmail.com commit 17b704f1c0fb9150551567cb7a5414fb761b57ea Author: Rob Clark Date: Mon Mar 20 07:43:31 2023 -0700 drm/msm/gem: Avoid obj lock in job_run() Now that everything that controls which LRU an obj lives in *except* the backing pages is protected by the LRU lock, add a special path to unpin in the job_run() path, where we are assured that we already have backing pages and will not be racing against eviction (because the GEM object's dma_resv contains the fence that will be signaled when the submit/job completes). Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/527845/ Link: https://lore.kernel.org/r/20230320144356.803762-10-robdclark@gmail.com commit 6c7c8fb863f7c3137ce5fc4b435af3891083abeb Author: Rob Clark Date: Mon Mar 20 07:43:30 2023 -0700 drm/msm/gem: Protect pin_count/madv by LRU lock Since the LRU lock is already acquired when moving an obj between LRUs, we can use it to protect pin_count and madv, without any significant change in locking (ie. it just expands the scope of the lock by a hand- ful of instructions). This prepares the way to decrement the pin_count in the job_run() path without needing to hold the obj lock, to avoid a potential deadlock (or rather stall) caused by the fence-signaling path (job_run()) blocking on shrinker/reclaim. (Only a stall because the wait for fence signaling wait_for_idle() is not infinite.) Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/527843/ Link: https://lore.kernel.org/r/20230320144356.803762-9-robdclark@gmail.com commit 4a02a376cbc839b89bbd1109f98b461e26337236 Author: Rob Clark Date: Mon Mar 20 07:43:29 2023 -0700 drm/msm/gem: Move update_lru() Just code-motion. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/527841/ Link: https://lore.kernel.org/r/20230320144356.803762-8-robdclark@gmail.com commit b43f9afb81262d6c150152e2831a000b3c1b5d11 Author: Rob Clark Date: Mon Mar 20 07:43:28 2023 -0700 drm/gem: Export drm_gem_lru_move_tail_locked() Export the locked version or lru's move_tail(). Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/527835/ Link: https://lore.kernel.org/r/20230320144356.803762-7-robdclark@gmail.com commit d6ae7d1cd58e2c606af005f4606310633ff4859e Author: Rob Clark Date: Mon Mar 20 07:43:27 2023 -0700 drm/msm/gem: Simplify vmap vs LRU tracking vmap'ing is just pinning in disguise. So treat it as such and simplify the LRU tracking. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/527837/ Link: https://lore.kernel.org/r/20230320144356.803762-6-robdclark@gmail.com commit b14b8c5f0eaf363e33c5410c96a6259dee6bd78e Author: Rob Clark Date: Mon Mar 20 07:43:26 2023 -0700 drm/msm: Decouple vma tracking from obj lock We need to use the inuse count to track that a BO is pinned until we have the hw_fence. But we want to remove the obj lock from the job_run() path as this could deadlock against reclaim/shrinker (because it is blocking the hw_fence from eventually being signaled). So split that tracking out into a per-vma lock with narrower scope. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/527839/ Link: https://lore.kernel.org/r/20230320144356.803762-5-robdclark@gmail.com commit fc2f07566a2cb198eb5902684163e7c4f5309619 Author: Rob Clark Date: Mon Mar 20 07:43:25 2023 -0700 drm/msm/gem: Tidy up VMA API Stop open coding VMA construction, which will be needed in the next commit. And since the VMA already has a ptr to the adress space, stop passing that around everywhere. (Also, an aspace always has an mmu so we can drop a couple pointless NULL checks.) Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/527833/ Link: https://lore.kernel.org/r/20230320144356.803762-4-robdclark@gmail.com commit 769fec1e4f918d840b1917eb2a371b6b94fb1984 Author: Rob Clark Date: Mon Mar 20 07:43:24 2023 -0700 drm/msm: Move submit bo flags update from obj lock The flags are only accessed (1) when submit is constructed, before enqueuing to gpu sched (ie. when still visible to only the task calling the submit ioctl), (2) here, where we own a reference to the submit and are serialized on the gpu sched thread, and (3) after the submit is retired and last reference is dropped, which is serialized on the submit's reference count. Hence locking is unneeded here. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/527830/ Link: https://lore.kernel.org/r/20230320144356.803762-3-robdclark@gmail.com commit f94e6a51e17ccff8e005be208e723ca265c8b881 Author: Rob Clark Date: Mon Mar 20 07:43:23 2023 -0700 drm/msm: Pre-allocate hw_fence Avoid allocating memory in job_run() by pre-allocating the hw_fence. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/527832/ Link: https://lore.kernel.org/r/20230320144356.803762-2-robdclark@gmail.com commit 40f43730f43699ce8557e4fe59622d4f4b69f44a Author: Dan Carpenter Date: Mon Feb 27 13:06:59 2023 +0300 drm: rcar-du: Fix a NULL vs IS_ERR() bug The drmm_encoder_alloc() function returns error pointers. It never returns NULL. Fix the check accordingly. Fixes: 7a1adbd23990 ("drm: rcar-du: Use drmm_encoder_alloc() to manage encoder") Signed-off-by: Dan Carpenter Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 944eb068879f297af5470b7d9ffc58d7be3c6df3 Author: Laurent Pinchart Date: Wed Feb 22 05:49:39 2023 +0200 drm: rcar-du: Write correct values in DORCR reserved fields The DORCR register controls the routing of clocks and data between DU channels within a group. For groups that contain a single channel, there's no routing option to control, and some fields of the register are then reserved. On Gen2 those reserved fields are documented as required to be set to 0, while on Gen3 and newer the PG1T, DK1S and PG1D reserved fields must be set to 1. The DU driver initializes the DORCR register in rcar_du_group_setup(), where it ignores the PG1T, DK1S and PG1D, and then configures those fields to the correct value in rcar_du_group_set_routing(). This hasn't been shown to cause any issue, but prevents certifying that the driver complies with the documentation in safety-critical use cases. As there is no reasonable change that the documentation will be updated to clarify that those reserved fields can be written to 0 temporarily before starting the hardware, make sure that the registers are always set to valid values. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen commit 3d3f8d8cb80ae6170cece11d39127fef95211056 Author: Laurent Pinchart Date: Thu Feb 23 00:08:14 2023 +0200 drm: rcar-du: Rename DORCR fields to make them 0-based The DORCR fields were documented in the R-Car H1 datasheet with 1-based named, and then got renamed to 0-based in Gen2. The 0-based names are used for Gen3 and Gen4, making H1 an outlier. Rename the field macros to make them 0-based, in order to increase readability of the code when comparing it with the documentation. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen commit 2c5c13efc43630071977377877bbba5353e69cc4 Author: Laurent Pinchart Date: Wed Feb 22 05:54:03 2023 +0200 drm: rcar-du: Disable alpha blending for DU planes used with VSP When the input to a DU channel comes from a VSP, the DU doesn't perform any blending operation. Select XRGB8888 instead of ARGB8888 to ensure that the corresponding registers don't get written with invalid values. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen commit fb97147ad2956cff0e9fa2f6407c93bc9242db9b Author: Laurent Pinchart Date: Wed Feb 22 05:49:39 2023 +0200 drm: rcar-du: Don't write unimplemented ESCR and OTAR registers on Gen3 The ESCR and OTAR registers are not present in all DU channels on Gen3 SoCs. ESCR only exists in channels that can be routed to an LVDS or DPAD, and OTAR in channels that can be routed to a DPAD. Skip writing those registers for other channels. This replaces the DU gen check, as Gen4 doesn't have LVDS or DPAD outputs. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen commit ec1c6ff81e8e2123b4d727b2b9ac74049b7c2b52 Author: Laurent Pinchart Date: Mon Feb 13 15:25:15 2023 +0200 drm: rcar-du: lvds: Fix LVDS PLL disable on D3/E3 On R-Car D3 and E3, the LVDS encoder provides the dot (pixel) clock to the DU, regardless of whether the LVDS output is used or not. When using the DPAD (RGB) output, the DU driver thus enables and disables the LVDS PLL manually, while when using the LVDS output, it lets the LVDS bridge driver handle the PLL configuration internally as part of the atomic enable and disable operations. This causes an issue when using the LVDS output. As bridges are disabled before CRTCs, the current implementation violates the enable/disable sequences documented in the hardware datasheet, which requires the dot clock to be enabled before the CRTC is started and disabled after it gets stopped. Fix the problem by enabling/disabling the LVDS PLL manually from the DU regardless of which output is used, and skipping the PLL handling in the LVDS bridge atomic enable and disable operations. This is however not enough. Disabling the LVDS encoder while leaving the PLL on still results in a vertical blanking wait timeout when disabling the DU. Investigation showed that the culprit is the LVEN bit. For an unclear reason, clearing the bit when disabling the LVDS encoder blocks vertical blanking interrupts. We thus have to delay disabling the whole LVDS encoder, not just disabling the PLL, until the DU is disabled. We could split the LVDS disable sequence by clearing the LVRES bit in the LVDS bridge atomic disable handler, and delaying the rest of the operations, in order to disable the LVDS output at bridge atomic disable time, before stopping the CRTC. This would make the code more complex, without a clear benefit, so keep the implementation simple(r). Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen commit 650e788136db881a1896f0ce42a7cb121df65afc Author: Laurent Pinchart Date: Tue Feb 14 01:19:17 2023 +0200 drm: rcar-du: lvds: Move LVDS enable code to separate code section To prepare for a rework of the LVDS disable code, which will need to be called from rcar_lvds_pclk_disable(), move the LVDS enable code, currently stored in the __rcar_lvds_atomic_enable() function, to a separate code section separate from bridge operations. It will be then extended with the LVDS disable code. As part of this rework the __rcar_lvds_atomic_enable() function is renamed to rcar_lvds_enable() to more clearly indicate its purpose. No functional change intended. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Reviewed-by: Tomi Valkeinen commit c95e2ad9594adf1e8088ead38420179942b5c264 Author: Laurent Pinchart Date: Tue Feb 14 01:07:18 2023 +0200 drm: rcar-du: lvds: Call function directly instead of through pointer When disabling the companion bridge in rcar_lvds_atomic_disable(), there's no need to go through the bridge's operations to call .atomic_disable(). Call rcar_lvds_atomic_disable() on the companion directly. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen commit 91de7cdc784f28655eb97de3e66ede0ada94b6eb Author: Michael Straube Date: Sat Mar 25 14:28:23 2023 +0100 staging: rtl8192e: remove rf_type from struct r8192_priv The field rf_type of struct r8192_priv is always RF_1T2R and only used in one place. Use RF_1T2R directly there and remove rf_type from struct r8192_priv. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20230325132823.22872-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2fd65482d923ee09a6e133dcc15f988a4a44420b Author: Michael Straube Date: Sat Mar 25 14:28:22 2023 +0100 staging: rtl8192e: priv->rf_type is always RF_1T2R The value of priv->rf_type is always RF_1T2R. Remove if statements that check for priv->rf_type == RF_1T2R and remove resulting dead code. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20230325132823.22872-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit a3ed769cc229e7d395f9c772e5db72ded643169d Author: Michael Straube Date: Sat Mar 25 14:28:21 2023 +0100 staging: rtl8192e: remove redundant setting of rf_type At this point the value of priv->rf_type is RF_1T2R already. Setting it again is redundant and can be removed. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20230325132823.22872-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit b4474375481fbdd6f8568aadc5ccf6acf09cf997 Author: Michael Straube Date: Sat Mar 25 14:28:20 2023 +0100 staging: rtl8192e: remove RTL819X_DEFAULT_RF_TYPE Remove RTL819X_DEFAULT_RF_TYPE and use RF_1T2R directly to make follow up patches, which will remove priv->rf_type, easier to review. Signed-off-by: Michael Straube Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20230325132823.22872-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 24a9671942380cfbb231ddeb7dc5cd1ae6fc7eb8 Author: Arnd Bergmann Date: Fri Mar 24 10:54:45 2023 +0100 drm/msm/a6xx: add CONFIG_PM dependency Selecting CONFIG_PM_GENERIC_DOMAINS causes a build failure when CONFIG_PM is not enabled: WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS Depends on [n]: PM [=n] Selected by [m]: - DRM_MSM [=m] && HAS_IOMEM [=y] && DRM [=m] && (ARCH_QCOM [=y] || SOC_IMX5 || COMPILE_TEST [=y]) && COMMON_CLK [=y] && IOMMU_SUPPORT [=y] && (QCOM_OCMEM [=y] || QCOM_OCMEM [=y]=n) && (QCOM_LLCC [=n] || QCOM_LLCC [=n]=n) && (QCOM_COMMAND_DB [=y] || QCOM_COMMAND_DB [=y]=n) && DEVFREQ_GOV_SIMPLE_ONDEMAND [=y] drivers/base/power/domain.c:654:13: error: use of undeclared identifier 'pm_wq' queue_work(pm_wq, &genpd->power_off_work); ^ drivers/base/power/domain.c:853:26: error: no member named 'ignore_children' in 'struct dev_pm_info' if (!dev || dev->power.ignore_children) ~~~~~~~~~~ ^ Fixes: c11fa1204fe9 ("drm/msm/a6xx: Use genpd notifier to ensure cx-gdsc collapse") Signed-off-by: Arnd Bergmann Reviewed-by: Ulf Hansson Patchwork: https://patchwork.freedesktop.org/patch/528597/ Link: https://lore.kernel.org/r/20230324095502.3289094-1-arnd@kernel.org Signed-off-by: Rob Clark commit 691fdba39e7fbbaf2755c31ad3800810185cac8c Author: Rob Clark Date: Fri Sep 3 11:47:57 2021 -0700 dma-buf/fence-array: Add fence deadline support Propagate the deadline to all the fences in the array. Signed-off-by: Rob Clark Reviewed-by: Christian König commit aec11c8d7cb31c67deeba4c9fe015d09735c6813 Author: Rob Clark Date: Fri Sep 3 11:47:52 2021 -0700 dma-buf/dma-fence: Add deadline awareness Add a way to hint to the fence signaler of an upcoming deadline, such as vblank, which the fence waiter would prefer not to miss. This is to aid the fence signaler in making power management decisions, like boosting frequency as the deadline approaches and awareness of missing deadlines so that can be factored in to the frequency scaling. v2: Drop dma_fence::deadline and related logic to filter duplicate deadlines, to avoid increasing dma_fence size. The fence-context implementation will need similar logic to track deadlines of all the fences on the same timeline. [ckoenig] v3: Clarify locking wrt. set_deadline callback v4: Clarify in docs comment that this is a hint v5: Drop DMA_FENCE_FLAG_HAS_DEADLINE_BIT. v6: More docs v7: Fix typo, clarify past deadlines Signed-off-by: Rob Clark Reviewed-by: Christian König Acked-by: Pekka Paalanen Reviewed-by: Bagas Sanjaya commit 01bc9ff2749b1aee1eab70d98c5313361add336c Author: Abhirup Deb Date: Tue Mar 21 00:12:50 2023 +0530 staging: vme_user: Replace "<<" with BIT macro Replace the "<<" operator with BIT macro, in accordance to the checkpatch.pl script and Linux kernel coding-style guidelines. Signed-off-by: Abhirup Deb Link: https://lore.kernel.org/r/ZBipKh/e2lK3YcQr@li-27defe4c-32e1-11b2-a85c-e202e9981075.ibm.com Signed-off-by: Greg Kroah-Hartman commit f5aca1a63e83178374195d3a26790091fdf2ed05 Author: Sumitra Sharma Date: Sat Mar 25 01:31:06 2023 -0700 staging: greybus: Inline gb_audio_manager_module() Convert 'gb_audio_manager_module' from a macro to a static inline function, to make the relevant types apparent in the definition and to benefit from the type checking performed by the compiler at call sites. Signed-off-by: Sumitra Sharma Link: https://lore.kernel.org/r/7470bf9d9a57e8bf27e55bd5e3791c5e0ee31385.1679732179.git.sumitraartsy@gmail.com Signed-off-by: Greg Kroah-Hartman commit f48198232d605a0d29f1e11235a6f6142b074b39 Author: Sumitra Sharma Date: Sat Mar 25 01:23:33 2023 -0700 staging: greybus: Inline gpio_chip_to_gb_gpio_controller() Convert 'gpio_chip_to_gb_gpio_controller' from a macro to a static inline function, to make the relevant types apparent in the definition and to benefit from the type checking performed by the compiler at call sites. Signed-off-by: Sumitra Sharma Link: https://lore.kernel.org/r/3fc5d84a99574ac4a76d26427ac544de375adeb4.1679732179.git.sumitraartsy@gmail.com Signed-off-by: Greg Kroah-Hartman commit 016227800e3b085d90638312bf79d40add8da1e4 Author: Michael Straube Date: Fri Mar 24 09:43:34 2023 +0100 staging: rtl8723bs: remove hal_btcoex_SetChipType() Remove the function hal_btcoex_SetChipType() as it does nothing and produces the following gcc warning when compiling with W=1. drivers/staging/rtl8723bs/hal/hal_btcoex.c:1182:30: warning: variable 'pHalData' set but not used [-Wunused-but-set-variable] 1182 | struct hal_com_data *pHalData; | ^~~~~~~~ Signed-off-by: Michael Straube Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230324084334.12183-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit f8a0457a0f8dd76a65fbdbed7175efbd3f8d0f78 Author: Menna Mahmoud Date: Wed Mar 22 13:37:34 2023 +0200 staging: greybus: remove unnecessary blank line Remove unnecessary blank line before struct as reported by checkpatch: " CHECK: Please don't use multiple blank lines " Signed-off-by: Menna Mahmoud Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230322113735.31214-1-eng.mennamahmoud.mm@gmail.com Signed-off-by: Greg Kroah-Hartman commit d6e10084a19f6a0aec81f5823514736f4a990023 Author: Philipp Hortmann Date: Sat Mar 25 09:37:10 2023 +0100 staging: rtl8192e: Remove priv->rf_chip priv->rf_chip is initialized to RF_8256 and not used. Remove initialization, variable and enum as it is dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/2ce85c1a159ae376d82c19c61e694924f07d1093.1679732276.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1d907c886f1c955fe805563bd6b08c733d903eb8 Author: Philipp Hortmann Date: Sat Mar 25 09:37:02 2023 +0100 staging: rtl8192e: Remove priv->rf_chip in _rtl92e_get_channel_map priv->rf_chip is initialized to RF_8256 and never changed. Remove condition in function _rtl92e_get_channel_map as it is dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b8c5a719c6f8930adb87a4ad9bd5d368ba5f348b.1679732276.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 25e99c453b6d4797be3606d4debeabc9e7f28ef9 Author: Philipp Hortmann Date: Sat Mar 25 09:36:54 2023 +0100 staging: rtl8192e: Remove rf_chip in _rtl92e_get_supported_wireless_mode priv->rf_chip is initialized to RF_8256 and never changed. Remove condition in function _rtl92e_get_supported_wireless_mode as it is dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/e2db309dea3208560337376fec26fa5cfba93848.1679732276.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit ec69d872eb6fccc0e271f2d7ca283796c215a776 Author: Philipp Hortmann Date: Sat Mar 25 09:36:43 2023 +0100 staging: rtl8192e: Remove priv->rf_chip in _rtl92e_set_rf_power_state priv->rf_chip is initialized to RF_8256 and never changed. Remove conditions in function _rtl92e_set_rf_power_state as those are dead code. Removed unnecessary blank lines to shorten code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/a83b95c68697e6eade68bfd0bf8e22a1340c1457.1679732276.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5d020fd58cb132c197079ab7bc1459d1e8cdfde3 Author: Philipp Hortmann Date: Sat Mar 25 09:36:34 2023 +0100 staging: rtl8192e: Remove priv->rf_chip in _rtl92e_set_bw_mode_work_item priv->rf_chip is initialized to RF_8256 and never changed. Remove conditions in function _rtl92e_set_bw_mode_work_item as those are dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/a872bb67f71b9992740d5f9b154f794604a2dbb0.1679732276.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0c0b33680ad2e21819786f817ed22c2bc1801601 Author: Philipp Hortmann Date: Sat Mar 25 09:36:23 2023 +0100 staging: rtl8192e: Remove priv->rf_chip in _rtl92e_phy_switch_channel_step priv->rf_chip is initialized to RF_8256 and never changed. Remove condition in function _rtl92e_phy_switch_channel_step as it is dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/1b9e10de4f539aa24150275c80ec4bbd925c853d.1679732276.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 592630558d93a6416987e48a56ec41233fa9bd0b Author: Philipp Hortmann Date: Sat Mar 25 09:36:13 2023 +0100 staging: rtl8192e: Remove priv->rf_chip in _rtl92e_set_tx_power_level priv->rf_chip is initialized to RF_8256 and never changed. Remove condition in function _rtl92e_set_tx_power_level as it is dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/465a789243287c1420fdce68f9a861784a164140.1679732276.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit ade42a46b293436433a10de77003afa205d7dde5 Author: Philipp Hortmann Date: Sat Mar 25 09:36:00 2023 +0100 staging: rtl8192e: Remove priv->rf_chip in rtl92e_config_phy priv->rf_chip is initialized to RF_8256 and never changed. Remove condition in function rtl92e_config_phy as it is dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/c0d4e98308c9198776d8d04d1c2910f089f45a90.1679732276.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 846fc62b9c3a1d322f3d7cd988aef5c9d88aa613 Author: Philipp Hortmann Date: Sat Mar 25 09:35:45 2023 +0100 staging: rtl8192e: Remove priv->rf_chip in rtl92e_set_tx_power priv->rf_chip is initialized to RF_8256 and never changed. Remove condition in function rtl92e_set_tx_power as it is dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/190d0a77602cb89bc24512c99b72f25f4ca5d5e2.1679732276.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1200384754b6ecce28e075efd256cfd654a91d04 Author: Philipp Hortmann Date: Sat Mar 25 09:35:28 2023 +0100 staging: rtl8192e: Remove priv->rf_chip in _rtl92e_phy_rf_write priv->rf_chip is initialized to RF_8256 and never changed. Remove conditions in function _rtl92e_phy_rf_write as those are dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/77628b7ecade212401d7da5e3c0b79f8ef55b5c1.1679732276.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit fe730bfda640bc7b64f458bb35007225b640bcb0 Author: Philipp Hortmann Date: Sat Mar 25 09:35:13 2023 +0100 staging: rtl8192e: Remove priv->rf_chip in _rtl92e_phy_rf_read priv->rf_chip is initialized to RF_8256 and never changed. Remove conditions in function _rtl92e_phy_rf_read as those are dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/c3b2e2a41cc450c1cb9ac41b8ed19b090d9627a6.1679732276.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6e1ce577876250dbbfa95caaad9e51826f452166 Author: Khadija Kamran Date: Sat Mar 25 03:31:31 2023 +0500 staging: rtl8192e: remove blank lines after '{' Remove unnecessary blank lines after an open brace to adhere to the Linux kernel coding-style guidelines. These issues are reported by checkpatch.pl "CHECK: Blank lines aren't necessary after an open brace '{'" Signed-off-by: Khadija Kamran Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/e7cd8152e6986d361f81289868040889224bd1bf.1679696777.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2ac74cf1fc0508486d5fb7d88d24eae924eae6e9 Author: Khadija Kamran Date: Sat Mar 25 03:31:30 2023 +0500 staging: rtl8192e: add spaces around binary operators Use spaces around binary operators as suggested by Linux kernel coding style guidelines. Issues reported by checkpatch.pl for the following binary operators: + , - , * , | , << Signed-off-by: Khadija Kamran Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/44a545cf8e99ebfdbfc3f5bb314f3828abe98558.1679696777.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6ca4e57aade709dd4d918c4d385330fcd0b08b11 Author: Khadija Kamran Date: Sat Mar 25 03:31:29 2023 +0500 staging: rtl8192e: add blank lines after declarations Add blank lines after declarations to adhere to the Linux kernel coding-style guidelines. These issues are reported by checkpatch.pl "CHECK: Please use a blank line after function/struct/union/enum declarations" Signed-off-by: Khadija Kamran Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/d8a5e738046ffdc1b257e1935eacb8e16af34d5e.1679696777.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman commit 336af4bb239a7c95657e6e83784cf3e5e4a44c3e Author: Khadija Kamran Date: Sat Mar 25 03:31:28 2023 +0500 staging: rtl8192e: remove extra blank lines Remove the extra blank line in accordance with the Linux kernel coding-style regulations. These issues were reported by checkpatch.pl "CHECK: Please don't use multiple blank lines" Signed-off-by: Khadija Kamran Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/6d7388f944e8296227269c7472a462ea7c94149c.1679696777.git.kamrankhadijadj@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6bfafec3faf7ab20d72bb2063058591e55b68f8e Author: Tom Rix Date: Thu Mar 23 12:59:31 2023 -0400 staging: rtl8192u: remove unused ieee80211_SignalStrengthTranslate function clang with W=1 reports drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:1961:18: error: unused function 'ieee80211_SignalStrengthTranslate' [-Werror,-Wunused-function] static inline u8 ieee80211_SignalStrengthTranslate( ^ This function is not used so remove it. It may have been used in the past but that has been commented out. Also remove the comment. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230323165931.2634587-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 4f3db2e2a97bb04e49cf2840dcde8a813b2ece2a Author: Philipp Hortmann Date: Wed Mar 22 18:15:32 2023 +0100 staging: rtl8192e: Replace macro iwe_stream_add_point_rsl with standard function Replace macro iwe_stream_add_point_rsl with standard function iwe_stream_add_point to increase readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/563af664b3186e73d99f73a6396f8ebcd3c52be2.1679504314.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 27e99d0327c26edb287b28ab11d46de710a65c3e Author: Philipp Hortmann Date: Wed Mar 22 18:15:24 2023 +0100 staging: rtl8192e: Replace macro iwe_stream_add_event_rsl with standard function Replace macro iwe_stream_add_event_rsl with standard function iwe_stream_add_event to increase readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/00a8057acc994c139530a070974694b999a8f96a.1679504314.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 861a6a82b37516fbcefc60ba967c017e9f0f42fb Author: Philipp Hortmann Date: Wed Mar 22 18:15:18 2023 +0100 staging: rtl8192e: Replace macro container_of_work_rsl with standard macro Replace macro container_of_work_rsl with standard macro container_of to increase readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/d75688b6f884c526f6046fac522b8ed87db1ca2f.1679504314.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8c385e3f53d47b6a1e6add1b02afdb6ae70b27f3 Author: Philipp Hortmann Date: Wed Mar 22 18:15:12 2023 +0100 staging: rtl8192e: Replace macro INIT_WORK_RSL with standard macro Replace macro INIT_WORK_RSL with standard macro INIT_WORK to increase readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/71879ccda54d57078f47c70cdba90ae2234adc91.1679504314.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9c9c9f8e3e93e09e0208413d310a0b9475c561ab Author: Philipp Hortmann Date: Wed Mar 22 18:15:06 2023 +0100 staging: rtl8192e: Replace macro INIT_DELAYED_WORK_RSL with standard macro Replace macro INIT_DELAYED_WORK_RSL with standard macro INIT_DELAYED_WORK to increase readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/61b589012a5efb4b68a76e52eb84ad19093013b3.1679504314.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3443454f749d8663adfa46e018625c061c85efa4 Author: Philipp Hortmann Date: Wed Mar 22 18:15:00 2023 +0100 staging: rtl8192e: Remove unused macro queue_delayed_work_rsl and more Remove unused macro queue_delayed_work_rsl and queue_work_rsl to increase readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/3ed738a5d67a999ad42454fcb0d6668bfa706205.1679504314.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit f6dcdc1b1b6f9730901fb91eb742ff50b5b5211d Author: Philipp Hortmann Date: Wed Mar 22 18:14:53 2023 +0100 staging: rtl8192e: Replace macro skb_tail_pointer_rsl with standard function Replace macro skb_tail_pointer_rsl with function skb_tail_pointer to increase readablility. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/6885112850b48c0f9ff16655f7d9efe085ccc001.1679504314.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 09d0c43a094a9b86e1de22894f17cab38b1f12a2 Author: Philipp Hortmann Date: Wed Mar 22 18:14:48 2023 +0100 staging: rtl8192e: Remove double defined constants bMaskBytex and more Remove double defined constants. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/3f31664d8751ebb8b78cbd7d019f002fb2ba4c3c.1679504314.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit d24927f43b9f3f3994ddf075caee531391c56559 Author: Khadija Kamran Date: Wed Mar 22 18:36:03 2023 +0500 staging: ks7010: fix line ending with '(' Splitting function header to multiple lines because of 80 characters per line limit, results in ending the function call line with '('. This leads to CHECK reported by checkpatch.pl Move the first parameter right after the '(' in the function call line. Align the rest of the parameters to the opening parenthesis. Signed-off-by: Khadija Kamran Link: https://lore.kernel.org/r/ZBsEQzL3Oidsmg/L@khadija-virtual-machine Signed-off-by: Greg Kroah-Hartman commit bb75546bb630d2fccd39dfcf691a9cb73cfbc7d9 Author: Khadija Kamran Date: Fri Mar 24 00:56:11 2023 +0500 staging: most: fix line ending with '(' in dim2/ Splitting function header to multiple lines because of 80 characters per line limit, results in ending the function call line with '('. This leads to CHECK reported by checkpatch.pl Move the function parameters right after the '(' in the function call line. Align the rest of the parameters to the opening parenthesis. Signed-off-by: Khadija Kamran Link: https://lore.kernel.org/r/ZByu29jb1mE3KOsn@khadija-virtual-machine Signed-off-by: Greg Kroah-Hartman commit c35cc254f34503a53d58560367a1eb4ac0a430cc Author: Khadija Kamran Date: Fri Mar 24 00:49:44 2023 +0500 staging: most: fix line ending with '(' in video/ Splitting function header to multiple lines because of 80 characters per line limit, results in ending the function call line with '('. This leads to CHECK reported by checkpatch.pl Move the function parameters right after the '(' in the function call line. Signed-off-by: Khadija Kamran Link: https://lore.kernel.org/r/ZBytWDocM7XbXkRx@khadija-virtual-machine Signed-off-by: Greg Kroah-Hartman commit 1acaceb1a43b86a3a8d340c37444214f4bbf0cdd Author: Khadija Kamran Date: Wed Mar 22 19:22:50 2023 +0500 staging: most: remove extra blank line Remove extra blank line reported by checkpatch script. Signed-off-by: Khadija Kamran Link: https://lore.kernel.org/r/ZBsPOk3TgQTfNAAK@khadija-virtual-machine Signed-off-by: Greg Kroah-Hartman commit 009455205e68ef017a429dc818b92c4a84b867c4 Author: Greg Kroah-Hartman Date: Fri Mar 24 10:08:14 2023 +0100 driver core: bus: move documentation for lock_key to proper location. In commit 37e98d9bedb5 ("driver core: bus: move lock_class_key into dynamic structure"), the lock_key variable moved out of struct bus_type and into struct subsys_private, yet the documentation for it did not move. Fix that up and place the documentation comment in the correct location. Cc: "Rafael J. Wysocki" Fixes: 37e98d9bedb5 ("driver core: bus: move lock_class_key into dynamic structure") Link: https://lore.kernel.org/r/20230324090814.386654-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b69edab47f1da8edd8e7bfdf8c70f51a2a5d89fb Author: Kees Cook Date: Thu Mar 2 14:49:50 2023 -0800 kheaders: Use array declaration instead of char Under CONFIG_FORTIFY_SOURCE, memcpy() will check the size of destination and source buffers. Defining kernel_headers_data as "char" would trip this check. Since these addresses are treated as byte arrays, define them as arrays (as done everywhere else). This was seen with: $ cat /sys/kernel/kheaders.tar.xz >> /dev/null detected buffer overflow in memcpy kernel BUG at lib/string_helpers.c:1027! ... RIP: 0010:fortify_panic+0xf/0x20 [...] Call Trace: ikheaders_read+0x45/0x50 [kheaders] kernfs_fop_read_iter+0x1a4/0x2f0 ... Reported-by: Jakub Kicinski Link: https://lore.kernel.org/bpf/20230302112130.6e402a98@kernel.org/ Acked-by: Joel Fernandes (Google) Reviewed-by: Alexander Lobakin Tested-by: Jakub Kicinski Fixes: 43d8ce9d65a5 ("Provide in-kernel headers to make extending kernel easier") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230302224946.never.243-kees@kernel.org commit bc77f7318da8812244cd2329d0bfc1312e75cfd9 Author: Michal Michalik Date: Thu Mar 23 20:08:02 2023 +0100 tools: ynl: add the Python requirements.txt file It is a good practice to state explicitly which are the required Python packages needed in a particular project to run it. The most commonly used way is to store them in the `requirements.txt` file*. *URL: https://pip.pypa.io/en/stable/reference/requirements-file-format/ Currently user needs to figure out himself that Python needs `PyYAML` and `jsonschema` (and theirs requirements) packages to use the tool. Add the `requirements.txt` for user convenience. How to use it: 1) (optional) Create and activate empty virtual environment: python3.X -m venv venv3X source ./venv3X/bin/activate 2) Install all the required packages: pip install -r requirements.txt or python -m pip install -r requirements.txt 3) Run the script! The `requirements.txt` file was tested for: * Python 3.6 * Python 3.8 * Python 3.10 Signed-off-by: Michal Michalik Link: https://lore.kernel.org/r/20230323190802.32206-1-michal.michalik@intel.com Signed-off-by: Jakub Kicinski commit 2d08f3e128b1b380b0992ab40d60e0843db3c6b2 Author: Tom Rix Date: Thu Mar 23 12:13:43 2023 -0400 mISDN: remove unused vpm_read_address and cpld_read_reg functions clang with W=1 reports drivers/isdn/hardware/mISDN/hfcmulti.c:667:1: error: unused function 'vpm_read_address' [-Werror,-Wunused-function] vpm_read_address(struct hfc_multi *c) ^ drivers/isdn/hardware/mISDN/hfcmulti.c:643:1: error: unused function 'cpld_read_reg' [-Werror,-Wunused-function] cpld_read_reg(struct hfc_multi *hc, unsigned char reg) ^ These functions are not used, so remove them. Reported-by: Simon Horman Signed-off-by: Tom Rix Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230323161343.2633836-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit 882f4adac9a8411ba9993810132add18896b82c1 Author: Lizhe Date: Sun Mar 19 12:35:18 2023 +0800 scsi: target: tcm_loop: Remove redundant driver match function If there is no driver match function, the driver core assumes that each candidate pair (driver, device) matches. See driver_match_device(). pseudo_lld_bus_match() always returns 1 and is therefore equivalent to not registering a match function. Remove it. Signed-off-by: Lizhe Link: https://lore.kernel.org/r/20230319043518.297490-1-sensor1010@163.com Signed-off-by: Martin K. Petersen commit f486893288f3e9b171b836f43853a6426515d800 Author: Zheng Wang Date: Sat Mar 18 16:16:35 2023 +0800 scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition mptlan_probe() calls mpt_register_lan_device() which initializes the &priv->post_buckets_task workqueue. A call to mpt_lan_wake_post_buckets_task() will subsequently start the work. During driver unload in mptlan_remove() the following race may occur: CPU0 CPU1 |mpt_lan_post_receive_buckets_work() mptlan_remove() | free_netdev() | kfree(dev); | | | dev->mtu | //use Fix this by finishing the work prior to cleaning up in mptlan_remove(). [mkp: we really should remove mptlan instead of attempting to fix it] Signed-off-by: Zheng Wang Link: https://lore.kernel.org/r/20230318081635.796479-1-zyytlz.wz@163.com Signed-off-by: Martin K. Petersen commit 75cb113cd43f06aaf4f1bda0069cfd5b98e909eb Author: Danila Chernetsov Date: Fri Mar 17 17:51:09 2023 +0000 scsi: megaraid: Fix mega_cmd_done() CMDID_INT_CMDS When cmdid == CMDID_INT_CMDS, the 'cmds' pointer is NULL but is dereferenced below. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 0f2bb84d2a68 ("[SCSI] megaraid: simplify internal command handling") Signed-off-by: Danila Chernetsov Link: https://lore.kernel.org/r/20230317175109.18585-1-listdansp@mail.ru Signed-off-by: Martin K. Petersen commit 62d15dba0aa4448c15da9c9443018c70fc2527b2 Merge: 9abb593e59ce0 04d1fa4346cce Author: Martin K. Petersen Date: Fri Mar 24 20:13:03 2023 -0400 Merge patch series "Constify most SCSI host templates" Bart Van Assche says: It helps humans and the compiler if it is made explicit that SCSI host templates are not modified. Hence this patch series that constifies most SCSI host templates. Please consider this patch series for the next merge window. Link: https://lore.kernel.org/r/20230322195515.1267197-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 04d1fa4346ccedde68886a4d5a0003f3a322467b Author: Bart Van Assche Date: Wed Mar 22 12:55:15 2023 -0700 scsi: usb: uas: Declare two host templates and host template pointers const Improve source code documentation by constifying host templates that are not modified. Acked-by: Alan Stern (for usb-storage) Acked-by: Oliver Neukum Acked-by: Greg Kroah-Hartman Cc: Oliver Neukum Cc: linux-usb@vger.kernel.org Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-81-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit f2e2fe3dec7f44fea4c0cd66ca5abf5cd080407c Author: Bart Van Assche Date: Wed Mar 22 12:55:14 2023 -0700 scsi: ufs: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-80-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 8e2ab8cda5aa70b4e6d406f158d69363cd8dfc4e Author: Bart Van Assche Date: Wed Mar 22 12:55:13 2023 -0700 scsi: target: tcm-loop: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-79-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit f8adf8e99a23a49dad9cdb054f2abba0ce5d1865 Author: Bart Van Assche Date: Wed Mar 22 12:55:12 2023 -0700 scsi: rts5208: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Acked-by: Greg Kroah-Hartman Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-78-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 65e5447a10140a91bb10b67e30dccab4357892e2 Author: Bart Van Assche Date: Wed Mar 22 12:55:11 2023 -0700 scsi: xen-scsifront: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Reviewed-by: Juergen Gross Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-77-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit a5b78e81c712c3eb3229cdc4fa559dea60f93cd8 Author: Bart Van Assche Date: Wed Mar 22 12:55:10 2023 -0700 scsi: wd719x: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-76-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 273ab251950ffbffba3d831ef82731deb1260ea6 Author: Bart Van Assche Date: Wed Mar 22 12:55:09 2023 -0700 scsi: virtio-scsi: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-75-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit d2c16f8f1ed2c2b926afa3bec2fefadc9d7ee4f5 Author: Bart Van Assche Date: Wed Mar 22 12:55:08 2023 -0700 scsi: sym53c8xx: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-74-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 08d6075192d10a9a54ba2155b5f68a923dbce131 Author: Bart Van Assche Date: Wed Mar 22 12:55:07 2023 -0700 scsi: stex: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-73-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 8fb5b37e070e3c5434be816937cadf06873bcbe1 Author: Bart Van Assche Date: Wed Mar 22 12:55:06 2023 -0700 scsi: snic: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-72-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 077126d6b9415592bacc5e6743643e67ff224dc8 Author: Bart Van Assche Date: Wed Mar 22 12:55:05 2023 -0700 scsi: smartpqi: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-71-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 4517353a048e045b28c07071abc783d69850694d Author: Bart Van Assche Date: Wed Mar 22 12:55:04 2023 -0700 scsi: sgiwd93: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-70-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 7c7a1419179a80f46d7dce76f65563db6b5d73d7 Author: Bart Van Assche Date: Wed Mar 22 12:55:03 2023 -0700 scsi: qlogicpti: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-69-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 421c20b7668e31a63c9dc1dad0e5ee79b5ae9027 Author: Bart Van Assche Date: Wed Mar 22 12:55:02 2023 -0700 scsi: qla2xxx: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-68-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 796e8f8082989a40f45f7c6830d8f45067100b53 Author: Bart Van Assche Date: Wed Mar 22 12:55:01 2023 -0700 scsi: qla1280: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-67-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 4fe61364e7d1b0e74f0b49b5a0d6dd8130e71c53 Author: Bart Van Assche Date: Wed Mar 22 12:55:00 2023 -0700 scsi: ps3rom: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Tested-by: Geoff Levand Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-66-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit d23901a8d700dac17a72a405af497eb095b7a31e Author: Bart Van Assche Date: Wed Mar 22 12:54:59 2023 -0700 scsi: ppa: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-65-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 4e9e0a51aa31e82a949a4b34b1a8503e57c3932e Author: Bart Van Assche Date: Wed Mar 22 12:54:58 2023 -0700 scsi: pmcraid: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-64-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 8fe69e4abdb5adaf8b2a060351086f005557de62 Author: Bart Van Assche Date: Wed Mar 22 12:54:57 2023 -0700 scsi: pcmcia-pm8001: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Acked-by: Jack Wang Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-63-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 54aefe23a6c46d7194a98ece8d98fad08d5cbdb1 Author: Bart Van Assche Date: Wed Mar 22 12:54:56 2023 -0700 scsi: pcmcia-sym53c500: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-62-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 36242912e24f0d4c00406b065f90019800ac3708 Author: Bart Van Assche Date: Wed Mar 22 12:54:55 2023 -0700 scsi: nsp32: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-61-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 914fa37a8a549efe4c1db3091ba907225cff9de8 Author: Bart Van Assche Date: Wed Mar 22 12:54:54 2023 -0700 scsi: myrs: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-60-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 8e64d59d1f1c96c3fdd5d16918dc24f42dab04f0 Author: Bart Van Assche Date: Wed Mar 22 12:54:53 2023 -0700 scsi: myrb: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-59-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 8a098ba4d996a063c8ef54c3a41193566d00d69b Author: Bart Van Assche Date: Wed Mar 22 12:54:52 2023 -0700 scsi: mvumi: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-58-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit f01feece6b64c0931c5e5cc7aee6d880ef6ce840 Author: Bart Van Assche Date: Wed Mar 22 12:54:51 2023 -0700 scsi: mvsas: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Reviewed-by: John Garry Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-57-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit c9ac4e73b373cdc4fe70356ac97aff5c8d7d8be2 Author: Bart Van Assche Date: Wed Mar 22 12:54:50 2023 -0700 scsi: mvme147: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-56-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 1785ced8bd4b547d01a3d6c9ede0a1cd1bc84558 Author: Bart Van Assche Date: Wed Mar 22 12:54:49 2023 -0700 scsi: mpt3sas: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-55-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit b85f82f3c92a05cad2ae785de21299e52a22c63b Author: Bart Van Assche Date: Wed Mar 22 12:54:48 2023 -0700 scsi: mpi3mr: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-54-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 0fabb7fbad553a06f3e1066a82ba5761b2e617b5 Author: Bart Van Assche Date: Wed Mar 22 12:54:47 2023 -0700 scsi: mesh: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-53-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 264e222b004cbf2950e60a873ab15339399a1b0d Author: Bart Van Assche Date: Wed Mar 22 12:54:46 2023 -0700 scsi: megaraid: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-52-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 5e328664ed0b6388b317dd47f5381ec13fe8b557 Author: Bart Van Assche Date: Wed Mar 22 12:54:45 2023 -0700 scsi: mac53c94: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-51-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 80602aca4fcca2b0a90ab39fcce31ec591a3fba0 Author: Bart Van Assche Date: Wed Mar 22 12:54:44 2023 -0700 scsi: iscsi: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Reviewed-by: Mike Christie Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-50-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit eb60d17a0e4a239b9834d3542f0d3724a242eb76 Author: Bart Van Assche Date: Wed Mar 22 12:54:43 2023 -0700 scsi: isci: Declare SCSI host template const Make it explicit that the ISCI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-49-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 4ea4394e7120f3b7d2ab3409e1e8de5da999dd73 Author: Bart Van Assche Date: Wed Mar 22 12:54:42 2023 -0700 scsi: ipr: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Acked-by: Brian King Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-48-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 4ba116af0fd3f665ba6f855c0cd7e2b6a4b6b5e7 Author: Bart Van Assche Date: Wed Mar 22 12:54:41 2023 -0700 scsi: initio: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-47-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 09dce26c4a8957069d06bdf4046b45bfc0ba7f38 Author: Bart Van Assche Date: Wed Mar 22 12:54:40 2023 -0700 scsi: imm: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-46-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 7bced3fc285a3f0791eb50bd1c9bbf4305804f50 Author: Bart Van Assche Date: Wed Mar 22 12:54:39 2023 -0700 scsi: ibmvfc: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Acked-by: Tyrel Datwyler Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-45-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 9194970becd88b71f929ab5c843f4440cbb451bf Author: Bart Van Assche Date: Wed Mar 22 12:54:38 2023 -0700 scsi: hptiop: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-44-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 207761bf1a8dfcafec5ba3310253b3ed3c5ce4b3 Author: Bart Van Assche Date: Wed Mar 22 12:54:37 2023 -0700 scsi: hpsa: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-43-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit e8c0ced993ddcb01af21c269983205c7c16c5ffd Author: Bart Van Assche Date: Wed Mar 22 12:54:36 2023 -0700 scsi: hisi_sas: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Acked-by: Xiang Chen Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-42-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit ccc54750f9b77223f0813d74f2850fc9b5bb1c7d Author: Bart Van Assche Date: Wed Mar 22 12:54:35 2023 -0700 scsi: gvp11: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-41-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit bd5e469a7f698ea5c4de3c4de17c05070db51d74 Author: Bart Van Assche Date: Wed Mar 22 12:54:34 2023 -0700 scsi: NCR5380: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-40-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 8e6a87aa91624d5a07799491528b2bb7c7ae5628 Author: Bart Van Assche Date: Wed Mar 22 12:54:33 2023 -0700 scsi: fdomain: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-39-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit be8532d15342d3ee64c39512a6f162ffb313ffa2 Author: Bart Van Assche Date: Wed Mar 22 12:54:32 2023 -0700 scsi: qedf: Declare host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-38-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit bf3614bd7e8a3727d29b01e76596daa7c40f5be0 Author: Bart Van Assche Date: Wed Mar 22 12:54:31 2023 -0700 scsi: fnic: Declare host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-37-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit d15515f918010464e4c6e225f678926f9ab173fd Author: Bart Van Assche Date: Wed Mar 22 12:54:30 2023 -0700 scsi: fcoe: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-36-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 3b465a149146032be5c3e42735e7eaf45517aa97 Author: Bart Van Assche Date: Wed Mar 22 12:54:29 2023 -0700 scsi: esp_scsi: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-35-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 1f4e77dbcbad700777197a24a30cdafb3a3b57b1 Author: Bart Van Assche Date: Wed Mar 22 12:54:28 2023 -0700 scsi: esas2r: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-34-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 67791ce19f0003831bb17fd69024ca9a1474498b Author: Bart Van Assche Date: Wed Mar 22 12:54:27 2023 -0700 scsi: elx: efct: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-33-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit b816c6bf69a7d9b99e55e71485c9f4ef5ec6acbe Author: Bart Van Assche Date: Wed Mar 22 12:54:26 2023 -0700 scsi: dmx3191d: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-32-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 16c0a2db0c4a937078df3268c15c2c5f2885db77 Author: Bart Van Assche Date: Wed Mar 22 12:54:25 2023 -0700 scsi: dc395x: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-31-bvanassche@acm.org Acked-by: Oliver Neukum Signed-off-by: Martin K. Petersen commit f44e1c639ef00f517a65b4becafab51f97ce9861 Author: Bart Van Assche Date: Wed Mar 22 12:54:24 2023 -0700 scsi: atp870u: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-30-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 9db801178eb8caca3058eea7d7f337a992c785ac Author: Bart Van Assche Date: Wed Mar 22 12:54:23 2023 -0700 scsi: powertec: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-29-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 644d8d77eee5814c056c54e9f005e4fcb7f2f53c Author: Bart Van Assche Date: Wed Mar 22 12:54:22 2023 -0700 scsi: oak: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-28-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 13c2e9647198a10266a52a14f76e492d3cfe8838 Author: Bart Van Assche Date: Wed Mar 22 12:54:21 2023 -0700 scsi: eesox: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-27-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 202423c58724315d9aba26aa832500a600ff3cb5 Author: Bart Van Assche Date: Wed Mar 22 12:54:20 2023 -0700 scsi: cumana: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-26-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 4df23b30fa23dc532d3becd71ac1b1f0e44d8988 Author: Bart Van Assche Date: Wed Mar 22 12:54:19 2023 -0700 scsi: aha1740: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-25-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 116e5de74270b66c69fe86db514d87ffbba28b04 Author: Bart Van Assche Date: Wed Mar 22 12:54:18 2023 -0700 scsi: arxescsi: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-24-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 5d94e575a1f1df4036fe41af5cca89b60a3c63bb Author: Bart Van Assche Date: Wed Mar 22 12:54:17 2023 -0700 scsi: acornscsi: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-23-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 34f5d2dc00381df593bf57b7787d136522e18b77 Author: Bart Van Assche Date: Wed Mar 22 12:54:16 2023 -0700 scsi: arcmsr: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-22-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit dbb26f2b4200a744fd0b67b0ca92e848094da3fd Author: Bart Van Assche Date: Wed Mar 22 12:54:15 2023 -0700 scsi: aic94xx: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-21-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 77168bd721bcbef610dab3c2bb4a3d87dba4b321 Author: Bart Van Assche Date: Wed Mar 22 12:54:14 2023 -0700 scsi: aha1542: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-20-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 11e58ceacfabda48fcdc0901dbef41c21c52a031 Author: Bart Van Assche Date: Wed Mar 22 12:54:13 2023 -0700 scsi: aha152x: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-19-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 8afc6e14a69bd192250f2489d793b8b3d1d41297 Author: Bart Van Assche Date: Wed Mar 22 12:54:12 2023 -0700 scsi: advansys: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-18-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 0cd7324b9e9debe33a77952733e749c92ffa20c3 Author: Bart Van Assche Date: Wed Mar 22 12:54:11 2023 -0700 scsi: aacraid: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-17-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 88530b3ea9020550bebe2a1896d5691497b89407 Author: Bart Van Assche Date: Wed Mar 22 12:54:10 2023 -0700 scsi: a3000: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-16-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 4412df387040cda6005f3dd4907129728abcb4c3 Author: Bart Van Assche Date: Wed Mar 22 12:54:09 2023 -0700 scsi: a2091: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-15-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 157fc774cc785e350a992859ecfa99581422775e Author: Bart Van Assche Date: Wed Mar 22 12:54:08 2023 -0700 scsi: a100u2w: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-14-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 83e479e12bfc79c7c465a47912b66298c2d7da0b Author: Bart Van Assche Date: Wed Mar 22 12:54:07 2023 -0700 scsi: BusLogic: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Acked-by: Khalid Aziz Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-13-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit ca1b0e01f6b53778900b5671034157f275966480 Author: Bart Van Assche Date: Wed Mar 22 12:54:06 2023 -0700 scsi: 3w-xxxx: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-12-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit e5be9953cb02250393a78f3fdec541b3a6500a20 Author: Bart Van Assche Date: Wed Mar 22 12:54:05 2023 -0700 scsi: 3w-sas: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-11-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 682895797e56e16a3780e4af7c3fbba23046bf71 Author: Bart Van Assche Date: Wed Mar 22 12:54:04 2023 -0700 scsi: 3w-9xxx: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-10-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 2887b7a8e07f5bf2b25977c3f533bad2eb35b8d0 Author: Bart Van Assche Date: Wed Mar 22 12:54:03 2023 -0700 scsi: zfcp: Declare SCSI host template const Make it explicit that the SCSI host template is not modified. Acked-by: Benjamin Block Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-9-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 95a24cf170ed1d2c21275bfa1f635fb7277eb7c6 Author: Bart Van Assche Date: Wed Mar 22 12:54:02 2023 -0700 scsi: message: fusion: Declare SCSI host template members const Make it explicit that the SCSI host templates are not modified. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-8-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 4281af9d9f13dab7233f6d168d0be310bd305291 Author: Bart Van Assche Date: Wed Mar 22 12:54:01 2023 -0700 scsi: RDMA/srp: Declare the SCSI host template const Make it explicit that the SRP host template is not modified. Acked-by: Leon Romanovsky Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-7-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 0ca31ecacfe565e354207f76f0b351e130d5cb8a Author: Bart Van Assche Date: Wed Mar 22 12:54:00 2023 -0700 scsi: firewire: sbp2: Declare the SCSI host template const Make it explicit that the sbp2 host template it not modified. Cc: Stefan Richter Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-6-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 25df73d93323e20c1f05700776fe3df75d3b27b2 Author: Bart Van Assche Date: Wed Mar 22 12:53:59 2023 -0700 scsi: ata: Declare SCSI host templates const Make it explicit that ATA host templates are not modified. Reviewed-by: Linus Walleij Acked-by: Damien Le Moal Reviewed-by: Serge Semin (for DWC AHCI SATA) Reviewed-by: John Garry Reviewed-by: Jon Hunter (for Tegra) Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: John Garry Cc: Mike Christie Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-5-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit e0d3f2c694e5db309af270a07fc570fe19902ba4 Author: Bart Van Assche Date: Wed Mar 22 12:53:58 2023 -0700 scsi: core: Declare SCSI host template pointer members const Declare the SCSI host template pointer members const and also the remaining SCSI host template pointers in the SCSI core. Reviewed-by: Benjamin Block Reviewed-by: John Garry Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Mike Christie Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-4-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 31435de9746670d884f84a3c094a401aa27747aa Author: Bart Van Assche Date: Wed Mar 22 12:53:57 2023 -0700 scsi: core: Declare most SCSI host template pointers const Prepare for constifying most SCSI host template pointers by constifying the SCSI host template pointer arguments and variables in the SCSI core. Reviewed-by: Benjamin Block Reviewed-by: John Garry Reviewed-by: Ming Lei Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Mike Christie Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-3-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit a07be936d923431109837fe049545609af86c470 Author: Bart Van Assche Date: Wed Mar 22 12:53:56 2023 -0700 scsi: qla2xxx: Refer directly to the qla2xxx_driver_template Access the qla2xxx_driver_template data structure directly instead of via the host pointer. This patch prepares for declaring the 'hostt' pointer const. Cc: Nilesh Javali Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230322195515.1267197-2-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit fb0a6a268dcd6fe144c99d60a1166e34c6991d5f Author: Eli Cohen Date: Thu Jan 5 11:31:46 2023 +0200 net/mlx5: Provide external API for allocating vectors Provide external API to be used by other drivers relying on mlx5_core, for allocating MSIX vectors. An example for such a driver would be mlx5_vdpa. Signed-off-by: Eli Cohen Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed Reviewed-by: Jacob Keller commit b637ac5db0d0fd00cbe88469999ba2985355ac95 Author: Eli Cohen Date: Tue Jan 3 09:37:23 2023 +0200 net/mlx5: Use one completion vector if eth is disabled If eth is disabled by devlink, use only a single completion vector to have minimum performance of all users of completion vectors. This also affects Infiniband performance. The rest of the vectors can be used by other consumers on a first come first served basis. mlx5_vdpa will make use of this to allocate dedicated vectors for its own use. Signed-off-by: Eli Cohen Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed Reviewed-by: Jacob Keller commit 1dc85133c207831dbaa91941a98f6c488411927a Author: Eli Cohen Date: Tue Jan 3 09:16:11 2023 +0200 net/mlx5: Refactor calculation of required completion vectors Move the calculation to a separate function. We will add more functionality to it in a follow up patch. Signed-off-by: Eli Cohen Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed Reviewed-by: Jacob Keller commit fe578cbb2f053f465e19d2671a523dcd01953888 Author: Eli Cohen Date: Tue Jan 3 08:48:14 2023 +0200 net/mlx5: Move devlink registration before mlx5_load In order to allow reference to devlink parameters during driver load, move the devlink registration before mlx5_load. Subsequent patch will use it to control the number of completion vectors required based on whether eth is enabled or not. Signed-off-by: Eli Cohen Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed Reviewed-by: Jacob Keller commit 3354822cde5a9f72aa725b3c619188b149a71a33 Author: Eli Cohen Date: Sun Jan 1 08:16:23 2023 +0200 net/mlx5: Use dynamic msix vectors allocation Current implementation calculates the number and the partitioaning of available interrupts vectors and then allocates all the interrupt vectors. Here, whenever dynamic msix allocation is supported, we change this to use msix vectors dynamically so a vectors is actually allocated only when needed. The current pool logic is kept in place to take care of partitioning the vectors between the consumers and take care of reference counting. However, the vectors are allocated only when needed. Subsequent patches will make use of this to allocate vectors for VDPA. Signed-off-by: Eli Cohen Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed Reviewed-by: Jacob Keller commit b48a0f72bc3e5b10f55b3d40f051135fc9afd0e5 Author: Eli Cohen Date: Mon Jan 9 12:08:53 2023 +0200 net/mlx5: Refactor completion irq request/release code Break the request and release functions into pci and sub-functions devices handling for better readability, eventually making the code symmetric in terms of request/release. Signed-off-by: Eli Cohen Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed Reviewed-by: Jacob Keller commit 8bebfd767909eb884a7b529fb7a263e40c99627b Author: Eli Cohen Date: Sun Jan 1 09:22:34 2023 +0200 net/mlx5: Improve naming of pci function vectors The variable pf_vec is used to denote the number of vectors required for the pci function's own use. To avoid confusion interpreting pf as physical function, change the name to pcif_vec. Same reasoning goes for pf_pool which is really pci function pool. Signed-off-by: Eli Cohen Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed Reviewed-by: Jacob Keller commit bbac70c741830bd70382c8125bf34e1d9985c750 Author: Eli Cohen Date: Thu Dec 29 11:02:19 2022 +0200 net/mlx5: Use newer affinity descriptor Use the more refined struct irq_affinity_desc to describe the required IRQ affinity. For the async IRQs request unmanaged affinity and for completion queues use managed affinity. No functionality changes introduced. It will be used in a subsequent patch when we use dynamic MSIX allocation. Signed-off-by: Eli Cohen Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed Reviewed-by: Jacob Keller commit 235a25fe28deb5558a500c9f9af4ff3b4797b86c Author: Eli Cohen Date: Wed Dec 28 16:30:52 2022 +0200 net/mlx5: Modify struct mlx5_irq to use struct msi_map Use the standard struct msi_map to store the vector number and irq number pair in struct mlx5_irq. Signed-off-by: Eli Cohen Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed Reviewed-by: Jacob Keller commit 40a252c123c765a8d86d118b692c79aaa3b74ef6 Author: Eli Cohen Date: Wed Dec 28 15:51:29 2022 +0200 net/mlx5: Fix wrong comment A control irq may be allocated from the parent device's pool in case there is no SF dedicated pool. This could happen when there are not enough vectors available for SFs. Signed-off-by: Eli Cohen Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed Reviewed-by: Jacob Keller commit b94616d9c6fd4e0d39616c68f46e33d7126add5a Author: Eli Cohen Date: Wed Dec 28 13:41:52 2022 +0200 net/mlx5e: Coding style fix, add empty line Add empty line between two function defnititions. Signed-off-by: Eli Cohen Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed Reviewed-by: Jacob Keller commit 71f0a2478605c100358a9f9e174849fa643bf8a7 Author: Eli Cohen Date: Tue Feb 14 11:05:46 2023 +0200 lib: cpu_rmap: Add irq_cpu_rmap_remove to complement irq_cpu_rmap_add Add a function to complement irq_cpu_rmap_add(). It removes the irq from the reverse mapping by setting the notifier to NULL. The function calls irq_set_affinity_notifier() with NULL at the notify argument which then cancel any pending notifier work and decrement reference on the notifier. When ref count reaches zero, the glue pointer is kfree and the rmap entry is set to NULL serving both to avoid second attempt to release it and also making the rmap entry available for subsequent mapping. It should be noted the drivers usually creates the reverse mapping at initialization time and remove it at unload time so we do not expect failures in allocating rmap due to kref holding the glue entry. Cc: Thomas Gleixner Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed Reviewed-by: Jacob Keller commit 9821d8d4628e630ab56f47a8e6b878a2576e069b Author: Eli Cohen Date: Tue Feb 14 09:29:46 2023 +0200 lib: cpu_rmap: Use allocator for rmap entries Use a proper allocator for rmap entries using a naive for loop. The allocator relies on whether an entry is NULL to be considered free. Remove the used field of rmap which is not needed. Also, avoid crashing the kernel if an entry is not available. Cc: Thomas Gleixner Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed Reviewed-by: Jacob Keller commit 4e0473f1060aa49621d40a113afde24818101d37 Author: Eli Cohen Date: Wed Feb 8 07:51:02 2023 +0200 lib: cpu_rmap: Avoid use after free on rmap->obj array entries When calling irq_set_affinity_notifier() with NULL at the notify argument, it will cause freeing of the glue pointer in the corresponding array entry but will leave the pointer in the array. A subsequent call to free_irq_cpu_rmap() will try to free this entry again leading to possible use after free. Fix that by setting NULL to the array entry and checking that we have non-zero at the array entry when iterating over the array in free_irq_cpu_rmap(). The current code does not suffer from this since there are no cases where irq_set_affinity_notifier(irq, NULL) (note the NULL passed for the notify arg) is called, followed by a call to free_irq_cpu_rmap() so we don't hit and issue. Subsequent patches in this series excersize this flow, hence the required fix. Cc: Thomas Gleixner Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed Reviewed-by: Jacob Keller commit 6ae76cdbb576c703856f661cbf88c06ad963f67b Merge: a2e5260d07555 f99cdbd858df8 Author: Bjorn Andersson Date: Fri Mar 24 15:47:32 2023 -0700 Merge branch '20230307062232.4889-1-quic_kathirav@quicinc.com' into arm64-for-6.4 Merge in the topic branch with IPQ5332 GCC DT-binding, to ensure that the header file with GCC clock defines are available. commit a2e5260d07555834d14431399cefdd3220b917d6 Author: Krzysztof Kozlowski Date: Fri Mar 24 21:22:44 2023 +0100 arm64: dts: qcom: sdm630: move DSI opp-table into DSI node The soc node is supposed to have only device nodes with MMIO addresses, so move the DSI OPP into the DSI controller node to fix: sda660-inforce-ifc6560.dtb: soc: opp-table-dsi: {'compatible': ['operating-points-v2'], ... should not be valid under {'type': 'object'} From schema: dtschema/schemas/simple-bus.yaml Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230324202244.744271-5-krzysztof.kozlowski@linaro.org commit 338958e30c6897b7978019b5ea3fa1897cd511ba Author: Krzysztof Kozlowski Date: Fri Mar 24 21:22:43 2023 +0100 arm64: dts: qcom: msm8996-xiaomi: drop simple-bus from clocks 'clocks' node is not a bus, but just a placeholder for clocks: msm8996-xiaomi-gemini.dtb: clocks: $nodename:0: 'clocks' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$' From schema: dtschema/schemas/simple-bus.yaml msm8996-xiaomi-gemini.dtb: clocks: xo-board: {'compatible': ['fixed-clock'], '#clock-cells': [[0]], ... From schema: dtschema/schemas/simple-bus.yaml Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230324202244.744271-4-krzysztof.kozlowski@linaro.org commit 5574a5022df4cf67fdcf8c94bfbafb2cc296beee Author: Krzysztof Kozlowski Date: Fri Mar 24 21:22:42 2023 +0100 arm64: dts: qcom: msm8994-msft-lumia: drop simple-bus from clocks 'clocks' node is not a bus, but just a placeholder for clocks: msm8992-msft-lumia-octagon-talkman.dtb: clocks: $nodename:0: 'clocks' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$' From schema: dtschema/schemas/simple-bus.yaml msm8992-msft-lumia-octagon-talkman.dtb: clocks: xo-board: {'compatible': ['fixed-clock'], '#clock-cells': [[0]], ... From schema: dtschema/schemas/simple-bus.yaml Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230324202244.744271-3-krzysztof.kozlowski@linaro.org commit 704e26678c8d50d8988e30a47edddbb361e9e973 Author: Krzysztof Kozlowski Date: Fri Mar 24 21:22:41 2023 +0100 arm64: dts: qcom: apq8096-db820c: drop simple-bus from clocks 'clocks' node is not a bus, but just a placeholder for clocks: apq8096-db820c.dtb: clocks: $nodename:0: 'clocks' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$' From schema: dtschema/schemas/simple-bus.yaml apq8096-db820c.dtb: clocks: xo-board: {'compatible': ['fixed-clock'], '#clock-cells': [[0]], ... From schema: dtschema/schemas/simple-bus.yaml Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230324202244.744271-2-krzysztof.kozlowski@linaro.org commit 5dff5d092ba6c5485aac1467dad938c74ba6ed57 Author: Umesh Nerlige Ramappa Date: Fri Mar 24 14:39:18 2023 -0700 drm/i915/mtl: Disable C6 on MTL A0 for media Earlier merge dropped an if block when applying the patch - "drm/i915/mtl: Synchronize i915/BIOS on C6 enabling". Bring back the if block as the check is required by - "drm/i915/mtl: Disable MC6 for MTL A step" to disable C6 on media for A0 stepping. Fixes: 3735040978a4 ("drm/i915/mtl: Synchronize i915/BIOS on C6 enabling") Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Vinay Belgaumkar Link: https://patchwork.freedesktop.org/patch/msgid/20230324213918.75212-1-umesh.nerlige.ramappa@intel.com commit 419e505dab203b85facc782ec34d2d98601644ff Author: Ville Syrjälä Date: Wed Mar 22 20:12:19 2023 +0200 drm/i915: Add i915.enable_sagv modparam Currently we have no sane way to forcibly disable SAGV, which makes debugging things a PITA. Manually poking at the pcode mailbox with it's various SAGV/QGV/PSF formats is no fun, and likely to be clobbered by the driver anyway. Let's add a modparam for this. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230322181219.5511-1-ville.syrjala@linux.intel.com Reviewed-by: Rodrigo Vivi commit 2e4026a1a24d53651c80aca7e683cc86c96ed9c4 Author: Ville Syrjälä Date: Mon Mar 20 11:05:22 2023 +0200 drm/i915: Move PLANE_BUG_CFG bit definitions to the correct place All other skl+ universal plane register bit definitions are next to the pipe A register definition. Move the PLANE_BUF_CFG bit definitions there as well. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230320090522.9909-7-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit 9abb593e59ce0960a3282b3fd92b80d1aa426a0e Merge: c45b3804292ba 8d4cce50728ce Author: Martin K. Petersen Date: Fri Mar 24 17:57:19 2023 -0400 Merge patch series "arcmsr fixes" Ching Huang says: The following patches were made over mkp's 6.4/scsi-staging This series comtain some fixes: - Deprecate arcmsr_pci_unmap_dma() - Fix ADAPTER_TYPE_B 64-bit DMA compatibility issue - Fix reading buffer empty length error - Add driver proc_name - Update driver's version to v1.50.00.13-20230206 Link: https://lore.kernel.org/r/6f3eb04dbe89d2b9f239600dd2c575227f3c0afc.camel@areca.com.tw Signed-off-by: Martin K. Petersen commit c5de248484afeb6de259239a23645790038d9df3 Author: Ville Syrjälä Date: Mon Mar 20 11:05:21 2023 +0200 drm/i915/dpt: Add a modparam to disable DPT via the chicken bit Add i915.enable_dpt modparam to allow disabling the DPT usage in hardware via the chicken bit. Useful when debugging potential DPT issues. Quickly smoke tested on ADL. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230320090522.9909-6-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit 8d4cce50728ce86a469d39177b877c88ee2f3155 Author: ching Huang Date: Thu Mar 23 01:27:51 2023 +0800 scsi: arcmsr: Update driver version Update driver version to v1.50.00.13-20230206. Signed-off-by: ching Huang Link: https://lore.kernel.org/r/8022803536481106bbeca2f8eb33712668f41217.camel@areca.com.tw Signed-off-by: Martin K. Petersen commit 76556de243ac5b23929fb1d4bae5929d3c40f846 Author: ching Huang Date: Thu Mar 23 01:24:41 2023 +0800 scsi: arcmsr: Add driver proc_name Add driver proc_name. Signed-off-by: ching Huang Link: https://lore.kernel.org/r/045a0b360bd963987d9be08c1f0f785b47724caf.camel@areca.com.tw Signed-off-by: Martin K. Petersen commit 3e40814818cee1b564962786f867fb71bb754686 Author: ching Huang Date: Thu Mar 23 01:20:35 2023 +0800 scsi: arcmsr: Fix reading empty buffer length Fix empty buffer length error which causes ARECA CLI app command timeout. Signed-off-by: ching Huang Link: https://lore.kernel.org/r/4aec4385abc6eab10b575c28130ec615a144492d.camel@areca.com.tw Signed-off-by: Martin K. Petersen commit c3e9b937fb817ca36610dc10677cb1442aa07e72 Author: ching Huang Date: Thu Mar 23 01:13:20 2023 +0800 scsi: arcmsr: Fix ADAPTER_TYPE_B 64-bit DMA compatibility issue Fix ADAPTER_TYPE_B 64-bit DMA compatibility issue on some motherboards. Signed-off-by: ching Huang Link: https://lore.kernel.org/r/81c1f98819dfdfa18ae4d3b854b7733af9d34ea5.camel@areca.com.tw Signed-off-by: Martin K. Petersen commit 959c014ffcb4ee6f971e7c28bd7529d1361a66ff Author: ching Huang Date: Thu Mar 23 01:07:47 2023 +0800 scsi: arcmsr: Deprecate using arcmsr_pci_unmap_dma() Stop using arcmsr_pci_unmap_dma() and call scsi_dma_unmap() directly. Signed-off-by: ching Huang Link: https://lore.kernel.org/r/17c235f2fff960aefea33b50039e214f42164130.camel@areca.com.tw Signed-off-by: Martin K. Petersen commit c45b3804292ba5f95b86a8866e2e2cac03fa0155 Author: Lizhe Date: Sun Mar 19 12:27:32 2023 +0800 scsi: scsi_debug: Remove redundant driver match function If there is no driver match function, the driver core assumes that each candidate pair (driver, device) matches, see driver_match_device(). Drop the pseudo_lld bus match function that always returned 1. This results in the same behaviour as when there is no match function. [mkp+jgg: patch description] Signed-off-by: Lizhe Link: https://lore.kernel.org/r/20230319042732.278691-1-sensor1010@163.com Reviewed-by: John Garry Signed-off-by: Martin K. Petersen commit ae2fb3cb0f00482c0ec0079e4244bdee3e1fc46b Merge: 5c8c74ef20e79 ea87981a0ee8f Author: Martin K. Petersen Date: Fri Mar 24 17:39:15 2023 -0400 Merge patch series "target: TMF and recovery fixes" Mike Christie says: The following patches apply over Martin's 6.4 branches and Linus's tree. They fix a couple regressions in iscsit that occur when there are TMRs executing and a connection is closed. It also includes Dimitry's fixes in related code paths for cmd cleanup when ERL2 is used and the write pending hang during conn cleanup. This version of the patchset brings it back to just regressions and fixes for bugs we have a lot of users hitting. I'm going to fix isert and get it hooked into iscsit properly in a second patchset, because this one was getting so large. I've also moved my cleanup type of patches for a 3rd patchset. Link: https://lore.kernel.org/r/20230319015620.96006-1-michael.christie@oracle.com Signed-off-by: Martin K. Petersen commit ea87981a0ee8fb8ced1c87d004a541b60623ff97 Author: Dmitry Bogdanov Date: Sat Mar 18 20:56:20 2023 -0500 scsi: target: iscsi: Handle abort for WRITE_PENDING cmds Sometimes an initiator does not send data for a WRITE command and tries to abort it. The abort hangs waiting for frontend driver completion. iSCSI driver waits for data and that timeout eventually initiates connection reinstatment. The connection closing releases the commands in the connection, but those aborted commands still did not handle the abort and did not decrease a command ref counter. Because of that the connection reinstatement hangs indefinitely and prevents re-login for that initiator. Add handling in TCM of the abort for the WRITE_PENDING commands at connection closing moment to make it possible to release them. Signed-off-by: Dmitry Bogdanov [mnc: Rebase and expand comment] Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20230319015620.96006-10-michael.christie@oracle.com Signed-off-by: Martin K. Petersen commit cc79da306ebb2edb700c3816b90219223182ac3c Author: Mike Christie Date: Sat Mar 18 20:56:19 2023 -0500 scsi: target: iscsit: Fix TAS handling during conn cleanup Fix a bug added in commit f36199355c64 ("scsi: target: iscsi: Fix cmd abort fabric stop race"). If CMD_T_TAS is set on the se_cmd we must call iscsit_free_cmd() to do the last put on the cmd and free it, because the connection is down and we will not up sending the response and doing the put from the normal I/O path. Add a check for CMD_T_TAS in iscsit_release_commands_from_conn() so we now detect this case and run iscsit_free_cmd(). Fixes: f36199355c64 ("scsi: target: iscsi: Fix cmd abort fabric stop race") Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20230319015620.96006-9-michael.christie@oracle.com Signed-off-by: Martin K. Petersen commit 673db054d7a2b5a470d7a25baf65956d005ad729 Author: Mike Christie Date: Sat Mar 18 20:56:18 2023 -0500 scsi: target: Fix multiple LUN_RESET handling This fixes a bug where an initiator thinks a LUN_RESET has cleaned up running commands when it hasn't. The bug was added in commit 51ec502a3266 ("target: Delete tmr from list before processing"). The problem occurs when: 1. We have N I/O cmds running in the target layer spread over 2 sessions. 2. The initiator sends a LUN_RESET for each session. 3. session1's LUN_RESET loops over all the running commands from both sessions and moves them to its local drain_task_list. 4. session2's LUN_RESET does not see the LUN_RESET from session1 because the commit above has it remove itself. session2 also does not see any commands since the other reset moved them off the state lists. 5. sessions2's LUN_RESET will then complete with a successful response. 6. sessions2's inititor believes the running commands on its session are now cleaned up due to the successful response and cleans up the running commands from its side. It then restarts them. 7. The commands do eventually complete on the backend and the target starts to return aborted task statuses for them. The initiator will either throw a invalid ITT error or might accidentally lookup a new task if the ITT has been reallocated already. Fix the bug by reverting the patch, and serialize the execution of LUN_RESETs and Preempt and Aborts. Also prevent us from waiting on LUN_RESETs in core_tmr_drain_tmr_list, because it turns out the original patch fixed a bug that was not mentioned. For LUN_RESET1 core_tmr_drain_tmr_list can see a second LUN_RESET and wait on it. Then the second reset will run core_tmr_drain_tmr_list and see the first reset and wait on it resulting in a deadlock. Fixes: 51ec502a3266 ("target: Delete tmr from list before processing") Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20230319015620.96006-8-michael.christie@oracle.com Signed-off-by: Martin K. Petersen commit d8990b5a4d065f38f35d69bcd627ec5a7f8330ca Author: Dmitry Bogdanov Date: Sat Mar 18 20:56:17 2023 -0500 scsi: target: iscsit: Free cmds before session free Commands from recovery entries are freed after session has been closed. That leads to use-after-free at command free or NPE with such call trace: Time2Retain timer expired for SID: 1, cleaning up iSCSI session. BUG: kernel NULL pointer dereference, address: 0000000000000140 RIP: 0010:sbitmap_queue_clear+0x3a/0xa0 Call Trace: target_release_cmd_kref+0xd1/0x1f0 [target_core_mod] transport_generic_free_cmd+0xd1/0x180 [target_core_mod] iscsit_free_cmd+0x53/0xd0 [iscsi_target_mod] iscsit_free_connection_recovery_entries+0x29d/0x320 [iscsi_target_mod] iscsit_close_session+0x13a/0x140 [iscsi_target_mod] iscsit_check_post_dataout+0x440/0x440 [iscsi_target_mod] call_timer_fn+0x24/0x140 Move cleanup of recovery enrties to before session freeing. Reported-by: Forza Signed-off-by: Dmitry Bogdanov Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20230319015620.96006-7-michael.christie@oracle.com Reviewed-by: Maurizio Lombardi Signed-off-by: Martin K. Petersen commit 395cee83d02de3073211b04fc85724f4abc663ad Author: Mike Christie Date: Sat Mar 18 20:56:16 2023 -0500 scsi: target: iscsit: Stop/wait on cmds during conn close This fixes a bug added in commit f36199355c64 ("scsi: target: iscsi: Fix cmd abort fabric stop race"). If we have multiple sessions to the same se_device we can hit a race where a LUN_RESET on one session cleans up the se_cmds from under another session which is being closed. This results in the closing session freeing its conn/session structs while they are still in use. The bug is: 1. Session1 has IO se_cmd1. 2. Session2 can also have se_cmds for I/O and optionally TMRs for ABORTS but then gets a LUN_RESET. 3. The LUN_RESET on session2 sees the se_cmds on session1 and during the drain stages marks them all with CMD_T_ABORTED. 4. session1 is now closed so iscsit_release_commands_from_conn() only sees se_cmds with the CMD_T_ABORTED bit set and returns immediately even though we have outstanding commands. 5. session1's connection and session are freed. 6. The backend request for se_cmd1 completes and it accesses the freed connection/session. This hooks the iscsit layer into the cmd counter code, so we can wait for all outstanding se_cmds before freeing the connection. Fixes: f36199355c64 ("scsi: target: iscsi: Fix cmd abort fabric stop race") Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20230319015620.96006-6-michael.christie@oracle.com Reviewed-by: Maurizio Lombardi Signed-off-by: Martin K. Petersen commit 6d256bee602b131bd4fbc92863b6a1210bcf6325 Author: Mike Christie Date: Sat Mar 18 20:56:15 2023 -0500 scsi: target: iscsit: isert: Alloc per conn cmd counter This has iscsit allocate a per conn cmd counter and converts iscsit/isert to use it instead of the per session one. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20230319015620.96006-5-michael.christie@oracle.com Signed-off-by: Martin K. Petersen commit 8e288be8606ad87c1726618eacfb8fbd3ab4b806 Author: Mike Christie Date: Sat Mar 18 20:56:14 2023 -0500 scsi: target: Pass in cmd counter to use during cmd setup Allow target_get_sess_cmd() users to pass in the cmd counter they want to use. Right now we pass in the session's cmd counter but in a subsequent commit iSCSI will switch from per session to per conn. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20230319015620.96006-4-michael.christie@oracle.com Signed-off-by: Martin K. Petersen commit 4edba7e4a8f39112398d3cda94128a8e13a7d527 Author: Mike Christie Date: Sat Mar 18 20:56:13 2023 -0500 scsi: target: Move cmd counter allocation iSCSI needs to allocate its cmd counter per connection for MCS support where we need to stop and wait on commands running on a connection instead of per session. This moves the cmd counter allocation to target_setup_session() which is used by drivers that need the stop+wait behavior per session. xcopy doesn't need stop+wait at all, so we will be OK moving the cmd counter allocation outside of transport_init_session(). Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20230319015620.96006-3-michael.christie@oracle.com Signed-off-by: Martin K. Petersen commit becd9be6069e7b183c084f460f0eb363e43cc487 Author: Mike Christie Date: Sat Mar 18 20:56:12 2023 -0500 scsi: target: Move sess cmd counter to new struct iSCSI needs to wait on outstanding commands like how SRP and the FC/FCoE drivers do. It can't use target_stop_session() because for MCS support we can't stop the entire session during recovery because if other connections are OK then we want to be able to continue to execute I/O on them. Move the per session cmd counters to a new struct so iSCSI can allocate them per connection. The xcopy code can also just not allocate in the future since it doesn't need to track commands. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20230319015620.96006-2-michael.christie@oracle.com Reviewed-by: Maurizio Lombardi Signed-off-by: Martin K. Petersen commit d563164eaeb1a995c2a10ace6fdb0a730b41c167 Author: Aaron Lewis Date: Tue Feb 21 16:36:55 2023 +0000 KVM: selftests: Check that XTILEDATA supports XFD Check that XTILEDATA supports XFD. In amx_test, add the requirement that the guest allows the xfeature, XTILEDATA, to be set in XFD. Otherwise, the test may fail. Signed-off-by: Aaron Lewis Signed-off-by: Mingwei Zhang Link: https://lore.kernel.org/r/20230221163655.920289-14-mizhang@google.com Signed-off-by: Sean Christopherson commit d32fb071429360f5f597c284087c845b2f748ebe Author: Aaron Lewis Date: Tue Feb 21 16:36:54 2023 +0000 KVM: selftests: Check that the palette table exists before using it Check that the palette table exists before using it. The maximum number of AMX palette tables is enumerated by CPUID.1DH:EAX. Assert that the palette used in amx_test, CPUID.1DH.1H, does not exceed that maximum. Signed-off-by: Aaron Lewis Signed-off-by: Mingwei Zhang Link: https://lore.kernel.org/r/20230221163655.920289-13-mizhang@google.com Signed-off-by: Sean Christopherson commit d01d4a4f7bd2197208b904378debf3331eec936e Author: Aaron Lewis Date: Tue Feb 21 16:36:53 2023 +0000 KVM: selftests: Move XSAVE and OSXSAVE CPUID checks into AMX's init_regs() Move the checks on XSAVE and OSXSAVE into init_regs() so that the XSAVE check is done before setting CR4.OSXSAVE, i.e. before a potential #GP, and so that the OSXSAVE check is performend immediately after enabling XSAVE in CR4. Signed-off-by: Aaron Lewis Signed-off-by: Mingwei Zhang Link: https://lore.kernel.org/r/20230221163655.920289-12-mizhang@google.com [sean: keep XSAVE check, rewrite changelog accordingly] Signed-off-by: Sean Christopherson commit 2ab3991b0b9b57affd26ab116c6e1aab5c1bf8c3 Author: Aaron Lewis Date: Tue Feb 21 16:36:52 2023 +0000 KVM: selftests: Assert that both XTILE{CFG,DATA} are XSAVE-enabled Assert that both XTILE{CFG,DATA} are written and read back via XSETBV and XGETBV respectively. The original check in amx_test only ensures at least one of the XTILE bits are set, XTILECFG or XTILEDATA, when it really should be checking that both are set. Fixes: bf70636d9443 ("selftest: kvm: Add amx selftest") Signed-off-by: Aaron Lewis Signed-off-by: Mingwei Zhang Link: https://lore.kernel.org/r/20230221163655.920289-11-mizhang@google.com [sean: massage changelog] Signed-off-by: Sean Christopherson commit 7e1075f050782c4d1249ebb15f63836bc2a94a97 Author: Aaron Lewis Date: Tue Feb 21 16:36:51 2023 +0000 KVM: selftests: Assert that XTILE is XSAVE-enabled Assert that XTILE is XSAVE-enabled. check_xsave_supports_xtile() doesn't actually check anything since its return value is not used. Add the intended assert. Opportunistically, move the assert to a more appropriate location: immediately after XSETBV and remove check_xsave_supports_xtile(). Fixes: 5dc19f1c7dd3 ("KVM: selftests: Convert AMX test to use X86_PROPRETY_XXX") Signed-off-by: Aaron Lewis Signed-off-by: Mingwei Zhang Link: https://lore.kernel.org/r/20230221163655.920289-10-mizhang@google.com Signed-off-by: Sean Christopherson commit bfc5afc37c9dba85f8c057fb85109a72e72d64a5 Author: Mingwei Zhang Date: Tue Feb 21 16:36:50 2023 +0000 KVM: selftests: Verify XTILE_DATA in XSTATE isn't affected by IA32_XFD Add asserts to verify the XSTATE metadata for XTILE_DATA isn't affected by disabling AMX tile data via IA32_XFD. XFD doesn't intercept XSAVE, it only prevents setting bits in XCR0, i.e. regardless of XFD, AMX state is managed by XSAVE/XRSTOR as long as the corresponding bits are set XCR0. Signed-off-by: Mingwei Zhang Link: https://lore.kernel.org/r/20230221163655.920289-9-mizhang@google.com [sean: massage changelog] Signed-off-by: Sean Christopherson commit 9cbd9aaa670f7be61ba569f5c3ebafc2e0aabeb6 Author: Mingwei Zhang Date: Tue Feb 21 16:36:48 2023 +0000 KVM: selftests: Assert that XTILE_DATA is set in IA32_XFD on #NM Add an extra check to IA32_XFD to ensure that XTILE_DATA is actually set, i.e. is consistent with the AMX architecture. In addition, repeat the checks after the guest/host world switch to ensure the values of IA32_XFD and IA32_XFD_ERR are well preserved. Signed-off-by: Mingwei Zhang Link: https://lore.kernel.org/r/20230221163655.920289-7-mizhang@google.com [sean: massage changelog] Signed-off-by: Sean Christopherson commit 0aeb9729486a32fab168114b00006b2643aa8a41 Author: Mingwei Zhang Date: Tue Feb 21 16:36:47 2023 +0000 KVM: selftests: Add check of CR0.TS in the #NM handler in amx_test Be extra paranoid and assert that CR0.TS is clear when verifying the #NM in the AMX test is due to the expected XFeature Disable error, i.e. that the #NM isn't due to CR0.TS=1. Signed-off-by: Mingwei Zhang Link: https://lore.kernel.org/r/20230221163655.920289-6-mizhang@google.com [sean: reword changelog to make it clear this is pure paranoia] Signed-off-by: Sean Christopherson commit 48ad4222c43ceb5ce303758ff26e1d8c881502ac Author: Mingwei Zhang Date: Tue Feb 21 16:36:46 2023 +0000 KVM: selftests: Enable checking on xcomp_bv in amx_test After tilerelease instruction, AMX tiles are in INIT state. According to Intel SDM vol 1. 13.10: "If RFBM[i] = 1, XSTATE_BV[i] is set to the value of XINUSE[i].", XSTATE_BV[18] should be cleared after xsavec. On the other hand, according to Intel SDM vol 1. 13.4.3: "If XCOMP_BV[i] = 1, state component i is located at a byte offset locationI from the base address of the XSAVE area". Since at the time of xsavec, XCR0[18] is set indicating AMX tile data component is still enabled, xcomp_bv[18] should be set. Complete the checks by adding the assert to xcomp_bv[18] after xsavec. Signed-off-by: Mingwei Zhang Link: https://lore.kernel.org/r/20230221163655.920289-5-mizhang@google.com Signed-off-by: Sean Christopherson commit bec357a4af5579a60eaba6d42f7d3662d4323767 Author: Mingwei Zhang Date: Tue Feb 21 16:36:45 2023 +0000 KVM: selftests: Fix an error in comment of amx_test After the execution of __tilerelease(), AMX component will be in INIT state. Therefore, execution of XSAVEC saving the AMX state into memory will cause the xstate_bv[18] cleared in xheader. However, the xcomp_bv[18] will remain set. Fix the error in comment. Also, update xsavec() to XSAVEC because xcomp_bv[18] is set due to the instruction, not the function. Finally, use XTILEDATA instead 'bit 18' in comments. Cc: Jim Mattson Cc: Venkatesh Srinivas Cc: Aaron Lewis Signed-off-by: Mingwei Zhang Link: https://lore.kernel.org/r/20230221163655.920289-4-mizhang@google.com Signed-off-by: Sean Christopherson commit 5de4a3765b7e703374aa955662bba67475a7ac92 Author: Mingwei Zhang Date: Tue Feb 21 16:36:44 2023 +0000 KVM: selftests: Add a fully functional "struct xstate" for x86 Add a working xstate data structure for the usage of AMX and potential future usage on other xstate components. AMX selftest requires checking both the xstate_bv and xcomp_bv. Existing code relies on pointer arithmetics to fetch xstate_bv and does not support xcomp_bv. So, add a working xstate data structure into processor.h for x86. Suggested-by: Sean Christopherson Signed-off-by: Mingwei Zhang Link: https://lore.kernel.org/r/20230221163655.920289-3-mizhang@google.com Signed-off-by: Sean Christopherson commit 735b0e0f2d001b7ed9486db84453fb860e764a4d Author: Ivan Orlov Date: Wed Mar 22 18:45:28 2023 +0400 KVM: selftests: Add 'malloc' failure check in vcpu_save_state There is a 'malloc' call in vcpu_save_state function, which can be unsuccessful. This patch will add the malloc failure checking to avoid possible null dereference and give more information about test fail reasons. Signed-off-by: Ivan Orlov Link: https://lore.kernel.org/r/20230322144528.704077-1-ivan.orlov0322@gmail.com Signed-off-by: Sean Christopherson commit 8264e85560e5fae942ca42aae1df7daeb5aaa30e Author: Ackerley Tng Date: Mon Feb 27 18:06:01 2023 +0000 KVM: selftests: Adjust VM's initial stack address to align with SysV ABI spec Align the guest stack to match calling sequence requirements in section "The Stack Frame" of the System V ABI AMD64 Architecture Processor Supplement, which requires the value (%rsp + 8), NOT %rsp, to be a multiple of 16 when control is transferred to the function entry point. I.e. in a normal function call, %rsp needs to be 16-byte aligned _before_ CALL, not after. This fixes unexpected #GPs in guest code when the compiler uses SSE instructions, e.g. to initialize memory, as many SSE instructions require memory operands (including those on the stack) to be 16-byte-aligned. Signed-off-by: Ackerley Tng Link: https://lore.kernel.org/r/20230227180601.104318-1-ackerleytng@google.com Signed-off-by: Sean Christopherson commit 5b1abc285a083f76e9987efa9e78ecc18d5d202f Author: Like Xu Date: Mon Mar 13 16:53:11 2023 +0800 KVM: selftests: Report enable_pmu module value when test is skipped Running x86_64/pmu_event_filter_test or x86_64/vmx_pmu_caps_test with enable_pmu globally disabled will report the following into: 1..0 # SKIP - Requirement not met: use_intel_pmu() || use_amd_pmu() or 1..0 # SKIP - Requirement not met: kvm_cpu_has(X86_FEATURE_PDCM) this can be confusing, so add a check on kvm.enable_pmu. Signed-off-by: Like Xu Link: https://lore.kernel.org/r/20230313085311.25327-3-likexu@tencent.com Signed-off-by: Sean Christopherson commit 3c01b05407bfeb42c4db0f7cc079437228ab0ab2 Author: Rob Herring Date: Sun Mar 19 11:31:25 2023 -0500 ARM: bcm: Use of_address_to_resource() Replace open coded parsing of "reg" with of_address_to_resource(). Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230319163125.224833-1-robh@kernel.org Signed-off-by: Florian Fainelli commit 5c8c74ef20e7973c270498dbbf96170c9f92dae3 Author: Gustavo A. R. Silva Date: Fri Mar 17 10:59:48 2023 -0600 scsi: target: uapi: Replace fake flex-array with flexible-array member Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Address the following warning found with GCC-13 and -fstrict-flex-arrays=3 enabled: CC drivers/target/target_core_user.o drivers/target/target_core_user.c: In function ‘queue_cmd_ring’: drivers/target/target_core_user.c:1096:15: warning: array subscript 0 is outside array bounds of ‘struct iovec[0]’ [-Warray-bounds=] 1096 | iov = &entry->req.iov[0]; | ^~~~~~~~~~~~~~~~~~ In file included from drivers/target/target_core_user.c:31: ./include/uapi/linux/target_core_user.h:122:38: note: while referencing ‘iov’ 122 | struct iovec iov[0]; | ^~~ This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/270 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/ZBSchMvTdl7VObKI@work Reviewed-by: Bodo Stroesser Reviewed-by: Kees Cook Signed-off-by: Martin K. Petersen commit d93523877e6f3e34de749dcaef385e5df5d884fd Author: Jiapeng Chong Date: Fri Mar 17 13:49:40 2023 +0800 scsi: hpsa: Remove unused variable transMethod The variable transMethod is not used. Delete it. drivers/scsi/hpsa.c:9478:16: warning: variable 'transMethod' set but not used. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4554 Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20230317054940.86685-1-jiapeng.chong@linux.alibaba.com Acked-by: Don Brace Signed-off-by: Martin K. Petersen commit dc4c6232b8831ee4884b1026fcd963bd7e3ae21f Merge: 24d80fde40c99 3f58f6dc4d92e Author: Mark Brown Date: Fri Mar 24 20:36:50 2023 +0000 Introduce a helper to translate register addresses Merge series from Maxime Chevallier : This introduces a helper that factors out register rewriting, it will be the basis for further work that will need cross tree merges so is on a branch. commit e45d6a52fe2b0df9b8e22e52c6c441902201920e Merge: 4b740779ac03f 45b32b946a97b Author: Palmer Dabbelt Date: Thu Mar 23 08:47:05 2023 -0700 Merge patch series "riscv: Add GENERIC_ENTRY support" guoren@kernel.org says: From: Guo Ren The patches convert riscv to use the generic entry infrastructure from kernel/entry/*. Some optimization for entry.S with new .macro and merge ret_from_kernel_thread into ret_from_fork. * b4-shazam-merge: riscv: entry: Consolidate general regs saving/restoring riscv: entry: Consolidate ret_from_kernel_thread into ret_from_fork riscv: entry: Remove extra level wrappers of trace_hardirqs_{on,off} riscv: entry: Convert to generic entry riscv: entry: Add noinstr to prevent instrumentation inserted riscv: ptrace: Remove duplicate operation Link: https://lore.kernel.org/r/20230222033021.983168-1-guoren@kernel.org Signed-off-by: Palmer Dabbelt commit 340133318800b55784792d762c7713265c96336a Author: Lukas Bulwahn Date: Fri Mar 24 10:21:14 2023 +0100 selinux: clean up dead code after removing runtime disable Commit f22f9aaf6c3d ("selinux: remove the runtime disable functionality") removes the config SECURITY_SELINUX_DISABLE. This results in some dead code in lsm_hooks.h. Remove this dead code. Signed-off-by: Lukas Bulwahn Signed-off-by: Paul Moore commit 55fbae05476df65e5eee8be54f61d0257af0240b Author: Martin KaFai Lau Date: Fri Mar 24 11:42:41 2023 -0700 bpf: Check IS_ERR for the bpf_map_get() return value This patch fixes a mistake in checking NULL instead of checking IS_ERR for the bpf_map_get() return value. It also fixes the return value in link_update_map() from -EINVAL to PTR_ERR(*_map). Reported-by: syzbot+71ccc0fe37abb458406b@syzkaller.appspotmail.com Fixes: 68b04864ca42 ("bpf: Create links for BPF struct_ops maps.") Fixes: aef56f2e918b ("bpf: Update the struct_ops of a bpf_link.") Signed-off-by: Martin KaFai Lau Acked-by: Kui-Feng Lee Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230324184241.1387437-1-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 7ed34927254ae9eac0f6b0ad7e7c2bceb96fcdfc Merge: 9578a10d4a2b4 883631771038d Author: Daniel Vetter Date: Fri Mar 24 20:22:02 2023 +0100 Merge tag 'drm-intel-next-2023-03-23' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Core Changes: - drm: Add SDP Error Detection Configuration Register (Arun) Driver Changes: - Meteor Lake enabling and fixes (RK, Jose, Madhumitha) - Lock the fbdev obj before vma pin (Tejas) - DSC fixes (Stanislav) - Fixes and clean-up on opregion code (Imre) - More wm/vblank stuff (Ville) - More general display code organization (Jani) - DP Fixes (Stanislav, Ville) - Introduce flags to ignore long HPD and link training issues \ for handling spurious issues on CI (Vinod) - Plane cleanups and extra registers (Ville) - Update audio keepalive clock values (Clint) - Rename find_section to bdb_find_section (Maarten) - DP SDP CRC16 for 128b132b link layer (Arun) - Fix various issues with noarm register writes (Ville) - Fix a few TypeC / MST issues (Imre) - Create GSC submission targeting HDCP and PXP usages on MTL+ (Suraj) - Enable HDCP2.x via GSC CS (Suraj) Signed-off-by: Daniel Vetter From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ZBy56qc9C00tCLOY@intel.com commit 4334aec07a62e3b1afdf54f63dca757e4ce9518c Author: Rob Herring Date: Mon Mar 20 18:38:21 2023 -0500 dt-bindings: display: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Reviewed-by: Chun-Kuang Hu Reviewed-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart Acked-by: Miguel Ojeda Reviewed-by: Dmitry Baryshkov #display/msm Link: https://lore.kernel.org/r/20230320233823.2919475-1-robh@kernel.org Signed-off-by: Rob Herring commit 3f58f6dc4d92ed6fae4a4da0d5b091e00ec10fa8 Author: Maxime Chevallier Date: Fri Mar 24 10:36:38 2023 +0100 regmap: add a helper to translate the register address Register addresses passed to regmap operations can be offset with regmap.reg_base and downshifted with regmap.reg_downshift. Add a helper to apply both these operations and return the translated address, that we can then use to perform the actual register operation ont the underlying bus. Signed-off-by: Maxime Chevallier Link: https://lore.kernel.org/r/20230324093644.464704-2-maxime.chevallier@bootlin.com Signed-off-by: Mark Brown commit 9578a10d4a2b4bcbbebefb4156c16c82ee725b3a Merge: d36d68fd1925d 4ab9157c7e020 Author: Daniel Vetter Date: Fri Mar 24 19:35:37 2023 +0100 Merge tag 'drm-misc-next-2023-03-23' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v6.4-rc1: Core Changes: - Add unit test for xrgb8888 to mono. - Assorted small fixes to format helper selftests. - Assorted documentation updates. - Drop drm_dev_set_unique. - Always use shadow buffer in generic fbdev emulation helpers, and improve error handling. Driver Changes: - Assorted small fixes to malidp, hdlcd, gma500, lima, bridge, rockchip. - Move fbdev in gma500 to use drm_client. - Convert bridge platform callbacks to void return. - Drop leftover from vgem to shmem helper conversion. Signed-off-by: Daniel Vetter From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/5a4c438e-7047-c044-fc77-5a3597000264@linux.intel.com commit 3edf091d5c1241fa191a1d860a3930411fc81d79 Author: Bagas Sanjaya Date: Fri Mar 24 15:53:10 2023 +0700 Documentation: core-api: update kernel-doc reference to kmod.c Commit d6f819908f8aac ("module: fold usermode helper kmod into modules directory") moves kmod helper implementation (kmod.c) to kernel/module/ directory but forgets to update its reference on kernel api doc, hence: WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -sphinx-version 2.4.4 -export ./kernel/kmod.c' failed with return code 2 Update the reference. Fixes: d6f819908f8aac ("module: fold usermode helper kmod into modules directory") Reported-by: Stephen Rothwell Link: https://lore.kernel.org/linux-next/20230324154413.19cc78be@canb.auug.org.au/ Signed-off-by: Bagas Sanjaya Reviewed-by: Liam Beguin Signed-off-by: Luis Chamberlain commit 33c951f62920d144ca89daa0560180a49afb6f1e Author: Jim Cromie Date: Tue Mar 21 19:36:23 2023 -0600 module: already_uses() - reduce pr_debug output volume already_uses() is unnecessarily chatty. `modprobe i915` yields 491 messages like: [ 64.108744] i915 uses drm! This is a normal situation, and isn't worth all the log entries. NOTE: I've preserved the "does not use %s" messages, which happens less often, but does happen. Its not clear to me what it tells a reader, or what info might improve the pr_debug's utility. [ 6847.584999] main:already_uses:569: amdgpu does not use ttm! [ 6847.585001] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585014] main:already_uses:569: amdgpu does not use drm! [ 6847.585016] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585024] main:already_uses:569: amdgpu does not use drm_display_helper! [ 6847.585025] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585084] main:already_uses:569: amdgpu does not use drm_kms_helper! [ 6847.585086] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585175] main:already_uses:569: amdgpu does not use drm_buddy! [ 6847.585176] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585202] main:already_uses:569: amdgpu does not use i2c_algo_bit! [ 6847.585204] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585249] main:already_uses:569: amdgpu does not use gpu_sched! [ 6847.585250] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585314] main:already_uses:569: amdgpu does not use video! [ 6847.585315] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585409] main:already_uses:569: amdgpu does not use iommu_v2! [ 6847.585410] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6847.585816] main:already_uses:569: amdgpu does not use drm_ttm_helper! [ 6847.585818] main:add_module_usage:584: Allocating new usage for amdgpu. [ 6848.762268] dyndbg: add-module: amdgpu.2533 sites no functional changes. Signed-off-by: Jim Cromie Signed-off-by: Luis Chamberlain commit 66a2301edf313d630c2ece4f3721c5b3402653ee Author: Jim Cromie Date: Tue Mar 21 19:36:22 2023 -0600 module: add section-size to move_module pr_debug move_module() pr_debug's "Final section addresses for $modname". Add section addresses to the message, for anyone looking at these. no functional changes. Signed-off-by: Jim Cromie Signed-off-by: Luis Chamberlain commit b10addf37bbcaee66672eb54c15532266c8daea6 Author: Jim Cromie Date: Tue Mar 21 19:36:21 2023 -0600 module: add symbol-name to pr_debug Absolute symbol The pr_debug("Absolute symbol" ..) reports value, (which is usually 0), but not the name, which is more informative. So add it. no functional changes Signed-off-by: Jim Cromie Signed-off-by: Luis Chamberlain commit 6ed81802d4d1b037ad2d1657511ff0c2e9aeda14 Author: Jim Cromie Date: Tue Mar 21 19:36:20 2023 -0600 module: in layout_sections, move_module: add the modname layout_sections() and move_module() each issue ~50 messages for each module loaded. Add mod-name into their 2 header lines, to help the reader find his module. no functional changes. Signed-off-by: Jim Cromie Signed-off-by: Luis Chamberlain commit 25be451aa4c0e9a96c59a626ab0e93d5cb7f6f48 Author: Luis Chamberlain Date: Sun Mar 19 14:35:42 2023 -0700 module: fold usermode helper kmod into modules directory The kernel/kmod.c is already only built if we enabled modules, so just stuff it under kernel/module/kmod.c and unify the MAINTAINERS file for it. Signed-off-by: Luis Chamberlain commit 3d40bb903ed1f654707d34bdd61ee2c332000e4b Author: Luis Chamberlain Date: Sun Mar 19 14:35:41 2023 -0700 module: merge remnants of setup_load_info() to elf validation The setup_load_info() was actually had ELF validation checks of its own. To later cache useful variables as an secondary step just means looping again over the ELF sections we just validated. We can simply keep tabs of the key sections of interest as we validate the module ELF section in one swoop, so do that and merge the two routines together. Expand a bit on the documentation / intent / goals. Signed-off-by: Luis Chamberlain commit 1bb49db9919a4d4186cba288930e7026d8f7ec96 Author: Luis Chamberlain Date: Sun Mar 19 14:35:40 2023 -0700 module: move more elf validity checks to elf_validity_check() The symbol and strings section validation currently happen in setup_load_info() but since they are also doing validity checks move this to elf_validity_check(). Signed-off-by: Luis Chamberlain commit c7ee8aebf6c0588c0aab76538aff395c3abf811c Author: Luis Chamberlain Date: Sun Mar 19 14:35:39 2023 -0700 module: add stop-grap sanity check on module memcpy() The integrity of the struct module we load is important, and although our ELF validator already checks that the module section must match struct module, add a stop-gap check before we memcpy() the final minted module. This also makes those inspecting the code what the goal is. While at it, clarify the goal behind updating the sh_addr address. The current comment is pretty misleading. Signed-off-by: Luis Chamberlain commit 46752820f9abc013b6bd8172562b642376723313 Author: Luis Chamberlain Date: Sun Mar 19 14:35:38 2023 -0700 module: add sanity check for ELF module section The ELF ".gnu.linkonce.this_module" section is special, it is what we use to construct the struct module __this_module, which THIS_MODULE points to. When userspace loads a module we always deal first with a copy of the userspace buffer, and twiddle with the userspace copy's version of the struct module. Eventually we allocate memory to do a memcpy() of that struct module, under the assumption that the module size is right. But we have no validity checks against the size or the requirements for the section. Add some validity checks for the special module section early and while at it, cache the module section index early, so we don't have to do that later. While at it, just move over the assigment of the info->mod to make the code clearer. The validity checker also adds an explicit size check to ensure the module section size matches the kernel's run time size for sizeof(struct module). This should prevent sloppy loads of modules which are built today *without* actually increasing the size of the struct module. A developer today can for example expand the size of struct module, rebuild a directoroy 'make fs/xfs/' for example and then try to insmode the driver there. That module would in effect have an incorrect size. This new size check would put a stop gap against such mistakes. This also makes the entire goal of ".gnu.linkonce.this_module" pretty clear. Before this patch verification of the goal / intent required some Indian Jones whips, torches and cleaning up big old spider webs. Signed-off-by: Luis Chamberlain commit 419e1a20f7bdef5380fde5ed73f05c98c28a598b Author: Luis Chamberlain Date: Sun Mar 19 14:27:46 2023 -0700 module: rename check_module_license_and_versions() to check_export_symbol_versions() This makes the routine easier to understand what the check its checking for. Signed-off-by: Luis Chamberlain commit 72f08b3cc631f4ebcaa9f373d18fc0b877fb6458 Author: Luis Chamberlain Date: Sun Mar 19 14:27:45 2023 -0700 module: converge taint work together Converge on a compromise: so long as we have a module hit our linked list of modules we taint. That is, the module was about to become live. Signed-off-by: Luis Chamberlain commit c3bbf62ebf8c9e87cea875cfa146f44f46af4145 Author: Luis Chamberlain Date: Sun Mar 19 14:27:44 2023 -0700 module: move signature taint to module_augment_kernel_taints() Just move the signature taint into the helper: module_augment_kernel_taints() Signed-off-by: Luis Chamberlain commit a12b94511cf36855cd731c16005bd535e2007552 Author: Luis Chamberlain Date: Sun Mar 19 14:27:43 2023 -0700 module: move tainting until after a module hits our linked list It is silly to have taints spread out all over, we can just compromise and add them if the module ever hit our linked list. Our sanity checkers should just prevent crappy drivers / bogus ELF modules / etc and kconfig options should be enough to let you *not* load things you don't want. Signed-off-by: Luis Chamberlain commit 437c1f9cc61fd37829eaf12d8ae2f7dcc5dddce0 Author: Luis Chamberlain Date: Sun Mar 19 14:27:42 2023 -0700 module: split taint adding with info checking check_modinfo() actually does two things: a) sanity checks, some of which are fatal, and so we prevent the user from completing trying to load a module b) taints the kernel The taints are pretty heavy handed because we're tainting the kernel *before* we ever even get to load the module into the modules linked list. That is, it it can fail for other reasons later as we review the module's structure. But this commit makes no functional changes, it just makes the intent clearer and splits the code up where needed to make that happen. Signed-off-by: Luis Chamberlain commit ed52cabecb7a7e4242cee9c370c2622a47177d5d Author: Luis Chamberlain Date: Sun Mar 19 14:27:41 2023 -0700 module: split taint work out of check_modinfo_livepatch() The work to taint the kernel due to a module should be split up eventually. To aid with this, split up the tainting on check_modinfo_livepatch(). This let's us bring more early checks together which do return a value, and makes changes easier to read later where we stuff all the work to do the taints in one single routine. Signed-off-by: Luis Chamberlain commit ad8d3a36e981064f8a646531cddca30516894457 Author: Luis Chamberlain Date: Sun Mar 19 14:27:40 2023 -0700 module: rename set_license() to module_license_taint_check() The set_license() routine would seem to a reader to do some sort of setting, but it does not. It just adds a taint if the license is not set or proprietary. This makes what the code is doing clearer, so much we can remove the comment about it. Signed-off-by: Luis Chamberlain commit 02da2cbab452a236fa67abc9fc9e47430934e652 Author: Luis Chamberlain Date: Sun Mar 19 14:27:39 2023 -0700 module: move check_modinfo() early to early_mod_check() This moves check_modinfo() to early_mod_check(). This doesn't make any functional changes either, as check_modinfo() was the first call on layout_and_allocate(), so we're just moving it back one routine and at the end. This let's us keep separate the checkers from the allocator. Signed-off-by: Luis Chamberlain commit 85e6f61c134f111232d27d3f63667c1bccbbc12d Author: Luis Chamberlain Date: Sun Mar 19 14:27:38 2023 -0700 module: move early sanity checks into a helper Move early sanity checkers for the module into a helper. This let's us make it clear when we are working with the local copy of the module prior to allocation. This produces no functional changes, it just makes subsequent changes easier to read. Signed-off-by: Luis Chamberlain commit db88681c4885b8f2f07241c6f3f1fcf2d773754e Merge: a57915aee3159 9083e0b09df33 Author: Marc Kleine-Budde Date: Fri Mar 24 19:14:02 2023 +0100 Merge patch series "can: m_can: Optimizations for m_can/tcan part 2" Markus Schneider-Pargmann says: third version part 2, functionally I had to move from spin_lock to spin_lock_irqsave because of an interrupt that was calling start_xmit, see attached stack. This is tested on tcan455x but I don't have the integrated hardware myself so any testing is appreciated. The series implements many small and bigger throughput improvements. Changes in v3: - Remove parenthesis in error messages - Use memcpy_and_pad for buffer copy in 'can: m_can: Write transmit header and data in one transaction'. - Replace spin_lock with spin_lock_irqsave. I got a report of a interrupt that was calling start_xmit just after the netqueue was woken up before the locked region was exited. spin_lock_irqsave should fix this. I attached the full stack at the end of the mail if someone wants to know. - Rebased to v6.3-rc1. - Removed tcan4x5x patches from this series. Changes in v2: https://lore.kernel.org/all/20230125195059.630377-1-msp@baylibre.com - Rebased on v6.2-rc5 - Fixed missing/broken accounting for non peripheral m_can devices. part 1: v1 - https://lore.kernel.org/lkml/20221116205308.2996556-1-msp@baylibre.com v2 - https://lore.kernel.org/lkml/20221206115728.1056014-1-msp@baylibre.com part 2: v1 - https://lore.kernel.org/lkml/20221221152537.751564-1-msp@baylibre.com v2 - https://lore.kernel.org/lkml/20230125195059.630377-1-msp@baylibre.com stack of calling start_xmit within locked region: [ 308.170171] dump_backtrace+0x0/0x1a0 [ 308.173841] show_stack+0x18/0x70 [ 308.177158] sched_show_task+0x154/0x180 [ 308.181084] dump_cpu_task+0x44/0x54 [ 308.184664] rcu_dump_cpu_stacks+0xe8/0x12c [ 308.188846] rcu_sched_clock_irq+0x9f4/0xd10 [ 308.193118] update_process_times+0x9c/0xec [ 308.197304] tick_sched_handle+0x34/0x60 [ 308.201231] tick_sched_timer+0x4c/0xa4 [ 308.205071] __hrtimer_run_queues+0x138/0x1e0 [ 308.209429] hrtimer_interrupt+0xe8/0x244 [ 308.213440] arch_timer_handler_phys+0x38/0x50 [ 308.217890] handle_percpu_devid_irq+0x84/0x130 [ 308.222422] handle_domain_irq+0x60/0x90 [ 308.226347] gic_handle_irq+0x54/0x130 [ 308.230099] do_interrupt_handler+0x34/0x60 [ 308.234286] el1_interrupt+0x30/0x80 [ 308.237861] el1h_64_irq_handler+0x18/0x24 [ 308.241958] el1h_64_irq+0x78/0x7c [ 308.245360] queued_spin_lock_slowpath+0xf4/0x390 [ 308.250067] m_can_start_tx+0x20/0xb0 [m_can] [ 308.254431] m_can_start_xmit+0xd8/0x230 [m_can] [ 308.259054] dev_hard_start_xmit+0xd4/0x15c [ 308.263241] sch_direct_xmit+0xe8/0x370 [ 308.267080] __qdisc_run+0x118/0x650 [ 308.270660] net_tx_action+0x118/0x230 [ 308.274409] _stext+0x124/0x2a0 [ 308.277549] __irq_exit_rcu+0xe4/0x100 [ 308.281302] irq_exit+0x10/0x20 [ 308.284444] handle_domain_irq+0x64/0x90 [ 308.288367] gic_handle_irq+0x54/0x130 [ 308.292119] call_on_irq_stack+0x2c/0x54 [ 308.296043] do_interrupt_handler+0x54/0x60 [ 308.300228] el1_interrupt+0x30/0x80 [ 308.303804] el1h_64_irq_handler+0x18/0x24 [ 308.307901] el1h_64_irq+0x78/0x7c [ 308.311303] __netif_schedule+0x78/0xa0 [ 308.315138] netif_tx_wake_queue+0x50/0x7c [ 308.319237] m_can_isr+0x474/0x1710 [m_can] [ 308.323425] irq_thread_fn+0x2c/0x9c [ 308.327005] irq_thread+0x178/0x2c0 [ 308.330497] kthread+0x150/0x160 [ 308.333727] ret_from_fork+0x10/0x20 Link: https://lore.kernel.org/all/20230315110546.2518305-1-msp@baylibre.com [mkl: apply patches 1...5 only, adjust message accordingly] Signed-off-by: Marc Kleine-Budde commit 9083e0b09df33376abef2bb28e6a4b0c88f4d00b Author: Markus Schneider-Pargmann Date: Wed Mar 15 12:05:35 2023 +0100 can: m_can: Keep interrupts enabled during peripheral read Interrupts currently get disabled if the interrupt status shows new received data. Non-peripheral chips handle receiving in a worker thread, but peripheral chips are handling the receive process in the threaded interrupt routine itself without scheduling it for a different worker. So there is no need to disable interrupts for peripheral chips. Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Simon Horman Link: https://lore.kernel.org/all/20230315110546.2518305-6-msp@baylibre.com Signed-off-by: Marc Kleine-Budde commit 897e663218e2d05607a6f5b258134cb026a2fa85 Author: Markus Schneider-Pargmann Date: Wed Mar 15 12:05:34 2023 +0100 can: m_can: Disable unused interrupts There are a number of interrupts that are not used by the driver at the moment. Disable all of these. Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Simon Horman Link: https://lore.kernel.org/all/20230315110546.2518305-5-msp@baylibre.com Signed-off-by: Marc Kleine-Budde commit 71725bfdbbf263ec4897ce310087d3f6bd331c19 Author: Markus Schneider-Pargmann Date: Wed Mar 15 12:05:33 2023 +0100 can: m_can: Remove double interrupt enable Interrupts are enabled a few lines further down as well. Remove this second call to enable all interrupts. Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Simon Horman Link: https://lore.kernel.org/all/20230315110546.2518305-4-msp@baylibre.com Signed-off-by: Marc Kleine-Budde commit 4ab639480900be41d7c7c0b89a6db7fa5fe951e4 Author: Markus Schneider-Pargmann Date: Wed Mar 15 12:05:32 2023 +0100 can: m_can: Always acknowledge all interrupts The code already exits the function on !ir before this condition. No need to check again if anything is set as IR_ALL_INT is 0xffffffff. Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Simon Horman Link: https://lore.kernel.org/all/20230315110546.2518305-3-msp@baylibre.com Signed-off-by: Marc Kleine-Budde commit 73042934e4a30d9f45ff9cb0b3b029a01dbe7130 Author: Markus Schneider-Pargmann Date: Wed Mar 15 12:05:31 2023 +0100 can: m_can: Remove repeated check for is_peripheral Merge both if-blocks to fix this. Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Simon Horman Link: https://lore.kernel.org/all/20230315110546.2518305-2-msp@baylibre.com Signed-off-by: Marc Kleine-Budde commit a57915aee31596d2380a875964c78f743162383c Author: Frank Jungclaus Date: Wed Feb 22 17:37:54 2023 +0100 can: esd_usb: Improve code readability by means of replacing struct esd_usb_msg with a union As suggested by Vincent Mailhol, declare struct esd_usb_msg as a union instead of a struct. Then replace all msg->msg.something constructs, that make use of esd_usb_msg, with simpler and prettier looking msg->something variants. Link: https://lore.kernel.org/all/CAMZ6RqKRzJwmMShVT9QKwiQ5LJaQupYqkPkKjhRBsP=12QYpfA@mail.gmail.com/ Suggested-by: Vincent MAILHOL Signed-off-by: Frank Jungclaus Reviewed-by: Vincent Mailhol Link: https://lore.kernel.org/all/20230222163754.3711766-1-frank.jungclaus@esd.eu Signed-off-by: Marc Kleine-Budde commit af54c4590d8d886be722f17ef255664bb9ff508d Merge: f6b53d1b38ba1 8db931835fad6 Author: Marc Kleine-Budde Date: Fri Mar 24 19:11:34 2023 +0100 Merge patch series "can: remove redundant pci_clear_master()" Cai Huoqing's series removes redundant pci_clear_master() to simplify the code of multiple CAN drivers. Link: https://lore.kernel.org/all/20230323113318.9473-1-cai.huoqing@linux.dev Signed-off-by: Marc Kleine-Budde commit 8db931835fad6a2229166fc0719f55c5ba070516 Author: Cai Huoqing Date: Thu Mar 23 19:33:17 2023 +0800 can: kvaser_pciefd: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Link: https://lore.kernel.org/all/20230323113318.9473-3-cai.huoqing@linux.dev Signed-off-by: Marc Kleine-Budde commit c9d23f9657cabfd2836a096bf6eddf8df2cf1434 Author: Cai Huoqing Date: Thu Mar 23 19:33:16 2023 +0800 can: ctucanfd: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Link: https://lore.kernel.org/all/20230323113318.9473-2-cai.huoqing@linux.dev Signed-off-by: Marc Kleine-Budde commit 594503341de74f69dbccaedf4dbbb3aa02ec0534 Author: Cai Huoqing Date: Thu Mar 23 19:33:15 2023 +0800 can: c_can: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Link: https://lore.kernel.org/all/20230323113318.9473-1-cai.huoqing@linux.dev Signed-off-by: Marc Kleine-Budde commit f6b53d1b38ba11c4584cac0c42a4a82a47276234 Merge: 323fe43cf9aef 33eced402b184 Author: Marc Kleine-Budde Date: Fri Mar 24 19:10:01 2023 +0100 Merge patch series "can: rcar_canfd: Add transceiver support" Geert Uytterhoeven says: This patch series adds transceiver support to the Renesas R-Car CAN-FD driver, and improves the printing of error messages, as requested by Vincent. Link: https://lore.kernel.org/all/cover.1679414936.git.geert+renesas@glider.be Signed-off-by: Marc Kleine-Budde commit 33eced402b184b5f2127f45531099c265d34e269 Author: Geert Uytterhoeven Date: Tue Mar 21 17:15:01 2023 +0100 can: rcar_canfd: Improve error messages Improve printed error messages: - Replace numerical error codes by mnemotechnic error codes, to improve the user experience in case of errors, - Drop parentheses around printed numbers, cfr. Documentation/process/coding-style.rst, - Drop printing of an error message in case of out-of-memory, as the core memory allocation code already takes care of this. Suggested-by: Vincent Mailhol Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Vincent Mailhol Link: https://lore.kernel.org/all/4162cc46f72257ec191007675933985b6df394b9.1679414936.git.geert+renesas@glider.be [mkl: use colon instead of comma] Signed-off-by: Marc Kleine-Budde commit a0340df7eca4f28e18afd3ecd6e464db5f2994c0 Author: Geert Uytterhoeven Date: Tue Mar 21 17:15:00 2023 +0100 can: rcar_canfd: Add transceiver support Add support for CAN transceivers described as PHYs. While simple CAN transceivers can do without, this is needed for CAN transceivers like NXP TJR1443 that need a configuration step (like pulling standby or enable lines), and/or impose a bitrate limit. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Reviewed-by: Vincent Mailhol Link: https://lore.kernel.org/all/1ce907572ac1d4e1733fa6ea7712250f2229cfcb.1679414936.git.geert+renesas@glider.be [mkl: squash error message update from patch 2] Signed-off-by: Marc Kleine-Budde commit 1e684172358453df1cb783d7c101a09ff08ceee1 Author: Luis Chamberlain Date: Sun Mar 19 14:27:37 2023 -0700 module: add a for_each_modinfo_entry() Add a for_each_modinfo_entry() to make it easier to read and use. This produces no functional changes but makes this code easiert to read as we are used to with loops in the kernel and trims more lines of code. Signed-off-by: Luis Chamberlain commit feb5b784a26363b690f618213450faf244c1c58e Author: Luis Chamberlain Date: Sun Mar 19 14:27:36 2023 -0700 module: rename next_string() to module_next_tag_pair() This makes it clearer what it is doing. While at it, make it available to other code other than main.c. This will be used in the subsequent patch and make the changes easier to read. Signed-off-by: Luis Chamberlain commit b66973b82d4426b318f78a20c6b39ddd977a508a Author: Luis Chamberlain Date: Sun Mar 19 14:27:35 2023 -0700 module: move get_modinfo() helpers all above Instead of forward declaring routines for get_modinfo() just move everything up. This makes no functional changes. Signed-off-by: Luis Chamberlain commit 07fcd6bfce178ff43eecddb610cfa50ee27b7cb9 Merge: 7e11bc075999e aff750faa5ac6 Author: Arnd Bergmann Date: Fri Mar 24 18:55:11 2023 +0100 Merge tag 'dt-cleanup-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt Minor improvements in ARM DTS for v6.4 1. TI, Marvell, HiSilicon: "okay" over "ok" is preferred for status property. 2. OMAP: align UART node name with bindings. * tag 'dt-cleanup-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: ARM: dts: hisilicon: use "okay" for status ARM: dts: ti: use "okay" for status ARM: dts: marvell: use "okay" for status ARM: dts: omap: align UART node name with bindings Link: https://lore.kernel.org/r/20230319152740.34551-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 7e11bc075999e16849eb44cdc8459cb8fc4e50d6 Merge: 2b4881839a392 d2e5c16f6c869 Author: Arnd Bergmann Date: Fri Mar 24 18:53:55 2023 +0100 Merge tag 'dt64-cleanup-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt into soc/dt Minor improvements in ARM64 DTS for v6.4 1. Toshiba: white-space fixes. 2. Cavium, Marvell: fix GICv3 ITS node name. * tag 'dt64-cleanup-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-dt: arm64: dts: cavium: Fix GICv3 ITS nodes arm64: dts: marvell: armada-ap810: Fix GICv3 ITS node name arm64: dts: toshiba: adjust whitespace around '=' Link: https://lore.kernel.org/r/20230319152740.34551-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit d6053666ef2b6631ef8f265f49ff2cc0f4d45c50 Author: Lukas Bulwahn Date: Tue Mar 21 04:38:10 2023 +0100 ARM: mstar: remove unused config MACH_MERCURY Commit 312b62b6610c ("ARM: mstar: Add machine for MStar/Sigmastar Armv7 SoCs") adds the config MACH_INFINITY and MACH_MERCURY. The MACH_INFINITY config is used in the gpio-msc313 driver, but the MACH_MERCURY config is never used to configure anything in the kernel tree. Remove the unused config MACH_MERCURY. Signed-off-by: Lukas Bulwahn Acked-by: Romain Perier Link: https://lore.kernel.org/r/20230321033810.22017-1-lukas.bulwahn@gmail.com Signed-off-by: Arnd Bergmann commit 2e6115c175c7e7127702ef469347c3a62095d755 Author: Lukas Bulwahn Date: Mon Mar 20 14:01:59 2023 +0100 ARM: spear: remove obsolete config MACH_SPEAR600 ARM: spear: remove obsolete config MACH_SPEAR600 Since commit ddb902cc3459 ("ARM: centralize common multi-platform kconfig options"), the config MACH_SPEAR600 has no effect. Remove this config. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20230320130159.32316-1-lukas.bulwahn@gmail.com Signed-off-by: Arnd Bergmann commit 3dffd4755f41c4d603f1ae8533c7c8b04ed7f334 Author: Ryan Roberts Date: Mon Feb 13 10:16:33 2023 +0000 arm64: defconfig: Enable Virtio RNG driver as built in Modern versions of FVP_Base_RevC-2xAEMvA contain a Virtio RNG device, use of which can dramatically speed up the time taken for Linux to initialize its CRNG, from 10s of seconds in some cases, to instant. This improves the debug cycle significantly. However, there are 2 barriers to getting people to use it. The first is that the defconfig doesn't have the required driver. The second is that the device is disabled in the device tree (for back-compat since older versions of the FVP don't have the device). Here we solve the first issue. Signed-off-by: Ryan Roberts Signed-off-by: Arnd Bergmann commit e57430d2483506f046e39bf8c61159dde88aede2 Author: Neil Armstrong Date: Fri Mar 24 10:28:49 2023 +0100 arm64: dts: qcom: sm8450: fix pcie1 gpios properties name Add the final "s" to the pgio properties and fix the invalid "enable" name to the correct "wake", checked against the HDK8450 schematics. Fixes: bc6588bc25fb ("arm64: dts: qcom: sm8450: add PCIe1 root device") Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323-topic-sm8450-upstream-dt-bindings-fixes-v2-4-0ca1bea1a843@linaro.org commit c98a56395e7854f7975dd8539d0563e0ac7d060e Author: Neil Armstrong Date: Fri Mar 24 10:28:48 2023 +0100 arm64: dts: qcom: sm8450: remove invalid power-domain-names in pcie nodes Fixes the following DT bindings check error: pci@1c00000: Unevaluated properties are not allowed ('power-domain-names' were unexpected) Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230323-topic-sm8450-upstream-dt-bindings-fixes-v2-3-0ca1bea1a843@linaro.org commit af87ac738715d8877222b25829845589b25fe24c Author: Bhavya Kapoor Date: Fri Mar 24 12:54:43 2023 +0530 arm64: defconfig: Enable CAN PHY transceiver driver Enable CAN PHY transceiver driver to be built as a module which will add support for generic CAN transceivers used by TI K3 specific SoCs. Signed-off-by: Bhavya Kapoor Reviewed-by: Geert Uytterhoeven Reviewed-by: Bjorn Andersson Signed-off-by: Arnd Bergmann commit cc4a29819b0df9f3a2e7e0d5dee0830a3072d5aa Author: Andrea Parri Date: Thu Mar 23 02:37:51 2023 +0100 tools/memory-model: Remove out-of-date SRCU documentation Commit 6cd244c87428 ("tools/memory-model: Provide exact SRCU semantics") changed the semantics of partially overlapping SRCU read-side critical sections (among other things), making such documentation out-of-date. The new, semantic changes are discussed in explanation.txt. Remove the out-of-date documentation. Signed-off-by: Andrea Parri Reviewed-by: Joel Fernandes (Google) Acked-by: Alan Stern Signed-off-by: Paul E. McKenney commit 05dc8470b3bfcad6b84bcf5953172ce26cfb2bd9 Author: Paul E. McKenney Date: Thu Jan 26 15:41:00 2023 -0800 tools/memory-model: Document LKMM test procedure This commit documents how to run the various scripts in order to test a potentially pervasive change to the memory model. Signed-off-by: Paul E. McKenney commit 2a8ec611ac2feef30716066e031a32004e5664d0 Author: Tiezhu Yang Date: Mon Nov 21 11:25:38 2022 +0800 tools/memory-model: Use "grep -E" instead of "egrep" The latest version of grep claims the egrep is now obsolete so the build now contains warnings that look like: egrep: warning: egrep is obsolescent; using grep -E fix this up by moving the related file to use "grep -E" instead. sed -i "s/egrep/grep -E/g" `grep egrep -rwl tools/memory-model` Here are the steps to install the latest grep: wget http://ftp.gnu.org/gnu/grep/grep-3.8.tar.gz tar xf grep-3.8.tar.gz cd grep-3.8 && ./configure && make sudo make install export PATH=/usr/local/bin:$PATH Signed-off-by: Tiezhu Yang Reviewed-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit 719bef0cbe7be11a1be3ad30a11cb33959a5435a Author: Paul E. McKenney Date: Mon Jun 24 22:30:32 2019 -0700 tools/memory-model: Use "-unroll 0" to keep --hw runs finite Litmus tests involving atomic operations produce LL/SC loops on a number of architectures, and unrolling these loops can result in excessive verification times or even stack overflows. This commit therefore uses the "-unroll 0" herd7 argument to avoid unrolling, on the grounds that additional passes through an LL/SC loop should not change the verification. Note however, that certain bugs in the mapping of the LL/SC loop to machine instructions may go undetected. On the other hand, herd7 might not be the best vehicle for finding such bugs in any case. (You do stress-test your architecture-specific code, don't you?) Suggested-by: Luc Maranget Signed-off-by: Paul E. McKenney commit 72b5f102f855d789ee1e733edfc6a40313d11f1b Author: Paul E. McKenney Date: Thu Jun 6 02:13:27 2019 -0700 tools/memory-model: Make judgelitmus.sh handle scripted Result: tag The scripts that generate the litmus tests in the "auto" directory of the https://github.com/paulmckrcu/litmus archive place the "Result:" tag into a single-line ocaml comment, which judgelitmus.sh currently does not recognize. This commit therefore makes judgelitmus.sh recognize both the multiline comment format that it currently does and the automatically generated single-line format. Signed-off-by: Paul E. McKenney commit 68f7bcab87eb47e7f9ca71ddca7fb976b92bc3a9 Author: Paul E. McKenney Date: Fri May 3 07:34:20 2019 -0700 tools/memory-model: Add data-race capabilities to judgelitmus.sh This commit adds functionality to judgelitmus.sh to allow it to handle both the "DATARACE" markers in the "Result:" comments in litmus tests and the "Flag data-race" markers in LKMM output. For C-language tests, if either marker is present, the other must also be as well, at least for litmus tests having a "Result:" comment. If the LKMM output indicates a data race, then failures of the Always/Sometimes/Never portion of the "Result:" prediction are forgiven. The reason for forgiving "Result:" mispredictions is that data races can result in "interesting" compiler optimizations, so that all bets are off in the data-race case. [ paulmck: Apply Akira Yokosawa feedback. ] Signed-off-by: Paul E. McKenney commit df0f675065bf003c4f182941f62b01b06be97182 Author: Paul E. McKenney Date: Thu May 2 10:05:14 2019 -0700 tools/memory-model: Add checktheselitmus.sh to run specified litmus tests This commit adds a checktheselitmus.sh script that runs the litmus tests specified on the command line. This is useful for verifying fixes to specific litmus tests. Signed-off-by: Paul E. McKenney commit a4deb29a1ddff4513daa3844ef4958d089631a6c Author: Paul E. McKenney Date: Thu May 2 10:03:29 2019 -0700 tools/memory-model: Repair parseargs.sh header comment Signed-off-by: Paul E. McKenney commit 8b99521f9a2d0c6e5dbc8349c1970cb39452f4dc Author: Paul E. McKenney Date: Thu May 2 09:51:57 2019 -0700 tools/memory-model: Add "--" to parseargs.sh for additional arguments Currently, parseargs.sh expects to consume all the command-line arguments, which prevents the calling script from having any of its own arguments. This commit therefore causes parseargs.sh to stop consuming arguments when it encounters a "--" argument, leaving any remaining arguments for the calling script. Signed-off-by: Paul E. McKenney commit 75eee921a1e9fc13d3b6766d98cdf842e843c31d Author: Paul E. McKenney Date: Mon Apr 8 10:02:23 2019 -0700 tools/memory-model: Make history-check scripts use mselect7 The history-check scripts currently use grep to ignore non-C-language litmus tests, which is a bit fragile. This commit therefore enlists the aid of "mselect7 -arch C", given Luc Maraget's recent modifications that allow mselect7 to operate in filter mode. This change requires herdtools 7.52-32-g1da3e0e50977 or later. Signed-off-by: Paul E. McKenney commit 2ac8cbee8ef3979df2d2291177d6ec6de7792af6 Author: Paul E. McKenney Date: Mon Apr 8 09:27:28 2019 -0700 tools/memory-model: Make checkghlitmus.sh use mselect7 The checkghlitmus.sh script currently uses grep to ignore non-C-language litmus tests, which is a bit fragile. This commit therefore enlists the aid of "mselect7 -arch C", given Luc Maraget's recent modifications that allow mselect7 to operate in filter mode. This change requires herdtools 7.52-32-g1da3e0e50977 or later. Signed-off-by: Paul E. McKenney commit 6e6586b01c32cedc4ddb83dc60911428d6d5f6f1 Author: Paul E. McKenney Date: Wed Mar 27 11:47:14 2019 -0700 tools/memory-model: Fix scripting --jobs argument The parseargs.sh regular expression for the --jobs argument incorrectly requires that the number of jobs be at least 10, that is, have at least two digits. This commit therefore adjusts this regular expression to allow single-digit numbers of jobs to be specified. Signed-off-by: Paul E. McKenney commit 69d476c55761a74e636bb10e101e5aed6fb104fd Author: Paul E. McKenney Date: Fri Mar 22 17:18:43 2019 -0700 tools/memory-model: Implement --hw support for checkghlitmus.sh This commits enables the "--hw" argument for the checkghlitmus.sh script, causing it to convert any applicable C-language litmus tests to the specified flavor of assembly language, to verify these assembly-language litmus tests, and checking compatibility of the outcomes. Note that the conversion does not yet handle locking, RCU, SRCU, plain C-language memory accesses, or casts. Signed-off-by: Paul E. McKenney commit d9313e05f08dea8cf9f7a67662d642ba47f8040a Author: Paul E. McKenney Date: Fri Apr 5 12:34:56 2019 -0700 tools/memory-model: Add -v flag to jingle7 runs Adding the -v flag to jingle7 invocations gives much useful information on why jingle7 didn't like a given litmus test. This commit therefore adds this flag and saves off any such information into a .err file. Suggested-by: Luc Maranget Signed-off-by: Paul E. McKenney commit a9504aaa9b0d6906741be69c001722a4d1cbbf1e Author: Paul E. McKenney Date: Mon Mar 25 17:20:51 2019 -0700 tools/memory-model: Make runlitmus.sh check for jingle errors It turns out that the jingle7 tool is currently a bit picky about the litmus tests it is willing to process. This commit therefore ensures that jingle7 failures are reported. Signed-off-by: Paul E. McKenney commit b28306a9e50d6cbb20d4c044b1f755b756c2b591 Author: Paul E. McKenney Date: Fri Mar 22 08:57:20 2019 -0700 tools/memory-model: Allow herd to deduce CPU type Currently, the scripts specify the CPU's .cat file to herd. But this is pointless because herd will select a good and sufficient .cat file from the assembly-language litmus test itself. This commit therefore removes the -model argument to herd, allowing herd to figure the CPU family out itself. Note that the user can override herd's choice using the "--herdopts" argument to the scripts. Suggested-by: Luc Maranget Signed-off-by: Paul E. McKenney commit 2027ad41ec5fef054ae264ab5c1150984b2e56f7 Author: Paul E. McKenney Date: Thu Mar 21 14:44:09 2019 -0700 tools/memory-model: Keep assembly-language litmus tests This commit retains the assembly-language litmus tests generated from the C-language litmus tests, appending the hardware tag to the original C-language litmus test's filename. Thus, S+poonceonces.litmus.AArch64 contains the Armv8 assembly language corresponding to the C-language S+poonceonces.litmus test. This commit also updates the .gitignore to avoid committing these automatically generated assembly-language litmus tests. Signed-off-by: Paul E. McKenney commit ee542816ac83ef72ebc52ce11ff8448463ba62eb Author: Paul E. McKenney Date: Thu Mar 21 14:06:27 2019 -0700 tools/memory-model: Move from .AArch64.litmus.out to .litmus.AArch.out When the github scripts see ".litmus.out", they assume that there must be a corresponding C-language ".litmus" file. Won't they be disappointed when they instead see nothing, or, worse yet, the corresponding assembly-language litmus test? This commit therefore swaps the hardware tag with the "litmus" to avoid this sort of disappointment. This commit also adjusts the .gitignore file so as to avoid adding these new ".out" files to git. [ paulmck: Apply Akira Yokosawa feedback. ] Signed-off-by: Paul E. McKenney commit dbf0b425a698f4a7ff0a846830811677d3c52dc6 Author: Paul E. McKenney Date: Wed Mar 20 16:41:41 2019 -0700 tools/memory-model: Make runlitmus.sh generate .litmus.out for --hw In the absence of "Result:" comments, the runlitmus.sh script relies on litmus.out files from prior LKMM runs. This can be a bit user-hostile, so this commit makes runlitmus.sh generate any needed .litmus.out files that don't already exist. Signed-off-by: Paul E. McKenney commit 08203824c0dcaaab1c1de438d2ecb2995b99544b Author: Paul E. McKenney Date: Wed Mar 20 14:57:56 2019 -0700 tools/memory-model: Split runlitmus.sh out of checklitmus.sh This commit prepares for adding --hw capability to github litmus-test scripts by splitting runlitmus.sh (which simply runs the verification) out of checklitmus.sh (which also judges the results). Signed-off-by: Paul E. McKenney commit 0838ba7e5b80e593af27bc5b682ee24e9e1e2ca6 Author: Paul E. McKenney Date: Wed Mar 20 14:37:46 2019 -0700 tools/memory-model: Make judgelitmus.sh ransack .litmus.out files The judgelitmus.sh script currently relies solely on the "Result:" comment in the .litmus file. This is problematic when using the --hw argument, because it is necessary to check the hardware model against LKMM even in the absence of "Result:" comments. This commit therefore modifies judgelitmus.sh to check the observation in a .litmus.out file, in case one was generated by a previous LKMM run. Signed-off-by: Paul E. McKenney commit 579ecb2e4108af3689b1b814fff23f6a69907dab Author: Paul E. McKenney Date: Wed Mar 20 12:39:27 2019 -0700 tools/memory-model: Hardware checking for check{,all}litmus.sh This commit makes checklitmus.sh and checkalllitmus.sh check to see if a hardware verification was specified (via the --hw command-line argument, which sets the LKMM_HW_MAP_FILE environment variable). If so, the C-language litmus test is converted to the specified type of assembly-language litmus test and herd is run on it. Hardware is permitted to be stronger than LKMM requires, so "Always" and "Never" verifications of "Sometimes" C-language litmus tests are forgiven. Signed-off-by: Paul E. McKenney commit e029374ba8483e1c59243a70bf0926f0ca8f54e2 Author: Paul E. McKenney Date: Tue Mar 19 16:37:01 2019 -0700 tools/memory-model: Fix checkalllitmus.sh comment The checkalllitmus.sh runs litmus tests in the litmus-tests directory, not those in the github archive, so this commit updates the comment to reflect this reality. Signed-off-by: Paul E. McKenney commit aedbf1e08587dcebcbc21a330bfb32522234a472 Author: Paul E. McKenney Date: Tue Mar 19 16:21:09 2019 -0700 tools/memory-model: Add simpletest.sh to check locking, RCU, and SRCU This commit abstracts out common function to check a given litmus test for locking, RCU, and SRCU in order to avoid duplicating code. Signed-off-by: Paul E. McKenney commit 2024436d482eca356840a3aec022bad68f72eb25 Author: Paul E. McKenney Date: Tue Mar 19 14:39:10 2019 -0700 tools/memory-model: Make judgelitmus.sh handle hardware verifications This commit makes the judgelitmus.sh script check the --hw argument (AKA the LKMM_HW_MAP_FILE environment variable) and to adjust its judgment for a run where a C-language litmus test has been translated to assembly and the assembly version verified. In this case, the assembly verification output is checked against the C-language script's "Result:" comment. However, because hardware can be stronger than LKMM requires, the judgelitmus.sh script forgives verification mismatches featuring a "Sometimes" in the C-language script and an "Always" or "Never" assembly-language verification. Note that deadlock is not forgiven, however, this should not normally be an issue given that C-language tests containing locking, RCU, or SRCU cannot be translated to assembly. However, this issue can crop up in litmus tests that mimic deadlock by using the "filter" clause to ignore all executions. It can also crop up when certain herd arguments are used to autofilter everything that does not match the "exists" clause in cases where the "exists" clause cannot be satisfied. Signed-off-by: Paul E. McKenney commit b1710979f83d108f0d8c111e56cf33854e31dfa1 Author: Paul E. McKenney Date: Tue Mar 19 15:59:26 2019 -0700 tools/memory-model: Update parseargs.sh for hardware verification This commit adds a --hw argument to parseargs.sh to specify the CPU family for a hardware verification. For example, "--hw AArch64" will specify that a C-language litmus test is to be translated to ARMv8 and the result verified. This will set the LKMM_HW_MAP_FILE environment variable accordingly. If there is no --hw argument, this environment variable will be set to the empty string. Signed-off-by: Paul E. McKenney commit 61f615cc36780fab92974c3ec921281ba44fdaa4 Author: Paul E. McKenney Date: Thu Apr 11 07:33:18 2019 -0700 tools/memory-model: Fix paulmck email address on pre-existing scripts Signed-off-by: Paul E. McKenney commit e253a403023488f2ade2845d0e1fd8e0e66befea Author: Paul E. McKenney Date: Tue Mar 19 14:27:06 2019 -0700 tools/memory-model: Make judgelitmus.sh detect hard deadlocks If a litmus test specifies "Result: Never" and if it contains an unconditional ("hard") deadlock, then running checklitmus.sh on it will not flag any errors, despite the fact that there are no executions. This commit therefore updates judgelitmus.sh to complain about tests with no executions that are marked, but not as "Result: DEADLOCK". Signed-off-by: Paul E. McKenney commit 02484d826fda923f829fc47350ee99fd3cbd3414 Author: Paul E. McKenney Date: Mon Mar 18 13:40:57 2019 -0700 tools/memory-model: Make judgelitmus.sh identify bad macros Currently, judgelitmus.sh treats use of unknown primitives (such as srcu_read_lock() prior to SRCU support) as "!!! Verification error". This can be misleading because it fails to call out typos and running a version LKMM on a litmus test requiring a feature not provided by that version. This commit therefore changes judgelitmus.sh to check for unknown primitives and to report them, for example, with: '!!! Current LKMM version does not know "rcu_write_lock"'. Signed-off-by: Paul E. McKenney commit b1da11c936e28d60a02f13c9ea27fdc3d1759b38 Author: Paul E. McKenney Date: Mon Mar 18 13:07:46 2019 -0700 tools/memory-model: Make cmplitmushist.sh note timeouts Currently, cmplitmushist.sh treats timeouts (as in the "--timeout" argument) as "Missing Observation line". This can be misleading because it is quite possible that running the test longer would have produced a verification. This commit therefore changes cmplitmushist.sh to check for timeouts and to report them with "Timed out". Signed-off-by: Paul E. McKenney commit 2c644d3f6536dd31f2378529c44a04ad77ea6b77 Author: Paul E. McKenney Date: Mon Mar 18 11:53:50 2019 -0700 tools/memory-model: Make judgelitmus.sh note timeouts Currently, judgelitmus.sh treats timeouts (as in the "--timeout" argument) as "!!! Verification error". This can be misleading because it is quite possible that running the test longer would have produced a verification. This commit therefore changes judgelitmus.sh to check for timeouts and to report them with "!!! Timeout". Signed-off-by: Paul E. McKenney commit 7e7eb5ae4e4cd482a1ebc6a82ea8a04c5ead62ee Author: Paul E. McKenney Date: Fri Aug 14 16:14:34 2020 -0700 tools/memory-model: Document locking corner cases Most Linux-kernel uses of locking are straightforward, but there are corner-case uses that rely on less well-known aspects of the lock and unlock primitives. This commit therefore adds a locking.txt and litmus tests in Documentation/litmus-tests/locking to explain these corner-case uses. [ paulmck: Apply Andrea Parri feedback for klitmus7. ] [ paulmck: Apply Akira Yokosawa example-consistency feedback. ] Reviewed-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit dc0a7b52007145a85d0c2f3151870b101568b449 Merge: 323fe43cf9aef 608f1b136616f Author: Jakub Kicinski Date: Fri Mar 24 09:53:54 2023 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Conflicts: drivers/net/ethernet/mellanox/mlx5/core/en_tc.c 6e9d51b1a5cb ("net/mlx5e: Initialize link speed to zero") 1bffcea42926 ("net/mlx5e: Add devlink hairpin queues parameters") https://lore.kernel.org/all/20230324120623.4ebbc66f@canb.auug.org.au/ https://lore.kernel.org/all/20230321211135.47711-1-saeed@kernel.org/ Adjacent changes: drivers/net/phy/phy.c 323fe43cf9ae ("net: phy: Improved PHY error reporting in state machine") 4203d84032e2 ("net: phy: Ensure state transitions are processed from phy_stop()") Signed-off-by: Jakub Kicinski commit 283771e8eefcbe4a0a84c6a00a0b7a210bbc5846 Author: Harshit Mogalapalli Date: Fri Mar 24 07:55:35 2023 -0700 ASoC: cs35l56: Remove redundant return statement in cs35l56_spi_probe() We have unreachable 'return ret' statement in cs35l56_spi_probe(), delete it as its dead code.. This is found by static analysis with smatch. Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") Signed-off-by: Harshit Mogalapalli Reviewed-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230324145535.3951689-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Mark Brown commit 09d950723479ef0af3a317ac190a8c1fadd7343c Merge: 37b58becc1cee e7098ba9b3785 Author: Mark Brown Date: Fri Mar 24 16:36:05 2023 +0000 ASoC: remove unnecessary dai_link->platform Merge series from Kuninori Morimoto : Current ASoC will ignore already connected component when binding Card. This will happen mainly "CPU Component" is handled as "Platform Component", which was needed before. static int snd_soc_rtd_add_component(...) { ... for_each_rtd_components(rtd, i, comp) { /* already connected */ if (comp == component) return 0; } ... } Some drivers are still using CPU or Dummy Component as Platform Component, but these are no meaning or ignored. This patch-set remove these. commit 9f33a88c0a820681a4cbabfc912ac5569a9de330 Author: Thomas Weißschuh Date: Fri Mar 24 15:40:41 2023 +0000 kernel/ksysfs.c: use sysfs_emit for sysfs show handlers sysfs_emit() is the recommended way to format strings for sysfs as per Documentation/filesystems/sysfs.rst. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230324-ksysfs-sysfs_emit-v1-1-67c03cddc8a6@weissschuh.net Signed-off-by: Greg Kroah-Hartman commit 86e11e30120387cb5c24bdb3a169a2135973a0a8 Author: Umesh Nerlige Ramappa Date: Thu Mar 23 15:59:01 2023 -0700 drm/i915/perf: Wa_14017512683: Disable OAM if media C6 is enabled in BIOS OAM does not work with media C6 enabled on some steppings of MTL. Disable OAM if we detect that media C6 was enabled in bios. v2: (Ashutosh) - Remove drm_notice from the driver load path - Log a drm_err when opening an OAM stream on affected steppings v3: - Initialize the engine group even if mc6 is enabled (Ashutosh) - Checkpatch fix Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20230323225901.3743681-12-umesh.nerlige.ramappa@intel.com commit 94d82e95219a3c581435480ab395eb04f569635f Author: Umesh Nerlige Ramappa Date: Thu Mar 23 15:59:00 2023 -0700 drm/i915/perf: Pass i915 object to perf revision helper In some cases, perf revision may rely on specific steppings of a platform. To determine the platform, pass i915 object to the perf revision helper. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20230323225901.3743681-11-umesh.nerlige.ramappa@intel.com commit 1cc064dce4ed0ff111b6d6cb06b3cccf1cba29f5 Author: Umesh Nerlige Ramappa Date: Thu Mar 23 15:58:59 2023 -0700 drm/i915/perf: Add support for OA media units MTL introduces additional OA units dedicated to media use cases. Add support for programming these OA units by passing the media engine class and instance parameters. UMD specific changes for GPUvis support: https://patchwork.freedesktop.org/patch/522827/?series=114023 https://patchwork.freedesktop.org/patch/522822/?series=114023 https://patchwork.freedesktop.org/patch/522826/?series=114023 https://patchwork.freedesktop.org/patch/522828/?series=114023 https://patchwork.freedesktop.org/patch/522816/?series=114023 https://patchwork.freedesktop.org/patch/522825/?series=114023 v2: (Ashutosh) - check for IP_VER(12, 70) instead of MTL - remove PERF_GROUP_OAG comment in mtl_oa_base - remove oa_buffer.group - use engine->oa_group->type in engine_supports_oa_format - remove fw_domains and use FORCEWAKE_ALL - remove MPES/MPEC comment - s/xehp/mtl/ in b counter validation function name - remove engine_supports_oa in __oa_engine_group - remove warn_ON from __oam_engine_group - refactor oa_init_groups and oa_init_regs - assign g->type correctly - use enum oa_type definition v3: (Ashutosh) - Drop oa_unit_functional as engine_supports_oa is enough v4: - s/DRM_DEBUG/drm_dbg/ Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20230323225901.3743681-10-umesh.nerlige.ramappa@intel.com commit c61d04c9eb4354980839cf938488ca703eba0f83 Author: Umesh Nerlige Ramappa Date: Thu Mar 23 15:58:58 2023 -0700 drm/i915/perf: Add engine class instance parameters to perf One or more engines map to a specific OA unit. All reports from these engines are captured in the OA buffer managed by this OA unit. Current i915 OA implementation supports only the OAG unit. OAG primarily caters to render engine, so i915 OA uses render as the default engine in the OA implementation. Since there are more OA units on newer hardware that map to other engines, allow user to pass engine class and instance to select and program specific OA units. UMD specific changes for GPUvis support: https://patchwork.freedesktop.org/patch/522827/?series=114023 https://patchwork.freedesktop.org/patch/522822/?series=114023 https://patchwork.freedesktop.org/patch/522826/?series=114023 https://patchwork.freedesktop.org/patch/522828/?series=114023 https://patchwork.freedesktop.org/patch/522816/?series=114023 https://patchwork.freedesktop.org/patch/522825/?series=114023 v2: (Ashutosh) - Clarify commit message - Add drm_dbg - Clarify uapi description v3: (Ashutosh) - Remove irrelevant info from the uapi comment v4: Ensure engine class:instance is passed together (Ashutosh) v5: Remove unnecessary quote (Ashutosh) Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20230323225901.3743681-9-umesh.nerlige.ramappa@intel.com commit 3c67ce061b2136e0578734bae82fdf85c2c76217 Author: Umesh Nerlige Ramappa Date: Thu Mar 23 15:58:57 2023 -0700 drm/i915/perf: Handle non-power-of-2 reports Some of the newer OA formats are not powers of 2. For those formats, adjust the hw_tail accordingly when checking for new reports. v2: (Ashutosh) - Switch to OA_TAKEN for diff calculation - Use OA_BUFFER_SIZE instead of the vma size - Update comments Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20230323225901.3743681-8-umesh.nerlige.ramappa@intel.com commit dbc9a5fb168deb140722c12d8332b25754def017 Author: Umesh Nerlige Ramappa Date: Thu Mar 23 15:58:56 2023 -0700 drm/i915/perf: Parse 64bit report header formats correctly Now that OA formats come in flavor of 64 bit reports, the report header has 64 bit report-id, timestamp, context-id and gpu-ticks fields. When filtering these reports, use the right width for these fields. Note that upper dword of context id is reserved, so squash lower dword only. v2: (Ashutosh) - Drop inline - Update comment with dword definitions - report id and timestamp Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20230323225901.3743681-7-umesh.nerlige.ramappa@intel.com commit 772a5803922a097eaf94cf865c6f4a81416aedb8 Author: Umesh Nerlige Ramappa Date: Thu Mar 23 15:58:55 2023 -0700 drm/i915/perf: Fail modprobe if i915_perf_init fails on OOM i915_perf_init can fail due to OOM. Fail driver init if i915_perf_init fails. v2: (Jani) - Reorder patch in the series Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20230323225901.3743681-6-umesh.nerlige.ramappa@intel.com commit 6c6fa1f3f7715484a1991a38345b3a63b20914cf Author: Pali Rohár Date: Wed Sep 28 14:25:39 2022 +0200 PCI: ixp4xx: Use PCI_CONF1_ADDRESS() macro Simplify pci-ixp4xx.c driver code and use new PCI_CONF1_ADDRESS() macro for accessing PCI config space. Link: https://lore.kernel.org/r/20220928122539.15116-1-pali@kernel.org Tested-by: Linus Walleij Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi commit c7461f3e689f13d4899a754b0017082af5f324cc Merge: 0dd8316037a2a 2265098fd6a62 Author: Ulf Hansson Date: Fri Mar 24 16:48:06 2023 +0100 mmc: Merge branch fixes into next Merge the mmc fixes for v6.3-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.4. Signed-off-by: Ulf Hansson commit 0dd8316037a2a6d85b2be208bef9991de7b42170 Author: Georgii Kruglov Date: Tue Mar 21 23:37:15 2023 +0300 mmc: sdhci-of-esdhc: fix quirk to ignore command inhibit for data If spec_reg is equal to 'SDHCI_PRESENT_STATE', esdhc_readl_fixup() fixes up register value and returns it immediately. As a result, the further block (spec_reg == SDHCI_PRESENT_STATE) &&(esdhc->quirk_ignore_data_inhibit == true), is never executed. The patch merges the second block into the first one. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1f1929f3f2fa ("mmc: sdhci-of-esdhc: add quirk to ignore command inhibit for data") Signed-off-by: Georgii Kruglov Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230321203715.3975-1-georgy.kruglov@yandex.ru Signed-off-by: Ulf Hansson commit f6ca8f906bc3073840d832484865757392be2819 Author: Marc Gonzalez Date: Tue Mar 21 19:01:01 2023 +0100 mmc: core: Log about empty non-removable slots Failing to detect a non-removable card shouldn't happen. Let's log a message about it to inform that we have problem that ought to be fixed. Signed-off-by: Marc Gonzalez Link: https://lore.kernel.org/r/d2444591-c91b-a94d-71e2-9dedc3b6c514@free.fr Signed-off-by: Ulf Hansson commit a72b7bbc700a47672ff95ce41a6d59b3d4dbb79b Author: Rob Herring Date: Sun Mar 19 12:30:06 2023 -0500 dt-bindings: mmc: fujitsu: Add Socionext Synquacer Add support for Socionext Synquacer SDHCI. This binding has been in use for some time. The interrupts were not documented. The driver only uses the first interrupt, but the DT and example have 2 interrupts. The 2nd one is unknown. "dma-coherent" was also not documented, but is used on Synquacer. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Reviewed-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230319173006.30455-1-robh@kernel.org Signed-off-by: Ulf Hansson commit cc47d2cf6795c545a257a2e5eda17a00a59da199 Author: Tom Rix Date: Sun Mar 19 12:47:44 2023 -0400 mmc: sdricoh_cs: remove unused sdricoh_readw function clang with W=1 reports drivers/mmc/host/sdricoh_cs.c:104:28: error: unused function 'sdricoh_readw' [-Werror,-Wunused-function] static inline unsigned int sdricoh_readw(struct sdricoh_host *host, ^ This function is not used, so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230319164744.1707169-1-trix@redhat.com Signed-off-by: Ulf Hansson commit 8e8559ddfbb6289477d15f7a2f7db87ea3f75b57 Author: A, Rashmi Date: Thu Mar 16 17:35:47 2023 +0530 dt-bindings: mmc: Remove bindings for Intel Thunder Bay SoC" Remove Thunder Bay specific code as the product got cancelled and there are no end customers or users. Signed-off-by: A, Rashmi Reviewed-by: Hunter, Adrian Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230316120549.21486-3-rashmi.a@intel.com Signed-off-by: Ulf Hansson commit 189f7370319d2fc3051af5ac0cf9a748931553e9 Author: A, Rashmi Date: Thu Mar 16 17:35:46 2023 +0530 mmc: sdhci-of-arasan: Remove Intel Thunder Bay SOC support Remove Thunder Bay specific code as the product got cancelled and there are no end customers or users. Signed-off-by: A, Rashmi Reviewed-by: Hunter, Adrian Link: https://lore.kernel.org/r/20230316120549.21486-2-rashmi.a@intel.com Signed-off-by: Ulf Hansson commit 5f284e9c5aab5b12eb48a2cecc7a573c3b4e1cb4 Author: Umesh Nerlige Ramappa Date: Thu Mar 23 15:58:54 2023 -0700 drm/i915/perf: Group engines into respective OA groups Now that we may have multiple OA units in a single GT as well as on separate GTs, create an engine group that maps to a single OA unit. v2: (Jani) - Drop warning on ENOMEM - Reorder patch in the series v3: (Ashutosh) - Remove unused members from perf structs - Update comments - Update engine_supports_oa check - Just return 1 in num_perf_groups_per_gt for now - Set engine->oa_group to NULL to begin with v4: Use engine_supports_oa() check in oa_init_reg_state (Ashutosh) v5: Rebase after dropping engine_supports_oa helper Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20230323225901.3743681-5-umesh.nerlige.ramappa@intel.com commit 9919d119fbbc913c2459b093eb81fe8197906424 Author: Umesh Nerlige Ramappa Date: Thu Mar 23 15:58:53 2023 -0700 drm/i915/perf: Validate OA sseu config outside switch Once OA supports media engine class:instance, the engine can only be validated outside the switch since class and instance parameters are separate entities. Since OA sseu config depends on engine class:instance, validate OA sseu config outside the switch. v2: (Ashutosh) - Clarify commit message - Use drm_dbg instead of DRM_DEBUG - Reorder stack variables Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20230323225901.3743681-4-umesh.nerlige.ramappa@intel.com commit 3735040978a43c25a19aa8015ab1a50dffe48f79 Author: Vinay Belgaumkar Date: Thu Mar 23 15:58:52 2023 -0700 drm/i915/mtl: Synchronize i915/BIOS on C6 enabling If BIOS enables/disables C6, i915 should do the same. Also, retain this value across driver reloads. This is needed only for MTL as of now due to an existing bug in OA which needs C6 disabled for it to function. BIOS behavior is also different across platforms in terms of how C6 is enabled. Signed-off-by: Vinay Belgaumkar Reviewed-by: Ashutosh Dixit Signed-off-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20230323225901.3743681-3-umesh.nerlige.ramappa@intel.com commit 2810ac6c753d17ee2572ffb57fe2382a786a080a Author: Chris Wilson Date: Thu Mar 23 15:58:51 2023 -0700 drm/i915/perf: Drop wakeref on GuC RC error If we fail to adjust the GuC run-control on opening the perf stream, make sure we unwind the wakeref just taken. v2: Retain old goto label names (Ashutosh) v3: Drop bitfield boolean Fixes: 01e742746785 ("drm/i915/guc: Support OA when Wa_16011777198 is enabled") Signed-off-by: Chris Wilson Reviewed-by: Ashutosh Dixit Signed-off-by: Umesh Nerlige Ramappa Link: https://patchwork.freedesktop.org/patch/msgid/20230323225901.3743681-2-umesh.nerlige.ramappa@intel.com commit 50233e105a0332ec0f3bc83180c416e6b200471e Author: Sergio Paracuellos Date: Fri Mar 24 08:37:33 2023 +0100 PCI: mt7621: Use dev_info() to log PCIe card detection When there is no card plugged on a PCIe port a log reporting that the port will be disabled is flagged as an error (dev_err()). Since this is not an error at all, change the log level by using dev_info() instead. Link: https://lore.kernel.org/r/20230324073733.1596231-1-sergio.paracuellos@gmail.com Signed-off-by: Sergio Paracuellos Signed-off-by: Lorenzo Pieralisi commit d14d9139c023042e63dc869a9a1be4e4eb317396 Author: Like Xu Date: Tue Feb 14 16:49:19 2023 +0800 KVM: selftests: Add a helper to read kvm boolean module parameters Add a helper function for reading kvm boolean module parameters values. No functional change intended. Signed-off-by: Like Xu Link: https://lore.kernel.org/r/20230214084920.59787-2-likexu@tencent.com Signed-off-by: Sean Christopherson commit f6baabdcadd1080893aa5e49e6959cb070244703 Author: Anish Moorthy Date: Thu Feb 23 00:18:05 2023 +0000 KVM: selftests: Fix nsec to sec conversion in demand_paging_test demand_paging_test uses 1E8 as the denominator to convert nanoseconds to seconds, which is wrong. Use NSEC_PER_SEC instead to fix the issue and make the conversion obvious. Reported-by: James Houghton Signed-off-by: Anish Moorthy Reviewed-by: Oliver Upton Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20230223001805.2971237-1-amoorthy@google.com Signed-off-by: Sean Christopherson commit b0d237087c674c43df76c1a0bc2737592f3038f4 Author: Jun Miao Date: Thu Feb 23 13:28:51 2023 +0800 KVM: Fix comments that refer to the non-existent install_new_memslots() Fix stale comments that were left behind when install_new_memslots() was replaced by kvm_swap_active_memslots() as part of the scalable memslots rework. Fixes: a54d806688fe ("KVM: Keep memslots in tree-based structures instead of array-based ones") Signed-off-by: Jun Miao Link: https://lore.kernel.org/r/20230223052851.1054799-1-jun.miao@intel.com Signed-off-by: Sean Christopherson commit 5a08585d38d66dd64b8ae22229bdfae3fdc1ef3e Author: Ville Syrjälä Date: Mon Mar 20 11:05:20 2023 +0200 drm/i915: Add PLANE_CHICKEN registers Define the PLANE_CHICKEN register offsets. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230320090522.9909-5-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit bb8494423e2e4dbac9ece7eebba421011bafe389 Author: Ville Syrjälä Date: Mon Mar 20 11:05:19 2023 +0200 drm/i915/dpt: Introduce HAS_DPT() Replace the hand rolled DISPLAY_VER check for a more descriptive HAS_DPT() macro. Will be used on more than one place later. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230320090522.9909-4-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit ef5cb493a9acd7d97870d6e542020980ae3f3483 Author: Ville Syrjälä Date: Mon Mar 20 11:05:18 2023 +0200 drm/i915/dpt: Only do the POT stride remap when using DPT If we want to test with DPT disabled on ADL the POT stride remap stuff needs to be disabled. Make it depend on actual DPT usage instead of just assuming it based on the modifier. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230320090522.9909-3-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit 779cb5ba64ec7df80675a956c9022929514f517a Author: Ville Syrjälä Date: Mon Mar 20 11:05:17 2023 +0200 drm/i915/dpt: Treat the DPT BO as a framebuffer Currently i915_gem_object_is_framebuffer() doesn't treat the BO containing the framebuffer's DPT as a framebuffer itself. This means eg. that the shrinker can evict the DPT BO while leaving the actual FB BO bound, when the DPT is allocated from regular shmem. That causes an immediate oops during hibernate as we try to rewrite the PTEs inside the already evicted DPT obj. TODO: presumably this might also be the reason for the DPT related display faults under heavy memory pressure, but I'm still not sure how that would happen as the object should be pinned by intel_dpt_pin() while in active use by the display engine... Cc: stable@vger.kernel.org Cc: Juha-Pekka Heikkila Cc: Matthew Auld Cc: Imre Deak Fixes: 0dc987b699ce ("drm/i915/display: Add smem fallback allocation for dpt") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230320090522.9909-2-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit 5f5ac460dfe7f4e11f99de9870f240e39189cf72 Author: H. Nikolaus Schaller Date: Thu Mar 9 17:56:31 2023 +0100 PCI: imx6: Install the fault handler only on compatible match commit bb38919ec56e ("PCI: imx6: Add support for i.MX6 PCIe controller") added a fault hook to this driver in the probe function. So it was only installed if needed. commit bde4a5a00e76 ("PCI: imx6: Allow probe deferral by reset GPIO") moved it from probe to driver init which installs the hook unconditionally as soon as the driver is compiled into a kernel. When this driver is compiled as a module, the hook is not registered until after the driver has been matched with a .compatible and loaded. commit 415b6185c541 ("PCI: imx6: Fix config read timeout handling") extended the fault handling code. commit 2d8ed461dbc9 ("PCI: imx6: Add support for i.MX8MQ") added some protection for non-ARM architectures, but this does not protect non-i.MX ARM architectures. Since fault handlers can be triggered on any architecture for different reasons, there is no guarantee that they will be triggered only for the assumed situation, leading to improper error handling (i.MX6-specific imx6q_pcie_abort_handler) on foreign systems. I had seen strange L3 imprecise external abort messages several times on OMAP4 and OMAP5 devices and couldn't make sense of them until I realized they were related to this unused imx6q driver because I had CONFIG_PCI_IMX6=y. Note that CONFIG_PCI_IMX6=y is useful for kernel binaries that are designed to run on different ARM SoC and be differentiated only by device tree binaries. So turning off CONFIG_PCI_IMX6 is not a solution. Therefore we check the compatible in the init function before registering the fault handler. Link: https://lore.kernel.org/r/e1bcfc3078c82b53aa9b78077a89955abe4ea009.1678380991.git.hns@goldelico.com Fixes: bde4a5a00e76 ("PCI: imx6: Allow probe deferral by reset GPIO") Fixes: 415b6185c541 ("PCI: imx6: Fix config read timeout handling") Fixes: 2d8ed461dbc9 ("PCI: imx6: Add support for i.MX8MQ") Signed-off-by: H. Nikolaus Schaller Signed-off-by: Lorenzo Pieralisi Reviewed-by: Richard Zhu commit 1be3640cbb4a52ac9a2653ff20d68f983366092c Author: Gustavo A. R. Silva Date: Fri Mar 17 11:39:36 2023 -0600 wifi: carl9170: Replace fake flex-array with flexible-array member Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Address the following warnings found with GCC-13 and -fstrict-flex-arrays=3 enabled: drivers/net/wireless/ath/carl9170/tx.c:702:61: warning: array subscript i is outside array bounds of ‘const struct _carl9170_tx_status[0]’ [-Warray-bounds=] drivers/net/wireless/ath/carl9170/tx.c:701:65: warning: array subscript i is outside array bounds of ‘const struct _carl9170_tx_status[0]’ [-Warray-bounds=] This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/267 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Acked-by: Christian Lamparter Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/ZBSl2M+aGIO1fnuG@work commit 72383ed78c1c01d36612ca5c6fdd2f35fd859bbd Author: Gustavo A. R. Silva Date: Fri Mar 17 11:30:47 2023 -0600 wifi: carl9170: Fix multiple -Warray-bounds warnings GCC (and Clang)[1] does not like having a partially allocated object, since it cannot reason about it for bounds checking. Instead, fully allocate struct carl9170_cmd. Fix the following warnings Seen under GCC 13: drivers/net/wireless/ath/carl9170/cmd.c:125:30: warning: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[4]’ [-Warray-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:126:30: warning: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[4]’ [-Warray-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:125:30: warning: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[20]’ [-Warray-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:126:30: warning: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[20]’ [-Warray-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:161:12: warning: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[20]’ [-Warray-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:162:12: warning: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[20]’ [-Warray-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:163:12: warning: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[20]’ [-Warray-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:164:12: warning: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[20]’ [-Warray-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:125:30: warning: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[8]’ [-Warray-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:126:30: warning: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[8]’ [-Warray-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:220:12: warning: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[8]’ [-Warray-bounds=] Link: https://github.com/KSPP/linux/issues/268 Link: godbolt.org/z/KP97sxh3T [1] Signed-off-by: Gustavo A. R. Silva Acked-by: Christian Lamparter Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/ZBSjx236+BTiRByf@work commit 9fc093b756f64788ce33e3484f6f59a169704759 Author: Tom Rix Date: Wed Mar 22 08:28:55 2023 -0400 wifi: ath10k: remove unused ath10k_get_ring_byte function clang with W=1 reports: drivers/net/wireless/ath/ath10k/ce.c:88:1: error: unused function 'ath10k_get_ring_byte' [-Werror,-Wunused-function] ath10k_get_ring_byte(unsigned int offset, ^ This function is not used so remove it. Signed-off-by: Tom Rix Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230322122855.2570417-1-trix@redhat.com commit b6b88111c0dbcef04cd0e0bafd646e4c09728302 Author: Johan Hovold Date: Tue Mar 21 10:40:10 2023 +0100 dt-bindings: net: wireless: add ath11k pcie bindings Add devicetree bindings for Qualcomm ath11k PCIe devices such as WCN6855 for which the calibration data variant may need to be described. Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230321094011.9759-2-johan+linaro@kernel.org commit 25d165c498025f401eed6503f03115c1fb896c47 Author: Harshitha Prem Date: Mon Mar 20 14:42:08 2023 +0530 wifi: ath12k: incorrect channel survey dump When underlying hardware supports more than one band, then wiphy is aware of all the frequency bands present. Example, say wiphy0 is aware of 2 GHz, 5 GHz and 6 GHz band information. Hence, when an virtual AP interface is brought up in auto channel selection on each band. Survey is initiated from the userspace application for all the virtual AP interfaces simultaneously. For survey dump collection, freq_to_idx() api is used to map the index of particular frequency to populate its survey. When the dump was collected, the index fetched was incorrect. Example, in case of multi-hardware, the index of channel 36 was reported as 14, because wiphy0 had index 0-13 for 2 GHz channels, instead of 0 for that ar which resulted in invalid survey sent to userspace application. The incorrect index was because of the mapping did not consider whether the freq band is present in its radio structure (ar) or not. To handle this, the freq_to_idx() api should map index for the particular band in the ar structure. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Harshitha Prem Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230320091208.25535-1-quic_hprem@quicinc.com commit 392b6b76fd3940ba9978ecd8fe30d9ed979d3bf7 Author: Harshitha Prem Date: Mon Mar 20 14:34:00 2023 +0530 wifi: ath12k: fix incorrect handling of AMSDU frames When a data traffic with size greater than 1500 is initiated, say size 65500, it is sent as a set of AMSDUs (3 MSDUs) in a MPDU. These AMSDUs are incorrectly classified as multicast and peer id gets changed, except for first msdu, because of mcast_bcast bit derived from rx_desc for every msdu received. The mcast_bcast bit in rx_desc is only valid for first msdu. Hence, add changes to derive mcast_bcast only if it is a first msdu. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Harshitha Prem Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230320090400.30027-1-quic_hprem@quicinc.com commit e93bbd65547ea8073b707c9034c3f051f8018614 Author: Aaradhana Sahu Date: Mon Mar 20 10:54:27 2023 +0530 wifi: ath12k: fix packets are sent in native wifi mode while we set raw mode Currently, if we set raw mode as encap type, packets are sent in native wifi mode which is default mode. This is caused by no check being present for raw mode in ath12k_dp_tx_get_encap_type function, so it's always going in native wifi mode. Fix, this issue by adding check condition for raw mode. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aaradhana Sahu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230320052427.12271-1-quic_aarasahu@quicinc.com commit 4b50d4205207ab706b3ecd0d122c014845b8e1f0 Author: P Praneesh Date: Fri Mar 17 21:50:56 2023 +0530 wifi: ath12k: fill peer meta data during reo_reinject Firmware expects physical address in the reo entrance ring when MLO is enabled and peer meta data in the queue_addr_lo for the non MLO cases. Current implementation fills the physical address for the non MLO cases and firmware decodes it differently which leads to SOC CSR region access which is not related to firmware/MAC operation. Fix this by sending only peer_meta data and destination indication bit during non MLO case. This prevents firmware from invalid decoding. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: P Praneesh Signed-off-by: Manish Dharanenthiran Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230317162056.20353-1-quic_mdharane@quicinc.com commit 44650f33d3bd76dd968cb8880c8eedd465030cd5 Author: Greg Kroah-Hartman Date: Fri Mar 24 13:27:11 2023 +0100 kobject.h remove extern from function prototypes The kernel coding style does not require 'extern' in function prototypes in .h files, so remove them from include/linux/kobject.h as they are not needed. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230324122711.2664537-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 3e44d5c9e987c32e5bdc9de2c166f622cc81e15d Author: Greg Kroah-Hartman Date: Fri Mar 24 13:27:10 2023 +0100 driver core: physical_location.h remove extern from function prototypes The kernel coding style does not require 'extern' in function prototypes in .h files, so remove them from drivers/base/physical_location.h as they are not needed. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230324122711.2664537-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 8da5b970aaec41ed11c3165f5c25878cd9849517 Author: Greg Kroah-Hartman Date: Fri Mar 24 13:27:09 2023 +0100 driver core: base.h: remove extern from function prototypes The kernel coding style does not require 'extern' in function prototypes in .h files, so remove them from drivers/base/base.h as they are not needed. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230324122711.2664537-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 8a2b9c84c708cf2a99499d5a685a642af7b68c37 Author: Greg Kroah-Hartman Date: Fri Mar 24 13:27:08 2023 +0100 driver core: driver.h: remove extern from function prototypes The kernel coding style does not require 'extern' in function prototypes in .h files, so remove them from include/linux/device/driver.h as they are not needed. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230324122711.2664537-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 0d62b79fd8083ae2400f31e38f8d63db3bd59bff Author: Greg Kroah-Hartman Date: Fri Mar 24 13:27:07 2023 +0100 driver core: bus.h: remove extern from function prototypes The kernel coding style does not require 'extern' in function prototypes in .h files, so remove them from include/linux/device/bus.h as they are not needed. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230324122711.2664537-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit f43243c66e5e9ad839d235f82a58e73a7e7612af Author: Greg Kroah-Hartman Date: Fri Mar 24 13:27:06 2023 +0100 driver core: device.h: remove extern from function prototypes The kernel coding style does not require 'extern' in function prototypes in .h files, so remove them from include/linux/device.h as they are not needed. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230324122711.2664537-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 43718dca48429b9eb5b82cdd41e2a1f162a02fb9 Author: Greg Kroah-Hartman Date: Fri Mar 24 11:01:32 2023 +0100 driver core: class.h: remove extern from function prototypes The kernel coding style does not require 'extern' in function prototypes in .h files, so remove them from include/linux/device/class.h as they are not needed. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230324100132.1633647-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit dcfbb67e48a2becfce7990386e985b9c45098ee5 Author: Greg Kroah-Hartman Date: Fri Mar 24 11:01:31 2023 +0100 driver core: class: use lock_class_key already present in struct subsys_private In commit 37e98d9bedb5 ("driver core: bus: move lock_class_key into dynamic structure"), we moved the lock_class_key into the internal structure shared by busses and classes, but only used it for buses. Move the class code to use this structure as it is already present and being allocated, instead of the statically allocated on-the-stack variable that class_create() was using as part of a macro wrapper around the core function call. Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230324100132.1633647-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit d649c638dc26f3501da510cf7fceb5c15ca54258 Author: Cheng Xu Date: Tue Mar 7 18:29:23 2023 +0800 RDMA/erdma: Use fixed hardware page size Hardware's page size is 4096, but the kernel's page size may vary. Driver should use hardware's page size when communicating with hardware. Fixes: 155055771704 ("RDMA/erdma: Add verbs implementation") Link: https://lore.kernel.org/r/20230307102924.70577-2-chengyou@linux.alibaba.com Signed-off-by: Cheng Xu Signed-off-by: Jason Gunthorpe commit d94671632572813e90bcf475bb4c7d51fbf20173 Author: Bob Pearson Date: Sat Mar 4 11:45:34 2023 -0600 RDMA/rxe: Rewrite rxe_task.c This patch is a major rewrite of the tasklet routines in rxe_task.c. The main motivation for this is the realization that the code violates the safety of the qp pointer by correct reference counting. When a tasklet is scheduled from a verbs API the calling thread has a valid reference to the qp and schedules the tasklet to run at a later time carrying a pointer to the qp. Once the calling code returns however the qp can be destroyed at any time. In order to correct this a reference to the qp must be taken when the task is scheduled and held until it finishes running. This is complicated by the tasklet library not alwys running a task that is scheduled depending on whether someone else has scheduled it. This patch moves the logic for deciding whether to run or schedule a task outside of do_task() and guarantees that there is only one copy of the task scheduled or running at a time. Secondly the separate flags controlling teardown and draining of the task are included in the task state machine and all references to the state are protected by spinlocks to avoid consistency and memory barrier issues. Link: https://lore.kernel.org/r/20230304174533.11296-9-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit f455a1bc972cefc4bf2dbf1bf37a36bb51a5f7e7 Author: Bob Pearson Date: Sat Mar 4 11:45:33 2023 -0600 RDMA/rxe: Make tasks schedule each other Replace rxe_run_task() by rxe_sched_task() when tasks call each other. These are not performance critical and mainly involve error paths but they run the risk of causing deadlocks. Link: https://lore.kernel.org/r/20230304174533.11296-8-rpearsonhpe@gmail.com Signed-off-by: Ian Ziemba Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 960ebe97e5238565d15063c8f4d1b2108efe2e65 Author: Bob Pearson Date: Sat Mar 4 11:45:32 2023 -0600 RDMA/rxe: Remove __rxe_do_task() The subroutine __rxe_do_task is not thread safe and it has no way to guarantee that the tasks, which are designed with the assumption that they are non-reentrant, are not reentered. All of its uses are non-performance critical. This patch replaces calls to __rxe_do_task with calls to rxe_sched_task. It also removes irrelevant or unneeded if tests. Instead of calling the task machinery a single call to the tasklet function (rxe_requester, etc.) is sufficient to draing the queues if task execution has been disabled or stopped. Together these changes allow the removal of __rxe_do_task. Link: https://lore.kernel.org/r/20230304174533.11296-7-rpearsonhpe@gmail.com Signed-off-by: Ian Ziemba Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit a246aa2e8a6d8919462b7ffe550cbe51d2894152 Author: Bob Pearson Date: Sat Mar 4 11:45:31 2023 -0600 RDMA/rxe: Remove qp reference counting in tasks Currently each of the three tasklets requester, completer and responder in the rxe driver take and release a reference to the qp argument at the beginning and end of the subroutines. The caller passing in the qp argument should be responsible for holding a reference to qp so these are not required. Further doing so breaks the qp cleanup code in rxe_qp_do_cleanup which calls these routines after all the references have been dropped so they cannot drain the packet and work request queues as intended. In fact if these routines are deferred by calling tasklet_schedule there is no guarantee that the calling code does have a qp reference. That is a bug in rxe_task.c which will be fixed later in this series. Link: https://lore.kernel.org/r/20230304174533.11296-6-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit fbdeb828a21ff8de045a27ddcfc6ee66201b9a94 Author: Bob Pearson Date: Sat Mar 4 11:45:30 2023 -0600 RDMA/rxe: Cleanup error state handling in rxe_comp.c Cleanup the handling of qp in the error state, reset state and during rxe_qp_do_cleanup. Make the same as rxe_resp.c Link: https://lore.kernel.org/r/20230304174533.11296-5-rpearsonhpe@gmail.com Signed-off-by: Ian Ziemba Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 49dc9c1f0c7e396654a31a480328fffd902fa494 Author: Bob Pearson Date: Sat Mar 4 11:45:29 2023 -0600 RDMA/rxe: Cleanup reset state handling in rxe_resp.c Cleanup the handling of qp in the error state, reset state and during rxe_qp_do_cleanup. The error state does about the same thing as the others but has code spread all over. This patch combines them in a cleaner way. Link: https://lore.kernel.org/r/20230304174533.11296-4-rpearsonhpe@gmail.com Signed-off-by: Ian Ziemba Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit ad44ac082fdff7ee57fe125432f7d9d7cb610a23 Author: Douglas Anderson Date: Fri Mar 24 06:34:06 2023 -0700 regulator: qcom-rpmh: Revert "regulator: qcom-rpmh: Use PROBE_FORCE_SYNCHRONOUS" This reverts commit 58973046c1bf ("regulator: qcom-rpmh: Use PROBE_FORCE_SYNCHRONOUS"). Further digging into the problems that prompted the us to switch to synchronous probe showed that the root cause was a missing "rootwait" in the kernel command line arguments. Let's reinstate asynchronous probe. Fixes: 58973046c1bf ("regulator: qcom-rpmh: Use PROBE_FORCE_SYNCHRONOUS") Cc: Marek Szyprowski Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230324063357.1.Ifdf3625a3c5c9467bd87bfcdf726c884ad220a35@changeid Signed-off-by: Mark Brown commit 37b58becc1cee4d591024f2056d7ffa99c6089e0 Author: Daniel Baluta Date: Fri Mar 24 14:40:19 2023 +0200 ASoC: soc-compress: Inherit atomicity from DAI link for Compress FE After commit bbf7d3b1c4f40 ("ASoC: soc-pcm: align BE 'atomicity' with that of the FE") BE and FE atomicity must match. In the case of Compress PCM there is a mismatch in atomicity between FE and BE and we get errors like this: [ 36.434566] sai1-wm8960-hifi: dpcm_be_connect: FE is atomic but BE is nonatomic, invalid configuration [ 36.444278] PCM Deep Buffer: ASoC: can't connect SAI1.OUT In order to fix this we must inherit the atomicity from DAI link associated with current PCM Compress FE. Fixes: bbf7d3b1c4f4 ("ASoC: soc-pcm: align BE 'atomicity' with that of the FE") Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230324124019.30826-1-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit 3946fc2a42b18cf0b675121158a2625825ce27b5 Author: Bob Pearson Date: Sat Mar 4 11:45:27 2023 -0600 RDMA/rxe: Convert tasklet args to queue pairs Originally is was thought that the tasklet machinery in rxe_task.c would be used in other applications but that has not happened for years. This patch replaces the 'void *arg' by struct 'rxe_qp *qp' in the parameters to the tasklet calls. This change will have no affect on performance but may make the code a little clearer. Link: https://lore.kernel.org/r/20230304174533.11296-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 03f62c9cefdb833ab77bfef63066e923696dac0f Author: Takashi Iwai Date: Thu Mar 23 07:52:37 2023 +0100 ALSA: docs: A few more words for PCM XRUN handling and stream locks Enhance the documents about the PCM, missing descriptions for a couple of helpers like snd_pcm_period_elapsed_under_stream_lock() and snd_pcm_stop_xrun(). Link: https://lore.kernel.org/r/20230323065237.5062-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit f84af109f6ca6eba5fd3031cb5b85907a607b2b3 Author: Takashi Iwai Date: Thu Mar 23 07:52:36 2023 +0100 ALSA: docs: Add description about ack callback -EPIPE error handling Add a brief description about the newly added behavior of the PCM ack callback with -EPIPE error. Link: https://lore.kernel.org/r/20230323065237.5062-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 0146878cf299174ec39cdd2340c19a528794d881 Author: Takashi Iwai Date: Thu Mar 23 07:52:35 2023 +0100 ALSA: pcm: Improved XRUN handling for indirect PCM helpers As PCM ack callback may handle the XRUN situation gracefully now, change the indirect PCM helpers to give a proper error (-EPIPE). Also, change the pointer callback helpers to deal with the XRUN error properly, too. This requires the PCM core change by the commit 8c721c53dda5 ("ALSA: usb-audio: Fix recursive locking at XRUN during syncing"). Link: https://lore.kernel.org/r/20230323065237.5062-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit a7a0dcdff41700d4dfc347a6d7786d8e695994e5 Merge: 2c7598903f184 fa4e7a6fa12b1 Author: Takashi Iwai Date: Fri Mar 24 14:52:03 2023 +0100 Merge branch 'for-linus' into for-next Back-merge of 6.3 devel branch for further changes of PCM and documentation. Signed-off-by: Takashi Iwai commit 5bf944f24129cbc4b5828348bdce2db94ca9fbd6 Author: Bob Pearson Date: Fri Mar 3 16:16:24 2023 -0600 RDMA/rxe: Add error messages This patch adds error and debug messages so that every interaction with rdma-core through a verbs API call or a completion error return will generate at least one error message backed up by debug messages with more detail. With dynamic debugging one can follow up after seeing an error message by turning on the appropriate debug messages. Link: https://lore.kernel.org/r/20230303221623.8053-5-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 9ac01f434a1eb56ea94611bd75cf62fa276b41f4 Author: Bob Pearson Date: Fri Mar 3 16:16:23 2023 -0600 RDMA/rxe: Extend dbg log messages to err and info Extend the dbg log messages (e.g. rxe_dbg_xxx) to include err and info types. rxe.c is modified to use these new log messages as examples. Link: https://lore.kernel.org/r/20230303221623.8053-4-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit a9fb3287211e64b94ceb2b6b4791cc2b829d0d56 Author: Bob Pearson Date: Fri Mar 3 16:16:22 2023 -0600 RDMA/rxe: Change rxe_dbg to rxe_dbg_dev Replace the name rxe_dbg with rxe_dbg_dev which better matches the remaining rxe_dbg_xxx macros for debug messages with a rxe device parameter. Reuse the name rxe_dbg for debug messages which do not have a rxe device parameter. Link: https://lore.kernel.org/r/20230303221623.8053-3-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 9168d125ea032ad199275193493c13cb077da5cc Author: Bob Pearson Date: Fri Mar 3 16:16:21 2023 -0600 RDMA/rxe: Replace exists by rxe in rxe.c 'exists' looks like a boolean. This patch replaces it by the normal name used for the rxe device, 'rxe', which should be a little less confusing. The second rxe_dbg() message is incorrect since rxe is known to be NULL and this will cause a seg fault if this message were ever sent. Replace it by pr_debug for the moment. Fixes: c6aba5ea0055 ("RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe.c") Link: https://lore.kernel.org/r/20230303221623.8053-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 14aed8ea48e2f5c710ab678e1ba32b9f398d40b2 Author: Pin-yen Lin Date: Fri Mar 24 11:59:09 2023 +0800 drm/bridge: ps8640: Return NULL immediately when EDID read fail drm_edid_read returns NULL on error, so feeding it directly into drm_edid_duplicate may lead to NULL pointer dereference. Add a check to guard this. Fixes: 6a17b4d1b52f ("drm/bridge: ps8640: Add a cache for EDID") Signed-off-by: Pin-yen Lin Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20230324035909.1727356-1-treapking@chromium.org commit 600efe35d54961dd026f04c6ea5b4074b3284c87 Author: Jiaxun Yang Date: Wed Feb 22 13:24:25 2023 +0000 MIPS: c-r4k: Always install dma flush functions As nowadays DMA coherence is managed per device, it is possible to have a system that is defaulted to coherent dma but still have noncoherent device that needs to use those flush functions. Just install them unconditionally. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit e0b7fd1207a8ec47091439fb62dd87ca6f5b4ad3 Author: Jiaxun Yang Date: Wed Feb 22 13:24:24 2023 +0000 MIPS: Always select ARCH_HAS_SYNC_DMA_FOR_CPU for noncoherent platforms As now we are telling the necessity of post DMA flush per CPU type, there is no need to select ARCH_HAS_SYNC_DMA_FOR_CPU on per platform bias, just select it unconditionally and we can sort it at runtime. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 6be87d61c427e63c33d9cea8dc2e20cd06700882 Author: Jiaxun Yang Date: Wed Feb 22 13:24:23 2023 +0000 MIPS: Always select ARCH_HAS_SETUP_DMA_OPS arch_setup_dma_ops on MIPS sets coherency information in struct device. It's essential for per-device coherency to work. Select it for all non-coherent platforms. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit ed6a0b6e9fd78e167d0488331d1695c6c84192be Author: Rob Herring Date: Sun Mar 19 11:31:48 2023 -0500 MIPS: octeon: Use of_address_to_resource() Replace of_get_address() and of_translate_address() calls with single call to of_address_to_resource(). Signed-off-by: Rob Herring Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit 2dd438cdc2e9e6913893009a4d8dff3edf26f4f5 Author: David Yang Date: Tue Feb 7 12:33:17 2023 +0800 HID: kye: Add support for all kye tablets Physical data for all kye tablets are collected from Windows driver, to generate correct HID reports. Signed-off-by: David Yang Signed-off-by: Jiri Kosina commit 74f9d27ac7591e0df05c85ca5eb538253f39919d Author: Ye Xingchen Date: Fri Mar 24 10:18:53 2023 +0800 soc: qcom: smsm: Use dev_err_probe() Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/202303241018532824420@zte.com.cn commit d703e5a6ffa73fba8e9023190c53d4458cc09a06 Author: Lukas Bulwahn Date: Fri Mar 24 11:08:48 2023 +0100 mips: Remove obsolete configs IRQ_MSP_CIC and IRQ_MSP_SLP Commit 1b00767fd8e1 ("MIPS: Remove PMC MSP71xx platform") removes all uses of the config IRQ_MSP_CIC and IRQ_MSP_SLP. Remove these two obsolete configs IRQ_MSP_CIC and IRQ_MSP_SLP. Signed-off-by: Lukas Bulwahn Signed-off-by: Thomas Bogendoerfer commit 4367d763698c5c7c2c0e540f0508e48b337c7d8a Author: Johan Hovold Date: Fri Mar 24 10:47:44 2023 +0100 arm64: dts: qcom: sc8280xp-x13s: enable alternate touchpad Enable both touchpad nodes in the devictree and let the HID driver determine which one is actually populated (by attempting to read from each i2c address). Ideally this would not be needed and the boot firmware should instead enable only the node for the populated touchpad, but this is unlikely to ever be realised for the X13s. Note that the pin configuration must currently be moved to the parent i2c-bus node even though only one of these nodes will ever be successfully probed on a specific device (e.g. to allow them to be probed in parallel). Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230324094744.20448-1-johan+linaro@kernel.org commit 5b9ff0ba11042096bfb396e506fa9038e6a61de7 Author: Andy Shevchenko Date: Fri Mar 24 13:27:20 2023 +0200 device property: Constify a few fwnode APIs The fwnode parameter is not altered in the following APIs: - fwnode_get_next_parent_dev() - fwnode_is_ancestor_of() - fwnode_graph_get_endpoint_count() so constify them. Reported-by: Russell King (Oracle) Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230324112720.71315-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0a392354dbc3ff748e0856a75592fe8d0fdc7674 Author: Russell King Date: Fri Mar 24 09:26:47 2023 +0000 device property: constify fwnode_get_phy_mode() argument fwnode_get_phy_mode() does not modify the fwnode argument, merely using it to obtain the phy-mode property value. Therefore, it can be made const. Signed-off-by: Russell King (Oracle) Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/E1pfdh9-00EQ8t-HB@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit ab76c891a687ae871f7e76dbf9bc3a0e32b53423 Author: Jiapeng Chong Date: Fri Mar 24 10:23:03 2023 +0800 ASoC: cs35l56: Fix an unsigned comparison which can never be negative The variable 'rv' is defined as unsigned type, so the following if statement is invalid, we can modify the type of rv to int. if (rv < 0) { dev_err(cs35l56->dev, "irq: failed to get pm_runtime: %d\n", rv); goto err_unlock; } ./sound/soc/codecs/cs35l56.c:333:5-7: WARNING: Unsigned expression compared with zero: rv < 0. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4599 Signed-off-by: Jiapeng Chong Reviewed-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230324022303.121485-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown commit 92405802a7d6aa1953915af869192296d1792d18 Author: Kuninori Morimoto Date: Thu Mar 23 22:56:08 2023 +0000 ASoC: simple-card.c: add missing of_node_put() It is missing of_node_put() for platform. This patch fixup it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ilerjcvr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e7098ba9b3785d626326040d300f95fec79aa765 Author: Kuninori Morimoto Date: Thu Mar 23 22:53:46 2023 +0000 ASoC: soc-topology.c: remove unnecessary dai_link->platform dai_link->platform is no longer needed if CPU and Platform are same Component. This patch removes unnecessary dai_link->platform. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87jzz7jczp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3b0db249cf8fe0027e2a4161d27a8566d82fcd80 Author: Kuninori Morimoto Date: Thu Mar 23 22:53:41 2023 +0000 ASoC: ti: remove unnecessary dai_link->platform dai_link->platform is no longer needed if CPU and Platform are same Component. This patch removes unnecessary dai_link->platform. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lejnjczu.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2f650f87c03cab72e751fc739f42a1e257bdc6b9 Author: Kuninori Morimoto Date: Thu Mar 23 22:53:35 2023 +0000 ASoC: atmel: remove unnecessary dai_link->platform dai_link->platform is no longer needed if CPU and Platform are same Component. This patch removes unnecessary dai_link->platform. Signed-off-by: Kuninori Morimoto Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/87mt43jd00.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 33683cbf49b5412061cb1e4c876063fdef86def4 Author: Kuninori Morimoto Date: Thu Mar 23 22:53:29 2023 +0000 ASoC: fsl: remove unnecessary dai_link->platform dai_link->platform is no longer needed if CPU and Platform are same Component. This patch removes unnecessary dai_link->platform. Dummy Platform is also not necessary. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o7ojjd06.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit b3ece3a6a231e51c262d67fd47c017970a7dee44 Author: Muralidhara M K Date: Fri Jan 27 17:04:19 2023 +0000 EDAC/amd64: Add get_err_info() to pvt->ops GPU Nodes will use a different method to determine the chip select and channel of an error. A function pointer should be used rather than introduce another branching condition. Prepare for this by adding get_err_info() to pvt->ops. This function is only called from the modern code path, so a legacy function is not defined. Make sure to call this after MCA_STATUS[SyndV] is checked, since the csrow value is found in MCA_SYND. [ Yazen: rebased/reworked patch and reworded commit message. ] Signed-off-by: Muralidhara M K Co-developed-by: Naveen Krishna Chatradhi Signed-off-by: Naveen Krishna Chatradhi Co-developed-by: Yazen Ghannam Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-23-yazen.ghannam@amd.com commit f6f36382d6353f648ca111661e0584cd7eb5962a Author: Muralidhara M K Date: Fri Jan 27 17:04:18 2023 +0000 EDAC/amd64: Split dump_misc_regs() into dct/umc functions Add a function pointer to pvt->ops. No functional change is intended. [ Yazen: Rebased/reworked patch and reworded commit message. ] Signed-off-by: Muralidhara M K Co-developed-by: Naveen Krishna Chatradhi Signed-off-by: Naveen Krishna Chatradhi Co-developed-by: Yazen Ghannam Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-22-yazen.ghannam@amd.com commit 6fb8b5fb9e324c617092d61bbe193aa6a49ff2dc Author: Muralidhara M K Date: Fri Jan 27 17:04:17 2023 +0000 EDAC/amd64: Split init_csrows() into dct/umc functions Call them from their respective setup_mci_misc_attrs() paths. Also, drop the check for an "empty" device, i.e. one without memory. This is redundant and already done in instance_has_memory() earlier in the init path. No functional change is intended. [ Yazen: rebased/reworked patch and reworded commit message. ] Signed-off-by: Muralidhara M K Co-developed-by: Naveen Krishna Chatradhi Signed-off-by: Naveen Krishna Chatradhi Co-developed-by: Yazen Ghannam Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-21-yazen.ghannam@amd.com commit f6a4b4a1aa1647a5a9c58aeef099a7a8593151fe Author: Muralidhara M K Date: Fri Jan 27 17:04:16 2023 +0000 EDAC/amd64: Split determine_edac_cap() into dct/umc functions Call them from their respective setup_mci_misc_attrs() paths. No functional change is intended. [ Yazen: rebased/reworked patch and reworded commit message. ] Signed-off-by: Muralidhara M K Co-developed-by: Naveen Krishna Chatradhi Signed-off-by: Naveen Krishna Chatradhi Co-developed-by: Yazen Ghannam Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-20-yazen.ghannam@amd.com commit 9369239e8d8b3e91eaa61bca4a546ff7d67bc8bc Author: Yazen Ghannam Date: Fri Jan 27 17:04:15 2023 +0000 EDAC/amd64: Rename f17h_determine_edac_ctl_cap() ...to match the "umc_" prefix convention. No functional change is intended. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-19-yazen.ghannam@amd.com commit 0a42a37f65155f9aa9ca40a959ad7d64f6cdc37a Author: Muralidhara M K Date: Fri Jan 27 17:04:14 2023 +0000 EDAC/amd64: Split setup_mci_misc_attrs() into dct/umc functions The init_one_instance() path is shared between legacy and modern systems. So add the new functions to a function pointer in pvt->ops. No functional change is intended. [ Yazen: Rebased/reworked patch and reworded commit message. ] Signed-off-by: Muralidhara M K Co-developed-by: Naveen Krishna Chatradhi Signed-off-by: Naveen Krishna Chatradhi Co-developed-by: Yazen Ghannam Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-18-yazen.ghannam@amd.com commit eb2bcdfc3755342f6af5b9b8365f27c05e4bf275 Author: Muralidhara M K Date: Fri Jan 27 17:04:13 2023 +0000 EDAC/amd64: Split ecc_enabled() into dct/umc functions Call them using a function pointer in pvt->ops. The "ECC enabled" check is done outside of the hardware information gathering done in hw_info_get(). So a high-level function pointer is needed to separate the legacy and modern paths. No functional change is intended. [Yazen: rebased/reworked patch and reworded commit message. ] Signed-off-by: Muralidhara M K Co-developed-by: Naveen Krishna Chatradhi Signed-off-by: Naveen Krishna Chatradhi Co-developed-by: Yazen Ghannam Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-17-yazen.ghannam@amd.com commit 32ecdf8688d7b6ae183cce88c9307850ff6918f0 Author: Muralidhara M K Date: Fri Jan 27 17:04:12 2023 +0000 EDAC/amd64: Split read_mc_regs() into dct/umc functions Call them from their respective hw_info_get() paths. ECC symbol size is not needed on UMC systems, so determine_ecc_sym_sz() is left out of the UMC path. Do not save TOP_MEM* values on modern controllers because they're not needed there (read: they were used only for debugging, if anything). [ Yazen: rebased/reworked patch and reworded commit message. ] Signed-off-by: Muralidhara M K Co-developed-by: Naveen Krishna Chatradhi Signed-off-by: Naveen Krishna Chatradhi Co-developed-by: Yazen Ghannam Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-16-yazen.ghannam@amd.com commit 78ec161a91dda15ecdfa153196bf0a739f0cb9a9 Author: Muralidhara M K Date: Fri Jan 27 17:04:11 2023 +0000 EDAC/amd64: Split determine_memory_type() into dct/umc functions Call them from their respective hw_info_get() paths. Call them after all other hardware registers have been saved, since the memory type for a device will be determined based on the saved information. [ Yazen: rebased/reworked patch and reworded commit message. ] Signed-off-by: Muralidhara M K Co-developed-by: Naveen Krishna Chatradhi Signed-off-by: Naveen Krishna Chatradhi Co-developed-by: Yazen Ghannam Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-15-yazen.ghannam@amd.com commit b29dad9bf3ce13e7a37f7fc75ee2c95ac48b9f08 Author: Muralidhara M K Date: Fri Jan 27 17:04:10 2023 +0000 EDAC/amd64: Split read_base_mask() into dct/umc functions Call them from their respective hw_info_get() paths. Call the new functions after the setting the chip select base and mask counts, since those are need to read the correct number of chip select base and mask registers. And call the new functions before the remaining set up, because the base and mask register values will be needed later. [Yazen: Rebased/reworked patch and reworded commit message. ] Signed-off-by: Muralidhara M K Co-developed-by: Naveen Krishna Chatradhi Signed-off-by: Naveen Krishna Chatradhi Co-developed-by: Yazen Ghannam Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-14-yazen.ghannam@amd.com commit 637f60ef2cc7c015c2e065503f8da89272ab208d Author: Muralidhara M K Date: Fri Jan 27 17:04:09 2023 +0000 EDAC/amd64: Split prep_chip_selects() into dct/umc functions Call them from their respective hw_info_get() function. Avoid the need for family/model-based function pointers. Add the calls before reading hardware registers from the memory controllers, since the number of chip select bases and masks needs to be known first. [ Yazen: rebased/reworked patch and reworded commit message. ] Signed-off-by: Muralidhara M K Co-developed-by: Naveen Krishna Chatradhi Signed-off-by: Naveen Krishna Chatradhi Co-developed-by: Yazen Ghannam Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-13-yazen.ghannam@amd.com commit 9a97a7f4d7b26cb61cdbb328b9d8982d94c99170 Author: Yazen Ghannam Date: Fri Jan 27 17:04:08 2023 +0000 EDAC/amd64: Rework hw_info_{get,put} The bulk of system-specific information is gathered at init time with hw_info_get(). This function calls a number of helper functions, and many of these helper functions are split between a modern UMC/DF path and a legacy DCT path. Split hw_info_get() into legacy and modern versions. This creates two separate code paths early on, and legacy and modern helper functions can be called directly in the appropriate code path. Also, simplify hw_info_put() and share it between legacy and modern systems. NULL pointer checks are done in pci_dev_put() and kfree(), so they can be called unconditionally. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-12-yazen.ghannam@amd.com commit ed623d55eef46d0ca7557b9665b4693931bfb507 Author: Muralidhara M K Date: Fri Jan 27 17:04:07 2023 +0000 EDAC/amd64: Merge struct amd64_family_type into struct amd64_pvt Future AMD systems will support heterogeneous "AMD Node" types, e.g. CPU and GPU types. Therefore, a global family type shared across all AMD nodes is no longer appropriate. Move struct low_ops routines and members of struct amd64_family_type to struct amd64_pvt. Currently, there are many code branches that split between "modern" and "legacy" systems. Another code branch will be needed in order to cover GPU cases. However, rather than introduce another branching case in multiple functions, the current branching code should be switched to a set of function pointers. This change makes the code more readable and simplifies adding support for new families/models. In order to reuse code, define two sets of function pointers. Use one for modern systems (Family 17h and later). This will not change between current CPU families. Use another set of function pointers for legacy systems (before Family 17h). Use the Family 16h versions as default for the legacy ops since these are the latest, and adjust the function pointers as needed for older families. [ Yazen: rebased/reworked patch and reworded commit message. ] [ bp: Fix rev8 or later check. ] Signed-off-by: Muralidhara M K Co-developed-by: Naveen Krishna Chatradhi Signed-off-by: Naveen Krishna Chatradhi Co-developed-by: Yazen Ghannam Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-11-yazen.ghannam@amd.com commit 5a1adb375d7a86ee3b703f895b61de20773b6670 Author: Yazen Ghannam Date: Fri Jan 27 17:04:06 2023 +0000 EDAC/amd64: Do not discover ECC symbol size for Family 17h and later The ECC symbol size was needed on legacy system to lookup the ECC syndrome. This is not needed on modern systems because the ECC syndrome is explicitly provided in the MCA information. Remove the ECC symbol size discovery code for modern UMC-based systems. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-10-yazen.ghannam@amd.com commit a2e59ab8e93301466cb3ff3f2b7b65eb1a4e8786 Author: Yazen Ghannam Date: Fri Jan 27 17:04:05 2023 +0000 EDAC/amd64: Drop dbam_to_cs() for Family 17h and later The same function is used to calculate chip select size for all Zen-based family/models. Therefore, a family/model function pointer is not necessary. Drop the dbam_to_cs() function pointer for Family 17h and later systems. Also, move the Family 17h function to avoid a forward declaration. Rename it to indicate that the UMC Address Mask is used rather than the legacy DBAM value. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-9-yazen.ghannam@amd.com commit c0984666fde9cf7da4c1123443b469f44e94dd84 Author: Yazen Ghannam Date: Fri Jan 27 17:04:04 2023 +0000 EDAC/amd64: Split get_csrow_nr_pages() into dct/umc functions Split get_csrow_nr_pages() into a legacy and modern versions in preparation for further legacy/modern refactoring. Also, rename f17_get_cs_mode() to match the new convention. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-8-yazen.ghannam@amd.com commit 00e4feb8c0476bbde3c8bf4a593e0f82ca9a4df6 Author: Yazen Ghannam Date: Fri Jan 27 17:04:03 2023 +0000 EDAC/amd64: Rename debug_display_dimm_sizes() Use the "dct" and "umc" prefixes for legacy and modern versions respectively. Also, move the "dct" version to avoid a forward declaration, and fixup some checkpatch warnings in the process. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127170419.1824692-7-yazen.ghannam@amd.com commit 2af3b2a631b194a43551ce119cb71559d8f6b54b Author: Jaewan Kim Date: Wed Mar 22 13:16:37 2023 +0000 mac80211_hwsim: add PMSR report support via virtio PMSR (a.k.a. peer measurement) is generalized measurement between two devices with Wi-Fi support. And currently FTM (a.k.a. fine time measurement or flight time measurement) is the one and only measurement. Add the necessary functionality to allow mac80211_hwsim to report PMSR result. The result would come from the wmediumd, where other Wi-Fi devices' information are kept. mac80211_hwsim only need to deliver the result to the userspace. In detail, add new mac80211_hwsim attributes HWSIM_CMD_REPORT_PMSR, and HWSIM_ATTR_PMSR_RESULT. When mac80211_hwsim receives the PMSR result with command HWSIM_CMD_REPORT_PMSR and detail with attribute HWSIM_ATTR_PMSR_RESULT, received data is parsed to cfg80211_pmsr_result and resent to the userspace by cfg80211_pmsr_report(). To help receive the details of PMSR result, hwsim_rate_info_attributes is added to receive rate_info without complex bitrate calculation. (i.e. send rate_info without adding inverse of nl80211_put_sta_rate()). Signed-off-by: Jaewan Kim Link: https://lore.kernel.org/r/20230322131637.2633968-6-jaewan@google.com [fix uninitialized return value when there are no reports] Signed-off-by: Johannes Berg commit 8ba1da95053e02d9cb4a6849356eae6dc5687f62 Author: Jaewan Kim Date: Wed Mar 22 13:16:36 2023 +0000 mac80211_hwsim: add PMSR abort support via virtio PMSR (a.k.a. peer measurement) is generalized measurement between two devices with Wi-Fi support. And currently FTM (a.k.a. fine time measurement or flight time measurement) is the one and only measurement. Add necessary functionalities for mac80211_hwsim to abort previous PMSR request. The abortion request is sent to the wmedium where the PMSR request is actually handled. In detail, add new mac80211_hwsim command HWSIM_CMD_ABORT_PMSR. When mac80211_hwsim receives the PMSR abortion request via ieee80211_ops.abort_pmsr, the received cfg80211_pmsr_request is resent to the wmediumd with command HWSIM_CMD_ABORT_PMSR and attribute HWSIM_ATTR_PMSR_REQUEST. The attribute is formatted as the same way as nl80211_pmsr_start() expects. Signed-off-by: Jaewan Kim Link: https://lore.kernel.org/r/20230322131637.2633968-5-jaewan@google.com Signed-off-by: Johannes Berg commit 5530c04c87c5974d440ea95142e3e43ef7da4d5b Author: Jaewan Kim Date: Wed Mar 22 13:16:35 2023 +0000 mac80211_hwsim: add PMSR request support via virtio PMSR (a.k.a. peer measurement) is generalized measurement between two Wi-Fi devices. And currently FTM (a.k.a. fine time measurement or flight time measurement) is the one and only measurement. FTM is measured by RTT (a.k.a. round trip time) of packets between two Wi-Fi devices. Add necessary functionalities for mac80211_hwsim to start PMSR request by passthrough the request to wmediumd via virtio. mac80211_hwsim can't measure RTT for real because mac80211_hwsim the software simulator and packets are sent almost immediately for real. This change expect wmediumd to have all the location information of devices, so passthrough requests to wmediumd. In detail, add new mac80211_hwsim command HWSIM_CMD_ABORT_PMSR. When mac80211_hwsim receives the PMSR start request via ieee80211_ops.start_pmsr, the received cfg80211_pmsr_request is resent to the wmediumd with command HWSIM_CMD_START_PMSR and attribute HWSIM_ATTR_PMSR_REQUEST. The attribute is formatted as the same way as nl80211_pmsr_start() expects. Signed-off-by: Jaewan Kim Link: https://lore.kernel.org/r/20230322131637.2633968-4-jaewan@google.com Signed-off-by: Johannes Berg commit 5097f84437c9bd50b2c65b5f85395c34b2d545db Author: Jaewan Kim Date: Wed Mar 22 13:16:34 2023 +0000 wifi: nl80211: make nl80211_send_chandef non-static Expose nl80211_send_chandef functionality for mac80211_hwsim or vendor netlink can use it where needed. Signed-off-by: Jaewan Kim Reviewed-by: Michal Kubiak Link: https://lore.kernel.org/r/20230322131637.2633968-3-jaewan@google.com Signed-off-by: Johannes Berg commit 92d13386ec55816b3bdd6d578e59a71226e12806 Author: Jaewan Kim Date: Wed Mar 22 13:16:33 2023 +0000 mac80211_hwsim: add PMSR capability support PMSR (a.k.a. peer measurement) is generalized measurement between two Wi-Fi devices. And currently FTM (a.k.a. fine time measurement or flight time measurement) is the one and only measurement. FTM is measured by RTT (a.k.a. round trip time) of packets between two Wi-Fi devices. Add necessary functionality to allow mac80211_hwsim to be configured with PMSR capability. The capability is mandatory to accept incoming PMSR request because nl80211_pmsr_start() ignores incoming the request without the PMSR capability. In detail, add new mac80211_hwsim attribute HWSIM_ATTR_PMSR_SUPPORT. HWSIM_ATTR_PMSR_SUPPORT is used to set PMSR capability when creating a new radio. To send extra capability details, HWSIM_ATTR_PMSR_SUPPORT can have nested PMSR capability attributes defined in the nl80211.h. Data format is the same as cfg80211_pmsr_capabilities. If HWSIM_ATTR_PMSR_SUPPORT is specified, mac80211_hwsim builds cfg80211_pmsr_capabilities and sets wiphy.pmsr_capa. Signed-off-by: Jaewan Kim Link: https://lore.kernel.org/r/20230322131637.2633968-2-jaewan@google.com Signed-off-by: Johannes Berg commit 9117e682b8b79f7b5e2517fd28d42757d3e8b860 Author: Yu Zhe Date: Fri Mar 17 14:36:43 2023 +0800 crypto: caam - remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe Reviewed-by: Gaurav Jain Signed-off-by: Herbert Xu commit aedf818b1f196558390916778f56f286698de3dd Author: Yu Zhe Date: Fri Mar 17 14:26:03 2023 +0800 crypto: drivers - remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe Signed-off-by: Herbert Xu commit 6f15b1ce33f5f70f2454d226b829a34e59aa1bc8 Author: Yu Zhe Date: Fri Mar 17 13:57:57 2023 +0800 crypto: crypto4xx - remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe Signed-off-by: Herbert Xu commit 6faacef060e37e0664837392b437950b0455ddec Author: Yu Zhe Date: Thu Mar 16 17:04:12 2023 +0800 hwrng: xgene - remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe Signed-off-by: Herbert Xu commit c007e720989e3a39923d7707b9e625c1f89abb2c Author: Gaurav Jain Date: Thu Mar 16 11:37:34 2023 +0530 crypto: caam/jr - add .shutdown hook add .shutdown hook in caam_jr driver to support kexec boot Signed-off-by: Gaurav Jain Tested-by: Vijay Balakrishna Reviewed-by: Pankaj Gupta Signed-off-by: Herbert Xu commit ed4905030e291c43d7decc57557a829a890959eb Author: Herbert Xu Date: Thu Mar 16 13:30:06 2023 +0800 crypto: ccree - Depend on HAS_IOMEM Add dependency on HAS_IOMEM as the build will fail without it. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303161354.T2OZFUFZ-lkp@intel.com/ Signed-off-by: Herbert Xu commit 59a6854abb71e3b86476e1f1dc5639a10dbc4ef5 Author: Uwe Kleine-König Date: Tue Mar 14 19:23:38 2023 +0100 crypto: keembay - Drop if with an always false condition A platform device's remove callback is only ever called after the probe callback returned success. In the case of kmb_ocs_aes_remove() this means that kmb_ocs_aes_probe() succeeded before and so platform_set_drvdata() was called with a non-zero argument and platform_get_drvdata() returns non-NULL. This prepares making remove callbacks return void. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu commit 7e1c64dbe813ae2f8d46b41791247056bf477f6a Author: Ye Xingchen Date: Tue Mar 14 16:31:51 2023 +0800 crypto: p10-aes-gcm - remove duplicate include header crypto/algapi.h is included more than once. Signed-off-by: Ye Xingchen Signed-off-by: Herbert Xu commit 5eb44158f5acfa48ea8f776e2b3a09485e67bac5 Author: Yang Li Date: Tue Mar 14 14:32:16 2023 +0800 crypto: stm32 - Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Signed-off-by: Herbert Xu commit 63b3af99e7e3d3e329be9a45645ff865398b3dfe Author: Yang Li Date: Tue Mar 14 14:25:32 2023 +0800 crypto: img-hash - Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Signed-off-by: Herbert Xu commit 083a7e87e1e45506420c96a2fadf2e66da6877e2 Author: Herbert Xu Date: Tue Mar 14 13:02:39 2023 +0800 crypto: hash - Fix kdoc errors about HASH_ALG_COMMON The HASH_ALG_COMMON macro cannot be parsed by kdoc so mark it as a normal comment instead of kdoc. Also add HASH_ALG_COMMON as a structure member of shash_alg. Fixes: 0e4e6d7094df ("crypto: hash - Count error stats differently") Reported-by: Stephen Rothwell Signed-off-by: Herbert Xu commit 0dee6cd2a138cf0a31349bae58b512482a7e799a Author: Randy Dunlap Date: Mon Mar 13 19:47:34 2023 -0700 async_tx: fix kernel-doc notation warnings Fix kernel-doc warnings by adding "struct" keyword or "enum" keyword. Also fix 2 function parameter descriptions. Change some functions and structs from kernel-doc /** notation to regular /* comment notation. async_pq.c:18: warning: cannot understand function prototype: 'struct page *pq_scribble_page; ' async_pq.c:18: error: Cannot parse struct or union! async_pq.c:40: warning: No description found for return value of 'do_async_gen_syndrome' async_pq.c:109: warning: Function parameter or member 'blocks' not described in 'do_sync_gen_syndrome' async_pq.c:109: warning: Function parameter or member 'offsets' not described in 'do_sync_gen_syndrome' async_pq.c:109: warning: Function parameter or member 'disks' not described in 'do_sync_gen_syndrome' async_pq.c:109: warning: Function parameter or member 'len' not described in 'do_sync_gen_syndrome' async_pq.c:109: warning: Function parameter or member 'submit' not described in 'do_sync_gen_syndrome' async_tx.c:136: warning: cannot understand function prototype: 'enum submit_disposition ' async_tx.c:264: warning: Function parameter or member 'tx' not described in 'async_tx_quiesce' Signed-off-by: Randy Dunlap Cc: Dan Williams Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Reviewed-by: Dan Williams Signed-off-by: Herbert Xu commit a543ada7db729514ddd3ba4efa45f4c7b802ad85 Author: Toke Høiland-Jørgensen Date: Mon Mar 13 10:17:24 2023 +0100 crypto: api - Demote BUG_ON() in crypto_unregister_alg() to a WARN_ON() The crypto_unregister_alg() function expects callers to ensure that any algorithm that is unregistered has a refcnt of exactly 1, and issues a BUG_ON() if this is not the case. However, there are in fact drivers that will call crypto_unregister_alg() without ensuring that the refcnt has been lowered first, most notably on system shutdown. This causes the BUG_ON() to trigger, which prevents a clean shutdown and hangs the system. To avoid such hangs on shutdown, demote the BUG_ON() in crypto_unregister_alg() to a WARN_ON() with early return. Cc stable because this problem was observed on a 6.2 kernel, cf the link below. Link: https://lore.kernel.org/r/87r0tyq8ph.fsf@toke.dk Cc: stable@vger.kernel.org Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Herbert Xu commit 68b9bea267bfc1259e195dcac1bf69db0c0c28da Author: Aloka Dixit Date: Thu Mar 23 04:38:01 2023 -0700 mac80211: support RNR for EMA AP Generate EMA beacons, each including MBSSID and RNR elements at a given index. If number of stored RNR elements is more than the number of MBSSID elements then add those in every EMA beacon. Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/20230323113801.6903-3-quic_alokad@quicinc.com Signed-off-by: Johannes Berg commit dbbb27e183b1568d5a907ace1cd144b0709ea52a Author: Aloka Dixit Date: Thu Mar 23 04:38:00 2023 -0700 cfg80211: support RNR for EMA AP As per IEEE Std 802.11ax-2021, 11.1.3.8.3 Discovery of a nontransmitted BSSID profile, an EMA AP that transmits a Beacon frame carrying a partial list of nontransmitted BSSID profiles should include in the frame a Reduced Neighbor Report element carrying information for at least the nontransmitted BSSIDs that are not present in the Multiple BSSID element carried in that frame. Add new nested attribute NL80211_ATTR_EMA_RNR_ELEMS to support the above. Number of RNR elements must be more than or equal to the number of MBSSID elements. This attribute can be used only when EMA is enabled. Userspace is responsible for splitting the RNR into multiple elements such that each element excludes the non-transmitting profiles already included in the MBSSID element (%NL80211_ATTR_MBSSID_ELEMS) at the same index. Each EMA beacon will be generated by adding MBSSID and RNR elements at the same index. If the userspace provides more RNR elements than the number of MBSSID elements then these will be added in every EMA beacon. Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/20230323113801.6903-2-quic_alokad@quicinc.com [Johannes: validate elements] Signed-off-by: Johannes Berg commit 5c3124975e15c1fadd5af1c61e4d627cf6d97ba2 Author: Peter Zijlstra Date: Wed Mar 22 14:58:36 2023 +0100 trace,smp: Trace all smp_function_call*() invocations (Ab)use the trace_ipi_send_cpu*() family to trace all smp_function_call*() invocations, not only those that result in an actual IPI. The queued entries log their callback function while the actual IPIs are traced on generic_smp_call_function_single_interrupt(). Signed-off-by: Peter Zijlstra (Intel) commit 68e2d17c9eb311ab59aeb6d0c38aad8985fa2596 Author: Peter Zijlstra Date: Wed Mar 22 11:28:36 2023 +0100 trace: Add trace_ipi_send_cpu() Because copying cpumasks around when targeting a single CPU is a bit daft... Tested-and-reviewed-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230322103004.GA571242%40hirez.programming.kicks-ass.net commit 68f4ff04dbada18dad79659c266a8e5e29e458cd Author: Valentin Schneider Date: Tue Mar 7 14:35:58 2023 +0000 sched, smp: Trace smp callback causing an IPI Context ======= The newly-introduced ipi_send_cpumask tracepoint has a "callback" parameter which so far has only been fed with NULL. While CSD_TYPE_SYNC/ASYNC and CSD_TYPE_IRQ_WORK share a similar backing struct layout (meaning their callback func can be accessed without caring about the actual CSD type), CSD_TYPE_TTWU doesn't even have a function attached to its struct. This means we need to check the type of a CSD before eventually dereferencing its associated callback. This isn't as trivial as it sounds: the CSD type is stored in __call_single_node.u_flags, which get cleared right before the callback is executed via csd_unlock(). This implies checking the CSD type before it is enqueued on the call_single_queue, as the target CPU's queue can be flushed before we get to sending an IPI. Furthermore, send_call_function_single_ipi() only has a CPU parameter, and would need to have an additional argument to trickle down the invoked function. This is somewhat silly, as the extra argument will always be pushed down to the function even when nothing is being traced, which is unnecessary overhead. Changes ======= send_call_function_single_ipi() is only used by smp.c, and is defined in sched/core.c as it contains scheduler-specific ops (set_nr_if_polling() of a CPU's idle task). Split it into two parts: the scheduler bits remain in sched/core.c, and the actual IPI emission is moved into smp.c. This lets us define an __always_inline helper function that can take the related callback as parameter without creating useless register pressure in the non-traced path which only gains a (disabled) static branch. Do the same thing for the multi IPI case. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230307143558.294354-8-vschneid@redhat.com commit 253a0fb4c62827cdcaf43afcea5d675507eaf7a3 Author: Valentin Schneider Date: Tue Mar 7 14:35:57 2023 +0000 smp: reword smp call IPI comment Accessing the call_single_queue hasn't involved a spinlock since 2014: 6897fc22ea01 ("kernel: use lockless list for smp_call_function_single") The llist operations (namely cmpxchg() and xchg()) provide similar ordering guarantees, update the comment to lessen confusion. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230307143558.294354-7-vschneid@redhat.com commit 4c8c3c7f70a6779d30f5492acbc9978f4636fe7a Author: Valentin Schneider Date: Tue Mar 7 14:35:56 2023 +0000 treewide: Trace IPIs sent via smp_send_reschedule() To be able to trace invocations of smp_send_reschedule(), rename the arch-specific definitions of it to arch_smp_send_reschedule() and wrap it into an smp_send_reschedule() that contains a tracepoint. Changes to include the declaration of the tracepoint were driven by the following coccinelle script: @func_use@ @@ smp_send_reschedule(...); @include@ @@ #include @no_include depends on func_use && !include@ @@ #include <...> + + #include [csky bits] [riscv bits] Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Acked-by: Guo Ren Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20230307143558.294354-6-vschneid@redhat.com commit 4468161a5ca2ea239c92de7c0a0dca61854ec4da Author: Valentin Schneider Date: Tue Mar 7 14:35:55 2023 +0000 irq_work: Trace self-IPIs sent via arch_irq_work_raise() IPIs sent to remote CPUs via irq_work_queue_on() are now covered by trace_ipi_send_cpumask(), add another instance of the tracepoint to cover self-IPIs. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20230307143558.294354-5-vschneid@redhat.com commit 08407b5f61c1bbd4ebb26a76474df4354fd76fb7 Author: Valentin Schneider Date: Tue Mar 7 14:35:54 2023 +0000 smp: Trace IPIs sent via arch_send_call_function_ipi_mask() This simply wraps around the arch function and prepends it with a tracepoint, similar to send_call_function_single_ipi(). Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20230307143558.294354-4-vschneid@redhat.com commit cc9cb0a71725aa8dd8d8f534a9b562bbf7981f75 Author: Valentin Schneider Date: Tue Mar 7 14:35:53 2023 +0000 sched, smp: Trace IPIs sent via send_call_function_single_ipi() send_call_function_single_ipi() is the thing that sends IPIs at the bottom of smp_call_function*() via either generic_exec_single() or smp_call_function_many_cond(). Give it an IPI-related tracepoint. Note that this ends up tracing any IPI sent via __smp_call_single_queue(), which covers __ttwu_queue_wakelist() and irq_work_queue_on() "for free". Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (Google) Acked-by: Ingo Molnar Link: https://lore.kernel.org/r/20230307143558.294354-3-vschneid@redhat.com commit 56eb0598c7a30c76009a082d3213486d6a013df0 Author: Valentin Schneider Date: Tue Mar 7 14:35:52 2023 +0000 trace: Add trace_ipi_send_cpumask() trace_ipi_raise() is unsuitable for generically tracing IPI sources due to its "reason" argument being an uninformative string (on arm64 all you get is "Function call interrupts" for SMP calls). Add a variant of it that exports a target cpumask, a callsite and a callback. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20230307143558.294354-2-vschneid@redhat.com commit 203e435844734cfa503cd1755f35db2514db5cca Author: Paul E. McKenney Date: Mon Mar 20 17:55:16 2023 -0700 kernel/smp: Make csdlock_debug= resettable It is currently possible to set the csdlock_debug_enabled static branch, but not to reset it. This is an issue when several different entities supply kernel boot parameters and also for kernels built with CONFIG_CSD_LOCK_WAIT_DEBUG_DEFAULT=y. Therefore, make the csdlock_debug=0 kernel boot parameter turn off debugging. Last one wins! Reported-by: Jes Sorensen Signed-off-by: Paul E. McKenney Signed-off-by: Peter Zijlstra (Intel) Acked-by: Juergen Gross Link: https://lore.kernel.org/r/20230321005516.50558-4-paulmck@kernel.org commit 6366d062e7f97499409979f23f4107a6c45edb04 Author: Paul E. McKenney Date: Mon Mar 20 17:55:15 2023 -0700 locking/csd_lock: Remove per-CPU data indirection from CSD lock debugging The diagnostics added by this commit were extremely useful in one instance: a5aabace5fb8 ("locking/csd_lock: Add more data to CSD lock debugging") However, they have not seen much action since, and there have been some concerns expressed that the complexity is not worth the benefit. Therefore, manually revert the following commit preparatory commit: de7b09ef658d ("locking/csd_lock: Prepare more CSD lock debugging") Signed-off-by: Paul E. McKenney Signed-off-by: Peter Zijlstra (Intel) Acked-by: Juergen Gross Link: https://lore.kernel.org/r/20230321005516.50558-3-paulmck@kernel.org commit 1771257cb447a7b27a15ed9aaf332726c47fcbcf Author: Paul E. McKenney Date: Mon Mar 20 17:55:14 2023 -0700 locking/csd_lock: Remove added data from CSD lock debugging The diagnostics added by this commit were extremely useful in one instance: a5aabace5fb8 ("locking/csd_lock: Add more data to CSD lock debugging") However, they have not seen much action since, and there have been some concerns expressed that the complexity is not worth the benefit. Therefore, manually revert this commit, but leave a comment telling people where to find these diagnostics. [ paulmck: Apply Juergen Gross feedback. ] Signed-off-by: Paul E. McKenney Signed-off-by: Peter Zijlstra (Intel) Acked-by: Juergen Gross Link: https://lore.kernel.org/r/20230321005516.50558-2-paulmck@kernel.org commit c52198601695851622f361d3f16456e9fc857629 Author: Paul E. McKenney Date: Mon Mar 20 17:55:13 2023 -0700 locking/csd_lock: Add Kconfig option for csd_debug default The csd_debug kernel parameter works well, but is inconvenient in cases where it is more closely associated with boot loaders or automation than with a particular kernel version or release. Thererfore, provide a new CSD_LOCK_WAIT_DEBUG_DEFAULT Kconfig option that defaults csd_debug to 1 when selected and 0 otherwise, with this latter being the default. Signed-off-by: Paul E. McKenney Signed-off-by: Peter Zijlstra (Intel) Acked-by: Juergen Gross Link: https://lore.kernel.org/r/20230321005516.50558-1-paulmck@kernel.org commit f102424befd3751386f3e2f2c70c5a1948248622 Author: Bagas Sanjaya Date: Thu Mar 23 16:24:54 2023 +0700 wifi: mac80211: use bullet list for amsdu_mesh_control formats list Commit fe4a6d2db3ba ("wifi: mac80211: implement support for yet another mesh A-MSDU format") expands amsdu_mesh_control list to multi-line list. However, the expansion triggers Sphinx warning: Documentation/driver-api/80211/mac80211-advanced:214: ./net/mac80211/sta_info.h:628: WARNING: Unexpected indentation. Use bullet list instead to fix the warning. Link: https://lore.kernel.org/linux-next/20230323141548.659479ef@canb.auug.org.au/ Fixes: fe4a6d2db3bad4 ("wifi: mac80211: implement support for yet another mesh A-MSDU format") Reported-by: Stephen Rothwell Signed-off-by: Bagas Sanjaya Reviewed-by: Simon Horman Signed-off-by: Johannes Berg commit d24b2130146b31d2185296dbc08186fb67bb2c71 Author: Gregory Greenman Date: Fri Mar 24 00:35:43 2023 +0200 wifi: iwlwifi: mvm: fix NULL deref in iwl_mvm_mld_disable_txq Check sta pointer for NULL and don't crash if it is. Fixes: 006c152ac9e5 ("wifi: iwlwifi: mvm: add support for the new STA related commands") Reported-by: Dan Carpenter Link: https://lore.kernel.org/linux-wireless/20230314194113.132873ce015c.I7b12a77e5be066730762e6ceeeaa7190293c3df1@changeid/ Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg commit 323fe43cf9aef79159ba8937218a3f076bf505af Author: Florian Fainelli Date: Thu Mar 23 14:45:59 2023 -0700 net: phy: Improved PHY error reporting in state machine When the PHY library calls phy_error() something bad has happened, and we halt the PHY state machine. Calling phy_error() from the main state machine however is not precise enough to know whether the issue is reading the link status or starting auto-negotiation. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit c85bd3dacc80b99ae68c7082f8e2edd8b9f83c39 Author: Cai Huoqing Date: Thu Mar 23 20:00:43 2023 +0800 net/ism: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Signed-off-by: David S. Miller commit 950bfdcf17ec043072c87ed6e671605302215195 Author: Cai Huoqing Date: Thu Mar 23 19:59:11 2023 +0800 isdn: mISDN: netjet: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Signed-off-by: David S. Miller commit fac63186f11682fc5ffd0472d1a990256bd61348 Author: Horatiu Vultur Date: Thu Mar 23 11:55:57 2023 +0100 net: phy: micrel: Add support for PTP_PF_EXTTS for lan8841 Extend the PTP programmable gpios to implement also PTP_PF_EXTTS function. The pins can be configured to capture both of rising and falling edge. Once the event is seen, then an interrupt is generated and the LTC is saved in the registers. This was tested using: ts2phc -m -l 7 -s generic -f ts2phc.cfg Where the configuration was the following: [global] ts2phc.pin_index 6 [eth2] Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit 3228150ba688b8cddc7459e5ae9a09bc2d2e47be Author: Cai Huoqing Date: Thu Mar 23 17:03:07 2023 +0800 ethernet: ec_bhf: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Signed-off-by: David S. Miller commit f686e9592734241eeddb406ef5f7aeab0a68c8b5 Author: Cai Huoqing Date: Thu Mar 23 17:03:06 2023 +0800 ionic: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Acked-by: Shannon Nelson Signed-off-by: David S. Miller commit 2d59af8307526f2829fdec9c5c5898a857d55180 Author: Cai Huoqing Date: Thu Mar 23 17:03:05 2023 +0800 net: mana: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Signed-off-by: David S. Miller commit 5b6f4bd24c8d45d2c67853e812453cb957b92f1a Author: Cai Huoqing Date: Thu Mar 23 17:03:04 2023 +0800 net/mlx5: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Signed-off-by: David S. Miller commit 8b91d5b62ce83b6678cfc876427dbd386798a6ef Author: Cai Huoqing Date: Thu Mar 23 17:03:03 2023 +0800 net/fungible: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Acked-by: Dimitris Michailidis Signed-off-by: David S. Miller commit aae964bb7800d8e68a75c49a6508968579d253ae Author: Cai Huoqing Date: Thu Mar 23 17:03:02 2023 +0800 net: cxgb4vf: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Signed-off-by: David S. Miller commit fc3e07e83e8ec31ebee5ed53940fb44f9b7c7cee Author: Cai Huoqing Date: Thu Mar 23 17:03:01 2023 +0800 net: hisilicon: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Signed-off-by: David S. Miller commit fc5aba60c24407f4a23f5e538585516068aa8746 Author: Cai Huoqing Date: Thu Mar 23 17:03:00 2023 +0800 net: liquidio: Remove redundant pci_clear_master Remove pci_clear_master to simplify the code, the bus-mastering is also cleared in do_pci_disable_device, like this: ./drivers/pci/pci.c:2197 static void do_pci_disable_device(struct pci_dev *dev) { u16 pci_command; pci_read_config_word(dev, PCI_COMMAND, &pci_command); if (pci_command & PCI_COMMAND_MASTER) { pci_command &= ~PCI_COMMAND_MASTER; pci_write_config_word(dev, PCI_COMMAND, pci_command); } pcibios_disable_device(dev); }. And dev->is_busmaster is set to 0 in pci_disable_device. Signed-off-by: Cai Huoqing Signed-off-by: David S. Miller commit 4170f0ef582c1ff4557276b98fb5fad85c782c1f Author: Taichi Nishimura Date: Thu Mar 23 14:27:13 2023 +0900 fix typos in net/sched/* files This patch fixes typos in net/sched/* files. Signed-off-by: Taichi Nishimura Reviewed-by: Randy Dunlap Signed-off-by: David S. Miller commit c34ce2796228c3b00353c173a462debe62ab6265 Author: Lukas Bulwahn Date: Thu Mar 23 06:21:01 2023 +0100 ethernet: broadcom/sb1250-mac: clean up after SIBYTE_BCM1x55 removal With commit b984d7b56dfc ("MIPS: sibyte: Remove unused config option SIBYTE_BCM1x55"), some #if's in the Broadcom SiByte SOC built-in Ethernet driver can be simplified. Simplify prepreprocessor conditions after config SIBYTE_BCM1x55 removal. Signed-off-by: Lukas Bulwahn Reviewed-by: Steen Hegelund Signed-off-by: David S. Miller commit 2df9bf4d04d2eb458386a40bac01be22c8808450 Author: Xin Long Date: Wed Mar 22 19:35:41 2023 -0400 ipv6: prevent router_solicitations for team port The issue fixed for bonding in commit c2edacf80e15 ("bonding / ipv6: no addrconf for slaves separately from master") also exists in team driver. However, we can't just disable ipv6 addrconf for team ports, as 'teamd' will need it when nsns_ping watch is used in the user space. Instead of preventing ipv6 addrconf, this patch only prevents RS packets for team ports, as it did in commit b52e1cce31ca ("ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL"). Note that we do not prevent DAD packets, to avoid the changes getting intricate / hacky. Also, usually sysctl dad_transmits is set to 1 and only 1 DAD packet will be sent, and by now no libteam user complains about DAD packets on team ports, unlike RS packets. Signed-off-by: Xin Long Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 2c7598903f18418aa18d11a9dd081acb22e9e108 Author: Tom Rix Date: Thu Mar 23 16:27:13 2023 -0400 ALSA: hdspm: remove unused copy_u32_le function clang with W=1 reports sound/pci/rme9652/hdspm.c:6149:19: error: unused function 'copy_u32_le' [-Werror,-Wunused-function] static inline int copy_u32_le(void __user *dest, void __iomem *src) ^ This function is not used so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230323202713.2637150-1-trix@redhat.com Signed-off-by: Takashi Iwai commit 38bd221a9c974636dd255d15d7b710f8f4a66009 Author: Mark Brown Date: Thu Mar 23 18:48:28 2023 +0000 kselftest/alsa - pcm-test: Don't include diagnostic message in test name When reporting errors or skips we currently include the diagnostic message indicating why we're failing or skipping. This isn't ideal since KTAP defines the entire print as the test name, so if there's an error then test systems won't detect the test as being the same one as a passing test. Move the diagnostic to a separate ksft_print_msg() to avoid this issue, the test name part will always be the same for passes, fails and skips and the diagnostic information is still displayed. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230323-alsa-pcm-test-names-v1-1-8be67a8885ff@kernel.org Signed-off-by: Takashi Iwai commit 05a2cdfef02595cf1ec843c814cac5d57290ad35 Author: Mark Brown Date: Wed Mar 22 15:18:07 2023 +0000 kselftest/alsa - mixer-test: Log values associated with event issues While it is common for driver bugs with events to apply to all events there are some issues which only trigger for specific values. Understanding these is easier if we know what we were trying to do when configuring the control so add logging for the specific values involved in the spurious event. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230322-alsa-mixer-event-values-v1-1-78189fcf6655@kernel.org Signed-off-by: Takashi Iwai commit e346df60b80d1b13bdafdcda472ffd6c8dd2efaf Merge: e110ba6592715 b0e214d212030 Author: Jakub Kicinski Date: Thu Mar 23 21:55:24 2023 -0700 Merge branch 'main' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Florian Westphal says: ==================== netfilter updates for net-next This pull request contains changes for the *net-next* tree. 1. Change IPv6 stack to keep conntrack references until ipsec policy checks are done, like ipv4, from Madhu Koriginja. This update was missed when IPv6 NAT support was added 10 years ago. 2. get rid of old 'compat' structure layout in nf_nat_redirect core and move the conversion to the only user that needs the old layout for abi reasons. From Jeremy Sowden. 3. Compact some common code paths in nft_redir, also from Jeremy. 4. Time to remove the 'default y' knob so iptables 32bit compat interface isn't compiled in by default anymore, from myself. 5. Move ip(6)tables builtin icmp matches to the udptcp one. This has the advantage that icmp/icmpv6 match doesn't load the iptables/ip6tables modules anymore when iptables-nft is used. Also from myself. * 'main' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: netfilter: keep conntrack reference until IPsecv6 policy checks are done xtables: move icmp/icmpv6 logic to xt_tcpudp netfilter: xtables: disable 32bit compat interface by default netfilter: nft_masq: deduplicate eval call-backs netfilter: nft_redir: use `struct nf_nat_range2` throughout and deduplicate eval call-backs ==================== Link: https://lore.kernel.org/r/20230322210802.6743-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit e110ba65927151bf56d8012ddf39ce10f91cbdf9 Author: Jakub Kicinski Date: Wed Mar 22 16:12:02 2023 -0700 docs: netdev: add note about Changes Requested and revising commit messages One of the most commonly asked questions is "I answered all questions and don't need to make any code changes, why was the patch not applied". Document our time honored tradition of asking people to repost with improved commit messages, to record the answers to reviewer questions. Take this opportunity to also recommend a change log format. Link: https://lore.kernel.org/r/20230322231202.265835-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 4691720f509ae037a3b2b33d008abfd8bb8ed505 Author: Maxim Korotkov Date: Wed Mar 22 19:28:43 2023 +0300 bnx2: remove deadcode in bnx2_init_cpus() The load_cpu_fw function has no error return code and always returns zero. Checking the value returned by this function does not make sense. Now checking the value of the return value is misleading when reading the code. Path with error handling was deleted in 57579f7629a3 ("bnx2: Use request_firmware()"). As a result, bnx2_init_cpus() will also return only zero Therefore, it will be safe to change the type of functions to void and remove checking to improving readability. Found by Security Code and Linux Verification Center (linuxtesting.org) with SVACE Reviewed-by: Leon Romanovsky Signed-off-by: Maxim Korotkov Link: https://lore.kernel.org/r/20230322162843.3452-1-korotkov.maxim.s@gmail.com Signed-off-by: Jakub Kicinski commit 0c04328ccf8550f29f1357ae90ce460e9568a5a9 Author: Alex Elder Date: Wed Mar 22 09:47:42 2023 -0500 net: ipa: add IPA v5.0 to ipa_version_string() In the IPA device sysfs directory, the "version" file can be read to find out what IPA version is implemented. The content of this file is supplied by ipa_version_string(), which needs to be updated to properly handle IPA v5.0. Signed-off-by: Alex Elder Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230322144742.2203947-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 8da3a5598f75cd0361e11b6d74697084380eb4b0 Author: Jiri Pirko Date: Wed Mar 22 16:42:42 2023 +0100 ynl: allow to encode u8 attr Playing with dpll netlink, I came across following issue: $ sudo ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/dpll.yaml --do pin-set --json '{"id": 0, "pin-idx": 1, "pin-state": 1}' Traceback (most recent call last): File "tools/net/ynl/cli.py", line 52, in main() File "tools/net/ynl/cli.py", line 40, in main reply = ynl.do(args.do, attrs) File "tools/net/ynl/lib/ynl.py", line 520, in do return self._op(method, vals) File "tools/net/ynl/lib/ynl.py", line 476, in _op msg += self._add_attr(op.attr_set.name, name, value) File "tools/net/ynl/lib/ynl.py", line 344, in _add_attr raise Exception(f'Unknown type at {space} {name} {value} {attr["type"]}') Exception: Unknown type at dpll pin-state 1 u8 I'm not that familiar with ynl code, but from a quick peek, I suspect that couple other types are missing for both encoding and decoding. Ignoring those here as I'm scratching my local itch only. Fix the issue by adding u8 attr packing. Signed-off-by: Jiri Pirko Link: https://lore.kernel.org/r/20230322154242.1739136-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 1df9bde48fc6e8efe520f4d89ff35769b2c56b8b Author: Kemeng Shi Date: Wed Feb 22 04:30:27 2023 +0800 ext4: remove unused group parameter in ext4_block_bitmap_csum_set Remove unused group parameter in ext4_block_bitmap_csum_set. After this, group parameter in ext4_set_bitmap_checksums is also not used, just remove it too. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230221203027.2359920-5-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 82483dfe17d036146f708809b33845c8aaf029b5 Author: Kemeng Shi Date: Wed Feb 22 04:30:26 2023 +0800 ext4: remove unused group parameter in ext4_block_bitmap_csum_verify Remove unused group parameter in ext4_block_bitmap_csum_verify. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230221203027.2359920-4-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 4fd873c8175dd695aa3de2473951c51715b64d8c Author: Kemeng Shi Date: Wed Feb 22 04:30:25 2023 +0800 ext4: remove unused group parameter in ext4_inode_bitmap_csum_set Remove unused group parameter in ext4_inode_bitmap_csum_set. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230221203027.2359920-3-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit b83acc77718644b2c19832226ca284ce01efc550 Author: Kemeng Shi Date: Wed Feb 22 04:30:24 2023 +0800 ext4: remove unused group parameter in ext4_inode_bitmap_csum_verify Remove unused group parameter in ext4_inode_bitmap_csum_verify. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230221203027.2359920-2-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 68e294dcccf965c93d65c4660547794728a4cff0 Author: Kemeng Shi Date: Tue Feb 21 19:59:19 2023 +0800 ext4: improve inode table blocks counting in ext4_num_overhead_clusters As inode table blocks are contiguous, inode table blocks inside the block_group can be represented as range [itbl_cluster_start, itbl_cluster_last]. Then we can simply account inode table cluters and check cluster overlap with [itbl_cluster_start, itbl_cluster_last] instead of traverse each block of inode table. By the way, this patch fixes code style problem of comment for ext4_num_overhead_clusters. [ Merged fix-up patch which fixed potentially access to an uninitialzied stack variable. --TYT ] Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230221115919.1918161-8-shikemeng@huaweicloud.com Link: https://lore.kernel.org/r/202303171446.eLEhZzAu-lkp@intel.com/ Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Theodore Ts'o commit cefa74d004fa48bc073ad66b7a7ad00dc8d7bfa6 Author: Kemeng Shi Date: Tue Feb 21 19:59:18 2023 +0800 ext4: stop trying to verify just initialized bitmap in ext4_read_block_bitmap_nowait For case we initialize a bitmap bh, we will set bitmap bh verified. We can return immediately instead of goto verify to remove unnecessary work for trying to verify bitmap bh. Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230221115919.1918161-7-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit f567ea7843562b7d7dfe1e6cfea455a1e9623208 Author: Kemeng Shi Date: Tue Feb 21 19:59:17 2023 +0800 ext4: remove stale comment in ext4_init_block_bitmap Commit bdfb6ff4a255d ("ext4: mark group corrupt on group descriptor checksum") added flag to indicate corruption of group instead of marking all blocks used. Just remove stale comment. Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230221115919.1918161-6-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit ad3f09be6cfe332be8ff46c78e6ec0f8839107aa Author: Kemeng Shi Date: Tue Feb 21 19:59:16 2023 +0800 ext4: remove unnecessary check in ext4_bg_num_gdb_nometa We only call ext4_bg_num_gdb_nometa if there is no meta_bg feature or group does not reach first_meta_bg, so group must not reside in meta group. Then group has a global gdt if superblock exists. Just remove confusing branch that meta_bg feature exists. Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230221115919.1918161-5-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit a38627f14356f505f621b31197fd872b99a10563 Author: Kemeng Shi Date: Tue Feb 21 19:59:15 2023 +0800 ext4: call ext4_bg_num_gdb_[no]meta directly in ext4_num_base_meta_clusters ext4_num_base_meta_clusters is already aware of meta_bg feature and test if block_group is inside real meta block groups before calling ext4_bg_num_gdb. Then ext4_bg_num_gdb will check if block group is inside a real meta block groups again to decide either ext4_bg_num_gdb_meta or ext4_bg_num_gdb_nometa is needed. Call ext4_bg_num_gdb_meta or ext4_bg_num_gdb_nometa directly after we check if block_group is inside a meta block groups in ext4_num_base_meta_clusters to remove redundant check of meta block groups in ext4_bg_num_gdb. Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230221115919.1918161-4-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 3d61ef10f521b5c6906a5ba71573d5503aee2aa5 Author: Kemeng Shi Date: Tue Feb 21 19:59:14 2023 +0800 ext4: correct validation check of inode table in ext4_valid_block_bitmap 1.Last valid cluster of inode table is EXT4_B2C(sbi, offset + sbi->s_itb_per_group - 1). We should make sure last valid cluster is < max_bit, i.e., EXT4_B2C(sbi, offset + sbi->s_itb_per_group - 1) is < max_bit rather than EXT4_B2C(sbi, offset + sbi->s_itb_per_group) is < max_bit. 2.Bit search length should be last valid cluster plus 1, i.e., EXT4_B2C(sbi, offset + sbi->s_itb_per_group - 1) + 1 rather than EXT4_B2C(sbi, offset + sbi->s_itb_per_group). Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230221115919.1918161-3-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit b5aa06bfe9ad13c75d425839ee2aca045e3c688c Author: Kemeng Shi Date: Tue Feb 21 19:59:13 2023 +0800 ext4: properly handle error of ext4_init_block_bitmap in ext4_read_block_bitmap_nowait We mark buffer_head of bitmap successfully initialized even error occurs in ext4_init_block_bitmap. Although we will return error, we will get a invalid buffer_head of bitmap from next ext4_read_block_bitmap_nowait which is marked buffer_verified but not successfully initialized actually in previous ext4_read_block_bitmap_nowait. Fix this by only marking buffer_head successfully initialized if ext4_init_block_bitmap successes. Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20230221115919.1918161-2-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 98ccceee3e0637a37e20c1c12a08173663db77e7 Author: Theodore Ts'o Date: Wed Mar 15 14:34:18 2023 -0400 ext4: fix comment: "start start" -> "start" in mpage_prepare_extent_to_map() Signed-off-by: Theodore Ts'o commit e6c28a26b799c7640b77daff3e4a67808c74381c Author: Jan Kara Date: Wed Mar 8 15:25:28 2023 +0100 ext4: Fix warnings when freezing filesystem with journaled data Test generic/390 in data=journal mode often triggers a warning that ext4_do_writepages() tries to start a transaction on frozen filesystem. This happens because although all dirty data is properly written, jbd2 checkpointing code writes data through submit_bh() and as a result only buffer dirty bits are cleared but page dirty bits stay set. Later when the filesystem is frozen, writeback code comes, tries to write supposedly dirty pages and the warning triggers. Fix the problem by calling sync_filesystem() once more after flushing the whole journal to clear stray page dirty bits. [ Applied fixup patches to address crashes when running data=journal tests; see links for more details -- TYT ] Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20230308142528.12384-1-jack@suse.cz Reported-by: Eric Biggers Link: https://lore.kernel.org/all/20230319183617.GA896@sol.localdomain Link: https://lore.kernel.org/r/20230323145404.21381-1-jack@suse.cz Link: https://lore.kernel.org/r/20230323145404.21381-2-jack@suse.cz Signed-off-by: Theodore Ts'o commit 3eb8eea2a453463f5606ce3e46cf225f88671440 Author: Jakub Kicinski Date: Tue Mar 21 22:38:48 2023 -0700 docs: networking: document NAPI Add basic documentation about NAPI. We can stop linking to the ancient doc on the LF wiki. Link: https://lore.kernel.org/all/20230315223044.471002-1-kuba@kernel.org/ Reviewed-by: Bagas Sanjaya Reviewed-by: Toke Høiland-Jørgensen Acked-by: Pavel Pisa # for ctucanfd-driver.rst Reviewed-by: Tony Nguyen Reviewed-by: Florian Fainelli Reviewed-by: Stephen Hemminger Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20230322053848.198452-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 8e4645226b4931e96d55546a1fb3863aa50b5e62 Author: Haifeng Xu Date: Tue Feb 28 08:35:37 2023 +0000 cpuset: Clean up cpuset_node_allowed Commit 002f290627c2 ("cpuset: use static key better and convert to new API") has used __cpuset_node_allowed() instead of cpuset_node_allowed() to check whether we can allocate on a memory node. Now this function isn't used by anyone, so we can do the follow things to clean up it. 1. remove unused codes 2. rename __cpuset_node_allowed() to cpuset_node_allowed() 3. update comments in mm/page_alloc.c Suggested-by: Waiman Long Signed-off-by: Haifeng Xu Acked-by: Waiman Long Signed-off-by: Tejun Heo commit 704bc669e1dda3eb8f6d5cb462b21e85558a3912 Author: Jungseung Lee Date: Mon Mar 20 12:29:05 2023 +0900 workqueue: Introduce show_freezable_workqueues Currently show_all_workqueue is called if freeze fails at the time of freeze the workqueues, which shows the status of all workqueues and of all worker pools. In this cases we may only need to dump state of only workqueues that are freezable and busy. This patch defines show_freezable_workqueues, which uses show_one_workqueue, a granular function that shows the state of individual workqueues, so that dump only the state of freezable workqueues at that time. tj: Minor message adjustment. Signed-off-by: Jungseung Lee Signed-off-by: Tejun Heo commit 77987b872fcfeaf36b4760fe5d77a0cf9ac7fdbe Author: Rob Herring Date: Tue Mar 21 11:54:15 2023 -0700 dt-bindings: input: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Reviewed-by: Mattijs Korpershoek # for mediatek,mt6779-keypad.yaml Link: https://lore.kernel.org/r/20230320234718.2930154-1-robh@kernel.org Signed-off-by: Dmitry Torokhov commit 1999a6b12a3b5c8953fc9ec74863ebc75a1b851d Author: Vicki Pfau Date: Thu Mar 23 18:32:43 2023 -0700 Input: xpad - add VID for Turtle Beach controllers This adds support for the Turtle Beach REACT-R and Recon Xbox controllers Signed-off-by: Vicki Pfau Link: https://lore.kernel.org/r/20230225012147.276489-4-vi@endrift.com Signed-off-by: Dmitry Torokhov commit 907d73bc0b0a00a9cc3254d14351fc239899473f Author: Vicki Pfau Date: Thu Mar 23 18:31:40 2023 -0700 Input: xpad - remove unused field in VID/PID table The list of specific VID/PID combinations for various controllers recently added a new field "xtype". However, this field isn't used, nor filled in the table itself, and was likely added by mistake and overlooked during review. Since this field isn't used, it's safe to remove. Signed-off-by: Vicki Pfau Link: https://lore.kernel.org/r/20230225012147.276489-3-vi@endrift.com Signed-off-by: Dmitry Torokhov commit 0d57b970df352517a75f4533820c49de360c4123 Author: Roberto Sassu Date: Tue Mar 14 09:17:17 2023 +0100 security: Remove security_old_inode_init_security() As the remaining two users reiserfs and ocfs2 switched to security_inode_init_security(), security_old_inode_init_security() can be now removed. Out-of-tree kernel modules should switch to security_inode_init_security() too. Signed-off-by: Roberto Sassu Reviewed-by: Casey Schaufler Reviewed-by: Mimi Zohar Signed-off-by: Paul Moore commit de3004c874e740304cc4f4a83d6200acb511bbda Author: Roberto Sassu Date: Tue Mar 14 09:17:16 2023 +0100 ocfs2: Switch to security_inode_init_security() In preparation for removing security_old_inode_init_security(), switch to security_inode_init_security(). Extend the existing ocfs2_initxattrs() to take the ocfs2_security_xattr_info structure from fs_info, and populate the name/value/len triple with the first xattr provided by LSMs. As fs_info was not used before, ocfs2_initxattrs() can now handle the case of replicating the behavior of security_old_inode_init_security(), i.e. just obtaining the xattr, in addition to setting all xattrs provided by LSMs. Supporting multiple xattrs is not currently supported where security_old_inode_init_security() was called (mknod, symlink), as it requires non-trivial changes that can be done at a later time. Like for reiserfs, even if EVM is invoked, it will not provide an xattr (if it is not the first to set it, its xattr will be discarded; if it is the first, it does not have xattrs to calculate the HMAC on). Finally, since security_inode_init_security(), unlike security_old_inode_init_security(), returns zero instead of -EOPNOTSUPP if no xattrs were provided by LSMs or if inodes are private, additionally check in ocfs2_init_security_get() if the xattr name is set. If not, act as if security_old_inode_init_security() returned -EOPNOTSUPP, and set si->enable to zero to notify to the functions following ocfs2_init_security_get() that no xattrs are available. Signed-off-by: Roberto Sassu Reviewed-by: Casey Schaufler Acked-by: Joseph Qi Reviewed-by: Mimi Zohar Signed-off-by: Paul Moore commit 52ca4b6435a493e47aaa98e7345e19e1e8710b13 Author: Roberto Sassu Date: Tue Mar 14 09:17:15 2023 +0100 reiserfs: Switch to security_inode_init_security() In preparation for removing security_old_inode_init_security(), switch to security_inode_init_security(). Commit 572302af1258 ("reiserfs: Add missing calls to reiserfs_security_free()") fixed possible memory leaks and another issue related to adding an xattr at inode creation time. Define the initxattrs callback reiserfs_initxattrs(), to populate the name/value/len triple in the reiserfs_security_handle() with the first xattr provided by LSMs. Make a copy of the xattr value, as security_inode_init_security() frees it. After the call to security_inode_init_security(), remove the check for returning -EOPNOTSUPP, as security_inode_init_security() changes it to zero. Multiple xattrs are currently not supported, as the reiserfs_security_handle structure is exported to user space. As a consequence, even if EVM is invoked, it will not provide an xattr (if it is not the first to set it, its xattr will be discarded; if it is the first, it does not have xattrs to calculate the HMAC on). Signed-off-by: Roberto Sassu Reviewed-by: Casey Schaufler Reviewed-by: Mimi Zohar Signed-off-by: Paul Moore commit 7ffc2e89518a3ad9b81faad67254737d87073f44 Author: Sean Christopherson Date: Fri Feb 24 11:28:32 2023 -0800 KVM: MIPS: Make kvm_mips_callbacks const Make kvm_mips_callbacks fully const as it's now hardcoded to point at kvm_vz_callbacks, the only remaining the set of callbacks. Link: https://lore.kernel.org/all/beb697c2-dfad-780e-4638-76b229f28731@linaro.org Suggested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/r/20230224192832.1286267-1-seanjc@google.com Signed-off-by: Sean Christopherson commit 752b8a9b4d98da55ab84cfb0d37adca8cd3d17b1 Author: Shaoqin Huang Date: Mon Feb 20 11:49:09 2023 +0800 KVM: Add the missed title format The 7.18 KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 now is not a title, make it as a title to keep the format consistent. Signed-off-by: Shaoqin Huang Fixes: 106ee47dc633 ("docs: kvm: Convert api.txt to ReST format") Reviewed-by: Sean Christopherson Link: https://lore.kernel.org/r/20230220034910.11024-1-shahuang@redhat.com Signed-off-by: Sean Christopherson commit f530b531fb9e05eb134cfc334242799ea974d111 Author: Mathias Krause Date: Fri Feb 17 20:33:36 2023 +0100 KVM: Shrink struct kvm_mmu_memory_cache Move the 'capacity' member around to make use of the padding hole on 64 bit systems instead of introducing yet another one. This allows us to save 8 bytes per instance for 64 bit builds of which, e.g., x86's struct kvm_vcpu_arch has a few. Signed-off-by: Mathias Krause Link: https://lore.kernel.org/r/20230217193336.15278-3-minipli@grsecurity.net Signed-off-by: Sean Christopherson commit 12aad9164763bb4890277d3b2a4664f443a48e3f Author: Mathias Krause Date: Fri Feb 17 20:33:35 2023 +0100 KVM: x86: Shrink struct kvm_pmu Move the 'version' member to the beginning of the structure to reuse an existing hole instead of introducing another one. This allows us to save 8 bytes for 64 bit builds. Signed-off-by: Mathias Krause Link: https://lore.kernel.org/r/20230217193336.15278-2-minipli@grsecurity.net Signed-off-by: Sean Christopherson commit 14aa40a1d05ef27c42fdfacd5a81f5df6a49ee39 Author: Li kunyu Date: Tue Dec 13 16:02:36 2022 +0800 kvm: kvm_main: Remove unnecessary (void*) conversions void * pointer assignment does not require a forced replacement. Signed-off-by: Li kunyu Link: https://lore.kernel.org/r/20221213080236.3969-1-kunyu@nfschina.com Signed-off-by: Sean Christopherson commit 99b30869804ea59d9596cdbefa5cc3aabd588521 Author: Robert Hoo Date: Wed Mar 8 15:29:36 2023 +0800 KVM: x86: Remove a redundant guest cpuid check in kvm_set_cr4() If !guest_cpuid_has(vcpu, X86_FEATURE_PCID), CR4.PCIDE would have been in vcpu->arch.cr4_guest_rsvd_bits and failed earlier kvm_is_valid_cr4() check. Remove this meaningless check. Reviewed-by: Xiaoyao Li Signed-off-by: Robert Hoo Fixes: 4683d758f48e ("KVM: x86: Supplement __cr4_reserved_bits() with X86_FEATURE_PCID check") Link: https://lore.kernel.org/r/20230308072936.1293101-1-robert.hu@intel.com Signed-off-by: Sean Christopherson commit 65966aaca18a5cbf42ac22234cb9cbbf60a4d33c Author: Sean Christopherson Date: Thu Feb 16 12:22:54 2023 -0800 KVM: x86: Assert that the emulator doesn't load CS with garbage in !RM Yell loudly if KVM attempts to load CS outside of Real Mode without an accompanying control transfer type, i.e. on X86_TRANSFER_NONE. KVM uses X86_TRANSFER_NONE when emulating IRET and exceptions/interrupts for Real Mode, but IRET emulation for Protected Mode is non-existent. WARN instead of trying to pass in a less-wrong type, e.g. X86_TRANSFER_RET, as emulating IRET goes even beyond emulating FAR RET (which KVM also doesn't fully support). Reported-by: Hou Wenlong Link: https://lore.kernel.org/r/20230216202254.671772-1-seanjc@google.com Signed-off-by: Sean Christopherson commit 3d8f61bf8bcd69bcd397276d53aa18f7ca8347f9 Author: Sean Christopherson Date: Tue Jan 24 19:45:19 2023 +0000 x86: KVM: Add common feature flag for AMD's PSFD Use a common X86_FEATURE_* flag for AMD's PSFD, and suppress it from /proc/cpuinfo via the standard method of an empty string instead of hacking in a one-off "private" #define in KVM. The request that led to KVM defining its own flag was really just that the feature not show up in /proc/cpuinfo, and additional patches+discussions in the interim have clarified that defining flags in cpufeatures.h purely so that KVM can advertise features to userspace is ok so long as the kernel already uses a word to track the associated CPUID leaf. No functional change intended. Link: https://lore.kernel.org/all/d1b1e0da-29f0-c443-6c86-9549bbe1c79d@redhat.como Link: https://lore.kernel.org/all/YxGZH7aOXQF7Pu5q@nazgul.tnic Link: https://lore.kernel.org/all/Y3O7UYWfOLfJkwM%2F@zn.tnic Reviewed-by: Paolo Bonzini Link: https://lore.kernel.org/r/20230124194519.2893234-1-seanjc@google.com Signed-off-by: Sean Christopherson commit 9469d456c6a28494dd9d5cc16e17cf2d4c15c571 Author: John Harrison Date: Thu Mar 16 15:06:32 2023 -0700 drm/i915/guc: Allow for very slow GuC loading A failure to load the GuC is occasionally observed where the GuC log actually showed that the GuC had loaded just fine. The implication being that the load just took ever so slightly longer than the 200ms timeout. Given that the actual time should be tens of milliseconds at the slowest, this should never happen. So far the issue has generally been caused by a bad IFWI resulting in low frequencies during boot (depsite the KMD requesting max frequency). However, the issue seems to happen more often than one would like. So a) increase the timeout so that the user still gets a working system even in the case of slow load. And b) report the frequency during the load to see if that is the case of the slow down. v2: Reduce timeout in non-debug builds, add references (Daniele) References: https://gitlab.freedesktop.org/drm/intel/-/issues/7931 References: https://gitlab.freedesktop.org/drm/intel/-/issues/8060 References: https://gitlab.freedesktop.org/drm/intel/-/issues/8083 References: https://gitlab.freedesktop.org/drm/intel/-/issues/8136 References: https://gitlab.freedesktop.org/drm/intel/-/issues/8137 Signed-off-by: John Harrison Tested-by: Ashutosh Dixit Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20230316220632.3312218-3-John.C.Harrison@Intel.com commit 411de2b5ac61a29e1e79db44539f69bb9b35a34d Author: John Harrison Date: Thu Mar 16 15:06:31 2023 -0700 drm/i915/guc: Improve GuC load error reporting There are multiple ways in which the GuC load can fail. The driver was reporting the status register as is, but not everyone can read the matrix unfiltered. So add decoding of the common error cases. Also, remove the comment about interrupt based load completion checking being not recommended. The interrupt was removed from the GuC firmware some time ago so it is no longer an option anyway. While at it, also abort the timeout if a known error code is reported. No need to keep waiting if the GuC has already given up the load. v2: Fix mis-matched case and confusing 'success' variable (Daniele). Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20230316220632.3312218-2-John.C.Harrison@Intel.com commit fb799447ae2974a07907906dff5bd4b9e47b7123 Author: Josh Poimboeuf Date: Wed Mar 1 07:13:12 2023 -0800 x86,objtool: Split UNWIND_HINT_EMPTY in two Mark reported that the ORC unwinder incorrectly marks an unwind as reliable when the unwind terminates prematurely in the dark corners of return_to_handler() due to lack of information about the next frame. The problem is UNWIND_HINT_EMPTY is used in two different situations: 1) The end of the kernel stack unwind before hitting user entry, boot code, or fork entry 2) A blind spot in ORC coverage where the unwinder has to bail due to lack of information about the next frame The ORC unwinder has no way to tell the difference between the two. When it encounters an undefined stack state with 'end=1', it blindly marks the stack reliable, which can break the livepatch consistency model. Fix it by splitting UNWIND_HINT_EMPTY into UNWIND_HINT_UNDEFINED and UNWIND_HINT_END_OF_STACK. Reported-by: Mark Rutland Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Acked-by: Steven Rostedt (Google) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/fd6212c8b450d3564b855e1cb48404d6277b4d9f.1677683419.git.jpoimboe@kernel.org commit 4708ea14bef314fc901857eefd65678236a9f2d9 Author: Josh Poimboeuf Date: Wed Mar 1 07:13:11 2023 -0800 x86,objtool: Separate unret validation from unwind hints The ENTRY unwind hint type is serving double duty as both an empty unwind hint and an unret validation annotation. Unret validation is unrelated to unwinding. Separate it out into its own annotation. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/ff7448d492ea21b86d8a90264b105fbd0d751077.1677683419.git.jpoimboe@kernel.org commit f902cfdd46aedd2afb3e8033223312dbf5fbb675 Author: Josh Poimboeuf Date: Wed Mar 1 07:13:10 2023 -0800 x86,objtool: Introduce ORC_TYPE_* Unwind hints and ORC entry types are two distinct things. Separate them out more explicitly. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/cc879d38fff8a43f8f7beb2fd56e35a5a384d7cd.1677683419.git.jpoimboe@kernel.org commit d88ebba45dfe67114a6ac8c6514f2c65b6ed64c7 Author: Josh Poimboeuf Date: Wed Mar 1 07:13:09 2023 -0800 objtool: Change UNWIND_HINT() argument order The most important argument is 'type', make that one first. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/d994f8c29376c5618c75698df28fc03b52d3a868.1677683419.git.jpoimboe@kernel.org commit 1c0c1faf5692c18c127d044ecc0cc92c7bab3477 Author: Josh Poimboeuf Date: Wed Mar 1 07:13:08 2023 -0800 objtool: Use relative pointers for annotations They produce the needed relocations while using half the space. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/bed05c64e28200220c9b1754a2f3ce71f73076ea.1677683419.git.jpoimboe@kernel.org commit f7515d9fe8fc4b80754cd4d98a5fcaee84adeebb Author: Josh Poimboeuf Date: Wed Mar 1 07:13:07 2023 -0800 objtool: Add objtool_types.h Reduce the amount of header sync churn by splitting the shared objtool.h types into a new file. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/dec622720851210ceafa12d4f4c5f9e73c832152.1677683419.git.jpoimboe@kernel.org commit 58973046c1bf782cac01644a9dcd8e5bba9c2f16 Author: Marek Szyprowski Date: Thu Mar 23 23:05:18 2023 +0100 regulator: qcom-rpmh: Use PROBE_FORCE_SYNCHRONOUS Restore synchronous probing for 'qcom,pm8150-rpmh-regulators' because otherwise the UFSHC device is not properly initialized on QRB5165-RB5 board. Fixes: ed6962cc3e05 ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 4.14 and 4.19") Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20230323220518.3247530-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown commit cc1858614f5d99d87d4467079c25f6bdf434add9 Author: Andre Przywara Date: Sun Mar 19 21:29:36 2023 +0000 ARM: dts: suniv: Add Lctech Pi F1C200s devicetree The Lctech Pi F1C200s (also previously known under the Cherry Pi brand) is a small development board with the Allwinner F1C200s SoC. This is the same as the F1C100s, but with 64MB instead of 32MB co-packaged DRAM. Alongside the obligatory micro-SD card slot, the board features a SPI-NAND flash chip, LCD and touch connectors, and unpopulated expansion header pins. There are two USB Type-C ports on the board: One supplies the power, also connects to the USB MUSB OTG controller port. The other one is connected to an CH340 USB serial chip, which in turn is connected to UART1. Add a devicetree file, so that the board can be used easily. Signed-off-by: Andre Przywara Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230319212936.26649-7-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit 7452d4799c5b352d6987cff3db8b1e415466586e Author: Icenowy Zheng Date: Sun Mar 19 21:29:35 2023 +0000 ARM: dts: suniv: add device tree for PopStick v1.1 PopStick is a minimal Allwinner F1C200s dongle, with its USB controller wired to a USB Type-A plug, a SD slot and a SPI NAND flash on board, and an on-board CH340 USB-UART converted connected to F1C200s's UART0. Add a device tree for it. As F1C200s is just F1C100s with a different DRAM chip co-packaged, directly use F1C100s DTSI here. This commit covers the v1.1 version of this board, which is now shipped. v1.0 is some internal sample that have not been shipped at all. Signed-off-by: Icenowy Zheng Signed-off-by: Andre Przywara Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230319212936.26649-6-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit e89556d6350430f4d9d38e555a298281e68e130e Author: Icenowy Zheng Date: Sun Mar 19 21:29:34 2023 +0000 dt-binding: arm: sunxi: add two board compatible strings The SourceParts PopStick is a F1C200s-based stick-shaped SBC. The publicly released version is actually v1.1. The Lctech Pi F1C200s is a small development board using the Allwinner F1C200s SoC. Add the compatible string lists to the bindings documentation. Signed-off-by: Icenowy Zheng Acked-by: Krzysztof Kozlowski Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20230319212936.26649-5-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit eef696356f58a4f5c17ec5d7cb1d495f75edf62e Author: Icenowy Zheng Date: Sun Mar 19 21:29:33 2023 +0000 dt-bindings: vendor-prefixes: add Source Parts and Lctech names Source Parts Inc. [1] is a company that makes a series of SBCs, SoMs, etc under a brand called Popcorn Computer [2]. Shenzen LC Technology [3] makes various boards and related products around IoT and AI technology. They used the "Cherry Pi" brand name before. Add both companies' names to the vendor prefixes list. [1] https://source.parts/ [2] https://popcorncomputer.com/ [3] http://www.chinalctech.com Signed-off-by: Icenowy Zheng Acked-by: Krzysztof Kozlowski Acked-by: Jernej Skrabec Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20230319212936.26649-4-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit bedc7c5490fce4e57b55e025b4adfbd31f25623d Author: Icenowy Zheng Date: Sun Mar 19 21:29:32 2023 +0000 ARM: dts: suniv: licheepi-nano: enable USB Lichee Pi Nano has a Micro-USB connector, with its D+, D- pins connected to the USB pins of the SoC and ID pin connected to PE2 GPIO. Enable the USB functionality. Signed-off-by: Icenowy Zheng Acked-by: Jernej Skrabec Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20230319212936.26649-3-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit f23ba46e0799fc701bcd429d22767932401e9ae8 Author: Icenowy Zheng Date: Sun Mar 19 21:29:31 2023 +0000 ARM: dts: suniv: add USB-related device nodes The suniv SoC has a USB OTG controller and a USB PHY like other Allwinner SoCs. Add their device tree node. Signed-off-by: Icenowy Zheng Reviewed-by: Andre Przywara Acked-by: Jernej Skrabec Signed-off-by: Andre Przywara Link: https://lore.kernel.org/r/20230319212936.26649-2-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit 6a17b4d1b52f10a44c45eea2a9222088e7c9e573 Author: Pin-yen Lin Date: Wed Mar 15 11:55:08 2023 +0800 drm/bridge: ps8640: Add a cache for EDID When there are multiple EDID reads, the bridge will be repeatedly enabled and disabled. Add a cache for EDID to speed this up. Signed-off-by: Pin-yen Lin Reviewed-by: Robert Foss Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20230315035508.2874915-2-treapking@chromium.org commit 845e730eaf36d2199e25860259611ffda8e07f6c Author: Pin-yen Lin Date: Wed Mar 15 11:55:07 2023 +0800 drm/bridge: ps8640: Skip redundant bridge enable Skip the drm_bridge_chain_pre_enable call when the bridge is already pre_enabled. This make pre_enable and post_disable (thus pm_runtime_get/put) symmetric. Fixes: 46f206304db0 ("drm/bridge: ps8640: Rework power state handling") Signed-off-by: Pin-yen Lin Reviewed-by: Robert Foss Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20230315035508.2874915-1-treapking@chromium.org commit 4f1bb0386dfc0bda78ddad0e4fb3cd519b2886ab Author: Jonathan Corbet Date: Tue Mar 14 16:39:37 2023 -0600 docs: create a top-level arch/ directory As the first step in bringing some order to our architecture-specific documentation, create a top-level arch/ directory and move arch.rst as its index.rst file. There is no change in the rendered docs at this point. Signed-off-by: Jonathan Corbet commit 2b947f8769be8b8181dc795fd292d3e7120f5204 Author: Zheng Wang Date: Mon Mar 20 14:29:31 2023 +0800 usb: gadget: udc: renesas_usb3: Fix use after free bug in renesas_usb3_remove due to race condition In renesas_usb3_probe, role_work is bound with renesas_usb3_role_work. renesas_usb3_start will be called to start the work. If we remove the driver which will call usbhs_remove, there may be an unfinished work. The possible sequence is as follows: CPU0 CPU1 renesas_usb3_role_work renesas_usb3_remove usb_role_switch_unregister device_unregister kfree(sw) //free usb3->role_sw usb_role_switch_set_role //use usb3->role_sw The usb3->role_sw could be freed under such circumstance and then used in usb_role_switch_set_role. This bug was found by static analysis. And note that removing a driver is a root-only operation, and should never happen in normal case. But the root user may directly remove the device which will also trigger the remove function. Fix it by canceling the work before cleanup in the renesas_usb3_remove. Fixes: 39facfa01c9f ("usb: gadget: udc: renesas_usb3: Add register of usb role switch") Signed-off-by: Zheng Wang Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20230320062931.505170-1-zyytlz.wz@163.com Signed-off-by: Greg Kroah-Hartman commit 8c4853c48d6cd56611446ec767c5e8365bdd964b Author: Li Jun Date: Fri Mar 17 16:55:28 2023 +0800 usb: dwc3: add several registers dump for debugfs Add 5 missing register dump for debugfs as they are in use now. Signed-off-by: Li Jun Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/1679043328-13425-1-git-send-email-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 4e3972b589da0519bf57ed386974b64b9c8572fd Author: Roger Quadros Date: Thu Mar 16 15:12:25 2023 +0200 usb: dwc3-am62: Enable as a wakeup source by default USB module can wakeup system. Enable it as a wakeup source by default. Finer grain wakeup enable/disable can be done from the power/wakeup system control file of the respective USB device. Signed-off-by: Roger Quadros Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20230316131226.89540-3-rogerq@kernel.org Signed-off-by: Greg Kroah-Hartman commit 84364a00b264885a97f83c328df8e63d3ec7aefa Author: Aswath Govindraju Date: Thu Mar 16 15:12:24 2023 +0200 usb: dwc3-am62: Add support for system wakeup based on USB events The USB2SS IP in TI's AM62 SoC is capable of supporting wakeup from deep sleep based on the following events, 1) VBUS state change 2) Overcurrent detection 3) Line state change Wakeup from these events can enabled by setting their corresponding bits in the WAKEUP_CONFIG register. The events to be enabled are decided based on the current role of the controller. When the role of the controller is host, the comparators for detecting VBUS state change are disabled while entering low power mode. This is done as VBUS state is not used in host mode and disabling the comparators helps in reducing the power consumption. So, wakeup from VBUS state change should be disabled in host mode. While operating in peripheral mode all the wakeup events can be enabled. Therefore, add support for the same in the suspend/resume hooks. Signed-off-by: Aswath Govindraju Signed-off-by: Roger Quadros Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20230316131226.89540-2-rogerq@kernel.org Signed-off-by: Greg Kroah-Hartman commit efe920466f51fbd4405d33c6dd2b683571f93a7a Author: Thorsten Leemhuis Date: Sun Mar 5 14:04:44 2023 +0100 docs: describe how to quickly build a trimmed kernel Add a text explaining how to quickly build a kernel, as that's something users will often have to do when they want to report an issue or test proposed fixes. This is a huge and frightening task for quite a few users these days, as many rely on pre-compiled kernels and have never built their own. They find help on quite a few websites explaining the process in various ways, but those howtos often omit important details or make things too hard for the 'quickly build just for testing' case that 'localmodconfig' is really useful for. Hence give users something at hand to guide them, as that makes it easier for them to help with testing, debugging, and fixing the kernel. To keep the complexity at bay, the document explicitly focuses on how to compile the kernel on commodity distributions running on commodity hardware. People that deal with less common distributions or hardware will often know their way around already anyway. The text describes a few oddities of Arch and Debian that were found by the author and a few volunteers that tested the described procedure. There are likely more such quirks that need to be covered as well as a few things the author will have missed -- but one has to start somewhere. The document heavily uses anchors and links to them, which makes things slightly harder to read in the source form. But the intended target audience is way more likely to read rendered versions of this text on pages like docs.kernel.org anyway -- and there those anchors and links allow easy jumps to the reference section and back, which makes the document a lot easier to work with for the intended target audience. Aspects relevant for bisection were left out on purpose, as that is a related, but in the end different use case. The rough plan is to have a second document with a similar style to cover bisection. The idea is to reuse a few bits from this document and link quite often to entries in the reference section with the help of the anchors in this text. Signed-off-by: Thorsten Leemhuis Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/1a788a8e7ba8a2063df08668f565efa832016032.1678021408.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit 775a445d9a638d8950b1831b605ae6a92a468d7e Author: Jakub Wilk Date: Wed Mar 22 22:53:11 2023 +0100 coding-style: fix title of Greg K-H's talk The talk title was inadvertently mangled in 8c27ceff3604 ("docs: fix locations of several documents that got moved"). Signed-off-by: Jakub Wilk Link: https://lore.kernel.org/r/20230322215311.6579-1-jwilk@jwilk.net Signed-off-by: Jonathan Corbet commit 054ed6349c1bdc5f4575aea05a1d37ee45ec5fb7 Author: Tony Luck Date: Wed Mar 15 15:57:22 2023 -0700 Documentation/x86: Update split lock documentation commit b041b525dab9 ("x86/split_lock: Make life miserable for split lockers") added a delay and serialization of split locks. Commit 727209376f49 ("x86/split_lock: Add sysctl to control the misery mode") provided a sysctl to turn off the misery. Update the split lock documentation to describe the current state of the code. Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20230315225722.104607-1-tony.luck@intel.com Signed-off-by: Jonathan Corbet commit 1aa63d4eb88167612be78e3b5a986b996544dca3 Author: Zang Leigang Date: Thu Mar 16 10:45:19 2023 +0800 docs/zh_CN: fix a wrong format Add a missing markup for the code snippet at the end of lru_sort.rst Signed-off-by: Zang Leigang Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20230316024519.27992-1-zangleigang@hisilicon.com Signed-off-by: Jonathan Corbet commit a894a8a56b577029defc6182136f489cf4180c2f Author: Randy Dunlap Date: Thu Mar 16 17:26:35 2023 -0700 Documentation: kernel-parameters: sort all "no..." parameters Sort all of the "no..." kernel parameters into the correct order as specified in kernel-parameters.rst: "into English Dictionary order (defined as ignoring all punctuation and sorting digits before letters in a case insensitive manner)". No other changes here, just movement of lines. Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20230317002635.16540-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit c1f8e848fc31ceabc78e0eacebd5d4f26669976e Author: Federico Vaga Date: Sun Mar 19 14:46:24 2023 +0100 doc:it_IT: translation alignment Major update for maintainer-pgp-guide commit e4412739472b ("Documentation: raise minimum supported version of binutils to 2.25") commit 67fe6792a7fb ("Documentation: stable: Document alternative for referring upstream commit hash") commit 8763a30bc15b ("docs: deprecated.rst: Add note about DECLARE_FLEX_ARRAY() usage commit 2f993509a97e ("docs: process/5.Posting.rst: clarify use of Reported-by: tag") commit a31323bef2b6 ("timers: Update the documentation to reflect on the new timer_shutdown() API") Signed-off-by: Federico Vaga Link: https://lore.kernel.org/r/20230319134624.21327-1-federico.vaga@vaga.pv.it Signed-off-by: Jonathan Corbet commit 0c4ff6f6c6898de4489d89889febae6a970acdff Author: Bagas Sanjaya Date: Mon Mar 20 19:43:27 2023 +0700 Documentation: maintainer-tip: Rectify link to "Describe your changes" section of submitting-patches.rst The general changelog rules for the tip tree refers to "Describe your changes" section of submitting patches guide. However, the internal link reference targets to non-existent "submittingpatches" label, which brings reader to the top of the linked doc. Correct the target. No changes to submitting-patches.rst since the required label is already there. Fixes: 31c9d7c8297558 ("Documentation/process: Add tip tree handbook") Signed-off-by: Bagas Sanjaya Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230320124327.174881-1-bagasdotme@gmail.com Signed-off-by: Jonathan Corbet commit a33113f7369395a70de8b52d6e9fda17aa548aad Author: Neil Armstrong Date: Tue Mar 21 14:21:45 2023 +0100 dt-bindings: usb: snps,dwc3: document HS & SS OF graph ports Document the optional ports subnode to describe the High-Speed and Super-Speed connections as separate OF graph links. The ports property is an alternative to the already documented single port subnode property. Reviewed-by: Rob Herring Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v5-5-552f3b721f9e@linaro.org Signed-off-by: Greg Kroah-Hartman commit 62b5412b1f4afab27d8df90ddcabb8e1e11a00ad Author: Neil Armstrong Date: Tue Mar 21 14:21:41 2023 +0100 usb: typec: ucsi: add PMIC Glink UCSI driver Introduce the UCSI PMIC Glink aux driver that communicates with the aDSP firmware with the UCSI protocol which handles the USB-C Port(s) Power Delivery. The UCSI messaging is necessary on newer Qualcomm SoCs to provide USB role switch and altmode notifications. Reviewed-by: Heikki Krogerus Signed-off-by: Neil Armstrong Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v5-1-552f3b721f9e@linaro.org Signed-off-by: Greg Kroah-Hartman commit 17eb81908084047c8b08ae99863dccada5efd5e2 Author: Uwe Kleine-König Date: Sun Mar 19 10:24:28 2023 +0100 usb: phy: twl6030: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230319092428.283054-12-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit d95a0ce2fc03322440f404a2971ec528a56af345 Author: Uwe Kleine-König Date: Sun Mar 19 10:24:27 2023 +0100 usb: phy: tegra: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230319092428.283054-11-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit e5c1b349efc132553b7e7542f7296a31184f4233 Author: Uwe Kleine-König Date: Sun Mar 19 10:24:26 2023 +0100 usb: phy: tahvo: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230319092428.283054-10-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 8471b0fa61947f27eeba1b012a8bfbf78bd6ab59 Author: Uwe Kleine-König Date: Sun Mar 19 10:24:25 2023 +0100 usb: phy: mxs: 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 (mostly) ignored 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. 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: Frank Li Link: https://lore.kernel.org/r/20230319092428.283054-9-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 25b979e46f0bda69e100b9cb01ac63bfbd373111 Author: Uwe Kleine-König Date: Sun Mar 19 10:24:24 2023 +0100 usb: phy: mv: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230319092428.283054-8-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 744e004bf2be5daf56332369c8f95da77195550a Author: Uwe Kleine-König Date: Sun Mar 19 10:24:23 2023 +0100 usb: phy: keystone: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230319092428.283054-7-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 399d011772afb910fbf60bc0cea93fccd44d1ecb Author: Uwe Kleine-König Date: Sun Mar 19 10:24:22 2023 +0100 usb: phy: gpio-vbus: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20230319092428.283054-6-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit a8095f9c5238070366e8813f6c6e330de9d2d32b Author: Uwe Kleine-König Date: Sun Mar 19 10:24:21 2023 +0100 usb: phy: generic: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230319092428.283054-5-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit ba1e43522f3290165ef9e881c3db7b0adcc3a1f0 Author: Uwe Kleine-König Date: Sun Mar 19 10:24:20 2023 +0100 usb: phy: fsl: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230319092428.283054-4-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit c123905f5c563c1b43ef5a745b8f403e5e8e1879 Author: Uwe Kleine-König Date: Sun Mar 19 10:24:19 2023 +0100 usb: phy: am335x: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230319092428.283054-3-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit fe70f2c83e28df6b18e77a4de092b5313e26ca62 Author: Uwe Kleine-König Date: Sun Mar 19 10:24:18 2023 +0100 usb: phy: ab8500: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230319092428.283054-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit fcd3f50845be909c9e0f8ac402874a2fb4b09c6c Author: Peng Fan Date: Thu Mar 23 11:55:31 2023 +0800 arm64: dts: imx8mq: drop usb3-resume-missing-cas from usb The property is NXP downstream property that there is no user in upstream, drop it. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20230323035531.3808192-2-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 092a2a78e618ee8ebd5c86cac61a404d0bec3310 Author: Peng Fan Date: Thu Mar 23 11:55:30 2023 +0800 dt-bindings: usb: snps,dwc3: correct i.MX8MQ support The previous i.MX8MQ support breaks rockchip,dwc3 support, so use select to restrict i.MX8MQ support and avoid break others. Fixes: 3754c41c7686 ("dt-bindings: usb: snps,dwc3: support i.MX8MQ") Signed-off-by: Peng Fan Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230323035531.3808192-1-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 8c1b63b3c2358024181674e0ada901d50b919d3e Author: Tom Rix Date: Tue Mar 21 14:12:55 2023 -0400 USB: serial: quatech2: remove unused qt2_setdevice function clang with W=1 reports drivers/usb/serial/quatech2.c:179:19: error: unused function 'qt2_setdevice' [-Werror,-Wunused-function] static inline int qt2_setdevice(struct usb_device *dev, u8 *data) ^ This function is not used, so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230321181255.1825963-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 766eae980611f5377ee54518f58da11b4d866f59 Author: Tom Rix Date: Sun Mar 19 09:37:32 2023 -0400 usb: typec: tipd: remove unused tps6598x_write16,32 functions clang with W=1 reports drivers/usb/typec/tipd/core.c:180:19: error: unused function 'tps6598x_write16' [-Werror,-Wunused-function] static inline int tps6598x_write16(struct tps6598x *tps, u8 reg, u16 val) ^ drivers/usb/typec/tipd/core.c:185:19: error: unused function 'tps6598x_write32' [-Werror,-Wunused-function] static inline int tps6598x_write32(struct tps6598x *tps, u8 reg, u32 val) ^ These static functions are not used, so remove them. Signed-off-by: Tom Rix Reviewed-by: Heikki Krogerus Reviewed-by: Jun Nie Link: https://lore.kernel.org/r/20230319133732.1702841-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 2271b2727aeca2e09d07f63bc61dc9757c3a5a3c Author: Tom Rix Date: Sun Mar 19 10:10:53 2023 -0400 usb: typec: tcpci_mt6360: remove unused mt6360_tcpc_read16 function clang with W=1 reports drivers/usb/typec/tcpm/tcpci_mt6360.c:46:19: error: unused function 'mt6360_tcpc_read16' [-Werror,-Wunused-function] static inline int mt6360_tcpc_read16(struct regmap *regmap, ^ This function is not used, so remove it. Signed-off-by: Tom Rix Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230319141053.1703937-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit a88b3c9eef83b605ef7016471a56db9129ae2529 Author: Tom Rix Date: Sun Mar 19 11:59:10 2023 -0400 usb: gadget: udc: remove unused usbf_ep_dma_reg_clrset function clang with W=1 reports drivers/usb/gadget/udc/renesas_usbf.c:548:20: error: unused function 'usbf_ep_dma_reg_clrset' [-Werror,-Wunused-function] static inline void usbf_ep_dma_reg_clrset(struct usbf_ep *ep, uint offset, ^ This function is not used, so remove it. Signed-off-by: Tom Rix Acked-by: Herve Codina Link: https://lore.kernel.org/r/20230319155910.1706294-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 1ad715857018893776fd61706da5b2188d67c650 Author: Yu Zhe Date: Thu Mar 16 16:23:38 2023 +0800 usb: typec: tcpm: remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe Acked-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230316082338.18388-1-yuzhe@nfschina.com Signed-off-by: Greg Kroah-Hartman commit a0c7f9f659825e9761f8db423001de4e5147b60c Author: Xu Yang Date: Fri Mar 17 14:16:51 2023 +0800 usb: chipidea: debug: remove redundant 'role' debug file Two 'role' file exist in different position but with totally same function. 1. /sys/devices/platform/soc@0/xxxxxxxx.usb/ci_hdrc.0/role 2. /sys/kernel/debug/usb/ci_hdrc.0/role This will remove the 2rd redundant 'role' debug file (under debugfs) and keep the one which is more closer to user. Acked-by: Peter Chen Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20230317061651.2457567-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit 1fb1ea0d9cb8359ae9d6f67f22666c74d5b9f47d Author: Andy Shevchenko Date: Fri Mar 10 19:07:47 2023 +0200 mei: Move uuid.h to the MEI namespace There is only a single user of the UUID uAPI, let's make it part of that user. The way it's done is to prevent compilation time breakage for the user space that does #include In the future MEI user space tools can switch over to use mei_uuid.h. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230310170747.22782-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 9abe15d55dccec92d361705741ee80f13b4d0888 Author: Josue David Hernandez Gutierrez Date: Fri Mar 17 17:47:15 2023 +0200 xhci: Move xhci MSI sync function to to xhci-pci Move function to sync MSI from xhci.c to xhci-pci.c to decouple PCI specific code from generic xhci code. No functional changes, function is an exact copy [commit message rewording -Mathias] Signed-off-by: Josue David Hernandez Gutierrez Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230317154715.535523-15-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0c540438c632005ce57f45436a25cafa499d977f Author: Josue David Hernandez Gutierrez Date: Fri Mar 17 17:47:14 2023 +0200 xhci: Call MSI sync function from xhci-pci instead of generic xhci code Call function to sync MSI interrupts from pci specific xhci_pci_suspend() function in xhci-pci.c instead of from generic xhci_suspend() [commit message rewording -Mathias] Signed-off-by: Josue David Hernandez Gutierrez Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230317154715.535523-14-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ba47b1aa7640cb98bb3e4c06f37afdbeb5c5d9ba Author: Josue David Hernandez Gutierrez Date: Fri Mar 17 17:47:13 2023 +0200 xhci: Move functions to cleanup MSI to xhci-pci Move function to cleanup MSI from xhci.c to xhci-pci.c This is to decouple PCI specific code from generic xhci code. No functional changes, function is an exact copy Signed-off-by: Josue David Hernandez Gutierrez Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230317154715.535523-13-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ed526ba2ecdfb77bcdbcf4331b8380b646252c20 Author: Josue David Hernandez Gutierrez Date: Fri Mar 17 17:47:12 2023 +0200 xhci: move PCI specific MSI/MSIX cleanup away from generic xhci functions Call the PCI specific MSI/MSIX interrupt freeing code from the xhci-pci callbacks instead of generic xhci code, decoupling PCI parts from generic xhci functions. Adds xhci_pci_stop() that overrides xhci_stop() for PCI xHC controllers. This will free MSIX interrupts a bit later in the hc_driver stop callback, but is still earlier than usb core frees "legacy" interrupts, or interrupts for other hosts. Signed-off-by: Josue David Hernandez Gutierrez Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230317154715.535523-12-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit fabbd95cc47cc412e68d03476367046f4cdbd838 Author: Josue David Hernandez Gutierrez Date: Fri Mar 17 17:47:11 2023 +0200 xhci: Move functions to setup msi to xhci-pci Move functions to setup msi from xhci.c to xhci-pci.c to decouple PCI specific code from generic xhci code. No functional changes, functions are an exact copy [commit message rewording -Mathias] Signed-off-by: Josue David Hernandez Gutierrez Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230317154715.535523-11-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 944e7deb4238d10cd16905474574236ac8a8e847 Author: Josue David Hernandez Gutierrez Date: Fri Mar 17 17:47:10 2023 +0200 xhci: Avoid PCI MSI/MSIX interrupt reinitialization at resume xhci MSI setup is currently done at the same time as xHC host is started in xhci_run(). This couples the generic xhci code with PCI, and will reconfigure MSI/MSIX interrupts every time xHC is started. Decouple MSI/MSIX configuration from generic xhci code by moving MSI/MSIX part to a PCI specific xhci_pci_run() function overriding xhci_run(). This allows us to remove unnecessay MSI/MSIX reconfiguration done every time PCI xhci resumes from suspend. i.e. remove the xhci_cleanup_msix() call from xhci_resume() and the xhci_try_enale_msi() call in xhci_run() called a bit later by xhci_resume() [minor changes and commit message rewrite -Mathias] Signed-off-by: Josue David Hernandez Gutierrez Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230317154715.535523-10-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit edf1664f3249a091a2b91182fc087b3253b0b4c2 Author: Mathias Nyman Date: Fri Mar 17 17:47:09 2023 +0200 xhci: dbc: Provide sysfs option to configure dbc descriptors When DbC is enabled the first port on the xHC host acts as a usb device. xHC provides the descriptors automatically when the DbC device is enumerated. Most of the values are hardcoded, but some fields such as idProduct, idVendor, bcdDevice and bInterfaceProtocol can be modified. Add sysfs entries that allow userspace to change these. User can only change them before dbc is enabled, i.e. before writing "enable" to dbc sysfs file as we don't want these values to change while device is connected, or during enumeration. Add documentation for these entries in Documentation/ABI/testing/sysfs-bus-pci-drivers-xhci_hcd Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230317154715.535523-9-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 4feb07d0ada339f7edc0dc3b24581f201848a65b Author: Andy Shevchenko Date: Fri Mar 17 17:47:08 2023 +0200 xhci: mem: Join string literals back For easy grepping on debug purposes join string literals back in the messages. No functional change. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230317154715.535523-8-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 96be93a8c8272d20d20476ba8324e580b6e8a08f Author: Andy Shevchenko Date: Fri Mar 17 17:47:07 2023 +0200 xhci: mem: Replace explicit castings with appropriate specifiers There is no need to have explicit castings when we have specific pointer extensions. Replace the explicit castings with appropriate specifiers. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230317154715.535523-7-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 76dc910af13c677b504ac8606352c791891166b1 Author: Andy Shevchenko Date: Fri Mar 17 17:47:06 2023 +0200 xhci: mem: Use while (i--) pattern to clean up Use more natural while (i--) patter to clean up allocated resources. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230317154715.535523-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3056a5cafa3cf83c7c83d3fb4029707888d4bb63 Author: Andy Shevchenko Date: Fri Mar 17 17:47:05 2023 +0200 xhci: mem: Drop useless return:s When function returns void and we have if-else-if chain, there is no need to explicitly call return. Drop them and indent lines better. While at it, make if-chain sorted from testing bigger values to smaller. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230317154715.535523-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 85052fdb40a0eb2278d10f016ce12de00672bba9 Author: Andy Shevchenko Date: Fri Mar 17 17:47:04 2023 +0200 xhci: mem: 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. While at it, make if-chain sorted from testing bigger values to smaller. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230317154715.535523-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 53ee2663f0df536ccb37d559c4f4c53c4511db7a Author: Andy Shevchenko Date: Fri Mar 17 17:47:03 2023 +0200 xhci: mem: Use dma_poll_zalloc() instead of explicit memset() Use dma_poll_zalloc() instead of explicit memset() call in xhci_alloc_stream_ctx(). Note, that dma_alloc_coherent() is always issues zeroed memory chunk. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230317154715.535523-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 347284984f415e52590373253c6943bbdc806ebf Author: Andy Shevchenko Date: Fri Mar 17 17:47:02 2023 +0200 xhci: mem: Carefully calculate size for memory allocations Carefully calculate size for memory allocations, i.e. with help of size_mul() macro from overflow.h. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20230317154715.535523-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 45b32b946a97bb4553bab30c2519bbaac55f39db Author: Jisheng Zhang Date: Tue Feb 21 22:30:21 2023 -0500 riscv: entry: Consolidate general regs saving/restoring Consolidate the saving/restoring GPs (except zero, ra, sp, gp, tp and t0) into save_from_x6_to_x31/restore_from_x6_to_x31 macros. No functional change intended. Signed-off-by: Jisheng Zhang Reviewed-by: Guo Ren Reviewed-by: Björn Töpel Tested-by: Guo Ren Signed-off-by: Guo Ren Link: https://lore.kernel.org/r/20230222033021.983168-8-guoren@kernel.org Signed-off-by: Palmer Dabbelt commit ab9164dae27334415537ccf1c3fbabf56b7793b2 Author: Jisheng Zhang Date: Tue Feb 21 22:30:20 2023 -0500 riscv: entry: Consolidate ret_from_kernel_thread into ret_from_fork The ret_from_kernel_thread() behaves similarly with ret_from_fork(), the only difference is whether call the fn(arg) or not, this can be achieved by testing fn is NULL or not, I.E s0 is 0 or not. Many architectures have done the same thing, it makes entry.S more clean. Signed-off-by: Jisheng Zhang Reviewed-by: Björn Töpel Reviewed-by: Guo Ren Tested-by: Guo Ren Signed-off-by: Guo Ren Link: https://lore.kernel.org/r/20230222033021.983168-7-guoren@kernel.org Signed-off-by: Palmer Dabbelt commit 0bf298ad2b61ae69d38826f3513e5fffc3fe3a53 Author: Jisheng Zhang Date: Tue Feb 21 22:30:19 2023 -0500 riscv: entry: Remove extra level wrappers of trace_hardirqs_{on,off} Since riscv is converted to generic entry, there's no need for the extra wrappers of trace_hardirqs_{on,off}. Signed-off-by: Jisheng Zhang Reviewed-by: Guo Ren Reviewed-by: Björn Töpel Tested-by: Guo Ren Signed-off-by: Guo Ren Link: https://lore.kernel.org/r/20230222033021.983168-6-guoren@kernel.org Signed-off-by: Palmer Dabbelt commit f0bddf50586da81360627a772be0e355b62f071e Author: Guo Ren Date: Tue Feb 21 22:30:18 2023 -0500 riscv: entry: Convert to generic entry This patch converts riscv to use the generic entry infrastructure from kernel/entry/*. The generic entry makes maintainers' work easier and codes more elegant. Here are the changes: - More clear entry.S with handle_exception and ret_from_exception - Get rid of complex custom signal implementation - Move syscall procedure from assembly to C, which is much more readable. - Connect ret_from_fork & ret_from_kernel_thread to generic entry. - Wrap with irqentry_enter/exit and syscall_enter/exit_from_user_mode - Use the standard preemption code instead of custom Suggested-by: Huacai Chen Reviewed-by: Björn Töpel Tested-by: Yipeng Zou Tested-by: Jisheng Zhang Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Ben Hutchings Link: https://lore.kernel.org/r/20230222033021.983168-5-guoren@kernel.org Signed-off-by: Palmer Dabbelt commit d0db02c628793e389538c0e5c3f6491141ea6200 Author: Guo Ren Date: Tue Feb 21 22:30:17 2023 -0500 riscv: entry: Add noinstr to prevent instrumentation inserted Without noinstr the compiler is free to insert instrumentation (think all the k*SAN, KCov, GCov, ftrace etc..) which can call code we're not yet ready to run this early in the entry path, for instance it could rely on RCU which isn't on yet, or expect lockdep state. (by peterz) Link: https://lore.kernel.org/linux-riscv/YxcQ6NoPf3AH0EXe@hirez.programming.kicks-ass.net/ Reviewed-by: Björn Töpel Suggested-by: Peter Zijlstra Tested-by: Jisheng Zhang Signed-off-by: Guo Ren Signed-off-by: Guo Ren Link: https://lore.kernel.org/r/20230222033021.983168-4-guoren@kernel.org Signed-off-by: Palmer Dabbelt commit 8574bf8d0ddd46f0bc393381563f59a6f4418a3e Author: Guo Ren Date: Tue Feb 21 22:30:16 2023 -0500 riscv: ptrace: Remove duplicate operation The TIF_SYSCALL_TRACE is controlled by a common code, see kernel/ptrace.c and include/linux/thread_info.h. clear_task_syscall_work(child, SYSCALL_TRACE); Signed-off-by: Guo Ren Signed-off-by: Guo Ren Reviewed-by: Oleg Nesterov Reviewed-by: Björn Töpel Link: https://lore.kernel.org/r/20230222033021.983168-3-guoren@kernel.org Signed-off-by: Palmer Dabbelt commit cc087c0b137e9e86457f84a7b5b1416938101a14 Author: Bagas Sanjaya Date: Sun Mar 19 14:49:02 2023 +0700 Documentation: leds: mt6370: Properly wrap hw_pattern chart The pattern diagram (chart) of /sys/class/leds//hw_pattern is wrapped in literal code block. However, the block indentation is interrupted by Icurr axis label, hence below warnings: Documentation/leds/leds-mt6370-rgb.rst:39: WARNING: Literal block ends without a blank line; unexpected unindent. Documentation/leds/leds-mt6370-rgb.rst:41: WARNING: Line block ends without a blank line. Documentation/leds/leds-mt6370-rgb.rst:46: WARNING: Unexpected indentation. Documentation/leds/leds-mt6370-rgb.rst:44: WARNING: Inline substitution_reference start-string without end-string. Fix the chart indentation by adding 4 more spaces so that the axis label is in the code block. Link: https://lore.kernel.org/oe-kbuild-all/202303182310.tB1mUzU7-lkp@intel.com/ Fixes: 4ba9df04b7ac66 ("docs: leds: Add MT6370 RGB LED pattern document") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Acked-by: Pavel Machek Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230319074903.13075-3-bagasdotme@gmail.com commit 1d105d6cddd03f97303fd4cbcf62834d6ed820c3 Author: Bagas Sanjaya Date: Sun Mar 19 14:49:01 2023 +0700 Documentation: leds: Add MT6370 doc to the toctree Commit 4ba9df04b7ac66 ("docs: leds: Add MT6370 RGB LED pattern document") adds documentation for Mediatek MT6370 RGB LED device, but forgets to include it to leds toctree index. Add the missing entry. Link: https://lore.kernel.org/oe-kbuild-all/202303182310.tB1mUzU7-lkp@intel.com/ Fixes: 4ba9df04b7ac66 ("docs: leds: Add MT6370 RGB LED pattern document") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Acked-by: Pavel Machek Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230319074903.13075-2-bagasdotme@gmail.com commit 1681ce3735483ab6897e403a20a7faf5c34c1f09 Author: Johan Hovold Date: Mon Mar 20 14:57:09 2023 +0100 arm64: dts: qcom: sc8280xp-pmics: fix sdam 'reg' property The SPMI PMIC register region width is fixed and should not be encoded in the devicetree. Fixes: d6dbbda37ab5 ("arm64: dts: qcom: sc8280xp-pmics: add pmk8280 sdam nvram") Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230320135710.1989-3-johan+linaro@kernel.org commit 4793b19ef0dc40b4b8fdae9a48f73c818e490046 Author: ChiYuan Huang Date: Fri Mar 17 23:42:40 2023 +0800 leds: rgb: mt6370: Fix implicit declaration for FIELD_GET 0-DAY CI Kernel Test Service reported the implicit declaration error below: drivers/leds/rgb/leds-mt6370-rgb.c: In function'mt6370_check_vendor_info': >> drivers/leds/rgb/leds-mt6370-rgb.c:889:15: error: implicit declaration of function 'FIELD_GET' [-Werror=implicit-function-declaration] 889 | vid = FIELD_GET(MT6370_VENDOR_ID_MASK, devinfo); | Add the missing header 'bitfield.h' to fix it. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303171729.CcgyFx17-lkp@intel.com/ Fixes: 55a8a5c16eb3 ("leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support") Signed-off-by: ChiYuan Huang Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/1679067760-19098-1-git-send-email-cy_huang@richtek.com commit f797dbf9a1ac1c50de6c1fac7110e7f8213b6848 Author: ChiYuan Huang Date: Fri Mar 10 14:55:57 2023 +0800 docs: leds: Add MT6370 RGB LED pattern document Document the MT6370 RGB LED pattern trigger. This simply describe how the pattern works, each timing period, and the pattern diagram for MT6370 RGB LED. Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/38f1e863b0f099158a63fb6f95056a1cb30d80a0.1678430444.git.chiaen_wu@richtek.com commit fa31e4221c65b205e18c82c459c3bcd68404a1c6 Author: ChiYuan Huang Date: Fri Mar 10 14:55:56 2023 +0800 leds: flash: mt6370: Add MediaTek MT6370 flashlight support The MediaTek MT6370 is a highly-integrated smart power management IC, which includes a single cell Li-Ion/Li-Polymer switching battery charger, a USB Type-C & Power Delivery (PD) controller, dual Flash LED current sources, a RGB LED driver, a backlight WLED driver, a display bias driver and a general LDO for portable devices. Add support for the MT6370 Flash LED driver. Flash LED in MT6370 has 2 channels and support torch/strobe mode. Co-developed-by: Alice Chen Signed-off-by: Alice Chen Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu Acked-by: Jacek Anaszewski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/52480420a160e5a4c71715fbbf105e684a16e7c2.1678430444.git.chiaen_wu@richtek.com commit 5c38376ef5b46d3091cc9485b95dd70db20f0089 Author: ChiYuan Huang Date: Fri Mar 10 14:55:55 2023 +0800 leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support The MediaTek MT6370 is a highly-integrated smart power management IC, which includes a single cell Li-Ion/Li-Polymer switching battery charger, a USB Type-C & Power Delivery (PD) controller, dual Flash LED current sources, a RGB LED driver, a backlight WLED driver, a display bias driver and a general LDO for portable devices. Add support for the MediaTek MT6370 Current Sink Type LED Indicator driver. It can control four channels current-sink RGB LEDs with 3 modes: constant current, PWM, and breath mode. Co-developed-by: Alice Chen Signed-off-by: Alice Chen Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu Acked-by: Jacek Anaszewski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/1df93a583c3f508a7158b83b95857e9bce235e1b.1678430444.git.chiaen_wu@richtek.com commit d4856dccdac9cd742a7c8c6dd0ff9de165b62fa2 Author: Luca Weiss Date: Fri Dec 9 14:54:06 2022 +0100 dt-bindings: leds: spmi-flash-led: Add pm6150l compatible Add the compatible for the flash-led block found on pm6150l PMIC. Signed-off-by: Luca Weiss Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221209-fp4-pm6150l-flash-v1-1-531521eb2a72@fairphone.com commit 9737a63558deeec01ce202c6c06c96a0503a3128 Author: Muhammad Usama Anjum Date: Fri Mar 3 18:03:46 2023 +0500 soc/tegra: cbb: remove linux/version.h make versioncheck reports the following: ./drivers/soc/tegra/cbb/tegra-cbb.c: 19 linux/version.h not needed. ./drivers/soc/tegra/cbb/tegra194-cbb.c: 26 linux/version.h not needed. ./drivers/soc/tegra/cbb/tegra234-cbb.c: 27 linux/version.h not needed. So remove linux/version.h from these files. Signed-off-by: Muhammad Usama Anjum Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit bdd2f4ce5e762d5aede6c30ae161e377536dae1c Author: Neil Armstrong Date: Fri Mar 17 16:06:36 2023 +0100 arm64: dts: qcom: sm8450: add dp controller Add the Display Port controller subnode to the MDSS node. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206-topic-sm8450-upstream-dp-controller-v6-5-d78313cbc41d@linaro.org commit d3054cec1e9ea475e53280724db62b62e25669d7 Author: Neil Armstrong Date: Fri Mar 17 16:06:35 2023 +0100 arm64: dts: qcom: sm8450: switch to usb3/dp combo phy The QMP PHY is a USB3/DP combo phy, switch to the newly documented bindings and register the clocks to the GCC and DISPCC controllers. Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206-topic-sm8450-upstream-dp-controller-v6-4-d78313cbc41d@linaro.org commit a2802008af93b70165a80624082c695d89f51eb2 Author: Neil Armstrong Date: Fri Mar 17 16:06:34 2023 +0100 arm64: dts: qcom: sm8350: add dp controller Add the Display Port controller subnode to the MDSS node. Tested-by: Dmitry Baryshkov #SM8350-HDK Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206-topic-sm8450-upstream-dp-controller-v6-3-d78313cbc41d@linaro.org commit 2458a305e80ef736ae03e6ca0bcae4c3f6923163 Author: Neil Armstrong Date: Fri Mar 17 16:06:33 2023 +0100 arm64: dts: qcom: sm8350: switch to combo usb3/dp phy The first QMP PHY is an USB3/DP combo phy, switch to the newly documented bindings and register the clocks to the GCC and DISPCC controllers. Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov #SM8350-HDK Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230206-topic-sm8450-upstream-dp-controller-v6-2-d78313cbc41d@linaro.org commit a93af4677e8c3db24eeeb0498bee83b6b7e341fe Author: Krzysztof Kozlowski Date: Fri Feb 17 16:58:38 2023 +0100 arm64: dts: qcom: sc7280: align RPMh regulator nodes with bindings Device node names should be generic and bindings expect certain pattern for RPMh regulator nodes. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230217155838.848403-3-krzysztof.kozlowski@linaro.org commit 11c0d37d4c03ac8002d378cb814aca89118e7d35 Author: Krzysztof Kozlowski Date: Fri Feb 17 16:58:37 2023 +0100 arm64: dts: qcom: sc7280-herobrine-audio-rt5682: add missing supplies Bindings expect DBVDD-supply and LDO1-IN-supply: sc7280-herobrine-evoker-lte.dtb: codec@1a: 'DBVDD-supply' is a required property sc7280-herobrine-evoker-lte.dtb: codec@1a: 'LDO1-IN-supply' is a required property In sc7180-trogdor.dtsi they come from the same regulator, so let's assume intention was the same here. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230217155838.848403-2-krzysztof.kozlowski@linaro.org commit 45875db5cc91958af0e0ada3d8d27ad57ab7c8bb Author: Krzysztof Kozlowski Date: Fri Feb 17 16:58:36 2023 +0100 arm64: dts: qcom: sc7180-trogdor-pazquel360: drop incorrect RT5682S VBAT-supply It seems that the RT5682S codec does not use VBAT-supply: sc7180-trogdor-pazquel360-lte.dtb: codec@1a: Unevaluated properties are not allowed ('VBAT-supply' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230217155838.848403-1-krzysztof.kozlowski@linaro.org commit e16dd29a3dff57eb6c84374ad8d824f1ec1c48bd Author: Kathiravan T Date: Fri Feb 17 14:03:08 2023 +0530 arm64: dts: qcom: ipq5332: enable the CPUFreq support Add the APCS, A53 PLL, cpu-opp-table nodes to bump the CPU frequency above 800MHz. Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230217083308.12017-6-quic_kathirav@quicinc.com commit c7ef7fbb1ccfc8b25f3b5382b70274189ba75bcc Author: Kathiravan T Date: Fri Feb 17 14:03:06 2023 +0530 clk: qcom: apss-ipq-pll: add support for IPQ5332 IPQ5332 APSS PLL is of type Stromer Plus. Add support for the same. To configure the stromer plus PLL separate API (clock_stromer_pll_configure) to be used. To achieve this, introduce the new member pll_type in device data structure and call the appropriate function based on this. Reviewed-by: Konrad Dybcio Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230217083308.12017-4-quic_kathirav@quicinc.com commit 102262767edefbe2560c1111b19b193fcfd9de5d Author: Kathiravan T Date: Fri Feb 17 14:03:05 2023 +0530 dt-bindings: clock: qcom,a53pll: add IPQ5332 compatible Add IPQ5332 compatible to A53 PLL bindings. Acked-by: Krzysztof Kozlowski Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230217083308.12017-3-quic_kathirav@quicinc.com commit 1d83f18be5ad3054636322925f6614e62cb5ff91 Author: Kathiravan T Date: Fri Feb 17 14:03:04 2023 +0530 clk: qcom: apss-ipq-pll: refactor the driver to accommodate different PLL types APSS PLL found on the IPQ8074 and IPQ6018 are of type Huayra PLL. But, IPQ5332 APSS PLL is of type Stromer Plus. To accommodate both these PLLs, refactor the driver to take the clk_alpha_pll, alpha_pll_config via driver data. Reviewed-by: Konrad Dybcio Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230217083308.12017-2-quic_kathirav@quicinc.com commit 782eea0c89f7d071d6b56ecfa1b8b0c81164b9be Author: Werner Sembach Date: Wed Mar 22 13:15:47 2023 +0100 gpiolib: acpi: Add a ignore wakeup quirk for Clevo NL5xNU commit 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable") changed the policy such that I2C touchpads may be able to wake up the system by default if the system is configured as such. However on Clevo NL5xNU there is a mistake in the ACPI tables that the TP_ATTN# signal connected to GPIO 9 is configured as ActiveLow and level triggered but connected to a pull up. As soon as the system suspends the touchpad loses power and then the system wakes up. To avoid this problem, introduce a quirk for this model that will prevent the wakeup capability for being set for GPIO 9. This patch is analoge to a very similar patch for NL5xRU, just the DMI string changed. Signed-off-by: Werner Sembach Cc: stable@vger.kernel.org Signed-off-by: Andy Shevchenko commit af3b462a8e07bc5529e19f60d04a225bfce659e1 Author: Andy Shevchenko Date: Mon Jan 30 18:13:45 2023 +0200 gpiolib: acpi: Move ACPI device NULL check to acpi_get_driver_gpio_data() It's logical to check ACPI device for NULL inside acpi_get_driver_gpio_data() instead of requiring that in each caller. Signed-off-by: Andy Shevchenko commit 5062e4c14b752a21aa24d6500ace6e251fde1d7c Author: Benjamin Tissoires Date: Fri Mar 10 14:38:10 2023 +0100 gpiolib: acpi: use the fwnode in acpi_gpiochip_find() While trying to set up an SSDT override for a USB-2-I2C chip [0], I realized that the function acpi_gpiochip_find() was using the parent of the gpio_chip to do the ACPI matching. This works fine on my Ice Lake laptop because AFAICT, the DSDT presents the PCI device INT3455 as the "Device (GPI0)", but is in fact handled by the pinctrl driver in Linux. The pinctrl driver then creates a gpio_chip device. This means that the gc->parent device in that case is the GPI0 device from ACPI and everything works. However, in the hid-cp2112 case, the parent is the USB device, and the gpio_chip is directly under that USB device. Which means that in this case gc->parent points at the USB device, and so we can not do an ACPI match towards the GPIO device. I think it is safe to resolve the ACPI matching through the fwnode because when we call gpiochip_add_data(), the first thing it does is setting a proper gc->fwnode: if it is not there, it borrows the fwnode of the parent. So in my Ice Lake case, gc->fwnode is the one from the parent, meaning that the ACPI handle we will get is the one from the GPI0 in the DSDT (the pincrtl one). And in the hid-cp2112 case, we get the actual fwnode from the gpiochip we created in the HID device, making it working. Reviewed-by: Mika Westerberg Link: https://lore.kernel.org/linux-input/20230227140758.1575-1-kaehndan@gmail.com/T/#m592f18081ef3b95b618694a612ff864420c5aaf3 [0] Signed-off-by: Benjamin Tissoires Signed-off-by: Andy Shevchenko commit 2ffd04ca2ae66c274eb116d5f0330af14cb63383 Author: Andy Shevchenko Date: Tue Mar 14 12:55:09 2023 +0200 gpio: mm-lantiq: Fix typo in the newly added header filename The header with legacy struct of_mmio_gpio_chip and accompanying APIs is called legacy-of-mm-gpiochip.h. Remove repetitive '.h' at the end. Fixes: a99cc66807d6 ("gpiolib: split of_mm_gpio_chip out of linux/of_gpio.h") Reported-by: kernel test robot Signed-off-by: Andy Shevchenko commit d94ffb99a379a6307af99b6f59b08ec3d58eb958 Author: Geert Uytterhoeven Date: Thu Mar 9 15:41:13 2023 +0100 sh: mach-x3proto: Add missing #include shx3_defconfig: arch/sh/boards/mach-x3proto/setup.c: In function ‘x3proto_devices_setup’: arch/sh/boards/mach-x3proto/setup.c:246:62: error: invalid use of undefined type ‘struct gpio_chip’ 246 | baseboard_buttons[i].gpio = x3proto_gpio_chip.base + i; | ^ Fix this by replacing the include of the legacy by . Reported-by: Linux Kernel Functional Testing Link: https://lore.kernel.org/r/CA+G9fYs7suzGsEDK40G0pzxXyR1o2V4Pn-oy1owTsTWRVEVHog@mail.gmail.com Fixes: 21d9526d13b5467b ("gpiolib: Make the legacy consumer-only") Signed-off-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko commit 559e4a3df02991456113089996df1168a74c2e0a Author: Andy Shevchenko Date: Thu Mar 23 16:18:19 2023 +0200 powerpc/40x: Add missing select OF_GPIO_MM_GPIOCHIP Since the split of the legacy of_mm_gpio_chip to a separate file and a specific build configuration option, the users must select it when needed. The PowerPC 40x code misses this, so we have to add the select here. Fixes: a99cc66807d6 ("gpiolib: split of_mm_gpio_chip out of linux/of_gpio.h") Reported-by: kernel test robot Signed-off-by: Andy Shevchenko commit 829d78e3ea321eb4f4e93bc7b162b8cc6ed91ec7 Author: Saalim Quadri Date: Thu Mar 23 01:39:49 2023 +0530 ASoC: dt-bindings: ak5558: Convert to dtschema Convert the AK5558 ADC audio codec bindings to DT schema. Signed-off-by: Saalim Quadri Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230322200949.8986-1-danascape@gmail.com Signed-off-by: Mark Brown commit 3f079114bf522f27f3680238b6429f3dd45535b6 Author: Jan Kara Date: Tue Feb 28 00:13:19 2023 -0500 ext4: Convert data=journal writeback to use ext4_writepages() Add support for writeback of journalled data directly into ext4_writepages() instead of offloading it to write_cache_pages(). This actually significantly simplifies the code and reduces code duplication. For checkpointing of committed data we can use ext4_writepages() rightaway the same way as writeback of ordered data uses it on transaction commit. For journalling of dirty mapped pages, we need to add a special case to mpage_prepare_extent_to_map() to add all page buffers to the journal. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230228051319.4085470-8-tytso@mit.edu commit d8be7607de039e5a477b0a5c63959d81ac052c3b Author: Jan Kara Date: Tue Feb 28 00:13:18 2023 -0500 ext4: Move mpage_page_done() calls after error handling In case mpage_submit_page() returns error, it doesn't really matter whether we call mpage_page_done() and then return error or whether we return directly because in that case page cleanup will be done by mpage_release_unused_pages() instead. Logically, it makes more sense to leave the cleanup to mpage_release_unused_pages() because we didn't succeed in writing the page. So move mpage_page_done() calls after the error handling. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230228051319.4085470-7-tytso@mit.edu commit eaf2ca10ca4ba450f8e514cb8bfc9149660b57f6 Author: Jan Kara Date: Tue Feb 28 00:13:17 2023 -0500 ext4: Move page unlocking out of mpage_submit_page() Move page unlocking during page writeback out of mpage_submit_page() into the callers. This will allow writeback in data=journal mode to keep the page locked for a bit longer. Since page unlocking it tightly connected to increment of mpd->first_page (as that determines cleanup of locked but unwritten pages), move page unlocking as well as mpd->first_page handling into a helper function. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230228051319.4085470-6-tytso@mit.edu commit f1496362e9d7b37fe6b8983086c1548a601b5594 Author: Jan Kara Date: Tue Feb 28 00:13:16 2023 -0500 ext4: Don't unlock page in ext4_bio_write_page() Do not unlock the written page in ext4_bio_write_page(). Instead leave the page locked and unlock it in the callers. We'll need to keep the page locked for data=journal writeback for a bit longer. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230228051319.4085470-5-tytso@mit.edu commit 3f5d30636d2a188ee3cd22c6fef1ace5304a07bf Author: Jan Kara Date: Tue Feb 28 00:13:15 2023 -0500 ext4: Mark page for delayed dirtying only if it is pinned In data=journal mode, page should be dirtied only when it has buffers for checkpoint or it is writeably mapped. In the first case, we don't need to do anything special. In the second case, page was already added to the journal by ext4_page_mkwrite() and since transaction commit writeprotects mapped pages again, page should be writeable (and thus dirtied) only while it is part of the running transaction. So nothing needs to be done either. The only special case is when someone pins the page and uses this pin for modifying page data. So recognize this special case and only then mark the page as having data that needs adding to the journal. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230228051319.4085470-4-tytso@mit.edu commit c8e8e16dbbf0840e6f41575c3d6158bd331218bc Author: Jan Kara Date: Tue Feb 28 00:13:14 2023 -0500 ext4: Use nr_to_write directly in mpage_prepare_extent_to_map() When looking up extent of pages to map in mpage_prepare_extent_to_map() we count how many pages we still need to find in a copy of wbc->nr_to_write counter. With more complex page handling for data=journal mode, it will be easier to use wbc->nr_to_write directly so that we don't forget to carry over changes back to nr_to_write counter. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230228051319.4085470-3-tytso@mit.edu commit 9462f770eda85b754e82b089d8a0d195fa160837 Author: Jan Kara Date: Tue Feb 28 00:13:13 2023 -0500 ext4: Update stale comment about write constraints The comment above do_journal_get_write_access() is very stale. Most of it just does not refer to what the function does today or how jbd2 works. The bit about transaction handling during write(2) is still correct so just update the function names in that part and move the comment to a more appropriate place. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20230228051319.4085470-2-tytso@mit.edu commit 4d6d94ba8823a2f4e48c56ed33cb77061c1f425d Author: Jonathan Cavitt Date: Mon Mar 20 20:21:17 2023 +0100 drm/i915/selftests: Drop igt_cs_tlb The gt_tlb live selftest has the same code coverage as the igt_cs_tlb subtest of gtt, except it is better at detecting TLB bugs. Furthermore, while igt_cs_tlb is hitting some unforeseen issues, these issues are either false positives due to the test being poorly formatted, or are true positives that can be more easily diagnosed with smaller tests. As such, igt_cs_tlb is superceded by and obsoleted by gt_tlb, meaning it can be removed. Signed-off-by: Jonathan Cavitt Reviewed-by: Andrzej Hajda Acked-by: Nirmoy Das Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230320192117.287374-1-andi.shyti@linux.intel.com commit b65a0a8edba2c0a03e8fdb03b6807132e4166483 Author: Charles Keepax Date: Thu Mar 23 13:20:47 2023 +0000 regulator: arizona-micsupp: Use PROBE_FORCE_SYNCHRONOUS Restore synchronous probing for Arizona regulators as the main MFD relies on the ordering of the devices probing. As these regulators are built into the CODEC and typically have no DT representation the regulator framework is unaware of their existence until the driver probes. These means the probing of the driver needs to be synchronous to ensure the regulators are not substitued for the dummy later when the users request them. Fixes: 259b93b21a9f ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20230323132047.833737-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 557de8d84ae4988b08339032d2f405ef5057e82b Author: Charles Keepax Date: Thu Mar 23 13:20:46 2023 +0000 regulator: arizona-ldo1: Use PROBE_FORCE_SYNCHRONOUS Restore synchronous probing for Arizona regulators because otherwise the main MFD driver will not find its core supplies. As these regulators are built into the CODEC and typically have no DT representation the regulator framework is unaware of their existence until the driver probes. These means the probing of the driver needs to be synchronous to ensure the regulators are not substitued for the dummy later when the users request them. Fixes: 259b93b21a9f ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20230323132047.833737-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 22ead09ba40745e50970565af1996c2c1cc4e909 Author: Krzysztof Kozlowski Date: Wed Mar 22 18:35:59 2023 +0100 dt-bindings: mailbox: qcom,apcs-kpss-global: fix SDX55 'if' match The qcom,sdx55-apcs-gcc is followed by another compatible (syscon), thus the 'if' clause must match by contains. Fixes: 0d17014e9189 ("dt-bindings: mailbox: Add binding for SDX55 APCS") Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Acked-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322173559.809805-2-krzysztof.kozlowski@linaro.org commit 8504fa9baf8bdc5f333f24077b54df1d16173d99 Author: Krzysztof Kozlowski Date: Wed Mar 22 18:35:58 2023 +0100 dt-bindings: mailbox: qcom,apcs-kpss-global: correct SDX55 clocks SDX55 and SDX65 DTS takes clocks in a bit different order. Adjust bindings to the DTS. Fixes: 0d17014e9189 ("dt-bindings: mailbox: Add binding for SDX55 APCS") Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Acked-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322173559.809805-1-krzysztof.kozlowski@linaro.org commit 320bb07581ad6f889f30a6fcbed8e6f62d378e8f Merge: fe15c26ee26ef 1271a7b98e798 Author: Thierry Reding Date: Thu Mar 23 14:49:21 2023 +0100 Merge branch 'fixes' into for-next commit 2093bcd872321a5301470978231b23cc121e3476 Author: Linus Walleij Date: Mon Mar 20 10:55:16 2023 +0100 gpio: xlp: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. In this case the driver uses .mask_ack() and .unmask() and since I have a vague idea about the semantics of .mask_ack() I added .irq_enable() to the existing .irq_disable() and called into the gpiolib core from those callbacks instead of mask/unmask. Cc: Marc Zyngier Signed-off-by: Linus Walleij Reviewed-by: Marc Zyngier Signed-off-by: Bartosz Golaszewski commit b4510f8fd5d0e9afa777f115871f5d522540c417 Author: Linus Walleij Date: Mon Mar 20 10:55:15 2023 +0100 gpio: xilinx: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Signed-off-by: Linus Walleij Reviewed-by: Marc Zyngier Signed-off-by: Bartosz Golaszewski commit 9c1282b7459e14e884bb768373f212e9e3b9cd5a Author: Linus Walleij Date: Mon Mar 20 10:55:14 2023 +0100 gpio: xgs-iproc: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Signed-off-by: Linus Walleij Reviewed-by: Marc Zyngier Signed-off-by: Bartosz Golaszewski commit 5cf3e019a4312564ca9c0a48a515b8a28f9cee25 Author: Linus Walleij Date: Mon Mar 20 10:55:13 2023 +0100 gpio: visconti: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. The driver is for a hierarchical chip so some extra care needs to be taken to introduce two new callbacks. Cc: Marc Zyngier Signed-off-by: Linus Walleij Reviewed-by: Marc Zyngier Signed-off-by: Bartosz Golaszewski commit 8e43827b6ae727a745ce7a8cc19184b28905a965 Author: Linus Walleij Date: Mon Mar 20 10:55:12 2023 +0100 gpio: tqmx86: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Signed-off-by: Linus Walleij Reviewed-by: Marc Zyngier Signed-off-by: Bartosz Golaszewski commit ef902f54e91b3012586f6387daeebec2966312f0 Author: Linus Walleij Date: Mon Mar 20 10:55:11 2023 +0100 gpio: thunderx: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Whereas in most cases we put the gpiochip_[enable|disable]_irq() calls in the .irq_mask() and .irq_unmask() callbacks, here we need to put them in the .irq_enable() and .irq_disable() callbacks, as this driver uses both .irq_mask() and .irq_mask_ack(). Cc: Marc Zyngier Signed-off-by: Linus Walleij Reviewed-by: Marc Zyngier Signed-off-by: Bartosz Golaszewski commit 32585b565fed013449f9a58b05846b508b989e74 Author: Linus Walleij Date: Mon Mar 20 10:55:10 2023 +0100 gpio: stmpe: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Signed-off-by: Linus Walleij Reviewed-by: Marc Zyngier Signed-off-by: Bartosz Golaszewski commit 5ff8240e47de33db6c0098368784672bd47d57cb Author: Linus Walleij Date: Mon Mar 20 10:55:09 2023 +0100 gpio: siox: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. In this case I had to figure out a way to get to the struct gpio_chip that would work even when the irq_chip is not part of the driver state container. I did this by just doing what most other GPIO drivers do and pass the state struct as data to devm_gpiochip_add_data() and rewrite accordingly. Cc: Marc Zyngier Signed-off-by: Linus Walleij Reviewed-by: Marc Zyngier Signed-off-by: Bartosz Golaszewski commit 957e64bee8eecd3d3c767ab6577c4bf5c4230128 Author: Linus Walleij Date: Mon Mar 20 10:55:08 2023 +0100 gpio: rda: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Signed-off-by: Linus Walleij Acked-by: Manivannan Sadhasivam Reviewed-by: Marc Zyngier Signed-off-by: Bartosz Golaszewski commit 9bc167e27cc5f3a078492b4cfcaaa2432ebb6eb0 Author: Keguang Zhang Date: Wed Mar 15 19:06:49 2023 +0800 gpio: loongson1: Add DT support This patch adds DT support for Loongson-1 GPIO driver. Signed-off-by: Keguang Zhang Signed-off-by: Bartosz Golaszewski commit 722cfe4ffa6a13324e956bee81a1c0976034d89d Author: Keguang Zhang Date: Wed Mar 15 19:06:50 2023 +0800 dt-bindings: gpio: Add Loongson-1 GPIO Add devicetree binding document for Loongson-1 GPIO. Signed-off-by: Keguang Zhang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski commit 31b6ec6793a0b0b9b44f540430898e91de080882 Author: Keguang Zhang Date: Wed Mar 15 19:06:48 2023 +0800 gpio: loongson1: Introduce ls1x_gpio_chip struct This patch introduces and allocates ls1x_gpio_chip struct containing gpio_chip and reg_base to avoid global gpio_reg_base. Signed-off-by: Keguang Zhang Signed-off-by: Bartosz Golaszewski commit a9b4678a40491ddc60a47e1479d93f328c3427a0 Author: Keguang Zhang Date: Wed Mar 15 19:06:47 2023 +0800 gpio: loongson1: Convert to SPDX identifier Use SPDX-License-Identifier instead of the license text. The current author name is unofficial, change it to my real name. Signed-off-by: Keguang Zhang Signed-off-by: Bartosz Golaszewski commit eef644d3802e7d5b899514dc9c3663a692817162 Author: Marek Szyprowski Date: Thu Mar 23 09:33:12 2023 +0100 regulator: wm8994: Use PROBE_FORCE_SYNCHRONOUS Restore synchronous probing for wm8994 regulators because otherwise the sound device is never initialized on Exynos5250-based Arndale board. Fixes: 259b93b21a9f ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") Signed-off-by: Marek Szyprowski Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20230323083312.199189-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown commit 80404e4e13882cf3037577e4a3451a61d54f58db Author: Krzysztof Kozlowski Date: Wed Mar 22 20:35:41 2023 +0100 ASoC: dt-bindings: wlf,wm8994: Convert to dtschema Convert the Wolfson WM1811/WM8994/WM8958 audio codecs bindings to DT schema. Changes against original binding: 1. Add missing LDO1VDD-supply and LDO2VDD-supply. 2. Use "gpios" suffix for wlf,ldo1ena and wlf,ldo2ena (Linux kernel's gpiolib already looks for both variants). 3. Do not require AVDD1-supply and DCVDD-supply, because at least on Arndale board with Exynos5250 these are being supplied by internal LDOs. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20230322193541.827291-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 056db840115653659d86a3931a78b3c504edb2cc Author: Colin Ian King Date: Thu Mar 23 09:05:31 2023 +0000 ASoC: SOF: ipc4/intel: Fix spelling mistake "schduler" -> "scheduler" There are two spelling mistakes in dev_warn messages. Fix them. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20230323090531.67679-1-colin.i.king@gmail.com Signed-off-by: Mark Brown commit 9d11b13402d1b80f7f3ca5061d75f15cf8002555 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:18 2023 +0100 USB: mark all struct bus_type as const Now that the driver core can properly handle constant struct bus_type, move all of the USB subsystem struct bus_type structures as const, placing them into read-only memory which can not be modified at runtime. Cc: Johan Hovold Cc: Evan Green Cc: Alan Stern Cc: linux-usb@vger.kernel.org Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230313182918.1312597-36-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit d492cc2573a08352c48a66d3e3f312a15fb3f363 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:17 2023 +0100 driver core: device.h: make struct bus_type a const * Now that all users who accessed the bus_type structure in struct device are properly using it as a const *, mark it as such so that no one can modify it going forward anymore. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313182918.1312597-35-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b18d0a0f92a8fe9e56d812808184c8c4b9f18f92 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:16 2023 +0100 iommu: make the pointer to struct bus_type constant A number of iommu functions take a struct bus_type * and never modify the data passed in, so make them all const * as that is what the driver core is expecting to have passed into as well. This is a step toward making all struct bus_type pointers constant in the kernel. Cc: Will Deacon Cc: Robin Murphy Cc: iommu@lists.linux.dev Acked-by: Joerg Roedel Link: https://lore.kernel.org/r/20230313182918.1312597-34-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a3ea9fbc822f9ae9402ffc0954751d7a11f672ea Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:15 2023 +0100 ARM/dma-mapping: const a pointer to bus_type in arm_iommu_create_mapping() Change the function arm_iommu_create_mapping() to take a pointer to a const bus_type as the function does not modify the variable the pointer points to at all, and the driver core bus functions it calls all expect a const * type. Cc: Russell King Cc: Greg Kroah-Hartman Cc: "Russell King (Oracle)" Cc: Arnd Bergmann Cc: Robin Murphy Cc: Kees Cook Cc: Lukas Bulwahn Cc: Ben Dooks Cc: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230313182918.1312597-33-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 790f3b60ac78efb339c7ef2f4d2dba63c804110a Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:14 2023 +0100 dmaengine: idxd: use const struct bus_type * In the functions unbind_store() and bind_store(), a struct bus_type * should be a const one, as the driver core bus functions used by this variable are expecting the pointer to be constant, and these functions do not modify the pointer at all. Cc: dmaengine@vger.kernel.org Acked-by: Vinod Koul Acked-by: Fenghua Yu Acked-by: Dave Jiang Link: https://lore.kernel.org/r/20230313182918.1312597-32-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 94a1150421940ff2e8113b5fa6837774777d5b3d Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:13 2023 +0100 vhost-vdpa: vhost_vdpa_alloc_domain() should be using a const struct bus_type * The function, vhost_vdpa_alloc_domain(), has a pointer to a struct bus_type, but it should be constant as the function it passes it to expects it to be const, and the vhost code does not modify it in any way. Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: kvm@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: netdev@vger.kernel.org Link: https://lore.kernel.org/r/20230313182918.1312597-31-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit c9a9f18d3ad8acb9f9d6b52b5e1922a70b48dc35 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:12 2023 +0100 drm/i915/huc: use const struct bus_type pointers The struct bus_type pointers in the functions intel_huc_register_gsc_notifier() and intel_huc_unregister_gsc_notifier() should be a const pointer, as the structure is not modified anywhere in the functions, and the pointer they are passed will be a const * in the near future. Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: David Airlie Cc: Daniel Vetter Cc: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Cc: Greg Kroah-Hartman Cc: Tony Ye Cc: Vitaly Lubart Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Acked-by: Tvrtko Ursulin Link: https://lore.kernel.org/r/20230313182918.1312597-30-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 550fac229e469b75ab4609b617146314786c62b3 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:11 2023 +0100 crypto: hisilicon/qm - make struct bus_type * const In the function, qm_get_qos_value(), a struct bus_type * is used, but it really should be a const pointer as it is not modified anywhere in the function, and the driver core function it is used in expects a constant pointer. Cc: Weili Qian Cc: Zhou Wang Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Acked-by: Herbert Xu Link: https://lore.kernel.org/r/20230313182918.1312597-29-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit c28dd08ef713d2127c5bad3f3e0e93d6ec0309a2 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:10 2023 +0100 driver core: make the bus_type in struct device_driver constant The pointer to struct bus_type in struct device_driver should only be pointing to something that can never change now that the driver core has fixed up the previously writable fields. So mark it as a constant pointer to enforce this and move forward with the goal of moving bus_type into read-only memory. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313182918.1312597-28-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 38370c4e25af7f5670787a1bb1861b289f2ad770 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:09 2023 +0100 driver core: bus: constify bus_get() It's funny to think about getting a reference count of a constant structure pointer, but this locks into place the private data "underneath" the struct bus_type() which is important to not go away while we are working with the bus structure for some callbacks. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313182918.1312597-27-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 7c06be04251a0b3349868622a2111a54cbfad8d4 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:08 2023 +0100 driver core: bus: constify driver_find() The driver_find() function can now take a const * to bus_type, not just a * so fix that up. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313182918.1312597-26-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 9622b9f282e0f0d37683b21575b683039169e397 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:07 2023 +0100 driver core: bus: constify bus_rescan_devices() The bus_rescan_devices() function was missed in the previous change of the bus_for_each* constant pointer changes, so fix it up now to take a const * to struct bus_type. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313182918.1312597-25-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 00c4a3c47da761b4ba5d09c46b6fc77af5759081 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:06 2023 +0100 driver core: bus: constantify bus_register() bus_register() is now safe to take a constant * to bus_type, so make that change and mark the subsys_private bus_type * constant as well. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313182918.1312597-24-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 75cff725d9566699a670a02b3cfd1c6e9e9ed53e Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:05 2023 +0100 driver core: bus: mark the struct bus_type for sysfs callbacks as constant struct bus_type should never be modified in a sysfs callback as there is nothing in the structure to modify, and frankly, the structure is almost never used in a sysfs callback, so mark it as constant to allow struct bus_type to be moved to read-only memory. Cc: "David S. Miller" Cc: "James E.J. Bottomley" Cc: "K. Y. Srinivasan" Cc: Alexander Gordeev Cc: Alexandre Bounine Cc: Alison Schofield Cc: Ben Widawsky Cc: Dexuan Cui Cc: Eric Dumazet Cc: Haiyang Zhang Cc: Hannes Reinecke Cc: Harald Freudenberger Cc: Heiko Carstens Cc: Hu Haowen Cc: Jakub Kicinski Cc: Jens Axboe Cc: Jonathan Corbet Cc: Laurentiu Tudor Cc: Matt Porter Cc: Michael Ellerman Cc: Paolo Abeni Cc: Stuart Yoder Cc: Vasily Gorbik Cc: Vishal Verma Cc: Yanteng Si Acked-by: Ilya Dryomov # rbd Acked-by: Ira Weiny # cxl Reviewed-by: Alex Shi Acked-by: Iwona Winiarska Acked-by: Dan Williams Acked-by: Bjorn Helgaas # pci Acked-by: Wei Liu Acked-by: Martin K. Petersen # scsi Link: https://lore.kernel.org/r/20230313182918.1312597-23-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 9cc61e5fbd619eea0401f519e7bac72fe3d4d1e8 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:04 2023 +0100 driver core: bus: move dev_root out of struct bus_type Now that all accesses of dev_root is through the bus_get_dev_root() call, move the pointer out of struct bus_type and into the private dynamic structure, subsys_private. With this change, there is no modifiable portions of struct bus_type so it can be marked as a constant structure and moved to read-only memory. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313182918.1312597-22-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 6e890c5d5021ca7e69bbe203fde42447874d9a82 Author: Mike Christie Date: Fri Mar 10 16:03:32 2023 -0600 vhost: use vhost_tasks for worker threads For vhost workers we use the kthread API which inherit's its values from and checks against the kthreadd thread. This results in the wrong RLIMITs being checked, so while tools like libvirt try to control the number of threads based on the nproc rlimit setting we can end up creating more threads than the user wanted. This patch has us use the vhost_task helpers which will inherit its values/checks from the thread that owns the device similar to if we did a clone in userspace. The vhost threads will now be counted in the nproc rlimits. And we get features like cgroups and mm sharing automatically, so we can remove those calls. Signed-off-by: Mike Christie Acked-by: Michael S. Tsirkin Signed-off-by: Christian Brauner (Microsoft) Signed-off-by: Christian Brauner commit 1a5f8090c6de99306f4212dc7adfc6189a616eb9 Author: Mike Christie Date: Fri Mar 10 16:03:31 2023 -0600 vhost: move worker thread fields to new struct This is just a prep patch. It moves the worker related fields to a new vhost_worker struct and moves the code around to create some helpers that will be used in the next patch. Signed-off-by: Mike Christie Acked-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) Signed-off-by: Christian Brauner commit e297cd54b3f81d652456ae6cb93941fc6b5c6683 Author: Mike Christie Date: Fri Mar 10 16:03:30 2023 -0600 vhost_task: Allow vhost layer to use copy_process Qemu will create vhost devices in the kernel which perform network, SCSI, etc IO and management operations from worker threads created by the kthread API. Because the kthread API does a copy_process on the kthreadd thread, the vhost layer has to use kthread_use_mm to access the Qemu thread's memory and cgroup_attach_task_all to add itself to the Qemu thread's cgroups, and it bypasses the RLIMIT_NPROC limit which can result in VMs creating more threads than the admin expected. This patch adds a new struct vhost_task which can be used instead of kthreads. They allow the vhost layer to use copy_process and inherit the userspace process's mm and cgroups, the task is accounted for under the userspace's nproc count and can be seen in its process tree, and other features like namespaces work and are inherited by default. Signed-off-by: Mike Christie Acked-by: Michael S. Tsirkin Signed-off-by: Christian Brauner (Microsoft) Signed-off-by: Christian Brauner commit e2ee10474ce766686e7a7496585cdfaf79e3a1bf Author: Chris Wilson Date: Thu Mar 16 17:59:18 2023 +0100 drm/i915/gem: Flush lmem contents after construction i915_gem_object_create_lmem_from_data() lacks the flush of the data written to lmem to ensure the object is marked as dirty and the writes flushed to the backing store. Once created, we can immediately release the obj->mm.mapping caching of the vmap. Fixes: 7acbbc7cf485 ("drm/i915/guc: put all guc objects in lmem when available") Cc: Matthew Auld Cc: Daniele Ceraolo Spurio Cc: Andi Shyti Cc: Matthew Brost Cc: John Harrison Signed-off-by: Chris Wilson Cc: # v5.16+ Signed-off-by: Nirmoy Das Reviewed-by: Andi Shyti Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20230316165918.13074-1-nirmoy.das@intel.com commit 5b6cb45072c03f0e0f0eff2dce2fe683cbbb9bf6 Author: Jongwoo Han Date: Thu Mar 2 11:11:20 2023 +0900 EDAC/i5100: Fix typo in comment Correct typo from 'preform' to 'perform' in comment. Signed-off-by: Jongwoo Han Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230302021120.56794-1-jongwooo.han@gmail.com commit cf2679018190c75dea87196528e31936da8986aa Author: Yang Li Date: Wed Mar 15 13:53:55 2023 +0800 mmc: usdhi6rol0: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230315055355.66733-1-yang.lee@linux.alibaba.com Signed-off-by: Ulf Hansson commit 288b7baf090b7ea2ac30c09293df00b03e874458 Author: Yang Li Date: Wed Mar 15 13:50:23 2023 +0800 mmc: sdhci-of-aspeed: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230315055023.61779-1-yang.lee@linux.alibaba.com Signed-off-by: Ulf Hansson commit c66c55bec586de84bfccb361c13a70f5b79dd187 Author: Yang Li Date: Wed Mar 15 13:41:13 2023 +0800 mmc: owl-mmc: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230315054113.48898-1-yang.lee@linux.alibaba.com Signed-off-by: Ulf Hansson commit 73226532da9554f45e4703244b0b0f9a04ae2bd7 Author: Yang Li Date: Wed Mar 15 13:34:34 2023 +0800 mmc: omap: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230315053434.38316-1-yang.lee@linux.alibaba.com Signed-off-by: Ulf Hansson commit e3d1672741eda6763426a467e5fe36c7147a139e Author: Yang Li Date: Wed Mar 15 13:31:27 2023 +0800 mmc: jz4740: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230315053127.33855-1-yang.lee@linux.alibaba.com Signed-off-by: Ulf Hansson commit 220b484fa6e027e6fd296422513f2e7a76f7e6cf Author: Yang Li Date: Wed Mar 15 13:22:31 2023 +0800 mmc: dw_mmc-pltfm: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230315052231.21212-1-yang.lee@linux.alibaba.com Signed-off-by: Ulf Hansson commit 6fb11c1812d337e2cc0dd482ffd99fce1b3f88e0 Author: Krzysztof Kozlowski Date: Tue Mar 14 21:39:01 2023 +0100 mmc: sdhci: drop useless sdhci_get_compatibility() !OF stub The sdhci_get_compatibility() uses OF functions which have stubs for !OF case, thus entire CONFIG_OF ifdef can be dropped. This also fixes !CONFIG_OF W=1 warning: drivers/mmc/host/sdhci-pltfm.c:76:6: error: no previous prototype for ‘sdhci_get_compatibility’ [-Werror=missing-prototypes] Signed-off-by: Krzysztof Kozlowski Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230314203901.20803-1-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson commit b8548e387f2ab2d1bfeeadd28d0739825eae3c93 Author: Konrad Dybcio Date: Tue Mar 14 13:52:59 2023 +0100 dt-bindings: mmc: sdhci-msm: Document QCM2290 SDHCI Document the SDHCI on QCM2290. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230314-topic-2290_compats-v1-4-47e26c3c0365@linaro.org Signed-off-by: Ulf Hansson commit e3f0d2213dba10900a1eca08e775c37e1cf8e69f Author: Heiner Kallweit Date: Sat Mar 11 23:41:21 2023 +0100 mmc: meson-gx: use new helpers mmc_regulator_enable/disable_vqmmc Use new helpers mmc_regulator_enable/disable_vqmmc to simplify the code. Signed-off-by: Heiner Kallweit Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/2ceb62da-07e6-bafc-c29e-13cc1cdde93a@gmail.com Signed-off-by: Ulf Hansson commit 8d91f3f8ae57e6292142ca89f322e90fa0d6ac02 Author: Heiner Kallweit Date: Sat Mar 11 23:39:55 2023 +0100 mmc: core: add helpers mmc_regulator_enable/disable_vqmmc There's a number of drivers (e.g. dw_mmc, meson-gx, mmci, sunxi) using the same mechanism and a private flag vqmmc_enabled to deal with enabling/disabling the vqmmc regulator. Move this to the core and create new helpers mmc_regulator_enable_vqmmc and mmc_regulator_disable_vqmmc. Signed-off-by: Heiner Kallweit Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/71586432-360f-9b92-17f6-b05a8a971bc2@gmail.com Signed-off-by: Ulf Hansson commit 2c52e002693dc51a789f54ce72e2f639d7cb1067 Author: Heiner Kallweit Date: Sat Mar 11 23:27:18 2023 +0100 mmc: meson-gx: simplify usage of mmc_regulator_set_ocr After 087592395a96 ("mmc: core: Allow invalid regulator in mmc_regulator_set_ocr()") we can remove the checks here. Signed-off-by: Heiner Kallweit Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/858a592b-ebf4-99b4-74fc-21b4ad3382f8@gmail.com Signed-off-by: Ulf Hansson commit 51dfc6142acecfea9bf2041ccadbc3438e31af56 Author: Fred Date: Thu Feb 23 20:04:50 2023 +0800 mmc: sdhci-pci-o2micro: Fix SDR50 mode timing issue Change SDR50 mode clock source from DLL output clock to PLL open clock 1.HS200 and SDR104 mode select DLL output clock 2.SDR50 mode select PLL open clock Signed-off-by: Fred Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230223120450.16858-1-fredaibayhubtech@126.com Signed-off-by: Ulf Hansson commit ca6b5fe277e91ebca5101dc00c0e26755f0ed6c4 Author: Rob Herring Date: Fri Mar 10 08:47:14 2023 -0600 mmc: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144715.1543836-1-robh@kernel.org Signed-off-by: Ulf Hansson commit e37556d947794c0c7730460a3cb029c700fe70cb Author: Alexandre Mergnat Date: Tue Mar 7 14:17:31 2023 +0100 dt-bindings: mmc: mediatek,mtk-sd: add mt8365 Add binding description for mediatek,mt8365-mmc Signed-off-by: Alexandre Mergnat Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230203-evk-board-support-v2-2-6ec7cdb10ccf@baylibre.com Signed-off-by: Ulf Hansson commit 66756ca342547af8d3d8156b7abf47cb30082f0f Author: Rob Herring Date: Fri Mar 10 08:47:14 2023 -0600 mmc: arasan: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144714.1543767-1-robh@kernel.org Signed-off-by: Ulf Hansson commit 49502408007b77ff290ce62e6218cefaeedcb31a Author: Vasily Khoruzhick Date: Thu Mar 9 17:03:49 2023 -0800 mmc: sdhci-of-dwcmshc: properly determine max clock on Rockchip Currently .get_max_clock returns the current clock rate for cclk_emmc on rk35xx, thus max clock gets set to whatever bootloader set it to. In case of u-boot, it is intentionally reset to 50 MHz if it boots from eMMC, see mmc_deinit() in u-boot sources. As a result, HS200 and HS400 modes are never selected by Linux, because dwcmshc_rk35xx_postinit clears appropriate caps if host->mmc->f_max is < 52MHz cclk_emmc is not a fixed clock on rk35xx, so using sdhci_pltfm_clk_get_max_clock is not appropriate here. Implement rk35xx_get_max_clock that returns actual max clock for cclk_emmc. Signed-off-by: Vasily Khoruzhick Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230310010349.509132-1-anarsoul@gmail.com Signed-off-by: Ulf Hansson commit 07248afa83b0b31d7906201cf0348800d0552d99 Author: Wolfram Sang Date: Tue Mar 7 17:30:36 2023 +0100 mmc: renesas_sdhi: remove R-Car H3 ES1.* handling R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20230307163041.3815-9-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 63264422785021704c39b38f65a78ab9e4a186d7 Author: Zheng Wang Date: Wed Mar 8 00:43:38 2023 +0800 memstick: r592: Fix UAF bug in r592_remove due to race condition In r592_probe, dev->detect_timer was bound with r592_detect_timer. In r592_irq function, the timer function will be invoked by mod_timer. If we remove the module which will call hantro_release to make cleanup, there may be a unfinished work. The possible sequence is as follows, which will cause a typical UAF bug. Fix it by canceling the work before cleanup in r592_remove. CPU0 CPU1 |r592_detect_timer r592_remove | memstick_free_host| put_device; | kfree(host); | | | queue_work | &host->media_checker //use Signed-off-by: Zheng Wang Link: https://lore.kernel.org/r/20230307164338.1246287-1-zyytlz.wz@163.com Signed-off-by: Ulf Hansson commit 4b4b7ac73704bfa796d2be6b96cb9072f7298861 Author: Heiner Kallweit Date: Mon Feb 27 22:02:23 2023 +0100 mmc: core: Allow invalid regulator in mmc_regulator_set_ocr() Basically all host drivers use code like this: if (!IS_ERR(mmc->supply.vmmc)) mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0) Move the IS_ERR() check to mmc_regulator_set_ocr() to simplify host driver code. Suggested-by: Ulf Hansson Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/0c1e7440-f4bc-b48a-137f-58b75ac98550@gmail.com Signed-off-by: Ulf Hansson commit 4453d51e1814a8b7c2e686e50241d7b28088622e Author: Swati Agarwal Date: Thu Feb 23 19:44:02 2023 +0530 mmc: sdhci-of-arasan: Add support to request the "gate" clock Add support to read the optional "gate" clock property and request the clock which will be used to ungate the DLL clock. For Xilinx platforms which has DLL module, dll clock must be ungated/enabled when SD controller operates at higher frequencies like 50 MHz, 100 MHz and 200 MHz. This will be done by explicitly requesting gate clock from the driver. Signed-off-by: Swati Agarwal Acked-by: Michal Simek Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230223141402.23979-1-swati.agarwal@amd.com Signed-off-by: Ulf Hansson commit aa4d540b4150052ae3b36d286b9c833a961ce291 Author: Gustavo A. R. Silva Date: Tue Mar 21 17:47:03 2023 -0600 RDMA/core: Fix multiple -Warray-bounds warnings GCC-13 (and Clang)[1] does not like to access a partially allocated object, since it cannot reason about it for bounds checking. In this case 140 bytes are allocated for an object of type struct ib_umad_packet: packet = kzalloc(sizeof(*packet) + IB_MGMT_RMPP_HDR, GFP_KERNEL); However, notice that sizeof(*packet) is only 104 bytes: struct ib_umad_packet { struct ib_mad_send_buf * msg; /* 0 8 */ struct ib_mad_recv_wc * recv_wc; /* 8 8 */ struct list_head list; /* 16 16 */ int length; /* 32 4 */ /* XXX 4 bytes hole, try to pack */ struct ib_user_mad mad __attribute__((__aligned__(8))); /* 40 64 */ /* size: 104, cachelines: 2, members: 5 */ /* sum members: 100, holes: 1, sum holes: 4 */ /* forced alignments: 1, forced holes: 1, sum forced holes: 4 */ /* last cacheline: 40 bytes */ } __attribute__((__aligned__(8))); and 36 bytes extra bytes are allocated for a flexible-array member in struct ib_user_mad: include/rdma/ib_mad.h: 120 enum { ... 123 IB_MGMT_RMPP_HDR = 36, ... } struct ib_user_mad { struct ib_user_mad_hdr hdr; /* 0 64 */ /* --- cacheline 1 boundary (64 bytes) --- */ __u64 data[] __attribute__((__aligned__(8))); /* 64 0 */ /* size: 64, cachelines: 1, members: 2 */ /* forced alignments: 1 */ } __attribute__((__aligned__(8))); So we have sizeof(*packet) + IB_MGMT_RMPP_HDR == 140 bytes Then the address of the flex-array member (for which only 36 bytes were allocated) is casted and copied into a pointer to struct ib_rmpp_mad, which, in turn, is of size 256 bytes: rmpp_mad = (struct ib_rmpp_mad *) packet->mad.data; struct ib_rmpp_mad { struct ib_mad_hdr mad_hdr; /* 0 24 */ struct ib_rmpp_hdr rmpp_hdr; /* 24 12 */ u8 data[220]; /* 36 220 */ /* size: 256, cachelines: 4, members: 3 */ }; The thing is that those 36 bytes allocated for flex-array member data in struct ib_user_mad onlly account for the size of both struct ib_mad_hdr and struct ib_rmpp_hdr, but nothing is left for array u8 data[220]. So, the compiler is legitimately complaining about accessing an object for which not enough memory was allocated. Apparently, the only members of struct ib_rmpp_mad that are relevant (that are actually being used) in function ib_umad_write() are mad_hdr and rmpp_hdr. So, instead of casting packet->mad.data to (struct ib_rmpp_mad *) create a new structure struct ib_rmpp_mad_hdr { struct ib_mad_hdr mad_hdr; struct ib_rmpp_hdr rmpp_hdr; } __packed; and cast packet->mad.data to (struct ib_rmpp_mad_hdr *). Notice that IB_MGMT_RMPP_HDR == sizeof(struct ib_rmpp_mad_hdr) == 36 bytes Refactor the rest of the code, accordingly. Fix the following warnings seen under GCC-13 and -Warray-bounds: drivers/infiniband/core/user_mad.c:564:50: warning: array subscript ‘struct ib_rmpp_mad[0]’ is partly outside array bounds of ‘unsigned char[140]’ [-Warray-bounds=] drivers/infiniband/core/user_mad.c:566:42: warning: array subscript ‘struct ib_rmpp_mad[0]’ is partly outside array bounds of ‘unsigned char[140]’ [-Warray-bounds=] drivers/infiniband/core/user_mad.c:618:25: warning: array subscript ‘struct ib_rmpp_mad[0]’ is partly outside array bounds of ‘unsigned char[140]’ [-Warray-bounds=] drivers/infiniband/core/user_mad.c:622:44: warning: array subscript ‘struct ib_rmpp_mad[0]’ is partly outside array bounds of ‘unsigned char[140]’ [-Warray-bounds=] Link: https://github.com/KSPP/linux/issues/273 Link: https://godbolt.org/z/oYWaGM4Yb [1] Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/ZBpB91qQcB10m3Fw@work Signed-off-by: Leon Romanovsky commit d31d7300ebc0c43021ec48c0e6a3a427386f4617 Author: Dhruva Gole Date: Thu Mar 23 14:29:04 2023 +0530 rtc: k3: handle errors while enabling wake irq Due to the potential failure of enable_irq_wake(), it would be better to return error if it fails. Fixes: b09d633575e5 ("rtc: Introduce ti-k3-rtc") Cc: Nishanth Menon Signed-off-by: Dhruva Gole Link: https://lore.kernel.org/r/20230323085904.957999-1-d-gole@ti.com Signed-off-by: Alexandre Belloni commit 901cdf66e86a9db8443abe3d5c6028975be175df Author: AngeloGioacchino Del Regno Date: Thu Mar 16 11:20:41 2023 +0100 drm/panfrost: Add support for Mali on the MT8186 SoC MediaTek MT8186 has a Mali-G52 MC2 2EE (Bifrost): add a new compatible and platform data using the same supplies list as "mt8183_b" (only one regulator), and a new pm_domains list with only two power domains. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-13-angelogioacchino.delregno@collabora.com commit ab1a072c05a8f4f2ce3292140b30ea0b64ad260c Author: AngeloGioacchino Del Regno Date: Thu Mar 16 11:20:40 2023 +0100 drm/panfrost: Add new compatible for Mali on the MT8183 SoC The "mediatek,mt8183-mali" compatible uses platform data that calls for getting (and managing) two regulators ("mali" and "sram") but devfreq does not support this usecase, resulting in DVFS not working. Since a lot of MediaTek SoCs need to set the voltages for the GPU SRAM regulator in a specific relation to the GPU VCORE regulator, a MediaTek SoC specific driver was introduced to automatically satisfy, through coupling, these constraints: this means that there is at all no need to manage both regulators in panfrost but to otherwise just manage the main "mali" (-> gpu vcore) regulator instead. Keeping in mind that we cannot break the ABI, the most sensible route (avoiding hacks and uselessly overcomplicated code) to get a MT8183 node with one power supply was to add a new "mediatek,mt8183b-mali" compatible, which effectively deprecates the former. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-12-angelogioacchino.delregno@collabora.com commit 4c6811800cb48b5a0329f6e4de11d26000671553 Author: Alyssa Rosenzweig Date: Thu Mar 16 11:20:39 2023 +0100 drm/panfrost: Add mediatek,mt8192-mali compatible Required for Mali-G57 on the Mediatek MT8192 and MT8195, which uses even more power domains than the MT8183 before it. Signed-off-by: Alyssa Rosenzweig [Angelo: Removed unneeded "sram" supply, added mt8195 to commit description] Co-developed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-11-angelogioacchino.delregno@collabora.com commit 6ba1fd698620dcc328f897aa4d3c3bb8f7543e00 Author: Alyssa Rosenzweig Date: Thu Mar 16 11:20:38 2023 +0100 drm/panfrost: Add the MT8192 GPU ID MediaTek MT8192 has a Mali-G57 with a special GPU ID. Add its GPU ID, but treat it as otherwise identical to a standard Mali-G57. We do _not_ fix up the GPU ID here -- userspace needs to be aware of the special GPU ID, in case we find functional differences between MediaTek's implementation and the standard Mali-G57 down the line. Signed-off-by: Alyssa Rosenzweig Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-10-angelogioacchino.delregno@collabora.com commit a769a7af9d0df53d638fedc87332ca0aec80267b Author: Alyssa Rosenzweig Date: Thu Mar 16 11:20:37 2023 +0100 drm/panfrost: Increase MAX_PM_DOMAINS to 5 Increase the MAX_PM_DOMAINS constant from 3 to 5, to support the extra power domains required by the Mali-G57 on the MT8192. Signed-off-by: Alyssa Rosenzweig Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-9-angelogioacchino.delregno@collabora.com commit 2ade28304d91963862c434cd954d5da84534d851 Author: AngeloGioacchino Del Regno Date: Thu Mar 16 11:20:36 2023 +0100 dt-bindings: gpu: mali-bifrost: Add compatible for MT8195 SoC The MediaTek MT8195 SoC has a Mali G57 MC5 (Valhall-JM) and has the same number of power domains and requirements as MT8192 in terms of bindings. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-8-angelogioacchino.delregno@collabora.com commit 0b2cf514029986f741c4c4b80b28e402361dac70 Author: AngeloGioacchino Del Regno Date: Thu Mar 16 11:20:35 2023 +0100 dt-bindings: gpu: mali-bifrost: Add support for MediaTek MT8186 MT8186 has a Mali-G52 MC2 2EE GPU (two cores): add a binding with two power domains (one per core) for it. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Reviewed-by: Rob Herring Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-7-angelogioacchino.delregno@collabora.com commit 1f03cb1b0c5558f3523b4003550fc89fe4dc5c6e Author: AngeloGioacchino Del Regno Date: Thu Mar 16 11:20:34 2023 +0100 dt-bindings: gpu: mali-bifrost: Add new MT8183 compatible Since new platform data was required in Panfrost for getting GPU DVFS finally working on MediaTek SoCs, add a new "mediatek,mt8183b-mali" compatible. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-6-angelogioacchino.delregno@collabora.com commit 13a8fc8ae951ab746d5fd36254f9b1d6e938b15e Author: AngeloGioacchino Del Regno Date: Thu Mar 16 11:20:33 2023 +0100 dt-bindings: gpu: mali-bifrost: Add sub-schema for MT8192's power domains MediaTek MT8192 (and similar) needs five power domains for the Mali GPU and no sram-supply: change the binding to allow so by also introducing power-domain-names in the generic binding; while at it, also disallow the newly introduced power-domain-names for all non-MediaTek bindings. Fixes: 5d82e74a97c2 ("dt-bindings: Add compatible for Mali Valhall (JM)") Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-5-angelogioacchino.delregno@collabora.com commit aeb737902d863834ca3f7adb928520a8c70add84 Author: AngeloGioacchino Del Regno Date: Thu Mar 16 11:20:32 2023 +0100 dt-bindings: gpu: mali-bifrost: Fix power-domain-names validation Commit ("dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183") incorrectly introduced power domain names for MT8183, causing validation issues. Add power-domain-names to the base schema, allowing a maximum of five elements; since platforms having a single power domain don't need any actual domain name, disallow that for each sub-schema. Fixes: a7a596cd3115 ("dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183") Signed-off-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Reviewed-by: Rob Herring Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-4-angelogioacchino.delregno@collabora.com commit eccda2744f0ffb0d5050c83c5ee415fadcd3670c Author: AngeloGioacchino Del Regno Date: Thu Mar 16 11:20:31 2023 +0100 dt-bindings: gpu: mali-bifrost: Set power-domains maxItems to 5 In preparation for adding (and fixing) power-domain-names and MediaTek MT8192 bindings, allow up to five items for power-domains. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Reviewed-by: Rob Herring Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-3-angelogioacchino.delregno@collabora.com commit e82b84538ad8dddce4058a89aa3383d54f7935f8 Author: AngeloGioacchino Del Regno Date: Thu Mar 16 11:20:30 2023 +0100 dt-bindings: gpu: mali-bifrost: Split out MediaTek power-domains variation In preparation for adding new bindings for new MediaTek SoCs, split out the power-domains variation from the `else` in the current mediatek,mt8183-mali conditional. The sram-supply part is left in place to be disallowed for anything that is not compatible with "mediatek,mt8183-mali" as this regulator is MediaTek-specific and it is, and will ever be, used only for this specific string due to the addition of the mediatek-regulator-coupler driver. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Reviewed-by: Rob Herring Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20230316102041.210269-2-angelogioacchino.delregno@collabora.com commit c2bd1e18c6f85c0027da2e5e7753b9bfd9f8e6dc Author: Randy Dunlap Date: Sun Mar 5 20:00:37 2023 -0800 sh: mcount.S: fix build error when PRINTK is not enabled Fix a build error in mcount.S when CONFIG_PRINTK is not enabled. Fixes this build error: sh2-linux-ld: arch/sh/lib/mcount.o: in function `stack_panic': (.text+0xec): undefined reference to `dump_stack' Fixes: e460ab27b6c3 ("sh: Fix up stack overflow check with ftrace disabled.") Signed-off-by: Randy Dunlap Cc: John Paul Adrian Glaubitz Cc: Yoshinori Sato Cc: Rich Felker Suggested-by: Geert Uytterhoeven Cc: stable@vger.kernel.org Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20230306040037.20350-8-rdunlap@infradead.org Signed-off-by: John Paul Adrian Glaubitz commit 644a9cf0d2a8340121fa8107a5fa6f27782bb080 Author: Randy Dunlap Date: Sun Mar 5 20:00:35 2023 -0800 sh: remove sh5/sh64 last fragments A previous patch removed most of the sh5 (sh64) support from the kernel tree. Now remove the last stragglers. Fixes: 37744feebc08 ("sh: remove sh5 support") Signed-off-by: Randy Dunlap Cc: Geert Uytterhoeven Cc: Arnd Bergmann Cc: Rich Felker Cc: Yoshinori Sato Cc: John Paul Adrian Glaubitz Cc: linux-sh@vger.kernel.org Acked-by: John Paul Adrian Glaubitz Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20230306040037.20350-6-rdunlap@infradead.org Signed-off-by: John Paul Adrian Glaubitz commit 58a49ad90939386a8682e842c474a0d2c00ec39c Author: Randy Dunlap Date: Sun Mar 5 20:00:34 2023 -0800 sh: math-emu: fix macro redefined warning Fix a warning that was reported by the kernel test robot: In file included from ../include/math-emu/soft-fp.h:27, from ../arch/sh/math-emu/math.c:22: ../arch/sh/include/asm/sfp-machine.h:17: warning: "__BYTE_ORDER" redefined 17 | #define __BYTE_ORDER __BIG_ENDIAN In file included from ../arch/sh/math-emu/math.c:21: ../arch/sh/math-emu/sfp-util.h:71: note: this is the location of the previous definition 71 | #define __BYTE_ORDER __LITTLE_ENDIAN Fixes: b929926f01f2 ("sh: define __BIG_ENDIAN for math-emu") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Link: lore.kernel.org/r/202111121827.6v6SXtVv-lkp@intel.com Cc: John Paul Adrian Glaubitz Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Reviewed-by: Geert Uytterhoeven Cc: stable@vger.kernel.org Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20230306040037.20350-5-rdunlap@infradead.org Signed-off-by: John Paul Adrian Glaubitz commit 6cba655543c7959f8a6d2979b9d40a6a66b7ed4f Author: Randy Dunlap Date: Sun Mar 5 20:00:33 2023 -0800 sh: init: use OF_EARLY_FLATTREE for early init When CONFIG_OF_EARLY_FLATTREE and CONFIG_SH_DEVICE_TREE are not set, SH3 build fails with a call to early_init_dt_scan(), so in arch/sh/kernel/setup.c and arch/sh/kernel/head_32.S, use CONFIG_OF_EARLY_FLATTREE instead of CONFIG_OF_FLATTREE. Fixes this build error: ../arch/sh/kernel/setup.c: In function 'sh_fdt_init': ../arch/sh/kernel/setup.c:262:26: error: implicit declaration of function 'early_init_dt_scan' [-Werror=implicit-function-declaration] 262 | if (!dt_virt || !early_init_dt_scan(dt_virt)) { Fixes: 03767daa1387 ("sh: fix build regression with CONFIG_OF && !CONFIG_OF_FLATTREE") Fixes: eb6b6930a70f ("sh: fix memory corruption of unflattened device tree") Signed-off-by: Randy Dunlap Suggested-by: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org Cc: Rich Felker Cc: Yoshinori Sato Cc: Geert Uytterhoeven Cc: John Paul Adrian Glaubitz Cc: linux-sh@vger.kernel.org Cc: stable@vger.kernel.org Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20230306040037.20350-4-rdunlap@infradead.org Signed-off-by: John Paul Adrian Glaubitz commit d1155e4132de712a9d3066e2667ceaad39a539c5 Author: Randy Dunlap Date: Sun Mar 5 20:00:32 2023 -0800 sh: nmi_debug: fix return value of __setup handler __setup() handlers should return 1 to obsolete_checksetup() in init/main.c to indicate that the boot option has been handled. A return of 0 causes the boot option/value to be listed as an Unknown kernel parameter and added to init's (limited) argument or environment strings. Also, error return codes don't mean anything to obsolete_checksetup() -- only non-zero (usually 1) or zero. So return 1 from nmi_debug_setup(). Fixes: 1e1030dccb10 ("sh: nmi_debug support.") Signed-off-by: Randy Dunlap Reported-by: Igor Zhbanov Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru Cc: John Paul Adrian Glaubitz Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Cc: stable@vger.kernel.org Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20230306040037.20350-3-rdunlap@infradead.org Signed-off-by: John Paul Adrian Glaubitz commit 68c37f917ed97e0b0e6a2be9f6be3eba39b8ea4b Author: Randy Dunlap Date: Sun Mar 5 20:00:31 2023 -0800 sh: SH2007: drop the bad URL info This URL provided is no longer functional, so drop it. Fixes: 3a598264436e ("sh: SH-2007 board support.") Signed-off-by: Randy Dunlap Cc: John Paul Adrian Glaubitz Cc: Yoshinori Sato Cc: Rich Felker Cc: Geert Uytterhoeven Cc: Hitoshi Mitake Cc: linux-sh@vger.kernel.org Reviewed-by: Geert Uytterhoeven Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20230306040037.20350-2-rdunlap@infradead.org Signed-off-by: John Paul Adrian Glaubitz commit fcb3a4653bc5fb0525d957db0cc8b413252029f8 Author: Pedro Tammela Date: Tue Mar 21 19:33:45 2023 -0300 net/sched: act_api: use the correct TCA_ACT attributes in dump 4 places in the act api code are using 'TCA_' definitions where they should be using 'TCA_ACT_', which is confusing for the reader, although functionally they are equivalent. Cc: Hangbin Liu Reviewed-by: Jamal Hadi Salim Reviewed-by: Simon Horman Signed-off-by: Pedro Tammela Acked-by: Hangbin Liu Signed-off-by: David S. Miller commit d0e43912c188149675ab8a0f52e26027e49b4f64 Merge: c5cf13fbf1c91 65364bbe0b022 Author: David S. Miller Date: Thu Mar 23 08:35:22 2023 +0000 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-03-21 (igb, igbvf, igc) This series contains updates to igb, igbvf, and igc drivers. Andrii changes igb driver to utilize diff_by_scaled_ppm() implementation over an open-coded version. Dawid adds pci_error_handlers for reset_prepare and reset_done for igbvf. Sasha removes unnecessary code in igc. ==================== Signed-off-by: David S. Miller commit c5cf13fbf1c915f7b1c41714029fd44c4d2bcefb Merge: 90bf6610a1332 6a414fd77f613 Author: David S. Miller Date: Thu Mar 23 08:32:53 2023 +0000 Merge branch 'ipv4-address-protocol' Petr Machata says: ==================== net: Allow changing IPv4 address protocol IPv4 and IPv6 addresses can be assigned a protocol value that indicates the provenance of the IP address. The attribute is modeled after ip route protocols, and essentially allows the administrator or userspace stack to tag addresses in some way that makes sense to the actor in question. When IP address protocol field was added in commit 47f0bd503210 ("net: Add new protocol attribute to IP addresses"), the semantics included the ability to change the protocol for IPv6 addresses, but not for IPv4 addresses. It seems this was not deliberate, but rather by accident. One particular use case is tagging the addresses differently depending on whether the routing stack should advertise them or not. Without support for protocol replacement, this can not be done. In this patchset, extend IPv4 to allow changing the protocol defined at an address (in patch #1). Then in patches #2 and #3 add selftest coverage for ip address protocols. Currently the kernel simply ignores the new value. Thus allowing the replacement changes the observable behavior. However, since IPv6 already behaves like this anyway, and since the feature as such is relatively new, it seems like the change is safe to make. An example session with the feature in action: bash-5.2# ip address add dev d 192.0.2.1/28 proto 0xab bash-5.2# ip address show dev d 4: d: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 06:29:74:fd:1f:eb brd ff:ff:ff:ff:ff:ff inet 192.0.2.1/28 scope global proto 0xab d valid_lft forever preferred_lft forever bash-5.2# ip address replace dev d 192.0.2.1/28 proto 0x11 bash-5.2# ip address show dev d 4: d: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 06:29:74:fd:1f:eb brd ff:ff:ff:ff:ff:ff inet 192.0.2.1/28 scope global proto 0x11 d valid_lft forever preferred_lft forever ==================== Signed-off-by: David S. Miller commit 6a414fd77f613e374f2f1accb36beca90bab084d Author: Petr Machata Date: Tue Mar 21 12:52:01 2023 +0100 selftests: rtnetlink: Add an address proto test Add coverage of "ip address {add,replace} ... proto" support. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit ecb3c1e675c719885ac05bb5473fa5c495d1ad24 Author: Petr Machata Date: Tue Mar 21 12:52:00 2023 +0100 selftests: rtnetlink: Make the set of tests to run configurable Extract the list of all tests into a variable, ALL_TESTS. Then assume the environment variable TESTS holds the list of tests to actually run, falling back to ALL_TESTS if TESTS is empty. This is the same interface that forwarding selftests use to make the set of tests to run configurable. In addition to this, allow setting the value explicitly through a command line option "-t" along the lines of what fib_nexthops.sh does. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 5c4a9aa856c706def9239d1e43c4ea9fccb5c75a Author: Petr Machata Date: Tue Mar 21 12:51:59 2023 +0100 net: ipv4: Allow changing IPv4 address protocol When IP address protocol field was added in commit 47f0bd503210 ("net: Add new protocol attribute to IP addresses"), the semantics included the ability to change the protocol for IPv6 addresses, but not for IPv4 addresses. It seems this was not deliberate, but rather by accident. A userspace that wants to change the protocol of an address might drop and recreate the address, but that disrupts routing and is just impractical. So in this patch, when an IPv4 address is replaced (through RTM_NEWADDR request with NLM_F_REPLACE flag), update the proto at the address to the one given in the request, or zero if none is given. This matches the behavior of IPv6. Previously, any new value given was simply ignored. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit e0e8fbf84628f3aa80a01ba28db7921224f5d7b9 Author: Rob Herring Date: Fri Mar 10 08:47:20 2023 -0600 pinctrl: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Reviewed-by: Geert Uytterhoeven Reviewed-by: Jernej Skrabec Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230310144721.1544669-1-robh@kernel.org [Dropped hunk hitting drivers/pinctrl/renesas/pinctrl.c] Signed-off-by: Linus Walleij commit 602fb420572e5f0011b6fe71bead02e558143d96 Merge: 6dddd93938b36 f4244e55e4c3a Author: Leon Romanovsky Date: Thu Mar 23 10:22:32 2023 +0200 Enable IB out-of-order by default in mlx5 This series from Or changes default of IB out-of-order feature and allows to the RDMA users to decide if they need to wait for completion for all segments or it is enough to wait for last segment completion only. Thanks Signed-off-by: Leon Romanovsky commit f4244e55e4c3a14374ea319b680f33d97cf6ba7e Author: Or Har-Toov Date: Sun Mar 19 14:59:32 2023 +0200 net/mlx5: Set out of order (ooo) by default When FW supports ooo by default, enable the cap. Signed-off-by: Or Har-Toov Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/00bd14bfb002ed2338de3296bcd9af27d4770b70.1679230449.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 742948cc02d5230ef81546556502a05a90f89bbb Author: Or Har-Toov Date: Sun Mar 19 14:59:31 2023 +0200 RDMA/mlx5: Disable out-of-order in integrity enabled QPs Set retry_mode to GO_BACK_N when qp is created with INTEGRITY_EN flag because out-of-order is not supported when doing HW offload of signature operations. Signed-off-by: Or Har-Toov Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/362de42cdc7a541afa5b1fd0ec6ae706061764a2.1679230449.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 6e2a3a324aab9d76e6b864eb6ebc60b197b5141a Author: Or Har-Toov Date: Sun Mar 19 14:59:30 2023 +0200 net/mlx5: Expose bits for enabling out-of-order by default Add needed HW bits for enabling out-of-order by default and use go_back_n when out-of-order is not needed. Signed-off-by: Or Har-Toov Signed-off-by: Leon Romanovsky Link: https://lore.kernel.org/r/75d6dfe263989a05c08c43406132b336ea12d00a.1679230449.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 883631771038d1b0c10c0929e31bbd5ffb5e682c Author: Suraj Kandpal Date: Thu Mar 16 14:59:27 2023 +0530 drm/i915/mtl: Add HDCP GSC interface MTL uses GSC command streamer i.e gsc cs to send HDCP/PXP commands to GSC f/w. It requires to keep hdcp display driver agnostic to content protection f/w (ME/GSC fw) in the form of i915_hdcp_fw_ops generic ops. Adding HDCP GSC CS interface by leveraging the i915_hdcp_fw_ops generic ops instead of I915_HDCP_COMPONENT as integral part of i915. Adding checks to see if GSC is loaded and proxy is setup --v6 -dont change the license date in same patch series [Jani] -fix the license year {Jani] --v8 -remove stale comment [Ankit] -get headers in alphabetical order [Ankit] -fix hdcp2_supported check [Ankit] --v9 -remove return statement from hdcp_gsc_fini [Ankit] Cc: Tomas Winkler Cc: Rodrigo Vivi Cc: Uma Shankar Cc: Ankit Nautiyal Signed-off-by: Anshuman Gupta Signed-off-by: Suraj Kandpal Reviewed-by: Ankit Nautiyal Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20230316092927.668980-7-suraj.kandpal@intel.com commit 18fd7f8aaedfd40e19ed8228db856326afbd9aa4 Author: Suraj Kandpal Date: Thu Mar 16 14:59:26 2023 +0530 drm/i915/mtl: Add function to send command to GSC CS Add function that takes care of sending command to gsc cs. We start of with allocation of memory for our command intel_hdcp_gsc_message that contains gsc cs memory header as directed in specs followed by the actual payload hdcp message that we want to send. Spec states that we need to poll pending bit of response header around 20 times each try being 50ms apart hence adding that to current gsc_msg_send function Also we use the same function to take care of both sending and receiving hence no separate function to get the response. --v4 -Create common function to fill in gsc_mtl_header [Alan] -define host session bitmask [Alan] --v5 -use i915 directly instead of gt->i915 [Alan] -No need to make fields NULL as we are already using kzalloc [Alan] --v8 -change mechanism to reuse the same memory for one hdcp session[Alan] -fix header ordering -add comments to explain flags and host session mask [Alan] --v9 -remove gem obj from hdcp message as we can use i915_vma_unpin_and_release [Alan] -move hdcp message allocation and deallocation from hdcp2_enable and hdcp2_disable to init and teardown of HDCP [Alan] --v10 -remove unnecessary i915_vma_unpin [Alan] --v11 -fix comment style [Uma] Cc: Ankit Nautiyal Cc: Daniele Ceraolo Spurio Cc: Alan Pervin Teres Cc: Uma Shankar Cc: Anshuman Gupta Signed-off-by: Suraj Kandpal Reviewed-by: Alan Previn Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20230316092927.668980-6-suraj.kandpal@intel.com commit 33898377feb8ecf45fa29965bd1618e0997f76aa Author: Suraj Kandpal Date: Thu Mar 16 14:59:25 2023 +0530 drm/i915/hdcp: Refactor HDCP API structures It requires to move intel specific HDCP API structures to i915_hdcp_interface.h from driver/misc/mei/hdcp/mei_hdcp.h so that any content protection fw interfaces can use these structures. Cc: Tomas Winkler Cc: Rodrigo Vivi Cc: Uma Shankar Cc: Ankit Nautiyal Signed-off-by: Anshuman Gupta Signed-off-by: Suraj Kandpal Reviewed-by: Ankit Nautiyal Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20230316092927.668980-5-suraj.kandpal@intel.com commit f210d8d28aa39fc670e7d80040ab1561abd77883 Author: Suraj Kandpal Date: Thu Mar 16 14:59:24 2023 +0530 drm/i915/hdcp: HDCP2.x Refactoring to agnostic hdcp There are more than 1 type of content protection security firmware. Make the name generic %s/_mei_/_ --v3 -Changing names to drop cp_fw to make naming more agnostic[Jani] --v4 -remove header reference in intel_display_core.h [Uma] -fix commit message and prefix drm [Uma] Cc: Tomas Winkler Cc: Rodrigo Vivi Cc: Uma Shankar Cc: Ankit Nautiyal Signed-off-by: Anshuman Gupta Signed-off-by: Suraj Kandpal Reviewed-by: Ankit Nautiyal Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20230316092927.668980-4-suraj.kandpal@intel.com commit 4f73dc7a079e15379bea0a70945ba1a7e5c16657 Author: Anshuman Gupta Date: Thu Mar 16 14:59:23 2023 +0530 drm/i915/hdcp: Use generic names for HDCP helpers and structs pre MTL we interact with mei interface to talk to firmware and enable CP but going forward we will talk to gsc cs because of which we are making all names for HDCP helpers and structures generic as either mei or gsc cs maybe used. Change the include/drm/i915_mei_hdcp_interface.h to include/drm/i915_hdcp_interface.h Change the i915_hdcp_interface.h header naming convention to suit generic f/w type. %s/MEI_/HDCP_ %s/mei_dev/hdcp_dev Change structure name Accordingly. %s/i915_hdcp_comp_master/i915_hdcp_master %s/i915_hdcp_component_ops/i915_hdcp_ops --v6 -make each patch build individually [Jani] --v8 -change ME FW to ME/GSC FW [Ankit] -fix formatting issue [Ankit] --v9 -fix commit message and header [Uma] --v10 -rename comp variable [Uma] Cc: Tomas Winkler Cc: Rodrigo Vivi Cc: Uma Shankar Cc: Ankit Nautiyal Signed-off-by: Anshuman Gupta Signed-off-by: Suraj Kandpal Reviewed-by: Ankit Nautiyal Reviewed-by: Uma Shankar Acked-by: Tomas Winkler Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20230316092927.668980-3-suraj.kandpal@intel.com commit 459b26061a67e63e5aa24c6f2ad0546943357e43 Author: Suraj Kandpal Date: Thu Mar 16 14:59:22 2023 +0530 drm/i915/gsc: Create GSC request submission mechanism HDCP and PXP will require a common function to allow it to submit commands to the gsc cs. Also adding the gsc mtl header that needs to be added on to the existing payloads of HDCP and PXP. --v4 -Seprate gsc load and heci cmd submission into different functions in different files for better scalability [Alan] -Rename gsc address field [Alan] --v5 -remove extra line is intel_gsc_fw.h [Uma] Cc: Daniele Ceraolo Spurio Cc: Alan Previn Signed-off-by: Suraj Kandpal Reviewed-by: Alan Previn Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20230316092927.668980-2-suraj.kandpal@intel.com commit 226bc6ae6405c46a6e9865835c36a1d45fc0b3bf Merge: b63cbc490e18d 06da9f3bd6418 Author: Martin KaFai Lau Date: Wed Mar 22 22:49:40 2023 -0700 Merge branch 'Transit between BPF TCP congestion controls.' Kui-Feng Lee says: ==================== Major changes: - Create bpf_links in the kernel for BPF struct_ops to register and unregister it. - Enables switching between implementations of bpf-tcp-cc under a name instantly by replacing the backing struct_ops map of a bpf_link. Previously, BPF struct_ops didn't go off, as even when the user program creating it was terminated, none of these ever were pinned. For instance, the TCP congestion control subsystem indirectly maintains a reference count on the struct_ops of any registered BPF implemented algorithm. Thus, the algorithm won't be deactivated until someone deliberately unregisters it. For compatibility with other BPF programs, bpf_links have been created to work in coordination with struct_ops maps. This ensures that the registration and unregistration of these respective maps is carried out at the start and end of the bpf_link. We also faced complications when attempting to replace an existing TCP congestion control algorithm with a new implementation on the fly. A struct_ops map was used to register a TCP congestion control algorithm with a unique name. We had to either register the alternative implementation with a new name and move over or unregister the current one before being able to reregistration with the same name. To fix this problem, we can an option to migrate the registration of the algorithm from struct_ops maps to bpf_links. By modifying the backing map of a bpf_link, it suddenly becomes possible to replace an existing TCP congestion control algorithm with ease. --- The major differences from v11: - Fix incorrectly setting both old_prog_fd and old_map_fd. The major differences from v10: - Add old_map_fd as an additional field instead of an union in bpf_link_update_opts. The major differences from v9: - Add test case for BPF_F_LINK. Includes adding old_map_fd to struct bpf_link_update_opts in patch 6. - Return -EPERM instead of -EINVAL when the old map fd doesn't match with BPF_F_LINK. - Fix -EBUSY case in bpf_map__attach_struct_ops(). The major differences form v8: - Check bpf_struct_ops::{validate,update} in bpf_struct_ops_map_alloc() The major differences from v7: - Use synchronize_rcu_mult(call_rcu, call_rcu_tasks) to replace synchronize_rcu() and synchronize_rcu_tasks(). - Call synchronize_rcu() in tcp_update_congestion_control(). - Handle -EBUSY in bpf_map__attach_struct_ops() to allow a struct_ops can be used to create links more than once. Include a test case. - Add old_map_fd to bpf_attr and handle BPF_F_REPLACE in bpf_struct_ops_map_link_update(). - Remove changes in bpf_dummy_struct_ops.c and add a check of .update function pointer of bpf_struct_ops. The major differences from v6: - Reword commit logs of the patch 1, 2, and 8. - Call synchronize_rcu_tasks() as well in bpf_struct_ops_map_free(). - Refactor bpf_struct_ops_map_free() so that bpf_struct_ops_map_alloc() can free a struct_ops without waiting for a RCU grace period. The major differences from v5: - Add a new step to bpf_object__load() to prepare vdata. - Accept BPF_F_REPLACE. - Check section IDs in find_struct_ops_map_by_offset() - Add a test case to check mixing w/ and w/o link struct_ops. - Add a test case of using struct_ops w/o link to update a link. - Improve bpf_link__detach_struct_ops() to handle the w/ link case. The major differences from v4: - Rebase. - Reorder patches and merge part 4 to part 2 of the v4. The major differences from v3: - Remove bpf_struct_ops_map_free_rcu(), and use synchronize_rcu(). - Improve the commit log of the part 1. - Before transitioning to the READY state, we conduct a value check to ensure that struct_ops can be successfully utilized and links created later. The major differences from v2: - Simplify states - Remove TOBEUNREG. - Rename UNREG to READY. - Stop using the refcnt of the kvalue of a struct_ops. Explicitly increase and decrease the refcount of struct_ops. - Prepare kernel vdata during the load phase of libbpf. The major differences from v1: - Added bpf_struct_ops_link to replace the previous union-based approach. - Added UNREG and TOBEUNREG to the state of bpf_struct_ops_map. - bpf_struct_ops_transit_state() maintains state transitions. - Fixed synchronization issue. - Prepare kernel vdata of struct_ops during the loading phase of bpf_object. - Merged previous patch 3 to patch 1. v11: https://lore.kernel.org/all/20230323010409.2265383-1-kuifeng@meta.com/ v10: https://lore.kernel.org/all/20230321232813.3376064-1-kuifeng@meta.com/ v9: https://lore.kernel.org/all/20230320195644.1953096-1-kuifeng@meta.com/ v8: https://lore.kernel.org/all/20230318053144.1180301-1-kuifeng@meta.com/ v7: https://lore.kernel.org/all/20230316023641.2092778-1-kuifeng@meta.com/ v6: https://lore.kernel.org/all/20230310043812.3087672-1-kuifeng@meta.com/ v5: https://lore.kernel.org/all/20230308005050.255859-1-kuifeng@meta.com/ v4: https://lore.kernel.org/all/20230307232913.576893-1-andrii@kernel.org/ v3: https://lore.kernel.org/all/20230303012122.852654-1-kuifeng@meta.com/ v2: https://lore.kernel.org/bpf/20230223011238.12313-1-kuifeng@meta.com/ v1: https://lore.kernel.org/bpf/20230214221718.503964-1-kuifeng@meta.com/ ==================== Signed-off-by: Martin KaFai Lau commit 06da9f3bd6418e06719f15340202996f7a4c258d Author: Kui-Feng Lee Date: Wed Mar 22 20:24:05 2023 -0700 selftests/bpf: Test switching TCP Congestion Control algorithms. Create a pair of sockets that utilize the congestion control algorithm under a particular name. Then switch up this congestion control algorithm to another implementation and check whether newly created connections using the same cc name now run the new implementation. Also, try to update a link with a struct_ops that is without BPF_F_LINK or with a wrong or different name. These cases should fail due to the violation of assumptions. To update a bpf_link of a struct_ops, it must be replaced with another struct_ops that is identical in type and name and has the BPF_F_LINK flag. The other test case is to create links from the same struct_ops more than once. It makes sure a struct_ops can be used repeatly. Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20230323032405.3735486-9-kuifeng@meta.com Signed-off-by: Martin KaFai Lau commit 809a69d61899f6b79a8e9de474cd93249580fdaf Author: Kui-Feng Lee Date: Wed Mar 22 20:24:04 2023 -0700 libbpf: Use .struct_ops.link section to indicate a struct_ops with a link. Flags a struct_ops is to back a bpf_link by putting it to the ".struct_ops.link" section. Once it is flagged, the created struct_ops can be used to create a bpf_link or update a bpf_link that has been backed by another struct_ops. Signed-off-by: Kui-Feng Lee Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230323032405.3735486-8-kuifeng@meta.com Signed-off-by: Martin KaFai Lau commit 912dd4b0c2a50a839301520badb241f36664ae07 Author: Kui-Feng Lee Date: Wed Mar 22 20:24:03 2023 -0700 libbpf: Update a bpf_link with another struct_ops. Introduce bpf_link__update_map(), which allows to atomically update underlying struct_ops implementation for given struct_ops BPF link. Also add old_map_fd to struct bpf_link_update_opts to handle BPF_F_REPLACE feature. Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20230323032405.3735486-7-kuifeng@meta.com Signed-off-by: Martin KaFai Lau commit aef56f2e918bf8fc8de25f0b36e8c2aba44116ec Author: Kui-Feng Lee Date: Wed Mar 22 20:24:02 2023 -0700 bpf: Update the struct_ops of a bpf_link. By improving the BPF_LINK_UPDATE command of bpf(), it should allow you to conveniently switch between different struct_ops on a single bpf_link. This would enable smoother transitions from one struct_ops to another. The struct_ops maps passing along with BPF_LINK_UPDATE should have the BPF_F_LINK flag. Signed-off-by: Kui-Feng Lee Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230323032405.3735486-6-kuifeng@meta.com Signed-off-by: Martin KaFai Lau commit 8d1608d70927747da9c1a8770edf7b6ee68f8ebc Author: Kui-Feng Lee Date: Wed Mar 22 20:24:01 2023 -0700 libbpf: Create a bpf_link in bpf_map__attach_struct_ops(). bpf_map__attach_struct_ops() was creating a dummy bpf_link as a placeholder, but now it is constructing an authentic one by calling bpf_link_create() if the map has the BPF_F_LINK flag. You can flag a struct_ops map with BPF_F_LINK by calling bpf_map__set_map_flags(). Signed-off-by: Kui-Feng Lee Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230323032405.3735486-5-kuifeng@meta.com Signed-off-by: Martin KaFai Lau commit 68b04864ca425d1894c96b8141d4fba1181f11cb Author: Kui-Feng Lee Date: Wed Mar 22 20:24:00 2023 -0700 bpf: Create links for BPF struct_ops maps. Make bpf_link support struct_ops. Previously, struct_ops were always used alone without any associated links. Upon updating its value, a struct_ops would be activated automatically. Yet other BPF program types required to make a bpf_link with their instances before they could become active. Now, however, you can create an inactive struct_ops, and create a link to activate it later. With bpf_links, struct_ops has a behavior similar to other BPF program types. You can pin/unpin them from their links and the struct_ops will be deactivated when its link is removed while previously need someone to delete the value for it to be deactivated. bpf_links are responsible for registering their associated struct_ops. You can only use a struct_ops that has the BPF_F_LINK flag set to create a bpf_link, while a structs without this flag behaves in the same manner as before and is registered upon updating its value. The BPF_LINK_TYPE_STRUCT_OPS serves a dual purpose. Not only is it used to craft the links for BPF struct_ops programs, but also to create links for BPF struct_ops them-self. Since the links of BPF struct_ops programs are only used to create trampolines internally, they are never seen in other contexts. Thus, they can be reused for struct_ops themself. To maintain a reference to the map supporting this link, we add bpf_struct_ops_link as an additional type. The pointer of the map is RCU and won't be necessary until later in the patchset. Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20230323032405.3735486-4-kuifeng@meta.com Signed-off-by: Martin KaFai Lau commit 8fb1a76a0f35c45a424c9eb84b0f97ffd51e6052 Author: Kui-Feng Lee Date: Wed Mar 22 20:23:59 2023 -0700 net: Update an existing TCP congestion control algorithm. This feature lets you immediately transition to another congestion control algorithm or implementation with the same name. Once a name is updated, new connections will apply this new algorithm. The purpose is to update a customized algorithm implemented in BPF struct_ops with a new version on the flight. The following is an example of using the userspace API implemented in later BPF patches. link = bpf_map__attach_struct_ops(skel->maps.ca_update_1); ....... err = bpf_link__update_map(link, skel->maps.ca_update_2); We first load and register an algorithm implemented in BPF struct_ops, then swap it out with a new one using the same name. After that, newly created connections will apply the updated algorithm, while older ones retain the previous version already applied. This patch also takes this chance to refactor the ca validation into the new tcp_validate_congestion_control() function. Cc: netdev@vger.kernel.org, Eric Dumazet Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20230323032405.3735486-3-kuifeng@meta.com Signed-off-by: Martin KaFai Lau commit b671c2067a04c0668df174ff5dfdb573d1f9b074 Author: Kui-Feng Lee Date: Wed Mar 22 20:23:58 2023 -0700 bpf: Retire the struct_ops map kvalue->refcnt. We have replaced kvalue-refcnt with synchronize_rcu() to wait for an RCU grace period. Maintenance of kvalue->refcnt was a complicated task, as we had to simultaneously keep track of two reference counts: one for the reference count of bpf_map. When the kvalue->refcnt reaches zero, we also have to reduce the reference count on bpf_map - yet these steps are not performed in an atomic manner and require us to be vigilant when managing them. By eliminating kvalue->refcnt, we can make our maintenance more straightforward as the refcount of bpf_map is now solely managed! To prevent the trampoline image of a struct_ops from being released while it is still in use, we wait for an RCU grace period. The setsockopt(TCP_CONGESTION, "...") command allows you to change your socket's congestion control algorithm and can result in releasing the old struct_ops implementation. It is fine. However, this function is exposed through bpf_setsockopt(), it may be accessed by BPF programs as well. To ensure that the trampoline image belonging to struct_op can be safely called while its method is in use, the trampoline safeguarde the BPF program with rcu_read_lock(). Doing so prevents any destruction of the associated images before returning from a trampoline and requires us to wait for an RCU grace period. Signed-off-by: Kui-Feng Lee Link: https://lore.kernel.org/r/20230323032405.3735486-2-kuifeng@meta.com Signed-off-by: Martin KaFai Lau commit 90bf6610a133288f28941deae39ddb131ffbd3ed Merge: 6e4a93bef97eb cb7550b443831 Author: Jakub Kicinski Date: Wed Mar 22 22:44:02 2023 -0700 Merge branch 'net-ipa-fully-support-ipa-v5-0' Alex Elder says: ==================== net: ipa: fully support IPA v5.0 At long last, add the IPA and GSI register definitions, and the configuration data required to support IPA v5.0. This enables IPA support for the Qualcomm SDX65 SoC. The first version of this series had build errors due to a non-existent source file being required. This version addresses that by changing how required files are specified in the Makefile. Note that the second patch has some warnings about lines starting with spaces; those spaces align text with the open parenthesis on the previous line. ==================== Link: https://lore.kernel.org/r/20230321182644.2143990-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit cb7550b44383195f8b5e9acacfb132b806875472 Author: Alex Elder Date: Tue Mar 21 13:26:44 2023 -0500 net: ipa: add IPA v5.0 configuration data Add the configuration data required for IPA v5.0, which is used in the SDX65 SoC. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit faf0678ec8a0aa9039d8b188d012206abd67dd5c Author: Alex Elder Date: Tue Mar 21 13:26:43 2023 -0500 net: ipa: add IPA v5.0 GSI register definitions Add the definitions of GSI register offsets and fields for IPA v5.0. These are used for the SDX65 SoC. Increase the maximum channel and event ring counts supported by the driver, so those implemented by the SDX65 are supported. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit ed4c7d6162895dcc9d32f1a16a42f13d67469383 Author: Alex Elder Date: Tue Mar 21 13:26:42 2023 -0500 net: ipa: add IPA v5.0 register definitions Add the definitions of IPA register offsets and fields for IPA v5.0. These are used for the SDX65 SoC. In the Makefile, split IPA_VERSIONS to use IPA_REG_VERSIONS and IPA_DATA_VERSIONS instead, to allow IPA register definitions for a new version to be added separate from the IPA data. Rename GSI_IPA_VERSIONS to be GSI_REG_VERSIONS for consistency. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 6e4a93bef97eb51bc4d46487d73f11ed2ce3188f Merge: cad052e64ae1d 50e96acbe1166 Author: Jakub Kicinski Date: Wed Mar 22 22:43:37 2023 -0700 Merge branch 'quirk-for-oem-sfp-2-5g-t-copper-module' Russell King says: ==================== Quirk for OEM SFP-2.5G-T copper module Frank Wunderlich reports that this copper module requires a quirk in order to function - in that the module needs to use 2500base-X. Moreover, negotiation must be disabled. An example of this device would be: https://www.optcore.net/product/sfp-2g-t-gen ==================== Link: https://lore.kernel.org/r/ZBniMlTDZJQ242DP@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 50e96acbe11667b6fe9d99e1348c6c224b2f11dd Author: Russell King (Oracle) Date: Tue Mar 21 16:58:51 2023 +0000 net: sfp: add quirk for 2.5G copper SFP Add a quirk for a copper SFP that identifies itself as "OEM" "SFP-2.5G-T". This module's PHY is inaccessible, and can only run at 2500base-X with the host without negotiation. Add a quirk to enable the 2500base-X interface mode with 2500base-T support, and disable autonegotiation. Reported-by: Frank Wunderlich Tested-by: Frank Wunderlich Signed-off-by: Russell King (Oracle) Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 8110633db49d7de2e4852f697322e1f3f8e61b04 Author: Russell King (Oracle) Date: Tue Mar 21 16:58:46 2023 +0000 net: sfp-bus: allow SFP quirks to override Autoneg and pause bits Allow SFP quirks to override the Autoneg, Pause and Asym_Pause bits in the support mask. Some modules have an inaccessible PHY on which is only accessible via 2500base-X without Autonegotiation. We therefore want to be able to clear the Autoneg bit. Rearrange sfp_parse_support() to allow a SFP modes quirk to override this bit. Tested-by: Frank Wunderlich Signed-off-by: Russell King (Oracle) Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit cad052e64ae1d1bc9cf0f786c3457e257abe492f Merge: b50fea1f261d2 b3be94885af45 Author: Jakub Kicinski Date: Wed Mar 22 22:43:24 2023 -0700 Merge branch 'net-remove-some-skb_mac_header-assumptions' Eric Dumazet says: ==================== net: remove some skb_mac_header assumptions Historically, we tried o maintain skb_mac_header available in most of networking paths. When reaching ndo_start_xmit() handlers, skb_mac_header() should always be skb->data. With recent additions of skb_mac_header_was_set() and DEBUG_NET_WARN_ON_ONCE() in skb_mac_header(), we can attempt to remove our reliance on skb_mac_header in TX paths. When this effort completes we will remove skb_reset_mac_header() from __dev_queue_xmit() and replace it by skb_unset_mac_header() on DEBUG_NET builds. ==================== Link: https://lore.kernel.org/r/20230321164519.1286357-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit b3be94885af458f78bf92ceeaa37722d5c74c1e6 Author: Eric Dumazet Date: Tue Mar 21 16:45:19 2023 +0000 net/sched: remove two skb_mac_header() uses tcf_mirred_act() and tcf_mpls_act() can use skb_network_offset() instead of relying on skb_mac_header(). Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit e495a9673caf7619fc234b6808814bdf5072e0a6 Author: Eric Dumazet Date: Tue Mar 21 16:45:18 2023 +0000 sch_cake: do not use skb_mac_header() in cake_overhead() We want to remove our use of skb_mac_header() in tx paths, eg remove skb_reset_mac_header() from __dev_queue_xmit(). Idea is that ndo_start_xmit() can get the mac header simply looking at skb->data. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit f5fca219ad4548bc45f0221f9857ad22cb8136a1 Author: Eric Dumazet Date: Tue Mar 21 16:45:17 2023 +0000 net: do not use skb_mac_header() in qdisc_pkt_len_init() We want to remove our use of skb_mac_header() in tx paths, eg remove skb_reset_mac_header() from __dev_queue_xmit(). Idea is that ndo_start_xmit() can get the mac header simply looking at skb->data. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit b50fea1f261d2f011e9ee28e3e30c21eb2e680d5 Merge: 1cc6571f56277 4ee9b0dcf09f4 Author: Jakub Kicinski Date: Wed Mar 22 22:43:06 2023 -0700 Merge branch 'remove-phylink_state-s-an_enabled-member' Russell King says: ==================== Remove phylink_state's an_enabled member Now that all the fixes and correctness patches have been merged, it is time to switch the two users that make use of .an_enabled to check the Autoneg bit in the advertising mask, and finally remove the .an_enabled member. The first two patches remove the last uses of .an_enabled, which are in DPAA2 and XPCS. The final patch removes the member. ==================== Link: https://lore.kernel.org/r/ZBnT6yW9UY1sAsiy@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 4ee9b0dcf09f426fbad7ed132d73ea2ba379d8ee Author: Russell King (Oracle) Date: Tue Mar 21 15:58:54 2023 +0000 net: phylink: remove an_enabled The Autoneg bit in the advertising bitmap and state->an_enabled are always identical. state->an_enabled is now no longer used by any drivers, so lets kill this duplication. Signed-off-by: Russell King (Oracle) Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 459fd2f11204c962e3153020f4f56748e0e10afb Author: Russell King (Oracle) Date: Tue Mar 21 15:58:49 2023 +0000 net: pcs: xpcs: use Autoneg bit rather than an_enabled The Autoneg bit in the advertising bitmap and state->an_enabled are always identical. Thus, we will be removing state->an_enabled. Use the Autoneg bit in the advertising bitmap to indicate whether autonegotiation should be used, rather than using the an_enabled member which will be going away. Signed-off-by: Russell King (Oracle) Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 99d0f3a1095f4c938b1665025c29411edafe8a01 Author: Russell King (Oracle) Date: Tue Mar 21 15:58:44 2023 +0000 net: dpaa2-mac: use Autoneg bit rather than an_enabled The Autoneg bit in the advertising bitmap and state->an_enabled are always identical. Thus, we will be removing state->an_enabled. Use the Autoneg bit in the advertising bitmap to indicate whether autonegotiation should be used, rather than using the an_enabled member which will be going away. This means we use the same condition as phylink_mii_c22_pcs_config(). Signed-off-by: Russell King (Oracle) Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 1cc6571f562774f1d928dc8b3cff50829b86e970 Author: Nick Child Date: Tue Mar 21 10:07:25 2023 -0500 netdev: Enforce index cap in netdev_get_tx_queue When requesting a TX queue at a given index, warn on out-of-bounds referencing if the index is greater than the allocated number of queues. Specifically, since this function is used heavily in the networking stack use DEBUG_NET_WARN_ON_ONCE to avoid executing a new branch on every packet. Signed-off-by: Nick Child Link: https://lore.kernel.org/r/20230321150725.127229-2-nnac123@linux.ibm.com Signed-off-by: Jakub Kicinski commit 5dd0dfd55baec0742ba8f5625a0dd064aca7db16 Author: Nick Child Date: Tue Mar 21 10:07:24 2023 -0500 net: Catch invalid index in XPS mapping When setting the XPS value of a TX queue, warn the user once if the index of the queue is greater than the number of allocated TX queues. Previously, this scenario went uncaught. In the best case, it resulted in unnecessary allocations. In the worst case, it resulted in out-of-bounds memory references through calls to `netdev_get_tx_queue( dev, index)`. Therefore, it is important to inform the user but not worth returning an error and risk downing the netdevice. Signed-off-by: Nick Child Reviewed-by: Piotr Raczynski Link: https://lore.kernel.org/r/20230321150725.127229-1-nnac123@linux.ibm.com Signed-off-by: Jakub Kicinski commit 5da12895dad53ffb159b7fa9f33b198a051b7b44 Merge: 603c3345589de 186016da9cca0 Author: Jakub Kicinski Date: Wed Mar 22 22:16:26 2023 -0700 Merge branch 'add-cpswxg-sgmii-support-for-j7200-and-j721e' Siddharth Vadapalli says: ==================== Add CPSWxG SGMII support for J7200 and J721E This series adds support to configure the CPSW Ethernet Switch in SGMII mode, using the am65-cpsw-nuss driver. SGMII mode is supported by the CPSWxG instances on TI's J7200 and J721E SoCs. Thus, SGMII mode is added in the list of extra_modes for the appropriate compatibles corresponding to the aforementioned SoCs. Additionally, the method of setting the supported interface via struct "phylink_config" is simplified by converting the IF/ELSE statements to SWITCH statements. ==================== Link: https://lore.kernel.org/r/20230321111958.2800005-1-s-vadapalli@ti.com Signed-off-by: Jakub Kicinski commit 186016da9cca040ae535de09ab1be67e32373443 Author: Siddharth Vadapalli Date: Tue Mar 21 16:49:58 2023 +0530 net: ethernet: ti: am65-cpsw: Enable SGMII mode for J721E TI's J721E SoC supports SGMII mode with the CPSW9G instance of the CPSW Ethernet Switch. Thus, enable it by adding SGMII mode to the extra_modes member of the "j721e_cpswxg_pdata" SoC data. Signed-off-by: Siddharth Vadapalli Signed-off-by: Jakub Kicinski commit 2e20e764f24e12cf906f6fe61d79d1bcb69d6b65 Author: Siddharth Vadapalli Date: Tue Mar 21 16:49:57 2023 +0530 net: ethernet: ti: am65-cpsw: Enable SGMII mode for J7200 TI's J7200 SoC supports SGMII mode with the CPSW5G instance of the CPSW Ethernet Switch. Thus, enable it by adding SGMII mode to the extra_modes member of the "j7200_cpswxg_pdata" SoC data. Signed-off-by: Siddharth Vadapalli Signed-off-by: Jakub Kicinski commit e0f72db37547d605d66c344c4d01a39ad4b7c4be Author: Siddharth Vadapalli Date: Tue Mar 21 16:49:56 2023 +0530 net: ethernet: ti: am65-cpsw: Add support for SGMII mode Add support for configuring the CPSW Ethernet Switch in SGMII mode. Depending on the SoC, allow selecting SGMII mode as a supported interface, based on the compatible used. Signed-off-by: Siddharth Vadapalli Signed-off-by: Jakub Kicinski commit a2935a1cd85fc76198a1980abfeb6dc9a776dcf3 Author: Siddharth Vadapalli Date: Tue Mar 21 16:49:55 2023 +0530 net: ethernet: ti: am65-cpsw: Simplify setting supported interface Convert the existing IF/ELSE statement based approach of setting the supported_interfaces member of struct "phylink_config", to SWITCH statements. This will help scale to newer PHY-MODES as well as newer compatibles. Signed-off-by: Siddharth Vadapalli Signed-off-by: Jakub Kicinski commit 603c3345589de01e26c93d3a74413af6ca1c93b9 Author: Tom Rix Date: Tue Mar 21 14:48:11 2023 -0400 liquidio: remove unused IQ_INSTR_MODE_64B function clang with W=1 reports drivers/net/ethernet/cavium/liquidio/request_manager.c:43:19: error: unused function 'IQ_INSTR_MODE_64B' [-Werror,-Wunused-function] static inline int IQ_INSTR_MODE_64B(struct octeon_device *oct, int iq_no) ^ This function and its macro wrapper are not used, so remove them. Signed-off-by: Tom Rix Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230321184811.1827306-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit e4d264e87aa28ee66bea762266a4e8ece4a73388 Merge: 3079bfdbda6cc 5a6cddb89b51d Author: Jakub Kicinski Date: Wed Mar 22 21:56:33 2023 -0700 Merge tag 'ipsec-libreswan-mlx5' of https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Leon Romanovsky says: ==================== Extend packet offload to fully support libreswan The following patches are an outcome of Raed's work to add packet offload support to libreswan [1]. The series includes: * Priority support to IPsec policies * Statistics per-SA (visible through "ip -s xfrm state ..." command) * Support to IKE policy holes * Fine tuning to acquire logic. [1] https://github.com/libreswan/libreswan/pull/986 Link: https://lore.kernel.org/all/cover.1678714336.git.leon@kernel.org * tag 'ipsec-libreswan-mlx5' of https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: net/mlx5e: Update IPsec per SA packets/bytes count net/mlx5e: Use one rule to count all IPsec Tx offloaded traffic net/mlx5e: Support IPsec acquire default SA net/mlx5e: Allow policies with reqid 0, to support IKE policy holes xfrm: copy_to_user_state fetch offloaded SA packets/bytes statistics xfrm: add new device offload acquire flag net/mlx5e: Use chains for IPsec policy priority offload net/mlx5: fs_core: Allow ignore_flow_level on TX dest net/mlx5: fs_chains: Refactor to detach chains from tc usage ==================== Link: https://lore.kernel.org/r/20230320094722.1009304-1-leon@kernel.org Signed-off-by: Jakub Kicinski commit 3079bfdbda6cc776b4fba4556258966753a6d840 Author: Rob Herring Date: Mon Mar 20 18:37:54 2023 -0500 dt-bindings: net: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Acked-by: Marc Kleine-Budde # for bindings/net/can Reviewed-by: Krzysztof Kozlowski Acked-by: Jernej Skrabec Acked-by: Florian Fainelli Reviewed-by: Steen Hegelund Signed-off-by: Rob Herring Acked-by: Nobuhiro Iwamatsu # for bindings/net/toshiba,visconti-dwmac.yaml Reviewed-by: Heiko Stuebner #rockchip Link: https://lore.kernel.org/r/20230320233758.2918972-1-robh@kernel.org Signed-off-by: Jakub Kicinski commit 5fd3b115218cfbdce84366c94156e31a7e5215e2 Merge: 22f5c234141d6 594c6c2e3ea21 Author: Jakub Kicinski Date: Wed Mar 22 21:38:07 2023 -0700 Merge branch 'net-dsa-b53-configure-6318-and-63268-rgmii-ports' Álvaro Fernández Rojas says: ==================== net: dsa: b53: configure 6318 and 63268 RGMII ports BCM6318 and BCM63268 need special configuration for their RGMII ports, so we need to be able to identify them as a special BCM63xx switch. In the meantime, let's add some missing BCM63xx SoCs to B53 MMAP device table. This should be applied after "net: dsa: b53: add support for BCM63xx RGMIIs": https://patchwork.kernel.org/project/netdevbpf/patch/20230319220805.124024-1-noltari@gmail.com/ Álvaro Fernández Rojas (4): dt-bindings: net: dsa: b53: add more 63xx SoCs net: dsa: b53: mmap: add more 63xx SoCs net: dsa: b53: mmap: allow passing a chip ID net: dsa: b53: add BCM63268 RGMII configuration .../devicetree/bindings/net/dsa/brcm,b53.yaml | 3 ++ drivers/net/dsa/b53/b53_common.c | 19 +++++++++++- drivers/net/dsa/b53/b53_mmap.c | 29 +++++++++++++++---- drivers/net/dsa/b53/b53_priv.h | 9 +++++- drivers/net/dsa/b53/b53_regs.h | 1 + 5 files changed, 53 insertions(+), 8 deletions(-) ==================== Link: https://lore.kernel.org/r/20230321173359.251778-1-noltari@gmail.com Signed-off-by: Jakub Kicinski commit 594c6c2e3ea2146d693c64ec3d0a26127d47aeec Author: Álvaro Fernández Rojas Date: Tue Mar 21 18:33:59 2023 +0100 net: dsa: b53: add BCM63268 RGMII configuration BCM63268 requires special RGMII configuration to work. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 260887c770eb60f57176bccf011fd0fe1bc62dc5 Author: Álvaro Fernández Rojas Date: Tue Mar 21 18:33:58 2023 +0100 net: dsa: b53: mmap: allow passing a chip ID BCM6318 and BCM63268 SoCs require a special handling for their RGMIIs, so we should be able to identify them as a special BCM63xx switch. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit a2b212fe5c32613e2beacc5ec3db4cdc0ab5a9e9 Author: Álvaro Fernández Rojas Date: Tue Mar 21 18:33:57 2023 +0100 net: dsa: b53: mmap: add more 63xx SoCs BCM6318, BCM6362 and BCM63268 are SoCs with a B53 MMAP switch. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 3ec5ac3133b54d5bcaaa9ddc95e15377178ef66e Author: Álvaro Fernández Rojas Date: Tue Mar 21 18:33:56 2023 +0100 dt-bindings: net: dsa: b53: add more 63xx SoCs BCM6318, BCM6362 and BCM63268 are SoCs with a B53 MMAP switch. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Acked-by: Krzysztof Kozlowski Signed-off-by: Jakub Kicinski commit 22f5c234141d657a132f230aec08a670ee96232a Author: Wolfram Sang Date: Tue Mar 21 14:17:45 2023 +0100 ethernet: remove superfluous clearing of phydev phy_disconnect() calls phy_detach() which already clears 'phydev' if it is attached to a struct net_device. Signed-off-by: Wolfram Sang Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230321131745.27688-1-wsa+renesas@sang-engineering.com Signed-off-by: Jakub Kicinski commit aab3c0a206308f6e1e8d2dc6ca61c914d7d90f6c Merge: 5c5945dc695c5 a02c331307097 Author: Jakub Kicinski Date: Wed Mar 22 20:42:31 2023 -0700 Merge branch 'bnxt-ptp-optimizations' Pavan Chebbi says: ==================== bnxt PTP optimizations Patches to 1. Enforce software based freq adjustments only on shared PHC NIC 2. A prerequisite change to expand capability storage field to accommodate more Firmware reported capabilities ==================== Link: https://lore.kernel.org/r/20230321144449.15289-1-pavan.chebbi@broadcom.com Signed-off-by: Jakub Kicinski commit a02c33130709736f5a770a55e5bfeda871a8c1cc Author: Pavan Chebbi Date: Tue Mar 21 07:44:49 2023 -0700 bnxt: Enforce PTP software freq adjustments only when in non-RTC mode Currently driver performs software based frequency adjustments when RTC capability is not discovered or when in shared PHC mode. But there may be some old firmware versions that still support hardware freq adjustments without RTC capability being exposed. In this situation driver will use non-realtime mode even on single host NICs. Hence enforce software frequency adjustments only when running in shared PHC mode. Make suitable changes for cyclecounter for the same. Signed-off-by: Pavan Chebbi Reviewed-by: Michael Chan Acked-by: Vadim Fedorenko Signed-off-by: Jakub Kicinski commit edc5287315489ccc6d049efe46227cedc9ede673 Author: Pavan Chebbi Date: Tue Mar 21 07:44:48 2023 -0700 bnxt: Defer PTP initialization to after querying function caps Driver uses the flag BNXT_FLAG_MULTI_HOST to determine whether to use non-realtime mode PHC when running on a multi host NIC. However when ptp initializes on a NIC with shared PHC, we still don't have this flag set yet because HWRM_FUNC_QCFG is issued much later. Move the ptp initialization code after we have issued func_qcfg. The next patch will use the BNXT_FLAG_MULTI_HOST flag during PTP initialization. Signed-off-by: Pavan Chebbi Reviewed-by: Michael Chan Acked-by: Vadim Fedorenko Signed-off-by: Jakub Kicinski commit a3a4e300439bde3517edd61d982d747000a9f212 Author: Pavan Chebbi Date: Tue Mar 21 07:44:47 2023 -0700 bnxt: Change fw_cap to u64 to accommodate more capability bits The current fw_cap field (u32) has run out of bits to save any new capability. Change the field to u64. Signed-off-by: Pavan Chebbi Reviewed-by: Edwin Peer Reviewed-by: Michael Chan Acked-by: Vadim Fedorenko Signed-off-by: Jakub Kicinski commit 083ad04d317249ed35e54dd805cbc325e3e84424 Author: Ondrej Zary Date: Tue Mar 7 23:46:27 2023 +0100 ata: pata_parport-bpck6: reduce indents in bpck6_open Reverse error handling conditions to reduce code indents in bpck6_open. Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 49745f621a2a850c68d5e6c2967a88d811027a97 Author: Ondrej Zary Date: Tue Mar 7 23:46:26 2023 +0100 ata: pata_parport-bpck6: delete ppc6lnx.c Remove now empty ppc6lnx.c. Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit a427ad2ac8c1422455164421352b9434653304c4 Author: Ondrej Zary Date: Tue Mar 7 23:46:25 2023 +0100 ata: pata_parport-bpck6: move defines and mode_map to bpck6.c Move all register definitions and mode_map to bpck6.c Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 7cb352962163d038656b687072c8a0b79924591b Author: Ondrej Zary Date: Tue Mar 7 23:46:24 2023 +0100 ata: pata_parport-bpck6: move ppc6_wr_data_byte to bpck6.c and rename Move ppc6_wr_data_byte to bpck6.c and rename it to bpck6_wr_data_byte Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 574197379327a55285da561996dfdf985b38d2ea Author: Ondrej Zary Date: Tue Mar 7 23:46:23 2023 +0100 ata: pata_parport-bpck6: move ppc6_rd_data_byte to bpck6.c and rename Move ppc6_rd_data_byte to bpck6.c and rename it to bpck6_rd_data_byte Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit b04062789dd5ce2d39996a9a29de8febb771c73f Author: Ondrej Zary Date: Tue Mar 7 23:46:22 2023 +0100 ata: pata_parport-bpck6: move ppc6_send_cmd to bpck6.c and rename Move ppc6_send_cmd to bpck6.c and rename it to bpck6_send_cmd Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 82e16f824e8517de9f532581814c9b56f8362b9e Author: Ondrej Zary Date: Tue Mar 7 23:46:21 2023 +0100 ata: pata_parport-bpck6: move ppc6_deselect to bpck6.c and rename Move ppc6_deselect to bpck6.c and rename it to bpck6_deselect Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit cad40b2a009d7923a0c1a592ff7a0c629addc208 Author: Ondrej Zary Date: Tue Mar 7 23:46:20 2023 +0100 ata: pata_parport-bpck6: merge ppc6_select into bpck6_open ppc6_select is only called by bpck6_open. Merge ppc6_select into bpck6_open. Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 7c97e4680a4f7888a843a0f37f0aeaaf7e9bb0de Author: Ondrej Zary Date: Tue Mar 7 23:46:19 2023 +0100 ata: pata_parport-bpck6: move ppc6_open to bpck6.c and rename Move ppc6_open to bpck6.c and rename it to bpck6_open Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 9e75963a49a3b367f0e112c8f54ef2be438b0dc5 Author: Ondrej Zary Date: Tue Mar 7 23:46:18 2023 +0100 ata: pata_parport-bpck6: move ppc6_wr_extout to bpck6.c and rename Move ppc6_wr_extout to bpck6.c and rename it to bpck6_wr_extout Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 144e7799ad1115c933c31138758d57646d4cbb44 Author: Ondrej Zary Date: Tue Mar 7 23:46:17 2023 +0100 ata: pata_parport-bpck6: move ppc6_wait_for_fifo to bpck6.c and rename Move ppc6_wait_for_fifo to bpck6.c and rename it to bpck6_wait_for_fifo Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 99c40a70dd1e52c0fd62a875760f932ab06f96ad Author: Ondrej Zary Date: Tue Mar 7 23:46:16 2023 +0100 ata: pata_parport-bpck6: merge ppc6_wr_data_blk into bpck6_write_block ppc6_wr_data_blk is only called by bpck6_write_block. Merge ppc6_wr_data_blk into bpck6_write_block. Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit db24d7432494a3d51d71b4c127ba286c58c436fe Author: Ondrej Zary Date: Tue Mar 7 23:46:15 2023 +0100 ata: pata_parport-bpck6: merge ppc6_rd_data_blk into bpck6_read_block ppc6_rd_data_blk is only called by bpck6_read_block. Merge ppc6_rd_data_blk into bpck6_read_block. Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 4e21c863ea9b2ec65c3ea53136f568e62beb13f6 Author: Ondrej Zary Date: Tue Mar 7 23:46:14 2023 +0100 ata: pata_parport-bpck6: merge ppc6_wr_port16_blk into bpck6_write_block ppc6_wr_port16_blk is only called by bpck6_write_block. Merge ppc6_wr_port16_blk into bpck6_write_block. Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 3967def82f8d0884020928659d3084e686616373 Author: Ondrej Zary Date: Tue Mar 7 23:46:13 2023 +0100 ata: pata_parport-bpck6: merge ppc6_rd_port16_blk into bpck6_read_block ppc6_rd_port16_blk is only called by bpck6_read_block. Merge ppc6_rd_port16_blk into bpck6_read_block. Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit ba98c5661d9aa3f4e7fd350f18d5f17e042b1b14 Author: Ondrej Zary Date: Tue Mar 7 23:46:12 2023 +0100 ata: pata_parport-bpck6: merge ppc6_wr_port into bpck6_write_regr ppc6_wr_port is only called by bpck6_write_regr. Merge ppc6_wr_port into bpck6_write_regr. Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 2ee865ce041c15750745c60d4402defcfafcb412 Author: Ondrej Zary Date: Tue Mar 7 23:46:11 2023 +0100 ata: pata_parport-bpck6: merge ppc6_rd_port into bpck6_read_regr ppc6_rd_port is only called by bpck6_read_regr. Merge ppc6_rd_port into bpck6_read_regr. Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit cd3b3944ac364beb05143a100e4ddf6601afad48 Author: Ondrej Zary Date: Tue Mar 7 23:46:10 2023 +0100 ata: pata_parport-bpck6: remove ppc6_close ppc6_close does not do anything except calling ppc6_deselect. Remove ppc6_close and call ppc6_deselect directly. Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 77c521d79a86593e9f249e2fead7cdbf9ca68189 Author: Ondrej Zary Date: Tue Mar 7 23:46:09 2023 +0100 ata: pata_parport-bpck6: remove PPC_FLAGS pi->private is now not used for any other purpose, so store wait_fifo flag directly there and remove PPC_FLAGS define. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit f34536f5ecf04f9ce3bc11ecba31f2d24a6b0a8c Author: Ondrej Zary Date: Tue Mar 7 23:46:08 2023 +0100 ata: pata_parport-bpck6: use parport_frob_control and remove CUR_CTRL Use parport_frob_control instead of manually maintaining control register state. Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit e9090fd6ed363921be4fd3d824a0275f53f862ed Author: Ondrej Zary Date: Tue Mar 7 23:46:07 2023 +0100 ata: pata_parport-bpck6: use parport access functions instead of port I/O Use parport access functions instead of inb/outb/inw/outw/inl/outl. Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 05f0adefd48a2ccbd66b3793d220beb9dcaf6988 Author: Ondrej Zary Date: Tue Mar 7 23:46:06 2023 +0100 ata: parport_pc: add 16-bit and 8-bit fast EPP transfer flags PARPORT_EPP_FAST flag currently uses 32-bit I/O port access for data read/write (insl/outsl). Add PARPORT_EPP_FAST_16 and PARPORT_EPP_FAST_8 that use insw/outsw and insb/outsb (and PARPORT_EPP_FAST_32 as alias for PARPORT_EPP_FAST). Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 5e4696d5ed37e1b9128de9e557b2ae98e9699b52 Author: Ondrej Zary Date: Tue Mar 7 23:46:05 2023 +0100 ata: pata_parport-bpck6: remove parallel port bit defines Remove port_stb, port_afd, cmd_stb, port_init, data_stb and port_sel defines and use standard PARPORT_CONTROL_* instead. Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit f467fd0e1bb17850161091a6374a34445c8bec00 Author: Ondrej Zary Date: Tue Mar 7 23:46:04 2023 +0100 ata: pata_parport-bpck6: remove struct ppc_storage Store the remaining two variables (cur_ctrl and ppc_flags) in struct ppc_storage directly in pi->private and remove struct ppc_storage. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit baa6f0f875063b637628391935987b4db995072b Author: Ondrej Zary Date: Tue Mar 7 23:46:03 2023 +0100 ata: pata_parport-bpck6: remove mode from struct ppc_storage introduce mode_map[] that maps bpck6 modes to ppc6 modes and use it to replace mode in ppc_storage Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit f5031656e4c45951c2f96fb8fda5e0b75b2330f8 Author: Ondrej Zary Date: Tue Mar 7 23:46:02 2023 +0100 ata: pata_parport-bpck6: remove org_* from struct ppc_storage org_data duplicates saved_r0 and org_ctrl duplicates saved_r2 in pi->unit. Remove them. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit 997b0ce28ad30fd97f3924ddaa88208babf95f05 Author: Ondrej Zary Date: Tue Mar 7 23:46:01 2023 +0100 ata: pata_parport-bpck6: remove ppc_id from struct ppc_storage ppc_id duplicates pi->unit. Remove it. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit 617aecc2b3e75ef1d3deedbd1869bb83f1a2778f Author: Ondrej Zary Date: Tue Mar 7 23:46:00 2023 +0100 ata: pata_parport-bpck6: remove lpt_addr from struct ppc_storage lpt_addr duplicates pi->port. Remove it. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit 65f527f245e19f49221b93bae2763359f15c5fb0 Author: Ondrej Zary Date: Tue Mar 7 23:45:59 2023 +0100 ata: pata_parport-bpck6: pass around struct pi_adapter * Remove Interface typedef, pass around struct pi_adapter * down to all functions instead. Remove PPCSTRUCT define. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit 629722855391598325a3e7545ebcf23a4f8e6acb Author: Ondrej Zary Date: Tue Mar 7 23:45:58 2023 +0100 ata: pata_parport-bpck6: don't cast pi->pardev to struct pardevice * pi->pardev is struct pardevice *, no need to cast it to the same type. Also clean up the return mess. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit 84d890fc0997106a2a1f7157c152b7f6b6592c39 Author: Ondrej Zary Date: Tue Mar 7 23:45:57 2023 +0100 ata: pata_parport-bpck6: remove useless range check from read/write_regr bpck6_read_regr() and bpck6_write_regr() check values of cont and reg but there's no point in doing that. They can only be called with a fixed set of values. Remove the checks. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit 7ec02c5e9974099f9fe0394fd2cbd53448da703f Author: Ondrej Zary Date: Tue Mar 7 23:45:56 2023 +0100 ata: pata_parport-bpck6: remove useless defines Almost all the ATAPI_ defines are unused. Remove them and use ATA_REG_DATA instead of ATAPI_DATA. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit e1e0a32eae7fd9566769c612f0b074eaf64b9cea Author: Rob Herring Date: Fri Mar 10 08:47:00 2023 -0600 ata: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Signed-off-by: Damien Le Moal commit 71424f059c423bdb83f0bcc06644f29fe89b50cc Author: Geert Uytterhoeven Date: Wed Mar 8 13:49:34 2023 +0100 ahci: qoriq: Add platform dependencies The Freescale QorIQ AHCI SATA controller is only present on Freescale Layerscape SoCs. Add platform dependencies to the AHCI_QORIQ config symbol, to avoid asking the user about it when configuring a kernel without Layerscape support. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Acked-by: Li Yang Signed-off-by: Damien Le Moal commit 69e32a7070fb1a84eff77c49905d0c85c6e0260b Author: Kunihiko Hayashi Date: Thu Feb 23 00:59:06 2023 +0900 dt-bindings: ata: Add UniPhier controller binding Add UniPhier SATA controller compatible string to the platform binding. This controller needs three reset controls for Pro4 SoC, or two reset controls for PXs2 and PXs3 SoCs. Signed-off-by: Kunihiko Hayashi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Damien Le Moal commit dc2e107e2d48ebe629985a080d457896ccf18f84 Author: Sergey Shtylyov Date: Fri Feb 24 23:40:24 2023 +0300 ata: drop unused ata_id_is_lba_capacity_ok() This function was renamed from lba_capacity_is_ok()() and moved from drivers/ide/ to but it never got used by libata, thus it became useless after drivers/ide/ removal... Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit 8d857540f517501d34e5810a369707a8181d1bbf Author: Sergey Shtylyov Date: Fri Feb 24 23:40:23 2023 +0300 ata: drop unused ata_id_to_hd_driveid() This function was renamed from ide_id_to_hd_driveid() and moved from drivers/ide/ to but it never got used by libata, thus it became useless after drivers/ide/ removal... Signed-off-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit fe027ff984c61f4ac5e79823fef30ced4f46d23d Author: Ondrej Zary Date: Sat Feb 18 23:01:38 2023 +0100 ata: pata_parport: move pata_parport.h to drivers/ata/pata_parport Now that paride is gone, pata_parport.h does not need to be in include/linux. Move it to drivers/ata/pata_parport. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 01985290f61aecd0de191476f77b5dd6b2d15971 Author: Ondrej Zary Date: Sat Feb 18 23:01:37 2023 +0100 ata: pata_parport: remove obsolete changelogs Remove obsolete changelogs from protocol drivers. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit b42251a867a9859a57228c0eadd6f342a339b83d Author: Ondrej Zary Date: Sat Feb 18 23:01:36 2023 +0100 ata: pata_parport: remove scratch parameter from test_proto() Don't pass around a pointer to scratch buffer. Use local buffers in protocols that need it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 8d7494a06a14ce8e2d792b95f28c839367a8ebdc Author: Ondrej Zary Date: Sat Feb 18 23:01:35 2023 +0100 ata: pata_parport: remove verbose parameter from test_proto() verbose parameter of test_proto() is now unused, remove it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit a36a7068274fc9c4f2a4ea97156425b609f276ca Author: Ondrej Zary Date: Sat Feb 18 23:01:34 2023 +0100 ata: pata_parport: remove bpck6 verbose parameter Remove now useless verbose parameter of bpck6 module. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 426eb3c567d3369e20d7ff4e7e8e1049946d0272 Author: Ondrej Zary Date: Sat Feb 18 23:01:33 2023 +0100 ata: pata_parport: simplify log_adapter prints, remove VERSION defines Merge log_adapter prints to single one, remove version print and meaningless VERSION defines. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 68f28e4177623a05da44f076a952d0704e7baa05 Author: Ondrej Zary Date: Sat Feb 18 23:01:32 2023 +0100 ata: pata_parport: use print_hex_* Use print_hex_* for debug dumps. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit 5f1145d8304f93286be774482db6298c40dfe812 Author: Ondrej Zary Date: Sat Feb 18 23:01:31 2023 +0100 ata: pata_parport: use dev_* instead of printk Use dev_info/dev_err/dev_dbg instead of printk. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 5b77db9ccff444ddd3755e43b7bfa8782a5ac125 Author: Ondrej Zary Date: Sat Feb 18 23:01:30 2023 +0100 ata: pata_parport: remove scratch parameter from log_adapter() scratch parameter of log_adapter() is only used by bpck driver. Remove it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 3a7474ba54ef29233af3de8b1f97ec006c2f902a Author: Ondrej Zary Date: Sat Feb 18 23:01:29 2023 +0100 ata: pata_parport: remove verbose parameter from log_adapter() verbose parameter of log_adapter() is unused, remove it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 882ff0ca354ada5f52e26d74039b2210b3070dcc Author: Ondrej Zary Date: Sat Feb 18 23:01:28 2023 +0100 ata: pata_parport: remove typedef struct PIA Remove typedef struct PIA and use struct pi_adapter directly. Fix formatting (excessive spaces) while at it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit a4f2ff92ed4a0305920a46aba0ae8d50139548c0 Author: Ondrej Zary Date: Sat Feb 18 23:01:27 2023 +0100 ata: pata_parport: remove device from struct pi_adapter device is never set in pata_parport, remove it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit ec6e7a51d9eb1cd27840f7d8d5d05328631c9a15 Author: Ondrej Zary Date: Sat Feb 18 23:01:26 2023 +0100 ata: pata_parport: remove devtype from struct pi_adapter Only bpck driver uses devtype but it never gets set in pata_parport. Remove it. As most bpck devices are CD-ROMs, always run the code that depends on devtype == PI_PCD. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 2c08ec0f06a6ac71b78e26f82a88093094d70dc4 Author: Ondrej Zary Date: Sat Feb 18 23:01:25 2023 +0100 ata: pata_parport: Introduce module_pata_parport_driver macro Introduce module_pata_parport_driver macro and use it in protocol drivers to reduce boilerplate code. Remove paride_(un)register compatibility defines. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit cfe1e6323265413d8ea4f08505fc307ec8eaa1fc Author: Ondrej Zary Date: Sat Feb 18 23:01:24 2023 +0100 ata: pata_parport: remove useless printks at module_init of bpck6 bpck6 prints some useless messages on module_init. Remove them. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit e02c625de580a1bc8166c5f95f23a50fa59ee1bf Author: Ondrej Zary Date: Sat Feb 18 23:01:23 2023 +0100 ata: pata_parport: Remove pi_swab16 and pi_swab32 Convert comm and kbic drivers to use standard swab16. Remove pi_swab16 and pi_swab32. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit 4f747dc1af38fe0f9db9d49e76c303c42eef1dbe Author: Ondrej Zary Date: Sat Feb 18 23:01:22 2023 +0100 ata: pata_parport: probe all units automatically Only unit 0 is probed after registering a protocol driver or attaching a new parport. This causes bpck and bpck6 devices to be not detected automatically. Probe all units just like in manual device creation (using sysfs). Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit d0b3f883c4046642c65bfd5997ef76dbd6b71ab9 Author: Ondrej Zary Date: Sat Feb 18 23:01:21 2023 +0100 ata: pata_parport: fix EPAT C7/C8 Kconfig CONFIG_PARIDE_EPATC8 was renamed to CONFIG_PATA_PARPORT_EPATC8 but epat.c was not updated to reflect that. Update it. Reported-by: Sergey Shtylyov Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal commit badb30270960df505cf245bad8844c227731fb0b Author: Andi Shyti Date: Wed Mar 22 01:16:11 2023 +0100 drm/i915: Use i915 instead of dev_priv insied the file_priv structure In the process of renaming all instances of 'dev_priv' to 'i915', start using 'i915' within the 'drm_i915_file_private' structure. Signed-off-by: Andi Shyti Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20230322001611.632321-1-andi.shyti@linux.intel.com commit 0977cfac6e76fa976618129a4585bcf53784cc87 Author: Santosh Shukla Date: Mon Feb 27 14:10:16 2023 +0530 KVM: nSVM: Implement support for nested VNMI Allow L1 to use vNMI to accelerate its injection of NMI to L2 by propagating vNMI int_ctl bits from/to vmcb12 to/from vmcb02. To handle both the case where vNMI is enabled for L1 and L2, and where vNMI is enabled for L1 but _not_ L2, move pending L1 vNMIs to nmi_pending on nested VM-Entry and raise KVM_REQ_EVENT, i.e. rely on existing code to route the NMI to the correct domain. On nested VM-Exit, reverse the process and set/clear V_NMI_PENDING for L1 based one whether nmi_pending is zero or non-zero. There is no need to consider vmcb02 in this case, as V_NMI_PENDING can be set in vmcb02 if vNMI is disabled for L2, and if vNMI is enabled for L2, then L1 and L2 have different NMI contexts. Co-developed-by: Maxim Levitsky Signed-off-by: Maxim Levitsky Signed-off-by: Santosh Shukla Link: https://lore.kernel.org/r/20230227084016.3368-12-santosh.shukla@amd.com [sean: massage changelog to match the code] Signed-off-by: Sean Christopherson commit fa4c027a7956f5e07697bfcb580d25eeb8471257 Author: Santosh Shukla Date: Mon Feb 27 14:10:15 2023 +0530 KVM: x86: Add support for SVM's Virtual NMI Add support for SVM's Virtual NMIs implementation, which adds proper tracking of virtual NMI blocking, and an intr_ctrl flag that software can set to mark a virtual NMI as pending. Pending virtual NMIs are serviced by hardware if/when virtual NMIs become unblocked, i.e. act more or less like real NMIs. Introduce two new kvm_x86_ops callbacks so to support SVM's vNMI, as KVM needs to treat a pending vNMI as partially injected. Specifically, if two NMIs (for L1) arrive concurrently in KVM's software model, KVM's ABI is to inject one and pend the other. Without vNMI, KVM manually tracks the pending NMI and uses NMI windows to detect when the NMI should be injected. With vNMI, the pending NMI is simply stuffed into the VMCB and handed off to hardware. This means that KVM needs to be able to set a vNMI pending on-demand, and also query if a vNMI is pending, e.g. to honor the "at most one NMI pending" rule and to preserve all NMIs across save and restore. Warn if KVM attempts to open an NMI window when vNMI is fully enabled, as the above logic should prevent KVM from ever getting to kvm_check_and_inject_events() with two NMIs pending _in software_, and the "at most one NMI pending" logic should prevent having an NMI pending in hardware and an NMI pending in software if NMIs are also blocked, i.e. if KVM can't immediately inject the second NMI. Signed-off-by: Santosh Shukla Co-developed-by: Maxim Levitsky Signed-off-by: Maxim Levitsky Link: https://lore.kernel.org/r/20230227084016.3368-11-santosh.shukla@amd.com [sean: rewrite shortlog and changelog, massage code comments] Signed-off-by: Sean Christopherson commit bdedff263132c862924f5cad96f0e82eeeb4e2e6 Author: Sean Christopherson Date: Wed Mar 22 17:40:16 2023 -0700 KVM: x86: Route pending NMIs from userspace through process_nmi() Use the asynchronous NMI queue to handle pending NMIs coming in from userspace during KVM_SET_VCPU_EVENTS so that all of KVM's logic for handling multiple NMIs goes through process_nmi(). This will simplify supporting SVM's upcoming "virtual NMI" functionality, which will need changes KVM manages pending NMIs. Signed-off-by: Sean Christopherson commit 1c4522ab13b163173971d8b0c0eb0b253b1b7f28 Author: Santosh Shukla Date: Mon Feb 27 14:10:14 2023 +0530 KVM: SVM: Add definitions for new bits in VMCB::int_ctrl related to vNMI Add defines for three new bits in VMVC::int_ctrl that are part of SVM's Virtual NMI (vNMI) support: V_NMI_PENDING_MASK(11) - Virtual NMI is pending V_NMI_BLOCKING_MASK(12) - Virtual NMI is masked V_NMI_ENABLE_MASK(26) - Enable NMI virtualization To "inject" an NMI, the hypervisor (KVM) sets V_NMI_PENDING. When the CPU services the pending vNMI, hardware clears V_NMI_PENDING and sets V_NMI_BLOCKING, e.g. to indicate that the vCPU is handling an NMI. Hardware clears V_NMI_BLOCKING upon successful execution of IRET, or if a VM-Exit occurs while delivering the virtual NMI. Reviewed-by: Maxim Levitsky Signed-off-by: Santosh Shukla Link: https://lore.kernel.org/r/20230227084016.3368-10-santosh.shukla@amd.com [sean: massage changelog] Signed-off-by: Sean Christopherson commit b63cbc490e18d893632929b8faa55bb28da3fcd4 Author: Andrii Nakryiko Date: Wed Mar 22 16:25:02 2023 -0700 bpf: remember meta->iter info only for initialized iters For iter_new() functions iterator state's slot might not be yet initialized, in which case iter_get_spi() will return -ERANGE. This is expected and is handled properly. But for iter_next() and iter_destroy() cases iter slot is supposed to be initialized and correct, so -ERANGE is not possible. Move meta->iter.{spi,frameno} initialization into iter_next/iter_destroy handling branch to make it more explicit that valid information will be remembered in meta->iter block for subsequent use in process_iter_next_call(), avoiding confusingly looking -ERANGE assignment for meta->iter.spi. Reported-by: Dan Carpenter Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230322232502.836171-1-andrii@kernel.org Signed-off-by: Martin KaFai Lau commit 1a3148fc171f5cde11b4c24e808a953ff725a3e2 Author: Xu Kuohai Date: Wed Mar 22 22:30:56 2023 +0100 selftests/bpf: Check when bounds are not in the 32-bit range Add cases to check if bound is updated correctly when 64-bit value is not in the 32-bit range. Signed-off-by: Xu Kuohai Signed-off-by: Daniel Borkmann Signed-off-by: Andrii Nakryiko Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20230322213056.2470-2-daniel@iogearbox.net commit 7be14c1c9030f73cc18b4ff23b78a0a081f16188 Author: Daniel Borkmann Date: Wed Mar 22 22:30:55 2023 +0100 bpf: Fix __reg_bound_offset 64->32 var_off subreg propagation Xu reports that after commit 3f50f132d840 ("bpf: Verifier, do explicit ALU32 bounds tracking"), the following BPF program is rejected by the verifier: 0: (61) r2 = *(u32 *)(r1 +0) ; R2_w=pkt(off=0,r=0,imm=0) 1: (61) r3 = *(u32 *)(r1 +4) ; R3_w=pkt_end(off=0,imm=0) 2: (bf) r1 = r2 3: (07) r1 += 1 4: (2d) if r1 > r3 goto pc+8 5: (71) r1 = *(u8 *)(r2 +0) ; R1_w=scalar(umax=255,var_off=(0x0; 0xff)) 6: (18) r0 = 0x7fffffffffffff10 8: (0f) r1 += r0 ; R1_w=scalar(umin=0x7fffffffffffff10,umax=0x800000000000000f) 9: (18) r0 = 0x8000000000000000 11: (07) r0 += 1 12: (ad) if r0 < r1 goto pc-2 13: (b7) r0 = 0 14: (95) exit And the verifier log says: func#0 @0 0: R1=ctx(off=0,imm=0) R10=fp0 0: (61) r2 = *(u32 *)(r1 +0) ; R1=ctx(off=0,imm=0) R2_w=pkt(off=0,r=0,imm=0) 1: (61) r3 = *(u32 *)(r1 +4) ; R1=ctx(off=0,imm=0) R3_w=pkt_end(off=0,imm=0) 2: (bf) r1 = r2 ; R1_w=pkt(off=0,r=0,imm=0) R2_w=pkt(off=0,r=0,imm=0) 3: (07) r1 += 1 ; R1_w=pkt(off=1,r=0,imm=0) 4: (2d) if r1 > r3 goto pc+8 ; R1_w=pkt(off=1,r=1,imm=0) R3_w=pkt_end(off=0,imm=0) 5: (71) r1 = *(u8 *)(r2 +0) ; R1_w=scalar(umax=255,var_off=(0x0; 0xff)) R2_w=pkt(off=0,r=1,imm=0) 6: (18) r0 = 0x7fffffffffffff10 ; R0_w=9223372036854775568 8: (0f) r1 += r0 ; R0_w=9223372036854775568 R1_w=scalar(umin=9223372036854775568,umax=9223372036854775823,s32_min=-240,s32_max=15) 9: (18) r0 = 0x8000000000000000 ; R0_w=-9223372036854775808 11: (07) r0 += 1 ; R0_w=-9223372036854775807 12: (ad) if r0 < r1 goto pc-2 ; R0_w=-9223372036854775807 R1_w=scalar(umin=9223372036854775568,umax=9223372036854775809) 13: (b7) r0 = 0 ; R0_w=0 14: (95) exit from 12 to 11: R0_w=-9223372036854775807 R1_w=scalar(umin=9223372036854775810,umax=9223372036854775823,var_off=(0x8000000000000000; 0xffffffff)) R2_w=pkt(off=0,r=1,imm=0) R3_w=pkt_end(off=0,imm=0) R10=fp0 11: (07) r0 += 1 ; R0_w=-9223372036854775806 12: (ad) if r0 < r1 goto pc-2 ; R0_w=-9223372036854775806 R1_w=scalar(umin=9223372036854775810,umax=9223372036854775810,var_off=(0x8000000000000000; 0xffffffff)) 13: safe [...] from 12 to 11: R0_w=-9223372036854775795 R1=scalar(umin=9223372036854775822,umax=9223372036854775823,var_off=(0x8000000000000000; 0xffffffff)) R2=pkt(off=0,r=1,imm=0) R3=pkt_end(off=0,imm=0) R10=fp0 11: (07) r0 += 1 ; R0_w=-9223372036854775794 12: (ad) if r0 < r1 goto pc-2 ; R0_w=-9223372036854775794 R1=scalar(umin=9223372036854775822,umax=9223372036854775822,var_off=(0x8000000000000000; 0xffffffff)) 13: safe from 12 to 11: R0_w=-9223372036854775794 R1=scalar(umin=9223372036854775823,umax=9223372036854775823,var_off=(0x8000000000000000; 0xffffffff)) R2=pkt(off=0,r=1,imm=0) R3=pkt_end(off=0,imm=0) R10=fp0 11: (07) r0 += 1 ; R0_w=-9223372036854775793 12: (ad) if r0 < r1 goto pc-2 ; R0_w=-9223372036854775793 R1=scalar(umin=9223372036854775823,umax=9223372036854775823,var_off=(0x8000000000000000; 0xffffffff)) 13: safe from 12 to 11: R0_w=-9223372036854775793 R1=scalar(umin=9223372036854775824,umax=9223372036854775823,var_off=(0x8000000000000000; 0xffffffff)) R2=pkt(off=0,r=1,imm=0) R3=pkt_end(off=0,imm=0) R10=fp0 11: (07) r0 += 1 ; R0_w=-9223372036854775792 12: (ad) if r0 < r1 goto pc-2 ; R0_w=-9223372036854775792 R1=scalar(umin=9223372036854775824,umax=9223372036854775823,var_off=(0x8000000000000000; 0xffffffff)) 13: safe [...] The 64bit umin=9223372036854775810 bound continuously bumps by +1 while umax=9223372036854775823 stays as-is until the verifier complexity limit is reached and the program gets finally rejected. During this simulation, the umin also eventually surpasses umax. Looking at the first 'from 12 to 11' output line from the loop, R1 has the following state: R1_w=scalar(umin=0x8000000000000002 (9223372036854775810), umax=0x800000000000000f (9223372036854775823), var_off=(0x8000000000000000; 0xffffffff)) The var_off has technically not an inconsistent state but it's very imprecise and far off surpassing 64bit umax bounds whereas the expected output with refined known bits in var_off should have been like: R1_w=scalar(umin=0x8000000000000002 (9223372036854775810), umax=0x800000000000000f (9223372036854775823), var_off=(0x8000000000000000; 0xf)) In the above log, var_off stays as var_off=(0x8000000000000000; 0xffffffff) and does not converge into a narrower mask where more bits become known, eventually transforming R1 into a constant upon umin=9223372036854775823, umax=9223372036854775823 case where the verifier would have terminated and let the program pass. The __reg_combine_64_into_32() marks the subregister unknown and propagates 64bit {s,u}min/{s,u}max bounds to their 32bit equivalents iff they are within the 32bit universe. The question came up whether __reg_combine_64_into_32() should special case the situation that when 64bit {s,u}min bounds have the same value as 64bit {s,u}max bounds to then assign the latter as well to the 32bit reg->{s,u}32_{min,max}_value. As can be seen from the above example however, that is just /one/ special case and not a /generic/ solution given above example would still not be addressed this way and remain at an imprecise var_off=(0x8000000000000000; 0xffffffff). The improvement is needed in __reg_bound_offset() to refine var32_off with the updated var64_off instead of the prior reg->var_off. The reg_bounds_sync() code first refines information about the register's min/max bounds via __update_reg_bounds() from the current var_off, then in __reg_deduce_bounds() from sign bit and with the potentially learned bits from bounds it'll update the var_off tnum in __reg_bound_offset(). For example, intersecting with the old var_off might have improved bounds slightly, e.g. if umax was 0x7f...f and var_off was (0; 0xf...fc), then new var_off will then result in (0; 0x7f...fc). The intersected var64_off holds then the universe which is a superset of var32_off. The point for the latter is not to broaden, but to further refine known bits based on the intersection of var_off with 32 bit bounds, so that we later construct the final var_off from upper and lower 32 bits. The final __update_reg_bounds() can then potentially still slightly refine bounds if more bits became known from the new var_off. After the improvement, we can see R1 converging successively: func#0 @0 0: R1=ctx(off=0,imm=0) R10=fp0 0: (61) r2 = *(u32 *)(r1 +0) ; R1=ctx(off=0,imm=0) R2_w=pkt(off=0,r=0,imm=0) 1: (61) r3 = *(u32 *)(r1 +4) ; R1=ctx(off=0,imm=0) R3_w=pkt_end(off=0,imm=0) 2: (bf) r1 = r2 ; R1_w=pkt(off=0,r=0,imm=0) R2_w=pkt(off=0,r=0,imm=0) 3: (07) r1 += 1 ; R1_w=pkt(off=1,r=0,imm=0) 4: (2d) if r1 > r3 goto pc+8 ; R1_w=pkt(off=1,r=1,imm=0) R3_w=pkt_end(off=0,imm=0) 5: (71) r1 = *(u8 *)(r2 +0) ; R1_w=scalar(umax=255,var_off=(0x0; 0xff)) R2_w=pkt(off=0,r=1,imm=0) 6: (18) r0 = 0x7fffffffffffff10 ; R0_w=9223372036854775568 8: (0f) r1 += r0 ; R0_w=9223372036854775568 R1_w=scalar(umin=9223372036854775568,umax=9223372036854775823,s32_min=-240,s32_max=15) 9: (18) r0 = 0x8000000000000000 ; R0_w=-9223372036854775808 11: (07) r0 += 1 ; R0_w=-9223372036854775807 12: (ad) if r0 < r1 goto pc-2 ; R0_w=-9223372036854775807 R1_w=scalar(umin=9223372036854775568,umax=9223372036854775809) 13: (b7) r0 = 0 ; R0_w=0 14: (95) exit from 12 to 11: R0_w=-9223372036854775807 R1_w=scalar(umin=9223372036854775810,umax=9223372036854775823,var_off=(0x8000000000000000; 0xf),s32_min=0,s32_max=15,u32_max=15) R2_w=pkt(off=0,r=1,imm=0) R3_w=pkt_end(off=0,imm=0) R10=fp0 11: (07) r0 += 1 ; R0_w=-9223372036854775806 12: (ad) if r0 < r1 goto pc-2 ; R0_w=-9223372036854775806 R1_w=-9223372036854775806 13: safe from 12 to 11: R0_w=-9223372036854775806 R1_w=scalar(umin=9223372036854775811,umax=9223372036854775823,var_off=(0x8000000000000000; 0xf),s32_min=0,s32_max=15,u32_max=15) R2_w=pkt(off=0,r=1,imm=0) R3_w=pkt_end(off=0,imm=0) R10=fp0 11: (07) r0 += 1 ; R0_w=-9223372036854775805 12: (ad) if r0 < r1 goto pc-2 ; R0_w=-9223372036854775805 R1_w=-9223372036854775805 13: safe [...] from 12 to 11: R0_w=-9223372036854775798 R1=scalar(umin=9223372036854775819,umax=9223372036854775823,var_off=(0x8000000000000008; 0x7),s32_min=8,s32_max=15,u32_min=8,u32_max=15) R2=pkt(off=0,r=1,imm=0) R3=pkt_end(off=0,imm=0) R10=fp0 11: (07) r0 += 1 ; R0_w=-9223372036854775797 12: (ad) if r0 < r1 goto pc-2 ; R0_w=-9223372036854775797 R1=-9223372036854775797 13: safe from 12 to 11: R0_w=-9223372036854775797 R1=scalar(umin=9223372036854775820,umax=9223372036854775823,var_off=(0x800000000000000c; 0x3),s32_min=12,s32_max=15,u32_min=12,u32_max=15) R2=pkt(off=0,r=1,imm=0) R3=pkt_end(off=0,imm=0) R10=fp0 11: (07) r0 += 1 ; R0_w=-9223372036854775796 12: (ad) if r0 < r1 goto pc-2 ; R0_w=-9223372036854775796 R1=-9223372036854775796 13: safe from 12 to 11: R0_w=-9223372036854775796 R1=scalar(umin=9223372036854775821,umax=9223372036854775823,var_off=(0x800000000000000c; 0x3),s32_min=12,s32_max=15,u32_min=12,u32_max=15) R2=pkt(off=0,r=1,imm=0) R3=pkt_end(off=0,imm=0) R10=fp0 11: (07) r0 += 1 ; R0_w=-9223372036854775795 12: (ad) if r0 < r1 goto pc-2 ; R0_w=-9223372036854775795 R1=-9223372036854775795 13: safe from 12 to 11: R0_w=-9223372036854775795 R1=scalar(umin=9223372036854775822,umax=9223372036854775823,var_off=(0x800000000000000e; 0x1),s32_min=14,s32_max=15,u32_min=14,u32_max=15) R2=pkt(off=0,r=1,imm=0) R3=pkt_end(off=0,imm=0) R10=fp0 11: (07) r0 += 1 ; R0_w=-9223372036854775794 12: (ad) if r0 < r1 goto pc-2 ; R0_w=-9223372036854775794 R1=-9223372036854775794 13: safe from 12 to 11: R0_w=-9223372036854775794 R1=-9223372036854775793 R2=pkt(off=0,r=1,imm=0) R3=pkt_end(off=0,imm=0) R10=fp0 11: (07) r0 += 1 ; R0_w=-9223372036854775793 12: (ad) if r0 < r1 goto pc-2 last_idx 12 first_idx 12 parent didn't have regs=1 stack=0 marks: R0_rw=P-9223372036854775801 R1_r=scalar(umin=9223372036854775815,umax=9223372036854775823,var_off=(0x8000000000000000; 0xf),s32_min=0,s32_max=15,u32_max=15) R2=pkt(off=0,r=1,imm=0) R3=pkt_end(off=0,imm=0) R10=fp0 last_idx 11 first_idx 11 regs=1 stack=0 before 11: (07) r0 += 1 parent didn't have regs=1 stack=0 marks: R0_rw=P-9223372036854775805 R1_rw=scalar(umin=9223372036854775812,umax=9223372036854775823,var_off=(0x8000000000000000; 0xf),s32_min=0,s32_max=15,u32_max=15) R2_w=pkt(off=0,r=1,imm=0) R3_w=pkt_end(off=0,imm=0) R10=fp0 last_idx 12 first_idx 0 regs=1 stack=0 before 12: (ad) if r0 < r1 goto pc-2 regs=1 stack=0 before 11: (07) r0 += 1 regs=1 stack=0 before 12: (ad) if r0 < r1 goto pc-2 regs=1 stack=0 before 11: (07) r0 += 1 regs=1 stack=0 before 12: (ad) if r0 < r1 goto pc-2 regs=1 stack=0 before 11: (07) r0 += 1 regs=1 stack=0 before 9: (18) r0 = 0x8000000000000000 last_idx 12 first_idx 12 parent didn't have regs=2 stack=0 marks: R0_rw=P-9223372036854775801 R1_r=Pscalar(umin=9223372036854775815,umax=9223372036854775823,var_off=(0x8000000000000000; 0xf),s32_min=0,s32_max=15,u32_max=15) R2=pkt(off=0,r=1,imm=0) R3=pkt_end(off=0,imm=0) R10=fp0 last_idx 11 first_idx 11 regs=2 stack=0 before 11: (07) r0 += 1 parent didn't have regs=2 stack=0 marks: R0_rw=P-9223372036854775805 R1_rw=Pscalar(umin=9223372036854775812,umax=9223372036854775823,var_off=(0x8000000000000000; 0xf),s32_min=0,s32_max=15,u32_max=15) R2_w=pkt(off=0,r=1,imm=0) R3_w=pkt_end(off=0,imm=0) R10=fp0 last_idx 12 first_idx 0 regs=2 stack=0 before 12: (ad) if r0 < r1 goto pc-2 regs=2 stack=0 before 11: (07) r0 += 1 regs=2 stack=0 before 12: (ad) if r0 < r1 goto pc-2 regs=2 stack=0 before 11: (07) r0 += 1 regs=2 stack=0 before 12: (ad) if r0 < r1 goto pc-2 regs=2 stack=0 before 11: (07) r0 += 1 regs=2 stack=0 before 9: (18) r0 = 0x8000000000000000 regs=2 stack=0 before 8: (0f) r1 += r0 regs=3 stack=0 before 6: (18) r0 = 0x7fffffffffffff10 regs=2 stack=0 before 5: (71) r1 = *(u8 *)(r2 +0) 13: safe from 4 to 13: safe verification time 322 usec stack depth 0 processed 56 insns (limit 1000000) max_states_per_insn 1 total_states 3 peak_states 3 mark_read 1 This also fixes up a test case along with this improvement where we match on the verifier log. The updated log now has a refined var_off, too. Fixes: 3f50f132d840 ("bpf: Verifier, do explicit ALU32 bounds tracking") Reported-by: Xu Kuohai Signed-off-by: Daniel Borkmann Signed-off-by: Andrii Nakryiko Reviewed-by: John Fastabend Link: https://lore.kernel.org/bpf/20230314203424.4015351-2-xukuohai@huaweicloud.com Link: https://lore.kernel.org/bpf/20230322213056.2470-1-daniel@iogearbox.net commit cadda005961cd6a202ae6f8ff99f2bba35a31dc8 Author: Johan Jonker Date: Thu Dec 22 15:33:49 2022 +0100 arm64: dts: rockchip: remove hclk from dsi node on rk356x The hclk is not used in the dw-mipi-dsi binding, so remove hclk from the rk356x.dtsi dsi node. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/4df211eb-4fcd-ee20-48a1-ce7712de552c@gmail.com Signed-off-by: Heiko Stuebner commit fc440ea1732abb714150bb8f3d90672ccc679e2d Author: Johan Jonker Date: Thu Dec 22 15:33:22 2022 +0100 arm64: dts: rockchip: rename vbus-supply to phy-supply in rk3566-box-demo.dts 'vbus-supply' does not match any of the regexes in rk3566-box-demo.dts in the usb2phy0_otg node, so rename vbus-supply to phy-supply. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/1889d8ee-e119-4a52-33a1-b990a41a137c@gmail.com Signed-off-by: Heiko Stuebner commit d94024bd6342c6f3e88c5fac785a685c1974d48e Author: Johan Jonker Date: Thu Dec 22 15:32:52 2022 +0100 arm64: dts: rockchip: fix rk3399 dp node Use generic node name for rk3399.dtsi dp node. With the conversion of rockchip,analogix-dp.yaml a port@1 node is required, so add a node with label edp_out. Also restyle. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/f6008819-db9b-0944-3f5b-5522b7cd8a8d@gmail.com Signed-off-by: Heiko Stuebner commit f82fe7ad31530b38d2f61aa6ae68bd35c33f4ad0 Author: Johan Jonker Date: Thu Dec 22 15:32:22 2022 +0100 arm64: dts: rockchip: fix rk3399 dsi node Use generic node name for rk3399.dtsi dsi node. With the conversion of rockchip,dw-mipi-dsi.yaml a port@1 node is required, so add a node with label mipi_out. Also restyle. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/1e019e9e-a8da-3d57-2770-f6b81bbbf591@gmail.com Signed-off-by: Heiko Stuebner commit 30322f812d4e0e75e2488c1d45aba94e51dd19bb Author: Johan Jonker Date: Thu Dec 22 15:31:52 2022 +0100 arm64: dts: rockchip: fix px30 dsi node With the conversion of rockchip,dw-mipi-dsi.yaml a port@1 node is required, so add a node with label dsi_out. Also add label dsi_in to port@0. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/1ee3e676-aef4-f464-82b0-8fb39ba5c60d@gmail.com Signed-off-by: Heiko Stuebner commit 0d5e24918976edffffee006e07730434a36d264a Author: Johan Jonker Date: Thu Dec 22 15:31:22 2022 +0100 arm64: dts: rockchip: fix px30 lvds node With the conversion of rockchip,lvds.yaml a port@1 node is required, so add a node with label lvds_out. Also add label lvds_in to port@0. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/99895a4b-25c4-4b64-42ac-6f70940ab56e@gmail.com Signed-off-by: Heiko Stuebner commit 95e2ac6ae9f2330557a6aef70bf15173e1dd9714 Author: Johan Jonker Date: Thu Dec 22 15:30:38 2022 +0100 ARM: dts: rockchip: fix rk3288 dp node With the conversion of rockchip,analogix-dp.yaml a port@1 node is required, so add a node with label edp_out. Also restyle. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/0a423eb4-0ab6-7ecb-d450-d93639160dbc@gmail.com Signed-off-by: Heiko Stuebner commit 8a19e4c74d17ed8d1e6bc06b32c5b7b7c3b9fcfb Author: Johan Jonker Date: Thu Dec 22 15:30:06 2022 +0100 ARM: dts: rockchip: fix rk3288 lvds node With the conversion of rockchip,lvds.yaml a port@1 node is required, so add a node with label lvds_out. Also restyle. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/e7b78a73-0e89-d9e9-2ecc-a8a380635f64@gmail.com Signed-off-by: Heiko Stuebner commit ea2d16f90629e3158307d0183cad5c40aa55c995 Author: Johan Jonker Date: Thu Dec 22 15:29:35 2022 +0100 ARM: dts: rockchip: fix rk3288 dsi node Use generic node name for rk3288.dtsi dsi node. With the conversion of rockchip,dw-mipi-dsi.yaml a port@1 node is required, so add a node with label mipi_out. Also restyle. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/f3edcbff-4aef-1d24-8d65-e519c9451cda@gmail.com Signed-off-by: Heiko Stuebner commit 4ab9157c7e02019fa8d8ab98d4f9e67e6a7cfad1 Author: Alfredo Cruz Date: Wed Mar 22 23:44:11 2023 +0100 drm/rockchip: vop2: Add error check to devm_regmap_init_mmio devm_regmap_init_mmio() may return an invalid pointer in case of an error. This patch adds the corresponding IS_ERR check to vop2->map. Signed-off-by: Alfredo Cruz Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20230322224411.15612-1-alfredo.carlon@gmail.com commit 975e9bbad11950fc8276f1fa260d8bf2c341aa41 Author: Tianling Shen Date: Sat Mar 18 16:37:45 2023 +0800 arm64: dts: rockchip: remove I2S1 TDM node for the NanoPi R5 series This is for the audio output which does not exist on the boards. Also disable regulator-always-on for vccio_acodec since it's only used by the audio output. Signed-off-by: Tianling Shen Link: https://lore.kernel.org/r/20230318083745.6181-6-cnsztl@gmail.com Signed-off-by: Heiko Stuebner commit 31425b1fadb2040b359e52ffc24c049a78d56c96 Author: Tianling Shen Date: Sat Mar 18 16:37:44 2023 +0800 arm64: dts: rockchip: fix gmac support for NanoPi R5S - Changed phy-mode to rgmii. - Fixed pull type in pinctrl for gmac0. - Removed duplicate properties in mdio node. These properties are defined in the gmac0 node already. Signed-off-by: Tianling Shen Link: https://lore.kernel.org/r/20230318083745.6181-5-cnsztl@gmail.com Signed-off-by: Heiko Stuebner commit 05620031408ac6cfc6d5c048431827e49aa0ade1 Author: Tianling Shen Date: Sat Mar 18 16:37:43 2023 +0800 arm64: dts: rockchip: Add FriendlyARM NanoPi R5C FriendlyARM NanoPi R5C is an open-sourced mini IoT gateway device. Specification: - Rockchip RK3568 - 1/4GB LPDDR4X RAM - 8/32GB eMMC - SD card slot - M.2 Connector - 2x USB 3.0 Port - 2x 2500 Base-T (PCIe, r8125) - HDMI 2.0 - MIPI DSI/CSI - USB Type C 5V Signed-off-by: Tianling Shen Link: https://lore.kernel.org/r/20230318083745.6181-4-cnsztl@gmail.com Signed-off-by: Heiko Stuebner commit 7d4fc70351d155699fe41949d16ce696885a4ca8 Author: Tianling Shen Date: Sat Mar 18 16:37:42 2023 +0800 dt-bindings: Add doc for FriendlyARM NanoPi R5C Add devicetree binding documentation for the FriendlyARM NanoPi R5C. Acked-by: Krzysztof Kozlowski Signed-off-by: Tianling Shen Link: https://lore.kernel.org/r/20230318083745.6181-3-cnsztl@gmail.com Signed-off-by: Heiko Stuebner commit c8ec73b05a95d9f0969ae0f28dd8799a54fcdfc7 Author: Tianling Shen Date: Sat Mar 18 16:37:41 2023 +0800 arm64: dts: rockchip: create common dtsi for NanoPi R5 series Create common dtsi for the FriendlyElec NanoPi R5 series. Signed-off-by: Tianling Shen Link: https://lore.kernel.org/r/20230318083745.6181-2-cnsztl@gmail.com Signed-off-by: Heiko Stuebner commit 3c17655ab13704582fe25e8ea3200a9b2f8bf20a Author: Fabio M. De Francesco Date: Wed Mar 15 13:52:56 2023 +0100 module/decompress: Never use kunmap() for local un-mappings Use kunmap_local() to unmap pages locally mapped with kmap_local_page(). kunmap_local() must be called on the kernel virtual address returned by kmap_local_page(), differently from how we use kunmap() which instead expects the mapped page as its argument. In module_zstd_decompress() we currently map with kmap_local_page() and unmap with kunmap(). This breaks the code and so it should be fixed. Cc: Piotr Gorski Cc: Dmitry Torokhov Cc: Luis Chamberlain Cc: Stephen Boyd Cc: Ira Weiny Fixes: 169a58ad824d ("module/decompress: Support zstd in-kernel decompression") Signed-off-by: Fabio M. De Francesco Reviewed-by: Stephen Boyd Reviewed-by: Ira Weiny Reviewed-by: Piotr Gorski Signed-off-by: Luis Chamberlain commit b5af48eedcb53491c02ded55d5991e03d6da6dbf Author: Toby Chen Date: Thu Mar 16 17:51:26 2023 -0700 drm/rockchip: dw_hdmi: cleanup drm encoder during unbind This fixes a use-after-free crash during rmmod. The DRM encoder is embedded inside the larger rockchip_hdmi, which is allocated with the component. The component memory gets freed before the main drm device is destroyed. Fix it by running encoder cleanup before tearing down its container. Signed-off-by: Toby Chen [moved encoder cleanup above clk_disable, similar to bind-error-path] Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20230317005126.496-1-tobyc@nvidia.com commit 68f7c82ab1b8c7057b0c241907ff7906c7407e6d Author: Binbin Wu Date: Wed Mar 22 12:58:24 2023 +0800 KVM: x86: Change return type of is_long_mode() to bool Change return type of is_long_mode() to bool to avoid implicit cast, as literally every user of is_long_mode() treats its return value as a boolean. Signed-off-by: Binbin Wu Link: https://lore.kernel.org/r/20230322045824.22970-5-binbin.wu@linux.intel.com Reviewed-by: Kai Huang Signed-off-by: Sean Christopherson commit 02adf9e9bec115962424d45d45d0d65d6b6477fa Merge: d9d93f3b61434 d7ba4cc900bf1 Author: Alexei Starovoitov Date: Wed Mar 22 15:11:07 2023 -0700 Merge branch 'error checking where helpers call bpf_map_ops' JP Kobryn says: ==================== Within bpf programs, the bpf helper functions can make inline calls to kernel functions. In this scenario there can be a disconnect between the register the kernel function writes a return value to and the register the bpf program uses to evaluate that return value. As an example, this bpf code: long err = bpf_map_update_elem(...); if (err && err != -EEXIST) // got some error other than -EEXIST ...can result in the bpf assembly: ; err = bpf_map_update_elem(&mymap, &key, &val, BPF_NOEXIST); 37: movabs $0xffff976a10730400,%rdi 41: mov $0x1,%ecx 46: call 0xffffffffe103291c ; htab_map_update_elem ; if (err && err != -EEXIST) { 4b: cmp $0xffffffffffffffef,%rax ; cmp -EEXIST,%rax 4f: je 0x000000000000008e 51: test %rax,%rax 54: je 0x000000000000008e The compare operation here evaluates %rax, while in the preceding call to htab_map_update_elem the corresponding assembly returns -EEXIST via %eax (the lower 32 bits of %rax): movl $0xffffffef, %r9d ... movl %r9d, %eax ...since it's returning int (32-bit). So the resulting comparison becomes: cmp $0xffffffffffffffef, $0x00000000ffffffef ...making it not possible to check for negative errors or specific errors, since the sign value is left at the 32nd bit. It means in the original example, the conditional branch will be entered even when the error is -EEXIST, which was not intended. The selftests added cover these cases for the different bpf_map_ops functions. When the second patch is applied, changing the return type of those functions to long, the comparison works as intended and the tests pass. ==================== Signed-off-by: Alexei Starovoitov commit d7ba4cc900bf1eea2d8c807c6b1fc6bd61f41237 Author: JP Kobryn Date: Wed Mar 22 12:47:54 2023 -0700 bpf: return long from bpf_map_ops funcs This patch changes the return types of bpf_map_ops functions to long, where previously int was returned. Using long allows for bpf programs to maintain the sign bit in the absence of sign extension during situations where inlined bpf helper funcs make calls to the bpf_map_ops funcs and a negative error is returned. The definitions of the helper funcs are generated from comments in the bpf uapi header at `include/uapi/linux/bpf.h`. The return type of these helpers was previously changed from int to long in commit bdb7b79b4ce8. For any case where one of the map helpers call the bpf_map_ops funcs that are still returning 32-bit int, a compiler might not include sign extension instructions to properly convert the 32-bit negative value a 64-bit negative value. For example: bpf assembly excerpt of an inlined helper calling a kernel function and checking for a specific error: ; err = bpf_map_update_elem(&mymap, &key, &val, BPF_NOEXIST); ... 46: call 0xffffffffe103291c ; htab_map_update_elem ; if (err && err != -EEXIST) { 4b: cmp $0xffffffffffffffef,%rax ; cmp -EEXIST,%rax kernel function assembly excerpt of return value from `htab_map_update_elem` returning 32-bit int: movl $0xffffffef, %r9d ... movl %r9d, %eax ...results in the comparison: cmp $0xffffffffffffffef, $0x00000000ffffffef Fixes: bdb7b79b4ce8 ("bpf: Switch most helper return values from 32-bit int to 64-bit long") Tested-by: Eduard Zingerman Signed-off-by: JP Kobryn Link: https://lore.kernel.org/r/20230322194754.185781-3-inwardvessel@gmail.com Signed-off-by: Alexei Starovoitov commit 830154cdc57971b06f81d4ffc39b868e3d7693de Author: JP Kobryn Date: Wed Mar 22 12:47:53 2023 -0700 bpf/selftests: coverage for bpf_map_ops errors These tests expose the issue of being unable to properly check for errors returned from inlined bpf map helpers that make calls to the bpf_map_ops functions. At best, a check for zero or non-zero can be done but these tests show it is not possible to check for a negative value or for a specific error value. Signed-off-by: JP Kobryn Tested-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230322194754.185781-2-inwardvessel@gmail.com Signed-off-by: Alexei Starovoitov commit b0e214d212030fe497d4d150bb3474e50ad5d093 Author: Madhu Koriginja Date: Tue Mar 21 21:28:44 2023 +0530 netfilter: keep conntrack reference until IPsecv6 policy checks are done Keep the conntrack reference until policy checks have been performed for IPsec V6 NAT support, just like ipv4. The reference needs to be dropped before a packet is queued to avoid having the conntrack module unloadable. Fixes: 58a317f1061c ("netfilter: ipv6: add IPv6 NAT support") Signed-off-by: Madhu Koriginja Signed-off-by: Florian Westphal commit 36ce9982ef2fb63fdf39996900866965d71f5a5e Author: Florian Westphal Date: Thu Mar 16 15:44:08 2023 +0100 xtables: move icmp/icmpv6 logic to xt_tcpudp icmp/icmp6 matches are baked into ip(6)_tables.ko. This means that even if iptables-nft is used, a rule like "-p icmp --icmp-type 1" will load the ip(6)tables modules. Move them to xt_tcpdudp.ko instead to avoid this. This will also allow to eventually add kconfig knobs to build kernels that support iptables-nft but not iptables-legacy (old set/getsockopt interface). Signed-off-by: Florian Westphal commit bde7170a04d69ab8013d0582e60e414d46d46dd6 Author: Florian Westphal Date: Thu Mar 16 13:59:48 2023 +0100 netfilter: xtables: disable 32bit compat interface by default This defaulted to 'y' because before this knob existed the 32bit compat layer was always compiled in if CONFIG_COMPAT was set. 32bit iptables on 64bit kernel isn't common anymore, so remove the default-y now. Signed-off-by: Florian Westphal commit f6ca5d5ed7ecee1ff4721565fb5a276884d1e785 Author: Jeremy Sowden Date: Wed Mar 15 21:48:02 2023 +0000 netfilter: nft_masq: deduplicate eval call-backs nft_masq has separate ipv4 and ipv6 call-backs which share much of their code, and an inet one switch containing a switch that calls one of the others based on the family of the packet. Merge the ipv4 and ipv6 ones into the inet one in order to get rid of the duplicate code. Const-qualify the `priv` pointer since we don't need to write through it. Signed-off-by: Jeremy Sowden Signed-off-by: Florian Westphal commit 6f56ad1b92328997e1b1792047099df6f8d7acb5 Author: Jeremy Sowden Date: Wed Mar 15 21:48:01 2023 +0000 netfilter: nft_redir: use `struct nf_nat_range2` throughout and deduplicate eval call-backs `nf_nat_redirect_ipv4` takes a `struct nf_nat_ipv4_multi_range_compat`, but converts it internally to a `struct nf_nat_range2`. Change the function to take the latter, factor out the code now shared with `nf_nat_redirect_ipv6`, move the conversion to the xt_REDIRECT module, and update the ipv4 range initialization in the nft_redir module. Replace a bare hex constant for 127.0.0.1 with a macro. Remove `WARN_ON`. `nf_nat_setup_info` calls `nf_ct_is_confirmed`: /* Can't setup nat info for confirmed ct. */ if (nf_ct_is_confirmed(ct)) return NF_ACCEPT; This means that `ct` cannot be null or the kernel will crash, and implies that `ctinfo` is `IP_CT_NEW` or `IP_CT_RELATED`. nft_redir has separate ipv4 and ipv6 call-backs which share much of their code, and an inet one switch containing a switch that calls one of the others based on the family of the packet. Merge the ipv4 and ipv6 ones into the inet one in order to get rid of the duplicate code. Const-qualify the `priv` pointer since we don't need to write through it. Assign `priv->flags` to the range instead of OR-ing it in. Set the `NF_NAT_RANGE_PROTO_SPECIFIED` flag once during init, rather than on every eval. Signed-off-by: Jeremy Sowden Signed-off-by: Florian Westphal commit 19799d3ae2edec99435b792cfe76b1cba74665fe Author: Zhang Rui Date: Mon Oct 17 19:34:14 2022 +0800 tools/power/x86/intel-speed-select: Update version Update tool and supported API version. This is the first version which supports newer Xeon platforms with TPMI support. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: subject and changelog edits] Signed-off-by: Srinivas Pandruvada commit 2c00056f54299983009c13a8790fa004e5337d16 Author: Srinivas Pandruvada Date: Thu Feb 23 06:36:46 2023 -0800 tools/power/x86/intel-speed-select: Change TRL display for Emerald Rapids Emerald Rapids doesn't specify TRL (Turbo Ratio Limits) based instruction types. Instead it specifies 5 TRL levels, which can be anyone of the instruction types. Increase TRL levels to 5 for Emerald Rapids. Also change display to show by level number. Show only non zero level values. Signed-off-by: Srinivas Pandruvada commit 1d54b139f43482a5d394f26ce47aa9949dec6e76 Author: Srinivas Pandruvada Date: Wed Feb 22 22:53:02 2023 -0800 tools/power/x86/intel-speed-select: Identify Emerald Rapids There are some differences compared to Sapphire Rapids. So, add a separate API. Signed-off-by: Srinivas Pandruvada commit a835ff56dd9ce2dfc53526085ba8efc2807b9bcb Author: Srinivas Pandruvada Date: Thu Feb 23 05:59:24 2023 -0800 tools/power/x86/intel-speed-select: Display AMX base frequency AMX frequency is present in non TPMI platforms also. When platform supports, the value is non zero. So, display AMX base frequency when non zero, irrespective of platform API version. Signed-off-by: Srinivas Pandruvada commit 997074df658e444e79a5294b685b77b08a3c414c Author: Srinivas Pandruvada Date: Wed Feb 22 03:42:19 2023 -0800 tools/power/x86/intel-speed-select: Use cgroup v2 isolation On supported systems, it is possiible to isolate CPUs instead of CPU online/offline. This is optional and can be specified using -g option when running as daemon or in combination with -o option for SST-PP level change. CPU isolation doesn't isolate IRQs. So IRQs needs to be moved away from isoolated CPUs. This can be done via IRQ sysfs or irqbalance daemon. The IRQ balance daemon is also capable to parse thermal HFI messages to move IRQs away from CPUS, which are supposed be isolated. But this requires version released after July 2022. Signed-off-by: Srinivas Pandruvada commit 57797f19d5a78b5a84b7452790f7da22865f6420 Author: Srinivas Pandruvada Date: Wed Feb 22 03:26:29 2023 -0800 tools/power/x86/intel-speed-select: Add missing free cpuset During perf level change cpuset is allocated but not freed. Add free_cpu_set() in success and failure path. Although this is not an issue, as the program will exit after processing of online/offline, but for completeness add the free_cpu_set(). Signed-off-by: Srinivas Pandruvada commit 137ba3b13aacf80b64d363dd7cff69c2aed161f0 Author: Zhang Rui Date: Sat Jan 7 21:45:42 2023 +0800 tools/power/x86/intel-speed-select: Fix clos-max display with TPMI I/F Comparing clos_config->clos_max with 255 is broken with TPMI I/F because of different isst_get_disp_freq_multiplier() used. Checking for clos_config->clos_max * isst_get_disp_freq_multiplier() instead. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada commit d0e12c46f518620551d719b19b93777dafd0b5e6 Author: Zhang Rui Date: Tue Sep 13 20:23:19 2022 +0800 tools/power/x86/intel-speed-select: Add cpu id check Some operations applies to cpu-power-domain only. Add check for cpu id for these functions. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada commit 14f0cf6cfa53a3a4f2f713b1d54eb71e96ff34cb Author: Zhang Rui Date: Thu Feb 2 15:55:25 2023 +0800 tools/power/x86/intel-speed-select: Avoid setting duplicate tdp level If the new TDP level requetsted is same as the current TDP level, don't call into driver to change level. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit c7ff8ff3b29ee031a2194f67b5ceced9b77fdc21 Author: Zhang Rui Date: Thu Aug 18 21:26:23 2022 +0800 tools/power/x86/intel-speed-select: Remove cpu mask display for non-cpu power domain Non CPU power domains will not have any CPUs. So don't display any CPU count or enable mask. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: subject and changelog edits] Signed-off-by: Srinivas Pandruvada commit c5a295caefa33ce7599d7afbe7a2e9b1bc8d92a2 Author: Zhang Rui Date: Thu Aug 18 21:21:46 2022 +0800 tools/power/x86/intel-speed-select: Hide invalid TRL level TRL levels with Zero ratio values is meaningless. Prevent these TRL levels from being displayed. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada commit b1e9b87b3b5999786685eb882afb99c468af94c1 Author: Zhang Rui Date: Thu Aug 18 21:18:03 2022 +0800 tools/power/x86/intel-speed-select: Display fact info for non-cpu power domain Allow displaying SST-TF info for non-cpu power domain. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada commit ca7c5d5b75fdac884d2ad6acd7cb28e3f1dfee9c Author: Zhang Rui Date: Thu Aug 18 01:51:15 2022 +0800 tools/power/x86/intel-speed-select: Show level 0 name for new api_version level 0 name is not shown in some case for backward compatibility reason. No need to keep this quirk for new api_version. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada commit 443bf104ef10cfc0d22698613f8ba178427d4538 Author: Zhang Rui Date: Thu Aug 18 01:45:33 2022 +0800 tools/power/x86/intel-speed-select: Prevent cpu clos config for non-cpu power domain Non-cpu power domain does not support cpu clos config. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada commit 2e54ba89ec5286d041999e6566ae96267d33b002 Author: Zhang Rui Date: Thu Aug 18 01:34:55 2022 +0800 tools/power/x86/intel-speed-select: Allow display non-cpu power domain info Some power domain may not have CPUs associated, allow displaying information for these non-cpu power domains. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada commit 5f319081657cb653b55d2c9ef393fc5cd7aae6d4 Author: Zhang Rui Date: Tue Aug 9 03:29:23 2022 +0800 tools/power/x86/intel-speed-select: Display amx_p1 and cooling_type amx_p1 and cooling_type are newly introduced for TPMI interface. Display amx_p1 and cooling_type info for platforms that support them. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada commit 46de87e39b871f926b429b14bde845412b541841 Author: Zhang Rui Date: Wed Aug 10 17:14:11 2022 +0800 tools/power/x86/intel-speed-select: Display punit info Display punit info for platforms with new api_version. For platforms with old api_version, don't display the punit info to be backward compatible. For example: Intel(R) Speed Select Technology Executing on CPU model:173[0xad] package-0 die-0 powerdomain-0 cpu-0 get-config-current_level:0 package-0 die-0 powerdomain-3 cpu--1 get-config-current_level:0 package-0 die-0 powerdomain-4 cpu--1 get-config-current_level:0 Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 79554aaa224a3b99f95b9c2843dc904764c32541 Author: Zhang Rui Date: Tue Aug 9 00:01:00 2022 +0800 tools/power/x86/intel-speed-select: Introduce TPMI interface support TPMI (Topology Aware Register and PM Capsule Interface) creates a flexible, extendable and software-PCIe-driver-enumerable MMIO interface for PM features. SST feature is exposed via the TPMI interface on newer Xeon platforms. Kernel TPMI based SST driver provides a series of new IOCTLs for userspace to use. Introduce support for the platforms that do SST control via TPMI interface. Compared with previous platforms, Newer Xeons also supports multi-punit in a package/die, including cpu punit and non-cpu punit. These have already been handled in the generic code. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit a0ca5a097342f78d41e104d8d6bb0742ff0e7330 Author: Srinivas Pandruvada Date: Mon Mar 6 09:26:28 2023 -0800 tools/power/x86/intel-speed-select: Get punit core mapping information Get punit core mapping information using format of MSR 0x54. Based on the API version, decode is done using new format. The new format also include a power domain ID. TPMI SST information is for each power domain. Signed-off-by: Srinivas Pandruvada commit 887e5be91dd253ff73c0b2644442c0cae5d6dca0 Author: Zhang Rui Date: Sat Aug 20 20:51:33 2022 +0800 tools/power/x86/intel-speed-select: Introduce api_version helper In some cases, the output format may be different with different api_version because of different capabilities or for backward capabilities reason. Introduce api_version() to get the api_version of the platform running. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 20f06c9db22bf45de595a2a5855630b075596217 Author: Zhang Rui Date: Tue Aug 16 21:20:00 2022 +0800 tools/power/x86/intel-speed-select: Support large clos_min/max clos_min/max in TPMI interface is frequency in MHz, thus clos_min/max needs to support larger values. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 9798768ce9bc4da626091f4f87fc0a8edbee44d5 Author: Zhang Rui Date: Tue Aug 9 01:56:04 2022 +0800 tools/power/x86/intel-speed-select: Introduce is_debug_enabled() Platform specific code also needs to give debug output. Introduce is_debug_enabled() for this purpose. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 05aab5b8c1b78c028cd95701e788623de744d1cd Author: Zhang Rui Date: Sat Aug 20 20:40:48 2022 +0800 tools/power/x86/intel-speed-select: Allow api_version based platform callbacks Different api_version suggests different kernel driver used and different interface is used to communication with the hardware. Allow setting platform specific callbacks based on api_version. Currently, all platforms with api_version 1 uses Mbox/MMIO interfaces. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 2b86ed225e657867b405b3e9412e9efefcbe6ffb Author: Zhang Rui Date: Sat Aug 20 20:14:15 2022 +0800 tools/power/x86/intel-speed-select: Move send_mbox_cmd to isst-core-mbox.c After the previous cleanup, there is no user of send_mbox_cmd outside of isst-core-mbox.c. Thus move send_mbox_cmd to isst-core-mbox.c as internal functions. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 73452ccc190a416929ccf7da4061365a5eaff627 Author: Zhang Rui Date: Thu Feb 2 15:52:42 2023 +0800 tools/power/x86/intel-speed-select: Abstract adjust_uncore_freq Allow platform specific implementation to adjust the uncore frequency. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 8f54104f7a9548466027e1ee8482b18c2a72656a Author: Zhang Rui Date: Mon Aug 8 23:19:55 2022 +0800 tools/power/x86/intel-speed-select: Abstract read_pm_config Allow platform specific implementation to get SST-CP capability and current state. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit a59a6c0cadd5f0d9a6837b7f62300f7985ea0de3 Author: Zhang Rui Date: Mon Aug 8 22:57:55 2022 +0800 tools/power/x86/intel-speed-select: Abstract clos_associate Allow platform specific implementation to set per core CLOS setting. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit b161bbad6db9a1e8d7cada5bf91b21340af7b163 Author: Zhang Rui Date: Mon Aug 8 22:55:51 2022 +0800 tools/power/x86/intel-speed-select: Abstract clos_get_assoc_status Allow platform specific implementation to get per core CLOS setting. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 33dbf360db5fbc09ea1d4962a964d57b5f6004f8 Author: Zhang Rui Date: Mon Aug 8 22:53:48 2022 +0800 tools/power/x86/intel-speed-select: Abstract set_clos Allow platform specific implementation to set CLOS priority setting. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 43314e798c92b93b6f899c4dc9e027652990bdbc Author: Zhang Rui Date: Mon Aug 8 22:50:28 2022 +0800 tools/power/x86/intel-speed-select: Abstract pm_get_clos Allow platform specific implementation to get CLOS priority setting. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 904d2baa8b04691613a5e1e94061f99f0db2832c Author: Zhang Rui Date: Mon Aug 8 22:46:57 2022 +0800 tools/power/x86/intel-speed-select: Abstract pm_qos_config Allow platform specific implementation to set CLOS config settings. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit a07bdb81c1434f41eb444e51c2a4028ca2d21b30 Author: Zhang Rui Date: Mon Aug 8 22:42:47 2022 +0800 tools/power/x86/intel-speed-select: Abstract get_clos_information Allow platform specific implementation to get CLOS config setting. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 4a17b29188734f6ec4d9835d74a7489e3409c692 Author: Zhang Rui Date: Tue Aug 9 01:52:11 2022 +0800 tools/power/x86/intel-speed-select: Abstract get_get_trls Allow platform specific implementation to get turbo ratio limits of each AVX level, for a selected SST-PP level. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 855932831511eef31b5e71c3b6155fd8c57e2a0b Author: Zhang Rui Date: Thu Feb 2 14:14:54 2023 +0800 tools/power/x86/intel-speed-select: Enhance get_tdp_info mbox_get_uncore_p0_p1_info/get_p1_info/get_uncore_mem_freq can be done inside get_tdp_info(). Fold the code into get_tdp_info(). No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 00c26c1f7e3dfc0ec2e39deb1cffc2acad1d2ae4 Author: Zhang Rui Date: Thu Aug 18 00:28:41 2022 +0800 tools/power/x86/intel-speed-select: Abstract get_uncore_p0_p1_info Allow platform specific implementation to get uncore frequency info. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 7b5f586dcfdf94dad72a7f3569c100087b80a9ac Author: Zhang Rui Date: Mon Aug 8 21:52:17 2022 +0800 tools/power/x86/intel-speed-select: Abstract get_fact_info Allow platform specific implementation to get SST-TF info. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 5843f2177058dab4d656fee692a0e8a2370e2d3d Author: Zhang Rui Date: Mon Aug 8 21:44:04 2022 +0800 tools/power/x86/intel-speed-select: Abstract set_pbf_fact_status Allow platform specific implementation to enable/disable SST-TF/BF. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 05ece6916e9a302f0d1eae1744ab72946f9ff32c Author: Zhang Rui Date: Mon Aug 8 21:37:23 2022 +0800 tools/power/x86/intel-speed-select: Remove isst_get_pbf_info_complete isst_get_pbf_info_complete does nothing but just free the core_mask. Remove the function and do free core_mask directly and free core mask in the caller. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 7a1962904fe459d4763c6e02cd4b3ea503328a11 Author: Zhang Rui Date: Mon Aug 8 21:13:59 2022 +0800 tools/power/x86/intel-speed-select: Abstract get_pbf_info Allow platform specific implementation to get SST-BF information. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit f88c3c4bd431a81e50e126342f8daa6ee9171b82 Author: Zhang Rui Date: Tue Aug 9 01:49:48 2022 +0800 tools/power/x86/intel-speed-select: Abstract set_tdp_level Allow platform specific implementation to set a SST-PP level. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 1e37f1b21c7022f1d9dd641a6f2d4ffd2950202c Author: Zhang Rui Date: Mon Aug 8 21:01:08 2022 +0800 tools/power/x86/intel-speed-select: Abstract get_trl_bucket_info Allow platform specific implementation to get buckets info. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 39f768c341fa429bf9d37f477902aaf0f5aa904f Author: Zhang Rui Date: Wed Aug 17 23:19:15 2022 +0800 tools/power/x86/intel-speed-select: Abstract get_get_trl Allow platform specific implementation to get turbo ratio limit of the selected SST-PP level, and AVX level. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 668cc16cc8a0b7e3d7f2f2acff2ca3214fbe38d7 Author: Zhang Rui Date: Tue Aug 9 00:34:34 2022 +0800 tools/power/x86/intel-speed-select: Abstract get_coremask_info Allow platform specific implementation to get the core mask for a given SST-PP level. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit a30cbd2270865136fbdcf0fbf7fadda707f32bba Author: Zhang Rui Date: Mon Aug 8 20:52:23 2022 +0800 tools/power/x86/intel-speed-select: Abstract get_tjmax_info Allow platform specific implementation to get the Tjmax info for a given SST-PP level. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit e4cbd0f13f9ab3b3aefe79c45ab4d01984c37551 Author: Zhang Rui Date: Mon Aug 8 20:49:08 2022 +0800 tools/power/x86/intel-speed-select: Move code right before its caller Some functions are defined far from its only caller. Rearrange the code. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit e107dec9a8ddd97488e579f1d0cf10a849037cdf Author: Zhang Rui Date: Mon Aug 8 20:34:45 2022 +0800 tools/power/x86/intel-speed-select: Abstract get_pwr_info Allow platform specific implementation to get min and max power for a given SST-PP level. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 645b66054cb588c4aa47920643372dd6879ef3b4 Author: Zhang Rui Date: Mon Aug 8 20:31:38 2022 +0800 tools/power/x86/intel-speed-select: Abstract get_tdp_info Allow platform specific implementation to get TDP information. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit bbe32d87524b7b3fe7f758b3f789af4d8997c271 Author: Zhang Rui Date: Mon Aug 8 20:28:06 2022 +0800 tools/power/x86/intel-speed-select: Abstract get_ctdp_control Allow platform specific implementation to get SST-TF/BF/CP capabilities and status. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 724387448a45346768ca23ea92b99c67c89b82c8 Author: Zhang Rui Date: Mon Aug 8 20:23:26 2022 +0800 tools/power/x86/intel-speed-select: Abstract get_config_levels Allow platform specific implementation to get SST-PP level. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 143584e8484fd5225efc4da490d744d26d2cf64e Author: Zhang Rui Date: Sat Aug 20 19:39:52 2022 +0800 tools/power/x86/intel-speed-select: Abstract is_punit_valid Allow platform specific implementation to identify a valid punit. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit d0d1a603c5fea39ada5d3c48f8b7273a2109af07 Author: Zhang Rui Date: Sat Aug 20 18:59:54 2022 +0800 tools/power/x86/intel-speed-select: Introduce isst-core-mbox.c isst-core.c should contain generic core APIs only. Platform specific implementations/configurations should be removed from this file. Introduce isst-core-mbox.c and move all mbox/mmio specific functions to this file. Introduce struct isst_platform_ops which contains a series of callbacks that used by the core APIs but need platform specific implementation. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit e9f79348aedbd1a262bdac0f9e8b104590a30cc0 Author: Zhang Rui Date: Sat Aug 20 21:50:53 2022 +0800 tools/power/x86/intel-speed-select: Always invoke isst_fill_platform_info isst_fill_platform_info fills platform specific information. And it is the proper place to set platform specific callbacks, as done in next patch. As the platform specific callbacks are needed in all cases, including isst_print_platform_information. The best way to achieve both is to invoke isst_fill_platform_info unconditionally, and make isst_print_platform_information leverage the data already filled. No functional changes are expected. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada commit 13b868f8928c947cbf51d167f1727c446beb9933 Author: Zhang Rui Date: Sat Aug 20 18:44:59 2022 +0800 tools/power/x86/intel-speed-select: Introduce isst_get_disp_freq_multiplier Remove hardcoded DISP_FREQ_MULTIPLIER in the code and use isst_get_disp_freq_multiplier() instead. No functional changes are expected. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada commit 2042c0abf050ce9de508c9efda891de496240708 Author: Zhang Rui Date: Sat Aug 20 18:38:11 2022 +0800 tools/power/x86/intel-speed-select: Move mbox functions to isst-core.c isst-config.c should only contain generic code. Move mbox functions which are platform specific code to isst-core.c. As there are some platform specific parameters set via generic application options, introduce isst_update_platform_param to pass these parameters to platform specific code. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada commit ad7e17fcb1261a4445f973369b610c972098e87f Author: Zhang Rui Date: Wed Aug 17 16:11:13 2022 +0800 tools/power/x86/intel-speed-select: Improve isst_print_extended_platform_info The main thing done in isst_print_extended_platform_info is to get the isst feature status by checking one of the power domains of the platform. This can be done using the for_each_online_power_domain_in_set() function, which makes the code clean and easier to read. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit c77a8d4af68d98d0d83aa68f90041b395213c589 Author: Zhang Rui Date: Wed Aug 17 15:50:43 2022 +0800 tools/power/x86/intel-speed-select: Rename for_each_online_package_in_set for_each_online_package_in_set is actually used to invoke callback for each power domain. This is not a problem when there is a single power domain within a package/die, but it does not reflect the truth in multi-punit case. Rename for_each_online_package_in_set to for_each_online_power_domain_in_set. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada commit b4edf3854a01fefe2eb2b4bb329ab97aaec5d5f5 Author: Zhang Rui Date: Thu Aug 18 01:06:45 2022 +0800 tools/power/x86/intel-speed-select: Introduce support for multi-punit New platforms may have more than 1 punit in a Package/Die, thus it can have multiple power domains in a Package/Die. Package id and die id is not sufficient to refer to a specific Power domain. Introduce support for multi-punit per package/die. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 57ef2436a1759ae9d9b4d1536aed4701bfb4f737 Author: Zhang Rui Date: Wed Aug 17 15:33:23 2022 +0800 tools/power/x86/intel-speed-select: Introduce isst_is_punit_valid() Introduce isst_is_punit_valid() for checking a valid domain. For current platforms, it requires a punit 0 in a valid Package/Die. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit e157c8475e7c2d62d7b28983ea81167f3e6a5a57 Author: Zhang Rui Date: Wed Aug 17 14:51:40 2022 +0800 tools/power/x86/intel-speed-select: Introduce punit to isst_id Punit id can also be retrieved from ISST_IF_GET_PHY_ID. punit id is unique within a Package/Die, and together with Package id and Die id, they can be used to refer to a specific SST power domain. For current platforms, Punit id is always Zero. So no functional changes are expected for the current platforms. While here, prevent issuing IOCTL if the file /dev/isst_interface can't be opened. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 16c1892080d841e5d4b59295b96ae760b83c0b7f Author: Zhang Rui Date: Sat Aug 20 18:33:01 2022 +0800 tools/power/x86/intel-speed-select: Follow TRL nameing for FACT info SST-TF high priority core count and ratios and low priority core ratios are also per TRL level. Cleanup the code to follow the same nameing convention as TRL. This removes hardcoded TRL level names and variables. No functional changes are expected. Signed-off-by: Zhang Rui Signed-off-by: Srinivas Pandruvada commit 7c7e7c0d396b99d5b41d052dbf2b2bddcd5f7f3c Author: Zhang Rui Date: Sat Aug 20 18:11:21 2022 +0800 tools/power/x86/intel-speed-select: Unify TRL levels TRL supports different levels including SSE/AVX2/AVX512. Avoid using hardcoded level name and structure fields, so that a loop can be used to parse each TRL level instead. This reduces several lines of source code. No functional changes are expected. Signed-off-by: Zhang Rui [srinivas.pandruvada@linux.intel.com: changelog edits] Signed-off-by: Srinivas Pandruvada commit 5fbff260755750559aa12a30f6fa7f8a863666f1 Author: Chang S. Bae Date: Fri Jan 20 16:19:00 2023 -0800 Documentation/x86: Explain the state component permission for guests Commit 980fe2fddcff ("x86/fpu: Extend fpu_xstate_prctl() with guest permissions") extends a couple of arch_prctl(2) options for VCPU threads. Add description for them. Signed-off-by: Chang S. Bae Signed-off-by: Dave Hansen Reviewed-by: Thiago Macieira Reviewed-by: Yang Zhong Reviewed-by: Tony Luck Link: https://lore.kernel.org/all/20230121001900.14900-5-chang.seok.bae%40intel.com commit 7f9daaf59e14d62b29b6f4ca743e17bf96ff42ae Author: Chang S. Bae Date: Fri Jan 20 16:18:59 2023 -0800 Documentation/x86: Add the AMX enabling example Explain steps to enable the dynamic feature with a code example. Signed-off-by: Chang S. Bae Signed-off-by: Dave Hansen Reviewed-by: Thiago Macieira Reviewed-by: Bagas Sanjaya Reviewed-by: Tony Luck Link: https://lore.kernel.org/all/20230121001900.14900-4-chang.seok.bae%40intel.com commit a03c376ebaf38394a63a75292329f38a47520c2c Author: Chang S. Bae Date: Fri Jan 20 16:18:58 2023 -0800 x86/arch_prctl: Add AMX feature numbers as ABI constants Each distinct XSAVE feature has a number assigned to it. Among other things, the number determines the ordering of features in the XSAVE buffer and is also used to generate XSAVE bitmasks like the value for XCR0. AMX state is dynamically enabled by the architecture-specific prctl(). This prctl() takes one XSAVE feature number as an argument. However, the feature numbers are not defined in any readily available userspace headers. The means that each userspace app trying to use dynamic feature prctl()s will likely end up defining their own constants for each feature. Since these feature numbers are a part of the uabi, expose them in the prctl() uabi header. Save everyone the trouble of looking them up and defining their own. [ dhansen: expand changelog a bit ] Signed-off-by: Chang S. Bae Signed-off-by: Dave Hansen Reviewed-by: Tony Luck Link: https://lore.kernel.org/all/20230121001900.14900-3-chang.seok.bae%40intel.com commit ad9c29f3c29197aa25d26a5f258a98e4cb901996 Author: Chang S. Bae Date: Fri Jan 20 16:18:57 2023 -0800 Documentation/x86: Explain the purpose for dynamic features This summary will help to guide the proper use of the enabling model. Signed-off-by: Chang S. Bae Signed-off-by: Dave Hansen Reviewed-by: Tony Luck Link: https://lore.kernel.org/all/20230121001900.14900-2-chang.seok.bae%40intel.com commit e88adb4ac27a37de4167150b8a6a736d40cf7018 Author: Tom Rix Date: Thu Mar 16 09:23:02 2023 -0400 drm/rockchip: vop2: fix uninitialized variable possible_crtcs clang reportes this error drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:2322:8: error: variable 'possible_crtcs' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (vp) { ^~ drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:2336:36: note: uninitialized use occurs here ret = vop2_plane_init(vop2, win, possible_crtcs); ^~~~~~~~~~~~~~ drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:2322:4: note: remove the 'if' if its condition is always true if (vp) { ^~~~~~~~ The else-statement changes the win->type to OVERLAY without setting the possible_crtcs variable. Rework the block, initialize possible_crtcs to 0 to remove the else-statement. Split the else-if-statement out to its own if-statement so the OVERLAY check will catch when the win-type has been changed. Fixes: 368419a2d429 ("drm/rockchip: vop2: initialize possible_crtcs properly") Signed-off-by: Tom Rix Acked-by: Michael Riesch Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20230316132302.531724-1-trix@redhat.com commit 3763bf58029f3459d7187f687eadfc8eb08e5ca8 Author: Sean Christopherson Date: Wed Mar 22 11:33:08 2023 -0700 x86/cpufeatures: Redefine synthetic virtual NMI bit as AMD's "real" vNMI The existing X86_FEATURE_VNMI is a synthetic feature flag that exists purely to maintain /proc/cpuinfo's ABI, the "real" Intel vNMI feature flag is tracked as VMX_FEATURE_VIRTUAL_NMIS, as the feature is enumerated through VMX MSRs, not CPUID. AMD is also gaining virtual NMI support, but in true VMX vs. SVM form, enumerates support through CPUID, i.e. wants to add real feature flag for vNMI. Redefine the syntheic X86_FEATURE_VNMI to AMD's real CPUID bit to avoid having both X86_FEATURE_VNMI and e.g. X86_FEATURE_AMD_VNMI. Signed-off-by: Sean Christopherson commit ab2ee212a57bf136b896a47ce37da38a1fdbdc36 Author: Sean Christopherson Date: Mon Feb 27 14:10:12 2023 +0530 KVM: x86: Save/restore all NMIs when multiple NMIs are pending Save all pending NMIs in KVM_GET_VCPU_EVENTS, and queue KVM_REQ_NMI if one or more NMIs are pending after KVM_SET_VCPU_EVENTS in order to re-evaluate pending NMIs with respect to NMI blocking. KVM allows multiple NMIs to be pending in order to faithfully emulate bare metal handling of simultaneous NMIs (on bare metal, truly simultaneous NMIs are impossible, i.e. one will always arrive first and be consumed). Support for simultaneous NMIs botched the save/restore though. KVM only saves one pending NMI, but allows userspace to restore 255 pending NMIs as kvm_vcpu_events.nmi.pending is a u8, and KVM's internal state is stored in an unsigned int. Fixes: 7460fb4a3400 ("KVM: Fix simultaneous NMIs") Signed-off-by: Santosh Shukla Link: https://lore.kernel.org/r/20230227084016.3368-8-santosh.shukla@amd.com Signed-off-by: Sean Christopherson commit 400fee8c9b2df61721de8103a4054247bea79fd0 Author: Sean Christopherson Date: Mon Feb 27 14:10:11 2023 +0530 KVM: x86: Tweak the code and comment related to handling concurrent NMIs Tweak the code and comment that deals with concurrent NMIs to explicitly call out that x86 allows exactly one pending NMI, but that KVM needs to temporarily allow two pending NMIs in order to workaround the fact that the target vCPU cannot immediately recognize an incoming NMI, unlike bare metal. No functional change intended. Signed-off-by: Santosh Shukla Link: https://lore.kernel.org/r/20230227084016.3368-7-santosh.shukla@amd.com Signed-off-by: Sean Christopherson commit 2cb9317377caaec647d7485bc53ab33a0b54f27c Author: Sean Christopherson Date: Mon Feb 27 14:10:10 2023 +0530 KVM: x86: Raise an event request when processing NMIs if an NMI is pending Don't raise KVM_REQ_EVENT if no NMIs are pending at the end of process_nmi(). Finishing process_nmi() without a pending NMI will become much more likely when KVM gains support for AMD's vNMI, which allows pending vNMIs in hardware, i.e. doesn't require explicit injection. Signed-off-by: Santosh Shukla Link: https://lore.kernel.org/r/20230227084016.3368-6-santosh.shukla@amd.com Signed-off-by: Sean Christopherson commit 772f254d4d5687ee349cbe443959bc01304880d6 Author: Maxim Levitsky Date: Mon Feb 27 14:10:09 2023 +0530 KVM: SVM: add wrappers to enable/disable IRET interception SEV-ES guests don't use IRET interception for the detection of an end of a NMI. Therefore it makes sense to create a wrapper to avoid repeating the check for the SEV-ES. No functional change is intended. Suggested-by: Sean Christopherson Signed-off-by: Maxim Levitsky [Renamed iret intercept API of style svm_{clr,set}_iret_intercept()] Signed-off-by: Santosh Shukla Link: https://lore.kernel.org/r/20230227084016.3368-5-santosh.shukla@amd.com Signed-off-by: Sean Christopherson commit 5d1ec4565200f461943990f0988932ca86823087 Author: Maxim Levitsky Date: Mon Feb 27 14:10:08 2023 +0530 KVM: nSVM: Raise event on nested VM exit if L1 doesn't intercept IRQs If L1 doesn't intercept interrupts, then KVM will use vmcb02's V_IRQ to detect an interrupt window for L1 IRQs. On a subsequent nested VM-Exit, KVM might need to copy the current V_IRQ from vmcb02 to vmcb01 to continue waiting for an interrupt window, i.e. if there is still a pending IRQ for L1. Raise KVM_REQ_EVENT on nested exit if L1 isn't intercepting IRQs to ensure that KVM will re-enable interrupt window detection if needed. Note that this is a theoretical bug because KVM already raises KVM_REQ_EVENT on each nested VM exit, because the nested VM exit resets RFLAGS and kvm_set_rflags() raises the KVM_REQ_EVENT unconditionally. Explicitly raise KVM_REQ_EVENT for the interrupt window case to avoid having an unnecessary dependency on kvm_set_rflags(), and to document the scenario. Signed-off-by: Maxim Levitsky [santosh: reworded description as per Sean's v2 comment] Signed-off-by: Santosh Shukla Link: https://lore.kernel.org/r/20230227084016.3368-4-santosh.shukla@amd.com [sean: further massage changelog and comment] Signed-off-by: Sean Christopherson commit bf6479dbe743ca343fa122aaffbe9dcb1de80a51 Author: Greg Kroah-Hartman Date: Wed Mar 22 10:05:57 2023 +0100 cpuidle: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. This allows us to clean up the cpuidle_add_interface() call a bit as it was only called in one place, with the same argument so just put that into the function itself. Note that cpuidle_remove_interface() should also probably be removed in the future as there are no callers of it for some reason. Cc: Daniel Lezcano Cc: linux-pm@vger.kernel.org Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230322090557.2943479-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit af48ab8b39ee9e4c4593a5da6e2501ebb8f99b12 Author: Greg Kroah-Hartman Date: Wed Mar 22 09:36:46 2023 +0100 ACPI: LPIT: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Len Brown Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230322083646.2937580-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 7334ede457c6f1f7a26344ed25928f63f9a53a8d Author: Santosh Shukla Date: Mon Feb 27 14:10:07 2023 +0530 KVM: nSVM: Disable intercept of VINTR if saved L1 host RFLAGS.IF is 0 Disable intercept of virtual interrupts (used to detect interrupt windows) if the saved host (L1) RFLAGS.IF is '0', as the effective RFLAGS.IF for L1 interrupts will never be set while L2 is running (L2's RFLAGS.IF doesn't affect L1 IRQs when virtual interrupts are enabled). Suggested-by: Sean Christopherson Link: https://lkml.kernel.org/r/Y9hybI65So5X2LFg%40google.com Signed-off-by: Santosh Shukla Link: https://lore.kernel.org/r/20230227084016.3368-3-santosh.shukla@amd.com Signed-off-by: Sean Christopherson commit 5faaffab5ba8cd4f3781b90cccd47440b54aea5b Author: Santosh Shukla Date: Mon Feb 27 14:10:06 2023 +0530 KVM: nSVM: Don't sync vmcb02 V_IRQ back to vmcb12 if KVM (L0) is intercepting VINTR Don't sync vmcb02 V_IRQ back to vmcb12 if KVM (L0) is intercepting virtual interrupts in order to request an interrupt window, as KVM has usurped vmcb02's int_ctl. If an interrupt window opens before the next VM-Exit, svm_clear_vintr() will restore vmcb12's int_ctl. If no window opens, V_IRQ will be correctly preserved in vmcb12's int_ctl (because it was never recognized while L2 was running). Suggested-by: Sean Christopherson Link: https://lkml.kernel.org/r/Y9hybI65So5X2LFg%40google.com Signed-off-by: Santosh Shukla Link: https://lore.kernel.org/r/20230227084016.3368-2-santosh.shukla@amd.com Signed-off-by: Sean Christopherson commit 8ffdb1fe9121f85232171630a8cfb0574cbf81b2 Author: Jingyu Wang Date: Wed Mar 8 20:28:30 2023 +0800 cpufreq: Fix typo in the ARM_BRCMSTB_AVS_CPUFREQ Kconfig entry Delete the redundant word 'to' from the help text in the ARM_BRCMSTB_AVS_CPUFREQ Kconfig entry. Signed-off-by: Jingyu Wang [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 877d5cd2aeed8fddeb3afe174c6b9eb77cd56f8b Author: qinyu Date: Mon Mar 20 16:17:02 2023 +0800 cpufreq: warn about invalid vals to scaling_max/min_freq interfaces When echo an invalid val to scaling_min_freq: > echo 123abc123 > scaling_min_freq It looks weird to have a return val of 0: > echo $? > 0 Sane people won't echo strings like that into these interfaces but fuzz tests may do. Also, maybe it's better to inform people if input is invalid. After this: > echo 123abc123 > scaling_min_freq > -bash: echo: write error: Invalid argument Signed-off-by: qinyu Tested-by: zhangxiaofeng Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 57373671d5f5a92ee02d32e0b8506351ae30d33f Author: Randy Dunlap Date: Thu Jan 26 22:39:45 2023 -0800 Documentation: litmus-tests: Correct spelling Correct spelling problems for Documentation/litmus-tests/ as reported by codespell. Signed-off-by: Randy Dunlap Cc: Alan Stern Cc: Andrea Parri Cc: Will Deacon Cc: Peter Zijlstra Cc: Boqun Feng Cc: Nicholas Piggin Cc: David Howells Cc: Jade Alglave Cc: Luc Maranget Cc: "Paul E. McKenney" Cc: linux-arch@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Reviewed-by: David Howells Signed-off-by: Paul E. McKenney commit de0418053215482cc61843244fc7c1385ddf63a7 Author: Alan Stern Date: Fri Feb 24 10:30:48 2023 -0500 tools/memory-model: Add documentation about SRCU read-side critical sections Expand the discussion of SRCU and its read-side critical sections in the Linux Kernel Memory Model documentation file explanation.txt. The new material discusses recent changes to the memory model made in commit 6cd244c87428 ("tools/memory-model: Provide exact SRCU semantics"). Signed-off-by: Alan Stern Co-developed-by: Joel Fernandes (Google) Signed-off-by: Joel Fernandes (Google) Reviewed-by: Akira Yokosawa Cc: Andrea Parri Cc: Boqun Feng Cc: Jade Alglave Cc: Jonas Oberhauser Cc: Luc Maranget Cc: "Paul E. McKenney" Cc: Peter Zijlstra CC: Will Deacon Signed-off-by: Paul E. McKenney commit 762e9357e713a2025db05bc36a36a7afc248f9d3 Author: Jonas Oberhauser Date: Fri Feb 24 14:52:51 2023 +0100 tools/memory-model: Make ppo a subrelation of po As stated in the documentation and implied by its name, the ppo (preserved program order) relation is intended to link po-earlier to po-later instructions under certain conditions. However, a corner case currently allows instructions to be linked by ppo that are not executed by the same thread, i.e., instructions are being linked that have no po relation. This happens due to the mb/strong-fence/fence relations, which (as one case) provide order when locks are passed between threads followed by an smp_mb__after_unlock_lock() fence. This is illustrated in the following litmus test (as can be seen when using herd7 with `doshow ppo`): P0(spinlock_t *x, spinlock_t *y) { spin_lock(x); spin_unlock(x); } P1(spinlock_t *x, spinlock_t *y) { spin_lock(x); smp_mb__after_unlock_lock(); *y = 1; } The ppo relation will link P0's spin_lock(x) and P1's *y=1, because P0 passes a lock to P1 which then uses this fence. The patch makes ppo a subrelation of po by letting fence contribute to ppo only in case the fence links events of the same thread. Signed-off-by: Jonas Oberhauser Acked-by: Alan Stern Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney commit 614e40faf5ae30113f94b00106ce690602f10fc2 Author: Alan Stern Date: Wed Jan 25 15:21:42 2023 -0500 tools/memory-model: Provide exact SRCU semantics LKMM has long provided only approximate handling of SRCU read-side critical sections. This has not been a pressing problem because LKMM's traditional handling is correct for the common cases of non-overlapping and properly nested critical sections. However, LKMM's traditional handling of partially overlapping critical sections incorrectly fuses them into one large critical section. For example, consider the following litmus test: ------------------------------------------------------------------------ C C-srcu-nest-5 (* * Result: Sometimes * * This demonstrates non-nested overlapping of SRCU read-side critical * sections. Unlike RCU, SRCU critical sections do not unconditionally * nest. *) {} P0(int *x, int *y, struct srcu_struct *s1) { int r1; int r2; int r3; int r4; r3 = srcu_read_lock(s1); r2 = READ_ONCE(*y); r4 = srcu_read_lock(s1); srcu_read_unlock(s1, r3); r1 = READ_ONCE(*x); srcu_read_unlock(s1, r4); } P1(int *x, int *y, struct srcu_struct *s1) { WRITE_ONCE(*y, 1); synchronize_srcu(s1); WRITE_ONCE(*x, 1); } locations [0:r1] exists (0:r1=1 /\ 0:r2=0) ------------------------------------------------------------------------ Current mainline incorrectly flattens the two critical sections into one larger critical section, giving "Never" instead of the correct "Sometimes": ------------------------------------------------------------------------ $ herd7 -conf linux-kernel.cfg C-srcu-nest-5.litmus Test C-srcu-nest-5 Allowed States 3 0:r1=0; 0:r2=0; 0:r1=0; 0:r2=1; 0:r1=1; 0:r2=1; No Witnesses Positive: 0 Negative: 3 Flag srcu-bad-nesting Condition exists (0:r1=1 /\ 0:r2=0) Observation C-srcu-nest-5 Never 0 3 Time C-srcu-nest-5 0.01 Hash=e692c106cf3e84e20f12991dc438ff1b ------------------------------------------------------------------------ To its credit, it does complain about bad nesting. But with this commit we get the following result, which has the virtue of being correct: ------------------------------------------------------------------------ $ herd7 -conf linux-kernel.cfg C-srcu-nest-5.litmus Test C-srcu-nest-5 Allowed States 4 0:r1=0; 0:r2=0; 0:r1=0; 0:r2=1; 0:r1=1; 0:r2=0; 0:r1=1; 0:r2=1; Ok Witnesses Positive: 1 Negative: 3 Condition exists (0:r1=1 /\ 0:r2=0) Observation C-srcu-nest-5 Sometimes 1 3 Time C-srcu-nest-5 0.05 Hash=e692c106cf3e84e20f12991dc438ff1b ------------------------------------------------------------------------ In addition, there are new srcu_down_read() and srcu_up_read() functions on their way to mainline. Roughly speaking, these are to srcu_read_lock() and srcu_read_unlock() as down() and up() are to mutex_lock() and mutex_unlock(). The key point is that srcu_down_read() can execute in one process and the matching srcu_up_read() in another, as shown in this litmus test: ------------------------------------------------------------------------ C C-srcu-nest-6 (* * Result: Never * * This would be valid for srcu_down_read() and srcu_up_read(). *) {} P0(int *x, int *y, struct srcu_struct *s1, int *idx, int *f) { int r2; int r3; r3 = srcu_down_read(s1); WRITE_ONCE(*idx, r3); r2 = READ_ONCE(*y); smp_store_release(f, 1); } P1(int *x, int *y, struct srcu_struct *s1, int *idx, int *f) { int r1; int r3; int r4; r4 = smp_load_acquire(f); r1 = READ_ONCE(*x); r3 = READ_ONCE(*idx); srcu_up_read(s1, r3); } P2(int *x, int *y, struct srcu_struct *s1) { WRITE_ONCE(*y, 1); synchronize_srcu(s1); WRITE_ONCE(*x, 1); } locations [0:r1] filter (1:r4=1) exists (1:r1=1 /\ 0:r2=0) ------------------------------------------------------------------------ When run on current mainline, this litmus test gets a complaint about an unknown macro srcu_down_read(). With this commit: ------------------------------------------------------------------------ herd7 -conf linux-kernel.cfg C-srcu-nest-6.litmus Test C-srcu-nest-6 Allowed States 3 0:r1=0; 0:r2=0; 1:r1=0; 0:r1=0; 0:r2=1; 1:r1=0; 0:r1=0; 0:r2=1; 1:r1=1; No Witnesses Positive: 0 Negative: 3 Condition exists (1:r1=1 /\ 0:r2=0) Observation C-srcu-nest-6 Never 0 3 Time C-srcu-nest-6 0.02 Hash=c1f20257d052ca5e899be508bedcb2a1 ------------------------------------------------------------------------ Note that the user must supply the flag "f" and the "filter" clause, similar to what must be done to emulate call_rcu(). The commit works by treating srcu_read_lock()/srcu_down_read() as loads and srcu_read_unlock()/srcu_up_read() as stores. This allows us to determine which unlock matches which lock by looking for a data dependency between them. In order for this to work properly, the data dependencies have to be tracked through stores to intermediate variables such as "idx" in the litmus test above; this is handled by the new carry-srcu-data relation. But it's important here (and in the existing carry-dep relation) to avoid tracking the dependencies through SRCU unlock stores. Otherwise, in situations resembling: A: r1 = srcu_read_lock(s); B: srcu_read_unlock(s, r1); C: r2 = srcu_read_lock(s); D: srcu_read_unlock(s, r2); it would look as if D was dependent on both A and C, because "s" would appear to be an intermediate variable written by B and read by C. This explains the complications in the definitions of carry-srcu-dep and carry-dep. As a debugging aid, the commit adds a check for errors in which the value returned by one call to srcu_read_lock()/srcu_down_read() is passed to more than one instance of srcu_read_unlock()/srcu_up_read(). Finally, since these SRCU-related primitives are now treated as ordinary reads and writes, we have to add them into the lists of marked accesses (i.e., not subject to data races) and lock-related accesses (i.e., one shouldn't try to access an srcu_struct with a non-lock-related primitive such as READ_ONCE() or a plain write). Portions of this approach were suggested by Boqun Feng and Jonas Oberhauser. [ paulmck: Fix space-before-tab whitespace nit. ] Reported-by: Paul E. McKenney Signed-off-by: Alan Stern Reviewed-by: Jonas Oberhauser Signed-off-by: Paul E. McKenney commit aa568c26cad774f75766150a990cbd5fbafbff14 Author: Joel Fernandes (Google) Date: Fri Feb 3 20:19:13 2023 +0000 tools/memory-model: Restrict to-r to read-read address dependency During a code-reading exercise of linux-kernel.cat CAT file, I generated a graph to show the to-r relations. While likely not problematic for the model, I found it confusing that a read-write address dependency would show as a to-r edge on the graph. This patch therefore restricts the to-r links derived from addr to only read-read address dependencies, so that read-write address dependencies don't show as to-r in the graphs. This should also prevent future users of to-r from deriving incorrect relations. Note that a read-write address dep, obviously, still ends up in the ppo relation via the to-w relation. I verified that a read-read address dependency still shows up as a to-r link in the graph, as it did before. For reference, the problematic graph was generated with the following command: herd7 -conf linux-kernel.cfg \ -doshow dep -doshow to-r -doshow to-w ./foo.litmus -show all -o OUT/ Signed-off-by: Joel Fernandes (Google) Acked-by: Alan Stern Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney commit 02bae7a24257947fe95fcca80c78e6cb602e94bf Author: Paul E. McKenney Date: Sun Jan 29 09:41:44 2023 -0800 tools/memory-model: Add smp_mb__after_srcu_read_unlock() This commit adds support for smp_mb__after_srcu_read_unlock(), which, when combined with a prior srcu_read_unlock(), implies a full memory barrier. No ordering is guaranteed to accesses between the two, and placing accesses between is bad practice in any case. Tests may be found at https://github.com/paulmckrcu/litmus in files matching manual/kernel/C-srcu-mb-*.litmus. Signed-off-by: Paul E. McKenney commit dd409de256333899b2632c769dc798b7db537397 Author: Jonas Oberhauser Date: Thu Jan 26 14:46:03 2023 +0100 tools/memory-model: Unify UNLOCK+LOCK pairings to po-unlock-lock-po LKMM uses two relations for talking about UNLOCK+LOCK pairings: 1) po-unlock-lock-po, which handles UNLOCK+LOCK pairings on the same CPU or immediate lock handovers on the same lock variable 2) po;[UL];(co|po);[LKW];po, which handles UNLOCK+LOCK pairs literally as described in rcupdate.h#L1002, i.e., even after a sequence of handovers on the same lock variable. The latter relation is used only once, to provide the guarantee defined in rcupdate.h#L1002 by smp_mb__after_unlock_lock(), which makes any UNLOCK+LOCK pair followed by the fence behave like a full barrier. This patch drops this use in favor of using po-unlock-lock-po everywhere, which unifies the way the model talks about UNLOCK+LOCK pairings. At first glance this seems to weaken the guarantee given by LKMM: When considering a long sequence of lock handovers such as below, where P0 hands the lock to P1, which hands it to P2, which finally executes such an after_unlock_lock fence, the mb relation currently links any stores in the critical section of P0 to instructions P2 executes after its fence, but not so after the patch. P0(int *x, int *y, spinlock_t *mylock) { spin_lock(mylock); WRITE_ONCE(*x, 2); spin_unlock(mylock); WRITE_ONCE(*y, 1); } P1(int *y, int *z, spinlock_t *mylock) { int r0 = READ_ONCE(*y); // reads 1 spin_lock(mylock); spin_unlock(mylock); WRITE_ONCE(*z,1); } P2(int *z, int *d, spinlock_t *mylock) { int r1 = READ_ONCE(*z); // reads 1 spin_lock(mylock); spin_unlock(mylock); smp_mb__after_unlock_lock(); WRITE_ONCE(*d,1); } P3(int *x, int *d) { WRITE_ONCE(*d,2); smp_mb(); WRITE_ONCE(*x,1); } exists (1:r0=1 /\ 2:r1=1 /\ x=2 /\ d=2) Nevertheless, the ordering guarantee given in rcupdate.h is actually not weakened. This is because the unlock operations along the sequence of handovers are A-cumulative fences. They ensure that any stores that propagate to the CPU performing the first unlock operation in the sequence must also propagate to every CPU that performs a subsequent lock operation in the sequence. Therefore any such stores will also be ordered correctly by the fence even if only the final handover is considered a full barrier. Indeed this patch does not affect the behaviors allowed by LKMM at all. The mb relation is used to define ordering through: 1) mb/.../ppo/hb, where the ordering is subsumed by hb+ where the lock-release, rfe, and unlock-acquire orderings each provide hb 2) mb/strong-fence/cumul-fence/prop, where the rfe and A-cumulative lock-release orderings simply add more fine-grained cumul-fence edges to substitute a single strong-fence edge provided by a long lock handover sequence 3) mb/strong-fence/pb and various similar uses in the definition of data races, where as discussed above any long handover sequence can be turned into a sequence of cumul-fence edges that provide the same ordering. Signed-off-by: Jonas Oberhauser Reviewed-by: Alan Stern Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney commit 627c9ad04f01221b4396f3df839c5dd994f327b4 Author: Alan Stern Date: Wed Jan 25 15:20:51 2023 -0500 tools/memory-model: Update some warning labels Some of the warning labels used in the LKMM are unfortunately ambiguous. In particular, the same warning is used for both an unmatched rcu_read_lock() call and for an unmatched rcu_read_unlock() call. Likewise for the srcu_* equivalents. Also, the warning about passing a wrong value to srcu_read_unlock() -- i.e., a value different from the one returned by the matching srcu_read_lock() -- talks about bad nesting rather than non-matching values. Let's update the warning labels to make their meanings more clear. Signed-off-by: Alan Stern Reviewed-by: Jonas Oberhauser Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney commit 935d31fdda2c69324b3eeb648a73fdedf4131474 Author: Jyri Sarha Date: Wed Mar 22 20:18:30 2023 +0200 ASoC: SOF: ipc4/intel: Add missing mutex_unlock() There was a missing mutex_unlock() in sof_ipc4_widget_free() use_chain_dma if-branch that caused a static analysis error. The branch should not be used in a normal working configuration and if its used its an indication of a bad topology. Add missing mutex_unlock() and a warning print if the if-branch is taken, and another warning print to a symmetric place in sof_ipc4_widget_setup(). Fixes: ca5ce0caa67fa9 ("ASoC: SOF: ipc4/intel: Add support for chained DMA") Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202303222050.dCw0fPCW-lkp@intel.com/ Signed-off-by: Jyri Sarha Link: https://lore.kernel.org/r/20230322181830.574635-1-jyri.sarha@linux.intel.com Signed-off-by: Mark Brown commit 89d7971eb2318595bc3b6ab7c5caede112c302ff Author: Luis Chamberlain Date: Fri Mar 10 15:32:48 2023 -0800 x86: Simplify one-level sysctl registration for itmt_kern_table There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20230310233248.3965389-3-mcgrof%40kernel.org commit 3f6cc47f5eb40d96ce8cf443282a2c29fd629a76 Author: Luis Chamberlain Date: Fri Mar 10 15:32:47 2023 -0800 x86: Simplify one-level sysctl registration for abi_table2 There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20230310233248.3965389-2-mcgrof%40kernel.org commit da30a34a0edb88144ac10db5ef781ae84769af67 Author: Andy Shevchenko Date: Wed Mar 22 12:22:57 2023 +0200 ACPI: SPCR: Prefix error messages with FW_BUG The table values that are not defined in the specification are considered non-fatal errors in the code. However, they are firmware bugs, so point this out in the messages by prefixing them with FW_BUG. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit ba31f89c1bf8c297ae411dc6e1659c3b53ef6892 Merge: f134bb6e284ce f19f24d479006 Author: Mark Brown Date: Wed Mar 22 18:44:52 2023 +0000 ASoC: Intel: sof_rt5682: Updates for MTL BT offload Merge series from Peter Ujfalusi : Enable BT offload for Rex variants and RVP. commit f134bb6e284cefef18ab0273954c32f08d61fa1f Merge: 59385ed41c37b 51ce3e6effab4 Author: Mark Brown Date: Wed Mar 22 18:44:46 2023 +0000 ASoC: SOF: pcm/Intel: Handle IPC dependent sequencing Merge series from Peter Ujfalusi : IPC3 and IPC4 firmwares handle and execute tasks at different stages, like managing DMAs. In most cases these are aligned, but we have few exceptions that needs to be handled differently. This series introduces flags to handle the differing cases to make sure that the correct sequencing is used regerless of the IPC version. commit 073828e954459b883f23e53999d31e4c55ab9654 Author: Roger Pau Monne Date: Wed Mar 22 12:13:29 2023 +0100 ACPI: processor: Fix evaluating _PDC method when running as Xen dom0 In ACPI systems, the OS can direct power management, as opposed to the firmware. This OS-directed Power Management is called OSPM. Part of telling the firmware that the OS going to direct power management is making ACPI "_PDC" (Processor Driver Capabilities) calls. These _PDC methods must be evaluated for every processor object. If these _PDC calls are not completed for every processor it can lead to inconsistency and later failures in things like the CPU frequency driver. In a Xen system, the dom0 kernel is responsible for system-wide power management. The dom0 kernel is in charge of OSPM. However, the number of CPUs available to dom0 can be different than the number of CPUs physically present on the system. This leads to a problem: the dom0 kernel needs to evaluate _PDC for all the processors, but it can't always see them. In dom0 kernels, ignore the existing ACPI method for determining if a processor is physically present because it might not be accurate. Instead, ask the hypervisor for this information. Fix this by introducing a custom function to use when running as Xen dom0 in order to check whether a processor object matches a CPU that's online. Such checking is done using the existing information fetched by the Xen pCPU subsystem, extending it to also store the ACPI ID. This ensures that _PDC method gets evaluated for all physically online CPUs, regardless of the number of CPUs made available to dom0. Fixes: 5d554a7bb064 ("ACPI: processor: add internal processor_physically_present()") Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Signed-off-by: Rafael J. Wysocki commit 7a3a401874bea02f568aa416ac29170d8cde0dc2 Author: Kirill A. Shutemov Date: Tue Mar 21 03:35:11 2023 +0300 x86/tdx: Drop flags from __tdx_hypercall() After TDX_HCALL_ISSUE_STI got dropped, the only flag left is TDX_HCALL_HAS_OUTPUT. The flag indicates if the caller wants to see tdx_hypercall_args updated based on the hypercall output. Drop the flags and provide __tdx_hypercall_ret() that matches TDX_HCALL_HAS_OUTPUT semantics. Suggested-by: Peter Zijlstra Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20230321003511.9469-1-kirill.shutemov%40linux.intel.com commit 22767544e9763e82acb60c233051bc426381b61c Author: Uros Bizjak Date: Mon Mar 20 22:20:12 2023 +0100 x86/ACPI/boot: Improve __acpi_acquire_global_lock Improve __acpi_acquire_global_lock by using a temporary variable. This enables compiler to perform if-conversion and improves generated code from: ... 72a: d1 ea shr %edx 72c: 83 e1 fc and $0xfffffffc,%ecx 72f: 83 e2 01 and $0x1,%edx 732: 09 ca or %ecx,%edx 734: 83 c2 02 add $0x2,%edx 737: f0 0f b1 17 lock cmpxchg %edx,(%rdi) 73b: 75 e9 jne 726 <__acpi_acquire_global_lock+0x6> 73d: 83 e2 03 and $0x3,%edx 740: 31 c0 xor %eax,%eax 742: 83 fa 03 cmp $0x3,%edx 745: 0f 95 c0 setne %al 748: f7 d8 neg %eax to: ... 72a: d1 e9 shr %ecx 72c: 83 e2 fc and $0xfffffffc,%edx 72f: 83 e1 01 and $0x1,%ecx 732: 09 ca or %ecx,%edx 734: 83 c2 02 add $0x2,%edx 737: f0 0f b1 17 lock cmpxchg %edx,(%rdi) 73b: 75 e9 jne 726 <__acpi_acquire_global_lock+0x6> 73d: 8d 41 ff lea -0x1(%rcx),%eax BTW: the compiler could generate: lea 0x2(%rcx,%rdx,1),%edx instead of: or %ecx,%edx add $0x2,%edx but unwated conversion from add to or when bits are known to be zero prevents this improvement. This is GCC PR108477. No functional change intended. Signed-off-by: Uros Bizjak Signed-off-by: Dave Hansen Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/all/20230320212012.12704-1-ubizjak%40gmail.com commit 10d29bdceef79602af4136c14a6ec391ec3a2e7f Author: Imre Deak Date: Wed Mar 22 00:01:01 2023 +0200 drm/i915/tc: Check the PLL type used by an enabled TC port The current way to determine during HW state sanitization if a PHY is connected in the expected way doesn't work in all cases. The check for this considers only the PHY ready/owned state and the initial TC mode which was determined earlier by the TC port HW readout - using the sink's HPD and the same PHY ready/owned states. For instance for an enabled DP-alt/TBT port without the PHY ready/owned flags set the initial mode will be TBT, and this will be regarded as a valid PHY state. However it's possible that the port is actually enabled in DP-alt mode, but for some reason the PHY ownership was not acquired. Make sure the driver can detect invalid PHY states as in the above example by checking the PHY ready/owned state wrt. the PLL type used. This should be the TBT PLL if the PHY is not owned and the MG (non-TBT) PLL if the PHY is owned. v2: Rebased on change passing crtc_state in the previous patch. Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230321220101.983366-3-imre.deak@intel.com commit 2a4d292f056b35f54cd7788e124937fe598369c4 Author: Imre Deak Date: Wed Mar 22 00:01:00 2023 +0200 drm/i915/tc: Factor out a function querying active links on a TC port For clarity factor out the function to determine if there are active links on a TC port. This prepares for the next patch also checking the port's PLL type. While at it pass crtc_state to intel_tc_port_sanitize_mode(), and check hw.active in that, instead of the deprecated crtc->active flag. v2: Check crtc_state->hw.active instead of crtc->active. (Ville) Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230321220101.983366-2-imre.deak@intel.com commit 7c1da0683e2adb969005ea195cb6bed22f844a69 Author: Imre Deak Date: Thu Mar 16 15:17:22 2023 +0200 drm/i915: Add encoder hook to get the PLL type used by TC ports Add an encoder hook, which can be called on enabled TC ports to determine if the port uses a TBT or a non-TBT PLL. An upcoming patch will use this to sanity check active TC port's PHY state wrt. the PLL type used by the port. Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230316131724.359612-13-imre.deak@intel.com commit 40a55b842bbcd3d79b7a8ff7c426b22b6700768b Author: Imre Deak Date: Wed Mar 22 00:00:59 2023 +0200 drm/i915/tc: Assume a TC port is legacy if VBT says the port has HDMI Since an HDMI output can only be enabled in legacy mode on TC ports, assume that VBT is wrong and the port is legacy if VBT says the port is non-legacy and has HDMI. If VBT says to enable DP as well leave the non-legacy flag enabled, relying on the flag getting fixed up based on the HPD status during sink detection. v2: Fix the legacy port flag only if DP is not enabled. Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230321220101.983366-1-imre.deak@intel.com commit a8b4114d112530440c00fd5bc01e4497480fa4e8 Author: Imre Deak Date: Thu Mar 16 15:17:20 2023 +0200 drm/i915/tc: Make the TC mode readout consistent in all PHY states For consistency detect the initial TC mode in the PHY owned state the same way this is done in the not owned state (w/o changing the behavior). While at it, add more details to the PHY state debug print. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230316131724.359612-11-imre.deak@intel.com commit 2983b869881b169288909b4ac93f407fe804a75a Author: Imre Deak Date: Thu Mar 16 15:17:19 2023 +0200 drm/i915/tc: Fix initial TC mode on disabled legacy ports Atm, a TC port's initial mode will be read out as TBT mode in any case the PHY ownership is not held. This isn't correct for legacy ports which should be used only in legacy mode. Fix the above initial mode to be disconnected mode for a legacy port and TBT mode for DP-alt/TBT ports. Determine the port type by checking first the HPD state and then the legacy VBT flag (so the HPD state can correct a bogus VBT flag). If a sink is connected on a disabled port the PHY will get also connected (switching it to legacy mode on a legacy port). Also connect the PHY on a legacy port if it's enabled but BIOS incorrectly left it in the disconnected state for some reason. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230316131724.359612-10-imre.deak@intel.com commit c173a91b760844074abcd636eda47d3b2c107a64 Author: Imre Deak Date: Thu Mar 16 15:17:18 2023 +0200 drm/i915/tc: Fix TC mode for a legacy port if the PHY is not ready A legacy TC port can't be switched to TBT mode, even if the PHY initialization wasn't ready yet for some reason, so prevent this. This shouldn't normally happen as the driver waits for the IOM/TCSS PHY initialization during driver loading and system resume. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230316131724.359612-9-imre.deak@intel.com commit a8da6c18b481efbe78618dbba18c2db3241f4fea Author: Imre Deak Date: Thu Mar 16 15:17:17 2023 +0200 drm/i915/tc: Fix target TC mode for a disconnected legacy port Atm, the target TC mode - which the PHY should be switched to at any point it's used - is TBT in case there is no sink connected. However legacy ports are only used in the legacy mode regardless of the sink connected state. Fix the mode returned by intel_tc_port_get_target_mode() accordingly. Despite of the above issue, the PHY got disconnected as expected in response to a sink disconnect event, causing only a redundant PHY disconnect->reconnect sequence whenever the port was used. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230316131724.359612-8-imre.deak@intel.com commit 4e936b65211a578ad1291967fb2344abd9488cc6 Author: Imre Deak Date: Thu Mar 16 15:17:16 2023 +0200 drm/i915/tc: Factor out helpers converting HPD mask to TC mode Factor out helpers used later in the patchset to convert an HPD status mask to TC mode or target TC mode. No functional changes. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230316131724.359612-7-imre.deak@intel.com commit b25f551ae197293e1efdf991f47a70e8da616845 Author: Imre Deak Date: Thu Mar 16 15:17:15 2023 +0200 drm/i915/tc: Wait for IOM/FW PHY initialization of legacy TC ports During boot-up/system resume, the TC PHY on legacy ports will be initialized by the IOM/TCSS firmware regardless of a sink being connected or not (as opposed to DP-alt/TBT ports, which the FW only inits once a sink is connected). Wait for the above initialization to complete during HW readout, so that connecting the PHY later will already see the expected PHY ready state. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230316131724.359612-6-imre.deak@intel.com commit 06f66261a1567d66b9d35c87393b6edfbea4c8f8 Author: Imre Deak Date: Thu Mar 16 15:17:14 2023 +0200 drm/i915/tc: Fix system resume MST mode restore for DP-alt sinks At least restoring the MST topology during system resume needs to use AUX before the display HW readout->sanitization sequence is complete, but on TC ports the PHY may be in the wrong mode for this, resulting in the AUX transfers to fail. The initial TC port mode is kept fixed as BIOS left it for the above HW readout sequence (to prevent changing the mode on an enabled port). If the port is disabled this initial mode is TBT - as in any case the PHY ownership is not held - even if a DP-alt sink is connected. Thus, the AUX transfers during this time will use TBT mode instead of the expected DP-alt mode and so time out. Fix the above by connecting the PHY during port initialization if the port is disabled, which will switch to the expected mode (DP-alt in the above case). As the encoder/pipe HW state isn't read-out yet at this point, check if the port is enabled based on the DDI_BUF enabled flag. Save the read-out initial mode, so intel_tc_port_sanitize_mode() can check this wrt. the read-out encoder HW state. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230316131724.359612-5-imre.deak@intel.com commit f2c7959dda614d9b7c6a41510492de39d31705ec Author: Imre Deak Date: Thu Mar 16 15:17:13 2023 +0200 drm/i915/tc: Fix the ICL PHY ownership check in TC-cold state The commit renaming icl_tc_phy_is_in_safe_mode() to icl_tc_phy_take_ownership() didn't flip the function's return value accordingly, fix this up. This didn't cause an actual problem besides state check errors, since the function is only used during HW readout. Cc: José Roberto de Souza Fixes: f53979d68a77 ("drm/i915/display/tc: Rename safe_mode functions ownership") Reviewed-by: José Roberto de Souza Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230316131724.359612-4-imre.deak@intel.com commit 67165722c27cc46de112a4e10b450170c8980a6f Author: Imre Deak Date: Thu Mar 16 15:17:12 2023 +0200 drm/i915/tc: Fix TC port link ref init for DP MST during HW readout An enabled TC MST port holds one TC port link reference, regardless of the number of enabled streams on it, but the TC port HW readout takes one reference for each active MST stream. Fix the HW readout, taking only one reference for MST ports. This didn't cause an actual problem, since the encoder HW readout doesn't yet support reading out the MST HW state. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Reviewed-by: Mika Kahola Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20230316131724.359612-3-imre.deak@intel.com commit a972cd3f0eb50bde3823e8d1df8f6c1b0c673ecc Author: Imre Deak Date: Thu Mar 16 15:17:11 2023 +0200 drm/i915/tc: Abort DP AUX transfer on a disconnected TC port On TC ports the 4ms AUX timeout combined with the 5 * 32 retry attempts during DPCD accesses adds a 640ms delay to each access if the sink is disconnected. This in turn slows down a modeset during which the sink is disconnected (for instance a disabling modeset). Prevent the above delay by aborting AUX transfers on a TC port with a disconnected sink. The DP 1.4a link CTS (4.2.1.5 Source Device Inactive HPD / Inactive AUX Test") also requires not to initiate AUX transfers on disconnected DP ports in general, however this patch doesn't change the behavior on non-TC ports, leaving that for a follow-up. Reported-and-tested-by: Chris Chiu Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8279 Reviewed-by: Mika Kahola Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230316131724.359612-2-imre.deak@intel.com commit b72d6965eeac4503445ab64bc0aede4934e0a7a6 Author: Andy Shevchenko Date: Thu Feb 16 21:39:58 2023 +0200 x86/platform/intel-mid: Remove unused definitions from intel-mid.h After a few rounds of removal and refactoring Intel MID related code some artifacts are left untouched. However, they are not used anywhere. Remove them. Signed-off-by: Andy Shevchenko Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20230216193958.2971-1-andriy.shevchenko%40linux.intel.com commit 2ae66ecc0825b0b4707384772b848c79b0986ef5 Author: Diogo Ivo Date: Sun Mar 19 17:13:03 2023 +0000 memory: tegra: remove redundant variable initialization tegra210_emc_table_device_init() sets count = 0 twice, so remove the second instance. Signed-off-by: Diogo Ivo Link: https://lore.kernel.org/r/20230319171303.120777-1-diogo.ivo@tecnico.ulisboa.pt Signed-off-by: Krzysztof Kozlowski commit cb56f508e541036ad41cb9a5afb46339b2f83b9f Author: Rob Herring Date: Sun Mar 19 11:31:44 2023 -0500 ARM: EXYNOS: Use of_address_to_resource() Replace of_get_address() and of_translate_address() with single call to of_address_to_resource(). With this, use ioremap() instead of of_iomap() which would parse "reg" a second time. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230319163145.225323-1-robh@kernel.org Signed-off-by: Krzysztof Kozlowski commit 6dddd93938b3651cfeba7158ac179b4e6d3c1553 Author: Yonatan Nachum Date: Sun Feb 19 08:13:28 2023 +0000 RDMA/efa: Add data polling capability feature bit Add feature bit to existing device caps field. EFA supports data polling of 128 bytes blocks. The flag indicates that the NIC guarentees that a 128 byte aligned block is written in order, ie that observing the last 8 bits of the block mean the prior 127 bytes are also written. It is useful for "last data polling" acceleration techniques. Link: https://lore.kernel.org/r/20230219081328.10419-1-mrgolin@amazon.com Reviewed-by: Yehuda Yitschak Reviewed-by: Yossi Leybovich Signed-off-by: Yonatan Nachum Signed-off-by: Michael Margolin Acked-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 627778bfcfa1ff81acfe863dcc4316edd0a51276 Author: Binbin Wu Date: Wed Mar 22 12:58:23 2023 +0800 KVM: SVM: Use kvm_is_cr4_bit_set() to query SMAP/SMEP in "can emulate" Use kvm_is_cr4_bit_set() to query SMAP and SMEP when determining whether or not AMD's SMAP+SEV errata prevents KVM from emulating an instruction. This eliminates an implicit cast from ulong to bool and makes the code slightly more readable. Note, any overhead from making multiple calls to kvm_read_cr4_bits() is negligible, not to mention the code is question is encountered only in rare situations, i.e. is not a remotely hot path. Suggested-by: Sean Christopherson Signed-off-by: Binbin Wu Link: https://lore.kernel.org/r/20230322045824.22970-4-binbin.wu@linux.intel.com [sean: keep local smap/smep variables, massage changelog] Signed-off-by: Sean Christopherson commit bede6eb4db19424477c36dace426ae12255f4a0d Author: Binbin Wu Date: Wed Mar 22 12:58:22 2023 +0800 KVM: x86: Use boolean return value for is_{pae,pse,paging}() Convert is_{pae,pse,paging}() to use kvm_is_cr{0,4}_bit_set() and return bools. Returning an "int" requires not one, but two implicit casts, first from "unsigned long" to "int", and then again to a "bool". Both casts are more than a bit dangerous; the ulong=>int casts would drop a bit on 64-bit kernels _if_ the bits in question weren't in the lower 32 bits, and the int=>bool cast can result in false negatives/positives, e.g. see commit 0c928ff26bd6 ("KVM: SVM: Fix benign "bool vs. int" comparison in svm_set_cr0()"). Suggested-by: Sean Christopherson Signed-off-by: Binbin Wu Link: https://lore.kernel.org/r/20230322045824.22970-3-binbin.wu@linux.intel.com Signed-off-by: Sean Christopherson commit 607475cfa0f753862c0030de836875fe4ac5cf8a Author: Binbin Wu Date: Wed Mar 22 12:58:21 2023 +0800 KVM: x86: Add helpers to query individual CR0/CR4 bits Add helpers to check if a specific CR0/CR4 bit is set to avoid a plethora of implicit casts from the "unsigned long" return of kvm_read_cr*_bits(), and to make each caller's intent more obvious. Defer converting helpers that do truly ugly casts from "unsigned long" to "int", e.g. is_pse(), to a future commit so that their conversion is more isolated. Opportunistically drop the superfluous pcid_enabled from kvm_set_cr3(); the local variable is used only once, immediately after its declaration. Suggested-by: Sean Christopherson Signed-off-by: Binbin Wu Link: https://lore.kernel.org/r/20230322045824.22970-2-binbin.wu@linux.intel.com [sean: move "obvious" conversions to this commit, massage changelog] Signed-off-by: Sean Christopherson commit 0c928ff26bd68d9638444601c0cbf4e4f978b752 Author: Sean Christopherson Date: Wed Mar 22 09:55:20 2023 -0700 KVM: SVM: Fix benign "bool vs. int" comparison in svm_set_cr0() Explicitly convert the return from is_paging() to a bool when comparing against old_paging, which is also a boolean. is_paging() sneakily uses kvm_read_cr0_bits() and returns an int, i.e. returns X86_CR0_PG or 0, not 1 or 0. Luckily, the bug is benign as it only results in a false positive, not a false negative, i.e. only causes a spurious refresh of CR4 when paging is enabled in both the old and new. Cc: Maxim Levitsky Fixes: c53bbe2145f5 ("KVM: x86: SVM: don't passthrough SMAP/SMEP/PKE bits in !NPT && !gCR0.PG case") Signed-off-by: Sean Christopherson commit 012cc7ebec1e795518b0cd5ec9015fd4b4701a8a Author: Nancy.Lin Date: Tue Mar 21 20:18:59 2023 +0800 drm/mediatek: Add mediatek-drm of vdosys1 support for MT8195 Add driver data of mt8195 vdosys1 to mediatek-drm. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230321121859.2355-8-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 177b70c03ea5cb1f649ac27d618307b24d660b9a Author: William Breathitt Gray Date: Mon Feb 27 11:45:23 2023 -0500 gpio: 104-dio-48e: Utilize no_status regmap-irq flag The 104-DIO-48E lacks an IRQ status register. Rather than use the Clear Interrupt register as the status register, set the no_status flag to true and thus avoid such a hack. Reviewed-by: Andy Shevchenko Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit ae5ae35467d5c04e5453218a927d86a5e9a78340 Merge: a7400a48160dc 4d60cac951fd2 Author: Bartosz Golaszewski Date: Wed Mar 22 17:46:14 2023 +0100 Merge tag 'regmap-no-status' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into gpio/for-next regmap: Add no_status support This patch adds support for devices which don't support readback of individual interrupt statuses, we report all interrupts as firing and hope the consumers do the right thing. commit a7400a48160dc6a00ff93c40ba25d04a8e49f1f4 Author: Tom Rix Date: Sun Mar 19 10:36:40 2023 -0400 gpio: pxa: remove unused gpio_is_pxa_type function clang with W=1 reports drivers/gpio/gpio-pxa.c:174:19: error: unused function 'gpio_is_pxa_type' [-Werror,-Wunused-function] static inline int gpio_is_pxa_type(int type) ^ This function is not used, so remove it. Signed-off-by: Tom Rix Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 0d9eee9118b77e51eeafc5bf4d008fac97035d56 Author: Nancy.Lin Date: Tue Mar 21 20:18:58 2023 +0800 drm/mediatek: Add drm ovl_adaptor sub driver for MT8195 Add drm ovl_adaptor sub driver. Bring up ovl_adaptor sub driver if the component exists in the path. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Tested-by: Nícolas F. R. A. Prado Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230321121859.2355-7-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 1ef7ed48356cd5f9af2b7671956991b658d8c2ba Author: Nancy.Lin Date: Tue Mar 21 20:18:57 2023 +0800 drm/mediatek: Modify mediatek-drm for mt8195 multi mmsys support MT8195 have two mmsys. Modify drm for MT8195 multi-mmsys support. The two mmsys (vdosys0 and vdosys1) will bring up two drm drivers, only one drm driver register as the drm device. Each drm driver binds its own component. The last bind drm driver allocates and registers the drm device to drm core. Each crtc path is created with the corresponding drm driver data. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Tested-by: Nícolas F. R. A. Prado Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230321121859.2355-6-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit cb1d6bcca54261932948b9c55bd23daaae1606d4 Author: Nancy.Lin Date: Tue Mar 21 20:18:56 2023 +0800 drm/mediatek: Add dma dev get function This is a preparation for adding support for the ovl_adaptor sub driver Ovl_adaptor is a DRM sub driver, which doesn't have dma dev. Add dma_dev_get function for getting representative dma dev in ovl_adaptor. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioachino Del Regno Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230321121859.2355-5-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit d9d93f3b61434bc18ec905eaad224407cce1a9e2 Merge: 9a321fd3308e2 3b2ec2140fa27 Author: Andrii Nakryiko Date: Wed Mar 22 09:31:05 2023 -0700 Merge branch 'bpf: Support ksym detection in light skeleton.' Alexei Starovoitov says: ==================== From: Alexei Starovoitov v1->v2: update denylist on s390 Patch 1: Cleanup internal libbpf names. Patch 2: Teach the verifier that rdonly_mem != NULL. Patch 3: Fix gen_loader to support ksym detection. Patch 4: Selftest and update denylist. ==================== Signed-off-by: Andrii Nakryiko commit 3b2ec2140fa27febb21034943d656898b659dc02 Author: Alexei Starovoitov Date: Tue Mar 21 13:38:54 2023 -0700 selftests/bpf: Add light skeleton test for kfunc detection. Add light skeleton test for kfunc detection and denylist it for s390. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230321203854.3035-5-alexei.starovoitov@gmail.com commit 708cdc5706a4701be9e5f81cb2e2b60b57f34c42 Author: Alexei Starovoitov Date: Tue Mar 21 13:38:53 2023 -0700 libbpf: Support kfunc detection in light skeleton. Teach gen_loader to find {btf_id, btf_obj_fd} of kernel variables and kfuncs and populate corresponding ld_imm64 and bpf_call insns. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230321203854.3035-4-alexei.starovoitov@gmail.com commit 1057d299459657b85e593a4b6294a000f920672a Author: Alexei Starovoitov Date: Tue Mar 21 13:38:52 2023 -0700 bpf: Teach the verifier to recognize rdonly_mem as not null. Teach the verifier to recognize PTR_TO_MEM | MEM_RDONLY as not NULL otherwise if (!bpf_ksym_exists(known_kfunc)) doesn't go through dead code elimination. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230321203854.3035-3-alexei.starovoitov@gmail.com commit a18f721415b4d4edea23cb8c7d6276330302af14 Author: Alexei Starovoitov Date: Tue Mar 21 13:38:51 2023 -0700 libbpf: Rename RELO_EXTERN_VAR/FUNC. RELO_EXTERN_VAR/FUNC names are not correct anymore. RELO_EXTERN_VAR represent ksym symbol in ld_imm64 insn. It can point to kernel variable or kfunc. Rename RELO_EXTERN_VAR->RELO_EXTERN_LD64 and RELO_EXTERN_FUNC->RELO_EXTERN_CALL to match what they actually represent. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230321203854.3035-2-alexei.starovoitov@gmail.com commit 453c3364632a1f305db7d425dc9f8d6711cd3491 Author: Nancy.Lin Date: Tue Mar 21 20:18:55 2023 +0800 drm/mediatek: Add ovl_adaptor support for MT8195 Add ovl_adaptor driver for MT8195. Ovl_adaptor is an encapsulated module and designed for simplified DRM control flow. This module is composed of 8 RDMAs, 4 MERGEs and an ETHDR. Two RDMAs merge into one layer, so this module support 4 layers. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230321121859.2355-4-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit d886c0009bd087ebf76e345ad0ce155240be5898 Author: Nancy.Lin Date: Tue Mar 21 20:18:54 2023 +0800 drm/mediatek: Add ETHDR support for MT8195 ETHDR is a part of ovl_adaptor. ETHDR is designed for HDR video and graphics conversion in the external display path. It handles multiple HDR input types and performs tone mapping, color space/color format conversion, and then combine different layers, output the required HDR or SDR signal to the subsequent display path. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno Tested-by: Bo-Chen Chen Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230321121859.2355-3-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 9a321fd3308e262f2a76761bea86dd0f311e3f86 Author: Tushar Vyavahare Date: Mon Mar 20 15:57:05 2023 +0530 selftests/xsk: add xdp populate metadata test Add a new test in copy-mode for testing the copying of metadata from the buffer in kernel-space to user-space. This is accomplished by adding a new XDP program and using the bss map to store a counter that is written to the metadata field. This counter is incremented for every packet so that the number becomes unique and should be the same as the payload. It is store in the bss so the value can be reset between runs. The XDP program populates the metadata and the userspace program checks the value stored in the metadata field against the payload using the new is_metadata_correct() function. To turn this verification on or off, add a new parameter (use_metadata) to the ifobject structure. Signed-off-by: Tushar Vyavahare Reviewed-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20230320102705.306187-1-tushar.vyavahare@intel.com Signed-off-by: Alexei Starovoitov commit 64e352c9bd38cdbb962006164623e09ed2851160 Author: Nancy.Lin Date: Tue Mar 21 20:18:53 2023 +0800 dt-bindings: mediatek: add ethdr definition for mt8195 Add vdosys1 ETHDR definition. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Tested-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230321121859.2355-2-nancy.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 05bfb338fa8dd40b008ce443e397fc374f6bd107 Author: Josh Poimboeuf Date: Fri Feb 24 08:50:01 2023 -0800 vhost: Fix livepatch timeouts in vhost_worker() Livepatch timeouts were reported due to busy vhost_worker() kthreads. Now that cond_resched() can do livepatch task switching, use cond_resched() in vhost_worker(). That's the better way to conditionally call schedule() anyway. Reported-by: Seth Forshee (DigitalOcean) Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Petr Mladek Tested-by: Seth Forshee (DigitalOcean) Link: https://lore.kernel.org/r/509f6ea6fe6505f0a75a66026ba531c765ef922f.1677257135.git.jpoimboe@kernel.org commit e3ff7c609f39671d1aaff4fb4a8594e14f3e03f8 Author: Josh Poimboeuf Date: Fri Feb 24 08:50:00 2023 -0800 livepatch,sched: Add livepatch task switching to cond_resched() There have been reports [1][2] of live patches failing to complete within a reasonable amount of time due to CPU-bound kthreads. Fix it by patching tasks in cond_resched(). There are four different flavors of cond_resched(), depending on the kernel configuration. Hook into all of them. A more elegant solution might be to use a preempt notifier. However, non-ORC unwinders can't unwind a preempted task reliably. [1] https://lore.kernel.org/lkml/20220507174628.2086373-1-song@kernel.org/ [2] https://lkml.kernel.org/lkml/20230120-vhost-klp-switching-v1-0-7c2b65519c43@kernel.org Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Petr Mladek Tested-by: Seth Forshee (DigitalOcean) Link: https://lore.kernel.org/r/4ae981466b7814ec221014fc2554b2f86f3fb70b.1677257135.git.jpoimboe@kernel.org commit 383439d3d400d4c5a7ffb4495124adc6be6a05e2 Author: Josh Poimboeuf Date: Fri Feb 24 08:49:59 2023 -0800 livepatch: Skip task_call_func() for current task The current task doesn't need the scheduler's protection to unwind its own stack. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Petr Mladek Tested-by: Seth Forshee (DigitalOcean) Link: https://lore.kernel.org/r/4b92e793462d532a05f03767151fa29db3e68e13.1677257135.git.jpoimboe@kernel.org commit e92606fa172f63a26054885b9715be86c643229d Author: Josh Poimboeuf Date: Mon Mar 13 16:33:46 2023 -0700 livepatch: Convert stack entries array to percpu The entries array in klp_check_stack() is static local because it's too big to be reasonably allocated on the stack. Serialized access is enforced by the klp_mutex. In preparation for calling klp_check_stack() without the mutex (from cond_resched), convert it to a percpu variable. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230313233346.kayh4t2lpicjkpsv@treble commit cb70cf99abae487941bbb5d3661653c02a5103cc Author: Tom Rix Date: Tue Mar 21 07:46:38 2023 -0400 mtd: rawnand: remove unused is_imx51_nfc and imx53_nfc functions clang with W=1 reports drivers/mtd/nand/raw/mxc_nand.c:1602:19: error: unused function 'is_imx51_nfc' [-Werror,-Wunused-function] static inline int is_imx51_nfc(struct mxc_nand_host *host) ^ drivers/mtd/nand/raw/mxc_nand.c:1607:19: error: unused function 'is_imx53_nfc' [-Werror,-Wunused-function] static inline int is_imx53_nfc(struct mxc_nand_host *host) ^ These functions are not used, so remove them. Signed-off-by: Tom Rix Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230321114638.1782086-1-trix@redhat.com commit 7c09abba58cf912fa417be8720cff00df12354aa Author: Rob Herring Date: Fri Mar 10 08:47:15 2023 -0600 mtd: nand: qcom: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230310144715.1543926-1-robh@kernel.org commit e8c047b4a92cf4af7a81bf31e9b31fedc7434335 Author: Hector Palacios Date: Fri Mar 10 09:06:09 2023 +0100 mtd: rawnand: hynix: fix up bit 0 of sdr_timing_mode According to the ONFI specification, bit 0 of 'SDR timing mode support' (bytes 129-130) "shall be 1". That means the NAND supports at least timing mode 0. NAND chip Hynix H27U4G8F2GDA-BI (at least) is reading a 0 on this field which makes nand_choose_best_sdr_timings() return with error and the probe function to eventually fail. Given that sdr_timing_modes bit 0 must be 1 by specification, force it in case the NAND reports it is not set. This is a safe assumption because the mode 0 is the minimum (safer) set of timings that the NAND can work with. Signed-off-by: Hector Palacios Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230223165104.525852-1-hector.palacios@digi.com Link: https://lore.kernel.org/linux-mtd/20230310080609.1930869-1-hector.palacios@digi.com commit e6b0922a9c614d7689393391325c943b34afd6d4 Author: Bang Li Date: Wed Mar 15 00:56:53 2023 +0800 mtdblock: tolerate corrected bit-flips mtd_read() may return -EUCLEAN in case of corrected bit-flips.This particular condition should not be treated like an error. Signed-off-by: Bang Li Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230314165653.252673-1-libang.linuxer@gmail.com commit 57150c40b6391bc350c6016641b2a487a3de3cba Author: Rob Herring Date: Fri Mar 10 08:47:15 2023 -0600 mtd: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230310144716.1543995-1-robh@kernel.org commit 2702f54f400ad3979632cdb76553772414f4c5e3 Author: Johan Hovold Date: Tue Mar 21 10:40:11 2023 +0100 arm64: dts: qcom: sc8280xp-x13s: add wifi calibration variant Describe the bus topology for PCIe domain 6 and add the ath11k calibration variant so that the board file (calibration data) can be loaded. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216246 Reviewed-by: Konrad Dybcio Tested-by: Steev Klimaszewski Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230321094011.9759-3-johan+linaro@kernel.org commit fb509f76acc8d42bed11bca308404f81c2be856a Author: Mathias Krause Date: Wed Mar 22 02:37:31 2023 +0100 KVM: VMX: Make CR0.WP a guest owned bit Guests like grsecurity that make heavy use of CR0.WP to implement kernel level W^X will suffer from the implied VMEXITs. With EPT there is no need to intercept a guest change of CR0.WP, so simply make it a guest owned bit if we can do so. This implies that a read of a guest's CR0.WP bit might need a VMREAD. However, the only potentially affected user seems to be kvm_init_mmu() which is a heavy operation to begin with. But also most callers already cache the full value of CR0 anyway, so no additional VMREAD is needed. The only exception is nested_vmx_load_cr3(). This change is VMX-specific, as SVM has no such fine grained control register intercept control. Suggested-by: Sean Christopherson Signed-off-by: Mathias Krause Link: https://lore.kernel.org/r/20230322013731.102955-7-minipli@grsecurity.net Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson commit 74cdc836919bf34684ef66f995273f35e2189daf Author: Mathias Krause Date: Wed Mar 22 02:37:29 2023 +0100 KVM: x86: Make use of kvm_read_cr*_bits() when testing bits Make use of the kvm_read_cr{0,4}_bits() helper functions when we only want to know the state of certain bits instead of the whole register. This not only makes the intent cleaner, it also avoids a potential VMREAD in case the tested bits aren't guest owned. Signed-off-by: Mathias Krause Link: https://lore.kernel.org/r/20230322013731.102955-5-minipli@grsecurity.net Signed-off-by: Sean Christopherson commit e40bcf9f3a187126ce74a05d3b177fc16874446f Author: Mathias Krause Date: Wed Mar 22 02:37:28 2023 +0100 KVM: x86: Ignore CR0.WP toggles in non-paging mode If paging is disabled, there are no permission bits to emulate. Micro-optimize this case to avoid unnecessary work. Suggested-by: Sean Christopherson Signed-off-by: Mathias Krause Link: https://lore.kernel.org/r/20230322013731.102955-4-minipli@grsecurity.net Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson commit 01b31714bd90be2784f7145bf93b7f78f3d081e1 Author: Mathias Krause Date: Wed Mar 22 02:37:27 2023 +0100 KVM: x86: Do not unload MMU roots when only toggling CR0.WP with TDP enabled There is no need to unload the MMU roots with TDP enabled when only CR0.WP has changed -- the paging structures are still valid, only the permission bitmap needs to be updated. One heavy user of toggling CR0.WP is grsecurity's KERNEXEC feature to implement kernel W^X. The optimization brings a huge performance gain for this case as the following micro-benchmark running 'ssdd 10 50000' from rt-tests[1] on a grsecurity L1 VM shows (runtime in seconds, lower is better): legacy TDP shadow kvm-x86/next@d8708b 8.43s 9.45s 70.3s +patch 5.39s 5.63s 70.2s For legacy MMU this is ~36% faster, for TDP MMU even ~40% faster. Also TDP and legacy MMU now both have a similar runtime which vanishes the need to disable TDP MMU for grsecurity. Shadow MMU sees no measurable difference and is still slow, as expected. [1] https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git Signed-off-by: Mathias Krause Link: https://lore.kernel.org/r/20230322013731.102955-3-minipli@grsecurity.net Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson commit c33fcc13ee0d02efe5729588e8fba8b899c8879a Author: Lu Baolu Date: Wed Mar 22 20:34:21 2023 +0800 iommu: Use sysfs_emit() for sysfs show Use sysfs_emit() instead of the sprintf() for sysfs entries. sysfs_emit() knows the maximum of the temporary buffer used for outputting sysfs content and avoids overrunning the buffer length. Prefer 'long long' over 'long long int' as suggested by checkpatch.pl. Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230322123421.278852-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 50f13998451effea5c5fdc70fe576f8b435d6224 Author: Mathias Krause Date: Wed Mar 22 02:37:30 2023 +0100 KVM: x86/mmu: Fix comment typo Fix a small comment typo in make_spte(). Signed-off-by: Mathias Krause Link: https://lore.kernel.org/r/20230322013731.102955-6-minipli@grsecurity.net Signed-off-by: Sean Christopherson commit 2fdcc1b324189b5fb20655baebd40cd82e2bdf0c Author: Paolo Bonzini Date: Wed Mar 22 02:37:26 2023 +0100 KVM: x86/mmu: Avoid indirect call for get_cr3 Most of the time, calls to get_guest_pgd result in calling kvm_read_cr3 (the exception is only nested TDP). Hardcode the default instead of using the get_cr3 function, avoiding a retpoline if they are enabled. Signed-off-by: Paolo Bonzini Signed-off-by: Mathias Krause Link: https://lore.kernel.org/r/20230322013731.102955-2-minipli@grsecurity.net Signed-off-by: Sean Christopherson commit 4c8444f19ed05971c91cd93252f4a8e3dcb37995 Author: Lu Baolu Date: Wed Mar 22 14:49:56 2023 +0800 iommu: Cleanup iommu_change_dev_def_domain() As the singleton group limitation has been removed, cleanup the code in iommu_change_dev_def_domain() accordingly. Documentation is also updated. Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230322064956.263419-7-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 49a22aae7d9cfd1e8060b7ea4e0a1537f60dd39d Author: Lu Baolu Date: Wed Mar 22 14:49:55 2023 +0800 iommu: Replace device_lock() with group->mutex device_lock() was used in iommu_group_store_type() to prevent the devices in an iommu group from being attached by any device driver. On the other hand, in order to avoid lock race between group->mutex and device_lock(), it limited the usage scenario to the singleton groups. We already have the DMA ownership scheme to avoid driver attachment and group->mutex ensures that device ops are always valid, there's no need for device_lock() anymore. Remove device_lock() and the singleton group limitation. Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230322064956.263419-6-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 33793748de8fde338c11277d3d16dadc79ba65bf Author: Lu Baolu Date: Wed Mar 22 14:49:54 2023 +0800 iommu: Move lock from iommu_change_dev_def_domain() to its caller The intention is to make it possible to put group ownership check and default domain change in a same critical region protected by the group's mutex lock. No intentional functional change. Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230322064956.263419-5-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit dba9ca9d41f5266194a5e8007db50985d271d0a4 Author: Lu Baolu Date: Wed Mar 22 14:49:53 2023 +0800 iommu: Same critical region for device release and removal In a non-driver context, it is crucial to ensure the consistency of a device's iommu ops. Otherwise, it may result in a situation where a device is released but it's iommu ops are still used. Put the ops->release_device and __iommu_group_remove_device() in a same group->mutext critical region, so that, as long as group->mutex is held and the device is in its group's device list, its iommu ops are always consistent. Add check of group ownership if the released device is the last one. Signed-off-by: Jason Gunthorpe Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230322064956.263419-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 293f2564f3dd76b749fc31ae4226bd818f860e4f Author: Lu Baolu Date: Wed Mar 22 14:49:52 2023 +0800 iommu: Split iommu_group_remove_device() into helpers So that code could be re-used by iommu_release_device() in the subsequent change. No intention for functionality change. Signed-off-by: Jason Gunthorpe Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230322064956.263419-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 24dfb197c3b7d274e5f78fce5e63392526a933e9 Author: Lu Baolu Date: Wed Mar 22 14:49:51 2023 +0800 iommu/ipmmu-vmsa: Call arm_iommu_release_mapping() in release path In the iommu driver's release_device operation, the driver should detach the device from any attached domain and release the resources allocated in the probe_device and probe_finalize paths. Replace arm_iommu_detach_device() with arm_iommu_release_mapping() in the release path of the ipmmu-vmsa driver. The device_release callback is called in device_del(), this device is not coming back. Zeroing out pointers and testing for a condition which cannot be true by construction is simply a waste of time and code. The bonus is that it also removes a obstacle of arm_iommu_detach_device() re-entering the iommu core during release_device. With this removed, the iommu core code could be simplified a lot. Signed-off-by: Jason Gunthorpe Suggested-by: Robin Murphy Link: https://lore.kernel.org/linux-iommu/7b248ba1-3967-5cd8-82e9-0268c706d320@arm.com/ Signed-off-by: Lu Baolu Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20230322064956.263419-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit b01899cb18659c9911cc790cd66784623e5e5a0e Author: Johan Hovold Date: Wed Mar 22 12:33:18 2023 +0100 arm64: dts: qcom: sc8280xp-x13s: add hid 1.8V supplies All the input devices use s10b as 1.8V supply. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322113318.17908-7-johan+linaro@kernel.org commit ed066df385cb1a7286123a246337636f8debd18d Author: Johan Hovold Date: Wed Mar 22 12:33:17 2023 +0100 arm64: dts: qcom: sc8280xp-x13s: add pmic regulator supplies The s11b, s12b, s1c and bob supplies are used by several pmic regulators. Add the missing description to the devicetree. Note that there are still some consumers that are not (fully) described in the devicetree so the supplies must remain marked as always-on for now. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230322113318.17908-6-johan+linaro@kernel.org commit 4d4a0dbab2b998692f54fa6f7a9d2eb675110743 Author: Vasant Hegde Date: Tue Mar 21 09:23:48 2023 +0000 iommu/amd: Allocate IOMMU irqs using numa locality info Use numa information to allocate irq resources and also to set irq affinity. This optimizes the IOMMU interrupt handling. Reviewed-by: Suravee Suthikulpanit Reviewed-by: Alexey Kardashevskiy Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20230321092348.6127-3-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit 0d571dcbe7c6d36dcfcb8e04a49cc01fe462d171 Author: Vasant Hegde Date: Tue Mar 21 09:23:47 2023 +0000 iommu/amd: Allocate page table using numa locality info Introduce 'struct protection_domain->nid' variable. It will contain IOMMU NUMA node ID. And allocate page table pages using IOMMU numa locality info. This optimizes page table walk by IOMMU. Signed-off-by: Vasant Hegde Link: https://lore.kernel.org/r/20230321092348.6127-2-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit 6ff9453765565b34cd9dfb874afd8b06902453f7 Author: Fabien Parent Date: Thu Mar 9 22:35:01 2023 +0100 arm64: dts: mediatek: Initial mt8365-evk support This adds minimal support for the Mediatek 8365 SOC and the EVK reference board, allowing the board to boot to initramfs with serial port I/O. Signed-off-by: Fabien Parent [bero@baylibre.com: Removed parts depending on drivers that aren't upstream yet, cleanups, add CPU cache layout, add systimer, fix GIC] Signed-off-by: Bernhard Rosenkränzer [aouledameur@baylibre.com: Fix systimer properties] Signed-off-by: Amjad Ouled-Ameur Signed-off-by: Alexandre Mergnat Tested-by: Kevin Hilman Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230309213501.794764-4-bero@baylibre.com Signed-off-by: Matthias Brugger commit 5c5945dc695c54f2b55a934a10b6c4e220f9c140 Author: Xiaoyan Li Date: Tue Mar 21 16:12:02 2023 +0800 selftests/net: Add SHA256 computation over data sent in tcp_mmap Add option to compute and send SHA256 over data sent (-i). This is to ensure the correctness of data received. Data is randomly populated from /dev/urandom. Tested: ./tcp_mmap -s -z -i ./tcp_mmap -z -H $ADDR -i SHA256 is correct ./tcp_mmap -s -i ./tcp_mmap -H $ADDR -i SHA256 is correct Signed-off-by: Coco Li Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20230321081202.2370275-2-lixiaoyan@google.com Signed-off-by: Paolo Abeni commit 593ef60c74451ba05a87effb50edb5cd45312115 Author: Xiaoyan Li Date: Tue Mar 21 16:12:01 2023 +0800 net-zerocopy: Reduce compound page head access When compound pages are enabled, although the mm layer still returns an array of page pointers, a subset (or all) of them may have the same page head since a max 180kb skb can span 2 hugepages if it is on the boundary, be a mix of pages and 1 hugepage, or fit completely in a hugepage. Instead of referencing page head on all page pointers, use page length arithmetic to only call page head when referencing a known different page head to avoid touching a cold cacheline. Tested: See next patch with changes to tcp_mmap Correntess: On a pair of separate hosts as send with MSG_ZEROCOPY will force a copy on tx if using loopback alone, check that the SHA on the message sent is equivalent to checksum on the message received, since the current program already checks for the length. echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages ./tcp_mmap -s -z ./tcp_mmap -H $DADDR -z SHA256 is correct received 2 MB (100 % mmap'ed) in 0.005914 s, 2.83686 Gbit cpu usage user:0.001984 sys:0.000963, 1473.5 usec per MB, 10 c-switches Performance: Run neper between adjacent hosts with the same config tcp_stream -Z --skip-rx-copy -6 -T 20 -F 1000 --stime-use-proc --test-length=30 Before patch: stime_end=37.670000 After patch: stime_end=30.310000 Signed-off-by: Coco Li Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20230321081202.2370275-1-lixiaoyan@google.com Signed-off-by: Paolo Abeni commit b67ab6fb63bbbe6d2c0edebd28c27ea425c8b55b Author: Yoshihiro Shimoda Date: Mon Mar 13 21:40:26 2023 +0900 dt-bindings: iommu: renesas, ipmmu-vmsa: Update for R-Car Gen4 Since R-Car Gen4 does not have the main IPMMU IMSSTR register, update the bindings to drop the interrupt bit number from the renesas,ipmmu-main property. Signed-off-by: Yoshihiro Shimoda [geert: Re-add removed items level, add minItems/maxItems constraints] Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230313124026.954514-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Joerg Roedel commit 0c0431646116b4fbba75c4784e1bda0781dc8073 Author: Rob Herring Date: Fri Mar 10 08:47:09 2023 -0600 iommu/omap: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to of_property_read_bool(). Signed-off-by: Rob Herring Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20230310144709.1542980-1-robh@kernel.org Signed-off-by: Joerg Roedel commit a6c9e3874e5759af089c07ab80c87105babc9727 Author: Rob Herring Date: Fri Mar 10 08:47:09 2023 -0600 iommu: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20230310144709.1542910-1-robh@kernel.org Signed-off-by: Joerg Roedel commit 1b0b5f50dc83351fa2d2158a183cbe258178cb3f Author: Geert Uytterhoeven Date: Wed Mar 8 18:17:08 2023 +0100 iommu: Spelling s/cpmxchg64/cmpxchg64/ Fix misspellings of "cmpxchg64" Fixes: d286a58bc8f4d5cf ("iommu: Tidy up io-pgtable dependencies") Signed-off-by: Geert Uytterhoeven Acked-by: Robin Murphy Link: https://lore.kernel.org/r/eab156858147249d44463662eb9192202c39ab9f.1678295792.git.geert+renesas@glider.be Signed-off-by: Joerg Roedel commit 829a79556fc983f2d4a3d687d4bc60fe8deb56fd Author: Randy Dunlap Date: Tue Mar 7 19:45:04 2023 -0800 iommu/fsl: fix all kernel-doc warnings in fsl_pamu.c Fix kernel-doc warnings as reported by the kernel test robot: fsl_pamu.c:192: warning: expecting prototype for pamu_config_paace(). Prototype was for pamu_config_ppaace() instead fsl_pamu.c:239: warning: Function parameter or member 'omi_index' not described in 'get_ome_index' fsl_pamu.c:239: warning: Function parameter or member 'dev' not described in 'get_ome_index' fsl_pamu.c:332: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Setup operation mapping and stash destinations for QMAN and QMAN portal. fsl_pamu.c:361: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Setup the operation mapping table for various devices. This is a static Fixes: 695093e38c3e ("iommu/fsl: Freescale PAMU driver and iommu implementation.") Fixes: cd70d4659ff3 ("iommu/fsl: Various cleanups") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Link: lore.kernel.org/r/202302281151.B1WtZvSC-lkp@intel.com Cc: Aditya Srivastava Cc: Joerg Roedel Cc: Will Deacon Cc: Robin Murphy Cc: iommu@lists.linux.dev Cc: Timur Tabi Cc: Varun Sethi Cc: Emil Medve Reviewed-by: Lu Baolu Acked-by: Timur Tabi Link: https://lore.kernel.org/r/20230308034504.9985-1-rdunlap@infradead.org Signed-off-by: Joerg Roedel commit efe37fda9d52c59ac7b5837a877353486d8cb45c Author: Wolfram Sang Date: Tue Mar 7 17:30:29 2023 +0100 iommu/ipmmu-vmsa: remove R-Car H3 ES1.* handling R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20230307163041.3815-2-wsa+renesas@sang-engineering.com Signed-off-by: Joerg Roedel commit 08632365b274e4be6c43053eba7589c811e6e572 Author: Nick Alcock Date: Fri Feb 24 15:07:51 2023 +0000 iommu/sun50i: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Joerg Roedel Cc: Will Deacon Cc: Chen-Yu Tsai Cc: Jernej Skrabec Cc: Samuel Holland Cc: Philipp Zabel Cc: iommu@lists.linux.dev Cc: linux-arm-kernel@lists.infradead.org Cc: linux-sunxi@lists.linux.dev Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230224150811.80316-8-nick.alcock@oracle.com Signed-off-by: Joerg Roedel commit aa977833dee5de583ac5dbc902e39983ec6302ac Author: Thomas Weißschuh Date: Tue Feb 14 03:25:53 2023 +0000 iommu: Make kobj_type structure constant Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230214-kobj_type-iommu-v1-1-e7392834b9d0@weissschuh.net Signed-off-by: Joerg Roedel commit bc43c5ec1a97772269785d19f62d32c91ac5fc36 Author: Kunihiko Hayashi Date: Wed Mar 22 11:31:01 2023 +0900 spi: f_ospi: Add missing spi_mem_default_supports_op() helper The .supports_op() callback function returns true by default after performing driver-specific checks. Therefore the driver cannot apply the buswidth in devicetree. Call spi_mem_default_supports_op() helper to handle the buswidth in devicetree. Fixes: 1b74dd64c861 ("spi: Add Socionext F_OSPI SPI flash controller driver") Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20230322023101.24490-1-hayashi.kunihiko@socionext.com Signed-off-by: Mark Brown commit 99d822b3adc4f9af59cefdc6619cb3f64182efed Author: Haibo Chen Date: Wed Mar 22 17:04:51 2023 +0800 spi: spi-nxp-fspi: use DLL calibration when clock rate > 100MHz When clock rate > 100MHz, use the DLL calibration mode, and finally add the suggested half of the current clock cycle to sample the data. Signed-off-by: Haibo Chen Link: https://lore.kernel.org/r/20230322090451.3179431-2-haibo.chen@nxp.com Signed-off-by: Mark Brown commit 1ab09f1d070c4774175dab95e55d2b72c2a054ab Author: Haibo Chen Date: Wed Mar 22 17:04:50 2023 +0800 spi: spi-nxp-fspi: correct the comment for the DLL config Current DLL config is just to use the default setting, this means enable the DLL override mode, and use 1 fixed delay cell in the DLL delay chain, not means "reset" the DLL, so correct this to avoid confuse. Signed-off-by: Haibo Chen Link: https://lore.kernel.org/r/20230322090451.3179431-1-haibo.chen@nxp.com Signed-off-by: Mark Brown commit 59385ed41c37b609c70a1ebb46003e4cc6685ec0 Author: Jiapeng Chong Date: Wed Mar 22 09:43:30 2023 +0800 ASoC: tegra: remove unneeded semicolon ./sound/soc/tegra/tegra_asoc_machine.c:206:3-4: Unneeded semicolon. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4583 Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20230322014330.97079-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown commit dcf084247e376b35c139c922d30917f4ff716a4c Author: Kuninori Morimoto Date: Wed Mar 22 01:12:24 2023 +0000 ASoC: simple-card: add comment to indicate don't remove platforms Basically CPU and Platform are different Component, but if CPU is using soc-generic-dmaengine-pcm, same dev will be shared between CPU and Platform, and Simple Card had been supporting it. When we focus to clean up Simple Card driver, we tend to remove platforms if no Platform was selected, but it is wrong because of above reasons. This patch adds comment why we shouldn't remove platforms. In case of CPU is not using soc-generic-dmaengine-pcm, CPU and Platform will be duplicated, but it will be ignored by snd_soc_rtd_add_component(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/875yattwqv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3e1a334ad5b6e1aee25fd7f09400000f9b7b1f82 Author: Yong Zhi Date: Wed Mar 22 09:50:12 2023 +0200 ASoC: Intel: sof_rt5682: Remove conditional dpcm_capture setting The dpcm_capture is set unconditionally, we can drop the conditional setting of it. Signed-off-by: Yong Zhi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230322075012.23463-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit f19f24d47900656962cafa51426660c8aa32744d Author: Uday M Bhat Date: Wed Mar 22 09:49:16 2023 +0200 ASoC: Intel: sof_rt5682: Update BT offload config for MTL RVP For MTL RVP, SSP2 is used for BT offload. This is enabled in the sof_rt5682_quirk_table Signed-off-by: Uday M Bhat Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230322074916.23225-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 54e288766906569a9e5ca2ff3a09fb4e4cc25a37 Author: Uday M Bhat Date: Wed Mar 22 09:49:15 2023 +0200 ASoC: Intel: sof_rt5682: Update BT offload config for Rex For Rex, SSP1 is used for BT offload. This is enabled in the sof_rt5682_quirk_table Signed-off-by: Uday M Bhat Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230322074916.23225-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 51ce3e6effab4fd4e13a3f187f4e256259f6e5a4 Author: Ranjani Sridharan Date: Wed Mar 22 11:43:46 2023 +0200 ASoC: SOF: pcm: Improve the pcm trigger sequence The recommended sequence for triggering the host DMA is to first program the DMA in the FW before setting the RUN bit to start the stream in the host. With IPC3, this sequence is honored because the FW programs the DMA when the HW_PARAMS IPC is sent during PCM hw_params and then the host sets the RUN bit during sof_pcm_trigger(). But with IPC4, sof_pcm_trigger() sends the SET_PIPELINE_STATE IPC to program the DMA in the FW after the DMA RUN bit is set. In order to minimize the impact for IPC3, introduce a new flag as part of struct sof_ipc_pcm_ops, ipc_first_on_start, which will be set for IPC4 only. With this flag set, the SET_PIPELINE_STATE IPC will be sent before the DMA RUN bit is set by the host during the START/PAUSE_RELEASE triggers. Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230322094346.6019-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 7d6f623c6a9d05195d1b19120383d4f42a1747db Author: Ranjani Sridharan Date: Wed Mar 22 11:43:45 2023 +0200 ASoC: SOF: pcm: Make hw_params reset conditional for IPC3 In the case of IPC4, since there is no PCM_PARAMS IPC to send the new stream tag when restarting a stream without a hw_free, the original stream tag needs to be preserved. So, add new a flag as part of struct sof_ipc_pcm_ops, reset_hw_params_during_stop and set it only for IPC3. This will ensure that the host DMA stream tag will not be given up during the STOP trigger for IPC4. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230322094346.6019-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 1bf83fa6654ce8959948878aad14a6db586125b8 Author: Ranjani Sridharan Date: Wed Mar 22 11:43:44 2023 +0200 ASoC: SOF: Intel: hda-dai: Do not perform DMA cleanup during stop In the case of repeated start/stop without involving hw_free, the stream tag needs to be preserved for the subsequent starts. So, skip performing the DMA clean up during stop and handle it only during suspend or hw_free. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230322094346.6019-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 0dd45ebc08de2449efe1a0908147796856a5f824 Author: Aloka Dixit Date: Mon Dec 5 16:50:40 2022 -0800 wifi: mac80211_hwsim: EMA support Add support enhanced multi-BSS advertisements (EMA) for profile periodicity up to 3 beacons. Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/20221206005040.3177-5-quic_alokad@quicinc.com Signed-off-by: Johannes Berg commit c4f4d9f7e7f0a7af82b086354c9277fc8446fe9c Author: Aloka Dixit Date: Mon Dec 5 16:50:39 2022 -0800 wifi: mac80211_hwsim: Multiple BSSID support Advertise multiple BSSID support for up to 8 interfaces. Do not send beacons from the non-transmitting interfaces. Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/20221206005040.3177-4-quic_alokad@quicinc.com Signed-off-by: Johannes Berg commit b3a912e3e220257a25219cd81b9aa8a639cb1e18 Author: Aloka Dixit Date: Mon Dec 5 16:50:38 2022 -0800 wifi: mac80211_hwsim: move beacon transmission to a separate function Move the beacon transmission to a separate function to facilitate addition of EMA beacon transmission. Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/20221206005040.3177-3-quic_alokad@quicinc.com Signed-off-by: Johannes Berg commit bd54f3c29077f23dad92ef82a78061b40be30c65 Author: Aloka Dixit Date: Mon Dec 5 16:50:37 2022 -0800 wifi: mac80211: generate EMA beacons in AP mode Add APIs to generate an array of beacons for an EMA AP (enhanced multiple BSSID advertisements), each including a single MBSSID element. EMA profile periodicity equals the count of elements. - ieee80211_beacon_get_template_ema_list() - Generate and return all EMA beacon templates. Drivers must call ieee80211_beacon_free_ema_list() to free the memory. No change in the prototype for the existing API, ieee80211_beacon_get_template(), which should be used for non-EMA AP. - ieee80211_beacon_get_template_ema_index() - Generate a beacon which includes the multiple BSSID element at the given index. Drivers can use this function in a loop until NULL is returned which indicates end of available MBSSID elements. - ieee80211_beacon_free_ema_list() - free the memory allocated for the list of EMA beacon templates. Modify existing functions ieee80211_beacon_get_ap(), ieee80211_get_mbssid_beacon_len() and ieee80211_beacon_add_mbssid() to accept a new parameter for EMA index. Signed-off-by: Aloka Dixit Co-developed-by: John Crispin Signed-off-by: John Crispin Link: https://lore.kernel.org/r/20221206005040.3177-2-quic_alokad@quicinc.com Signed-off-by: Johannes Berg commit b9c93f4ec737bbc6b6601284df3a14814feb53fe Author: Thomas Zimmermann Date: Mon Mar 20 16:07:51 2023 +0100 drm/fbdev-generic: Rename symbols Rename symbols to match the style of other fbdev-emulation source code. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Zack Rusin Tested-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-9-tzimmermann@suse.de commit a51c7663f144606a5f08e772fa3e1e4f2277a614 Author: Thomas Zimmermann Date: Mon Mar 20 16:07:50 2023 +0100 drm/fb-helper: Consolidate CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM Consolidate all handling of CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM by making the module parameter optional in drm_fb_helper.c. Without the config option, modules can set smem_start in struct fb_info for internal usage, but not export if to userspace. The address can only be exported by enabling the option and setting the module parameter. Also update the comment. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Zack Rusin Tested-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-8-tzimmermann@suse.de commit 61b5d0072a88cfd8c5fda31a7c19d105187c8841 Author: Thomas Zimmermann Date: Mon Mar 20 16:07:49 2023 +0100 drm/fbdev-generic: Clean up after failed probing Clean up fbdev and client state if the probe function fails. It used to leak allocated resources. Also reorder the individual steps to simplify cleanup. v2: * move screen_size update into separate patches Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Zack Rusin Tested-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-7-tzimmermann@suse.de commit 8fbc9af55de0b274745e70118e20e0964e98bb05 Author: Thomas Zimmermann Date: Mon Mar 20 16:07:48 2023 +0100 drm/fbdev-generic: Set screen size to size of GEM buffer The size of the screen memory should be equivalent to the size of the screen's GEM buffer. Don't recalculate the value. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Tested-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-6-tzimmermann@suse.de commit 24dc4f4c2a5cc97e340f440bb01f5f30fb4704f8 Author: Thomas Zimmermann Date: Mon Mar 20 16:07:47 2023 +0100 drm/fb-helper: Support smem_len in deferred I/O The size of the framebuffer can either be stored in screen_info or smem_len. Take both into account in the deferred I/O code. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Tested-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-5-tzimmermann@suse.de commit 6a4fef21816be4bc818905e07d47e0c20738e164 Author: Thomas Zimmermann Date: Mon Mar 20 16:07:46 2023 +0100 drm/fb-helper: Export drm_fb_helper_release_info() Export the fb_info release code as drm_fb_helper_release_info(). Will help with cleaning up failed fbdev probing. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Zack Rusin Tested-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-4-tzimmermann@suse.de commit 7423740b2515a4c8a70ccdc068c0ac4a2610a23d Author: Thomas Zimmermann Date: Mon Mar 20 16:07:45 2023 +0100 drm/fbdev-generic: Remove unused prefer_shadow_fbdev flag Remove the flag prefer_shadow_fbdev from struct drm_mode_config. Drivers set this flag to enable shadow buffering in the generic fbdev emulation. Such shadow buffering is now mandatory, so the flag is unused. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reviewed-by: Zack Rusin Tested-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-3-tzimmermann@suse.de commit a5b44c4adb1699661d22e5152fb26885f30a2e4c Author: Thomas Zimmermann Date: Mon Mar 20 16:07:44 2023 +0100 drm/fbdev-generic: Always use shadow buffering Remove all codepaths that implement fbdev output directly on GEM buffers. Always allocate a shadow buffer in system memory and set up deferred I/O for mmap. The fbdev code that operated directly on GEM buffers was used by drivers based on GEM DMA helpers. Those drivers have been migrated to use fbdev-dma, a dedicated fbdev emulation for DMA memory. All remaining users of fbdev-generic require shadow buffering. Memory management of the remaining callers uses TTM, GEM SHMEM helpers or a variant of GEM DMA helpers that is incompatible with fbdev-dma. Therefore remove the unused codepaths from fbdev-generic and simplify the code. Using a shadow buffer with deferred I/O is probably the best case for most remaining callers. Some of the TTM-based drivers might benefit from a dedicated fbdev emulation that operates directly on the driver's video memory. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Zack Rusin Tested-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-2-tzimmermann@suse.de commit 8e40c3b6e1538401d2cf8d43087ebe1db8026af9 Author: Manikanta Pubbisetty Date: Wed Mar 8 16:15:56 2023 +0530 wifi: nl80211: Update the documentation of NL80211_SCAN_FLAG_COLOCATED_6GHZ Currently when NL80211_SCAN_FLAG_COLOCATED_6GHZ is set in the scan flags, in addition to the co-located APs, PSC channels in the 6 GHz band would also be scanned if the user space has asked for it. In other words, the scan would happen on PSC channels & co-located 6 GHz channels that were reported in the RNR IE. Update the documentation of NL80211_SCAN_FLAG_COLOCATED_6GHZ flag to reflect the above said behavior. Signed-off-by: Manikanta Pubbisetty Link: https://lore.kernel.org/r/20230308104556.9399-1-quic_mpubbise@quicinc.com Signed-off-by: Johannes Berg commit fe4a6d2db3bad41e9f22c860596f355af8493ebb Author: Felix Fietkau Date: Tue Mar 14 10:59:56 2023 +0100 wifi: mac80211: implement support for yet another mesh A-MSDU format MT7996 hardware supports mesh A-MSDU subframes in hardware, but uses a big-endian length field Signed-off-by: Felix Fietkau Signed-off-by: Ryder Lee Link: https://lore.kernel.org/r/20230314095956.62085-7-nbd@nbd.name Signed-off-by: Johannes Berg commit 3468e1e0c639032a603450f0830ccabfa76f5806 Author: Felix Fietkau Date: Tue Mar 14 10:59:55 2023 +0100 wifi: mac80211: add mesh fast-rx support This helps bring down rx CPU usage by avoiding calls to the rx handlers in the slow path. Supports forwarding and local rx, including A-MSDU. Signed-off-by: Felix Fietkau Signed-off-by: Ryder Lee Link: https://lore.kernel.org/r/20230314095956.62085-6-nbd@nbd.name Signed-off-by: Johannes Berg commit 8b0f5cb6bc7cbbee4d78b3221683dcb4d1ed23d0 Author: Felix Fietkau Date: Tue Mar 14 10:59:54 2023 +0100 wifi: mac80211: use mesh header cache to speed up mesh forwarding Significantly reduces mesh forwarding path CPU usage and enables the direct use of iTXQ. Signed-off-by: Felix Fietkau Signed-off-by: Ryder Lee Link: https://lore.kernel.org/r/20230314095956.62085-5-nbd@nbd.name Signed-off-by: Johannes Berg commit d5edb9ae8d568745f893c5c5fa3837d85311b131 Author: Felix Fietkau Date: Tue Mar 14 10:59:53 2023 +0100 wifi: mac80211: mesh fast xmit support Previously, fast xmit only worked on interface types where initially a sta lookup is performed, and a cached header can be attached to the sta, requiring only some fields to be updated at runtime. This technique is not directly applicable for a mesh device type due to the dynamic nature of the topology and protocol. There are more addresses that need to be filled, and there is an extra header with a dynamic length based on the addressing mode. Change the code to cache entries contain a copy of the mesh subframe header + bridge tunnel header, as well as an embedded struct ieee80211_fast_tx, which contains the information for building the 802.11 header. Add a mesh specific early fast xmit call, which looks up a cached entry and adds only the mesh subframe header, before passing it over to the generic fast xmit code. To ensure the changes in network are reflected in these cached headers, flush affected cached entries on path changes, as well as other conditions that currently trigger a fast xmit check in other modes (key changes etc.) This code is loosely based on a previous implementation by: Sriram R Cc: Sriram R Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230314095956.62085-4-nbd@nbd.name Signed-off-by: Johannes Berg commit e626dad92383ca16d1d71e66124a272a0cbfe7bd Author: Felix Fietkau Date: Tue Mar 14 10:59:51 2023 +0100 wifi: mac80211: fix race in mesh sequence number assignment Since the sequence number is shared across different tx queues, it needs to be atomic in order to avoid accidental duplicate assignment Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230314095956.62085-2-nbd@nbd.name Signed-off-by: Johannes Berg commit ce1fdb065695f49ef6f126d35c1abbfe645d62d5 Author: Wolfram Sang Date: Tue Mar 21 07:58:26 2023 +0100 sh_eth: remove open coded netif_running() It had a purpose back in the days, but today we have a handy helper. Reported-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Reviewed-by: Leon Romanovsky Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230321065826.2044-1-wsa+renesas@sang-engineering.com Signed-off-by: Paolo Abeni commit 3a713753d3cb52e4e3039cdb906ef00f0b574219 Author: Luis Chamberlain Date: Fri Mar 10 15:28:50 2023 -0800 powerpc: Simplify sysctl registration for nmi_wd_lpm_factor_ctl_table There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Signed-off-by: Michael Ellerman Link: https://msgid.link/20230310232850.3960676-3-mcgrof@kernel.org commit 61587f1556fec39e8bafc40c8715f560639a4cf2 Author: Felix Fietkau Date: Tue Mar 21 10:12:48 2023 +0100 wifi: mac80211: add support for letting drivers register tc offload support On newer MediaTek SoCs (e.g. MT7986), WLAN->WLAN or WLAN->Ethernet flows can be offloaded by the SoC. In order to support that, the .ndo_setup_tc op is needed. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20230321091248.30947-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 9457077df49e2a637a1f1c3be42c14af604fa920 Author: Abhishek Naik Date: Mon Mar 20 12:33:19 2023 +0200 wifi: iwlwifi: mvm: Add debugfs to get TAS status Add debugfs file in mvm to retrieve TAS status per LMAC, TAS block list, current mcc, OEM name and OEM allowed list. Signed-off-by: Abhishek Naik Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.8efc8c41efae.I94e1a6efb9c33e2cdbcf4bf3ed2384005397dee9@changeid Signed-off-by: Johannes Berg commit cf85123a210fe99cdd972a5cc84857fec925f794 Author: Avraham Stern Date: Mon Mar 20 12:33:18 2023 +0200 wifi: iwlwifi: mvm: support enabling and disabling HW timestamping Instead of enabling HW timestamping by default every time a station is connected, disable it by default and enable it only upon request for a specific station. HW timestamping can be enabled for only one peer at a time. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.62b98fbf545b.I450c1017ada7900a71a63d879bb542a08e3166c8@changeid Signed-off-by: Johannes Berg commit 3068248b860c3c5163b0c6881cbaee5ebc020184 Author: Mukesh Sisodiya Date: Mon Mar 20 12:33:17 2023 +0200 wifi: iwlwifi: Update configurations for Bnj device Add missing rf support for spacific rf for BnJ device Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.eeb7ebb9ed87.I30c3938221aeb6f6ba2c84b1a77eea54c9dd3ba1@changeid Signed-off-by: Johannes Berg commit 69aef848052b8f8a5d8348606809cd3d92db9b69 Author: Miri Korenblit Date: Mon Mar 20 12:33:16 2023 +0200 wifi: iwlwifi: mvm: refactor iwl_mvm_add_sta(), iwl_mvm_rm_sta() As we have a new MLD STA cmd, there will be a different function to add/remove a station in MLD mode. But both functions will share a common part. Put this part in a separate function which will be used later in adding/removing a sta in MLD mode. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.d01e0c9ccdc3.I5e9e27c3b363b36209a0ff960d2e59708e7ff0bf@changeid Signed-off-by: Johannes Berg commit 6a8dee1391ff1d4942e8f09b5fb8c1087cd6a6c7 Author: Miri Korenblit Date: Mon Mar 20 12:33:15 2023 +0200 wifi: iwlwifi: mvm: remove not needed initializations In iwl_mvm_add_sta() we're initializing the new allocated mvm_sta. We are setting some fields to zero even though it was allocated with kzalloc, for the case of HW restart. But in such a case we will never get to this initializations due to the goto statement that we have in this case. Remove these initializations. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.c0b4d1e986a5.I6959bf1aca74c865e3c1edbf711f5fe8fb8c0c9f@changeid Signed-off-by: Johannes Berg commit 77b6a2e5f49bb3a4756a4b82f24221e62fa6ea8c Author: Miri Korenblit Date: Mon Mar 20 12:33:14 2023 +0200 wifi: iwlwifi: mvm: refactor iwl_mvm_sta_send_to_fw() We have a new STA cmd as part of the new MLD API. There are some parts of sending the STA cmd which are common to both the old and the new one. Put this parts in functions which will later be used to send the new STA cmd. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.4da940bd7384.I3a66990fbffe9611b5e41f3686c2aff37ba2eb56@changeid Signed-off-by: Johannes Berg commit 2ce1c07a8a54213d60acef267688b1c3a75f2f97 Author: Miri Korenblit Date: Mon Mar 20 12:33:13 2023 +0200 wifi: iwlwifi: mvm: refactor iwl_mvm_sta As the new MLD API is introduced, we have a new enumeration for the different station types. Since struct iwl_mvm_sta's sta_type field will be in use for both new and old API, change its type to a unified one, so it can hold both. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.c8b86d8ddd3e.I9581235860b91654b4f6c3a8797c777702690998@changeid Signed-off-by: Johannes Berg commit 4df6a07551c8a70460b590e534785d5e97d1d528 Author: Miri Korenblit Date: Mon Mar 20 12:33:12 2023 +0200 wifi: iwlwifi: mvm: refactor iwl_mvm_cfg_he_sta() This function sends the STA_HE_CTXT_CMD, which won't be used in the new MLD API. Instead, a part of the fields of this command will be in the new STA cmd. Put the parts that are common to both commands in functions, which will later be used in sending the new STA cmd. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.19b9b6c346ab.I0b8512eb64d8f03ff83879bafe9707f897d5b3c6@changeid Signed-off-by: Johannes Berg commit f5034bcf6868bf5c2de272819aa6de23f5d588f7 Author: Miri Korenblit Date: Mon Mar 20 12:33:11 2023 +0200 wifi: iwlwifi: mvm: Don't send MAC CTXT cmd after deauthorization We used to send a MAC CTXT cmd to ask the FW to not pass MCAST frames if we're associated but not authorized, because we don't have the keys in that stage, and after authorization - we sent the cmd again to ask the FW to pass MCAST, as we have the keys now. The patch linked below was changing this strategy to always allow MCAST frames, and if we're not authorized - the driver will drop them. But we're still sending the MAC CTXT cmd after deaouthorization even though we don't tell the FW to not pass MCAST frames anymore. Basically we don't tell the FW anything new with this cmd. Fix this by not sending MAC CTXT command after deauthorization. For authorization we're sending the cmd to configure other changes too, so keep it. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.11b3481bc497.I9672acff9cfc00e7e1a187e7178caa3a1911a1b5@changeid Signed-off-by: Johannes Berg commit fd1a54c14bd93166784c2adfaf1f4f22c597e963 Author: Miri Korenblit Date: Mon Mar 20 12:33:10 2023 +0200 wifi: iwlwifi: mvm: add stop_ap() and leave_ibss() callbacks for MLD mode This is another patch in the series adding all the ops for the new MLD ieee80211_ops. The callbacks added here use the new MLD FW API Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.42b0d4726b8d.I0755baace47c0ab1d9d70137448125d3140ef3af@changeid Signed-off-by: Johannes Berg commit f947b62c03b15d14349668384bb365aabe898650 Author: Miri Korenblit Date: Mon Mar 20 12:33:09 2023 +0200 wifi: iwlwifi: mvm: add start_ap() and join_ibss() callbacks for MLD mode This is another patch in the series adding all the ops for the new MLD ieee80211_ops. The callbacks added here use the new MLD FW API Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.3eb485c359fc.I28be198ea9389083d5a01f68c92763722613ba9b@changeid Signed-off-by: Johannes Berg commit e86103394474b0c15eca4bb9ed678f6e9ab5d004 Author: Avraham Stern Date: Mon Mar 20 12:33:08 2023 +0200 wifi: iwlwifi: mvm: select ptp cross timestamp from multiple reads iwl_mvm_get_sync_time() reads the gp2 from the device and then reads the system clock. Since the two reads are not done atomically, unexpected delays may happen between the two reads (e.g. context switch) which make it inaccurate. In order to improve the accuracy of the cross timestamp, call iwl_mvm_get_sync_time() multiple times in a loop and take the result in which the difference between the two clock is the smallest. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.d9e6f8f8998a.I569939ec4ddf0c6c64c112e7d0c30583f5509d9a@changeid Signed-off-by: Johannes Berg commit a2f49f7d52a9e7d0dce8f090541a28192b7abd59 Author: Avraham Stern Date: Mon Mar 20 12:33:07 2023 +0200 wifi: iwlwifi: mvm: implement PHC clock adjustments Implement the following PHC operations: 1. adjtime - for adding an offset to the PHC clock time. 2. adjfine - for adjusting the PHC clock frequency. 3. gettime64 - for getting the PHC clock time. This function returns the time as adjusted by adjtime and adjfine. The adjusted time will also be used for time sync frames timestamping. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.f59750deeee4.I110a7e3ac3c6d39d9dbe1fe77001e3f5bc3814eb@changeid Signed-off-by: Johannes Berg commit a5de7de7e78eddd3ae16aec01c5601ae36c1c2e8 Author: Johannes Berg Date: Mon Mar 20 12:33:06 2023 +0200 wifi: iwlwifi: mvm: enable TX beacon protection Check hardware/firmware support and enable TX beacon protection as well if supported, programming the key into the firmware as usual. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.6a90a4f4f469.Ia028dea75f9a8eed40786d876d51f97fb3142688@changeid Signed-off-by: Johannes Berg commit 8e33f046ff0756dd02a0c6da835f32b3a5daf35e Author: Krishnanand Prabhu Date: Mon Mar 20 12:33:05 2023 +0200 wifi: iwlwifi: mvm: add support for timing measurement Add support for timing measurement in extended capabilities, used for time synchronization. Signed-off-by: Krishnanand Prabhu Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.001d2b459ece.I15ab8fc214edc35f1f362006a9e1a22b89e7ed8e@changeid Signed-off-by: Johannes Berg commit c7eca79def44f1faf024d8442044287bef749818 Author: Avraham Stern Date: Mon Mar 20 12:33:04 2023 +0200 wifi: iwlwifi: mvm: report hardware timestamps in RX/TX status For TM/FTM frames, report the hardware timestamps reported by the fw as part of the RX/TX status. Since the fw reports the timestamps in a dedicated notification (and not as part of the RX/TX status), hold the frame until the fw timestamps notification is received. Timestamping is enabled when a station is connected and disabled when disconnected. For AP interface, only the first station will have timestamping enabled since the fw only supports timestamping for one peer. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.e0392d498101.I9bf12c8ecfb3f17253a13dc48a48647ddd6e7855@changeid Signed-off-by: Johannes Berg commit 21fb8da6ebe40ce83468d6198143b4b583b967f9 Author: Avraham Stern Date: Mon Mar 20 12:33:03 2023 +0200 wifi: iwlwifi: mvm: read synced time from firmware if supported If the firmware supports reading synced GP2/ATRB timestamps, read the synced timestamps from firmware instead of reading the GP2 register and the system time separately. Reading the synced time from firmware should be more accurate. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.a6be5f0b5580.Idedb496a5943fa496143066ffbed08185a8c4582@changeid Signed-off-by: Johannes Berg commit 1595ecce1cf32688760281f40b58b7a1d4a69aa9 Author: Krishnanand Prabhu Date: Mon Mar 20 12:33:02 2023 +0200 wifi: iwlwifi: mvm: add support for PTP HW clock (PHC) Add support to enable/disable PHC clock. The PHC clock includes support for fetching the cross timestamp i.e. a non-atomic snapshot of the current time from the hardware (WiFi device) clock and system clock (wall-clock) simultaneously. Signed-off-by: Krishnanand Prabhu Signed-off-by: Luca Coelho Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230320122330.ae1d64f513b9.Ib3b6ad61c9fa2fc5908f1e0d6f59f4af6eec1a77@changeid Signed-off-by: Johannes Berg commit 7849c42da2ca09f11fe04aeb8dbde63df756edaa Author: Grygorii Strashko Date: Tue Mar 21 11:56:00 2023 +0530 net: ethernet: ti: am65-cpts: adjust estf following ptp changes When the CPTS clock is synced/adjusted by running linuxptp (ptp4l/phc2sys), it will cause the TSN EST schedule to drift away over time. This is because the schedule is driven by the EstF periodic counter whose pulse length is defined in ref_clk cycles and it does not automatically sync to CPTS clock. _______ _| ^ expected cycle start time boundary _______________ _|_|___|_| ^ EstF drifted away -> direction To fix it, the same PPM adjustment has to be applied to EstF as done to the PHC CPTS clock, in order to correct the TSN EST cycle length and keep them in sync. Drifted cycle: AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635968230373377017 AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635968230373877017 AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635968230374377017 AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635968230374877017 AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635968230375377017 AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635968230375877023 AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635968230376377018 AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635968230376877018 AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635968230377377018 Stable cycle: AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635966863193375473 AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635966863193875473 AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635966863194375473 AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635966863194875473 AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635966863195375473 AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635966863195875473 AM65_CPTS_EVT: 7 e1:01770001 e2:000000ff t:1635966863196375473 Signed-off-by: Grygorii Strashko Signed-off-by: Siddharth Vadapalli Reviewed-by: Roger Quadros Acked-by: Richard Cochran Link: https://lore.kernel.org/r/20230321062600.2539544-1-s-vadapalli@ti.com Signed-off-by: Paolo Abeni commit e83ca8cfa286c9fc78b585b0e66df7f542bcbcf2 Author: Sean Christopherson Date: Wed Mar 8 15:24:37 2023 -0800 KVM: PPC: booke: Mark three local functions "static" Tag a few functions that are local and don't have a previous prototype as "static". No functional change intended. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303031630.ntvIuYqo-lkp@intel.com Signed-off-by: Sean Christopherson Signed-off-by: Michael Ellerman Link: https://msgid.link/20230308232437.500031-1-seanjc@google.com commit 901d9d62416baec3979fd9d768249b8a9e8e56ee Author: Cheng Xu Date: Wed Mar 22 17:33:19 2023 +0800 RDMA/erdma: Minor refactor of device init flow After necessary configuration, driver should wait hardware finishing initialization. The wait sets at CMDQ related function though it has nothing to do with CMDQ. Refactor this part to make code cleaner. Signed-off-by: Cheng Xu Link: https://lore.kernel.org/r/20230322093319.84045-4-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky commit 72769dba6dc0b8ac5793f94a83add4ce0108c44c Author: Cheng Xu Date: Wed Mar 22 17:33:18 2023 +0800 RDMA/erdma: Eliminate unnecessary casting of EQ doorbells Using void * to define EQ doorbell pointer can eliminate unnecessary casting when performing assignment. Also rename *db_addr* to *db* for a shorter name. Signed-off-by: Cheng Xu Link: https://lore.kernel.org/r/20230322093319.84045-3-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky commit de19ec778c7a4ee2fe2112126c5d05a10db2d582 Author: Cheng Xu Date: Wed Mar 22 17:33:17 2023 +0800 RDMA/erdma: Unify byte ordering APIs usage Replace __be32_to_cpu/__cpu_to_be16 with be32_to_cpu/cpu_to_be16. And use be32_to_cpu_array to copy and swap byte order to hide the loop. Signed-off-by: Cheng Xu Link: https://lore.kernel.org/r/20230322093319.84045-2-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky commit 59da2d7b0e99c58590a0d3d16905cda27b76da3a Author: Jason Xing Date: Tue Mar 21 09:57:46 2023 +0800 net-sysfs: display two backlog queue len separately Sometimes we need to know which one of backlog queue can be exactly long enough to cause some latency when debugging this part is needed. Thus, we can then separate the display of both. Signed-off-by: Jason Xing Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230321015746.96994-1-kerneljasonxing@gmail.com Signed-off-by: Paolo Abeni commit db8496d0b50519540e1ee50f7e209b3a536ed671 Author: Ye Xingchen Date: Wed Mar 22 16:22:51 2023 +0800 drm: bridge: simple-bridge: Use dev_err_probe() Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/202303221622511915615@zte.com.cn commit ed8f4e1002781c47813e4e2b37ad15b927fd8b67 Author: Ye Xingchen Date: Wed Mar 22 16:21:33 2023 +0800 drm/bridge: display-connector: Use dev_err_probe() Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/202303221621336645576@zte.com.cn commit 8446b84c894f7441f8bf4410f9638e38dcb29c49 Author: Martin Blumenstingl Date: Tue Mar 21 18:12:13 2023 +0100 ARM: dts: meson8m2: mxiii-plus: Enable Bluetooth and WiFi support The MXIII Plus uses an Ampak AP6330 Bluetooth and WiFi combo chip. Bluetooth is connected to &uart_A and requires toggling GPIOX_20. WiFi can be routed to either &sdhc or &sdio. Route WiFi to &sdhc since &sdio is already connected to the SD card. Additionally WiFi requires toggling GPIOX_11 and GPIOAO_6 as well as enabling the 32kHz clock signal. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230321171213.2808460-4-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit ef8474d50a37ab5f2f2f60e179d749b4273470de Author: Martin Blumenstingl Date: Tue Mar 21 18:12:12 2023 +0100 ARM: dts: meson8: add the SDXC_A pins Add the pins for the SDHC MMC controller which connect to the SDIO wifi on some boards. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230321171213.2808460-3-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit 4ca4a633205fb372882de3e6e93a0a3584298249 Author: Martin Blumenstingl Date: Tue Mar 21 18:12:11 2023 +0100 ARM: dts: meson8: add the xtal_32k_out pin GPIOX_10 can generate a 32768Hz signal when enabling the "xtal_32k_out" group with the xtal function. This is typically used as LPO clock for the SDIO wifi chips. Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230321171213.2808460-2-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong commit 43b450632676fb60e9faeddff285d9fac94a4f58 Author: Christian Brauner Date: Tue Mar 21 09:18:07 2023 +0100 open: return EINVAL for O_DIRECTORY | O_CREAT After a couple of years and multiple LTS releases we received a report that the behavior of O_DIRECTORY | O_CREAT changed starting with v5.7. On kernels prior to v5.7 combinations of O_DIRECTORY, O_CREAT, O_EXCL had the following semantics: (1) open("/tmp/d", O_DIRECTORY | O_CREAT) * d doesn't exist: create regular file * d exists and is a regular file: ENOTDIR * d exists and is a directory: EISDIR (2) open("/tmp/d", O_DIRECTORY | O_CREAT | O_EXCL) * d doesn't exist: create regular file * d exists and is a regular file: EEXIST * d exists and is a directory: EEXIST (3) open("/tmp/d", O_DIRECTORY | O_EXCL) * d doesn't exist: ENOENT * d exists and is a regular file: ENOTDIR * d exists and is a directory: open directory On kernels since to v5.7 combinations of O_DIRECTORY, O_CREAT, O_EXCL have the following semantics: (1) open("/tmp/d", O_DIRECTORY | O_CREAT) * d doesn't exist: ENOTDIR (create regular file) * d exists and is a regular file: ENOTDIR * d exists and is a directory: EISDIR (2) open("/tmp/d", O_DIRECTORY | O_CREAT | O_EXCL) * d doesn't exist: ENOTDIR (create regular file) * d exists and is a regular file: EEXIST * d exists and is a directory: EEXIST (3) open("/tmp/d", O_DIRECTORY | O_EXCL) * d doesn't exist: ENOENT * d exists and is a regular file: ENOTDIR * d exists and is a directory: open directory This is a fairly substantial semantic change that userspace didn't notice until Pedro took the time to deliberately figure out corner cases. Since no one noticed this breakage we can somewhat safely assume that O_DIRECTORY | O_CREAT combinations are likely unused. The v5.7 breakage is especially weird because while ENOTDIR is returned indicating failure a regular file is actually created. This doesn't make a lot of sense. Time was spent finding potential users of this combination. Searching on codesearch.debian.net showed that codebases often express semantical expectations about O_DIRECTORY | O_CREAT which are completely contrary to what our code has done and currently does. The expectation often is that this particular combination would create and open a directory. This suggests users who tried to use that combination would stumble upon the counterintuitive behavior no matter if pre-v5.7 or post v5.7 and quickly realize neither semantics give them what they want. For some examples see the code examples in [1] to [3] and the discussion in [4]. There are various ways to address this issue. The lazy/simple option would be to restore the pre-v5.7 behavior and to just live with that bug forever. But since there's a real chance that the O_DIRECTORY | O_CREAT quirk isn't relied upon we should try to get away with murder(ing bad semantics) first. If we need to Frankenstein pre-v5.7 behavior later so be it. So let's simply return EINVAL categorically for O_DIRECTORY | O_CREAT combinations. In addition to cleaning up the old bug this also opens up the possiblity to make that flag combination do something more intuitive in the future. Starting with this commit the following semantics apply: (1) open("/tmp/d", O_DIRECTORY | O_CREAT) * d doesn't exist: EINVAL * d exists and is a regular file: EINVAL * d exists and is a directory: EINVAL (2) open("/tmp/d", O_DIRECTORY | O_CREAT | O_EXCL) * d doesn't exist: EINVAL * d exists and is a regular file: EINVAL * d exists and is a directory: EINVAL (3) open("/tmp/d", O_DIRECTORY | O_EXCL) * d doesn't exist: ENOENT * d exists and is a regular file: ENOTDIR * d exists and is a directory: open directory One additional note, O_TMPFILE is implemented as: #define __O_TMPFILE 020000000 #define O_TMPFILE (__O_TMPFILE | O_DIRECTORY) #define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT) For older kernels it was important to return an explicit error when O_TMPFILE wasn't supported. So O_TMPFILE requires that O_DIRECTORY is raised alongside __O_TMPFILE. It also enforced that O_CREAT wasn't specified. Since O_DIRECTORY | O_CREAT could be used to create a regular allowing that combination together with __O_TMPFILE would've meant that false positives were possible, i.e., that a regular file was created instead of a O_TMPFILE. This could've been used to trick userspace into thinking it operated on a O_TMPFILE when it wasn't. Now that we block O_DIRECTORY | O_CREAT completely the check for O_CREAT in the __O_TMPFILE branch via if ((flags & O_TMPFILE_MASK) != O_TMPFILE) can be dropped. Instead we can simply check verify that O_DIRECTORY is raised via if (!(flags & O_DIRECTORY)) and explain this in two comments. As Aleksa pointed out O_PATH is unaffected by this change since it always returned EINVAL if O_CREAT was specified - with or without O_DIRECTORY. Link: https://lore.kernel.org/lkml/20230320071442.172228-1-pedro.falcato@gmail.com Link: https://sources.debian.org/src/flatpak/1.14.4-1/subprojects/libglnx/glnx-dirfd.c/?hl=324#L324 [1] Link: https://sources.debian.org/src/flatpak-builder/1.2.3-1/subprojects/libglnx/glnx-shutil.c/?hl=251#L251 [2] Link: https://sources.debian.org/src/ostree/2022.7-2/libglnx/glnx-dirfd.c/?hl=324#L324 [3] Link: https://www.openwall.com/lists/oss-security/2014/11/26/14 [4] Reported-by: Pedro Falcato Cc: Aleksa Sarai Signed-off-by: Linus Torvalds Signed-off-by: Christian Brauner commit 72d17c3e86d0f7fad8f3ae77d87d00b7b6788a8e Author: Baochen Qiang Date: Fri Mar 17 14:25:33 2023 +0800 wifi: ath12k: Enable IMPS for WCN7850 To reduce power consumption, change idle_ps to true to enable Idle Mode Power Save (IMPS) for WCN7850. 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 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230317062533.18240-1-quic_bqiang@quicinc.com commit 4c26033d75e414cf0c500055ec58511f93684d87 Author: Baochen Qiang Date: Thu Mar 16 12:11:44 2023 +0800 wifi: ath12k: Identify DFS channel when sending scan channel list command WMI_CHAN_INFO_DFS flag should be set when configuring a DFS channel included in scan channel list. Without it, firmware will not send a probe request frame which is needed in connection to an AP configured with hidden SSID/network_id. So fix this to allow probe request frames to be sent in cases where a beacon frame has been seen on the channel first. 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 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230316041144.7770-1-quic_bqiang@quicinc.com commit cbc0008c9b39ea95b5125ab77fb409d9a32a42e1 Author: Aditya Kumar Singh Date: Wed Mar 15 17:02:02 2023 +0530 wifi: ath12k: fix firmware assert during channel switch for peer sta Currently, during change in bandwidth for peer sta, host sends the new value of channel width via WMI_PEER_CHWIDTH set peer param command alone. This can lead to firmware assert in some scenario since before the command, firmware was having value of channel width and its corresponding phymode. After the command, host tries to set the new value of channel width alone which can become incompatible when compared with its phymode. For example: Bandwidth Upgrade ~~~~~~~~~~~~~~~~~~ After association, sta is in 40 MHz bandwidth in 11ax-HE40 phymode. After bandwidth upgrades, sta moves to 80 MHz but as per phymode, max bandwidth is still 40 MHz. Hence, firmware assert is seen. So in this case first phymode should be moved to 11ax-HE80 followed by bandwidth change. Bandwidth Downgrade ~~~~~~~~~~~~~~~~~~ Similarly, reverse of above is also possible when sta is in 40 MHz bandwidth in 11ax-HE40 phymode. Bandwidth should be changed to 20 MHz and if host sends phymode first then, phymode will become 11ax-HE20 and will be incompatible with bandwidth value and hence firmware assert will be seen. Hence, in this case first channel width should be set followed by phymode. Fix this issue by sending WMI set peer param command for phymode as well as bandwidth based on the type of bandwidth change i.e upgrade or downgrade. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aditya Kumar Singh Signed-off-by: Aaradhana Sahu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230315113202.8774-1-quic_aarasahu@quicinc.com commit 960412bee0ea75f6b3c2dca4a3535795ee84c47a Author: Rajat Soni Date: Wed Mar 15 14:36:32 2023 +0530 wifi: ath12k: fix memory leak in ath12k_qmi_driver_event_work() Currently the buffer pointed by event is not freed in case ATH12K_FLAG_UNREGISTERING bit is set, this causes memory leak. Add a goto skip instead of return, to ensure event and all the list entries are freed properly. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Rajat Soni Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230315090632.15065-1-quic_rajson@quicinc.com commit 4d1f51551777b4a8e6f5503f4d64625586de2c6d Author: Arseniy Krasnov Date: Mon Mar 20 20:43:29 2023 +0300 virtio/vsock: check transport before skb allocation Pointer to transport could be checked before allocation of skbuff, thus there is no need to free skbuff when this pointer is NULL. Signed-off-by: Arseniy Krasnov Reviewed-by: Bobby Eshleman Reviewed-by: Stefano Garzarella Reviewed-by: Pavan Chebbi Link: https://lore.kernel.org/r/08d61bef-0c11-c7f9-9266-cb2109070314@sberdevices.ru Signed-off-by: Paolo Abeni commit 68e93ac5a31d4975b25f819b2dfe914c72abc3bb Author: Harshitha Prem Date: Wed Mar 15 12:24:43 2023 +0200 wifi: ath11k: fix BUFFER_DONE read on monitor ring rx buffer Perform dma_sync_single_for_cpu() on monitor ring rx buffer before reading BUFFER_DONE tag and do dma_unmap_single() only after device had set BUFFER_DONE tag to the buffer. Also when BUFFER_DONE tag is not set, allow the buffer to get read next time without freeing skb. This helps to fix AP+Monitor VAP with flood traffic scenario to see monitor ring rx buffer overrun missing BUFFER_DONE tag to be set. Also remove redundant rx dma buf free performed on DP rx_mon_status_refill_ring. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sathishkumar Muruganandam Signed-off-by: Harshitha Prem Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230309164434.32660-1-quic_hprem@quicinc.com commit 5519fea915effccf57fa1369669f4a6bc6c44a07 Author: Christian König Date: Fri Feb 17 13:54:27 2023 +0100 drm: remove drm_dev_set_unique Not used by any drivers any more, the only use case in drm_dev_init() can be inlined now. Signed-off-by: Christian König Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20230316082035.567520-2-christian.koenig@amd.com commit 1bd51241bde49f134d3631ebbcc3d5ce4f8b143a Author: Sumitra Sharma Date: Tue Mar 21 22:40:51 2023 -0700 Staging: nvec: Remove macro definition to_nvec_led Remove definition 'to_nvec_led' because it is only used once. Rewrite the code directly in the calling function 'nvec_led_brightness_set'. Signed-off-by: Sumitra Sharma Link: https://lore.kernel.org/r/20230322054051.GA150453@sumitra.com Signed-off-by: Greg Kroah-Hartman commit 7045b31e1b8f6a3ebd3023d69834666e48a2eb9c Author: Tom Rix Date: Tue Mar 21 15:01:27 2023 -0400 staging: rts5208: remove unused xd_check_err_code function clang with W=1 reports drivers/staging/rts5208/xd.c:34:19: error: unused function 'xd_check_err_code' [-Werror,-Wunused-function] static inline int xd_check_err_code(struct rtsx_chip *chip, u8 err_code) ^ This function is not used, so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230321190127.1827703-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 288dee556536f07f51df4b0d265c83be73991fb1 Author: Menna Mahmoud Date: Sun Mar 19 22:11:34 2023 +0200 staging: rtl8723bs: use inline functions for dvobj_to_dev Convert `dvobj_to_dev` macro into a static inline function. it is not great to have macro that use `container_of` macro, because from looking at the definition one cannot tell what type it applies to. One can get the same benefit from an efficiency point of view by making an inline function. Suggested-by: Julia Lawall Signed-off-by: Menna Mahmoud Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230319201134.253839-1-eng.mennamahmoud.mm@gmail.com Signed-off-by: Greg Kroah-Hartman commit c388adce927c302dc740a550e79236f4dc9864b7 Author: Menna Mahmoud Date: Mon Mar 20 23:22:39 2023 +0200 staging: most: define iface_to_hdm as an inline function Convert `iface_to_hdm` macro into a static inline function. it is not great to have macro that use `container_of` macro, because from looking at the definition one cannot tell what type it applies to. One can get the same benefit from an efficiency point of view by making an inline function. Suggested-by: Julia Lawall Signed-off-by: Menna Mahmoud Link: https://lore.kernel.org/r/20230320212239.22452-1-eng.mennamahmoud.mm@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8f51a66a629b67a11250f555b89aa8d91137ed94 Author: Menna Mahmoud Date: Mon Mar 20 12:33:56 2023 +0200 staging: most: use inline functions for to_hdm Convert `to_hdm` macro into a static inline function. it is not great to have macro that use `container_of` macro, because from looking at the definition one cannot tell what type it applies to. One can get the same benefit from an efficiency point of view by making an inline function. Suggested-by: Julia Lawall Signed-off-by: Menna Mahmoud Link: https://lore.kernel.org/r/20230320103356.6498-1-eng.mennamahmoud.mm@gmail.com Signed-off-by: Greg Kroah-Hartman commit 72a456de903389aa9d484ee0127af3352f156e1c Author: Philipp Hortmann Date: Fri Mar 17 20:13:13 2023 +0100 staging: rtl8192e: Remove unused variable rtl819XAGCTAB_Array Remove unused variable rtl819XAGCTAB_Array. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/0733800b195d4f63cce2ef2ac114943c8c30f587.1679077522.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 41abdba9374734b743019fc1cc05e3225c82ba6b Author: Shrikanth Hegde Date: Fri Feb 24 00:21:53 2023 +0530 sched: Interleave cfs bandwidth timers for improved single thread performance at low utilization CPU cfs bandwidth controller uses hrtimer. Currently there is no initial value set. Hence all period timers would align at expiry. This happens when there are multiple CPU cgroup's. There is a performance gain that can be achieved here if the timers are interleaved when the utilization of each CPU cgroup is low and total utilization of all the CPU cgroup's is less than 50%. If the timers are interleaved, then the unthrottled cgroup can run freely without many context switches and can also benefit from SMT Folding. This effect will be further amplified in SPLPAR environment. This commit adds a random offset after initializing each hrtimer. This would result in interleaving the timers at expiry, which helps in achieving the said performance gain. This was tested on powerpc platform with 8 core SMT=8. Socket power was measured when the workload. Benchmarked the stress-ng with power information. Throughput oriented benchmarks show significant gain up to 25% while power consumption increases up to 15%. Workload: stress-ng --cpu=32 --cpu-ops=50000. 1CG - 1 cgroup is running. 2CG - 2 cgroups are running together. Time taken to complete stress-ng in seconds and power is in watts. each cgroup is throttled at 25% with 100ms as the period value. 6.2-rc6 | with patch 8 core 1CG power 2CG power | 1CG power 2 CG power 27.5 80.6 40 90 | 27.3 82 32.3 104 27.5 81 40.2 91 | 27.5 81 38.7 96 27.7 80 40.1 89 | 27.6 80 29.7 106 27.7 80.1 40.3 94 | 27.6 80 31.5 105 Latency might be affected by this change. That could happen if the CPU was in a deep idle state which is possible if we interleave the timers. Used schbench for measuring the latency. Each cgroup is throttled at 25% with period value is set to 100ms. Numbers are when both the cgroups are running simultaneously. Latency values don't degrade much. Some improvement is seen in tail latencies. 6.2-rc6 with patch Groups: 16 50.0th: 39.5 42.5 75.0th: 924.0 922.0 90.0th: 972.0 968.0 95.0th: 1005.5 994.0 99.0th: 4166.0 2287.0 99.5th: 7314.0 7448.0 99.9th: 15024.0 13600.0 Groups: 32 50.0th: 819.0 463.0 75.0th: 1596.0 918.0 90.0th: 5992.0 1281.5 95.0th: 13184.0 2765.0 99.0th: 21792.0 14240.0 99.5th: 25696.0 18920.0 99.9th: 33280.0 35776.0 Groups: 64 50.0th: 4806.0 3440.0 75.0th: 31136.0 33664.0 90.0th: 54144.0 58752.0 95.0th: 66176.0 67200.0 99.0th: 84736.0 91520.0 99.5th: 97408.0 114048.0 99.9th: 136448.0 140032.0 Initial RFC PATCH, discussions and details on the problem: Link1: https://lore.kernel.org/lkml/5ae3cb09-8c9a-11e8-75a7-cc774d9bc283@linux.vnet.ibm.com/ Link2: https://lore.kernel.org/lkml/9c57c92c-3e0c-b8c5-4be9-8f4df344a347@linux.vnet.ibm.com/ Suggested-by: Peter Zijlstra Suggested-by: Thomas Gleixner Signed-off-by: Shrikanth Hegde Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ben Segall Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20230223185153.1499710-1-sshegde@linux.vnet.ibm.com commit eff6c8ce8d4d7faef75f66614dd20bb50595d261 Author: wuchi Date: Tue Mar 21 14:44:59 2023 +0800 sched/core: Reduce cost of sched_move_task when config autogroup Some sched_move_task calls are useless because that task_struct->sched_task_group maybe not changed (equals task_group of cpu_cgroup) when system enable autogroup. So do some checks in sched_move_task. sched_move_task eg: task A belongs to cpu_cgroup0 and autogroup0, it will always belong to cpu_cgroup0 when do_exit. So there is no need to do {de|en}queue. The call graph is as follow. do_exit sched_autogroup_exit_task sched_move_task dequeue_task sched_change_group A.sched_task_group = sched_get_task_group (=cpu_cgroup0) enqueue_task Performance results: =========================== 1. env cpu: bogomips=4600.00 kernel: 6.3.0-rc3 cpu_cgroup: 6:cpu,cpuacct:/user.slice 2. cmds do_exit script: for i in {0..10000}; do sleep 0 & done wait Run the above script, then use the following bpftrace cmd to get the cost of sched_move_task: bpftrace -e 'k:sched_move_task { @ts[tid] = nsecs; } kr:sched_move_task /@ts[tid]/ { @ns += nsecs - @ts[tid]; delete(@ts[tid]); }' 3. cost time(ns): without patch: 43528033 with patch: 18541416 diff:-24986617 -57.4% As the result show, the patch will save 57.4% in the scenario. Signed-off-by: wuchi Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230321064459.39421-1-wuchi.zero@gmail.com commit 530bfad1d53d103f98cec66a3e491a36d397884d Author: Hao Jia Date: Thu Mar 16 16:18:06 2023 +0800 sched/core: Avoid selecting the task that is throttled to run when core-sched enable When {rt, cfs}_rq or dl task is throttled, since cookied tasks are not dequeued from the core tree, So sched_core_find() and sched_core_next() may return throttled task, which may cause throttled task to run on the CPU. So we add checks in sched_core_find() and sched_core_next() to make sure that the return is a runnable task that is not throttled. Co-developed-by: Cruz Zhao Signed-off-by: Cruz Zhao Signed-off-by: Hao Jia Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20230316081806.69544-1-jiahao.os@bytedance.com commit d91e15a21d4b3823ce93a42b05f0d171689f4e6a Author: Tom Rix Date: Tue Mar 14 10:48:18 2023 -0400 sched/topology: Make sched_energy_mutex,update static smatch reports kernel/sched/topology.c:212:1: warning: symbol 'sched_energy_mutex' was not declared. Should it be static? kernel/sched/topology.c:213:6: warning: symbol 'sched_energy_update' was not declared. Should it be static? These variables are only used in topology.c, so should be static Signed-off-by: Tom Rix Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lore.kernel.org/r/20230314144818.1453523-1-trix@redhat.com commit ba32601bdb189c13e5fab0f060d67a46805d6e5f Author: Khadija Kamran Date: Mon Mar 20 17:10:34 2023 +0500 staging: greybus: fix line ending with '(' Splitting function header to multiple lines because of 80 characters per line limit, results in ending the function call line with '('. This leads to CHECK reported by checkpatch.pl Move the first parameter right after the '(' in the function call line. Align the rest of the parameters to the opening parenthesis. Signed-off-by: Khadija Kamran Link: https://lore.kernel.org/r/ZBhNOkQbG4ygNF98@khadija-virtual-machine Signed-off-by: Greg Kroah-Hartman commit dc467faa2305cca067d24315c71d4e12d4e2d679 Author: Sumitra Sharma Date: Sun Mar 19 09:45:20 2023 -0700 Staging: greybus: Fix lines ending with '(' The coding style used to limit lines to 80 characters, which led to splitting of these function headers into multiple lines and ends the first line with a '('. Such splits causes checks reported by the checkpatch. Place the function parameters of each function immediately after '(' in a single line to align the function headers. Signed-off-by: Sumitra Sharma Link: https://lore.kernel.org/r/20230319164520.GA125117@sumitra.com Signed-off-by: Greg Kroah-Hartman commit cb4a0bec0bb982991b27d6826f3372890cebb8ab Author: Greg Kroah-Hartman Date: Mon Mar 13 19:28:43 2023 +0100 EDAC/sysfs: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Borislav Petkov Cc: Tony Luck Cc: James Morse Cc: Mauro Carvalho Chehab Cc: Robert Richter Cc: linux-edac@vger.kernel.org Link: https://lore.kernel.org/r/20230313182918.1312597-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 5ee33d905f89c18d4b33da6e5eefdae6060502df Author: Jack Xiao Date: Wed Mar 22 09:31:16 2023 +0800 drm/amd/amdgpu: limit one queue per gang Limit one queue per gang in mes self test, due to mes schq fw change. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 3043d13fefb9114a7698485552f75ad8fc3e7c2c Author: Alex Deucher Date: Tue Feb 28 14:41:30 2023 -0500 drm/amd/pm: enable TEMP_DEPENDENT_VMIN for navi1x May help stability with some navi1x boards. Hopefully this helps with stability with multiple monitors and would allow us to re-enable MPC_SPLIT_DYNAMIC in the DC code for better power savings. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2196 Reviewed-by: Evan Quan Reviewed-by: Rodrigo Siqueira Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher Tested-by: Daniel Wheeler commit 2a867a85ee0251cf55abca75e745c5f66f76c125 Author: Aric Cyr Date: Mon Mar 13 01:09:20 2023 -0400 drm/amd/display: 3.2.228 This DC version brings along: - Power down eDP if eDP not present - Set MPC_SPLIT_DYNAMIC for DCN10 and DCN301 - Initialize link_srv in virtual env - Code cleanup and alignment Acked-by: Qingqing Zhuo Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ae8df8c9f630403bb74d3c6e9768fe3991d547f6 Author: Hersen Wu Date: Thu Mar 9 15:58:54 2023 -0500 drm/amd/display: Set dcn32 caps.seamless_odm [Why & How] seamless_odm set was not picked up while merging commit 2d017189e2b3 ("drm/amd/display: Blank eDP on enable drv if odm enabled") Fixes: 2d017189e2b3 ("drm/amd/display: Blank eDP on enable drv if odm enabled") Reviewed-by: Qingqing Zhuo Acked-by: Qingqing Zhuo Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2fedafc7ef071979b07fe9e9ccb7af210b65da0e Author: Hersen Wu Date: Thu Mar 9 16:14:08 2023 -0500 drm/amd/display: fix wrong index used in dccg32_set_dpstreamclk [Why & How] When merging commit 9af611f29034 ("drm/amd/display: Fix DCN32 DPSTREAMCLK_CNTL programming"), index change was not picked up. Cc: stable@vger.kernel.org Cc: Mario Limonciello Fixes: 9af611f29034 ("drm/amd/display: Fix DCN32 DPSTREAMCLK_CNTL programming") Reviewed-by: Qingqing Zhuo Acked-by: Qingqing Zhuo Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1c1f61057c10107d15093522c097d9bf54703ae3 Author: Hersen Wu Date: Thu Mar 9 14:43:12 2023 -0500 drm/amd/display: align commit_planes_for_stream to latest dc code [Why & How] Due to historic issues, commit_planes_for_stream() has grown differently compared to latest dc code. Apply missed changes to make it aligned. Acked-by: Qingqing Zhuo Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 27dd79c00aeab36cd7542c7a4481a32549038659 Author: Alex Deucher Date: Tue Feb 28 14:46:46 2023 -0500 Revert "drm/amdgpu/display: change pipe policy for DCN 2.0" This reverts commit bcfab8e35ce81e2fd3230c1575024bfde0d28c8b. Hopefully this is fixed by the previous patch to enable TEMP_DEPENDENT_VMIN for navi1x or otherwise and we can re-enable MPC_SPLIT_DYNAMIC for DCN 2.0 for better power savings. Reviewed-by: Rodrigo Siqueira Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher Tested-by: Daniel Wheeler commit 75b204ee6cac4595cc663daf59b40162bbf411fb Author: Rodrigo Siqueira Date: Thu Mar 9 11:18:38 2023 -0700 drm/amd/display: Set MPC_SPLIT_DYNAMIC for DCN301 Since DC version 3.2.226, DC started to use a new internal commit sequence that better deals with hardware limitations. Usually, DC adopts split pipe dynamics to improve the display bandwidth and, in some cases, to save power. This commit sets MPC_SPLIT_DYNAMIC for DCN301, improving the bandwidth and fixing the cursor bug on KDE when it tries hardware rotation. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2247 Cc: Melissa Wen Cc: Xaver Hugl Reviewed-by: Melissa Wen Acked-by: Qingqing Zhuo Acked-by: Hamza Mahfooz Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ea2b852b656afaf6d45597abbcac8425fa6ab02d Author: Rodrigo Siqueira Date: Thu Mar 9 10:30:32 2023 -0700 drm/amd/display: Set MPC_SPLIT_DYNAMIC for DCN10 Since DC version 3.2.226, DC started to use a new internal commit sequence that better deals with multiple hardware constraints. One of the improvements is a more reliable sequence for pipe split. Due to the transition made in version 3.2.226, it should be more reliable to use the pipe policy as MPC_SPLIT_DYNAMIC, and this commit makes this change. Acked-by: Qingqing Zhuo Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 63bb1064a71d9372a643dbf1d00b736f203c867f Author: Charlene Liu Date: Fri Mar 10 14:32:26 2023 -0500 drm/amd/display: add missing code change init pix_per_cycle [why] missing change when port to these two dcn version. Reviewed-by: Chris Park Reviewed-by: Leo Ma Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a36f72547e0eb623912957aeb68465e3c9f7effe Author: Charlene Liu Date: Thu Mar 9 15:03:50 2023 -0500 drm/amd/display: Add CRC and DMUB test support [Why & How] - Add CRC for test support - Add params to allow control into to DMUB. Reviewed-by: Chris Park Acked-by: Qingqing Zhuo Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a8b537605e22bfe277e666727fa0e9e01f2c729b Author: Mustapha Ghaddar Date: Wed Mar 8 10:27:17 2023 -0500 drm/amd/display: Add function pointer for validate bw usb4 [WHY] In order to follow the new protocol of calling link functions [HOW] Add the function pointer to the link_srv Reviewed-by: Kshitij Bhardwaj Acked-by: Qingqing Zhuo Signed-off-by: Mustapha Ghaddar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b5006f873b99a26f8bd36d691c09083495bc0a03 Author: Martin Leung Date: Thu Mar 9 22:42:14 2023 -0500 drm/amd/display: initialize link_srv in virtual env [why] when refactoring to link_srv, we did not include the virtual environment case where dc_construct_ctx gets called instead of dc_construct [how] add initialize link_srv to dc_construct_ctx as well Reviewed-by: Leo Ma Acked-by: Qingqing Zhuo Signed-off-by: Martin Leung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 426714f89f7081ce8bf83546219eed6ea1511891 Author: Paul Hsieh Date: Tue Mar 7 21:04:28 2023 +0800 drm/amd/display: power down eDP if eDP not present [Why] When init, driver will power up eDP to check eDP present or not. If eDP not present, driver doesn't power off eDP VDD cause power consumption. [How] If eDP is not present when detection, power off eDP VDD. Reviewed-by: Wenjing Liu Acked-by: Qingqing Zhuo Signed-off-by: Paul Hsieh Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e89d890c1b4a29fd1871f9ce21e9a94720a10e98 Author: Charlene Liu Date: Thu Mar 9 17:05:47 2023 -0500 drm/amd/display: update dio for two pixel per container case [why] Processing rate of the DP encoder, must be programmed to be the same as DIG_FIFO_OUTPUT_ PROCESSING_MODE in DP mode 0: 1 pixel per cycle 1: 2 pixel per cycle Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ac84304d68c4b310e61b275317c0ddee1b746cb8 Author: Zhikai Zhai Date: Thu Mar 2 18:04:12 2023 +0800 drm/amd/display: skip wait vblank [WHY] There is no need to wait vblank in the vupdate locked region at a full type update [HOW] skip wait vblank when global sync change Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Zhikai Zhai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c964b86e322f91f409aead79b1b497b74ae0f795 Author: Rodrigo Siqueira Date: Tue Feb 28 15:53:10 2023 -0700 drm/amd/display: Add const to a function When calling the dc_link_bw_kbps_from_raw_frl_link_rate_data from amdgpu_dm, GCC highlighted the following issue: In function ‘get_conv_frl_bw’: error: passing argument 1 of ‘dc_link_bw_kbps_from_raw_frl_link_rate_data’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 997 | aconnector->dc_link->dc, This commit fix this issue by making DC a constant variable since we only use it to invoke the function bw_kbps_from_raw_frl_link_rate_data(). Reviewed-by: Chris Park Acked-by: Qingqing Zhuo Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 28e5c9d601fb8c2f387516b095a9cf6ddf7c00d5 Author: Wesley Chalmers Date: Fri Mar 3 14:44:53 2023 -0500 drm/amd/display: Make DCN32 3dlut function available to future DCNs [Why & How] Make DCN32 3dlut function non-static and thus available for future DCNs. Reviewed-by: Chris Park Acked-by: Qingqing Zhuo Signed-off-by: Wesley Chalmers Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 28606c4e5877cdb27ea443b3f36e3f0bf9e7a5ac Author: YiPeng Chai Date: Tue Mar 14 14:13:34 2023 +0800 drm/amdgpu: resume ras for gfx v11_0_3 during reset on SRIOV Gfx v11_0_3 supports ras on SRIOV, so need to resume ras during reset. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ec64350d01cd45c91916e701964ed8cba383aa35 Author: YiPeng Chai Date: Fri Mar 3 10:03:36 2023 +0800 drm/amdgpu: reinit mes ip block during reset on SRIOV Reinit mes ip block during reset on SRIOV. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit fe120b9f5ce873516a2604e4ff0c19084be94e8c Author: YiPeng Chai Date: Fri Mar 3 10:01:12 2023 +0800 drm/amdgpu: enable ras for mp0 v13_0_10 on SRIOV Enable ras for mp0 v13_0_10 on SRIOV. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 3ad5dcfe00a22404dfa2168f37fecd500ab26a6d Author: Kai-Heng Feng Date: Wed Mar 15 20:07:23 2023 +0800 drm/amdgpu/nv: Apply ASPM quirk on Intel ADL + AMD Navi S2idle resume freeze can be observed on Intel ADL + AMD WX5500. This is caused by commit 0064b0ce85bb ("drm/amd/pm: enable ASPM by default"). The root cause is still not clear for now. So extend and apply the ASPM quirk from commit e02fe3bc7aba ("drm/amdgpu: vi: disable ASPM on Intel Alder Lake based systems"), to workaround the issue on Navi cards too. Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2458 Reviewed-by: Alex Deucher Signed-off-by: Kai-Heng Feng Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 52b29307a98789853d87ed0a68031ec18063cba4 Author: Alex Hung Date: Mon Mar 6 11:39:51 2023 +0800 drm/amd/display: remove outdated 8bpc comments [Why] The commit c76e483cd916 ("drm/amd/display: Don't restrict bpc to 8 bpc") removes the historical 8bpc dependency and sets max_bpc to 16. [How] The comment that states "8bpc for non-edp" needs to be removed as well. Reviewed-by: Harry Wentland Acked-by: Qingqing Zhuo Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 97cbcae3ff20234f6a59240df0b5d5fa238b3f9e Author: Lee Jones Date: Fri Mar 17 08:17:09 2023 +0000 drm/amd/display/dc/core/dc_stat: Convert a couple of doc headers to kerneldoc format Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stat.c:38: warning: Cannot understand ***************************************************************************** drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stat.c:76: warning: Cannot understand ***************************************************************************** Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Mustapha Ghaddar Cc: Nicholas Kazlauskas Cc: Jasdeep Dhillon Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Harry Wentland Signed-off-by: Lee Jones Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 74fa4c81aadf418341f0d073c864ea7dca730a2e Author: Saaem Rizvi Date: Mon Mar 6 15:10:13 2023 -0500 drm/amd/display: Implement workaround for writing to OTG_PIXEL_RATE_DIV register [Why and How] Current implementation requires FPGA builds to take a different code path from DCN32 to write to OTG_PIXEL_RATE_DIV. Now that we have a workaround to write to OTG_PIXEL_RATE_DIV register without blanking display on hotplug on DCN32, we can allow the code paths for FPGA to be exactly the same allowing for more consistent testing. Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Saaem Rizvi Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cfa075982768840c468c874219dbec558722cb7f Author: Hawking Zhang Date: Mon Mar 20 17:33:47 2023 +0800 drm/amdgpu: Initialize umc ras callback Fix a coding error which results to null interrupt handler for umc ras. Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Signed-off-by: Alex Deucher commit 1a593aa09000c513a912f250ddbe1dd191e871c4 Author: Lee Jones Date: Fri Mar 17 08:17:17 2023 +0000 drm/amd/display/dc/link/link_detection: Demote a couple of kerneldoc abuses Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_detection.c:877: warning: Function parameter or member 'link' not described in 'detect_link_and_local_sink' drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_detection.c:877: warning: Function parameter or member 'reason' not described in 'detect_link_and_local_sink' drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_detection.c:1232: warning: Function parameter or member 'link' not described in 'dc_link_detect_connection_type' Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Lee Jones Cc: Wenjing Liu Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 4082b9f5ead4966797dddcfef0905d59e5a83873 Author: Lee Jones Date: Fri Mar 17 08:17:16 2023 +0000 drm/amd/display/dc/dce60/Makefile: Fix previous attempt to silence known override-init warnings Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:21: note: in expansion of macro ‘mmCRTC1_DCFE_MEM_LIGHT_SLEEP_CNTL’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:9: note: in expansion of macro ‘SRI’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:17: note: in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:188:17: note: in expansion of macro ‘transform_regs’ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:722:43: warning: initialized field overwritten [-Woverride-init] drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:157:21: note: in expansion of macro ‘mmCRTC2_DCFE_MEM_LIGHT_SLEEP_CNTL’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_transform.h:170:9: note: in expansion of macro ‘SRI’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:183:17: note: in expansion of macro ‘XFM_COMMON_REG_LIST_DCE60’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.c:189:17: note: in expansion of macro ‘transform_regs’ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_6_0_d.h:722:43: note: (near initialization for ‘xfm_regs[2].DCFE_MEM_LIGHT_SLEEP_CN [100 lines snipped for brevity] Fixes: ceb3cf476a441 ("drm/amd/display/dc/dce60/Makefile: Ignore -Woverride-init warning") Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Mauro Rossi Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 16a7004a2d7a2f8953daa5196d68766cfa120fcb Author: Lee Jones Date: Fri Mar 17 08:17:14 2023 +0000 drm/amd/display/dc/link/protocols/link_dp_capability: Demote non-compliant kerneldoc Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c:2190: warning: Function parameter or member 'link' not described in 'dc_link_is_dp_sink_present' Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 14af917998a6126494423f8820a93982025c6963 Author: Lee Jones Date: Fri Mar 17 08:17:13 2023 +0000 drm/amd/display/dc/link/protocols/link_dp_capability: Remove unused variable and mark another as __maybe_unused ‘ds_port’ is clearly not used anywhere and ‘result_write_min_hblank’ is only utilised when debugging is enabled. The alternative would be to allocate the variable under the same clause as the debugging code, but that would become very messy, very quickly. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c: In function ‘dp_wa_power_up_0010FA’: drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c:280:42: warning: variable ‘ds_port’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c: In function ‘dpcd_set_source_specific_data’: drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capability.c:1296:32: warning: variable ‘result_write_min_hblank’ set but not used [-Wunused-but-set-variable] Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Wenjing Liu Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 7afe3521bd405d878bc5f9b98d5db4682bcdf3a5 Author: Lee Jones Date: Fri Mar 17 08:17:11 2023 +0000 drm/amd/display/dc/link/protocols/link_dp_training: Remove set but unused variable 'result' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training.c: In function ‘perform_link_training_with_retries’: drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training.c:1586:38: warning: variable ‘result’ set but not used [-Wunused-but-set-variable] Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Wenjing Liu Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit c54011512965ab221573b4d31ce1f5a279e15c15 Author: Lee Jones Date: Fri Mar 17 08:17:10 2023 +0000 drm/amd/display/dc/link/link_detection: Remove unused variable 'status' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_detection.c: In function ‘query_hdcp_capability’: drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_detection.c:501:42: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Wenjing Liu Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit b8c6b225d9d82b5245479960f62f0e95d611cc18 Author: Lee Jones Date: Fri Mar 17 08:17:08 2023 +0000 drm/amd/display/dc/dce/dmub_psr: Demote kerneldoc abuse Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:257: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: David Zhang Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit bc517825c5d6c388cc7c668615a0b8f1b26ce513 Author: Lee Jones Date: Fri Mar 17 08:17:01 2023 +0000 drm/amd/display/amdgpu_dm/amdgpu_dm_helpers: Move defines out to where they are actually used Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h: At top level: drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:143:22: warning: ‘SYNAPTICS_DEVICE_ID’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:140:22: warning: ‘DP_VGA_LVDS_CONVERTER_ID_3’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:138:22: warning: ‘DP_VGA_LVDS_CONVERTER_ID_2’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:133:22: warning: ‘DP_SINK_DEVICE_STR_ID_2’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:132:22: warning: ‘DP_SINK_DEVICE_STR_ID_1’ defined but not used [-Wunused-const-variable=] [snip 400 similar lines brevity] Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 63d99a342a7c36a113d2162cb2cd267a333548ed Author: Lee Jones Date: Fri Mar 17 08:17:00 2023 +0000 drm/amd/pm/swsmu/smu11/vangogh_ppt: Provide a couple of missing parameter descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:2381: warning: Function parameter or member 'residency' not described in 'vangogh_get_gfxoff_residency' drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:2399: warning: Function parameter or member 'entrycount' not described in 'vangogh_get_gfxoff_entrycount' Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Li Ma Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit a37558e63b636109b8a9a181b316bb3416be0708 Author: Lee Jones Date: Fri Mar 17 08:16:59 2023 +0000 drm/amd/amdgpu/amdgpu_vce: Provide description for amdgpu_vce_validate_bo()'s 'p' param Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c:599: warning: Function parameter or member 'p' not described in 'amdgpu_vce_validate_bo' v2: reword (Alex) Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 0b9ff428de417423ca87f77dd6e836be967831a5 Author: Lee Jones Date: Fri Mar 17 08:16:58 2023 +0000 drm/amd/amdgpu/amdgpu_mes: Ensure amdgpu_bo_create_kernel()'s return value is checked Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c: In function ‘amdgpu_mes_ctx_alloc_meta_data’: drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:1099:13: warning: variable ‘r’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Jack Xiao Cc: Hawking Zhang Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 25a75f56be5c180e4c8e2017fc52f7e9a7a861aa Author: Lee Jones Date: Fri Mar 17 08:16:57 2023 +0000 drm/amd/amdgpu/ih_v6_0: Repair misspelling and provide descriptions for 'ih' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/ih_v6_0.c:392: warning: Function parameter or member 'ih' not described in 'ih_v6_0_get_wptr' drivers/gpu/drm/amd/amdgpu/ih_v6_0.c:432: warning: Function parameter or member 'ih' not described in 'ih_v6_0_irq_rearm' drivers/gpu/drm/amd/amdgpu/ih_v6_0.c:458: warning: Function parameter or member 'ih' not described in 'ih_v6_0_set_rptr' Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Hawking Zhang Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 3e4bc662eca6a18afb45d98ee5f6dafb5ea5787f Author: Lee Jones Date: Fri Mar 17 08:16:56 2023 +0000 drm/amd/amdgpu/gmc_v11_0: Provide a few missing param descriptions relating to hubs and flushes Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c:282: warning: Function parameter or member 'vmhub' not described in 'gmc_v11_0_flush_gpu_tlb' drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c:282: warning: Function parameter or member 'flush_type' not described in 'gmc_v11_0_flush_gpu_tlb' drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c:322: warning: Function parameter or member 'flush_type' not described in 'gmc_v11_0_flush_gpu_tlb_pasid' drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c:322: warning: Function parameter or member 'all_hub' not described in 'gmc_v11_0_flush_gpu_tlb_pasid' Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 4caee043bdbe375456f2db767c3e35dad0b3109b Author: Lee Jones Date: Fri Mar 17 08:16:55 2023 +0000 drm/amd/amdgpu/amdgpu_vm_pt: Supply description for amdgpu_vm_pt_free_dfs()'s unlocked param Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c:683: warning: Function parameter or member 'unlocked' not described in 'amdgpu_vm_pt_free_dfs' Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f5211c5dedee48eac290940b1f1a67cbd5f8bf6f Author: Lee Jones Date: Fri Mar 17 08:16:54 2023 +0000 drm/amd/amdgpu/amdgpu_ucode: Remove unused function ‘amdgpu_ucode_print_imu_hdr’ Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c:129:6: warning: no previous prototype for ‘amdgpu_ucode_print_imu_hdr’ [-Wmissing-prototypes] Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 80bd2de1db0f25c82c110433e92c0703e05e5ae9 Author: Lee Jones Date: Fri Mar 17 08:16:44 2023 +0000 drm/amd/amdgpu/amdgpu_device: Provide missing kerneldoc entry for 'reset_context' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:5152: warning: Function parameter or member 'reset_context' not described in 'amdgpu_device_gpu_recover' Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit f825fead3570d7b7a13dd13b8d63209dc1acfe5e Author: Lee Jones Date: Fri Mar 17 08:16:42 2023 +0000 drm/amd/display/dc/dc_hdmi_types: Move string definition to the only file it's used in Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dc_hdmi_types.h:53:22: warning: ‘dp_hdmi_dongle_signature_str’ defined but not used [-Wunused-const-variable=] [snipped 400 similar lines for brevity] Cc: Harry Wentland Cc: Leo Li Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Wenjing Liu Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit bf35dbc135854c809b5cb6bcce320838c6d1370e Author: Jane Jian Date: Fri Jul 8 18:07:38 2022 +0800 drm/amdgpu/jpeg: enable jpeg v4_0 for sriov - skip direct jpeg registers read&write since it is not allowed - reset Doorbell range layout for sriov Signed-off-by: Jane Jian Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 3cd658deb03868a2483484224baf2442bf4d0062 Author: Bill Liu Date: Thu Mar 16 15:59:27 2023 +0800 drm/amdgpu: Adding CAP firmware initialization Added CAP firmware initialization for PSP v13.0.10 under psp_init_sriov_microcode Signed-off-by: Bill Liu Reviewed-by: Monk Liu Signed-off-by: Alex Deucher commit 7d67285e84f62fb5fd00405432ecf1b64f921091 Author: Jiapeng Chong Date: Thu Mar 16 17:51:43 2023 +0800 drm/amd/display: Remove the unused function link_timing_bandwidth_kbps() The function link_timing_bandwidth_kbps is defined in the link_validation.c file, but not called elsewhere, so remove this unused function. drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_validation.c:258:10: warning: no previous prototype for ‘link_timing_bandwidth_kbps’. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4547 Signed-off-by: Jiapeng Chong Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 6091693a4bd1ba52e406cff44a4a9959e755c986 Author: Jiapeng Chong Date: Thu Mar 16 17:51:42 2023 +0800 drm/amd/display: make is_synaptics_cascaded_panamera static This symbol is not used outside of amdgpu_dm_mst_types.c, so marks it static. drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.c:211:6: warning: no previous prototype for ‘is_synaptics_cascaded_panamera’. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4548 Signed-off-by: Jiapeng Chong Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit ceb4a5619c734ea679bf5a2446e6869056e353d4 Author: Hans de Goede Date: Sun Mar 12 20:17:47 2023 +0100 drm/amd/display/amdgpu_dm: Refactor register_backlight_device() Refactor register_backlight_device(): 1) Turn the connector-type + signal check into an early exit condition to avoid the indentation level of the rest of the code 2) Add an array bounds check for the arrays indexed by dm->num_of_edps 3) register_backlight_device() always increases dm->num_of_edps if amdgpu_dm_register_backlight_device() has assigned a backlight_dev to the current dm->backlight_link[dm->num_of_edps] slot. So on its next call dm->backlight_dev[dm->num_of_edps] always point to the next empty slot and the "if (!dm->backlight_dev[dm->num_of_edps])" check will thus always succeed and can be removed. 4) Add a bl_idx local variable to use as array index, rather then using dm->num_of_edps to improve the code readability. Reviewed-by: Rodrigo Siqueira Signed-off-by: Hans de Goede Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4db231d7dd80163fd251635f81280f1c93a393ab Author: Hans de Goede Date: Sun Mar 12 20:17:46 2023 +0100 drm/amd/display/amdgpu_dm: Fix backlight_device_register() error handling backlight_device_register() returns an ERR_PTR on error, but other code such as amdgpu_dm_connector_destroy() assumes dm->backlight_dev[i] is NULL if no backlight is registered. Clear dm->backlight_dev[i] on registration failure, to avoid other code trying to deref an ERR_PTR pointer. Reviewed-by: Rodrigo Siqueira Signed-off-by: Hans de Goede Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5957a967599360477529ebd593e03f973dcb5fb2 Author: Jane Jian Date: Wed Mar 15 18:59:59 2023 +0800 drm/amdgpu/gfx: set cg flags to enter/exit safe mode sriov needs to enter/exit safe mode in update umd p state add the cg flag to let it enter or exit while needed Signed-off-by: Jane Jian Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit f466b111a0c68dd3925deea37271f7aace2367d9 Author: YuBiao Wang Date: Thu Mar 16 11:30:32 2023 +0800 drm/amdgpu: Force signal hw_fences that are embedded in non-sched jobs [Why] For engines not supporting soft reset, i.e. VCN, there will be a failed ib test before mode 1 reset during asic reset. The fences in this case are never signaled and next time when we try to free the sa_bo, kernel will hang. [How] During pre_asic_reset, driver will clear job fences and afterwards the fences' refcount will be reduced to 1. For drm_sched_jobs it will be released in job_free_cb, and for non-sched jobs like ib_test, it's meant to be released in sa_bo_free but only when the fences are signaled. So we have to force signal the non_sched bad job's fence during pre_asic_reset or the clear is not complete. Signed-off-by: YuBiao Wang Acked-by: Luben Tuikov Signed-off-by: Alex Deucher commit 3234fac0f97671d55c466e8093e3bdf781dae329 Author: Tong Liu01 Date: Wed Mar 15 15:24:22 2023 +0800 drm/amdgpu: add mes resume when do gfx post soft reset [why] when gfx do soft reset, mes will also do reset, if mes is not resumed when do recover from soft reset, mes is unable to respond in later sequence [how] resume mes when do gfx post soft reset Signed-off-by: Tong Liu01 Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit af1f2985038fb2569786f3de64d7dd69f5580e03 Author: Tim Huang Date: Thu Mar 9 16:27:51 2023 +0800 drm/amdgpu: skip ASIC reset for APUs when go to S4 For GC IP v11.0.4/11, PSP TMR need to be reserved for ASIC mode2 reset. But for S4, when psp suspend, it will destroy the TMR that fails the ASIC reset. [ 96.006101] amdgpu 0000:62:00.0: amdgpu: MODE2 reset [ 100.409717] amdgpu 0000:62:00.0: amdgpu: SMU: I'm not done with your previous command: SMN_C2PMSG_66:0x00000011 SMN_C2PMSG_82:0x00000002 [ 100.411593] amdgpu 0000:62:00.0: amdgpu: Mode2 reset failed! [ 100.412470] amdgpu 0000:62:00.0: PM: pci_pm_freeze(): amdgpu_pmops_freeze+0x0/0x50 [amdgpu] returns -62 [ 100.414020] amdgpu 0000:62:00.0: PM: dpm_run_callback(): pci_pm_freeze+0x0/0xd0 returns -62 [ 100.415311] amdgpu 0000:62:00.0: PM: pci_pm_freeze+0x0/0xd0 returned -62 after 4623202 usecs [ 100.416608] amdgpu 0000:62:00.0: PM: failed to freeze async: error -62 We can skip the reset on APUs, assuming we can resume them properly. Verified on some GFX11, GFX10 and old GFX9 APUs. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d24eae4dd7ffb3e6de6080fad1297db8ab4b0260 Author: Tim Huang Date: Wed Mar 15 15:52:09 2023 +0800 drm/amdgpu: reposition the gpu reset checking for reuse Move the amdgpu_acpi_should_gpu_reset out of CONFIG_SUSPEND to share it with hibernate case. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit aef98f2e1bc411a27f25db81574309b7415602ca Author: Alex Deucher Date: Wed Mar 15 13:51:43 2023 -0400 drm/amdgpu: drop the extra sign extension amdgpu_bo_gpu_offset_no_check() already calls amdgpu_gmc_sign_extend() so no need to call it twice. Reviewed-by: Yang Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 56c874f7dbcab2ab5cf8055d46a2ef36dec3d664 Author: Jakub Kicinski Date: Mon Mar 20 21:41:59 2023 -0700 tools: ynl: skip the explicit op array size when not needed Jiri suggests it reads more naturally to skip the explicit array size when possible. When we export the symbol we want to make sure that the size is right but for statics its not needed. Link: https://lore.kernel.org/r/20230321044159.1031040-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 85496c9b3bf8dbe15e2433d3a0197954d323cadc Merge: f6f4e739b1648 fe602c87df1b6 Author: Jakub Kicinski Date: Tue Mar 21 21:32:21 2023 -0700 Merge branch 'net-remove-some-rcu_bh-cruft' Eric Dumazet says: ==================== net: remove some rcu_bh cruft There is no point using rcu_bh variant hoping to free objects faster, especially hen using call_rcu() or kfree_rcu(). Disabling/enabling BH has a non-zero cost, and adds distracting hot spots in kernel profiles eg. in ip6_xmit(). ==================== Link: https://lore.kernel.org/r/20230321040115.787497-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit fe602c87df1b6927562f4ee61edd851bb9578a49 Author: Eric Dumazet Date: Tue Mar 21 04:01:15 2023 +0000 net: remove rcu_dereference_bh_rtnl() This helper is no longer used in the tree. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 09eed1192cec1755967f2af8394207acdde579a1 Author: Eric Dumazet Date: Tue Mar 21 04:01:14 2023 +0000 neighbour: switch to standard rcu, instead of rcu_bh rcu_bh is no longer a win, especially for objects freed with standard call_rcu(). Switch neighbour code to no longer disable BH when not necessary. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 4c5c496a942fa3d2197f5be22762695170c95863 Author: Eric Dumazet Date: Tue Mar 21 04:01:13 2023 +0000 ipv6: flowlabel: do not disable BH where not needed struct ip6_flowlabel are rcu managed, and call_rcu() is used to delay fl_free_rcu() after RCU grace period. There is no point disabling BH for pure RCU lookups. Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit f6f4e739b16487c89d29ef8b425d019bed64f541 Author: Tom Rix Date: Mon Mar 20 19:23:17 2023 -0400 net: atheros: atl1c: remove unused atl1c_irq_reset function clang with W=1 reports drivers/net/ethernet/atheros/atl1c/atl1c_main.c:214:20: error: unused function 'atl1c_irq_reset' [-Werror,-Wunused-function] static inline void atl1c_irq_reset(struct atl1c_adapter *adapter) ^ This function is not used, so remove it. Signed-off-by: Tom Rix Reviewed-by: Pavan Chebbi Link: https://lore.kernel.org/r/20230320232317.1729464-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit 6b2777fff8a9942cdcee82ae3f17d7f483a1e18c Author: Krzysztof Kozlowski Date: Wed Mar 8 19:33:17 2023 +0100 arm64: dts: qcom: sm8450-hdk: align WCD9385 reset pin with downstream config Downstream DTS uses 16 mA drive strength for the WCD9385 audio codec RESET_N reset pin. It also pulls the pin down in shutdown mode, thus it is more like a shutdown pin, not a reset. Use the same settings here for HDK8450 and keep the WCD9385 by default in powered off (so pin as low). Align the name of pin configuration node with other pins in the DTS. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308183317.559253-2-krzysztof.kozlowski@linaro.org commit f0d0966f87f9c38b74619bf7f0345f368af3a4c1 Author: Krzysztof Kozlowski Date: Wed Mar 8 19:33:16 2023 +0100 arm64: dts: qcom: sm8450-hdk: use precise WCD9385 compatible The HDK8450 uses WCD9385 audio codec, so use precise compatible, even though WCD9380 and WCD9385 are both compatible. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308183317.559253-1-krzysztof.kozlowski@linaro.org commit 7c2c4c9decf6f4604fe15a1db2da7c1250b3e9e5 Author: Krzysztof Kozlowski Date: Wed Mar 8 15:27:12 2023 +0100 arm64: dts: qcom: sm8450-hdk: use recommended drive strength for speaker SD_N Downstream DTS (and sc8280xp-lenovo-thinkpad-x13s with the same speakers) uses 16 mA drive strength for the WSA8835 speaker SD_N reset/shutdown pin. Use the same for HDK8450, as it is seem the recommended value. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308142712.277659-1-krzysztof.kozlowski@linaro.org commit b2e1f87070ead06fb2918edeeed4329f58d1b2ee Author: Konrad Dybcio Date: Wed Mar 8 02:27:05 2023 +0100 arm64: dts: qcom: sm8150: Add SoC-specific compatible to cpufreq_hw Add a SoC-specific compatbile to cpufreq_hw for compliancy with bindings. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308-topic-cpufreq_bindings-v1-8-3368473ec52d@linaro.org commit 64917707914f95fa5827f2cc5bea2d5febe3a01b Author: Konrad Dybcio Date: Wed Mar 8 02:27:04 2023 +0100 arm64: dts: qcom: sm6350: Add SoC-specific compatible to cpufreq_hw Add a SoC-specific compatbile to cpufreq_hw for compliancy with bindings. Signed-off-by: Konrad Dybcio Reviewed-by: Luca Weiss Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308-topic-cpufreq_bindings-v1-7-3368473ec52d@linaro.org commit f33f95773e148cd0adbfc3135f2bfbf56a69f488 Author: Konrad Dybcio Date: Wed Mar 8 02:27:03 2023 +0100 arm64: dts: qcom: sm6115: Add SoC-specific compatible to cpufreq_hw Add a SoC-specific compatbile to cpufreq_hw for compliancy with bindings. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308-topic-cpufreq_bindings-v1-6-3368473ec52d@linaro.org commit 236e7dd568ed4b839fb8abdf3ce7c77444e610e2 Author: Konrad Dybcio Date: Wed Mar 8 02:27:02 2023 +0100 arm64: dts: qcom: sdm845: Add SoC-specific compatible to cpufreq_hw Add a SoC-specific compatbile to cpufreq_hw for compliancy with bindings. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308-topic-cpufreq_bindings-v1-5-3368473ec52d@linaro.org commit e4c17be956fbe133211c24b9fc9ba253ffc44db6 Author: Konrad Dybcio Date: Wed Mar 8 02:27:01 2023 +0100 arm64: dts: qcom: sc7180: Add SoC-specific compatible to cpufreq_hw Add a SoC-specific compatbile to cpufreq_hw for compliancy with bindings. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308-topic-cpufreq_bindings-v1-4-3368473ec52d@linaro.org commit 83fddbcc833766d02d8bcdb3a3866f0c20b02349 Author: Konrad Dybcio Date: Tue Mar 7 13:31:59 2023 +0100 clk: qcom: gcc-msm8998: Update the .pwrsts for usb gdsc The USB controller on msm8998 doesn't retain its state when the system goes into low power state and the GDSCs are turned off. This can be observed by the USB connection not coming back alive after putting the device into suspend, essentially breaking USB. Work around this by updating the .pwrsts for the USB GDSCs so they only transition to retention state in low power. This change should be reverted when a proper suspend sequence is implemented in the USB drivers. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307123159.3797551-3-konrad.dybcio@linaro.org commit 78a2f2a04fb5f1182f03f2ed1f9433982f66346f Author: Konrad Dybcio Date: Tue Mar 7 13:31:58 2023 +0100 clk: qcom: gcc-msm8996: Update the .pwrsts for usb gdsc The USB controller on MSM8996 doesn't retain its state when the system goes into low power state and the GDSCs are turned off. This can be observed by the USB connection not coming back alive after putting the device into suspend, essentially breaking USB. Work around this by updating the .pwrsts for the USB GDSCs so they only transition to retention state in low power. This change should be reverted when a proper suspend sequence is implemented in the USB drivers. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307123159.3797551-2-konrad.dybcio@linaro.org commit 03b49487130ed907db787dc7b4e39392f077861b Author: Konrad Dybcio Date: Tue Mar 7 13:31:57 2023 +0100 clk: qcom: gcc-sm6375: Update the .pwrsts for usb gdsc The USB controller on sm6375 doesn't retain its state when the system goes into low power state and the GDSCs are turned off. This can be observed by the USB connection not coming back alive after putting the device into suspend, essentially breaking USB. Work around this by updating the .pwrsts for the USB GDSCs so they only transition to retention state in low power. This change should be reverted when a proper suspend sequence is implemented in the USB drivers. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307123159.3797551-1-konrad.dybcio@linaro.org commit fb1eb0b5dcf6f214479e853ee466958190785ab4 Author: Konrad Dybcio Date: Tue Mar 7 02:22:47 2023 +0100 firmware: qcom_scm: Add SM6375 compatible While it was introduced in bindings, requiring a core clock, and added into the DT, this compatible was apparently forgotten about on the driver side of things. Fix it. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307012247.3655547-1-konrad.dybcio@linaro.org commit 80dc42d9facc9232072855340c2285682c0c3b19 Author: Gergo Koteles Date: Mon Mar 6 18:41:47 2023 +0100 arm64: dts: qcom: sdm845-oneplus-common: add Hall sensor Enable the Hall effect sensor (flip cover) for OnePlus 6/6T. The GPIO is mapped to SW_LID events as in msm8916, msm8994, msm8998 devices. Signed-off-by: Gergo Koteles Reviewed-by: Caleb Connolly Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230306174147.185239-1-soyer@irl.hu commit e18b829549793f706c6c8a39f24ba93b3213fb33 Author: Krzysztof Kozlowski Date: Mon Mar 6 09:14:30 2023 +0100 arm64: dts: qcom: drop redundant line breaks Remove trailing, redundant line breaks. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230306081430.28491-2-krzysztof.kozlowski@linaro.org commit e225d56042e3a02aa3ee60c96da687ac3c690a37 Author: Krzysztof Kozlowski Date: Mon Mar 6 09:14:29 2023 +0100 arm64: dts: qcom: sdm845-db845c: drop empty node override Drop empty override of pm8998_gpios. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230306081430.28491-1-krzysztof.kozlowski@linaro.org commit 424a4e5273bfc16b6974faff50f0d24c1df0c76e Author: Krzysztof Kozlowski Date: Mon Mar 6 08:26:18 2023 +0100 ARM: dts: qcom: sdx55: add dedicated SDX55 TCSR compatible syscon should not be used alone as compatible. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230306072618.10770-2-krzysztof.kozlowski@linaro.org commit 92b9d86252c1d76faf06f155c2a73b0c673bf59d Author: Danila Tikhonov Date: Sun Mar 5 23:26:27 2023 +0300 soc: qcom: llcc: Add configuration data for SM7150 Add LLCC configuration data for SM7150 SoC. Signed-off-by: Danila Tikhonov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230305202627.402386-3-danila@jiaxyga.com commit 1e0952e7b978eb4a182c4a9c003f9313d30d00df Author: Danila Tikhonov Date: Sun Mar 5 23:26:26 2023 +0300 dt-bindings: arm: msm: Add LLCC for SM7150 Add LLCC compatible for SM7150 SoC. Signed-off-by: Danila Tikhonov Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230305202627.402386-2-danila@jiaxyga.com commit 6b056f38f07d6fe48e9c0ea9bbcf68f11c1a388b Author: Krzysztof Kozlowski Date: Sun Mar 5 16:43:08 2023 +0100 arm64: dts: qcom: pm660: align thermal node names with bindings Bindings expect thermal node names to end with '-thermal', so fix pm660 and pm660l: sda660-inforce-ifc6560.dtb: thermal-zones: 'pm660', 'pm660l' do not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230305154308.241651-1-krzysztof.kozlowski@linaro.org commit 34d84c3b0f63978efcb5136a6fd2e7e9d889da70 Author: Krzysztof Kozlowski Date: Sun Mar 5 13:24:28 2023 +0100 dt-bindings: soc: qcom: smd-rpm: re-add missing qcom,rpm-msm8994 Re-add the qcom,rpm-msm8994 compatible, dropped during conversion from TXT to DT schema: apq8094-sony-xperia-kitakami-karin_windy.dtb: smd: rpm:rpm-requests:compatible:0: 'qcom,rpm-msm8994' is not one of ['qcom,rpm-apq8084' ...] Fixes: f935a752f229 ("dt-bindings: soc: qcom: smd-rpm: Convert binding to YAML schema") Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Petr Vorel Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230305122428.167580-1-krzysztof.kozlowski@linaro.org commit 0beda02e530f8fc571877939645cb20ade113027 Author: Krzysztof Kozlowski Date: Sat Mar 4 14:03:15 2023 +0100 arm64: dts: qcom: sm8350-microsoft-surface: fix USB dual-role mode property The "dr_mode" is a property of USB DWC3 node, not the Qualcomm wrapper one: sm8350-microsoft-surface-duo2.dtb: usb@a6f8800: 'dr_mode' does not match any of the regexes: '^usb@[0-9a-f]+$', 'pinctrl-[0-9]+' Fixes: c16160cfa565 ("arm64: dts: qcom: add minimal DTS for Microsoft Surface Duo 2") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304130315.51595-2-krzysztof.kozlowski@linaro.org commit 613f14a3a9d7e12a832ff822f85a33ad0ebee952 Author: Krzysztof Kozlowski Date: Sat Mar 4 14:03:14 2023 +0100 arm64: dts: qcom: sm8250-xiaomi-elish: fix USB maximum speed property Fix typo in USB DWC3 node maximum speed property. Fixes: a41b617530bf ("arm64: dts: qcom: sm8250: Add device tree for Xiaomi Mi Pad 5 Pro") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304130315.51595-1-krzysztof.kozlowski@linaro.org commit e1988af7a646aafe8075b179c00fd8053ced2add Author: Bartosz Golaszewski Date: Thu Mar 9 11:37:52 2023 +0100 arm64: dts: qcom: sa8775p-ride: enable the BT UART port Enable the high-speed UART port connected to the Bluetooth controller on the sa8775p-adp development board. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230309103752.173541-10-brgl@bgdev.pl commit 4b6c4249069694a593f3b4c3d81c75a5053b7693 Author: Bartosz Golaszewski Date: Thu Mar 9 11:37:51 2023 +0100 arm64: dts: qcom: sa8775p-ride: enable the GNSS UART port Enable the high-speed UART port connected to the GNSS controller on the sa8775p-adp development board. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230309103752.173541-9-brgl@bgdev.pl commit 41ae5ca448c21a82a2f07e10954b043a0d45a811 Author: Bartosz Golaszewski Date: Thu Mar 9 11:37:50 2023 +0100 arm64: dts: qcom: sa8775p: add high-speed UART nodes Add two UART nodes that are known to be used by existing development boards with this SoC. Signed-off-by: Bartosz Golaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230309103752.173541-8-brgl@bgdev.pl commit a3b31b0e0f76326bfa4bc81577f52738ad8e072b Author: Bartosz Golaszewski Date: Thu Mar 9 11:37:49 2023 +0100 arm64: dts: qcom: sa8775p-ride: enable the SPI node Enable the SPI interface exposed on the sa8775p-ride development board. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230309103752.173541-7-brgl@bgdev.pl commit cfd975f588400e0942d55dc4bb84c12c6f217fb4 Author: Bartosz Golaszewski Date: Thu Mar 9 11:37:48 2023 +0100 arm64: dts: qcom: sa8775p: add the spi16 node Add the SPI controller node for the interface exposed on the sa8775p-ride development board. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230309103752.173541-6-brgl@bgdev.pl commit 12f35f74ad6da53d94fcbc1bbb2adff60b31a71f Author: Bartosz Golaszewski Date: Thu Mar 9 11:37:47 2023 +0100 arm64: dts: qcom: sa8775p-ride: enable i2c18 This enables the I2C interface on the sa8775p-ride development board. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230309103752.173541-5-brgl@bgdev.pl commit a23d122572a4ad1292e60d4a87e6f0238aaa0505 Author: Bartosz Golaszewski Date: Thu Mar 9 11:37:46 2023 +0100 arm64: dts: qcom: sa8775p: add the i2c18 node Add a disabled node for the I2C interface that's exposed on the sa8775p-ride development board. Signed-off-by: Bartosz Golaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230309103752.173541-4-brgl@bgdev.pl commit 4926a8e93f321760fa265f91d78aa2a2163e222b Author: Bartosz Golaszewski Date: Thu Mar 9 11:37:45 2023 +0100 arm64: dts: qcom: sa8775p-ride: enable QUPv3 #2 Enable the second instance of the QUPv3 engine on the sa8775p-ride board. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230309103752.173541-3-brgl@bgdev.pl commit dc3ad22112de7fe76352ef2aa2943b62eb1836a3 Author: Bartosz Golaszewski Date: Thu Mar 9 11:37:44 2023 +0100 arm64: dts: qcom: sa8775p: add the QUPv3 #2 node Add the second instance of the QUPv3 engine to the sa8775p.dtsi. Signed-off-by: Bartosz Golaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230309103752.173541-2-brgl@bgdev.pl commit 4f278f71c79f174c027d07f57837d1ca41b2df37 Author: Danila Tikhonov Date: Tue Mar 21 21:23:19 2023 +0300 arm64: dts: qcom: pm8150l: add spmi-flash-led node Add a node describing the flash block found on pm8150l. Signed-off-by: Danila Tikhonov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230321182319.24958-1-danila@jiaxyga.com commit b767d1b40cbca49452d712ca0f4f053dacfc5c45 Author: Bhupesh Sharma Date: Wed Mar 22 00:31:14 2023 +0530 arm64: dts: qcom: sdm845: Fix the BAM DMA engine compatible string As per documentation, Qualcomm SDM845 SoC supports BAM DMA engine v1.7.4, so use the correct compatible strings. Signed-off-by: Bhupesh Sharma Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230321190118.3327360-2-bhupesh.sharma@linaro.org commit 4ffd0b0019560a52b46b9ebd8127be3fdc157f16 Author: Neil Armstrong Date: Tue Mar 21 14:21:52 2023 +0100 arm64: defconfig: add PMIC GLINK modules Enable the PMIC GLINK core, altmode, battery and UCSI aux drivers as module to enable USB Type-C management over the PMIC GLINK protocol on modern Qcom platforms. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v5-12-552f3b721f9e@linaro.org commit 0dbb756c9120eb46aa1ec4fa47b6da0f6d21374f Author: Neil Armstrong Date: Tue Mar 21 14:21:51 2023 +0100 arm64: dts: qcom: sm8550-mtp: add pmic glink node Add the pmic glink node linked with the DWC3 USB controller switched to OTG mode and tagged with usb-role-switch. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v5-11-552f3b721f9e@linaro.org commit 2ca9703147ca7e347e300fb23f699f1065302b0b Author: Neil Armstrong Date: Tue Mar 21 14:21:50 2023 +0100 arm64: dts: qcom: sm8450-hdk: add pmic glink node Add the pmic glink node linked with the DWC3 USB controller switched to OTG mode and tagged with usb-role-switch. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v5-10-552f3b721f9e@linaro.org commit a891ec9e4f3adf62068695a48b769b30b22591e2 Author: Neil Armstrong Date: Tue Mar 21 14:21:49 2023 +0100 arm64: dts: qcom: sm8350-hdk: add pmic glink node Add the pmic glink node linked with the DWC3 USB controller switched to OTG mode and tagged with usb-role-switch. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v5-9-552f3b721f9e@linaro.org commit 34e7e432f17ce1df90a044c815ec753bc70f7c6c Author: Neil Armstrong Date: Tue Mar 21 14:21:48 2023 +0100 arm64: dts: qcom: sm8550: add port subnodes in dwc3 node Add ports subnodes in dwc3 node to avoid repeating the same description in each board DT. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v5-8-552f3b721f9e@linaro.org commit f28d912671c87ffa30e223fc32c9145a8b5135cd Author: Neil Armstrong Date: Tue Mar 21 14:21:47 2023 +0100 arm64: dts: qcom: sm8450: add port subnodes in dwc3 node Add ports subnodes in dwc3 node to avoid repeating the same description in each board DT. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v5-7-552f3b721f9e@linaro.org commit 75b81e5a49f897ef1a2f95182216850a53664aa3 Author: Neil Armstrong Date: Tue Mar 21 14:21:46 2023 +0100 arm64: dts: qcom: sm8350: add port subnodes in dwc3 node Add ports subnodes in dwc3 node to avoid repeating the same description in each board DT. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v5-6-552f3b721f9e@linaro.org commit ff642773b6b5b801f2f3bbdabe22c3d02656981e Author: Neil Armstrong Date: Tue Mar 21 14:21:44 2023 +0100 soc: qcom: pmic_glink: register ucsi aux device Only register UCSI on know working devices, like on the SM8450 or SM8550 which requires UCSI to get USB mode switch events. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v5-4-552f3b721f9e@linaro.org commit 84a334131f091d83239f54cc40627d9b28324b45 Author: Neil Armstrong Date: Tue Mar 21 14:21:43 2023 +0100 dt-bindings: soc: qcom: qcom,pmic-glink: document SM8550 compatible Document the SM8550 compatible used to describe the pmic glink on this platform. Acked-by: Rob Herring Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v5-3-552f3b721f9e@linaro.org commit 14bc45c4e72da1a80311cd82815867f36599f698 Author: Neil Armstrong Date: Tue Mar 21 14:21:42 2023 +0100 dt-bindings: soc: qcom: qcom,pmic-glink: document SM8450 compatible Document the SM8450 compatible used to describe the pmic glink on this platform. Acked-by: Rob Herring Signed-off-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v5-2-552f3b721f9e@linaro.org commit d36d68fd1925d33066d52468b7c7c6aca6521248 Merge: d240daa2c40d3 75b4457530478 Author: Dave Airlie Date: Wed Mar 22 10:35:45 2023 +1000 Merge tag 'drm-habanalabs-next-2023-03-20' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into drm-next This tag contains habanalabs driver and accel changes for v6.4: - uAPI changes: - Add opcodes to the CS ioctl to allow user to stall/resume specific engines inside Gaudi2. This is to allow the user to perform power testing/measurements when training different topologies. - Expose in the INFO ioctl the amount of device memory that the driver and f/w reserve for themselves. - Expose in the INFO ioctl a bit-mask of the available rotator engines in Gaudi2. This is to align with other engines that are already exposed. - Expose in the INFO ioctl the register's address of the f/w that should be used to trigger interrupts from within the user's code running in the compute engines. - Add a critical-event bit in the eventfd bitmask so the user will know the event that was received was critical, and a reset will now occur - Expose in the INFO ioctl two new opcodes to fetch information on h/w and f/w events. The events recorded are the events that were reported in the eventfd. - New features and improvements: - Add a dedicated interrupt ID in MSI-X in the device to the notification of an unexpected user-related event in Gaudi2. Handle it in the driver by reporting this event. - Allow the user to fetch the device memory current usage even when the device is undergoing compute-reset (a reset type that only clears the compute engines). - Enable graceful reset mechanism for compute-reset. This will give the user a few seconds before the device is reset. For example, the user can, during that time, perform certain device operations (dump data for debug) or close the device in an orderly fashion. - Align the decoder with the rest of the engines in regard to notification to the user about interrupts and in regard to performing graceful reset when needed (instead of immediate reset). - Add support for assert interrupt from the TPC engine. - Get the reset type that is necessary to perform per event from the auto-generated irq_map array. - Print the specific reason why a device is still in use when notifying to the user about it (after the user closed the device's FD). - Move to threaded IRQ when handling interrupts of workload completions. - Firmware related fixes: - Fix RAZWI event handler to match newest f/w version. - Read error cause register in dma core events because the f/w doesn't do that. - Increase maximum time to wait for completion of Gaudi2 reset due to f/w bug. - Align to the latest firmware specs. - Enforce the release order of the compute device and dma-buf. i.e increment the device file refcount for any dma-buf that was exported for that device. This will make sure the compute device release function won't be called until the user closes all the FDs of the relevant dma-bufs. Without this change, closing the device's FD before/without closing the dma-buf's FD would always lead to hard-reset of the device. - Fix a link in the drm documentation to correctly point to the accel section. - Compilation warnings cleanups - Misc bug fixes and code cleanups Signed-off-by: Dave Airlie # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCgAdFiEE7TEboABC71LctBLFZR1NuKta54AFAmQYfcAACgkQZR1NuKta # 54DB4Af/SuiHZkVXwr+yHPv9El726rz9ZQD7mQtzNmehWGonwAvz15yqocNMUSbF # JbqE/vrZjvbXrP1Uv5UrlRVdnFHSPV18VnHU4BMS/WOm19SsR6vZ0QOXOoa6/AUb # w+kF3D//DbFI4/mTGfpH5/pzwu51ti8aVktosPFlHIa8iI8CB4/4IV+ivQ8UW4oK # HyDRkIvHdRmER7vGOfhwhsr4zdqSlJBYrv3C3Z1dkSYBPW/5ICbiM1UlKycwdYKI # cajQBSdUQwUCWnI+i8RmSy3kjNO6OE4XRUvTv89F2bQeyK/1rJLG2m2xZR/Ml/o5 # 7Cgvbn0hWZyeqe7OObYiBlSOBSehCA== # =wclm # -----END PGP SIGNATURE----- # gpg: Signature made Tue 21 Mar 2023 01:37:36 AEST # gpg: using RSA key ED311BA00042EF52DCB412C5651D4DB8AB5AE780 # gpg: Can't check signature: No public key From: Oded Gabbay Link: https://patchwork.freedesktop.org/patch/msgid/20230320154026.GA766126@ogabbay-vm-u20.habana-labs.com commit d240daa2c40d384aa01d68163ce5c12625b92d10 Merge: c6265f5c2f502 d2a9692ad4295 Author: Dave Airlie Date: Wed Mar 22 06:49:01 2023 +1000 Merge tag 'drm-intel-gt-next-2023-03-16' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Driver Changes: - Fix issue #6333: "list_add corruption" and full system lockup from performance monitoring (Janusz) - Give the punit time to settle before fatally failing (Aravind, Chris) - Don't use stolen memory or BAR for ring buffers on LLC platforms (John) - Add missing ecodes and correct timeline seqno on GuC error captures (John) - Make sure DSM size has correct 1MiB granularity on Gen12+ (Nirmoy, Lucas) - Fix potential SSEU max_subslices array-index-out-of-bounds access on Gen11 (Andrea) - Whitelist COMMON_SLICE_CHICKEN3 for UMD access on Gen12+ (Matt R.) - Apply Wa_1408615072/Wa_1407596294 correctly on Gen11 (Matt R) - Apply LNCF/LBCF workarounds correctly on XeHP SDV/PVC/DG2 (Matt R) - Implement Wa_1606376872 for Xe_LP (Gustavo) - Consider GSI offset when doing MCR lookups on Meteorlake+ (Matt R.) - Add engine TLB invalidation for Meteorlake (Matt R.) - Fix GSC Driver-FLR completion on Meteorlake (Alan) - Fix GSC races on driver load/unload on Meteorlake+ (Daniele) - Disable MC6 for MTL A step (Badal) - Consolidate TLB invalidation flow (Tvrtko) - Improve debug GuC/HuC debug messages (Michal Wa., John) - Move fd_install after last use of fence (Rob) - Initialize the obj flags for shmem objects (Aravind) - Fix missing debug object activation (Nirmoy) - Probe lmem before the stolen portion (Matt A) - Improve clean up of GuC busyness stats worker (John) - Fix missing return code checks in GuC submission init (John) - Annotate two more workaround/tuning registers as MCR on PVC (Matt R) - Fix GEN8_MISCCPCTL definition and remove unused INF_UNIT_LEVEL_CLKGATE (Lucas) - Use sysfs_emit() and sysfs_emit_at() (Nirmoy) - Make kobj_type structures constant (Thomas W.) - make kobj attributes const on gt/ (Jani) - Remove the unused virtualized start hack on buddy allocator (Matt A) - Remove redundant check for DG1 (Lucas) - Move DG2 tuning to the right function (Lucas) - Rename dev_priv to i915 for private data naming consistency in gt/ (Andi) - Remove unnecessary whitelisting of CS_CTX_TIMESTAMP on Xe_HP platforms (Matt R.) - - Escape wildcard in method names in kerneldoc (Bagas) - Selftest improvements (Chris, Jonathan, Tvrtko, Anshuman, Tejas) - Fix sparse warnings (Jani) [airlied: fix unused variable in intel_workarounds] Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZBMSb42yjjzczRhj@jlahtine-mobl.ger.corp.intel.com commit 3dc6faa3ab0260c1d2058d45f0a93928f917348a Author: Marco Pagani Date: Fri Dec 9 16:29:13 2022 +0100 clk: socfpga: arria10: use of_clk_add_hw_provider and improve error handling The function of_clk_add_provider() has been deprecated, so use its suggested replacement of_clk_add_hw_provider() instead. Since of_clk_add_hw_provider() can fail, like of_clk_add_provider(), check its return value and do the error handling. The return type of the init function has been changed to void since the return value was not used, and the indentation of the parameters has been aligned to match open parenthesis, as suggested by checkpatch. Signed-off-by: Marco Pagani Link: https://lore.kernel.org/r/20221209152913.1335068-7-marpagan@redhat.com Signed-off-by: Stephen Boyd commit 00720a904877bb7e5f16e5ca409391bdd64ea5c4 Author: Marco Pagani Date: Fri Dec 9 16:29:12 2022 +0100 clk: socfpga: use of_clk_add_hw_provider and improve error handling The function of_clk_add_provider() has been deprecated, so use its suggested replacement of_clk_add_hw_provider() instead. Since of_clk_add_hw_provider() can fail, like of_clk_add_provider(), check its return value and do the error handling. The return type of the init function has been changed to void since the return value was not used, and the indentation of the parameters has been aligned to match open parenthesis, as suggested by checkpatch. The err variable has been renamed rc for consistency. Signed-off-by: Marco Pagani Link: https://lore.kernel.org/r/20221209152913.1335068-6-marpagan@redhat.com Signed-off-by: Stephen Boyd commit 6e83bd71c0cf196b52e3cb69c26b0cc579fe4c6c Author: Marco Pagani Date: Fri Dec 9 16:29:11 2022 +0100 clk: socfpga: arria10: use of_clk_add_hw_provider and improve error handling The function of_clk_add_provider() has been deprecated, so use its suggested replacement of_clk_add_hw_provider() instead. Since of_clk_add_hw_provider() can fail, like of_clk_add_provider(), check its return value and do the error handling. The indentation of the init function parameters has been aligned to match open parenthesis as suggested by checkpatch. Signed-off-by: Marco Pagani Link: https://lore.kernel.org/r/20221209152913.1335068-5-marpagan@redhat.com Signed-off-by: Stephen Boyd commit 85f1b574059d88f4b7f5dc0401f3745b305476f9 Author: Marco Pagani Date: Fri Dec 9 16:29:10 2022 +0100 clk: socfpga: use of_clk_add_hw_provider and improve error handling The function of_clk_add_provider() has been deprecated, so use its suggested replacement of_clk_add_hw_provider() instead. Since of_clk_add_hw_provider() can fail, like of_clk_add_provider(), check its return value and do the error handling. The err variable unnecessarily duplicates the functionality of the rc variable, so it has been removed. Signed-off-by: Marco Pagani Link: https://lore.kernel.org/r/20221209152913.1335068-4-marpagan@redhat.com Signed-off-by: Stephen Boyd commit da939f6d8080ad12415240c584de03816fd575b8 Author: Marco Pagani Date: Fri Dec 9 16:29:09 2022 +0100 clk: socfpga: arria10: use of_clk_add_hw_provider and improve error handling The function of_clk_add_provider() has been deprecated, so use its suggested replacement of_clk_add_hw_provider() instead. Since of_clk_add_hw_provider() can fail, like of_clk_add_provider(), check its return value and do the error handling. The indentation of the init function parameters has been aligned to match open parenthesis, as suggested by checkpatch, and the __init macro moved before the function name, as specified in init.h. Signed-off-by: Marco Pagani Link: https://lore.kernel.org/r/20221209152913.1335068-3-marpagan@redhat.com Signed-off-by: Stephen Boyd commit 488018957c72498e9a30db6258d48dbd6c4ceb57 Author: Marco Pagani Date: Fri Dec 9 16:29:08 2022 +0100 clk: socfpga: use of_clk_add_hw_provider and improve error handling The function of_clk_add_provider() has been deprecated, so use its suggested replacement of_clk_add_hw_provider() instead. Since of_clk_add_hw_provider() can fail, like of_clk_add_provider(), check its return value and do the error handling. The indentation of the init function parameters has been aligned to match open parenthesis, as suggested by checkpatch, and the __init macro moved before the function name, as specified in init.h. Signed-off-by: Marco Pagani Link: https://lore.kernel.org/r/20221209152913.1335068-2-marpagan@redhat.com Signed-off-by: Stephen Boyd commit b927c76c805432cc66e1cee67e1209514868c873 Author: Keguang Zhang Date: Tue Mar 21 19:18:17 2023 +0800 MIPS: loongson32: Update the clock initialization The Loongson-1 clock driver is under re-implementation to add DT support. As a result, ls1x_clk_init() will be dropped soon. Therefore, call of_clk_init() for clock initialization instead. Signed-off-by: Keguang Zhang Acked-by: Stephen Boyd Acked-by: Thomas Bogendoerfer Link: https://lore.kernel.org/r/20230321111817.71756-5-keguang.zhang@gmail.com Signed-off-by: Stephen Boyd commit fbdb1873656be002df069b7a235c202aefcfdf2e Author: Keguang Zhang Date: Tue Mar 21 19:18:16 2023 +0800 clk: loongson1: Re-implement the clock driver Re-implement the clock driver for Loongson-1 to add devicetree support and fit into the clock framework. Signed-off-by: Keguang Zhang Link: https://lore.kernel.org/r/20230321111817.71756-4-keguang.zhang@gmail.com Signed-off-by: Stephen Boyd commit c46496119ed07be49537fcb61fa07a34e9a726b2 Author: Keguang Zhang Date: Tue Mar 21 19:18:15 2023 +0800 clk: loongson1: Remove the outdated driver Remove the outdated driver due to the following aspects. - no DT support - duplicate code across LS1B and LS1C - does not fit into the current clock framework Signed-off-by: Keguang Zhang Link: https://lore.kernel.org/r/20230321111817.71756-3-keguang.zhang@gmail.com Signed-off-by: Stephen Boyd commit 12de2f50244efdbc8e98f89a340255c3c847e1dc Author: Keguang Zhang Date: Tue Mar 21 19:18:14 2023 +0800 dt-bindings: clock: Add Loongson-1 clock Add devicetree binding document and related header file for the Loongson-1 clock. Signed-off-by: Keguang Zhang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230321111817.71756-2-keguang.zhang@gmail.com Signed-off-by: Stephen Boyd commit 4e89780a4c4b303c84c53f7ed914cdf2ebc0aa30 Author: Deepak R Varma Date: Thu Mar 2 00:43:31 2023 +0530 EDAC/altera: Remove redundant error logging A call to platform_get_irq() already prints an error on failure within its own implementation. So printing another error based on its return value in the caller is redundant and should be removed. The clean up also makes if condition block braces unnecessary. Remove that as well. Issue identified using platform_get_irq.cocci coccinelle semantic patch. Signed-off-by: Deepak R Varma Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/Y/+j27kqdhflPtaj@ubun2204.myguest.virtualbox.org commit e0dfefa08d94bf548fbbbbae22e4720a652a3102 Author: Maíra Canal Date: Fri Feb 24 18:41:32 2023 -0300 drm/lima: Use drm_sched_job_add_syncobj_dependency() As lima_gem_add_deps() performs the same steps as drm_sched_job_add_syncobj_dependency(), replace the open-coded implementation in Lima in order to simply use the DRM function. Signed-off-by: Maíra Canal Reviewed-by: Qiang Yu Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230224214133.411966-1-mcanal@igalia.com commit aff69273af61f5d1c8fb401d6f19148d11629b41 Author: Fangrui Song Date: Fri Mar 10 19:07:50 2023 +0000 vdso: Improve cmd_vdso_check to check all dynamic relocations The actual intention is that no dynamic relocation exists in the VDSO. For this the VDSO build validates that the resulting .so file does not have any relocations which are specified via $(ARCH_REL_TYPE_ABS) per architecture, which is fragile as e.g. ARM64 lacks an entry for R_AARCH64_RELATIVE. Aside of that ARCH_REL_TYPE_ABS is a misnomer as it checks for relative relocations too. However, some GNU ld ports produce unneeded R_*_NONE relocation entries. If a port fails to determine the exact .rel[a].dyn size, the trailing zeros become R_*_NONE relocations. E.g. ld's powerpc port recently fixed https://sourceware.org/bugzilla/show_bug.cgi?id=29540). R_*_NONE are generally a no-op in the dynamic loaders. So just ignore them. Remove the ARCH_REL_TYPE_ABS defines and just validate that the resulting .so file does not contain any R_* relocation entries except R_*_NONE. Signed-off-by: Fangrui Song Signed-off-by: Thomas Gleixner Tested-by: Vincenzo Frascino # for aarch64 Reviewed-by: Christophe Leroy Reviewed-by: Vincenzo Frascino # for vDSO, aarch64 Acked-by: Michael Ellerman (powerpc) Link: https://lore.kernel.org/r/20230310190750.3323802-1-maskray@google.com commit 0e6255fa3f649170da6bd1a544680589cfae1131 Author: Martin Blumenstingl Date: Mon Mar 20 22:21:42 2023 +0100 rtc: meson-vrtc: Use ktime_get_real_ts64() to get the current time The VRTC alarm register can be programmed with an amount of seconds after which the SoC will be woken up by the VRTC timer again. We are already converting the alarm time from meson_vrtc_set_alarm() to "seconds since 1970". This means we also need to use "seconds since 1970" for the current time. This fixes a problem where setting the alarm to one minute in the future results in the firmware (which handles wakeup) to output (on the serial console) that the system will be woken up in billions of seconds. ktime_get_raw_ts64() returns the time since boot, not since 1970. Switch to ktime_get_real_ts64() to fix the calculation of the alarm time and to make the SoC wake up at the specified date/time. Also the firmware (which manages suspend) now prints either 59 or 60 seconds until wakeup (depending on how long it takes for the system to enter suspend). Fixes: 6ef35398e827 ("rtc: Add Amlogic Virtual Wake RTC") Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Reviewed-by: Kevin Hilman Link: https://lore.kernel.org/r/20230320212142.2355062-1-martin.blumenstingl@googlemail.com Signed-off-by: Alexandre Belloni commit c9ab590f54c75c6c6b6016bdfe9ffb3ac40a7ad2 Author: Krzysztof Kozlowski Date: Thu Mar 9 16:57:33 2023 +0100 arm64: defconfig: enable Qualcomm pin controller drivers Enable pin controller drivers for several Qualcomm SoCs, as they are necessary for basic system functionality: - main Top Level Mode Multiplexer as built-in for QDU1000, SDM660, SDM670, SM6125, SM6350 and SM6375. - Low Power Audio (LPASS) TLMM as module for SC7280, SC8280XP, SM8450 and SM8550. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230309155733.662043-1-krzysztof.kozlowski@linaro.org commit 4705d0137af61823dca83bb6302073181d83945d Author: Petr Vorel Date: Fri Feb 17 19:42:39 2023 +0100 arm64: defconfig: Enable qcom msm899{4,8} clk drivers Enable the rest of qcom clk drivers on arm64, enabling as module, because there is a support for probe defer on the power-domains. Signed-off-by: Petr Vorel Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230217184239.21450-3-pvorel@suse.cz commit 8f680c287445c467c927e875103ad2bfd7d356e1 Author: Petr Vorel Date: Fri Feb 17 19:42:38 2023 +0100 arm64: defconfig: Switch msm8996 clk drivers to module Switch to module, because there is a support for probe defer on the power-domains. This should be working since 2b28a1a84a0e ("driver core: Extend deferred probe timeout on driver registration") Suggested-by: Bjorn Andersson Signed-off-by: Petr Vorel Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230217184239.21450-2-pvorel@suse.cz commit 1c894486fc638b1aafabe78cd38441518e7cdb00 Author: Abel Vesa Date: Mon Mar 20 17:17:07 2023 +0200 arm64: defconfig: Enable QCOM eUSB2 SNPS PHY and repeater In order to have USB 2.0 working on Qualcomm SM8550, both the eUSB2 PHY and the eUSB2 repeater need to be built as modules. So select them accordingly. Signed-off-by: Abel Vesa Reviewed-by: Neil Armstrong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230320151707.1842171-1-abel.vesa@linaro.org commit ab0fccc373d505c9a09bf459557768ab3177e0d2 Author: Rob Herring Date: Fri Mar 17 18:36:33 2023 -0500 dt-bindings: rtc: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Acked-by: Florian Fainelli Acked-by: Nicolas Ferre Reviewed-by: Linus Walleij Reviewed-by: Krzysztof Kozlowski Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230317233634.3968656-1-robh@kernel.org Signed-off-by: Alexandre Belloni commit e3057eb574bae296665f7dfdb1692acc101b3727 Merge: 1c12e032cc432 ca5ce0caa67fa Author: Mark Brown Date: Tue Mar 21 19:23:48 2023 +0000 ASoC: SOF: ipc4/intel: Support for ChainDMA Merge series from Peter Ujfalusi : On a platform when the DSP is in use, we cannot select individual links to use or not use the DSP, it is either all or none. On some audio endpoint, like HDMI/DP, it is preferred to not use any processing in DSP to reduce the latency and to allow bytestream pass-through (DTS, DD, etc) IPC4 introduces a new type of end-to-end connection within the DSP which is using the host DMA and link DMA in a single buffer, working back-to-back, passing the received data without looking at it or trying to understand the format, content. This mode reduces the latency and allows non PCM streams to be sent from userspace. The feature is enabled per PCM bases, signalled in topology. commit c6265f5c2f502e442c4f339f121bedbc990c12e7 Merge: 90031bc33f752 b24343eaceedb Author: Dave Airlie Date: Tue Mar 21 11:03:16 2023 +1000 Merge tag 'drm-misc-next-2023-03-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v6.4-rc1: Cross-subsystem Changes: - Add drm_bridge.h to drm_bridge maintainers. Core Changes: - Assorted fixes to TTM, tests, format-helper, accel. - Assorted Makefile fixes to drivers and accel. - Implement fbdev emulation for GEM DMA drivers, and convert a lot of drivers to use it. - Use tgid instead of pid for tracking clients. Driver Changes: - Assorted fixes in rockchip, vmwgfx, nouveau, cirrus. - Add imx25 driver. - Add Elida KD50T048A, Sony TD4353, Novatek NT36523, STARRY 2081101QFH032011-53G panels. - Add 4K mode support to rockchip. - Convert cirrus to use regular atomic helpers, and more cirrus improvements. - Add damage clipping to cirrus, virtio. [airlied: add drm_bridge.h include to imx] Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/f7b765c7-d49d-edb5-2a6a-4f7a7be16a59@linux.intel.com commit 79781fe466b03c98b8292cabbc57897a7623e895 Author: Paul Moore Date: Tue Mar 21 14:34:36 2023 -0400 selinux: update the file list in MAINTAINERS When we removed the checkreqprot and runtime-disable functionality we also moved the deprecation notices from Documentation/ABI/obsolete to Documentation/ABI/removed but unfortunately forgot to update the associated entries in the MAINTAINERS file. This patch corrects that problem. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303212204.3G5mRatJ-lkp@intel.com Signed-off-by: Paul Moore commit 65364bbe0b022f397142e2486d0296203c45f0bd Author: Sasha Neftin Date: Thu Feb 23 09:03:17 2023 +0200 igc: Remove obsolete DMA coalescing code DMA coalescing is not applicable for i225 parts. This patch comes to tidy up the driver code. Signed-off-by: Sasha Neftin Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit 5a9b7bfb0d15e0877115b8fa6992ebc59855c5d7 Author: Dawid Wesierski Date: Wed Mar 1 11:57:05 2023 +0100 igbvf: add PCI reset handler functions There was a problem with resuming ping after conducting a PCI reset. This commit adds two functions, igbvf_io_prepare and igbvf_io_done, which, after being added to the pci_error_handlers struct, will prepare the drivers for a PCI reset and then bring the interface up and reset it after. This will prevent the driver from ending up in incorrect state. Test_and_set_bit is highly reliable in this context, so we are not including a timeout in this commit This introduces 900ms - 1100ms of overhead to this operation but it's in non-time-critical flow. And also allows the driver to continue functioning after the reset. Functionality documented in ethernet-controller-i350-datasheet 4.2.1.3 https://www.intel.com/content/www/us/en/products/details/ethernet/gigabit-controllers/i350-controllers/docs.html Signed-off-by: Dawid Wesierski Signed-off-by: Kamil Maziarz Reviewed-by: Michal Kubiak Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit d71980d47e270a7dffef4f3541d550cbde686d9a Author: Andrii Staikov Date: Wed Mar 8 11:36:51 2023 +0100 igb: refactor igb_ptp_adjfine_82580 to use diff_by_scaled_ppm Driver's .adjfine interface functions use adjust_by_scaled_ppm and diff_by_scaled_ppm introduced in commit 1060707e3809 ("ptp: introduce helpers to adjust by scaled parts per million") to calculate the required adjustment in a concise manner, but not igb_ptp_adjfine_82580. Fix it by introducing IGB_82580_BASE_PERIOD and changing function logic to use diff_by_scaled_ppm. Signed-off-by: Andrii Staikov Reviewed-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 2810f1de814adb7728b1068586bebcf733cf1992 Author: Uwe Kleine-König Date: Sun Mar 19 00:33:11 2023 +0100 i3c: svc: 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 (mostly) ignored 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. 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: Miquel Raynal Link: https://lore.kernel.org/r/20230318233311.265186-6-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit f959ec617521bab177758b7c71b0d56a65615079 Author: Uwe Kleine-König Date: Sun Mar 19 00:33:10 2023 +0100 i3c: mipi-i3c-hci: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230318233311.265186-5-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 3f8ad583590f7bfeb3b8ee1ddd1cca5f7f9a5a75 Author: Uwe Kleine-König Date: Sun Mar 19 00:33:09 2023 +0100 i3c: cdns: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230318233311.265186-4-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 04b5f1be2673a035b0218c6e0369cfd1460d63a1 Author: Uwe Kleine-König Date: Sun Mar 19 00:33:08 2023 +0100 i3c: dw: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230318233311.265186-3-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 0f74f8b6675cc36d689abb4d9b3d75ab4049b7d7 Author: Uwe Kleine-König Date: Sun Mar 19 00:33:07 2023 +0100 i3c: Make i3c_master_unregister() return void The function returned zero unconditionally. Switch the return type to void and simplify the callers accordingly. Signed-off-by: Uwe Kleine-König Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20230318233311.265186-2-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit e11b521a7b69c2621bb2e5920bb96f6d2facdc7e Author: Steven Rostedt (Google) Date: Tue Jan 24 09:56:53 2023 -0500 ftrace: Show a list of all functions that have ever been enabled When debugging a crash that appears to be related to ftrace, but not for sure, it is useful to know if a function was ever enabled by ftrace or not. It could be that a BPF program was attached to it, or possibly a live patch. We are having crashes in the field where this information is not always known. But having ftrace set a flag if a function has ever been attached since boot up helps tremendously in trying to know if a crash had to do with something using ftrace. For analyzing crashes, the use of a kdump image can have access to the flags. When looking at issues where the kernel did not panic, the touched_functions file can simply be used. Link: https://lore.kernel.org/linux-trace-kernel/20230124095653.6fd1640e@gandalf.local.home Cc: Masami Hiramatsu Cc: Catalin Marinas Tested-by: Mark Rutland Tested-by: Chris Li Signed-off-by: Steven Rostedt (Google) commit 8328e36da9cd8cb051394630e910cbb461f7e3ec Author: Uros Bizjak Date: Sun Mar 5 16:55:32 2023 +0100 ring_buffer: Use try_cmpxchg instead of cmpxchg Use try_cmpxchg 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. Link: https://lkml.kernel.org/r/20230305155532.5549-4-ubizjak@gmail.com Cc: Masami Hiramatsu Signed-off-by: Uros Bizjak Acked-by: Mukesh Ojha Signed-off-by: Steven Rostedt (Google) commit bc92b9562abc831a65e505d2e675b51528d22d8b Author: Uros Bizjak Date: Sun Mar 5 16:55:31 2023 +0100 ring_buffer: Change some static functions to bool The return values of some functions are of boolean type. Change the type of these function to bool and adjust their return values. Also change type of some internal varibles to bool. No functional change intended. Link: https://lkml.kernel.org/r/20230305155532.5549-3-ubizjak@gmail.com Cc: Masami Hiramatsu Signed-off-by: Uros Bizjak Reviewed-by: Mukesh Ojha Signed-off-by: Steven Rostedt (Google) commit b4b55dfd965057232abd317fbbfa31d8a2c16a49 Author: Uros Bizjak Date: Sun Mar 5 16:55:30 2023 +0100 ring_buffer: Change some static functions to void The results of some static functions are not used. Change the type of these function to void and remove unnecessary returns. No functional change intended. Link: https://lkml.kernel.org/r/20230305155532.5549-2-ubizjak@gmail.com Signed-off-by: Uros Bizjak Reviewed-by: Masami Hiramatsu Reviewed-by: Mukesh Ojha Signed-off-by: Steven Rostedt (Google) commit fee86a4ed536f4e521f3a4530242e152dd2a466b Author: Mark Rutland Date: Tue Mar 21 15:04:24 2023 +0100 ftrace: selftest: remove broken trace_direct_tramp The ftrace selftest code has a trace_direct_tramp() function which it uses as a direct call trampoline. This happens to work on x86, since the direct call's return address is in the usual place, and can be returned to via a RET, but in general the calling convention for direct calls is different from regular function calls, and requires a trampoline written in assembly. On s390, regular function calls place the return address in %r14, and an ftrace patch-site in an instrumented function places the trampoline's return address (which is within the instrumented function) in %r0, preserving the original %r14 value in-place. As a regular C function will return to the address in %r14, using a C function as the trampoline results in the trampoline returning to the caller of the instrumented function, skipping the body of the instrumented function. Note that the s390 issue is not detcted by the ftrace selftest code, as the instrumented function is trivial, and returning back into the caller happens to be equivalent. On arm64, regular function calls place the return address in x30, and an ftrace patch-site in an instrumented function saves this into r9 and places the trampoline's return address (within the instrumented function) in x30. A regular C function will return to the address in x30, but will not restore x9 into x30. Consequently, using a C function as the trampoline results in returning to the trampoline's return address having corrupted x30, such that when the instrumented function returns, it will return back into itself. To avoid future issues in this area, remove the trace_direct_tramp() function, and require that each architecture with direct calls provides a stub trampoline, named ftrace_stub_direct_tramp. This can be written to handle the architecture's trampoline calling convention, and in future could be used elsewhere (e.g. in the ftrace ops sample, to measure the overhead of direct calls), so we may as well always build it in. Link: https://lkml.kernel.org/r/20230321140424.345218-8-revest@chromium.org Signed-off-by: Mark Rutland Cc: Li Huafei Cc: Xu Kuohai Signed-off-by: Florent Revest Acked-by: Jiri Olsa Signed-off-by: Steven Rostedt (Google) commit 60c8971899f3b34ad24857913c0784dab08962f0 Author: Florent Revest Date: Tue Mar 21 15:04:23 2023 +0100 ftrace: Make DIRECT_CALLS work WITH_ARGS and !WITH_REGS Direct called trampolines can be called in two ways: - either from the ftrace callsite. In this case, they do not access any struct ftrace_regs nor pt_regs - Or, if a ftrace ops is also attached, from the end of a ftrace trampoline. In this case, the call_direct_funcs ops is in charge of setting the direct call trampoline's address in a struct ftrace_regs Since: commit 9705bc709604 ("ftrace: pass fregs to arch_ftrace_set_direct_caller()") The later case no longer requires a full pt_regs. It only needs a struct ftrace_regs so DIRECT_CALLS can work with both WITH_ARGS or WITH_REGS. With architectures like arm64 already abandoning WITH_REGS in favor of WITH_ARGS, it's important to have DIRECT_CALLS work WITH_ARGS only. Link: https://lkml.kernel.org/r/20230321140424.345218-7-revest@chromium.org Signed-off-by: Florent Revest Co-developed-by: Mark Rutland Signed-off-by: Mark Rutland Acked-by: Jiri Olsa Signed-off-by: Steven Rostedt (Google) commit dbaccb618fabde8b8596e341f8d76da63a9b0c2f Author: Florent Revest Date: Tue Mar 21 15:04:22 2023 +0100 ftrace: Store direct called addresses in their ops All direct calls are now registered using the register_ftrace_direct API so each ops can jump to only one direct-called trampoline. By storing the direct called trampoline address directly in the ops we can save one hashmap lookup in the direct call ops and implement arm64 direct calls on top of call ops. Link: https://lkml.kernel.org/r/20230321140424.345218-6-revest@chromium.org Signed-off-by: Florent Revest Acked-by: Jiri Olsa Signed-off-by: Steven Rostedt (Google) commit da8bdfbd422333fbb7c85ac1d7f18592d17d6665 Author: Florent Revest Date: Tue Mar 21 15:04:21 2023 +0100 ftrace: Rename _ftrace_direct_multi APIs to _ftrace_direct APIs Now that the original _ftrace_direct APIs are gone, the "_multi" suffixes only add confusion. Link: https://lkml.kernel.org/r/20230321140424.345218-5-revest@chromium.org Signed-off-by: Florent Revest Acked-by: Mark Rutland Tested-by: Mark Rutland Acked-by: Jiri Olsa Signed-off-by: Steven Rostedt (Google) commit 8788ca164eb4bad9a2a82c7778223c15ef800b8b Author: Florent Revest Date: Tue Mar 21 15:04:20 2023 +0100 ftrace: Remove the legacy _ftrace_direct API This API relies on a single global ops, used for all direct calls registered with it. However, to implement arm64 direct calls, we need each ops to point to a single direct call trampoline. Link: https://lkml.kernel.org/r/20230321140424.345218-4-revest@chromium.org Signed-off-by: Florent Revest Acked-by: Mark Rutland Tested-by: Mark Rutland Acked-by: Jiri Olsa Signed-off-by: Steven Rostedt (Google) commit 23edf48309b14a201481b75fba049802eaf0baa6 Author: Florent Revest Date: Tue Mar 21 15:04:19 2023 +0100 ftrace: Replace uses of _ftrace_direct APIs with _ftrace_direct_multi The _multi API requires that users keep their own ops but can enforce that an op is only associated to one direct call. Link: https://lkml.kernel.org/r/20230321140424.345218-3-revest@chromium.org Signed-off-by: Florent Revest Acked-by: Mark Rutland Tested-by: Mark Rutland Acked-by: Jiri Olsa Signed-off-by: Steven Rostedt (Google) commit 59495740f79524bebe4ecb8097cf206f86587b25 Author: Florent Revest Date: Tue Mar 21 15:04:18 2023 +0100 ftrace: Let unregister_ftrace_direct_multi() call ftrace_free_filter() A common pattern when using the ftrace_direct_multi API is to unregister the ops and also immediately free its filter. We've noticed it's very easy for users to miss calling ftrace_free_filter(). This adds a "free_filters" argument to unregister_ftrace_direct_multi() to both remind the user they should free filters and also to make their life easier. Link: https://lkml.kernel.org/r/20230321140424.345218-2-revest@chromium.org Suggested-by: Steven Rostedt Signed-off-by: Florent Revest Acked-by: Mark Rutland Acked-by: Jiri Olsa Signed-off-by: Steven Rostedt (Google) commit f6cde92083dec5cf424504d7029acdffbe5beed8 Author: Yu Zhang Date: Thu Jan 19 22:19:46 2023 +0800 KVM: nVMX: Add helpers to setup VMX control msr configs nested_vmx_setup_ctls_msrs() is used to set up the various VMX MSR controls for nested VMX. But it is a bit lengthy, just add helpers to setup the configuration of VMX MSRs. Suggested-by: Sean Christopherson Signed-off-by: Yu Zhang Link: https://lore.kernel.org/r/20230119141946.585610-2-yu.c.zhang@linux.intel.com Signed-off-by: Sean Christopherson commit ad36aab37ae4f2ca898a809454020c5acc23b47c Author: Yu Zhang Date: Thu Jan 19 22:19:45 2023 +0800 KVM: nVMX: Remove outdated comments in nested_vmx_setup_ctls_msrs() nested_vmx_setup_ctls_msrs() initializes the vmcs_conf.nested, which stores the global VMX MSR configurations when nested is supported, regardless of any particular CPUID settings for one VM. Commit 6defc591846d ("KVM: nVMX: include conditional controls in /dev/kvm KVM_GET_MSRS") added the some feature flags for secondary proc-based controls, so that those features can be available in KVM_GET_MSRS. Yet this commit did not remove the obsolete comments in nested_vmx_setup_ctls_msrs(). Just fix the comments, and no functional change intended. Fixes: 6defc591846d ("KVM: nVMX: include conditional controls in /dev/kvm KVM_GET_MSRS") Signed-off-by: Yu Zhang Link: https://lore.kernel.org/r/20230119141946.585610-1-yu.c.zhang@linux.intel.com Signed-off-by: Sean Christopherson commit 1c12e032cc43256d75fdd22e60a7df85e8df4549 Author: Peter Ujfalusi Date: Tue Mar 21 16:56:51 2023 +0200 ASoC: SOF: ipc4-control: Return on error in sof_ipc4_widget_kcontrol_setup() The patch adding the bytes control support moved the error check outside of the list_for_each_entry() which was not correct as at the end of the list_for_each_entry() the scontrol will no longer point where the error happened, but it to the list head. Restore the original logic and return on the first error with the error code. Fixes: a062c8899fed ("ASoC: SOF: ipc4-control: Add support for bytes control get and put") Reported-by: Dan Carpenter Link: https://lore.kernel.org/alsa-devel/6be945d2-40cb-46fb-67ba-ed3a19cddfa4@linux.intel.com/T/#t Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230321145651.9118-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 1d78e193b5ad4601b75e86a9dc1850132d9ce303 Merge: 4af574f58f2fe e496112529006 Author: Mark Brown Date: Tue Mar 21 16:30:29 2023 +0000 ASoC: Initial support for Cirrus Logic CS35L56 Merge series from Richard Fitzgerald : The CS35L56 is a high-performance boosted mono audio amplifier. Supported control interfaces are I2C, SPI or SoundWire. Supported audio interfaces are I2S/TDM or SoundWire. The CS35L56 has a self-booting firmware in ROM, with the ability to patch the firmware and/or apply tunings. Patches #1 to #7 add support to cs_dsp and wm_adsp for self-booting firmware and the ability to apply a .bin file without having to apply a .wmfw. commit 4af574f58f2fec551abfe6ac7e77f8bd60ee227f Merge: 6c07be8fe92c6 9fa6137d0c784 Author: Mark Brown Date: Tue Mar 21 16:29:48 2023 +0000 ALSA/ASoC: Convert to platform remove callback Merge series from Uwe Kleine-König : Hello, this series adapts the platform drivers below sound/ to use the .remove_new() callback. Compared to the traditional .remove() callback .remove_new() returns no value. This is a good thing because the driver core doesn't (and cannot) cope for errors during remove. The only effect of a non-zero return value in .remove() is that the driver core emits a warning. The device is removed anyhow and an early return from .remove() usually yields a resource leak. By changing the remove callback to return void driver authors cannot reasonably assume any more that there is some kind of cleanup later. The first two patches simplify a driver each to return zero unconditionally, and then all drivers are trivially converted to .remove_new(). There are nearly no interdependencies in this patch set---only 1 <- 11 and 2 <- 16. So even if some individual problems are found (I don't expect that), the other patches can (and from my POV should) still be applied. Best regards Uwe Uwe Kleine-König (173): ALSA: sh: aica: Drop if blocks with always false condition ASoC: amd: acp: rembrandt: Drop if blocks with always false condition ALSA: pxa2xx: Convert to platform remove callback returning void ALSA: atmel: ac97: Convert to platform remove callback returning void ALSA: mts64: Convert to platform remove callback returning void ALSA: portman2x4: Convert to platform remove callback returning void ALSA: mips/hal2: Convert to platform remove callback returning void ALSA: mips/sgio2audio: Convert to platform remove callback returning void ALSA: hda/tegra: Convert to platform remove callback returning void ALSA: ppc/powermac: Convert to platform remove callback returning void ALSA: sh: aica: Convert to platform remove callback returning void ALSA: sh_dac_audio: Convert to platform remove callback returning void ASoC: adi: axi-i2s: Convert to platform remove callback returning void ASoC: adi: axi-spdif: Convert to platform remove callback returning void ASoC: amd: acp-pcm-dma: Convert to platform remove callback returning void ASoC: amd: acp: rembrandt: Convert to platform remove callback returning void ASoC: amd: acp: renoir: Convert to platform remove callback returning void ASoC: amd: ps: Convert to platform remove callback returning void ASoC: amd: raven: acp3x-pcm-dma: Convert to platform remove callback returning void ASoC: amd: raven: acp3x-pdm-dma: Convert to platform remove callback returning void ASoC: amd: vangogh: acp5x-pcm-dma: Convert to platform remove callback returning void ASoC: amd: yc: acp6x-pdm-dma: Convert to platform remove callback returning void ASoC: apple: mca: Convert to platform remove callback returning void ASoC: atmel: atmel-i2s: Convert to platform remove callback returning void ASoC: atmel: atmel_wm8904: Convert to platform remove callback returning void ASoC: atmel: mchp-i2s-mcc: Convert to platform remove callback returning void ASoC: atmel: mchp-pdmc: Convert to platform remove callback returning void ASoC: atmel: mchp-spdifrx: Convert to platform remove callback returning void ASoC: atmel: mchp-spdiftx: Convert to platform remove callback returning void ASoC: atmel: mikroe-proto: Convert to platform remove callback returning void ASoC: atmel: sam9g20_wm8731: Convert to platform remove callback returning void ASoC: atmel: sam9x5_wm8731: Convert to platform remove callback returning void ASoC: atmel: tse850-pcm5142: Convert to platform remove callback returning void ASoC: au1x: ac97c: Convert to platform remove callback returning void ASoC: au1x: i2sc: Convert to platform remove callback returning void ASoC: au1x: psc-ac97: Convert to platform remove callback returning void ASoC: au1x: psc-i2s: Convert to platform remove callback returning void ASoC: bcm: bcm63xx-i2s-whistler: Convert to platform remove callback returning void ASoC: bcm: cygnus-ssp: Convert to platform remove callback returning void ASoC: cirrus: edb93xx: Convert to platform remove callback returning void ASoC: cirrus: ep93xx-i2s: Convert to platform remove callback returning void ASoC: codecs: cs47l15: Convert to platform remove callback returning void ASoC: codecs: cs47l24: Convert to platform remove callback returning void ASoC: codecs: cs47l35: Convert to platform remove callback returning void ASoC: codecs: cs47l85: Convert to platform remove callback returning void ASoC: codecs: cs47l90: Convert to platform remove callback returning void ASoC: codecs: cs47l92: Convert to platform remove callback returning void ASoC: codecs: inno_rk3036: Convert to platform remove callback returning void ASoC: codecs: lpass-rx-macro: Convert to platform remove callback returning void ASoC: codecs: lpass-tx-macro: Convert to platform remove callback returning void ASoC: codecs: lpass-va-macro: Convert to platform remove callback returning void ASoC: codecs: lpass-wsa-macro: Convert to platform remove callback returning void ASoC: codecs: msm8916-wcd-analog: Convert to platform remove callback returning void ASoC: codecs: msm8916-wcd-digital: Convert to platform remove callback returning void ASoC: codecs: rk817_codec: Convert to platform remove callback returning void ASoC: codecs: wcd938x: Convert to platform remove callback returning void ASoC: codecs: wm5102: Convert to platform remove callback returning void ASoC: codecs: wm5110: Convert to platform remove callback returning void ASoC: codecs: wm8994: Convert to platform remove callback returning void ASoC: codecs: wm8997: Convert to platform remove callback returning void ASoC: codecs: wm8998: Convert to platform remove callback returning void ASoC: dwc: dwc-i2s: Convert to platform remove callback returning void ASoC: fsl: eukrea-tlv320: Convert to platform remove callback returning void ASoC: fsl: fsl_asrc: Convert to platform remove callback returning void ASoC: fsl: fsl_aud2htx: Convert to platform remove callback returning void ASoC: fsl: fsl_audmix: Convert to platform remove callback returning void ASoC: fsl: fsl_dma: Convert to platform remove callback returning void ASoC: fsl: fsl_easrc: Convert to platform remove callback returning void ASoC: fsl: fsl_esai: Convert to platform remove callback returning void ASoC: fsl: fsl_mqs: Convert to platform remove callback returning void ASoC: fsl: fsl_rpmsg: Convert to platform remove callback returning void ASoC: fsl: fsl_sai: Convert to platform remove callback returning void ASoC: fsl: fsl_spdif: Convert to platform remove callback returning void ASoC: fsl: fsl_ssi: Convert to platform remove callback returning void ASoC: fsl: fsl_xcvr: Convert to platform remove callback returning void ASoC: fsl: imx-audmux: Convert to platform remove callback returning void ASoC: fsl: imx-pcm-rpmsg: Convert to platform remove callback returning void ASoC: fsl: imx-sgtl5000: Convert to platform remove callback returning void ASoC: fsl: mpc5200_psc_ac97: Convert to platform remove callback returning void ASoC: fsl: mpc5200_psc_i2s: Convert to platform remove callback returning void ASoC: fsl: mpc8610_hpcd: Convert to platform remove callback returning void ASoC: fsl: p1022_ds: Convert to platform remove callback returning void ASoC: fsl: p1022_rdk: Convert to platform remove callback returning void ASoC: fsl: pcm030-audio-fabric: Convert to platform remove callback returning void ASoC: generic: test-component: Convert to platform remove callback returning void ASoC: img: img-i2s-in: Convert to platform remove callback returning void ASoC: img: img-i2s-out: Convert to platform remove callback returning void ASoC: img: img-parallel-out: Convert to platform remove callback returning void ASoC: img: img-spdif-in: Convert to platform remove callback returning void ASoC: img: img-spdif-out: Convert to platform remove callback returning void ASoC: img: pistachio-internal-dac: Convert to platform remove callback returning void ASoC: Intel: sst-mfld-platform-pcm: Convert to platform remove callback returning void ASoC: Intel: sst: Convert to platform remove callback returning void ASoC: Intel: bytcht_es8316: Convert to platform remove callback returning void ASoC: Intel: bytcr_rt5640: Convert to platform remove callback returning void ASoC: Intel: boards: bytcr_rt5651: Convert to platform remove callback returning void ASoC: Intel: bytcr_wm5102: Convert to platform remove callback returning void ASoC: Intel: cht_bsw_max98090_ti: Convert to platform remove callback returning void ASoC: Intel: sof_es8336: Convert to platform remove callback returning void ASoC: Intel: sof_pcm512x: Convert to platform remove callback returning void ASoC: Intel: sof_sdw: Convert to platform remove callback returning void ASoC: Intel: sof_wm8804: Convert to platform remove callback returning void ASoC: Intel: catpt: Convert to platform remove callback returning void ASoC: Intel: skl-ssp-clk: Convert to platform remove callback returning void ASoC: kirkwood: kirkwood-i2s: Convert to platform remove callback returning void ASoC: mediatek: mtk-btcvsd: Convert to platform remove callback returning void ASoC: mediatek: mt2701-afe-pcm: Convert to platform remove callback returning void ASoC: mediatek: mt6797-afe-pcm: Convert to platform remove callback returning void ASoC: mediatek: mt8173-afe-pcm: Convert to platform remove callback returning void ASoC: mediatek: mt8183-afe-pcm: Convert to platform remove callback returning void ASoC: mediatek: mt8188-afe-pcm: Convert to platform remove callback returning void ASoC: mediatek: mt8192-afe-pcm: Convert to platform remove callback returning void ASoC: mediatek: mt8195-afe-pcm: Convert to platform remove callback returning void ASoC: meson: aiu: Convert to platform remove callback returning void ASoC: mxs: mxs-sgtl5000: Convert to platform remove callback returning void ASoC: pxa: mmp-sspa: Convert to platform remove callback returning void ASoC: pxa: pxa2xx-ac97: Convert to platform remove callback returning void ASoC: qcom: qdsp6: Convert to platform remove callback returning void ASoC: rockchip: rockchip_i2s: Convert to platform remove callback returning void ASoC: rockchip: rockchip_i2s_tdm: Convert to platform remove callback returning void ASoC: rockchip: rockchip_pdm: Convert to platform remove callback returning void ASoC: rockchip: rockchip_rt5645: Convert to platform remove callback returning void ASoC: rockchip: rockchip_spdif: Convert to platform remove callback returning void ASoC: samsung: arndale: Convert to platform remove callback returning void ASoC: samsung: i2s: Convert to platform remove callback returning void ASoC: samsung: odroid: Convert to platform remove callback returning void ASoC: samsung: pcm: Convert to platform remove callback returning void ASoC: samsung: snow: Convert to platform remove callback returning void ASoC: samsung: spdif: Convert to platform remove callback returning void ASoC: sh: fsi: Convert to platform remove callback returning void ASoC: sh: hac: Convert to platform remove callback returning void ASoC: sh: rcar: Convert to platform remove callback returning void ASoC: sh: rz-ssi: Convert to platform remove callback returning void ASoC: sh: siu_dai: Convert to platform remove callback returning void ASoC: sprd: sprd-mcdt: Convert to platform remove callback returning void ASoC: stm: stm32_adfsdm: Convert to platform remove callback returning void ASoC: stm: stm32_i2s: Convert to platform remove callback returning void ASoC: stm: stm32_sai_sub: Convert to platform remove callback returning void ASoC: stm: stm32_spdifrx: Convert to platform remove callback returning void ASoC: sunxi: sun4i-codec: Convert to platform remove callback returning void ASoC: sunxi: sun4i-i2s: Convert to platform remove callback returning void ASoC: sunxi: sun4i-spdif: Convert to platform remove callback returning void ASoC: sunxi: sun50i-dmic: Convert to platform remove callback returning void ASoC: sunxi: sun8i-codec: Convert to platform remove callback returning void ASoC: tegra: tegra186_asrc: Convert to platform remove callback returning void ASoC: tegra: tegra186_dspk: Convert to platform remove callback returning void ASoC: tegra: tegra20_ac97: Convert to platform remove callback returning void ASoC: tegra: tegra20_i2s: Convert to platform remove callback returning void ASoC: tegra: tegra210_admaif: Convert to platform remove callback returning void ASoC: tegra: tegra210_adx: Convert to platform remove callback returning void ASoC: tegra: tegra210_ahub: Convert to platform remove callback returning void ASoC: tegra: tegra210_amx: Convert to platform remove callback returning void ASoC: tegra: tegra210_dmic: Convert to platform remove callback returning void ASoC: tegra: tegra210_i2s: Convert to platform remove callback returning void ASoC: tegra: tegra210_mixer: Convert to platform remove callback returning void ASoC: tegra: tegra210_mvc: Convert to platform remove callback returning void ASoC: tegra: tegra210_ope: Convert to platform remove callback returning void ASoC: tegra: tegra210_sfc: Convert to platform remove callback returning void ASoC: tegra: tegra30_ahub: Convert to platform remove callback returning void ASoC: tegra: tegra30_i2s: Convert to platform remove callback returning void ASoC: ti: ams-delta: Convert to platform remove callback returning void ASoC: ti: davinci-i2s: Convert to platform remove callback returning void ASoC: ti: davinci-mcasp: Convert to platform remove callback returning void ASoC: ti: omap-hdmi: Convert to platform remove callback returning void ASoC: ti: omap-mcbsp: Convert to platform remove callback returning void ASoC: uniphier: evea: Convert to platform remove callback returning void ASoC: ux500: mop500: Convert to platform remove callback returning void ASoC: ux500: ux500_msp_dai: Convert to platform remove callback returning void ASoC: xilinx: xlnx_formatter_pcm: Convert to platform remove callback returning void ASoC: xilinx: xlnx_spdif: Convert to platform remove callback returning void ASoC: xtensa: xtfpga-i2s: Convert to platform remove callback returning void ALSA: sparc/cs4231: Convert to platform remove callback returning void ALSA: sparc/dbri: Convert to platform remove callback returning void sound/arm/pxa2xx-ac97.c | 6 ++---- sound/atmel/ac97c.c | 6 ++---- sound/drivers/mts64.c | 6 ++---- sound/drivers/portman2x4.c | 6 ++---- sound/mips/hal2.c | 5 ++--- sound/mips/sgio2audio.c | 5 ++--- sound/pci/hda/hda_tegra.c | 6 ++---- sound/ppc/powermac.c | 5 ++--- sound/sh/aica.c | 7 ++----- sound/sh/sh_dac_audio.c | 5 ++--- sound/soc/adi/axi-i2s.c | 6 ++---- sound/soc/adi/axi-spdif.c | 6 ++---- sound/soc/amd/acp-pcm-dma.c | 6 ++---- sound/soc/amd/acp/acp-rembrandt.c | 13 +++---------- sound/soc/amd/acp/acp-renoir.c | 5 ++--- sound/soc/amd/ps/ps-pdm-dma.c | 5 ++--- sound/soc/amd/raven/acp3x-pcm-dma.c | 5 ++--- sound/soc/amd/renoir/acp3x-pdm-dma.c | 5 ++--- sound/soc/amd/vangogh/acp5x-pcm-dma.c | 5 ++--- sound/soc/amd/yc/acp6x-pdm-dma.c | 5 ++--- sound/soc/apple/mca.c | 5 ++--- sound/soc/atmel/atmel-i2s.c | 6 ++---- sound/soc/atmel/atmel_wm8904.c | 6 ++---- sound/soc/atmel/mchp-i2s-mcc.c | 6 ++---- sound/soc/atmel/mchp-pdmc.c | 6 ++---- sound/soc/atmel/mchp-spdifrx.c | 6 ++---- sound/soc/atmel/mchp-spdiftx.c | 6 ++---- sound/soc/atmel/mikroe-proto.c | 6 ++---- sound/soc/atmel/sam9g20_wm8731.c | 6 ++---- sound/soc/atmel/sam9x5_wm8731.c | 6 ++---- sound/soc/atmel/tse850-pcm5142.c | 6 ++---- sound/soc/au1x/ac97c.c | 6 ++---- sound/soc/au1x/i2sc.c | 6 ++---- sound/soc/au1x/psc-ac97.c | 6 ++---- sound/soc/au1x/psc-i2s.c | 6 ++---- sound/soc/bcm/bcm63xx-i2s-whistler.c | 5 ++--- sound/soc/bcm/cygnus-ssp.c | 6 ++---- sound/soc/cirrus/edb93xx.c | 6 ++---- sound/soc/cirrus/ep93xx-i2s.c | 5 ++--- sound/soc/codecs/cs47l15.c | 6 ++---- sound/soc/codecs/cs47l24.c | 6 ++---- sound/soc/codecs/cs47l35.c | 6 ++---- sound/soc/codecs/cs47l85.c | 6 ++---- sound/soc/codecs/cs47l90.c | 6 ++---- sound/soc/codecs/cs47l92.c | 6 ++---- sound/soc/codecs/inno_rk3036.c | 6 ++---- sound/soc/codecs/lpass-rx-macro.c | 6 ++---- sound/soc/codecs/lpass-tx-macro.c | 6 ++---- sound/soc/codecs/lpass-va-macro.c | 6 ++---- sound/soc/codecs/lpass-wsa-macro.c | 6 ++---- sound/soc/codecs/msm8916-wcd-analog.c | 6 ++---- sound/soc/codecs/msm8916-wcd-digital.c | 6 ++---- sound/soc/codecs/rk817_codec.c | 6 ++---- sound/soc/codecs/wcd938x.c | 6 ++---- sound/soc/codecs/wm5102.c | 6 ++---- sound/soc/codecs/wm5110.c | 6 ++---- sound/soc/codecs/wm8994.c | 6 ++---- sound/soc/codecs/wm8997.c | 6 ++---- sound/soc/codecs/wm8998.c | 6 ++---- sound/soc/dwc/dwc-i2s.c | 5 ++--- sound/soc/fsl/eukrea-tlv320.c | 6 ++---- sound/soc/fsl/fsl_asrc.c | 6 ++---- sound/soc/fsl/fsl_aud2htx.c | 6 ++---- sound/soc/fsl/fsl_audmix.c | 6 ++---- sound/soc/fsl/fsl_dma.c | 6 ++---- sound/soc/fsl/fsl_easrc.c | 6 ++---- sound/soc/fsl/fsl_esai.c | 6 ++---- sound/soc/fsl/fsl_mqs.c | 5 ++--- sound/soc/fsl/fsl_rpmsg.c | 6 ++---- sound/soc/fsl/fsl_sai.c | 6 ++---- sound/soc/fsl/fsl_spdif.c | 6 ++---- sound/soc/fsl/fsl_ssi.c | 6 ++---- sound/soc/fsl/fsl_xcvr.c | 5 ++--- sound/soc/fsl/imx-audmux.c | 6 ++---- sound/soc/fsl/imx-pcm-rpmsg.c | 6 ++---- sound/soc/fsl/imx-sgtl5000.c | 6 ++---- sound/soc/fsl/mpc5200_psc_ac97.c | 5 ++--- sound/soc/fsl/mpc5200_psc_i2s.c | 5 ++--- sound/soc/fsl/mpc8610_hpcd.c | 6 ++---- sound/soc/fsl/p1022_ds.c | 6 ++---- sound/soc/fsl/p1022_rdk.c | 6 ++---- sound/soc/fsl/pcm030-audio-fabric.c | 6 ++---- sound/soc/generic/test-component.c | 6 ++---- sound/soc/img/img-i2s-in.c | 6 ++---- sound/soc/img/img-i2s-out.c | 6 ++---- sound/soc/img/img-parallel-out.c | 6 ++---- sound/soc/img/img-spdif-in.c | 6 ++---- sound/soc/img/img-spdif-out.c | 6 ++---- sound/soc/img/pistachio-internal-dac.c | 6 ++---- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 5 ++--- sound/soc/intel/atom/sst/sst_acpi.c | 5 ++--- sound/soc/intel/boards/bytcht_es8316.c | 5 ++--- sound/soc/intel/boards/bytcr_rt5640.c | 5 ++--- sound/soc/intel/boards/bytcr_rt5651.c | 5 ++--- sound/soc/intel/boards/bytcr_wm5102.c | 5 ++--- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 6 ++---- sound/soc/intel/boards/sof_es8336.c | 6 ++---- sound/soc/intel/boards/sof_pcm512x.c | 6 ++---- sound/soc/intel/boards/sof_sdw.c | 6 ++---- sound/soc/intel/boards/sof_wm8804.c | 5 ++--- sound/soc/intel/catpt/device.c | 6 ++---- sound/soc/intel/skylake/skl-ssp-clk.c | 6 ++---- sound/soc/kirkwood/kirkwood-i2s.c | 6 ++---- sound/soc/mediatek/common/mtk-btcvsd.c | 5 ++--- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 6 ++---- sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 6 ++---- sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 5 ++--- sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 6 ++---- sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 6 ++---- sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 5 ++--- sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 5 ++--- sound/soc/meson/aiu.c | 6 ++---- sound/soc/mxs/mxs-sgtl5000.c | 6 ++---- sound/soc/pxa/mmp-sspa.c | 7 +++---- sound/soc/pxa/pxa2xx-ac97.c | 5 ++--- sound/soc/qcom/qdsp6/q6routing.c | 6 ++---- sound/soc/rockchip/rockchip_i2s.c | 6 ++---- sound/soc/rockchip/rockchip_i2s_tdm.c | 6 ++---- sound/soc/rockchip/rockchip_pdm.c | 6 ++---- sound/soc/rockchip/rockchip_rt5645.c | 6 ++---- sound/soc/rockchip/rockchip_spdif.c | 6 ++---- sound/soc/samsung/arndale.c | 5 ++--- sound/soc/samsung/i2s.c | 8 +++----- sound/soc/samsung/odroid.c | 6 ++---- sound/soc/samsung/pcm.c | 6 ++---- sound/soc/samsung/snow.c | 6 ++---- sound/soc/samsung/spdif.c | 6 ++---- sound/soc/sh/fsi.c | 6 ++---- sound/soc/sh/hac.c | 5 ++--- sound/soc/sh/rcar/core.c | 6 ++---- sound/soc/sh/rz-ssi.c | 6 ++---- sound/soc/sh/siu_dai.c | 5 ++--- sound/soc/sprd/sprd-mcdt.c | 6 ++---- sound/soc/stm/stm32_adfsdm.c | 6 ++---- sound/soc/stm/stm32_i2s.c | 6 ++---- sound/soc/stm/stm32_sai_sub.c | 6 ++---- sound/soc/stm/stm32_spdifrx.c | 6 ++---- sound/soc/sunxi/sun4i-codec.c | 6 ++---- sound/soc/sunxi/sun4i-i2s.c | 6 ++---- sound/soc/sunxi/sun4i-spdif.c | 6 ++---- sound/soc/sunxi/sun50i-dmic.c | 6 ++---- sound/soc/sunxi/sun8i-codec.c | 6 ++---- sound/soc/tegra/tegra186_asrc.c | 6 ++---- sound/soc/tegra/tegra186_dspk.c | 6 ++---- sound/soc/tegra/tegra20_ac97.c | 6 ++---- sound/soc/tegra/tegra20_i2s.c | 6 ++---- sound/soc/tegra/tegra210_admaif.c | 6 ++---- sound/soc/tegra/tegra210_adx.c | 6 ++---- sound/soc/tegra/tegra210_ahub.c | 6 ++---- sound/soc/tegra/tegra210_amx.c | 6 ++---- sound/soc/tegra/tegra210_dmic.c | 6 ++---- sound/soc/tegra/tegra210_i2s.c | 6 ++---- sound/soc/tegra/tegra210_mixer.c | 6 ++---- sound/soc/tegra/tegra210_mvc.c | 6 ++---- sound/soc/tegra/tegra210_ope.c | 6 ++---- sound/soc/tegra/tegra210_sfc.c | 6 ++---- sound/soc/tegra/tegra30_ahub.c | 6 ++---- sound/soc/tegra/tegra30_i2s.c | 6 ++---- sound/soc/ti/ams-delta.c | 5 ++--- sound/soc/ti/davinci-i2s.c | 6 ++---- sound/soc/ti/davinci-mcasp.c | 6 ++---- sound/soc/ti/omap-hdmi.c | 5 ++--- sound/soc/ti/omap-mcbsp.c | 6 ++---- sound/soc/uniphier/evea.c | 6 ++---- sound/soc/ux500/mop500.c | 6 ++---- sound/soc/ux500/ux500_msp_dai.c | 6 ++---- sound/soc/xilinx/xlnx_formatter_pcm.c | 5 ++--- sound/soc/xilinx/xlnx_spdif.c | 5 ++--- sound/soc/xtensa/xtfpga-i2s.c | 5 ++--- sound/sparc/cs4231.c | 6 ++---- sound/sparc/dbri.c | 6 ++---- 171 files changed, 345 insertions(+), 654 deletions(-) base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6 -- 2.39.2 commit 41b4c7fe72b6105a4b49395eea9aa40cef94288d Author: Ville Syrjälä Date: Mon Mar 20 20:35:32 2023 +0200 drm/i915: Disable DC states for all commits Keeping DC states enabled is incompatible with the _noarm()/_arm() split we use for writing pipe/plane registers. When DC5 and PSR are enabled, all pipe/plane registers effectively become self-arming on account of DC5 exit arming the update, and PSR exit latching it. What probably saves us most of the time is that (with PIPE_MISC[21]=0) all pipe register writes themselves trigger PSR exit, and then we don't re-enter PSR until the idle frame count has elapsed. So it may be that the PSR exit happens already before we've updated the state too much. Also the PSR1 panel (at least on this KBL) seems to discard the first frame we trasmit, presumably still scanning out from its internal framebuffer at that point. So only the second frame we transmit is actually visible. But I suppose that could also be panel specific behaviour. I haven't checked out how other PSR panels behave, nor did I bother to check what the eDP spec has to say about this. And since this really is all about DC states, let's switch from the MODESET domain to the DC_OFF domain. Functionally they are 100% identical. We should probably remove the MODESET domain... And for good measure let's toss in an assert to the place where we do the _noarm() register writes to make sure DC states are in fact off. v2: Just use intel_display_power_is_enabled() (Imre) Cc: #v5.17+ Cc: Manasi Navare Cc: Drew Davenport Cc: Jouni Högander Reviewed-by: Imre Deak Fixes: d13dde449580 ("drm/i915: Split pipe+output CSC programming to noarm+arm pair") Fixes: f8a005eb8972 ("drm/i915: Optimize icl+ universal plane programming") Fixes: 890b6ec4a522 ("drm/i915: Split skl+ plane update into noarm+arm pair") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230320183532.17727-1-ville.syrjala@linux.intel.com commit 92736f1b452bbb8a66bdb5b1d263ad00e04dd3b8 Author: Ville Syrjälä Date: Mon Mar 20 11:54:36 2023 +0200 drm/i915: Workaround ICL CSC_MODE sticky arming Unlike SKL/GLK the ICL CSC unit suffers from a new issue where CSC_MODE arming is sticky. That is, once armed it remains armed causing the CSC coeff/offset registers to become effectively self-arming. CSC coeff/offset registers writes no longer disarm the CSC, but fortunately register read still do. So we can use that to disarm the CSC unit once the registers for the current frame have been latched. This avoid s the self-arming behaviour from persisting into the next frame's .color_commit_noarm() call. Cc: #v5.19+ Cc: Manasi Navare Cc: Drew Davenport Cc: Imre Deak Cc: Jouni Högander Fixes: d13dde449580 ("drm/i915: Split pipe+output CSC programming to noarm+arm pair") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230320095438.17328-5-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 3962ca4e080a525fc9eae87aa6b2286f1fae351d Author: Ville Syrjälä Date: Mon Mar 20 11:54:35 2023 +0200 drm/i915: Add a .color_post_update() hook We're going to need stuff after the color management register latching has happened. Add a corresponding hook. Cc: #v5.19+ Cc: Manasi Navare Cc: Drew Davenport Cc: Imre Deak Cc: Jouni Högander Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230320095438.17328-4-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit f73343fae5fb5b1c2f9ce5b861d286142283d0fa Author: Rob Clark Date: Mon Mar 20 11:54:14 2023 -0700 drm/msm: Update generated headers It's been a bit overdue. Regen headers to pull in a2xx perfcntr updates, etc. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/527926/ Link: https://lore.kernel.org/r/20230320185416.938842-2-robdclark@gmail.com commit 80a892a4c2428b65366721599fc5fe50eaed35fd Author: Ville Syrjälä Date: Mon Mar 20 11:54:34 2023 +0200 drm/i915: Move CSC load back into .color_commit_arm() when PSR is enabled on skl/glk SKL/GLK CSC unit suffers from a nasty issue where a CSC coeff/offset register read or write between DC5 exit and PSR exit will undo the CSC arming performed by DMC, and then during PSR exit the hardware will latch zeroes into the active CSC registers. This causes any plane going through the CSC to output all black. We can sidestep the issue by making sure the PSR exit has already actually happened before we touch the CSC coeff/offset registers. Easiest way to guarantee that is to just move the CSC programming back into the .color_commir_arm() as we force a PSR exit (and crucially wait for it to actually happen) prior to touching the arming registers. When PSR (and thus also DC states) are disabled we don't have anything to worry about, so we can keep using the more optional _noarm() hook for writing the CSC registers. Cc: #v5.19+ Cc: Manasi Navare Cc: Drew Davenport Cc: Imre Deak Cc: Jouni Högander Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8283 Fixes: d13dde449580 ("drm/i915: Split pipe+output CSC programming to noarm+arm pair") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230320095438.17328-3-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit f161eb01f50ab31f2084975b43bce54b7b671e17 Author: Ville Syrjälä Date: Mon Mar 20 11:54:33 2023 +0200 drm/i915: Split icl_color_commit_noarm() from skl_color_commit_noarm() We're going to want different behavior for skl/glk vs. icl in .color_commit_noarm(), so split the hook into two. Arguably we already had slightly different behaviour since csc_enable/gamma_enable are never set on icl+, so the old code was perhaps a bit confusing as well. Cc: #v5.19+ Cc: Manasi Navare Cc: Drew Davenport Cc: Imre Deak Cc: Jouni Högander Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230320095438.17328-2-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 8be174835f07b2c106b9961c0775486d06112a3c Author: Uwe Kleine-König Date: Tue Mar 21 16:09:19 2023 +0100 usb: ftdi-elan: Delete driver This driver didn't see real maintainance since several years. It has several trivial issues (check $(scripts/checkpatch.pl -f drivers/usb/misc/ftdi-elan.c)) and some harder ones (difficult locking, explict kref handling, ...). Also today it's hard to find hardware to make actually use of such a card and I suspect the driver is completely unused. So remove it. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230321150919.351947-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 0144e3b85d7b42e8a4cda991c0e81f131897457a Author: Dionna Glaze Date: Tue Mar 7 20:24:49 2023 +0100 x86/sev: Change snp_guest_issue_request()'s fw_err argument The GHCB specification declares that the firmware error value for a guest request will be stored in the lower 32 bits of EXIT_INFO_2. The upper 32 bits are for the VMM's own error code. The fw_err argument to snp_guest_issue_request() is thus a misnomer, and callers will need access to all 64 bits. The type of unsigned long also causes problems, since sw_exit_info2 is u64 (unsigned long long) vs the argument's unsigned long*. Change this type for issuing the guest request. Pass the ioctl command struct's error field directly instead of in a local variable, since an incomplete guest request may not set the error code, and uninitialized stack memory would be written back to user space. The firmware might not even be called, so bookend the call with the no firmware call error and clear the error. Since the "fw_err" field is really exitinfo2 split into the upper bits' vmm error code and lower bits' firmware error code, convert the 64 bit value to a union. [ bp: - Massage commit message - adjust code - Fix a build issue as Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303070609.vX6wp2Af-lkp@intel.com - print exitinfo2 in hex Tom: - Correct -EIO exit case. ] Signed-off-by: Dionna Glaze Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230214164638.1189804-5-dionnaglaze@google.com Link: https://lore.kernel.org/r/20230307192449.24732-12-bp@alien8.de commit 1a324a40b452ae0a57676369c0a0150674728853 Author: Arun R Murthy Date: Thu Mar 2 13:45:32 2023 +0530 i915/display/dp: SDP CRC16 for 128b132b link layer Enable SDP error detection configuration, this will set CRC16 in 128b/132b link layer. For Display version 13 a hardware bit31 in register VIDEO_DIP_CTL is added to enable/disable SDP CRC applicable for DP2.0 only, but the default value of this bit will enable CRC16 in 128b/132b hence skipping this write. Corrective actions on SDP corruption is yet to be defined. v2: Moved the CRC enable to link training init(Jani N) v3: Moved crc enable to ddi pre enable v4: Separate function for SDP CRC16 (Jani N) Signed-off-by: Arun R Murthy Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230302081532.765821-3-arun.r.murthy@intel.com commit 562334d22a05a4793a620a9ef02516f3b8da9ec5 Author: Arun R Murthy Date: Thu Mar 2 13:45:31 2023 +0530 drm: Add SDP Error Detection Configuration Register DP2.0 E11 defines a new register to facilitate SDP error detection by a 128B/132B capable DPRX device. v2: Update the macro name to reflect the DP spec(Harry) Signed-off-by: Arun R Murthy Reviewed-by: Harry Wentland Signed-off-by: Jani Nikula Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230302081532.765821-2-arun.r.murthy@intel.com commit fae0a2b2077c30f567b6b32c2467e7dda8e1d270 Author: Colin Ian King Date: Fri Mar 17 14:34:20 2023 +0000 ext2: remove redundant assignment to pointer end Pointer is assigned a value that is never read, the assignment is redundant and can be removed. Cleans up clang-scan warning: fs/ext2/xattr.c:555:3: warning: Value stored to 'end' is never read [deadcode.DeadStores] end = (char *)header + sb->s_blocksize; Signed-off-by: Colin Ian King Signed-off-by: Jan Kara Message-Id: <20230317143420.419005-1-colin.i.king@gmail.com> commit 872d28001be56b205bd9b3f97cea1571a1bde317 Author: Artem Bityutskiy Date: Tue Mar 14 10:00:41 2023 -0700 perf/x86/cstate: Add Granite Rapids support Granite Rapids Xeon is successor or Emerald Rapids Xeon, and it will use the same C-state residency counters as Emerald Rapids (and previous Xeons, all the way back to Ice Lake Xeon). Add Granite Rapids Xeon support. Signed-off-by: Artem Bityutskiy Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230314170041.2967712-3-kan.liang@linux.intel.com commit 5a796d5cb5d11f5aad4893a59f22715810769928 Author: Kan Liang Date: Tue Mar 14 10:00:40 2023 -0700 perf/x86/msr: Add Granite Rapids The same as Sapphire Rapids, the SMI_COUNT MSR is also supported on Granite Rapids. Add Granite Rapids model. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230314170041.2967712-2-kan.liang@linux.intel.com commit bc4000fdb009a531fc5b94339f8531eee64bc232 Author: Kan Liang Date: Tue Mar 14 10:00:39 2023 -0700 perf/x86/intel: Add Granite Rapids From core PMU's perspective, Granite Rapids is similar to the Sapphire Rapids. The key differences include: - Doesn't need the AUX event workaround for the mem load event. (Implement in this patch). - Support Retire Latency (Has been implemented in the commit c87a31093c70 ("perf/x86: Support Retire Latency")) - The event list, which will be supported in the perf tool later. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20230314170041.2967712-1-kan.liang@linux.intel.com commit 213acadd21a080fc8cda8eebe6d14cc2d4ad1332 Author: Uwe Kleine-König Date: Tue Mar 21 11:36:38 2023 +0100 usb: host: u132-hcd: Delete driver This driver got its last actual change in 2006 and is probably unused as nowbody should use a cardbus to USB adapter any more. If it were still used, the driver was in urgent need for maintainer love. (Explicit kref handling, underdocumented locking, .remove() can return errors ...) Also the link in the (now removed) help text doesn't look actively maintained. According to archive.org it forwarded to http://www.copenhagen-hotel.net/ already back in 2018. So don't waste more time on this driver and just delete it. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230321103638.343886-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 204e7c499f5fa7732144ef9765c195982be72f31 Author: Rob Herring Date: Fri Feb 17 16:32:11 2023 -0600 perf tools: Add support for perf_event_attr::config3 perf_event_attr has gained a new field, config3, so add support for it extending the existing configN support. Signed-off-by: Rob Herring Cc: Alexander Shishkin Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20220914-arm-perf-tool-spe1-2-v2-v5-2-2cf5210b2f77@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7effbd18e496a954540fb6319db0d87d28a70496 Author: James Clark Date: Mon Mar 20 11:45:59 2023 +0000 perf vendor events arm64: Add N1 metrics Generated from the telemetry solution repo[1] with this command: ./generate.py /tools/perf/ --telemetry-files \ ../../data/pmu/cpu/neoverse/neoverse-n1.json Since this data source now includes the SPE events for N1, it has diverged from A76 which means the folder has to be split. The new data also uses more fine grained grouping, but this will be consistent for all future products. Long PublicDescriptions are now included even for common events because this can include product specific details. For non verbose mode the common BriefDescriptions remain the same. [1]: https://gitlab.arm.com/telemetry-solution/telemetry-solution Signed-off-by: James Clark Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: renyu.zj@linux.alibaba.com Link: https://lore.kernel.org/r/20230320114601.524958-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 636203670716c2a8d76791d6b8f4c4cd76e8c701 Author: Bernhard M. Wiedemann Date: Tue Mar 21 07:30:32 2023 +0100 perf jevents: Sort list of input files Without this, pmu-events.c would be generated with variations in ordering depending on non-deterministic filesystem readdir order. I tested that pmu-events.c still has the same number of lines and that perf list output works. This patch was done while working on reproducible builds for openSUSE, but also solves issues in Debian [1] and other distributions. [1] https://tests.reproducible-builds.org/debian/rb-pkg/unstable/i386/linux.html Signed-off-by: Bernhard M. Wiedemann Cc: Ian Rogers Link: https://lore.kernel.org/r/20230321063032.19804-1-bwiedemann@suse.de Signed-off-by: Arnaldo Carvalho de Melo commit 51b02a964728115761acc5baa5e67c8d0a9bc222 Author: Leo Yan Date: Mon Mar 20 14:16:19 2023 +0800 perf kvm: Delete histograms entries before exiting It's good not to release resources for a program when kernel cleans up memory space, this patch explicitly releases histograms entries with hists__delete_entries(). Committer notice: This helps with memory leak checkers, but may delay exiting a tool by doing needless linked list traversals freeing lots of objects. Signed-off-by: Leo Yan Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230320061619.29520-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit f1e8f25980968f7c18f1eb977bd1d5fd716325a5 Author: Leo Yan Date: Mon Mar 20 14:16:18 2023 +0800 perf kvm: Reference count 'struct kvm_info' hists__add_entry_ops() doesn't allocate a new histogram entry if it has an existing entry for a KVM event, in this case, find_create_kvm_event() allocates a 'struct kvm_info' but it's not used by any histograms and never freed. To fix the memory leak, this patch first introduces a refcnt and a set of functions for refcnt operations on 'struct kvm_info'. When the data structure is not anymore used (the refcnt hits zero) kvm_info__zput() will free the memory used. Committer: Provide a nop version of kvm_info__zput() to be used when HAVE_KVM_STAT_SUPPORT isn't defined as it is used unconditionally in hists__findnew_entry() and hist_entry__delete(). Signed-off-by: Leo Yan Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230320061619.29520-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 653b131a897e67c65a0fb2ddbfba29b6daec76e2 Author: Rob Herring Date: Mon Mar 20 18:39:02 2023 -0500 dt-bindings: usb: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230320233904.2920197-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit c8384d4a51e7cb0e6587f3143f29099f202c5de1 Author: Nathan Chancellor Date: Sun Mar 19 16:41:08 2023 -0700 net: pasemi: Fix return type of pasemi_mac_start_tx() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A warning in clang aims to catch these at compile time, which reveals: drivers/net/ethernet/pasemi/pasemi_mac.c:1665:21: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict] .ndo_start_xmit = pasemi_mac_start_tx, ^~~~~~~~~~~~~~~~~~~ 1 error generated. ->ndo_start_xmit() in 'struct net_device_ops' expects a return type of 'netdev_tx_t', not 'int'. Adjust the return type of pasemi_mac_start_tx() to match the prototype's to resolve the warning. While PowerPC does not currently implement support for kCFI, it could in the future, which means this warning becomes a fatal CFI failure at run time. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Signed-off-by: Nathan Chancellor Reviewed-by: Horatiu Vultur Link: https://lore.kernel.org/r/20230319-pasemi-incompatible-pointer-types-strict-v1-1-1b9459d8aef0@kernel.org Signed-off-by: Paolo Abeni commit 6c07be8fe92c6b0c24ee1c599601dce3506b83c7 Author: Vlad.Karpovich Date: Wed Mar 15 10:47:22 2023 -0500 ASoC: cs35l45: Hibernation support Adds support for a low-power Hibernation State. Add support for a low-power hibernation state for the DSP. In this state the DSP RAM contents are maintained, such that firmware does not need to be re-downloaded, but the rest of the chip's register state is lost. Entry to this state is achieved via the register interface (either by an external driver using the control port, or the programmable DSP). Exit from this state is triggered by activity on device GPIO pins, intended SPI transaction, or I2C transaction with intended slave address. Signed-off-by: Vlad Karpovich Link: https://lore.kernel.org/r/167933511185.26.10641185496218226278@mailman-core.alsa-project.org Signed-off-by: Mark Brown commit 74b14e2850a34740c121cf2758d4181063d4c77c Author: Vlad.Karpovich Date: Wed Mar 15 10:47:21 2023 -0500 ASoC: cs35l45: DSP Support The CS35L45 digital core incorporates one programmable DSP block, capable of running a wide range of audio enhancement and speaker and battery protection functions. Signed-off-by: Vlad Karpovich Link: https://lore.kernel.org/r/167933510679.26.5992985447093367768@mailman-core.alsa-project.org Signed-off-by: Mark Brown commit 6085f9e6dc1973cf98ee7f5dcf629939e50f1b84 Author: Vlad.Karpovich Date: Wed Mar 15 10:47:20 2023 -0500 ASoC: cs35l45: IRQ support Adds IRQ handlers Signed-off-by: Vlad Karpovich Link: https://lore.kernel.org/r/167933510218.26.11092784685990338045@mailman-core.alsa-project.org Signed-off-by: Mark Brown commit c6cec088ab037b57e08e0694e2b150b1b034826c Author: Vlad.Karpovich Date: Wed Mar 15 10:47:19 2023 -0500 ASoC: dt-bindings: cs35l45: GPIOs configuration This adds description of CS35L45 GPIOs configuration. Signed-off-by: Vlad Karpovich Link: https://lore.kernel.org/r/20230315154722.3911463-2-vkarpovi@opensource.cirrus.com Signed-off-by: Mark Brown commit fa8c052b4c614aa1d2d60e5c9f40e9d885bf9511 Author: Vlad.Karpovich Date: Wed Mar 15 10:47:18 2023 -0500 ASoC: cs35l45: Support for GPIO pins configuration. Adds device tree configuration for cs35l45 GPIOs Signed-off-by: Vlad Karpovich Link: https://lore.kernel.org/r/20230315154722.3911463-1-vkarpovi@opensource.cirrus.com Signed-off-by: Mark Brown commit 251d5a2813f96a2f8d566575a9b97a42b32669f9 Author: Josef Miegl Date: Sun Mar 19 23:09:54 2023 +0100 net: geneve: accept every ethertype The Geneve encapsulation, as defined in RFC 8926, has a Protocol Type field, which states the Ethertype of the payload appearing after the Geneve header. Commit 435fe1c0c1f7 ("net: geneve: support IPv4/IPv6 as inner protocol") introduced a new IFLA_GENEVE_INNER_PROTO_INHERIT flag that allowed the use of other Ethertypes than Ethernet. However, it did not get rid of a restriction that prohibits receiving payloads other than Ethernet, instead the commit white-listed additional Ethertypes, IPv4 and IPv6. This patch removes this restriction, making it possible to receive any Ethertype as a payload, if the IFLA_GENEVE_INNER_PROTO_INHERIT flag is set. The restriction was set in place back in commit 0b5e8b8eeae4 ("net: Add Geneve tunneling protocol driver"), which implemented a protocol layer driver for Geneve to be used with Open vSwitch. The relevant discussion about introducing the Ethertype white-list can be found here: https://lore.kernel.org/netdev/CAEP_g=_1q3ACX5NTHxLDnysL+dTMUVzdLpgw1apLKEdDSWPztw@mail.gmail.com/ >> + if (unlikely(geneveh->proto_type != htons(ETH_P_TEB))) > > Why? I thought the point of geneve carrying protocol field was to > allow protocols other than Ethernet... is this temporary maybe? Yes, it is temporary. Currently OVS only handles Ethernet packets but this restriction can be lifted once we have a consumer that is capable of handling other protocols. This white-list was then ported to a generic Geneve netdevice in commit 371bd1061d29 ("geneve: Consolidate Geneve functionality in single module."). Preserving the Ethertype white-list at this point made sense, as the Geneve device could send out only Ethernet payloads anyways. However, now that the Geneve netdevice supports encapsulating other payloads with IFLA_GENEVE_INNER_PROTO_INHERIT and we have a consumer capable of other protocols, it seems appropriate to lift the restriction and allow any Geneve payload to be received. Signed-off-by: Josef Miegl Reviewed-by: Simon Horman Reviewed-by: Eyal Birger Link: https://lore.kernel.org/r/20230319220954.21834-1-josef@miegl.cz Signed-off-by: Paolo Abeni commit 805ae9dc3b1c4040a842eb1714e7744af27fd30d Author: David Woodhouse Date: Thu Mar 16 22:21:01 2023 +0000 x86/smpboot: Reference count on smpboot_setup_warm_reset_vector() When bringing up a secondary CPU from do_boot_cpu(), the warm reset flag is set in CMOS and the starting IP for the trampoline written inside the BDA at 0x467. Once the CPU is running, the CMOS flag is unset and the value in the BDA cleared. To allow for parallel bringup of CPUs, add a reference count to track the number of CPUs currently bring brought up, and clear the state only when the count reaches zero. Since the RTC spinlock is required to write to the CMOS, it can be used for mutual exclusion on the refcount too. Signed-off-by: David Woodhouse Signed-off-by: Usama Arif Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Tested-by: Kim Phillips Tested-by: Oleksandr Natalenko Tested-by: Guilherme G. Piccoli Link: https://lore.kernel.org/r/20230316222109.1940300-5-usama.arif@bytedance.com commit 8f6be6d870e8a078fcc956fc2ff8d7cff67795ee Author: Brian Gerst Date: Thu Mar 16 22:21:05 2023 +0000 x86/smpboot: Remove initial_gs Given its CPU#, each CPU can find its own per-cpu offset, and directly set GSBASE accordingly. The global variable can be eliminated. Signed-off-by: Brian Gerst Signed-off-by: David Woodhouse Signed-off-by: Usama Arif Signed-off-by: Thomas Gleixner Tested-by: Usama Arif Tested-by: Guilherme G. Piccoli Reviewed-by: David Woodhouse Link: https://lore.kernel.org/r/20230316222109.1940300-9-usama.arif@bytedance.com commit c253b64020c7a7c7a1f6adf8922456614be0f665 Author: Brian Gerst Date: Thu Mar 16 22:21:04 2023 +0000 x86/smpboot: Remove early_gdt_descr on 64-bit Build the GDT descriptor on the stack instead. Signed-off-by: Brian Gerst Signed-off-by: David Woodhouse Signed-off-by: Usama Arif Signed-off-by: Thomas Gleixner Tested-by: Usama Arif Tested-by: Guilherme G. Piccoli Reviewed-by: David Woodhouse Link: https://lore.kernel.org/r/20230316222109.1940300-8-usama.arif@bytedance.com commit 3adee777ad0d328e76ca9015cb7924134a992e81 Author: Brian Gerst Date: Thu Mar 16 22:21:03 2023 +0000 x86/smpboot: Remove initial_stack on 64-bit In order to facilitate parallel startup, start to eliminate some of the global variables passing information to CPUs in the startup path. However, start by introducing one more: smpboot_control. For now this merely holds the CPU# of the CPU which is coming up. Each CPU can then find its own per-cpu data, and everything else it needs can be found from there, allowing the other global variables to be removed. First to be removed is initial_stack. Each CPU can load %rsp from its current_task->thread.sp instead. That is already set up with the correct idle thread for APs. Set up the .sp field in INIT_THREAD on x86 so that the BSP also finds a suitable stack pointer in the static per-cpu data when coming up on first boot. On resume from S3, the CPU needs a temporary stack because its idle task is already active. Instead of setting initial_stack, the sleep code can simply set its own current->thread.sp to point to the temporary stack. Nobody else cares about ->thread.sp for a thread which is currently on a CPU, because the true value is actually in the %rsp register. Which is restored with the rest of the CPU context in do_suspend_lowlevel(). Signed-off-by: Brian Gerst Signed-off-by: David Woodhouse Signed-off-by: Usama Arif Signed-off-by: Thomas Gleixner Tested-by: Usama Arif Tested-by: Guilherme G. Piccoli Reviewed-by: David Woodhouse Link: https://lore.kernel.org/r/20230316222109.1940300-7-usama.arif@bytedance.com commit cefad862f23874174136a48d91cb4a6ac3b1c5ce Author: David Woodhouse Date: Thu Mar 16 22:20:58 2023 +0000 x86/apic/x2apic: Allow CPU cluster_mask to be populated in parallel Each of the sibling CPUs in a cluster uses the same clustermask. The first CPU in a cluster will need a new clustermask allocated, while subsequent siblings will use the same clustermask as the first. However, the CPU being brought up cannot yet perform memory allocations at the point that this occurs in init_x2apic_ldr(). So at present, the alloc_clustermask() function allocates a clustermask just in case it's needed, storing it in the global cluster_hotplug_mask. A CPU which is the first sibling of a cluster will "take" it from there and set cluster_hotplug_mask to NULL, in order for alloc_clustermask() to allocate a new one before bringing up the next CPU. To facilitate parallel bringup of CPUs in future, switch to a model where alloc_clustermask() prepopulates the clustermask in the per_cpu data for each present CPU in the cluster in advance. All that the CPU needs to do for itself in init_x2apic_ldr() is set its own bit in that mask. The 'node' and 'clusterid' members of struct cluster_mask are thus redundant, and it can become a simple struct cpumask instead. Suggested-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Usama Arif Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Tested-by: Kim Phillips Tested-by: Oleksandr Natalenko Tested-by: Guilherme G. Piccoli Link: https://lore.kernel.org/r/20230316222109.1940300-2-usama.arif@bytedance.com commit ce3bf94871f7aeb0167370206699872472f30220 Author: Álvaro Fernández Rojas Date: Sun Mar 19 23:08:05 2023 +0100 net: dsa: b53: add support for BCM63xx RGMIIs BCM63xx RGMII ports require additional configuration in order to work. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230319220805.124024-1-noltari@gmail.com Signed-off-by: Paolo Abeni commit 9ef70d0130f282638b28cfce24222f71ada00c9c Author: Russell King (Oracle) Date: Sun Mar 19 12:33:29 2023 +0000 net: dsa: qca8k: remove assignment of an_enabled in pcs_get_state() pcs_get_state() implementations are not supposed to alter an_enabled. Remove this assignment. Fixes: b3591c2a3661 ("net: dsa: qca8k: Switch to PHYLINK instead of PHYLIB") Signed-off-by: Russell King (Oracle) Link: https://lore.kernel.org/r/E1pdsE5-00Dl2l-8F@rmk-PC.armlinux.org.uk Signed-off-by: Paolo Abeni commit 965006103a14703cc42043bbf9b5e0cdf7a468ad Author: Dionna Glaze Date: Tue Mar 7 20:24:48 2023 +0100 virt/coco/sev-guest: Double-buffer messages The encryption algorithms read and write directly to shared unencrypted memory, which may leak information as well as permit the host to tamper with the message integrity. Instead, copy whole messages in or out as needed before doing any computation on them. Fixes: d5af44dde546 ("x86/sev: Provide support for SNP guest request NAEs") Signed-off-by: Dionna Glaze Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230214164638.1189804-3-dionnaglaze@google.com commit ca5ce0caa67fa9eeecaa29d895c2e4c3151c159e Author: Jyri Sarha Date: Tue Mar 21 11:26:54 2023 +0200 ASoC: SOF: ipc4/intel: Add support for chained DMA Add logic for setting up and tearing down chained DMA connections. Since pipelines are not used, all the logic to set the pipeline states can be bypassed, with only the DMA programming sequences remaining. In addition the same format needs to be used for host- and link-DMA, without the usual fixup to use the S32_LE format on the link. Note however that for convenience and compatibility with existing definitions, the topology relies on the concept of pipelines with a 'USE_CHAIN_DMA' token indicating that all the logic shall be bypassed. Unlike 'normal' ALSA sequences, the chain DMA is not programmed in hw_params/hw_free. The IPC message to set-up and tear-down chained DMA are sent in sof_ipc4_trigger_pipelines(), but the contents prepared earlier. Chained DMA is only supported by the Intel HDA DAI for now, and only S16_LE and S32_LE formats are supported for now. Signed-off-by: Jyri Sarha Reviewed-by: Rander Wang Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230321092654.7292-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit cb3cdef33136baceada86ba2a21ba30cd53a9087 Author: Jyri Sarha Date: Tue Mar 21 11:26:53 2023 +0200 ASoC: SOF: ipc4: Add macros for chain-dma message bits In the chained DMA mode, the firmware allocates buffers for the host and link DMA, and takes care of copying data between host- and link-DMA buffers in a low-latency thread. This is different to a regular pipeline, no processing is allowed, and the connection between host- and link DMA is handled with a dedicated IPC. This patch exposes the macros needed to create the required IPC messages. Signed-off-by: Jyri Sarha Reviewed-by: Rander Wang Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230321092654.7292-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 3d3e223f09ed59f7a47d27cf4301b4d0d5c7fc3d Author: Ranjani Sridharan Date: Tue Mar 21 11:26:52 2023 +0200 ASoC: SOF: topology: Set pipeline widget before updating IPC structures Set up the IPC structure for scheduler widgets and set the pipeline widget before updating the IPC structures for all widgets. This will be needed to look up pipeline information during IPC structure set up. Signed-off-by: Ranjani Sridharan Signed-off-by: Jyri Sarha Reviewed-by: Rander Wang Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230321092654.7292-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit e496112529006ce0c2cfe67d1136186e2786d2e8 Author: Richard Fitzgerald Date: Mon Mar 20 11:22:45 2023 +0000 ASoC: cs35l56: Add driver for Cirrus Logic CS35L56 The CS35L56 combines a high-performance mono audio amplifier, Class-H tracking inductive boost converter, Halo Core(TM) DSP and a DC-DC boost converter supporting Class-H tracking. Supported control interfaces are I2C, SPI or SoundWire. Supported audio interfaces are I2S/TDM or SoundWire. Most chip functionality is controlled by on-board ROM firmware that is always running. The driver must apply patch/tune to the firmware before using the CS35L56. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230320112245.115720-9-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 991b1de830f61076b7dc29bec081a4d2e50724cf Author: Simon Trimmer Date: Mon Mar 20 11:22:44 2023 +0000 ASoC: wm_adsp: Simplify the logging of requested firmware files This change makes the logging of firmware files more consistent and simplifies the code - a debug message is logged whether the requested file was found or not and this applies to both wmfw and bin files. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230320112245.115720-8-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 0e7d82cbea8bc0db8ced613aea04da17ac0f0249 Author: Simon Trimmer Date: Mon Mar 20 11:22:43 2023 +0000 ASoC: wm_adsp: Add support for loading bin files without wmfw A self-booted DSP may have a file of coefficients to apply to the device even when there is no firmware to download. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230320112245.115720-7-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 11520b87e2232c6e3defed69ec94f0e28fb80f84 Author: Simon Trimmer Date: Mon Mar 20 11:22:42 2023 +0000 ASoC: wm_adsp: Expose the DSP boot work actions as wm_adsp_power_up() To support self-booting DSPs that are considered always running, the work that is usually invoked as part of a DAPM sequence needs to be triggered by a client of wm_adsp as part of it's startup sequence. These actions load firmware files that might create ALSA controls and apply configuration to the device. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230320112245.115720-6-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 65a314b7ddc09f6b1bad8decc6670e68d45ef07d Author: Simon Trimmer Date: Mon Mar 20 11:22:41 2023 +0000 ASoC: wm_adsp: Support DSPs that don't require firmware download When a DSP can self-boot from ROM it is not necessary to download firmware - when the DSP has the wmfw_optional flag set not finding a wmfw firmware file is a successful outcome and not an error condition. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/167931140130.26.15590061696793062038@mailman-core.alsa-project.org Signed-off-by: Mark Brown commit 107c167419e75213e078e4f2468c0f2f55fdd11a Author: Simon Trimmer Date: Mon Mar 20 11:22:40 2023 +0000 firmware: cs_dsp: Support DSPs that don't require firmware download When a DSP can self-boot from ROM it is not necessary to download firmware during the powering up sequence. A DSP that required firmware download would fail in a previous configuration step if firmware was not available. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230320112245.115720-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 0cd1fd571719e19bd6824a98855382a70e47d932 Author: Simon Trimmer Date: Mon Mar 20 11:22:39 2023 +0000 ASoC: wm_adsp: Use no_core_startstop to prevent creating preload control The no_core_startstop flag indicates a self-booting DSP - they are considered to be always running and therefore cannot be pre-loaded. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230320112245.115720-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 7062e1c727ec99a9c5b40586964304d60a43f240 Author: Simon Trimmer Date: Mon Mar 20 11:22:38 2023 +0000 firmware: cs_dsp: Introduce no_core_startstop for self-booting DSPs There are devices containing Halo Core DSPs that self-boot, cs_dsp is used to manage the running firmware but the host does not have direct control over starting and stopping the DSP and so cs_dsp should consider the DSP to be always running. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20230320112245.115720-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit a4926c2943dd17f84b552ba6fb754df0dc6a2fa8 Author: Marek Behún Date: Sun Mar 19 15:02:38 2023 +0100 net: dsa: mv88e6xxx: fix mdio bus' phy_mask member Commit 2c7e46edbd03 ("net: dsa: mv88e6xxx: mask apparently non-existing phys during probing") added non-trivial bus->phy_mask in mv88e6xxx_mdio_register() in order to avoid excessive mdio bus transactions during probing. But the mask is incorrect for switches with non-zero phy_base_addr (such as 88E6341). Fix this. Fixes: 2c7e46edbd03 ("net: dsa: mv88e6xxx: mask apparently non-existing phys during probing") Signed-off-by: Marek Behún Tested-by: Klaus Kudielka Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20230319140238.9470-1-kabel@kernel.org Signed-off-by: Paolo Abeni commit 0a93eeb5aef26f68ef247576662282a5d42c63d5 Author: Maarten Lankhorst Date: Wed Mar 15 14:19:24 2023 +0200 drm/i915/bios: Rename find_section to find_bdb_section This prevents a namespace collision on other archs. Signed-off-by: Maarten Lankhorst Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230315121924.2314693-1-jani.nikula@intel.com commit dbf07b544ca12c0ab8bd3fc1ea3509ea713a8bf5 Author: Borislav Petkov (AMD) Date: Tue Mar 7 20:24:46 2023 +0100 crypto: ccp: Get rid of __sev_platform_init_locked()'s local function pointer Add a wrapper instead. No functional changes. Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230307192449.24732-9-bp@alien8.de commit efb339a83368ab25de1a18c0fdff85e01c13a1ea Author: Peter Gonda Date: Tue Mar 7 20:24:39 2023 +0100 crypto: ccp - Name -1 return value as SEV_RET_NO_FW_CALL The PSP can return a "firmware error" code of -1 in circumstances where the PSP has not actually been called. To make this protocol unambiguous, name the value SEV_RET_NO_FW_CALL. [ bp: Massage a bit. ] Signed-off-by: Peter Gonda Signed-off-by: Dionna Glaze Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20221207010210.2563293-2-dionnaglaze@google.com commit cf6c422bf55fa8ac2531d56a6d17408300a59e8b Author: Jani Nikula Date: Mon Mar 20 14:44:29 2023 +0200 drm/i915/debugfs: add crtc i915_pipe debugfs file The pipe may differ from crtc index if pipes are fused off. For testing purposes, IGT needs to know the pipe. There's already a I915_GET_PIPE_FROM_CRTC_ID IOCTL for this. However, the upcoming Xe driver won't have that IOCTL, and going forward, we'll want a unified interface for testing i915 and Xe, as they share the display code. Thus add the debugfs for i915 display. v2: User letters for pipe names (Ville) Cc: Bhanuprakash Modem Reviewed-by: Ville Syrjälä Tested-by: Bhanuprakash Modem Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230320124429.786985-2-jani.nikula@intel.com commit ee2f38b3c6f2c68a0e6f5945aae91d607bc9a7c6 Author: Uwe Kleine-König Date: Tue Mar 21 11:19:11 2023 +0100 usb: host: u132-hcd: Drop if with an always true condition A platform device's .remove() callback is only ever called after .probe() successfully completed. After such a successful call, platform_get_drvdata() doesn't return NULL. Simplify accordingly. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230321101911.342538-3-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 9e67955322838b93e37f3902cabde0ee712dd2ef Author: Uwe Kleine-König Date: Tue Mar 21 11:19:10 2023 +0100 usb: host: u132-hcd: Various style improvements - Don't break strings over two (or more) lines - Put the , separating function args at the end of line - Replace if (cond) {} else { ... } by if (!cond) { ... } - Consistently use curly braces in all blocks belonging to the same if if at least one block needs them. - Don't start a new line just for ); There are no semantic changes. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230321101911.342538-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 014f0515a9e04edf4c35fbd89168aa33663b379a Author: Jani Nikula Date: Mon Mar 20 14:44:28 2023 +0200 drm/i915/debugfs: switch crtc debugfs to struct intel_crtc Convert the crtc debugfs code to use struct intel_crtc instead of struct drm_crtc. v2: Fix build for CONFIG_DRM_I915_DEBUG_VBLANK_EVADE=y (kernel test robot) Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230320124429.786985-1-jani.nikula@intel.com commit 80ac788a8d2fc8904cce97b7873b6d8fd513a46d Author: Andi Shyti Date: Sat Mar 18 21:36:16 2023 +0100 drm/i915/debugfs: Enable upper layer interfaces to act on all gt's The commit 82a149a62b6b ("drm/i915/gt: move remaining debugfs interfaces into gt") moved gt-related debugfs files in the gtX/ directories to operate on individual gt's. However, the original files were only functioning on the root GT (GT 0) and have been left in the same location to maintain compatibility with userspace users. Add multiplexing functionality to the higher directories' files. This enables the operations to be performed on all the GTs with a single write. In the case of reads, the files provide an or'ed value across all the tiles. Signed-off-by: Andi Shyti Cc: Maciej Patelczyk Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20230318203616.183765-4-andi.shyti@linux.intel.com commit 70b5ffb393f3f1fbb00ac52c5288d233ae6e991e Author: Andi Shyti Date: Sat Mar 18 21:36:14 2023 +0100 drm/i915/gt: Create per-gt debugfs files To support multi-GT configurations, we need to generate independent debug files for each GT. To achieve this create a separate directory for each GT under the debugfs directory. For instance, in a system with two GTs, the debugfs structure would look like this: /sys/kernel/debug/dri └── 0    ├── gt0    │   ├── drpc    │   ├── engines    │   ├── forcewake    │   ├── frequency    │   └── rps_boost    └── gt1    :   ├── drpc    :   ├── engines    :   ├── forcewake       ├── frequency       └── rps_boost Signed-off-by: Andi Shyti Cc: Tvrtko Ursulin Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20230318203616.183765-2-andi.shyti@linux.intel.com commit 02abecdeebfcd3848b26b70778dd7f6eb0db65e1 Author: Gustavo A. R. Silva Date: Fri Mar 17 12:18:01 2023 -0600 drm/i915/uapi: Replace fake flex-array with flexible-array member Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Address the following warning found with GCC-13 and -fstrict-flex-arrays=3 enabled: drivers/gpu/drm/i915/gem/i915_gem_context.c: In function ‘set_proto_ctx_engines.isra’: drivers/gpu/drm/i915/gem/i915_gem_context.c:769:41: warning: array subscript n is outside array bounds of ‘struct i915_engine_class_instance[0]’ [-Warray-bounds=] 769 | if (copy_from_user(&ci, &user->engines[n], sizeof(ci))) { | ^~~~~~~~~~~~~~~~~ ./include/uapi/drm/i915_drm.h:2494:43: note: while referencing ‘engines’ 2494 | struct i915_engine_class_instance engines[0]; This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/271 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/ZBSu2QsUJy31kjSE@work commit 44df42e66139b5fac8db49ee354be279210f9816 Author: Ashutosh Dixit Date: Wed Mar 15 17:48:00 2023 -0700 drm/i915/pmu: Use functions common with sysfs to read actual freq Expose intel_rps_read_actual_frequency_fw to read the actual freq without taking forcewake for use by PMU. The code is refactored to use a common set of functions across sysfs and PMU. Using common functions with sysfs in PMU solves the issues of missing support for MTL and missing support for older generations (prior to Gen6). It also future proofs the PMU where sometimes code has been updated for sysfs and PMU has been missed. v2: Remove runtime_pm_if_in_use from read_actual_frequency_fw (Tvrtko) v3: (Tvrtko) - Remove goto in __read_cagf - Unexport intel_rps_get_cagf and intel_rps_read_punit_req Fixes: 22009b6dad66 ("drm/i915/mtl: Modify CAGF functions for MTL") Link: https://gitlab.freedesktop.org/drm/intel/-/issues/8280 Signed-off-by: Ashutosh Dixit Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230316004800.2539753-1-ashutosh.dixit@intel.com commit e3890d84482a9479bf42ecb3ddc9e6030624dc84 Author: Tom Rix Date: Sun Mar 19 10:23:20 2023 -0400 drm/gma500: remove unused gma_pipe_event function clang with W=1 reports drivers/gpu/drm/gma500/psb_irq.c:35:19: error: unused function 'gma_pipe_event' [-Werror,-Wunused-function] static inline u32 gma_pipe_event(int pipe) ^ This function is not used, so remove it. Signed-off-by: Tom Rix Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20230319142320.1704336-1-trix@redhat.com commit 6b301ded45a6d9538f5f579a2e9f4b6c45fa988b Author: Harshit Mogalapalli Date: Mon Mar 20 23:14:15 2023 -0700 tpm: Fix a possible dereference of ERR_PTR in tpm_init() Smatch reports: drivers/char/tpm/tpm-interface.c:470 tpm_init() error: 'tpm_class' dereferencing possible ERR_PTR() If class_create() returns error pointer, we are dereferencing a possible error pointer. Fix this by moving the dereference post error handling. Fixes: a010eb881243 ("tpm: fix up the tpm_class shutdown_pre pointer when created") Signed-off-by: Harshit Mogalapalli Link: https://lore.kernel.org/r/20230321061416.626561-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Greg Kroah-Hartman commit 962de54828c5bb100eb8de881b79ed9c8b7468c0 Author: Kefeng Wang Date: Thu Mar 9 20:20:11 2023 +0800 mm: hugetlb: move hugeltb sysctls to its own file This moves all hugetlb sysctls to its own file, also kill an useless hugetlb_treat_movable_handler() defination. Signed-off-by: Kefeng Wang Reviewed-by: Luis Chamberlain Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Signed-off-by: Luis Chamberlain commit 2d337b7158f8c38dacf8394028ab87b8a25ed707 Author: ZhangPeng Date: Wed Mar 1 10:06:27 2023 +0000 userfaultfd: move unprivileged_userfaultfd sysctl to its own file The sysctl_unprivileged_userfaultfd is part of userfaultfd, move it to its own file. Signed-off-by: ZhangPeng Signed-off-by: Luis Chamberlain commit 6a9f5cdba3c5b4e8c2af290fe6c9e3538652ab42 Merge: 01dc26c980b0a c0ba861117c3e Author: Martin KaFai Lau Date: Mon Mar 20 21:57:50 2023 -0700 Merge branch 'net: skbuff: skb bitfield compaction - bpf' Jakub Kicinski says: ==================== I'm trying to make more of the sk_buff bits optional. Move the BPF-accessed bits a little - because they must be at coding-time-constant offsets they must precede any optional bit. While at it clean up the naming a bit. v1: https://lore.kernel.org/all/20230308003159.441580-1-kuba@kernel.org/ ==================== Signed-off-by: Martin KaFai Lau commit c0ba861117c3e8deb03855d7dc5a7717958bbb18 Author: Jakub Kicinski Date: Mon Mar 20 18:41:15 2023 -0700 net: skbuff: move the fields BPF cares about directly next to the offset marker To avoid more possible BPF dependencies with moving bitfields around keep the fields BPF cares about right next to the offset marker. Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20230321014115.997841-4-kuba@kernel.org Signed-off-by: Martin KaFai Lau commit b94e032b7ad6318b36615f0e0cc3b0d61a5531e8 Author: Jakub Kicinski Date: Mon Mar 20 18:41:14 2023 -0700 net: skbuff: reorder bytes 2 and 3 of the bitfield BPF needs to know the offsets of fields it tries to access. Zero-length fields are added to make offsetof() work. This unfortunately partitions the bitfield (fields across the zero-length members can't be coalesced). Reorder bytes 2 and 3, BPF needs to know the offset of fields previously in byte 3 and some fields in byte 2 should really be optional. The two bytes are always in the same cacheline so it should not matter. Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20230321014115.997841-3-kuba@kernel.org Signed-off-by: Martin KaFai Lau commit 04aae213e719ec2bb310158c4025316ace50589b Author: Jakub Kicinski Date: Mon Mar 20 18:41:13 2023 -0700 net: skbuff: rename __pkt_vlan_present_offset to __mono_tc_offset vlan_present is gone since commit 354259fa73e2 ("net: remove skb->vlan_present") rename the offset field to what BPF is currently looking for in this byte - mono_delivery_time and tc_at_ingress. Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20230321014115.997841-2-kuba@kernel.org Signed-off-by: Martin KaFai Lau commit a08df15eab0c572bc1d98c2392bcfcd744f26eda Author: Tom Rix Date: Sun Mar 19 13:24:33 2023 -0400 net: cxgb3: remove unused fl_to_qset function clang with W=1 reports drivers/net/ethernet/chelsio/cxgb3/sge.c:169:32: error: unused function 'fl_to_qset' [-Werror,-Wunused-function] static inline struct sge_qset *fl_to_qset(const struct sge_fl *q, int qidx) ^ This function is not used, so remove it. Signed-off-by: Tom Rix Reviewed-by: Horatiu Vultur Link: https://lore.kernel.org/r/20230319172433.1708161-1-trix@redhat.com Signed-off-by: Jakub Kicinski commit 134d836861793e0b3631aeb432db91479eaa6a0b Merge: 56aecc0a655d9 5b89aeae6e006 Author: Jakub Kicinski Date: Mon Mar 20 19:47:15 2023 -0700 Merge branch 'net-ethernet-mtk_eth_soc-various-enhancements' Daniel Golle says: ==================== net: ethernet: mtk_eth_soc: various enhancements This series brings a variety of fixes and enhancements for mtk_eth_soc, adds support for the MT7981 SoC and facilitates sharing the SGMII PCS code between mtk_eth_soc and mt7530. The whole series has been tested on MT7622+MT7531 (BPi-R64), MT7623+MT7530 (BPi-R2), MT7981+GPY211 (GL.iNet GL-MT3000) and MT7986+MT7531 (BPi-R3). On the BananaPi R3 a variete of SFP modules have been tested, all of them (some SGMII with PHY, others 2500Base-X or 1000Base-X without PHY) are working well now, however, some of them need manually disabling of autonegotiation for the link to come up. ==================== Link: https://lore.kernel.org/r/cover.1679230025.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski commit 5b89aeae6e00696ed9f15f18adbbe47dd1d4c0b7 Author: Daniel Golle Date: Sun Mar 19 12:58:43 2023 +0000 net: dsa: mt7530: use external PCS driver Implement regmap access wrappers, for now only to be used by the pcs-mtk-lynxi driver. Make use of this external PCS driver and drop the now reduntant implementation in mt7530.c. As a nice side effect the SGMII registers can now also more easily be inspected for debugging via /sys/kernel/debug/regmap. Tested-by: Bjørn Mork Signed-off-by: Daniel Golle Tested-by: Frank Wunderlich Reviewed-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski commit 2a3ec7ae313310c1092e4256208cc04d1958e469 Author: Daniel Golle Date: Sun Mar 19 12:58:02 2023 +0000 net: ethernet: mtk_eth_soc: switch to external PCS driver Now that we got a PCS driver, use it and remove the now redundant PCS code and it's header macros from the Ethernet driver. Signed-off-by: Daniel Golle Tested-by: Frank Wunderlich Reviewed-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski commit 4765a9722e09765866e131ec31f7b9cf4c1f4854 Author: Daniel Golle Date: Sun Mar 19 12:57:50 2023 +0000 net: pcs: add driver for MediaTek SGMII PCS The SGMII core found in several MediaTek SoCs is identical to what can also be found in MediaTek's MT7531 Ethernet switch IC. As this has not always been clear, both drivers developed different implementations to deal with the PCS. Recently Alexander Couzens pointed out this fact which lead to the development of this shared driver. Add a dedicated driver, mostly by copying the code now found in the Ethernet driver. The now redundant code will be removed by a follow-up commit. Suggested-by: Alexander Couzens Suggested-by: Russell King (Oracle) Signed-off-by: Daniel Golle Tested-by: Frank Wunderlich Reviewed-by: Russell King (Oracle) Signed-off-by: Jakub Kicinski commit 3fbe4d8c0e53e40faf2e0c7505536f9483af6d23 Author: Daniel Golle Date: Sun Mar 19 12:57:35 2023 +0000 net: ethernet: mtk_eth_soc: ppe: add support for flow accounting The PPE units found in MT7622 and newer support packet and byte accounting of hw-offloaded flows. Add support for reading those counters as found in MediaTek's SDK[1]. [1]: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/bc6a6a375c800dc2b80e1a325a2c732d1737df92 Tested-by: Bjørn Mork Signed-off-by: Daniel Golle Signed-off-by: Jakub Kicinski commit c0a440031d4314d1023c1b87f43a4233634eebdb Author: Daniel Golle Date: Sun Mar 19 12:57:15 2023 +0000 net: ethernet: mtk_eth_soc: set MDIO bus clock frequency Set MDIO bus clock frequency and allow setting a custom maximum frequency from device tree. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Tested-by: Bjørn Mork Signed-off-by: Daniel Golle Signed-off-by: Jakub Kicinski commit 4f7eb19c4f44078100659f6ba073b0cc7191bc91 Author: Daniel Golle Date: Sun Mar 19 12:57:04 2023 +0000 dt-bindings: net: pcs: mediatek,sgmiisys: add MT7981 SoC Add mediatek,pnswap boolean property needed on many boards using the MediaTek MT7981 SoC. Reviewed-by: Rob Herring Signed-off-by: Daniel Golle Signed-off-by: Jakub Kicinski commit d4f08a703565abf47baa5a77d05365cf4598d55c Author: Daniel Golle Date: Sun Mar 19 12:56:52 2023 +0000 dt-bindings: arm: mediatek: sgmiisys: Convert to DT schema Convert mediatek,sgmiiisys bindings to DT schema format. Add maintainer Matthias Brugger, no maintainers were listed in the original documentation. As this node is also referenced by the Ethernet controller and used as SGMII PCS add this fact to the description. Move the file to Documentation/devicetree/bindings/net/pcs/ which seems more appropriate given that the great majority of registers are related to SGMII PCS functionality and only one register represents clock bits. Reviewed-by: Rob Herring Signed-off-by: Daniel Golle Signed-off-by: Jakub Kicinski commit e3ac1c270466e4fe930010ca688f71b98282e0e6 Author: Daniel Golle Date: Sun Mar 19 12:56:40 2023 +0000 dt-bindings: net: mediatek,net: add mt7981-eth binding Introduce DT bindings for the MT7981 SoC to mediatek,net.yaml. Reviewed-by: Rob Herring Signed-off-by: Daniel Golle Signed-off-by: Jakub Kicinski commit f5d43ddd334b7c32fcaed9ba46afbd85cb467f1f Author: Daniel Golle Date: Sun Mar 19 12:56:28 2023 +0000 net: ethernet: mtk_eth_soc: add support for MT7981 SoC The MediaTek MT7981 SoC comes with two 1G/2.5G SGMII ports, just like MT7986. In addition MT7981 is equipped with a built-in 1000Base-T PHY which can be used with GMAC1. As many MT7981 boards make use of inverting SGMII signal polarity, add new device-tree attribute 'mediatek,pn_swap' to support them. Signed-off-by: Daniel Golle Signed-off-by: Jakub Kicinski commit ea15483e7c55f73809cd9e208fff511966539ee5 Author: German Gomez Date: Mon Mar 20 15:15:08 2023 +0000 perf report: Add 'simd' sort field Add 'simd' sort field to visualize SIMD ops in 'perf report'. Rows are labeled with the SIMD ISA, and the type of predicate (if any): - [p] partial predicate - [e] empty predicate (no elements in the vector being used) Example with Arm SPE and SVE (Scalable Vector Extension): #include double src[1025], dst[1025]; int main(void) { svfloat64_t vc = svdup_f64(1); for(;;) for(int i = 0; i < 1025; i += svcntd()) { svbool_t pg = svwhilelt_b64(i, 1025); svfloat64_t vsrc = svld1(pg, &src[i]); svfloat64_t vdst = svadd_x(pg, vsrc, vc); svst1(pg, &dst[i], vdst); } return 0; } ... compiled using "gcc-11 -march=armv8-a+sve -O3" Profiling on a platform that implements FEAT_SVE and FEAT_SPEv1p1: $ perf record -e arm_spe_0// -- ./a.out $ perf report --itrace=i1i -s overhead,pid,simd,sym Overhead Pid:Command Simd Symbol ........ ................ ....... ...................... 53.76% 10758:program [.] main 46.14% 10758:program [.] SVE [.] main 0.09% 10758:program [p] SVE [.] main The report shows 0.09% of the sampled SVE operations use partial predicates due to src and dst arrays not being multiples of the vector register lengths. Signed-off-by: German Gomez Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman.Khandual@arm.com Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230320151509.1137462-2-james.clark@arm.com Signed-off-by: James Clark Signed-off-by: Arnaldo Carvalho de Melo commit 03a6c16ebf0162b57acd16c2dd2baa79d8db2a97 Author: German Gomez Date: Mon Mar 20 15:15:07 2023 +0000 perf arm-spe: Add SVE flags to the SPE samples Add flags from the Scalable Vector Extension (SVE) to the SPE samples which are available from Armv8.3 (FEAT_SPEv1p1). These will be displayed in a new SIMD sort field in a later commit. Signed-off-by: German Gomez Signed-off-by: James Clark Acked-by: Ian Rogers Link: https://lore.kernel.org/r/20230320151509.1137462-2-james.clark@arm.com Cc: Anshuman.Khandual@arm.com Cc: Mark Rutland Cc: Peter Zijlstra Cc: Adrian Hunter Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Cc: Will Deacon Cc: Leo Yan Cc: Mike Leach Cc: Alexander Shishkin Cc: linux-arm-kernel@lists.infradead.org Cc: John Garry Cc: Ingo Molnar Cc: linux-kernel@vger.kernel.org Cc: linux-perf-users@vger.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0066015a3d8f9c01a17eb04579edba7dac9510af Author: German Gomez Date: Mon Mar 20 15:15:06 2023 +0000 perf arm-spe: Refactor arm-spe to support operation packet type Extend the decoder of Arm SPE records to support more fields from the operation packet type. Not all fields are being decoded by this commit. Only those needed to support the use-case SVE load/store/other operations. Suggested-by: Leo Yan Signed-off-by: German Gomez Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman.Khandual@arm.com Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230320151509.1137462-2-james.clark@arm.com Signed-off-by: James Clark Signed-off-by: Arnaldo Carvalho de Melo commit f43cc1a9a8612ca591e4c205b9f503d63380eccc Author: German Gomez Date: Mon Mar 20 15:15:05 2023 +0000 perf event: Add 'simd_flags' field to 'struct perf_sample' Add new field to 'struct perf_sample' to store flags related to SIMD ops. It will be used to store SIMD information from SVE and NEON when profiling using ARM SPE. Signed-off-by: German Gomez Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Anshuman.Khandual@arm.com Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230320151509.1137462-2-james.clark@arm.com Signed-off-by: James Clark Signed-off-by: Arnaldo Carvalho de Melo commit 052072f69f28864cebaeb6ca9dc2c9825b72c834 Author: Adrian Hunter Date: Mon Mar 20 20:35:17 2023 +0200 perf intel-pt: Add support for new branch instructions ERETS and ERETU Intel Flexible Return and Event Delivery (FRED) adds instructions ERETS (return to supervisor) and ERETU (return to user). Intel PT instruction decoder needs to know about these instructions because they are branch instructions. Similar to IRET instructions, when the decoder encounters one of these instructions it will match it to a TIP (target instruction pointer) packet that informs what the branch destination is. The existing "x86 instruction decoder - new instructions" test can be used to test the result e.g. $ perf test -v ins |& grep eret Decoded ok: f2 0f 01 ca erets Decoded ok: f3 0f 01 ca eretu Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230320183517.15099-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 34f576c95d1bd1be3f123c2d1f3db084e5e72583 Author: Adrian Hunter Date: Mon Mar 20 20:35:16 2023 +0200 perf intel-pt: Add event type names UINTR and UIRET UINTR and UIRET are listed in table 32-50 "CFE Packet Type and Vector Fields Details" in the Intel Processor Trace chapter of The Intel SDM Volume 3 version 078. The codes are for "User interrupt delivered" and "Exiting from user interrupt routine" respectively. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230320183517.15099-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit d54c1fd4a51e8fbc7f9da86b0cd338a4f7cd2bb2 Author: Qin Jian Date: Mon Dec 19 09:51:30 2022 +0800 clk: Add Sunplus SP7021 clock driver Add clock driver for Sunplus SP7021 SoC. Signed-off-by: Qin Jian Link: https://lore.kernel.org/r/20221219015130.42621-1-qinjian@cqplus1.com Signed-off-by: Stephen Boyd commit 54bdd67d0f88489ac88f7664b56cb7c93799d84d Author: Keith Busch Date: Mon Mar 20 12:49:26 2023 -0700 blk-mq: remove hybrid polling io_uring provides the only way user space can poll completions, and that always sets BLK_POLL_NOSLEEP. This effectively makes hybrid polling dead code, so remove it and everything supporting it. Hybrid polling was effectively killed off with 9650b453a3d4b1, "block: ignore RWF_HIPRI hint for sync dio", but still potentially reachable through io_uring until d729cf9acb93119, "io_uring: don't sleep when polling for I/O", but hybrid polling probably should not have been reachable through that async interface from the beginning. Fixes: 9650b453a3d4 ("block: ignore RWF_HIPRI hint for sync dio") Fixes: d729cf9acb93 ("io_uring: don't sleep when polling for I/O") Signed-off-by: Keith Busch Link: https://lore.kernel.org/r/20230320194926.3353144-1-kbusch@meta.com Signed-off-by: Jens Axboe commit f0c3a66f0e8634e11b471a3ddb1896dafdf6d6bb Author: Rob Clark Date: Mon Mar 20 11:54:13 2023 -0700 drm/msm/a6xx: Some reg64 conversion The next generated header update will drop the _LO/_HI suffix, now that the userspace tooling properly understands 64b vs 32b regs (and the _LO/ _HI workarounds are getting cleaned up). So convert to using the 64b reg helpers in prep. Signed-off-by: Rob Clark Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/527923/ Link: https://lore.kernel.org/r/20230320185416.938842-1-robdclark@gmail.com commit 010c8bbad2cb8c33c47963e29f051f1e917e45a5 Author: Adam Skladowski Date: Tue Mar 14 23:17:17 2023 +0100 drm: msm: adreno: Disable preemption on Adreno 510 Downstream driver appears to not support preemption on A510 target, trying to use one make device slow and fill log with rings related errors. Set num_rings to 1 to disable preemption. Suggested-by: Dmitry Baryshkov Fixes: e20c9284c8f2 ("drm/msm/adreno: Add support for Adreno 510 GPU") Signed-off-by: Adam Skladowski Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/526898/ Link: https://lore.kernel.org/r/20230314221757.13096-1-a39.skl@gmail.com Signed-off-by: Rob Clark commit 00a7ef3242f42c38c9ffdf14ab2d729fd9754391 Author: Jianhua Lu Date: Sat Mar 18 22:14:39 2023 +0800 ASoC: cs35l41: Add 12288000 clk freq to cs35l41_fs_mon clk config There are 8 cs35l41 speaker amplifier connected to TDM in my Xiaomi Mi Pad 5 Pro tablet. In this case, it's necessary to set 12288000 (48000 * 32 * 8) clk freq for it. rate=48000, slot_width=32, slots=8. Signed-off-by: Jianhua Lu Reviewed-by: David Rhodes Link: https://lore.kernel.org/r/20230318141440.29023-1-lujianhua000@gmail.com Signed-off-by: Mark Brown commit 7ec6c41e0b377654e44dd5d61748863ed4d62091 Author: Abhinav Kumar Date: Sat Mar 4 15:26:56 2023 -0800 MAINTAINERS: Update the URI for MSM DRM bugs Update the URI for MSM DRM bugs for users to be able to file bugs at a centralized location. Signed-off-by: Abhinav Kumar Acked-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/525026/ Link: https://lore.kernel.org/r/1677972416-7353-1-git-send-email-quic_abhinavk@quicinc.com Signed-off-by: Rob Clark commit eaa667db35a08f54a8ee7b29c8404ef5c864705b Author: Johan Hovold Date: Fri Mar 3 17:48:07 2023 +0100 drm/msm/adreno: clean up component ops indentation Clean up the component ops initialisers which were indented one level too far. Signed-off-by: Johan Hovold Patchwork: https://patchwork.freedesktop.org/patch/524973/ Link: https://lore.kernel.org/r/20230303164807.13124-5-johan+linaro@kernel.org Signed-off-by: Rob Clark commit db7662d076c973072d788bd0e8130e04430307a1 Author: Johan Hovold Date: Fri Mar 3 17:48:06 2023 +0100 drm/msm/adreno: drop bogus pm_runtime_set_active() The runtime PM status can only be updated while runtime PM is disabled. Drop the bogus pm_runtime_set_active() call that was made after enabling runtime PM and which (incidentally but correctly) left the runtime PM status set to 'suspended'. Fixes: 2c087a336676 ("drm/msm/adreno: Load the firmware before bringing up the hardware") Signed-off-by: Johan Hovold Patchwork: https://patchwork.freedesktop.org/patch/524972/ Link: https://lore.kernel.org/r/20230303164807.13124-4-johan+linaro@kernel.org Signed-off-by: Rob Clark commit 0d997f95b70f98987ae031a89677c13e0e223670 Author: Johan Hovold Date: Fri Mar 3 17:48:05 2023 +0100 drm/msm/adreno: fix runtime PM imbalance at gpu load A recent commit moved enabling of runtime PM to GPU load time (first open()) but failed to update the error paths so that runtime PM is disabled if initialisation of the GPU fails. This would trigger a warning about the unbalanced disable count on the next open() attempt. Note that pm_runtime_put_noidle() is sufficient to balance the usage count when pm_runtime_put_sync() fails (and is chosen over pm_runtime_resume_and_get() for consistency reasons). Fixes: 4b18299b3365 ("drm/msm/adreno: Defer enabling runpm until hw_init()") Cc: stable@vger.kernel.org # 6.0 Signed-off-by: Johan Hovold Patchwork: https://patchwork.freedesktop.org/patch/524971/ Link: https://lore.kernel.org/r/20230303164807.13124-3-johan+linaro@kernel.org Signed-off-by: Rob Clark commit 3cd557272ef0b1bbad3c5450f09629e451e101f3 Author: Robert Nelson Date: Thu Mar 16 10:21:41 2023 -0500 dt-bindings: arm: ti: Add BeaglePlay This board is based on ti,am625 https://beagleplay.org/ https://git.beagleboard.org/beagleplay/beagleplay Signed-off-by: Robert Nelson Reviewed-by: Dhruva Gole Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230316152143.2438928-2-nm@ti.com Co-developed-by: Nishanth Menon Signed-off-by: Nishanth Menon commit 496cdc82e05f5683cdca5ab157938091e7744c95 Author: Siddharth Vadapalli Date: Wed Mar 15 11:53:07 2023 +0530 arm64: dts: ti: k3-j7200: Add overlay to enable CPSW5G ports in QSGMII mode The J7 Quad Port Add-On Ethernet Card for J7200 Common-Proc-Board supports QSGMII mode. Use the overlay to configure CPSW5G ports in QSGMII mode. Add support to reset the PHY from kernel by using gpio-hog and gpio-reset. Add aliases for CPSW5G ports to enable kernel to fetch MAC addresses directly from U-Boot. Signed-off-by: Siddharth Vadapalli Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20230315062307.1612220-5-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit d3bac98015da55866891054a2aeb42af7904fca8 Author: Siddharth Vadapalli Date: Wed Mar 15 11:53:06 2023 +0530 arm64: dts: ti: j7200-main: Add CPSW5G nodes TI's J7200 SoC has a 5 port Ethernet Switch instance with 4 external ports and 1 host port, referred to as CPSW5G. Add device-tree nodes for CPSW5G and disable it by default. Device-tree overlays will be used to enable it. Signed-off-by: Siddharth Vadapalli Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20230315062307.1612220-4-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 86e7de8bf908a03ac8fba4afeef25c54a1c2ef4a Author: Siddharth Vadapalli Date: Wed Mar 15 11:53:05 2023 +0530 arm64: dts: ti: k3-j721e: Add overlay to enable CPSW9G ports in QSGMII mode The J7 Quad Port Add-On Ethernet Card for J721E Common-Proc-Board supports QSGMII mode. Use the overlay to configure CPSW9G ports in QSGMII mode. 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 Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20230315062307.1612220-3-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit c9c9d764daeeb264c647b0c6a3d2f602a7deb586 Author: Uwe Kleine-König Date: Sun Mar 19 11:06:20 2023 +0100 of: unittest: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230319100620.295849-4-u.kleine-koenig@pengutronix.de Signed-off-by: Rob Herring commit 13cd9ac670df5e052d3a31ae21bb1787202870dd Author: Uwe Kleine-König Date: Sun Mar 19 11:06:19 2023 +0100 of: unittest: Drop if blocks with always false condition unittest_gpio_remove() is only called after unittest_gpio_probe() completed successfully. In this case driver data was set to a non-NULL value and so platform_get_drvdata() never returns NULL. Also note that the compiler might optimize away this check anyhow as devptr was already dereferenced for the dev_dbg call above. Drop this if block. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230319100620.295849-3-u.kleine-koenig@pengutronix.de Signed-off-by: Rob Herring commit 5cdade2d77dd41a2ed98967c3887f5d66a4d23c4 Author: Uwe Kleine-König Date: Sun Mar 19 11:06:18 2023 +0100 of: unittest: Drop call to platform_set_drvdata(..., NULL) The driver core already unsets driver data after .remove() completes. So there is no reason to do this explicitly in the driver itself. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230319100620.295849-2-u.kleine-koenig@pengutronix.de Signed-off-by: Rob Herring commit 92717003de85771cb6ee200a46521f6d1b12e3f8 Author: Arnd Bergmann Date: Mon Mar 20 10:13:42 2023 +0100 clk: mediatek: mt81xx: Ensure fhctl code is available Just like in commit eddc63094855 ("clk: mediatek: Ensure fhctl code is available for COMMON_CLK_MT6795"), these three need the shared driver code, otherwise they run into link errors such as: aarch64-linux/bin/aarch64-linux-ld: drivers/clk/mediatek/clk-mt8192-apmixedsys.o: in function `clk_mt8192_apmixed_probe': clk-mt8192-apmixedsys.c:(.text+0x134): undefined reference to `fhctl_parse_dt' Fixes: 45a5cbe05d1f ("clk: mediatek: mt8173: Add support for frequency hopping through FHCTL") Fixes: 4d586e10c428 ("clk: mediatek: mt8192: Add support for frequency hopping through FHCTL") Fixes: da4a82dc67b0 ("clk: mediatek: mt8195: Add support for frequency hopping through FHCTL") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230320091353.1918439-1-arnd@kernel.org Reviewed-by: AngeloGioacchino Del Regno Reported-by: kernel test robot Signed-off-by: Stephen Boyd commit 02ce28bc083e8196db8612adf08c1288fb198d76 Merge: cff5c895137cb bdce47bb19cbf Author: Mark Brown Date: Mon Mar 20 19:00:53 2023 +0000 regulator: Set PROBE_PREFER_ASYNCHRONOUS for Merge series from Douglas Anderson : This series directly follows from the discussion when I tried to turn on PROBE_PREFER_ASYNCHRONOUS just for the fixed-regulator [1] and attempts to switch everything in drivers/regulator over to async probe. Like the similar patch series I did for the MMC subsystem a few years ago [2], I've split this patch series into batches corresponding to drivers corresponding to actively maintained stable kernel trees with the idea to break the patch series up somewhat. Most of the description of this series is contained in the first patch of the series and then the further patches simply refer back to the first one. The logic and reasoning behind all the patches is exactly the same. As talked about in the first patch, it wouldn't be at all shocking if this broke someone. Hopefully this doesn't cause too much of a problem. Most of the problems expected would be real underlying bugs that already existed and were just tickled by this change. If you're facing a problem, it's fairly easy to force individual drivers back to "synchronous" probing while the problem is tracked down and fixed. I am opting _not_ to CC every single person involved in each of these regulators on this patch series because I suspect that the mailing lists couldn't handle CCing that many people. This should be on LKML so hopefully people can find it there and respond to it that way. Anyone who responds will get CCed on future versions, if there are any. For reference, the ugly script I used is here: import os import re for filename in os.listdir("."): found_subsys = False found_driver = False output = [] for line in open(filename, "r").readlines(): if "struct platform_driver" in line or \ "struct i2c_driver" in line or \ "struct spmi_driver" in line or \ "struct spi_driver" in line: found_subsys = True if found_subsys and re.search(r"\t\.driver\s*=\s*{", line): found_driver = True found_subsys = False mo = re.search(r"(\s*)\.name(\s*)=", line) if found_driver and mo: if not line.endswith(",\n"): line = line[:-1] + ",\n" output.append(line) if mo.group(2) == " ": space = " " elif mo.group(2) == "\t": # Best we can do space = " " elif mo.group(2).startswith("\t"): # Guess that removing one tab is right space = mo.group(2)[1:] else: # Guess it's all spaces space = mo.group(2)[7:] + " " output.append("%s.probe_type%s= PROBE_PREFER_ASYNCHRONOUS,\n" % (mo.group(1), space)) found_driver = False else: output.append(line) open(filename, "w").write("".join(output)) I manually split drivers up into groups based on the kernel they were introduced in. I've run a compile test against "allyesconfig" on amd64, arm32, and arm64 with this and confirmed it compiled. I've booted this on a sc7180-trogdor-lazor board and confirmed it booted OK and got the boot speed improvements I expected and that dmesg was as expected. [1] https://lore.kernel.org/r/06db017f-e985-4434-8d1d-02ca2100cca0@sirena.org.uk [2] https://lore.kernel.org/r/20200903232441.2694866-1-dianders@chromium.org/ Douglas Anderson (7): regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 4.14 and 4.19 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 4.19 and 5.4 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.4 and 5.10 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.10 and 5.15 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.15 and 6.1 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that are newer than 6.1 drivers/regulator/88pg86x.c | 1 + drivers/regulator/88pm800-regulator.c | 1 + drivers/regulator/88pm8607.c | 1 + drivers/regulator/aat2870-regulator.c | 1 + drivers/regulator/ab8500-ext.c | 1 + drivers/regulator/ab8500.c | 1 + drivers/regulator/act8865-regulator.c | 1 + drivers/regulator/act8945a-regulator.c | 1 + drivers/regulator/ad5398.c | 1 + drivers/regulator/anatop-regulator.c | 1 + drivers/regulator/arizona-ldo1.c | 2 ++ drivers/regulator/arizona-micsupp.c | 2 ++ drivers/regulator/as3711-regulator.c | 1 + drivers/regulator/as3722-regulator.c | 1 + drivers/regulator/atc260x-regulator.c | 1 + drivers/regulator/axp20x-regulator.c | 1 + drivers/regulator/bcm590xx-regulator.c | 1 + drivers/regulator/bd71815-regulator.c | 1 + drivers/regulator/bd71828-regulator.c | 3 ++- drivers/regulator/bd718x7-regulator.c | 1 + drivers/regulator/bd9571mwv-regulator.c | 1 + drivers/regulator/bd9576-regulator.c | 1 + drivers/regulator/cpcap-regulator.c | 1 + drivers/regulator/cros-ec-regulator.c | 1 + drivers/regulator/da903x-regulator.c | 1 + drivers/regulator/da9052-regulator.c | 1 + drivers/regulator/da9055-regulator.c | 1 + drivers/regulator/da9062-regulator.c | 1 + drivers/regulator/da9063-regulator.c | 1 + drivers/regulator/da9121-regulator.c | 1 + drivers/regulator/da9210-regulator.c | 1 + drivers/regulator/da9211-regulator.c | 1 + drivers/regulator/db8500-prcmu.c | 1 + drivers/regulator/dummy.c | 1 + drivers/regulator/fan53555.c | 1 + drivers/regulator/fan53880.c | 1 + drivers/regulator/fixed.c | 1 + drivers/regulator/gpio-regulator.c | 1 + drivers/regulator/hi6421-regulator.c | 1 + drivers/regulator/hi6421v530-regulator.c | 1 + drivers/regulator/hi6421v600-regulator.c | 1 + drivers/regulator/hi655x-regulator.c | 1 + drivers/regulator/isl6271a-regulator.c | 1 + drivers/regulator/isl9305.c | 1 + drivers/regulator/lm363x-regulator.c | 1 + drivers/regulator/lochnagar-regulator.c | 1 + drivers/regulator/lp3971.c | 1 + drivers/regulator/lp3972.c | 1 + drivers/regulator/lp872x.c | 1 + drivers/regulator/lp873x-regulator.c | 1 + drivers/regulator/lp8755.c | 1 + drivers/regulator/lp87565-regulator.c | 1 + drivers/regulator/lp8788-buck.c | 1 + drivers/regulator/lp8788-ldo.c | 2 ++ drivers/regulator/ltc3589.c | 1 + drivers/regulator/ltc3676.c | 1 + drivers/regulator/max14577-regulator.c | 1 + drivers/regulator/max1586.c | 1 + drivers/regulator/max20086-regulator.c | 1 + drivers/regulator/max20411-regulator.c | 1 + drivers/regulator/max597x-regulator.c | 1 + drivers/regulator/max77620-regulator.c | 1 + drivers/regulator/max77650-regulator.c | 1 + drivers/regulator/max77686-regulator.c | 1 + drivers/regulator/max77693-regulator.c | 1 + drivers/regulator/max77802-regulator.c | 1 + drivers/regulator/max77826-regulator.c | 1 + drivers/regulator/max8649.c | 1 + drivers/regulator/max8660.c | 1 + drivers/regulator/max8893.c | 1 + drivers/regulator/max8907-regulator.c | 1 + drivers/regulator/max8925-regulator.c | 1 + drivers/regulator/max8952.c | 1 + drivers/regulator/max8973-regulator.c | 1 + drivers/regulator/max8997-regulator.c | 1 + drivers/regulator/max8998.c | 1 + drivers/regulator/mc13783-regulator.c | 1 + drivers/regulator/mc13892-regulator.c | 1 + drivers/regulator/mcp16502.c | 1 + drivers/regulator/mp5416.c | 1 + drivers/regulator/mp8859.c | 1 + drivers/regulator/mp886x.c | 1 + drivers/regulator/mpq7920.c | 1 + drivers/regulator/mt6311-regulator.c | 1 + drivers/regulator/mt6315-regulator.c | 1 + drivers/regulator/mt6323-regulator.c | 1 + drivers/regulator/mt6331-regulator.c | 1 + drivers/regulator/mt6332-regulator.c | 1 + drivers/regulator/mt6357-regulator.c | 1 + drivers/regulator/mt6358-regulator.c | 1 + drivers/regulator/mt6359-regulator.c | 1 + drivers/regulator/mt6360-regulator.c | 1 + drivers/regulator/mt6370-regulator.c | 1 + drivers/regulator/mt6380-regulator.c | 1 + drivers/regulator/mt6397-regulator.c | 1 + drivers/regulator/mtk-dvfsrc-regulator.c | 1 + drivers/regulator/palmas-regulator.c | 1 + drivers/regulator/pbias-regulator.c | 1 + drivers/regulator/pca9450-regulator.c | 1 + drivers/regulator/pcap-regulator.c | 1 + drivers/regulator/pcf50633-regulator.c | 1 + drivers/regulator/pf8x00-regulator.c | 1 + drivers/regulator/pfuze100-regulator.c | 1 + drivers/regulator/pv88060-regulator.c | 1 + drivers/regulator/pv88080-regulator.c | 1 + drivers/regulator/pv88090-regulator.c | 1 + drivers/regulator/pwm-regulator.c | 1 + drivers/regulator/qcom-labibb-regulator.c | 1 + drivers/regulator/qcom-rpmh-regulator.c | 1 + drivers/regulator/qcom_rpm-regulator.c | 1 + drivers/regulator/qcom_smd-regulator.c | 1 + drivers/regulator/qcom_spmi-regulator.c | 1 + drivers/regulator/qcom_usb_vbus-regulator.c | 1 + drivers/regulator/rc5t583-regulator.c | 1 + drivers/regulator/rk808-regulator.c | 3 ++- drivers/regulator/rn5t618-regulator.c | 1 + drivers/regulator/rpi-panel-attiny-regulator.c | 1 + drivers/regulator/rt4801-regulator.c | 1 + drivers/regulator/rt4831-regulator.c | 1 + drivers/regulator/rt5033-regulator.c | 1 + drivers/regulator/rt5120-regulator.c | 1 + drivers/regulator/rt5190a-regulator.c | 1 + drivers/regulator/rt5739.c | 1 + drivers/regulator/rt5759-regulator.c | 1 + drivers/regulator/rt6160-regulator.c | 1 + drivers/regulator/rt6190-regulator.c | 1 + drivers/regulator/rt6245-regulator.c | 1 + drivers/regulator/rtmv20-regulator.c | 1 + drivers/regulator/rtq2134-regulator.c | 1 + drivers/regulator/rtq6752-regulator.c | 1 + drivers/regulator/s2mpa01.c | 1 + drivers/regulator/s2mps11.c | 1 + drivers/regulator/s5m8767.c | 1 + drivers/regulator/sc2731-regulator.c | 1 + drivers/regulator/sky81452-regulator.c | 1 + drivers/regulator/slg51000-regulator.c | 1 + drivers/regulator/sm5703-regulator.c | 1 + drivers/regulator/stm32-booster.c | 1 + drivers/regulator/stm32-pwr.c | 1 + drivers/regulator/stm32-vrefbuf.c | 1 + drivers/regulator/stpmic1_regulator.c | 1 + drivers/regulator/stw481x-vmmc.c | 1 + drivers/regulator/sy7636a-regulator.c | 1 + drivers/regulator/sy8106a-regulator.c | 1 + drivers/regulator/sy8824x.c | 1 + drivers/regulator/sy8827n.c | 1 + drivers/regulator/ti-abb-regulator.c | 1 + drivers/regulator/tps51632-regulator.c | 1 + drivers/regulator/tps6105x-regulator.c | 1 + drivers/regulator/tps62360-regulator.c | 1 + drivers/regulator/tps6286x-regulator.c | 1 + drivers/regulator/tps65023-regulator.c | 1 + drivers/regulator/tps6507x-regulator.c | 1 + drivers/regulator/tps65086-regulator.c | 1 + drivers/regulator/tps65090-regulator.c | 1 + drivers/regulator/tps65132-regulator.c | 1 + drivers/regulator/tps65217-regulator.c | 1 + drivers/regulator/tps65218-regulator.c | 1 + drivers/regulator/tps65219-regulator.c | 1 + drivers/regulator/tps6524x-regulator.c | 1 + drivers/regulator/tps6586x-regulator.c | 1 + drivers/regulator/tps65910-regulator.c | 1 + drivers/regulator/tps65912-regulator.c | 1 + drivers/regulator/tps68470-regulator.c | 1 + drivers/regulator/twl-regulator.c | 1 + drivers/regulator/twl6030-regulator.c | 1 + drivers/regulator/uniphier-regulator.c | 1 + drivers/regulator/userspace-consumer.c | 1 + drivers/regulator/vctrl-regulator.c | 1 + drivers/regulator/vexpress-regulator.c | 1 + drivers/regulator/virtual.c | 1 + drivers/regulator/vqmmc-ipq4019-regulator.c | 1 + drivers/regulator/wm831x-dcdc.c | 4 ++++ drivers/regulator/wm831x-isink.c | 1 + drivers/regulator/wm831x-ldo.c | 3 +++ drivers/regulator/wm8350-regulator.c | 1 + drivers/regulator/wm8400-regulator.c | 1 + drivers/regulator/wm8994-regulator.c | 1 + 178 files changed, 188 insertions(+), 2 deletions(-) -- 2.40.0.rc1.284.g88254d51c5-goog commit 01dc26c980b0a92d9ba94c28652b2675968727b6 Author: Liu Pan Date: Mon Mar 20 11:07:20 2023 +0800 libbpf: Explicitly call write to append content to file Write data to fd by calling "vdprintf", in most implementations of the standard library, the data is finally written by the writev syscall. But "uprobe_events/kprobe_events" does not allow segmented writes, so switch the "append_to_file" function to explicit write() call. Signed-off-by: Liu Pan Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230320030720.650-1-patteliu@gmail.com commit 103c6a315bc7ae0442be683b8d725d51615d280b Merge: 0df9f6cf95765 3b74dc8acd5c2 Author: Mark Brown Date: Mon Mar 20 18:50:05 2023 +0000 spi: sprd: Convert to platform remove callback Merge series from Uwe Kleine-König : An early error return from a remove callback is usally wrong. In the case of the spi-sprd driver it's not that critical because the skipped steps are mainly undoing the things that a successful runtime-resume would have done. Still it's cleaner to not exit early and not return an (mostly ignored) error value. The second patch converts to .remove_new (which is the motivation for this series). commit 0df9f6cf9576558fb1aba8527a66775e96e2bd2b Merge: a0dcd1ff96293 423e548127223 Author: Mark Brown Date: Mon Mar 20 18:49:58 2023 +0000 spi: imx: Fix cleanup in remove and convert to Merge series from Uwe Kleine-König : This small series converts the spi-imx driver to .remove_new(). The motivation for this tree-wide effort are drivers that don't properly cleanup and return an error code. This is broken as this results in resource leaks. The spi-imx driver is such a driver. The idea is that if the remove callback returns void it's obvious that an early error return is wrong. commit 446967a46db5a740293d00faf550886dcfde5eab Merge: be7a2dad94236 0e6c37610934e Author: Mark Brown Date: Mon Mar 20 18:30:01 2023 +0000 Enable I2S support for RK3588/RK3588S SoCs Merge series from Cristian Ciocaltea : There are five I2S/PCM/TDM controllers and two I2S/PCM controllers embedded in the RK3588 and RK3588S SoCs. Furthermore, RK3588 provides four additional I2S/PCM/TDM controllers. This patch series adds the required device tree nodes to support all the above. Additionally, it enables analog audio support for the Rock 5B SBC, which has been used to test both audio playback and recording. commit be7a2dad942369c4b872e26de0b438346453c69c Merge: 9934844f6b49f 85a375fe8df90 Author: Mark Brown Date: Mon Mar 20 18:29:55 2023 +0000 Fix sound on ASUS Transformers Merge series from Svyatoslav Ryhel : - add quirk for headset detection used by some T30 devices (ASUS Transformers, LG Optimus 4X HD and Vu); - add RT5631 and MAX9808x machine drivers - update bindings --- Changes from v1 - fm34 dropped for re-work - quirk for headset detection and rt5631 bringup splitted - minor adjustments in binding updates - improvement of rt5631 rate asignment --- David Heidelberg (1): dt-bindings: sound: nvidia,tegra-audio: add RT5631 CODEC Svyatoslav Ryhel (7): dt-bindings: sound: nvidia,tegra-audio-common: add coupled-mic-hp-detect property ASoC: tegra: Support coupled mic-hp detection ARM: tegra: transformers: update sound nodes ASoC: tegra: Support RT5631 by machine driver ARM: tegra: transformers: bind RT5631 sound nodes dt-bindings: sound: nvidia,tegra-audio: add MAX9808x CODEC ASoC: tegra: Support MAX9808x by machine driver .../sound/nvidia,tegra-audio-common.yaml | 4 + .../sound/nvidia,tegra-audio-max9808x.yaml | 90 +++++++++++++ .../sound/nvidia,tegra-audio-rt5631.yaml | 85 ++++++++++++ arch/arm/boot/dts/tegra20-asus-tf101.dts | 7 +- arch/arm/boot/dts/tegra30-asus-tf201.dts | 17 +++ arch/arm/boot/dts/tegra30-asus-tf300t.dts | 5 +- arch/arm/boot/dts/tegra30-asus-tf300tg.dts | 17 +++ arch/arm/boot/dts/tegra30-asus-tf700t.dts | 17 +++ .../dts/tegra30-asus-transformer-common.dtsi | 9 +- sound/soc/tegra/Kconfig | 18 +++ sound/soc/tegra/tegra_asoc_machine.c | 125 +++++++++++++++++- 11 files changed, 380 insertions(+), 14 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max9808x.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-rt5631.yaml -- 2.37.2 commit 6bc6e6b27524304aadb9c04611ddb1c84dd7617a Author: Paul E. McKenney Date: Tue Jan 31 16:12:18 2023 -0800 refscale: Move shutdown from wait_event() to wait_event_idle() The ref_scale_shutdown() kthread/function uses wait_event() to wait for the refscale test to complete. However, although the read-side tests are normally extremely fast, there is no law against specifying a very large value for the refscale.loops module parameter or against having a slow read-side primitive. Either way, this might well trigger the hung-task timeout. This commit therefore replaces those wait_event() calls with calls to wait_event_idle(), which do not trigger the hung-task timeout. Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng commit ef1ef3d47677dc191b88650a9f7f91413452cc1b Author: Paul E. McKenney Date: Tue Jan 31 12:08:54 2023 -0800 rcuscale: Move shutdown from wait_event() to wait_event_idle() The rcu_scale_shutdown() and kfree_scale_shutdown() kthreads/functions use wait_event() to wait for the rcuscale test to complete. However, each updater thread in such a test waits for at least 100 grace periods. If each grace period takes more than 1.2 seconds, which is long, but not insanely so, this can trigger the hung-task timeout. This commit therefore replaces those wait_event() calls with calls to wait_event_idle(), which do not trigger the hung-task timeout. Reported-by: kernel test robot Reported-by: Liam Howlett Signed-off-by: Paul E. McKenney Tested-by: Yujie Liu Signed-off-by: Boqun Feng commit 4f02ac237813a31d4fcb4c9eb9b699b15956b53b Author: Zqiang Date: Fri Feb 3 14:40:54 2023 +0800 rcutorture: Create nocb kthreads only when testing rcu in CONFIG_RCU_NOCB_CPU=y kernels Given a non-zero rcutorture.nocbs_nthreads module parameter, the specified number of nocb kthreads will be created, regardless of whether or not the RCU implementation under test is capable of offloading callbacks. Please note that even vanilla RCU is incapable of offloading in kernels built with CONFIG_RCU_NOCB_CPU=n. And when the RCU implementation is incapable of offloading callbacks, there is no point in creating those kthreads. This commit therefore checks the cur_ops.torture_type module parameter and CONFIG_RCU_NOCB_CPU Kconfig option in order to avoid creating unnecessary nocb tasks. Signed-off-by: Zqiang Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney [ boqun: Fix checkpatch warning ] Signed-off-by: Boqun Feng commit 8d2600470e9e3bee448216438941c9106d2bcec8 Author: Konrad Dybcio Date: Thu Feb 23 11:52:03 2023 +0100 drm/msm/adreno: Enable optional icc voting from OPP tables Add the dev_pm_opp_of_find_icc_paths() call to let the OPP framework handle bus voting as part of power level setting. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/523787/ Link: https://lore.kernel.org/r/20230223-topic-opp-v3-7-5f22163cd1df@linaro.org Signed-off-by: Rob Clark commit b41e83732b4865e5219707254c52611509c08625 Author: Konrad Dybcio Date: Thu Feb 23 11:52:02 2023 +0100 drm/msm/a4xx: Implement .gpu_busy Add support for gpu_busy on a4xx, which is required for devfreq support. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/523791/ Link: https://lore.kernel.org/r/20230223-topic-opp-v3-6-5f22163cd1df@linaro.org Signed-off-by: Rob Clark commit a9cf6e7fc3f1aa1e7754e8169701e91d50ad8468 Author: Konrad Dybcio Date: Thu Feb 23 11:52:01 2023 +0100 drm/msm/a3xx: Implement .gpu_busy Add support for gpu_busy on a3xx, which is required for devfreq support. Tested-by: Dmitry Baryshkov #ifc6410 Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/523789/ Link: https://lore.kernel.org/r/20230223-topic-opp-v3-5-5f22163cd1df@linaro.org Signed-off-by: Rob Clark commit 9f251f934012bf07d31c695f770ecfeacbfdb296 Author: Konrad Dybcio Date: Thu Feb 23 11:51:59 2023 +0100 drm/msm/adreno: Use OPP for every GPU generation Some older GPUs (namely a2xx with no opp tables at all and a320 with downstream-remnants gpu pwrlevels) used not to have OPP tables. They both however had just one frequency defined, making it extremely easy to construct such an OPP table from within the driver if need be. Do so and switch all clk_set_rate calls on core_clk to their OPP counterparts. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/523784/ Link: https://lore.kernel.org/r/20230223-topic-opp-v3-3-5f22163cd1df@linaro.org Signed-off-by: Rob Clark commit c11fa1204fe9405d2a82a714d021360b865cf8bc Author: Akhil P Oommen Date: Mon Jan 2 16:18:31 2023 +0530 drm/msm/a6xx: Use genpd notifier to ensure cx-gdsc collapse As per the recommended recovery sequence of adreno gpu, cx gdsc should collapse at hardware before it is turned back ON. This helps to clear out the stale states in hardware before it is reinitialized. Use the genpd notifier along with the newly introduced dev_pm_genpd_synced_poweroff() api to ensure that cx gdsc has collapsed before we turn it back ON. Signed-off-by: Akhil P Oommen Reviewed-by: Ulf Hansson Patchwork: https://patchwork.freedesktop.org/patch/516472/ Link: https://lore.kernel.org/r/20230102161757.v5.5.I9e10545c6a448d5eb1b734839b871d1b3146dac3@changeid Signed-off-by: Rob Clark commit 691a637123470bfe63bccf5836ead40fac4c7fab Author: Petr Pavlu Date: Thu Mar 16 16:10:36 2023 +0100 ACPI: cpufreq: Use platform devices to load ACPI PPC and PCC drivers The acpi-cpufreq and pcc-cpufreq drivers are loaded through per-CPU module aliases. This can result in many unnecessary load requests during boot if another frequency module, such as intel_pstate, is already active. For instance, on a typical Intel system, one can observe that udev makes 2x#CPUs attempts to insert acpi_cpufreq and 1x#CPUs attempts for pcc_cpufreq. All these tries then fail if another frequency module is already registered. In the worst case, without the recent fix in commit 0254127ab977e ("module: Don't wait for GOING modules"), these module loads occupied all udev workers and had their initialization attempts ran sequentially. Resolving all these loads then on some larger machines took too long, prevented other hardware from getting its drivers initialized and resulted in a failed boot. Discussion over these duplicate module requests ended up with a conclusion that only one load attempt should be ideally made. Both acpi-cpufreq and pcc-cpufreq drivers use platform firmware controls which are defined by ACPI. It is possible to treat these interfaces as platform devices. The patch extends the ACPI parsing logic to check the ACPI namespace if the PPC or PCC interface is present and creates a virtual platform device for each if it is available. The acpi-cpufreq and pcc-cpufreq drivers are then updated to map to these devices. This allows to try loading acpi-cpufreq and pcc-cpufreq only once during boot and only if a given interface is available in the firmware. Signed-off-by: Petr Pavlu [ rjw: whitespace and error message log level adjustments, subject edits ] Signed-off-by: Rafael J. Wysocki commit d48430122509955bbf12a02964dc8ec514f66d8c Author: Akhil P Oommen Date: Mon Jan 2 16:18:30 2023 +0530 drm/msm/a6xx: Remove cx gdsc polling using 'reset' Remove the unused 'reset' interface which was supposed to help to ensure that cx gdsc has collapsed during gpu recovery. This is was not enabled so far due to missing gpucc driver support. Similar functionality using genpd framework will be implemented in the upcoming patch. This effectively reverts commit 1f6cca404918 ("drm/msm/a6xx: Ensure CX collapse during gpu recovery"). Signed-off-by: Akhil P Oommen Reviewed-by: Ulf Hansson Reviewed-by: Philipp Zabel Patchwork: https://patchwork.freedesktop.org/patch/516470/ Link: https://lore.kernel.org/r/20230102161757.v5.4.I96e0bf9eaf96dd866111c1eec8a4c9b70fd7cbcb@changeid Signed-off-by: Rob Clark commit ead5d3e5eb37924d31875b92c8c0983627b4f343 Author: Akhil P Oommen Date: Mon Jan 2 16:18:29 2023 +0530 drm/msm/a6xx: Vote for cx gdsc from gpu driver When a device has multiple power domains, dev->power_domain is left empty during probe. That didn't cause any issue so far because we are freeloading on smmu driver's vote on cx gdsc. Instead of that, create a device_link between cx genpd device and gmu device to keep a vote from gpu driver. Before this patch: localhost ~ # cat /sys/kernel/debug/pm_genpd/pm_genpd_summary gx_gdsc on 0 /devices/genpd:1:3d6a000.gmu active 0 cx_gdsc on 0 /devices/platform/soc@0/3da0000.iommu active 0 After this patch: localhost ~ # cat /sys/kernel/debug/pm_genpd/pm_genpd_summary gx_gdsc on 0 /devices/genpd:1:3d6a000.gmu active 0 cx_gdsc on 0 /devices/platform/soc@0/3da0000.iommu active 0 /devices/genpd:0:3d6a000.gmu active 0 Signed-off-by: Akhil P Oommen Reviewed-by: Ulf Hansson Patchwork: https://patchwork.freedesktop.org/patch/516468/ Link: https://lore.kernel.org/r/20230102161757.v5.3.I7f545d8494dcdbe6e96a15fbe8aaf5bb0c003d50@changeid Signed-off-by: Rob Clark commit a2ff7f1108f6eeaa73a60378ed891b634a3bba61 Author: Siddharth Vadapalli Date: Wed Mar 15 11:53:04 2023 +0530 arm64: dts: ti: k3-j721e: Add CPSW9G nodes TI's J721E SoC has a 9 port Ethernet Switch instance with 8 external ports and 1 host port, referred to as CPSW9G. Add device-tree nodes for CPSW9G and disable it by default. Device-tree overlays will be used to enable it. Signed-off-by: Siddharth Vadapalli Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20230315062307.1612220-2-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 6cd4b7cfbcca4a45f06a8031f299c4019221a4ce Author: Siddharth Vadapalli Date: Wed Mar 15 09:55:48 2023 +0530 arm64: dts: ti: k3-j784s4-evm: Enable MCU CPSW2G Add device tree support to enable MCU CPSW with J784S4 EVM. Signed-off-by: Siddharth Vadapalli Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20230315042548.1500528-1-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit cf2aacfe5f48b8c91d148dd7a3d3814b8ae04463 Author: Bhavya Kapoor Date: Thu Mar 16 15:21:46 2023 +0530 arm64: dts: ti: k3-j721s2-common-proc-board: Add pinmux information for ADC J721s2 has two instances of 8 channel ADCs in MCU domain. Add pinmux information for both ADC nodes. Signed-off-by: Bhavya Kapoor Reviewed-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230316095146.498999-3-b-kapoor@ti.com Signed-off-by: Nishanth Menon commit 4eec5d77d330638dc8e79e25992420a78f2a3019 Author: Julien Panis Date: Mon Mar 20 11:51:23 2023 -0500 arm64: dts: ti: k3-am62: Add watchdog nodes Add nodes for watchdogs : - 5 in main domain - 1 in MCU domain - 1 in wakeup domain Signed-off-by: Julien Panis Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20230320165123.80561-3-nm@ti.com Signed-off-by: Nishanth Menon commit 0c51ceeebf04c388c06e29a2bb69855cd97f7c91 Author: Nishanth Menon Date: Mon Mar 20 11:51:22 2023 -0500 arm64: dts: ti: k3-am62-wakeup: Introduce RTC node Introduce digital RTC node in wakeup domain. Even though this has no specific battery backup supply, this on-chip RTC is used in cost-optimized board designs as a wakeup source. Reviewed-by: Dhruva Gole Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20230320165123.80561-2-nm@ti.com Signed-off-by: Nishanth Menon commit 2c5a06e5505a716387a4d86f1f39de506836435a Author: Kiran K Date: Thu Mar 16 12:47:15 2023 +0530 ACPI: utils: Fix acpi_evaluate_dsm_typed() redefinition error acpi_evaluate_dsm_typed() needs to be gaurded with CONFIG_ACPI to avoid a redefintion error when the stub is also enabled. In file included from ../drivers/bluetooth/btintel.c:13: ../include/acpi/acpi_bus.h:57:1: error: redefinition of 'acpi_evaluate_dsm_typed' 57 | acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid,.. | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from ../drivers/bluetooth/btintel.c:12: ../include/linux/acpi.h:967:34: note: previous definition of 'acpi_evaluate_dsm_typed' with type 'union acpi_object *(void *, const guid_t *, u64, u64, union acpi_object *, acpi_object_type)' {aka 'union acpi_object *(void *, const guid_t *, long long unsigned int, long long unsigned int, union acpi_object *, unsigned int)'} 967 | static inline union acpi_object *acpi_evaluate_dsm_typed(acpi_handle handle, Fixes: 1b94ad7ccc21 ("ACPI: utils: Add acpi_evaluate_dsm_typed() and acpi_check_dsm() stubs") Signed-off-by: Kiran K [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 4beba5cf9ecc099d59e6fe8a03254cd995b80123 Author: Bhavya Kapoor Date: Thu Mar 16 15:21:45 2023 +0530 arm64: dts: ti: k3-j721s2-mcu-wakeup: Add support for ADC nodes J721s2 has two instances of 8 channel ADCs in MCU domain. Add support for both ADC nodes. Signed-off-by: Bhavya Kapoor Reviewed-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230316095146.498999-2-b-kapoor@ti.com Signed-off-by: Nishanth Menon commit a43f0ac3851833302174567dadd60f58e24d0f30 Author: Jayesh Choudhary Date: Tue Mar 14 20:56:11 2023 +0530 arm64: dts: ti: k3-j784s4-main: Enable crypto accelerator Add the node for SA2UL to support hardware crypto algorithms, including SHA-1/256/512, AES, 3DES and AEAD suites. Add rng node for hardware random number generator. Signed-off-by: Jayesh Choudhary Reviewed-by: Kamlesh Gurudasani Link: https://lore.kernel.org/r/20230314152611.140969-3-j-choudhary@ti.com Signed-off-by: Nishanth Menon commit 00e34c94987e4fe866f12ad8eac17268c936880c Author: Siddharth Vadapalli Date: Tue Mar 14 14:25:00 2023 +0530 soc: ti: k3-socinfo: Add entry for J784S4 SOC J784S4 SoC's JTAG ID is 0xBB80. Signed-off-by: Siddharth Vadapalli Signed-off-by: Jayesh Choudhary Link: https://lore.kernel.org/r/20230314085500.10597-1-j-choudhary@ti.com Signed-off-by: Nishanth Menon commit f2de003e1426ccbefa281a066040da7699f6d461 Author: Nishanth Menon Date: Wed Mar 15 10:52:28 2023 -0500 dt-bindings: pinctrl: k3: Deprecate header with register constants For convenience (less code duplication), the pin controller pin configuration register values were defined in the bindings header. These are not some IDs or other abstraction layer but raw numbers used in the registers. These constants do not fit the purpose of bindings. They do not provide any abstraction, any hardware and driver independent ID. In fact, the Linux pinctrl-single driver actually do not use the bindings header at all. All of the constants were moved already to headers local to DTS (residing in DTS directory), so remove any references to the bindings header and add a warning that it is deprecated. Suggested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Acked-by: Linus Walleij Link: https://lore.kernel.org/linux-arm-kernel/71c7feff-4189-f12f-7353-bce41a61119d@linaro.org/ Link: https://lore.kernel.org/r/20230315155228.1566883-4-nm@ti.com Signed-off-by: Nishanth Menon commit fe49f2d776f7994dc60dd04712a437fd0bdc67a0 Author: Nishanth Menon Date: Wed Mar 15 10:52:27 2023 -0500 arm64: dts: ti: Use local header for pinctrl register values The DTS uses hardware register values directly in pin controller pin configuration and not an abstraction of any form. These definitions were previously put in the bindings header to avoid code duplication and to provide some context meaning (name), but they do not fit the purpose of bindings. Store the constants in a header next to DTS and use them instead of bindings. Suggested-by: Krzysztof Kozlowski Suggested-by: Linus Walleij Acked-by: Krzysztof Kozlowski Acked-by: Linus Walleij Link: https://lore.kernel.org/all/c4d53e9c-dac0-8ccc-dc86-faada324beba@linaro.org/ Link: https://lore.kernel.org/r/20230315155228.1566883-3-nm@ti.com Signed-off-by: Nishanth Menon commit c680fa2a09a9550284546d2deeb31640ec3b56c8 Author: Nishanth Menon Date: Wed Mar 15 10:52:26 2023 -0500 dt-bindings: net: ti: k3-am654-cpsw-nuss: Drop pinmux header Drop the pinmux header reference as it is not used. Examples should just show the node definition. Acked-by: Krzysztof Kozlowski Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20230315155228.1566883-2-nm@ti.com Signed-off-by: Nishanth Menon commit 22733814631983a8bed09658648f8ffc20b99f69 Author: Andrew Davis Date: Tue Mar 7 12:09:42 2023 -0600 arm64: dts: ti: k3-j721e-sk: Remove firmware-name override for R5F The firmware name for this core should stay as the default name "j7-main-r5f0_0-fw". This is expected to by a symlink to the actual firmware file. If one wants to use a different firmware they should change where the symlink points. This is usually achieved with an update-alternative or other distro specific selection mechanisms. The actual selection is policy and does not belong in DT. Remove this name override. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20230307180942.2719-1-afd@ti.com Signed-off-by: Nishanth Menon commit 438b8dc949bf45979c32553e96086ff1c6e2504e Author: Vignesh Raghavendra Date: Mon Mar 20 10:19:35 2023 +0530 arm64: dts: ti: k3-am62a7: Correct L2 cache size to 512KB Per AM62Ax SoC datasheet[0] L2 cache is 512KB. [0] https://www.ti.com/lit/gpn/am62a7 Page 1. Fixes: 5fc6b1b62639 ("arm64: dts: ti: Introduce AM62A7 family of SoCs") Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230320044935.2512288-2-vigneshr@ti.com Signed-off-by: Nishanth Menon commit 6974371cab1c488a53960945cb139b20ebb5f16b Author: Vignesh Raghavendra Date: Mon Mar 20 10:19:34 2023 +0530 arm64: dts: ti: k3-am625: Correct L2 cache size to 512KB Per AM62x SoC datasheet[0] L2 cache is 512KB. [0] https://www.ti.com/lit/gpn/am625 Page 1. Fixes: f1d17330a5be ("arm64: dts: ti: Introduce base support for AM62x SoC") Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20230320044935.2512288-1-vigneshr@ti.com Signed-off-by: Nishanth Menon commit fe6603cafabbe9c0213cfaaca24bcbb3cc6e2a51 Author: Tony Luck Date: Mon Mar 13 17:46:11 2023 -0700 ACPI: APEI: EINJ: Add CXL error types ACPI 6.5 added six new error types for CXL. See chapter 18 table 18.30. Add strings for the new types so that Linux will list them in the /sys/kernel/debug/apei/einj/available_error_types file. It seems no other changes are needed. Linux already accepts the CXL codes (on a BIOS that advertises them). Signed-off-by: Tony Luck Reviewed-by: Davidlohr Bueso Reviewed-by: Dave Jiang Signed-off-by: Rafael J. Wysocki commit e752ab11dcb48353727ea26eefd740155e028865 Merge: 1844e680d56bb 8bf6e20253b2d Author: Rob Clark Date: Mon Mar 20 10:31:25 2023 -0700 Merge remote-tracking branch 'drm/drm-next' into msm-next Merge drm-next into msm-next to pick up external clk and PM dependencies for improved a6xx GPU reset sequence. Signed-off-by: Rob Clark commit f2cba54a7fbf971d87bcd4467797c62d551401d3 Author: Simon Gaiser Date: Mon Mar 13 15:47:10 2023 +0100 ACPI: s2idle: Log when enabling wakeup IRQ fails enable_irq_wake() can fail. Previously acpi_s2idle_prepare() silently ignored it's return code. Based on [1] we should try to continue even in case of an error, so just log a warning for now. Discovered when trying to go into s2idle under Xen. This leads to a system that can't be woken, since xen-pirq currently doesn't support setting wakeup IRQs [2]. With this you get at least some helpful log message if you have access to console messages. Link: https://lore.kernel.org/linux-acpi/20230313125344.2893-1-simon@invisiblethingslab.com/ # v1 Link: https://lore.kernel.org/linux-acpi/CAJZ5v0jahjt58nP6P5+xRdtD_ndYPvq4ecMVz6nfGu9tf5iaUw@mail.gmail.com/ # [1] Link: https://lore.kernel.org/xen-devel/20230313134102.3157-1-simon@invisiblethingslab.com/ # [2] Signed-off-by: Simon Gaiser [ rjw: Adjust white space ] Signed-off-by: Rafael J. Wysocki commit 55f4f6ead46c0c5c5cd98395a4422509da063e0d Author: Rafael J. Wysocki Date: Thu Mar 2 18:49:12 2023 +0100 ACPI: docs: Update the pm_profile sysfs attribute documentation The list of possible pm_profile values listed in sysfs-acpi-pmprofile does not include the tablet one (8), so update it. While at it, rewrite the description so it is more accurate and somewhat easier to follow. Signed-off-by: Rafael J. Wysocki commit 4dea41775d951ff1f7b472a346a8ca3ae7e74455 Author: Kang Chen Date: Sun Feb 26 13:54:27 2023 +0800 ACPI: processor: Check for null return of devm_kzalloc() in fch_misc_setup() devm_kzalloc() may fail, clk_data->name might be NULL and will cause a NULL pointer dereference later. Signed-off-by: Kang Chen [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 091496e6cba32475ffa53a070d11d9a5a2f1f396 Author: Clint Taylor Date: Thu Mar 16 16:46:54 2023 -0700 drm/i915/audio: update audio keepalive clock values BSPEC has updated the cdclk audio keepalives AUD_TS_CDCLK_M value to 60 for all supported platforms and refclks. BSPEC: 54034 BSPEC: 55409 BSPEC: 65243 Cc: Kai Vehmanen Cc: Uma Shankar Cc: Ville Syrjälä Signed-off-by: Clint Taylor Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230316234654.3797572-1-clinton.a.taylor@intel.com commit f22f9aaf6c3d92ebd5ad9e67acc03afebaaeb289 Author: Paul Moore Date: Fri Mar 17 12:43:07 2023 -0400 selinux: remove the runtime disable functionality After working with the larger SELinux-based distros for several years, we're finally at a place where we can disable the SELinux runtime disable functionality. The existing kernel deprecation notice explains the functionality and why we want to remove it: The selinuxfs "disable" node allows SELinux to be disabled at runtime prior to a policy being loaded into the kernel. If disabled via this mechanism, SELinux will remain disabled until the system is rebooted. The preferred method of disabling SELinux is via the "selinux=0" boot parameter, but the selinuxfs "disable" node was created to make it easier for systems with primitive bootloaders that did not allow for easy modification of the kernel command line. Unfortunately, allowing for SELinux to be disabled at runtime makes it difficult to secure the kernel's LSM hooks using the "__ro_after_init" feature. It is that last sentence, mentioning the '__ro_after_init' hardening, which is the real motivation for this change, and if you look at the diffstat you'll see that the impact of this patch reaches across all the different LSMs, helping prevent tampering at the LSM hook level. From a SELinux perspective, it is important to note that if you continue to disable SELinux via "/etc/selinux/config" it may appear that SELinux is disabled, but it is simply in an uninitialized state. If you load a policy with `load_policy -i`, you will see SELinux come alive just as if you had loaded the policy during early-boot. It is also worth noting that the "/sys/fs/selinux/disable" file is always writable now, regardless of the Kconfig settings, but writing to the file has no effect on the system, other than to display an error on the console if a non-zero/true value is written. Finally, in the several years where we have been working on deprecating this functionality, there has only been one instance of someone mentioning any user visible breakage. In this particular case it was an individual's kernel test system, and the workaround documented in the deprecation notice ("selinux=0" on the kernel command line) resolved the issue without problem. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit a7e4676e8e2cb158a4d24123de778087955e1b36 Author: Paul Moore Date: Thu Mar 16 11:43:08 2023 -0400 selinux: remove the 'checkreqprot' functionality We originally promised that the SELinux 'checkreqprot' functionality would be removed no sooner than June 2021, and now that it is March 2023 it seems like it is a good time to do the final removal. The deprecation notice in the kernel provides plenty of detail on why 'checkreqprot' is not desirable, with the key point repeated below: This was a compatibility mechanism for legacy userspace and for the READ_IMPLIES_EXEC personality flag. However, if set to 1, it weakens security by allowing mappings to be made executable without authorization by policy. The default value of checkreqprot at boot was changed starting in Linux v4.4 to 0 (i.e. check the actual protection), and Android and Linux distributions have been explicitly writing a "0" to /sys/fs/selinux/checkreqprot during initialization for some time. Along with the official deprecation notice, we have been discussing this on-list and directly with several of the larger SELinux-based distros and everyone is happy to see this feature finally removed. In an attempt to catch all of the smaller, and DIY, Linux systems we have been writing a deprecation notice URL into the kernel log, along with a growing ssleep() penalty, when admins enabled checkreqprot at runtime or via the kernel command line. We have yet to have anyone come to us and raise an objection to the deprecation or planned removal. It is worth noting that while this patch removes the checkreqprot functionality, it leaves the user visible interfaces (kernel command line and selinuxfs file) intact, just inert. This should help prevent breakages with existing userspace tools that correctly, but unnecessarily, disable checkreqprot at boot or runtime. Admins that attempt to enable checkreqprot will be met with a removal message in the kernel log. Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit c87d175d0ae715a1cdd9a315253f3fb410fb0421 Author: Yangtao Li Date: Mon Feb 27 20:02:16 2023 +0800 quota: make dquot_set_dqinfo return errors from ->write_info dquot_set_dqinfo() ignores the return code from the ->write_info call, which means that quotacalls like Q_SETINFO never see the error. This doesn't seem right, so fix that. Signed-off-by: Yangtao Li Signed-off-by: Jan Kara Message-Id: <20230227120216.31306-2-frank.li@vivo.com> commit f8107c996f5419a5b964b9796d736c7b81f099a0 Author: Yangtao Li Date: Mon Feb 27 20:02:15 2023 +0800 quota: fixup *_write_file_info() to return proper error code For v1_write_file_info function, when quota_write() returns 0, it should be considered an EIO error. And for v2_write_file_info(), fix to proper error return code instead of raw number. Signed-off-by: Yangtao Li Signed-off-by: Jan Kara Message-Id: <20230227120216.31306-1-frank.li@vivo.com> commit bb4a6a9237293346cf1b3b7bc4ff4dfc1977a103 Author: Alexei Starovoitov Date: Sun Mar 19 13:30:14 2023 -0700 selftest/bpf: Add a test case for ld_imm64 copy logic. Add a test case to exercise {btf_id, btf_obj_fd} copy logic between ld_imm64 insns. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230319203014.55866-2-alexei.starovoitov@gmail.com commit a506d6ce1dd184051037dc9d26c3eb187c9fe625 Author: Alexei Starovoitov Date: Sun Mar 19 13:30:13 2023 -0700 libbpf: Fix ld_imm64 copy logic for ksym in light skeleton. Unlike normal libbpf the light skeleton 'loader' program is doing btf_find_by_name_kind() call at run-time to find ksym in the kernel and populate its {btf_id, btf_obj_fd} pair in ld_imm64 insn. To avoid doing the search multiple times for the same ksym it remembers the first patched ld_imm64 insn and copies {btf_id, btf_obj_fd} from it into subsequent ld_imm64 insn. Fix a bug in copying logic, since it may incorrectly clear BPF_PSEUDO_BTF_ID flag. Also replace always true if (btf_obj_fd >= 0) check with unconditional JMP_JA to clarify the code. Fixes: d995816b77eb ("libbpf: Avoid reload of imm for weak, unresolved, repeating ksym") Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230319203014.55866-1-alexei.starovoitov@gmail.com commit 19f969c0c7388a729ec209ff74590c65a1957aab Author: Leonard Göhrs Date: Fri Mar 10 10:26:50 2023 +0100 ARM: dts: stm32: Add coprocessor detach mbox on stm32mp15xx-osd32 SoM To support the detach feature, add a new mailbox channel to inform the remote processor on a detach. This signal allows the remote processor firmware to stop IPC communication and to reinitialize the resources for a re-attach. See 6257dfc1c412dcdbd76ca5fa92c8444222dbe5b0 for a patch that does the same for stm32mp15x-dkx boards. Signed-off-by: Leonard Göhrs Reviewed-by: Ahmad Fatoum Signed-off-by: Alexandre Torgue commit ec9640f77d199c4ed78d7a00fbbaf78773c38d9d Author: Ian Rogers Date: Sun Mar 19 20:37:53 2023 -0700 perf symbol: Sort names under write lock If finding a name doesn't find the sorted names then they are allocated and sorted. This shouldn't be done under a read lock as another reader may access it. Release the read lock and acquire the write lock, then release the write lock and reacquire the read lock. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: André Almeida Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230320033810.980165-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 82c6d83bc1779cc306f78083fc79dc7ec7d9b18d Author: Ian Rogers Date: Sun Mar 19 20:37:52 2023 -0700 perf test: Fix memory leak in symbols machine__delete() doesn't delete threads. Add call to delete threads ahead of deleting the machine. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: André Almeida Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230320033810.980165-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 9bb5e1f682d8391b7e9918b12d22af9492b74dad Author: Ian Rogers Date: Sun Mar 19 20:37:51 2023 -0700 perf tests: Add common error route for code-reading A later change will enforce that the map is put on this path regardless of success or error. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: André Almeida Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230320033810.980165-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 39b5e434fb3f06fae44c8a2df87eca036f9f9b5c Author: Ian Rogers Date: Sun Mar 19 20:37:50 2023 -0700 perf bpf_counter: Use public cpumap accessors Avoid the use of internal apis via the cpumap accessor functions. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: André Almeida Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230320033810.980165-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit c9602aa0469e19a84f9552a146ef87ec5dc7d576 Author: Ian Rogers Date: Sun Mar 19 20:37:49 2023 -0700 perf symbol: Avoid memory leak from abi::__cxa_demangle Rather than allocate memory, allow abi::__cxa_demangle to do that. This avoids a problem where on error NULL was returned triggering a memory leak. Fixes: 3b4e4efe88f615f1 ("perf symbol: Add abi::__cxa_demangle C++ demangling support") Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Andrew Morton Cc: André Almeida Cc: Andy Shevchenko Cc: Darren Hart Cc: Davidlohr Bueso Cc: Dmitriy Vyukov Cc: Eric Dumazet Cc: German Gomez Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miaoqian Lin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Riccardo Mancini Cc: Shunsuke Nakamura Cc: Song Liu Cc: Stephane Eranian Cc: Stephen Brennan Cc: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Thomas Richter Cc: Yury Norov Link: https://lore.kernel.org/r/20230320033810.980165-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 82e441398238875db698249a1f937f2774d01d6f Author: Feiyang Chen Date: Sat Mar 4 15:29:55 2023 +0100 selftests/nolibc: Adjust indentation for Makefile Reindent only, no functional changes. Signed-off-by: Feiyang Chen Acked-by: Huacai Chen Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 6cd77defa7fee4a8fe8c89e1a8a0139458f9358b Author: Feiyang Chen Date: Sat Mar 4 15:29:54 2023 +0100 selftests/nolibc: Add support for LoongArch Add support for LoongArch (64 bit) to nolibc selftest. Signed-off-by: Feiyang Chen Acked-by: Huacai Chen Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 73f12c6da77a7c25cf0a8f1a3c282db2a1e2bd93 Author: Feiyang Chen Date: Sat Mar 4 15:29:53 2023 +0100 tools/nolibc: Add support for LoongArch Add support for LoongArch (32 and 64 bit) to nolibc. Signed-off-by: Feiyang Chen Acked-by: Huacai Chen Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit b551cb7dc347d0d142f4b65b5fa0d052e09e559a Author: Feiyang Chen Date: Sat Mar 4 15:28:44 2023 +0100 tools/nolibc: Add statx() and make stat() rely on statx() if necessary LoongArch and RISC-V 32-bit only have statx(). ARC, Hexagon, Nios2 and OpenRISC have statx() and stat64() but not stat() or newstat(). Add statx() and make stat() rely on statx() if necessary to make them happy. We may just use statx() for all architectures in the future. Signed-off-by: Feiyang Chen Acked-by: Huacai Chen Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit a438e528b68fe81c10833538bd454e9f59d092a2 Author: Feiyang Chen Date: Sat Mar 4 15:28:43 2023 +0100 tools/nolibc: Include linux/fcntl.h and remove duplicate code Include linux/fcntl.h for O_* and AT_*. asm/fcntl.h is included by linux/fcntl.h, so it can be safely removed. Signed-off-by: Feiyang Chen Acked-by: Huacai Chen Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 1c3a4c10cc3b89d9cfb1efa2e251c29da1941ee7 Author: Willy Tarreau Date: Sat Mar 4 15:28:42 2023 +0100 tools/nolibc: check for S_I* macros before defining them Defining S_I* flags in types.h can cause some build failures if linux/stat.h is included prior to it. But if not defined, some toolchains that include some glibc parts will in turn fail because linux/stat.h already takes care of avoiding these definitions when glibc is present. Let's preserve the macros here but first include linux/stat.h and check for their definition before doing so. We also define the previously missing permission macros so that we don't get a different behavior depending on the first include found. Cc: Feiyang Chen Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 3e2d337b94688b159e2f014248eb9cb6e0d494b5 Author: Willy Tarreau Date: Sat Mar 4 15:28:41 2023 +0100 selftests/nolibc: skip the chroot_root and link_dir tests when not privileged These two tests always fail when the program is started natively as an unprivileged user, and require the user to carefully check the output of "make run-user" and ignore them. Let's add an euid check and condition these two tests to euid==0. Now the test case stops needlessly reporting failures. E.g.: $ make -C tools/testing/selftests/nolibc run-user ... CC nolibc-test 123 test(s) passed. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 919d0532d48ca1bea62bc04f269b9e72706467c6 Author: Willy Tarreau Date: Sat Mar 4 15:28:40 2023 +0100 tools/nolibc: add getuid() and geteuid() This can be useful to avoid attempting some privileged operations, starting from the nolibc-test tool that gets two failures when not privileged. We call getuid32() and geteuid32() when they are defined, and fall back to getuid() and geteuid() otherwise. Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit d1209597ff00b6a3c80e37089f7139d0774034bd Author: Vincent Dagonneau Date: Sat Mar 4 15:26:06 2023 +0100 tools/nolibc: add tests for the integer limits in stdint.h This commit adds tests for the limits added in a previous commit. The limits are defined in decimal in stdint.h and as hexadecimal in the tests (e.g. 0x7f = 127 or 0x80 = -128). Hopefully it catches some of the most egregious mistakes. As we rely on the compiler to provide __SIZEOF_LONG__, we also test whether it is defined. Signed-off-by: Vincent Dagonneau Reviewed-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit a0994fb98d70f99a0f93feb44d1401071381c056 Author: Vincent Dagonneau Date: Sat Mar 4 15:26:05 2023 +0100 tools/nolibc: enlarge column width of tests This commit enlarges the column width from 40 to 64 characters to make room for longer tests Signed-off-by: Vincent Dagonneau Reviewed-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 3e9fd4e9a1d5c054b6da6158632dca69d1d7aecc Author: Vincent Dagonneau Date: Sat Mar 4 15:26:04 2023 +0100 tools/nolibc: add integer types and integer limit macros This commit adds some of the missing integer types to stdint.h and adds limit macros (e.g. INTN_{MIN,MAX}). The reference used for adding these types is https://pubs.opengroup.org/onlinepubs/009695399/basedefs/stdint.h.html. We rely on the compiler-defined __LONG_MAX__ to get the right limits for size_t, intptr_t, uintptr_t and ptrdiff_t. This compiler constant seem to have been defined at least since GCC 4.1.2 and clang 3.0.0 on x86_64. It is also defined on ARM (32&64), mips and RISC-V. Note that the maximum size of size_t is implementation-defined (>65535), in this case I chose to go with unsigned long on all platforms since unsigned long == unsigned int on all the platforms we care about. Note that the kernel uses either unsigned int or unsigned long in linux/include/uapi/asm-generic/posix_types.h. These should be equivalent for the plaforms we are targeting. Also note that the 'fast*' flavor of the types have been chosen to be always 1 byte for '*fast8*' and always long (a.k.a. intptr_t/uintptr_t) for the other variants. I have never seen the 'fast*' types in use in the wild but that seems to be what glibc does. Signed-off-by: Vincent Dagonneau Reviewed-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit c34da317e0466815d7f43cbd81b3380a11a45b52 Author: Vincent Dagonneau Date: Sat Mar 4 15:26:03 2023 +0100 tools/nolibc: add stdint.h Nolibc works fine for small and limited program however most program expect integer types to be defined in stdint.h rather than std.h. This is a quick fix that moves the existing integer definitions in std.h to stdint.h. Signed-off-by: Vincent Dagonneau Reviewed-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit d548e9ae07162e2904b72345a60a9e3e7df4709e Author: Paul E. McKenney Date: Mon Jan 23 16:42:14 2023 -0800 tools/nolibc: Add gitignore to avoid git complaints about sysroot Testing of nolibc can produce a tools/include/nolibc/sysroot file, which is not known to git. Because it is automatically generated, there is no reason for it to be known to git. Therefore, add a .gitignore to remove it from git's field of view. Signed-off-by: Paul E. McKenney Cc: Willy Tarreau Cc: Ammar Faizi Cc: Sven Schnelle commit 077b70fb467c549bdedc84a58137ec91e885aa66 Author: Thomas Weißschuh Date: Sun Mar 19 14:51:00 2023 +0100 tools/nolibc: always disable stack protector for tests Stack protectors need support from libc. This support is not provided by nolibc which leads to compiler errors when stack protectors are enabled by default in a compiler: CC nolibc-test /usr/bin/ld: /tmp/ccqbHEPk.o: in function `stat': nolibc-test.c:(.text+0x1d1): undefined reference to `__stack_chk_fail' /usr/bin/ld: /tmp/ccqbHEPk.o: in function `poll.constprop.0': nolibc-test.c:(.text+0x37b): undefined reference to `__stack_chk_fail' /usr/bin/ld: /tmp/ccqbHEPk.o: in function `vfprintf.constprop.0': nolibc-test.c:(.text+0x712): undefined reference to `__stack_chk_fail' /usr/bin/ld: /tmp/ccqbHEPk.o: in function `pad_spc.constprop.0': nolibc-test.c:(.text+0x80d): undefined reference to `__stack_chk_fail' /usr/bin/ld: /tmp/ccqbHEPk.o: in function `printf': nolibc-test.c:(.text+0x8c4): undefined reference to `__stack_chk_fail' /usr/bin/ld: /tmp/ccqbHEPk.o:nolibc-test.c:(.text+0x12d4): more undefined references to `__stack_chk_fail' follow collect2: error: ld returned 1 exit status Signed-off-by: Thomas Weißschuh Signed-off-by: Willy Tarreau Signed-off-by: Paul E. McKenney commit 75b445753047872a69709cfba7e3939660f0ecc1 Author: Ofir Bitton Date: Thu Mar 16 17:24:45 2023 +0200 accel/habanalabs: remove redundant TODOs As mmu refactor and nic resume are not relevant anymore, remove their TODO comments. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit ec48493183b7cefb3f710d5e46897823a6988108 Author: Dani Liberman Date: Thu Mar 16 15:03:12 2023 +0200 accel/habanalabs: change razwi handle after fw fix FW had one data route for tpc0 and tpc1 when running in secured mode and a different one when running without secured mode. After fw fixed this issue, both mode have the same data path. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e1ef053e08c9b56c0de0635beea75466e97a7383 Author: Ofir Bitton Date: Wed Mar 8 13:34:52 2023 +0200 accel/habanalabs: add handling for unexpected user event In order for the user to be aware of unexpected events in Gaudi2 that aren't assigned to a specific engine, we are adding the handling of this dedicated interrupt. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 7cd6b5625b35267d0a69f067c41e2adf0c903eb2 Author: Tomer Tayar Date: Wed Mar 15 13:13:54 2023 +0200 accel/habanalabs: fix a missing-braces compilation warning Replace initialization of "struct cpucp_packet" from "{0} to "{}" to avoid a "missing braces around initializer" compilation warning. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit dc934c183d43d30e49eacddc76b9882a7e3c1cde Author: Tomer Tayar Date: Wed Mar 15 11:46:18 2023 +0200 accel/habanalabs: fix a maybe-uninitialized compilation warnings Initialize 'index' in gaudi2_handle_qman_err() and 'offset' in gaudi2_get_nic_idle_status() to avoid "maybe-uninitialized" compilation warnings. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 9669b96f275b4706aa6d9e46479c81983595f0ee Author: Dani Liberman Date: Wed Mar 15 10:00:58 2023 +0200 accel/habanalabs: fix page fault event clear After getting page fault in gaudi2, we need to clear the valid bit instead of the address. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 958e47977bd12e06752a559541867028b120de76 Author: Ofir Bitton Date: Mon Mar 13 22:30:23 2023 +0200 accel/habanalabs: expose rotator mask to userspace All engine masks are exposed to user, make sure user gets the correct rotator enabled mask in gaudi2. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 481e9a0fda5cf38b795d473058cb8c77d9d1dc5c Author: Ohad Sharabi Date: Mon Mar 13 10:56:59 2023 +0200 accel/habanalabs: regenerate gaudi2 ids_map_extended Some names of events has been modified/added. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6d179f84f274a87da51f24ac3e9427221bbaed51 Author: Bagas Sanjaya Date: Tue Mar 7 11:35:26 2023 +0700 accel: Link to compute accelerator subsystem intro Commit 2c204f3d53218d ("accel: add dedicated minor for accelerator devices") adds link to accelerator nodes section of DRM internals doc (Documentation/gpu/drm-internals.rst), but the target doesn't exist. Instead, there is only an introduction doc for computer accelerator subsytem. Link to that doc until there is documentation of accelerator internals. Fixes: 2c204f3d53218d ("accel: add dedicated minor for accelerator devices") Signed-off-by: Bagas Sanjaya Reviewed-by: Jeffrey Hugo Signed-off-by: Oded Gabbay commit 76e1ff37b6872c9f2d11660258fc8c88b2f97b06 Author: Ofir Bitton Date: Mon Mar 13 17:10:28 2023 +0200 accel/habanalabs: expose dram reserved size by kmd We expose this in order for user applications to know how much dram is reserved for internal use. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 0e418ab71829238135756dde3d63952e80821b43 Author: Tomer Tayar Date: Sun Mar 12 17:15:03 2023 +0200 accel/habanalabs: remove '\n' when passing strings to gaudi2_print_event() Remove all '\n' from strings which are passed as arguments to gaudi2_print_event(), because the newline character is added internally in this function. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit af5e675f130132c05e6e279bb27d6eb3affe117e Author: Koby Elbaz Date: Tue Mar 7 10:13:44 2023 +0200 accel/habanalabs: return tlb inv error code upon failure Now that CQ-completion based jobs do not trigger a reset upon failure, failure of such jobs (e.g., MMU cache invalidation) should be handled by the caller itself depending on the error code returned to it. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 60d7bbb5b4b875d613a43e3be797ddd4ff92cb7b Author: Oded Gabbay Date: Thu Mar 16 12:13:34 2023 +0200 accel/habanalabs: fix field names in hl_info_hw_ip_info Don't use padX for actual reservedX fields. Signed-off-by: Oded Gabbay Reviewed-by: Ofir Bitton commit 5d8a5f29658716348c625836a6bfdad6929db224 Author: Dafna Hirschfeld Date: Thu Mar 9 11:27:26 2023 +0200 accel/habanalabs: in {e/p}dma_core events read the err cause reg Since the err_cause register is unprivileged, we should read it from the driver instead of using the param that came from the FW. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f8d139a71b430938f0cc9c0ed026830ca7706446 Author: Dafna Hirschfeld Date: Wed Mar 8 13:22:17 2023 +0200 accel/habanalabs: fix use of var reset_sleep_ms - remove reset_sleep_ms arg from functions that don't use it. - move the call msleep(reset_sleep_ms) from btm poll to gaudi2_hw_fini as it is called from there already for other flow. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 077a39fabefaef12c802b7b32facb831dd33ea92 Author: Dafna Hirschfeld Date: Mon Feb 20 10:09:25 2023 +0200 accel/habanalabs: in hw_fini return error code if polling timed-out In hw_fini callback, we use either the cpucp packet method or polling a register. Currently we return error only in the case of cpucp packet failure. In this patch we also return error if polling timed out. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 8c695455ee2e834b8fa5c588a46eb204938e7052 Author: Ofir Bitton Date: Wed Mar 8 15:04:45 2023 +0200 accel/habanalabs: increase reset poll timeout Due to a firmware bug we need to increase reset poll timeout or else we will timeout in secured environments. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 7c766e58cc14aad4db5b840f2d5c8dbbe7c8a235 Author: Koby Elbaz Date: Mon Mar 6 16:43:41 2023 +0200 accel/habanalabs: do not verify engine modes after being changed Engines idle state can't always be verified between changes of engine modes (e.g., stall/halt). For example, if a CS is inflight when altering engine's mode, idle state will return NOT idle, always. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 336b78c655c84ce9ce47219185171b3912109c0a Author: Oded Gabbay Date: Mon Mar 6 12:34:10 2023 +0200 accel/habanalabs: align to latest firmware specs Copy the most up-to-date interface files to the firmware. Signed-off-by: Oded Gabbay Reviewed-by: Ofir Bitton commit 443355d2ffa595b97e418b6c7df5d237e2e61e73 Author: Colin Ian King Date: Tue Mar 14 08:18:12 2023 +0000 accel/habanalabs: Fix spelling mistake "maped" -> "mapped" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 71937240a472ee551ac8de0e7429b9d49884a388 Author: Sakari Ailus Date: Thu Mar 16 11:21:49 2023 +0100 media: ov2685: Select VIDEO_V4L2_SUBDEV_API VIDEO_V4L2_SUBDEV_API is required for v4l2_subdev_get_pad_*() functions. Select it. Fixes: ("media: i2c: ov2685: Add .get_selection() support") Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2653fad0d8a9625667e9a78133ea9e1245b7c40c Author: Neil Armstrong Date: Wed Mar 8 14:27:31 2023 +0100 media: dt-bindings: media: convert meson-ir.txt to dt-schema Convert the Amlogic Meson IR remote control receiver bindings to dt-schema. Take in account the used variant with amlogic,meson-gx-ir. Reviewed-by: Martin Blumenstingl Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 79c164372e991203d58db4e880f69e635f858ce6 Author: Oded Gabbay Date: Wed Mar 8 14:57:32 2023 +0200 accel/habanalabs: make gaudi2_is_device_idle() static This function is only called inside gaudi2.c file. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303071320.X5ouBlNY-lkp@intel.com/ Signed-off-by: Oded Gabbay Reviewed-by: Ofir Bitton commit 52eee3b96481ca76f985e1f4d87a183a96decca7 Author: Shravan Chippa Date: Wed Mar 1 08:34:11 2023 +0100 media: dt-bindings: media: i2c: imx334 add new link_freq Add new supported link frequency in dt example. Acked-by: Krzysztof Kozlowski Suggested-by: Sakari Ailus Signed-off-by: Shravan Chippa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7462df589954c978b01dd515bf20d05132969988 Author: Shravan Chippa Date: Wed Mar 1 08:34:10 2023 +0100 media: i2c: imx334: support lower bandwidth mode Some platforms may not be capable of supporting the bandwidth required for 12 bit or 3840x2160@60 resolutions. Add support for dynamically selecting 10 bit and 1920x1080@30 resolutions while leaving the existing configuration as default. Reviewed-by: Jacopo Mondi CC: Conor Dooley Signed-off-by: Prakash Battu Signed-off-by: Shravan Chippa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5ca5515ab16ab12c4194101d91c4c3c3cf179528 Author: Shravan Chippa Date: Wed Mar 1 08:34:09 2023 +0100 media: i2c: imx334: add missing reset values for mode 3840x2160_regs[] There are some missing reset reg_mode values for the 3840x2160@60 resolution. The camera sensor still works in 3840x2160@60 resolution mode because of the register reset values. This is an issue when we change the modes dynamically. As an example, when we change the mode from 1920x1080@30 resolution to 3840x2160@60 resoultion then the mode values will be written to the registers from the array mode_3840x2160_regs[] which gives the wrong output which is incorrect resolution. So add the missing reset values to the mode_3840x2160_regs[]. Reviewed-by: Jacopo Mondi Signed-off-by: Shravan Chippa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d6e34091ad77e738abd20ea11079bfecdd5c6f7d Author: Shravan Chippa Date: Wed Mar 1 08:34:08 2023 +0100 media: i2c: imx334: replace __v4l2_ctrl_s_ctrl to __v4l2_ctrl_modify_range For every mode we will get new set of values for hbalnk so use __v4l2_ctrl_modify_range() to support multi modes for hblank. The hblank value is readonly in the driver. because of this the function returns error if we try to change. so added dumy return case in imx334_set_ctrl function. Reviewed-by: Jacopo Mondi Suggested-by: Jacopo Mondi Signed-off-by: Shravan Chippa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7370f639bbc733864e152ead3f26257f55b14ef4 Author: Miaoqian Lin Date: Thu Dec 22 12:56:37 2022 +0100 media: v4l2-ctrls: Fix doc for v4l2_ctrl_request_hdl_find We should call v4l2_ctrl_request_hdl_put() instead of v4l2_ctrl_request_put_hdl(). Fix the typo. Signed-off-by: Miaoqian Lin Reviewed-by: Nicolas Dufresne Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 55cdf8c9defe76510e0954e5d3f3620abf48c963 Author: Krzysztof Kozlowski Date: Tue Dec 27 15:41:02 2022 +0100 media: dt-bindings: qcom,venus: document firmware-name Venus Linux driver loads firmware based on firmware-name property and some DTS already have it: msm8996-oneplus3.dtb: video-codec@c00000: Unevaluated properties are not allowed ('firmware-name', 'interconnect-names', 'interconnects' were unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a9dd982c60f31aace7b315d549089d9f1c53c474 Author: Krzysztof Kozlowski Date: Tue Dec 27 15:41:01 2022 +0100 media: dt-bindings: qcom,sm8250-venus: document OPP table Venus on Qualcomm SM8250 uses Operating Performance Points (both in DTS and driver): sm8250-hdk.dtb: video-codec@aa00000: 'operating-points-v2', 'opp-table' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ee7d23f5589f7c23a16618af35a8a547f679e383 Author: Krzysztof Kozlowski Date: Tue Dec 27 15:41:00 2022 +0100 media: dt-bindings: qcom,sdm845-venus-v2: document OPP table Venus on Qualcomm SDM845 uses Operating Performance Points (in Linux driver). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3f7a5818a60fe166d400d39038718b5b9a4cfef8 Author: Krzysztof Kozlowski Date: Tue Dec 27 15:40:59 2022 +0100 media: dt-bindings: qcom,sc7280-venus: document OPP table Venus on Qualcomm SC7280 uses Operating Performance Points (both in DTS and driver): sc7280-crd-r3.dtb: video-codec@aa00000: Unevaluated properties are not allowed ('operating-points-v2', 'opp-table' were unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9457d55ece55d6f4b4488a93a6970415e102d459 Author: Krzysztof Kozlowski Date: Tue Dec 27 15:40:58 2022 +0100 media: dt-bindings: qcom,sc7180-venus: document OPP table Venus on Qualcomm SC7180 uses Operating Performance Points (both in DTS and driver): sc7180-idp.dtb: video-codec@aa00000: Unevaluated properties are not allowed ('operating-points-v2', 'opp-table' were unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3ef86da7e24db3da914e6e3cbca8303b390d1042 Author: Krzysztof Kozlowski Date: Tue Dec 27 15:40:57 2022 +0100 media: dt-bindings: qcom,msm8996-venus: document interconnects Venus on Qualcomm MSM8996 defines interconnects: apq8096-db820c.dtb: video-codec@c00000: Unevaluated properties are not allowed ('interconnect-names', 'interconnects' were unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f8cc21d454c50157a528c900b60aa9588b4066b3 Author: Krzysztof Kozlowski Date: Tue Dec 27 15:40:56 2022 +0100 media: dt-bindings: qcom,venus: split common properties All Qualcomm SoC Venus bindings share a lot of properties, so split common part to re-usable schema to reduce the duplication and promote unified style. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit af2270e043ce3460770bedae1e54cd6c1cee5cb6 Author: Krzysztof Kozlowski Date: Tue Dec 27 15:40:55 2022 +0100 media: dt-bindings: qcom,venus: cleanup Cleanup the Qualcomm SoC Venus bindings: - Drop unneeded blank lines and quotes, - Fix indentation in example to 4-space (to match DT schema bindings style), - Add SoC name in each title. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit bfce6a12e5ba1edde95126aa06778027f16115d4 Author: Laurent Pinchart Date: Sat Jan 14 22:46:50 2023 +0100 media: max9286: Free control handler The control handler is leaked in some probe-time error paths, as well as in the remove path. Fix it. Fixes: 66d8c9d2422d ("media: i2c: Add MAX9286 driver") Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1968808dd1e891c63dcc4fb5b86874bc94421b6d Author: Robert Mader Date: Wed Jan 4 13:23:37 2023 +0100 media: i2c: imx258: Parse and register properties Analogous to e.g. the imx219. This enables propagating V4L2_CID_CAMERA_ORIENTATION and V4L2_CID_CAMERA_SENSOR_ROTATION values. The motivation is to allow libcamera detect these values from the device tree and propagate them further to e.g. Pipewire. While at it, reserve space for 3 additional controls even if v4l2_ctrl_new_fwnode_properties() can only register 2 of them, to fix the existing implementation which reserve space for 8 controls but actually registers 9. [Sakari Ailus: Rewrapped the commit message and removed changelog] Signed-off-by: Robert Mader Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 48c33c656c4a84ee81348bfd9f7f0e56df9fd50f Author: Bingbu Cao Date: Thu Jan 5 12:02:49 2023 +0100 media: ov13b10: remove streaming mode set from reg_list It is not expected that trying to set the sensor to streaming mode when trying to set initial sensor configuration. Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1af2f618acc1486e3b46cb54cb4891d47bb80c61 Author: Arec Kao Date: Tue Mar 14 13:14:36 2023 +0100 media: ov13b10: Support device probe in non-zero ACPI D state Tell ACPI device PM code that the driver supports the device being in non-zero ACPI D state when the driver's probe function is entered. Also do identification on the first access of the device, whether in probe or when starting streaming. Signed-off-by: Arec Kao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 859128ab6f0fc5aee59f6c4c839439cd86a9feaa Author: Luca Weiss Date: Wed Feb 1 18:07:01 2023 +0100 media: i2c: ov2685: Add .get_selection() support Add support for the .get_selection() pad operation to the ov2685 sensor driver. Report the native sensor size (pixel array), the crop bounds (readable pixel array area) and the current and default analog crop rectangles. Reviewed-by: Jacopo Mondi Signed-off-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 36cc66b08211ed667d5b0ca7815c4cf3870e7540 Author: Luca Weiss Date: Wed Feb 1 18:07:00 2023 +0100 media: i2c: ov2685: Add controls from fwnode Add V4L2_CID_CAMERA_ORIENTATION and V4L2_CID_CAMERA_SENSOR_ROTATION controls to the ov2685 driver by attempting to parse them from firmware. Signed-off-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 74b506cb4fa7bffb18c51837c237bbb0758ecc5e Author: Luca Weiss Date: Wed Feb 1 18:06:59 2023 +0100 media: i2c: ov2685: Add print for power on write failed If the sensor doens't power up correctly, for example due to incorrect devicetree description, the power up i2c writes will fail. Add an error print for this situation. Reviewed-by: Jacopo Mondi Signed-off-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ef586f262c1c86c3a1a649a6419dc2e0ac1136d1 Author: Laurent Pinchart Date: Mon Feb 6 23:47:02 2023 +0100 media: i2c: imx296: Use v4l2_subdev_get_fmt() The imx296 driver uses the subdev active state, there's no need to implement the .get_fmt() operation manually. Use the v4l2_subdev_get_fmt() helper instead. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e004c637fb1d4b975d476f800675ec18c9502cc9 Author: Jacopo Mondi Date: Thu Feb 9 21:12:35 2023 +0100 media: i2c: ov5670: Properly handle !CONFIG_HAVE_CLK The ov5670 driver tries to get a reference to the xvclk provider by using the common cock framework and deflects to parsing the "clock-frequency" property in case the clock provider is not specified in the firmware interface, detected by checking if ov5670->xvclk == PTR_ERR(-ENOENT). However, as reported by the Smatch static checker, if CONFIG_HAVE_CLK is not enabled, devm_clk_get() returns 0 which when passed to PTR_ERR() means success causing the driver to fail without propagating any error code up. Explicitly handle the case where ov5670->xvclk it set to NULL, forcing the code to parse the "clock-frequency" property in case CONFIG_HAVE_CLK is not enabled, as suggested by Dan Carpenter. Reported-by: Dan Carpenter Suggested-by: Dan Carpenter Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit bdcf6267b851471865cbd5938442ed7c76bf1bf9 Author: Krzysztof Kozlowski Date: Sat Feb 11 13:45:40 2023 +0100 media: dt-bindings: st,stm32-cec: drop obsolete file The st,stm32-cec.yaml was moved to media/cec directory, however the "remove" part disappeared during applying. Link: https://lore.kernel.org/all/20221208103115.25512-3-krzysztof.kozlowski@linaro.org/ Fixes: 8f43766211af ("media: dt-bindings: st,stm32-cec: move to cec subfolder") Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a97b24febd1f3acbd3bebfe7230e679a769efafe Author: Luca Weiss Date: Fri Feb 10 21:33:18 2023 +0100 media: i2c: ov5670: Support single-lane operation Currently the driver always configures the sensor for dual-lane MIPI output, but it also supports single-lane output. Add support for that by checking the data-lanes fwnode property how many lanes are used and configure the necessary registers based on that. To achieve this we move setting register 0x3018 out of the general reg sequence so we set it to the correct value. The pixel_rate value also needs to be adjusted. [Sakari Ailus: Use div_s64 to divide a 64-bit number] Signed-off-by: Luca Weiss Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 419405c92299d793b95053aa54d95e2d3f45a1a4 Author: Johan Hovold Date: Mon Mar 6 08:56:49 2023 +0100 interconnect: drop racy registration API Now that all interconnect drivers have been converted to the new provider registration API, the old racy interface can be removed. Reviewed-by: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20230306075651.2449-22-johan+linaro@kernel.org Signed-off-by: Georgi Djakov commit 213913ff2b89ab5ba76aceba24198b217e8e325c Author: Rob Herring Date: Fri Mar 10 08:47:08 2023 -0600 interconnect: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144709.1542841-1-robh@kernel.org Signed-off-by: Georgi Djakov commit f730038fe6a6de170268fd779b2c029aa70a928b Author: Dmitry Baryshkov Date: Tue Jan 3 05:11:59 2023 +0200 interconnect: qcom: osm-l3: drop unuserd header inclusion The commit 4529992c9474 ("interconnect: qcom: osm-l3: Use platform-independent node ids") made osm-l3 driver use platform-independent IDs, removing the need to include platform headers. Fixes: 4529992c9474 ("interconnect: qcom: osm-l3: Use platform-independent node ids") Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230103031159.1060075-1-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit 4c4161b4c81b632fc29002c324e996cbb79894e7 Author: Dmitry Baryshkov Date: Tue Jan 3 06:57:17 2023 +0200 interconnect: qcom: drop obsolete OSM_L3/EPSS defines Since Qualcomm platforms have switched to the separate OSM_L3/EPSS driver, old related defines became unused. Drop them now. Suggested-by: Bjorn Andersson Fixes: 4529992c9474 ("interconnect: qcom: osm-l3: Use platform-independent node ids") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230103045717.1079067-1-dmitry.baryshkov@linaro.org Signed-off-by: Georgi Djakov commit 558ea12354882bb8250be8ea09a6658af3f7d912 Author: Vivek Aknurwar Date: Fri Jan 13 14:07:59 2023 -0800 interconnect: Skip call into provider if initial bw is zero Currently framework sets bw even when init bw requirements are zero during provider registration, thus resulting bulk of set bw to hw. Avoid this behaviour by skipping provider set bw calls if init bw is zero. Signed-off-by: Vivek Aknurwar Link: https://lore.kernel.org/r/1673647679-15216-1-git-send-email-quic_viveka@quicinc.com Signed-off-by: Georgi Djakov commit 4658842abce4bebb0a0caef53f9c99f0ec4e27e3 Author: Jean Delvare Date: Thu Feb 9 10:13:10 2023 +0100 interconnect: qcom: Drop obsolete dependency on COMPILE_TEST Since commit 0166dc11be91 ("of: make CONFIG_OF user selectable"), it is possible to test-build any driver which depends on OF on any architecture by explicitly selecting OF. Therefore depending on COMPILE_TEST as an alternative is no longer needed. Signed-off-by: Jean Delvare Cc: Andy Gross Cc: Bjorn Andersson Cc: Konrad Dybcio Cc: Georgi Djakov Link: https://lore.kernel.org/r/20230209101310.11942cd0@endymion.delvare Signed-off-by: Georgi Djakov commit fda1941b8eab786112afe91088fa0a1ed4880360 Author: Lukas Bulwahn Date: Mon Mar 20 13:32:02 2023 +0100 m68k: Remove obsolete config NO_KERNEL_MSG The use of the config NO_KERNEL_MSG is long gone. Remove this config from m68k's debug kernel configuration setup. Signed-off-by: Lukas Bulwahn Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230320123202.14474-1-lukas.bulwahn@gmail.com Signed-off-by: Geert Uytterhoeven commit 7f400a1dc29f3ed6cb0fe0e58f706b6933f72625 Author: Uwe Kleine-König Date: Mon Mar 13 19:08:48 2023 +0100 nubus: Drop noop match function nubus_bus_match() returned 1 unconditionally. This is equivalent to no match function at all. (See driver_match_device() which does: return drv->bus->match ? drv->bus->match(dev, drv) : 1; .) Signed-off-by: Uwe Kleine-König Acked-by: Finn Thain Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230313180848.2770504-1-u.kleine-koenig@pengutronix.de Signed-off-by: Geert Uytterhoeven commit 4ed6627b0c4d6d6ddf21f0b5ae15ec073cd7d69e Author: Luca Weiss Date: Fri Feb 10 21:33:17 2023 +0100 media: i2c: ov5670: Use dev_err_probe in probe function Replace the unusual const char *err_msg usage with dev_err_probe which also handles -EPROBE_DEFER better by not printing the message to kmsg. Signed-off-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 30cbaa02f7a6e9a6982081fd27e02c37828aaea7 Author: Krzysztof Kozlowski Date: Mon Mar 13 15:49:16 2023 +0100 media: dt-bindings: samsung,s5c73m3: convert to dtschema Convert the Samsung S5C73M3 8Mp camera ISP bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 464c257258c602850765074c69838f775368fec7 Author: Krzysztof Kozlowski Date: Mon Mar 13 15:49:15 2023 +0100 media: dt-bindings: samsung,fimc: convert to dtschema Convert the Samsung S5P/Exynos Camera Subsystem (FIMC) bindings to DT schema. Changes during conversion - adjust to existing DTS and Linux driver: add iommus and power-domains. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9f7d8d88d552f225f6dcdadff6c0026fafdcdd88 Author: Krzysztof Kozlowski Date: Mon Mar 13 15:49:14 2023 +0100 media: dt-bindings: samsung,exynos4212-is: convert to dtschema Convert the Samsung Exynos4212/4412 SoC Imaging Subsystem (FIMC-IS) bindings to DT schema. Changes during conversion - adjust to existing DTS and Linux driver: add iommus and power-domains. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit dce26f261c5bc61c62bf8121209bb134302b1844 Author: Krzysztof Kozlowski Date: Mon Mar 13 15:49:13 2023 +0100 media: dt-bindings: samsung,exynos4212-fimc-lite: convert to dtschema Convert the Samsung Exynos SoC series camera host interface (FIMC-LITE) bindings to DT schema. Changes during conversion - adjust to existing DTS and Linux driver: add iommus and power-domains. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 67b8786a006083cb6060533c33b8d9aba3972b43 Author: Krzysztof Kozlowski Date: Mon Mar 13 15:49:12 2023 +0100 media: dt-bindings: samsung,exynos4210-csis: convert to dtschema Convert the Samsung S5P/Exynos SoC series MIPI CSI-2 receiver (MIPI CSIS) bindings to DT schema. Changes during conversion - adjust to existing DTS and Linux driver: 1. Add phys and power-domains. 2. Move samsung,csis-wclk property to the endpoint node. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9bc4bc77862b25bfb224f94a22c184dc13a34285 Author: Krzysztof Kozlowski Date: Mon Mar 13 15:49:11 2023 +0100 media: dt-bindings: i2c: samsung,s5k5baf: convert to dtschema Convert the Samsung S5K5BAF image sensor bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9cbe7765b5ab0ad38abff8a8677af65325db86a9 Author: Krzysztof Kozlowski Date: Mon Mar 13 15:49:10 2023 +0100 media: dt-bindings: i2c: samsung,s5k6a3: convert to dtschema Convert the Samsung S5K6A3(YX) raw image sensor bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7d3b26da468d7b5ea180b5fdcdcc3c96c3467a7e Author: Krzysztof Kozlowski Date: Mon Mar 13 15:49:09 2023 +0100 media: samsung: exynos4-is: drop simple-bus from compatibles The FIMC camera node wrapper is not a bus, so using simple-bus fallback compatible just to instantiate its children nodes was never correct. Driver should explicitly populate all its children devices. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit af0a0a4d626f86c9e18c8e09b135a3b289294f4a Author: Krzysztof Kozlowski Date: Mon Mar 13 15:49:08 2023 +0100 media: samsung: exynos4-is: do not require pinctrl Driver does not handle pin configuration switching and several DTS provide empty pinctrl property, just to satisfy the driver's requirement for it. Drop requirement for pinctrl property as it is really optional. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b5babca2e64c39646d3937a8f83dd2a0d5fb8765 Author: Krzysztof Kozlowski Date: Mon Mar 13 15:49:07 2023 +0100 media: dt-bindings: samsung-fimc: drop simple-bus The FIMC camera node wrapper is not a bus, so using simple-bus fallback compatible just to instantiate its children nodes was never correct. Drop the simple-bus compatible and expect driver to explicitly populate children devices. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4f45a50e71bceeda8513421c1a91b4ef20c8700d Author: Paul Elder Date: Mon Feb 13 11:56:28 2023 +0100 media: docs: media: v4l: uapi: Fix field type for SUBDEV_ENUM_FRAME_SIZE The documentation for the VIDIOC_SUBDEV_ENUM_FRAME_SIZE ioctl incorrectly refers to struct v4l2_subdev_mbus_code_enum as the parameter. Fix this. [Sakari Ailus: Rebased on top of Dorota's documentation patch] Signed-off-by: Paul Elder Acked-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1fde66dc5712af7c858947a06cd336fa882f2ff6 Author: Dorota Czaplejewicz Date: Sun Feb 19 12:01:21 2023 +0100 media: media api: Try to make enum usage clearer This clarifies which side of the calls is responsible for doing what to which parts of the struct. It also expands the terse description of the access algorithm into more prose-like, active voice description, which trades conciseness for ease of comprehension. Fixed: typo "format" -> "frame size" in enum-frame-size Added: no holes in the enumeration Added: enumerations per what? Added: who fills in what in calls Changed: "given" -> "specified" [Sakari Ailus: Rewrap text] Signed-off-by: Dorota Czaplejewicz Acked-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5a26272f9c2fade261e063f0c901e72979dd30a0 Author: Dorota Czaplejewicz Date: Sun Feb 19 12:00:34 2023 +0100 media: doc/media api: Try to make enum usage clearer This clarifies which side of the calls is responsible for doing what to which parts of the struct. This also explicitly states that repeating values are disallowed. It also expands the terse description of the access algorithm into more prose-like, active voice description, which trades conciseness for ease of comprehension. Added: mbus codes must not repeat Added: no holes in the enumeration Added: enumerations per what? Added: who fills in what in calls Changed: "zero" -> "0" Changed: "given" -> "specified" Still unclear how it works so didn't describe: "which". What is a "try format" vs "active format"? [Sakari Ailus: Rewrap lines, fix build issue] Signed-off-by: Dorota Czaplejewicz Acked-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2d41947ec2c0140c65783982692c2e3d89853c47 Author: Alexander Stein Date: Fri Feb 17 10:52:21 2023 +0100 media: i2c: imx290: Add support for imx327 variant Both sensors are quite similar. Their specs only differ regarding LVDS and parallel output but are identical regarding MIPI-CSI-2 interface. But they use a different init setting of hard-coded values, taken from the datasheet. Signed-off-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d30954cbf2585426c433c63527b4b2e6b6896070 Author: Alexander Stein Date: Fri Feb 17 10:52:20 2023 +0100 media: dt-bindings: media: i2c: Add imx327 version to IMX327 bindings The imx290 driver can be used for both imx290 and imx327 as they have a similar register set and configuration. imx327 lacks 8 lanes LVDS and 120 FPS support. Signed-off-by: Alexander Stein Acked-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a3d4bba7dcabdc8b5ebeb77e5ffc7e51082f3193 Author: Dave Stevenson Date: Wed Feb 15 23:30:03 2023 +0100 media: i2c: imx290: Add the error code to logs in start_streaming imx290_start_streaming logs what failed, but not the error code from that function. Add it into the log message. Signed-off-by: Dave Stevenson Reviewed-by: Alexander Stein Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 924350ae03259b613a29a38c1e6f5b439eb9ce66 Author: Dave Stevenson Date: Wed Feb 15 23:30:02 2023 +0100 media: i2c: imx290: Add support for H & V Flips The sensor supports H & V flips, so add the relevant hooks for V4L2_CID_HFLIP and V4L2_CID_VFLIP to configure them. Note that the Bayer order is maintained as the readout area shifts by 1 pixel in the appropriate direction (note the comment about the top margin being 8 pixels whilst the bottom margin is 9). The V4L2_SEL_TGT_CROP region is therefore adjusted appropriately. Signed-off-by: Dave Stevenson Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ffbe3d825174fcd192261eaddd1a1354b2d05c5d Author: Dave Stevenson Date: Wed Feb 15 23:30:01 2023 +0100 media: i2c: imx290: Add support for 74.25MHz external clock The sensor supports either a 37.125 or 74.25MHz external, but the driver only supported 37.125MHz. Add the relevant register configuration for either clock frequency option. Signed-off-by: Dave Stevenson Reviewed-by: Alexander Stein Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 044c2bfd003611f9ddcabe437cae0f1d8b03d252 Author: Dave Stevenson Date: Wed Feb 15 23:30:00 2023 +0100 media: i2c: imx290: Remove duplicated write to IMX290_CTRL_07 IMX290_CTRL_07 was written from both imx290_global_init_settings and imx290_1080p_settings and imx290_720p_settings. Remove it from imx290_global_init_settings as the setting varies based on the mode. Signed-off-by: Dave Stevenson Reviewed-by: Alexander Stein Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6f561677c2f234bcf215350b76f2a2fea95fbebf Author: Hans de Goede Date: Mon Mar 20 11:38:15 2023 +0100 platform/x86/intel: vsec: Use intel_vsec_dev_release() to simplify init() error cleanup On auxiliary_device_init(auxdev) failure we need to do the exact same cleanup steps as on device.release(), so use the intel_vsec_dev_release() callback for this. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230320103815.229729-1-hdegoede@redhat.com commit bdb55fb216c5d7eb6a7c5b4ab6c9984be75865ff Author: Dave Stevenson Date: Wed Feb 15 23:29:59 2023 +0100 media: i2c: imx290: VMAX is mode dependent The default VMAX for 60fps in 720p mode is 750 according to the datasheet, however the driver always left it at 1125 thereby stopping 60fps being achieved. Make VMAX (and therefore V4L2_CID_VBLANK) mode dependent so that 720p60 can be achieved. Signed-off-by: Dave Stevenson Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9fe4eee963bb0beea7ab105e2a4052a81a44ebf4 Author: Dave Stevenson Date: Wed Feb 15 23:29:58 2023 +0100 media: i2c: imx290: Convert V4L2_CID_VBLANK to read/write The driver exposed V4L2_CID_VBLANK as a read only control to allow for exposure calculations and determination of the frame rate. Convert to a read/write control so that the frame rate can be controlled. V4L2_CID_VBLANK also sets the limits for the exposure control, therefore exposure ranges have to be updated when vblank changes (either via s_ctrl, or via changing mode). Signed-off-by: Dave Stevenson Signed-off-by: Laurent Pinchart Acked-by: Alexander Stein Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 08a0061db717d6a89e7946b20d96964f1868dcca Author: Dave Stevenson Date: Wed Feb 15 23:29:57 2023 +0100 media: i2c: imx290: Convert V4L2_CID_HBLANK to read/write The driver exposed V4L2_CID_HBLANK as a read only control to allow for exposure calculations and determination of the frame rate. Convert to a read/write control so that the frame rate can be controlled. Signed-off-by: Dave Stevenson Reviewed-by: Alexander Stein Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d0347f9889e34ae6ad9e4d3482c657e216ca41f3 Author: Dave Stevenson Date: Wed Feb 15 23:29:56 2023 +0100 media: i2c: imx290: Use CSI timings as per datasheet Commit "98e0500eadb7 media: i2c: imx290: Add configurable link frequency and pixel rate" added support for the increased link frequencies on 2 data lanes, but didn't update the CSI timing registers in accordance with the datasheet. Use the specified settings. Signed-off-by: Dave Stevenson Reviewed-by: Alexander Stein Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d908084385a41cfdb82dca6ab4086e3f1a9dd4ae Author: David E. Box Date: Thu Mar 16 15:57:35 2023 -0700 platform/x86/intel/pmt: Add INTEL_PMT module namespace Since the currently exported symbols in pmt_class are only used by other Intel PMT drivers, create an INTEL_PMT module namespace for them. Signed-off-by: David E. Box Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230316225736.2856521-1-david.e.box@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit de39557748cf4e8510639fc9e713ecb958abfa48 Author: Dave Stevenson Date: Wed Feb 15 23:29:55 2023 +0100 media: i2c: imx290: Support 60fps in 2 lane operation Commit "97589ad61c73 media: i2c: imx290: Add support for 2 data lanes" added support for running in two lane mode (instead of 4), but without changing the link frequency that resulted in a max of 30fps. Commit "98e0500eadb7 media: i2c: imx290: Add configurable link frequency and pixel rate" then doubled the link frequency when in 2 lane mode, but didn't undo the correction for running at only 30fps, just extending horizontal blanking instead. Remove the 30fps limit on 2 lane by correcting the register config in accordance with the datasheet for 60fps operation over 2 lanes. Signed-off-by: Dave Stevenson Reviewed-by: Alexander Stein Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit bc35f9a21a55e4ad672ccee0648d8c1a6ef26ee4 Author: Dave Stevenson Date: Wed Feb 15 23:29:54 2023 +0100 media: i2c: imx290: Fix the pixel rate at 148.5Mpix/s The datasheet lists the link frequency changes between 1080p and 720p modes. This is correct that the link frequency changes as measured on an oscilloscope. Link frequency is not necessarily the same as pixel rate. The datasheet gives standard configurations for 1080p and 720p modes at a number of frame rates. Looking at the 1080p mode it gives: HMAX = 0x898 = 2200 VMAX = 0x465 = 1125 2200 * 1125 * 60fps = 148.5MPix/s Looking at the 720p mode it gives: HMAX = 0xce4 = 3300 VMAX = 0x2ee = 750 3300 * 750 * 60fps = 148.5Mpix/s This driver currently scales the pixel rate proportionally to the link frequency, however the above shows that this is not the correct thing to do, and currently all frame rate and exposure calculations give incorrect results. Correctly report the pixel rate as being 148.5MPix/s under any mode. Signed-off-by: Dave Stevenson Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3f95ecf2a3e4db09e58d307932037e8f1210d6e7 Author: David E. Box Date: Thu Mar 16 15:46:28 2023 -0700 platform/x86/intel: vsec: Explicitly enable capabilities Discovered Intel VSEC/DVSEC capabilities are enabled by default and only get disabled by quirk. Instead, remove such quirks and only enable support for capabilities that have been explicitly added to a new capabilities field. While here, also reorder the device info structures alphabetically. Signed-off-by: David E. Box Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230316224628.2855884-1-david.e.box@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit d7b2b9387edac5a93058dcbf9b70017a764bfd18 Author: Krzysztof Kozlowski Date: Thu Mar 16 17:03:24 2023 +0100 platform/olpc: olpc-xo175-ec: Use SPI device ID data to bind device The driver defines spi_device_id table for module autoloading, but does not use it in id_table which causes W=1 warning: drivers/platform/olpc/olpc-xo175-ec.c:737:35: error: ‘olpc_xo175_ec_id_table’ defined but not used [-Werror=unused-const-variable=] Reference the SPI device ID table, so it can be also used for device binding. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230316160324.78856-1-krzysztof.kozlowski@linaro.org Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit a0dcd1ff96293775c3ec30ae0091713982c5c24c Author: Geert Uytterhoeven Date: Wed Mar 15 15:54:07 2023 +0100 spi: renesas,sh-msiof: Miscellaneous improvements Make "clocks" and "power-domains" required everywhere. Make "resets" required on R-Car Gen2 and newer (i.e. all but SH-Mobile). Update the example to match reality: - Use interrupt binding definitions instead of hardcoded numbers, - Convert to new-style CPG/MSSR bindings, - Add missing "power-domains" and "resets" properties. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/052af97ecbaa9ba6e0d406883dd3389fa397579a.1678891999.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 423e548127223d597bb65a149ebcb3c50ea08846 Author: Uwe Kleine-König Date: Mon Mar 6 07:57:33 2023 +0100 spi: imx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230306065733.2170662-3-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 11951c9e3f364d7ae3b568a0e52c8335d43066b5 Author: Uwe Kleine-König Date: Mon Mar 6 07:57:32 2023 +0100 spi: imx: Don't skip cleanup in remove's error path Returning early in a platform driver's remove callback is wrong. In this case the dma resources are not released in the error path. this is never retried later and so this is a permanent leak. To fix this, only skip hardware disabling if waking the device fails. Fixes: d593574aff0a ("spi: imx: do not access registers while clocks disabled") Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230306065733.2170662-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 3b74dc8acd5c2e59d4a1988a87d64b08fba56d5f Author: Uwe Kleine-König Date: Tue Mar 7 22:14:26 2023 +0100 spi: sprd: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307211426.2331483-3-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 5cb79889a0bab6832662ec5b8f7d1f0e6e7c25ed Author: Uwe Kleine-König Date: Tue Mar 7 22:14:25 2023 +0100 spi: sprd: Don't skip cleanup in remove's error path If pm_runtime_resume_and_get() failed before this change, two error messages were printed. One directly in sprd_spi_remove() and another by the device core as the return value is non-zero. The better handling of a failure to resume the device is to do the software related cleanup anyhow and only skip hardware accesses. This leaves the device in an unknown state, but there is nothing that can be done about that. Even in the error case, return zero to suppress the device core's error message. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307211426.2331483-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit cff5c895137cb5c3d48811881f111b17c444e2d5 Author: Rob Herring Date: Fri Mar 17 18:36:14 2023 -0500 regulator: dt-bindings: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230317233616.3968003-1-robh@kernel.org Signed-off-by: Mark Brown commit bdce47bb19cbf7784d48e93677c868a69dbae439 Author: Douglas Anderson Date: Thu Mar 16 12:54:44 2023 -0700 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that are newer than 6.1 This follows on the change ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") but changes regulators that were not present in kernel 6.1. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316125351.7.I31771918f1d8dbe4bfb9f1fef7ff987f2b7504b5@changeid Signed-off-by: Mark Brown commit 41cff178e3d6df28acd8490519a656c509b4496f Author: Douglas Anderson Date: Thu Mar 16 12:54:43 2023 -0700 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.15 and 6.1 This follows on the change ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") but changes regulators didn't exist in Linux 5.15 but did exist in Linux 6.1. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316125351.6.Ibc8a86ddd5055ebbbe487a529199db7b36ccad1a@changeid Signed-off-by: Mark Brown commit 46600ab142f8c2ecc2a647175fd86d53bc285a9a Author: Douglas Anderson Date: Thu Mar 16 12:54:42 2023 -0700 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.10 and 5.15 This follows on the change ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") but changes regulators didn't exist in Linux 5.10 but did exist in Linux 5.15. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316125351.5.Ia0e6d859bdfe42ea5c187fb1eb4705c1b5ea23a1@changeid Signed-off-by: Mark Brown commit 67dc71c61b64be85ce33d3332ca5511f9b1faef7 Author: Douglas Anderson Date: Thu Mar 16 12:54:41 2023 -0700 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.4 and 5.10 This follows on the change ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") but changes regulators didn't exist in Linux 5.4 but did exist in Linux 5.10. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316125351.4.I01f21c98901641a009890590ddc1354c0f294e5e@changeid Signed-off-by: Mark Brown commit d3b81d97d55871cb11412caedded440f1fddc4e9 Author: Douglas Anderson Date: Thu Mar 16 12:54:40 2023 -0700 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 4.19 and 5.4 This follows on the change ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") but changes regulators didn't exist in Linux 4.19 but did exist in Linux 5.4. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316125351.3.I45bf925ca9537da5f647e2acb0ad207c0c98af81@changeid Signed-off-by: Mark Brown commit ed6962cc3e05ca77f526590f62587678149d5e58 Author: Douglas Anderson Date: Thu Mar 16 12:54:39 2023 -0700 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 4.14 and 4.19 This follows on the change ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14") but changes regulators didn't exist in Linux 4.14 but did exist in Linux 4.19. NOTE: from a quick "git cherry-pick" it looks as if "bd718x7-regulator.c" didn't actually exist in v4.19. In 4.19 it was named "bd71837-regulator.c". See commit 2ece646c90c5 ("regulator: bd718xx: rename bd71837 to 718xx") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316125351.2.Iad1f25517bb46a6c7fca8d8c80ed4fc258a79ed9@changeid Signed-off-by: Mark Brown commit 259b93b21a9ffe5117af4dfb5505437e463c6a5a Author: Douglas Anderson Date: Thu Mar 16 12:54:38 2023 -0700 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14 Probing of regulators can be a slow operation and can contribute to slower boot times. This is especially true if a regulator is turned on at probe time (with regulator-boot-on or regulator-always-on) and the regulator requires delays (off-on-time, ramp time, etc). While the overall kernel is not ready to switch to async probe by default, as per the discussion on the mailing lists [1] it is believed that the regulator subsystem is in good shape and we can move regulator drivers over wholesale. There is no way to just magically opt in all regulators (regulators are just normal drivers like platform_driver), so we set PROBE_PREFER_ASYNCHRONOUS for all regulators found in 'drivers/regulator' individually. Given the number of drivers touched and the impossibility to test this ahead of time, it wouldn't be shocking at all if this caused a regression for someone. If there is a regression caused by this patch, it's likely to be one of the cases talked about in [1]. As a "quick fix", drivers involved in the regression could be fixed by changing them to PROBE_FORCE_SYNCHRONOUS. That being said, the correct fix would be to directly fix the problem that caused the issue with async probe. The approach here follows a similar approach that was used for the mmc subsystem several years ago [2]. In fact, I ran nearly the same python script to auto-generate the changes. The only thing I changed was to search for "i2c_driver", "spmi_driver", and "spi_driver" in addition to "platform_driver". [1] https://lore.kernel.org/r/06db017f-e985-4434-8d1d-02ca2100cca0@sirena.org.uk [2] https://lore.kernel.org/r/20200903232441.2694866-1-dianders@chromium.org/ Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230316125351.1.I2a4677392a38db5758dee0788b2cea5872562a82@changeid Signed-off-by: Mark Brown commit 9934844f6b49fb9964f878f12912abe689eaed5d Author: Alexander Stein Date: Thu Mar 16 13:36:11 2023 +0100 ASoC: fsl: Specify driver name in ASoC card Set the snd_soc_card driver name which fixes the warning: fsl-asoc-card sound: ASoC: driver name too long 'imx-audio-tlv320aic32x4' -> 'imx-audio-tlv32' Signed-off-by: Alexander Stein Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20230316123611.3495597-2-alexander.stein@ew.tq-group.com Signed-off-by: Mark Brown commit 1d52cba3b99278f178bfadf88e666648a217a813 Author: Alexander Stein Date: Thu Mar 16 13:36:10 2023 +0100 ASoC: fsl: define a common DRIVER_NAME Instead of copying the driver name manually, use a common define. No functional change. Signed-off-by: Alexander Stein Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20230316123611.3495597-1-alexander.stein@ew.tq-group.com Signed-off-by: Mark Brown commit d9e909e219a843c6bf49f9affe536660f830d6fc Author: Rob Herring Date: Fri Mar 17 18:36:10 2023 -0500 ASoC: dt-bindings: Drop unneeded quotes Cleanup bindings dropping unneeded quotes. Once all these are fixed, checking for this can be enabled in yamllint. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230317233612.3967849-1-robh@kernel.org Signed-off-by: Mark Brown commit 0e6c37610934e9b91f6f5f2599de5e2f1ab59e72 Author: Cristian Ciocaltea Date: Wed Mar 15 13:48:03 2023 +0200 ASoC: rockchip: i2s: Add compatible for RK3588 The Rockchip I2S driver supports the RK3588/RK3588S SoCs, hence add the corresponding compatible string. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230315114806.3819515-9-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit b0fe6a91fa9d5599ba3cace2748906e086c5a56e Author: Cristian Ciocaltea Date: Wed Mar 15 13:48:02 2023 +0200 ASoC: dt-bindings: rockchip: Add compatible for RK3588 Add new compatible string for the Rockchip I2S/PCM controller found on RK3588 and RK3588S SoCs. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230315114806.3819515-8-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit 9971f3358338950d9d3345184fb2c0cfc6fc8552 Author: Cristian Ciocaltea Date: Wed Mar 15 13:48:01 2023 +0200 ASoC: dt-bindings: rockchip: i2s-tdm: Document power-domains The binding document is missing the power-domains property. Add it. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230315114806.3819515-7-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit bfbae373c55e3b1c15a6ba656211dbbe7c390aa1 Author: Cristian Ciocaltea Date: Wed Mar 15 13:48:00 2023 +0200 ASoC: dt-bindings: rockchip: i2s-tdm: Document audio graph port Document the 'port' property to allow the Rockchip I2S TDM controller to be used in conjunction with the audio-graph-card. The property will be used to provide an endpoint for binding to the other side of the audio link. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230315114806.3819515-6-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit bf4062b7420d01b4fafd7211fd2dc68b916591bd Author: Cristian Ciocaltea Date: Wed Mar 15 13:47:59 2023 +0200 ASoC: dt-bindings: rockchip: Document audio graph port The Rockchip I2S controller is currently used in conjunction with audio-graph-card to provide an endpoint for binding with the other side of the audio link. This is achieved via the 'port' property, which is not allowed: rk3399-rockpro64.dtb: i2s@ff890000: Unevaluated properties are not allowed ('port' was unexpected) Fix the issue by documenting the missing property. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230315114806.3819515-5-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit 2f43ef99ac623b6d9154c26d4f6785df18b4d8e4 Author: Cristian Ciocaltea Date: Wed Mar 15 13:47:58 2023 +0200 ASoC: dt-bindings: everest,es8316: Document audio graph port The ES8316 codec is currently used in conjunction with audio-graph-card to provide an endpoint for binding with the other side of the audio link. This is achieved via the 'port' property, which is not allowed: rk3399-rockpro64.dtb: codec@11: Unevaluated properties are not allowed ('port' was unexpected) Fix the issue by documenting the missing property. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20230315114806.3819515-4-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit 9fa6137d0c7843209472bb07277f9fcffa80847a Author: Uwe Kleine-König Date: Wed Mar 15 16:07:45 2023 +0100 ALSA: sparc/dbri: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-174-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 44e4b6ee0486e301bfd8f4b2948905893bcf1314 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:44 2023 +0100 ALSA: sparc/cs4231: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-173-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit cbde81bc5573ddade3d2560fe7b5e4fa80db8f7b Author: Uwe Kleine-König Date: Wed Mar 15 16:07:43 2023 +0100 ASoC: xtensa: xtfpga-i2s: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-172-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 407a27b72e168aac1c192c4b977cc3ad6b41caa2 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:42 2023 +0100 ASoC: xilinx: xlnx_spdif: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-171-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit bf6b5ced96cdaec0af1621ecd4f245a907ed3b06 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:41 2023 +0100 ASoC: xilinx: xlnx_formatter_pcm: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-170-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 316a6bbfb878b710cd0c28c4fcce47a299bbd64c Author: Uwe Kleine-König Date: Wed Mar 15 16:07:40 2023 +0100 ASoC: ux500: ux500_msp_dai: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Linus Walleij Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-169-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit d2b6d5b85a651f4678e7c8343df4d93cc736489b Author: Uwe Kleine-König Date: Wed Mar 15 16:07:39 2023 +0100 ASoC: ux500: mop500: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Linus Walleij Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-168-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 048d658978107f1a6b517297acb2eb08dd70b4c7 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:38 2023 +0100 ASoC: uniphier: evea: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-167-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 9b6818bb3c58de41f987554bf27db3058c5e6838 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:37 2023 +0100 ASoC: ti: omap-mcbsp: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-166-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f12b0d036382dec00815780a3c2d998c1c92a422 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:36 2023 +0100 ASoC: ti: omap-hdmi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-165-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 09382b0150f0ced1d70330a11fe23c42137c0bd4 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:35 2023 +0100 ASoC: ti: davinci-mcasp: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-164-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit a4d121f6f7e9d46a54abd7efed46112cee28188f Author: Uwe Kleine-König Date: Wed Mar 15 16:07:34 2023 +0100 ASoC: ti: davinci-i2s: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-163-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 2ade2cf2b00c8746f26ed64cb9bb32daa5efbed0 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:33 2023 +0100 ASoC: ti: ams-delta: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-162-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit d148a8d46583590166711ff7c3f3644242b7563a Author: Uwe Kleine-König Date: Wed Mar 15 16:07:32 2023 +0100 ASoC: tegra: tegra30_i2s: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-161-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit b17cf43d704bd556f866057af9e8c227e0c382ee Author: Uwe Kleine-König Date: Wed Mar 15 16:07:31 2023 +0100 ASoC: tegra: tegra30_ahub: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-160-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 0e25bed50aafe5d7fe46671f9bd4f3480ef19e10 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:30 2023 +0100 ASoC: tegra: tegra210_sfc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-159-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 37831f8c144136ddb5a9f8794a5581bc8030f3f5 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:29 2023 +0100 ASoC: tegra: tegra210_ope: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-158-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f94195ff022e5f39b6a1d4e2bcfa6f49dc32b4b7 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:28 2023 +0100 ASoC: tegra: tegra210_mvc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-157-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit e0d782fad1f23dfa9d5b2e7144a433d502fd5845 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:27 2023 +0100 ASoC: tegra: tegra210_mixer: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-156-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit e29df600149b08dc4b045da5c05df49c48b99436 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:26 2023 +0100 ASoC: tegra: tegra210_i2s: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-155-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 7ffba01bcd3e5e4e6ebb13348b6d9975015ab9e2 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:25 2023 +0100 ASoC: tegra: tegra210_dmic: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-154-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f3ac69d50c58340640b4e15466cbf32c0f040f67 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:24 2023 +0100 ASoC: tegra: tegra210_amx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-153-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f1790c464b21c42cbf5d56138c4f8791b25193f1 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:23 2023 +0100 ASoC: tegra: tegra210_ahub: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-152-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f129152cbce6ea54ff4a4cc05a263c2c2f105c06 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:22 2023 +0100 ASoC: tegra: tegra210_adx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-151-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 8097e8afb9f6ec2a5c47a325f66e0163eadcdd5a Author: Uwe Kleine-König Date: Wed Mar 15 16:07:21 2023 +0100 ASoC: tegra: tegra210_admaif: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-150-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 81ab73dbfe6864efbcf2c7d8effff0225cac286e Author: Uwe Kleine-König Date: Wed Mar 15 16:07:20 2023 +0100 ASoC: tegra: tegra20_i2s: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-149-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 41067828420de3250df957b2b0c50a33ba8e569e Author: Uwe Kleine-König Date: Wed Mar 15 16:07:19 2023 +0100 ASoC: tegra: tegra20_ac97: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-148-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit e04913cba6a651f9fbdfec397735a6df53ec0212 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:18 2023 +0100 ASoC: tegra: tegra186_dspk: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-147-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 1e482d82b813ab0ec1fb4c28f54f8728580eb515 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:17 2023 +0100 ASoC: tegra: tegra186_asrc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-146-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit a594f423aed833bbc1d8d25dc1f9e387d2c7fddb Author: Uwe Kleine-König Date: Wed Mar 15 16:07:16 2023 +0100 ASoC: sunxi: sun8i-codec: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-145-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 116d6c70fa3da6123e1529c071b521ad16af3fa5 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:15 2023 +0100 ASoC: sunxi: sun50i-dmic: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Ban Tao Acked-by: Jernej Skrabec Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-144-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit b9d01c8254899d176ef4a387232bd8166ff769b6 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:14 2023 +0100 ASoC: sunxi: sun4i-spdif: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-143-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 5423c00ee28f6cc3013b74bd1ac4090c625e91c2 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:13 2023 +0100 ASoC: sunxi: sun4i-i2s: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-142-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f56a1b1026ff2e04d6f8ac83d31be3bf163888ed Author: Uwe Kleine-König Date: Wed Mar 15 16:07:12 2023 +0100 ASoC: sunxi: sun4i-codec: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-141-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit c4d4ce48f8f59a464e4351258d2160a5215bb350 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:11 2023 +0100 ASoC: stm: stm32_spdifrx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-140-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit a3bd37e2e2bce4fb1757a940fa985d556662ba80 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:10 2023 +0100 ASoC: stm: stm32_sai_sub: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-139-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 607e4cf57396ebd5d4f45dfdf18933207704b1e5 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:09 2023 +0100 ASoC: stm: stm32_i2s: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-138-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 6cd293d206ad4b3c42854685a00b5e5d10a10aee Author: Uwe Kleine-König Date: Wed Mar 15 16:07:08 2023 +0100 ASoC: stm: stm32_adfsdm: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-137-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit ed771e2beafa5687eba623fbde24d88ec61aa9aa Author: Uwe Kleine-König Date: Wed Mar 15 16:07:07 2023 +0100 ASoC: sprd: sprd-mcdt: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-136-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 4136b45d25b2120355bbb8f35cc5102ec7e5b428 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:06 2023 +0100 ASoC: sh: siu_dai: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-135-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit b89438c71d72a9afbf72836630bfc995fed59e68 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:05 2023 +0100 ASoC: sh: rz-ssi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-134-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 5310f0a3315b7c7c6757b0d4b01733efd537049e Author: Uwe Kleine-König Date: Wed Mar 15 16:07:04 2023 +0100 ASoC: sh: rcar: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Kuninori Morimoto Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-133-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 9baee32e889a646bba175fd365c4f807e42c4123 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:03 2023 +0100 ASoC: sh: hac: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-132-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 08719f469b638c09c642896878a1e7c2b7e046c4 Author: Uwe Kleine-König Date: Wed Mar 15 16:07:02 2023 +0100 ASoC: sh: fsi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Kuninori Morimoto Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-131-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 7695582fd463ef3158d21253130cd2f1510c4e9a Author: Uwe Kleine-König Date: Wed Mar 15 16:07:01 2023 +0100 ASoC: samsung: spdif: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-130-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 3224f4407d67c9504d9c779ebe79cd90be887cec Author: Uwe Kleine-König Date: Wed Mar 15 16:07:00 2023 +0100 ASoC: samsung: snow: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-129-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 9f82db9dbb53567fc4c8de7a9fb41a8b6b4ea0e1 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:59 2023 +0100 ASoC: samsung: pcm: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-128-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit d530e675e0189f68fc644668209eafc835d50efb Author: Uwe Kleine-König Date: Wed Mar 15 16:06:58 2023 +0100 ASoC: samsung: odroid: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-127-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 0b309358b8e461f3d99235d6b8b75cbffb61de57 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:57 2023 +0100 ASoC: samsung: i2s: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-126-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 2149a1afa7f0d24164c7ae4ef66fdb98c607325c Author: Uwe Kleine-König Date: Wed Mar 15 16:06:56 2023 +0100 ASoC: samsung: arndale: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-125-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit cdce778344bc7f6c8b52027deab3f35cc05c4b3b Author: Uwe Kleine-König Date: Wed Mar 15 16:06:55 2023 +0100 ASoC: rockchip: rockchip_spdif: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-124-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit ed1e0f5a273c2dcbfede81831aa14c1039ad6930 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:54 2023 +0100 ASoC: rockchip: rockchip_rt5645: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-123-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 61785600e2b9513fe782857dd53ae9f920d6ff85 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:53 2023 +0100 ASoC: rockchip: rockchip_pdm: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-122-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f348dd337e20e2e82b655062e613dbc63a6d4d01 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:51 2023 +0100 ASoC: rockchip: rockchip_i2s: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-120-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 60835c5c7d014cdb73166ee9e1b678d53562e3e1 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:50 2023 +0100 ASoC: qcom: qdsp6: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-119-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit acb6a6982d6b83c08014f5110b443f4e8bca459b Author: Uwe Kleine-König Date: Wed Mar 15 16:06:49 2023 +0100 ASoC: pxa: pxa2xx-ac97: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-118-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 15c71a4c84ba66f95c49b50fa934ab0395a1010f Author: Uwe Kleine-König Date: Wed Mar 15 16:06:48 2023 +0100 ASoC: pxa: mmp-sspa: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-117-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 75c1ed916145ecb5ae8a5e4a282aaea84fa9724e Author: Uwe Kleine-König Date: Wed Mar 15 16:06:47 2023 +0100 ASoC: mxs: mxs-sgtl5000: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-116-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit ed354c69dd370ebac8c438d3570aade296afce05 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:46 2023 +0100 ASoC: meson: aiu: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Martin Blumenstingl Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-115-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 6461fee68064ba970e3ba90241fe5f5e038aa9d4 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:45 2023 +0100 ASoC: mediatek: mt8195-afe-pcm: 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 (mostly) ignored 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. 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: AngeloGioacchino Del Regno Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-114-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 26530339aca3e55cf44895303344ea6a91fa8bb1 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:44 2023 +0100 ASoC: mediatek: mt8192-afe-pcm: 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 (mostly) ignored 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. 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: AngeloGioacchino Del Regno Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-113-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit bb5ba5fe26ac53de23f1c85e97cb8cef31df343f Author: Uwe Kleine-König Date: Wed Mar 15 16:06:43 2023 +0100 ASoC: mediatek: mt8188-afe-pcm: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-112-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 718041d46c4c69f86135f3e38c7295a41523d7bf Author: Uwe Kleine-König Date: Wed Mar 15 16:06:42 2023 +0100 ASoC: mediatek: mt8183-afe-pcm: 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 (mostly) ignored 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. 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: AngeloGioacchino Del Regno Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-111-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 98a11bf9e7d904803fd4d91b909e3cad43719fba Author: Uwe Kleine-König Date: Wed Mar 15 16:06:41 2023 +0100 ASoC: mediatek: mt8173-afe-pcm: 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 (mostly) ignored 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. 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: AngeloGioacchino Del Regno Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-110-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit edd8a5cde6c73d436b7970635b14a974b9a6e45c Author: Uwe Kleine-König Date: Wed Mar 15 16:06:40 2023 +0100 ASoC: mediatek: mt6797-afe-pcm: 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 (mostly) ignored 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. 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: AngeloGioacchino Del Regno Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-109-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit b3dff59e57a2d7c319590afe127a541917a06e1f Author: Uwe Kleine-König Date: Wed Mar 15 16:06:39 2023 +0100 ASoC: mediatek: mt2701-afe-pcm: 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 (mostly) ignored 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. 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: AngeloGioacchino Del Regno Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-108-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 09f8cf0495b03dee0d567cebd4f47294c6293cd4 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:38 2023 +0100 ASoC: mediatek: mtk-btcvsd: 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 (mostly) ignored 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. 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: AngeloGioacchino Del Regno Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-107-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 8c078706e9862c7cd8bcb22d34133262024c26bf Author: Uwe Kleine-König Date: Wed Mar 15 16:06:37 2023 +0100 ASoC: kirkwood: kirkwood-i2s: 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 (mostly) ignored 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. 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: Andrew Lunn Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-106-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 394b2a11d9c238eb23e4fc087cc69f797b365f4b Author: Uwe Kleine-König Date: Wed Mar 15 16:06:36 2023 +0100 ASoC: Intel: skl-ssp-clk: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-105-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 4b6f92559390e016b6264b5f6d25f192ea83acba Author: Uwe Kleine-König Date: Wed Mar 15 16:06:35 2023 +0100 ASoC: Intel: catpt: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-104-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 674dd2c5f2b9466d9e8dfcd5e6f7a68d26fbc923 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:34 2023 +0100 ASoC: Intel: sof_wm8804: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-103-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 51a4a7ecd85f9a714b47caa4d8c2ee7ea1e5b81f Author: Uwe Kleine-König Date: Wed Mar 15 16:06:33 2023 +0100 ASoC: Intel: sof_sdw: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-102-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit b6c85e141938c353ff390c112d7b226872712429 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:32 2023 +0100 ASoC: Intel: sof_pcm512x: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-101-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit c1f0f19e3f206354c7f5759456f0789776394d17 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:31 2023 +0100 ASoC: Intel: sof_es8336: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-100-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 76a32d30dce2b101592ac76b4d74ae9fc9b9309b Author: Uwe Kleine-König Date: Wed Mar 15 16:06:30 2023 +0100 ASoC: Intel: cht_bsw_max98090_ti: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-99-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 2cd3f347aa0b82ab1c7ed8afe7e22234ac1b06f2 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:29 2023 +0100 ASoC: Intel: bytcr_wm5102: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-98-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 00f2ac22d63c54fbe2cc0a98a4f25c640b224b44 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:28 2023 +0100 ASoC: Intel: boards: bytcr_rt5651: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-97-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 2dc1d3c55d96973ded9c7fab8a22b7e323ae43e3 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:27 2023 +0100 ASoC: Intel: bytcr_rt5640: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-96-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 9c5b13d50b2eb039a43af2d06a31813bff717fa7 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:26 2023 +0100 ASoC: Intel: bytcht_es8316: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-95-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit c524f1674fc765b4adffd9329e89591169922269 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:25 2023 +0100 ASoC: Intel: sst: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-94-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 0d31e8adf3e01cd344070ca33e51dac61b833bd0 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:24 2023 +0100 ASoC: Intel: sst-mfld-platform-pcm: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-93-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit ab44348955bfc3b9ca127dfb36d0c3231adacf07 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:23 2023 +0100 ASoC: img: pistachio-internal-dac: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-92-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 4e894b2ec67c5c11cf9aa3d7c758102f02a3d08a Author: Uwe Kleine-König Date: Wed Mar 15 16:06:22 2023 +0100 ASoC: img: img-spdif-out: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-91-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 029a00ae9718571520f18ebdfb9ac5a633205d16 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:21 2023 +0100 ASoC: img: img-spdif-in: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-90-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 6a5e4aafe0fd1523f75974af1aec50c35a17dbb5 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:20 2023 +0100 ASoC: img: img-parallel-out: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-89-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 3573bca8286daaaf191aece525e617415b88dfcb Author: Uwe Kleine-König Date: Wed Mar 15 16:06:19 2023 +0100 ASoC: img: img-i2s-out: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-88-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 4c9c73d88f927e7549852136ac82b8eb9978ceeb Author: Uwe Kleine-König Date: Wed Mar 15 16:06:18 2023 +0100 ASoC: img: img-i2s-in: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-87-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 53946256cb7e9b4093f533fd42118cb6eda9ebb7 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:17 2023 +0100 ASoC: generic: test-component: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-86-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit b7f036b9ff7f6accced758b21d4194d184709d95 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:16 2023 +0100 ASoC: fsl: pcm030-audio-fabric: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-85-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit ca4957d3b1f08c04e3ea510ebb419feda7b959c9 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:15 2023 +0100 ASoC: fsl: p1022_rdk: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-84-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 6a442e72940039bd69081320acdd4d7666f30a36 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:14 2023 +0100 ASoC: fsl: p1022_ds: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-83-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 9c4d8f48ac4f38dbb23a546b8a5489d37f04f926 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:13 2023 +0100 ASoC: fsl: mpc8610_hpcd: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-82-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 295dc79cfc05959f252546e34f0bddcc52aa7d8a Author: Uwe Kleine-König Date: Wed Mar 15 16:06:12 2023 +0100 ASoC: fsl: mpc5200_psc_i2s: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-81-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 5ccf4bee004073af36e454c3f263a03d7a6ac72b Author: Uwe Kleine-König Date: Wed Mar 15 16:06:11 2023 +0100 ASoC: fsl: mpc5200_psc_ac97: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-80-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit b8a148daa7969839c6bfbdd223dffa476dee4325 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:10 2023 +0100 ASoC: fsl: imx-sgtl5000: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-79-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit a064945698110e2aa283026bd4f31e3c34e00e93 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:09 2023 +0100 ASoC: fsl: imx-pcm-rpmsg: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-78-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 51451f46d1f3134235f3a332f919e2b7af87fd49 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:08 2023 +0100 ASoC: fsl: imx-audmux: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-77-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit aefe902ea8d538a86d9eb7128d5878e0b838241f Author: Uwe Kleine-König Date: Wed Mar 15 16:06:07 2023 +0100 ASoC: fsl: fsl_xcvr: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-76-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 2d1c82c460f2602282749825d5599688a46363ad Author: Uwe Kleine-König Date: Wed Mar 15 16:06:06 2023 +0100 ASoC: fsl: fsl_ssi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-75-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit c8c0bd47cf83c48d422b68b3cfb808f569d7453d Author: Uwe Kleine-König Date: Wed Mar 15 16:06:05 2023 +0100 ASoC: fsl: fsl_spdif: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-74-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 78c2698dd557e2c69d1ecfc2f458eeaff0adfed3 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:04 2023 +0100 ASoC: fsl: fsl_sai: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-73-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 126ce4328be219c12458e308feade8168dff588d Author: Uwe Kleine-König Date: Wed Mar 15 16:06:03 2023 +0100 ASoC: fsl: fsl_rpmsg: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-72-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 4ff299cb33ae40367d38e66c5cba15242cbbe33c Author: Uwe Kleine-König Date: Wed Mar 15 16:06:02 2023 +0100 ASoC: fsl: fsl_mqs: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-71-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 0c85719ee2c6320ab2fdea7852a1008ac51a05f1 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:01 2023 +0100 ASoC: fsl: fsl_esai: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-70-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 0c880ae7c01402e09a62d34356da3b03933c6603 Author: Uwe Kleine-König Date: Wed Mar 15 16:06:00 2023 +0100 ASoC: fsl: fsl_easrc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-69-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 2c8a5de60d210093dd4b98fb4d8cdbd637450bac Author: Uwe Kleine-König Date: Wed Mar 15 16:05:59 2023 +0100 ASoC: fsl: fsl_dma: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-68-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit fd24dfc35b49ee029ac8d3cc45cd4420ae1b455b Author: Uwe Kleine-König Date: Wed Mar 15 16:05:58 2023 +0100 ASoC: fsl: fsl_audmix: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-67-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 2a41b19201c8f22e10eebc6fc016cef5e6915ffb Author: Uwe Kleine-König Date: Wed Mar 15 16:05:57 2023 +0100 ASoC: fsl: fsl_aud2htx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-66-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 7a2d15b9322b4233cfe6bd7f747ec89672d17889 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:56 2023 +0100 ASoC: fsl: fsl_asrc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-65-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 01192ad23b06216c9abdca07ef9e7add33c69a72 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:55 2023 +0100 ASoC: fsl: eukrea-tlv320: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-64-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit db3a56667e84503a7908a307cf74bf7f4e3f4fa5 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:54 2023 +0100 ASoC: dwc: dwc-i2s: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-63-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 52675c1e9bfaaecc9999b39caf1305a2688df6dd Author: Uwe Kleine-König Date: Wed Mar 15 16:05:53 2023 +0100 ASoC: codecs: wm8998: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-62-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit e1df73df807721ce0f7be9c58ef6c751112f2aab Author: Uwe Kleine-König Date: Wed Mar 15 16:05:52 2023 +0100 ASoC: codecs: wm8997: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-61-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 63d3f580d95901e5b250105f3637b8e865219864 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:51 2023 +0100 ASoC: codecs: wm8994: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-60-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit d1535277bf69de5e72e76a2fef15ff6ccd0ea1f7 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:50 2023 +0100 ASoC: codecs: wm5110: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-59-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 25a4c2697c1cb3ed1f1395f9fee4de4aed8d7503 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:49 2023 +0100 ASoC: codecs: wm5102: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-58-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 7cd686a59b36860511965882dad1f76df2c25766 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:48 2023 +0100 ASoC: codecs: wcd938x: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-57-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 68dadf3eceb2d3d60d3364006a5b72da4050bdcf Author: Uwe Kleine-König Date: Wed Mar 15 16:05:47 2023 +0100 ASoC: codecs: rk817_codec: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-56-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 004967ba3e8820ef8c48779ae9491cc1c6729b7c Author: Uwe Kleine-König Date: Wed Mar 15 16:05:46 2023 +0100 ASoC: codecs: msm8916-wcd-digital: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-55-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 22b27fafbfaf398c1014726b679d5d1e8389d704 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:45 2023 +0100 ASoC: codecs: msm8916-wcd-analog: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-54-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 23a3ef6545a91abc78249e72107a13b43a68d4f9 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:44 2023 +0100 ASoC: codecs: lpass-wsa-macro: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-53-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit b84affc1b4e2a9cec0720eea729c0f4d0490a0c2 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:43 2023 +0100 ASoC: codecs: lpass-va-macro: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-52-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 10b4f1ed0499bb1cf8335d3956bd82da59314534 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:42 2023 +0100 ASoC: codecs: lpass-tx-macro: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-51-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 5b06877205882a92aaf5ced177476697849fd1fe Author: Uwe Kleine-König Date: Wed Mar 15 16:05:41 2023 +0100 ASoC: codecs: lpass-rx-macro: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-50-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 8756b2ecbd2aa22d6981f6a48a804f0d2cec68a8 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:40 2023 +0100 ASoC: codecs: inno_rk3036: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-49-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 516ef43d40e976e16b4eb1c51a7b96e579a297bb Author: Uwe Kleine-König Date: Wed Mar 15 16:05:39 2023 +0100 ASoC: codecs: cs47l92: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-48-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit acd39a3729829587128a0d58dbd13c1b23066259 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:38 2023 +0100 ASoC: codecs: cs47l90: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-47-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f71d98e5c6a979476bcf366b9764573c3fe578cf Author: Uwe Kleine-König Date: Wed Mar 15 16:05:37 2023 +0100 ASoC: codecs: cs47l85: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-46-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit b9cc4f89852811c6af6de7653e68ee99cf4e524e Author: Uwe Kleine-König Date: Wed Mar 15 16:05:36 2023 +0100 ASoC: codecs: cs47l35: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-45-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 90fc2cd0c12535462fe7f71db909b6139a012b95 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:35 2023 +0100 ASoC: codecs: cs47l24: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-44-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f57c2cf8d3bd4023347303f195b0ff991324ee2c Author: Uwe Kleine-König Date: Wed Mar 15 16:05:34 2023 +0100 ASoC: codecs: cs47l15: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-43-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 4b1bb8fd7ba5ddcf54cfc9e5568236a734e07f6e Author: Uwe Kleine-König Date: Wed Mar 15 16:05:33 2023 +0100 ASoC: cirrus: ep93xx-i2s: 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 (mostly) ignored 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. 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: Alexander Sverdlin Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-42-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit e711b0fd45d861cb8a19fb5ce0dfc2d21eaefc3f Author: Uwe Kleine-König Date: Wed Mar 15 16:05:32 2023 +0100 ASoC: cirrus: edb93xx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-41-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit cf004d9a2abaa70f36194274424031dd7c8b71c7 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:31 2023 +0100 ASoC: bcm: cygnus-ssp: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-40-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit ee357de34391b4d1a926c7ef736f1723d07feb9e Author: Uwe Kleine-König Date: Wed Mar 15 16:05:30 2023 +0100 ASoC: bcm: bcm63xx-i2s-whistler: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-39-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 045b9b33d5614b83150d33db688c9238bf370521 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:29 2023 +0100 ASoC: au1x: psc-i2s: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-38-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit c167a43dce9426bb244ca0be50d8e71b94b70532 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:28 2023 +0100 ASoC: au1x: psc-ac97: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-37-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit ea7f61db28e24d328d0dcf28a07b6251f7beae26 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:27 2023 +0100 ASoC: au1x: i2sc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-36-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit a69f0329d49be4b3a46f2e7b4b241f67be73d831 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:26 2023 +0100 ASoC: au1x: ac97c: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-35-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit d2679d8529096d7e6af2e3a36086075343b586dd Author: Uwe Kleine-König Date: Wed Mar 15 16:05:25 2023 +0100 ASoC: atmel: tse850-pcm5142: 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 (mostly) ignored 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. 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: Claudiu Beznea Acked-by: Peter Rosin Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-34-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit c79ddc74c50979665d95382137aec0b4c81a61d8 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:24 2023 +0100 ASoC: atmel: sam9x5_wm8731: 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 (mostly) ignored 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. 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: Claudiu Beznea Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-33-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit a186762b817329d6d55fb94419b534cb06aca3a7 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:23 2023 +0100 ASoC: atmel: sam9g20_wm8731: 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 (mostly) ignored 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. 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: Claudiu Beznea Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-32-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 2328c4871bd33ce3be5c56a413a79c6b23535217 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:22 2023 +0100 ASoC: atmel: mikroe-proto: 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 (mostly) ignored 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. 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: Claudiu Beznea Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-31-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit c1d51c27d22af56e53e2d739cf533182c2a3fca3 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:21 2023 +0100 ASoC: atmel: mchp-spdiftx: 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 (mostly) ignored 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. 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: Claudiu Beznea Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-30-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 879f2ce0a95701695f2b7648ca81aff543631b1d Author: Uwe Kleine-König Date: Wed Mar 15 16:05:20 2023 +0100 ASoC: atmel: mchp-spdifrx: 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 (mostly) ignored 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. 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: Claudiu Beznea Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-29-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 86fdd4825459db4ec831d2d41a5e27d45dff2641 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:19 2023 +0100 ASoC: atmel: mchp-pdmc: 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 (mostly) ignored 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. 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: Claudiu Beznea Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-28-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit b0570709d123ee8bfed32f968d665366fb1a6d2d Author: Uwe Kleine-König Date: Wed Mar 15 16:05:18 2023 +0100 ASoC: atmel: mchp-i2s-mcc: 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 (mostly) ignored 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. 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: Claudiu Beznea Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-27-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 0278eb3275df6121ecbab848269495f9ca7f5c7a Author: Uwe Kleine-König Date: Wed Mar 15 16:05:17 2023 +0100 ASoC: atmel: atmel_wm8904: 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 (mostly) ignored 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. 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: Claudiu Beznea Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-26-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit d0486266a6ba028fe0197c721994f3de5d21550a Author: Uwe Kleine-König Date: Wed Mar 15 16:05:16 2023 +0100 ASoC: atmel: atmel-i2s: 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 (mostly) ignored 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. 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: Claudiu Beznea Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-25-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit eb5a9cf29f1e5b6290e168d405eef98b42f158a4 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:15 2023 +0100 ASoC: apple: mca: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-24-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 0e940c75e307f61fdf049ee7ac21d672f91883f3 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:14 2023 +0100 ASoC: amd: yc: acp6x-pdm-dma: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-23-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 8564d4f22ce7cbf989af4ba004b44b1878d1b984 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:13 2023 +0100 ASoC: amd: vangogh: acp5x-pcm-dma: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-22-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 725d4edfa528f07acfda3e080bf1827e5eea0399 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:12 2023 +0100 ASoC: amd: raven: acp3x-pdm-dma: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-21-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 599914e146a772f7ceb39912a73565d90336e5e3 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:11 2023 +0100 ASoC: amd: raven: acp3x-pcm-dma: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-20-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 5b6bacfa1a7bc353d14189a628d8617a26e8381b Author: Uwe Kleine-König Date: Wed Mar 15 16:05:10 2023 +0100 ASoC: amd: ps: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-19-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit da8a3ceb45be5d711f109df5bb12261adb790391 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:09 2023 +0100 ASoC: amd: acp: renoir: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-18-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 37846af6d08ccdca8308e3d4bfec9f6d97e8eec2 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:08 2023 +0100 ASoC: amd: acp: rembrandt: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-17-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 6bbbbc24eb02518e3c5140b80144ec000bfa5bf7 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:07 2023 +0100 ASoC: amd: acp-pcm-dma: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-16-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit a0d18db09ca5b43e832c913b2375f3f6d124cc3b Author: Uwe Kleine-König Date: Wed Mar 15 16:05:06 2023 +0100 ASoC: adi: axi-spdif: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-15-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 711c5b4e36a3345cd0de597a9c5b7f5911abfd51 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:05 2023 +0100 ASoC: adi: axi-i2s: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-14-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit a0f4aa0a9f841693a6487315751c12a2f5773574 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:04 2023 +0100 ALSA: sh_dac_audio: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-13-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit de0f49b86d12384e8f3ddf7dc651a93c2c0c551b Author: Uwe Kleine-König Date: Wed Mar 15 16:05:03 2023 +0100 ALSA: sh: aica: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-12-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit c3d8cb1929fc64e8c3d14f27e9540e72aee8ed08 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:02 2023 +0100 ALSA: ppc/powermac: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-11-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit d8a3441b53682883c16d6997d059e1cc2ac739c8 Author: Uwe Kleine-König Date: Wed Mar 15 16:05:01 2023 +0100 ALSA: hda/tegra: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-10-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 0505c87c00e8e0adb64c9cfb97ea4882899bea3e Author: Uwe Kleine-König Date: Wed Mar 15 16:05:00 2023 +0100 ALSA: mips/sgio2audio: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-9-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit b54a2377ec02d52b7bb5dab381e9a45ba0bc617a Author: Uwe Kleine-König Date: Wed Mar 15 16:04:59 2023 +0100 ALSA: mips/hal2: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-8-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 962bdc9645036b1300c4930e147b5e9a0c587c81 Author: Uwe Kleine-König Date: Wed Mar 15 16:04:58 2023 +0100 ALSA: portman2x4: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-7-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 5909d9e5b6c927ea91ace61365049a2f365a7d7e Author: Uwe Kleine-König Date: Wed Mar 15 16:04:57 2023 +0100 ALSA: mts64: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-6-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 45cc35e81322117dfc27fbfded2e0263018175a0 Author: Uwe Kleine-König Date: Wed Mar 15 16:04:56 2023 +0100 ALSA: atmel: ac97: 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 (mostly) ignored 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. 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: Claudiu Beznea Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-5-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 3210e62ab2f63b3ecdacc2c06ca8c8a91d1bf656 Author: Uwe Kleine-König Date: Wed Mar 15 16:04:55 2023 +0100 ALSA: pxa2xx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-4-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 9ac0d69ee5891c2d0f0425acbb13993ceef9cd12 Author: Uwe Kleine-König Date: Wed Mar 15 16:04:54 2023 +0100 ASoC: amd: acp: rembrandt: Drop if blocks with always false condition rembrandt_audio_remove() is only called after a successful call to rembrandt_audio_probe(). With the latter it's sure that dev_get_platdata() returns a non-NULL value and also that ->base is non-NULL. So the corresponding check can be dropped. While touching these lines join declaration and assignment into a single line and make use of dev = &pdev->dev; This prepares converting platform driver remove callbacks to return void. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-3-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit e3a8459d726532be70fa917e39812570618b857e Author: Uwe Kleine-König Date: Wed Mar 15 16:04:53 2023 +0100 ALSA: sh: aica: Drop if blocks with always false condition snd_aica_remove() is only called after a successful call to snd_aica_probe(). With the latter it's sure that platform_set_drvdata() was called with a non-NULL argument. So platform_get_drvdata() won't return NULL and the check can be dropped. This prepares converting platform driver remove callbacks to return void. Signed-off-by: Uwe Kleine-König Acked-by: Takashi Iwai Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230315150745.67084-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 85a375fe8df906b2701346e03e71501e6861a75a Author: Svyatoslav Ryhel Date: Wed Mar 8 09:35:01 2023 +0200 ASoC: nvidia,tegra-audio: add MAX9808x CODEC Add dt-binding for MAX9808x CODEC. Signed-off-by: Svyatoslav Ryhel Link: https://lore.kernel.org/r/20230308073502.5421-8-clamor95@gmail.com Signed-off-by: Mark Brown commit 2060c9b8ae2a1f6abec483709f4209b6e3602b89 Author: David Heidelberg Date: Wed Mar 8 09:34:58 2023 +0200 ASoC: nvidia,tegra-audio: add RT5631 CODEC Add dt-binding for RT5631 CODEC. Signed-off-by: David Heidelberg Signed-off-by: Svyatoslav Ryhel Link: https://lore.kernel.org/r/20230308073502.5421-5-clamor95@gmail.com Signed-off-by: Mark Brown commit 2a7a8ebe85e1fa7e929f6f986a61f10321093c43 Author: Svyatoslav Ryhel Date: Wed Mar 8 09:34:55 2023 +0200 ASoC: nvidia,tegra-audio-common: add coupled-mic-hp-detect property Add nvidia,coupled-mic-hp-det property to use Mic detect GPIO only if HP GPIO is in active state. Acked-by: Rob Herring Signed-off-by: Svyatoslav Ryhel Link: https://lore.kernel.org/r/20230308073502.5421-2-clamor95@gmail.com Signed-off-by: Mark Brown commit d007a87bd7d181854b53b3e7fcbcf66c4bef86b2 Author: Svyatoslav Ryhel Date: Wed Mar 8 09:35:02 2023 +0200 ASoC: tegra: Support MAX9808x by machine driver Add Maxim MAX9808x codec support to the Tegra ASoC machine driver. This codec is found on LG T30 devices like Optimus 4X HD and Optimus Vu. Signed-off-by: Svyatoslav Ryhel Link: https://lore.kernel.org/r/20230308073502.5421-9-clamor95@gmail.com Signed-off-by: Mark Brown commit 44b2fc2edb61e956885b4305bddaaec7f05d93d2 Author: Svyatoslav Ryhel Date: Wed Mar 8 09:34:59 2023 +0200 ASoC: tegra: Support RT5631 by machine driver Add Realtek ALC5631/RT5631 codec support to the Tegra ASoC machine driver. The RT5631 codec is found on devices like ASUS Transformer TF201, TF700T and other Tegra-based Android tablets. Signed-off-by: Ion Agorria Signed-off-by: Svyatoslav Ryhel Link: https://lore.kernel.org/r/20230308073502.5421-6-clamor95@gmail.com Signed-off-by: Mark Brown commit eb0b8481c2e03a5ae01f6bea60b42109bd12b6fe Author: Svyatoslav Ryhel Date: Wed Mar 8 09:34:56 2023 +0200 ASoC: tegra: Support coupled mic-hp detection This quirk is used for cases when there is GPIO which detects any type of 3.5 Jack insertion and actual type of jack is defined by other GPIO. 3.5 Jack GPIO generates interrupt and MIC GPIO indicates type of Jack only if 3.5 Jack GPIO is active. Signed-off-by: Svyatoslav Ryhel Link: https://lore.kernel.org/r/20230308073502.5421-3-clamor95@gmail.com Signed-off-by: Mark Brown commit 84a59a314263c21de1b308abda7f7eea92da740d Author: Mark Brown Date: Mon Mar 6 17:05:35 2023 +0000 phy: xgene: Depend on ARCH_XGENE rather than plain arm64 The X-Gene PHY driver is unlikely to be useful on a kernel without general X-Gene support enabled but currently only depends on arm64 rather than the specific platform support. Narrow the dependency to ARCH_XGENE like we do for other X-Gene specific drivers to ensure that users who have configured down the set of platforms enabled don't see the option. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230221-phy-build-deps-v1-1-7091bcbd16b0@kernel.org Signed-off-by: Vinod Koul commit e3be4dd2c8d8aabfd2c3127d0e2e5754d3ae82d6 Author: Alain Volmat Date: Fri Feb 10 23:43:08 2023 +0100 phy: st: miphy28lp: use _poll_timeout functions for waits This commit introduces _poll_timeout functions usage instead of wait loops waiting for a status bit. Signed-off-by: Alain Volmat Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20230210224309.98452-1-avolmat@me.com Signed-off-by: Vinod Koul commit 8b798761243bf854cbf706fcfc21798726ff587a Author: Henry Lin Date: Thu Mar 9 14:17:08 2023 +0800 phy: tegra: xusb: Support sleepwalk for Tegra234 Add new registers programming in sleepwalk sequence for Tegra234: MASTER_ENABLE_A/B/C/D in XUSB_AO_UTMIP_SLEEPWALK. Signed-off-by: Henry Lin Signed-off-by: Haotien Hsu Link: https://lore.kernel.org/r/20230309061708.4156383-1-haotienh@nvidia.com Signed-off-by: Vinod Koul commit 5e4d267f9bc9274f8050a5ea8d4618c7f05e12eb Author: Krzysztof Kozlowski Date: Sun Mar 12 14:26:11 2023 +0100 phy: st: spear: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes !CONFIG_OF error: drivers/phy/st/phy-spear1310-miphy.c:172:34: error: ‘spear1310_miphy_of_match’ defined but not used [-Werror=unused-const-variable=] drivers/phy/st/phy-spear1340-miphy.c:182:34: error: ‘spear1340_miphy_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230312132611.352654-2-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 8a65acdd43def7ebd9b51d21ca80bc4d4a55583f Author: Krzysztof Kozlowski Date: Sun Mar 12 14:26:10 2023 +0100 phy: marvell: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes !CONFIG_OF error: drivers/phy/marvell/phy-pxa-28nm-hsic.c:192:34: error: ‘mv_hsic_phy_dt_match’ defined but not used [-Werror=unused-const-variable=] drivers/phy/marvell/phy-pxa-28nm-usb2.c:324:34: error: ‘mv_usbphy_dt_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230312132611.352654-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 8e9930e14d040bde33a11a62eee8c3c6981c7126 Author: Rob Herring Date: Fri Mar 10 08:47:20 2023 -0600 phy: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230310144720.1544600-1-robh@kernel.org Signed-off-by: Vinod Koul commit a01c9d19422e486578d7cfdf799e464025417eab Author: Uwe Kleine-König Date: Tue Mar 7 12:59:00 2023 +0100 phy: ti: phy-twl4030-usb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-32-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit c29d42577608080d83e488c6cc0b8d6835adeeb4 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:59 2023 +0100 phy: ti: phy-ti-pipe3: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-31-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 5566da719432a4821bda342a314b693f2b451693 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:58 2023 +0100 phy: ti: phy-omap-usb2: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-30-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit db850ea9fc746090a0567d6dbf6888a9225bcfb1 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:57 2023 +0100 phy: ti: phy-j721e-wiz: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-29-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 13e1f73503abf52abca76843dc5050d6e4d221df Author: Uwe Kleine-König Date: Tue Mar 7 12:58:56 2023 +0100 phy: ti: phy-dm816x-usb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-28-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 0196c847236a84535d92b04a79d694ae063c6f68 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:55 2023 +0100 phy: ti: phy-da8xx-usb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-27-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit b1d9ad66587110fe35f6c2b2cd176c11a400ad24 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:54 2023 +0100 phy: ti: phy-am654-serdes: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-26-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 80460691c16b74896f536067863f13b5e693dede Author: Uwe Kleine-König Date: Tue Mar 7 12:58:53 2023 +0100 phy: tegra: xusb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-25-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 31d0d4e0222b69b33b93ee45637cc18c690449a3 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:52 2023 +0100 phy: st: phy-stm32-usbphyc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-24-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 1d558e55e01651e9add409a6fb652205e8dd9f92 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:51 2023 +0100 phy: rockchip: phy-rockchip-typec: 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 (mostly) ignored 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. 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: Heiko Stuebner Link: https://lore.kernel.org/r/20230307115900.2293120-23-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit cb1161c0c18dc396665a83af00e5397c4895422e Author: Uwe Kleine-König Date: Tue Mar 7 12:58:50 2023 +0100 phy: rockchip: phy-rockchip-inno-hdmi: 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 (mostly) ignored 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. 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: Heiko Stuebner Link: https://lore.kernel.org/r/20230307115900.2293120-22-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 497a38322ac9830b79da97e6a2a2255d0520a5d7 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:49 2023 +0100 phy: rockchip: phy-rockchip-inno-dsidphy: 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 (mostly) ignored 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. 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: Heiko Stuebner Link: https://lore.kernel.org/r/20230307115900.2293120-21-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit b41f07b2010c65f9a3e95b0d60ae9eca6272c107 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:48 2023 +0100 phy: rockchip: phy-rockchip-inno-csidphy: 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 (mostly) ignored 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. 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: Heiko Stuebner Link: https://lore.kernel.org/r/20230307115900.2293120-20-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit f1c01b91e56b5716eff573bdefbb771ac1d133b7 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:47 2023 +0100 phy: renesas: r8a779f0-ether-serdes: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-19-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 8e593a223eadbae6b5e42b8821d1917f230b288e Author: Uwe Kleine-König Date: Tue Mar 7 12:58:46 2023 +0100 phy: renesas: phy-rcar-gen3-usb3: 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 (mostly) ignored 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. 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: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230307115900.2293120-18-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit c7ac6dff31fab4ac334f3c6780286f05ea77eea4 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:45 2023 +0100 phy: renesas: phy-rcar-gen3-usb2: 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 (mostly) ignored 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. 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: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230307115900.2293120-17-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit aba5c6f3eccf930dcd5c55f21b191e6f7d806c53 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:44 2023 +0100 phy: renesas: phy-rcar-gen3-pcie: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-16-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit de6862d1bdfafaf0369b3abb648c02a621783172 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:43 2023 +0100 phy: qualcomm: phy-qcom-ipq806x-sata: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-15-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit e5ce6d9d654d36329490c863645cdcd0bc36b64e Author: Uwe Kleine-König Date: Tue Mar 7 12:58:42 2023 +0100 phy: qualcomm: phy-qcom-eusb2-repeater: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-14-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 64299241b4c014d12109866e1a0934bbd13df238 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:41 2023 +0100 phy: qualcomm: phy-qcom-apq8064-sata: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-13-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit cbed624f3e4d9c55fb91ec2194cab69dffd30abd Author: Uwe Kleine-König Date: Tue Mar 7 12:58:40 2023 +0100 phy: phy-lgm-usb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-12-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 91537c86c5203163bc671d79e941ca06eacd1a95 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:39 2023 +0100 phy: motorola: phy-mapphone-mdm6600: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-11-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit dd5c724e09f91ba7b08054f754abe3b6e14c3e7b Author: Uwe Kleine-König Date: Tue Mar 7 12:58:38 2023 +0100 phy: motorola: phy-cpcap-usb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-10-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 30850b6e2bbd922f18a7d84666b021aa5e14af65 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:37 2023 +0100 phy: mediatek: phy-mtk-mipi-dsi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-9-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 2637959428c90ee99a2103d6d6a3994602cf9f85 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:36 2023 +0100 phy: intel: phy-intel-lgm-combo: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-8-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 780d771d7fbfcef1a554521dc86cd4d94039eee9 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:35 2023 +0100 phy: freescale: phy-fsl-imx8qm-lvds-phy: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-7-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit e758fbbc0aa1014e29c0f4ca050ad09a0835197b Author: Uwe Kleine-König Date: Tue Mar 7 12:58:34 2023 +0100 phy: cadence: phy-cadence-torrent: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-6-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit e9ddb1ad98130d542c9f0d5dbfa6c833420a03ab Author: Uwe Kleine-König Date: Tue Mar 7 12:58:33 2023 +0100 phy: cadence: phy-cadence-sierra: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-5-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 7b23fd5c835298a846f3f18dfdcfa95ef34172c4 Author: Uwe Kleine-König Date: Tue Mar 7 12:58:32 2023 +0100 phy: cadence: cdns-dphy: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230307115900.2293120-4-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit b762d7d39d32859728f4d847c3f3c9705833f6dd Author: Uwe Kleine-König Date: Tue Mar 7 12:58:31 2023 +0100 phy: broadcom: phy-brcm-usb: 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 (mostly) ignored 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. 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: Justin Chen Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20230307115900.2293120-3-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit b4700ed86f00d1917f5219c861f425f92af1a7ef Author: Uwe Kleine-König Date: Tue Mar 7 12:58:30 2023 +0100 phy: allwinner: phy-sun4i-usb: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230307115900.2293120-2-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 364c748d5e085a4cf425bbca90482e8df77d022e Author: Manivannan Sadhasivam Date: Wed Mar 8 13:54:23 2023 +0530 phy: qcom-qmp-pcie: Add RC init sequence for SDX55 Add PCIe RC init sequence making use of the common init sequence. The RC mode additionally requires REFCLK_DRV_DSBL bit to set during powerup and powerdown. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230308082424.140224-13-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit 458aa82041ce3cd46ff5f9afd078f62a683daa28 Author: Manivannan Sadhasivam Date: Wed Mar 8 13:54:22 2023 +0530 phy: qcom-qmp-pcie: Split out EP related init sequence for SDX55 In preparation for adding RC support, let's split out the EP related init sequence so that the common sequence could be reused by RC as well. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230308082424.140224-12-manivannan.sadhasivam@linaro.org Signed-off-by: Vinod Koul commit 28a4f5609c9aad29f921850d3fe58bec5074c86c Author: Maíra Canal Date: Wed Feb 22 13:06:17 2023 -0300 drm/vgem: Drop struct drm_vgem_gem_object Commit 45d9c8dde4cd ("drm/vgem: use shmem helpers") introduced shmem helpers to vgem and with that, removed all uses of the struct drm_vgem_gem_object. So, as the struct is no longer used, delete it. Signed-off-by: Maíra Canal Reviewed-by: Melissa Wen Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230222160617.171429-1-mcanal@igalia.com commit 749b30efffe58dc59c39c32673ac03010f822581 Author: Petr Tesarik Date: Fri Feb 24 13:09:31 2023 +0100 drm/prime: Fix documentation of drm_gem_prime_fd_to_handle() The DRM device passed to drm_gem_prime_fd_to_handle() is where the dma-buf is being imported, not the device where it was exported. Also fix a trivial typo in drm_gem_prime_import_dev(). Signed-off-by: Petr Tesarik Reviewed-by: Simon Ser Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20230224120931.1024-1-petrtesarik@huaweicloud.com commit 25b800631773163a0bbf8b761d7ea4f921f3cfba Author: Sebastian Reichel Date: Fri Mar 17 23:56:54 2023 +0100 dt-bindings: power: supply: adc-battery: add binding Add binding for a battery that is only monitored via ADC channels and simple status GPIOs. Reviewed-by: Matti Vaittinen Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 67fcd5d2f3ec364cb7af2c307ed1999bedebb606 Author: Uwe Kleine-König Date: Sat Mar 18 20:08:04 2023 +0100 drm/bridge: ti-tfp410: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-20-u.kleine-koenig@pengutronix.de commit 5e3ea76492265fdbadd7a58963ff2a3a2e2e8be4 Author: Uwe Kleine-König Date: Sat Mar 18 20:08:03 2023 +0100 drm/bridge: thc63lvd1024: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-19-u.kleine-koenig@pengutronix.de commit ed58ee126c4da81af79ab40b7c6508a7100c7eac Author: Uwe Kleine-König Date: Sat Mar 18 20:08:02 2023 +0100 drm/bridge: dw-hdmi-i2s-audio: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-18-u.kleine-koenig@pengutronix.de commit 2b9efaed4e4045a40944265f99f52b232df3347f Author: Uwe Kleine-König Date: Sat Mar 18 20:08:01 2023 +0100 drm/bridge: dw-hdmi-gp-audio: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-17-u.kleine-koenig@pengutronix.de commit 8891698273b125e57d0d2b6a91451bac06e968be Author: Uwe Kleine-König Date: Sat Mar 18 20:08:00 2023 +0100 drm/bridge: dw-hdmi-cec: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-16-u.kleine-koenig@pengutronix.de commit e85f436824f2e2e067c0a151e954cb403b483234 Author: Uwe Kleine-König Date: Sat Mar 18 20:07:59 2023 +0100 drm/bridge: dw-hdmi-ahb-audio: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-15-u.kleine-koenig@pengutronix.de commit 3fce4c948e2b73ba6f6f2aa7e1c2f101b997e192 Author: Uwe Kleine-König Date: Sat Mar 18 20:07:58 2023 +0100 drm/bridge: simple-bridg: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-14-u.kleine-koenig@pengutronix.de commit 6780b94d8ed37a0f453a5bc90821ea669ac3c0d2 Author: Uwe Kleine-König Date: Sat Mar 18 20:07:57 2023 +0100 drm/bridge: nwl-dsi: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-13-u.kleine-koenig@pengutronix.de commit f328e96b764a603b3b70f0e9ef6ee052a78ed2ad Author: Uwe Kleine-König Date: Sat Mar 18 20:07:56 2023 +0100 drm/bridge: lvds-codec: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-12-u.kleine-koenig@pengutronix.de commit 23a92abbf3ad44058b5d3cf57937cfb9de972c05 Author: Uwe Kleine-König Date: Sat Mar 18 20:07:55 2023 +0100 drm/bridge: imx8qxp-pxl2dpi: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-11-u.kleine-koenig@pengutronix.de commit 2b438065c3e538844a3b2b56f567303020bf97de Author: Uwe Kleine-König Date: Sat Mar 18 20:07:54 2023 +0100 drm/bridge: imx8qxp-pixel-link: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-10-u.kleine-koenig@pengutronix.de commit b931c166c47207c8c7bc7eda6c8881dfe0241389 Author: Uwe Kleine-König Date: Sat Mar 18 20:07:53 2023 +0100 drm/bridge: imx8qxp-pixel-combiner: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-9-u.kleine-koenig@pengutronix.de commit 3a39841322be5502f5355a558617f0a56b2b3ad2 Author: Uwe Kleine-König Date: Sat Mar 18 20:07:52 2023 +0100 drm/bridge: imx8qxp-ldb: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-8-u.kleine-koenig@pengutronix.de commit 04751a061ea055c4fa264f20f4558073c3d8fb2e Author: Uwe Kleine-König Date: Sat Mar 18 20:07:51 2023 +0100 drm/bridge: imx8qm-ldb: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-7-u.kleine-koenig@pengutronix.de commit be5c6b177229c5cb40f3fef785250afbfd669175 Author: Uwe Kleine-König Date: Sat Mar 18 20:07:50 2023 +0100 drm/bridge: fsl-ldb: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-6-u.kleine-koenig@pengutronix.de commit d1837136d184dda0585a687c614a9117cc87ad27 Author: Uwe Kleine-König Date: Sat Mar 18 20:07:49 2023 +0100 drm/bridge: display-connector: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-5-u.kleine-koenig@pengutronix.de commit d5701d8f5210f8c70ffd1b51283b2373573e7b5a Author: Uwe Kleine-König Date: Sat Mar 18 20:07:47 2023 +0100 drm/bridge: cdns-dsi: 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 (mostly) ignored 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. 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: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230318190804.234610-3-u.kleine-koenig@pengutronix.de commit 56aecc0a655d997342ca85a3dd1f59715f2b3349 Author: Lukas Bulwahn Date: Mon Mar 20 08:32:01 2023 +0100 MAINTAINERS: remove file entry in NFC SUBSYSTEM after platform_data movement Commit 053fdaa841bd ("nfc: mrvl: Move platform_data struct into driver") moves the nfcmrvl.h header file from include/linux/platform_data to the driver's directory, but misses to adjust MAINTAINERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Just remove the file entry in NFC SUBSYSTEM, as the new location of the code is already covered by another pattern in that section. Fixes: 053fdaa841bd ("nfc: mrvl: Move platform_data struct into driver") Signed-off-by: Lukas Bulwahn Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 5fc3f6c90cca19e4b13433621d9c2dcae875f4d7 Author: Heiner Kallweit Date: Sat Mar 18 22:50:10 2023 +0100 r8169: consolidate disabling ASPM before EPHY access Now that rtl_hw_aspm_clkreq_enable() is a no-op for chip versions < 32, we can consolidate disabling ASPM before EPHY access in rtl_hw_start(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit c3892e8c51d27f73341eab042afa147a7ca2b966 Merge: 26271394cf2e9 be66fcc16ce67 Author: David S. Miller Date: Mon Mar 20 10:24:09 2023 +0000 Merge branch 'reuse-smsc-phy-functionality' Heiner Kallweit says: ==================== net: phy: reuse SMSC PHY driver functionality in the meson-gxl PHY driver The Amlogic Meson internal PHY's have the same register layout as certain SMSC PHY's (also for non-c22-standard registers). This seems to be more than just coincidence. Apparently they also need the same workaround for EDPD mode (energy detect power down). Therefore let's reuse SMSC PHY driver functionality in the meson-gxl PHY driver. ==================== Signed-off-by: David S. Miller commit be66fcc16ce677eaf4b119861d468dc1881a13aa Author: Heiner Kallweit Date: Sat Mar 18 21:36:04 2023 +0100 net: phy: meson-gxl: reuse functionality of the SMSC PHY driver The Amlogic Meson internal PHY's have the same register layout as certain SMSC PHY's (also for non-c22-standard registers). This seems to be more than just coincidence. Apparently they also need the same workaround for EDPD mode (energy detect power down). Therefore let's reuse SMSC PHY driver functionality in the meson-gxl PHY driver. Tested with a G12A internal PHY. I don't have GXL test hw, therefore I replace only the callbacks that are identical in the SMSC PHY driver. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit a69e332b4ef9f697a4558bab9c442a02b3659fcb Author: Heiner Kallweit Date: Sat Mar 18 21:32:41 2023 +0100 net: phy: smsc: export functions for use by meson-gxl PHY driver The Amlogic Meson internal PHY's have the same register layout as certain SMSC PHY's (also for non-c22-standard registers). This seems to be more than just coincidence. Apparently they also need the same workaround for EDPD mode (energy detect power down). Therefore let's export SMSC PHY driver functionality for use by the meson-gxl PHY driver. Signed-off-by: Heiner Kallweit Signed-off-by: Chris Healy Signed-off-by: David S. Miller commit b704eeae319608b48925869121c97c7bc1ea55fd Author: Thomas Zimmermann Date: Mon Mar 13 16:16:10 2023 +0100 drm/gma500: Pass fb_info to psb_fbdev_vm_fault() Instead of the DRM framebuffer, pass the FB info strcuture to the fbdev page-fault handler psb_fbdev_vm_fault(). The framebuffer is a high-level data structure and does not belong into fault handling. The fb_info has all necessary information. Also set fix.smem_start to the correct value (the beginning of the framebuffer in physical address space) and streamline the page-fault handler. v2: * remove unused struct drm_psb_private.fb_base (Patrik) Signed-off-by: Thomas Zimmermann Acked-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20230313151610.14367-8-tzimmermann@suse.de commit 8f1aaccb04b7cf63135f4e2748226dfa2fb01e3f Author: Thomas Zimmermann Date: Mon Mar 13 16:16:09 2023 +0100 drm/gma500: Implement client-based fbdev emulation Implement fbdevemulation on top of struct drm_client and its helpers. This ad-hoc interfaces for restoring and closing fbdev emulation with per-client callback for hotplugging, restoring and unregistering. A single function, psb_fbdev_setup(), starts fbdev emulation after the DRM device has been registered. Hence, fbdev acts like a regular DRM client. The setup call only prepares the fbdev emulation. It then implements connector hotplugging. The first successful hotplug event initializes fbdev emulation. Unregistering depends on the hotplugging. Fully initialized emulation is cleaned up through drm_fb_helper_unregister_info() and fb_destroy. For prepared-only setups, unregistering unprepares the emulation and releases all resources. In both cases, fbdev emulation will be cleaned up. v2: * declare empty setup function as 'static inline' (kernel test robot) Signed-off-by: Thomas Zimmermann Acked-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20230313151610.14367-7-tzimmermann@suse.de commit d19ccb4ca5436d7500f9fb47d71ea0bfecea52ce Author: Thomas Zimmermann Date: Mon Mar 13 16:16:08 2023 +0100 drm/gma500: Inline psbfb_create() into psbfb_probe() Inline psbfb_create() into its only caller psbfb_probe(). Streamline the color-depth selection. Also clean up the naming around struct drm_fb_helper_funcs. v2: * rename psbfb_probe() (Patrik) Signed-off-by: Thomas Zimmermann Acked-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20230313151610.14367-6-tzimmermann@suse.de commit a89c957a955e00d9eac726551cb9fb386be1057a Author: Thomas Zimmermann Date: Mon Mar 13 16:16:07 2023 +0100 drm/gma500: Fix naming in fb_ops Fix some names around struct fb_ops to better fit the overall naming conventions. No functional changes. v2: * fix typo in commit message Signed-off-by: Thomas Zimmermann Acked-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20230313151610.14367-5-tzimmermann@suse.de commit 8261dd979e801a29f96e4996112eaaa65c04ea24 Author: Thomas Zimmermann Date: Mon Mar 13 16:16:06 2023 +0100 drm/gma500: Remove fbdev vma open and close callbacks Remove fbdev emulations' open and close implementaitons for the VM. The functions are empty. Also update the naming of the VMA code. Signed-off-by: Thomas Zimmermann Acked-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20230313151610.14367-4-tzimmermann@suse.de commit b8bbbea1ae6441aaa2439f4fb5fb757d513833e1 Author: Thomas Zimmermann Date: Mon Mar 13 16:16:05 2023 +0100 drm/gma500: Move fbdev code into separate source file Move the fbdev emulation from framebuffer.c to fbdev.c. Only build the source code if the Kconfig symbol has been selected. Remaining in framebuffer.c is gma500's code for DRM framebuffers. No functional changes. v2: * remove 'extern' from function declaration (Patrik) * declare empty init/fini functions as 'static inline' (kernel test robot) * rebase onto vm_flags_set() * typo fixes in commit message Signed-off-by: Thomas Zimmermann Acked-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20230313151610.14367-3-tzimmermann@suse.de commit 556d5a2d4268e3ce860e85e032859ada1c64e1b0 Author: Thomas Zimmermann Date: Mon Mar 13 16:16:04 2023 +0100 drm/gma500: Remove unnecessary include statements Remove unnecessary include statements from framebuffer.c. No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20230313151610.14367-2-tzimmermann@suse.de commit d28d86a07dbca4b6e33032196ef4a9a7121181b4 Author: Heiko Carstens Date: Fri Mar 17 14:51:41 2023 +0100 s390/mm: make use of atomic_fetch_xor() Make use of atomic_fetch_xor() instead of an atomic_cmpxchg() loop to implement atomic_xor_bits() (aka atomic_xor_return()). This makes the C code more readable and in addition generates better code, since for z196 and newer a single lax instruction is generated instead of a cmpxchg() loop. Signed-off-by: Heiko Carstens commit 038c5bedbc313b55f66b26fda5a7808727c2f177 Author: Harald Freudenberger Date: Wed Feb 15 15:08:15 2023 +0100 s390/ap: add ap status asynch error support Review and extend the low level AP code to be able to deal with asynchronous reported errors on APQNs. The hypervisor and the SE guest may be confronted with an asynchronously reported error at return of an AP instruction. So all places where AP instructions are called need review and may eventually need extensions. However, not all places need rework. As together with the AP status and the enabled asynch bit there is always a response code set. The asynch error reporting comes with new response codes which may be simple handled in the default case of a switch statement. The idea behind this patch is to report asynch errors as -EPERM (read this as "Operation not permitted") which reflects the fact that only a rapq (with F bit enabled) is a valid AP instruction when an asynch error is flagged. The AP queue state machine functions return AP_SM_WAIT_NONE when a asynch error is detected to reflect the fact, that the state machine can't do anything with such an error as long as the queue is reset. Unfortunately the ap bus scan function needed some update as the ap_queue_info() now needs to return 3 states: 1 if an APQN exists and info is available, -1 if it is assumed an APQN does not exist and the new return value 0 without any info values filled. This 0 returncode is handled as "there is an APQN but we currently don't know any more hw info about this, so please use your previous info and try again later". Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Signed-off-by: Heiko Carstens commit 2d72eaf036d2f2b7ec16cda2d0e7ce292537dad9 Author: Harald Freudenberger Date: Fri Mar 10 17:46:49 2023 +0100 s390/ap: implement SE AP bind, unbind and associate Implementation of the new functions for SE AP support: bind, unbind and associate. There are two new sysfs attributes for this: /sys/devices/ap/cardxx/xx.yyyy/se_bind /sys/devices/ap/cardxx/xx.yyyy/se_associate Writing a 1 into the se_bind attribute triggers the SE AP bind for this AP queue, writing a 0 into does an unbind - that's a reset (RAPQ) with the F bit enabled. The se_associate attribute needs an integer value in range 0...2^16-1 written in. This is the index into a secrets table feed into the ultravisor. For more details please see the Architecture documents. These both new ap queue attributes are only visible inside a SE guest with SB (Secure Binding) available. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Signed-off-by: Heiko Carstens commit 263c8454dbffd4b878ea9bb403e157a56de98aca Author: Harald Freudenberger Date: Fri Oct 21 15:41:00 2022 +0200 s390/ap: introduce low frequency polling possibility For some events the ap bus needs to poll. For example when an AP queue is reset until the reset is through. Also when no interrupt support is available (e.g. zVM) there is a need to poll until all requests have been processed and all replies have been delivered. Polling is done with a high resolution timer by default run with a rate of 4kHz (LPAR) or 666Hz (zVM guest). For some events (wait for reset complete, wait for irq enabled complete) this is a much too high poll rate which triggers a lot of TAPQ invocations. This patch introduces the possibility for the state machine functions to return a new wait enum AP_SM_WAIT_LOW_TIMEOUT which gives a hint to the ap_wait() function to eventually set up the timer with a more relaxed timeout value of 25Hz. This patch also includes a slight rework of the sysfs functions parsing the timer related stuff: Use of kstrtobool and kstrtoul instead of sscanf. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Signed-off-by: Heiko Carstens commit c81cf436e47c34d2ff29e1b3db296f00d55b1c6f Author: Harald Freudenberger Date: Wed Sep 7 19:05:18 2022 +0200 s390/ap: new low level inline functions ap_bapq() and ap_aapq() Introduce two new low level functions ap_bapq() (calls PQAP(BAPQ)) and ap_aapq (calls PQAP(AAPQ)). Both functions are only meant to be used in SE environment with the SE AP binding facility available. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Signed-off-by: Heiko Carstens commit 4bdf3c3956d863b6823daa185ee3ce3e3a432cf3 Author: Harald Freudenberger Date: Wed Sep 7 18:04:03 2022 +0200 s390/ap: provide F bit parameter for ap_rapq() and ap_zapq() Extent the ap inline functions ap_rapq() (calls PQAP(RAPQ)) and ap_zapq() (calls PQAP(ZAPQ)) with a new parameter to enable the new architectured F bit which forces an unassociate and/or unbind on a secure execution associated and/or bound queue. Signed-off-by: Harald Freudenberger Reviewed-by: Tony Krowiak Reviewed-by: Holger Dengler Signed-off-by: Heiko Carstens commit 088174960ebc197fab8af9b99e039bc5c0aa34e7 Author: Harald Freudenberger Date: Wed Sep 7 17:25:45 2022 +0200 s390/ap: filter ap card functions, new queue functions attribute With SE SB (Secure Binding) some currently unused and thus always zero bits in the TAPQ GR2 result are now used to show the binding state of a queue. So to check if a card has changed the comparing base is exactly this GR2 value shown as 'ap_function' in sysfs (/sys/devices/ap/cardxx/ap_functions). Now there is some queue specific info in this info and so a new mask TAPQ_CARD_FUNC_CMP_MASK is used to filter out only the relevant bits for card compare. For the same reason now the function bits (including exactly this bind/associate information) need to be exposed to user space now. So tools like lszcrypt can evaluate binding/association state on a queue base. So here comes a new sysfs attribute /sys/devices/ap/cardxx/xx.yyyy/ap_functions This sysfs attribute is similar to the already existing ap_functions attribute at ap card level. It shows the upper 32 bits of GR2 from an invocation of TAPQ for this AP queue. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Signed-off-by: Heiko Carstens commit 211c06d845a7a5d856e2a99276ceb02aaa11c618 Author: Harald Freudenberger Date: Mon Sep 12 18:02:44 2022 +0200 s390/ap: make tapq gr2 response a struct This patch introduces a new struct ap_tapq_gr2 which covers the response in GR2 on TAPQ invocation. This makes it much easier and less error-prone for the calling functions to access the right field without shifting and masking. Signed-off-by: Harald Freudenberger Reviewed-by: Tony Krowiak Reviewed-by: Holger Dengler Signed-off-by: Heiko Carstens commit d7b1813af6a589597290cd5f720e138c0a2bf913 Author: Harald Freudenberger Date: Tue Sep 20 15:18:39 2022 +0200 s390/ap: introduce new AP bus sysfs attribute features Introduce a new AP bus sysfs attribute /sys/bus/ap/features which shows the features from the QCI information. Currently these feature bits are evaluated: - QCI S bit is shown as 'APSC' - QCI N bit is shown as 'APXA' - QCI C bit is shown as 'QACT' - QCI R bit is shown as 'RC8A' - QCI B bit is shown as 'APSB' Signed-off-by: Harald Freudenberger Reviewed-by: Tony Krowiak Reviewed-by: Holger Dengler Signed-off-by: Heiko Carstens commit f6047040217babeb9655b855c83d61cb1c375ac9 Author: Harald Freudenberger Date: Tue Sep 20 15:12:01 2022 +0200 s390/ap: exploit new B bit from QCI config info This patch introduces an update to the ap_config_info struct which is filled with the QCI subfunction. There is a new bit apsb (short 'B') showing if the AP secure bind facility is available. The patch also includes a simple function ap_sb_available() wrapping this bit test. Signed-off-by: Harald Freudenberger Reviewed-by: Tony Krowiak Reviewed-by: Holger Dengler Signed-off-by: Heiko Carstens commit 964d581daf46a1e65af220786104c6db88f833aa Author: Harald Freudenberger Date: Mon Feb 6 10:53:08 2023 +0100 s390/zcrypt: replace scnprintf with sysfs_emit Replace scnprintf() with sysfs_emit() and friends where possible. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Reviewed-by: Tony Krowiak Signed-off-by: Heiko Carstens commit 8794c5961394b7fb8a69f43eaad9566e5496c0c8 Author: Harald Freudenberger Date: Tue Feb 14 17:13:18 2023 +0100 s390/zcrypt: rework length information for dqap The inline ap_dqap function does not return the number of bytes actually written into the message buffer. The calling code inspects the AP message header to figure out what kind of AP message has been received and pulls the length information from this header. This processing may not work correctly in cases where only a fragment of the reply is received. With this patch the ap_dqap inline function now returns the number of actually written bytes in the *length parameter. So the calling function has a chance to compare the number of received bytes against what the AP message header length field states. This is especially useful in cases where a message could only get partially received. The low level reply processing functions needed some rework to be able to catch this new length information and compare it the right way. The rework also deals with some situations where until now the reply length was not correctly calculated and/or set. All this has been heavily tested as the modifications on the reply length information may affect crypto load. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Signed-off-by: Heiko Carstens commit 003d248fee72eb8d86aefaf3b6e47fe8acfda0b6 Author: Harald Freudenberger Date: Sun Jan 29 19:45:25 2023 +0100 s390/zcrypt: make psmid unsigned long instead of long long Since s390 kernel build does not support 32 bit build any more there is no difference between long and long long. So this patch reworks all occurrences of psmid (a 64 bit value) to use unsigned long now. Signed-off-by: Harald Freudenberger Acked-by: Heiko Carstens Reviewed-by: Holger Dengler Signed-off-by: Heiko Carstens commit 322a7ce7a62f0593160bb80f5fba52d64967b92f Author: Heiko Carstens Date: Mon Mar 13 13:50:39 2023 +0100 s390: enable DEBUG_FORCE_FUNCTION_ALIGN_64B Allow to enforce 64 byte function alignment like it is possible for a couple of other architectures. This may or may not be helpful for debugging performance problems, as described with the Kconfig option. Since the kernel works also with 64 byte function alignment there is no reason for not allowing to enforce this function alignment. Signed-off-by: Heiko Carstens commit c2272b2d3b164a02929c0ce9ffed35c4fe8fbe40 Author: Heiko Carstens Date: Mon Mar 13 13:50:38 2023 +0100 s390/vdso: use __ALIGN instead of open coded .align Use __ALIGN instead of open coded .align statement to make sure that vdso code follows global kernel function alignment rules. Signed-off-by: Heiko Carstens commit 91a0117dce08a635d48b6016c5af354edde2082b Author: Heiko Carstens Date: Mon Mar 13 13:50:37 2023 +0100 s390/expoline: use __ALIGN instead of open coded .align Use __ALIGN instead of open coded .align statement to make sure that external expoline thunks follow global function alignment rules. Signed-off-by: Heiko Carstens commit dfa2a72cdbfc3b7cda196b3389579cff88201ce6 Author: Heiko Carstens Date: Mon Mar 13 13:50:36 2023 +0100 s390/ftrace: move hotpatch trampolines to mcount.S Move the ftrace hotpatch trampolines to mcount.S. This allows to make use of the standard SYM_CODE macros which again makes sure that the hotpatch trampolines follow the function alignment rules of the rest of the kernel. Signed-off-by: Heiko Carstens Acked-by: Ilya Leoshkevich Signed-off-by: Heiko Carstens commit 6ef55060a1cc29dd54ff390f22cb3de266dab2b0 Author: Heiko Carstens Date: Mon Mar 13 13:50:35 2023 +0100 s390: make use of CONFIG_FUNCTION_ALIGNMENT Make use of CONFIG_FUNCTION_ALIGNMENT which was introduced with commit d49a0626216b ("arch: Introduce CONFIG_FUNCTION_ALIGNMENT"). Select FUNCTION_ALIGNMENT_8B for gcc in order to reflect gcc's default function alignment. For all other compilers, which is only clang, select a function alignment of 16 bytes which reflects the default function alignment for clang. Also change the __ALIGN define to follow whatever the value of CONFIG_FUNCTION_ALIGNMENT is. This makes sure that the alignment of C and assembler functions is the same. In result everything still uses the default function alignment for both compilers. However in addition this is now also true for all assembly functions, so that all functions have a consistent alignment. Signed-off-by: Heiko Carstens commit e5323477e66c0e2cf9363646e8a84e98e8c79f43 Merge: 7229ea86e0a0e 557b19709da97 Author: Heiko Carstens Date: Mon Mar 20 11:04:10 2023 +0100 Merge branch 'decompressor-memory-tracking' into features Vasily Gorbik says: =================== Combine and generalize all methods for finding unused memory in decompressor, while decreasing complexity, add memory holes support, while improving error handling (especially in low-memory conditions) and debug-ability. =================== Signed-off-by: Heiko Carstens commit 557b19709da97bc93ea5cf61926ca05800c15a13 Author: Vasily Gorbik Date: Thu Feb 9 22:05:11 2023 +0100 s390/kasan: move shadow mapping to decompressor Since regular paging structs are initialized in decompressor already move KASAN shadow mapping to decompressor as well. This helps to avoid allocating KASAN required memory in 1 large chunk, de-duplicate paging structs creation code and start the uncompressed kernel with KASAN instrumentation right away. This also allows to avoid all pitfalls accidentally calling KASAN instrumented code during KASAN initialization. Acked-by: Heiko Carstens Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit e4c31004d3348202d4bc0bcdf662bf9d9d3e11cb Author: Vasily Gorbik Date: Tue Feb 14 09:39:24 2023 +0100 s390/mm,pageattr: allow KASAN shadow memory Allow changing page table attributes for KASAN shadow memory ranges. Acked-by: Heiko Carstens Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit f913a6600491d3f478ea976a9be0fb1001476c10 Author: Vasily Gorbik Date: Thu Feb 2 13:59:36 2023 +0100 s390/boot: rework decompressor reserved tracking Currently several approaches for finding unused memory in decompressor are utilized. While "safe_addr" grows towards higher addresses, vmem code allocates paging structures top down. The former requires careful ordering. In addition to that ipl report handling code verifies potential intersections with secure boot certificates on its own. Neither of two approaches are memory holes aware and consistent with each other in low memory conditions. To solve that, existing approaches are generalized and combined together, as well as online memory ranges are now taken into consideration. physmem_info has been extended to contain reserved memory ranges. New set of functions allow to handle reserves and find unused memory. All reserves and memory allocations are "typed". In case of out of memory condition decompressor fails with detailed info on current reserved ranges and usable online memory. Linux version 6.2.0 ... Kernel command line: ... mem=100M Our of memory allocating 100000 bytes 100000 aligned in range 0:5800000 Reserved memory ranges: 0000000000000000 0000000003e33000 DECOMPRESSOR 0000000003f00000 00000000057648a3 INITRD 00000000063e0000 00000000063e8000 VMEM 00000000063eb000 00000000063f4000 VMEM 00000000063f7800 0000000006400000 VMEM 0000000005800000 0000000006300000 KASAN Usable online memory ranges (info source: sclp read info [3]): 0000000000000000 0000000006400000 Usable online memory total: 6400000 Reserved: 61b10a3 Free: 24ef5d Call Trace: (sp:000000000002bd58 [<0000000000012a70>] physmem_alloc_top_down+0x60/0x14c) sp:000000000002bdc8 [<0000000000013756>] _pa+0x56/0x6a sp:000000000002bdf0 [<0000000000013bcc>] pgtable_populate+0x45c/0x65e sp:000000000002be90 [<00000000000140aa>] setup_vmem+0x2da/0x424 sp:000000000002bec8 [<0000000000011c20>] startup_kernel+0x428/0x8b4 sp:000000000002bf60 [<00000000000100f4>] startup_normal+0xd4/0xd4 physmem_alloc_range allows to find free memory in specified range. It should be used for one time allocations only like finding position for amode31 and vmlinux. physmem_alloc_top_down can be used just like physmem_alloc_range, but it also allows multiple allocations per type and tries to merge sequential allocations together. Which is useful for paging structures allocations. If sequential allocations cannot be merged together they are "chained", allowing easy per type reserved ranges enumeration and migration to memblock later. Extra "struct reserved_range" allocated for chaining are not tracked or reserved but rely on the fact that both physmem_alloc_range and physmem_alloc_top_down search for free memory only below current top down allocator position. All reserved ranges should be transferred to memblock before memblock allocations are enabled. The startup code has been reordered to delay any memory allocations until online memory ranges are detected and occupied memory ranges are marked as reserved to be excluded from follow-up allocations. Ipl report certificates are a special case, ipl report certificates list is checked together with other memory reserves until certificates are saved elsewhere. KASAN required memory for shadow memory allocation and mapping is reserved as 1 large chunk which is later passed to KASAN early initialization code. Acked-by: Heiko Carstens Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 8c37cb7d4ffcc827a9484282691b018715a5ae1a Author: Vasily Gorbik Date: Wed Feb 8 18:11:25 2023 +0100 s390/boot: rename mem_detect to physmem_info In preparation to extending mem_detect with additional information like reserved ranges rename it to more generic physmem_info. This new naming also help to avoid confusion by using more exact terms like "physmem online ranges", etc. Acked-by: Heiko Carstens Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 53fcc7dbf17691d8eac382ee315970a75286dd4b Author: Vasily Gorbik Date: Wed Feb 15 14:27:45 2023 +0100 s390/boot: remove non-functioning image bootable check check_image_bootable() has been introduced with commit 627c9b62058e ("s390/boot: block uncompressed vmlinux booting attempts") to make sure that users don't try to boot uncompressed vmlinux ELF image in qemu. It used to be possible quite some time ago. That commit prevented confusion with uncompressed vmlinux image starting to boot and even printing kernel messages until it crashed. Users might have tried to report the problem without realizing they are doing something which was not intended. Since commit f1d3c5323772 ("s390/boot: move sclp early buffer from fixed address in asm to C") check_image_bootable() doesn't function properly anymore, as well as booting uncompressed vmlinux image in qemu doesn't really produce any output and crashes. Moving forward it doesn't make sense to fix check_image_bootable() anymore, so simply remove it. Acked-by: Alexander Gordeev Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit ee0285e13455fdbce5de315bdbe91b5f198a2a06 Author: Adam Ford Date: Sun Mar 19 07:55:24 2023 -0500 drm/bridge: adv7533: Fix adv7533_mode_valid for adv7533 and adv7535 When dynamically switching lanes was removed, the intent of the code was to check to make sure that higher speed items used 4 lanes, but it had the unintended consequence of removing the slower speeds for 4-lane users. This attempts to remedy this by doing a check to see that the max frequency doesn't exceed the chip limit, and a second check to make sure that the max bit-rate doesn't exceed the number of lanes * max bit rate / lane. Fixes: 9a0cdcd6649b ("drm/bridge: adv7533: remove dynamic lane switching from adv7533 bridge") Reviewed-by: Robert Foss Signed-off-by: Adam Ford Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20230319125524.58803-1-aford173@gmail.com commit 7229ea86e0a0ed117bbc9d1677003c0bb0a5d40e Author: Ilya Leoshkevich Date: Fri Mar 10 03:36:48 2023 +0100 s390/dumpstack: resolve userspace last_break report_user_fault() currently does not show which library last_break points to. Call print_vma_addr() to find out; the output now looks like this: Last Breaking-Event-Address: [<000003ffaa2a56e4>] libc.so.6[3ffaa180000+251000] For kernel it's unchanged: Last Breaking-Event-Address: [<000000000030fd06>] trace_hardirqs_on+0x56/0xc8 Signed-off-by: Ilya Leoshkevich Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 7db12246306ea601809f22b26d7c2093dd80e146 Author: Luis Chamberlain Date: Fri Mar 10 15:45:25 2023 -0800 s390: simplify dynamic sysctl registration for appldata_register_ops The routine appldata_register_ops() allocates a sysctl table with 4 entries. The firsts one, ops->ctl_table[0] is the parent directory with an empty entry following it, ops->ctl_table[1]. The next entry is for the ops->name and that is ops->ctl_table[2]. It needs an empty entry following that, and that is ops->ctl_table[3]. And so hence the kcalloc(4, sizeof(struct ctl_table), GFP_KERNEL). We can simplify this considerably since sysctl_register("foo", table) can create the parent directory for us if it does not exist. So we can just remove the first two entries and move back the ops->name to the first entry, and just use kcalloc(2, ...). [gor@linux.ibm.com: appldata_generic_handler fixup ctl_table index 2->0] Signed-off-by: Luis Chamberlain Link: https://lore.kernel.org/r/20230310234525.3986352-7-mcgrof@kernel.org Reviewed-by: Vasily Gorbik Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 7ddc873dcb1d05eaafceeb4a2afd53bbb31addb8 Author: Luis Chamberlain Date: Fri Mar 10 15:45:24 2023 -0800 s390: simplify one-level sysctl registration for page_table_sysctl There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Link: https://lore.kernel.org/r/20230310234525.3986352-6-mcgrof@kernel.org Reviewed-by: Vasily Gorbik Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 414b2a960e4373765987bdaeaafbccde6b6eb27b Author: Luis Chamberlain Date: Fri Mar 10 15:45:23 2023 -0800 s390: simplify one level sysctl registration for cmm_table There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Link: https://lore.kernel.org/r/20230310234525.3986352-5-mcgrof@kernel.org Reviewed-by: Vasily Gorbik Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 71cb8c00a2eb74b6c61374366fef4fd402faa692 Author: Luis Chamberlain Date: Fri Mar 10 15:45:22 2023 -0800 s390: simplify one-level sysctl registration for appldata_table There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Link: https://lore.kernel.org/r/20230310234525.3986352-4-mcgrof@kernel.org Reviewed-by: Vasily Gorbik Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 751e24071c2e408f4b1781327756700ee4c941ab Author: Luis Chamberlain Date: Fri Mar 10 15:45:21 2023 -0800 s390: simplify one-level syctl registration for s390dbf_table There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Link: https://lore.kernel.org/r/20230310234525.3986352-3-mcgrof@kernel.org Reviewed-by: Vasily Gorbik Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 0599331c3da6dbbe814262079f6b0c4f3575fd5d Author: Luis Chamberlain Date: Fri Mar 10 15:45:20 2023 -0800 s390: simplify one-level sysctl registration for topology_ctl_table There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Link: https://lore.kernel.org/r/20230310234525.3986352-2-mcgrof@kernel.org Reviewed-by: Vasily Gorbik Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit e1435b67afaef736f5001ba937ab5adb5bf4afa2 Author: Jani Nikula Date: Fri Mar 17 15:41:44 2023 +0200 drm/i915/psr: clean up PSR debugfs sink status error handling Handle errors first and return early, and reduce indentation on the happy day code path. Cc: Jouni Högander Signed-off-by: Jani Nikula Reviewed-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20230317134144.223936-3-jani.nikula@intel.com commit 09b9851776b57f7a8a132db55942fc3ee0fdd4f3 Author: Jani Nikula Date: Fri Mar 17 15:41:43 2023 +0200 drm/i915/psr: switch PSR debugfs to struct intel_connector Prefer struct intel_connector over struct drm_connector. Cc: Jouni Högander Signed-off-by: Jani Nikula Reviewed-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20230317134144.223936-2-jani.nikula@intel.com commit 5cc0de456749712c6840d5d9e5b3de1071932aa5 Author: Jani Nikula Date: Fri Mar 17 15:41:42 2023 +0200 drm/i915/psr: move PSR debugfs to intel_psr.c Move the debugfs next to the implementation. Cc: Jouni Högander Signed-off-by: Jani Nikula Reviewed-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20230317134144.223936-1-jani.nikula@intel.com commit 5327469ec4c07977e1d824badadd2628fcd04e85 Author: Tom Rix Date: Fri Mar 17 20:23:21 2023 -0400 gpu: drm: bridge: sii9234: remove unused bridge_to_sii9234 function clang with W=1 reports drivers/gpu/drm/bridge/sii9234.c:870:31: error: unused function 'bridge_to_sii9234' [-Werror,-Wunused-function] static inline struct sii9234 *bridge_to_sii9234(struct drm_bridge *bridge) ^ This static function is not used, so remove it. Signed-off-by: Tom Rix Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20230318002321.1675181-1-trix@redhat.com commit 5a6cddb89b51d99a7702e63829644a5860dd9c41 Author: Raed Salem Date: Tue Mar 14 10:58:44 2023 +0200 net/mlx5e: Update IPsec per SA packets/bytes count Providing per SA packets/bytes statistics mandates creating unique counter per SA flow for Rx/Tx, whenever offloaded SA statistics is desired query the specific SA counter to provide the stack with the needed data. Signed-off-by: Raed Salem Link: https://lore.kernel.org/r/7d5ce20ac495f3054afb633128700e7b7eeeb3cd.1678714336.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit d0c19a310e77d25e860d1543b5967fe6be6f5fe0 Author: Raed Salem Date: Tue Mar 14 10:58:43 2023 +0200 net/mlx5e: Use one rule to count all IPsec Tx offloaded traffic Currently one counter is shared between all IPsec Tx offloaded rules to count the total amount of packets/bytes that was IPsec Tx offloaded, replace this scheme by adding a new flow table (ft) with one rule that counts all flows that passes through this table (like Rx status ft), this ft is pointed by all IPsec Tx offloaded rules. The above allows to have a counter per tx flow rule in while keeping a separate global counter that store the aggregation outcome of all these per flow counters. Signed-off-by: Raed Salem Link: https://lore.kernel.org/r/09b9119d1deb6e482fd2d17e1f5760d7c5be1e48.1678714336.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit aa8bd0c9518cc5902d88510bf007e451699221f2 Author: Raed Salem Date: Tue Mar 14 10:58:42 2023 +0200 net/mlx5e: Support IPsec acquire default SA During XFRM stack acquire flow, a default SA is created to be updated later, once acquire netlink message is handled in user space. This SA is also passed to IPsec offload supporting driver, however this SA acts only as placeholder and does not have context suitable for offloading in HW yet. Identify this kind of SA by special offload flag (XFRM_DEV_OFFLOAD_FLAG_ACQ), and create a SW only context. In such cases with special mark so it won't be installed in HW in addition flow and on remove/delete free this SW only context. Signed-off-by: Raed Salem Link: https://lore.kernel.org/r/8f36d6b61631dcd73fef0a0ac623456030bc9db0.1678714336.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit b3beba1fb404dd713a325cb241fe780857172225 Author: Raed Salem Date: Tue Mar 14 10:58:41 2023 +0200 net/mlx5e: Allow policies with reqid 0, to support IKE policy holes IKE policies hole, is special policy that exists to allow for IKE traffic to bypass IPsec encryption even though there is already a policies and SA(s) configured on same endpoints, these policies does not nessecarly have the reqid configured, so need to add an exception for such policies. These kind of policies are allowed under the condition that at least upper protocol and/or ips are not 0. Signed-off-by: Raed Salem Link: https://lore.kernel.org/r/cbcadde312c24de74c47d9b0616f86a5818cc9bf.1678714336.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit c9fa320b00cff04980b8514d497068e59a8ee131 Author: Raed Salem Date: Tue Mar 14 10:58:40 2023 +0200 xfrm: copy_to_user_state fetch offloaded SA packets/bytes statistics Both in RX and TX, the traffic that performs IPsec packet offload transformation is accounted by HW only. Consequently, the HW should be queried for packets/bytes statistics when user asks for such transformation data. Signed-off-by: Raed Salem Link: https://lore.kernel.org/r/d90ec74186452b1509ee94875d942cb777b7181e.1678714336.git.leon@kernel.org Acked-by: Steffen Klassert Signed-off-by: Leon Romanovsky commit e0aeb9b90acf6ee7c2d11141522ffbb5481734d3 Author: Raed Salem Date: Tue Mar 14 10:58:39 2023 +0200 xfrm: add new device offload acquire flag During XFRM acquire flow, a default SA is created to be updated later, once acquire netlink message is handled in user space. When the relevant policy is offloaded this default SA is also offloaded to IPsec offload supporting driver, however this SA does not have context suitable for offloading in HW, nor is interesting to offload to HW, consequently needs a special driver handling apart from other offloaded SA(s). Add a special flag that marks such SA so driver can handle it correctly. Signed-off-by: Raed Salem Link: https://lore.kernel.org/r/f5da0834d8c6b82ab9ba38bd4a0c55e71f0e3dab.1678714336.git.leon@kernel.org Acked-by: Steffen Klassert Signed-off-by: Leon Romanovsky commit fa5aa2f890733407e6df28b878926ae66a351b8a Author: Paul Blakey Date: Tue Mar 14 10:58:38 2023 +0200 net/mlx5e: Use chains for IPsec policy priority offload Currently, policy priority field is ignored and so order of matching is unpredictable. Use chains for RX/TX policy offload to support the priority field. Signed-off-by: Paul Blakey Reviewed-by: Raed Salem Link: https://lore.kernel.org/r/9ef3ef88858217932696ad413b1b147b799a11be.1678714336.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 664eab8a02d3331f2facf6c4359f4baaeefe6a3b Author: Paul Blakey Date: Tue Mar 14 10:58:37 2023 +0200 net/mlx5: fs_core: Allow ignore_flow_level on TX dest ignore_flow_level is also supported by firmware on TX, remove this limitation. Signed-off-by: Paul Blakey Reviewed-by: Raed Salem Reviewed-by: Saeed Mahameed Link: https://lore.kernel.org/r/d0025722bfac0a82da758eb540fbf1ff3cacdf74.1678714336.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 8e80e5648092f63b17c2665b2a36422a77143278 Author: Paul Blakey Date: Tue Mar 14 10:58:36 2023 +0200 net/mlx5: fs_chains: Refactor to detach chains from tc usage To support more generic chains that will be used on other namespaces and without tc, refactor to remove the dependency on tc terms. Signed-off-by: Paul Blakey Reviewed-by: Raed Salem Link: https://lore.kernel.org/r/bb8570d532d569285b5bff981578507bd15350cb.1678714336.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit f539858741b34937bf684a47476901006a635468 Author: Dave Stevenson Date: Wed Feb 15 23:29:53 2023 +0100 media: i2c: imx290: Add V4L2_SUBDEV_FL_HAS_EVENTS and subscribe hooks Any V4L2 subdevice that implements controls and declares V4L2_SUBDEV_FL_HAS_DEVNODE should also declare V4L2_SUBDEV_FL_HAS_EVENTS and implement subscribe_event and unsubscribe_event hooks. This driver didn't and would therefore fail v4l2-compliance testing. Add the relevant hooks. Signed-off-by: Dave Stevenson Reviewed-by: Alexander Stein Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 077d1b328d610f596cea0bfe6d1033fd2cb9e0be Author: Dave Stevenson Date: Wed Feb 15 23:29:52 2023 +0100 media: i2c: imx290: Set the colorspace fields in the format The colorspace fields were left untouched in imx290_set_fmt which lead to a v4l2-compliance failure. Signed-off-by: Dave Stevenson Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 26271394cf2e92d4112a937045157e3b1db09929 Merge: d4671cb96fa31 4c05e5ceecbbc Author: David S. Miller Date: Mon Mar 20 09:08:48 2023 +0000 Merge branch 'ocelot-external-ports' Colin Foster says: ==================== add support for ocelot external ports This is the start of part 3 of what is hopefully a 3-part series to add Ethernet switching support to Ocelot chips. Part 1 of the series (A New Chip) added general support for Ocelot chips that were controlled externally via SPI. https://lore.kernel.org/all/20220815005553.1450359-1-colin.foster@in-advantage.com/ Part 2 of the series (The Ethernet Strikes Back) added DSA Ethernet support for ports 0-3, which are the four copper ports that are internal to the chip. https://lore.kernel.org/all/20230127193559.1001051-1-colin.foster@in-advantage.com/ Part 3 will, at a minimum, add support for ports 4-7, which are configured to use QSGMII to an external phy (Return Of The QSGMII). With any luck, and some guidance, support for SGMII, SFPs, etc. will also be part of this series. V1 was submitted as an RFC - and that was rightly so. I suspected I wasn't doing something right, and that was certainly the case. V2 is much cleaner, so hopefully upgrading it to PATCH status is welcomed. Thanks to Russell and Vladimir for correcting my course from V1. In V1 I included a device tree snippet. I won't repeat that here, but I will include a boot log snippet, in case it is of use: ==================== Signed-off-by: David S. Miller commit 4c05e5ceecbbcc0bd570eae218066e1b8bab6438 Author: Colin Foster Date: Fri Mar 17 11:54:15 2023 -0700 net: dsa: ocelot: add support for external phys The VSC7512 has four ports with internal phys that are already supported. There are additional ports that can be configured to work with external phys. Add support for these additional ethernet ports. Signed-off-by: Colin Foster Signed-off-by: David S. Miller commit 6865ecee385bc91d47e6a1801fdf70732e33a6fd Author: Colin Foster Date: Fri Mar 17 11:54:14 2023 -0700 net: dsa: felix: allow serdes configuration for dsa ports Ports for Ocelot devices (VSC7511, VSC7512, VSC7513 and VSC7514) support external phys. When external phys are used, additional configuration on each port is required to enable QSGMII mode and set external phy modes. Add a configurable hook into these routines, so the external ports can be used. Signed-off-by: Colin Foster Signed-off-by: David S. Miller commit 544435c9346a34f90a1ed9f19fc40126ba6d4aaa Author: Colin Foster Date: Fri Mar 17 11:54:13 2023 -0700 net: dsa: felix: allow configurable phylink_mac_config If a user of the Felix driver has a port running in SGMII / QSGMII mode, it will need to utilize phylink_mac_config(). Add this configurability. Signed-off-by: Colin Foster Signed-off-by: David S. Miller commit 3821fd0107b09966a0b8ef0b2de3e999ba534266 Author: Colin Foster Date: Fri Mar 17 11:54:12 2023 -0700 net: dsa: felix: attempt to initialize internal hsio plls The VSC7512 and VSC7514 have internal PLLs that can be used to control different peripherals. Initialize these high speed I/O (HSIO) PLLs when they exist, so that dependent peripherals like QSGMII can function. Signed-off-by: Colin Foster Signed-off-by: David S. Miller commit dfca93ed51a7cf8bfda876705816a5e55381ac4a Author: Colin Foster Date: Fri Mar 17 11:54:11 2023 -0700 net: mscc: ocelot: expose serdes configuration function During chip initialization, ports that use SGMII / QSGMII to interface to external phys need to be configured on the VSC7513 and VSC7514. Expose this configuration routine, so it can be used by DSA drivers. Signed-off-by: Colin Foster Signed-off-by: David S. Miller commit 69f7f89c0db52c5a3fe1bc9ba69d8248b5ee0bca Author: Colin Foster Date: Fri Mar 17 11:54:10 2023 -0700 net: mscc: ocelot: expose generic phylink_mac_config routine The ocelot-switch driver can utilize the phylink_mac_config routine. Move this to the ocelot library location and export the symbol to make this possible. Signed-off-by: Colin Foster Signed-off-by: David S. Miller commit fec53f44945877c8627da4d3ad70e3ac7e204f38 Author: Colin Foster Date: Fri Mar 17 11:54:09 2023 -0700 net: mscc: ocelot: expose ocelot_pll5_init routine Ocelot chips have an internal PLL that must be used when communicating through external phys. Expose the init routine, so it can be used by other drivers. Signed-off-by: Colin Foster Signed-off-by: David S. Miller commit c21ff0939d1d9af1acdf0bf420f206ad3bad2c92 Author: Colin Foster Date: Fri Mar 17 11:54:08 2023 -0700 mfd: ocelot: add ocelot-serdes capability Add support for the Ocelot SERDES module to support functionality of all non-internal phy ports. Signed-off-by: Colin Foster Signed-off-by: David S. Miller commit 672faa7bbf6014a301b6edc477918af445c92ce2 Author: Colin Foster Date: Fri Mar 17 11:54:07 2023 -0700 phy: phy-ocelot-serdes: add ability to be used in a non-syscon configuration The phy-ocelot-serdes module has exclusively been used in a syscon setup, from an internal CPU. The addition of external control of ocelot switches via an existing MFD implementation means that syscon is no longer the only interface that phy-ocelot-serdes will see. In the MFD configuration, an IORESOURCE_REG resource will exist for the device. Utilize this resource to be able to function in both syscon and non-syscon configurations. Signed-off-by: Colin Foster Signed-off-by: David S. Miller commit 9a78e9372193428c77bedc0ba4baff4ec3418cd8 Author: Dave Stevenson Date: Wed Feb 15 23:29:51 2023 +0100 media: i2c: imx290: Match kernel coding style on whitespace Fix up a couple of coding style issues regarding missing blank lines after declarations, double blank lines, and incorrect indentation. Signed-off-by: Dave Stevenson Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8bb19dd7e1d728b5137e0e3efed89dc0900779dc Author: Dave Stevenson Date: Wed Feb 15 23:29:50 2023 +0100 media: i2c: imx290: Add support for the mono sensor variant The IMX290 module is available as either mono or colour (Bayer). Update the driver so that it can advertise the correct mono formats instead of the colour ones. Signed-off-by: Dave Stevenson Signed-off-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f16a70c0472ea4cda3ab53fd3b5d2fa5628fb2c7 Merge: 15ac1122fd6d4 e8d018dd0257f Author: Greg Kroah-Hartman Date: Mon Mar 20 09:14:37 2023 +0100 Merge 6.3-rc3 into tty-next We need the tty/serial fixes in here and it resolves a merge conflict with: drivers/tty/serial/8250/8250_em.c Signed-off-by: Greg Kroah-Hartman commit abae262640ef9c7f24bad65acade25b44c7ba0eb Merge: 6ca8f8bf706d8 e8d018dd0257f Author: Greg Kroah-Hartman Date: Mon Mar 20 09:06:37 2023 +0100 Merge 6.3-rc3 into char-misc-next We need the mainline fixes in this branch for testing and other subsystem changes to be based properly on. Signed-off-by: Greg Kroah-Hartman commit f8d5f7d9e11a414204e011808043e2c0fb6aacae Author: Dave Stevenson Date: Wed Feb 15 23:29:49 2023 +0100 media: dt-bindings: media: i2c: Add mono version to IMX290 bindings The IMX290 module is available as either monochrome or colour and the variant is not detectable at runtime. Add a new compatible string for the monochrome version, based on the full device name IMX290LLR. For consistency, add a new compatible string for the colour version based on the IMX290LQR full device name, and deprecate the current ambiguous compatible string. Signed-off-by: Dave Stevenson Acked-by: Rob Herring Signed-off-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 0d840d425e77c85606488bb6869d72a57fcbd04b Author: Jacopo Mondi Date: Tue Feb 21 18:10:48 2023 +0100 media: i2c: ov5647: Use bus-locked i2c_transfer() The ov5647_read() functions calls i2c_master_send() and i2c_master_read() in sequence. However this leaves space for other clients to contend the bus and insert an unrelated transaction in between the two calls. Replace the two calls with a single i2c_transfer() one, that locks the bus in between the transactions. Signed-off-by: Jacopo Mondi Reviewed-by: Tommaso Merciai Reviewed-by: Dave Stevenson Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ca4331bd0d6d8590d999d2cef93f0bfe9266bb21 Author: Valentine Barshak Date: Tue Feb 21 18:10:47 2023 +0100 media: i2c: ov5647: Add test pattern control This adds V4L2_CID_TEST_PATTERN control support. Signed-off-by: Valentine Barshak Signed-off-by: Jacopo Mondi Reviewed-by: Tommaso Merciai Reviewed-by: Dave Stevenson Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b1e675d1b57eb991a5e194e8648477a98f612617 Author: Lizhe Date: Sun Mar 19 12:47:33 2023 +0800 ALSA: ac97: Remove redundant driver match function If there is no driver match function, the driver core assumes that each candidate pair (driver, device) matches, see driver_match_device() Drop the bus's match function that always returned 1 and so implements the same behaviour as when there is no match function. Signed-off-by: Lizhe Link: https://lore.kernel.org/r/20230319044733.327091-1-sensor1010@163.com Signed-off-by: Takashi Iwai commit 32fceaa6b73051d5d9bb38a4d37bad3360ce5db7 Author: Andy Shevchenko Date: Thu Feb 9 23:09:54 2023 +0100 media: i2c: imx290: Use device_property_read_u32() directly No need to call fwnode_property_read_u32(dev_fwnode()), when we have already existing helper. So use it. Signed-off-by: Andy Shevchenko Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 44cedb7bed5a1df7a1c55992938de8cc280e68c1 Author: Andy Shevchenko Date: Thu Feb 9 23:12:05 2023 +0100 media: i2c: imx290: Make use of get_unaligned_le24(), put_unaligned_le24() Since we have a proper endianness converters for LE 24-bit data use them. Signed-off-by: Andy Shevchenko Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 64e480aaaee50513c91b5974c7a276ce2080db5e Author: A, Rashmi Date: Thu Mar 16 17:35:49 2023 +0530 dt-bindings: phy: intel: Remove Thunder Bay eMMC PHY bindings Remove Thunder Bay specific code as the product got cancelled and there are no end customers or users. Signed-off-by: A, Rashmi Reviewed-by: Hunter, Adrian Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230316120549.21486-5-rashmi.a@intel.com Signed-off-by: Vinod Koul commit 69f27b45ab5e6c463656319bf94bb56be5ca7e02 Author: A, Rashmi Date: Thu Mar 16 17:35:48 2023 +0530 phy: intel: Remove Thunder Bay eMMC PHY support Remove Thunder Bay specific code as the product got cancelled and there are no end customers or users. Signed-off-by: A, Rashmi Reviewed-by: Hunter, Adrian Link: https://lore.kernel.org/r/20230316120549.21486-4-rashmi.a@intel.com Signed-off-by: Vinod Koul commit 90031bc33f7525f0cc7a9ef0b1df62a1a4463382 Merge: 8bf6e20253b2d 7ee938ac00609 Author: Dave Airlie Date: Mon Mar 20 16:44:36 2023 +1000 Merge tag 'amd-drm-next-6.4-2023-03-17' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.4-2023-03-17: amdgpu: - Misc code cleanups - Documentation fixes - Make kobj structures const - Add thermal throttling adjustments for supported APUs - UMC RAS fixes - Display reset fixes - DCN 3.2 fixes - Freesync fixes - DC code reorg - Generalize dmabuf import to work with KFD - DC DML fixes - SRIOV fixes - UVD code cleanups - IH 4.4.2 updates - HDP 4.4.2 updates - SDMA 4.4.2 updates - PSP 13.0.6 updates - Add capped/uncapped workload handling for supported APUs - DCN 3.1.4 updates - Re-org DC Kconfig - USB4 fixes - Reorg DC plane and stream handling - Register vga_switcheroo for apple-gmux - SMU 13.0.6 updates - Fix error checking in read_mm_registers functions for affected families - VCN 4.0.4 fix - Drop redundant pci_enable_pcie_error_reporting() call - RDNA2 SMU OD suspend/resume fix - Expose additional memory stats via fdinfo - RAS fixes - Misc display fixes - DP MST fixes - IOMMU regression fix for KFD amdkfd: - Make kobj structures const - Support for exporting buffers via dmabuf - Multi-VMA page migration fixes - NBIO fixes - Misc code cleanups - Fix possible double free - Fix possible UAF radeon: - iMac fix UAPI: - KFD dmabuf export support. Required for importing KFD buffers into GEM contexts and for RDMA P2P support. Proposed user mode changes: https://github.com/fxkamd/ROCT-Thunk-Interface/commits/fxkamd/dmabuf From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230317164416.138340-1-alexander.deucher@amd.com commit 70664495e3d24803ec47ccaccee9a822220558a0 Author: Bitterblue Smith Date: Mon Mar 13 15:58:14 2023 +0200 wifi: rtl8xxxu: Support new chip RTL8710BU aka RTL8188GU This chip is found in cheap "free driver" USB adapters from Aliexpress. Initially they pretend to be a CD-ROM containing the driver for Windows. "Ejecting" switches the device to wifi mode. Features: 2.4 GHz, b/g/n mode, 1T1R, 150 Mbps. This chip is more unique than other Realtek chips: * The registers at addresses 0x0-0xff, which all the other chips use, can't be used here. New registers at 0x8000-0x80ff must be used instead. And it's not a simple matter of adding 0x8000: 0x2 (REG_SYS_FUNC) became 0x8004, 0x80 (REG_MCU_FW_DL) became 0x8090, etc. * Also there are a few new registers which must be accessed indirectly because their addresses don't fit in 16 bits. No other chips seem to have these. * The vendor driver compiles to 8188gu.ko, but the code calls the chip RTL8710B(U) pretty much everywhere, including messages visible to the user. Another difference compared to the other chips supported by rtl8xxxu is that it has a new PHY status struct, or three of them actually, from which we extract the RSSI, among other things. This is not unique, though, just new. The chips supported by rtw88 also use it. Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/4edbe29f-00b9-8eef-9789-20bed0b141e2@gmail.com commit d46e04ccd40457a0119b76e11ab64a2ad403e138 Author: Bitterblue Smith Date: Mon Mar 13 15:42:59 2023 +0200 wifi: rtl8xxxu: RTL8192EU always needs full init Always run the entire init sequence (rtl8xxxu_init_device()) for RTL8192EU. It's what the vendor driver does too. This fixes a bug where the device is unable to connect after rebooting: wlp3s0f3u2: send auth to ... (try 1/3) wlp3s0f3u2: send auth to ... (try 2/3) wlp3s0f3u2: send auth to ... (try 3/3) wlp3s0f3u2: authentication with ... timed out Rebooting leaves the device powered on (partially? at least the firmware is still running), but not really in a working state. Cc: stable@vger.kernel.org Signed-off-by: Bitterblue Smith Acked-by: Jes Sorensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/4eb111a9-d4c4-37d0-b376-4e202de7153c@gmail.com commit 6906f5060d39f95aa0be30e998e0cc1179ba3d04 Author: Uwe Kleine-König Date: Sun Mar 19 21:23:25 2023 -0700 Input: iqs62x-keys - suppress duplicated error message in .remove() If a platform driver's remove callback returns non-zero the driver core emits an error message. In such a case however iqs62x_keys_remove() already issued a (better) message. So return zero to suppress the generic message. This patch has no other side effects as platform_remove() ignores the return value of .remove() after the warning. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230318225110.261439-1-u.kleine-koenig@pengutronix.de Signed-off-by: Dmitry Torokhov commit 27ad7815cb70cbfdcbee4368f41033e83731479f Author: Bhupesh Sharma Date: Tue Mar 14 13:10:01 2023 +0530 arm64: dts: qcom: sm6115: Move SDHC node(s)'s 'pinctrl' properties to dts Normally the 'pinctrl' properties of a SDHC controller and the chip detect pin settings are dependent on the type of the slots (for e.g uSD card slot), regulators and GPIO(s) available on the board(s). So, move the same from the sm6115 dtsi file to the respective board file(s). Reviewed-by: Marijn Suijten Signed-off-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314074001.1873781-1-bhupesh.sharma@linaro.org commit 1f1e512288edf0ef99d9ceb9af29e2e004341ced Author: Bhupesh Sharma Date: Tue Mar 14 14:06:33 2023 +0530 arm64: dts: qcom: sm6115: Move USB node's 'maximum-speed' and 'dr_mode' properties to dts Normally the 'maximum-speed' and 'dr_mode' properties of a USB controller + port is dependent on the type of the ports, regulators and mode change interrupt routing available on the board(s). So, move the same from the sm6115 dtsi file to respective board file(s). Reviewed-by: Konrad Dybcio Signed-off-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314083633.1882214-3-bhupesh.sharma@linaro.org commit 0ea0edc04a04e3e36fa7d0b3c8463b0440764cf1 Author: Bhupesh Sharma Date: Tue Mar 14 14:06:32 2023 +0530 arm64: dts: qcom: sm6115: Cleanup USB node's label There is only one USB controller present on SM6115 / SM4250 Qualcomm SoC, so drop the numbering used with USB node's label names in the dtsi and the related sm4250-oneplus-billie2.dts. Reviewed-by: Konrad Dybcio Signed-off-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314083633.1882214-2-bhupesh.sharma@linaro.org commit 781d32d1c9709fd25655c4e3e3e15370ae4ae4db Author: Mukesh Ojha Date: Thu Mar 16 20:44:26 2023 +0530 firmware: qcom_scm: Clear download bit during reboot During normal restart of a system download bit should be cleared irrespective of whether download mode is set or not. Fixes: 8c1b7dc9ba22 ("firmware: qcom: scm: Expose download-mode control") Signed-off-by: Mukesh Ojha Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1678979666-551-1-git-send-email-quic_mojha@quicinc.com commit a1299df6718b718256fd9bf6d7f9bed44c826e61 Author: Tomi Valkeinen Date: Thu Mar 2 10:57:48 2023 +0100 media: subdev: Add V4L2_SUBDEV_ROUTING_NO_MULTIPLEXING A common case with subdev routing is that on the subdevice just before the DMA engines (video nodes), no multiplexing is allowed on the source pads, as the DMA engine can only handle a single stream. In some other situations one might also want to do the same check on the sink side. Add new routing validation flags to check these: V4L2_SUBDEV_ROUTING_NO_SINK_MULTIPLEXING and V4L2_SUBDEV_ROUTING_NO_SOURCE_MULTIPLEXING. Signed-off-by: Tomi Valkeinen Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 698a619a04bee1359358d5cba552f008709b79bc Author: Tomi Valkeinen Date: Thu Mar 2 10:57:47 2023 +0100 media: subdev: Split V4L2_SUBDEV_ROUTING_NO_STREAM_MIX V4L2_SUBDEV_ROUTING_NO_STREAM_MIX routing validation flag means that all routes from a sink pad must go to the same source pad and all routes going to the same source pad must originate from the same sink pad. This does not cover all use cases. For example, if a device routes all streams from a single sink pad to any of the source pads, but streams from multiple sink pads can go to the same source pad, the current flag is too restrictive. Split the flag into two parts, V4L2_SUBDEV_ROUTING_NO_SINK_STREAM_MIX and V4L2_SUBDEV_ROUTING_NO_SOURCE_STREAM_MIX, which add the restriction only on one side of the device. Together they mean the same as V4L2_SUBDEV_ROUTING_NO_STREAM_MIX. Signed-off-by: Tomi Valkeinen Reviewed-by: Andy Shevchenko Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a50ee4afc77e4df14bc146e03b3fa28daeec14a9 Author: Tomi Valkeinen Date: Thu Mar 2 10:57:46 2023 +0100 media: subdev: Use 'shall' instead of 'may' in route validation Route validation docs use the word 'may'. Change that to 'shall' for emphasis. Signed-off-by: Tomi Valkeinen Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c2402afcd338b61a7626968a5e9728594459a5de Author: Benjamin Mugnier Date: Wed Feb 1 15:04:17 2023 +0100 media: i2c: st-vgxy61: Use VGXY61_NB_POLARITIES instead of hardcoded value in tx_from_ep tx_from_ep's for loop uses '5' as bound, while in fact it refers to the number of polarities. Replace it by VGXY61_NB_POLARITIES for factorization. Signed-off-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 44b22d45cd45550a9930f5be4e25fc9001e6820b Author: Benjamin Mugnier Date: Wed Feb 1 15:04:16 2023 +0100 media: i2c: st-vgxy61: Fix control flow error on probe In case of error 'update_hdr' now goes through 'power_off' instead of returning, effectively shutting down the sensor. Signed-off-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 985ed1d7432eb0a28be190e2b855050cf1f926fd Author: Benjamin Mugnier Date: Wed Feb 1 15:04:15 2023 +0100 media: i2c: st-vgxy61: Move 'detect' call to 'power_on' Previously the device detection was performed after patching. Move it right after the reset to make sure we have the correct sensor before trying to patch it. Signed-off-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5a6cf0871265ae89090453e5eab1cb4a5a8ace0c Author: Benjamin Mugnier Date: Wed Feb 1 15:04:14 2023 +0100 media: i2c: st-vgxy61: Remove duplicate default mode set on probe At this stage the default mode is unknown. This is done correctly by vgxy61_fill_framefmt right after. Signed-off-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ce875a29b1ad5ee54197c0aada74093b6567e36d Author: Hans Verkuil Date: Thu Mar 2 13:57:31 2023 +0100 media: Documentation: userspace-api: media: drop clipping, destructive overlays Support for clipping for overlays has been removed, update the documentation. Support for destructive overlay support has been removed as well, also update the documentation for this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d04794da9649ab49421a4f942937fbd52896bd3f Author: Hans Verkuil Date: Thu Mar 2 13:57:30 2023 +0100 media: v4l2-core: zero field base in struct v4l2_framebuffer Make sure this field is always 0 since destructive overlays are no longer supported. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fc650d2eba1087589bbb6ede866756df13b9a9dc Author: Hans Verkuil Date: Thu Mar 2 13:57:29 2023 +0100 media: videodev.h: drop V4L2_FBUF_CAP_LIST/BITMAP_CLIPPING These two capabilities are no longer supported, so no longer define them when compiling the kernel. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 99ba0703c6f4c79674039746e923d0fc84543cea Author: Hans Verkuil Date: Thu Mar 2 13:57:28 2023 +0100 media: v4l2-core: drop v4l2_window clipping and bitmap support There are no longer any drivers that support clipping and bitmap support for the capture or output overlay interfaces, so drop this. Always set the bitmap, clips and clipcount fields to 0, and remove the compat32 support. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2e19bfc8ab175ce1a5251d2b580b19add8a8f1fd Author: Hans Verkuil Date: Thu Mar 2 13:57:27 2023 +0100 media: vivid: drop bitmap and clipping output overlay support This test driver is the only remaining driver still using the clipping and bitmap method. Drop support for this so we can remove this in the V4L2 API as well. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ccaa9d50ca73d136accbf66798c04fb25ca44bd5 Author: Hans Verkuil Date: Thu Mar 2 13:57:26 2023 +0100 media: vivid: drop overlay support Destructive overlay support (i.e. where the video frame is DMA-ed straight into a framebuffer) is effectively dead. It was a necessary evil in the early days when computers were not fast enough to copy SDTV video frames around, but today that's no longer a problem. It requires access to the framebuffer memory, which is a bad idea and very hard to do safely. In addition, in drm it is today almost impossible to get hold of the framebuffer address. So drop support for this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3c161e82dfbd3ee67a1548691412d04d04ad6a37 Author: Hans Verkuil Date: Thu Mar 2 13:57:25 2023 +0100 media: bttv: drop overlay support Destructive overlay support (i.e. where the video frame is DMA-ed straight into a framebuffer) is effectively dead. It was a necessary evil in the early days when computers were not fast enough to copy SDTV video frames around, but today that's no longer a problem. It requires access to the framebuffer memory, which is a bad idea and very hard to do safely. In addition, in drm it is today almost impossible to get hold of the framebuffer address. So drop support for this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 50a5677d535e9941ed1dfe45f812792d78a63d35 Author: Hans Verkuil Date: Thu Mar 2 13:57:24 2023 +0100 media: saa7134: drop overlay support Destructive overlay support (i.e. where the video frame is DMA-ed straight into a framebuffer) is effectively dead. It was a necessary evil in the early days when computers were not fast enough to copy SDTV video frames around, but today that's no longer a problem. It requires access to the framebuffer memory, which is a bad idea and very hard to do safely. In addition, in drm it is today almost impossible to get hold of the framebuffer address. So drop support for this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7777694f80669cb2cdb467fc0fadf3376fbf836d Author: Hans Verkuil Date: Thu Mar 2 13:57:23 2023 +0100 media: saa7146: drop overlay support Destructive overlay support (i.e. where the video frame is DMA-ed straight into a framebuffer) is effectively dead. It was a necessary evil in the early days when computers were not fast enough to copy SDTV video frames around, but today that's no longer a problem. It requires access to the framebuffer memory, which is a bad idea and very hard to do safely. In addition, in drm it is today almost impossible to get hold of the framebuffer address. So drop support for this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d75d29eb3596cc566b08e21d1c194d6ee737be1d Author: Hans Verkuil Date: Wed Mar 1 12:48:06 2023 +0100 media: common: btcx-risc.h: drop obsolete header This header is no longer used, drop it. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9ab9037faf29ce914897d8a4c994f3af54dfd865 Author: Hans Verkuil Date: Wed Mar 1 12:47:36 2023 +0100 media: zoran: drop two obsolete prototypes from zoran_device.h These overlay-related functions no longer exist, so drop them from the header. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 30c758a48a98c786ef77c655d8e290c591a5beef Author: Hans Verkuil Date: Wed Mar 1 12:13:45 2023 +0100 media: stm32: dma2d: remove unused fb_buf Drop the unused struct v4l2_framebuffer fb_buf in struct dma2d_ctx. Signed-off-by: Hans Verkuil CC: Hugues Fruchet Signed-off-by: Mauro Carvalho Chehab commit 3e59c24006f0631980b41506f4130d983e267313 Author: Hans Verkuil Date: Wed Feb 15 12:01:51 2023 +0100 media: admin-guide/media/cec.rst: update CEC debugging doc The documentation on how to create your own Raspberry Pi CEC debugger was a bit out of date. Update it to the Raspberry Pi 4B, drop the mention of the RTC and a link to a picture that no longer works. Also reorganize the text to make it easier to follow and change the pins to match the pins I use. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5a84798e039b081d42c71d72e7646de5426f366c Author: Daniel Lundberg Pedersen Date: Tue Mar 7 14:36:17 2023 +0100 media: docs: vidioc-g-ext-ctrls.rst: Document p_s32 and p_s64 fields p_s32 and p_s64 were added to the v4l2_ext_control struct, so these should have documentation as well. Signed-off-by: Daniel Lundberg Pedersen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1107283b3351bef138cd12dbda1f999891cab7db Author: Tom Rix Date: Sat Mar 11 14:48:47 2023 +0100 media: pvrusb2: VIDEO_PVRUSB2 depends on DVB_CORE to use dvb_* symbols A rand config causes this link error vmlinux.o: In function `pvr2_dvb_create': (.text+0x8af1d2): undefined reference to `dvb_register_adapter' The rand config has CONFIG_VIDEO_PVRUSB2=y CONFIG_VIDEO_DEV=y CONFIG_DVB_CORE=m VIDEO_PVRUSB2 should also depend on DVB_CORE. Signed-off-by: Tom Rix Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6f8cdfdf1c2cc7ab8a696c1d7f03c88e9c7fa8b8 Author: Kevin Chiu Date: Tue Mar 7 13:58:45 2023 +0100 media: platform: cros-ec: Add Gladios/Lisbon to the match table The Google Gladios/Lisbon device uses the same approach as the Google Brask which enables the HDMI CEC via the cros-ec-cec driver. Signed-off-by: Kevin Chiu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit eed9496a0501357aa326ddd6b71408189ed872eb Author: Dan Carpenter Date: Tue Mar 7 11:00:23 2023 +0100 media: av7110: prevent underflow in write_ts_to_decoder() The buf[4] value comes from the user via ts_play(). It is a value in the u8 range. The final length we pass to av7110_ipack_instant_repack() is "len - (buf[4] + 1) - 4" so add a check to ensure that the length is not negative. It's not clear that passing a negative len value does anything bad necessarily, but it's not best practice. With the new bounds checking the "if (!len)" condition is no longer possible or required so remove that. Fixes: fd46d16d602a ("V4L/DVB (11759): dvb-ttpci: Add TS replay capability") Signed-off-by: Dan Carpenter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4ae47770d57bff0193fbbf48d56c18759cad5f6e Author: oushixiong Date: Tue Mar 7 06:57:48 2023 +0100 media: mtk-jpegenc: Fix a compilation issue ‘mtk8195_jpegenc_drvdata’ defined but not used [-Werror=unused-variable] Signed-off-by: oushixiong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 82b88d4da541e986e40445773b9c19187622d230 Author: Marek Vasut Date: Sun Mar 5 21:51:07 2023 +0100 media: stm32-dcmi: Enable incoherent buffer allocation Set allow_cache_hints to 1 for the vb2_queue capture queue in the STM32MP15xx DCMI V4L2 driver. This allows us to allocate buffers with the V4L2_MEMORY_FLAG_NON_COHERENT set. On STM32MP15xx SoCs, this enables caching for this memory, which improves performance when being read from CPU. This change should be safe from race conditions since videobuf2 already invalidates or flushes the appropriate cache lines in its prepare() and finish() methods. Tested on a STM32MP157F SoC. Resulted in 4x buffer access speedup. Signed-off-by: Marek Vasut Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1634b7adcc5bef645b3666fdd564e5952a9e24e0 Author: harperchen Date: Fri Mar 3 16:30:11 2023 +0100 media: pci: tw68: Fix null-ptr-deref bug in buf prepare and finish When the driver calls tw68_risc_buffer() to prepare the buffer, the function call dma_alloc_coherent may fail, resulting in a empty buffer buf->cpu. Later when we free the buffer or access the buffer, null ptr deref is triggered. This bug is similar to the following one: https://git.linuxtv.org/media_stage.git/commit/?id=2b064d91440b33fba5b452f2d1b31f13ae911d71. We believe the bug can be also dynamically triggered from user side. Similarly, we fix this by checking the return value of tw68_risc_buffer() and the value of buf->cpu before buffer free. Signed-off-by: harperchen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3af805f70c83525305c1096ec15c64f50d9efa05 Author: harperchen Date: Fri Mar 3 12:16:24 2023 +0100 media: platform: via: Handle error for dma_set_mask As the potential failure of the dma_set_mask(), we fix this bug by checking its return value and performing proper error handling. Signed-off-by: harperchen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bdcd4c10433db0b481278e324b3c0ec329d55b15 Author: Bryan O'Donoghue Date: Thu Mar 2 16:53:53 2023 +0100 media: MAINTAINERS: Add myself as CAMSS maintainer I discussed with Robert a few ago lending a hand with CAMSS. Following up on that discussion, I'm happy to help. Signed-off-by: Bryan O'Donoghue Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 47e8b73bc35d7c54642f78e498697692f6358996 Author: harperchen Date: Thu Mar 2 13:39:05 2023 +0100 media: cx23885: Fix a null-ptr-deref bug in buffer_prepare() and buffer_finish() When the driver calls cx23885_risc_buffer() to prepare the buffer, the function call dma_alloc_coherent may fail, resulting in a empty buffer risc->cpu. Later when we free the buffer or access the buffer, null ptr deref is triggered. This bug is similar to the following one: https://git.linuxtv.org/media_stage.git/commit/?id=2b064d91440b33fba5b452f2d1b31f13ae911d71. We believe the bug can be also dynamically triggered from user side. Similarly, we fix this by checking the return value of cx23885_risc_buffer() and the value of risc->cpu before buffer free. Signed-off-by: harperchen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ffa331d9bf9407655fc4c4d57dcc92ed2868e326 Author: Ming Qian Date: Thu Mar 2 06:34:10 2023 +0100 media: amphion: decoder implement display delay enable amphion vpu support a low latency mode, when V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE is enabled, decoder can display frame immediately after it's decoded. Only h264 is support yet. Fixes: 6de8d628df6e ("media: amphion: add v4l2 m2m vpu decoder stateful driver") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 46ff24efe04ac96a129dd01138640c3447a525e1 Author: Zoey Wu Date: Thu Feb 23 06:41:38 2023 +0100 media: platform: cros-ec: Add aurash to the match table The Google aurash device uses the same approach as the Google Brask which enables the HDMI CEC via the cros-ec-cec driver. Signed-off-by: Zoey Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d00f592250782538cda87745607695b0fe27dcd4 Author: Jiasheng Jiang Date: Thu Feb 9 14:52:45 2023 +0100 media: platform: mtk-mdp3: Add missing check and free for ida_alloc Add the check for the return value of the ida_alloc in order to avoid NULL pointer dereference. Moreover, free allocated "ctx->id" if mdp_m2m_open fails later in order to avoid memory leak. Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver") Signed-off-by: Jiasheng Jiang Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 35dac920f721ccfed1116e807b90d8971db3d457 Author: Ye Xingchen Date: Wed Feb 8 10:01:06 2023 +0100 media: platform: stm32: use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2b64bcb76ac525d712116cd5d0dbb4c663cad63c Author: Ye Xingchen Date: Wed Feb 8 09:59:40 2023 +0100 media: platform: renesas: use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cf75b2970352ad082d2e866e564ea26f60d3c545 Author: Ye Xingchen Date: Wed Feb 8 09:35:44 2023 +0100 media: dw100: use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Reviewed-by: Xavier Roumegue Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2371adeab717d8fe32144a84f3491a03c5838cfb Author: Jiasheng Jiang Date: Wed Feb 8 08:14:42 2023 +0100 media: bdisp: Add missing check for create_workqueue Add the check for the return value of the create_workqueue in order to avoid NULL pointer dereference. Fixes: 28ffeebbb7bd ("[media] bdisp: 2D blitter driver using v4l2 mem2mem framework") Signed-off-by: Jiasheng Jiang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 474acc639fc8671fa4c1919d9e03253c82b6d321 Author: Kees Cook Date: Sat Feb 4 19:38:05 2023 +0100 media: imx-jpeg: Bounds check sizeimage access The call of mxc_jpeg_get_plane_size() from mxc_jpeg_dec_irq() sets plane_no argument to 1. The compiler sees that it's possible to end up with an access beyond the bounds of sizeimage, if mem_planes was too large: if (plane_no >= fmt->mem_planes) // mem_planes = 2+ return 0; if (fmt->mem_planes == fmt->comp_planes) // comp_planes != mem_planes return q_data->sizeimage[plane_no]; if (plane_no < fmt->mem_planes - 1) // mem_planes = 2 return q_data->sizeimage[plane_no]; comp_planes == 0 or 1 is safe. comp_planes > 2 would be out of bounds. (This isn't currently possible given the contents of mxc_formats, though.) Silence the warning by bounds checking comp_planes for future robustness. Seen with GCC 13: In function 'mxc_jpeg_get_plane_size', inlined from 'mxc_jpeg_dec_irq' at ../drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:729:14: ../drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:641:42: warning: array subscript 2 is above array bounds of 'u32[2]' {aka 'unsigned int[2]'} [-Warray-bounds=] 641 | size += q_data->sizeimage[i]; | ~~~~~~~~~~~~~~~~~^~~ In file included from ../drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h:112, from ../drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:63: ../drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h: In function 'mxc_jpeg_dec_irq': ../drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h:84:41: note: while referencing 'sizeimage' 84 | u32 sizeimage[MXC_JPEG_MAX_PLANES]; | ^~~~~~~~~ Cc: Mirela Rabulea Cc: NXP Linux Team Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Kees Cook Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d5872e93fab99e371de97537d7f352cecdf7f92e Author: Kees Cook Date: Sat Feb 4 19:36:17 2023 +0100 media: mxl5005s: Bounds check size used for max array index The use of state->CH_Ctrl[i].size in a shift operation implies that its value can be as much as 32, but the state->CH_Ctrl[i].val array is only 25 in size. Bounds check the size before shifting and looping. Fixes warnings seen with GCC 13: ../drivers/media/tuners/mxl5005s.c: In function 'MXL_ControlWrite_Group.isra': ../drivers/media/tuners/mxl5005s.c:3450:70: warning: array subscript 32 is above array bounds of 'u16[25]' {aka 'short unsigned int[25]'} [-Warray-bounds=] 3450 | state->CH_Ctrl[i].val[j] = (u8)((value >> j) & 0x01); | ~~~~~~~~~~~~~~~~~~~~~^~~ ../drivers/media/tuners/mxl5005s.c:238:13: note: while referencing 'val' 238 | u16 val[25]; /* Binary representation of Value */ | ^~~ Cc: Colin Ian King Signed-off-by: Kees Cook Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit de163422206076d764e800486f9c28a0ede7410a Author: Jakub Kicinski Date: Sat Feb 4 00:31:29 2023 +0100 media: drop unnecessary networking includes dvb_net.h includes a bunch of core networking headers which increases the number of objects rebuilt when we touch them. They are unnecessary for the header itself and only one driver has an indirect dependency. tveeprom.h includes if_packet to gain access to ETH_ALEN. This is a bit of an overkill because if_packet.h pulls in skbuff.h. The definition of ETH_ALEN is in the uAPI header, which is very rarely touched, so switch to including that. This results in roughly 250 fewer objects built when skbuff.h is touched (6028 -> 5788). Signed-off-by: Jakub Kicinski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e78da4da9edb2dc44b9302b6229284892cdb58b5 Author: Jonathan Neuschäfer Date: Sun Jan 29 17:16:18 2023 +0100 media: dvb-frontends: Fix a typo ("Unknow sleep mode") Spell "unknown" correctly. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 59eeb9ad7c69b76d5aea5bfe9123af3d7da1b08a Author: Krzysztof Kozlowski Date: Fri Dec 9 18:59:26 2022 +0100 media: dt-bindings: silabs,si470x: Convert to DT schema Convert the Silicon Labs Si470x FM Radio Receiver bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6262e80228df0974f6342ac2324d7bcfd319956b Author: Colin Ian King Date: Thu Dec 8 12:58:47 2022 +0100 media: platform: exynos4-is: Fix spelling mistake "palne" -> "plane" There are spelling mistakes in a literal string and a comment. Fix them. Signed-off-by: Colin Ian King Reviewed-by: Alim Akhtar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b8cff31b76279f388c4bc4458e31e72932fe37d1 Author: Yang Li Date: Thu Nov 10 02:36:48 2022 +0100 media: tc358746: Remove unneeded semicolon ./drivers/media/i2c/tc358746.c:857:3-4: Unneeded semicolon ./drivers/media/i2c/tc358746.c:861:2-3: Unneeded semicolon Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2832 Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 68e505e2aa7fe534226d57364f1e1753deb22d2d Author: Lukas Bulwahn Date: Fri Mar 17 09:11:56 2023 +0100 ARM: mmp: remove obsolete config USB_EHCI_MV_U2O Commit 77acc85ce797 ("ARM: mmp: remove device definitions") and commit 06f11dfb5b75 ("ARM: mmp: remove all board files") remove mach-mmp's device definitions and the board file for the Marvell PXA910-based TTC_DKB Development Platform. With that removal, all references to the config USB_EHCI_MV_U2O are gone. The config has no remaining effect and can be deleted. Remove the obsolete config USB_EHCI_MV_U2O. Signed-off-by: Lukas Bulwahn Signed-off-by: Arnd Bergmann commit 12f9225882563f67b7c32489cc1f8f5088f65b28 Author: Christian Hewitt Date: Sat Feb 4 08:45:01 2023 +0100 media: rc: add Beelink Mini MXIII keymap Add a keymap for the simple IR (NEC) remote used with the Beelink Mini MXIII Android STB device. Signed-off-by: Christian Hewitt Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit b569972ab8d336590020d699bdb58b42729292d0 Author: Christian Hewitt Date: Sat Feb 4 08:45:00 2023 +0100 media: dt-bindings: rc: add rc-beelink-mxiii Add a binding for the rc-beelink-mxiii remote keymap Signed-off-by: Christian Hewitt Acked-by: Krzysztof Kozlowski Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit a17b738cdefb77ffb9ce0cade430557a8bc1df10 Author: Emanuel Strobel Date: Fri Feb 3 10:34:05 2023 +0100 media: rc: add common keymap for Dreambox RC10/RC0 and RC20/RC-BT remotes Add a common keymap for the RC10/RC0 and RC20/RC-BT remotes used with the Dreambox One and Dreambox Two DVB-S/T boxes. The maps are combined since the IR codes do not conflict and both boxes have shipped with both remote designs over time. Both remote types can be programmed to control TVs, so include non-IR keys that are used to switch-to or toggle the remote mode: - DREAM in RC10/RC0 switches to (Dreambox) STB control mode - TV in RC10/RC0 switches to TV control mode - MODE in RC20/RC-BT toggles between STB/TV/BT control modes In the RC20 keymap the Android MIC (voice search) key maps to KEY_HELP and EXIT is mapped to KEY_ESC to replicate the go-backwards navigation behaviour in the Android vendor OS that ships on Dreambox devices. Signed-off-by: Emanuel Strobel Signed-off-by: Christian Hewitt Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 41e31b34a89510483ec341d7adfda5abd14b1eac Author: Christian Hewitt Date: Fri Feb 3 10:34:04 2023 +0100 media: dt-bindings: rc: add rc-dreambox Add a binding for the rc-dreambox remote keymap Signed-off-by: Christian Hewitt Acked-by: Krzysztof Kozlowski Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 13de5a512a440c081946109b1a208bd6eeebb169 Author: Hans Verkuil Date: Wed Feb 1 13:56:46 2023 +0100 media: cx18: fix format compliance issues This properly fills in all the format fields and calculates the width and height correctly. Esp. the minimum width and height was wrong. When changing the standard the width and height also have to be reset to the corresponding default width/height for the chosen standard. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 00d08584e401460d73da45921ff2405f910e9254 Author: Hans Verkuil Date: Wed Feb 1 13:56:20 2023 +0100 media: cx18: reorder fmt_vid_cap functions in cx18-ioctl.c No actual code changed, this just reorders functions so that the g/try/s_fmt_vid_cap functions are all together rather than mixed in with the vbi format functions. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 832c49e9ca526f90469cf291d148b02238afa05b Author: Hans Verkuil Date: Wed Feb 1 13:54:20 2023 +0100 media: cx18: missing CAP_AUDIO for vbi stream The v4l2-compliance test complained about this. You can change the input connector for the vbi stream, but that means that you can have to be able to do the same for the audio input. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 651640f6534c81685e1811e23d2808cb95be11da Author: Hans Verkuil Date: Wed Feb 1 12:50:30 2023 +0100 media: cx18: properly report pixelformats The MPEG device reported non-MPEG pixelformats, and the YUV device reported the MPEG pixelformat as well. Separate the two: either report MPEG or HM12/UYUV, not all three. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 274cb00985e2b58210d6799e38b4fc43627e2546 Author: Hans Verkuil Date: Wed Feb 1 12:19:46 2023 +0100 media: cx18: fix incorrect input counting Counting the number of video and audio inputs was wrong if the number of inputs equalled CX18_CARD_MAX_VIDEO_INPUTS or CX18_CARD_MAX_AUDIO_INPUTS. This was a copy-and-paste from the ivtv driver. That driver has been fixed quite a long time ago, but we missed that this driver had the same bug. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 643e83501461763032ae51e4d540176e6a887d31 Author: Hans Verkuil Date: Tue Jan 31 11:34:54 2023 +0100 media: cx18: convert to vb2 This patch converts cx18 from the old deprecated videobuf framework to the 'new' vb2 framework. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5f225889f23db9ddabf6eca82bebb760b283705b Author: Hans Verkuil Date: Wed Feb 1 12:48:54 2023 +0100 media: v4l2-dev.c: check for V4L2_CAP_STREAMING to enable streaming ioctls Rather than checking which device type it is, just check the STREAMING cap since that indicates support for streaming ioctls. Some drivers only support READWRITE (typically MPEG encoders). Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f8c0810af739ec3587d00bf36cc5a6a0139be1a Author: Hans Verkuil Date: Wed Feb 1 14:06:47 2023 +0100 media: vb2: set owner before calling vb2_read Before vb2_read is called, the owner must be set since vb2_read will actually start streaming. If vb2_read returns an error and q->fileio is NULL, then it failed to start streaming and the owner is set back to NULL. When the vb2 start_streaming callback is called, it expects the owner pointer to be set, and that wasn't the case in this particular situation. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d11f932808dc689717e409bbc81b5093e7902fc9 Author: Asmaa Mnebhi Date: Wed Mar 15 17:50:27 2023 -0400 pinctrl: mlxbf3: Add pinctrl driver support NVIDIA BlueField-3 SoC has a few pins that can be used as GPIOs or take the default hardware functionality. Add a driver for the pin muxing. Signed-off-by: Asmaa Mnebhi Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230315215027.30685-3-asmaa@nvidia.com Signed-off-by: Linus Walleij commit cae630bf47f84d426407ff6261debfe073ce8a4b Author: Johan Hovold Date: Thu Mar 16 11:58:00 2023 +0100 dt-bindings: pinctrl: qcom,sc8280xp-tlmm: allow 'bias-bus-hold' The controller supports 'bias-bus-hold' so add it to the binding. Signed-off-by: Johan Hovold Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230316105800.18751-1-johan+linaro@kernel.org Signed-off-by: Linus Walleij commit f1148d3491b4b76eb233e6f6b85e9811ae4c96f8 Author: Konrad Dybcio Date: Tue Mar 14 23:27:05 2023 +0100 dt-bindings: pinctrl: qcom,qcm2290-tlmm: Allow input-enable Allow the common input-enable. This was missed with the initial submission. Fixes: 5147022214db ("dt-bindings: pinctrl: qcom: Add QCM2290 pinctrl bindings") Signed-off-by: Konrad Dybcio Acked-by: Shawn Guo Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230314222705.2940258-1-konrad.dybcio@linaro.org Signed-off-by: Linus Walleij commit c74eef68fd2d3a7821ecb57a607d597775df53ac Author: Devi Priya Date: Thu Mar 16 12:59:38 2023 +0530 pinctrl: qcom: Add IPQ9574 pinctrl driver Add pinctrl definitions for the TLMM of IPQ9574 Reviewed-by: Krzysztof Kozlowski Co-developed-by: Anusha Rao Signed-off-by: Anusha Rao Signed-off-by: Devi Priya Link: https://lore.kernel.org/r/20230316072940.29137-5-quic_devipriy@quicinc.com Signed-off-by: Linus Walleij commit 5b63ccb69ee8ee5ddb58d8ce105b880905678bd5 Author: Devi Priya Date: Thu Mar 16 12:59:37 2023 +0530 dt-bindings: pinctrl: qcom: Add support for IPQ9574 Add new binding document for pinctrl on IPQ9574 Reviewed-by: Krzysztof Kozlowski Co-developed-by: Anusha Rao Signed-off-by: Anusha Rao Signed-off-by: Devi Priya Link: https://lore.kernel.org/r/20230316072940.29137-4-quic_devipriy@quicinc.com Signed-off-by: Linus Walleij commit b915395c9e04361926ec329f784a1a6fda033492 Author: Danila Tikhonov Date: Sun Mar 12 00:21:14 2023 +0300 pinctrl: qcom: Add SM7150 pinctrl driver Add pinctrl driver for TLMM block found in SM7150 SoC. Signed-off-by: Danila Tikhonov Link: https://lore.kernel.org/r/20230311212114.108870-3-danila@jiaxyga.com Signed-off-by: Linus Walleij commit 709d60b5dfbfc7d2973ad6085cb1117e827cfc8d Author: Danila Tikhonov Date: Sun Mar 12 00:21:13 2023 +0300 dt-bindings: pinctrl: qcom: Add SM7150 pinctrl binding Add device tree binding Documentation details for Qualcomm SM7150 TLMM device Signed-off-by: Danila Tikhonov Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230311212114.108870-2-danila@jiaxyga.com Signed-off-by: Linus Walleij commit c7c4891bc787850a86e3c797f754bb1623e171ae Author: Arınç ÜNAL Date: Sat Mar 18 00:30:11 2023 +0300 MAINTAINERS: move ralink pinctrl to mediatek mips pinctrl The Ralink pinctrl driver is now under the name of MediaTek MIPS pin controller. Move the maintainer information accordingly. Add dt-binding schema files. Add linux-mediatek@lists.infradead.org as an associated mailing list. Signed-off-by: Arınç ÜNAL Acked-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20230317213011.13656-22-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 565afac7a37ab861f62edcb0683bc8d67949fc92 Author: Arınç ÜNAL Date: Sat Mar 18 00:30:10 2023 +0300 dt-bindings: pinctrl: mediatek: mt7620: split binding The MT7628 and MT7688 SoCs contain different pin muxing information, therefore, should be split. This can be done now that there are compatible strings to distinguish them from other SoCs. Split the schema out to mediatek,mt76x8-pinctrl.yaml. Remove mediatek,mt76x8-pinctrl from mt7620. Signed-off-by: Arınç ÜNAL Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230317213011.13656-21-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 5c7daf4a06065de15e29a9a14dc22acd4b0062f2 Author: Arınç ÜNAL Date: Sat Mar 18 00:30:09 2023 +0300 dt-bindings: pinctrl: ralink: rt305x: split binding The RT3352 and RT5350 SoCs each contain different pin muxing information, therefore, should be split. This can be done now that there are compatible strings to distinguish them from other SoCs. Split the schema out to ralink,rt3352-pinctrl.yaml and ralink,rt5350-pinctrl.yaml. Remove ralink,rt3352-pinctrl and ralink,rt5350-pinctrl from rt305x. Signed-off-by: Arınç ÜNAL Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230317213011.13656-20-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 4b8efbae17e1f2762cd3799970b702bf61dfb5be Author: Arınç ÜNAL Date: Sat Mar 18 00:30:08 2023 +0300 dt-bindings: pinctrl: mediatek: mt7986: fix patternProperties regex Set second level patternProperties to '^.*mux.*$' and '^.*conf.*$' on mediatek,mt7986-pinctrl.yaml to be on par with other schemas. Signed-off-by: Arınç ÜNAL Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230317213011.13656-19-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 6a735ad501816786af9fc372eeace9ce4735bac0 Author: Arınç ÜNAL Date: Sat Mar 18 00:30:07 2023 +0300 dt-bindings: pinctrl: mediatek: drop quotes from referred schemas Drop the quotes from the referred schemas. Signed-off-by: Arınç ÜNAL Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230317213011.13656-18-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 03af785ee25a753c6b93ef70130b97020ccfae27 Author: Arınç ÜNAL Date: Sat Mar 18 00:30:06 2023 +0300 dt-bindings: pinctrl: mediatek: fix pinmux header location Fix the location of the pinmux header files mentioned on the schemas. Signed-off-by: Arınç ÜNAL Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230317213011.13656-17-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit c911ad22a884795529241cf7074b5cde355741b7 Author: Arınç ÜNAL Date: Sat Mar 18 00:30:05 2023 +0300 dt-bindings: pinctrl: {mediatek,ralink}: fix formatting Change the style of description properties to plain style where there's no need to preserve the line endings, and vice versa. Fix capitalisation and indentation. Fit the schemas to 80 columns for each line. Signed-off-by: Arınç ÜNAL Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230317213011.13656-16-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit a9d44c4cc049d9024ed05dc9a615100b019c6f93 Author: Arınç ÜNAL Date: Sat Mar 18 00:30:04 2023 +0300 dt-bindings: pinctrl: mediatek: fix naming inconsistency Some schemas include "MediaTek", some "Mediatek". Rename all to "MediaTek" to address the naming inconsistency. Signed-off-by: Arınç ÜNAL Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230317213011.13656-15-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 1d45ecb05ab4ec878254f2a11a5af49b64020148 Author: Arınç ÜNAL Date: Sat Mar 18 00:30:03 2023 +0300 dt-bindings: pinctrl: mediatek: mt8195: rename to mediatek,mt8195-pinctrl Rename pinctrl-mt8195.yaml to mediatek,mt8195-pinctrl.yaml to be on par with the compatible string and other mediatek dt-binding schemas. Signed-off-by: Arınç ÜNAL Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230317213011.13656-14-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 0dcf5a56bd93f92665f9e3437843811fd4374355 Author: Arınç ÜNAL Date: Sat Mar 18 00:30:02 2023 +0300 dt-bindings: pinctrl: mediatek: mt8192: rename to mediatek,mt8192-pinctrl Rename pinctrl-mt8192.yaml to mediatek,mt8192-pinctrl.yaml to be on par with the compatible string and other mediatek dt-binding schemas. Signed-off-by: Arınç ÜNAL Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230317213011.13656-13-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit ff01f753682b0a09ec442173669b2114c5e8fc1c Author: Arınç ÜNAL Date: Sat Mar 18 00:30:01 2023 +0300 dt-bindings: pinctrl: mediatek: mt8186: rename to mediatek,mt8186-pinctrl Rename pinctrl-mt8186.yaml to mediatek,mt8186-pinctrl.yaml to be on par with the compatible string and other mediatek dt-binding schemas. Signed-off-by: Arınç ÜNAL Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230317213011.13656-12-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit a22452afa896af118e9cdea06b591e4a77309b41 Author: Arınç ÜNAL Date: Sat Mar 18 00:30:00 2023 +0300 dt-bindings: pinctrl: mediatek: mt6795: rename to mediatek,mt6795-pinctrl Rename mediatek,pinctrl-mt6795.yaml to mediatek,mt6795-pinctrl.yaml to be on par with the compatible string and other mediatek dt-binding schemas. Signed-off-by: Arınç ÜNAL Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230317213011.13656-11-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 9c5ade5a7304ba79a7603f0c66d2b9d6ae7b69e7 Author: Arınç ÜNAL Date: Sat Mar 18 00:29:59 2023 +0300 dt-bindings: pinctrl: ralink: {mt7620,mt7621}: rename to mediatek Rename schemas of pin controllers for MediaTek MT7620 and MT7621 SoCs to be on par with other pin controllers for MediaTek SoCs. Signed-off-by: Arınç ÜNAL Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230317213011.13656-10-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 0b91c8aa698f29ca6880c0f4f7920782c6e9aed8 Author: Arınç ÜNAL Date: Sat Mar 18 00:29:58 2023 +0300 dt-bindings: pinctrl: ralink: add new compatible strings Add the new compatible strings for mt7620, mt76x8, and rt305x to be able to properly document the pin muxing information of each SoC, or SoCs that use the same pinmux data. Signed-off-by: Arınç ÜNAL Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230317213011.13656-9-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 6c011cc41091625c9abbf1e711bd44c655645377 Author: Arınç ÜNAL Date: Sat Mar 18 00:29:57 2023 +0300 dt-bindings: pinctrl: ralink: drop quotes from referred schemas Drop the quotes from the referred schemas. Signed-off-by: Arınç ÜNAL Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230317213011.13656-8-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit e19e35a85216ac5ac5fa74b62d2d3f4a92665a2b Author: Arınç ÜNAL Date: Sat Mar 18 00:29:56 2023 +0300 dt-bindings: pinctrl: ralink: move additionalProperties to top Move additionalProperties to the top. It's easier to read than after a long indented section. Signed-off-by: Arınç ÜNAL Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230317213011.13656-7-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit ea183c37312334f4d93908e0fee0835e3a441ca3 Author: Arınç ÜNAL Date: Sat Mar 18 00:29:55 2023 +0300 pinctrl: mediatek: remove OF_GPIO as reverse dependency The OF_GPIO option is enabled by default when GPIOLIB is enabled, and cannot be disabled. Remove it as a reverse dependency where GPIOLIB is also set as a reverse dependency. Signed-off-by: Arınç ÜNAL Reviewed-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20230317213011.13656-6-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit dc6ae2057c9cf24a4580e4c421a3cc16ade3ac21 Author: Arınç ÜNAL Date: Sat Mar 18 00:29:54 2023 +0300 pinctrl: ralink: move to mediatek as mtmips This platform from Ralink was acquired by MediaTek in 2011. Then, MediaTek introduced new SoCs which utilise this platform. Move the driver to mediatek pinctrl directory. Rename the ralink core driver to mtmips. Signed-off-by: Arınç ÜNAL Link: https://lore.kernel.org/r/20230317213011.13656-5-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit f7dedad4e290e8be87b1c5a63a19a9663bcd2740 Author: Arınç ÜNAL Date: Sat Mar 18 00:29:53 2023 +0300 pinctrl: ralink: mt7620: split out to mt76x8 Split the driver out to pinctrl-mt76x8.c. Remove including the unnecessary headers since is_mt76x8() is not being used anymore. Introduce a new compatible string to be able to document the pin muxing information properly. Signed-off-by: Arınç ÜNAL Reviewed-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20230317213011.13656-4-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 5465d9891254b9ebc5fedee298bd40dda9ddf6c1 Author: Arınç ÜNAL Date: Sat Mar 18 00:29:52 2023 +0300 pinctrl: ralink: rt305x: add new compatible string for every SoC Add new compatible strings to make every SoC, or SoCs that use the same pinmux data have a unique compatible string. This ensures that the pin muxing information of every SoC, or a set of SoCs that use the same pinmux data can be properly documented. Signed-off-by: Arınç ÜNAL Reviewed-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20230317213011.13656-3-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 7c19147d9cfc0f9328049d2e278279150d7de9ca Author: Arınç ÜNAL Date: Sat Mar 18 00:29:51 2023 +0300 pinctrl: ralink: reintroduce ralink,rt2880-pinmux compatible string There have been stable releases with the ralink,rt2880-pinmux compatible string included. Having it removed breaks the ABI. Reintroduce it. Fixes: e5981cd46183 ("pinctrl: ralink: add new compatible strings for each pinctrl subdriver") Signed-off-by: Arınç ÜNAL Reviewed-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20230317213011.13656-2-arinc.unal@arinc9.com Signed-off-by: Linus Walleij commit 3703bd54cd37e7875f51ece8df8c85c184e40bba Author: Zhen Lei Date: Wed Mar 8 15:38:46 2023 +0800 kallsyms: Delete an unused parameter related to {module_}kallsyms_on_each_symbol() The parameter 'struct module *' in the hook function associated with {module_}kallsyms_on_each_symbol() is no longer used. Delete it. Suggested-by: Petr Mladek Signed-off-by: Zhen Lei Reviewed-by: Vincenzo Palazzo Acked-by: Jiri Olsa Acked-by: Steven Rostedt (Google) Signed-off-by: Luis Chamberlain commit 7ce93729091dff24e6a1c3578b58b36f4b1cf10a Author: Jason Baron Date: Fri Mar 10 16:27:28 2023 -0500 dyndbg: cleanup dynamic usage in ib_srp.c Currently, in dynamic_debug.h we only provide DEFINE_DYNAMIC_DEBUG_METADATA() and DYNAMIC_DEBUG_BRANCH() definitions if CONFIG_DYNAMIC_CORE is enabled. Thus, drivers such as infiniband srp (see: drivers/infiniband/ulp/srp/ib_srp.c) must provide their own definitions for !CONFIG_DYNAMIC_CORE. Thus, let's move this !CONFIG_DYNAMIC_CORE case into dynamic_debug.h. However, the dynamic debug interfaces should really only be defined if CONFIG_DYNAMIC_DEBUG is set or CONFIG_DYNAMIC_CORE is set along with DYNAMIC_DEBUG_MODULE, (see: Documentation/admin-guide/dynamic-debug-howto.rst). Thus, the undefined case becomes: !((CONFIG_DYNAMIC_DEBUG || (CONFIG_DYNAMIC_CORE && DYNAMIC_DEBUG_MODULE)). With those changes in place, we can remove the !CONFIG_DYNAMIC_CORE case from ib_srp.c This change was prompted by a build breakeage in ib_srp.c stemming from the inclusion of dynamic_debug.h unconditionally in module.h, due to commit 7deabd674988 ("dyndbg: use the module notifier callbacks"). In that case, if we have CONFIG_DYNAMIC_CORE=y and CONFIG_DYNAMIC_DEBUG=n then the definitions for DEFINE_DYNAMIC_DEBUG_METADATA() and DYNAMIC_DEBUG_BRANCH() are defined once in ib_srp.c and then again in the dynamic_debug.h. This had been working prior to the above referenced commit because dynamic_debug.h was only pulled into ib_srp.c conditinally via printk.h if CONFIG_DYNAMIC_DEBUG was set. Also, the exported functions in lib/dynamic_debug.c itself may not have a prototype if CONFIG_DYNAMIC_DEBUG=n and CONFIG_DYNAMIC_CORE=y. This would trigger the -Wmissing-prototypes warning. The exported functions are behind (include/linux/dynamic_debug.h): if defined(CONFIG_DYNAMIC_DEBUG) || \ (defined(CONFIG_DYNAMIC_DEBUG_CORE) && defined(DYNAMIC_DEBUG_MODULE)) Thus, by adding -DDYNAMIC_CONFIG_MODULE to the lib/Makefile we can ensure that the exported functions have a prototype in all cases, since lib/dynamic_debug.c is built whenever CONFIG_DYNAMIC_DEBUG_CORE=y. Fixes: 7deabd674988 ("dyndbg: use the module notifier callbacks") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303071444.sIbZTDCy-lkp@intel.com/ Signed-off-by: Jason Baron [mcgrof: adjust commit log, and remove urldefense from URL] Signed-off-by: Luis Chamberlain commit 4c1cdec319b9aadb65737c3eb1f5cb74bd6aa156 Author: Muralidhara M K Date: Fri Jan 27 15:16:01 2023 +0000 x86/MCE/AMD: Use an u64 for bank_map Thee maximum number of MCA banks is 64 (MAX_NR_BANKS), see a0bc32b3cacf ("x86/mce: Increase maximum number of banks to 64"). However, the bank_map which contains a bitfield of which banks to initialize is of type unsigned int and that overflows when those bit numbers are >= 32, leading to UBSAN complaining correctly: UBSAN: shift-out-of-bounds in arch/x86/kernel/cpu/mce/amd.c:1365:38 shift exponent 32 is too large for 32-bit type 'int' Change the bank_map to a u64 and use the proper BIT_ULL() macro when modifying bits in there. [ bp: Rewrite commit message. ] Fixes: a0bc32b3cacf ("x86/mce: Increase maximum number of banks to 64") Signed-off-by: Muralidhara M K Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230127151601.1068324-1-muralimk@amd.com commit 46e33707fe95a21aa9896bded0be97285b779509 Author: Stefan Wahren Date: Fri Mar 17 11:33:20 2023 +0100 iio: accel: add support for IIS328DQ variant Since the ST IIS328DQ accelerometer is compatible to the ST LIS331DL, just add the new compatible to the st_accel framework. Link: https://www.st.com/resource/en/datasheet/iis328dq.pdf Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/20230317103323.7741-6-stefan.wahren@chargebyte.com Signed-off-by: Jonathan Cameron commit f9dbd94ba8cf19f8ff76a48ba5864fd140f8a4e1 Author: Stefan Wahren Date: Fri Mar 17 11:33:19 2023 +0100 dt-bindings: iio: st-sensors: Add IIS328DQ accelerometer The ST IIS328DQ is an accelerometer sensor, which is compatible with the already supported ST H3LIS331DL. So add the new compatible with a fallback to the ST sensor binding. Link: https://lore.kernel.org/linux-iio/2bac9ecf-9d2e-967e-9020-1c950487d781@i2se.com/ Suggested-by: Jonathan Cameron Signed-off-by: Stefan Wahren Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230317103323.7741-5-stefan.wahren@chargebyte.com Signed-off-by: Jonathan Cameron commit aec463feaca9f726a778499ed57b63ffd9c4c523 Author: William Breathitt Gray Date: Sat Mar 18 14:55:03 2023 -0400 iio: addac: stx104: Replace bitops.h header inclusion with bits.h The header is included in the stx104 driver so that we can use the BIT() macro. This macro is actually defined in the header, so replace the header inclusion with . Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/20230318185503.341914-1-william.gray@linaro.org Signed-off-by: Jonathan Cameron commit d4671cb96fa317e2b1f410367a52f731a145e2bc Merge: 105a201ebf331 fd7627833ddf1 Author: David S. Miller Date: Sun Mar 19 15:21:48 2023 +0000 Merge branch 'lan966x-tx-rx-improve' Horatiu Vultur says: ==================== net: lan966x: Improve TX/RX of frames from/to CPU The first patch of this series improves the RX side. As it seems to be an expensive operation to read the RX timestamp for every frame, then read it only if it is required. This will give an improvement of ~70mbit on the RX side. The second patch stops using the packing library. This improves mostly the TX side as this library is used to set diffent bits in the IFH. If this library is replaced with a more simple/shorter implementation, this gives an improvement of more than 100mbit on TX side. All the measurements were done using iperf3. v1->v2: - update lan966x_ifh_set to set the bytes and not each bit individually ==================== Signed-off-by: David S. Miller commit fd7627833ddf1d845dcc0edb14bff97ddbb1272e Author: Horatiu Vultur Date: Fri Mar 17 16:27:13 2023 +0100 net: lan966x: Stop using packing library When a frame is injected from CPU, it is required to create an IFH(Inter frame header) which sits in front of the frame that is transmitted. This IFH, contains different fields like destination port, to bypass the analyzer, priotity, etc. Lan966x it is using packing library to set and get the fields of this IFH. But this seems to be an expensive operations. If this is changed with a simpler implementation, the RX will be improved with ~5Mbit while on the TX is a much bigger improvement as it is required to set more fields. Below are the numbers for TX. Before: [ 5] 0.00-10.02 sec 439 MBytes 367 Mbits/sec 0 sender After: [ 5] 0.00-10.00 sec 578 MBytes 485 Mbits/sec 0 sender Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit ff89ac704e2c92edfdb636070a7e0b91c1e4ec2d Author: Horatiu Vultur Date: Fri Mar 17 16:27:12 2023 +0100 net: lan966x: Don't read RX timestamp if not needed Whenever a frame was received to the CPU, the HW is timestamping the frame. In the IFH(Inter Frame Header) it is found the nanosecond part of the timestamps the SW is required to read from HW the second part. But reading the second part it seems to be a expensive operations, so so change this such to read the second part only when rx filter is enabled. Doing this change gives the RX a performance boost of ~70mbit. before: [ 5] 0.00-10.01 sec 546 MBytes 457 Mbits/sec 0 sender now: [ 5] 0.00-10.01 sec 652 MBytes 530 Mbits/sec 0 sender Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit 697d5cf073acd41a8ab135695bb1e2ae3fd0acb3 Author: Bjorn Helgaas Date: Tue Mar 7 13:32:11 2023 -0600 IB/qib: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Dennis Dalessandro Reviewed-by: Dennis Dalessandro Signed-off-by: Leon Romanovsky commit 512ed1199e3ee210c68a9e37a70b399fea3c2099 Author: Bjorn Helgaas Date: Tue Mar 7 13:32:10 2023 -0600 IB/hfi1: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Dennis Dalessandro Reviewed-by: Dennis Dalessandro Signed-off-by: Leon Romanovsky commit c4526fe2e4090b2d2167d36da8d9f4a866114e7a Author: Rohit Chavan Date: Sun Mar 19 15:38:47 2023 +0530 RDMA/mlx5: Coding style fix reported by checkpatch Block comments should align the * on each line on line 2849 Avoid line continuations in quoted strings on line 3848 Signed-off-by: Rohit Chavan Link: https://lore.kernel.org/r/20230319100847.5566-1-roheetchavan@gmail.com Signed-off-by: Leon Romanovsky commit 105a201ebf3312990b96c4fbaade22e31402f8cc Author: Eric Dumazet Date: Fri Mar 17 16:20:02 2023 +0000 net/packet: remove po->xmit Use PACKET_SOCK_QDISC_BYPASS atomic bit instead of a pointer. This removes one indirect call in fast path, and READ_ONCE()/WRITE_ONCE() annotations as well. Signed-off-by: Eric Dumazet Suggested-by: Willem de Bruijn Cc: Daniel Borkmann Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 72abf2179969a54c16c03b1649b922ec179b364a Author: Harini Katakam Date: Fri Mar 17 17:09:43 2023 +0530 net: macb: Reset TX when TX halt times out Reset TX when halt times out i.e. disable TX, clean up TX BDs, interrupts (already done) and enable TX. This addresses the issue observed when iperf is run at 10Mps Half duplex where, after multiple collisions and retries, TX halts. Signed-off-by: Harini Katakam Signed-off-by: Michal Simek Signed-off-by: Radhey Shyam Pandey Reviewed-by: Michal Swiatkowski Acked-by: Nicolas Ferre Signed-off-by: David S. Miller commit e485f3a6eae0849f83b94936778a2325f72a0c89 Author: Tony Nguyen Date: Fri Mar 17 13:09:03 2023 -0700 ixgb: Remove ixgb driver There are likely no users of this driver as the hardware has been discontinued since 2010. Remove the driver and all references to it in documentation. Suggested-by: Jakub Kicinski Signed-off-by: Tony Nguyen Acked-by: Jesse Brandeburg Signed-off-by: David S. Miller commit a593a2fcfdfb92cfd0ffc54bc81b07e6bfaaaf46 Author: Andy Shevchenko Date: Thu Mar 16 14:08:26 2023 +0200 net: phy: at803x: Replace of_gpio.h with what indeed is used of_gpio.h in this driver is solely used as a proxy to other headers. This is incorrect usage of the of_gpio.h. Replace it .h with what indeed is used in the code. Signed-off-by: Andy Shevchenko Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit c0e906a953f03c56d8029b0207195ee202fd646d Author: Andy Shevchenko Date: Thu Mar 16 14:04:19 2023 +0200 net: smc91x: Replace of_gpio.h with what indeed is used of_gpio.h in this driver is solely used as a proxy to other headers. This is incorrect usage of the of_gpio.h. Replace it .h with what indeed is used in the code. Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller commit cc8997c94bf37005ded39bb8537549dc85776b88 Author: Sindhu Devale Date: Wed Mar 15 09:53:05 2023 -0500 RDMA/irdma: Refactor PBLE functions Refactor PBLE functions using a bit mask to represent the PBLE level desired versus 2 parameters use_pble and lvl_one_only which makes the code confusing. Signed-off-by: Mustafa Ismail Signed-off-by: Sindhu Devale Link: https://lore.kernel.org/r/20230315145305.955-5-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky commit 99f96b4552330d2b725974b4429fba7986635f43 Author: Michal Swiatkowski Date: Wed Mar 15 09:53:04 2023 -0500 RDMA/irdma: Change name of interrupts Add more information in interrupt names. Before this patch it was: irdma CEQ CEQ ... Now: irdma-0000:18:00.0-AEQ irdma-0000:18:00.0-CEQ-0 irdma-0000:18:00.0-CEQ-1 ... Signed-off-by: Michal Swiatkowski Suggested-by: Piotr Raczynski Reviewed-by: Shiraz Saleem Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20230315145305.955-4-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky commit 0219ad5d3afbb59dd029d2d5630123d52c9e0cc6 Author: Tatyana Nikolova Date: Wed Mar 15 09:53:03 2023 -0500 RDMA/irdma: Remove a redundant irdma_arp_table() call Remove a redundant function call in irdma_modify_qp_roce, since irdma_arp_table() with IRDMA_ARP_RESOLVE action is called after the if/else ipv check as part of irdma_add_arp(). Signed-off-by: Tatyana Nikolova Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20230315145305.955-3-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky commit 5a711e580704ac12f223fcd69a8239ccd320e075 Author: Krzysztof Czurylo Date: Wed Mar 15 09:53:02 2023 -0500 RDMA/irdma: Refactor HW statistics Refactor HW statistics which, - Unifies HW statistics support for all HW generations. - Unifies support of 32- and 64-bit counters. - Removes duplicated code and simplifies implementation. - Fixes roll-over handling. - Removes unneeded last_hw_stats. With new implementation, there is no separate handling and no separate arrays for 32- and 64-bit counters (offsets, regs, values). Instead, there is a HW stats map array for each HW revision, which defines HW-specific width and location of each counter in the statistics buffer. Once the statistics are gathered (either via CQP op, or by reading HW registers), counter values are extracted from the statistics buffer using the stats map and the delta between the last and new values is computed. Finally, the counter values in rdma_hw_stats are incremented by those deltas. From the OS perspective, all the counters are 64-bit and their order in rdma_hw_stats->value[] array, as well as in irdma_hw_stat_names[], is the same for all HW gens. New statistics should always be added at the end. Signed-off-by: Krzysztof Czurylo Signed-off-by: Youvaraj Sagar Signed-off-by: Shiraz Saleem Link: https://lore.kernel.org/r/20230315145305.955-2-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky commit 6ea0c2de314fbaed8e10526c2284e992d145171d Author: Ira Weiny Date: Tue Mar 7 09:15:31 2023 -0800 RDMA/qib: Remove deprecated kmap() call kmap() has been deprecated in favor of the kmap_local_page() call. kmap_local_page() is thread local. In the sdma coalesce case the page allocated is potentially free'ed in a different context through qib_sdma_get_complete() -> qib_user_sdma_make_progress(). The use of kmap_local_page() is inappropriate in this call path. However, the page is allocated using GFP_KERNEL and will never be from highmem. Remove the use of kmap calls and use page_address() in this case. Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20230217-kmap-qib-v1-1-e5a6fde167e0@intel.com Acked-by: Dennis Dalessandro Signed-off-by: Leon Romanovsky commit d50b3c73f1ac20dabc53dc6e9d64ce9c79a331eb Author: Dan Carpenter Date: Tue Mar 7 12:51:27 2023 +0300 RDMA/mlx4: Prevent shift wrapping in set_user_sq_size() The ucmd->log_sq_bb_count variable is controlled by the user so this shift can wrap. Fix it by using check_shl_overflow() in the same way that it was done in commit 515f60004ed9 ("RDMA/hns: Prevent undefined behavior in hns_roce_set_user_sq_size()"). Fixes: 839041329fd3 ("IB/mlx4: Sanity check userspace send queue sizes") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/a8dfbd1d-c019-4556-930b-bab1ded73b10@kili.mountain Signed-off-by: Leon Romanovsky commit b31587feaa0133b19a1900a26bce07a3c6d21af6 Author: Bartosz Wawrzyniak Date: Thu Mar 16 10:03:39 2023 +0000 net: macb: Set MDIO clock divisor for pclk higher than 160MHz Currently macb sets clock divisor for pclk up to 160 MHz. Function gem_mdc_clk_div was updated to enable divisor for higher values of pclk. Signed-off-by: Bartosz Wawrzyniak Reviewed-by: Michal Kubiak Acked-by: Nicolas Ferre Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 6aa9b1d071bf62e7489601f57a13da55b1a96add Author: Tom Rix Date: Sat Mar 18 09:52:29 2023 -0400 ALSA: portman2x4: remove unused portman_read_command,data functions clang with W=1 reports sound/drivers/portman2x4.c:185:18: error: unused function 'portman_read_command' [-Werror,-Wunused-function] static inline u8 portman_read_command(struct portman *pm) ^ sound/drivers/portman2x4.c:195:18: error: unused function 'portman_read_data' [-Werror,-Wunused-function] static inline u8 portman_read_data(struct portman *pm) ^ These static functions are not used, so remove them. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230318135229.1685266-1-trix@redhat.com Signed-off-by: Takashi Iwai commit 0b40261256a71184c6bca487b91e6b748b077709 Author: Tom Rix Date: Sat Mar 18 09:27:08 2023 -0400 ALSA: ymfpci: remove unused snd_ymfpci_readb function clang with W=1 reports sound/pci/ymfpci/ymfpci_main.c:34:18: error: unused function 'snd_ymfpci_readb' [-Werror,-Wunused-function] static inline u8 snd_ymfpci_readb(struct snd_ymfpci *chip, u32 offset) ^ This static function is not used, so remove it. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230318132708.1684504-1-trix@redhat.com Signed-off-by: Takashi Iwai commit 08ff1c9f3e927ba3701c113dda70953a6f4afffa Author: Sreevani Sreejith Date: Wed Mar 15 12:54:05 2023 -0700 bpf, docs: Libbpf overview documentation This patch documents overview of libbpf, including its features for developing BPF programs. Signed-off-by: Sreevani Sreejith Signed-off-by: Andrii Nakryiko Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230315195405.2051559-1-ssreevani@meta.com commit 87a1ff66a0e57d9022665d24793f31fc54de182d Author: William Breathitt Gray Date: Sat Mar 11 09:02:18 2023 -0500 iio: dac: cio-dac: Migrate to the regmap API The regmap API supports IO port accessors so we can take advantage of regmap abstractions rather than handling access to the device registers directly in the driver. Includes trivial header inclusion tidy up. Suggested-by: Andy Shevchenko Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/20230311140218.74920-1-william.gray@linaro.org Signed-off-by: Jonathan Cameron commit 76f2c491a0cae850ad7413e89f62673e6ef90a97 Author: Uwe Kleine-König Date: Mon Mar 13 19:53:33 2023 +0100 iio: frequency: admv1013: Benefit from devm_clk_get_enabled() to simplify Make use of devm_clk_get_enabled() to replace some code that effectively open codes this new function. To retain ordering move the request to a place that is executed later. This way the time of enable keeps the same. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230313185333.2776785-1-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron commit fb37fdd02856e45e78209d32522029c9f77fe7b7 Author: Cheng Ziqiu Date: Tue Mar 14 15:01:30 2023 +0800 iio: adc: at91-sama5d2_adc: remove dead code in at91_adc_probe() From the comment of platform_get_irq(), it only returns non-zero IRQ number and negative error number, other than zero. Fix this by removing the if condition. Signed-off-by: Cheng Ziqiu Reviewed-by: Dongliang Mu Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230314070130.60581-1-chengziqiu@hust.edu.cn Signed-off-by: Jonathan Cameron commit 30da26eacea6867353f7aa2c18f37a0a0fa82af4 Author: Kasumov Ruslan Date: Wed Mar 15 16:51:14 2023 +0300 iio: adc: qcom-pm8xxx-xoadc: Remove useless condition in pm8xxx_xoadc_parse_channel() The left side of the loop condition never becomes false. hwchan cannot be NULL, because it points to elements of the hw_channels array that takes one of 4 predefined values: pm8018_xoadc_channels, pm8038_xoadc_channels, pm8058_xoadc_channels, pm8921_xoadc_channels. Found by Linux Verification Center (linuxtesting.org) with SVACE. Reviewed-by: Andi Shyti Reviewed-by: Linus Walleij Signed-off-by: Kasumov Ruslan Link: https://lore.kernel.org/r/20230315135114.22684-1-xhxgldhlpfy@gmail.com Signed-off-by: Jonathan Cameron commit 3cf15dc2f81f765078ca867eaf42400f26b2052c Author: Simon Ser Date: Sun Mar 5 10:35:10 2023 +0000 drm: fix typo in margin connector properties docs This was pointed out by Ville and Pekka in their replies, but forgot to apply the change properly before pushing. Sorry for the noise! Signed-off-by: Simon Ser Fixes: 409f07d353b3 ("drm: document connector margin properties") Cc: Ville Syrjälä Cc: Pekka Paalanen Cc: Maxime Ripard Cc: Dave Stevenson Reviewed-by: Pekka Paalanen Link: https://patchwork.freedesktop.org/patch/msgid/20230305103503.42619-1-contact@emersion.fr commit b5202a93cd3768b5f757dbc1c7d702772a34c9a3 Author: Ville Syrjälä Date: Sat Mar 11 01:58:28 2023 +0200 drm/i915: Extract intel_crtc_scanline_offset() Pull the scanline_offset calculation into its own function. Might have further use for this later with DSB scanline waits. Reviewed-by: Jani Nikula Reviewed-by: Mitul Golani Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230310235828.17439-4-ville.syrjala@linux.intel.com commit 84f4ebe8c1abbe375babbea46eab746a0060e80c Author: Ville Syrjälä Date: Sat Mar 11 01:58:27 2023 +0200 drm/i915: Relocate intel_crtc_update_active_timings() Move intel_crtc_update_active_timings() into intel_vblank.c where it more properly belongs. Also do the s/dev_priv/i915/ modernization rename while at it. Reviewed-by: Jani Nikula Reviewed-by: Mitul Golani Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230310235828.17439-3-ville.syrjala@linux.intel.com commit 6e8acb6686d805ac5d127fb691e28e742248c523 Author: Ville Syrjälä Date: Sat Mar 11 01:58:26 2023 +0200 drm/i915: Add belts and suspenders locking for seamless M/N changes Add some (probably overkill) locking to protect the vblank timestamping constants updates during seamless M/N fastsets. As everything should be naturally aligned I think the individual pieces should probably end up updating atomically enough. So this is only really meant to guarantee everyone sees a consistent whole. All the drm_vblank.c usage is covered by vblank_time_lock, and uncore.lock will take care of __intel_get_crtc_scanline() that can also be called from outside the core vblank functionality. Currently only crtc_clock and framedur_ns can change, but in the future might fastset also across eg. vtotal/vblank_end changes, so let's just grab the locks across the whole thing. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230310235828.17439-2-ville.syrjala@linux.intel.com commit 8cb1f95cca68421b08333175719fdd3615372ca8 Author: Ville Syrjälä Date: Sat Mar 11 01:58:25 2023 +0200 drm/i915: Update vblank timestamping stuff on seamless M/N change When we change the M/N values seamlessly during a fastset we should also update the vblank timestamping stuff to make sure the vblank timestamp corrections/guesstimations come out exact. Note that only crtc_clock and framedur_ns can actually end up changing here during fastsets. Everything else we touch can only change during full modesets. Technically we should try to do this exactly at the start of vblank, but that would require some kind of double buffering scheme. Let's skip that for now and just update things right after the commit has been submitted to the hardware. This means the information will be properly up to date when the vblank irq handler goes to work. Only if someone ends up querying some vblanky stuff in between the commit and start of vblank may we see a slight discrepancy. Also this same problem really exists for the DRRS downclocking stuff. But as that is supposed to be more or less transparent to the user, and it only drops to low gear after a long delay (1 sec currently) we probably don't have to worry about it. Any time something is actively submitting updates DRRS will remain in high gear and so the timestamping constants will match the hardware state. Reviewed-by: Jani Nikula Reviewed-by: Mitul Golani Fixes: e6f29923c048 ("drm/i915: Allow M/N change during fastset on bdw+") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230310235828.17439-1-ville.syrjala@linux.intel.com commit df28e8690e7126fa5c99e8863c27574204589f31 Merge: 39a86d059a78b e9d9da91548b2 Author: David S. Miller Date: Sat Mar 18 12:23:48 2023 +0000 Merge branch 'net-better-const' Eric Dumazet says: ==================== net: better const qualifier awareness This is a follow-up of d27d367d3b78 ("inet: better const qualifier awareness") Adopting container_of_const() to perform (struct sock *)->(protocol sock *) operation is allowing us to propagate const qualifier and thus detect misuses at compile time. Most conversions are trivial, because most protocols did not adopt yet const sk pointers where it could make sense. Only mptcp and tcp patches (end of this series) are requiring small adjustments. ==================== Signed-off-by: David S. Miller commit e9d9da91548b21e189fcd0259a0f2d26d1afc509 Author: Eric Dumazet Date: Fri Mar 17 15:55:39 2023 +0000 tcp: preserve const qualifier in tcp_sk() We can change tcp_sk() to propagate its argument const qualifier, thanks to container_of_const(). We have two places where a const sock pointer has to be upgraded to a write one. We have been using const qualifier for lockless listeners to clearly identify points where writes could happen. Add tcp_sk_rw() helper to better document these. tcp_inbound_md5_hash(), __tcp_grow_window(), tcp_reset_check() and tcp_rack_reo_wnd() get an additional const qualififer for their @tp local variables. smc_check_reset_syn_req() also needs a similar change. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 403a40f2304d4730a780ab9d6a2b93d1e4ac39d2 Author: Eric Dumazet Date: Fri Mar 17 15:55:38 2023 +0000 mptcp: preserve const qualifier in mptcp_sk() We can change mptcp_sk() to propagate its argument const qualifier, thanks to container_of_const(). We need to change few things to avoid build errors: mptcp_set_datafin_timeout() and mptcp_rtx_head() have to accept non-const sk pointers. @msk local variable in mptcp_pending_tail() must be const. Signed-off-by: Eric Dumazet Cc: Matthieu Baerts Reviewed-by: Simon Horman Reviewed-by: Matthieu Baerts Signed-off-by: David S. Miller commit c7154ca8e075cc456fe773879263b33ae307a59e Author: Eric Dumazet Date: Fri Mar 17 15:55:37 2023 +0000 x25: preserve const qualifier in [a]x25_sk() We can change [a]x25_sk() to propagate their argument const qualifier, thanks to container_of_const(). Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 407db475d505d5aa4c2352b80e429a02f5ccd1e4 Author: Eric Dumazet Date: Fri Mar 17 15:55:36 2023 +0000 smc: preserve const qualifier in smc_sk() We can change smc_sk() to propagate its argument const qualifier, thanks to container_of_const(). Signed-off-by: Eric Dumazet Cc: Karsten Graul Cc: Wenjia Zhang Cc: Jan Karcher Reviewed-by: Simon Horman Reviewed-by: Wenjia Zhang Signed-off-by: David S. Miller commit b064ba9c3cfaf3d22d6153ec3c245eaa4d913674 Author: Eric Dumazet Date: Fri Mar 17 15:55:35 2023 +0000 af_unix: preserve const qualifier in unix_sk() We can change unix_sk() to propagate its argument const qualifier, thanks to container_of_const(). We need to change dump_common_audit_data() 'struct unix_sock *u' local var to get a const attribute. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit ae6084b739925d84ef4a481d8eaa2187455f2e2f Author: Eric Dumazet Date: Fri Mar 17 15:55:34 2023 +0000 dccp: preserve const qualifier in dccp_sk() We can change dccp_sk() to propagate its argument const qualifier, thanks to container_of_const(). Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 47fcae28b9ec409423ba7f67f93e8345acce8a36 Author: Eric Dumazet Date: Fri Mar 17 15:55:33 2023 +0000 ipv6: raw: preserve const qualifier in raw6_sk() We can change raw6_sk() to propagate its argument const qualifier, thanks to container_of_const(). Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 0a2db4630b72486ec2f207ae433c2156b7fd3837 Author: Eric Dumazet Date: Fri Mar 17 15:55:32 2023 +0000 raw: preserve const qualifier in raw_sk() We can change raw_sk() to propagate const qualifier of its argument, thanks to container_of_const() Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 68ac9a8b6e65c7cbbe96541353dab1b3f8de2043 Author: Eric Dumazet Date: Fri Mar 17 15:55:31 2023 +0000 af_packet: preserve const qualifier in pkt_sk() We can change pkt_sk() to propagate const qualifier of its argument, thanks to container_of_const() This should avoid some potential errors caused by accidental (const -> not_const) promotion. Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 94c540fbfc80ef95ec398fc77da1920de2946edb Author: Eric Dumazet Date: Fri Mar 17 15:55:30 2023 +0000 udp: preserve const qualifier in udp_sk() We can change udp_sk() to propagate const qualifier of its argument, thanks to container_of_const() This should avoid some potential errors caused by accidental (const -> not_const) promotion. Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 55f1ecb1199000932cf82e357841cc7498ac904f Author: Sakari Ailus Date: Fri Feb 24 16:00:46 2023 +0100 media: v4l: subdev: Make link validation safer Link validation currently accesses invalid pointers if the link passed to it is not between two sub-devices. This is of course a driver bug. Ignore the error but print a warning message, as this is how it used to work previously. Fixes: a6b995ed03ff ("media: subdev: use streams in v4l2_subdev_link_validate()") Reported-by: Hans de Goede Signed-off-by: Sakari Ailus Tested-by: Hans de Goede Reviewed-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 530779157c06d64721b81d60f7ae2715cdf338d2 Author: Tomi Valkeinen Date: Fri Mar 3 16:52:49 2023 +0100 media: subdev: Fix validation state lockdep issue The new subdev state code has a possible deadlock scenario during link validation when the pipeline contains subdevs that support state and that do not support state. The current code locks the states of the subdevs on both ends of the link when starting the link validation, locking the sink side first, then the source. If either (or both) of the subdevs does not support state, nothing is done for that subdev at this point, and instead the locking is handled the old way, i.e. the subdev's ops do the locking internally. The issue arises when the sink doesn't support state, but source does, so the validation code locks the source for the duration of the validation, and then the sink is locked only when the get_fmt op is called. So lockdep sees the source locked first, then the sink. Later, when the streaming is started, the sink's s_stream op is called, which probably takes the subdev's lock. The op then calls the source's s_stream, which takes the source's lock. So, the sink is locked first, then the source. Note that link validation and stream starting is not done at the same time, so an actual deadlock should never happen. However, it's still a clear bug. Fix this by locking the subdev states only if both subdevs support state. In other words, we have two scenarios: 1. Both subdevs support state. Lock sink first, then source, and keep the locks while validating the link. 2. At least one of the subdevs do not support state. Take the lock only for the duration of the operation (get_fmt or looking at the routing), and release after the op is done. Obviously 1. is better, as we have a more consistent view of the states of the subdevs during validation. 2. is how it has been so far, so it's no worse than this used to be. Signed-off-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b928db94044891a1d3aac379fc52a27b5a12a715 Author: Arnd Bergmann Date: Tue Feb 7 17:13:12 2023 +0100 media: i2c: imx290: fix conditional function definitions The runtime suspend/resume functions are only referenced from the dev_pm_ops, but they use the old SET_RUNTIME_PM_OPS() helper that requires a __maybe_unused annotation to avoid a warning: drivers/media/i2c/imx290.c:1082:12: error: unused function 'imx290_runtime_resume' [-Werror,-Wunused-function] static int imx290_runtime_resume(struct device *dev) ^ drivers/media/i2c/imx290.c:1090:12: error: unused function 'imx290_runtime_suspend' [-Werror,-Wunused-function] static int imx290_runtime_suspend(struct device *dev) ^ Convert this to the new RUNTIME_PM_OPS() helper that so this is not required. To improve this further, also use the pm_ptr() helper that lets the dev_pm_ops get dropped entirely when CONFIG_PM is disabled. A related mistake happened in the of_match_ptr() macro here, which like SET_RUNTIME_PM_OPS() requires the match table to be marked as __maybe_unused, though I could not reproduce building this without CONFIG_OF. Remove the of_match_ptr() here as there is no point in dropping the match table in configurations without CONFIG_OF. Fixes: 02852c01f654 ("media: i2c: imx290: Initialize runtime PM before subdev") Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b0d944bc47ced3a476726fbf7fed878b604366e4 Author: Javier Martinez Canillas Date: Tue Feb 7 11:22:54 2023 +0100 media: Revert "venus: firmware: Correct non-pix start and end addresses" This reverts commit a837e5161cfffbb3242cc0eb574f8bf65fd32640, which broke probing of the venus driver, at least on the SC7180 SoC HP X2 Chromebook: [ 11.455782] qcom-venus aa00000.video-codec: Adding to iommu group 11 [ 11.506980] qcom-venus aa00000.video-codec: non legacy binding [ 12.143432] qcom-venus aa00000.video-codec: failed to reset venus core [ 12.156440] qcom-venus: probe of aa00000.video-codec failed with error -110 Matthias Kaehlcke also reported that the same change caused a regression in SC7180 and sc7280, that prevents AOSS from entering sleep mode during system suspend. So let's revert this commit for now to fix both issues. Fixes: a837e5161cff ("venus: firmware: Correct non-pix start and end addresses") Reported-by: Matthias Kaehlcke Signed-off-by: Javier Martinez Canillas Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 39a86d059a78bf29b66dd8bbeab04af1d55c02ba Merge: 36bd28c1cb0db 6ee44c518159c Author: Jakub Kicinski Date: Fri Mar 17 22:41:18 2023 -0700 Merge branch 'net-mlx5e-add-gbp-vxlan-hw-offload-support' Gavin Li says: ==================== net/mlx5e: Add GBP VxLAN HW offload support Patch-1: Remove unused argument from functions. Patch-2: Expose helper function vxlan_build_gbp_hdr. Patch-3: Add helper function for encap_info_equal for tunnels with options. Patch-4: Preserving the const-ness of the pointer in ip_tunnel_info_opts. Patch-5: Add HW offloading support for TC flows with VxLAN GBP encap/decap in mlx ethernet driver. ==================== Link: https://lore.kernel.org/r/20230316070758.83512-1-gavinl@nvidia.com Signed-off-by: Jakub Kicinski commit 6ee44c518159c364e5d30ed85d357fe1d8e2c141 Author: Gavin Li Date: Thu Mar 16 09:07:58 2023 +0200 net/mlx5e: TC, Add support for VxLAN GBP encap/decap flows offload Add HW offloading support for TC flows with VxLAN GBP encap/decap. Example of encap rule: tc filter add dev eth0 protocol ip ingress flower \ action tunnel_key set id 42 vxlan_opts 512 \ action mirred egress redirect dev vxlan1 Example of decap rule: tc filter add dev vxlan1 protocol ip ingress flower \ enc_key_id 42 enc_dst_port 4789 vxlan_opts 1024 \ action tunnel_key unset action mirred egress redirect dev eth0 Signed-off-by: Gavin Li Reviewed-by: Gavi Teitz Reviewed-by: Roi Dayan Reviewed-by: Maor Dickman Acked-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit bc9d003dc48c381763c3a6309bfc5eecf9962b9c Author: Gavin Li Date: Thu Mar 16 09:07:57 2023 +0200 ip_tunnel: Preserve pointer const in ip_tunnel_info_opts Change ip_tunnel_info_opts( ) from static function to macro to cast return value and preserve the const-ness of the pointer. Signed-off-by: Gavin Li Reviewed-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 58de53c1025836529af9e22e96375d0874e2baca Author: Gavin Li Date: Thu Mar 16 09:07:56 2023 +0200 net/mlx5e: Add helper for encap_info_equal for tunnels with options For tunnels with options, eg, geneve and vxlan with gbp, they share the same way to compare the headers and options. Extract the code as a common function for them. Signed-off-by: Gavin Li Reviewed-by: Gavi Teitz Reviewed-by: Roi Dayan Reviewed-by: Maor Dickman Acked-by: Saeed Mahameed Signed-off-by: Jakub Kicinski commit c641e9279f3530aa2fe4bcb250477b555b75104a Author: Gavin Li Date: Thu Mar 16 09:07:55 2023 +0200 vxlan: Expose helper vxlan_build_gbp_hdr The function vxlan_build_gbp_hdr will be used by other modules to build gbp option in vxlan header according to gbp flags. Signed-off-by: Gavin Li Reviewed-by: Gavi Teitz Reviewed-by: Roi Dayan Reviewed-by: Maor Dickman Acked-by: Saeed Mahameed Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit df5e87f16c338aa4f62ed3353e73e39e68af965e Author: Gavin Li Date: Thu Mar 16 09:07:54 2023 +0200 vxlan: Remove unused argument from vxlan_build_gbp_hdr( ) and vxlan_build_gpe_hdr( ) Remove unused argument (i.e. u32 vxflags) in vxlan_build_gbp_hdr( ) and vxlan_build_gpe_hdr( ) function arguments. Signed-off-by: Gavin Li Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 36bd28c1cb0dbf48645cfe43159907fb3253b33a Author: haozhe chang Date: Thu Mar 16 17:58:20 2023 +0800 wwan: core: Support slicing in port TX flow of WWAN subsystem wwan_port_fops_write inputs the SKB parameter to the TX callback of the WWAN device driver. However, the WWAN device (e.g., t7xx) may have an MTU less than the size of SKB, causing the TX buffer to be sliced and copied once more in the WWAN device driver. This patch implements the slicing in the WWAN subsystem and gives the WWAN devices driver the option to slice(by frag_len) or not. By doing so, the additional memory copy is reduced. Meanwhile, this patch gives WWAN devices driver the option to reserve headroom in fragments for the device-specific metadata. Signed-off-by: haozhe chang Reviewed-by: Loic Poulain Link: https://lore.kernel.org/r/20230316095826.181904-1-haozhe.chang@mediatek.com Signed-off-by: Jakub Kicinski commit ed0578a46c5f08647f5ecb0e3c735a53267426f7 Author: Harini Katakam Date: Thu Mar 16 14:00:50 2023 +0530 net: macb: Increase halt timeout to accommodate 10Mbps link Increase halt timeout to accommodate for 16K SRAM at 10Mbps rounded. Signed-off-by: Harini Katakam Signed-off-by: Michal Simek Signed-off-by: Radhey Shyam Pandey Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230316083050.2108-1-harini.katakam@amd.com Signed-off-by: Jakub Kicinski commit 0de10fd6eb94259a749d558ee0d34083ae010a1d Author: Alex Elder Date: Wed Mar 15 14:43:05 2023 -0500 dt-bindings: net: qcom,ipa: add SDX65 compatible Add support for SDX65, which uses IPA v5.0. Reviewed-by: Simon Horman Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20230315194305.1647311-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 0e23f8ea4dca0277457478e17953a852759739a5 Merge: 4dd2744fae6dc 2c7e46edbd030 Author: Jakub Kicinski Date: Fri Mar 17 22:31:44 2023 -0700 Merge branch 'net-dsa-mv88e6xxx-accelerate-c45-scan' Klaus Kudielka says: ==================== net: dsa: mv88e6xxx: accelerate C45 scan Starting with commit 1a136ca2e089 ("net: mdio: scan bus based on bus capabilities for C22 and C45"), mdiobus_scan_bus_c45() is being called on buses with MDIOBUS_NO_CAP. On a Turris Omnia (Armada 385, 88E6176 switch), this causes a significant increase of boot time, from 1.6 seconds, to 6.3 seconds. The boot time stated here is until start of /init. Further testing revealed that the C45 scan is indeed expensive (around 2.7 seconds, due to a huge number of bus transactions), and called twice. Two things were suggested: (1) to move the expensive call of mv88e6xxx_mdios_register() from mv88e6xxx_probe() to mv88e6xxx_setup(). (2) to mask apparently non-existing phys during probing. Before that: Patch #1 prepares the driver to handle the movement of mv88e6xxx_mdios_register() to mv88e6xxx_setup() for cross-chip DSA trees. Patch #2 is preparatory code movement, without functional change. With those changes, boot time on the Turris Omnia is back to normal. Link: https://lore.kernel.org/lkml/449bde236c08d5ab5e54abd73b645d8b29955894.camel@gmail.com/ ==================== Link: https://lore.kernel.org/r/20230315163846.3114-1-klaus.kudielka@gmail.com Signed-off-by: Jakub Kicinski commit 2c7e46edbd0308c12b8232ff4270d0894cbdce44 Author: Klaus Kudielka Date: Wed Mar 15 17:38:46 2023 +0100 net: dsa: mv88e6xxx: mask apparently non-existing phys during probing To avoid excessive mdio bus transactions during probing, mask all phy addresses that do not exist (there is a 1:1 mapping between switch port number and phy address). Suggested-by: Andrew Lunn Signed-off-by: Klaus Kudielka Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 2cb0658d4f88608a19b3833789ac0ac8a4214f0b Author: Klaus Kudielka Date: Wed Mar 15 17:38:45 2023 +0100 net: dsa: mv88e6xxx: move call to mv88e6xxx_mdios_register() Call the rather expensive mv88e6xxx_mdios_register() at the beginning of mv88e6xxx_setup(). This avoids the double call via mv88e6xxx_probe() during boot. For symmetry, call mv88e6xxx_mdios_unregister() at the end of mv88e6xxx_teardown(). Link: https://lore.kernel.org/lkml/449bde236c08d5ab5e54abd73b645d8b29955894.camel@gmail.com/ Suggested-by: Andrew Lunn Signed-off-by: Klaus Kudielka Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit f1bee740fa821c28582bb17c42e2242041e598b8 Author: Klaus Kudielka Date: Wed Mar 15 17:38:44 2023 +0100 net: dsa: mv88e6xxx: re-order functions Move mv88e6xxx_setup() below mv88e6xxx_mdios_register(), so that we are able to call the latter one from here. Do the same thing for the inverse functions. Signed-off-by: Klaus Kudielka Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit b1a2de9ccfe63b50e493ebb57b85beb5785200c7 Author: Vladimir Oltean Date: Wed Mar 15 17:38:43 2023 +0100 net: dsa: mv88e6xxx: don't dispose of Global2 IRQ mappings from mdiobus code irq_find_mapping() does not need irq_dispose_mapping(), only irq_create_mapping() does. Calling irq_dispose_mapping() from mv88e6xxx_g2_irq_mdio_free() and from the error path of mv88e6xxx_g2_irq_mdio_setup() effectively means that the mdiobus logic (for internal PHY interrupts) is disposing of a hwirq->virq mapping which it is not responsible of (but instead, the function pair mv88e6xxx_g2_irq_setup() + mv88e6xxx_g2_irq_free() is). With the current code structure, this isn't such a huge problem, because mv88e6xxx_g2_irq_mdio_free() is called relatively close to the real owner of the IRQ mappings: mv88e6xxx_remove() -> mv88e6xxx_unregister_switch() -> mv88e6xxx_mdios_unregister() -> mv88e6xxx_g2_irq_mdio_free() -> mv88e6xxx_g2_irq_free() and the switch isn't 'live' in any way such that it would be able of generating interrupts at this point (mv88e6xxx_unregister_switch() has been called). However, there is a desire to split mv88e6xxx_mdios_unregister() and mv88e6xxx_g2_irq_free() such that mv88e6xxx_mdios_unregister() only gets called from mv88e6xxx_teardown(). This is much more problematic, as can be seen below. In a cross-chip scenario (say 3 switches d0032004.mdio-mii:10, d0032004.mdio-mii:11 and d0032004.mdio-mii:12 which form a single DSA tree), it is possible to unbind the device driver from a single switch (say d0032004.mdio-mii:10). When that happens, mv88e6xxx_remove() will be called for just that one switch, and this will call mv88e6xxx_unregister_switch() which will tear down the entire tree (calling mv88e6xxx_teardown() for all 3 switches). Assuming mv88e6xxx_mdios_unregister() was moved to mv88e6xxx_teardown(), at this stage, all 3 switches will have called irq_dispose_mapping() on their mdiobus virqs. When we bind again the device driver to d0032004.mdio-mii:10, mv88e6xxx_probe() is called for it, which calls dsa_register_switch(). The DSA tree is now complete again, and mv88e6xxx_setup() is called for all 3 switches. Also assuming that mv88e6xxx_mdios_register() is moved to mv88e6xxx_setup() (the 2 assumptions go together), at this point, d0032004.mdio-mii:11 and d0032004.mdio-mii:12 don't have an IRQ mapping for the internal PHYs anymore, as they've disposed of it in mv88e6xxx_teardown(). Whereas switch d0032004.mdio-mii:10 has re-created it, because its code path comes from mv88e6xxx_probe(). Simply put, this change prepares the driver to handle the movement of mv88e6xxx_mdios_register() to mv88e6xxx_setup() for cross-chip DSA trees. Also, the code being deleted was partially wrong anyway (in a way which may have hidden this other issue). mv88e6xxx_g2_irq_mdio_setup() populates bus->irq[] starting with offset chip->info->phy_base_addr, but the teardown path doesn't apply that offset too. So it disposes of virq 0 for phy = [ 0, phy_base_addr ). All switch families have phy_base_addr = 0, except for MV88E6141 and MV88E6341 which have it as 0x10. I guess those families would have happened to work by mistake in cross-chip scenarios too. I'm deleting the body of mv88e6xxx_g2_irq_mdio_free() but leaving its call sites and prototype in place. This is because, if we ever need to add back some teardown procedure in the future, it will be perhaps error-prone to deduce the proper call sites again. Whereas like this, no extra code should get generated, it shouldn't bother anybody. Signed-off-by: Vladimir Oltean Signed-off-by: Klaus Kudielka Tested-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 4dd2744fae6dc705c5d2298fe0f0812d34f5b64e Author: mengyuanlou Date: Wed Mar 15 17:18:46 2023 +0800 net: wangxun: Remove macro that is redefined Remove PCI_VENDOR_ID_WANGXUN which is redefined in drivers/pci/quirks. Signed-off-by: mengyuanlou Link: https://lore.kernel.org/r/20230315091846.17314-1-mengyuanlou@net-swift.com Signed-off-by: Jakub Kicinski commit 6365ba64b4dbe8b59ddaeaa724b281f3787715d5 Author: Jeremi Piotrowski Date: Wed Mar 8 15:05:31 2023 +0000 ptp: kvm: Use decrypted memory in confidential guest on x86 KVM_HC_CLOCK_PAIRING currently fails inside SEV-SNP guests because the guest passes an address to static data to the host. In confidential computing the host can't access arbitrary guest memory so handling the hypercall runs into an "rmpfault". To make the hypercall work, the guest needs to explicitly mark the memory as decrypted. Do that in kvm_arch_ptp_init(), but retain the previous behavior for non-confidential guests to save us from having to allocate memory. Add a new arch-specific function (kvm_arch_ptp_exit()) to free the allocation and mark the memory as encrypted again. Signed-off-by: Jeremi Piotrowski Link: https://lore.kernel.org/r/20230308150531.477741-1-jpiotrowski@linux.microsoft.com Signed-off-by: Jakub Kicinski commit 1118aa4c70a6978afb0c4391ad29826c14b842b3 Merge: 79a22238b4f22 478a351ce0d69 Author: Jakub Kicinski Date: Fri Mar 17 16:29:25 2023 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net net/wireless/nl80211.c b27f07c50a73 ("wifi: nl80211: fix puncturing bitmap policy") cbbaf2bb829b ("wifi: nl80211: add a command to enable/disable HW timestamping") https://lore.kernel.org/all/20230314105421.3608efae@canb.auug.org.au tools/testing/selftests/net/Makefile 62199e3f1658 ("selftests: net: Add VXLAN MDB test") 13715acf8ab5 ("selftest: Add test for bind() conflicts.") Signed-off-by: Jakub Kicinski commit f3d90f901d18749dca096719540a075f59240051 Author: Sean Christopherson Date: Thu Feb 2 18:27:51 2023 +0000 KVM: x86/mmu: Clean up mmu.c functions that put return type on separate line Adjust a variety of functions in mmu.c to put the function return type on the same line as the function declaration. As stated in the Linus specification: But the "on their own line" is complete garbage to begin with. That will NEVER be a kernel rule. We should never have a rule that assumes things are so long that they need to be on multiple lines. We don't put function return types on their own lines either, even if some other projects have that rule (just to get function names at the beginning of lines or some other odd reason). Leave the functions generated by BUILD_MMU_ROLE_REGS_ACCESSOR() as-is, that code is basically illegible no matter how it's formatted. No functional change intended. Link: https://lore.kernel.org/mm-commits/CAHk-=wjS-Jg7sGMwUPpDsjv392nDOOs0CtUtVkp=S6Q7JzFJRw@mail.gmail.com Signed-off-by: Ben Gardon Link: https://lore.kernel.org/r/20230202182809.1929122-4-bgardon@google.com Signed-off-by: Sean Christopherson commit eddd9e8302de77cea52b3b2aaa3e1db19e680dd0 Author: Sean Christopherson Date: Thu Feb 2 18:27:50 2023 +0000 KVM: x86/mmu: Replace comment with an actual lockdep assertion on mmu_lock Assert that mmu_lock is held for write in __walk_slot_rmaps() instead of hoping the function comment will magically prevent introducing bugs. Signed-off-by: Ben Gardon Link: https://lore.kernel.org/r/20230202182809.1929122-3-bgardon@google.com Signed-off-by: Sean Christopherson commit 727ae377013249c05359f84975d21f3d13c70907 Author: Sean Christopherson Date: Thu Feb 2 18:27:49 2023 +0000 KVM: x86/mmu: Rename slot rmap walkers to add clarity and clean up code Replace "slot_handle_level" with "walk_slot_rmaps" to better capture what the helpers are doing, and to slightly shorten the function names so that each function's return type and attributes can be placed on the same line as the function declaration. No functional change intended. Link: https://lore.kernel.org/mm-commits/CAHk-=wjS-Jg7sGMwUPpDsjv392nDOOs0CtUtVkp=S6Q7JzFJRw@mail.gmail.com Signed-off-by: Ben Gardon Link: https://lore.kernel.org/r/20230202182809.1929122-2-bgardon@google.com Signed-off-by: Sean Christopherson commit 2be7aa76cc69633930fb747e1d85d33a63a60c02 Author: Manu Bretelle Date: Fri Mar 17 09:32:56 2023 -0700 selftests/bpf: Add --json-summary option to test_progs Currently, test_progs outputs all stdout/stderr as it runs, and when it is done, prints a summary. It is non-trivial for tooling to parse that output and extract meaningful information from it. This change adds a new option, `--json-summary`/`-J` that let the caller specify a file where `test_progs{,-no_alu32}` can write a summary of the run in a json format that can later be parsed by tooling. Currently, it creates a summary section with successes/skipped/failures followed by a list of failed tests and subtests. A test contains the following fields: - name: the name of the test - number: the number of the test - message: the log message that was printed by the test. - failed: A boolean indicating whether the test failed or not. Currently we only output failed tests, but in the future, successful tests could be added. - subtests: A list of subtests associated with this test. A subtest contains the following fields: - name: same as above - number: sanme as above - message: the log message that was printed by the subtest. - failed: same as above but for the subtest An example run and json content below: ``` $ sudo ./test_progs -a $(grep -v '^#' ./DENYLIST.aarch64 | awk '{print $1","}' | tr -d '\n') -j -J /tmp/test_progs.json $ jq < /tmp/test_progs.json | head -n 30 { "success": 29, "success_subtest": 23, "skipped": 3, "failed": 28, "results": [ { "name": "bpf_cookie", "number": 10, "message": "test_bpf_cookie:PASS:skel_open 0 nsec\n", "failed": true, "subtests": [ { "name": "multi_kprobe_link_api", "number": 2, "message": "kprobe_multi_link_api_subtest:PASS:load_kallsyms 0 nsec\nlibbpf: extern 'bpf_testmod_fentry_test1' (strong): not resolved\nlibbpf: failed to load object 'kprobe_multi'\nlibbpf: failed to load BPF skeleton 'kprobe_multi': -3\nkprobe_multi_link_api_subtest:FAIL:fentry_raw_skel_load unexpected error: -3\n", "failed": true }, { "name": "multi_kprobe_attach_api", "number": 3, "message": "libbpf: extern 'bpf_testmod_fentry_test1' (strong): not resolved\nlibbpf: failed to load object 'kprobe_multi'\nlibbpf: failed to load BPF skeleton 'kprobe_multi': -3\nkprobe_multi_attach_api_subtest:FAIL:fentry_raw_skel_load unexpected error: -3\n", "failed": true }, { "name": "lsm", "number": 8, "message": "lsm_subtest:PASS:lsm.link_create 0 nsec\nlsm_subtest:FAIL:stack_mprotect unexpected stack_mprotect: actual 0 != expected -1\n", "failed": true } ``` The file can then be used to print a summary of the test run and list of failing tests/subtests: ``` $ jq -r < /tmp/test_progs.json '"Success: \(.success)/\(.success_subtest), Skipped: \(.skipped), Failed: \(.failed)"' Success: 29/23, Skipped: 3, Failed: 28 $ jq -r < /tmp/test_progs.json '.results | map([ if .failed then "#\(.number) \(.name)" else empty end, ( . as {name: $tname, number: $tnum} | .subtests | map( if .failed then "#\($tnum)/\(.number) \($tname)/\(.name)" else empty end ) ) ]) | flatten | .[]' | head -n 20 #10 bpf_cookie #10/2 bpf_cookie/multi_kprobe_link_api #10/3 bpf_cookie/multi_kprobe_attach_api #10/8 bpf_cookie/lsm #15 bpf_mod_race #15/1 bpf_mod_race/ksym (used_btfs UAF) #15/2 bpf_mod_race/kfunc (kfunc_btf_tab UAF) #36 cgroup_hierarchical_stats #61 deny_namespace #61/1 deny_namespace/unpriv_userns_create_no_bpf #73 fexit_stress #83 get_func_ip_test #99 kfunc_dynptr_param #99/1 kfunc_dynptr_param/dynptr_data_null #99/4 kfunc_dynptr_param/dynptr_data_null #100 kprobe_multi_bench_attach #100/1 kprobe_multi_bench_attach/kernel #100/2 kprobe_multi_bench_attach/modules #101 kprobe_multi_test #101/1 kprobe_multi_test/skel_api ``` Signed-off-by: Manu Bretelle Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230317163256.3809328-1-chantr4@gmail.com commit 6cae5a7106e272e7908a1facdf519a307f93872d Merge: 0f10f647f4554 95fdf6e313a98 Author: Andrii Nakryiko Date: Fri Mar 17 15:44:27 2023 -0700 Merge branch 'bpf: Add detection of kfuncs.' Alexei Starovoitov says: ==================== From: Alexei Starovoitov Allow BPF programs detect at load time whether particular kfunc exists. Patch 1: Allow ld_imm64 to point to kfunc in the kernel. Patch 2: Fix relocation of kfunc in ld_imm64 insn when kfunc is in kernel module. Patch 3: Introduce bpf_ksym_exists() macro. Patch 4: selftest. NOTE: detection of kfuncs from light skeleton is not supported yet. ==================== Signed-off-by: Andrii Nakryiko commit 95fdf6e313a981b0729886f86916190cb418b04c Author: Alexei Starovoitov Date: Fri Mar 17 13:19:20 2023 -0700 selftests/bpf: Add test for bpf_ksym_exists(). Add load and run time test for bpf_ksym_exists() and check that the verifier performs dead code elimination for non-existing kfunc. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Reviewed-by: Martin KaFai Lau Reviewed-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20230317201920.62030-5-alexei.starovoitov@gmail.com commit 5cbd3fe3a91df46ea201cc5d8ab4e390332ec26e Author: Alexei Starovoitov Date: Fri Mar 17 13:19:19 2023 -0700 libbpf: Introduce bpf_ksym_exists() macro. Introduce bpf_ksym_exists() macro that can be used by BPF programs to detect at load time whether particular ksym (either variable or kfunc) is present in the kernel. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230317201920.62030-4-alexei.starovoitov@gmail.com commit 5fc13ad59b60708e52932188854d4d5bf2b0e10e Author: Alexei Starovoitov Date: Fri Mar 17 13:19:18 2023 -0700 libbpf: Fix relocation of kfunc ksym in ld_imm64 insn. void *p = kfunc; -> generates ld_imm64 insn. kfunc() -> generates bpf_call insn. libbpf patches bpf_call insn correctly while only btf_id part of ld_imm64 is set in the former case. Which means that pointers to kfuncs in modules are not patched correctly and the verifier rejects load of such programs due to btf_id being out of range. Fix libbpf to patch ld_imm64 for kfunc. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230317201920.62030-3-alexei.starovoitov@gmail.com commit 58aa2afbb1e61fcf35bfcc819952a3c13d9f9203 Author: Alexei Starovoitov Date: Fri Mar 17 13:19:17 2023 -0700 bpf: Allow ld_imm64 instruction to point to kfunc. Allow ld_imm64 insn with BPF_PSEUDO_BTF_ID to hold the address of kfunc. The ld_imm64 pointing to a valid kfunc will be seen as non-null PTR_TO_MEM by is_branch_taken() logic of the verifier, while libbpf will resolve address to unknown kfunc as ld_imm64 reg, 0 which will also be recognized by is_branch_taken() and the verifier will proceed dead code elimination. BPF programs can use this logic to detect at load time whether kfunc is present in the kernel with bpf_ksym_exists() macro that is introduced in the next patches. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Reviewed-by: Martin KaFai Lau Reviewed-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20230317201920.62030-2-alexei.starovoitov@gmail.com commit 9d4655da1a4c17f6691a6434303d9973017bf1ca Author: David Matlack Date: Thu Jan 26 10:40:23 2023 -0800 KVM: x86/mmu: Use gfn_t in kvm_flush_remote_tlbs_range() Use gfn_t instead of u64 for kvm_flush_remote_tlbs_range()'s parameters, since gfn_t is the standard type for GFNs throughout KVM. Opportunistically rename pages to nr_pages to make its role even more obvious. No functional change intended. Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20230126184025.2294823-6-dmatlack@google.com [sean: convert pages to gfn_t too, and rename] Signed-off-by: Sean Christopherson commit dc87fad6448fc574456516404469c0c2c48d642e Author: Javier Carrasco Date: Wed Mar 15 09:20:21 2023 +0100 rtc: pcf8523: remove unnecessary OR operation The value variable is initialized to 0 and it is not used to set any other bits rather than the one that defines the capacitor value. Setting this capacitor value is the only purpose of the function where the variable is defined and therefore the OR operation does not apply as a way to foresee functionality extensions either. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20230315082021.2104452-3-javier.carrasco@wolfvision.net Signed-off-by: Alexandre Belloni commit b48cc753c017d1f5c6e317538205d40e70d04f3c Author: Javier Carrasco Date: Wed Mar 15 09:20:20 2023 +0100 rtc: pcf8523: fix coding-style issues Minor modifications for coding-style correctness (tabs, spaces and blank lines before and after brackets). In total 7 errors, 3 warnings and 1 check where removed from the checkpatch output without damaging code readability. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20230315082021.2104452-2-javier.carrasco@wolfvision.net Signed-off-by: Alexandre Belloni commit cca1e2f790703bb22b56d94c5efc66c1d9517b21 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:12:26 2023 +0100 rtc: ds1390: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/rtc/rtc-ds1390.c:216:34: error: ‘ds1390_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230311111226.250922-1-krzysztof.kozlowski@linaro.org Signed-off-by: Alexandre Belloni commit f69c2b5420497b7a54181ce170d682cbeb1f119f Author: Krzysztof Kozlowski Date: Sat Mar 11 10:40:21 2023 +0100 rtc: omap: include header for omap_rtc_power_off_program prototype Non-static functions should have a prototype: drivers/rtc/rtc-omap.c:410:5: error: no previous prototype for ‘omap_rtc_power_off_program’ [-Werror=missing-prototypes] Fixes: 6256f7f7f217 ("rtc: OMAP: Add support for rtc-only mode") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230311094021.79730-1-krzysztof.kozlowski@linaro.org Signed-off-by: Alexandre Belloni commit 4d9890ac9d43d4dfd011110ab96633caa6fa829c Author: Rob Herring Date: Fri Mar 10 08:47:36 2023 -0600 rtc: sun6i: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Reviewed-by: Jernej Skrabec Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20230310144736.1547041-1-robh@kernel.org Signed-off-by: Alexandre Belloni commit 8c63e8c2176552d5c003d7459609383d32bf47f3 Author: David Matlack Date: Thu Jan 26 10:40:22 2023 -0800 KVM: x86/mmu: Rename kvm_flush_remote_tlbs_with_address() Rename kvm_flush_remote_tlbs_with_address() to kvm_flush_remote_tlbs_range(). This name is shorter, which reduces the number of callsites that need to be broken up across multiple lines, and more readable since it conveys a range of memory is being flushed rather than a single address. No functional change intended. Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20230126184025.2294823-5-dmatlack@google.com Signed-off-by: Sean Christopherson commit f12f0c7da37c58da92bd4a6bdc469df7e0b2da5e Author: Conor Dooley Date: Thu Mar 9 20:44:51 2023 +0000 rtc: mpfs: convert SOC_MICROCHIP_POLARFIRE to ARCH_MICROCHIP_POLARFIRE As part of converting RISC-V SOC_FOO symbols to ARCH_FOO to match the use of such symbols on other architectures, convert the Microchip FPGA RTC driver to use the new symbol. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20230309204452.969574-5-conor@kernel.org Signed-off-by: Alexandre Belloni commit 28e4b4597d65927f8147c493d66aa0fe006e364c Author: David Matlack Date: Thu Jan 26 10:40:21 2023 -0800 KVM: x86/mmu: Collapse kvm_flush_remote_tlbs_with_{range,address}() together Collapse kvm_flush_remote_tlbs_with_range() and kvm_flush_remote_tlbs_with_address() into a single function. This eliminates some lines of code and a useless NULL check on the range struct. Opportunistically switch from ENOTSUPP to EOPNOTSUPP to make checkpatch happy. Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20230126184025.2294823-4-dmatlack@google.com Signed-off-by: Sean Christopherson commit 4cdb91b0dea7d7f59fa84a13c7753cd434fdedcf Author: Kamalesh Babulal Date: Fri Mar 3 15:23:10 2023 +0530 cgroup: bpf: use cgroup_lock()/cgroup_unlock() wrappers Replace mutex_[un]lock() with cgroup_[un]lock() wrappers to stay consistent across cgroup core and other subsystem code, while operating on the cgroup_mutex. Signed-off-by: Kamalesh Babulal Acked-by: Alexei Starovoitov Reviewed-by: Christian Brauner Signed-off-by: Tejun Heo commit cd2440d66fec7d1bdb4f605b64c27c63c9141989 Author: Petr Mladek Date: Tue Mar 7 13:53:35 2023 +0100 workqueue: Print backtraces from CPUs with hung CPU bound workqueues The workqueue watchdog reports a lockup when there was not any progress in the worker pool for a long time. The progress means that a pending work item starts being proceed. Worker pools for unbound workqueues always wake up an idle worker and try to process the work immediately. The last idle worker has to create new worker first. The stall might happen only when a new worker could not be created in which case an error should get printed. Another problem might be too high load. In this case, workers are victims of a global system problem. Worker pools for CPU bound workqueues are designed for lightweight work items that do not need much CPU time. They are proceed one by one on a single worker. New worker is used only when a work is sleeping. It creates one additional scenario. The stall might happen when the CPU-bound workqueue is used for CPU-intensive work. More precisely, the stall is detected when a CPU-bound worker is in the TASK_RUNNING state for too long. In this case, it might be useful to see the backtrace from the problematic worker. The information how long a worker is in the running state is not available. But the CPU-bound worker pools do not have many workers in the running state by definition. And only few pools are typically blocked. It should be acceptable to print backtraces from all workers in TASK_RUNNING state in the stalled worker pools. The number of false positives should be very low. Signed-off-by: Petr Mladek Signed-off-by: Tejun Heo commit 4c0736a76a186e5df2cd2afda3e7a04d2a427d1b Author: Petr Mladek Date: Tue Mar 7 13:53:34 2023 +0100 workqueue: Warn when a rescuer could not be created Rescuers are created when a workqueue with WQ_MEM_RECLAIM is allocated. It typically happens during the system boot. systemd switches the root filesystem from initrd to the booted system during boot. It kills processes that block the switch for too long. One of the process might be modprobe that tries to create a workqueue. These problems are hard to reproduce. Also alloc_workqueue() does not pass the error code. Make the debugging easier by printing an error, similar to create_worker(). Signed-off-by: Petr Mladek Signed-off-by: Tejun Heo commit 60f540389a5d2df25ddc7ad511b4fa2880dea521 Author: Petr Mladek Date: Tue Mar 7 13:53:33 2023 +0100 workqueue: Interrupted create_worker() is not a repeated event kthread_create_on_node() might get interrupted(). It is rare but realistic. For example, when an unbound workqueue is allocated in module_init() callback. It is done in the context of the "modprobe" process. And, for example, systemd might kill pending processes when switching root from initrd to the booted system. The interrupt is a one-off event and the race might be hard to reproduce. It is always worth printing. Signed-off-by: Petr Mladek Signed-off-by: Tejun Heo commit 3f0ea0b864562c6bd1cee892026067eaea7be242 Author: Petr Mladek Date: Tue Mar 7 13:53:32 2023 +0100 workqueue: Warn when a new worker could not be created The workqueue watchdog reports a lockup when there was not any progress in the worker pool for a long time. The progress means that a pending work item starts being proceed. The progress is guaranteed by using idle workers or creating new workers for pending work items. There are several reasons why a new worker could not be created: + there is not enough memory + there is no free pool ID (IDR API) + the system reached PID limit + the process creating the new worker was interrupted + the last idle worker (manager) has not been scheduled for a long time. It was not able to even start creating the kthread. None of these failures is reported at the moment. The only clue is that show_one_worker_pool() prints that there is a manager. It is the last idle worker that is responsible for creating a new one. But it is not clear if create_worker() is failing and why. Make the debugging easier by printing errors in create_worker(). The error code is important, especially from kthread_create_on_node(). It helps to distinguish the various reasons. For example, reaching memory limit (-ENOMEM), other system limits (-EAGAIN), or process interrupted (-EINTR). Use pr_once() to avoid repeating the same error every CREATE_COOLDOWN for each stuck worker pool. Ratelimited printk() might be better. It would help to know if the problem remains. It would be more clear if the create_worker() errors and workqueue stalls are related. Also old messages might get lost when the internal log buffer is full. The problem is that printk() might touch the watchdog. For example, see touch_nmi_watchdog() in serial8250_console_write(). It would require synchronization of the begin and length of the ratelimit interval with the workqueue watchdog. Otherwise, the error messages might break the watchdog. This does not look worth the complexity. Signed-off-by: Petr Mladek Signed-off-by: Tejun Heo commit 335a42ebb0ca8ee9997a1731aaaae6dcd704c113 Author: Petr Mladek Date: Tue Mar 7 13:53:31 2023 +0100 workqueue: Fix hung time report of worker pools The workqueue watchdog prints a warning when there is no progress in a worker pool. Where the progress means that the pool started processing a pending work item. Note that it is perfectly fine to process work items much longer. The progress should be guaranteed by waking up or creating idle workers. show_one_worker_pool() prints state of non-idle worker pool. It shows a delay since the last pool->watchdog_ts. The timestamp is updated when a first pending work is queued in __queue_work(). Also it is updated when a work is dequeued for processing in worker_thread() and rescuer_thread(). The delay is misleading when there is no pending work item. In this case it shows how long the last work item is being proceed. Show zero instead. There is no stall if there is no pending work. Fixes: 82607adcf9cdf40fb7b ("workqueue: implement lockup detector") Signed-off-by: Petr Mladek Signed-off-by: Tejun Heo commit f45e5cfa73f445fa3cfbb7ebac3a7e2c66a9281c Author: Uwe Kleine-König Date: Sat Mar 4 14:30:28 2023 +0100 rtc: zynqmp: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-42-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 257062d2679f4db5b6ebc9f4e6a77d0a45977278 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:27 2023 +0100 rtc: xgene: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-41-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 631aa2d919f542373892d5ef6baf13e2969a10fd Author: Uwe Kleine-König Date: Sat Mar 4 14:30:26 2023 +0100 rtc: wm8350: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20230304133028.2135435-40-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 5b1064441f20fc3f397239599b1193fecb7a90e4 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:25 2023 +0100 rtc: vt8500: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-39-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit fff118c9e8331b9b08b69841498fbea34693a28c Author: Uwe Kleine-König Date: Sat Mar 4 14:30:24 2023 +0100 rtc: twl: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-38-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit adebcc1c1916188c1c9ac8e8f54123b07431baf7 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:23 2023 +0100 rtc: tps6586x: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-37-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 31c94505f44b47493d62c0fd43d30838326d345f Author: Uwe Kleine-König Date: Sat Mar 4 14:30:22 2023 +0100 rtc: tegra: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-36-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit d6f525040eef1562327fccc4412acdb4f173e01b Author: Uwe Kleine-König Date: Sat Mar 4 14:30:21 2023 +0100 rtc: sunplus: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-35-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 16324165ab1f90fa06294679e3de58cb53c0423f Author: Uwe Kleine-König Date: Sat Mar 4 14:30:20 2023 +0100 rtc: stmp3xxx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-34-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 54c2cb2797cd76465dae08cd9b81676ffad36b27 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:19 2023 +0100 rtc: stm32: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-33-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 25ffc856b3cb1bd08a8645839aa38505469a6edd Author: Uwe Kleine-König Date: Sat Mar 4 14:30:18 2023 +0100 rtc: spear: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-32-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit cf407e9f1a9dc290e2088c11bd0e5542334e7ab4 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:17 2023 +0100 rtc: sa1100: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-31-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 9e6a2ad120fa3f785f013e70ae7d872abafb8318 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:16 2023 +0100 rtc: s3c: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-30-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit e55fbc80e9d2bf3ec0ec77551baa683f30e85b74 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:15 2023 +0100 rtc: rzn1: 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 (mostly) ignored 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. 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: Miquel Raynal Link: https://lore.kernel.org/r/20230304133028.2135435-29-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 0824a15b6863a19c7c8e1c16abf6090fd8ac615f Author: Uwe Kleine-König Date: Sat Mar 4 14:30:14 2023 +0100 rtc: rtd119x: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-28-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit ade527dd2192ddabbd4926338c31ca281098c34c Author: Uwe Kleine-König Date: Sat Mar 4 14:30:13 2023 +0100 rtc: rc5t583: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-27-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 3fc5029a8f7d0d3c039c3649e82cc2e4eeeb46a6 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:12 2023 +0100 rtc: pm8xxx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-26-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit c3d12a10922dcf32a97d3c71f6a574529b061caf Author: Uwe Kleine-König Date: Sat Mar 4 14:30:11 2023 +0100 rtc: pic32: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-25-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit d25f0ba97692b4a8ac63bbd2c562741525c5f5ca Author: Uwe Kleine-König Date: Sat Mar 4 14:30:10 2023 +0100 rtc: pcf50633: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-24-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit a7f9864e4362e07e113517d647c5bc355cdee970 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:09 2023 +0100 rtc: palmas: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-23-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 578afdb9084ed0446060d627e7f3ecd1c4100c3d Author: Uwe Kleine-König Date: Sat Mar 4 14:30:08 2023 +0100 rtc: omap: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-22-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 153f56f9ce99495ca4cb6d7f2047c29940aef9f5 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:07 2023 +0100 rtc: mxc_v2: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-21-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit ae0ac71651c726c2f1d5af752d38bf40526b7026 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:06 2023 +0100 rtc: mt7622: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-20-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit fa147083acf61de306e2881d91401d817de11093 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:05 2023 +0100 rtc: mpfs: 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 (mostly) ignored 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. 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: Conor Dooley Link: https://lore.kernel.org/r/20230304133028.2135435-19-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 22edbc10a514a8cf56d9c8da5cc1a2d43e6832a5 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:04 2023 +0100 rtc: mpc5121: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-18-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 99c3a1367db02b6b57be54bf61da051a93e0615f Author: Uwe Kleine-König Date: Sat Mar 4 14:30:03 2023 +0100 rtc: mc13xxx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-17-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit bf05de01160d493d53cc289be1b1092c26b378b4 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:02 2023 +0100 rtc: max77686: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230304133028.2135435-16-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 52fcb90d8cdf117ade871b01861b8a8defbf3b78 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:01 2023 +0100 rtc: lpc24xx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-15-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 30d5365c8dda63e31fb1fbbec446d72d0f1e5ce6 Author: Uwe Kleine-König Date: Sat Mar 4 14:30:00 2023 +0100 rtc: hid-sensor-time: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-14-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 43eeb707afb00579a7bb611d14fc9a056bba849e Author: Uwe Kleine-König Date: Sat Mar 4 14:29:59 2023 +0100 rtc: ftrtc010: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20230304133028.2135435-13-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit de11783c9d2a4dec9e0e2c01b9a9897d72019d5f Author: Uwe Kleine-König Date: Sat Mar 4 14:29:58 2023 +0100 rtc: ds1685: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-By: Joshua Kinard Link: https://lore.kernel.org/r/20230304133028.2135435-12-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 0d8742e61098b422b1ba1458a7ce80c4f1e299bb Author: Uwe Kleine-König Date: Sat Mar 4 14:29:57 2023 +0100 rtc: cros-ec: 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 (mostly) ignored 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. 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: Tzung-Bi Shih Link: https://lore.kernel.org/r/20230304133028.2135435-11-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 63c18a079bbb5f564b30e0fa7ec292eb123b1bf6 Author: Uwe Kleine-König Date: Sat Mar 4 14:29:56 2023 +0100 rtc: cmos: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-10-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 0b9efd82a63b31c7c2ce17a3d8ad3aeb28b3a928 Author: Uwe Kleine-König Date: Sat Mar 4 14:29:55 2023 +0100 rtc: cadence: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-9-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit d64906b320ce6fef446ea72c6043bbec19f0da60 Author: Uwe Kleine-König Date: Sat Mar 4 14:29:54 2023 +0100 rtc: brcmstb-waketimer: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-8-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 06e5e4a5a996aefb5d8e0c8db05b014e3bd91a28 Author: Uwe Kleine-König Date: Sat Mar 4 14:29:53 2023 +0100 rtc: at91sam9: 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 (mostly) ignored 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. 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: Claudiu Beznea Link: https://lore.kernel.org/r/20230304133028.2135435-7-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit ad01bf83bfc33c53079415f02e160bf72221d7e6 Author: Uwe Kleine-König Date: Sat Mar 4 14:29:52 2023 +0100 rtc: asm9260: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-6-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 28015e799ad9ff04d68107b7392a4884accedb0e Author: Uwe Kleine-König Date: Sat Mar 4 14:29:51 2023 +0100 rtc: ac100: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-5-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 8a700af1babfc0e5d34bd95264d65ea6adb0b288 Author: Uwe Kleine-König Date: Sat Mar 4 14:29:50 2023 +0100 rtc: ab8500: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20230304133028.2135435-4-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 8fbff75e2b7582fc03dbcd13e67831fb75345dcb Author: Uwe Kleine-König Date: Sat Mar 4 14:29:49 2023 +0100 rtc: 88pm860x: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-3-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit 8ef70a5ef3ed41ce4d700794d45fd9e084460a00 Author: Uwe Kleine-König Date: Sat Mar 4 14:29:48 2023 +0100 rtc: 88pm80x: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230304133028.2135435-2-u.kleine-koenig@pengutronix.de Signed-off-by: Alexandre Belloni commit a8ec5880bd82b834717770cba4596381ffd50545 Author: Ammar Faizi Date: Sun Feb 26 23:53:20 2023 +0700 workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu() Use pr_warn_once() to achieve the same thing. It's simpler. Signed-off-by: Ammar Faizi Reviewed-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 2c106e156a431b9190d319f68019ebf64322bfb6 Author: Ammar Faizi Date: Sun Feb 26 23:53:21 2023 +0700 MAINTAINERS: Add workqueue_internal.h to the WORKQUEUE entry This file doesn't have a maintainer. It should belong to the WORKQUEUE entry part. Add it to the WORKQUEUE entry. Signed-off-by: Ammar Faizi Reviewed-by: Lai Jiangshan Signed-off-by: Tejun Heo commit 0415d5a010d5273afc8b069eedb68cb1250e1b4b Author: Rob Herring Date: Mon Feb 20 15:33:33 2023 -0600 dt-bindings: crypto: fsl,sec-v4.0: Convert to DT schema Convert Freescale CAAM/SEC4 binding to DT schema format. The 'fsl,sec-v4.0' and 'fsl,sec-v4.0-mon' parts are independent, so split them into separate schema files. Add a bunch of missing compatibles for v5.0, v5.4, etc. Drop unused 'ranges', '#address-cells', and '#size-cells' from fsl,sec-v4.0-mon nodes. There's one DTB warning for LS1012a which has a 2nd 'reg' entry for 'fsl,sec-v4.0-rtic'. Leaving that as there is no clue as to what it is for. Reviewed-by: Gaurav Jain Reviewed-by: Peng Fan Link: https://lore.kernel.org/r/20230220213334.353779-1-robh@kernel.org Signed-off-by: Rob Herring commit eddc63094855f411455db85b77eb8439201dc779 Author: Stephen Boyd Date: Thu Mar 16 16:11:18 2023 -0700 clk: mediatek: Ensure fhctl code is available for COMMON_CLK_MT6795 Without this select we get linker errors when linking clk-mt6795-apmixedsys arm-linux-gnueabi-ld: drivers/clk/mediatek/clk-mt6795-apmixedsys.o: in function `clk_mt6795_apmixed_remove': clk-mt6795-apmixedsys.c:(.text+0x34): undefined reference to `mtk_clk_unregister_pllfhs' arm-linux-gnueabi-ld: drivers/clk/mediatek/clk-mt6795-apmixedsys.o: in function `clk_mt6795_apmixed_probe': clk-mt6795-apmixedsys.c:(.text+0x98): undefined reference to `fhctl_parse_dt' arm-linux-gnueabi-ld: clk-mt6795-apmixedsys.c:(.text+0xb8): undefined reference to `mtk_clk_register_pllfhs' arm-linux-gnueabi-ld: clk-mt6795-apmixedsys.c:(.text+0x1c4): undefined reference to `mtk_clk_unregister_pllfhs' Fixes: f222a1baec5f ("clk: mediatek: mt6795: Add support for frequency hopping through FHCTL") Cc: AngeloGioacchino Del Regno Cc: Chen-Yu Tsai Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20230316231118.2579242-1-sboyd@kernel.org commit 99be6588118bedc522fa989146f35efceff07c1e Author: Stephen Boyd Date: Wed Mar 15 16:39:25 2023 -0700 kunit: Use gfp in kunit_alloc_resource() kernel-doc Copy/pasting the code from the kernel-doc here doesn't compile because kunit_alloc_resource() takes a gfp flags argument. Pass the gfp argument from the caller to complete the example. Signed-off-by: Stephen Boyd Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 1da2e6220e1115930694c649605534baf6fa3dea Author: Daniel Latypov Date: Thu Mar 16 15:06:38 2023 -0700 kunit: tool: fix pre-existing `mypy --strict` errors and update run_checks.py Basically, get this command to be happy and make run_checks.py happy $ mypy --strict --exclude '_test.py$' --exclude qemu_configs/ ./tools/testing/kunit/ Primarily the changes are * add `-> None` return type annotations * add all the missing argument type annotations Previously, we had false positives from mypy in `main()`, see commit 09641f7c7d8f ("kunit: tool: surface and address more typing issues"). But after commit 2dc9d6ca52a4 ("kunit: kunit.py extract handlers") refactored things, the variable name reuse mypy hated is gone. Note: mypy complains we don't annotate the types the unused args in our signal handler. That's silly. But to make it happy, I've copy-pasted an appropriate annotation from https://github.com/python/typing/discussions/1042#discussioncomment-2013595. Reported-by: Johannes Berg Link: https://lore.kernel.org/linux-kselftest/9a172b50457f4074af41fe1dc8e55dcaf4795d7e.camel@sipsolutions.net/ Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 126901ba3499880c9ed033633817cf7493120fda Author: Daniel Latypov Date: Thu Mar 16 15:06:37 2023 -0700 kunit: tool: remove unused imports and variables We don't run a linter regularly over kunit.py code (the default settings on most don't like kernel style, e.g. tabs) so some of these imports didn't get removed when they stopped being used. Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 695e26030858b27648ca107b77095fed53377b4b Author: Daniel Latypov Date: Thu Mar 16 15:06:36 2023 -0700 kunit: tool: add subscripts for type annotations where appropriate E.g. for subprocess.Popen, it can be opened in `text=True` mode where it returns strings, or `text=False` where it returns bytes. To differentiate, you can annotate types as `Popen[str]` or `Popen[bytes]`. This patch should add subscripts in all the places we were missing them. Reported-by: Johannes Berg Link: https://lore.kernel.org/linux-kselftest/20230315105055.9b2be0153625.I7a2cb99b95dff216c0feed4604255275e0b156a7@changeid/ Signed-off-by: Daniel Latypov Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 2a96243e22f880ad53a977e09680aee276dc50b5 Author: Zhang Rui Date: Wed Mar 8 11:07:11 2023 +0800 thermal: intel: x86_pkg_temp_thermal: Add lower bound check for sysfs input When setting a trip point temperature from sysfs, there is an upper bound check on the user input, but no lower bound check. As hardware register has 7 bits for a trip point temperature, the offset to tj_max of the input temperature must be equal to/less than 0x7f. Or else, 1. bogus temperature is updated into the trip temperature bits. 2. the upper bits of the register can be polluted. For example, $ rdmsr 0x1b2 2000003 $ echo -180000 > /sys/class/thermal/thermal_zone1/trip_point_1_temp $ rdmsr 0x1b2 3980003 Not only the trip point temp is set to 76C on this platform (tj_max is 100), the Power Notification (Bit 24) is also enabled erronously. Fix the problem by adding lower bound check for sysfs input. Reported-by: Dan Carpenter Link: https://lore.kernel.org/all/add7a378-4d50-4ba1-81d3-a0c17db25a0b@kili.mountain/ Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 5e008ba67cb80084e99b40ccd46f9029ae421632 Author: Vinay Belgaumkar Date: Tue Mar 14 19:29:06 2023 -0700 drm/i915: Fix format for perf_limit_reasons Use hex format so that it is easier to decode. Fixes: fe5979665f64 ("drm/i915/debugfs: Add perf_limit_reasons in debugfs") Signed-off-by: Vinay Belgaumkar Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20230315022906.2467408-1-vinay.belgaumkar@intel.com commit 7a9dec665f6875f61fe0c2e71b25842daade5110 Author: Wyes Karny Date: Tue Mar 7 11:27:40 2023 +0000 Documentation: cpufreq: amd-pstate: Update amd_pstate status sysfs for guided Update amd_pstate status sysfs for guided mode. Acked-by: Huang Rui Reviewed-by: Bagas Sanjaya Reviewed-by: Mario Limonciello Tested-by: Oleksandr Natalenko Signed-off-by: Wyes Karny Signed-off-by: Rafael J. Wysocki commit 3ca7bc818d8ccf399cb0366d8d9a915c04a446f9 Author: Wyes Karny Date: Tue Mar 7 11:27:39 2023 +0000 cpufreq: amd-pstate: Add guided mode control support via sysfs amd_pstate driver's `status` sysfs entry helps to control the driver's mode dynamically by user. After the addition of guided mode the combinations of mode transitions have been increased (16 combinations). Therefore optimise the amd_pstate_update_status function by implementing a state transition table. There are 4 states amd_pstate supports, namely: 'disable', 'passive', 'active', and 'guided'. The transition from any state to any other state is possible after this change. Sysfs interface: To disable amd_pstate driver: # echo disable > /sys/devices/system/cpu/amd_pstate/status To enable passive mode: # echo passive > /sys/devices/system/cpu/amd_pstate/status To change mode to active: # echo active > /sys/devices/system/cpu/amd_pstate/status To change mode to guided: # echo guided > /sys/devices/system/cpu/amd_pstate/status Acked-by: Huang Rui Reviewed-by: Mario Limonciello Tested-by: Oleksandr Natalenko Signed-off-by: Wyes Karny Signed-off-by: Rafael J. Wysocki commit 2dd6d0ebf74049256160a3d03dabbd92fe0b8599 Author: Wyes Karny Date: Tue Mar 7 11:27:38 2023 +0000 cpufreq: amd-pstate: Add guided autonomous mode From ACPI spec below 3 modes for CPPC can be defined: 1. Non autonomous: OS scaling governor specifies operating frequency/ performance level through `Desired Performance` register and platform follows that. 2. Guided autonomous: OS scaling governor specifies min and max frequencies/ performance levels through `Minimum Performance` and `Maximum Performance` register, and platform can autonomously select an operating frequency in this range. 3. Fully autonomous: OS only hints (via EPP) to platform for the required energy performance preference for the workload and platform autonomously scales the frequency. Currently (1) is supported by amd_pstate as passive mode, and (3) is implemented by EPP support. This change is to support (2). In guided autonomous mode the min_perf is based on the input from the scaling governor. For example, in case of schedutil this value depends on the current utilization. And max_perf is set to max capacity. To activate guided auto mode ``amd_pstate=guided`` command line parameter has to be passed in the kernel. Acked-by: Huang Rui Reviewed-by: Mario Limonciello Tested-by: Oleksandr Natalenko Signed-off-by: Wyes Karny Signed-off-by: Rafael J. Wysocki commit 3e6e078057640751654bda9fd2278a944f61fa4a Author: Wyes Karny Date: Tue Mar 7 11:27:37 2023 +0000 Documentation: cpufreq: amd-pstate: Move amd_pstate param to alphabetical order Move amd_pstate command line param description to correct alphabetical order. Acked-by: Huang Rui Reviewed-by: Mario Limonciello Tested-by: Oleksandr Natalenko Signed-off-by: Wyes Karny Signed-off-by: Rafael J. Wysocki commit c984f5d5d45bd5f80d6a9d8541e809300c963aca Author: Wyes Karny Date: Tue Mar 7 11:27:36 2023 +0000 ACPI: CPPC: Add auto select register read/write support For some AMD shared memory based systems, the autonomous selection bit needed to be set explicitly. Add autonomous selection register related APIs to acpi driver, which amd_pstate driver uses later. Acked-by: Huang Rui Reviewed-by: Mario Limonciello Tested-by: Oleksandr Natalenko Signed-off-by: Wyes Karny [ rjw: Fixed up kerneldoc comments, white space adjustment, subject edits ] Signed-off-by: Rafael J. Wysocki commit 76531df5e13b5b997a17940d6980a168c616e962 Author: Wyes Karny Date: Tue Mar 7 11:27:35 2023 +0000 ACPI: CPPC: Add min and max perf register writing support Currently writing of min and max perf register is deferred in cppc_set_perf function. In CPPC guided mode, these registers needed to be written to guide the platform about min and max perf levels. Add this support to make guided mode work properly on AMD shared memory systems. Acked-by: Huang Rui Reviewed-by: Mario Limonciello Tested-by: Oleksandr Natalenko Signed-off-by: Wyes Karny [ rjw: Fixed up a multiline comment, subject edits ] Signed-off-by: Rafael J. Wysocki commit fe8f1a2e9b7c4519a145ab8110dec59fea3c532c Author: Janne Grunau Date: Tue Mar 7 13:10:19 2023 +0100 dt-bindings: dma: apple,admac: Add t8112-admac compatible The block found on Apple's M2 SoC is compatible with the existing driver so add its per-SoC compatible. Acked-by: Vinod Koul Acked-by: Martin Povišer Acked-by: Krzysztof Kozlowski Signed-off-by: Janne Grunau Link: https://lore.kernel.org/r/20230202-asahi-t8112-dt-v3-13-d1a5f6383d95@jannau.net Signed-off-by: Vinod Koul commit 3c5cc03979b72620c31159560984f5b2c0dcba22 Author: Bjorn Helgaas Date: Tue Mar 7 13:26:55 2023 -0600 dmaengine: idxd: Remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Fenghua Yu Cc: Dave Jiang Acked-by: Fenghua Yu Acked-by: Dave Jiang Link: https://lore.kernel.org/r/20230307192655.874008-3-helgaas@kernel.org Signed-off-by: Vinod Koul commit e32622f84ae289dc7a04e9f01cd62cb914fdc5c6 Author: Bjorn Helgaas Date: Tue Mar 7 13:26:54 2023 -0600 dmaengine: ioat: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Acked-by: Dave Jiang Link: https://lore.kernel.org/r/20230307192655.874008-2-helgaas@kernel.org Signed-off-by: Vinod Koul commit 8f6707d0773be31972768abd6e0bf7b8515b5b1a Author: Bjorn Helgaas Date: Tue Mar 7 15:46:15 2023 -0600 dmaengine: ioat: use PCI core macros for PCIe Capability The PCIe Capability is defined by the PCIe spec, so use the PCI_EXP_DEVCTL macros defined by the PCI core instead of defining copies in IOAT. This makes it easier to find all uses of the PCIe Device Control register. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Dave Jiang Link: https://lore.kernel.org/r/20230307214615.887354-1-helgaas@kernel.org Signed-off-by: Vinod Koul commit 864f0513a377184e12aa650089c9af71ba36c6e9 Merge: 1e4929112507f 4d70dd0a25081 Author: Mark Brown Date: Fri Mar 17 17:43:18 2023 +0000 spi: atmel-quadspi: Convert to platform remove Merge series from Uwe Kleine-König : This series converts the atmel-quadspi driver to use the .remove_new() callback that doesn't return an int but void. The motivation is to not give driver authors a reason to (wrongly) believe that returning an error code was sensible error handling. In fact the spi core only emits a warning message in this case and otherwise continues as if the return value was zero. This usually yields resource leaks that sometimes can lead to exceptions later on. The atmel-quadspi driver is one of these drivers that got error handling wrong, this is fixed here and in the last patch the driver is converted to .remove_new() with the eventual goal to change .remove() to return void once all drivers are converted this way. commit e32acf7b00ba0893532d44f3dba34bb1efeafeb3 Merge: 6a36690a64d61 811a742f2d4d1 Author: Mark Brown Date: Fri Mar 17 17:43:11 2023 +0000 ASoC: SOF: ipc4-topology: Add support for effect Merge series from Peter Ujfalusi : The following series will add support for IPC4 process modules as effect widgets. We can cover wide range of modules as a generic process or effect module, the patches will lay down the fundation and the generic code to handle them. At initialization time process modules can receive additional information on top of the base_cfg, which is defined as base_cfg_ext, an extension for the base configuration struct. Other parameters or blobs for these modules are sent as a separate message via LARGE_CONFIG message, which is handled by the existing bytes control support. commit 3765af04f4fda327463e5b631a4a2d62ae7bb93f Author: Rob Herring Date: Fri Mar 10 08:47:03 2023 -0600 dmaengine: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144704.1541976-1-robh@kernel.org Signed-off-by: Vinod Koul commit 9f7d4718211a82b2a87ae74d841d6e3938cd5c28 Author: Christophe JAILLET Date: Mon Mar 13 22:52:31 2023 +0100 dmaengine: imx-dma: Remove a redundant memset() call The desc->desc structure is already zeroed when 'desc' is kzalloc()'ed. There is no need to clear it twice. Remove the redundant memset(). Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/95a81d623bffde2e5d14e22fad7e8c9a9a7203f6.1678743528.git.christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul commit 1f5e62f5fb217f2c1e003236be7d03cf606c26c4 Author: Srinivas Pandruvada Date: Thu Mar 2 20:14:11 2023 -0800 cpufreq: intel_pstate: Enable HWP IO boost for all servers The HWP IO boost results in slight improvements for IO performance on both Ice Lake and Sapphire Rapid servers. Currently there is a CPU model check for Skylake desktop and server along with the ACPI PM profile for performance and enterprise servers to enable IO boost. Remove the CPU model check, so that all current server models enable HWP IO boost by default. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 5aaf9079d740ebe57f10dfefb1850011d6bb7b2a Author: Biju Das Date: Wed Mar 15 06:47:25 2023 +0000 dt-bindings: dma: rz-dmac: Document clock-names and reset-names Document clock-names and reset-names properties as we have multiple clocks and resets. Signed-off-by: Biju Das Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230315064726.22739-1-biju.das.jz@bp.renesas.com Signed-off-by: Vinod Koul commit d1e71a3a7ab9db0168b6885171e0576383216ac8 Author: Biju Das Date: Wed Mar 15 06:45:01 2023 +0000 dmaengine: sh: rz-dmac: Add reset support Add reset support for DMAC module found on RZ/G2L alike SoCs. For booting the board, reset release of the DMAC module is required otherwise we don't get GIC interrupts. Currently the reset release was done by the bootloader now move this to the driver instead. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20230315064501.21491-1-biju.das.jz@bp.renesas.com Signed-off-by: Vinod Koul commit 4a69516f97bc35134f41de959000ea6cb93a1d50 Author: Konrad Dybcio Date: Tue Mar 14 13:52:57 2023 +0100 dt-bindings: dmaengine: qcom: gpi: Add QCM2290 GPI DMA Add a compatible for the single GPI DMA controller on QCM2290. It uses the same 0x10000 offset as SM6350. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Reviewed-by: Bhupesh Sharma Link: https://lore.kernel.org/r/20230314-topic-2290_compats-v1-2-47e26c3c0365@linaro.org Signed-off-by: Vinod Koul commit 6a36690a64d61314ea7fe07b441aab903626a4dc Merge: 47df94faa5e37 37ec7ab49f951 Author: Mark Brown Date: Fri Mar 17 16:39:12 2023 +0000 ASoC: SOF: ipc4: upport multiple configs for BE DAIs Merge series from Peter Ujfalusi : Backend DAIs may support multiple audio formats. Modify pipeline setup to select a suitable configuration based on topology and frontend DAI runtime configuration. The prime use case is BT offload support where we need the abality to select different configuration on the BE side. commit be567c6cbc08e8fb6de9f03d6ab5088e33f58012 Author: Xiaowei Bao Date: Thu Feb 9 10:10:50 2023 -0500 PCI: layerscape: Add EP mode support for ls1028a Add PCIe EP mode support for ls1028a. Link: https://lore.kernel.org/r/20230209151050.233973-1-Frank.Li@nxp.com Signed-off-by: Xiaowei Bao Signed-off-by: Hou Zhiqiang Signed-off-by: Frank Li Signed-off-by: Lorenzo Pieralisi Reviewed-by: Alok Tiwari Acked-by: Roy Zang commit 705c870179ae57815d15a9e783442f22030d3a7d Author: Javier Martinez Canillas Date: Thu Mar 16 23:34:04 2023 +0100 drm/format-helper: Use drm_format_info_min_pitch() in tests helper There's a nice macro to calculate the destination pitch that already takes into account sub-byte pixel formats. Use that instead of open coding it. Suggested-by: Geert Uytterhoeven Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230316223404.102806-1-javierm@redhat.com commit 4d70dd0a25081bc4e6378d0da4a7c367389df707 Author: Uwe Kleine-König Date: Fri Mar 17 09:42:32 2023 +0100 spi: atmel-quadspi: 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 (mostly) ignored 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. 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: Tudor Ambarus Link: https://lore.kernel.org/r/20230317084232.142257-4-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 9448bc1dee65f86c0fe64d9dea8b410af0586886 Author: Uwe Kleine-König Date: Fri Mar 17 09:42:31 2023 +0100 spi: atmel-quadspi: Free resources even if runtime resume failed in .remove() An early error exit in atmel_qspi_remove() doesn't prevent the device unbind. So this results in an spi controller with an unbound parent and unmapped register space (because devm_ioremap_resource() is undone). So using the remaining spi controller probably results in an oops. Instead unregister the controller unconditionally and only skip hardware access and clk disable. Also add a warning about resume failing and return zero unconditionally. The latter has the only effect to suppress a less helpful error message by the spi core. Fixes: 4a2f83b7f780 ("spi: atmel-quadspi: add runtime pm support") Signed-off-by: Uwe Kleine-König Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20230317084232.142257-3-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit c18bbac353ffed50be134b0a2a059a2bd540c503 Author: Uwe Kleine-König Date: Fri Mar 17 09:42:30 2023 +0100 spi: atmel-quadspi: Don't leak clk enable count in pm resume The pm resume call is supposed to enable two clocks. If the second enable fails the callback reports failure but doesn't undo the first enable. So call clk_disable() for the first clock when clk_enable() for the second one fails. Fixes: 4a2f83b7f780 ("spi: atmel-quadspi: add runtime pm support") Signed-off-by: Uwe Kleine-König Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20230317084232.142257-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 91f4228960adb6583a33af310912163469f49da7 Author: Fei Yang Date: Wed Mar 15 11:08:00 2023 -0700 drm/i915/selftests: keep same cache settings as timeline On MTL, objects allocated through i915_gem_object_create_internal() are mapped as uncached in GPU by default because HAS_LLC is false. However in the live_hwsp_read selftest these watcher objects are mapped as WB on CPU side. The conseqence is that the updates done by the GPU are not immediately visible to CPU, thus the selftest is randomly failing due to the stale data in CPU cache. Solution can be either setting WC for CPU + UC for GPU, or WB for CPU + 1-way coherent WB for GPU. To keep the consistency, let's simply inherit the same cache settings from the timeline, which is WB for CPU + 1-way coherent WB for GPU, because this test is supposed to emulate the behavior of the timeline anyway. Signed-off-by: Fei Yang Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230315180800.2632766-1-fei.yang@intel.com commit 7bf891434919ae1492bb583dba349e895c818255 Author: Mark Brown Date: Mon Mar 6 15:34:21 2023 +0000 arm64: virtconfig: Further shrink the config After disabling platform support there's still some more pruning we can do to the virtconfig size, there are a number of drivers and subsystems which are not likely to be useful on mach-virt and so can be disabled in order to further improve build times. Let's do so, noting that having PCI device assignment means that PCI devices might potentially appear. This is just an initial manual passthrough, there will be further savings available especially if we take a much more focused approach. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230221-arm64-virtconfig-slim-v1-1-604b64be7ec3@kernel.org Signed-off-by: Arnd Bergmann commit 74a5b94b62217627a00b52f80c640a4a30d53115 Author: Uwe Kleine-König Date: Tue Mar 14 11:32:25 2023 +0100 ARM: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Arnd Bergmann Acked-by: Shawn Guo # for imx/mmdc Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230314103225.2787101-1-u.kleine-koenig@pengutronix.de Signed-off-by: Arnd Bergmann commit 06bc8c80cba8347c3f459d276cfbd75ea0bbb6d1 Author: Yang Li Date: Tue Mar 14 16:02:30 2023 +0800 drm/arm/hdlcd: Use devm_platform_ioremap_resource() According to commit 7945f929f1a7 ("drivers: provide devm_platform_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to Use devm_platform_ioremap_resource(), as this is exactly what this function does. Since 'struct platform_device *pdev = to_platform_device(drm->dev)', 'drm->dev' is equivalent to 'pdev->deva'. Signed-off-by: Yang Li Acked-by: Liviu Dudau Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20230314080231.20212-1-yang.lee@linux.alibaba.com commit 345e4b32e6eaed023742a46badc7e47ad5fb8c4f Author: Yang Li Date: Tue Mar 14 16:02:31 2023 +0800 drm/arm/malidp: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Since 'struct platform_device *pdev = to_platform_device(dev)', 'pdev->dev' is equivalent to 'dev'. Signed-off-by: Yang Li Acked-by: Liviu Dudau Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20230314080231.20212-2-yang.lee@linux.alibaba.com commit 2b4881839a392bf66312685cf1c65cd3487e6ec8 Author: Chunyan Zhang Date: Mon Mar 6 16:57:17 2023 +0800 arm64: dts: sprd: Add support for Unisoc's UMS512 Add basic support for Unisoc's UMS512, with this patch, the board ums512-1h10 can run into console. Signed-off-by: Chunyan Zhang Link: https://lore.kernel.org/r/20230306085717.420353-1-chunyan.zhang@unisoc.com Signed-off-by: Arnd Bergmann commit 129469c4881d097e832a48b7b8c62750a8b323e2 Author: Krzysztof Kozlowski Date: Sat Mar 11 00:14:20 2023 +0100 ARM: dts: ixp4xx: use "okay" for status "okay" over "ok" is preferred for status property. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230127101832.93789-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20230310231420.583121-1-linus.walleij@linaro.org Signed-off-by: Arnd Bergmann commit fea087fc291b102521427c26da3d0a30c329606f Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:03 2023 +0100 irqchip/mbigen: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Thomas Gleixner Cc: Marc Zyngier Link: https://lore.kernel.org/r/20230313182918.1312597-21-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 3666062b87ec8be4b85dc475dfb54bb17e10a7f6 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:02 2023 +0100 cpufreq: amd-pstate: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. In doing so, remove the unneded kobject structure that was only being created to cause a subdirectory for the attributes. The name of the attribute group is the correct way to do this, saving code and complexity as well as allowing the attributes to properly show up to userspace tools (the raw kobject would not allow that.) Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: linux-pm@vger.kernel.org Acked-by: Huang Rui Link: https://lore.kernel.org/r/20230313182918.1312597-20-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 31e7c4cc7da9d1b5ac01de9829aba53081b1b794 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:01 2023 +0100 s390/smp: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Sven Schnelle Cc: Ilya Leoshkevich Cc: linux-s390@vger.kernel.org Acked-by: Heiko Carstens Link: https://lore.kernel.org/r/20230313182918.1312597-19-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 9493ed19fbc302d8e3ba487b7c99a7beeddbff96 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:29:00 2023 +0100 s390/topology: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Sven Schnelle Cc: linux-s390@vger.kernel.org Acked-by: Heiko Carstens Link: https://lore.kernel.org/r/20230313182918.1312597-18-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 93c42c0b0303b47fbb71cb2a633bcd45eca8b644 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:28:59 2023 +0100 sh: intc: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Acked-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20230313182918.1312597-17-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit f6d1975cd2668d239bb97ef4833ad1ddc5ffed6d Author: Greg Kroah-Hartman Date: Mon Mar 13 19:28:58 2023 +0100 sh: dma-sysfs: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Acked-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20230313182918.1312597-16-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit c93bd175414ac43d7ea6cb2a17f49eb91af03f00 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:28:57 2023 +0100 powerpc/fsl: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230313182918.1312597-15-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 2a9efef85205ccd4013e947901e00c2697aa42ed Author: Greg Kroah-Hartman Date: Mon Mar 13 19:28:56 2023 +0100 powerpc/pseries: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Greg Kroah-Hartman Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Michael Ellerman (powerpc) Link: https://lore.kernel.org/r/20230313182918.1312597-14-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 3bf88c4222d9656bdaea793a423379ab7c485324 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:28:55 2023 +0100 powerpc/powernv: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Wolfram Sang Cc: Joel Stanley Cc: Liang He Cc: Greg Kroah-Hartman Cc: Julia Lawall Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230313182918.1312597-13-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 1b40189691304488cd59b5f1d2ed17de89b59f93 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:28:54 2023 +0100 powerpc/sysfs: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: David Hildenbrand Cc: Andrew Morton Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230313182918.1312597-12-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit cb6b0cba1ea9d3f71bafef4eff4e7a9547085752 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:28:53 2023 +0100 arm64: cpufeature: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Brown Cc: James Morse Cc: Kristina Martsenko Cc: Marc Zyngier Cc: Ard Biesheuvel Cc: Vladimir Murzin Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230313182918.1312597-11-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 60260272dc59ca0da233de5ff452859f2e981bdb Author: Greg Kroah-Hartman Date: Mon Mar 13 19:28:52 2023 +0100 x86/umwait: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: x86@kernel.org Cc: "H. Peter Anvin" Link: https://lore.kernel.org/r/20230313182918.1312597-10-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 216f58beb26e683e6d437c43e6aaf8e7b8631447 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:28:51 2023 +0100 x86/microcode: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Dave Hansen Cc: x86@kernel.org Cc: "H. Peter Anvin" Link: https://lore.kernel.org/r/20230313182918.1312597-9-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 686f669780276da534e93ba769e02bdcf1f89f8d Author: Greg Kroah-Hartman Date: Mon Mar 13 19:28:50 2023 +0100 workqueue: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Lai Jiangshan Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20230313182918.1312597-8-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit db281d59e26b9aaccfd2334450099a1bc472bac6 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:28:49 2023 +0100 cpu/hotplug: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Thomas Gleixner Cc: Valentin Schneider Cc: Phil Auld Cc: Steven Price Cc: Juri Lelli Cc: Greg Kroah-Hartman Cc: Vincent Donnefort Cc: Kuppuswamy Sathyanarayanan Cc: "Jason A. Donenfeld" Link: https://lore.kernel.org/r/20230313182918.1312597-7-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit c8e15075b2cb58d0ff08cc8772ce259d1be6b0cd Author: Greg Kroah-Hartman Date: Mon Mar 13 19:28:47 2023 +0100 platform/x86: intel-uncore-freq: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Mark Gross Cc: platform-driver-x86@vger.kernel.org Acked-by: Hans de Goede Acked-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20230313182918.1312597-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 6644a426eb0d19220298e25ff26cde6302c60482 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:28:46 2023 +0100 platform/x86: ibm_rtl: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Mark Gross Cc: platform-driver-x86@vger.kernel.org Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230313182918.1312597-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 2744a63c1aec32eeea16330868b795ac41bcb217 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:28:45 2023 +0100 cpufreq: move to use bus_get_dev_root() Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Viresh Kumar Cc: Srinivas Pandruvada Cc: Len Brown Cc: linux-pm@vger.kernel.org Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230313182918.1312597-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 34320745dfc9b71234139720bc8b602cdc8c086a Author: Phil Auld Date: Fri Mar 3 13:37:54 2023 -0500 sched/debug: Put sched/domains files under the verbose flag The debug files under sched/domains can take a long time to regenerate, especially when updates are done one at a time. Move these files under the sched verbose debug flag. Allow changes to verbose to trigger generation of the files. This lets a user batch the updates but still have the information available. The detailed topology printk messages are also under verbose. Discussion that lead to this approach can be found in the link below. Simplified code to maintain use of debugfs bool routines suggested by Michael Ellerman . Signed-off-by: Phil Auld Acked-by: Greg Kroah-Hartman Reviewed-by: Valentin Schneider Reviewed-by: Srikar Dronamraju Tested-by: Vishal Chourasia Cc: Michael Ellerman Cc: Greg Kroah-Hartman Cc: Ingo Molnar Cc: Peter Zijlstra (Intel) Cc: Srikar Dronamraju Cc: Valentin Schneider Cc: Vishal Chourasia Cc: Vincent Guittot Link: https://lore.kernel.org/all/Y01UWQL2y2r69sBX@li-05afa54c-330e-11b2-a85c-e3f3aa0db1e9.ibm.com/ Link: https://lore.kernel.org/r/20230303183754.3076321-1-pauld@redhat.com Signed-off-by: Greg Kroah-Hartman commit 6ca8f8bf706d874090b74f811194e94ebbc560df Author: Rob Herring Date: Fri Mar 10 08:47:13 2023 -0600 misc: lis3lv02d: Fix reading 'st,default-rate' property The property 'st,default-rate' is tested for presence, but the value is ignored and the 'default_rate' value is updated with a stale 'val' value. Fix this by using of_property_read_u32(). Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144713.1543613-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 536e2fce8980c84247ee52e737d24bd1ffdb0d7f Author: Rob Herring Date: Fri Mar 10 08:47:13 2023 -0600 misc: lis3lv02d: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230310144713.1543683-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit d7d744abc08f008f105dc7fc59805de6beeb8ec8 Author: Rob Herring Date: Fri Mar 10 08:47:12 2023 -0600 misc/sram: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230310144713.1543544-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2bd5c63978b771462da10d8771f56a1e656501d9 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:18:43 2023 +0100 driver core: device: make device_create*() take a const struct class * The functions device_create() and device_create_with_groups() do not modify the struct class passed into it, so enforce this by changing the function parameters to be struct const class. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313181843.1207845-12-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 9fa120fbd507e58af3494b8765427fdc8181e1eb Author: Greg Kroah-Hartman Date: Mon Mar 13 19:18:42 2023 +0100 driver core: device: mark struct class in struct device as constant The pointer to a struct class in a struct device should never be used to change anything in that class. So mark it as constant to enforce this requirement. This requires a few minor changes to some internal driver core functions to enforce the const * being used here now. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313181843.1207845-11-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a010eb8812435015118662b23be799670f641a83 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:18:41 2023 +0100 tpm: fix up the tpm_class shutdown_pre pointer when created Do not wait until long after the struct class has been created to set the shutdown_pre pointer for the tpm_class, assign it right away. This is the only in-kernel offender that tries to modify the device->class pointer contents after it has been assigned to a device, so fix that up by doing the function pointer assignment before it is matched with the device. Because of this, the patch should go through the driver core tree to allow later changes to struct device to be possible. Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Cc: linux-integrity@vger.kernel.org Reviewed-by: Jarkko Sakkinen Link: https://lore.kernel.org/r/20230313181843.1207845-10-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit d2fff09656369d5465585ad2c72d8ba8ada758b5 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:18:40 2023 +0100 driver core: device: make device_destroy() take a const class * device_destroy() does not modify the struct class passed into it, so mark it as const to enforce this rule. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313181843.1207845-9-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 80842a92907bd68454591f9c7a73778f130ac38f Author: Greg Kroah-Hartman Date: Mon Mar 13 19:18:39 2023 +0100 driver core: class: make class_create/remove_file*() options const The class_create_file*() and class_remove_file*() functions do not modify the struct class at all, so mark them as const * to enforce that. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313181843.1207845-8-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit cf41015ea8d3f2ae451d9b7e39ef42569caeb875 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:18:38 2023 +0100 driver core: class: make class_find_device*() options const The class_find_device*() functions do not modify the struct class or the struct device passed into it, so mark them as const * to enforce that. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313181843.1207845-7-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 69df024ebbf8b1d4d8f0808b5700688fed9e45e9 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:18:37 2023 +0100 driver core: class: make class_for_each_device() options const class_for_each_device() does not modify the struct class or the struct device passed into it, so mark them as const * to enforce that. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313181843.1207845-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a2fd6e42e4fb661e183977072022b7dd8dd65d90 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:18:36 2023 +0100 driver core: class: make class_dev_iter_init() options const class_dev_iter_init() does not modify the struct class or the struct device passed into it, so mark them as const * to enforce that. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313181843.1207845-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 1aaba11da9aa7d7d6b52a74d45b31cac118295a1 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:18:35 2023 +0100 driver core: class: remove module * from class_create() The module pointer in class_create() never actually did anything, and it shouldn't have been requred to be set as a parameter even if it did something. So just remove it and fix up all callers of the function in the kernel tree at the same time. Cc: "Rafael J. Wysocki" Acked-by: Benjamin Tissoires Link: https://lore.kernel.org/r/20230313181843.1207845-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 6e30a66433afee90e902ced95d7136e8f7edcc7e Author: Greg Kroah-Hartman Date: Mon Mar 13 19:18:34 2023 +0100 driver core: class: remove struct module owner out of struct class The module owner field for a struct class was never actually used, so remove it as it is not doing anything at all. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313181843.1207845-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 10a03c36b7dd7759788ebc613091d313b60f93e0 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:18:33 2023 +0100 drivers: remove struct module * setting from struct class There is no need to manually set the owner of a struct class, as the registering function does it automatically, so remove all of the explicit settings from various drivers that did so as it is unneeded. This allows us to remove this pointer entirely from this structure going forward. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313181843.1207845-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 4a46ac9d64030d9f6f18baaf115a3558880c1ae2 Author: Greg Kroah-Hartman Date: Mon Mar 13 19:18:32 2023 +0100 driver core: class: specify the module owner in __class_register() There's no need to manually have to set the module owner of a class, the compiler should do it automatically for you, so add a module * to the __class_register() function and allow it to set the module owner automatically. This will let us move the module pointer out of struct class eventually, as it should not be embedded in there if we wish for it to be a read-only structure eventually. And, funny story, this module pointer isn't even being used for anything, so while we will keep it around for now, it's not like it even matters. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20230313181843.1207845-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 64414da25baf3acf31350f75fdd10514bd8390b1 Author: Thomas Weißschuh Date: Sat Mar 11 03:14:47 2023 +0000 kobject: align stacktrace levels to logging message Without an explicit level the stacktraces are printed at a default level. If this level does not match the one from the logging level it may happen that the stacktrace is shown without the message or vice versa. Both these cases are confusing, so make sure the user always sees both, the message and the stacktrace. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230311-kobject-warning-v1-2-1ebba4f71fb5@weissschuh.net Signed-off-by: Greg Kroah-Hartman commit 984063339e9ec9b6d9b011169d1f330a505a7571 Author: Thomas Weißschuh Date: Sat Mar 11 03:14:46 2023 +0000 kobject: define common logging prefix All log messages start with the prefix "kobject: ". Deduplicate this by using the pr_fmt() facility. This makes the very long log strings shorter. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230311-kobject-warning-v1-1-1ebba4f71fb5@weissschuh.net Signed-off-by: Greg Kroah-Hartman commit 410e7088e971ad656170fe9768b072b267a95310 Author: Andy Shevchenko Date: Mon Mar 13 13:31:00 2023 +0200 devres: Pass unique name of the resource to devm_add_action_or_reset() All the same as it's done in the commit e32c80bbd2f9 ("devres: Pass unique name of the resource to devm_add_action()") applies to the devm_add_action_or_reset(), which this change makes real. This helps with debug resource management. Reported-and-tested-by: Mirsad Goran Todorovac Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230313113100.59643-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 15ac1122fd6d4bf408a03e6f23c7ad4f60b22f9e Author: Doug Berger Date: Thu Mar 9 11:02:24 2023 -0800 serial: 8250_bcm7271: Fix arbitration handling The arbitration of the UART DMA is mishandled for a few exceptional cases when probing and releasing the driver. It is possible that the DMA register spaces are not defined in device tree for an instance of the driver, so attempts to access the registers in brcmuart_arbitration() would use NULL pointers. It is also possible for the probe function to return an error while still holding the UART DMA. This would prevent the UART DMA from being claimed by an instance that could use it. These errors are addressed by only releasing the UART DMA if it is held by this instance (i.e. priv->dma_enabled == 1) and directing early error paths in probe to this common release_dma handling. Fixes: 41a469482de2 ("serial: 8250: Add new 8250-core based Broadcom STB driver") Signed-off-by: Doug Berger Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20230309190224.687380-1-opendmb@gmail.com Signed-off-by: Greg Kroah-Hartman commit 035173c91c6b53144295a5b546c6bad3f40fb8a9 Author: Ilpo Järvinen Date: Thu Mar 9 10:20:35 2023 +0200 tty: Convert hw_stopped in tty_struct to bool hw_stopped in tty_struct is used like bool, convert the variable type to bool. Signed-off-by: Ilpo Järvinen Acked-by: Ulf Hansson # For MMC Link: https://lore.kernel.org/r/20230309082035.14880-9-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 37e8b08ada22f5cd4a8e94f6e783d00cd6e6d7e6 Author: Ilpo Järvinen Date: Thu Mar 9 10:20:34 2023 +0200 n_tty: Reindent if condition Align if condition to make it easier to read. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230309082035.14880-8-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8ed012d1be12c183e173c9e0933b34a7073a9c8a Author: Ilpo Järvinen Date: Thu Mar 9 10:20:33 2023 +0200 n_tty: Cleanup includes n_tty uses: - bitmap_zero() from linux/bitmap.h - EXPORT_SYMBOL_GPL() from linux/export.h - jiffies, time_after() from linux/jiffies.h Add includes. n_tty uses nothing from: - linux/audit.h - linux/interrupt.h - linux/major.h - linux/mm.h - linux/module.h - linux/timer.h Remove those includes. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230309082035.14880-7-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7e26c84d02d17e7412e6f2471916fd415654a1ba Author: Ilpo Järvinen Date: Thu Mar 9 10:20:32 2023 +0200 n_tty: Use DIV_ROUND_UP() in room calculation When PARMRK is set, a character can result in up to 3 chars in the read buffer. Receive code calculates for how many characters there (at least) is room. Convert an opencoded rounding in the calculation to use DIV_ROUND_UP(). Note: the room variable is decremented afterwards by one which ensures the characters will fit into the buffer for real so the code is okay despite rounding upwards. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230309082035.14880-6-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 9db1be84054b7445f911b9efe9bc3c924ffdb543 Author: Ilpo Järvinen Date: Thu Mar 9 10:20:31 2023 +0200 n_tty: Sort includes alphabetically Sort includes in n_tty alphabetically to make it easier to see if an include is among the list or not. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230309082035.14880-5-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 38b6b621018ec954d6265cef23976df53f953ddb Author: Ilpo Järvinen Date: Thu Mar 9 10:20:30 2023 +0200 Bluetooth: hci_ldisc: Fix tty_set_termios() return value assumptions tty_set_termios() never returns anything else than 0. Make the debug prints to look directly into the new termios instead to check CRTSCTS state. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230309082035.14880-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0b05223bdf6058b96a596609c50a18c7b010224d Author: Ilpo Järvinen Date: Thu Mar 9 10:20:29 2023 +0200 tty_ioctl: Use BIT() for internal flags Convert internal flags to use BIT(). Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230309082035.14880-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b8abba0eb1f5b8a05e864cf00f246e1c066775a2 Author: Ilpo Järvinen Date: Thu Mar 9 10:20:28 2023 +0200 n_tty: Convert no_space_left to space_left boolean The no_space_left variable is only assigned with 0 and 1. Change its type to boolean and move negation from its name into the check. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230309082035.14880-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 044498cd89a1a580a3145b2c5fb34d5e2f3b9908 Author: Ilpo Järvinen Date: Thu Mar 9 10:09:23 2023 +0200 serial: Remove uart_wait_until_sent() forward declaration Remove unnecessary forward declaration of uart_wait_until_sent(). Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230309080923.11778-9-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1690ca513da18b1f7de89c39faf78278d302b867 Author: Ilpo Järvinen Date: Thu Mar 9 10:09:22 2023 +0200 serial: Rename hw_stopped to old_hw_stopped & improve logic hw_stopped in uart_change_line_settings() stores old hw_stopped, thus rename it appropriately. Alter logic to check first if the hw_stopped was changed, and then pick which function to call if it was because the logic is more obvious that way. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230309080923.11778-8-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b5def43a7b3e7e68d6b49a23166f8b886a26bb54 Author: Ilpo Järvinen Date: Thu Mar 9 10:09:21 2023 +0200 serial: Make hw_stopped bool Convert hw_stopped in uart_port to bool because its more appropriate type for how it is used. Also convert the local variable in uart_change_line_settings() caching old hw_stopped to bool. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230309080923.11778-7-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 826736a6c7c8c3185bfb10e03c10d03d53d6cf94 Author: Ilpo Järvinen Date: Thu Mar 9 10:09:20 2023 +0200 serial: Rename uart_change_speed() to uart_change_line_settings() uart_change_speed() changes more than just speed so rename it to more generic uart_change_line_settings(). Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230309080923.11778-6-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8e90cf29aef77b59ed6a6f6466add2af79621f26 Author: Ilpo Järvinen Date: Thu Mar 9 10:09:19 2023 +0200 serial: Move uart_change_speed() earlier Move uart_change_speed() earlier to get rid of its forward declaration. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230309080923.11778-5-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 6229ad9913ac794233fdb3ed20f1e899add0af6b Author: Ilpo Järvinen Date: Thu Mar 9 10:09:18 2023 +0200 serial: Remove extern from func prototypes in headers Remove unnecessary externs from function prototypes in serial_8250.h and serial_core.h. Suggested-by: Jiri Slaby Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230309080923.11778-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 807fccf71939f10855a0256f0c999d665b80263f Author: Ilpo Järvinen Date: Thu Mar 9 10:09:17 2023 +0200 serial: Use B0 instead of implicit zero assumption Compare against B0 rather than assume B0 equals zero, which is true for all archs but explicit B0 makes the code more obvious. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230309080923.11778-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit eff37b5ea3d92c9d33a7e543460a565d17909ae4 Author: Ilpo Järvinen Date: Thu Mar 9 10:09:16 2023 +0200 serial: Use ARRAY_SIZE() with iso7816 reserved array Instead of a literal, size the for loop iteration based on the actual array using ARRAY_SIZE(). Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230309080923.11778-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit af3004c9ac81a532a8106d1d3c06e09eb95f0dd6 Author: Ville Syrjälä Date: Tue Mar 14 15:02:55 2023 +0200 drm/i915: Extract intel_sprite_uapi.c Move the sprite colorkey ioctl handler to its own file so that intel_sprite.c becomes all about the low level details of pre-skl sprite planes. And drop a bunch of unnecessary includes while at it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230314130255.23273-10-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 0ec2a5b291af32dcd2b52dc8c1d53c3037238939 Author: Ville Syrjälä Date: Tue Mar 14 15:02:54 2023 +0200 drm/i915: Relocate intel_plane_check_src_coordinates() Move intel_plane_check_src_coordinates() from the pre-skl sprite plane specific code to a more suitable place for common plane code. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230314130255.23273-9-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 5747af7c7303a1ed438fcf51680b767dca08c5e2 Author: Ville Syrjälä Date: Tue Mar 14 15:02:53 2023 +0200 drm/i915: Clean up skl+ plane alpha bits Convert a few more skl+ plane registers to REG_BIT() & co. Somehow thse were missed during the earlier cleanup. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230314130255.23273-8-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 0e9b1e5be8656c0705237341401c78c26b6cdf43 Author: Ville Syrjälä Date: Tue Mar 14 15:02:52 2023 +0200 drm/i915: Define vlv/chv sprite plane SURFLIVE registers Might as well complete the SURFLIVE register definitions for all platforms/plane types. We are only missing the VLV/CHV sprite planes. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230314130255.23273-7-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 47df94faa5e3775510177cdc0909e397300cc791 Author: Krzysztof Kozlowski Date: Fri Mar 17 09:21:37 2023 +0100 ASoC: dt-bindings: renesas: rsnd: correct comments syntax yamllint expect space after '#' comment mark: renesas,rsnd.yaml:282:4: [error] missing starting space in comment (comments) Fixes: 7f8b5b24bbb4 ("ASoC: dt-bindings: renesas,rsnd.yaml: add R-Car Gen4 support") Reported-by: Rafał Miłecki Link: https://lore.kernel.org/all/b2810924-169d-0bad-8f20-6ec2e683d170@gmail.com/ Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230317082137.12629-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit b36bf721578bfe8229c1d7f2fcd0bd021cc8b2f4 Author: Krzysztof Kozlowski Date: Fri Mar 17 10:29:00 2023 +0100 ASoC: dt-bindings: adi,adau17x1: fix indentation and example Fix errors in binding indentation and example: adi,adau17x1.yaml:8:2: [warning] wrong indentation: expected 2 but found 1 (indentation) adi,adau17x1.example.dts:29.3-30.1 syntax error Fixes: 87771c940258 ("ASoC: dt-bindings: adi,adau17x1: Convert to DT schema") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230317092900.16770-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit ef51cd1ebab63bb92bfef050fbf12b2265f5c7a5 Author: Peter Ujfalusi Date: Fri Mar 17 08:35:24 2023 +0200 ASoC: SOF: ipc4-topology: Initialize in_format to NULL in sof_ipc4_get_audio_fmt If the available_fmt->num_input_formats is 0 and there is a failure during the output format parsing then a kfree() would be called on the uninitialized in_format pointer. By initializing the in_format to NULL, this error can be avoided. Fixes: 7ab6b1e8302c ("ASoC: SOF: ipc4-topology: Modify the type of available input/output formats") Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20230317063524.8280-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 3f3fdc978b8dbac444f7187915a3c874b674bee1 Author: Ville Syrjälä Date: Tue Mar 14 15:02:51 2023 +0200 drm/i915: Define skl+ universal plane SURFLIVE registers Add the definitions for the skl+ univerals plane SURFLIVE registers. Despite not being used for anything real these came in suprisingly handy during some DSB debugging recently, so having the defines around can be useful. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230314130255.23273-6-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 811a742f2d4d1b0aee686bc2f4282b51534898a2 Author: Libin Yang Date: Thu Mar 16 17:11:37 2023 +0200 ASoC: SOF: ipc4-topology: update pipeline_params in process prepare Some modules may modify the audio format during processing. So, update the pipeline params based on pin 0's output format during process prepare. Signed-off-by: Libin Yang Co-developed-by: Ranjani Sridharan Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Chao Song Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230316151137.7598-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 648fea12847695d60ddeebea86597114885ee76e Author: Chao Song Date: Thu Mar 16 17:11:36 2023 +0200 ASoC: SOF: ipc4-topology: set copier output format for process module The copier output pin 0 format is set with module instance initialization, format for additional copier output pin should be set before the pin is used. If a process module is connected to additional copier output pin, the copier output pin format should be set according to the corresponding input pin format of the process module. Signed-off-by: Chao Song Co-developed-by: Ranjani Sridharan Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230316151137.7598-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit f9efae954905a07a9d152e9b30546a6632227eef Author: Ranjani Sridharan Date: Thu Mar 16 17:11:35 2023 +0200 ASoC: SOF: ipc4-topology: Add support for base config extension Some processing modules need the audio formats for all their input and output pins appended to the base config during module init. So add support for building the base config extension using the available pin formats from topology. Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230316151137.7598-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit d0be868c5a6e0dafb53d0ee9f0b9d66e40d963f6 Author: Chao Song Date: Thu Mar 16 17:11:34 2023 +0200 ASoC: SOF: ipc4-topology: add base module config extension structure The modules currently supported by the SOF firmware use the base module config containing the audio format for the input/output pin 0 for initialization. But some processing modules with multiple input/output pins require the audio formats to be sent with the init instance IPC payload. Modules that require the base config extension will need to indicate this in the module information in the firmware manifest. Introduce a new struct sof_ipc4_base_module_cfg_ext which contains the pin formats for the input and output pins. This will be appended to the init instance IPC payload for modules that require it. Signed-off-by: Chao Song Signed-off-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230316151137.7598-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 7711a2bbc8447dd7185c6da9e405d89ce3ec2f0f Author: Libin Yang Date: Thu Mar 16 17:11:33 2023 +0200 ASoC: SOF: ipc4-topology: add effect widget support Add the general support of IPC4 effect widgets. IPC4 effect widgets, known as process modules, can be EQFIR, EQIIR, KEYWORD_DETECT, KPB, CHAN_SELECTOR, SMART_AMP and etc. Signed-off-by: Libin Yang Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230316151137.7598-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 04b522a4d2acf8447d69bf87b3ab67d5e6d631a2 Author: Peter Ujfalusi Date: Thu Mar 16 17:11:32 2023 +0200 ASoC: SOF: ipc4-topology: Move the kcontrol module_id update to helper Introduce a helper function to update the message template for a kcontrol associated with a widget. In this way the helper can be re-used by other components later. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Jaska Uimonen Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230316151137.7598-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 37ec7ab49f951ef8c38102328b84d3dc7155dc68 Author: Kai Vehmanen Date: Thu Mar 16 16:14:58 2023 +0200 ASoC: SOF: ipc4-topology: use common helper function in copier prepare Use the ipc4_set_fmt_mask() helper function instead of open-coding the logic in multiple places. Signed-off-by: Kai Vehmanen Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230316141458.13940-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 279e52d6b9f366f9930a0f90ee84e7d0a6a27b26 Author: Kai Vehmanen Date: Thu Mar 16 16:14:57 2023 +0200 ASoC: SOF: ipc4-pcm: support multiple configs for BE DAIs Backend DAIs may support multiple audio formats. Modify pipeline setup to select a suitable configuration based on topology and frontend DAI runtime configuration. For sampling rate, if one of the BE DAI configurations has a sampling rate matching that of FE DAI, configure BE DAI to this rate. For sample format, the current code hardcodes DAI copier sample format to 32bit for both playback and capture pipelines. This is not always desired, so lift the limitation and set the sample format based on topology definitions for the copiers. For capture pipelines, we want to set the BE DAI pipeline format based on topology instead of using the FE DAI format. This covers the common use-case where BE DAI outputs data at a higher sample precision and sample width is reduced later in the pipeline. Instead of hardcoding to 32bit, use the BE DAI copier output format defined in topology. Signed-off-by: Kai Vehmanen Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230316141458.13940-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit c931ef0041fe0a7b62b7d15774a831f3bc85713a Author: Ville Syrjälä Date: Tue Mar 14 15:02:50 2023 +0200 drm/i915: Program VLV/CHV PIPE_MSA_MISC register VLV/CHV have an extra register to configure some stereo3d signalling details via DP MSA. Make sure we reset that register to zero (since we don't do any stereo3d stuff). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230314130255.23273-5-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 6e889b1ce7f1be2bfcfe39a4bcc82b34380031c4 Author: Ville Syrjälä Date: Tue Mar 14 15:02:49 2023 +0200 drm/i915: Define more pipe timestamp registers Add definitions for various pipe timestamp registers: - frame timestamp (last start of vblank) (g4x+), already had this defined - flip timestamp (when SURF was last written) (g4x+) - flipdone timestamp (when last flipdone was signalled) (tgl+) Note that on pre-tgl the flip related timestamps are only updated for primary plane flips, but on tgl+ we can select which plane updates them (via PIPE_MISC2). Let's define those related bits as well. Curiously VLV/CHV do not have the frame/flip timestamp registers, despite all the other related registers being inherited from g4x. This means we can get rid of the pipe_offsets[] usage for these, and thus the implicit dev_priv is gone as well. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230314130255.23273-4-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit c640f6c5570a6af904db37979d344ace8312c675 Author: Ville Syrjälä Date: Tue Mar 14 15:02:48 2023 +0200 drm/i915: s/PIPEMISC/PIPE_MISC/ This PIPEMISC vs. PIPE_MISC inconsitency is ugly. Unify the naming (PIPE_MISC is also what bspec has always called it). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230314130255.23273-3-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 14c7b2451adce947b034ce1891c2db9220a3e8ce Author: Ville Syrjälä Date: Tue Mar 14 15:02:47 2023 +0200 drm/i915: Stop using pipe_offsets[] for PIPE_MISC* The PIPE_MISC registers don't exist on pre-bdw hardware, so there is no point in using pipe_offsets[] for them. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230314130255.23273-2-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 0f10f647f45545004ea50b73a7a7c5c3309ff286 Author: Bagas Sanjaya Date: Tue Mar 14 14:44:49 2023 +0700 bpf, docs: Use internal linking for link to netdev subsystem doc Commit d56b0c461d19da ("bpf, docs: Fix link to netdev-FAQ target") attempts to fix linking problem to undefined "netdev-FAQ" label introduced in 287f4fa99a5281 ("docs: Update references to netdev-FAQ") by changing internal cross reference to netdev subsystem documentation (Documentation/process/maintainer-netdev.rst) to external one at docs.kernel.org. However, the linking problem is still not resolved, as the generated link points to non-existent netdev-FAQ section of the external doc, which when clicked, will instead going to the top of the doc. Revert back to internal linking by simply mention the doc path while massaging the leading text to the link, since the netdev subsystem doc contains no FAQs but rather general information about the subsystem. Fixes: d56b0c461d19 ("bpf, docs: Fix link to netdev-FAQ target") Fixes: 287f4fa99a52 ("docs: Update references to netdev-FAQ") Signed-off-by: Bagas Sanjaya Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230314074449.23620-1-bagasdotme@gmail.com commit bd5314f8dd2d41330eecb60f0490c3fcfe1fc99d Author: Viktor Malik Date: Fri Mar 17 10:56:01 2023 +0100 kallsyms, bpf: Move find_kallsyms_symbol_value out of internal header Moving find_kallsyms_symbol_value from kernel/module/internal.h to include/linux/module.h. The reason is that internal.h is not prepared to be included when CONFIG_MODULES=n. find_kallsyms_symbol_value is used by kernel/bpf/verifier.c and including internal.h from it (without modules) leads into a compilation error: In file included from ../include/linux/container_of.h:5, from ../include/linux/list.h:5, from ../include/linux/timer.h:5, from ../include/linux/workqueue.h:9, from ../include/linux/bpf.h:10, from ../include/linux/bpf-cgroup.h:5, from ../kernel/bpf/verifier.c:7: ../kernel/bpf/../module/internal.h: In function 'mod_find': ../include/linux/container_of.h:20:54: error: invalid use of undefined type 'struct module' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~ [...] This patch fixes the above error. Fixes: 31bf1dbccfb0 ("bpf: Fix attaching fentry/fexit/fmod_ret/lsm to modules") Reported-by: kernel test robot Signed-off-by: Viktor Malik Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/oe-kbuild-all/202303161404.OrmfCy09-lkp@intel.com/ Link: https://lore.kernel.org/bpf/20230317095601.386738-1-vmalik@redhat.com commit 5f67124757464d632f0e5288e0ba48e3ff5531a9 Author: Henrik Grimler Date: Wed Mar 15 22:28:14 2023 +0100 arm64: dts: exynos: add mmc aliases Add aliases for eMMC and SD card where applicable, so that assigned mmc indeces are always the same. Signed-off-by: Henrik Grimler Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20230315212814.15908-3-henrik@grimler.se Signed-off-by: Krzysztof Kozlowski commit c04d7b263d3ff036ca124494c57011c1c274dbe6 Author: Henrik Grimler Date: Wed Mar 15 22:28:13 2023 +0100 arm64: dts: exynos: drop mshc aliases Previously, the mshc0 alias has been necessary so that MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA are set for mshc_0/mmc_0. However, these capabilities should be described in the device tree so that we do not have to rely on the alias. The property mmc-ddr-1_8v replaces MMC_CAP_1_8V_DDR, while bus_width = <8>, which is already set for all the mshc0/mmc0 nodes, replaces MMC_CAP_8_BIT_DATA. Also drop other mshc aliases as they are not needed. Signed-off-by: Henrik Grimler Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20230315212814.15908-2-henrik@grimler.se Signed-off-by: Krzysztof Kozlowski commit d2e5c16f6c86901040f3bb6b40d1a01ccf1a21b0 Author: Rob Herring Date: Wed Feb 8 12:55:06 2023 -0600 arm64: dts: cavium: Fix GICv3 ITS nodes The GICv3 ITS is an MSI controller, therefore its node name should be 'msi-controller'. The ITS node is also expected to have '#msi-cells'. Add it on Thunder as there are no users. Thunder2 uses 'msi-parent', but Robin says that should be 'msi-map' instead and I'm not sure what's correct for it. The unit-addresses of both the ITS and main GIC node on thunder2 are also wrong, so fix them while we're here. Cc: Robin Murphy Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230208185506.2305349-1-robh@kernel.org Signed-off-by: Krzysztof Kozlowski commit 11af36cb898123fd4e0034f1bc6550aedcc87800 Author: Juergen Gross Date: Fri Mar 17 07:33:25 2023 +0100 x86/paravirt: Convert simple paravirt functions to asm All functions referenced via __PV_IS_CALLEE_SAVE() need to be assembler functions, as those functions calls are hidden from the compiler. In case the kernel is compiled with "-fzero-call-used-regs" the compiler will clobber caller-saved registers at the end of C functions, which will result in unexpectedly zeroed registers at the call site of the related paravirt functions. Replace the C functions with DEFINE_PARAVIRT_ASM() constructs using the same instructions as the related paravirt calls in the PVOP_ALT_[V]CALLEE*() macros. And since they're not C functions visible to the compiler anymore, latter won't do the callee-clobbered zeroing invoked by -fzero-call-used-regs and thus won't corrupt registers. [ bp: Extend commit message. ] Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230317063325.361-1-jgross@suse.com commit f1e96f0617fc578f74319a5ba46473773035594f Author: Krzysztof Kozlowski Date: Fri Mar 17 04:15:49 2023 -0700 Input: bcm_iproc_tsc - drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes !CONFIG_OF error: Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230312131514.351603-4-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov commit f92dd6d074555edfe499ef6667a25b286e312ee3 Author: Krzysztof Kozlowski Date: Fri Mar 17 04:15:11 2023 -0700 Input: sun4i-ts - drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes !CONFIG_OF error: drivers/input/touchscreen/sun4i-ts.c:392:34: error: ‘sun4i_ts_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230312131514.351603-3-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov commit 27e54d5193b914f5c29108adffdf10a253b8b40e Author: Krzysztof Kozlowski Date: Fri Mar 17 04:14:50 2023 -0700 Input: tm2-touchkey - drop of_match_ptr for ID table The driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes !CONFIG_OF error: drivers/input/keyboard/tm2-touchkey.c:335:34: error: ‘tm2_touchkey_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230312131514.351603-2-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov commit bb5e4f3e1abf0e45d2d7b96875f05fa81fa1de0f Author: Krzysztof Kozlowski Date: Fri Mar 17 04:14:33 2023 -0700 Input: st-keyscan - drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes !CONFIG_OF error: drivers/input/keyboard/st-keyscan.c:251:34: error: ‘keyscan_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230312131514.351603-1-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov commit eaedf192f65fc4e3e2001b8e09940386cc494bd5 Author: Rob Herring Date: Fri Mar 10 20:26:21 2023 -0800 Input: zinitix - use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144708.1542682-1-robh@kernel.org Signed-off-by: Dmitry Torokhov commit 12c7d0aeb3beecc8b8f570d82c4d8509def71a6e Author: Rob Herring Date: Fri Mar 10 20:27:10 2023 -0800 Input: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to of_property_read_bool(). Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144708.1542751-1-robh@kernel.org Signed-off-by: Dmitry Torokhov commit 220a20ad140296243b621642ec3d0c46869efd02 Author: Vernon Yang Date: Tue Mar 14 15:16:01 2023 +0800 mm/slub: fix help comment of SLUB_DEBUG Since commit ab4d5ed5eeda ("slub: Enable sysfs support for !CONFIG_SLUB_DEBUG"), disabling SLUB_DEBUG no longer disables sysfs support completely, so fix the description. Also update the path to /sys/kernel/slab. Signed-off-by: Vernon Yang Signed-off-by: Vlastimil Babka commit d26a3a6ce7e02f9c056ad992bcd9624735022337 Merge: 007e50eb5dbe7 eeac8ede17557 Author: Dmitry Torokhov Date: Fri Mar 17 04:01:30 2023 -0700 Merge tag 'v6.3-rc2' into next Merge with mainline to get of_property_present() and other newer APIs. commit 007e50eb5dbe7b33a43a1449a0d9c29e8dcf1c67 Author: Hans de Goede Date: Fri Mar 17 03:50:27 2023 -0700 Input: hideep - optionally reset controller work mode to native HiDeep protocol The HiDeep IST940E touchscreen controller used on the Lenovo Yoga Book X90F convertible comes up in HID mode by default. This works well on the X91F Windows model where the touchscreen is correctly described in ACPI and ACPI takes care of controlling the reset GPIO and regulators. But the X90F ships with Android and the ACPI tables on this model don't describe the touchscreen. Instead this is hardcoded in the vendor kernel. The vendor kernel uses the touchscreen in native HiDeep 20 (2.0?) protocol mode and switches the controller to this mode by writing 0 to reg 0x081e. Adjusting the i2c-hid code to deal with the reset-gpio and regulators on this non devicetree (but rather broken ACPI) convertible is somewhat tricky and the native protocol reports ABS_MT_PRESSURE and ABS_MT_TOUCH_MAJOR which are not reported in HID mode, so it is preferable to use the native mode. Add support to the hideep driver to reset the work-mode to the native HiDeep protocol to allow using it on the Lenovo Yoga Book X90F. This is guarded behind a new "hideep,force-native-protocol" boolean property, to avoid changing behavior on other devices. For the record: I did test using the i2c-hid driver with some quick hacks and it does work. The I2C-HID descriptor is available from address 0x0020, just like on the X91F Windows model. So far the new "hideep,force-native-protocol" property is only used on x86/ACPI (non devicetree) devs. IOW it is not used in actual devicetree files. The devicetree-bindings maintainers have requested properties like these to not be added to the devicetree-bindings, so the new property is deliberately not added to the existing devicetree-bindings. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230311114726.182789-3-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit 10b0a455f4378330de41e280ce7839997d24297d Author: Hans de Goede Date: Fri Mar 17 03:48:07 2023 -0700 Input: hideep - silence error in SW_RESET() On some models the first HIDEEP_SYSCON_WDT_CON write alone is enough to cause the controller to reset, causing the second write to fail: i2c-hideep_ts: write to register 0x52000014 (0x000001) failed: -121 Switch this write to a raw hideep_pgm_w_mem() to avoid an error getting logged in this case. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230311114726.182789-2-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit 5af7a77acd0ff23fe06d93c3c7d0e0aa7a264fa7 Author: Yang Li Date: Fri Mar 10 20:36:17 2023 -0800 Input: hideep - clean up some inconsistent indenting Turn the space into a tab to Eliminate the follow smatch warning: drivers/input/touchscreen/hideep.c:470 hideep_program_nvm() warn: inconsistent indenting Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20220429070103.4747-1-yang.lee@linux.alibaba.com Signed-off-by: Dmitry Torokhov commit a45e5fe792349315827b483eb23b307df47c6c6c Author: Lukas Bulwahn Date: Thu Mar 16 12:49:52 2023 +0100 MIPS: ath79: remove obsolete ATH79_DEV_* configs Commit 85b9686dae30 ("MIPS: ath79: drop platform device registration code") removes all files arch/mips/ath79/dev-*.[ch], adjusts the Makefile, but misses to adjust the Kconfig file. Hence, since then, the configs ATH79_DEV_* are really dead. Commit 3a77e0d75eed ("MIPS: ath79: drop machfiles") already removes all configs that select ATH79_DEV_* config. So at that point, they was not a way to enable them with a kernel build configuration. Remove these obsolete ATH79_DEV_* configs. Signed-off-by: Lukas Bulwahn Signed-off-by: Thomas Bogendoerfer commit 0345234720ca5601b59f20570f71139f5ad4d229 Author: Thomas Bogendoerfer Date: Wed Mar 15 15:21:24 2023 +0100 MIPS: sibyte: Replace BCM1125H with SB1250 option SIBYTE_BCM1125H is identical to SIBYTE_SB1250, so remove one of them. Signed-off-by: Thomas Bogendoerfer commit a0136c28a2d8e03d0cb2f707cd1c837a8e0884e9 Author: Thomas Bogendoerfer Date: Wed Mar 15 15:12:02 2023 +0100 MIPS: sibyte: Remove Sibyte CARMEL and CRHINE board support Looks like these boards were nether in active use, so let's remove them. Signed-off-by: Thomas Bogendoerfer commit b984d7b56dfcf71648102e227120bdc247562d00 Author: Thomas Bogendoerfer Date: Wed Mar 15 14:55:09 2023 +0100 MIPS: sibyte: Remove unused config option SIBYTE_BCM1x55 SIBYTE_BCM1x55 is not selected anywhere, so let's get rid of it. Signed-off-by: Thomas Bogendoerfer commit 1150e181a14666a77dde80252f2b5cbaea69a498 Author: Thomas Bogendoerfer Date: Wed Mar 15 14:45:48 2023 +0100 MIPS: sibyte: remove no longer needed board_mem_region With the direct use of memblock interface board_mem_region is no longer needed. Signed-off-by: Thomas Bogendoerfer commit 6afcc84080c415df81765c6d773edcba8fc30f6c Author: Takahiro Kuwano Date: Thu Mar 2 16:35:07 2023 +0900 mtd: spi-nor: spansion: Add support for Infineon S25FS256T Infineon S25FS256T is 256Mbit Quad SPI NOR flash. The key features and differences comparing to other Spansion/Cypress flash familes are: - 4-byte address mode by factory default - Quad mode is enabled by factory default - OP_READ_FAST_4B(0Ch) is not supported - Supports mixture of 128KB and 64KB sectors by OTP configuration (this patch supports uniform 128KB only due to complexity of non-uniform layout) Tested on Xilinx Zynq-7000 FPGA board. Link: https://www.infineon.com/dgdlac/Infineon-S25FS256T_256Mb_SEMPER_Nano_Flash_Quad_SPI_1.8V-DataSheet-v12_00-EN.pdf?fileId=8ac78c8c80027ecd0180740c5a46707a Signed-off-by: Takahiro Kuwano Link: https://lore.kernel.org/r/097ef04484966593ba1326d0a99462753d7d1073.1677557525.git.Takahiro.Kuwano@infineon.com Signed-off-by: Tudor Ambarus commit d628783c46d3c317deb0671ceb986be358fbaf69 Author: Takahiro Kuwano Date: Thu Mar 2 16:35:06 2023 +0900 mtd: spi-nor: spansion: Make RD_ANY_REG_OP macro take number of dummy bytes Currently Read Any Register op is used to read volatile registers without any dummy cycles, but the op requires dummy cycles depending on register type (volatiler or non-volatile), device family, and device configuration. Add 'ndummy' argument to RD_ANY_REG_OP macro to support other use cases. Suggested-by: Tudor Ambarus Signed-off-by: Takahiro Kuwano Link: https://lore.kernel.org/r/03756e9e3ac41d2016a71d2afb702398dd0b19ed.1677557525.git.Takahiro.Kuwano@infineon.com Signed-off-by: Tudor Ambarus commit c4252a11131c7f27a158294241466e2a4e7ff94e Author: Andrzej Hajda Date: Tue Mar 14 16:19:20 2023 +0100 drm/i915/gt: perform uc late init after probe error injection Probe pseudo errors should be injected only in places where real errors can be encountered, otherwise unwinding code can be broken. Placing intel_uc_init_late before i915_inject_probe_error violated this rule, resulting in following bug: __intel_gt_disable:655 GEM_BUG_ON(intel_gt_pm_is_awake(gt)) Fixes: 481d458caede ("drm/i915/guc: Add golden context to GuC ADS") Acked-by: Nirmoy Das Reviewed-by: Andi Shyti Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20230314151920.1065847-1-andrzej.hajda@intel.com commit 79a22238b4f22c45cadd3b4040d644f4de320d1b Author: Kai Shen Date: Fri Mar 17 03:21:32 2023 +0000 net/smc: Use percpu ref for wr tx reference The refcount wr_tx_refcnt may cause cache thrashing problems among cores and we can use percpu ref to mitigate this issue here. We gain some performance improvement with percpu ref here on our customized smc-r verion. Applying cache alignment may also mitigate this problem but it seem more reasonable to use percpu ref here. We can also replace wr_reg_refcnt with one percpu reference like wr_tx_refcnt. redis-benchmark on smc-r with atomic wr_tx_refcnt: SET: 525707.06 requests per second, p50=0.087 msec GET: 554877.38 requests per second, p50=0.087 msec redis-benchmark on the percpu_ref version: SET: 540482.06 requests per second, p50=0.087 msec GET: 570711.12 requests per second, p50=0.079 msec Cases are like "redis-benchmark -h x.x.x.x -q -t set,get -P 1 -n 5000000 -c 50 -d 10 --threads 4". Signed-off-by: Kai Shen Reviewed-by: Tony Lu Signed-off-by: David S. Miller commit d27d367d3b7861d9d6c852450d935507ba4044ee Merge: 82b3297009b68 736c8b52c8ada Author: David S. Miller Date: Fri Mar 17 08:56:37 2023 +0000 Merge branch 'inet-const' Eric Dumazet says: ==================== inet: better const qualifier awareness inet_sk() can be changed to propagate const qualifier, thanks to container_of_const() Following patches in this series add more const qualifiers. Other helpers like tcp_sk(), udp_sk(), raw_sk(), ... will be handled in following series. ==================== Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 736c8b52c8ada4ca93a59f7d597c5650ebc45921 Author: Eric Dumazet Date: Thu Mar 16 15:32:02 2023 +0000 inet_diag: constify raw_lookup() socket argument Now both raw_v4_match() and raw_v6_match() accept a const socket, raw_lookup() can do the same to clarify its role. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 0a8c2568209ee0c3392593c7c5c7fe41c625a383 Author: Eric Dumazet Date: Thu Mar 16 15:32:01 2023 +0000 ipv4: raw: constify raw_v4_match() socket argument This clarifies raw_v4_match() intent. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit db6af4fdb150b45e1ba6b295ccfd3df482e022d2 Author: Eric Dumazet Date: Thu Mar 16 15:32:00 2023 +0000 ipv6: raw: constify raw_v6_match() socket argument This clarifies raw_v6_match() intent. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit dc3731bad8e133ca1893ae414fdebdf85a333495 Author: Eric Dumazet Date: Thu Mar 16 15:31:59 2023 +0000 udp6: constify __udp_v6_is_mcast_sock() socket argument This clarifies __udp_v6_is_mcast_sock() intent. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 66eb554c6449cef8c1e1b814f74d13f264582591 Author: Eric Dumazet Date: Thu Mar 16 15:31:58 2023 +0000 ipv6: constify inet6_mc_check() inet6_mc_check() is essentially a read-only function. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit a0a989d3007538cd7dae9431d8ac47850ced3100 Author: Eric Dumazet Date: Thu Mar 16 15:31:57 2023 +0000 udp: constify __udp_is_mcast_sock() socket argument This clarifies __udp_is_mcast_sock() intent. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 33e972bdf0b0aa208b67164c64eef3c307e4b303 Author: Eric Dumazet Date: Thu Mar 16 15:31:56 2023 +0000 ipv4: constify ip_mc_sf_allow() socket argument This clarifies ip_mc_sf_allow() intent. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit abc17a11ed29b0471e428d86189acca8d1a213c6 Author: Eric Dumazet Date: Thu Mar 16 15:31:55 2023 +0000 inet: preserve const qualifier in inet_sk() We can change inet_sk() to propagate const qualifier of its argument. This should avoid some potential errors caused by accidental (const -> not_const) promotion. Other helpers like tcp_sk(), udp_sk(), raw_sk() will be handled in separate patch series. v2: use container_of_const() as advised by Jakub and Linus Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/netdev/20230315142841.3a2ac99a@kernel.org/ Link: https://lore.kernel.org/netdev/CAHk-=wiOf12nrYEF2vJMcucKjWPN-Ns_SW9fA7LwST_2Dzp7rw@mail.gmail.com/ Signed-off-by: David S. Miller commit ae1da08fb306caa8cc134b81ea68c537cfe7a451 Author: Tvrtko Ursulin Date: Thu Mar 16 14:27:28 2023 +0000 drm/i915: Simplify vcs/bsd engine selection No need to look at the mask of present engines when we already have a count stored ever since e2d0ff3525b9 ("drm/i915: Count engine instances per uabi class"). Signed-off-by: Tvrtko Ursulin Cc: Jonathan Cavitt Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20230316142728.1335239-1-tvrtko.ursulin@linux.intel.com [tursulin: fixup typo in patch title] commit 82b3297009b6831dfe47f0f38ed4043e39f58c9f Author: Jakub Kicinski Date: Wed Mar 15 21:50:27 2023 -0700 netlink: specs: allow uapi-header in genetlink Chuck wanted to put the UAPI header in linux/net/ which seems reasonable, allow genetlink families to choose the location. It doesn't really matter for non-C-like languages. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 74bf6477c18b2904936763132e9224a41b8da13a Author: Jakub Kicinski Date: Wed Mar 15 21:49:13 2023 -0700 netlink-specs: add partial specification for devlink Devlink is quite complex but put in the very basics so we can incrementally fill in the commands as needed. $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/devlink.yaml \ --dump get [{'bus-name': 'netdevsim', 'dev-name': 'netdevsim1', 'dev-stats': {'reload-stats': {'reload-action-info': {'reload-action': 1, 'reload-action-stats': {'reload-stats-entry': [{'reload-stats-limit': 0, 'reload-stats-value': 0}]}}}, 'remote-reload-stats': {'reload-action-info': {'reload-action': 2, 'reload-action-stats': {'reload-stats-entry': [{'reload-stats-limit': 0, 'reload-stats-value': 0}, {'reload-stats-limit': 1, 'reload-stats-value': 0}]}}}}, 'reload-failed': 0}] Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 19a9fbc074a9b1ed63b5b83d3696db447f4c503e Merge: dc021e6c24e1e 791a3e9f1a86f Author: David S. Miller Date: Fri Mar 17 08:52:06 2023 +0000 Merge branch 'net-packet-KCSAN' Eric Dumazet says: ==================== net/packet: KCSAN awareness This series is based on one syzbot report [1] Seven 'flags/booleans' are converted to atomic bit variant. po->xmit and po->tp_tstamp accesses get annotations. [1] BUG: KCSAN: data-race in packet_rcv / packet_setsockopt read-write to 0xffff88813dbe84e4 of 1 bytes by task 12312 on cpu 0: packet_setsockopt+0xb77/0xe60 net/packet/af_packet.c:3900 __sys_setsockopt+0x212/0x2b0 net/socket.c:2252 __do_sys_setsockopt net/socket.c:2263 [inline] __se_sys_setsockopt net/socket.c:2260 [inline] __x64_sys_setsockopt+0x62/0x70 net/socket.c:2260 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff88813dbe84e4 of 1 bytes by task 1911 on cpu 1: packet_rcv+0x4b1/0xa40 net/packet/af_packet.c:2187 deliver_skb net/core/dev.c:2189 [inline] dev_queue_xmit_nit+0x3a9/0x620 net/core/dev.c:2259 xmit_one+0x71/0x2a0 net/core/dev.c:3586 dev_hard_start_xmit+0x72/0x120 net/core/dev.c:3606 __dev_queue_xmit+0x91c/0x11c0 net/core/dev.c:4256 dev_queue_xmit include/linux/netdevice.h:3008 [inline] neigh_hh_output include/net/neighbour.h:530 [inline] neigh_output include/net/neighbour.h:544 [inline] ip6_finish_output2+0x9e9/0xc30 net/ipv6/ip6_output.c:134 __ip6_finish_output net/ipv6/ip6_output.c:195 [inline] ip6_finish_output+0x395/0x4f0 net/ipv6/ip6_output.c:206 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip6_output+0x10e/0x210 net/ipv6/ip6_output.c:227 dst_output include/net/dst.h:445 [inline] ip6_local_out+0x60/0x80 net/ipv6/output_core.c:161 ip6tunnel_xmit include/net/ip6_tunnel.h:161 [inline] udp_tunnel6_xmit_skb+0x321/0x4a0 net/ipv6/ip6_udp_tunnel.c:109 send6+0x2ed/0x3b0 drivers/net/wireguard/socket.c:152 wg_socket_send_skb_to_peer+0xbb/0x120 drivers/net/wireguard/socket.c:178 wg_packet_create_data_done drivers/net/wireguard/send.c:251 [inline] wg_packet_tx_worker+0x142/0x360 drivers/net/wireguard/send.c:276 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289 worker_thread+0x618/0xa70 kernel/workqueue.c:2436 kthread+0x1a9/0x1e0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 ==================== Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 791a3e9f1a86fe8eb09173c9788493b8b5c957f4 Author: Eric Dumazet Date: Thu Mar 16 01:10:14 2023 +0000 net/packet: convert po->pressure to an atomic flag Not only this removes some READ_ONCE()/WRITE_ONCE(), this also removes one integer. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 61edf479818e63978cabd243b82ca80f8948a313 Author: Eric Dumazet Date: Thu Mar 16 01:10:13 2023 +0000 net/packet: convert po->running to an atomic flag Instead of consuming 32 bits for po->running, use one available bit in po->flags. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 50d935eafee292fc432d5ac8c8715a6492961abc Author: Eric Dumazet Date: Thu Mar 16 01:10:12 2023 +0000 net/packet: convert po->has_vnet_hdr to an atomic flag po->has_vnet_hdr can be read locklessly. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 164bddace2e03f6005e650cb88f101a66ebdc05a Author: Eric Dumazet Date: Thu Mar 16 01:10:11 2023 +0000 net/packet: convert po->tp_loss to an atomic flag tp_loss can be read locklessly. Convert it to an atomic flag to avoid races. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 7438344660fa55b33b8234c1797c886eb73667a7 Author: Eric Dumazet Date: Thu Mar 16 01:10:10 2023 +0000 net/packet: convert po->tp_tx_has_off to an atomic flag This is to use existing space in po->flags, and reclaim the storage used by the non atomic bit fields. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 1051ce4ab64db91f7b62369ddc321ba8747f8c84 Author: Eric Dumazet Date: Thu Mar 16 01:10:09 2023 +0000 net/packet: annotate accesses to po->tp_tstamp tp_tstamp is read locklessly. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit fd53c297aa7b077ae98a3d3d2d3aa278a1686ba6 Author: Eric Dumazet Date: Thu Mar 16 01:10:08 2023 +0000 net/packet: convert po->auxdata to an atomic flag po->auxdata can be read while another thread is changing its value, potentially raising KCSAN splat. Convert it to PACKET_SOCK_AUXDATA flag. Fixes: 8dc419447415 ("[PACKET]: Add optional checksum computation for recvmsg") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit ee5675ecdf7a4e713ed21d98a70c2871d6ebed01 Author: Eric Dumazet Date: Thu Mar 16 01:10:07 2023 +0000 net/packet: convert po->origdev to an atomic flag syzbot/KCAN reported that po->origdev can be read while another thread is changing its value. We can avoid this splat by converting this field to an actual bit. Following patches will convert remaining 1bit fields. Fixes: 80feaacb8a64 ("[AF_PACKET]: Add option to return orig_dev to userspace.") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit b9d83ab8a708f23a4001d60e9d8d0b3be3d9f607 Author: Eric Dumazet Date: Thu Mar 16 01:10:06 2023 +0000 net/packet: annotate accesses to po->xmit po->xmit can be set from setsockopt(PACKET_QDISC_BYPASS), while read locklessly. Use READ_ONCE()/WRITE_ONCE() to avoid potential load/store tearing issues. Fixes: d346a3fae3ff ("packet: introduce PACKET_QDISC_BYPASS socket option") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 862643c7589dc97111cd59c471dca0b354f01eb7 Author: Lee Jones Date: Fri Mar 17 08:16:46 2023 +0000 drm/ttm/ttm_bo: Provide a missing 'bulk' description and correct misnaming of 'placement' 'bulk' description taken from another in the same file. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/ttm/ttm_bo.c:98: warning: Function parameter or member 'bulk' not described in 'ttm_bo_set_bulk_move' drivers/gpu/drm/ttm/ttm_bo.c:768: warning: Function parameter or member 'placement' not described in 'ttm_bo_mem_space' drivers/gpu/drm/ttm/ttm_bo.c:768: warning: Excess function parameter 'proposed_placement' description in 'ttm_bo_mem_space' Signed-off-by: Lee Jones Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230317081718.2650744-6-lee@kernel.org commit dc021e6c24e1edd809e4f109783c48e8a74b2d8c Merge: ec4040ae5fd05 fd8e40321a123 Author: David S. Miller Date: Fri Mar 17 08:29:21 2023 +0000 Merge branch 'gve-xdp-support' Praveen Kaligineedi says: ==================== gve: Add XDP support for GQI-QPL format Adding support for XDP DROP, PASS, TX, REDIRECT for GQI QPL format. Add AF_XDP zero-copy support. When an XDP program is installed, dedicated TX queues are created to handle XDP traffic. The user needs to ensure that the number of configured TX queues is equal to the number of configured RX queues; and the number of TX/RX queues is less than or equal to half the maximum number of TX/RX queues. The XDP traffic from AF_XDP sockets and from other NICs (arriving via XDP_REDIRECT) will also egress through the dedicated XDP TX queues. Although these changes support AF_XDP socket in zero-copy mode, there is still a copy happening within the driver between XSK buffer pool and QPL bounce buffers in GQI-QPL format. The following example demonstrates how the XDP packets are mapped to TX queues: Example configuration: Max RX queues : 2N, Max TX queues : 2N Configured RX queues : N, Configured TX queues : N TX queue mapping: TX queues with queue id 0,...,N-1 will handle traffic from the stack. TX queues with queue id N,...,2N-1 will handle XDP traffic. For the XDP packets transmitted using XDP_TX action: = N + For the XDP packets that arrive from other NICs via XDP_REDIRECT action: = N + ( smp_processor_id % N ) For AF_XDP zero-copy mode: = N + Changes in v2: - Removed gve_close/gve_open when adding XDP dedicated queues. Instead we add and register additional TX queues when the XDP program is installed. If the allocation/registration fails we return error and do not install the XDP program. Added a new patch to enable adding TX queues without gve_close/gve_open - Removed xdp tx spin lock from this patch. It is needed for XDP_REDIRECT support as both XDP_REDIRECT and XDP_TX traffic share the dedicated XDP queues. Moved the code to add xdp tx spinlock to the subsequent patch that adds XDP_REDIRECT support. - Added netdev_err when the user tries to set rx/tx queues to the values not supported when XDP is enabled. - Removed rcu annotation for xdp_prog. We disable the napi prior to adding/removing the xdp_prog and reenable it after the program has been installed for all the queues. - Ring the tx doorbell once for napi instead of every XDP TX packet. - Added a new helper function for freeing the FIFO buffer - Unregister xdp rxq for all the queues when the registration fails during XDP program installation - Register xsk rxq only when XSK buff pool is enabled - Removed code accessing internal xsk_buff_pool fields - Removed sleep driven code when disabling XSK buff pool. Disable napi and re-enable it after disabling XSK pool. - Make sure that we clean up dma mappings on XSK pool disable - Use napi_if_scheduled_mark_missed to avoid unnecessary napi move to the CPU calling ndo_xsk_wakeup() Changes in v3: - Padding bytes are used if the XDP TX packet headers do not fit at tail of TX FIFO. Taking these padding bytes into account while checking if enough space is available in TX FIFO. Changes in v4: - Turn on the carrier based on the link status synchronously rather than asynchronously when XDP is installed/uninstalled - Set the supported flags in net_device.xdp_features ==================== Signed-off-by: David S. Miller commit fd8e40321a12391e6f554cc637d0c4b6109682a9 Author: Praveen Kaligineedi Date: Wed Mar 15 16:33:12 2023 -0700 gve: Add AF_XDP zero-copy support for GQI-QPL format Adding AF_XDP zero-copy support. Note: Although these changes support AF_XDP socket in zero-copy mode, there is still a copy happening within the driver between XSK buffer pool and QPL bounce buffers in GQI-QPL format. In GQI-QPL queue format, the driver needs to allocate a fixed size memory, the size specified by vNIC device, for RX/TX and register this memory as a bounce buffer with the vNIC device when a queue is created. The number of pages in the bounce buffer is limited and the pages need to be made available to the vNIC by copying the RX data out to prevent head-of-line blocking. Therefore, we cannot pass the XSK buffer pool to the vNIC. The number of copies on RX path from the bounce buffer to XSK buffer is 2 for AF_XDP copy mode (bounce buffer -> allocated page frag -> XSK buffer) and 1 for AF_XDP zero-copy mode (bounce buffer -> XSK buffer). This patch contains the following changes: 1) Enable and disable XSK buffer pool 2) Copy XDP packets from QPL bounce buffers to XSK buffer on rx 3) Copy XDP packets from XSK buffer to QPL bounce buffers and ring the doorbell as part of XDP TX napi poll 4) ndo_xsk_wakeup callback support Signed-off-by: Praveen Kaligineedi Reviewed-by: Jeroen de Borst Signed-off-by: David S. Miller commit 39a7f4aa3e4a7947614cf1d5c27abba3300adb1e Author: Praveen Kaligineedi Date: Wed Mar 15 16:33:11 2023 -0700 gve: Add XDP REDIRECT support for GQI-QPL format This patch contains the following changes: 1) Support for XDP REDIRECT action on rx 2) ndo_xdp_xmit callback support In GQI-QPL queue format, the driver needs to allocate a fixed size memory, the size specified by vNIC device, for RX/TX and register this memory as a bounce buffer with the vNIC device when a queue is created. The number of pages in the bounce buffer is limited and the pages need to be made available to the vNIC by copying the RX data out to prevent head-of-line blocking. The XDP_REDIRECT packets are therefore immediately copied to a newly allocated page. Signed-off-by: Praveen Kaligineedi Reviewed-by: Jeroen de Borst Signed-off-by: David S. Miller commit 75eaae158b1b7d8d5bde2bafc0bcf778423071d3 Author: Praveen Kaligineedi Date: Wed Mar 15 16:33:10 2023 -0700 gve: Add XDP DROP and TX support for GQI-QPL format Add support for XDP PASS, DROP and TX actions. This patch contains the following changes: 1) Support installing/uninstalling XDP program 2) Add dedicated XDP TX queues 3) Add support for XDP DROP action 4) Add support for XDP TX action Signed-off-by: Praveen Kaligineedi Reviewed-by: Jeroen de Borst Signed-off-by: David S. Miller commit 7fc2bf78a430f975e53f2b1e87e99d8f83cafd11 Author: Praveen Kaligineedi Date: Wed Mar 15 16:33:09 2023 -0700 gve: Changes to add new TX queues Changes to enable adding and removing TX queues without calling gve_close() and gve_open(). Made the following changes: 1) priv->tx, priv->rx and priv->qpls arrays are allocated based on max tx queues and max rx queues 2) Changed gve_adminq_create_tx_queues(), gve_adminq_destroy_tx_queues(), gve_tx_alloc_rings() and gve_tx_free_rings() functions to add/remove a subset of TX queues rather than all the TX queues. Signed-off-by: Praveen Kaligineedi Reviewed-by: Jeroen de Borst Signed-off-by: David S. Miller commit 2e80aeae9f807ac7e967dea7633abea5829c6531 Author: Praveen Kaligineedi Date: Wed Mar 15 16:33:08 2023 -0700 gve: XDP support GQI-QPL: helper function changes This patch adds/modifies helper functions needed to add XDP support. Signed-off-by: Praveen Kaligineedi Reviewed-by: Jeroen de Borst Signed-off-by: David S. Miller commit ec4040ae5fd058fe06a9dbe4161abc2829669e36 Merge: 731b73dba359e cc04410af7de3 Author: David S. Miller Date: Fri Mar 17 08:25:06 2023 +0000 Merge branch 'net-sk_err-lockless-annotate' Eric Dumazet says: ==================== net: annotate lockless accesses to sk_err[_soft] This patch series is inspired by yet another syzbot report. Most poll() handlers are lockless and read sk->sk_err while other cpus can change it. Add READ_ONCE/WRITE_ONCE() to major/usual offenders. More to come later. ==================== Signed-off-by: David S. Miller commit cc04410af7de348234ac36a5f50c4ce416efdb4b Author: Eric Dumazet Date: Wed Mar 15 20:57:46 2023 +0000 af_unix: annotate lockless accesses to sk->sk_err unix_poll() and unix_dgram_poll() read sk->sk_err without any lock held. Add relevant READ_ONCE()/WRITE_ONCE() annotations. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 9ae8e5ad99b8ebcd3d3dd46075f3825e6f08f063 Author: Eric Dumazet Date: Wed Mar 15 20:57:45 2023 +0000 mptcp: annotate lockless accesses to sk->sk_err mptcp_poll() reads sk->sk_err without socket lock held/owned. Add READ_ONCE() and WRITE_ONCE() to avoid load/store tearing. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit e13ec3da05d130f0d10da8e1fbe1be26dcdb0e27 Author: Eric Dumazet Date: Wed Mar 15 20:57:44 2023 +0000 tcp: annotate lockless access to sk->sk_err tcp_poll() reads sk->sk_err without socket lock held/owned. We should used READ_ONCE() here, and update writers to use WRITE_ONCE(). Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 2f2d9972affae1f3282eff97c794cf843aedf61e Author: Eric Dumazet Date: Wed Mar 15 20:57:43 2023 +0000 net: annotate lockless accesses to sk->sk_err_soft This field can be read/written without lock synchronization. tcp and dccp have been handled in different patches. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 9a25f0cb0d7ee689f54f38890e66bc78520b0c62 Author: Eric Dumazet Date: Wed Mar 15 20:57:42 2023 +0000 dccp: annotate lockless accesses to sk->sk_err_soft This field can be read/written without lock synchronization. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit cee1af825d65b8122627fc2efbc36c1bd51ee103 Author: Eric Dumazet Date: Wed Mar 15 20:57:41 2023 +0000 tcp: annotate lockless accesses to sk->sk_err_soft This field can be read/written without lock synchronization. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 731b73dba359e3ff00517c13aa0daa82b34ff466 Author: Vadim Fedorenko Date: Wed Mar 15 08:33:02 2023 -0700 vlan: partially enable SIOCSHWTSTAMP in container Setting timestamp filter was explicitly disabled on vlan devices in containers because it might affect other processes on the host. But it's absolutely legit in case when real device is in the same namespace. Fixes: 873017af7784 ("vlan: disable SIOCSHWTSTAMP in container") Signed-off-by: Vadim Fedorenko Signed-off-by: David S. Miller commit e05c518196c4ea72c1e84620f2e0251d25858a97 Merge: abf36703d7046 ecec0ebbc6381 Author: David S. Miller Date: Fri Mar 17 08:19:03 2023 +0000 Merge branch 'pcs_get_state-fixes' Russell King (Oracle) says: ==================== Minor fixes for pcs_get_state() implementations This series contains a number fixes for minor issues with some pcs_get_state() implementations, particualrly for the phylink state->an_enabled member. As they are minor, I'm suggesting we queue them in net-next as there is follow-on work for these, and there is no urgency for them to be in -rc. Just like phylib, state->advertising's Autoneg bit is a copy of state->an_enabled, and thus it is my intention to remove state->an_enabled from phylink to simplify things. This series gets rid of state->an_enabled assignments or reporting that should never have been there. ==================== Signed-off-by: David S. Miller commit ecec0ebbc6381a5a375f1cf10c4858f24e91e2ef Author: Russell King (Oracle) Date: Wed Mar 15 14:46:49 2023 +0000 net: pcs: lynx: don't print an_enabled in pcs_get_state() an_enabled will be going away, and in any case, pcs_get_state() should not be updating this member. Remove the print. Signed-off-by: Russell King (Oracle) Reviewed-by: Steen Hegelund Signed-off-by: David S. Miller commit ef63461caf427a77a04620d74ba90035a712af9c Author: Russell King (Oracle) Date: Wed Mar 15 14:46:43 2023 +0000 net: pcs: xpcs: remove double-read of link state when using AN Phylink does not want the current state of the link when reading the PCS link state - it wants the latched state. Don't double-read the MII status register. Phylink will re-read as necessary to capture transient link-down events as of dbae3388ea9c ("net: phylink: Force retrigger in case of latched link-fail indicator"). The above referenced commit is a dependency for this change, and thus this change should not be backported to any kernel that does not contain the above referenced commit. Fixes: fcb26bd2b6ca ("net: phy: Add Synopsys DesignWare XPCS MDIO module") Signed-off-by: Russell King (Oracle) Signed-off-by: David S. Miller commit abf36703d7046cd0aaf5ac5524d321851fb6bf03 Merge: ec47dcb489ba3 62199e3f16583 Author: David S. Miller Date: Fri Mar 17 08:05:50 2023 +0000 Merge branch 'vxlan-MDB-support' Ido Schimmel says: ==================== vxlan: Add MDB support tl;dr ===== This patchset implements MDB support in the VXLAN driver, allowing it to selectively forward IP multicast traffic to VTEPs with interested receivers instead of flooding it to all the VTEPs as BUM. The motivating use case is intra and inter subnet multicast forwarding using EVPN [1][2], which means that MDB entries are only installed by the user space control plane and no snooping is implemented, thereby avoiding a lot of unnecessary complexity in the kernel. Background ========== Both the bridge and VXLAN drivers have an FDB that allows them to forward Ethernet frames based on their destination MAC addresses and VLAN/VNI. These FDBs are managed using the same PF_BRIDGE/RTM_*NEIGH netlink messages and bridge(8) utility. However, only the bridge driver has an MDB that allows it to selectively forward IP multicast packets to bridge ports with interested receivers behind them, based on (S, G) and (*, G) MDB entries. When these packets reach the VXLAN driver they are flooded using the "all-zeros" FDB entry (00:00:00:00:00:00). The entry either includes the list of all the VTEPs in the tenant domain (when ingress replication is used) or the multicast address of the BUM tunnel (when P2MP tunnels are used), to which all the VTEPs join. Networks that make heavy use of multicast in the overlay can benefit from a solution that allows them to selectively forward IP multicast traffic only to VTEPs with interested receivers. Such a solution is described in the next section. Motivation ========== RFC 7432 [3] defines a "MAC/IP Advertisement route" (type 2) [4] that allows VTEPs in the EVPN network to advertise and learn reachability information for unicast MAC addresses. Traffic destined to a unicast MAC address can therefore be selectively forwarded to a single VTEP behind which the MAC is located. The same is not true for IP multicast traffic. Such traffic is simply flooded as BUM to all VTEPs in the broadcast domain (BD) / subnet, regardless if a VTEP has interested receivers for the multicast stream or not. This is especially problematic for overlay networks that make heavy use of multicast. The issue is addressed by RFC 9251 [1] that defines a "Selective Multicast Ethernet Tag Route" (type 6) [5] which allows VTEPs in the EVPN network to advertise multicast streams that they are interested in. This is done by having each VTEP suppress IGMP/MLD packets from being transmitted to the NVE network and instead communicate the information over BGP to other VTEPs. The draft in [2] further extends RFC 9251 with procedures to allow efficient forwarding of IP multicast traffic not only in a given subnet, but also between different subnets in a tenant domain. The required changes in the bridge driver to support the above were already merged in merge commit 8150f0cfb24f ("Merge branch 'bridge-mcast-extensions-for-evpn'"). However, full support entails MDB support in the VXLAN driver so that it will be able to selectively forward IP multicast traffic only to VTEPs with interested receivers. The implementation of this MDB is described in the next section. Implementation ============== The user interface is extended to allow user space to specify the destination VTEP(s) and related parameters. Example usage: # bridge mdb add dev vxlan0 port vxlan0 grp 239.1.1.1 permanent dst 198.51.100.1 # bridge mdb add dev vxlan0 port vxlan0 grp 239.1.1.1 permanent dst 192.0.2.1 $ bridge -d -s mdb show dev vxlan0 port vxlan0 grp 239.1.1.1 permanent filter_mode exclude proto static dst 192.0.2.1 0.00 dev vxlan0 port vxlan0 grp 239.1.1.1 permanent filter_mode exclude proto static dst 198.51.100.1 0.00 Since the MDB is fully managed by user space and since snooping is not implemented, only permanent entries can be installed and temporary entries are rejected by the kernel. The netlink interface is extended with a few new attributes in the RTM_NEWMDB / RTM_DELMDB request messages: [ struct nlmsghdr ] [ struct br_port_msg ] [ MDBA_SET_ENTRY ] struct br_mdb_entry [ MDBA_SET_ENTRY_ATTRS ] [ MDBE_ATTR_SOURCE ] struct in_addr / struct in6_addr [ MDBE_ATTR_SRC_LIST ] [ MDBE_SRC_LIST_ENTRY ] [ MDBE_SRCATTR_ADDRESS ] struct in_addr / struct in6_addr [ ...] [ MDBE_ATTR_GROUP_MODE ] u8 [ MDBE_ATTR_RTPORT ] u8 [ MDBE_ATTR_DST ] // new struct in_addr / struct in6_addr [ MDBE_ATTR_DST_PORT ] // new u16 [ MDBE_ATTR_VNI ] // new u32 [ MDBE_ATTR_IFINDEX ] // new s32 [ MDBE_ATTR_SRC_VNI ] // new u32 RTM_NEWMDB / RTM_DELMDB responses and notifications are extended with corresponding attributes. One MDB entry that can be installed in the VXLAN MDB, but not in the bridge MDB is the catchall entry (0.0.0.0 / ::). It is used to transmit unregistered multicast traffic that is not link-local and is especially useful when inter-subnet multicast forwarding is required. See patch #12 for a detailed explanation and motivation. It is similar to the "all-zeros" FDB entry that can be installed in the VXLAN FDB, but not the bridge FDB. "added_by_star_ex" entries -------------------------- The bridge driver automatically installs (S, G) MDB port group entries marked as "added_by_star_ex" whenever it detects that an (S, G) entry can prevent traffic from being forwarded via a port associated with an EXCLUDE (*, G) entry. The bridge will add the port to the port group of the (S, G) entry, thereby creating a new port group entry. The complexity associated with these entries is not trivial, but it needs to reside in the bridge driver because it automatically installs MDB entries in response to snooped IGMP / MLD packets. The same in not true for the VXLAN MDB which is entirely managed by user space who is fully capable of forming the correct replication lists on its own. In addition, the complexity associated with the "added_by_star_ex" entries in the VXLAN driver is higher compared to the bridge: Whenever a remote VTEP is added to the catchall entry, it needs to be added to all the existing MDB entries, as such a remote requested all the multicast traffic to be forwarded to it. Similarly, whenever an (*, G) or (S, G) entry is added, all the remotes associated with the catchall entry need to be added to it. Given the above, this patchset does not implement support for such entries. One argument against this decision can be that in the future someone might want to populate the VXLAN MDB in response to decapsulated IGMP / MLD packets and not according to EVPN routes. Regardless of my doubts regarding this possibility, it can be implemented using a new VXLAN device knob that will also enable the "added_by_star_ex" functionality. Testing ======= Tested using existing VXLAN and MDB selftests under "net/" and "net/forwarding/". Added a dedicated selftest in the last patch. Patchset overview ================= Patches #1-#3 are small preparations in the bridge driver. I plan to submit them separately together with an MDB dump test case. Patches #4-#6 are additional preparations centered around the extraction of the MDB netlink handlers from the bridge driver to the common rtnetlink code. This allows reusing the existing MDB netlink messages for the configuration of the VXLAN MDB. Patches #7-#9 include more small preparations in the common rtnetlink code and the VXLAN driver. Patch #10 implements the MDB control path in the VXLAN driver, which will allow user space to create, delete, replace and dump MDB entries. Patches #11-#12 implement the MDB data path in the VXLAN driver, allowing it to selectively forward IP multicast traffic according to the matched MDB entry. Patch #13 finally enables MDB support in the VXLAN driver. iproute2 patches can be found here [6]. Note that in order to fully support the specifications in [1] and [2], additional functionality is required from the data path. However, it can be achieved using existing kernel interfaces which is why it is not described here. Changelog ========= Since v1 [7]: Patch #9: Use htons() in 'case' instead of ntohs() in 'switch'. Since RFC [8]: Patch #3: Use NL_ASSERT_DUMP_CTX_FITS(). Patch #3: memset the entire context when moving to the next device. Patch #3: Reset sequence counters when moving to the next device. Patch #3: Use NL_SET_ERR_MSG_ATTR() in rtnl_validate_mdb_entry(). Patch #7: Remove restrictions regarding mixing of multicast and unicast remote destination IPs in an MDB entry. While such configuration does not make sense to me, it is no forbidden by the VXLAN FDB code and does not crash the kernel. Patch #7: Fix check regarding all-zeros MDB entry and source. Patch #11: New patch. [1] https://datatracker.ietf.org/doc/html/rfc9251 [2] https://datatracker.ietf.org/doc/html/draft-ietf-bess-evpn-irb-mcast [3] https://datatracker.ietf.org/doc/html/rfc7432 [4] https://datatracker.ietf.org/doc/html/rfc7432#section-7.2 [5] https://datatracker.ietf.org/doc/html/rfc9251#section-9.1 [6] https://github.com/idosch/iproute2/commits/submit/mdb_vxlan_rfc_v1 [7] https://lore.kernel.org/netdev/20230313145349.3557231-1-idosch@nvidia.com/ [8] https://lore.kernel.org/netdev/20230204170801.3897900-1-idosch@nvidia.com/ ==================== Signed-off-by: David S. Miller commit 62199e3f16583e766f46d1767deca109fd8ea408 Author: Ido Schimmel Date: Wed Mar 15 15:11:55 2023 +0200 selftests: net: Add VXLAN MDB test Add test cases for VXLAN MDB, testing the control and data paths. Two different sets of namespaces (i.e., ns{1,2}_v4 and ns{1,2}_v6) are used in order to test VXLAN MDB with both IPv4 and IPv6 underlays, respectively. Example truncated output: # ./test_vxlan_mdb.sh [...] Tests passed: 620 Tests failed: 0 Signed-off-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 08f876a7d79ed235f90af0373d1e548a71c1f4f6 Author: Ido Schimmel Date: Wed Mar 15 15:11:54 2023 +0200 vxlan: Enable MDB support Now that the VXLAN MDB control and data paths are in place we can expose the VXLAN MDB functionality to user space. Set the VXLAN MDB net device operations to the appropriate functions, thereby allowing the rtnetlink code to reach the VXLAN driver. Signed-off-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 0f83e69f44bf8dc8ab48ff0196b3475c1f0f6c07 Author: Ido Schimmel Date: Wed Mar 15 15:11:53 2023 +0200 vxlan: Add MDB data path support Integrate MDB support into the Tx path of the VXLAN driver, allowing it to selectively forward IP multicast traffic according to the matched MDB entry. If MDB entries are configured (i.e., 'VXLAN_F_MDB' is set) and the packet is an IP multicast packet, perform up to three different lookups according to the following priority: 1. For an (S, G) entry, using {Source VNI, Source IP, Destination IP}. 2. For a (*, G) entry, using {Source VNI, Destination IP}. 3. For the catchall MDB entry (0.0.0.0 or ::), using the source VNI. The catchall MDB entry is similar to the catchall FDB entry (00:00:00:00:00:00) that is currently used to transmit BUM (broadcast, unknown unicast and multicast) traffic. However, unlike the catchall FDB entry, this entry is only used to transmit unregistered IP multicast traffic that is not link-local. Therefore, when configured, the catchall FDB entry will only transmit BULL (broadcast, unknown unicast, link-local multicast) traffic. The catchall MDB entry is useful in deployments where inter-subnet multicast forwarding is used and not all the VTEPs in a tenant domain are members in all the broadcast domains. In such deployments it is advantageous to transmit BULL (broadcast, unknown unicast and link-local multicast) and unregistered IP multicast traffic on different tunnels. If the same tunnel was used, a VTEP only interested in IP multicast traffic would also pull all the BULL traffic and drop it as it is not a member in the originating broadcast domain [1]. If the packet did not match an MDB entry (or if the packet is not an IP multicast packet), return it to the Tx path, allowing it to be forwarded according to the FDB. If the packet did match an MDB entry, forward it to the associated remote VTEPs. However, if the entry is a (*, G) entry and the associated remote is in INCLUDE mode, then skip over it as the source IP is not in its source list (otherwise the packet would have matched on an (S, G) entry). Similarly, if the associated remote is marked as BLOCKED (can only be set on (S, G) entries), then skip over it as well as the remote is in EXCLUDE mode and the source IP is in its source list. [1] https://datatracker.ietf.org/doc/html/draft-ietf-bess-evpn-irb-mcast#section-2.6 Signed-off-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit bc6c6b013ffee36eb555cc0a68aa3d9608e1fad2 Author: Ido Schimmel Date: Wed Mar 15 15:11:52 2023 +0200 vxlan: mdb: Add an internal flag to indicate MDB usage Add an internal flag to indicate whether MDB entries are configured or not. Set the flag after installing the first MDB entry and clear it before deleting the last one. The flag will be consulted by the data path which will only perform an MDB lookup if the flag is set, thereby keeping the MDB overhead to a minimum when the MDB is not used. Another option would have been to use a static key, but it is global and not per-device, unlike the current approach. Signed-off-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit a3a48de5eade770e911d35291217bdd69ce04ef1 Author: Ido Schimmel Date: Wed Mar 15 15:11:51 2023 +0200 vxlan: mdb: Add MDB control path support Implement MDB control path support, enabling the creation, deletion, replacement and dumping of MDB entries in a similar fashion to the bridge driver. Unlike the bridge driver, each entry stores a list of remote VTEPs to which matched packets need to be replicated to and not a list of bridge ports. The motivating use case is the installation of MDB entries by a user space control plane in response to received EVPN routes. As such, only allow permanent MDB entries to be installed and do not implement snooping functionality, avoiding a lot of unnecessary complexity. Since entries can only be modified by user space under RTNL, use RTNL as the write lock. Use RCU to ensure that MDB entries and remotes are not freed while being accessed from the data path during transmission. In terms of uAPI, reuse the existing MDB netlink interface, but add a few new attributes to request and response messages: * IP address of the destination VXLAN tunnel endpoint where the multicast receivers reside. * UDP destination port number to use to connect to the remote VXLAN tunnel endpoint. * VXLAN VNI Network Identifier to use to connect to the remote VXLAN tunnel endpoint. Required when Ingress Replication (IR) is used and the remote VTEP is not a member of originating broadcast domain (VLAN/VNI) [1]. * Source VNI Network Identifier the MDB entry belongs to. Used only when the VXLAN device is in external mode. * Interface index of the outgoing interface to reach the remote VXLAN tunnel endpoint. This is required when the underlay destination IP is multicast (P2MP), as the multicast routing tables are not consulted. All the new attributes are added under the 'MDBA_SET_ENTRY_ATTRS' nest which is strictly validated by the bridge driver, thereby automatically rejecting the new attributes. [1] https://datatracker.ietf.org/doc/html/draft-ietf-bess-evpn-irb-mcast#section-3.2.2 Signed-off-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 6ab271aaad25351ea8587d67c6837678b875eb2c Author: Ido Schimmel Date: Wed Mar 15 15:11:50 2023 +0200 vxlan: Expose vxlan_xmit_one() Given a packet and a remote destination, the function will take care of encapsulating the packet and transmitting it to the destination. Expose it so that it could be used in subsequent patches by the MDB code to transmit a packet to the remote destination(s) stored in the MDB entry. It will allow us to keep the MDB code self-contained, not exposing its data structures to the rest of the VXLAN driver. Signed-off-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit f307c8bf37a346ed3e8b6090b64b4ca8d61e1bcd Author: Ido Schimmel Date: Wed Mar 15 15:11:49 2023 +0200 vxlan: Move address helpers to private headers Move the helpers out of the core C file to the private header so that they could be used by the upcoming MDB code. While at it, constify the second argument of vxlan_nla_get_addr(). Signed-off-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit da654c80a0ebba2e2a0614e017c9bbe57f643fe2 Author: Ido Schimmel Date: Wed Mar 15 15:11:48 2023 +0200 rtnetlink: bridge: mcast: Relax group address validation in common code In the upcoming VXLAN MDB implementation, the 0.0.0.0 and :: MDB entries will act as catchall entries for unregistered IP multicast traffic in a similar fashion to the 00:00:00:00:00:00 VXLAN FDB entry that is used to transmit BUM traffic. In deployments where inter-subnet multicast forwarding is used, not all the VTEPs in a tenant domain are members in all the broadcast domains. It is therefore advantageous to transmit BULL (broadcast, unknown unicast and link-local multicast) and unregistered IP multicast traffic on different tunnels. If the same tunnel was used, a VTEP only interested in IP multicast traffic would also pull all the BULL traffic and drop it as it is not a member in the originating broadcast domain [1]. Prepare for this change by allowing the 0.0.0.0 group address in the common rtnetlink MDB code and forbid it in the bridge driver. A similar change is not needed for IPv6 because the common code only validates that the group address is not the all-nodes address. [1] https://datatracker.ietf.org/doc/html/draft-ietf-bess-evpn-irb-mcast#section-2.6 Signed-off-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit cc7f5022f810cf7bf4f1826dd620656c35942a13 Author: Ido Schimmel Date: Wed Mar 15 15:11:47 2023 +0200 rtnetlink: bridge: mcast: Move MDB handlers out of bridge driver Currently, the bridge driver registers handlers for MDB netlink messages, making it impossible for other drivers to implement MDB support. As a preparation for VXLAN MDB support, move the MDB handlers out of the bridge driver to the core rtnetlink code. The rtnetlink code will call into individual drivers by invoking their previously added MDB net device operations. Note that while the diffstat is large, the change is mechanical. It moves code out of the bridge driver to rtnetlink code. Also note that a similar change was made in 2012 with commit 77162022ab26 ("net: add generic PF_BRIDGE:RTM_ FDB hooks") that moved FDB handlers out of the bridge driver to the core rtnetlink code. Signed-off-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit c009de1061b57162fed206998dcdf8001416a481 Author: Ido Schimmel Date: Wed Mar 15 15:11:46 2023 +0200 bridge: mcast: Implement MDB net device operations Implement the previously added MDB net device operations in the bridge driver so that they could be invoked by core rtnetlink code in the next patch. The operations are identical to the existing br_mdb_{dump,add,del} functions. The '_new' suffix will be removed in the next patch. The functions are re-implemented in this patch to make the conversion in the next patch easier to review. Add dummy implementations when 'CONFIG_BRIDGE_IGMP_SNOOPING' is disabled, so that an error will be returned to user space when it is trying to add or delete an MDB entry. This is consistent with existing behavior where the bridge driver does not even register rtnetlink handlers for RTM_{NEW,DEL,GET}MDB messages when this Kconfig option is disabled. Signed-off-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 8c44fa12c8fa09c6c12f0dc25129a6d13ee0a1ea Author: Ido Schimmel Date: Wed Mar 15 15:11:45 2023 +0200 net: Add MDB net device operations Add MDB net device operations that will be invoked by rtnetlink code in response to received RTM_{NEW,DEL,GET}MDB messages. Subsequent patches will implement these operations in the bridge and VXLAN drivers. Signed-off-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit ec47dcb489ba3313291af7266b058c7df1205c5c Merge: bd7fc6e1957c2 e0c9c2a7dd738 Author: David S. Miller Date: Fri Mar 17 08:01:35 2023 +0000 Merge branch 'J784S4-CPSW9G-bindings' Siddharth Vadapalli says: ==================== Add J784S4 CPSW9G NET Bindings This series cleans up the bindings by reordering the compatibles, followed by adding the bindings for CPSW9G instance of CPSW Ethernet Switch on TI's J784S4 SoC. ==================== Signed-off-by: David S. Miller commit e0c9c2a7dd738120c2fbc155c6fba1066f109be0 Author: Siddharth Vadapalli Date: Wed Mar 15 13:29:48 2023 +0530 dt-bindings: net: ti: k3-am654-cpsw-nuss: Add J784S4 CPSW9G support Update bindings for TI K3 J784S4 SoC which contains 9 ports (8 external ports) CPSW9G module and add compatible for it. Signed-off-by: Siddharth Vadapalli Signed-off-by: David S. Miller commit 40235edeadf58e4232bfcf8bf15be453cfe233b7 Author: Siddharth Vadapalli Date: Wed Mar 15 13:29:47 2023 +0530 dt-bindings: net: ti: k3-am654-cpsw-nuss: Fix compatible order Reorder compatibles to follow alphanumeric order. Signed-off-by: Siddharth Vadapalli Signed-off-by: David S. Miller commit bd7fc6e1957c2102866f9e464c1f2302e891b7e9 Author: Shradha Gupta Date: Wed Mar 15 04:55:13 2023 -0700 net: mana: Add new MANA VF performance counters for easier troubleshooting Extended performance counter stats in 'ethtool -S ' output for MANA VF to facilitate troubleshooting. Tested-on: Ubuntu22 Signed-off-by: Shradha Gupta Signed-off-by: David S. Miller commit 81dc07417f0f82cd8f9733a1a3ebc2a473423e86 Author: Mengyuan Lou Date: Wed Mar 15 15:43:04 2023 +0800 net: wangxun: Implement the ndo change mtu interface Add ngbe and txgbe ndo_change_mtu support. Signed-off-by: Mengyuan Lou Signed-off-by: David S. Miller commit c36a77c33db36277ca33b6a2fa5f802ba93694f7 Author: Luiz Angelo Daros de Luca Date: Wed Mar 15 00:49:22 2023 -0300 net: dsa: realtek: rtl8365mb: add change_mtu The rtl8365mb was using a fixed MTU size of 1536, which was probably inspired by the rtl8366rb's initial frame size. However, unlike that family, the rtl8365mb family can specify the max frame size in bytes, rather than in fixed steps. DSA calls change_mtu for the CPU port once the max MTU value among the ports changes. As the max frame size is defined globally, the switch is configured only when the call affects the CPU port. The available specifications do not directly define the max supported frame size, but it mentions a 16k limit. This driver will use the 0x3FFF limit as it is used in the vendor API code. However, the switch sets the max frame size to 16368 bytes (0x3FF0) after it resets. change_mtu uses MTU size, or ethernet payload size, while the switch works with frame size. The frame size is calculated considering the ethernet header (14 bytes), a possible 802.1Q tag (4 bytes), the payload size (MTU), and the Ethernet FCS (4 bytes). The CPU tag (8 bytes) is consumed before the switch enforces the limit. During setup, the driver will use the default 1500-byte MTU of DSA to set the maximum frame size. The current sum will be VLAN_ETH_HLEN+1500+ETH_FCS_LEN, which results in 1522 bytes. Although it is lower than the previous initial value of 1536 bytes, the driver will increase the frame size for a larger MTU. However, if something requires more space without increasing the MTU, such as QinQ, we would need to add the extra length to the rtl8365mb_port_change_mtu() formula. MTU was tested up to 2018 (with 802.1Q) as that is as far as mt7620 (where rtl8367s is stacked) can go. The register was manually manipulated byte-by-byte to ensure the MTU to frame size conversion was correct. For frames without 802.1Q tag, the frame size limit will be 4 bytes over the required size. There is a jumbo register, enabled by default at 6k frame size. However, the jumbo settings do not seem to limit nor expand the maximum tested MTU (2018), even when jumbo is disabled. More tests are needed with a device that can handle larger frames. Signed-off-by: Luiz Angelo Daros de Luca Reviewed-by: Alexander Duyck Reviewed-by: Alvin Šipraga Signed-off-by: David S. Miller commit f4a8e711a66bd03681d61949181223c3437d5a87 Author: Sumitra Sharma Date: Thu Mar 16 22:24:55 2023 -0700 Staging: octeon: Fix line ending with '(' Since the coding style limited the code to 80 columns per line which caused splitting the function header into two lines resulted in the first line ending with a '('. This caused the checkpatch error. Place the function parameters immediately after '(' in a single line to align the function header. Signed-off-by: Sumitra Sharma Link: https://lore.kernel.org/r/20230317052455.GA83442@sumitra.com Signed-off-by: Greg Kroah-Hartman commit 752cbd8f191678e86aa754f795546b7f06b7f171 Author: Khadija Kamran Date: Fri Mar 17 01:09:00 2023 +0500 staging: axis-fifo: initialize timeouts in init only Initialize the module parameters, read_timeout and write_timeout once in init(). Module parameters can only be set once and cannot be modified later, so we don't need to evaluate them again when passing the parameters to wait_event_interruptible_timeout(). Convert datatype of {read,write}_timeout from 'int' to 'long int' because implicit conversion of 'long int' to 'int' in statement '{read,write}_timeout = MAX_SCHEDULE_TIMEOUT' results in an overflow. Change format specifier for {read,write}_timeout from %i to %li. Reviewed-by: Fabio M. De Francesco Suggested-by: Greg Kroah-Hartman Signed-off-by: Khadija Kamran Link: https://lore.kernel.org/r/ZBN3XAsItCiTk7CV@khadija-virtual-machine Signed-off-by: Greg Kroah-Hartman commit 5001d664e328b4a07e2377f09d7a6871ce12bc01 Author: Michael Straube Date: Fri Mar 17 07:50:41 2023 +0100 staging: vt6655: remove unused bb_power_save_mode_off() function The function bb_power_save_mode_off() is not used anywhere, remove it. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20230317065041.16635-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit d32a62ac84c2a3169b5686715280997e76a18549 Author: Michael Straube Date: Fri Mar 17 07:50:40 2023 +0100 staging: vt6655: remove unused bb_power_save_mode_on() function The function bb_power_save_mode_on() is not used anywhere, remove it. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20230317065041.16635-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit aae9567a74878e5bb2bc084f6dee732f8d713e6b Author: Michael Straube Date: Fri Mar 17 07:48:00 2023 +0100 staging: vt6656: remove unused vnt_get_current_tsf() function The function vnt_get_current_tsf() is not used anywhere, remove it. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20230317064800.12276-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 94bbbdfbde165820e4078ffe9a78305d556dec35 Merge: 082cdc69a4651 5640b6d894342 Author: Alexei Starovoitov Date: Thu Mar 16 22:20:09 2023 -0700 Merge branch 'double-fix bpf_test_run + XDP_PASS recycling' Alexander Lobakin says: ==================== Enabling skb PP recycling revealed a couple issues in the bpf_test_run code. Recycling broke the assumption that the headroom won't ever be touched during the test_run execution: xdp_scrub_frame() invalidates the XDP frame at the headroom start, while neigh xmit code overwrites 2 bytes to the left of the Ethernet header. The first makes the kernel panic in certain cases, while the second breaks xdp_do_redirect selftest on BE. test_run is a limited-scope entity, so let's hope no more corner cases will happen here or at least they will be as easy and pleasant to fix as those two. ==================== Signed-off-by: Alexei Starovoitov commit 5640b6d894342d153b719644681b0345fd28ee96 Author: Alexander Lobakin Date: Thu Mar 16 18:50:51 2023 +0100 selftests/bpf: fix "metadata marker" getting overwritten by the netstack Alexei noticed xdp_do_redirect test on BPF CI started failing on BE systems after skb PP recycling was enabled: test_xdp_do_redirect:PASS:prog_run 0 nsec test_xdp_do_redirect:PASS:pkt_count_xdp 0 nsec test_xdp_do_redirect:PASS:pkt_count_zero 0 nsec test_xdp_do_redirect:FAIL:pkt_count_tc unexpected pkt_count_tc: actual 220 != expected 9998 test_max_pkt_size:PASS:prog_run_max_size 0 nsec test_max_pkt_size:PASS:prog_run_too_big 0 nsec close_netns:PASS:setns 0 nsec #289 xdp_do_redirect:FAIL Summary: 270/1674 PASSED, 30 SKIPPED, 1 FAILED and it doesn't happen on LE systems. Ilya then hunted it down to: #0 0x0000000000aaeee6 in neigh_hh_output (hh=0x83258df0, skb=0x88142200) at linux/include/net/neighbour.h:503 #1 0x0000000000ab2cda in neigh_output (skip_cache=false, skb=0x88142200, n=) at linux/include/net/neighbour.h:544 #2 ip6_finish_output2 (net=net@entry=0x88edba00, sk=sk@entry=0x0, skb=skb@entry=0x88142200) at linux/net/ipv6/ip6_output.c:134 #3 0x0000000000ab4cbc in __ip6_finish_output (skb=0x88142200, sk=0x0, net=0x88edba00) at linux/net/ipv6/ip6_output.c:195 #4 ip6_finish_output (net=0x88edba00, sk=0x0, skb=0x88142200) at linux/net/ipv6/ip6_output.c:206 xdp_do_redirect test places a u32 marker (0x42) right before the Ethernet header to check it then in the XDP program and return %XDP_ABORTED if it's not there. Neigh xmit code likes to round up hard header length to speed up copying the header, so it overwrites two bytes in front of the Eth header. On LE systems, 0x42 is one byte at `data - 4`, while on BE it's `data - 1`, what explains why it happens only there. It didn't happen previously due to that %XDP_PASS meant the page will be discarded and replaced by a new one, but now it can be recycled as well, while bpf_test_run code doesn't reinitialize the content of recycled pages. This mark is limited to this particular test and its setup though, so there's no need to predict 1000 different possible cases. Just move it 4 bytes to the left, still keeping it 32 bit to match on more bytes. Fixes: 9c94bbf9a87b ("xdp: recycle Page Pool backed skbs built from XDP frames") Reported-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/CAADnVQ+B_JOU+EpP=DKhbY9yXdN6GiRPnpTTXfEZ9sNkUeb-yQ@mail.gmail.com Reported-by: Ilya Leoshkevich # + debugging Link: https://lore.kernel.org/bpf/8341c1d9f935f410438e79d3bd8a9cc50aefe105.camel@linux.ibm.com Signed-off-by: Alexander Lobakin Acked-by: Toke Høiland-Jørgensen Tested-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230316175051.922550-3-aleksander.lobakin@intel.com Signed-off-by: Alexei Starovoitov commit e5995bc7e2ba1a0d444f806016d2e4ea91c032d0 Author: Alexander Lobakin Date: Thu Mar 16 18:50:50 2023 +0100 bpf, test_run: fix crashes due to XDP frame overwriting/corruption syzbot and Ilya faced the splats when %XDP_PASS happens for bpf_test_run after skb PP recycling was enabled for {__,}xdp_build_skb_from_frame(): BUG: kernel NULL pointer dereference, address: 0000000000000d28 RIP: 0010:memset_erms+0xd/0x20 arch/x86/lib/memset_64.S:66 [...] Call Trace: __finalize_skb_around net/core/skbuff.c:321 [inline] __build_skb_around+0x232/0x3a0 net/core/skbuff.c:379 build_skb_around+0x32/0x290 net/core/skbuff.c:444 __xdp_build_skb_from_frame+0x121/0x760 net/core/xdp.c:622 xdp_recv_frames net/bpf/test_run.c:248 [inline] xdp_test_run_batch net/bpf/test_run.c:334 [inline] bpf_test_run_xdp_live+0x1289/0x1930 net/bpf/test_run.c:362 bpf_prog_test_run_xdp+0xa05/0x14e0 net/bpf/test_run.c:1418 [...] This happens due to that it calls xdp_scrub_frame(), which nullifies xdpf->data. bpf_test_run code doesn't reinit the frame when the XDP program doesn't adjust head or tail. Previously, %XDP_PASS meant the page will be released from the pool and returned to the MM layer, but now it does return to the Pool with the nullified xdpf->data, which doesn't get reinitialized then. So, in addition to checking whether the head and/or tail have been adjusted, check also for a potential XDP frame corruption. xdpf->data is 100% affected and also xdpf->flags is the field closest to the metadata / frame start. Checking for these two should be enough for non-extreme cases. Fixes: 9c94bbf9a87b ("xdp: recycle Page Pool backed skbs built from XDP frames") Reported-by: syzbot+e1d1b65f7c32f2a86a9f@syzkaller.appspotmail.com Link: https://lore.kernel.org/bpf/000000000000f1985705f6ef2243@google.com Reported-by: Ilya Leoshkevich Link: https://lore.kernel.org/bpf/e07dd94022ad5731705891b9487cc9ed66328b94.camel@linux.ibm.com Signed-off-by: Alexander Lobakin Acked-by: Toke Høiland-Jørgensen Tested-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20230316175051.922550-2-aleksander.lobakin@intel.com Signed-off-by: Alexei Starovoitov commit e05c006dac08ef346fc5e223f6f14cc2c6c96a7b Merge: d43250ed0fec6 1ea41edd88f22 Author: Martin K. Petersen Date: Thu Mar 16 23:55:19 2023 -0400 Merge patch series "mpi3mr: Few Enhancements and minor fixes" Ranjan Kumar says: Few Enhancements and minor fixes of mpi3mr driver. Link: https://lore.kernel.org/r/20230316110209.60145-1-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit 1ea41edd88f22077a9f86f45f2eca5663bbcfd3e Author: Ranjan Kumar Date: Thu Mar 16 16:32:09 2023 +0530 scsi: mpi3mr: Update driver version to 8.4.1.0.0 Update driver version to 8.4.1.0.0. Signed-off-by: Ranjan Kumar Signed-off-by: Sreekanth Reddy Link: https://lore.kernel.org/r/20230316110209.60145-9-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit e74f2fbd8b06e57c60ad4b92ea302a11671ac634 Author: Ranjan Kumar Date: Thu Mar 16 16:32:08 2023 +0530 scsi: mpi3mr: Update copyright year Update copyright year from 2022 to 2023. Signed-off-by: Ranjan Kumar Signed-off-by: Sreekanth Reddy Link: https://lore.kernel.org/r/20230316110209.60145-8-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit 80b8fd0231d5c04a4a7d3442c243a4c93fac4fe4 Author: Ranjan Kumar Date: Thu Mar 16 16:32:07 2023 +0530 scsi: mpi3mr: Fix W=1 compilation warnings Fix W=1 compilation warnings. Signed-off-by: Ranjan Kumar Signed-off-by: Sreekanth Reddy Link: https://lore.kernel.org/r/20230316110209.60145-7-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit e5f596bc25925e33bb4da8bc7976ecd808e9f6d0 Author: Ranjan Kumar Date: Thu Mar 16 16:32:06 2023 +0530 scsi: mpi3mr: Update MPI Headers to revision 27 Update MPI Headers to revision 27. Signed-off-by: Ranjan Kumar Signed-off-by: Sreekanth Reddy Link: https://lore.kernel.org/r/20230316110209.60145-6-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit f1dec6b1e25e755cbccb728eee898fc7d005069e Author: Ranjan Kumar Date: Thu Mar 16 16:32:05 2023 +0530 scsi: mpi3mr: Avoid escalating to higher level reset when target is removed SCSI error handling has taken place for timed out I/Os on a drive and the corresponding drive is removed. Stop escalating to higher level of reset by returning the TUR with "I_T NEXUS LOSS OCCURRED" sense key. Signed-off-by: Ranjan Kumar Signed-off-by: Sreekanth Reddy Link: https://lore.kernel.org/r/20230316110209.60145-5-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit 22beef38e52c69488a0633806a136c40c4ff8ca2 Author: Ranjan Kumar Date: Thu Mar 16 16:32:04 2023 +0530 scsi: mpi3mr: Modify MUR timeout value to 120 seconds Modify Message Unit Reset timeout value to 120 seconds from the previous value of 30 seconds. Signed-off-by: Ranjan Kumar Signed-off-by: Sreekant Reddy Link: https://lore.kernel.org/r/20230316110209.60145-4-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit 23b3d1cf157299d4786e7fd0f5888beb47ce86d1 Author: Ranjan Kumar Date: Thu Mar 16 16:32:03 2023 +0530 scsi: mpi3mr: Fix admin queue memory leak upon soft reset After a soft reset, while setting up admin queue pairs, the driver initially sets admin request base and admin reply base addresses to NULL. This leads to DMA memory pointed by these pointers getting leaked. Signed-off-by: Ranjan Kumar Signed-off-by: Sreekanth Reddy Link: https://lore.kernel.org/r/20230316110209.60145-3-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit 3f1254ed01d0860d72eead408b4fb0f38858219e Author: Ranjan Kumar Date: Thu Mar 16 16:32:02 2023 +0530 scsi: mpi3mr: Successive VD delete and add causes FW fault Upon Virtual disk removal, firmware sends device status change event (Virtual disk remove event) and expects the driver to start device remove handshake (by sending target reset and IOU control command to firmware). However, the driver does not initiate the device remove handshake which leads to the firmware fault. Signed-off-by: Ranjan Kumar Signed-off-by: Sreekanth Reddy Link: https://lore.kernel.org/r/20230316110209.60145-2-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit d43250ed0fec61a8026019b218953328f239ccd0 Author: Krzysztof Kozlowski Date: Fri Mar 10 22:44:35 2023 +0100 scsi: ufs: hisi: Drop of_match_ptr() for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr() does not make any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). drivers/ufs/host/ufs-hisi.c:561:34: error: ‘ufs_hisi_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310214435.275127-3-krzysztof.kozlowski@linaro.org Signed-off-by: Martin K. Petersen commit cd6a6893ac055dab9c21c39ef20293094d38045b Author: Krzysztof Kozlowski Date: Fri Mar 10 22:44:34 2023 +0100 scsi: ufs: exynos: Drop of_match_ptr() for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr() does not make any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). drivers/ufs/host/ufs-exynos.c:1738:34: error: ‘exynos_ufs_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310214435.275127-2-krzysztof.kozlowski@linaro.org Reviewed-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit dd3f53301181dece3fb377173bff9902cdba0ba7 Author: Krzysztof Kozlowski Date: Fri Mar 10 22:44:33 2023 +0100 scsi: ufs: qcom: Add __maybe_unused to OF ID table The driver can be built on ACPI and its .of_match_table uses of_match_ptr(), thus annotate the actual table as maybe unused. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310214435.275127-1-krzysztof.kozlowski@linaro.org Reviewed-by: Konrad Dybcio Signed-off-by: Martin K. Petersen commit 06f8e0714c9f617dcc40db63b8376a1e547d9531 Author: Rob Herring Date: Fri Mar 10 08:47:23 2023 -0600 scsi: qlogicpti: sun_esp: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property()/of_find_property() functions for reading properties. Convert reading boolean properties to of_property_read_bool(). Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144723.1544999-1-robh@kernel.org Signed-off-by: Martin K. Petersen commit c5797fda210fc852f876f0660e959b5e9db604d8 Merge: e943e97ca9b94 075a5d356103b Author: Martin K. Petersen Date: Thu Mar 16 23:41:00 2023 -0400 Merge patch series "add virtual remote fabric" Dmitry Bogdanov says: The patchset is based on 6.4/scsi-staging branch. The first 11 patches are just a refactoring to reduce code duplication in fabric drivers. They make several callouts be optional in fabric ops. Make a default implementation of the optional ops and remove such implementations in the fabric drivers. The last patch is a new virtual remote fabric driver. It has a valueble sence with patchset "scsi: target: make RTPI an TPG identifier" to configure RPTI on remote/tpgt_x same as on tpgt_y on other nodes in a storage cluster. That allows to report the same ports in RTPG from each node and to have a clusterwide tpg/acl/lun view in kernel. Link: https://lore.kernel.org/r/20230313181110.20566-1-d.bogdanov@yadro.com Signed-off-by: Martin K. Petersen commit 075a5d356103b32bc7023b03ede60a2f183bcfb3 Author: Dmitry Bogdanov Date: Mon Mar 13 21:11:10 2023 +0300 scsi: target: Add virtual remote target Create virtual remote target module. This can be used to see a whole ACL/LUN/TPG configuration from all nodes in storage cluster. For example, it permits setting up remote ports in ALUA port groups. To report all ports in a cluster in REPORT TARGET PORT GROUP command. Suggested-by: Konstantin Shelekhin Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230313181110.20566-13-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit df02beb9afd246a41c70c62de9c186464e10282a Author: Dmitry Bogdanov Date: Mon Mar 13 21:11:09 2023 +0300 scsi: efct: Remove default fabric ops callouts Remove callouts that are identical to the default implementations in TCM Core. Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230313181110.20566-12-d.bogdanov@yadro.com Signed-off-by: Martin K. Petersen commit 237f109ceee7d5d83649f0e5d90c87856328def8 Author: Dmitry Bogdanov Date: Mon Mar 13 21:11:08 2023 +0300 scsi: qla2xxx: Remove default fabric ops callouts Remove callouts that are identical to the default implementations in TCM Core. Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230313181110.20566-11-d.bogdanov@yadro.com Signed-off-by: Martin K. Petersen commit 355c3d61357a857c326b82c9221142e5dad8d530 Author: Dmitry Bogdanov Date: Mon Mar 13 21:11:07 2023 +0300 scsi: xen-scsiback: Remove default fabric ops callouts Remove callouts that are identical to the default implementations in TCM Core. Acked-by: Juergen Gross Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230313181110.20566-10-d.bogdanov@yadro.com Signed-off-by: Martin K. Petersen commit 22ebaf61ecbcfc3f499a83c8bc11196e131938b2 Author: Dmitry Bogdanov Date: Mon Mar 13 21:11:06 2023 +0300 scsi: vhost-scsi: Remove default fabric ops callouts Remove callouts that are identical to the default implementations in TCM Core. Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230313181110.20566-9-d.bogdanov@yadro.com Signed-off-by: Martin K. Petersen commit 55a42c313ec9003f5fec265dba7de655ac3840d4 Author: Dmitry Bogdanov Date: Mon Mar 13 21:11:05 2023 +0300 scsi: usb: gadget: f_tcm: Remove default fabric ops callouts Remove callouts that are identical to the default implementations in TCM Core. Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230313181110.20566-8-d.bogdanov@yadro.com Acked-by: Greg Kroah-Hartman Signed-off-by: Martin K. Petersen commit 515509855d1fad459236deb95c074f837019c01c Author: Dmitry Bogdanov Date: Mon Mar 13 21:11:04 2023 +0300 scsi: target: fcoe: Remove default fabric ops callouts Remove callouts that are identical to the default implementations in TCM Core. Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230313181110.20566-7-d.bogdanov@yadro.com Signed-off-by: Martin K. Petersen commit c9593f4856f3f39f28609a16cbc9778da4272046 Author: Dmitry Bogdanov Date: Mon Mar 13 21:11:03 2023 +0300 scsi: target: sbp: Remove default fabric ops callouts Remove callouts that are identical to the default implementations in TCM Core. Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230313181110.20566-6-d.bogdanov@yadro.com Signed-off-by: Martin K. Petersen commit 2af6800f2135b5e824c2b0d02d0415010372ca64 Author: Dmitry Bogdanov Date: Mon Mar 13 21:11:02 2023 +0300 scsi: target: loop: Remove default fabric ops callouts Remove callouts that are identical to the default implementations in TCM Core. Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230313181110.20566-5-d.bogdanov@yadro.com Signed-off-by: Martin K. Petersen commit 8ff1c3623d06f4938566eb98e632d493b7f86ff4 Author: Dmitry Bogdanov Date: Mon Mar 13 21:11:01 2023 +0300 scsi: ibmvscsit: Remove default fabric ops callouts Remove callouts that are identical to the default implementations in TCM Core. Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230313181110.20566-4-d.bogdanov@yadro.com Signed-off-by: Martin K. Petersen commit aafa9bdd4d68cb7c71de3c87e35087ce52f7cb23 Author: Dmitry Bogdanov Date: Mon Mar 13 21:11:00 2023 +0300 scsi: infiniband: srpt: Remove default fabric ops callouts Remove callouts that are identical to the default implementations in TCM Core. Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230313181110.20566-3-d.bogdanov@yadro.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit e5dc6e445c38b93674b88ff37f0d4ce6752afd93 Author: Dmitry Bogdanov Date: Mon Mar 13 21:10:59 2023 +0300 scsi: target: Add default fabric ops callouts There are several callouts in target fabric ops that most of fabric drivers fill with a function returning the same value. Stop requiring such callouts to exist in the ops, fill them in TCM Core. Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230313181110.20566-2-d.bogdanov@yadro.com Signed-off-by: Martin K. Petersen commit e943e97ca9b94fc7d222465c48598dd417b599d8 Merge: 4a52338bf288c 548ebb335f743 Author: Martin K. Petersen Date: Thu Mar 16 23:26:31 2023 -0400 Merge patch series "scsi_debug: Some minor improvements" John Garry says: This series contains a bunch of minor improvements to the driver. I have another bunch waiting with more major changes. Most of the changes are quite straightforward, and the only patches of note are as follows: - Fix the command abort feature, enabled with host option SDEBUG_OPT_CMD_ABORT. - Drop driver count of queued commands per device. - Add poll mode completions to statistics. We already have poll mode callback call count, so maybe it was intentional to omit poll mode from the statistics. Link: https://lore.kernel.org/r/20230313093114.1498305-1-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit 548ebb335f743fa2647fe61bb1ad29d2c706afda Author: John Garry Date: Mon Mar 13 09:31:14 2023 +0000 scsi: scsi_debug: Add poll mode deferred completions to statistics Currently commands completed via poll mode are not included in the statistics gathering for deferred completions and missed CPUs. Poll mode completions should be treated the same as other deferred completion types, so add poll mode completions to the statistics. Signed-off-by: John Garry Acked-by: Douglas Gilbert Link: https://lore.kernel.org/r/20230313093114.1498305-12-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit f037b5cb07138cd519f35fd08ebef2faf075959f Author: John Garry Date: Mon Mar 13 09:31:13 2023 +0000 scsi: scsi_debug: Get command abort feature working again The command abort feature allows us to test aborting a command which has timed-out. The idea is that for specific commands we just don't call scsi_done() and allow the request to timeout, which ensures SCSI EH kicks-in we try to abort the command. Since commit 4a0c6f432d15 ("scsi: scsi_debug: Add new defer type for mq_poll") this does not seem to work. The issue is that we clear the sd_dp->aborted flag in schedule_resp() before the completion callback has run. When the completion callback actually runs, it calls scsi_done() as normal as sd_dp->aborted unset. This is all very racy. Fix by not clearing sd_dp->aborted in schedule_resp(). Also move the call to blk_abort_request() from schedule_resp() to sdebug_q_cmd_complete(), which makes the code have a more logical sequence. I also note that this feature only works for commands which are classed as "SDEG_RES_IMMED_MASK", but only practically triggered with prior RW commands. So for my experiment I need to run fio to trigger the error on the "nth" command (see inject_on_this_cmd()), and then run something like sg_sync to queue a command to actually trigger the abort. Signed-off-by: John Garry Acked-by: Douglas Gilbert Link: https://lore.kernel.org/r/20230313093114.1498305-11-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit 151f0ec9ddb539c403a17c86da092e751736c121 Author: John Garry Date: Mon Mar 13 09:31:12 2023 +0000 scsi: scsi_debug: Drop sdebug_dev_info.num_in_q In schedule_resp(), under certain conditions we check whether the per-device queue is full (num_in_q == queue depth - 1) and we may inject a "task set full" (TSF) error if it is. However how we read num_in_q is racy - many threads may see the same "queue is full" value (and also issue a TSF). There is per-queue locking in reading per-device num_in_q, but that would not help. Replace how we read num_in_q at this location with a call to scsi_device_busy(). Calling scsi_device_busy() is likewise racy (as reading num_in_q), so nothing lost or gained. Calling scsi_device_busy() is also slow as it needs to read all bits in the per-device budget bitmap, but we can live with that since we're just a simulator and it's only under a certain configs which we would see this. Also move the "task set full" print earlier as it would only be called now under this condition. However, previously it may not have been called - like returning early - but keep it simple and always call it. At this point we can drop sdebug_dev_info.num_in_q - it is difficult to maintain properly and adds extra normal case command processing. Signed-off-by: John Garry Acked-by: Douglas Gilbert Link: https://lore.kernel.org/r/20230313093114.1498305-10-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit 0befb8790969087946f5726d8d80b4f83053ea21 Author: John Garry Date: Mon Mar 13 09:31:11 2023 +0000 scsi: scsi_debug: Drop check for num_in_q exceeding queue depth The per-device num_in_q value cannot exceed the device queue depth, so drop the check. Signed-off-by: John Garry Acked-by: Douglas Gilbert Link: https://lore.kernel.org/r/20230313093114.1498305-9-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit 9c2303820bf033f798fe14a856d7df431640001b Author: John Garry Date: Mon Mar 13 09:31:10 2023 +0000 scsi: scsi_debug: Drop scsi_debug_host_reset() device NULL pointer check The check for device pointer for the SCSI command is unnecessary, so drop it. The only caller is scsi_try_host_reset() -> eh_host_reset_handler(), and there that pointer cannot be NULL. Indeed, there is already code later in the same function which does not check the device pointer for the SCSI command. Signed-off-by: John Garry Acked-by: Douglas Gilbert Link: https://lore.kernel.org/r/20230313093114.1498305-8-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit 519bfc14c156f31cc113709c71e7f66e0f6f228e Author: John Garry Date: Mon Mar 13 09:31:09 2023 +0000 scsi: scsi_debug: Drop scsi_debug_bus_reset() NULL pointer checks The checks for SCSI cmnd, SCSI device, and SCSI host are unnecessary, so drop them. Likewise, drop the NULL check for sdbg_host. The only caller is scsi_try_bus_reset() -> eh_bus_reset_handler(), and there those pointers cannot be NULL. Signed-off-by: John Garry Acked-by: Douglas Gilbert Link: https://lore.kernel.org/r/20230313093114.1498305-7-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit a15df530a189fcc62003df7a7272b2918a9ef73a Author: John Garry Date: Mon Mar 13 09:31:08 2023 +0000 scsi: scsi_debug: Drop scsi_debug_target_reset() NULL pointer checks The checks for SCSI cmnd, SCSI device, and SCSI host are unnecessary, so drop them. Likewise, drop the NULL check for sdbg_host. The only caller is scsi_try_target_reset() -> eh_target_reset_handler(), and there those pointers cannot be NULL. Signed-off-by: John Garry Acked-by: Douglas Gilbert Link: https://lore.kernel.org/r/20230313093114.1498305-6-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit a19226f844c247bd5d5ef11df4152c5ab71a59fb Author: John Garry Date: Mon Mar 13 09:31:07 2023 +0000 scsi: scsi_debug: Drop scsi_debug_device_reset() NULL pointer checks The SCSI cmnd pointer arg would never be NULL, so drop the check. In addition, its SCSI device pointer would never be NULL (so drop that check also). The only caller is scsi_try_bus_device_reset(), and the command and its device pointer could not be NULL when calling eh_device_reset_handler() there. Signed-off-by: John Garry Acked-by: Douglas Gilbert Link: https://lore.kernel.org/r/20230313093114.1498305-5-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit 06be9fbebb1beb6a885c95fbe3bb2f05f3463a70 Author: John Garry Date: Mon Mar 13 09:31:06 2023 +0000 scsi: scsi_debug: Drop scsi_debug_abort() NULL pointer checks The SCSI cmnd pointer arg would never be NULL, so drop the check. In addition, its SCSI device pointer would never be NULL. The only caller is scsi_send_eh_cmnd() -> scsi_abort_eh_cmnd() -> scsi_try_to_abort_cmd() -> scsi_try_to_abort_cmd(), and in the origin of that chain those pointers cannot be NULL. Signed-off-by: John Garry Acked-by: Douglas Gilbert Link: https://lore.kernel.org/r/20230313093114.1498305-4-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit d280a4ef229c0def06f6641183fb92100b410c63 Author: John Garry Date: Mon Mar 13 09:31:05 2023 +0000 scsi: scsi_debug: Stop setting devip->sdbg_host twice In sdebug_device_create(), the devip->sdbg_host pointer is needlessly set twice, so stop doing that. Signed-off-by: John Garry Acked-by: Douglas Gilbert Link: https://lore.kernel.org/r/20230313093114.1498305-3-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit 785d6b7cf300637c684e5c7b7c186b01d8a4cf28 Author: John Garry Date: Mon Mar 13 09:31:04 2023 +0000 scsi: scsi_debug: Don't hold driver host struct pointer in host->hostdata[] This driver stores just a pointer to the driver host structure in host->hostdata[]. Most other drivers actually have the driver host structure allocated in host->hostdata[], but this driver is different as we allocate that memory separately before allocating the shost memory. However there is no need to allocate this memory only in host->hostdata[] when we can already look up the driver host structure from shost->dma_dev, so add a macro for this - shost_to_sdebug_host(). Rename to_sdebug_host() -> dev_to_sdebug_host() to avoid ambiguity. Also remove a check for !sdbg_host in find_build_dev_info(), as this cannot be true. Other similar checks will be later removed. Signed-off-by: John Garry Link: https://lore.kernel.org/r/20230313093114.1498305-2-john.g.garry@oracle.com Acked-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit e6af5c0c4d32a27e04a56f29aad587e03ff427f1 Author: Herbert Xu Date: Sat Mar 11 17:09:25 2023 +0800 crypto: stm32 - Save and restore between each request The Crypto API hashing paradigm requires the hardware state to be exported between *each* request because multiple unrelated hashes may be processed concurrently. The stm32 hardware is capable of producing the hardware hashing state but it was only doing it in the export function. This is not only broken for export as you can't export a kernel pointer and reimport it, but it also means that concurrent hashing was fundamentally broken. Fix this by moving the saving and restoring of hardware hash state between each and every hashing request. Fixes: 8a1012d3f2ab ("crypto: stm32 - Support for STM32 HASH module") Reported-by: Li kunyu Signed-off-by: Herbert Xu Reviewed-by: Linus Walleij Tested-by: Linus Walleij Signed-off-by: Herbert Xu commit 9fa4298a95ec42cb63dc5aaf2a8656bb23adf280 Author: Herbert Xu Date: Sat Mar 11 17:09:23 2023 +0800 crypto: stm32 - Fix empty message processing Change the emptymsg check in stm32_hash_copy_hash to rely on whether we have any existing hash state, rather than whether this particular update request is empty. Also avoid computing the hash for empty messages as this could hang. Signed-off-by: Herbert Xu Reviewed-by: Linus Walleij Tested-by: Linus Walleij Signed-off-by: Herbert Xu commit 0280261f1f253d641bbd953247acfcfcad772e33 Author: Herbert Xu Date: Sat Mar 11 17:09:21 2023 +0800 crypto: stm32 - Remove unused HASH_FLAGS_ERRORS The bit HASH_FLAGS_ERRORS was never used. Remove it. Reviewed-by: Linus Walleij Tested-by: Linus Walleij Signed-off-by: Herbert Xu commit c0c5d6428b3888b6d6931afc11f94d1f79a25356 Author: Herbert Xu Date: Sat Mar 11 17:09:19 2023 +0800 crypto: stm32 - Move hash state into separate structure Create a new struct stm32_hash_state so that it may be exported in future instead of the entire request context. Reviewed-by: Linus Walleij Tested-by: Linus Walleij Signed-off-by: Herbert Xu commit cfac232d4d86c4458787ea92b1b1d99225c6f29e Author: Herbert Xu Date: Sat Mar 11 17:09:17 2023 +0800 crypto: stm32 - Remove unused hdev->err field The variable hdev->err is never read so it can be removed. Also remove a spurious inclusion of linux/crypto.h. Reviewed-by: Linus Walleij Tested-by: Linus Walleij Signed-off-by: Herbert Xu commit 32e55d0333daf4d2bfee8e4df75134312d6d3845 Author: Herbert Xu Date: Sat Mar 11 17:09:15 2023 +0800 crypto: stm32 - Simplify finup The current finup code is unnecessarily convoluted. There is no need to call update and final separately as update already does all the necessary work on its own. Simplify this by utilising the HASH_FLAGS_FINUP bit in rctx to indicate only finup and use the HASH_FLAGS_FINAL bit instead to signify processing common to both final and finup. Reviewed-by: Linus Walleij Tested-by: Linus Walleij Signed-off-by: Herbert Xu commit 34f39da79b49fd52f615e92751a6a64e67ef934a Author: Herbert Xu Date: Sat Mar 11 17:09:13 2023 +0800 crypto: stm32 - Move polling into do_one_request There is no need to poll separate for update and final. We could merge them into do_one_request. Also fix the error handling so that we don't poll (and overwrite the error) when an error has already occurred. Reviewed-by: Linus Walleij Tested-by: Linus Walleij Signed-off-by: Herbert Xu commit 6bf6b6438fad0f1da5c4000f4a1e2fd81c05aa6b Author: Herbert Xu Date: Sat Mar 11 17:09:10 2023 +0800 crypto: stm32 - Save 54 CSR registers The CSR registers go from 0 to 53. So the number of registers should be 54. Reviewed-by: Linus Walleij Tested-by: Linus Walleij Signed-off-by: Herbert Xu commit 68629182cd54ad5cf8e501a95e2906c8eea0731c Author: Luis Chamberlain Date: Fri Mar 10 15:21:50 2023 -0800 crypto: fips - simplify one-level sysctl registration for crypto_sysctl_table There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Signed-off-by: Herbert Xu commit 75f3d950054389e2556277e42170e37dd97cd872 Author: Krzysztof Kozlowski Date: Fri Mar 10 23:30:26 2023 +0100 crypto: atmel-sha204a - Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/crypto/atmel-sha204a.c:129:34: error: ‘atmel_sha204a_dt_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit d5812571f594b03438d0d7acd0dc044f73c1719e Author: Mario Limonciello Date: Fri Mar 10 15:19:50 2023 -0600 crypto: ccp - Add support for ringing a platform doorbell Some platforms support using a doorbell to communicate. Export this feature for other drivers to utilize as well. Link: https://lore.kernel.org/linux-i2c/20220916131854.687371-3-jsd@semihalf.com/ Suggested-by: Jan Dabros Signed-off-by: Mario Limonciello Signed-off-by: Herbert Xu commit 22351239247b30978d06eb2ab5c258e6b344949f Author: Mario Limonciello Date: Fri Mar 10 15:19:48 2023 -0600 crypto: ccp - Enable platform access interface on client PSP parts Client PSP parts support the platform access interface. Add the register offsets so that client parts will initialize this interface. Acked-by: Tom Lendacky Signed-off-by: Mario Limonciello Signed-off-by: Herbert Xu commit 7ccc4f4e2e50e4a29f9ee8f5c9e187f8491bb6e7 Author: Mario Limonciello Date: Fri Mar 10 15:19:47 2023 -0600 crypto: ccp - Add support for an interface for platform features Some platforms with a PSP support an interface for features that interact directly with the PSP instead of through a SEV or TEE environment. Initialize this interface so that other drivers can consume it. These drivers may either be subdrivers for the ccp module or external modules. For external modules, export a symbol for them to utilize. Acked-by: Tom Lendacky Signed-off-by: Mario Limonciello Signed-off-by: Herbert Xu commit 1c5c1daf04d13916867ef68c6ba7ae4f5e73801f Author: Mario Limonciello Date: Fri Mar 10 15:19:46 2023 -0600 crypto: ccp - Move some PSP mailbox bit definitions into common header Some of the bits and fields used for mailboxes communicating with the PSP are common across all mailbox implementations (SEV, TEE, etc). Move these bits into the common `linux/psp.h` so they don't need to be re-defined for each implementation. Acked-by: Rijo Thomas Acked-by: Tom Lendacky Signed-off-by: Mario Limonciello Acked-by: Jarkko Nikula Signed-off-by: Herbert Xu commit ae7d45fb7ca75e94b478e2404709ba3024774334 Author: Mario Limonciello Date: Fri Mar 10 15:19:45 2023 -0600 crypto: ccp - Add a header for multiple drivers to use `__psp_pa` The TEE subdriver for CCP, the amdtee driver and the i2c-designware-amdpsp drivers all include `psp-sev.h` even though they don't use SEV functionality. Move the definition of `__psp_pa` into a common header to be included by all of these drivers. Reviewed-by: Jan Dabros Acked-by: Jarkko Nikula # For the drivers/i2c/busses/i2c-designware-amdpsp.c Acked-by: Sumit Garg # For TEE subsystem bits Acked-by: Tom Lendacky Acked-by: Sean Christopherson # KVM Signed-off-by: Mario Limonciello Signed-off-by: Herbert Xu commit a7ca7bbdb59e59a7890116e03a3bb99bcf4c87a6 Author: Mario Limonciello Date: Fri Mar 10 15:19:44 2023 -0600 crypto: ccp - Drop TEE support for IRQ handler The only PSP mailbox that currently supports interrupt on completion is the SEV mailbox. Drop the dead code for the TEE subdriver to potentially call it. Acked-by: Rijo Thomas Acked-by: Tom Lendacky Signed-off-by: Mario Limonciello Signed-off-by: Herbert Xu commit f69ef19f106da84502b400788c1661d5fda86a73 Author: Bjorn Helgaas Date: Tue Mar 7 10:19:47 2023 -0600 crypto: hisilicon/zip - remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Yang Shen Cc: Zhou Wang Cc: Nick Terrell Acked-by: Longfang Liu Signed-off-by: Herbert Xu commit d4656a3b0d7df558e55da01888a2187ad7ad6464 Author: Bjorn Helgaas Date: Tue Mar 7 10:19:46 2023 -0600 crypto: hisilicon/sec - remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Kai Ye Cc: Longfang Liu Acked-by: Longfang Liu Signed-off-by: Herbert Xu commit 9cda983e2f514f794f110f63e8b6b139240c4285 Author: Bjorn Helgaas Date: Tue Mar 7 10:19:45 2023 -0600 crypto: hisilicon/qm - remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Weili Qian Cc: Zhou Wang Acked-by: Longfang Liu Signed-off-by: Herbert Xu commit 389e63a197d6275522c06d8b55fb51dec7d91b6a Author: Bjorn Helgaas Date: Tue Mar 7 10:19:44 2023 -0600 crypto: hisilicon/hpre - remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Longfang Liu Acked-by: Longfang Liu Signed-off-by: Herbert Xu commit f87706e5c6e556090195b72161d518c8b1924e94 Author: Bjorn Helgaas Date: Tue Mar 7 10:19:43 2023 -0600 crypto: cavium/nitrox - remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Signed-off-by: Herbert Xu commit 197cccc771ee5871747e7abe5698c4f2ddb12233 Author: Bjorn Helgaas Date: Tue Mar 7 10:19:42 2023 -0600 crypto: qat - drop redundant adf_enable_aer() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Giovanni Cabiddu Cc: qat-linux@intel.com Acked-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 4a52338bf288c95a46f20af1f5df77b80b74c9ad Author: Ziqi Chen Date: Wed Mar 15 15:44:25 2023 +0800 scsi: ufs: core: Add trace event for MCQ Add MCQ hardware queue ID in the existing trace event ufshcd_command(). Signed-off-by: Ziqi Chen Link: https://lore.kernel.org/r/1678866271-49601-1-git-send-email-quic_ziqichen@quicinc.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 127fd07da459379d39d5a048afbd3e51d00f3f60 Author: Ziqi Chen Date: Wed Mar 15 15:31:52 2023 +0800 scsi: ufs: core: Print trs for pending requests in MCQ mode We don't have outstanding_reqs bitmap in MCQ mode. Considering that the queue depth may increase beyond 64 in the future, rework ufshcd_print_trs() to get rid of bitmap usage so that we can print trs for pending requests in both SDB and MCQ mode. Signed-off-by: Ziqi Chen Link: https://lore.kernel.org/r/1678865517-43139-1-git-send-email-quic_ziqichen@quicinc.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit cb38845d90fc4ad905aecd36ed85a75764d0b5fb Author: Bart Van Assche Date: Tue Mar 14 13:58:35 2023 -0700 scsi: ufs: core: Set the residual byte count It is important for the SCSI core to know the residual byte count. Hence, extract the residual byte count from the UFS response and pass it to the SCSI core. A few examples of the output of a debugging patch that has been applied on top of this patch: [ 1.937750] cmd 0x12: len = 255; resid = 241 [ ... ] [ 1.993400] cmd 0xa0: len = 4096; resid = 4048 [ ... ] Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230314205844.313519-1-bvanassche@acm.org Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen commit fb5ea4f5202bcf2fd35c2ce49f73fe49fcbc6d41 Author: Bart Van Assche Date: Tue Mar 14 13:58:12 2023 -0700 scsi: ufs: core: Disable the reset settle delay Neither UFS host controllers nor UFS devices require a ten second delay after a host reset or after a bus reset. Hence this patch. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20230314205822.313447-1-bvanassche@acm.org Acked-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit 118dbccc1a35b50bf41296846809487e914b65a1 Author: Shashank Gupta Date: Mon Mar 6 11:09:23 2023 -0500 crypto: qat - fix apply custom thread-service mapping for dc service The thread to arbiter mapping for 4xxx devices does not allow to achieve optimal performance for the compression service as it makes all the engines to compete for the same resources. Update the logic so that a custom optimal mapping is used for the compression service. Signed-off-by: Shashank Gupta Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 58b42c949b30212026d7a1a01d12fb61a30604c0 Author: Andy Shevchenko Date: Tue Mar 14 16:58:13 2023 +0200 scsi: fnic: Switch to use %ptTs Use %ptTs instead of open-coded variant to print contents of time64_t type in human readable form. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230314145813.66112-1-andriy.shevchenko@linux.intel.com Signed-off-by: Martin K. Petersen commit 1efbacd2b95a97d6039bf0982794c2e2d346feac Author: Tom Rix Date: Mon Mar 13 20:51:57 2023 -0400 scsi: be2iscsi: Make some variables static smatch reports several warnings: drivers/scsi/be2iscsi/be_main.c:148:1: warning: symbol 'dev_attr_beiscsi_log_enable' was not declared. Should it be static? drivers/scsi/be2iscsi/be_main.c:158:1: warning: symbol 'dev_attr_beiscsi_drvr_ver' was not declared. Should it be static? drivers/scsi/be2iscsi/be_main.c:159:1: warning: symbol 'dev_attr_beiscsi_adapter_family' was not declared. Should it be static? drivers/scsi/be2iscsi/be_main.c:160:1: warning: symbol 'dev_attr_beiscsi_fw_ver' was not declared. Should it be static? drivers/scsi/be2iscsi/be_main.c:161:1: warning: symbol 'dev_attr_beiscsi_phys_port' was not declared. Should it be static? drivers/scsi/be2iscsi/be_main.c:162:1: warning: symbol 'dev_attr_beiscsi_active_session_count' was not declared. Should it be static? drivers/scsi/be2iscsi/be_main.c:164:1: warning: symbol 'dev_attr_beiscsi_free_session_count' was not declared. Should it be static ? These variables are only used in be_main.c, so should be static. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230314005157.536918-1-trix@redhat.com Signed-off-by: Martin K. Petersen commit 141705b78381ab1dcb52c84ebb396e434e86b624 Author: Lai Jiangshan Date: Fri Jan 13 20:29:10 2023 +0800 KVM: x86/mmu: Track tail count in pte_list_desc to optimize guest fork() Rework "struct pte_list_desc" and pte_list_{add|remove} to track the tail count, i.e. number of PTEs in non-head descriptors, and to always keep all tail descriptors full so that adding a new entry and counting the number of entries is done in constant time instead of linear time. No visible performace is changed in tests. But pte_list_add() is no longer shown in the perf result for the COWed pages even the guest forks millions of tasks. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230113122910.672417-1-jiangshanlai@gmail.com [sean: reword shortlog, tweak changelog, add lots of comments, add BUG_ON()] Signed-off-by: Sean Christopherson commit b883d1ee9816194e7333283ff5bbfd5fd2727913 Merge: d565263b7d833 9bae0dd05e610 Author: Jakub Kicinski Date: Thu Mar 16 17:21:52 2023 -0700 Merge branch 'add-ptp-support-for-sama7g5' Durai Manickam says: ==================== Add PTP support for sama7g5 This patch series is intended to add PTP capability to the GEM and EMAC for sama7g5. ==================== Link: https://lore.kernel.org/r/20230315095053.53969-1-durai.manickamkr@microchip.com Signed-off-by: Jakub Kicinski commit 9bae0dd05e61009bf45f4a6a8fbde87ed9567166 Author: Durai Manickam KR Date: Wed Mar 15 15:20:53 2023 +0530 net: macb: Add PTP support to EMAC for sama7g5 Add PTP capability to the Ethernet MAC. Signed-off-by: Durai Manickam KR Reviewed-by: Claudiu Beznea Reviewed-by: Michal Swiatkowski Signed-off-by: Jakub Kicinski commit abc783a7b0ff34d20a799d2fbf0ed0b2b06b72ed Author: Durai Manickam KR Date: Wed Mar 15 15:20:52 2023 +0530 net: macb: Add PTP support to GEM for sama7g5 Add PTP capability to the Gigabit Ethernet MAC. Signed-off-by: Durai Manickam KR Reviewed-by: Claudiu Beznea Reviewed-by: Michal Swiatkowski Signed-off-by: Jakub Kicinski commit 19ace7d6ca15a4395dd294286fe253a233bbf20a Author: Lai Jiangshan Date: Fri Feb 17 07:53:21 2023 +0800 KVM: x86/mmu: Skip calling mmu->sync_spte() when the spte is 0 Sync the spte only when the spte is set and avoid the indirect branch. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230216235321.735214-5-jiangshanlai@gmail.com [sean: add wrapper instead of open coding each check] Signed-off-by: Sean Christopherson commit 91ca7672dc7386c0d181ead2e03f4e65b73ca6b8 Author: Lai Jiangshan Date: Fri Feb 17 07:53:20 2023 +0800 kvm: x86/mmu: Remove @no_dirty_log from FNAME(prefetch_gpte) FNAME(prefetch_gpte) is always called with @no_dirty_log=true. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230216235321.735214-4-jiangshanlai@gmail.com Signed-off-by: Sean Christopherson commit 9fd4a4e3a3d9fc0306525d95bf3eca693d311406 Author: Lai Jiangshan Date: Fri Feb 17 07:53:19 2023 +0800 KVM: x86/mmu: Remove FNAME(invlpg) and use FNAME(sync_spte) to update vTLB instead. In hardware TLB, invalidating TLB entries means the translations are removed from the TLB. In KVM shadowed vTLB, the translations (combinations of shadow paging and hardware TLB) are generally maintained as long as they remain "clean" when the TLB of an address space (i.e. a PCID or all) is flushed with the help of write-protections, sp->unsync, and kvm_sync_page(), where "clean" in this context means that no updates to KVM's SPTEs are needed. However, FNAME(invlpg) always zaps/removes the vTLB if the shadow page is unsync, and thus triggers a remote flush even if the original vTLB entry is clean, i.e. is usable as-is. Besides this, FNAME(invlpg) is largely is a duplicate implementation of FNAME(sync_spte) to invalidate a vTLB entry. To address both issues, reuse FNAME(sync_spte) to share the code and slightly modify the semantics, i.e. keep the vTLB entry if it's "clean" and avoid remote TLB flush. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230216235321.735214-3-jiangshanlai@gmail.com Signed-off-by: Sean Christopherson commit ed335278bd1282641748b2b0ca23291c457038ef Author: Lai Jiangshan Date: Fri Feb 17 07:53:18 2023 +0800 KVM: x86/mmu: Allow the roots to be invalid in FNAME(invlpg) Don't assume the current root to be valid, just check it and remove the WARN(). Also move the code to check if the root is valid into FNAME(invlpg) to simplify the code. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230216235321.735214-2-jiangshanlai@gmail.com Signed-off-by: Sean Christopherson commit 2c86c444e2751a867bfa6a059a80ba67ef9d441a Author: Lai Jiangshan Date: Fri Feb 17 07:53:17 2023 +0800 KVM: x86/mmu: Use kvm_mmu_invalidate_addr() in nested_ept_invalidate_addr() Use kvm_mmu_invalidate_addr() instead open calls to mmu->invlpg(). No functional change intended. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230216235321.735214-1-jiangshanlai@gmail.com Signed-off-by: Sean Christopherson commit 9ebc3f51da6f526326b3d2c08c7f582e4ccabd11 Author: Lai Jiangshan Date: Thu Feb 16 23:41:15 2023 +0800 KVM: x86/mmu: Use kvm_mmu_invalidate_addr() in kvm_mmu_invpcid_gva() Use kvm_mmu_invalidate_addr() instead open calls to mmu->invlpg(). No functional change intended. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230216154115.710033-10-jiangshanlai@gmail.com Signed-off-by: Sean Christopherson commit cd42853e9530fb64097cbe83abce10a34e68cdf4 Author: Lai Jiangshan Date: Thu Feb 16 23:41:14 2023 +0800 kvm: x86/mmu: Use KVM_MMU_ROOT_XXX for kvm_mmu_invalidate_addr() The @root_hpa for kvm_mmu_invalidate_addr() is called with @mmu->root.hpa or INVALID_PAGE where @mmu->root.hpa is to invalidate gva for the current root (the same meaning as KVM_MMU_ROOT_CURRENT) and INVALID_PAGE is to invalidate gva for all roots (the same meaning as KVM_MMU_ROOTS_ALL). Change the argument type of kvm_mmu_invalidate_addr() and use KVM_MMU_ROOT_XXX instead so that we can reuse the function for kvm_mmu_invpcid_gva() and nested_ept_invalidate_addr() for invalidating gva for different set of roots. No fuctionalities changed. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230216154115.710033-9-jiangshanlai@gmail.com [sean: massage comment slightly] Signed-off-by: Sean Christopherson commit f94db0c8b9fa50296d00e236e2416aea11186e18 Author: Sean Christopherson Date: Thu Feb 16 23:41:13 2023 +0800 KVM: x86/mmu: Sanity check input to kvm_mmu_free_roots() Tweak KVM_MMU_ROOTS_ALL to precisely cover all current+previous root flags, and add a sanity in kvm_mmu_free_roots() to verify that the set of roots to free doesn't stray outside KVM_MMU_ROOTS_ALL. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230216154115.710033-8-jiangshanlai@gmail.com Signed-off-by: Sean Christopherson commit e6722d9211b2aa5f195267faaa6858004b4f42a0 Author: Lai Jiangshan Date: Thu Feb 16 23:41:12 2023 +0800 KVM: x86/mmu: Reduce the update to the spte in FNAME(sync_spte) Sometimes when the guest updates its pagetable, it adds only new gptes to it without changing any existed one, so there is no point to update the sptes for these existed gptes. Also when the sptes for these unchanged gptes are updated, the AD bits are also removed since make_spte() is called with prefetch=true which might result unneeded TLB flushing. Just do nothing if the gpte's permissions are unchanged. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230216154115.710033-7-jiangshanlai@gmail.com [sean: expand comment to call out A/D bits] Signed-off-by: Sean Christopherson commit c3c6c9fc5d24bcafbbeda2edb521b70f5df052b7 Author: Lai Jiangshan Date: Thu Feb 16 23:41:11 2023 +0800 KVM: x86/mmu: Move the code out of FNAME(sync_page)'s loop body into mmu.c Rename mmu->sync_page to mmu->sync_spte and move the code out of FNAME(sync_page)'s loop body into mmu.c. No functionalities change intended. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230216154115.710033-6-jiangshanlai@gmail.com Signed-off-by: Sean Christopherson commit d565263b7d83371e64ef315bdc3428909808b46f Author: Andy Shevchenko Date: Tue Mar 14 20:18:24 2023 +0200 net: dsa: hellcreek: 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 Reviewed-by: Kurt Kanzenbach Reviewed-by: Michal Swiatkowski Link: https://lore.kernel.org/r/20230314181824.56881-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski commit 5b1a1c1ab1f981b15bce778db863344f59bd1501 Author: Yu Zhe Date: Thu Mar 16 15:58:26 2023 +0800 clk: remove unnecessary (void*) conversions Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe Link: https://lore.kernel.org/r/20230316075826.22754-1-yuzhe@nfschina.com Signed-off-by: Stephen Boyd commit 082cdc69a4651dd2a77539d69416a359ed1214f5 Author: Luis Gerhorst Date: Wed Mar 15 17:54:00 2023 +0100 bpf: Remove misleading spec_v1 check on var-offset stack read For every BPF_ADD/SUB involving a pointer, adjust_ptr_min_max_vals() ensures that the resulting pointer has a constant offset if bypass_spec_v1 is false. This is ensured by calling sanitize_check_bounds() which in turn calls check_stack_access_for_ptr_arithmetic(). There, -EACCESS is returned if the register's offset is not constant, thereby rejecting the program. In summary, an unprivileged user must never be able to create stack pointers with a variable offset. That is also the case, because a respective check in check_stack_write() is missing. If they were able to create a variable-offset pointer, users could still use it in a stack-write operation to trigger unsafe speculative behavior [1]. Because unprivileged users must already be prevented from creating variable-offset stack pointers, viable options are to either remove this check (replacing it with a clarifying comment), or to turn it into a "verifier BUG"-message, also adding a similar check in check_stack_write() (for consistency, as a second-level defense). This patch implements the first option to reduce verifier bloat. This check was introduced by commit 01f810ace9ed ("bpf: Allow variable-offset stack access") which correctly notes that "variable-offset reads and writes are disallowed (they were already disallowed for the indirect access case) because the speculative execution checking code doesn't support them". However, it does not further discuss why the check in check_stack_read() is necessary. The code which made this check obsolete was also introduced in this commit. I have compiled ~650 programs from the Linux selftests, Linux samples, Cilium, and libbpf/examples projects and confirmed that none of these trigger the check in check_stack_read() [2]. Instead, all of these programs are, as expected, already rejected when constructing the variable-offset pointers. Note that the check in check_stack_access_for_ptr_arithmetic() also prints "off=%d" while the code removed by this patch does not (the error removed does not appear in the "verification_error" values). For reproducibility, the repository linked includes the raw data and scripts used to create the plot. [1] https://arxiv.org/pdf/1807.03757.pdf [2] https://gitlab.cs.fau.de/un65esoq/bpf-spectre/-/raw/53dc19fcf459c186613b1156a81504b39c8d49db/data/plots/23-02-26_23-56_bpftool/bpftool/0004-errors.pdf?inline=false Fixes: 01f810ace9ed ("bpf: Allow variable-offset stack access") Signed-off-by: Luis Gerhorst Signed-off-by: Daniel Borkmann Acked-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230315165358.23701-1-gerhorst@cs.fau.de commit dfd7a1569e25996575a24725b64f73162155bcd6 Author: Kirill A. Shutemov Date: Sun Mar 12 14:26:12 2023 +0300 selftests/x86/lam: Add test cases for LAM vs thread creation LAM enabling is only allowed when the process has single thread. LAM mode is inherited into child thread. Trying to enable LAM after spawning a thread has to fail. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20230312112612.31869-18-kirill.shutemov%40linux.intel.com commit 34821473deb3a56adf5e989e8cefd8bfc60ed216 Author: Weihong Zhang Date: Sun Mar 12 14:26:11 2023 +0300 selftests/x86/lam: Add ARCH_FORCE_TAGGED_SVA test cases for linear-address masking By default do not allow to enable both LAM and use SVA in the same process. The new ARCH_FORCE_TAGGED_SVA arch_prctl() overrides the limitation. Add new test cases for the new arch_prctl: Before using ARCH_FORCE_TAGGED_SVA, should not allow to enable LAM/SVA coexisting. the test cases should be negative. The test depands on idxd driver and iommu. before test, need add "intel_iommu=on,sm_on" in kernel command line and insmod idxd driver. Signed-off-by: Weihong Zhang Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20230312112612.31869-17-kirill.shutemov%40linux.intel.com commit 833c12ce0f4307675beb60b194833c6c7cb506d7 Author: Weihong Zhang Date: Sun Mar 12 14:26:10 2023 +0300 selftests/x86/lam: Add inherit test cases for linear-address masking LAM is enabled per-thread and gets inherited on fork(2)/clone(2). exec() reverts LAM status to the default disabled state. There are two test scenarios: - Fork test cases: These cases were used to test the inheritance of LAM for per-thread, Child process generated by fork() should inherit LAM feature from parent process, Child process can get the LAM mode same as parent process. - Execve test cases: Processes generated by execve() are different from processes generated by fork(), these processes revert LAM status to disabled status. Signed-off-by: Weihong Zhang Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20230312112612.31869-16-kirill.shutemov%40linux.intel.com commit 72fd6d738c991225c1053ee5003dd45e9c04e0e6 Author: Weihong Zhang Date: Sun Mar 12 14:26:09 2023 +0300 selftests/x86/lam: Add io_uring test cases for linear-address masking LAM should be supported in kernel thread, using io_uring to verify LAM feature. The test cases implement read a file through io_uring, the test cases choose an iovec array as receiving buffer, which used to receive data, according to LAM mode, set metadata in high bits of these buffer. io_uring can deal with these buffers that pointed to pointers with the metadata in high bits. Signed-off-by: Weihong Zhang Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20230312112612.31869-15-kirill.shutemov%40linux.intel.com commit e67876962ecfc5c8cb1d871d8f66ad3b21dbf065 Author: Weihong Zhang Date: Sun Mar 12 14:26:08 2023 +0300 selftests/x86/lam: Add mmap and SYSCALL test cases for linear-address masking Add mmap and SYSCALL test cases. SYSCALL test cases: - LAM supports set metadata in high bits 62:57 (LAM_U57) of a user pointer, pass the pointer to SYSCALL, SYSCALL can dereference the pointer and return correct result. - Disable LAM, pass a pointer with metadata in high bits to SYSCALL, SYSCALL returns -1 (EFAULT). MMAP test cases: - Enable LAM_U57, MMAP with low address (below bits 47), set metadata in high bits of the address, dereference the address should be allowed. - Enable LAM_U57, MMAP with high address (above bits 47), set metadata in high bits of the address, dereference the address should be allowed. Signed-off-by: Weihong Zhang Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20230312112612.31869-14-kirill.shutemov%40linux.intel.com commit 3de9745c12d6adf4ed5884b6a33a141f580ef434 Author: Weihong Zhang Date: Sun Mar 12 14:26:07 2023 +0300 selftests/x86/lam: Add malloc and tag-bits test cases for linear-address masking LAM is supported only in 64-bit mode and applies only addresses used for data accesses. In 64-bit mode, linear address have 64 bits. LAM is applied to 64-bit linear address and allow software to use high bits for metadata. LAM supports configurations that differ regarding which pointer bits are masked and can be used for metadata. LAM includes following mode: - LAM_U57, pointer bits in positions 62:57 are masked (LAM width 6), allows bits 62:57 of a user pointer to be used as metadata. There are some arch_prctls: ARCH_ENABLE_TAGGED_ADDR: enable LAM mode, mask high bits of a user pointer. ARCH_GET_UNTAG_MASK: get current untagged mask. ARCH_GET_MAX_TAG_BITS: the maximum tag bits user can request. zero if LAM is not supported. The LAM mode is for pre-process, a process has only one chance to set LAM mode. But there is no API to disable LAM mode. So all of test cases are run under child process. Functions of this test: MALLOC - LAM_U57 masks bits 57:62 of a user pointer. Process on user space can dereference such pointers. - Disable LAM, dereference a pointer with metadata above 48 bit or 57 bit lead to trigger SIGSEGV. TAG_BITS - Max tag bits of LAM_U57 is 6. Signed-off-by: Weihong Zhang Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20230312112612.31869-13-kirill.shutemov%40linux.intel.com commit 23e5d9ec2bab53c4e5fbac675304e699726c1ac5 Author: Kirill A. Shutemov Date: Sun Mar 12 14:26:06 2023 +0300 x86/mm/iommu/sva: Make LAM and SVA mutually exclusive IOMMU and SVA-capable devices know nothing about LAM and only expect canonical addresses. An attempt to pass down tagged pointer will lead to address translation failure. By default do not allow to enable both LAM and use SVA in the same process. The new ARCH_FORCE_TAGGED_SVA arch_prctl() overrides the limitation. By using the arch_prctl() userspace takes responsibility to never pass tagged address to the device. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Reviewed-by: Ashok Raj Reviewed-by: Jacob Pan Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20230312112612.31869-12-kirill.shutemov%40linux.intel.com commit 400b9b93441cd4e2fe824a70140f3d5a2a9c802b Author: Kirill A. Shutemov Date: Sun Mar 12 14:26:05 2023 +0300 iommu/sva: Replace pasid_valid() helper with mm_valid_pasid() Kernel has few users of pasid_valid() and all but one checks if the process has PASID allocated. The helper takes ioasid_t as the input. Replace the helper with mm_valid_pasid() that takes mm_struct as the argument. The only call that checks PASID that is not tied to mm_struct is open-codded now. This is preparatory patch. It helps avoid ifdeffery: no need to dereference mm->pasid in generic code to check if the process has PASID. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20230312112612.31869-11-kirill.shutemov%40linux.intel.com commit f7d304343b9d2456ffba23b99d2345408251ea45 Author: Kirill A. Shutemov Date: Sun Mar 12 14:26:04 2023 +0300 mm: Expose untagging mask in /proc/$PID/status Add a line in /proc/$PID/status to report untag_mask. It can be used to find out LAM status of the process from the outside. It is useful for debuggers. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Catalin Marinas Acked-by: Peter Zijlstra (Intel) Tested-by: Alexander Potapenko Link: https://lore.kernel.org/all/20230312112612.31869-10-kirill.shutemov%40linux.intel.com commit 2f8794bd087e7958c8d1f0a0538856ca03e0bf3c Author: Kirill A. Shutemov Date: Sun Mar 12 14:26:03 2023 +0300 x86/mm: Provide arch_prctl() interface for LAM Add a few of arch_prctl() handles: - ARCH_ENABLE_TAGGED_ADDR enabled LAM. The argument is required number of tag bits. It is rounded up to the nearest LAM mode that can provide it. For now only LAM_U57 is supported, with 6 tag bits. - ARCH_GET_UNTAG_MASK returns untag mask. It can indicates where tag bits located in the address. - ARCH_GET_MAX_TAG_BITS returns the maximum tag bits user can request. Zero if LAM is not supported. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Tested-by: Alexander Potapenko Link: https://lore.kernel.org/all/20230312112612.31869-9-kirill.shutemov%40linux.intel.com commit e0bddc19ba9578bc4e4c60a3f29ccc227277854c Author: Kirill A. Shutemov Date: Sun Mar 12 14:26:02 2023 +0300 x86/mm: Reduce untagged_addr() overhead for systems without LAM Use alternatives to reduce untagged_addr() overhead. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20230312112612.31869-8-kirill.shutemov%40linux.intel.com commit 74c228d20a51ddb1354409fdbed7b72427339d7b Author: Kirill A. Shutemov Date: Sun Mar 12 14:26:01 2023 +0300 x86/uaccess: Provide untagged_addr() and remove tags before address check untagged_addr() is a helper used by the core-mm to strip tag bits and get the address to the canonical shape based on rules of the current thread. It only handles userspace addresses. The untagging mask is stored in per-CPU variable and set on context switching to the task. The tags must not be included into check whether it's okay to access the userspace address. Strip tags in access_ok(). Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Tested-by: Alexander Potapenko Link: https://lore.kernel.org/all/20230312112612.31869-7-kirill.shutemov%40linux.intel.com commit 428e106ae1ad4e45d3fd6978a753db475d0d0ec9 Author: Kirill A. Shutemov Date: Sun Mar 12 14:26:00 2023 +0300 mm: Introduce untagged_addr_remote() untagged_addr() removes tags/metadata from the address and brings it to the canonical form. The helper is implemented on arm64 and sparc. Both of them do untagging based on global rules. However, Linear Address Masking (LAM) on x86 introduces per-process settings for untagging. As a result, untagged_addr() is now only suitable for untagging addresses for the current proccess. The new helper untagged_addr_remote() has to be used when the address targets remote process. It requires the mmap lock for target mm to be taken. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Tested-by: Alexander Potapenko Link: https://lore.kernel.org/all/20230312112612.31869-6-kirill.shutemov%40linux.intel.com commit 82721d8b25d76c5a6f4c6cf4ce4e5b33788820a1 Author: Kirill A. Shutemov Date: Sun Mar 12 14:25:59 2023 +0300 x86/mm: Handle LAM on context switch Linear Address Masking mode for userspace pointers encoded in CR3 bits. The mode is selected per-process and stored in mm_context_t. switch_mm_irqs_off() now respects selected LAM mode and constructs CR3 accordingly. The active LAM mode gets recorded in the tlb_state. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Tested-by: Alexander Potapenko Link: https://lore.kernel.org/all/20230312112612.31869-5-kirill.shutemov%40linux.intel.com commit 6449dcb0cac738219d13c618af7fd8664735f99d Author: Kirill A. Shutemov Date: Sun Mar 12 14:25:58 2023 +0300 x86: CPUID and CR3/CR4 flags for Linear Address Masking Enumerate Linear Address Masking and provide defines for CR3 and CR4 flags. The new CONFIG_ADDRESS_MASKING option enables the feature support in kernel. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Reviewed-by: Alexander Potapenko Acked-by: Peter Zijlstra (Intel) Tested-by: Alexander Potapenko Link: https://lore.kernel.org/all/20230312112612.31869-4-kirill.shutemov%40linux.intel.com commit 5ef495e55f07aa117fdd8e187c9901cefc02fe0a Author: Kirill A. Shutemov Date: Sun Mar 12 14:25:57 2023 +0300 x86: Allow atomic MM_CONTEXT flags setting So far there's no need in atomic setting of MM context flags in mm_context_t::flags. The flags set early in exec and never change after that. LAM enabling requires atomic flag setting. The upcoming flag MM_CONTEXT_FORCE_TAGGED_SVA can be set much later in the process lifetime where multiple threads exist. Convert the field to unsigned long and do MM_CONTEXT_* accesses with __set_bit() and test_bit(). No functional changes. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Tested-by: Alexander Potapenko Link: https://lore.kernel.org/all/20230312112612.31869-3-kirill.shutemov%40linux.intel.com commit b19b74bc99b1501a550f4448d04d59b946dc617a Author: Kirill A. Shutemov Date: Sun Mar 12 14:25:56 2023 +0300 x86/mm: Rework address range check in get_user() and put_user() The functions get_user() and put_user() check that the target address range resides in the user space portion of the virtual address space. In order to perform this check, the functions compare the end of the range against TASK_SIZE_MAX. For kernels compiled with CONFIG_X86_5LEVEL, this process requires some additional trickery using ALTERNATIVE, as TASK_SIZE_MAX depends on the paging mode in use. Linus suggested that this check could be simplified for 64-bit kernels. It is sufficient to check bit 63 of the address to ensure that the range belongs to user space. Additionally, the use of branches can be avoided by setting the target address to all ones if bit 63 is set. There's no need to check the end of the access range as there's huge gap between end of userspace range and start of the kernel range. The gap consists of canonical hole and unused ranges on both kernel and userspace sides. If an address with bit 63 set is passed down, it will trigger a #GP exception. _ASM_EXTABLE_UA() complains about this. Replace it with plain _ASM_EXTABLE() as it is expected behaviour now. The updated get_user() and put_user() checks are also compatible with Linear Address Masking, which allows user space to encode metadata in the upper bits of pointers and eliminates the need to untag the address before handling it. Suggested-by: Linus Torvalds Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/all/20230312112612.31869-2-kirill.shutemov%40linux.intel.com commit 7da13023655d4625b72b09dd65f780804c7cc700 Author: Uwe Kleine-König Date: Mon Mar 13 19:33:49 2023 +0100 i2c: imx: Simplify using devm_clk_get_enabled() devm_clk_get_enabled() returns the clk already (prepared and) enabled and the automatically called cleanup cares for disabling (and unpreparing). So simplify .probe() and .remove() accordingly. Signed-off-by: Uwe Kleine-König Acked-by: Oleksij Rempel Signed-off-by: Wolfram Sang commit 165d5133731a2e045abdd6d9d3c9221fdc2a556e Author: Arthur Grillo Date: Sat Mar 11 09:51:41 2023 -0300 drm/format-helper: Make "destination_pitch" test usable for mono This test case uses an arbitrary pitch size, different of the default one, to test if the conversions methods obey. Change the "destination_pitch" colors to change the monochrome expected result from being just zeros, as this makes the arbitrary pitch use unusable. Signed-off-by: Arthur Grillo Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230311125141.564801-3-arthurgrillo@riseup.net commit 7a287433c9e65e65a79411989c35c579f755dd9f Author: Krzysztof Kozlowski Date: Sat Mar 11 12:16:57 2023 +0100 i2c: cros-ec-tunnel: Mark ACPI and OF related data as maybe unused The driver can be compile tested with !CONFIG_OF or !CONFIG_ACPI making certain data unused: drivers/i2c/busses/i2c-cros-ec-tunnel.c:295:34: error: ‘cros_ec_i2c_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Signed-off-by: Wolfram Sang commit 8759500cbdfcaf825316bc8d466d11462d7efbda Author: Krzysztof Kozlowski Date: Sat Mar 11 12:16:55 2023 +0100 i2c: owl: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/i2c/busses/i2c-owl.c:510:34: error: ‘owl_i2c_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Signed-off-by: Wolfram Sang commit ee4de6368156860e9475855ba90e83d03391e7a1 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:16:54 2023 +0100 i2c: mt65xx: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/i2c/busses/i2c-mt65xx.c:514:34: error: ‘mtk_i2c_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Wolfram Sang commit cbffe6b3b2bdf6064135f715242feb2f9094190f Author: Dongliang Mu Date: Mon Mar 6 10:45:23 2023 +0800 i2c: davinci: remove dead code in probe From the comment of platform_get_irq, it only returns non-zero IRQ number and negative error number, other than zero. Fix this by removing the if condition. Signed-off-by: Dongliang Mu Reviewed-by: Bartosz Golaszewski Signed-off-by: Wolfram Sang commit 8ef228c20cae89c701c1ef7b8b8a84d6925b3575 Author: Lai Jiangshan Date: Thu Feb 16 23:41:10 2023 +0800 KVM: x86/mmu: Set mmu->sync_page as NULL for direct paging mmu->sync_page for direct paging is never called. And both mmu->sync_page and mm->invlpg only make sense in shadow paging. Setting mmu->sync_page as NULL for direct paging makes it consistent with mm->invlpg which is set NULL for the case. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230216154115.710033-5-jiangshanlai@gmail.com Signed-off-by: Sean Christopherson commit 51dddf6c49b9f60341a80c4947f3be67b3d50dc0 Author: Lai Jiangshan Date: Thu Feb 16 23:41:09 2023 +0800 KVM: x86/mmu: Check mmu->sync_page pointer in kvm_sync_page_check() Assert that mmu->sync_page is non-NULL as part of the sanity checks performed before attempting to sync a shadow page. Explicitly checking mmu->sync_page is all but guaranteed to be redundant with the existing sanity check that the MMU is indirect, but the cost is negligible, and the explicit check also serves as documentation. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230216154115.710033-4-jiangshanlai@gmail.com [sean: increase verbosity of changelog] Signed-off-by: Sean Christopherson commit 90e444702a7c2e5d5806260735476d9bba0b598d Author: Lai Jiangshan Date: Thu Feb 16 23:41:08 2023 +0800 KVM: x86/mmu: Move the check in FNAME(sync_page) as kvm_sync_page_check() Prepare to check mmu->sync_page pointer before calling it. Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230216154115.710033-3-jiangshanlai@gmail.com Signed-off-by: Sean Christopherson commit 753b43c9d1b73337610861a6e644f8df3635d656 Author: Lai Jiangshan Date: Thu Feb 16 23:41:07 2023 +0800 KVM: x86/mmu: Use 64-bit address to invalidate to fix a subtle bug FNAME(invlpg)() and kvm_mmu_invalidate_gva() take a gva_t, i.e. unsigned long, as the type of the address to invalidate. On 32-bit kernels, the upper 32 bits of the GPA will get dropped when an L2 GPA address is invalidated in the shadowed nested TDP MMU. Convert it to u64 to fix the problem. Reported-by: Sean Christopherson Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20230216154115.710033-2-jiangshanlai@gmail.com [sean: tweak changelog] Signed-off-by: Sean Christopherson commit 00000922a33d4adb06a947621f553cae12363083 Author: Arthur Grillo Date: Sat Mar 11 09:51:40 2023 -0300 drm/format-helper: Add Kunit tests for drm_fb_xrgb8888_to_mono() Extend the existing test cases to test the conversion from XRGB8888 to monochromatic. Signed-off-by: Arthur Grillo Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230311125141.564801-2-arthurgrillo@riseup.net commit ff0cf7bca63092786d640820a18f3e746b02e172 Author: Lars-Peter Clausen Date: Sat Jan 7 13:18:14 2023 -0800 i2c: cadence: Remove unnecessary register reads In the `cdns_i2c_mrecv()` function the CTRL register of the Cadence I2C controller is written and read back multiple times. The register value does not change on its own. So it is possible to remember the just written value instead of reading it back from the hardware. Signed-off-by: Lars-Peter Clausen Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit e9d373c3feffc7fb36927837254c25081b3da4a9 Author: Lars-Peter Clausen Date: Sat Jan 7 13:18:13 2023 -0800 i2c: cadence: Remove always false ternary operator When selecting the clock dividers the Cadence I2C driver skips settings where the resulting I2C bus frequency is larger than the requested frequency. If the resulting frequency is lower it will compute the error to actual frequency. When calculating the difference it also handles the case where the resulting frequency is larger. Since the resulting frequency is always smaller or equal the computation of the error can be simplified by only considering this case. Signed-off-by: Lars-Peter Clausen Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit deb9fd64d145b42c0a15193507b4fea27514a559 Merge: 6cb9430be1471 fec2c6d14fd50 Author: Alexei Starovoitov Date: Thu Mar 16 12:28:30 2023 -0700 Merge branch 'Make struct bpf_cpumask RCU safe' David Vernet says: ==================== The struct bpf_cpumask type is currently not RCU safe. It uses the bpf_mem_cache_{alloc,free}() APIs to allocate and release cpumasks, and those allocations may be reused before an RCU grace period has elapsed. We want to be able to enable using this pattern in BPF programs: private(MASK) static struct bpf_cpumask __kptr *global; int BPF_PROG(prog, ...) { struct bpf_cpumask *cpumask; bpf_rcu_read_lock(); cpumask = global; if (!cpumask) { bpf_rcu_read_unlock(); return -1; } bpf_cpumask_setall(cpumask); ... bpf_rcu_read_unlock(); } In other words, to be able to pass a kptr to KF_RCU bpf_cpumask kfuncs without requiring the acquisition and release of refcounts using bpf_cpumask_kptr_get(). This patchset enables this by making the struct bpf_cpumask type RCU safe, and removing the bpf_cpumask_kptr_get() function. --- v1: https://lore.kernel.org/all/20230316014122.678082-2-void@manifault.com/ Changelog: ---------- v1 -> v2: - Add doxygen comment for new @rcu field in struct bpf_cpumask. ==================== Signed-off-by: Alexei Starovoitov commit fec2c6d14fd5001e7d24a2ae44f0e9aea82a6149 Author: David Vernet Date: Thu Mar 16 00:40:28 2023 -0500 bpf,docs: Remove bpf_cpumask_kptr_get() from documentation Now that the kfunc no longer exists, we can remove it and instead describe how RCU can be used to get a struct bpf_cpumask from a map value. This patch updates the BPF documentation accordingly. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230316054028.88924-6-void@manifault.com Signed-off-by: Alexei Starovoitov commit 1b403ce77dfbf234723a91bc411dfb03a0499d6e Author: David Vernet Date: Thu Mar 16 00:40:27 2023 -0500 bpf: Remove bpf_cpumask_kptr_get() kfunc Now that struct bpf_cpumask is RCU safe, there's no need for this kfunc. Rather than doing the following: private(MASK) static struct bpf_cpumask __kptr *global; int BPF_PROG(prog, s32 cpu, ...) { struct bpf_cpumask *cpumask; bpf_rcu_read_lock(); cpumask = bpf_cpumask_kptr_get(&global); if (!cpumask) { bpf_rcu_read_unlock(); return -1; } bpf_cpumask_setall(cpumask); ... bpf_cpumask_release(cpumask); bpf_rcu_read_unlock(); } Programs can instead simply do (assume same global cpumask): int BPF_PROG(prog, ...) { struct bpf_cpumask *cpumask; bpf_rcu_read_lock(); cpumask = global; if (!cpumask) { bpf_rcu_read_unlock(); return -1; } bpf_cpumask_setall(cpumask); ... bpf_rcu_read_unlock(); } In other words, no extra atomic acquire / release, and less boilerplate code. This patch removes both the kfunc, as well as its selftests and documentation. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230316054028.88924-5-void@manifault.com Signed-off-by: Alexei Starovoitov commit a5a197df58c44ce32a86b57e970da4bd7b71b399 Author: David Vernet Date: Thu Mar 16 00:40:26 2023 -0500 bpf/selftests: Test using global cpumask kptr with RCU Now that struct bpf_cpumask * is considered an RCU-safe type according to the verifier, we should add tests that validate its common usages. This patch adds those tests to the cpumask test suite. A subsequent changes will remove bpf_cpumask_kptr_get(), and will adjust the selftest and BPF documentation accordingly. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230316054028.88924-4-void@manifault.com Signed-off-by: Alexei Starovoitov commit 63d2d83d21a6e2c6f019da5b2d5cdabe6d1cb951 Author: David Vernet Date: Thu Mar 16 00:40:25 2023 -0500 bpf: Mark struct bpf_cpumask as rcu protected struct bpf_cpumask is a BPF-wrapper around the struct cpumask type which can be instantiated by a BPF program, and then queried as a cpumask in similar fashion to normal kernel code. The previous patch in this series makes the type fully RCU safe, so the type can be included in the rcu_protected_type BTF ID list. A subsequent patch will remove bpf_cpumask_kptr_get(), as it's no longer useful now that we can just treat the type as RCU safe by default and do our own if check. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230316054028.88924-3-void@manifault.com Signed-off-by: Alexei Starovoitov commit 77473d1a962f3d4f7ba48324502b6d27b8ef2591 Author: David Vernet Date: Thu Mar 16 00:40:24 2023 -0500 bpf: Free struct bpf_cpumask in call_rcu handler The struct bpf_cpumask type uses the bpf_mem_cache_{alloc,free}() APIs to allocate and free its cpumasks. The bpf_mem allocator may currently immediately reuse some memory when its freed, without waiting for an RCU read cycle to elapse. We want to be able to treat struct bpf_cpumask objects as completely RCU safe. This is necessary for two reasons: 1. bpf_cpumask_kptr_get() currently does an RCU-protected refcnt_inc_not_zero(). This of course assumes that the underlying memory is not reused, and is therefore unsafe in its current form. 2. We want to be able to get rid of bpf_cpumask_kptr_get() entirely, and intead use the superior kptr RCU semantics now afforded by the verifier. This patch fixes (1), and enables (2), by making struct bpf_cpumask RCU safe. A subsequent patch will update the verifier to allow struct bpf_cpumask * pointers to be passed to KF_RCU kfuncs, and then a latter patch will remove bpf_cpumask_kptr_get(). Fixes: 516f4d3397c9 ("bpf: Enable cpumasks to be queried and used as kptrs") Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230316054028.88924-2-void@manifault.com Signed-off-by: Alexei Starovoitov commit 89151f6b007915fca95c5225cd1c37a419ba8cb9 Author: Rob Herring Date: Fri Mar 10 08:47:07 2023 -0600 i2c: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Reviewed-by: Chris Packham Signed-off-by: Wolfram Sang commit 819c73455458e8f19e3cae88e47c63d8fca01ae3 Author: Conor Dooley Date: Thu Mar 9 20:44:49 2023 +0000 i2c: microchip-core: convert SOC_MICROCHIP_POLARFIRE to ARCH_MICROCHIP_POLARFIRE As part of converting RISC-V SOC_FOO symbols to ARCH_FOO to match the use of such symbols on other architectures, convert the Microchip FPGA i2c drivers to use the new symbol. Signed-off-by: Conor Dooley Signed-off-by: Wolfram Sang commit cf386126aef92256245adc8be686f2df4b837013 Author: Johan Hovold Date: Thu Mar 16 15:12:52 2023 +0100 arm64: dts: qcom: sc8280xp: fix external display power domain Fix the external display controller nodes which erroneously described the controllers as belonging to CX rather than MMCX. Fixes: 19d3bb90754f ("arm64: dts: qcom: sc8280xp: Add USB-C-related DP blocks") Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230316141252.2436-1-johan+linaro@kernel.org commit e19967994d342a5986d950a1bfddf19d7e1191b7 Author: Yang Li Date: Thu Mar 16 16:40:11 2023 +0800 remoteproc/mtk_scpi_ipi: Fix one kernel-doc comment Fix the function name in kernel-doc comments to clear the below warning: drivers/remoteproc/mtk_scp_ipi.c:136: warning: expecting prototype for scp_ipi_lock(). Prototype was for scp_ipi_unlock() instead Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4544 Signed-off-by: Yang Li Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230316084011.99613-1-yang.lee@linux.alibaba.com Signed-off-by: Mathieu Poirier commit cc6d85c1cb5ccc04c594392339c81227abd1667d Author: Rob Herring Date: Tue Mar 14 15:13:09 2023 -0500 nfc: mrvl: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to of_property_read_bool(). Reviewed-by: Simon Horman Reviewed-by: Krzysztof Kozlowski Signed-off-by: Rob Herring Signed-off-by: David S. Miller commit 053fdaa841bd1af9fe9c2c30bba81119059aac95 Author: Rob Herring Date: Tue Mar 14 15:13:08 2023 -0500 nfc: mrvl: Move platform_data struct into driver There are no users of nfcmrvl platform_data struct outside of the driver and none will be added, so move it into the driver. Signed-off-by: Rob Herring Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 0ba13995be9b416ea1d3daaf3ba871a67f45899b Author: Xu Liang Date: Wed Mar 15 00:30:23 2023 +0800 net: phy: mxl-gpy: enhance delay time required by loopback disable function GPY2xx devices need 3 seconds to fully switch out of loopback mode before it can safely re-enter loopback mode. Implement timeout mechanism to guarantee 3 seconds waited before re-enter loopback mode. Signed-off-by: Xu Liang Signed-off-by: David S. Miller commit 6cb9430be1471d631e1b6b138e6d26657a9caa81 Author: Daniel Müller Date: Wed Mar 15 17:15:50 2023 +0000 libbpf: Ignore warnings about "inefficient alignment" Some consumers of libbpf compile the code base with different warnings enabled. In a report for perf, for example, -Wpacked was set which caused warnings about "inefficient alignment" to be emitted on a subset of supported architectures. With this change we silence specifically those warnings, as we intentionally worked with packed structs. This is a similar resolution as in b2f10cd4e805 ("perf cpumap: Fix alignment for masks in event encoding"). Fixes: 1eebcb60633f ("libbpf: Implement basic zip archive parsing support") Reported-by: Linux Kernel Functional Testing Signed-off-by: Daniel Müller Signed-off-by: Daniel Borkmann Cc: Ian Rogers Link: https://lore.kernel.org/bpf/CA+G9fYtBnwxAWXi2+GyNByApxnf_DtP1-6+_zOKAdJKnJBexjg@mail.gmail.com/ Link: https://lore.kernel.org/bpf/20230315171550.1551603-1-deso@posteo.net commit 226efec2b0efad60d4a6c4b2c3a8710dafc4dc21 Author: Martin KaFai Lau Date: Wed Mar 15 17:07:26 2023 -0700 selftests/bpf: Fix a fd leak in an error path in network_helpers.c In __start_server, it leaks a fd when setsockopt(SO_REUSEPORT) fails. This patch fixes it. Fixes: eed92afdd14c ("bpf: selftest: Test batching and bpf_(get|set)sockopt in bpf tcp iter") Reported-by: Andrii Nakryiko Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20230316000726.1016773-2-martin.lau@linux.dev commit ed01385c0d78a025bdc72128b7aa7c3309cd5852 Author: Martin KaFai Lau Date: Wed Mar 15 17:07:25 2023 -0700 selftests/bpf: Use ASSERT_EQ instead ASSERT_OK for testing memcmp result In tcp_hdr_options test, it ensures the received tcp hdr option and the sk local storage have the expected values. It uses memcmp to check that. Testing the memcmp result with ASSERT_OK is confusing because ASSERT_OK will print out the errno which is not set. This patch uses ASSERT_EQ to check for 0 instead. Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20230316000726.1016773-1-martin.lau@linux.dev commit 72f6107d2f2294f76d9fb086acd0b01690ea5021 Author: Andrzej Hajda Date: Fri Mar 10 10:23:50 2023 +0100 drm/i915: add guard page to ggtt->error_capture Write-combining memory allows speculative reads by CPU. ggtt->error_capture is WC mapped to CPU, so CPU/MMU can try to prefetch memory beyond the error_capture, ie it tries to read memory pointed by next PTE in GGTT. If this PTE points to invalid address DMAR errors will occur. This behaviour was observed on ADL and RPL platforms. To avoid it, guard scratch page should be added after error_capture. The patch fixes the most annoying issue with error capture but since WC reads are used also in other places there is a risk similar problem can affect them as well. v2: - modified commit message (I hope the diagnosis is correct), - added bug checks to ensure scratch is initialized on gen3 platforms. CI produces strange stacktrace for it suggesting scratch[0] is NULL, to be removed after resolving the issue with gen3 platforms. v3: - removed bug checks, replaced with gen check. v4: - change code for scratch page insertion to support all platforms, - add info in commit message there could be more similar issues v5: - check for nop_clear_range instead of gen8 (Tvrtko), - re-insert scratch pages on resume (Tvrtko) v6: - use scratch_range callback to set scratch pages (Chris) Reviewed-by: Andi Shyti Acked-by: Nirmoy Das Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20230308-guard_error_capture-v6-2-1b5f31422563@intel.com commit b288d740f885648680a8f1bcfbb1039d16be3f13 Author: Andrzej Hajda Date: Fri Mar 10 10:23:49 2023 +0100 drm/i915/gt: introduce vm->scratch_range callback The callback will be responsible for setting scratch page PTEs for specified range. In contrast to clear_range it cannot be optimized to nop. It will be used by code adding guard pages. Reviewed-by: Andi Shyti Reviewed-by: Nirmoy Das Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20230308-guard_error_capture-v6-1-1b5f31422563@intel.com commit fb200218b40b7864f64f1a47de61e035d8934e92 Author: Rob Herring Date: Fri Mar 10 08:47:31 2023 -0600 backlight: as3711: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230310144731.1546190-1-robh@kernel.org commit 796bf946c42644b047c5ad5575906ff9c397fbda Author: Rob Herring Date: Fri Mar 10 08:47:30 2023 -0600 backlight: hx8357: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230310144730.1546101-1-robh@kernel.org commit a884cdf5dc27b489c3e9daf4c095b72e6cc38dae Author: Krzysztof Kozlowski Date: Sat Mar 11 18:35:56 2023 +0100 backlight: arcxcnn_bl: Drop of_match_ptr for ID table The driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/video/backlight/arcxcnn_bl.c:378:34: error: ‘arcxcnn_dt_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230311173556.263086-2-krzysztof.kozlowski@linaro.org commit c857b87202bf5266b45c5b4dc0308aa603aeb262 Author: Krzysztof Kozlowski Date: Sat Mar 11 18:35:55 2023 +0100 backlight: lp855x: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/video/backlight/lp855x_bl.c:551:34: error: ‘lp855x_dt_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230311173556.263086-1-krzysztof.kozlowski@linaro.org commit 4db0ce4038dec3cf5cb42587a111f4415be381b6 Author: Geert Uytterhoeven Date: Mon Mar 13 12:04:21 2023 +0100 arm64: dts: renesas: r8a779a0: Update CAN-FD to R-Car Gen4 compatible value Despite the name, R-Car V3U is the first member of the R-Car Gen4 family. Hence update the compatible property in the CAN-FD device node to include the family-specific compatible value for R-Car Gen4. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/9823058fa57156e88a084a4a99fc8525af1686ff.1678705389.git.geert+renesas@glider.be commit d5136914e48c7da5eab5caefd566b61a3aab4fc1 Author: Geert Uytterhoeven Date: Thu Mar 9 16:30:49 2023 +0100 arm64: dts: renesas: ulcb: Add I2C EEPROM for PMIC Add a device node for the I2C EEPROM which serves as external storage for the PMIC setup. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/b52c6c21a94aa7320ac0c900f7023a5dfca76a29.1678375464.git.geert+renesas@glider.be commit 9f92b342e1388ed1be0e0c27ef8dfc65a3abd7f3 Author: Geert Uytterhoeven Date: Thu Mar 9 16:30:48 2023 +0100 arm64: dts: renesas: condor: Add I2C EEPROM for PMIC Add a device node for the I2C EEPROM which serves as external storage for the PMIC setup. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/84971f48eca0b696f592a922268af8c150d9bae3.1678375464.git.geert+renesas@glider.be commit 279ac702bef0bff67a58a0ed483692932a29ce37 Author: Geert Uytterhoeven Date: Thu Mar 9 16:30:47 2023 +0100 ARM: dts: armadillo800eva: Add I2C EEPROM for MAC address Add a device node for the M24C01 I2C EEPROM which serves as external storage for the Ethernet MAC address. While at it, restore sort order (by unit address) of the devices on the I2C bus. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/6d402b289fd20125d9f6f6b2a4f239aa1887daa6.1678375464.git.geert+renesas@glider.be commit 2653d5bf1c9d123c0d8b8c1634cf54dacfcfdb52 Author: Geert Uytterhoeven Date: Mon Mar 13 12:02:56 2023 +0100 soc: renesas: Use "#ifdef" for single-symbol definition checks Replace "#if defined(CONFIG_)" by "#ifdef CONFIG_" for brevity. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/6026a3fe36735f0e6a0ecb037bf7c45f42aa3daf.1678705241.git.geert+renesas@glider.be commit 641a5e94dc9f61471736d6f776625348f46fb97f Author: Krzysztof Kozlowski Date: Sun Mar 12 14:26:50 2023 +0100 soc: renesas: pwc-rzv2m: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes a !CONFIG_OF error with W=1: drivers/soc/renesas/pwc-rzv2m.c:124:34: error: ‘rzv2m_pwc_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230312132650.352796-2-krzysztof.kozlowski@linaro.org Signed-off-by: Geert Uytterhoeven commit ddb705deeefc9807a5db9ef8da47a020371bfb9c Author: Krzysztof Kozlowski Date: Sun Mar 12 14:26:49 2023 +0100 soc: renesas: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused. With W=1: drivers/soc/renesas/renesas-soc.c:272:34: error: ‘renesas_socs’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230312132650.352796-1-krzysztof.kozlowski@linaro.org Signed-off-by: Geert Uytterhoeven commit 9d7558ed8372c51cbed011cb1dc3eb1beee212cf Author: Geert Uytterhoeven Date: Mon Mar 13 11:49:04 2023 +0100 pinctrl: renesas: Drop support for Renesas-specific properties The last user of the Renesas-specific properties was converted to the standard properties in commit af897250ea54c6f2 ("ARM: dts: gose: use generic pinctrl properties in SDHI nodes") in v4.10. Signed-off-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/ff9c14781110bbf19b56b45dd1f01e6da90319ad.1678704441.git.geert+renesas@glider.be commit 72cd8436ece036294322fecf91567fef3ce3e868 Author: Uwe Kleine-König Date: Sun Mar 12 17:15:05 2023 +0100 clk: renesas: 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 (mostly) ignored 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. 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: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230312161512.2715500-24-u.kleine-koenig@pengutronix.de Signed-off-by: Geert Uytterhoeven commit 4cf2c3ab2cdfed71a7f27fe52b4c87877ee79606 Author: Eric Biggers Date: Wed Mar 15 11:39:07 2023 -0700 blk-crypto: drop the NULL check from blk_crypto_put_keyslot() Now that all callers of blk_crypto_put_keyslot() check for NULL before calling it, there is no need for blk_crypto_put_keyslot() to do the NULL check itself. Reviewed-by: Christoph Hellwig Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20230315183907.53675-2-ebiggers@kernel.org Signed-off-by: Jens Axboe commit 5b8562f0e87b9bc7e581fc482e5a242885f79b88 Author: Eric Biggers Date: Wed Mar 15 11:39:06 2023 -0700 blk-mq: return actual keyslot error in blk_insert_cloned_request() To avoid hiding information, pass on the error code from blk_crypto_rq_get_keyslot() instead of always using BLK_STS_IOERR. Signed-off-by: Eric Biggers Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230315183907.53675-2-ebiggers@kernel.org Signed-off-by: Jens Axboe commit 435c0e999689b7f383d0a27978cdaa08669cf134 Author: Eric Biggers Date: Wed Mar 15 11:39:05 2023 -0700 blk-crypto: remove blk_crypto_insert_cloned_request() blk_crypto_insert_cloned_request() is the same as blk_crypto_rq_get_keyslot(), so just use that directly. Signed-off-by: Eric Biggers Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230315183907.53675-2-ebiggers@kernel.org Signed-off-by: Jens Axboe commit 5c7cb94452901a93e90c2230632e2c12a681bc92 Author: Eric Biggers Date: Wed Mar 15 11:39:04 2023 -0700 blk-crypto: make blk_crypto_evict_key() more robust If blk_crypto_evict_key() sees that the key is still in-use (due to a bug) or that ->keyslot_evict failed, it currently just returns while leaving the key linked into the keyslot management structures. However, blk_crypto_evict_key() is only called in contexts such as inode eviction where failure is not an option. So actually the caller proceeds with freeing the blk_crypto_key regardless of the return value of blk_crypto_evict_key(). These two assumptions don't match, and the result is that there can be a use-after-free in blk_crypto_reprogram_all_keys() after one of these errors occurs. (Note, these errors *shouldn't* happen; we're just talking about what happens if they do anyway.) Fix this by making blk_crypto_evict_key() unlink the key from the keyslot management structures even on failure. Also improve some comments. Fixes: 1b2628397058 ("block: Keyslot Manager for Inline Encryption") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230315183907.53675-2-ebiggers@kernel.org Signed-off-by: Jens Axboe commit 70493a63ba04f754f7a7dd53a4fcc82700181490 Author: Eric Biggers Date: Wed Mar 15 11:39:03 2023 -0700 blk-crypto: make blk_crypto_evict_key() return void blk_crypto_evict_key() is only called in contexts such as inode eviction where failure is not an option. So there is nothing the caller can do with errors except log them. (dm-table.c does "use" the error code, but only to pass on to upper layers, so it doesn't really count.) Just make blk_crypto_evict_key() return void and log errors itself. Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230315183907.53675-2-ebiggers@kernel.org Signed-off-by: Jens Axboe commit 9cd1e566676bbcb8a126acd921e4e194e6339603 Author: Eric Biggers Date: Wed Mar 15 11:39:02 2023 -0700 blk-mq: release crypto keyslot before reporting I/O complete Once all I/O using a blk_crypto_key has completed, filesystems can call blk_crypto_evict_key(). However, the block layer currently doesn't call blk_crypto_put_keyslot() until the request is being freed, which happens after upper layers have been told (via bio_endio()) the I/O has completed. This causes a race condition where blk_crypto_evict_key() can see 'slot_refs != 0' without there being an actual bug. This makes __blk_crypto_evict_key() hit the 'WARN_ON_ONCE(atomic_read(&slot->slot_refs) != 0)' and return without doing anything, eventually causing a use-after-free in blk_crypto_reprogram_all_keys(). (This is a very rare bug and has only been seen when per-file keys are being used with fscrypt.) There are two options to fix this: either release the keyslot before bio_endio() is called on the request's last bio, or make __blk_crypto_evict_key() ignore slot_refs. Let's go with the first solution, since it preserves the ability to report bugs (via WARN_ON_ONCE) where a key is evicted while still in-use. Fixes: a892c8d52c02 ("block: Inline encryption support for blk-mq") Cc: stable@vger.kernel.org Reviewed-by: Nathan Huckleberry Reviewed-by: Christoph Hellwig Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20230315183907.53675-2-ebiggers@kernel.org Signed-off-by: Jens Axboe commit 820d7550a99cc09bb321fb2b890647e3669ce53f Author: Rafał Miłecki Date: Thu Mar 16 14:55:46 2023 +0100 dt-bindings: leds: Add "usbport" trigger Linux's "usbport" trigger is a bit specific one. It allows LED to follow state of multiple USB ports which have to be selected additionally (there isn't a single trigger for each port). Default list of USB ports to monitor can be specified using "trigger-sources" DT property. Theoretically it should be possible for Linux to deduce applicable trigger based on the references nodes in the "trigger-sources". It hasn't been implemented however (probably due to laziness). Milk spilled - we already have DT files specifying "usbport" manually - allow that value in the binding. This fixes validation of in-kernel and external DT files. Signed-off-by: Rafał Miłecki Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230316135546.9162-1-zajec5@gmail.com commit b9da86e3aade0cd8c8b60a0f6356e7730fc90d5d Author: Ira Weiny Date: Wed Mar 15 16:20:54 2023 -0700 x86/uaccess: Remove memcpy_page_flushcache() Commit 21b56c847753 ("iov_iter: get rid of separate bvec and xarray callbacks") removed the calls to memcpy_page_flushcache(). In addition, memcpy_page_flushcache() uses the deprecated kmap_atomic(). Remove the unused x86 memcpy_page_flushcache() implementation and also get rid of one more kmap_atomic() user. [ dhansen: tweak changelog ] Signed-off-by: Ira Weiny Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20221230-kmap-x86-v1-1-15f1ecccab50%40intel.com commit fd3c3584539026a708493a49f65d8ff3eb369002 Author: Hans de Goede Date: Mon Mar 13 14:02:41 2023 +0100 platform/x86: pcengines-apuv2: Drop platform:pcengines-apuv2 module-alias The driver auto-loads based on the DMI modaliases and this platform modalias is not necessary and broken: 1. Not necessary since the driver itself creates the platform_device, so it is already loaded when the modalias might be used 2. From a quick scan of the code it does not create any platform-devices called "platform:pcengines-apuv2" Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230313130241.778146-1-hdegoede@redhat.com commit 06984c83e9afbb718f501b17b1f0a7a4ae6d0bb5 Author: Krzysztof Kozlowski Date: Sun Mar 12 14:26:24 2023 +0100 platform/x86: sony: mark SPI related data as maybe unused The driver can be compile tested as built-in making certain data unused: drivers/platform/x86/sony-laptop.c:3290:36: error: ‘sony_device_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230312132624.352703-3-krzysztof.kozlowski@linaro.org Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit e970607955eba62bb361e9dea493cd103e5ebd6b Author: Krzysztof Kozlowski Date: Sun Mar 12 14:26:23 2023 +0100 platform/x86: classmate: mark SPI related data as maybe unused The driver can be compile tested as built-in making certain data unused: drivers/platform/x86/classmate-laptop.c:1137:36: error: ‘cmpc_device_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230312132624.352703-2-krzysztof.kozlowski@linaro.org Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 1aeff621689120db60cb7029e5a0fde7d01f7fb6 Author: Fenglin Wu Date: Fri Mar 3 17:50:23 2023 +0800 dt-bindings: leds: Add QCOM flash LED controller Add binding document for flash LED module inside Qualcomm Technologies, Inc. PMICs. Signed-off-by: Fenglin Wu Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230303095023.538917-3-quic_fenglinw@quicinc.com commit 96a2e242a5dcb677fe3063be38bda335c17849d3 Author: Fenglin Wu Date: Fri Mar 3 17:50:22 2023 +0800 leds: flash: Add driver to support flash LED module in QCOM PMICs Add initial driver to support flash LED module found in Qualcomm Technologies, Inc. PMICs. The flash module can have 3 or 4 channels and each channel can be controlled indepedently and support full scale current up to 1.5 A. It also supports connecting two channels together to supply one LED component with full scale current up to 2 A. In that case, the current will be split on each channel symmetrically and the channels will be enabled and disabled at the same time. Signed-off-by: Fenglin Wu Tested-by: Luca Weiss # sm7225-fairphone-fp4 + pm6150l Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230303095023.538917-2-quic_fenglinw@quicinc.com commit 8f0adae1cb1a3cf83e38dd435831baa38dd84b4c Author: Linus Walleij Date: Tue Mar 14 22:00:59 2023 +0100 leds: Mark GPIO LED trigger broken The GPIO LED trigger exposes a userspace ABI where a user can echo a GPIO number from the global GPIO numberspace into a file that will trigger a certain LED when active. This is problematic because the global GPIO numberspace is inherently instable. The trigger came about at a time when systems had one GPIO controller that defined hard-wired GPIOs numbered 0..N and this number space was stable. We have since moved to dynamic allocation of GPIO numbers and there is no real guarantee that a GPIO number will stay consistent even across a reboot: consider a USB attached GPIO controller for example. Or two. Or the effect of probe order after adding -EPROBE_DEFER to the kernel. The trigger was added to support keypad LEDs on the Nokia n810 from the GPIO event when a user slides up/down the keypad. This is arch/arm/boot/dts/omap2420-n810.dts. A userspace script is needed to activate the trigger. This will be broken unless the script was updated recently since the OMAP GPIO controller now uses dynamic GPIO number allocations. I want to know that this trigger has active users that cannot live without it if we are to continue to support it. Option if this is really needed: I can develop a new trigger that can associate GPIOs with LEDs as triggers using device tree, which should also remove the use of userspace custom scripts to achieve this and be much more trustworthy, if someone with the Nokia n810 or a device with a similar need is willing to test it. Suggested-by Pavel Machek Signed-off-by: Linus Walleij Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230314210059.419159-1-linus.walleij@linaro.org commit e0248a258c7f5f7b0a3f2283f5cd2e472dfb7eeb Author: Krzysztof Kozlowski Date: Sat Mar 11 12:17:17 2023 +0100 leds: tlc591xx: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/leds/leds-tlc591xx.c:138:34: error: ‘of_tlc591xx_leds_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Pavel Machek Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230311111717.252019-1-krzysztof.kozlowski@linaro.org commit e91a4d5deb96c496ef8e6fd8d7342515d9e64ab5 Author: Manivannan Sadhasivam Date: Fri Mar 3 17:59:25 2023 +0530 dt-bindings: leds: Document commonly used LED triggers Document the commonly used LED triggers by the SoCs. Not all triggers are documented as some of them are very application specific. Most of the triggers documented here are currently used in devicetrees of many SoCs. While at it, add missing comments and also place the comment above the triggers (hci, mmc, wlan) to match the rest of the binding. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230303122925.6610-1-manivannan.sadhasivam@linaro.org commit 8af70e202ac4ea5dd2d5561cc2675bc09b30412e Author: Thomas Weißschuh Date: Sat Feb 18 17:21:21 2023 +0000 leds: Fix reference to led_set_brightness() in doc The referenced function led_classdev_brightness_set() never existed. Fixes: 5ada28bf7675 ("led-class: always implement blinking") Signed-off-by: Thomas Weißschuh Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230218-typo-led-set-v1-1-3c35362a2f2d@weissschuh.net commit 6d19367b9e2f63e14bc034110f34b9a112b43ce0 Author: Andy Shevchenko Date: Wed Feb 15 19:04:03 2023 +0200 leds: lp8860: Remove duplicate NULL checks for gpio_desc gpiod_*() API check already for the NULL, no need to repeat that in the driver. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230215170403.84449-2-andriy.shevchenko@linux.intel.com commit 2956ad80fc56af2cb3a6bb374ebe587795abff0f Author: Andy Shevchenko Date: Wed Feb 15 19:04:02 2023 +0200 leds: lp8860: Remove unused of_gpio,h of_gpio.h provides a single function, which is not used in this driver. Remove unused header. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230215170403.84449-1-andriy.shevchenko@linux.intel.com commit a61079efc87888587e463afaed82417b162fbd69 Author: Randy Dunlap Date: Sat Feb 25 21:39:49 2023 -0800 leds: TI_LMU_COMMON: select REGMAP instead of depending on it REGMAP is a hidden (not user visible) symbol. Users cannot set it directly thru "make *config", so drivers should select it instead of depending on it if they need it. Consistently using "select" or "depends on" can also help reduce Kconfig circular dependency issues. Therefore, change the use of "depends on REGMAP" to "select REGMAP". Fixes: 3fce8e1eb994 ("leds: TI LMU: Add common code for TI LMU devices") Signed-off-by: Randy Dunlap Acked-by: Pavel Machek Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230226053953.4681-5-rdunlap@infradead.org commit 541ec23c603dcb3b9cebebe40d9a68cdc89dd36b Author: Uwe Kleine-König Date: Wed Mar 8 08:39:45 2023 +0100 backlight: sky81452-backlight: 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 (mostly) ignored 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. 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308073945.2336302-14-u.kleine-koenig@pengutronix.de commit 20c111d2e18c7318a9f2ae815c84ea0a9218317e Author: Uwe Kleine-König Date: Wed Mar 8 08:39:44 2023 +0100 backlight: rt4831-backlight: 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 (mostly) ignored 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. 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308073945.2336302-13-u.kleine-koenig@pengutronix.de commit ea379bc80231c8a86730f854e436eff19a729950 Author: Uwe Kleine-König Date: Wed Mar 8 08:39:43 2023 +0100 backlight: qcom-wled: 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 (mostly) ignored 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. 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308073945.2336302-12-u.kleine-koenig@pengutronix.de commit 0a4606a7a4bc6f876354ff6d90b969172208eeef Author: Uwe Kleine-König Date: Wed Mar 8 08:39:42 2023 +0100 backlight: pwm_bl: 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 (mostly) ignored 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. 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308073945.2336302-11-u.kleine-koenig@pengutronix.de commit 519e5cc52946c62878b4b4a7ef9f79fcb8164c52 Author: Uwe Kleine-König Date: Wed Mar 8 08:39:41 2023 +0100 backlight: mt6370-backlight: 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 (mostly) ignored 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. 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308073945.2336302-10-u.kleine-koenig@pengutronix.de commit 1c708d346c15e2cd2e0f701e6df04094d1b544ca Author: Uwe Kleine-König Date: Wed Mar 8 08:39:40 2023 +0100 backlight: lp8788_bl: 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 (mostly) ignored 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. 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308073945.2336302-9-u.kleine-koenig@pengutronix.de commit cba7dfe04f84f39e0fea353eec511b9ce8455e59 Author: Uwe Kleine-König Date: Wed Mar 8 08:39:39 2023 +0100 backlight: lm3533_bl: 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 (mostly) ignored 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. 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308073945.2336302-8-u.kleine-koenig@pengutronix.de commit c4c4fa57fd3cc00020152baa169337521f90b2ad Author: Uwe Kleine-König Date: Wed Mar 8 08:39:38 2023 +0100 backlight: led_bl: 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 (mostly) ignored 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. 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308073945.2336302-7-u.kleine-koenig@pengutronix.de commit 7150f8c2aa9d28a9bdc2f67180df26af5896253d Author: Uwe Kleine-König Date: Wed Mar 8 08:39:37 2023 +0100 backlight: hp680_bl: 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 (mostly) ignored 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. 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308073945.2336302-6-u.kleine-koenig@pengutronix.de commit 78a2bb4802071788ce2315f1c8002f10b121d33c Author: Uwe Kleine-König Date: Wed Mar 8 08:39:36 2023 +0100 backlight: da9052_bl: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Adam Ward Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308073945.2336302-5-u.kleine-koenig@pengutronix.de commit f6672d7f0cff6ee8bd09851545b60e41099197ae Author: Uwe Kleine-König Date: Wed Mar 8 08:39:35 2023 +0100 backlight: cr_bllcd: 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 (mostly) ignored 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. 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308073945.2336302-4-u.kleine-koenig@pengutronix.de commit 6879039167ff4b6805760f1c5935e93c92dc6aa4 Author: Uwe Kleine-König Date: Wed Mar 8 08:39:34 2023 +0100 backlight: adp5520_bl: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Michael Hennerich Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308073945.2336302-3-u.kleine-koenig@pengutronix.de commit 8b339caf4255a5cfafdc743be601100c5da6c304 Author: Uwe Kleine-König Date: Wed Mar 8 08:39:33 2023 +0100 backlight: aat2870_bl: 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 (mostly) ignored 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. 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: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230308073945.2336302-2-u.kleine-koenig@pengutronix.de commit 10258bf4534bf8123b5fa620f73fe69901857f69 Author: Luca Weiss Date: Mon Feb 6 20:58:30 2023 +0100 backlight: qcom-wled: Add PMI8950 compatible PMI8950 contains WLED of version 4. Add support for it to the driver. Signed-off-by: Luca Weiss Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221226-msm8953-6-2-wled-v1-1-e318d4c71d05@z3ntu.xyz commit c7d18b40a80e5c0a31e1dbea15c9591c4150e0e4 Author: Vinod Govindapillai Date: Wed Feb 15 10:38:32 2023 +0200 drm/i915/display: ignore link training failures in CI If the ignore long HPD flag is set, ignore the link training failures as well. Because of spurious HPDs, some unexpected link training failures are happening while executing IGT test cases. Ignore the link training failures for the time being if the long HPDs are also ignored in the environments like CI. Signed-off-by: Vinod Govindapillai Reviewed-by: Imre Deak Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230215083832.287519-3-vinod.govindapillai@intel.com commit b0fbef65e227ad4ea81bf2ad3d17d073bd0c68de Author: Vinod Govindapillai Date: Wed Feb 15 10:38:31 2023 +0200 drm/i915/display: ignore long HPDs based on a flag Some panels generate long HPD events even while connected to the port. This cause some unexpected CI execution issues. A new flag is added to track if such spurious long HPDs can be ignored and are not processed further if the flag is set. Debugfs entry is added to control the ignore long hpd flag. v2: Address patch styling comments (Jani Nikula) v3: Ignoring the HPD moved to hotplug handler and now applies to all types of outputs (Imre Deak) v4: use debugfs_create_bool and squash patches (Jani Nikula) Signed-off-by: Vinod Govindapillai Reviewed-by: Imre Deak Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230215083832.287519-2-vinod.govindapillai@intel.com commit daaa2a1f78347d73016b3a331fd48a0ca9e62192 Author: Thomas Weißschuh Date: Tue Mar 14 00:07:52 2023 +0000 platform/x86: think-lmi: Remove custom kobject sysfs_ops think-lmi defines its own sysfs_ops that are identical to the standard kobj_sysfs_ops. Use the standard definitions. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230314-think-lmi-sysfs_ops-v1-1-9d4f1cf9caec@weissschuh.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit da62908efe80f132f691efc2ace4ca67626de86b Author: Thomas Weißschuh Date: Sun Mar 12 03:47:57 2023 +0000 platform/x86: think-lmi: Properly interpret return value of tlmi_setting The return value of tlmi_settings() is an errorcode, not an acpi_status. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230312-think-lmi-status-v1-1-4e9f36322cc4@weissschuh.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 8496bacae643018a2e24f76aa22426c4b9264933 Author: Jiapeng Chong Date: Thu Mar 9 14:10:45 2023 +0800 platform/x86: acerhdf: Remove unneeded semicolon Fix the following warning: ./drivers/platform/x86/acerhdf.c:343:2-3: Unneeded semicolon. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2271 Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20230309061045.25256-1-jiapeng.chong@linux.alibaba.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit d8708b80fa0e6e21bc0c9e7276ad0bccef73b6e7 Author: Thomas Huth Date: Wed Feb 8 15:01:05 2023 +0100 KVM: Change return type of kvm_arch_vm_ioctl() to "int" All kvm_arch_vm_ioctl() implementations now only deal with "int" types as return values, so we can change the return type of these functions to use "int" instead of "long". Signed-off-by: Thomas Huth Acked-by: Anup Patel Message-Id: <20230208140105.655814-7-thuth@redhat.com> Signed-off-by: Paolo Bonzini commit f15ba52bfabc3bc130053bd73d414d859162de91 Author: Thomas Huth Date: Wed Feb 8 15:01:04 2023 +0100 KVM: Standardize on "int" return types instead of "long" in kvm_main.c KVM functions use "long" return values for functions that are wired up to "struct file_operations", but otherwise use "int" return values for functions that can return 0/-errno in order to avoid unintentional divergences between 32-bit and 64-bit kernels. Some code still uses "long" in unnecessary spots, though, which can cause a little bit of confusion and unnecessary size casts. Let's change these spots to use "int" types, too. Signed-off-by: Thomas Huth Message-Id: <20230208140105.655814-6-thuth@redhat.com> Signed-off-by: Paolo Bonzini commit 2def950c63e3f976af87a2606dabe0c9e21c605b Author: Thomas Huth Date: Wed Feb 8 15:01:03 2023 +0100 KVM: arm64: Limit length in kvm_vm_ioctl_mte_copy_tags() to INT_MAX In case of success, this function returns the amount of handled bytes. However, this does not work for large values: The function is called from kvm_arch_vm_ioctl() (which still returns a long), which in turn is called from kvm_vm_ioctl() in virt/kvm/kvm_main.c. And that function stores the return value in an "int r" variable. So the upper 32-bits of the "long" return value are lost there. KVM ioctl functions should only return "int" values, so let's limit the amount of bytes that can be requested here to INT_MAX to avoid the problem with the truncated return value. We can then also change the return type of the function to "int" to make it clearer that it is not possible to return a "long" here. Fixes: f0376edb1ddc ("KVM: arm64: Add ioctl to fetch/store tags in a guest") Signed-off-by: Thomas Huth Reviewed-by: Cornelia Huck Reviewed-by: Gavin Shan Reviewed-by: Steven Price Message-Id: <20230208140105.655814-5-thuth@redhat.com> Signed-off-by: Paolo Bonzini commit c5edd753a0bd6243a597f5199c227a50457ee179 Author: Thomas Huth Date: Wed Feb 8 15:01:02 2023 +0100 KVM: x86: Remove the KVM_GET_NR_MMU_PAGES ioctl The KVM_GET_NR_MMU_PAGES ioctl is quite questionable on 64-bit hosts since it fails to return the full 64 bits of the value that can be set with the corresponding KVM_SET_NR_MMU_PAGES call. Its "long" return value is truncated into an "int" in the kvm_arch_vm_ioctl() function. Since this ioctl also never has been used by userspace applications (QEMU, Google's internal VMM, kvmtool and CrosVM have been checked), it's likely the best if we remove this badly designed ioctl before anybody really tries to use it. Signed-off-by: Thomas Huth Reviewed-by: Sean Christopherson Message-Id: <20230208140105.655814-4-thuth@redhat.com> Signed-off-by: Paolo Bonzini commit 71fb165e23e3b66e68ca7baab6c317c2663c32d5 Author: Thomas Huth Date: Wed Feb 8 15:01:01 2023 +0100 KVM: s390: Use "int" as return type for kvm_s390_get/set_skeys() These two functions only return normal integers, so it does not make sense to declare the return type as "long" here. Reviewed-by: Claudio Imbrenda Signed-off-by: Thomas Huth Message-Id: <20230208140105.655814-3-thuth@redhat.com> Signed-off-by: Paolo Bonzini commit 67c48662e2b5539f0ba3d4151f4e7e84c9871324 Author: Thomas Huth Date: Wed Feb 8 15:01:00 2023 +0100 KVM: PPC: Standardize on "int" return types in the powerpc KVM code Most functions that are related to kvm_arch_vm_ioctl() already use "int" as return type to pass error values back to the caller. Some outlier functions use "long" instead for no good reason (they do not really require long values here). Let's standardize on "int" here to avoid casting the values back and forth between the two types. Reviewed-by: Nicholas Piggin Signed-off-by: Thomas Huth Message-Id: <20230208140105.655814-2-thuth@redhat.com> Signed-off-by: Paolo Bonzini commit 45cf86f26148e549c5ba4a8ab32a390e4bde216e Author: Emanuele Giuseppe Esposito Date: Wed Feb 1 08:29:05 2023 -0500 kvm: x86: Advertise FLUSH_L1D to user space FLUSH_L1D was already added in 11e34e64e4103, but the feature is not visible to userspace yet. The bit definition: CPUID.(EAX=7,ECX=0):EDX[bit 28] If the feature is supported by the host, kvm should support it too so that userspace can choose whether to expose it to the guest or not. One disadvantage of not exposing it is that the guest will report a non existing vulnerability in /sys/devices/system/cpu/vulnerabilities/mmio_stale_data because the mitigation is present only if the guest supports (FLUSH_L1D and MD_CLEAR) or FB_CLEAR. Signed-off-by: Emanuele Giuseppe Esposito Message-Id: <20230201132905.549148-4-eesposit@redhat.com> Signed-off-by: Paolo Bonzini commit 723d5fb0ffe4c02bd4edf47ea02c02e454719f28 Author: Emanuele Giuseppe Esposito Date: Wed Feb 1 08:29:04 2023 -0500 kvm: svm: Add IA32_FLUSH_CMD guest support Expose IA32_FLUSH_CMD to the guest if the guest CPUID enumerates support for this MSR. As with IA32_PRED_CMD, permission for unintercepted writes to this MSR will be granted to the guest after the first non-zero write. Signed-off-by: Emanuele Giuseppe Esposito Message-Id: <20230201132905.549148-3-eesposit@redhat.com> Signed-off-by: Paolo Bonzini commit 91576acab0203062b93a578a7d05c8fe9e527f80 Author: Srinivas Pandruvada Date: Tue Mar 7 23:06:42 2023 -0800 platform/x86: ISST: Add suspend/resume callbacks To support S3/S4 with TPMI interface add suspend/resume callbacks. Here HW state is stored in suspend callback and restored during resume callback. The hardware state which needs to be stored/restored: - CLOS configuration - CLOS Association - SST-CP enable/disable status - SST-PP perf level setting Signed-off-by: Srinivas Pandruvada Suggested-by: Hans de Goede Reviewed-by: Zhang Rui Tested-by: Pragya Tanwar Link: https://lore.kernel.org/r/20230308070642.1727167-9-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit f8e0077a9d526cac7abbc682d83e98f834ffa909 Author: Srinivas Pandruvada Date: Tue Mar 7 23:06:41 2023 -0800 platform/x86: ISST: Add SST-TF support via TPMI The support of Intel Speed Select Technology - Turbo Frequency (SST-TF) feature enables the ability to set different “All core turbo ratio limits” to cores based on the priority. By using this feature, some cores can be configured to get higher turbo frequency by designating them as high priority at the cost of lower or no turbo frequency on the low priority cores. One new IOCTLs are added: ISST_IF_GET_TURBO_FREQ_INFO : Get information about turbo frequency buckets Once an instance is identified, read or write from correct MMIO offset for a given field as defined in the specification. For details on SST-TF operations using intel-speed-selet utility, refer to: Documentation/admin-guide/pm/intel-speed-select.rst under the kernel documentation Signed-off-by: Srinivas Pandruvada Reviewed-by: Zhang Rui Tested-by: Pragya Tanwar Link: https://lore.kernel.org/r/20230308070642.1727167-8-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit 06a61df83209ac7f376616f83f3485217c703d50 Author: Srinivas Pandruvada Date: Tue Mar 7 23:06:40 2023 -0800 platform/x86: ISST: Add SST-BF support via TPMI The Intel Speed Select Technology - Base Frequency (SST-BF) feature lets the user control base frequency. If some critical workload threads demand constant high guaranteed performance, then this feature can be used to execute the thread at higher base frequency on specific sets of CPUs (high priority CPUs) at the cost of lower base frequency (low priority CPUs) on other CPUs. Two new IOCTLs are added: ISST_IF_GET_BASE_FREQ_INFO : Get frequency information for high and low priority CPUs ISST_IF_GET_BASE_FREQ_CPU_MASK : CPUs capable of higher frequency Once an instance is identified, read or write from correct MMIO offset for a given field as defined in the specification. For details on SST-BF operations using intel-speed-selet utility, refer to: Documentation/admin-guide/pm/intel-speed-select.rst under the kernel documentation Signed-off-by: Srinivas Pandruvada Reviewed-by: Zhang Rui Tested-by: Pragya Tanwar Link: https://lore.kernel.org/r/20230308070642.1727167-7-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit ea009e4769fa3bd05d4c111c3b6865eb3a9be829 Author: Srinivas Pandruvada Date: Tue Mar 7 23:06:39 2023 -0800 platform/x86: ISST: Add SST-PP support via TPMI This Intel Speed Select Technology - Performance Profile (SST-PP) feature introduces a mechanism that allows multiple optimized performance profiles per system. Each profile defines a set of CPUs that need to be online and rest offline to sustain a guaranteed base frequency. Five new IOCTLs are added: ISST_IF_PERF_LEVELS : Get number of performance levels ISST_IF_PERF_SET_LEVEL : Set to a new performance level ISST_IF_PERF_SET_FEATURE : Activate SST-BF/SST-TF for a performance level ISST_IF_GET_PERF_LEVEL_INFO : Get parameters for a performance level ISST_IF_GET_PERF_LEVEL_CPU_MASK : Get CPU mask for a performance level Once an instance is identified, read or write from correct MMIO offset for a given field as defined in the specification. For details on SST PP operations using intel-speed-selet utility, refer to: Documentation/admin-guide/pm/intel-speed-select.rst under the kernel documentation Signed-off-by: Srinivas Pandruvada Reviewed-by: Zhang Rui Tested-by: Pragya Tanwar Link: https://lore.kernel.org/r/20230308070642.1727167-6-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit 12a7d2cb811dd8a884dea088a2701fcb8d00136e Author: Srinivas Pandruvada Date: Tue Mar 7 23:06:38 2023 -0800 platform/x86: ISST: Add SST-CP support via TPMI Intel Speed Select Technology Core Power (SST-CP) is an interface that allows users to define per core priority. This defines a mechanism to distribute power among cores when there is a power constrained scenario. This defines a class of service (CLOS) configuration. Three new IOCTLs are added: ISST_IF_CORE_POWER_STATE : Enable/Disable SST-CP ISST_IF_CLOS_PARAM : Configure CLOS parameters ISST_IF_CLOS_ASSOC : Associate CPUs to a CLOS To associate CPUs to CLOS, either Linux CPU numbering or PUNIT numbering scheme can be used, using parameter punit_cpu_map (1: for PUNIT numbering 0 for Linux CPU number). There is no change to IOCTL to get PUNIT CPU number for a CPU. Introduce get_instance() function, which is used by majority of IOCTLs processing to convert a socket and power domain to tpmi_per_power_domain_info * instance. This instance has all the MMIO offsets stored to read a particular field. Once an instance is identified, read or write from correct MMIO offset for a given field as defined in the specification. For details on SST CP operations using intel-speed-selet utility, refer to: Documentation/admin-guide/pm/intel-speed-select.rst under the kernel documentation Signed-off-by: Srinivas Pandruvada Reviewed-by: Zhang Rui Tested-by: Pragya Tanwar Link: https://lore.kernel.org/r/20230308070642.1727167-5-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit 0ab147bb840fca2bc3bca88f320b34c5b5cc013c Author: Srinivas Pandruvada Date: Tue Mar 7 23:06:37 2023 -0800 platform/x86: ISST: Parse SST MMIO and update instance SST registers are presented to OS in multi-layer structures starting with a SST header showing version information freezing current definition. For details on SST terminology refer to Documentation/admin-guide/pm/intel-speed-select.rst under the kernel documentation SST TPMI details are published in the following document: https://github.com/intel/tpmi_power_management/blob/main/SST_TPMI_public_disclosure_FINAL.docx SST MMIO structure layout follows: SST-HEADER SST-CP Header SST-CP CONTROL SST-CP STATUS SST-CP CONFIG0 SST-CP CONFIG1 ... ... SST-PP Header SST-PP OFFSET_0 SST-PP OFFSET_1 SST_PP_0_INFO SST_PP_1_INFO SST_PP_2_INFO SST_PP_3_INFO SST-PP CONTROL SST-PP STATUS Each register bank contains information to get to next lower level information. This information is parsed and stored in the struct tpmi_per_power_domain_info for each domain. This information is used to process each SST requests. Signed-off-by: Srinivas Pandruvada Reviewed-by: Zhang Rui Tested-by: Pragya Tanwar Link: https://lore.kernel.org/r/20230308070642.1727167-4-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit d805456c712f93ba8a012430f2a93bec133b6ff4 Author: Srinivas Pandruvada Date: Tue Mar 7 23:06:36 2023 -0800 platform/x86: ISST: Enumerate TPMI SST and create framework Enumerate TPMI SST driver and create basic framework to add more features. The basic user space interface is still same as the legacy using /dev/isst_interface. Users of "intel-speed-select" utility should be able to use same commands as prior gens without being aware of new underlying hardware interface. TPMI SST driver enumerates on device "intel_vsec.tpmi-sst". Since there can be multiple instances and there is one common SST core, split implementation into two parts: A common core part and an enumeration part. The enumeration driver is loaded for each device instance and register with the TPMI SST core driver. On very first enumeration the TPMI SST core driver register with SST core driver to get IOCTL callbacks. The api_version is incremented for IOCTL ISST_IF_GET_PLATFORM_INFO, so that user space can issue new IOCTLs. Each TPMI package contains multiple power domains. Each power domain has its own set of SST controls. For each domain map the MMIO memory and update per domain struct tpmi_per_power_domain_info. This information will be used to implement other SST interfaces. Implement first IOCTL commands to get number of TPMI SST instances and instance mask as some of the power domains may not have any SST controls. Signed-off-by: Srinivas Pandruvada Reviewed-by: Hans de Goede Reviewed-by: Zhang Rui Tested-by: Pragya Tanwar Link: https://lore.kernel.org/r/20230308070642.1727167-3-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit a807b78ad04b2eaa348f52f5cc7702385b6de1ee Author: Emanuele Giuseppe Esposito Date: Wed Feb 1 08:29:03 2023 -0500 kvm: vmx: Add IA32_FLUSH_CMD guest support Expose IA32_FLUSH_CMD to the guest if the guest CPUID enumerates support for this MSR. As with IA32_PRED_CMD, permission for unintercepted writes to this MSR will be granted to the guest after the first non-zero write. Co-developed-by: Jim Mattson Signed-off-by: Jim Mattson Signed-off-by: Emanuele Giuseppe Esposito Message-Id: <20230201132905.549148-2-eesposit@redhat.com> Signed-off-by: Paolo Bonzini commit e6d3418130cdf718eff72db9a05d7262ebb49cff Author: Srinivas Pandruvada Date: Tue Mar 7 23:06:35 2023 -0800 platform/x86: ISST: Add support for MSR 0x54 To map Linux CPU numbering scheme to hardware CPU numbering scheme MSR 0x53 is getting used. But for new generation of CPUs, this MSR is not valid. Since this is model specific MSR, this is possible. A new MSR 0x54 is defined for this purpose. User space can use the API version to distinguish format from MSR 0x53. Intel speed select utility is updated to use the new format based on the API version. Signed-off-by: Srinivas Pandruvada Reviewed-by: Zhang Rui Tested-by: Pragya Tanwar Link: https://lore.kernel.org/r/20230308070642.1727167-2-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit b24343eaceedb902c1625854f85a193b0549d85f Author: Tom Rix Date: Thu Mar 2 07:48:19 2023 -0500 drm/nouveau/nvfw/acr: set wpr_generic_header_dump storage-class-specifier to static gcc with W=1 reports drivers/gpu/drm/nouveau/nvkm/nvfw/acr.c:49:1: error: no previous prototype for ‘wpr_generic_header_dump’ [-Werror=missing-prototypes] 49 | wpr_generic_header_dump(struct nvkm_subdev *subdev, | ^~~~~~~~~~~~~~~~~~~~~~~ wpr_generic_header_dump is only used in acr.c, so it should be static Signed-off-by: Tom Rix Reviewed-by: Karol Herbst Signed-off-by: Karol Herbst Link: https://patchwork.freedesktop.org/patch/msgid/20230302124819.686469-1-trix@redhat.com commit c14bff92abfe464974c795ad53625ffbb6d6ef31 Author: Tom Rix Date: Tue Feb 28 17:15:33 2023 -0500 drm/nouveau/fifo: set nvkm_engn_cgrp_get storage-class-specifier to static smatch reports drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c:33:18: warning: symbol 'nvkm_engn_cgrp_get' was not declared. Should it be static? nvkm_engn_cgrp_get is only used in runl.c, so it should be static Signed-off-by: Tom Rix Reviewed-by: Karol Herbst Signed-off-by: Karol Herbst Link: https://patchwork.freedesktop.org/patch/msgid/20230228221533.3240520-1-trix@redhat.com commit abe3c66f3491ff14a5d616921441452f2c9693ff Author: Tom Rix Date: Fri Mar 3 08:27:31 2023 -0500 drm/nouveau/fifo: set gf100_fifo_nonstall_block_dump storage-class-specifier to static gcc with W=1 reports drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c:451:1: error: no previous prototype for ‘gf100_fifo_nonstall_block’ [-Werror=missing-prototypes] 451 | gf100_fifo_nonstall_block(struct nvkm_event *event, int type, int index) | ^~~~~~~~~~~~~~~~~~~~~~~~~ gf100_fifo_nonstall_block is only used in gf100.c, so it should be static Signed-off-by: Tom Rix Reviewed-by: Karol Herbst Signed-off-by: Karol Herbst Link: https://patchwork.freedesktop.org/patch/msgid/20230303132731.1919329-1-trix@redhat.com commit 3ed0b880b71489d59f89b0bc1323ad34a136cca0 Author: Koba Ko Date: Wed Mar 8 14:24:14 2023 +0800 platform/x86: dell-laptop: Register ctl-led for speaker-mute Some platforms have the speaker-mute led and current driver doesn't control it. If the platform support the control of speaker-mute led, register it Signed-off-by: Koba Ko Link: https://lore.kernel.org/r/20230308062414.1048913-1-koba.ko@canonical.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 39e2ba648a6ee4519a5f0aa4cb995f8c97c5db6f Author: Maximilian Luz Date: Sat Mar 4 20:46:11 2023 +0100 platform/surface: aggregator_registry: Add support for tablet-mode switch on Surface Pro 9 Add support for the POS-subsystem tablet-mode switch used on the Surface Pro 9. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20230304194611.87770-4-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 37ff64cd81ff0abbe901fd4cf401998d534c1cd7 Author: Maximilian Luz Date: Sat Mar 4 20:46:10 2023 +0100 platform/surface: aggregator_tabletsw: Add support for Type-Cover posture source Implement support for the Type-Cover posture source (ID 0x00), found on the Surface Pro 9. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20230304194611.87770-3-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit b58a444d7f28ea59fd37a4615e6be86f5d45c880 Author: Maximilian Luz Date: Sat Mar 4 20:46:09 2023 +0100 platform/surface: aggregator_tabletsw: Properly handle different posture source IDs The device posture subsystem (POS) can provide different posture sources. Different sources can provide different posture states and sources can be identified by their ID. For example, screen posture of the Surface Laptop Studio (SLS), which is currently the only supported source, uses a source ID of 0x03. The Surface Pro 9 uses the same subsystem for its Type-Cover, however, provides different states for that under the ID 0x00. To eventually support the Surface Pro 9 and potential future devices, we need to properly disambiguate between source IDs. Therefore, add the source ID to the state we carry and determine the tablet-mode state (as well as state names) based on that. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20230304194611.87770-2-luzmaximilian@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 94227b9c88f3df8ac3025611719cebd125b5981a Author: Hans de Goede Date: Fri Mar 3 23:19:28 2023 +0100 platform/x86: Add intel_bytcrc_pwrsrc driver Add a new driver for the power-, wake- and reset-source functionality of the Bay Trail (BYT) version of the Crystal Cove PMIC. The main functionality here is detecting which power-sources (USB / DC in / battery) are active. This is normally exposed to userspace as a power_supply class charger device with an online sysfs attribute. But if a charger is online or not is already exposed on BYT-CRC devices through either an ACPI AC power_supply device, or through a native driver for the battery charger chip (e.g. a BQ24292i). So instead of adding duplicate info under the power_supply class this driver exports the info through debugfs and likewise adds debugfs files for the reset- and wake-source info / registers. Despite this driver only exporting debugfs bits it is still useful to have this driver because it clears the wake- and reset-source registers after reading them. Not clearing these can have undesirable side-effects. Specifically if the WAKESRC register contains 0x01 (wake by powerbutton) on reboot then the firmware on some tablets turns the reboot into a poweroff. I guess this may be necessary to make long power-presses turn into a poweroff somehow? Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230303221928.285477-1-hdegoede@redhat.com commit de4fb5f5165582caf21b9074b918acccf99582a1 Merge: b59018c14c1ef 3608a2cd818a8 Author: Hans de Goede Date: Thu Mar 16 14:40:52 2023 +0100 Merge tag 'ib-pdx86-backlight-6.4' into review-hans Immutable branch between pdx86 and backlight due for the v6.4 merge window commit b59018c14c1efe36ddc96f3d27308f18e7d1b03e Author: Hans de Goede Date: Thu Mar 9 10:40:35 2023 +0100 platform/x86: x86-android-tablets: Add depends on PMIC_OPREGION Add a depends on PMIC_OPREGION to x86-android-tablets Kconfig to fix the following build error: ERROR: modpost: "intel_soc_pmic_exec_mipi_pmic_seq_element" [drivers/platform/x86/x86-android-tablets/x86-android-tablets.ko] undefined! Fixes: 9b1d2662b8c5 ("platform/x86: x86-android-tablets: Add touchscreen support for Lenovo Yoga Tab 3 Pro YT3-X90F") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303091711.howZNrIY-lkp@intel.com/ Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230309094035.18736-1-hdegoede@redhat.com commit 4e04143c869c5b6d499fbd5083caa860d5c942c3 Author: Ondrej Mosnacek Date: Thu Mar 16 14:07:51 2023 +0100 fs_context: drop the unused lsm_flags member This isn't ever used by VFS now, and it couldn't even work. Any FS that uses the SECURITY_LSM_NATIVE_LABELS flag needs to also process the value returned back from the LSM, so it needs to do its security_sb_set_mnt_opts() call on its own anyway. Signed-off-by: Ondrej Mosnacek Signed-off-by: Christian Brauner (Microsoft) commit 81e291d6f4296759df03666ca008453cd0e86821 Author: Imre Deak Date: Tue Mar 14 11:27:28 2023 +0200 drm/i915/opregion: Fix CONFIG_ACPI=n builds adding missing intel_opregion_cleanup() prototype Add the missing intel_opregion_cleanup() prototype fixing CONFIG_ACPI=n builds. Fixes: 3e226e4a2180 ("drm/i915/opregion: Cleanup opregion after errors during driver loading") Cc: Jani Nikula Reported-by: kernel test robot Reviewed-by: Nirmoy Das Link: https://lore.kernel.org/oe-kbuild-all/202303141610.6L1VO7Gw-lkp@intel.com/ Signed-off-by: Imre Deak commit 1e4929112507f145951f4c356161ab80ad9c1f0e Author: Leonard Göhrs Date: Fri Mar 10 10:20:53 2023 +0100 spi: stm32: split large transfers based on word size instead of bytes The TSIZE register in CR2, to which the number of words to transfer is written, is only 16 Bit. This limits transfers to 65535 SPI _words_ at a time. The existing code uses spi_split_transfers_maxsize to limit transfers to 65535 _bytes_ at a time. This breaks large transfers with bits_per_word > 8, as they are split inside of a word boundary by the odd size limit. Split transfers based on the number of words instead. This has the added benefit of not artificially limiting the maximum length of bpw > 8 transfers to half or a quarter of the actual limit. The combination of very large transfers and bits_per_word = 16 is triggered e.g. by MIPI DBI displays when updating large parts of the screen. Signed-off-by: Leonard Göhrs Acked-by: Alain Volmat Link: https://lore.kernel.org/r/20230310092053.1006459-2-l.goehrs@pengutronix.de Signed-off-by: Mark Brown commit 027781f3920ad16f40133890fc87247b8baa2d8d Author: Leonard Göhrs Date: Fri Mar 10 10:20:52 2023 +0100 spi: core: add spi_split_transfers_maxwords Add spi_split_transfers_maxwords() function that splits spi_transfers transparently into multiple transfers that are below a given number of SPI words. This function reuses most of its code from spi_split_transfers_maxsize() and for transfers with eight or less bits per word actually behaves the same. Signed-off-by: Leonard Göhrs Link: https://lore.kernel.org/r/20230310092053.1006459-1-l.goehrs@pengutronix.de Signed-off-by: Mark Brown commit 1de178421f1a95de408610c89655ec1d4edb9d29 Author: Andrzej Hajda Date: Wed Mar 8 14:36:24 2023 +0100 drm/i915/gt: prevent forcewake releases during BAR resize Tests on DG2 machines show that releasing forcewakes during BAR resize results later in forcewake ack timeouts. Since forcewakes can be realeased asynchronously the simplest way to prevent it is to get all forcewakes for duration of BAR resizing. v2: hold rpm as well during resizing (Rodrigo) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6530 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7853 Reviewed-by: Rodrigo Vivi Acked-by: Nirmoy Das Reviewed-by: Andi Shyti Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20230308133624.2131582-1-andrzej.hajda@intel.com commit 3608a2cd818a8d97bd3d4dc32f6c0afaf09b15ec Author: Hans de Goede Date: Tue Mar 7 13:05:40 2023 +0100 backlight: apple_bl: Use acpi_video_get_backlight_type() On some MacBooks both the apple_bl and the apple-gmux backlight drivers may be able to export a /sys/class/backlight device. To avoid having 2 backlight devices for one LCD panel until now the apple-gmux driver has been calling apple_bl_unregister() to move the apple_bl backlight device out of the way when it loads. Similar problems exist on other x86 laptops and all backlight drivers which may be used on x86 laptops have moved to using acpi_video_get_backlight_type() to determine whether they should load or not. Switch apple_bl to this model too, so that it is consistent with all the other x86 backlight drivers. Besides code-simplification and consistency this has 2 other benefits: 1) It removes a race during boot where userspace will briefly see an apple_bl backlight and then have it disappear again, leading to e.g.: https://bbs.archlinux.org/viewtopic.php?id=269920 2) This allows user to switch between the drivers by passing acpi_backlight=apple_gmux or acpi_backlight=vendor on the kernel commandline. Signed-off-by: Hans de Goede Reviewed-by: Daniel Thompson Acked-by: Lee Jones Link: https://lore.kernel.org/r/20230307120540.389920-1-hdegoede@redhat.com commit f0f2903de50418899a5e5dcecf2906da44a7a05e Author: Dan Carpenter Date: Fri Mar 10 15:31:13 2023 +0300 platform/x86: apple-gmux: return -EFAULT if copy fails The copy_to/from_user() functions return the number of bytes remaining to be copied, but we want to return -EFAULT to the user. Fixes: ce3fef2eb235 ("platform/x86: apple-gmux: add debugfs interface") Signed-off-by: Dan Carpenter Reviewed-by: Orlando Chamberlain Link: https://lore.kernel.org/r/0bdfa8c2-cb22-4bec-8773-584060613043@kili.mountain Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit ad3d0ee8dca5fa4a656057e20f9605bbe7ff067c Author: Orlando Chamberlain Date: Thu Mar 9 21:43:54 2023 +1100 platform/x86: apple-gmux: Update apple_gmux_detect documentation Commit fc83fbc80e1a ("platform/x86: apple-gmux: refactor gmux types") neglected to update the documentation of apple_gmux_detect's arguments. Update the documentation to reflect that commit's changes. include/linux/apple-gmux.h:99: warning: Function parameter or member 'type_ret' not described in 'apple_gmux_detect' include/linux/apple-gmux.h:99: warning: Excess function parameter 'indexed_ret' description in 'apple_gmux_detect' Reported-by: Stephen Rothwell Link: https://lore.kernel.org/lkml/20230309122822.77435e33@canb.auug.org.au/ Fixes: fc83fbc80e1a ("platform/x86: apple-gmux: refactor gmux types") Signed-off-by: Orlando Chamberlain Link: https://lore.kernel.org/r/20230309104353.10905-1-orlandoch.dev@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit d2e6832147998ba12c810cf88862126f6fae9b0a Author: Hans de Goede Date: Tue Mar 7 12:38:13 2023 +0100 platform/x86: apple-gmux: Add acpi_video_get_backlight_type() check Make apple-gmux backlight registration honor the acpi_backlight=... kernel commandline option which is used to select the backlight control method on x86/ACPI devices. Reported-and-tested-by: Aditya Garg Link: https://lore.kernel.org/platform-driver-x86/BM1PR01MB0931B467250831916F7C55B3B8A59@BM1PR01MB0931.INDPRD01.PROD.OUTLOOK.COM/ Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230307113813.359743-1-hdegoede@redhat.com commit 957c822a9c708b78390b7f24695943a5bde81434 Author: zipeng zhang Date: Thu Mar 16 14:39:58 2023 +0800 char:ipmi:Fix spelling mistake "asychronously" -> "asynchronously" There is a spelling mistake in the comment information. Fix it. Signed-off-by: zipeng zhang Message-Id: Signed-off-by: Corey Minyard commit 5406dc04884b96b8438b664d1a9b73e30e2a5517 Author: Krzysztof Kozlowski Date: Fri Mar 10 23:29:57 2023 +0100 serial: sprd: Drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). drivers/tty/serial/sprd_serial.c:1242:34: error: ‘serial_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Baolin Wang Link: https://lore.kernel.org/r/20230310222957.315848-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 88dcd07d27d1873810cd8423238f3ce4e9bd0bfc Author: Krzysztof Kozlowski Date: Fri Mar 10 23:29:56 2023 +0100 serial: sh-sci: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/tty/serial/sh-sci.c:3144:34: error: ‘of_sci_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310222957.315848-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 822a729af4aeb451a84863ac565bdad6f64e407e Author: Rob Herring Date: Fri Mar 10 08:47:27 2023 -0600 serial: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230310144727.1545699-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit ef194140308776be60dd4601bd01c00c84fb8b39 Author: Rob Herring Date: Fri Mar 10 08:47:26 2023 -0600 serial: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230310144727.1545630-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1d8777d21fbb36c4a0e103eb128ca86f9761e61c Author: Otabek Nazrullaev Date: Thu Mar 16 02:33:30 2023 +0900 ASoC: dt-bindings: maxim,max9759: Convert to DT schema. Convert Maxim MAX9759 Speaker Amplifier bindings to DT schema. Add missing gpio header file into examples section Signed-off-by: Otabek Nazrullaev Cc: Daniel Baluta Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230315173404.7215-1-otabeknazrullaev1998@gmail.com Signed-off-by: Mark Brown commit 87771c94025890246a6dfec9773eb62bd41c4c5a Author: Vijaya Anand Date: Thu Mar 16 04:40:55 2023 +0530 ASoC: dt-bindings: adi,adau17x1: Convert to DT schema Convert the binding document for adi,adau17x1 from txt to yaml so one could validate dt-entries correctly and any future additions can go into yaml format. Add address and size cells to example to prevent errors regarding reg format. Signed-off-by: Vijaya Anand Cc: Daniel Baluta Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230315231055.3067-1-sunrockers8@gmail.com Signed-off-by: Mark Brown commit 55b7fa634d9f5d88f008f8b785448db40a2d5229 Author: Konrad Dybcio Date: Tue Mar 14 13:53:00 2023 +0100 dt-bindings: usb: dwc3: Add QCM2290 compatible Document the QCM2290 DWC3 controller. Signed-off-by: Konrad Dybcio Reviewed-by: Bhupesh Sharma Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230314-topic-2290_compats-v1-5-47e26c3c0365@linaro.org Signed-off-by: Greg Kroah-Hartman commit b91e6107119f62be8b51b9955294be52c0b4fc80 Author: Emanuele Ghidoli Date: Mon Mar 13 17:50:39 2023 +0100 usb: misc: usb3503: support usb3803 and bypass mode Add support for USB3803 and bypass mode, with this change is also possible to move the component out of bypass mode. In bypass mode the downstream port 3 is connected to the upstream port with low switch resistance R_on. Controlling mode of operations: | RESET_N | BYPASS_N | Mode | -------------------------------- | 0 | 0 | standby | | 1 | 0 | bypass | | 1 | 1 | hub | Datasheet: https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/DataSheets/00001691D.pdf Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20230313165039.255579-4-francesco@dolcini.it Signed-off-by: Greg Kroah-Hartman commit b04b32cd67304bdda9f19fc52fc5abd95f8502ab Author: Emanuele Ghidoli Date: Mon Mar 13 17:50:38 2023 +0100 usb: misc: usb3503: refactor code to prepare for usb3803 addition Refactor code to simplify adding support for USB3803 and bypass mode. Remove static usb3503_reset() and move it to usb3503_switch_mode(), with the addition of the bypass mode we need to drive the various control signals to the expected configuration, not just to assert/release the reset. In addition to that the usb3503_connect() needs to be called only for HUB mode. No functional changes expected nor intended because of this change. Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20230313165039.255579-3-francesco@dolcini.it Signed-off-by: Greg Kroah-Hartman commit 1239e8124714ca94dd4c882266ee4bcad3f46e73 Author: Emanuele Ghidoli Date: Mon Mar 13 17:50:37 2023 +0100 dt-bindings: usb: smsc,usb3503: Add usb3803 Add support for usb3803, compared to usb3503 it uses a regular USB connection to upstream instead of HSIC, it has an additional low power mode (bypass) and an additional control signal (BYPASS_N). In bypass mode the downstream port 3 is connected to the upstream port with low switch resistance R_on. Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230313165039.255579-2-francesco@dolcini.it Signed-off-by: Greg Kroah-Hartman commit 34427557747cad5f599d65be894e846b31714602 Author: Andy Shevchenko Date: Mon Mar 13 17:53:10 2023 +0200 usb: gadget: aspeed: Rectify a bit a random header inclusion It looks like the driver copied'n'pasted almost random set of headers for its code. Rectify it a bit by removing of_gpio.h that is not only unused, but also will be removed in the future completely. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230313155310.80022-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b16de6a5c70b53bee495a42ebe74ccca076a3e26 Author: Krzysztof Kozlowski Date: Fri Mar 10 23:29:37 2023 +0100 usb: typec: fusb302: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/usb/typec/tcpm/fusb302.c:1816:34: error: ‘fusb302_dt_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230310222937.315773-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 45e7c9e448e345f27c4329d0395946f4a9cfd8c3 Author: Krzysztof Kozlowski Date: Fri Mar 10 23:29:36 2023 +0100 usb: typec: hd3ss3220: Drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). drivers/usb/typec/hd3ss3220.c:284:34: error: ‘dev_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20230310222937.315773-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2665eb8e20539a16d113725fdbcc2fb63fd627a5 Author: Krzysztof Kozlowski Date: Sat Mar 11 18:36:24 2023 +0100 usb: misc: usb251xb: drop of_match_ptr for ID table The driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/usb/misc/usb251xb.c:223:35: error: ‘usb2517i_data’ defined but not used [-Werror=unused-const-variable=] drivers/usb/misc/usb251xb.c:215:35: error: ‘usb2517_data’ defined but not used [-Werror=unused-const-variable=] drivers/usb/misc/usb251xb.c:207:35: error: ‘usb2514bi_data’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Richard Leitner Link: https://lore.kernel.org/r/20230311173624.263189-7-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit f80391ddb7793dca03c0fb548acf39ee562982f0 Author: Krzysztof Kozlowski Date: Sat Mar 11 18:36:23 2023 +0100 usb: gadget: max3420_udc: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/usb/gadget/udc/max3420_udc.c:1312:34: error: ‘max3420_udc_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230311173624.263189-6-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4997cacd6ecb588b32c5c43bf6bbe87d311dfb1e Author: Krzysztof Kozlowski Date: Sat Mar 11 18:36:22 2023 +0100 usb: gadget: renesas_usb3: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/usb/gadget/udc/renesas_usb3.c:2811:34: error: ‘usb3_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230311173624.263189-5-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2df6349323f627cc1f8e076fa4a7b715f6a05e5a Author: Krzysztof Kozlowski Date: Sat Mar 11 18:36:21 2023 +0100 usb: gadget: rzv2m_usb3drd: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/usb/gadget/udc/rzv2m_usb3drd.c:120:34: error: ‘rzv2m_usb3drd_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230311173624.263189-4-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 94d1957fc361bb7efa76c25f3c78296c3c9f867f Author: Krzysztof Kozlowski Date: Sat Mar 11 18:36:20 2023 +0100 usb: renesas_usbhs: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/usb/renesas_usbhs/common.c:535:34: error: ‘usbhs_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230311173624.263189-3-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit 658e467b76eb41005ef0c257d0b7accf73dcd32a Author: Krzysztof Kozlowski Date: Sat Mar 11 18:36:19 2023 +0100 usb: host: max3421-hcd: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/usb/host/max3421-hcd.c:1943:34: error: ‘max3421_of_match_table’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230311173624.263189-2-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit d6cfb252107d36fdddb66891c16d34a346882c36 Author: Krzysztof Kozlowski Date: Sat Mar 11 18:36:18 2023 +0100 usb: host: xhci-rcar: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/usb/host/xhci-rcar.c:269:34: error: ‘usb_xhci_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230311173624.263189-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit e13a7333067e47d01f8bfcc36e300e26ab4f8bea Author: Andy Shevchenko Date: Fri Mar 10 18:41:29 2023 +0200 usb: acpi: Switch to use acpi_evaluate_dsm_typed() The acpi_evaluate_dsm_typed() provides a way to check the type of the object evaluated by _DSM call. Use it instead of open coded variant. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230310164129.21937-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f977caea50381e9ca38319037a2b23fe3209d647 Author: Rob Herring Date: Fri Mar 10 08:47:28 2023 -0600 usb: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Reviewed-by: Richard Leitner Link: https://lore.kernel.org/r/20230310144729.1545857-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit a3927e1a9f1c3b7d71d9c8215905397e55da4da3 Author: Rob Herring Date: Fri Mar 10 08:47:27 2023 -0600 usb: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144728.1545786-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit a20bf02aaa6c026e81b2b15d5878c08f683517bb Author: Conor Dooley Date: Thu Mar 9 20:44:52 2023 +0000 usb: musb: mpfs: convert SOC_MICROCHIP_POLARFIRE to ARCH_MICROCHIP_POLARFIRE As part of converting RISC-V SOC_FOO symbols to ARCH_FOO to match the use of such symbols on other architectures, convert the Microchip FPGA usb glue layer driver to use the new symbol. Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20230309204452.969574-6-conor@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4fa1387261e725a418066f8f46ea87a6ba0e5be1 Author: Yalong Zou Date: Thu Mar 9 23:08:15 2023 +0800 usb: remove dead code in dwc3_gadget_get_irq platform_get_irq() only return non-zero irq number on success, or negative error number on failure. There is no need to check the return value of platform_get_irq() to determine the return value of dwc3_gadget_get_irq(), removing them to solve this problem. Signed-off-by: Yalong Zou Signed-off-by: Dongliang Mu Link: https://lore.kernel.org/r/20230309150815.1884260-1-yalongz@hust.edu.cn Signed-off-by: Greg Kroah-Hartman commit d7ce15e1d4162ab5e56dead10d4ae69a6b5c8ee8 Author: Fenghua Yu Date: Wed Mar 1 17:19:46 2023 -0800 x86/split_lock: Enumerate architectural split lock disable bit The December 2022 edition of the Intel Instruction Set Extensions manual defined that the split lock disable bit in the IA32_CORE_CAPABILITIES MSR is (and retrospectively always has been) architectural. Remove all the model specific checks except for Ice Lake variants which are still needed because these CPU models do not enumerate presence of the IA32_CORE_CAPABILITIES MSR. Originally-by: Dave Hansen Signed-off-by: Fenghua Yu Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tony Luck Link: https://lore.kernel.org/lkml/20220701131958.687066-1-fenghua.yu@intel.com/t/#mada243bee0915532a6adef6a9e32d244d1a9aef4 commit 8cc68c9c9e92dbaae51a711454c66eb668045508 Author: Borislav Petkov (AMD) Date: Sat Feb 25 01:11:31 2023 +0100 x86/CPU/AMD: Make sure EFER[AIBRSE] is set The AutoIBRS bit gets set only on the BSP as part of determining which mitigation to enable on AMD. Setting on the APs relies on the circumstance that the APs get booted through the trampoline and EFER - the MSR which contains that bit - gets replicated on every AP from the BSP. However, this can change in the future and considering the security implications of this bit not being set on every CPU, make sure it is set by verifying EFER later in the boot process and on every AP. Reported-by: Josh Poimboeuf Signed-off-by: Borislav Petkov (AMD) Acked-by: Dave Hansen Link: https://lore.kernel.org/r/20230224185257.o3mcmloei5zqu7wa@treble commit f863fac1b15f77fc3c115f5afbd535983bb961a1 Author: Orlando Chamberlain Date: Fri Mar 3 22:28:43 2023 +1100 platform/x86: apple-gmux: add debugfs interface Allow reading and writing gmux ports from userspace. For example: echo 4 > /sys/kernel/debug/apple_gmux/selected_port cat /sys/kernel/debug/apple_gmux/selected_port_data | xxd -p Will show the gmux version information (00000005 in this case) Reviewed-by: Hans de Goede Signed-off-by: Orlando Chamberlain Link: https://lore.kernel.org/r/20230303112842.3094-5-orlandoch.dev@gmail.com Signed-off-by: Hans de Goede commit 0c18184de990e63f708b090bcb9fc6c0fbc427cd Author: Orlando Chamberlain Date: Fri Mar 3 22:28:42 2023 +1100 platform/x86: apple-gmux: support MMIO gmux on T2 Macs In some newer dual gpu MacBooks, the T2 Coprocessor functions as the gmux, and the Intel side can interract with this new gmux type through MMIO. Add support for these gmux controllers to the apple-gmux driver. We start using the GMSP(0) acpi method on these gmux's when clearing interrupts, as this prevents a flood of status=0 interrupts that can't be cleared. It's unknown if this helps or hinders older gmux types, so it isn't enabled for those. Interestingly, the ACPI table only allocates 8 bytes for GMUX, but we actually need 16, and as such we request 16 with request_mem_region. Reading and writing from ports: 16 bytes from 0xfe0b0200 are used. 0x0 to 0x4 are where data to read appears, and where data to write goes. Writing to 0xe sets the gmux port being accessed, and writing to 0xf sends commands. These commands are 0x40 & data_length for write, and data_length for read, where data_length is 1, 2 or 4. Once byte base+0xf is 0, the command is done. Issues: As with other retina models, we can't switch DDC lines so switching at runtime doesn't work if the inactive gpu driver already disabled eDP due to it not being connected when that driver loaded. Additionally, turning on the dgpu back on on the MacBookPro16,1 does not work. Reviewed-by: Hans de Goede Signed-off-by: Orlando Chamberlain Link: https://lore.kernel.org/r/20230303112842.3094-4-orlandoch.dev@gmail.com Signed-off-by: Hans de Goede commit 96ec2d9868c4afd3cea17f4ee18b84ccc1cde20f Author: Orlando Chamberlain Date: Fri Mar 3 22:28:41 2023 +1100 platform/x86: apple-gmux: refactor gmux types Add apple_gmux_config struct containing operations and data specific to each mux type. This is in preparation for adding a third, MMIO based, gmux type. Reviewed-by: Hans de Goede Signed-off-by: Orlando Chamberlain Link: https://lore.kernel.org/r/20230303112842.3094-3-orlandoch.dev@gmail.com Signed-off-by: Hans de Goede commit 90caf1dfe9efb727874bcafd30fefb0807cb7670 Author: Orlando Chamberlain Date: Fri Mar 3 22:28:40 2023 +1100 platform/x86: apple-gmux: use first bit to check switch state On T2 Macs with MMIO gmux, when GMUX_PORT_SWITCH_DISPLAY is read, it can have values of 2, 3, 4, and 5. Odd values correspond to the discrete gpu, and even values correspond to the integrated gpu. The current logic is that only 2 corresponds to IGD, but this doesn't work for T2 Macs. Instead, check the first bit to determine the connected gpu. As T2 Macs with gmux only can switch the internal display, it is untested if this change (or a similar change) would be applicable to GMUX_PORT_SWITCH_DDC and GMUX_PORT_SWITCH_EXTERNAL. Reviewed-by: Hans de Goede Signed-off-by: Orlando Chamberlain Link: https://lore.kernel.org/r/20230303112842.3094-2-orlandoch.dev@gmail.com Signed-off-by: Hans de Goede commit 83842357c48ba9270bdf973fd21c8c1a2a4af72b Author: Nirmoy Das Date: Fri Mar 10 11:10:24 2023 +0100 drm/i915/gt: Update engine_init_common documentation Change the function doc to reflect updated name. v2: un-kerneldoc the comment(Matt). :s/engines_init_common/engine_init_common(Andi) Cc: Andi Shyti Cc: Matt Roper Signed-off-by: Nirmoy Das Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230310101024.4700-1-nirmoy.das@intel.com commit f20eed8bf6671de2e90b2f15cf6b616a72dd72cc Author: Sumitra Sharma Date: Tue Mar 14 05:11:52 2023 -0700 Staging: qlge: Fix indentation in conditional statement Add tabs/spaces in conditional statements in to fix the indentation. Signed-off-by: Sumitra Sharma Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20230314121152.GA38979@sumitra.com Signed-off-by: Greg Kroah-Hartman commit 73633855a6b682a8cc36f581e52a3cea63393b66 Author: Michael Straube Date: Sun Mar 12 08:32:47 2023 +0100 staging: rtl8192u: dm_shadow_init() is not used The function dm_shadow_init() is not used anywhere, remove it. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20230312073247.9822-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 00b2c0918b1ff730b756ec4944f0ca68770d5b93 Author: Michael Straube Date: Sun Mar 12 08:32:46 2023 +0100 staging: rtl8192u: rtl8192_SetRFPowerState() is not used The function rtl8192_SetRFPowerState() is not used anywhere, remove it. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20230312073247.9822-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 238f55be3eaf73b161739a4a61ddb3291a42b909 Author: Archana Date: Sat Mar 11 12:12:53 2023 +0000 staging: wlan-ng: small cleanup in plugimage() It's cleaner to set "j = -1;" before the if block and remove the else statement. Signed-off-by: Archana Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20230311121253.10225-2-craechal@gmail.com Signed-off-by: Greg Kroah-Hartman commit 95a4919ab7328cb9442c0f8f1cfe5c3931f007f1 Author: Archana Date: Sat Mar 11 12:12:52 2023 +0000 staging: wlan-ng: small cleanup in writeimage() It is cleaner to use "goto free_result;" as is being followed in rest of the implementation of writeimage function, and remove unnecessary kfree statements. Signed-off-by: Archana Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20230311121253.10225-1-craechal@gmail.com Signed-off-by: Greg Kroah-Hartman commit 56d098b7fff39aa91701f8612b131c174976f910 Author: Menna Mahmoud Date: Wed Mar 15 19:00:07 2023 +0200 staging: vme_user: remove unnecessary blank lines Remove unnecessary blank lines before a close brace as reported by checkpatch script "CHECK: Blank lines aren't necessary before a close brace '}'" Signed-off-by: Menna Mahmoud Link: https://lore.kernel.org/r/c8fedfeca9a56dba26846a5bed56642cc694bcbe.1678899549.git.eng.mennamahmoud.mm@gmail.com Signed-off-by: Greg Kroah-Hartman commit a59319660b0d2c628c3eee89c6406b48aa7d1a1e Author: Menna Mahmoud Date: Wed Mar 15 19:00:06 2023 +0200 staging: vme_user: add space around operators Add a space before and after the operator, for readability. Reported by checkpatch script: " CHECK: spaces preferred around that '+', '<<' and '>>' ". Signed-off-by: Menna Mahmoud Link: https://lore.kernel.org/r/57006c151d4d95550b987143a6650f8b3594ddea.1678899549.git.eng.mennamahmoud.mm@gmail.com Signed-off-by: Greg Kroah-Hartman commit 26269cbc7f2debf4cad98c74f14d0113672bb780 Author: Michael Straube Date: Fri Mar 10 09:34:49 2023 +0100 staging: rtl8723bs: rtw_get_raw_rssi_info() is not used The function rtw_get_raw_rssi_info() is not used anywhere, remove it. Signed-off-by: Michael Straube Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230310083449.23775-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1558280ca955c26bf0e13f7f17750a89c201d25b Author: Michael Straube Date: Fri Mar 10 09:34:48 2023 +0100 staging: rtl8723bs: linked_info_dump() is not used The function linked_info_dump() is not used anywhere, remove it. Signed-off-by: Michael Straube Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230310083449.23775-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit f89a163f1f66a9bea1222b0e61c3171b6bd0a080 Author: Michael Straube Date: Fri Mar 10 09:34:47 2023 +0100 staging: rtl8723bs: isAllSpaceOrTab() is not used The function isAllSpaceOrTab() is not used anywhere, remove it. Signed-off-by: Michael Straube Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230310083449.23775-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit e65df7f096d50200e7b6e0b545aeada510cbba63 Author: Michael Straube Date: Fri Mar 10 09:34:46 2023 +0100 staging: rtl8723bs: ParseQualifiedString() is not used The function ParseQualifiedString() is not used anywhere, remove it. Signed-off-by: Michael Straube Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230310083449.23775-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 78c0fb1ad68ce120efafe86790e4a674c2c12ef4 Author: Michael Straube Date: Fri Mar 10 09:34:45 2023 +0100 staging: rtl8723bs: MapCharToHexDigit() is not used The function MapCharToHexDigit() is not used anywhere, remove it. Signed-off-by: Michael Straube Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20230310083449.23775-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 94f7d4a4641d2fc2dc4065b76914d0a37cebfd17 Author: Philipp Hortmann Date: Tue Mar 14 19:44:20 2023 +0100 staging: rtl8192e: Join constants Rtl819XPHY_REG_.. with ..PciEPHY_REG_.. Join constants Rtl819XPHY_REG_1T2RArray with Rtl8192PciEPHY_REG_1T2RArray to RTL8192E_PHY_REG_1T2R_ARR to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/2816a10a8a534014c58e0092b78443e01a67930a.1678814935.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit dc756b9354b844c7a35385bf1b91cd9368feb18f Author: Philipp Hortmann Date: Tue Mar 14 19:44:13 2023 +0100 staging: rtl8192e: Join constants Rtl819XAGCTAB_.. with ..PciEAGCTAB.. Join constants Rtl819XAGCTAB_Array with Rtl8192PciEAGCTAB_Array to RTL8192E_AGCTAB_ARR to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/c7ca930adb5f72daa61b15b02001d09c4a1f8f46.1678814935.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 22fc1bb4750150e3b743c51e5c5b8dc78fbe7ea4 Author: Philipp Hortmann Date: Tue Mar 14 19:44:07 2023 +0100 staging: rtl8192e: Join constants Rtl819XRadioB_.. with ..RadioB_.. Join constants Rtl819XRadioB_Array with Rtl8192PciERadioB_Array to RTL8192E_RADIO_B_ARR to improve readability. Fix spaces around '+' to improve coding style. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/59af481400d5f7633bcaf7fcd95b7e5f0093fd3f.1678814935.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit abb3551a4af8c16f2d478185b315258a62a13966 Author: Philipp Hortmann Date: Tue Mar 14 19:43:59 2023 +0100 staging: rtl8192e: Join constants Rtl819XRadioA_.. with ..RadioA_.. Join constants Rtl819XRadioA_Array with Rtl8192PciERadioA_Array to RTL8192E_RADIO_A_ARR to improve readability. Fix spaces around '+' to improve coding style. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/0ce85e55fd9ddd5459590d756a951809b6a1b9ee.1678814935.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit bfe890e59253f667b1ccccfa46051251ad513d51 Author: Philipp Hortmann Date: Tue Mar 14 19:43:52 2023 +0100 staging: rtl8192e: Join constants Rtl819XMACPHY_.. with Rtl8192PciE.. Join constants Rtl819XMACPHY_Array with Rtl8192PciEMACPHY_Array to RTL8192E_MACPHY_ARR to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/6e5609e6b31892671d203c9da1a947bd42b70c37.1678814935.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 85246543066536a352d72b53dc2852fe0d3ae6a8 Author: Philipp Hortmann Date: Tue Mar 14 19:43:43 2023 +0100 staging: rtl8192e: Join constants Rtl819XMACPHY_..PG with Rtl8192PciE.. Join constants Rtl819XMACPHY_Array_PG with Rtl8192PciEMACPHY_Array_PG to RTL8192E_MACPHY_ARR_PG to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/c8effbad931c1f7bcdee7245bf16bd2e85c03679.1678814935.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit abeb432189962c0248657a92f7b13f80febe97a2 Author: Philipp Hortmann Date: Tue Mar 14 19:43:32 2023 +0100 staging: rtl8192e: Join constants PHY_REG_1T2RArray.. with ..LengthPciE Join constants PHY_REG_1T2RArrayLength with PHY_REG_1T2RArrayLengthPciE to RTL8192E_PHY_REG_1T2R_ARR_LEN to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/0e24d00350bd2c6d17558ea6b6667209e15073d2.1678814935.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit b89dd56751257a0aff2ed5af38945cdd6e318fdd Author: Philipp Hortmann Date: Tue Mar 14 19:43:24 2023 +0100 staging: rtl8192e: Join constants MACPHY_Array_PGLength with ..LengthPciE Join constants MACPHY_Array_PGLength with MACPHY_Array_PGLengthPciE to RTL8192E_MACPHY_ARR_PG_LEN to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/6d86257ddf3fecbf2bb104f1eeedbf09a56e0861.1678814935.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit ae9cb2196468e7e201d5a99c0a6f7fdb12719f59 Author: Philipp Hortmann Date: Tue Mar 14 19:43:18 2023 +0100 staging: rtl8192e: Join constants RadioB_ArrayLength with ..LengthPciE Join constants RadioB_ArrayLength with RadioB_ArrayLengthPciE to RTL8192E_RADIO_B_ARR_LEN to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/1f48c0691eb4627be81fc39d08762617a6c58a08.1678814935.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8f214347a71e0f57d80f44e2079a282c745a4dca Author: Philipp Hortmann Date: Tue Mar 14 19:43:11 2023 +0100 staging: rtl8192e: Join constants RadioA_ArrayLength with ..LengthPciE Join constants RadioA_ArrayLength with RadioA_ArrayLengthPciE to RTL8192E_RADIO_A_ARR_LEN to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/a03372c15cf1489b964d48d667f39c6e231fa190.1678814935.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 27d218e343f980a252e8d08938cbebea2563e04c Author: Philipp Hortmann Date: Tue Mar 14 19:43:03 2023 +0100 staging: rtl8192e: Join constants MACPHY_ArrayLength with ..LengthPciE Join constants MACPHY_ArrayLength with MACPHY_ArrayLengthPciE to RTL8192E_MACPHY_ARR_LEN to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/881ce5739e4237ea9a31029acaa535422d41fa5f.1678814935.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3dcf9a25d85a0e2bb619c045a64845cccdaf9fc3 Author: Philipp Hortmann Date: Tue Mar 14 19:42:56 2023 +0100 staging: rtl8192e: Join constants AGCTAB_ArrayLength with ..LengthPciE Join constants AGCTAB_ArrayLength with AGCTAB_ArrayLengthPciE to RTL8192E_AGCTAB_ARR_LEN to improve readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/98a7553403ef95609fbcb84e4cc653628b96c56c.1678814935.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit f933c226ceae738f5e9daeb73eab304bb7e3bfcc Author: Philipp Hortmann Date: Mon Mar 13 23:46:33 2023 +0100 staging: rtl8192e: Remove function rtl92e_is_legal_rf_path Remove function rtl92e_is_legal_rf_path that will always return 1. Reason is that the eRFPath is always 0 for RF90_PATH_A or 1 for RF90_PATH_B but never 2 or 3. In most usage cases this is easy to see but for the following functions that use rtl92e_is_legal_rf_path it is more difficult: rtl92e_set_rf_reg and rtl92e_get_rf_reg are used in: rtl92e_set_bandwidth (eRFPath only for 0 and 1) rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_phy_switch_channel_step (eRFPath only for 0 and 1) _rtl92e_dm_check_tx_power_tracking_thermal (eRFPath only for 0) rtl92e_check_bb_and_rf is used in: rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_bb_config_para_file (eRFPath only for 0) rtl92e_config_rf_path is used in: rtl92e_config_rf (eRFPath only for 0 and 1) Remove dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b801f1f9ff3c58aedab4e3e07b2ec0a816fdf5d9.1678740713.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7c4b9278d44c567f335ef3714e201e1f2074bb9d Author: Philipp Hortmann Date: Mon Mar 13 23:46:27 2023 +0100 staging: rtl8192e: Replace RF90_PATH_C in test expression of for loop Replace RF90_PATH_C in test expression of the for loop with the variable that is commonly used. This avoids false hits when searching for usage of RF90_PATH_C and therefore improves readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/f9af7a3d3e608206a4aa4ba2bd377b9201111b3f.1678740713.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3e83b45cb66a6077300bae384b59cdd2b66b00e0 Author: Philipp Hortmann Date: Sat Mar 11 22:52:53 2023 +0100 staging: rtl8192e: Remove unused RF90_PATH_C and ..D for rfHSSIPara2 Remove unused priv->phy_reg_def[RF90_PATH_C].rfHSSIPara2 and priv->phy_reg_def[RF90_PATH_D].rfHSSIPara2. rfHSSIPara2 is used in rtl92e_set_bb_reg which is used in: rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_phy_rf_read which is used in: rtl92e_set_rf_reg and rtl92e_get_rf_reg are used in: rtl92e_set_bandwidth (eRFPath only for 0 and 1) rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_phy_switch_channel_step (eRFPath only for 0 and 1) _rtl92e_dm_check_tx_power_tracking_thermal (eRFPath only for 0) rtl92e_check_bb_and_rf is used in: rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_bb_config_para_file (eRFPath only for 0) rtl92e_config_rf_path is used in: rtl92e_config_rf (eRFPath only for 0 and 1) Remove dead code and constants. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/186f3e59e736de6fd2111e835cdb4b633ca41bbc.1678569965.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9d5e2ea45b58c5180aefdf1ef5071e9af445f11b Author: Philipp Hortmann Date: Sat Mar 11 22:52:46 2023 +0100 staging: rtl8192e: Remove unused RF90_PATH_C and ..D for rfLSSIReadBack Remove unused priv->phy_reg_def[RF90_PATH_C].rfLSSIReadBack and priv->phy_reg_def[RF90_PATH_D].rfLSSIReadBack. rfLSSIReadBack is used in: _rtl92e_phy_rf_read which is used in: rtl92e_set_rf_reg and rtl92e_get_rf_reg are used in: rtl92e_set_bandwidth (eRFPath only for 0 and 1) rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_phy_switch_channel_step (eRFPath only for 0 and 1) _rtl92e_dm_check_tx_power_tracking_thermal (eRFPath only for 0) rtl92e_check_bb_and_rf is used in: rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_bb_config_para_file (eRFPath only for 0) rtl92e_config_rf_path is used in: rtl92e_config_rf (eRFPath only for 0 and 1) Remove dead code and constants. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/622777b394a896b6db08eb7faeb455e5cbeae93f.1678569965.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5a828b61b8b6300384fad60aa2d7fe340ff4957d Author: Philipp Hortmann Date: Sat Mar 11 22:52:31 2023 +0100 staging: rtl8192e: Remove unused variable rfTxIQImbalance and rfTxAFE Remove unused variable rfTxIQImbalance and rfTxAFE because they are just once set and not used. Remove unused constants. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/62453061bcf1858c23ba57bf1f279999b37b4cc3.1678569965.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6362c2acfc3a2629fdbfdc130b6f54c5e63e0532 Author: Philipp Hortmann Date: Sat Mar 11 22:52:15 2023 +0100 staging: rtl8192e: Remove unused variable rfRxIQImbalance and rfRxAFE Remove unused variable rfRxIQImbalance and rfRxAFE because they are just once set and not used. Remove unused constants with commenting line. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/1d578fc962c938e76bc0df529a3c24bba7abe049.1678569965.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 76535902f6d4ab1b0e81894e770476da3e8b199e Author: Philipp Hortmann Date: Sat Mar 11 22:52:02 2023 +0100 staging: rtl8192e: Remove unused variable rfAGCControl1 and rfAGCControl2 Remove unused variable rfAGCControl1 and rfAGCControl2 because they are just once set and not used. Remove unused constants as well. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/0f191930597517cf88eb6effd4c20a46c99571ad.1678569965.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 37acdfa8beaa8669b0980e8ece6045047126469a Author: Philipp Hortmann Date: Sat Mar 11 22:51:49 2023 +0100 staging: rtl8192e: Remove unused variable rfHSSIPara1 and rfSwitchControl Remove unused variable rfHSSIPara1 and rfSwitchControl because they are just once set and not used. Remove unused constants as well. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/5f13420ce5598d447aaad0fe43b807467e0a15bb.1678569965.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7358afd5bee314fc740d10c1de49a1038df478e0 Author: Philipp Hortmann Date: Sat Mar 11 22:51:36 2023 +0100 staging: rtl8192e: Remove unused variable rfLSSI_Select and rfTxGainStage Remove unused variable rfLSSI_Select and rfTxGainStage because they are just once set and not used. Remove unused constants as well. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/48f05998f4d2fe2df88ff14860cc8615dd72734d.1678569965.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9272ddf969bc1656179c095b7fc683b08b1f6d5e Author: Philipp Hortmann Date: Sat Mar 11 22:51:23 2023 +0100 staging: rtl8192e: Remove unused RF90_PATH_C and ..D for rf3wireOffset Remove unused priv->phy_reg_def[RF90_PATH_C].rf3wireOffset and priv->phy_reg_def[RF90_PATH_D].rf3wireOffset. rf3wireOffset is used in _rtl92e_phy_rf_read and _rtl92e_phy_rf_write which are used in: rtl92e_set_rf_reg and rtl92e_get_rf_reg are used in: rtl92e_set_bandwidth (eRFPath only for 0 and 1) rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_phy_switch_channel_step (eRFPath only for 0 and 1) _rtl92e_dm_check_tx_power_tracking_thermal (eRFPath only for 0) rtl92e_check_bb_and_rf is used in: rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_bb_config_para_file (eRFPath only for 0) rtl92e_config_rf_path is used in: rtl92e_config_rf (eRFPath only for 0 and 1) Remove dead code and constants. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/180723eee77f70ffda1f8f0656c2f256f005c4ef.1678569965.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0b8f11cdcb3ab3e83bc5506d6e97d95f0093647b Author: Philipp Hortmann Date: Sat Mar 11 22:51:11 2023 +0100 staging: rtl8192e: Remove unused RF90_PATH_C and ..D for rfintfo and ..fe Remove unused priv->phy_reg_def[RF90_PATH_C].rfintfo and priv->phy_reg_def[RF90_PATH_D].rfintfo and remove unused priv->phy_reg_def[RF90_PATH_C].rfintfe and priv->phy_reg_def[RF90_PATH_D].rfintfe. The termination condition for the loop is set to priv->num_total_rf_path = RTL819X_TOTAL_RF_PATH = 2. Because of this pPhyReg = &priv->phy_reg_def[eRFPath]; pPhyReg cannot point to array element 2 for RF90_PATH_C and 3 for RF90_PATH_D. Remove unused constants as well. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/3c2237e2b4094129143594a5ab45691e9961e100.1678569965.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 308e4650ea173d0e337b496cd9ea67c0ae24c572 Author: Philipp Hortmann Date: Sat Mar 11 22:50:56 2023 +0100 staging: rtl8192e: Remove unused variable rfintfi Remove unused variable rfintfi because it is just once set and not used. Remove unused constants as well. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/f251186fe59855eee3dd465954700a1d0ec50f53.1678569965.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3faa16d5217b0abb5fcc1d5e0ea7b78a0d9df003 Author: Philipp Hortmann Date: Sat Mar 11 22:50:44 2023 +0100 staging: rtl8192e: Remove unused RF90_PATH_C and ..D for rfintfs Remove unused priv->phy_reg_def[RF90_PATH_C].rfintfs and priv->phy_reg_def[RF90_PATH_D].rfintfs. The termination condition for the loop is set to priv->num_total_rf_path = RTL819X_TOTAL_RF_PATH = 2. Because of this pPhyReg = &priv->phy_reg_def[eRFPath]; pPhyReg cannot point to array element 2 for RF90_PATH_C and 3 for RF90_PATH_D. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/801d10f460acbf0601c78dee05c7b32f1628f3a8.1678569965.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit eab1fd002a4f1389496a17fe8b7bcdb510c6afed Author: Philipp Hortmann Date: Sat Mar 11 22:50:31 2023 +0100 staging: rtl8192e: Remove unused RF90_PATH_C and ..D in rtl92e_config_rf Remove unused case RF90_PATH_C and case RF90_PATH_D. The termination condition for the loop is set to priv->num_total_rf_path = RTL819X_TOTAL_RF_PATH = 2. Because of this eRFPath cannot reach the values 2 for RF90_PATH_C and 3 for RF90_PATH_D. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/3a62c8803712e7bf905886e670fe334a13d5d753.1678569965.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 499183cc3b52613f06cf4ce70809546971c96ed8 Author: Nathan Chancellor Date: Wed Mar 15 20:28:29 2023 -0700 wifi: iwlwifi: Avoid disabling GCC specific flag with clang Clang errors: drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c:15:32: error: unknown warning group '-Wsuggest-attribute=format', ignored [-Werror,-Wunknown-warning-option] #pragma GCC diagnostic ignored "-Wsuggest-attribute=format" ^ 1 error generated. The warning being disabled by this pragma is GCC specific. Guard its use with CONFIG_CC_IS_GCC so that it is not used with clang to clear up the error. Fixes: 4eca8cbf7ba8 ("wifi: iwlwifi: suppress printf warnings in tracing") Link: https://github.com/ClangBuiltLinux/linux/issues/1818 Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20230315-iwlwifi-fix-pragma-v1-1-ad23f92c4739@kernel.org Signed-off-by: Johannes Berg commit 9bdf4489a3950335af088604876fdc3209a9dd8e Author: Colin Ian King Date: Tue Mar 14 08:23:15 2023 +0000 net: phy: micrel: Fix spelling mistake "minimim" -> "minimum" There is a spelling mistake in a pr_warn_ratelimited message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20230314082315.26532-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski commit 6873465c1930e0caeccbe0f9987a7b4f9afbdac8 Merge: fabdc10075b8f a87ceb3d42afe Author: Jakub Kicinski Date: Wed Mar 15 22:16:26 2023 -0700 Merge branch 'nfp-flower-add-support-for-multi-zone-conntrack' Louis Peens says: ==================== nfp: flower: add support for multi-zone conntrack This series add changes to support offload of connection tracking across multiple zones. Previously the driver only supported offloading of a single goto_chain, spanning a single zone. This was implemented by merging a pre_ct rule, post_ct rule and the nft rule. This series provides updates to let the original post_ct rule act as the new pre_ct rule for a next set of merges if it contains another goto and conntrack action. In pseudo-tc rule format this adds support for: ingress chain 0 proto ip flower action ct zone 1 pipe action goto 1 ingress chain 1 proto ip flower ct_state +tr+new ct_zone 1 action ct_clear pipe action ct zone 2 pipe action goto 2 ingress chain 1 proto ip flower ct_state +tr+est ct_zone 1 action ct_clear pipe action ct zone 2 pipe action goto 2 ingress chain 2 proto ip flower ct_state +tr+new ct_zone 2 action mirred egress redirect dev ... ingress chain 2 proto ip flower ct_state +tr+est ct_zone 2 action mirred egress redirect dev ... This can continue for up to a maximum of 4 zone recirculations. The first few patches are some smaller preparation patches while the last one introduces the functionality. ==================== Link: https://lore.kernel.org/r/20230314063610.10544-1-louis.peens@corigine.com Signed-off-by: Jakub Kicinski commit a87ceb3d42afebd86191054314ef1a2f98c4556b Author: Wentao Jia Date: Tue Mar 14 08:36:10 2023 +0200 nfp: flower: offload tc flows of multiple conntrack zones If goto_chain action present in the post ct flow rule, merge flow rules in this ct-zone, create a new pre_ct entry as the pre ct flow rule of next ct-zone, but do not offload merged flow rules to firmware. Repeat the process in the next ct-zone until no goto_chain action present in the post ct flow rule in a certain ct-zone, merged all the flow rules. Offload to firmware finally. Signed-off-by: Wentao Jia Acked-by: Simon Horman Signed-off-by: Louis Peens Signed-off-by: Jakub Kicinski commit 46a83c85b683b647d86e679e2b095494e87f4d7c Author: Wentao Jia Date: Tue Mar 14 08:36:09 2023 +0200 nfp: flower: prepare for parameterisation of number of offload rules The fixed number of offload flow rule is only supported scenario of one ct zone, in the scenario of multiple ct zones, dynamic number and more number of offload flow rules are required. In order to support scenario of multiple ct zones, parameter num_rules is added for to offload flow rules Signed-off-by: Wentao Jia Acked-by: Simon Horman Signed-off-by: Louis Peens Signed-off-by: Jakub Kicinski commit 3e44d19934b92398785b3ffc2353b9eba264140e Author: Wentao Jia Date: Tue Mar 14 08:36:08 2023 +0200 nfp: flower: add goto_chain_index for ct entry The chain_index has different means in pre ct entry and post ct entry. In pre ct entry, it means chain index, but in post ct entry, it means goto chain index, it is confused. chain_index and goto_chain_index may be present in one flow rule, It cannot be distinguished by one field chain_index, both chain_index and goto_chain_index are required in the follow-up patch to support multiple ct zones Another field goto_chain_index is added to record the goto chain index. If no goto action in post ct entry, goto_chain_index is 0. Signed-off-by: Wentao Jia Acked-by: Simon Horman Signed-off-by: Louis Peens Signed-off-by: Jakub Kicinski commit 0b8d953cce26287a7f5eb78ff49496e9836c88ed Author: Wentao Jia Date: Tue Mar 14 08:36:07 2023 +0200 nfp: flower: refactor function "is_post_ct_flow" 'ct_clear' action only or no ct action is supported for 'post_ct_flow'. But in scenario of multiple ct zones, one non 'ct_clear' ct action or more ct actions, including 'ct_clear action', may be present in one flow rule. If ct state match key is 'ct_established', the flow rule is still expected to be classified as 'post_ct_flow'. Check ct status first in function "is_post_ct_flow" to achieve this. Signed-off-by: Wentao Jia Acked-by: Simon Horman Signed-off-by: Louis Peens Signed-off-by: Jakub Kicinski commit cee7b339d806f71df611087724ddfbaad2d8f8b7 Author: Wentao Jia Date: Tue Mar 14 08:36:06 2023 +0200 nfp: flower: refactor function "is_pre_ct_flow" In the scenario of multiple ct zones, ct state key match and ct action is present in one flow rule, the flow rule is classified to post_ct_flow in design. There is no ct state key match for pre ct flow, the judging condition is added to function "is_pre_ct_flow". Chain_index is another field for judging which flows are pre ct flow If chain_index not 0, the flow is not pre ct flow. Signed-off-by: Wentao Jia Acked-by: Simon Horman Signed-off-by: Louis Peens Signed-off-by: Jakub Kicinski commit 8a8db7aeaa6dae4ddae033858bf5b49aecfbbe42 Author: Wentao Jia Date: Tue Mar 14 08:36:05 2023 +0200 nfp: flower: add get_flow_act_ct() for ct action CT action is a special case different from other actions, CT clear action is not required when get ct action, but this case is not considered. If CT clear action in the flow rule, skip the CT clear action when get ct action, return the first ct action that is not a CT clear action Signed-off-by: Wentao Jia Acked-by: Simon Horman Signed-off-by: Louis Peens Signed-off-by: Jakub Kicinski commit fabdc10075b8f67b120091a3dc9173616f3ccebe Merge: a57cc54d69d60 63b02048f9a78 Author: Jakub Kicinski Date: Wed Mar 15 22:09:45 2023 -0700 Merge mlx5 updates 2023-03-13 Saeed Mahameed says: ==================== mlx5-updates-2023-03-13 1) Trivial cleanup patches 2) By Sandipan Patra: Implement thermal zone to report NIC temperature 3) Adham Faris, Improves devlink health diagnostics for netdev objects 4) From Maor, Enable TC offload for egress and engress MACVLAN over bond 5) From Gal, add devlink hairpin queues parameters to replace debugfs as was discussed in [1]: [1] https://lore.kernel.org/all/20230111194608.7f15b9a1@kernel.org/ ==================== Link: https://lore.kernel.org/all/20230314054234.267365-1-saeed@kernel.org/ Signed-off-by: Jakub Kicinski commit 63b02048f9a781e01e59743cd2d3e0a1f10c971a Author: Maor Dickman Date: Mon Mar 13 22:42:34 2023 -0700 net/mlx5e: Enable TC offload for egress MACVLAN over bond Support offloading of TC rules that mirror/redirect egress traffic to a MACVLAN device, which is attached to bond device which master mlx5 devices. Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230314054234.267365-16-saeed@kernel.org Signed-off-by: Jakub Kicinski commit d5d006bb27ad9d408074eef7e091fbd87335f913 Author: Maor Dickman Date: Mon Mar 13 22:42:33 2023 -0700 net/mlx5e: Enable TC offload for ingress MACVLAN over bond Support offloading of TC rules that filter ingress traffic from a MACVLAN device, which is attached to bond device. Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230314054234.267365-15-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 244fd698207f0baec062da4737e31c76b1be2371 Author: Maor Dickman Date: Mon Mar 13 22:42:32 2023 -0700 net/mlx5e: TC, Extract indr setup block checks to function In preparation for next patch which will add new check if device block can be setup, extract all existing checks to function to make it more readable and maintainable. Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230314054234.267365-14-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 8a0594c0961012ac07112f41800da29dd5632c03 Author: Gal Pressman Date: Mon Mar 13 22:42:31 2023 -0700 net/mlx5e: Add more information to hairpin table dump Print the number of hairpin queues and size as part of the hairpin table dump. Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230314054234.267365-13-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 1bffcea42926b26e092045ac398850e80d950bb2 Author: Gal Pressman Date: Mon Mar 13 22:42:30 2023 -0700 net/mlx5e: Add devlink hairpin queues parameters We refer to a TC NIC rule that involves forwarding as "hairpin". Hairpin queues are mlx5 hardware specific implementation for hardware forwarding of such packets. Per the discussion in [1], move the hairpin queues control (number and size) from debugfs to devlink. Expose two devlink params: - hairpin_num_queues: control the number of hairpin queues - hairpin_queue_size: control the size (in packets) of the hairpin queues [1] https://lore.kernel.org/all/20230111194608.7f15b9a1@kernel.org/ Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230314054234.267365-12-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 028522e2844393abc44f7bd7477eb4a455f01579 Author: Gal Pressman Date: Mon Mar 13 22:42:29 2023 -0700 net/mlx5: Move needed PTYS functions to core layer Downstream patches require devlink params to access the PTYS register, move the needed functions from mlx5e to the core layer. Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230314054234.267365-11-saeed@kernel.org Signed-off-by: Jakub Kicinski commit bb76d250e55c72975b77f5d610fd3733306b3031 Author: Adham Faris Date: Mon Mar 13 22:42:28 2023 -0700 net/mlx5e: Add XSK RQ state flag for RQ devlink health diagnostics Currently RQ health diagnostics doesn't inform the user whether an RQ is an XSK RQ or not. Address this, by adding XSK state flag to RQ SW state enum in core/en.h. XSK will be '1' if current RQ is an XSK RQ, and it will be '0' if it's not. In this example below, it can be seen that XSK field value is '1' since xdpsock program have been attached to channel 0 before issuing the devlink query command: $ devlink health diagnose auxiliary/mlx5_core.eth.0/65535 reporter rx Output: ======================================================================= Common config: RQ: type: 2 stride size: 4096 size: 16 ts_format: FRC CQ: stride size: 64 size: 1024 RQs: channel ix: 0 rqn: 4236 HW state: 1 WQE counter: 15 posted WQEs: 15 cc: 15 SW State: enabled: 1 recovering: 0 am: 1 no_csum_complete: 1 csum_full: 0 mini_cqe_hw_stridx: 1 shampo: 0 mini_cqe_enhanced: 0 xsk: 1 CQ: cqn: 1085 HW status: 0 ci: 0 size: 1024 EQ: eqn: 7 irqn: 32 vecidx: 0 ci: 5 size: 2048 ICOSQ: sqn: 4229 HW state: 1 cc: 158 pc: 158 WQE size: 2048 CQ: cqn: 1080 cc: 1 size: 2048 Signed-off-by: Adham Faris Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230314054234.267365-10-saeed@kernel.org Signed-off-by: Jakub Kicinski commit fc9d982a2512b294607b2922de3809e7c92810da Author: Adham Faris Date: Mon Mar 13 22:42:27 2023 -0700 net/mlx5e: Expose SQ SW state as part of SQ health diagnostics Add SQ SW state textual representation to devlink health diagnostics for tx reporter. SQ SW state can be retrieved by issuing the devlink command below: $ devlink health diagnose auxiliary/mlx5_core.eth.0/65535 reporter tx Output ======================================================================= Common Config: SQ: stride size: 64 size: 1024 ts_format: FRC CQ: stride size: 64 size: 1024 SQs: channel ix: 0 tc: 0 txq ix: 0 sqn: 4170 HW state: 1 stopped: false cc: 0 pc: 0 SW State: enabled: 1 mpwqe: 1 recovering: 0 ipsec: 0 am: 1 vlan_need_l2_inline: 1 pending_xsk_tx: 0 pending_tls_rx_resync: 0 xdp_multibuf: 0 CQ: cqn: 1031 HW status: 0 ci: 0 size: 1024 EQ: eqn: 7 irqn: 32 vecidx: 0 ci: 2 size: 2048 Signed-off-by: Adham Faris Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230314054234.267365-9-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 1fe7bc109e3e18f7776ba71953cbc922b7ee9165 Author: Adham Faris Date: Mon Mar 13 22:42:26 2023 -0700 net/mlx5e: Stringify RQ SW state in RQ devlink health diagnostics One of the parameters that is retrieved/printed as a response to devlink health diagnostics for rx reporter is the RQ SW state. It's printed as a bitmap decimal number. Printing it as bitmap is problematic and non informative. In addition User can't count on SW state without accessing the kernel sources (mlx5e rq state enum in en.h). This patch prints RQ SW state in a textual representation, as a key: value pairs, where disabled rq states will appear as '0' and enabled ones will appear as '1'. See below the generated output for rx health diagnostics devlink command: $ devlink health diagnose auxiliary/mlx5_core.eth.0/65535 reporter rx Before: ======================================================================= Common config: RQ: type: 2 stride size: 2048 size: 8 ts_format: FRC CQ: stride size: 64 size: 1024 RQs: channel ix: 0 rqn: 4172 HW state: 1 SW state: 37 WQE counter: 7 posted WQEs: 7 cc: 7 CQ: cqn: 1033 HW status: 0 ci: 0 size: 1024 EQ: eqn: 7 irqn: 32 vecidx: 0 ci: 2 size: 2048 ICOSQ: sqn: 4169 HW state: 1 cc: 74 pc: 74 WQE size: 128 CQ: cqn: 1030 cc: 1 size: 128 channel ix: 1 ... . . After: ======================================================================= Common config: RQ: type: 2 stride size: 2048 size: 8 ts_format: FRC CQ: stride size: 64 size: 1024 RQs: channel ix: 0 rqn: 4172 HW state: 1 WQE counter: 7 posted WQEs: 7 cc: 7 SW State: enabled: 1 recovering: 0 am: 1 no_csum_complete: 0 csum_full: 0 mini_cqe_hw_stridx: 1 shampo: 0 mini_cqe_enhanced: 0 CQ: cqn: 1033 HW status: 0 ci: 0 size: 1024 EQ: eqn: 7 irqn: 32 vecidx: 0 ci: 2 size: 2048 ICOSQ: sqn: 4169 HW state: 1 cc: 74 pc: 74 WQE size: 128 CQ: cqn: 1030 cc: 1 size: 128 channel: ix: 1 ... . . Signed-off-by: Adham Faris Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230314054234.267365-8-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 2b5bd5b1611b817970f13b1c4dfdcda0b35e3690 Author: Adham Faris Date: Mon Mar 13 22:42:25 2023 -0700 net/mlx5e: Rename RQ/SQ adaptive moderation state flag Dynamic interrupt moderation RQ and SQ feature represented by MLX5E_RQ_STATE_AM and MLX5E_SQ_STATE_AM enums respectively, is not consistent with the feature naming in the driver, and with the formal feature and library names. Hence, change MLX5E_RQ_STATE_AM and MLX5E_SQ_STATE_AM enum type names in core/en.h to MLX5E_RQ_STATE_DIM and MLX5E_SQ_STATE_DIM respectively. Signed-off-by: Adham Faris Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230314054234.267365-7-saeed@kernel.org Signed-off-by: Jakub Kicinski commit aa98d15ea40b9d370871df7882b6d56d08aed692 Author: Rahul Rameshbabu Date: Mon Mar 13 22:42:24 2023 -0700 net/mlx5e: Utilize the entire fifo Previous check was comparing against the fifo mask. The mask is size of the fifo (power of two) minus one, so a less than or equal comparator should be used for checking if the fifo has room for the SKB. Signed-off-by: Rahul Rameshbabu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230314054234.267365-6-saeed@kernel.org Signed-off-by: Jakub Kicinski commit c1fef618d611b31964ab397aa0bf0611da94bade Author: Sandipan Patra Date: Mon Mar 13 22:42:23 2023 -0700 net/mlx5: Implement thermal zone Implement thermal zone support for mlx5 based HW. The NIC uses temperature sensor provided by ASIC to report current temperature to thermal core. Signed-off-by: Sandipan Patra Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230314054234.267365-5-saeed@kernel.org Signed-off-by: Jakub Kicinski commit ceefcfb8a37510f2c2b99b9e8d6c0b3941687b2b Author: Jiri Pirko Date: Mon Mar 13 22:42:22 2023 -0700 net/mlx5: Add comment to mlx5_devlink_params_register() Add comment to mlx5_devlink_params_register() functions so it is clear that only driver init params should be registered here. Signed-off-by: Jiri Pirko Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230314054234.267365-4-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 8ff38e730c3f5ee717f25365ef8aa4739562d567 Author: Moshe Shemesh Date: Mon Mar 13 22:42:21 2023 -0700 net/mlx5: Stop waiting for PCI up if teardown was triggered If driver teardown is called while PCI is turned off, there is a race between health recovery and teardown. If health recovery already started it will wait 60 sec trying to see if PCI gets back and it can recover, but actually there is no need to wait anymore once teardown was called. Use the MLX5_BREAK_FW_WAIT flag which is set on driver teardown to break waiting for PCI up. Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230314054234.267365-3-saeed@kernel.org Signed-off-by: Jakub Kicinski commit c05d145abea138dbba213ce775820af73e893d92 Author: Moshe Shemesh Date: Mon Mar 13 22:42:20 2023 -0700 net/mlx5: remove redundant clear_bit When shutdown or remove callbacks are called the driver sets the flag MLX5_BREAK_FW_WAIT, to stop waiting for FW as teardown was called. There is no need to clear the bit as once shutdown or remove were called as there is no way back, the driver is going down. Furthermore, if not cleared the flag can be used also in other loops where we may wait while teardown was already called. Use test_bit() instead of test_and_clear_bit() as there is no need to clear the flag. Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20230314054234.267365-2-saeed@kernel.org Signed-off-by: Jakub Kicinski commit a57cc54d69d601282c4451010b12f53630834203 Author: Wolfram Sang Date: Tue Mar 14 13:49:27 2023 +0100 net: phy: micrel: drop superfluous use of temp variable 'temp' was used before commit c0c99d0cd107 ("net: phy: micrel: remove the use of .ack_interrupt()") refactored the code. Now, we can simplify it a little. Signed-off-by: Wolfram Sang Reviewed-by: Andrew Lunn Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230314124928.44948-1-wsa+renesas@sang-engineering.com Signed-off-by: Jakub Kicinski commit 83456576a42050cc0675aece14277a3cbdee9cbe Author: Wolfram Sang Date: Tue Mar 14 13:48:56 2023 +0100 net: phy: update obsolete comment about PHY_STARTING Commit 899a3cbbf77a ("net: phy: remove states PHY_STARTING and PHY_PENDING") missed to update a comment in phy_probe. Remove superfluous "Description:" prefix while we are here. Signed-off-by: Wolfram Sang Reviewed-by: Heiner Kallweit Link: https://lore.kernel.org/r/20230314124856.44878-1-wsa+renesas@sang-engineering.com Signed-off-by: Jakub Kicinski commit 0384d05555d2b3dacd647668cd84df2ccd15ac61 Merge: 543c143dac5d6 be96815c61682 Author: Jakub Kicinski Date: Wed Mar 15 21:25:24 2023 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== ice: refactor mailbox overflow detection Jake Keller says: The primary motivation of this series is to cleanup and refactor the mailbox overflow detection logic such that it will work with Scalable IOV. In addition a few other minor cleanups are done while I was working on the code in the area. First, the mailbox overflow functions in ice_vf_mbx.c are refactored to store the data per-VF as an embedded structure in struct ice_vf, rather than stored separately as a fixed-size array which only works with Single Root IOV. This reduces the overall memory footprint when only a handful of VFs are used. The overflow detection functions are also cleaned up to reduce the need for multiple separate calls to determine when to report a VF as potentially malicious. Finally, the ice_is_malicious_vf function is cleaned up and moved into ice_virtchnl.c since it is not Single Root IOV specific, and thus does not belong in ice_sriov.c I could probably have done this in fewer patches, but I split pieces out to hopefully aid in reviewing the overall sequence of changes. This does cause some additional thrash as it results in intermediate versions of the refactor, but I think its worth it for making each step easier to understand. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: call ice_is_malicious_vf() from ice_vc_process_vf_msg() ice: move ice_is_malicious_vf() to ice_virtchnl.c ice: print message if ice_mbx_vf_state_handler returns an error ice: pass mbxdata to ice_is_malicious_vf() ice: remove unnecessary &array[0] and just use array ice: always report VF overflowing mailbox even without PF VSI ice: declare ice_vc_process_vf_msg in ice_virtchnl.h ice: initialize mailbox snapshot earlier in PF init ice: merge ice_mbx_report_malvf with ice_mbx_vf_state_handler ice: remove ice_mbx_deinit_snapshot ice: move VF overflow message count into struct ice_mbx_vf_info ice: track malicious VFs in new ice_mbx_vf_info structure ice: convert ice_mbx_clear_malvf to void and use WARN ice: re-order ice_mbx_reset_snapshot function ==================== Link: https://lore.kernel.org/r/20230313182123.483057-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit bfedee5dc406ddcd70d667be1501659f1b232b7f Author: Luis Chamberlain Date: Fri Mar 10 15:28:49 2023 -0800 powerpc: Simplify sysctl registration for powersave_nap_ctl_table There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Signed-off-by: Michael Ellerman Link: https://msgid.link/20230310232850.3960676-2-mcgrof@kernel.org commit 543c143dac5d64a8de8db3ccadea6d92c34fd1e6 Author: Krzysztof Kozlowski Date: Sun Mar 12 14:26:37 2023 +0100 ptp: ines: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes !CONFIG_OF error: drivers/ptp/ptp_ines.c:783:34: error: ‘ines_ptp_ctrl_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Simon Horman Acked-by: Richard Cochran Link: https://lore.kernel.org/r/20230312132637.352755-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski commit 608465f798bb3eaf6773a49b893902860858e294 Author: Stephan Gerhold Date: Wed Mar 8 13:36:17 2023 +0100 arm64: dts: qcom: msm8916: Fix tsens_mode unit address The reg address of the tsens_mode nvmem cell is correct but the unit address does not match (0xec vs 0xef). Fix it. No functional change. Fixes: 24aafd041fb2 ("arm64: dts: qcom: msm8916: specify per-sensor calibration cells") Signed-off-by: Stephan Gerhold Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308123617.101211-1-stephan.gerhold@kernkonzept.com commit f03908b23f84ecd49f12facf4acf34c3ad24f27a Author: Neil Armstrong Date: Wed Mar 8 09:32:54 2023 +0100 arm64: dts: qcom: sm8550: misc style fixes Miscellaneous DT fixes to remove spurious blank line and enhance readability. Fixes: ffc50b2d3828 ("arm64: dts: qcom: Add base SM8550 dtsi") Fixes: d7da51db5b81 ("arm64: dts: qcom: sm8550: add display hardware devices") Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308-topic-sm8550-upstream-dt-fixups-v1-3-595b02067672@linaro.org commit 7629c7a525d163f2a3a08e260a69ff25163ab357 Author: Neil Armstrong Date: Wed Mar 8 09:32:53 2023 +0100 arm64: dts: qcom: sm8550: fix qup_spi0_cs node The node is incomplete and doesn't need a subnode, add the missing properties and move everything to the root of qup-spi0-cs-state node. Fixes: ffc50b2d3828 ("arm64: dts: qcom: Add base SM8550 dtsi") Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308-topic-sm8550-upstream-dt-fixups-v1-2-595b02067672@linaro.org commit 43743bfa36daed8f31860ad889a1413f239bb2f2 Author: Manivannan Sadhasivam Date: Wed Mar 8 13:54:21 2023 +0530 ARM: dts: qcom: sdx55-t55: Move "status" property down To align with rest of the devicetree files, let's move the "status" property down Suggested-by: Konrad Dybcio Reviewed-by: Konrad Dybcio Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308082424.140224-11-manivannan.sadhasivam@linaro.org commit 046392390884c9dead1d3703fa60dff97f22857a Author: Manivannan Sadhasivam Date: Wed Mar 8 13:54:20 2023 +0530 ARM: dts: qcom: sdx55-t55: Enable PCIe RC support Enable PCIe RC support on Thundercomm T55 board. Reviewed-by: Konrad Dybcio Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308082424.140224-10-manivannan.sadhasivam@linaro.org commit f9364a7ced5e6e36904c359cafe23cbf03645884 Author: Manivannan Sadhasivam Date: Wed Mar 8 13:54:19 2023 +0530 ARM: dts: qcom: sdx55: List the property values vertically To align with the rest of the devicetree files and the relative properties, let's list the values of properties such as {reg/clock/interrupt}-names vertically. Suggested-by: Konrad Dybcio Reviewed-by: Konrad Dybcio Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308082424.140224-9-manivannan.sadhasivam@linaro.org commit 2b20437e67a4b74b990d19d3dbf55388e941f30f Author: Manivannan Sadhasivam Date: Wed Mar 8 13:54:18 2023 +0530 ARM: dts: qcom: sdx55: Add support for PCIe RC controller The PCIe controller in SDX55 can act as the RC controller also. Let's add support for it. Reviewed-by: Konrad Dybcio Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308082424.140224-8-manivannan.sadhasivam@linaro.org commit c9f30e3dd92ba779c9cb8bb694ed7a8e2c9f0bb3 Author: Manivannan Sadhasivam Date: Wed Mar 8 13:54:17 2023 +0530 ARM: dts: qcom: sdx55: Rename pcie0_{phy/lane} to pcie_{phy/lane} There is only one PCIe PHY in this SoC, so there is no need to add an index to the suffix. This also matches the naming convention of the PCIe controller. Reviewed-by: Konrad Dybcio Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308082424.140224-7-manivannan.sadhasivam@linaro.org commit 3b76b736cd9933ff88764ffec01cbd859c1475e7 Author: Manivannan Sadhasivam Date: Wed Mar 8 13:54:16 2023 +0530 ARM: dts: qcom: sdx55: Fix the unit address of PCIe EP node Unit address of PCIe EP node should be 0x1c00000 as it has to match the first address specified in the reg property. This also requires sorting the node in the ascending order. Fixes: e6b69813283f ("ARM: dts: qcom: sdx55: Add support for PCIe EP") Reviewed-by: Konrad Dybcio Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308082424.140224-6-manivannan.sadhasivam@linaro.org commit 9559342891be54d9ffd13061022d9e5d24b2577a Author: Melody Olvera Date: Mon Mar 6 15:11:57 2023 -0800 dt-bindings: soc: qcom: aoss: Document QDU1000/QRU1000 compatible Add compatible for QDU1000 and QRU1000 aoss devices. Signed-off-by: Melody Olvera Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230306231202.12223-3-quic_molvera@quicinc.com commit bbf97c274da60fcfbb8ebde70a1c3abc6102c709 Author: Melody Olvera Date: Mon Mar 6 15:11:56 2023 -0800 dt-bindings: firmware: qcom,scm: Update QDU1000/QRU1000 compatible Update compatible for QDU1000 and QRU1000 to include the interconnect these devices have. Signed-off-by: Melody Olvera Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230306231202.12223-2-quic_molvera@quicinc.com commit df03c41673308006fab6ba71a8458b15a79181f6 Author: Krzysztof Kozlowski Date: Sat Mar 4 13:33:58 2023 +0100 arm64: dts: qcom: sm8250-xiaomi-elish: correct GPIO keys wakeup gpio-keys,wakeup is a deprecated property: sm8250-xiaomi-elish.dtb: gpio-keys: key-vol-up: Unevaluated properties are not allowed ('gpio-key,wakeup' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304123358.34274-8-krzysztof.kozlowski@linaro.org commit 77a7e394287177b57ec14172a046819eec1a8e90 Author: Krzysztof Kozlowski Date: Sat Mar 4 13:33:57 2023 +0100 arm64: dts: qcom: sm8250-sony-xperia: correct GPIO keys wakeup gpio-keys,wakeup is a deprecated property: sm8250-sony-xperia-edo-pdx206.dtb: gpio-keys: key-vol-down: Unevaluated properties are not allowed ('gpio-key,wakeup' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304123358.34274-7-krzysztof.kozlowski@linaro.org commit d30f4d6de95ab05cec138929f54f5b92a394c68b Author: Krzysztof Kozlowski Date: Sat Mar 4 13:33:56 2023 +0100 arm64: dts: qcom: sm6115p-lenovo-j606f: correct GPIO keys wakeup gpio-keys,wakeup is a deprecated property: sm6115p-lenovo-j606f.dtb: gpio-keys: key-volume-up: Unevaluated properties are not allowed ('gpio-key,wakeup' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304123358.34274-6-krzysztof.kozlowski@linaro.org commit f06c0f2779e4567e3a83986646bdd7f63edfee17 Author: Krzysztof Kozlowski Date: Sat Mar 4 13:33:55 2023 +0100 arm64: dts: qcom: sdm630-sony-xperia: correct GPIO keys wakeup gpio-keys,wakeup is a deprecated property: sdm630-sony-xperia-nile-voyager.dtb: gpio-keys: key-vol-down: Unevaluated properties are not allowed ('gpio-key,wakeup' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304123358.34274-5-krzysztof.kozlowski@linaro.org commit aa03d854ad656ae214f7ebb13e7d95e436e99da1 Author: Krzysztof Kozlowski Date: Sat Mar 4 13:33:54 2023 +0100 arm64: dts: qcom: sc7280-idp: correct GPIO keys wakeup gpio-keys,wakeup is a deprecated property: sc7280-idp.dtb: gpio-keys: key-volume-up: Unevaluated properties are not allowed ('gpio-key,wakeup' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304123358.34274-4-krzysztof.kozlowski@linaro.org commit ff348b7d963a8b80502997bc266d47e31406db45 Author: Krzysztof Kozlowski Date: Sat Mar 4 13:33:53 2023 +0100 arm64: dts: qcom: msm8998-sony-xperia: correct GPIO keys wakeup gpio-keys,wakeup is a deprecated property: msm8998-sony-xperia-yoshino-lilac.dtb: gpio-keys: button-vol-down: Unevaluated properties are not allowed ('gpio-key,wakeup' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304123358.34274-3-krzysztof.kozlowski@linaro.org commit d7f1f0fd7944b89d45accde9017095feab2b4675 Author: Krzysztof Kozlowski Date: Sat Mar 4 13:33:52 2023 +0100 arm64: dts: qcom: msm8998-fxtec: correct GPIO keys wakeup gpio-keys,wakeup is a deprecated property: msm8998-fxtec-pro1.dtb: gpio-hall-sensors: event-hall-sensor1: Unevaluated properties are not allowed ('gpio-key,wakeup' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304123358.34274-2-krzysztof.kozlowski@linaro.org commit b26d66228e9744f4ac278d4fa891fc973b00dc6b Author: Krzysztof Kozlowski Date: Sat Mar 4 13:33:51 2023 +0100 arm64: dts: qcom: sm8150-kumano: correct GPIO keys wakeup gpio-keys,wakeup is a deprecated property: sm8150-sony-xperia-kumano-bahamut.dtb: gpio-keys: key-camera-focus: Unevaluated properties are not allowed ('gpio-key,wakeup' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230304123358.34274-1-krzysztof.kozlowski@linaro.org commit 72fe61d745cb0e199448e9125d894e59508b2bb3 Merge: b8a2e3f93d412 aa3d65de4b900 Author: Alexei Starovoitov Date: Wed Mar 15 11:43:36 2023 -0700 Merge branch 'Fix attaching fentry/fexit/fmod_ret/lsm to modules' Viktor Malik says: ==================== I noticed that the verifier behaves incorrectly when attaching to fentry of multiple functions of the same name located in different modules (or in vmlinux). The reason for this is that if the target program is not specified, the verifier will search kallsyms for the trampoline address to attach to. The entire kallsyms is always searched, not respecting the module in which the function to attach to is located. As Yonghong correctly pointed out, there is yet another issue - the trampoline acquires the module reference in register_fentry which means that if the module is unloaded between the place where the address is found in the verifier and register_fentry, it is possible that another module is loaded to the same address in the meantime, which may lead to errors. This patch fixes the above issues by extracting the module name from the BTF of the attachment target (which must be specified) and by doing the search in kallsyms of the correct module. At the same time, the module reference is acquired right after the address is found and only released right before the program itself is unloaded. --- Changes in v10: - added the new test to DENYLIST.aarch64 (suggested by Andrii) - renamed the test source file to match the test name Changes in v9: - two small changes suggested by Jiri Olsa and Jiri's ack Changes in v8: - added module_put to error paths in bpf_check_attach_target after the module reference is acquired Changes in v7: - refactored the module reference manipulation (comments by Jiri Olsa) - cleaned up the test (comments by Andrii Nakryiko) Changes in v6: - storing the module reference inside bpf_prog_aux instead of bpf_trampoline and releasing it when the program is unloaded (suggested by Jiri Olsa) Changes in v5: - fixed acquiring and releasing of module references by trampolines to prevent modules being unloaded between address lookup and trampoline allocation Changes in v4: - reworked module kallsyms lookup approach using existing functions, verifier now calls btf_try_get_module to retrieve the module and find_kallsyms_symbol_value to get the symbol address (suggested by Alexei) - included Jiri Olsa's comments - improved description of the new test and added it as a comment into the test source Changes in v3: - added trivial implementation for kallsyms_lookup_name_in_module() for !CONFIG_MODULES (noticed by test robot, fix suggested by Hao Luo) Changes in v2: - introduced and used more space-efficient kallsyms lookup function, suggested by Jiri Olsa - included Hao Luo's comments ==================== Signed-off-by: Alexei Starovoitov commit aa3d65de4b9004d799f97700751a86d3ebd7d5f9 Author: Viktor Malik Date: Fri Mar 10 08:41:00 2023 +0100 bpf/selftests: Test fentry attachment to shadowed functions Adds a new test that tries to attach a program to fentry of two functions of the same name, one located in vmlinux and the other in bpf_testmod. To avoid conflicts with existing tests, a new function "bpf_fentry_shadow_test" was created both in vmlinux and in bpf_testmod. The previous commit fixed a bug which caused this test to fail. The verifier would always use the vmlinux function's address as the target trampoline address, hence trying to create two trampolines for a single address, which is forbidden. The test (similarly to other fentry/fexit tests) is not working on arm64 at the moment. Signed-off-by: Viktor Malik Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/5fe2f364190b6f79b085066ed7c5989c5bc475fa.1678432753.git.vmalik@redhat.com Signed-off-by: Alexei Starovoitov commit 31bf1dbccfb0a9861d4846755096b3fff5687f8a Author: Viktor Malik Date: Fri Mar 10 08:40:59 2023 +0100 bpf: Fix attaching fentry/fexit/fmod_ret/lsm to modules This resolves two problems with attachment of fentry/fexit/fmod_ret/lsm to functions located in modules: 1. The verifier tries to find the address to attach to in kallsyms. This is always done by searching the entire kallsyms, not respecting the module in which the function is located. Such approach causes an incorrect attachment address to be computed if the function to attach to is shadowed by a function of the same name located earlier in kallsyms. 2. If the address to attach to is located in a module, the module reference is only acquired in register_fentry. If the module is unloaded between the place where the address is found (bpf_check_attach_target in the verifier) and register_fentry, it is possible that another module is loaded to the same address which may lead to potential errors. Since the attachment must contain the BTF of the program to attach to, we extract the module from it and search for the function address in the correct module (resolving problem no. 1). Then, the module reference is taken directly in bpf_check_attach_target and stored in the bpf program (in bpf_prog_aux). The reference is only released when the program is unloaded (resolving problem no. 2). Signed-off-by: Viktor Malik Acked-by: Jiri Olsa Reviewed-by: Luis Chamberlain Link: https://lore.kernel.org/r/3f6a9d8ae850532b5ef864ef16327b0f7a669063.1678432753.git.vmalik@redhat.com Signed-off-by: Alexei Starovoitov commit b82c362b4d27f439f9ba753e74e0e7a364263f3a Author: Douglas Anderson Date: Thu Mar 2 13:11:07 2023 -0800 arm64: dts: qcom: sc7180: Delete mrbland The mrbland board was never actually produced and there has been no activity around the board for quite some time. It seems highly unlikely to magically get revived. There should be nobody in need of these device trees, so let's delete them. If somehow the project resurrects itself then we can re-add support, perhaps just for -rev1+. Signed-off-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230302131031.v2.4.I79eee3b8e9eb3086ae02760e97a2e12ffa8eb4f0@changeid commit c0d1296512102a216f9ce10238a9f79c0ac22ccf Author: Douglas Anderson Date: Thu Mar 2 13:11:06 2023 -0800 arm64: dts: qcom: sc7180: Delete lazor-rev0 lazor-rev0 was a pile of parts. While I kept the pile of parts for lazor running on my desk for longer than I usually do, those days are still long past. Let's finally delete support for lazor-rev0. Signed-off-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230302131031.v2.3.I30128a6f4b60b096770186430036afb40ede6f70@changeid commit 5fe8b1c88d7b3a227d96f277cd0d36a76aff0273 Author: Douglas Anderson Date: Thu Mar 2 13:11:05 2023 -0800 arm64: dts: qcom: sc7180: Delete kingoftown-rev0 The earliest kingoftown that I could find in my pile of boards was -rev2 and even that revision looks pretty rough (plastics on the case are very unfinished). Though I don't actually have details about how many -rev0 devices were produced, I can't imagine anyone still using one. Let's delete support. Signed-off-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230302131031.v2.2.I68cbe5d5d45074428469da8c52f1d6a78bdc62fc@changeid commit 62d882e62fe91ebdf4acbb8444bb3cf78a958aef Author: Douglas Anderson Date: Thu Mar 2 13:11:04 2023 -0800 arm64: dts: qcom: sc7180: Delete wormdingler-rev0 The earliest wormdingler I could find in my pile of hardware is -rev1. I believe that -rev0 boards were just distributed as a pile of components with no case. At this point I can't imagine anyone needing to make wormdingler-rev0 work, so let's delete support for it. Signed-off-by: Douglas Anderson Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230302131031.v2.1.Id0cd5120469eb200118c0c7b8ee8209f877767b4@changeid commit 4a2c9b9e1215c557c17a48e3fabe9b1674c1d608 Author: Adam Skladowski Date: Thu Mar 2 13:30:49 2023 +0100 arm64: dts: qcom: msm8976: Add and provide xo clk to rpmcc In order for consumers of RPMCC XO clock to probe successfully their parent needs to be feed with reference clock to obtain proper rate, add fixed xo-board clock and supply it to rpmcc to make consumers happy. Frequency setting is left per board basis just like on other recent trees. Fixes: 0484d3ce0902 ("arm64: dts: qcom: Add DTS for MSM8976 and MSM8956 SoCs") Fixes: ff7f6d34ca07 ("arm64: dts: qcom: Add support for SONY Xperia X/X Compact") Signed-off-by: Adam Skladowski Reviewed-by: Dmitry Baryshkov [bjorn: Squashed the two patches] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230302123051.12440-1-a39.skl@gmail.com Link: https://lore.kernel.org/r/20230302123051.12440-2-a39.skl@gmail.com commit 0b16b34e491629016109e56747ad64588074194b Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:52 2023 +0530 ARM: dts: qcom: ipq8064: Fix the PCI I/O port range For 64KiB of the I/O region, the I/O ports of the legacy PCI devices are located in the range of 0x0 to 0x10000. Hence, fix the bogus PCI addresses (0x0fe00000, 0x31e00000, 0x35e00000) specified in the ranges property for I/O region. While at it, let's use the missing 0x prefix for the addresses. Fixes: 93241840b664 ("ARM: dts: qcom: Add pcie nodes for ipq8064") Reported-by: Arnd Bergmann Link: https://lore.kernel.org/linux-arm-msm/7c5dfa87-41df-4ba7-b0e4-72c8386402a8@app.fastmail.com/ Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-17-manivannan.sadhasivam@linaro.org commit 2540279e9a9e74fc880d1e4c83754ecfcbe290a0 Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:51 2023 +0530 ARM: dts: qcom: ipq4019: Fix the PCI I/O port range For 1MiB of the I/O region, the I/O ports of the legacy PCI devices are located in the range of 0x0 to 0x100000. Hence, fix the bogus PCI address (0x40200000) specified in the ranges property for I/O region. While at it, let's use the missing 0x prefix for the addresses. Fixes: 187519403273 ("ARM: dts: ipq4019: Add a few peripheral nodes") Reported-by: Arnd Bergmann Link: https://lore.kernel.org/linux-arm-msm/7c5dfa87-41df-4ba7-b0e4-72c8386402a8@app.fastmail.com/ Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-16-manivannan.sadhasivam@linaro.org commit 84160da56dd0ce48dd8eed56237cc8be45bd55dc Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:50 2023 +0530 ARM: dts: qcom: apq8064: Use 0x prefix for the PCI I/O and MEM ranges To maintain the uniformity, let's use the 0x prefix for the values of ranges property. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-15-manivannan.sadhasivam@linaro.org commit cf4e716e9a38b32a922a88ac3c5b701137a663dd Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:49 2023 +0530 arm64: dts: qcom: sm8350: Fix the PCI I/O port range For 1MiB of the I/O region, the I/O ports of the legacy PCI devices are located in the range of 0x0 to 0x100000. Hence, fix the bogus PCI addresses (0x60200000, 0x40200000) specified in the ranges property for I/O region. While at it, let's use the missing 0x prefix for the addresses. Fixes: 6daee40678a0 ("arm64: dts: qcom: sm8350: add PCIe devices") Reported-by: Arnd Bergmann Link: https://lore.kernel.org/linux-arm-msm/7c5dfa87-41df-4ba7-b0e4-72c8386402a8@app.fastmail.com/ Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-14-manivannan.sadhasivam@linaro.org commit f57903c8f4c77938eb71fc67e4652264a9fa14f9 Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:48 2023 +0530 arm64: dts: qcom: sm8450: Fix the PCI I/O port range For 1MiB of the I/O region, the I/O ports of the legacy PCI devices are located in the range of 0x0 to 0x100000. Hence, fix the bogus PCI addresses (0x60200000, 0x40200000) specified in the ranges property for I/O region. While at it, let's use the missing 0x prefix for the addresses. Fixes: bc6588bc25fb ("arm64: dts: qcom: sm8450: add PCIe1 root device") Fixes: 7b09b1b47335 ("arm64: dts: qcom: sm8450: add PCIe0 RC device") Reported-by: Arnd Bergmann Link: https://lore.kernel.org/linux-arm-msm/7c5dfa87-41df-4ba7-b0e4-72c8386402a8@app.fastmail.com/ Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-13-manivannan.sadhasivam@linaro.org commit 422b110b9b0af0afd4a4b19e8fc3ceab9e71d842 Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:47 2023 +0530 arm64: dts: qcom: sm8150: Fix the PCI I/O port range For 1MiB of the I/O region, the I/O ports of the legacy PCI devices are located in the range of 0x0 to 0x100000. Hence, fix the bogus PCI addresses (0x60200000, 0x40200000) specified in the ranges property for I/O region. While at it, let's use the missing 0x prefix for the addresses. Fixes: a1c86c680533 ("arm64: dts: qcom: sm8150: Add PCIe nodes") Reported-by: Arnd Bergmann Link: https://lore.kernel.org/linux-arm-msm/7c5dfa87-41df-4ba7-b0e4-72c8386402a8@app.fastmail.com/ Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-12-manivannan.sadhasivam@linaro.org commit 89fe81c01715f81c3a7d371e9e5f7d7ae5bc557c Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:46 2023 +0530 arm64: dts: qcom: sc8280xp: Fix the PCI I/O port range For 1MiB of the I/O region, the I/O ports of the legacy PCI devices are located in the range of 0x0 to 0x100000. Hence, fix the bogus PCI addresses (0x30200000, 0x32200000, 0x34200000, 0x38200000, 0x3c200000) specified in the ranges property for I/O region. Fixes: 813e83157001 ("arm64: dts: qcom: sc8280xp/sa8540p: add PCIe2-4 nodes") Reported-by: Arnd Bergmann Link: https://lore.kernel.org/linux-arm-msm/7c5dfa87-41df-4ba7-b0e4-72c8386402a8@app.fastmail.com/ Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-11-manivannan.sadhasivam@linaro.org commit cb3d6ab7fb72f89c92884a6236911da28ddf9b47 Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:45 2023 +0530 arm64: dts: qcom: qcs404: Use 0x prefix for the PCI I/O and MEM ranges To maintain the uniformity, let's use the 0x prefix for the values of ranges property. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-10-manivannan.sadhasivam@linaro.org commit e115a4495db687898b8d91d4f16c2cf55bbf167c Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:44 2023 +0530 arm64: dts: qcom: sm8250: Fix the PCI I/O port range For 1MiB of the I/O region, the I/O ports of the legacy PCI devices are located in the range of 0x0 to 0x100000. Hence, fix the bogus PCI addresses (0x60200000, 0x40200000, 0x64200000) specified in the ranges property for I/O region. While at it, let's use the missing 0x prefix for the addresses. Fixes: e53bdfc00977 ("arm64: dts: qcom: sm8250: Add PCIe support") Reported-by: Arnd Bergmann Link: https://lore.kernel.org/linux-arm-msm/7c5dfa87-41df-4ba7-b0e4-72c8386402a8@app.fastmail.com/ Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-9-manivannan.sadhasivam@linaro.org commit cf0ac10feb17661987d0018eb9475dc03e2a2253 Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:43 2023 +0530 arm64: dts: qcom: msm8996: Fix the PCI I/O port range For 1MiB of the I/O region, the I/O ports of the legacy PCI devices are located in the range of 0x0 to 0x100000. Hence, fix the bogus PCI addresses (0x0c200000, 0x0d200000, 0x0e200000) specified in the ranges property for I/O region. While at it, let's also align the entries. Fixes: ed965ef89227 ("arm64: dts: qcom: msm8996: add support to pcie") Reported-by: Arnd Bergmann Link: https://lore.kernel.org/linux-arm-msm/7c5dfa87-41df-4ba7-b0e4-72c8386402a8@app.fastmail.com/ Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-8-manivannan.sadhasivam@linaro.org commit 75a6e1fdb351189f55097741e8460ca3f9b2883f Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:42 2023 +0530 arm64: dts: qcom: ipq6018: Fix the PCI I/O port range For 64KiB of the I/O region, the I/O ports of the legacy PCI devices are located in the range of 0x0 to 0x10000. Hence, fix the bogus PCI address (0x20200000) specified in the ranges property for I/O region. While at it, let's use the missing 0x prefix for the addresses. Fixes: 095bbdd9a5c3 ("arm64: dts: qcom: ipq6018: Add pcie support") Reported-by: Arnd Bergmann Link: https://lore.kernel.org/linux-arm-msm/7c5dfa87-41df-4ba7-b0e4-72c8386402a8@app.fastmail.com/ Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-7-manivannan.sadhasivam@linaro.org commit e49eafefe5ab325e38dd074f2005076ffc271e54 Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:41 2023 +0530 arm64: dts: qcom: ipq8074: Fix the PCI I/O port range For 64KiB of the I/O region, the I/O ports of the legacy PCI devices are located in the range of 0x0 to 0x10000. Hence, fix the bogus PCI addresses (0x10200000, 0x20200000) specified in the ranges property for I/O region. While at it, let's use the missing 0x prefix for the addresses and align them in a single line. Fixes: 33057e1672fe ("ARM: dts: ipq8074: Add pcie nodes") Reported-by: Arnd Bergmann Link: https://lore.kernel.org/linux-arm-msm/7c5dfa87-41df-4ba7-b0e4-72c8386402a8@app.fastmail.com/ Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-6-manivannan.sadhasivam@linaro.org commit 565c633940312b4eea7785a0a58e1944258c47e9 Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:40 2023 +0530 arm64: dts: qcom: sm8550: Fix the PCI I/O port range For 1MiB of the I/O region, the I/O ports of the legacy PCI devices are located in the range of 0x0 to 0x100000. Hence, fix the bogus PCI addresses (0x60200000, 0x40200000) specified in the ranges property for I/O region. While at it, let's use the missing 0x prefix for the addresses. Fixes: 7d1158c984d3 ("arm64: dts: qcom: sm8550: Add PCIe PHYs and controllers nodes") Reported-by: Arnd Bergmann Link: https://lore.kernel.org/linux-arm-msm/7c5dfa87-41df-4ba7-b0e4-72c8386402a8@app.fastmail.com/ Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-5-manivannan.sadhasivam@linaro.org commit 1d4743d6312582978966d38908b69085621b7693 Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:39 2023 +0530 arm64: dts: qcom: sc7280: Fix the PCI I/O port range For 1MiB of the I/O region, the I/O ports of the legacy PCI devices are located in the range of 0x0 to 0x100000. Hence, fix the bogus PCI address (0x40200000) specified in the ranges property for I/O region. Fixes: 92e0ee9f83b3 ("arm64: dts: qcom: sc7280: Add PCIe and PHY related nodes") Reported-by: Arnd Bergmann Link: https://lore.kernel.org/linux-arm-msm/7c5dfa87-41df-4ba7-b0e4-72c8386402a8@app.fastmail.com/ Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-4-manivannan.sadhasivam@linaro.org commit c30a27dcfe4545edbda1578b3a63ed6147519cdd Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:38 2023 +0530 arm64: dts: qcom: msm8998: Fix the PCI I/O port range For 1MiB of the I/O region, the I/O ports of the legacy PCI devices are located in the range of 0x0 to 0x100000. Hence, fix the bogus PCI address (0x1b200000) specified in the ranges property for I/O region. Fixes: b84dfd175c09 ("arm64: dts: qcom: msm8998: Add PCIe PHY and RC nodes") Reported-by: Arnd Bergmann Link: https://lore.kernel.org/linux-arm-msm/7c5dfa87-41df-4ba7-b0e4-72c8386402a8@app.fastmail.com/ Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-3-manivannan.sadhasivam@linaro.org commit 67aa109eee654c76dcc100554e637fa64d5aa099 Author: Manivannan Sadhasivam Date: Tue Feb 28 22:17:37 2023 +0530 arm64: dts: qcom: sdm845: Fix the PCI I/O port range For 1MiB of the I/O region, the I/O ports of the legacy PCI devices are located in the range of 0x0 to 0x100000. Hence, fix the bogus PCI addresses (0x60200000, 0x40200000) specified in the ranges property for I/O region. While at it, let's use the missing 0x prefix for the addresses. Fixes: 42ad231338c1 ("arm64: dts: qcom: sdm845: Add second PCIe PHY and controller") Fixes: 5c538e09cb19 ("arm64: dts: qcom: sdm845: Add first PCIe controller and PHY") Reported-by: Arnd Bergmann Link: https://lore.kernel.org/linux-arm-msm/7c5dfa87-41df-4ba7-b0e4-72c8386402a8@app.fastmail.com/ Signed-off-by: Manivannan Sadhasivam Reviewed-by: Arnd Bergmann Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230228164752.55682-2-manivannan.sadhasivam@linaro.org commit c2819cab9d2edddcb8395bb74367ba61e581a2c5 Author: Konrad Dybcio Date: Fri Feb 24 14:07:58 2023 +0100 arm64: dts: qcom: sc8280xp: Use correct CPU compatibles Cores 0-3 are CA78C r0p0, cores 4-7 are CX1C r0p0. Use the correct compatibles instead of the placeholder qcom,kryo. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230224130759.45579-2-konrad.dybcio@linaro.org commit 134da70c6406184d815a491fc9535627a05e764b Author: Otto Pflüger Date: Thu Feb 23 19:09:35 2023 +0100 clk: qcom: smd-rpm: Add clocks for MSM8917 MSM8917 has mostly the same rpm clocks as MSM8953, but lacks RF_CLK3 and IPA_CLK and additionally has the BIMC_GPU clock. Signed-off-by: Otto Pflüger Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230223180935.60546-5-otto.pflueger@abscue.de commit 33cc27a47d3ab6b598bf7f7dcd3a858458a4ec1d Author: Otto Pflüger Date: Thu Feb 23 19:09:33 2023 +0100 clk: qcom: Add global clock controller driver for MSM8917 This driver provides clocks, resets and power domains needed for various components of the MSM8917 SoC and the very similar QM215 SoC. According to [1] in the downstream kernel, the GPU clock has a different source mapping on QM215 (gcc_gfx3d_map vs gcc_gfx3d_map_qm215). [1]: https://git.codelinaro.org/clo/la/kernel/msm-4.9/-/blob/LF.UM.8.6.2-28000-89xx.0/include/dt-bindings/clock/msm-clocks-hwio-8952.h#L298 Signed-off-by: Otto Pflüger Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230223180935.60546-3-otto.pflueger@abscue.de commit 518634f959df633e00cc5d0b9c8aa2e338e49a44 Merge: fe084c62aaceb 940822566ea97 Author: Bjorn Andersson Date: Wed Mar 15 17:19:13 2023 -0700 Merge branch '20230223180935.60546-1-otto.pflueger@abscue.de' into clk-for-6.4 Merge MSM8917 Global Clock Controller and RPM clock controller bindings through topic branch, to make it possible to introduce in Devicetree source depending on these. commit 940822566ea9759b0af71178debf67ff09ce44d8 Author: Otto Pflüger Date: Thu Feb 23 19:09:34 2023 +0100 dt-bindings: clock: qcom,rpmcc: Add MSM8917 Document the qcom,rpmcc-msm8917 compatible. Signed-off-by: Otto Pflüger Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230223180935.60546-4-otto.pflueger@abscue.de commit 2d1fc2d804bc1503f4e36fb97b0f6698e7769796 Author: Otto Pflüger Date: Thu Feb 23 19:09:32 2023 +0100 dt-bindings: clock: Add MSM8917 global clock controller Add a device tree binding to describe clocks, resets and power domains provided by the global clock controller on MSM8917 SoCs and the very similar QM215 SoCs. Add the new compatibles to qcom,gcc-msm8909.yaml. There is no need to create another YAML file because the bindings are identical (MSM8917 GCC requires the same parent clocks as the MSM8909 GCC). Signed-off-by: Otto Pflüger Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230223180935.60546-2-otto.pflueger@abscue.de commit 56d2156e7c298ecad5a113a81e5550631bcf7fd5 Author: Devi Priya Date: Fri Feb 17 19:50:25 2023 +0530 dt-bindings: soc: qcom: smd-rpm: Add IPQ9574 compatible Document the compatible for RPM communication over SMD for IPQ9574 SoC Signed-off-by: Devi Priya Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230217142030.16012-2-quic_devipriy@quicinc.com commit 64d5c8a46890010e7cf5a72c0616d1141f84494f Author: Devi Priya Date: Tue Feb 14 22:01:14 2023 +0530 dt-bindings: arm: qcom: Add ipq9574 compatible Document the new ipq9574 SoC/board device tree bindings Acked-by: Krzysztof Kozlowski Signed-off-by: Devi Priya Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214163116.9924-6-quic_devipriy@quicinc.com commit 968a26a07f75377afbd4f7bb18ef587a1443c244 Author: Elliot Berman Date: Mon Feb 13 10:18:29 2023 -0800 firmware: qcom_scm: Use fixed width src vm bitmap The maximum VMID for assign_mem is 63. Use a u64 to represent this bitmap instead of architecture-dependent "unsigned int" which varies in size on 32-bit and 64-bit platforms. Acked-by: Kalle Valo (ath10k) Tested-by: Gokul krishna Krishnakumar Signed-off-by: Elliot Berman Reviewed-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213181832.3489174-1-quic_eberman@quicinc.com commit 17c5ee1914dc8c4f42cab7a5beb2dc91aef0f873 Author: Rayyan Ansari Date: Sat Jan 21 19:25:40 2023 +0000 ARM: dts: qcom: msm8974: add correct XO clock source to GCC node Change the XO clock in MSM8974's GCC node to point to RPMCC. Signed-off-by: Rayyan Ansari Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230121192540.9177-4-rayyan@ansari.sh commit d4b2c596fe5cb62560ce5a1442d8f64ec1ee716e Author: Rayyan Ansari Date: Sat Jan 21 19:25:39 2023 +0000 ARM: dts: qcom: msm8226: add clocks and clock-names to GCC node Add the XO and Sleep Clock sources to the GCC node on MSM8226. Signed-off-by: Rayyan Ansari Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230121192540.9177-3-rayyan@ansari.sh commit fe084c62aacebad46ea2f5a7f1b3183180c00a3b Author: Rayyan Ansari Date: Sat Jan 21 19:25:38 2023 +0000 clk: qcom: smd: Add XO RPM clocks for MSM8226/MSM8974 Add the XO and XO_A clocks to the MSM8974 clock list, which is also used on MSM8226. Signed-off-by: Rayyan Ansari Tested-by: Luca Weiss Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230121192540.9177-2-rayyan@ansari.sh commit fb1fe1542a12e4694e05fe14d4003f828515700c Author: Mao Jinlong Date: Tue Jan 17 06:57:08 2023 -0800 arm64: dts: qcom: sm8250: Add tpdm mm/prng Add tpdm mm and tpdm prng for sm8250. +---------------+ +-------------+ | tpdm@6c08000 | |tpdm@684C000 | +-------|-------+ +------|------+ | | +-------|-------+ | | funnel@6c0b000| | +-------|-------+ | | | +-------|-------+ | |funnel@6c2d000 | | +-------|-------+ | | | | +---------------+ | +----- tpda@6004000 -----------+ +-------|-------+ | +-------|-------+ |funnel@6005000 | +---------------+ Acked-by: Suzuki K Poulose Signed-off-by: Mao Jinlong Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230117145708.16739-10-quic_jinlmao@quicinc.com commit 158ce4b3e1dfcf3e38c0dbfd626aee0f1bbfa3d1 Author: Christian Marangi Date: Mon Jan 16 21:47:51 2023 +0100 ARM: dts: qcom: rename kpss-acc-v2 nodes to power-manager nodes Change kpss-acc-v2 nodes naming to power-manager to reflect Documentation schema. Signed-off-by: Christian Marangi Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230116204751.23045-8-ansuelsmth@gmail.com commit 6b20edd72930d83e9c2c2017df883b3c5c1502fd Author: Christian Marangi Date: Mon Jan 16 21:47:50 2023 +0100 ARM: dts: qcom: add missing clock configuration for kpss-acc-v1 Add missing clock configuration by adding clocks, clock-names, clock-output-names and #clock-cells bindings for each kpss-acc-v1 clock-controller to reflect Documentation schema. Reviewed-by: Dmitry Baryshkov Signed-off-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230116204751.23045-7-ansuelsmth@gmail.com commit a9e6d16ad493529da4a48d7ae474ecdc399ee884 Author: Christian Marangi Date: Mon Jan 16 21:47:49 2023 +0100 ARM: dts: qcom: add and fix clock configuration for kpss-gcc nodes Add missing clock configuration by adding clocks, clock-names and #clock-cells bindings for each kpss-acc-v1 clock-controller node for apq8064 and msm8960 to reflect Documentation schema. Add missing #clock-cells binding and remove useless clock-output-names for ipq806x dtsi. Signed-off-by: Christian Marangi Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230116204751.23045-6-ansuelsmth@gmail.com commit b74ca4a0e3043af06819905306e05189f337466a Author: Christian Marangi Date: Mon Jan 16 21:47:48 2023 +0100 ARM: dts: qcom: add per SoC compatible for qcom,kpss-gcc nodes Add per Soc compatible for qcom,kpss-gcc nodes. While currently not used by the kpss driver they can serve further customization and they are required to be defined per Documentation schema. Signed-off-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230116204751.23045-5-ansuelsmth@gmail.com commit afd7b4d68054faef065f9526d41a1f54b58218f0 Author: Christian Marangi Date: Mon Jan 16 21:47:47 2023 +0100 dt-bindings: arm: msm: Rework kpss-gcc driver Documentation to yaml Rework kpss-gcc driver Documentation to yaml Documentation and move it to clock as it's a clock-controller. The current kpss-gcc Documentation have major problems and can't be converted directly. Introduce various changes to the original Documentation. Add #clock-cells additional binding as this clock outputs a static clk named acpu_l2_aux with supported compatible. Only some compatible require and outputs a clock, for the others, set only the reg as a required binding to correctly export the kpss-gcc registers. As the reg is shared also add the required syscon compatible. Signed-off-by: Christian Marangi Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230116204751.23045-4-ansuelsmth@gmail.com commit 4260ddfb649666b0da02ff9fe5d37664e447b92a Author: Christian Marangi Date: Mon Jan 16 21:47:46 2023 +0100 dt-bindings: arm: msm: Convert and split kpss-acc driver Documentation to yaml Convert kpss-acc driver Documentation to yaml. The original Documentation was wrong all along. Fix it while we are converting it. The example was wrong as kpss-acc-v2 should only expose the regs but we don't have any driver that expose additional clocks. The kpss-acc driver is only specific to v1. For this exact reason, split the Documentation to 2 different schema, v1 as clock-controller and v2 for power-manager as per msm-3.10 specification, the exposed regs handle power manager. Signed-off-by: Christian Marangi Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230116204751.23045-3-ansuelsmth@gmail.com commit 44750f153699b6e4f851a399287e5c8df208d696 Author: Vincent Guittot Date: Fri Jan 6 17:46:18 2023 +0100 arm64: dts: qcom: sdm845: correct dynamic power coefficients While stressing EAS on my dragonboard RB3, I have noticed that LITTLE cores where never selected as the most energy efficient CPU whatever the utilization level of waking task. energy model framework uses its cost field to estimate the energy with the formula: nrg = cost of the selected OPP * utilization / CPU's max capacity which ends up selecting the CPU with lowest cost / max capacity ration as long as the utilization fits in the OPP's capacity. If we compare the cost of a little OPP with similar capacity of a big OPP like : OPP(kHz) OPP capacity cost max capacity cost/max capacity LITTLE 1766400 407 351114 407 863 big 1056000 408 520267 1024 508 This can be interpreted as the LITTLE core consumes 70% more than big core for the same compute capacity. According to [1], LITTLE consumes 10% less than big core for Coremark benchmark at those OPPs. If we consider that everything else stays unchanged, the dynamic-power-coefficient of LITTLE core should be only 53% of the current value: 290 * 53% = 154 Set the dynamic-power-coefficient of CPU0-3 to 154 to fix the energy model. [1] https://github.com/kdrag0n/freqbench/tree/master/results/sdm845/main Fixes: 0e0a8e35d725 ("arm64: dts: qcom: sdm845: correct dynamic power coefficients") Signed-off-by: Vincent Guittot Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230106164618.1845281-1-vincent.guittot@linaro.org commit d56dd7f935e125244bc15f5a0a9e68cdb0ec87ca Author: Kathiravan T Date: Fri Feb 10 11:34:01 2023 +0530 arm64: dts: qcom: ipq5332: add SMEM support Add SMEM support by adding required nodes. Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230210060401.24383-3-quic_kathirav@quicinc.com commit ed32155302fc3e5b8d30c51b95666e844f1449e1 Author: Kathiravan T Date: Fri Feb 10 11:34:00 2023 +0530 arm64: dts: qcom: ipq5332: enable the download mode support Enable the support for download mode to collect the RAM dumps if system crashes, to perform the post mortem analysis. Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230210060401.24383-2-quic_kathirav@quicinc.com commit 48adb3be7d617ecc7d9656032e7253406b8040f5 Author: Kathiravan T Date: Tue Mar 7 11:52:32 2023 +0530 arm64: defconfig: Enable IPQ5332 SoC base configs Enable the clock and pinctrl configs for Qualcomm IPQ5332 SoC Reviewed-by: Dmitry Baryshkov Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307062232.4889-10-quic_kathirav@quicinc.com commit 0360f0ea8c0f67ec8a25c5ec89f044dbc66b5c5f Author: Kathiravan T Date: Tue Mar 7 11:52:31 2023 +0530 arm64: dts: qcom: add IPQ5332 SoC and MI01.2 board support Add initial device tree support for the Qualcomm IPQ5332 SoC and MI01.2 board. Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307062232.4889-9-quic_kathirav@quicinc.com commit 9e4a7652d7028d40b2dd6636d400ca6266d641ef Author: Kathiravan T Date: Tue Mar 7 11:52:30 2023 +0530 dt-bindings: firmware: qcom,scm: document IPQ5332 SCM Document the compatible for IPQ5332 SCM. Acked-by: Krzysztof Kozlowski Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307062232.4889-8-quic_kathirav@quicinc.com commit 5d092236e0b0e154ca5f4f65d33eea504cc18578 Author: Kathiravan T Date: Tue Mar 7 11:52:29 2023 +0530 dt-bindings: qcom: add ipq5332 boards Document the new ipq5332 SoC/board device tree bindings Reviewed-by: Krzysztof Kozlowski Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307062232.4889-7-quic_kathirav@quicinc.com commit 377c0b46d8794ab4441c8c079e079dc2e367c1e1 Author: Kathiravan T Date: Tue Mar 7 11:52:28 2023 +0530 clk: qcom: ipq5332: mark GPLL4 as ignore unused temporarily Clock framework disables the GPLL4 source since there are no active users for this source currently. Some of the clocks initialized by the bootloaders uses the GPLL4 as the source. Due to this, when the GPLL4 is disabled by the clock framework, system is going for the reboot. To avoid this, mark the GPLL4 as ignore unused so that clock framework doesn't disable it. Once the users of this source is enabled, we can get rid of this flag. Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307062232.4889-6-quic_kathirav@quicinc.com commit 3d89d52970fdbeaf252d9e4f9bd067222d12641d Author: Kathiravan T Date: Tue Mar 7 11:52:27 2023 +0530 clk: qcom: add Global Clock controller (GCC) driver for IPQ5332 SoC Add support for the global clock controller found on IPQ5332 SoC. PLL used on IPQ5332 is of type Stromer Plus PLL, however the programming sequence is same as Stromer PLL, so lets re-use the Stromer PLL ops. Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307062232.4889-5-quic_kathirav@quicinc.com commit 0d6fd7f8b8f8fdb090f0ef61573f5648c19ff237 Author: Kathiravan T Date: Tue Mar 7 11:52:25 2023 +0530 clk: qcom: Add STROMER PLUS PLL type for IPQ5332 Add the support for stromer plus pll, which is found on the IPQ5332 SoCs. Programming sequence is same as the stromer pll, so we can re-use the same. Reviewed-by: Stephen Boyd Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307062232.4889-3-quic_kathirav@quicinc.com commit e47a4f55f240db3913317f34a9c685b5d85538f1 Author: Varadarajan Narayanan Date: Tue Mar 7 11:52:24 2023 +0530 clk: qcom: clk-alpha-pll: Add support for Stromer PLLs Add programming sequence support for managing the Stromer PLLs. Reviewed-by: Stephen Boyd Co-developed-by: Sricharan R Signed-off-by: Sricharan R Signed-off-by: Varadarajan Narayanan Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307062232.4889-2-quic_kathirav@quicinc.com commit bfb23a538eb039351f026509c2894394270fc82e Merge: 54ed70b57623e f99cdbd858df8 Author: Bjorn Andersson Date: Wed Mar 15 16:21:10 2023 -0700 Merge branch '20230307062232.4889-1-quic_kathirav@quicinc.com' into clk-for-6.4 Merge the IPQ5332 Global Clock Controller binding through a topic branch to make it possible to include in Devicetree source as well. commit f99cdbd858df8457bcffc3e90fa6939d517193c5 Author: Kathiravan T Date: Tue Mar 7 11:52:26 2023 +0530 dt-bindings: clock: Add Qualcomm IPQ5332 GCC Add binding for the Qualcomm IPQ5332 Global Clock Controller. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230307062232.4889-4-quic_kathirav@quicinc.com commit 81ac39144bf65c5f8ee00e61308fe1f3399b347c Author: Poovendhan Selvaraj Date: Thu Feb 16 17:30:08 2023 +0530 dt-bindings: scm: Add compatible for IPQ9574 Add the scm compatible string for IPQ9574 SoC Acked-by: Krzysztof Kozlowski Signed-off-by: Poovendhan Selvaraj Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230216120012.28357-2-quic_poovendh@quicinc.com commit 7ee938ac006096fe9c3f1075f56b9263587c150f Author: Felix Kuehling Date: Mon Mar 13 20:03:08 2023 -0400 drm/amdgpu: Don't resume IOMMU after incomplete init Check kfd->init_complete in kgd2kfd_iommu_resume, consistent with other kgd2kfd calls. This should fix IOMMU errors on resume from suspend when KFD IOMMU initialization failed. Reported-by: Matt Fagnani Link: https://lore.kernel.org/r/4a3b225c-2ffd-e758-4de1-447375e34cad@bell.net/ Link: https://bugzilla.kernel.org/show_bug.cgi?id=217170 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2454 Cc: Vasant Hegde Cc: Linux regression tracking (Thorsten Leemhuis) Cc: stable@vger.kernel.org Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Tested-by: Matt Fagnani Signed-off-by: Alex Deucher commit 0bad3200dffa26943ce2b561e5446cc3ac018bc9 Author: bobzhou Date: Wed Mar 15 15:23:48 2023 +0800 drm/amd: fix compilation issue with legacy gcc This patch is used to fix following compilation issue with legacy gcc error: ‘for’ loop initial declarations are only allowed in C99 mode Signed-off-by: bobzhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 4489f0fd9e01efac81d98884d5cf3fa708b9daac Author: Hawking Zhang Date: Mon Mar 6 19:34:34 2023 +0800 drm/amdgpu: Retire pcie_gen3_enable function Not needed since from vi. drop the function so we don't duplicate code when introduce new asics. Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit dabc114e4bac903c365bfe6d7b6e8ed7fa38f8ad Author: Hawking Zhang Date: Mon Mar 6 15:59:27 2023 +0800 drm/amdgpu: Move to common helper to query soc rev_id Replace soc15, nv, soc21 get_rev_id callback with common helper so we don't need to duplicate code when introduce new asics. Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 65ba96e91b689c23d6fa99c11cfd65965dcddc47 Author: Hawking Zhang Date: Mon Mar 6 15:48:48 2023 +0800 drm/amdgpu: Move to common indirect reg access helper Replace soc15, nv, soc21 specific callbacks with common one. so we don't need to duplicate code when introduce new asics. Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Acked-by: Christian König Signed-off-by: Alex Deucher commit 370808876b5cab365f8fc6dbaf8cae13a2bc6efa Author: Hawking Zhang Date: Sat Mar 4 20:22:23 2023 +0800 drm/amdgpu: drop ras check at asic level for new blocks amdgpu_ras_register_ras_block should always be invoked by ras_sw_init, where driver needs to check ras caps at ip level, instead of asic level. Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit fdc94d3a8c887e4e06a7ff8dcb51d55cd70e16cf Author: Hawking Zhang Date: Mon Mar 13 14:18:34 2023 +0800 drm/amdgpu: Rework pcie_bif ras sw_init pcie_bif ras blocks needs to be initialized as early as possible to handle fatal error detected in hw_init phase. also align the pcie_bif ras sw_init with other ras blocks Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit da9d669eab152dbd6e9410606a7c8c8a212a7959 Author: Hawking Zhang Date: Sat Mar 4 19:54:14 2023 +0800 drm/amdgpu: Rework xgmi_wafl_pcs ras sw_init To align with other IP blocks. Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 7f544c5488cf5bc94b379de750e08fa3e146b6ba Author: Hawking Zhang Date: Wed Mar 15 08:59:04 2023 +0800 drm/amdgpu: Rework mca ras sw_init To align with other IP blocks Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 22e3d9343b8292dfd8c72a5a539dc1ad4829b87a Author: David Belanger Date: Tue Feb 28 14:11:24 2023 -0500 drm/amdkfd: Fixed kfd_process cleanup on module exit. Handle case when module is unloaded (kfd_exit) before a process space (mm_struct) is released. v2: Fixed potential race conditions by removing all kfd_process from the process table first, then working on releasing the resources. v3: Fixed loop element access / synchronization. Fixed extra empty lines. Signed-off-by: David Belanger Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 3726b6e7c0f1842a2ffdfd5921c95f69c0524808 Author: Aric Cyr Date: Sun Mar 5 20:48:26 2023 -0500 drm/amd/display: 3.2.227 This version brings along the following: - FW Release 0.0.158.0 - Fixes to HDCP, DP MST and more - Improvements on USB4 links and more - Code re-architecture on link.h Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c79503dc2ec2378d08cccb6b53da408d6bd6cf9e Author: Anthony Koo Date: Sun Mar 5 01:35:03 2023 -0500 drm/amd/display: [FW Promotion] Release 0.0.158.0 [Why & How] Add boot control bit to control dispclk and dppclk deep sleep Acked-by: Qingqing Zhuo Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 05cff51055c1050bf3a730748db15eb84f34b31d Author: Samson Tam Date: Fri Mar 3 17:30:25 2023 -0500 drm/amd/display: fix assert condition [Why & How] Reversed assert condition when checking that phy_pix_clk[] is not 0 Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c416a9e4e31eaec5a35417b056a22c73652db544 Author: Stylon Wang Date: Wed Mar 1 23:56:51 2023 +0800 drm/amd/display: Clearly states if long or short HPD event in dmesg logs [Why] The log "DMUB HPD callback" is crucial to identify when DP tunneling is been established and driver is notified of this event from DMUB. Same log is shared for long and short hotplug event and we need to check trailing DC debug log to distinguish between them two, making debugging on DPIA related issues a bit more troublesome. [How] Clearly states in dmesg logs whether this is a long or short hotplug event. Reviewed-by: Hamza Mahfooz Acked-by: Qingqing Zhuo Signed-off-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7108a1c1271dc4d26789002c1a6858b52f237cf5 Author: Wesley Chalmers Date: Mon Feb 27 13:21:17 2023 -0500 drm/amd/display: Make DCN32 functions available to future DCNs [Why & How] Make DCN32 functions available for more DCNs. Reviewed-by: Chris Park Acked-by: Qingqing Zhuo Signed-off-by: Wesley Chalmers Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 057e335c71361063e173381cecf2e8487ec8b552 Author: Yifan Zha Date: Mon Mar 6 14:54:05 2023 +0800 drm/amdgpu: Init MMVM_CONTEXTS_DISABLE in gmc11 golden setting under SRIOV [Why] If disable the mmhub vm contexts(set MMVM_CONTEXTS_DISABLE to 0xffff), driver loading failed on vf due to fence fallback timer expired on all rings. FLR cannot reset MMVM_CONTEXTS_DISABLE. So this vf can not be recovered anymore unless trigger a whole gpu reset. [How] Under SRIOV, init MMVM_CONTEXTS_DISABLE in gmc11 golden register setting. Signed-off-by: Yifan Zha Reviewed-by: Horace Chen Signed-off-by: Alex Deucher commit 5f3401eeb064fab5ce50728cce46532cce7a85c5 Author: Samson Tam Date: Tue Feb 28 14:33:00 2023 -0500 drm/amd/display: reallocate DET for dual displays with high pixel rate ratio [Why] For dual displays where pixel rate is much higher on one display, we may get underflow when DET is evenly allocated. [How] Allocate less DET segments for the lower pixel rate display and more DET segments for the higher pixel rate display Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 562e08223a85f315122cd65e8f99b8c0a42b8771 Author: Ayush Gupta Date: Thu Mar 2 09:58:05 2023 -0500 drm/amd/display: disconnect MPCC only on OTG change [Why] Framedrops are observed while playing Vp9 and Av1 10 bit video on 8k resolution using VSR while playback controls are disappeared/appeared [How] Now ODM 2 to 1 is disabled for 5k or greater resolutions on VSR. Cc: stable@vger.kernel.org Cc: Mario Limonciello Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Ayush Gupta Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit deaccddaf4921faa5dfc71e8936dd8daa98ba33d Author: Cruise Hung Date: Thu Mar 2 10:33:51 2023 +0800 drm/amd/display: Fix DP MST sinks removal issue [Why] In USB4 DP tunneling, it's possible to have this scenario that the path becomes unavailable and CM tears down the path a little bit late. So, in this case, the HPD is high but fails to read any DPCD register. That causes the link connection type to be set to sst. And not all sinks are removed behind the MST branch. [How] Restore the link connection type if it fails to read DPCD register. Cc: stable@vger.kernel.org Cc: Mario Limonciello Reviewed-by: Wenjing Liu Acked-by: Qingqing Zhuo Signed-off-by: Cruise Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit eeefe7c4820b6baa0462a8b723ea0a3b5846ccae Author: Robin Chen Date: Fri Feb 17 20:47:57 2023 +0800 drm/amd/display: hpd rx irq not working with eDP interface [Why] This is the fix for the defect of commit ab144f0b4ad6 ("drm/amd/display: Allow individual control of eDP hotplug support"). [How] To revise the default eDP hotplug setting and use the enum to git rid of the magic number for different options. Fixes: ab144f0b4ad6 ("drm/amd/display: Allow individual control of eDP hotplug support") Cc: stable@vger.kernel.org Cc: Mario Limonciello Reviewed-by: Wenjing Liu Acked-by: Qingqing Zhuo Signed-off-by: Robin Chen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 322b72e0fd10101f2da8985b31b4af70f184bf79 Author: Peter Newman Date: Tue Dec 20 17:41:32 2022 +0100 x86/resctrl: Avoid redundant counter read in __mon_event_count() __mon_event_count() does the per-RMID, per-domain work for user-initiated event count reads and the initialization of new monitor groups. In the initialization case, after resctrl_arch_reset_rmid() calls __rmid_read() to record an initial count for a new monitor group, it immediately calls resctrl_arch_rmid_read(). This re-read of the hardware counter is unnecessary and the following computations are ignored by the caller during initialization. Following return from resctrl_arch_reset_rmid(), just clear the mbm_state and return. This involves moving the mbm_state lookup into the rr->first case, as it's not needed for regular event count reads: the QOS_L3_OCCUP_EVENT_ID case was redundant with the accumulating logic at the end of the function. Signed-off-by: Peter Newman Signed-off-by: Dave Hansen Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/all/20221220164132.443083-2-peternewman%40google.com commit 5ff9e238a17733669d6dd1992cae19e1684fe5ae Author: Krzysztof Kozlowski Date: Wed Mar 8 13:59:06 2023 +0100 arm64: dts: qcom: msm8996-oneplus: do not enable incomplete nodes status=okay should appear in final place where all required properties are provided, because that makes the code the easiest to read. Move the status from common OnePlus DTSI to board DTS. No functional changes. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308125906.236885-11-krzysztof.kozlowski@linaro.org commit a369c74243ca4ad60b9de0ac5c2207fb4c4117b8 Author: Krzysztof Kozlowski Date: Wed Mar 8 13:59:05 2023 +0100 arm64: dts: qcom: sc7280: fix EUD port properties Nodes with unit addresses must have also 'reg' property: sc7280-herobrine-crd.dtb: eud@88e0000: ports:port@0: 'reg' is a required property Fixes: 0b059979090d ("arm64: dts: qcom: sc7280: Add EUD dt node and dwc3 connector") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Reviewed-by: Souradeep Chowdhury Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308125906.236885-10-krzysztof.kozlowski@linaro.org commit e96d20585c84aca49771609b6bca3a7c30f7d397 Author: Krzysztof Kozlowski Date: Wed Mar 8 13:59:04 2023 +0100 arm64: dts: qcom: msm8994: correct RPMCC node name The bindings expect RPM clock controller subnode to be named 'clock-controller': apq8094-sony-xperia-kitakami-karin_windy.dtb: smd: rpm:rpm-requests: 'rpmcc' does not match any of the regexes: '^regulators(-[01])?$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308125906.236885-9-krzysztof.kozlowski@linaro.org commit 9bc3dc3c9dc1b9e594a6d56210b857f9ffca5853 Author: Krzysztof Kozlowski Date: Wed Mar 8 13:59:03 2023 +0100 arm64: dts: qcom: msm8953: drop clocks from RPMPD The RPM power domain controller does not take XO clock as input (according to bindings and Linux driver): msm8953-xiaomi-vince.dtb: rpm-requests: power-controller: 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308125906.236885-8-krzysztof.kozlowski@linaro.org commit 35343312a4399074e7a20ab086d29273bb5f1ad2 Author: Krzysztof Kozlowski Date: Wed Mar 8 13:59:02 2023 +0100 arm64: dts: qcom: msm8953: correct RPMCC node name The bindings expect RPM clock controller subnode to be named 'clock-controller': msm8953-motorola-potter.dtb: smd: rpm:rpm-requests: 'rpmcc' does not match any of the regexes: '^regulators(-[01])?$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308125906.236885-7-krzysztof.kozlowski@linaro.org commit afa8eb675fc6dd606783ed2350de90927d6fb9d3 Author: Krzysztof Kozlowski Date: Wed Mar 8 13:59:01 2023 +0100 arm64: dts: qcom: ipq6018-cp01-c1: drop SPI cs-select The SPI controller nodes do not use/allow cs-select property: ipq6018-cp01-c1.dtb: spi@78b5000: Unevaluated properties are not allowed ('cs-select' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308125906.236885-6-krzysztof.kozlowski@linaro.org commit 9b0ff841f0724fb4bf0218e33afba46a097b258c Author: Krzysztof Kozlowski Date: Wed Mar 8 13:59:00 2023 +0100 arm64: dts: qcom: apq8096-db820c: drop SPI label The SPI controller nodes do not use/allow label property: apq8096-db820c.dtb: spi@7575000: Unevaluated properties are not allowed ('label' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308125906.236885-5-krzysztof.kozlowski@linaro.org commit 9135ab4a53f7e967456b792ec6fc21ecaf06032b Author: Krzysztof Kozlowski Date: Wed Mar 8 13:58:59 2023 +0100 arm64: dts: qcom: sdm845-db845c: drop SPI label The SPI controller nodes do not use/allow label property: sdm845-db845c.dtb: spi@888000: Unevaluated properties are not allowed ('label' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308125906.236885-4-krzysztof.kozlowski@linaro.org commit 9b8bfc443349c0c220438c6ac8839774210c9ba2 Author: Krzysztof Kozlowski Date: Wed Mar 8 13:58:58 2023 +0100 arm64: dts: qcom: qdu1000: drop incorrect serial properties The serial node does not use/allow address/size cells: qdu1000-idp.dtb: geniqup@9c0000: serial@99c000: Unevaluated properties are not allowed ('#address-cells', '#size-cells' were unexpected) Fixes: 6bd20c54b589 ("arm64: dts: qcom: Add base QDU1000/QRU1000 DTSIs") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308125906.236885-3-krzysztof.kozlowski@linaro.org commit d24539a6a98c19c81deb4004ec5023b3ee6e7bb8 Author: Krzysztof Kozlowski Date: Wed Mar 8 13:58:57 2023 +0100 arm64: dts: qcom: sm8250: drop incorrect Coresight funnel properties There is only one output port, thus out-ports should not have 'address/size-cells' and unit addresses. 'reg-names' are also not allowed by bindings. qrb5165-rb5.dtb: funnel@6042000: out-ports: '#address-cells', '#size-cells', 'port@0' do not match any of the regexes: 'pinctrl-[0-9]+' qrb5165-rb5.dtb: funnel@6b04000: Unevaluated properties are not allowed ('reg-names' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308125906.236885-2-krzysztof.kozlowski@linaro.org commit d882778eb430d430d5f72b92d49cb3f4f50be01c Author: Krzysztof Kozlowski Date: Wed Mar 8 13:58:56 2023 +0100 arm64: dts: qcom: drop incorrect cell-index from SPMI The SPMI controller (PMIC Arbiter)) does not use nor allow 'cell-index' property: sm8150-microsoft-surface-duo.dtb: spmi@c440000: Unevaluated properties are not allowed ('cell-index' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230308125906.236885-1-krzysztof.kozlowski@linaro.org commit e556c94e8c20bcfb6c910e93a0cfd2d0cce5adc8 Author: Konrad Dybcio Date: Mon Mar 13 21:00:08 2023 +0100 soc: qcom: rpmpd: Remove useless comments It goes without saying that socname_rpmpds[] is the array of the RPM power domains associated with socname. Remove these comments. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-10-06a4f448ff90@linaro.org commit ec90637c9946cc8e37afa4c1feb33fdb1fa15b68 Author: Konrad Dybcio Date: Mon Mar 13 21:00:07 2023 +0100 soc: qcom: rpmpd: Hook up VDDMX as parent of SM6375 VDDGX The GPU core clock requires that both VDDGX and VDDMX domains are scaled at the same rate at the same time (well, MX just before GX but you get the idea). Set MX as parent of GX to take care of that. Suggested-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-9-06a4f448ff90@linaro.org commit decd6e77e02eff517efe11dfc181ce1b5bef3405 Author: Konrad Dybcio Date: Mon Mar 13 21:00:06 2023 +0100 soc: qcom: rpmpd: Add parent PD support In some cases (like with the GPU core clock on GMU-less SoCs) it's required that we scale more than one voltage domain. This can be achieved by linking them in a parent-child relationship. Add support for specifying a parent PD, similarly to what has been done in the RPMhPD driver. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-8-06a4f448ff90@linaro.org commit d338fe40cf37c3f326b5cb743c6436369d452094 Author: Konrad Dybcio Date: Mon Mar 13 21:00:05 2023 +0100 soc: qcom: rpmpd: Make bindings assignments consistent Currently the whitespace between [DT_BINDING] = &struct is all over the place.. some SoC structs have a space, others have a tab, others have N tabs.. Make that a single tab for everybody to keep things coherent. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-7-06a4f448ff90@linaro.org commit 07df05025eb4cb65c1549d392f988aa5eeb9e758 Author: Konrad Dybcio Date: Mon Mar 13 21:00:04 2023 +0100 soc: qcom: rpmpd: Improve the naming Now that we aren't bound by the preprocessor macros, improve the naming to be a bit less preprocessor-y and touch up some rpmpd.pd.name fields while at it. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-6-06a4f448ff90@linaro.org commit 91c0bcef25f985fd974b6f1ba3d3d7383ac032d2 Author: Konrad Dybcio Date: Mon Mar 13 21:00:03 2023 +0100 soc: qcom: rpmpd: Expand struct definition macros Expand the struct definition macros to make things easier to see and maintain. Now that the macros are unnecessary, remove them. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-5-06a4f448ff90@linaro.org commit 1c940cc42aba5b27a259634f4aedb71e5f46dac1 Author: Konrad Dybcio Date: Mon Mar 13 21:00:02 2023 +0100 soc: qcom: rpmpd: Remove vdd* from struct names It's rather obvious by the characteristic of these resources that they correspond to some voltage lines governed by RPM. Remove the "vdd" unnecessary prefix from them. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-4-06a4f448ff90@linaro.org commit d280f3d66d9a79b1bd50258ccb3fbb413216c1be Author: Konrad Dybcio Date: Mon Mar 13 21:00:01 2023 +0100 soc: qcom: rpmpd: Unify Low Power Island definitions Up until now, we had 2 separate entries for VDD_LPI[CM]X and VDD_LPI_[CM]X which both pointed to the same RPM resource. Fix it. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-3-06a4f448ff90@linaro.org commit a5d0e2819fd013e3629d3fedcae877777214ed34 Author: Konrad Dybcio Date: Mon Mar 13 21:00:00 2023 +0100 soc: qcom: rpmpd: Bring all definitions to the top Keep all definitions in one place in preparation for a cleanup to make things tidier. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-2-06a4f448ff90@linaro.org commit f1eb5e6fc18c5e6f4ee7fd2985743f2fe7978951 Author: Konrad Dybcio Date: Mon Mar 13 20:59:59 2023 +0100 soc: qcom: rpmpd: Remove SoC names from RPMPD definitions Replace the SoC names with type+id_key (or type+id+..name..+key for fixed-key definitions) and remove duplicate entries. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230313-topic-rpmpd-v3-1-06a4f448ff90@linaro.org commit 54ed70b57623e18f6c18f510cbe1e741bca89f34 Author: Tom Rix Date: Wed Mar 15 11:56:30 2023 -0400 clk: qcom: remove unused variables gpucc_parent_data,map_2 gcc with W=1 reports these errors drivers/clk/qcom/gpucc-sm6375.c:145:37: error: ‘gpucc_parent_data_2’ defined but not used [-Werror=unused-const-variable=] 145 | static const struct clk_parent_data gpucc_parent_data_2[] = { | ^~~~~~~~~~~~~~~~~~~ drivers/clk/qcom/gpucc-sm6375.c:139:32: error: ‘gpucc_parent_map_2’ defined but not used [-Werror=unused-const-variable=] 139 | static const struct parent_map gpucc_parent_map_2[] = { | ^~~~~~~~~~~~~~~~~~ These variables are not used, so remove them. Signed-off-by: Tom Rix Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230315155630.1740065-1-trix@redhat.com commit 1bf088a9f0e50acd175ba8deef0db11c099fa26e Author: Konrad Dybcio Date: Wed Mar 15 18:30:48 2023 +0100 clk: qcom: gcc-qcm2290: Fix up gcc_sdcc2_apps_clk_src Add the PARENT_ENABLE flag to prevent the clock from getting stuck at boot and use floor_ops to avoid SDHCI overclocking. Fixes: 496d1a13d405 ("clk: qcom: Add Global Clock Controller driver for QCM2290") Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230315173048.3497655-1-konrad.dybcio@linaro.org commit 9ebaa4a8cdf11831090a7a7e8d5e82e12b4ff7a8 Author: Bartosz Golaszewski Date: Wed Mar 15 21:27:51 2023 +0100 arm64: dts: qcom: sm8150: fix the uart9 label There's a typo in the @

part of the uart9 label. Fix it. Fixes: 10d900a834da ("arm64: dts: sm8150: add the QUPv3 high-speed UART node") Signed-off-by: Bartosz Golaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230315202751.1518543-1-brgl@bgdev.pl commit bad8cdc20690fa830c49783b68c6403dd44bc0bd Author: David Wronek Date: Sun Mar 5 22:17:45 2023 +0300 soc: qcom: socinfo: Add Soc ID for SM7150 Add Soc ID table entries for Qualcomm SM7150. Signed-off-by: David Wronek Signed-off-by: Danila Tikhonov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230305191745.386862-3-danila@jiaxyga.com commit de7aeee0d942d2e1d85b3db3652e037af38e24d7 Author: David Wronek Date: Sun Mar 5 22:17:44 2023 +0300 dt-bindings: arm: qcom,ids: Add Soc ID for SM7150 Add the ID for the Qualcomm SM7150 SoC. Signed-off-by: David Wronek Signed-off-by: Danila Tikhonov Acked-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230305191745.386862-2-danila@jiaxyga.com commit a11bc4a5b371e05e89c0fba5756efe5788a4d1ab Author: Bhupesh Sharma Date: Wed Mar 15 21:31:51 2023 +0530 soc: qcom: socinfo: Add IDs for QRB4210 Add the ID for QRB4210 variant. Signed-off-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230315160151.2166861-3-bhupesh.sharma@linaro.org commit ee6ae544ddfabe60245d4eaee41a7330acd46d94 Author: Bhupesh Sharma Date: Wed Mar 15 21:31:50 2023 +0530 dt-bindings: arm: qcom,ids: Add IDs for QRB4210 Add the ID for QRB4210 variant. Signed-off-by: Bhupesh Sharma Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230315160151.2166861-2-bhupesh.sharma@linaro.org commit c6653d8f24f4bcc255e3ffb28c629ff5d0e0ba13 Author: Varadarajan Narayanan Date: Tue Mar 14 11:43:34 2023 +0530 soc: qcom: socinfo: Add IDs for IPQ9574 and its variants Add SOC ID for Qualcomm IPQ9574, IPQ9570, IPQ9554, IPQ9550, IPQ9514 and IPQ9510 Signed-off-by: Varadarajan Narayanan Reviewed-by: Krzysztof Kozlowski Reviewed-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1678774414-14414-3-git-send-email-quic_varada@quicinc.com commit fd972da1b228974f788c115d37abe209828ca5a9 Author: Varadarajan Narayanan Date: Tue Mar 14 11:43:33 2023 +0530 dt-bindings: arm: qcom,ids: Add IDs for IPQ9574 and its variants Add SOC ID for Qualcomm IPQ9574, IPQ9570, IPQ9554, IPQ9550, IPQ9514 and IPQ9510 Signed-off-by: Varadarajan Narayanan Acked-by: Krzysztof Kozlowski Reviewed-by: Kathiravan T Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1678774414-14414-2-git-send-email-quic_varada@quicinc.com commit 644f17412f5acf01a19af9d04a921937a2bc86c6 Author: Randy Dunlap Date: Thu Feb 23 19:27:03 2023 -0800 IMA: allow/fix UML builds UML supports HAS_IOMEM since 0bbadafdc49d (um: allow disabling NO_IOMEM). Current IMA build on UML fails on allmodconfig (with TCG_TPM=m): ld: security/integrity/ima/ima_queue.o: in function `ima_add_template_entry': ima_queue.c:(.text+0x2d9): undefined reference to `tpm_pcr_extend' ld: security/integrity/ima/ima_init.o: in function `ima_init': ima_init.c:(.init.text+0x43f): undefined reference to `tpm_default_chip' ld: security/integrity/ima/ima_crypto.o: in function `ima_calc_boot_aggregate_tfm': ima_crypto.c:(.text+0x1044): undefined reference to `tpm_pcr_read' ld: ima_crypto.c:(.text+0x10d8): undefined reference to `tpm_pcr_read' Modify the IMA Kconfig entry so that it selects TCG_TPM if HAS_IOMEM is set, regardless of the UML Kconfig setting. This updates TCG_TPM from =m to =y and fixes the linker errors. Fixes: f4a0391dfa91 ("ima: fix Kconfig dependencies") Cc: Stable # v5.14+ Signed-off-by: Randy Dunlap Cc: Fabio Estevam Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Cc: linux-um@lists.infradead.org Signed-off-by: Mimi Zohar commit 65d9975e5dae4601e8902765d08f55c246fd2022 Author: Manivannan Sadhasivam Date: Tue Mar 14 13:34:40 2023 +0530 arm64: dts: qcom: sm6350: Fix the base addresses of LLCC banks The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. On SM6350, there is only one LLCC bank available. So let's just pass that as "llcc0_base". Reported-by: Parikshit Pareek Tested-by: Luca Weiss Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314080443.64635-12-manivannan.sadhasivam@linaro.org commit 413c8ecd48f1df8034c7b13881ded33b3d10171f Author: Manivannan Sadhasivam Date: Tue Mar 14 13:34:39 2023 +0530 arm64: dts: qcom: sm8450: Fix the base addresses of LLCC banks The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314080443.64635-11-manivannan.sadhasivam@linaro.org commit 7ae317cba6be783cfd6155bceec91d0918f78fb8 Author: Manivannan Sadhasivam Date: Tue Mar 14 13:34:38 2023 +0530 arm64: dts: qcom: sm8350: Fix the base addresses of LLCC banks The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314080443.64635-10-manivannan.sadhasivam@linaro.org commit 42c9b1578233eeb3044656a446486bd2efc87312 Author: Manivannan Sadhasivam Date: Tue Mar 14 13:34:37 2023 +0530 arm64: dts: qcom: sm8250: Fix the base addresses of LLCC banks The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314080443.64635-9-manivannan.sadhasivam@linaro.org commit c5ccf8d33f11f57ef46d12db1dda4afcc4d5150b Author: Manivannan Sadhasivam Date: Tue Mar 14 13:34:36 2023 +0530 arm64: dts: qcom: sm8150: Fix the base addresses of LLCC banks The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314080443.64635-8-manivannan.sadhasivam@linaro.org commit 0fe0955a79b994b8dcabe79f3a7192251fb256ea Author: Manivannan Sadhasivam Date: Tue Mar 14 13:34:35 2023 +0530 arm64: dts: qcom: sc8280xp: Fix the base addresses of LLCC banks The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. Reported-by: Parikshit Pareek Tested-by: Steev Klimaszewski # Thinkpad X13s Tested-by: Andrew Halaney # sa8540p-ride Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314080443.64635-7-manivannan.sadhasivam@linaro.org commit 62e5ee9db98ed67eb50205072135544055cba9c4 Author: Manivannan Sadhasivam Date: Tue Mar 14 13:34:34 2023 +0530 arm64: dts: qcom: sc7280: Fix the base addresses of LLCC banks The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. While at it, let's also fix the size of the llcc_broadcast_base to cover the whole region. Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314080443.64635-6-manivannan.sadhasivam@linaro.org commit 116a932bbc7bc740b068fbfe320a465811ca62f8 Author: Manivannan Sadhasivam Date: Tue Mar 14 13:34:33 2023 +0530 arm64: dts: qcom: sc7180: Fix the base addresses of LLCC banks The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. On SC7180, there is only one LLCC bank available. So let's just pass that as "llcc0_base". Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314080443.64635-5-manivannan.sadhasivam@linaro.org commit bfe088bde391824040c39cbf277d7fe782042936 Author: Manivannan Sadhasivam Date: Tue Mar 14 13:34:32 2023 +0530 arm64: dts: qcom: sdm845: Fix the base addresses of LLCC banks The LLCC block has several banks each with a different base address and holes in between. So it is not a correct approach to cover these banks with a single offset/size. Instead, the individual bank's base address needs to be specified in devicetree with the exact size. On SDM845, the size of the LLCC bank 0 needs to be reduced to 0x4500 as there are LLCC BWMON registers located after this range. Reported-by: Parikshit Pareek Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314080443.64635-4-manivannan.sadhasivam@linaro.org commit cca94f1dd6d0a4c7e5c8190672f5747e3c00ddde Author: Manivannan Sadhasivam Date: Tue Mar 14 13:34:43 2023 +0530 soc: qcom: llcc: Do not create EDAC platform device on SDM845 The platforms based on SDM845 SoC locks the access to EDAC registers in the bootloader. So probing the EDAC driver will result in a crash. Hence, disable the creation of EDAC platform device on all SDM845 devices. The issue has been observed on Lenovo Yoga C630 and DB845c. While at it, also sort the members of `struct qcom_llcc_config` to avoid any holes in-between. Cc: # 5.10 Reported-by: Steev Klimaszewski Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314080443.64635-15-manivannan.sadhasivam@linaro.org commit 721d3e91bfc93975c5e1a76c7d588dd8df5d82da Author: Manivannan Sadhasivam Date: Tue Mar 14 13:34:42 2023 +0530 qcom: llcc/edac: Support polling mode for ECC handling Not all Qcom platforms support IRQ mode for ECC handling. For those platforms, the current EDAC driver will not be probed due to missing ECC IRQ in devicetree. So add support for polling mode so that the EDAC driver can be used on all Qcom platforms supporting LLCC. The polling delay of 5000ms is chosen based on Qcom downstream/vendor driver. Reported-by: Luca Weiss Tested-by: Luca Weiss Tested-by: Steev Klimaszewski # Thinkpad X13s Tested-by: Andrew Halaney # sa8540p-ride Reviewed-by: Borislav Petkov (AMD) Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314080443.64635-14-manivannan.sadhasivam@linaro.org commit ee13b5008707948d3052c1b5aab485c6cd53658e Author: Manivannan Sadhasivam Date: Tue Mar 14 13:34:41 2023 +0530 qcom: llcc/edac: Fix the base address used for accessing LLCC banks The Qualcomm LLCC/EDAC drivers were using a fixed register stride for accessing the (Control and Status Registers) CSRs of each LLCC bank. This stride only works for some SoCs like SDM845 for which driver support was initially added. But the later SoCs use different register stride that vary between the banks with holes in-between. So it is not possible to use a single register stride for accessing the CSRs of each bank. By doing so could result in a crash. For fixing this issue, let's obtain the base address of each LLCC bank from devicetree and get rid of the fixed stride. This also means, there is no need to rely on reg-names property and the base addresses can be obtained using the index. First index is LLCC bank 0 and last index is LLCC broadcast. If the SoC supports more than one bank, then those need to be defined in devicetree for index from 1..N-1. Reported-by: Parikshit Pareek Tested-by: Luca Weiss Tested-by: Steev Klimaszewski # Thinkpad X13s Tested-by: Andrew Halaney # sa8540p-ride Reviewed-by: Borislav Petkov (AMD) Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314080443.64635-13-manivannan.sadhasivam@linaro.org commit 43aa006e074c4dcaf7493895fb2bd4af16d7c0ab Author: Manivannan Sadhasivam Date: Tue Mar 14 13:34:31 2023 +0530 dt-bindings: arm: msm: Fix register regions used for LLCC banks Register regions of the LLCC banks are located at different addresses. Currently, the binding just lists the LLCC0 base address and tries to cover all the banks using a single size. This is entirely wrong as there are other register regions that happen to lie inside the size covered by the binding such as the memory controller and holes. So this needs to be fixed by specifying the base address of individual LLCC banks. This approach will break the existing users of this binding as the register regions are split and the drivers now cannot use LLCC0 register region for accessing rest of the banks (which is wrong anyway). But considering the fact that the binding was wrong from the day one and also the device drivers going wrong by the binding, this breakage is acceptable. Reported-by: Parikshit Pareek Reviewed-by: Krzysztof Kozlowski Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314080443.64635-3-manivannan.sadhasivam@linaro.org commit 94b1d58f887a147d9a0e8bccc7fffd067c5b9588 Author: Manivannan Sadhasivam Date: Tue Mar 14 13:34:30 2023 +0530 dt-bindings: arm: msm: Update the maintainers for LLCC Both Rishabh and Sai have left Qualcomm, and there is no evidence of them maintaining with a new identity. So their entry needs to be removed. Listed Bjorn as the interim maintainer until someone volunteers to maintain this binding. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314080443.64635-2-manivannan.sadhasivam@linaro.org commit 18290c2eec4be239318cb4e01cafe12217e36de8 Author: Konrad Dybcio Date: Wed Mar 15 11:17:27 2023 +0100 soc: qcom: socinfo: Add IDs for QCM2290/QRB2210 Add the missing IDs for scuba and its QRB variant. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314-topic-scuba_socinfo-v2-2-44fa1256aa6d@linaro.org commit f26e18bda9e3b069fbb07a2827597952a6d0afe0 Author: Konrad Dybcio Date: Wed Mar 15 11:17:26 2023 +0100 dt-bindings: arm: qcom,ids: Add IDs for QCM2290/QRB2210 Add the missing IDs for scuba and its QRB variant. Acked-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230314-topic-scuba_socinfo-v2-1-44fa1256aa6d@linaro.org commit 0aafbdf35c75cbfec82636d01e6dc7950bc1507c Author: Christophe Leroy Date: Sat Feb 18 10:15:50 2023 +0100 powerpc: Make generic_calibrate_decr() the default ppc_md.calibrate_decr() is a mandatory item. Its nullity is never checked so it must be non null on all platforms. Most platforms define generic_calibrate_decr() as their ppc_md.calibrate_decr(). Have time_init() call generic_calibrate_decr() when ppc_md.calibrate_decr() is NULL, and remove default assignment from all machines. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/6cb9865d916231c38401ba34ad1a98c249fae135.1676711562.git.christophe.leroy@csgroup.eu commit 5a81c02d0cc5067170e49452d55a4dfd21333257 Author: Christophe Leroy Date: Sat Feb 18 10:15:49 2023 +0100 powerpc/85xx: Fix function naming for p1023_rdb platform p1023_rdb platform is a copy of mpc85xx_rdb platform and some of its functions have kept mpc85xx_rdb names. Rename the said functions. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/6cb9865d916231c38401ba34ad1a98c249fae135.1676711562.git.christophe.leroy@csgroup.eu commit f47b17d51997cd47e0e6fb1b90145d516ebe6b3e Author: Christophe Leroy Date: Sat Feb 18 10:15:48 2023 +0100 powerpc/gamecube|wii : Use machine_device_initcall() Instead of checking machine type in the function, use machine_device_initcall(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/6cb9865d916231c38401ba34ad1a98c249fae135.1676711562.git.christophe.leroy@csgroup.eu commit 357f82395cd8a0279067805841e5968f4e6dc932 Author: Christophe Leroy Date: Sat Feb 18 10:15:47 2023 +0100 powerpc/47x: Split ppc47x machine in two This machine matches two compatibles and sets .pci_irq_fixup on one of them. Split it into two machines, then the probe function can be dropped. Signed-off-by: Christophe Leroy [mpe: Drop references to ppc47x_probe() to fix build] Signed-off-by: Michael Ellerman Link: https://msgid.link/6cb9865d916231c38401ba34ad1a98c249fae135.1676711562.git.christophe.leroy@csgroup.eu commit fb4651f9e00dd4e07dce4c48d458abb50d276e40 Author: Ville Syrjälä Date: Wed Mar 8 23:26:27 2023 +0200 drm/i915: Don't send idle pattern after DP2.0 link training Bspec calls us to select pattern 2 after link training for DP 2.0. Let's do that... by doing nothing because we will be transmitting pattern 2 at the end of the link training already. Reviewed-by: Imre Deak Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230308212627.7601-2-ville.syrjala@linux.intel.com commit 8c042949af1e935123140ab6e6a3dff945194a11 Author: Ville Syrjälä Date: Wed Mar 8 23:26:26 2023 +0200 drm/i915: Don't switch to TPS1 when disabling DP_TP_CTL AFAICS Bspec has never asked us to switch to TPS1 when *disabling* DP_TP_CTL. Let's stop doing that in case it confuses something. We do have to switch before we *enable* DP_TP_CTL, but that is already being handled correctly. v2: Do the same for FDI v3: Rebase Reviewed-by: Imre Deak #v1 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230308212627.7601-1-ville.syrjala@linux.intel.com commit 328839ff93709a517e89ba1de1132c5d138e5dcb Author: Zack Rusin Date: Tue Mar 14 17:14:45 2023 -0400 drm/vmwgfx: Fix src/dst_pitch confusion The src/dst_pitch got mixed up during the rework of the function, make sure the offset's refer to the correct one. Spotted by clang: Clang warns (or errors with CONFIG_WERROR): drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:509:29: error: variable 'dst_pitch' is uninitialized when used here [-Werror,-Wuninitialized] src_offset = ddirty->top * dst_pitch + ddirty->left * stdu->cpp; ^~~~~~~~~ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:492:26: note: initialize the variable 'dst_pitch' to silence this warning s32 src_pitch, dst_pitch; ^ = 0 1 error generated. Signed-off-by: Zack Rusin Reported-by: Nathan Chancellor Reported-by: Dave Airlie Link: https://github.com/ClangBuiltLinux/linux/issues/1811 Fixes: 39985eea5a6d ("drm/vmwgfx: Abstract placement selection") Reviewed-by: Nathan Chancellor Reviewed-by: Martin Krastev Link: https://patchwork.freedesktop.org/patch/msgid/20230314211445.1363828-1-zack@kde.org commit 96d541699e5c50b1bc2d50c83cd7145994d5f071 Author: Leo Yan Date: Wed Mar 15 22:51:12 2023 +0800 perf kvm: Update documentation to reflect new changes Update documentation for new sorting and option '--stdio'. Reviewed-by: James Clark Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 984f16cd602c82451b2e910ac58d7880bcb48b1a Author: Leo Yan Date: Wed Mar 15 22:51:11 2023 +0800 perf kvm: Add TUI mode for stat report Since we have supported histograms list and prepared the dimensions in the tool, this patch adds TUI mode for stat report. It also adds UI progress for sorting for better user experience. Committer notes: kvm_display() is only used by functions enclosed in: #if defined(HAVE_KVM_STAT_SUPPORT) && defined(HAVE_LIBTRACEEVENT) So do it with this new function as well. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 32a5c2b84236d1eebf341ae4a90dd5e04aae97ae Author: Leo Yan Date: Wed Mar 15 22:51:10 2023 +0800 perf kvm: Add dimensions for percentages Add dimensions for count and time percentages, it would be useful for user to review percentage statistics. Reviewed-by: James Clark Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit fbb70bd3100527b9fea86c58e88a63a28f24f428 Author: Leo Yan Date: Wed Mar 15 22:51:09 2023 +0800 perf kvm: Support printing attributions for dimensions This patch adds header, entry callback and width for every dimension, thus in TUI mode the tool can print items with the defined attributions. Reviewed-by: James Clark Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit c695d48a33e7185cf5c7a7e44a6e8fe640ea1a71 Author: Leo Yan Date: Wed Mar 15 22:51:08 2023 +0800 perf kvm: Polish sorting key Since histograms supports sorting, the tool doesn't need to maintain the mapping between the sorting keys and the corresponding comparison callbacks, therefore, this patch removes structure kvm_event_key. But we still need to validate the sorting key, this patch uses an array for sorting keys and renames function select_key() to is_valid_key() to validate the sorting key passed by user. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit f57a64142c04b6cbbfb2ce6493f0aefc237c3106 Author: Leo Yan Date: Wed Mar 15 22:51:07 2023 +0800 perf kvm: Use histograms list to replace cached list perf kvm tool defines its own cached list which is managed with RB tree, histograms also provide RB tree to manage data entries. Since now we have introduced histograms in the tool, it's not necessary to use the self defined list and we can directly use histograms list to manage KVM events. This patch changes to use histograms list to track KVM events, and it invokes the common function hists__output_resort_cb() to sort result, this also give us flexibility to extend more sorting key words easily. After histograms list supported, the cached list is redundant so remove the relevant code for it. Committer notes: kvm_hists__reinit() is only used by functions enclosed in: #if defined(HAVE_KVM_STAT_SUPPORT) && defined(HAVE_LIBTRACEEVENT) So do it with this new function as well. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 41f1138e5c1cf11c5b469c3f891960b4ad05e886 Author: Leo Yan Date: Wed Mar 15 22:51:06 2023 +0800 perf kvm: Add dimensions for KVM event statistics To support KVM event statistics, this patch firstly registers histograms columns and sorting fields; every column or field has its own format structure, the format structure is dereferenced to access the dimension, finally the dimension provides the comparison callback for sorting result. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit ebf39d29b985b0c0f75c2e752781a9a80daadc0e Author: Leo Yan Date: Wed Mar 15 22:51:05 2023 +0800 perf hist: Add 'kvm_info' field in histograms entry __hists__add_entry() creates a temporary entry and compare it with existed histograms entries, if any existed entry equals to the temporary entry it skips to allocation to avoid duplication. The problem for support KVM event in histograms is it doesn't contain any info to identify KVM event and can be used for comparison entries. This patch adds 'kvm_info' field in the histograms entry which contains the KVM event's key, this identifier will be used for comparison histograms entries in later change. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 001b08f4e2aab9748b5d5e49b68d5444715ffda9 Author: Leo Yan Date: Wed Mar 15 22:51:04 2023 +0800 perf kvm: Parse address location for samples Parse address location for samples and save it into the structure 'perf_kvm_stat', it is to be used by histograms entry. Reviewed-by: James Clark Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 730651f7177f473345ab470db212c7b5a18466f0 Author: Leo Yan Date: Wed Mar 15 22:51:03 2023 +0800 perf kvm: Pass argument 'sample' to kvm_alloc_init_event() This patch adds an argument 'sample' for kvm_alloc_init_event(), and its caller functions are updated as well for passing down the 'sample' pointer. This is a preparation change to allow later patch to create histograms entries for kvm event, no any functionality changes. Reviewed-by: James Clark Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 2d08124b08631322303e365d422ead50ae1674b8 Author: Leo Yan Date: Wed Mar 15 22:51:02 2023 +0800 perf kvm: Introduce histograms data structures This is a preparation to support histograms in perf kvm tool. As first step, this patch defines histograms data structures and initialize them. Committer notes: Those are only used by functions enclosed in: #if efined(HAVE_KVM_STAT_SUPPORT) && defined(HAVE_LIBTRACEEVENT) So do this for these new functions and struct as well. Reviewed-by: James Clark Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 2d31e0bff2f3dd5369a9b45e3d8c9ee325784e60 Author: Leo Yan Date: Wed Mar 15 22:51:01 2023 +0800 perf kvm: Use macro to replace variable 'decode_str_len' The variable 'decode_str_len' defines the string length for KVM event name and every arch defines its own values. This introduces complexity that the variable definition are spreading in multiple source files under arch folder. This patch refactors code to use a macro KVM_EVENT_NAME_LEN to define event name length and thus remove the definitions in arch files. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit dd787ae4e8548a82350981b4b0046df6a92999f2 Author: Leo Yan Date: Wed Mar 15 22:51:00 2023 +0800 perf kvm: Use subtraction for comparison metrics Currently the metrics comparison uses greater operator (>), it returns the boolean value (0 or 1). This patch changes to use subtraction as comparison result, which can be used by histograms sorting. Since the subtraction result is u64 type, we change key_cmp_fun's return type to int64_t to avoid overflow. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit f098376d16e94a0a14bd16264f28c72ee3b411c9 Author: Leo Yan Date: Wed Mar 15 22:50:59 2023 +0800 perf kvm: Move up metrics helpers This patch moves up the helper functions of event's metrics for later adding code to call them. No any functionality changes, but has a function renaming from compare_kvm_event_{metric}() to cmp_event_{metric}(). Committer notes: Those helper functions are only used if this is true: if defined(HAVE_KVM_STAT_SUPPORT) && defined(HAVE_LIBTRACEEVENT) So keep them enclosed with that. Reviewed-by: James Clark Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit a7d451a8733c978848ede58333be25b10889df82 Author: Leo Yan Date: Wed Mar 15 22:50:58 2023 +0800 perf kvm: Add pointer to 'perf_kvm_stat' in kvm event Sometimes, handling kvm events needs to base on global variables, e.g. when read event counts we need to know the target vcpu ID; the global variables are stored in structure perf_kvm_stat. This patch adds add a 'perf_kvm_stat' pointer in kvm event structure, it is to be used by later refactoring. Reviewed-by: James Clark Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 9c3aa1f41178d75c7eabfa818bc02b698b5f152e Author: Leo Yan Date: Wed Mar 15 22:50:57 2023 +0800 perf kvm: Refactor overall statistics Currently the tool computes overall statistics when sort the results. This patch refactors overall statistics during events processing, therefore, the function update_total_coun() is not needed anymore, an extra benefit is we can de-couple code between the statistics and the sorting. This patch is not expected any functionality changes. Reviewed-by: James Clark Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit e77da13b8e3626fc6d01287fba7c1eee4ebfe018 Author: Conor Dooley Date: Tue Mar 7 21:10:54 2023 +0000 riscv: dts: microchip: fix the mpfs' mailbox regs The mailbox on PolarFire SoC should really have three reg properties, not two. Without splitting into three sections, the system controller's QSPI cannot be accessed as it sits inside the current first range. The driver & binding have been adapted to account for both two & three ranges, so fix the dts too. Acked-by: Palmer Dabbelt Signed-off-by: Conor Dooley commit 49f965b6fbca63904d7397ce96066fa992f401a3 Author: Jesse Taube Date: Tue Mar 14 17:10:30 2023 -0400 soc: canaan: Make K210_SYSCTL depend on CLK_K210 CLK_K210 is no longer a dependency of SOC_CANAAN, but K210_SYSCTL depends on CLK_K210. This patch makes K210_SYSCTL depend on CLK_K210. Also fix whitespace errors. Reported-by: Randy Dunlap Link: https://lore.kernel.org/all/42446784-a88b-df09-41e9-5f685b4df6ee@infradead.org Fixes: 3af577f9826f ("RISC-V: stop directly selecting drivers for SOC_CANAAN") Signed-off-by: Jesse Taube Reviewed-by: Damien Le Moal Signed-off-by: Conor Dooley commit 4b740779ac03f42866059a33f5454e1ac5393cdd Merge: 73bde0ca0ab59 b20f67994f35d Author: Palmer Dabbelt Date: Wed Mar 15 07:11:08 2023 -0700 Merge patch series "RISC-V: Apply Zicboz to clear_page" Andrew Jones says: When the Zicboz extension is available we can more rapidly zero naturally aligned Zicboz block sized chunks of memory. As pages are always page aligned and are larger than any Zicboz block size will be, then clear_page() appears to be a good candidate for the extension. While cycle count and energy consumption should also be considered, we can be pretty certain that implementing clear_page() with the Zicboz extension is a win by comparing the new dynamic instruction count with its current count[1]. Doing so we see that the new count is just over a quarter of the old count (see patch6's commit message for more details). For those of you who reviewed v1[2], you may be looking for the memset() patches. As pointed out in v1, and a couple follow-up emails, it's not clear that patching memset() is a win yet. When I get a chance to test on real hardware with a comprehensive benchmark collection then I can post the memset() patches separately (assuming the benchmarks show it's worthwhile). * b4-shazam-merge: RISC-V: KVM: Expose Zicboz to the guest RISC-V: KVM: Provide UAPI for Zicboz block size RISC-V: Use Zicboz in clear_page when available RISC-V: cpufeatures: Put the upper 16 bits of patch ID to work RISC-V: Add Zicboz detection and block size parsing dt-bindings: riscv: Document cboz-block-size RISC-V: Factor out body of riscv_init_cbom_blocksize loop RISC-V: alternatives: Support patching multiple insns in assembly Link: https://lore.kernel.org/r/20230224162631.405473-1-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit c46bf3bd00167e09729f884dd479b0a8d1a63f95 Author: Namhyung Kim Date: Tue Mar 14 16:42:37 2023 -0700 perf record: Update documentation for BPF filters Add more description and examples. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Andi Kleen Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Song Liu Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230314234237.3008956-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4310551b76e0d6762abb78fc23d50dcc3c608c33 Author: Namhyung Kim Date: Tue Mar 14 16:42:36 2023 -0700 perf bpf filter: Show warning for missing sample flags For a BPF filter to work properly, users need to provide appropriate options to enable the sample types. Otherwise the BPF program would see an invalid value (i.e. always 0) and filter won't work well. Show a warning message if sample types are missing like below. $ sudo ./perf record -e cycles --filter 'addr < 100' true Error: cycles event does not have PERF_SAMPLE_ADDR Hint: please add -d option to perf record. failed to set filter "BPF" on event cycles with 22 (Invalid argument) Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Andi Kleen Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Song Liu Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230314234237.3008956-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 46996dd7f655889a3dbbb514a0fa8bb614d6bd74 Author: Namhyung Kim Date: Tue Mar 14 16:42:35 2023 -0700 perf bpf filter: Add logical OR operator It supports two or more expressions connected as a group and the group result is considered true when one of them returns true. The new group operators (GROUP_BEGIN and GROUP_END) are added to setup and check the condition. As it doesn't allow nested groups, the condition is saved in local variables. For example, the following is to get samples only if the data source memory level is L2 cache or the weight value is greater than 30. $ sudo ./perf record -adW -e cpu/mem-loads/pp \ > --filter 'mem_lvl == l2 || weight > 30' -- sleep 1 $ sudo ./perf script -F data_src,weight 10668100842 |OP LOAD|LVL L3 or L3 hit|SNP None|TLB L1 or L2 hit|LCK No|BLK N/A 47 11868100242 |OP LOAD|LVL LFB/MAB or LFB/MAB hit|SNP None|TLB L1 or L2 hit|LCK No|BLK N/A 57 10668100842 |OP LOAD|LVL L3 or L3 hit|SNP None|TLB L1 or L2 hit|LCK No|BLK N/A 56 10650100842 |OP LOAD|LVL L3 or L3 hit|SNP None|TLB L2 miss|LCK No|BLK N/A 144 10468100442 |OP LOAD|LVL L2 or L2 hit|SNP None|TLB L1 or L2 hit|LCK No|BLK N/A 16 10468100442 |OP LOAD|LVL L2 or L2 hit|SNP None|TLB L1 or L2 hit|LCK No|BLK N/A 20 11868100242 |OP LOAD|LVL LFB/MAB or LFB/MAB hit|SNP None|TLB L1 or L2 hit|LCK No|BLK N/A 189 1026a100142 |OP LOAD|LVL L1 or L1 hit|SNP None|TLB L1 or L2 hit|LCK Yes|BLK N/A 193 10468100442 |OP LOAD|LVL L2 or L2 hit|SNP None|TLB L1 or L2 hit|LCK No|BLK N/A 18 ... Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Song Liu Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230314234237.3008956-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ff612055fb79e24c75f682f5b0e30cfc370ee59d Author: Namhyung Kim Date: Tue Mar 14 16:42:34 2023 -0700 perf bpf filter: Add data_src sample data support The data_src has many entries to express memory behaviors. Add each term separately so that users can combine them for their purpose. I didn't add prefix for the constants for simplicity as they are mostly distinguishable but I had to use l1_miss and l2_hit for mem_dtlb since mem_lvl has different values for the same names. Note that I decided mem_lvl to be used as an alias of mem_lvlnum as it's deprecated now. According to the comment in the UAPI header, users should use the mix of mem_lvlnum, mem_remote and mem_snoop. Also the SNOOPX bits are concatenated to mem_snoop for simplicity. The following terms are used for data_src and the corresponding perf sample data fields: * mem_op : { load, store, pfetch, exec } * mem_lvl: { l1, l2, l3, l4, cxl, io, any_cache, lfb, ram, pmem } * mem_snoop: { none, hit, miss, hitm, fwd, peer } * mem_remote: { remote } * mem_lock: { locked } * mem_dtlb { l1_hit, l1_miss, l2_hit, l2_miss, any_hit, any_miss, walk, fault } * mem_blk { by_data, by_addr } * mem_hops { hops0, hops1, hops2, hops3 } We can now use a filter expression like below: 'mem_op == load, mem_lvl <= l2, mem_dtlb == l1_hit' 'mem_dtlb == l2_miss, mem_hops > hops1' 'mem_lvl == ram, mem_remote == 1' Note that 'na' is shared among the terms as it has the same value except for mem_lvl. I don't have a good idea to handle that for now. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Song Liu Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230314234237.3008956-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 409bcd806749f23852581f54736a6206d1601248 Author: Namhyung Kim Date: Tue Mar 14 16:42:33 2023 -0700 perf bpf filter: Add more weight sample data support The weight data consists of a couple of fields with the PERF_SAMPLE_WEIGHT_STRUCT. Add weight{1,2,3} term to select them separately. Also add their aliases like 'ins_lat', 'p_stage_cyc' and 'retire_lat'. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Song Liu Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230314234237.3008956-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 335818470f558de5dc37bbcb31f97b303605a9df Author: Namhyung Kim Date: Tue Mar 14 16:42:32 2023 -0700 perf bpf filter: Add 'pid' sample data support The pid is special because it's saved in the PERF_SAMPLE_TID together. So it needs to differenciate tid and pid using the 'part' field in the perf bpf filter entry struct. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Song Liu Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230314234237.3008956-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 27c6f2455b29f27c8daf209ec8bdf0ac2c567b74 Author: Namhyung Kim Date: Tue Mar 14 16:42:31 2023 -0700 perf record: Record dropped sample count When it uses bpf filters, event might drop some samples. It'd be nice if it can report how many samples it lost. As LOST_SAMPLES event can carry the similar information, let's use it for bpf filters. To indicate it's from BPF filters, add a new misc flag for that and do not display cpu load warnings. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Song Liu Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230314234237.3008956-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d180aa56b50dd243dec89b24d23e0a59c3f0c0eb Author: Namhyung Kim Date: Tue Mar 14 16:42:30 2023 -0700 perf record: Add BPF event filter support Use --filter option to set BPF filter for generic events other than the tracepoints or Intel PT. The BPF program will check the sample data and filter according to the expression. For example, the below is the typical perf record for frequency mode. The sample period started from 1 and increased gradually. $ sudo ./perf record -e cycles true $ sudo ./perf script perf-exec 2272336 546683.916875: 1 cycles: ffffffff828499b8 perf_event_exec+0x298 ([kernel.kallsyms]) perf-exec 2272336 546683.916892: 1 cycles: ffffffff828499b8 perf_event_exec+0x298 ([kernel.kallsyms]) perf-exec 2272336 546683.916899: 3 cycles: ffffffff828499b8 perf_event_exec+0x298 ([kernel.kallsyms]) perf-exec 2272336 546683.916905: 17 cycles: ffffffff828499b8 perf_event_exec+0x298 ([kernel.kallsyms]) perf-exec 2272336 546683.916911: 100 cycles: ffffffff828499b8 perf_event_exec+0x298 ([kernel.kallsyms]) perf-exec 2272336 546683.916917: 589 cycles: ffffffff828499b8 perf_event_exec+0x298 ([kernel.kallsyms]) perf-exec 2272336 546683.916924: 3470 cycles: ffffffff828499b8 perf_event_exec+0x298 ([kernel.kallsyms]) perf-exec 2272336 546683.916930: 20465 cycles: ffffffff828499b8 perf_event_exec+0x298 ([kernel.kallsyms]) true 2272336 546683.916940: 119873 cycles: ffffffff8283afdd perf_iterate_ctx+0x2d ([kernel.kallsyms]) true 2272336 546683.917003: 461349 cycles: ffffffff82892517 vma_interval_tree_insert+0x37 ([kernel.kallsyms]) true 2272336 546683.917237: 635778 cycles: ffffffff82a11400 security_mmap_file+0x20 ([kernel.kallsyms]) When you add a BPF filter to get samples having periods greater than 1000, the output would look like below: $ sudo ./perf record -e cycles --filter 'period > 1000' true $ sudo ./perf script perf-exec 2273949 546850.708501: 5029 cycles: ffffffff826f9e25 finish_wait+0x5 ([kernel.kallsyms]) perf-exec 2273949 546850.708508: 32409 cycles: ffffffff826f9e25 finish_wait+0x5 ([kernel.kallsyms]) perf-exec 2273949 546850.708526: 143369 cycles: ffffffff82b4cdbf xas_start+0x5f ([kernel.kallsyms]) perf-exec 2273949 546850.708600: 372650 cycles: ffffffff8286b8f7 __pagevec_lru_add+0x117 ([kernel.kallsyms]) perf-exec 2273949 546850.708791: 482953 cycles: ffffffff829190de __mod_memcg_lruvec_state+0x4e ([kernel.kallsyms]) true 2273949 546850.709036: 501985 cycles: ffffffff828add7c tlb_gather_mmu+0x4c ([kernel.kallsyms]) true 2273949 546850.709292: 503065 cycles: 7f2446d97c03 _dl_map_object_deps+0x973 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2) Committer notes: Add stubs for perf_bpf_filter__prepare() and perf_bpf_filter__destroy() to tools/perf/util/python.c to keep it building. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Song Liu Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230314234237.3008956-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 83ae1ccba5d0549622634e35d0b3fc3a52d59772 Author: Pierre-Louis Bossart Date: Tue Mar 14 09:54:10 2023 +0800 soundwire: cadence: change access to IP_MCP_CMD_BASE The latest Cadence IP moves MCP_CMD_BASE and MCP_CMD_RESP to the IP_MCP_CMD_BASE and IP_MCP_CMD_RESP registers located in different area and accessed with a fixed offset. Unlike other patches, the fields are not renamed to avoid a very invasive and low-value set of changes. For existing solutions, this is an iso-functionality change. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-17-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 73a29d3f3d5b38c8ce2779bdaf3eb9a86bc6c212 Author: Pierre-Louis Bossart Date: Tue Mar 14 09:54:09 2023 +0800 soundwire: cadence: split access to IP_MCP_CMDCTRL fields The latest Cadence IP splits the MCP_CMDCTRL fields in two registers: MCP_CMDCTRL and IP_MCP_CMDCTRL. Rename the relevant fields and change the access methods used for those fields. In practice we only use the Parity error insertion in IP_CMD_CTRL. For existing solutions, this is an iso-functionality change. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-16-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 4dc953bcad2cdd3b0fe352e362fd731807f0fbb6 Author: Pierre-Louis Bossart Date: Tue Mar 14 09:54:08 2023 +0800 soundwire: cadence: split access to IP_MCP_CONTROL fields The latest Cadence IP splits the MCP_CONTROL fields in two registers: MCP_CONTROL and IP_MCP_CONTROL. Rename the relevant fields and change the access methods used for those fields. For existing solutions, this is an iso-functionality change. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-15-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit c5753714fa323240872a9c21381acbb88fa3325e Author: Pierre-Louis Bossart Date: Tue Mar 14 09:54:07 2023 +0800 soundwire: cadence: split access to IP_MCP_CONFIG fields The latest Cadence IP splits the MCP_CONFIG fields in two registers: MCP_CONFIG and IP_MCP_CONFIG. Rename the relevant fields and change the access methods used for those fields. For existing solutions, this is an iso-functionality change. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-14-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 9402e25df18f806127437b9b2b3f54eee5e85182 Author: Pierre-Louis Bossart Date: Tue Mar 14 09:54:06 2023 +0800 soundwire: cadence: add helpers to access IP_MCP registers The latest Cadence IP splits some of the existing registers into two, separated by a fixed offset. The bitfields themselves remain at the same position, so we can use new helpers to dynamically add the fixed offset. For example, the existing MCP_CONFIG is now split in two with MCP_CONFIG and IP_MCP_CONFIG (the naming comes directly from the design document). This patch adds helpers to access registers with the IP_ prefix. The addition of the 'ip' prefix for helpers, registers and bitfields is intentional to help reviewers spot any mistake. For existing solutions, the offset is exactly zero so there's no functional change - the MCP_CONFIG and IP_MCP_CONFIG are aliased to the same address. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-13-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit f117e90802d6c29621f0b97dbf9e7ac8250229b9 Author: Pierre-Louis Bossart Date: Tue Mar 14 09:54:05 2023 +0800 soundwire: cadence: remove CDNS_MCP_CONFIG_SSPMOD This field is not used, and its definition is not aligned with the hardware specification. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-12-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit fb43d62ee772fac7173bfbed3ca1bccdc508f10a Author: Pierre-Louis Bossart Date: Tue Mar 14 09:54:04 2023 +0800 soundwire: intel: move bank switch routine to common intel_bus_common.c No functionality change, just moving the routines to a common file so that they can be used for new hardware. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-11-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 1e76de2e5dfeff17f13afe8146449fec3f5b69f7 Author: Pierre-Louis Bossart Date: Tue Mar 14 09:54:03 2023 +0800 soundwire: intel: add abstraction for cmdsync check If we add one more callback, we can have common bank switch sequences between old and new hardware: the only difference is where the CMDSYNC register is located. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-10-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 1a1a6a692e9cd58c235651fa281219dab02afeed Author: Pierre-Louis Bossart Date: Tue Mar 14 09:54:02 2023 +0800 soundwire: intel: move bus common sequences to different file Now that the bus start/stop/clock_stop sequences use the ops, we can move them to a different file to reuse them. Note that we could in theory remove the abstraction for all those sequences and directly call the functions in intel_auxdevice.c. To allow for more flexibility and have means to special-case new platforms, we decided to keep the abstraction. If in time it becomes clear there is no benefit the abstraction will be simplified. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-9-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 90e4632a6f6cee2a8f2ef20f47c2a5ccc7a780ea Author: Pierre-Louis Bossart Date: Tue Mar 14 09:54:01 2023 +0800 soundwire: intel: use indirection before moving bus start/stop sequences There was no benefit to using the existing abstraction, but since we are going to move the code make sure we do use the ops. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-8-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 84706e9a75ffc3c950424bdfea06cabb4101a6b4 Author: Pierre-Louis Bossart Date: Tue Mar 14 09:54:00 2023 +0800 soundwire: intel: add sync_arm/sync_go to ops The bus start/stop sequences can be reused between platforms if we add a couple of new callbacks. In following patches the code will be moved to a shared file. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-7-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 9c49a4dd6c861bd2636094712d6d874e257787e2 Author: Pierre-Louis Bossart Date: Tue Mar 14 09:53:59 2023 +0800 soundwire: intel: simplify sync_go sequence In the existing code, the SHIM_SYNC::SYNC_GO bit is set, and the code waits for it to return to zero. That second wait part is just wrong: the SYNC_GO bit is *write-only* so there's no way to know if it's cleared by hardware. The code works because the value for a read-only bit is zero, but that's really just luck. Simplify the sequence to a plain read-modify-write. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-6-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 59e924fe159cb441d6ff96811fde72ef0f32c094 Author: Pierre-Louis Bossart Date: Tue Mar 14 09:53:58 2023 +0800 soundwire: intel: remove useless abstraction PDM is supported in the hardware but never enabled: there are no known PDM-based devices. We can directly call the PCM helper. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit dc9256c91b722863d8ed6f0819798e000a227343 Author: Pierre-Louis Bossart Date: Tue Mar 14 09:53:57 2023 +0800 soundwire: intel: remove PDI-level restrictions on rates and formats This is not relevant and not aligned with hardware definitions. In addition, we've tested higher resolution formats so this is ignored at a higher level. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit a2d76b72b687e47baa41cebb9a9d44329552164a Author: Pierre-Louis Bossart Date: Tue Mar 14 09:53:56 2023 +0800 soundwire: intel: remove stale/misleading comment The PDIs don't really have a notion of rates and formats, only channels are relevant. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 4dd50aff56469bdc3638052e96e0a67d7c07dcb2 Author: Pierre-Louis Bossart Date: Tue Mar 14 09:53:55 2023 +0800 soundwire: intel: move common definitions to header file Prepare for reused for addition of new hardware Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314015410.487311-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 01b33e284ca28cc977bdcfb23be2c719f2139175 Author: Eugene Huang Date: Tue Mar 14 17:06:18 2023 +0800 soundwire: dmi-quirks: add remapping for Intel 'Rooks County' NUC M15 Same DSDT problem as the HP Omen 16-k0005TX, except rt1316 amp is on link2. Link: https://github.com/thesofproject/linux/issues/4088 Signed-off-by: Eugene Huang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20230314090618.498716-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 56ec9457a4a20c5e07ad94bfb6e23077d54cb28e Author: Namhyung Kim Date: Tue Mar 14 16:42:29 2023 -0700 perf bpf filter: Implement event sample filtering The BPF program will be attached to a perf_event and be triggered when it overflows. It'd iterate the filters map and compare the sample value according to the expression. If any of them fails, the sample would be dropped. Also it needs to have the corresponding sample data for the expression so it compares data->sample_flags with the given value. To access the sample data, it uses the bpf_cast_to_kern_ctx() kfunc which was added in v6.2 kernel. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Song Liu Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230314234237.3008956-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 990a71e904f6ec2d7d84eecb37e5127b75721985 Author: Namhyung Kim Date: Tue Mar 14 16:42:28 2023 -0700 perf bpf filter: Introduce basic BPF filter expression This implements a tiny parser for the filter expressions used for BPF. Each expression will be converted to struct perf_bpf_filter_expr and be passed to a BPF map. For now, I'd like to start with the very basic comparisons like EQ or GT. The LHS should be a term for sample data and the RHS is a number. The expressions are connected by a comma. For example, period > 10000 ip < 0x1000000000000, cpu == 3 Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Hao Luo Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Kan Liang Cc: Leo Yan Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Song Liu Cc: Stephane Eranian Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230314234237.3008956-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6e57f69f23d02b8c67d7428ee708b7d903ed22b2 Author: liuwenyu Date: Wed Mar 15 14:42:17 2023 +0800 perf top: Fix rare segfault in thread__comm_len() In thread__comm_len(),strlen() is called outside of the thread->comm_lock critical section,which may cause a UAF problems if comm__free() is called by the process_thread concurrently. backtrace of the core file is as follows: (gdb) bt #0 __strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:77 #1 0x000055ad15d31de5 in thread__comm_len (thread=0x7f627d20e300) at util/thread.c:320 #2 0x000055ad15d4fade in hists__calc_col_len (h=0x7f627d295940, hists=0x55ad1772bfe0) at util/hist.c:103 #3 hists__calc_col_len (hists=0x55ad1772bfe0, h=0x7f627d295940) at util/hist.c:79 #4 0x000055ad15d52c8c in output_resort (hists=hists@entry=0x55ad1772bfe0, prog=0x0, use_callchain=false, cb=cb@entry=0x0, cb_arg=0x0) at util/hist.c:1926 #5 0x000055ad15d530a4 in evsel__output_resort_cb (evsel=evsel@entry=0x55ad1772bde0, prog=prog@entry=0x0, cb=cb@entry=0x0, cb_arg=cb_arg@entry=0x0) at util/hist.c:1945 #6 0x000055ad15d53110 in evsel__output_resort (evsel=evsel@entry=0x55ad1772bde0, prog=prog@entry=0x0) at util/hist.c:1950 #7 0x000055ad15c6ae9a in perf_top__resort_hists (t=t@entry=0x7ffcd9cbf4f0) at builtin-top.c:311 #8 0x000055ad15c6cc6d in perf_top__print_sym_table (top=0x7ffcd9cbf4f0) at builtin-top.c:346 #9 display_thread (arg=0x7ffcd9cbf4f0) at builtin-top.c:700 #10 0x00007f6282fab4fa in start_thread (arg=) at pthread_create.c:443 #11 0x00007f628302e200 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 The reason is that strlen() get a pointer to a memory that has been freed. The string pointer is stored in the structure comm_str, which corresponds to a rb_tree node,when the node is erased, the memory of the string is also freed. In thread__comm_len(),it gets the pointer within the thread->comm_lock critical section, but passed to strlen() outside of the thread->comm_lock critical section, and the perf process_thread may called comm__free() concurrently, cause this segfault problem. The process is as follows: display_thread process_thread -------------- -------------- thread__comm_len -> thread__comm_str # held the comm read lock -> __thread__comm_str(thread) # release the comm read lock thread__delete # held the comm write lock -> comm__free -> comm_str__put(comm->comm_str) -> zfree(&cs->str) # release the comm write lock # The memory of the string pointed to by comm has been free. -> thread->comm_len = strlen(comm); This patch expand the critical section range of thread->comm_lock in thread__comm_len(), to make strlen() called safe. Signed-off-by: Wenyu Liu Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Christian Brauner Cc: Feilong Lin Cc: Hewenliang Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Yunfeng Ye Link: https://lore.kernel.org/r/322bfb49-840b-f3b6-9ef1-f9ec3435b07e@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 80c3a7d9f20401169283b5670dbb8d7ac07a1d55 Author: Adrian Hunter Date: Wed Mar 15 10:43:21 2023 +0200 perf script: Fix Python support when no libtraceevent Python scripting can be used without libtraceevent. In particular, scripting for Intel PT does not use tracepoints, and so does not need libtraceevent support. Alter the build and employ conditional compilation to allow Python scripting without libtraceevent. Example: Before: $ ldd `which perf` | grep -i python $ ldd `which perf` | grep -i libtraceevent $ perf record -e intel_pt//u uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.031 MB perf.data ] $ perf script intel-pt-events.py |& head -3 Error: Couldn't find script `intel-pt-events.py' See perf script -l for available scripts. After: $ ldd `which perf` | grep -i python libpython3.10.so.1.0 => /lib/x86_64-linux-gnu/libpython3.10.so.1.0 (0x00007f4bac400000) $ ldd `which perf` | grep -i libtraceevent $ perf script intel-pt-events.py | head Intel PT Branch Trace, Power Events, Event Trace and PTWRITE Switch In 8021/8021 [000] 11234.097713404 0/0 perf-exec 8021/8021 [000] 11234.098041726 psb offset: 0x0 0 [unknown] ([unknown]) perf-exec 8021/8021 [000] 11234.098041726 cbr 45 freq: 4505 MHz (161%) 0 [unknown] ([unknown]) uname 8021/8021 [000] 11234.098082170 branches:uH tr strt 0 [unknown] ([unknown]) => 7f3a8b9422b0 _start+0x0 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2) uname 8021/8021 [000] 11234.098082379 branches:uH tr end 7f3a8b9422b0 _start+0x0 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2) => 0 [unknown] ([unknown]) uname 8021/8021 [000] 11234.098083629 branches:uH tr strt 0 [unknown] ([unknown]) => 7f3a8b9422b0 _start+0x0 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2) uname 8021/8021 [000] 11234.098083629 branches:uH call 7f3a8b9422b3 _start+0x3 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2) => 7f3a8b943050 _dl_start+0x0 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2) uname 8021/8021 [000] 11234.098083837 branches:uH tr end 7f3a8b943060 _dl_start+0x10 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2) => 0 [unknown] ([unknown]) IPC: 0.01 (9/938) uname 8021/8021 [000] 11234.098084670 branches:uH tr strt 0 [unknown] ([unknown]) => 7f3a8b943060 _dl_start+0x10 (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2) Fixes: 378ef0f5d9d7f465 ("perf build: Use libtraceevent from the system") Signed-off-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230315084321.14563-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 4230cea89cafb11b2c2e4dcac8b505e7a766b386 Author: Tvrtko Ursulin Date: Tue Mar 14 14:18:55 2023 +0000 drm: Track clients by tgid and not tid Thread group id (aka pid from userspace point of view) is a more interesting thing to show as an owner of a DRM fd, so track and show that instead of the thread id. In the next patch we will make the owner updated post file descriptor handover, which will also be tgid based to avoid ping-pong when multiple threads access the fd. Signed-off-by: Tvrtko Ursulin Reviewed-by: Zack Rusin Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230314141904.1210824-2-tvrtko.ursulin@linux.intel.com commit 03810031c91dfe448cd116ee987d5dc4139006f4 Author: Emanuele Ghidoli Date: Mon Mar 13 18:09:50 2023 +0100 gpio: fxl6408: add I2C GPIO expander driver Add minimal driver for Fairchild FXL6408 8-bit I2C-controlled GPIO expander using the generic regmap based GPIO driver (GPIO_REGMAP). The driver implements setting the GPIO direction, reading inputs and writing outputs. In addition to that the FXL6408 has the following functionalities: - allows to monitor input ports for data transitions with an interrupt pin - all inputs can be configured with pull-up or pull-down resistors Datasheet: https://www.onsemi.com/download/data-sheet/pdf/fxl6408-d.pdf Signed-off-by: Emanuele Ghidoli Co-developed-by: Francesco Dolcini Signed-off-by: Francesco Dolcini Reviewed-by: Andy Shevchenko [Bartosz: order includes alphabetically] Signed-off-by: Bartosz Golaszewski commit d41116f7e476f5211af77454e9938a87a09a179b Author: Emanuele Ghidoli Date: Mon Mar 13 18:09:49 2023 +0100 dt-bindings: gpio: add fcs,fxl6408 Add Fairchild FXL6408 8-bit I2C-controlled GPIO expander. Signed-off-by: Emanuele Ghidoli Signed-off-by: Francesco Dolcini Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 27a80bd09d2c5ec453a2f617f2e2cbe9a2615d97 Author: William Breathitt Gray Date: Thu Mar 9 18:39:29 2023 -0500 gpio: pcie-idio-24: Prune superfluous license boilerplate The SPDX License Identifier line renders the GPL boilerplate text superfluous, so let's remove it. Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit 4eca8cbf7ba83c3291b5841905ce64584036b1ff Author: Johannes Berg Date: Wed Mar 15 13:29:20 2023 +0100 wifi: iwlwifi: suppress printf warnings in tracing This can't really be fixed due to the macro layout of tracepoints (you'd need a special tracepoint macro for when this is needed), so just suppress the warnings. Signed-off-by: Johannes Berg commit ff750f8e9464e368fc92941553c9c385644ebfc1 Author: Geert Uytterhoeven Date: Tue Mar 14 11:48:59 2023 +0100 ASoC: dt-bindings: renesas: rsnd: Update example Miscellaneous updates to make the example match reality: - Correct SSI resource region size, - Complete half-conversion to new-style CPG/MSSR bindings, - Add missing power-domains, resets, and reset-names properties, - Use interrupt binding definitions instead of hardcoded numbers, - Correct interrupt flags, - Drop double blank line. Signed-off-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/ba4ec999dc152ea1f113253e497c093b8789d414.1678790879.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 8f55564c05123b790f25562fa02ca2e1dbf9c4f5 Author: Johannes Berg Date: Tue Mar 14 19:49:34 2023 +0200 wifi: iwlwifi: fw: pnvm: fix uefi reduced TX power loading There are a number of issues here: * if trans->reduce_power_loaded is already true, we call iwl_trans_set_reduce_power() with an uninitialized len value * in this case we also clobber a previous load/setting * if iwl_uefi_get_reduced_power() returns an ERR_PTR() we try to kfree() it Move the iwl_trans_set_reduce_power() call into the success case only to fix these issues. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.aa2cf2281f5d.I33b4ab3427f1921c184c52fecd0f46781a89dc8a@changeid Signed-off-by: Johannes Berg commit c2db01752735b522ae150b8698fd4e526efbbc20 Author: Mukesh Sisodiya Date: Tue Mar 14 19:49:33 2023 +0200 wifi: iwlwifi: Update configurations for Bnj and Bz devices Add missing rf support for Bz device and B-Step for BnJ device Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.14c373dcfe15.I96b96a8b149ac181e962f4b82e0d15b172823d0f@changeid Signed-off-by: Johannes Berg commit 71a54f7e74488f234fb56270253bcd08a3357d0e Author: Johannes Berg Date: Tue Mar 14 19:49:32 2023 +0200 wifi: iwlwifi: mvm: rs: print BAD_RATE for invalid HT/VHT index If there's a rate->index that maps inside the range but to an uninitialized value, then that's also a bad rate, avoid printing "(nil)" in that case and rather print the "BAD_RATE" string instead as in the else branch. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.06b38d160fc5.I45a9254d3658b1ce796aa4c427193d3cbf638d7e@changeid Signed-off-by: Johannes Berg commit f311d0113c7326ec411c9f81dbf77a2cc5ed00ff Author: Solomon Tan Date: Tue Mar 14 19:49:31 2023 +0200 wifi: iwlwifi: Replace space with tabs as code indent This patch addresses the checkpatch.pl warning that code indent should use tabs. Signed-off-by: Solomon Tan Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.eaca2a9b08f2.Ic81d60185c13cfc750bf93fbabac57314cb5de13@changeid Signed-off-by: Johannes Berg commit 473bc264356297b9df7ee3183b08b954be4a1152 Author: Solomon Tan Date: Tue Mar 14 19:49:30 2023 +0200 wifi: iwlwifi: Add required space before open '(' This patch addresses the error from checkpatch.pl that a space is required before an open parenthesis. Signed-off-by: Solomon Tan Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.a21ba1967d94.Iaa52fc6517ea9efb3efc7b1b98f4df2a288de1c3@changeid Signed-off-by: Johannes Berg commit d2abe692fe6bea753aaa38c081f322fbed5930e9 Author: Solomon Tan Date: Tue Mar 14 19:49:29 2023 +0200 wifi: iwlwifi: Remove prohibited spaces This patch addresses the error from checkpatch.pl regarding the presence of prohibited spaces. Signed-off-by: Solomon Tan Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.557d6841a166.I0957923fe9ea20c1ec9140477033548ccfe93e9a@changeid Signed-off-by: Johannes Berg commit e2e76bdcd3fd663bfbddbc09e167e7c1069659cd Author: Julia Lawall Date: Tue Mar 14 19:49:28 2023 +0200 wifi: iwlwifi: fix typos in comment Spelling mistakes (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.fb2fc470e949.I1f3a347b533bcdb6bcd310f752ab3349800efb49@changeid Signed-off-by: Johannes Berg commit 093e71e26d67c2b0d194b34a7b56432bab049e90 Author: Tom Rix Date: Tue Mar 14 19:49:27 2023 +0200 wifi: iwlwifi: mvm: remove setting of 'sta' parameter cppcheck reports [drivers/net/wireless/intel/iwlwifi/mvm/rs.c:2686]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? The setting of the 'sta' parameter is not needed. In the if-check that sets it to NULL, mvm_sta is also set to NULL. Then the next statement checks if mvm_sta is NULL and does an early return. So remove setting sta. Signed-off-by: Tom Rix Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.711fe28cfdd6.I2f723f9d44f65720baaf3e84b72109759350a8f5@changeid Signed-off-by: Johannes Berg commit 6f71e90e65e9bb5d5e12199e19670bb4973a6e39 Author: Miri Korenblit Date: Tue Mar 14 19:49:26 2023 +0200 wifi: iwlwifi: mvm: add an unassign_vif_chanctx() callback for MLD mode This is another patch in the series adding all the ops for the new MLD ieee80211_ops. The callback added here uses the new MLD FW API Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.5d4bcd384425.I263eef3aad8efe23a597843fe7c56924038c8fdc@changeid Signed-off-by: Johannes Berg commit daddfae5527164edee09bcca0848c10ab72c5c5b Author: Miri Korenblit Date: Tue Mar 14 19:49:25 2023 +0200 wifi: iwlwifi: mvm: refactor __iwl_mvm_unassign_vif_chanctx() Since parts of the functionality of this function is going to be used also by the MLD version of it, put in a separate function the parts that are common for both MLD and non-MLD modes. The common function will later be used in the MLD ops. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.fa05929badb9.I2222dc86cf7d7a7bb58c6a2f2529c8089bfe58b4@changeid Signed-off-by: Johannes Berg commit 50e81437a4831e32b0d04a828aa18c02356ee23e Author: Miri Korenblit Date: Tue Mar 14 19:49:24 2023 +0200 wifi: iwlwifi: mvm: add an assign_vif_chanctx() callback for MLD mode This is another patch in the series adding all the ops for the new MLD ieee80211_ops. The callback added here uses the new MLD FW API. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.d3753975e720.I45f89cc81370d2cf8d4f51748ccb3ec675eff1bd@changeid Signed-off-by: Johannes Berg commit 8a919a78a469bb4e01ced9766bdbb7a03c8a4edf Author: Miri Korenblit Date: Tue Mar 14 19:49:23 2023 +0200 wifi: iwlwifi: mvm: refactor __iwl_mvm_assign_vif_chanctx() Since parts of the functionality of this function is going to be used also by the MLD version of it, put in a separate function the parts that are common for both MLD and non-MLD modes. The common function will later be used in the MLD ops. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.844755701cac.I1c650718ad2381eabc38f4103c1aac67936a1ffc@changeid Signed-off-by: Johannes Berg commit 60efeca1c6a75d7f518c963fa4f3694dcfc1147e Author: Miri Korenblit Date: Tue Mar 14 19:49:22 2023 +0200 wifi: iwlwifi: mvm: Add a remove_interface() callback for mld mode As the MLD mode and its new APIs are introduced, we've decided to add a new ieee80211_ops dedicated for MLD callbacks. Add the MLD remove_interface() callback which uses the new MLD APIs. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.b87c5c0a4b6b.I631173a73d6ffd7232aa539ea8b356a222fac398@changeid Signed-off-by: Johannes Berg commit 1ab26632332eac61cc24464a74fd9bcf5ec5167b Author: Miri Korenblit Date: Tue Mar 14 19:49:21 2023 +0200 wifi: iwlwifi: mvm: Add an add_interface() callback for mld mode As the MLD mode and its new APIs are introduced, we've decided to add a new ieee80211_ops dedicated for MLD callbacks. Add the MLD add_interface() callback which uses the new MLD APIs added the previous patches. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.6adc29bff39b.I97ed469028009be9392dcc6f7b5ffbe45f4b2c43@changeid Signed-off-by: Johannes Berg commit 006c152ac9e56ac7871efa995854c3ff8cf6915a Author: Miri Korenblit Date: Tue Mar 14 19:49:20 2023 +0200 wifi: iwlwifi: mvm: add support for the new STA related commands As a part of the new MLD FW API changes, we have new commands for STA related operations (add/remove/aux/disable tx). Add structures and enum definitions, along with part of the functions that sends this commands. This functions will be in used and more will be added in the next patches. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.132873ce015c.I7b12a77e5be066730762e6ceeeaa7190293c3df1@changeid Signed-off-by: Johannes Berg commit 55eb1c5fa4b260491d8be3299d4546d0b34465f4 Author: Miri Korenblit Date: Tue Mar 14 19:49:19 2023 +0200 wifi: iwlwifi: mvm: add support for the new LINK command As a part of the new MLD FW API changes, we have a new LINK command to add/remove/configure a link. Add structures and enum definitions, along with the functions that sends this command (i.e. add, remove and change mac ctxt). These functions will be in used in the next patches. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.d7808329effb.I13bea2db206b78540bc866bc3ab755ad5be78c53@changeid Signed-off-by: Johannes Berg commit 9be162a7b670b7e8dbada3c139d77961f457a34d Author: Miri Korenblit Date: Tue Mar 14 19:49:18 2023 +0200 wifi: iwlwifi: mvm: add support for the new MAC CTXT command As a part of the new MLD FW API changes, we have a new MAC CTXT command. Add structures and enum definitions, along with the functions that sends this command (i.e. add, remove and change mac ctxt). This functions will be in used in the next patches. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.99a41a5bc55f.I310312c829f5f2f69b64fcddce487b1eab80165b@changeid Signed-off-by: Johannes Berg commit af6d168f0ec613d55cdd9c4e0443108172577318 Author: Miri Korenblit Date: Tue Mar 14 19:49:17 2023 +0200 wifi: iwlwifi: mvm: Refactor MAC_CONTEXT_CMD sending flow Refactor MAC_CONTEXT_CMD sending flow: 1. As the new MLD API is introduced, there are some common fields in both the old and new APIs. The MAC_CONTEXT_CMD of the non-MLD API has common fields with the link and mac commands of the new MLD API. Put this common parts in functions so it can be used later by the new MLD API. 2. Use iwl_mvm_mac_ctxt_send_cmd when removing a mac instead of implementing the same functionality once again. 3. Change the debug print when sending the command to be more specific, so it will be easy to distinguish later if the old or new mac command was sent. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.3ab62700db4e.I2e353b308667c215aa456c160e0d90de2b9b85cc@changeid Signed-off-by: Johannes Berg commit 9c4f15cadcd74becbb7e05f7fccd27180e433b8c Author: Miri Korenblit Date: Tue Mar 14 19:49:16 2023 +0200 wifi: iwlwifi: mvm: Refactor STA_HE_CTXT_CMD sending flow Refactor STA_HE_CTXT_CMD sending flow: 1. As the new MLD API is introduced, there are some common fields in both the old and new APIs. The STA_HE_CTXT_CMD of the non-MLD API has common fields with the link and mac commands of the new MLD API. Put this common parts in functions so it can be used later by the new MLD API. 2. The HE capability which indicates whether the NIC is ack-enabled or not is the same for all bands. No need to take it from the specific band which is currently in use. Take it from the low band - this simplifies the code and doesn't require a phy_ctxt. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.7ca960596953.Ifc3e816461abbd69c6fd87752342afcedfebc293@changeid Signed-off-by: Johannes Berg commit 834f920ef34b57a51fa892fae6de86830316c353 Author: Mukesh Sisodiya Date: Tue Mar 14 19:49:15 2023 +0200 wifi: iwlwifi: yoyo: Add driver defined dump file name Add driver defined dump file name extension for beacon loss and FW Assert case. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.2a2ee92995e9.I38fff588e32276796cd757309fc811241f827c7a@changeid Signed-off-by: Johannes Berg commit 51fa8c026e072dac49ca638d66a64a66b29e916f Author: Mukesh Sisodiya Date: Tue Mar 14 19:49:14 2023 +0200 wifi: iwlwifi: yoyo: Add new tlv for dump file name extension Add tlv in dump file for dump file name extension. Signed-off-by: Mukesh Sisodiya Signed-off-by: Greenman, Gregory Link: https://lore.kernel.org/r/20230314194113.ffc28212994e.Ie5f10709548497061f95c1634d942dd2facf72ec@changeid Signed-off-by: Johannes Berg commit 0936998393c7dffd68ba5d73eabdabf8dddbbc41 Author: Johannes Berg Date: Tue Mar 14 19:49:13 2023 +0200 wifi: iwlwifi: mvm: avoid sta lookup in queue alloc In FW restart scenarios, we allocate the queues from the iwl_mvm_realloc_queues_after_restart() function, but that is called before we insert the station ID into our map (mvm->fw_id_to_mac_id). However, in all cases where we're actually allocating a queue for a "real" (not bcast, aux, ...) station we have the sta pointer already, so just pass it along to use it instead of looking it up. This fixes an issue where after restart we only allocated a queue of size 16 (due to the ordering issue described above), and thus never got good throughput again since no aggregates could be formed on transmit. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230314194113.4d70868003e8.I3476fee5c12f5b1af2be5e2f38a9df7d66d02b62@changeid Signed-off-by: Johannes Berg commit 4516fede7ce802f3e86c8a3447dbb225fa2130de Author: Bjorn Helgaas Date: Tue Mar 7 14:27:29 2023 -0600 accel/habanalabs: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since commit f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 2e8e9a895c4589f124a37fc84d123b5114406e94 Author: Tomer Tayar Date: Wed Mar 1 17:45:58 2023 +0200 accel/habanalabs: postpone mem_mgr IDR destruction to hpriv_release() The memory manager IDR is currently destroyed when user releases the file descriptor. However, at this point the user context might be still held, and memory buffers might be still in use. Later on, calls to release those buffers will fail due to not finding their handles in the IDR, leading to a memory leak. To avoid this leak, split the IDR destruction from the memory manager fini, and postpone it to hpriv_release() when there is no user context and no buffers are used. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 801507d3b31489d8a834eab443987a562e2e1e41 Author: Dafna Hirschfeld Date: Mon Feb 20 07:54:44 2023 +0200 accel/habanalabs: move soft-reset wait to soft-reset execute We plan to do soft-reset either by mmio or by using cpucp packet depending on the FW version. We don't want to check FW version in two different places for that (execute soft-reset and wait to soft-reset) so move the waiting to gaudi2_execute_soft_reset. This also makes sense because the cpucp also does the waiting. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f7f0085eec8d3c0c353d2e7bfa7fb54b3b925d7a Author: Koby Elbaz Date: Wed Feb 15 17:51:14 2023 +0200 accel/habanalabs: add uapi to stall/resume engine The user might want to stall/resume engines to perform power testing for various scenarios. Because our current HL_CS_FLAGS_ENGINE_CORE_COMMAND command only handles the engines' cores, we need to add another opcode for handling entire engine and not just its core. The user supplies an array, where each entry holds the engine's ID and the command to send to the engine. The size of the array is limited by the number of engines in the ASIC (only Gaudi2 is currently supported). Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 28fbc058f2eec0e7e59cbeb5cce1d408d76c5965 Author: Tomer Tayar Date: Fri Feb 17 12:56:48 2023 +0200 accel/habanalabs: use scnprintf() in print_device_in_use_info() compose_device_in_use_info() was added to handle the snprintf() return value in a single place. However, the buffer size in print_device_in_use_info() is set such that it would be enough for the max possible print, so compose_device_in_use_info() is not really needed. Moreover, scnprintf() can be used instead of snprintf(), to save the check if the return value larger than the given size. Cc: Stanislaw Gruszka Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 087fe7c9c2b781b02124e9ef7fcf37d0ec982965 Author: Dafna Hirschfeld Date: Wed Mar 1 10:59:10 2023 +0200 accel/habanalabs: unify err log of hw-fini failure in dirty state print more informative message when failing in dirty state Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 7ffb5ced2bc3578b221007467cef8a032c189b0a Author: Koby Elbaz Date: Thu Feb 23 18:17:02 2023 +0200 accel/habanalabs: use a mutex rather than a spinlock There are two reasons why mutex is better here: 1. There's a critical section relatively long, where in certain scenarios (e.g., multiple VM allocations) taking a spinlock might cause noticeable performance degradation. 2. It will remove the incorrect usage of mutex under spin_lock (where preemption is disabled). Reported-by: Dan Carpenter Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c7ac65c881eae0358b91bd2045ab81b452d2e716 Author: Dafna Hirschfeld Date: Mon Feb 27 08:22:54 2023 +0200 accel/habanalabs: allow getting HL_INFO_DRAM_USAGE during soft-reset We can allow userspace to query the dram usage during soft-reset. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 9732d5d0d4813eef76f6904a1da80372924081a7 Author: Koby Elbaz Date: Tue Feb 21 14:21:39 2023 +0200 accel/habanalabs: fix register address on PDMA/EDMA idle check The PDMA/EDMA is_idle routines didn't check the correct CORE register in order to get the accurate idle state. Moreover, it's better to make the is_idle routine more robust by adding additional checks (IS_HALTED) before announcing that the core is idle. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f831aade13d7602b289595e59b6500c8b4b9eb6a Author: Koby Elbaz Date: Sun Feb 26 08:22:45 2023 +0200 accel/habanalabs: remove a useless is_idle TPC flag Is appears that the flag - DCORE0_TPC0_CFG_STATUS_VECTOR_PIPE_EMPTY_MASK, has no actual use when it comes to querying TPC idleness, since this flag's corresponding bit turns-off after stalling the engine, and turns back on after resuming it. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 25ebbc57ca56df3cf9149e9da6b1d3169c8487db Author: farah kassabri Date: Thu Feb 23 10:22:23 2023 +0200 accel/habanalabs: fix few misspelled words in the code Run spell checker on the code and fix accordingly. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 75276e23d1129373578296fbc008e91f81ba6ecb Author: Koby Elbaz Date: Thu Feb 23 10:43:14 2023 +0200 accel/habanalabs: verify return code after scrubbing ARCs DCCMs In case the KDMA fails scrubbing the DCCMs (following a soft-reset upon device release), the driver will only print failure until reset flow ends, rather than escalating it into a hard-reset. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 81e609bebbb45d81bd68fc9d29420f03579523ab Author: Tomer Tayar Date: Mon Feb 6 14:33:00 2023 +0200 accel/habanalabs: use notifications and graceful reset for decoder Add notifications to user in case of decoder abnormal interrupts, and use the graceful reset mechanism if reset is required. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka Signed-off-by: Oded Gabbay commit 86b74d843897fdb9f2366bc515e9d52816e3d247 Author: Dafna Hirschfeld Date: Wed Feb 15 12:15:57 2023 +0200 accel/habanalabs: assert return value of hw_fini Since hw_fini return error code for failure indication, we should check its return value. Currently it might only fail upon soft-reset from hl_device_reset. Later patch will add hw_fini failure in case of polling timeout in hard-reset. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka Signed-off-by: Oded Gabbay commit d85f0531b9285cf7dc6784b06e7e7dbc1c04dcee Author: Koby Elbaz Date: Sun Feb 19 13:30:49 2023 +0200 accel/habanalabs: break is_idle function into per-engine sub-routines is_idle() was too long, so break it up for readability. In addition, we can now use the new sub-routines from other places. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit efbd36b2816ba442f55288e3f6488f762d32749f Author: Sagiv Ozeri Date: Mon Feb 20 00:34:41 2023 +0200 accel/habanalabs: add device id to all threads names Compute driver threads names will start with hlX-*, when X is the device id. This will help distinguish them from the NIC thread names. Signed-off-by: Sagiv Ozeri Reviewed-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka Signed-off-by: Oded Gabbay commit b041e788a73153893342e955ff7b8284f9e237e5 Author: Tomer Tayar Date: Thu Feb 16 19:54:32 2023 +0200 accel/habanalabs: add helper function to get vm hash node Add a helper function to search the vm hash for a node with a given virtual address. As opposed to the current code, this function explicitly returns NULL when no node is found, instead of basing on the loop cursor object's value. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka Signed-off-by: Oded Gabbay commit d1bae8199abb23644bf39fa0fb09e87a578f05dd Author: Tomer Tayar Date: Thu Feb 16 18:16:56 2023 +0200 accel/habanalabs: remove unneeded irq_handler variable 'irq_handler' in gaudi2_enable_msix(), is just assigned with a function name and then used when calling request_threaded_irq(). Remove the variable and use the function name directly as an argument. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 5e09ae9203b7626f882d68f4733f87f133de0393 Author: Dafna Hirschfeld Date: Wed Feb 8 16:14:48 2023 +0200 accel/habanalabs: change hw_fini to return int to indicate error We later use cpucp packet for soft reset which might fail so we should be able propagate the failure case. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit a8c14f538823669d9ffdc24dba6d2a8cd67232f8 Author: Tomer Tayar Date: Sun Feb 12 15:27:37 2023 +0200 accel/habanalabs: improve readability of engines idle mask print Remove leading zeroes when printing the idle mask to make it clearer. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 66116a39812bf7c79029ccf05757dc3f83b88874 Author: Sagiv Ozeri Date: Wed Feb 1 19:30:33 2023 +0200 accel/habanalabs: organize hl_device structure comment Make the comments align with the order of the fields in the structure Signed-off-by: Sagiv Ozeri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 3a621af6373116320087ba3c88c260bc992cd2a4 Author: Tom Rix Date: Mon Feb 13 06:48:14 2023 -0800 accel/habanalabs: set hl_capture_*_err storage-class-specifier to static smatch reports drivers/accel/habanalabs/common/device.c:2619:6: warning: symbol 'hl_capture_hw_err' was not declared. Should it be static? drivers/accel/habanalabs/common/device.c:2641:6: warning: symbol 'hl_capture_fw_err' was not declared. Should it be static? both are only used in device.c, so they should be static Signed-off-by: Tom Rix Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 69ff5bccbc35be9acd24f501cf9497eef5ac69c5 Author: Tom Rix Date: Wed Feb 8 07:54:50 2023 -0800 accel/habanalabs: change unused extern decl of hdev to forward decl of hl_device Building with clang W=2 has several similar warnings drivers/accel/habanalabs/common/decoder.c:46:51: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static void dec_error_intr_work(struct hl_device *hdev, u32 base_addr, u32 core_id) ^ drivers/accel/habanalabs/common/security.h:13:26: note: previous declaration is here extern struct hl_device *hdev; ^ There is no global definition of hdev, so the extern is not needed. Searched with grep -r '^struct' . | grep hl_dev Change to an forward decl to resolve these issues drivers/accel/habanalabs/common/mmu/../security.h:133:40: error: ‘struct hl_device’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror] 133 | bool (*skip_block_hook)(struct hl_device *hdev, | ^~~~~~~~~ Signed-off-by: Tom Rix Reviewed-by: Stanislaw Gruszka Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 4a2e9d11fc5ae5b9f6ad974b42dad3a4192d0be8 Author: Dafna Hirschfeld Date: Wed Feb 1 18:46:10 2023 +0200 accel/habanalabs: don't trace cpu accessible dma alloc/free The cpu accessible dma allocations use the gen_pool api which actually does not allocate new memory from the system but manages memory already allocated before. When tracing this together with real dma allocation/free it cause confusing logs like a '0' dma address and a cpu address appearing twice etc. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 1d0f9ad7ce2e6eb89ec46f603c4a8c7e71301296 Author: Dafna Hirschfeld Date: Wed Feb 8 15:46:00 2023 +0200 accel/habanalabs: in hl_device_reset small refactor for readabilty in the out_err flow, combine the two cases of soft-reset since they have mostly common code. In addition unlock reset_info.lock after touching reset count. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 39ab4da9c15b603e4706d9b9ef1aa8c3ef681312 Author: Dafna Hirschfeld Date: Wed Feb 8 15:17:43 2023 +0200 accel/habanalabs: in hl_device_reset remove 'hard_instead_of_soft' Because this field is only used for debug print, we can do more precise debug directly instead. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 3b3d853a84529face16ab9760f11a4fc833c6a50 Author: Koby Elbaz Date: Thu Feb 9 14:45:54 2023 +0200 accel/habanalabs: rename security function parameters To match their description above the function Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 7810c5244d3f92faf635177234647614506574e1 Author: Dafna Hirschfeld Date: Wed Feb 8 15:11:58 2023 +0200 accel/habanalabs: tiny refactor of hl_device_reset for readability Align assignment of reset_upon_device_release to the convention used in this function. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 34bef313e43cf0eb86296c189dc3df171b1851a9 Author: Tomer Tayar Date: Tue Feb 7 20:24:11 2023 +0200 accel/habanalabs: remove hl_irq_handler_default() hl_irq_handler_default() is not used and can be removed. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit b87b8b3e72f6739afb30219b79f06afb9d2329d6 Author: Tomer Tayar Date: Mon Feb 6 09:09:14 2023 +0200 accel/habanalabs: fix print in hl_irq_handler_eq() "eq_base[eq->ci].hdr.ctl" is used directly in a print without a le32_to_cpu() conversion. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 4713ace3246644519bf93cc8ea6e44efe57fc3ec Author: Ofir Bitton Date: Mon Jan 16 19:56:23 2023 +0200 accel/habanalabs: add support for TPC assert In order to allow TPC engines to raise an assert, we must expose the relevant MSIX interrupt to the user so he will configure the engine correctly. In addition, we implement the corresponding interrupt handler that will notify the user upon such an event. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit bcfcd084aacddbb1893ff0c8f41fda23ed861458 Author: Ofir Bitton Date: Wed Feb 1 19:35:54 2023 +0200 accel/habanalabs: capture interrupt timestamp in handler In order for interrupt timestamp to be more accurate we should capture it during the interrupt handling rather than in threaded irq context. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 601223589990101edc0bf6adccaf8cd376a431cc Author: Tal Cohen Date: Wed Jan 25 20:29:15 2023 +0200 accel/habanalabs: change user interrupt to threaded IRQ We prefer not to handle the user interrupt job inside the interrupt context. Instead, use threaded IRQ to handle the user interrupts. This will allow to avoid disabling interrupts when the user process registers for a new event and to avoid long handling inside an interrupt. Signed-off-by: Tal Cohen Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit bca98be5d4b9e55110d2878461b47dea59fb6d6a Author: Ohad Sharabi Date: Mon Jan 23 10:08:34 2023 +0200 accel/habanalabs: modify events reset policy The policy file of the events reset has been modified. This change is reflected in the autogenerated file. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 32231b6c30ef6d4ec0ca077bfe7e274b5441140a Author: Ohad Sharabi Date: Sun Nov 13 10:49:05 2022 +0200 accel/habanalabs: get reset type indication from irq_map When getting an event, add the ability to deduce the reset type from the IRQ map table instead of using hard reset regardless. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 18d1358459bd2a18f4582c9ecbdb63cb8825fce0 Author: Tomer Tayar Date: Wed Jan 25 11:38:56 2023 +0200 accel/habanalabs: enable graceful reset mechanism for compute-reset The graceful reset mechanism is currently enabled only for reset requests that will end up with hard-reset. In future, reset requests due to errors in some device engines, are going to be modified to request compute-reset, as the much longer hard-reset is not really needed there. To allow it, enable graceful reset also for compute-reset, and reset after user releases the device won't be escalated to hard-reset in those cases. If watchdog expires and user didn't release the device, hard-reset will be initiated in any case. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 57479adb41852b668c6f25a3c6aef4ad3fe35f97 Author: Koby Elbaz Date: Sun Jan 29 13:35:58 2023 +0200 accel/habanalabs: disable PCI when escalating compute to hard-reset In case a compute reset has failed or a request for a hard reset has just arrived, then we escalate current reset procedure from compute to hard-reset. In such a case, the FW should be aware of the updated error cause, and if LKD is the one who performs the reset (rather than the FW), then we ask the FW to disable PCI access. We would also like to have relevant debug info and therefore we print the currently escalating reset type. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit e0ad6bad80b52b84cc0592b949a0efd2106928c2 Author: Moti Haimovski Date: Wed Jan 25 20:16:19 2023 +0200 accel/habanalabs: minimize error prints when mem map fails This commit minimizes the "chain of errors" displayed when memory mapping fails. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit e38f88e42aac52ac51ef8213157405516a570b0a Author: Koby Elbaz Date: Tue Jan 24 14:13:20 2023 +0200 accel/habanalabs: unsecure CFG_TPC_ID register Required to allow the TPC compiler to know on which offset of the index space it works on. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 7fc0d011c378c6b2abc65cb536e0df0ee055ed39 Author: Ofir Bitton Date: Sun Jan 22 14:06:15 2023 +0200 accel/habanalabs: expose engine core int reg address In order for engine cores to raise interrupts towards FW, They need to know which register the event data should be written to. Hence, we forward the relevant scratchpad register received during dynamic regs handshake with FW. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 313e9f63b74419ca14c2c09f581a79c7037ee0e2 Author: Moti Haimovski Date: Tue Jan 10 17:35:31 2023 +0200 accel/habanalabs: add critical-event bit in notifier Enhance the existing user notifications by adding a HW and FW critical event bits to be used when a HW or FW event occur that requires both SW abort and hard-resetting the chip. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 09524eb8824e102fb57210967bc9d61d7469121c Author: Tomer Tayar Date: Sun Jan 22 12:17:02 2023 +0200 accel/habanalabs: enforce release order of compute device and dma-buf When user closes the compute device file descriptor without closing a dma-buf file descriptor, the device will be considered as in use, leading to hard reset and killing the user process, to ensure the release of the dma-buf. Same thing will happen if user first releases the compute device file and only then the dma-buf. The implication of this is the duration of hard reset, during which the device cannot be reacquired. Moreover, this behavior adds a constraint on a user process to follow this order of release operations. To avoid killing the user process and to remove this constraint, enforce the correct order of release operations inside the driver, by incrementing the device file refcount for any dma-buf until it is released. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit d43bce6e762f25b25685487630510452feaf7362 Author: Tomer Tayar Date: Wed Jan 18 17:35:17 2023 +0200 accel/habanalabs: add info when FD released while device still in use When user closes the device file descriptor, it is checked whether the device is still in use, and a message is printed if it is. To make this message more informative, add to this print also the reason due to which the device is considered as in use. The possible reasons which are checked for now are active CS and exported dma-buf. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit c0e6df916050dbc71450d20e8df6712c2ebe83e8 Author: Dani Liberman Date: Tue Jan 17 13:17:15 2023 +0200 accel/habanalabs: fix address decode RAZWI handling PSOC RAZWI handling code did not took into account single router that supports several initiators with different XY coordinates. Also, it ignored XY_HI coordinate. This caused 2 problems: 1. RAZWI handle ignored some initiators. 2. When getting PSOC RAZWI from some routers, there was a lot of possible engines which could have caused the RAZWI. Fixed the above issue by handling PSOC RAZWI with both low and high XY coordinates. This way driver supports all initiators and in the worst case there are not more than 2 possible engines for RAZWI. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 6071e21325426f7930a4fd98b37f39cd332f50ed Author: Tomer Tayar Date: Wed Jan 18 16:00:55 2023 +0200 accel/habanalabs: use memhash_node_export_put() in hl_release_dmabuf() The same mutex lock/unlock and counter decrementing in hl_release_dmabuf() is already done in the memhash_node_export_put() helper function. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 271b2d5f30d7e84c93d6869f3d6f16a4e49718b0 Author: Oded Gabbay Date: Sun Jan 22 23:04:10 2023 +0200 accel/habanalabs: refactor debugfs init Make it easier to later add support for accel device. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar Reviewed-by: Stanislaw Gruszka commit 323adae99f99e900eedb9d3aba9ded9bf5a20c05 Author: Oded Gabbay Date: Sun Jan 22 17:11:31 2023 +0200 accel/habanalabs: save class in hdev It is more concise than to pass it to device init. Once we will add the accel class, then we won't need to change the function signatures. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar Reviewed-by: Stanislaw Gruszka commit 89859a8997d7ae37efbdea23f3e96bf6cf735e9f Author: Oded Gabbay Date: Sun Jan 22 14:59:11 2023 +0200 accel/habanalabs: split cdev creation to separate function Move the cdev creation code from the main hdev init function to a separate function. This will make the code more readable once we add the accel registration code (instead/in addition to legacy cdev). Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar Reviewed-by: Stanislaw Gruszka commit 4b9c2d3633fa9a019bbba6eb14d5d21b81769c95 Author: Koby Elbaz Date: Sun Jan 22 11:30:26 2023 +0200 accel/habanalabs: capture RAZWI info only if HW indication detected RAZWI handling routine is called from most EQ events, no matter if a RAZWI happens or not. This fix is added to verify the handler is called only if a real RAZWI indication in HW has been detected. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 6168a83788855107437127c5c1ea4d49dea9049c Author: Ofir Bitton Date: Wed Jan 18 09:46:16 2023 +0200 accel/habanalabs: increase user interrupt grace time Currently we support scenarios where a timestamp registration request of a certain offset is received during the interrupt handling of the same offset. In this case we give a grace period of up to 100us for the interrupt handler to finish. It seems that sometimes the interrupt handling takes more than expected, and therefore this path should be optimized. Until that happens, let's increase the grace period in order not to reach timeout which will cause user call to be rejected. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay Reviewed-by: Stanislaw Gruszka commit 5a78ac33e3cb8822da64dd1af196e83664b332b0 Author: Aditya Kumar Singh Date: Thu Mar 9 15:23:08 2023 +0530 wifi: ath11k: fix deinitialization of firmware resources Currently, in ath11k_ahb_fw_resources_init(), iommu domain mapping is done only for the chipsets having fixed firmware memory. Also, for such chipsets, mapping is done only if it does not have TrustZone support. During deinitialization, only if TrustZone support is not there, iommu is unmapped back. However, for non fixed firmware memory chipsets, TrustZone support is not there and this makes the condition check to true and it tries to unmap the memory which was not mapped during initialization. This leads to the following trace - [ 83.198790] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 [ 83.259537] Modules linked in: ath11k_ahb ath11k qmi_helpers .. snip .. [ 83.280286] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 83.287228] pc : __iommu_unmap+0x30/0x140 [ 83.293907] lr : iommu_unmap+0x5c/0xa4 [ 83.298072] sp : ffff80000b3abad0 .. snip .. [ 83.369175] Call trace: [ 83.376282] __iommu_unmap+0x30/0x140 [ 83.378541] iommu_unmap+0x5c/0xa4 [ 83.382360] ath11k_ahb_fw_resource_deinit.part.12+0x2c/0xac [ath11k_ahb] [ 83.385666] ath11k_ahb_free_resources+0x140/0x17c [ath11k_ahb] [ 83.392521] ath11k_ahb_shutdown+0x34/0x40 [ath11k_ahb] [ 83.398248] platform_shutdown+0x20/0x2c [ 83.403455] device_shutdown+0x16c/0x1c4 [ 83.407621] kernel_restart_prepare+0x34/0x3c [ 83.411529] kernel_restart+0x14/0x74 [ 83.415781] __do_sys_reboot+0x1c4/0x22c [ 83.419427] __arm64_sys_reboot+0x1c/0x24 [ 83.423420] invoke_syscall+0x44/0xfc [ 83.427326] el0_svc_common.constprop.3+0xac/0xe8 [ 83.430974] do_el0_svc+0xa0/0xa8 [ 83.435659] el0_svc+0x1c/0x44 [ 83.438957] el0t_64_sync_handler+0x60/0x144 [ 83.441910] el0t_64_sync+0x15c/0x160 [ 83.446343] Code: aa0103f4 f9400001 f90027a1 d2800001 (f94006a0) [ 83.449903] ---[ end trace 0000000000000000 ]--- This can be reproduced by probing an AHB chipset which is not having a fixed memory region. During reboot (or rmmod) trace can be seen. Fix this issue by adding a condition check on firmware fixed memory hw_param as done in the counter initialization function. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Fixes: f9eec4947add ("ath11k: Add support for targets without trustzone") Signed-off-by: Aditya Kumar Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230309095308.24937-1-quic_adisi@quicinc.com commit d2a9692ad4295e227e3352fdbf14b8491b01e1c9 Author: Jani Nikula Date: Thu Mar 9 10:16:45 2023 +0200 drm/i915/gt: make kobj attributes const There's no need for any of these to be mutable, constify: drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000020 files.0 drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000050 files.1 drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 preempt_timeout_attr drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 timeslice_duration_attr drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 timeslice_duration_def drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 preempt_timeout_def drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 max_spin_def drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 stop_timeout_def drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 heartbeat_interval_def drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 name_attr drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 class_attr drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 inst_attr drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 mmio_attr drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 caps_attr drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 all_caps_attr drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 max_spin_attr drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 stop_timeout_attr drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0000000000000038 heartbeat_interval_attr Signed-off-by: Jani Nikula Reviewed-by: Andrzej Hajda Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20230309081645.385650-1-jani.nikula@intel.com commit 3b1088a09ec9438523c251d8435e78988824bc0d Author: Gustavo A. R. Silva Date: Tue Mar 7 16:22:39 2023 -0600 wifi: ath11k: Replace fake flex-array with flexible-array member Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Address 25 of the following warnings found with GCC-13 and -fstrict-flex-arrays=3 enabled: drivers/net/wireless/ath/ath11k/debugfs_htt_stats.c:30:51: warning: array subscript is outside array bounds of ‘const u32[0]’ {aka ‘const unsigned int[]’} [-Warray-bounds=] This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/266 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/ZAe5L5DtmsQxzqRH@work commit 488d9a484f96eee4f0e8e108aed42a057a1c7295 Author: Harshit Mogalapalli Date: Tue Mar 7 02:47:06 2023 -0800 wifi: ath12k: Add missing unwind goto in ath12k_pci_probe() Smatch Warns: drivers/net/wireless/ath/ath12k/pci.c:1198 ath12k_pci_probe() warn: missing unwind goto? Store the error value in ret and use correct label with a goto. Only Compile tested, found with Smatch. Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Reported-by: Dan Carpenter Link: https://lore.kernel.org/all/Y+426q6cfkEdb5Bv@kili/ Suggested-by: Dan Carpenter Signed-off-by: Harshit Mogalapalli Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230307104706.240119-1-harshit.m.mogalapalli@oracle.com commit f94557154d9fc77c392844523388edd4661a27a3 Author: Vladimir Lypak Date: Sat Mar 11 20:36:47 2023 +0530 wifi: wcn36xx: add support for pronto-v3 Pronto v3 has a different DXE address than prior Pronto versions. This patch changes the macro to return the correct register address based on the pronto version. Signed-off-by: Vladimir Lypak Signed-off-by: Sireesh Kodali Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230311150647.22935-2-sireeshkodali1@gmail.com commit f94d7a3a51070d185e9203b53a3d669e27931e3d Author: Bastian Germann Date: Mon Mar 6 13:50:40 2023 +0100 wifi: ath9k: Remove Qwest/Actiontec 802AIN ID The USB device 1668:1200 is Qwest/Actiontec 802AIN which is also correctly claimed to be supported by carl9170. Supposedly, the successor 802AIN2 has an ath9k compatible chip whose USB ID (unknown) could be inserted instead. Drop the ID from the wrong driver. I happened to find this by chance while packaging the ath9k and carl9170 firmware for Debian. Signed-off-by: Bastian Germann Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230306125041.2221-1-bage@debian.org commit 5b3b3e35ac6b07ee45acabecb789079baa845f90 Author: Andy Shevchenko Date: Wed Nov 30 17:55:17 2022 +0200 Documentation: gpio: Input mode is not true Hi-Z The true Hi-Z (a.k.a. high impedance) mode is when pin is completely disconnected from the chip. This includes input buffer as well. Nevertheless, some hardware may not support that mode and they are considering input only as Hi-Z, but more precisely it is an equivalent to that, in electronics it's basically "an antenna mode". Sligthly correct documentation to take the above into consideration. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit db4064cc108214bf0912b89c7e660c7d9d6bba1d Author: Andy Shevchenko Date: Thu Mar 9 20:58:19 2023 +0200 gpiolib: Use IRQ hardware number getter instead of direct access IRQ framework provides special type and getter to transform the Linux IRQ to the hardware pin. Use that type and getter function instead of direct access. While at it, amend an indentation in a couple of places. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 3b50d9a174575473cc5ed8eba3570e02ea3d0733 Author: Lukas Bulwahn Date: Tue Mar 14 05:18:48 2023 +0100 MAINTAINERS: adjust file entries after wifi driver movement Commit f79cbc77abde ("wifi: move mac80211_hwsim and virt_wifi to virtual directory") and commit 298e50ad8eb8 ("wifi: move raycs, wl3501 and rndis_wlan to legacy directory") move remaining wireless drivers into subdirectories, but does not adjust the entries in MAINTAINERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about broken references. Repair these file references in those wireless driver sections. Signed-off-by: Lukas Bulwahn Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230314041848.5120-1-lukas.bulwahn@gmail.com commit c122f461ccac0e78e8e45d4f6de14e58942572f6 Author: Andy Shevchenko Date: Thu Mar 9 20:56:26 2023 +0200 gpiolib: Remove duplicative check in gpiod_find_and_request() The gpiod_find_by_fwnode() already checks for NULL and returns correct error code in case fwnode is invalid. Drop the respective check and assignment in the gpiod_find_and_request(). Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 7aa90f9055c16c79c0ad174c726f95723d122fe6 Author: Andy Shevchenko Date: Tue Mar 7 20:25:57 2023 +0200 gpiolib: Move gpiodevice_*() to gpiodev namespace The functions that operates on the same device object would have the same namespace for better code understanding and maintenance. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 5b0ad5b24327d44b8307e822d160a3d48a70e87c Author: Rob Herring Date: Tue Mar 14 10:41:17 2023 -0500 gpio: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 0c5ebb4c03308c0a544b5c1e0a33f0a63c40bc7e Author: Andy Shevchenko Date: Thu Mar 9 20:56:00 2023 +0200 gpiolib: Get rid of devprop prefix in one function The devprop prefix in the devprop_gpiochip_set_names() adds confusion. Get rid of it. Note we have more than one function in the same module that handles one or more device properties. This change will unify the naming schema for all of them. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit cf67efd1ae74a7448084b8f167f7feaf99513957 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:13:07 2023 +0100 gpio: raspberrypi-exp: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/gpio/gpio-raspberrypi-exp.c:237:34: error: ‘rpi_exp_gpio_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit c5521bda998ae434d67daae9310692b21c2b941a Author: Krzysztof Kozlowski Date: Sat Mar 11 12:13:06 2023 +0100 gpio: xra1403: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/gpio/gpio-xra1403.c:198:34: error: ‘xra1403_spi_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 87cb1f51db8619c2e8af250ff2642514c326302b Author: Krzysztof Kozlowski Date: Sat Mar 11 12:13:05 2023 +0100 gpio: sama5d2-piobu: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/gpio/gpio-sama5d2-piobu.c:230:34: error: ‘sama5d2_piobu_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 6ae42529547a4f3296fcecbfa3d2cf21c7196773 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:13:04 2023 +0100 gpio: sifive: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/gpio/gpio-sifive.c:263:34: error: ‘sifive_gpio_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit b39cf819f625eeccfc013bc0ceea5075e0a4bd22 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:13:03 2023 +0100 gpio: visconti: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/gpio/gpio-visconti.c:187:34: error: ‘visconti_gpio_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 072de5a412cc0601c4802e0ed62cbc5ed781d68c Author: Krzysztof Kozlowski Date: Sat Mar 11 12:13:02 2023 +0100 gpio: rcar: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/gpio/gpio-rcar.c:435:34: error: ‘gpio_rcar_of_table’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 13577824bded9fefbf627adef21d4cc3cbae799a Author: Krzysztof Kozlowski Date: Sat Mar 11 12:13:01 2023 +0100 gpio: altera: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/gpio/gpio-altera.c:324:34: error: ‘altera_gpio_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 886b33346d50a625cb882782eee7199f3040c90e Author: Krzysztof Kozlowski Date: Sat Mar 11 12:13:00 2023 +0100 gpio: ftgpio010: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/gpio/gpio-ftgpio010.c:336:34: error: ‘ftgpio_gpio_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 0db9d2bbd9bf5f03781a1bb3aabb71d71697d3c8 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:25:13 2023 +0100 MAINTAINERS: gpio: xra1403: drop Semi Malinen Emails bounce: 550 5.1.1 No such user - pp Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski commit e2945e6c5111726536c6046eaa1b840636e066a8 Author: Fabio Estevam Date: Tue Mar 14 08:17:24 2023 -0300 drm/panel: seiko-43wvf1g: Add the 'enable-gpios' property Sometimes a GPIO is needed to turn on/off the display. Add support for this usecase by introducing the optional 'enable-gpios' property. Tested on a imx53qsb board. Signed-off-by: Fabio Estevam Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230314111724.1520178-2-festevam@denx.de commit 1afdbd475adc609d829e560389d33eb90501660f Author: Fabio Estevam Date: Tue Mar 14 08:17:23 2023 -0300 dt-bindings: display: seiko,43wvf1g: Add the 'enable-gpios' property Add an optional 'enable-gpios' property that can be used to turn on/off the display. Signed-off-by: Fabio Estevam Acked-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230314111724.1520178-1-festevam@denx.de commit 6069b66cd9622c4b29817d4e19737e6f023b909a Author: Ruihai Zhou Date: Tue Mar 14 17:05:49 2023 +0800 drm/panel: support for STARRY 2081101QFH032011-53G MIPI-DSI panel The STARRY 2081101QFH032011-53G is a 10.1" WUXGA TFT LCD panel, which fits in nicely with the existing panel-boe-tv101wum-nl6 driver. Hence, we add a new compatible with panel specific config. Signed-off-by: Ruihai Zhou Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230314090549.11418-1-zhouruihai@huaqin.corp-partner.google.com commit c4969c95266c672b5dc0c6a1ac070b6d647fea22 Author: Ruihai Zhou Date: Tue Mar 14 16:50:34 2023 +0800 dt-bindings: display: panel: Add compatible for Starry 2081101QFH032011-53G The STARRY 2081101QFH032011-53G is a 10.1" WUXGA TFT LCD panel, which fits in nicely with the existing panel-boe-tv101wum-nl6 driver. Hence, we add a new compatible with panel specific config. Signed-off-by: Ruihai Zhou Acked-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230314085034.6380-1-zhouruihai@huaqin.corp-partner.google.com commit b28ee4476219b47604b860bd579bd9ce3979a67e Author: Liu Ying Date: Mon Mar 13 13:59:51 2023 +0800 MAINTAINERS: Add include/drm/drm_bridge.h to DRM DRIVERS FOR BRIDGE CHIPS Appropriate maintainers should be suggested for changes to the include/drm/drm_bridge.h header file, so add the header file to the 'DRM DRIVERS FOR BRIDGE CHIPS' section. Signed-off-by: Liu Ying Acked-by: Robert Foss Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230313055951.2997299-1-victor.liu@nxp.com commit a02d83f9947d8f71904eda4de046630c3eb6802c Author: Alexander Mikhalitsyn Date: Mon Mar 13 12:32:11 2023 +0100 scm: fix MSG_CTRUNC setting condition for SO_PASSSEC Currently, kernel would set MSG_CTRUNC flag if msg_control buffer wasn't provided and SO_PASSCRED was set or if there was pending SCM_RIGHTS. For some reason we have no corresponding check for SO_PASSSEC. In the recvmsg(2) doc we have: MSG_CTRUNC indicates that some control data was discarded due to lack of space in the buffer for ancillary data. So, we need to set MSG_CTRUNC flag for all types of SCM. This change can break applications those don't check MSG_CTRUNC flag. Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Leon Romanovsky Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Alexander Mikhalitsyn v2: - commit message was rewritten according to Eric's suggestion Acked-by: Paul Moore Signed-off-by: David S. Miller commit c4216a83078bc46f9e0475ff810a0a798572b0ec Merge: 45ef71d108e6f 298c91dc40e51 Author: David S. Miller Date: Wed Mar 15 08:18:35 2023 +0000 Merge branch 'net-smc-updates' Wenjia Zhang says: ==================== smc: Updates 2023-03-01 The 1st patch is to make implements later do not need to adhere to a specific SEID format. The 2nd patch does some cleanup. ==================== Signed-off-by: David S. Miller commit 298c91dc40e51395198533433716d0521ed10995 Author: Stefan Raspl Date: Mon Mar 13 11:10:32 2023 +0100 net/ism: Remove extra include Signed-off-by: Stefan Raspl Signed-off-by: Wenjia Zhang Reviewed-by: Tony Lu Signed-off-by: David S. Miller commit f947568e258038d3c2f8f38a9a7dabaca36643ec Author: Stefan Raspl Date: Mon Mar 13 11:10:31 2023 +0100 net/smc: Introduce explicit check for v2 support Previously, v2 support was derived from a very specific format of the SEID as part of the SMC-D codebase. Make this part of the SMC-D device API, so implementers do not need to adhere to a specific SEID format. Signed-off-by: Stefan Raspl Reviewed-and-tested-by: Jan Karcher Reviewed-by: Wenjia Zhang Signed-off-by: Wenjia Zhang Reviewed-by: Tony Lu Signed-off-by: David S. Miller commit 45ef71d108e6f1545e2981d8af03be13f2e39411 Author: Josef Miegl Date: Sun Mar 12 17:45:57 2023 +0100 net: geneve: set IFF_POINTOPOINT with IFLA_GENEVE_INNER_PROTO_INHERIT The GENEVE tunnel used with IFLA_GENEVE_INNER_PROTO_INHERIT is point-to-point, so set IFF_POINTOPOINT to reflect that. Signed-off-by: Josef Miegl Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 613a3c44a3737c9a2dfd9f70f9b79427459bb745 Author: Krzysztof Kozlowski Date: Sat Mar 11 18:33:03 2023 +0100 net: ieee802154: ca8210: drop owner from driver Core already sets owner in spi_driver. Signed-off-by: Krzysztof Kozlowski Acked-by: Stefan Schmidt Signed-off-by: David S. Miller commit 059fa99723405b47833c7e14e062c7ba7066ca3c Author: Krzysztof Kozlowski Date: Sat Mar 11 18:33:02 2023 +0100 net: ieee802154: adf7242: drop owner from driver Core already sets owner in spi_driver. Signed-off-by: Krzysztof Kozlowski Acked-by: Michael Hennerich Signed-off-by: David S. Miller commit cdfe4fc4d946e2a5d589f73985043674cf298ff6 Author: Krzysztof Kozlowski Date: Sat Mar 11 18:33:01 2023 +0100 net: ieee802154: ca8210: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/net/ieee802154/ca8210.c:3174:34: error: ‘ca8210_of_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Stefan Schmidt Signed-off-by: David S. Miller commit 32b7030681a488186bf1753b29a170f5d4644721 Author: Krzysztof Kozlowski Date: Sat Mar 11 18:33:00 2023 +0100 net: ieee802154: at86rf230: drop of_match_ptr for ID table The driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/net/ieee802154/at86rf230.c:1644:34: error: ‘at86rf230_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Stefan Schmidt Signed-off-by: David S. Miller commit 3896c40b7824c8874963e257afc0f464200d2d2c Author: Krzysztof Kozlowski Date: Sat Mar 11 18:32:59 2023 +0100 net: ieee802154: mcr20a: drop of_match_ptr for ID table The driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/net/ieee802154/mcr20a.c:1340:34: error: ‘mcr20a_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Stefan Schmidt Signed-off-by: David S. Miller commit 3df09beef650af667be5ec7eee88629e6e479a51 Author: Krzysztof Kozlowski Date: Sat Mar 11 18:32:58 2023 +0100 net: ieee802154: adf7242: drop of_match_ptr for ID table The driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/net/ieee802154/adf7242.c:1322:34: error: ‘adf7242_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Michael Hennerich Signed-off-by: David S. Miller commit b0b7d1b6260b3acb9f3f3bc7f3ca88a8898e95b1 Author: Krzysztof Kozlowski Date: Sat Mar 11 18:32:57 2023 +0100 net: phy: ks8995: drop of_match_ptr for ID table The driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/net/phy/spi_ks8995.c:156:34: error: ‘ks8895_spi_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 0f17b42827ae63aaf08cad875d9575b1bca1e066 Author: Krzysztof Kozlowski Date: Sat Mar 11 18:32:56 2023 +0100 net: dsa: ocelot: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/net/dsa/ocelot/ocelot_ext.c:143:34: error: ‘ocelot_ext_switch_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Colin Foster Signed-off-by: David S. Miller commit 00923ff2e1baf6bc9832f12e44f73439de5fcd72 Author: Krzysztof Kozlowski Date: Sat Mar 11 18:32:55 2023 +0100 net: dsa: ksz9477: drop of_match_ptr for ID table The driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/net/dsa/microchip/ksz9477_i2c.c:84:34: error: ‘ksz9477_dt_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 1eb8566dd08db9c7402a26b027086eaabc20ff2a Author: Krzysztof Kozlowski Date: Sat Mar 11 18:32:54 2023 +0100 net: dsa: seville_vsc9953: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/net/dsa/ocelot/seville_vsc9953.c:1070:34: error: ‘seville_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit ced5c5a0a2ea5eec6ed6cf1fcdde719fdafed82c Author: Krzysztof Kozlowski Date: Sat Mar 11 18:32:53 2023 +0100 net: dsa: lan9303: drop of_match_ptr for ID table The driver will match mostly or only by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/net/dsa/lan9303_i2c.c:97:34: error: ‘lan9303_i2c_of_match’ defined but not used [-Werror=unused-const-variable=] drivers/net/dsa/lan9303_mdio.c:157:34: error: ‘lan9303_mdio_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 6ea1e67788f30710d1991de42802cbdeb67afec4 Author: Krzysztof Kozlowski Date: Sat Mar 11 18:32:52 2023 +0100 net: dsa: lantiq_gswip: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/net/dsa/lantiq_gswip.c:1888:34: error: ‘xway_gphy_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit a52ed50a04de179cc866c18bdd1b9a2f59d6bdfc Author: Krzysztof Kozlowski Date: Sat Mar 11 12:13:28 2023 +0100 nfc: trf7970a: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/nfc/trf7970a.c:2232:34: error: ‘trf7970a_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Simon Horman Reviewed-by: Mark Greer Signed-off-by: David S. Miller commit 7e9aa8cad0844b85a6877cd072c95ac2844eb666 Author: Krzysztof Kozlowski Date: Fri Mar 10 22:46:32 2023 +0100 net: ni: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). drivers/net/ethernet/ni/nixge.c:1253:34: error: ‘nixge_dt_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 7f319fe4363c613f8b00b4bfab66c3659c38378b Author: Krzysztof Kozlowski Date: Fri Mar 10 22:46:31 2023 +0100 net: samsung: sxgbe: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:220:34: error: ‘sxgbe_dt_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 69df36d524dbb6f0692252c5f9d41bed9a064ff5 Author: Krzysztof Kozlowski Date: Fri Mar 10 22:46:30 2023 +0100 net: marvell: pxa168_eth: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). drivers/net/ethernet/marvell/pxa168_eth.c:1575:34: error: ‘pxa168_eth_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit e6512465838bf634d147399c8c96612d3cb419b9 Author: Krzysztof Kozlowski Date: Fri Mar 10 22:46:29 2023 +0100 net: stmmac: generic: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c:72:34: error: ‘dwmac_generic_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit dc54e450a5dd0fd9147dc9fea0684293569d3609 Author: Krzysztof Kozlowski Date: Fri Mar 10 22:46:28 2023 +0100 net: stmmac: qcom: drop of_match_ptr for ID table The driver is specific to ARCH_QCOM which depends on OF thus the driver is OF-only. Its of_device_id table is built unconditionally, thus of_match_ptr() for ID table does not make sense. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit c0a274151d3970ec7f3d07c8a1292733ed17d612 Merge: 575942a2e2d31 c570f861fa059 Author: David S. Miller Date: Wed Mar 15 08:00:35 2023 +0000 Merge branch 'dsa-microchip-tc-ets' Oleksij Rempel says: ==================== net: dsa: microchip: tc-ets support changes v3: - add tc_ets_supported to match supported devices - dynamically regenerated default TC to queue map. - add Acked-by to the first patch changes v2: - run egress limit configuration on all queue separately. Otherwise configuration may not apply correctly. ==================== Signed-off-by: David S. Miller commit c570f861fa059ea653599415a7c8cc1dfaf16763 Author: Oleksij Rempel Date: Fri Mar 10 10:08:09 2023 +0100 net: dsa: microchip: add ETS Qdisc support for KSZ9477 series Add ETS Qdisc support for KSZ9477 of switches. Current implementation is limited to strict priority mode. Tested on KSZ8563R with following configuration: tc qdisc replace dev lan2 root handle 1: ets strict 4 \ priomap 3 3 2 2 1 1 0 0 ip link add link lan2 name v1 type vlan id 1 \ egress-qos-map 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 and patched iperf3 version: https://github.com/esnet/iperf/pull/1476 iperf3 -c 172.17.0.1 -b100M -l1472 -t100 -u -R --sock-prio 2 Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Signed-off-by: David S. Miller commit 69444581d0022b8afced2c90c441b7b4d9b8eba9 Author: Oleksij Rempel Date: Fri Mar 10 10:08:08 2023 +0100 net: dsa: microchip: add ksz_setup_tc_mode() function Add ksz_setup_tc_mode() to make queue scheduling and shaping configuration more visible. Signed-off-by: Oleksij Rempel Acked-by: Arun Ramadoss Signed-off-by: David S. Miller commit 74e60b8b2f0fe3702710e648a31725ee8224dbdf Author: Andy Shevchenko Date: Tue Mar 14 17:09:06 2023 +0200 fs/namespace: fnic: Switch to use %ptTd Use %ptTd instead of open-coded variant to print contents of time64_t type in human readable form. Signed-off-by: Andy Shevchenko Signed-off-by: Christian Brauner (Microsoft) commit 56af59fc0be3fda8d8a32ed996dfb84758d4f431 Author: Heiko Stuebner Date: Tue Mar 7 10:55:16 2023 +0100 ARM: dts: rockchip: Add mmc aliases for rk3288-veyron devices All of them have an internal emmc that becomes mmc0 and devices including the sdmmc snippet get mmc1 for the external sd slot on suitable devices. Reviewed-by: Douglas Anderson Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230307095516.4116827-1-heiko@sntech.de commit c6629b9a6738a64507478527da6c7b83c10a6d2c Author: Vasily Khoruzhick Date: Tue Mar 7 22:32:40 2023 -0800 arm64: dts: rockchip: Add FriendlyElec Nanopi R5S FriendlyElec Nanopi R5S is an open-sourced mini IoT gateway device. Board Specifications - Rockchip RK3568 - 2 or 4GB LPDDR4X - 8GB or 16GB eMMC, SD card slot - GbE LAN (Native) - 2x 2.5G LAN (PCIe) - M.2 Connector - HDMI 2.0, MIPI DSI/CSI - 2xUSB 3.0 Host - USB Type C PD, 5V/9V/12V - GPIO: 12-pin 0.5mm FPC connector Based on Tianling Shen's work. Signed-off-by: Vasily Khoruzhick Link: https://lore.kernel.org/r/20230308063240.107178-2-anarsoul@gmail.com Signed-off-by: Heiko Stuebner commit fd7370159c36b925c842ae1c2400d4729451ec82 Author: Vasily Khoruzhick Date: Tue Mar 7 22:32:39 2023 -0800 dt-bindings: Add doc for FriendlyARM NanoPi R5S Add devicetree binding documentation for the FriendlyARM NanoPi R5S. Signed-off-by: Vasily Khoruzhick Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230308063240.107178-1-anarsoul@gmail.com Signed-off-by: Heiko Stuebner commit 04d5529935229a709d6facb8a80168cc0976c89a Author: Yixun Lan Date: Wed Mar 15 11:34:41 2023 +0800 arm64: dts: rockchip: Add Khadas edge2 board Edge2 is an ultraslim, credit-card sized ARM PC designed by Khadas. In this patch, we will add basic device tree support for this board, Only eMMC, UART are enabled, so it's capable of booting into a basic linux system from eMMC via serial console. Signed-off-by: Yixun Lan Link: https://lore.kernel.org/r/20230315033441.32719-3-dlan@gentoo.org Signed-off-by: Heiko Stuebner commit 5a6d76761225bfa31d114f434b990fa2ed9b04c5 Author: Yixun Lan Date: Wed Mar 15 11:34:40 2023 +0800 dt-bindings: arm: rockchip: Add Khadas Edge2 board Edge2 is an ultraslim, credit-card sized ARM PC designed by Khadas. It has quite a few rich peripherals. Specification: - Rockchip RK3588s - 8/16GB LPDDR4 - 32/64GB eMMC 5.1 - AP6275P WiFi6 LAN - HDMI2.1 Type-A - MIPI-CSI x3 - MIPI-DSI x2 - usb3.1; usb2.0 - RTC clock - PWM fan - SPI Flash - Pads expansion board (UART, USB) Signed-off-by: Yixun Lan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230315033441.32719-2-dlan@gentoo.org Signed-off-by: Heiko Stuebner commit 575942a2e2d311c7f5abe17f9958abab45604cbd Merge: 68a84a127bb07 c486640aa710d Author: Jakub Kicinski Date: Wed Mar 15 00:37:34 2023 -0700 Merge branch 'ipv6-optimize-rt6_score_route' Eric Dumazet says: ==================== ipv6: optimize rt6_score_route() This patch series remove an expensive rwlock acquisition in rt6_check_neigh()/rt6_score_route(). First patch adds missing annotations, and second patch implements the optimization. ==================== Link: https://lore.kernel.org/r/20230313201732.887488-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit c486640aa710ddd06c13a7f7162126e1552e8842 Author: Eric Dumazet Date: Mon Mar 13 20:17:32 2023 +0000 ipv6: remove one read_lock()/read_unlock() pair in rt6_check_neigh() rt6_check_neigh() uses read_lock() to protect n->nud_state reading. This seems overkill and causes false sharing. Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Reviewed-by: Martin KaFai Lau Signed-off-by: Jakub Kicinski commit b071af523579df7341cabf0f16fc661125e9a13f Author: Eric Dumazet Date: Mon Mar 13 20:17:31 2023 +0000 neighbour: annotate lockless accesses to n->nud_state We have many lockless accesses to n->nud_state. Before adding another one in the following patch, add annotations to readers and writers. Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Reviewed-by: Martin KaFai Lau Signed-off-by: Jakub Kicinski commit 68a84a127bb07d2a47e95c808520f742c54781c7 Author: Horatiu Vultur Date: Sun Mar 12 20:51:55 2023 +0100 net: lan966x: Change lan966x_police_del return type As the function always returns 0 change the return type to be void instead of int. In this way also remove a wrong message in case of error which would never happen. Signed-off-by: Horatiu Vultur Reviewed-by: Alvin Šipraga Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230312195155.1492881-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski commit 8bf6e20253b2d2b614f2c0b491f840e956fa6b05 Merge: faf0d83e103e3 4b736ed405836 Author: Dave Airlie Date: Wed Mar 15 14:59:19 2023 +1000 Merge tag 'drm-intel-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Cross-subsystem Changes: - MEI patches to fix suspend/resume issues with the i915's PXP. (Alexander) Driver Changes: - Registers helpers and clean-ups. (Lucas) - PXP fixes and clean-ups. (Alan, Alexander) - CDCLK related fixes and w/a (Chaitanya, Stanislav) - Move display code to use RMW whenever possible (Andrzej) - PSR fixes (Jouni, Ville) - Implement async_flip mode per plane tracking (Andrzej) - Remove pre-production Workarounds (Matt) - HDMI related fixes (Ankit) - LVDS cleanup (Ville) - Watermark fixes and cleanups (Ville, Jani, Stanilav) - DMC code related fixes, cleanups and improvements (Jani) - Implement fb_dirty for PSR,FBC,DRRS fixes (Jouni) - Initial DSB improvements targeting LUTs loading (Ville) - HWMON related fixes (Ashutosh) - PCI ID updates (Jonathan, Matt Roper) - Fix leak in scatterlist (Matt Atwood) - Fix eDP+DSI dual panel systems (Ville) - Cast iomem to avoid sparese warnings (Jani) - Set default backlight controller index (Jani) - More MTL enabling (RK) - Conversion of display dev_priv towards i915 (Nirmoy) - Improvements in log/debug messages (Ville) - Increase slice_height for DP VDSC (Suraj) - VBT ports improvements (Ville) - Fix platforms without Display (Imre) - Other generic display code clean-ups (Ville, Jani, Rodrigo) - Add RPL-U sub platform (Chaitanya) - Add inverted backlight quirk for HP 14-r206nv (Mavroudis) - Transcoder timing improvements (Ville) - Track audio state per-transcoder (Ville) - Error/underrun interrupt fixes (Ville) - Update combo PHY init sequence (Matt Roper) - Get HDR DPCD refresh timeout (Ville) - Vblank improvements (Ville) - DSS fixes and cleanups (Jani) - PM code cleanup (Jani) - Split display parts related to RPS (Jani) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ZAez4aekcob8fTeh@intel.com commit b20f67994f35d75758ff671cd5095ec0cfab6ff9 Author: Andrew Jones Date: Fri Feb 24 17:26:31 2023 +0100 RISC-V: KVM: Expose Zicboz to the guest Guests may use the cbo.zero instruction when the CPU has the Zicboz extension and the hypervisor sets henvcfg.CBZE. Add Zicboz support for KVM guests which may be enabled and disabled from KVM userspace using the ISA extension ONE_REG API. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20230224162631.405473-9-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 665fd8862413f21cd924fc121eadcd32ea122c52 Author: Andrew Jones Date: Fri Feb 24 17:26:30 2023 +0100 RISC-V: KVM: Provide UAPI for Zicboz block size We're about to allow guests to use the Zicboz extension. KVM userspace needs to know the cache block size in order to properly advertise it to the guest. Provide a virtual config register for userspace to get it with the GET_ONE_REG API, but setting it cannot be supported, so disallow SET_ONE_REG. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Reviewed-by: Anup Patel Link: https://lore.kernel.org/r/20230224162631.405473-8-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit ab0f77465e3e4ec2d2583cd770b157b16cc22844 Author: Andrew Jones Date: Fri Feb 24 17:26:29 2023 +0100 RISC-V: Use Zicboz in clear_page when available Using memset() to zero a 4K page takes 563 total instructions, where 20 are branches. clear_page(), with Zicboz and a 64 byte block size, takes 169 total instructions, where 4 are branches and 33 are nops. Even though the block size is a variable, thanks to alternatives, we can still implement a Duff device without having to do any preliminary calculations. This is achieved by using the alternatives' cpufeature value (the upper 16 bits of patch_id). The value used is the maximum zicboz block size order accepted at the patch site. This enables us to stop patching / unrolling when 4K bytes have been zeroed (we would loop and continue after 4K if the page size would be larger) For 4K pages, unrolling 16 times allows block sizes of 64 and 128 to only loop a few times and larger block sizes to not loop at all. Since cbo.zero doesn't take an offset, we also need an 'add' after each instruction, making the loop body 112 to 160 bytes. Hopefully this is small enough to not cause icache misses. Signed-off-by: Andrew Jones Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230224162631.405473-7-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit d25f256332cc795b0fe16ba541fe0c05f0eb2c59 Author: Andrew Jones Date: Fri Feb 24 17:26:28 2023 +0100 RISC-V: cpufeatures: Put the upper 16 bits of patch ID to work cpufeature IDs are consecutive integers starting at 26, so a 32-bit patch ID allows an aircraft carrier load of feature IDs. Repurposing the upper 16 bits still leaves a boat load of feature IDs and gains 16 bits which may be used to control patching on a per patch-site basis. This will be initially used in Zicboz's application to clear_page(), as Zicboz's block size must also be considered. In that case, the upper 16-bit value's role will be to convey the maximum block size which the Zicboz clear_page() implementation supports. cpufeature patch sites which need to check for the existence or absence of other cpufeatures may also be able to make use of this. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230224162631.405473-6-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 7ea5a73617e931230a46150dc7c1bbfd98f24c8e Author: Andrew Jones Date: Fri Feb 24 17:26:27 2023 +0100 RISC-V: Add Zicboz detection and block size parsing Parse "riscv,cboz-block-size" from the DT by piggybacking on Zicbom's riscv_init_cbom_blocksize(). Additionally check the DT for the presence of the "zicboz" extension and, when it's present, validate the parsed cboz block size as we do Zicbom's cbom block size with riscv_isa_extension_check(). Signed-off-by: Andrew Jones Reviewed-by: Heiko Stuebner Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230224162631.405473-5-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit ea20f117ab99d7c7653df656ddb795e51d9f7733 Author: Andrew Jones Date: Fri Feb 24 17:26:26 2023 +0100 dt-bindings: riscv: Document cboz-block-size The Zicboz operation (cbo.zero) operates on a block-size defined for the cpu-core. While we already have the riscv,cbom-block-size property, it only provides the block size for Zicbom operations. Even though it's likely Zicboz and Zicbom will use the same size, that's not required by the specification. Create another property specifically for Zicboz. Cc: Rob Herring Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230224162631.405473-4-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 8b05e7d0408ac99e2f05f3673f2f249e9a9e10ec Author: Andrew Jones Date: Fri Feb 24 17:26:25 2023 +0100 RISC-V: Factor out body of riscv_init_cbom_blocksize loop Refactor riscv_init_cbom_blocksize() to prepare for it to be used for both cbom block size and cboz block size. Signed-off-by: Andrew Jones Reviewed-by: Heiko Stuebner Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230224162631.405473-3-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 0b2f658f5370d9818244682c76fd8f6a91b2b1af Author: Andrew Jones Date: Fri Feb 24 17:26:24 2023 +0100 RISC-V: alternatives: Support patching multiple insns in assembly As pointed out in commit d374a16539b1 ("RISC-V: fix compile error from deduplicated __ALTERNATIVE_CFG_2"), we need quotes around parameters passed to macros within macros to avoid spaces being interpreted as separators. ALT_NEW_CONTENT was trying to handle this by defining new_c has a vararg, but this isn't sufficient for calling ALTERNATIVE() from assembly with multiple instructions in the new/old sequences. Remove the vararg "hack" and use quotes. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20230224162631.405473-2-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 73bde0ca0ab5923d4a4bef1580db500065d350fb Merge: 4a4c459872f15 816a69744102b Author: Palmer Dabbelt Date: Tue Mar 14 20:51:34 2023 -0700 Merge patch series "riscv: alternative/cpufeature related cleanups" Andrew Jones says: This series has no intended functional change. These cleanups were found while renaming errata_id to patch_id in order to better convey that its purpose is larger than errata (it's also for cpufeatures). * b4-shazam-merge: riscv: cpufeature: Drop errata_list.h and other unused includes riscv: lib: Include hwcap.h directly riscv: alternatives: Rename errata_id to patch_id riscv: alternatives: Remove unnecessary define and unused struct riscv: Rename Kconfig.erratas to Kconfig.errata riscv: Clarify RISCV_ALTERNATIVE help text Link: https://lore.kernel.org/r/20230224154601.88163-1-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 816a69744102bc886edc3557d00e840e3e35e7d5 Author: Andrew Jones Date: Fri Feb 24 16:46:01 2023 +0100 riscv: cpufeature: Drop errata_list.h and other unused includes Drop errata_list.h, since cpufeature.c includes hwcap.h directly to get cpufeature IDs. And, while there, prune the rest of the unused includes too. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230224154601.88163-7-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 28ea374da1d94dfe1253b83aa2d16b5a97fb7c4e Author: Andrew Jones Date: Fri Feb 24 16:46:00 2023 +0100 riscv: lib: Include hwcap.h directly When using alternatives for cpufeatures we should include hwcap.h directly, rather than through errata_list.h. Opportunistically drop an unused include too. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230224154601.88163-6-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit ff19a8dee196d757dbc32a946843260f0b784ca3 Author: Andrew Jones Date: Fri Feb 24 16:45:59 2023 +0100 riscv: alternatives: Rename errata_id to patch_id Alternatives are used for both errata and cpufeatures. Use a more generic name, 'patch_id', as in "ID of code patching site", to avoid confusion when alternatives are used for cpufeatures. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230224154601.88163-5-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit ce06b42a4a96d46d4844f2b630af7d349a924a58 Author: Andrew Jones Date: Fri Feb 24 16:45:58 2023 +0100 riscv: alternatives: Remove unnecessary define and unused struct A define and a struct were introduced with commit 6f4eea90465a ("riscv: Introduce alternative mechanism to apply errata solution"), which introduced alternatives to RISC-V. The define is used for an arbitrary string length, specific to sifive errata, so just use the number directly there instead. The struct has never been used, so remove it. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230224154601.88163-4-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit a3d095ac00faee0deb575ba053f0567b0d124d0b Author: Andrew Jones Date: Fri Feb 24 16:45:57 2023 +0100 riscv: Rename Kconfig.erratas to Kconfig.errata Errata is already plural for erratum. Rename it to make the grammar gooder. Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20230224154601.88163-3-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 099122af4e29efb41e0db6cc2cd5a07278250e4f Author: Andrew Jones Date: Fri Feb 24 16:45:56 2023 +0100 riscv: Clarify RISCV_ALTERNATIVE help text Clarify RISCV_ALTERNATIVE's help text by pointing out that code patching is not only done at boot time, but also module load time. Also point out that this is the minimal possible overhead. Signed-off-by: Andrew Jones Link: https://lore.kernel.org/r/20230224154601.88163-2-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit d0af0537e28f6eace02deed63b585396de939213 Author: Konrad Dybcio Date: Thu Mar 2 02:18:49 2023 +0100 arm64: dts: qcom: msm8996: Add missing DWC3 quirks Add missing dwc3 quirks from msm-3.18. Unfortunately, none of them make `dwc3-qcom 6af8800.usb: HS-PHY not in L2` go away. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230302011849.1873056-1-konrad.dybcio@linaro.org commit d39469f5ce81b2cabf07b1cad3deddeafb7b8a8d Author: Mukesh Ojha Date: Wed Feb 22 21:00:45 2023 +0530 arm64: dts: qcom: sm8450: Add IMEM and PIL info region Add a simple-mfd representing IMEM on SM8450 and define the PIL relocation info region, so that post mortem tools will be able to locate the loaded remoteprocs. Signed-off-by: Mukesh Ojha Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/1677079845-17650-1-git-send-email-quic_mojha@quicinc.com commit 5d793ff40692c9b3f88df1820a79ac8ae7d9c80b Author: Bartosz Golaszewski Date: Tue Feb 21 16:05:43 2023 +0100 arm64: dts: qcom: sa8775p: add cpufreq node Add a node for the cpufreq engine and specify the frequency domains for all CPUs. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230221150543.283487-3-brgl@bgdev.pl commit aec576821e6fd233ae895f4aa57ff1b511a71e8e Author: Krzysztof Kozlowski Date: Mon Feb 20 10:43:39 2023 +0100 arm64: dts: qcom: apq8096-db820c: fix indentation Correct indentation. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230220094339.47370-2-krzysztof.kozlowski@linaro.org commit 5a1816cc2d8caa054aa8b254efea9739aa8a68c6 Author: Krzysztof Kozlowski Date: Mon Feb 20 10:43:38 2023 +0100 arm64: dts: qcom: msm8996: move WCD9335 audio codec to boards The WCD9335 audio codec on Slimbus is a property of a board, not SoC, thus it should not be present in MSM8996 DTSI. Keep it in specific boards, so it won't appear incomplete in the boards not having it. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230220094339.47370-1-krzysztof.kozlowski@linaro.org commit 78c61b6b2c33041940f2b22b47b058e83684b3f5 Author: Konrad Dybcio Date: Thu Feb 16 15:56:46 2023 +0100 arm64: dts: qcom: sm8350: Add qcom,smmu-500 to Adreno SMMU Add the fallback Qualcomm SMMU500 compatible to the Adreno SMMU. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230216145646.4095336-5-konrad.dybcio@linaro.org commit 8347b12e905b99f445067d09326e4a1cc490f9cc Author: Konrad Dybcio Date: Thu Feb 16 15:56:45 2023 +0100 arm64: dts: qcom: sm8250: Add qcom,smmu-500 to Adreno SMMU Add the fallback Qualcomm SMMU500 compatible to the Adreno SMMU. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230216145646.4095336-4-konrad.dybcio@linaro.org commit 3e5c00256881f35b8664e1cf0b9fbf42cd9f24a1 Author: Konrad Dybcio Date: Thu Feb 16 15:56:44 2023 +0100 arm64: dts: qcom: sm8150: Add qcom,smmu-500 to Adreno SMMU Add the fallback Qualcomm SMMU500 compatible to the Adreno SMMU. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230216145646.4095336-3-konrad.dybcio@linaro.org commit c564b69984a78ce7811f22437794c9bb2afc11fd Author: Konrad Dybcio Date: Thu Feb 16 15:56:43 2023 +0100 arm64: dts: qcom: sc7280: Add qcom,smmu-500 to Adreno SMMU Add the fallback Qualcomm SMMU500 compatible to the Adreno SMMU. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230216145646.4095336-2-konrad.dybcio@linaro.org commit 0e6538e2d973bdfdf4d65a7d4b8baf1b7cdf75f0 Author: Manivannan Sadhasivam Date: Wed Feb 15 12:34:00 2023 +0530 arm64: dts: qcom: sm6115: Supply clock from cpufreq node to CPUs Qualcomm platforms making use of CPUFreq HW Engine (EPSS/OSM) supply clocks to the CPU cores. But this relationship is not represented in DTS so far. So let's make cpufreq node as the clock provider and CPU nodes as the consumers. The clock index for each CPU node is based on the frequency domain index. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230215070400.5901-13-manivannan.sadhasivam@linaro.org commit d9ab57eec39db8bf72951e00cde5ab117bcad6d8 Author: Manivannan Sadhasivam Date: Wed Feb 15 12:33:59 2023 +0530 arm64: dts: qcom: sm6375: Supply clock from cpufreq node to CPUs Qualcomm platforms making use of CPUFreq HW Engine (EPSS/OSM) supply clocks to the CPU cores. But this relationship is not represented in DTS so far. So let's make cpufreq node as the clock provider and CPU nodes as the consumers. The clock index for each CPU node is based on the frequency domain index. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230215070400.5901-12-manivannan.sadhasivam@linaro.org commit 2051f735b37d8e49f84914df11eb7b4a3a16349f Author: Manivannan Sadhasivam Date: Wed Feb 15 12:33:58 2023 +0530 arm64: dts: qcom: sc8280xp: Supply clock from cpufreq node to CPUs Qualcomm platforms making use of CPUFreq HW Engine (EPSS/OSM) supply clocks to the CPU cores. But this relationship is not represented in DTS so far. So let's make cpufreq node as the clock provider and CPU nodes as the consumers. The clock index for each CPU node is based on the frequency domain index. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230215070400.5901-11-manivannan.sadhasivam@linaro.org commit c2a18730f0aaa2088a259f123e5fedf05f8a7041 Author: Manivannan Sadhasivam Date: Wed Feb 15 12:33:57 2023 +0530 arm64: dts: qcom: sm8350: Supply clock from cpufreq node to CPUs Qualcomm platforms making use of CPUFreq HW Engine (EPSS/OSM) supply clocks to the CPU cores. But this relationship is not represented in DTS so far. So let's make cpufreq node as the clock provider and CPU nodes as the consumers. The clock index for each CPU node is based on the frequency domain index. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230215070400.5901-10-manivannan.sadhasivam@linaro.org commit fc7258948c4a9e5dd2670adfcc80b13c621fbcd1 Author: Manivannan Sadhasivam Date: Wed Feb 15 12:33:56 2023 +0530 arm64: dts: qcom: sm8150: Supply clock from cpufreq node to CPUs Qualcomm platforms making use of CPUFreq HW Engine (EPSS/OSM) supply clocks to the CPU cores. But this relationship is not represented in DTS so far. So let's make cpufreq node as the clock provider and CPU nodes as the consumers. The clock index for each CPU node is based on the frequency domain index. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230215070400.5901-9-manivannan.sadhasivam@linaro.org commit 7b39c98ff7e80f7e2bdf3c73829480e6ac123fb5 Author: Manivannan Sadhasivam Date: Wed Feb 15 12:33:55 2023 +0530 arm64: dts: qcom: sc7180: Supply clock from cpufreq node to CPUs Qualcomm platforms making use of CPUFreq HW Engine (EPSS/OSM) supply clocks to the CPU cores. But this relationship is not represented in DTS so far. So let's make cpufreq node as the clock provider and CPU nodes as the consumers. The clock index for each CPU node is based on the frequency domain index. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230215070400.5901-8-manivannan.sadhasivam@linaro.org commit fcca74d893f3511a1e95869b1b3db3abb69bfb3b Author: Manivannan Sadhasivam Date: Wed Feb 15 12:33:54 2023 +0530 arm64: dts: qcom: qdu1000: Supply clock from cpufreq node to CPUs Qualcomm platforms making use of CPUFreq HW Engine (EPSS/OSM) supply clocks to the CPU cores. But this relationship is not represented in DTS so far. So let's make cpufreq node as the clock provider and CPU nodes as the consumers. The clock index for each CPU node is based on the frequency domain index. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230215070400.5901-7-manivannan.sadhasivam@linaro.org commit d78cb07dbc1d384a8665b08918d188ee670ec45b Author: Manivannan Sadhasivam Date: Wed Feb 15 12:33:53 2023 +0530 arm64: dts: qcom: sm8250: Supply clock from cpufreq node to CPUs Qualcomm platforms making use of CPUFreq HW Engine (EPSS/OSM) supply clocks to the CPU cores. But this relationship is not represented in DTS so far. So let's make cpufreq node as the clock provider and CPU nodes as the consumers. The clock index for each CPU node is based on the frequency domain index. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230215070400.5901-6-manivannan.sadhasivam@linaro.org commit 1b0911fe3edb0895c43db4c19729b3c300028189 Author: Manivannan Sadhasivam Date: Wed Feb 15 12:33:52 2023 +0530 arm64: dts: qcom: sm8550: Supply clock from cpufreq node to CPUs Qualcomm platforms making use of CPUFreq HW Engine (EPSS/OSM) supply clocks to the CPU cores. But this relationship is not represented in DTS so far. So let's make cpufreq node as the clock provider and CPU nodes as the consumers. The clock index for each CPU node is based on the frequency domain index. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230215070400.5901-5-manivannan.sadhasivam@linaro.org commit afa34380d973491e87ab01d13c387528e2e1c476 Author: Manivannan Sadhasivam Date: Wed Feb 15 12:33:51 2023 +0530 arm64: dts: qcom: sm6350: Supply clock from cpufreq node to CPUs Qualcomm platforms making use of CPUFreq HW Engine (EPSS/OSM) supply clocks to the CPU cores. But this relationship is not represented in DTS so far. So let's make cpufreq node as the clock provider and CPU nodes as the consumers. The clock index for each CPU node is based on the frequency domain index. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230215070400.5901-4-manivannan.sadhasivam@linaro.org commit 667d8a2039608c4c848179cb45282204eadeb157 Author: Manivannan Sadhasivam Date: Wed Feb 15 12:33:50 2023 +0530 arm64: dts: qcom: sc7280: Supply clock from cpufreq node to CPUs Qualcomm platforms making use of CPUFreq HW Engine (EPSS/OSM) supply clocks to the CPU cores. But this relationship is not represented in DTS so far. So let's make cpufreq node as the clock provider and CPU nodes as the consumers. The clock index for each CPU node is based on the frequency domain index. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230215070400.5901-3-manivannan.sadhasivam@linaro.org commit 2af2ef08c0ba052aefca20609572d67e0633b1ef Author: Manivannan Sadhasivam Date: Wed Feb 15 12:33:49 2023 +0530 arm64: dts: qcom: sdm845: Supply clock from cpufreq node to CPUs Qualcomm platforms making use of CPUFreq HW Engine (EPSS/OSM) supply clocks to the CPU cores. But this relationship is not represented in DTS so far. So let's make cpufreq node as the clock provider and CPU nodes as the consumers. The clock index for each CPU node is based on the frequency domain index. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230215070400.5901-2-manivannan.sadhasivam@linaro.org commit 603f96d4c9d0cb42f934fb0b99440bb9e8ba4385 Author: Bartosz Golaszewski Date: Tue Feb 14 10:27:13 2023 +0100 arm64: dts: qcom: add initial support for qcom sa8775p-ride This adds basic support for the Qualcomm sa8775p platform and the reference board: sa8775p-ride. The dt files describe the basics of the SoC and enable booting to shell. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214092713.211054-3-brgl@bgdev.pl commit 0d589dc92fca4679186a949194fc7c452d37c575 Author: Konrad Dybcio Date: Tue Feb 14 10:08:49 2023 +0100 arm64: dts: qcom: pm8998: Add a specific compatible for coincell chg Add a PM8998-specific compatible to the coincell charger and keep the PM8941 one as fallback. Signed-off-by: Konrad Dybcio Reviewed-by: Marijn Suijten Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214090849.2186370-3-konrad.dybcio@linaro.org commit b5d08f08377218b1d2ab4026e427a7788b271c8e Author: Konrad Dybcio Date: Mon Feb 13 22:03:31 2023 +0100 arm64: dts: qcom: msm8998: Fix stm-stimulus-base reg name The name stm-data-base comes from ancient (msm-3.10 or older) downstream kernels. Upstream uses stm-stimulus-base instead. Fix it. Fixes: 783abfa2249a ("arm64: dts: qcom: msm8998: Add Coresight support") Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213210331.2106877-1-konrad.dybcio@linaro.org commit 5a0c6d4349a7da252c9fa5fbc3d42b4e5ee1f334 Author: Konrad Dybcio Date: Mon Feb 13 18:59:28 2023 +0100 arm64: dts: qcom: sm6375: Add RMTFS Add a node for RMTFS on SM6375. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213175928.1979637-1-konrad.dybcio@linaro.org commit d228efe884692742e3a614c2386ee006aeb6551d Author: Krzysztof Kozlowski Date: Fri Feb 10 17:38:44 2023 +0100 arm64: dts: qcom: sm8550-qrd: add QRD8550 Add a minimal DTS for the new QRD8550 board - a mobile-like development board with SM8550. Serial, UFS and USB should be working. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230210163844.765074-2-krzysztof.kozlowski@linaro.org commit 749078e38e1ee28357e8fdcd4eac382a465bd1e7 Author: Abel Vesa Date: Wed Feb 8 21:02:00 2023 +0200 arm64: dts: qcom: sm8550-mtp: Add eUSB2 repeater node Add the PMIC eUSB2 repeater node and add the usb-repeater property to the eUSB2 PHY to allow it to be controlled by the PHY driver. Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208190200.2966723-8-abel.vesa@linaro.org commit fdaa922585f4474c88fbfaa129f8114f38200660 Author: Neil Armstrong Date: Wed Feb 8 21:01:59 2023 +0200 arm64: dts: qcom: pm8550b: Add eUSB2 repeater node Add nodes for the eUSB2 repeater found on the pm8550b SPMI PMIC. Signed-off-by: Neil Armstrong Signed-off-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208190200.2966723-7-abel.vesa@linaro.org commit 32734bbd1802efbd60ea4f0c3c1d5500bd0b20fe Author: Abel Vesa Date: Wed Feb 8 20:00:20 2023 +0200 arm64: dts: qcom: sm8550: Fix PCIe PHYs and controllers nodes First, move the pinctrl related propeties out from SoC dtsi and into the board dts and add blank lines before status properties in the PHY nodes to be consistent with the rest of the nodes. Then drop the pipe clock from the controller nodes. Rename the aggre0 and aggre1 clocks to more generic noc_aggr, and then the cnoc_pcie_sf_axi to cnoc_sf_axi. Add the cpu-pcie interconnects to both controller nodes. Rename the pcie1 second reset to link_down and drop the unnecessary enable-gpios. Switch the aux clock to GCC_PCIE_1_PHY_AUX_CLK for the pcie1 PHY and drop the aux_phy from clock-names. Also rename the nocsr reset to phy_nocsr. With this changes we are now in line with the SC8280XP bindings. Fixes: 7d1158c984d3 ("arm64: dts: qcom: sm8550: Add PCIe PHYs and controllers nodes") Signed-off-by: Abel Vesa Reviewed-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208180020.2761766-12-abel.vesa@linaro.org commit f1d97a37f975ac615e4d6875c27516150642d499 Author: Yang Yingliang Date: Thu Dec 29 17:29:46 2022 +0800 clk: mediatek: clk-pllfh: fix missing of_node_put() in fhctl_parse_dt() The device_node pointer returned by of_find_compatible_node() with refcount incremented, when finish using it, the refcount need be decreased. Fixes: d7964de8a8ea ("clk: mediatek: Add new clock driver to handle FHCTL hardware") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20221229092946.4162345-1-yangyingliang@huawei.com [sboyd@kernel.org: Also unmap on error] Signed-off-by: Stephen Boyd commit d02fddf24f984b977633c56e10653a8ff19e8c7b Author: Rob Herring Date: Fri Mar 10 08:47:01 2023 -0600 clk: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144701.1541504-1-robh@kernel.org Acked-by: Chunyan Zhang Signed-off-by: Stephen Boyd commit b8a2e3f93d412114a1539ea97b59b3e6ed6e1f9a Author: Tejun Heo Date: Tue Mar 14 11:59:49 2023 -1000 cgroup: Make current_cgns_cgroup_dfl() safe to call after exit_task_namespace() The commit 332ea1f697be ("bpf: Add bpf_cgroup_from_id() kfunc") added bpf_cgroup_from_id() which calls current_cgns_cgroup_dfl() through cgroup_get_from_id(). However, BPF programs may be attached to a point where current->nsproxy has already been cleared to NULL by exit_task_namespace() and calling bpf_cgroup_from_id() would cause an oops. Just return the system-wide root if nsproxy has been cleared. This allows all cgroups to be looked up after the task passed through exit_task_namespace(), which semantically makes sense. Given that the only way to get this behavior is through BPF programs, it seems safe but let's see what others think. Fixes: 332ea1f697be ("bpf: Add bpf_cgroup_from_id() kfunc") Signed-off-by: Tejun Heo Link: https://lore.kernel.org/r/ZBDuVWiFj2jiz3i8@slm.duckdns.org Signed-off-by: Alexei Starovoitov commit 3c2611bac08a834697be918ac357eaff2e47d5b3 Author: Alexei Starovoitov Date: Tue Mar 14 15:28:11 2023 -0700 selftests/bpf: Fix trace_virtqueue_add_sgs test issue with LLVM 17. LLVM commit https://reviews.llvm.org/D143726 introduced hoistMinMax optimization that transformed (i < VIRTIO_MAX_SGS) && (i < out_sgs) into i < MIN(VIRTIO_MAX_SGS, out_sgs) and caused the verifier to stop recognizing such loop as bounded. Which resulted in the following test failure: libbpf: prog 'trace_virtqueue_add_sgs': BPF program load failed: Bad address libbpf: prog 'trace_virtqueue_add_sgs': -- BEGIN PROG LOAD LOG -- The sequence of 8193 jumps is too complex. verification time 789206 usec stack depth 56 processed 156446 insns (limit 1000000) max_states_per_insn 7 total_states 1746 peak_states 1701 mark_read 12 -- END PROG LOAD LOG -- libbpf: prog 'trace_virtqueue_add_sgs': failed to load: -14 libbpf: failed to load object 'loop6.bpf.o' Workaround the verifier limitation for now with inline asm that prevents this particular optimization. Signed-off-by: Alexei Starovoitov commit 5584d9e63eee25c6ccf36aa5d09efc113d762a05 Merge: 283b40c52d9ad d4e492338d119 Author: Alexei Starovoitov Date: Tue Mar 14 15:20:05 2023 -0700 Merge branch 'xdp: recycle Page Pool backed skbs built from XDP frames' Alexander Lobakin says: ==================== Yeah, I still remember that "Who needs cpumap nowadays" (c), but anyway. __xdp_build_skb_from_frame() missed the moment when the networking stack became able to recycle skb pages backed by a page_pool. This was making e.g. cpumap redirect even less effective than simple %XDP_PASS. veth was also affected in some scenarios. A lot of drivers use skb_mark_for_recycle() already, it's been almost two years and seems like there are no issues in using it in the generic code too. {__,}xdp_release_frame() can be then removed as it losts its last user. Page Pool becomes then zero-alloc (or almost) in the abovementioned cases, too. Other memory type models (who needs them at this point) have no changes. Some numbers on 1 Xeon Platinum core bombed with 27 Mpps of 64-byte IPv6 UDP, iavf w/XDP[0] (CONFIG_PAGE_POOL_STATS is enabled): Plain %XDP_PASS on baseline, Page Pool driver: src cpu Rx drops dst cpu Rx 2.1 Mpps N/A 2.1 Mpps cpumap redirect (cross-core, w/o leaving its NUMA node) on baseline: 6.8 Mpps 5.0 Mpps 1.8 Mpps cpumap redirect with skb PP recycling: 7.9 Mpps 5.7 Mpps 2.2 Mpps +22% (from cpumap redir on baseline) [0] https://github.com/alobakin/linux/commits/iavf-xdp ==================== Signed-off-by: Alexei Starovoitov commit d4e492338d11937c55841b1279287280d6e35894 Author: Alexander Lobakin Date: Mon Mar 13 22:55:53 2023 +0100 xdp: remove unused {__,}xdp_release_frame() __xdp_build_skb_from_frame() was the last user of {__,}xdp_release_frame(), which detaches pages from the page_pool. All the consumers now recycle Page Pool skbs and page, except mlx5, stmmac and tsnep drivers, which use page_pool_release_page() directly (might change one day). It's safe to assume this functionality is not needed anymore and can be removed (in favor of recycling). Signed-off-by: Alexander Lobakin Link: https://lore.kernel.org/r/20230313215553.1045175-5-aleksander.lobakin@intel.com Signed-off-by: Alexei Starovoitov commit 9c94bbf9a87b264294f42e6cc0f76d87854733ec Author: Alexander Lobakin Date: Mon Mar 13 22:55:52 2023 +0100 xdp: recycle Page Pool backed skbs built from XDP frames __xdp_build_skb_from_frame() state(d): /* Until page_pool get SKB return path, release DMA here */ Page Pool got skb pages recycling in April 2021, but missed this function. xdp_release_frame() is relevant only for Page Pool backed frames and it detaches the page from the corresponding page_pool in order to make it freeable via page_frag_free(). It can instead just mark the output skb as eligible for recycling if the frame is backed by a pp. No change for other memory model types (the same condition check as before). cpumap redirect and veth on Page Pool drivers now become zero-alloc (or almost). Signed-off-by: Alexander Lobakin Link: https://lore.kernel.org/r/20230313215553.1045175-4-aleksander.lobakin@intel.com Signed-off-by: Alexei Starovoitov commit 2c854e5fcd7e243f5a7cf6a6afa0ef83060c903c Author: Alexander Lobakin Date: Mon Mar 13 22:55:51 2023 +0100 net: page_pool, skbuff: make skb_mark_for_recycle() always available skb_mark_for_recycle() is guarded with CONFIG_PAGE_POOL, this creates unneeded complication when using it in the generic code. For now, it's only used in the drivers always selecting Page Pool, so this works. Move the guards so that preprocessor will cut out only the operation itself and the function will still be a noop on !PAGE_POOL systems, but available there as well. No functional changes. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303020342.Wi2PRFFH-lkp@intel.com Signed-off-by: Alexander Lobakin Link: https://lore.kernel.org/r/20230313215553.1045175-3-aleksander.lobakin@intel.com Signed-off-by: Alexei Starovoitov commit 487deb3e3393cccff0f148c4703efb185d46e314 Author: Alexander Lobakin Date: Mon Mar 13 22:55:50 2023 +0100 selftests/bpf: robustify test_xdp_do_redirect with more payload magics Currently, the test relies on that only dropped ("xmitted") frames will be recycled and if a frame became an skb, it will be freed later by the stack and never come back to its page_pool. So, it easily gets broken by trying to recycle skbs[0]: test_xdp_do_redirect:PASS:pkt_count_xdp 0 nsec test_xdp_do_redirect:FAIL:pkt_count_zero unexpected pkt_count_zero: actual 9936 != expected 2 test_xdp_do_redirect:PASS:pkt_count_tc 0 nsec That huge mismatch happened because after the TC ingress hook zeroes the magic, the page gets recycled when skb is freed, not returned to the MM layer. "Live frames" mode initializes only new pages and keeps the recycled ones as is by design, so they appear with zeroed magic on the Rx path again. Expand the possible magic values from two: 0 (was "xmitted"/dropped or did hit the TC hook) and 0x42 (hit the input XDP prog) to three: the new one will mark frames hit the TC hook, so that they will elide both @pkt_count_zero and @pkt_count_xdp. They can then be recycled to their page_pool or returned to the page allocator, this won't affect the counters anyhow. Just make sure to mark them as "input" (0x42) when they appear on the Rx path again. Also make an enum from those magics, so that they will be always visible and can be changed in just one place anytime. This also eases adding any new marks later on. Link: https://github.com/kernel-patches/bpf/actions/runs/4386538411/jobs/7681081789 Signed-off-by: Alexander Lobakin Link: https://lore.kernel.org/r/20230313215553.1045175-2-aleksander.lobakin@intel.com Signed-off-by: Alexei Starovoitov commit 4c290d4fa3aeed74e37637acaa1a787f194fe43d Author: Thomas Richter Date: Mon Mar 13 09:02:01 2023 +0100 perf vendor events s390: Add metric for TLB and cache Add metrics for tlb and cache statistics: - finite_cpi: Cycles per Instructions from Finite cache/memory - est_cpi: Estimated Instruction Complexity CPI infinite Level 1 - scpl1m: Estimated Sourcing Cycles per Level 1 Miss - tlb_percent: Estimated TLB CPU percentage of Total CPU - tlb_miss: Estimated Cycles per TLB Miss For details about the formulas see this documentation: https://www.ibm.com/support/pages/system/files/inline-files/CPU%20MF%20Formulas%20including%20z16%20-%20May%202022_1.pdf Output after: # ./perf stat -M tlb_miss -- dd if=/dev/zero of=/dev/null bs=1M count=10K ... dd output removed Performance counter stats for 'dd if=/dev/zero of=/dev/null bs=1M count=10K': 667,726 DTLB2_MISSES # 440.96 tlb_miss 198 ITLB2_WRITES 795,170,260 L1C_TLB2_MISSES 9,478 ITLB2_MISSES 820 DTLB2_WRITES 1,197,126,869 L1D_PENALTY_CYCLES 2,457,447 L1I_PENALTY_CYCLES 1.249342187 seconds time elapsed 0.001030000 seconds user 1.248105000 seconds sys # Signed-off-by: Thomas Richter Acked-by: Ian Rogers Acked-By: Sumanth Korikkar Cc: Heiko Carstens Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20230313080201.2440201-3-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 850eea236f8ad4a648cb7997eed8a3c616cc0678 Author: Thomas Richter Date: Mon Mar 13 09:02:00 2023 +0100 perf vendor events s390: Add cache metrics for z13 Add metrics for s390 z13 - Percentage sourced from Level 2 cache - Percentage sourced from Level 3 on same chip cache - Percentage sourced from Level 4 Local cache on same book - Percentage sourced from Level 4 Remote cache on different book - Percentage sourced from memory For details about the formulas see this documentation: https://www.ibm.com/support/pages/system/files/inline-files/CPU%20MF%20Formulas%20including%20z16%20-%20May%202022_1.pdf Output after: # ./perf stat -M l4rp -- find / ...find output deleted Performance counter stats for 'find /': 2 L1I_OFFDRAWER_SCOL_L4_SOURCED_WRITES # 0.02 l4rp 252 L1D_ONDRAWER_L4_SOURCED_WRITES 3,465 L1D_ONDRAWER_L3_SOURCED_WRITES_IV 80 L1D_OFFDRAWER_SCOL_L4_SOURCED_WRITES 761 L1D_ONDRAWER_L3_SOURCED_WRITES 0 L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES 131,817,067 L1I_DIR_WRITES 1 L1I_OFFDRAWER_FCOL_L4_SOURCED_WRITES 447 L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES 22 L1D_OFFDRAWER_FCOL_L4_SOURCED_WRITES 7 L1I_ONDRAWER_L4_SOURCED_WRITES 0 L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES 1,071 L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES 3 L1I_ONDRAWER_L3_SOURCED_WRITES 13,352 L1D_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV 15,252 L1D_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV 0 L1I_ONDRAWER_L3_SOURCED_WRITES_IV 0 L1I_OFFDRAWER_FCOL_L3_SOURCED_WRITES_IV 57,431,083 L1D_DIR_WRITES 0 L1I_OFFDRAWER_SCOL_L3_SOURCED_WRITES_IV 15.386502874 seconds time elapsed 0.647348000 seconds user 3.537041000 seconds sys # Signed-off-by: Thomas Richter Acked-By: Sumanth Korikkar Cc: Heiko Carstens Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20230313080201.2440201-3-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit add7894a25d1c572b2e472557f2b1150dbc991ee Author: Thomas Richter Date: Mon Mar 13 09:01:59 2023 +0100 perf vendor events s390: Add cache metrics for z14 Add metrics for s390 z14 - Percentage sourced from Level 2 cache - Percentage sourced from Level 3 on same chip cache - Percentage sourced from Level 4 Local cache on same book - Percentage sourced from Level 4 Remote cache on different book - Percentage sourced from memory For details about the formulas see this documentation: https://www.ibm.com/support/pages/system/files/inline-files/CPU%20MF%20Formulas%20including%20z16%20-%20May%202022_1.pdf Output after: # ./perf stat -M l4rp -- find / .... find output deleted Performance counter stats for 'find /': 0 L1I_OFFDRAWER_L4_SOURCED_WRITES # 0.01 l4rp 84 L1D_OFFDRAWER_L4_SOURCED_WRITES 0 L1I_OFFDRAWER_L3_SOURCED_WRITES 71,535,353 L1I_DIR_WRITES 219 L1D_OFFDRAWER_L3_SOURCED_WRITES 16,436 L1D_OFFDRAWER_L3_SOURCED_WRITES_IV 0 L1I_OFFDRAWER_L3_SOURCED_WRITES_IV 46,343,940 L1D_DIR_WRITES 10.530805537 seconds time elapsed 0.774396000 seconds user 1.602714000 seconds sys # Signed-off-by: Thomas Richter Acked-by: Ian Rogers Acked-By: Sumanth Korikkar Cc: Heiko Carstens Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20230313080201.2440201-3-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit bdecfecac8aba6ca5e2fde8f09b4fba1d1326997 Author: Thomas Richter Date: Mon Mar 13 09:01:58 2023 +0100 perf vendor events s390: Add cache metrics for z15 Add metrics for s390 z15 - Percentage sourced from Level 2 cache - Percentage sourced from Level 3 on same chip cache - Percentage sourced from Level 4 Local cache on same book - Percentage sourced from Level 4 Remote cache on different book - Percentage sourced from memory For details about the formulas see this documentation: https://www.ibm.com/support/pages/system/files/inline-files/CPU%20MF%20Formulas%20including%20z16%20-%20May%202022_1.pdf Outpuf after: # ./perf stat -M l4rp -- find / .... find output deleted Performance counter stats for 'find /': 5 L1I_OFFDRAWER_L4_SOURCED_WRITES # 0.01 l4rp 187 L1D_OFFDRAWER_L4_SOURCED_WRITES 0 L1I_OFFDRAWER_L3_SOURCED_WRITES 231,333,165 L1I_DIR_WRITES 3,303 L1D_OFFDRAWER_L3_SOURCED_WRITES 47,461 L1D_OFFDRAWER_L3_SOURCED_WRITES_IV 0 L1I_OFFDRAWER_L3_SOURCED_WRITES_IV 126,706,244 L1D_DIR_WRITES 27.870355461 seconds time elapsed 0.521562000 seconds user 12.494503000 seconds sys # Signed-off-by: Thomas Richter Acked-By: Sumanth Korikkar Acked-by: Ian Rogers Cc: Heiko Carstens Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20230313080201.2440201-3-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 3da9559e4131a38ab9c38add53d496bc4c7aea27 Author: Ian Rogers Date: Mon Mar 13 22:33:12 2023 -0700 perf vendor events intel: Update skylake events Update from v54 to v55. Addition of OFFCORE_RESPONSE, FP_ARITH_INST_RETIRED.SCALAR, FP_ARITH_INST_RETIRED.VECTOR and INT_MISC.CLEARS_COUNT. Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexander Shishkin Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230314053312.3237390-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 591530c0f5644d5fa8549ab4a738916cb6779dbf Author: Ian Rogers Date: Mon Mar 13 22:33:11 2023 -0700 perf vendor events intel: Update meteorlake events Update from 1.00 to 1.01. Event description updates. Addition of IDQ_BUBBLES.CORE, TOPDOWN.BACKEND_BOUND_SLOTS, UOPS_RETIRED.SLOTS. Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexander Shishkin Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230314053312.3237390-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b720bf90339742ef32b8add76f131f812ed1228a Author: Ian Rogers Date: Mon Mar 13 22:33:10 2023 -0700 perf vendor events intel: Update graniterapids events Update from 1.00 to 1.01, some event description updates. Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Alexander Shishkin Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230314053312.3237390-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit e6d356b146b75f1f77621aab7950a1eb550859f9 Author: Rafał Miłecki Date: Tue Feb 28 15:45:20 2023 +0100 arm64: dts: broadcom: bcmbca: bcm4908: add TP-Link C2300 USB LED triggers This device has 2 USB LEDs meant to be triggered by devices in relevant USB ports. While at it fix typo in USB LED name. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/all/20230228144520.21816-3-zajec5@gmail.com/ Signed-off-by: Florian Fainelli commit 889e53ccccc29ff4bf8d4c89cca34e8768845747 Author: Rafał Miłecki Date: Tue Feb 28 15:45:19 2023 +0100 arm64: dts: broadcom: bcmbca: bcm4908: add Netgear R8000P USB LED triggers This device has 2 USB LEDs meant to be triggered by devices in relevant USB ports. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/all/20230228144520.21816-2-zajec5@gmail.com/ Signed-off-by: Florian Fainelli commit 477cad715de1dfc256a20da3ed83b62f3cb2944d Author: Rafał Miłecki Date: Tue Feb 28 15:45:18 2023 +0100 arm64: dts: broadcom: bcmbca: bcm4908: add on-SoC USB ports BCM4908 has 3 USB controllers each with 2 USB ports. Home routers often have LEDs indicating state of selected USB ports. Describe those SoC USB ports to allow using them as LED trigger sources. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/all/20230228144520.21816-1-zajec5@gmail.com/ Signed-off-by: Florian Fainelli commit f16a8294dd7a02c7ad042cd2e3acc5ea06698dc1 Author: Rafał Miłecki Date: Tue Feb 28 15:44:00 2023 +0100 arm64: dts: broadcom: bcmbca: bcm4908: fix procmon nodename This fixes: arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dtb: syscon@280000: $nodename:0: 'syscon@280000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$' From schema: schemas/simple-bus.yaml Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/all/20230228144400.21689-3-zajec5@gmail.com/ Signed-off-by: Florian Fainelli commit 23be9f68f933adee8163b8efc9c6bff71410cc7c Author: Rafał Miłecki Date: Tue Feb 28 15:43:59 2023 +0100 arm64: dts: broadcom: bcmbca: bcm4908: fix LED nodenames This fixes: arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dtb: leds@800: 'led-lan@19', 'led-power@11', 'led-wan-red@12', 'led-wan-white@15', 'led-wps@14' do not match any of the regexes: '^led@[a-f0-9]+$', 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/leds/leds-bcm63138.yaml Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/all/20230228144400.21689-2-zajec5@gmail.com/ Signed-off-by: Florian Fainelli commit 5cca02449490e767289bda38db1577e2c375c084 Author: Rafał Miłecki Date: Tue Feb 28 15:43:58 2023 +0100 arm64: dts: broadcom: bcmbca: bcm4908: fix NAND interrupt name This fixes: arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dtb: nand-controller@1800: interrupt-names:0: 'nand_ctlrdy' was expected From schema: Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dtb: nand-controller@1800: Unevaluated properties are not allowed ('interrupt-names' was unexpected) From schema: Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/all/20230228144400.21689-1-zajec5@gmail.com/ Signed-off-by: Florian Fainelli commit 69160dd0aa6832b98d272c1a224b1aaf67cf843d Author: Florian Fainelli Date: Fri Feb 24 13:52:39 2023 -0800 soc: bcm: brcmstb: Remove bare-metal ARM suspend/resume code Since 2018 these platforms have supported entry via the ARM Trusted Firmware using the standard PSCI SYSTEM_SUSPEND function calls. Remove this legacy code. Link: https://lore.kernel.org/r/20230224215249.239405-1-f.fainelli@gmail.com Signed-off-by: Florian Fainelli commit 122b084d16bda75de74421ede63cb86a24289808 Author: Nick Alcock Date: Wed Feb 22 12:14:31 2023 +0000 kbuild, soc: bcm: bcm2835-power: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: Philipp Zabel Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Florian Fainelli commit 89cc9abe55dfb24647f3730ad218adc1bfad27ac Author: Nick Alcock Date: Wed Feb 22 12:14:30 2023 +0000 kbuild, soc: bcm: raspberrypi-power: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Florian Fainelli Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Florian Fainelli commit 9cf38a0914f0891e43bf88dcbb704d18dc5d4b21 Author: Ye Xingchen Date: Wed Feb 8 15:37:15 2023 +0800 bus: brcmstb_gisb: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Link: https://lore.kernel.org/r/202302081537158530029@zte.com.cn Signed-off-by: Florian Fainelli commit 7858dded8c1e983740b46857660526575583d2a2 Author: William Zhang Date: Mon Feb 6 22:58:14 2023 -0800 ARM: dts: broadcom: bcmbca: Add spi controller node Add support for HSSPI controller in ARMv7 chip dts files. Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20230207065826.285013-4-william.zhang@broadcom.com Signed-off-by: Florian Fainelli commit f5d83b714e304d5f3229da434af2eeea033c4f5d Author: William Zhang Date: Mon Feb 6 22:58:15 2023 -0800 arm64: dts: broadcom: bcmbca: Add spi controller node Add support for HSSPI controller in ARMv8 chip dts files. Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20230207065826.285013-5-william.zhang@broadcom.com Signed-off-by: Florian Fainelli commit 47600f84a8bfe4c57e3bd9ed928c14e957679c8a Author: Rob Herring Date: Tue Feb 7 17:47:09 2023 -0600 arm64: dts: broadcom: stringray: Fix GICv3 ITS node name The GICv3 ITS is an MSI controller, therefore its node name should be 'msi-controller'. While we're here, fix the unit-address which shouldn't have a comma. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230207234709.201229-1-robh@kernel.org Signed-off-by: Florian Fainelli commit fce449f5ba9735a80a83fe636e0d6507902084a0 Author: Trevor Woerner Date: Thu Feb 9 21:51:32 2023 -0500 riscv: dts: nezha-d1: add gpio-line-names Add descriptive names so users can associate specific lines with their respective pins on the 40-pin header according to the schematics. Signed-off-by: Trevor Woerner Link: http://dl.linux-sunxi.org/D1/D1_Nezha_development_board_schematic_diagram_20210224.pdf Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230210025132.36605-2-twoerner@gmail.com Signed-off-by: Jernej Skrabec commit c014377bd053fad2f42b39626939560df1d5fc7d Author: Nick Alcock Date: Fri Feb 17 14:10:47 2023 +0000 kbuild, soc: sunxi: sram: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Chen-Yu Tsai Cc: Jernej Skrabec Cc: Samuel Holland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-sunxi@lists.linux.dev Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230217141059.392471-13-nick.alcock@oracle.com Signed-off-by: Jernej Skrabec commit 23ca1dd442249727abed6ac523b37d737ea5bdc0 Author: Andre Przywara Date: Tue Feb 28 11:41:12 2023 +0000 arm64: dts: allwinner: h5: OrangePi PC2: add OPP table to enable DVFS So far the OrangePi PC2 board was running at a fixed frequency, set by U-Boot to 816 MHz, which is the best achievable frequency at the 1.1V CPU voltage provided by the PMIC at reset. We already describe the CPU voltage regulator in the DT, but were missing the OPP table. Just include the default H5 OPP table, as used by other boards. My OrangePi PC2 runs just fine with those values, and now goes up to 1.15 GHz. Signed-off-by: Andre Przywara Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20230228114112.3340715-1-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit 9ebdff9aac5ded7bb515e80478afacaaa3abd799 Author: Samuel Holland Date: Sat Dec 31 16:01:45 2022 -0600 riscv: dts: allwinner: d1: Add crypto engine node D1 contains a crypto engine which is supported by the sun8i-ce driver. Signed-off-by: Samuel Holland Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20221231220146.646-4-samuel@sholland.org Signed-off-by: Jernej Skrabec commit a9c6a1fcc338f4d97c87a3487b371652edba00c5 Author: Rob Herring Date: Fri Mar 10 08:47:24 2023 -0600 soc: sunxi: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Reviewed-by: Jernej Skrabec Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20230310144724.1545223-1-robh@kernel.org Signed-off-by: Jernej Skrabec commit 436b288687176bf4d2c1cd25b86173e5a1649a60 Author: Jayesh Choudhary Date: Tue Mar 14 20:56:10 2023 +0530 arm64: dts: ti: k3-j784s4-*: Add 'ti,sci-dev-id' for NAVSS nodes TISCI device ID for main_navss and mcu_navss nodes are missing in the device tree. Add them. Fixes: 4664ebd8346a ("arm64: dts: ti: Add initial support for J784S4 SoC") Signed-off-by: Jayesh Choudhary Signed-off-by: Nishanth Menon Reviewed-by: Kamlesh Gurudasani Link: https://lore.kernel.org/r/20230314152611.140969-2-j-choudhary@ti.com commit 4f4b30a777d3e61603119297965343a37be36435 Author: Bhavya Kapoor Date: Fri Feb 3 13:07:24 2023 +0530 arm64: dts: ti: k3-j721e-main: Remove ti,strobe-sel property According to latest errata of J721e [1], (i2024) 'MMCSD: Peripherals Do Not Support HS400' which applies to MMCSD0 subsystem. Speed modes supported has been already updated but missed dropping 'ti,strobe-sel' property which is only required by HS400 speed mode. Thus, drop 'ti,strobe-sel' property from kernel dtsi for J721e SoC. [1] https://www.ti.com/lit/er/sprz455/sprz455.pdf Fixes: eb8f6194e807 ("arm64: dts: ti: k3-j721e-main: Update the speed modes supported and their itap delay values for MMCSD subsystems") Signed-off-by: Bhavya Kapoor Signed-off-by: Nishanth Menon Reviewed-by: Diwakar Dhyani Reviewed-by: Nitin Yadav Link: https://lore.kernel.org/r/20230203073724.29529-1-b-kapoor@ti.com commit a1bc0d6084dba8a31831c65318a8a8e46f00906f Author: Devarsh Thakkar Date: Tue Mar 14 15:16:45 2023 +0530 arm64: dts: ti: k3-am62a7-sk: Fix DDR size to full 4GB All revisions of AM62A7-SK board have 4GB LPDDR4 Micron MT53E2G32D4DE-046 AUT:B memory. Commit 38c4a08c820c ("arm64: dts: ti: Add support for AM62A7-SK") enabled just 2GB due to a schematics error in early revision of the board. Fix it by enabling full 4GB available on the platform. Design docs: https://www.ti.com/lit/zip/sprr459 Fixes: 38c4a08c820c ("arm64: dts: ti: Add support for AM62A7-SK") Signed-off-by: Devarsh Thakkar Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20230314094645.3411599-1-devarsht@ti.com commit 28c8f2189d80c8b37068c367e9864b5aa530f208 Author: Nitin Yadav Date: Thu Feb 2 14:29:17 2023 +0530 arm64: dts: ti: k3-am62-main: Fix GPIO numbers in DT Fix number of gpio pins in main_gpio0 & main_gpio1 DT nodes according to AM62x SK datasheet. The Link of datasheet is in the following line: https://www.ti.com/lit/ds/symlink/am625.pdf?ts=1673852494660 Section: 6.3.10 GPIO (Page No. 63-67) Fixes: f1d17330a5be ("arm64: dts: ti: Introduce base support for AM62x SoC") Signed-off-by: Nitin Yadav Signed-off-by: Nishanth Menon Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20230202085917.3044567-1-n-yadav@ti.com commit 7399b886b55ef7b489a1bd3939451fcf1792941d Author: Jakub Kicinski Date: Thu Feb 23 18:13:01 2023 -0800 nbd: use the structured req attr check Use the macro for checking presence of required attributes. It has the advantage of reporting to the user which attr was missing in a machine-readable format (extack). Reviewed-by: Josef Bacik Signed-off-by: Jakub Kicinski Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20230224021301.1630703-2-kuba@kernel.org Signed-off-by: Jens Axboe commit 9195b317f1b62e9efd67d8702c920156135a81b5 Author: Jakub Kicinski Date: Thu Feb 23 18:13:00 2023 -0800 nbd: allow genl access outside init_net NBD doesn't have much to do with networking, allow users outside init_net to access the family. Reviewed-by: Josef Bacik Signed-off-by: Jakub Kicinski Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20230224021301.1630703-1-kuba@kernel.org Signed-off-by: Jens Axboe commit 825b3772a2047bd32ed3b3914234da0de19ef2e0 Author: Wesley Chalmers Date: Thu Nov 3 22:29:31 2022 -0400 drm/amd/display: Do not set DRR on pipe Commit [WHY] Writing to DRR registers such as OTG_V_TOTAL_MIN on the same frame as a pipe commit can cause underflow. Cc: stable@vger.kernel.org Cc: Mario Limonciello Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Wesley Chalmers Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2792f98cdb1c8fa43bf4ee5ae00349b823a823b7 Author: Fangzhi Zuo Date: Tue Feb 28 21:34:58 2023 -0500 drm/amd/display: Take FEC Overhead into Timeslot Calculation 8b/10b encoding needs to add 3% fec overhead into the pbn. In the Synapcis Cascaded MST hub, the first stage MST branch device needs the information to determine the timeslot count for the second stage MST branch device. Missing this overhead will leads to insufficient timeslot allocation. Cc: stable@vger.kernel.org Cc: Mario Limonciello Reviewed-by: Hersen Wu Acked-by: Qingqing Zhuo Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d142d4113fd5c3f7afdb48dff4703ae7edddf53d Author: Mustapha Ghaddar Date: Mon Feb 27 08:04:39 2023 -0500 drm/amd/display: Add Validate BW for USB4 Links [WHY] To validate the BW used for DPIAs per HostRouter [HOW] Add the Validate function in C source file Reviewed-by: Wenjing Liu Acked-by: Qingqing Zhuo Signed-off-by: Mustapha Ghaddar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5d04d13954479292dd45e38a46dfa31abb8dc2e0 Author: Saaem Rizvi Date: Mon Feb 27 18:55:07 2023 -0500 drm/amd/display: Remove OTG DIV register write for Virtual signals. [WHY] Hot plugging and then hot unplugging leads to k1 and k2 values to change, as signal is detected as a virtual signal on hot unplug. Writing these values to OTG_PIXEL_RATE_DIV register might cause primary display to blank (known hw bug). [HOW] No longer write k1 and k2 values to register if signal is virtual, we have safe guards in place in the case that k1 and k2 is unassigned so that an unknown value is not written to the register either. Cc: stable@vger.kernel.org Cc: Mario Limonciello Reviewed-by: Samson Tam Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Saaem Rizvi Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 98ce7d32e2154a6676d4dc7e6877af68cebf8832 Author: Wenjing Liu Date: Thu Feb 23 17:04:47 2023 -0500 drm/amd/display: convert link.h functions to function pointer style [Why & How] All dc subcomponents should call another dc component via function pointers stored in a component structure. This is part of dc coding convention since the beginning. The reason behind this is to improve encapsulation and polymorphism. The function contract is extracted into a single link service structure defined in link.h header file and implemented only in link_factory.c instead of spreading across multiple files in link component file structure. Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 98ef34186286c457b7fe6a73ece9b279438d645d Author: Zhikai Zhai Date: Mon Feb 27 19:39:35 2023 +0800 drm/amd/display: reset the scaler boundary mode [WHY] The VBIOS select the black boundary mode when using auto scale mode. But it doesn't recover if there is no reset. [HOW] Clean the scaler boundary mode to default edge in the manual scale mode. Reviewed-by: Dmytro Laktyushkin Acked-by: Qingqing Zhuo Signed-off-by: Zhikai Zhai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cd487b6d506329917bdd2a594b307aa469a53872 Author: Alvin Lee Date: Mon Feb 27 18:37:34 2023 -0500 drm/amd/display: Use DPP inst instead of pipe idx for DPP DTO programming [Description] - For pipe harvesting cases we must use DPP inst instead of pipe index for DPP related programming Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 932698c88dc414e36e0683fbf6cf551b928441ac Author: Swapnil Patel Date: Fri Feb 24 20:16:09 2023 -0500 drm/amd/display: default values for luminance range if they are 0 [why] Currently if invalid luminescence range is reported in edid, then the driver doesn't have default range to fallback to. [How] Add default range if, the range is 0. Reviewed-by: Roman Li Acked-by: Qingqing Zhuo Signed-off-by: Swapnil Patel Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 54c7b715b5efe405dfd5fdafcaf930214b9c1fa9 Author: Fangzhi Zuo Date: Fri Feb 24 13:45:21 2023 -0500 drm/amd/display: Add DSC Support for Synaptics Cascaded MST Hub Traditional synaptics hub has one MST branch device without virtual dpcd. Synaptics cascaded hub has two chained MST branch devices. DSC decoding is performed via root MST branch device, instead of the second MST branch device. Reviewed-by: Hersen Wu Acked-by: Qingqing Zhuo Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5dfb28c257b7c515624ba6b163410ceada451bf2 Author: Tanmay Shah Date: Fri Mar 10 17:24:08 2023 -0800 remoteproc: xilinx: Add mailbox channels for rpmsg This patch makes each r5 core mailbox client and uses tx and rx channels to send and receive data to/from remote processor respectively. This is needed for rpmsg communication to remote processor. Signed-off-by: Tanmay Shah Link: https://lore.kernel.org/r/20230311012407.1292118-6-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier commit 81c18e08a609706c5c2887f267135fa0dece4119 Author: Tanmay Shah Date: Fri Mar 10 17:24:07 2023 -0800 drivers: remoteproc: xilinx: Fix carveout names If the unit address is appended to node name of memory-region, then adding rproc carveouts fails as node name and unit-address both are passed as carveout name (i.e. vdev0vring0@xxxxxxxx). However, only node name is expected by remoteproc framework. This patch moves memory-region node parsing from driver probe to prepare and only passes node-name and not unit-address Fixes: 6b291e8020a8 ("drivers: remoteproc: Add Xilinx r5 remoteproc driver") Signed-off-by: Tanmay Shah Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230311012407.1292118-5-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier commit 79963fbfc233759bd8a43462f120d15a1bd4f4fa Author: Tanmay Shah Date: Fri Mar 10 17:24:06 2023 -0800 mailbox: zynqmp: Fix typo in IPI documentation Xilinx IPI message buffers allows 32-byte data transfer. Fix documentation that says 12 bytes Fixes: 4981b82ba2ff ("mailbox: ZynqMP IPI mailbox controller") Signed-off-by: Tanmay Shah Acked-by: Michal Simek Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230311012407.1292118-4-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier commit 74ad37a30ffee3643bc34f9ca7225b20a66abaaf Author: Tanmay Shah Date: Fri Mar 10 17:24:05 2023 -0800 mailbox: zynqmp: Fix IPI isr handling Multiple IPI channels are mapped to same interrupt handler. Current isr implementation handles only one channel per isr. Fix this behavior by checking isr status bit of all child mailbox nodes. Fixes: 4981b82ba2ff ("mailbox: ZynqMP IPI mailbox controller") Signed-off-by: Tanmay Shah Acked-by: Michal Simek Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230311012407.1292118-3-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier commit f72f805e72882c361e2a612c64a6e549f3da7152 Author: Tanmay Shah Date: Fri Mar 10 17:24:04 2023 -0800 mailbox: zynqmp: Fix counts of child nodes If child mailbox node status is disabled it causes crash in interrupt handler. Fix this by assigning only available child node during driver probe. Fixes: 4981b82ba2ff ("mailbox: ZynqMP IPI mailbox controller") Signed-off-by: Tanmay Shah Acked-by: Michal Simek Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20230311012407.1292118-2-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier commit e67b79850fcc4eb5816d69d34fd82aeda350aca7 Author: Stephen Smalley Date: Thu Mar 9 13:30:37 2023 -0500 selinux: stop passing selinux_state pointers and their offspring Linus observed that the pervasive passing of selinux_state pointers introduced by me in commit aa8e712cee93 ("selinux: wrap global selinux state") adds overhead and complexity without providing any benefit. The original idea was to pave the way for SELinux namespaces but those have not yet been implemented and there isn't currently a concrete plan to do so. Remove the passing of the selinux_state pointers, reverting to direct use of the single global selinux_state, and likewise remove passing of child pointers like the selinux_avc. The selinux_policy pointer remains as it is needed for atomic switching of policies. Suggested-by: Linus Torvalds Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303101057.mZ3Gv5fK-lkp@intel.com/ Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit 10d18135135c6b203feb5978d17bc4f53d1ddf43 Author: Mike Rapoport (IBM) Date: Mon Feb 13 17:44:47 2023 +0200 docs/mm: Physical Memory: add example of interleaving nodes Add an example of memory layout with interleaving nodes where even memory banks belong to node 0 and odd memory banks belong to node 1 Suggested-by: Michal Hocko Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Link: https://lore.kernel.org/r/20230213154447.1631847-1-rppt@kernel.org Signed-off-by: Jonathan Corbet commit 33fcc0e3c599199e342a3e68ad719a9c03dbceb0 Author: Lukas Bulwahn Date: Mon Feb 20 18:02:10 2023 +0100 qnx4: credit contributors in CREDITS Replace the content of the qnx4 README file with the canonical place for such information. Add the credits of the qnx4 contribution to CREDITS. As there is already a QNX4 FILESYSTEM section in MAINTAINERS, it is clear who to contact and send patches to. Signed-off-by: Lukas Bulwahn Acked-By: Anders Larsen Link: https://lore.kernel.org/r/20230220170210.15677-3-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet commit 3fe899e464398c5d73e2e70b0b23bd357f5dc08d Author: Lukas Bulwahn Date: Mon Feb 20 18:02:09 2023 +0100 qnx6: credit contributor and mark filesystem orphan Replace the content of the qnx6 README file with the canonical places for such information. Add the credits of the qnx6 contribution to CREDITS, and add an section in MAINTAINERS to mark this filesystem as Orphan, as the domain ontika.net and email address does not resolve to an IP address anymore. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20230220170210.15677-2-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet commit 9121782e02a936865f48e6a88bb6f62561d36294 Author: Carlos Bilbao Date: Wed Feb 22 12:34:45 2023 -0600 docs: Add relevant kernel publications to list of books For the list of kernel published books, include publication covering kernel debugging from August, 2022 (ISBN 978-1801075039) and one from March, 2021 on the topic of char device drivers and kernel synchronization (ISBN 978-1801079518). Also add foundational book from Robert Love (ISBN 978-1449339531) and remove extra spaces. Co-developed-by: Kaiwan N Billimoria Signed-off-by: Kaiwan N Billimoria Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20230222183445.3127324-1-carlos.bilbao@amd.com Signed-off-by: Jonathan Corbet commit c500488f23836bd29e794128549865ae80536950 Author: Randy Dunlap Date: Sun Feb 26 18:58:16 2023 -0800 Documentation: kernel-parameters: sort NFS parameters Sort the NFS kernel command line parameters. This is done in 4 groups so as to not have them intermingled: 'nfs' module parameters, 'nfs4' module parameters, 'nfsd' module parameters, and nfs "global" (__setup, no module) parameters. There were 5 parameters which were listed with a space between the parameter name and the following '=' sign. The space has been removed since module parameters expect 'parameter=' with no intervening space. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Trond Myklebust Cc: Anna Schumaker Cc: Chuck Lever Cc: Jeff Layton Cc: linux-nfs@vger.kernel.org Link: https://lore.kernel.org/r/20230227025816.1083-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 184cd8aa0c442a5f059f379a4b1af9145eecdb4b Author: Lukas Bulwahn Date: Tue Mar 7 15:40:00 2023 +0100 docs: admin: unicode: update information on state of lanana.org document Replace link to a non-existing page with a note that lanana.org does not maintain Linux Zone Unicode Assignments anymore. Remove the reference to H. Peter Anvin and the unicode lanana.org email as the maintainer of this file, as at this point, this is all maintained by the general kernel community. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20230307144000.29539-3-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet commit b49cfd85a33b7702f427d0f3cb75f7b362479b2a Author: Lukas Bulwahn Date: Tue Mar 7 15:39:59 2023 +0100 MAINTAINERS: remove historic section DEVICE NUMBER REGISTRY As described in Documentation/admin-guide/devices.rst, the device number registry (or linux device list) is at Documentation/admin-guide/devices.txt and no longer maintained at lanana.org. The devices.txt file is basically community-maintained, and there is no other dedicated maintainer or contact for that file nowadays. Remove the historic section DEVICE NUMBER REGISTRY in MAINTAINERS. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20230307144000.29539-2-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet commit 10a29eb658b3039eccfa6f249da079194f535a9a Author: Theodore Ts'o Date: Wed Mar 8 14:04:03 2023 -0500 Documentation/process: Add Linux Kernel Contribution Maturity Model As a follow-up to a discussion at the 2021 Maintainer's Summit on the topic of maintainer recruitment and retention, the TAB took on the task of creating a document which to help companies and other organizations to grow in their ability to engage with the Linux Kernel development community, using the Maturity Model[2] framework. The goal is to encourage, in a management-friendly way, companies to allow their engineers to contribute with the upstream Linux Kernel development community, so we can grow the "talent pipeline" for contributors to become respected leaders, and eventually kernel maintainers. [1] https://lwn.net/Articles/870581/ [2] https://en.wikipedia.org/wiki/Maturity_model Signed-off-by: Theodore Ts'o Co-developed-by: Kees Cook Signed-off-by: Kees Cook Co-developed-by: Dan Williams Signed-off-by: Dan Williams Acked-by: Jakub Kicinski Acked-by: Christian Brauner (Microsoft) Acked-by: Dave Hansen Acked-by: Jonathan Corbet Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20230308190403.2157046-1-tytso@mit.edu Signed-off-by: Jonathan Corbet commit 456ef6b08364de29b0f2c851577f1ec87815c8e2 Author: Carlos Bilbao Date: Fri Mar 10 10:36:51 2023 -0600 docs/sp_SP: Add translation of process/deprecated Translate Documentation/process/deprecated.rst into Spanish. Co-developed-by: Sergio Gonzalez Signed-off-by: Sergio Gonzalez Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/20230310163651.2500175-1-carlos.bilbao@amd.com Signed-off-by: Jonathan Corbet commit 592d80727f28472316ceabf22d91a1b5d27adb7e Author: Alexander Mikhalitsyn Date: Mon Mar 13 14:07:18 2023 +0100 docs: filesystems: vfs: actualize struct super_operations description Added/updated descriptions for super_operations: - free_inode method - evict_inode method - freeze_super/thaw_super method - show_{devname,path,stats} procfs-related methods - get_dquots method Cc: Eric Biggers Cc: Miklos Szeredi Cc: Al Viro Cc: Christian Brauner Cc: linux-fsdevel@vger.kernel.org Cc: linux-doc@vger.kernel.org Signed-off-by: Alexander Mikhalitsyn Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20230313130718.253708-3-aleksandr.mikhalitsyn@canonical.com Signed-off-by: Jonathan Corbet commit 85bf9a0ee2dd3bf6e506e531f4630fd50ecf1bfe Author: Alexander Mikhalitsyn Date: Mon Mar 13 14:07:17 2023 +0100 docs: filesystems: vfs: actualize struct file_system_type description Added descriptions for: - fscontext API ('init_fs_context' method, 'parameters' field) - 'fs_supers' field Cc: Eric Biggers Cc: Miklos Szeredi Cc: Al Viro Cc: Christian Brauner Cc: linux-fsdevel@vger.kernel.org Cc: linux-doc@vger.kernel.org Signed-off-by: Alexander Mikhalitsyn Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20230313130718.253708-2-aleksandr.mikhalitsyn@canonical.com Signed-off-by: Jonathan Corbet commit d2ea66a69fa908047f75a91f3728769bbd713849 Author: Randy Dunlap Date: Mon Mar 13 23:03:47 2023 -0700 Documentation: fs/proc: corrections and update Update URL for the latest online version of this document. Correct "files" to "fields" in a few places. Update /proc/scsi, /proc/stat, and /proc/fs/ext4 information. Drop /usr/src/ from the location of the kernel source tree. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20230314060347.605-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 8a1636a1fe0796a8234b50ff7d7be948d3ae3a6a Merge: 6ffa0da5c63f8 5f2a53c0687b1 Author: Mark Brown Date: Tue Mar 14 16:41:21 2023 +0000 ASoC: mt8192: Address spammy log messages Merge series from "Nícolas F. R. A. Prado" : A couple commits to make the mt8192 sound driver not spam the console. commit 9c99b4880d178a3cc6f42634b995d526a86f746b Author: Rob Herring Date: Fri Mar 10 08:46:56 2023 -0600 mips: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit 83552892b772dfc4639a4f2da075bbb5d605b788 Author: Sergio Paracuellos Date: Mon Feb 27 11:58:06 2023 +0100 mips: ralink: mt7620: introduce 'soc_device' initialization MT7620 SoCs have their own 'ralink_soc_info' structure with some information about the soc itself. In order to be able to retrieve this information from driver code and avoid architecture dependencies for retrieving these details introduce this 'soc_device'. Set 'data' pointer points to the struct 'ralink_soc_info' to be able to export also current soc information using this mechanism. We need to select 'SOC_BUS' in Kconfig configuration for these SoCs. Signed-off-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit 727ea3c77dd9b94d994708a148b82df76a47fa79 Author: Sergio Paracuellos Date: Mon Feb 27 11:58:05 2023 +0100 mips: ralink: mt7620: soc queries and tests as functions Move the SoC register value queries and tests to specific functions, to remove repetition of logic. No functional changes intended Signed-off-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit 217cf927e7c6ab41dc276442600f1309613ad417 Author: Sergio Paracuellos Date: Mon Feb 27 11:58:04 2023 +0100 mips: ralink: mt7620: define MT7620_SYSC_BASE with __iomem So that MT7620_SYSC_BASE can be used later in multiple functions without needing to repeat this __iomem declaration each time Signed-off-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit 7a26b384c44cfa9ea65799dc375619c96608ecad Author: Sergio Paracuellos Date: Mon Feb 27 11:58:03 2023 +0100 mips: ralink: rt288x: introduce 'soc_device' initialization RT288X SoCs have their own 'ralink_soc_info' structure with some information about the soc itself. In order to be able to retrieve this information from driver code and avoid architecture dependencies for retrieving these details introduce this 'soc_device'. Set 'data' pointer points to the struct 'ralink_soc_info' to be able to export also current soc information using this mechanism. We need to select 'SOC_BUS' in Kconfig configuration for these SoCs. Signed-off-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit 5a5aa151bdccea934d4a84086661538b60a09a42 Author: Sergio Paracuellos Date: Mon Feb 27 11:58:02 2023 +0100 mips: ralink: rt288x: soc queries and tests as functions Move the SoC register value queries and tests to specific functions, to remove repetition of logic. No functional changes intended Signed-off-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit 1e688601d18d3d872ffaad70c599e8c1a1d788a0 Author: Sergio Paracuellos Date: Mon Feb 27 11:58:01 2023 +0100 mips: ralink: rt288x: define RT2880_SYSC_BASE with __iomem So that RT2880_SYSC_BASE can be used later in multiple functions without needing to repeat this __iomem declaration each time Signed-off-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit 2165248f68b5f3e27faac844795e6691e1ee7777 Author: Sergio Paracuellos Date: Mon Feb 27 11:58:00 2023 +0100 mips: ralink: rt3883: introduce 'soc_device' initialization RT3883 SoC have its own 'ralink_soc_info' structure with some information about the soc itself. In order to be able to retrieve this information from driver code and avoid architecture dependencies for retrieving these details introduce this 'soc_device'. Set 'data' pointer points to the struct 'ralink_soc_info' to be able to export also current soc information using this mechanism. We need to select 'SOC_BUS' in Kconfig configuration for these SoCs. Signed-off-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit 89f9b3041e7eddfcfa7260d7e0d2846b21f316d1 Author: Sergio Paracuellos Date: Mon Feb 27 11:57:59 2023 +0100 mips: ralink: rt3883: soc queries and tests as functions Move the SoC register value queries and tests to specific functions, to remove repetition of logic. No functional changes intended Signed-off-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit 7edb1775846ebc5a7f4d5085ff6d712ed137a460 Author: Sergio Paracuellos Date: Mon Feb 27 11:57:58 2023 +0100 mips: ralink: rt3883: define RT3883_SYSC_BASE with __iomem So that RT3883_SYSC_BASE can be used later in multiple functions without needing to repeat this __iomem declaration each time Signed-off-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit bf27860fcabdd61d4bd33ce9488dc68bae5c7107 Author: Sergio Paracuellos Date: Mon Feb 27 11:57:57 2023 +0100 mips: ralink: rt305x: introduce 'soc_device' initialization RT305x SoCs have their own 'ralink_soc_info' structure with some information about the soc itself. In order to be able to retrieve this information from driver code and avoid architecture dependencies for retrieving these details introduce this 'soc_device'. Set 'data' pointer points to the struct 'ralink_soc_info' to be able to export also current soc information using this mechanism. We need to select 'SOC_BUS' in Kconfig configuration for these SoCs. Signed-off-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit 0def2164c94aa504bd2a3575e74a5f7fd86f5587 Author: Sergio Paracuellos Date: Mon Feb 27 11:57:56 2023 +0100 mips: ralink: rt305x: soc queries and tests as functions Move the SoC register value queries and tests to specific functions, to remove repetition of logic. No functional changes intended Signed-off-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit 13a9d0bea9d1cb119c9ce59c95b51cbb954827cc Author: Sergio Paracuellos Date: Mon Feb 27 11:57:55 2023 +0100 mips: ralink: rt305x: define RT305X_SYSC_BASE with __iomem So that RT305X_SYSC_BASE can be used later in multiple functions without needing to repeat this __iomem declaration each time Signed-off-by: Sergio Paracuellos Signed-off-by: Thomas Bogendoerfer commit e9a440e0923cddc0f9455dab55ae1b8b47a3e660 Author: Keguang Zhang Date: Tue Feb 21 19:01:42 2023 +0800 dt-bindings: mips: loongson: Add Loongson-1 based boards Add two Loongson-1 based boards: LSGZ 1B and Smartloong 1C. Signed-off-by: Keguang Zhang Reviewed-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit a66172fa7859b7c0f5af1a0576564f802e585883 Author: Thomas Zimmermann Date: Mon Mar 13 16:51:38 2023 +0100 drm/pl111: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Reported-by: Linus Walleij Link: https://lore.kernel.org/dri-devel/CACRpkdawSQsNqKJkSSoSw3HmMHyNXFUywxkdszpTC-a_uZA+tQ@mail.gmail.com/ Signed-off-by: Thomas Zimmermann Reviewed-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-26-tzimmermann@suse.de commit 1cbc363454c54d424028b736b704751ff24e47ac Author: Thomas Zimmermann Date: Mon Mar 13 16:51:37 2023 +0100 drm/mcde: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Reported-by: Linus Walleij Link: https://lore.kernel.org/dri-devel/CACRpkdawSQsNqKJkSSoSw3HmMHyNXFUywxkdszpTC-a_uZA+tQ@mail.gmail.com/ Signed-off-by: Thomas Zimmermann Reviewed-by: Linus Walleij Tested-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-25-tzimmermann@suse.de commit 3a4258c6033ad7bcbec76dfa4d5af569a2a045a1 Author: Linus Walleij Date: Mon Mar 13 16:51:36 2023 +0100 drm/mcde: Do not use dirty GEM FB handling This driver has no way to handle damage, the reason the drm_gem_fb_create_with_dirty() was used was because I had the ambition that the driver would only send out updates to DSI command displays whenever something changed, so as to minimize traffic. It turns out this ambition with command mode isn't working in practice because all the MCDE does is to create a continuous stream of DSI commands and while it is possible to send single frame updates with it, it's not been worthwhile. So we are just setting up continuous updates. Reported-by: Thomas Zimmermann Link: https://lore.kernel.org/dri-devel/0e789778-03ca-e3cb-9c94-e8b55573894c@suse.de/ Signed-off-by: Linus Walleij Signed-off-by: Thomas Zimmermann Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-24-tzimmermann@suse.de commit f6a51db518fdae2d9a43fdce48c46ee36b696b0a Author: Thomas Zimmermann Date: Mon Mar 13 16:51:35 2023 +0100 drm/xlnx: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-23-tzimmermann@suse.de commit f9cb99c597e401d372d8744c9f49bb9b06c6b821 Author: Thomas Zimmermann Date: Mon Mar 13 16:51:34 2023 +0100 drm/vc4: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-22-tzimmermann@suse.de commit 39463ef19b07d765a98071e64d7318de57facb23 Author: Thomas Zimmermann Date: Mon Mar 13 16:51:33 2023 +0100 drm/tve200: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-21-tzimmermann@suse.de commit 4144334a41a577153913897922ead867ac9a27fa Author: Thomas Zimmermann Date: Mon Mar 13 16:51:32 2023 +0100 drm/arcpgu: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-20-tzimmermann@suse.de commit 10143427b5830836aef4e7c6f31ddb3e5c2b06a1 Author: Thomas Zimmermann Date: Mon Mar 13 16:51:31 2023 +0100 drm/tilcdc: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-19-tzimmermann@suse.de commit 5e85fd009849b1853086056bfa77357e10d9ab85 Author: Thomas Zimmermann Date: Mon Mar 13 16:51:30 2023 +0100 drm/tidss: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-18-tzimmermann@suse.de commit a5b179ac42302c2f9091fb81fab01e14322e2ce9 Author: Thomas Zimmermann Date: Mon Mar 13 16:51:29 2023 +0100 drm/sun4i: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-17-tzimmermann@suse.de commit 11ac5e0fce5eee84e9fa4e16ede9fb8d5b8c1058 Author: Thomas Zimmermann Date: Mon Mar 13 16:51:28 2023 +0100 drm/stm: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-16-tzimmermann@suse.de commit 000a0134cf205a531ddf833357fb5169554e222f Author: Thomas Zimmermann Date: Mon Mar 13 16:51:27 2023 +0100 drm/sti: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-15-tzimmermann@suse.de commit 5fe96f6a400eb7f95402015619934e074d0b1d98 Author: Thomas Zimmermann Date: Mon Mar 13 16:51:26 2023 +0100 drm/mxsfb: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-14-tzimmermann@suse.de commit 55c7cd97c4ca6bef24845c29b24297a07e78f47e Author: Thomas Zimmermann Date: Mon Mar 13 16:51:25 2023 +0100 drm/mxsfb/lcdif: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-13-tzimmermann@suse.de commit 8a9d46f4f5d3bc5be9ac6f3861f86b56e83ff00c Author: Thomas Zimmermann Date: Mon Mar 13 16:51:24 2023 +0100 drm/meson: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Martin Blumenstingl Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-12-tzimmermann@suse.de commit 5d3f30e033ffdbe027add4f1366238cbde686d13 Author: Thomas Zimmermann Date: Mon Mar 13 16:51:23 2023 +0100 drm/logicvc: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-11-tzimmermann@suse.de commit 9d8fdb04fb93bfa2edcdc15a2d48270829e9e95c Author: Thomas Zimmermann Date: Mon Mar 13 16:51:22 2023 +0100 drm/kmb: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Anitha Chrisanthus Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-10-tzimmermann@suse.de commit 254461dd9f68c0ab4af5b4948070db0c74a7f79b Author: Thomas Zimmermann Date: Mon Mar 13 16:51:21 2023 +0100 drm/imx: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-9-tzimmermann@suse.de commit 37a0bd326669883b9276c7233109107674981f17 Author: Thomas Zimmermann Date: Mon Mar 13 16:51:20 2023 +0100 drm/imx/dcss: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-8-tzimmermann@suse.de commit abe06b95aaf1f8ac7081ab47e36b79ad9b8b082c Author: Thomas Zimmermann Date: Mon Mar 13 16:51:19 2023 +0100 drm/fsl-dcu: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-7-tzimmermann@suse.de commit b3fec11d0dbf43d0b3df11ca71687e25a5698ce4 Author: Thomas Zimmermann Date: Mon Mar 13 16:51:18 2023 +0100 drm/atmel-hlcdc: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-6-tzimmermann@suse.de commit 74e6a79fe8433ea0003d5308c566e68b3c7280a5 Author: Thomas Zimmermann Date: Mon Mar 13 16:51:17 2023 +0100 drm/aspeed: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-5-tzimmermann@suse.de commit 497cc665edad0de8a0f3832cc7148f4468d99d59 Author: Thomas Zimmermann Date: Mon Mar 13 16:51:16 2023 +0100 arm/malidp: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-4-tzimmermann@suse.de commit 9ff7705fe35ccdb02d7d32694942afe8531dfba6 Author: Thomas Zimmermann Date: Mon Mar 13 16:51:15 2023 +0100 arm/hdlcd: Use GEM DMA fbdev emulation Use the fbdev emulation that is optimized for DMA helpers. Avoids possible shadow buffering and makes the code simpler. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-3-tzimmermann@suse.de commit b79fe9abd58bab7363583d30d67a5385ed779616 Author: Thomas Zimmermann Date: Mon Mar 13 16:51:14 2023 +0100 drm/fbdev-dma: Implement fbdev emulation for GEM DMA helpers Implement fbdev emulation that is optimized for drivers that use DMA helpers. The buffers may no tbe moveable, may not require damage handling and have to be located in system memory. This allows fbdev emulation to operate directly on the buffer and mmap it to userspace. Besides those constraints, the emulation works like in the generic code. As an internal DRM client provides, it receives hotplug, restore and unregister events. The DRM client is independent from the fbdev probing, which runs on the first successful hotplug event. The emulation is part of the DMA helper module and not build unless DMA helpers and fbdev emulation has been configured. Tested with vc4. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230313155138.20584-2-tzimmermann@suse.de commit 7b76ab837522fd6aa72b25d1c5460995095fedc0 Author: Jiaxun Yang Date: Tue Feb 21 13:16:58 2023 +0000 MIPS: Loongson64: Opt-out war_io_reorder_wmb It is clearly stated on "Loongson 3A3000/3B3000 processor user manual vol 2" that "All access requests using a non-cached algorithm are executed in a blocking order. That is, before the current read request data is returned to the processor, all subsequent requests are blocked and issued; All subsequent requests are blocked until the write request data has been sent or the issued write request has not received a write reply from the final receiver." Which means uncached read/write is strongly ordered. So we won't need this workaround. This option was introduced when we add initial support for GS464E, it looks like a misinterpretation of another section in the manual saying we need barriers to ensure MMIO order against DMA requests. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 162e134aedcacc9ab9d5648349ceb5409f9ec880 Author: Jiaxun Yang Date: Tue Feb 21 13:16:57 2023 +0000 MIPS: Loongson64: Remove CPU_HAS_WB Q: Do we have really have write buffer A: Yes, on newer Loongson processors there is a "store fill buffer" that will collect *cached* writes, on all Loongson processors AXI crossbar will buffer all writes. Q: Then why do we want to remove CPU_HAS_WB? A: Because CPU_HAS_WB introduces wbflush, which intends to flush all write reuqests to mmio device. We won't be affected by store fill buffer because it won't buffer uncached writes. And a regular memory barrier is sufficient to flush crossbar write buffer. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 227003cb5325298a26276f49bebbfaf39d903be4 Author: Jiaxun Yang Date: Tue Feb 21 13:16:56 2023 +0000 MIPS: Loongson64: smp: Correct nudge_writes usage Previously every write to SMP regisers are followed by nudge_writes, this incures a huge performance penalty because nudge_writes involves SYNC, which will be globalized on chip. Only set off nudge_writes when we really want other cores to see the result ASAP. Also replace read/write functions to relaxed version because we don't need extra barriers to protect against DMA. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit ac24cc1835c8e6400230f0bf50e6ba0ab75cb09f Author: Jiaxun Yang Date: Tue Feb 21 13:16:55 2023 +0000 MIPS: Loongson64: smp: Use nudge_writes instead of wbflush wbflush here intends to let other cores see the results ASAP, nudge_writes fits this purpose better. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 5bd3990723bdf43333b2c268cc6644cb1961125b Author: Jiaxun Yang Date: Tue Feb 21 13:16:54 2023 +0000 MIPS: Loongson64: Prefix ipi register address pointers with __iomem They are truely mmio pointers, so give them proper prefix. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit f7ca74904dab2f9157fb17463b4fcaf641cc370d Author: Rafał Miłecki Date: Mon Feb 27 09:09:11 2023 +0100 MIPS: BCM47XX: Add support for Huawei B593u-12 It's a BCM5358 based home router. One of very few bcm47xx devices with cellular modems (here: LTE). Signed-off-by: Rafał Miłecki Reviewed-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit ce8e5f202f3e73258dc35d217208c1dd7dc648d3 Author: Ruslan Bilovol Date: Sun Mar 12 18:28:57 2023 -0400 ALSA: usb-audio: remove Wireless USB dead code Wireless USB host controller support has been removed from Linux Kernel more than 3 years ago in commit caa6772db4c1 ("Staging: remove wusbcore and UWB from the kernel tree."), and the associated code in the snd-usb-audio driver became unused and untested. If in the future somebody will return WUSB/UWB support back to the kernel, the snd-usb-audio driver will reject Wireless USB audio devices at probe stage, and this patch should be reverted. Signed-off-by: Ruslan Bilovol Link: https://lore.kernel.org/r/20230312222857.296623-1-ruslan.bilovol@gmail.com Signed-off-by: Takashi Iwai commit fce7defb8a46c31cf9384fee6e4b1e4920c46ff7 Author: Rob Herring Date: Tue Feb 7 17:47:35 2023 -0600 arm64: dts: marvell: armada-ap810: Fix GICv3 ITS node name The GICv3 ITS is an MSI controller, therefore its node name should be 'msi-controller'. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230207234735.201812-1-robh@kernel.org Signed-off-by: Krzysztof Kozlowski commit bfad380c542438a9b642f8190b7fd37bc77e2723 Author: Nirmoy Das Date: Tue Mar 14 15:29:14 2023 +0100 drm/i915/active: Fix missing debug object activation debug_active_activate() expected ref->count to be zero which is not true anymore as __i915_active_activate() calls debug_active_activate() after incrementing the count. v2: No need to check for "ref->count == 1" as __i915_active_activate() already make sure of that(Janusz). References: https://gitlab.freedesktop.org/drm/intel/-/issues/6733 Fixes: 04240e30ed06 ("drm/i915: Skip taking acquire mutex for no ref->active callback") Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Thomas Hellström Cc: Andi Shyti Cc: intel-gfx@lists.freedesktop.org Cc: Janusz Krzysztofik Cc: # v5.10+ Signed-off-by: Nirmoy Das Reviewed-by: Janusz Krzysztofik Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20230313114613.9874-1-nirmoy.das@intel.com commit fbc722aac1ce66960de50c0f488b6ff865a41d74 Author: Sean Christopherson Date: Sat Feb 11 00:35:34 2023 +0000 KVM: VMX: Rename "KVM is using eVMCS" static key to match its wrapper Rename enable_evmcs to __kvm_is_using_evmcs to match its wrapper, and to avoid confusion with enabling eVMCS for nested virtualization, i.e. have "enable eVMCS" be reserved for "enable eVMCS support for L1". No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20230211003534.564198-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 19f10315fd53599d8186aa46a0363b233292eb3d Author: Sean Christopherson Date: Sat Feb 11 00:35:33 2023 +0000 KVM: VMX: Stub out enable_evmcs static key for CONFIG_HYPERV=n Wrap enable_evmcs in a helper and stub it out when CONFIG_HYPERV=n in order to eliminate the static branch nop placeholders. clang-14 is clever enough to elide the nop, but gcc-12 is not. Stubbing out the key reduces the size of kvm-intel.ko by ~7.5% (200KiB) when compiled with gcc-12 (there are a _lot_ of VMCS accesses throughout KVM). Reviewed-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Message-Id: <20230211003534.564198-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 68ac4221497b9a54f32c452a774ae747da908a81 Author: Sean Christopherson Date: Sat Feb 11 00:35:32 2023 +0000 KVM: nVMX: Move EVMCS1_SUPPORT_* macros to hyperv.c Move the macros that define the set of VMCS controls that are supported by eVMCS1 from hyperv.h to hyperv.c, i.e. make them "private". The macros should never be consumed directly by KVM at-large since the "final" set of supported controls depends on guest CPUID. No functional change intended. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Message-Id: <20230211003534.564198-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 9a967700496feac1f006ffd97ffe2d82b6aac5ac Author: Lai Jiangshan Date: Thu Feb 2 18:28:17 2023 +0000 KVM: x86/mmu: Remove FNAME(is_self_change_mapping) Drop FNAME(is_self_change_mapping) and instead rely on kvm_mmu_hugepage_adjust() to adjust the hugepage accordingly. Prior to commit 4cd071d13c5c ("KVM: x86/mmu: Move calls to thp_adjust() down a level"), the hugepage adjustment was done before allocating new shadow pages, i.e. failed to restrict the hugepage sizes if a new shadow page resulted in account_shadowed() changing the disallowed hugepage tracking. Removing FNAME(is_self_change_mapping) fixes a bug reported by Huang Hang where KVM unnecessarily forces a 4KiB page. FNAME(is_self_change_mapping) has a defect in that it blindly disables _all_ hugepage mappings rather than trying to reduce the size of the hugepage. If the guest is writing to a 1GiB page and the 1GiB is self-referential but a 2MiB page is not, then KVM can and should create a 2MiB mapping. Add a comment above the call to kvm_mmu_hugepage_adjust() to call out the new dependency on adjusting the hugepage size after walking indirect PTEs. Reported-by: Huang Hang Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20221213125538.81209-1-jiangshanlai@gmail.com [sean: rework changelog after separating out the emulator change] Signed-off-by: Sean Christopherson Message-Id: <20230202182817.407394-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 39fda5d873eb1f59613ce49249ee2effea9f8e06 Author: Lai Jiangshan Date: Thu Feb 2 18:28:16 2023 +0000 KVM: x86/mmu: Detect write #PF to shadow pages during FNAME(fetch) walk Move the detection of write #PF to shadow pages, i.e. a fault on a write to a page table that is being shadowed by KVM that is used to translate the write itself, from FNAME(is_self_change_mapping) to FNAME(fetch). There is no need to detect the self-referential write before kvm_faultin_pfn() as KVM does not consume EMULTYPE_WRITE_PF_TO_SP for accesses that resolve to "error or no-slot" pfns, i.e. KVM doesn't allow retrying MMIO accesses or writes to read-only memslots. Detecting the EMULTYPE_WRITE_PF_TO_SP scenario in FNAME(fetch) will allow dropping FNAME(is_self_change_mapping) entirely, as the hugepage interaction can be deferred to kvm_mmu_hugepage_adjust(). Cc: Huang Hang Signed-off-by: Lai Jiangshan Link: https://lore.kernel.org/r/20221213125538.81209-1-jiangshanlai@gmail.com [sean: split to separate patch, write changelog] Signed-off-by: Sean Christopherson Message-Id: <20230202182817.407394-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 258d985f6eb360c9c7aacd025d0dbc080a59423f Author: Sean Christopherson Date: Thu Feb 2 18:28:15 2023 +0000 KVM: x86/mmu: Use EMULTYPE flag to track write #PFs to shadow pages Use a new EMULTYPE flag, EMULTYPE_WRITE_PF_TO_SP, to track page faults on self-changing writes to shadowed page tables instead of propagating that information to the emulator via a semi-persistent vCPU flag. Using a flag in "struct kvm_vcpu_arch" is confusing, especially as implemented, as it's not at all obvious that clearing the flag only when emulation actually occurs is correct. E.g. if KVM sets the flag and then retries the fault without ever getting to the emulator, the flag will be left set for future calls into the emulator. But because the flag is consumed if and only if both EMULTYPE_PF and EMULTYPE_ALLOW_RETRY_PF are set, and because EMULTYPE_ALLOW_RETRY_PF is deliberately not set for direct MMUs, emulated MMIO, or while L2 is active, KVM avoids false positives on a stale flag since FNAME(page_fault) is guaranteed to be run and refresh the flag before it's ultimately consumed by the tail end of reexecute_instruction(). Signed-off-by: Sean Christopherson Message-Id: <20230202182817.407394-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ebde5ba27c640e08e92c83fe30be0d9fa224eea9 Author: Mario Limonciello Date: Thu Feb 23 15:07:43 2023 -0600 thunderbolt: Refactor DROM reading The NVM reading code has a series of gotos that potentially introduce unexpected behaviors with retries if something unexpected has failed to parse. Refactor the code to remove the gotos and drop the retry logic. Signed-off-by: Mario Limonciello [mw: renamed root switch to host router, split device handling too] Signed-off-by: Mika Westerberg commit 6ffa0da5c63f8408101d01075709981005eb66ec Author: Herve Codina Date: Tue Mar 14 09:21:57 2023 +0100 soc: fsl: cpm1: qmc: Fix test dependency The QMC depends on (SOC_FSL && COMPILE_TEST). SOC_FSL does not exist. Fix the dependency using the correct one: FSL_SOC. Signed-off-by: Herve Codina Link: https://lore.kernel.org/r/20230314082157.137176-1-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 0d3a5178c2994eaf91ad135816a79138055b394a Author: Kuninori Morimoto Date: Mon Mar 6 01:43:54 2023 +0000 ASoC: soc-pcm.c: remove indirect runtime copy substream->runtime will be attached when substream was opened at snd_pcm_attach_substream(). When it uses DPCM, FE substream->runtime is attached, but BE substream->runtime is not. Thus, we are copying FE substream->runtime to BE. But, we are copyig FE substream->runtime to FE dpcm->runtime first (A), and copy it to BE dpcm->runtime (B), and copy it to BE substream->runtime (C). static int dpcm_fe_dai_open(...) { ... (A) fe->dpcm[stream].runtime = fe_substream->runtime; ... } static int dpcm_be_connect(...) { ... (B) be->dpcm[stream].runtime = fe->dpcm[stream].runtime; ... } int dpcm_be_dai_startup(...) { ... (C) be_substream->runtime = be->dpcm[stream].runtime; ... } It is too roundabout and troublesome. OTOH, it is directly copying fe_substream->runtime at dpcm_be_reparent() without using be->dpcm[stream].runtime. static void dpcm_be_reparent(...) { ... for_each_dpcm_fe(be, stream, dpcm) { ... => be_substream->runtime = fe_substream->runtime; break; } } This patch removes indirect copying. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87v8je64dh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 5c5a7521e9364a40fe2c1b67ab79991e3e9085df Author: Kuninori Morimoto Date: Mon Mar 6 01:43:30 2023 +0000 ASoC: soc-dai.c: add missing flag check at snd_soc_pcm_dai_probe() dai->probed is used at snd_soc_pcm_dai_probe/remove(), and used to call real remove() function only when it was probed. int snd_soc_pcm_dai_probe(...) { ... for_each_rtd_dais(rtd, i, dai) { ... if (dai->driver->probe) { (A) int ret = dai->driver->probe(dai); if (ret < 0) return soc_dai_ret(dai, ret); } => dai->probed = 1; } ... } int snd_soc_pcm_dai_remove(...) { ... for_each_rtd_dais(rtd, i, dai) { ... => if (dai->probed && ...) { ... } => dai->probed = 0; } ... } But on probe() case, we need to check dai->probed before calling real probe() function at (A), otherwise real probe() might be called multi times (but real remove() will be called only once). This patch checks it at probe(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87wn3u64e6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 9c3bd7904b9333fb8619246e636a3afb5146ac26 Merge: bec88efd7fd15 ad70f2f0e6e38 Author: Mark Brown Date: Tue Mar 14 13:58:48 2023 +0000 ASoC: SOF: ipc4: Add support for formats per pins Merge series from Peter Ujfalusi : The modules in IPC4 can have multiple 'pins' on their input and output and these pins can receive or output audio in different formats. Currently we assume that all pins are using the same format which is a limitation that needs to be lifted in order to support more complex components. This series will extend and rework the format handling to allow different formats on pins. commit bec88efd7fd158eef4fdda1007cf831926a95f16 Merge: 12e3b2848bfa8 a062c8899fede Author: Mark Brown Date: Tue Mar 14 13:58:42 2023 +0000 ASoC: SOF: ipc4: Add support for bytes control Merge series from Peter Ujfalusi : This series will add support for bytes control and topology types. With IPC4 only the binary payload is sent to the firmware via LARGE_CONFIG message (which does similar multi-part message handling as the IPC3 control message did). The bytes payload itself is not checked by the kernel but user space expected to wrap it in sof_abi_hdr struct in order to get the target information of the binary data. The SOF firmware and sof-ctl have been updated to support blobs used in IPC4 setups. commit c8325b3227508459fab42f4f48fb232bc687f1ba Author: Mario Limonciello Date: Thu Feb 23 15:07:42 2023 -0600 thunderbolt: use `tb_eeprom_get_drom_offset` to discover DROM offset The static function `tb_eeprom_get_drom_offset` has more safety guards for the DROM offset fetching. Use this instead of just `tb_sw_read` No intended functional changes. Signed-off-by: Mario Limonciello Signed-off-by: Mika Westerberg commit 1c96fcdef8c7492ecf34ed70102a1ae5253ef9d1 Author: Christophe Leroy Date: Sat Feb 18 10:15:46 2023 +0100 powerpc/platforms: Use 'compatible' property for simple cases Use the new 'compatible' property for simple cases. checkpatch complains about the new compatible being undocumented but in reality nothing is new so just ignore it for the time being. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/6cb9865d916231c38401ba34ad1a98c249fae135.1676711562.git.christophe.leroy@csgroup.eu commit 2fc39acfcacf3dc1392d8062f6d7b7d94eb2537c Author: Christophe Leroy Date: Sat Feb 18 10:15:45 2023 +0100 powerpc/machdep: Define 'compatible' property in ppc_md and use it Most probe functions do nothing else than checking whether the machine is compatible to a given string. Define that string in ppc_md structure and check it directly from probe_machine() instead of using ppc_md.probe() for that. Keep checking in ppc_md.probe() only for more complex probing. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/6cb9865d916231c38401ba34ad1a98c249fae135.1676711562.git.christophe.leroy@csgroup.eu commit 35e175bdd52e75d4f9b1a6b3cea870c728acf344 Author: Christophe Leroy Date: Sat Feb 18 10:15:44 2023 +0100 powerpc/machdep: Make machine name const Machine name in struct machdep_calls should never be modified. Mark it const. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/6cb9865d916231c38401ba34ad1a98c249fae135.1676711562.git.christophe.leroy@csgroup.eu commit a11334d8327b3fd7987cbfb38e956a44c722d88f Author: Nathan Chancellor Date: Wed Feb 15 11:41:17 2023 -0700 powerpc: Allow CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2 with ld.lld 15+ Commit 5017b4594672 ("powerpc/64: Option to build big-endian with ELFv2 ABI") restricted the ELFv2 ABI configuration such that it can only be selected when linking with ld.bfd, due to lack of testing with LLVM. ld.lld can link ELFv2 kernels without any issues; in fact, it is the only ABI that ld.lld supports, as ELFv1 is not supported in ld.lld. As this has not seen a ton of real world testing yet, be conservative and only allow this option to be selected with the latest stable release of LLVM (15.x) and newer. While in the area, remove 'default n', as it is unnecessary to specify it explicitly since all boolean/tristate configuration symbols default to n. Tested-by: "Erhard F." Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://msgid.link/20230118-ppc64-elfv2-llvm-v1-3-b9e2ec9da11d@kernel.org commit 7c3bd8362b06cff0a4044a4975adb7d71db2dfba Author: Nathan Chancellor Date: Wed Feb 15 11:41:16 2023 -0700 powerpc: Fix use of '-mabi=elfv2' with clang '-mabi=elfv2' is not added to clang's invocations when CONFIG_PPC64_ELF_ABI_V2 is enabled, resulting in the generation of elfv1 code, as evidenced by the orphan section warnings/errors: ld.lld: error: vmlinux.a(arch/powerpc/kernel/prom_init.o):(.opd) is being placed in '.opd' ld.lld: error: vmlinux.a(init/main.o):(.opd) is being placed in '.opd' ld.lld: error: vmlinux.a(init/version.o):(.opd) is being placed in '.opd' To resolve this, add '-mabi=elfv2' to CFLAGS with clang. This uncovers an issue in the 32-bit vDSO: error: unknown target ABI 'elfv2' The ELFv2 ABI cannot be used when building code for a 32-bit target. To resolve this, just remove the '-mabi' flags from the assembler flags, as it was only needed for preprocessing (the _CALL_ELF macro) but this was cleaned up in commit 5b89492c03e5 ("powerpc: Finalise cleanup around ABI use"). Tested-by: "Erhard F." Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://msgid.link/20230118-ppc64-elfv2-llvm-v1-2-b9e2ec9da11d@kernel.org commit d1c5accacb234c3a9f1609a73b4b2eaa4ef07d1a Author: Nathan Chancellor Date: Wed Feb 15 11:41:15 2023 -0700 powerpc/boot: Only use '-mabi=elfv2' with CONFIG_PPC64_BOOT_WRAPPER When CONFIG_PPC64_ELF_ABI_V2 is enabled with clang through CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2, building the powerpc boot wrapper in 32-bit mode (i.e. with CONFIG_PPC64_BOOT_WRAPPER=n) fails with: error: unknown target ABI 'elfv2' The ABI cannot be changed with '-m32'; GCC silently accepts it but clang errors out. Only provide '-mabi=elfv2' when CONFIG_PPC64_BOOT_WRAPPER is enabled, which is the only way '-mabi=elfv2' will be useful. Tested-by: "Erhard F." Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://msgid.link/20230118-ppc64-elfv2-llvm-v1-1-b9e2ec9da11d@kernel.org commit 8a32341cf04ba05974931b4664683c2c9fb84e56 Author: Kajol Jain Date: Wed Mar 1 22:39:17 2023 +0530 selftests/powerpc/pmu: Fix sample field check in the mmcra_thresh_marked_sample_test The testcase verifies the setting of different fields in Monitor Mode Control Register A (MMCRA). In the current code, EV_CODE_EXTRACT macro is used to extract the "sample" field, which then needs to be further processed to fetch rand_samp_elig and rand_samp_mode bits. But the current code is not passing valid sample field to EV_CODE_EXTRACT macro. Patch addresses this by fixing the input for EV_CODE_EXTRACT. Fixes: 29cf373c5766 ("selftests/powerpc/pmu: Add interface test for mmcra register fields") Reported-by: David Binderman Link: https://lore.kernel.org/r/DB6P189MB0568CF002762C6C43AF6DF169CA89@DB6P189MB0568.EURP189.PROD.OUTLOOK.COM Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://msgid.link/20230301170918.69176-1-kjain@linux.ibm.com commit be994293544f1c0b032dabfe0832d9c1dfcea14b Author: Bo Liu Date: Mon Oct 31 21:54:52 2022 -0400 powerpc: Fix a kernel-doc warning The current code provokes a kernel-doc warnings: arch/powerpc/kernel/process.c:1606: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Signed-off-by: Bo Liu Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20221101015452.3216-1-liubo03@inspur.com commit 493648d6795f00b6dcd6295b2b4221871bc1b25b Author: Michael Neuling Date: Wed Mar 8 08:36:14 2023 +1100 selftests/powerpc: Increase timeout for vsx_signal test On the max config P10 machine (1920 threads and 64TB) this test fails with a timeout: Sending signals to all threads 10 times...!! killing vmx_signal !! child died by signal 15 failure: vmx_signal The default timeout is 120sec so increase this 3x to 360sec. With this change the test passes on these large machines. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman Link: https://msgid.link/20230307213614.2652059-1-mikey@neuling.org commit a34d2f0d79ec890b9b1b156a90016b6330173b8a Author: Timothy Pearson Date: Mon Mar 6 11:31:28 2023 -0600 powerpc: Add myself to MAINTAINERS for Power VFIO support Signed-off-by: Timothy Pearson Acked-by: Alex Williamson Signed-off-by: Michael Ellerman Link: https://msgid.link/256219069.16998525.1678123888896.JavaMail.zimbra@raptorengineeringinc.com commit a940904443e432623579245babe63e2486ff327b Author: Alexey Kardashevskiy Date: Mon Mar 6 11:31:00 2023 -0600 powerpc/iommu: Add iommu_ops to report capabilities and allow blocking domains Up until now PPC64 managed to avoid using iommu_ops. The VFIO driver uses a SPAPR TCE sub-driver and all iommu_ops uses were kept in the Type1 VFIO driver. Recent development added 2 uses of iommu_ops to the generic VFIO which broke POWER: - a coherency capability check; - blocking IOMMU domain - iommu_group_dma_owner_claimed()/... This adds a simple iommu_ops which reports support for cache coherency and provides a basic support for blocking domains. No other domain types are implemented so the default domain is NULL. Since now iommu_ops controls the group ownership, this takes it out of VFIO. This adds an IOMMU device into a pci_controller (=PHB) and registers it in the IOMMU subsystem, iommu_ops is registered at this point. This setup is done in postcore_initcall_sync. This replaces iommu_group_add_device() with iommu_probe_device() as the former misses necessary steps in connecting PCI devices to IOMMU devices. This adds a comment about why explicit iommu_probe_device() is still needed. The previous discussion is here: https://lore.kernel.org/r/20220707135552.3688927-1-aik@ozlabs.ru/ https://lore.kernel.org/r/20220701061751.1955857-1-aik@ozlabs.ru/ Fixes: e8ae0e140c05 ("vfio: Require that devices support DMA cache coherence") Fixes: 70693f470848 ("vfio: Set DMA ownership for VFIO devices") Signed-off-by: Alexey Kardashevskiy Signed-off-by: Timothy Pearson Acked-by: Alex Williamson [mpe: Fix CONFIG_IOMMU_API=n build] Signed-off-by: Michael Ellerman Link: https://msgid.link/2000135730.16998523.1678123860135.JavaMail.zimbra@raptorengineeringinc.com commit 93d205457dcda137e73dbfdcaa6a3c4c3b6d505f Author: Lukas Bulwahn Date: Tue Mar 14 08:56:09 2023 +0100 spi: docs: adjust summary to CONFIG_SYSFS_DEPRECATED removal With commit 721da5cee9d4 ("driver core: remove CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2"), ./scripts/checkkconfigsymbols.py indicated an unresolved reference to the config SYSFS_DEPRECATED in the SPI summary documentation. Simply, delete the sentence referring to the removed config there. Also update the documentation, as these sys/class entries should always be symlinks, as the commit message of the commit above suggests. Signed-off-by: Lukas Bulwahn Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20230314075609.5232-1-lukas.bulwahn@gmail.com Signed-off-by: Mark Brown commit 691c1fcda5351ed98a44610b7dccc0e3ee920020 Author: Douglas Anderson Date: Mon Mar 13 11:18:19 2023 -0700 regulator: core: Shorten off-on-delay-us for always-on/boot-on by time since booted This is very close to a straight revert of commit 218320fec294 ("regulator: core: Fix off-on-delay-us for always-on/boot-on regulators"). We've identified that patch as causing a boot speed regression on sc7180-trogdor boards. While boot speed certainly isn't more important than making sure that power sequencing is correct, looking closely at the original change it doesn't seem to have been fully justified. It mentions "cycling issues" without describing exactly what the issues were. That means it's possible that the cycling issues were really a problem that should be fixed in a different way. Let's take a careful look at how we should handle regulators that have an off-on-delay and that are boot-on or always-on. Linux currently doesn't have any way to identify whether a GPIO regulator was already on when the kernel booted. That means that when the kernel boots we probe a regulator, see that it wants boot-on / always-on we, and then turn the regulator on. We could be in one of two cases when we do this: a) The regulator might have been left on by the bootloader and we're ensuring that it stays on. b) The regulator might have been left off by the bootloader and we're just now turning it on. For case a) we definitely don't need any sort of delay. For case b) we _might_ need some delay in case the bootloader turned the regulator off _right_ before booting the kernel. To get the proper delay for case b) then we can just assume a `last_off` of 0, which is what it gets initialized to by default. As per above, we can't tell whether we're in case a) or case b) so we'll assume the longer delay (case b). This basically puts the code to how it was before commit 218320fec294 ("regulator: core: Fix off-on-delay-us for always-on/boot-on regulators"). However, we add one important change: we make sure that the delay is actually honored if `last_off` is 0. Though the original "cycling issues" cited were vague, I'm hopeful that this important extra change will be enough to fix the issues that the initial commit mentioned. With this fix, I've confined that on a sc7180-trogdor board the delay at boot goes down from 500 ms to ~250 ms. That's not as good as the 0 ms that we had prior to commit 218320fec294 ("regulator: core: Fix off-on-delay-us for always-on/boot-on regulators"), but it's probably safer because we don't know if the bootloader turned the regulator off right before booting. One note is that it's possible that we could be in a state that's not a) or b) if there are other issues in the kernel. The only one I can think of is related to pinctrl. If the pinctrl driver being used on a board isn't careful about avoiding glitches when setting up a pin then it's possible that setting up a pin could cause the regulator to "turn off" briefly immediately before the regulator probes. If this is indeed causing problems then the pinctrl driver should be fixed, perhaps in a similar way to what was done in commit d21f4b7ffc22 ("pinctrl: qcom: Avoid glitching lines when we first mux to output") Fixes: 218320fec294 ("regulator: core: Fix off-on-delay-us for always-on/boot-on regulators") Cc: Christian Kohlschütter Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20230313111806.1.I2eaad872be0932a805c239a7c7a102233fb0b03b@changeid Signed-off-by: Mark Brown commit 5f2a53c0687b151c2ecad19995108b40df76ba86 Author: Nícolas F. R. A. Prado Date: Mon Mar 13 17:29:07 2023 -0400 ASoC: mt8192: Move spammy messages to debug level There are many log messages throughout the mt8192 sound drivers that print to the info level and are triggered very frequently. Move these messages to the debug level to avoid spamming the console. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230313212908.2282961-3-nfraprado@collabora.com Signed-off-by: Mark Brown commit f147ca85d6ecaf65106d1650f3c2e8afacbc833f Author: Nícolas F. R. A. Prado via Alsa-devel Date: Mon Mar 13 17:29:06 2023 -0400 ASoC: mt8192: Remove function name log messages There are some log messages in the mt8192 sound code that print the function name, presumably to aid in tracing. However this can also be achieved by ftrace and without spamming the console, so remove these messages. Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/167874298172.26.17917791030607314817@mailman-core.alsa-project.org Signed-off-by: Mark Brown commit 5d3ca5968480758a29a0b2777da9049a7c5134e3 Author: Christian Brauner Date: Mon Mar 6 15:11:42 2023 +0100 Documentation: update idmappings.rst Quite a lot has changed over the last few kernel releases with the introduction of vfs{g,u}id_t and struct mnt_idmap. Update the documentation accordingly. Cc: Seth Forshee Signed-off-by: Christian Brauner (Microsoft) commit 76f351096c4516f38b9c901a21797fa958588e3a Author: Alexey Kardashevskiy Date: Mon Mar 6 11:30:42 2023 -0600 powerpc/pci_64: Init pcibios subsys a bit later Subsequent patches are going to add dependency/use of iommu_ops which is initialized in subsys_initcall as well. This moves pciobios_init() to the next initcall level. This should not cause behavioral change. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Timothy Pearson Signed-off-by: Michael Ellerman Link: https://msgid.link/12303156.16998521.1678123842049.JavaMail.zimbra@raptorengineeringinc.com commit 9d67c94335096311c0bc7556ad1022de7385790b Author: Alexey Kardashevskiy Date: Mon Mar 6 11:30:20 2023 -0600 powerpc/iommu: Add "borrowing" iommu_table_group_ops PPC64 IOMMU API defines iommu_table_group_ops which handles DMA windows for PEs: control the ownership, create/set/unset a table the hardware for dynamic DMA windows (DDW). VFIO uses the API to implement support on POWER. So far only PowerNV IODA2 (POWER8 and newer machines) implemented this and other cases (POWER7 or nested KVM) did not and instead reused existing iommu_table structs. This means 1) no DDW 2) ownership transfer is done directly in the VFIO SPAPR TCE driver. Soon POWER is going to get its own iommu_ops and ownership control is going to move there. This implements spapr_tce_table_group_ops which borrows iommu_table tables. The upside is that VFIO needs to know less about POWER. The new ops returns the existing table from create_table() and only checks if the same window is already set. This is only going to work if the default DMA window starts table_group.tce32_start and as big as pe->table_group.tce32_size (not the case for IODA2+ PowerNV). This changes iommu_table_group_ops::take_ownership() to return an error if borrowing a table failed. This should not cause any visible change in behavior for PowerNV. pSeries was not that well tested/supported anyway. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Timothy Pearson Acked-by: Alex Williamson [mpe: Fix CONFIG_IOMMU_API=n build (skiroot_defconfig), & formatting] Signed-off-by: Michael Ellerman Link: https://msgid.link/525438831.16998517.1678123820075.JavaMail.zimbra@raptorengineeringinc.com commit 9fcc00eafd28d50756ec2ee103ee6ed479610bc6 Author: Uwe Kleine-König Date: Fri Dec 9 23:05:54 2022 +0100 drm: Drop ARCH_MULTIPLATFORM from dependencies Some of these dependencies used to be sensible when only a small part of the platforms supported by ARCH=arm could be compiled together in a single kernel image. Nowadays ARCH_MULTIPLATFORM is only used as a guard for kernel options incompatible with a multiplatform image. See commit 84fc86360623 ("ARM: make ARCH_MULTIPLATFORM user-visible") for some more details. Signed-off-by: Uwe Kleine-König Acked-by: Arnd Bergmann Reviewed-by: Javier Martinez Canillas Reviewed-by: Philipp Zabel Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20221209220555.3631364-1-u.kleine-koenig@pengutronix.de commit 1f64cfdebfe0494264271e8d7a3a47faf5f58ec7 Author: Roman Lozko Date: Fri Mar 10 15:04:45 2023 +0000 perf scripts intel-pt-events.py: Fix IPC output for Python 2 Integers are not converted to floats during division in Python 2 which results in incorrect IPC values. Fix by switching to new division behavior. Fixes: a483e64c0b62e93a ("perf scripting python: intel-pt-events.py: Add --insn-trace and --src-trace") Signed-off-by: Roman Lozko Acked-by: Adrian Hunter Cc: Adrian Hunter Link: https://lore.kernel.org/r/20230310150445.2925841-1-lozko.roma@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 0e70f50e72860f84759b62dae877c48523d33255 Author: Arnaldo Carvalho de Melo Date: Tue Mar 14 08:41:36 2023 -0300 perf tools bpf: Add vmlinux.h to .gitignore Now that BPF skel based tools will be built by default if the toolchain pieces that are needed are available, building directly on the source tree will produce a vmlinux.h from the BTF info that needs to get ignored. Signed-off-by: Arnaldo Carvalho de Melo commit 07fc5921a014e227bd3b622d31a8a35ff3f19afb Author: Ian Rogers Date: Tue Mar 7 16:27:14 2023 -0800 perf test: Fix "PMU event table sanity" for NO_JEVENTS=1 A table was renamed and needed to be renamed in the empty case. Fixes: 62774db2a05dc878 ("perf jevents: Generate metrics and events as separate tables") Reviewed-by: John Garry Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230308002714.1755698-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 4f701063bfa24ca3da050104cc757dfc3b252355 Author: Namhyung Kim Date: Mon Mar 13 13:48:25 2023 -0700 perf lock contention: Show lock type with address Show lock type names after the symbol of locks if any. This can be useful especially when it doesn't show the lock symbols. The indentation before the lock type parenthesis is to recognize lock symbols more easily. $ sudo ./perf lock con -abl -- sleep 1 contended total wait max wait avg wait address symbol 44 6.13 ms 284.49 us 139.28 us ffffffff92e06080 tasklist_lock (rwlock) 159 983.38 us 12.38 us 6.18 us ffff8cc717c90000 siglock (spinlock) 10 679.90 us 153.35 us 67.99 us ffff8cdc2872aaf8 mmap_lock (rwsem) 9 558.11 us 180.67 us 62.01 us ffff8cd647914038 mmap_lock (rwsem) 78 228.56 us 7.82 us 2.93 us ffff8cc700061c00 (spinlock) 5 41.60 us 16.93 us 8.32 us ffffd853acb41468 (spinlock) 10 37.24 us 5.87 us 3.72 us ffff8cd560b5c200 siglock (spinlock) 4 11.17 us 3.97 us 2.79 us ffff8d053ddf0c80 rq_lock (spinlock) 1 7.86 us 7.86 us 7.86 us ffff8cd64791404c (spinlock) 1 4.13 us 4.13 us 4.13 us ffff8d053d930c80 rq_lock (spinlock) 7 3.98 us 1.67 us 568 ns ffff8ccb92479440 (mutex) 2 2.62 us 2.33 us 1.31 us ffff8cc702e6ede0 (rwlock) Signed-off-by: Namhyung Kim Cc: Boqun Feng Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Juri Lelli Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Waiman Long Cc: Will Deacon Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230313204825.2665483-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d24c0144b1dde00f6e7283df3708fcc62dddbaa9 Author: Namhyung Kim Date: Mon Mar 13 13:48:24 2023 -0700 perf lock contention: Show per-cpu rq_lock with address Using the BPF_PROG_RUN mechanism, we can run a raw_tp BPF program to collect some semi-global locks like per-cpu locks. Let's add runqueue locks using bpf_per_cpu_ptr() helper. $ sudo ./perf lock con -abl -- sleep 1 contended total wait max wait avg wait address symbol 248 3.25 ms 32.23 us 13.10 us ffff8cc75cfd2940 siglock 60 217.91 us 9.69 us 3.63 us ffff8cc700061c00 8 70.23 us 13.86 us 8.78 us ffff8cc703629484 4 56.32 us 35.81 us 14.08 us ffff8cc78b66f778 mmap_lock 4 16.70 us 5.18 us 4.18 us ffff8cc7036a0684 3 4.99 us 2.65 us 1.66 us ffff8d053da30c80 rq_lock 2 3.44 us 2.28 us 1.72 us ffff8d053dcf0c80 rq_lock 9 2.51 us 371 ns 278 ns ffff8ccb92479440 2 2.11 us 1.24 us 1.06 us ffff8d053db30c80 rq_lock 2 2.06 us 1.69 us 1.03 us ffff8d053d970c80 rq_lock Signed-off-by: Namhyung Kim Cc: Boqun Feng Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Juri Lelli Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Waiman Long Cc: Will Deacon Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230313204825.2665483-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1811e82767dcc6ebfdb2a57877f1756f067990b8 Author: Namhyung Kim Date: Mon Mar 13 13:48:23 2023 -0700 perf lock contention: Track and show siglock with address Likewise, we can display siglock by following the pointer like current->sighand->siglock. $ sudo ./perf lock con -abl -- sleep 1 contended total wait max wait avg wait address symbol 16 2.18 ms 305.35 us 136.34 us ffffffff92e06080 tasklist_lock 28 521.78 us 31.16 us 18.63 us ffff8cc703783ec4 7 119.03 us 23.55 us 17.00 us ffff8ccb92479440 15 88.29 us 10.06 us 5.89 us ffff8cd560b5f380 siglock 7 37.67 us 9.16 us 5.38 us ffff8d053daf0c80 5 8.81 us 4.92 us 1.76 us ffff8d053d6b0c80 Signed-off-by: Namhyung Kim Cc: Boqun Feng Cc: Hao Luo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Juri Lelli Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Waiman Long Cc: Will Deacon Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230313204825.2665483-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3ace2435bb93445e7713d69336011c46558a18af Author: Namhyung Kim Date: Mon Mar 13 13:48:22 2023 -0700 perf lock contention: Track and show mmap_lock with address Sometimes there are severe contentions on the mmap_lock and we want see it in the -l/--lock-addr output. However it cannot symbolize the mmap_lock because it's allocated dynamically without symbols. Stephane and Hao gave me an idea separately to display mmap_lock by following the current->mm pointer. I added a flag to mark mmap_lock after comparing the lock address so that it can show them differently. With this change it can show mmap_lock like below: $ sudo ./perf lock con -abl -- sleep 10 contended total wait max wait avg wait address symbol ... 16344 312.30 ms 2.22 ms 19.11 us ffff8cc702595640 17686 310.08 ms 1.49 ms 17.53 us ffff8cc7025952c0 3 84.14 ms 45.79 ms 28.05 ms ffff8cc78114c478 mmap_lock 3557 76.80 ms 68.75 us 21.59 us ffff8cc77ca3af58 1 68.27 ms 68.27 ms 68.27 ms ffff8cda745dfd70 9 54.53 ms 7.96 ms 6.06 ms ffff8cc7642a48b8 mmap_lock 14629 44.01 ms 60.00 us 3.01 us ffff8cc7625f9ca0 3481 42.63 ms 140.71 us 12.24 us ffffffff937906ac vmap_area_lock 16194 38.73 ms 42.15 us 2.39 us ffff8cd397cbc560 11 38.44 ms 10.39 ms 3.49 ms ffff8ccd6d12fbb8 mmap_lock 1 5.43 ms 5.43 ms 5.43 ms ffff8cd70018f0d8 1674 5.38 ms 422.93 us 3.21 us ffffffff92e06080 tasklist_lock 581 4.51 ms 130.68 us 7.75 us ffff8cc9b1259058 5 3.52 ms 1.27 ms 703.23 us ffff8cc754510070 112 3.47 ms 56.47 us 31.02 us ffff8ccee38b3120 381 3.31 ms 73.44 us 8.69 us ffffffff93790690 purge_vmap_area_lock 255 3.19 ms 36.35 us 12.49 us ffff8d053ce30c80 Note that mmap_lock was renamed some time ago and it needs to support old kernels with a different name 'mmap_sem'. Suggested-by: Hao Luo Suggested-by: Stephane Eranian Signed-off-by: Namhyung Kim Cc: Boqun Feng Cc: Ingo Molnar Cc: Jiri Olsa Cc: Juri Lelli Cc: Peter Zijlstra Cc: Song Liu Cc: Suren Baghdasaryan Cc: Waiman Long Cc: Will Deacon Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230313204825.2665483-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8d98ca5c02df13c1f750953bca2e308a41df08a9 Author: Ian Rogers Date: Fri Mar 10 22:57:44 2023 -0800 perf build: Error if no libelf and NO_LIBELF isn't set Building without libelf support is going disable a lot of functionality. Require that the NO_LIBELF=1 build option is passed if this is intentional. Committer notes: Add NO_LIBELF=1 to the 'make_static' target in tools/perf/tests/make so that 'make -C tools/perf build-test' works. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Pavithra Gurushankar Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: Stephane Eranian Cc: Tiezhu Yang Cc: Tom Rix Cc: Yang Jihong Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230311065753.3012826-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f1925bd588cfc3ea2e8624404027958955d39121 Author: Ian Rogers Date: Fri Mar 10 22:57:53 2023 -0800 perf build: Remove redundant NO_NEWT build option The option controlled nothing and no code depends, conditional or otherwise, on libnewt. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Pavithra Gurushankar Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: Stephane Eranian Cc: Tiezhu Yang Cc: Tom Rix Cc: Yang Jihong Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230311065753.3012826-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 6898e60f709b0047206110d3ec9f4612210e3ff7 Author: Ian Rogers Date: Fri Mar 10 22:57:51 2023 -0800 perf build: If libtraceevent isn't present error the build If libtraceevent isn't present, the build will warn and continue. This disables a number of features and so isn't desirable. This change makes the build error for this case. The build can still be made to happen by adding NO_LIBTRACEEVENT=1. Committer notes: Add NO_LIBTRACEEVENT=1 to the 'make_static' target in tools/perf/tests/make so that 'make -C tools/perf build-test' works. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Pavithra Gurushankar Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: Stephane Eranian Cc: Tiezhu Yang Cc: Tom Rix Cc: Yang Jihong Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230311065753.3012826-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit d7c4f89af1611530562554a237069deb2b03b312 Author: Ian Rogers Date: Fri Mar 10 22:57:50 2023 -0800 perf build: Switch libpfm4 to opt-out rather than opt-in If libpfm4 passes the feature test, it would be nice to have it enabled rather than also requiring the LIBPFM4=1 build flag. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Pavithra Gurushankar Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: Stephane Eranian Cc: Tiezhu Yang Cc: Tom Rix Cc: Yang Jihong Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230311065753.3012826-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3b4e4efe88f615f160a6c9319a9392d8410f742c Author: Ian Rogers Date: Fri Mar 10 22:57:49 2023 -0800 perf symbol: Add abi::__cxa_demangle C++ demangling support Refactor C++ demangling out of symbol-elf into its own files similar to other languages. Add abi::__cxa_demangle support. As the other demanglers are not shippable with distributions, this brings back C++ demangling in a common case. It isn't perfect as the support for optionally demangling arguments and modifiers isn't present. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Pavithra Gurushankar Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: Stephane Eranian Cc: Tiezhu Yang Cc: Tom Rix Cc: Yang Jihong Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230311065753.3012826-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 4c72e2b35afc414140a59fb3c06ebc54e506c245 Author: Ian Rogers Date: Fri Mar 10 22:57:48 2023 -0800 tools build: Add feature test for abi::__cxa_demangle cxxabi.h is part of libsdtc++ and LLVM's libcxx, providing abi::__cxa_demangle a portable C++ demangler. Add a feature test to detect that the function is available. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Pavithra Gurushankar Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: Stephane Eranian Cc: Tiezhu Yang Cc: Tom Rix Cc: Yang Jihong Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230311065753.3012826-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit dd317df072071903031ab5f91b4823858445c4a0 Author: Ian Rogers Date: Fri Mar 10 22:57:47 2023 -0800 perf build: Make binutil libraries opt in binutils is GPLv3 so distributions cannot ship perf linked against libbfd and libiberty as the licenses are incompatible. Rather than defaulting the build to opting in to libbfd and libiberty support and opting out via NO_LIBBFD=1 and NO_DEMANGLE=1, make building against the libraries optional and enabled with BUILD_NONDISTRO=1. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Pavithra Gurushankar Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: Stephane Eranian Cc: Tiezhu Yang Cc: Tom Rix Cc: Yang Jihong Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230311065753.3012826-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 175f9315f76345e88e3abdc947c1e0030ab99da3 Author: Ian Rogers Date: Fri Mar 10 22:57:46 2023 -0800 perf build: Error if jevents won't work and NO_JEVENTS=1 isn't set Rather than disabling jevents if a sufficient python isn't present error in the build. This avoids the build progressing but the binary being degraded. The build can still succeed by specifying NO_JEVENTS=1 to the build and this is conveyed in the error message. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Pavithra Gurushankar Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: Stephane Eranian Cc: Tiezhu Yang Cc: Tom Rix Cc: Yang Jihong Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230311065753.3012826-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0cd3142f6b238981ed4855217cfa4ee0aa899181 Author: Ian Rogers Date: Fri Mar 10 22:57:45 2023 -0800 perf util: Remove weak sched_getcpu sched_getcpu may not be present and so a feature test and definition exist to workaround this in the build. The feature test is used to define HAVE_SCHED_GETCPU_SUPPORT and so this is sufficient to know whether the local sched_getcpu is needed and a weak symbol can be avoided. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Pavithra Gurushankar Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: Stephane Eranian Cc: Tiezhu Yang Cc: Tom Rix Cc: Yang Jihong Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230311065753.3012826-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 7bafa03f21a6eebfce306ce32635c3adc13815f6 Author: Ian Rogers Date: Fri Mar 10 22:57:43 2023 -0800 perf build: Remove unused HAVE_GLIBC_SUPPORT HAVE_GLIBC_SUPPORT is only used in `perf version --build-options` but doesn't control any behavior. Remove from the build to simplify it. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Pavithra Gurushankar Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: Stephane Eranian Cc: Tiezhu Yang Cc: Tom Rix Cc: Yang Jihong Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230311065753.3012826-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit a980755beb5aca9002e1c95ba519b83a44242b5b Author: Ian Rogers Date: Fri Mar 10 22:57:42 2023 -0800 perf build: Make BUILD_BPF_SKEL default, rename to NO_BPF_SKEL BPF skeleton support is now key to a number of perf features. Rather than making it so that BPF support must be enabled for the build, make this the default and error if the build lacks a clang and libbpf that are sufficient. To avoid the error and build without BPF skeletons the NO_BPF_SKEL=1 flag can be used. Add a build-options flag to 'perf version' to enable detection of the BPF skeleton support and use this in the offcpu shell test. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Pavithra Gurushankar Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: Stephane Eranian Cc: Tiezhu Yang Cc: Tom Rix Cc: Yang Jihong Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230311065753.3012826-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 7a9b223ca0761a7c7c72e569b86b84a907aa0f92 Author: Ian Rogers Date: Fri Mar 10 22:57:41 2023 -0800 perf build: Support python/perf.so testing Add a build target to echo the python/perf.so's name from Makefile.perf. Use it in tests/make so the correct target is built and tested for. Fixes: caec54705adb73b0 ("perf build: Fix python/perf.so library's name") Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Martin Liška Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Pavithra Gurushankar Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: Stephane Eranian Cc: Tiezhu Yang Cc: Tom Rix Cc: Yang Jihong Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230311065753.3012826-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 6bebc06d544ddf7d4ca17ac3a1b94f4728a3cb7f Author: Ian Rogers Date: Sun Jan 15 17:01:15 2023 -0800 perf bpf: Remove pre libbpf 1.0 conditional logic Tests are no longer applicable as libbpf 1.0 can be assumed. Signed-off-by: Ian Rogers Acked/Tested-by: Jiri Olsa Acked/Tested-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Andrii Nakryiko Cc: Christy Lee Cc: Ingo Molnar Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230116010115.490713-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 76a97cf2e169851ff8e3fd9d27028168eff81e37 Author: Ian Rogers Date: Sun Jan 15 17:01:14 2023 -0800 perf build: Remove libbpf pre-1.0 feature tests The feature tests were necessary for libbpf pre-1.0, but as the libbpf implies at least 1.0 we can remove these now. Committer notes: Modified tools/perf/Makefile.config to better reflect the reason for failure when the libbpf present is < 1.0 and LIBBPF_DYNAMIC=1 was asked for. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Tested-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Andrii Nakryiko Cc: Christy Lee Cc: Ingo Molnar Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230116010115.490713-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 56d5229471ee1634bd0eb029f1aa82a8d87c6fed Author: Ian Rogers Date: Sun Jan 15 17:01:13 2023 -0800 tools build: Pass libbpf feature only if libbpf 1.0+ libbpf 1.0 represented a cleanup and stabilization of APIs. Simplify development by only passing the feature test if libbpf 1.0 is installed. Committer notes: Change 'make -C tools/perf build-test' so that the LIBBPF_DYNAMIC=1 test runs only if libbpf is >= 1.0. Signed-off-by: Ian Rogers Tested-by: Jiri Olsa Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andres Freund Cc: Andrii Nakryiko Cc: Christy Lee Cc: Ingo Molnar Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Quentin Monnet Cc: Roberto Sassu Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230116010115.490713-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 68070b76c4aac9369d7f84d802111ef83a7ff943 Author: Ankit Nautiyal Date: Thu Feb 23 17:25:09 2023 +0530 drm/i915/dp: Don't roundup max bpp, while computing compressed bpp While computing compressed bpp, maximum value of bits_per_pixel is calculated that can be supported with the given link configuration for a given mode. Avoid rounding up of this max bits_per_pixel. Also improve documentation for computing max bits_per_pixel. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy Signed-off-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20230223115509.3980226-1-ankit.k.nautiyal@intel.com commit c87e859cdeb5d106cb861326e3135c606d61f88d Author: Marian Cichy Date: Mon Mar 6 12:52:49 2023 +0100 drm/imx/lcdc: Implement DRM driver for imx25 Add support for the LCD Controller found on i.MX21 and i.MX25. It targets to be a drop in replacement for the imx-fb driver. [ukl: Rebase to a newer kernel version, various smaller fixes and improvements] Signed-off-by: Marian Cichy Reviewed-by: Philipp Zabel Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230306115249.2223042-2-u.kleine-koenig@pengutronix.de Signed-off-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/20230306115249.2223042-3-u.kleine-koenig@pengutronix.de commit 492054f74adc4f21716588824673c45029d554a0 Author: Uwe Kleine-König Date: Mon Mar 6 12:52:48 2023 +0100 dt-bindings: display: imx: Describe drm binding for fsl,imx-lcdc Modify the existing (fb-like) binding to support the drm-like binding in parallel. Reviewed-by: Rob Herring Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230306115249.2223042-2-u.kleine-koenig@pengutronix.de Signed-off-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/20230306115249.2223042-2-u.kleine-koenig@pengutronix.de commit faa63656fc361e78ebccb288c0be638a6a4ffe35 Author: Yixing Liu Date: Sat Mar 4 17:15:54 2023 +0800 RDMA/hns: Add new command to support query vf caps The current resource query for vf caps is driven by the driver, which is unreasonable. This patch adds a new command HNS_ROCE_OPC_QUERY_VF_CAPS_NUM to support obtaining vf caps information from firmware. Signed-off-by: Yixing Liu Signed-off-by: Haoyue Xu Link: https://lore.kernel.org/r/20230304091555.2241298-2-xuhaoyue1@hisilicon.com Signed-off-by: Leon Romanovsky commit b73a0b80c69de77d8d4942abb37066531c0169b2 Author: Natalia Petrova Date: Fri Mar 3 15:44:08 2023 +0300 RDMA/rdmavt: Delete unnecessary NULL check There is no need to check 'rdi->qp_dev' for NULL. The field 'qp_dev' is created in rvt_register_device() which will fail if the 'qp_dev' allocation fails in rvt_driver_qp_init(). Overwise this pointer doesn't changed and passed to rvt_qp_exit() by the next step. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 0acb0cc7ecc1 ("IB/rdmavt: Initialize and teardown of qpn table") Signed-off-by: Natalia Petrova Link: https://lore.kernel.org/r/20230303124408.16685-1-n.petrova@fintech.ru Signed-off-by: Leon Romanovsky commit a3e8c919b9930e31b705ec7b2f898a59e213a393 Author: Damian Muszynski Date: Fri Mar 3 17:56:50 2023 +0100 crypto: qat - add support for 402xx devices QAT_402xx is a derivative of 4xxx. Add support for that device in the qat_4xxx driver by including the DIDs (both PF and VF), extending the probe and the firmware loader. 402xx uses different firmware images than 4xxx. To allow that the logic that selects the firmware images was modified. Signed-off-by: Damian Muszynski Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit b2ca29501c2b60934094fb59113a1c44f56f66f4 Author: Neal Liu Date: Wed Mar 1 11:32:05 2023 +0800 crypto: aspeed - fix uninitialized symbol 'idx' warning 'idx' is not initialized if it's not EXP_MODE nor MOD_MODE. Use "else" instead to fix it. Signed-off-by: Neal Liu Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202302261052.CVFRyq6F-lkp@intel.com/ Signed-off-by: Herbert Xu commit 06e39357c36b0d3cc2779d08ed04cb389eaa22ba Author: Horia Geanta Date: Wed Mar 1 00:07:58 2023 +0530 drivers: crypto: caam/jr - Allow quiesce when quiesced Issues: - Job ring device is busy when do kexec reboot - Failed to flush job ring when do system suspend-resume Fix: Flush the job ring to stop the running jobs. Signed-off-by: Horia Geanta Signed-off-by: Franck LENORMAND Reviewed-by: Pankaj Gupta Signed-off-by: Herbert Xu commit ca25c00ccbc5f942c63897ed23584cfc66e8ec81 Author: Jonathan McDowell Date: Tue Feb 28 18:28:58 2023 +0000 crypto: safexcel - Cleanup ring IRQ workqueues on load failure A failure loading the safexcel driver results in the following warning on boot, because the IRQ affinity has not been correctly cleaned up. Ensure we clean up the affinity and workqueues on a failure to load the driver. crypto-safexcel: probe of f2800000.crypto failed with error -2 ------------[ cut here ]------------ WARNING: CPU: 1 PID: 232 at kernel/irq/manage.c:1913 free_irq+0x300/0x340 Modules linked in: hwmon mdio_i2c crypto_safexcel(+) md5 sha256_generic libsha256 authenc libdes omap_rng rng_core nft_masq nft_nat nft_chain_nat nf_nat nft_ct nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables libcrc32c nfnetlink fuse autofs4 CPU: 1 PID: 232 Comm: systemd-udevd Tainted: G W 6.1.6-00002-g9d4898824677 #3 Hardware name: MikroTik RB5009 (DT) pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : free_irq+0x300/0x340 lr : free_irq+0x2e0/0x340 sp : ffff800008fa3890 x29: ffff800008fa3890 x28: 0000000000000000 x27: 0000000000000000 x26: ffff8000008e6dc0 x25: ffff000009034cac x24: ffff000009034d50 x23: 0000000000000000 x22: 000000000000004a x21: ffff0000093e0d80 x20: ffff000009034c00 x19: ffff00000615fc00 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 000075f5c1584c5e x14: 0000000000000017 x13: 0000000000000000 x12: 0000000000000040 x11: ffff000000579b60 x10: ffff000000579b62 x9 : ffff800008bbe370 x8 : ffff000000579dd0 x7 : 0000000000000000 x6 : ffff000000579e18 x5 : ffff000000579da8 x4 : ffff800008ca0000 x3 : ffff800008ca0188 x2 : 0000000013033204 x1 : ffff000009034c00 x0 : ffff8000087eadf0 Call trace: free_irq+0x300/0x340 devm_irq_release+0x14/0x20 devres_release_all+0xa0/0x100 device_unbind_cleanup+0x14/0x60 really_probe+0x198/0x2d4 __driver_probe_device+0x74/0xdc driver_probe_device+0x3c/0x110 __driver_attach+0x8c/0x190 bus_for_each_dev+0x6c/0xc0 driver_attach+0x20/0x30 bus_add_driver+0x148/0x1fc driver_register+0x74/0x120 __platform_driver_register+0x24/0x30 safexcel_init+0x48/0x1000 [crypto_safexcel] do_one_initcall+0x4c/0x1b0 do_init_module+0x44/0x1cc load_module+0x1724/0x1be4 __do_sys_finit_module+0xbc/0x110 __arm64_sys_finit_module+0x1c/0x24 invoke_syscall+0x44/0x110 el0_svc_common.constprop.0+0xc0/0xe0 do_el0_svc+0x20/0x80 el0_svc+0x14/0x4c el0t_64_sync_handler+0xb0/0xb4 el0t_64_sync+0x148/0x14c ---[ end trace 0000000000000000 ]--- Fixes: 1b44c5a60c13 ("inside-secure - add SafeXcel EIP197 crypto engine driver") Signed-off-by: Jonathan McDowell Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu commit 86e8e3ce4ba3a55f5a603a60366aaa61560dda2a Author: Jonathan McDowell Date: Tue Feb 28 18:28:40 2023 +0000 crypto: safexcel - Raise firmware load failure message to error At the moment if there is no firmware available for the safexcel driver it will fail to load with a cryptic: crypto-safexcel f2800000.crypto: TRC init: 15360d,80a (48r,256h) crypto-safexcel f2800000.crypto: HW init failed (-2) Raise the logging level of the firmware load failure to err rather than dbg so that it's obvious what the reason for the HW init failure is. Signed-off-by: Jonathan McDowell Reviewed-by: Antoine Tenart Signed-off-by: Herbert Xu commit 88fca80ec9394f06adae712da409748171ad9d95 Author: Shashank Gupta Date: Mon Feb 27 15:55:45 2023 -0500 crypto: qat - make state machine functions static The state machine functions adf_dev_init(), adf_dev_start(), adf_dev_stop() adf_dev_shutdown() and adf_dev_shutdown_cache_cfg() are only used internally within adf_init.c. Do not export these functions and make them static as state transitions are now performed using the safe function adf_dev_up() and adf_dev_down(). This commit does not implement any functional change. Signed-off-by: Shashank Gupta Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit b97c5377d659863ac4e64eef5c5b8f0524e95fdb Author: Shashank Gupta Date: Mon Feb 27 15:55:44 2023 -0500 crypto: qat - refactor device restart logic Refactor the restart logic by moving it into the function adf_dev_restart() which uses the safe function adf_dev_up() and adf_dev_down(). This commit does not implement any functional change. Signed-off-by: Shashank Gupta Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 2b60f79c7b8105994f0daa46bb4e367fdc866b53 Author: Shashank Gupta Date: Mon Feb 27 15:55:43 2023 -0500 crypto: qat - replace state machine calls The device state machine functions are unsafe and interdependent on each other. To perform a state transition, these shall be called in a specific order: * device up: adf_dev_init() -> adf_dev_start() * device down: adf_dev_stop() -> adf_dev_shutdown() Replace all the state machine functions used in the QAT driver with the safe wrappers adf_dev_up() and adf_dev_down(). Signed-off-by: Shashank Gupta Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 1bdc85550a2b59bb7f62ead7173134e66dd2d60e Author: Shashank Gupta Date: Mon Feb 27 15:55:42 2023 -0500 crypto: qat - fix concurrency issue when device state changes The sysfs `state` attribute is not protected against race conditions. If multiple processes perform a device state transition on the same device in parallel, unexpected behaviors might occur. For transitioning the device state, adf_sysfs.c calls the functions adf_dev_init(), adf_dev_start(), adf_dev_stop() and adf_dev_shutdown() which are unprotected and interdependent on each other. To perform a state transition, these functions needs to be called in a specific order: * device up: adf_dev_init() -> adf_dev_start() * device down: adf_dev_stop() -> adf_dev_shutdown() This change introduces the functions adf_dev_up() and adf_dev_down() which wrap the state machine functions and protect them with a per-device lock. These are then used in adf_sysfs.c instead of the individual state transition functions. Fixes: 5ee52118ac14 ("crypto: qat - expose device state through sysfs for 4xxx") Signed-off-by: Shashank Gupta Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 59a0ab49536eba9f03748781c7f061d72a70f376 Author: Shashank Gupta Date: Mon Feb 27 15:55:41 2023 -0500 crypto: qat - delay sysfs initialization The function adf_sysfs_init() is used by qat_4xxx to create sysfs attributes. This is called by the probe function before starting a device. With this sequence, there might be a chance that the sysfs entries for configuration might be changed by a user while the driver is performing a device bring-up causing unexpected behaviors. Delay the creation of sysfs entries after adf_dev_start(). Signed-off-by: Shashank Gupta Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit f900fde28883602b6c5e1027a6c912b673382aaf Author: Eric Biggers Date: Mon Feb 27 10:29:47 2023 -0800 crypto: testmgr - fix RNG performance in fuzz tests The performance of the crypto fuzz tests has greatly regressed since v5.18. When booting a kernel on an arm64 dev board with all software crypto algorithms and CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled, the fuzz tests now take about 200 seconds to run, or about 325 seconds with lockdep enabled, compared to about 5 seconds before. The root cause is that the random number generation has become much slower due to commit d4150779e60f ("random32: use real rng for non-deterministic randomness"). On my same arm64 dev board, at the time the fuzz tests are run, get_random_u8() is about 345x slower than prandom_u32_state(), or about 469x if lockdep is enabled. Lockdep makes a big difference, but much of the rest comes from the get_random_*() functions taking a *very* slow path when the CRNG is not yet initialized. Since the crypto self-tests run early during boot, even having a hardware RNG driver enabled (CONFIG_CRYPTO_DEV_QCOM_RNG in my case) doesn't prevent this. x86 systems don't have this issue, but they still see a significant regression if lockdep is enabled. Converting the "Fully random bytes" case in generate_random_bytes() to use get_random_bytes() helps significantly, improving the test time to about 27 seconds. But that's still over 5x slower than before. This is all a bit silly, though, since the fuzz tests don't actually need cryptographically secure random numbers. So let's just make them use a non-cryptographically-secure RNG as they did before. The original prandom_u32() is gone now, so let's use prandom_u32_state() instead, with an explicitly managed state, like various other self-tests in the kernel source tree (rbtree_test.c, test_scanf.c, etc.) already do. This also has the benefit that no locking is required anymore, so performance should be even better than the original version that used prandom_u32(). Fixes: d4150779e60f ("random32: use real rng for non-deterministic randomness") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 47446d7cd42358ca7d7a544f2f7823db03f616ff Author: Eric Biggers Date: Sun Feb 26 22:32:23 2023 -0800 crypto: arm64/aes-neonbs - fix crash with CFI enabled aesbs_ecb_encrypt(), aesbs_ecb_decrypt(), aesbs_xts_encrypt(), and aesbs_xts_decrypt() are called via indirect function calls. Therefore they need to use SYM_TYPED_FUNC_START instead of SYM_FUNC_START to cause their type hashes to be emitted when the kernel is built with CONFIG_CFI_CLANG=y. Otherwise, the code crashes with a CFI failure if the compiler doesn't happen to optimize out the indirect calls. Fixes: c50d32859e70 ("arm64: Add types to indirect called assembly functions") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit a1862c3b0875a0cdfa0e30c508855324577e124b Author: Neal Liu Date: Fri Feb 24 10:05:21 2023 +0800 crypto: aspeed - add error handling if dmam_alloc_coherent() failed Since the acry_dev->buf_addr may be NULL, add error handling to prevent any additional access to avoid potential issues. Signed-off-by: Neal Liu Signed-off-by: Herbert Xu commit f84155ca851849e5e8981fddd3945a6cfeea220c Author: Anthony Yznaga Date: Wed Feb 22 16:33:12 2023 -0800 padata: use alignment when calculating the number of worker threads For multithreaded jobs the computed chunk size is rounded up by the caller-specified alignment. However, the number of worker threads to use is computed using the minimum chunk size without taking alignment into account. A sufficiently large alignment value can result in too many worker threads being allocated for the job. Signed-off-by: Anthony Yznaga Acked-by: Daniel Jordan Signed-off-by: Herbert Xu commit 1e6204451fb8b14356d8a4c7fd692318edd4a99a Author: Vladimir Zapolskiy Date: Wed Feb 22 19:22:40 2023 +0200 crypto: qce - Add a QCE IP family compatible 'qcom,qce' The added 'qcom,qce' compatible value will serve as a sole QCE IP family compatible, since a particular QCE IP version is discoverablem thus, if it'd be needed to differentiate various IP versions, it can be obtained in runtime. Two IP version based compatibles are left untouched to preserve backward DTB ABI compatibility. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Konrad Dybcio Signed-off-by: Herbert Xu commit 167af1f338f55250e0c4792f53b02cd761765228 Author: Thara Gopinath Date: Wed Feb 22 19:22:39 2023 +0200 crypto: qce - Make clocks optional On certain Snapdragon processors, the crypto engine clocks are enabled by default by security firmware and the driver should not handle the clocks. Make acquiring of all the clocks optional in crypto engine driver, so that the driver initializes properly even if no clocks are specified in the dt. Tested-by: Jordan Crouse Signed-off-by: Thara Gopinath Signed-off-by: Bhupesh Sharma [Bhupesh: Massage the commit log] Signed-off-by: Vladimir Zapolskiy Signed-off-by: Herbert Xu commit 694ff00c9bb387f61ab2b12ad3f7918407686e53 Author: Thara Gopinath Date: Wed Feb 22 19:22:38 2023 +0200 crypto: qce - Add support to initialize interconnect path Crypto engine on certain Snapdragon processors like sm8150, sm8250, sm8350 etc. requires interconnect path between the engine and memory to be explicitly enabled and bandwidth set prior to any operations. Add support in the qce core to enable the interconnect path appropriately. Tested-by: Jordan Crouse Signed-off-by: Thara Gopinath [Bhupesh: Make header file inclusion alphabetical and use devm_of_icc_get()] Signed-off-by: Bhupesh Sharma [vladimir: moved icc bandwidth setup closer to its acquisition] Signed-off-by: Vladimir Zapolskiy Reviewed-by: Konrad Dybcio Signed-off-by: Herbert Xu commit e47a80784306a544a58f5c7febaaa3cc646f51a2 Author: Vladimir Zapolskiy Date: Wed Feb 22 19:22:37 2023 +0200 arm64: dts: qcom: sm8550: add QCE IP family compatible values Add a family compatible for QCE IP on SM8550 SoC, which is equal to QCE IP found on SM8150 SoC and described in the recently updated device tree bindings documentation, as well add a generic QCE IP family compatible. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Vladimir Zapolskiy Reviewed-by: Neil Armstrong Signed-off-by: Herbert Xu commit faf8cced333be38d30dcc69ecf33475a10dd8e21 Author: Vladimir Zapolskiy Date: Wed Feb 22 19:22:36 2023 +0200 dt-bindings: qcom-qce: document optional clocks and clock-names properties On newer Qualcomm SoCs the crypto engine clocks are enabled by default by security firmware. To drop clocks and clock-names from the list of required properties use 'qcom,sm8150-qce' compatible name. The change is based on Neil Armstrong's observation and an original change. Cc: Neil Armstrong Signed-off-by: Vladimir Zapolskiy Reviewed-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit 00f3bc2db351911700b3e951227e124a03b8a0bf Author: Vladimir Zapolskiy Date: Wed Feb 22 19:22:35 2023 +0200 dt-bindings: qcom-qce: Add new SoC compatible strings for Qualcomm QCE IP Introduce a generic IP family compatible 'qcom,qce' and its two derivatives based on SoC names rather than on IP versions. Having a generic compatible is only partially sufficient, the QCE IP version can be discovered in runtime, however there are two known groups of QCE IP versions, which require different DT properties, these two groups are populated with SoC based compatibles known at the moment. Keep the old compatible 'qcom,crypto-v5.1' and document an existing and already used but not previously documented compatible 'qcom,crypto-v5.4' for backward compatibility of DTB ABI, mark both of the compatibles as deprecated. The change is based on the original one written by Bhupesh Sharma, adding a generic family compatible is suggested by Neil Armstrong. Cc: Bhupesh Sharma Cc: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Signed-off-by: Vladimir Zapolskiy Signed-off-by: Herbert Xu commit c168dc4b513b66e24ff70800203406c41579ace2 Author: Bhupesh Sharma Date: Wed Feb 22 19:22:34 2023 +0200 dt-bindings: qcom-qce: Add 'iommus' to optional properties Add the missing optional property - 'iommus' to the device-tree binding documentation for qcom-qce crypto IP. This property describes the phandle(s) to apps_smmu node with sid mask. Cc: Bjorn Andersson Reviewed-by: Rob Herring Tested-by: Jordan Crouse Signed-off-by: Bhupesh Sharma Signed-off-by: Vladimir Zapolskiy Signed-off-by: Herbert Xu commit 1727c0ed50a6d94af5042dd02752a4264be5dc98 Author: Bhupesh Sharma Date: Wed Feb 22 19:22:33 2023 +0200 dt-bindings: qcom-qce: Add 'interconnects' and 'interconnect-names' Add 'interconnects' and 'interconnect-names' as optional properties to the device-tree binding documentation for Qualcomm crypto IP. These properties describe the interconnect path between crypto and main memory and the interconnect type respectively. Cc: Bjorn Andersson Acked-by: Rob Herring Tested-by: Jordan Crouse Signed-off-by: Bhupesh Sharma Signed-off-by: Vladimir Zapolskiy Signed-off-by: Herbert Xu commit ff21cdae3d023c35da7c59477a38e2bcfd59e579 Author: Bhupesh Sharma Date: Wed Feb 22 19:22:32 2023 +0200 MAINTAINERS: Add qcom-qce dt-binding file to QUALCOMM CRYPTO DRIVERS section Add the entry for 'Documentation/devicetree/bindings/crypto/qcom-qce.yaml' to the appropriate section for 'QUALCOMM CRYPTO DRIVERS' in MAINTAINERS file. Reviewed-by: Bjorn Andersson Signed-off-by: Bhupesh Sharma Signed-off-by: Vladimir Zapolskiy Signed-off-by: Herbert Xu commit ac25b471f26dd35cd374781b7a4c0eedfccd809b Author: Bhupesh Sharma Date: Wed Feb 22 19:22:31 2023 +0200 dt-bindings: qcom-qce: Convert bindings to yaml Convert Qualcomm QCE crypto devicetree binding to YAML. Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Tested-by: Jordan Crouse Signed-off-by: Bhupesh Sharma Signed-off-by: Vladimir Zapolskiy Signed-off-by: Herbert Xu commit 45a4672b9a6e292e3c76b3eae656ac2c5540b423 Author: Danny Tsen Date: Mon Feb 20 22:40:21 2023 -0500 crypto: p10-aes-gcm - Update Kconfig and Makefile Defined CRYPTO_AES_GCM_P10 in Kconfig to support AES/GCM stitched implementation for Power10 or later CPU. Added a new module driver aes-gcm-p10-crypto. Signed-off-by: Danny Tsen Signed-off-by: Herbert Xu commit 08b50d847dfd82df031cd34337743da2445ac949 Author: Danny Tsen Date: Mon Feb 20 22:40:20 2023 -0500 crypto: p10-aes-gcm - A perl script to process PowerPC assembler source. Signed-off-by: Danny Tsen Signed-off-by: Herbert Xu commit 55d762da6f042eb1c02a49858b31cd4a787bc7c7 Author: Danny Tsen Date: Mon Feb 20 22:40:19 2023 -0500 crypto: p10-aes-gcm - Supporting functions for ghash This perl code is taken from the OpenSSL project and added gcm_init_htable function used in the aes-gcm-p10-glue.c code to initialize hash table. gcm_hash_p8 is used to hash encrypted data blocks. Signed-off-by: Danny Tsen Signed-off-by: Herbert Xu commit 34ce627920407d65f1b5c1cd75871cc5f4b6219b Author: Danny Tsen Date: Mon Feb 20 22:40:18 2023 -0500 crypto: p10-aes-gcm - Supporting functions for AES This code is taken from CRYPTOGAMs[1]. The following functions are used, aes_p8_set_encrypt_key is used to generate AES round keys and aes_p8_encrypt is used to encrypt single block. Signed-off-by: Danny Tsen Signed-off-by: Herbert Xu commit fd0e9b3e2ee6396526f4f594c10958511b100bb6 Author: Danny Tsen Date: Mon Feb 20 22:40:17 2023 -0500 crypto: p10-aes-gcm - An accelerated AES/GCM stitched implementation Improve overall performance of AES/GCM encrypt and decrypt operations for Power10 or later CPU. Signed-off-by: Danny Tsen Signed-off-by: Herbert Xu commit cdcecfd9991fe9aac8160a9731b0ffd1e702d19d Author: Danny Tsen Date: Mon Feb 20 22:40:16 2023 -0500 crypto: p10-aes-gcm - Glue code for AES/GCM stitched implementation Signed-off-by: Danny Tsen Signed-off-by: Herbert Xu commit e70a329832df84e25ed47cbdc5c96276331356b3 Author: Yang Li Date: Tue Feb 21 09:34:14 2023 +0800 crypto: ccree - Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Acked-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit 995cad04ea7586ceb5a3beeecbdb042532630211 Author: Yang Li Date: Mon Feb 20 20:39:21 2023 +0800 crypto: aspeed - Use devm_platform_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to Use devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Signed-off-by: Herbert Xu commit c6ffae6e0c43452b5eeb7945dc7da75ee6249f13 Author: Heiner Kallweit Date: Sat Feb 18 21:57:18 2023 +0100 hwrng: meson - remove not needed call to platform_set_drvdata drvdata isn't used, therefore remove this call. Signed-off-by: Heiner Kallweit Reviewed-by: Martin Blumenstingl Signed-off-by: Herbert Xu commit 55a66f91b20b59dfd5aae3ede130ac8a1dacae75 Author: Heiner Kallweit Date: Sat Feb 18 21:56:39 2023 +0100 hwrng: meson - use devm_clk_get_optional_enabled Use devm_clk_get_optional_enabled() to simplify the code. Signed-off-by: Heiner Kallweit Reviewed-by: Martin Blumenstingl Signed-off-by: Herbert Xu commit b521d0a183f76b1b8f9b0238605c6a2780d299bc Author: Heiner Kallweit Date: Sat Feb 18 21:55:32 2023 +0100 hwrng: meson - remove unused member of struct meson_rng_data Member pdev isn't used, remove it. Signed-off-by: Heiner Kallweit Reviewed-by: Martin Blumenstingl Signed-off-by: Herbert Xu commit 0bedc99203724900b1d05df69e24bdbb1d3e6545 Author: Thomas Weißschuh Date: Fri Feb 17 03:17:49 2023 +0000 padata: Make kobj_type structure constant Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Signed-off-by: Thomas Weißschuh Acked-by: Daniel Jordan Signed-off-by: Herbert Xu commit c0f9e01dd266b8a8f674d9f6a388972b81be1641 Author: Herbert Xu Date: Thu Feb 16 18:35:28 2023 +0800 crypto: api - Check CRYPTO_USER instead of NET for report The report function is currently conditionalised on CONFIG_NET. As it's only used by CONFIG_CRYPTO_USER, conditionalising on that instead of CONFIG_NET makes more sense. This gets rid of a rarely used code-path. Signed-off-by: Herbert Xu commit 0c0edf6168ce1e02518ba44400b9269a13c3b9e6 Author: Herbert Xu Date: Thu Feb 16 18:35:25 2023 +0800 crypto: api - Move MODULE_ALIAS_CRYPTO to algapi.h This is part of the low-level API and should not be exposed to top-level Crypto API users. Signed-off-by: Herbert Xu commit 9807e49b6aab3451b00a99ced42acb4a535e8e22 Author: Herbert Xu Date: Thu Feb 16 18:35:23 2023 +0800 crypto: rng - Count error stats differently Move all stat code specific to rng into the rng code. While we're at it, change the stats so that bytes and counts are always incremented even in case of error. This allows the reference counting to be removed as we can now increment the counters prior to the operation. After the operation we simply increase the error count if necessary. This is safe as errors can only occur synchronously (or rather, the existing code already ignored asynchronous errors which are only visible to the callback function). Signed-off-by: Herbert Xu commit 1085680bbb7a5235351937bea938c7051b443103 Author: Herbert Xu Date: Thu Feb 16 18:35:21 2023 +0800 crypto: skcipher - Count error stats differently Move all stat code specific to skcipher into the skcipher code. While we're at it, change the stats so that bytes and counts are always incremented even in case of error. This allows the reference counting to be removed as we can now increment the counters prior to the operation. After the operation we simply increase the error count if necessary. This is safe as errors can only occur synchronously (or rather, the existing code already ignored asynchronous errors which are only visible to the callback function). Signed-off-by: Herbert Xu commit e2950bf166ef71ed5588437b7ee94f65ceaa6cd0 Author: Herbert Xu Date: Thu Feb 16 18:35:19 2023 +0800 crypto: kpp - Count error stats differently Move all stat code specific to kpp into the kpp code. While we're at it, change the stats so that bytes and counts are always incremented even in case of error. This allows the reference counting to be removed as we can now increment the counters prior to the operation. After the operation we simply increase the error count if necessary. This is safe as errors can only occur synchronously (or rather, the existing code already ignored asynchronous errors which are only visible to the callback function). Signed-off-by: Herbert Xu commit 0a742389bcc00053d63b5271fefb00d3a338d512 Author: Herbert Xu Date: Thu Feb 16 18:35:17 2023 +0800 crypto: acomp - Count error stats differently Move all stat code specific to acomp into the acomp code. While we're at it, change the stats so that bytes and counts are always incremented even in case of error. This allows the reference counting to be removed as we can now increment the counters prior to the operation. After the operation we simply increase the error count if necessary. This is safe as errors can only occur synchronously (or rather, the existing code already ignored asynchronous errors which are only visible to the callback function). Signed-off-by: Herbert Xu commit 42808e5dc602c12ef3eb42cf96cb416b55205fa4 Author: Herbert Xu Date: Thu Feb 16 18:35:15 2023 +0800 crypto: hash - Count error stats differently Move all stat code specific to hash into the hash code. While we're at it, change the stats so that bytes and counts are always incremented even in case of error. This allows the reference counting to be removed as we can now increment the counters prior to the operation. After the operation we simply increase the error count if necessary. This is safe as errors can only occur synchronously (or rather, the existing code already ignored asynchronous errors which are only visible to the callback function). Signed-off-by: Herbert Xu commit 035d78a11c56828bb4923fa87eeb9ed2546d52bd Author: Herbert Xu Date: Thu Feb 16 18:35:13 2023 +0800 crypto: akcipher - Count error stats differently Move all stat code specific to akcipher into the akcipher code. While we're at it, change the stats so that bytes and counts are always incremented even in case of error. This allows the reference counting to be removed as we can now increment the counters prior to the operation. After the operation we simply increase the error count if necessary. This is safe as errors can only occur synchronously (or rather, the existing code already ignored asynchronous errors which are only visible to the callback function). Signed-off-by: Herbert Xu commit 0df4adf8682a017e43579ac8c9ec1a31c538e940 Author: Herbert Xu Date: Thu Feb 16 18:35:11 2023 +0800 crypto: aead - Count error stats differently Move all stat code specific to aead into the aead code. While we're at it, change the stats so that bytes and counts are always incremented even in case of error. This allows the reference counting to be removed as we can now increment the counters prior to the operation. After the operation we simply increase the error count if necessary. This is safe as errors can only occur synchronously (or rather, the existing code already ignored asynchronous errors which are only visible to the callback function). Signed-off-by: Herbert Xu commit ed0733eaa579c49dbfeaec14d4071a69a49fdde4 Author: Herbert Xu Date: Thu Feb 16 18:35:09 2023 +0800 crypto: algapi - Move stat reporting into algapi The stats code resurrected the unions from the early days of kernel crypto. This patch starts the process of moving them out to the individual type structures as we do for everything else. In particular, add a report_stat function to cra_type and call that from the stats code if available. This allows us to move the actual code over one-by-one. Signed-off-by: Herbert Xu commit a71b772ba063c47a3d70381dc32448cd5e324b34 Author: Herbert Xu Date: Wed Feb 15 16:34:38 2023 +0800 crypto: qat - Include algapi.h for low-level Crypto API Include crypto/algapi.h instead of linux/crypto.h in adf_ctl_drv.c as this is using the low-level Crypto API. It just happens to work currently because MODULE_ALIAS_CRYPTO was mistakenly added to linux/crypto.h. Signed-off-by: Herbert Xu Acked-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 0e44db95eecb30aade0cac6cb8450e8bceeff4d2 Author: Uwe Kleine-König Date: Tue Feb 14 17:28:29 2023 +0100 hwrng: xgene - Improve error reporting for problems during .remove() Returning an error value in a platform driver's remove callback results in a generic error message being emitted by the driver core, but otherwise it doesn't make a difference. The device goes away anyhow. As the driver already emits a better error message than the core, suppress the generic error message by returning zero unconditionally. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu commit bc37c98a3d44f705f30fa39a9b9f46a0837c856e Author: Jani Nikula Date: Thu Mar 2 18:16:17 2023 +0200 drm/i915/debugfs: move IPS debugfs to hsw_ips.c Follow the style of placing debugfs next to the implementation. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230302161617.2978821-1-jani.nikula@intel.com commit ba179ae131c9f998709fc6887ad0f875f23d393a Author: Krzysztof Kozlowski Date: Sun Mar 12 21:13:35 2023 +0100 arm64: dts: imx8: align thermal node names with bindings Bindings expect thermal node names to end with '-thermal': imx8qxp-mek.dtb: thermal-zones: 'pmic-thermal0' does not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 132401ccab235150bcbf25bfc704eb8b84908707 Author: Alexander Stein Date: Thu Mar 9 16:04:10 2023 +0100 arm64: dts: imx8mp-tqma8mpql-mba8mpxl: Enable wakeup-source for GPIO buttons These buttons are capable of waking up a suspended system, add the appropriate property for both. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 20d4640bd0d7f3b23acdbf83d1440a49ec29b724 Author: Markus Niebel Date: Wed Mar 8 13:48:29 2023 +0100 arm64: dts: imx93: add missing tpm pwm instances TPM1/TPM3 are missing, add them. Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 0253e1cb6300d50c6f6b3edd7b5a570fa92e8fcd Author: Lucas Stach Date: Tue Feb 28 18:02:47 2023 +0100 arm64: dts: imx8mp-debix: add USB host support This adds support for the 4 USB3 host ports on the board, which are connected to the i.MX8MP SoC via a Realtek RTS5411 hub. As the schematic for the board is not available, I could not validate that this really reflects the reality, but I modeled things after the hacked in usage of the GPIOs in the downstream kernel. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo commit 614bef7e2727f35ff7edb7f41354e4e5c655590c Author: Rob Herring Date: Fri Mar 10 08:46:55 2023 -0600 ARM: imx: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Signed-off-by: Shawn Guo commit 70dc8a098cddc5d5b5a5d9a6e7e4887c8e0575c6 Author: Rob Herring Date: Fri Mar 10 08:46:54 2023 -0600 ARM: mxs: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Signed-off-by: Shawn Guo commit d7e2ebf484a30570a2ed77719a91d87fdbbdb1ee Author: Fabio Estevam Date: Tue Mar 7 22:16:28 2023 -0300 arm64: defconfig: Enable i.MX93 ADC support Enable the i.MX93 ADC driver by default. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit f3bf9c153642ec8b87804a4e8582dd6f6ed0ad10 Author: Stefan Wahren Date: Tue Mar 7 19:40:07 2023 +0100 ARM: dts: imx28-tx28: add SPDX-License-Identifier Replace the license blob by a clean SPDX-License-Identifier with GPL2 or MIT even if X11 is specified in the original blob since the actual license text corresponds to a MIT license. Signed-off-by: Stefan Wahren Cc: Lothar Waßmann Acked-by: Lothar Waßmann Signed-off-by: Shawn Guo commit 8d59bf1568ede4b239e1ee3335307cf228a76410 Author: Stefan Wahren Date: Tue Mar 7 19:40:06 2023 +0100 ARM: dts: imx28-ts4600: Convert to use label references This Technologic board file still use node name and unit address to reference parts from the imx28.dtsi . This causes a lot of redundancy. So use label references in order to make it easier to maintain. Signed-off-by: Stefan Wahren Signed-off-by: Shawn Guo commit 89b83148b34bf0719f9a650586c2ef28040d8efb Author: Stefan Wahren Date: Tue Mar 7 19:40:05 2023 +0100 ARM: dts: imx28-evk: Convert to use label references This Freescale board file still use node name and unit address to reference parts from the imx28.dtsi . This causes a lot of redundancy. So use label references in order to make it easier to maintain. Signed-off-by: Stefan Wahren Cc: NXP Linux Team Signed-off-by: Shawn Guo commit 1e899432085ac811748c7f3fee967471ed4a75d6 Author: Stefan Wahren Date: Tue Mar 7 19:40:04 2023 +0100 ARM: dts: imx28-duckbill-2: Include base board All additional I2SE Duckbill 2 variants always have the same base board in common. So consider this by including the base board and avoid a lot of redundancy. Special care needs to be taken of the SPI variant. ssp2 is used as SD card interface on the base board, but on the SPI variant it's downgrade to a SPI interface to connect the QCA7000. So the SD card properties must be deleted. Signed-off-by: Stefan Wahren Cc: Michael Heimpold Signed-off-by: Shawn Guo commit bad4d335d7c1b6be43e22adf5c5a279a4f5035e5 Author: Stefan Wahren Date: Tue Mar 7 19:40:03 2023 +0100 ARM: dts: imx28-duckbill: Convert to use label references These I2SE board files still use node name and unit address to reference parts from the imx28.dtsi . This causes a lot of redundancy. So use label references in order to make it easier to maintain. Signed-off-by: Stefan Wahren Cc: Michael Heimpold Signed-off-by: Shawn Guo commit 0b80d1ab87a4aa598919270096c2a39e98d6f7e7 Author: Stefan Wahren Date: Tue Mar 7 19:40:02 2023 +0100 ARM: dts: imx28-cfa10036: Convert to use label references These Crystal fontz board files still use node name and unit address to reference parts from the imx28.dtsi . This causes a lot of redundancy. So use label references in order to make it easier to maintain. Signed-off-by: Stefan Wahren Cc: Brian Lilly Cc: Michal Vokáč Signed-off-by: Shawn Guo commit d9355d58217b687f02671169040e2934c8726192 Author: Stefan Wahren Date: Tue Mar 7 19:40:01 2023 +0100 ARM: dts: imx28-apx4devkit: Convert to use label references This board file still use node name and unit address to reference parts from the imx28.dtsi . This causes a lot of redundancy. So use label references in orer to make it easier to maintain. Signed-off-by: Stefan Wahren Cc: Aapo Vienamo Signed-off-by: Shawn Guo commit 0bde5d3f8416e83f9e7fbbf00f3075b7fbecf6f5 Author: Stefan Wahren Date: Tue Mar 7 19:40:00 2023 +0100 ARM: dts: imx28-m28/sps1: Convert to use label references These board files still use node name and unit address to reference parts from the imx28.dtsi . This causes a lot of redundancy. So use label references in orer to make it easier to maintain. Signed-off-by: Stefan Wahren Cc: Marek Vasut Cc: Wolfgang Grandegger Signed-off-by: Shawn Guo commit 75a21ed9d0a959c979c5300950bf60dfca20b90e Author: Stefan Wahren Date: Tue Mar 7 19:39:59 2023 +0100 ARM: dts: imx28-apf28: Convert to use label references These Armadeus board files still use node name and unit address to reference parts from the imx28.dtsi . This causes a lot of redundancy. So use label references in order to make it easier to maintain. Signed-off-by: Stefan Wahren Cc: Signed-off-by: Shawn Guo commit 283b40c52d9ad850d204c447df69faaaf9d177f0 Merge: b9fe8e8d03d0d f25fd6088216b Author: Martin KaFai Lau Date: Mon Mar 13 23:08:21 2023 -0700 Merge branch 'bpf: Allow helpers access ptr_to_btf_id.' Alexei Starovoitov says: ==================== From: Alexei Starovoitov Allow code like: bpf_strncmp(task->comm, 16, "foo"); ==================== Signed-off-by: Martin KaFai Lau commit f25fd6088216bd257902e5c212177cddcb291218 Author: Alexei Starovoitov Date: Mon Mar 13 16:58:45 2023 -0700 selftests/bpf: Add various tests to check helper access into ptr_to_btf_id. Add various tests to check helper access into ptr_to_btf_id. Signed-off-by: Alexei Starovoitov Acked-by: David Vernet Link: https://lore.kernel.org/r/20230313235845.61029-4-alexei.starovoitov@gmail.com Signed-off-by: Martin KaFai Lau commit 3e30be4288b31702d4898487a74e80ba14150a9f Author: Alexei Starovoitov Date: Mon Mar 13 16:58:44 2023 -0700 bpf: Allow helpers access trusted PTR_TO_BTF_ID. The verifier rejects the code: bpf_strncmp(task->comm, 16, "my_task"); with the message: 16: (85) call bpf_strncmp#182 R1 type=trusted_ptr_ expected=fp, pkt, pkt_meta, map_key, map_value, mem, ringbuf_mem, buf Teach the verifier that such access pattern is safe. Do not allow untrusted and legacy ptr_to_btf_id to be passed into helpers. Reported-by: David Vernet Signed-off-by: Alexei Starovoitov Acked-by: David Vernet Link: https://lore.kernel.org/r/20230313235845.61029-3-alexei.starovoitov@gmail.com Signed-off-by: Martin KaFai Lau commit c9267aa8b794c2188d49c7d7bd2990e98b2d6b84 Author: Alexei Starovoitov Date: Mon Mar 13 16:58:43 2023 -0700 bpf: Fix bpf_strncmp proto. bpf_strncmp() doesn't write into its first argument. Make sure that the verifier knows about it. Signed-off-by: Alexei Starovoitov Acked-by: David Vernet Link: https://lore.kernel.org/r/20230313235845.61029-2-alexei.starovoitov@gmail.com Signed-off-by: Martin KaFai Lau commit b9fe8e8d03d0df28b2431e3aaf8e115cf7bf2f65 Author: Dave Thaler Date: Fri Mar 10 23:38:14 2023 +0000 bpf, docs: Add signed comparison example Improve clarity by adding an example of a signed comparison instruction Signed-off-by: Dave Thaler Acked-by: David Vernet Acked-by: John Fastabend Link: https://lore.kernel.org/r/20230310233814.4641-1-dthaler1968@googlemail.com Signed-off-by: Alexei Starovoitov commit ab4c15feb2ebcf9f4abe31457d7cbc8f3de9c2ab Author: Ross Zwisler Date: Mon Mar 13 14:56:28 2023 -0600 selftests/bpf: use canonical ftrace path The canonical location for the tracefs filesystem is at /sys/kernel/tracing. But, from Documentation/trace/ftrace.rst: Before 4.1, all ftrace tracing control files were within the debugfs file system, which is typically located at /sys/kernel/debug/tracing. For backward compatibility, when mounting the debugfs file system, the tracefs file system will be automatically mounted at: /sys/kernel/debug/tracing Many tests in the bpf selftest code still refer to this older debugfs path, so let's update them to avoid confusion. Signed-off-by: Ross Zwisler Acked-by: Michael S. Tsirkin Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20230313205628.1058720-3-zwisler@kernel.org Signed-off-by: Alexei Starovoitov commit 27d7fdf06fdb84455ff585b58c8034e2fab42583 Author: Ross Zwisler Date: Mon Mar 13 14:56:27 2023 -0600 bpf: use canonical ftrace path The canonical location for the tracefs filesystem is at /sys/kernel/tracing. But, from Documentation/trace/ftrace.rst: Before 4.1, all ftrace tracing control files were within the debugfs file system, which is typically located at /sys/kernel/debug/tracing. For backward compatibility, when mounting the debugfs file system, the tracefs file system will be automatically mounted at: /sys/kernel/debug/tracing Many comments and samples in the bpf code still refer to this older debugfs path, so let's update them to avoid confusion. There are a few spots where the bpf code explicitly checks both tracefs and debugfs (tools/bpf/bpftool/tracelog.c and tools/lib/api/fs/fs.c) and I've left those alone so that the tools can continue to work with both paths. Signed-off-by: Ross Zwisler Acked-by: Michael S. Tsirkin Reviewed-by: Steven Rostedt (Google) Link: https://lore.kernel.org/r/20230313205628.1058720-2-zwisler@kernel.org Signed-off-by: Alexei Starovoitov commit 8191455c38dd009f15e2fa9ce6c2e3cd337918a0 Author: Jindong Yue Date: Wed Mar 1 21:05:57 2023 +0800 soc: imx8m: Support building imx8m soc driver as module Make the imx8m soc driver as tristate so that it can be built as loadable module, module names are: soc-imx8m.ko, imx8m-blk-ctrl.ko and imx8mp-blk-ctrl.ko Signed-off-by: Jindong Yue Reviewed-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 280fe269059f8d3c127dd4c1ce24297d8e20d1e2 Author: Jindong Yue Date: Wed Mar 1 21:05:56 2023 +0800 soc: imx8m: Add MODULE_LICENSE Add MODULE_LICENSE to support building as module. Signed-off-by: Jindong Yue Reviewed-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 78710a72dc08da4cb2f65707acf4943e2b14c2e1 Author: Jindong Yue Date: Wed Mar 1 21:05:55 2023 +0800 soc: imx: imx8m-blk-ctrl: Add MODULE_LICENSE Add MODULE_LICENSE to support building as a module. Signed-off-by: Jindong Yue Reviewed-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 31ef51a4ae5e6e6745aae119a2836d7386652a2b Author: Jindong Yue Date: Wed Mar 1 21:05:54 2023 +0800 soc: imx: imx8m-blk-ctrl: Use dev_pm_domain_attach_by_name The genpd_dev_pm_attach_by_name() is not exported, following error occurs when building imx8m-blk-ctrl as a module: ERROR: modpost: "genpd_dev_pm_attach_by_name" [drivers/soc/imx/imx8m-blk-ctrl.ko] undefined! Fix this by using dev_pm_domain_attach_by_name() instead. Signed-off-by: Jindong Yue Reviewed-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 56c017f64d76e3c7fd525014f811349092e1c022 Author: Jindong Yue Date: Wed Mar 1 21:05:53 2023 +0800 soc: imx: imx8mp-blk-ctrl: Add MODULE_LICENSE Add MODULE_LICENSE to support building as a module. Signed-off-by: Jindong Yue Reviewed-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit d77369ad8cb10bedd244e6dfd8414ebdd8594ba6 Author: Jindong Yue Date: Wed Mar 1 21:05:52 2023 +0800 soc: imx: imx8mp-blk-ctrl: Fix typo of imx8m_blk_ctrl_of_match Once set CONFIG_SOC_IMX8M as m, following error occurs: drivers/soc/imx/imx8mp-blk-ctrl.c:747:25: error: ‘imx8m_blk_ctrl_of_match’ undeclared here (not in a function); did you mean ‘imx8mp_blk_ctrl_of_match’? 747 | MODULE_DEVICE_TABLE(of, imx8m_blk_ctrl_of_match); | ^~~~~~~~~~~~~~~~~~~~~~~ Fix the typo. Signed-off-by: Jindong Yue Reviewed-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit edac60e149714cc05c32b49472740988c197543d Author: Jindong Yue Date: Wed Mar 1 21:05:51 2023 +0800 soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name The genpd_dev_pm_attach_by_name() is not exported, following error occurs when building imx8mp-blk-ctrl as a module: ERROR: modpost: "genpd_dev_pm_attach_by_name" [drivers/soc/imx/imx8mp-blk-ctrl.ko] undefined! Fix this by using dev_pm_domain_attach_by_name() instead. Signed-off-by: Jindong Yue Reviewed-by: Peng Fan Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 09220adf9c337544bc7404ae666a8c5a2c5ca862 Author: Alexander Stein Date: Tue Feb 28 10:17:57 2023 +0100 arm64: dts: imx93: Add FlexSPI support Add FlexSPI node for i.MX93. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit e7567840ecd323425e7bd1e97f1945bf811fecdc Author: Marek Vasut Date: Mon Feb 27 16:54:23 2023 +0100 arm64: dts: imx8mp: Reorder clock and reg properties Align the clock and reg properties order with example bindings and the rest of the imx8mp.dtsi . No functional change. Signed-off-by: Marek Vasut Reviewed-by: Lucas Stach Reviewed-by: Alexander Stein Signed-off-by: Shawn Guo commit 5a51e1f2b083423f75145c512ee284862ab33854 Author: Marek Vasut Date: Mon Feb 27 16:54:22 2023 +0100 arm64: dts: imx8mp: Drop simple-bus from fsl,imx8mp-media-blk-ctrl This block should not be compatible with simple-bus and misuse it that way. Instead, the driver should scan its subnodes and bind drivers to them. Reviewed-by: Alexander Stein Reviewed-by: Liu Ying Tested-by: Alexander Stein Fixes: 94e6197dadc9 ("arm64: dts: imx8mp: Add LCDIF2 & LDB nodes") Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 9cb6d1b39a8f5086bbebb01357ba1e4ada2169e5 Author: Marek Vasut Date: Mon Feb 27 16:54:21 2023 +0100 soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them This particular block can have DT subnodes describing the LVDS LDB bridge. Instead of misusing simple-bus to scan for those nodes, do the scan within the driver. Tested-by: Alexander Stein Signed-off-by: Marek Vasut Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo commit 1cb0c87d27dcc54537233b1810349889a214494e Author: Marek Vasut Date: Mon Feb 27 16:54:20 2023 +0100 dt-bindings: soc: imx8mp-media-blk-ctrl: Add LDB subnode into schema and example Document the LDB bridge subnode and add the subnode into the example. For the subnode to work, the block control must scan its subnodes and bind drivers to them, do not misuse either simple-bus or simple-mfd here. Acked-by: Alexander Stein Reviewed-by: Krzysztof Kozlowski Reviewed-by: Liu Ying Tested-by: Alexander Stein Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 0d2c843ce5adbe98998844613eb8a8e1127616fd Author: Marek Vasut Date: Mon Feb 27 16:54:19 2023 +0100 dt-bindings: soc: imx8mp-media-blk-ctrl: Align block controller example name Align the block controller example node name with Linux imx8mp.dtsi . No functional change. Acked-by: Krzysztof Kozlowski Reviewed-by: Alexander Stein Reviewed-by: Liu Ying Tested-by: Alexander Stein Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 9159025bea6e5f53ab85ab846c9d6cd28e505a8c Author: Alistair Francis Date: Mon Feb 27 14:50:22 2023 +1000 ARM: imx_v6_v7_defconfig: Enable rohm,bd71815 The reMarkable 2 uses the rohm,bd71815 power controller, so enable it in the defconfig. Signed-off-by: Alistair Francis Signed-off-by: Shawn Guo commit 615e841dc791aa90111c732cc790221dabe4832d Author: Alistair Francis Date: Mon Feb 27 14:50:23 2023 +1000 ARM: dts: imx7d-remarkable2: Enable the rohm,bd71815 Add support for the rohm,bd71815 power controller controller for the reMarkable 2. Signed-off-by: Alistair Francis Reviewed-by: Matti Vaittinen Signed-off-by: Shawn Guo commit 9628655b1407d810c6b51ad0fba81cc31d0bdb76 Author: Alistair Francis Date: Mon Feb 27 14:50:21 2023 +1000 ARM: dts: imx7d-remarkable2: Enable the cyttsp5 Add support for the cyttsp5 touchscreen controller for the reMarkable 2. Signed-off-by: Alistair Francis Signed-off-by: Shawn Guo commit 578e75d14d220b9efdff981b42a63b7c50fa52cc Author: Sebastian Krzyszkowiak Date: Tue Feb 21 09:04:08 2023 +0100 arm64: dts: imx8mq: Add UART DMA support UART ports have DMA capability. Describe the UART DMA properties. Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Shawn Guo commit faf0d83e103e38e8bf7cc4e56da1a2edb9dfdf74 Merge: eeac8ede17557 9228742caf899 Author: Dave Airlie Date: Tue Mar 14 12:17:27 2023 +1000 Merge tag 'drm-misc-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v6.4-rc1: Note: Only changes since pull request from 2023-02-23 are included here. UAPI Changes: - Convert rockchip bindings to YAML. - Constify kobj_type structure in dma-buf. - FBDEV cmdline parser fixes, and other small fbdev fixes for mode parsing. Cross-subsystem Changes: - Add Neil Armstrong as linaro maintainer. - Actually signal the private stub dma-fence. Core Changes: - Add function for adding syncobj dep to sched_job and use it in panfrost, v3d. - Improve DisplayID 2.0 topology parsing and EDID parsing in general. - Add a gem eviction function and callback for generic GEM shrinker purposes. - Prepare to convert shmem helper to use the GEM reservation lock instead of own locking. (Actual commit itself got reverted for now) - Move the suballocator from radeon and amdgpu drivers to core in preparation for Xe. - Assorted small fixes and documentation. - Fixes to HPD polling. - Assorted small fixes in simpledrm, bridge, accel, shmem-helper, and the selftest of format-helper. - Remove dummy resource when ttm bo is created, and during pipelined gutting. Fix all drivers to accept a NULL ttm_bo->resource. - Handle pinned BO moving prevention in ttm core. - Set drm panel-bridge orientation before connector is registered. - Remove dumb_destroy callback. - Add documentation to GEM_CLOSE, PRIME_HANDLE_TO_FD, PRIME_FD_TO_HANDLE, GETFB2 ioctl's. - Add atomic enable_plane callback, use it in ast, mgag200, tidss. Driver Changes: - Use drm_gem_objects_lookup in vc4. - Assorted small fixes to virtio, ast, bridge/tc358762, meson, nouveau. - Allow virtio KMS to be disabled and compiled out. - Add Radxa 8/10HD, Samsung AMS495QA01 panels. - Fix ivpu compiler errors. - Assorted fixes to drm/panel, malidp, rockchip, ivpu, amdgpu, vgem, nouveau, vc4. - Assorted cleanups, simplifications and fixes to vmwgfx. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/ac1f5186-54bb-02f4-ac56-907f5b76f3de@linux.intel.com commit 3d274f8bb7184c18ad6e9b2c54fb059c5f9086a2 Author: Marek Vasut Date: Fri Feb 17 20:26:47 2023 +0100 arm64: dts: imx8mp: Add FEC RMII pin mux on i.MX8MP DHCOM The i.MX8MP DHCOM SoM may come with either external RGMII PHY or LAN8740Ai RMII PHY on the SoM attached to FEC MAC. Add pin mux settings for both options, so that DT overlay can override these settings on SoM variant with the LAN8740Ai PHY. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit f4662e0cee6cbe338261646343f94d2c0137d0cf Author: Marek Vasut Date: Fri Feb 17 20:26:46 2023 +0100 arm64: dts: imx8mp: Add EQoS RMII pin mux on i.MX8MP DHCOM The i.MX8MP DHCOM SoM may come with either KSZ9131RNXI RGMII PHY or LAN8740Ai RMII PHY on the SoM attached to EQoS MAC. Add pin mux settings for both options, so that DT overlay can override these settings on SoM variant with the LAN8740Ai PHY. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 15a03a2225af52da1f3e152593740f1a78b9dd62 Author: Marek Vasut Date: Fri Feb 17 20:26:45 2023 +0100 arm64: dts: imx8mp: Adjust EQoS PHY address on i.MX8MP DHCOM The current variant of the SoM has LAN8740Ai PHY connected to EQoS strapped to MDIO address 0 , adjust the MDIO address to match the hardware. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 6ef0184237ad21b1a2e6b5436cd651def239eb5e Author: Marek Vasut Date: Fri Feb 17 20:26:44 2023 +0100 arm64: dts: imx8mp: Adjust EQoS reset comment on i.MX8MP DHCOM Fix copy-paste error in the EQoS reset comment, align with SoM schematic. No functional change. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 5a649aa9fb73c88765890b84cb265f6caba8a403 Author: Marek Vasut Date: Fri Feb 17 20:26:43 2023 +0100 arm64: dts: imx8mp: Do not delete PHY nodes on i.MX8MP DHCOM PDK2 The PHY nodes may be activated via DTO in case another SoM variant is populated into the development kit. Do not delete the nodes. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 3e431f255dc8c9c571b62490d4f6ddc2ec47bdb1 Author: Marek Vasut Date: Fri Feb 17 20:25:45 2023 +0100 arm64: dts: imx8mp: Update GPIO M to CLKOUT1 on DH electronics i.MX8M Plus DHCOM and PDK2 The GPIO M SoM pin is connected to CLKOUT1, while CLKOUT2 is used as a supply for TC9595 bridge chip clock. Update the comment. No functional change. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 2a136ee0efdd4d50b1fb6810d1cb942dcecaf16a Author: Marek Vasut Date: Fri Feb 17 20:24:44 2023 +0100 arm64: dts: imx8mp: Add PCIe support to DH electronics i.MX8M Plus DHCOM and PDK2 Add PCIe support for DH electronics i.MX8M Plus DHCOM SoM on PDK2 carrier board. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit c8a76df60d5c4e38ed94fc46a05f7be2631a9839 Author: John Harrison Date: Fri Mar 10 22:37:14 2023 -0800 drm/i915: Include timeline seqno in error capture The seqno value actually written out to memory is no longer in the regular HWSP. Instead, it is now in its own private timeline buffer. Thus, it is no longer visible in an error capture. So, explicitly read the value and include that in the capture. v2: %d -> %u (Alan) Signed-off-by: John Harrison Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20230311063714.570389-4-John.C.Harrison@Intel.com commit 53c4e64c6a0fdadc972217343f4439a96542f56e Author: John Harrison Date: Fri Mar 10 22:37:13 2023 -0800 drm/i915/guc: Clean up of register capture search The comparison in the search for a matching register capture node was not the most readable. It was also assuming that a zero GuC id means invalid, which it does not. So remove one invalid term, one redundant term and re-format to keep each term on a single line, and only one term per line. Signed-off-by: John Harrison Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20230311063714.570389-3-John.C.Harrison@Intel.com commit 9724ecdbb9ddd6da3260e4a442574b90fc75188a Author: John Harrison Date: Fri Mar 10 22:37:12 2023 -0800 drm/i915/guc: Fix missing ecodes Error captures are tagged with an 'ecode'. This is a pseduo-unique magic number that is meant to distinguish similar seeming bugs with different underlying signatures. It is a combination of two ring state registers. Unfortunately, the register state being used is only valid in execlist mode. In GuC mode, the register state exists in a separate list of arbitrary register address/value pairs rather than the named entry structure. So, search through that list to find the two exciting registers and copy them over to the structure's named members. v2: if else if instead of if if (Alan) Signed-off-by: John Harrison Reviewed-by: Alan Previn Fixes: a6f0f9cf330a ("drm/i915/guc: Plumb GuC-capture into gpu_coredump") Cc: Alan Previn Cc: Umesh Nerlige Ramappa Cc: Lucas De Marchi Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: Matt Roper Cc: Aravind Iddamsetty Cc: Michael Cheng Cc: Matthew Brost Cc: Bruce Chang Cc: Daniele Ceraolo Spurio Cc: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20230311063714.570389-2-John.C.Harrison@Intel.com commit e752a4f9589cd8444a5ec6baa2d096cc4164c508 Author: Laurent Pinchart Date: Thu Feb 16 01:32:26 2023 +0200 arm64: dts: freescale: imx8mm-phyboard: Add I2C4 pinmuxing The I2C4 bus is exposed on the camera connector. Add and select the corresponding pinmux entries and set the default frequency. The device is left disabled, to be enabled from camera overlays. Signed-off-by: Laurent Pinchart Acked-by: Teresa Remmet Signed-off-by: Shawn Guo commit 23f59eb178b78fe2609e4dd0a2901a263b93ce3e Author: Richard Zhu Date: Wed Feb 15 14:18:35 2023 +0800 arm64: dts: Add i.MX8MP PCIe EP support Add i.MX8MP PCIe EP support. Signed-off-by: Richard Zhu Signed-off-by: Shawn Guo commit 1601bb4538c6e04f52a00ba249250cde8a396aec Author: Richard Zhu Date: Wed Feb 15 14:18:34 2023 +0800 arm64: dts: Add i.MX8MQ PCIe EP support Add i.MX8MQ PCIe EP support. Signed-off-by: Richard Zhu Signed-off-by: Shawn Guo commit 6eabc54cdf323a87da68aef511b402daf0f6d8d4 Author: Richard Zhu Date: Wed Feb 15 14:18:33 2023 +0800 arm64: dts: Add i.MX8MM PCIe EP support Add i.MX8MM PCIe EP support. Signed-off-by: Richard Zhu Signed-off-by: Shawn Guo commit cc3cb392cd4b4299ad52860831d66e523ba5a51f Author: Jacky Bai Date: Wed Feb 15 10:41:17 2023 +0800 arm64: dts: imx93: Add the bbnsm dts node Add the bbnsm node for RTC & ON/OFF button support Signed-off-by: Jacky Bai Tested-by: Alexander Stein Signed-off-by: Shawn Guo commit b9745c275246a7e43c34d1b3be5ff9a9f3cf9305 Author: Konrad Dybcio Date: Mon Feb 20 13:08:31 2023 +0100 ARM: dts: qcom-apq8064: Fix opp table child name The opp-320000000 name is rather misleading with the opp-hz value of 450 MHz. Fix it! Fixes: 8db0b6c7b636 ("ARM: dts: qcom: apq8064: Convert adreno from legacy gpu-pwrlevels to opp-v2") Signed-off-by: Konrad Dybcio Reviewed-by: David Heidelberg Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230220120831.1591820-1-konrad.dybcio@linaro.org commit fe8aa1ba078366ba23fc676efab57183b12a3a81 Author: Visweswara Tanuku Date: Tue Feb 14 21:05:28 2023 -0800 soc: qcom: geni-se: Update Tx and Rx fifo depth based on QUP HW version From QUP HW Version 3.10 and above the Tx and Rx fifo depth bits are increased to 23:16 bits from 21:16 bits in SE_HW_PARAM registers accomodating 256bytes of fifo depth. Updated geni_se_get_tx_fifo_depth and geni_se_get_rx_fifo_depth to retrieve right fifo depth based on QUP HW version. Signed-off-by: Visweswara Tanuku Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230215050528.9507-1-quic_vtanuku@quicinc.com commit 2a41c611f21751150cf4c0132a02828700e58e2d Author: Robert Marko Date: Tue Feb 14 17:23:22 2023 +0100 ARM: dts: qcom: ipq4019: remove clk-output-names for sleep clock Now that sleep clock is being passed directly to GCC, there is no need for global name matching, so remove clk-output-names for sleep clock. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214162325.312057-4-robert.marko@sartura.hr commit 66e4811ab3967332c52a72f04d615f0faabb145e Author: Robert Marko Date: Tue Feb 14 17:23:21 2023 +0100 ARM: dts: qcom: ipq4019: pass XO and sleep clocks to GCC Directly pass XO and sleep clocks to GCC via phandles. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214162325.312057-3-robert.marko@sartura.hr commit ed8962b5e24e0a8bd5c2ed6b98fa37aba3a2ac54 Author: Robert Marko Date: Tue Feb 14 17:23:25 2023 +0100 clk: qcom: gcc-ipq4019: convert to parent data Convert the IPQ4019 GCC driver to use parent data instead of global name matching. Utilize ARRAY_SIZE for num_parents instead of hardcoding the value. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214162325.312057-7-robert.marko@sartura.hr commit fca392586c99dc0acb5a15709c2560dd4b24f6a1 Author: Robert Marko Date: Tue Feb 14 17:23:24 2023 +0100 clk: qcom: gcc-ipq4019: move pcnoc clocks up Move pcnoc clocks up just after PLL-s to be able to use their HW fields. Signed-off-by: Robert Marko Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214162325.312057-6-robert.marko@sartura.hr commit 96797995e7a0012f3e2dc916af85c41f8c3ff8f3 Author: Robert Marko Date: Tue Feb 14 17:23:23 2023 +0100 clk: qcom: gcc-ipq4019: move PLL clocks up Move PLL clock declarations up, before clock parent tables, so that we can use pll hw clock fields in the next commit. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214162325.312057-5-robert.marko@sartura.hr commit 44740af865590320b4278589ac29f30d0e6f2ccf Author: Robert Marko Date: Tue Feb 14 17:23:20 2023 +0100 clk: qcom: gcc-ipq4019: convert XO and sleep clk to parent_data Start off IPQ4019 GCC conversion by converting XO and sleep clks to parent data in order to directly pass them. Signed-off-by: Robert Marko Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214162325.312057-2-robert.marko@sartura.hr commit 78b1607cb6c92c70886de7824588af9803bea3dd Author: Robert Marko Date: Tue Feb 14 17:23:19 2023 +0100 dt-bindings: clock: split qcom,gcc-ipq4019 to separate file Move schema for the GCC on IPQ4019 platform to a separate file to be able to allow passing XO and sleep clks directly to GCC. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214162325.312057-1-robert.marko@sartura.hr commit d64f94249c689962b895aa650a30c29ac3b41cd3 Author: Robert Marko Date: Tue Feb 14 17:12:11 2023 +0100 ARM: dts: qcom: ipq4018-ap120c-ac: use NVMEM for ath10k caldata Since ath10k now supports loading the pre-cal via NVMEM instead of having to use userspace scripts, lets use it. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214161211.306462-4-robert.marko@sartura.hr commit fabc476a6cff40119365014e84aa2d2bbdf7756a Author: Robert Marko Date: Tue Feb 14 17:12:10 2023 +0100 ARM: dts: qcom: ipq4018-ap120c-ac: align SPI-NAND with DT schema SPI-NAND node name should be flash@1 and not nand@1 according to schema. Signed-off-by: Robert Marko Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214161211.306462-3-robert.marko@sartura.hr commit a7d2715df2845560302aea9d9922b4bfdf4fe09a Author: Robert Marko Date: Tue Feb 14 17:12:09 2023 +0100 ARM: dts: qcom: ipq4018-ap120c-ac: align GPIO hog with DT schema Align USB power GPIO hog node to DT schema. Signed-off-by: Robert Marko Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214161211.306462-2-robert.marko@sartura.hr commit 131731c44f2cea44135e93bfb0a2920829910625 Author: Robert Marko Date: Tue Feb 14 17:12:08 2023 +0100 ARM: dts: qcom: ipq4018-ap120c-ac: setup serial console Add the required alias and stdout property so that kernel can setup the console based off DTS and not have to set it in the cmdline. Signed-off-by: Robert Marko Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214161211.306462-1-robert.marko@sartura.hr commit bcc858689db5f2e5a8d4d6e8bc5bb9736cd80626 Author: Rob Herring Date: Fri Mar 10 08:47:16 2023 -0600 net: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Reviewed-by: Simon Horman Acked-by: Kalle Valo Link: https://lore.kernel.org/r/20230310144716.1544083-1-robh@kernel.org Signed-off-by: Jakub Kicinski commit b39212d5936c0fc3d4605abf2b51f734bf59ee11 Merge: c66b2111c9c95 e213ced19befc Author: Jakub Kicinski Date: Mon Mar 13 17:03:19 2023 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== i40e: support XDP multi-buffer Tirthendu Sarkar says: This patchset adds multi-buffer support for XDP. Tx side already has support for multi-buffer. This patchset focuses on Rx side. The last patch contains actual multi-buffer changes while the previous ones are preparatory patches. On receiving the first buffer of a packet, xdp_buff is built and its subsequent buffers are added to it as frags. While 'next_to_clean' keeps pointing to the first descriptor, the newly introduced 'next_to_process' keeps track of every descriptor for the packet. On receiving EOP buffer the XDP program is called and appropriate action is taken (building skb for XDP_PASS, reusing page for XDP_DROP, adjusting page offsets for XDP_{REDIRECT,TX}). The patchset also streamlines page offset adjustments for buffer reuse to make it easier to post process the rx_buffers after running XDP prog. With this patchset there does not seem to be any performance degradation for XDP_PASS and some improvement (~1% for XDP_TX, ~5% for XDP_DROP) when measured using xdp_rxq_info program from samples/bpf/ for 64B packets. v1: https://lore.kernel.org/netdev/20230306210822.3381942-1-anthony.l.nguyen@intel.com/ * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: i40e: add support for XDP multi-buffer Rx i40e: add xdp_buff to i40e_ring struct i40e: introduce next_to_process to i40e_ring i40e: use frame_sz instead of recalculating truesize for building skb i40e: Change size to truesize when using i40e_rx_buffer_flip() i40e: add pre-xdp page_count in rx_buffer i40e: change Rx buffer size for legacy-rx to support XDP multi-buffer i40e: consolidate maximum frame size calculation for vsi ==================== Link: https://lore.kernel.org/r/20230309212819.1198218-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 9e36a204bd43553a9cd4bd574612cd9a5df791ea Author: Dave Marchevsky Date: Mon Mar 13 14:46:41 2023 -0700 bpf: Disable migration when freeing stashed local kptr using obj drop When a local kptr is stashed in a map and freed when the map goes away, currently an error like the below appears: [ 39.195695] BUG: using smp_processor_id() in preemptible [00000000] code: kworker/u32:15/2875 [ 39.196549] caller is bpf_mem_free+0x56/0xc0 [ 39.196958] CPU: 15 PID: 2875 Comm: kworker/u32:15 Tainted: G O 6.2.0-13016-g22df776a9a86 #4477 [ 39.197897] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 [ 39.198949] Workqueue: events_unbound bpf_map_free_deferred [ 39.199470] Call Trace: [ 39.199703] [ 39.199911] dump_stack_lvl+0x60/0x70 [ 39.200267] check_preemption_disabled+0xbf/0xe0 [ 39.200704] bpf_mem_free+0x56/0xc0 [ 39.201032] ? bpf_obj_new_impl+0xa0/0xa0 [ 39.201430] bpf_obj_free_fields+0x1cd/0x200 [ 39.201838] array_map_free+0xad/0x220 [ 39.202193] ? finish_task_switch+0xe5/0x3c0 [ 39.202614] bpf_map_free_deferred+0xea/0x210 [ 39.203006] ? lockdep_hardirqs_on_prepare+0xe/0x220 [ 39.203460] process_one_work+0x64f/0xbe0 [ 39.203822] ? pwq_dec_nr_in_flight+0x110/0x110 [ 39.204264] ? do_raw_spin_lock+0x107/0x1c0 [ 39.204662] ? lockdep_hardirqs_on_prepare+0xe/0x220 [ 39.205107] worker_thread+0x74/0x7a0 [ 39.205451] ? process_one_work+0xbe0/0xbe0 [ 39.205818] kthread+0x171/0x1a0 [ 39.206111] ? kthread_complete_and_exit+0x20/0x20 [ 39.206552] ret_from_fork+0x1f/0x30 [ 39.206886] This happens because the call to __bpf_obj_drop_impl I added in the patch adding support for stashing local kptrs doesn't disable migration. Prior to that patch, __bpf_obj_drop_impl logic only ran when called by a BPF progarm, whereas now it can be called from map free path, so it's necessary to explicitly disable migration. Also, refactor a bit to just call __bpf_obj_drop_impl directly instead of bothering w/ dtor union and setting pointer-to-obj_drop. Fixes: c8e187540914 ("bpf: Support __kptr to local kptrs") Reported-by: Alexei Starovoitov Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230313214641.3731908-1-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 112d96fd29272726b2a4bc59d027f76fe1e78af3 Author: Konrad Dybcio Date: Mon Feb 13 22:55:00 2023 +0100 soc: qcom: socinfo: Add some PMICs Add some missing PMICs based on the _SUBTYPE defines in include/soc/qcom/qcom-spmi-pmic.h Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213215500.2131511-1-konrad.dybcio@linaro.org commit c66b2111c9c952f3bbf454a755768e80308cc6e2 Author: Pedro Tammela Date: Thu Mar 9 14:55:54 2023 -0300 selftests: tc-testing: add tests for action binding Add tests that check if filters can bind actions, that is create an action independently and then bind to a filter. tdc-tests under category 'infra': 1..18 ok 1 abdc - Reference pedit action object in filter ok 2 7a70 - Reference mpls action object in filter ok 3 d241 - Reference bpf action object in filter ok 4 383a - Reference connmark action object in filter ok 5 c619 - Reference csum action object in filter ok 6 a93d - Reference ct action object in filter ok 7 8bb5 - Reference ctinfo action object in filter ok 8 2241 - Reference gact action object in filter ok 9 35e9 - Reference gate action object in filter ok 10 b22e - Reference ife action object in filter ok 11 ef74 - Reference mirred action object in filter ok 12 2c81 - Reference nat action object in filter ok 13 ac9d - Reference police action object in filter ok 14 68be - Reference sample action object in filter ok 15 cf01 - Reference skbedit action object in filter ok 16 c109 - Reference skbmod action object in filter ok 17 4abc - Reference tunnel_key action object in filter ok 18 dadd - Reference vlan action object in filter Reviewed-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Link: https://lore.kernel.org/r/20230309175554.304824-1-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit a808d58ddf29c5d593da497053bcb2af1696031b Author: Danila Tikhonov Date: Mon Feb 13 19:53:18 2023 +0300 clk: qcom: Add Global Clock Controller (GCC) driver for SM7150 Add support for the global clock controller found on SM7150 based devices. This should allow most non-multimedia device drivers to probe and control their clocks. Co-developed-by: David Wronek Signed-off-by: David Wronek Signed-off-by: Danila Tikhonov Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213165318.127160-3-danila@jiaxyga.com commit 3097d5e208c80847bf92e5e82ac4abbc6071997c Merge: 04648b8fad219 bad27783c962a Author: Bjorn Andersson Date: Mon Mar 13 16:51:07 2023 -0700 Merge branch '20230213165318.127160-2-danila@jiaxyga.com' into clk-for-6.4 Merge SM7180 Global Clock Controller binding through a dedicated topic branch, so that it can be introduced into the Devicetree source tree as well in the same kernel release. commit bad27783c962acf837ebb3338843b1ed8272d200 Author: Danila Tikhonov Date: Mon Feb 13 19:53:17 2023 +0300 dt-bindings: clock: Add SM7150 GCC clocks Add device tree bindings for global clock subsystem clock controller for Qualcomm Technology Inc's SM7150 SoCs. Co-developed-by: David Wronek Signed-off-by: David Wronek Signed-off-by: Danila Tikhonov Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230213165318.127160-2-danila@jiaxyga.com commit 04648b8fad219599ccc9b103188a38e72d339a3d Author: Luca Weiss Date: Sun Feb 12 15:11:09 2023 +0100 clk: qcom: clk-hfpll: switch to .determine_rate .determine_rate is meant to replace .round_rate. The former comes with a benefit which is especially relevant on 32-bit systems: since .determine_rate uses an "unsigned long" (compared to a "signed long" which is used by .round_rate) the maximum value on 32-bit systems increases from 2^31 (or approx. 2.14GHz) to 2^32 (or approx. 4.29GHz). Signed-off-by: Luca Weiss Tested-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230212-clk-qcom-determine_rate-v1-2-b4e447d4926e@z3ntu.xyz commit a7074c3eb26e0193f2c6ed79987e633b7578024e Author: Luca Weiss Date: Sun Feb 12 15:11:08 2023 +0100 clk: qcom: clk-krait: switch to .determine_rate .determine_rate is meant to replace .round_rate. The former comes with a benefit which is especially relevant on 32-bit systems: since .determine_rate uses an "unsigned long" (compared to a "signed long" which is used by .round_rate) the maximum value on 32-bit systems increases from 2^31 (or approx. 2.14GHz) to 2^32 (or approx. 4.29GHz). Signed-off-by: Luca Weiss Tested-by: Christian Marangi Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230212-clk-qcom-determine_rate-v1-1-b4e447d4926e@z3ntu.xyz commit 06668b6f7d5b0bdbda30673785d7540c72caae17 Author: Krzysztof Kozlowski Date: Fri Feb 10 17:38:43 2023 +0100 dt-bindings: arm: qcom: add QRD8550 Add board compatible for QRD8550 - a mobile-like development board with SM8550. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Abel Vesa Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230210163844.765074-1-krzysztof.kozlowski@linaro.org commit 7c6dddc239abe660598c49ec95ea0ed6399a4b2a Author: Maxim Korotkov Date: Thu Mar 9 20:43:47 2023 +0300 bnxt: avoid overflow in bnxt_get_nvram_directory() The value of an arithmetic expression is subject of possible overflow due to a failure to cast operands to a larger data type before performing arithmetic. Used macro for multiplication instead operator for avoiding overflow. Found by Security Code and Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Maxim Korotkov Reviewed-by: Pavan Chebbi Link: https://lore.kernel.org/r/20230309174347.3515-1-korotkov.maxim.s@gmail.com Signed-off-by: Jakub Kicinski commit 7fa9c5fc1a753ac593904ebe9c4e8628a4240096 Author: Bartosz Golaszewski Date: Thu Feb 9 10:57:53 2023 +0100 soc: qcom: socinfo: add support for SA8775P Add SocInfo support for SA8775P. Signed-off-by: Bartosz Golaszewski Reviewed-by: Eric Chanudet Tested-by: Eric Chanudet # sa8775p-ride Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230209095753.447347-4-brgl@bgdev.pl commit 26a4bf805c6cd88847dd045f6b29d8a20f02d8df Author: Bartosz Golaszewski Date: Thu Feb 9 10:57:52 2023 +0100 dt-bindings: arm: qcom: add the SoC ID for SA8775P Add the SoC ID entry for SA8775P. Signed-off-by: Bartosz Golaszewski Acked-by: Krzysztof Kozlowski Reviewed-by: Eric Chanudet Tested-by: Eric Chanudet Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230209095753.447347-3-brgl@bgdev.pl commit b302c64a3c0a005f39155e9aef5e99ad8a9abbb7 Author: Bartosz Golaszewski Date: Thu Feb 9 10:57:51 2023 +0100 soc: qcom: smem: update max processor count Update max processor count to reflect the number of co-processors on SA8775P SoCs. Signed-off-by: Bartosz Golaszewski Reviewed-by: Eric Chanudet Tested-by: Eric Chanudet Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230209095753.447347-2-brgl@bgdev.pl commit be50da3e9d4ad1958f7b11322d44d94d5c25a4c1 Author: Jiri Pirko Date: Thu Mar 9 10:45:59 2023 +0100 net: virtio_net: implement exact header length guest feature Virtio spec introduced a feature VIRTIO_NET_F_GUEST_HDRLEN which when set implicates that device benefits from knowing the exact size of the header. For compatibility, to signal to the device that the header is reliable driver also needs to set this feature. Without this feature set by driver, device has to figure out the header size itself. Quoting the original virtio spec: "hdr_len is a hint to the device as to how much of the header needs to be kept to copy into each packet" "a hint" might not be clear for the reader what does it mean, if it is "maybe like that" of "exactly like that". This feature just makes it crystal clear and let the device count on the hdr_len being filled up by the exact length of header. Also note the spec already has following note about hdr_len: "Due to various bugs in implementations, this field is not useful as a guarantee of the transport header size." Without this feature the device needs to parse the header in core data path handling. Accurate information helps the device to eliminate such header parsing and directly use the hardware accelerators for GSO operation. virtio_net_hdr_from_skb() fills up hdr_len to skb_headlen(skb). The driver already complies to fill the correct value. Introduce the feature and advertise it. Note that virtio spec also includes following note for device implementation: "Caution should be taken by the implementation so as to prevent a malicious driver from attacking the device by setting an incorrect hdr_len." There is a plan to support this feature in our emulated device. A device of SolidRun offers this feature bit. They claim this feature will save the device a few cycles for every GSO packet. Link: https://docs.oasis-open.org/virtio/virtio/v1.2/cs01/virtio-v1.2-cs01.html#x1-230006x3 Signed-off-by: Jiri Pirko Reviewed-by: Parav Pandit Reviewed-by: Alvaro Karsz Acked-by: Michael S. Tsirkin Acked-by: Willem de Bruijn Link: https://lore.kernel.org/r/20230309094559.917857-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 4821c186b9c343760a293b455b603735291a7865 Author: Kristian Overskeid Date: Thu Mar 9 10:23:02 2023 +0100 net: hsr: Don't log netdev_err message on unknown prp dst node If no frames has been exchanged with a node for HSR_NODE_FORGET_TIME, the node will be deleted from the node_db list. If a frame is sent to the node after it is deleted, a netdev_err message for each slave interface is produced. This should not happen with dan nodes because of supervision frames, but can happen often with san nodes, which clutters the kernel log. Since the hsr protocol does not support sans, this is only relevant for the prp protocol. Signed-off-by: Kristian Overskeid Link: https://lore.kernel.org/r/20230309092302.179586-1-koverskeid@gmail.com Signed-off-by: Jakub Kicinski commit 90c7dd32652bcfcc7716c762bc095a7d49ad85dd Author: Heiner Kallweit Date: Wed Mar 8 21:34:13 2023 +0100 net: phy: smsc: use device_property_present in smsc_phy_probe Use unified device property API. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/a969f012-1d3b-7a36-51cf-89a5f8f15a9b@gmail.com Signed-off-by: Jakub Kicinski commit ad4bf5f2406f6a2e29266bbad74e18f0d955ac4c Author: Vincenzo Palazzo Date: Fri Mar 10 23:18:51 2023 +0100 net: socket: suppress unused warning suppress unused warnings and fix the error that there is with the W=1 enabled. Warning generated net/socket.c: In function ‘__sys_getsockopt’: net/socket.c:2300:13: error: variable ‘max_optlen’ set but not used [-Werror=unused-but-set-variable] 2300 | int max_optlen; Signed-off-by: Vincenzo Palazzo Reviewed-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20230310221851.304657-1-vincenzopalazzodev@gmail.com Signed-off-by: Jakub Kicinski commit c5a8027de26e1b7c0ba4f8e430165b6a4a29a869 Author: Alexander Stein Date: Fri Mar 10 08:45:00 2023 +0100 net: phy: dp83867: Disable IRQs on suspend Before putting the PHY into IEEE power down mode, disable IRQs to prevent accessing the PHY once MDIO has already been shutdown. Signed-off-by: Alexander Stein Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20230310074500.3472858-1-alexander.stein@ew.tq-group.com Signed-off-by: Jakub Kicinski commit e4ed8ba08e3f1ef24771eb95f87da129ad752063 Author: Horatiu Vultur Date: Tue Mar 7 22:44:02 2023 +0100 net: phy: micrel: Add support for PTP_PF_PEROUT for lan8841 Lan8841 has 10 GPIOs and it has 2 events(EVENT_A and EVENT_B). It is possible to assigned the 2 events to any of the GPIOs, but a GPIO can have only 1 event at a time. These events are used to generate periodic signals. It is possible to configure the length, the start time and the period of the signal by configuring the event. Currently the SW uses only EVENT_A to generate the perout. These events are generated by comparing the target time with the PHC time. In case the PHC time is changed to a value bigger than the target time + reload time, then it would generate only 1 event and then it would stop because target time + reload time is small than PHC time. Therefore it is required to change also the target time every time when the PHC is changed. The same will apply also when the PHC time is changed to a smaller value. This was tested using: testptp -L 6,2 testptp -p 1000000000 -w 200000000 Signed-off-by: Horatiu Vultur Link: https://lore.kernel.org/r/20230307214402.793057-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski commit 1aff0a5d71d23be6658f893c88c6a9791202bcb1 Author: Guilherme G. Piccoli Date: Sun Mar 12 13:51:00 2023 -0300 drm/amdgpu/vcn: Disable indirect SRAM on Vangogh broken BIOSes The VCN firmware loading path enables the indirect SRAM mode if it's advertised as supported. We might have some cases of FW issues that prevents this mode to working properly though, ending-up in a failed probe. An example below, observed in the Steam Deck: [...] [drm] failed to load ucode VCN0_RAM(0x3A) [drm] psp gfx command LOAD_IP_FW(0x6) failed and response status is (0xFFFF0000) amdgpu 0000:04:00.0: [drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring vcn_dec_0 test failed (-110) [drm:amdgpu_device_init.cold [amdgpu]] *ERROR* hw_init of IP block failed -110 amdgpu 0000:04:00.0: amdgpu: amdgpu_device_ip_init failed amdgpu 0000:04:00.0: amdgpu: Fatal error during GPU init [...] Disabling the VCN block circumvents this, but it's a very invasive workaround that turns off the entire feature. So, let's add a quirk on VCN loading that checks for known problematic BIOSes on Vangogh, so we can proactively disable the indirect SRAM mode and allow the HW proper probe and VCN IP block to work fine. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2385 Fixes: 82132ecc5432 ("drm/amdgpu: enable Vangogh VCN indirect sram mode") Cc: stable@vger.kernel.org Cc: James Zhu Cc: Leo Liu Signed-off-by: Guilherme G. Piccoli Signed-off-by: Alex Deucher commit 4648cf5fc8c78d71ebb22c9fca760062b7747ec4 Author: Hamza Mahfooz Date: Wed Mar 8 16:14:08 2023 -0500 drm/amd/display: use a more accurate check in dm_helpers_dp_read_dpcd() We should be checking if drm_dp_dpcd_read() returns the size that we are asking it to read instead of just checking if it is greater than zero. So, compare the return value of drm_dp_dpcd_read() to the requested read size. Reviewed-by: Rodrigo Siqueira Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 84b31d484eb9759cb3d8fbbb7a0e191cc097ea28 Author: Alex Deucher Date: Wed Mar 8 22:45:59 2023 -0500 drm/amdgpu/nv: fix codec array for SR_IOV Copy paste error. Fixes: 384334120b66 ("drm/amdgpu/nv: don't expose AV1 if VCN0 is harvested") Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4454 Cc: Jiapeng Chong Acked-by: Guchun Chen Signed-off-by: Alex Deucher commit 566b6577849fcca743aa63d43793062aba62166c Author: Benjamin Cheng Date: Sun Mar 12 20:47:39 2023 -0400 drm/amd/display: Write to correct dirty_rect When FB_DAMAGE_CLIPS are provided in a non-MPO scenario, the loop does not use the counter i. This causes the fill_dc_dity_rect() to always fill dirty_rects[0], causing graphical artifacts when a damage clip aware DRM client sends more than 1 damage clip. Instead, use the flip_addrs->dirty_rect_count which is incremented by fill_dc_dirty_rect() on a successful fill. Fixes: 30ebe41582d1 ("drm/amd/display: add FB_DAMAGE_CLIPS support") Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2453 Signed-off-by: Benjamin Cheng Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 474e2d491efe8ce516e743dbce6a6e75bac3b3db Author: Hawking Zhang Date: Sat Mar 4 17:24:46 2023 +0800 drm/amdgpu: Move hdp ras block init to ras sw_init Initialize hdp ras block only when mmhub ip block supports ras features. Driver queries ras capabilities after early_init, ras block init needs to be moved to sw_init. Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit fec70a8601a76272b08b7b8077b3c3e3c79bdb72 Author: Hawking Zhang Date: Sat Mar 4 16:39:48 2023 +0800 drm/amdgpu: Move mmhub ras block init to ras sw_init Initialize mmhub ras block only when mmhub ip block supports ras features. Driver queries ras capabilities after early_init, ras block init needs to be moved to sw_init. Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit af8312a38f713d0d5445277a57a1c8e4157da5ff Author: Hawking Zhang Date: Sat Mar 11 17:30:43 2023 +0800 drm/amdgpu: Correct gfx ras_late_init callback Use default gfx ras_late_init callback for gfx ras block. Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit a6dcf9a7ccfed57abd44c24cc505b559281d44b9 Author: Hawking Zhang Date: Sat Mar 11 17:36:11 2023 +0800 drm/amdgpu: Move umc ras block init to gmc ras sw_init Initialize umc ras block only when umc ip block supports ras. Driver queries ras capabilities after early_init, ras block init needs to be moved to sw_init. Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit f81c31d975b463c24506d817a48390621f057a57 Author: Hawking Zhang Date: Sat Mar 11 17:28:38 2023 +0800 drm/amdgpu: Move vcn ras block init to ras sw_init Initialize vcn ras block only when vcn ip block supports ras features. Driver queries ras capabilities after early_init, ras block init needs to be moved to sw_int. Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 5640e06e60198d9abdf6c618c54d982d8ec9cc0a Author: Hawking Zhang Date: Sat Mar 11 17:28:02 2023 +0800 drm/amdgpu: Move jpeg ras block init to ras sw_init Initialize jpeg ras block only when jpeg ip block supports ras features. Driver queries ras capabilities after early_init, ras block init needs to be moved to sw_int. Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit c69d51395a3bd3905a3837691ed48c7c89ea3d95 Author: Guchun Chen Date: Thu Mar 9 10:02:45 2023 +0800 drm/amdgpu: move poll enabled/disable into non DC path Some amd asics having reliable hotplug support don't call drm_kms_helper_poll_init in driver init sequence. However, due to the unified suspend/resume path for all asics, because the output_poll_work->func is not set for these asics, a warning arrives when suspending. [ 90.656049] [ 90.656050] ? console_unlock+0x4d/0x100 [ 90.656053] ? __irq_work_queue_local+0x27/0x60 [ 90.656056] ? irq_work_queue+0x2b/0x50 [ 90.656057] ? __wake_up_klogd+0x40/0x60 [ 90.656059] __cancel_work_timer+0xed/0x180 [ 90.656061] drm_kms_helper_poll_disable.cold+0x1f/0x2c [drm_kms_helper] [ 90.656072] amdgpu_device_suspend+0x81/0x170 [amdgpu] [ 90.656180] amdgpu_pmops_runtime_suspend+0xb5/0x1b0 [amdgpu] [ 90.656269] pci_pm_runtime_suspend+0x61/0x1b0 drm_kms_helper_poll_enable/disable is valid when poll_init is called in amdgpu code, which is only used in non DC path. So move such codes into non-DC path code to get rid of such warnings. v1: introduce use_kms_poll flag in amdgpu as the poll stuff check v2: use dc_enabled as the flag to simply code v3: move code into non DC path instead of relying on any flag Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2411 Fixes: a4e771729a51 ("drm/probe_helper: sort out poll_running vs poll_enabled") Reported-by: Bert Karwatzki Suggested-by: Dmitry Baryshkov Suggested-by: Alex Deucher Signed-off-by: Guchun Chen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 6ab68650a10e89dc351cb12b42a89b8789126c13 Author: Guchun Chen Date: Fri Mar 10 12:59:32 2023 +0800 drm/amdgpu: use drm_device pointer directly rather than convert again The convert from adev is redundant. Signed-off-by: Guchun Chen Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 53e9d836ea7fa0bfe9950ffb92d50811a5e69f01 Author: Guchun Chen Date: Mon Mar 13 08:49:45 2023 +0800 drm/amdgpu: drop pm_sysfs_en flag from amdgpu_device structure pm_sysfs_en is overlapped with pm.sysfs_initialized, so drop it for simplifying code(no functional change). Signed-off-by: Guchun Chen Acked-by: Christian König Signed-off-by: Alex Deucher commit d6530c33a978c6d170125b3a2ca1d218b1863e52 Author: Marek Olšák Date: Mon Jan 30 01:52:40 2023 -0500 drm/amdgpu: expose more memory stats in fdinfo This will be used for performance investigations. Signed-off-by: Marek Olšák Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 28f7e8971846519720a83b85004ddfe33680be92 Author: Bhawanpreet Lakha Date: Fri Feb 17 16:08:21 2023 -0500 drm/amd/display: Fix HDCP failing to enable after suspend [Why] On resume some displays are not ready for HDCP, so they will fail if we start the hdcp authentintication too soon. Add a delay so that the displays can be ready before we start. NOTE: Previoulsy this delay was set to 3 seconds but it was causing issues with compliance, 2 seconds should enough for compliance and the s3 resume case. [How] Change the Delay to 2 seconds. Reviewed-by: Aurabindo Pillai Acked-by: Qingqing Zhuo Signed-off-by: Bhawanpreet Lakha Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 629fcf0b687e3244f4bc1ab0070074f836703b09 Author: Chia-I Wu Date: Wed Mar 8 13:37:24 2023 -0800 drm/amdkfd: fix potential kgd_mem UAFs kgd_mem pointers returned by kfd_process_device_translate_handle are only guaranteed to be valid while p->mutex is held. As soon as the mutex is unlocked, another thread can free the BO. Signed-off-by: Chia-I Wu Signed-off-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 22f1482aff4aee39e5f3354808bc099084c2b64b Author: Shirish S Date: Fri Mar 10 11:54:17 2023 +0530 drm/amd/display: add sysfs entry to read PSR residency from firmware [Why] Currently there aren't any methods to determine PSR state residency. [How] create a sysfs entry for reading residency and internally hook it up to existing functionality of reading PSR residency from firmware. [Hamza: dropped the link.h include and made checkpatch happy] Signed-off-by: Shirish S Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit dcaf5000b054935780db718ecff8cafe6c183df8 Author: Jane Jian Date: Tue Feb 28 18:48:41 2023 +0800 drm/amdgpu/vcn: custom video info caps for sriov for sriov, we added a new flag to indicate av1 support, this will override the original caps info. Signed-off-by: Jane Jian Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 0fb44d54c66ea74b7c148aca8dbd683c47232018 Author: Xiaogang Chen Date: Thu Mar 9 17:44:55 2023 -0600 drm/amdkfd: Get prange->offset after svm_range_vram_node_new During miration to vram prange->offset is valid after vram buffer is located, either use old one or allocate a new one. Move svm_range_vram_node_new before migrate for each vma to get valid prange->offset. v2: squash in warning fix Fixes: 9473b6b25b83 ("drm/amdkfd: Fix BO offset for multi-VMA page migration") Signed-off-by: Xiaogang Chen Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 67f3c2096909c457c64f96954efee36e48299991 Author: Tom St Denis Date: Thu Mar 9 10:21:36 2023 -0500 drm/amd/amdgpu: Add missing INT_STAT_DEBUG registers to GC 10.1 and 10.3 headers Checked against database, copied from GC 9.4.2 header. Signed-off-by: Tom St Denis Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 75458a842cb59db8695a074d7a740321ff0a1254 Author: Lijo Lazar Date: Wed Mar 8 19:10:17 2023 +0530 drm/amd/pm: Remove unavailable temperature params Temperature limits are not available for SMU v13.0.6. Also, edge temperature is not tracked. Remove logic associated with those. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 8866d62716c918e5d09d8297281ef93155434da0 Author: Jiapeng Chong Date: Thu Mar 9 10:52:50 2023 +0800 drm/amd/display: Use swap() instead of open coding it Swap is a function interface that provides exchange function. To avoid code duplication, we can use swap function. ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:359:57-58: WARNING opportunity for swap(). Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4448 Signed-off-by: Jiapeng Chong Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 49017304c099923289b0db676351307d95bbbdfb Author: Błażej Szczygieł Date: Sun Mar 5 00:44:31 2023 +0100 drm/amd/pm: Fix sienna cichlid incorrect OD volage after resume Always setup overdrive tables after resume. Preserve only some user-defined settings in user_overdrive_table if they're set. Copy restored user_overdrive_table into od_table to get correct values. On cold boot, BTC was triggered and GfxVfCurve was calibrated. We got VfCurve settings (a). On resuming back, BTC will be triggered again and GfxVfCurve will be recalibrated. VfCurve settings (b) got may be different from those of cold boot. So if we reuse those VfCurve settings (a) got on cold boot on suspend, we can run into discrepencies. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1897 Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2276 Reviewed-by: Evan Quan Signed-off-by: Błażej Szczygieł Signed-off-by: Alex Deucher commit 3b4723de0d9be3f2a1730c164987b6e0f38d7bb7 Author: Tim Huang Date: Wed Mar 1 10:53:03 2023 +0800 drm/amd/pm: bump SMU 13.0.4 driver_if header version Align the SMU driver interface version with PMFW to suppress the version mismatch message on driver loading. Signed-off-by: Tim Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0b255ab74b4e362f01173bee19dd650d3169abb6 Author: Chia-I Wu Date: Tue Mar 7 16:19:02 2023 -0800 drm/amdkfd: fix a potential double free in pqm_create_queue Set *q to NULL on errors, otherwise pqm_create_queue would free it again. Signed-off-by: Chia-I Wu Signed-off-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 17535a33a9c1e4fb52f3db1d72a7ddbe4cea1a2e Author: Ian Rogers Date: Tue Mar 7 16:30:20 2023 -0800 perf lock contention: Fix compiler builtin detection __has_builtin was passed the macro rather than the actual builtin feature. The builtin test isn't sufficient and a clang version test also needs to be performed. Fixes: 1bece1351c653c3d ("perf lock contention: Support old rw_semaphore type") Reviewed-by: Namhyung Kim Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Peter Zijlstra Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20230308003020.3653271-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit e5af139715aaf17f25bc50638a7ca67973fce2af Author: James Clark Date: Wed Mar 8 09:48:43 2023 +0000 perf cs-etm: Avoid printing warning in cs_etm_is_ete() check When checking for the presence of ETE, a register is read that may not be present on older kernels or if ETE isn't available. cs_etm_get_ro() will print a warning if it doesn't exist, so check for the existence first before accessing it. Reviewed-by: Leo Yan Signed-off-by: James Clark Cc: Al Grant Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230308094843.287093-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 5f968d289b8eae1017e8d465570b444a7021212c Author: James Clark Date: Wed Mar 8 09:48:42 2023 +0000 perf cs-etm: Reduce verbosity of ts_source warning This is printed as a warning but it is normal behavior that users shouldn't be expected to do anything about. Reduce the warning level to debug3 so it's only seen in verbose mode to avoid confusion. Reviewed-by: Leo Yan Cc: Al Grant Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230308094843.287093-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit d30baf2c376f3920e99d3c2c86a1a1b805a3c74c Author: Thomas Richter Date: Wed Mar 8 13:53:26 2023 +0100 perf list: Add PMU pai_ext event description for IBM z16 Add the event description for the IBM z16 pai_ext PMU released with commit c432fefe8e6262bf ("s390/pai: Add support for PAI Extension 1 NNPA counters") The document SA22-7832-13 "z/Architecture Principles of Operation", published May, 2022, contains the description of the Processor Activity Instrumentation Facility and the NNPA counter set., See Pages 5-113 to 5-116 and chapter 26 for details. Signed-off-by: Thomas Richter Acked-by: Ian Rogers Acked-by: Sumanth Korikkar Cc: Heiko Carstens Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20230308125326.2195613-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit f8a6cea4839bc8c76804b301dbb5522a6cacf6d5 Author: Thomas Richter Date: Mon Mar 13 09:01:57 2023 +0100 perf vendor events s390: Add cache metrics for z16 Add metrics for s390 z16 - Percentage sourced from Level 2 cache - Percentage sourced from Level 3 on same chip cache - Percentage sourced from Level 4 Local cache on same book - Percentage sourced from Level 4 Remote cache on different book - Percentage sourced from memory For details about the formulas see this documentation: https://www.ibm.com/support/pages/system/files/inline-files/CPU%20MF%20Formulas%20including%20z16%20-%20May%202022_1.pdf Output after: # ./perf stat -M l4rp -- dd if=/dev/zero of=/dev/null bs=10M count=10K .... dd output deleted Performance counter stats for 'dd if=/dev/zero of=/dev/null bs=10M count=10K': 0 IDCW_OFF_DRAWER_CHIP_HIT # 0.00 l4rp 431,866 L1I_DIR_WRITES 2,395 IDCW_OFF_DRAWER_IV 0 ICW_OFF_DRAWER 0 IDCW_OFF_DRAWER_DRAWER_HIT 1,437 DCW_OFF_DRAWER 425,960,793 L1D_DIR_WRITES 12.165030699 seconds time elapsed 0.001037000 seconds user 12.162140000 seconds sys # Signed-off-by: Thomas Richter Acked-by: Ian Rogers Acked-By: Sumanth Korikkar Cc: Heiko Carstens Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20230313080201.2440201-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 74395567a3011a07f51cf959be96c1eecb3e6df8 Author: Thomas Richter Date: Mon Mar 13 09:01:56 2023 +0100 perf vendor events s390: Add common metrics Add 3 metrics for s390 machines: - Cycles per instruction: Amount of CPU cycles used per instructions, named cpi. - Problem state ratio: Ratio of instructions executed in problem state compared to total number of instructions, named prbstate. - Level one instruction and data cache misses per 100 instructions, named l1mp. For details about the formulas see this documentation: https://www.ibm.com/support/pages/system/files/inline-files/CPU%20MF%20Formulas%20including%20z16%20-%20May%202022_1.pdf Output after: # ./perf stat -M cpi -- dd if=/dev/zero of=/dev/null bs=1M count=10K 10240+0 records in 10240+0 records out 10737418240 bytes (11 GB, 10 GiB) copied, 1.30151 s, 8.2 GB/s Performance counter stats for 'dd if=/dev/zero of=/dev/null .....': 6,779,778,802 CPU_CYCLES # 1.96 cpi 3,461,975,090 INSTRUCTIONS 1.306873021 seconds time elapsed 0.001034000 seconds user 1.305677000 seconds sys # Signed-off-by: Thomas Richter Acked-by: Ian Rogers Acked-By: Sumanth Korikkar Cc: Heiko Carstens Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20230313080201.2440201-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit a4c7d7c502b935f3a8324d954de78aecf6940897 Author: Ian Rogers Date: Sat Mar 11 18:15:43 2023 -0800 perf parse-events: Warn when events are regrouped Use if an event is reordered or the number of groups increases to signal that regrouping has happened and warn about it. Disable the warning in the case wild card PMU names are used and for metrics. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Stephane Eranian Cc: Suzuki Poulouse Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230312021543.3060328-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 9d2dc632e09c0fe3a8a5890845bbd65b211fd662 Author: Ian Rogers Date: Sat Mar 11 18:15:42 2023 -0800 perf evlist: Remove nr_groups Maintaining the number of groups during event parsing is problematic and since changing to sort/regroup events can only be computed by a linear pass over the evlist. As the value is generally only used in tests, rather than hold it in a variable compute it by passing over the evlist when necessary. This change highlights that libpfm's counting of groups with a single entry disagreed with regular event parsing. The libpfm tests are updated accordingly. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Stephane Eranian Cc: Suzuki Poulouse Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230312021543.3060328-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit e733f87e8c77751a00a538627eab1ac05e77cf0d Author: Ian Rogers Date: Sat Mar 11 18:15:41 2023 -0800 perf evsel: Remove use_uncore_alias This flag used to be used when regrouping uncore events in particular due to wildcard matches. This is now handled by sorting evlist and so the flag is redundant. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Stephane Eranian Cc: Suzuki Poulouse Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230312021543.3060328-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 347c2f0a0988c59c402148054ef54648853fa669 Author: Ian Rogers Date: Sat Mar 11 18:15:40 2023 -0800 perf parse-events: Sort and group parsed events This change is intended to be a no-op for most current cases, the default sort order is the order the events were parsed. Where it varies is in how groups are handled. Previously an uncore and core event that are grouped would most often cause the group to be removed: ``` $ perf stat -e '{instructions,uncore_imc_free_running_0/data_total/}' -a sleep 1 WARNING: grouped events cpus do not match, disabling group: anon group { instructions, uncore_imc_free_running_0/data_total/ } ... ``` However, when wildcards are used the events should be re-sorted and re-grouped in parse_events__set_leader, but this currently fails for simple examples: ``` $ perf stat -e '{uncore_imc_free_running/data_read/,uncore_imc_free_running/data_write/}' -a sleep 1 Performance counter stats for 'system wide': MiB uncore_imc_free_running/data_read/ MiB uncore_imc_free_running/data_write/ 1.000996992 seconds time elapsed ``` A futher failure mode, fixed in this patch, is to force topdown events into a group. This change moves sorting the evsels in the evlist after parsing. It requires parsing to set up groups. First the evsels are sorted respecting the existing groupings and parse order, but also reordering to ensure evsels of the same PMU and group appear together. So that software and aux events respect groups, their pmu_name is taken from the group leader. The sorting is done with list_sort removing a memory allocation. After sorting a pass is done to correct the group leaders and for topdown events ensuring they have a group leader. This fixes the problems seen before: ``` $ perf stat -e '{uncore_imc_free_running/data_read/,uncore_imc_free_running/data_write/}' -a sleep 1 Performance counter stats for 'system wide': 727.42 MiB uncore_imc_free_running/data_read/ 81.84 MiB uncore_imc_free_running/data_write/ 1.000948615 seconds time elapsed ``` As well as making groups not fail for cases like: ``` $ perf stat -e '{imc_free_running_0/data_total/,imc_free_running_1/data_total/}' -a sleep 1 Performance counter stats for 'system wide': 256.47 MiB imc_free_running_0/data_total/ 256.48 MiB imc_free_running_1/data_total/ 1.001165442 seconds time elapsed ``` Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Stephane Eranian Cc: Suzuki Poulouse Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230312021543.3060328-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 4bb311b29e82c795340a6e4a5db83d8ccbe2dc49 Author: Ian Rogers Date: Sat Mar 11 18:15:39 2023 -0800 perf parse-events: Pass ownership of the group name Pass ownership of the group name rather than copying and freeing the original. This saves a memory allocation and copy. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Stephane Eranian Cc: Suzuki Poulouse Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230312021543.3060328-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 7abf0bccaaec77043358ee07e694d31cf9a7dd76 Author: Ian Rogers Date: Sat Mar 11 18:15:38 2023 -0800 perf evsel: Add function to compute group PMU name The computed name respects software events and aux event groups, such that the pmu_name is changed to be that of the aux event leader or group leader for software events. This is done as a later change will split events that are in different PMUs into different groups. Committer notes: Added a stub for this new function so that 'perf test python' passes. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Stephane Eranian Cc: Suzuki Poulouse Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230312021543.3060328-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b5bec0f00ee1c52ff0965a5dba4c91c413a6f3de Author: Krzysztof Kozlowski Date: Wed Feb 8 11:15:43 2023 +0100 dt-bindings: soc: qcom,apr: correct qcom,intents type The qcom,intents property is a list of pairs, thus it should be defined as uint32-matrix. Fixes: b2d7616e13c4 ("dt-bindings: soc: qcom: apr: add missing properties") Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208101545.45711-5-krzysztof.kozlowski@linaro.org commit 092209f199b8fe3e7862aff2d6e45ffb388fc42a Author: Konrad Dybcio Date: Wed Feb 8 10:13:40 2023 +0100 clk: qcom: Add GPU clock controller driver for SM6115 Add support for the GPU clock controller found on SM6115. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208091340.124641-11-konrad.dybcio@linaro.org commit 8397e24278b3690b830e5dad79169a79f63b0b43 Author: Konrad Dybcio Date: Wed Feb 8 10:13:38 2023 +0100 clk: qcom: Add GPU clock controller driver for SM6375 Add support for the GPU clock controller found on SM6375. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208091340.124641-9-konrad.dybcio@linaro.org commit a6b18286810cc64419a36e3a6b5d7191f1f9b167 Author: Konrad Dybcio Date: Wed Feb 8 10:13:36 2023 +0100 clk: qcom: Add GPU clock controller driver for SM6125 Add support for the GPU clock controller found on SM6125. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208091340.124641-7-konrad.dybcio@linaro.org commit b96fbb03fbc1686449e28e2edb54df5c3584ad43 Author: Konrad Dybcio Date: Wed Feb 8 10:13:34 2023 +0100 clk: qcom: branch: Clean up branch enable registers Prefix the "branch enable" registers with CBCR_ to be closer to what they are actually called in Qualcomm terms, use GENMASK instead of shifting values around and adjust their usage accordingly. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208091340.124641-5-konrad.dybcio@linaro.org commit 5ab6561da990375b0a3cd54e12996498f6398a0f Author: Konrad Dybcio Date: Wed Feb 8 10:13:33 2023 +0100 clk: qcom: branch: Move CBCR bits definitions to the header file Move the definitions of CBCR bits to the branch header file. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208091340.124641-4-konrad.dybcio@linaro.org commit 0932e565ba7c828d5ec59f872cb3ad6b070dc003 Author: Konrad Dybcio Date: Wed Feb 8 10:13:32 2023 +0100 clk: qcom: branch: Add helper functions for setting SLEEP/WAKE bits HLOS-controlled branch clocks on non-ancient Qualcomm platforms feature SLEEP and WAKE fields which can be written to to configure how long the clock hardware should wait internally before being (un)gated. Some very sensitive clocks need to have these values programmed to prevent putting the hardware in a not-exactly-good state. Add definitions of these fields and introduce helpers for setting them inside clock drivers. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208091340.124641-3-konrad.dybcio@linaro.org commit b594e6f6605311785171b8d4600fe96e35625530 Author: Konrad Dybcio Date: Wed Feb 8 10:13:31 2023 +0100 clk: qcom: branch: Add helper functions for setting retain bits Most Qualcomm branch clocks come with a pretty usual set of bits that can enable memory retention by means of not turning off parts of the memory logic. Add them to the common header file and introduce helper functions for setting them instead of using magic writes. Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208091340.124641-2-konrad.dybcio@linaro.org commit cb2e6471ac78c58b35593c801f2544b39bc753ce Merge: c4dc24da52867 c413f34e7aafb Author: Bjorn Andersson Date: Mon Mar 13 12:58:36 2023 -0700 Merge branch '20230208091340.124641-1-konrad.dybcio@linaro.org' into clk-for-6.4 Merge DT bindings through a dedicated topic branch, such that they can be reused in changes being picked up through dt source branches. commit c413f34e7aafbabdab16fd8014ac4c87038dfd08 Author: Konrad Dybcio Date: Wed Feb 8 10:13:39 2023 +0100 dt-bindings: clock: Add Qcom SM6115 GPUCC Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SM6115 SoCs. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208091340.124641-10-konrad.dybcio@linaro.org commit 94329ce6e38fc420a7cc67b4174c7c8254e1493f Author: Konrad Dybcio Date: Wed Feb 8 10:13:37 2023 +0100 dt-bindings: clock: Add Qcom SM6375 GPUCC Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SM6375 SoCs. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208091340.124641-8-konrad.dybcio@linaro.org commit a5b9c5c548bd2c6997581e6a8991cea264cfd657 Author: Konrad Dybcio Date: Wed Feb 8 10:13:35 2023 +0100 dt-bindings: clock: Add Qcom SM6125 GPUCC Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SM6125 SoCs. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230208091340.124641-6-konrad.dybcio@linaro.org commit 22df776a9a866713d9decfb92b633bcfdb571954 Author: David Vernet Date: Wed Feb 15 17:30:33 2023 -0600 tasks: Extract rcu_users out of union In commit 3fbd7ee285b2b ("tasks: Add a count of task RCU users"), a count on the number of RCU users was added to struct task_struct. This was done so as to enable the removal of task_rcu_dereference(), and allow tasks to be protected by RCU even after exiting and being removed from the runqueue. In this commit, the 'refcount_t rcu_users' field that keeps track of this refcount was put into a union co-located with 'struct rcu_head rcu', so as to avoid taking up any extra space in task_struct. This was possible to do safely, because the field was only ever decremented by a static set of specific callers, and then never incremented again. While this restriction of there only being a small, static set of users of this field has worked fine, it prevents us from leveraging the field to use RCU to protect tasks in other contexts. During tracing, for example, it would be useful to be able to collect some tasks that performed a certain operation, put them in a map, and then periodically summarize who they are, which cgroup they're in, how much CPU time they've utilized, etc. While this can currently be done with 'usage', it becomes tricky when a task is already in a map, or if a reference should only be taken if a task is valid and will not soon be reaped. Ideally, we could do something like pass a reference to a map value, and then try to acquire a reference to the task in an RCU read region by using refcount_inc_not_zero(). Similarly, in sched_ext, schedulers are using integer pids to remember tasks, and then looking them up with find_task_by_pid_ns(). This is slow, error prone, and adds complexity. It would be more convenient and performant if BPF schedulers could instead store tasks directly in maps, and then leverage RCU to ensure they can be safely accessed with low overhead. Finally, overloading fields like this is error prone. Someone that wants to use 'rcu_users' could easily overlook the fact that once the rcu callback is scheduled, the refcount will go back to being nonzero, thus precluding the use of refcount_inc_not_zero(). Furthermore, as described below, it's possible to extract the fields of the union without changing the size of task_struct. There are several possible ways to enable this: 1. The lightest touch approach is likely the one proposed in this patch, which is to simply extract 'rcu_users' and 'rcu' from the union, so that scheduling the 'rcu' callback doesn't overwrite the 'rcu_users' refcount. If we have a trusted task pointer, this would allow us to use refcnt_inc_not_zero() inside of an RCU region to determine if we can safely acquire a reference to the task and store it in a map. As mentioned below, this can be done without changing the size of task_struct, by moving the location of the union to another location that has padding gaps we can fill in. 2. Removing 'refcount_t rcu_users', and instead having the entire task be freed in an rcu callback. This is likely the most sound overall design, though it changes the behavioral semantics exposed to callers, who currently expect that a task that's successfully looked up in e.g. the pid_list with find_task_by_pid_ns(), can always have a 'usage' reference acquired on them, as it's guaranteed to be > 0 until after the next gp. In order for this approach to work, we'd have to audit all callers. This approach also slightly changes behavior observed by user space by not invoking trace_sched_process_free() until the whole task_struct is actually being freed, rather than just after it's exited. It also may change timings, as memory will be freed in an RCU callback rather than immediately when the final 'usage' refcount drops to 0. This also is arguably a benefit, as it provides more predictable performance to callers who are refcounting tasks. 3. There may be other solutions as well that don't require changing the layout of task_struct. For example, we could possibly do something complex from the BPF side, such as listen for task exit and remove a task from a map when the task is exiting. This would likely require significant custom handling for task_struct in the verifier, so a more generalizable solution is likely warranted. As mentioned above, this patch proposes the lightest-touch approach which allows callers elsewhere in the kernel to use 'rcu_users' to ensure the lifetime of a task, by extracting 'rcu_users' and 'rcu' from the union. There is no size change in task_struct with this patch. Cc: Linus Torvalds Cc: Eric W. Biederman Cc: Peter Zijlstra Cc: Ingo Molnar Signed-off-by: David Vernet Acked-by: Oleg Nesterov Link: https://lore.kernel.org/r/20230215233033.889644-1-void@manifault.com Signed-off-by: Alexei Starovoitov commit 5fef1b434aa35e7e34f16bc5cb389d783f5a832f Author: Johan Hovold Date: Thu Feb 2 16:54:48 2023 +0100 arm64: dts: qcom: sc8280xp-x13s: enable rtc The Lenovo X13s firmware does not implement the UEFI time runtime services so the RTC in the PM8280K PMIC needs to be accessed directly. To complicate things further, the RTC control and time registers are read-only on this platform so an offset must be stored in some other machine-specific non-volatile memory which an RTC driver can take into account when reading or updating the time. The UEFI firmware (and Windows) use a UEFI variable for this: 882f8c2b-9646-435f-8de5-f208ff80c1bd-RTCInfo but the offset can only be accessed via the Qualcomm UEFI Secure Application residing in the TEE as the firmware does not implement the variable runtime services either. While it is possible to access this UEFI variable from Linux on the X13s, this requires using a fairly complex and reverse-engineered firmware interface. As the only benefit of doing so is to make sure that the UEFI (Windows) and Linux time never gets out of sync, it seems preferable to use the PMIC scratch registers for storing an offset instead. This also avoids flash wear in case of RTC drift, etc. So instead of using the UEFI RTC offset, reserve four bytes in one of the PMIC SDAM scratch-register blocks to hold the RTC offset. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230202155448.6715-23-johan+linaro@kernel.org commit e67b45582c5e2ca829f4bb4c0042f75cdec62b80 Author: Johan Hovold Date: Thu Feb 2 16:54:47 2023 +0100 arm64: dts: qcom: sc8280xp-crd: enable rtc The SC8280XP CRD firmware does not implement the UEFI time runtime services so the RTC in the PM8280K PMIC needs to be accessed directly. To complicate things further, the RTC control and time registers are read-only on this platform so an offset must be stored in some other machine-specific non-volatile memory which an RTC driver can take into account when reading or updating the time. The UEFI firmware (and Windows) use a UEFI variable for this: 882f8c2b-9646-435f-8de5-f208ff80c1bd-RTCInfo but the offset can only be accessed via the Qualcomm UEFI Secure Application residing in the TEE as the firmware does not implement the variable runtime services either. While it is possible to access this UEFI variable from Linux on the CRD, this requires using a fairly complex and reverse-engineered firmware interface. As the only benefit of doing so is to make sure that the UEFI (Windows) and Linux time never gets out of sync, it seems preferable to use the PMIC scratch registers for storing an offset instead. This also avoids flash wear in case of RTC drift, etc. Also note that setting variables using this interface does not work on at least one CRD for reasons not yet known. So instead of using the UEFI RTC offset, reserve four bytes in one of the PMIC SDAM scratch-register blocks to hold the RTC offset. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230202155448.6715-22-johan+linaro@kernel.org commit d6dbbda37ab5ab83dccf634fe082eb48d81b4899 Author: Johan Hovold Date: Thu Feb 2 16:54:46 2023 +0100 arm64: dts: qcom: sc8280xp-pmics: add pmk8280 sdam nvram Add one of the PMK8280 SDAM blocks which can be used to store an RTC offset. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230202155448.6715-21-johan+linaro@kernel.org commit 009d936f15fd3597dbc762595ac8a864b5396611 Author: Johan Hovold Date: Thu Feb 2 16:54:45 2023 +0100 arm64: dts: qcom: sc8280xp-pmics: add pmk8280 rtc The PMK8280 has an RTC which can also be used as a wakeup source. Note that the RTC can not be disabled and updating the time is not permitted either. Instead an offset can be stored in some other machine- specific non-volatile memory which a driver can take into account. Signed-off-by: Johan Hovold Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230202155448.6715-20-johan+linaro@kernel.org commit 17289c0165bdb61a585e8e937b80defc376dbfde Author: Richard Acayan Date: Tue Jan 31 20:00:20 2023 -0500 arm64: dts: qcom: sdm670: add opps for peripherals The interconnects are now in place. Add Operating Performance Points for them to allow the kernel to properly manage them. Signed-off-by: Richard Acayan Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230201010020.84586-3-mailingradian@gmail.com commit 96ce9227fdbcfe32265ffb2803bfbbfa692cb445 Author: Bhupesh Sharma Date: Sat Jan 28 11:12:56 2023 +0530 arm64: dts: qcom: sm6115: Add remoteproc nodes Add the adsp, cdsp and modem remoteproc nodes to sm6115. Signed-off-by: Bhupesh Sharma [bjorn: Extended regs to match #address/size-cells to 2] Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230128054256.2100501-1-bhupesh.sharma@linaro.org commit 34bb2c1c1bb5d36487c1e7ff00dbf49bb91056e2 Author: Krzysztof Kozlowski Date: Mon Jan 23 21:26:01 2023 +0100 soc: qcom: restrict L2 accessors to ARM64 build tests The QCOM_KRYO_L2_ACCESSORS can be compile tested only on ARM64 because it references asm/sysreg.h present only on ARM64. Mark the dependency correct, even though as a non-selectable option it does not have real effect. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230123202601.1296983-1-krzysztof.kozlowski@linaro.org commit c6d616fe10c62f528c8c52663aec338d2f4ee4c3 Author: Ian Rogers Date: Sat Mar 11 18:15:37 2023 -0800 perf evsel: Allow const evsel for certain accesses List sorting, added later to evlist, passes const elements requiring helper functions to also be const. Make the argument to evsel__find_pmu, evsel__is_aux_event and evsel__leader const. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Stephane Eranian Cc: Suzuki Poulouse Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230312021543.3060328-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 408ec1ff0caa340c57eecf4cbd14ef0132036a50 Author: Iuliana Prodan Date: Tue Feb 21 19:03:56 2023 +0200 remoteproc: imx_dsp_rproc: Add custom memory copy implementation for i.MX DSP Cores The IRAM is part of the HiFi DSP. According to hardware specification only 32-bits write are allowed otherwise we get a Kernel panic. Therefore add a custom memory copy and memset functions to deal with the above restriction. Signed-off-by: Iuliana Prodan Link: https://lore.kernel.org/r/20230221170356.27923-1-iuliana.prodan@oss.nxp.com Signed-off-by: Mathieu Poirier commit d97ba0b040b1aee7c2a7a7155b7752413a965d1f Author: Bartosz Golaszewski Date: Thu Mar 9 15:35:51 2023 +0100 arm64: dts: qcom: sa8155p-adp: enable the GNSS high-speed UART Enable the high-speed UART port that's connected to the GNSS controller on the board. Signed-off-by: Bartosz Golaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230309143551.200694-3-brgl@bgdev.pl commit 10d900a834da29cf753f1e45f66982e322a177c1 Author: Bartosz Golaszewski Date: Thu Mar 9 15:35:50 2023 +0100 arm64: dts: sm8150: add the QUPv3 high-speed UART node Add the high-speed UART node to the dtsi for sm8150. Signed-off-by: Bartosz Golaszewski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230309143551.200694-2-brgl@bgdev.pl commit 12e3b2848bfa8197062b7989eefb7c081d372fb8 Author: Ajye Huang Date: Sat Mar 11 02:42:01 2023 +0800 ASoC: Intel: sof_rt5682: Enable Bluetooth offload on adl_rt1019_rt5682 Enable Bluetooth audio offload for drv_name "adl_rt1019_rt5682" with following board configuration specifically: SSP0 - rt5682 Headset SSP1 - alc1019p speaker amp SSP2 - Bluetooth audio Signed-off-by: Ajye Huang Signed-off-by: Mac Chiang Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230310184201.1302232-1-ajye_huang@compal.corp-partner.google.com Signed-off-by: Mark Brown commit fe839119f0e9f69d0f49e63359382f4d1abd3eb7 Merge: da1f22825b4fe 3a60fa4c063da Author: Mark Brown Date: Mon Mar 13 19:06:05 2023 +0000 ASoC: mediatek: fix coverity problems Merge series from Trevor Wu : Coverity reports some UNINIT and CERT STR31-C problems, so we add initialization and dai id check to resolve problems. commit 10966457a96d12f4b0db9c9874e07d06977255c9 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:43 2023 +0100 clk: mediatek: mt8135: Convert to simple probe and enable module build Convert the MT8135 clock drivers to platform_driver using the common simple probe mechanism; special note goes to the introduction of dummy clocks with ID 0 (where 0 is the first entry of a clock array) for each clock controller: this was necessary because of a mistake in the bindings for all MT8135 clock controllers, where the first clock has ID 1 (hence, array would start from element 1) instead of zero. Now that all of the MT8135 clock drivers (including apmixedsys) can be compiled as modules, change the COMMON_CLK_MT8135 configuration option to tristate to enable module build. While at it, also remove the __initconst annotation from all of the clock arrays as they are not only used during init anymore, but also during runtime. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-55-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 139e62185668d9c5add561177ba85f5a598113da Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:42 2023 +0100 clk: mediatek: mt8135: Join root_clk_alias and top_divs arrays In preparation for converting this driver to the common simple probe mechanism, join the root_clk_alias and top_divs mtk_fixed_factor arrays. This commit brings no functional change. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-54-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 54b7026f011e25826e1b56ea2a5ace30516bf706 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:41 2023 +0100 clk: mediatek: mt8135-apmixedsys: Convert to platform_driver and module Convert apmixedsys clocks to be a platform driver; while at it, also add necessary error handling to the probe function, add a remove callback and provide a MODULE_DESCRIPTION(). This driver is now compatible with an eventual module build. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-53-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit f4f9a9c003b52ea3cffda186753bfb3e37b970f8 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:40 2023 +0100 clk: mediatek: mt8135: Properly use CLK_IS_CRITICAL flag Instead of calling clk_prepare_enable() for clocks that shall stay enabled, use the CLK_IS_CRITICAL flag, which purpose is exactly that. Fixes: a8aede794843 ("clk: mediatek: Add basic clocks for Mediatek MT8135.") Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-52-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit aafcf16c9e567f7a606f28272baa35bd697508a7 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:39 2023 +0100 clk: mediatek: mt8135: Move apmixedsys to its own file In preparation for migrating mt8135 clocks to the common simple probe mechanism, move the apmixedsys clocks to a different file. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-51-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 65c9ad77cbc0eed78db94d80041aba675cfbdfa9 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:38 2023 +0100 clk: mediatek: Add MODULE_DEVICE_TABLE() where appropriate Add a MODULE_DEVICE_TABLE() on all clocks that can be built as modules to allow auto-load at boot. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Tested-by: Chen-Yu Tsai # MT8183, MT8192, MT8195 Chromebooks Link: https://lore.kernel.org/r/20230306140543.1813621-50-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 9bfa4fb1e0d6de678a79ec5a05fac464edcee91d Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:37 2023 +0100 clk: mediatek: Kconfig: Allow module build for core mt8192 clocks Bootloaders must in a way setup the SoC to boot Linux: this means that it will be possible to decompress a ramdisk and eventually insert the core clock driver module from there. Allow module build for all MT8192 clocks by switching to tristate. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-49-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 124294ff468fb3e2767473f2e317cd0ffa7eff90 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:36 2023 +0100 clk: mediatek: mt8192: Move apmixedsys clock driver to its own file This is the last man standing in clk-mt8192.c that won't allow us to use the module_platform_driver() macro, and for *no* good reason. Move it to clk-mt8192-apmixedsys.c and while at it, also add a .remove() callback for it. Also, since the need for "clk-mt8192-simple" and "clk-mt8192" was just due to them being in the same file and probing different clocks, and since now there's just one platform_driver struct per file, it seemed natural to rename the `-simple` variant to just "clk-mt8192". Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-48-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 5baf38e06a570a2a4ed471a996aff6d6ba69cceb Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:35 2023 +0100 clk: mediatek: Split configuration options for MT8186 clock drivers When building clock drivers for MT8186, some may want to build in only some of them to, for example, get CPUFreq up faster, and some may want to leave out some clock drivers entirely as a machine may not need the Warp Engine or the camera ISP (hence, their clock drivers). Split the various clock drivers in their own configuration options, keeping MT8186 configuration options consistent with other MediaTek SoCs. While at it, also allow building the remaining clock drivers as modules by switching COMMON_CLK_MT8186 to tristate. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-47-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 6f0d2e07f2dbcafdc4018839bc99971dd1a7232d Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:34 2023 +0100 clk: mediatek: Allow building most MT6797 clock drivers as modules Most of the MT6797 clock drivers can be built as modules: change them to tristate to allow that. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-46-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit cfe2c864f0cc80ef292c0b01bb7b83b4cc393516 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:33 2023 +0100 clk: mediatek: Allow building most MT6765 clock drivers as modules Most of the MT6765 clock drivers can be built as modules: change them to tristate to allow that. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-45-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 95ffe65437b239db3f5a570b31cd79629c851743 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:32 2023 +0100 clk: mediatek: Allow all MT8183 clocks to be built as modules All MT8183 clocks are platform drivers now! Allow module build for all of them. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-44-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit a851b17059bc07572224045f05ee556aa4ab0303 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:31 2023 +0100 clk: mediatek: Allow all MT8167 clocks to be built as modules Almost all MT8167 clocks have been converted to use the common probe mechanism, moreover, now all of them are platform drivers: allow building as modules. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-43-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit c8f0ef997329728a136d07967b7a97cba3f07f7b Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:30 2023 +0100 clk: mediatek: Allow MT7622 clocks to be built as modules Now that all drivers are using the simple probe mechanism change the MT7622 clock drivers to tristate in Kconfig to allow module build. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-42-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit e55351ac27ecffcff0bfb775924629003cde8005 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:29 2023 +0100 clk: mediatek: Allow building MT8192 non-critical clocks as modules Allow building non boot critical clocks for MT8192 SoC as modules by changing them to tristate. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-41-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 0f471d31e5e87ac09aeee2bd370a5c7e4f8aa925 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:28 2023 +0100 clk: mediatek: Split MT8195 clock drivers and allow module build MT8195 clock drivers were encapsulated in one single (and big) Kconfig option: there's no reason to do that, as it is totally unnecessary to build in all or none of them. Split them out: keep boot-critical clocks as bool and allow choosing non critical clocks as tristate. As a note, the dependencies of VDEC/VENCSYS and CAM/IMG/IPE/WPESYS are not for build-time but rather for runtime, as clocks registered by those have runtime dependencies on either or both VPP and IMGSYS. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-40-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 650fcdf9181e4551cd22d651a8e637c800045c97 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:27 2023 +0100 clk: mediatek: mt2712: Change Kconfig options to allow module build All of the mt2712 drivers have been converted to platform drivers! Change the Kconfig options for all MT2712 clocks to tristate to allow building all clock drivers as modules. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-39-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit a451da86cf6d10e94372d20622ec41aac9ec00b5 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:26 2023 +0100 clk: mediatek: Add MODULE_LICENSE() where missing In order to successfully build clock drivers as modules it is required to declare a module license: add it where missing. While at it, also change the MODULE_LICENSE text from "GPL v2" to "GPL" (which means the same) on clk-mt7981-eth.c. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Tested-by: Chen-Yu Tsai # MT8183, MT8192, MT8195 Chromebooks Link: https://lore.kernel.org/r/20230306140543.1813621-38-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 164d240de9ce71e790ef325e2e465d3a7ea46e40 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:25 2023 +0100 clk: mediatek: Switch to module_platform_driver() where possible Lots of clock drivers have got both .probe() and a .remove() callbacks: switch from builtin_platform_driver() to module_platform_driver() so that we actually register the .remove() callback. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Tested-by: Chen-Yu Tsai # MT8183, MT8192, MT8195 Chromebooks Link: https://lore.kernel.org/r/20230306140543.1813621-37-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit c5f34f63e5140646f807e4024ee6a0dcefd15482 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:24 2023 +0100 clk: mediatek: mt8186-mcu: Migrate to common probe mechanism Convert MT8186 MCUSYS clocks to the common mtk_clk_simple_probe(). Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-36-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 1d04e30065b63dfabf7627b08e6f3a2a9a9ce638 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:23 2023 +0100 clk: mediatek: mt7986-eth: Migrate to common probe mechanism Convert this driver to use the common mtk_clk_simple_probe() mechanism. While at it, also remove __initconst annotations (as these structures are used also at runtime). Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Daniel Golle Link: https://lore.kernel.org/r/20230306140543.1813621-35-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 148a39560b27155906c594a60199494945ca7d81 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:22 2023 +0100 clk: mediatek: mt7986-infracfg: Migrate to common probe mechanism Convert this driver to use the common mtk_clk_simple_probe() mechanism. While at it, also use module_platform_driver() instead, as this driver just gained a .remove() callback during the conversion. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Daniel Golle Link: https://lore.kernel.org/r/20230306140543.1813621-34-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 2562dc42aec84fc6f263ff4198dea85752c4f703 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:21 2023 +0100 clk: mediatek: mt7986-apmixed: Use PLL_AO flag to set critical clock Instead of calling clk_prepare_enable() at probe time, add the PLL_AO flag to CLK_APMIXED_ARMPLL clock: this will set CLK_IS_CRITICAL. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Daniel Golle Link: https://lore.kernel.org/r/20230306140543.1813621-33-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 6b7daeaa7e64151df080208d6636ae433dbe07c1 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:20 2023 +0100 clk: mediatek: Propagate struct device with mtk_clk_register_dividers() Propagate struct device for divider clocks registered through clk-mtk helpers to be able to get runtime PM support for MTK clocks. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai # MT8183, MT8192, MT8195 Chromebooks Link: https://lore.kernel.org/r/20230306140543.1813621-32-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 876d4e21aad8b60e155dbc5bbfb8c8e75c4d9f4b Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:19 2023 +0100 clk: mediatek: mt8516: Allow building clock drivers as modules Now that all MT8516 drivers have been converted to platform driver, change the configuration options to tristate. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-31-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit b8390192f2755b8f58304374170341f49fe7067e Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:18 2023 +0100 clk: mediatek: mt8516: Convert to platform driver and simple probe Convert the MT8516 clock drivers to be platform drivers and use the common probe mechanism. Thanks to the conversion, more error handling was added to the clocks registration. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-30-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit f419069ad864bdb6a9ba5a38ea01224187376d6e Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:17 2023 +0100 clk: mediatek: mt8516: Move apmixedsys clock driver to its own file In preparation for migrating mt8516 clocks to the common simple probe mechanism, convert the apmixedsys to be a separated platform driver and move it to clk-mt8516-apmixedsys.c. While at it, also fix some indentation issues. During the conversion, error handling was added to the apmixedsys probe function. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-29-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 054a47fc47bd1c746ba122e2afb353f9620015b8 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:16 2023 +0100 clk: mediatek: mt7622: Convert to platform driver and simple probe Convert the MT7622 topckgen and pericfg clock drivers to platform drivers and use the simple probe mechanism. This also allows to build these clocks as modules. Thanks to the conversion, more error handling was added to the clocks registration. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-28-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 838b86331c5e8f424b5a565e6c9c472b55768319 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:15 2023 +0100 clk: mediatek: mt7622: Move infracfg to clk-mt7622-infracfg.c The infracfg driver cannot be converted to clk_mtk_simple_probe() as it registers cpumuxes, which is not supported on the common probing mechanism: for this reason, move it to its own file. While at it, also convert it to be a platform driver instead; to do so, also add a .remove() callback for this driver. During the conversion, error handling was added to the infracfg probe function. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-27-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit c50e2ea6507bcf5a4475f821fc03dd1fdcb894a7 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:14 2023 +0100 clk: mediatek: mt7622-apmixedsys: Add .remove() callback for module build Add a .remove() callback to the apmixedsys driver to allow full module build; while at it, also change the usage of builtin_platform_driver() to module_platform_driver() to actually make use of the new callback. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-26-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 9aed98adf601c02a929822526c8031003ff95a32 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:13 2023 +0100 clk: mediatek: mt7622: Move apmixedsys clock driver to its own file In preparation for migrating mt7622 clocks to the common simple probe mechanism, move apmixedsys clocks to a different file. While at it, use the builtin_platform_driver() macro for it. During the conversion, error handling was added to the apmixedsys probe function. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-25-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit fa8c0d01df62130ff596d560380a6f844f62639e Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:12 2023 +0100 clk: mediatek: mt7622: Properly use CLK_IS_CRITICAL flag Instead of calling clk_prepare_enable() for clocks that shall stay enabled, use the CLK_IS_CRITICAL flag, which purpose is exactly that. Fixes: 2fc0a509e4ee ("clk: mediatek: add clock support for MT7622 SoC") Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-24-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 4c85e20b656607897e3bb06ff565822fa4b4de95 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:11 2023 +0100 clk: mediatek: Consistently use GATE_MTK() macro All the various MediaTek clock drivers are, in a way or another, redefining the GATE_MTK() macro with different names: while some are doing that by actually using GATE_MTK(), others are copying it entirely (hence, entirely redefining it). Change all clock drivers to always and consistently use this macro. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai # MT8183, MT8192, MT8195 Chromebooks Link: https://lore.kernel.org/r/20230306140543.1813621-23-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 3f37ba7cc385ba07762ffcd7ac38af8c0f84dd3e Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:10 2023 +0100 clk: mediatek: mt8183: Convert all remaining clocks to common probe Switch to mtk_clk_simple_{probe,remove}() for infracfg and topckgen clocks on MT8183 to allow full module build for clock drivers. Differently from other MediaTek clock drivers, it was necessary to change the name of the `clk13m` clock, as that is already declared in the SoC's devicetree as a "fixed-factor-clock" (with the same name) and redeclaring it here would obviously fail to register the entire clock controller; this clock wasn't dropped only to retain compatibility with older devicetrees As a note, the `clk13m` clock is not mentioned in any parent names array(s) as the correct one (csw_f26m_d2) is already used in place of that. Thanks to the conversion, more error handling was added to the clocks registration. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-22-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 2f140dabfe49745582226af4b4c371f4b248e7cf Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:09 2023 +0100 clk: mediatek: mt8183: Compress clocks arrays entries where possible Increase human readability and decrease number of lines by compressing the clock array entries where possible, to a maximum of ~95 columns. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-21-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 127fadf7a46932646c8af2a972d301b975754697 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:08 2023 +0100 clk: mediatek: mt8183: Move apmixedsys clock driver to its own file In preparation for migrating all other mt8183 clocks to the common mtk_clk_simple_probe(), move apmixedsys clocks to a different file. While at it, use the builtin_platform_driver() macro for it and fix some indentation issues in the PLLs table. During the conversion, error handling was added to the apmixedsys probe function. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-20-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit beb47f1942071b43bec84adc2fbd94e866953032 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:07 2023 +0100 clk: mediatek: mt8167: Convert to mtk_clk_simple_{probe,remove}() Convert topckgen and infracfg clock drivers to use the common mtk_clk_simple_probe() mechanism and change this from the old "static" CLK_OF_DECLARE to be a platform driver, allowing it to eventually be built as a module. Thanks to the conversion, more error handling was added to the clocks registration. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-19-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit b4bd678f27e24e5c7cb7ad87829a2f7d724fc5bb Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:06 2023 +0100 clk: mediatek: mt8167: Remove __initconst annotation from arrays In preparation for converting the MT8167 clock drivers to be proper platform_driver(s), drop the __initconst annotation from all of the clock arrays since they will be used not only during init but also during runtime. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-18-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit b27284336aa4b52129f5fd1f2e1f5b5fdccaee4b Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:05 2023 +0100 clk: mediatek: mt8167: Move apmixedsys as platform_driver in new file In preparation for migrating all other MT8167 clocks to the common mtk_clk_simple_probe(), move apmixedsys clocks to a different file. While at it, also migrate away from the legacy CLK_OF_DECLARE and convert this clock driver to be a platform_driver instead. During the conversion, error handling was added to the apmixedsys probe function. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-17-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit c1a988f15a9203f39da37935e065c1abb61106ca Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:04 2023 +0100 clk: mediatek: mt8167: Compress GATE_TOPx macros Use the GATE_MTK macro to compress the GATE_TOP{0..5} macros. No functional changes. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-16-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit ffe91cb28f6a923b31024dbb83a75ee9e7a269b7 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:03 2023 +0100 clk: mediatek: mt8365: Convert to mtk_clk_simple_{probe,remove}() All clocks in this driver are supported by the common simple probe mechanism and it's now possible to migrate to it. While at it, also switch to using the module_platform_driver() macro. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-15-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit ff96210073ece5b172b48b1c16a72f9c41d128e7 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:02 2023 +0100 clk: mediatek: mt8365: Join top_misc_mux_gates and top_misc_muxes arrays In preparation for migrating this driver to the simple probe mechanism, join the audio gates to the top_misc_mux_gates array of mtk_composite clocks in one top_misc_muxes array. While at it, since the `apll_i2s0_parents` array is for all i2s clocks, rename that to `apll_i2s_parents`. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-14-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 905b7430d3ccc435aec6030a622e5611704cc37c Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:01 2023 +0100 clk: mediatek: mt8365: Convert simple_gate to mtk_gate clocks On this SoC some clocks apparently don't have different offsets for set/clr/sta registers hence they can be set, cleared and status-read on one register: this means that it was possible to use simpler gate clocks instead of custom mtk_gate ones. In preparation for converting this clock driver to the common probe mechanism for MediaTek clocks, perform a conversion from simple_gate to mtk_gate clocks since the latter does provide implicit support for simple gate clocks as well. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-13-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit ab44c1a70e79d37b243ba1a202d9596a7a137b9b Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:05:00 2023 +0100 clk: mediatek: mt8365: Move apmixedsys clock driver to its own file In preparation for migrating all other mt8365 clocks to the common mtk_clk_simple_probe(), move apmixedsys clocks to a different file. While at it, use the builtin_platform_driver() macro for it. During the conversion, error handling was added to the apmixedsys probe function. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-12-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 274bc8561a314e881507d8d99fe477b436f1f084 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:04:59 2023 +0100 clk: mediatek: mt2712: Change to use module_platform_driver macro Now that all of the clocks in clk-mt2712.c are using the common mtk_clk_simple_{probe,remove}() callbacks we can safely migrate to module_platform_driver. While at it, also drop all references to `simple` in the specific context of mt2712 as that was used in the past only to allow us to have two platform_driver(s) in one file. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-11-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit c6368ce864356ffbb9a4d95bdfbfc53e55467434 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:04:58 2023 +0100 clk: mediatek: mt2712-apmixedsys: Add .remove() callback for module build Add a .remove() callback to the apmixedsys driver to allow full module build; while at it, also change the usage of builtin_platform_driver() to module_platform_driver() to actually make use of the new callback. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-10-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit ae567c34819536a1e7e7e5d202fabb1ce122dd79 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:04:57 2023 +0100 clk: mediatek: mt2712: Move apmixedsys clock driver to its own file The only clock driver that does not support mtk_clk_simple_probe() is apmixedsys: in preparation for enabling module build of non-critical mt2712 clocks, move this to its own file. While at it, also fix some indentation issues in the PLLs table. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-9-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 20cace1b9d7e33f68f0ee17196bf0df618dbacbe Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:04:56 2023 +0100 clk: mediatek: mt2712: Add error handling to clk_mt2712_apmixed_probe() This function was completely missing error handling: add it. Fixes: e2f744a82d72 ("clk: mediatek: Add MT2712 clock support") Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-8-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit f8c3e0e3f31b36ed6b96e437b00fe853cd46a977 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:04:55 2023 +0100 clk: mediatek: mt2712: Compress clock arrays entries to 90 columns Compress the clock arrays entries to allow a maximum of 90 columns: this greatly increases readability and also generously reduces the amount of lines. While at it, also fix some indentation here and there. This is a cosmetic change. No functional changes. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-7-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 67798a5bf22d5164b4ae767cc488e1eb83274320 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:04:54 2023 +0100 clk: mediatek: mt2712: Migrate topckgen/mcucfg to mtk_clk_simple_probe() Now that the common mtk_clk_simple_{probe,remove}() functions can deal with divider clocks it is possible to migrate more clock drivers to it: in this case, it's about topckgen. While at it, also perform a fast migration for mcucfg. Thanks to the conversion, more error handling was added to the clocks registration. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-6-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 1fe074b1f112dc873281ad8de2b2ce57a0c123ad Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:04:53 2023 +0100 clk: mediatek: Add divider clocks to mtk_clk_simple_{probe,remove}() Add support for divider clocks register/unregister in the common mtk_clk_simple_probe() and mtk_clk_simple_remove() functions. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-5-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 65c10c50c9c7619637f064bbdb4d4f37556ee498 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:04:52 2023 +0100 clk: mediatek: Migrate to mtk_clk_pdev_probe() for multimedia clocks Reduce duplication and simplify all MediaTek multimedia clock drivers by migrating away from defining custom probe functions for each driver and instead use mtk_clk_pdev_probe(). While at it, also add a .remove() callback to all of the multimedia clock drivers where missing. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-4-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 252091242404aa7cee131a827a04b8e3d9b88daa Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:04:51 2023 +0100 clk: mediatek: clk-mtk: Introduce clk_mtk_pdev_{probe,remove}() Introduce functions clk_mtk_pdev_probe() and clk_mtk_pdev_remove(): these will be useful to commonize the probe and remove handlers for multimedia (clk-mtxxxx-mm) drivers as these are registered by the mtk-mmsys driver instead of having their own devicetree compatible. In order to do this, the main logic of clk_mtk_simple{probe,remove}() was moved to new static __clk_mtk_simple_{probe,remove}() functions that take as parameter a pointer to struct device_node because when registering the clocks from mtk-mmsys we want to pass a pointer to the clock driver's parent (which is, obviously, mtk-mmsys) struct device_node instead. As for the clock driver's platform data: for the devicetree case, we keep using the standard match_data mechanism, else we retrieve it from an id_table. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-3-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit 4b476b0f45343177c4666cec593dd1acf649bc09 Author: AngeloGioacchino Del Regno Date: Mon Mar 6 15:04:50 2023 +0100 clk: mediatek: clk-mtk: Switch to device_get_match_data() Instead of using of_device_get_match_data(), switch to the generic device_get_match_data(). Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Miles Chen Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230306140543.1813621-2-angelogioacchino.delregno@collabora.com Signed-off-by: Stephen Boyd commit da4a82dc67b02da854d50d342386ba3354fb7a04 Author: AngeloGioacchino Del Regno Date: Mon Feb 6 11:01:05 2023 +0100 clk: mediatek: mt8195: Add support for frequency hopping through FHCTL Add FHCTL parameters and register PLLs through FHCTL to add support for frequency hopping and SSC. FHCTL will be enabled only on PLLs specified in devicetree. This commit brings functional changes only upon addition of devicetree configuration. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230206100105.861720-8-angelogioacchino.delregno@collabora.com Reviewed-by: Chen-Yu Tsai Signed-off-by: Stephen Boyd commit 34f0677e7afd3a292bc1aadda7ce8e35faedb204 Author: Andrii Nakryiko Date: Mon Mar 13 11:40:17 2023 -0700 bpf: fix precision propagation verbose logging Fix wrong order of frame index vs register/slot index in precision propagation verbose (level 2) output. It's wrong and very confusing as is. Fixes: 529409ea92d5 ("bpf: propagate precision across all frames, not just the last one") Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230313184017.4083374-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 4d586e10c428f262b167dd46eefa8b362017a9b1 Author: AngeloGioacchino Del Regno Date: Mon Feb 6 11:01:04 2023 +0100 clk: mediatek: mt8192: Add support for frequency hopping through FHCTL Add FHCTL parameters and register PLLs through FHCTL to add support for frequency hopping and SSC. FHCTL will be enabled only on PLLs specified in devicetree. This commit brings functional changes only upon addition of devicetree configuration. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230206100105.861720-7-angelogioacchino.delregno@collabora.com Reviewed-by: Chen-Yu Tsai Signed-off-by: Stephen Boyd commit 45a5cbe05d1f562b24db8ce67bd1bb3a3a9ec425 Author: AngeloGioacchino Del Regno Date: Mon Feb 6 11:01:03 2023 +0100 clk: mediatek: mt8173: Add support for frequency hopping through FHCTL Add FHCTL parameters and register PLLs through FHCTL to add support for frequency hopping and SSC. FHCTL will be enabled only on PLLs specified in devicetree. This commit brings functional changes only upon addition of devicetree configuration. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230206100105.861720-6-angelogioacchino.delregno@collabora.com Reviewed-by: Chen-Yu Tsai Signed-off-by: Stephen Boyd commit f222a1baec5f2f1f1d494589a74646d1411dd8ce Author: AngeloGioacchino Del Regno Date: Mon Feb 6 11:01:02 2023 +0100 clk: mediatek: mt6795: Add support for frequency hopping through FHCTL Add FHCTL parameters and register PLLs through FHCTL to add support for frequency hopping and SSC. FHCTL will be enabled only on PLLs specified in devicetree. This commit brings functional changes only upon addition of devicetree configuration. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230206100105.861720-5-angelogioacchino.delregno@collabora.com Reviewed-by: Chen-Yu Tsai Signed-off-by: Stephen Boyd commit 4ba8590f624f66b9d33e27318c65f650f28ba760 Author: AngeloGioacchino Del Regno Date: Mon Feb 6 11:01:01 2023 +0100 dt-bindings: clock: mediatek,mt8186-fhctl: Support MT6795, MT8173/92/95 MT6795, MT8173, MT8192 and MT8195 support Frequency Hopping: add the compatibles for them. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230206100105.861720-4-angelogioacchino.delregno@collabora.com Acked-by: Krzysztof Kozlowski Reviewed-by: Chen-Yu Tsai Signed-off-by: Stephen Boyd commit 36dff04c459e809e42e35e4e99863fe5de8f4909 Author: AngeloGioacchino Del Regno Date: Mon Feb 6 11:01:00 2023 +0100 clk: mediatek: clk-pllfh: Export register/unregister/parse functions These functions are used by the various MediaTek apmixed clock drivers that may be built as modules: export the common functions used to parse related devicetree properties, register and unregister the PLLFH clocks. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230206100105.861720-3-angelogioacchino.delregno@collabora.com Reviewed-by: Chen-Yu Tsai Signed-off-by: Stephen Boyd commit 8da312d6574c7b3f58ee8dbc85afa392224b5470 Author: AngeloGioacchino Del Regno Date: Mon Feb 6 11:00:59 2023 +0100 clk: mediatek: fhctl: Add support for older fhctl register layout The Frequency Hopping Controller (FHCTL) seems to have different versions, as it has a slightly different register layout on some older SoCs like MT6795, MT8173, MT8183 (and others). This driver is indeed compatible with at least some of those older IP revisions, so all we need to do is to add a way to select the right register layout at registration time. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230206100105.861720-2-angelogioacchino.delregno@collabora.com Reviewed-by: Chen-Yu Tsai Signed-off-by: Stephen Boyd commit 4d8ff713e684ea58111a33ea7df2e7ddc30683cc Merge: 0762875674b96 7859ad5a401b7 Author: Mark Brown Date: Mon Mar 13 18:19:31 2023 +0000 spi: struct spi_device constification Merge series from Geert Uytterhoeven : After noticing new cases of casting away constness, I went over all spi_get_*() functions and their callers, and made the following changes: 1. Make all pointer parameters const where possible, 2. Remove unneeded casts, some not even related to constness. commit ce5b85906cd6a14b00f6b2c09d066554d2c13abd Author: Ian Rogers Date: Sat Mar 11 18:15:36 2023 -0800 perf stat: Modify the group test Currently nr_members is 0 for an event with no group, however, they are always a leader of their own group. A later change will make that count 1 because the event is its own leader. Make the find_stat logic consistent with this, an improvement suggested by Namhyung Kim. Suggested-by: Namhyung Kim Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Stephane Eranian Cc: Suzuki Poulouse Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230312021543.3060328-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3c7b84d419c2a85069292d1df0695236f99c52df Author: Ian Rogers Date: Sat Mar 11 18:15:35 2023 -0800 perf pmu: Earlier PMU auxtrace initialization This allows event parsing to use the evsel__is_aux_event function, which is important when determining event grouping. Suggested-by: Adrian Hunter Signed-off-by: Ian Rogers Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Stephane Eranian Cc: Suzuki Poulouse Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230312021543.3060328-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit bc6c6cdc7d927322461eb95601013524931d2ad6 Author: Ian Rogers Date: Sat Mar 11 18:15:34 2023 -0800 perf stat: Don't remove all grouped events when CPU maps disagree If the events in an evlist's CPU map differ then the entire group is removed. For example: ``` $ perf stat -e '{imc_free_running/data_read/,imc_free_running/data_write/,cs}' -a sleep 1 WARNING: grouped events cpus do not match, disabling group: anon group { imc_free_running/data_read/, imc_free_running/data_write/, cs } ``` Change the behavior so that just the events not matching the leader are removed. So in the example above, just 'cs' will be removed. Modify the warning so that it is produced once for each group, rather than once for the entire evlist. Shrink the scope and size of the warning text buffer. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Stephane Eranian Cc: Suzuki Poulouse Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230312021543.3060328-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 5dd827e0fa586521416730e2bb8c3846f6dd91fc Author: Ian Rogers Date: Sat Mar 11 18:15:33 2023 -0800 libperf evlist: Avoid a use of evsel idx Setting the leader iterates the list, so rather than use idx (which may be changed through list reordering) just count the elements and set afterwards. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Florian Fischer Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Kan Liang Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Stephane Eranian Cc: Suzuki Poulouse Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230312021543.3060328-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit be96815c616822d3800405b8fbebe3e069d6eed2 Author: Jacob Keller Date: Wed Feb 22 09:09:20 2023 -0800 ice: call ice_is_malicious_vf() from ice_vc_process_vf_msg() The main loop in __ice_clean_ctrlq first checks if a VF might be malicious before calling ice_vc_process_vf_msg(). This results in duplicate code in both functions to obtain a reference to the VF, and exports the ice_is_malicious_vf() from ice_virtchnl.c unnecessarily. Refactor ice_is_malicious_vf() to be a static function that takes a pointer to the VF. Call this in ice_vc_process_vf_msg() just after we obtain a reference to the VF by calling ice_get_vf_by_id. Pass the mailbox data from the __ice_clean_ctrlq function into ice_vc_process_vf_msg() instead of calling ice_is_malicious_vf(). This reduces the number of exported functions and avoids the need to obtain the VF reference twice for every mailbox message. Note that the state check for ICE_VF_STATE_DIS is kept in ice_is_malicious_vf() and we call this before checking that state in ice_vc_process_vf_msg. This is intentional, as we stop responding to VF messages from a VF once we detect that it may be overflowing the mailbox. This ensures that we continue to silently ignore the message as before without responding via ice_vc_send_msg_to_vf(). Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit c414463ab1bb098e67f4c1a4ef64f3e97780f087 Author: Jacob Keller Date: Wed Feb 22 09:09:19 2023 -0800 ice: move ice_is_malicious_vf() to ice_virtchnl.c The ice_is_malicious_vf() function is currently implemented in ice_sriov.c This function is not Single Root specific, and a future change is going to refactor the ice_vc_process_vf_msg() function to call this instead of calling it before ice_vc_process_vf_msg() in the main loop of __ice_clean_ctrlq. To make that change easier to review, first move this function into ice_virtchnl.c but leave the call in __ice_clean_ctrlq() alone. Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 4508bf02bf8a3de8fb65869f40dfdef74dc1b339 Author: Jacob Keller Date: Wed Feb 22 09:09:18 2023 -0800 ice: print message if ice_mbx_vf_state_handler returns an error If ice_mbx_vf_state_handler() returns an error, the ice_is_malicious_vf() function just exits without printing anything. Instead, use dev_warn_ratelimited to print a warning that we were unable to check the status for this VF. The _ratelimited variant is used to avoid potentially spamming the log if this function is failing consistently for every single mailbox message. Also we can drop the "goto" as it simply skips over a report_malvf check. That variable should always be false if ice_mbx_vf_state_handler returns non-zero. Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit afc24d6584fbd246d98c0feb464b94da67661e3e Author: Jacob Keller Date: Wed Feb 22 09:09:17 2023 -0800 ice: pass mbxdata to ice_is_malicious_vf() The ice_is_malicious_vf() function takes information about the current state of the mailbox during a single interrupt. This information includes the number of messages processed so far, as well as the number of pending messages not yet processed. A future refactor is going to make ice_vc_process_vf_msg() call ice_is_malicious_vf() instead of having it called separately in ice_main.c This change will require passing all the necessary arguments into ice_vc_process_vf_msg(). To make this simpler, have the main loop fill in the struct ice_mbx_data and pass that rather than passing in the num_msg_proc and num_msg_pending. Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 3f22fc3131b814f0d5d1ce6d94fb8239e6df1754 Author: Jacob Keller Date: Wed Feb 22 09:09:16 2023 -0800 ice: remove unnecessary &array[0] and just use array In ice_is_malicious_vf we print the VF MAC address using %pM by passing the address of the first element of vf->dev_lan_addr. This is equivalent to just passing vf->dev_lan_addr, so do that. Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 4f0636fef61ad0b22fed4fb06f369d6ba38f807d Author: Jacob Keller Date: Wed Feb 22 09:09:15 2023 -0800 ice: always report VF overflowing mailbox even without PF VSI In ice_is_malicious_vf we report a message warning the system administrator when a VF is potentially spamming the PF with asynchronous messages that could overflow the PF mailbox. The specific message was requested by our customer support team to include the VF and PF MAC address. In some cases we may not be able to locate the PF VSI to obtain the MAC address for the PF. The current implementation discards the message entirely in this case. Fix this to instead print a zero address in that case so that we always print something here. Note that dev_warn will also include the PCI device information allowing another mechanism for determining on which PF the potentially malicious VF belongs. Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 33b035e70611c10c5aa3864a7517570b25a46ebb Author: Jacob Keller Date: Wed Feb 22 09:09:14 2023 -0800 ice: declare ice_vc_process_vf_msg in ice_virtchnl.h The ice_vc_process_vf_msg function is the main entry point for handling virtchnl messages. This function is defined in ice_virtchnl.c but its declaration is still in ice_sriov.c The ice_sriov.c file used to contain all of the virtualization logic until commit bf93bf791cec ("ice: introduce ice_virtchnl.c and ice_virtchnl.h") moved the virtchnl logic to its own file. The ice_vc_process_vf_msg function should have had its declaration moved to ice_virtchnl.h then. Fix this. Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit dde7db637d9981b47da0da575661d0ec83f8b25a Author: Jacob Keller Date: Wed Feb 22 09:09:13 2023 -0800 ice: initialize mailbox snapshot earlier in PF init Now that we no longer depend on the number of VFs being allocated, we can move the ice_mbx_init_snapshot function earlier. This will be required by Scalable IOV as we will not be calling ice_sriov_configure for Scalable VFs. Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 07cc1a942216d1f211f1c641af8b6f810bb16699 Author: Jacob Keller Date: Wed Feb 22 09:09:12 2023 -0800 ice: merge ice_mbx_report_malvf with ice_mbx_vf_state_handler The ice_mbx_report_malvf function is used to update the ice_mbx_vf_info.malicious member after we detect a malicious VF. This is done by calling ice_mbx_report_malvf after ice_mbx_vf_state_handler sets its "is_malvf" return parameter true. Instead of requiring two steps, directly update the malicious bit in the state handler, and remove the need for separately calling ice_mbx_report_malvf. Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit f9f60efbfc98a9b228d35a1a98fee0528c1fd3ae Author: Changbin Du Date: Thu Mar 2 11:11:46 2023 +0800 perf ftrace: Reuse target::initial_delay Replace perf_ftrace::initial_delay with target::initial_delay. Specifying a negative initial_delay is meaningless for ftrace in practice but allowed here. Signed-off-by: Changbin Du Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Hui Wang Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230302031146.2801588-4-changbin.du@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit cb4b9e6813f9243095932c867ff16a7dffa02102 Author: Changbin Du Date: Thu Mar 2 11:11:45 2023 +0800 perf record: Reuse target::initial_delay This just simply replace record_opts::initial_delay with target::initial_delay. Nothing else is changed. Signed-off-by: Changbin Du Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Hui Wang Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230302031146.2801588-3-changbin.du@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 07d85ba9d04e1ebd282f656a29ddf08c5b7b32a2 Author: Kan Liang Date: Wed Mar 1 07:04:13 2023 -0800 perf record: Fix "read LOST count failed" msg with sample read Hundreds of "read LOST count failed" error messages may be displayed, when the below command is launched. perf record -e '{cpu/mem-loads-aux/,cpu/event=0xcd,umask=0x1/}:S' -a According to the commit 89e3106fa25fb1b6 ("libperf: Handle read format in perf_evsel__read()"), the PERF_FORMAT_GROUP is only available for the leader. However, the record__read_lost_samples() goes through every entry of an evlist, which includes both leader and member. The member event errors out and triggers the error message. Since there may be hundreds of CPUs on a server, the message will be printed hundreds of times, which is very annoying. The message itself is correct, but the pr_err is a overkill. Other error messages in the record__read_lost_samples() are all pr_debug. To make the output format consistent, change the pr_err("read LOST count failed\n"); to pr_debug("read LOST count failed\n");. User can still get the message via -v option. Fixes: e3a23261ad06d598 ("perf record: Read and inject LOST_SAMPLES events") Signed-off-by: Kan Liang Acked-by: Namhyung Kim Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20230301150413.27011-1-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 11bb42a94648af7d4fd570b7f7f26e74d9561ef0 Author: Iuliana Prodan Date: Fri Feb 17 11:41:24 2023 +0200 remoteproc: imx_dsp_rproc: Add module parameter to ignore ready flag from remote processor There are cases when we want to test a simple "hello world" application on the DSP and we don't have IPC between the cores. Therefore, do not wait for a confirmation from the remote processor at start. Added "no_mailboxes" flag while inserting the module to not initialize any mailboxes, and so ignore remote processor reply after start. By default, this is off - do not ignore reply from rproc. Signed-off-by: Iuliana Prodan Reviewed-by: Daniel Baluta Link: https://lore.kernel.org/r/20230217094124.9440-1-iuliana.prodan@oss.nxp.com [Fixed checkpatch warning] Signed-off-by: Mathieu Poirier commit 71b1e3ba3fed5a34c5fac6d3a15c2634b04c1eb7 Author: Qiuxu Zhuo Date: Sat Feb 11 09:17:28 2023 +0800 EDAC/skx: Fix overflows on the DRAM row address mapping arrays The current DRAM row address mapping arrays skx_{open,close}_row[] only support ranks with sizes up to 16G. Decoding a rank address to a DRAM row address for a 32G rank by using either one of the above arrays by the skx_edac driver, will result in an overflow on the array. For a 32G rank, the most significant DRAM row address bit (the bit17) is mapped from the bit34 of the rank address. Add this new mapping item to both arrays to fix the overflow issue. Fixes: 4ec656bdf43a ("EDAC, skx_edac: Add EDAC driver for Skylake") Reported-by: Feng Xu Tested-by: Feng Xu Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/all/20230211011728.71764-1-qiuxu.zhuo@intel.com commit 4bdf5f258331f049bbff2d770cfcb62f6b789dfe Author: Jacob Keller Date: Wed Feb 22 09:09:11 2023 -0800 ice: remove ice_mbx_deinit_snapshot The ice_mbx_deinit_snapshot function's only remaining job is to clear the previous snapshot data. This snapshot data is initialized when SR-IOV adds VFs, so it is not necessary to clear this data when removing VFs. Since no allocation occurs we no longer need to free anything and we can safely remove this function. Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 8cd8a6b17d275a45e3722d0215f6115b687c8c3e Author: Jacob Keller Date: Wed Feb 22 09:09:10 2023 -0800 ice: move VF overflow message count into struct ice_mbx_vf_info The ice driver has some logic in ice_vf_mbx.c used to detect potentially malicious VF behavior with regards to overflowing the PF mailbox. This logic currently stores message counts in struct ice_mbx_vf_counter.vf_cntr as an array. This array is allocated during initialization with ice_mbx_init_snapshot. This logic makes sense for SR-IOV where all VFs are allocated at once up front. However, in the future with Scalable IOV this logic will not work. VFs can be added and removed dynamically. We could try to keep the vf_cntr array for the maximum possible number of VFs, but this is a waste of memory. Use the recently introduced struct ice_mbx_vf_info structure to store the message count. Pass a pointer to the mbx_info for a VF instead of using its VF ID. Replace the array of VF message counts with a linked list that tracks all currently active mailbox tracking info structures. Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit e4eaf8938852d092fa447b32adb8ec233621d86a Author: Jacob Keller Date: Wed Feb 22 09:09:09 2023 -0800 ice: track malicious VFs in new ice_mbx_vf_info structure Currently the PF tracks malicious VFs in a malvfs bitmap which is used by the ice_mbx_clear_malvf and ice_mbx_report_malvf functions. This bitmap is used to ensure that we only report a VF as malicious once rather than continuously spamming the event log. This mechanism of storage for the malicious indication works well enough for SR-IOV. However, it will not work with Scalable IOV. This is because Scalable IOV VFs can be allocated dynamically and might change VF ID when their underlying VSI changes. To support this, the mailbox overflow logic will need to be refactored. First, introduce a new ice_mbx_vf_info structure which will be used to store data about a VF. Embed this structure in the struct ice_vf, and ensure it gets initialized when a new VF is created. For now this only stores the malicious indicator bit. Pass a pointer to the VF's mbx_info structure instead of using a bitmap to keep track of these bits. A future change will extend this structure and the rest of the logic associated with the overflow detection. Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 28756d9ec93e6588b1c3a00cc9123e238a71c709 Author: Jacob Keller Date: Wed Feb 22 09:09:08 2023 -0800 ice: convert ice_mbx_clear_malvf to void and use WARN The ice_mbx_clear_malvf function checks for a few error conditions before clearing the appropriate data. These error conditions are really warnings that should never occur in a properly initialized driver. Every caller of ice_mbx_clear_malvf just prints a dev_dbg message on failure which will generally be ignored. Convert this function to void and switch the error return values to WARN_ON. This will make any potentially misconfiguration more visible and makes future refactors that involve changing how we store the malicious VF data easier. Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 504ce971f260c178fa625f1278d9a762bc366504 Author: Jacob Keller Date: Wed Feb 22 09:09:07 2023 -0800 ice: re-order ice_mbx_reset_snapshot function A future change is going to refactor the VF mailbox overflow detection logic, including modifying ice_mbx_reset_snapshot and its callers. To make this change easier to review, first move the ice_mbx_reset_snapshot function higher in the ice_vf_mbx.c file. Signed-off-by: Jacob Keller Reviewed-by: Michal Swiatkowski Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen commit 01f05940a9a75e11a2be64993c44ad8dd06e6e26 Author: Javier Martinez Canillas Date: Fri Mar 10 13:59:42 2023 +0100 drm/virtio: Enable fb damage clips property for the primary plane Christian Hergert reports that the driver doesn't enable the property and that leads to always doing a full plane update, even when the driver does support damage clipping for the primary plane. Don't enable it for the cursor plane, because its .atomic_update callback doesn't handle damage clips. Reported-by: Christian Hergert Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230310125943.912514-1-javierm@redhat.com commit 9ebe720eb93c5aa45e8523dae397d87628dc43e1 Author: Thomas Weißschuh Date: Mon Feb 20 23:25:28 2023 +0000 mm: slub: make kobj_type structure constant Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Signed-off-by: Thomas Weißschuh Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 0993234a00451e0a5c3e47d8b0f2e01dac6cedbf Author: Jianhua Lu Date: Mon Mar 13 18:18:58 2023 +0800 drm/panel: Add driver for Novatek NT36523 Add a driver for panels using the Novatek NT36523 display driver IC. Signed-off-by: Jianhua Lu Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230313101858.14611-2-lujianhua000@gmail.com commit c61093b56a2ff15e449e8af56e96dc5a312baf25 Author: Jianhua Lu Date: Mon Mar 13 18:18:57 2023 +0800 dt-bindings: display: panel: Add Novatek NT36523 bindings Novatek NT36523 is a display driver IC used to drive DSI panels. Signed-off-by: Jianhua Lu Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230313101858.14611-1-lujianhua000@gmail.com commit d790b0c3fcadeb7b8fcbc13d0b658338cc806188 Author: Alexandre Mergnat Date: Thu Mar 9 10:06:02 2023 +0100 dt-bindings: display: mediatek: clean unnecessary item The item which have the mediatek,mt8192-disp-ccorr as const compatible already exist above. Merge all compatibles which have the same fallback under the same item. Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Signed-off-by: Alexandre Mergnat Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230306-ccorr-binding-fix-v5-0-6c56aaecc3b1@baylibre.com/ Signed-off-by: Chun-Kuang Hu commit 24d80fde40c995b2e2faaf72034e12e60a416630 Author: Alexander Stein Date: Mon Mar 13 08:18:12 2023 +0100 regmap: cache: Silence checkpatch warning checkpatch.pl warned: WARNING: ENOSYS means 'invalid syscall nr' and nothing else Align the return value to regcache_drop_region(). Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20230313071812.13577-2-alexander.stein@ew.tq-group.com Signed-off-by: Mark Brown commit 0762875674b969e35371ec5fe4b594d7a92ab364 Author: Alexander Stein Date: Mon Mar 13 09:36:21 2023 +0100 spi: nxp-flexspi: Add i.MX platform dependency This driver also supports various i.MX8 platforms. Add ARCH_MXC for selecting this driver without Layerscape support. Fixes: c6b15b2437a10 ("spi: nxp-flexspi: Fix ARCH_LAYERSCAPE dependency") Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20230313083621.154729-1-alexander.stein@ew.tq-group.com Signed-off-by: Mark Brown commit edfa970370a759c2c6a38b2884887937b1aea552 Author: Krzysztof Kozlowski Date: Fri Mar 10 23:28:57 2023 +0100 spi: rspi: Mark OF related data as maybe unused Driver can match via ID or OF ID table, thus several OF-related methods will be unused. Mark the OF structures as __maybe_unused so compiler can drop them: drivers/spi/spi-rspi.c:1203:29: error: ‘qspi_ops’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310222857.315629-16-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 833f43308234600e934e9c6fa70fd8b7eebc632b Author: Krzysztof Kozlowski Date: Fri Mar 10 23:28:56 2023 +0100 spi: sc18is602: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/spi/spi-sc18is602.c:318:34: error: ‘sc18is602_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310222857.315629-15-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit d946b6b0ed01949b1a3856e03469361fc9168318 Author: Krzysztof Kozlowski Date: Fri Mar 10 23:28:55 2023 +0100 spi: sh-msiof: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/spi/spi-sh-msiof.c:1076:34: error: ‘sh_msiof_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310222857.315629-14-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 6340fdf2e13c5f1ff3a9622f0cb3b8e9c3955a31 Author: Krzysztof Kozlowski Date: Fri Mar 10 23:28:54 2023 +0100 spi: bcm-qspi: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/spi/spi-bcm-qspi.c:1460:34: error: ‘bcm_qspi_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20230310222857.315629-13-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit d94df25e8b9c8deefc5d7fcd344eb5d4bd41cf7b Author: Krzysztof Kozlowski Date: Fri Mar 10 23:28:53 2023 +0100 spi: pxa2xx: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/spi/spi-pxa2xx.c:1757:34: error: ‘pxa2xx_spi_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310222857.315629-12-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 7859ad5a401b73bf2ddfa274950b5722492c3150 Author: Geert Uytterhoeven Date: Mon Mar 13 11:58:38 2023 +0100 spi: sh-msiof: Remove casts to drop constness Now the chip select APIs take const pointers, there is no longer a need to cast away constness. Fixes: 9e264f3f85a56cc1 ("spi: Replace all spi->chip_select and spi->cs_gpiod references with function call") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/bc14c7c75f8d63c5c11f61f80daaa53b12bb15fb.1678704562.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit d2f19eec510424caa55ea949f016ddabe2d8173a Author: Geert Uytterhoeven Date: Mon Mar 13 11:58:37 2023 +0100 spi: Constify spi parameters of chip select APIs The "spi" parameters of spi_get_chipselect() and spi_get_csgpiod() can be const. Fixes: 303feb3cc06ac066 ("spi: Add APIs in spi core to set/get spi->chip_select and spi->cs_gpiod") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/b112de79e7a1e9095a3b6ff22b639f39e39d7748.1678704562.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 38dca04d659a422d842f7edcecd32253c7a6fb5e Author: Geert Uytterhoeven Date: Mon Mar 13 11:58:36 2023 +0100 spi: Constify spi_get_drvdata()'s spi parameter The "spi" parameter of spi_get_drvdata() can be const. dev_get_drvdata() has been taking a const pointer since commit 7d1d8999b4bec0ba ("i2c: Constify i2c_get_clientdata's parameter"). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/0f1700ade27a8f3935d04480ff7bef8a887331eb.1678704562.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit cc4b15670340315fb0b25d886c06bffb5f128f02 Author: Geert Uytterhoeven Date: Mon Mar 13 11:58:35 2023 +0100 spi: Constify spi_get_ctldata()'s spi parameter The "spi" parameter of spi_get_ctldata() can be const. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/8960e07adaad8d92d2c3aa045af9ee3c5d2130a8.1678704562.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 9c8400e3795decefe6390646ece820a310b37b79 Author: Geert Uytterhoeven Date: Mon Mar 13 11:58:34 2023 +0100 spi: fsl-dspi: Remove unneeded cast to same type There is never a need to cast a pointer to the same pointer type. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/a417735ca3ff629ee897327b163b23414673f0a3.1678704562.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit 38cc873cb1cf27965dacbbc5957a7a8aee89679c Author: Krzysztof Kozlowski Date: Fri Mar 10 22:45:48 2023 +0100 regulator: mt6397-regulator: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/regulator/mt6397-regulator.c:400:34: error: ‘mt6397_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230310214553.275450-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 334e6b85a348a79bb018003f09e1cc94accd53a2 Author: Krzysztof Kozlowski Date: Fri Mar 10 22:45:47 2023 +0100 regulator: mp8859: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/regulator/mp8859.c:132:34: error: ‘mp8859_dt_id’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310214553.275450-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 4a5850865641d0b83caaad81ca0bbd722ac514fb Author: Krzysztof Kozlowski Date: Fri Mar 10 22:45:46 2023 +0100 regulator: max20086: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/regulator/max20086-regulator.c:289:34: error: ‘max20086_dt_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20230310214553.275450-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 70b26bb55f719e2900404459128d41c8425c8dde Author: Krzysztof Kozlowski Date: Fri Mar 10 22:45:45 2023 +0100 regulator: lp872x: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/regulator/lp872x.c:931:34: error: ‘lp872x_dt_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310214553.275450-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit fd883d79e4dcd2417c2b80756f22a2ff03b0f6e0 Author: Alexander Stein Date: Mon Mar 13 08:18:11 2023 +0100 regmap: cache: Return error in cache sync operations for REGCACHE_NONE There is no sense in doing a cache sync on REGCACHE_NONE regmaps. Instead of panicking the kernel due to missing cache_ops, return an error to client driver. Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20230313071812.13577-1-alexander.stein@ew.tq-group.com Signed-off-by: Mark Brown commit da1f22825b4fec7e25431fa5238252452f3dce46 Author: Krzysztof Kozlowski Date: Fri Mar 10 22:43:33 2023 +0100 ASoC: codecs: zl38060: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/codecs/zl38060.c:611:34: error: ‘zl38_dt_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310214333.274903-10-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 075a430db402eed0907b80493f1432d47a5120a7 Author: Krzysztof Kozlowski Date: Fri Mar 10 22:43:32 2023 +0100 ASoC: codecs: src4xxx-i2c: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/codecs/src4xxx-i2c.c:27:34: error: ‘src4xxx_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310214333.274903-9-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 0e8599a35823f05e90513918ff1201f8d210e315 Author: Krzysztof Kozlowski Date: Fri Mar 10 22:43:31 2023 +0100 ASoC: codecs: rt1019: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/codecs/rt1019.c:549:34: error: ‘rt1019_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310214333.274903-8-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 413beba1a336e6068119f31a4441c51a7aeb1b55 Author: Krzysztof Kozlowski Date: Fri Mar 10 22:43:30 2023 +0100 ASoC: codecs: pcm179x-spi: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/codecs/pcm179x-spi.c:32:34: error: ‘pcm179x_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310214333.274903-7-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit a9048d64fb9605eb68c9912724e4a1346db8ba1a Author: Krzysztof Kozlowski Date: Fri Mar 10 22:43:29 2023 +0100 ASoC: codecs: adau1977-spi: Mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/codecs/adau1977-spi.c:58:34: error: ‘adau1977_spi_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230310214333.274903-6-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit d7d103d1779c3d0bc4d55f2802930a6b067450c0 Author: Tom Rix Date: Thu Mar 9 09:09:59 2023 -0500 ASoC: SMA1303: set sma_i2c_regmap storage-class-specifier to static smatch reports sound/soc/codecs/sma1303.c:1594:28: warning: symbol 'sma_i2c_regmap' was not declared. Should it be static? sma_i2c_regmap is only used in sma1303, so it should be static Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230309140959.2616497-1-trix@redhat.com Signed-off-by: Mark Brown commit 8cd3cb17fcf216cb859f86a00fff428fbcecc1d8 Author: Chao Song Date: Mon Mar 13 12:13:02 2023 +0200 ASoC: SOF: sof-audio: add support for setting up loopback routes During route setup, playback stream routes are setup by going through sink path, capture stream routes are set up by going through source path. This is not sufficient to handle loopback cases between pipelines configured with different directions, e.g. a sidetone or an amplifier feedback connected to a speaker protection module. So, add the logic to handle such routes between widgets that aren't in the list of DAPM widgets associated with the same PCM. Link: https://github.com/thesofproject/linux/issues/4042 Suggested-by: Bard Liao Signed-off-by: Chao Song Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230313101302.20950-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 3a60fa4c063dacc5eb66660aa23107f3cb8a477e Author: Trevor Wu Date: Tue Mar 7 12:09:38 2023 +0800 ASoC: mediatek: mt6359: fix UNINIT problem Coverity shows decaring variable reg without initializer. When regmap_read returns an error, reg keeps the value left from earlier computation. To prevent from the unexpected result in the case, assign 0 to reg. Signed-off-by: Trevor Wu Link: https://lore.kernel.org/r/20230307040938.7484-5-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit 9760e01b3851dc51d1901876668168328d34a647 Author: Trevor Wu Date: Tue Mar 7 12:09:37 2023 +0800 ASoC: mediatek: mt6358: fix UNINIT problem Coverity shows decaring variable reg without initializer. When regmap_read returns an error, reg keeps the value left from earlier computation. To prevent from the unexpected result in the case, assign 0 to reg. Signed-off-by: Trevor Wu Link: https://lore.kernel.org/r/20230307040938.7484-4-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit 1a3f0116b74ba2f9477c28fcf9d66ac7126455fd Author: Trevor Wu Date: Tue Mar 7 12:09:36 2023 +0800 ASoC: mediatek: mt9195-mt6359: fix UNINIT problem Coverity shows using uninitialized value monitor. When regmap_read returns an error, monitor keeps the value left from earlier computation. To prevent from the unexpected result in the case, assign 0 to monitor. Signed-off-by: Trevor Wu Link: https://lore.kernel.org/r/20230307040938.7484-3-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit ff728899065922534d80170685fb807194d6487b Author: Trevor Wu Date: Tue Mar 7 12:09:35 2023 +0800 ASoC: mediatek: mt8195: add dai id check before accessing array Coverity shows "afe_priv->dai_priv[dai_id] evaluates to an address that could be at negative offset of an array.". Add dai id check before accessing the array element. This ensures that the offset of an array must be a valid index. Signed-off-by: Trevor Wu Link: https://lore.kernel.org/r/20230307040938.7484-2-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit ad70f2f0e6e38675d7805482d2c625fca5756a2e Author: Ranjani Sridharan Date: Mon Mar 13 14:48:56 2023 +0200 ASoC: SOF: ipc4-topology: Search only pin 0 formats Base config only contains the input/output audio formats for pin 0. So match only the pin 0 formats during runtime format selection. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230313124856.8140-12-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 4fdef47a44d6ff735902dfe740918f23932225ca Author: Ranjani Sridharan Date: Mon Mar 13 14:48:55 2023 +0200 ASoC: SOF: ipc4-topology: Add new tokens for input/output pin format count In preparation for handling processing modules with different input/output pin counts, introduce two new tokens for input/output audio format counts. Use these token values to parse all the available audio formats from topology. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230313124856.8140-11-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit f534a94c3d765bcd5bdf10271a265883be2b4030 Author: Ranjani Sridharan Date: Mon Mar 13 14:48:54 2023 +0200 ASoC: SOF: ipc4-topology: Remove the ref_audio_fmt field Remove the field in struct sof_ipc4_available_audio_format and pass the format list to be searched as an argument to sof_ipc4_init_audio_fmt() directly. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230313124856.8140-10-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 9c560549e32bc2951c67106c59587f9f7bf6b70e Author: Ranjani Sridharan Date: Mon Mar 13 14:48:53 2023 +0200 ASoC: SOF: ipc4-topology: Modify the signature of sof_ipc4_init_audio_fmt() Only the copier needs to set the output format in its IPC payload. So move the code to set the output format inside sof_ipc4_prepare_copier_module() and modify the signature of sof_ipc4_init_audio_fmt() to remove the out_format argument. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230313124856.8140-9-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 7ab6b1e8302cf7a9bc8808c43b3e751e4148a351 Author: Ranjani Sridharan Date: Mon Mar 13 14:48:52 2023 +0200 ASoC: SOF: ipc4-topology: Modify the type of available input/output formats Introduce a new struct sof_ipc4_pin_format which contains the pin index and the buffer size. Replace the type of available input/output audio formats in struct sof_ipc4_available_audio_format with this new struct type and rename them to input_pin_fmts and output_pin_fmts. Also, add a new token, SOF_TKN_CAVS_AUDIO_FORMAT_PIN_INDEX that will be used to parse the pin index for the audio format from topology. Currently we only set the audio format for Pin 0 in topology, so the default value will be 0 for all audio formats. Finally, parse the pin_index and the input/output buffer sizes along with audio formats into the pin_format arrays in struct sof_ipc4_available_audio_format. This makes the base_config array in struct sof_ipc4_available_audio_format redundant. So remove it. This change will allow the addition of audio formats for the non-zero pins in topology transparent to the topology parser in the kernel. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230313124856.8140-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 8abc9ab956b5756693710e1e09557e0189f01bef Author: Ranjani Sridharan Date: Mon Mar 13 14:48:51 2023 +0200 ASoC: SOF: ipc4-topology: Always parse the output formats in topology Parse the output formats available in topology always. Whether the output format is sent in the init instance payload or not is decided when sof_ipc4_init_audio_fmt() is invoked. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230313124856.8140-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 171d5ccedbb6277a8f9a3eae36e4f465ddc3187f Author: Ranjani Sridharan Date: Mon Mar 13 14:48:50 2023 +0200 ASoC: SOF: ipc4-topology: Parse the SOF_COMP_TOKENS only once There is no need to parse the cpc and is_pages values multiple times. It is enough to parse the 2 tokens directly into the base_config field in each module's init_instance IPC payload. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230313124856.8140-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 594c1bb9ff7365b90cb4d325deb8c38ddda90557 Author: Ranjani Sridharan Date: Mon Mar 13 14:48:49 2023 +0200 ASoC: SOF: ipc4-topology: Do not parse the DMA_BUFFER_SIZE token Do not parse the SOF_TKN_CAVS_AUDIO_FORMAT_DMA_BUFFER_SIZE token as the dma_buffer_size can be derived from the input/output buffer size and the type of widget during copier prepare. For the deep buffer case, introduce a new token that will be used to get the deep buffer DMA size for the host copier from topology. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230313124856.8140-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit e63a73f94fef0cf592aa7bb55f907007d747af4f Author: Ranjani Sridharan Date: Mon Mar 13 14:48:48 2023 +0200 ASoC: SOF: ipc4-topology: Add a new field in struct sof_ipc4_available_audio_format Add a new field, input_audio_fmts, in struct sof_ipc4_available_audio_format and parse all the available input audio formats into this new field and not into the base_config field. This is preparation to remove the base_config array from the struct sof_ipc4_available_audio_format. This simplifies the sof_ipc4_init_audio_fmt() function as the reference audio format for matching with input params has the same size. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230313124856.8140-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit bb79f2a608245cd92b3183d77aec6902e51de950 Author: Ranjani Sridharan Date: Mon Mar 13 14:48:47 2023 +0200 ASoC: SOF: Use input/output pin consistently Currently we use input/output and sink/source pins interchangeably. Remove the references to sink/source pins and replace with input/output pins everywhere for consistency and clarity. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230313124856.8140-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 3f738e4a126c9ee082d814edeb7416697f9e2b37 Author: Ranjani Sridharan Date: Mon Mar 13 14:48:46 2023 +0200 ASoC: SOF: rename a couple of tokens Rename SOF_TKN_CAVS_AUDIO_FORMAT_IN_VALID and SOF_TKN_CAVS_AUDIO_FORMAT_OUT_VALID as SOF_TKN_CAVS_AUDIO_FORMAT_IN_VALID_BIT_DEPTH and SOF_TKN_CAVS_AUDIO_FORMAT_OUT_VALID_BIT_DEPTH respectively. These are currently not used. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230313124856.8140-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 4727d4d775654986913a21c35c7cfaf1ecdafd62 Merge: 32ef0f1a7f01b e041a2a550582 Author: Mark Brown Date: Mon Mar 13 14:07:37 2023 +0000 ASoC: Merge up fixes as a dependency for future SOF work New SOF changes require the current set of fixes. commit a062c8899fede2ab5660a817e9b602d3fa280a99 Author: Peter Ujfalusi Date: Mon Mar 13 13:03:44 2023 +0200 ASoC: SOF: ipc4-control: Add support for bytes control get and put Add support for bytes control by implementing bytes_get/put and bytes_ext_get/put and blobs with either module init instance or large config type. For module init instance type the put will only update the stored configuration blob and it is going to be taken into use next time the module is (re-)initialized. Large config type of blobs are sent to the firmware whenever the DSP is powered up. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Jaska Uimonen Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230313110344.16644-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit a382082ff74b036944cbc5b6ad29b65f633acd3a Author: Libin Yang Date: Mon Mar 13 13:03:43 2023 +0200 ASoC: SOF: ipc4-topology: Add support for TPLG_CTL_BYTES Add byte type support for IPC4. The bytes controls are used to transfer configuration blobs to/from firmware via large_config messages. Signed-off-by: Libin Yang Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230313110344.16644-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit dc47ef4f8f6426cd625eb4057e174541e7c23ccd Author: Libin Yang Date: Mon Mar 13 13:03:42 2023 +0200 ASoC: SOF: ipc4-control: set_volume_data only applies to VOLSW family Make sure sof_ipc4_set_volume_data() is only called for the SND_SOC_TPLG_CTL_VOLSW, SND_SOC_TPLG_CTL_VOLSW_SX and SND_SOC_TPLG_CTL_VOLSW_XR_SX info_type. Signed-off-by: Libin Yang Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230313110344.16644-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit ea4a4e82f625ae451175a2a74779776b006d25a1 Author: Peter Ujfalusi Date: Mon Mar 13 13:03:41 2023 +0200 ASoC: SOF: uapi: header: Update sof_abi_hdr doc for IPC4 use With IPC4 the sof_abit_hdr is only used between user space (and in topology) and kernel. The same abi header is used with small differencies like different magic number and the type field have slightly different name, but similar function in IPC4 (param_id). Update the kernel documentation to highlight the differences. Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Jaska Uimonen Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20230313110344.16644-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 2e4ef6f4798c1d2951dd7bb3ae5f0d41ec3d31e8 Author: Peter Ujfalusi Date: Mon Mar 13 13:03:40 2023 +0200 ASoC: SOF: uapi: header: Convert sof_abi_hdr comments to kernel style Replace the comments for sof_abi_hdr to kernel style. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Jaska Uimonen Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20230313110344.16644-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 76fc628aebdb452e3c620d9ff5c5e9448d316754 Author: Peter Ujfalusi Date: Mon Mar 13 13:03:39 2023 +0200 ASoC: SOF: ipc3-control: Merge functions to handle bytes_ext get variants The code for bytes_ext_get and bytes_ext_volatile_get is identical with the only difference is that in case of volatile_get we refresh the data from the DSP before returning it to user space. Convert the callbacks to a simple wrapper for the same function. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20230313110344.16644-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 3eac8de3f51b3567c4ba6139736b59027da56285 Author: Peter Ujfalusi Date: Mon Mar 13 13:03:38 2023 +0200 ASoC: SOF: ipc3-control: Rename snd_sof_refresh_control() Rename the snd_sof_refresh_control() to sof_ipc3_refresh_control() to follow the function naming convention for IPC specific code. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20230313110344.16644-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 9a01befe3d0cda5645f36b71f955c62c54c1b74c Author: Stefan Eichenberger Date: Mon Feb 13 13:09:26 2023 +0100 arm64: dts: imx8mp-verdin: add 88W8997 serdev to uart4 Use the serdev feature to load the driver for the 88W8997 bluetooth driver. Signed-off-by: Stefan Eichenberger Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit 4c4ca9f7c4ca68a56392fcb975065cb0ab9b2fa1 Merge: 0da40e018fd03 e238e62ba8868 Author: Kalle Valo Date: Mon Mar 13 15:50:44 2023 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v6.4. Major changes: ath10k * enable threaded napi on WCN3990 ath11k * push MU-MIMO params from hostapd to hardware * tx ack signal support for management packets commit e9d198f2be851f8c977b9ac47748edc4f9d0f26e Author: Thorsten Scherer Date: Sun Mar 12 13:23:15 2023 +0100 slab: Adjust comment after refactoring of gfp.h Reflect the change from the commit below. Fixes: cb5a065b4ea9 ("headers/deps: mm: Split out of ") Signed-off-by: Thorsten Scherer Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 0da40e018fd034d87c9460123fa7f897b69fdee7 Author: Jisoo Jang Date: Thu Mar 9 19:44:57 2023 +0900 wifi: brcmfmac: slab-out-of-bounds read in brcmf_get_assoc_ies() Fix a slab-out-of-bounds read that occurs in kmemdup() called from brcmf_get_assoc_ies(). The bug could occur when assoc_info->req_len, data from a URB provided by a USB device, is bigger than the size of buffer which is defined as WL_EXTRA_BUF_MAX. Add the size check for req_len/resp_len of assoc_info. Found by a modified version of syzkaller. [ 46.592467][ T7] ================================================================== [ 46.594687][ T7] BUG: KASAN: slab-out-of-bounds in kmemdup+0x3e/0x50 [ 46.596572][ T7] Read of size 3014656 at addr ffff888019442000 by task kworker/0:1/7 [ 46.598575][ T7] [ 46.599157][ T7] CPU: 0 PID: 7 Comm: kworker/0:1 Tainted: G O 5.14.0+ #145 [ 46.601333][ T7] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 [ 46.604360][ T7] Workqueue: events brcmf_fweh_event_worker [ 46.605943][ T7] Call Trace: [ 46.606584][ T7] dump_stack_lvl+0x8e/0xd1 [ 46.607446][ T7] print_address_description.constprop.0.cold+0x93/0x334 [ 46.608610][ T7] ? kmemdup+0x3e/0x50 [ 46.609341][ T7] kasan_report.cold+0x79/0xd5 [ 46.610151][ T7] ? kmemdup+0x3e/0x50 [ 46.610796][ T7] kasan_check_range+0x14e/0x1b0 [ 46.611691][ T7] memcpy+0x20/0x60 [ 46.612323][ T7] kmemdup+0x3e/0x50 [ 46.612987][ T7] brcmf_get_assoc_ies+0x967/0xf60 [ 46.613904][ T7] ? brcmf_notify_vif_event+0x3d0/0x3d0 [ 46.614831][ T7] ? lock_chain_count+0x20/0x20 [ 46.615683][ T7] ? mark_lock.part.0+0xfc/0x2770 [ 46.616552][ T7] ? lock_chain_count+0x20/0x20 [ 46.617409][ T7] ? mark_lock.part.0+0xfc/0x2770 [ 46.618244][ T7] ? lock_chain_count+0x20/0x20 [ 46.619024][ T7] brcmf_bss_connect_done.constprop.0+0x241/0x2e0 [ 46.620019][ T7] ? brcmf_parse_configure_security.isra.0+0x2a0/0x2a0 [ 46.620818][ T7] ? __lock_acquire+0x181f/0x5790 [ 46.621462][ T7] brcmf_notify_connect_status+0x448/0x1950 [ 46.622134][ T7] ? rcu_read_lock_bh_held+0xb0/0xb0 [ 46.622736][ T7] ? brcmf_cfg80211_join_ibss+0x7b0/0x7b0 [ 46.623390][ T7] ? find_held_lock+0x2d/0x110 [ 46.623962][ T7] ? brcmf_fweh_event_worker+0x19f/0xc60 [ 46.624603][ T7] ? mark_held_locks+0x9f/0xe0 [ 46.625145][ T7] ? lockdep_hardirqs_on_prepare+0x3e0/0x3e0 [ 46.625871][ T7] ? brcmf_cfg80211_join_ibss+0x7b0/0x7b0 [ 46.626545][ T7] brcmf_fweh_call_event_handler.isra.0+0x90/0x100 [ 46.627338][ T7] brcmf_fweh_event_worker+0x557/0xc60 [ 46.627962][ T7] ? brcmf_fweh_call_event_handler.isra.0+0x100/0x100 [ 46.628736][ T7] ? rcu_read_lock_sched_held+0xa1/0xd0 [ 46.629396][ T7] ? rcu_read_lock_bh_held+0xb0/0xb0 [ 46.629970][ T7] ? lockdep_hardirqs_on_prepare+0x273/0x3e0 [ 46.630649][ T7] process_one_work+0x92b/0x1460 [ 46.631205][ T7] ? pwq_dec_nr_in_flight+0x330/0x330 [ 46.631821][ T7] ? rwlock_bug.part.0+0x90/0x90 [ 46.632347][ T7] worker_thread+0x95/0xe00 [ 46.632832][ T7] ? __kthread_parkme+0x115/0x1e0 [ 46.633393][ T7] ? process_one_work+0x1460/0x1460 [ 46.633957][ T7] kthread+0x3a1/0x480 [ 46.634369][ T7] ? set_kthread_struct+0x120/0x120 [ 46.634933][ T7] ret_from_fork+0x1f/0x30 [ 46.635431][ T7] [ 46.635687][ T7] Allocated by task 7: [ 46.636151][ T7] kasan_save_stack+0x1b/0x40 [ 46.636628][ T7] __kasan_kmalloc+0x7c/0x90 [ 46.637108][ T7] kmem_cache_alloc_trace+0x19e/0x330 [ 46.637696][ T7] brcmf_cfg80211_attach+0x4a0/0x4040 [ 46.638275][ T7] brcmf_attach+0x389/0xd40 [ 46.638739][ T7] brcmf_usb_probe+0x12de/0x1690 [ 46.639279][ T7] usb_probe_interface+0x2aa/0x760 [ 46.639820][ T7] really_probe+0x205/0xb70 [ 46.640342][ T7] __driver_probe_device+0x311/0x4b0 [ 46.640876][ T7] driver_probe_device+0x4e/0x150 [ 46.641445][ T7] __device_attach_driver+0x1cc/0x2a0 [ 46.642000][ T7] bus_for_each_drv+0x156/0x1d0 [ 46.642543][ T7] __device_attach+0x23f/0x3a0 [ 46.643065][ T7] bus_probe_device+0x1da/0x290 [ 46.643644][ T7] device_add+0xb7b/0x1eb0 [ 46.644130][ T7] usb_set_configuration+0xf59/0x16f0 [ 46.644720][ T7] usb_generic_driver_probe+0x82/0xa0 [ 46.645295][ T7] usb_probe_device+0xbb/0x250 [ 46.645786][ T7] really_probe+0x205/0xb70 [ 46.646258][ T7] __driver_probe_device+0x311/0x4b0 [ 46.646804][ T7] driver_probe_device+0x4e/0x150 [ 46.647387][ T7] __device_attach_driver+0x1cc/0x2a0 [ 46.647926][ T7] bus_for_each_drv+0x156/0x1d0 [ 46.648454][ T7] __device_attach+0x23f/0x3a0 [ 46.648939][ T7] bus_probe_device+0x1da/0x290 [ 46.649478][ T7] device_add+0xb7b/0x1eb0 [ 46.649936][ T7] usb_new_device.cold+0x49c/0x1029 [ 46.650526][ T7] hub_event+0x1c98/0x3950 [ 46.650975][ T7] process_one_work+0x92b/0x1460 [ 46.651535][ T7] worker_thread+0x95/0xe00 [ 46.651991][ T7] kthread+0x3a1/0x480 [ 46.652413][ T7] ret_from_fork+0x1f/0x30 [ 46.652885][ T7] [ 46.653131][ T7] The buggy address belongs to the object at ffff888019442000 [ 46.653131][ T7] which belongs to the cache kmalloc-2k of size 2048 [ 46.654669][ T7] The buggy address is located 0 bytes inside of [ 46.654669][ T7] 2048-byte region [ffff888019442000, ffff888019442800) [ 46.656137][ T7] The buggy address belongs to the page: [ 46.656720][ T7] page:ffffea0000651000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x19440 [ 46.657792][ T7] head:ffffea0000651000 order:3 compound_mapcount:0 compound_pincount:0 [ 46.658673][ T7] flags: 0x100000000010200(slab|head|node=0|zone=1) [ 46.659422][ T7] raw: 0100000000010200 0000000000000000 dead000000000122 ffff888100042000 [ 46.660363][ T7] raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000 [ 46.661236][ T7] page dumped because: kasan: bad access detected [ 46.661956][ T7] page_owner tracks the page as allocated [ 46.662588][ T7] page last allocated via order 3, migratetype Unmovable, gfp_mask 0x52a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 7, ts 31136961085, free_ts 0 [ 46.664271][ T7] prep_new_page+0x1aa/0x240 [ 46.664763][ T7] get_page_from_freelist+0x159a/0x27c0 [ 46.665340][ T7] __alloc_pages+0x2da/0x6a0 [ 46.665847][ T7] alloc_pages+0xec/0x1e0 [ 46.666308][ T7] allocate_slab+0x380/0x4e0 [ 46.666770][ T7] ___slab_alloc+0x5bc/0x940 [ 46.667264][ T7] __slab_alloc+0x6d/0x80 [ 46.667712][ T7] kmem_cache_alloc_trace+0x30a/0x330 [ 46.668299][ T7] brcmf_usbdev_qinit.constprop.0+0x50/0x470 [ 46.668885][ T7] brcmf_usb_probe+0xc97/0x1690 [ 46.669438][ T7] usb_probe_interface+0x2aa/0x760 [ 46.669988][ T7] really_probe+0x205/0xb70 [ 46.670487][ T7] __driver_probe_device+0x311/0x4b0 [ 46.671031][ T7] driver_probe_device+0x4e/0x150 [ 46.671604][ T7] __device_attach_driver+0x1cc/0x2a0 [ 46.672192][ T7] bus_for_each_drv+0x156/0x1d0 [ 46.672739][ T7] page_owner free stack trace missing [ 46.673335][ T7] [ 46.673620][ T7] Memory state around the buggy address: [ 46.674213][ T7] ffff888019442700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 46.675083][ T7] ffff888019442780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 46.675994][ T7] >ffff888019442800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 46.676875][ T7] ^ [ 46.677323][ T7] ffff888019442880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 46.678190][ T7] ffff888019442900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 46.679052][ T7] ================================================================== [ 46.679945][ T7] Disabling lock debugging due to kernel taint [ 46.680725][ T7] Kernel panic - not syncing: Reviewed-by: Arend van Spriel Signed-off-by: Jisoo Jang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230309104457.22628-1-jisoo.jang@yonsei.ac.kr commit 48181d285623198c33bb9698992502687b258efa Author: Dongliang Mu Date: Thu Mar 9 10:16:36 2023 +0800 wifi: rtw88: fix memory leak in rtw_usb_probe() drivers/net/wireless/realtek/rtw88/usb.c:876 rtw_usb_probe() warn: 'hw' from ieee80211_alloc_hw() not released on lines: 811 Fix this by modifying return to a goto statement. Signed-off-by: Dongliang Mu Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230309021636.528601-1-dzm91@hust.edu.cn commit 3ab7f9b90cc0a737e0bd8a312dc48814c4682867 Author: Ching-Te Ku Date: Wed Mar 8 13:32:25 2023 +0800 wifi: rtw89: coex: Add v5 firmware cycle status report To support v5 version firmware cycle report, apply the related structure and functions. v5 cycle report add a group of status to show how the free-run/TDMA training goes to. It is a firmware mechanism that can auto adjust coexistence mode between TDMA and free run mechanism at 3 antenna solution. v5 version provide more reference data to let the mechanism make decision. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230308053225.24377-8-pkshih@realtek.com commit 262cc19ea902d2280e2e2a56b153f37466e3349e Author: Ching-Te Ku Date: Wed Mar 8 13:32:24 2023 +0800 wifi: rtw89: coex: Add v2 Bluetooth scan info Compare to v1 and v2 removed some not usable parameters. Save firmware code size. The information can show how frequent and how long the Bluetooth scan do. It will help to debug coexistence issue. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230308053225.24377-7-pkshih@realtek.com commit 9dfa09e0628d2024ce4574f645344c00fe88a535 Author: Ching-Te Ku Date: Wed Mar 8 13:32:23 2023 +0800 wifi: rtw89: coex: Fix wrong structure assignment at null data report Correct pointer assignment of v1 null data report. It doesn't really change logic at all, but it looks more readable. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230308053225.24377-6-pkshih@realtek.com commit e5e52feb5053a537180cf928428deb8bc697a42e Author: Ching-Te Ku Date: Wed Mar 8 13:32:22 2023 +0800 wifi: rtw89: coex: Add register monitor report v2 format The v2 firmware report reduce its maximum register numbers from 30 to 20, it can help to save firmware code size. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230308053225.24377-5-pkshih@realtek.com commit a2c0ce5d01a2218af4756d311ae91845b67ac5b9 Author: Ching-Te Ku Date: Wed Mar 8 13:32:21 2023 +0800 wifi: rtw89: coex: Add traffic TX/RX info and its H2C There is a new mechanism which can do some real time performance tuning for WiFi and BT. This TX/RX info is a condition provide to firmware to do traffic analysis. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230308053225.24377-4-pkshih@realtek.com commit 5049964c4af86865153c553fc6a138df02685ffb Author: Ching-Te Ku Date: Wed Mar 8 13:32:20 2023 +0800 wifi: rtw89: coex: Add WiFi role info v2 Remove WiFi traffic busy level & traffic rate from active role information. This information will move to v5 version TDMA cycle info. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230308053225.24377-3-pkshih@realtek.com commit e49bdd85c92dacb12151aa1b9cf48b81c81a6f98 Author: Ching-Te Ku Date: Wed Mar 8 13:32:19 2023 +0800 wifi: rtw89: coex: Add more error_map and counter to log The error map and counter can help to analyze is coexistence mechanism going well or not. For example, if there is E2G (External control Wi-Fi slot for Wi-Fi 2.4 GHz) hang counter, it means Wi-Fi firmware didn't cut a slot for Wi-Fi 2.4 GHz. Maybe something wrong with firmware timer. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230308053225.24377-2-pkshih@realtek.com commit 038a24835ab68f341eaa7a0e3bcc6ce0f9b22e17 Author: Badal Nilawar Date: Fri Mar 10 11:43:39 2023 +0530 drm/i915/mtl: Disable MC6 for MTL A step The Wa_14017073508 require to send Media Busy/Idle mailbox while accessing Media tile. As of now it is getting handled while __gt_unpark, __gt_park. But there are various corner cases where forcewakes are taken without __gt_unpark i.e. without sending Busy Mailbox especially during register reads. Forcewakes are taken without busy mailbox leads to GPU HANG. So bringing mailbox calls under forcewake calls are no feasible option as forcewake calls are atomic and mailbox calls are blocking. The issue already fixed in B step so disabling MC6 on A step and reverting previous commit which handles Wa_14017073508 Fixes: 8f70f1ec587d ("drm/i915/mtl: Add Wa_14017073508 for SAMedia") Cc: Rodrigo Vivi Signed-off-by: Badal Nilawar Reviewed-by: Rodrigo Vivi Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20230310061339.2495416-2-badal.nilawar@intel.com commit 84e9e2102bdc4f60ce131dcb74046219dc4425ae Author: Jacob Keller Date: Tue Mar 7 15:02:12 2023 -0800 wifi: qtnfmac: use struct_size and size_sub for payload length Replace the calculations for the payload length in qtnf_cmd_band_fill_iftype with struct_size() and size_sub(). While the payload length does not get directly passed to an allocation function, the performed calculation is still calculating the size of a flexible array structure (minus the size of a header structure). Signed-off-by: Jacob Keller Cc: Igor Mitsyanko Cc: Sergey Matyukevich Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230307230212.3735818-1-jacob.e.keller@intel.com commit a23c82e006db2f073fb65da8762f63735a510409 Author: Jacob Keller Date: Tue Mar 7 15:01:48 2023 -0800 wifi: ipw2x00: convert ipw_fw_error->elem to flexible array[] The ipw_fw_error structure contains a payload[] flexible array as well as two pointers to this array area, ->elem, and ->log. The total size of the allocated structure is computed without use of the macros. There's no reason to keep both a payload[] and an extra pointer to both the elem and log members. Convert the elem pointer member into the flexible array member, removing payload. Fix the allocation of the ipw_fw_error structure to use size_add(), struct_size(), and array_size() to compute the allocation. This ensures that any overflow saturates at SIZE_MAX rather than overflowing and potentially allowing an undersized allocation. Before the structure change, the layout of ipw_fw_error was: struct ipw_fw_error { long unsigned int jiffies; /* 0 8 */ u32 status; /* 8 4 */ u32 config; /* 12 4 */ u32 elem_len; /* 16 4 */ u32 log_len; /* 20 4 */ struct ipw_error_elem * elem; /* 24 8 */ struct ipw_event * log; /* 32 8 */ u8 payload[]; /* 40 0 */ /* size: 40, cachelines: 1, members: 8 */ /* last cacheline: 40 bytes */ }; After this change, the layout is now: struct ipw_fw_error { long unsigned int jiffies; /* 0 8 */ u32 status; /* 8 4 */ u32 config; /* 12 4 */ u32 elem_len; /* 16 4 */ u32 log_len; /* 20 4 */ struct ipw_event * log; /* 24 8 */ struct ipw_error_elem elem[]; /* 32 0 */ /* size: 32, cachelines: 1, members: 7 */ /* last cacheline: 32 bytes */ }; This saves a total of 8 bytes for every ipw_fw_error allocation, and removes the risk of a potential overflow on the allocation. Signed-off-by: Jacob Keller Cc: Stanislav Yakovlev Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230307230148.3735684-1-jacob.e.keller@intel.com commit 0606b344021a37140ef467ddf30d4b8182e7bbe1 Author: Martin Kaiser Date: Tue Mar 7 20:57:17 2023 +0100 wifi: rtl8xxxu: use module_usb_driver We can use the module_usb_driver macro instead of open-coding the driver's init and exit functions. This is simpler and saves some lines of code. Other realtek wireless drivers use module_usb_driver as well. Signed-off-by: Martin Kaiser Reviewed-by: Ping-Ke Shih Tested-by: Philipp Hortmann # Edimax N150 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230307195718.168021-1-martin@kaiser.cx commit 8a66293e73a520a42a7653d2ca32074ba323ff56 Author: Ping-Ke Shih Date: Tue Mar 7 22:18:48 2023 +0800 wifi: rtw89: release RX standby timer of beamformee CSI to save power Originally, we keep RX standby timer to handle beamformee CSI, but this spends power and causes system not entering power save mode. To improve power consumption, release the timer if throughput becomes low. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230307141848.26403-1-pkshih@realtek.com commit df259fc12b366097fc6b7c3ed1a2f9f77b4ba355 Author: Martin Kaiser Date: Sun Mar 5 18:59:32 2023 +0100 wifi: rtl8xxxu: mark Edimax EW-7811Un V2 as tested The Edimax V2 (vid 0x7392, pid 0xb811) works well with the rtl8xxxu driver since rtl8188eu support has been added. Remove the untested flag for this device. Signed-off-by: Martin Kaiser Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230305175932.719103-1-martin@kaiser.cx commit 659fda7f35f0d11126edfb6c6cd9ace99a2525c0 Author: Hans de Goede Date: Fri Mar 3 23:23:31 2023 +0100 wifi: brcmfmac: Use ISO3166 country code and rev 0 as fallback on 4356 Many devices ship with a nvram ccode value of X2/XT/XU/XV/ALL which are all special world-wide compatibility ccode-s. Most of these world-wide ccode-s allow passive scan mode only for 2.4GHz channels 12-14, only enabling them when an AP is seen on them. Since linux-firmware has moved to the new cyfmac4356-pci.bin + cyfmac4356-pci.clm_blob firmware files this no longer works and 4356 devices using e.g. an X2 ccode fail to connect to an AP on channel 13. Add the 4356 chip-id to the list of chips for which to use the ISO3166 country code + rev 0 as fallback in brcmf_translate_country_code() to fix this. Signed-off-by: Hans de Goede Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230303222331.285663-1-hdegoede@redhat.com commit 298e50ad8eb8fa12ea68bb2da45bb8ef4edcd0ec Author: Kalle Valo Date: Mon Feb 27 14:17:32 2023 +0200 wifi: move raycs, wl3501 and rndis_wlan to legacy directory To clean up drivers/net/wireless move the old drivers drivers left in the directory to a new "legacy" directory. I did consider adding CONFIG_WLAN_VENDOR_LEGACY like other vendors have but then dropped the idea as these are really old drivers and hopefully we get to remove them soon. There should be no changes in compilation or in Kconfig options, merely moving files. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230227121732.8967-3-kvalo@kernel.org commit f79cbc77abde22dd01ac90393a7bfb283d9d50a3 Author: Kalle Valo Date: Mon Feb 27 14:17:31 2023 +0200 wifi: move mac80211_hwsim and virt_wifi to virtual directory To clean up drivers/net/wireless move the virtual drivers to a new virtual directory. I did consider adding CONFIG_WLAN_VENDOR_VIRTUAL like other vendors have but then dropped the idea as we are not real drivers. There should be no changes in compilation or in Kconfig options, merely moving files. The order in menuconfig is slightly changed, the virtual drivers are now last in the list. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230227121732.8967-2-kvalo@kernel.org commit 1dae3f1df7005e27a0040855ce8b3c21c262e3b2 Author: Krzysztof Kozlowski Date: Sun Mar 12 14:25:35 2023 +0100 i3c: dw: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes !CONFIG_OF error: drivers/i3c/master/dw-i3c-master.c:1201:34: error: ‘dw_i3c_master_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230312132535.352246-1-krzysztof.kozlowski@linaro.org Signed-off-by: Alexandre Belloni commit ce48f955860db841eeb4bcf9bb973ea3ef177b3a Author: Andy Shevchenko Date: Thu Mar 2 18:12:06 2023 +0200 i3c: Correct reference to the I²C device data type I²C peripheral devices that are connected to the controller are represented in the Linux kernel as objects of the struct i2c_client. Fix this in the header file. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230302161206.38106-1-andriy.shevchenko@linux.intel.com Signed-off-by: Alexandre Belloni commit c938bb0cf644a61cc6222cc6d0f106bb5c4b4ff5 Merge: 7d4ae72edba71 eeac8ede17557 Author: Mark Brown Date: Mon Mar 13 13:21:01 2023 +0000 Merge tag 'v6.3-rc2' into spi-6.4 to fix clock related boot issues Linux 6.3-rc2 commit 83c05c97a325abdd8b4209b9c7165f1701081ba1 Merge: 054a0da568b94 eeac8ede17557 Author: Mark Brown Date: Mon Mar 13 13:20:52 2023 +0000 Merge tag 'v6.3-rc2' into regmap-6.4 to fix clock related boot issues Linux 6.3-rc2 commit b9d0bb8f1c2e5dce9b8a54fb77d1af4aa64a4c01 Merge: 5bd73a162bc88 eeac8ede17557 Author: Mark Brown Date: Mon Mar 13 13:20:45 2023 +0000 Merge tag 'v6.3-rc2' into regulator-6.4 to fix clock related boot issues Linux 6.3-rc2 commit 32ef0f1a7f01b1832e108380bb2178270058f1f6 Merge: 2d2998b843308 eeac8ede17557 Author: Mark Brown Date: Mon Mar 13 13:20:33 2023 +0000 Merge tag 'v6.3-rc2' into asoc-6.4 to fix clock related boot issues Linux 6.3-rc2 commit 4a1b9f4eb122f3e36fdfe62dce96091d3e45132f Author: Rob Herring Date: Fri Mar 10 08:47:24 2023 -0600 soc: qcom: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Reviewed-by: Konrad Dybcio Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230310144724.1545153-1-robh@kernel.org commit c4dc24da5286742f8cc728379f6115c9e886a8a4 Author: Uwe Kleine-König Date: Sun Mar 12 17:15:04 2023 +0100 clk: qcom: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230312161512.2715500-23-u.kleine-koenig@pengutronix.de commit 903caf42eabec2e39d836cb0aa8bbc23717408e7 Author: Krzysztof Kozlowski Date: Fri Mar 10 22:44:13 2023 +0100 soc: qcom: gsbi: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/soc/qcom/qcom_gsbi.c:117:34: error: ‘tcsr_dt_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230310214413.275054-1-krzysztof.kozlowski@linaro.org commit e238e62ba8868a784e485eb94451c87cd1b85cee Author: Aditya Kumar Singh Date: Wed Mar 1 16:20:59 2023 +0200 wifi: ath11k: add debug prints in regulatory WMI event processing Add some more debug prints in processing regulatory WMI event in order to increase more debuggability. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aditya Kumar Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230110121024.14051-4-quic_adisi@quicinc.com commit 91fa00fa69224aae5afb720c5e68b22e4c4f7333 Author: Aditya Kumar Singh Date: Wed Mar 1 16:20:59 2023 +0200 wifi: ath11k: add support to parse new WMI event for 6 GHz In order to support different power levels of 6 GHz AP and client, new WMI event for regulatory - WMI_REG_CHAN_LIST_CC_EXT_EVENTID is added in firmware. This event provides new parameters required for 6 GHz regulatory rules. Add support for parsing 2.4 GHz, 5 GHz and 6 GHz reg rules and other parameters from WMI_REG_CHAN_LIST_CC_EXT_EVENTID. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1 Signed-off-by: Lavanya Suresh Signed-off-by: Wen Gong Signed-off-by: Aditya Kumar Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230110121024.14051-3-quic_adisi@quicinc.com commit 25e289e1f52e1f4fb1d07622c6a24f8d8a8e420d Author: Aditya Kumar Singh Date: Wed Mar 1 16:20:58 2023 +0200 wifi: ath11k: use proper regulatory reference for bands Currently, during regulatory event, 2 GHz/5 GHz is referred to as 2G/5G including variable names. However, there is no such entity as 2G or 5G. Re-name such occurences to its proper name. No functional changes. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aditya Kumar Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230110121024.14051-2-quic_adisi@quicinc.com commit f2f6e1661d38fbce6163fc321395e9de24a9529b Author: Kees Cook Date: Sat Feb 18 10:57:05 2023 -0800 IB/rdmavt: Fix target union member for rvt_post_one_wr() The "cplen" result used by the memcpy() into struct rvt_swqe "wqe" may be sized to 80 for struct rvt_ud_wr (which is member "ud_wr", not "wr" which is only 40 bytes in size). Change the destination union member so the compiler can use the correct bounds check. struct rvt_swqe { union { struct ib_send_wr wr; /* don't use wr.sg_list */ struct rvt_ud_wr ud_wr; ... }; ... }; Silences false positive memcpy() run-time warning: memcpy: detected field-spanning write (size 80) of single field "&wqe->wr" at drivers/infiniband/sw/rdmavt/qp.c:2043 (size 40) Reported-by: Zhang Yi Link: https://bugzilla.kernel.org/show_bug.cgi?id=216561 Cc: Dennis Dalessandro Cc: Jason Gunthorpe Cc: Leon Romanovsky Cc: linux-rdma@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230218185701.never.779-kees@kernel.org Reviewed-by: Dennis Dalessandro Signed-off-by: Leon Romanovsky commit 271bfcfb83a9f77cbae3d6e1a16e3c14132922f0 Author: Daniil Dulov Date: Mon Feb 27 01:17:51 2023 -0800 RDMA/siw: Fix potential page_array out of range access When seg is equal to MAX_ARRAY, the loop should break, otherwise it will result in out of range access. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: b9be6f18cf9e ("rdma/siw: transmit path") Signed-off-by: Daniil Dulov Link: https://lore.kernel.org/r/20230227091751.589612-1-d.dulov@aladdin.ru Signed-off-by: Leon Romanovsky commit c874ad879c2f29ebe040a34b974389875c0d81eb Author: Kang Chen Date: Mon Feb 27 18:02:12 2023 +0800 IB/hifi1: add a null check of kzalloc_node in hfi1_ipoib_txreq_init kzalloc_node may fails, check it and do the cleanup. Fixes: b1151b74ff68 ("IB/hfi1: Fix alloc failure with larger txqueuelen") Signed-off-by: Kang Chen Link: https://lore.kernel.org/r/20230227100212.910820-1-void0red@gmail.com Signed-off-by: Leon Romanovsky commit dd61bbd0d1fba48cd9464e047a7f90b70a463e39 Author: Stanislaw Gruszka Date: Wed Mar 1 17:25:08 2023 +0100 accel: Build sub-directories based on config options When accel drivers are disabled do not process into sub-directories and create built-in archives: AR drivers/accel/habanalabs/built-in.a AR drivers/accel/ivpu/built-in.a Fixes: 35b137630f08 ("accel/ivpu: Introduce a new DRM driver for Intel VPU") Signed-off-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20230301162508.3963484-1-stanislaw.gruszka@linux.intel.com commit 3e27877ac565807135209933e0894d8c522cc520 Author: Luis Chamberlain Date: Fri Mar 10 15:12:03 2023 -0800 devpts: simplify two-level sysctl registration for pty_kern_table There is no need to declare two tables to just create directories, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Signed-off-by: Christian Brauner (Microsoft) commit 56edffdc298a056ed6923c89b9af7c927ff0ac8f Author: Fabien Parent Date: Fri Jan 27 16:44:44 2023 +0100 thermal/drivers/mediatek: Add support for MT8365 SoC MT8365 is similar to the other SoCs supported by the driver. It has only one bank and 3 actual sensors that can be multiplexed. There is another one sensor that does not have usable data. Signed-off-by: Fabien Parent Signed-off-by: Amjad Ouled-Ameur Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221018-up-i350-thermal-bringup-v9-3-55a1ae14af74@baylibre.com Signed-off-by: Daniel Lezcano commit 33140e668b10200b775779f302b143b32e6ae7ca Author: Markus Schneider-Pargmann Date: Fri Jan 27 16:44:43 2023 +0100 thermal/drivers/mediatek: Control buffer enablement tweaks Add logic in order to be able to turn on the control buffer on MT8365. This change now allows to have control buffer support for MTK_THERMAL_V1, and it allows to define the register offset, and mask used to enable it. Signed-off-by: Markus Schneider-Pargmann Signed-off-by: Fabien Parent Signed-off-by: Amjad Ouled-Ameur Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20221018-up-i350-thermal-bringup-v9-2-55a1ae14af74@baylibre.com Signed-off-by: Daniel Lezcano commit dfd7956f0031f9c5d758813a63e37c9cb08d33fa Author: Fabien Parent Date: Fri Jan 27 16:44:42 2023 +0100 dt-bindings: thermal: mediatek: Add binding documentation for MT8365 SoC Add the binding documentation for the thermal support on MT8365 SoC. Signed-off-by: Fabien Parent Signed-off-by: Amjad Ouled-Ameur Reviewed-by: Matthias Brugger Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Link: https://lore.kernel.org/r/20221018-up-i350-thermal-bringup-v9-1-55a1ae14af74@baylibre.com Signed-off-by: Daniel Lezcano commit f4796398f21b9844017a2dac883b1dd6ad6edd60 Author: Herbert Xu Date: Fri Mar 10 17:40:32 2023 +0800 xfrm: Remove inner/outer modes from output path The inner/outer modes were added to abstract out common code that were once duplicated between IPv4 and IPv6. As time went on the abstractions have been removed and we are now left with empty shells that only contain duplicate information. These can be removed one-by-one as the same information is already present elsewhere in the xfrm_state object. Just like the input-side, removing this from the output code makes it possible to use transport-mode SAs underneath an inter-family tunnel mode SA. Signed-off-by: Herbert Xu Signed-off-by: Steffen Klassert commit 5f24f41e8ea62a6a9095f9bbafb8b3aebe265c68 Author: Herbert Xu Date: Fri Mar 10 17:26:05 2023 +0800 xfrm: Remove inner/outer modes from input path The inner/outer modes were added to abstract out common code that were once duplicated between IPv4 and IPv6. As time went on the abstractions have been removed and we are now left with empty shells that only contain duplicate information. These can be removed one-by-one as the same information is already present elsewhere in the xfrm_state object. Removing them from the input path actually allows certain valid combinations that are currently disallowed. In particular, when a transport mode SA sits beneath a tunnel mode SA that changes address families, at present the transport mode SA cannot have AF_UNSPEC as its selector because it will be erroneously be treated as inter-family itself even though it simply sits beneath one. This is a serious problem because you can't set the selector to non-AF_UNSPEC either as that will cause the selector match to fail as we always match selectors to the inner-most traffic. Signed-off-by: Herbert Xu Signed-off-by: Steffen Klassert commit b7405e3f62d68be4cc5f4677499e1b8c13a0d216 Author: Rob Herring Date: Fri Mar 10 08:47:34 2023 -0600 PM / devfreq: exynos: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Signed-off-by: Chanwoo Choi commit f9d0393a8898d0bc67730ac736ad9c6f51434463 Author: Krzysztof Kozlowski Date: Sat Mar 11 18:37:53 2023 +0100 PM / devfreq: exyos-bus: drop of_match_ptr for ID table The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). drivers/devfreq/exynos-bus.c:504:34: error: ‘exynos_bus_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit 737dbd6667ff38b6cc72d35c3ddc04db027ed76c Author: Paul E. McKenney Date: Wed Jan 4 16:37:58 2023 -0800 PM / devfreq: Remove "select SRCU" Now that the SRCU Kconfig option is unconditionally selected, there is no longer any point in selecting it. Therefore, remove the "select SRCU" Kconfig statements. Signed-off-by: Paul E. McKenney Signed-off-by: Chanwoo Choi commit dced733d7fa9386f7c96bbf7721360472c0aed47 Author: Luis Chamberlain Date: Fri Mar 10 15:12:04 2023 -0800 quota: simplify two-level sysctl registration for fs_dqstats_table There is no need to declare two tables to just create directories, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain Signed-off-by: Jan Kara Message-Id: <20230310231206.3952808-4-mcgrof@kernel.org> commit 10fe4a1399d259b380dafa0f669c0a209e4f8197 Author: Krzysztof Kozlowski Date: Thu Mar 9 16:49:49 2023 +0100 pinctrl: qcom: sm8550-lpass-lpi: allow GPIO function All LPASS pins have basic GPIO function and most of the code is ready for that. Add missing glue pieces to allow LPASS pins to work as GPIO, which is going to be used on MTP8550 and QRD8550 boards. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230309154949.658380-4-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit fae1466da92d6627b5c938064ad42dac2aa88cc4 Author: Krzysztof Kozlowski Date: Thu Mar 9 16:49:48 2023 +0100 pinctrl: qcom: lpass-lpi: allow glitch-free output GPIO When choosing GPIO function for pins, use the same glitch-free method as main TLMM pinctrl-msm.c driver in msm_pinmux_set_mux(). This replicates the commit d21f4b7ffc22 ("pinctrl: qcom: Avoid glitching lines when we first mux to output") to LPASS pin controller with same justification. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230309154949.658380-3-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 926cf596ce3eae2150fdc5b6517f4e0d0bbe6396 Author: Krzysztof Kozlowski Date: Thu Mar 9 16:49:47 2023 +0100 pinctrl: qcom: lpass-lpi: use consistent name for "group" variable The set_mux callback in SoC TLMM driver (pinctrl-msm.c) uses "group", not "group_num" for the number of the pin group. Other places of lpass-lpi also use "group", so let's be consistent for code readability. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230309154949.658380-2-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 163bfb0cb1f6fbf961cf912cbde57399ea1ae0e8 Author: Krzysztof Kozlowski Date: Thu Mar 9 16:49:46 2023 +0100 pinctrl: qcom: lpass-lpi: set output value before enabling output As per Hardware Programming Guide, when configuring pin as output, set the pin value before setting output-enable (OE). Similar approach is in main SoC TLMM pin controller. Cc: Fixes: 6e261d1090d6 ("pinctrl: qcom: Add sm8250 lpass lpi pinctrl driver") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230309154949.658380-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 29f6e7e379fd529611a365a1aaa30e9f82e6f024 Author: Konrad Dybcio Date: Wed Mar 8 22:36:51 2023 +0100 pinctrl: qcom: msm8998: Add MPM pin mappings Add MPM <-> TLMM pin mappings to allow for waking up the AP from sleep through MPM-connected pins. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230308213651.647098-1-konrad.dybcio@linaro.org Signed-off-by: Linus Walleij commit 5361ebe94a614c36198f26c1d006a65b367a1c3a Author: Mark Brown Date: Tue Mar 7 12:51:28 2023 +0000 pinctrl: at91: Remove pioc_index from struct at91_gpio_chip The pioc_idx member of struct at91_gpio_chip is write only, just remove it. Reviewed-by: Claudiu Beznea Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230216-gpio-at91-immutable-v2-2-326ef362dbc7@kernel.org Signed-off-by: Linus Walleij commit d61955da3256d506cc201a9296723bf59f0d51ed Author: Mark Brown Date: Tue Mar 7 12:51:27 2023 +0000 pinctrl: at91: Make the irqchip immutable To help gpiolib not fiddle around with the internals of the irqchip flag the chip as immutable, adding the calls into the gpiolib core required to do so. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230216-gpio-at91-immutable-v2-1-326ef362dbc7@kernel.org Signed-off-by: Linus Walleij commit f7fc5768e57cc18c24783c524f4e80e680dc4fc4 Author: Arnd Bergmann Date: Fri Mar 10 15:02:35 2023 +0100 pinctrl: s32cc: fix !CONFIG_PM_SLEEP build error The declaration of s32_pinctrl_suspend/s32_pinctrl_resume is hidden in an #ifdef, causing a compilation failure when CONFIG_PM_SLEEP is disabled: drivers/pinctrl/nxp/pinctrl-s32g2.c:754:38: error: 's32_pinctrl_suspend' undeclared here (not in a function); did you mean 's32_pinctrl_probe'? drivers/pinctrl/nxp/pinctrl-s32g2.c:754:9: note: in expansion of macro 'SET_LATE_SYSTEM_SLEEP_PM_OPS' 754 | SET_LATE_SYSTEM_SLEEP_PM_OPS(s32_pinctrl_suspend, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Remove the bogus #ifdef and __maybe_unused annation on the global functions, and instead use the proper LATE_SYSTEM_SLEEP_PM_OPS() macro to pick set the function pointer. As the function definition is still in the #ifdef block, this leads to the correct code in all configurations. Fixes: fd84aaa8173d ("pinctrl: add NXP S32 SoC family support") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230310140250.359147-1-arnd@kernel.org Signed-off-by: Linus Walleij commit 3f2d4560898bb7cf579fb78c39f7c77368560414 Author: Krzysztof Kozlowski Date: Sun Mar 12 14:27:02 2023 +0100 pinctrl: sx150x: drop of_match_ptr for ID table The driver will match mostly by DT table (even thought there is regular ID table) so there is little benefit in of_match_ptr (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes !CONFIG_OF error: drivers/pinctrl/pinctrl-sx150x.c:833:34: error: ‘sx150x_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230312132702.352832-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit f768dc3cf74983107464bcd773167c92b85cb8f2 Author: Yangtao Li Date: Fri Mar 10 11:08:20 2023 +0800 udf: use wrapper i_blocksize() in udf_discard_prealloc() Convert to use i_blocksize() for readability. Signed-off-by: Yangtao Li Signed-off-by: Jan Kara Message-Id: <20230310030821.66090-2-frank.li@vivo.com> commit f8d221dd97cf054740017db9189029463c434a9f Author: Thomas Zimmermann Date: Wed Feb 15 17:15:17 2023 +0100 drm/cirrus: Use VGA macro constants to unblank Set the VGA bit for unblanking with macro constants instead of magic values. No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-18-tzimmermann@suse.de commit de7d09ffd5e74e3e1257944b3dd03357390b745a Author: Thomas Zimmermann Date: Wed Feb 15 17:15:16 2023 +0100 drm/cirrus: Store HW format/pitch in primary-plane state The hardware settings for color format and pitch are state of the primary plane. Store the values in the primary plane's state structure struct cirrus_primary_plane_state. Adapt all callers. All fields in struct cirrus_device are now considered immutable after initialization. Plane updates consider the difference between the old and the new plane state before updating format or pitch. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-17-tzimmermann@suse.de commit 74b9a444baca40998d4b3c193b0a98b495fdb7de Author: Thomas Zimmermann Date: Wed Feb 15 17:15:15 2023 +0100 drm/cirrus: Introduce struct cirrus_primary_plane_state The cirrus driver maintains plane state, format and pitch, in it's device structure. Introduce a plane state for the primary plane to store the values. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-16-tzimmermann@suse.de commit 6ffdf8865dc52e33b9867fe745f681175b997209 Author: Thomas Zimmermann Date: Wed Feb 15 17:15:14 2023 +0100 drm/cirrus: Inline cirrus_check_size() into primary-plane atomic_check Inline the framebuffer size check into the primary plane's atomic_check cirrus_primary_plane_atomic_check(). No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-15-tzimmermann@suse.de commit f8ad33797ab3dd3ea011c1d5f52ec684fe925271 Author: Thomas Zimmermann Date: Wed Feb 15 17:15:13 2023 +0100 drm/cirrus: Test mode against video-memory size in device-wide mode_valid Test a display mode against the available amount of video memory in struct drm_mode_config_funcs.mode_valid, which cirrus implements in cirrus_mode_config_mode_valid(). This helper tests display modes against device-wide limits. Remove the now-obsolete per-CRTC test. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-14-tzimmermann@suse.de commit edc9f16763543e5f51f07164766fac8d6bc9e560 Author: Thomas Zimmermann Date: Wed Feb 15 17:15:12 2023 +0100 drm/cirrus: Remove size test from cirrus_fb_create() The DRM core implements a size check against the mode config's limits when creating a framebuffer. [1] Remove the unnecessary test from cirrus_fb_create() and remove the now-empty function. Create framebuffers with drm_gem_fb_create_with_dirty(). Signed-off-by: Thomas Zimmermann Link: https://elixir.bootlin.com/linux/v6.1/source/drivers/gpu/drm/drm_framebuffer.c#L287 # [1] Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-13-tzimmermann@suse.de commit 91affdf3517e9255443dfadaf6978ffec16f859a Author: Thomas Zimmermann Date: Wed Feb 15 17:15:11 2023 +0100 drm/cirrus: Remove format test from cirrus_fb_create() The DRM core implements a format check when setting a framebuffer for a plane. [1] Remove the unnecessary test from cirrus_fb_create(). Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://elixir.bootlin.com/linux/v6.1/source/drivers/gpu/drm/drm_atomic.c#L629 # [1] Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-12-tzimmermann@suse.de commit c94aa5e0407e23b9d51bcfd073d83d0e504705c3 Author: Thomas Zimmermann Date: Wed Feb 15 17:15:10 2023 +0100 drm/cirrus: Inline cirrus_fb_blit_rect() Inline cirrus_fb_blit_rect into its only caller. While at it, update the code to use IOSYS_MAP_INIT_OFFSET(), which is the ideomatic way of initializing struct iosys_map with an offset. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-11-tzimmermann@suse.de commit 03e7ac67e743195633455d7ecb4f7327e3797986 Author: Thomas Zimmermann Date: Wed Feb 15 17:15:09 2023 +0100 drm/cirrus: Enable damage clipping on primary plane Enable damage clipping on the primary plane and iterate over small areas of reported framebuffer damage. Avoid the overhead of permanent full-screen updates that cirrus currently implements. This problem is indicated by the warning drm_plane_enable_fb_damage_clips() not called in the kernel's log. Without damage clipping, drivers do full updates of the screen area. This is costly as many screen updates, such as cursor movement or command-line input, only change a small portion of the output. Damage clipping allows renderers to inform drivers about the changed areas. With the damage information known, cirrus now iterates over a list of change areas and only flushes those to the hardware's scanout buffer. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-10-tzimmermann@suse.de commit d99c028941b37c412f1de35c59d96ae547be2d0f Author: Thomas Zimmermann Date: Wed Feb 15 17:15:08 2023 +0100 drm/cirrus: Convert to regular atomic helpers Replace simple-KMS helpers with DRM's regular helpers for atomic modesetting. Avoids the mid-layer and the additional wrappers around GEM's shadow-plane helpers. Most of the simple-KMS code is just wrappers around regular atomic helpers. The conversion is therefore equivalent to pulling the simple-KMS helpers into cirrus and removing all the intermediate code and data structures between the driver and the atomic helpers. As the simple-KMS helpers lump primary plan, CRTC and encoder into a single data structure, the conversion to regular helpers allows to split modesetting from plane updates and handle each individually. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-9-tzimmermann@suse.de commit fe57235bc104f2389ae1a54ea2536c1b1d6a4611 Author: Thomas Zimmermann Date: Wed Feb 15 17:15:07 2023 +0100 drm/cirrus: Move primary-plane format arrays Move the primary plane's format and modifier arrays within the source file and adapt naming slightly. No functional changes. Done in preparation of converting cirrus to regular atomic helpers. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-8-tzimmermann@suse.de commit e049497702acc5d16bc6493f68368963e0bef989 Author: Thomas Zimmermann Date: Wed Feb 15 17:15:06 2023 +0100 drm/cirrus: Integrate connector into pipeline code Integrate the connector with the rest of the pipeline setup code. Move some helpers within the file and adapt naming slightly. No functional changes. Done in preparation of converting cirrus to regular atomic helpers. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-7-tzimmermann@suse.de commit d2ff2ef8c023ddc99e2d2e0c70ff307ebd7a6d89 Author: Thomas Zimmermann Date: Wed Feb 15 17:15:05 2023 +0100 drm/cirrus: Split cirrus_mode_set() into smaller functions Split cirrus_mode_set() into smaller functions that set the display mode, color format and scnaline pitch individually. Better reflects the design of the DRM modesetting pipeline. Done in preparation of converting cirrus to regular atomic helpers. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-6-tzimmermann@suse.de commit 2fb82d5a42bb0e69547a2d31340c50bbd3a3d276 Author: Thomas Zimmermann Date: Wed Feb 15 17:15:04 2023 +0100 drm/cirrus: Move drm_dev_{enter, exit}() into DRM helpers Call drm_dev_enter() and drm_dev_exit() immediately after entering cirrus' DRM helper functions. Remove these calls from other functions. Each enter/exit block in the DRM helpers covers the full hardware update. No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-5-tzimmermann@suse.de commit cc158d0e9b0866d3626a81c13542d3be8f1477a5 Author: Thomas Zimmermann Date: Wed Feb 15 17:15:03 2023 +0100 drm/cirrus: Use drm_fb_blit() to update scanout buffer Cirrus' blit helper reimplements code from the shared blit helper drm_fb_blit(). Use the helper instead. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-4-tzimmermann@suse.de commit 5635adcb34b3f402dc013446d9e57eb534ab8c48 Author: Thomas Zimmermann Date: Wed Feb 15 17:15:02 2023 +0100 drm/cirrus: Replace cpp value with format Using components per pixel to describe a color format is obsolete. Use the format info and 4CC value instead. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-3-tzimmermann@suse.de commit d1c0cc8d0d7008856cf425c64d7203f95beed841 Author: Thomas Zimmermann Date: Wed Feb 15 17:15:01 2023 +0100 drm/cirrus: Compute blit destination offset in single location The calculation for the scanout-buffer blit offset is independent from the color format. In the one case where the current code uses fb->pitches[0] instead of cirrus->pitch, their values are identical. Hence merge all into a single line. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20230215161517.5113-2-tzimmermann@suse.de commit 7059a9aa4b6b8c6daf257a3978a4d8c476c29a96 Author: Changcheng Liu Date: Sun Mar 12 17:25:22 2023 +0800 eventpoll: align comment with nested epoll limitation fix comment in commit 02edc6fc4d5f ("epoll: comment the funky #ifdef") Signed-off-by: Liu, Changcheng Signed-off-by: Christian Brauner (Microsoft) commit 9e39a2c93e68bbf39f83b4125acae91dca0c3119 Author: Michal Vokáč Date: Fri Feb 10 16:48:52 2023 +0100 ARM: dts: imx6dl-yapp4: Use reset-gpios property name Use the gpios instead of gpio suffix that is mandated by the binding. This dtbs_check warning is fixed now: touchscreen@5c: Unevaluated properties are not allowed ('reset-gpio' was unexpected) The reset signal worked correctly as both the "gpio" and "gpios" suffixes are actually allowed by the gpiolib. Signed-off-by: Michal Vokáč Signed-off-by: Shawn Guo commit a1eccc574f977bd21a4ec8ac54bd73a2756bd281 Merge: 3e853b9f89e4b fe15c26ee26ef Author: Thomas Zimmermann Date: Mon Mar 13 09:27:50 2023 +0100 Merge drm/drm-next into drm-misc-next Backmerging to get v6.3-rc1 and sync with the other DRM trees. Signed-off-by: Thomas Zimmermann commit 486136566778e995ffcd2fcc7ce39f5928217bca Author: Michal Vokáč Date: Fri Feb 10 16:48:50 2023 +0100 dt-bindings: arm: fsl: Fix copy-paste error in comment The imx6dl-yapp4-draco board is actually based on the i.MX6Solo SoC. Fix the comment to match reality. Fixes: 24ef3b6e22fe ("dt-bindings: arm: Add Y Soft IOTA Draco, Hydra and Ursa boards") Signed-off-by: Michal Vokáč Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 45e5f0c017e0d0dabb952db63428e31eca6be87e Author: Niklas Schnelle Date: Mon Mar 6 16:10:14 2023 +0100 s390/pci: clean up left over special treatment for function zero Prior to commit 960ac3626487 ("s390/pci: allow zPCI zbus without a function zero") enabling and scanning a PCI function had to potentially be postponed until the function with devfn zero on that bus was plugged. While the commit removed the waiting itself extra code to scan all functions on the PCI bus once function zero appeared was missed. Remove that code and the outdated comments about waiting for function zero. Signed-off-by: Niklas Schnelle Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20230306151014.60913-5-schnelle@linux.ibm.com Signed-off-by: Vasily Gorbik commit b881208dcdae311734f172d61cf9ae6fcb108389 Author: Niklas Schnelle Date: Mon Mar 6 16:10:13 2023 +0100 s390/pci: remove redundant pci_bus_add_devices() on new bus The pci_bus_add_devices() call in zpci_bus_create_pci_bus() is without function since at this point no device could have been added to the freshly created PCI bus. Suggested-by: Bjorn Helgaas Signed-off-by: Niklas Schnelle Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20230306151014.60913-4-schnelle@linux.ibm.com Signed-off-by: Vasily Gorbik commit ae83707f39e1b8f2a15af3868bba25ce4fa93364 Author: Niklas Schnelle Date: Mon Mar 6 16:10:12 2023 +0100 s390/pci: only add specific device in zpci_bus_scan_device() As the name suggests zpci_bus_scan_device() is used to scan a specific device and thus pci_bus_add_device() for that device is sufficient. Furthermore move this call inside the rescan/remove locking. Suggested-by: Bjorn Helgaas Signed-off-by: Niklas Schnelle Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20230306151014.60913-3-schnelle@linux.ibm.com Signed-off-by: Vasily Gorbik commit 029a4f4b9555ddb47f38f9589fd6d43277efb9c6 Author: Heiko Carstens Date: Thu Mar 9 20:12:28 2023 +0100 s390/setup: always inline gen_lpswe() gen_lpswe() contains a BUILD_BUG_ON() statement which depends on a function parameter. If the compiler decides to generate a not inlined function this will lead to a build error, even if all call sites pass a valid parameter. To avoid this always inline gen_lpswe(). Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit fb77914a692d550a5bb0c7f71eac40e6da9c0e6d Author: Al Viro Date: Mon Mar 6 00:55:33 2023 +0000 s390: trim ancient junk from copy_thread() Setting and ->psw.addr in childregs of kernel thread is a rudiment of the old kernel_thread()/kernel_execve() implementation. Mainline hadn't been using them since 2012. And clarify the assignments to frame->sf.gprs - the array stores grp6..gpr15 values to be set by __switch_to(), so frame->sf.gprs[5] actually affects grp11, etc. Better spell that as frame->sf.gprs[11 - 6]... Signed-off-by: Al Viro Link: https://lore.kernel.org/r/ZAU6BYFisE8evmYf@ZenIV Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 72c2112ce9d72e6c40dd893f32187a3d34453113 Author: Yu Zhe Date: Fri Mar 3 13:21:55 2023 +0800 s390/zcrypt: remove unnecessary (void *) conversions Pointer variables of void * type do not require type cast. Signed-off-by: Yu Zhe Reviewed-by: Muhammad Usama Anjum Link: https://lore.kernel.org/r/20230303052155.21072-1-yuzhe@nfschina.com Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 69a407bf81a8d70d51e1b7787da577e67447c9ea Author: Heiko Carstens Date: Tue Feb 28 13:57:50 2023 +0100 s390/bp: remove __bpon() There is no point in changing branch prediction state of a cpu shortly before it enters stop state. Therefore remove __bpon(). Acked-by: Alexander Gordeev Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 9b63fd2fc8526e51444de35598927e406b1bb26f Author: Heiko Carstens Date: Tue Feb 28 13:57:49 2023 +0100 s390/bp: remove s390_isolate_bp_guest() s390_isolate_bp_guest() is unused. Remove it. Reviewed-by: Alexander Gordeev Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit f33f2d4c7c80c641f6ca3dfe5e7dfe1f91543780 Author: Heiko Carstens Date: Tue Feb 28 13:57:48 2023 +0100 s390/bp: remove TIF_ISOLATE_BP TIF_ISOLATE_BP is unused since it was introduced with commit 6b73044b2b00 ("s390: run user space and KVM guests with modified branch prediction"). Given that there is no use case remove it again. Acked-by: Alexander Gordeev Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit fed626db8bc240678fd0fa8078aa767ad21d47fd Author: Heiko Carstens Date: Tue Feb 28 13:57:47 2023 +0100 s390/bp: add missing BPENTER to program check handler When leaving interpretive execution because of a program check BPENTER should be called like it is done on interrupt exit as well. Acked-by: Alexander Gordeev Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 04b09f6e5d005101b72fdac4c486a578841d7c53 Author: Rob Herring Date: Wed Feb 8 12:34:38 2023 -0600 arm64: dts: layerscape: Fix GICv3 ITS node names The GICv3 ITS is an MSI controller, therefore its node name should be 'msi-controller'. Signed-off-by: Rob Herring Signed-off-by: Shawn Guo commit 458219ca9246076971961d695eef9eb56e05fcf7 Merge: 466123c54f315 eeac8ede17557 Author: Greg Kroah-Hartman Date: Mon Mar 13 08:38:16 2023 +0100 Merge 6.3-rc2 into staging-next We need the removal of the r8188eu staging driver in here as well so that outreachy and LF mentor applicants do not try to submit patches against it as it is now gone from the tree. Signed-off-by: Greg Kroah-Hartman commit a39e724e6b2eeb08839cb2f9f6d65852b8a14f1e Author: Marcel Ziswiler Date: Wed Feb 8 07:59:47 2023 +0100 arm64: dts: imx8mp-verdin-yavia: trivial minor updates Capitalise Yavia in comment and add missing whitespace. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit 93ba667d6a7b1740877a44c203a3973b894808ad Author: Marcel Ziswiler Date: Wed Feb 8 07:59:46 2023 +0100 arm64: dts: verdin-imx8mp: add pcie support Add PCIe support on the Verdin iMX8M Plus. Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit babb3e6a8a8e5a61a65d4463610108808139b23e Author: Sam Protsenko Date: Wed Mar 8 17:38:19 2023 -0600 clk: samsung: exynos850: Make PMU_ALIVE_PCLK critical PMU_ALIVE_PCLK is needed for PMU registers access, and it must be always running, as not only the kernel accesses PMU registers. Make it critical to ensure that. Signed-off-by: Sam Protsenko Link: https://lore.kernel.org/r/20230308233822.31180-5-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit 2b8ed0c89f5dc7af756473651deb1be1770d2136 Author: Rob Herring Date: Fri Mar 10 08:46:54 2023 -0600 ARM: exynos: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144655.1540655-1-robh@kernel.org Signed-off-by: Krzysztof Kozlowski commit 538c7b5b5d8b5364454494e5fe4125b0b47195f1 Author: Rob Herring Date: Fri Mar 10 08:47:11 2023 -0600 memory: atmel-ebi: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144711.1543295-1-robh@kernel.org Signed-off-by: Krzysztof Kozlowski commit e9eadc28271940266ace3f748a1c6278bd886ea8 Author: Rob Herring Date: Fri Mar 10 08:47:18 2023 -0600 opp: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Signed-off-by: Viresh Kumar commit b8f3a396a7ee43e6079176cc0fb8de2b95a23681 Author: Rob Herring Date: Fri Mar 10 08:47:02 2023 -0600 cpufreq: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Signed-off-by: Viresh Kumar commit 35527c677cb6bbaa6489b8560c8b4316fdd60792 Author: Konrad Dybcio Date: Thu Feb 16 11:51:40 2023 +0100 cpufreq: qcom-hw: Simplify counting frequency domains For quite some time, this driver has been performing some quite low-level DT operations. Simplify that using platform_get_resource. Signed-off-by: Konrad Dybcio Reviewed-by: Bjorn Andersson Signed-off-by: Viresh Kumar commit df97441673f303d06dd33c04d8d5ee54ae6b2a82 Author: Nick Alcock Date: Wed Feb 22 12:14:41 2023 +0000 kbuild, cpufreq: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: linux-pm@vger.kernel.org Signed-off-by: Viresh Kumar commit f35512777e31085f1ade7febed6c2038adb1fb07 Author: Nick Alcock Date: Wed Feb 22 12:14:40 2023 +0000 kbuild, cpufreq: tegra124: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-pm@vger.kernel.org Cc: linux-tegra@vger.kernel.org Signed-off-by: Viresh Kumar commit 7911b6a868ea1fc7e4e4929edaee312a2f061905 Author: Bartosz Golaszewski Date: Tue Feb 21 16:05:42 2023 +0100 dt-bindings: cpufreq: qcom-hw: add a compatible for sa8775p Add the compatible for the cpufreq engine present on sa8775p platforms. Signed-off-by: Bartosz Golaszewski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Viresh Kumar commit 1844e680d56bb0c4e0489138f2b7ba2dc1c988e3 Author: Vinod Polimera Date: Thu Mar 2 22:03:17 2023 +0530 drm/msm/dp: set self refresh aware based on PSR support For the PSR to kick in, self_refresh_aware has to be set. Initialize it based on the PSR support for the eDP interface. Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/524743/ Link: https://lore.kernel.org/r/1677774797-31063-15-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit f7e0b3c292ec4cc7996b383e9766e843e2a5e2a5 Author: Vinod Polimera Date: Thu Mar 2 22:03:16 2023 +0530 drm/msm/disp/dpu: update dpu_enc crtc state on crtc enable/disable during self refresh Populate the enocder software structure to reflect the updated crtc appropriately during crtc enable/disable for a new commit while taking care of the self refresh transitions when crtc disable is triggered from the drm self refresh library. Signed-off-by: Vinod Polimera Patchwork: https://patchwork.freedesktop.org/patch/524742/ Link: https://lore.kernel.org/r/1677774797-31063-14-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit 1122697810e5b21982e4824aa4767fb99f1e262a Author: Vinod Polimera Date: Thu Mar 2 22:03:15 2023 +0530 drm/msm/disp/dpu: add PSR support for eDP interface in dpu driver Enable PSR on eDP interface using drm self-refresh librabry. This patch uses a trigger from self-refresh library to enter/exit into PSR, when there are no updates from framework. Signed-off-by: Kalyan Thota Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/524739/ Link: https://lore.kernel.org/r/1677774797-31063-13-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit c0cd12a5d29fa36a8e2ebac7b8bec50c1a41fb57 Author: Vinod Polimera Date: Thu Mar 2 22:03:14 2023 +0530 drm/msm/disp/dpu: use atomic enable/disable callbacks for encoder functions Use atomic variants for encoder callback functions such that certain states like self-refresh can be accessed as part of enable/disable sequence. Signed-off-by: Kalyan Thota Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/524738/ Link: https://lore.kernel.org/r/1677774797-31063-12-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit 05d0013527330d71385e259013e593577accef7d Author: Vinod Polimera Date: Thu Mar 2 22:03:13 2023 +0530 drm/msm/dp: use the eDP bridge ops to validate eDP modes The eDP and DP interfaces shared the bridge operations and the eDP specific changes were implemented under is_edp check. To add psr support for eDP, we started using a new set of eDP bridge ops. We are moving the eDP specific code in the dp_bridge_mode_valid function to a new eDP function, edp_bridge_mode_valid under the eDP bridge ops. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/524736/ Link: https://lore.kernel.org/r/1677774797-31063-11-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit cd779808cccd50a6b079753e1d061a315effa207 Author: Vinod Polimera Date: Thu Mar 2 22:03:12 2023 +0530 drm/msm/dp: Add basic PSR support for eDP Add support for basic panel self refresh (PSR) feature for eDP. Add a new interface to set PSR state in the sink from DPU. Program the eDP controller to issue PSR enter and exit SDP to the sink. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/524734/ Link: https://lore.kernel.org/r/1677774797-31063-10-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit cdfd0e6246c49dd3f798ce802a5211bc3948f9ac Author: Vinod Polimera Date: Thu Mar 2 22:03:11 2023 +0530 drm/msm/dp: use atomic callbacks for DP bridge ops Use atomic variants for DP bridge callback functions so that the atomic state can be accessed in the interface drivers. The atomic state will help the driver find out if the display is in self refresh state. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson Patchwork: https://patchwork.freedesktop.org/patch/524731/ Link: https://lore.kernel.org/r/1677774797-31063-9-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit 22cb02bc96fff6ade1ed3e911d3908841054d76d Author: Vinod Polimera Date: Thu Mar 2 22:03:10 2023 +0530 drm/msm/disp/dpu: reset the datapath after timing engine disable Reset the datapath after disabling the timing gen, such that it can start on a clean slate when the intf is enabled back. This was a recommended sequence from the DPU HW programming guide. Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/524729/ Link: https://lore.kernel.org/r/1677774797-31063-8-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit 8e1ff4bb629fe482a53c6d942182f42ba0427bed Author: Vinod Polimera Date: Thu Mar 2 22:03:09 2023 +0530 drm/msm/disp/dpu: wait for extra vsync till timing engine status is disabled There can be a race between timing gen disable and vblank irq. The wait post timing gen disable may return early but intf disable sequence might not be completed. Ensure that, intf status is disabled before we retire the function. Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/524727/ Link: https://lore.kernel.org/r/1677774797-31063-7-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit e3969eadc8ee78a5bdca65b8ed0a421a359e4090 Author: Vinod Polimera Date: Thu Mar 2 22:03:08 2023 +0530 drm/msm/disp/dpu: get timing engine status from intf status register Recommended way of reading the interface timing gen status is via status register. Timing gen status register will give a reliable status of the interface especially during ON/OFF transitions. This support was added from DPU version 5.0.0. Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/524724/ Link: https://lore.kernel.org/r/1677774797-31063-6-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit b6975693846b562c4d3e0e60cc884affc5bdac00 Author: Vinod Polimera Date: Thu Mar 2 22:03:07 2023 +0530 drm/msm/disp/dpu: check for crtc enable rather than crtc active to release shared resources According to KMS documentation, The driver must not release any shared resources if active is set to false but enable still true. Fixes: ccc862b957c6 ("drm/msm/dpu: Fix reservation failures in modeset") Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/524726/ Link: https://lore.kernel.org/r/1677774797-31063-5-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit d011db300ddeaefbcda6a7bb2a31a73d263bbca3 Author: Vinod Polimera Date: Thu Mar 2 22:03:06 2023 +0530 drm/bridge: add psr support for panel bridge callbacks This change will handle the psr entry exit cases in the panel bridge atomic callback functions. For example, the panel power should not turn off if the panel is entering psr. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera Reviewed-by: Daniel Vetter Patchwork: https://patchwork.freedesktop.org/patch/524721/ Link: https://lore.kernel.org/r/1677774797-31063-4-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit b67e0f530fdf5671a94f079d48707e5ec5fbdbd7 Author: Vinod Polimera Date: Thu Mar 2 22:03:05 2023 +0530 drm/bridge: use atomic enable/disable callbacks for panel bridge Use atomic variants for panel bridge callback functions such that certain states like self-refresh can be accessed as part of enable/disable sequence. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera Reviewed-by: Dmitry Baryshkov Reviewed-by: Daniel Vetter Patchwork: https://patchwork.freedesktop.org/patch/524720/ Link: https://lore.kernel.org/r/1677774797-31063-3-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit 7b9a9e35e45def496b0a5b3f206bb4efa712ea4a Author: Vinod Polimera Date: Thu Mar 2 22:03:04 2023 +0530 drm: add helper functions to retrieve old and new crtc Add new helper functions, drm_atomic_get_old_crtc_for_encoder and drm_atomic_get_new_crtc_for_encoder to retrieve the corresponding crtc for the encoder. Signed-off-by: Sankeerth Billakanti Signed-off-by: Vinod Polimera Reviewed-by: Douglas Anderson Reviewed-by: Daniel Vetter Patchwork: https://patchwork.freedesktop.org/patch/524718/ Link: https://lore.kernel.org/r/1677774797-31063-2-git-send-email-quic_vpolimer@quicinc.com Signed-off-by: Dmitry Baryshkov commit 73bb5a9017b93093854c18eb7ca99c7061b16367 Author: Roberto Sassu Date: Mon Mar 6 11:35:31 2023 +0100 fs: Fix description of vfs_tmpfile() Update the description of vfs_tmpfile() to match the current parameters of that function. Fixes: 9751b338656f ("vfs: move open right after ->tmpfile()") Signed-off-by: Roberto Sassu Acked-by: Christian Brauner Signed-off-by: Al Viro commit ede3ef5c1e0766b309a1bf087e4c50ea02d3f26f Author: Al Viro Date: Tue Mar 7 01:53:52 2023 -0500 sysv: switch to put_and_unmap_page() Signed-off-by: Al Viro commit 8ad77c576721bd7f7b24bfd7fcb0a61bcfa1a1a2 Author: Fabio M. De Francesco Date: Mon Mar 6 13:51:50 2023 +0100 fs/sysv: Don't round down address for kunmap_flush_on_unmap() The kernel virtual address passed to kunmap_flush_on_unmap() has no more any need to be rounded down. Therefore, delete the rounding down of "page_addr" when passed to kunmap_local() in dir_put_page(). Don't backport without commit 88d7b12068b9 ("highmem: round down the address passed to kunmap_flush_on_unmap()"). Cc: Ira Weiny Suggested-by: Al Viro Signed-off-by: Fabio M. De Francesco Signed-off-by: Al Viro commit 2d683175827171c982f91996fdbef4f3fd8b1b01 Author: Christoph Hellwig Date: Tue Mar 7 15:31:25 2023 +0100 mm,jfs: move write_one_page/folio_write_one to jfs The last remaining user of folio_write_one through the write_one_page wrapper is jfs, so move the functionality there and hard code the call to metapage_writepage. Note that the use of the pagecache by the JFS 'metapage' buffer cache is a bit odd, and we could probably do without VM-level dirty tracking at all, but that's a change for another time. Signed-off-by: Christoph Hellwig Acked-by: Dave Kleikamp Signed-off-by: Al Viro commit 8e4bfd136410df75c915fb462914b36e6e5fdfc0 Author: Christoph Hellwig Date: Wed Jan 18 18:30:27 2023 +0100 ocfs2: don't use write_one_page in ocfs2_duplicate_clusters_by_page Use filemap_write_and_wait_range to write back the range of the dirty page instead of write_one_page in preparation of removing write_one_page and eventually ->writepage. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Joseph Qi Signed-off-by: Al Viro commit 9e22031a5a6c038089dfd4220012c7fb7f1631af Author: Christoph Hellwig Date: Tue Mar 7 15:31:23 2023 +0100 ufs: don't flush page immediately for DIRSYNC directories We do not need to writeout modified directory blocks immediately when modifying them while the page is locked. It is enough to do the flush somewhat later which has the added benefit that inode times can be flushed as well. It also allows us to stop depending on write_one_page() function. Ported from an ext2 patch by Jan Kara. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 5161ec200f5a84416667da853ff822d72df507f2 Author: Hermes Zhang Date: Thu Mar 9 14:41:03 2023 +0800 power: supply: bq256xx: Support to disable charger To be able to control the charging process flexible, we need to able to disable the charger. This commit will allow to disable the charger by "echo 1 > /sys/class/power_supply/bq256xx-charger/charge_type" (1 = POWER_SUPPLY_CHARGE_TYPE_NONE) and enable the charger by set it to 2/3 (POWER_SUPPLY_CHARGE_TYPE_TRICKLE/POWER_SUPPLY_CHARGE_TYPE_FAST) Signed-off-by: Hermes Zhang Signed-off-by: Sebastian Reichel commit 83425c835e7dea49576aaac5fd4bff9b38ee0c32 Author: Rob Herring Date: Fri Mar 10 08:47:35 2023 -0600 power: supply: charger-manager: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Signed-off-by: Sebastian Reichel commit ef6d10568ca9ca622a867e5d059982251bbccd6b Author: Krzysztof Kozlowski Date: Fri Mar 10 21:06:52 2023 +0100 power: reset: qcom-pon: drop of_match_ptr for ID table The Qualcomm SoC power-on driver is specific to ARCH_QCOM which depends on OF thus the driver is OF-only. It's of_device_id table is built unconditionally, thus of_match_ptr() for ID table does not make sense. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Reviewed-by: Marijn Suijten Signed-off-by: Sebastian Reichel commit 65cc52f3a91e5734cd1653da3b02ada94cda3ff6 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:15:32 2023 +0100 power: supply: bq25890_charger: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/power/supply/bq25890_charger.c:1625:34: error: ‘bq25890_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 1eab6b66acdd50415fa34903dd1753bf560cdf93 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:15:31 2023 +0100 power: supply: bq24257_charger: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/power/supply/bq24257_charger.c:1143:34: error: ‘bq24257_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 3c904b052c3823b110412b432d0dc6414bda3760 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:15:30 2023 +0100 power: supply: ltc4162-l-charger: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/power/supply/ltc4162-l-charger.c:911:34: error: ‘ltc4162l_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit ea66715d30ea5824290a2a4da2604d5e59fea372 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:15:29 2023 +0100 power: supply: lp8727_charger: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/power/supply/lp8727_charger.c:601:34: error: ‘lp8727_dt_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 9e2480d437f99aa511d260d1746f596927dc633f Author: Krzysztof Kozlowski Date: Sat Mar 11 12:15:28 2023 +0100 power: supply: twl4030_charger: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/power/supply/twl4030_charger.c:1129:34: error: ‘twl_bci_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 66f731db6fe7e42c3b8ac843b0cab49b5bdb1bce Author: Krzysztof Kozlowski Date: Sat Mar 11 12:15:27 2023 +0100 power: supply: rt9455_charger: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/power/supply/rt9455_charger.c:1725:34: error: ‘rt9455_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 225dc61e2fa8def14426e2a34e926a79fae6118b Author: Tom Rix Date: Sun Mar 12 12:17:33 2023 -0400 iio: adc: stm32-adc: set some stm32-adc.c variables storage-class-specifier to static smatch reports several warnings drivers/iio/adc/stm32-adc.c:2591:20: warning: symbol 'stm32_adc_min_ts_h7' was not declared. Should it be static? drivers/iio/adc/stm32-adc.c:2610:20: warning: symbol 'stm32_adc_min_ts_mp1' was not declared. Should it be static? drivers/iio/adc/stm32-adc.c:2630:20: warning: symbol 'stm32_adc_min_ts_mp13' was not declared. Should it be static? These variables are only used in stm32-adc.c, so they should be static Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20230312161733.470617-1-trix@redhat.com Signed-off-by: Jonathan Cameron commit 0e84f3493a37d50f2f629dbea670135b8a8ee391 Author: Krzysztof Kozlowski Date: Tue Feb 21 17:16:53 2023 +0100 ARM: dts: exynos: fix MCT compatible in Universal C210 When desired, nodes should be disabled instead of changing their compatible to a fake one: exynos4210-universal_c210.dtb: /soc/timer@10050000: failed to match any schema with compatible: ['none'] Tested-by: Marek Szyprowski Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20230221161653.56574-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit aff750faa5ac699df7ade5a31b6ba52ab1072d8a Author: Krzysztof Kozlowski Date: Fri Jan 27 11:18:34 2023 +0100 ARM: dts: hisilicon: use "okay" for status "okay" over "ok" is preferred for status property. Link: https://lore.kernel.org/r/20230127101834.93818-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 1792375be092b4d9da34b43240319264363540dc Author: Krzysztof Kozlowski Date: Fri Jan 27 11:18:36 2023 +0100 ARM: dts: ti: use "okay" for status "okay" over "ok" is preferred for status property. Acked-by: Nishanth Menon Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20230127101836.93845-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 90bf48c6ddd3afc406e41a1a193d412f61d2a976 Author: Krzysztof Kozlowski Date: Fri Jan 27 11:18:38 2023 +0100 ARM: dts: marvell: use "okay" for status "okay" over "ok" is preferred for status property. Link: https://lore.kernel.org/r/20230127101839.93873-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit f7ec6efef4560edeebdca10b73a92f37c6fb16cf Author: Krzysztof Kozlowski Date: Mon Jan 23 16:15:31 2023 +0100 ARM: dts: omap: align UART node name with bindings Bindings expect UART/serial node names to be "serial". Link: https://lore.kernel.org/r/20230123151531.369419-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 8a922b7728a93d837954315c98b84f6b78de0c4f Author: Krzysztof Kozlowski Date: Thu May 26 22:46:05 2022 +0200 arm64: dts: toshiba: adjust whitespace around '=' Fix whitespace coding style: use single space instead of tabs or multiple spaces around '=' sign in property assignment. No functional changes (same DTB). Link: https://lore.kernel.org/r/20220526204606.833054-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit e853fb1803f60da69db82d41d92e30539a859227 Author: Uwe Kleine-König Date: Sun Mar 12 17:15:06 2023 +0100 clk: samsung: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230312161512.2715500-25-u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit 9ee6bc3a035a5882888d6a73a2c13e2f4e65793f Author: Krzysztof Kozlowski Date: Sun Mar 12 16:34:29 2023 +0100 iio: proximity: sx9500: Reference ACPI and OF ID data Always reference acpi_device_id and of_device_id tables, as they is little benefit of conditional compiling and OF table could be used also for ACPI matching via PRP0001. This fixes warning: drivers/iio/proximity/sx9500.c:1039:34: error: ‘sx9500_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230312153429.371702-3-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron commit b29c49026c3c05a11f845dba17cad0b3ba06836d Author: Krzysztof Kozlowski Date: Sun Mar 12 16:34:28 2023 +0100 iio: light: max44009: add missing OF device matching The driver currently matches only via i2c_device_id, but also has of_device_id table: drivers/iio/light/max44009.c:545:34: error: ‘max44009_of_match’ defined but not used [-Werror=unused-const-variable=] Fixes: 6aef699a7d7e ("iio: light: add driver for MAX44009") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230312153429.371702-2-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron commit 2e467c4edc7b08c3e4ad37c5d69a372f3bc59fad Author: Lorenzo Bianconi Date: Mon Mar 6 12:08:01 2023 +0100 dt-bindings: iio: imu: st_lsm6dsx: add asm330lhb Add device bindings for asm330lhb IMU sensor. Use asm330lhh as fallback device for asm330lhb since it implements all the features currently supported by asm330lhb. Signed-off-by: Lorenzo Bianconi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/fecf1f20cc8e99fb8654cc733f14bd449ca7f87a.1678100533.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron commit 18462d080171962d5003b12a7360357fa09b6aad Author: Lorenzo Bianconi Date: Mon Mar 6 12:08:00 2023 +0100 iio: imu: st_lsm6dsx: add support to ASM330LHB Add support to STM ASM330LHB (acc + gyro) automotive Mems sensor. The ASM330LHB sensor can use ASM330LHH as fallback device since it implements all the ASM330LHB features currently implemented in st_lsm6dsx. Datasheet: https://www.st.com/resource/en/datasheet/asm330lhb.pdf Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/a1d675457da7aa9e979d8cabea410e942e015e71.1678100533.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron commit 0088dd6869579f7022b226d1266e6dc23789ed41 Author: Rasmus Villemoes Date: Wed Mar 1 12:55:11 2023 +0100 iio: addac: ad74413r: fix Current Input, Loop Powered Mode Currently, the driver handles CH_FUNC_CURRENT_INPUT_LOOP_POWER and CH_FUNC_CURRENT_INPUT_EXT_POWER completely identically. But that's not correct. In order for CH_FUNC_CURRENT_INPUT_LOOP_POWER to work, two changes must be made: (1) expose access to the DAC_CODE_x register so that the intended output current can be set, i.e. expose the channel as both current output and current input, and (2) per the data sheet When selecting the current input loop powered function, tie the VIOUTN_x pin to ground via the on-chip 200 kΩ resistor by enabling the CH_200K_TO_GND bit in the ADC_CONFIGx registers. Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20230301115511.849418-1-linux@rasmusvillemoes.dk Signed-off-by: Jonathan Cameron commit 504eb485589d146e99a53cd982b52fe1728fc19e Author: Rasmus Villemoes Date: Mon Mar 6 10:43:01 2023 +0100 iio: ad74413r: wire up support for drive-strength-microamp property Use the value specified in the channel configuration node to populate the DIN_SINK field of the DIN_CONFIGx register. Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20230306094301.1357543-3-linux@rasmusvillemoes.dk Signed-off-by: Jonathan Cameron commit 954ea91fb68b771dba6d87cfa61b68e09cc2497f Author: Rasmus Villemoes Date: Mon Mar 6 10:43:00 2023 +0100 dt-bindings: iio: ad74413r: allow setting sink current for digital input Depending on the actual hardware wired up to a digital input channel, it may be necessary to configure the ad74413r to sink a small current. For example, in the case of a simple mechanical switch, the charge on the external 68 nF capacitor (cf. the data sheet's Figure 34) will keep the channel as reading high even after the switch is turned off again. Signed-off-by: Rasmus Villemoes Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230306094301.1357543-2-linux@rasmusvillemoes.dk Signed-off-by: Jonathan Cameron commit 36b617f7e4ae663fcadd202ea061ca695ca75539 Author: Chen-Yu Tsai Date: Thu Feb 2 12:57:34 2023 +0800 drm/mediatek: dp: Only trigger DRM HPD events if bridge is attached The MediaTek DisplayPort interface bridge driver starts its interrupts as soon as its probed. However when the interrupts trigger the bridge might not have been attached to a DRM device. As drm_helper_hpd_irq_event() does not check whether the passed in drm_device is valid or not, a NULL pointer passed in results in a kernel NULL pointer dereference in it. Check whether the bridge is attached and only trigger an HPD event if it is. Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver") Signed-off-by: Chen-Yu Tsai Reviewed-by: Guillaume Ranquet Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230202045734.2773503-1-wenst@chromium.org/ Signed-off-by: Chun-Kuang Hu commit ed715684b807e6226d4f5091ebf54f962ac82e77 Author: Justin Green Date: Thu Mar 9 16:04:16 2023 -0500 drm/mediatek: Enable AR30 and BA30 overlays on MT8195 Modify the overlay driver data for MT8195 to enable bit depth control and enable support for AR30 and BA30 framebuffer formats. This patch in combination with the previous two patches in the series will allow MT8195 devices to scanout AR30 and BA30 framebuffers. Tested using "modetest -P" on an MT8195 device. The test pattern displays correctly for both AR30 and BA30 formats. Signed-off-by: Justin Green Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230309210416.1167020-4-greenjustin@chromium.org/ Signed-off-by: Chun-Kuang Hu commit fb36c5020c9c9184a9a3889628a572feb69fd794 Author: Justin Green Date: Thu Mar 9 16:06:23 2023 -0500 drm/mediatek: Add support for AR30 and BA30 overlays Add the ability for the Mediatek DRM driver to control the bit depth register. If the DTS indicates the device supports 10-bit overlays and the current format has a fourcc of AR30, BA30, or RA30, we set the bit depth register to 10 bit. The next patch in the series actually enables 10-bit overlays for MT8195 devices, but this current patch should be a no-op. This patch was tested by simply running Chrome on an MT8195 and looking for regressions. Signed-off-by: Justin Green Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230309210623.1167567-1-greenjustin@chromium.org/ Signed-off-by: Chun-Kuang Hu commit f287c66a6064f2d2936a2a8ea792b11bb7361fa0 Author: Justin Green Date: Thu Mar 9 16:04:14 2023 -0500 drm/mediatek: Refactor pixel format logic Add an DDP component interface for querying pixel format support and move list of supported pixel formats into DDP components instead of mtk_drm_plane.c Tested by running Chrome on an MT8195. Signed-off-by: Justin Green Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230309210416.1167020-2-greenjustin@chromium.org/ Signed-off-by: Chun-Kuang Hu commit 541880542f2baa7c485b40c1ecad1855315418f6 Author: Mike Looijmans Date: Tue Mar 7 07:55:34 2023 +0100 iio: adc: Add TI ADS1100 and ADS1000 The ADS1100 is a 16-bit ADC (at 8 samples per second). The ADS1000 is similar, but has a fixed data rate. Signed-off-by: Mike Looijmans Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230307065535.7927-2-mike.looijmans@topic.nl Signed-off-by: Jonathan Cameron commit f8c64b146c60d60d9d35c950a854c3975034af19 Author: Mike Looijmans Date: Tue Mar 7 07:55:33 2023 +0100 dt-bindings: iio: adc: Add TI ADS1100 and ADS1000 The ADS1100 is a 16-bit ADC (at 8 samples per second). The ADS1000 is similar, but has a fixed data rate. Signed-off-by: Mike Looijmans Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230307065535.7927-1-mike.looijmans@topic.nl Signed-off-by: Jonathan Cameron commit 89c8e98d8cfb0656dbeb648572df5b13e372247d Author: Mike Christie Date: Fri Mar 10 16:03:29 2023 -0600 fork: allow kernel code to call copy_process The next patch adds helpers like create_io_thread, but for use by the vhost layer. There are several functions, so they are in their own file instead of cluttering up fork.c. This patch allows that new file to call copy_process. Signed-off-by: Mike Christie Acked-by: Michael S. Tsirkin Signed-off-by: Christian Brauner (Microsoft) commit 094717586bf71ac20ae3b240d2654d826634b21e Author: Mike Christie Date: Fri Mar 10 16:03:28 2023 -0600 fork: Add kernel_clone_args flag to ignore signals Since: commit 10ab825bdef8 ("change kernel threads to ignore signals instead of blocking them") kthreads have been ignoring signals by default, and the vhost layer has never had a need to change that. This patch adds an option flag, USER_WORKER_SIG_IGN, handled in copy_process() after copy_sighand() and copy_signals() so vhost_tasks added in the next patches can continue to ignore singals. Signed-off-by: Christian Brauner Signed-off-by: Mike Christie Acked-by: Michael S. Tsirkin Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 11f3f500ec8a75c96087f3bed87aa2b1c5de7498 Author: Mike Christie Date: Fri Mar 10 16:03:27 2023 -0600 fork: add kernel_clone_args flag to not dup/clone files Each vhost device gets a thread that is used to perform IO and management operations. Instead of a thread that is accessing a device, the thread is part of the device, so when it creates a thread using a helper based on copy_process we can't dup or clone the parent's files/FDS because it would do an extra increment on ourself. Later, when we do: Qemu process exits: do_exit -> exit_files -> put_files_struct -> close_files we would leak the device's resources because of that extra refcount on the fd or file_struct. This patch adds a no_files option so these worker threads can prevent taking an extra refcount on themselves. Signed-off-by: Mike Christie Acked-by: Christian Brauner Acked-by: Michael S. Tsirkin Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 54e6842d0775ba76db65cbe21311c3ca466e663d Author: Mike Christie Date: Fri Mar 10 16:03:26 2023 -0600 fork/vm: Move common PF_IO_WORKER behavior to new flag This adds a new flag, PF_USER_WORKER, that's used for behavior common to to both PF_IO_WORKER and users like vhost which will use a new helper instead of create_io_thread because they require different behavior for operations like signal handling. The common behavior PF_USER_WORKER covers is the vm reclaim handling. Signed-off-by: Mike Christie Acked-by: Michael S. Tsirkin Signed-off-by: Christian Brauner (Microsoft) commit c81cc5819faf5dd77124f5086aa654482281ac37 Author: Mike Christie Date: Fri Mar 10 16:03:25 2023 -0600 kernel: Make io_thread and kthread bit fields We only set args->io_thread/kthread to 0 or 1 then test if they are set, so make them bit fields. Signed-off-by: Mike Christie Acked-by: Michael S. Tsirkin Signed-off-by: Christian Brauner (Microsoft) commit 73e0c116594d99f807754b15e474690635a87249 Author: Mike Christie Date: Fri Mar 10 16:03:24 2023 -0600 kthread: Pass in the thread's name during creation This has us pass in the thread's name during creation in kernel_thread. Signed-off-by: Mike Christie Acked-by: Michael S. Tsirkin Signed-off-by: Christian Brauner (Microsoft) commit cf587db2ee0261c74d04f61f39783db88a0b65e4 Author: Mike Christie Date: Fri Mar 10 16:03:23 2023 -0600 kernel: Allow a kernel thread's name to be set in copy_process This patch allows kernel users to pass in the thread name so it can be set during creation instead of having to use set_task_comm after the thread is created. Signed-off-by: Mike Christie Acked-by: Michael S. Tsirkin Signed-off-by: Christian Brauner (Microsoft) commit e0a98139c162af9601ffa8d6db88dbe745f64b3c Author: Mike Christie Date: Fri Mar 10 16:03:22 2023 -0600 csky: Remove kernel_thread declaration Remove csky's kernel_thread declaration because it's not needed. Signed-off-by: Mike Christie Acked-by: Michael S. Tsirkin Signed-off-by: Christian Brauner (Microsoft) commit 877a0e83c57fa5e2a7fd628ec2e1733ed70c8792 Author: Paul E. McKenney Date: Thu Feb 2 17:04:09 2023 -0800 torture: Enable clocksource watchdog with "tsc=watchdog" This commit tests the "tsc=watchdog" kernel boot parameter when running the clocksourcewd torture tests. Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng commit fdcf87a3dfbe19361ff128806a218a28da7689ad Author: Yue Hu Date: Tue Jan 17 13:53:10 2023 +0800 rcutorture: Eliminate variable n_rcu_torture_boost_rterror After commit 8b700983de82 ("sched: Remove sched_set_*() return value"), this variable is not used anymore. So eliminate it entirely. Signed-off-by: Yue Hu Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng commit 995495846f7403cd871b22b03b40bd7e24be07a3 Author: Paul E. McKenney Date: Fri Jan 13 21:23:46 2023 -0800 torture: Permit kvm-again.sh --duration to default to previous run Currently, invoking kvm-again.sh without a --duration argument results in a bash error message. This commit therefore adds quotes around the $dur argument to kvm-transform.sh to allow a default duration to be taken from the earlier run. Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng commit 236bdb881d9656194a2d9c78ee11dba39329a3b1 Author: Bhaskar Chowdhury Date: Tue Jan 10 16:46:34 2023 +0530 tools: rcu: Add usage function and check for argument This commit converts extract-stall.sh script's header comment to a usage() function, and adds an argument check. While in the area, make this script be executable. [ paulmck: Strength argument check, remove extraneous comment. ] Signed-off-by: Bhaskar Chowdhury Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng commit 7c3a8b48dc5452ec639293fd7796402d02213f58 Author: Paul E. McKenney Date: Mon Jan 9 21:26:11 2023 -0800 rcutorture: Make scenario TREE04 enable lazy call_rcu() This commit enables the RCU_LAZY Kconfig option in scenario TREE04 in order to provide some ongoing testing of this configuration. Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng commit 7ff0b54491791bdb99659e73c9851ac398c81416 Author: Paul E. McKenney Date: Mon Jan 9 21:01:12 2023 -0800 rcutorture: Set CONFIG_BOOTPARAM_HOTPLUG_CPU0 to offline CPU 0 There is now a BOOTPARAM_HOTPLUG_CPU0 Kconfig option that allows CPU 0 to be offlined on x86 systems. This commit therefore sets this option in the TREE01 rcutorture scenario in order to regularly test this capability. Reported-by: "Zhang, Qiang1" Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng commit 808a9d675969382c855acc304c288dfa713d3f9e Author: Paul E. McKenney Date: Mon Dec 19 11:21:09 2022 -0800 rcutorture: Add test_nmis module parameter This commit adds a test_nmis module parameter to generate the specified number of NMI stack backtraces 15 seconds apart. This module parameter can be used to test NMI delivery and accompanying diagnostics. Note that this parameter is ignored when rcutorture is a module rather than built into the kernel. This could be changed with the addition of an EXPORT_SYMBOL_GPL(). [ paulmck: Apply kernel test robot feedback. ] Signed-off-by: Paul E. McKenney Signed-off-by: Boqun Feng commit 7d4ae72edba715d8e2dbfb3851879d354d13a7b9 Merge: 5d1f9ac1e3b57 06b5e53c8b2b0 Author: Mark Brown Date: Sat Mar 11 21:15:24 2023 +0000 Add support for stacked/parallel memories Merge series from Amit Kumar Mahapatra : This patch is in the continuation to the discussions which happened on 'commit f89504300e94 ("spi: Stacked/parallel memories bindings")' for adding dt-binding support for stacked/parallel memories. This patch series updated the spi-nor, spi core and the spi drivers to add stacked and parallel memories support. The first patch https://lore.kernel.org/all/20230119185342.2093323-1-amit.kumar-mahapatra@amd.com/ of the previous series got applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next But the rest of the patches in the series did not get applied due to merge conflict, so send the remaining patches in the series after rebasing it on top of for-next branch. --- BRANCH: for-next Changes in v6: - Rebased on top of latest v6.3-rc1 and fixed merge conflicts in spi-mpc512x-psc.c, sfdp.c, spansion.c files and removed spi-omap-100k.c. - Updated spi_dev_check( ) to reject new devices if any one of the chipselect is used by another device. Changes in v5: - Rebased the patches on top of v6.3-rc1 and fixed the merge conflicts. - Fixed compilation warnings in spi-sh-msiof.c with shmobile_defconfig Changes in v4: - Fixed build error in spi-pl022.c file - reported by Mark. - Fixed build error in spi-sn-f-ospi.c file. - Added Reviewed-by: Serge Semin tag. - Added two more patches to replace spi->chip_select with API calls in mpc832x_rdb.c & cs35l41_hda_spi.c files. Changes in v3: - Rebased the patches on top of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next - Added a patch to convert spi_nor_otp_region_len(nor) & spi_nor_otp_n_regions(nor) macros into inline functions - Added Reviewed-by & Acked-by tags Changes in v2: - Rebased the patches on top of v6.2-rc1 - Created separate patch to add get & set APIs for spi->chip_select & spi->cs_gpiod, and replaced all spi->chip_select and spi->cs_gpiod references with the API calls. - Created separate patch to add get & set APIs for nor->params. --- Amit Kumar Mahapatra (15): spi: Replace all spi->chip_select and spi->cs_gpiod references with function call net: Replace all spi->chip_select and spi->cs_gpiod references with function call iio: imu: Replace all spi->chip_select and spi->cs_gpiod references with function call mtd: devices: Replace all spi->chip_select and spi->cs_gpiod references with function call staging: Replace all spi->chip_select and spi->cs_gpiod references with function call platform/x86: serial-multi-instantiate: Replace all spi->chip_select and spi->cs_gpiod references with function call powerpc/83xx/mpc832x_rdb: Replace all spi->chip_select references with function call ALSA: hda: cs35l41: Replace all spi->chip_select references with function call spi: Add stacked and parallel memories support in SPI core mtd: spi-nor: Convert macros with inline functions mtd: spi-nor: Add APIs to set/get nor->params mtd: spi-nor: Add stacked memories support in spi-nor spi: spi-zynqmp-gqspi: Add stacked memories support in GQSPI driver mtd: spi-nor: Add parallel memories support in spi-nor spi: spi-zynqmp-gqspi: Add parallel memories support in GQSPI driver arch/powerpc/platforms/83xx/mpc832x_rdb.c | 2 +- drivers/iio/imu/adis16400.c | 2 +- drivers/mtd/devices/mtd_dataflash.c | 2 +- drivers/mtd/spi-nor/atmel.c | 17 +- drivers/mtd/spi-nor/core.c | 665 +++++++++++++++--- drivers/mtd/spi-nor/core.h | 8 + drivers/mtd/spi-nor/debugfs.c | 4 +- drivers/mtd/spi-nor/gigadevice.c | 4 +- drivers/mtd/spi-nor/issi.c | 11 +- drivers/mtd/spi-nor/macronix.c | 6 +- drivers/mtd/spi-nor/micron-st.c | 39 +- drivers/mtd/spi-nor/otp.c | 48 +- drivers/mtd/spi-nor/sfdp.c | 29 +- drivers/mtd/spi-nor/spansion.c | 50 +- drivers/mtd/spi-nor/sst.c | 7 +- drivers/mtd/spi-nor/swp.c | 22 +- drivers/mtd/spi-nor/winbond.c | 10 +- drivers/mtd/spi-nor/xilinx.c | 18 +- drivers/net/ethernet/adi/adin1110.c | 2 +- drivers/net/ethernet/asix/ax88796c_main.c | 2 +- drivers/net/ethernet/davicom/dm9051.c | 2 +- drivers/net/ethernet/qualcomm/qca_debug.c | 2 +- drivers/net/ieee802154/ca8210.c | 2 +- drivers/net/wan/slic_ds26522.c | 2 +- .../net/wireless/marvell/libertas/if_spi.c | 2 +- drivers/net/wireless/silabs/wfx/bus_spi.c | 2 +- drivers/net/wireless/st/cw1200/cw1200_spi.c | 2 +- .../platform/x86/serial-multi-instantiate.c | 3 +- drivers/spi/spi-altera-core.c | 2 +- drivers/spi/spi-amd.c | 4 +- drivers/spi/spi-ar934x.c | 2 +- drivers/spi/spi-armada-3700.c | 4 +- drivers/spi/spi-aspeed-smc.c | 13 +- drivers/spi/spi-at91-usart.c | 2 +- drivers/spi/spi-ath79.c | 4 +- drivers/spi/spi-atmel.c | 26 +- drivers/spi/spi-au1550.c | 4 +- drivers/spi/spi-axi-spi-engine.c | 2 +- drivers/spi/spi-bcm-qspi.c | 10 +- drivers/spi/spi-bcm2835.c | 19 +- drivers/spi/spi-bcm2835aux.c | 4 +- drivers/spi/spi-bcm63xx-hsspi.c | 30 +- drivers/spi/spi-bcm63xx.c | 2 +- drivers/spi/spi-bcmbca-hsspi.c | 30 +- drivers/spi/spi-cadence-quadspi.c | 5 +- drivers/spi/spi-cadence-xspi.c | 4 +- drivers/spi/spi-cadence.c | 4 +- drivers/spi/spi-cavium.c | 8 +- drivers/spi/spi-coldfire-qspi.c | 8 +- drivers/spi/spi-davinci.c | 18 +- drivers/spi/spi-dln2.c | 6 +- drivers/spi/spi-dw-core.c | 2 +- drivers/spi/spi-dw-mmio.c | 4 +- drivers/spi/spi-falcon.c | 2 +- drivers/spi/spi-fsi.c | 2 +- drivers/spi/spi-fsl-dspi.c | 16 +- drivers/spi/spi-fsl-espi.c | 6 +- drivers/spi/spi-fsl-lpspi.c | 2 +- drivers/spi/spi-fsl-qspi.c | 6 +- drivers/spi/spi-fsl-spi.c | 2 +- drivers/spi/spi-geni-qcom.c | 6 +- drivers/spi/spi-gpio.c | 4 +- drivers/spi/spi-gxp.c | 4 +- drivers/spi/spi-hisi-sfc-v3xx.c | 2 +- drivers/spi/spi-img-spfi.c | 14 +- drivers/spi/spi-imx.c | 30 +- drivers/spi/spi-ingenic.c | 4 +- drivers/spi/spi-intel.c | 2 +- drivers/spi/spi-jcore.c | 4 +- drivers/spi/spi-lantiq-ssc.c | 6 +- drivers/spi/spi-mem.c | 4 +- drivers/spi/spi-meson-spicc.c | 2 +- drivers/spi/spi-microchip-core.c | 6 +- drivers/spi/spi-mpc512x-psc.c | 8 +- drivers/spi/spi-mpc52xx.c | 2 +- drivers/spi/spi-mt65xx.c | 6 +- drivers/spi/spi-mt7621.c | 2 +- drivers/spi/spi-mux.c | 8 +- drivers/spi/spi-mxic.c | 10 +- drivers/spi/spi-mxs.c | 2 +- drivers/spi/spi-npcm-fiu.c | 20 +- drivers/spi/spi-nxp-fspi.c | 10 +- drivers/spi/spi-omap-uwire.c | 8 +- drivers/spi/spi-omap2-mcspi.c | 24 +- drivers/spi/spi-orion.c | 4 +- drivers/spi/spi-pci1xxxx.c | 4 +- drivers/spi/spi-pic32-sqi.c | 2 +- drivers/spi/spi-pic32.c | 4 +- drivers/spi/spi-pl022.c | 4 +- drivers/spi/spi-pxa2xx.c | 6 +- drivers/spi/spi-qcom-qspi.c | 2 +- drivers/spi/spi-rb4xx.c | 2 +- drivers/spi/spi-rockchip-sfc.c | 2 +- drivers/spi/spi-rockchip.c | 26 +- drivers/spi/spi-rspi.c | 10 +- drivers/spi/spi-s3c64xx.c | 2 +- drivers/spi/spi-sc18is602.c | 4 +- drivers/spi/spi-sh-msiof.c | 6 +- drivers/spi/spi-sh-sci.c | 2 +- drivers/spi/spi-sifive.c | 6 +- drivers/spi/spi-sn-f-ospi.c | 2 +- drivers/spi/spi-st-ssc4.c | 2 +- drivers/spi/spi-stm32-qspi.c | 12 +- drivers/spi/spi-sun4i.c | 2 +- drivers/spi/spi-sun6i.c | 2 +- drivers/spi/spi-synquacer.c | 6 +- drivers/spi/spi-tegra114.c | 28 +- drivers/spi/spi-tegra20-sflash.c | 2 +- drivers/spi/spi-tegra20-slink.c | 6 +- drivers/spi/spi-tegra210-quad.c | 8 +- drivers/spi/spi-ti-qspi.c | 16 +- drivers/spi/spi-topcliff-pch.c | 4 +- drivers/spi/spi-wpcm-fiu.c | 12 +- drivers/spi/spi-xcomm.c | 2 +- drivers/spi/spi-xilinx.c | 6 +- drivers/spi/spi-xlp.c | 4 +- drivers/spi/spi-zynq-qspi.c | 2 +- drivers/spi/spi-zynqmp-gqspi.c | 58 +- drivers/spi/spi.c | 225 ++++-- drivers/spi/spidev.c | 6 +- drivers/staging/fbtft/fbtft-core.c | 2 +- drivers/staging/greybus/spilib.c | 2 +- include/linux/mtd/spi-nor.h | 18 +- include/linux/spi/spi.h | 34 +- include/trace/events/spi.h | 10 +- sound/pci/hda/cs35l41_hda_spi.c | 2 +- 126 files changed, 1350 insertions(+), 615 deletions(-) -- 2.25.1 commit 8dec88070d964bfeb4198f34cb5956d89dd1f557 Author: Marco Elver Date: Thu Mar 9 11:17:52 2023 +0100 kcsan: Avoid READ_ONCE() in read_instrumented_memory() Haibo Li reported: | Unable to handle kernel paging request at virtual address | ffffff802a0d8d7171 | Mem abort info:o: | ESR = 0x9600002121 | EC = 0x25: DABT (current EL), IL = 32 bitsts | SET = 0, FnV = 0 0 | EA = 0, S1PTW = 0 0 | FSC = 0x21: alignment fault | Data abort info:o: | ISV = 0, ISS = 0x0000002121 | CM = 0, WnR = 0 0 | swapper pgtable: 4k pages, 39-bit VAs, pgdp=000000002835200000 | [ffffff802a0d8d71] pgd=180000005fbf9003, p4d=180000005fbf9003, | pud=180000005fbf9003, pmd=180000005fbe8003, pte=006800002a0d8707 | Internal error: Oops: 96000021 [#1] PREEMPT SMP | Modules linked in: | CPU: 2 PID: 45 Comm: kworker/u8:2 Not tainted | 5.15.78-android13-8-g63561175bbda-dirty #1 | ... | pc : kcsan_setup_watchpoint+0x26c/0x6bc | lr : kcsan_setup_watchpoint+0x88/0x6bc | sp : ffffffc00ab4b7f0 | x29: ffffffc00ab4b800 x28: ffffff80294fe588 x27: 0000000000000001 | x26: 0000000000000019 x25: 0000000000000001 x24: ffffff80294fdb80 | x23: 0000000000000000 x22: ffffffc00a70fb68 x21: ffffff802a0d8d71 | x20: 0000000000000002 x19: 0000000000000000 x18: ffffffc00a9bd060 | x17: 0000000000000001 x16: 0000000000000000 x15: ffffffc00a59f000 | x14: 0000000000000001 x13: 0000000000000000 x12: ffffffc00a70faa0 | x11: 00000000aaaaaaab x10: 0000000000000054 x9 : ffffffc00839adf8 | x8 : ffffffc009b4cf00 x7 : 0000000000000000 x6 : 0000000000000007 | x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffffffc00a70fb70 | x2 : 0005ff802a0d8d71 x1 : 0000000000000000 x0 : 0000000000000000 | Call trace: | kcsan_setup_watchpoint+0x26c/0x6bc | __tsan_read2+0x1f0/0x234 | inflate_fast+0x498/0x750 | zlib_inflate+0x1304/0x2384 | __gunzip+0x3a0/0x45c | gunzip+0x20/0x30 | unpack_to_rootfs+0x2a8/0x3fc | do_populate_rootfs+0xe8/0x11c | async_run_entry_fn+0x58/0x1bc | process_one_work+0x3ec/0x738 | worker_thread+0x4c4/0x838 | kthread+0x20c/0x258 | ret_from_fork+0x10/0x20 | Code: b8bfc2a8 2a0803f7 14000007 d503249f (78bfc2a8) ) | ---[ end trace 613a943cb0a572b6 ]----- The reason for this is that on certain arm64 configuration since e35123d83ee3 ("arm64: lto: Strengthen READ_ONCE() to acquire when CONFIG_LTO=y"), READ_ONCE() may be promoted to a full atomic acquire instruction which cannot be used on unaligned addresses. Fix it by avoiding READ_ONCE() in read_instrumented_memory(), and simply forcing the compiler to do the required access by casting to the appropriate volatile type. In terms of generated code this currently only affects architectures that do not use the default READ_ONCE() implementation. The only downside is that we are not guaranteed atomicity of the access itself, although on most architectures a plain load up to machine word size should still be atomic (a fact the default READ_ONCE() still relies on itself). Reported-by: Haibo Li Tested-by: Haibo Li Cc: # 5.17+ Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 7cdae9e9ee5e29104010225007ee7a2f32ccdea8 Author: Lucas De Marchi Date: Mon Mar 6 12:49:53 2023 -0800 drm/i915: Move DG2 tuning to the right function Use gt_tuning_settings() for the recommended tunings rather than the one for workarounds. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230306204954.753739-2-lucas.demarchi@intel.com commit d1b3657fb5b66a40b4963f72834b193d18d0a98d Author: Lucas De Marchi Date: Mon Mar 6 12:49:52 2023 -0800 drm/i915: Remove redundant check for DG1 dg1_gt_workarounds_init() is only ever called for DG1, so there is no point checking it again. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230306204954.753739-1-lucas.demarchi@intel.com commit 5d1f9ac1e3b57b3a8d7cf317153cc5d8600be33a Author: Andi Shyti Date: Sat Mar 11 18:05:16 2023 +0100 MAINTAINERS: update Andi's e-mail to @kernel.org Use the kernel.org e-mail for the maintainer entry Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20230311170516.178913-1-andi.shyti@kernel.org Signed-off-by: Mark Brown commit 41be03c8a9d23c921145631f56be468a1452822e Author: Bernhard Rosenkränzer Date: Thu Mar 9 22:35:00 2023 +0100 dt-bindings: serial: mediatek,uart: add MT8365 Add binding description for mediatek,mt8365-uart Signed-off-by: Bernhard Rosenkränzer Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230309213501.794764-3-bero@baylibre.com Signed-off-by: Rob Herring commit 0558891ce1433a00f93fbd14c9c5583b32009ccc Author: Bernhard Rosenkränzer Date: Thu Mar 9 22:34:59 2023 +0100 dt-bindings: irq: mtk, sysirq: add support for mt8365 Add binding documentation of mediatek,sysirq for mt8365 SoC. Signed-off-by: Bernhard Rosenkränzer Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20230309213501.794764-2-bero@baylibre.com Signed-off-by: Rob Herring commit 666cac91ae47c86c7a76fec39771123a92825134 Author: William Breathitt Gray Date: Fri Mar 10 19:24:34 2023 -0500 iio: dac: cio-dac: Fix typo in comment listing supported devices This driver supports the CIO-DAC08 device and not "CIO-DAC06". Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/20230311002434.8761-1-william.gray@linaro.org Signed-off-by: Jonathan Cameron commit 06b5e53c8b2b016e06a53ab6f01006ca7bbfa5df Author: Amit Kumar Mahapatra Date: Fri Mar 10 23:02:10 2023 +0530 ALSA: hda: cs35l41: Replace all spi->chip_select references with function call Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select & spi->cs_gpiod and replaced all spi->chip_select and spi->cs_gpiod references with get or set API calls. While adding multi-cs support in further patches the chip_select & cs_gpiod members of the spi_device structure would be converted to arrays & the "idx" parameter of the APIs would be used as array index i.e., spi->chip_select[idx] & spi->cs_gpiod[idx] respectively. Signed-off-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20230310173217.3429788-9-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown commit 3aba06a9fee04f6fefa9df71d3ee27dd4c464ad5 Author: Amit Kumar Mahapatra Date: Fri Mar 10 23:02:09 2023 +0530 powerpc/83xx/mpc832x_rdb: Replace all spi->chip_select references with function call Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select & spi->cs_gpiod and replaced all spi->chip_select and spi->cs_gpiod references with get or set API calls. While adding multi-cs support in further patches the chip_select & cs_gpiod members of the spi_device structure would be converted to arrays & the "idx" parameter of the APIs would be used as array index i.e., spi->chip_select[idx] & spi->cs_gpiod[idx] respectively. Signed-off-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20230310173217.3429788-8-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown commit e20451f44ca33ec40422e9868775e117ef2da935 Author: Amit Kumar Mahapatra via Alsa-devel Date: Fri Mar 10 23:02:08 2023 +0530 platform/x86: serial-multi-instantiate: Replace all spi->chip_select and spi->cs_gpiod references with function call Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select & spi->cs_gpiod and replaced all spi->chip_select and spi->cs_gpiod references with get or set API calls. While adding multi-cs support in further patches the chip_select & cs_gpiod members of the spi_device structure would be converted to arrays & the "idx" parameter of the APIs would be used as array index i.e., spi->chip_select[idx] & spi->cs_gpiod[idx] respectively. Signed-off-by: Amit Kumar Mahapatra Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/167847071718.26.8731852393143680608@mailman-core.alsa-project.org Signed-off-by: Mark Brown commit caa9d3475b1c5566f0272273c147cc9b72f2be28 Author: Amit Kumar Mahapatra Date: Fri Mar 10 23:02:07 2023 +0530 staging: Replace all spi->chip_select and spi->cs_gpiod references with function call Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select & spi->cs_gpiod and replaced all spi->chip_select and spi->cs_gpiod references with get or set API calls. While adding multi-cs support in further patches the chip_select & cs_gpiod members of the spi_device structure would be converted to arrays & the "idx" parameter of the APIs would be used as array index i.e., spi->chip_select[idx] & spi->cs_gpiod[idx] respectively. Signed-off-by: Amit Kumar Mahapatra Reviewed-by: Greg Kroah-Hartman Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/20230310173217.3429788-6-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown commit 0817bcef53e4e3df23c023eddaa2b35b7288400e Author: Amit Kumar Mahapatra via Alsa-devel Date: Fri Mar 10 23:02:06 2023 +0530 mtd: devices: Replace all spi->chip_select and spi->cs_gpiod references with function call Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select & spi->cs_gpiod and replaced all spi->chip_select and spi->cs_gpiod references with get or set API calls. While adding multi-cs support in further patches the chip_select & cs_gpiod members of the spi_device structure would be converted to arrays & the "idx" parameter of the APIs would be used as array index i.e., spi->chip_select[idx] & spi->cs_gpiod[idx] respectively. Signed-off-by: Amit Kumar Mahapatra Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/167847071245.26.7777775616228465939@mailman-core.alsa-project.org Signed-off-by: Mark Brown commit 0183f81fce154ae1d4df2bb28d22ad6612317148 Author: Amit Kumar Mahapatra Date: Fri Mar 10 23:02:05 2023 +0530 iio: imu: Replace all spi->chip_select and spi->cs_gpiod references with function call Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select & spi->cs_gpiod and replaced all spi->chip_select and spi->cs_gpiod references with get or set API calls. While adding multi-cs support in further patches the chip_select & cs_gpiod members of the spi_device structure would be converted to arrays & the "idx" parameter of the APIs would be used as array index i.e., spi->chip_select[idx] & spi->cs_gpiod[idx] respectively. Signed-off-by: Amit Kumar Mahapatra Acked-by: Jonathan Cameron Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/20230310173217.3429788-4-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown commit 25fd0550d9b9c92288a17fb7d605cdcdb4a65a64 Author: Amit Kumar Mahapatra Date: Fri Mar 10 23:02:04 2023 +0530 net: Replace all spi->chip_select and spi->cs_gpiod references with function call Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select & spi->cs_gpiod and replaced all spi->chip_select and spi->cs_gpiod references with get or set API calls. While adding multi-cs support in further patches the chip_select & cs_gpiod members of the spi_device structure would be converted to arrays & the "idx" parameter of the APIs would be used as array index i.e., spi->chip_select[idx] & spi->cs_gpiod[idx] respectively. Signed-off-by: Amit Kumar Mahapatra Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/20230310173217.3429788-3-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown commit 9e264f3f85a56cc109cc2d6010a48aa89d5c1ff1 Author: Amit Kumar Mahapatra via Alsa-devel Date: Fri Mar 10 23:02:03 2023 +0530 spi: Replace all spi->chip_select and spi->cs_gpiod references with function call Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select & spi->cs_gpiod and replaced all spi->chip_select and spi->cs_gpiod references with get or set API calls. While adding multi-cs support in further patches the chip_select & cs_gpiod members of the spi_device structure would be converted to arrays & the "idx" parameter of the APIs would be used as array index i.e., spi->chip_select[idx] & spi->cs_gpiod[idx] respectively. Signed-off-by: Amit Kumar Mahapatra Acked-by: Heiko Stuebner # Rockchip drivers Reviewed-by: Michal Simek Reviewed-by: Cédric Le Goater # Aspeed driver Reviewed-by: Dhruva Gole # SPI Cadence QSPI Reviewed-by: Patrice Chotard # spi-stm32-qspi Acked-by: William Zhang # bcm63xx-hsspi driver Reviewed-by: Serge Semin # DW SSI part Link: https://lore.kernel.org/r/167847070432.26.15076794204368669839@mailman-core.alsa-project.org Signed-off-by: Mark Brown commit 42d35bf6c37b9445fa39f995466d716add4b70b9 Author: Krzysztof Kozlowski Date: Sat Mar 11 12:14:54 2023 +0100 iio: adc: rcar-gyroadc: mark OF related data as maybe unused The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/iio/adc/rcar-gyroadc.c:286:34: error: ‘rcar_gyroadc_child_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230311111457.251475-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron commit 2d2998b84330899bf88a0414f3356869be4a69eb Author: Rob Herring Date: Fri Mar 10 08:47:32 2023 -0600 ASoC: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144733.1546413-1-robh@kernel.org Signed-off-by: Mark Brown commit 1e108e60a44a924e3666fa2a10b53f6c31522856 Author: Rob Herring Date: Fri Mar 10 08:47:31 2023 -0600 ASoC: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144732.1546328-1-robh@kernel.org Signed-off-by: Mark Brown commit e94230755641d4832f28b7997755dbf0acac7b54 Author: Marco Felsch Date: Tue Feb 28 10:05:18 2023 +0100 iio: temperature: tmp117: cosmetic alignment cleanup Align the code correctly if possible and align the channel bit mask to make it easier to read. Signed-off-by: Marco Felsch Link: https://lore.kernel.org/r/20230228090518.529811-6-m.felsch@pengutronix.de Signed-off-by: Jonathan Cameron commit 0cd2889dc1fed57a2975521d951e1bc91088229c Author: Marco Felsch Date: Tue Feb 28 10:05:17 2023 +0100 iio: temperature: tmp117: add TI TMP116 support The TMP116 is the predecessor of the TMP117. The TMP116 don't support custom offset calibration data, instead this register is used as generic EEPROM storage as well. Signed-off-by: Marco Felsch Link: https://lore.kernel.org/r/20230228090518.529811-5-m.felsch@pengutronix.de Signed-off-by: Jonathan Cameron commit 9225efe0806d08494e63eeecebad0b61c66d27dc Author: Marco Felsch Date: Tue Feb 28 10:05:16 2023 +0100 dt-bindings: iio: ti,tmp117: add binding for the TMP116 The TMP116 is the predecessor of the TMP117. Signed-off-by: Marco Felsch Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230228090518.529811-4-m.felsch@pengutronix.de Signed-off-by: Jonathan Cameron commit 07cc68996d8e83f7f1caccdc588757f6df57861a Author: Marco Felsch Date: Tue Feb 28 10:05:15 2023 +0100 iio: temperature: tmp117: improve fallback capabilities Don't error if the device-id found don't match the device-id for the TMP117 sensor since other TMPxxx might be compatible to the TMP117. The fallback mechanism tries to gather the required information from the of_device_id or from the i2c_client information. The commit also prepares the driver for adding new devices more easily by making use of switch-case at the relevant parts. Signed-off-by: Marco Felsch Link: https://lore.kernel.org/r/20230228090518.529811-3-m.felsch@pengutronix.de Signed-off-by: Jonathan Cameron commit 70ed9ced1f415b4f68bfdfffc7240a79bca8e045 Author: Marco Felsch Date: Tue Feb 28 10:05:14 2023 +0100 dt-bindings: iio: ti,tmp117: fix documentation link Fix the broken link to point to the correct homepage. Fixes: 5e713b25d137 ("dt-bindings: iio: temperature: Add DT bindings for TMP117") Signed-off-by: Marco Felsch Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230228090518.529811-2-m.felsch@pengutronix.de Signed-off-by: Jonathan Cameron commit f700e55ef6ef9ec723164659ed4385900981c872 Author: Mehdi Djait Date: Thu Mar 2 14:04:36 2023 +0100 iio: Rename iio_trigger_poll_chained and add kernel-doc Rename the function to iio_trigger_poll_nested. Add kernel-doc with a note on the context where the function is expected to be called. Signed-off-by: Mehdi Djait Link: https://lore.kernel.org/r/841b533cba28ca25a8e87280c44e45979166e8e2.1677761379.git.mehdi.djait.k@gmail.com Signed-off-by: Jonathan Cameron commit 4ad682e04c1694aba95627f60e89f83178c277c2 Author: Mehdi Djait Date: Thu Mar 2 14:04:35 2023 +0100 iio: Improve the kernel-doc of iio_trigger_poll Move the kernel-doc of the function to industrialio-trigger.c Add a note on the context where the function is expected to be called. Signed-off-by: Mehdi Djait Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/bd84fc17e9d22eab998bf48720297f9a77689f45.1677761379.git.mehdi.djait.k@gmail.com Signed-off-by: Jonathan Cameron commit db3c490503bee4d0611f9fc17fcd8cfe6fcdbcad Author: Lorenzo Bianconi Date: Mon Feb 27 12:14:56 2023 +0100 iio: imu: st_lsm6dsx: discard samples during filters settling time During digital filters settling time the driver is expected to drop samples since they can be corrupted. Introduce the capability to drop a given number of samples according to the configured ODR. Add sample_to_discard for LSM6DSM-like sensors since new generation devices (e.g. LSM6DSO) support DRDY mask where corrupted samples are masked in hw with values greather than 0x7ffd so the driver can easily discard them. I have not added sample_to_discard support for LSM6DS3 or LSM6DS3H since I do not have any sample for testing at the moment. Reported-by: Philippe De Muyter Tested-by: Philippe De Muyter Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/21dcd94935c147ef9b1da4984b3da6264ee9609e.1677496295.git.lorenzo@kernel.org Signed-off-by: Jonathan Cameron commit accb9d05df394c38db2a1bab416ee25d6078ca5c Author: Angel Iglesias Date: Sun Feb 19 18:03:06 2023 +0100 iio: pressure: bmp280: Add nvmem operations for BMP580 The pressure sensor BMP580 contains a non-volatile memory that stores trimming and configuration params. That memory provides an programmable user range of three 2-byte words. Signed-off-by: Angel Iglesias Link: https://lore.kernel.org/r/f3f453d9b2c0f7820ca9c56e24e2165b6c39bb67.1676823250.git.ang.iglesiasg@gmail.com Signed-off-by: Jonathan Cameron commit 43cce95ca1396c9678c7ef8a5c065005c9fc1f11 Author: Angel Iglesias Date: Sun Feb 19 18:03:05 2023 +0100 dt-bindings: iio: pressure: bmp085: Add BMP580 compatible string Add bosch,bmp580 to compatible string for the new family of sensors. This family includes the BMP580 and BMP581 sensors. The register map in this family presents significant departures from previous generations. Signed-off-by: Angel Iglesias Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/2510dccfd44e2225c5978bfdf4136f423326c31a.1676823250.git.ang.iglesiasg@gmail.com Signed-off-by: Jonathan Cameron commit 597dfb2af052f175cdd5caa7b62095c7de1ba29e Author: Angel Iglesias Date: Sun Feb 19 18:03:04 2023 +0100 iio: pressure: bmp280: Add support for new sensor BMP580 Adds compatibility with the new sensor generation, the BMP580. The measurement and initialization codepaths are adapted from the device datasheet and the repository from manufacturer at https://github.com/boschsensortec/BMP5-Sensor-API. Signed-off-by: Angel Iglesias Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/f899fceec9b48bc173bd4b7555f0a237fa32d520.1676823250.git.ang.iglesiasg@gmail.com Signed-off-by: Jonathan Cameron commit 42cde8808573b44e395ee8b3e22f05104afa2e74 Author: Angel Iglesias Date: Sun Feb 19 18:03:03 2023 +0100 iio: pressure: Kconfig: Delete misleading I2C reference on bmp280 title Title entry for BMP280 called the driver an I2C implementation, when the driver supports both I2C and SPI. Signed-off-by: Angel Iglesias Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/d26fe292164ca80685f080101122b5beb564d7db.1676823250.git.ang.iglesiasg@gmail.com Signed-off-by: Jonathan Cameron commit 4d545f9649253a7defda89b44a6a2a2b1b377d9d Author: Angel Iglesias Date: Sun Feb 19 17:58:01 2023 +0100 iio: pressure: bmp280: Make read calibration callback optional Newer models do not require read the calibration parameters and apply the compensation algorithms in the sensor. Suggested-by: Jonathan Cameron Signed-off-by: Angel Iglesias Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/bb1b95ab3f4e71d3c76543370325c5c9aaa07add.1676823250.git.ang.iglesiasg@gmail.com Signed-off-by: Jonathan Cameron commit c25ea00fefa4e57a63209769fa3e4903791d05af Author: Angel Iglesias Date: Sun Feb 19 17:58:00 2023 +0100 iio: pressure: bmp280: Add preinit callback Adds preinit callback to execute operations on probe before applying initial configuration. Signed-off-by: Angel Iglesias Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/fa9513ffad37a6a43b6d46df9d8319ccab6f5870.1676823250.git.ang.iglesiasg@gmail.com Signed-off-by: Jonathan Cameron commit 0b0b772637cd7f35c15830bbb8e8ec66d6c34ddd Author: Angel Iglesias Date: Sun Feb 19 17:57:59 2023 +0100 iio: pressure: bmp280: Use chip_info pointers for each chip as driver data Refactor driver I2C and SPI implementations using pointers for each variant's chip_info as the driver data. Adds the regmap configuration to the chip_info struct. Suggested-by: Andy Shevchenko Suggested-by: Jonathan Cameron Signed-off-by: Angel Iglesias Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/a48cfa756be48d61dbf656c65daff6e9a1290e6f.1676823250.git.ang.iglesiasg@gmail.com Signed-off-by: Jonathan Cameron commit 4ab8bef1eaa534d3669852f2fe22e0f1c86c1426 Author: Uwe Kleine-König Date: Sun Feb 19 21:44:39 2023 +0100 iio: adc: meson_saradc: Better handle BL30 not releasing the hardware meson_sar_adc_lock() might return an error if BL30 doesn't release its lock on the hardware. Just returning early from .remove() is wrong however as this keeps the clocks and regulators on which is never cleaned up later. Given the BL30 not giving up its lock is a strong hint for broken behaviour, and there is nothing we can do about that: Just clean up ignoring the fact that we're not holding the lock. Signed-off-by: Uwe Kleine-König Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230219204439.1641640-1-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron commit c286b0472ca8d76092c1f4fb782c6745b26e74f6 Author: Aidan MacDonald Date: Fri Feb 17 15:34:04 2023 +0000 iio: adc: axp20x_adc: Replace adc_en2 flag with adc_en2_mask field The adc_en2 flag is essentially specific to axp20x-compatible devices because it hardcodes register values. Replace it with a mask field so the register value can be specified in device match data. Reviewed-by: Andy Shevchenko Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20230217153404.32481-2-aidanmacdonald.0x0@gmail.com Signed-off-by: Jonathan Cameron commit 8957e5344353e9cd3f6b1e3004942e35449fa0e8 Author: Aidan MacDonald Date: Fri Feb 17 15:34:03 2023 +0000 iio: adc: axp20x_adc: Minor code cleanups The code may be clearer if parameters are not re-purposed to hold temporary results like register values, so introduce local variables as necessary to avoid that. Regroup macros based on chip type, and use the FIELD_PREP() macro instead of a hand-rolled version. Suggested-by: Jonathan Cameron Reviewed-by: Chen-Yu Tsai Reviewed-by: Andy Shevchenko Signed-off-by: Aidan MacDonald Link: https://lore.kernel.org/r/20230217153404.32481-1-aidanmacdonald.0x0@gmail.com Signed-off-by: Jonathan Cameron commit e2b39db176d9d6420669aed477c949e8895d062b Author: Nuno Sá Date: Mon Feb 13 16:32:08 2023 +0100 iio: imu: adis16475: correct copy paste mistake in comment block The minimal advised lower rate for adis16475 compatible devices is 1900HZ and not 4000HZ. Set that right in the comments so that it does not generate any confusion. Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20230213153208.1027602-1-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit e522a6f7cbeb0cdb672f3f3ed88dd1ed930a76d2 Author: Gwendal Grignou Date: Fri Feb 10 16:24:21 2023 -0800 iio: proximity: sx_common: Add old register mapping Older firmwares still send sensor configuration using a list of registers with opaque values defined during sensor tuning. sx9234 and sx9360 sensor on ACPI based devices are concerned. More schema to configure the sensors will be needed to support devices designed for windows, like Samsung Galaxy Book2. Support schema is: "<_HID>.". For instance "STH9324,reg_adv_ctrl2" in: Scope (\_SB.PCI0.I2C2) { Device (SX28) { Name (_HID, "STH9324") // _HID: Hardware ID ... Name (_DSD, Package (0x02) // _DSD: Device-Specific Data { ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */, Package (0x3F) { ... Package (0x02) { "STH9324,reg_adv_ctrl2", Zero },` Signed-off-by: Gwendal Grignou Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20230211002421.3447060-1-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit 6d5f85de2d610d652ab7e90fea19a85c58b8df04 Author: Jonathan Cameron Date: Sun Jan 29 16:08:05 2023 +0000 staging: iio: meter: Drop ade7854 driver This driver is so far from making correct use of the IIO infrastructure and ABI that if someone wanted to make the driver suitable for moving out of staging, they would more or less be starting from scratch. As such there is little point in keeping the existing code in staging. Note this was only user of the meter.h header so that is dropped. There are no other drivers in the staging/iio/meter directory so drop the build system files as well. Signed-off-by: Jonathan Cameron Acked-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20230129160805.747745-1-jic23@kernel.org commit f22ed8d9e804e403b204d1926138490d6ad35ed2 Author: Jonathan Cameron Date: Sat Jan 14 17:29:28 2023 +0000 iio: proximity: sx_common: Drop documentation of non existent struct element. struct sx_common_data doesn't have a num_default_regs element so drop the documentation for it. Signed-off-by: Jonathan Cameron Cc: Gwendal Grignou Cc: Stephen Boyd Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20230114172928.80414-1-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 390738596ccf565047f1db0c3c17753018da5196 Author: Antoniu Miclaus Date: Thu Nov 17 11:01:30 2022 +0200 drivers: iio: dac: ad5592r: add gpio_chip names Add array of explicit gpio names for the `gpiochip` structure of ad5592r, mainly for debug purposes. Since the gpios are configurable via the dts, generic names are used. Signed-off-by: Antoniu Miclaus Link: https://lore.kernel.org/r/20221117090130.51702-1-antoniu.miclaus@analog.com Signed-off-by: Jonathan Cameron commit cd62d4f39a0de0c2936ecaae938ba444d77c902a Author: Geert Uytterhoeven Date: Mon Oct 24 13:34:15 2022 +0200 dt-bindings: iio: adc: renesas,rcar-gyroadc: Miscellaneous improvements Set limits on the number of power-domains and resets, and make them required. Simplify the example, and update it to match reality: - Convert from obsolete MSTP to CPG/MSSR bindings, - Examples should use #{address,size}-cells = <1>, - Add missing resets property, - Drop soc container and pinctrl properties, which are not needed in examples. Signed-off-by: Geert Uytterhoeven Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/7b7a13680fa24282c3407e12b5943a66a2ed9068.1666611184.git.geert+renesas@glider.be Signed-off-by: Jonathan Cameron commit e932fb64c017dccbee44b7ee781584dbc65449ed Author: Mehdi Djait Date: Sun Jan 29 14:37:46 2023 +0100 iio: accel: kionix-kx022a: Remove the unused member g_range The g_range member of the driver data struct is not used and should therefore be removed. Signed-off-by: Mehdi Djait Reviewed-by: Matti Vaittinen Link: https://lore.kernel.org/r/e884d53fed0d8322d8be1de2593d4f5f8975af9c.1674996464.git.mehdi.djait.k@gmail.com Signed-off-by: Jonathan Cameron commit 8b6f18a0e20daee13be77970acf410a7fda6d0b8 Author: Jonathan Neuschäfer Date: Sun Jan 29 14:20:20 2023 +0100 iio: chemical: sps030: Reformat comment in a more readable way It's easier to see the (lack of) difference between the lines when they are visually aligned. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20230129132020.1352368-1-j.neuschaefer@gmx.net Signed-off-by: Jonathan Cameron commit 03adaa404a2c8f9ae0528eb963e86a962a3a2f39 Author: Rob Herring Date: Fri Mar 10 08:47:36 2023 -0600 spi: omap2-mcspi: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144736.1547110-1-robh@kernel.org Signed-off-by: Mark Brown commit bae4ae831a43a1e695bdb6c242bad2454519cb2a Author: Arnd Bergmann Date: Fri Mar 10 15:05:37 2023 +0100 spi: fsi: restore CONFIG_FSI dependency The assumption that the build dependency was not necessary turned out to be wrong, as building SPI_FSI without FSI results in a link failure: aarch64-linux-ld: drivers/spi/spi-fsi.o: in function `fsi_spi_check_status': spi-fsi.c:(.text+0x54): undefined reference to `fsi_device_read' aarch64-linux-ld: drivers/spi/spi-fsi.o: in function `fsi_spi_read_reg': spi-fsi.c:(.text+0x120): undefined reference to `fsi_device_write' aarch64-linux-ld: spi-fsi.c:(.text+0x170): undefined reference to `fsi_device_read' Fixes: f916c7080d28 ("spi: fsi: Make available for build test") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230310140605.569363-1-arnd@kernel.org Signed-off-by: Mark Brown commit 5bd73a162bc881dbb98ff9909dd865286852ee2b Author: Rob Herring Date: Fri Mar 10 08:47:22 2023 -0600 regulator: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144722.1544843-1-robh@kernel.org Signed-off-by: Mark Brown commit 7dda20c97fac52948b948e15e1173ee57c66ed35 Author: Rob Herring Date: Fri Mar 10 08:47:21 2023 -0600 regulator: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230310144721.1544756-1-robh@kernel.org Signed-off-by: Mark Brown commit 82e46bf71780940a5e060fcb02397ecf7f55e768 Author: Rob Herring Date: Fri Mar 10 08:47:25 2023 -0600 soc: ti: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to of_property_read_bool(). Signed-off-by: Rob Herring Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20230310144726.1545453-1-robh@kernel.org commit 1b1b863a8898ad8348b7dfe812cab26cea9099bf Author: Rob Herring Date: Fri Mar 10 08:47:25 2023 -0600 soc: ti: Use of_property_present() for testing DT property presence It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20230310144725.1545384-1-robh@kernel.org commit 95b744508d4d5135ae2a096ff3f0ee882bcc52b3 Author: Muhammad Usama Anjum Date: Fri Mar 10 03:52:05 2023 +0500 qede: remove linux/version.h and linux/compiler.h make versioncheck reports the following: ./drivers/net/ethernet/qlogic/qede/qede.h: 10 linux/version.h not needed. ./drivers/net/ethernet/qlogic/qede/qede_ethtool.c: 7 linux/version.h not needed. So remove linux/version.h from both of these files. Also remove linux/compiler.h while at it as it is also not being used. Signed-off-by: Muhammad Usama Anjum Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230309225206.2473644-1-usama.anjum@collabora.com Signed-off-by: Jakub Kicinski commit 05ccd8d8a15e6b9c99b86cf8a2fd78e3f0c60a84 Author: Edward Cree Date: Thu Mar 9 11:59:04 2023 +0000 sfc: support offloading TC VLAN push/pop actions to the MAE EF100 can pop and/or push up to two VLAN tags. Signed-off-by: Edward Cree Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20230309115904.56442-1-edward.cree@amd.com Signed-off-by: Jakub Kicinski commit 494f642f8cddb49886b6442c9304b30a0c1ec084 Merge: 939a3f2a76e32 bca93b20c3976 Author: Jakub Kicinski Date: Fri Mar 10 21:25:04 2023 -0800 Merge branch 'update-cpsw-bindings-for-serdes-phy' Siddharth Vadapalli says: ==================== Update CPSW bindings for Serdes PHY This series adds documentation for the Serdes PHY. Also, the name used to refer to the Serdes PHY in the am65-cpsw driver is updated to match the documented name. Documenting the Serdes PHY bindings was missed out in the already merged series at: https://lore.kernel.org/r/20230104103432.1126403-1-s-vadapalli@ti.com/ This miss was pointed out at: https://lore.kernel.org/r/CAMuHMdW5atq-FuLEL3htuE3t2uO86anLL3zeY7n1RqqMP_rH1g@mail.gmail.com/ v2: https://lore.kernel.org/r/20230308051835.276552-1-s-vadapalli@ti.com/ v1: https://lore.kernel.org/r/20230306094750.159657-1-s-vadapalli@ti.com/ ==================== Link: https://lore.kernel.org/r/20230309073612.431287-1-s-vadapalli@ti.com Signed-off-by: Jakub Kicinski commit bca93b20c3976ff5ca9fe373cf7acd0277492ae8 Author: Siddharth Vadapalli Date: Thu Mar 9 13:06:12 2023 +0530 net: ethernet: ti: am65-cpsw: Update name of Serdes PHY The bindings for the am65-cpsw driver use the name "serdes" to refer to the Serdes PHY. Thus, update the name used for the Serdes PHY within the am65_cpsw_init_serdes_phy() function from "serdes-phy" to "serdes". Signed-off-by: Siddharth Vadapalli Signed-off-by: Jakub Kicinski commit aacaf7b3d19daaa91528ab0c598b89a7f82aa47d Author: Siddharth Vadapalli Date: Thu Mar 9 13:06:11 2023 +0530 dt-bindings: net: ti: k3-am654-cpsw-nuss: Document Serdes PHY Update bindings to include Serdes PHY as an optional PHY, in addition to the existing CPSW MAC's PHY. The CPSW MAC's PHY is required while the Serdes PHY is optional. The Serdes PHY handle has to be provided only when the Serdes is being configured in a Single-Link protocol. Using the name "serdes-phy" to represent the Serdes PHY handle, the am65-cpsw-nuss driver can obtain the Serdes PHY and request the Serdes to be configured. Signed-off-by: Siddharth Vadapalli Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jakub Kicinski commit 939a3f2a76e3216253b0a596b67ce9bd9ff6af51 Author: Vadim Fedorenko Date: Thu Mar 9 02:54:21 2023 -0800 ptp_ocp: add force_irq to xilinx_spi configuration Flashing firmware via devlink flash was failing on PTP OCP devices because it is using Quad SPI mode, but the driver was not properly behaving. With force_irq flag landed it now can be fixed. Signed-off-by: Vadim Fedorenko Link: https://lore.kernel.org/r/20230309105421.2953451-1-vadfed@meta.com Signed-off-by: Jakub Kicinski commit 2af560e5a5d172e8e4680cc6ba2cf924850522f2 Merge: 127cd68563925 da1185449c669 Author: Jakub Kicinski Date: Fri Mar 10 18:22:28 2023 -0800 Merge tag 'wireless-next-2023-03-10' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Johannes Berg says: ==================== wireless-next patches for 6.4 Major changes: cfg80211 * 6 GHz improvements * HW timestamping support * support for randomized auth/deauth TA for PASN privacy (also for mac80211) mac80211 * radiotap TLV and EHT support for the iwlwifi sniffer * HW timestamping support * per-link debugfs for multi-link brcmfmac * support for Apple (M1 Pro/Max) devices iwlwifi * support for a few new devices * EHT sniffer support rtw88 * better support for some SDIO devices (e.g. MAC address from efuse) rtw89 * HW scan support for 8852b * better support for 6 GHz scanning * tag 'wireless-next-2023-03-10' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (84 commits) wifi: iwlwifi: mvm: fix EOF bit reporting wifi: iwlwifi: Do not include radiotap EHT user info if not needed wifi: iwlwifi: mvm: add EHT RU allocation to radiotap wifi: iwlwifi: Update logs for yoyo reset sw changes wifi: iwlwifi: mvm: clean up duplicated defines wifi: iwlwifi: rs-fw: break out for unsupported bandwidth wifi: iwlwifi: Add support for B step of BnJ-Fm4 wifi: iwlwifi: mvm: make flush code a bit clearer wifi: iwlwifi: mvm: avoid UB shift of snif_queue wifi: iwlwifi: mvm: add primary 80 known for EHT radiotap wifi: iwlwifi: mvm: parse FW frame metadata for EHT sniffer mode wifi: iwlwifi: mvm: decode USIG_B1_B7 RU to nl80211 RU width wifi: iwlwifi: mvm: rename define to generic name wifi: iwlwifi: mvm: allow Microsoft to use TAS wifi: iwlwifi: mvm: add all EHT based on data0 info from HW wifi: iwlwifi: mvm: add EHT radiotap info based on rate_n_flags wifi: iwlwifi: mvm: add an helper function radiotap TLVs wifi: radiotap: separate vendor TLV into header/content wifi: iwlwifi: reduce verbosity of some logging events wifi: iwlwifi: Adding the code to get RF name for MsP device ... ==================== Link: https://lore.kernel.org/r/20230310120159.36518-1-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit 127cd68563925577f7f27a5b17a788be18c577e5 Merge: c568a8de6bb1c 5daed426f012a Author: Jakub Kicinski Date: Fri Mar 10 18:12:50 2023 -0800 Merge branch 'rework-sfp-a2-access-conditionals' Russell King says: ==================== Rework SFP A2 access conditionals This series reworks the SFP A2 (diagnostics and control) access so we don't end up testing a variable number of conditions in several places. This also resolves a minor issue where we may have a module indicating that it is not SFF8472 compliant, doesn't implement A2, but fails to set the enhanced option byte to zero, leading to accesses to the A2 page that fail. The first patch adds a new flag "have_a2" which indicates whether we should be accessing the A2 page, and uses this for hwmon. The conditions are kept the same. The second patch extends the check for soft-state polling and control by using this "have_a2" flag (which effectively augments the check to include some level of SFF8472 compliance.) ==================== Link: https://lore.kernel.org/r/ZAoBnqGBnIZzLwpV@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 5daed426f012a1c0db0048339e359ee98a2c8752 Author: Russell King (Oracle) Date: Thu Mar 9 15:57:16 2023 +0000 net: sfp: only use soft polling if we have A2h access The soft state bits are stored in the A2h memory space, and require SFF-8472 compliance. This is what our have_a2 flag tells us, so use this to indicate whether we should attempt to use the soft signals. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit f94b9bed12e8244717512941494fe83c94773a58 Author: Russell King (Oracle) Date: Thu Mar 9 15:57:11 2023 +0000 net: sfp: add A2h presence flag The hwmon code wants to know when it is safe to access the A2h data stored in a separate address. We indicate that this is present when we have SFF-8472 compliance and the lack of an address-change sequence., The same conditions are also true if we want to access other controls and status in the A2h address. So let's make a flag to indicate whether we can access it, instead of repeating the conditions throughout the code. For now, only convert the hwmon code. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit cd414f4f59f64d7d2a249caaf387edbc5a874020 Author: John Harrison Date: Fri Feb 17 14:33:08 2023 -0800 drm/i915/guc: Fix missing return code checks in submission init The CI results for the 'fast request' patch set (enables error return codes for fire-and-forget H2G messages) hit an issue with the KMD sending context submission requests on an invalid context. That was caused by a fault injection probe failing the context creation of a kernel context. However, there was no return code checking on any of the kernel context registration paths. So the driver kept going and tried to use the kernel context for the record defaults process. This would not cause any actual problems. The invalid requests would be rejected by GuC and ultimately the start up sequence would correctly wedge due to the context creation failure. But fixing the issue correctly rather ignoring it means we won't get CI complaining when the fast request patch lands and enables the extra error checking. So fix it by checking for errors and aborting as appropriate when creating kernel contexts. While at it, clean up some other submission init related failure cleanup paths. Also, rename guc_init_lrc_mapping to guc_init_submission as the former name hasn't been valid in a long time. v2: Add another wrapper to keep the flow balanced (Daniele) Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20230217223308.3449737-3-John.C.Harrison@Intel.com commit fcb0348912ab718a3613c13cba264aecc7462c74 Author: John Harrison Date: Fri Feb 17 14:33:07 2023 -0800 drm/i915/guc: Improve clean up of busyness stats worker The stats worker thread management was mis-matched between enable/disable call sites. Fix those up. Also, abstract the cancel/enable code into a helper function rather than replicating in multiple places. v2: Rename the helpers and wrap the enable as well as the cancel (review feedback from Daniele). Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20230217223308.3449737-2-John.C.Harrison@Intel.com commit c568a8de6bb1cdf86badf01a1645e2efb433db21 Merge: f758bfec377ad 3c6401266f91c Author: Jakub Kicinski Date: Fri Mar 10 16:49:24 2023 -0800 Merge branch 'couple-of-minor-improvements-to-build_skb-variants' Gal Pressman says: ==================== Couple of minor improvements to build_skb variants First patch replaces open-coded occurrences of skb_propagate_pfmemalloc() in build_skb() and build_skb_around(). The secnod patch adds a likely() to the skb allocation in build_skb(). ==================== Link: https://lore.kernel.org/r/20230308131720.2103611-1-gal@nvidia.com Signed-off-by: Jakub Kicinski commit 3c6401266f91c69771176d3b289abfeaec731611 Author: Gal Pressman Date: Wed Mar 8 15:17:20 2023 +0200 skbuff: Add likely to skb pointer in build_skb() Similarly to napi_build_skb(), it is likely the skb allocation in build_skb() succeeded. frag_size != 0 is also likely, as stated in __build_skb_around(). Reviewed-by: Tariq Toukan Signed-off-by: Gal Pressman Reviewed-by: Larysa Zaremba Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit 566b6701d5dfc823d1e7ee27a7f0c5719f4b93dd Author: Gal Pressman Date: Wed Mar 8 15:17:19 2023 +0200 skbuff: Replace open-coded skb_propagate_pfmemalloc()s Use skb_propagate_pfmemalloc() in build_skb()/build_skb_around() instead of open-coding it. Reviewed-by: Tariq Toukan Signed-off-by: Gal Pressman Reviewed-by: Simon Horman Signed-off-by: Jakub Kicinski commit f758bfec377ad2f15d7683473b1db1cfbf8e1bb0 Author: Jens Axboe Date: Tue Mar 7 21:18:21 2023 -0700 tap: add support for IOCB_NOWAIT The tap driver already supports passing in nonblocking state based on O_NONBLOCK, add support for checking IOCB_NOWAIT as well. With that done, we can flag it with FMODE_NOWAIT as well. Signed-off-by: Jens Axboe Link: https://lore.kernel.org/r/8f859870-e6e2-09ca-9c0f-a2aa7c984fb2@kernel.dk Signed-off-by: Jakub Kicinski commit 438b406055cd21105aad77db7938ee4720b09bee Author: Jens Axboe Date: Tue Mar 7 20:45:56 2023 -0700 tun: flag the device as supporting FMODE_NOWAIT tun already checks for both O_NONBLOCK and IOCB_NOWAIT in its read and write iter handlers, so it's fully ready for FMODE_NOWAIT. But for some reason it doesn't set it. Rectify that oversight. Signed-off-by: Jens Axboe Link: https://lore.kernel.org/r/3f7dc1f0-79ca-d85c-4d16-8c12c5bd492d@kernel.dk Signed-off-by: Jakub Kicinski commit ae913318bcc8ba2a9ae350c16605ea6e5c382a97 Merge: cc4342f60f1a6 44d706fde7551 Author: Jakub Kicinski Date: Fri Mar 10 16:44:26 2023 -0800 Merge branch 'net-lan966x-add-support-for-is1-vcap' Horatiu Vultur says: ==================== net: lan966x: Add support for IS1 VCAP Provide the Ingress Stage 1 (IS1) VCAP (Versatile Content-Aware Processor) support for the Lan966x platform. The IS1 VCAP has 3 lookups and they are accessible with a TC chain id: - chain 1000000: IS1 Lookup 0 - chain 1100000: IS1 Lookup 1 - chain 1200000: IS1 Lookup 2 The IS1 is capable of different actions like rewrite VLAN tags, change priority of the frames, police the traffic, etc. These features will be added at a later point. The IS1 currently implements the action that allows setting the value of a PAG (Policy Association Group) key field in the frame metadata and this can be used for matching in an IS2 VCAP rule. In this way a rule in IS0 VCAP can be linked to rules in the IS2 VCAP. The linking is exposed by using the TC "goto chain" action with an offset from the IS2 chain ids. For example "goto chain 8000001" will use a PAG value of 1 to chain to a rule in IS2 lookup 0. ==================== Link: https://lore.kernel.org/r/20230307220929.834219-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski commit 44d706fde75518781f6859febb0979cf5e7327d4 Author: Horatiu Vultur Date: Tue Mar 7 23:09:29 2023 +0100 net: lan966x: Add support for IS1 VCAP ethernet protocol types IS1 VCAP has it's own list of supported ethernet protocol types which is different than the IS2 VCAP. Therefore separate the list of known protocol types based on the VCAP type. Signed-off-by: Horatiu Vultur Signed-off-by: Jakub Kicinski commit b3762a9db39c40a2e508a8edb91217676a74f299 Author: Horatiu Vultur Date: Tue Mar 7 23:09:28 2023 +0100 net: lan966x: Add TC filter chaining support for IS1 and IS2 VCAPs Allow rules to be chained between IS1 VCAP and IS2 VCAP. Chaining between IS1 lookups or between IS2 lookups are not supported by the hardware. Signed-off-by: Horatiu Vultur Signed-off-by: Jakub Kicinski commit 135c2116fd03642b74fa2c0cd1cbd2614ca3d80c Author: Horatiu Vultur Date: Tue Mar 7 23:09:27 2023 +0100 net: lan966x: Add TC support for IS1 VCAP Enable TC command to use IS1 VCAP Signed-off-by: Horatiu Vultur Signed-off-by: Jakub Kicinski commit a4d9b3ec63de3c36890fb440980ebf8f642bab88 Author: Horatiu Vultur Date: Tue Mar 7 23:09:26 2023 +0100 net: lan966x: Add IS1 VCAP keyset configuration for lan966x Add IS1 VCAP port keyset configuration for lan966x and also update debug fs support to show the keyset configuration. Signed-off-by: Horatiu Vultur Signed-off-by: Jakub Kicinski commit 99ce286d2d30a31eba4171036bc3f32eeb59e5f3 Author: Horatiu Vultur Date: Tue Mar 7 23:09:25 2023 +0100 net: lan966x: Add IS1 VCAP model Provide IS1 (ingress stage 1) VCAP model for lan966x. This provides classification actions for lan966x. Signed-off-by: Horatiu Vultur Signed-off-by: Jakub Kicinski commit 49b5300f1f8f2b542b31d63043c2febd13edbe3a Merge: c1f9e14e3b676 5d8d6634cccf1 Author: Alexei Starovoitov Date: Fri Mar 10 16:38:06 2023 -0800 Merge branch 'Support stashing local kptrs with bpf_kptr_xchg' Dave Marchevsky says: ==================== Local kptrs are kptrs allocated via bpf_obj_new with a type specified in program BTF. A BPF program which creates a local kptr has exclusive control of the lifetime of the kptr, and, prior to terminating, must: * free the kptr via bpf_obj_drop * If the kptr is a {list,rbtree} node, add the node to a {list, rbtree}, thereby passing control of the lifetime to the collection This series adds a third option: * stash the kptr in a map value using bpf_kptr_xchg As indicated by the use of "stash" to describe this behavior, the intended use of this feature is temporary storage of local kptrs. For example, a sched_ext ([0]) scheduler may want to create an rbtree node for each new cgroup on cgroup init, but to add that node to the rbtree as part of a separate program which runs on enqueue. Stashing the node in a map_value allows its lifetime to outlive the execution of the cgroup_init program. Behavior: There is no semantic difference between adding a kptr to a graph collection and "stashing" it in a map. In both cases exclusive ownership of the kptr's lifetime is passed to some containing data structure, which is responsible for bpf_obj_drop'ing it when the container goes away. Since graph collections also expect exclusive ownership of the nodes they contain, graph nodes cannot be both stashed in a map_value and contained by their corresponding collection. Implementation: Two observations simplify the verifier changes for this feature. First, kptrs ("referenced kptrs" until a recent renaming) require registration of a dtor function as part of their acquire/release semantics, so that a referenced kptr which is placed in a map_value is properly released when the map goes away. We want this exact behavior for local kptrs, but with bpf_obj_drop as the dtor instead of a per-btf_id dtor. The second observation is that, in terms of identification, "referenced kptr" and "local kptr" already don't interfere with one another. Consider the following example: struct node_data { long key; long data; struct bpf_rb_node node; }; struct map_value { struct node_data __kptr *node; }; struct { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, int); __type(value, struct map_value); __uint(max_entries, 1); } some_nodes SEC(".maps"); struct map_value *mapval; struct node_data *res; int key = 0; res = bpf_obj_new(typeof(*res)); if (!res) { /* err handling */ } mapval = bpf_map_lookup_elem(&some_nodes, &key); if (!mapval) { /* err handling */ } res = bpf_kptr_xchg(&mapval->node, res); if (res) bpf_obj_drop(res); The __kptr tag identifies map_value's node as a referenced kptr, while the PTR_TO_BTF_ID which bpf_obj_new returns - a type in some non-vmlinux, non-module BTF - identifies res as a local kptr. Type tag on the pointer indicates referenced kptr, while the type of the pointee indicates local kptr. So using existing facilities we can tell the verifier about a "referenced kptr" pointer to a "local kptr" pointee. When kptr_xchg'ing a kptr into a map_value, the verifier can recognize local kptr types and treat them like referenced kptrs with a properly-typed bpf_obj_drop as a dtor. Other implementation notes: * We don't need to do anything special to enforce "graph nodes cannot be both stashed in a map_value and contained by their corresponding collection" * bpf_kptr_xchg both returns and takes as input a (possibly-null) owning reference. It does not accept non-owning references as input by virtue of requiring a ref_obj_id. By definition, if a program has an owning ref to a node, the node isn't in a collection, so it's safe to pass ownership via bpf_kptr_xchg. Summary of patches: * Patch 1 modifies BTF plumbing to support using bpf_obj_drop as a dtor * Patch 2 adds verifier plumbing to support MEM_ALLOC-flagged param for bpf_kptr_xchg * Patch 3 adds selftests exercising the new behavior Changelog: v1 -> v2: https://lore.kernel.org/bpf/20230309180111.1618459-1-davemarchevsky@fb.com/ Patch #s used below refer to the patch's position in v1 unless otherwise specified. Patches 1-3 were applied and are not included in v2. Rebase onto latest bpf-next: "libbpf: Revert poisoning of strlcpy" Patch 4: "bpf: Support __kptr to local kptrs" * Remove !btf_is_kernel(btf) check, WARN_ON_ONCE instead (Alexei) Patch 6: "selftests/bpf: Add local kptr stashing test" * Add test which stashes 2 nodes and later unstashes one of them using a separate BPF program (Alexei) * Fix incorrect runner subtest name for original test (was "rbtree_add_nodes") ==================== Signed-off-by: Alexei Starovoitov commit 5d8d6634cccf1ebd0db4e220e52e7128b030c7b4 Author: Dave Marchevsky Date: Fri Mar 10 15:07:43 2023 -0800 selftests/bpf: Add local kptr stashing test Add a new selftest, local_kptr_stash, which uses bpf_kptr_xchg to stash a bpf_obj_new-allocated object in a map. Test the following scenarios: * Stash two rb_nodes in an arraymap, don't unstash them, rely on map free to destruct them * Stash two rb_nodes in an arraymap, unstash the second one in a separate program, rely on map free to destruct first Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230310230743.2320707-4-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 738c96d5e2e3700b370f02ac84a9dc159ca81f25 Author: Dave Marchevsky Date: Fri Mar 10 15:07:42 2023 -0800 bpf: Allow local kptrs to be exchanged via bpf_kptr_xchg The previous patch added necessary plumbing for verifier and runtime to know what to do with non-kernel PTR_TO_BTF_IDs in map values, but didn't provide any way to get such local kptrs into a map value. This patch modifies verifier handling of bpf_kptr_xchg to allow MEM_ALLOC kptr types. check_reg_type is modified accept MEM_ALLOC-flagged input to bpf_kptr_xchg despite such types not being in btf_ptr_types. This could have been done with a MAYBE_MEM_ALLOC equivalent to MAYBE_NULL, but bpf_kptr_xchg is the only helper that I can forsee using MAYBE_MEM_ALLOC, so keep it special-cased for now. The verifier tags bpf_kptr_xchg retval MEM_ALLOC if and only if the BTF associated with the retval is not kernel BTF. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230310230743.2320707-3-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit c8e18754091479fac3f5b6c053c6bc4be0b7fb11 Author: Dave Marchevsky Date: Fri Mar 10 15:07:41 2023 -0800 bpf: Support __kptr to local kptrs If a PTR_TO_BTF_ID type comes from program BTF - not vmlinux or module BTF - it must have been allocated by bpf_obj_new and therefore must be free'd with bpf_obj_drop. Such a PTR_TO_BTF_ID is considered a "local kptr" and is tagged with MEM_ALLOC type tag by bpf_obj_new. This patch adds support for treating __kptr-tagged pointers to "local kptrs" as having an implicit bpf_obj_drop destructor for referenced kptr acquire / release semantics. Consider the following example: struct node_data { long key; long data; struct bpf_rb_node node; }; struct map_value { struct node_data __kptr *node; }; struct { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, int); __type(value, struct map_value); __uint(max_entries, 1); } some_nodes SEC(".maps"); If struct node_data had a matching definition in kernel BTF, the verifier would expect a destructor for the type to be registered. Since struct node_data does not match any type in kernel BTF, the verifier knows that there is no kfunc that provides a PTR_TO_BTF_ID to this type, and that such a PTR_TO_BTF_ID can only come from bpf_obj_new. So instead of searching for a registered dtor, a bpf_obj_drop dtor can be assumed. This allows the runtime to properly destruct such kptrs in bpf_obj_free_fields, which enables maps to clean up map_vals w/ such kptrs when going away. Implementation notes: * "kernel_btf" variable is renamed to "kptr_btf" in btf_parse_kptr. Before this patch, the variable would only ever point to vmlinux or module BTFs, but now it can point to some program BTF for local kptr type. It's later used to populate the (btf, btf_id) pair in kptr btf field. * It's necessary to btf_get the program BTF when populating btf_field for local kptr. btf_record_free later does a btf_put. * Behavior for non-local referenced kptrs is not modified, as bpf_find_btf_id helper only searches vmlinux and module BTFs for matching BTF type. If such a type is found, btf_field_kptr's btf will pass btf_is_kernel check, and the associated release function is some one-argument dtor. If btf_is_kernel check fails, associated release function is two-arg bpf_obj_drop_impl. Before this patch only btf_field_kptr's w/ kernel or module BTFs were created. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230310230743.2320707-2-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit cc4342f60f1a6d0f4a30ae1887a75834d0109444 Author: Miquel Raynal Date: Tue Mar 7 20:29:27 2023 +0100 net: mvpp2: Defer probe if MAC address source is not yet ready NVMEM layouts are no longer registered early, and thus may not yet be available when Ethernet drivers (or any other consumer) probe, leading to possible probe deferrals errors. Forward the error code if this happens. All other errors being discarded, the driver will eventually use a random MAC address if no other source was considered valid (no functional change on this regard). Signed-off-by: Miquel Raynal Reviewed-by: Marcin Wojtas Link: https://lore.kernel.org/r/20230307192927.512757-1-miquel.raynal@bootlin.com Signed-off-by: Jakub Kicinski commit b9b8701b43146f5ebd7fe13d89103cfc545cda34 Author: Roberto Sassu Date: Fri Mar 10 09:54:01 2023 +0100 security: Remove integrity from the LSM list in Kconfig Remove 'integrity' from the list of LSMs in Kconfig, as it is no longer necessary. Since the recent change (set order to LSM_ORDER_LAST), the 'integrity' LSM is always enabled (if selected in the kernel configuration). Signed-off-by: Roberto Sassu Acked-by: Mimi Zohar Signed-off-by: Paul Moore commit b7c1ae4bcc5b7e737b46d469959446afc76d3165 Author: Roberto Sassu Date: Fri Mar 10 09:54:00 2023 +0100 Revert "integrity: double check iint_cache was initialized" With the recent introduction of LSM_ORDER_LAST, the 'integrity' LSM is always initialized (if selected in the kernel configuration) and the iint_cache is always created (the kernel panics on error). Thus, the additional check of iint_cache in integrity_inode_get() is no longer necessary. If the 'integrity' LSM is not selected in the kernel configuration, integrity_inode_get() just returns NULL. This reverts commit 92063f3ca73aab794bd5408d3361fd5b5ea33079. Signed-off-by: Roberto Sassu Acked-by: Mimi Zohar Signed-off-by: Paul Moore commit 42994ee3cd7298b27698daa6848ed7168e72d056 Author: Roberto Sassu Date: Fri Mar 10 09:53:59 2023 +0100 security: Introduce LSM_ORDER_LAST and set it for the integrity LSM Introduce LSM_ORDER_LAST, to satisfy the requirement of LSMs needing to be last, e.g. the 'integrity' LSM, without changing the kernel command line or configuration. Also, set this order for the 'integrity' LSM. While not enforced, this is the only LSM expected to use it. Similarly to LSM_ORDER_FIRST, LSMs with LSM_ORDER_LAST are always enabled and put at the end of the LSM list, if selected in the kernel configuration. Setting one of these orders alone, does not cause the LSMs to be selected and compiled built-in in the kernel. Finally, for LSM_ORDER_MUTABLE LSMs, set the found variable to true if an LSM is found, regardless of its order. In this way, the kernel would not wrongly report that the LSM is not built-in in the kernel if its order is LSM_ORDER_LAST. Fixes: 79f7865d844c ("LSM: Introduce "lsm=" for boottime LSM selection") Signed-off-by: Roberto Sassu Acked-by: Mimi Zohar Signed-off-by: Paul Moore commit b8fa3e3833c14151a47ebebbc5427dcfe94bb407 Merge: 0ec73817ca21f 55a21105ecc15 Author: Arnaldo Carvalho de Melo Date: Fri Mar 10 18:43:17 2023 -0300 Merge remote-tracking branch 'acme/perf-tools' into perf-tools-next To pick up perf-tools fixes just merged upstream. Signed-off-by: Arnaldo Carvalho de Melo commit c1f9e14e3b676eb88fe1c9488c0b5f4fc9108a1c Author: Dave Thaler Date: Wed Mar 8 20:53:03 2023 +0000 bpf, docs: Explain helper functions Add brief text about existence of helper functions, with details to go in separate psABI text. Note that text about runtime functions (kfuncs) is part of a separate patch, not this one. Signed-off-by: Dave Thaler Link: https://lore.kernel.org/r/20230308205303.1308-1-dthaler1968@googlemail.com Signed-off-by: Alexei Starovoitov commit 2c6a96dad5797e57b4cf04101d6c8d5c7a571603 Author: Rae Moar Date: Wed Mar 8 20:39:52 2023 +0000 kunit: fix bug of extra newline characters in debugfs logs Fix bug of the extra newline characters in debugfs logs. When a line is added to debugfs with a newline character at the end, an extra line appears in the debugfs log. This is due to a discrepancy between how the lines are printed and how they are added to the logs. Remove this discrepancy by checking if a newline character is present before adding a newline character. This should closely match the printk behavior. Add kunit_log_newline_test to provide test coverage for this issue. (Also, move kunit_log_test above suite definition to remove the unnecessary declaration prior to the suite definition) As an example, say we add these two lines to the log: kunit_log(..., "KTAP version 1\n"); kunit_log(..., "1..1"); The debugfs log before this fix: KTAP version 1 1..1 The debugfs log after this fix: KTAP version 1 1..1 Signed-off-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit f9a301c3317daa921375da0aec82462ddf019928 Author: Rae Moar Date: Wed Mar 8 20:39:51 2023 +0000 kunit: fix bug in the order of lines in debugfs logs Fix bug in debugfs logs that causes an incorrect order of lines in the debugfs log. Currently, the test counts lines that show the number of tests passed, failed, and skipped, as well as any suite diagnostic lines, appear prior to the individual results, which is a bug. Ensure the order of printing for the debugfs log is correct. Additionally, add a KTAP header to so the debugfs logs can be valid KTAP. This is an example of a log prior to these fixes: KTAP version 1 # Subtest: kunit_status 1..2 # kunit_status: pass:2 fail:0 skip:0 total:2 # Totals: pass:2 fail:0 skip:0 total:2 ok 1 kunit_status_set_failure_test ok 2 kunit_status_mark_skipped_test ok 1 kunit_status Note the two lines with stats are out of order. This is the same debugfs log after the fixes (in combination with the third patch to remove the extra line): KTAP version 1 1..1 KTAP version 1 # Subtest: kunit_status 1..2 ok 1 kunit_status_set_failure_test ok 2 kunit_status_mark_skipped_test # kunit_status: pass:2 fail:0 skip:0 total:2 # Totals: pass:2 fail:0 skip:0 total:2 ok 1 kunit_status Signed-off-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 887d85a0736ff346cbfe5efaf51cf20c7ca195a3 Author: Rae Moar Date: Wed Mar 8 20:39:50 2023 +0000 kunit: fix bug in debugfs logs of parameterized tests Fix bug in debugfs logs that causes individual parameterized results to not appear because the log is reinitialized (cleared) when each parameter is run. Ensure these results appear in the debugfs logs, increase log size to allow for the size of parameterized results. As a result, append lines to the log directly rather than using an intermediate variable that can cause stack size warnings due to the increased log size. Here is the debugfs log of ext4_inode_test which uses parameterized tests before the fix: KTAP version 1 # Subtest: ext4_inode_test 1..1 # Totals: pass:16 fail:0 skip:0 total:16 ok 1 ext4_inode_test As you can see, this log does not include any of the individual parametrized results. After (in combination with the next two fixes to remove extra empty line and ensure KTAP valid format): KTAP version 1 1..1 KTAP version 1 # Subtest: ext4_inode_test 1..1 KTAP version 1 # Subtest: inode_test_xtimestamp_decoding ok 1 1901-12-13 Lower bound of 32bit < 0 timestamp, no extra bits ... (the rest of the individual parameterized tests) ok 16 2446-05-10 Upper bound of 32bit >=0 timestamp. All extra # inode_test_xtimestamp_decoding: pass:16 fail:0 skip:0 total:16 ok 1 inode_test_xtimestamp_decoding # Totals: pass:16 fail:0 skip:0 total:16 ok 1 ext4_inode_test Signed-off-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 74843b57ec70af7b67b7e6153374834ee18d139f Author: Dave Marchevsky Date: Thu Mar 9 10:01:08 2023 -0800 bpf: Change btf_record_find enum parameter to field_mask btf_record_find's 3rd parameter can be multiple enum btf_field_type's masked together. The function is called with BPF_KPTR in two places in verifier.c, so it works with masked values already. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230309180111.1618459-4-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit a4aa38897b6a6dad4318bed036edc7ed0c8a4578 Author: Dave Marchevsky Date: Thu Mar 9 10:01:07 2023 -0800 bpf: btf: Remove unused btf_field_info_type enum This enum was added and used in commit aa3496accc41 ("bpf: Refactor kptr_off_tab into btf_record"). Later refactoring in commit db559117828d ("bpf: Consolidate spin_lock, timer management into btf_record") resulted in the enum values no longer being used anywhere. Let's remove them. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230309180111.1618459-3-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit b32a5dae44cc7346835839c2e92356ff4609c823 Author: Dave Marchevsky Date: Thu Mar 9 10:01:06 2023 -0800 bpf: verifier: Rename kernel_type_name helper to btf_type_name kernel_type_name was introduced in commit 9e15db66136a ("bpf: Implement accurate raw_tp context access via BTF") with type signature: const char *kernel_type_name(u32 id) At that time the function used global btf_vmlinux BTF for all id lookups. Later, in commit 22dc4a0f5ed1 ("bpf: Remove hard-coded btf_vmlinux assumption from BPF verifier"), the type signature was changed to: static const char *kernel_type_name(const struct btf* btf, u32 id) With the btf parameter used for lookups instead of global btf_vmlinux. The helper will function as expected for type name lookup using non-kernel BTFs, and will be used for such in further patches in the series. Let's rename it to avoid incorrect assumptions that might arise when seeing the current name. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20230309180111.1618459-2-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit bd81feb8cdbf0d9df27301c8fabbbd538519e8b3 Author: Thomas Huth Date: Fri Mar 10 17:07:57 2023 +0100 scripts: Update the CONFIG_* ignore list in headers_install.sh The file in include/uapi/linux/ have been cleaned in the previous patches, so we can now remove these entries from the CONFIG_* ignore-list. Signed-off-by: Thomas Huth Signed-off-by: Arnd Bergmann commit f5bdc61eb6089e10181b8f51b0a180bbd47a89fc Author: Thomas Huth Date: Fri Mar 10 17:07:56 2023 +0100 pktcdvd: Remove CONFIG_CDROM_PKTCDVD_WCACHE from uapi header CONFIG_* switches should not be exposed in uapi headers, thus let's get rid of the USE_WCACHING macro here (which was also named way to generic) and integrate the logic directly in the only function that needs it. Suggested-by: Christoph Hellwig Signed-off-by: Thomas Huth Signed-off-by: Arnd Bergmann commit d3c7ec7588508bd59bbb0e468d3820f3d3cba690 Author: Palmer Dabbelt Date: Fri Mar 10 17:07:55 2023 +0100 Move bp_type_idx to include/linux/hw_breakpoint.h This has a "#ifdef CONFIG_*" that used to be exposed to userspace. The names in here are so generic that I don't think it's a good idea to expose them to userspace (or even the rest of the kernel). There are multiple in-kernel users, so it's been moved to a kernel header file. Signed-off-by: Palmer Dabbelt Reviewed-by: Andrew Waterman Reviewed-by: Albert Ou Message-Id: <1447119071-19392-10-git-send-email-palmer@dabbelt.com> [thuth: Remove it also from tools/include/uapi/linux/hw_breakpoint.h] Reviewed-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Signed-off-by: Thomas Huth Signed-off-by: Arnd Bergmann commit 063f3ed9faf38e41449838bb3258a7d00f75c5d1 Author: Palmer Dabbelt Date: Fri Mar 10 17:07:54 2023 +0100 Move ep_take_care_of_epollwakeup() to fs/eventpoll.c This doesn't make any sense to expose to userspace, so it's been moved to the one user. This was introduced by commit 95f19f658ce1 ("epoll: drop EPOLLWAKEUP if PM_SLEEP is disabled"). Signed-off-by: Palmer Dabbelt Reviewed-by: Andrew Waterman Reviewed-by: Albert Ou Message-Id: <1447119071-19392-7-git-send-email-palmer@dabbelt.com> [thuth: Rebased to fix contextual conflicts] Reviewed-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Signed-off-by: Thomas Huth Signed-off-by: Arnd Bergmann commit 5fe5a7586c27a13a42b7946334d41a96c776a188 Author: Palmer Dabbelt Date: Fri Mar 10 17:07:53 2023 +0100 Move COMPAT_ATM_ADDPARTY to net/atm/svc.c This used to be behind an #ifdef COMPAT_COMPAT, so most of userspace wouldn't have seen the definition before. Unfortunately this header file became visible to userspace, so the definition has instead been moved to net/atm/svc.c (the only user). Signed-off-by: Palmer Dabbelt Reviewed-by: Andrew Waterman Reviewed-by: Albert Ou Message-Id: <1447119071-19392-4-git-send-email-palmer@dabbelt.com> Reviewed-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Signed-off-by: Thomas Huth Signed-off-by: Arnd Bergmann commit fd8c1a4aee973e87d890a5861e106625a33b2c4e Author: Jason Gunthorpe Date: Mon Mar 6 13:27:04 2023 -0400 iommufd/selftest: Catch overflow of uptr and length syzkaller hits a WARN_ON when trying to have a uptr close to UINTPTR_MAX: WARNING: CPU: 1 PID: 393 at drivers/iommu/iommufd/selftest.c:403 iommufd_test+0xb19/0x16f0 Modules linked in: CPU: 1 PID: 393 Comm: repro Not tainted 6.2.0-c9c3395d5e3d #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:iommufd_test+0xb19/0x16f0 Code: 94 c4 31 ff 44 89 e6 e8 a5 54 17 ff 45 84 e4 0f 85 bb 0b 00 00 41 be fb ff ff ff e8 31 53 17 ff e9 a0 f7 ff ff e8 27 53 17 ff <0f> 0b 41 be 8 RSP: 0018:ffffc90000eabdc0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff8214c487 RDX: 0000000000000000 RSI: ffff88800f5c8000 RDI: 0000000000000002 RBP: ffffc90000eabe48 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000000 R12: 00000000cd2b0000 R13: 00000000cd2af000 R14: 0000000000000000 R15: ffffc90000eabe68 FS: 00007f94d76d5740(0000) GS:ffff88807dd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000043 CR3: 0000000006880006 CR4: 0000000000770ee0 PKRU: 55555554 Call Trace: ? write_comp_data+0x2f/0x90 iommufd_fops_ioctl+0x1ef/0x310 __x64_sys_ioctl+0x10e/0x160 ? __pfx_iommufd_fops_ioctl+0x10/0x10 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc Check that the user memory range doesn't overflow. Fixes: f4b20bb34c83 ("iommufd: Add kernel support for testing iommufd") Link: https://lore.kernel.org/r/0-v1-95390ed1df8d+8f-iommufd_mock_overflow_jgg@nvidia.com Reviewed-by: Kevin Tian Reported-by: Pengfei Xu Link: https://lore.kernel.org/r/Y/hOiilV1wJvu/Hv@xpf.sh.intel.com Signed-off-by: Jason Gunthorpe commit 4659fba121dac21a3516986a3c2cf8459c7ac3bc Author: Martin KaFai Lau Date: Tue Mar 7 22:59:36 2023 -0800 selftests/bpf: Add local-storage-create benchmark This patch tests how many kmallocs is needed to create and free a batch of UDP sockets and each socket has a 64bytes bpf storage. It also measures how fast the UDP sockets can be created. The result is from my qemu setup. Before bpf_mem_cache_alloc/free: ./bench -p 1 local-storage-create Setting up benchmark 'local-storage-create'... Benchmark 'local-storage-create' started. Iter 0 ( 73.193us): creates 213.552k/s (213.552k/prod), 3.09 kmallocs/create Iter 1 (-20.724us): creates 211.908k/s (211.908k/prod), 3.09 kmallocs/create Iter 2 ( 9.280us): creates 212.574k/s (212.574k/prod), 3.12 kmallocs/create Iter 3 ( 11.039us): creates 213.209k/s (213.209k/prod), 3.12 kmallocs/create Iter 4 (-11.411us): creates 213.351k/s (213.351k/prod), 3.12 kmallocs/create Iter 5 ( -7.915us): creates 214.754k/s (214.754k/prod), 3.12 kmallocs/create Iter 6 ( 11.317us): creates 210.942k/s (210.942k/prod), 3.12 kmallocs/create Summary: creates 212.789 ± 1.310k/s (212.789k/prod), 3.12 kmallocs/create After bpf_mem_cache_alloc/free: ./bench -p 1 local-storage-create Setting up benchmark 'local-storage-create'... Benchmark 'local-storage-create' started. Iter 0 ( 68.265us): creates 243.984k/s (243.984k/prod), 1.04 kmallocs/create Iter 1 ( 30.357us): creates 238.424k/s (238.424k/prod), 1.04 kmallocs/create Iter 2 (-18.712us): creates 232.963k/s (232.963k/prod), 1.04 kmallocs/create Iter 3 (-15.885us): creates 238.879k/s (238.879k/prod), 1.04 kmallocs/create Iter 4 ( 5.590us): creates 237.490k/s (237.490k/prod), 1.04 kmallocs/create Iter 5 ( 8.577us): creates 237.521k/s (237.521k/prod), 1.04 kmallocs/create Iter 6 ( -6.263us): creates 238.508k/s (238.508k/prod), 1.04 kmallocs/create Summary: creates 237.298 ± 2.198k/s (237.298k/prod), 1.04 kmallocs/create Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230308065936.1550103-18-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 1f443d0f2b5702bad5f03aab544858ddd33999b7 Author: Martin KaFai Lau Date: Tue Mar 7 22:59:35 2023 -0800 selftests/bpf: Check freeing sk->sk_local_storage with sk_local_storage->smap is NULL This patch tweats the socket_bind bpf prog to test the local_storage->smap == NULL case in the bpf_local_storage_free() code path. The idea is to create the local_storage with the sk_storage_map's selem first. Then add the sk_storage_map2's selem and then delete the earlier sk_storeage_map's selem. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230308065936.1550103-17-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 57ef77152b58770cbd54d624babd8f5d90805ea7 Author: Martin KaFai Lau Date: Tue Mar 7 22:59:34 2023 -0800 selftests/bpf: Replace CHECK with ASSERT in test_local_storage This patch migrates the CHECK macro to ASSERT macro. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230308065936.1550103-16-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 7e30a8477b0bdd13dfd0b24e4f32b26d22b96e6c Author: Martin KaFai Lau Date: Tue Mar 7 22:59:30 2023 -0800 bpf: Add bpf_local_storage_free() This patch refactors local_storage freeing logic into bpf_local_storage_free(). It is a preparation work for a later patch that uses bpf_mem_cache_alloc/free. The other kfree(local_storage) cases are also changed to bpf_local_storage_free(..., reuse_now = true). Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230308065936.1550103-12-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 1288aaa2786b1e58c9e88e53f7654d520ebe0f3b Author: Martin KaFai Lau Date: Tue Mar 7 22:59:29 2023 -0800 bpf: Add bpf_local_storage_rcu callback The existing bpf_local_storage_free_rcu is renamed to bpf_local_storage_free_trace_rcu. A new bpf_local_storage_rcu callback is added to do the kfree instead of using kfree_rcu. It is a preparation work for a later patch using bpf_mem_cache_alloc/free. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230308065936.1550103-11-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit c0d63f309186d8492577c67c67984c714b6b72bc Author: Martin KaFai Lau Date: Tue Mar 7 22:59:28 2023 -0800 bpf: Add bpf_selem_free() This patch refactors the selem freeing logic into bpf_selem_free(). It is a preparation work for a later patch using bpf_mem_cache_alloc/free. The other kfree(selem) cases are also changed to bpf_selem_free(..., reuse_now = true). Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230308065936.1550103-10-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit f8ccf30c179ec1ac16654f6e6ceb40cce1530b91 Author: Martin KaFai Lau Date: Tue Mar 7 22:59:27 2023 -0800 bpf: Add bpf_selem_free_rcu callback Add bpf_selem_free_rcu() callback to do the kfree() instead of using kfree_rcu. It is a preparation work for using bpf_mem_cache_alloc/free in a later patch. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230308065936.1550103-9-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit c609981342dca634e5dea8c6ca175b6533581261 Author: Martin KaFai Lau Date: Tue Mar 7 22:59:26 2023 -0800 bpf: Remove bpf_selem_free_fields*_rcu This patch removes the bpf_selem_free_fields*_rcu. The bpf_obj_free_fields() can be done before the call_rcu_trasks_trace() and kfree_rcu(). It is needed when a later patch uses bpf_mem_cache_alloc/free. In bpf hashtab, bpf_obj_free_fields() is also called before calling bpf_mem_cache_free. The discussion can be found in https://lore.kernel.org/bpf/f67021ee-21d9-bfae-6134-4ca542fab843@linux.dev/ Acked-by: Kumar Kartikeya Dwivedi Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230308065936.1550103-8-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit a47eabf216f77cb6f22ceb38d46f1bb95968579c Author: Martin KaFai Lau Date: Tue Mar 7 22:59:25 2023 -0800 bpf: Repurpose use_trace_rcu to reuse_now in bpf_local_storage This patch re-purpose the use_trace_rcu to mean if the freed memory can be reused immediately or not. The use_trace_rcu is renamed to reuse_now. Other than the boolean test is reversed, it should be a no-op. The following explains the reason for the rename and how it will be used in a later patch. In a later patch, bpf_mem_cache_alloc/free will be used in the bpf_local_storage. The bpf mem allocator will reuse the freed memory immediately. Some of the free paths in bpf_local_storage does not support memory to be reused immediately. These paths are the "delete" elem cases from the bpf_*_storage_delete() helper and the map_delete_elem() syscall. Note that "delete" elem before the owner's (sk/task/cgrp/inode) lifetime ended is not the common usage for the local storage. The common free path, bpf_local_storage_destroy(), can reuse the memory immediately. This common path means the storage stays with its owner until the owner is destroyed. The above mentioned "delete" elem paths that cannot reuse immediately always has the 'use_trace_rcu == true'. The cases that is safe for immediate reuse always have 'use_trace_rcu == false'. Instead of adding another arg in a later patch, this patch re-purpose this arg to reuse_now and have the test logic reversed. In a later patch, 'reuse_now == true' will free to the bpf_mem_cache_free() where the memory can be reused immediately. 'reuse_now == false' will go through the call_rcu_tasks_trace(). Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230308065936.1550103-7-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit fc6652aab6ad545de70b772550da9043d0b47f1c Author: Martin KaFai Lau Date: Tue Mar 7 22:59:24 2023 -0800 bpf: Remember smap in bpf_local_storage This patch remembers which smap triggers the allocation of a 'struct bpf_local_storage' object. The local_storage is allocated during the very first selem added to the owner. The smap pointer is needed when using the bpf_mem_cache_free in a later patch because it needs to free to the correct smap's bpf_mem_alloc object. When a selem is being removed, it needs to check if it is the selem that triggers the creation of the local_storage. If it is, the local_storage->smap pointer will be reset to NULL. This NULL reset is done under the local_storage->lock in bpf_selem_unlink_storage_nolock() when a selem is being removed. Also note that the local_storage may not go away even local_storage->smap is NULL because there may be other selem still stored in the local_storage. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230308065936.1550103-6-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 121f31f3e00dfc1acbca43f6f35779e050b56cfc Author: Martin KaFai Lau Date: Tue Mar 7 22:59:23 2023 -0800 bpf: Remove the preceding __ from __bpf_selem_unlink_storage __bpf_selem_unlink_storage is taking the spin lock and there is no name collision also. Having the preceding '__' is confusing when reviewing the later patch. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230308065936.1550103-5-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 62827d612ae525695799b3635a087cb49c55e977 Author: Martin KaFai Lau Date: Tue Mar 7 22:59:22 2023 -0800 bpf: Remove __bpf_local_storage_map_alloc bpf_local_storage_map_alloc() is the only caller of __bpf_local_storage_map_alloc(). The remaining logic in bpf_local_storage_map_alloc() is only a one liner setting the smap->cache_idx. Remove __bpf_local_storage_map_alloc() to simplify code. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230308065936.1550103-4-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 2ffcb6fc50174d1efc8f98633eb2647d84483c68 Author: Martin KaFai Lau Date: Tue Mar 7 22:59:21 2023 -0800 bpf: Refactor codes into bpf_local_storage_destroy This patch first renames bpf_local_storage_unlink_nolock to bpf_local_storage_destroy(). It better reflects that it is only used when the storage's owner (sk/task/cgrp/inode) is being kfree(). All bpf_local_storage_destroy's caller is taking the spin lock and then free the storage. This patch also moves these two steps into the bpf_local_storage_destroy. This is a preparation work for a later patch that uses bpf_mem_cache_alloc/free in the bpf_local_storage. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230308065936.1550103-3-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 4cbd23cc92c49173e402753cab62b8a7754ed18f Author: Martin KaFai Lau Date: Tue Mar 7 22:59:20 2023 -0800 bpf: Move a few bpf_local_storage functions to static scope This patch moves the bpf_local_storage_free_rcu() and bpf_selem_unlink_map() to static because they are not used outside of bpf_local_storage.c. Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20230308065936.1550103-2-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 557aafac11530a283bebf2dea4cec62765d8df0f Author: Luis Chamberlain Date: Fri Mar 10 10:55:59 2023 -0800 kernel/module: add documentation for try_module_get() There is quite a bit of tribal knowledge around proper use of try_module_get() and requiring *somehow* the module to still exist to use this call in a way that is safe. Document this bit of tribal knowledge. To be clear, you should only use try_module_get() *iff* you are 100% sure the module already does exist and is not on its way out. You can be sure the module still exists and is alive through: 1) Direct protection with its refcount: you know some earlier caller called __module_get() safely 2) Implied protection: there is an implied protection against module removal Having an idea of when you are sure __module_get() might be called earlier is easy to understand however the implied protection requires an example. We use sysfs an an example for implied protection without a direct module reference count bump. kernfs / sysfs uses its own internal reference counting for files being actively used, when such file are active they completely prevent the module from being removed. kernfs protects this with its kernfs_active(). Effort has been put into verifying the kernfs implied protection works by using a currently out-of-tree test_sysfs selftest test #32 [0]: ./tools/testing/selftests/sysfs/sysfs.sh -t 0032 Without kernfs / sysfs preventing module removal through its active reference count (kernfs_active()) the write would fail or worse, a crash would happen in this test and it does not. Similar safeguards are required for other users of try_module_get() *iff* they are not ensuring the above rule 1) is followed. [0] https://lore.kernel.org/lkml/20211029184500.2821444-4-mcgrof@kernel.org/ Signed-off-by: Luis Chamberlain commit 4a54de65964d37c3929379271ab31355e93ccddf Author: David Vernet Date: Fri Mar 10 00:19:09 2023 -0600 bpf/selftests: Fix send_signal tracepoint tests The send_signal tracepoint tests are non-deterministically failing in CI. The test works as follows: 1. Two pairs of file descriptors are created using the pipe() function. One pair is used to communicate between a parent process -> child process, and the other for the reverse direction. 2. A child is fork()'ed. The child process registers a signal handler, notifies its parent that the signal handler is registered, and then and waits for its parent to have enabled a BPF program that sends a signal. 3. The parent opens and loads a BPF skeleton with programs that send signals to the child process. The different programs are triggered by different perf events (either NMI or normal perf), or by regular tracepoints. The signal is delivered to the child whenever the child triggers the program. 4. The child's signal handler is invoked, which sets a flag saying that the signal handler was reached. The child then signals to the parent that it received the signal, and the test ends. The perf testcases (send_signal_perf{_thread} and send_signal_nmi{_thread}) work 100% of the time, but the tracepoint testcases fail non-deterministically because the tracepoint is not always being fired for the child. There are two tracepoint programs registered in the test: 'tracepoint/sched/sched_switch', and 'tracepoint/syscalls/sys_enter_nanosleep'. The child never intentionally blocks, nor sleeps, so neither tracepoint is guaranteed to be triggered. To fix this, we can have the child trigger the nanosleep program with a usleep(). Before this patch, the test would fail locally every 2-3 runs. Now, it doesn't fail after more than 1000 runs. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230310061909.1420887-1-void@manifault.com Signed-off-by: Alexei Starovoitov commit 05777499a81298ef7e4a5e32a6f744f1f937a80c Author: Arnd Bergmann Date: Fri Mar 10 15:01:26 2023 +0100 ARM: dyndbg: allow including dyndbg.h in decompressor After a change to linux/module.h, dyndbg.h is now included indirectly from the decompressor for lz4 support, which in turn causes a build failure on 32-bit Arm: In file included from include/linux/module.h:30, from arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:39, from arch/arm/boot/compressed/../../../../lib/decompress_unlz4.c:10, from arch/arm/boot/compressed/decompress.c:59: include/linux/dynamic_debug.h: In function 'ddebug_dyndbg_module_param_cb': include/linux/dynamic_debug.h:307:14: error: implicit declaration of function 'strcmp' [-Werror=implicit-function-declaration] 307 | if (!strcmp(param, "dyndbg")) { | ^~~~~~ include/linux/dynamic_debug.h:1:1: note: 'strcmp' is defined in header ''; did you forget to '#include '? +++ |+#include The decompressor has its own replacement for the linux/string.h contents, so the normal declaration is not visible here. Since the function is not actually called, it is sufficient to add a declaration, and this is in fact the correct one as it matches the definition in arch/arm/boot/compressed/string.c. Fixes: 7deabd674988 ("dyndbg: use the module notifier callbacks") Signed-off-by: Arnd Bergmann Acked-by: Jason Baron Reviewed-by: Vincenzo Palazzo Signed-off-by: Luis Chamberlain commit 52c2b005a3c18c565fc70cfd0ca49375f301e952 Author: Andrii Nakryiko Date: Thu Mar 9 14:41:31 2023 -0800 bpf: take into account liveness when propagating precision When doing state comparison, if old state has register that is not marked as REG_LIVE_READ, then we just skip comparison, regardless what's the state of corresponing register in current state. This is because not REG_LIVE_READ register is irrelevant for further program execution and correctness. All good here. But when we get to precision propagation, after two states were declared equivalent, we don't take into account old register's liveness, and thus attempt to propagate precision for register in current state even if that register in old state was not REG_LIVE_READ anymore. This is bad, because register in current state could be anything at all and this could cause -EFAULT due to internal logic bugs. Fix by taking into account REG_LIVE_READ liveness mark to keep the logic in state comparison in sync with precision propagation. Fixes: a3ce685dd01a ("bpf: fix precision tracking") Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230309224131.57449-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 636f973c123fc64861cf41457a68302078b323e1 Author: Ville Syrjälä Date: Mon Mar 6 18:48:54 2023 +0200 drm/i915: Reject wm levels that exceed vblank time The pipe needs a certain amount of time during vblank to prefill sufficiently. If the vblank is too short the relevant watermark level must be disabled. Start implementing the necessary calculations to check this. Scaler and DSC prefill are left out for now as handling those is not entirely trivial. Also the PSR latency reporting override chicken bits would need to be correctly configured based on the results of these calculations. Just add some FIXMEs for now. TODO: bspec isn't exactly crystal clear in its explanations so quite a few open questions remain... v2: Skip inacive pipes Handle SAGV latency v3: Rebase v4: Fix handling of disabled wm levels (latency == 0) Reviewed-by: Jouni Högander Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230306164854.25928-1-ville.syrjala@linux.intel.com commit 6b931346ed0f7ec3238700d17742d092f164ddc0 Author: Ville Syrjälä Date: Wed Mar 1 18:24:48 2023 +0200 drm/i915: Extract skl_wm_latency() Extract the skl+ wm latency determination into a small helper so that everyone has the same idea what the latency should be. This introduces a slight functional change in that skl_cursor_allocation() will now start to account for the extra 4 usec that the kbk/cfl/cml IPC w/a adds. v2: Rebase Reviewed-by: Jouni Högander Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230301162449.26672-2-ville.syrjala@linux.intel.com commit 4b5ce570dbef57a20acdd71b0c65376009012354 Author: Andrii Nakryiko Date: Thu Mar 9 22:01:49 2023 -0800 bpf: ensure state checkpointing at iter_next() call sites State equivalence check and checkpointing performed in is_state_visited() employs certain heuristics to try to save memory by avoiding state checkpoints if not enough jumps and instructions happened since last checkpoint. This leads to unpredictability of whether a particular instruction will be checkpointed and how regularly. While normally this is not causing much problems (except inconveniences for predictable verifier tests, which we overcome with BPF_F_TEST_STATE_FREQ flag), turns out it's not the case for open-coded iterators. Checking and saving state checkpoints at iter_next() call is crucial for fast convergence of open-coded iterator loop logic, so we need to force it. If we don't do that, is_state_visited() might skip saving a checkpoint, causing unnecessarily long sequence of not checkpointed instructions and jumps, leading to exhaustion of jump history buffer, and potentially other undesired outcomes. It is expected that with correct open-coded iterators convergence will happen quickly, so we don't run a risk of exhausting memory. This patch adds, in addition to prune and jump instruction marks, also a "forced checkpoint" mark, and makes sure that any iter_next() call instruction is marked as such. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230310060149.625887-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 673515ba0249e47a0e69c56a16af24399c824d60 Author: Imre Deak Date: Wed Mar 8 18:25:03 2023 +0200 drm/i915/opregion: Register display debugfs later, after initialization steps Move the display debugfs registration later, after initializing steps for opregion/acpi/audio. These latter ones don't depend on the debugfs entries, OTOH some debugfs entries may depend on the initialized state. Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230308162503.3219200-3-imre.deak@intel.com commit 3e226e4a21808e4582020f813b041504f316022f Author: Imre Deak Date: Wed Mar 8 18:25:02 2023 +0200 drm/i915/opregion: Cleanup opregion after errors during driver loading Clean up the opregion state if something fails after intel_opregion_setup() is called. Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230308162503.3219200-2-imre.deak@intel.com commit c4a1e57b3544bd3d0252cf4e1d73d9a317de0923 Author: Imre Deak Date: Wed Mar 8 18:25:01 2023 +0200 drm/i915/opregion: Fix opregion setup during system resume on platforms without display Atm, during system resume, the driver updates the display connector information required by the opregion video extensions during system resume, on platforms both with and without display being present. On !HAS_DISPLAY platforms this will result in the crash with the stack trace below, since the driver's connector state is not initialized on those. Bspec doesn't specify when each of the opregion functionality is supported (depending on the presence of display), however we can presume that none of the video extensions, nor the ACPI _DSM functions are supported on !HAS_DISPLAY platforms; accordingly skip the corresponding opregion/ACPI setup on those (also matching the Windows driver in this). Keep sending the opregion notification about suspending/resuming the whole adapter (vs. the display only which is a separate power state notification) on all platforms, similarly to runtime suspend/resume. This fixes the following: Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 4 PID: 1443 Comm: kworker/u40:55 Tainted: G U 6.2.0-rc8+ #58 Hardware name: LENOVO 82VB/LNVNB161216, BIOS KMCN09WW 04/26/2022 Workqueue: events_unbound async_run_entry_fn RIP: 0010:drm_connector_list_iter_next+0x4f/0xb0 Call Trace: intel_acpi_device_id_update+0x80/0x160 [i915] intel_opregion_resume+0x2f/0x1e0 [i915] ? dg2_init_clock_gating+0x49/0xf0 [i915] i915_drm_resume+0x137/0x190 [i915] ? __pfx_pci_pm_resume+0x10/0x10 dpm_run_callback+0x47/0x150 Cc: iczero Reported-and-tested-by: iczero References: https://gitlab.freedesktop.org/drm/intel/-/issues/8015 Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20230308162503.3219200-1-imre.deak@intel.com commit 1456ddcce5b88c803e8d11b345b36736b6cca66c Merge: 63d78b7e8ca2d 3d5a55ddc2550 Author: Alexei Starovoitov Date: Fri Mar 10 08:14:08 2023 -0800 Merge branch 'selftests/bpf: make BPF_CFLAGS stricter with -Wall' Andrii Nakryiko says: ==================== Make BPF-side compiler flags stricter by adding -Wall. Fix tons of small issues pointed out by compiler immediately after that. That includes newly added bpf_for(), bpf_for_each(), and bpf_repeat() macros. ==================== Signed-off-by: Alexei Starovoitov commit 3d5a55ddc25508fe950991603d0224c0bba60558 Author: Andrii Nakryiko Date: Wed Mar 8 21:40:15 2023 -0800 selftests/bpf: make BPF compiler flags stricter We recently added -Wuninitialized, but it's not enough to catch various silly mistakes or omissions. Let's go all the way to -Wall, just like we do for user-space code. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230309054015.4068562-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit c8ed66859397237c649998c58a68a86b8ea5f417 Author: Andrii Nakryiko Date: Wed Mar 8 21:40:14 2023 -0800 selftests/bpf: fix lots of silly mistakes pointed out by compiler Once we enable -Wall for BPF sources, compiler will complain about lots of unused variables, variables that are set but never read, etc. Fix all these issues first before enabling -Wall in Makefile. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230309054015.4068562-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 713461b895ef958ef444b00cc2d979f3ca3a82e2 Author: Andrii Nakryiko Date: Wed Mar 8 21:40:13 2023 -0800 selftests/bpf: add __sink() macro to fake variable consumption Add __sink(expr) macro that forces compiler to believe that passed in expression is both read and written. It used a simple embedded asm for this. This is useful in a lot of tests where we assign value to some variable to trigger some action, but later don't read variable, causing compiler to complain (if corresponding compiler warnings are turned on, which we'll do in the next patch). Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230309054015.4068562-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 2498e6231bfd44f8f85afbc838b37441551a4028 Author: Andrii Nakryiko Date: Wed Mar 8 21:40:12 2023 -0800 selftests/bpf: prevent unused variable warning in bpf_for() Add __attribute__((unused)) to inner __p variable inside bpf_for(), bpf_for_each(), and bpf_repeat() macros to avoid compiler warnings about unused variable. Reported-by: Tejun Heo Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230309054015.4068562-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 47ea7ff19f0bedba4209a641bca60e0ef6fdabc0 Author: Wolfram Sang Date: Tue Mar 7 11:56:37 2023 +0100 pinctrl: renesas: Remove R-Car H3 ES1.* handling R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Signed-off-by: Wolfram Sang Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230307105645.5285-2-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 9da805344d2a2d27a32cc9271230055d8818e887 Author: Geert Uytterhoeven Date: Mon Nov 21 14:18:39 2022 +0100 pinctrl: renesas: r8a779g0: Fix ERROROUTC function names According to R-Car V4H Series User’s Manual: Hardware Rev. 0.54, the ERROROUTC signal is active-low. Hence add the missing "_N" suffix to the pin function's names. Resize column 2 of all IPxSR* definitions to accomodate the longer names. Fixes: b811062e5fd0343c ("pinctrl: renesas: r8a779g0: Add missing ERROROUTC_A") Fixes: ad9bb2fec66262b0 ("pinctrl: renesas: Initial R8A779G0 (R-Car V4H) PFC support") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1774303989e7d61f08fa81f1c2fa1b394505645f.1669036423.git.geert+renesas@glider.be commit 203734a0419cade9c76016f66e2c7ba354c249b4 Author: Geert Uytterhoeven Date: Mon Nov 21 14:18:38 2022 +0100 pinctrl: renesas: r8a779g0: Fix Group 6/7 pin functions According to R-Car V4H Series User’s Manual: Hardware Rev. 0.54, pin groups 6 and 7 do not use Module Select Registers to configure pin functions. Hence: - Remove the non-existent Module Select Registers (MODSEL[67]), - Correct the affected PINMUX definitions. Fixes: 36611d28f5130d8b ("pinctrl: renesas: r8a779g0: Add missing MODSELx for AVBx") Fixes: ad9bb2fec66262b0 ("pinctrl: renesas: Initial R8A779G0 (R-Car V4H) PFC support") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/06972cafd0efa4cfb395cfa76000a1bdae5e9e73.1669036423.git.geert+renesas@glider.be commit 0a7a5226e7b177c68800985a19a80c1df9bceff6 Author: Geert Uytterhoeven Date: Mon Nov 21 14:18:37 2022 +0100 pinctrl: renesas: r8a779g0: Fix Group 4/5 pin functions According to R-Car V4H Series User’s Manual: Hardware Rev. 0.54, pin groups 4 and 5 do not use Module Select Registers to configure pin functions, but use Peripheral Function Select Registers instead. Hence: - Remove the non-existent Module Select Registers (MODSEL[45]), - Add the missing Peripheral Function Select Registers (IPxSR[45]), - Correct the GPIO / Peripheral Function Select Register definitions (GPSR]45_*), - Correct the affected PINMUX definitions. Fixes: 36611d28f5130d8b ("pinctrl: renesas: r8a779g0: Add missing MODSELx for AVBx") Fixes: 36fb7b8af55b83e0 ("pinctrl: renesas: r8a779g0: Add missing MODSELx for TSN0") Fixes: ad9bb2fec66262b0 ("pinctrl: renesas: Initial R8A779G0 (R-Car V4H) PFC support") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/3d3833d1738f5e8fcc4c1002aa93832464d129a0.1669036423.git.geert+renesas@glider.be commit 1ef48138f90785ba7091fb8fa317039cd3cf9494 Author: Ralph Siemsen Date: Wed Mar 1 16:55:20 2023 -0500 clk: renesas: r9a06g032: Improve clock tables Each entry in the clock table specifies a number of individual bits in registers, for contolling clock reset, gaiting, etc. These reg/bit were packed into a u16 to save space. The combined value is difficult to understand when reviewing the clock table entries. Introduce a "struct regbit" which still occupies only 16 bits, but allows the register and bit values to be specified explicitly. Convert all previous uses of u16 for reg/bit into "struct regbit". The bulk of this patch converts the clock table to use struct regbit, making use of the RB() helper macro. The conversion was automated by script, and as a further verification, the compiled binary of the table was compared before/after the change (with objdump -D). The clk_rdesc_set() function now checks for zero reg/bit internally. This allows callers of that function to remove those checks. Signed-off-by: Ralph Siemsen Reviewed-by: Miquel Raynal Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230301215520.828455-5-ralph.siemsen@linaro.org Signed-off-by: Geert Uytterhoeven commit 5a5ca2c758c200663fdf5c04f71796a8f300151a Author: Ralph Siemsen Date: Wed Mar 1 16:55:19 2023 -0500 clk: renesas: r9a06g032: Document structs Add some kerneldoc comments for the structures. Signed-off-by: Ralph Siemsen Reviewed-by: Miquel Raynal Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230301215520.828455-4-ralph.siemsen@linaro.org Signed-off-by: Geert Uytterhoeven commit 2689c123317a74e751069d68df9e9900993b6a63 Author: Ralph Siemsen Date: Wed Mar 1 16:55:18 2023 -0500 clk: renesas: r9a06g032: Drop unused fields Drop three unused fields from the clock descriptor structure, and update the macros for filling such structures accordingly. The values for such fields are kept in the source code, now unused, in case they are needed later. Signed-off-by: Ralph Siemsen Reviewed-by: Miquel Raynal Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230301215520.828455-3-ralph.siemsen@linaro.org Signed-off-by: Geert Uytterhoeven commit a1aae0a6b122300d057e30487fc8291d3cd730ca Author: Ralph Siemsen Date: Wed Mar 1 16:55:17 2023 -0500 clk: renesas: r9a06g032: Improve readability Several small readability improvements: - Move enum gate_type definition up and add comments to each field. - Use this enum instead of generic uint32_t type in clock desc struct. - Tidy up bitfield syntax and comments in clock desc structure - Reformat macros for building clock desc to have one assignment per line There is no functional change. Signed-off-by: Ralph Siemsen Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230301215520.828455-2-ralph.siemsen@linaro.org Signed-off-by: Geert Uytterhoeven commit 85af88b8f7d606be8a9b89fcda61a5df28a2028d Author: Geert Uytterhoeven Date: Thu Feb 16 16:20:19 2023 +0100 clk: renesas: r8a77980: Add Z2 clock Add support for the Z2 (Cortex-A53 System CPU) clock on R-Car V3H, which uses a fixed SYS-CPU divider. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/aad9eaa57acf65cbe43e4d374066a72d760d54d8.1676560357.git.geert+renesas@glider.be commit 88ddf98aa511a5e0c2c76e5dfcf3c6b2581d0e85 Author: Geert Uytterhoeven Date: Thu Feb 16 16:20:18 2023 +0100 clk: renesas: r8a77970: Add Z2 clock Add support for the Z2 (Cortex-A53 System CPU) clock on R-Car V3M, which uses a fixed SYS-CPU divider. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/6a9169e5bc92c2b9549292769a0814e04b9147cf.1676560357.git.geert+renesas@glider.be commit d35ad1030a6bce57234b8eea14ab17560f3c9e1b Author: Wolfram Sang Date: Tue Mar 7 11:56:39 2023 +0100 dt-bindings: soc: renesas: Remove R-Car H3 ES1.* R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Signed-off-by: Wolfram Sang Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230307105645.5285-4-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 27159fb3e00652c44ed5451ca9df50bffcbc5273 Author: Wolfram Sang Date: Tue Mar 7 11:56:38 2023 +0100 arm64: dts: renesas: Remove R-Car H3 ES1.* devicetrees R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Signed-off-by: Wolfram Sang Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230307105645.5285-3-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit e0d1619f1230f7ce368d7775da5f3130e29cfb33 Author: Kuninori Morimoto Date: Mon Mar 6 23:49:40 2023 +0000 arm64: dts: renesas: white-hawk: Add R-Car Sound support Add R-Car Sound support for the White Hawk board with the ARD-AUDIO-DA7212 external audio board, using a DT overlay. Signed-off-by: Linh Phung Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87o7p5l9t7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 6cf8e3d73ebe832492aa21d2d74b4404f897bb30 Author: Kuninori Morimoto Date: Mon Mar 6 23:48:58 2023 +0000 arm64: dts: renesas: r8a779g0: R-Car Sound support Add sound support for R-Car V4H. Signed-off-by: Linh Phung Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87pm9ll9ue.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 2a5c9891392dca47f6865a2add1986876e40849c Author: Lad Prabhakar Date: Fri Feb 17 18:52:25 2023 +0000 arm64: dts: renesas: r9a07g043: Update IRQ numbers for SSI channels From R01UH0968EJ0100 Rev.1.00 HW manual the interrupt numbers for SSI channels have been updated, SPI 329 - SSIF0 is now marked as reserved SPI 333 - SSIF1 is now marked as reserved SPI 335 - SSIF2 is now marked as reserved SPI 336 - SSIF2 is now marked as reserved SPI 341 - SSIF3 is now marked as reserved This patch drops the above IRQs from SoC DTSI. Fixes: 559f2b0708c70 ("arm64: dts: renesas: r9a07g043: Add SSI{1,2,3} nodes and fillup the SSI0 stub node") Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230217185225.43310-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c2b0dc0e83ef4a74cbe381fd0c84cea16cf067f0 Author: Lad Prabhakar Date: Fri Feb 17 18:52:24 2023 +0000 arm64: dts: renesas: r9a07g054: Update IRQ numbers for SSI channels From R01UH0936EJ0120 Rev.1.20 HW manual the interrupt numbers for SSI channels have been updated, SPI 329 - SSIF0 is now marked as reserved SPI 333 - SSIF1 is now marked as reserved SPI 335 - SSIF2 is now marked as reserved SPI 336 - SSIF2 is now marked as reserved SPI 341 - SSIF3 is now marked as reserved This patch drops the above IRQs from SoC DTSI. Fixes: cd0339ec25895c0b ("arm64: dts: renesas: r9a07g054: Add SSI{1,2,3} nodes and fillup the SSI0 stub node") Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230217185225.43310-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 5da750ddd96454757a3b467e968e3fb70bb12bc8 Author: Lad Prabhakar Date: Fri Feb 17 18:52:24 2023 +0000 arm64: dts: renesas: r9a07g044: Update IRQ numbers for SSI channels From R01UH0914EJ0120 Rev.1.20 HW manual the interrupt numbers for SSI channels have been updated, SPI 329 - SSIF0 is now marked as reserved SPI 333 - SSIF1 is now marked as reserved SPI 335 - SSIF2 is now marked as reserved SPI 336 - SSIF2 is now marked as reserved SPI 341 - SSIF3 is now marked as reserved This patch drops the above IRQs from SoC DTSI. Fixes: 92a341315afc9 ("arm64: dts: renesas: r9a07g044: Add SSI support") Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230217185225.43310-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 554edc3e9239bb81e61be9f0f5dbbeb528a69e72 Author: Geert Uytterhoeven Date: Thu Feb 16 16:30:32 2023 +0100 arm64: dts: renesas: r8a774c0: Remove bogus voltages from OPP table According to the RZ/G Series, 2nd Generation Hardware User’s Manual Rev. 1.11, the System CPU cores on RZ/G2E do not have their own power supply, but use the common internal power supply (typical 1.03V). Hence remove the "opp-microvolt" properties from the Operating Performance Points table. They are optional, and unused, when none of the CPU nodes is tied to a regulator using the "cpu-supply" property. Fixes: 231d8908a66fa98f ("arm64: dts: renesas: r8a774c0: Add OPPs table for cpu devices") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/8348e18a011ded94e35919cd8e17c0be1f9acf2f.1676560856.git.geert+renesas@glider.be commit fb76b0fae3ca880363214e1dcd6513ab8bd529e7 Author: Geert Uytterhoeven Date: Thu Feb 16 16:30:31 2023 +0100 arm64: dts: renesas: r8a77990: Remove bogus voltages from OPP table According to the R-Car Series, 3rd Generation Hardware User’s Manual Rev. 2.30, the System CPU cores on R-Car E3 do not have their own power supply, but use the common internal power supply (typical 1.03V). Hence remove the "opp-microvolt" properties from the Operating Performance Points table. They are optional, and unused, when none of the CPU nodes is tied to a regulator using the "cpu-supply" property. Fixes: dd7188eb4ed128dc ("arm64: dts: renesas: r8a77990: Add OPPs table for cpu devices") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/9232578d9d395d529f64db3333a371e31327f459.1676560856.git.geert+renesas@glider.be commit 28924444f2736e34dfe52b6a7920cea6d0d89807 Author: Lad Prabhakar Date: Mon Feb 6 00:13:00 2023 +0000 arm64: dts: renesas: r9a07g054: Add Cortex-A55 PMU node Enable the performance monitor unit for the Cortex-A55 cores on the RZ/V2L (r9a07g054) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230206001300.28937-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 0c14f3aa388d3becd38923869e17f9947a5e5926 Author: Andy Shevchenko Date: Thu Mar 9 20:46:35 2023 +0200 gpio: sim: Deactivate device in reversed order Run the steps to deactivate device in the reserved order to what it has been done in gpio_sim_device_activate_unlocked(). Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 93582bdfd0cf5aeeb4451ade1076a455c53d8a85 Author: Geert Uytterhoeven Date: Wed Mar 8 15:40:54 2023 +0100 arm64: defconfig: Enable RZ/V2M xHCI and USB3.1 DRD controller support Increase build and test coverage by enabling RZ/V2M xHCI and USB3.1 DRD controller support. Note that the latter cannot be modular, as USB_XHCI_RCAR is builtin. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/ff10d09c1a00f7024679a249e696e8c8a52d671e.1678286291.git.geert+renesas@glider.be commit 0a06ad2056ad18e9d3de8fe8e3e8fe4f85aa86e1 Author: Geert Uytterhoeven Date: Wed Mar 8 15:40:53 2023 +0100 ARM: multi_v7_defconfig: Enable additional support for RZ/N1 platforms Increase build and test coverage by enabling support for the A5PSW Ethernet switch, pin, watchdog, USB Function, RTC, and DMA mux controllers on the Renesas RZ/N1 SoC and the RZN1D-DB development board. All drivers for the above are modular, except for the pin control driver. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/a163e8a9c4ae9cb10b05409f2fc139d09fe440b9.1678286291.git.geert+renesas@glider.be commit 64ddc2c9c06711e3d64976ef9f4880284823f464 Author: Geert Uytterhoeven Date: Wed Mar 8 15:40:52 2023 +0100 ARM: shmobile: defconfig: Refresh for v6.3-rc1 Refresh the defconfig for Renesas ARM systems: - Disable CONFIG_SERIAL_8250_PCI1XXXX (No Microchip 8250 based serial ports), - Enable RZ/N1 USB Function controller support. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/b4bac37273be5287b0198abe0aafd16f08ed330d.1678286291.git.geert+renesas@glider.be commit d3b4fe74b904c6b8f819db13104e56cd0943d76b Author: Wolfram Sang Date: Tue Mar 7 11:56:41 2023 +0100 arm64: defconfig: Disable R-Car H3 ES1.* R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Signed-off-by: Wolfram Sang Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230307105645.5285-6-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 29dfd412ec9e08b05b65848174646353b58fb54d Author: Kuninori Morimoto Date: Mon Mar 6 23:49:48 2023 +0000 arm64: defconfig: Enable DA7213 Codec Enable the DA7213 Codec for ARD-AUDIO-DA7212 support on R-Car V4H White Hawk. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87mt4pl9sz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit b39d242dbfd925d9f6b262bf216518e28445570d Author: Geert Uytterhoeven Date: Wed Mar 8 11:48:17 2023 +0100 soc: renesas: rmobile-sysc: Use of_fwnode_handle() helper Use the existing of_fwnode_handle() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Reviewed-by: Saravana Kannan Link: https://lore.kernel.org/r/d49b9fb20d68709b12692558aca91997e6b06fb4.1678272276.git.geert+renesas@glider.be commit 18ecaaea2174c9494ec1ce354f58846367c29f45 Author: Wolfram Sang Date: Tue Mar 7 11:56:41 2023 +0100 soc: renesas: Remove r8a77950 arch R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Remove the architecture which describes H3 ES1.*. Signed-off-by: Wolfram Sang Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230307105645.5285-6-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit fd9c55c0acac59013dae9f8eedb0e0eb2e82e276 Author: Wolfram Sang Date: Tue Mar 7 11:56:40 2023 +0100 soc: renesas: rcar-sysc: Remove R-Car H3 ES1.* handling R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Signed-off-by: Wolfram Sang Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230307105645.5285-5-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 8a36cdc8ef2facc06d8bb973229131846770109b Author: Jiapeng Chong Date: Thu Mar 9 11:17:55 2023 +0800 gpio: loongson: Remove unnecessary .owner Remove .owner field if calls are used which set it automatically. ./drivers/gpio/gpio-loongson-64bit.c:225:3-8: No need to set .owner here. The core will do it. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4450 Signed-off-by: Jiapeng Chong Signed-off-by: Bartosz Golaszewski commit 33886f925752d0f7b0791fcf008db223f0be6278 Author: Linus Walleij Date: Thu Mar 9 08:46:05 2023 +0100 gpio: pcie-idio-24: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Acked-by: William Breathitt Gray Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 141d5527568e923406392810049ed8be23d9e3cc Author: Linus Walleij Date: Thu Mar 9 08:46:04 2023 +0100 gpio: pci-idio-16: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Acked-by: William Breathitt Gray Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 39575d114fbb377d752d8df25d4795bc29d98042 Author: Linus Walleij Date: Thu Mar 9 08:46:03 2023 +0100 gpio: omap: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. This driver require some special care: .irq_ack() was copied from dummy_irq_chip where it was defined as noop. This only makes sense if using handle_edge_irq() that will unconditionally call .irq_ack() to avoid a crash, but this driver is not ever using handle_edge_irq() so just avoid assigning .irq_ack(). A separate chip had to be created for the non-wakeup instance. Cc: Marc Zyngier Reviewed-by: Tony Lindgren Tested-by: Tony Lindgren Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 1e77c092d3bb65af9b089916a9f09e234d0ccb75 Author: Linus Walleij Date: Thu Mar 9 08:46:02 2023 +0100 gpio: omap: Drop irq_base The OMAP1 at one point was using static irqs but that time is gone, OMAP1 uses sparse irqs like all other multiplatform targets so this static allocation of descriptors should just go. Cc: Janusz Krzysztofik Cc: Tony Lindgren Acked-by: Arnd Bergmann Acked-by: Marc Zyngier Reviewed-by: Tony Lindgren Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 706cdfc517fe7ce65d953acde02d316de06820e5 Author: Linus Walleij Date: Thu Mar 9 08:46:01 2023 +0100 gpio: max732x: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 5bfff76d27fcd84bfdd579b4bf690c1bb77b87f8 Author: Linus Walleij Date: Thu Mar 9 08:46:00 2023 +0100 gpio: mlxbf2: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit db45f0e1052404925a8c160f316f208da2edcbec Author: Linus Walleij Date: Thu Mar 9 08:45:59 2023 +0100 gpio: msc313: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. This conversion follows the pattern of the gpio-ixp4xx hierarchical GPIO interrupt driver. Cc: Marc Zyngier Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Reviewed-by: Romain Perier Signed-off-by: Bartosz Golaszewski commit 9cd9e23ae3ac8a3fc1e9707da192afdb26388e82 Author: Linus Walleij Date: Thu Mar 9 08:45:58 2023 +0100 gpio: idt3243x: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Tested-by: Thomas Bogendoerfer Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit ab42f021bc015db742e73ac7c39307b72ed9558d Author: Linus Walleij Date: Thu Mar 9 08:45:57 2023 +0100 gpio: hlwd: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 39bdd6bdada985ff267124f3814093d6339d796c Author: Linus Walleij Date: Thu Mar 9 08:45:56 2023 +0100 gpio: hisi: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. The IRQ chip was unnamed which seems unwise, so we just assign the name "HISI-GPIO". Cc: Marc Zyngier Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 150a988035bb9d124716020b1b9a4e90d8eb23bb Author: Linus Walleij Date: Thu Mar 9 08:45:55 2023 +0100 gpio: cadence: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit b11ce7e48121a02ceedec9f4dfcab4f2bee8f35f Author: Linus Walleij Date: Thu Mar 9 08:45:54 2023 +0100 gpio: ath79: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit c5dcf76805a759ba42852a69c579fe106e6e116d Author: Linus Walleij Date: Thu Mar 9 08:45:53 2023 +0100 gpio: aspeed-sgpio: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 061df08f063a973ce133d0d6be3d89a081ae8998 Author: Linus Walleij Date: Thu Mar 9 08:45:52 2023 +0100 gpio: aspeed: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Tested-by: Joel Stanley Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 90d17632e71d15bf7e4879eced0cbd2d90c3d60f Author: Joel Stanley Date: Thu Mar 9 08:45:51 2023 +0100 gpio: aspeed: Always register the irqchip The driver was implemented in a way that made the irqchip optional, if a irq was not present in the device tree. However, all of the device trees have always had an irq, so the optional-ness has never been used. Signed-off-by: Joel Stanley Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit d4c0cf340861b10a0a984b30306ddd09d2da7131 Author: Linus Walleij Date: Thu Mar 9 08:45:50 2023 +0100 gpio: adnp: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 5cd79816d2f25cdaee5e929a5ade4d46c0ab7c3d Author: Linus Walleij Date: Thu Mar 9 08:45:49 2023 +0100 gpio: altera: Convert to immutable irq_chip Convert the driver to immutable irq-chip with a bit of intuition. Cc: Marc Zyngier Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit c3388ddc74a863466c7c3fa24d3a9cea9c9bca53 Author: Alex Henrie Date: Sun Feb 26 20:06:13 2023 -0700 HID: apple: Set the tilde quirk flag on the Geyser 4 and later I recently tested several old MacBooks and as far as I can tell, all MacBooks that have an ISO keyboard have the tilde key quirk: Product Model Year System CPU Shape Labels Country Quirky ============================================================================ 05ac:021b A1181 2006 MacBook2,1 T5600 ISO British 13 Yes 05ac:021b A1181 2007 MacBook2,1 T7200 ISO Québécois 13 Yes 05ac:0229 A1181 2007 MacBook4,1 T8300 ANSI Usonian 33 No 05ac:022a A1181 2007 MacBook4,1 T8100 ISO English 13 Yes 05ac:022a A1181 2007 MacBook5,2 P7350 ISO Québécois 13 Yes 05ac:0237 A1278 2008 MacBook5,1 P7350 ISO Dutch 13 Yes 05ac:0237 A1278 2009 MacBook5,5 P7550 ISO British 13 Yes The model number and year are from the laptop case. Since Apple printed the same model and year on many different laptops, the system name (as reported in the SMBIOS tables) and CPU form a more precise identifier. Signed-off-by: Alex Henrie Signed-off-by: Jiri Kosina commit 75034eb5e4c267d4ab93085b5d6fa3dab2535b34 Author: Peter Ujfalusi Date: Fri Mar 10 15:34:54 2023 +0200 ASoC: SOF: Intel: MTL: Don't access EM2 This reverts commit 2b5a30cafb2ef ("ASoC: SOF: Intel: MTL: Enable DMI L1"). It came to our attention that the access to the EM2 register is restricted to the DSP side on MTL compared to prior platforms. Writing to it from the host side has no effect (negative or positive), it is better to remove the code to not cause confusion and wrong impression. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230310133454.15362-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 740b2f03f80e8f50c3f96309bc123bea040de8d0 Author: fengqi Date: Thu Feb 16 16:48:30 2023 +0800 HID: add KEY_CAMERA_FOCUS event in HID Our HID device need KEY_CAMERA_FOCUS event to control camera, but this event is non-existent in current HID driver. So we add this event in hid-input.c. Signed-off-by: fengqi Reviewed-by: Greg Kroah-Hartman Signed-off-by: Jiri Kosina commit 8c7b79bc04abb67e7f5864e94286a800b42aa96c Author: David Yang Date: Tue Feb 7 12:33:16 2023 +0800 HID: kye: Sort kye devices Sort kye devices by their Produce IDs. Signed-off-by: David Yang Signed-off-by: Jiri Kosina commit 4782c0e07092b9ed7b5d8f702167e7f604951fea Author: David Yang Date: Tue Feb 7 12:33:15 2023 +0800 HID: kye: Generate tablet fixup descriptors on the fly Remove duplicated descriptor structures and make it easier to discover bugs. Signed-off-by: David Yang Signed-off-by: Jiri Kosina commit b8cd2d963da57aba55afd7f57546e3bb69e9a2c1 Author: David Yang Date: Tue Feb 7 12:33:14 2023 +0800 HID: kye: Rewrite tablet descriptor fixup routine Genius digitizer tablets send incorrect (vendor-defined) report descriptors by default. Descriptors for several models were added to override original ones. Since they share the same structure and are handled by the same Windows driver routine, extract the descriptor template and dynamic parameters for easier new device adoption. Signed-off-by: David Yang Signed-off-by: Jiri Kosina commit d750d1480362781e208b3cc64640c0be127afcc9 Author: Daniel J. Ogorchock Date: Fri Feb 3 16:51:18 2023 -0500 HID: nintendo: fix rumble rate limiter It's been discovered that BT controller disconnect events correlate to erratic input report timestamp deltas. In experimentation, it's been found that ensuring that multiple timestamp deltas are consistent prior to transmitting a rumble packet drastically reduces the occurence rate of BT disconnects. Alter the joycon_enforce_subcmd_rate() function to use this new approach. Signed-off-by: Daniel J. Ogorchock Reviewed-by: Silvan Jegen commit bcba9f32c13a29edf7e996371eebe7eb5ff9f854 Author: Daniel J. Ogorchock Date: Fri Feb 3 16:51:17 2023 -0500 HID: nintendo: prevent rumble queue overruns Make sure that we never throw out the most recent rumble setting, opting to overwrite the prior queue head instead. This prevents instances where we could get rumble stuck on if there were an overrun at the wrong time. Signed-off-by: Daniel J. Ogorchock Reviewed-by: Silvan Jegen commit 21d19e601fd221cd61105286b0b6ec2f9c5a2576 Author: Andy Shevchenko Date: Fri Mar 10 13:15:44 2023 +0200 spi: mpc5xxx-psc: Remove goto to the unexisted label The previous cleanup patch had lost one of its parts in a crack, Finish the cleanup by removing the leftovers. Reported-by: kernel test robot Fixes: 9e21720a4958 ("spi: mpc5xxx-psc: use devm_clk_get_enabled() for core clock") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230310111544.57342-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 727de4c0876836fdf59ec13c3121880fc939cc3e Author: Lukas Bulwahn Date: Fri Jan 13 09:45:16 2023 +0100 PCI: rcar: Avoid defines prefixed with CONFIG Defines prefixed with "CONFIG" should be limited to proper Kconfig options, that are introduced in a Kconfig file. In the R-car driver the bitmask to configure the SEND_ENABLE mode is named CONFIG_SEND_ENABLE. Rename this local definition to a more suitable name, containing the register bitfield name defined in the R-Car Gen3 rev. 2.30 user manual. No functional change. Link: https://lore.kernel.org/r/20230113084516.31888-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn [lpieralisi@kernel.org: Changed define naming and commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Geert Uytterhoeven commit 2553bacaf953b48c59357f5a622282bc0c45adae Author: Ville Syrjälä Date: Thu Feb 23 17:20:48 2023 +0200 drm/i915: Preserve crtc_state->inherited during state clearing intel_crtc_prepare_cleared_state() is unintentionally losing the "inherited" flag. This will happen if intel_initial_commit() is forced to go through the full modeset calculations for whatever reason. Afterwards the first real commit from userspace will not get forced to the full modeset path, and thus eg. audio state may not get recomputed properly. So if the monitor was already enabled during boot audio will not work until userspace itself does an explicit full modeset. Cc: stable@vger.kernel.org Tested-by: Lee Shawn C Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230223152048.20878-1-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit 14853a0676c126aad836eb249499552fa9d6e85a Author: Slark Xiao Date: Fri Mar 10 18:17:15 2023 +0800 bus: mhi: host: pci_generic: Revert "Add a secondary AT port to Telit FN990" This reverts commit 2d5253a096c6057bbf7caa5520856dcdf7eca8bb. There are 2 commits with commit message "Add a secondary AT port to Telit FN990": commit 2d5253a096c6 ("bus: mhi: host: pci_generic: Add a secondary AT port to Telit FN990") commit 479aa3b0ec2e ("bus: mhi: host: pci_generic: Add a secondary AT port to Telit FN990") This turned out to be due to the patch getting applied through different trees and git settled on a resolution while applying it second time. But the second AT port of Foxconn devices don't work in PCIe mode. So the second commit needs to be reverted. Cc: stable@vger.kernel.org # 6.2 Fixes: 2d5253a096c6 ("bus: mhi: host: pci_generic: Add a secondary AT port to Telit FN990") Signed-off-by: Slark Xiao Reviewed-by: Fabio Porcedda Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20230310101715.69209-1-slark_xiao@163.com [mani: massaged the commit message a bit, added fixes tag and CCed stable] Signed-off-by: Manivannan Sadhasivam commit 3e853b9f89e4bcc8aa342fa350d83ff0df67d7e9 Author: Javier Martinez Canillas Date: Tue Mar 7 22:50:39 2023 +0100 drm/format-helper: Make conversion_buf_size() support sub-byte pixel fmts There are DRM fourcc formats that have pixels smaller than a byte, but the conversion_buf_size() function assumes that pixels are a multiple of bytes and use the struct drm_format_info .cpp field to calculate the dst_pitch. Instead, calculate it by using the bits per pixel (bpp) and divide it by 8 to account for formats that have sub-byte pixels. Signed-off-by: Javier Martinez Canillas Reviewed-by: Arthur Grillo Reviewed-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230307215039.346863-1-javierm@redhat.com commit 424b21e01aafc98a9c086f00b3ad1874302b92fc Author: Arnd Bergmann Date: Wed Mar 8 15:52:53 2023 +0100 mips: ar7: include linux/gpio/driver.h The change to remove the implicit gpio/driver.h include was done after fixing all the other users, but the ar7 file still needs the same change. Reported-by: Naresh Kamboju Fixes: 21d9526d13b5 ("gpiolib: Make the legacy consumer-only") Signed-off-by: Arnd Bergmann Reviewed-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit 67fb1e2958391ff005a049a147aa82920aef7921 Author: Uwe Kleine-König Date: Tue Feb 14 17:28:28 2023 +0100 hwrng: xgene - Simplify using devm_clk_get_optional_enabled() Instead of ignoring errors returned by devm_clk_get() and manually enabling the clk for the whole lifetime of the bound device, use devm_clk_get_optional_enabled(). This is simpler and also more correct as it doesn't ignore errors. This is also more correct because now the call to clk_disable_unprepare() can be dropped from xgene_rng_remove() which happened while the hwrn device was still registered. With the devm callback disabling the clk happens correctly only after devm_hwrng_register() is undone. As a result struct xgene_rng_dev::clk is only used in xgene_rng_probe, and so the struct member can be replaced by a local variable. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu commit 11f92a1308795294b0ad694f6a260c9b9c62fa51 Author: Uwe Kleine-König Date: Tue Feb 14 17:28:27 2023 +0100 hwrng: xgene - Simplify using dev_err_probe() dev_err_probe simplifies the idiom: if (ret != -EPROBE_DEFER) dev_err(...) return ret; , emits the error code in a human readable way and even yields a useful entry in /sys/kernel/debug/devices_deferred in the EPROBE_DEFER case. So simplify and at the same time improve the driver by using dev_err_probe(). Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu commit 4c9edf17c0b44655c565b59a956161a2ee125cca Author: Herbert Xu Date: Mon Feb 13 11:10:05 2023 +0800 crypto: acomp - Be more careful with request flags The request flags for acompress is split into two parts. Part of it may be set by the user while the other part (ALLOC_OUTPUT) is managed by the API. This patch makes the split more explicit by not touching the other bits at all in the two "set" functions that let the user modify the flags. Signed-off-by: Herbert Xu commit b80b848bdf56bd402b7a91aea5b77cec93dfe4c2 Author: Neil Armstrong Date: Wed Mar 8 14:27:33 2023 +0100 dt-bindings: PCI: convert amlogic,meson-pcie.txt to dt-schema Convert the Amlogic Meson AXG DWC PCIe SoC controller bindings to dt-schema. Link: https://lore.kernel.org/r/20221117-b4-amlogic-bindings-convert-v4-5-34e623dbf789@linaro.org Signed-off-by: Neil Armstrong Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Kozlowski commit 3a2776e8a0e156a61f5b59ae341d8fffc730b962 Author: Josh Triplett Date: Sun Nov 13 23:23:26 2022 -0800 PCI: kirin: Select REGMAP_MMIO pcie-kirin uses regmaps, and needs to pull them in; otherwise, with CONFIG_PCIE_KIRIN=y and without CONFIG_REGMAP_MMIO pcie-kirin produces a linker failure looking for __devm_regmap_init_mmio_clk(). Fixes: d19afe7be126 ("PCI: kirin: Use regmap for APB registers") Link: https://lore.kernel.org/r/04636141da1d6d592174eefb56760511468d035d.1668410580.git.josh@joshtriplett.org Signed-off-by: Josh Triplett [lpieralisi@kernel.org: commit log and removed REGMAP select] Signed-off-by: Lorenzo Pieralisi Cc: stable@vger.kernel.org # 5.16+ commit 5910f06503aae3cc4890e562683abc3e38857ff9 Author: Josh Poimboeuf Date: Fri Feb 24 13:35:22 2023 -0800 MAINTAINERS: Add x86 hardware vulnerabilities section Add the bunch of losers who have to deal with this to MAINTAINERS so that they can get explicitly CCed on more hw nightmares. [ bp: Add commit message. ] Signed-off-by: Josh Poimboeuf Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230224213522.nofavod2jzhn22wp@treble commit 17d793f3ed53080dab6bbeabfc82de890c901001 Author: Ping Cheng Date: Fri Feb 24 08:26:43 2023 -0800 HID: wacom: insert timestamp to packed Bluetooth (BT) events To fully utilize the BT polling/refresh rate, a few input events are sent together to reduce event delay. This causes issue to the timestamp generated by input_sync since all the events in the same packet would pretty much have the same timestamp. This patch inserts time interval to the events by averaging the total time used for sending the packet. This decision was mainly based on observing the actual time interval between each BT polling. The interval doesn't seem to be constant, due to the network and system environment. So, using solutions other than averaging doesn't end up with valid timestamps. Signed-off-by: Ping Cheng Reviewed-by: Jason Gerecke Signed-off-by: Jiri Kosina commit c2c99326cc0176cbc3e7c11e97db11ca56077d10 Author: Quan Nguyen Date: Fri Mar 10 15:34:16 2023 +0700 misc: smpro-errmon: Add dimm training failure syndrome Adds event_dimm[0-15]_syndrome sysfs to report the failure syndrome to BMC when DIMM training failed. Signed-off-by: Quan Nguyen Link: https://lore.kernel.org/r/20230310083416.3670980-3-quan@os.amperecomputing.com Signed-off-by: Greg Kroah-Hartman commit b0f64c80cb8c1adcdae59fa09bbc9d34adc29911 Author: Quan Nguyen Date: Fri Mar 10 15:34:15 2023 +0700 misc: smpro-errmon: Add DIMM 2x Refresh rate event In high temperature condition, JEDEC spec requires memory controller to double the refresh rate. This commit adds event_dimm_2x_refresh sysfs to report that events for all memory channels. Signed-off-by: Quan Nguyen Link: https://lore.kernel.org/r/20230310083416.3670980-2-quan@os.amperecomputing.com Signed-off-by: Greg Kroah-Hartman commit ce086a32ae21a01e48d202cf85b43815a0eeccfc Author: Stanislav Lisovskiy Date: Mon Mar 6 10:04:01 2023 +0200 drm/i915: Ensure DSC has enough BW and stays within HW limits We currently have an issue with some BPPs when using DSC. According to the HW team, the reason is that a single VDSC engine instance has some BW limitations that must be accounted for. So, whenever we approach around 90% of the CDCLK, a second VDSC engine has to be used. This always means using two slices. However, in our current code, the amount of slices is calculated independently of whether we need to enable the second VDSC engine or not. This leads to some logical issues when, according to the pixel clock needs, we need to enable the second VDSC engine. But as we calculated previously that we can only use a single slice, we can't do that and fail. So, we need to fix that so that the number of VDSC engines enabled should depend on the number of slices, and the number of slices should also depend on BW requirements. Lastly, we didn't have BPP limitation for ADLP/MTL/DG2 implemented, which says that DSC output BPPs can only be chosen within the range of 8 to 27 (BSpec 49259). All of this applied together allows us to fix existing FIFO underruns, which we have in many DSC tests. v2: - Replace min with clamp_t(Jani Nikula) - Fix commit message(Swati Sharma) - Added "Closes"(Swati Sharma) BSpec: 49259 HSDES: 18027167222 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8231 Signed-off-by: Stanislav Lisovskiy Reviewed-by: Vinod Govindapillai Link: https://patchwork.freedesktop.org/patch/msgid/20230306080401.22552-1-stanislav.lisovskiy@intel.com commit 0433686c6092f65b552eadad651f620e51b6aad1 Author: Andy Shevchenko Date: Fri Feb 24 22:07:45 2023 +0200 devres: Pass unique name of the resource to devm_add_action() Pass the unique name of the resource to devm_add_action(), so it will be easier to debug managed resources. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230224200745.17324-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 295209ca7b5b3aa6375d6190311b2ae804dbcf65 Author: Andy Shevchenko Date: Fri Feb 17 15:33:44 2023 +0200 device property: Clarify description of returned value in some functions Some of the functions do not provide Return: section on absence of which kernel-doc complains. Besides that several functions return the fwnode handle with incremented reference count. Add a respective note to make sure that the caller decrements it when it's not needed anymore. While at it, unify the style of the Return: sections. Reported-by: Daniel Kaehn Signed-off-by: Andy Shevchenko Acked-by: Sakari Ailus Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230217133344.79278-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f8fb576658a3e19796e2e1a12a5ec8f44dac02b6 Author: Saravana Kannan Date: Fri Mar 3 16:53:54 2023 -0800 driver core: Make state_synced device attribute writeable If the file is written to and sync_state() hasn't been called for the device yet, then call sync_state() for the device independent of the state of its consumers. This is useful for supplier devices that have one or more consumers that don't have a driver but the consumers are in a state that don't use the resources supplied by the supplier device. This gives finer grained control than using the fw_devlink.sync_state=timeout kernel commandline parameter. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20230304005355.746421-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit ffbe08a8e86d03513dc45b5389fab7f3477433b6 Author: Saravana Kannan Date: Fri Mar 3 16:53:53 2023 -0800 driver core: Add fw_devlink.sync_state command line param When all devices that could probe have finished probing (based on deferred_probe_timeout configuration or late_initcall() when !CONFIG_MODULES), this parameter controls what to do with devices that haven't yet received their sync_state() calls. fw_devlink.sync_state=strict is the default and the driver core will continue waiting on all consumers of a device to probe successfully before sync_state() is called for the device. This is the default behavior since calling sync_state() on a device when all its consumers haven't probed could make some systems unusable/unstable. When this option is selected, we also print the list of devices that haven't had sync_state() called on them by the time all devices the could probe have finished probing. fw_devlink.sync_state=timeout will cause the driver core to give up waiting on consumers and call sync_state() on any devices that haven't yet received their sync_state() calls. This option is provided for systems that won't become unusable/unstable as they might be able to save power (depends on state of hardware before kernel starts) if all devices get their sync_state(). Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20230304005355.746421-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit a1331535aeb41b08fe0c2c78af51885edc93615b Author: Bjorn Helgaas Date: Tue Mar 7 16:10:51 2023 -0600 net: restore alpha order to Ethernet devices in config The filename "wangxun" sorts between "intel" and "xscale", but xscale/Kconfig contains "Intel XScale" prompts, so Wangxun ends up in the wrong place in the config front-ends. Move wangxun/Kconfig so the Wangxun devices appear in order in the user interface. Fixes: 3ce7547e5b71 ("net: txgbe: Add build support for txgbe") Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20230307221051.890135-1-helgaas@kernel.org Signed-off-by: Jakub Kicinski commit 8fbaced29dc0cef74728a69c4ec8b5534ba542ba Merge: fd9c31f834416 6cc1b2fd736db Author: Jakub Kicinski Date: Thu Mar 9 23:35:49 2023 -0800 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-03-07 (igc) This series contains updates to igc driver only. Muhammad adds tracking and reporting of QBV config errors. Tan Tee adds support for configuring max SDU for each Tx queue. Sasha removes check for alternate media as only one media type is supported. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: igc: Clean up and optimize watchdog task igc: offload queue max SDU from tc-taprio igc: Add qbv_config_change_errors counter ==================== Link: https://lore.kernel.org/r/20230307221332.3997881-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit fd9c31f834416e3060061dbcb45ababaa25cdfe2 Author: Jason Xing Date: Wed Mar 8 10:11:53 2023 +0800 udp: introduce __sk_mem_schedule() usage Keep the accounting schema consistent across different protocols with __sk_mem_schedule(). Besides, it adjusts a little bit on how to calculate forward allocated memory compared to before. After applied this patch, we could avoid receive path scheduling extra amount of memory. Link: https://lore.kernel.org/lkml/20230221110344.82818-1-kerneljasonxing@gmail.com/ Signed-off-by: Jason Xing Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20230308021153.99777-1-kerneljasonxing@gmail.com Signed-off-by: Jakub Kicinski commit d0928c1c5b3db0cd80e867eb49f171f096f03b8c Merge: b3a8df9f27c09 b0ca200077b38 Author: Jakub Kicinski Date: Thu Mar 9 23:28:53 2023 -0800 Merge branch 'main' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Florian Westphal says: ==================== Netfilter updates for net-next 1. nf_tables 'brouting' support, from Sriram Yagnaraman. 2. Update bridge netfilter and ovs conntrack helpers to handle IPv6 Jumbo packets properly, i.e. fetch the packet length from hop-by-hop extension header, from Xin Long. This comes with a test BIG TCP test case, added to tools/testing/selftests/net/. 3. Fix spelling and indentation in conntrack, from Jeremy Sowden. * 'main' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: netfilter: nat: fix indentation of function arguments netfilter: conntrack: fix typo selftests: add a selftest for big tcp netfilter: use nf_ip6_check_hbh_len in nf_ct_skb_network_trim netfilter: move br_nf_check_hbh_len to utils netfilter: bridge: move pskb_trim_rcsum out of br_nf_check_hbh_len netfilter: bridge: check len before accessing more nh data netfilter: bridge: call pskb_may_pull in br_nf_check_hbh_len netfilter: bridge: introduce broute meta statement ==================== Link: https://lore.kernel.org/r/20230308193033.13965-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit b3a8df9f27c094dd41fe88b7b97f64d8dcb7d696 Author: Geert Uytterhoeven Date: Wed Mar 8 14:04:52 2023 +0100 net: ethernet: ti: am65-cpsw: Convert to devm_of_phy_optional_get() Use the new devm_of_phy_optional_get() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven Reviewed-by: Siddharth Vadapalli Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/01605ea233ff7fc09bb0ea34fc8126af73db83f9.1678280599.git.geert+renesas@glider.be Signed-off-by: Jakub Kicinski commit 76b9bf965c98c9b53ef7420b3b11438dbd764f92 Author: Leon Romanovsky Date: Wed Mar 8 11:23:13 2023 +0200 neighbour: delete neigh_lookup_nodev as not used neigh_lookup_nodev isn't used in the kernel after removal of DECnet. So let's remove it. Fixes: 1202cdd66531 ("Remove DECnet support from kernel") Signed-off-by: Leon Romanovsky Reviewed-by: Eric Dumazet Reviewed-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/eb5656200d7964b2d177a36b77efa3c597d6d72d.1678267343.git.leonro@nvidia.com Signed-off-by: Jakub Kicinski commit 62423bd2d2e231951245d77740a58027a2d81ef9 Author: Eric Dumazet Date: Wed Mar 8 18:26:48 2023 +0000 net: sched: remove qdisc_watchdog->last_expires This field mirrors hrtimer softexpires, we can instead use the existing helpers. Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20230308182648.1150762-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 513bdd9473888ba4b1441923c2711cb5ecd06cfd Author: Heiner Kallweit Date: Wed Mar 8 21:19:55 2023 +0100 net: phy: smsc: use phy_set_bits in smsc_phy_config_init Simplify the code by using phy_set_bits(). Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/b64d9f86-d029-b911-bbe9-6ca6889399d7@gmail.com Signed-off-by: Jakub Kicinski commit 6978052448f9eb19f7b03243ac0416104e5ee50d Author: Florian Westphal Date: Wed Mar 8 15:20:06 2023 +0100 netlink: remove unused 'compare' function No users in the tree. Tested with allmodconfig build. Signed-off-by: Florian Westphal Link: https://lore.kernel.org/r/20230308142006.20879-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit efb5b62d72719fd1df1f927542c58d1e21d69e19 Author: Nick Alcock Date: Wed Mar 8 12:12:29 2023 +0000 lib: packing: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Hitomi Hasegawa Cc: Vladimir Oltean Link: https://lore.kernel.org/r/20230308121230.5354-1-nick.alcock@oracle.com Signed-off-by: Jakub Kicinski commit 14296c7d72ec26d18cbe200a43c6d5b7d967ab89 Author: Nick Alcock Date: Wed Mar 8 12:12:30 2023 +0000 mctp: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Hitomi Hasegawa Cc: Jeremy Kerr Cc: Matt Johnston Link: https://lore.kernel.org/r/20230308121230.5354-2-nick.alcock@oracle.com Signed-off-by: Jakub Kicinski commit d0ddf5065ffef45f8fce4001abe0206081c7ff10 Merge: db47fa2e4cbf1 44889ba56cbb3 Author: Jakub Kicinski Date: Thu Mar 9 22:18:59 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Documentation/bpf/bpf_devel_QA.rst b7abcd9c656b ("bpf, doc: Link to submitting-patches.rst for general patch submission info") d56b0c461d19 ("bpf, docs: Fix link to netdev-FAQ target") https://lore.kernel.org/all/20230307095812.236eb1be@canb.auug.org.au/ Signed-off-by: Jakub Kicinski commit 0b31b77f281a1734fe14821c5cc044baea9154fc Merge: 99e0cd4d552a1 d7ba106418d6d Author: Martin K. Petersen Date: Thu Mar 9 22:01:40 2023 -0500 Merge patch series "PCI/AER: Remove redundant Device Control Error Reporting Enable" Bjorn Helgaas says: Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), which appeared in v6.0, the PCI core has enabled PCIe error reporting for all devices during enumeration. Remove driver code to do this and remove unnecessary includes of from several other drivers. Signed-off-by: Martin K. Petersen commit d7ba106418d6d789d238f87535952edb65b0dbea Author: Bjorn Helgaas Date: Tue Mar 7 12:28:42 2023 -0600 scsi: qla4xxx: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since commit f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20230307182842.870378-11-helgaas@kernel.org Cc: Nilesh Javali Cc: Manish Rangankar Cc: GR-QLogic-Storage-Upstream@marvell.com Signed-off-by: Martin K. Petersen commit c5c440bbff8636bb67ec1f60857e0b6311a4c2f0 Author: Bjorn Helgaas Date: Tue Mar 7 12:28:41 2023 -0600 scsi: qla2xxx: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since commit f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20230307182842.870378-10-helgaas@kernel.org Cc: Nilesh Javali Cc: GR-QLogic-Storage-Upstream@marvell.com Signed-off-by: Martin K. Petersen commit edf6722f4ad200c03e190fad31d739e3fe09cf8a Author: Bjorn Helgaas Date: Tue Mar 7 12:28:40 2023 -0600 scsi: mpt3sas: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since commit f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20230307182842.870378-9-helgaas@kernel.org Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Cc: MPT-FusionLinux.pdl@broadcom.com Signed-off-by: Martin K. Petersen commit e891681b1d5d94e18b49e7aef16415bae30ce581 Author: Bjorn Helgaas Date: Tue Mar 7 12:28:39 2023 -0600 scsi: lpfc: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since commit f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20230307182842.870378-8-helgaas@kernel.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Martin K. Petersen commit b2bce40c5b81f9026793c515a9cc1f927a07f496 Author: Bjorn Helgaas Date: Tue Mar 7 12:28:38 2023 -0600 scsi: hpsa: Remove unnecessary pci_disable_pcie_error_reporting() comment Commit 105a3dbc7452 ("hpsa: clean up driver init") added a comment about pci_disable_pcie_error_reporting(), but hpsa has never called either pci_enable_pcie_error_reporting() or pci_disable_pcie_error_reporting(). Since commit f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core is responsible for managing PCIe device error reporting. Remove the comment about pci_disable_pcie_error_reporting(). Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20230307182842.870378-7-helgaas@kernel.org Cc: Don Brace Cc: storagedev@microchip.com Signed-off-by: Martin K. Petersen commit 3afe8d64c4f597f11fadcdbdc6ff84315df2243a Author: Bjorn Helgaas Date: Tue Mar 7 12:28:37 2023 -0600 scsi: csiostor: Remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20230307182842.870378-6-helgaas@kernel.org Signed-off-by: Martin K. Petersen commit b54e1e47b5f5d330a12bcbbad048b8fdcb90709f Author: Bjorn Helgaas Date: Tue Mar 7 12:28:36 2023 -0600 scsi: bfa: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since commit f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20230307182842.870378-5-helgaas@kernel.org Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Signed-off-by: Martin K. Petersen commit 6574fb2580b038f108351ad95aac5ef43a890594 Author: Bjorn Helgaas Date: Tue Mar 7 12:28:35 2023 -0600 scsi: be2iscsi: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since commit f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20230307182842.870378-4-helgaas@kernel.org Cc: Ketan Mukadam Signed-off-by: Martin K. Petersen commit 915b071a6f83a61f7cbd6829cbbe51fc8e98662f Author: Bjorn Helgaas Date: Tue Mar 7 12:28:34 2023 -0600 scsi: arcmsr: Remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20230307182842.870378-3-helgaas@kernel.org Signed-off-by: Martin K. Petersen commit b3e2bf9c967b28a97f1f8e255b206026a777226c Author: Bjorn Helgaas Date: Tue Mar 7 12:28:33 2023 -0600 scsi: aacraid: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since commit f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Also remove pci_disable_pcie_error_reporting() from the .error_detected() path, which was added by commit 5c63f7f710bd ("aacraid: Added EEH support") but looks unnecessary. Error reporting will be disabled by the device reset and will be re-enabled by the pci_restore_state() in aac_pci_slot_reset(). Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20230307182842.870378-2-helgaas@kernel.org Cc: Adaptec OEM Raid Solutions Cc: Raghava Aditya Renukunta Cc: Tomas Henzl Cc: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 63d78b7e8ca2d0eb8c687a355fa19d01b6fcc723 Author: Yonghong Song Date: Thu Mar 9 17:24:10 2023 -0800 selftests/bpf: Workaround verification failure for fexit_bpf2bpf/func_replace_return_code With latest llvm17, selftest fexit_bpf2bpf/func_replace_return_code has the following verification failure: 0: R1=ctx(off=0,imm=0) R10=fp0 ; int connect_v4_prog(struct bpf_sock_addr *ctx) 0: (bf) r7 = r1 ; R1=ctx(off=0,imm=0) R7_w=ctx(off=0,imm=0) 1: (b4) w6 = 0 ; R6_w=0 ; memset(&tuple.ipv4.saddr, 0, sizeof(tuple.ipv4.saddr)); ... ; return do_bind(ctx) ? 1 : 0; 179: (bf) r1 = r7 ; R1=ctx(off=0,imm=0) R7=ctx(off=0,imm=0) 180: (85) call pc+147 Func#3 is global and valid. Skipping. 181: R0_w=scalar() 181: (bc) w6 = w0 ; R0_w=scalar() R6_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) 182: (05) goto pc-129 ; } 54: (bc) w0 = w6 ; R0_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) R6_w=scalar(umax=4294967295,var_off=(0x0; 0xffffffff)) 55: (95) exit At program exit the register R0 has value (0x0; 0xffffffff) should have been in (0x0; 0x1) processed 281 insns (limit 1000000) max_states_per_insn 1 total_states 26 peak_states 26 mark_read 13 -- END PROG LOAD LOG -- libbpf: prog 'connect_v4_prog': failed to load: -22 The corresponding source code: __attribute__ ((noinline)) int do_bind(struct bpf_sock_addr *ctx) { struct sockaddr_in sa = {}; sa.sin_family = AF_INET; sa.sin_port = bpf_htons(0); sa.sin_addr.s_addr = bpf_htonl(SRC_REWRITE_IP4); if (bpf_bind(ctx, (struct sockaddr *)&sa, sizeof(sa)) != 0) return 0; return 1; } ... SEC("cgroup/connect4") int connect_v4_prog(struct bpf_sock_addr *ctx) { ... return do_bind(ctx) ? 1 : 0; } Insn 180 is a call to 'do_bind'. The call's return value is also the return value for the program. Since do_bind() returns 0/1, so it is legitimate for compiler to optimize 'return do_bind(ctx) ? 1 : 0' to 'return do_bind(ctx)'. However, such optimization breaks verifier as the return value of 'do_bind()' is marked as any scalar which violates the requirement of prog return value 0/1. There are two ways to fix this problem, (1) changing 'return 1' in do_bind() to e.g. 'return 10' so the compiler has to do 'do_bind(ctx) ? 1 :0', or (2) suggested by Andrii, marking do_bind() with __weak attribute so the compiler cannot make any assumption on do_bind() return value. This patch adopted adding __weak approach which is simpler and more resistant to potential compiler optimizations. Suggested-by: Andrii Nakryiko Signed-off-by: Yonghong Song Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230310012410.2920570-1-yhs@fb.com commit 99e0cd4d552a152c4e453511997441d1d0dde3cc Merge: 7466a7a33f376 0c2fb17011550 Author: Martin K. Petersen Date: Thu Mar 9 21:50:53 2023 -0500 Merge patch series "Add poll support for hisi_sas v3 hw" chenxiang says: To support IO_URING IOPOLL support for hisi_sas, we need to: - Add and fill mq_poll interface to poll queue; - Ensure internal I/Os (including internal abort I/Os) are delivered and completed through non-iopoll queue (queue 0); Sending internal abort commands to non-poll queue actually requires to sending the abort command to every queue. This carries a a risk. Make iopoll support module parameter "experimental". I have tested performance on v3 hw with different modes as follows. 4K READs and 4K WRITEs both see an improvement when enabling poll mode: 4K READ 4K RANDREAD 4K WRITE 4K RANDWRITE interrupt + libaio 1770k 1316k 1197k 831k interrupt + io_uring 1848k 1390k 1238k 857k iopoll + io_uring 2117k 1364k 1874k 849k Signed-off-by: Martin K. Petersen commit 0c2fb1701155062b842cdff69475482029fa8b14 Author: Xiang Chen Date: Tue Mar 7 14:09:15 2023 +0800 scsi: hisi_sas: Add device attribute experimental_iopoll_q_cnt for v3 hw Add device attribute experimental_iopoll_q_cnt to indicate how many iopoll queues are used for v3 hw. Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1678169355-76215-5-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen commit b711ef5e176bf47c10c0d24e21c1486b5331d33f Author: Xiang Chen Date: Tue Mar 7 14:09:14 2023 +0800 scsi: hisi_sas: Sync complete queue for poll queue Currently we sync irq to avoid freeing task before using task in I/O completion. After adding io_uring support, we need to do something similar for poll queues. As the process of CQ entries on poll queue are protected by spinlock cq->lock, we can use spin_lock() + spin_unlock() on cq->lock to make sure that CQ entries are processed to completion and then the complete queue is synced. Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1678169355-76215-4-git-send-email-chenxiang66@hisilicon.com Reviewed-by: John Garry Signed-off-by: Martin K. Petersen commit 0e47effa77067d0e5fdd41871941d2b3d38a0e61 Author: Xiang Chen Date: Tue Mar 7 14:09:13 2023 +0800 scsi: hisi_sas: Add poll support for v3 hw Add a module parameter to set how many queues are used for iopoll. Also fill the interface mq_poll. For internal I/Os from libsas and libata we use non-iopoll queue (queue 0) to deliver and complete them. But for internal abort I/Os, just don't send them for poll queues. There is still a risk associated as this sends internal abort commands to non-iopoll queues which actually requires sending an internal abort command to every queue. As a result, make the module parameter as "experimental" for now. Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1678169355-76215-3-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen commit 538a60468966f47c53071d06db27bb78c2aaa81d Author: Xiang Chen Date: Tue Mar 7 14:09:12 2023 +0800 scsi: hisi_sas: Add function complete_v3_hw() Put the work of processing cq slots in a separate function, complete_v3_hw(), which can then be used by cq_thread_v3_hw() and other functions when adding poll support. Co-developed-by: John Garry Signed-off-by: John Garry Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1678169355-76215-2-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen commit 7466a7a33f376e2c0bc17f9b1e4c1fb8620fd4e2 Merge: 04d02221dbf9d 31177b74790cc Author: Martin K. Petersen Date: Thu Mar 9 21:35:58 2023 -0500 Merge patch series "scsi: target: make RTPI an TPG identifier" Dmitry Bogdanov says: SAM-5 4.6.5.2 (Relative Port Identifier attribute) defines the attribute as unique across SCSI target ports: The Relative Port Identifier attribute identifies a SCSI target port or a SCSI initiator port relative to other SCSI ports in a SCSI target device and any SCSI initiator devices contained within that SCSI target device. A SCSI target device may assign relative port identifiers to its SCSI target ports and any SCSI initiator ports. If relative port identifiers are assigned, the SCSI target device shall assign each of its SCSI target ports and any SCSI initiator ports a unique relative port identifier from 1 to 65 535. SCSI target ports and SCSI initiator ports share the same number space. In the current TCM implementation, auto-incremented lun_rtpi weakly follows the model outlined by SAM-5 and SPC-4. In case of multiple SCSI target ports (se_portal_groups), which is common to scenario with multiple HBAs or multiple iSCSI/FC targets, it's possible to have two backstores (se_devices) with different values of lun_rtpi on the same SCSI target port. Similar issue happens during re-export. If a LUN of a backstore is removed from a target port and added again to the same target port, RTPI is incremented again and will be different from the first time. The two issues happen because each se_device increments RTPI for its own LUNs independently. The behaviour means that a SCSI application client can't reliably make any sense of RTPI values reported by a LUN as it's not really related to SCSI target ports. A conforming target implementation must ensure that RTPI field is unique per port. The patchset resolves the issue. Make RTPI be part of se_tpg instead of se_lun. Make it configurable. Signed-off-by: Martin K. Petersen commit 31177b74790cc566200f30705bf9a83d168da893 Author: Dmitry Bogdanov Date: Wed Mar 1 11:45:12 2023 +0300 scsi: target: core: Add RTPI attribute for target port RELATIVE TARGET PORT IDENTIFIER can be read and configured via configfs: $ echo 0x10 > $TARGET/tpgt_N/rtpi RTPI can be changed only on disabled target ports. Co-developed-by: Roman Bolshakov Signed-off-by: Roman Bolshakov Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230301084512.21956-5-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit 5fe99dace4313b0061d46f69e32f981956c92445 Author: Roman Bolshakov Date: Wed Mar 1 11:45:11 2023 +0300 scsi: target: core: Drop device-based RTPI The code is not needed since target port-based RTPI allocation replaced it. Reviewed-by: Christoph Hellwig Signed-off-by: Roman Bolshakov Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230301084512.21956-4-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit b9e063adfb8a812d9c47ff690e645086c6f76f42 Author: Roman Bolshakov Date: Wed Mar 1 11:45:10 2023 +0300 scsi: target: core: Use RTPI from target port Replace all references to RTPI from LUN field to se_portal_group field. It introduces consistent reporting of RTPI for all LUNs and all target ports. Reviewed-by: Christoph Hellwig Signed-off-by: Roman Bolshakov Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230301084512.21956-3-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit 3f4b9cb4133a4ecf16447cbd5fdb8ed618593bf8 Author: Dmitry Bogdanov Date: Wed Mar 1 11:45:09 2023 +0300 scsi: target: core: Add RTPI field to target port SAM-5 4.6.5.2 (Relative Port Identifier attribute) defines the attribute as unique across SCSI target ports. The change introduces RTPI attribute to se_portal group. The value is unique across all enabled SCSI target ports. It also limits number of SCSI target ports to 65535. Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20230301084512.21956-2-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit 04d02221dbf9dec37b814baae118d6bc0e2ddad6 Merge: a4c2673caed9a 22871fe3b6829 Author: Martin K. Petersen Date: Thu Mar 9 21:22:40 2023 -0500 Merge patch series "lpfc: Update lpfc to revision 14.2.0.11" Justin Tee says: Update lpfc to revision 14.2.0.11 This patch set contains bug fixes for buffer overflow, resource management, discovery, and HBA error status handling. The patches were cut against Martin's 6.3/scsi-queue tree. Justin Tee (10): lpfc: Protect against potential lpfc_debugfs_lockstat_write buffer overflow lpfc: Reorder freeing of various dma buffers and their list removal lpfc: Fix lockdep warning for rx_monitor lock when unloading driver lpfc: Record LOGO state with discovery engine even if aborted lpfc: Defer issuing new PLOGI if received RSCN before completing REG_LOGIN lpfc: Correct used_rpi count when devloss tmo fires with no recovery lpfc: Skip waiting for register ready bits when in unrecoverable state lpfc: Revise lpfc_error_lost_link reason code evaluation logic lpfc: Update lpfc version to 14.2.0.11 lpfc: Copyright updates for 14.2.0.11 patches Signed-off-by: Martin K. Petersen commit 22871fe3b6829f7d9905c45044ab2d806e6f12e9 Author: Justin Tee Date: Wed Mar 1 15:16:26 2023 -0800 scsi: lpfc: Copyright updates for 14.2.0.11 patches Update copyrights to 2023 for files modified in the 14.2.0.11 patch set. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20230301231626.9621-11-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 13b149bbcf73963122c34d7d51b8739e2ef33605 Author: Justin Tee Date: Wed Mar 1 15:16:25 2023 -0800 scsi: lpfc: Update lpfc version to 14.2.0.11 Update lpfc version to 14.2.0.11. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20230301231626.9621-10-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 796876fdaefe504a2f3abe7445d57e886a2af139 Author: Justin Tee Date: Wed Mar 1 15:16:24 2023 -0800 scsi: lpfc: Revise lpfc_error_lost_link() reason code evaluation logic Extended status reason code errors should mask off the IOERR_PARAM_MASK before checking strict equalities for IOERR values. Update the lpfc_error_lost_link() routine as such. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20230301231626.9621-9-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 27c2bcf00ade1aefedd6298fcc151704c2d8ce6d Author: Justin Tee Date: Wed Mar 1 15:16:23 2023 -0800 scsi: lpfc: Skip waiting for register ready bits when in unrecoverable state During tolerance tests that force an HBA to become unresponsive, rmmod hangs resulting in the inability to remove the driver. The lpfc_pci_remove_one_s4() routine attempts to submit a clean up mailbox command via the lpfc_sli4_post_sync_mbox() routine, but ends up waiting forever for a mailbox register to set its ready bit. Because the HBA is in an unrecoverable and unresponsive state, the ready bit will never be set. Create a new routine called lpfc_sli4_unrecoverable_port(), which checks a port status register's error notification bits. Use the lpfc_sli4_unrecoverable_port() routine in ready bit check routines to early return error if port is deemed unrecoverable. Also, when the lpfc_handle_eratt_s4() handler detects an unrecoverable state, call the lpfc_sli4_offline_eratt() routine to kick off flushing outstanding I/O. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20230301231626.9621-8-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit db651ec22524eb8f9c854fbb4d9acd5d7e5be9e4 Author: Justin Tee Date: Wed Mar 1 15:16:22 2023 -0800 scsi: lpfc: Correct used_rpi count when devloss tmo fires with no recovery A fabric controller can sometimes send an RDP request right before a link down event. Because of this outstanding RDP request, the driver does not remove the last reference count on its ndlp causing a potential leak of RPI resources when devloss tmo fires. In lpfc_cmpl_els_rsp(), modify the NPIV clause to always allow the lpfc_drop_node() routine to execute when not registered with SCSI transport. This relaxes the contraint that an NPIV ndlp must be in a specific state in order to call lpfc_drop node. Logic is revised such that the lpfc_drop_node() routine is always called to ensure the last ndlp decrement occurs. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20230301231626.9621-7-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 1d0f9fea5d7f48078a706c90e4fd79cf697b5b3c Author: Justin Tee Date: Wed Mar 1 15:16:21 2023 -0800 scsi: lpfc: Defer issuing new PLOGI if received RSCN before completing REG_LOGIN When mapped to a target with multiple virtual ports, a link bounce sometimes results in unsuccessful rediscovery of all of the target's virtual ports. This is because a succession of repeat RSCNs for the virtual target ports leaves ndlps in the REG_LOGIN state with the NLP_REG_LOGIN_SEND flag set. With NLP_REG_LOGIN_SEND set, during the next PLOGI, the driver will UNREG_RPI. When UNREG_RPI is processed, the driver can be in the middle of PRLI_ISSUE or MAPPED state resulting in an illegal state transition by the discovery engine and stalling. Fix by calling the discovery state machine with DEVICE_RECOVERY event during RSCN processing. This will set the NLP_IGNR_REG_CMPL bit and prevent the old REG_LOGIN state from advancing. Then for the new PLOGI issue, add the check for the NLP_IGNR_REG_CMPL bit to delay issuing the new PLOGI until the queued REG_LOGIN and UNREG_LOGIN have been processed. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20230301231626.9621-6-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 06578ac65e2ae9e4288e42202f67d93bd52eef45 Author: Justin Tee Date: Wed Mar 1 15:16:20 2023 -0800 scsi: lpfc: Record LOGO state with discovery engine even if aborted A target vendor array reboot in P2P topology can sometimes result in unsuccessful rediscovery. Rework the lpfc_cmpl_els_logo() routine such that when the LOGO completes as a failure because of driver abort, the LOGO state is still recorded with the discovery state machine. This is a small rework to set LOGO completion without forcing a device removal state change. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20230301231626.9621-5-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit c0d6071aa26f2989fada9a66b216419965f207db Author: Justin Tee Date: Wed Mar 1 15:16:19 2023 -0800 scsi: lpfc: Fix lockdep warning for rx_monitor lock when unloading driver Lockdep enabled kernels report a theoretical deadlock state where the cmf_timer interrupt occurs while the rx_monitor ring is being destroyed. During rmmod, the cmf_timer is cancelled prior to the lpfc_rx_monitor_destroy_ring call. This actually eliminates the need to take the rx_monitor ring lock in lpfc_rx_monitor_destroy_ring. Thus, just remove lock/unlock of rx_monitor in lpfc_rx_monitor_destroy_ring. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20230301231626.9621-4-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit bf21c9bb624c85f499be271cc1b3d41bec50f7bd Author: Justin Tee Date: Wed Mar 1 15:16:18 2023 -0800 scsi: lpfc: Reorder freeing of various DMA buffers and their list removal Code sections where DMA resources are freed before list removal are reworked to ensure item removal before being freed. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20230301231626.9621-3-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit c6087b82a9146826564a55c5ca0164cac40348f5 Author: Justin Tee Date: Wed Mar 1 15:16:17 2023 -0800 scsi: lpfc: Prevent lpfc_debugfs_lockstat_write() buffer overflow A static code analysis tool flagged the possibility of buffer overflow when using copy_from_user() for a debugfs entry. Currently, it is possible that copy_from_user() copies more bytes than what would fit in the mybuf char array. Add a min() restriction check between sizeof(mybuf) - 1 and nbytes passed from the userspace buffer to protect against buffer overflow. Link: https://lore.kernel.org/r/20230301231626.9621-2-justintee8345@gmail.com Signed-off-by: Justin Tee Signed-off-by: Martin K. Petersen commit a4c2673caed9a5705b78898004ea066c29d8cafe Author: Tetsuo Handa Date: Wed Feb 22 00:02:46 2023 +0900 scsi: message: fusion: Avoid flush_scheduled_work() usage Like commit c4f135d64382 ("workqueue: Wrap flush_workqueue() using a macro") says, flush_scheduled_work() is dangerous and will be forbidden. Commit 4d4109d0eb69 ("[SCSI] mpt fusion: Power Management fixes for MPT SAS PCI-E controllers") added flush_scheduled_work() call into mptscsih_suspend(). As of commit 4d4109d0eb69, there were several schedule{,_delayed}_work() calls where flush_scheduled_work() from mptscsih_suspend() meant to wait for completion. However, which work items this flush_scheduled_work() call was for was not explained. Then, schedule_work("struct mptsas_hotplug_event"->work) and schedule_work(MPT_ADAPTER->sas_persist_task) have been removed by commit 3eb0822c6740 ("[SCSI] mpt fusion: Firmware event implementation using seperate WorkQueue"), and schedule_work("struct mptsas_send_discovery_event"->work) has been removed by commit f9c34022eae9 ("[SCSI] mpt fusion: SAS topology scan changes, expander events"). There still remains schedule_work("struct work_queue_wrapper"->work) call in mptspi.c and schedule_delayed_work("struct mpt_lan_priv"->work) call in mptlan.c , but I guess that these are not work items which commit 4d4109d0eb69 meant to wait for completion because these are not per MPT_ADAPTER work items. If my guess is correct, we no longer need to call flush_scheduled_work() from mptscsih_suspend(). Link: https://lore.kernel.org/r/0b9ebcfb-b647-1381-0653-b54528a64a86@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Signed-off-by: Martin K. Petersen commit 314550680a0021481dc5dc0400a0b586ce87ac7e Author: Tetsuo Handa Date: Wed Feb 22 00:02:41 2023 +0900 scsi: message: fusion: Remove unused sas_persist_task work MPT_ADAPTER->sas_persist_task is no longer used since commit 3eb0822c6740 ("[SCSI] mpt fusion: Firmware event implementation using seperate WorkQueue"). Link: https://lore.kernel.org/r/b2ca2164-5347-8ec1-d8b6-3225df864173@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Signed-off-by: Martin K. Petersen commit d0b50c64def4cd089388e1d5c5cf8d0b6cbb1710 Author: Jiapeng Chong Date: Thu Feb 9 11:52:24 2023 +0800 scsi: be2iscsi: Remove unused variable internal_page_offset The variable 'internal_page_offset' is not used. Delete it. drivers/scsi/be2iscsi/be_cmds.c:1176:6: warning: variable 'internal_page_offset' set but not used. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4011 Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20230209035224.90327-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Martin K. Petersen commit 4a4c459872f154acf872dfa6baf5d1edabd52323 Merge: fe15c26ee26ef ce173474cf19f Author: Palmer Dabbelt Date: Thu Mar 9 15:46:40 2023 -0800 Merge patch series "riscv, mm: detect svnapot cpu support at runtime" Qinglin Pan says: Svnapot is a RISC-V extension for marking contiguous 4K pages as a non-4K page. This patch set is for using Svnapot in hugetlb fs and huge vmap. This patchset adds a Kconfig item for using Svnapot in "Platform type"->"SVNAPOT extension support". Its default value is on, and people can set it off if they don't allow kernel to detect Svnapot hardware support and leverage it. Tested on: - qemu rv64 with "Svnapot support" off and svnapot=true. - qemu rv64 with "Svnapot support" on and svnapot=true. - qemu rv64 with "Svnapot support" off and svnapot=false. - qemu rv64 with "Svnapot support" on and svnapot=false. * b4-shazam-merge: riscv: mm: support Svnapot in huge vmap riscv: mm: support Svnapot in hugetlb page riscv: mm: modify pte format for Svnapot Link: https://lore.kernel.org/r/20230209131647.17245-1-panqinglin00@gmail.com [Palmer: fix up the feature ordering in the merge] Signed-off-by: Palmer Dabbelt commit bb13bd587d53033f1151699b7522f979e2930ea6 Author: Eddie James Date: Thu Feb 23 09:48:26 2023 -0600 ARM: dts: aspeed: bonnell: Update eeprom size An eeprom had an incorrect size. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit f90f462964ff92eb28a469574df7eda1b2da595d Author: Eddie James Date: Wed Mar 8 16:24:03 2023 -0600 ARM: dts: aspeed: bonnell: Remove MAC3 Bonnell is populated with only one ethernet controller. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20230308222403.1848795-1-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit ed6f068330494e849b77a32b23842c6f73f57aa9 Author: Eddie James Date: Tue Feb 21 19:50:56 2023 -0600 ARM: dts: aspeed: everest: Add reserved memory for TPM event log Trusted boot support requires the platform event log passed up from the bootloader. In U-Boot, this can now be accomplished with a reserved memory region, so add a region for this purpose to the Everest BMC devicetree. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20230222015056.3903734-1-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit e213ced19befc09d6d6913799053b67896596cd1 Author: Tirthendu Sarkar Date: Fri Mar 10 00:26:15 2023 +0530 i40e: add support for XDP multi-buffer Rx This patch adds multi-buffer support for the i40e_driver. i40e_clean_rx_irq() is modified to collate all the buffers of a packet before calling the XDP program. xdp_buff is built for the first frag of the packet and subsequent frags are added to it. 'next_to_process' is incremented for all non-EOP frags while 'next_to_clean' stays at the first descriptor of the packet. XDP program is called only on receiving EOP frag. New functions are added for adding frags to xdp_buff and for post processing of the buffers once the xdp prog has run. For XDP_PASS this results in a skb with multiple fragments. i40e_build_skb() builds the skb around xdp buffer that already contains frags data. So i40e_add_rx_frag() helper function is now removed. Since fields before 'dataref' in skb_shared_info are cleared during napi_skb_build(), xdp_update_skb_shared_info() is called to set those. For i40e_construct_skb(), all the frags data needs to be copied from xdp_buffer's shared_skb_info to newly constructed skb's shared_skb_info. This also means 'skb' does not need to be preserved across i40e_napi_poll() calls and hence is removed from i40e_ring structure. Previously i40e_alloc_rx_buffers() was called for every 32 cleaned buffers. For multi-buffers this may not be optimal as there may be more cleaned buffers in each i40e_clean_rx_irq() call. So this is now called when at least half of the ring size has been cleaned. Signed-off-by: Tirthendu Sarkar Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit 01aa49e31e1674e22dd9c868ca6b4b945acd621e Author: Tirthendu Sarkar Date: Fri Mar 10 00:26:14 2023 +0530 i40e: add xdp_buff to i40e_ring struct Store xdp_buff on Rx ring struct in preparation for XDP multi-buffer support. This will allow us to combine fragmented frames across separate NAPI cycles in the same way as currently skb fragments are handled. This means that skb pointer on Rx ring will become redundant and will be removed in a later patch. As a consequence i40e_trace() now uses xdp instead of skb pointer. Truesize only needs to be calculated for page sizes bigger than 4k as it is always half-page for 4k pages. With xdp_buff on ring, frame size can now be set during xdp_init_buff() and need not be repopulated in each NAPI call for 4k pages. As a consequence i40e_rx_frame_truesize() is now used only for bigger pages. Signed-off-by: Tirthendu Sarkar Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit e9031f2da1aef34b0b4c659ead613c335b46ae92 Author: Tirthendu Sarkar Date: Fri Mar 10 00:26:13 2023 +0530 i40e: introduce next_to_process to i40e_ring Add a new field called next_to_process in the i40e_ring that is advanced for every buffer and change the semantics of next_to_clean to point to the first buffer of a packet. Driver will use next_to_process in the same way next_to_clean was used previously. For the non multi-buffer case, next_to_process and next_to_clean will always be the same since each packet consists of a single buffer. Signed-off-by: Tirthendu Sarkar Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit 2bc0de9aca3ebdf24674f5a2a7890fde6304f5ca Author: Tirthendu Sarkar Date: Fri Mar 10 00:26:12 2023 +0530 i40e: use frame_sz instead of recalculating truesize for building skb In skb path truesize is calculated while building skb. This is now avoided and xdp->frame_is used instead for both i40e_build_skb() and i40e_construct_skb(). Signed-off-by: Tirthendu Sarkar Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit 03e88c8a791c0655ddea07fd4c7cd6cb16087c8f Author: Tirthendu Sarkar Date: Fri Mar 10 00:26:11 2023 +0530 i40e: Change size to truesize when using i40e_rx_buffer_flip() Truesize is now passed directly to i40e_rx_buffer_flip() instead of size so that it does not need to recalculate truesize from size using i40e_rx_frame_truesize() before adjusting page offset. With these change the function can now be used during skb building and adding frags. In later patches it will also be easier for adjusting page offsets for multi-buffers. Signed-off-by: Tirthendu Sarkar Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit e2843f037127c3a9db26718aaa293d2a8e5881e4 Author: Tirthendu Sarkar Date: Fri Mar 10 00:26:10 2023 +0530 i40e: add pre-xdp page_count in rx_buffer Page count of rx_buffer needs to be stored prior to XDP call to prevent page recycling in case that buffer would be freed within xdp redirect path. Instead of storing it on the stack, now it is stored in the rx_buffer struct. This will help in processing multi-buffers as the page counts of all rx_buffers (of the same packet) don't need to be stored on stack. Signed-off-by: Tirthendu Sarkar Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit f7f732a7196d2e876639b1af453b30a6a5fe4a90 Author: Tirthendu Sarkar Date: Fri Mar 10 00:26:09 2023 +0530 i40e: change Rx buffer size for legacy-rx to support XDP multi-buffer Adding support for XDP multi-buffer entails adding information of all the fragments of the packet in the xdp_buff. This approach implies that underlying buffer has to provide tailroom for skb_shared_info. In the legacy-rx mode, driver can only configure up to 2k sized Rx buffers and with the current configuration of 2k sized Rx buffers there is no way to do tailroom reservation for skb_shared_info. Hence size of Rx buffers is now lowered to 2048 - sizeof(skb_shared_info). Also, driver can only chain up to 5 Rx buffers and this means max MTU supported for legacy-rx is now 8614 (5 * rx_buffer_len - ETH header with VLAN). Signed-off-by: Tirthendu Sarkar Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit a4ba62906db80246b24408e5c8a9e9d78b647b00 Author: Tirthendu Sarkar Date: Fri Mar 10 00:26:08 2023 +0530 i40e: consolidate maximum frame size calculation for vsi Introduce new helper function to calculate max frame size for validating and setting of vsi frame size. This is used while configuring vsi, changing the MTU and attaching an XDP program to the vsi. This is in preparation of the legacy rx and multi-buffer changes to be introduced in later patches. Signed-off-by: Tirthendu Sarkar Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit 7deabd67498869640c937c9bd83472574b7dea0b Author: Jason Baron Date: Fri Mar 3 11:50:56 2023 -0500 dyndbg: use the module notifier callbacks Bring dynamic debug in line with other subsystems by using the module notifier callbacks. This results in a net decrease in core module code. Additionally, Jim Cromie has a new dynamic debug classmap feature, which requires that jump labels be initialized prior to dynamic debug. Specifically, the new feature toggles a jump label from the existing dynamic_debug_setup() function. However, this does not currently work properly, because jump labels are initialized via the 'module_notify_list' notifier chain, which is invoked after the current call to dynamic_debug_setup(). Thus, this patch ensures that jump labels are initialized prior to dynamic debug by setting the dynamic debug notifier priority to 0, while jump labels have the higher priority of 1. Tested by Jim using his new test case, and I've verfied the correct printing via: # modprobe test_dynamic_debug dyndbg. Link: https://lore.kernel.org/lkml/20230113193016.749791-21-jim.cromie@gmail.com/ Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202302190427.9iIK2NfJ-lkp@intel.com/ Tested-by: Jim Cromie Reviewed-by: Vincenzo Palazzo Cc: Peter Zijlstra CC: Jim Cromie Cc: Luis Chamberlain Cc: Greg Kroah-Hartman Signed-off-by: Jason Baron Signed-off-by: Luis Chamberlain commit 85c37208b0cb178084600dd01d9f97a32b6a21ea Author: Jason Baron Date: Fri Mar 3 11:50:55 2023 -0500 dyndbg: remove unused 'base' arg from __ddebug_add_module() The 'base' parameter to __ddebug_add_module() is no longer in use after: Commit b7b4eebdba7b ("dyndbg: gather __dyndbg[] state into struct _ddebug_info"). Cc: Jim Cromie Cc: Greg Kroah-Hartman Tested-by: Jim Cromie Reviewed-by: Vincenzo Palazzo Signed-off-by: Jason Baron Signed-off-by: Luis Chamberlain commit 042edf1ebb49a63f299c4cdfb9c1e2ba299c0b91 Author: Thomas Weißschuh Date: Sat Feb 4 05:44:46 2023 +0000 module: make module_ktype structure constant Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Signed-off-by: Thomas Weißschuh Signed-off-by: Luis Chamberlain commit efaa2496bae66f0a78efa60d9b73ceef5ec63d79 Author: Randy Dunlap Date: Mon Feb 13 16:54:00 2023 -0800 module: fix MIPS module_layout -> module_memory Correct the struct's field/member name from mod_mem to mem. Fixes this build error: ../arch/mips/kernel/vpe.c: In function 'vpe_elfload': ../arch/mips/kernel/vpe.c:643:41: error: 'struct module' has no member named 'mod_mem' 643 | v->load_addr = alloc_progmem(mod.mod_mem[MOD_TEXT].size); Fixes: 2ece476a2346 ("module: replace module_layout with module_memory") Signed-off-by: Randy Dunlap Cc: Song Liu Cc: Luis Chamberlain Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Signed-off-by: Luis Chamberlain commit 9e07f161717ab8e8ac1206bf82546511e24cbb7b Author: Jiapeng Chong Date: Fri Feb 10 14:42:43 2023 +0800 module: Remove the unused function within The function within is defined in the main.c file, but not called elsewhere, so remove this unused function. This routine became no longer used after commit ("module: replace module_layout with module_memory"). kernel/module/main.c:3007:19: warning: unused function 'within'. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4035 Signed-off-by: Jiapeng Chong [mcgrof: adjust commit log to explain why this change is needed] Signed-off-by: Luis Chamberlain commit ac3b43283923440900b4f36ca5f9f0b1ca43b70e Author: Song Liu Date: Mon Feb 6 16:28:02 2023 -0800 module: replace module_layout with module_memory module_layout manages different types of memory (text, data, rodata, etc.) in one allocation, which is problematic for some reasons: 1. It is hard to enable CONFIG_STRICT_MODULE_RWX. 2. It is hard to use huge pages in modules (and not break strict rwx). 3. Many archs uses module_layout for arch-specific data, but it is not obvious how these data are used (are they RO, RX, or RW?) Improve the scenario by replacing 2 (or 3) module_layout per module with up to 7 module_memory per module: MOD_TEXT, MOD_DATA, MOD_RODATA, MOD_RO_AFTER_INIT, MOD_INIT_TEXT, MOD_INIT_DATA, MOD_INIT_RODATA, and allocating them separately. This adds slightly more entries to mod_tree (from up to 3 entries per module, to up to 7 entries per module). However, this at most adds a small constant overhead to __module_address(), which is expected to be fast. Various archs use module_layout for different data. These data are put into different module_memory based on their location in module_layout. IOW, data that used to go with text is allocated with MOD_MEM_TYPE_TEXT; data that used to go with data is allocated with MOD_MEM_TYPE_DATA, etc. module_memory simplifies quite some of the module code. For example, ARCH_WANTS_MODULES_DATA_IN_VMALLOC is a lot cleaner, as it just uses a different allocator for the data. kernel/module/strict_rwx.c is also much cleaner with module_memory. Signed-off-by: Song Liu Cc: Luis Chamberlain Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Guenter Roeck Cc: Christophe Leroy Reviewed-by: Thomas Gleixner Reviewed-by: Christophe Leroy Reviewed-by: Luis Chamberlain Signed-off-by: Luis Chamberlain commit 913e013e9e1a331b3cdc3d0a033e120d630a80aa Author: Daniele Ceraolo Spurio Date: Thu Feb 23 09:21:20 2023 -0800 drm/i915/gsc: Fix race between HW init and GSC FW load The GSC FW load is a slow process (up to 250 ms), so we defer it to a dedicated worker to avoid stalling the init flow for that long. However, we currently start this worker before the HW init is complete, so there is a chance that the GSC loading code submits to the HW before the engine initialization has completed. We can easily fix this by starting the thread later in the gt_resume flow. From this later spot, the GSC code can still race with the default submission code; we functionally don't care who wins the race (the GSC load doesn't need any state), but since the whole point of the separate worker is to make the main thread faster, we prefer the default submission code to run first. Therefore, make an exception for driver probe and only and start the gsc load from uc_init_late. Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20230223172120.3304293-3-daniele.ceraolospurio@intel.com commit b09f9670b130380ebace4ce378ec04cb7d042871 Author: Daniele Ceraolo Spurio Date: Thu Feb 23 09:21:19 2023 -0800 drm/i915/gsc: flush the GSC worker before wedging on unload If we unload the driver and wedge before the GSC worker is complete, the worker will hit an error on its submission to the GSC engine and then exit. This is hard to hit for a user, but it is reproducible with skipping selftests. The error is handled gracefully by the worker, so there are no functional issues, but we still end up with an error message in dmesg, which is something we want to avoid as this is a supported scenario. We could modify the worker to better handle a wedging occurring during its execution, but that gets complicated for a couple of reasons: - We do want the error on runtime wedging, because there are implications for subsystems outside of GT (i.e., PXP, HDCP), it's only the error on driver unload that we want to silence. - The worker is responsible for multiple submissions (GSC FW load, HuC auth, SW proxy), so all of those will have to be adapted to handle the wedged_on_fini scenario. Therefore, it's much simpler to just wait for the worker to be done before wedging on driver removal, also considering that the worker will likely already be idle in the great majority of non-selftest scenarios. Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Reviewed-by: Alan Previn Link: https://patchwork.freedesktop.org/patch/msgid/20230223172120.3304293-2-daniele.ceraolospurio@intel.com commit c1cd734c1bb3f4d9db75c51c23306e29d8749783 Author: Lorenzo Bianconi Date: Thu Mar 9 18:32:41 2023 +0100 selftests/bpf: Improve error logs in XDP compliance test tool Improve some error logs reported in the XDP compliance test tool. Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/212fc5bd214ff706f6ef1acbe7272cf4d803ca9c.1678382940.git.lorenzo@kernel.org commit 27a36bc3cdd5e0420eea90762d69bea34daf97e1 Author: Lorenzo Bianconi Date: Thu Mar 9 18:32:40 2023 +0100 selftests/bpf: Use ifname instead of ifindex in XDP compliance test tool Rely on interface name instead of interface index in error messages or logs from XDP compliance test tool. Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/7dc5a8ff56c252b1a7ae29b059d0b2b1543c8b5d.1678382940.git.lorenzo@kernel.org commit 5a70f4a63000ba68004fb3c1aaf2f90303dd228f Author: Michael Weiß Date: Thu Mar 9 14:38:23 2023 +0100 bpf: Fix a typo for BPF_F_ANY_ALIGNMENT in bpf.h Fix s/BPF_PROF_LOAD/BPF_PROG_LOAD/ typo in the documentation comment for BPF_F_ANY_ALIGNMENT in bpf.h. Signed-off-by: Michael Weiß Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230309133823.944097-1-michael.weiss@aisec.fraunhofer.de commit a6865576317f6249f3f83cf4c10ab56e627ee153 Author: Martin KaFai Lau Date: Wed Mar 8 22:02:44 2023 -0800 selftests/bpf: Fix flaky fib_lookup test There is a report that fib_lookup test is flaky when running in parallel. A symptom of slowness or delay. An example: Testing IPv6 stale neigh set_lookup_params:PASS:inet_pton(IPV6_IFACE_ADDR) 0 nsec test_fib_lookup:PASS:bpf_prog_test_run_opts 0 nsec test_fib_lookup:FAIL:fib_lookup_ret unexpected fib_lookup_ret: actual 0 != expected 7 test_fib_lookup:FAIL:dmac not match unexpected dmac not match: actual 1 != expected 0 dmac expected 11:11:11:11:11:11 actual 00:00:00:00:00:00 [ Note that the "fib_lookup_ret unexpected fib_lookup_ret actual 0 ..." is reversed in terms of expected and actual value. Fixing in this patch also. ] One possibility is the testing stale neigh entry was marked dead by the gc (in neigh_periodic_work). The default gc_stale_time sysctl is 60s. This patch increases it to 15 mins. It also: - fixes the reversed arg (actual vs expected) in one of the ASSERT_EQ test - removes the nodad command arg when adding v4 neigh entry which currently has a warning. Fixes: 168de0233586 ("selftests/bpf: Add bpf_fib_lookup test") Reported-by: Alexei Starovoitov Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20230309060244.3242491-1-martin.lau@linux.dev commit 2b897eb4f5993a221dcd8e4f29fda3046669ed59 Author: Madhumitha Tolakanahalli Pradeep Date: Tue Mar 7 16:51:11 2023 -0300 drm/i915/dmc: Load DMC on MTL Add support to load DMC on MTL. According to the spec and based on tests done on real hardware, 0x7000 is a reasonable size limit that covers each possible payload. v2: - Tighten payload size limit. (Matt, Rodrigo) - Use a better name for the defined payload limit. (Rodrigo) Signed-off-by: Madhumitha Tolakanahalli Pradeep Signed-off-by: Gustavo Sousa Cc: Rodrigo Vivi Cc: Matt Roper Cc: Anusha Srivatsa Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230307195111.90767-1-gustavo.sousa@intel.com commit c4298d15778bf21eb4834768f04c0dcf7975dec2 Author: José Roberto de Souza Date: Wed Mar 1 12:10:53 2023 -0800 drm/i915/display/mtl: Program latch to phy reset Latch reset of phys during DC9 and when driver is unloaded to avoid phy reset. Specification ask us to program it closer to the step that enables DC9 in DC_STATE_EN but doing this way allow us to sanitize the phy latch during driver load. BSpec: 49197 Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Signed-off-by: Radhakrishna Sripada Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230301201053.928709-6-radhakrishna.sripada@intel.com commit 561b31acfd65502a2cda2067513240fc57ccdbdc Author: Tejas Upadhyay Date: Wed Mar 1 12:10:52 2023 -0800 drm/i915/fbdev: lock the fbdev obj before vma pin lock the fbdev obj before calling into i915_vma_pin_iomap(). This helps to solve below : <7>[ 93.563308] i915 0000:00:02.0: [drm:intelfb_create [i915]] no BIOS fb, allocating a new one <4>[ 93.581844] ------------[ cut here ]------------ <4>[ 93.581855] WARNING: CPU: 12 PID: 625 at drivers/gpu/drm/i915/gem/i915_gem_pages.c:424 i915_gem_object_pin_map+0x152/0x1c0 [i915] Fixes: f0b6b01b3efe ("drm/i915: Add ww context to intel_dpt_pin, v2.") Cc: Chris Wilson Cc: Matthew Auld Cc: Maarten Lankhorst Signed-off-by: Tejas Upadhyay Signed-off-by: Radhakrishna Sripada Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230301201053.928709-5-radhakrishna.sripada@intel.com commit 0188be507b973e36f637ba010a369057c8cb7282 Author: Radhakrishna Sripada Date: Wed Mar 1 12:10:49 2023 -0800 drm/i915/mtl: Fix Wa_16015201720 implementation The commit 2357f2b271ad ("drm/i915/mtl: Initial display workarounds") extended the workaround Wa_16015201720 to MTL. However the registers that the original WA implemented moved for MTL. Implement the workaround with the correct register. v3: Skip clock gating for pipe C, D DMC's and fix the title Fixes: 2357f2b271ad ("drm/i915/mtl: Initial display workarounds") Cc: Matt Atwood Cc: Lucas De Marchi Signed-off-by: Radhakrishna Sripada Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230301201053.928709-2-radhakrishna.sripada@intel.com commit f0312cbd2af1c458a8441bb7364133d8242446b8 Author: Thomas Weißschuh Date: Mon Feb 27 03:14:02 2023 +0000 edd: make kobj_type structure constant Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230227-kobj_type-firmware-edd-v1-1-c626afe5bd05@weissschuh.net Signed-off-by: Greg Kroah-Hartman commit 1274b37ab31211beb0f1c6e12e059d6b58a6e40a Author: Linus Walleij Date: Thu Feb 23 14:32:52 2023 +0100 misc: microchip: pci1xxxx: Convert to immutable irqchip Convert the driver to immutable irq-chip with a bit of intuition. Cc: linux-gpio@vger.kernel.org Cc: Marc Zyngier Signed-off-by: Linus Walleij Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20230223133252.2257276-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman commit 995a3bb72101e7492572d48936cea0fa14c8b794 Author: Nava kishore Manne Date: Fri Feb 24 17:37:38 2023 +0530 fpga: zynqmp-fpga: Adds status interface Adds status interface for zynqmp-fpga. It's a read only interface which allows the user to get the Programmable Logic(PL) configuration status. Usage: To read the Programmable Logic(PL) configuration status. cat /sys/bus/platform/drivers/zynqmp_fpga_manager/firmware:zynqmp-firmware:pcap/status Signed-off-by: Nava kishore Manne Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20230224120738.329416-3-nava.kishore.manne@amd.com Signed-off-by: Greg Kroah-Hartman commit 8f118f61540e23fb0e4ec84aec361f6758dbe93a Author: Nava kishore Manne Date: Fri Feb 24 17:37:37 2023 +0530 firmware: xilinx: Add pm api function for PL config reg readback Adds PM API for performing Programmable Logic(PL) configuration register readback. It provides an interface to the firmware(pmufw) to readback the FPGA configuration register. Signed-off-by: Nava kishore Manne Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20230224120738.329416-2-nava.kishore.manne@amd.com Signed-off-by: Greg Kroah-Hartman commit 1a0aae883093f304c4dac441d527a893eb840c5d Author: Bjorn Helgaas Date: Tue Mar 7 14:24:35 2023 -0600 misc: genwqe: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20230307202435.880921-1-helgaas@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8efc52743ecb5c69d2e4faba965a3e14418c2494 Author: Bjorn Helgaas Date: Tue Mar 7 15:38:16 2023 -0600 misc: alcor_pci: Use PCI core to manage ASPM instead of open-coding "priv->ext_config_dev_aspm" was never set to a non-zero value. Therefore, alcor_pci_aspm_ctrl(priv, 1) did nothing, and alcor_pci_aspm_ctrl(priv, 0) always disabled ASPM in the device and the upstream bridge. The driver disabled ASPM in alcor_pci_probe() and alcor_resume(), so it's possible the device doesn't work well when ASPM is enabled. Remove all the ASPM-related code and replace the alcor_pci_aspm_ctrl(0) calls with pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1), which asks the PCI core to disable ASPM. Signed-off-by: Bjorn Helgaas Cc: Oleksij Rempel Reviewed-by: Oleksij Rempel Link: https://lore.kernel.org/r/20230307213816.886308-1-helgaas@kernel.org Signed-off-by: Greg Kroah-Hartman commit b085dbf6c955c34f735cac433f8551832138e154 Author: Luis Chamberlain Date: Thu Mar 2 12:46:10 2023 -0800 sgi-xp: simplify sysctl registration Although this driver is a good use case for having a directory that is not other directories and then subdirectories with more entries, the usage of register_sysctl_table() can recurse and increases complexity so to avoid that just split out the registration to each directory with its own entries. register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl() can do the directory creation for you so just use that. Signed-off-by: Luis Chamberlain Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20230302204612.782387-6-mcgrof@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9263271a61fcb07b8a30379e785391415d10aa72 Author: Uwe Kleine-König Date: Thu Mar 2 10:12:51 2023 +0100 misc: sram: Improve and simplify clk handling The current code tries to get an associated clk, ignores any errors in the process and if there is a clock enables it unconditionally for the whole lifetime of the sram device. Instead use an "optional" variant of devm_clk_get() which handles the case where no clk is needed for the sram device and do proper error handling for the remaining error cases. Also use an "enabled" variant of devm_clk_get() to simplify. With that .probe() is the only function using struct sram_dev::clk, so it can be replaced by a local variable. Signed-off-by: Uwe Kleine-König Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20230302091251.1852454-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 7ef1a2c1c9dffa177ecc3ea50b7f5ee63a621137 Author: Marco Pagani Date: Wed Mar 1 15:03:08 2023 +0100 fpga: bridge: fix kernel-doc parameter description Fix the kernel-doc description for the "struct fpga_image_info *info" parameter of the fpga_bridge_get() function. Fixes: 060ac5c8fa7b ("fpga: bridge: kernel-doc fixes") Signed-off-by: Marco Pagani Reviewed-by: Tom Rix Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20230301140309.512578-1-marpagan@redhat.com Signed-off-by: Greg Kroah-Hartman commit 81773c98a808ee9881e2c503d6b9a5316c130694 Author: Thomas Weißschuh Date: Mon Feb 27 03:17:37 2023 +0000 firmware: dmi-sysfs: make kobj_type structures constant Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definitions to prevent modification at runtime. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20230227-kobj_type-firmware-dmi-v1-1-d1131d4e7a2b@weissschuh.net Signed-off-by: Greg Kroah-Hartman commit 9b12f050c76f090cc6d0aebe0ef76fed79ec3f15 Author: Jiri Slaby Date: Wed Feb 22 10:23:02 2023 +0100 char: pcmcia: remove all the drivers These char PCMCIA drivers are buggy[1] and receive only minimal care. It was concluded[2], that we should try to remove most pcmcia drivers completely. Let's start with these char broken one. Note that I also removed a UAPI header: include/uapi/linux/cm4000_cs.h. I found only coccinelle tests mentioning some ioctl constants from that file. But they are not actually used. Anyway, should someone complain, we may reintroduce the header (or its parts). [1] https://lore.kernel.org/all/f41c2765-80e0-48bc-b1e4-8cfd3230fd4a@www.fastmail.com/ [2] https://lore.kernel.org/all/c5b39544-a4fb-4796-a046-0b9be9853787@app.fastmail.com/ Signed-off-by: Jiri Slaby (SUSE) Cc: "Hyunwoo Kim" Cc: Harald Welte Cc: Lubomir Rintel Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Acked-by: Dominik Brodowski Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20230222092302.6348-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3996954fa071aa20945c8ac7694684fa3c1fed68 Author: Jiri Slaby Date: Wed Feb 22 10:23:01 2023 +0100 tty: ipwireless: move Kconfig entry to tty The ipwireless' Kconfig entry is currently sitting in char/pcmcia. But the driver is in tty/. So move the entry to tty/ too. First, it makes sense to have the entry along the driver. Second, whole char/pcmcia is about to pass away. Signed-off-by: Jiri Slaby (SUSE) Cc: Jiri Kosina Cc: David Sterba Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Acked-by: David Sterba Link: https://lore.kernel.org/r/20230222092302.6348-1-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 571079f5ba93f08ac2563d40e46d42d56615c096 Author: Petr Mladek Date: Wed Mar 8 12:24:33 2023 +0100 Documentation/serial-console: Document the behavior when the last console= parameter is not used The console= kernel command-line parameter defines where the kernel messages appear. It can be used multiple times to make the kernel log visible on more devices. The ordering of the console= parameters is important. In particular, the last one defines which device can be accessed also via /dev/console. The behavior is more complicated when the last console= parameter is ignored by kernel. It might be surprising because it was not intentional. The kernel just works this way historically. There were few attempts to change the behavior. Unfortunately, it can't be done because it would break existing users. Document the historical behavior at least. Link: https://lore.kernel.org/r/20170606143149.GB7604@pathway.suse.cz Link: https://lore.kernel.org/r/20230213113912.1237943-1-rkanwal@rivosinc.com Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230308112433.24292-1-pmladek@suse.com Signed-off-by: Greg Kroah-Hartman commit b22ea7df56b2ee1f9a0212210b51f83a3c2c75c6 Author: Biju Das Date: Mon Feb 27 11:41:52 2023 +0000 serial: 8250_em: Add serial8250_em_{reg_update(),out_helper()} As per RZ/V2M hardware manual(Rev.1.30 Jun, 2022), UART IP has a restriction as mentioned below. 40.6.1 Point for Caution when Changing the Register Settings: When changing the settings of the following registers, a PRESETn master reset or FIFO reset + SW reset (FCR[2],FCR[1], HCR0[7]) must be input to re-initialize them. Target Registers: FCR, LCR, MCR, DLL, DLM, HCR0. Add serial8250_em_reg_update() and serial8250_em_serial_out_helper() to handle this restriction. serial8250_em_serial_out_helper() is identical to previous serial8250_em_serial_out() except that UART_FCR macro is removed from serial8250_em_serial_out_helper() as it is now handled by serial8250_ em_serial_out(). DLL/DLM register can be updated only by setting LCR[7]. So the updation of LCR[7] will perform reset for DLL/DLM register changes. EMMA mobile has the same register set as RZ/V2M and this patch is tested on EMEV2 board. So, there is no harm in applying the same restriction here as well as the HW manual for EMMA mobile is not updated for a long time. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230227114152.22265-8-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 59d6558fb5fd750777edfde028ea1f9e7eed8a46 Author: Biju Das Date: Mon Feb 27 11:41:51 2023 +0000 serial: 8250_em: Use pseudo offset for UART_FCR UART_FCR shares the same offset with UART_IIR. We cannot use UART_FCR in serial8250_em_serial_in() as it overlaps with UART_IIR. Define UART_FCR_EM macro with a high value to avoid overlapping with existing UART_* register defines and define another macro UART_FCR_EM_HW for the real offset. Use these macros in serial8250_em_serial{_in/_out} function to read/write FCR register. Suggested-by: Ilpo Järvinen Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230227114152.22265-7-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 7eada8a122a2683ec63ad43982a4552b054d59ca Author: Biju Das Date: Mon Feb 27 11:41:50 2023 +0000 serial: 8250_em: Use devm_clk_get_enabled() Simplify clk handling in probe() by replacing devm_clk_get()->devm_ clk_get_enabled(). This replaces the usage of clk_prepare_enable/clk_ disable_unprepare() in probe()/remove(). After that sclk is no longer required in struct serial8250_em_priv and is replaced by a local variable sclk in probe(). Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230227114152.22265-6-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 54769d865683e96eeca32e325f586978c11fbbb7 Author: Biju Das Date: Mon Feb 27 11:41:49 2023 +0000 serial: 8250_em: Add missing break statement Add missing break statement in serial8250_em_serial_out(). Suggested-by: Andy Shevchenko Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230227114152.22265-5-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit e335354d2348ce2ea0d3e978b2f49c64354ca189 Author: Biju Das Date: Mon Feb 27 11:41:48 2023 +0000 serial: 8250_em: Drop unused header file Drop unused header file slab.h from the driver. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230227114152.22265-4-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 6b5f1e2e22ffd562075eaf6e018607e7dffe154d Author: Biju Das Date: Mon Feb 27 11:41:47 2023 +0000 serial: 8250_em: Simplify probe() Simplify probe() by using dev_err_probe() instead of dev_err() and add a local variable 'dev' to replace '&pdev->dev'. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230227114152.22265-3-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 302a22a4fa8a4e3216161b3cb63acc434afc87f5 Author: Biju Das Date: Mon Feb 27 11:41:46 2023 +0000 serial: 8250_em: Fix UART port type As per HW manual for EMEV2 "R19UH0040EJ0400 Rev.4.00", the UART IP found on EMMA mobile SoC is Register-compatible with the general-purpose 16750 UART chip. Fix UART port type as 16750 and enable 64-bytes fifo support. Fixes: 22886ee96895 ("serial8250-em: Emma Mobile UART driver V2") Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20230227114152.22265-2-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit f335201ba28fc20f7878127455dbae6e2f8eb6de Author: Martin Blumenstingl Date: Tue Mar 7 23:26:51 2023 +0100 arm64: dts: meson-g12-common: Use the G12A UART compatible string Switch meson-12-common.dtsi to use the Meson G12A specific UART compatible string. This enables the "divide XTAL by 2" divider which improves support for UART attached Bluetooth modules (for example RTL8822CS) running at a baud rate of 1500000. Without dividing XTAL (24MHz) by 2 a baud rate of 1500000 cannot be generated cleanly and the resulting jitter breaks communication with the module. Tested-by: Christian Hewitt Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230307222651.2106615-4-martin.blumenstingl@googlemail.com Signed-off-by: Greg Kroah-Hartman commit 804e6d6998f7528d23e9cb16f9dbb357bfab5f77 Author: Martin Blumenstingl Date: Tue Mar 7 23:26:50 2023 +0100 tty: serial: meson: Add a new compatible string for the G12A SoC Amlogic Meson G12A (and later) SoCs also have the "divide XTAL by 2" bit as the S4 UART controllers. Add a new compatible string for these SoCs and enable the has_xtal_div2 flag for them. Tested-by: Christian Hewitt Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230307222651.2106615-3-martin.blumenstingl@googlemail.com Signed-off-by: Greg Kroah-Hartman commit add5dfe87abe962cf9884193d9467f23d898fb8b Author: Martin Blumenstingl Date: Tue Mar 7 23:26:49 2023 +0100 dt-bindings: serial: amlogic,meson-uart: Add compatible string for G12A Amlogic G12A SoCs gained a new "divide XTAL by 2" bit. Everything else (we know about) is identical to the UART IP on GX (GXBB/GXL/GXM) SoCs. Add a new compatible string for this SoC so this new bit can be managed accordingly while keeping "amlogic,meson-gx-uart" as fallback compatible string. Signed-off-by: Martin Blumenstingl Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230307222651.2106615-2-martin.blumenstingl@googlemail.com Signed-off-by: Greg Kroah-Hartman commit cb46a3e2d6b8e937f44f73a6991f7e3d60008449 Author: Bernhard Rosenkränzer Date: Thu Mar 9 15:34:58 2023 +0100 dt-bindings: serial: mediatek,uart: add MT8365 Add binding description for mediatek,mt8365-uart Signed-off-by: Bernhard Rosenkränzer Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230309143459.401783-3-bero@baylibre.com Signed-off-by: Greg Kroah-Hartman commit 85bce38a7e1f392f5051e67fd5fcfbffe71e9b81 Author: Christophe JAILLET Date: Fri Feb 17 21:22:57 2023 +0100 serial: 8250: Reorder fields in 'struct plat_serial8250_port' Group some variables based on their sizes to reduce hole and avoid padding. On x86_64, this shrinks the size of 'struct plat_serial8250_port' from 144 to 128 bytes. It saves a few bytes of memory. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/f3cb1efe1454e0615840fd331ee335bc441589a9.1676665358.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit c47527cbcc3c50800f34b8c684f29721f75de246 Author: Marek Vasut Date: Thu Feb 23 05:22:52 2023 +0100 serial: stm32: Re-assert RTS/DE GPIO in RS485 mode only if more data are transmitted The stm32_usart_transmit_chars() may be called with empty or stopped transmit queue, and no XON/OFF character pending. This can happen at the end of transmission, where this last call is used to either handle the XON/XOFF x_char, or disable TX interrupt if queue is empty or stopped. If that occurs, do not assert the RS485 RTS/DE GPIO anymore, as the GPIO would remain asserted past the end of transmission and that would block the RS485 bus after the transmission. Only assert the RS485 RTS/DE GPIO if there is either pending XON/XOFF x_char, or at least one character in running transmit queue. Fixes: d7c76716169d ("serial: stm32: Use TC interrupt to deassert GPIO RTS in RS485 mode") Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20230223042252.95480-2-marex@denx.de Signed-off-by: Greg Kroah-Hartman commit b4fd0afaa07f9f46c733e7cf17e4b4cb45461c3c Author: Marek Vasut Date: Thu Feb 23 05:22:51 2023 +0100 serial: stm32: Remove unused struct stm32_port txdone element The txdone element is only ever assigned, once, and never used. Drop it. Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20230223042252.95480-1-marex@denx.de Signed-off-by: Greg Kroah-Hartman commit 6d12b774c9295a04695d52e38b1517e9a41f9881 Author: Luis Chamberlain Date: Thu Mar 2 12:46:11 2023 -0800 tty: simplify sysctl registration register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl_init() can do the directory creation for you so just use that Signed-off-by: Luis Chamberlain Link: https://lore.kernel.org/r/20230302204612.782387-7-mcgrof@kernel.org Signed-off-by: Greg Kroah-Hartman commit 46ce64bbfe0c84d1cf14fb325c8c7c323cabf3b8 Author: Uwe Kleine-König Date: Thu Mar 2 12:54:17 2023 +0100 serial: imx: Drop a few unneeded casts There is no point in casting a struct uart_port to a struct imx_port just to access the first member of the latter (a struct uart_port). This introduces no code changes. Signed-off-by: Uwe Kleine-König Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20230302115417.1860210-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 872eb918d8e10a6293240e0dd89a45842079c03c Author: Marek Vasut Date: Sun Feb 19 15:22:50 2023 +0100 dt-bindings: serial: imx: Document mandatory clock properties The UART IP must be connected to clock, document the properties in DT bindings. Update example to match Linux arch/arm/boot/dts/imx51.dtsi . Signed-off-by: Marek Vasut Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230219142250.10176-2-marex@denx.de Signed-off-by: Greg Kroah-Hartman commit cf8d4027a748b713d239cedaa77193e2e60b8811 Author: Marek Vasut Date: Sun Feb 19 15:22:49 2023 +0100 dt-bindings: serial: imx: Document optional DMA properties The UART IP can be connected to DMA engine, document the properties in DT bindings. Update example to match Linux arch/arm/boot/dts/imx51.dtsi . Acked-by: Krzysztof Kozlowski Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20230219142250.10176-1-marex@denx.de Signed-off-by: Greg Kroah-Hartman commit 728648c7c8bb054023b9b9f367e349d5b0afafd8 Author: Li zeming Date: Thu Feb 23 04:23:03 2023 +0800 tty: tty_ldisc: Remove the ret variable The int variable ret does not receive the return value in this function. It should be removed and returned 0 directly. Signed-off-by: Li zeming Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20230222202303.3195-1-zeming@nfschina.com Signed-off-by: Greg Kroah-Hartman commit b96eb88f59c023bb27891b5ab3dbd2b1a5200d53 Author: Yinbo Zhu Date: Thu Mar 9 19:14:07 2023 +0800 gpio: loongson: fixup the warning about OF_GPIO direct dependencies WARNING: unmet direct dependencies detected for OF_GPIO Depends on [n]: GPIOLIB [=y] && OF [=n] && HAS_IOMEM [=y] Selected by [y]: - GPIO_LOONGSON_64BIT [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && (LOONGARCH || COMPILE_TEST [=y]) Signed-off-by: Yinbo Zhu Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303091728.UUe6LWye-lkp@intel.com Signed-off-by: Bartosz Golaszewski commit 3754c41c76867e41fe720555dc186ba4b3cccad9 Author: Peng Fan Date: Fri Feb 3 09:45:26 2023 +0800 dt-bindings: usb: snps,dwc3: support i.MX8MQ i.MX8MQ use Synopsys DesignWare USB3 Controller IP, so add the compatible. Signed-off-by: Peng Fan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230203014526.1461386-1-peng.fan@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 7d1a898f52288f068f163aa970f029872c21c031 Author: Linyu Yuan Date: Mon Feb 27 10:44:10 2023 +0800 usb: xhci: change some trace event __dynamic_array() to __get_buf() some __dynamic_array() buffer will only used at trace event output time, change to __get_buf() which will allocate tempary trace seq buffer for output purpose. Signed-off-by: Linyu Yuan Link: https://lore.kernel.org/r/1677465850-1396-5-git-send-email-quic_linyyuan@quicinc.com Signed-off-by: Greg Kroah-Hartman commit f09d24aa463c51672ff37462fed17eff824b8b18 Author: Linyu Yuan Date: Mon Feb 27 10:44:09 2023 +0800 usb: dwc3: change some trace event __dynamic_array() to __get_buf() some __dynamic_array() buffer will only used at trace event output time, change to __get_buf() which will allocate tempary trace seq buffer for output purpose. Signed-off-by: Linyu Yuan Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/1677465850-1396-4-git-send-email-quic_linyyuan@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 47ebfd604f9b48e44d2f88caf527180463a2fb2c Author: Linyu Yuan Date: Mon Feb 27 10:44:08 2023 +0800 usb: cdns3: change some trace event __dynamic_array() to __get_buf() some __dynamic_array() buffer will only used at trace event output time, change to __get_buf() which will allocate tempary trace seq buffer for output purpose. Signed-off-by: Linyu Yuan Link: https://lore.kernel.org/r/1677465850-1396-3-git-send-email-quic_linyyuan@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 195a58cb3617d46f274a8cb47ee151d74d39ce0e Author: Linyu Yuan Date: Mon Feb 27 10:44:07 2023 +0800 usb: cdns3: change trace event cdns3_ring() operation the original design seem have several problems, first during trace event output stage, cdns3_dbg_ring() still refer to priv_ep->trb_pool which data content may changed during runtime, second when ring number is greater than TRBS_PER_SEGMENT, it has no change to show "too big" message, third in cdns3_log_ring event class definition, it allocate too much trace event buffer. change cdns3_dbg_ring() to be called at trace event fast assign time, and change trace buffer real dynamic according ring numbers. Signed-off-by: Linyu Yuan Link: https://lore.kernel.org/r/1677465850-1396-2-git-send-email-quic_linyyuan@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 180bb831b232b43bbd658dcdb20a49020059c1b8 Author: Yuta Hayama Date: Tue Feb 28 17:56:37 2023 +0900 usb: gadget: f_fs: Fix incorrect version checking of OS descs Currently, the USB gadget framework supports only version 1.0 of the MS OS descriptor. OS desc has a field bcdVersion indicating its version, with v1.0 represented by the value 0x100. However, __ffs_do_os_desc_header() was expecting the incorrect value 0x1, so allow the correct value 0x100. The bcdVersion field of the descriptor that is actually sent to the host is set by composite_setup() (in composite.c) to the fixed value 0x100. Therefore, it can be understood that __ffs_do_os_desc_header() is only performing a format check of the OS desc passed to functionfs. If a value other than 0x100 is accepted, there is no effect on communication over the USB bus. Indeed, until now __ffs_do_os_desc_header() has only accepted the incorrect value 0x1, but there was no problem with the communication over the USB bus. However, this can be confusing for functionfs userspace drivers. Since bcdVersion=0x100 is used in actual communication, functionfs should accept the value 0x100. Note that the correct value for bcdVersion in OS desc v1.0 is 0x100, but to avoid breaking old userspace drivers, the value 0x1 is also accepted as an exception. At this time, a message is output to notify the user to fix the userspace driver. Signed-off-by: Yuta Hayama Reviewed-by: Andrzej Pietrasiewicz Link: https://lore.kernel.org/r/290f96db-1877-5137-373a-318e7b4f2dde@lineo.co.jp Signed-off-by: Greg Kroah-Hartman commit 514c7ff5fe56164b769d2d105f0a382ca98c0851 Author: Kang Chen Date: Sat Feb 25 12:11:49 2023 +0800 usb: gadget: udc: replace kzalloc with devm_kzalloc in mv_udc_probe This driver uses the unified memory management api, so replace kzalloc with devm_kzalloc to avoid a memory leak. Reported-by: Dongliang Mu Link: https://lore.kernel.org/all/CAD-N9QX5i5toj8cs7DxBjYWtRGf3ZRnfTAf809sFW6iX0Ktfmw@mail.gmail.com Signed-off-by: Kang Chen Link: https://lore.kernel.org/r/20230225041149.136-2-void0red@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5aacc9d540cea790fe4419b61bfa8a1218a4474a Author: Kang Chen Date: Sat Feb 25 12:11:48 2023 +0800 usb: gadget: udc: add return value check of kzalloc in mv_udc_probe Even an 8-byte kzalloc will fail when we don't have enough memory, so we need a nullptr check and do the cleanup when it fails. Reported-by: eriri <1527030098@qq.com> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217081 Signed-off-by: Kang Chen Link: https://lore.kernel.org/r/20230225041149.136-1-void0red@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2ae4e0dea3b0c7b380821bac05e03a71da1f452f Author: Prashanth K Date: Fri Feb 24 11:16:59 2023 +0530 usb: gadget: composite: Draw 100mA current if not configured Currently we don't change the current value if device isn't in configured state. But in battery charging specification (section 1.2 and 1.4.13), it is mentioned that the device can draw up to 100mA of current if it's in unconfigured state. Hence add vbus draw work in composite_resume to draw 100mA if the device isn't configured. Signed-off-by: Prashanth K Link: https://lore.kernel.org/r/1677217619-10261-3-git-send-email-quic_prashk@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 4decf4060ecfee1f7a710999fcd421645ac0c419 Author: Prashanth K Date: Fri Feb 24 11:16:58 2023 +0530 usb: dwc3: gadget: Change condition for processing suspend event Currently we process the suspend interrupt event only if the device is in configured state. Consider a case where device is not configured and got suspend interrupt, in that case our gadget will still use 100mA as composite_suspend didn't happen. But battery charging specification (BC1.2) expects a downstream device to draw less than 2.5mA when unconnected OR suspended. Fix this by removing the condition for processing suspend event, and thus composite_resume would set vbus draw to 2. Fixes: 72704f876f50 ("dwc3: gadget: Implement the suspend entry event handler") Signed-off-by: Prashanth K Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/1677217619-10261-2-git-send-email-quic_prashk@quicinc.com Signed-off-by: Greg Kroah-Hartman commit b84ba26c922a99c7541d53ab1971f070b65264fe Author: Piyush Mehta Date: Wed Feb 15 15:01:46 2023 +0530 usb: dwc3: core: add external vBus supply support for ulpi phy Some ULPI USB PHY does not support internal VBUS supply, to drive the CPEN pin, which requires the configuration of the ULPI DRVVBUSEXTERNAL bit of OTG_CTRL register. Added 'snps,ulpi-ext-vbus-drv' a DT property to configure the USB2 PHY to drive VBUS with an external supply, by setting the USB2 PHY ULPIEXTVBUSDRV bit[:17] of the GUSB2PHYCFG register to drive VBUS with an external supply. Signed-off-by: Piyush Mehta Link: https://lore.kernel.org/r/20230215093146.5812-3-piyush.mehta@amd.com Signed-off-by: Greg Kroah-Hartman commit 487e6f420b7a3eed775118635d310ffa024ff7ef Author: Piyush Mehta Date: Wed Feb 15 15:01:45 2023 +0530 dt-bindings: usb: dwc3: Add snps,ulpi-ext-vbus-drv quirk Some ULPI USB PHYs do not support an internal vBus supply, to drive the CPEN pin properly, it requires configuration of the ULPI DRVVBUSEXTERNAL bit of the USB ULPI PHY OTG_CTRL register. Added 'snps,ulpi-ext-vbus-drv' DT property to configure the USB2 PHY to drives VBUS with an external supply. When the ULPIEXTVBUSDRV bit is set to '1' in the Global USB2 PHY Configuration registers, PHY drive vBus with an external 5V supply source. Signed-off-by: Piyush Mehta Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230215093146.5812-2-piyush.mehta@amd.com Signed-off-by: Greg Kroah-Hartman commit aa78a736a94f1e2771d5400d4286d907624f5f8d Author: Rafał Miłecki Date: Tue Feb 28 16:21:05 2023 +0100 dt-bindings: usb: allow evaluated properties in OHCI controllers This binding uses usb-hcd.yaml so replace additionalProperties with unevaluatedProperties to allow generic USB HCD properties. It's how EHCI and XHCI bindings work too. Signed-off-by: Rafał Miłecki Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230228152105.25358-1-zajec5@gmail.com Signed-off-by: Greg Kroah-Hartman commit f81a8591db7330a4caa0d430f50e54369a8520ca Author: Rafał Miłecki Date: Tue Feb 28 19:29:09 2023 +0100 dt-bindings: usb: usb-device: make "compatible" optional This binding was originally meant to describe hard-wired USB devices but in some situations we need to describe USB ports. That is needed e.g. if USB port is meant to be used as a trigger source but it can have any device plugged. It's a common case for home routers which have USB ports (with no hard-wired devices) and USB LEDs to indicate ports state. There is no point (and no easy way) to add separate binding covering just USB ports. Adjust existing devices binding to allow describing ports. This fixes: arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@21000: port@1: 'compatible' is a required property From schema: Documentation/devicetree/bindings/usb/generic-ehci.yaml arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@21000: port@2: 'compatible' is a required property From schema: Documentation/devicetree/bindings/usb/generic-ehci.yaml arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@21000: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'port@1', 'port@2' were unexpected) From schema: Documentation/devicetree/bindings/usb/generic-ehci.yaml arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@22000: port@1: 'compatible' is a required property From schema: Documentation/devicetree/bindings/usb/generic-ohci.yaml arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@22000: port@2: 'compatible' is a required property From schema: Documentation/devicetree/bindings/usb/generic-ohci.yaml arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@22000: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'port@1', 'port@2' were unexpected) From schema: Documentation/devicetree/bindings/usb/generic-ohci.yaml arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@23000: port@1: 'compatible' is a required property From schema: Documentation/devicetree/bindings/usb/generic-xhci.yaml arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dtb: usb@23000: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'phy-names', 'phys', 'port@1' were unexpected) From schema: Documentation/devicetree/bindings/usb/generic-xhci.yaml Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230228182909.1011-1-zajec5@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2da1b848e366bd8881137b5bdfc2bfaf4bee8b2d Author: Krzysztof Kozlowski Date: Sat Mar 4 14:03:02 2023 +0100 dt-bindings: usb: snps,dwc3: document extcon property The DWC3 USB Linux driver and several DTS use extcon property, so document it, even though it is deprecated, to fix warnings like: sm6125-sony-xperia-seine-pdx201.dtb: usb@4ef8800: usb@4e00000: Unevaluated properties are not allowed ('extcon' was unexpected) Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230304130302.51497-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit f3323cd03e5852e2a2f725d67f1b01777341c706 Author: Wolfram Sang Date: Tue Mar 7 17:30:39 2023 +0100 usb: gadget: udc: renesas_usb3: remove R-Car H3 ES1.* handling R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20230307163041.3815-12-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman commit 87b383f82e4ea8f7fb8e6d6c4d42d0e4a213dd7b Author: Wolfram Sang Date: Tue Mar 7 17:30:38 2023 +0100 usb: host: xhci-rcar: remove R-Car H3 ES1.* handling R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20230307163041.3815-11-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman commit 5d67f4861884762ebc2bddb5d667444e45f25782 Author: Wolfram Sang Date: Tue Mar 7 17:30:37 2023 +0100 usb: host: xhci-rcar: remove leftover quirk handling Loading V3 firmware does not need a quirk anymore, remove the leftover code. Fixes: ed8603e11124 ("usb: host: xhci-rcar: Simplify getting the firmware name for R-Car Gen3") Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20230307163041.3815-10-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman commit 1d8ce4d889643dd0e8dd196c8ff959d7cc2698c6 Author: Gustavo A. R. Silva Date: Thu Feb 23 21:44:28 2023 -0600 usb: host: oxu210hp-hcd: Replace fake flex-array with flexible-array member Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Transform zero-length array into flexible-array member in struct ehci_regs. Address the following warnings found with GCC-13 and -fstrict-flex-arrays=3 enabled: drivers/usb/host/oxu210hp-hcd.c:3983:30: warning: array subscript i is outside array bounds of ‘u32[0]’ {aka ‘unsigned int[]’} [-Warray-bounds=] drivers/usb/host/oxu210hp-hcd.c:3986:38: warning: array subscript i is outside array bounds of ‘u32[0]’ {aka ‘unsigned int[]’} [-Warray-bounds=] drivers/usb/host/oxu210hp-hcd.c:3971:30: warning: array subscript i is outside array bounds of ‘u32[0]’ {aka ‘unsigned int[]’} [-Warray-bounds=] drivers/usb/host/oxu210hp-hcd.c:3978:30: warning: array subscript i is outside array bounds of ‘u32[0]’ {aka ‘unsigned int[]’} [-Warray-bounds=] drivers/usb/host/oxu210hp-hcd.c:3523:30: warning: array subscript i is outside array bounds of ‘u32[0]’ {aka ‘unsigned int[]’} [-Warray-bounds=] drivers/usb/host/oxu210hp-hcd.c:2774:39: warning: array subscript port is outside array bounds of ‘u32[0]’ {aka ‘unsigned int[]’} [-Warray-bounds=] drivers/usb/host/oxu210hp-hcd.c:3569:35: warning: array subscript is outside array bounds of ‘u32[0]’ {aka ‘unsigned int[]’} [-Warray-bounds=] drivers/usb/host/oxu210hp-hcd.c:3888:36: warning: array subscript port is outside array bounds of ‘u32[0]’ {aka ‘unsigned int[]’} [-Warray-bounds=] drivers/usb/host/oxu210hp-hcd.c:2911:45: warning: array subscript i is outside array bounds of ‘u32[0]’ {aka ‘unsigned int[]’} [-Warray-bounds=] This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/259 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/Y/gynI9Wv8RZTD8M@work Signed-off-by: Greg Kroah-Hartman commit e1edf95e0f4274f4d68aa00387a03a92b51cbbe3 Author: Rob Herring Date: Tue Feb 28 17:53:22 2023 -0600 usb: host: xhci-tegra: Drop using of_irq_parse_one() Drivers generally shouldn't be using of_irq_parse_one() directly as it is a low-level interrupt parsing API. The exceptions are cases that need the values from the 'interrupts' property. This is not the case for Tegra XHCI driver as it just uses of_irq_parse_one() to test for 'interrupts' being absent or invalid. Instead, just make the interrupt optional on any error other than deferred probe. The exact reason for failing to get the interrupt is not that important. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230228235322.13289-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8987986b07f5dded3f81b159f5bb146f2d1a21ed Author: Lucas Tanure Date: Thu Mar 9 14:00:51 2023 +0000 ASoC: cs35l41: Steam Deck Shared boost properties quirk Add support for Steam Deck bios old properties. If a Steam deck didn't upgrade the BIOS, the driver should be able to handle the previous properties for shared boost types. Signed-off-by: Lucas Tanure Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20230309140051.945329-1-lucas.tanure@collabora.com Signed-off-by: Mark Brown commit f6b16c308a6a00f88b4262e57f03b6861d4ce6df Merge: f37acbde076d8 8c29e78b8ecbe Author: Mark Brown Date: Thu Mar 9 14:26:52 2023 +0000 ASoC: SOF: Intel: hda: Introduce HDA DAI abstraction Merge series from Peter Ujfalusi : This series introduces an abstraction of the HDA DAI handling. The motivation is to simplify and make the code more flexible regarding to IPC versions, new features (ChainDMA (IPC4) and DSPless mode) and to pave the way for new platforms. For the first look the series might feels a bit too intrusive but it introduces no functionality change (tested at each commit). commit d2456ddb2e7e1b89ed637e8190fcbbeadc7ea8a7 Author: Nick Alcock Date: Wed Mar 8 20:21:17 2023 +0000 memory: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e3 ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Hitomi Hasegawa Link: https://lore.kernel.org/r/20230308202117.426808-2-nick.alcock@oracle.com Signed-off-by: Krzysztof Kozlowski commit e63b0663f0028b265201798d74de163140ac124e Author: Nick Alcock Date: Wed Mar 8 20:21:16 2023 +0000 memory: tegra: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e3 ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Hitomi Hasegawa Cc: Thierry Reding Cc: Jonathan Hunter Link: https://lore.kernel.org/r/20230308202117.426808-1-nick.alcock@oracle.com Signed-off-by: Krzysztof Kozlowski commit 96c25b03145aaa0d2900cebf0349f13a689b01ce Author: Uwe Kleine-König Date: Fri Feb 24 23:14:17 2023 +0100 drm/tests: helpers: Drop empty platform remove function A remove callback just returning 0 is equivalent to no remove callback at all. So drop the useless function. Signed-off-by: Uwe Kleine-König Reviewed-by: Maíra Canal Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230224221417.1712368-1-u.kleine-koenig@pengutronix.de commit 56b16a9a80232fc70bebe31ded52c2f6fd3f7ddf Author: Andrew Davis Date: Tue Mar 7 10:54:27 2023 -0600 gpio: ich: Use devm_gpiochip_add_data() to simplify remove path Use devm version of gpiochip add function to handle removal for us. Signed-off-by: Andrew Davis Signed-off-by: Andy Shevchenko commit 713834cf2cd47cfdb79da523c8b243fca71615f5 Author: Md Sadre Alam Date: Mon Mar 6 20:16:41 2023 +0530 pinctrl: qcom: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Md Sadre Alam Link: https://lore.kernel.org/r/20230306144641.21955-1-quic_mdalam@quicinc.com Signed-off-by: Linus Walleij commit 8ab3b0663e279ab550bc2c0b5d602960e8b94e02 Author: Thomas Hellström Date: Tue Mar 7 15:46:19 2023 +0100 drm/ttm: Don't print error message if eviction was interrupted Avoid printing an error message if eviction was interrupted by, for example, the user pressing CTRL-C. That may happen if eviction is waiting for something, like for example a free batch-buffer. Signed-off-by: Thomas Hellström Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230307144621.10748-6-thomas.hellstrom@linux.intel.com commit 8d746ec4ab14e7cb82787c6f8bfadee8dd20effe Author: Thomas Hellström Date: Tue Mar 7 15:46:18 2023 +0100 drm/ttm: Unexport ttm_global_swapout() Unexport ttm_global_swapout() since it is not used outside of TTM. Signed-off-by: Thomas Hellström Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230307144621.10748-5-thomas.hellstrom@linux.intel.com commit 95f8138d669fd02e304e5e2531f11f4f335dcd22 Author: Thomas Hellström Date: Tue Mar 7 15:46:17 2023 +0100 drm/ttm: Use the BIT macro for the TTM_TT_FLAGs New code is recommended to use the BIT macro instead of the explicit shifts. Change the older defines so that we can keep the style consistent with upcoming changes. v2: - Also change the value of the _PRIV_POPULATED bit (Christian König) Signed-off-by: Thomas Hellström Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230307144621.10748-4-thomas.hellstrom@linux.intel.com commit 3abe84ea065128f5ad1025f2176156dd04b777ee Author: Krzysztof Kozlowski Date: Thu Mar 2 16:52:55 2023 +0100 dt-bindings: pinctrl: qcom: lpass-lpi: correct description of second reg The description of second IO address is a bit confusing. It is supposed to be the MCC range which contains the slew rate registers, not the slew rate register base. The Linux driver then accesses slew rate register with hard-coded offset (0xa000). Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230302155255.857065-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 466123c54f3153b77c7460e08850c385fa4fe3fc Author: Michael Straube Date: Thu Mar 9 12:04:39 2023 +0100 staging: rtl8192e: rtl92e_clear_irq() is not used The function rtl92e_clear_irq() is not used. Remove it. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20230309110439.24504-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit db47fa2e4cbf180a39d8e6d6170962bd7d82e52d Merge: 46ca833c060cf 42d452e7709fd Author: Paolo Abeni Date: Thu Mar 9 11:31:46 2023 +0100 Merge branch 'sctp-add-another-two-stream-schedulers' Xin Long says: ==================== sctp: add another two stream schedulers All SCTP stream schedulers are defined in rfc8260#section-3, First-Come First-Served, Round-Robin and Priority-Based Schedulers are already added in kernel. This patchset adds another two schedulers: Fair Capacity Scheduler and Weighted Fair Queueing Scheduler. Note that the left one "Round-Robin Scheduler per Packet" Scheduler is not implemented by this patch, as it's still intrusive to be added in the current SCTP kernel code. ==================== Link: https://lore.kernel.org/r/cover.1678224012.git.lucien.xin@gmail.com Signed-off-by: Paolo Abeni commit 42d452e7709fdb4d42376d2a97369e22cc80a5d2 Author: Xin Long Date: Tue Mar 7 16:23:27 2023 -0500 sctp: add weighted fair queueing stream scheduler As it says in rfc8260#section-3.6 about the weighted fair queueing scheduler: A Weighted Fair Queueing scheduler between the streams is used. The weight is configurable per outgoing SCTP stream. This scheduler considers the lengths of the messages of each stream and schedules them in a specific way to use the capacity according to the given weights. If the weight of stream S1 is n times the weight of stream S2, the scheduler should assign to stream S1 n times the capacity it assigns to stream S2. The details are implementation dependent. Interleaving user messages allows for a better realization of the capacity usage according to the given weights. This patch adds Weighted Fair Queueing Scheduler actually based on the code of Fair Capacity Scheduler by adding fc_weight into struct sctp_stream_out_ext and taking it into account when sorting stream-> fc_list in sctp_sched_fc_sched() and sctp_sched_fc_dequeue_done(). Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Paolo Abeni commit 4821a076eb602a6238528e9ebafeac853c833415 Author: Xin Long Date: Tue Mar 7 16:23:26 2023 -0500 sctp: add fair capacity stream scheduler As it says in rfc8260#section-3.5 about the fair capacity scheduler: A fair capacity distribution between the streams is used. This scheduler considers the lengths of the messages of each stream and schedules them in a specific way to maintain an equal capacity for all streams. The details are implementation dependent. interleaving user messages allows for a better realization of the fair capacity usage. This patch adds Fair Capacity Scheduler based on the foundations added by commit 5bbbbe32a431 ("sctp: introduce stream scheduler foundations"): A fc_list and a fc_length are added into struct sctp_stream_out_ext and a fc_list is added into struct sctp_stream. In .enqueue, when there are chunks enqueued into a stream, this stream will be linked into stream-> fc_list by its fc_list ordered by its fc_length. In .dequeue, it always picks up the 1st skb from stream->fc_list. In .dequeue_done, fc_length is increased by chunk's len and update its location in stream->fc_list according to the its new fc_length. Note that when the new fc_length overflows in .dequeue_done, instead of resetting all fc_lengths to 0, we only reduced them by U32_MAX / 4 to avoid a moment of imbalance in the scheduling, as Marcelo suggested. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: Paolo Abeni commit 1b47b80e2fa777b37a9486512f4636d7e6aaa353 Author: Thomas Weißschuh Date: Fri Feb 17 03:14:41 2023 +0000 livepatch: Make kobj_type structures constant Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definitions to prevent modification at runtime. Signed-off-by: Thomas Weißschuh Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20230217-kobj_type-livepatch-v1-1-06ded292e897@weissschuh.net commit 6486a57f05d3d40aa8698908de16feebe52e9f13 Author: Alexey Dobriyan Date: Tue Feb 28 15:11:06 2023 +0300 livepatch: fix ELF typos ELF is acronym. Signed-off-by: Alexey Dobriyan Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/Y/3vWjQ/SBA5a0i5@p183 commit 46ca833c060cff588a5fc2c25a1def8a1b6284e2 Merge: 7e01b4085f11b 8cd9de08ccf6e Author: Paolo Abeni Date: Thu Mar 9 09:51:34 2023 +0100 Merge branch 'various-mtk_eth_soc-cleanups' Russell King says: ==================== Various mtk_eth_soc cleanups Here are a number of patches that do a bit of cleanup to mtk_eth_soc. The first patch cleans up mtk_gmac0_rgmii_adjust(), which is the troublesome function preventing the driver becoming a post-March2020 phylink driver. It doesn't solve that problem, merely makes the code easier to follow by getting rid of repeated tenary operators. The second patch moves the check for DDR2 memory to the initialisation of phylink's supported_interfaces - if TRGMII is not possible for some reason, we should not be erroring out in phylink MAC operations when that can be determined prior to phylink creation. The third patch removes checks from mtk_mac_config() that are done when initialising supported_interfaces - phylink will not call mtk_mac_config() with an interface that was not marked as supported, so these checks are redundant. The last patch removes the remaining vestiges of REVMII and RMII support, which appears to be entirely unused. These shouldn't conflict with Daniel's patch set, but if they do I will rework as appropriate. ==================== Link: https://lore.kernel.org/r/ZAdj9qUXcHUsK7Gt@shell.armlinux.org.uk Signed-off-by: Paolo Abeni commit 8cd9de08ccf6e1575d4994ba8347fa9ac083f900 Author: Russell King (Oracle) Date: Tue Mar 7 16:19:41 2023 +0000 net: mtk_eth_soc: remove support for RMII and REVMII modes Since the conversion of mtk_eth_soc to phylink's supported_interfaces bitmap, these two modes have not been selectable. No one has raised this as an issue. Checking the in-kernel DT files, none of them use either of these modes with this hardware. Daniel Golle concurs: A quick grep through the device trees of the more than 650 ramips and mediatek boards we support in OpenWrt has revealed that *none* of them uses either reduced-MII or reverse-MII PHY modes. I could imaging that some more specialized ramips boards may use the RMII 100M PHY mode to connect with exotic PHYs for industrial or automotive applications (think: for 100BASE-T1 PHY connected via RMII). I have never seen or touched such boards, but there are hints that they do exist. For reverse-MII there are cases in which the Ralink SoC (Rt305x, for example) is used in iNIC mode, ie. connected as a PHY to another SoC, and running only a minimal firmware rather than running Linux. Due to the lack of external DRAM for the Ralink SoC on this kind of boards, the Ralink SoC there will anyway never be able to boot Linux. I've seen this e.g. in multimedia devices like early WiFi-connected not-yet-so-smart TVs. Consequently, the conclusion is that no one uses these modes with this hardware, so we might as well drop support for them. Signed-off-by: Russell King (Oracle) Signed-off-by: Paolo Abeni commit c9f9e3a3289f2f068db45ea1219aa5b295762f44 Author: Russell King (Oracle) Date: Tue Mar 7 16:19:36 2023 +0000 net: mtk_eth_soc: remove unnecessary checks in mtk_mac_config() mtk_mac_config() checks that the interface mode is permitted for the capabilities, but we already do these checks in mtk_add_mac() when initialising phylink's supported_interfaces bitmap. Remove the unnecessary tests. Signed-off-by: Russell King (Oracle) Signed-off-by: Paolo Abeni commit 7910898e1b2ae8ba0646434294931bf69cc0fdb5 Author: Russell King (Oracle) Date: Tue Mar 7 16:19:31 2023 +0000 net: mtk_eth_soc: move trgmii ddr2 check to probe function If TRGMII mode is not permitted when using DDR2 mode, we should handle that when setting up phylink's ->supported_interfaces so phylink knows that this is not supported by the hardware. Move this check to mtk_add_mac(). Signed-off-by: Russell King (Oracle) Signed-off-by: Paolo Abeni commit 04eb3d1cede014defaa8c259263439cc7e9ceda6 Author: Russell King (Oracle) Date: Tue Mar 7 16:19:26 2023 +0000 net: mtk_eth_soc: tidy mtk_gmac0_rgmii_adjust() Get rid of the multiple tenary operators in mtk_gmac0_rgmii_adjust() replacing them with a single if(), thus making the code easier to read. Signed-off-by: Russell King (Oracle) Signed-off-by: Paolo Abeni commit 7e01b4085f11b985ebe1a2ff6ccd3654494f5b5a Merge: 6bf0ad7f29173 f3468e3944398 Author: Jakub Kicinski Date: Wed Mar 8 23:34:42 2023 -0800 Merge branch 'pci-aer-remove-redundant-device-control-error-reporting-enable' Bjorn Helgaas says: ==================== PCI/AER: Remove redundant Device Control Error Reporting Enable From: Bjorn Helgaas Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), which appeared in v6.0, the PCI core has enabled PCIe error reporting for all devices during enumeration. Remove driver code to do this and remove unnecessary includes of from several other drivers. Intel folks, sorry that I missed removing the includes in the first series. ==================== Link: https://lore.kernel.org/r/20230307181940.868828-1-helgaas@kernel.org Signed-off-by: Jakub Kicinski commit f3468e3944398c4de9b2deff73041394fba632e7 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:39 2023 -0600 ixgbe: Remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 1530522f101f5f58f73bb3c9f5b1be39cb1c2a62 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:38 2023 -0600 igc: Remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 648a2020fdac17591b909849513a10a65daa8b27 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:37 2023 -0600 igb: Remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit ddd652ef30e396efe006494a67e43e174099b419 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:36 2023 -0600 ice: Remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 495b72c79302bb827ff14686000edbba1dd9e372 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:35 2023 -0600 iavf: Remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit acd2bb015fae8d67ff11d11dfe250b0fb6c6081c Author: Bjorn Helgaas Date: Tue Mar 7 12:19:34 2023 -0600 i40e: Remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 8be901a6715f290131ca919bef425717538382b5 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:33 2023 -0600 fm10k: Remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit ab76f2bff0f3d165428fb71532c7e6ba81df8317 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:32 2023 -0600 e1000e: Remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Jesse Brandeburg Cc: Tony Nguyen Cc: intel-wired-lan@lists.osuosl.org Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 1fccc781bf7e32b89ecb289987670b040f97d7c0 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:31 2023 -0600 net: txgbe: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Jiawen Wu Cc: Mengyuan Lou Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit a7edf8e5142f2037db944ec87c0f2491dadfe2a6 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:30 2023 -0600 net: ngbe: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Jiawen Wu Cc: Mengyuan Lou Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit c39abdd396bc2b299798e8422538806a8dc29d20 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:29 2023 -0600 sfc_ef100: Drop redundant pci_disable_pcie_error_reporting() 51b35a454efd ("sfc: skeleton EF100 PF driver") added a call to pci_disable_pcie_error_reporting() in ef100_pci_remove(). Remove this call since there's no apparent reason to disable error reporting when it was not previously enabled. Note that since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core enables PCIe error reporting for all devices during enumeration, so the driver doesn't need to do it itself. Signed-off-by: Bjorn Helgaas Cc: Martin Habets Acked-by: Edward Cree Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit ecded61ceb89880f0b0490a168d18c9845b60eb3 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:28 2023 -0600 sfc/siena: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Martin Habets Acked-by: Edward Cree Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 4ac9272691a402d5e862be627bac54d2cd6dacbc Author: Bjorn Helgaas Date: Tue Mar 7 12:19:27 2023 -0600 sfc: falcon: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Martin Habets Acked-by: Edward Cree Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit bdedf705688c7704f2efc3ce4930a32612e4efdc Author: Bjorn Helgaas Date: Tue Mar 7 12:19:26 2023 -0600 sfc: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Martin Habets Acked-by: Edward Cree Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit e07ce5567194dd14f4fcbbaac4a1c48bb97da8e3 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:25 2023 -0600 qlcnic: Remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Shahed Shaikh Cc: Manish Chopra Cc: GR-Linux-NIC-Dev@marvell.com Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 95e35f5994075090ed086ad3bcef33878218784e Author: Bjorn Helgaas Date: Tue Mar 7 12:19:24 2023 -0600 qlcnic: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Shahed Shaikh Cc: Manish Chopra Cc: GR-Linux-NIC-Dev@marvell.com Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 5f1fbdc168f4bf9705b81a8844d0f8ca201a7363 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:23 2023 -0600 net: qede: Remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Ariel Elior Cc: Manish Chopra Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 1263c7b78315f6682a106d56e9878b3a7b176660 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:22 2023 -0600 qed: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Ariel Elior Cc: Manish Chopra Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit fe3f4c292da1908eda5d322e60b3c09ed9508288 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:21 2023 -0600 octeon_ep: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Veerasenareddy Burru Cc: Abhijit Ayarekar Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 2d0e0372069d3050479d62d48f3b04445f60083a Author: Bjorn Helgaas Date: Tue Mar 7 12:19:20 2023 -0600 netxen_nic: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Also note that the driver only called these for NX_IS_REVISION_P3 devices, so since f26e58bf6f54, error reporting has been enabled for devices other than NX_IS_REVISION_P3. Signed-off-by: Bjorn Helgaas Cc: Manish Chopra Cc: Rahul Verma Cc: GR-Linux-NIC-Dev@marvell.com Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit c183033f631a9265e5f85827b1cfcdb8d5a7ee35 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:19 2023 -0600 net: hns3: remove unnecessary aer.h include is unused, so remove it. Signed-off-by: Bjorn Helgaas Cc: Yisen Zhuang Cc: Salil Mehta Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 49f79ac22f89476cb2eac018676490e33a7c4a10 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:18 2023 -0600 net/fungible: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Acked-by: Dimitris Michailidis Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit ca7f175fc24eea4638f93a4a49d229c34ae0c770 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:17 2023 -0600 cxgb4: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Raju Rangoju Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 5f29b73d4eba2926ab99d7bf5f2028810af3c66c Author: Bjorn Helgaas Date: Tue Mar 7 12:19:16 2023 -0600 bnxt: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Reviewed-by: Michael Chan Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 2fba753cc9b57d82800db0997b9271898323c57e Author: Bjorn Helgaas Date: Tue Mar 7 12:19:15 2023 -0600 bnx2x: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Ariel Elior Cc: Sudarsana Kalluru Cc: Manish Chopra Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 5f00358b5e905a1db1077006d01cd5d207f91fb0 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:14 2023 -0600 bnx2: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. cd709aa90648 ("bnx2: Add PCI Advanced Error Reporting support.") added pci_enable_pcie_error_reporting() for all devices, and c239f279e571 ("bnx2: Enable AER on PCIE devices only") restricted it to BNX2_CHIP_5709 devices to avoid an error message when it failed on non-PCIe devices. The PCI core only enables PCIe error reporting on PCIe devices, which I assume means BNX2_CHIP_5709. Signed-off-by: Bjorn Helgaas Cc: Rasesh Mody Cc: GR-Linux-NIC-Dev@marvell.com Reviewed-by: Michael Chan Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit b4e24578b4841b6abac38fd40fddba6caa9a656a Author: Bjorn Helgaas Date: Tue Mar 7 12:19:13 2023 -0600 be2net: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Ajit Khaparde Cc: Sriharsha Basavapatna Cc: Somnath Kotur Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 1de2a84dd06091cee943ab796660ba64c8479d33 Author: Bjorn Helgaas Date: Tue Mar 7 12:19:12 2023 -0600 alx: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Cc: Chris Snook Acked-by: Jesse Brandeburg Signed-off-by: Jakub Kicinski commit 6bf0ad7f29173869de6a5a359554426a7127c247 Author: Wolfram Sang Date: Tue Mar 7 17:30:35 2023 +0100 ravb: remove R-Car H3 ES1.* handling R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Signed-off-by: Simon Horman Reviewed-by: Sergey Shtylyov Link: https://lore.kernel.org/all/20230307163041.3815-8-wsa+renesas@sang-engineering.com/ Signed-off-by: Jakub Kicinski commit 695cb117ac2a3624eb4381c271a0376d9233df44 Author: Chanh Nguyen Date: Tue Feb 28 17:28:20 2023 +0700 ARM: dts: aspeed: mtmitchell: Enable NCSI Use MAC3 (RGMII4) with the NC-SI stack instead of as an MDIO PHY. The OCP slot #0 and OCP slot #1 use a common BMC_NCSI signal, so we use only one of them at a time. The OCP slot #0 will be enabled by PCA9539's setting by default. Enable the OCP Auxiliary Power during booting to make the NCSI feature work. Signed-off-by: Chanh Nguyen Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20230228102820.18477-1-chanh@os.amperecomputing.com Signed-off-by: Joel Stanley commit 66ab57574f2c8233550f641ecdc34fd0ef61341d Author: Gerald Loacker Date: Thu Mar 2 13:39:49 2023 +0100 drm/rockchip: vop2: add polarity flags to RGB output Use h/v-sync and pixel clock polarity flags for RGB output. For all other outputs this is already implemented. Signed-off-by: Gerald Loacker Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20230302123949.957998-1-gerald.loacker@wolfvision.net commit 3b4db36c4cd9e7e49babe931d7117cdba0d04ce0 Author: Jacob Keller Date: Wed Feb 22 17:35:33 2023 -0800 drm/rockchip: vop2: use struct_size() in vop2_bind Use the overflow-protected struct_size() helper macro to compute the allocation size of the vop2 data structure. Signed-off-by: Jacob Keller Cc: Sandy Huang Cc: Heiko Stübner Cc: David Airlie Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20230223013533.1707706-1-jacob.e.keller@intel.com commit 23e403b326786c05f84515760886c2aedec84964 Merge: ed69e0667db5f 7e86a8c4ac8d5 Author: Alexei Starovoitov Date: Wed Mar 8 16:19:51 2023 -0800 Merge branch 'BPF open-coded iterators' Andrii Nakryiko says: ==================== Add support for open-coded (aka inline) iterators in BPF world. This is a next evolution of gradually allowing more powerful and less restrictive looping and iteration capabilities to BPF programs. We set up a framework for implementing all kinds of iterators (e.g., cgroup, task, file, etc, iterators), but this patch set only implements numbers iterator, which is used to implement ergonomic bpf_for() for-like construct (see patches #4-#5). We also add bpf_for_each(), which is a generic foreach-like construct that will work with any kind of open-coded iterator implementation, as long as we stick with bpf_iter__{new,next,destroy}() naming pattern (which we now enforce on the kernel side). Patch #1 is preparatory refactoring for easier way to check for special kfunc calls. Patch #2 is adding iterator kfunc registration and validation logic, which is mostly independent from the rest of open-coded iterator logic, so is separated out for easier reviewing. The meat of verifier-side logic is in patch #3. Patch #4 implements numbers iterator. I kept them separate to have clean reference for how to integrate new iterator types (now even simpler to do than in v1 of this patch set). Patch #5 adds bpf_for(), bpf_for_each(), and bpf_repeat() macros to bpf_misc.h, and also adds yet another pyperf test variant, now with bpf_for() loop. Patch #6 is verification tests, based on numbers iterator (as the only available right now). Patch #7 actually tests runtime behavior of numbers iterator. Finally, with changes in v2, it's possible and trivial to implement custom iterators completely in kernel modules, which we showcase and test by adding a simple iterator returning same number a given number of times to bpf_testmod. Patch #8 is where all this happens and is tested. Most of the relevant details are in corresponding commit messages or code comments. v4->v5: - fixing missed inner for() in is_iter_reg_valid_uninit, and fixed return false (kernel test robot); - typo fixes and comment/commit description improvements throughout the patch set; v3->v4: - remove unused variable from is_iter_reg_valid_init (kernel test robot); v2->v3: - remove special kfunc leftovers for bpf_iter_num_{new,next,destroy}; - add iters/testmod_seq* to DENYLIST.s390x, it doesn't support kfuncs in modules yet (CI); v1->v2: - rebased on latest, dropping previously landed preparatory patches; - each iterator type now have its own `struct bpf_iter_` which allows each iterator implementation to use exactly as much stack space as necessary, allowing to avoid runtime allocations (Alexei); - reworked how iterator kfuncs are defined, no verifier changes are required when adding new iterator type; - added bpf_testmod-based iterator implementation; - address the rest of feedback, comments, commit message adjustment, etc. Cc: Tejun Heo ==================== Signed-off-by: Alexei Starovoitov commit 7e86a8c4ac8d5dcf7dd58f5a4779d1a6ff0a827d Author: Andrii Nakryiko Date: Wed Mar 8 10:41:21 2023 -0800 selftests/bpf: implement and test custom testmod_seq iterator Implement a trivial iterator returning same specified integer value N times as part of bpf_testmod kernel module. Add selftests to validate everything works end to end. We also reuse these tests as "verification-only" tests to validate that kernel prints the state of custom kernel module-defined iterator correctly: fp-16=iter_testmod_seq(ref_id=1,state=drained,depth=0) "testmod_seq" part is an iterator type, and is coming from module's BTF data dynamically at runtime. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230308184121.1165081-9-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit f59b146092653bcf014ccdc9bd8bc94e79065ce3 Author: Andrii Nakryiko Date: Wed Mar 8 10:41:20 2023 -0800 selftests/bpf: add number iterator tests Add number iterator (bpf_iter_num_{new,next,destroy}()) tests, validating the correct handling of various corner and common cases *at runtime*. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230308184121.1165081-8-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 57400dcce6c2cf3985120c4ee28b37a1f4238dbb Author: Andrii Nakryiko Date: Wed Mar 8 10:41:19 2023 -0800 selftests/bpf: add iterators tests Add various tests for open-coded iterators. Some of them excercise various possible coding patterns in C, some go down to low-level assembly for more control over various conditions, especially invalid ones. We also make use of bpf_for(), bpf_for_each(), bpf_repeat() macros in some of these tests. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230308184121.1165081-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 8c2b5e90505e474f36ecc3b7f3f8298b59d72e91 Author: Andrii Nakryiko Date: Wed Mar 8 10:41:18 2023 -0800 selftests/bpf: add bpf_for_each(), bpf_for(), and bpf_repeat() macros Add bpf_for_each(), bpf_for(), and bpf_repeat() macros that make writing open-coded iterator-based loops much more convenient and natural. These macros utilize cleanup attribute to ensure proper destruction of the iterator and thanks to that manage to provide the ergonomics that is very close to C language's for() construct. Typical loop would look like: int i; int arr[N]; bpf_for(i, 0, N) { /* verifier will know that i >= 0 && i < N, so could be used to * directly access array elements with no extra checks */ arr[i] = i; } bpf_repeat() is very similar, but it doesn't expose iteration number and is meant as a simple "repeat action N times" loop: bpf_repeat(N) { /* whatever, N times */ } Note that `break` and `continue` statements inside the {} block work as expected. bpf_for_each() is a generalization over any kind of BPF open-coded iterator allowing to use for-each-like approach instead of calling low-level bpf_iter__{new,next,destroy}() APIs explicitly. E.g.: struct cgroup *cg; bpf_for_each(cgroup, cg, some, input, args) { /* do something with each cg */ } would call (not-yet-implemented) bpf_iter_cgroup_{new,next,destroy}() functions to form a loop over cgroups, where `some, input, args` are passed verbatim into constructor as bpf_iter_cgroup_new(&it, some, input, args). As a first demonstration, add pyperf variant based on the bpf_for() loop. Also clean up a few tests that either included bpf_misc.h header unnecessarily from the user-space, which is unsupported, or included it before any common types are defined (and thus leading to unnecessary compilation warnings, potentially). Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230308184121.1165081-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 6018e1f407cccf39b804d1f75ad4de7be4e6cc45 Author: Andrii Nakryiko Date: Wed Mar 8 10:41:17 2023 -0800 bpf: implement numbers iterator Implement the first open-coded iterator type over a range of integers. It's public API consists of: - bpf_iter_num_new() constructor, which accepts [start, end) range (that is, start is inclusive, end is exclusive). - bpf_iter_num_next() which will keep returning read-only pointer to int until the range is exhausted, at which point NULL will be returned. If bpf_iter_num_next() is kept calling after this, NULL will be persistently returned. - bpf_iter_num_destroy() destructor, which needs to be called at some point to clean up iterator state. BPF verifier enforces that iterator destructor is called at some point before BPF program exits. Note that `start = end = X` is a valid combination to setup an empty iterator. bpf_iter_num_new() will return 0 (success) for any such combination. If bpf_iter_num_new() detects invalid combination of input arguments, it returns error, resets iterator state to, effectively, empty iterator, so any subsequent call to bpf_iter_num_next() will keep returning NULL. BPF verifier has no knowledge that returned integers are in the [start, end) value range, as both `start` and `end` are not statically known and enforced: they are runtime values. While the implementation is pretty trivial, some care needs to be taken to avoid overflows and underflows. Subsequent selftests will validate correctness of [start, end) semantics, especially around extremes (INT_MIN and INT_MAX). Similarly to bpf_loop(), we enforce that no more than BPF_MAX_LOOPS can be specified. bpf_iter_num_{new,next,destroy}() is a logical evolution from bounded BPF loops and bpf_loop() helper and is the basis for implementing ergonomic BPF loops with no statically known or verified bounds. Subsequent patches implement bpf_for() macro, demonstrating how this can be wrapped into something that works and feels like a normal for() loop in C language. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230308184121.1165081-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 06accc8779c1d558a5b5a21f2ac82b0c95827ddd Author: Andrii Nakryiko Date: Wed Mar 8 10:41:16 2023 -0800 bpf: add support for open-coded iterator loops Teach verifier about the concept of the open-coded (or inline) iterators. This patch adds generic iterator loop verification logic, new STACK_ITER stack slot type to contain iterator state, and necessary kfunc plumbing for iterator's constructor, destructor and next methods. Next patch implements first specific iterator (numbers iterator for implementing for() loop logic). Such split allows to have more focused commits for verifier logic and separate commit that we could point later to demonstrating what does it take to add a new kind of iterator. Each kind of iterator has its own associated struct bpf_iter_, where denotes a specific type of iterator. struct bpf_iter_ state is supposed to live on BPF program stack, so there will be no way to change its size later on without breaking backwards compatibility, so choose wisely! But given this struct is specific to a given of iterator, this allows a lot of flexibility: simple iterators could be fine with just one stack slot (8 bytes), like numbers iterator in the next patch, while some other more complicated iterators might need way more to keep their iterator state. Either way, such design allows to avoid runtime memory allocations, which otherwise would be necessary if we fixed on-the-stack size and it turned out to be too small for a given iterator implementation. The way BPF verifier logic is implemented, there are no artificial restrictions on a number of active iterators, it should work correctly using multiple active iterators at the same time. This also means you can have multiple nested iteration loops. struct bpf_iter_ reference can be safely passed to subprograms as well. General flow is easiest to demonstrate with a simple example using number iterator implemented in next patch. Here's the simplest possible loop: struct bpf_iter_num it; int *v; bpf_iter_num_new(&it, 2, 5); while ((v = bpf_iter_num_next(&it))) { bpf_printk("X = %d", *v); } bpf_iter_num_destroy(&it); Above snippet should output "X = 2", "X = 3", "X = 4". Note that 5 is exclusive and is not returned. This matches similar APIs (e.g., slices in Go or Rust) that implement a range of elements, where end index is non-inclusive. In the above example, we see a trio of function: - constructor, bpf_iter_num_new(), which initializes iterator state (struct bpf_iter_num it) on the stack. If any of the input arguments are invalid, constructor should make sure to still initialize it such that subsequent bpf_iter_num_next() calls will return NULL. I.e., on error, return error and construct empty iterator. - next method, bpf_iter_num_next(), which accepts pointer to iterator state and produces an element. Next method should always return a pointer. The contract between BPF verifier is that next method will always eventually return NULL when elements are exhausted. Once NULL is returned, subsequent next calls should keep returning NULL. In the case of numbers iterator, bpf_iter_num_next() returns a pointer to an int (storage for this integer is inside the iterator state itself), which can be dereferenced after corresponding NULL check. - once done with the iterator, it's mandated that user cleans up its state with the call to destructor, bpf_iter_num_destroy() in this case. Destructor frees up any resources and marks stack space used by struct bpf_iter_num as usable for something else. Any other iterator implementation will have to implement at least these three methods. It is enforced that for any given type of iterator only applicable constructor/destructor/next are callable. I.e., verifier ensures you can't pass number iterator state into, say, cgroup iterator's next method. It is important to keep the naming pattern consistent to be able to create generic macros to help with BPF iter usability. E.g., one of the follow up patches adds generic bpf_for_each() macro to bpf_misc.h in selftests, which allows to utilize iterator "trio" nicely without having to code the above somewhat tedious loop explicitly every time. This is enforced at kfunc registration point by one of the previous patches in this series. At the implementation level, iterator state tracking for verification purposes is very similar to dynptr. We add STACK_ITER stack slot type, reserve necessary number of slots, depending on sizeof(struct bpf_iter_), and keep track of necessary extra state in the "main" slot, which is marked with non-zero ref_obj_id. Other slots are also marked as STACK_ITER, but have zero ref_obj_id. This is simpler than having a separate "is_first_slot" flag. Another big distinction is that STACK_ITER is *always refcounted*, which simplifies implementation without sacrificing usability. So no need for extra "iter_id", no need to anticipate reuse of STACK_ITER slots for new constructors, etc. Keeping it simple here. As far as the verification logic goes, there are two extensive comments: in process_iter_next_call() and iter_active_depths_differ() explaining some important and sometimes subtle aspects. Please refer to them for details. But from 10,000-foot point of view, next methods are the points of forking a verification state, which are conceptually similar to what verifier is doing when validating conditional jump. We branch out at a `call bpf_iter__next` instruction and simulate two outcomes: NULL (iteration is done) and non-NULL (new element is returned). NULL is simulated first and is supposed to reach exit without looping. After that non-NULL case is validated and it either reaches exit (for trivial examples with no real loop), or reaches another `call bpf_iter__next` instruction with the state equivalent to already (partially) validated one. State equivalency at that point means we technically are going to be looping forever without "breaking out" out of established "state envelope" (i.e., subsequent iterations don't add any new knowledge or constraints to the verifier state, so running 1, 2, 10, or a million of them doesn't matter). But taking into account the contract stating that iterator next method *has to* return NULL eventually, we can conclude that loop body is safe and will eventually terminate. Given we validated logic outside of the loop (NULL case), and concluded that loop body is safe (though potentially looping many times), verifier can claim safety of the overall program logic. The rest of the patch is necessary plumbing for state tracking, marking, validation, and necessary further kfunc plumbing to allow implementing iterator constructor, destructor, and next methods. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230308184121.1165081-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 215bf4962f6c9605710012fad222a5fec001b3ad Author: Andrii Nakryiko Date: Wed Mar 8 10:41:15 2023 -0800 bpf: add iterator kfuncs registration and validation logic Add ability to register kfuncs that implement BPF open-coded iterator contract and enforce naming and function proto convention. Enforcement happens at the time of kfunc registration and significantly simplifies the rest of iterators logic in the verifier. More details follow in subsequent patches, but we enforce the following conditions. All kfuncs (constructor, next, destructor) have to be named consistenly as bpf_iter__{new,next,destroy}(), respectively. represents iterator type, and iterator state should be represented as a matching `struct bpf_iter_` state type. Also, all iter kfuncs should have a pointer to this `struct bpf_iter_` as the very first argument. Additionally: - Constructor, i.e., bpf_iter__new(), can have arbitrary extra number of arguments. Return type is not enforced either. - Next method, i.e., bpf_iter__next(), has to return a pointer type and should have exactly one argument: `struct bpf_iter_ *` (const/volatile/restrict and typedefs are ignored). - Destructor, i.e., bpf_iter__destroy(), should return void and should have exactly one argument, similar to the next method. - struct bpf_iter_ size is enforced to be positive and a multiple of 8 bytes (to fit stack slots correctly). Such strictness and consistency allows to build generic helpers abstracting important, but boilerplate, details to be able to use open-coded iterators effectively and ergonomically (see bpf_for_each() in subsequent patches). It also simplifies the verifier logic in some places. At the same time, this doesn't hurt generality of possible iterator implementations. Win-win. Constructor kfunc is marked with a new KF_ITER_NEW flags, next method is marked with KF_ITER_NEXT (and should also have KF_RET_NULL, of course), while destructor kfunc is marked as KF_ITER_DESTROY. Additionally, we add a trivial kfunc name validation: it should be a valid non-NULL and non-empty string. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230308184121.1165081-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 07236eab7a3139da97aef9f5f21f403be82a82ea Author: Andrii Nakryiko Date: Wed Mar 8 10:41:14 2023 -0800 bpf: factor out fetching basic kfunc metadata Factor out logic to fetch basic kfunc metadata based on struct bpf_insn. This is not exactly short or trivial code to just copy/paste and this information is sometimes necessary in other parts of the verifier logic. Subsequent patches will rely on this to determine if an instruction is a kfunc call to iterator next method. No functional changes intended, including that verbose() warning behavior when kfunc is not allowed for a particular program type. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230308184121.1165081-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit d13b10ec6696b0c523fa21b65c7ff6f246a49560 Author: Sascha Hauer Date: Thu Feb 16 11:24:47 2023 +0100 drm/rockchip: dw_hdmi: discard modes with unachievable pixelclocks The Rockchip PLL drivers are currently table based and support only the most common pixelclocks. Discard all modes we cannot achieve at all. Normally the desired pixelclocks have an exact match in the PLL driver, nevertheless allow for a 0.1% error just in case. Tested-by: Nicolas Frattaroli Tested-by: Michael Riesch Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20230118132213.2911418-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20230216102447.582905-5-s.hauer@pengutronix.de commit 83b61f817f43ed67572d1e241c9f552e0a8bfff4 Author: Sascha Hauer Date: Thu Feb 16 11:24:46 2023 +0100 drm/rockchip: dw_hdmi: Add support for 4k@30 resolution This adds the PLL/phy settings to support higher resolutions like 4k@30. The values were taken from the Rockchip downstream Kernel. Tested-by: Michael Riesch Link: https://lore.kernel.org/r/20220926080435.259617-3-s.hauer@pengutronix.de Tested-by: Nicolas Frattaroli Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20230118132213.2911418-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20230216102447.582905-4-s.hauer@pengutronix.de commit de13db32b0f89a040b50a51d129b9443159a660a Author: Sascha Hauer Date: Thu Feb 16 11:24:45 2023 +0100 drm/rockchip: dw_hdmi: relax mode_valid hook The driver checks if the pixel clock of the given mode matches an entry in the mpll config table. At least for the Synopsys phy the frequencies in the mpll table are meant as a frequency range up to which the entry works, not as a frequency that must match the pixel clock. Return MODE_OK when the pixelclock is smaller than one of the mpll frequencies to allow for more display resolutions. Limit this behaviour to the Synopsys phy at the moment and keep the current behaviour of forcing exact pixelclock rates for the other phys until it has been sorted out how and if the vendor specific phys work with non standard clock rates. Tested-by: Michael Riesch Link: https://lore.kernel.org/r/20220926080435.259617-2-s.hauer@pengutronix.de Tested-by: Nicolas Frattaroli Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20230118132213.2911418-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20230216102447.582905-3-s.hauer@pengutronix.de commit 8e140cb60270ee8b5b41e80806323c668d8d4da9 Author: Sascha Hauer Date: Thu Feb 16 11:24:44 2023 +0100 drm/rockchip: vop: limit maximum resolution to hardware capabilities The different VOP variants support different maximum resolutions. Reject resolutions that are not supported by a specific variant. This hasn't been a problem in the upstream driver so far as 1920x1080 has been the maximum resolution supported by the HDMI driver and that resolution is supported by all VOP variants. Now with higher resolutions supported in the HDMI driver we have to limit the resolutions to the ones supported by the VOP. The actual maximum resolutions are taken from the Rockchip downstream Kernel. Signed-off-by: Sascha Hauer [dropped the vdisplay > height check after talking to Sascha, as according to the vendor code "Actually vop hardware has no output height limit" (from vendor commit "drm/rockchip: vop: get rid of max_output.height check") and the height-check broke the px30-minievb display] Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20230216102447.582905-2-s.hauer@pengutronix.de commit 5239a89b06d6b199f133bf0ffea421683187f257 Author: John Stultz Date: Wed Mar 8 20:40:43 2023 +0000 pstore: Revert pmsg_lock back to a normal mutex This reverts commit 76d62f24db07f22ccf9bc18ca793c27d4ebef721. So while priority inversion on the pmsg_lock is an occasional problem that an rt_mutex would help with, in uses where logging is writing to pmsg heavily from multiple threads, the pmsg_lock can be heavily contended. After this change landed, it was reported that cases where the mutex locking overhead was commonly adding on the order of 10s of usecs delay had suddenly jumped to ~msec delay with rtmutex. It seems the slight differences in the locks under this level of contention causes the normal mutexes to utilize the spinning optimizations, while the rtmutexes end up in the sleeping slowpath (which allows additional threads to pile on trying to take the lock). In this case, it devolves to a worse case senerio where the lock acquisition and scheduling overhead dominates, and each thread is waiting on the order of ~ms to do ~us of work. Obviously, having tons of threads all contending on a single lock for logging is non-optimal, so the proper fix is probably reworking pstore pmsg to have per-cpu buffers so we don't have contention. Additionally, Steven Rostedt has provided some furhter optimizations for rtmutexes that improves the rtmutex spinning path, but at least in my testing, I still see the test tripping into the sleeping path on rtmutexes while utilizing the spinning path with mutexes. But in the short term, lets revert the change to the rt_mutex and go back to normal mutexes to avoid a potentially major performance regression. And we can work on optimizations to both rtmutexes and finer-grained locking for pstore pmsg in the future. Cc: Wei Wang Cc: Midas Chien Cc: "Chunhui Li (李春辉)" Cc: Steven Rostedt Cc: Kees Cook Cc: Anton Vorontsov Cc: "Guilherme G. Piccoli" Cc: Tony Luck Cc: kernel-team@android.com Fixes: 76d62f24db07 ("pstore: Switch pmsg_lock to an rt_mutex to avoid priority inversion") Reported-by: "Chunhui Li (李春辉)" Signed-off-by: John Stultz Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20230308204043.2061631-1-jstultz@google.com commit ed69e0667db5fd0f7eb1fdef329e0985939b0148 Merge: 10369080454d8 12fabae03ca64 Author: Jakub Kicinski Date: Wed Mar 8 14:34:22 2023 -0800 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Andrii Nakryiko says: ==================== pull-request: bpf-next 2023-03-08 We've added 23 non-merge commits during the last 2 day(s) which contain a total of 28 files changed, 414 insertions(+), 104 deletions(-). The main changes are: 1) Add more precise memory usage reporting for all BPF map types, from Yafang Shao. 2) Add ARM32 USDT support to libbpf, from Puranjay Mohan. 3) Fix BTF_ID_LIST size causing problems in !CONFIG_DEBUG_INFO_BTF, from Nathan Chancellor. 4) IMA selftests fix, from Roberto Sassu. 5) libbpf fix in APK support code, from Daniel Müller. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (23 commits) selftests/bpf: Fix IMA test libbpf: USDT arm arg parsing support libbpf: Refactor parse_usdt_arg() to re-use code libbpf: Fix theoretical u32 underflow in find_cd() function bpf: enforce all maps having memory usage callback bpf: offload map memory usage bpf, net: xskmap memory usage bpf, net: sock_map memory usage bpf, net: bpf_local_storage memory usage bpf: local_storage memory usage bpf: bpf_struct_ops memory usage bpf: queue_stack_maps memory usage bpf: devmap memory usage bpf: cpumap memory usage bpf: bloom_filter memory usage bpf: ringbuf memory usage bpf: reuseport_array memory usage bpf: stackmap memory usage bpf: arraymap memory usage bpf: hashtab memory usage ... ==================== Link: https://lore.kernel.org/r/20230308193533.1671597-1-andrii@kernel.org Signed-off-by: Jakub Kicinski commit f89f8e1661e6bef87073ad4934e1eede5f69f4b7 Author: Kamalesh Babulal Date: Sat Mar 4 12:59:23 2023 +0530 device_cgroup: Fix typo in devcgroup_css_alloc description Fix the stale cgroup.c path in the devcgroup_css_alloc() description. Signed-off-by: Kamalesh Babulal Signed-off-by: Paul Moore commit 12fabae03ca6474fd571bf6ddb37d009533305d6 Author: Roberto Sassu Date: Wed Mar 8 11:37:13 2023 +0100 selftests/bpf: Fix IMA test Commit 62622dab0a28 ("ima: return IMA digest value only when IMA_COLLECTED flag is set") caused bpf_ima_inode_hash() to refuse to give non-fresh digests. IMA test #3 assumed the old behavior, that bpf_ima_inode_hash() still returned also non-fresh digests. Correct the test by accepting both cases. If the samples returned are 1, assume that the commit above is applied and that the returned digest is fresh. If the samples returned are 2, assume that the commit above is not applied, and check both the non-fresh and fresh digest. Fixes: 62622dab0a28 ("ima: return IMA digest value only when IMA_COLLECTED flag is set") Reported-by: David Vernet Signed-off-by: Roberto Sassu Signed-off-by: Andrii Nakryiko Reviewed-by: Matt Bobrowski Link: https://lore.kernel.org/bpf/20230308103713.1681200-1-roberto.sassu@huaweicloud.com commit 5922231bd346da717ceee8d14b4361fd595e58ac Author: Tom Rix Date: Wed Mar 8 09:10:57 2023 -0500 drm/amd/display: remove unused variable available With gcc and W=1, there is this error drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_dpia_bw.c:297:13: error: variable ‘available’ set but not used [-Werror=unused-but-set-variable] 297 | int available = 0; | ^~~~~~~~~ Since available is unused, remove it. Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit 3a906a0cb150a872a23f6204449d3f8b50693837 Author: Tom Rix Date: Wed Mar 8 09:09:43 2023 -0500 drm/amd/display: remove unused variable res_pool With gcc and W=1, there is this error drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_mst_types.c:1214:31: error: variable ‘res_pool’ set but not used [-Werror=unused-but-set-variable] 1214 | struct resource_pool *res_pool; | ^~~~~~~~ Since res_pool is unused, remove it. Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit 58265640fbd9a57bca521c3d83012fff2cd15fc6 Author: Bjorn Helgaas Date: Tue Mar 7 14:22:21 2023 -0600 drm/amdgpu: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Signed-off-by: Alex Deucher commit 6c5e25a0255d56e8455869cd7f90bb9be7478132 Author: David Tadokoro Date: Tue Mar 7 16:14:17 2023 -0300 drm/amd/display: add prefix to amdgpu_dm_crtc.h functions Some amdgpu_dm_crtc.h functions didn't have names that indicated where they were declared. To better filter results in debug tools like ftrace, prefix these functions with 'amdgpu_dm_crtc_'. Signed-off-by: David Tadokoro Signed-off-by: Alex Deucher commit a9d491d99ece898fe6fd5f7374eacb5223e1531b Author: Alex Deucher Date: Wed Mar 8 09:29:37 2023 -0500 Revert "drm/amd/display: Pass proper parent for DM backlight device registration" This reverts commit d24b77e444bef83155557ebf4c2b3c551f198926. This does not work as expected. Bug: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/issues/730 Signed-off-by: Alex Deucher commit d068b700432308962d1bb6da467d1dfb1358c2be Author: Veerabadhran Gopalakrishnan Date: Wed Mar 8 19:33:53 2023 +0530 drm/amdgpu/soc21: Add video cap query support for VCN_4_0_4 Added the video capability query support for VCN version 4_0_4 Signed-off-by: Veerabadhran Gopalakrishnan Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit c0a76ae8743a8d6cfa5c06b5efa497139100bed6 Author: David Tadokoro Date: Tue Mar 7 19:53:41 2023 -0300 drm/amd/display: remove legacy fields of dc_plane_cap struct The fields blends_with_above and blends_with_below of struct dc_plane_cap (defined in dc/dc.h) are boolean and set to true by default. All instances of a dc_plane_cap maintain the default values of both. Also, there is only one if statement that checks those fields and there would be the same effect if it was deleted (assuming that those fields are always going to be true). For this reason, considering both fields as legacy ones, this commit removes them and the aforementioned if statement. Reviewed-by: Rodrigo Siqueira Signed-off-by: David Tadokoro Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 83923cb27323139f9e2185db9b3b1299e6cf22bc Author: Alex Deucher Date: Tue Feb 28 14:54:43 2023 -0500 Revert "drm/amdgpu/display: change pipe policy for DCN 2.1" This reverts commit fa458eb10dc7218146a84e6d2e072424e64d188a. The issue is no longer present even with this commit present as verified by the original reporter. Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1849#note_1759599 Signed-off-by: Rodrigo Siqueira commit dffe68131707df72c9a60f18fddd3732a6d3c676 Author: Peter Foley Date: Thu Jan 12 23:30:07 2023 -0500 amdgpu: Avoid building on UML The amdgpu driver tries to use fields not supported by UML's cpuinfo struct. Disable the driver when targeting UML to avoid tripping up allyesconfig. e.g. ../drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c: In function ‘intel_core_rkl_chk’: ../drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1742:33: error: initialization of ‘struct cpuinfo_x86 *’ from incompatible pointer type ‘struct cpuinfo_um *’ [-Werror=incompatible-pointer-types ] ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: In function ‘kfd_cpumask_to_apic_id’: ../drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:2157:48: error: ‘struct cpuinfo_um’ has no member named ‘apicid’ Acked-by: Felix Kuehling Signed-off-by: Peter Foley Signed-off-by: Alex Deucher commit 36e88a9e4569df86e81dc75a7fc6f2d41f8ab8e0 Author: Husain Alshehhi Date: Sun Mar 5 21:24:22 2023 +0000 drivers/gpu: fix typo in comment Replace "isntance" with "instance". Signed-off-by: Husain Alshehhi Signed-off-by: Alex Deucher commit 8bf0d9cdf36b0bebf17b733e3f5158783d765df3 Author: David Tadokoro Date: Sun Mar 5 23:24:27 2023 -0300 drm/amd/display: add prefix to amdgpu_dm_plane.h functions The amdgpu_dm_plane.h functions didn't have names that indicated where they were declared. To better filter results in debug tools like ftrace, prefix these functions with 'amdgpu_dm_plane_'. Note that we may want to make this same change in other files like amdgpu_dm_crtc.h. Signed-off-by: David Tadokoro Signed-off-by: Alex Deucher commit b3816cf8138b6814375ec65673bcba91d368ee9f Author: Paul Moore Date: Wed Mar 8 13:28:18 2023 -0500 lsm: fix a badly named parameter in security_get_getsecurity() There is no good reason for why the "_buffer" parameter needs an underscore, get rid of it. Signed-off-by: Paul Moore commit 1e2523d745cff3c5c066e66299d3cf179baa3cbc Author: Paul Moore Date: Wed Mar 8 12:31:03 2023 -0500 lsm: fix doc warnings in the LSM hook comments Signed-off-by: Paul Moore commit 96acbef66b44c0fb25d3ab9c632a9a750e678ce7 Author: Matthew Wilcox (Oracle) Date: Wed Mar 8 18:55:18 2023 +0100 udf: Use folios in udf_adinicb_writepage() Make udf_adinicb_writepage() fully converted to using the passed folio instead of converting it to the page. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Jan Kara commit 502a29b04d857c28aa36f8829a5c673b9b8864a6 Author: XU pengfei Date: Wed Oct 26 16:29:24 2022 +0800 smack_lsm: remove unnecessary type casting Remove unnecessary type casting. The type of inode variable is struct inode *, so no type casting required. Signed-off-by: XU pengfei Signed-off-by: Casey Schaufler commit f37acbde076d8dbf5e4c694f29760e608fdffe11 Author: Herve Codina via Alsa-devel Date: Tue Mar 7 15:15:03 2023 +0100 soc: fsl: cpm1: qmc: Fix assigned timeslot masks The assigned timeslot masks are 64bit values. In case of 64 timeslots the code uses (1 << 64) which is undefined on a 64bit value. On the PowerPC architecture, this lead to an incorrect result as (1 << 64) produces the same result as (1 << 0). Fix the masks values taking care of the 64 timeslots case. Signed-off-by: Herve Codina Link: https://lore.kernel.org/r/167819855177.26.11163930602844526001@mailman-core.alsa-project.org Signed-off-by: Mark Brown commit 0fb6f518cb46cf8bac7c30c29171050e355cd738 Author: Herve Codina Date: Tue Mar 7 15:15:02 2023 +0100 dt-bindings: soc: fsl: cpm_qe: cpm1-tsa: Remove unneeded property Remove the unneeded and unused #fsl,serial-cells property. Signed-off-by: Herve Codina Link: https://lore.kernel.org/r/20230307141503.159766-3-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 33a33005b2db0966c00d4f58dd2a36e5a44217db Author: Herve Codina Date: Tue Mar 7 15:15:01 2023 +0100 dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Remove unneeded property Remove the unneeded and unused #fsl,chan-cells property. Signed-off-by: Herve Codina Link: https://lore.kernel.org/r/20230307141503.159766-2-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 5a50c621a4513d9664c55b661400c0f04444c190 Author: Hans de Goede Date: Tue Feb 21 15:53:26 2023 +0100 drivers: staging: rtl8723bs: Remove pmlmepriv->num_of_scanned pmlmepriv->num_of_scanned is only ever set and never read, remove it. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230221145326.7808-4-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit fea50d5fba5a03ddb5c81863533afdaa91002690 Author: Hans de Goede Date: Tue Feb 21 15:53:25 2023 +0100 drivers: staging: rtl8723bs: Remove unused clr_fwstate() function The clr_fwstate() function is not used anywhere, remove it. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230221145326.7808-3-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 3f467036093fedd7e231924327455fc609b5ef02 Author: Hans de Goede Date: Tue Feb 21 15:53:24 2023 +0100 drivers: staging: rtl8723bs: Fix locking in rtw_scan_timeout_handler() Commit cc7ad0d77b51 ("drivers: staging: rtl8723bs: Fix deadlock in rtw_surveydone_event_callback()") besides fixing the deadlock also modified rtw_scan_timeout_handler() to use spin_[un]lock_irq() instead of spin_[un]lock_bh(). Disabling the IRQs is not necessary since all code taking this lock runs from either user contexts or from softirqs rtw_scan_timeout_handler() is the only function taking pmlmepriv->lock which uses spin_[un]lock_irq() for this. Switch back to spin_[un]lock_bh() to make it consistent with the rest of the code. Fixes: cc7ad0d77b51 ("drivers: staging: rtl8723bs: Fix deadlock in rtw_surveydone_event_callback()") Cc: Duoming Zhou Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230221145326.7808-2-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 215792eda008f6a1e7ed9d77fa20d582d22bb114 Author: Hans de Goede Date: Tue Feb 21 15:53:23 2023 +0100 drivers: staging: rtl8723bs: Fix locking in _rtw_join_timeout_handler() Commit 041879b12ddb ("drivers: staging: rtl8192bs: Fix deadlock in rtw_joinbss_event_prehandle()") besides fixing the deadlock also modified _rtw_join_timeout_handler() to use spin_[un]lock_irq() instead of spin_[un]lock_bh(). _rtw_join_timeout_handler() calls rtw_do_join() which takes pmlmepriv->scanned_queue.lock using spin_[un]lock_bh(). This spin_unlock_bh() call re-enables softirqs which triggers an oops in kernel/softirq.c: __local_bh_enable_ip() when it calls lockdep_assert_irqs_enabled(): [ 244.506087] WARNING: CPU: 2 PID: 0 at kernel/softirq.c:376 __local_bh_enable_ip+0xa6/0x100 ... [ 244.509022] Call Trace: [ 244.509048] [ 244.509100] _rtw_join_timeout_handler+0x134/0x170 [r8723bs] [ 244.509468] ? __pfx__rtw_join_timeout_handler+0x10/0x10 [r8723bs] [ 244.509772] ? __pfx__rtw_join_timeout_handler+0x10/0x10 [r8723bs] [ 244.510076] call_timer_fn+0x95/0x2a0 [ 244.510200] __run_timers.part.0+0x1da/0x2d0 This oops is causd by the switch to spin_[un]lock_irq() which disables the IRQs for the entire duration of _rtw_join_timeout_handler(). Disabling the IRQs is not necessary since all code taking this lock runs from either user contexts or from softirqs, switch back to spin_[un]lock_bh() to fix this. Fixes: 041879b12ddb ("drivers: staging: rtl8192bs: Fix deadlock in rtw_joinbss_event_prehandle()") Cc: Duoming Zhou Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20230221145326.7808-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit af5a5587a1d4c6c0a242f41751958f264ac3b0b2 Author: Rohit Chavan Date: Fri Feb 24 18:04:01 2023 +0530 staging: vme: remove blank line after return statement This patch resolves a checkpatch issue by removing blank line, after return statement at end of the function. Signed-off-by: Rohit Chavan Link: https://lore.kernel.org/r/20230224123401.1365-1-roheetchavan@gmail.com Signed-off-by: Greg Kroah-Hartman commit f62ca0b6e31d82e0622a8e31ce5562e80edf6c3c Author: Paul Moore Date: Tue Mar 7 14:55:01 2023 -0500 selinux: uninline unlikely parts of avc_has_perm_noaudit() This is based on earlier patch posted to the list by Linus, his commit description read: "avc_has_perm_noaudit()is one of those hot functions that end up being used by almost all filesystem operations (through "avc_has_perm()") and it's intended to be cheap enough to inline. However, it turns out that the unlikely parts of it (where it doesn't find an existing avc node) need a fair amount of stack space for the automatic replacement node, so if it were to be inlined (at least clang does not) it would just use stack space unnecessarily. So split the unlikely part out of it, and mark that part noinline. That improves the actual likely part." The basic idea behind the patch was reasonable, but there were minor nits (double indenting, etc.) and the RCU read lock unlock/re-lock in avc_compute_av() began to look even more ugly. This patch builds on Linus' first effort by cleaning things up a bit and removing the RCU unlock/lock dance in avc_compute_av(). Removing the RCU lock dance in avc_compute_av() is safe as there are currently two callers of avc_compute_av(): avc_has_perm_noaudit() and avc_has_extended_perms(). The first caller in avc_has_perm_noaudit() does not require a RCU lock as there is no avc_node to protect so the RCU lock can be dropped before calling avc_compute_av(). The second caller, avc_has_extended_perms(), is similar in that there is no avc_node that requires RCU protection, but the code is simplified by holding the RCU look around the avc_compute_av() call, and given that we enter a RCU critical section in security_compute_av() (called from av_compute_av()) the impact will likely be unnoticeable. It is also worth noting that avc_has_extended_perms() is only called from the SELinux ioctl() access control hook at the moment. Acked-by: Linus Torvalds Signed-off-by: Paul Moore commit b4c108d7daf1039cf19388baff30a94563de3f3e Author: Philippe Mathieu-Daudé Date: Tue Feb 14 09:38:57 2023 +0100 x86/cpu: Expose arch_cpu_idle_dead()'s prototype definition Include to make sure arch_cpu_idle_dead() matches its prototype going forward. Inspired-by: Josh Poimboeuf Signed-off-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/r/20230214083857.50163-1-philmd@linaro.org Signed-off-by: Josh Poimboeuf commit 071c44e4278156f18a6a56958617223b6bffa6ab Author: Josh Poimboeuf Date: Mon Feb 13 23:05:58 2023 -0800 sched/idle: Mark arch_cpu_idle_dead() __noreturn Before commit 076cbf5d2163 ("x86/xen: don't let xen_pv_play_dead() return"), in Xen, when a previously offlined CPU was brought back online, it unexpectedly resumed execution where it left off in the middle of the idle loop. There were some hacks to make that work, but the behavior was surprising as do_idle() doesn't expect an offlined CPU to return from the dead (in arch_cpu_idle_dead()). Now that Xen has been fixed, and the arch-specific implementations of arch_cpu_idle_dead() also don't return, give it a __noreturn attribute. This will cause the compiler to complain if an arch-specific implementation might return. It also improves code generation for both caller and callee. Also fixes the following warning: vmlinux.o: warning: objtool: do_idle+0x25f: unreachable instruction Reported-by: Paul E. McKenney Tested-by: Paul E. McKenney Link: https://lore.kernel.org/r/60d527353da8c99d4cf13b6473131d46719ed16d.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit dfb0f170cadb03da4f408ae53cc2908120e1f90e Author: Josh Poimboeuf Date: Mon Feb 13 23:05:55 2023 -0800 sched/idle: Make sure weak version of arch_cpu_idle_dead() doesn't return arch_cpu_idle_dead() should never return. Make it so. Link: https://lore.kernel.org/r/cf5ad95eef50f7704bb30e7770c59bfe23372af7.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit 69dee6f0338a20c76a7bc61c0a6b59f25e1b25c8 Author: Josh Poimboeuf Date: Mon Feb 13 23:05:54 2023 -0800 xtensa/cpu: Mark cpu_die() __noreturn cpu_die() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Acked-by: Max Filippov Link: https://lore.kernel.org/r/ad801544cab7c26a0f3bbf7cfefb67303f4cd866.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit d08e12e8126ec88d6cb1a7eb160d8d7b52c8699f Author: Josh Poimboeuf Date: Mon Feb 13 23:05:53 2023 -0800 xtensa/cpu: Make sure cpu_die() doesn't return cpu_die() doesn't return. Make that more explicit with a BUG(). BUG() is preferable to unreachable() because BUG() is a more explicit failure mode and avoids undefined behavior like falling off the edge of the function into whatever code happens to be next. Link: https://lore.kernel.org/r/cca346b5c87693499e630291d78fb0bf12c24290.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit eab89405b6b59947ee29cc21fb39ead66142c9b5 Author: Josh Poimboeuf Date: Mon Feb 13 23:05:52 2023 -0800 x86/cpu: Mark play_dead() __noreturn play_dead() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Link: https://lore.kernel.org/r/f3a069e6869c51ccfdda656b76882363bc9fcfa4.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit a02f50b573b3c90a3633a5ab67435fe4c0de144d Author: Josh Poimboeuf Date: Mon Feb 13 23:05:51 2023 -0800 x86/cpu: Make sure play_dead() doesn't return After commit 076cbf5d2163 ("x86/xen: don't let xen_pv_play_dead() return"), play_dead() never returns. Make that more explicit with a BUG(). BUG() is preferable to unreachable() because BUG() is a more explicit failure mode and avoids undefined behavior like falling off the edge of the function into whatever code happens to be next. Link: https://lore.kernel.org/r/11e6ac1cf10f92967882926e3ac16287b50642f2.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit b9952d5009440b01dedd793a57abbe6cfe10f995 Author: Josh Poimboeuf Date: Mon Feb 13 23:05:50 2023 -0800 sparc/cpu: Mark cpu_play_dead() __noreturn cpu_play_dead() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/r/847fdb53cc7124bb7c94e3e104e443a29be85184.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit fd49efb3c75475b65d7541ee40603498807ff110 Author: Josh Poimboeuf Date: Mon Feb 13 23:05:49 2023 -0800 sh/cpu: Expose arch_cpu_idle_dead()'s prototype definition Include to make sure arch_cpu_idle_dead() matches its prototype going forward. Link: https://lore.kernel.org/r/3d9661e97828fb464a48d4becf18f12604831903.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit 1644b74192265875cdf37dadfa33f34e0ea4fcc8 Author: Josh Poimboeuf Date: Mon Feb 13 23:05:48 2023 -0800 sh/cpu: Mark play_dead() __noreturn play_dead() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Link: https://lore.kernel.org/r/03549a74fad9f73576d57e6fc0b5102322f9cff4.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit 243971885418fcf772f18019eb3fabadcf0205d1 Author: Josh Poimboeuf Date: Mon Feb 13 23:05:47 2023 -0800 sh/cpu: Make sure play_dead() doesn't return play_dead() doesn't return. Make that more explicit with a BUG(). BUG() is preferable to unreachable() because BUG() is a more explicit failure mode and avoids undefined behavior like falling off the edge of the function into whatever code happens to be next. Link: https://lore.kernel.org/r/d0c3ff5349adfe8fd227acc236ae2c278a05eb4c.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit 5e00d69cdef4cd1c737e6286a39f83ce20a91034 Author: Josh Poimboeuf Date: Mon Feb 13 23:05:46 2023 -0800 powerpc/cpu: Mark start_secondary_resume() __noreturn start_secondary_resume() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Acked-by: Michael Ellerman (powerpc) Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/b6b2141f832d8cd8ade65f190d04b011cda5f9bb.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit 9e57f049d1571db1dc77c69c87403defc9d3e5ae Author: Josh Poimboeuf Date: Mon Feb 13 23:05:45 2023 -0800 mips/cpu: Mark play_dead() __noreturn play_dead() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Acked-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/r/2897b51a9b8beb5b594fe66fb1d3a479ddd2a0e2.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit a80ceed6c9c24088d7a2e3c414eae1fe88a8ccbe Author: Josh Poimboeuf Date: Mon Feb 13 23:05:44 2023 -0800 mips/cpu: Make sure play_dead() doesn't return play_dead() doesn't return. Make that more explicit with a BUG(). BUG() is preferable to unreachable() because BUG() is a more explicit failure mode and avoids undefined behavior like falling off the edge of the function into whatever code happens to be next. Acked-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/r/b195e4da190bb06b7d4af15d66ce6129e2347630.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit 142dbcf3b6a93ecfe8ccbee60c611175f5459c23 Author: Josh Poimboeuf Date: Thu Feb 16 10:42:52 2023 -0800 mips/cpu: Expose play_dead()'s prototype definition Include to make sure play_dead() matches its prototype going forward. Acked-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé Link: https://lkml.kernel.org/r/20230216184249.ogaqsaykottpxtcb@treble Signed-off-by: Josh Poimboeuf commit 0a689b8241ae3a3d082d3ce706dfc6405fabe9d5 Author: Philipp Hortmann Date: Tue Mar 7 22:01:25 2023 +0100 staging: rtl8192e: Remove unused Array Rtl8192PciERadioD_Array The array Rtl8192PciERadioD_Array is only used in function rtl92e_config_rf_path which is only called in function rtl92e_config_rf. In function rtl92e_config_rf a termination condition for the loop is set to priv->num_total_rf_path = RTL819X_TOTAL_RF_PATH = 2. The loop is only executed with numbers 0 and 1 for eRFPath. So the function rtl92e_config_rf_path is only called with eRFPath for 0 and 1 and never with 3 that would make the "case RF90_PATH_D:" be called. Remove resulting dead code. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/608ced17b85ca321fdc0026c686e3c62a9d6d8cd.1678222487.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit f5f7aaa87ffdfd1b0c57b7d35d744c4a46eebcfa Author: Philipp Hortmann Date: Tue Mar 7 22:01:06 2023 +0100 staging: rtl8192e: Remove unused Array Rtl8192PciERadioC_Array The array Rtl8192PciERadioC_Array is only used in function rtl92e_config_rf_path which is only called in function rtl92e_config_rf. In function rtl92e_config_rf a termination condition for the loop is set to priv->num_total_rf_path = RTL819X_TOTAL_RF_PATH = 2. The loop is only executed with numbers 0 and 1 for eRFPath. So the function rtl92e_config_rf_path is only called with eRFPath for 0 and 1 and never with 2 that would make the "case RF90_PATH_C:" be called. Remove resulting dead code. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/ed1e0df7ed677c335340f42c1108e7b5c0f18462.1678222487.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 50cbec61ad7f66ecbe6786f8e03351454e17ee9e Author: Philipp Hortmann Date: Sat Mar 4 20:13:41 2023 +0100 staging: rtl8192e: Remove conditions for RF_2T4R Remove conditions for RF_2T4R because hardware that uses RF_2T4R does not exist. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/af7dcd620fdad63b2f324d626f1c97601895823a.1677955334.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 718e16d6fb5552817ee2cdba56b2fff20e3308e1 Author: Philipp Hortmann Date: Sat Mar 4 20:13:22 2023 +0100 staging: rtl8192e: Remove empty Array Rtl8192PciEPHY_REGArray Remove empty array Rtl8192PciEPHY_REGArray and the code where it is used because it is dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/511bd239bf033dca3efcc64a640d5343c98fa897.1677955334.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit fa0dcd5909ad9168bc51ad4f577f3631803d2ab2 Author: Philipp Hortmann Date: Thu Mar 2 20:14:57 2023 +0100 staging: rtl8192e: Change filename r8192E_hwimg.x to table.x Change r8192E_hwimg.c to table.c and r8192E_hwimg.h to table.h to adapt filenames from drivers/net/wireless/realtek/rtlwifi rtl8192ee and rtl8192se. Task is from TODO file. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/20230302191457.GA17628@matrix-ESPRIMO-P710 Signed-off-by: Greg Kroah-Hartman commit 4bd92a7714d19413eb477d4c02fbca4aae27abb5 Author: Philipp Hortmann Date: Sat Feb 25 19:20:50 2023 +0100 staging: rtl8192e: Remove checks of pointer to rtllib.. and ScanOpera.. Function pointers of rtllib_ips_leave and ScanOperationBackupHandler is set while executing the probe function. Therefore a NULL pointer check is not required. Remove checks as it is dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/8b01cbfaad2db4666b98bfeae29dd429d8c6cd07.1677345331.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 997f7f0c2c32fa7679673242eb67b970636c7aeb Author: Philipp Hortmann Date: Sat Feb 25 19:20:41 2023 +0100 staging: rtl8192e: Remove checks of pointer to stop_send.. and rtllib_.. Function pointers of stop_send_beacons and rtllib_ips_leave_wq is set while executing the probe function. Therefore a NULL pointer check is not required. Remove checks as it is dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/f12e9167499344059f77991d2058c050bbe744d2.1677345331.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit f7cc87391a203ab713877fdbce2956ced91b9ed6 Author: Philipp Hortmann Date: Sat Feb 25 19:20:33 2023 +0100 staging: rtl8192e: Remove checks of pointer to LeisureP.. and start_se.. Function pointers of LeisurePSLeave and start_send_beacons is set while executing the probe function. Therefore a NULL pointer check is not required. Remove checks as it is dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/cd828bb1c8dfbb6d2a85d770c82afbb9889e0ea2.1677345331.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 237fea2f2dc618cc89b49c2713468f86cab63ed6 Author: Philipp Hortmann Date: Sat Feb 25 19:20:26 2023 +0100 staging: rtl8192e: Remove checks of pointer to handle_a.. and handle_b.. Function pointers of handle_assoc_response and handle_beacon is set while executing the probe function. Therefore a NULL pointer check is not required. Remove checks as it is dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/5c0fd114c24616bc03271ccb0a72a6bc68e45d61.1677345331.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5e2b6593f27052ca997ecf822f62b5a301a25b78 Author: Philipp Hortmann Date: Thu Feb 23 07:47:28 2023 +0100 staging: rtl8192e: Remove empty struct rtl819x_ops Remove empty struct rtl819x_ops as it is dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/31b5b0ba88d7b07b0407956d56446e8f0e62e3e7.1677133271.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit fda2093860df4812d69052a8cf4997e53853a340 Author: Philipp Hortmann Date: Thu Feb 23 07:47:21 2023 +0100 staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE Replace macro RTL_PCI_DEVICE with PCI_DEVICE to get rid of rtl819xp_ops which is empty. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/8b45ee783fa91196b7c9d6fc840a189496afd2f4.1677133271.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0296ef43567a292f171708769660705385db77a6 Author: Philipp Hortmann Date: Tue Feb 21 21:53:43 2023 +0100 staging: rtl8192e: Remove entry .nic_type from struct rtl819x_ops Remove unchanged entry .nic_type and replace it with constant NIC_8192E. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/f1fd37a2d2b90bef8caac31a98f3eeff404b3095.1677010997.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5ac30dd269df943bfd37fbd72e09a07f2bf450c5 Author: Philipp Hortmann Date: Tue Feb 21 21:53:32 2023 +0100 staging: rtl8192e: Remove entry .link_change from struct rtl819x_ops Remove entry .link_change and replace it with function name rtl92e_link_change. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/9b451317eb4c13db007476c30212ffb09ced2356.1677010997.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 210b02c8f1c9c6ac672558384709f561a3aeec01 Author: Philipp Hortmann Date: Tue Feb 21 21:53:24 2023 +0100 staging: rtl8192e: Remove dead code from struct rtl819x_ops Remove entry .rx_command_packet_handler, .irq_clear and .init_before_adapter_start as it is dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/93427f1b2ad5841451d7e8cc8a621d7eff8cd916.1677010997.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3caa21422f62d4dffb70949a35a9b9f0b4855f63 Author: Philipp Hortmann Date: Tue Feb 21 21:53:17 2023 +0100 staging: rtl8192e: Remove entry .rx_check_stuc.. from struct rtl819x_ops Remove entry .rx_check_stuck_handler and replace it with function name rtl92e_is_rx_stuck. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/6538f1e158664837f6d1e7a20583ff20fc4f1403.1677010997.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit e1ac4b672fd2adcfc4ae19de29ae29e07f701376 Author: Philipp Hortmann Date: Tue Feb 21 21:53:11 2023 +0100 staging: rtl8192e: Remove entry .tx_check_stuc.. from struct rtl819x_ops Remove entry .tx_check_stuck_handler and replace it with function name rtl92e_is_tx_stuck. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/f58cc7b39f4a6bce0606bdd90a706b35b87d8256.1677010997.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 302c42c556ce29470414b66abb00b8f82c3c9bc8 Author: Philipp Hortmann Date: Tue Feb 21 21:53:03 2023 +0100 staging: rtl8192e: Remove entry .interrupt_re.. from struct rtl819x_ops Remove entry .interrupt_recognized and replace it with function name rtl92e_ack_irq. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/a972ff8963b426f20651810b5161c8759ffa2d05.1677010997.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 45554ebbdad590733e9e8a0479e965feaa94abff Author: Philipp Hortmann Date: Tue Feb 21 21:52:55 2023 +0100 staging: rtl8192e: Remove entry .tx_enable from struct rtl819x_ops Remove entry .tx_enable and replace it with function name rtl92e_enable_tx. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/76955e787fd161dea83d10e81054fafb3b334b5c.1677010997.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 026616a187a67d6472c61b917c300d381ccbb1cc Author: Philipp Hortmann Date: Sun Feb 19 22:16:49 2023 +0100 staging: rtl8192e: Remove entry .rx_enable from struct rtl819x_ops Remove entry .rx_enable and replace it with function name rtl92e_enable_rx. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/8fd6c4b18cff8662215e27d299205646ce720a3b.1676840647.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit bba6744fd3ffb7ed9a1606f336e55cac36cbc4a6 Author: Philipp Hortmann Date: Sun Feb 19 22:16:43 2023 +0100 staging: rtl8192e: Remove entry .irq_disable from struct rtl819x_ops Remove entry .irq_disable and replace it with function name rtl92e_disable_irq. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/6d981b554a73ca965096e434d687b9827b0b96b2.1676840647.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 555034bcd0afea9494cb0a87047329683bc8ed7e Author: Philipp Hortmann Date: Sun Feb 19 22:16:35 2023 +0100 staging: rtl8192e: Remove entry .irq_enable from struct rtl819x_ops Remove entry .irq_enable and replace it with function name rtl92e_enable_irq. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/c23a034632e06b0d9dcb98bd2311010561b6645e.1676840647.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 51515f0a10c6a2127ec422d5ced9ae7fdec78c9b Author: Philipp Hortmann Date: Sun Feb 19 22:16:28 2023 +0100 staging: rtl8192e: Remove entry .update_ratr_t.. from struct rtl819x_ops Remove entry .update_ratr_table and replace it with function name rtl92e_update_ratr_table. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b9557fd44fde0261acd867124aae4d318587a497.1676840647.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7529b539899a6848e907ee914e01188c54f693ef Author: Philipp Hortmann Date: Sun Feb 19 22:16:19 2023 +0100 staging: rtl8192e: Remove entry .stop_adapter from struct rtl819x_ops Remove entry .stop_adapter and replace it with function name rtl92e_stop_adapter. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/87f874eae22027956b9f1140b8d460ed8b63a9f9.1676840647.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8fd527818fbb71b7caca2065547a5fdf96f8fc48 Author: Philipp Hortmann Date: Sun Feb 19 22:16:12 2023 +0100 staging: rtl8192e: Remove entry .rx_query_stat.. from struct rtl819x_ops Remove entry .rx_query_status_descriptor and replace it with function name rtl92e_get_rx_stats. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/889c557f6e312645eb40173b7ffa210cabf10110.1676840647.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit ec1a4fe412090c2e1574462548597e7aaa1d772f Author: Philipp Hortmann Date: Sun Feb 19 22:16:00 2023 +0100 staging: rtl8192e: Remove entry .tx_fill_cmd_d.. from struct rtl819x_ops Remove entry .tx_fill_cmd_descriptor and replace it with function name rtl92e_fill_tx_cmd_desc. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/713a48fcd6d56c3cc4e32aea0eeba881e0d092c5.1676840647.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5de8f7b149eea9905b148cc6d7b2c0087d24c58f Author: Philipp Hortmann Date: Sun Feb 19 22:15:52 2023 +0100 staging: rtl8192e: Remove entry .tx_fill_descr.. from struct rtl819x_ops Remove entry .tx_fill_descriptor and replace it with function name rtl92e_fill_tx_desc. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/1ae7d44ef74dc6cb61ff43f670b21d702403d7fb.1676840647.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit e42c99ead8308aa58b73bda044d2f9dd82756b15 Author: Philipp Hortmann Date: Sun Feb 19 22:15:46 2023 +0100 staging: rtl8192e: Remove entry .initialize_ad.. from struct rtl819x_ops Remove entry .initialize_adapter and replace it with function name rtl92e_start_adapter. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/7457e18ea9f3b2415bf41fca8ac2b22349d2edd1.1676840647.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 379fbe28a157aa6e25c36d208080653c3613ee59 Author: Philipp Hortmann Date: Sun Feb 19 22:15:40 2023 +0100 staging: rtl8192e: Remove entry .init_adapter_.. from struct rtl819x_ops Remove entry .init_adapter_variable and replace it with function name rtl92e_init_variables. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/cc6134e1cf43a8b74615f9eb4377988e3edd0bca.1676840647.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 81201b66b311f23c74fe6ce34d4a204c06f862df Author: Philipp Hortmann Date: Sun Feb 19 22:15:33 2023 +0100 staging: rtl8192e: Remove entry .get_eeprom_size from struct rtl819x_ops Remove entry .get_eeprom_size and replace it with function name rtl92e_get_eeprom_size. This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/1323e1ae2b4f52dc42b7ce5debca5608c9c5aafd.1676840647.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5e1209d025741d2b021d7938eca18f27332ba545 Author: Yang Li Date: Wed Mar 8 14:36:53 2023 +0800 staging: most: dim2: Use devm_platform_get_and_ioremap_resource() According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Link: https://lore.kernel.org/r/20230308063653.92879-1-yang.lee@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman commit dd680522f6aefeae94107bf4106b6f2da31c5025 Author: Shibo Li Date: Mon Feb 20 08:40:50 2023 +0000 staging: rtl8712: Fix multiple line dereference This patch fixes the following warning in rtl871x_mlme.c WARNING: Avoid multiple line dereference - prefer 'adapter->securitypriv.PrivacyAlgrthm' Signed-off-by: Shibo Li Tested-by: Philipp Hortmann AW-NU120 Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20230220084050.18459-1-zzutcyha@163.com Signed-off-by: Greg Kroah-Hartman commit d1c1ace35e1586025a56c39eb201b6d54a592a09 Author: Shibo Li Date: Mon Feb 20 09:04:30 2023 +0000 staging: rtl8712: Remove extra spaces This patch fixes the problem of irregular indentation Signed-off-by: Shibo Li Link: https://lore.kernel.org/r/20230220090430.19589-1-zzutcyha@163.com Signed-off-by: Greg Kroah-Hartman commit b7f5c11761691a6f330411cb0490c6d0ee16c5f0 Author: V sujith kumar Reddy Date: Wed Mar 8 14:15:09 2023 +0530 ASoC: SOF: amd: Enable cont_update_posn variable in pcm hw_params. Enable cont_update_posn variable to update host position in streambox for every dma copy. Signed-off-by: V sujith kumar Reddy Link: https://lore.kernel.org/r/20230308084509.1496256-3-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown commit df6380dca2727bca62efdf332eaadd2e225f7c4d Author: V sujith kumar Reddy Date: Wed Mar 8 14:15:08 2023 +0530 ASoC: SOF: amd: Add pcm pointer callback for amd platforms. Add pcm pointer callback for amd platforms to read host position update from stream box. Signed-off-by: V sujith kumar Reddy Link: https://lore.kernel.org/r/20230308084509.1496256-2-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown commit d0dcd0ce8437ee8b99b123e8580e918542ac488c Author: Rob Herring Date: Fri Mar 3 15:42:23 2023 -0600 dt-bindings: yamllint: Require a space after a comment '#' Enable yamllint to check the preferred commenting style of requiring a space after a comment character '#'. Fix the cases in the tree which have a warning with this enabled. Most cases just need a space after the '#'. A couple of cases with comments which were not intended to be comments are revealed. Those were in ti,sa2ul.yaml, ti,cal.yaml, and brcm,bcmgenet.yaml. Acked-by: Jakub Kicinski Acked-by: Mark Brown Reviewed-by: Dmitry Baryshkov # drm/msm Reviewed-by: Conor Dooley Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20230303214223.49451-1-robh@kernel.org Signed-off-by: Rob Herring commit 20a72af11f411bb74c14bd424f33b02e03937cf6 Author: Rob Herring Date: Tue Feb 28 15:54:33 2023 -0600 dt-bindings: Fix SPI and I2C bus node names in examples SPI and I2C bus node names are expected to be "spi" or "i2c", respectively, with nothing else, a unit-address, or a '-N' index. A pattern of 'spi0' or 'i2c0' or similar has crept in. Fix all these cases. Mostly scripted with the following commands: git grep -l '\si2c[0-9] {' Documentation/devicetree/ | xargs sed -i -e 's/i2c[0-9] {/i2c {/' git grep -l '\sspi[0-9] {' Documentation/devicetree/ | xargs sed -i -e 's/spi[0-9] {/spi {/' With this, a few errors in examples were exposed and fixed. Acked-by: Sam Ravnborg Reviewed-by: Stephen Boyd Reviewed-by: Simon Glass Acked-by: Marc Kleine-Budde # for the microchip,mcp251xfd.yaml Acked-by: Mark Brown Acked-by: Bartosz Golaszewski Acked-by: Sebastian Reichel # for power-supply Acked-by: Wolfram Sang Acked-by: Lee Jones Link: https://lore.kernel.org/r/20230228215433.3944508-1-robh@kernel.org Signed-off-by: Rob Herring commit 75f32f4b9d5263829d1d13f990000db929140559 Author: Miquel Raynal Date: Tue Mar 7 20:25:36 2023 +0100 mtd: Avoid magic values Nvmem producer config ID "-1" is actually defined, so use the definition rather than hardcoding it with a magic value. Suggested-by: Michael Walle Signed-off-by: Miquel Raynal Reviewed-by: Michael Walle Link: https://lore.kernel.org/linux-mtd/20230307192536.470997-1-miquel.raynal@bootlin.com commit 5cab06156aade17fbee2fd926bce8c503e55b2b5 Author: Miquel Raynal Date: Tue Mar 7 20:25:06 2023 +0100 mtd: Avoid printing error messages on probe deferrals There is no reason to complain about probe errors in case of deferrals. Signed-off-by: Miquel Raynal Reviewed-by: Michael Walle Link: https://lore.kernel.org/linux-mtd/20230307192506.439532-1-miquel.raynal@bootlin.com commit 1a7537a39b06ceb5ea0f161f6adc4343b686db18 Merge: 3e79e1b4addb2 281f7a6c1a33f Author: Miquel Raynal Date: Wed Mar 8 14:47:42 2023 +0100 Merge tag 'mtd/core-fixes-before-nvmem-layouts-for-6.4' into mtd/next Core MTD changes: * Prepare mtd_otp_nvmem_add() to handle -EPROBE_DEFER * Fix error path for nvmem provider * Fix nvmem error reporting * Provide unique name for nvmem device These changes are expected to be pulled before applying nvmem layouts support in order to get a fully working support in all situations. Signed-off-by: Miquel Raynal commit 3e79e1b4addb209038eea094d1a2de8ab3fc7298 Author: Nick Alcock Date: Fri Feb 24 15:08:02 2023 +0000 mtd: bcm63xxpart: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230224150811.80316-19-nick.alcock@oracle.com commit 281f7a6c1a33fffcde32001bacbb4f672140fbf9 Author: Michael Walle Date: Wed Mar 8 09:20:21 2023 +0100 mtd: core: prepare mtd_otp_nvmem_add() to handle -EPROBE_DEFER NVMEM soon will get the ability for nvmem layouts and these might not be ready when nvmem_register() is called and thus it might return -EPROBE_DEFER. Don't print the error message in this case. Signed-off-by: Michael Walle Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230308082021.870459-4-michael@walle.cc commit e0489f6e221f5ddee6cb3bd51b992b790c5fa4b9 Author: Michael Walle Date: Wed Mar 8 09:20:20 2023 +0100 mtd: core: fix error path for nvmem provider If mtd_otp_nvmem_add() fails, the partitions won't be removed because there is simply no call to del_mtd_partitions(). Unfortunately, add_mtd_partitions() will print all partitions to the kernel console. If mtd_otp_nvmem_add() returns -EPROBE_DEFER this would print the partitions multiple times to the kernel console. Instead move mtd_otp_nvmem_add() to the beginning of the function. Fixes: 4b361cfa8624 ("mtd: core: add OTP nvmem provider support") Cc: stable@vger.kernel.org Signed-off-by: Michael Walle Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230308082021.870459-3-michael@walle.cc commit 8bd1d24e6ca3c599dd455b0e1b22f77bab8290eb Author: Michael Walle Date: Wed Mar 8 09:20:19 2023 +0100 mtd: core: fix nvmem error reporting The master MTD will only have an associated device if CONFIG_MTD_PARTITIONED_MASTER is set, thus we cannot use dev_err() on mtd->dev. Instead use the parent device which is the physical flash memory. Fixes: 4b361cfa8624 ("mtd: core: add OTP nvmem provider support") Cc: stable@vger.kernel.org Signed-off-by: Michael Walle Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230308082021.870459-2-michael@walle.cc commit 1cd9ceaa5282ff10ea20a7fbadde5a476a1cc99e Author: Michael Walle Date: Wed Mar 8 09:20:18 2023 +0100 mtd: core: provide unique name for nvmem device, take two Commit c048b60d39e1 ("mtd: core: provide unique name for nvmem device") tries to give the nvmem device a unique name, but fails badly if the mtd device doesn't have a "struct device" associated with it, i.e. if CONFIG_MTD_PARTITIONED_MASTER is not set. This will result in the name "(null)-user-otp", which is not unique. It seems the best we can do is to use the compatible name together with a unique identifier added by the nvmem subsystem by using NVMEM_DEVID_AUTO. Fixes: c048b60d39e1 ("mtd: core: provide unique name for nvmem device") Cc: stable@vger.kernel.org Signed-off-by: Michael Walle Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230308082021.870459-1-michael@walle.cc commit b0ca200077b3872056e6a8291c9a50f803658c2a Author: Jeremy Sowden Date: Tue Mar 7 23:30:49 2023 +0000 netfilter: nat: fix indentation of function arguments A couple of arguments to a function call are incorrectly indented. Fix them. Signed-off-by: Jeremy Sowden Signed-off-by: Florian Westphal commit e5d015a114dad6a50c22cf282007f7d92086df46 Author: Jeremy Sowden Date: Tue Mar 7 23:30:48 2023 +0000 netfilter: conntrack: fix typo There's a spelling mistake in a comment. Fix it. Signed-off-by: Jeremy Sowden Signed-off-by: Florian Westphal commit 6bb382bcf742de5c17209848325653059c995a04 Author: Xin Long Date: Tue Mar 7 16:31:32 2023 -0500 selftests: add a selftest for big tcp This test runs on the client-router-server topo, and monitors the traffic on the RX devices of router and server while sending BIG TCP packets with netperf from client to server. Meanwhile, it changes 'tso' on the TX devs and 'gro' on the RX devs. Then it checks if any BIG TCP packets appears on the RX devs with 'ip/ip6tables -m length ! --length 0:65535' for each case. Note that we also add tc action ct in link1 ingress to cover the ipv6 jumbo packets process in nf_ct_skb_network_trim() of nf_conntrack_ovs. Signed-off-by: Xin Long Reviewed-by: Aaron Conole Reviewed-by: Nikolay Aleksandrov Signed-off-by: Florian Westphal commit eaafdaa3e92234b877b645431957549a1f87e2bf Author: Xin Long Date: Tue Mar 7 16:31:31 2023 -0500 netfilter: use nf_ip6_check_hbh_len in nf_ct_skb_network_trim For IPv6 Jumbo packets, the ipv6_hdr(skb)->payload_len is always 0, and its real payload_len ( > 65535) is saved in hbh exthdr. With 0 length for the jumbo packets, all data and exthdr will be trimmed in nf_ct_skb_network_trim(). This patch is to call nf_ip6_check_hbh_len() to get real pkt_len of the IPv6 packet, similar to br_validate_ipv6(). Signed-off-by: Xin Long Reviewed-by: Simon Horman Reviewed-by: Nikolay Aleksandrov Reviewed-by: Aaron Conole Signed-off-by: Florian Westphal commit 28e144cf5f72ce1c304571bc448e37c27495903a Author: Xin Long Date: Tue Mar 7 16:31:30 2023 -0500 netfilter: move br_nf_check_hbh_len to utils Rename br_nf_check_hbh_len() to nf_ip6_check_hbh_len() and move it to netfilter utils, so that it can be used by other modules, like ovs and tc. Signed-off-by: Xin Long Reviewed-by: Simon Horman Reviewed-by: Nikolay Aleksandrov Reviewed-by: Aaron Conole Signed-off-by: Florian Westphal commit 0b24bd71a6c0214aaa2115302dd6598b89d2fa8a Author: Xin Long Date: Tue Mar 7 16:31:29 2023 -0500 netfilter: bridge: move pskb_trim_rcsum out of br_nf_check_hbh_len br_nf_check_hbh_len() is a function to check the Hop-by-hop option header, and shouldn't do pskb_trim_rcsum() there. This patch is to pass pkt_len out to br_validate_ipv6() and do pskb_trim_rcsum() after calling br_validate_ipv6() instead. Signed-off-by: Xin Long Reviewed-by: Simon Horman Acked-by: Nikolay Aleksandrov Reviewed-by: Aaron Conole Signed-off-by: Florian Westphal commit a7f1a2f43e683c8ffca691d45f2cb32c052158fa Author: Xin Long Date: Tue Mar 7 16:31:28 2023 -0500 netfilter: bridge: check len before accessing more nh data In the while loop of br_nf_check_hbh_len(), similar to ip6_parse_tlv(), before accessing 'nh[off + 1]', it should add a check 'len < 2'; and before parsing IPV6_TLV_JUMBO, it should add a check 'optlen > len', in case of overflows. Signed-off-by: Xin Long Reviewed-by: Simon Horman Acked-by: Nikolay Aleksandrov Reviewed-by: Aaron Conole Signed-off-by: Florian Westphal commit 9ccff83b1322f95da7a74784cf6f47a481e03dc5 Author: Xin Long Date: Tue Mar 7 16:31:27 2023 -0500 netfilter: bridge: call pskb_may_pull in br_nf_check_hbh_len When checking Hop-by-hop option header, if the option data is in nonlinear area, it should do pskb_may_pull instead of discarding the skb as a bad IPv6 packet. Signed-off-by: Xin Long Reviewed-by: Simon Horman Acked-by: Nikolay Aleksandrov Reviewed-by: Aaron Conole Signed-off-by: Florian Westphal commit 10369080454d87ee5b2db211ce947cb3118f0e13 Author: Eric Dumazet Date: Tue Mar 7 14:59:59 2023 +0000 net: reclaim skb->scm_io_uring bit Commit 0091bfc81741 ("io_uring/af_unix: defer registered files gc to io_uring release") added one bit to struct sk_buff. This structure is critical for networking, and we try very hard to not add bloat on it, unless absolutely required. For instance, we can use a specific destructor as a wrapper around unix_destruct_scm(), to identify skbs that unix_gc() has to special case. Signed-off-by: Eric Dumazet Cc: Pavel Begunkov Cc: Thadeu Lima de Souza Cascardo Cc: Jens Axboe Reviewed-by: Jens Axboe Reviewed-by: Pavel Begunkov Signed-off-by: David S. Miller commit 4386b921857793440ebd4db3d6b70639149c7074 Author: Sriram Yagnaraman Date: Fri Feb 24 10:52:51 2023 +0100 netfilter: bridge: introduce broute meta statement nftables equivalent for ebtables -t broute. Implement broute meta statement to set br_netfilter_broute flag in skb to force a packet to be routed instead of being bridged. Signed-off-by: Sriram Yagnaraman Signed-off-by: Florian Westphal commit b3f4cd07dfb467a2ecaf7f5350333a45a23de551 Merge: 7d8c48917a957 e1d597ecbe5c5 Author: David S. Miller Date: Wed Mar 8 13:19:44 2023 +0000 Merge branch 'sparx5-tc-flower-templates' Steen Hegelund says: ==================== Add support for TC flower templates in Sparx5 This adds support for the TC template mechanism in the Sparx5 flower filter implementation. Templates are as such handled by the TC framework, but when a template is created (using a chain id) there are by definition no filters on this chain (an error will be returned if there are any). If the templates chain id is one that is represented by a VCAP lookup, then when the template is created, we know that it is safe to use the keys provided in the template to change the keyset configuration for the (port, lookup) combination, if this is needed to improve the match on the template. The original port keyset configuration is captured in the template state information which is kept per port, so that when the template is deleted the port keyset configuration can be restored to its previous setting. The template also provides the protocol parameter which is the basic information that is used to find out which port keyset configuration needs to be changed. The VCAPs and lookups are slightly different when it comes to which keys, keysets and protocol are supported and used for selection, so in some cases a bit of tweaking is needed to find a useful match. This is done by e.g. removing a key that prevents the best matching keyset from being selected. The debugfs output that is provided for a port allows inspection of the currently used keyset in each of the VCAPs lookups. So when a template has been created the debugfs output allows you to verify if the keyset configuration has been changed successfully. ==================== Signed-off-by: David S. Miller commit e1d597ecbe5c5d7128630d4c9ec27c42018613ed Author: Steen Hegelund Date: Tue Mar 7 14:41:03 2023 +0100 net: microchip: sparx5: Add TC template support This adds support for using the "template add" and "template destroy" functionality to change the port keyset configuration. If the VCAP lookup already contains rules, the port keyset is left unchanged, as a change would make these rules unusable. When the template is destroyed the port keyset configuration is restored. The filters using the template chain will automatically be deleted by the TC framework. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit d9f175b0dffbf70add634319a81d683be782c2e1 Author: Steen Hegelund Date: Tue Mar 7 14:41:02 2023 +0100 net: microchip: sparx5: Add port keyset changing functionality With this its is now possible for clients (like TC) to change the port keyset configuration in the Sparx5 VCAPs. This is typically done per traffic class which is guided with the L3 protocol information. Before the change the current keyset configuration is collected in a list that is handed back to the client. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 1c14432dcefaf44c2e3fa11ac61097ee342eecfe Author: Steen Hegelund Date: Tue Mar 7 14:41:01 2023 +0100 net: microchip: sparx5: Add TC template list to a port This adds a list that is used to collect the templates that are active on a port. This allows the template creation to change the port configuration and the template destruction to change it back. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit bfcb94aacc92f7025bd86a545037e5eb8db00e32 Author: Steen Hegelund Date: Tue Mar 7 14:41:00 2023 +0100 net: microchip: sparx5: Provide rule count, key removal and keyset select This provides these 3 functions in the VCAP API: - Count the number of rules in a VCAP lookup (chain) - Remove a key from a VCAP rule - Find the keyset that gives the smallest rule list from a list of keysets Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit fbd3dce9580882580b7d4779569062e371e8be48 Author: Steen Hegelund Date: Tue Mar 7 14:40:59 2023 +0100 net: microchip: sparx5: Correct the spelling of the keysets in debugfs Correct the name used in the debugfs output. Signed-off-by: Steen Hegelund Signed-off-by: David S. Miller commit 7d8c48917a9576b5fc8871aa4946149b0e4a4927 Author: Arınç ÜNAL Date: Tue Mar 7 12:56:19 2023 +0300 dt-bindings: net: dsa: mediatek,mt7530: change some descriptions to literal The line endings must be preserved on gpio-controller, io-supply, and reset-gpios properties to look proper when the YAML file is parsed. Currently it's interpreted as a single line when parsed. Change the style of the description of these properties to literal style to preserve the line endings. Signed-off-by: Arınç ÜNAL Acked-by: Rob Herring Signed-off-by: David S. Miller commit 2b6db9efa50799fa75ce609f24b355f29504bd9a Merge: 52f04f10b9005 20918ccacd06e Author: Rafael J. Wysocki Date: Wed Mar 8 14:03:56 2023 +0100 Merge branch 'thermal-core' into thermal Merge thermal control updates for 6.4-rc1: - Add a thermal zone 'devdata' accessor and modify several drivers to use it (Daniel Lezcano). - Prevent drivers from using the 'device' internal thermal zone structure field directly (Daniel Lezcano). - Clean up the hwmon thermal driver (Daniel Lezcano). - Add thermal zone id accessor and thermal zone type accessor and prevent drivers from using thermal zone fields directly (Daniel Lezcano). - Clean up the acerhdf and tegra thermal drivers (Daniel Lezcano). * thermal-core: thermal/drivers/acerhdf: Remove pointless governor test thermal/drivers/acerhdf: Make interval setting only at module load time thermal/drivers/tegra: Remove unneeded lock when setting a trip point thermal/hwmon: Use the thermal_core.h header thermal/drivers/da9062: Don't access the thermal zone device fields thermal: Use thermal_zone_device_type() accessor thermal: Add a thermal zone id accessor thermal/drivers/spear: Don't use tz->device but pdev->dev thermal/core: Add thermal_zone_device structure 'type' accessor thermal: Don't use 'device' internal thermal zone structure field thermal/hwmon: Use the right device for devm_thermal_add_hwmon_sysfs() thermal/hwmon: Do not set no_hwmon before calling thermal_add_hwmon_sysfs() thermal: Remove debug or error messages in get_temp() ops thermal/core: Show a debug message when get_temp() fails thermal/core: Use the thermal zone 'devdata' accessor in remaining drivers thermal/core: Use the thermal zone 'devdata' accessor in hwmon located drivers thermal/core: Use the thermal zone 'devdata' accessor in thermal located drivers thermal/core: Add a thermal zone 'devdata' accessor commit ecf729f93bd5a2117ef82d1e281bfc780c643e36 Author: Jiapeng Chong Date: Tue Mar 7 13:41:38 2023 +0800 emulex/benet: clean up some inconsistent indenting No functional modification involved. drivers/net/ethernet/emulex/benet/be_cmds.c:1120 be_cmd_pmac_add() warn: inconsistent indenting. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4396 Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 554eec0b4a29d0dfe59065e2cf1d2568c7b4d5f0 Author: Borislav Petkov (AMD) Date: Wed Feb 22 20:10:54 2023 +0100 x86/mce: Always inline old MCA stubs The stubs for the ancient MCA support (CONFIG_X86_ANCIENT_MCE) are normally optimized away on 64-bit builds. However, an allmodconfig one causes the compiler to add sanitizer calls gunk into them and they exist as constprop calls. Which objtool then complains about: vmlinux.o: warning: objtool: do_machine_check+0xad8: call to \ pentium_machine_check.constprop.0() leaves .noinstr.text section due to them missing noinstr. One could tag them "noinstr" but what should really happen is, they should be forcefully inlined so that all that gunk gets optimized away and the warning doesn't even have a chance to fire. Do so. No functional changes. Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230222191054.4701-1-bp@alien8.de commit c135f401265ae1b8b15c8fd607a4a113c61d79f8 Author: Andy Shevchenko Date: Tue Mar 7 20:25:56 2023 +0200 gpiolib: Get rid of gpio_bus_match() forward declaration There is nothing specific about gpio_bus_match(), so we may simply move it to the top of the file and get rid of forward declaration. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 67f64d1589ba946970aaaed35ee6335d043a4933 Author: Andy Shevchenko Date: Tue Mar 7 20:25:55 2023 +0200 gpiolib: Access device's fwnode via dev_fwnode() GPIO device's fwnode should be accessed via dev_fwnode(). Make sure that gpiochip_setup_dev() follows that. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit aea92b54ee7efac582dcad0d233f2c97d93147d8 Merge: 0d8b4049bb479 380c7ba3923c6 Author: Bartosz Golaszewski Date: Wed Mar 8 11:04:32 2023 +0100 Merge tag 'intel-gpio-v6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into gpio/for-next intel-gpio for v6.4-1 * Remove some of the legacy APIs that are not used anymore * Clean up headers in the GPIO library and drivers The following is an automated git shortlog grouped by driver: aggregator: - Add missing header(s) ARM: - s3c64xx: Use the right include - orion/gpio: Use the right include gpiolib: - Clean up headers - Group forward declarations in consumer.h - Deduplicate forward declarations in consumer.h - Drop unused forward declaration from driver.h - split of_mm_gpio_chip out of linux/of_gpio.h - split linux/gpio/driver.h out of linux/gpio.h - remove legacy gpio_export() - remove gpio_set_debounce() - remove asm-generic/gpio.h - coldfire: remove custom asm/gpio.h - remove empty asm/gpio.h files - Make the legacy consumer-only hte: - tegra-194: Use proper includes reg: - Add missing header(s) regmap: - Add missing header(s) commit 966b6b809f900b6c41f3b559fd57ec567d735dc9 Author: Gustavo A. R. Silva Date: Mon Mar 6 17:51:52 2023 -0600 net/mlx4_en: Replace fake flex-array with flexible-array member Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Transform zero-length array into flexible-array member in struct mlx4_en_rx_desc. Address the following warnings found with GCC-13 and -fstrict-flex-arrays=3 enabled: drivers/net/ethernet/mellanox/mlx4/en_rx.c:88:30: warning: array subscript i is outside array bounds of ‘struct mlx4_wqe_data_seg[0]’ [-Warray-bounds=] drivers/net/ethernet/mellanox/mlx4/en_rx.c:149:30: warning: array subscript 0 is outside array bounds of ‘struct mlx4_wqe_data_seg[0]’ [-Warray-bounds=] drivers/net/ethernet/mellanox/mlx4/en_rx.c:127:30: warning: array subscript i is outside array bounds of ‘struct mlx4_wqe_data_seg[0]’ [-Warray-bounds=] drivers/net/ethernet/mellanox/mlx4/en_rx.c:128:30: warning: array subscript i is outside array bounds of ‘struct mlx4_wqe_data_seg[0]’ [-Warray-bounds=] drivers/net/ethernet/mellanox/mlx4/en_rx.c:129:30: warning: array subscript i is outside array bounds of ‘struct mlx4_wqe_data_seg[0]’ [-Warray-bounds=] drivers/net/ethernet/mellanox/mlx4/en_rx.c:117:30: warning: array subscript i is outside array bounds of ‘struct mlx4_wqe_data_seg[0]’ [-Warray-bounds=] drivers/net/ethernet/mellanox/mlx4/en_rx.c:119:30: warning: array subscript i is outside array bounds of ‘struct mlx4_wqe_data_seg[0]’ [-Warray-bounds=] This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/264 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller commit db067ef3424e5c57ba4390e3694e5b7ea374d18a Merge: 8ca5a5790b9a1 2ab19de62d67e Author: David S. Miller Date: Wed Mar 8 09:31:31 2023 +0000 Merge branch 'r8169-disable-ASPM-during-NAPI-poll' Heiner Kallweit says: ==================== r8169: disable ASPM during NAPI poll This is a rework of ideas from Kai-Heng on how to avoid the known ASPM issues whilst still allowing for a maximum of ASPM-related power savings. As a prerequisite some locking is added first. ==================== Signed-off-by: David S. Miller commit 2ab19de62d67e403105ba860971e5ff0d511ad15 Author: Heiner Kallweit Date: Mon Mar 6 22:28:06 2023 +0100 r8169: remove ASPM restrictions now that ASPM is disabled during NAPI poll Now that ASPM is disabled during NAPI poll, we can remove all ASPM restrictions. This allows for higher power savings if the network isn't fully loaded. Reviewed-by: Simon Horman Tested-by: Kai-Heng Feng Tested-by: Holger Hoffstätte Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit e1ed3e4d91112027b90c7ee61479141b3f948e6a Author: Heiner Kallweit Date: Mon Mar 6 22:26:47 2023 +0100 r8169: disable ASPM during NAPI poll Several chip versions have problems with ASPM, what may result in rx_missed errors or tx timeouts. The root cause isn't known but experience shows that disabling ASPM during NAPI poll can avoid these problems. Suggested-by: Kai-Heng Feng Reviewed-by: Simon Horman Tested-by: Kai-Heng Feng Tested-by: Holger Hoffstätte Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 49ef7d846d4bd77b0b9f1f801fc765b004690a07 Author: Heiner Kallweit Date: Mon Mar 6 22:25:49 2023 +0100 r8169: prepare rtl_hw_aspm_clkreq_enable for usage in atomic context Bail out if the function is used with chip versions that don't support ASPM configuration. In addition remove the delay, it tuned out that it's not needed, also vendor driver r8125 doesn't have it. Suggested-by: Kai-Heng Feng Reviewed-by: Simon Horman Tested-by: Kai-Heng Feng Tested-by: Holger Hoffstätte Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 59ee97c0c1a8d0dadc092897ca7d5fe3a80e1bc3 Author: Heiner Kallweit Date: Mon Mar 6 22:24:49 2023 +0100 r8169: enable cfg9346 config register access in atomic context For disabling ASPM during NAPI poll we'll have to unlock access to the config registers in atomic context. Other code parts running with config register access unlocked are partially longer and can sleep. Add a usage counter to enable parallel execution of code parts requiring unlocked config registers. Reviewed-by: Simon Horman Tested-by: Kai-Heng Feng Tested-by: Holger Hoffstätte Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 6bc6c4e6893ee79a9862c61d1635e7da6d5a3333 Author: Heiner Kallweit Date: Mon Mar 6 22:24:00 2023 +0100 r8169: use spinlock to protect access to registers Config2 and Config5 For disabling ASPM during NAPI poll we'll have to access both registers in atomic context. Use a spinlock to protect access. Reviewed-by: Simon Horman Tested-by: Kai-Heng Feng Tested-by: Holger Hoffstätte Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 91c8643578a21e435c412ffbe902bb4b4773e262 Author: Heiner Kallweit Date: Mon Mar 6 22:23:15 2023 +0100 r8169: use spinlock to protect mac ocp register access For disabling ASPM during NAPI poll we'll have to access mac ocp registers in atomic context. This could result in races because a mac ocp read consists of a write to register OCPDR, followed by a read from the same register. Therefore add a spinlock to protect access to mac ocp registers. Reviewed-by: Simon Horman Tested-by: Kai-Heng Feng Tested-by: Holger Hoffstätte Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 8ca5a5790b9a1ce147484d2a2c4e66d2553f3d6c Author: Vadim Fedorenko Date: Mon Mar 6 08:07:38 2023 -0800 net-timestamp: extend SOF_TIMESTAMPING_OPT_ID to HW timestamps When the feature was added it was enabled for SW timestamps only but with current hardware the same out-of-order timestamps can be seen. Let's expand the area for the feature to all types of timestamps. Signed-off-by: Vadim Fedorenko Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 2549347972a8e94a9261c125e494955d873b1a9f Author: Gustavo A. R. Silva Date: Mon Mar 6 17:40:28 2023 -0600 netxen_nic: Replace fake flex-array with flexible-array member Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Transform zero-length array into flexible-array member in struct nx_cardrsp_rx_ctx_t. Address the following warnings found with GCC-13 and -fstrict-flex-arrays=3 enabled: drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c:361:26: warning: array subscript is outside array bounds of ‘char[0]’ [-Warray-bounds=] drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c:372:25: warning: array subscript is outside array bounds of ‘char[0]’ [-Warray-bounds=] This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/265 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/ZAZ57I6WdQEwWh7v@work Signed-off-by: Jakub Kicinski commit 4310e2f42030ffda0997fb87e2ebdd9711030218 Author: Heiner Kallweit Date: Mon Mar 6 23:10:57 2023 +0100 net: phy: smsc: simplify lan95xx_config_aneg_ext lan95xx_config_aneg_ext() can be simplified by using phy_set_bits(). Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/3da785c7-3ef8-b5d3-89a0-340f550be3c2@gmail.com Signed-off-by: Jakub Kicinski commit 40bbae583ec38ea31e728bf42a4ea72bded22ab6 Author: Eric Dumazet Date: Mon Mar 6 20:43:13 2023 +0000 net: remove enum skb_free_reason enum skb_drop_reason is more generic, we can adopt it instead. Provide dev_kfree_skb_irq_reason() and dev_kfree_skb_any_reason(). This means drivers can use more precise drop reasons if they want to. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Reviewed-by: Yunsheng Lin Link: https://lore.kernel.org/r/20230306204313.10492-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 8f3c307b580a4a6425896007325bddefc36e8d91 Author: Miaoqian Lin Date: Fri Jan 6 09:40:22 2023 +0400 soc: ti: pm33xx: Fix refcount leak in am33xx_pm_probe wkup_m3_ipc_get() takes refcount, which should be freed by wkup_m3_ipc_put(). Add missing refcount release in the error paths. Fixes: 5a99ae0092fe ("soc: ti: pm33xx: AM437X: Add rtc_only with ddr in self-refresh support") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20230106054022.947529-1-linmq006@gmail.com Signed-off-by: Nishanth Menon commit 5f1732a8683c1da8faaa90d6ffc3bd6d33013a58 Author: Nicolas Frayer Date: Fri Dec 30 01:14:04 2022 +0100 soc: ti: k3-ringacc: Add try_module_get() to k3_dmaring_request_dual_ring() When the k3 ring accelerator driver has been modified to add module build support, try_module_get() and module_put() have been added to update the module refcnt. One code path has not been updated and it has introduced an issue where the refcnt is decremented by module_put() in k3_ringacc_ring_free() without being incremented previously. Adding try_module_get() to k3_dmaring_request_dual_ring() ensures the refcnt is kept up to date. Fixes: c07f216a8b72 ("soc: ti: k3-ringacc: Allow the driver to be built as module") Signed-off-by: Nicolas Frayer Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20221230001404.10902-1-nfrayer@baylibre.com Signed-off-by: Nishanth Menon commit 1a0cc0520b14c345b16b4af366de4dc238da1e6c Author: Mark Brown Date: Mon Mar 6 15:33:29 2023 +0000 kselftest/alsa: Log card names during startup It can be helpful to know which card numbers apply to which cards in a multi-card system so log the card names when we start the test programs. People looking at the logs may not have direct access to the systems being tested. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230223-alsa-log-ctl-name-v1-2-ac0f10cc4db2@kernel.org Signed-off-by: Takashi Iwai commit eae872516214366274c983dd942a85c97e099dfe Author: Mark Brown Date: Mon Mar 6 15:33:28 2023 +0000 kselftest/alsa - mixer: Always log control names Currently we only log the names of controls on error but it can be useful to know what control we're testing (for example, when looking at why the tests are taking a while to run). People looking at test logs may not have direct access to the target system. This will increase the amount we write to the console, hopefully that's buffered. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230223-alsa-log-ctl-name-v1-1-ac0f10cc4db2@kernel.org Signed-off-by: Takashi Iwai commit 7c79b10bea7a9dc1b74e2dbf4a35c19455371662 Author: Mark Brown Date: Mon Mar 6 14:20:03 2023 +0000 kselftest/alsa - mixer-test: Don't fail tests if we can't restore default If a control has an invalid default value then we might fail to set it when restoring the default value after our write tests, for example due to correctly implemented range checks in put() operations. Currently this causes us to report the tests we were running as failed even when the operation we were trying to test is successful, making it look like there are problems where none really exist. Stop doing this, only reporting any issues during the actual test. We already have validation for the initial readback being in spec and for writing the default value back so failed tests will be reported for these controls, and we log an error on the operation that failed when we write so there will be a diagnostic warning the user that there is a problem. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230224-alsa-mixer-test-restore-invalid-v1-1-454f0f1f2c4b@kernel.org Signed-off-by: Takashi Iwai commit 45581e663703b7d36da1bc884950f199976bc8b3 Author: Bjorn Helgaas Date: Tue Mar 7 14:16:25 2023 -0600 bus: mhi: host: pci_generic: Drop redundant pci_enable_pcie_error_reporting() pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since commit ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself. Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path. Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver. Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20230307201625.879567-1-helgaas@kernel.org Signed-off-by: Manivannan Sadhasivam commit ce173474cf19fe7fbe8f0fc74e3c81ec9c3d9807 Author: Qinglin Pan Date: Thu Feb 9 21:16:47 2023 +0800 riscv: mm: support Svnapot in huge vmap As HAVE_ARCH_HUGE_VMAP and HAVE_ARCH_HUGE_VMALLOC is supported, we can implement arch_vmap_pte_range_map_size and arch_vmap_pte_supported_shift for Svnapot to support huge vmap about napot size. It can be tested by huge vmap used in pci driver. Huge vmalloc with svnapot can be tested by test_vmalloc with [1] applied, and probe this module to run fix_size_alloc_test with use_huge true. [1]https://lore.kernel.org/all/20221212055657.698420-1-panqinglin2020@iscas.ac.cn/ Signed-off-by: Qinglin Pan Reviewed-by: Andrew Jones Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20230209131647.17245-4-panqinglin00@gmail.com Signed-off-by: Palmer Dabbelt commit 82a1a1f3bfb628c4a44652349b94c66c7e8be7c9 Author: Qinglin Pan Date: Thu Feb 9 21:16:46 2023 +0800 riscv: mm: support Svnapot in hugetlb page Svnapot can be used to support 64KB hugetlb page, so it can become a new option when using hugetlbfs. Add a basic implementation of hugetlb page, and support 64KB as a size in it by using Svnapot. For test, boot kernel with command line contains "default_hugepagesz=64K hugepagesz=64K hugepages=20" and run a simple test like this: tools/testing/selftests/vm/map_hugetlb 1 16 And it should be passed. Signed-off-by: Qinglin Pan Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230209131647.17245-3-panqinglin00@gmail.com Signed-off-by: Palmer Dabbelt commit 23ad288aaf153a78b042e10062be1a6284909f95 Author: Qinglin Pan Date: Thu Feb 9 21:16:45 2023 +0800 riscv: mm: modify pte format for Svnapot Add one alternative to enable/disable svnapot support, enable this static key when "svnapot" is in the "riscv,isa" field of fdt and SVNAPOT compile option is set. It will influence the behavior of has_svnapot. All code dependent on svnapot should make sure that has_svnapot return true firstly. Modify PTE definition for Svnapot, and creates some functions in pgtable.h to mark a PTE as napot and check if it is a Svnapot PTE. Until now, only 64KB napot size is supported in spec, so some macros has only 64KB version. Signed-off-by: Qinglin Pan Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20230209131647.17245-2-panqinglin00@gmail.com Signed-off-by: Palmer Dabbelt commit 0194b64578e905dc8f112e641a71c306bd58ddde Author: Heiner Kallweit Date: Mon Mar 6 22:51:35 2023 +0100 net: phy: improve phy_read_poll_timeout cond sometimes is (val & MASK) what may result in a false positive if val is a negative errno. We shouldn't evaluate cond if val < 0. This has no functional impact here, but it's not nice. Therefore switch order of the checks. Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/6d8274ac-4344-23b4-d9a3-cad4c39517d4@gmail.com Signed-off-by: Jakub Kicinski commit ab82b4f1bca42a293444b41773252913f5f80e5a Author: Krzysztof Kozlowski Date: Sat Feb 25 17:02:51 2023 +0100 dt-bindings: display/bridge: toshiba,tc358764: convert to dtschema Convert the Toshiba TC358764 bridge bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230225160252.18737-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 844f5ed5f57af38e890b5237fc866d3088dea764 Author: Krzysztof Kozlowski Date: Tue Feb 21 18:09:55 2023 +0100 dt-bindings: display: bridge: parade,ps8622: convert to dtschema Convert the Parade PS8622/PS8625 DisplayPort to LVDS Converter bindings to DT schema. Changes during conversion: add missing vdd12-supply, used by Linux driver. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230221170955.62448-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 36b3ff496eb9db76c07868436d60c8b555779f79 Author: Konrad Dybcio Date: Fri Feb 24 14:07:57 2023 +0100 dt-bindings: arm: Add Cortex-A78C and X1C Add compatibles for the Cortex-A78C and X1C cores found in some recent flagship designs. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230224130759.45579-1-konrad.dybcio@linaro.org Signed-off-by: Rob Herring commit 9368eea6e7bbea3eb33678fcc137cc0869690242 Author: Nava kishore Manne Date: Mon Feb 27 16:32:13 2023 +0530 dt-bindings: fpga: xilinx-spi: convert bindings to json-schema Convert xilinx-spi bindings to DT schema format using json-schema. Signed-off-by: Nava kishore Manne Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230227110213.291225-1-nava.kishore.manne@amd.com Signed-off-by: Rob Herring commit d1d51a62d060d02f99ee407959e24ad10a40e053 Merge: 3ecde2182adbb 720d93b60aec2 Author: Andrii Nakryiko Date: Tue Mar 7 15:31:13 2023 -0800 Merge branch 'libbpf: usdt arm arg parsing support' Puranjay Mohan says: ==================== This series add the support of the ARM architecture to libbpf USDT. This involves implementing the parse_usdt_arg() function for ARM. It was seen that the last part of parse_usdt_arg() is repeated for all architectures, so, the first patch in this series refactors these functions and moved the post processing to parse_usdt_spec() Changes in V2[1] to V3: - Use a tabular approach to find register offsets. - Add the patch for refactoring parse_usdt_arg() ==================== Signed-off-by: Andrii Nakryiko commit 720d93b60aec22abcb2a5b6d8de472f3a50694b1 Author: Puranjay Mohan Date: Tue Mar 7 12:04:40 2023 +0000 libbpf: USDT arm arg parsing support Parsing of USDT arguments is architecture-specific; on arm it is relatively easy since registers used are r[0-10], fp, ip, sp, lr, pc. Format is slightly different compared to aarch64; forms are - "size @ [ reg, #offset ]" for dereferences, for example "-8 @ [ sp, #76 ]" ; " -4 @ [ sp ]" - "size @ reg" for register values; for example "-4@r0" - "size @ #value" for raw values; for example "-8@#1" Add support for parsing USDT arguments for ARM architecture. To test the above changes QEMU's virt[1] board with cortex-a15 CPU was used. libbpf-bootstrap's usdt example[2] was modified to attach to a test program with DTRACE_PROBE1/2/3/4... probes to test different combinations. [1] https://www.qemu.org/docs/master/system/arm/virt.html [2] https://github.com/libbpf/libbpf-bootstrap/blob/master/examples/c/usdt.bpf.c Signed-off-by: Puranjay Mohan Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230307120440.25941-3-puranjay12@gmail.com commit 98e678e9bc5859dec605794730ad37d26789bd30 Author: Puranjay Mohan Date: Tue Mar 7 12:04:39 2023 +0000 libbpf: Refactor parse_usdt_arg() to re-use code The parse_usdt_arg() function is defined differently for each architecture but the last part of the function is repeated verbatim for each architecture. Refactor parse_usdt_arg() to fill the arg_sz and then do the repeated post-processing in parse_usdt_spec(). Signed-off-by: Puranjay Mohan Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230307120440.25941-2-puranjay12@gmail.com commit f94c11ade1461b9cbae1e8d2e03efa7d4dc178f0 Author: Maya Matuszczyk Date: Mon Feb 13 16:38:16 2023 +0100 arm64: dts: rockchip: Add display support to Odroid Go Super Note that orientation property in ST7701 driver is currently missing, And that ST7701 panel driver uses different regulator names compared to driver for Elida KD35T133 driver. Signed-off-by: Maya Matuszczyk Link: https://lore.kernel.org/r/20230213153816.213526-5-maccraft123mc@gmail.com Signed-off-by: Heiko Stuebner commit 3ecde2182adbb12b52b777d8fb4a599b43faf4f1 Author: Daniel Müller Date: Tue Mar 7 21:55:04 2023 +0000 libbpf: Fix theoretical u32 underflow in find_cd() function Coverity reported a potential underflow of the offset variable used in the find_cd() function. Switch to using a signed 64 bit integer for the representation of offset to make sure we can never underflow. Fixes: 1eebcb60633f ("libbpf: Implement basic zip archive parsing support") Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230307215504.837321-1-deso@posteo.net commit 22de25f83c6b9b2df45fa346b632dcb9b6f1acda Author: Konrad Dybcio Date: Thu Jan 19 17:32:00 2023 +0100 gpu/drm/panel: Add Sony TD4353 JDI panel driver Add support for the Sony TD4353 JDI 2160x1080 display panel used in some Sony Xperia XZ2 and XZ2 Compact smartphones. Due to the specifics of smartphone manufacturing, it is impossible to retrieve a better name for this panel. This revision adds support for the default 60 Hz configuration, however there could possibly be some room for expansion, as the display panels used on Sony devices have historically been capable of >2x refresh rate overclocking. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Reviewed-by: Marijn Suijten Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20230119163201.580858-2-konrad.dybcio@linaro.org commit c8f0df67af94b2f820b024080ae60149a957e114 Author: Konrad Dybcio Date: Thu Jan 19 17:31:59 2023 +0100 dt-bindings: display/panel: Add Sony Tama TD4353 JDI display panel Add bindings for the display panel used on some Sony Xperia XZ2 and XZ2 Compact smartphones. Signed-off-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20230119163201.580858-1-konrad.dybcio@linaro.org commit 7795c8d3c7f151ca2860a7b1b22f4d4ec35fdac3 Author: Nava kishore Manne Date: Fri Feb 24 16:48:25 2023 +0530 dt-bindings: fpga: xilinx-pr-decoupler: convert bindings to json-schema Convert xilinx-pr-decoupler bindings to DT schema format using json-schema Signed-off-by: Nava kishore Manne Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230224111825.161593-1-nava.kishore.manne@amd.com Signed-off-by: Rob Herring commit cd3ad6619517cda3a055d864a85cebbd434dba9a Author: Borislav Petkov (AMD) Date: Mon Feb 6 08:18:32 2023 -0600 tools/x86/kcpuid: Dump the CPUID function in detailed view Sometimes it is useful to know which CPUID leaf contains the fields so add it to -d output so that it looks like this: CPUID_0x8000001e_ECX[0x0]: extended_apic_id : 0x8 - Extended APIC ID core_id : 0x4 - Identifies the logical core ID threads_per_core : 0x1 - The number of threads per core is threads_per_core + 1 node_id : 0x0 - Node ID nodes_per_processor : 0x0 - Nodes per processor { 0: 1 node, else reserved } CPUID_0x8000001f_ECX[0x0]: sme - Secure Memory Encryption ... Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Terry Bowman Reviewed-by: Feng Tang Link: https://lore.kernel.org/r/20230206141832.4162264-4-terry.bowman@amd.com commit ce22e4346ff5c2f2ce6b6a43b16d336c5c6df245 Author: Terry Bowman Date: Mon Feb 6 08:18:31 2023 -0600 tools/x86/kcpuid: Update AMD leaf Fn80000001 Add missing features to sub-leafs EAX, ECX, and EDX of 'Extended Processor Signature and Feature Bits' leaf Fn80000001. Signed-off-by: Terry Bowman Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Feng Tang Link: https://lore.kernel.org/r/20230206141832.4162264-3-terry.bowman@amd.com commit 4e347bdf44c1fd4296a7b9657a2c0e1bd900fa50 Author: Terry Bowman Date: Mon Feb 6 08:18:30 2023 -0600 tools/x86/kcpuid: Fix avx512bw and avx512lvl fields in Fn00000007 Leaf Fn00000007 contains avx512bw at bit 26 and avx512vl at bit 28. This is incorrect per the SDM. Correct avx512bw to be bit 30 and avx512lvl to be bit 31. Fixes: c6b2f240bf8d ("tools/x86: Add a kcpuid tool to show raw CPU features") Signed-off-by: Terry Bowman Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Feng Tang Link: https://lore.kernel.org/r/20230206141832.4162264-2-terry.bowman@amd.com commit 6cc1b2fd736dbc4c846078459c3c00a0372247da Author: Sasha Neftin Date: Sun Nov 20 10:15:11 2022 +0200 igc: Clean up and optimize watchdog task i225/i226 parts used only one media type copper. The copper media type is not replaceable. Clean up the code accordingly, and remove the obsolete media replacement and reset options. Signed-off-by: Sasha Neftin Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit 92a0dcb8427dc52eb0ec806206e2bdb23cc13840 Author: Tan Tee Min Date: Thu Feb 16 09:16:24 2023 +0800 igc: offload queue max SDU from tc-taprio Add support for configuring the max SDU for each Tx queue. If not specified, keep the default. Signed-off-by: Tan Tee Min Signed-off-by: Muhammad Husaini Zulkifli Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit ae4fe46983007bc46d87dcb284a5e5851c3e1c84 Author: Muhammad Husaini Zulkifli Date: Thu Feb 16 10:07:31 2023 +0800 igc: Add qbv_config_change_errors counter Add ConfigChangeError(qbv_config_change_errors) when user try to set the AdminBaseTime to past value while the current GCL is still running. The ConfigChangeError counter should not be increased when a gate control list is scheduled into the future. User can use "ethtool -S | grep qbv_config_change_errors" command to check the counter values. Signed-off-by: Muhammad Husaini Zulkifli Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit 5a2854e577dc2b4538711afb9d788a6fb835b640 Author: Maya Matuszczyk Date: Mon Feb 13 16:38:15 2023 +0100 drm: panel: Add orientation support for st7701 Note that this patch is 'heavily inspired' by orientation support in driver for Elida KD35T133 panel Signed-off-by: Maya Matuszczyk Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20230213153816.213526-4-maccraft123mc@gmail.com commit e89838968ee4446073faa718e9303bd6341ee0d1 Author: Maya Matuszczyk Date: Mon Feb 13 16:38:14 2023 +0100 drm: panel: Add Elida KD50T048A to Sitronix ST7701 driver Add KD50T048A MIPI-DSI panel, which is based on ST7701 chip. Not sure what else to add to this commit message. Signed-off-by: Maya Matuszczyk Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20230213153816.213526-3-maccraft123mc@gmail.com commit da1185449c669076276027c600666286124eef9f Author: Johannes Berg Date: Sun Mar 5 14:16:35 2023 +0200 wifi: iwlwifi: mvm: fix EOF bit reporting In monitor mode, we try to report the EOF bit on the first MPDU of an A-MPDU (hardware duplicates this bit over all MPDUs, so it's only trustable on the first). However, due to reshuffling in an ealier commit, the toggle_bit != mvm->ampdu_toggle logic can no longer work since mvm->ampdu_toggle is now set before this code runs. Fix this by tracking the first_subframe status in the phy data struct and using that instead of checking. Fixes: f1490546bec9 ("wifi: iwlwifi: mvm: rxmq: refactor mac80211 rx_status setting") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.e273aa0d3fdc.I77db4cc247898eae8a98b80659386d6737052b95@changeid Signed-off-by: Johannes Berg commit e67db9d2fd33e1118b518deab45dd6cdcf3c62a5 Author: Gustavo Sousa Date: Tue Mar 7 00:22:38 2023 -0300 drm/i915/xelp: Implement Wa_1606376872 Wa_1606376872 applies to all Xe_LP IPs except DG1. Signed-off-by: Gustavo Sousa Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230307032238.300674-1-gustavo.sousa@intel.com commit 441e129cbf81fa7365963141040814cee8ed94d6 Author: Maya Matuszczyk Date: Mon Feb 13 16:38:13 2023 +0100 dt-bindings: display: panel: sitronix,st7701: Add Elida KD50T048A Panel Add compatible for 854x480 Elida KD50T048A panel, found in Odroid Go Super and Odroid Go Ultra Signed-off-by: Maya Matuszczyk Acked-by: Krzysztof Kozlowski Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20230213153816.213526-2-maccraft123mc@gmail.com commit 477ed3ade6a46e445b4e2348b710c51df4f6f4b1 Author: Manoj Sai Date: Thu Feb 23 19:29:29 2023 +0530 arm64: dts: rockchip: Enable USB OTG for rk3566 Radxa CM3 Enable USB OTG support for Radxa Compute Module 3 IO Board Signed-off-by: Manoj Sai Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20230223135929.630787-1-abbaraju.manojsai@amarulasolutions.com Signed-off-by: Heiko Stuebner commit dbe406d1397ffccd4a0f85daef456291f265505a Author: Lucas Tanure Date: Tue Feb 28 10:36:10 2023 +0000 arm64: dts: rockchip: Add sdmmc node to rk3588 Add SD Card node for RK3588s and RK3588. Co-developed-by: Shawn Lin Signed-off-by: Shawn Lin Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20230228103610.25108-1-lucas.tanure@collabora.com Signed-off-by: Heiko Stuebner commit 4080d536241652af43996d9ceee2b79aeca57267 Author: Lukas Bulwahn Date: Tue Mar 7 08:40:38 2023 +0100 mtd: parsers: remove reference to config MTD_NAND_TMIO Commit 568494db6809 ("mtd: remove tmio_nand driver") removes the config MTD_NAND_TMIO and its corresponding driver. Remove the reference in MTD_SHARPSL_PARTS to that removed config. Signed-off-by: Lukas Bulwahn Acked-by: Arnd Bergmann Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230307074038.17391-1-lukas.bulwahn@gmail.com commit 920da947af28638bc94bb0012ce8600ba2d06c0e Author: Alex Deucher Date: Tue Mar 7 08:59:13 2023 -0500 drm/amdgpu: fix error checking in amdgpu_read_mm_registers for nv Properly skip non-existent registers as well. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2442 Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ba137e64191f313eb0e91eeb9a1a2db1b1d5234f Author: Alex Deucher Date: Mon Mar 6 10:35:34 2023 -0500 drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc21 Properly skip non-existent registers as well. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2442 Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit f651a7b64cec907bd645dd7ce1739fbbe257bceb Author: Alex Deucher Date: Mon Mar 6 10:34:20 2023 -0500 drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc15 Properly skip non-existent registers as well. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2442 Reviewed-by: Hawking Zhang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit b79f85b7aa5a9ff9f702f40c6a5fe4a53e965cf6 Author: Tom Rix Date: Sun Mar 5 07:52:26 2023 -0500 drm/amd/display: change several dcn30 variables storage-class-specifier to static smatch reports these similar problems in dcn30 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dwb.c:223:25: warning: symbol 'dcn30_dwbc_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_mmhubbub.c:214:28: warning: symbol 'dcn30_mmhubbub_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_mpc.c:1402:24: warning: symbol 'dcn30_mpc_funcs' was not declared. Should it be static? All of these are only used in their definition file, so they should be static Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit 5fd1bea5c23bb921720b6c48ceba5d6415f2ed02 Author: Tom Rix Date: Sat Mar 4 11:22:13 2023 -0500 drm/amd/display: change several dcn20 variables storage-class-specifier to static smatch reports these similar problems in dcn20 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dsc.c:53:24: warning: symbol 'dcn20_dsc_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dwb.c:304:25: warning: symbol 'dcn20_dwbc_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_mmhubbub.c:300:28: warning: symbol 'dcn20_mmhubbub_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_mpc.c:545:24: warning: symbol 'dcn20_mpc_funcs' was not declared. Should it be static? All of these are only used in their definition file, so they should be static Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit 20ce5ed69bfee125b223bb0c6a731128caf07b09 Author: Tom Rix Date: Sat Mar 4 10:26:40 2023 -0500 drm/amd/display: change several dcn201 variables storage-class-specifier to static smatch reports these similar problems in dcn201 drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c:165:22: warning: symbol 'dcn201_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_resource.c:77:30: warning: symbol 'dcn201_ip' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_resource.c:139:37: warning: symbol 'dcn201_soc' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_mpc.c:79:24: warning: symbol 'dcn201_mpc_funcs' was not declared. Should it be static? All of these are only used in their definition file, so they should be static Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit 511a95552ec878fc59a294652ebbf73a0e8e0c76 Author: Lijo Lazar Date: Thu Mar 2 17:06:39 2023 -0500 drm/amd/pm: Add SMU 13.0.6 support Add initial SMU 13.0.6 implementation. v1: Initial implementation to support SMU 13.0.6. v2: Add driver interface version check. v3: rebase (Alex) v4: Enable i2c for avoid warning (Alex) v5: sqaush in cleanups up through (Alex) "drm/amd/pm: Ignore EIO error on SMUv13.0.6" Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit a2c5dd9ec6409821505e0409814cbbf741ca61d9 Author: lyndonli Date: Fri Mar 3 14:55:05 2023 +0800 drm/amdgpu: Fix the warning info when removing amdgpu device Actually, the drm_dev_enter in psp_cmd_submit_buf does not protect anything. If DRM device is unplugged, it will always check the condition in WARN_ON. So drop drm_dev_enter and drm_dev_exit in psp_cmd_submit_buf. When removing amdgpu, the calling order is as follows: amdgpu_pci_remove drm_dev_unplug amdgpu_driver_unload_kms amdgpu_device_fini_hw amdgpu_device_ip_fini_early psp_hw_fini psp_ras_terminate psp_ta_unloadye psp_cmd_submit_buf [ 4507.740388] Call Trace: [ 4507.740389] [ 4507.740391] psp_ta_unload+0x44/0x70 [amdgpu] [ 4507.740485] psp_ras_terminate+0x4d/0x70 [amdgpu] [ 4507.740575] psp_hw_fini+0x28/0xa0 [amdgpu] [ 4507.740662] amdgpu_device_fini_hw+0x328/0x442 [amdgpu] [ 4507.740791] amdgpu_driver_unload_kms+0x51/0x60 [amdgpu] [ 4507.740875] amdgpu_pci_remove+0x5a/0x140 [amdgpu] [ 4507.740962] ? _raw_spin_unlock_irqrestore+0x27/0x43 [ 4507.740965] ? __pm_runtime_resume+0x60/0x90 [ 4507.740968] pci_device_remove+0x39/0xb0 [ 4507.740971] device_remove+0x46/0x70 [ 4507.740972] device_release_driver_internal+0xd1/0x160 [ 4507.740974] driver_detach+0x4a/0x90 [ 4507.740975] bus_remove_driver+0x6c/0xf0 [ 4507.740976] driver_unregister+0x31/0x50 [ 4507.740977] pci_unregister_driver+0x40/0x90 [ 4507.740978] amdgpu_exit+0x15/0x120 [amdgpu] v2: fix commit message style issue Signed-off-by: lyndonli Reviewed-by: Guchun Chen Acked-by: Christian König Signed-off-by: Alex Deucher commit 13e3a038abe033b38db6313de7a9f55ac83ae422 Author: Felix Kuehling Date: Tue Feb 28 21:28:59 2023 -0500 drm/amdgpu: Optimize end of non-contig VA ranges Treat the last page in a non-contiguous range as part of the following contiguous range. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Reviewed-and-tested-by: Rajneesh Bhardwaj Reviewed-by: Christian König Signed-off-by: Alex Deucher commit bd1b5799545ed838651c618c9fbf8fb8b5feeceb Author: Lijo Lazar Date: Thu Mar 2 17:00:34 2023 -0500 drm/amd/pm: Add PMFW headers for SMU 13.0.6 Initial version of PMFW interface and message headers for SMU 13.0.6 support. v2: squash in location fixes (Alex) v3: squash in updates (Alex) Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 3e22193d8cdc0576cd2803da3cac9f4fc9222273 Author: Hawking Zhang Date: Sun Apr 24 14:34:17 2022 +0800 drm/amdgpu: add mp v13_0_6 ip headers Add mp v13_0_6 register offset and shift masks header files v2: update headers (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit d37a3929ca0363ed1dce02b2772cd5bc547ca66d Author: Orlando Chamberlain Date: Fri Mar 3 22:34:25 2023 +1100 drm/amdgpu: register a vga_switcheroo client for MacBooks with apple-gmux Commit 3840c5bcc245 ("drm/amdgpu: disentangle runtime pm and vga_switcheroo") made amdgpu only register a vga_switcheroo client for GPU's with PX, however AMD GPUs in dual gpu Apple Macbooks do need to register, but don't have PX. Instead of AMD's PX, they use apple-gmux. Use apple_gmux_detect() to identify these gpus, and pci_is_thunderbolt_attached() to ensure eGPUs connected to Dual GPU Macbooks don't register with vga_switcheroo. Fixes: 3840c5bcc245 ("drm/amdgpu: disentangle runtime pm and vga_switcheroo") Link: https://lore.kernel.org/amd-gfx/20230210044826.9834-10-orlandoch.dev@gmail.com/ Signed-off-by: Orlando Chamberlain Signed-off-by: Alex Deucher commit 1fd0da91a882a2421e7702201f707c5e06bba6aa Author: Aric Cyr Date: Sun Feb 26 21:54:21 2023 -0500 drm/amd/display: 3.2.226 In this new version there are two major changes: 1) Transitioning to the new DC commit sequence There is an extended effort to migrate to the new DC commit sequence that better adheres to the DCN hardware constraints. Most of the code was upstreamed already but not connected to amdgpu_dm, and in this new DC version, our DM finally started to use it for all ASICs. This should improve stability and enable us to improve how pipe split works. 2) Drop old CONFIG_DRM_AMD_DC_DCN in favor of new CONFIG_DRM_AMD_DC_FP For historical reasons, we created CONFIG_DRM_AMD_DC_DCN to isolate FPU-related code to only be used for DCN. Over the years, we lost control over this guard, and it was spread in multiple areas. In this new DC version, there is an effort to remove all unnecessary CONFIG_DRM_AMD_DC_DCN and replace the others for CONFIG_DRM_AMD_DC_FP, which better describes which type of code this guard is intended for. Finally, this version brings along the following: - Enable HostVM based on rIOMMU active - Keep PHY active for dp confi - Improves Z8 - Update clock table - Code and directives clean up Acked-by: Qingqing Zhuo Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bb46a6a9bab134b9d15043ea8fa9d6c276e938b8 Author: Rodrigo Siqueira Date: Thu Feb 16 09:49:22 2023 -0700 drm/amd/display: Ensure that planes are in the same order The function dc_update_planes_and_stream handles multiple cases where DC needs to remove and add planes in the commit tail phase. After Linux started to use this function, some of the IGT kms_plane started to fail; one good example to illustrate why the new sequence regressed IGT is the subtest plane-position-hole which has the following diagram as a template: +--------------------+ +-----------------------+ | +-----+ | | +-----+ | | | | | | | +-----+ | | | +--+ | ==> | | | | | | | |__| | | +-|---+ | | | | | +-----+ | | | | | +--------------------+ +-----------------------+ (a) Final image (b) Composed image IGT expects image (a) as the final result of two plane compositions as described in figure (b). After the migration to the new sequence, the last plane order is changed, and DC generates the following image: +---------------------+ | +-----+ | | | | | | | | | | +-----+ | | | +---------------------+ Notice that the generated image by DC is different because the small square that should be composed on top of the primary plane is below the primary plane. For this reason, the CRC will mismatch with the expected value. Since the function dc_add_all_planes_for_stream re-append all the new planes back to the dc_validation_set, this commit ensures that the original sequence is maintained. After this change, all CI tests in all ASICs start to pass again. Reviewed-by: Harry Wentland Acked-by: Qingqing Zhuo Suggested-by: Melissa Wen Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 81f743a08f3b214638aa389e252ae5e6c3592e7c Author: Rodrigo Siqueira Date: Thu Feb 23 11:36:08 2023 -0700 drm/amd/display: Add wrapper to call planes and stream update [Why & How] This commit is part of a sequence of changes that replaces the commit sequence used in the DC with a new one. As a result of this transition, we moved some specific parts from the commit sequence and brought them to amdgpu_dm. This commit adds a wrapper inside DM that enable our drivers to do any necessary preparation or change before we offload the plane/stream update to DC. Reviewed-by: Harry Wentland Acked-by: Qingqing Zhuo Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7222f5841ff49709ca666b05ff336776e0664a20 Author: Rodrigo Siqueira Date: Tue Nov 1 10:20:09 2022 -0400 drm/amd/display: Use DC_LOG_DC in the trasform pixel function [Why & How] DC now uses a new commit sequence which is more robust since it addresses cases where we need to reorganize pipes based on planes and other parameters. As a result, this new commit sequence reset the DC state by cleaning plane states and re-creating them accordingly with the need. For this reason, the dce_transform_set_pixel_storage_depth can be invoked after a plane state is destroyed and before its re-creation. In this situation and on DCE devices, DC will hit a condition that will trigger a dmesg log that looks like this: Console: switching to colour frame buffer device 240x67 ------------[ cut here ]------------ [..] Hardware name: System manufacturer System Product Name/PRIME X370-PRO, BIOS 5603 07/28/2020 RIP: 0010:dce_transform_set_pixel_storage_depth+0x3f8/0x480 [amdgpu] [..] RSP: 0018:ffffc9000202b850 EFLAGS: 00010293 RAX: ffffffffa081d100 RBX: ffff888110790000 RCX: 000000000000000c RDX: ffff888100bedbf8 RSI: 0000000000001a50 RDI: ffff88810463c900 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000007 R10: 0000000000000001 R11: 0000000000000f00 R12: ffff88810f500010 R13: ffff888100bedbf8 R14: ffff88810f515688 R15: 0000000000000000 FS: 00007ff0159249c0(0000) GS:ffff88840e940000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ff01528e550 CR3: 0000000002a10000 CR4: 00000000003506e0 Call Trace: ? dm_write_reg_func+0x21/0x80 [amdgpu 340dadd3f7c8cf4be11cf0bdc850245e99abe0e8] dc_stream_set_dither_option+0xfb/0x130 [amdgpu 340dadd3f7c8cf4be11cf0bdc850245e99abe0e8] amdgpu_dm_crtc_configure_crc_source+0x10b/0x190 [amdgpu 340dadd3f7c8cf4be11cf0bdc850245e99abe0e8] amdgpu_dm_atomic_commit_tail+0x20a8/0x2a90 [amdgpu 340dadd3f7c8cf4be11cf0bdc850245e99abe0e8] ? free_unref_page_commit+0x98/0x170 ? free_unref_page+0xcc/0x150 commit_tail+0x94/0x120 drm_atomic_helper_commit+0x10f/0x140 drm_atomic_commit+0x94/0xc0 ? drm_plane_get_damage_clips.cold+0x1c/0x1c drm_client_modeset_commit_atomic+0x203/0x250 drm_client_modeset_commit_locked+0x56/0x150 drm_client_modeset_commit+0x21/0x40 drm_fb_helper_lastclose+0x42/0x70 amdgpu_driver_lastclose_kms+0xa/0x10 [amdgpu 340dadd3f7c8cf4be11cf0bdc850245e99abe0e8] drm_release+0xda/0x110 __fput+0x89/0x240 task_work_run+0x5c/0x90 do_exit+0x333/0xae0 do_group_exit+0x2d/0x90 __x64_sys_exit_group+0x14/0x20 do_syscall_64+0x5b/0x80 ? exit_to_user_mode_prepare+0x1e/0x140 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7ff016ceaca1 Code: Unable to access opcode bytes at RIP 0x7ff016ceac77. RSP: 002b:00007ffe7a2357e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00007ff016e15a00 RCX: 00007ff016ceaca1 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffffffffffffff78 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff016e15a00 R13: 0000000000000000 R14: 00007ff016e1aee8 R15: 00007ff016e1af00 Since this issue only happens in a transition state on DC, this commit replace BREAK_TO_DEBUGGER with DC_LOG_DC. Reviewed-by: Harry Wentland Acked-by: Qingqing Zhuo Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f7511289821ffccc07579406d6ab520aa11049f5 Author: Rodrigo Siqueira Date: Thu Oct 6 16:40:55 2022 -0400 drm/amd/display: Use dc_update_planes_and_stream [Why & How] The old dc_commit_updates_for_stream lacks manipulation for many corner cases where the DC feature requires special attention; as a result, it starts to show its limitation (e.g., the SubVP feature is not supported by it, among other cases). To modernize and unify our internal API, this commit replaces the old dc_commit_updates_for_stream with dc_update_planes_and_stream, which has more features. Reviewed-by: Harry Wentland Acked-by: Qingqing Zhuo Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b8272241ff9df5b57e2777a07c1fe8af3d9cbf93 Author: Rodrigo Siqueira Date: Thu Oct 6 14:57:31 2022 -0400 drm/amd/display: Drop dc_commit_state in favor of dc_commit_streams [Why & How] There are two functions responsible for handling the DC commit state: dc_commit_state and dc_commit_streams. Both have the same goal, but dc_commit_streams surpess dc_commit_state in terms of completeness. For this reason, maintaining these two functions makes maintainability unnecessarily complicated. This commit replaces the old dc_commit_state in favor of dc_commit_streams, and removes the old dc_commit_state. Reviewed-by: Harry Wentland Acked-by: Qingqing Zhuo Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2820433be2a33beb44b13b367e155cf221f29610 Author: Rodrigo Siqueira Date: Fri Feb 24 11:35:43 2023 -0700 drm/amd/display: Ensure vmin and vmax adjust for DCE [Why & How] In the commit 32953485c558 ("drm/amd/display: Do not update DRR while BW optimizations pending"), a modification was added to avoid adjusting DRR if optimized bandwidth is set. This change was only intended for DCN, but one part of the patch changed the code path for DCE devices and caused regressions to the kms_vrr test. To address this problem, this commit adds a modification in which dc_stream_adjust_vmin_vmax will be fully executed in DCE devices. Fixes: 32953485c558 ("drm/amd/display: Do not update DRR while BW optimizations pending") Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7da2bcda5899e92ef3442d5997154d8220245370 Author: Alvin Lee Date: Fri Feb 24 10:39:17 2023 -0500 drm/amd/display: Pass tg and hubp inst instead of pipe index for SubVP [Description] - For pipe harvesting cases, the pipe index does not necessarily match up with the OTG instance, so pass index by OTG Instance instead - For pipe split cases pass HUBP instance, since the split index is only used for HUBP programming - Also check for OPP ID when accessing opp for pipe harvesting cases Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 97fa4dfa66fdd52ad3d0c9fadeaaa1e87605bac7 Author: Gabe Teeger Date: Thu Feb 23 11:30:31 2023 -0500 drm/amd/display: Enable HostVM based on rIOMMU active [Why] There is underflow and flickering occuring. The underflow stops when hostvm is forced to active. According to policy, hostvm should be enabled if riommu is active, but this is not taken into account when deciding whether to enable hostvm. [What] For DCN314, set hostvm to true if riommu is active. Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Gabe Teeger Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b5ac70369e3669df4a0c192c40c0e70c3e56439e Author: Wayne Lin Date: Fri Feb 17 13:26:56 2023 +0800 drm/amd/display: Pass the right info to drm_dp_remove_payload [Why & How] drm_dp_remove_payload() interface was changed. Correct amdgpu dm code to pass the right parameter to the drm helper function. Reviewed-by: Jerry Zuo Acked-by: Qingqing Zhuo Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit de930140bb578ebb075772e946e20db68550bf2f Author: Alvin Lee Date: Fri Feb 24 09:45:36 2023 -0500 drm/amd/display: Update to correct min FCLK when construction BB [Description] - For min FCLK, choose the min of 300Mhz and PMFW requirement - Also only apply min DET check in DML for non-UR cases Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4652ae7a51b78d7607c247228ac2a14fa0088bbf Author: Harry Wentland Date: Tue Feb 14 14:14:49 2023 -0500 drm/amd/display: Rename DCN config to FP [Why & How] The only reason we have the DCN config is for floating point support. Rename it to make that clear and (hopefully) avoid misuse of the config in the future. Reviewed-by: Rodrigo Siqueira Acked-by: Qingqing Zhuo Signed-off-by: Harry Wentland Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c186c13e65286a46b61f5c295f9f9c65c75c926e Author: Harry Wentland Date: Mon Feb 13 17:58:22 2023 -0500 drm/amd/display: Drop unnecessary DCN guards [Why & How] DC is littered with many DCN guards that are not needed. Drop them. Reviewed-by: Rodrigo Siqueira Acked-by: Qingqing Zhuo Signed-off-by: Harry Wentland Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bf77fda02411fe2cac3522f40d8d6882d27ac14b Author: Harry Wentland Date: Mon Feb 13 17:46:45 2023 -0500 drm/amd/display: Drop unnecessary DCN guards [Why] DM is littered with DCN guards leading to frequent breakages on non-DCN builds when new code is added. [How] Remove all guards that are not needed. Reviewed-by: Rodrigo Siqueira Acked-by: Qingqing Zhuo Signed-off-by: Harry Wentland Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2b02d746c1818baf741f4eeeff9b97ab4b81e1cf Author: Agustin Gutierrez Date: Tue Feb 21 16:08:15 2023 -0500 drm/amd/display: Keep PHY active for dp config [Why] Current hotplug sequence causes temporary hang at the re-entry of the optimized power state. [How] Keep a PHY active when detecting DP signal + DPMS active Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Agustin Gutierrez Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 34fd6df7886989019d4f6996da2d2edfde5bcd34 Author: Chris Park Date: Thu Feb 23 01:07:23 2023 -0500 drm/amd/display: Simplify register offsets [Why] Runtime initialization of register addresses define duplicate register offsets in resource file, and makes register offsets in sub-block defined for compile time initialization obsolete. [How] Remove obsolete sub block register offsets that is no longer referenced. Reviewed-by: Martin Leung Acked-by: Qingqing Zhuo Signed-off-by: Chris Park Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 788c6e2ce5c74c0a22d4e44cca348c8458b3f01d Author: Wenjing Liu Date: Thu Feb 16 16:22:01 2023 -0500 drm/amd/display: replace all dc_link function call in link with link functions [why] Link components should not reply on dc_link_exports to access link function in other link components. Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 202a3816f37e49ab490ff4582f1fb34390e5824e Author: Wenjing Liu Date: Wed Feb 15 12:50:59 2023 -0500 drm/amd/display: move dc_link functions in protocols folder to dc_link_exports [why] link component should only have one interface serving dc. [how] We are moving dc_link functions exposed to DM to dc_link_exports and unify link component interface in link.h with function pointer to match the style of other dc component. This is the third step to move dc_link functions under protocols folder to dc_link_exports. Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6455cb522191dac057d5cc4b3f24d5d3ae6a33ef Author: Wenjing Liu Date: Wed Feb 15 16:03:09 2023 -0500 drm/amd/display: link link_dp_dpia_bw.o in makefile [Why & How] - We have added link_dp_dpia_bw code but it is not currently added in makefile. We are adding this to makefile so it would be built. - Remove unused dc_link.h Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 76f5dc40ebb188b081e03783541856c03e97f8e0 Author: Wenjing Liu Date: Tue Feb 14 12:16:55 2023 -0500 drm/amd/display: move dc_link functions in link root folder to dc_link_exports [why] link component should only have one interface serving dc. [how] We are moving dc_link functions exposed to DM to dc_link_exports and unify link component interface in link.h with function pointer to match the style of other dc component. This is the second step to move dc_link functions under link root folder to dc_link_exports. Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 36516001a7c9cd7901673548ec685bd180b1b548 Author: Wenjing Liu Date: Tue Feb 14 11:24:01 2023 -0500 drm/amd/display: move dc_link functions in accessories folder to dc_link_exports [why] link component should only have one interface serving dc. [how] We are moving dc_link functions exposed to DM to dc_link_exports and unify link component interface in link.h with function pointer to match the style of other dc component. This is the first step to move dc_link functions under accessories folder to dc_link_exports. Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 84c03df58d8bbf77feb2f199f10dbe8f7f72c782 Author: Harry Wentland Date: Mon Feb 13 15:29:06 2023 -0500 drm/amd/display: Build DSC without DCN config [Why & How] DSC needs DCN but we are trying reduce the usage of the DCN flag. It's easier to build the DSC code sprinkled around DC core and the DMs and just guard the place where DSC uses floating point code. Since DSC is never enabled on non-DCN ASICs this won't have any effect. Reviewed-by: Hamza Mahfooz Acked-by: Qingqing Zhuo Signed-off-by: Harry Wentland Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit efa4c4df864ecd969670093524d3e8f69188e5eb Author: Harry Wentland Date: Mon Feb 13 17:36:55 2023 -0500 drm/amd/display: call remove_stream_from_ctx from res_pool funcs [Why & How] DM should never use a non-interface function to call into DC. The original code is incorrect on ASICs that don't use DCN20's remove_stream_from_ctx function. Reviewed-by: Aurabindo Pillai Acked-by: Qingqing Zhuo Signed-off-by: Harry Wentland Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1e88eb1b2c259994d034b0833cb489105a984ebb Author: Harry Wentland Date: Mon Feb 13 11:19:31 2023 -0500 drm/amd/display: Drop CONFIG_DRM_AMD_DC_HDCP [Why & How] There is no reason we still need a config option for this. Reviewed-by: Wenjing Liu Acked-by: Qingqing Zhuo Signed-off-by: Harry Wentland Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ab487ea8910d2a84f851cb87f2cb49adcb5b774b Author: Mike Hsieh Date: Mon Feb 20 11:48:26 2023 +0800 drm/amd/display: fix typo in dc_dsc_config_options structure [WHY] There is a typo in dc_dsc_config_options structure [HOW] Fix the typo Reviewed-by: Wenjing Liu Acked-by: Qingqing Zhuo Signed-off-by: Mike Hsieh Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 11efe095dfe0768f5b248b77a84e5aa748f14204 Author: Harry Wentland Date: Mon Feb 13 15:17:29 2023 -0500 drm/amd/display: Fix no-DCN build [Why & How] This fixes a couple misplaced CONFIG_DRM_AMD_DC_DCN blocks. Reviewed-by: Sun peng Li Acked-by: Qingqing Zhuo Signed-off-by: Harry Wentland Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c0a561d96a281b91d48b77278714cf5b791a70bd Author: Harry Wentland Date: Mon Feb 13 11:35:20 2023 -0500 drm/amd/display: Drop CONFIG_DRM_AMD_DC_HDR [Why & How] Remove dead code. Reviewed-by: Sun peng Li Acked-by: Qingqing Zhuo Signed-off-by: Harry Wentland Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0215ce9057edf69aff9c1a32f4254e1ec297db31 Author: Nicholas Kazlauskas Date: Tue Feb 21 10:27:10 2023 -0500 drm/amd/display: Update minimum stutter residency for DCN314 Z8 [Why] Block periods that are too short as they have the potential to currently cause hangs in other firmware components on the system. [How] Update the threshold, mostly targeting a block of 4k and downscaling. Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0db13eae41fcc67f408dbb3dfda59633c4fa03fb Author: Nicholas Kazlauskas Date: Fri Feb 17 11:17:50 2023 -0500 drm/amd/display: Add minimum Z8 residency debug option [Why] Allows finer control and tuning for debug and profiling. [How] Add the debug option into DC. The default remains the same as before for now. Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c93aa7f33e94ee9d64277fa2a345dc30c127d798 Author: Aric Cyr Date: Sun Feb 19 20:42:43 2023 -0500 drm/amd/display: 3.2.225 This version brings along the following: - Correct way to find OPP index - Unify DC logging for BW Alloc - Add height granularity limitation for dsc slice height calculation Acked-by: Qingqing Zhuo Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 67d198da2fd493629e498629781edc5695bbf4d9 Author: Alvin Lee Date: Fri Feb 17 17:54:01 2023 -0500 drm/amd/display: When blanking during init loop to find OPP index [Description] For pipe harvesting cases we cannot rely on array index to get the correct OPP instance, we must loop through each instance to find the correct one. Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit aee0c07a74d3f79aef553e3bfc6ddf184d33d3bf Author: Mustapha Ghaddar Date: Wed Feb 15 10:05:53 2023 -0500 drm/amd/display: Unify DC logging for BW Alloc [WHY] To keep all logging within DC unified [HOW] Use the standard DC Logging functions Reviewed-by: Wenjing Liu Reviewed-by: Meenakshikumar Somasundaram Acked-by: Qingqing Zhuo Signed-off-by: Mustapha Ghaddar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit de534c1cb0313a070f45938a53b53927cd34e5b9 Author: Mike Hsieh Date: Tue Jan 10 10:52:03 2023 +0800 drm/amd/display: Add height granularity limitation for dsc slice height calculation [WHY] eDP add new limitation for Y granularity for selected update feature. DSC does not include this limitation while calculating slice height. [HOW] Add new limitation while looking for DSC slice height. Reviewed-by: Cruise Hung Acked-by: Qingqing Zhuo Signed-off-by: Mike Hsieh Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2d51f3afbea4184487132eed85ae83a13cd6b1c2 Author: Perry Yuan Date: Thu Feb 23 15:10:45 2023 +0800 drm/amdgpu: skip the invalid workload type If some invalid workload types exposed by the power profile sysfs node, it will be failed to set the unsuported profiles. So we can skip to show the invalid workload type in the profiles list to avoid that failure happen. Acked-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Perry Yuan Signed-off-by: Alex Deucher commit dc622367c56fa0b5a911be73e22584b3cc69f5c5 Author: Perry Yuan Date: Thu Feb 16 17:16:51 2023 +0800 drm/amdgpu: map new capped and uncapped mode power profiles for Vangogh Capped and Uncapped workload types are supported, each workload type has different performance thresholds and pstate conditions. * capped mode is used by power centric workload * uncapped mode is used by perf centric workload Acked-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Perry Yuan Signed-off-by: Alex Deucher commit 31865e96f9eb52ced6d5e23f9f3a5376f81c9410 Author: Perry Yuan Date: Thu Feb 16 17:18:20 2023 +0800 drm/amdgpu/pm: add capped/uncapped power profile modes Capped and uncapped workload types switching are supported on Vangogh, User can switch the power profile and check current type with below commands. 1) switch to capped mode: `# echo 8 > /sys/class/drm/card0/device/pp_power_profile_mode` 2) switch to uncapped mode: `# echo 9 > /sys/class/drm/card0/device/pp_power_profile_mode` 3) check current mode: $ cat /sys/class/drm/card0/device/pp_power_profile_mode 1 3D_FULL_SCREEN 3 VIDEO 4 VR 5 COMPUTE 6 CUSTOM 8 CAPPED 9 UNCAPPED* Acked-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Perry Yuan Signed-off-by: Alex Deucher commit c07edf915ece65ce11a765bf4f9f0a1000bb7a33 Author: Shashank Sharma Date: Mon Feb 27 15:42:28 2023 +0100 drm/amdgpu: fix return value check in kfd This patch fixes a return value check in kfd doorbell handling. This function should return 0(error) only when the ida_simple_get returns < 0(error), return > 0 is a success case. Cc: Felix Kuehling Cc: Alex Deucher Fixes: 16f0013157bf ("drm/amdkfd: Allocate doorbells only when needed") Acked-by: Christian Koenig Reviewed-by: Felix Kuehling Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit b059cba51979b3431b75e0c6f18e9f75e427537c Author: Christian König Date: Mon Jan 16 20:49:23 2023 +0100 drm/amdgpu: simplify amdgpu_uvd_send_msg We only need one offset and not an array of it. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a32d7d6b198b23b7d8f40efb9efe42779ea7b011 Author: Hawking Zhang Date: Mon Oct 3 15:40:54 2022 -0400 drm/amdgpu: add PSP ip block for PSP 13.0.6 Add PSP IP handling for PSP 13.0.6 Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 0b6c67c22d2374a98890cc8b6204302f75e14cd7 Author: Hawking Zhang Date: Mon May 30 10:58:35 2022 +0800 drm/amdgpu: initialize ta ucode for psp v13_0_6 Initialize ta ucode for psp v13_0_6 Signed-off-by: Hawking Zhang Reviewed-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit c7850370574f0594993d21dd02c54d2a853d2d6a Author: Hawking Zhang Date: Sat Aug 28 17:26:37 2021 +0800 drm/amdgpu: init sos microcode for psp v13_0_6 parse psp_v13_0_6_sos.bin and initialze various psp ucode arraies respectively Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 55f86c2b030463f8c98e66911f4548a1fc0666ee Author: Hawking Zhang Date: Sat Aug 28 14:52:32 2021 +0800 drm/amdgpu: add psp early init for PSP 13.0.6 Initialize psp ip callbacks for PSP 13.0.6. Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 051ae8d59c321da4c3bc8ba7d75dfba7734e2c6f Author: Le Ma Date: Tue Sep 7 13:36:56 2021 +0800 drm/amdgpu: set sdma v4_4_2 ip block Use sdma 4.4.2 IP block for chips with sdma 4.4.2 hardware. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7138fc88fdc1f999a547657af8623d3a2a862fc1 Author: Le Ma Date: Wed May 18 00:20:21 2022 +0800 drm/amdgpu: add sdma v4_4_2 support (v4) Add support for SDMA 4.4.2. v1: Create sdma_v4_4_2.[c|h] for initial support (Le) v2: update amdgpu_ring_init call with atomic score (Hawking) v3: Squash in sdma_start fixes (Alex) v4: Comment out currently unused RAS code (Alex) Signed-off-by: Le Ma Signed-off-by: Hawking Zhang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit fbf46565c67c626849c7ce2a326972d3008d2a91 Author: Hawking Zhang Date: Wed May 11 15:01:19 2022 +0800 drm/amdgpu: add sdma v4_4_2 ip headers Add sdma v4_4_2 register offset and shift masks header files v2: update headers (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 4688940a1e03fc2457e40aac2257fe55e97c8d3e Author: Hawking Zhang Date: Mon Oct 3 15:45:33 2022 -0400 drm/amdgpu: add HDP ip block for HDP 4.4.2 Add HDP IP handling for HDP 4.4.2 Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 2024ccc8e28309d549578190ce0ec7a986069e9f Author: Le Ma Date: Tue Aug 31 13:32:20 2021 +0800 drm/amdgpu: skip hdp invalidation for HDP 4.4.2 No mmHDP_READ_CACHE_INVALIDATE register on HDP 4.4.2. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4f17289f14da7fd255f330d0e6545251f81c711c Author: Hawking Zhang Date: Sun Apr 24 14:28:44 2022 +0800 drm/amdgpu: add hdp v4_4_2 ip headers Add hdp v4_4_2 register offset and shift masks header files v2: update headers (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 0df2032ab72a47c531ff653d32d82df5e7d52e3a Author: Hawking Zhang Date: Mon Oct 3 15:39:41 2022 -0400 drm/amdgpu: add IH ip block for IH 4.4.2 Add IH IP handling for IH 4.4.2 Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 4c93c62e77467fd5e9a9fcfd708a50b23a9951e3 Author: Le Ma Date: Tue Jul 20 17:16:46 2021 +0800 drm/amdgpu: skip ih2 rb allocation for IH 4.4.2 No ih2 hardware on IH 4.4.2. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2b396e75be74078640becb36ba8c01977bf1e0be Author: Le Ma Date: Wed Apr 28 14:50:21 2021 +0800 drm/amdgpu: set ih chicken bit for IH 4.4.2 Share same register address with IH 4.4.0. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4d2c09d68de2acec46fb471f5a358627c9dc3885 Author: Muhammad Usama Anjum Date: Fri Mar 3 17:02:32 2023 +0500 drm/amdgpu: remove dead code The less than zero comparison of unsigned variable "value" is never true. Remove dead code. Fixes: c3ed0e72c872 ("drm/amdgpu: added a sysfs interface for thermal throttling") Signed-off-by: Muhammad Usama Anjum Signed-off-by: Alex Deucher commit 7bb3956178e5eaeeab5134cf38e0f057bc2344c2 Author: Deepak R Varma Date: Sun Jan 15 15:30:38 2023 +0530 drm/amd/display: Simplify same effect if/else blocks The if / else block code has same effect irrespective of the logical evaluation. Hence, simply the implementation by removing the unnecessary conditional evaluation. While at it, also fix the long line checkpatch complaint. Issue identified using cond_no_effect.cocci Coccinelle semantic patch script. Fixes: 9114b55fabae ("drm/amd/display: Fix SubVP control flow in the MPO context") Reviewed-by: Harry Wentland Signed-off-by: Deepak R Varma Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 7cb3cfc030640bf860bf8299aa00cdffff92a40c Author: Daniel Phillips Date: Wed Mar 1 14:28:26 2023 -0800 amdkfd: Memory availability can never be negative Our assumptions about how much KFD memory is currently available for allocation may be violated by various complexities so we define the reported value as advisory, however we should never report negative availability. Signed-off-by: Daniel Phillips Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 2c5e0790a1f9a77892599242bb8bf90027e8ccae Author: Mario Limonciello Date: Wed Mar 1 09:36:06 2023 -0600 drm/amd: Fix initialization mistake for NBIO 7.3.0 The same strapping initialization issue that happened on NBIO 7.5.1 appears to be happening on NBIO 7.3.0. Apply the same fix to 7.3.0 as well. Note: This workaround relies upon the integrated GPU being enabled in BIOS. If the integrated GPU is disabled in BIOS a different workaround will be required. Reported-by: Thomas Glanzmann Cc: Basavaraj Natikar Link: https://lore.kernel.org/linux-usb/Y%2Fz9GdHjPyF2rNG3@glanzmann.de/T/#u Signed-off-by: Mario Limonciello Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f999adb7acb7d52aa8e8be0dc75f604d41e51e38 Author: lyndonli Date: Thu Mar 2 14:18:12 2023 +0800 drm/amdgpu: Fix call trace warning and hang when removing amdgpu device On GPUs with RAS enabled, below call trace and hang are observed when shutting down device. v2: use DRM device unplugged flag instead of shutdown flag as the check to prevent memory wipe in shutdown stage. [ +0.000000] RIP: 0010:amdgpu_vram_mgr_fini+0x18d/0x1c0 [amdgpu] [ +0.000001] PKRU: 55555554 [ +0.000001] Call Trace: [ +0.000001] [ +0.000002] amdgpu_ttm_fini+0x140/0x1c0 [amdgpu] [ +0.000183] amdgpu_bo_fini+0x27/0xa0 [amdgpu] [ +0.000184] gmc_v11_0_sw_fini+0x2b/0x40 [amdgpu] [ +0.000163] amdgpu_device_fini_sw+0xb6/0x510 [amdgpu] [ +0.000152] amdgpu_driver_release_kms+0x16/0x30 [amdgpu] [ +0.000090] drm_dev_release+0x28/0x50 [drm] [ +0.000016] devm_drm_dev_init_release+0x38/0x60 [drm] [ +0.000011] devm_action_release+0x15/0x20 [ +0.000003] release_nodes+0x40/0xc0 [ +0.000001] devres_release_all+0x9e/0xe0 [ +0.000001] device_unbind_cleanup+0x12/0x80 [ +0.000003] device_release_driver_internal+0xff/0x160 [ +0.000001] driver_detach+0x4a/0x90 [ +0.000001] bus_remove_driver+0x6c/0xf0 [ +0.000001] driver_unregister+0x31/0x50 [ +0.000001] pci_unregister_driver+0x40/0x90 [ +0.000003] amdgpu_exit+0x15/0x120 [amdgpu] Signed-off-by: lyndonli Reviewed-by: Guchun Chen Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 43660b4ea53abc2be04be18a147a39e1f4cb8b72 Author: bobzhou Date: Thu Mar 2 13:56:59 2023 +0800 drm/amdgpu: remove unused variable building with gcc and W=1 reports drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:7292:11: error: unused variable 'tmp' [-Werror=unused-variable] uint32_t tmp; ^~~ tmp is not used so remove it. Signed-off-by: bobzhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 9473b6b25b836573d481c5ee6be0f1bd0fca14ff Author: Xiaogang Chen Date: Wed Mar 1 10:21:06 2023 -0600 drm/amdkfd: Fix BO offset for multi-VMA page migration svm_migrate_ram_to_vram migrates a prange from sys ram to vram. The prange may cross multiple vma. Need remember current dst vram offset in the TTM resource for each migration. v2: squash in warning fix (Alex) Signed-off-by: Xiaogang Chen Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 6e9213287ce4d75765d2806986d4e3c7e4991b3b Author: Tejas Upadhyay Date: Tue Mar 7 15:16:43 2023 +0530 drm/i915/selftest: Remove avoidable init assignment We can skip the assignment and i915 variable altogether and use refernce directly. Also used at single place only. Signed-off-by: Tejas Upadhyay Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230307094643.532271-1-tejas.upadhyay@intel.com commit b55c1f4ec535f87a4063a8cbb75b014cdfc41bcb Author: Ilan Peer Date: Sun Mar 5 14:16:34 2023 +0200 wifi: iwlwifi: Do not include radiotap EHT user info if not needed Do not include user information in radtiotap EHT data for EHT sounding NDP as the frame doesn't include the user specific field. Instead, encode the NSS and the beamforming information in the EHT data. Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.ac6474ded9bd.I9655589e9afbacc16820f35f6f5d90c6a91b8b05@changeid Signed-off-by: Johannes Berg commit 7696c07bfbded95ce22aa41b6411534d0d06990d Author: Mordechay Goodstein Date: Sun Mar 5 14:16:33 2023 +0200 wifi: iwlwifi: mvm: add EHT RU allocation to radiotap FW new API added the info missing for update RU allocation, so use the new API to update radiotap information. Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.b16acaa4bad1.I53afa03058dbd2cd8afbaf5e82596c8ed501a476@changeid Signed-off-by: Johannes Berg commit 558f874ea049af3c0e2c25b4de2b7fcf3f40e43b Author: Mukesh Sisodiya Date: Sun Mar 5 14:16:32 2023 +0200 wifi: iwlwifi: Update logs for yoyo reset sw changes Update the log category for the reset-fw changes. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.852a6b5f95fa.Ie67bd28da65c7e42424cacb37495930475de2dad@changeid Signed-off-by: Johannes Berg commit 774302d2d3ad916f415d651362550daf22f630b7 Author: Mordechay Goodstein Date: Sun Mar 5 14:16:31 2023 +0200 wifi: iwlwifi: mvm: clean up duplicated defines VHT, HE and EHT rates use the same bits for NSS, so no need for defines per PHY version. Also use spatch to replace bit manipulation with FIELD_GET: @@ identifier rate; @@ -((rate & RATE_MCS_NSS_MSK) >> RATE_MCS_NSS_POS) +FIELD_GET(RATE_MCS_NSS_MSK, rate) Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.167ed9477aa8.Ibd8e71d31896e8d8f067ce4e3a6e9a0e86c78f3f@changeid Signed-off-by: Johannes Berg commit beddcdc489864e234af844d906547b1cb70e9036 Author: Mordechay Goodstein Date: Sun Mar 5 14:16:30 2023 +0200 wifi: iwlwifi: rs-fw: break out for unsupported bandwidth Currently the for loop runs also over unsupported bandwidth in the command, shorten the path in case we don't support it. Also use the right macro for setting BW20. Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.0264ba9df63b.I6c7c9efc806e0ffb7cb3b6051b2d109646e8708c@changeid Signed-off-by: Johannes Berg commit b96e516ccf9f5a227756989d4e47297f65e12e60 Author: Golan Ben Ami Date: Sun Mar 5 14:16:29 2023 +0200 wifi: iwlwifi: Add support for B step of BnJ-Fm4 Support new HW step of BnJ-Fm4 device Signed-off-by: Golan Ben Ami Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.bb0591c59898.If04d7a45707ba008981f8c8ea7f7f107880f146c@changeid Signed-off-by: Johannes Berg commit f7bd883b3fca50f8429a67b4bfdf82a22e8dac53 Author: Johannes Berg Date: Sun Mar 5 14:16:28 2023 +0200 wifi: iwlwifi: mvm: make flush code a bit clearer The mask building here is only relevant for the old TX API, so move it into the else branch. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.c0795543f254.I302124a8584dd049577b0c2c74ecd7c48ddf4f3e@changeid Signed-off-by: Johannes Berg commit b85f7ebb24974e016520b5ea39394ab4cb08af0c Author: Johannes Berg Date: Sun Mar 5 14:16:27 2023 +0200 wifi: iwlwifi: mvm: avoid UB shift of snif_queue For the old TX API we need the tfd_queue_msk, but for the new TX API we don't need it here because we add it to the station later. However, for the new API mvm->snif_queue is set to IWL_MVM_INVALID_QUEUE == 0xffff, so the BIT() here is undefined behaviour. Since we don't need the tfd_queue_msk value for the new TX API at all, simply fill it in only for the old API. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.b8da0b7eb194.I53744fd7cfb6e146a9393272a2a61852841238d9@changeid Signed-off-by: Johannes Berg commit 5abf31544a4d2bcb3a0dd2fd080f9448d4026975 Author: Mordechay Goodstein Date: Sun Mar 5 14:16:26 2023 +0200 wifi: iwlwifi: mvm: add primary 80 known for EHT radiotap Calculate the position of the control channel in the wide channel based on the chandef, this is used to obtain the value of N in 802.11be D1.5 Table 9-53a in the column PHY MU/MRU index. To avoid the need to calculate every frame the value, do it once monitor vif is added. Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.fe9a5b58e241.I291ee480252d098f62d9ec39040284d3e521d88e@changeid Signed-off-by: Johannes Berg commit feb4a0e215fa98f72c37b51344d3c013bb43e013 Author: Mordechay Goodstein Date: Sun Mar 5 14:16:25 2023 +0200 wifi: iwlwifi: mvm: parse FW frame metadata for EHT sniffer mode In EHT sniffer mode DW4 is all used for sniffer data (unlike we have in HE mode), so move the full DW4 into a union, and we extract the new data5 used for parsing USIG info and set all to radiotap TLVs with the extracted data. Also parse OFDM_RX_VECTOR_USIG_A1_OUT and OFDM_RX_VECTOR_USIG_A2_OUT for rx_no_data notification. Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.557d3870753b.I4e9fa4d21900a187753529d46956ba2a7ee75fda@changeid Signed-off-by: Johannes Berg commit e8c0a6fd08d7dc6c178e77f154794cdd55575780 Author: Mordechay Goodstein Date: Sun Mar 5 14:16:24 2023 +0200 wifi: iwlwifi: mvm: decode USIG_B1_B7 RU to nl80211 RU width This is based on 802.11be D1.5 table 9-53a Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.0b720d6d6a48.I0034dd108696223494799d3ffe4f09685800b831@changeid Signed-off-by: Johannes Berg commit c0da321b601a92453f928c819dbd65c5712480d3 Author: Mordechay Goodstein Date: Sun Mar 5 14:16:23 2023 +0200 wifi: iwlwifi: mvm: rename define to generic name The type RX_NO_DATA_INFO_TYPE_HE_TB_UNMATCHED is applied to all TB frames including EHT mode, so rename accordingly. Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.e4f51f347e48.I2d6ecb6eadc95666d2ef9794662ee779488ceac1@changeid Signed-off-by: Johannes Berg commit 3ecf34118dc80a0508dc82e284617513cbb270e8 Author: Alon Giladi Date: Sun Mar 5 14:16:22 2023 +0200 wifi: iwlwifi: mvm: allow Microsoft to use TAS Add Microsoft to the list of OEMs which allowed to use TAS. Signed-off-by: Alon Giladi Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.662967fec1cc.Icb30cddc049cb5402fd5ab2ce7f95033e478b1b9@changeid Signed-off-by: Johannes Berg commit 4ec825854c3c1e7a2cb3fedd6d1acbba0a3e2d74 Author: Mordechay Goodstein Date: Sun Mar 5 14:16:21 2023 +0200 wifi: iwlwifi: mvm: add all EHT based on data0 info from HW Update all radiotap EHT TLVs that we can extract from data0 in HW. Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.730f219e02ee.Ife3dd85c65758694d7602e8bc8660887d77faacf@changeid Signed-off-by: Johannes Berg commit 24f7f6e3ed3b91381307c649a32aff9a69b7cae6 Author: Mordechay Goodstein Date: Sun Mar 5 14:16:20 2023 +0200 wifi: iwlwifi: mvm: add EHT radiotap info based on rate_n_flags rate_n_flags is always present in the data so at least give all of the information we can extract from rate_n_flags Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.b1c7d49ad35e.Ie2412ac6f88700aa3767ff95ffb52a806b13b7ce@changeid Signed-off-by: Johannes Berg commit 056805bcc6bc439de1c9fbb1854042fdf40c8638 Author: Mordechay Goodstein Date: Sun Mar 5 14:16:19 2023 +0200 wifi: iwlwifi: mvm: add an helper function radiotap TLVs Add a helper function setting type, length, zeroing out TLV data and including adding padding if necessary. Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.8ac5195bb3e6.I19ad99c1ad3108453aede64bddf6ef1a7c4a0b74@changeid Signed-off-by: Johannes Berg commit 11a2638d120b9d998916efb6fc55c6422e469ffa Author: Mordechay Goodstein Date: Sun Mar 5 14:16:19 2023 +0200 wifi: radiotap: separate vendor TLV into header/content To be able to use a general function later for any kind of TLV, separate the vendor TLV header/content in the structs. Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.8ac5195bb3e6.I19ad99c1ad3108453aede64bddf6ef1a7c4a0b74@changeid [separate from the original combined patch] Signed-off-by: Johannes Berg commit 5d65cf6ae6aea1a8d533d4499201a13d0068a0dc Author: Zqiang Date: Fri Feb 24 09:20:35 2023 +0800 locktorture: Add raw_spinlock* torture tests for PREEMPT_RT kernels In PREEMPT_RT kernels, both spin_lock() and spin_lock_irq() are converted to sleepable rt_spin_lock(). This means that the interrupt related suffixes for spin_lock/unlock(_irq, irqsave/irqrestore) do not affect the CPU's interrupt state. This commit therefore adds raw spin-lock torture tests. This in turn permits pure spin locks to be tested in PREEMPT_RT kernels. Suggested-by: Paul E. McKenney Suggested-by: Davidlohr Bueso Signed-off-by: Zqiang Reviewed-by: Davidlohr Bueso Signed-off-by: Paul E. McKenney commit 45bcf0bd8cbe163c5aec18570b6befd2193f1a57 Author: John Stultz Date: Tue Feb 21 19:02:38 2023 +0000 locktorture: With nested locks, occasionally skip main lock If we're using nested locking to stress things, occasionally skip taking the main lock, so that we can get some different contention patterns between the writers (to hopefully get two disjoint blocked trees) Cc: Davidlohr Bueso Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Joel Fernandes Cc: Juri Lelli Cc: Valentin Schneider Cc: Dietmar Eggemann Cc: kernel-team@android.com Co-developed-by: Connor O'Brien Signed-off-by: Connor O'Brien Signed-off-by: John Stultz Signed-off-by: Paul E. McKenney commit ae4823e427954d30ab393888a334f9d1fd8cd597 Author: John Stultz Date: Tue Feb 21 19:02:37 2023 +0000 locktorture: Add nested locking to rtmutex torture tests This patch adds randomized nested locking to the rtmutex torture tests. Additionally it adds LOCK09 config files for testing rtmutexes with nested locking. Cc: Davidlohr Bueso Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Joel Fernandes Cc: Juri Lelli Cc: Valentin Schneider Cc: Dietmar Eggemann Cc: kernel-team@android.com Reviewed-by: Davidlohr Bueso Co-developed-by: Connor O'Brien Signed-off-by: Connor O'Brien Signed-off-by: John Stultz Signed-off-by: Paul E. McKenney commit 3e5aeaf53422bdd79fecf89aa160f048114e013c Author: John Stultz Date: Tue Feb 21 19:02:36 2023 +0000 locktorture: Add nested locking to mutex torture tests This patch adds randomized nested locking to the mutex torture tests, as well as new LOCK08 config files for testing mutexes with nested locking Cc: Davidlohr Bueso Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Joel Fernandes Cc: Juri Lelli Cc: Valentin Schneider Cc: Dietmar Eggemann Cc: kernel-team@android.com Reviewed-by: Davidlohr Bueso Co-developed-by: Connor O'Brien Signed-off-by: Connor O'Brien Signed-off-by: John Stultz Signed-off-by: Paul E. McKenney commit b63343207da21179d82df933f42a1725a53b9a63 Author: John Stultz Date: Tue Feb 21 19:02:35 2023 +0000 locktorture: Add nested_[un]lock() hooks and nlocks parameter In order to extend locktorture to support lock nesting, add nested_lock() and nested_unlock() hooks to the torture ops. These take a 32bit lockset mask which is generated at random, so some number of locks will be taken before the main lock is taken and released afterwards. Additionally, add nested_locks module parameter to allow specifying the number of nested locks to be used. This has been helpful to uncover issues in the proxy-exec series development. This was inspired by locktorture extensions originally implemented by Connor O'Brien, for stress testing the proxy-execution series: https://lore.kernel.org/lkml/20221003214501.2050087-12-connoro@google.com/ Cc: Davidlohr Bueso Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Joel Fernandes Cc: Juri Lelli Cc: Valentin Schneider Cc: Dietmar Eggemann Cc: kernel-team@android.com Reviewed-by: Davidlohr Bueso Co-developed-by: Connor O'Brien Signed-off-by: Connor O'Brien Signed-off-by: John Stultz Signed-off-by: Paul E. McKenney commit d70e2ecbc726a0ee794b72365730a8dbc9866080 Author: Randy Dunlap Date: Sun Feb 26 17:17:00 2023 -0800 instrumented.h: Fix all kernel-doc format warnings Fix 26 kernel-doc notation warnings by converting the function documentation to kernel-doc format. Warning example: instrumented.h:155: warning: Function parameter or member 'to' not described in 'instrument_copy_from_user_after' instrumented.h:155: warning: Function parameter or member 'from' not described in 'instrument_copy_from_user_after' instrumented.h:155: warning: Function parameter or member 'n' not described in 'instrument_copy_from_user_after' instrumented.h:155: warning: Function parameter or member 'left' not described in 'instrument_copy_from_user_after' Fixes: 36e4d4dd4fc4 ("include/linux: Add instrumented.h infrastructure") Fixes: 00047c2e6d7c ("instrumented.h: Introduce read-write instrumentation hooks") Fixes: 33b75c1d884e ("instrumented.h: allow instrumenting both sides of copy_from_user()") Fixes: 888f84a6da4d ("x86: asm: instrument usercopy in get_user() and put_user()") Signed-off-by: Randy Dunlap Cc: Arnd Bergmann Cc: Marco Elver Cc: Alexander Potapenko Cc: Andrew Morton Cc: Dmitry Vyukov Cc: Paul E. McKenney Cc: Ingo Molnar Reviewed-by: Marco Elver Signed-off-by: Paul E. McKenney commit a73dc912aa7e43f4f12003a26aeab839b500b86d Merge: 2d5bcdcda8799 6b4a6ea2c62d3 Author: Alexei Starovoitov Date: Tue Mar 7 09:33:43 2023 -0800 Merge branch 'bpf: bpf memory usage' Yafang Shao says: ==================== Currently we can't get bpf memory usage reliably either from memcg or from bpftool. In memcg, there's not a 'bpf' item in memory.stat, but only 'kernel', 'sock', 'vmalloc' and 'percpu' which may related to bpf memory. With these items we still can't get the bpf memory usage, because bpf memory usage may far less than the kmem in a memcg, for example, the dentry may consume lots of kmem. bpftool now shows the bpf memory footprint, which is difference with bpf memory usage. The difference can be quite great in some cases, for example, - non-preallocated bpf map The non-preallocated bpf map memory usage is dynamically changed. The allocated elements count can be from 0 to the max entries. But the memory footprint in bpftool only shows a fixed number. - bpf metadata consumes more memory than bpf element In some corner cases, the bpf metadata can consumes a lot more memory than bpf element consumes. For example, it can happen when the element size is quite small. - some maps don't have key, value or max_entries For example the key_size and value_size of ringbuf is 0, so its memlock is always 0. We need a way to show the bpf memory usage especially there will be more and more bpf programs running on the production environment and thus the bpf memory usage is not trivial. This patchset introduces a new map ops ->map_mem_usage to calculate the memory usage. Note that we don't intend to make the memory usage 100% accurate, while our goal is to make sure there is only a small difference between what bpftool reports and the real memory. That small difference can be ignored compared to the total usage. That is enough to monitor the bpf memory usage. For example, the user can rely on this value to monitor the trend of bpf memory usage, compare the difference in bpf memory usage between different bpf program versions, figure out which maps consume large memory, and etc. This patchset implements the bpf memory usage for all maps, and yet there's still work to do. We don't want to introduce runtime overhead in the element update and delete path, but we have to do it for some non-preallocated maps, - devmap, xskmap When we update or delete an element, it will allocate or free memory. In order to track this dynamic memory, we have to track the count in element update and delete path. - cpumap The element size of each cpumap element is not determinated. If we want to track the usage, we have to count the size of all elements in the element update and delete path. So I just put it aside currently. - local_storage, bpf_local_storage When we attach or detach a cgroup, it will allocate or free memory. If we want to track the dynamic memory, we also need to do something in the update and delete path. So I just put it aside currently. - offload map The element update and delete of offload map is via the netdev dev_ops, in which it may dynamically allocate or free memory, but this dynamic memory isn't counted in offload map memory usage currently. The result of each map can be found in the individual patch. We may also need to track per-container bpf memory usage, that will be addressed by a different patchset. Changes: v3->v4: code improvement on ringbuf (Andrii) use READ_ONCE() to read lpm_trie (Tao) explain why we can't get bpf memory usage from memcg. v2->v3: check callback at map creation time and avoid warning (Alexei) fix build error under CONFIG_BPF=n (lkp@intel.com) v1->v2: calculate the memory usage within bpf (Alexei) - [v1] bpf, mm: bpf memory usage https://lwn.net/Articles/921991/ - [RFC PATCH v2] mm, bpf: Add BPF into /proc/meminfo https://lwn.net/Articles/919848/ - [RFC PATCH v1] mm, bpf: Add BPF into /proc/meminfo https://lwn.net/Articles/917647/ - [RFC PATCH] bpf, mm: Add a new item bpf into memory.stat https://lore.kernel.org/bpf/20220921170002.29557-1-laoar.shao@gmail].com/ ==================== Signed-off-by: Alexei Starovoitov commit 6b4a6ea2c62d34272d64161d43a19c02355576e2 Author: Yafang Shao Date: Sun Mar 5 12:46:15 2023 +0000 bpf: enforce all maps having memory usage callback We have implemented memory usage callback for all maps, and we enforce any newly added map having a callback as well. We check this callback at map creation time. If it doesn't have the callback, we will return EINVAL. Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-19-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 9629363cd05642fe43aded44938adec067ad1da3 Author: Yafang Shao Date: Sun Mar 5 12:46:14 2023 +0000 bpf: offload map memory usage A new helper is introduced to calculate offload map memory usage. But currently the memory dynamically allocated in netdev dev_ops, like nsim_map_update_elem, is not counted. Let's just put it aside now. Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-18-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit b4fd0d672bca001632d7291b5b162b08e065b815 Author: Yafang Shao Date: Sun Mar 5 12:46:13 2023 +0000 bpf, net: xskmap memory usage A new helper is introduced to calculate xskmap memory usage. The xfsmap memory usage can be dynamically changed when we add or remove a xsk_map_node. Hence we need to track the count of xsk_map_node to get its memory usage. The result as follows, - before 10: xskmap name count_map flags 0x0 key 4B value 4B max_entries 65536 memlock 524288B - after 10: xskmap name count_map flags 0x0 <<< no elements case key 4B value 4B max_entries 65536 memlock 524608B Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-17-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 73d2c61919e9aeffad1b826ec23b1a4a07c1e0dd Author: Yafang Shao Date: Sun Mar 5 12:46:12 2023 +0000 bpf, net: sock_map memory usage sockmap and sockhash don't have something in common in allocation, so let's introduce different helpers to calculate their memory usage. The reuslt as follows, - before 28: sockmap name count_map flags 0x0 key 4B value 4B max_entries 65536 memlock 524288B 29: sockhash name count_map flags 0x0 key 4B value 4B max_entries 65536 memlock 524288B - after 28: sockmap name count_map flags 0x0 key 4B value 4B max_entries 65536 memlock 524608B 29: sockhash name count_map flags 0x0 <<<< no updated elements key 4B value 4B max_entries 65536 memlock 1048896B Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-16-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 7490b7f1c02ef825ef98f7230662049d4a464a21 Author: Yafang Shao Date: Sun Mar 5 12:46:11 2023 +0000 bpf, net: bpf_local_storage memory usage A new helper is introduced into bpf_local_storage map to calculate the memory usage. This helper is also used by other maps like bpf_cgrp_storage, bpf_inode_storage, bpf_task_storage and etc. Note that currently the dynamically allocated storage elements are not counted in the usage, since it will take extra runtime overhead in the elements update or delete path. So let's put it aside now, and implement it in the future when someone really need it. Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-15-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 2f536977d6f1481f0a149140c8311103ddebe36a Author: Yafang Shao Date: Sun Mar 5 12:46:10 2023 +0000 bpf: local_storage memory usage A new helper is introduced to calculate local_storage map memory usage. Currently the dynamically allocated elements are not counted, since it will take runtime overhead in the element update or delete path. So let's put it aside currently, and implement it in the future if the user really needs it. Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-14-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit f062226d8d59b521ddc946ad791048188a16722a Author: Yafang Shao Date: Sun Mar 5 12:46:09 2023 +0000 bpf: bpf_struct_ops memory usage A new helper is introduced to calculate bpf_struct_ops memory usage. The result as follows, - before 1: struct_ops name count_map flags 0x0 key 4B value 256B max_entries 1 memlock 4096B btf_id 73 - after 1: struct_ops name count_map flags 0x0 key 4B value 256B max_entries 1 memlock 5016B btf_id 73 Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-13-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit c6e66b42a348125fd41131de75f84fa67b6579ce Author: Yafang Shao Date: Sun Mar 5 12:46:08 2023 +0000 bpf: queue_stack_maps memory usage A new helper is introduced to calculate queue_stack_maps memory usage. The result as follows, - before 20: queue name count_map flags 0x0 key 0B value 4B max_entries 65536 memlock 266240B 21: stack name count_map flags 0x0 key 0B value 4B max_entries 65536 memlock 266240B - after 20: queue name count_map flags 0x0 key 0B value 4B max_entries 65536 memlock 524288B 21: stack name count_map flags 0x0 key 0B value 4B max_entries 65536 memlock 524288B Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-12-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit fa5e83df173beb6c1334737a463fc2b4ef4efa8b Author: Yafang Shao Date: Sun Mar 5 12:46:07 2023 +0000 bpf: devmap memory usage A new helper is introduced to calculate the memory usage of devmap and devmap_hash. The number of dynamically allocated elements are recored for devmap_hash already, but not for devmap. To track the memory size of dynamically allocated elements, this patch also count the numbers for devmap. The result as follows, - before 40: devmap name count_map flags 0x80 key 4B value 4B max_entries 65536 memlock 524288B 41: devmap_hash name count_map flags 0x80 key 4B value 4B max_entries 65536 memlock 524288B - after 40: devmap name count_map flags 0x80 <<<< no elements key 4B value 4B max_entries 65536 memlock 524608B 41: devmap_hash name count_map flags 0x80 <<<< no elements key 4B value 4B max_entries 65536 memlock 524608B Note that the number of buckets is same with max_entries for devmap_hash in this case. Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-11-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 835f1fca951303930b2c74c5b0abe3c03a3aeadf Author: Yafang Shao Date: Sun Mar 5 12:46:06 2023 +0000 bpf: cpumap memory usage A new helper is introduced to calculate cpumap memory usage. The size of cpu_entries can be dynamically changed when we update or delete a cpumap element, but this patch doesn't include the memory size of cpu_entry yet. We can dynamically calculate the memory usage when we alloc or free a cpu_entry, but it will take extra runtime overhead, so let just put it aside currently. Note that the size of different cpu_entry may be different as well. The result as follows, - before 48: cpumap name count_map flags 0x4 key 4B value 4B max_entries 64 memlock 4096B - after 48: cpumap name count_map flags 0x4 key 4B value 4B max_entries 64 memlock 832B Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-10-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 71a49abe73cb56b15bf0701b5e98b6103480f762 Author: Yafang Shao Date: Sun Mar 5 12:46:05 2023 +0000 bpf: bloom_filter memory usage Introduce a new helper to calculate the bloom_filter memory usage. The result as follows, - before 16: bloom_filter flags 0x0 key 0B value 8B max_entries 65536 memlock 524288B - after 16: bloom_filter flags 0x0 key 0B value 8B max_entries 65536 memlock 65856B Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-9-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 2f7e4ab2caa9a692ffc843f801cea90632cdc782 Author: Yafang Shao Date: Sun Mar 5 12:46:04 2023 +0000 bpf: ringbuf memory usage A new helper ringbuf_map_mem_usage() is introduced to calculate ringbuf memory usage. The result as follows, - before 15: ringbuf name count_map flags 0x0 key 0B value 0B max_entries 65536 memlock 0B - after 15: ringbuf name count_map flags 0x0 key 0B value 0B max_entries 65536 memlock 78424B Signed-off-by: Yafang Shao Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230305124615.12358-8-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 2e89caf055a64cb531cbd8ab7a01c3e9b0b3133d Author: Yafang Shao Date: Sun Mar 5 12:46:03 2023 +0000 bpf: reuseport_array memory usage A new helper is introduced to calculate reuseport_array memory usage. The result as follows, - before 14: reuseport_sockarray name count_map flags 0x0 key 4B value 8B max_entries 65536 memlock 1048576B - after 14: reuseport_sockarray name count_map flags 0x0 key 4B value 8B max_entries 65536 memlock 524544B Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-7-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit cbb9b6068c68332eefb0ef4c0ebf6f96c35d9bde Author: Yafang Shao Date: Sun Mar 5 12:46:02 2023 +0000 bpf: stackmap memory usage A new helper is introduced to get stackmap memory usage. Some small memory allocations are ignored as their memory size is quite small compared to the totol usage. The result as follows, - before 16: stack_trace name count_map flags 0x0 key 4B value 8B max_entries 65536 memlock 1048576B - after 16: stack_trace name count_map flags 0x0 key 4B value 8B max_entries 65536 memlock 2097472B Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-6-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 1746d0555a8795c7ecfeab6a2c3e3c824cf57535 Author: Yafang Shao Date: Sun Mar 5 12:46:01 2023 +0000 bpf: arraymap memory usage Introduce array_map_mem_usage() to calculate arraymap memory usage. In this helper, some small memory allocations are ignored, like the allocation of struct bpf_array_aux in prog_array. The inner_map_meta in array_of_map is also ignored. The result as follows, - before 11: array name count_map flags 0x0 key 4B value 4B max_entries 65536 memlock 524288B 12: percpu_array name count_map flags 0x0 key 4B value 4B max_entries 65536 memlock 8912896B 13: perf_event_array name count_map flags 0x0 key 4B value 4B max_entries 65536 memlock 524288B 14: prog_array name count_map flags 0x0 key 4B value 4B max_entries 65536 memlock 524288B 15: cgroup_array name count_map flags 0x0 key 4B value 4B max_entries 65536 memlock 524288B - after 11: array name count_map flags 0x0 key 4B value 4B max_entries 65536 memlock 524608B 12: percpu_array name count_map flags 0x0 key 4B value 4B max_entries 65536 memlock 17301824B 13: perf_event_array name count_map flags 0x0 key 4B value 4B max_entries 65536 memlock 524608B 14: prog_array name count_map flags 0x0 key 4B value 4B max_entries 65536 memlock 524608B 15: cgroup_array name count_map flags 0x0 key 4B value 4B max_entries 65536 memlock 524608B Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-5-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 304849a27b341cf22d5c15096144cc8c1b69e0c0 Author: Yafang Shao Date: Sun Mar 5 12:46:00 2023 +0000 bpf: hashtab memory usage htab_map_mem_usage() is introduced to calculate hashmap memory usage. In this helper, some small memory allocations are ignore, as their size is quite small compared with the total size. The inner_map_meta in hash_of_map is also ignored. The result for hashtab as follows, - before this change 1: hash name count_map flags 0x1 <<<< no prealloc, fully set key 16B value 24B max_entries 1048576 memlock 41943040B 2: hash name count_map flags 0x1 <<<< no prealloc, none set key 16B value 24B max_entries 1048576 memlock 41943040B 3: hash name count_map flags 0x0 <<<< prealloc key 16B value 24B max_entries 1048576 memlock 41943040B The memlock is always a fixed size whatever it is preallocated or not, and whatever the count of allocated elements is. - after this change 1: hash name count_map flags 0x1 <<<< non prealloc, fully set key 16B value 24B max_entries 1048576 memlock 117441536B 2: hash name count_map flags 0x1 <<<< non prealloc, non set key 16B value 24B max_entries 1048576 memlock 16778240B 3: hash name count_map flags 0x0 <<<< prealloc key 16B value 24B max_entries 1048576 memlock 109056000B The memlock now is hashtab actually allocated. The result for percpu hash map as follows, - before this change 4: percpu_hash name count_map flags 0x0 <<<< prealloc key 16B value 24B max_entries 1048576 memlock 822083584B 5: percpu_hash name count_map flags 0x1 <<<< no prealloc key 16B value 24B max_entries 1048576 memlock 822083584B - after this change 4: percpu_hash name count_map flags 0x0 key 16B value 24B max_entries 1048576 memlock 897582080B 5: percpu_hash name count_map flags 0x1 key 16B value 24B max_entries 1048576 memlock 922748736B At worst, the difference can be 10x, for example, - before this change 6: hash name count_map flags 0x0 key 4B value 4B max_entries 1048576 memlock 8388608B - after this change 6: hash name count_map flags 0x0 key 4B value 4B max_entries 1048576 memlock 83889408B Signed-off-by: Yafang Shao Acked-by: Hou Tao Link: https://lore.kernel.org/r/20230305124615.12358-4-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 41d5941e7f9a27f3d28220f08b843e8d87df1be4 Author: Yafang Shao Date: Sun Mar 5 12:45:59 2023 +0000 bpf: lpm_trie memory usage trie_mem_usage() is introduced to calculate the lpm_trie memory usage. Some small memory allocations are ignored. The inner node is also ignored. The result as follows, - before 10: lpm_trie flags 0x1 key 8B value 8B max_entries 65536 memlock 1048576B - after 10: lpm_trie flags 0x1 key 8B value 8B max_entries 65536 memlock 2291536B Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-3-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 90a5527d7686d3ebe0dd2a831356a6c7d7dc31bc Author: Yafang Shao Date: Sun Mar 5 12:45:58 2023 +0000 bpf: add new map ops ->map_mem_usage Add a new map ops ->map_mem_usage to print the memory usage of a bpf map. This is a preparation for the followup change. Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20230305124615.12358-2-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit a96c3588cf7c90e0afdf588654b0ead99740e47a Merge: 2289fa0704b8d 3169c5816a55b Author: Mark Brown Date: Tue Mar 7 17:29:09 2023 +0000 spi: mpc5xxx-psc: Clean up even more and fix Merge series from Andy Shevchenko : The recent cleanup series broke the error path in the drivers. So fix it and do even more cleanups. commit f1fbb6a2667e2bb21c281a0fa4edb1ac8d1d0ab0 Merge: db97cc0f7459a 755ddc3acd50c Author: Mark Brown Date: Tue Mar 7 17:29:00 2023 +0000 ASoC: SOF: ipc4: Add core_id support from topology Merge series from Peter Ujfalusi : The following series will add support for handling the core_id token which is needed for supporting multiple cores with complex topologies. commit 4b736ed40583631e0cf32c55dbc1e5ec0434a74b Author: Ville Syrjälä Date: Thu Mar 2 18:10:09 2023 +0200 drm/i915: Get rid of the gm45 HPD live state nonsense The idea that ctg uses different HPD live state bits is total nonsense, at least on my machine (Dell Latitude E5400). The only reason DP-B even works on my ctg is that DP-D live state is stuck high, even though there is no physical DP-D port. So when the detect checks DP-B live state it sees the stuck live state of DP-D instead. If I hack the driver to not register DP-D at all, and thus we never enabe DP-D HPD, DP-B stops working as well. Just to put some conclusive evidence into this mess, here are the actual hotplug register values for each port: Everything disconnected: PORT_HOTPLUG_EN (0x00061110): 0x00000000 PORT_HOTPLUG_STAT (0x00061114): 0x00000000 PORT_HOTPLUG_EN (0x00061110): 0x08000000 PORT_HOTPLUG_STAT (0x00061114): 0x08000000 PORT_HOTPLUG_EN (0x00061110): 0x10000000 PORT_HOTPLUG_STAT (0x00061114): 0x00000000 PORT_HOTPLUG_EN (0x00061110): 0x20000000 PORT_HOTPLUG_STAT (0x00061114): 0x00000000 Only port B connected: PORT_HOTPLUG_EN (0x00061110): 0x00000000 PORT_HOTPLUG_STAT (0x00061114): 0x00000000 PORT_HOTPLUG_EN (0x00061110): 0x08000000 PORT_HOTPLUG_STAT (0x00061114): 0x08000000 PORT_HOTPLUG_EN (0x00061110): 0x10000000 PORT_HOTPLUG_STAT (0x00061114): 0x00000000 PORT_HOTPLUG_EN (0x00061110): 0x20000000 PORT_HOTPLUG_STAT (0x00061114): 0x20000000 Only port C connected: PORT_HOTPLUG_EN (0x00061110): 0x00000000 PORT_HOTPLUG_STAT (0x00061114): 0x00000000 PORT_HOTPLUG_EN (0x00061110): 0x08000000 PORT_HOTPLUG_STAT (0x00061114): 0x08000000 PORT_HOTPLUG_EN (0x00061110): 0x10000000 PORT_HOTPLUG_STAT (0x00061114): 0x10000000 PORT_HOTPLUG_EN (0x00061110): 0x20000000 PORT_HOTPLUG_STAT (0x00061114): 0x00000000 So the enable bit and live state bit always match 1:1. Acked-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230302161013.29213-4-ville.syrjala@linux.intel.com commit dded35acecffe9b6ec881ddd42c6275a38fbfbfc Author: Ville Syrjälä Date: Thu Mar 2 18:10:08 2023 +0200 drm/i915: Fix SKL DDI A digital port .connected() SKL doesn't have any north DE hotplug stuff. Currently we're trying to read DDI A live state from the BDW north DE bit, instead of the approproate south DE bit. Fix it. And for good measure clear the pointer to the north hpd pin array, so that we'll actually notice if some other place is also using the wrong thing. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230302161013.29213-3-ville.syrjala@linux.intel.com commit a98ffd6e333583c9c3f57920c505a37eaf5b2586 Author: Ville Syrjälä Date: Thu Mar 2 18:10:07 2023 +0200 drm/i915: Populate dig_port->connected() before connector init We'll need dig_port->connected() to be there for a HPD live state check during eDP connector probing. Reorder intel_ddi_init() accordingly. g4x_dp_init() is already fine. v2: Fix comment style while at it Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230302161013.29213-2-ville.syrjala@linux.intel.com commit 8c29e78b8ecbec208bdd6d8b385ada71c1e730cd Author: Ranjani Sridharan Date: Tue Mar 7 16:04:35 2023 +0200 ASoC: SOF: Intel: hda: remove redundant DAI config during hw_free The DAI widget is freed during FE DAI hw_free and therefore the DAI config during BE DAI hw_free is redundant. Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307140435.2808-15-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit a492da0ce6450d6fdea49ec89006d7692c0c1382 Author: Ranjani Sridharan Date: Tue Mar 7 16:04:34 2023 +0200 ASoC: SOF: Intel: hda: Remove hda_ctrl_dai_widget_setup/free() Remove these functions and reuse hda_dai_config(). Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307140435.2808-14-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 2b009fa0823c1510700fd17a0780ddd06a460fb4 Author: Ranjani Sridharan Date: Tue Mar 7 16:04:33 2023 +0200 ASoC: SOF: Intel: hda: Unify DAI drv ops for IPC3 and IPC4 Define the post_trigger DMA op for IPC3 and unify the DAI driver ops for IPC3 and IPC4 for HDA DAI's. Also, use the post_trigger op to stop the paused streams properly in the hda_dai_suspend() function. This fixes the suspend while paused case for IPC4 because previously we weren't resetting the pipeline when suspending the system with some paused streams. Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307140435.2808-13-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 4b2ee4cd7103607b303a079c0469c06694be87e9 Author: Ranjani Sridharan Date: Tue Mar 7 16:04:32 2023 +0200 ASoC: SOF: Intel: hda-dai: Define DAI widget DMA trigger ops for IPC4 Define and use the SOF widget's DMA pre_trigger/trigger/post_trigger ops in ipc4_hda_dai_trigger(). Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307140435.2808-12-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit e6ffb0d5eda751371d030bb8ae324493b2d1abc2 Author: Ranjani Sridharan Date: Tue Mar 7 16:04:31 2023 +0200 ASoC: SOF: Intel: hda-dai: Use the topology IPC dai_config op Use the topology IPC dai_config to update the dai_config for HDA DAI widgets. Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307140435.2808-11-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit e2d6569aba39f4b98da8e56999a19dc901188e5e Author: Ranjani Sridharan Date: Tue Mar 7 16:04:30 2023 +0200 ASoC: SOF: Intel: hda-dai: Add setup_hext_stream/reset_hext_stream DMA ops Define and use the setup_hext_stream/reset_hext_stream DMA ops during link hw_params and cleanup. Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307140435.2808-10-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 80afde34e8f9c2459f7cd37ea2d5f71751fedd69 Author: Ranjani Sridharan Date: Tue Mar 7 16:04:29 2023 +0200 ASoC: SOF: Intel: hda-dai: Define and set the HDA DAI widget DMA ops Define and set the get_hext_stream, assign_hext_stream and release_hext_stream DMA ops for HDA DAIs. Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307140435.2808-9-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 2ae49c6fe060baf432472aba48743e72b8345c52 Author: Ranjani Sridharan Date: Tue Mar 7 16:04:28 2023 +0200 ASoC: SOF: Intel: hda-dai: Introduce DAI widget ops Introduce a new ops structure for HDA DAI widget DMA ops and add a new field to struct snd_sof_dai that will be used to set the ops pointer for DAI widgets. Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307140435.2808-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit be7f4f8d0bee110505750d85e6e11c59f8ceb65f Author: Ranjani Sridharan Date: Tue Mar 7 16:04:27 2023 +0200 ASoC: SOF: Intel: hda-dai: Use the dai argument in ipc4_hda_dai_trigger No need to define a new variable and look it up again. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307140435.2808-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit b436ed8dd071cae10ac3f94c541a783a094971ff Author: Ranjani Sridharan Date: Tue Mar 7 16:04:26 2023 +0200 ASoC: SOF: Intel: hda-dai: Pass the CPU dai pointer Pass the CPU DAI pointer from the ASoC core to hda_link_dma_hw_params() and ipc3_hda_dai_trigger(). This will avoid looking up the CPU DAI pointer multiple times. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307140435.2808-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 2be2caf481c7200b29116cea83cf8dd45c9e097f Author: Ranjani Sridharan Date: Tue Mar 7 16:04:25 2023 +0200 ASoC: SOF: Intel: hda-dai: Modify the signature of hda_link_dma_cleanup() Remove the trigger_suspend_stop argument from hda_link_dma_cleanup() and move the call to snd_hdac_ext_stream_clear() into snd_hdac_ext_stream_clear(). This is a preparatory step to unify the trigger ops for IPC3 and IPC4. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307140435.2808-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 2a6afac248b08a0bcec72a6a605f11319738f6db Author: Ranjani Sridharan Date: Tue Mar 7 16:04:24 2023 +0200 ASoC: SOF: Intel: hda-dai: remove struct hda_pipe_params Remove the struct definition and use the params argument directly. Also, use the hlink pointer to set the stream ID instead of looking it up again. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307140435.2808-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit a8310c0093f4ebeb3a317b4b70e864b91739fc50 Author: Ranjani Sridharan Date: Tue Mar 7 16:04:23 2023 +0200 ASoC: SOF: Intel: hda-dai: Remove hda_link_dma_params() No code change. Just code move from hda_link_dma_params() to hda_link_dma_hw_params(). Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307140435.2808-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 274f8a3b4eb855bb14e38f6f12421ed32a2e670b Author: Ranjani Sridharan Date: Tue Mar 7 16:04:22 2023 +0200 ASoC: SOF: Intel: hda-dai: Remove BE DAI DRV ops for SSP DAI's Now that the DAI_CONFIG IPC is sent after widget setup and before widget free, there is no need for the BE DAI DRV ops that do the same thing. So remove them. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307140435.2808-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 94e19f4fbb1efc21cab860723662b3a9228b428f Author: Manivannan Sadhasivam Date: Tue Mar 7 13:12:48 2023 +0530 bus: mhi: ep: Demote unsupported channel error log to debug Not all MHI endpoints will support all available channels. Most of them support only a selected number of channels based on the implementations. In those cases, it is not needed to print error messages in the endpoint. So let's demote the error log to debug. Reviewed-by: Jeffrey Hugo Signed-off-by: Manivannan Sadhasivam commit 2289fa0704b8d074d256cfa43ceaa6ee620d5697 Merge: 20064c47f63e9 3ffefa1d9c9eb Author: Mark Brown Date: Tue Mar 7 16:46:18 2023 +0000 spi: Convert to platform remove callback returning Merge series from Uwe Kleine-König : This patch series adapts the platform drivers below drivers/spi to use the .remove_new() callback. Compared to the traditional .remove() callback .remove_new() returns no value. This is a good thing because the driver core doesn't (and cannot) cope for errors during remove. The only effect of a non-zero return value in .remove() is that the driver core emits a warning. The device is removed anyhow and an early return from .remove() usually yields a resource leak. By changing the remove callback to return void driver authors cannot reasonably assume any more that there is some kind of cleanup later. All drivers touched here returned zero unconditionally in their remove callback, so they could all be converted trivially to .remove_new(). commit 5da094ac80cd4f6d4114ad220468f602f86d9980 Author: Manivannan Sadhasivam Date: Fri Feb 24 17:31:47 2023 +0530 bus: mhi: host: Remove mhi_poll() API mhi_poll() API is not used within the MHI stack and also not by any client drivers in mainline. So let's remove it until any consumer is available. Reviewed-by: Jeffrey Hugo Signed-off-by: Manivannan Sadhasivam commit 0eaca1ed0d2f70e3e573ef103ddbde582b2b3745 Author: Ville Syrjälä Date: Mon Mar 6 17:44:19 2023 +0200 drm/i915: Bump VBT version for expected child dev size check The most modern VBT I've observed in the wild is version 250. The child dev size hasn't changed since version 216, so bump the version number in the expected child dev size check. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230306154419.23207-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 876882b51569bf686ae4c421b0a738b78a536aa3 Author: Golan Ben Ami Date: Sun Mar 5 14:16:18 2023 +0200 wifi: iwlwifi: reduce verbosity of some logging events These are cases in which we'd like to warn that something unexpected happened but they may not be errors. Reduce verbosity. Signed-off-by: Golan Ben Ami Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124407.5eea0f58a74f.Ifb6b35903a5a452a757bfe50b6a7e58b3fd2ef23@changeid Signed-off-by: Johannes Berg commit 7f165fdf2967a5b7aa4b123cc9586e9f5068325b Author: Mukesh Sisodiya Date: Sun Mar 5 14:16:17 2023 +0200 wifi: iwlwifi: Adding the code to get RF name for MsP device Add missing RF name extraction for MsP device from hardware rf-id. Signed-off-by: Mukesh Sisodiya Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124406.ae831f21ec55.Iad71cc30f9930f7ebe079d210ebe6c968a159273@changeid Signed-off-by: Johannes Berg commit f567b9b46c9e8ecc12190a109ed16006c9f441fa Author: Mordechay Goodstein Date: Sun Mar 5 14:16:16 2023 +0200 wifi: iwlwifi: mvm: mark mac header with no data frames Although no data is presented in the skb, but upper layers need it for calculating where radio tap header are done, so we mark it. Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124406.8f53cc8579bf.I8819c005b4953cea03346d0aff82b31d94f79fe5@changeid Signed-off-by: Johannes Berg commit eccfe0176cc11432f1bc7e8b035164d6263df715 Author: Mordechay Goodstein Date: Sun Mar 5 14:16:15 2023 +0200 wifi: iwlwifi: mvm: add LSIG info to radio tap info in EHT Nothing change with LSIG in EHT so just extend the switch case to include EHT standard. Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230305124406.53edcfc049fb.Iec0401faead108aa5130c23c604cfb88ef2943de@changeid Signed-off-by: Johannes Berg commit 14e05beb10326eeb997ec5ebbf10edf08e85c3f8 Author: Jacob Keller Date: Tue Feb 28 08:28:27 2023 -0800 wifi: nl80211: convert cfg80211_scan_request allocation to *_size macros The cfg80211_scan_request structure is followed by a flexible array member as well as several other arrays that are then stored into pointers in the structure. These are allocated currently using a simple sequence of multiplications. Replace the calculations with struct_size(), size_add(), and array_size() helper macros. These macros saturate the calculation at SIZE_MAX rather than overflowing. Note that we can't use flex_array_size() instead of array_size() because the fields are not arrays, but simple pointers. Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20230228162827.3876606-3-jacob.e.keller@intel.com Signed-off-by: Johannes Berg commit 2d5bcdcda8799cf21f9ab84598c946dd320207a2 Author: Nathan Chancellor Date: Tue Mar 7 08:14:06 2023 -0700 bpf: Increase size of BTF_ID_LIST without CONFIG_DEBUG_INFO_BTF again After commit 66e3a13e7c2c ("bpf: Add bpf_dynptr_slice and bpf_dynptr_slice_rdwr"), clang builds without CONFIG_DEBUG_INFO_BTF warn: kernel/bpf/verifier.c:10298:24: warning: array index 16 is past the end of the array (that has type 'u32[16]' (aka 'unsigned int[16]')) [-Warray-bounds] meta.func_id == special_kfunc_list[KF_bpf_dynptr_slice_rdwr]) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~ kernel/bpf/verifier.c:9150:1: note: array 'special_kfunc_list' declared here BTF_ID_LIST(special_kfunc_list) ^ include/linux/btf_ids.h:207:27: note: expanded from macro 'BTF_ID_LIST' #define BTF_ID_LIST(name) static u32 __maybe_unused name[16]; ^ 1 warning generated. A warning of this nature was previously addressed by commit beb3d47d1d3d ("bpf: Fix a BTF_ID_LIST bug with CONFIG_DEBUG_INFO_BTF not set") but there have been new kfuncs added since then. Quadruple the size of the CONFIG_DEBUG_INFO_BTF=n definition so that this problem is unlikely to show up for some time. Link: https://github.com/ClangBuiltLinux/linux/issues/1810 Signed-off-by: Nathan Chancellor Reviewed-by: Tom Rix Link: https://lore.kernel.org/r/20230307-bpf-kfuncs-warray-bounds-v1-1-00ad3191f3a6@kernel.org Signed-off-by: Alexei Starovoitov commit 0e9b70c1e3623fa110fb6be553e644524228ef60 Author: Conor Dooley Date: Fri Sep 9 13:31:16 2022 +0100 riscv: dts: microchip: add mpfs specific macb reset support The macb on PolarFire SoC has reset support which the generic compatible does not use. Add the newly introduced MPFS specific compatible as the primary compatible to avail of this support & wire up the reset to the clock controllers devicetree entry. Reviewed-by: Daire McNamara Signed-off-by: Conor Dooley commit 20064c47f63e995216e0dfb0a6ea37b653ed534c Author: William Zhang Date: Mon Mar 6 17:20:04 2023 -0800 spi: Fix cocci warnings cocci reported warning: !A || A && B is equivalent to !A || B. This fix simplified the condition check to !A || B. Fixes: 76a85704cb91 ("spi: spi-mem: Allow controller supporting mem_ops without exec_op") Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303010051.HrHWSr9y-lkp@intel.com/ Signed-off-by: William Zhang Link: https://lore.kernel.org/r/20230307012004.414502-1-william.zhang@broadcom.com Signed-off-by: Mark Brown commit dc2eb79496322d5f4790d38776c487bf7aa69be3 Author: Md Sadre Alam Date: Mon Mar 6 20:14:04 2023 +0530 spi: qup: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Md Sadre Alam Link: https://lore.kernel.org/r/20230306144404.15517-1-quic_mdalam@quicinc.com Signed-off-by: Mark Brown commit 3169c5816a55ba671e9c8a671c6c75818d30c657 Author: Andy Shevchenko Date: Mon Mar 6 20:31:15 2023 +0200 spi: mpc5xxx-psc: Consistently use device property APIs Instead of calling the OF APIs mixed with device property APIs, just switch to use the latter everywhere. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230306183115.87314-6-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 289c084ddc1317e6ed911911f95371679c10af1e Author: Andy Shevchenko Date: Mon Mar 6 20:31:14 2023 +0200 spi: mpc5xxx-psc: Propagate firmware node Propagate firmware node by using a specific API call, i.e. device_set_node(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230306183115.87314-5-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 9e21720a49589304aef9e37e8b6c6a4196daf156 Author: Andy Shevchenko Date: Mon Mar 6 20:31:13 2023 +0200 spi: mpc5xxx-psc: use devm_clk_get_enabled() for core clock Use devm_clk_get_enabled() to simplify the code. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230306183115.87314-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 208ee586f86237969a91ac60ea10f48db9135143 Author: Andy Shevchenko Date: Mon Mar 6 20:31:12 2023 +0200 spi: mpc5xxx-psc: Return immediately if IRQ resource is unavailable Return immediately if IRQ resource is unavailable. This will also propagate the correct error code in such cases. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230306183115.87314-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit ee493fa5d91dec02402239a072820b18beb36265 Author: Andy Shevchenko Date: Mon Mar 6 20:31:11 2023 +0200 spi: mpc5xxx-psc: Correct error check for devm_platform_get_and_ioremap_resource() devm_platform_get_and_ioremap_resource() may return pointer or error pointer, never the NULL. Correct error check for it. Fixes: 60a6c8257f41 ("spi: mpc5xxx-psc: Use platform resources instead of parsing DT properties") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230306183115.87314-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 4eb6678ab53cac74e71fc5d4e6ff4035e5c847b6 Author: Geert Uytterhoeven Date: Tue Mar 7 12:23:42 2023 +0100 regulator: rt5739: Spelling s/Rcihtek/Richtek/ Fix a misspelling of "Richtek". Fixes: 4536f3b93a3373ca ("regulator: Add support for Richtek RT5739 voltage regulator") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/05f26d8e1e527f8b3fd2828f75ce2174e19c69e7.1678188171.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit db97cc0f7459a2bee68e6e8bf0b2f7a286137fa8 Author: Kai Vehmanen Date: Tue Mar 7 13:08:46 2023 +0200 ASoC: SOF: ipc4-mtrace: process pending logs upon FW crash If the DSP firmware has crashed, some log messages may be pending in the mtrace buffer, but not consumed by the driver as no IPC notification has been sent by the firmware. Check the buffer status for all mtrace slots and ensure any pending log messages are processed before DSP is possibly powered down and the log buffer contents is lost. Signed-off-by: Kai Vehmanen Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307110846.2265-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 3c50211f2d534a5b766b1ff3c6cf6f7bd0bae753 Author: Bard Liao Date: Tue Mar 7 13:08:30 2023 +0200 ASoC: SOF: ipc4-topology: don't allocate blob if it will not be used A copier blob will be only used when a copier is connected in the topology. An ALH copier in playback direction that doesn't have any source means the copier is not connected in the topology. Thus, we don't need to allocate the blob. The patch doesn't do the same test before freeing the blob because the blob is null and it is fine to free null. Signed-off-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307110830.2178-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 418d2b2fad7cdce5d39d0e2fdbe2460f584b5432 Author: Yong Zhi Date: Tue Mar 7 11:52:51 2023 +0200 ASoC: SOF: Intel: mtl: Access MTL_HFPWRCTL from HDA_DSP_BAR The Host Power Management/Clock Control (ULP) Registers in the HDA BAR shadow the values of the same registers in the DSP BAR, so let's modify the latter - as done already for other accesses. Signed-off-by: Yong Zhi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307095251.3058-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 1d045d77756d07495ce379343455b1f829fe737d Author: Pierre-Louis Bossart Date: Tue Mar 7 11:51:58 2023 +0200 ASoC: SOF: Intel: hda-loader: use SOF helper for consistency Update code to remove mix between legacy and SOF definitions. No functionality change. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307095158.2818-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 611fddf58862a9e77ae300605b2c00d54e973b1f Author: Curtis Malainey Date: Tue Mar 7 13:50:18 2023 +0200 ASoC: SOF: loader: Remove log prefixes for snd_sof_run_firmware Prefixs are unneeded since log level explains the same information Signed-off-by: Curtis Malainey Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307115018.5588-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 755ddc3acd50ca70e46b032c5c4a078e7b1b7d46 Author: Rander Wang Date: Tue Mar 7 14:35:56 2023 +0200 ASoC: SOF: ipc4-topology: add core token in each module extended token list Add core token in extended token list for each module to support multi-core feature. Signed-off-by: Rander Wang Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230307123556.31328-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 05ade472278a1a2fccc465ace205d6cfa9b521d5 Author: Peter Ujfalusi Date: Tue Mar 7 14:35:55 2023 +0200 ASoC: SOF: ipc4-topology: Add support for core_id for pipelines Token SOF_TKN_SCHED_CORE in topology file can specify the target core for the pipeline, if it is missing it is going to be 0 (as it is right now). Firmware will double-check all information retrieved by topology and report errors if required. This will allow policy and changes in topologies without a need for a synchronized kernel change. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20230307123556.31328-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 11f45690b3f6c6a2b5c57dbb036df3f838f7c016 Author: Peter Ujfalusi Date: Tue Mar 7 14:35:54 2023 +0200 ASoC: SOF: ipc4: Add macro to set the core_id in create_pipe message The create pipeline message can carry the target code_id which is set to 0 at the moment. Add macros to set the core_id in the message extension. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20230307123556.31328-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 6cf103bc03f8a915c8b5c8733a0e7404112f88d8 Author: Rasmus Villemoes Date: Thu Mar 2 08:21:31 2023 +0100 pinctrl: freescale: remove generic pin config core support No instance of "struct imx_pinctrl_soc_info" sets '.generic_pinconf = true', so all of this is effectively dead code. To make it easier to understand the actual code, remove all the unused cruft. This effectively reverts a5cadbbb081c ("pinctrl: imx: add generic pin config core support"). It was only in use by a single SOC (imx7ulp) for a few releases, and the commit message of dbffda08f0e9 ("pinctrl: fsl: imx7ulp: change to use imx legacy binding") suggests that it won't be used in the future. Certainly no new user has appeared in 20+ releases, and should the need arise, this can be dug out of git history again. Signed-off-by: Rasmus Villemoes Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/20230302072132.1051590-1-linux@rasmusvillemoes.dk Signed-off-by: Linus Walleij commit 5a8f9cf269e8e33b8381f6dafb034c6da49f8228 Author: Claudiu Beznea Date: Thu Mar 2 13:01:16 2023 +0200 pinctrl: at91-pio4: use proper format specifier for unsigned int Use %u instead of %d as line is unsigned int. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230302110116.342486-5-claudiu.beznea@microchip.com Signed-off-by: Linus Walleij commit f03fff55e676d475a023fb820466ed6b280005ee Author: Claudiu Beznea Date: Thu Mar 2 13:01:15 2023 +0200 pinctrl: at91-pio4: use dev_err_probe() Use dev_err_probe() to simplify the code. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230302110116.342486-4-claudiu.beznea@microchip.com Signed-off-by: Linus Walleij commit 1ffd07c619499f013aa087e0855c5bc7170dce97 Author: Claudiu Beznea Date: Thu Mar 2 13:01:14 2023 +0200 pinctrl: at91-pio4: use device_get_match_data() Use device_get_match_data() to simplify the code. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230302110116.342486-3-claudiu.beznea@microchip.com Signed-off-by: Linus Walleij commit 8d35039d762d879543dec68ac15398b26fd8c759 Author: Claudiu Beznea Date: Thu Mar 2 13:01:13 2023 +0200 pinctrl: at91-pio4: use devm_clk_get_enabled() Use devm_clk_get_enabled() to simplify the code. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230302110116.342486-2-claudiu.beznea@microchip.com Signed-off-by: Linus Walleij commit 9a318b8b069e38f1ebfe19afac1a2eac0c45ed32 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:32 2023 +0100 platform/x86: xo1-rfkill: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-30-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 0f16136b7acb20c0a6ade4328259d0db977d2ec1 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:31 2023 +0100 platform/x86: wmi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-29-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 143b3c1af5884ba0900d721f984245ca9897700d Author: Uwe Kleine-König Date: Thu Mar 2 15:47:30 2023 +0100 platform/x86: serial-multi-instantiate: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-28-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit df23e156a98800e0a379cb6fdc68425b453a2696 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:29 2023 +0100 platform/x86: samsung-q10: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-27-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 4222272a04c386743e37f951fd4fdf958ba7f4d6 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:28 2023 +0100 platform/x86: intel: vbtn: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-26-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 2d58b0092b7558fd944ff729dcd2fbe80b45629b Author: Uwe Kleine-König Date: Thu Mar 2 15:47:27 2023 +0100 platform/x86: intel: telemetry: pltdrv: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-25-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 1655db18b8dd387185dd4b491ce03b21176ab545 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:26 2023 +0100 platform/x86: intel: pmc: core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-24-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit ee12d8b43cf7e847af8b24988bcda7ae23265383 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:25 2023 +0100 platform/x86: intel: mrfld_pwrbtn: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-23-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 6ee08b4eba3d36d5cc2bf1594040de95ae12ee7d Author: Uwe Kleine-König Date: Thu Mar 2 15:47:24 2023 +0100 platform/x86: intel: int3472: discrete: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-22-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit e709455e9736b1cf15d2c6914e26d34d4ebbdcf3 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:23 2023 +0100 platform/x86: intel: int1092: intel_sar: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-21-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 445f79fdd43566695a97d2eb8b59419eecb12af4 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:22 2023 +0100 platform/x86: intel: int0002_vgpio: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-20-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 63b890167e7f697a5e22d83d59a2717535ffb50b Author: Uwe Kleine-König Date: Thu Mar 2 15:47:21 2023 +0100 platform/x86: intel: hid: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-19-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit fba53497e3c0572a2d621bbd98615c6e07a9e518 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:20 2023 +0100 platform/x86: intel: chtwc_int33fe: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-18-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit bca92922e2a7800adf9d965e409f7ecb74ce9494 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:19 2023 +0100 platform/x86: intel: chtdc_ti_pwrbtn: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-17-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit f9f23df7b640ff97b5a6f489f4ebfa9692d1e08e Author: Uwe Kleine-König Date: Thu Mar 2 15:47:18 2023 +0100 platform/x86: intel: bxtwc_tmu: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-16-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit d21c474c2312037a845805350b9fa614ab5dfab6 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:17 2023 +0100 platform/x86: ideapad-laptop: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-15-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 7836f70a03a0e9384632a8300b6625f4e164a99c Author: Uwe Kleine-König Date: Thu Mar 2 15:47:16 2023 +0100 platform/x86: huawei-wmi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-14-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit fbc0e1e6a700146d5246df5021e497c27b121aaf Author: Uwe Kleine-König Date: Thu Mar 2 15:47:15 2023 +0100 platform/x86: hp: tc1100-wmi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-13-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 3b5b3e9b00a626f5defee82241a2ab64d93f38a1 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:14 2023 +0100 platform/x86: hp: hp_accel: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-12-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit bb9d621f44069de18f102f57998277fdceb1133d Author: Uwe Kleine-König Date: Thu Mar 2 15:47:13 2023 +0100 platform/x86: dell: dell-smo8800: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Pali Rohár Link: https://lore.kernel.org/r/20230302144732.1903781-11-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 467daaf09496b96c8a8744615d481daeddd089c7 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:12 2023 +0100 platform/x86: dell: dcdbas: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-10-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit d1bda904933417209e0b8750d4fd3cf8b99fca1f Author: Uwe Kleine-König Date: Thu Mar 2 15:47:11 2023 +0100 platform/x86: compal-laptop: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-9-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit f4278cc8772fad93f292e3ce0722c57fc1eea6eb Author: Uwe Kleine-König Date: Thu Mar 2 15:47:10 2023 +0100 platform/x86: barco-p50-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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-8-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 03b5d07a9e2fcb56735a66f0fec109b47f8e82e9 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:09 2023 +0100 platform/x86: amilo-rfkill: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-7-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit b444276b12e7da2069ea111116bccc21d864484e Author: Uwe Kleine-König Date: Thu Mar 2 15:47:08 2023 +0100 platform/x86: amd: pmf: core: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-6-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 3359d99e7a4c1258804ba966ab62f6bc0b45ba78 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:07 2023 +0100 platform/x86: amd: pmc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-5-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 5454b36274fd63e40935975fbd13f4abbb5c5270 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:06 2023 +0100 platform/x86: amd: hsmp: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-4-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit db0664d1afe0600b07c1754fcc6bd300d8482071 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:05 2023 +0100 platform/x86: adv_swbutton: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-3-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 96c59f596ebe7d5f5a03f17a16a15e19f22cf666 Author: Uwe Kleine-König Date: Thu Mar 2 15:47:04 2023 +0100 platform/x86: acer-wmi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230302144732.1903781-2-u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 5f250f8a77c4d30da52ee4184b770e327fbe76e2 Author: Hans de Goede Date: Tue Feb 28 09:35:03 2023 +0100 platform/x86: x86-android-tablets: Lenovo Yoga Book match is for YB1-X91 models only When support for instantiating an i2c-client for the fuel-gauge was added for the Windows based Yoga Book YB1-X91F/L models, the assumption was made that this would apply to the Android based YB1-X90F/L models too. But these have a completely different BIOS with completely different DMI strings. Update the existing YB1-X91 support to reflect that it only applies to the YB1-X91F/L models. Cc: Yauhen Kharuzhy Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230301092331.7038-15-hdegoede@redhat.com commit dadbc368f4f26f59debe49e1cdf44883e8799fd2 Author: Hans de Goede Date: Sat Feb 25 17:11:04 2023 +0100 platform/x86: x86-android-tablets: Add LID switch support for Yoga Tablet 2 1050/830 series The Yoga Tablet 2 1050/830 series have a HALL sensor for detecting when their (optional) case/cover is closed over the screen. Their Windows counterparts (alsmost the same HW, different BIOS) model this as a LID switch. Add support for reporting this as a LID switch on the Android models too. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230301092331.7038-14-hdegoede@redhat.com commit 607fbac0fccba506b4f9e47994504121db776956 Author: Hans de Goede Date: Wed Feb 22 22:42:26 2023 +0100 platform/x86: x86-android-tablets: Add backlight ctrl for Lenovo Yoga Tab 3 Pro YT3-X90F The YT3 uses an TI LP8557 LED backlight controller, the LP8557's PWM input is connected to a PWM output coming from the LCD panel's controller. The Android kernel has a hack in the i915 driver to write the non-standard DSI reg 0x51 with the desired level to set the duty-cycle of the LCD's PWM. To avoid having to have a similar hack in the mainline kernel program instantiate an i2c-client for the LP8557 with platform-data to have the LP8557 to directly set the level (ignoring its PWM input), this allows backlight brightness control through a backlight device registered by the lp855x_bl driver. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230301092331.7038-13-hdegoede@redhat.com commit 9b1d2662b8c586eb10cb939c7ae2c25bb36d2b61 Author: Hans de Goede Date: Tue Feb 21 22:52:58 2023 +0100 platform/x86: x86-android-tablets: Add touchscreen support for Lenovo Yoga Tab 3 Pro YT3-X90F Add the necessary info to instantiate the I2C device for the touchscreen on Lenovo Yoga Tab 3 Pro YT3-X90F tablets. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230301092331.7038-12-hdegoede@redhat.com commit 772cbba5a877eb7c528f3659415373c40e48a057 Author: Hans de Goede Date: Mon Feb 20 21:26:42 2023 +0100 platform/x86: x86-android-tablets: Add support for the Dolby button on Peaq C1010 The Peaq C1010 tablet has a special "Dolby" button. This button has a WMI interface, but this is broken in several ways: 1. It only supports polling 2. The value read on polling goes from 0 -> 1 for one poll on both edges of the button, with no way to tell which edge causes the poll to return 1. 3. It uses a non unique GUID (it uses the Microsoft docs WMI example GUID). There currently is a WMI driver for this, but it uses several kludges to work around these issues and is not entirely reliable due to 2. Replace the unreliable WMI driver by using the x86-android-tablets code to instantiate a gpio_keys device for this. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230301092331.7038-11-hdegoede@redhat.com commit e2200d3f26dac108a519f014fb42a0a034105394 Author: Hans de Goede Date: Sun Feb 19 22:50:19 2023 +0100 platform/x86: x86-android-tablets: Add gpio_keys support to x86_android_tablet_init() Add gpio_keys instantation support to x86_android_tablet_init(), to avoid this having to be repeated in various x86_dev_info.init() functions. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230301092331.7038-10-hdegoede@redhat.com commit cc183ad4590bef3831c0688ccfa386c595adc428 Author: Hans de Goede Date: Sun Feb 19 21:36:23 2023 +0100 platform/x86: x86-android-tablets: Move remaining tablets to other.c All that remains now in x86-android-tablets-main.c is info for other (non Asus / Lenovo) tablets. Rename it to other.c to reflect this. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230301092331.7038-9-hdegoede@redhat.com commit 7bf974f695f1a978097a3b43ac26afd46eba626d Author: Hans de Goede Date: Sun Feb 19 21:15:24 2023 +0100 platform/x86: x86-android-tablets: Move Lenovo tablets to their own file Move the info for the Lenovo tablets to their own lenovo.c file. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230301092331.7038-8-hdegoede@redhat.com commit 97abac9c8b893822255c7847823bb65b6c7efb6a Author: Hans de Goede Date: Sun Feb 19 20:22:39 2023 +0100 platform/x86: x86-android-tablets: Move Asus tablets to their own file Move the info for the Asus tablets to their own asus.c file. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230301092331.7038-7-hdegoede@redhat.com commit 4ed14c23e1e82fbfb06cb37b9197ca56bbdf39f3 Author: Hans de Goede Date: Sun Feb 19 20:20:45 2023 +0100 platform/x86: x86-android-tablets: Move shared power-supply fw-nodes to a separate file Move the shared power-supply fw-nodes and related files to a new separate shared-psy-info.c file. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230301092331.7038-6-hdegoede@redhat.com commit 3a75d1690b9adb116ca4d11578ff2fa358823382 Author: Hans de Goede Date: Sun Feb 19 17:43:03 2023 +0100 platform/x86: x86-android-tablets: Move DMI match table into its own dmi.c file In order to have a single MODULE_DEVICE_TABLE(dmi, ...), while allowing splitting the board descriptions into multiple files, add a new separate file for the DMI match table. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230301092331.7038-5-hdegoede@redhat.com commit 62a5f689a068951de5ed8487ec7f0de52245bd92 Author: Hans de Goede Date: Sun Feb 19 17:32:42 2023 +0100 platform/x86: x86-android-tablets: Move core code into new core.c file Move the helpers to get IRQs + GPIOs as well as the core code for instantiating all the devices missing from ACPI into a new core.c file. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230301092331.7038-4-hdegoede@redhat.com commit afdcb5353f06cf5ddee3999f7e6353e889a50edc Author: Hans de Goede Date: Sun Feb 19 17:06:14 2023 +0100 platform/x86: x86-android-tablets: Move into its own subdir Move the x86-android-tablets code into its own subdir, this is a preparation patch for splitting the somewhat large file into multiple smaller files. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230301092331.7038-3-hdegoede@redhat.com commit 2f0cf1e85ddb5ae17284050dc1adafb89e4f1d8f Author: Hans de Goede Date: Mon Feb 13 21:35:53 2023 +0100 platform/x86: x86-android-tablets: Add Acer Iconia One 7 B1-750 data The Acer Iconia One 7 B1-750 is a x86 ACPI tablet which ships with Android x86 as factory OS. Its DSDT contains a bunch of I2C devices which are not actually there, causing various resource conflicts. Enumeration of these is skipped through the acpi_quirk_skip_i2c_client_enumeration(). Add support for manually instantiating the I2C + other devices which are actually present on this tablet by adding the necessary device info to the x86-android-tablets module. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230301092331.7038-2-hdegoede@redhat.com commit 0e8ae77c869ed425488e3db43dbb76ec9bca8655 Author: Srinivas Pandruvada Date: Fri Feb 10 22:32:49 2023 -0800 platform/x86: ISST: Add API version of the target User space can get the API version using IOCTL ISST_IF_GET_PLATFORM_INFO. This information can be used to get IOCTLs supported by the kernel driver. This version is hardcoded in the driver. Allow the registered client to specify the supported API version. In this way a registered client can specify a higher API version to extend IOCTL set. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20230211063257.311746-5-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede Reviewed-by: Hans de Goede commit 33c16dc1a2d1697be0fec95a0393bef4fbc27a0f Author: Srinivas Pandruvada Date: Fri Feb 10 22:32:48 2023 -0800 platform/x86: ISST: Add IOCTL default callback The common IOCTL handler has a predefined list of IOCTLs it can handle. There is no default handler, if there is no match. Allow a client driver to define their own version of default IOCTL callback. In this way the default handling is passed to the client drivers to handle. With the introduction of TPMI target, IOCTL list is extended. The additional TPMI specific IOCTLs will be passed to the TPMI client driver default IOCTL handler. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20230211063257.311746-4-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede Reviewed-by: Hans de Goede commit 6614823a16b700b7d996e75b1200b29bec88f8ef Author: Srinivas Pandruvada Date: Fri Feb 10 22:32:47 2023 -0800 platform/x86: ISST: Add TPMI target Add TPMI as one of the device type which can be registered with ISST common driver. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20230211063257.311746-3-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede Reviewed-by: Hans de Goede commit 933bf364e152cd60902cf9585c2ba310d593e69f Author: Quentin Schulz Date: Thu Nov 17 13:04:31 2022 +0100 clk: rockchip: rk3399: allow clk_cifout to force clk_cifout_src to reparent clk_cifout is derived from clk_cifout_src through an integer divider limited to 32. clk_cifout_src is a child of either cpll, gpll or npll without any possibility of a divider of any sort. The default clock parent is cpll. Let's allow clk_cifout to ask its parent clk_cifout_src to reparent in order to find the real closest possible rate for clk_cifout and not one derived from cpll only. Cc: stable@vger.kernel.org # 4.10+ Fixes: fd8bc829336a ("clk: rockchip: fix the rk3399 cifout clock") Signed-off-by: Quentin Schulz Link: https://lore.kernel.org/r/20221117-rk3399-cifout-set-rate-parent-v1-0-432548d04081@theobroma-systems.com Signed-off-by: Heiko Stuebner commit 6933486133ecf71bbe273d7ac72cfc4a51286af3 Author: Veerendranath Jakkam Date: Thu Jan 12 06:54:13 2023 +0530 wifi: nl80211: Add support for randomizing TA of auth and deauth frames Add support to use a random local address in authentication and deauthentication frames sent to unassociated peer when the driver supports. The driver needs to configure receive behavior to accept frames with random transmit address specified in TX path authentication frames during the time of the frame exchange is pending and such frames need to be acknowledged similarly to frames sent to the local permanent address when this random address functionality is used. This capability allows use of randomized transmit address for PASN authentication frames to improve privacy of WLAN clients. Signed-off-by: Veerendranath Jakkam Link: https://lore.kernel.org/r/20230112012415.167556-2-quic_vjakkam@quicinc.com Signed-off-by: Johannes Berg commit 59585c79f87794c92f040c264b274e86d8522e22 Author: Jiapeng Chong Date: Wed Feb 8 10:34:29 2023 +0800 drm/rockchip: dsi: Remove the unused function dsi_read() The function dsi_read is defined in the dw-mipi-dsi-rockchip.c file, but not called elsewhere, so remove this unused function. drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c:362:19: warning: unused function 'dsi_read'. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3984 Signed-off-by: Jiapeng Chong Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20230208023429.73696-1-jiapeng.chong@linux.alibaba.com commit 2ad7dd9425408bf0ca524102808059c05bad169e Author: Ryder Lee Date: Sat Feb 18 01:49:25 2023 +0800 wifi: mac80211: add LDPC related flags in ieee80211_bss_conf This is utilized to pass LDPC configurations from user space (i.e. hostapd) to driver. Signed-off-by: Ryder Lee Link: https://lore.kernel.org/r/1de696aaa34efd77a926eb657b8c0fda05aaa177.1676628065.git.ryder.lee@mediatek.com Signed-off-by: Johannes Berg commit f4d1181e4759c9c6c97c86cda2cf2d1ddb6a74d2 Author: Ryder Lee Date: Sat Feb 18 01:48:59 2023 +0800 wifi: mac80211: add EHT MU-MIMO related flags in ieee80211_bss_conf Similar to VHT/HE. This is utilized to pass MU-MIMO configurations from user space (i.e. hostapd) to driver. Signed-off-by: Ryder Lee Link: https://lore.kernel.org/r/8d9966c4c1e77cb1ade77d42bdc49905609192e9.1676628065.git.ryder.lee@mediatek.com [move into combined if statement, reset on !eht] Signed-off-by: Johannes Berg commit 5383bfff5261422f843de72a4089da9b152291b0 Author: Ryder Lee Date: Sat Feb 18 01:50:05 2023 +0800 wifi: mac80211: introduce ieee80211_refresh_tx_agg_session_timer() This allows low level drivers to refresh the tx agg session timer, based on querying stats from the firmware usually. Especially for some mt76 devices support .net_fill_forward_path would bypass mac80211, which leads to tx BA session timeout clients that set a timeout in their AddBA response to our request, even if our request is without a timeout. Signed-off-by: Ryder Lee Link: https://lore.kernel.org/r/7c3f72eac1c34921cd84a462e60d71e125862152.1676616450.git.ryder.lee@mediatek.com [slightly clarify commit message, add note about RCU] Signed-off-by: Johannes Berg commit 9179dff82598ab8b4e88dcc93c9e26a2594efd1a Author: Mordechay Goodstein Date: Wed Mar 1 12:09:35 2023 +0200 wifi: mac80211: add support for driver adding radiotap TLVs The new TLV format enables adding TLVs after the fixed fields in radiotap, as part of the radiotap header. Support this and move vendor data to the TLV format, allowing a reuse of the RX_FLAG_RADIOTAP_VENDOR_DATA as the new RX_FLAG_RADIOTAP_TLV_AT_END flag. Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.b18fd5da8477.I576400ec40a7b35ef97a3b09a99b3a49e9174786@changeid Signed-off-by: Johannes Berg commit 18cbf7c089ba70fefe1b4c01af28753cabfbf38f Author: Mordechay Goodstein Date: Wed Mar 1 12:09:34 2023 +0200 wifi: radiotap: Add EHT radiotap definitions This is based on https://www.radiotap.org/fields/EHT.html and https://www.radiotap.org/fields/U-SIG.html new EHT TLV definition for 11be standard. Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.254b19fffe41.I4ce78e2c558da6e5a708a8d68d61b5d7b3eb3746@changeid Signed-off-by: Johannes Berg commit e820373a4fd06ebb6ed0331e97693048cfd16652 Author: Johannes Berg Date: Wed Mar 1 12:09:32 2023 +0200 wifi: mac80211: fix ieee80211_link_set_associated() type The return type here should be u64 for the flags, even if it doesn't matter right now because it doesn't return any flags that don't fit into u32. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.d67ccae57d60.Ia4768e547ba8b1deb2b84ce3bbfbe216d5bfff6a@changeid Signed-off-by: Johannes Berg commit e8edb34640eeeefc74a3d767b61b4d4ac3b94eea Author: Johannes Berg Date: Wed Mar 1 12:09:31 2023 +0200 wifi: mac80211: simplify reasoning about EHT capa handling Given the code in cfg80211, EHT capa cannot be non-NULL when HE capa is NULL, but it's easier to reason about it if both are checked and the compiler will likely integrate the check with the previous one for HE capa anyway. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.7413d50d23bc.I6fef7484721be9bd5364f64921fc5e9168495f62@changeid Signed-off-by: Johannes Berg commit 15f9b3ef5190bacc8a39628bc57c6da085877ffe Author: Johannes Berg Date: Wed Mar 1 12:09:30 2023 +0200 wifi: mac80211: mlme: remove pointless sta check We already exited the function if sta ended up NULL, so just remove the extra check. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.4cbac9cfd03a.I21ec81c96d246afdabc2b0807d3856e6b1182cb7@changeid Signed-off-by: Johannes Berg commit 5cf10940a47985260ebbdc4665a8081c6b575e17 Author: Ilan Peer Date: Wed Mar 1 12:09:28 2023 +0200 wifi: mac80211_hwsim: Indicate support for NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT mac80211_hwsim always uses the probe request coming from mac80211, which has support for minimal probe request content. Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.67d31166ffd1.I908b68c5127525da3388c0d61a3d5d221ba451f6@changeid Signed-off-by: Johannes Berg commit 170cd6a66d9a164180eb4dc72d50afa6ce1ce566 Author: Benjamin Berg Date: Wed Mar 1 12:09:27 2023 +0200 wifi: mac80211: add netdev per-link debugfs data and driver hook This adds the infrastructure to have netdev specific per-link data both for mac80211 and the driver in debugfs. For the driver, a new callback is added which is only used if MLO is supported. Signed-off-by: Benjamin Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.fb4c947e4df8.I69b3516ddf4c8a7501b395f652d6063444ecad63@changeid Signed-off-by: Johannes Berg commit 586100ad85fed0041e203d6006d45e0ec4c5a0b4 Author: Benjamin Berg Date: Wed Mar 1 12:09:26 2023 +0200 wifi: mac80211: remove SMPS from AP debugfs The spatial multiplexing power save feature does not apply to AP mode. Remove it from debugfs in this case. Signed-off-by: Benjamin Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.01b167027dd5.Iee69f2e4df98581f259ef2c76309b940b20174be@changeid Signed-off-by: Johannes Berg commit e1f113cc67870375eae0c7b84c2a40cc6388d903 Author: Benjamin Berg Date: Wed Mar 1 12:09:25 2023 +0200 wifi: mac80211: add pointer from bss_conf to vif While often not needed, this considerably simplifies going from a link specific bss_config to the vif. This helps with e.g. creating link specific debugfs entries inside drivers. Signed-off-by: Benjamin Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.46f701a10ed5.I20390b2a8165ff222d66585915689206ea93222b@changeid Signed-off-by: Johannes Berg commit a1e91ef92392e5da15a1a16f8545ede2c02f7049 Author: Johannes Berg Date: Wed Mar 1 12:09:24 2023 +0200 wifi: mac80211: warn only once on AP probe We should perhaps support this API for MLO, but it's not clear that it makes sense, in any case then we'd have to update it to probe the correct BSS. For now, if it happens, warn only once so that we don't get flooded with messages if the driver misbehaves and calls this. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.1c8499b6fbe6.I1a76a2be3b42ff93904870ac069f0319507adc23@changeid Signed-off-by: Johannes Berg commit 4c532321bf90288dae6b07a3f52279bfde842a80 Author: Johannes Berg Date: Wed Mar 1 12:09:23 2023 +0200 wifi: cfg80211/mac80211: report link ID on control port RX For control port RX, report the link ID for MLO. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.fe06dfc3791b.Iddcab94789cafe336417be406072ce8a6312fc2d@changeid Signed-off-by: Johannes Berg commit 81202305f7c282c356c337dded8472d884acd94b Author: Avraham Stern Date: Wed Mar 1 12:09:22 2023 +0200 wifi: mac80211: add support for set_hw_timestamp command Support the set_hw_timestamp callback for enabling and disabling HW timestamping if the low level driver supports it. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.700ded7badde.Ib2f7c228256ce313a04d3d9f9ecc6c7b9aa602bb@changeid Signed-off-by: Johannes Berg commit cbbaf2bb829b6c4ef911d4a725fc9b1fadc1e43f Author: Avraham Stern Date: Wed Mar 1 12:09:21 2023 +0200 wifi: nl80211: add a command to enable/disable HW timestamping Add a command to enable and disable HW timestamping of TM and FTM frames. HW timestamping can be enabled for a specific mac address or for all addresses. The low level driver will indicate how many peers HW timestamping can be enabled concurrently, and this information will be passed to userspace. Signed-off-by: Avraham Stern Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.05678d7b1c17.Iccc08869ea8156f1c71a3111a47f86dd56234bd0@changeid [switch to needing netdev UP, minor edits] Signed-off-by: Johannes Berg commit 6ff9efcfc2dc256480b252321818e0111b9399a2 Author: Mordechay Goodstein Date: Wed Mar 1 12:09:20 2023 +0200 wifi: wireless: cleanup unused function parameters In the past ftype was used for deciding about 6G DUP beacon, but the logic was removed and ftype is not needed anymore. Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.98d4761b809b.I255f5ecd77cb24fcf2f1641bb5833ea2d121296e@changeid Signed-off-by: Johannes Berg commit fb4b441c5d764813370e381310d9f82b38e7cd3f Author: Mordechay Goodstein Date: Wed Mar 1 12:09:19 2023 +0200 wifi: wireless: correct primary channel validation on 6 GHz The check that beacon primary channel is in the range of 80 MHz (abs < 80) is invalid for 320 MHz since duplicate beacon transmit means that the AP transmits it on all the 20 MHz sub-channels: 9.4.2.249 HE Operation element - ... AP transmits Beacon frames in non-HT duplicate PPDU with a TXVECTOR parameter CH_BANDWIDTH value that is up to the BSS bandwidth. So in case of 320 MHz the DUP beacon can be in upper 160 for primary channel in the lower 160 giving possibly an absolute range of over 80 MHz. Also this check is redundant alltogether, if AP has a wrong primary channel in the beacon it's a faulty AP, and we would fail in next steps to connect. While at it, fix the frequency comparison to no longer compare between KHz and MHz, which was introduced by commit 7f599aeccbd2 ("cfg80211: Use the HE operation IE to determine a 6GHz BSS channel"). Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.314faf725255.I5e27251ac558297553b590d3917a7b6d1aae0e74@changeid Signed-off-by: Johannes Berg commit 724a486cd24581928f4a82619806939119304645 Author: Mordechay Goodstein Date: Wed Mar 1 12:09:18 2023 +0200 wifi: wireless: return primary channel regardless of DUP Currently in case DUP bit is not set we don't return the primary channel for 6 GHz Band, but the spec says that the DUP bit has no effect on this field: 9.4.2.249 HE Operation element: The Duplicate Beacon subfield is set to 1 if the AP transmits Beacon frames in non-HT duplicate PPDU with a TXVECTOR parameter CH_BANDWIDTH value that is up to the BSS bandwidth and is set to 0 otherwise. So remove the condition for returning primary channel based on DUP. Since the caller code already marks the signal as invalid in case the indicated frequency is not the tuned frequency, there's no need to additionally handle this case here since that's already true for duplicated beacons on the non-primary channel(s). Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.66d7f05f7d11.I5e0add054f72ede95611391b99804c61c40cc959@changeid [clarify commit message] Signed-off-by: Johannes Berg commit d1b9bb6520fe0c295128229f5d3a9298127d5c8a Author: Johannes Berg Date: Wed Mar 1 12:09:17 2023 +0200 wifi: mac80211: allow beacon protection HW offload In case of beacon protection, check if the key was offloaded to the hardware and in that case set control.hw_key so that the encryption function will see it and only do the needed steps that aren't done in hardware. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.b2becd9a22fb.I6c0b9c50c6a481128ba912a11cb7afc92c4b6da7@changeid Signed-off-by: Johannes Berg commit 3ffcc659dc6fa84da7db57f56fd48756c5a60fba Author: Johannes Berg Date: Wed Mar 1 12:09:16 2023 +0200 wifi: mac80211: check key taint for beacon protection This will likely never happen, but for completeness check the key taint flag before using a key for beacon protection. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.cf2c3fee6f1f.I2f19b3e04e31c99bed3c9dc71935bf513b2cd177@changeid Signed-off-by: Johannes Berg commit 3a867c7eef812ad4684dccd8825f1099a60b8c98 Author: Mordechay Goodstein Date: Wed Mar 1 12:09:15 2023 +0200 wifi: mac80211: clear all bits that relate rtap fields on skb Since we remove radiotap from skb data, clear all RX_FLAG_X related info that indicate info on the skb data. Also we need to do it only once so remove the clear from cooked_monitor. Signed-off-by: Mordechay Goodstein Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.74d3efe19eae.Ie17a35864d2e120f9858516a2e3d3047d83cf805@changeid Signed-off-by: Johannes Berg commit 0fd3af61731567dc0ad798c88c20f6d63fe331ea Author: Johannes Berg Date: Wed Mar 1 12:09:14 2023 +0200 wifi: mac80211: adjust scan cancel comment/check Instead of the comment about holding RTNL, which is now wrong, add a proper lockdep assertion for the wiphy mutex. Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.84352e46f342.Id90fef8c581cebe19cb30274340cf43885d55c74@changeid Signed-off-by: Johannes Berg commit d509c55cda22096a1836e35b03f66e1ef411c0c2 Author: Ilan Peer Date: Wed Mar 1 12:09:13 2023 +0200 wifi: nl80211: Update the documentation of NL80211_SCAN_FLAG_COLOCATED_6GHZ Add a detailed description of NL80211_SCAN_FLAG_COLOCATED_6GHZ flag. Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.487ab04feb39.I5129fd61841332474693046241586f057b134c3c@changeid Signed-off-by: Johannes Berg commit 42bf4597b7da8d9e3bc6039260e5437902af925a Author: Md Sadre Alam Date: Mon Mar 6 20:18:10 2023 +0530 mtd: rawnand: Fix spelling mistake waifunc() -> waitfunc() There is a spelling mistake in a chip->legacy.waifunc(). Fix it. Signed-off-by: Md Sadre Alam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230306144810.22078-1-quic_mdalam@quicinc.com commit bcf09d7e2ff435a5d587760170728c11773a4362 Author: Md Sadre Alam Date: Mon Mar 6 20:11:41 2023 +0530 mtd: nand: raw: qcom_nandc: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Md Sadre Alam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230306144141.15360-1-quic_mdalam@quicinc.com commit 22fd6153c16a40d123d8c9936967d0a59e417129 Author: Greg Kroah-Hartman Date: Tue Mar 7 08:51:02 2023 +0100 driver core: class: fix block class problem when removing CONFIG_SYSFS_DEPRECATED* In removing the CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2 config options, I messed up in the __class_register() function and got the logic incorrect. Fix this all up by just removing the special case of a block device class logic in this function, as that is what is intended. In testing, this solves the boot problem on my systems, hopefully on others as well. Cc: "Rafael J. Wysocki" Reported-by: Stephen Rothwell Fixes: 721da5cee9d4 ("driver core: remove CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2") Link: https://lore.kernel.org/r/20230307075102.3537-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 0262f2736978b1763363224698f47112a148dab0 Author: Neil Armstrong Date: Mon Mar 6 09:31:39 2023 +0100 arm64: dts: amlogic: Add initial support for BPI-CM4 module with BPI-CM4IO baseboard Add support for both the BananaPi BPI-CM4 module and the BananaPi baseboard which is compatible with the RaspberryPi CM4IO baseboard. The BananaPi BPI-CM4 module follows the CM4 specifications at [1], but with a single HDMI port and a single DSI output. The current CM4IO baseboard DT should work fine on the Raspberry CM4 baseboard and other derivatives baseboards, but proper DT should be written for other baseboards. The split is done so it's easy to describe a new CM4 baseboard, enabling only the necessary HW used on the baseboard. [1] https://datasheets.raspberrypi.com/cm4io/cm4io-datasheet.pdf Tested-by: Christian Hewitt Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230303-topic-amlogic-upstream-bpi-cm4-v2-2-2ecfde76fc4d@linaro.org [narmstrong: fixed typos in commit message] Signed-off-by: Neil Armstrong commit 92c0b261c294f12e329976a6d4ef72651e8f07f2 Author: Neil Armstrong Date: Mon Mar 6 09:31:38 2023 +0100 dt-bindings: arm: amlogic: Document the boards with the BPI-CM4 connected The BPI-CM4 module with an Amlogic A311D SoC is a module compatible with the Raspberry Pi CM4 specifications. Document the boards using this module, by specifying the BananaPi CM4 compatible in addition to the baseboard compatible. Acked-by: Krzysztof Kozlowski Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230303-topic-amlogic-upstream-bpi-cm4-v2-1-2ecfde76fc4d@linaro.org Signed-off-by: Neil Armstrong commit c2e9012bb383f538186cf11d00d223d025d10c8d Author: Jerome Brunet Date: Mon Mar 6 16:13:54 2023 +0100 arm64: dts: amlogic: gxl: use gxl mdio multiplexer So the far, GXL SoCs were using the generic mmio register based mdio multiplexer. This properly sets one of the glue register but the SoC actually has 3 of those registers. One of them sets the ID under which the internal phy will advertise itself. If nothing sets this register before linux boots (like u-boot), the internal phy path is broken. To address this problem, a dedicated MDIO mux driver has been introduced. Switch to this new driver. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20230306151354.132973-1-jbrunet@baylibre.com Signed-off-by: Neil Armstrong commit ea254644a228c90887a38de9637c414f7439bf66 Author: Alexey Romanov Date: Thu Feb 2 17:15:20 2023 +0300 arm64: dts: meson-a1: add gpio_intc node Add gpio interrupt controller node. Signed-off-by: Alexey Romanov Reviewed-by: Neil Armstrong Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230202141520.40003-1-avromanov@sberdevices.ru Signed-off-by: Neil Armstrong commit f05dc20243163d0218bbb258b6461681865cff5c Author: Sam Protsenko Date: Mon Mar 6 18:24:23 2023 -0600 clk: samsung: exynos5433: Extract PM support to common ARM64 layer Exynos5433 clock driver implements PM support internally, which might be also useful for other Exynos clock drivers. Extract all PM related code from clk-exynos5433 to common ARM64 functions. Tested-by: Marek Szyprowski Signed-off-by: Sam Protsenko Link: https://lore.kernel.org/r/20230307002423.24454-4-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit 454e8d296ce4267ca1728bf4f6fe6d41eabe080e Author: Sam Protsenko Date: Mon Mar 6 18:24:22 2023 -0600 clk: samsung: Extract parent clock enabling to common function Extract parent clock enabling from exynos_arm64_register_cmu() to dedicated function. Tested-by: Marek Szyprowski Signed-off-by: Sam Protsenko Link: https://lore.kernel.org/r/20230307002423.24454-3-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit bed76f697a9adda26c40ce4a064f371d54e71331 Author: Sam Protsenko Date: Mon Mar 6 18:24:21 2023 -0600 clk: samsung: Extract clocks registration to common function It might be useful to have a separate clocks registration function, so it can be called from different users. Extract that common code from samsung_cmu_register_one() to samsung_cmu_register_clocks(). Also make that new function global as it's going to be used in other modules further. Tested-by: Marek Szyprowski Signed-off-by: Sam Protsenko Link: https://lore.kernel.org/r/20230307002423.24454-2-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit 36e5e391a25af28dc1f4586f95d577b38ff4ed72 Merge: 5ca26d6039a6b 8f4c92f0024ff Author: Jakub Kicinski Date: Mon Mar 6 20:36:39 2023 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2023-03-06 We've added 85 non-merge commits during the last 13 day(s) which contain a total of 131 files changed, 7102 insertions(+), 1792 deletions(-). The main changes are: 1) Add skb and XDP typed dynptrs which allow BPF programs for more ergonomic and less brittle iteration through data and variable-sized accesses, from Joanne Koong. 2) Bigger batch of BPF verifier improvements to prepare for upcoming BPF open-coded iterators allowing for less restrictive looping capabilities, from Andrii Nakryiko. 3) Rework RCU enforcement in the verifier, add kptr_rcu and enforce BPF programs to NULL-check before passing such pointers into kfunc, from Alexei Starovoitov. 4) Add support for kptrs in percpu hashmaps, percpu LRU hashmaps and in local storage maps, from Kumar Kartikeya Dwivedi. 5) Add BPF verifier support for ST instructions in convert_ctx_access() which will help new -mcpu=v4 clang flag to start emitting them, from Eduard Zingerman. 6) Make uprobe attachment Android APK aware by supporting attachment to functions inside ELF objects contained in APKs via function names, from Daniel Müller. 7) Add a new flag BPF_F_TIMER_ABS flag for bpf_timer_start() helper to start the timer with absolute expiration value instead of relative one, from Tero Kristo. 8) Add a new kfunc bpf_cgroup_from_id() to look up cgroups via id, from Tejun Heo. 9) Extend libbpf to support users manually attaching kprobes/uprobes in the legacy/perf/link mode, from Menglong Dong. 10) Implement workarounds in the mips BPF JIT for DADDI/R4000, from Jiaxun Yang. 11) Enable mixing bpf2bpf and tailcalls for the loongarch BPF JIT, from Hengqi Chen. 12) Extend BPF instruction set doc with describing the encoding of BPF instructions in terms of how bytes are stored under big/little endian, from Jose E. Marchesi. 13) Follow-up to enable kfunc support for riscv BPF JIT, from Pu Lehui. 14) Fix bpf_xdp_query() backwards compatibility on old kernels, from Yonghong Song. 15) Fix BPF selftest cross compilation with CLANG_CROSS_FLAGS, from Florent Revest. 16) Improve bpf_cpumask_ma to only allocate one bpf_mem_cache, from Hou Tao. 17) Fix BPF verifier's check_subprogs to not unnecessarily mark a subprogram with has_tail_call, from Ilya Leoshkevich. 18) Fix arm syscall regs spec in libbpf's bpf_tracing.h, from Puranjay Mohan. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (85 commits) selftests/bpf: Add test for legacy/perf kprobe/uprobe attach mode selftests/bpf: Split test_attach_probe into multi subtests libbpf: Add support to set kprobe/uprobe attach mode tools/resolve_btfids: Add /libsubcmd to .gitignore bpf: add support for fixed-size memory pointer returns for kfuncs bpf: generalize dynptr_get_spi to be usable for iters bpf: mark PTR_TO_MEM as non-null register type bpf: move kfunc_call_arg_meta higher in the file bpf: ensure that r0 is marked scratched after any function call bpf: fix visit_insn()'s detection of BPF_FUNC_timer_set_callback helper bpf: clean up visit_insn()'s instruction processing selftests/bpf: adjust log_fixup's buffer size for proper truncation bpf: honor env->test_state_freq flag in is_state_visited() selftests/bpf: enhance align selftest's expected log matching bpf: improve regsafe() checks for PTR_TO_{MEM,BUF,TP_BUFFER} bpf: improve stack slot state printing selftests/bpf: Disassembler tests for verifier.c:convert_ctx_access() selftests/bpf: test if pointer type is tracked for BPF_ST_MEM bpf: allow ctx writes using BPF_ST_MEM instruction bpf: Use separate RCU callbacks for freeing selem ... ==================== Link: https://lore.kernel.org/r/20230307004346.27578-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit c083131c9021ef40c655894f6130a1393bb8e2b2 Author: Marcel Ziswiler Date: Wed Feb 8 07:56:41 2023 +0100 arm64: dts: freescale: add apalis imx8 aka quadmax carrier board support The previous patch added the device tree to support Toradex Apalis iMX8 [1] aka QuadMax a computer on module which can be used on different carrier boards which this patch introduces. The module consists of an NXP i.MX 8 family SoC (either i.MX 8QuadMax or 8QuadPlus), two PF8100 PMICs, a KSZ9131 Gigabit Ethernet PHY, 2, 4 or 8 GB of LPDDR4 RAM, an eMMC, an SGTL5000 analogue audio codec, an USB3503A USB HSIC hub, an optional I2C EEPROM plus an optional Bluetooth/Wi-Fi module. Anything that is not self-contained on the module is disabled by default. The carrier board device trees contained in this patch include the module's device tree and enable the supported peripherals of the carrier board. Some level of display functionality just landed upstream but requires further integration/testing on our side. Therefore, currently only basic console UART, eMMC and Ethernet functionality work fine. As there is no i.MX 8QuadPlus device tree upstream those have been dropped. However, apart from an error message during boot about it failing to bring up the second Cortex-A72 core this boots fine on QuadPlus' as well. [1] https://www.toradex.com/computer-on-modules/apalis-arm-family/nxp-imx-8 Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit ad0de4ceb706f140329f4dd310282e6fa2a1937a Author: Marcel Ziswiler Date: Wed Feb 8 07:56:40 2023 +0100 arm64: dts: freescale: add initial apalis imx8 aka quadmax module support This patch adds the device tree to support Toradex Apalis iMX8 [1] aka QuadMax a computer on module which can be used on different carrier boards. The module consists of an NXP i.MX 8 family SoC (either i.MX 8QuadMax or 8QuadPlus), two PF8100 PMICs, a KSZ9131 Gigabit Ethernet PHY, 2, 4 or 8 GB of LPDDR4 RAM, an eMMC, an SGTL5000 analogue audio codec, an USB3503A USB HSIC hub, an optional I2C EEPROM plus an optional Bluetooth/Wi-Fi module. Anything that is not self-contained on the module is disabled by default. The carrier board device trees in the next patch will include the module's device tree and enable the supported peripherals of the carrier board. Some level of display functionality just landed upstream but requires further integration/testing on our side. Therefore, currently only basic console UART, eMMC and Ethernet functionality work fine. As there is no i.MX 8QuadPlus device tree upstream those have been dropped. However, apart from an error message during boot about it failing to bring up the second Cortex-A72 core this boots fine on QuadPlus' as well. [1] https://www.toradex.com/computer-on-modules/apalis-arm-family/nxp-imx-8 Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit b4efce453f0caca948df3faa8c8b816edd2240eb Author: Zhou Peng Date: Wed Feb 8 07:56:38 2023 +0100 arm64: dts: imx8qm: add vpu decoder and encoder Enable VPU decoder and encoder functionality. Signed-off-by: Zhou Peng Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit be85831de020f3cfb6811ec64f41a70bb62374b3 Author: Joakim Zhang Date: Wed Feb 8 07:56:37 2023 +0100 arm64: dts: imx8qm: add can node in devicetree Add CAN node for imx8qm in devicetree. Unlike on the i.MX 8QXP where the flexcan clocks are shared between multiple CAN instances, the i.MX 8QM has separate flexcan clock slices. Signed-off-by: Joakim Zhang Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit 5e7d5b023e032c30095deca9745fe8e82491ba64 Author: Joakim Zhang Date: Wed Feb 8 07:56:36 2023 +0100 arm64: dts: imx8qxp: add flexcan in adma Add FlexCAN decive in adma subsystem. Signed-off-by: Joakim Zhang Signed-off-by: Marcel Ziswiler Tested-by: Alexander Stein # TQMa8XQP Signed-off-by: Shawn Guo commit 033f5e7ef8540a6b5e3b59e1311683a6114c2d2e Author: Philippe Schenker Date: Wed Feb 8 07:56:34 2023 +0100 arm64: dts: freescale: imx8-ss-dma: set lpspi0 max frequency to 60mhz 60MHz is the maximum frequency mentioned in the datasheet for master mode. Set that to 60MHz to match lpspi2. Signed-off-by: Philippe Schenker Signed-off-by: Max Krummenacher Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit b503c3c01c08acc54e8a5e8a41daafae023e56f0 Author: Max Krummenacher Date: Wed Feb 8 07:56:33 2023 +0100 arm64: dts: imx8-ss-dma: add io-channel-cells to adc nodes This commit adds io-channel-cells property to the ADC nodes. This property is required in order for an IIO consumer driver to work. Especially required for Apalis iMX8 QM, as the touchscreen driver uses ADC channels with the ADC driver based on IIO framework. Signed-off-by: Philippe Schenker Signed-off-by: Max Krummenacher Signed-off-by: Marcel Ziswiler Acked-by: Alexander Stein Signed-off-by: Shawn Guo commit 23fa99b205ea50f89c9db20e9afdddd8381d9ea0 Author: Philippe Schenker Date: Wed Feb 8 07:56:32 2023 +0100 arm64: dts: freescale: imx8-ss-lsio: add support for lsio_pwm0-3 Add support for lsio_pwm0-3. Signed-off-by: Philippe Schenker Signed-off-by: Max Krummenacher Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit ea6dbf86b8d06b3902cb888dd4a75a794e9ef445 Author: Marcel Ziswiler Date: Wed Feb 8 07:56:39 2023 +0100 dt-bindings: arm: fsl: add toradex,apalis-imx8 et al. Add toradex,apalis-imx8 for the Apalis iMX8 aka QuadMax modules and the carrier boards (Apalis Evaluation board as well as Ixora V1.1 and V1.2) they may be mated in. Signed-off-by: Marcel Ziswiler Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 9228742caf899fa72230dd8da19ca4c7528badb8 Author: Deepak R Varma Date: Thu Mar 2 01:05:41 2023 +0530 drm/nouveau/hwmon: Use sysfs_emit in show function callsbacks According to Documentation/filesystems/sysfs.rst, the show() callback function of kobject attributes should strictly use sysfs_emit() instead of sprintf() family functions. So, make this change. Issue identified using the coccinelle device_attr_show.cocci script. Signed-off-by: Deepak R Varma Reviewed-by: Ashutosh Dixit Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/Y/+pDaHOgG1x8Py2@ubun2204.myguest.virtualbox.org commit e1e17d7debf486fd3b757df9e009b8d109e4be43 Author: Sukrut Bellary Date: Sun Feb 26 16:21:55 2023 -0800 kselftest: amd-pstate: Fix spelling mistakes Fix spelling mistakes in run.sh "drvier" => "driver" and in gitsource.sh "senconds" => "seconds". Signed-off-by: Sukrut Bellary Signed-off-by: Shuah Khan commit 60684c2bd35064043360e6f716d1b7c20e967b7d Author: Geert Uytterhoeven Date: Mon Feb 27 12:12:45 2023 +0100 kunit: tool: Add support for m68k under QEMU Add basic support to run m68k under QEMU via kunit_tool. Signed-off-by: Geert Uytterhoeven Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 6c0f2d071eded22cb72413e0abfaa5b3373b4d96 Author: Josh Poimboeuf Date: Mon Feb 13 23:05:42 2023 -0800 loongarch/cpu: Mark play_dead() __noreturn play_dead() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/r/4da55acfdec8a9132c4e21ffb7edb1f846841193.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit 13bf7923a4dd34f3d2681768a148b10ddbdb95ed Author: Josh Poimboeuf Date: Mon Feb 13 23:05:41 2023 -0800 loongarch/cpu: Make sure play_dead() doesn't return play_dead() doesn't return. Make that more explicit with a BUG(). BUG() is preferable to unreachable() because BUG() is a more explicit failure mode and avoids undefined behavior like falling off the edge of the function into whatever code happens to be next. Link: https://lore.kernel.org/r/21245d687ffeda34dbcf04961a2df3724f04f7c8.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit 93c0edffbc92abe1efb8c7081df0cc1577a79ace Author: Josh Poimboeuf Date: Mon Feb 13 23:05:40 2023 -0800 ia64/cpu: Mark play_dead() __noreturn play_dead() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/r/7575bb38417bd8bcb5be980443f99cab29319342.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit 1b2442a835a0acc7d76ae2f48ca7a94f962b29c8 Author: Josh Poimboeuf Date: Mon Feb 13 23:05:39 2023 -0800 csky/cpu: Make sure arch_cpu_idle_dead() doesn't return arch_cpu_idle_dead() doesn't return. Make that more explicit with a BUG(). BUG() is preferable to unreachable() because BUG() is a more explicit failure mode and avoids undefined behavior like falling off the edge of the function into whatever code happens to be next. Acked-by: Guo Ren Link: https://lore.kernel.org/r/1e9ecc3d248e82973e80bc336fc9f97e3ba2708d.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit 9bdc61ef27db5eaac48f1cc5deb8224603e79c89 Author: Josh Poimboeuf Date: Thu Feb 16 10:42:01 2023 -0800 arm64/cpu: Mark cpu_die() __noreturn cpu_die() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Acked-by: Mark Rutland Reviewed-by: Philippe Mathieu-Daudé Link: https://lkml.kernel.org/r/20230216184157.4hup6y6mmspr2kll@treble Signed-off-by: Josh Poimboeuf commit b40c7d6d31ac2f6b78371cdc08bc1b6b62f01375 Author: Josh Poimboeuf Date: Thu Feb 16 10:38:55 2023 -0800 arm/cpu: Add unreachable() to arch_cpu_idle_dead() arch_cpu_idle_dead() doesn't return. Make that visible to the compiler with an unreachable() code annotation. Link: https://lkml.kernel.org/r/20230216183851.s5bnvniomq44rytu@treble Signed-off-by: Josh Poimboeuf commit 550db6795e9bb0b1b40f9c52bbe3d0ee735dbdb0 Author: Josh Poimboeuf Date: Mon Feb 13 23:05:36 2023 -0800 alpha/cpu: Make sure arch_cpu_idle_dead() doesn't return arch_cpu_idle_dead() doesn't return. Make that more explicit with a BUG(). BUG() is preferable to unreachable() because BUG() is a more explicit failure mode and avoids undefined behavior like falling off the edge of the function into whatever code happens to be next. Link: https://lore.kernel.org/r/19ffef09a175fecb783abcd44d6bcfeade2857eb.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit 1e8a0be5ed3aaa26dd77927df32bbd0df3449a1e Author: Josh Poimboeuf Date: Mon Feb 13 23:05:35 2023 -0800 alpha/cpu: Expose arch_cpu_idle_dead()'s prototype declaration Include to make sure arch_cpu_idle_dead() matches its prototype going forward. Link: https://lore.kernel.org/r/b0405c2ac5686303b6026e1ac27cfd769b21a7d0.1676358308.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf commit ced8a02b3452291171e9988a3c862c56e1628a1d Author: Jeremy Kerr Date: Thu Mar 2 08:58:34 2023 +0800 dt-bindings: clock: ast2600: Expand comment on reset definitions The current "not part of a gate" is a little ambiguous. Expand this a little to clarify the reference to the paired clock + reset control. Signed-off-by: Jeremy Kerr Link: https://lore.kernel.org/r/20230302005834.13171-7-jk@codeconstruct.com.au Reviewed-by: Joel Stanley Acked-by: Krzysztof Kozlowski Tested-by: Joel Stanley Signed-off-by: Stephen Boyd commit 1ef491e29cdb26ca60898bc2c853a944d7fe1117 Author: Jeremy Kerr Date: Thu Mar 2 08:58:33 2023 +0800 clk: ast2600: Add comment about combined clock + reset handling Add a little description about how reset lines can be implicit with clock enable/disable. This is mostly based on the commit message from the original submission in 15ed8ce5f8. Signed-off-by: Jeremy Kerr Link: https://lore.kernel.org/r/20230302005834.13171-6-jk@codeconstruct.com.au Reviewed-by: Joel Stanley Tested-by: Joel Stanley Signed-off-by: Stephen Boyd commit 1f15e0486b6e29d7b327d3150215ddec31fca679 Author: Jeremy Kerr Date: Thu Mar 2 08:58:32 2023 +0800 dt-bindings: clock: ast2600: remove IC36 & I3C7 clock definitions The current ast2600 clock definitions include entries for i3c6 and i3c7 devices, which don't exist: there are no clock control lines documented for these, and only i3c devices 0 through 5 are present. So, remove the definitions for I3C6 and I3C7. Although this is a potential ABI-breaking change, there are no in-tree users of these, and any references would be broken anyway, as the hardware doesn't exist. This is a partial cherry-pick and rework of ed44b8cdfdb and 1a35eb926d7 from Aspeed's own tree, originally by Dylan Hung . Reviewed-by: Joel Stanley Acked-by: Krzysztof Kozlowski Signed-off-by: Jeremy Kerr Link: https://lore.kernel.org/r/20230302005834.13171-5-jk@codeconstruct.com.au Tested-by: Joel Stanley Signed-off-by: Stephen Boyd commit e9d230146f1521d24b286b75dfec96a66caf359b Author: Jeremy Kerr Date: Thu Mar 2 08:58:31 2023 +0800 clk: ast2600: Add full configs for I3C clocks The current ast2600 I3C clock definitions are top-level (rather than based on their actual hw sources: either HCLK or APLL), and include a couple of definitions for (non-existent) i3c6 and i3c7. Re-parent the individual I3C controller clocks to the main i3c clock, explicitly sourced from the APLL rather than whatever G6_CLK_SELECTION5 was last set to. While we're at it, remove the definitions for the i3c6 and i3c7 clock lines; this hardware isn't present. This is a partial cherry-pick and rework of ed44b8cdfdb and 1a35eb926d7 from Aspeed's own tree, originally by Dylan Hung . Signed-off-by: Jeremy Kerr Link: https://lore.kernel.org/r/20230302005834.13171-4-jk@codeconstruct.com.au Reviewed-by: Joel Stanley Tested-by: Joel Stanley Signed-off-by: Stephen Boyd commit 1038b6978b438d954e2e827d4d553bed94cd83e0 Author: Jeremy Kerr Date: Thu Mar 2 08:58:30 2023 +0800 dt-bindings: clock: ast2600: Add top-level I3C clock The ast2600 hardware has a top-level clock for all i3c controller peripherals (then gated to each individual controller), so add a top-level i3c clock line to control this. This is a partial cherry-pick and rework of ed44b8cdfdb and 1a35eb926d7 from Aspeed's own tree, originally by Dylan Hung . Acked-by: Krzysztof Kozlowski Reviewed-by: Joel Stanley Signed-off-by: Jeremy Kerr Link: https://lore.kernel.org/r/20230302005834.13171-3-jk@codeconstruct.com.au Tested-by: Joel Stanley Signed-off-by: Stephen Boyd commit f0dd78de23539397e5f004fe6c41d3d45b36c7cf Author: Jeremy Kerr Date: Thu Mar 2 08:58:29 2023 +0800 clk: ast2600: allow empty entries in aspeed_g6_gates We're about to remove an entry from aspeed_g6_gates, but we won't want to alter/reorder existing entries. Allow empty entries in this array. Reviewed-by: Joel Stanley Signed-off-by: Jeremy Kerr Link: https://lore.kernel.org/r/20230302005834.13171-2-jk@codeconstruct.com.au Tested-by: Joel Stanley Signed-off-by: Stephen Boyd commit 1361737f102d898330fd61efa5940c1ee0812da1 Author: Alexander Aring Date: Mon Mar 6 15:48:18 2023 -0500 fs: dlm: switch lkb_sbflags to atomic ops This patch moves lkb_sbflags handling to atomic bits ops. This should prepare for a possible manipulating of lkb_sbflags flags at the same time by concurrent execution. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 46d6e722d8b1cf07d21662f6b29bcd8e72f77305 Author: Alexander Aring Date: Mon Mar 6 15:48:17 2023 -0500 fs: dlm: rsb hash table flag value to atomic ops This patch moves the rsb hash table handling to atomic flag operations. The flag operations for DLM_RTF_SHRINK are protected by ls->ls_rsbtbl[b].lock. However we switch to atomic ops if new possible flags will be used in a different way and don't assume such lock dependencies. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit e1af8728f600f648be1f552552e834c170a0244c Author: Alexander Aring Date: Mon Mar 6 15:48:16 2023 -0500 fs: dlm: move internal flags to atomic ops This patch will move the lkb_flags value to the recently introduced lkb_iflags value. For lkb_iflags we use atomic bit operations because some flags like DLM_IFL_CB_PENDING are used while non rsb lock is held to avoid issues with other flag manipulations which might run at the same time we switch to atomic bit operations. Snapshot the bit values to an uint32_t value is only used for debugging/logging use cases and don't need to be 100% correct. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 8a39dcd9c32dd3f0d3af745c72834d58a43ed90a Author: Alexander Aring Date: Mon Mar 6 15:48:15 2023 -0500 fs: dlm: change dflags to use atomic bits Currently manipulating lkb_dflags assumes to held the rsb lock assigned to the lkb. This is held by dlm message processing after certain time to lookup the right rsb from the received lkb message id. For user space locks flags, which is currently the only use case for lkb_dflags, flags are also being set during dlm character device handling without holding the rsb lock. To minimize the risk that bit operations are getting corrupted we switch to atomic bit operations. This patch will also introduce helpers to snapshot atomic bit values in an non atomic way. There might be still issues with the flag handling e.g. running in case of manipulating bit ops and snapshot them at the same time, but this patch minimize them and will start to use atomic bit operations. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 8c11ba64ce577a993701616e335319a0afbbd49a Author: Alexander Aring Date: Mon Mar 6 15:48:14 2023 -0500 fs: dlm: store lkb distributed flags into own value This patch stores lkb distributed flags value in an separate value instead of sharing internal and distributed flags in lkb->lkb_flags value. This has the advantage to not mask/write back flag values in receive_flags() functionality. The dlm debug_fs does not provide the distributed flags anymore, those can be added in future. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 9f48eead5ea4c55692dd5628699a0d5715416615 Author: Alexander Aring Date: Mon Mar 6 15:48:13 2023 -0500 fs: dlm: remove DLM_IFL_LOCAL_MS flag The DLM_IFL_LOCAL_MS flag is an internal non shared flag but used in m_flags of dlm messages. It is not shared because it is only used for local messaging. Instead using DLM_IFL_LOCAL_MS in dlm messages we pass a parameter around to signal local messaging or not. This patch is adding the local parameter to signal local messaging. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit a7e7ffacad7b9bbfc188cf20e9e5b04badf0a424 Author: Alexander Aring Date: Mon Mar 6 15:48:12 2023 -0500 fs: dlm: rename stub to local message flag This patch renames DLM_IFL_STUB_MS to DLM_IFL_LOCAL_MS flag. The DLM_IFL_STUB_MS flag is somewhat misnamed, it means the dlm message is used for local message transfer only. It is used by recovery to resolve lock states if a node got fenced. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 01c7a5978993209f47ecfd95dcbd52f6c6672384 Author: Alexander Aring Date: Mon Mar 6 15:48:11 2023 -0500 fs: dlm: remove deprecated code parts This patch removes code parts which was declared deprecated by commit 6b0afc0cc3e9 ("fs: dlm: don't use deprecated timeout features by default"). This contains the following dlm functionality: - start a cancel of a dlm request did not complete after certain timeout: The current way how dlm cancellation works and interfering with other dlm requests triggered by the user can end in an overlapping and returning in -EBUSY. The most user don't handle this case and are unaware that DLM can return such errno in such situation. Due the timeout the user are mostly unaware when this happens. - start a netlink warning messages for user space if dlm requests did not complete after certain timeout: This feature was never being built in the only known dlm user space side. As we are to remove the timeout cancellation feature we can directly remove this feature as well. There might be the possibility to bring the timeout cancellation feature back. However the current way of handling the -EBUSY case which is only a software limitation and not a hardware limitation should be changed. We minimize the current code base in DLM cancellation feature to not have to deal with those existing features while solving the DLM cancellation feature in general. UAPI define DLM_LSFL_TIMEWARN is commented as deprecated and reserved value. We should avoid at first to give it a new meaning but let possible users still compile by keeping this define. In far future we can give this flag a new meaning. The same for the DLM_LKF_TIMEOUT lock request flag. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 7386457af39de4163562ece1fd44b22722805add Author: Edwin Török Date: Mon Mar 6 15:48:10 2023 -0500 DLM: increase socket backlog to avoid hangs with 16 nodes On a 16 node virtual cluster with e1000 NICs joining the 12th node prints SYN flood warnings for the DLM port: Dec 21 01:46:41 localhost kernel: [ 2146.516664] TCP: request_sock_TCP: Possible SYN flooding on port 21064. Sending cookies. Check SNMP counters. And then joining a DLM lockspace hangs: ``` Dec 21 01:49:00 localhost kernel: [ 2285.780913] INFO: task xapi-clusterd:17638 blocked for more than 120 seconds. Dec 21 01:49:00 localhost kernel: [ 2285.786476] Not tainted 4.4.0+10 #1 Dec 21 01:49:00 localhost kernel: [ 2285.789043] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. Dec 21 01:49:00 localhost kernel: [ 2285.794611] xapi-clusterd D ffff88001930bc58 0 17638 1 0x00000000 Dec 21 01:49:00 localhost kernel: [ 2285.794615] ffff88001930bc58 ffff880025593800 ffff880022433800 ffff88001930c000 Dec 21 01:49:00 localhost kernel: [ 2285.794617] ffff88000ef4a660 ffff88000ef4a658 ffff880022433800 ffff88000ef4a000 Dec 21 01:49:00 localhost kernel: [ 2285.794619] ffff88001930bc70 ffffffff8159f6b4 7fffffffffffffff ffff88001930bd10 Dec 21 01:49:00 localhost kernel: [ 2285.794644] [] ? printk+0x4d/0x4f Dec 21 01:49:00 localhost kernel: [ 2285.794647] [] ? __raw_callee_save___pv_queued_spin_unlock+0x11/0x20 Dec 21 01:49:00 localhost kernel: [ 2285.794649] [] wait_for_completion+0x9d/0x110 Dec 21 01:49:00 localhost kernel: [ 2285.794653] [] ? wake_up_q+0x80/0x80 Dec 21 01:49:00 localhost kernel: [ 2285.794661] [] dlm_new_lockspace+0x908/0xac0 [dlm] Dec 21 01:49:00 localhost kernel: [ 2285.794665] [] ? prepare_to_wait_event+0x100/0x100 Dec 21 01:49:00 localhost kernel: [ 2285.794670] [] device_write+0x497/0x6b0 [dlm] Dec 21 01:49:00 localhost kernel: [ 2285.794673] [] ? handle_mm_fault+0x7f0/0x13b0 Dec 21 01:49:00 localhost kernel: [ 2285.794677] [] __vfs_write+0x28/0xd0 Dec 21 01:49:00 localhost kernel: [ 2285.794679] [] ? rw_verify_area+0x6f/0xd0 Dec 21 01:49:00 localhost kernel: [ 2285.794681] [] vfs_write+0xb1/0x190 Dec 21 01:49:00 localhost kernel: [ 2285.794686] [] ? __do_page_fault+0x302/0x420 Dec 21 01:49:00 localhost kernel: [ 2285.794688] [] SyS_write+0x46/0xa0 Dec 21 01:49:00 localhost kernel: [ 2285.794690] [] entry_SYSCALL_64_fastpath+0x12/0x71 ``` The previous limit of 5 seems like an arbitrary number, that doesn't match any known DLM cluster size upper bound limit. Signed-off-by: Edwin Török Cc: Christine Caulfield Cc: David Teigland Cc: cluster-devel@redhat.com Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 00f30c051b07b34dc6d43f76a505bfee80053e20 Author: Alexander Aring Date: Mon Mar 6 15:48:09 2023 -0500 fs: dlm: add unbound flag to dlm_io workqueue This patch will add the WQ_UNBOUND flag to the lowcomms dlm_io workqueue which handles socket io handling to send and receive dlm messages. The amount of sockets will be 2 for a 3 node cluster. Each socket has two different workers for doing send and receive work by calling socket API functionality. Each worker will do their task in order to send dlm messages in a ordered stream based socket communication. On receive side the receive buffer will be queued up for an ordered dlm_process workqueue to parse received dlm messages. The parsing need to be done currently in an ordered synchronized way because the dlm message processing is not being made to parse parallel. After explaining all those workqueue behaviours in lowcomms, the dlm_io workqueue is only being used for socket handling. Each socket handling has 2 workers (send and receive). In a 3 cluster node we will end up with 4 workers. Without the WQ_UNBOUND flag the workers are tight to a CPU and can never switch, this could be an advantage because local CPU execution. However with dlm_locktorture testcase I expierenced not all workers are always in use and my assumption is that some workers are bound to the same CPU. We should always send or receive when we are ready to do so, one reason why we disable nigel algorithm on sockets. We should be safe to do the socket io handling on any CPU which can be switched during runtime. There is no assumption that the worker stays on the same CPU. There is no need to respect any workqueue concurrency model that each worker can only run on one CPU. Lowcomms queue_work() mechanism has an higher level flag to be sure that it can't schedule work if the previous worker did not signal it to keep ordered socket handling. Therefore this patch sets the WQ_UNBOUND flag to allow workers being executed by any available CPU. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit a034c1370ded2ae6cbdc73a78241b3ed98c86d3d Author: Alexander Aring Date: Mon Mar 6 15:48:08 2023 -0500 fs: dlm: fix DLM_IFL_CB_PENDING gets overwritten This patch introduce a new internal flag per lkb value to handle internal flags which are handled not on wire. The current lkb internal flags stored as lkb->lkb_flags are split in upper and lower bits, the lower bits are used to share internal flags over wire for other cluster wide lkb copies on other nodes. In commit 61bed0baa4db ("fs: dlm: use a non-static queue for callbacks") we introduced a new internal flag for pending callbacks for the dlm callback queue. This flag is protected by the lkb->lkb_cb_lock lock. This patch overlooked that on dlm receive path and the mentioned upper and lower bits, that dlm will read the flags, mask it and write it back. As example receive_flags() in fs/dlm/lock.c. This flag manipulation is not done atomically and is not protected by lkb->lkb_cb_lock. This has unknown side effects of the current callback handling. In future we should move to set/clear/test bit functionality and avoid read, mask and writing back flag values. In later patches we will move the upper parts to the new introduced internal lkb flags which are not shared between other cluster nodes to the new non shared internal flag field to avoid similar issues. Cc: stable@vger.kernel.org Fixes: 61bed0baa4db ("fs: dlm: use a non-static queue for callbacks") Reported-by: Bob Peterson Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 3ffefa1d9c9eba60c7f8b4a9ce2df3e4c7f4a88e Author: Uwe Kleine-König Date: Fri Mar 3 18:20:41 2023 +0100 spi: zynqmp-gqspi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-88-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit ae9084b6458d34ebf3e377d0407ebe513e41ac71 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:40 2023 +0100 spi: zynq-qspi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-87-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 795b3ac702716eca422494766cc0136b4a0554ce Author: Uwe Kleine-König Date: Fri Mar 3 18:20:39 2023 +0100 spi: xtensa-xtfpga: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-86-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 3b1d7e1193315fc96f5e28d08bc3a7e3594628e5 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:38 2023 +0100 spi: xilinx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-85-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 1b13d196d2813dadc1947940dbd4aaad6ae21c02 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:37 2023 +0100 spi: uniphier: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-84-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit b082694f18bdff807b42a3bccc62c3a524168f23 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:36 2023 +0100 spi: topcliff-pch: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-83-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 001ea026c07dad216e1f6fbb8b1619e1d31c8799 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:35 2023 +0100 spi: tegra210-quad: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-82-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 7f47f7a2ee28938a7ac104e187ec0bd81b0aecf7 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:34 2023 +0100 spi: tegra20-slink: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-81-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 8394b7186cf27be24a75516212d5e76d263397d7 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:33 2023 +0100 spi: tegra20-sflash: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-80-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit bff9694e97790c7f8c9ff1e979b2af9cb6e69adc Author: Uwe Kleine-König Date: Fri Mar 3 18:20:32 2023 +0100 spi: tegra114: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-79-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 1972cdc47df737f5b90ac2132080004f5e413e91 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:31 2023 +0100 spi: synquacer: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-78-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 18bb7328171203f4ade267bcd7cf5b073a1a9405 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:30 2023 +0100 spi: sunplus-sp7021: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-77-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit edf69ab9c777abf9ab30c6a5a215d16a094bae87 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:29 2023 +0100 spi: sun6i: 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 (mostly) ignored 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. 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: Andre Przywara Link: https://lore.kernel.org/r/20230303172041.2103336-76-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit b7b949458ac391963e56ae354b73fee63016dcee Author: Uwe Kleine-König Date: Fri Mar 3 18:20:28 2023 +0100 spi: sun4i: 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 (mostly) ignored 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. 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: Andre Przywara Link: https://lore.kernel.org/r/20230303172041.2103336-75-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 3e11e4f336f603d3cddcc89f94e518391b6a08a5 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:27 2023 +0100 spi: stm32: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-74-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit a19ca20a0e4eccacf44119fccc86c2f3e5edb3f0 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:26 2023 +0100 spi: stm32-qspi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-73-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 2dd42da0b479ffb4604c81b7c1b30aa9b5f0a4a9 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:25 2023 +0100 spi: st-ssc4: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-72-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f7f785f125d03360d3766d96d04cf08b8472ce8f Author: Uwe Kleine-König Date: Fri Mar 3 18:20:24 2023 +0100 spi: sprd-adi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-71-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 462414a3d0613cf71ecb3c4fb183698d2441bbb9 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:23 2023 +0100 spi: sn-f-ospi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-70-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 1037cfa33cedf733a751c8708d174ba11708ce4a Author: Uwe Kleine-König Date: Fri Mar 3 18:20:22 2023 +0100 spi: slave-mt27xx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-69-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit fd8998c4633737310c8165c6c3fc81197380d1d9 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:21 2023 +0100 spi: sifive: 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 (mostly) ignored 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. 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: Conor Dooley Link: https://lore.kernel.org/r/20230303172041.2103336-68-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit dee2e25572e42faa581b6c86cd1252546680362a Author: Uwe Kleine-König Date: Fri Mar 3 18:20:20 2023 +0100 spi: sh: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-67-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 80dc51da19cebaf85b03d910cbf4e56af165b0ff Author: Uwe Kleine-König Date: Fri Mar 3 18:20:19 2023 +0100 spi: sh-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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-66-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 74af1328a694d3a2a176935c93db8ad406aacb81 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:18 2023 +0100 spi: sh-msiof: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-65-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f3a762b613598d198b5ebd5c1fcf6a902f8a9d9f Author: Uwe Kleine-König Date: Fri Mar 3 18:20:17 2023 +0100 spi: sh-hspi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-64-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 2b7981a65527a51706b895e170e07b2eaeae69c5 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:16 2023 +0100 spi: s3c64xx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-63-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 72ec0e8f89a1536e4594606d60a946636ee7d94b Author: Uwe Kleine-König Date: Fri Mar 3 18:20:15 2023 +0100 spi: rspi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-62-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit c42ee93aded47fe8cf3615df2e20704c720b7433 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:14 2023 +0100 spi: rpc-if: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-61-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 5ff5e676201deca9bcc3c9474842b2f4456f24b8 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:13 2023 +0100 spi: rockchip: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-60-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit e5fcb34d7934aceb39c7d68d30fbf53d93f1eda6 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:12 2023 +0100 spi: rockchip-sfc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-59-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit a006c353a115d429c114e9bc26ab0f6a40d3de23 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:11 2023 +0100 spi: rb4xx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-58-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit e0c30566e5333247bbfdad61f98dccf989ff54e1 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:10 2023 +0100 spi: qcom-qspi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-57-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 31f6d96d6807cc1dde70cda36cb45ec61d41fe6b Author: Uwe Kleine-König Date: Fri Mar 3 18:20:09 2023 +0100 spi: pxa2xx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-56-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 224d9437eb2967b67ae67c4743bb589f86668e8d Author: Uwe Kleine-König Date: Fri Mar 3 18:20:08 2023 +0100 spi: ppc4xx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-55-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 01c30f51266acf2595cc06885071e752080ca052 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:07 2023 +0100 spi: pic32: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-54-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 503425ed9c50096a0e0c61f38bc39752f3696266 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:06 2023 +0100 spi: pic32-sqi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-53-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 2e0de1efb233ab8b1a488a6663d31edab9ef0f4f Author: Uwe Kleine-König Date: Fri Mar 3 18:20:05 2023 +0100 spi: orion: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-52-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 0a4192a52082118d0da3bdd34145ebabfde40d93 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:04 2023 +0100 spi: omap2-mcspi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-51-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit c43bdb3a1154facd844f6a753b6a30fecaadc16e Author: Uwe Kleine-König Date: Fri Mar 3 18:20:03 2023 +0100 spi: omap-uwire: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-50-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit bdffa602d741126896de50307126803ffab7a3de Author: Uwe Kleine-König Date: Fri Mar 3 18:20:02 2023 +0100 spi: oc-tiny: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-49-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 2dd82e32c20b57ad693287b546f775c933670e43 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:01 2023 +0100 spi: nxp-fspi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-48-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 445534b5f25ab8394082b47b50d973676ce54ee4 Author: Uwe Kleine-König Date: Fri Mar 3 18:20:00 2023 +0100 spi: npcm-pspi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-47-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 5e4830adb09a3577eb80c0b8c7611d0c0de02ab8 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:59 2023 +0100 spi: npcm-fiu: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-46-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit a760db097cfdce093c0483343d9f831a33702ad9 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:58 2023 +0100 spi: mxs: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-45-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit c64e92dfa0bd1256fc3f9f1a32a5c844e49d8681 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:57 2023 +0100 spi: mxic: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-44-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 976a689122df6c7d8d826ad36578c0291a1dc214 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:56 2023 +0100 spi: mtk-snfi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-43-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit b558435810cc68755527e55ccaba6c35c340900a Author: Uwe Kleine-König Date: Fri Mar 3 18:19:55 2023 +0100 spi: mtk-nor: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-42-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 3fa689a85df4664a62ea931be31e5276cde1e8fe Author: Uwe Kleine-König Date: Fri Mar 3 18:19:54 2023 +0100 spi: mpc52xx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-41-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit ed3b4b8772783e840d93a079b2dbdd7f9c4b3c76 Merge: 6a534cfcfdbbd 340307d7effd9 Author: Mark Brown Date: Mon Mar 6 20:30:09 2023 +0000 Add CS35L41 shared boost feature Merge series from Lucas Tanure : Valve's Steam Deck uses CS35L41 in shared boost mode, where both speakers share the boost circuit. Add this support in the shared lib, but for now, shared boost is not supported in HDA systems as would require BIOS changes. Based on David Rhodes shared boost patches. Also, fix boost config overwriting in IRQ found in the review and do a small refactor of the code. commit 1bd8e27fd0db0fe7f489213836dcbab92934f8fa Author: Claudiu Beznea Date: Mon Feb 27 12:59:31 2023 +0200 clk: at91: clk-sam9x60-pll: fix return value check sam9x60_frac_pll_compute_mul_frac() can't return zero. Remove the check against zero to reflect this. Fixes: 43b1bb4a9b3e ("clk: at91: clk-sam9x60-pll: re-factor to support plls with multiple outputs") Reported-by: Dan Carpenter Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230227105931.2812412-1-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 7a1bb27b6ba8a05b51c1589dd9d53eb43a9e9843 Author: Swapnil Patel Date: Wed Mar 1 14:33:33 2023 -0500 drm/amd/display: Update clock table to include highest clock setting [Why] Currently, the clk manager matches SocVoltage with voltage from fused settings (dfPstate clock table). And then corresponding clocks are selected. However in certain situations, this leads to clk manager not including at least one entry with highest supported clock setting. [How] Update the clk manager to include at least one entry with highest supported clock setting. Reviewed-by: Pavle Kotarac Acked-by: Qingqing Zhuo Signed-off-by: Swapnil Patel Signed-off-by: Alex Deucher commit c1aafd6399a3fd35594778acc618075e1bac81d4 Author: Christian König Date: Mon Jan 16 20:49:23 2023 +0100 drm/amdgpu: stop waiting in amdgpu_uvd_send_msg We have a wait in the amdgpu_bo_kmap() code for quite a while now, so waiting here isn't needed any more. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit edfea16a6dae9c03bdc97babdd69960093263354 Author: Gustavo A. R. Silva Date: Thu Feb 2 19:27:10 2023 -0600 drm/vmwgfx: Replace one-element array with flexible-array member One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct vmw_view. This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. This results in no differences in binary output. Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/254 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Reviewed-by: Kees Cook Reviewed-by: Zack Rusin Signed-off-by: Gustavo A. R. Silva commit f6c0cd55fed897e8441e41c4bd8220a39539bcf4 Author: Candice Li Date: Mon Jan 16 16:23:21 2023 +0800 drm/amd/pm: Enable ecc_info table support for smu v13_0_10 Support EccInfoTable which includes umc ras error count and error address. Signed-off-by: Candice Li Reviewed-by: Evan Quan Reviewed-by: Stanley.Yang Signed-off-by: Alex Deucher commit 2b595659d5aec797d2f469691cd543e9b3500471 Author: Candice Li Date: Fri Feb 24 17:26:33 2023 +0800 drm/amdgpu: Support umc node harvest config on umc v8_10 Don't need to query error count and error address on harvest umc nodes. v2: Fix code bug, use active_mask instead of harvsest_config and remove unnecessary argument in LOOP macro. v3: Leave adev->gmc.num_umc unchanged. Signed-off-by: Candice Li Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit aea9040c2df97a03b73a13ba124d1b6561e09c4e Author: Kun Liu Date: Wed Mar 1 09:53:33 2023 +0800 drm/amdgpu: fix no previous prototype warning add static prefix for vangogh_set_apu_thermal_limit function Signed-off-by: Kun Liu Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303010827.c2N0yBGT-lkp@intel.com Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit db1c1a8f0a2bb69eb9123b2d2a88cc7d3d49b13a Author: leiyaoyao Date: Mon Feb 27 13:24:03 2023 +0800 drm/amdgpu: Stop clearing kiq position during fini Do not clear kiq position in RLC_CP_SCHEDULER so that CP could perform IDLE-SAVE after VF fini. Otherwise it could cause GFX hang if another Win guest is rendering. Signed-off-by: leiyaoyao Acked-by: ZhenGuo Yin Signed-off-by: Alex Deucher commit c0d5c293ceb752e4d91e40854196a13f3cc070c0 Author: Harry Wentland Date: Fri Jan 13 11:24:09 2023 -0500 drm/connector: print max_requested_bpc in state debugfs This is useful to understand the bpc defaults and support of a driver. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: Vitaly.Prosyak@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: Jani Nikula Cc: dri-devel@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Reviewed-By: Joshua Ashton Link: https://patchwork.freedesktop.org/patch/msgid/20230113162428.33874-3-harry.wentland@amd.com Signed-off-by: Alex Deucher commit 2f60eded72c839d0295fd8c8bf394b4913303559 Author: Harry Wentland Date: Fri Jan 13 11:24:08 2023 -0500 drm/display: Don't block HDR_OUTPUT_METADATA on unknown EOTF The EDID of an HDR display defines EOTFs that are supported by the display and can be set in the HDR metadata infoframe. Userspace is expected to read the EDID and set an appropriate HDR_OUTPUT_METADATA. In drm_parse_hdr_metadata_block the kernel reads the supported EOTFs from the EDID and stores them in the drm_connector->hdr_sink_metadata. While doing so it also filters the EOTFs to the EOTFs the kernel knows about. When an HDR_OUTPUT_METADATA is set it then checks to make sure the EOTF is a supported EOTF. In cases where the kernel doesn't know about a new EOTF this check will fail, even if the EDID advertises support. Since it is expected that userspace reads the EDID to understand what the display supports it doesn't make sense for DRM to block an HDR_OUTPUT_METADATA if it contains an EOTF the kernel doesn't understand. This comes with the added benefit of future-proofing metadata support. If the spec defines a new EOTF there is no need to update DRM and an compositor can immediately make use of it. Bug: https://gitlab.freedesktop.org/wayland/weston/-/issues/609 v2: Distinguish EOTFs defind in kernel and ones defined in EDID in the commit description (Pekka) v3: Rebase; drm_hdmi_infoframe_set_hdr_metadata moved to drm_hdmi_helper.c Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: Vitaly.Prosyak@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: Jani Nikula Cc: dri-devel@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Acked-by: Pekka Paalanen Reviewed-By: Joshua Ashton Link: https://patchwork.freedesktop.org/patch/msgid/20230113162428.33874-2-harry.wentland@amd.com Signed-off-by: Alex Deucher commit 7e626a080bb2db47c27c29fea569ff18afec52ed Author: Dario Binacchi Date: Thu Mar 2 21:50:28 2023 +0100 clk: visconti: remove unused visconti_pll_provider::regmap Field regmap of struct visconti_pll_provider is never used. Remove it. Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20230302205028.2539197-1-dario.binacchi@amarulasolutions.com Acked-by: Nobuhiro Iwamatsu Signed-off-by: Stephen Boyd commit 63c1845bf1a4de21b9cb5a609c96d09e7cf6663b Author: Paul Moore Date: Thu Feb 16 21:33:20 2023 -0500 lsm: styling fixes to security/security.c As we were already making massive changes to security/security.c by moving all of the function header comments above the function definitions, let's take the opportunity to fix various style crimes. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit e261301c851aee401cfc63179ca4d3facd2f098b Author: Paul Moore Date: Thu Feb 16 17:34:14 2023 -0500 lsm: move the remaining LSM hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 1cd2aca64a5dc4edb65539dc26f24e162ab0e11c Author: Paul Moore Date: Thu Feb 16 17:28:31 2023 -0500 lsm: move the io_uring hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 452b670c7222c7bf11b45b13f5a736f96d0be1e3 Author: Paul Moore Date: Thu Feb 16 17:22:36 2023 -0500 lsm: move the perf hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 55e853201a9e0383c9f6d5d800155e334685cd7e Author: Paul Moore Date: Thu Feb 16 17:13:40 2023 -0500 lsm: move the bpf hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit b14faf9c94a66ef398c2c3fa6e141814f04e274e Author: Paul Moore Date: Thu Feb 16 17:00:01 2023 -0500 lsm: move the audit hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 1427ddbe5cc1a3d4ac068cea78638baf95f16c18 Author: Paul Moore Date: Thu Feb 16 16:39:08 2023 -0500 lsm: move the binder hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 43fad282187695e25c51425ee9f5f9f08fe5e15d Author: Paul Moore Date: Thu Feb 16 11:53:49 2023 -0500 lsm: move the sysv hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit ecc419a4453530c410c7031bc69ef34782b1c8ff Author: Paul Moore Date: Wed Feb 15 21:46:31 2023 -0500 lsm: move the key hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 742b99456e86aa3e9176fb1c7db200101876c614 Author: Paul Moore Date: Wed Feb 15 18:14:01 2023 -0500 lsm: move the xfrm hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit ac318aed54987e6bd52dba90dd2ea3dca725b5c0 Author: Paul Moore Date: Wed Feb 15 18:07:41 2023 -0500 lsm: move the Infiniband hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 4a49f592e931962ab3feb9fbb43bea719517670d Author: Paul Moore Date: Wed Feb 15 17:47:10 2023 -0500 lsm: move the SCTP hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 6b6bbe8c02a1bc7ef7f0aa490a3601a16cd145fe Author: Paul Moore Date: Sun Feb 12 15:15:29 2023 -0500 lsm: move the socket hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 2c2442fd46cd162c0b6a07b4560095f03bd3275f Author: Paul Moore Date: Sun Feb 12 15:10:23 2023 -0500 lsm: move the AF_UNIX hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 2bcf51bf2f03cc9fccd3316d361cdf9695fccd11 Author: Paul Moore Date: Sun Feb 12 15:06:59 2023 -0500 lsm: move the netlink hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 130c53bfee4bc70919d356bd8b30137ba4d665b1 Author: Paul Moore Date: Sat Feb 11 19:27:58 2023 -0500 lsm: move the task hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit a0fd6480de489780cdf0940a38bb75b949976d6c Author: Paul Moore Date: Fri Feb 10 13:23:09 2023 -0500 lsm: move the file hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 9348944b775d9a12ee7ab698df5bad85409bdd48 Author: Paul Moore Date: Fri Feb 10 13:20:33 2023 -0500 lsm: move the kernfs hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 916e32584dfaff068792db70c89936801b476ad0 Author: Paul Moore Date: Wed Feb 8 16:31:55 2023 -0500 lsm: move the inode hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 08526a902cc4bc57bb160e5b1114e67a56fc9280 Author: Paul Moore Date: Tue Feb 7 17:44:01 2023 -0500 lsm: move the filesystem hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 36819f185590c1e0e47d095f04bf5da20650fe4d Author: Paul Moore Date: Tue Feb 7 17:33:31 2023 -0500 lsm: move the fs_context hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 1661372c912d1966e21e0cb5463559984df8249b Author: Paul Moore Date: Tue Feb 7 17:06:51 2023 -0500 lsm: move the program execution hook comments to security/security.c This patch relocates the LSM hook function comments to the function definitions, in keeping with the current kernel conventions. This should make the hook descriptions more easily discoverable and easier to maintain. While formatting changes have been done to better fit the kernel-doc style, content changes have been kept to a minimum and limited to text which was obviously incorrect and/or outdated. It is expected the future patches will improve the quality of the function header comments. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit c7cc588bf0054ce33a11b98d05859105c046c706 Author: Andy Shevchenko Date: Mon Mar 6 20:29:13 2023 +0200 spi: Propagate firmware node Propagate firmware node by using a specific API call, i.e. device_set_node(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230306182913.87231-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 6dbbff25b39565c801c87379bc85933fb436518e Author: Jani Nikula Date: Thu Mar 2 18:49:36 2023 +0200 drm/i915/rps: split out display rps parts to a separate file Split out the RPS parts so they can be conditionally compiled out later. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230302164936.3034161-1-jani.nikula@intel.com commit 8f4c92f0024ff2a30f002e85f87e531d49dc023c Merge: fd4cb29f2a3d5 c7aec81b31e43 Author: Andrii Nakryiko Date: Mon Mar 6 09:30:21 2023 -0800 Merge branch 'libbpf: allow users to set kprobe/uprobe attach mode' Menglong Dong says: ==================== From: Menglong Dong By default, libbpf will attach the kprobe/uprobe BPF program in the latest mode that supported by kernel. In this series, we add the support to let users manually attach kprobe/uprobe in legacy/perf/link mode in the 1th patch. And in the 2th patch, we split the testing 'attach_probe' into multi subtests, as Andrii suggested. In the 3th patch, we add the testings for loading kprobe/uprobe in different mode. Changes since v3: - rename eBPF to BPF in the doc - use OPTS_GET() to get the value of 'force_ioctl_attach' - error out on attach mode is not supported - use test_attach_probe_manual__open_and_load() directly Changes since v2: - fix the typo in the 2th patch Changes since v1: - some small changes in the 1th patch, as Andrii suggested - split 'attach_probe' into multi subtests ==================== Signed-off-by: Andrii Nakryiko commit c7aec81b31e43a0aa94ee55d9bb33d70b1046f76 Author: Menglong Dong Date: Mon Mar 6 14:48:33 2023 +0800 selftests/bpf: Add test for legacy/perf kprobe/uprobe attach mode Add the testing for kprobe/uprobe attaching in default, legacy, perf and link mode. And the testing passed: ./test_progs -t attach_probe $5/1 attach_probe/manual-default:OK $5/2 attach_probe/manual-legacy:OK $5/3 attach_probe/manual-perf:OK $5/4 attach_probe/manual-link:OK $5/5 attach_probe/auto:OK $5/6 attach_probe/kprobe-sleepable:OK $5/7 attach_probe/uprobe-lib:OK $5/8 attach_probe/uprobe-sleepable:OK $5/9 attach_probe/uprobe-ref_ctr:OK $5 attach_probe:OK Summary: 1/9 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Menglong Dong Signed-off-by: Andrii Nakryiko Reviewed-by: Biao Jiang Link: https://lore.kernel.org/bpf/20230306064833.7932-4-imagedong@tencent.com commit 7391ec6391e2b129aeaee5462487c404f61157aa Author: Menglong Dong Date: Mon Mar 6 14:48:32 2023 +0800 selftests/bpf: Split test_attach_probe into multi subtests In order to adapt to the older kernel, now we split the "attach_probe" testing into multi subtests: manual // manual attach tests for kprobe/uprobe auto // auto-attach tests for kprobe and uprobe kprobe-sleepable // kprobe sleepable test uprobe-lib // uprobe tests for library function by name uprobe-sleepable // uprobe sleepable test uprobe-ref_ctr // uprobe ref_ctr test As sleepable kprobe needs to set BPF_F_SLEEPABLE flag before loading, we need to move it to a stand alone skel file, in case of it is not supported by kernel and make the whole loading fail. Therefore, we can only enable part of the subtests for older kernel. Signed-off-by: Menglong Dong Signed-off-by: Andrii Nakryiko Reviewed-by: Biao Jiang Link: https://lore.kernel.org/bpf/20230306064833.7932-3-imagedong@tencent.com commit f8b299bc6a0f8695d4005ecff29773c79a1d29af Author: Menglong Dong Date: Mon Mar 6 14:48:31 2023 +0800 libbpf: Add support to set kprobe/uprobe attach mode By default, libbpf will attach the kprobe/uprobe BPF program in the latest mode that supported by kernel. In this patch, we add the support to let users manually attach kprobe/uprobe in legacy or perf mode. There are 3 mode that supported by the kernel to attach kprobe/uprobe: LEGACY: create perf event in legacy way and don't use bpf_link PERF: create perf event with perf_event_open() and don't use bpf_link Signed-off-by: Menglong Dong Signed-off-by: Andrii Nakryiko Reviewed-by: Biao Jiang Link: create perf event with perf_event_open() and use bpf_link Link: https://lore.kernel.org/bpf/20230113093427.1666466-1-imagedong@tencent.com/ Link: https://lore.kernel.org/bpf/20230306064833.7932-2-imagedong@tencent.com Users now can manually choose the mode with bpf_program__attach_uprobe_opts()/bpf_program__attach_kprobe_opts(). commit aad9729ec0e009440ac8c1a4be2204e4d3c08977 Author: Dmitry Osipenko Date: Mon Mar 6 19:39:16 2023 +0300 drm/virtio: Fix handling CONFIG_DRM_VIRTIO_GPU_KMS option VirtIO-GPU got a new config option for disabling KMS. There were two problems left unnoticed during review when the new option was added: 1. The IS_ENABLED(CONFIG_DRM_VIRTIO_GPU_KMS) check in the code was inverted, hence KMS was disabled when it should be enabled and vice versa. 2. The disabled KMS crashed kernel with a NULL dereference in drm_kms_helper_hotplug_event(), which shall not be invoked with a disabled KMS. Fix the inverted config option check in the code and skip handling the VIRTIO_GPU_EVENT_DISPLAY sent by host when KMS is disabled in guest to fix the crash. Acked-by: Gerd Hoffmann Reviewed-by: Emil Velikov Fixes: 72122c69d717 ("drm/virtio: Add option to disable KMS support") Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20230306163916.1595961-1-dmitry.osipenko@collabora.com commit bd5a7886f5ff6899170f3acd85f57c0f43d0371e Author: Jani Nikula Date: Wed Mar 1 14:29:44 2023 +0200 drm/i915/dmc: mass rename dev_priv to i915 Follow the contemporary convention for struct drm_i915_private * naming. Cc: Imre Deak Reviewed-by: Imre Deak Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230301122944.1298929-5-jani.nikula@intel.com commit e81a3c12b88ab685ce10482c3f6d5aa46f08a6fa Author: Jani Nikula Date: Wed Mar 1 14:29:43 2023 +0200 drm/i915/dmc: allocate dmc structure dynamically sizeof(struct intel_dmc) > 1024 bytes, allocated on all platforms as part of struct drm_i915_private, whether they have DMC or not. Allocate struct intel_dmc dynamically, and hide all the dmc details behind an opaque pointer in intel_dmc.c. Care must be taken to take into account all cases: DMC not supported on the platform, DMC supported but not initialized, and DMC initialized but not loaded. For the second case, we need to move the wakeref out of struct intel_dmc. v2: - Rebase to kzalloc dmc after runtime pm get (Imre) Cc: Imre Deak Reviewed-by: Imre Deak Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230301122944.1298929-4-jani.nikula@intel.com commit 1b28c1c789d0c11be213bb5d892f9a094ab8e201 Author: Jani Nikula Date: Wed Mar 1 14:29:42 2023 +0200 drm/i915/dmc: add i915_to_dmc() and dmc->i915 and use them Start preparing for dynamically allocated struct intel_dmc by adding i915_to_dmc() and dmc->i915, and using them. Take the future NULL dmc pointer into account already now, and add separate logging for initialization in the DMC debugfs. v3: - Obtain runtime pm reference first (Imre) v2: - Don't reduce debugfs output (Imre) Cc: Imre Deak Reviewed-by: Imre Deak Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230301122944.1298929-3-jani.nikula@intel.com commit fe00866c65602e94c1b6b3d3efcea3633330b02f Author: Jani Nikula Date: Wed Mar 1 14:29:41 2023 +0200 drm/i915/dmc: use has_dmc_id_fw() instead of poking dmc->dmc_info directly This will help in follow-up changes. Cc: Imre Deak Reviewed-by: Imre Deak Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230301122944.1298929-2-jani.nikula@intel.com commit 825f0de2fdda691776b6f45af1d3c9ca3d5ff7fc Author: Jani Nikula Date: Wed Mar 1 14:29:40 2023 +0200 drm/i915/power: move dc state members to struct i915_power_domains There's only one reference to the struct intel_dmc members dc_state, target_dc_state, and allowed_dc_mask within intel_dmc.c, begging the question why they are under struct intel_dmc to begin with. Moreover, the only references to i915->display.dmc outside of intel_dmc.c are to these members. They don't belong. Move them from struct intel_dmc to struct i915_power_domains, which seems like a more suitable place. Cc: Imre Deak Reviewed-by: Imre Deak Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20230301122944.1298929-1-jani.nikula@intel.com commit 4ed4791afb34c61650b17407846174a72e4034f4 Author: Jason Gunthorpe Date: Wed Mar 1 15:30:29 2023 -0400 iommufd/selftest: Add a selftest for iommufd_device_attach() with a hwpt argument This can now be covered since we have a full struct device. Link: https://lore.kernel.org/r/12-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 65c619ae06801e1f21cff1a78c7e64923ad17896 Author: Jason Gunthorpe Date: Wed Mar 1 15:30:28 2023 -0400 iommufd/selftest: Make selftest create a more complete mock device iommufd wants to use more infrastructure, like the iommu_group, that the mock device does not support. Create a more complete mock device that can go through the whole cycle of ownership, blocking domain, and has an iommu_group. This requires creating a real struct device on a real bus to be able to connect it to a iommu_group. Unfortunately we cannot formally attach the mock iommu driver as an actual driver as the iommu core does not allow more than one driver or provide a general way for busses to link to iommus. This can be solved with a little hack to open code the dev_iommus struct. With this infrastructure things work exactly the same as the normal domain path, including the auto domains mechanism and direct attach of hwpts. As the created hwpt is now an autodomain it is no longer required to destroy it and trying to do so will trigger a failure. Link: https://lore.kernel.org/r/11-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit f8406f65c1cfe4c8e3646ea66f5bac07b1f10b55 Author: Jason Gunthorpe Date: Wed Mar 1 15:30:27 2023 -0400 iommufd/selftest: Rename the remaining mock device_id's to stdev_id For consistency. Link: https://lore.kernel.org/r/10-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 11a86ae93d7595ec7ed27536ac8a8292dd5746d5 Author: Jason Gunthorpe Date: Wed Mar 1 15:30:26 2023 -0400 iommufd/selftest: Rename domain_id to hwpt_id for FIXTURE iommufd_mock_domain In this case the domain_id was acting as the hwpt_id, so be clearer. Link: https://lore.kernel.org/r/9-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit a150c4229700ded29cf6e376c4137d7c3acaefad Author: Jason Gunthorpe Date: Wed Mar 1 15:30:25 2023 -0400 iommufd/selftest: Rename domain_id to stdev_id for FIXTURE iommufd_ioas Nothing uses this for anything more than checking if a mock domain had been created. Rename it to stdev_id to match our naming system. Currently domain_id is the hwpt_id. Link: https://lore.kernel.org/r/8-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 95ccb25e32af8a86286df215f19ab2c0418cbcc9 Author: Jani Nikula Date: Wed Mar 1 15:54:18 2023 +0200 drm/i915: remove unnecessary intel_pm.h includes As intel_pm.[ch] used to contain much more, intel_pm.h was included in a lot of places. Many of them are now unnecessary. Remove. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ab9a7147b0cd63d95b9f27ed40615b9c9be18f84.1677678803.git.jani.nikula@intel.com commit 893a6c224a24be49ea5a30315d1ae5967598a43d Author: Jani Nikula Date: Wed Mar 1 15:54:17 2023 +0200 drm/i915/pm: drop intel_suspend_hw() All intel_suspend_hw() does is clear PCH_LP_PARTITION_LEVEL_DISABLE bit in SOUTH_DSPCLK_GATE_D for LPT LP. intel_suspend_hw() gets called from i915_drm_suspend(). However, i915_drm_suspend_late() calls intel_display_power_suspend_late(), which in turn calls hsw_enable_pc8() on HSW and BDW. The first thing that does is clear PCH_LP_PARTITION_LEVEL_DISABLE bit in SOUTH_DSPCLK_GATE_D. Remove the duplicated clearing of the bit, effectively delaying it from i915_drm_suspend() to i915_drm_suspend_late(), and remove the unnecessary intel_suspend_hw() function altogether. Cc: Imre Deak Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/f732a7922c2450b41169c9b79a80fba97ab00592.1677678803.git.jani.nikula@intel.com commit d3708182cbc3404aa2f7fd5ccfa07328018f4bf5 Author: Jani Nikula Date: Wed Mar 1 15:54:16 2023 +0200 drm/i915/pm: drop intel_pm_setup() All the init in intel_pm_setup() is related to runtime pm. Move them to intel_runtime_pm_init_early(), and remove intel_pm_setup(). Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/b01f9bf0afa9abaece5d0f76aecde69e2679f662.1677678803.git.jani.nikula@intel.com commit 26f8c146924fac0f50157fe22d1948fcfadae9f6 Author: Jani Nikula Date: Wed Mar 1 15:54:15 2023 +0200 drm/i915/wm: remove display/ prefix from include Remove the leftover from moving and renaming the file from driver top level. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/f11cbbdb5a5c8961fcae0b3f6c87860ee00f8c26.1677678803.git.jani.nikula@intel.com commit c3f059483671426266f681833bac6c09b0736247 Author: Jani Nikula Date: Wed Mar 1 17:19:49 2023 +0200 drm/i915/display: split out DSC and DSS registers Relatively few places need the DSC and DSS register definitions. Move them to intel_vdsc_regs.h. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230301151949.1591501-1-jani.nikula@intel.com commit 9a8ab39f7f8d32cf36dcd80cdaaec4998e834cf5 Author: Sam Protsenko Date: Wed Feb 22 22:21:32 2023 -0600 clk: samsung: exynos850: Add AUD and HSI main gate clocks Add main gate clocks for controlling AUD and HSI CMUs: - gout_aud_cmu_aud_pclk - gout_hsi_cmu_hsi_pclk Those clocks were marked as CLK_IGNORE_UNUSED, as system hangs on boot otherwise. While at it, add missing PPMU (Performance Profiling Monitor Unit) clocks for CMU_HSI. Signed-off-by: Sam Protsenko Reviewed-by: Chanho Park Link: https://lore.kernel.org/r/20230223042133.26551-6-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit e145c7650728cad74f18328478777849a5e5e1de Author: Sam Protsenko Date: Wed Feb 22 22:21:31 2023 -0600 clk: samsung: exynos850: Implement CMU_G3D domain CMU_G3D clock domain provides clocks for Mali-G52 GPU and bus clocks for BLK_G3D. This patch adds next clocks: - bus clocks in CMU_TOP for CMU_G3D - all internal CMU_G3D clocks - leaf clocks for GPU, TZPC (TrustZone Protection Controller) and SysReg G3D_CMU_G3D clock was marked as CLK_IGNORE_UNUSED, as system hangs on boot otherwise. Reviewed-by: Chanho Park Signed-off-by: Sam Protsenko Link: https://lore.kernel.org/r/20230223042133.26551-5-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit f2819ea168ef6a66c6b91fc30ce659a030268add Author: Sam Protsenko Date: Wed Feb 22 22:21:30 2023 -0600 clk: samsung: clk-pll: Implement pll0818x PLL type pll0818x PLL is used in Exynos850 SoC for CMU_G3D PLL. Operation-wise, pll0818x is the same as pll0822x. The only difference is: - pl0822x is integer PLL with Middle FVCO (950 to 2400 MHz) - pl0818x is integer PLL with Low FVCO (600 to 1200 MHz) Add pll0818x type as an alias to pll0822x. Reviewed-by: Chanho Park Signed-off-by: Sam Protsenko Link: https://lore.kernel.org/r/20230223042133.26551-4-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit ac409adafb5eb195a3c7f02a58509bf172d6c595 Merge: a4c78367f62ae 284f6dcb50ae7 Author: Krzysztof Kozlowski Date: Mon Mar 6 16:56:16 2023 +0100 Merge branch 'for-v6.4/clk-exynos850-dt-binding' into next/clk Merge Devicetree bindings with new Exynos850 clock IDs (headers), used also by the clock drivers. Signed-off-by: Krzysztof Kozlowski commit a4c78367f62ae36aa3529029346788cc7f5e3073 Author: Sam Protsenko Date: Wed Feb 22 22:19:35 2023 -0600 clk: samsung: Set dev in samsung_clk_init() Some drivers set dev to context in order to implement PM. Make that part of samsung_clk_init() instead of assigning `ctx->dev = dev' separately. No functional change. Acked-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Sam Protsenko Link: https://lore.kernel.org/r/20230223041938.22732-4-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit 65bf1fbe784cafaa10906b1ba1402920c61f4a7e Author: Sam Protsenko Date: Wed Feb 22 22:19:33 2023 -0600 clk: samsung: Don't pass reg_base to samsung_clk_register_pll() Base address can be derived from context structure. Remove `base' argument from samsung_clk_register_pll() and use `ctx->reg_base' instead, as it's done in other clock registering functions. No functional change. Acked-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Sam Protsenko Link: https://lore.kernel.org/r/20230223041938.22732-2-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit 45dab81899800e0e2874f6c9e58b8b0343f33edf Author: Sam Protsenko Date: Wed Feb 22 22:19:34 2023 -0600 clk: samsung: Remove np argument from samsung_clk_init() The code using `np' argument was removed from samsung_clk_init(). Remove that leftover parameter as well. No functional change. Fixes: d5e136a21b20 ("clk: samsung: Register clk provider only after registering its all clocks") Acked-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Sam Protsenko Link: https://lore.kernel.org/r/20230223041938.22732-3-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit 35ade1eb465438cfd16fdc3a4905dd82f658fdce Author: Sam Protsenko Date: Wed Feb 22 22:21:33 2023 -0600 arm64: dts: exynos: Add CMU_G3D node for Exynos850 SoC Add missing G3D clock domain to Exynos850 SoC device tree. Reviewed-by: Chanho Park Signed-off-by: Sam Protsenko Link: https://lore.kernel.org/r/20230223042133.26551-7-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit 017cdefe9dce8b241c3c506ef4cd51e90084e7c1 Author: Krzysztof Kozlowski Date: Fri Jan 27 20:40:57 2023 +0100 arm64: dts: exynos: move MIPI phy to PMU node in Exynos5433 The MIPI phy is actually part of the Power Management Unit system controller. It does not have own address space, thus keeping the node under soc causes warnings: exynos5433-tm2e.dtb: soc@0: video-phy: {'compatible': ['samsung,exynos5433-mipi-video-phy'], ... should not be valid under {'type': 'object'} Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20230127194057.186458-9-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 284f6dcb50ae7f25167617c89aa2d3f93323ee67 Author: Sam Protsenko Date: Wed Feb 22 22:21:29 2023 -0600 dt-bindings: clock: exynos850: Add AUD and HSI main gate clocks Add main gate clocks for controlling AUD and HSI CMUs: - gout_aud_cmu_aud_pclk - gout_hsi_cmu_hsi_pclk While at it, add missing PPMU (Performance Profiling Monitor Unit) clocks for CMU_HSI. Acked-by: Rob Herring Signed-off-by: Sam Protsenko Link: https://lore.kernel.org/r/20230223042133.26551-3-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit 521568cff7065069bfb02b3a9945bac637d2e324 Author: Sam Protsenko Date: Wed Feb 22 22:21:28 2023 -0600 dt-bindings: clock: exynos850: Add Exynos850 CMU_G3D CMU_G3D generates Gondul GPU and bus clocks for BLK_G3D. Add clock indices and binding documentation for CMU_G3D. Acked-by: Rob Herring Signed-off-by: Sam Protsenko Link: https://lore.kernel.org/r/20230223042133.26551-2-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit 62aeb94433fcec80241754b70d0d1836d5926b0a Author: Jan Kara Date: Wed Mar 1 11:59:39 2023 +0100 ext2: Check block size validity during mount Check that log of block size stored in the superblock has sensible value. Otherwise the shift computing the block size can overflow leading to undefined behavior. Reported-by: syzbot+4fec412f59eba8c01b77@syzkaller.appspotmail.com Signed-off-by: Jan Kara commit e9cd1d9a34131fb56bef469d4e1cd31bd1b515e2 Author: Jan Kara Date: Wed Mar 1 12:02:08 2023 +0100 ext2: Correct maximum ext2 filesystem block size Ext2 has traditionally supported filesystem block sizes upto page size or upto 65536. Macro EXT2_MAX_BLOCK_SIZE is set to 4096, however that is never used in ext2 so practically we always allowed whatever sb_set_blocksize() accepted. Fix value of EXT2_MAX_BLOCK_SIZE because it will be used in the next patch. Signed-off-by: Jan Kara commit 434b8356df416678fb29d21b02bb5755c5f778f0 Author: Ye Xingchen Date: Fri Feb 10 17:23:56 2023 +0800 mtd: rawnand: orion: use devm_platform_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/202302101723563685569@zte.com.cn commit fd4cb29f2a3d54ec7b4e012300321601af10bd68 Author: Rong Tao Date: Sat Mar 4 23:17:04 2023 +0800 tools/resolve_btfids: Add /libsubcmd to .gitignore Add libsubcmd to .gitignore, otherwise after compiling the kernel it would result in the following: # bpf-next...bpf-next/master ?? tools/bpf/resolve_btfids/libsubcmd/ Signed-off-by: Rong Tao Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/tencent_F13D670D5D7AA9C4BD868D3220921AAC090A@qq.com commit 9409d8cf78d9c5471cfd229e652f12050c6dbbde Author: Pandith N Date: Thu Feb 16 20:36:08 2023 +0200 gpio: elkhartlake: Introduce Intel Elkhart Lake PSE GPIO This driver adds support for Intel Elkhart Lake PSE GPIO controller, using Intel Tangier as a library driver. Signed-off-by: Pandith N Co-developed-by: Raag Jadav Signed-off-by: Raag Jadav Co-developed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit dc537030647a451bca169209d05b50d2ca3fe4f6 Author: Andy Shevchenko Date: Thu Feb 16 20:03:42 2023 +0200 gpio: merrifield: Utilise temporary variable for struct device We have a temporary variable to keep pointer to struct device. Utilise it inside the ->probe() implementation. Signed-off-by: Andy Shevchenko commit dd0ccef23649d2e54aea1b317be36b2dbde0f329 Author: Andy Shevchenko Date: Mon Jan 16 15:44:46 2023 +0100 gpio: merrifield: Use dev_err_probe() Improve error handling in the probe() function with dev_err_probe(). Signed-off-by: Andy Shevchenko commit 34840be53410c29d67ffb304588a258fab785fd7 Author: Pandith N Date: Thu Feb 16 20:34:19 2023 +0200 gpio: merrifield: Adapt to Intel Tangier GPIO driver Make use of Intel Tangier GPIO as a library driver for Merrifield. Signed-off-by: Pandith N Co-developed-by: Raag Jadav Signed-off-by: Raag Jadav Co-developed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit d2c19e89e03cced2417175f48586648ae88f7cbf Author: Pandith N Date: Thu Feb 16 18:53:54 2023 +0530 gpio: tangier: Introduce Intel Tangier GPIO driver Intel Elkhart Lake and Merrifield platforms have same GPIO IP. Intel Tangier implements the common GPIO functionalities for both Elkhart Lake and Merrifield platforms. Signed-off-by: Pandith N Co-developed-by: Raag Jadav Signed-off-by: Raag Jadav Co-developed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit 813420eb47fb8f76433788218c27e72c072f6b89 Author: Jason-JH.Lin Date: Mon Mar 6 16:06:58 2023 +0800 drm/mediatek: Change mmsys compatible for mt8195 mediatek-drm Because compatible of mt8195 is changing from "mediatek,mt8195-mmsys" to "mediatek,mt8195-vdosys0". We have to revert the multiple compatible finding function and add driver data of mt8195 vdosys0 to mediatek-drm and the sub driver. Signed-off-by: Jason-JH.Lin Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230306080659.15261-2-jason-jh.lin@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 2cfdeaa07be391de5f2faf79a7319f04f39914e3 Author: Jason Gunthorpe Date: Wed Mar 1 15:30:24 2023 -0400 iommufd/selftest: Rename the sefltest 'device_id' to 'stdev_id' It is too confusing now that we have the 'dev_id' as part of the main interface. Make it clear this is the special selftest device object. This object is analogous to the VFIO device FD. Link: https://lore.kernel.org/r/7-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 339fbf3ae144263725ccb7694cd2366d5e0c6ebf Author: Jason Gunthorpe Date: Wed Mar 1 15:30:23 2023 -0400 iommufd: Make iommufd_hw_pagetable_alloc() do iopt_table_add_domain() The HWPT is always linked to an IOAS and once a HWPT exists its domain should be fully mapped. This ended up being split up into device.c during a two phase creation that was a bit confusing. Move the iopt_table_add_domain() into iommufd_hw_pagetable_alloc() by having it call back to device.c to complete the domain attach in the required order. Calling iommufd_hw_pagetable_alloc() with immediate_attach = false will work on most drivers, but notably the SMMU drivers will fail because they can't decide what kind of domain to create until they are attached. This will be fixed when the domain_alloc function can take in a struct device. Link: https://lore.kernel.org/r/6-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 7e7ec8a5692105450bbfde8c310af606e216add0 Author: Jason Gunthorpe Date: Wed Mar 1 15:30:22 2023 -0400 iommufd: Move iommufd_device to iommufd_private.h hw_pagetable.c will need this in the next patches. Link: https://lore.kernel.org/r/5-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 25cde97d953208bca6c2a0556b3b3d5bda4472a0 Author: Jason Gunthorpe Date: Wed Mar 1 15:30:21 2023 -0400 iommufd: Move ioas related HWPT destruction into iommufd_hw_pagetable_destroy() A HWPT is permanently associated with an IOAS when it is created, remove the strange situation where a refcount != 0 HWPT can have been disconnected from the IOAS by putting all the IOAS related destruction in the object destroy function. Initializing a HWPT is two stages, we have to allocate it, attach it to a device and then populate the domain. Once the domain is populated it is fully linked to the IOAS. Arrange things so that all the error unwinds flow through the iommufd_hw_pagetable_destroy() and allow it to handle all cases. Link: https://lore.kernel.org/r/4-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 342b9cab8e0cb6d35821ded00769a1172d171771 Author: Jason Gunthorpe Date: Wed Mar 1 15:30:20 2023 -0400 iommufd: Consistently manage hwpt_item This should be added immediately after every iopt_table_add_domain(), and deleted after every iopt_table_remove_domain() under the ioas->mutex. Tidy things to be consistent. Link: https://lore.kernel.org/r/3-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 7214c1c85fe464929e9c32f90f81d65cd44b8ff6 Author: Jason Gunthorpe Date: Wed Mar 1 15:30:19 2023 -0400 iommufd: Add iommufd_lock_obj() around the auto-domains hwpts A later patch will require this locking - currently under the ioas mutex the hwpt can not have a 0 reference and be on the list. Link: https://lore.kernel.org/r/2-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 085fcc7eb759c2b483f85b322e8c5146610010fd Author: Jason Gunthorpe Date: Wed Mar 1 15:30:18 2023 -0400 iommufd: Assert devices_lock for iommufd_hw_pagetable_has_group() The hwpt->devices list is locked by this, make it clearer. Link: https://lore.kernel.org/r/1-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 054a0da568b94f6b69ccf34b80f7c41a6623eb11 Merge: 2614d66a03ddb 4d60cac951fd2 Author: Mark Brown Date: Mon Mar 6 14:07:40 2023 +0000 regmap: Add support for devices with no interrupt readback Merge series from William Breathitt Gray : There are devices which have interrupt support with mask and ack registers but no status register. Add a flag which lets us support them, we just assume that all the interrupts fired. commit 2614d66a03ddbf50edae36d9c4be4bf487eaaddb Merge: 9b400171a69d2 522272047dc63 Author: Mark Brown Date: Mon Mar 6 14:03:14 2023 +0000 Minor SoundWire Regmap Tweaks Merge series from Charles Keepax : One minor correction to a comment and updating the allowed register sizes for the SoundWire register map, to allow support of additional hardware. commit 6a534cfcfdbbd69eaac6656eb8c28a8fa27bb12e Author: Kuninori Morimoto Date: Mon Mar 6 01:44:13 2023 +0000 ASoC: soc-core.c: remove useless dev_dbg() soc-core.c is using dev_dbg(), but some of them are useless. It indicates many dev_dbg() at snd_soc_runtime_get_dai_fmt(), but all of them are just noise, almost no meanings. dev_dbg() on soc_probe_link_dais() indicates dai link and its loop order, but it is just noise, no information. dev_dbg() on snd_soc_register_dai() is duplicated. This patch cleanup these. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ttyy64cy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2ba4e3bd65213f3eae75fcd316ae38d4286d333e Author: Matthias Brugger Date: Thu Feb 9 17:24:03 2023 +0100 soc: mediatek: mtk-svs: delete node name check The function svs_add_device_link is called only internally from the SoC specific probe functions. We don't need to check if the node_name is null because that would mean that we have a buggy SoC probe function in the first place. Reviewed-by: Roger Lu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230209162403.21113-1-matthias.bgg@kernel.org Signed-off-by: Matthias Brugger commit 549053b69c54aecc6f44ddefe6c245a35f162cf4 Author: Roy-CW.Yeh Date: Mon Feb 6 17:11:09 2023 +0800 soc: mediatek: mutex: support MT8195 VPPSYS Add MT8195 VPPSYS0 and VPPSYS1 mutex info to driver data Signed-off-by: Roy-CW.Yeh Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Change-Id: Ie371dc9dcf35ea308d9460acd60fb9c3d6475deb Link: https://lore.kernel.org/r/20230206091109.1324-7-moudy.ho@mediatek.com Signed-off-by: Matthias Brugger commit c54d2b99c62ff6e371ce4a9ca925be22ed190de3 Author: Roy-CW.Yeh Date: Mon Feb 6 17:11:08 2023 +0800 soc: mediatek: mutex: Add mtk_mutex_set_mod support to set MOD1 Add mtk_mutex_set_mod support to set MOD1 Signed-off-by: Roy-CW.Yeh Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230206091109.1324-6-moudy.ho@mediatek.com Signed-off-by: Matthias Brugger commit dd4f373ef94bd186e18a7366adfb7b98bc31b786 Author: Roy-CW.Yeh Date: Mon Feb 6 17:11:07 2023 +0800 soc: mediatek: mmsys: add config api for RSZ switching and DCM Due to MT8195 HW design, some RSZs have additional settings that need to be configured in MMSYS. Signed-off-by: Roy-CW.Yeh Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Change-Id: I41978bf14951221c88abbe70d8c24cb0770e11e3 Link: https://lore.kernel.org/r/20230206091109.1324-5-moudy.ho@mediatek.com Signed-off-by: Matthias Brugger commit 7ceff25a184d64635ad911bc98f9497290708963 Author: Roy-CW.Yeh Date: Mon Feb 6 17:11:04 2023 +0800 dt-bindings: soc: mediatek: Add support for MT8195 VPPSYS Add compatible for MT8195 VPPSYS on MUTEX. Signed-off-by: Roy-CW.Yeh Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230206091109.1324-2-moudy.ho@mediatek.com Signed-off-by: Matthias Brugger commit 5061c47ebf6edaf024fed1eaf63499fe7183c54e Author: Roger Lu Date: Thu Feb 2 20:41:03 2023 +0800 soc: mediatek: mtk-svs: use common function to disable restore voltages The timing of disabling SVS bank and restore default voltage is more than one place. Therefore, add a common function to use for removing the superfluous codes. Signed-off-by: Roger Lu Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230202124104.16504-3-roger.lu@mediatek.com Signed-off-by: Matthias Brugger commit 9f195f3a1e696b6576988c1e58fa7389beae3351 Author: Roger Lu Date: Thu Feb 2 20:41:02 2023 +0800 soc: mediatek: mtk-svs: use svs get efuse common function SVS might need to read both svs efuse and thermal efuse on the probe flow. Therefore, add a common efuse read function to remove the superfluous codes. Signed-off-by: Roger Lu Link: https://lore.kernel.org/r/20230202124104.16504-2-roger.lu@mediatek.com Signed-off-by: Matthias Brugger commit 6154a79fdcb3b80fb91c25b4528df18c538f080d Author: Arınç ÜNAL Date: Sun Feb 12 15:13:54 2023 +0300 arm: dts: mt7623: disable home key on Bananapi BPI-R2 There's no home key on Bananapi BPI-R2. Disable it. Signed-off-by: Arınç ÜNAL Acked-by: Frank Wunderlich Link: https://lore.kernel.org/r/20230212121354.44590-1-arinc.unal@arinc9.com Signed-off-by: Matthias Brugger commit 90ae0327fb89f74024c46955dfc3184357bb5582 Author: Xiangsheng Hou Date: Wed Feb 1 10:14:58 2023 +0800 arm: dts: mediatek: Fix existing NAND controller node name Change the existing node name in order to match NAND controller DT bindings. Signed-off-by: Xiangsheng Hou Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230201021500.26769-4-xiangsheng.hou@mediatek.com Signed-off-by: Matthias Brugger commit 404200964b24b19fe93325d24811f59a2a8b4de7 Author: Matthias Brugger Date: Thu Feb 9 17:03:55 2023 +0100 arm64: dts: mt8167: Align mmsys node name with dtschema The node name should be generic and mmsys expcets 'syscon' Reviewed-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230209160357.19307-2-matthias.bgg@kernel.org Signed-off-by: Matthias Brugger commit 018f1d4fa457af98c9618c0bd17a427745f872fa Author: Moudy Ho Date: Mon Feb 6 17:11:06 2023 +0800 arm64: dts: mediatek: mt8195: add MUTEX configuration for VPPSYS In MT8195, the MMSYS has two Video Processor Pipepline Subsystems named VPPSYS0 and VPPSYS1, each with specific MUTEX to control Start of Frame(SOF) and End of Frame (EOF) signals. Before working with them, the addresses, interrupts, clocks and power domains need to be set up in dts. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230206091109.1324-4-moudy.ho@mediatek.com Signed-off-by: Matthias Brugger commit 981f808e641c624fdf4ece806b599ae66e875ee4 Author: Roy-CW.Yeh Date: Mon Feb 6 17:11:05 2023 +0800 arm64: dts: mediatek: mt8195: add MMSYS configuration for VPPSYS With the change of the MMSYS binding file for MT8195, the compatible name of VPPSYS in dts need to be fixed to match the definition. Signed-off-by: Roy-CW.Yeh Signed-off-by: Moudy Ho Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20230206091109.1324-3-moudy.ho@mediatek.com Signed-off-by: Matthias Brugger commit 0e3661de6a6593a2dd98cd0d5fe78210e260f823 Author: Xiangsheng Hou Date: Wed Feb 1 10:14:57 2023 +0800 arm64: dts: mediatek: Fix existing NAND controller node name Change the existing node name in order to match NAND controller DT bindings. Signed-off-by: Xiangsheng Hou Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230201021500.26769-3-xiangsheng.hou@mediatek.com Signed-off-by: Matthias Brugger commit b36cecf247157c36aa8f41b5783122820b2c5456 Merge: 1ef5decf693bc 47fef94afeae2 Author: Mark Brown Date: Mon Mar 6 13:30:40 2023 +0000 Add Quad SPI driver for StarFive JH7110 SoC Merge series from William Qiu : This patchset adds initial rudimentary support for the StarFive Quad SPI controller driver. And this driver will be used in StarFive's VisionFive 2 board.The first patch constrain minItems/maxItems of resets for JH7110 QSPI and Patch 2 adds support for StarFive JH7110 QSPI. commit 1ef5decf693bc45e801d00dc740d584dbd54467a Merge: e8e83f61b40ce ada850541ad33 Author: Mark Brown Date: Mon Mar 6 13:30:34 2023 +0000 spi: Build coverage cleanups and improvements Merge series from Mark Brown : This series opens up build coverage of a bunch of SPI drivers by allowing build under COMPILE_TEST where possible, while also adding appropriate architecture specific dependencies to a couple of drivers that didn't have them so they don't show up in builds when they're not useful. We also have one fix for the dependencies of the s3c24xx driver which was turned up in the process of doing this. commit 4740479e2d4800835b64840cbfc94ffa883c8f51 Merge: 316ddb133a087 e902324826ec2 Author: Mark Brown Date: Mon Mar 6 13:30:28 2023 +0000 Refactor Vangogh acp5x machine driver Merge series from Lucas Tanure : Provide small fixes and refactor the code for easier insertion of a new platform using the same acp5x machine driver. commit 316ddb133a087e757c1e1d7fd3fab2b2d55153f4 Merge: 47ef3e60b6b73 448b06ba107d9 Author: Mark Brown Date: Mon Mar 6 13:30:21 2023 +0000 Add "mclk" support for maxim,max9867 Merge series from richard.leitner@linux.dev: This series adds support for the clocks properties in the maxim,max9867 bindings. Furthermore the binding definitions are converted from txt to yaml. The clock property is needed to define the mclk for one of our boards which uses the the i.MX8MP SAI MCLK as clock for the maxim,max9867. commit 47ef3e60b6b739598c3440500a52bb36678a4e8d Merge: faabfd5cfa8b0 f5db4d00f7387 Author: Mark Brown Date: Mon Mar 6 13:30:13 2023 +0000 Add support for the TAS5733 Merge series from Kamel Bouhara : This small series extends the tas571x driver to support the TAS5733 audio power amplifier. commit faabfd5cfa8b0da4246afcf21f768938323824fa Merge: 0fde318784d6b 15dbfc04e6865 Author: Mark Brown Date: Mon Mar 6 13:30:05 2023 +0000 ASoC: microchip: some cleanups for AT91 sound drivers Merge series from Claudiu Beznea : This series does some cleanups for Microchip AT91 sound drivers. Along with it I took the chance and updated MAINTAINERS file. commit 0fde318784d6bf15e264b28dd0776a4bf69587f7 Merge: 7ae87d3c5becb 38c042b59af02 Author: Mark Brown Date: Mon Mar 6 13:29:58 2023 +0000 RZ/G2L SSI: Update interrupt numbers Merge series from Prabhakar : Hi All, This patch series aims to fix interrupt numbers for SSI channels and updates the DT binding and the driver accordingly. Note, this patch series applies on top of [0]. [0] https://patchwork.kernel.org/project/linux-renesas-soc/cover/20230131223529.11905-1-prabhakar.mahadev-lad.rj@bp.renesas.com/ Cheers, Prabhakar Lad Prabhakar (4): ASoC: dt-bindings: renesas,rz-ssi: Update interrupts and interrupt-names properties ASoC: sh: rz-ssi: Update interrupt handling for half duplex channels arm64: dts: renesas: r9a07g044: Update IRQ numbers for SSI channels arm64: dts: renesas: r9a07g043: Update IRQ numbers for SSI channels .../bindings/sound/renesas,rz-ssi.yaml | 21 ++++--- arch/arm64/boot/dts/renesas/r9a07g043.dtsi | 19 +++--- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 19 +++--- sound/soc/sh/rz-ssi.c | 63 +++++++++++++------ 4 files changed, 70 insertions(+), 52 deletions(-) -- 2.25.1 commit 7ae87d3c5becb728133c44506b7f8af314b81d85 Merge: cc4b3c0944dad 2b5a30cafb2ef Author: Mark Brown Date: Mon Mar 6 13:29:52 2023 +0000 SoC: SOF: Intel: hda/mtl: Improve and enable DMI L1 Merge series from Peter Ujfalusi : The first patch will improve the managing of DMI L1 by tracking it's enabled/disabled state to avoid unconditional changes to it's state. The remaining two patch will enable the DMI L1 for MTL platforms (ACE 1.0) commit cc4b3c0944dadfb6e5341ec6486ef4b795476f2b Merge: 631b8a8bb448e eb7ff1cbe7494 Author: Mark Brown Date: Mon Mar 6 13:29:46 2023 +0000 Add the PowerQUICC audio support using the QMC Merge series from Herve Codina : This series adds support for audio using the QMC controller available in some Freescale PowerQUICC SoCs. This series contains three parts in order to show the different blocks hierarchy and their usage in this support. The first one is related to TSA (Time Slot Assigner). The TSA handles the data present at the pin level (TDM with up to 64 time slots) and dispatchs them to one or more serial controller (SCC). The second is related to QMC (QUICC Multichannel Controller). The QMC handles the data at the serial controller (SCC) level and splits again the data to creates some virtual channels. The last one is related to the audio component (QMC audio). It is the glue between the QMC controller and the ASoC component. It handles one or more QMC virtual channels and creates one DAI per QMC virtual channels handled. commit 46c59901d47930b4782e34720f13d71012ce43a3 Author: Chester Lin Date: Mon Feb 20 10:33:20 2023 +0800 MAINTAINERS: Add NXP S32 pinctrl maintainer and reviewer Add myself as a maintainer and add NXP S32 Linux Team as a review group for S32 pinctrl patches. Signed-off-by: Chester Lin Link: https://lore.kernel.org/r/20230220023320.3499-4-clin@suse.com Signed-off-by: Linus Walleij commit fd84aaa8173d3ff86f8df2009921336a1ea53a8a Author: Chester Lin Date: Mon Feb 20 10:33:19 2023 +0800 pinctrl: add NXP S32 SoC family support Add the pinctrl driver for NXP S32 SoC family. This driver is mainly based on NXP's downstream implementation on nxp-auto-linux repo[1]. [1] https://github.com/nxp-auto-linux/linux/tree/bsp35.0-5.15.73-rt/drivers/pinctrl/freescale Signed-off-by: Matthew Nunez Signed-off-by: Phu Luu An Signed-off-by: Stefan-Gabriel Mirea Signed-off-by: Larisa Grigore Signed-off-by: Ghennadi Procopciuc Signed-off-by: Andrei Stefanescu Signed-off-by: Radu Pirea Signed-off-by: Chester Lin Link: https://lore.kernel.org/r/20230220023320.3499-3-clin@suse.com Signed-off-by: Linus Walleij commit 2545625b8b244c7ecc473aeb188164caa55cc71b Author: Chester Lin Date: Mon Feb 20 10:33:18 2023 +0800 dt-bindings: pinctrl: add schema for NXP S32 SoCs Add DT schema for the pinctrl driver of NXP S32 SoC family. Signed-off-by: Larisa Grigore Signed-off-by: Ghennadi Procopciuc Signed-off-by: Chester Lin Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230220023320.3499-2-clin@suse.com Signed-off-by: Linus Walleij commit e8e83f61b40ce6ad7da7648ea496112c8740d7a4 Merge: ae2ade4ba5816 60a6c8257f414 Author: Mark Brown Date: Mon Mar 6 13:13:13 2023 +0000 spi: mpc52xx-psc: Modernize probe Merge series from Rob Herring : This started as just removing open coded parsing and address translation of "reg", and ended up with cleaning up the probe functions to use modern, preferred APIs for driver probe. It is compile tested only. commit 00408f28c344fd1cafe6e66fe0f454607a2605f9 Author: Andy Shevchenko Date: Wed Feb 15 15:42:42 2023 +0200 pinctrl: at91: Utilise temporary variable for struct device We have a temporary variable to keep pointer to struct device. Utilise it inside the ->probe() implementation. Signed-off-by: Andy Shevchenko Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230215134242.37618-6-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 472bbb2cfd6384fe4c4b956af2170c1225fe2a92 Author: Andy Shevchenko Date: Wed Feb 15 15:42:41 2023 +0200 pinctrl: at91: Use dev_err_probe() instead of custom messaging The custom message has no value except printing the error code, the same does dev_err_probe(). Let's use the latter for the sake of unification. Note that some APIs already have messaging in them and some simply do not require the current noise. Signed-off-by: Andy Shevchenko Reviewed-by: Claudiu Beznea Tested-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230215134242.37618-5-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 6194485db61846cb76c2479d39643db539aa4b53 Author: Andy Shevchenko Date: Wed Feb 15 15:42:40 2023 +0200 pinctrl: at91: Use of_device_get_match_data() Use of_device_get_match_data() to simplify the code. Signed-off-by: Andy Shevchenko Reviewed-by: Claudiu Beznea Tested-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230215134242.37618-4-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 415a099ea55ae716b69beefdcaa654b96087c016 Author: Andy Shevchenko Date: Wed Feb 15 15:42:39 2023 +0200 pinctrl: at91: Don't mix non-devm calls with devm ones Replace devm_clk_get() by devm_clk_get_enabled() and drop unneeded code pieces. This will make sure we keep the ordering of the resource allocation correct. Signed-off-by: Andy Shevchenko Reviewed-by: Claudiu Beznea Tested-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230215134242.37618-3-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit f494c1913cbb34b9e2078b7b045c87c1ca6df791 Author: Andy Shevchenko Date: Wed Feb 15 15:42:38 2023 +0200 pinctrl: at91: use devm_kasprintf() to avoid potential leaks (part 2) Use devm_kasprintf() instead of kasprintf() to avoid any potential leaks. At the moment drivers have no remove functionality hence there is no need for fixes tag. While at it, switch to use devm_kasprintf_strarray(). Signed-off-by: Andy Shevchenko Reviewed-by: Claudiu Beznea Tested-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230215134242.37618-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit dc3c7404ed76870bec52e2f0760bc150b173e57e Author: Trevor Woerner Date: Thu Feb 9 21:51:31 2023 -0500 dt-bindings: gpio: nxp,pcf8575: add gpio-line-names The devices described in this binding represent 8-bit and 16-bit i2c i/o expanders. Allow the user to specify names for up to 16 gpio lines. Signed-off-by: Trevor Woerner Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230210025132.36605-1-twoerner@gmail.com Signed-off-by: Linus Walleij commit 914a3aa644cf50947a2dbb97738502ca9f025a10 Author: Christian Hewitt Date: Mon Mar 6 12:13:51 2023 +0000 arm64: dts: meson: gxbb-kii-pro: add initial audio support Add initial support for HDMI and S/PDIF audio output. Signed-off-by: Christian Hewitt Tested-by: Ferass El Hafidi Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230306121351.1606360-4-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit dae485f52a65ce939b045cf480c401d434cacf2d Author: Christian Hewitt Date: Mon Mar 6 12:13:50 2023 +0000 arm64: dts: meson: gxbb-kii-pro: complete the bluetooth node Add missing content to the bluetooth node to align it with the content used in (all) other GXBB dts files. Signed-off-by: Christian Hewitt Tested-by: Ferass El Hafidi Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230306121351.1606360-3-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 815ad625ec4ea5de655f9c02ccf7f65ecf5e6e29 Author: Christian Hewitt Date: Mon Mar 6 12:13:49 2023 +0000 arm64: dts: meson: gxbb-kii-pro: sort and tidy the dts Alpha-sort the nodes, move the default line in the LED node to where it's normally found, and remove excess spacing. No functional changes. Signed-off-by: Christian Hewitt Tested-by: Ferass El Hafidi Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230306121351.1606360-2-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 1a62dd9895dca78bee28bba3a36f08836fdd143d Author: Jani Nikula Date: Wed Mar 1 17:14:09 2023 +0200 drm/i915/dsi: fix DSS CTL register offsets for TGL+ On TGL+ the DSS control registers are at different offsets, and there's one per pipe. Fix the offsets to fix dual link DSI for TGL+. There would be helpers for this in the DSC code, but just do the quick fix now for DSI. Long term, we should probably move all the DSS handling into intel_vdsc.c, so exporting the helpers seems counter-productive. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8232 Cc: Ville Syrjala Cc: stable@vger.kernel.org Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230301151409.1581574-1-jani.nikula@intel.com commit beb6ed0f8cfa844556ac1f6d494cc9b4f6cb1994 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:51 2023 +0100 spi: microchip-core: 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 (mostly) ignored 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. 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: Conor Dooley Link: https://lore.kernel.org/r/20230303172041.2103336-38-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit e4cf312d6db2941b8267de6e094312afc1b523ee Author: Uwe Kleine-König Date: Fri Mar 3 18:19:50 2023 +0100 spi: microchip-core-qspi: 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 (mostly) ignored 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. 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: Conor Dooley Link: https://lore.kernel.org/r/20230303172041.2103336-37-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit a4f5ad1196daf1f6f3329082c95d19adf05bd423 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:49 2023 +0100 spi: meson-spifc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230303172041.2103336-36-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 8e8355d14187f6a65d9168c7dcfbb916f7fef9a7 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:48 2023 +0100 spi: meson-spicc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230303172041.2103336-35-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 1f85ed7d4757a24ba5b92fdf2a639002bcc78e95 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:47 2023 +0100 spi: lantiq-ssc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-34-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit a57b08c231ae4240c01b0623053a54cb7ec23194 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:46 2023 +0100 spi: iproc-qspi: 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 (mostly) ignored 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. 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: Florian Fainelli Link: https://lore.kernel.org/r/20230303172041.2103336-33-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 6b854e44b66ee1b3798eff87f1af8738edeccbde Author: Uwe Kleine-König Date: Fri Mar 3 18:19:45 2023 +0100 spi: img-spfi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-32-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit e77ccdfe0145211b5a20ab62950894aea881bbb3 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:44 2023 +0100 spi: hisi-kunpeng: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-31-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit d0b52f6539e008a0d42bf673486bd21b7d2dc191 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:43 2023 +0100 spi: geni-qcom: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-30-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit fc4935a0f7ab1521a5f0500a9894d97558067985 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:42 2023 +0100 spi: fsl-spi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-29-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 94f445096932efc48cac128c8be4e34845a702d6 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:41 2023 +0100 spi: fsl-qspi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-28-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit edd49c898751838009940fe38a7ad4c1d23224df Author: Uwe Kleine-König Date: Fri Mar 3 18:19:40 2023 +0100 spi: fsl-lpspi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-27-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit de60b184d8dd274f36c7c93f3cefad3904420d00 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:39 2023 +0100 spi: fsl-espi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-26-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 1bcab55f13e1c4d03c20a3d7ea37c4228e7bd41e Author: Uwe Kleine-König Date: Fri Mar 3 18:19:38 2023 +0100 spi: fsl-dspi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-25-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit bb2714d140913de16bcd59f068b1d7f6dafef964 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:37 2023 +0100 spi: ep93xx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-24-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f74abea25ab2809958c7ce8e29e710c66a490b64 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:36 2023 +0100 spi: dw-mmio: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-23-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 42f8295cd7ea680f0e9a5a4d864186736f9f9b24 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:35 2023 +0100 spi: dw-bt1: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-22-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f8b81e0528b67a86172315aa0b516a5050e89c5d Author: Uwe Kleine-König Date: Fri Mar 3 18:19:34 2023 +0100 spi: dln2: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-21-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit d1a9fa8a3ece62c62aa8aaa573d8ceea8d8fae69 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:33 2023 +0100 spi: davinci: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-20-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 3f025840b9e9313dbd6479ca9117b1eb827d689f Author: Uwe Kleine-König Date: Fri Mar 3 18:19:32 2023 +0100 spi: coldfire-qspi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-19-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f74d4b8b97e39b31ad88f6f679180c0800d57a0c Author: Uwe Kleine-König Date: Fri Mar 3 18:19:31 2023 +0100 spi: cavium-octeon: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-18-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 427353015333a1e0d6f61785a2f134c4c382f11f Author: Uwe Kleine-König Date: Fri Mar 3 18:19:30 2023 +0100 spi: cadence: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-17-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 6fe41879e93313afdb18104d20d30783600591fe Author: Uwe Kleine-König Date: Fri Mar 3 18:19:29 2023 +0100 spi: cadence-quadspi: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-16-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit c4c34d5ded66204db90acaeaff5af1277ea0c21b Author: Uwe Kleine-König Date: Fri Mar 3 18:19:28 2023 +0100 spi: brcmstb-qspi: 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 (mostly) ignored 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. 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: Florian Fainelli Link: https://lore.kernel.org/r/20230303172041.2103336-15-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f54f9b00c62fb3ee280cd3ad0e4e483c9d401107 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:27 2023 +0100 spi: bcmbca-hsspi: 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 (mostly) ignored 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. 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: Florian Fainelli Link: https://lore.kernel.org/r/20230303172041.2103336-14-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 8c26432e9b5fd04aa59010941051d33fa4e289ba Author: Uwe Kleine-König Date: Fri Mar 3 18:19:26 2023 +0100 spi: bcm63xx: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-13-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 04cd5f3fad161c27fe101ad7906ddd9085c2b4be Author: Uwe Kleine-König Date: Fri Mar 3 18:19:25 2023 +0100 spi: bcm63xx-hsspi: 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 (mostly) ignored 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. 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: Florian Fainelli Link: https://lore.kernel.org/r/20230303172041.2103336-12-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit f3a1c6a016193728a62929e0588e5f640cfe7c34 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:24 2023 +0100 spi: bcm2835aux: 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 (mostly) ignored 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. 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: Florian Fainelli Link: https://lore.kernel.org/r/20230303172041.2103336-11-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit fc87abbef23413943457459e2c473ce607b4dd24 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:22 2023 +0100 spi: axi-spi-engine: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-9-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 02a52038fe42bc4dcb477935d60fc779f9238bda Author: Uwe Kleine-König Date: Fri Mar 3 18:19:21 2023 +0100 spi: au1550: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-8-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 7412afb044178ac0e6facc5f12b5ab220e06c34c Author: Uwe Kleine-König Date: Fri Mar 3 18:19:20 2023 +0100 spi: atmel: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-7-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 48c42f970b7d0cf034721fe7faf59e5698ad7382 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:19 2023 +0100 spi: ath79: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-6-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit b9c5544877b03b7d5b3c4c97e9133d0bb695c9cb Author: Uwe Kleine-König Date: Fri Mar 3 18:19:18 2023 +0100 spi: at91-usart: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-5-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit ebf9a50d13a4406b9831f9e2b35f786a3bb18a3e Author: Uwe Kleine-König Date: Fri Mar 3 18:19:17 2023 +0100 spi: aspeed-smc: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Cédric Le Goater Link: https://lore.kernel.org/r/20230303172041.2103336-4-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 9a49f22852201e6ba8aafd359e9fc13d32717748 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:16 2023 +0100 spi: armada-3700: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-3-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 24644ae031e71491e729d415d88c3cea98288c39 Author: Uwe Kleine-König Date: Fri Mar 3 18:19:15 2023 +0100 spi: ar934x: 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 (mostly) ignored 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. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230303172041.2103336-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 6dc01bc640b1278f225ed73b891645202be72b55 Author: Krzysztof Kozlowski Date: Fri Jan 27 20:40:56 2023 +0100 ARM: dts: exynos: move DP and MIPI phys to PMU node in Exynos5250 The DisplayPort and MIPI phys are actually part of the Power Management Unit system controller. They do not have their own address space, thus keeping the nodes under soc causes warnings: exynos5250-arndale.dtb: soc: video-phy-0: {'compatible': ['samsung,exynos5250-dp-video-phy'], 'samsung,pmu-syscon': [[20]], '#phy-cells': [[0]], 'phandle': [[24]]} should not be valid under {'type': 'object'} Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20230127194057.186458-8-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 972b567075845a55d525f1ed5d7cd7b6d524afdc Author: Krzysztof Kozlowski Date: Fri Jan 27 20:40:55 2023 +0100 ARM: dts: exynos: move DP and MIPI phys to PMU node in Exynos5420 The DisplayPort and MIPI phys are actually part of the Power Management Unit system controller. They do not have their own address space, thus keeping the nodes under soc causes warnings: exynos5420-smdk5420.dtb: soc: dp-video-phy: {'compatible': ['samsung,exynos5420-dp-video-phy'], 'samsung,pmu-syscon': [[11]], '#phy-cells': [[0]], 'phandle': [[16]]} should not be valid under {'type': 'object'} Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20230127194057.186458-7-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 380c7ba3923c6e471aff0f951a6cf42e8dec2c79 Author: Andy Shevchenko Date: Wed Feb 8 19:07:28 2023 +0200 gpiolib: Clean up headers There is a few things done: - include only the headers we are direct user of - when pointer is in use, provide a forward declaration - add missing headers - group generic headers and subsystem headers - sort each group alphabetically Signed-off-by: Andy Shevchenko commit 5b1911976ccf83e892452afb0363500228b35d81 Author: Andy Shevchenko Date: Tue Feb 7 16:29:51 2023 +0200 gpiolib: Group forward declarations in consumer.h For better maintenance group the forward declarations together. Signed-off-by: Andy Shevchenko commit 91e5ae95a0af7d2db9e98e8f99436c02c304378b Author: Andy Shevchenko Date: Tue Feb 7 16:29:50 2023 +0200 gpiolib: Deduplicate forward declarations in consumer.h The struct fwnode_handle pointer is used in both branches of ifdeffery, no need to have a copy of the same in each of them, just make it global. Signed-off-by: Andy Shevchenko commit 6cfd84c4f4f61905088b642a3ef1038ee627cd98 Author: Andy Shevchenko Date: Tue Feb 7 16:29:49 2023 +0200 gpiolib: Drop unused forward declaration from driver.h There is no struct device_node pointers anywhere in the header, drop unused forward declaration. Signed-off-by: Andy Shevchenko commit e79098ac29a41526a50a83ea77306c634a74e904 Author: Andy Shevchenko Date: Tue Feb 7 16:29:48 2023 +0200 gpio: regmap: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, split out the GPIO group of headers. Signed-off-by: Andy Shevchenko commit d74c0863fd4ecaeafde6a4bb290dcae90b12d942 Author: Andy Shevchenko Date: Tue Feb 7 16:29:48 2023 +0200 gpio: reg: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, split out the GPIO group of headers. Signed-off-by: Andy Shevchenko commit 39ebbd52b73db8598e3399ba3ac9333902251975 Author: Andy Shevchenko Date: Tue Feb 7 16:29:48 2023 +0200 gpio: aggregator: Add missing header(s) Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. While at it, drop unused linux/gpio.h and split out the GPIO group of headers. Signed-off-by: Andy Shevchenko Reviewed-by: Geert Uytterhoeven commit a99cc66807d6c854a7f65f962766c530c91be149 Author: Arnd Bergmann Date: Tue Feb 7 16:29:47 2023 +0200 gpiolib: split of_mm_gpio_chip out of linux/of_gpio.h This is a rarely used feature that has nothing to do with the client-side of_gpio.h. Split it out with a separate header file and Kconfig option so it can be removed on its own timeline aside from removing the of_gpio consumer interfaces. Reviewed-by: Andy Shevchenko Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko commit a8e59744e16b9ae18fab773a0fd3b23cdf21ad75 Author: Arnd Bergmann Date: Wed Feb 8 17:41:47 2023 +0200 gpiolib: split linux/gpio/driver.h out of linux/gpio.h Almost all gpio drivers include linux/gpio/driver.h, and other files should not rely on includes from this header. Remove the indirect include from here and include the correct headers directly from where they are used. Reviewed-by: Andy Shevchenko Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Lee Jones commit d74e316633e49f44756c23997fa071979a939405 Author: Arnd Bergmann Date: Tue Feb 7 16:29:45 2023 +0200 gpiolib: remove legacy gpio_export() There are only a handful of users of gpio_export() and related functions. As these are just wrappers around the modern gpiod_export() helper, remove the wrappers and open-code the gpio_to_desc in all callers to shrink the legacy API. Reviewed-by: Andy Shevchenko Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko commit 0e685c3e7158d35626d6d76b9f859eae806d87fa Author: Arnd Bergmann Date: Tue Feb 7 16:29:44 2023 +0200 gpiolib: remove gpio_set_debounce() gpio_set_debounce() only has a single user, which is trivially converted to gpiod_set_debounce(). Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit eccb7a00613c804ec7244676090bf6ee43a23da2 Author: Arnd Bergmann Date: Wed Feb 8 17:37:22 2023 +0200 gpiolib: remove asm-generic/gpio.h The asm-generic/gpio.h file is now always included when using gpiolib, so just move its contents into linux/gpio.h with a few minor simplifications. Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit 94d20f7d674d589e94aea77e2cbe37fc58541d04 Author: Arnd Bergmann Date: Tue Feb 7 16:29:42 2023 +0200 gpiolib: coldfire: remove custom asm/gpio.h Now that coldfire is the only user of a custom asm/gpio.h, it seems better to remove this as well, and have the same interface everywhere. For the gpio_get_value()/gpio_set_value()/gpio_to_irq(), gpio_cansleep() functions, the custom version is only a micro-optimization to inline the function for constant GPIO numbers. However, in the coldfire defconfigs, I was unable to find a single instance where this micro-optimization was even used, and according to Geert the only user appears to be the QSPI chip that is disabled everywhere. The custom gpio_request_one() function is even less useful, as it is guarded by an #ifdef that is never true. Reviewed-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Acked-by: Bartosz Golaszewski Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko commit ee5a66d87cddc77f8e727ca1d3f4dcbeefb3cb49 Author: Arnd Bergmann Date: Tue Feb 7 16:29:41 2023 +0200 gpiolib: remove empty asm/gpio.h files The arm and sh versions of this file are identical to the generic versions and can just be removed. The drivers that actually use the sh3 specific version also include cpu/gpio.h directly, with the exception of magicpanelr2, which is easily fixed. This leaves coldfire as the only gpio driver that needs something custom for gpiolib. Reviewed-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Acked-by: Bartosz Golaszewski Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Reviewed-by: Vincenzo Palazzo commit 21d9526d13b5467b0a6532e5a8b0eb04c01ce326 Author: Linus Walleij Date: Fri Jul 3 15:04:51 2020 +0200 gpiolib: Make the legacy consumer-only The legacy header was an all-inclusive header used by drivers and consumers alike. After eliminating the last users of the driver defines, we can drop the inclusion of the header. Signed-off-by: Linus Walleij Signed-off-by: Andy Shevchenko commit 3b541b890ebe5c2914e0e0a2f0905b167afb3b75 Author: Linus Walleij Date: Fri Jan 13 10:44:01 2023 +0100 hte: tegra-194: Use proper includes The test driver uses the gpiod consumer API so include the right header. This may cause a problem with struct of_device_id being implcitly pulled in by the legacy header so include explicitly as well. While at it, drop explicit moduleparam.h (it's included with module.h) and sort the headers. Signed-off-by: Linus Walleij Signed-off-by: Andy Shevchenko commit 7a49bfde01961dac9efb734f031f3e77ce537f6d Author: Linus Walleij Date: Fri Jan 13 10:56:17 2023 +0100 ARM: s3c64xx: Use the right include The file s3c64xx.c is including despite using no symbols from the file, however it needs it to implicitly bring in of_have_populated_dt() so include explicitly instead. Signed-off-by: Linus Walleij Signed-off-by: Andy Shevchenko commit d1143d50073cff1f6dcd4bf62a8eb3852770ae4d Author: Linus Walleij Date: Fri Jan 13 10:51:34 2023 +0100 ARM: orion/gpio: Use the right include This is a GPIO driver so include and not the legacy header. Switch a single call to the legacy API and use as well. Signed-off-by: Linus Walleij Signed-off-by: Andy Shevchenko commit ff6f38eb920bd2b86e1d3157a01f409e2dce1320 Author: Jiapeng Chong Date: Thu Mar 2 10:39:11 2023 +0800 wifi: rtlwifi: rtl8192se: Remove some unused variables Variables bcntime_cfg, bcn_cw and bcn_ifs are not effectively used, so delete them. drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c:1555:6: warning: variable 'bcntime_cfg' set but not used. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4240 Signed-off-by: Jiapeng Chong Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230302023911.59278-1-jiapeng.chong@linux.alibaba.com commit 15c8e267dfa62f207ee1db666c822324e3362b84 Author: Martin Blumenstingl Date: Sun Feb 26 23:10:04 2023 +0100 wifi: rtw88: mac: Return the original error from rtw_mac_power_switch() rtw_mac_power_switch() calls rtw_pwr_seq_parser() which can return -EINVAL, -EBUSY or 0. Propagate the original error code instead of unconditionally returning -EINVAL in case of an error. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Martin Blumenstingl Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230226221004.138331-3-martin.blumenstingl@googlemail.com commit b7ed9fa2cb76ca7a3c3cd4a6d35748fe1fbda9f6 Author: Martin Blumenstingl Date: Sun Feb 26 23:10:03 2023 +0100 wifi: rtw88: mac: Return the original error from rtw_pwr_seq_parser() rtw_pwr_seq_parser() calls rtw_sub_pwr_seq_parser() which can either return -EBUSY, -EINVAL or 0. Propagate the original error code instead of unconditionally returning -EBUSY in case of an error. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Martin Blumenstingl Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230226221004.138331-2-martin.blumenstingl@googlemail.com commit e5c3da9abd44bee298070d4e66b502067a8f1715 Author: Konrad Dybcio Date: Fri Feb 24 13:59:17 2023 +0100 wifi: brcmfmac: pcie: Add 4359C0 firmware definition Some phones from around 2016, as well as other random devices have this chip called 43956 or 4359C0 or 43596A0, which is more or less just a rev bump (v9) of the already-supported 4359. Add a corresponding firmware definition to allow for choosing the correct blob. Suggested-by: Arend van Spriel Signed-off-by: Konrad Dybcio Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230224-topic-brcm_tone-v1-1-333b0ac67934@linaro.org commit 5c48f9432d06bf85ca934d7c4ecb14a7ec0c7f5d Author: Chih-Kang Chang Date: Fri Feb 24 16:21:17 2023 +0800 wifi: rtw89: fix SER L1 might stop entering LPS issue When SER L1 triggered, driver need to stop Rx and clear RTW89_FLAG_RUNNING flag. If track_work check RTW89_FLAG_RUNNING simultaneously, it will check failed and never queue track_work again, and LPS won't enter either. Therefore, we cancel delayed work when enter SER L1, and queue delayed work when leave SER L1. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230224082117.21241-1-pkshih@realtek.com commit 0d8b4049bb4792da225e2c908282bb9ed1024ac7 Author: Nick Alcock Date: Wed Feb 22 12:14:53 2023 +0000 kbuild, gpio: gpio-aspeed-sgpio: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: Joel Stanley Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-aspeed@lists.ozlabs.org Signed-off-by: Bartosz Golaszewski commit 70e1114eb72591cdd493b44c6437f9e11cff81b8 Author: Nick Alcock Date: Fri Feb 17 14:10:55 2023 +0000 kbuild, gpio: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Manivannan Sadhasivam Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: linux-arm-kernel@lists.infradead.org Cc: linux-unisoc@lists.infradead.org Cc: linux-gpio@vger.kernel.org Signed-off-by: Bartosz Golaszewski commit db9da1959db3d1e0637af4339776b285bacb0c69 Author: Trevor Woerner Date: Fri Feb 10 22:06:45 2023 -0500 dt-bindings: gpio.txt: expand gpio-line-names recommendations Provide more guidance to differentiate between recommendations for names of lines which are hard-wired to on-board devices, versus recommendations for names of lines which are connected to general-purpose pin headers. Signed-off-by: Trevor Woerner Acked-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit b37d57e1daccbc1a0393d9207d5c48f9181fe85a Author: Linh Phung Date: Thu Feb 2 01:03:09 2023 +0000 pinctrl: renesas: r8a779g0: Add Audio SSI pins, groups, and functions Add pins, groups, and functions for the Serial Sound Interface (SSI) on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Linh Phung Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87bkmcang2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 59e579a6af8c3f1cc73bc30f894abbb766113456 Author: Linh Phung Date: Thu Feb 2 01:03:01 2023 +0000 pinctrl: renesas: r8a779g0: Add Audio Clock pins, groups, and functions Add pins, groups, and functions for the Audio Clock on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Linh Phung Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87cz6sanga.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 60003351e99167d8cfa7c161e95856efc016f381 Author: Phong Hoang Date: Fri Jan 27 14:11:59 2023 +0100 pinctrl: renesas: r8a779f0: Fix tsn1_avtp_pps pin group Correct a typo mistake in the definition of the tsn1_avtp_pps pin group mux. Signed-off-by: Phong Hoang Fixes: babe298e9caaa3d7 ("pinctrl: renesas: r8a779f0: Add Ethernet pins, groups, and functions") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/45ea6e87b91c36fd0b9706cf58ff50a4d1a99c44.1674825039.git.geert+renesas@glider.be commit a145c9a8674ac8fbfa1595276e1b6cbfc5139038 Author: Hai Pham Date: Fri Jan 27 14:10:31 2023 +0100 pinctrl: renesas: r8a779a0: Remove incorrect AVB[01] pinmux configuration AVB[01]_{MAGIC,MDC,MDIO,TXCREFCLK} are registered as both PINMUX_SINGLE(fn) and PINMUX_IPSR_GPSR(fn) in the pinmux_data array. The latter are correct, hence remove the former. Without this fix, the Ethernet PHY is not operational on the MDIO bus. Signed-off-by: Hai Pham Signed-off-by: LUU HOAI Fixes: 741a7370fc3b8b54 ("pinctrl: renesas: Initial R8A779A0 (V3U) PFC support") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/6fd217b71e83ba9a8157513ed671a1fa218b23b6.1674824958.git.geert+renesas@glider.be commit 63de20ca24dd00074e2a3d6dc84c3067bba9e788 Author: Linus Walleij Date: Thu Feb 16 10:19:09 2023 +0100 gpio: pmic-eic-sprd: Move Kconfig to MFD expanders The Spreadtrum PMIC EIC interrupt controller is part of an MFD expander and should thus be in the MFD GPIO expander menu section with the rest. Move it. Cc: Cixi Geng Cc: Baolin Wang Signed-off-by: Linus Walleij Reviewed-by: Baolin Wang Signed-off-by: Bartosz Golaszewski commit 4077043be27f4cadf1d2b3d1be8ae13657d963a2 Author: Niklas Söderlund Date: Sat Feb 11 16:00:12 2023 +0100 arm64: dts: renesas: white-hawk-csi-dsi: Add and connect MAX96712 The sub-board contains two MAX96712 connected to the main-board using I2C and CSI-2, record the connections. Also enable all nodes (VIN, CSI-2 and ISP) that are part of the downstream video capture pipeline. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230211150012.3824154-3-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit d435d437ce31e69e023c691b71392abc30509c84 Author: Niklas Söderlund Date: Sat Feb 11 16:00:11 2023 +0100 arm64: dts: renesas: r8a779g0: Add and connect all CSI-2, ISP and VIN nodes The V4H have 16 VIN, 2 CSI-2 and 2 ISP nodes that interact with each other for video capture. Add all nodes and record how they are interconnected. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230211150012.3824154-2-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 109e28af2b89e0f92c2f0b5567b13502f72696bb Author: Wolfram Sang Date: Thu Feb 9 21:07:35 2023 +0100 arm64: dts: renesas: r8a779f0: Use proper labels for thermal zones The documentation provides information about the placement of the zones, so that can be used for more descriptive labels. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230209200735.3882-1-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit d8ac71d29660028b143a6dab7497e70388d0ccb1 Author: Geert Uytterhoeven Date: Thu Feb 9 17:23:30 2023 +0100 arm64: dts: renesas: r8a779g0: Add thermal nodes Add device nodes for the Thermal Sensor/Chip Internal Voltage Monitor/Core Voltage Monitor (THS/CIVM/CVM) and the various thermal zones on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/b92a1a28afb9f75f24f0137af9f77e95d7ebaec3.1675959327.git.geert+renesas@glider.be commit 6ec5791375954411640871fec6a7df2cb5365a86 Author: Biju Das Date: Thu Feb 9 13:14:22 2023 +0000 arm64: dts: renesas: rzv2mevk2: Add uart0 pins Add uart0 pins in pinctrl node and update the uart0 node to include pinctrl and uart-has-rtscts properties. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230209131422.192941-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 8b6a006c914aac1702ef85b4ea42ff566b157c85 Author: Lad Prabhakar Date: Mon Feb 6 00:21:36 2023 +0000 arm64: dts: renesas: Drop specifying the GIC_CPU_MASK_SIMPLE() for GICv3 systems The GICv3 interrupts binding does not have a cpumask. The CPU mask only applies to pre-GICv3. So just drop using them from GICv3 systems. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230206002136.29401-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c2b92d7e90187faaa98f6312984724f27401af03 Author: Lad Prabhakar Date: Mon Feb 6 00:13:00 2023 +0000 arm64: dts: renesas: r9a07g044: Add Cortex-A55 PMU node Enable the performance monitor unit for the Cortex-A55 cores on the RZ/G2L (r9a07g044) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230206001300.28937-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 805ed6d67b7b39b07fb65d4a76c986a1e49262cf Author: Lad Prabhakar Date: Mon Feb 6 00:11:33 2023 +0000 arm64: dts: renesas: r9a07g043u: Add Cortex-A55 PMU node Enable the performance monitor unit for the Cortex-A55 core on the RZ/G2UL (r9a07g043u) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230206001133.28776-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b961b2aa2f64a828a77749b82989ba2968cdf344 Author: William Breathitt Gray Date: Wed Feb 8 05:55:42 2023 -0500 gpio: 104-dio-48e: Utilize mask_buf_def in handle_mask_sync() callback The mask_buf_def argument provides a mask of all the maskable lines. Utilize mask_buf_def rather than hardcode an "all_masked" mask. Signed-off-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit 320dfca630887173a605b3f51f22afd59f038bdb Author: Geert Uytterhoeven Date: Thu Feb 2 11:52:41 2023 +0100 arm64: dts: renesas: rcar-gen3: Remove bogus "turbo-mode" properties On several R-Car Gen3(e) SoCs, multiple (up to 4) operating points in the same cluster are marked with the "turbo-mode" property, which is meant only for operating points beyond "Normal Mode". Fix this by dropping the property from all operating points but the "High Performance" one. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/866d06aec09e5a86dba11970f93a728b3e34e9f5.1675335086.git.geert+renesas@glider.be commit 79d9cfa9d3cf3f790bff384d2d3177c51e4a50cb Author: Nam Nguyen Date: Thu Feb 2 11:51:12 2023 +0100 arm64: dts: renesas: v3hsk: Add clock-skew for GEther's Micrel PHY Add the missing clock-skew property for the GEther's Micrel KSZ9031 PHY. Signed-off-by: Nam Nguyen Signed-off-by: Phong Hoang Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/39ab4e92d2242e1d7e83db92f91fc6e0e7e76c47.1675334998.git.geert+renesas@glider.be commit 10fb3e2746eee0bf278c797a86fedc665bbb0ad2 Author: Geert Uytterhoeven Date: Tue Jan 31 12:32:33 2023 +0100 arm64: dts: renesas: falcon: Describe CAN clock Describe the 40 MHz Crystal Clock Oscillator providing CAN_CLK. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/0bf36a1708ad87c00455b96ebaacc63fb7305b7a.1675164686.git.geert+renesas@glider.be commit b6c0be722b0c0a7204b6289464a04cd7b4fdfca0 Author: Fabrizio Castro Date: Mon Jan 30 19:11:52 2023 +0000 arm64: dts: renesas: rzv2mevk2: Add uSD card and eMMC support The RZ/V2M EVK comes with a slot for a uSD card, and an eMMC. Add support for the both of them. Please note that the pinctrl driver for RZ/V2M doesn't support interrupts yet, therefore the card detect pin has been connected to the SDHI IP directly in this patch. We'll connect the card detect pin to its corresponding GPIO when we'll have driver support for interrupts in the RZ/V2M pinctrl driver. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230130191152.182826-1-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven commit 548b2771111442fa15dd4c52a581ae3220d12b8c Author: Geert Uytterhoeven Date: Mon Jan 23 20:06:19 2023 +0100 arm64: dts: renesas: white-hawk: Add CAN-FD support Enable confirmed-working CAN-FD channels 0 and 1 on the White-Hawk development board: - Channel 0 uses an NXP TJR1443AT CAN transceiver, which must be enabled through a GPIO, - Channels 1-7 use Microchip MCP2558FD-H/SN CAN transceivers (not mounted for channels 4-7), which do not need explicit description, but channels 2-3 do not seem to work. Inspired by a patch in the BSP by Kazuya Mizuguch. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/a19d0a70aacaf4c3517a226bf32ea49db3542da4.1674500205.git.geert+renesas@glider.be commit 5056a0c7286237844d220c0f75f1a7099da6002c Author: Geert Uytterhoeven Date: Mon Jan 23 20:06:18 2023 +0100 arm64: dts: renesas: r8a779g0: Add CAN-FD node Add device nodes for the CAN-FD interface and the related external CAN clock on the Renesas R-Car V4H (R8A779G0) SoC. Based on a patch in the BSP by Kazuya Mizuguch. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/6c55d0995089917216ee261a8b8cbb980c7b5304.1674500205.git.geert+renesas@glider.be commit a17039b630c59da98de153ef50cdf6a06393cfce Author: Biju Das Date: Sat Jan 21 14:58:53 2023 +0000 arm64: dts: renesas: rzv2mevk2: Enable USB3 role switch Enable USB3 role switch on RZ/V2M EVK by linking USB3 peri node with hd3ss3220 controller node. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230121145853.4792-13-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 967219e5d410ccb3e072c712ec3d665c6346876f Author: Biju Das Date: Sat Jan 21 14:58:52 2023 +0000 arm64: dts: renesas: rzv2mevk2: Enable USB3 DRD, Peripheral and Host Enable USB3 Host, Peripheral and DRD modules on RZ/V2M EVK. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230121145853.4792-12-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 670e2a8b9b02ff52c7ca43204459693b3c574b00 Author: Biju Das Date: Sat Jan 21 14:58:51 2023 +0000 arm64: dts: renesas: r9a09g011: Add USB3 DRD, device and host nodes This patch add usb3 host and peripheral device node as child of usb3 drd node to RZ/V2M SoC dtsi. The host/device needs to issue reset release on DRD module before accessing host/device registers. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230121145853.4792-11-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 68d94cca3b9d297aedf7321a823d0e72ce0f283f Author: Nick Alcock Date: Fri Feb 24 15:07:45 2023 +0000 gpio: remove MODULE_LICENSE in non-modules Since commit 8b41fc4454e ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are used to identify modules. As a consequence, uses of the macro in non-modules will cause modprobe to misidentify their containing object file as a module when it is not (false positives), and modprobe might succeed rather than failing with a suitable error message. So remove it in the files in this commit, none of which can be built as modules. Signed-off-by: Nick Alcock Suggested-by: Luis Chamberlain Cc: Luis Chamberlain Cc: linux-modules@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Hitomi Hasegawa Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: Shawn Guo Cc: Sascha Hauer Cc: linux-gpio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Bartosz Golaszewski commit da2102abcec034cf49fba9efa16596202a37710c Author: Clément Léger Date: Thu Feb 9 14:35:06 2023 +0100 dt-bindings: soc: renesas: renesas.yaml: Add renesas,rzn1d400-eb compatible Add "renesas,rzn1d400-eb" which target the RZ/N1 EB board when an RZ/N1D-DB daughter board is plugged on it. Signed-off-by: Clément Léger Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230209133507.150571-2-clement.leger@bootlin.com Signed-off-by: Geert Uytterhoeven commit 7944d3b7fe86067509751473aa917fdfd662d92c Author: Yinbo Zhu Date: Thu Mar 2 16:17:11 2023 +0800 gpio: loongson: add gpio driver support The Loongson platforms GPIO controller contains 60 GPIO pins in total, 4 of which are dedicated GPIO pins, and the remaining 56 are reused with other functions. Each GPIO can set input/output and has the interrupt capability. This driver added support for Loongson GPIO controller and support to use DTS or ACPI to descibe GPIO device resources. Signed-off-by: Jianmin Lv Signed-off-by: Hongchen Zhang Signed-off-by: Liu Peibao Signed-off-by: Juxin Gao Signed-off-by: Yinbo Zhu Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit db2056e21c666ec83d5ecbaf973fe5505405e8e0 Author: Yinbo Zhu Date: Thu Mar 2 16:17:10 2023 +0800 dt-bindings: gpio: add loongson gpio Add the Loongson platform gpio binding with DT schema format using json-schema. Signed-off-by: Yinbo Zhu Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski commit 1f04b7939704fce82d2bb5ef5561e2499a91170a Author: Geert Uytterhoeven Date: Tue Feb 14 11:02:07 2023 +0100 clk: renesas: r8a77995: Fix VIN parent clock According to the R-Car Series, 3rd Generation Hardware User’s Manual Rev. 2.30, the parent clock of the Video Input Module (VIN) on R-Car D3 is S3D1. Update the driver to match the documentation. This has no functional impact, as both S1D2 and S3D1 have the same clock rate, and are always-on clocks. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/9b655843a260e06fa6f3349cdafac180e2bf38a5.1676368776.git.geert+renesas@glider.be commit 3c876432e772201dabe3d9d5585226be5f2b9a8c Author: Niklas Söderlund Date: Sat Feb 11 16:30:26 2023 +0100 clk: renesas: r8a77980: Add VIN clocks Add the VIN module clocks, which are used by the VIN modules on the Renesas R-Car V3H (R8A77980) SoC. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230211153026.3898491-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 049f39d6d8cdf1ddae0e22021155d3af4e65e18c Author: Niklas Söderlund Date: Sat Feb 11 15:36:55 2023 +0100 clk: renesas: r8a779g0: Add VIN clocks Add the VIN module clocks, which are used by the VIN modules on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230211143655.3809756-4-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 8947e5ae9589c57af246cdd149cf469aec5e4d3c Author: Niklas Söderlund Date: Sat Feb 11 15:36:54 2023 +0100 clk: renesas: r8a779g0: Add ISPCS clocks Add the ISPCS0 and ISPCS1 module clocks, which are used by the ISPCS modules on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230211143655.3809756-3-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 8b406fd422d568a407a98c2809c0b2c6bdc95be3 Author: Niklas Söderlund Date: Sat Feb 11 15:36:53 2023 +0100 clk: renesas: r8a779g0: Add CSI-2 clocks Add the CSI core clock and the CSI40 and CSI41 module clocks, which are used by the CSI-2 Interfaces on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230211143655.3809756-2-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 7502a04dae0e614bc14553e31461e50499bc67aa Author: Geert Uytterhoeven Date: Thu Feb 9 17:03:00 2023 +0100 clk: renesas: r8a779g0: Add thermal clock Add the module clock used by the Thermal Sensor/Chip Internal Voltage Monitor/Core Voltage Monitor (THS/CIVM/CVM) on the Renesas R-Car V4H (R8A779G0) SoC. Based on a large patch in the BSP by Kazuya Mizuguchi. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/59461effd0d9f7a39e0c91352c87f2b7071b1891.1675958536.git.geert+renesas@glider.be commit 8dffb520ace48bcb996db049540c78261730213c Author: Kuninori Morimoto Date: Thu Feb 2 01:03:24 2023 +0000 clk: renesas: r8a779g0: Add Audio clocks Add module clocks for the Audio (SSI/SSIU) blocks on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/878rhganfo.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit 75a2f9734e9bf297959a1e8cf16655a50075f531 Author: Takeshi Kihara Date: Thu Feb 2 01:03:14 2023 +0000 clk: renesas: cpg-mssr: Update MSSR register range for R-Car V4H The SRCR, SRSTCLR, MSTPCR and MSTPSR registers for R-Car V4H (R8A779G0) each have registers up to offset 0x74. Update the corresponding arrays. Signed-off-by: Takeshi Kihara Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/87a61wanfx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Geert Uytterhoeven commit d237b2270c68032ad3471ca82d1f3581398179c6 Author: Krzysztof Kozlowski Date: Tue Feb 7 20:28:51 2023 +0100 ARM: dts: exynos: move MIPI phy to PMU node in Exynos4 The MIPI phy is actually part of the Power Management Unit system controller. It does not have its own address space, thus keeping the node under soc causes warnings: xynos4412-i9305.dtb: soc: video-phy: {'compatible': ['samsung,s5pv210-mipi-video-phy'], '#phy-cells': [[1]], 'syscon': [[11]], 'phandle': [[13]]} should not be valid under {'type': 'object'} Link: https://lore.kernel.org/r/20230207192851.549242-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 37688852fd6f4fed2b3800a7652be87147137125 Author: Krzysztof Kozlowski Date: Tue Feb 7 20:28:50 2023 +0100 ARM: dts: exynos: move MIPI phy to PMU node in Exynos3250 The MIPI phy is actually part of the Power Management Unit system controller. It does not have its own address space, thus keeping the node under soc causes warnings: exynos3250-artik5-eval.dtb: soc: video-phy: {'compatible': ['samsung,s5pv210-mipi-video-phy'], '#phy-cells': [[1]], 'syscon': [[15]], 'phandle': [[23]]} should not be valid under {'type': 'object'} Link: https://lore.kernel.org/r/20230207192851.549242-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit cb8d0fcc5024981e1aed2516921f8bfb3476ffa7 Author: Krzysztof Kozlowski Date: Sat Feb 11 14:47:31 2023 +0100 ARM: dts: exynos: drop unused samsung,camclk-out property in Midas The S5K6A3 camera sensor does not use nor allow samsung,camclk-out property. Link: https://lore.kernel.org/r/20230211134731.85957-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 665b9459bb53b8f19bd1541567e1fe9782c83c4b Author: Krzysztof Kozlowski Date: Sun Feb 12 19:58:18 2023 +0100 ARM: dts: s5pv210: correct MIPI CSIS clock name The Samsung S5P/Exynos MIPI CSIS bindings and Linux driver expect first clock name to be "csis". Otherwise the driver fails to probe. Fixes: 94ad0f6d9278 ("ARM: dts: Add Device tree for s5pv210 SoC") Cc: Link: https://lore.kernel.org/r/20230212185818.43503-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 2beafeafeb4edce6540c37bc2117ea6e21c86d6a Author: Krzysztof Kozlowski Date: Sun Feb 12 19:58:17 2023 +0100 ARM: dts: exynos: correct whitespace in Midas Correct indentation and whitespace in Exynos4412 Midas board. Link: https://lore.kernel.org/r/20230212185818.43503-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 6c950c20da38debf1ed531e0b972bd8b53d1c11f Author: Krzysztof Kozlowski Date: Fri Feb 17 16:06:27 2023 +0100 ARM: dts: exynos: fix WM8960 clock name in Itop Elite The WM8960 Linux driver expects the clock to be named "mclk". Otherwise the clock will be ignored and not prepared/enabled by the driver. Cc: Fixes: 339b2fb36a67 ("ARM: dts: exynos: Add TOPEET itop elite based board") Link: https://lore.kernel.org/r/20230217150627.779764-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 704121ff1f6e05bd00ecb1ef2918ac309c18eb45 Author: Krzysztof Kozlowski Date: Sat Feb 25 17:02:52 2023 +0100 ARM: dts: exynos: add ports to TC358764 bridge on Arndale The Toshiba TC358764 bridge binding expect up two ports as it is a bridge, thus add ports property to encapsulate them. Link: https://lore.kernel.org/r/20230225160252.18737-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 74cbc0e6b2051a604c9bec8c825d83832def0462 Author: Krzysztof Kozlowski Date: Sat Feb 25 17:40:50 2023 +0100 ARM: dts: exynos: drop fake align STMPE properties in P4 Note From STMPE device node in P4 Note remove unused irq-trigger property and incorrectly placed interrupt-controller (which would be a property of GPIO child). Link: https://lore.kernel.org/r/20230225164050.42522-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 9aa8727b3b15c4d941353c784f61f49e33513b3e Author: Krzysztof Kozlowski Date: Sat Feb 25 17:40:49 2023 +0100 ARM: dts: exynos: align STMPE ADC node name with bindings in P4 Note The node name should be generic thus rename STMPE ADC child to "adc". Bindings will expect such name as well. Link: https://lore.kernel.org/r/20230225164050.42522-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 0c187cca73291f2c355fae31eed3fc7aa783b2de Author: Heiner Kallweit Date: Wed Feb 1 20:58:47 2023 +0100 arm: dts: meson: adjust order of some compatibles During review of a new yaml binding, affecting these dts, it turned out that some compatibles aren't ordered as they should be. Order should be most specific to least specific. Suggested-by: Rob Herring Signed-off-by: Heiner Kallweit Reviewed-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/66f77c32-2678-3e31-fb00-1294ccaa6045@gmail.com Signed-off-by: Neil Armstrong commit 4dcc844c99d3e47820f574911b495b58f7da1d94 Author: Heiner Kallweit Date: Wed Feb 1 20:59:28 2023 +0100 arm64: dts: meson: adjust order of some compatibles During review of a new yaml binding, affecting these dts, it turned out that some compatibles aren't ordered as they should be. Order should be most specific to least specific. Suggested-by: Rob Herring Signed-off-by: Heiner Kallweit Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/1ce888df-6096-73de-a98a-354d086428d4@gmail.com Signed-off-by: Neil Armstrong commit e499214ce3ef50c50522719e753a1ffc928c2ec1 Author: Christian Brauner Date: Wed Feb 1 14:15:01 2023 +0100 acl: don't depend on IOP_XATTR All codepaths that don't want to implement POSIX ACLs should simply not implement the associated inode operations instead of relying on IOP_XATTR. That's the case for all filesystems today. For vfs_listxattr() all filesystems that explicitly turn of xattrs for a given inode all set inode->i_op to a dedicated set of inode operations that doesn't implement ->listxattr(). We can remove the dependency of vfs_listxattr() on IOP_XATTR. Removing this dependency will allow us to decouple POSIX ACLs from IOP_XATTR and they can still be listed even if no other xattr handlers are implemented. Otherwise we would have to implement elaborate schemes to raise IOP_XATTR even if sb->s_xattr is set to NULL. Signed-off-by: Christian Brauner (Microsoft) commit 7214b32b6f4c6c1385a52f2e3a7107f28349f505 Author: Thomas Weißschuh Date: Fri Feb 17 03:20:05 2023 +0000 x86/MCE/AMD: Make kobj_type structure constant Since ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Signed-off-by: Thomas Weißschuh Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230217-kobj_type-mce-amd-v1-1-40ef94816444@weissschuh.net commit a1fbb607340d49f208e90cc0d7bdfff2141cce8d Author: Christian Brauner Date: Wed Feb 1 14:15:00 2023 +0100 ovl: check for ->listxattr() support We have decoupled vfs_listxattr() from IOP_XATTR. Instead we just need to check whether inode->i_op->listxattr is implemented. Cc: linux-unionfs@vger.kernel.org Signed-off-by: Christian Brauner (Microsoft) commit d9f892b9bdc22b12bc960837a09f014d5a324975 Author: Christian Brauner Date: Wed Feb 1 14:14:59 2023 +0100 reiserfs: rework priv inode handling Reiserfs is the only filesystem that removes IOP_XATTR without also using a set of dedicated inode operations at the same time that nop all xattr related inode operations. This means we need to have a IOP_XATTR check in vfs_listxattr() instead of just being able to check for ->listxatt() being implemented. Introduce a dedicated set of nop inode operations that are used when IOP_XATTR is removed, allowing us to remove that check from vfs_listxattr(). This in turn allows us to completely decouple POSIX ACLs from IOP_XATTR. Cc: reiserfs-devel@vger.kernel.org Signed-off-by: Christian Brauner (Microsoft) commit d549b741740e63e87e661754e2d1b336fdc51d50 Author: Christian Brauner Date: Wed Feb 1 14:14:58 2023 +0100 fs: rename generic posix acl handlers Reflect in their naming and document that they are kept around for legacy reasons and shouldn't be used anymore by new code. Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 387b96a5891c075986afbf13e84cba357710068e Author: Christian Brauner Date: Wed Feb 1 14:14:57 2023 +0100 reiserfs: rework ->listxattr() implementation Rework reiserfs so it doesn't have to rely on the dummy xattr handlers in its s_xattr list anymore as this is completely unused for setting and getting posix acls. Cc: reiserfs-devel@vger.kernel.org Signed-off-by: Christian Brauner (Microsoft) commit a5488f29835c0eb5561b46e71c23f6c39aab6c83 Author: Christian Brauner Date: Wed Feb 1 14:14:56 2023 +0100 fs: simplify ->listxattr() implementation The ext{2,4}, erofs, f2fs, and jffs2 filesystems use the same logic to check whether a given xattr can be listed. Simplify them and avoid open-coding the same check by calling the helper we introduced earlier. Reviewed-by: Christoph Hellwig Cc: linux-f2fs-devel@lists.sourceforge.net Cc: linux-erofs@lists.ozlabs.org Cc: linux-ext4@vger.kernel.org Cc: linux-mtd@lists.infradead.org Signed-off-by: Christian Brauner (Microsoft) commit 0c95c025a02e477b2d112350e1c78bb0cc994c51 Author: Christian Brauner Date: Wed Feb 1 14:14:55 2023 +0100 fs: drop unused posix acl handlers Remove struct posix_acl_{access,default}_handler for all filesystems that don't depend on the xattr handler in their inode->i_op->listxattr() method in any way. There's nothing more to do than to simply remove the handler. It's been effectively unused ever since we introduced the new posix acl api. Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 831be973aa21d1cf8948bf4b1d4e73e6d5d028c0 Author: Christian Brauner Date: Wed Feb 1 14:14:54 2023 +0100 xattr: remove unused argument his helpers is really just used to check for user.* xattr support so don't make it pointlessly generic. Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit 2db8a948046cab3a2f707561592906a3d096972f Author: Christian Brauner Date: Wed Feb 1 14:14:53 2023 +0100 xattr: add listxattr helper Add a tiny helper to determine whether an xattr handler given a specific dentry supports listing the requested xattr. We will use this helper in various filesystems in later commits. Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit f2620f166e2a4db08f016b7b30b904ab28c265e4 Author: Christian Brauner Date: Wed Feb 1 14:14:52 2023 +0100 xattr: simplify listxattr helpers The generic_listxattr() and simple_xattr_list() helpers list xattrs and contain duplicated code. Add two helpers that both generic_listxattr() and simple_xattr_list() can use. Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner (Microsoft) commit bf458e5b139894234444e4f88500616a8398b719 Author: Carlo Caione Date: Mon Feb 13 10:32:09 2023 +0100 drm/meson/meson_venc: Relax the supported mode checks Relax a bit the supported modes list by including also 480x1920 and 400x1280. This was actually tested on real hardware and it works correctly. Signed-off-by: Carlo Caione Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230210-relax_dmt_limits-v2-1-318913f08121@baylibre.com commit c9ae1b10d9561012a222e05f0d3ab4e93d301f06 Author: Juergen Gross Date: Tue Feb 7 08:59:02 2023 +0100 x86/paravirt: Merge activate_mm() and dup_mmap() callbacks The two paravirt callbacks .mmu.activate_mm() and .mmu.dup_mmap() are sharing the same implementations in all cases: for Xen PV guests they are pinning the PGD of the new mm_struct, and for all other cases they are a NOP. In the end, both callbacks are meant to register an address space with the underlying hypervisor, so there needs to be only a single callback for that purpose. So merge them to a common callback .mmu.enter_mmap() (in contrast to the corresponding already existing .mmu.exit_mmap()). As the first parameter of the old callbacks isn't used, drop it from the replacement one. [ bp: Remove last occurrence of paravirt_activate_mm() in asm/mmu_context.h ] Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Boris Ostrovsky Reviewed-by: Srivatsa S. Bhat (VMware) Link: https://lore.kernel.org/r/20230207075902.7539-1-jgross@suse.com commit 14e14723d2f58964f13e825738d01f62a8629e90 Author: Christian Hewitt Date: Sun Mar 5 13:45:12 2023 +0000 arm64: dts: meson: add support for BananaPi M2S variants BananaPi M2S ships in Amlogic S922X and A311D variants with the following common specifications: - 16GB eMMC - HDMI 2.1a video - 2x 10/100/1000 Base-T Ethernet (1x RTL8211F, 1x RTL811H) - 2x USB 2.0 ports - 2x Status LED's (green/blue) - 1x Power/Reset button - 1x micro SD card slot - 40-pin GPIO header - PWM fan header - UART header The S992X variant has: - 2GB LPDDR4 RAM The A311D variant has: - 4GB LPDDR4 RAM - NPU (5.0 TOPS) - MIPI DSI header - MIPI CSI header An optional RTL8822CS SDIO WiFi/BT mezzanine is available for both board variants. Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230305134512.1596572-3-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 0e1598a112f2e270bdd5771bb821f12852c548ac Author: Christian Hewitt Date: Sun Mar 5 13:45:11 2023 +0000 dt-bindings: arm: amlogic: add support for BananaPi M2S variants BananaPi M2S ships in two variants with Amlogic S922X or A311D chips. Signed-off-by: Christian Hewitt Acked-by: Krzysztof Kozlowski Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230305134512.1596572-2-christianshewitt@gmail.com Signed-off-by: Neil Armstrong commit 2227e738b30bf20380a48391a73752c52f5f5c6a Author: Neil Armstrong Date: Thu Feb 9 14:41:38 2023 +0100 dt-bindings: soc: amlogic: convert clk-measure.txt to dt-schema Convert the Amlogic Internal Clock Measurer bindings to dt-schema. Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230209-b4-amlogic-bindings-convert-take2-v1-2-c4fe9049def9@linaro.org Signed-off-by: Neil Armstrong commit 739e93e254e4797a29bdf397c10111a50a970734 Author: Neil Armstrong Date: Tue Feb 7 16:08:01 2023 +0100 arm64: dts: amlogic: meson-gxm-s912-libretech-pc: remove unused pinctrl-names from phy node Fixes the following bindings check error: phy@78000: 'pinctrl-0' is a dependency of 'pinctrl-names' Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230207-b4-amlogic-bindings-fixups-v2-v1-8-93b7e50286e7@linaro.org Signed-off-by: Neil Armstrong commit 4bddf79acdc7ef15f8b913e8ef7861461b235df2 Author: Neil Armstrong Date: Tue Feb 7 16:08:00 2023 +0100 arm64: dts: amlogic: meson-sm1: use correct enable-gpios Replace enable-gpio by enable-gpios to match the bindings. Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230207-b4-amlogic-bindings-fixups-v2-v1-7-93b7e50286e7@linaro.org Signed-off-by: Neil Armstrong commit d1e336eef1f4834bae0a54f203e9f74aa040726d Author: Neil Armstrong Date: Tue Feb 7 16:07:59 2023 +0100 arm64: dts: amlogic: meson-s4: fix apb4 bus node name Fixes the following bindings check error: apb4@fe000000: $nodename:0: 'apb4@fe000000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$' Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230207-b4-amlogic-bindings-fixups-v2-v1-6-93b7e50286e7@linaro.org Signed-off-by: Neil Armstrong commit 50e7d712144e7246f4ad5ce0f8577aa09cd09bc6 Author: Neil Armstrong Date: Tue Feb 7 16:07:58 2023 +0100 arm64: dts: amlogic: meson-g12b-odroid-go-ultra: rename keypad-gpio pinctrl node Fixes the following bindings check error: pinctrl@40: keypad-gpio: {...} is not of type 'array' Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230207-b4-amlogic-bindings-fixups-v2-v1-5-93b7e50286e7@linaro.org Signed-off-by: Neil Armstrong commit db217e84d0a3f4183ea5b6d5929e55b73128fcb2 Author: Neil Armstrong Date: Tue Feb 7 16:07:57 2023 +0100 arm64: dts: amlogic: meson-g12b-radxa-zero2: fix pwm clock names Fixes the following bindings check error: - pwm@2000: clock-names: 'oneOf' conditional failed, one must be fixed: ['clkin4'] is too short 'clkin4' is not one of ['clkin0', 'clkin1'] 'clkin0' was expected - pwm@7000: clock-names: 'oneOf' conditional failed, one must be fixed: ['clkin3'] is too short 'clkin3' is not one of ['clkin0', 'clkin1'] 'clkin0' was expected - pwm@19000: clock-names: 'oneOf' conditional failed, one must be fixed: ['clkin2'] is too short 'clkin2' is not one of ['clkin0', 'clkin1'] 'clkin0' was expected Fixes: d747e7f76a5f ("arm64: dts: meson: add support for Radxa Zero2") Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230207-b4-amlogic-bindings-fixups-v2-v1-4-93b7e50286e7@linaro.org Signed-off-by: Neil Armstrong commit bd47319f999e6055124a2b4d2a0da495d52759c3 Author: Neil Armstrong Date: Tue Feb 7 16:07:56 2023 +0100 arm64: dts: amlogic: meson-axg-jethome-jethub-j1xx: remove invalid #gpio-cells in onewire node Fixes the following bindings check errors: - #gpio-cells: [[1]] is not of type 'object' - 'gpio-controller' is a dependency of '#gpio-cells' Reviewed-by: Martin Blumenstingl Acked-by: Vyacheslav Bocharov Link: https://lore.kernel.org/r/20230207-b4-amlogic-bindings-fixups-v2-v1-3-93b7e50286e7@linaro.org Signed-off-by: Neil Armstrong commit d7ff22a6ec9dd154d027d6bc6b4f172c22f8c00d Author: Neil Armstrong Date: Tue Feb 7 16:07:55 2023 +0100 arm64: dts: amlogic: meson-gxm-s912-libretech-pc: add simple connector node in fusb302 node Fixes the following bindings check error: fusb302@22: 'connector' is a required property Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230207-b4-amlogic-bindings-fixups-v2-v1-2-93b7e50286e7@linaro.org Signed-off-by: Neil Armstrong commit f88f3dcbb145a0133292d5c9d8da5935a36c8914 Author: Neil Armstrong Date: Tue Feb 7 16:07:54 2023 +0100 arm64: dts: amlogic: meson-sm1-bananapi: correct usb-hub hog node name Fixes the following bindings check error: usb-hub: $nodename:0: 'usb-hub' does not match '^(hog-[0-9]+|.+-hog(-[0-9]+)?)$' Reviewed-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20230207-b4-amlogic-bindings-fixups-v2-v1-1-93b7e50286e7@linaro.org Signed-off-by: Neil Armstrong commit 8c3223a50faf1d173e0159eff10a9de902407135 Author: Jingyu Wang Date: Sat Jun 18 23:42:38 2022 +0800 x86/entry: Change stale function name in comment to error_return() Correct old function name error_exit() in the comment to what it is now called: error_return(). [ bp: Provide a commit message and massage. ] Signed-off-by: Jingyu Wang Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20220618154238.27749-1-jingyuwang_vip@163.com commit 721da5cee9d43901105f5b8bd33fcb9101b12fc3 Author: Greg Kroah-Hartman Date: Thu Feb 23 08:33:26 2023 +0100 driver core: remove CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2 CONFIG_SYSFS_DEPRECATED was added in commit 88a22c985e35 ("CONFIG_SYSFS_DEPRECATED") in 2006 to allow systems with older versions of some tools (i.e. Fedora 3's version of udev) to boot properly. Four years later, in 2010, the option was attempted to be removed as most of userspace should have been fixed up properly by then, but some kernel developers clung to those old systems and refused to update, so we added CONFIG_SYSFS_DEPRECATED_V2 in commit e52eec13cd6b ("SYSFS: Allow boot time switching between deprecated and modern sysfs layout") to allow them to continue to boot properly, and we allowed a boot time parameter to be used to switch back to the old format if needed. Over time, the logic that was covered under these config options was slowly removed from individual driver subsystems successfully, removed, and the only thing that is now left in the kernel are some changes in the block layer's representation in sysfs where real directories are used instead of symlinks like normal. Because the original changes were done to userspace tools in 2006, and all distros that use those tools are long end-of-life, and older non-udev-based systems do not care about the block layer's sysfs representation, it is time to finally remove this old logic and the config entries from the kernel. Cc: Jonathan Corbet Cc: "Rafael J. Wysocki" Cc: linux-block@vger.kernel.org Cc: linux-doc@vger.kernel.org Acked-by: Jens Axboe Link: https://lore.kernel.org/r/20230223073326.2073220-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 97ab4c116aae4d3756a37c4d8458d49756e4cf89 Author: Gustavo A. R. Silva Date: Mon Sep 26 18:18:42 2022 -0500 ASoC: uapi: Replace zero-length arrays with __DECLARE_FLEX_ARRAY() helper Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new __DECLARE_FLEX_ARRAY() helper macro. This helper allows for flexible-array members in unions. Link: https://github.com/KSPP/linux/issues/193 Link: https://github.com/KSPP/linux/issues/227 Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html Reviewed-by: Kees Cook Reviewed-by: Amadeusz Sławiński Signed-off-by: Gustavo A. R. Silva commit 300bd129f93ffc4dccb591cdd5aef378f0461467 Author: Clark Wang Date: Wed Feb 8 07:56:35 2023 +0100 firmware: imx: scu-pd: add missed lvds lpi2c and pwm power domains LVDS' lpi2c and pwm power domains definitions are missed. Add them here. Signed-off-by: Clark Wang Reviewed-by: Frank Li Signed-off-by: Marcel Ziswiler Signed-off-by: Shawn Guo commit 2a88e4792c6df4b6a93f2bdb1eaf0df7408bd40d Author: Rob Herring Date: Wed Feb 1 15:58:54 2023 -0600 bus: imx-weim: Remove open coded "ranges" parsing "ranges" is a standard property and we have common helper functions for parsing it, so let's use them. Signed-off-by: Rob Herring Signed-off-by: Shawn Guo commit 189cfa849d22c6ec39e7fac8d573075b35f865a2 Author: Alexander Stein Date: Tue Jan 31 10:53:40 2023 +0100 firmware: imx: scu: use dev_err_probe This simplifies the code and silences -517 error messages. Also the reason is listed in /sys/kernel/debug/devices_deferred. Signed-off-by: Alexander Stein Reviewed-by: Mukesh Ojha Signed-off-by: Shawn Guo commit 37c24ed660e4ddaa1a562c75b158128a5515571e Author: Oleksij Rempel Date: Tue Jan 31 09:46:42 2023 +0100 ARM: dts: imx6ul-prti6g: configure ethernet reference clock parent On this board the PHY is the ref clock provider. So, configure ethernet reference clock as input. Without this patch we have relatively high amount of dropped packets. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 8940c105273fcde00a60023f68f8a5b75e1df0cc Author: Oleksij Rempel Date: Tue Jan 31 09:46:40 2023 +0100 ARM: dts: imx6ul: set enet_clk_ref to CLK_ENETx_REF_SEL IMX6UL_CLK_ENETx_REF is behind of CLK_ENETx_REF_SEL: FEC MAC <---------- CLK_ENETx_REF_SEL <--------- CLK_ENETx_REF \ ^------<-> CLK_ENETx_REF_PAD We should point to the clock selector instead. So, we will be able to use external clock source from CLK_ENETx_REF_PAD as well. At same time, remove enet_out clk. It is using always the same clock as enet_clk_ref and do not help to solve any challenges of this HW. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 088e350d2bb29756671f73639e65ba2b897e57a4 Author: Oleksij Rempel Date: Tue Jan 31 09:46:36 2023 +0100 ARM: dts: imx6dl-eckelmann-ci4x10: configure ethernet reference clock parent On this board the PHY is the ref clock provider. So, configure ethernet reference clock as input. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit c89614079e447824786a3064758ef7e53c3eddc3 Author: Oleksij Rempel Date: Tue Jan 31 09:46:35 2023 +0100 ARM: dts: imx6qdl-skov-cpu: configure ethernet reference clock parent On this board the PHY is the ref clock provider. So, configure ethernet reference clock as input. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit c812c91bda8d3b4d9ea23c52bf88a20de64f7487 Author: Oleksij Rempel Date: Tue Jan 31 09:46:34 2023 +0100 ARM: dts: imx6q-prtwd2: configure ethernet reference clock parent On this board the PHY is the ref clock provider. So, configure ethernet reference clock as input. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 2c23a919d655700f2b567ced1ed0307bfdede05e Author: Oleksij Rempel Date: Tue Jan 31 09:46:33 2023 +0100 ARM: dts: imx6dl-victgo: configure ethernet reference clock parent On this board the PHY is the ref clock provider. So, configure ethernet reference clock as input. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 03c8a3c719884cb6a7e0f1cb328d58ee13d445d7 Author: Oleksij Rempel Date: Tue Jan 31 09:46:32 2023 +0100 ARM: dts: imx6dl-prtmvt: configure ethernet reference clock parent On this board the PHY is the ref clock provider. So, configure ethernet reference clock as input. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 887185649c7ee8a9cc2d4e94de92bbbae6cd3747 Author: Oleksij Rempel Date: Tue Jan 31 09:46:31 2023 +0100 ARM: dts: imx6dl-plym2m: configure ethernet reference clock parent On this board the PHY is the ref clock provider. So, configure ethernet reference clock as input. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 5417c655b98ed385d18695a9fbb384883a0d1f47 Author: Oleksij Rempel Date: Tue Jan 31 09:46:30 2023 +0100 ARM: dts: imx6dl-plybas: configure ethernet reference clock parent On this board the PHY is the ref clock provider. So, configure ethernet reference clock as input. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit aad004c1382c186d1c787155f8ce8a5ee98a9974 Author: Oleksij Rempel Date: Tue Jan 31 09:46:29 2023 +0100 ARM: dts: imx6dl-alti6p: configure ethernet reference clock parent On this board the PHY is the ref clock provider. So, configure ethernet reference clock as input. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit d289654fd62b5fc21b81e23ead100e4d47ee2db7 Author: Oleksij Rempel Date: Tue Jan 31 09:46:28 2023 +0100 ARM: dts: imx6dl-lanmcu: configure ethernet reference clock parent On this board the PHY is the ref clock provider. So, configure ethernet reference clock as input. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 006ab3142f313129e505375f68a0e5fda1c5a5d4 Author: Oleksij Rempel Date: Tue Jan 31 09:46:27 2023 +0100 ARM: dts: imx6qdl: use enet_clk_ref instead of enet_out for the FEC node Old imx6q machine code makes RGMII/RMII clock direction decision based on configuration of "ptp" clock. "enet_out" is not used and make no real sense, since we can't configure it as output or use it as clock provider. Instead of "enet_out" use "enet_clk_ref" which is actual selector to choose between internal and external clock source: FEC MAC <---------- enet_clk_ref <--------- SoC PLL \ ^------<-> refclock PAD (bi directional) Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 4a25aa8a308831f137a542e2cedf7a507301b0fc Author: Michael Tretter Date: Fri Jan 13 10:54:14 2023 +0100 ARM: dts: imx7d: add node for PXP The i.MX7d contains a Pixel Pipeline in version 3.0. Add the device tree node to make it available. Signed-off-by: Michael Tretter Reviewed-by: Philipp Zabel Signed-off-by: Shawn Guo commit e87f3be1c7f88ae10bbf100da1e6dc5939de7378 Author: Oleksij Rempel Date: Tue Jan 31 09:46:41 2023 +0100 ARM: mach-imx: imx6ul: remove not optional ethernet refclock overwrite Ethernet refclock direction is board specific and should be configurable by devicetree. In fact there are board not working with this defaults, which will be fixed by separate patch. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 5e16360a01e6b58862a22711d5c6565f1a106b00 Author: Oleksij Rempel Date: Tue Jan 31 09:46:26 2023 +0100 ARM: imx6q: skip ethernet refclock reconfiguration if enet_clk_ref is present Current mach-imx6q code has following logic: - if ptp clock of the ethernet controller node is attached to the SoC internal enet_ref clock, then we configure RMII reference clock pin as output by setting IOMUXC_GPR1 BIT(21). In this case - MAC (SoC) is the clock provider, PHY is the clock consumer. - if ptp clock of the ethernet controller node is not attached to the enet_ref clock, then we configure RMII reference clock pin as input by clearing IOMUXC_GPR1 BIT(21). In this case - PHY is the clock provider, MAC is the clock consumer. According to the Freescale MX6SDL ReferenceManual v4, IOMUXC_GPR1 BIT(21) (page 2033) this configuration bit is not related to the PTP (IEEE1588) clock: 21 ENET_CLK_SEL - choose enet reference clk mode: 0 - get enet tx reference clk from pad (external OSC for both external PHY and Internal Controller) 1 - get enet tx reference clk from internal clock from anatop (loopback through pad), this clock also sent out to external PHY. According to the Documentation/devicetree/bindings/net/fsl,fec.yaml: The "ptp"(option), for IEEE1588 timer clock that requires the clock. The "enet_clk_ref"(option), for MAC transmit/receiver reference clock like RGMII TXC clock or RMII reference clock. It depends on board design, the clock is required if RGMII TXC and RMII reference clock source from SOC internal PLL. The "enet_out"(option), output clock for external device, like supply clock for PHY. The clock is required if PHY clock source from SOC. We can see, that "enet_clk_ref" clock is the best fit for this purpose. Other properties like "ptp" is designed for IEEE1588 and "enet_out" do not have real functionality within imx related clock infrastructure. Since the "enet_clk_ref" is not used by the imx6qdl devicetrees, we can use it as indicator of potentially properly configured DT. At same time we can keep ptp clock based logic as the fallback for old DTs. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 0aaf08de8426f823bd0e36797445222e6392e374 Author: Al Viro Date: Thu Jan 19 19:22:22 2023 -0500 __blockdev_direct_IO(): get rid of submit_io callback always NULL... Signed-off-by: Al Viro commit eb2317b13b1884b07db23d986988620941b2f075 Author: Al Viro Date: Mon Sep 20 17:09:04 2021 -0400 nios2: _TIF_ALLWORK_MASK is unused Signed-off-by: Al Viro commit 9dedb724446913ea7b1591b4b3d2e3e909090980 Author: Zev Weiss Date: Thu Feb 23 16:04:00 2023 -0800 ARM: dts: aspeed: asrock: Correct firmware flash SPI clocks While I'm not aware of any problems that have occurred running these at 100 MHz, the official word from ASRock is that 50 MHz is the correct speed to use, so let's be safe and use that instead. Signed-off-by: Zev Weiss Cc: stable@vger.kernel.org Fixes: 2b81613ce417 ("ARM: dts: aspeed: Add ASRock E3C246D4I BMC") Fixes: a9a3d60b937a ("ARM: dts: aspeed: Add ASRock ROMED8HM3 BMC") Link: https://lore.kernel.org/r/20230224000400.12226-4-zev@bewilderbeest.net Signed-off-by: Joel Stanley commit 8bc5ae1d2b207b855010591adeace94f9ec4caf2 Author: Zev Weiss Date: Thu Feb 23 16:03:59 2023 -0800 ARM: dts: aspeed: e3c246d4i: Add PECI device Now that we've got driver support for it, we might as well enable and use it. Signed-off-by: Zev Weiss Link: https://lore.kernel.org/r/20230224000400.12226-3-zev@bewilderbeest.net Signed-off-by: Joel Stanley commit a3fd10732d276d7cf372c6746a78a1c8b6aa7541 Author: Zev Weiss Date: Thu Feb 23 16:03:58 2023 -0800 ARM: dts: aspeed: romed8hm3: Fix GPIO polarity of system-fault LED Turns out it's in fact not the same as the heartbeat LED. Signed-off-by: Zev Weiss Cc: stable@vger.kernel.org # v5.18+ Fixes: a9a3d60b937a ("ARM: dts: aspeed: Add ASRock ROMED8HM3 BMC") Link: https://lore.kernel.org/r/20230224000400.12226-2-zev@bewilderbeest.net Signed-off-by: Joel Stanley commit ae2ade4ba58167f165fbf3db19380f9b72c56db8 Author: Christophe JAILLET Date: Wed Mar 1 21:58:52 2023 +0100 spi: Reorder fields in 'struct spi_message' Group some variables based on their sizes to reduce hole and avoid padding. On x86_64, this shrinks the size from 112 to 96 bytes. This should have no real impact on memory allocation because 'struct spi_message' is mostly used on stack, but it can save a few cycles when the structure is initialized with spi_message_init() and co. Signed-off-by: Christophe JAILLET Tested-by: Muhammad Usama Anjum Reviewed-by: Muhammad Usama Anjum Link: https://lore.kernel.org/r/c112aad16eb47808e1ec10abd87b3d273c969a68.1677704283.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 8c220e6c6da9c2f70a78ba8b3121893b3634a54c Author: Lizhe Date: Sun Feb 26 14:33:34 2023 +0800 drivers/spi-rockchip.c : Remove redundant variable slave variable slave in spi_alloc_master() or spi_alloc_slave() has been assigned. it is not necessary to be assigned again Signed-off-by: Lizhe Link: https://lore.kernel.org/r/20230226063334.7489-1-sensor1010@163.com Signed-off-by: Mark Brown commit d447fa6564788af2b8729f66157e1220ecf6d136 Author: Lizhe Date: Sun Feb 26 14:51:25 2023 +0800 drivers/spi-rockchip.c : Use devm_platform_get_and_ioremap_resource makes code better use devm_platform_get_and_ioremap replace platform_get_resource() and devm_ioremap_resource() Signed-off-by: Lizhe Link: https://lore.kernel.org/r/20230226065125.14086-1-sensor1010@163.com Signed-off-by: Mark Brown commit f58ab0fa7a23e5e1f55c0c1df266bb0daf1c19cc Author: Jiapeng Chong Date: Tue Feb 28 10:32:43 2023 +0800 spi/bcm63xx: Remove the unused function bcm_spi_readw() The function bcm_spi_readw is defined in the spi-bcm63xx.c file, but not called elsewhere, so remove this unused function. drivers/spi/spi-bcm63xx.c:160:19: warning: unused function 'bcm_spi_readw'. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4242 Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20230228023243.118429-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown commit fc12d4bb3227f21e1e7d6d78231074ca542c060d Author: Geert Uytterhoeven Date: Tue Feb 28 15:43:08 2023 +0100 spi: Replace spi_pcpu_stats_totalize() macro by a C function spi_pcpu_stats_totalize() is a rather large macro, and is instantiated 28 times, causing a large amount of duplication in the amount of generated code. Reduce the duplication by replacing spi_pcpu_stats_totalize() by a real C function, and absorb all other common code from spi_statistics_##name##_show(). As (a) the old "field" parameter was the name of a structure member, which cannot be passed to a function, and (b) passing a pointer to the member is also not an option, due to the loop over all possible CPUs, the "field" parameter is replaced by an "offset" parameter, pointing to a location within the structure. This reduces kernel size by ca. 4 KiB (on arm32 and arm64). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/cb7690d9d04c06eec23dbb98fbb5444082125cff.1677594432.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit ada850541ad33f621425a382d0810b839cb3169e Author: Mark Brown Date: Thu Feb 23 17:20:26 2023 +0000 spi: qcom-qspi: Make available for build test There is no build time dependency on the Qualcomm platform support so add an || COMPILE_TEST so we've got better build coverage of the driver. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230221-spi-arch-deps-v1-6-83d1566474cf@kernel.org Signed-off-by: Mark Brown commit f916c7080d28831493518364492e33fc6a437907 Author: Mark Brown Date: Thu Feb 23 17:20:25 2023 +0000 spi: fsi: Make available for build test There is no build time dependency on the platform support so add an || COMPILE_TEST so we've got better build coverage of the driver. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230221-spi-arch-deps-v1-5-83d1566474cf@kernel.org Signed-off-by: Mark Brown commit e48d57d7203441b7a32b4275462ebb9296ea3fa0 Author: Mark Brown Date: Thu Feb 23 17:20:24 2023 +0000 spi: davinci: Make available for build test There is no build time dependency on the DaVicni or Keystone architecture support so add an || COMPILE_TEST so we've got better build coverage of the driver. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230221-spi-arch-deps-v1-4-83d1566474cf@kernel.org Signed-off-by: Mark Brown commit c6b15b2437a10b7b381d32f4a5341f655bfa296f Author: Mark Brown Date: Thu Feb 23 17:20:23 2023 +0000 spi: nxp-flexspi: Fix ARCH_LAYERSCAPE dependency Currently the NXP Flex SPI driver has a dependency on ARCH_LAYERSCAPE || HAS_IOMEM which means that the dependency is almost always true and the driver available. Really these should be two separate dependencies, with an || COMPILE_TEST dependency for the architecture to ensure build coverage is maintained. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230221-spi-arch-deps-v1-3-83d1566474cf@kernel.org Signed-off-by: Mark Brown commit 330a200d360f8b140b31d7da8b657da0472484e6 Author: Mark Brown Date: Thu Feb 23 17:20:22 2023 +0000 spi: rockchip: Add architecture dependency If base support for Rockchip SoCs has been disabled then the SPI driver won't be terribly useful, add a dependency on ARCH_ROCKCHIP || COMPILE_TEST to avoid it appearing when not needed. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20230221-spi-arch-deps-v1-2-83d1566474cf@kernel.org Signed-off-by: Mark Brown commit 60a6c8257f4144f49a7e0178603dd61ef4424a67 Author: Rob Herring Date: Fri Feb 17 14:45:42 2023 -0600 spi: mpc5xxx-psc: Use platform resources instead of parsing DT properties The mpc52xx-psc and mpc512x-psc drivers use DT property parsing functions for 'reg' and 'interrupts', but those are available as platform device resources. Convert probe functions to use them and simplify probe to a single function. For 'cell-index', also use the preferred typed property function. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230217-dt-mpc5xxx-spi-v1-3-3be8602fce1e@kernel.org Signed-off-by: Mark Brown commit 01602336524e170bf7fe745b29258a4d1cafa9dd Author: Rob Herring Date: Fri Feb 17 14:45:41 2023 -0600 spi: mpc5xxx-psc: Convert probe to use devres functions Convert the mpc52xx-psc and mpc512x-psc drivers to use the managed devres variants of functions in probe. Also use dev_err_probe() as appropriate. With this, the error handling can be simplified. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230217-dt-mpc5xxx-spi-v1-2-3be8602fce1e@kernel.org Signed-off-by: Mark Brown commit 04725901d9933b3134e6dee6b5bc1efb67f8d43f Author: Rob Herring Date: Fri Feb 17 14:45:40 2023 -0600 spi: mpc5xxx-psc: Remove unused platform_data The platform_data for the MPC5xxx PSC SPI controllers is never used, so remove it and the resulting code which depends on it. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20230217-dt-mpc5xxx-spi-v1-1-3be8602fce1e@kernel.org Signed-off-by: Mark Brown commit 47fef94afeae2a125607b6b45145594713471320 Author: William Qiu Date: Thu Mar 2 18:52:21 2023 +0800 spi: cadence-quadspi: Add support for StarFive JH7110 QSPI Add QSPI reset operation in device probe and add RISCV support to QUAD SPI Kconfig. Co-developed-by: Ziv Xu Signed-off-by: Ziv Xu Signed-off-by: William Qiu Link: https://lore.kernel.org/r/20230302105221.197421-3-william.qiu@starfivetech.com Signed-off-by: Mark Brown commit 13f1033e07588b7d1151d22d7ee3ca8f16181de7 Author: William Qiu Date: Thu Mar 2 18:52:20 2023 +0800 dt-bindings: qspi: cdns,qspi-nor: constrain minItems/maxItems of resets The QSPI controller needs three reset items to work properly on JH7110 SoC, so there is need to change the maxItems's value to 3 and add minItems whose value is equal to 2. Other platforms do not have this constraint. Signed-off-by: William Qiu Link: https://lore.kernel.org/r/20230302105221.197421-2-william.qiu@starfivetech.com Signed-off-by: Mark Brown commit 4536f3b93a3373cac21911103cbaa8c4c2932c38 Author: ChiYuan Huang Date: Fri Feb 17 10:06:58 2023 +0800 regulator: Add support for Richtek RT5739 voltage regulator The RT5739 is a step-down switching voltage regulator that supports output voltage ragne from 300mV to 1300mV with the wide input supply voltage range from 2.5V to 5.5V. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1676599618-24819-3-git-send-email-cy_huang@richtek.com Signed-off-by: Mark Brown commit 2e238605a9d631fc8b9b130ba79cd54f2a22df10 Author: ChiYuan Huang Date: Fri Feb 17 10:06:57 2023 +0800 dt-bindings: regulator: Add Richtek RT5739 Add the binding document for Richtek RT5739. Signed-off-by: ChiYuan Huang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1676599618-24819-2-git-send-email-cy_huang@richtek.com Signed-off-by: Mark Brown commit 9b400171a69d2487c3196cc3b6de60de3b08e1ee Author: Andy Shevchenko Date: Mon Feb 20 17:33:34 2023 +0200 regmap-irq: Place kernel doc of struct regmap_irq_chip in order It seems that a couple of members got lost theirorder, put them back. Besides that, split field descriptions into groups in the same way as it's done in the structure definition. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230220153334.87049-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 4d60cac951fd2dfbf261b83abb805748abc8b995 Author: William Breathitt Gray Date: Mon Feb 27 11:45:22 2023 -0500 regmap-irq: Add no_status support Some devices lack status registers, yet expect to handle interrupts. Introduce a no_status flag to indicate such a configuration, where rather than read a status register to verify, all interrupts received are assumed to be active. Cc: Mark Brown Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/bd501b4b5ff88da24d467f75e8c71b4e0e6f21e2.1677515341.git.william.gray@linaro.org Signed-off-by: Mark Brown commit 522272047dc631610dd180be0c3670043bcdf42e Author: Lucas Tanure Date: Thu Jan 12 17:18:40 2023 +0000 regmap: sdw: Remove 8-bit value size restriction Some SoundWire devices have larger width device specific register maps, in addition to the standard SoundWire 8-bit map. Update the helpers to allow accessing arbitrarily sized register values and remove the explicit 8-bit restriction from regmap_sdw_config_check. Signed-off-by: Lucas Tanure Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20230112171840.2098463-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 6466b376e927d51ea3eadc1965714305d8c3c066 Author: Charles Keepax Date: Thu Jan 12 17:18:39 2023 +0000 regmap: sdw: Update misleading comment In the regmap config reg_bits represents the number of address bits not the number of value bits. Correct the misleading comment which looks a lot like it suggests the register value itself is 32-bits wide. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20230112171840.2098463-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 631b8a8bb448e90764b8d4b6c0f8cdcc97b1e3e4 Author: Krzysztof Kozlowski Date: Mon Feb 20 10:56:43 2023 +0100 ASoC: dt-bindings: qcom,wcd9335: Convert to dtschema Convert the Qualcomm WCD9335 audio codec binding to DT schema. Changes against original binding: 1. Drop "mclk2" from clocks as neither Linux driver nor DTS uses it. 2. Do not require vdd-micbias-supply as several DTS do not provide it. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20230220095643.64898-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 0106ba2476e1cce06da738a2076a98428a7da2a2 Author: Krzysztof Kozlowski Date: Mon Feb 20 10:56:42 2023 +0100 ASoC: dt-bindings: qcom,wcd934x: Reference dai-common Reference common DAI properties to get sound-dai-cells description and allow name-prefix. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230220095643.64898-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit a2d4051b0bd6dffcd736888ae89a550d6f60b060 Author: Svyatoslav Ryhel Date: Tue Feb 21 20:32:03 2023 +0200 ASoC: jack: allow multiple interrupt per gpio This feature is required for coupled hp-mic quirk used by some Nvidia Tegra 3 based devices work properly. Signed-off-by: Svyatoslav Ryhel Link: https://lore.kernel.org/r/20230221183211.21964-3-clamor95@gmail.com Signed-off-by: Mark Brown commit 7f8b5b24bbb463614dd6b797e6b2ee92b3e2a6a1 Author: Kuninori Morimoto Date: Mon Feb 13 02:13:06 2023 +0000 ASoC: dt-bindings: renesas,rsnd.yaml: add R-Car Gen4 support There are no compatible for "reg/reg-names" and "clock-name" between previous R-Car series and R-Car Gen4. "reg/reg-names" needs 3 categorize (for Gen1, for Gen2/Gen3, for Gen4), therefore, use 3 if-then to avoid nested if-then-else. Move "clock-name" detail properties to under allOf to use if-then-else for Gen4 or others. Link: https://lore.kernel.org/all/87zg9vk0ex.wl-kuninori.morimoto.gx@renesas.com/#r Link: https://lore.kernel.org/all/87r0v2uvm7.wl-kuninori.morimoto.gx@renesas.com/#r Link: https://lore.kernel.org/all/87r0v1t02h.wl-kuninori.morimoto.gx@renesas.com/#r Link: https://lore.kernel.org/all/87y1p7bpma.wl-kuninori.morimoto.gx@renesas.com/#r Reported-by: Geert Uytterhoeven Signed-off-by: Kuninori Morimoto Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/87sffa8g99.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 587cbe99152fd735605f3502f42f640bb54f6048 Author: Gustavo A. R. Silva Date: Thu Feb 23 21:42:26 2023 -0600 ASoC: SOF: ipc4-topology: Replace fake flexible arrays with flexible-array member Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. Use the DECLARE_FLEX_ARRAY() helper macro to transform zero-length arrays in unions with flexible-array members. Address the following warnings found with GCC-13 and -fstrict-flex-arrays=3 enabled: sound/soc/sof/ipc4-control.c:176:77: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:78:29: warning: array subscript 0 is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:80:33: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:95:53: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:96:53: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:93:53: warning: array subscript 0 is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:140:58: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:141:29: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-control.c:142:29: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-topology.c:1475:36: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] sound/soc/sof/ipc4-topology.c:1476:36: warning: array subscript i is outside array bounds of ‘struct sof_ipc4_ctrl_value_chan[0]’ [-Warray-bounds=] This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/21 Link: https://github.com/KSPP/linux/issues/193 Link: https://github.com/KSPP/linux/issues/258 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Signed-off-by: Gustavo A. R. Silva Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/Y/gyIg1qZduhigPi@work Signed-off-by: Mark Brown commit cd01b5f090434e7b2661aee208745539c552f5d2 Author: Seven Lee Date: Fri Feb 17 17:25:23 2023 +0800 ASoC: nau8821: Implement DRC controls This patch is support dynamic range compression controls. Signed-off-by: Seven Lee Signed-off-by: Seven Lee Link: https://lore.kernel.org/r/20230217092523.357142-1-wtli@nuvoton.com Signed-off-by: Mark Brown commit 4c2c935a278e53bf9a1713bb0a01ce299a994e9b Author: Srinivas Kandagatla Date: Thu Mar 2 10:46:16 2023 +0000 ASoC: qcom: common: add kcontrol to jack pins Add Kcontrol to jack pins so that device switch in ucm can be done correctly. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20230302104616.26318-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 5ddcf9768f7a15da997259038c16a9e00c06aa87 Author: Chancel Liu Date: Mon Feb 27 17:19:37 2023 +0800 ASoC: dt-bindings: wlf,wm8524: Convert to json-schema Convert the Wolfson WM8524 24-bit 192KHz Stereo DAC device tree binding documentation to json-schema. Signed-off-by: Chancel Liu Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230227091938.1671416-1-chancel.liu@nxp.com Signed-off-by: Mark Brown commit af5932fc58d351d3908d0a732ccabaef088311a0 Author: Krzysztof Kozlowski Date: Fri Feb 17 16:06:25 2023 +0100 ASoC: dt-bindings: wlf,wm8960: Convert to dtschema Convert the Wolfson WM8960 audio codecs bindings to DT schema. Changes against original binding: 1. Document clocks and clock-names - already present in DTS and used by Linux driver. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20230217150627.779764-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit c9ef0fee3bdf8197538aadc728e475fceba113bb Author: Jacob Keller Date: Fri Mar 3 10:04:57 2023 -0800 ASoC: Intel: avs: Use struct_size for struct avs_modcfg_ext size The struct avs_modcfg_ext structure has a flexible array member for the pin_fmts array, and the size should be calculated using struct_size to prevent the potential for overflow with the allocation. Reviewed-by: Cezary Rojewski Reviewed-by: "Amadeusz Sławiński" Signed-off-by: Jacob Keller Link: https://lore.kernel.org/r/20230303180457.2457069-1-jacob.e.keller@intel.com Signed-off-by: Mark Brown commit 15dbfc04e6865bae1aa275216baa1a7eb55cd2cf Author: Claudiu Beznea Date: Wed Mar 1 13:38:07 2023 +0200 MAINTAINERS: update Microchip AT91 sound entries with documentation files Add documentation files to Microchip AT91 sound entries. Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230301113807.24036-9-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 8f943f00d7a844daa9acafd304c2178f30ecc255 Author: Claudiu Beznea Date: Wed Mar 1 13:38:06 2023 +0200 MAINTAINERS: add myself as maintainer for Microchip AT91 sound drivers Codrin is not with Microchip anymore. As I worked lately with Microchip AT91 sound drivers add myself as maintainer for these. Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20230301113807.24036-8-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit cb72b29cd5cfac20894a040e411dec70bb75097c Author: Claudiu Beznea Date: Wed Mar 1 13:38:05 2023 +0200 ASoC: mchp-pdmc: avoid casting to/from void pointer Do not cast to and from void pointer. There is no need for this. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230301113807.24036-7-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 51124a30308e6db8658575e5d9ec1ea3cb3ba3c3 Author: Claudiu Beznea Date: Wed Mar 1 13:38:04 2023 +0200 ASoC: mchp-pdmc: return directly ret Return directly ret instead of having different branches for error and OK paths. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230301113807.24036-6-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 129742576dd1b972ea1e671595a085e29012f7f3 Author: Claudiu Beznea Date: Wed Mar 1 13:38:03 2023 +0200 ASoC: mchp-pdmc: use FIELD_PREP() where possible Use FIELD_PREP() macro where possible instead of driver local defined macros. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230301113807.24036-5-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 2d8dad4dc4d4a12afa3c31e72b60727d4c133b99 Author: Claudiu Beznea Date: Wed Mar 1 13:38:02 2023 +0200 ASoC: mchp-spdiftx: update debug message Previous debug message states that there was a failure and tx was not disabled. Which is not true as the TX in this function could also be enabled. Thus improve a bit the debug message by s/disable/start\/stop/. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230301113807.24036-4-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 0ab4bd5bf277349262065e88eb2feaaabf53584c Author: Claudiu Beznea Date: Wed Mar 1 13:38:01 2023 +0200 ASoC: mchp-spdiftx: use regmap_update_bits() Use regmap_update_bits() instead of regmap_read(), running variable, regmap_write(). There is no need for extra variables and checks around it as regmap_update_bits() already does this. With this code becomes simpler. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230301113807.24036-3-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 28ce5698456ab53540093836c6fee15119cf1821 Author: Claudiu Beznea Date: Wed Mar 1 13:38:00 2023 +0200 ASoC: mchp-spdiftx: use FIELD_PREP() where possible Use directly FIELD_PREP() marco where possible. There is no need for the extra wrappers. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/20230301113807.24036-2-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 448b06ba107d925d59d02781acdd2e4ad12dda0b Author: Benjamin Bara Date: Fri Mar 3 11:04:03 2023 +0100 ASoC: maxim,max9867: add "mclk" support Add basic support for the codecs' mclk. Enable it on SND_SOC_BIAS_ON, disable it on SND_SOC_BIAS_OFF. Signed-off-by: Benjamin Bara Signed-off-by: Richard Leitner Link: https://lore.kernel.org/r/20230302-max9867-v2-3-fd2036d5e825@skidata.com Signed-off-by: Mark Brown commit d63e55b3e8ec90da69107f32038f3059d7317cc5 Author: Richard Leitner Date: Fri Mar 3 11:04:02 2023 +0100 ASoC: dt-bindings: maxim,max9867: add clocks property Add clocks property to require a "mclk" definition for the maxim,max9867 codec. Signed-off-by: Richard Leitner Link: https://lore.kernel.org/r/20230302-max9867-v2-2-fd2036d5e825@skidata.com Signed-off-by: Mark Brown commit 6668f70abeea30f4674b2fdbc4232d5c3611b272 Author: Richard Leitner Date: Fri Mar 3 11:04:01 2023 +0100 ASoC: dt-bindings: maxim,max9867: convert txt bindings to yaml Convert from max9867.txt to maxim,max9867.yaml and add missing '#sound-dai-cells' property. Signed-off-by: Richard Leitner Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230302-max9867-v2-1-fd2036d5e825@skidata.com Signed-off-by: Mark Brown commit 2b5a30cafb2eff4e6a34bc80b1d16ed6ca5c2c71 Author: Ranjani Sridharan Date: Mon Feb 20 09:58:04 2023 +0200 ASoC: SOF: Intel: MTL: Enable DMI L1 DMI L1 should be enabled unconditionally after FW boot is complete. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230220075804.4829-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 1133a9aaf36510ffbb83573b8982239b5a2dbee0 Author: Ranjani Sridharan Date: Mon Feb 20 09:58:03 2023 +0200 ASoC: SOF: Intel: hda: Restrict DMI L1 disable workaround The workaround to disable DMI L1 should be restricted to only the CAVS IP's. Signed-off-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230220075804.4829-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit ae9db908517717888c4d618fdb90c02ec3fa1b3d Author: Ranjani Sridharan Date: Mon Feb 20 09:58:02 2023 +0200 ASoC: SOF: Intel: hda: Do not re-enable L1 if disabled before suspend We have a workaround in place to address a known issue with host DMA running into xruns when capture streams are running. But when resuming from Sx, we unconditionally re-enable DMI L1 without taking the workaround into account and this could lead to xruns when a suspended capture stream is restarted. To fix this rename the flag l1_support_enabled to l1_disabled in struct sof_intel_hda_dev to save the L1 disabled status which can be set/cleared when we get/put a stream and use the flag to determine if DMI L1 should enabled or not during the post_fw_run op. Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Rander Wang Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20230220075804.4829-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit e902324826ec276e50140a462c991c37b04cd392 Author: Lucas Tanure Date: Fri Feb 17 11:08:50 2023 +0000 ASoC: amd: vangogh: Add components prefix in structs and function names Add prefixes 8821/35l41 in structs and function names so future platforms can be added and reference the correct sound card. Also include acp5x prefix to cs35l41_conf. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20230217110850.1045250-10-lucas.tanure@collabora.com Signed-off-by: Mark Brown commit c10955e4bf28b058862e4f82c7eb8d6f315d8a52 Author: Lucas Tanure Date: Fri Feb 17 11:08:49 2023 +0000 ASoC: amd: vangogh: Centralize strings definition Replace occurrences of strings by their definition, avoiding bugs where the string changed, but not all places have been modified. While at it rename defines to use NAU8821 codec name instead of NUVOTON and align with the other defines. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20230217110850.1045250-9-lucas.tanure@collabora.com Signed-off-by: Mark Brown commit ab89aa0d3bdef8cea6002c237c669f980a13b0e4 Author: Lucas Tanure Date: Fri Feb 17 11:08:48 2023 +0000 ASoC: amd: vangogh: Move nau8821 and CPU side code up for future platform Move nau8821 and CPU side code up in the source so future platforms can be added. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20230217110850.1045250-8-lucas.tanure@collabora.com Signed-off-by: Mark Brown commit 9490fbb85be830b9f4078775d678426335e36a64 Author: Lucas Tanure Date: Fri Feb 17 11:08:47 2023 +0000 ASoC: amd: vangogh: Check Bit Clock rate before snd_soc_dai_set_pll Check bit clock is valid before setting it with snd_soc_dai_set_pll Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20230217110850.1045250-7-lucas.tanure@collabora.com Signed-off-by: Mark Brown commit a719afe679b1c84413a70132a2de69c36b469144 Author: Lucas Tanure Date: Fri Feb 17 11:08:46 2023 +0000 ASoC: amd: vangogh: use for_each_rtd_components instead of for To iterate over components use for_each_rtd_components And compare to component name, so asoc_rtd_to_codec and the dai code can be removed Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20230217110850.1045250-6-lucas.tanure@collabora.com Signed-off-by: Mark Brown commit 88f5870dd360e6604dceff808bf960bf6ddf0377 Author: Lucas Tanure Date: Fri Feb 17 11:08:45 2023 +0000 ASoC: amd: vangogh: remove unnecessarily included headers Remove unused includes and replace by Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20230217110850.1045250-5-lucas.tanure@collabora.com Signed-off-by: Mark Brown commit 50e81116ef576b58384c8829bd767b5decbc2968 Author: Lucas Tanure Date: Fri Feb 17 11:08:44 2023 +0000 ASoC: amd: vangogh: use sizeof of variable instead of struct type Use sizeof(*machine) instead of sizeof(struct acp5x_platform_info) There is a possibility of bug when variable type has changed but corresponding struct passed to the sizeof has not. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20230217110850.1045250-4-lucas.tanure@collabora.com Signed-off-by: Mark Brown commit ddd42a12a33eb4d6e9f90a75c50e5044c83b99cf Author: Lucas Tanure Date: Fri Feb 17 11:08:43 2023 +0000 ASoC: amd: vangogh: Small code refactor Small refactor of the code: - sort includes in alphabetical order - sort variables declarations by line length - remove unnecessary "struct snd_soc_card *card" lines - insert blank lines before return - break/unbreak some lines for better read - align defines Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20230217110850.1045250-3-lucas.tanure@collabora.com Signed-off-by: Mark Brown commit 00d612909e12827f77891a0bd7802855fae330da Author: Lucas Tanure Date: Fri Feb 17 11:08:42 2023 +0000 ASoC: amd: vangogh: Remove unnecessary init function Remove empty acp5x_cs35l41_init function Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20230217110850.1045250-2-lucas.tanure@collabora.com Signed-off-by: Mark Brown commit eb7ff1cbe7494e7f67e33afdab37361081882ca2 Author: Herve Codina Date: Fri Feb 17 15:56:45 2023 +0100 MAINTAINERS: add the Freescale QMC audio entry After contributing the component, add myself as the maintainer for the Freescale QMC audio ASoC component. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20230217145645.1768659-11-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 075c7125b11c72e7933401d73000d6d151196072 Author: Herve Codina Date: Fri Feb 17 15:56:44 2023 +0100 ASoC: fsl: Add support for QMC audio The QMC audio is an ASoC component which provides DAIs that use the QMC (QUICC Multichannel Controller) to transfer the audio data. It provides as many DAIs as the number of QMC channels it references. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Tested-by: Christophe Leroy Link: https://lore.kernel.org/r/20230217145645.1768659-10-herve.codina@bootlin.com Signed-off-by: Mark Brown commit f72ebecd8008e1ccf2e85da9791339e572cc9333 Author: Herve Codina Date: Fri Feb 17 15:56:43 2023 +0100 dt-bindings: sound: Add support for QMC audio The QMC (QUICC mutichannel controller) is a controller present in some PowerQUICC SoC such as MPC885. The QMC audio is an ASoC component that uses the QMC controller to transfer the audio data. Signed-off-by: Herve Codina Reviewed-by: Krzysztof Kozlowski Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20230217145645.1768659-9-herve.codina@bootlin.com Signed-off-by: Mark Brown commit db12f7bbbb22d06ba9f65dc607d230f636e4a22a Author: Herve Codina Date: Fri Feb 17 15:56:42 2023 +0100 MAINTAINERS: add the Freescale QMC controller entry After contributing the driver, add myself as the maintainer for the Freescale QMC controller. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20230217145645.1768659-8-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 3178d58e0b9772d690456c0bdf8c9f5e191d45f1 Author: Herve Codina Date: Fri Feb 17 15:56:41 2023 +0100 soc: fsl: cpm1: Add support for QMC The QMC (QUICC Multichannel Controller) emulates up to 64 channels within one serial controller using the same TDM physical interface routed from the TSA. It is available in some PowerQUICC SoC such as the MPC885 or MPC866. It is also available on some Quicc Engine SoCs. This current version support CPM1 SoCs only and some enhancement are needed to support Quicc Engine SoCs. Signed-off-by: Herve Codina Acked-by: Li Yang Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20230217145645.1768659-7-herve.codina@bootlin.com Signed-off-by: Mark Brown commit a9b121327c939624e3e2c244283883501846fa97 Author: Herve Codina Date: Fri Feb 17 15:56:40 2023 +0100 dt-bindings: soc: fsl: cpm_qe: Add QMC controller Add support for the QMC (QUICC Multichannel Controller) available in some PowerQUICC SoC such as MPC885 or MPC866. Signed-off-by: Herve Codina Reviewed-by: Krzysztof Kozlowski Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20230217145645.1768659-6-herve.codina@bootlin.com Signed-off-by: Mark Brown commit b38736ac01e34491f339e12f9883dc4a8cc3d358 Author: Herve Codina Date: Fri Feb 17 15:56:39 2023 +0100 powerpc/8xx: Use a larger CPM1 command check mask The CPM1 command mask is defined for use with the standard CPM1 command register as described in the user's manual: 0 |1 3|4 7|8 11|12 14| 15| RST| - |OPCODE|CH_NUM| - |FLG| In the QMC extension the CPM1 command register is redefined (QMC supplement user's manuel) with the following mapping: 0 |1 3|4 7|8 13|14| 15| RST|QMC OPCODE| 1110|CHANNEL_NUMBER| -|FLG| Extend the check command mask in order to support both the standard CH_NUM field and the QMC extension CHANNEL_NUMBER field. Signed-off-by: Herve Codina Acked-by: Christophe Leroy Acked-by: Michael Ellerman Link: https://lore.kernel.org/r/20230217145645.1768659-5-herve.codina@bootlin.com Signed-off-by: Mark Brown commit a2b117414f16b036d2eb5081d5776872e3731c51 Author: Herve Codina Date: Fri Feb 17 15:56:38 2023 +0100 MAINTAINERS: add the Freescale TSA controller entry After contributing the driver, add myself as the maintainer for the Freescale TSA controller. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20230217145645.1768659-4-herve.codina@bootlin.com Signed-off-by: Mark Brown commit 1d4ba0b81c1cf2bfc0c55658f53809846ae9de52 Author: Herve Codina Date: Fri Feb 17 15:56:37 2023 +0100 soc: fsl: cpm1: Add support for TSA The TSA (Time Slot Assigner) purpose is to route some TDM time-slots to other internal serial controllers. It is available in some PowerQUICC SoC such as the MPC885 or MPC866. It is also available on some Quicc Engine SoCs. This current version support CPM1 SoCs only and some enhancement are needed to support Quicc Engine SoCs. Signed-off-by: Herve Codina Acked-by: Li Yang Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20230217145645.1768659-3-herve.codina@bootlin.com Signed-off-by: Mark Brown commit f8c760e8fc414bb02373c5ede62fdac53ca8ccb2 Author: Herve Codina Date: Fri Feb 17 15:56:36 2023 +0100 dt-bindings: soc: fsl: cpm_qe: Add TSA controller Add support for the time slot assigner (TSA) available in some PowerQUICC SoC such as MPC885 or MPC866. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20230217145645.1768659-2-herve.codina@bootlin.com Signed-off-by: Mark Brown commit f5db4d00f73871988beba0277ea29cff73d38445 Author: Kamel Bouhara Date: Wed Feb 22 09:33:00 2023 +0100 ASoC: tas571x: add support for TAS5733 This adds support for TAS5733. Signed-off-by: Kamel Bouhara Link: https://lore.kernel.org/r/20230222083300.218523-3-kamel.bouhara@bootlin.com Signed-off-by: Mark Brown commit 95a29d5f626a37dbefd0883f294ec4e22a8a7911 Author: Kamel Bouhara Date: Wed Feb 22 09:32:59 2023 +0100 ASoC: tas571x: add tas5733 compatible This adds the tas5733 to the TAS571X binding. Signed-off-by: Kamel Bouhara Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230222083300.218523-2-kamel.bouhara@bootlin.com Signed-off-by: Mark Brown commit 38c042b59af0248a8b13f01b1a09d890997c9f6e Author: Lad Prabhakar Date: Fri Feb 17 18:52:23 2023 +0000 ASoC: sh: rz-ssi: Update interrupt handling for half duplex channels For half duplex channels we dont have separate interrupts for Tx and Rx instead we have single interrupt Rt (where the signal for Rx and Tx is muxed). To handle such a case install a handler in case we have a dma_rt interrupt specified in the DT for the PIO mode. Note, for backward compatibility we check if the Rx and Tx interrupts are present first instead of checking Rt interrupt. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Link: https://lore.kernel.org/r/20230217185225.43310-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Mark Brown commit 56a3840486ae22c42176828e25d4073712837bfd Author: Lad Prabhakar Date: Fri Feb 17 18:52:22 2023 +0000 ASoC: dt-bindings: renesas,rz-ssi: Update interrupts and interrupt-names properties From R01UH0914EJ0120 Rev.1.20 HW manual, for full duplex channels (SSI0/1/3) dma_rt interrupt has now being marked as reserved and similarly for half duplex channel (SSI2) dma_rx and dma_tx interrupts have now being marked as reserved (this applies to RZ/G2L and alike SoC's). This patch updates the binding doc to match the same. While at it also updated the example node. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230217185225.43310-2-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Mark Brown commit 340307d7effd99303fe933cde3b7288f8f3c6677 Author: Lucas Tanure Date: Thu Feb 23 08:43:24 2023 +0000 ASoC: dt-bindings: cirrus,cs35l41: Document CS35l41 shared boost Describe the properties used for shared boost configuration. Based on David Rhodes shared boost patches. Signed-off-by: Lucas Tanure Acked-by: Krzysztof Kozlowski Reviewed-by: David Rhodes Link: https://lore.kernel.org/r/20230223084324.9076-5-lucas.tanure@collabora.com Signed-off-by: Mark Brown commit f5030564938be112183ba3df0cdd6dea3f694c2e Author: Lucas Tanure Date: Thu Feb 23 08:43:23 2023 +0000 ALSA: cs35l41: Add shared boost feature Shared boost allows two amplifiers to share a single boost circuit by communicating on the MDSYNC bus. The passive amplifier does not control the boost and receives data from the active amplifier. Shared Boost is not supported in HDA Systems. Based on David Rhodes shared boost patches. Signed-off-by: Lucas Tanure Reviewed-by: David Rhodes Link: https://lore.kernel.org/r/20230223084324.9076-4-lucas.tanure@collabora.com Signed-off-by: Mark Brown commit be9457f12e84437259707415364cc5fc96041ed6 Author: Lucas Tanure Date: Thu Feb 23 08:43:22 2023 +0000 ASoC: cs35l41: Refactor error release code Add cs35l41_error_release function to handle error release sequences. Signed-off-by: Lucas Tanure Acked-by: Charles Keepax Reviewed-by: David Rhodes Link: https://lore.kernel.org/r/20230223084324.9076-3-lucas.tanure@collabora.com Signed-off-by: Mark Brown commit 4658de99d43cd740e019e7fd124b4128f8f4027f Author: Lucas Tanure Date: Thu Feb 23 08:43:21 2023 +0000 ASoC: cs35l41: Only disable internal boost In error situations, only the internal boost case should be disabled and re-enabled. Also, for other boost cases re-enabling the boost to the default internal boost config is incorrect. Fixes: 6450ef559056 ("ASoC: cs35l41: CS35L41 Boosted Smart Amplifier") Signed-off-by: Lucas Tanure Acked-by: Charles Keepax Reviewed-by: David Rhodes Link: https://lore.kernel.org/r/20230223084324.9076-2-lucas.tanure@collabora.com Signed-off-by: Mark Brown commit c5dc1756dc98e730ebcaed156a05b961086dc2f0 Author: Simon Ser Date: Mon Feb 27 12:25:26 2023 +0000 drm: remove outdated doc TODO for subconnector property This is already documented under "standard connector properties". Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Pekka Paalanen Cc: Noralf Trønnes Cc: Mateusz Kwiatkowski Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230227122522.117580-1-contact@emersion.fr commit 409f07d353b3516c71fdf12d7fa576004f0167a9 Author: Simon Ser Date: Tue Feb 28 12:32:04 2023 +0000 drm: document connector margin properties Add docs for "{left,right,top,bottom} margin" properties. v2: - Mention the purpose: mitigate underscan on TVs - Move out of analog TV section into standard props (Pekka) - Mention HDMI AVI InfoFrames (Pekka, Ville) Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Noralf Trønnes Cc: Mateusz Kwiatkowski Cc: Ville Syrjälä Acked-by: Pekka Paalanen Acked-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20230228123156.175973-1-contact@emersion.fr commit f4b4eee6169bb33c5157ebe07e53d7e4be7631c0 Author: Andrii Nakryiko Date: Thu Mar 2 15:50:10 2023 -0800 bpf: add support for fixed-size memory pointer returns for kfuncs Support direct fixed-size (and for now, read-only) memory access when kfunc's return type is a pointer to non-struct type. Calculate type size and let BPF program access that many bytes directly. This is crucial for numbers iterator. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230302235015.2044271-13-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit a461f5adf17756e99ee0903d1a40961b0342ebb3 Author: Andrii Nakryiko Date: Thu Mar 2 15:50:09 2023 -0800 bpf: generalize dynptr_get_spi to be usable for iters Generalize the logic of fetching special stack slot object state using spi (stack slot index). This will be used by STACK_ITER logic next. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230302235015.2044271-12-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit d5271c5b1950b887def1663b75e2d710cc16535f Author: Andrii Nakryiko Date: Thu Mar 2 15:50:08 2023 -0800 bpf: mark PTR_TO_MEM as non-null register type PTR_TO_MEM register without PTR_MAYBE_NULL is indeed non-null. This is important for BPF verifier to be able to prune guaranteed not to be taken branches. This is always the case with open-coded iterators. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230302235015.2044271-11-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit d0e1ac227945c6af616c003365c6feb986dc0839 Author: Andrii Nakryiko Date: Thu Mar 2 15:50:07 2023 -0800 bpf: move kfunc_call_arg_meta higher in the file Move struct bpf_kfunc_call_arg_meta higher in the file and put it next to struct bpf_call_arg_meta, so it can be used from more functions. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230302235015.2044271-10-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 553a64a85c5d1dac277325a0f51a31c056593048 Author: Andrii Nakryiko Date: Thu Mar 2 15:50:06 2023 -0800 bpf: ensure that r0 is marked scratched after any function call r0 is important (unless called function is void-returning, but that's taken care of by print_verifier_state() anyways) in verifier logs. Currently for helpers we seem to print it in verifier log, but for kfuncs we don't. Instead of figuring out where in the maze of code we accidentally set r0 as scratched for helpers and why we don't do that for kfuncs, just enforce that after any function call r0 is marked as scratched. Also, perhaps, we should reconsider "scratched" terminology, as it's mightily confusing. "Touched" would seem more appropriate. But I left that for follow ups for now. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230302235015.2044271-9-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit c1ee85a9806a720aa054f68fe7f9c79418f36c2b Author: Andrii Nakryiko Date: Thu Mar 2 15:50:05 2023 -0800 bpf: fix visit_insn()'s detection of BPF_FUNC_timer_set_callback helper It's not correct to assume that any BPF_CALL instruction is a helper call. Fix visit_insn()'s detection of bpf_timer_set_callback() helper by also checking insn->code == 0. For kfuncs insn->code would be set to BPF_PSEUDO_KFUNC_CALL, and for subprog calls it will be BPF_PSEUDO_CALL. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230302235015.2044271-8-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 653ae3a874aca6764a4c1f5a8bf1b072ade0d6f4 Author: Andrii Nakryiko Date: Thu Mar 2 15:50:04 2023 -0800 bpf: clean up visit_insn()'s instruction processing Instead of referencing processed instruction repeatedly as insns[t] throughout entire visit_insn() function, take a local insn pointer and work with it in a cleaner way. It makes enhancing this function further a bit easier as well. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230302235015.2044271-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit fffc893b6bf29162aca76842238868b131fcb477 Author: Andrii Nakryiko Date: Thu Mar 2 15:50:03 2023 -0800 selftests/bpf: adjust log_fixup's buffer size for proper truncation Adjust log_fixup's expected buffer length to fix the test. It's pretty finicky in its length expectation, but it doesn't break often. So just adjust the length to work on current kernel and with follow up iterator changes as well. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230302235015.2044271-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 98ddcf389d1bb7a407d49c23dfe6443680812f24 Author: Andrii Nakryiko Date: Thu Mar 2 15:50:02 2023 -0800 bpf: honor env->test_state_freq flag in is_state_visited() env->test_state_freq flag can be set by user by passing BPF_F_TEST_STATE_FREQ program flag. This is used in a bunch of selftests to have predictable state checkpoints at every jump and so on. Currently, bounded loop handling heuristic ignores this flag if number of processed jumps and/or number of processed instructions is below some thresholds, which throws off that reliable state checkpointing. Honor this flag in all circumstances by disabling heuristic if env->test_state_freq is set. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230302235015.2044271-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 6f876e75d316a75957f3d43c3a8c2a6fe9bc18b2 Author: Andrii Nakryiko Date: Thu Mar 2 15:50:01 2023 -0800 selftests/bpf: enhance align selftest's expected log matching Allow to search for expected register state in all the verifier log output that's related to specified instruction number. See added comment for an example of possible situation that is happening due to a simple enhancement done in the next patch, which fixes handling of env->test_state_freq flag in state checkpointing logic. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230302235015.2044271-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 567da5d253cd6b41c6d015adac1af653725bef9d Author: Andrii Nakryiko Date: Thu Mar 2 15:50:00 2023 -0800 bpf: improve regsafe() checks for PTR_TO_{MEM,BUF,TP_BUFFER} Teach regsafe() logic to handle PTR_TO_MEM, PTR_TO_BUF, and PTR_TO_TP_BUFFER similarly to PTR_TO_MAP_{KEY,VALUE}. That is, instead of exact match for var_off and range, use tnum_in() and range_within() checks, allowing more general verified state to subsume more specific current state. This allows to match wider range of valid and safe states, speeding up verification and detecting wider range of equivalent states for upcoming open-coded iteration looping logic. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230302235015.2044271-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit d54e0f6c1adffbf72f2cf4aebe6122899c3b851c Author: Andrii Nakryiko Date: Thu Mar 2 15:49:59 2023 -0800 bpf: improve stack slot state printing Improve stack slot state printing to provide more useful and relevant information, especially for dynptrs. While previously we'd see something like: 8: (85) call bpf_ringbuf_reserve_dynptr#198 ; R0_w=scalar() fp-8_w=dddddddd fp-16_w=dddddddd refs=2 Now we'll see way more useful: 8: (85) call bpf_ringbuf_reserve_dynptr#198 ; R0_w=scalar() fp-16_w=dynptr_ringbuf(ref_id=2) refs=2 I experimented with printing the range of slots taken by dynptr, something like: fp-16..8_w=dynptr_ringbuf(ref_id=2) But it felt very awkward and pretty useless. So we print the lowest address (most negative offset) only. The general structure of this code is now also set up for easier extension and will accommodate ITER slots naturally. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230302235015.2044271-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 2564a031ab7be975fb907197227cc5ae0aecff0f Merge: e768e3c5aab44 71cf4d027ad53 Author: Alexei Starovoitov Date: Fri Mar 3 21:41:46 2023 -0800 Merge branch 'bpf: allow ctx writes using BPF_ST_MEM instruction' Eduard Zingerman says: ==================== Changes v1 -> v2, suggested by Alexei: - Resolved conflict with recent commit: 6fcd486b3a0a ("bpf: Refactor RCU enforcement in the verifier"); - Variable `ctx_access` removed in function `convert_ctx_accesses()`; - Macro `BPF_COPY_STORE` renamed to `BPF_EMIT_STORE` and fixed to correctly extract original store instruction class from code. Original message follows: The function verifier.c:convert_ctx_access() applies some rewrites to BPF instructions that read from or write to the BPF program context. For example, the write instruction for the `struct bpf_sockopt::retval` field: *(u32 *)(r1 + offsetof(struct bpf_sockopt, retval)) = r2 Is transformed to: *(u64 *)(r1 + offsetof(struct bpf_sockopt_kern, tmp_reg)) = r9 r9 = *(u64 *)(r1 + offsetof(struct bpf_sockopt_kern, current_task)) r9 = *(u64 *)(r9 + offsetof(struct task_struct, bpf_ctx)) *(u32 *)(r9 + offsetof(struct bpf_cg_run_ctx, retval)) = r2 r9 = *(u64 *)(r1 + offsetof(struct bpf_sockopt_kern, tmp_reg)) Currently, the verifier only supports such transformations for LDX (memory-to-register read) and STX (register-to-memory write) instructions. Error is reported for ST instructions (immediate-to-memory write). This is fine because clang does not currently emit ST instructions. However, new `-mcpu=v4` clang flag is planned, which would allow to emit ST instructions (discussed in [1]). This patch-set adjusts the verifier to support ST instructions in `verifier.c:convert_ctx_access()`. The patches #1 and #2 were previously shared as part of RFC [2]. The changes compared to that RFC are: - In patch #1, a bug in the handling of the `struct __sk_buff::queue_mapping` field was fixed. - Patch #3 is added, which is a set of disassembler-based test cases for context access rewrites. The test cases cover all fields for which the handling code is modified in patch #1. [1] Propose some new instructions for -mcpu=v4 https://lore.kernel.org/bpf/4bfe98be-5333-1c7e-2f6d-42486c8ec039@meta.com/ [2] RFC Support for BPF_ST instruction in LLVM C compiler https://lore.kernel.org/bpf/20221231163122.1360813-1-eddyz87@gmail.com/ [3] v1 https://lore.kernel.org/bpf/20230302225507.3413720-1-eddyz87@gmail.com/ ==================== Signed-off-by: Alexei Starovoitov commit 71cf4d027ad53a1e2847191ac14e50132d35a6a7 Author: Eduard Zingerman Date: Sat Mar 4 03:12:47 2023 +0200 selftests/bpf: Disassembler tests for verifier.c:convert_ctx_access() Function verifier.c:convert_ctx_access() applies some rewrites to BPF instructions that read or write BPF program context. This commit adds machinery to allow test cases that inspect BPF program after these rewrites are applied. An example of a test case: { // Shorthand for field offset and size specification N(CGROUP_SOCKOPT, struct bpf_sockopt, retval), // Pattern generated for field read .read = "$dst = *(u64 *)($ctx + bpf_sockopt_kern::current_task);" "$dst = *(u64 *)($dst + task_struct::bpf_ctx);" "$dst = *(u32 *)($dst + bpf_cg_run_ctx::retval);", // Pattern generated for field write .write = "*(u64 *)($ctx + bpf_sockopt_kern::tmp_reg) = r9;" "r9 = *(u64 *)($ctx + bpf_sockopt_kern::current_task);" "r9 = *(u64 *)(r9 + task_struct::bpf_ctx);" "*(u32 *)(r9 + bpf_cg_run_ctx::retval) = $src;" "r9 = *(u64 *)($ctx + bpf_sockopt_kern::tmp_reg);" , }, For each test case, up to three programs are created: - One that uses BPF_LDX_MEM to read the context field. - One that uses BPF_STX_MEM to write to the context field. - One that uses BPF_ST_MEM to write to the context field. The disassembly of each program is compared with the pattern specified in the test case. Kernel code for disassembly is reused (as is in the bpftool). To keep Makefile changes to the minimum, symbolic links to `kernel/bpf/disasm.c` and `kernel/bpf/disasm.h ` are added. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230304011247.566040-4-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 806f81cd1ee30c66a3d2a4cd18b13c97429397a0 Author: Eduard Zingerman Date: Sat Mar 4 03:12:46 2023 +0200 selftests/bpf: test if pointer type is tracked for BPF_ST_MEM Check that verifier tracks pointer types for BPF_ST_MEM instructions and reports error if pointer types do not match for different execution branches. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230304011247.566040-3-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 0d80a619c113d0e216dbffa56b2d5ccc079ee520 Author: Eduard Zingerman Date: Sat Mar 4 03:12:45 2023 +0200 bpf: allow ctx writes using BPF_ST_MEM instruction Lift verifier restriction to use BPF_ST_MEM instructions to write to context data structures. This requires the following changes: - verifier.c:do_check() for BPF_ST updated to: - no longer forbid writes to registers of type PTR_TO_CTX; - track dst_reg type in the env->insn_aux_data[...].ptr_type field (same way it is done for BPF_STX and BPF_LDX instructions). - verifier.c:convert_ctx_access() and various callbacks invoked by it are updated to handled BPF_ST instruction alongside BPF_STX. Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20230304011247.566040-2-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 72122c69d71784e390527819754ea456421c4501 Author: Rob Clark Date: Thu Mar 2 15:35:06 2023 -0800 drm/virtio: Add option to disable KMS support Add a build option to disable modesetting support. This is useful in cases where the guest only needs to use the GPU in a headless mode, or (such as in the CrOS usage) window surfaces are proxied to a host compositor. As the modesetting ioctls are a big surface area for potential security bugs to be found (it's happened in the past, we should assume it will again in the future), it makes sense to have a build option to disable those ioctls in cases where they serve no legitimate purpose. v2: Use more if (IS_ENABLED(...)) v3: Also permit the host to advertise no scanouts v4: Spiff out commit msg v5: Make num_scanouts==0 and DRM_VIRTIO_GPU_KMS=n behave the same v6: Drop conditionally building virtgpu_display.c and early-out of it's init/fini fxns instead Signed-off-by: Rob Clark Reviewed-by: Dmitry Osipenko Reviewed-by: Javier Martinez Canillas Reviewed-by: Gerd Hoffmann Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20230302233506.3146290-1-robdclark@gmail.com commit 20918ccacd06eea4a4ff457bd86cae62859461a2 Author: Daniel Lezcano Date: Wed Mar 1 21:14:46 2023 +0100 thermal/drivers/acerhdf: Remove pointless governor test The thermal zone parameter specifies the bang-bang governor. The Kconfig selects the bang-bang governor. So it is pointless to test if the governor was set for the thermal zone assuming it may not have been compiled-in. Remove the test and prevent another access into the thermal internals. Signed-off-by: Daniel Lezcano Acked-by: Peter Kaestle Signed-off-by: Rafael J. Wysocki commit cad450d19d5ee0cd182778835aa82f7cf2678eae Author: Daniel Lezcano Date: Wed Mar 1 21:14:45 2023 +0100 thermal/drivers/acerhdf: Make interval setting only at module load time The thermal zone device structure is in the process of being private to the thermal framework core code. This driver is directly accessing and changing the monitoring polling rate. After discussing with the maintainers of this driver, having the polling interval at module loading time is enough for their purpose. Change the code to take into account the interval when the module is loaded but restrict the permissions so the value can not be changed afterwards. Signed-off-by: Daniel Lezcano Acked-by: Peter Kaestle Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 0cf321c85886a74981bff21323b4a097c395fabb Author: Daniel Lezcano Date: Wed Mar 1 21:14:44 2023 +0100 thermal/drivers/tegra: Remove unneeded lock when setting a trip point The function tegra_tsensor_enable_hw_channel() takes the thermal zone lock to prevent "a potential" race with a call to set_trips() callback. The driver must not play with the thermal framework core code internals. The tegra_tsensor_enable_hw_channel() is called by: - the suspend / resume callbacks - the probe function after the thermal zones are registered The thermal zone lock taken in this function is supposed to protect from a call to the set_trips() callback which writes in the same register. The potential race is when suspend / resume are called at the same time as set_trips. This one is called only in thermal_zone_device_update(). - At suspend time, the 'in_suspend' is set, thus the thermal_zone_device_update() bails out immediately and set_trips is not called during this moment. - At resume time, the thermal zone is updated at PM_POST_SUSPEND, thus the driver has already set the TH2 temperature. - At probe time, we register the thermal zone and then we set the TH2. The only scenario I can see so far is the interrupt fires, the thermal_zone_update() is called exactly at the moment tegra_tsensor_enable_hw_channel() a few lines after registering it. Enable the channels before setting up the interrupt. We close the potential race window without using the thermal zone's lock. Signed-off-by: Daniel Lezcano Suggested-by: Thierry Reding Acked-by: Thierry Reding Signed-off-by: Rafael J. Wysocki commit ec2c8aae8129753f53501171e73df0a1f910533c Author: Daniel Lezcano Date: Wed Mar 1 21:14:43 2023 +0100 thermal/hwmon: Use the thermal_core.h header The thermal_hwmon is playing with the thermal core code internals. Changing the code would be too invasive for now. We can consider the thermal_hwmon.c is part of the thermal core code as it provides a glue to tie the hwmon and the thermal zones. Let's include the thermal_core.h header. No functional change intended. Cc: Jean Delvare Cc: Guenter Roeck Signed-off-by: Daniel Lezcano Acked-by: Guenter Roeck Reviewed-by: Jean Delvare Signed-off-by: Rafael J. Wysocki commit 0adad0929621e1eb226b46eb3ac322a45da96c3c Author: Daniel Lezcano Date: Wed Mar 1 21:14:42 2023 +0100 thermal/drivers/da9062: Don't access the thermal zone device fields The driver is reading the passive polling rate in the thermal zone structure. We want to prevent the drivers to rummage around in the thermal zone structure. On the other side, the delay is what the driver passed to the thermal_zone_device_register() function, so it has already the information. Reuse the information we have instead of reading the information we set. Signed-off-by: Daniel Lezcano Reviewed-by: Adam Ward Signed-off-by: Rafael J. Wysocki commit dbb0ea153401d5191b523837f14bd7f060f9ed5f Author: Daniel Lezcano Date: Wed Mar 1 21:14:41 2023 +0100 thermal: Use thermal_zone_device_type() accessor Replace the accesses to 'tz->type' by its accessor version in order to self-encapsulate the thermal_zone_device structure. Signed-off-by: Daniel Lezcano Reviewed-by: Ido Schimmel #mlxsw Reviewed-by: AngeloGioacchino Del Regno #MediaTek LVTS Signed-off-by: Rafael J. Wysocki commit 3034f859b90d49ee661fad4d23593589d0d37779 Author: Daniel Lezcano Date: Wed Mar 1 21:14:40 2023 +0100 thermal: Add a thermal zone id accessor In order to get the thermal zone id but without directly accessing the thermal zone device structure, add an accessor. Use the accessor in the hwmon_scmi and acpi_thermal. No functional change intented. Signed-off-by: Daniel Lezcano Acked-by: Guenter Roeck Acked-by: Rafael J. Wysocki Signed-off-by: Rafael J. Wysocki commit 25e43976b215b7634224afe9bc21270f4222aa4f Author: Daniel Lezcano Date: Wed Mar 1 21:14:39 2023 +0100 thermal/drivers/spear: Don't use tz->device but pdev->dev Use the spear associated device instead of the thermal zone device which belongs to the thermal framework internals. Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 072e35c98806100182c0a7263cf4cba09ce43463 Author: Daniel Lezcano Date: Wed Mar 1 21:14:38 2023 +0100 thermal/core: Add thermal_zone_device structure 'type' accessor The thermal zone device structure is exposed via the exported thermal.h header. This structure should stay private the thermal core code. In order to encapsulate the structure, let's add an accessor to get the 'type' of the thermal zone. Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit dec07d399cc82e37681251775cdd924db455fdae Author: Daniel Lezcano Date: Wed Mar 1 21:14:37 2023 +0100 thermal: Don't use 'device' internal thermal zone structure field Some drivers are directly using the thermal zone's 'device' structure field. Use the driver device pointer instead of the thermal zone device when it is available. Remove the traces when they are duplicate with the traces in the core code. Cc: Jean Delvare Cc: Guenter Roeck Signed-off-by: Daniel Lezcano Reviewed-by: Balsam CHIHI #Mediatek LVTS Reviewed-by: AngeloGioacchino Del Regno #MediaTek LVTS Signed-off-by: Rafael J. Wysocki commit 4a16c190f761cb3a87dcbbf355f91c71ce1f8c0b Author: Daniel Lezcano Date: Wed Mar 1 21:14:36 2023 +0100 thermal/hwmon: Use the right device for devm_thermal_add_hwmon_sysfs() The devres variant of thermal_add_hwmon_sysfs() only takes the thermal zone structure pointer as parameter. Actually, it uses the tz->device to add it in the devres list. It is preferable to use the device registering the thermal zone instead of the thermal zone device itself. That prevents the driver accessing the thermal zone structure internals and it is from my POV more correct regarding how devm_ is used. Signed-off-by: Daniel Lezcano Acked-by: Martin Blumenstingl #amlogic_thermal Acked-by: Jernej Skrabec #sun8i_thermal Reviewed-by: AngeloGioacchino Del Regno #MediaTek auxadc Signed-off-by: Rafael J. Wysocki commit 8f3f4ad4ad45e2e30c814de42629ef4c9688e92c Author: Daniel Lezcano Date: Wed Mar 1 21:14:35 2023 +0100 thermal/hwmon: Do not set no_hwmon before calling thermal_add_hwmon_sysfs() The thermal->tzp->no_hwmon parameter is only used when calling thermal_zone_device_register(). Setting it to 'false' before calling thermal_add_hwmon_sysfs() has no effect. Remove the call and again prevent the drivers to access the thermal internals. Reviewed-by: Niklas Söderlund #R-Car Signed-off-by: Daniel Lezcano Acked-by: Florian Fainelli #Broadcom Acked-by: Heiko Stuebner #rockchip Signed-off-by: Rafael J. Wysocki commit abda7383ec3a2efc0417d3265b7a872e74fe47e7 Author: Daniel Lezcano Date: Wed Mar 1 21:14:34 2023 +0100 thermal: Remove debug or error messages in get_temp() ops Some get_temp() ops implementation are showing an error or a debug message if the reading of the sensor fails. The debug message is already displayed from the call site of this ops. So we can remove it. On the other side, the error should not be displayed because in production that can raise tons of messages. Finally, some drivers are showing a debug message with the temperature, this is also accessible through the trace from the core code in the temperature_update() function. Another benefit is the dev_* messages are accessing the thermal zone device field from the structure, so we encapsulate even more the code by preventing these accesses. Remove those messages. Signed-off-by: Daniel Lezcano Reviewed-by: Miquel Raynal #Armada Acked-by: Florian Fainelli #brcmstb_thermal.c Acked-by: Heiko Stuebner #rockchip Signed-off-by: Rafael J. Wysocki commit 4216e815321580b24dcb972a078ae3f0c808a464 Author: Daniel Lezcano Date: Wed Mar 1 21:14:33 2023 +0100 thermal/core: Show a debug message when get_temp() fails The different thermal drivers are showing an error in case the get_temp() fails. Actually no traces should be displayed in the backend ops but in the call site of this ops. Furthermore, the message is often a dev_dbg message where the tz->device is used, thus using the internal of the structure from the driver. Show a debug message if the thermal_zone_get_temp() fails to read the sensor temperature, so code showing the message is factored out and the tz->device accesss is in the scope of the thermal core framework. Signed-off-by: Daniel Lezcano Acked-by: Rafael J. Wysocki Signed-off-by: Rafael J. Wysocki commit 3d4e1bad7804bee102bb1e992f2831e4c6658f88 Author: Daniel Lezcano Date: Wed Mar 1 21:14:32 2023 +0100 thermal/core: Use the thermal zone 'devdata' accessor in remaining drivers The thermal zone device structure is exposed to the different drivers and obviously they access the internals while that should be restricted to the core thermal code. In order to self-encapsulate the thermal core code, we need to prevent the drivers accessing directly the thermal zone structure and provide accessor functions to deal with. Use the devdata accessor introduced in the previous patch. No functional changes intended. Signed-off-by: Daniel Lezcano Acked-by: Mark Brown Reviewed-by: Ido Schimmel #mlxsw Acked-by: Gregory Greenman #iwlwifi Acked-by: Sebastian Reichel #power_supply Acked-by: Damien Le Moal #ahci Acked-by: Rafael J. Wysocki Signed-off-by: Rafael J. Wysocki commit 0ce637a5469139f901c3047e507afcf17bd00f43 Author: Daniel Lezcano Date: Wed Mar 1 21:14:31 2023 +0100 thermal/core: Use the thermal zone 'devdata' accessor in hwmon located drivers The thermal zone device structure is exposed to the different drivers and obviously they access the internals while that should be restricted to the core thermal code. In order to self-encapsulate the thermal core code, we need to prevent the drivers accessing directly the thermal zone structure and provide accessor functions to deal with. Use the devdata accessor introduced in the previous patch. No functional changes intended. Signed-off-by: Daniel Lezcano Acked-by: Guenter Roeck #hwmon Acked-by: Mark Brown Acked-by: Rafael J. Wysocki Signed-off-by: Rafael J. Wysocki commit 5f68d0785e5258ab5e6df9e351929973a0742c1a Author: Daniel Lezcano Date: Wed Mar 1 21:14:30 2023 +0100 thermal/core: Use the thermal zone 'devdata' accessor in thermal located drivers The thermal zone device structure is exposed to the different drivers and obviously they access the internals while that should be restricted to the core thermal code. In order to self-encapsulate the thermal core code, we need to prevent the drivers accessing directly the thermal zone structure and provide accessor functions to deal with. Use the devdata accessor introduced in the previous patch. No functional changes intended. Signed-off-by: Daniel Lezcano Reviewed-by: Niklas Söderlund #R-Car Acked-by: Mark Brown Reviewed-by: AngeloGioacchino Del Regno #MediaTek auxadc and lvts Reviewed-by: Balsam CHIHI #Mediatek lvts Reviewed-by: Adam Ward #da9062 Reviewed-by: Baolin Wang #spread Acked-by: Jernej Skrabec #sun8i_thermal Acked-by: Rafael J. Wysocki Acked-by: Florian Fainelli #Broadcom Reviewed-by: Dhruva Gole # K3 bandgap Acked-by: Linus Walleij Acked-by: Heiko Stuebner #rockchip Reviewed-by: Kunihiko Hayashi #uniphier Signed-off-by: Rafael J. Wysocki commit a6ff3c0021468721b96e84892a8cae24bde8d65f Author: Daniel Lezcano Date: Wed Mar 1 21:14:29 2023 +0100 thermal/core: Add a thermal zone 'devdata' accessor The thermal zone device structure is exposed to the different drivers and obviously they access the internals while that should be restricted to the core thermal code. In order to self-encapsulate the thermal core code, we need to prevent the drivers accessing directly the thermal zone structure and provide accessor functions to deal with. Provide an accessor to the 'devdata' structure and make use of it in the different drivers. No functional changes intended. Signed-off-by: Daniel Lezcano Acked-by: Rafael J. Wysocki Acked-by: Mark Brown Signed-off-by: Rafael J. Wysocki commit e768e3c5aab44ee63f58649d4c8cbbb3270e5c06 Author: Kumar Kartikeya Dwivedi Date: Fri Mar 3 15:15:42 2023 +0100 bpf: Use separate RCU callbacks for freeing selem Martin suggested that instead of using a byte in the hole (which he has a use for in his future patch) in bpf_local_storage_elem, we can dispatch a different call_rcu callback based on whether we need to free special fields in bpf_local_storage_elem data. The free path, described in commit 9db44fdd8105 ("bpf: Support kptrs in local storage maps"), only waits for call_rcu callbacks when there are special (kptrs, etc.) fields in the map value, hence it is necessary that we only access smap in this case. Therefore, dispatch different RCU callbacks based on the BPF map has a valid btf_record, which dereference and use smap's btf_record only when it is valid. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230303141542.300068-1-memxor@gmail.com Signed-off-by: Martin KaFai Lau commit e3ecbd21776f1ff7610dc2c28b3b47ba8c23e10d Author: Maíra Canal Date: Thu Feb 23 09:19:09 2023 -0300 dma-buf: Include missing parentheses to documentation The missing parentheses prevents the function to be rendered as a link in the documentation. So, add the missing parentheses to the function on the documentation. Signed-off-by: Maíra Canal Reviewed-by: Christian König Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230223121909.149980-1-mcanal@igalia.com commit db55174d05ee6bed9d0583ba08e99c891ef0ed05 Merge: 944459e88b4f5 6fcd486b3a0a6 Author: Daniel Borkmann Date: Fri Mar 3 17:42:20 2023 +0100 Merge branch 'bpf-kptr-rcu' Alexei Starovoitov says: ==================== v4->v5: fix typos, add acks. v3->v4: - patch 3 got much cleaner after BPF_KPTR_RCU was removed as suggested by David. - make KF_RCU stronger and require that bpf program checks for NULL before passing such pointers into kfunc. The prog has to do that anyway to access fields and it aligns with BTF_TYPE_SAFE_RCU allowlist. - New patch 6: refactor RCU enforcement in the verifier. The patches 2,3,6 are part of one feature. The 2 and 3 alone are incomplete, since RCU pointers are barely useful without bpf_rcu_read_lock/unlock in GCC compiled kernel. Even if GCC lands support for btf_type_tag today it will take time to mandate that version for kernel builds. Hence go with allow list approach. See patch 6 for details. This allows to start strict enforcement of TRUSTED | UNTRUSTED in one part of PTR_TO_BTF_ID accesses. One step closer to KF_TRUSTED_ARGS by default. v2->v3: - Instead of requiring bpf progs to tag fields with __kptr_rcu teach the verifier to infer RCU properties based on the type. BPF_KPTR_RCU becomes kernel internal type of struct btf_field. - Add patch 2 to tag cgroups and dfl_cgrp as trusted. That bug was spotted by BPF CI on clang compiler kernels, since patch 3 is doing: static bool in_rcu_cs(struct bpf_verifier_env *env) { return env->cur_state->active_rcu_lock || !env->prog->aux->sleepable; } which makes all non-sleepable programs behave like they have implicit rcu_read_lock around them. Which is the case in practice. It was fine on gcc compiled kernels where task->cgroup deference was producing PTR_TO_BTF_ID, but on clang compiled kernels task->cgroup deference was producing PTR_TO_BTF_ID | MEM_RCU | MAYBE_NULL, which is more correct, but selftests were failing. Patch 2 fixes this discrepancy. With few more patches like patch 2 we can make KF_TRUSTED_ARGS default for kfuncs and helpers. - Add comment in selftest patch 5 that it's verifier only check. v1->v2: Instead of agressively allow dereferenced kptr_rcu pointers into KF_TRUSTED_ARGS kfuncs only allow them into KF_RCU funcs. The KF_RCU flag is a weaker version of KF_TRUSTED_ARGS. The kfuncs marked with KF_RCU expect either PTR_TRUSTED or MEM_RCU arguments. The verifier guarantees that the objects are valid and there is no use-after-free, but the pointers maybe NULL and pointee object's reference count could have reached zero, hence kfuncs must do != NULL check and consider refcnt==0 case when accessing such arguments. No changes in patch 1. Patches 2,3,4 adjusted with above behavior. v1: The __kptr_ref turned out to be too limited, since any "trusted" pointer access requires bpf_kptr_xchg() which is impractical when the same pointer needs to be dereferenced by multiple cpus. The __kptr "untrusted" only access isn't very useful in practice. Rename __kptr to __kptr_untrusted with eventual goal to deprecate it, and rename __kptr_ref to __kptr, since that looks to be more common use of kptrs. Introduce __kptr_rcu that can be directly dereferenced and used similar to native kernel C code. Once bpf_cpumask and task_struct kfuncs are converted to observe RCU GP when refcnt goes to zero, both __kptr and __kptr_untrusted can be deprecated and __kptr_rcu can become the only __kptr tag. ==================== Signed-off-by: Daniel Borkmann commit 6fcd486b3a0a628c41f12b3a7329a18a2c74b351 Author: Alexei Starovoitov Date: Thu Mar 2 20:14:46 2023 -0800 bpf: Refactor RCU enforcement in the verifier. bpf_rcu_read_lock/unlock() are only available in clang compiled kernels. Lack of such key mechanism makes it impossible for sleepable bpf programs to use RCU pointers. Allow bpf_rcu_read_lock/unlock() in GCC compiled kernels (though GCC doesn't support btf_type_tag yet) and allowlist certain field dereferences in important data structures like tast_struct, cgroup, socket that are used by sleepable programs either as RCU pointer or full trusted pointer (which is valid outside of RCU CS). Use BTF_TYPE_SAFE_RCU and BTF_TYPE_SAFE_TRUSTED macros for such tagging. They will be removed once GCC supports btf_type_tag. With that refactor check_ptr_to_btf_access(). Make it strict in enforcing PTR_TRUSTED and PTR_UNTRUSTED while deprecating old PTR_TO_BTF_ID without modifier flags. There is a chance that this strict enforcement might break existing programs (especially on GCC compiled kernels), but this cleanup has to start sooner than later. Note PTR_TO_CTX access still yields old deprecated PTR_TO_BTF_ID. Once it's converted to strict PTR_TRUSTED or PTR_UNTRUSTED the kfuncs and helpers will be able to default to KF_TRUSTED_ARGS. KF_RCU will remain as a weaker version of KF_TRUSTED_ARGS where obj refcnt could be 0. Adjust rcu_read_lock selftest to run on gcc and clang compiled kernels. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230303041446.3630-7-alexei.starovoitov@gmail.com commit 0047d8343f6042c4feea24072ef254d47b8a33b3 Author: Alexei Starovoitov Date: Thu Mar 2 20:14:45 2023 -0800 selftests/bpf: Tweak cgroup kfunc test. Adjust cgroup kfunc test to dereference RCU protected cgroup pointer as PTR_TRUSTED and pass into KF_TRUSTED_ARGS kfunc. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230303041446.3630-6-alexei.starovoitov@gmail.com commit 838bd4ac9aa35bdf43bf0199fa8eef9d3a004611 Author: Alexei Starovoitov Date: Thu Mar 2 20:14:44 2023 -0800 selftests/bpf: Add a test case for kptr_rcu. Tweak existing map_kptr test to check kptr_rcu. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230303041446.3630-5-alexei.starovoitov@gmail.com commit 20c09d92faeefb8536f705d3a4629e0dc314c8a1 Author: Alexei Starovoitov Date: Thu Mar 2 20:14:43 2023 -0800 bpf: Introduce kptr_rcu. The life time of certain kernel structures like 'struct cgroup' is protected by RCU. Hence it's safe to dereference them directly from __kptr tagged pointers in bpf maps. The resulting pointer is MEM_RCU and can be passed to kfuncs that expect KF_RCU. Derefrence of other kptr-s returns PTR_UNTRUSTED. For example: struct map_value { struct cgroup __kptr *cgrp; }; SEC("tp_btf/cgroup_mkdir") int BPF_PROG(test_cgrp_get_ancestors, struct cgroup *cgrp_arg, const char *path) { struct cgroup *cg, *cg2; cg = bpf_cgroup_acquire(cgrp_arg); // cg is PTR_TRUSTED and ref_obj_id > 0 bpf_kptr_xchg(&v->cgrp, cg); cg2 = v->cgrp; // This is new feature introduced by this patch. // cg2 is PTR_MAYBE_NULL | MEM_RCU. // When cg2 != NULL, it's a valid cgroup, but its percpu_ref could be zero if (cg2) bpf_cgroup_ancestor(cg2, level); // safe to do. } Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Tejun Heo Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230303041446.3630-4-alexei.starovoitov@gmail.com commit 8d093b4e95a2a16a2cfcd36869b348a17112fabe Author: Alexei Starovoitov Date: Thu Mar 2 20:14:42 2023 -0800 bpf: Mark cgroups and dfl_cgrp fields as trusted. bpf programs sometimes do: bpf_cgrp_storage_get(&map, task->cgroups->dfl_cgrp, ...); It is safe to do, because cgroups->dfl_cgrp pointer is set diring init and never changes. The task->cgroups is also never NULL. It is also set during init and will change when task switches cgroups. For any trusted task pointer dereference of cgroups and dfl_cgrp should yield trusted pointers. The verifier wasn't aware of this. Hence in gcc compiled kernels task->cgroups dereference was producing PTR_TO_BTF_ID without modifiers while in clang compiled kernels the verifier recognizes __rcu tag in cgroups field and produces PTR_TO_BTF_ID | MEM_RCU | MAYBE_NULL. Tag cgroups and dfl_cgrp as trusted to equalize clang and gcc behavior. When GCC supports btf_type_tag such tagging will done directly in the type. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: David Vernet Acked-by: Tejun Heo Link: https://lore.kernel.org/bpf/20230303041446.3630-3-alexei.starovoitov@gmail.com commit 03b77e17aeb22a5935ea20d585ca6a1f2947e62b Author: Alexei Starovoitov Date: Thu Mar 2 20:14:41 2023 -0800 bpf: Rename __kptr_ref -> __kptr and __kptr -> __kptr_untrusted. __kptr meant to store PTR_UNTRUSTED kernel pointers inside bpf maps. The concept felt useful, but didn't get much traction, since bpf_rdonly_cast() was added soon after and bpf programs received a simpler way to access PTR_UNTRUSTED kernel pointers without going through restrictive __kptr usage. Rename __kptr_ref -> __kptr and __kptr -> __kptr_untrusted to indicate its intended usage. The main goal of __kptr_untrusted was to read/write such pointers directly while bpf_kptr_xchg was a mechanism to access refcnted kernel pointers. The next patch will allow RCU protected __kptr access with direct read. At that point __kptr_untrusted will be deprecated. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20230303041446.3630-2-alexei.starovoitov@gmail.com commit 4d14d7717f19fb1125496b1fd836ca89f11d540f Author: Anshuman Gupta Date: Thu Feb 23 15:35:03 2023 +0530 drm/i915/selftest: Fix ktime_get() and h/w access order Use ktime_get() after accessing the mmio or any driver resource, while using wall time for various calculation that depends on the inserted delay in order to account any mmio and resource access latency. Cc: Chris Wilson Signed-off-by: Anshuman Gupta Reviewed-by: Badal Nilawar Link: https://patchwork.freedesktop.org/patch/msgid/20230223100503.3323627-3-anshuman.gupta@intel.com commit 29b41cf707b5ecc55cab12bfa04fbd9811f4fd04 Author: Anshuman Gupta Date: Thu Feb 23 15:35:02 2023 +0530 drm/i915/selftest: Fix engine timestamp and ktime disparity While reading the engine timestamps there can be uncontrollable concurrent mmio access via other i915 child drivers and by GuC, which is not truly atomic context as expected by this selftest, which may cause mmio latency to read the engine timestamps, Account such latency to calculate time to read engine timestamp such that selftest can validate the timestamp and ktime pair. Cc: Chris Wilson Signed-off-by: Anshuman Gupta Reviewed-by: Badal Nilawar Link: https://patchwork.freedesktop.org/patch/msgid/20230223100503.3323627-2-anshuman.gupta@intel.com commit 506006055769b10d1b2b4e22f636f3b45e0e9fc7 Author: Janusz Krzysztofik Date: Thu Mar 2 13:08:20 2023 +0100 drm/i915/active: Fix misuse of non-idle barriers as fence trackers Users reported oopses on list corruptions when using i915 perf with a number of concurrently running graphics applications. Root cause analysis pointed at an issue in barrier processing code -- a race among perf open / close replacing active barriers with perf requests on kernel context and concurrent barrier preallocate / acquire operations performed during user context first pin / last unpin. When adding a request to a composite tracker, we try to reuse an existing fence tracker, already allocated and registered with that composite. The tracker we obtain may already track another fence, may be an idle barrier, or an active barrier. If the tracker we get occurs a non-idle barrier then we try to delete that barrier from a list of barrier tasks it belongs to. However, while doing that we don't respect return value from a function that performs the barrier deletion. Should the deletion ever fail, we would end up reusing the tracker still registered as a barrier task. Since the same structure field is reused with both fence callback lists and barrier tasks list, list corruptions would likely occur. Barriers are now deleted from a barrier tasks list by temporarily removing the list content, traversing that content with skip over the node to be deleted, then populating the list back with the modified content. Should that intentionally racy concurrent deletion attempts be not serialized, one or more of those may fail because of the list being temporary empty. Related code that ignores the results of barrier deletion was initially introduced in v5.4 by commit d8af05ff38ae ("drm/i915: Allow sharing the idle-barrier from other kernel requests"). However, all users of the barrier deletion routine were apparently serialized at that time, then the issue didn't exhibit itself. Results of git bisect with help of a newly developed igt@gem_barrier_race@remote-request IGT test indicate that list corruptions might start to appear after commit 311770173fac ("drm/i915/gt: Schedule request retirement when timeline idles"), introduced in v5.5. Respect results of barrier deletion attempts -- mark the barrier as idle only if successfully deleted from the list. Then, before proceeding with setting our fence as the one currently tracked, make sure that the tracker we've got is not a non-idle barrier. If that check fails then don't use that tracker but go back and try to acquire a new, usable one. v3: use unlikely() to document what outcome we expect (Andi), - fix bad grammar in commit description. v2: no code changes, - blame commit 311770173fac ("drm/i915/gt: Schedule request retirement when timeline idles"), v5.5, not commit d8af05ff38ae ("drm/i915: Allow sharing the idle-barrier from other kernel requests"), v5.4, - reword commit description. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6333 Fixes: 311770173fac ("drm/i915/gt: Schedule request retirement when timeline idles") Cc: Chris Wilson Cc: stable@vger.kernel.org # v5.5 Cc: Andi Shyti Signed-off-by: Janusz Krzysztofik Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230302120820.48740-1-janusz.krzysztofik@linux.intel.com commit 775d1bee8fab737c9e70050f61ad5370d8733383 Author: suijingfeng <15330273260@189.cn> Date: Fri Mar 3 18:12:16 2023 +0800 ttm/ttm_device.h: fix a trival typo should replace '@' with '*' Signed-off-by: suijingfeng Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230303101216.788971-1-15330273260@189.cn commit 944459e88b4f5c71683b56710f96e39756afae31 Author: Tero Kristo Date: Thu Mar 2 13:46:14 2023 +0200 selftests/bpf: Add absolute timer test Add test for the absolute BPF timer under the existing timer tests. This will run the timer two times with 1us expiration time, and then re-arm the timer at ~35s in the future. At the end, it is verified that the absolute timer expired exactly two times. Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20230302114614.2985072-3-tero.kristo@linux.intel.com Signed-off-by: Alexei Starovoitov commit f71f8530494bb5ab43d3369ef0ce8373eb1ee077 Author: Tero Kristo Date: Thu Mar 2 13:46:13 2023 +0200 bpf: Add support for absolute value BPF timers Add a new flag BPF_F_TIMER_ABS that can be passed to bpf_timer_start() to start an absolute value timer instead of the default relative value. This makes the timer expire at an exact point in time, instead of a time with latencies induced by both the BPF and timer subsystems. Suggested-by: Artem Bityutskiy Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20230302114614.2985072-2-tero.kristo@linux.intel.com Signed-off-by: Alexei Starovoitov commit ec97a76f113ee0d8fd17178b4e4ffbf0ab9e5452 Author: Dave Marchevsky Date: Thu Mar 2 16:55:00 2023 -0800 selftests/bpf: Add -Wuninitialized flag to bpf prog flags Per C99 standard [0], Section 6.7.8, Paragraph 10: If an object that has automatic storage duration is not initialized explicitly, its value is indeterminate. And in the same document, in appendix "J.2 Undefined behavior": The behavior is undefined in the following circumstances: [...] The value of an object with automatic storage duration is used while it is indeterminate (6.2.4, 6.7.8, 6.8). This means that use of an uninitialized stack variable is undefined behavior, and therefore that clang can choose to do a variety of scary things, such as not generating bytecode for "bunch of useful code" in the below example: void some_func() { int i; if (!i) return; // bunch of useful code } To add insult to injury, if some_func above is a helper function for some BPF program, clang can choose to not generate an "exit" insn, causing verifier to fail with "last insn is not an exit or jmp". Going from that verification failure to the root cause of uninitialized use is certain to be frustrating. This patch adds -Wuninitialized to the cflags for selftest BPF progs and fixes up existing instances of uninitialized use. [0]: https://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf Signed-off-by: Dave Marchevsky Cc: David Vernet Cc: Tejun Heo Acked-by: David Vernet Link: https://lore.kernel.org/r/20230303005500.1614874-1-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit c501bf55c88b834adefda870c7c092ec9052a437 Author: Tejun Heo Date: Thu Mar 2 09:42:59 2023 -1000 bpf: Make bpf_get_current_[ancestor_]cgroup_id() available for all program types These helpers are safe to call from any context and there's no reason to restrict access to them. Remove them from bpf_trace and filter lists and add to bpf_base_func_proto() under perfmon_capable(). v2: After consulting with Andrii, relocated in bpf_base_func_proto() so that they require bpf_capable() but not perfomon_capable() as it doesn't read from or affect others on the system. Signed-off-by: Tejun Heo Cc: Andrii Nakryiko Link: https://lore.kernel.org/r/ZAD8QyoszMZiTzBY@slm.duckdns.org Signed-off-by: Alexei Starovoitov commit cacad346f67ce9604dcc9db10f1f1769dabb3891 Author: David Vernet Date: Thu Mar 2 12:39:18 2023 -0600 bpf, docs: Fix final bpf docs build failure maps.rst in the BPF documentation links to the /userspace-api/ebpf/syscall document (Documentation/userspace-api/ebpf/syscall.rst). For some reason, if you try to reference the document with :doc:, the docs build emits the following warning: ./Documentation/bpf/maps.rst:13: WARNING: \ unknown document: '/userspace-api/ebpf/syscall' It appears that other places in the docs tree also don't support using :doc:. Elsewhere in the BPF documentation, we just reference the kernel docs page directly. Let's do that here to clean up the last remaining noise in the docs build. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230302183918.54190-2-void@manifault.com Signed-off-by: Alexei Starovoitov commit d56b0c461d19dae917fa0bba76cbe8ad7a44712e Author: David Vernet Date: Thu Mar 2 12:39:17 2023 -0600 bpf, docs: Fix link to netdev-FAQ target The BPF devel Q&A documentation page makes frequent reference to the netdev-QA page via the netdev-FAQ rst link. This link is currently broken, as is evidenced by the build output when making BPF docs: ./Documentation/bpf/bpf_devel_QA.rst:150: WARNING: undefined label: 'netdev-faq' ./Documentation/bpf/bpf_devel_QA.rst:206: WARNING: undefined label: 'netdev-faq' ./Documentation/bpf/bpf_devel_QA.rst:231: WARNING: undefined label: 'netdev-faq' ./Documentation/bpf/bpf_devel_QA.rst:396: WARNING: undefined label: 'netdev-faq' ./Documentation/bpf/bpf_devel_QA.rst:412: WARNING: undefined label: 'netdev-faq' Fix the links to point to the actual netdev-faq page. Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230302183918.54190-1-void@manifault.com Signed-off-by: Alexei Starovoitov commit 0591bdad58c4b83a286872305e748bfd77d16d28 Author: Alan Previn Date: Thu Feb 23 16:17:58 2023 -0800 drm/i915/gsc: Fix the Driver-FLR completion The Driver-FLR flow may inadvertently exit early before the full completion of the re-init of the internal HW state if we only poll GU_DEBUG Bit31 (polling for it to toggle from 0 -> 1). Instead we need a two-step completion wait-for-completion flow that also involves GU_CNTL. See the patch and new code comments for detail. This is new direction from HW architecture folks. v2: - Add error message for the teardown timeout (Anshuman) - Don't duplicate code in comments (Jani) v3: - Add get/put runtime-pm for this function. Though not functionally required during unload, its so the uncore doesn't complain. v4: - Remove the get/put runtime-pm - that was for a prior version of this patch (not needed for drm-managed callback). - Remove the fixes tag since this is only for MTL and MTL still needs force probe (Daniele). - Bit 31 of GU_CNTL should be DRIVERFLR instead of DRIVERFLR_STATUS (Daniele). Signed-off-by: Alan Previn Tested-by: Vinay Belgaumkar Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20230224001758.544817-1-alan.previn.teres.alexis@intel.com commit d352cb47df7540a52bf2d0c33d90694c5cdb6cb8 Author: Luis Chamberlain Date: Thu Mar 2 12:46:07 2023 -0800 ipmi: simplify sysctl registration register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl() can do the directory creation for you so just use that. Signed-off-by: Luis Chamberlain Message-Id: <20230302204612.782387-3-mcgrof@kernel.org> Signed-off-by: Corey Minyard commit 2a587b9ad052e7e92e508aea90c1e2ae433c1908 Author: Randy Dunlap Date: Sat Feb 25 21:39:46 2023 -0800 ipmi: ASPEED_BT_IPMI_BMC: select REGMAP_MMIO instead of depending on it REGMAP is a hidden (not user visible) symbol. Users cannot set it directly thru "make *config", so drivers should select it instead of depending on it if they need it. Consistently using "select" or "depends on" can also help reduce Kconfig circular dependency issues. Therefore, change the use of "depends on REGMAP_MMIO" to "select REGMAP_MMIO", which will also set REGMAP. Fixes: eb994594bc22 ("ipmi: bt-bmc: Use a regmap for register access") Signed-off-by: Randy Dunlap Cc: Andrew Jeffery Cc: Corey Minyard Cc: openipmi-developer@lists.sourceforge.net Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Message-Id: <20230226053953.4681-2-rdunlap@infradead.org> Signed-off-by: Corey Minyard commit 55cac10739d57b94de4626bcb009bcdafaa781af Author: Douglas Anderson Date: Tue Jan 31 14:18:24 2023 -0800 drm/bridge: tc358762: Set pre_enable_prev_first Set the "pre_enable_prev_first" as provided by commit 4fb912e5e190 ("drm/bridge: Introduce pre_enable_prev_first to alter bridge init order"). This should allow us to revert commit ec7981e6c614 ("drm/msm/dsi: don't powerup at modeset time for parade-ps8640") and commit 7d8e9a90509f ("drm/msm/dsi: move DSI host powerup to modeset time"). Cc: Dave Stevenson Cc: Dmitry Baryshkov Cc: Abhinav Kumar Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20230131141756.RFT.v2.1.I723a3761d57ea60c5dd754c144aed6c3b2ea6f5a@changeid commit 4ddeb90d602ac58bcf99924eb34d8b2f820ce11d Author: Neil Armstrong Date: Wed Mar 1 10:47:35 2023 +0100 MAINTAINERS: Add myself as maintainer for DRM Panels drivers Add myself as co-maintainer for DRM Panel Drivers in order to help reviewing and getting new panels drivers merged, and Remove Thierry as he suggested since he wasn't active for a while. Thanks Thierry for all your work! Acked-by: Jagan Teki Acked-by: Sam Ravnborg Acked-by: Thierry Reding Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20230216-topic-drm-panel-upstream-maintainance-v2-1-ffd262b72f16@linaro.org commit c45eac537bd8b4977d335c123212140bc5257670 Author: Joanne Koong Date: Wed Mar 1 21:30:14 2023 -0800 bpf: Fix bpf_dynptr_slice{_rdwr} to return NULL instead of 0 Change bpf_dynptr_slice and bpf_dynptr_slice_rdwr to return NULL instead of 0, in accordance with the codebase guidelines. Fixes: 66e3a13e7c2c ("bpf: Add bpf_dynptr_slice and bpf_dynptr_slice_rdwr") Reported-by: kernel test robot Signed-off-by: Joanne Koong Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230302053014.1726219-1-joannelkoong@gmail.com commit b1d462bc30e70d89e7b729391d7585443f2910c8 Merge: db52b587c67f4 c44fd84507637 Author: Andrii Nakryiko Date: Wed Mar 1 16:05:35 2023 -0800 Merge branch 'Make uprobe attachment APK aware' Daniel Müller says: ==================== On Android, APKs (android packages; zip packages with somewhat prescriptive contents) are first class citizens in the system: the shared objects contained in them don't exist in unpacked form on the file system. Rather, they are mmaped directly from within the archive and the archive is also what the kernel is aware of. For users that complicates the process of attaching a uprobe to a function contained in a shared object in one such APK: they'd have to find the byte offset of said function from the beginning of the archive. That is cumbersome to do manually and can be fragile, because various changes could invalidate said offset. That is why for uprobes inside ELF files (not inside an APK), commit d112c9ce249b ("libbpf: Support function name-based attach uprobes") added support for attaching to symbols by name. On Android, that mechanism currently does not work, because this logic is not APK aware. This patch set introduces first class support for attaching uprobes to functions inside ELF objects contained in APKs via function names. We add support for recognizing the following syntax for a binary path: !/ (e.g., /system/app/test-app.apk!/lib/arm64-v8a/libc++.so) This syntax is common in the Android eco system and used by tools such as simpleperf. It is also what is being proposed for bcc [0]. If the user provides such a binary path, we find (lib/arm64-v8a/libc++.so in the example) inside of (/system/app/test-app.apk). We perform the regular ELF offset search inside the binary and add that to the offset within the archive itself, to retrieve the offset at which to attach the uprobe. [0] https://github.com/iovisor/bcc/pull/4440 Changelog --------- v3->v4: - use ERR_PTR instead of libbpf_err_ptr() in zip_archive_open() - eliminated err variable from elf_find_func_offset_from_archive() v2->v3: - adjusted zip_archive_open() to report errno - fixed provided libbpf_strlcpy() buffer size argument - adjusted find_cd() to handle errors better - use fewer local variables in get_entry_at_offset() v1->v2: - removed unaligned_* types - switched to using __u32 and __u16 - switched to using errno constants instead of hard-coded negative values - added another pr_debug() message - shortened central_directory_* to cd_* - inlined cd_file_header_at_offset() function - bunch of syntactical changes ==================== Signed-off-by: Andrii Nakryiko commit c44fd84507637f07ca9a7e16f83706e109f6b8ff Author: Daniel Müller Date: Wed Mar 1 21:23:08 2023 +0000 libbpf: Add support for attaching uprobes to shared objects in APKs This change adds support for attaching uprobes to shared objects located in APKs, which is relevant for Android systems where various libraries may reside in APKs. To make that happen, we extend the syntax for the "binary path" argument to attach to with that supported by various Android tools: !/ For example: /system/app/test-app/test-app.apk!/lib/arm64-v8a/libc++_shared.so APKs need to be specified via full path, i.e., we do not attempt to resolve mere file names by searching system directories. We cannot currently test this functionality end-to-end in an automated fashion, because it relies on an Android system being present, but there is no support for that in CI. I have tested the functionality manually, by creating a libbpf program containing a uretprobe, attaching it to a function inside a shared object inside an APK, and verifying the sanity of the returned values. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230301212308.1839139-4-deso@posteo.net commit 434fdcead73515a76885418ffe2d96b4f3ed0f49 Author: Daniel Müller Date: Wed Mar 1 21:23:07 2023 +0000 libbpf: Introduce elf_find_func_offset_from_file() function This change splits the elf_find_func_offset() function in two: elf_find_func_offset(), which now accepts an already opened Elf object instead of a path to a file that is to be opened, as well as elf_find_func_offset_from_file(), which opens a binary based on a path and then invokes elf_find_func_offset() on the Elf object. Having this split in responsibilities will allow us to call elf_find_func_offset() from other code paths on Elf objects that did not necessarily come from a file on disk. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230301212308.1839139-3-deso@posteo.net commit 1eebcb60633fd469ee27b0fbd7ee4f271feedeca Author: Daniel Müller Date: Wed Mar 1 21:23:06 2023 +0000 libbpf: Implement basic zip archive parsing support This change implements support for reading zip archives, including opening an archive, finding an entry based on its path and name in it, and closing it. The code was copied from https://github.com/iovisor/bcc/pull/4440, which implements similar functionality for bcc. The author confirmed that he is fine with this usage and the corresponding relicensing. I adjusted it to adhere to libbpf coding standards. Signed-off-by: Daniel Müller Signed-off-by: Andrii Nakryiko Acked-by: Michał Gregorczyk Link: https://lore.kernel.org/bpf/20230301212308.1839139-2-deso@posteo.net commit db52b587c67f40e4bd6e8167f2334d4500617bdc Author: David Vernet Date: Wed Mar 1 13:49:10 2023 -0600 bpf, docs: Fix __uninit kfunc doc section In commit d96d937d7c5c ("bpf: Add __uninit kfunc annotation"), the __uninit kfunc annotation was documented in kfuncs.rst. You have to fully underline a section in rst, or the build will issue a warning that the title underline is too short: ./Documentation/bpf/kfuncs.rst:104: WARNING: Title underline too short. 2.2.2 __uninit Annotation -------------------- This patch fixes that title underline. Fixes: d96d937d7c5c ("bpf: Add __uninit kfunc annotation") Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230301194910.602738-2-void@manifault.com Signed-off-by: Alexei Starovoitov commit 7ce60b110eece1d7b3d5c322fd11f6d41a29d17b Author: David Vernet Date: Wed Mar 1 13:49:09 2023 -0600 bpf: Fix doxygen comments for dynptr slice kfuncs In commit 66e3a13e7c2c ("bpf: Add bpf_dynptr_slice and bpf_dynptr_slice_rdwr"), the bpf_dynptr_slice() and bpf_dynptr_slice_rdwr() kfuncs were added to BPF. These kfuncs included doxygen headers, but unfortunately those headers are not properly formatted according to [0], and causes the following warnings during the docs build: ./kernel/bpf/helpers.c:2225: warning: \ Excess function parameter 'returns' description in 'bpf_dynptr_slice' ./kernel/bpf/helpers.c:2303: warning: \ Excess function parameter 'returns' description in 'bpf_dynptr_slice_rdwr' ... This patch fixes those doxygen comments. [0]: https://docs.kernel.org/doc-guide/kernel-doc.html#function-documentation Fixes: 66e3a13e7c2c ("bpf: Add bpf_dynptr_slice and bpf_dynptr_slice_rdwr") Signed-off-by: David Vernet Link: https://lore.kernel.org/r/20230301194910.602738-1-void@manifault.com Signed-off-by: Alexei Starovoitov commit 3cba09a6ac86ea1d456909626eb2685596c07822 Author: Andrea Righi Date: Mon Feb 20 18:18:58 2023 +0100 drm/i915/sseu: fix max_subslices array-index-out-of-bounds access It seems that commit bc3c5e0809ae ("drm/i915/sseu: Don't try to store EU mask internally in UAPI format") exposed a potential out-of-bounds access, reported by UBSAN as following on a laptop with a gen 11 i915 card: UBSAN: array-index-out-of-bounds in drivers/gpu/drm/i915/gt/intel_sseu.c:65:27 index 6 is out of range for type 'u16 [6]' CPU: 2 PID: 165 Comm: systemd-udevd Not tainted 6.2.0-9-generic #9-Ubuntu Hardware name: Dell Inc. XPS 13 9300/077Y9N, BIOS 1.11.0 03/22/2022 Call Trace: show_stack+0x4e/0x61 dump_stack_lvl+0x4a/0x6f dump_stack+0x10/0x18 ubsan_epilogue+0x9/0x3a __ubsan_handle_out_of_bounds.cold+0x42/0x47 gen11_compute_sseu_info+0x121/0x130 [i915] intel_sseu_info_init+0x15d/0x2b0 [i915] intel_gt_init_mmio+0x23/0x40 [i915] i915_driver_mmio_probe+0x129/0x400 [i915] ? intel_gt_probe_all+0x91/0x2e0 [i915] i915_driver_probe+0xe1/0x3f0 [i915] ? drm_privacy_screen_get+0x16d/0x190 [drm] ? acpi_dev_found+0x64/0x80 i915_pci_probe+0xac/0x1b0 [i915] ... According to the definition of sseu_dev_info, eu_mask->hsw is limited to a maximum of GEN_MAX_SS_PER_HSW_SLICE (6) sub-slices, but gen11_sseu_info_init() can potentially set 8 sub-slices, in the !IS_JSL_EHL(gt->i915) case. Fix this by reserving up to 8 slots for max_subslices in the eu_mask struct. Reported-by: Emil Renner Berthing Signed-off-by: Andrea Righi Fixes: bc3c5e0809ae ("drm/i915/sseu: Don't try to store EU mask internally in UAPI format") Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230220171858.131416-1-andrea.righi@canonical.com commit d69b5a90e17dca24aad3311c6a020cc692d8711c Merge: 07e2193f106d6 35cbf7f915689 Author: Andrii Nakryiko Date: Wed Mar 1 11:13:42 2023 -0800 Merge branch 'selftests/bpf: support custom per-test flags and multiple expected messages' Eduard Zingerman says: ==================== This patch allows to specify program flags and multiple verifier log messages for the test_loader kind of tests. For example: tools/testing/selftets/bpf/progs/foobar.c: SEC("tc") __success __log_level(7) __msg("first message") __msg("next message") __flag(BPF_F_ANY_ALIGNMENT) int buz(struct __sk_buff *skb) { ... } It was developed by Andrii Nakryiko ([1]), I reused it in a "test_verifier tests migration to inline assembly" patch series ([2]), but the series is currently stuck on my side. Andrii asked to spin this particular patch separately ([3]). [1] https://lore.kernel.org/bpf/CAEf4BzZH0ZxorCi7nPDbRqSK9f+410RooNwNJGwfw8=0a5i1nw@mail.gmail.com/ [2] https://lore.kernel.org/bpf/20230123145148.2791939-1-eddyz87@gmail.com/ [3] https://lore.kernel.org/bpf/20230123145148.2791939-1-eddyz87@gmail.com/T/#m52e806c5a679a2aa8f484d011be7ec105939127a ==================== Signed-off-by: Andrii Nakryiko commit 35cbf7f9156893f55b885f6fc678b2ab8b0d8918 Author: Andrii Nakryiko Date: Wed Mar 1 19:54:17 2023 +0200 selftests/bpf: Support custom per-test flags and multiple expected messages Extend __flag attribute by allowing to specify one of the following: * BPF_F_STRICT_ALIGNMENT * BPF_F_ANY_ALIGNMENT * BPF_F_TEST_RND_HI32 * BPF_F_TEST_STATE_FREQ * BPF_F_SLEEPABLE * BPF_F_XDP_HAS_FRAGS * Some numeric value Extend __msg attribute by allowing to specify multiple exepcted messages. All messages are expected to be present in the verifier log in the order of application. Signed-off-by: Andrii Nakryiko Signed-off-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230301175417.3146070-2-eddyz87@gmail.com [ Eduard: added commit message, formatting, comments ] commit 07e2193f106d61332e549b4e31d95da38261e718 Merge: be35f4af719c9 4672129127eed Author: Andrii Nakryiko Date: Wed Mar 1 11:13:11 2023 -0800 Merge branch 'libbpf: fix several issues reported by static analysers' Viktor Malik says: ==================== Fixing several issues reported by Coverity and Clang Static Analyzer (scan-build) for libbpf, mostly removing unnecessary symbols and assignments. No functional changes should be introduced. ==================== Signed-off-by: Andrii Nakryiko commit 4672129127eed0d16ab1b4b70b4e49014e49e8bb Author: Viktor Malik Date: Wed Mar 1 09:53:55 2023 +0100 libbpf: Cleanup linker_append_elf_relos Clang Static Analyser (scan-build) reports some unused symbols and dead assignments in the linker_append_elf_relos function. Clean these up. Signed-off-by: Viktor Malik Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/c5c8fe9f411b69afada8399d23bb048ef2a70535.1677658777.git.vmalik@redhat.com commit 7832d06bd9f9080d9ceae388bb81bf33adce3850 Author: Viktor Malik Date: Wed Mar 1 09:53:54 2023 +0100 libbpf: Remove several dead assignments Clang Static Analyzer (scan-build) reports several dead assignments in libbpf where the assigned value is unconditionally overridden by another value before it is read. Remove these assignments. Signed-off-by: Viktor Malik Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/5503d18966583e55158471ebbb2f67374b11bf5e.1677658777.git.vmalik@redhat.com commit 40e1bcab1e4ce7d7e4d601782a963e8d59d09695 Author: Viktor Malik Date: Wed Mar 1 09:53:53 2023 +0100 libbpf: Remove unnecessary ternary operator Coverity reports that the first check of 'err' in bpf_object__init_maps is always false as 'err' is initialized to 0 at that point. Remove the unnecessary ternary operator. Signed-off-by: Viktor Malik Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/78a3702f2ea9f32a84faaae9b674c56269d330a7.1677658777.git.vmalik@redhat.com commit be35f4af719c94df137cd611bf497d658eb3adc2 Author: Tiezhu Yang Date: Tue Feb 28 20:03:01 2023 +0800 selftests/bpf: Set __BITS_PER_LONG if target is bpf for LoongArch If target is bpf, there is no __loongarch__ definition, __BITS_PER_LONG defaults to 32, __NR_nanosleep is not defined: #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 #define __NR_nanosleep 101 __SC_3264(__NR_nanosleep, sys_nanosleep_time32, sys_nanosleep) #endif Work around this problem, by explicitly setting __BITS_PER_LONG to __loongarch_grlen which is defined by compiler as 64 for LA64. This is similar with commit 36e70b9b06bf ("selftests, bpf: Fix broken riscv build"). Signed-off-by: Tiezhu Yang Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1677585781-21628-1-git-send-email-yangtiezhu@loongson.cn commit 6c18e375310560915dc10ef41f789f2dfdf838bf Merge: c4b5c5bad9f07 85521e1ea4d0d Author: Alexei Starovoitov Date: Wed Mar 1 10:24:33 2023 -0800 Merge branch 'Add support for kptrs in more BPF maps' Kumar Kartikeya Dwivedi says: ==================== This set adds support for kptrs in percpu hashmaps, percpu LRU hashmaps, and local storage maps (covering sk, cgrp, task, inode). Tests are expanded to test more existing maps at runtime and also test the code path for the local storage maps (which is shared by all implementations). A question for reviewers is what the position of the BPF runtime should be on dealing with reference cycles that can be created by BPF programs at runtime using this additional support. For instance, one can store the kptr of the task in its own task local storage, creating a cycle which prevents destruction of task local storage. Cycles can be formed using arbitrarily long kptr ownership chains. Therefore, just preventing storage of such kptrs in some maps is not a sufficient solution, and is more likely to hurt usability. There is precedence in existing runtimes which promise memory safety, like Rust, where reference cycles and memory leaks are permitted. However, traditionally the safety guarantees of BPF have been stronger. Thus, more discussion and thought is invited on this topic to ensure we cover all usage aspects. Changelog: ---------- v2 -> v3 v2: https://lore.kernel.org/bpf/20230221200646.2500777-1-memxor@gmail.com/ * Fix a use-after-free bug in local storage patch * Fix selftest for aarch64 (don't use fentry/fmod_ret) * Wait for RCU Tasks Trace GP along with RCU GP in selftest v1 -> v2 v1: https://lore.kernel.org/bpf/20230219155249.1755998-1-memxor@gmail.com * Simplify selftests, fix a couple of bugs ==================== Signed-off-by: Alexei Starovoitov commit 85521e1ea4d0d7d8e62bbb0999f91e31ae421d76 Author: Kumar Kartikeya Dwivedi Date: Sat Feb 25 16:40:10 2023 +0100 selftests/bpf: Add more tests for kptrs in maps Firstly, ensure programs successfully load when using all of the supported maps. Then, extend existing tests to test more cases at runtime. We are currently testing both the synchronous freeing of items and asynchronous destruction when map is freed, but the code needs to be adjusted a bit to be able to also accomodate support for percpu maps. We now do a delete on the item (and update for array maps which has a similar effect for kptrs) to perform a synchronous free of the kptr, and test destruction both for the synchronous and asynchronous deletion. Next time the program runs, it should observe the refcount as 1 since all existing references should have been released by then. By running the program after both possible paths freeing kptrs, we establish that they correctly release resources. Next, we augment the existing test to also test the same code path shared by all local storage maps using a task local storage map. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230225154010.391965-4-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit 9db44fdd8105da00669d425acab887c668df75f6 Author: Kumar Kartikeya Dwivedi Date: Sat Feb 25 16:40:09 2023 +0100 bpf: Support kptrs in local storage maps Enable support for kptrs in local storage maps by wiring up the freeing of these kptrs from map value. Freeing of bpf_local_storage_map is only delayed in case there are special fields, therefore bpf_selem_free_* path can also only dereference smap safely in that case. This is recorded using a bool utilizing a hole in bpF_local_storage_elem. It could have been tagged in the pointer value smap using the lowest bit (since alignment > 1), but since there was already a hole I went with the simpler option. Only the map structure freeing is delayed using RCU barriers, as the buckets aren't used when selem is being freed, so they can be freed once all readers of the bucket lists can no longer access it. Cc: Martin KaFai Lau Cc: KP Singh Cc: Paul E. McKenney Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230225154010.391965-3-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit 65334e64a493c6a0976de7ad56bf8b7a9ff04b4a Author: Kumar Kartikeya Dwivedi Date: Sat Feb 25 16:40:08 2023 +0100 bpf: Support kptrs in percpu hashmap and percpu LRU hashmap Enable support for kptrs in percpu BPF hashmap and percpu BPF LRU hashmap by wiring up the freeing of these kptrs from percpu map elements. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230225154010.391965-2-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit c4b5c5bad9f07e9074c7abde3289de71c4acac48 Merge: ae256f95478e0 cfa7b011894d6 Author: Alexei Starovoitov Date: Wed Mar 1 09:55:24 2023 -0800 Merge branch 'Add skb + xdp dynptrs' Joanne Koong says: ==================== This patchset is the 2nd in the dynptr series. The 1st can be found here [0]. This patchset adds skb and xdp type dynptrs, which have two main benefits for packet parsing: * allowing operations on sizes that are not statically known at compile-time (eg variable-sized accesses). * more ergonomic and less brittle iteration through data (eg does not need manual if checking for being within bounds of data_end) When comparing the differences in runtime for packet parsing without dynptrs vs. with dynptrs, there is no noticeable difference. Patch 9 contains more details as well as examples of how to use skb and xdp dynptrs. [0] https://lore.kernel.org/bpf/20220523210712.3641569-1-joannelkoong@gmail.com/ --- Changelog: v12 = https://lore.kernel.org/bpf/20230226085120.3907863-1-joannelkoong@gmail.com/ v12 -> v13: * Fix missing { } for case statement v11 = https://lore.kernel.org/bpf/20230222060747.2562549-1-joannelkoong@gmail.com/ v11 -> v12: * Change constant mem size checking to use "__szk" kfunc annotation for slices * Use autoloading for success selftests v10 = https://lore.kernel.org/bpf/20230216225524.1192789-1-joannelkoong@gmail.com/ v10 -> v11: * Reject bpf_dynptr_slice_rdwr() for non-writable progs at load time instead of runtime * Add additional patch (__uninit kfunc annotation) * Expand on documentation * Add bpf_dynptr_write() calls for persisting writes in tests v9 = https://lore.kernel.org/bpf/20230127191703.3864860-1-joannelkoong@gmail.com/ v9 -> v10: * Add bpf_dynptr_slice and bpf_dynptr_slice_rdwr interface * Add some more tests * Split up patchset into more parts to make it easier to review v8 = https://lore.kernel.org/bpf/20230126233439.3739120-1-joannelkoong@gmail.com/ v8 -> v9: * Fix dynptr_get_type() to check non-stack dynptrs v7 = https://lore.kernel.org/bpf/20221021011510.1890852-1-joannelkoong@gmail.com/ v7 -> v8: * Change helpers to kfuncs * Add 2 new patches (1/5 and 2/5) v6 = https://lore.kernel.org/bpf/20220907183129.745846-1-joannelkoong@gmail.com/ v6 -> v7 * Change bpf_dynptr_data() to return read-only data slices if the skb prog is read-only (Martin) * Add test "skb_invalid_write" to test that writes to rd-only data slices are rejected v5 = https://lore.kernel.org/bpf/20220831183224.3754305-1-joannelkoong@gmail.com/ v5 -> v6 * Address kernel test robot errors by static inlining v4 = https://lore.kernel.org/bpf/20220822235649.2218031-1-joannelkoong@gmail.com/ v4 -> v5 * Address kernel test robot errors for configs w/out CONFIG_NET set * For data slices, return PTR_TO_MEM instead of PTR_TO_PACKET (Kumar) * Split selftests into subtests (Andrii) * Remove insn patching. Use rdonly and rdwr protos for dynptr skb construction (Andrii) * bpf_dynptr_data() returns NULL for rd-only dynptrs. There will be a separate bpf_dynptr_data_rdonly() added later (Andrii and Kumar) v3 = https://lore.kernel.org/bpf/20220822193442.657638-1-joannelkoong@gmail.com/ v3 -> v4 * Forgot to commit --amend the kernel test robot error fixups v2 = https://lore.kernel.org/bpf/20220811230501.2632393-1-joannelkoong@gmail.com/ v2 -> v3 * Fix kernel test robot build test errors v1 = https://lore.kernel.org/bpf/20220726184706.954822-1-joannelkoong@gmail.com/ v1 -> v2 * Return data slices to rd-only skb dynptrs (Martin) * bpf_dynptr_write allows writes to frags for skb dynptrs, but always invalidates associated data slices (Martin) * Use switch casing instead of ifs (Andrii) * Use 0xFD for experimental kind number in the selftest (Zvi) * Put selftest conversions w/ dynptrs into new files (Alexei) * Add new selftest "test_cls_redirect_dynptr.c" ==================== Signed-off-by: Alexei Starovoitov commit cfa7b011894d689cccfa88a25da324fa5c34e4ed Author: Joanne Koong Date: Wed Mar 1 07:49:53 2023 -0800 selftests/bpf: tests for using dynptrs to parse skb and xdp buffers Test skb and xdp dynptr functionality in the following ways: 1) progs/test_cls_redirect_dynptr.c * Rewrite "progs/test_cls_redirect.c" test to use dynptrs to parse skb data * This is a great example of how dynptrs can be used to simplify a lot of the parsing logic for non-statically known values. When measuring the user + system time between the original version vs. using dynptrs, and averaging the time for 10 runs (using "time ./test_progs -t cls_redirect"): original version: 0.092 sec with dynptrs: 0.078 sec 2) progs/test_xdp_dynptr.c * Rewrite "progs/test_xdp.c" test to use dynptrs to parse xdp data When measuring the user + system time between the original version vs. using dynptrs, and averaging the time for 10 runs (using "time ./test_progs -t xdp_attach"): original version: 0.118 sec with dynptrs: 0.094 sec 3) progs/test_l4lb_noinline_dynptr.c * Rewrite "progs/test_l4lb_noinline.c" test to use dynptrs to parse skb data When measuring the user + system time between the original version vs. using dynptrs, and averaging the time for 10 runs (using "time ./test_progs -t l4lb_all"): original version: 0.062 sec with dynptrs: 0.081 sec For number of processed verifier instructions: original version: 6268 insns with dynptrs: 2588 insns 4) progs/test_parse_tcp_hdr_opt_dynptr.c * Add sample code for parsing tcp hdr opt lookup using dynptrs. This logic is lifted from a real-world use case of packet parsing in katran [0], a layer 4 load balancer. The original version "progs/test_parse_tcp_hdr_opt.c" (not using dynptrs) is included here as well, for comparison. When measuring the user + system time between the original version vs. using dynptrs, and averaging the time for 10 runs (using "time ./test_progs -t parse_tcp_hdr_opt"): original version: 0.031 sec with dynptrs: 0.045 sec 5) progs/dynptr_success.c * Add test case "test_skb_readonly" for testing attempts at writes on a prog type with read-only skb ctx. * Add "test_dynptr_skb_data" for testing that bpf_dynptr_data isn't supported for skb progs. 6) progs/dynptr_fail.c * Add test cases "skb_invalid_data_slice{1,2,3,4}" and "xdp_invalid_data_slice{1,2}" for testing that helpers that modify the underlying packet buffer automatically invalidate the associated data slice. * Add test cases "skb_invalid_ctx" and "xdp_invalid_ctx" for testing that prog types that do not support bpf_dynptr_from_skb/xdp don't have access to the API. * Add test case "dynptr_slice_var_len{1,2}" for testing that variable-sized len can't be passed in to bpf_dynptr_slice * Add test case "skb_invalid_slice_write" for testing that writes to a read-only data slice are rejected by the verifier. * Add test case "data_slice_out_of_bounds_skb" for testing that writes to an area outside the slice are rejected. * Add test case "invalid_slice_rdwr_rdonly" for testing that prog types that don't allow writes to packet data don't accept any calls to bpf_dynptr_slice_rdwr. [0] https://github.com/facebookincubator/katran/blob/main/katran/lib/bpf/pckt_parsing.h Signed-off-by: Joanne Koong Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20230301154953.641654-11-joannelkoong@gmail.com Signed-off-by: Alexei Starovoitov commit 66e3a13e7c2c44d0c9dd6bb244680ca7529a8845 Author: Joanne Koong Date: Wed Mar 1 07:49:52 2023 -0800 bpf: Add bpf_dynptr_slice and bpf_dynptr_slice_rdwr Two new kfuncs are added, bpf_dynptr_slice and bpf_dynptr_slice_rdwr. The user must pass in a buffer to store the contents of the data slice if a direct pointer to the data cannot be obtained. For skb and xdp type dynptrs, these two APIs are the only way to obtain a data slice. However, for other types of dynptrs, there is no difference between bpf_dynptr_slice(_rdwr) and bpf_dynptr_data. For skb type dynptrs, the data is copied into the user provided buffer if any of the data is not in the linear portion of the skb. For xdp type dynptrs, the data is copied into the user provided buffer if the data is between xdp frags. If the skb is cloned and a call to bpf_dynptr_data_rdwr is made, then the skb will be uncloned (see bpf_unclone_prologue()). Please note that any bpf_dynptr_write() automatically invalidates any prior data slices of the skb dynptr. This is because the skb may be cloned or may need to pull its paged buffer into the head. As such, any bpf_dynptr_write() will automatically have its prior data slices invalidated, even if the write is to data in the skb head of an uncloned skb. Please note as well that any other helper calls that change the underlying packet buffer (eg bpf_skb_pull_data()) invalidates any data slices of the skb dynptr as well, for the same reasons. Signed-off-by: Joanne Koong Link: https://lore.kernel.org/r/20230301154953.641654-10-joannelkoong@gmail.com Signed-off-by: Alexei Starovoitov commit 05421aecd4ed65da0dc17b0c3c13779ef334e9e5 Author: Joanne Koong Date: Wed Mar 1 07:49:51 2023 -0800 bpf: Add xdp dynptrs Add xdp dynptrs, which are dynptrs whose underlying pointer points to a xdp_buff. The dynptr acts on xdp data. xdp dynptrs have two main benefits. One is that they allow operations on sizes that are not statically known at compile-time (eg variable-sized accesses). Another is that parsing the packet data through dynptrs (instead of through direct access of xdp->data and xdp->data_end) can be more ergonomic and less brittle (eg does not need manual if checking for being within bounds of data_end). For reads and writes on the dynptr, this includes reading/writing from/to and across fragments. Data slices through the bpf_dynptr_data API are not supported; instead bpf_dynptr_slice() and bpf_dynptr_slice_rdwr() should be used. For examples of how xdp dynptrs can be used, please see the attached selftests. Signed-off-by: Joanne Koong Link: https://lore.kernel.org/r/20230301154953.641654-9-joannelkoong@gmail.com Signed-off-by: Alexei Starovoitov commit b5964b968ac64c2ec2debee7518499113b27c34e Author: Joanne Koong Date: Wed Mar 1 07:49:50 2023 -0800 bpf: Add skb dynptrs Add skb dynptrs, which are dynptrs whose underlying pointer points to a skb. The dynptr acts on skb data. skb dynptrs have two main benefits. One is that they allow operations on sizes that are not statically known at compile-time (eg variable-sized accesses). Another is that parsing the packet data through dynptrs (instead of through direct access of skb->data and skb->data_end) can be more ergonomic and less brittle (eg does not need manual if checking for being within bounds of data_end). For bpf prog types that don't support writes on skb data, the dynptr is read-only (bpf_dynptr_write() will return an error) For reads and writes through the bpf_dynptr_read() and bpf_dynptr_write() interfaces, reading and writing from/to data in the head as well as from/to non-linear paged buffers is supported. Data slices through the bpf_dynptr_data API are not supported; instead bpf_dynptr_slice() and bpf_dynptr_slice_rdwr() (added in subsequent commit) should be used. For examples of how skb dynptrs can be used, please see the attached selftests. Signed-off-by: Joanne Koong Link: https://lore.kernel.org/r/20230301154953.641654-8-joannelkoong@gmail.com Signed-off-by: Alexei Starovoitov commit d96d937d7c5c12237dce1f14bf0fc9900cabba09 Author: Joanne Koong Date: Wed Mar 1 07:49:49 2023 -0800 bpf: Add __uninit kfunc annotation This patch adds __uninit as a kfunc annotation. This will be useful for scenarios such as for example in dynptrs, indicating whether the dynptr should be checked by the verifier as an initialized or an uninitialized dynptr. Without this annotation, the alternative would be needing to hard-code in the verifier the specific kfunc to indicate that arg should be treated as an uninitialized arg. Signed-off-by: Joanne Koong Link: https://lore.kernel.org/r/20230301154953.641654-7-joannelkoong@gmail.com Signed-off-by: Alexei Starovoitov commit 485ec51ef9764c0f67d35cabba0a963936b9126e Author: Joanne Koong Date: Wed Mar 1 07:49:48 2023 -0800 bpf: Refactor verifier dynptr into get_dynptr_arg_reg This commit refactors the logic for determining which register in a function is the dynptr into "get_dynptr_arg_reg". This will be used in the future when the dynptr reg for BPF_FUNC_dynptr_write will need to be obtained in order to support writes for skb dynptrs. Signed-off-by: Joanne Koong Link: https://lore.kernel.org/r/20230301154953.641654-6-joannelkoong@gmail.com Signed-off-by: Alexei Starovoitov commit 8357b366cbb09b17c90e2cd758360a6bd2ea7507 Author: Joanne Koong Date: Wed Mar 1 07:49:47 2023 -0800 bpf: Define no-ops for externally called bpf dynptr functions Some bpf dynptr functions will be called from places where if CONFIG_BPF_SYSCALL is not set, then the dynptr function is undefined. For example, when skb type dynptrs are added in the next commit, dynptr functions are called from net/core/filter.c This patch defines no-op implementations of these dynptr functions so that they do not break compilation by being an undefined reference. Signed-off-by: Joanne Koong Link: https://lore.kernel.org/r/20230301154953.641654-5-joannelkoong@gmail.com Signed-off-by: Alexei Starovoitov commit 1d18feb2c915c5ad0a9a61d04b8560e8efb78ce8 Author: Joanne Koong Date: Wed Mar 1 07:49:46 2023 -0800 bpf: Allow initializing dynptrs in kfuncs This change allows kfuncs to take in an uninitialized dynptr as a parameter. Before this change, only helper functions could successfully use uninitialized dynptrs. This change moves the memory access check (including stack state growing and slot marking) into process_dynptr_func(), which both helpers and kfuncs call into. Signed-off-by: Joanne Koong Link: https://lore.kernel.org/r/20230301154953.641654-4-joannelkoong@gmail.com Signed-off-by: Alexei Starovoitov commit 7e0dac2807e6c4ae8c56941d74971fdb0763b4f9 Author: Joanne Koong Date: Wed Mar 1 07:49:45 2023 -0800 bpf: Refactor process_dynptr_func This change cleans up process_dynptr_func's flow to be more intuitive and updates some comments with more context. Signed-off-by: Joanne Koong Link: https://lore.kernel.org/r/20230301154953.641654-3-joannelkoong@gmail.com Signed-off-by: Alexei Starovoitov commit 2f46439346700a2b41cf0fa9432f110f42fd8821 Author: Joanne Koong Date: Wed Mar 1 07:49:44 2023 -0800 bpf: Support "sk_buff" and "xdp_buff" as valid kfunc arg types The bpf mirror of the in-kernel sk_buff and xdp_buff data structures are __sk_buff and xdp_md. Currently, when we pass in the program ctx to a kfunc where the program ctx is a skb or xdp buffer, we reject the program if the in-kernel definition is sk_buff/xdp_buff instead of __sk_buff/xdp_md. This change allows "sk_buff <--> __sk_buff" and "xdp_buff <--> xdp_md" to be recognized as valid matches. The user program may pass in their program ctx as a __sk_buff or xdp_md, and the in-kernel definition of the kfunc may define this arg as a sk_buff or xdp_buff. Signed-off-by: Joanne Koong Link: https://lore.kernel.org/r/20230301154953.641654-2-joannelkoong@gmail.com Signed-off-by: Alexei Starovoitov commit 12e8ed969852c11503216115952c84f7c2f4c6b5 Author: Ashutosh Dixit Date: Mon Feb 27 20:43:34 2023 -0800 drm/i915/hwmon: Accept writes of value 0 to power1_max_interval The value shown by power1_max_interval in millisec is essentially: ((1.x * power(2,y)) * 1000) >> 10 Where x and y are read from a HW register. On ATSM, x and y are 0 on power-up so the value shown is 0. Writes of 0 to power1_max_interval had previously been disallowed to avoid computing ilog2(0) but this resulted in the corner-case bug below. Therefore allow writes of 0 now but special case that write to x = y = 0. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7754 Signed-off-by: Ashutosh Dixit Reviewed-by: Badal Nilawar Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230228044334.3630391-1-ashutosh.dixit@intel.com commit 254986e324add8a30d0019c6da59f81adc8b565f Author: Maarten Lankhorst Date: Fri Feb 24 10:51:52 2023 +0100 drm/radeon: Use the drm suballocation manager implementation. Use the generic suballocation helper for radeon. v3: - Select the suballoc helper in Kconfig (Thomas). Signed-off-by: Maarten Lankhorst Co-developed-by: Thomas Hellström Signed-off-by: Thomas Hellström Reviewed-by: Christian König Acked-by: Maarten Lankhorst Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20230224095152.30134-4-thomas.hellstrom@linux.intel.com commit c103a23f2f297c6ab2e5e74e39b655439f3524a6 Author: Maarten Lankhorst Date: Fri Feb 24 10:51:51 2023 +0100 drm/amd: Convert amdgpu to use suballocation helper. Now that we have a generic suballocation helper, Use it in amdgpu. For lines that get moved or changed, also fix up pre-existing style issues. Signed-off-by: Maarten Lankhorst Co-developed-by: Thomas Hellström Signed-off-by: Thomas Hellström Reviewed-by: Christian König Acked-by: Maarten Lankhorst Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230224095152.30134-3-thomas.hellstrom@linux.intel.com commit 849ee8a2f0df7a4ed4d281e19d3c9824b8e60bc2 Author: Maarten Lankhorst Date: Fri Feb 24 10:51:50 2023 +0100 drm/suballoc: Extract amdgpu_sa.c as generic suballocation helper Suballocating a buffer object is something that is not driver-specific and useful for many drivers. Use a slightly modified version of amdgpu_sa.c v2: - Style cleanups. - Added / Modified documentation. - Use u64 for the sizes and offset. The code dates back to 2012 and using unsigned int will probably soon come back to bite us. We can consider size_t as well for better 32-bit efficiency. - Add and document gfp, intr and align arguments to drm_suballoc_new(). - Use drm_printer for debug output. v3: - Remove stale author info (Christian König) v4: - Avoid 64-bit integer divisions (kernel test robot ) - Use size_t rather than u64 for the managed range. (Thomas) Signed-off-by: Maarten Lankhorst Co-developed-by: Thomas Hellström Signed-off-by: Thomas Hellström Reviewed-by: Christian König Acked-by: Maarten Lankhorst Acked-by: Alex Deucher Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230224095152.30134-2-thomas.hellstrom@linux.intel.com commit 30c35a4ba9cd91e07825da8e2846887cb000114c Author: Ville Syrjälä Date: Fri Jan 27 19:30:42 2023 +0200 drm/i915/psr: Fix the delayed vblank w/a Fix the code to correctly determine whether delayed vblank is used or not. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230127173044.24108-3-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit d34b4288bd1e3c70ec6d790fcf1041e99d0fc85e Author: Ville Syrjälä Date: Fri Jan 27 19:30:41 2023 +0200 drm/i915/vrr: Fix "window2" handling The "window2" delay is just the difference of vactive (undelayed vblank) vs. vblank_start (delayed vblank). Just use vblank_start during the VRR calculations so that things work correctly regardless of whether delayed vblank is used or not. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230127173044.24108-2-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit fe82b93fc101beb6396193b1713029d18d740e7f Author: Ville Syrjälä Date: Mon Feb 20 18:47:18 2023 +0200 drm/i915: Get HDR DPCD refresh timeout from VBT Grab the HDR DPCD refresh timeout (time we need to wait after writing the sourc OUI before the HDR DPCD registers are ready) from the VBT. Windows doesn't even seem to have any default value for this, which is perhaps a bit weird since the VBT value is documented as TGL+ and I thought the HDR backlight stuff might already be used on earlier platforms. To play it safe I left the old hardcoded 30ms default in place. Digging through some internal stuff that seems to have been a number given by the vendor for one particularly slow TCON. Although I did see 50ms mentioned somewhere as well. Let's also include the value in the debug print to ease debugging, and toss in the customary connector id+name as well. The TGL Thinkpad T14 I have sets this to 0 btw. So the delay is now gone on this machine: [CONNECTOR:308:eDP-1] Detected Intel HDR backlight interface version 1 [CONNECTOR:308:eDP-1] Using Intel proprietary eDP backlight controls [CONNECTOR:308:eDP-1] SDR backlight is controlled through PWM [CONNECTOR:308:eDP-1] Using native PCH PWM for backlight control (controller=0) [CONNECTOR:308:eDP-1] Using AUX HDR interface for backlight control (range 0..496) [CONNECTOR:308:eDP-1] Performing OUI wait (0 ms) Cc: Lyude Paul Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230220164718.23117-1-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit c120c98486c2855d2ae266c2af63d26f61dfcc4e Author: Vlastimil Babka Date: Tue Feb 28 10:35:56 2023 +0100 tomoyo: replace tomoyo_round2() with kmalloc_size_roundup() It seems tomoyo has had its own implementation of what kmalloc_size_roundup() does today. Remove the function tomoyo_round2() and replace it with kmalloc_size_roundup(). It provides more accurate results and doesn't contain a while loop. Signed-off-by: Vlastimil Babka Signed-off-by: Tetsuo Handa commit 01c6c9fccbd51c1d9eab0f5794b0271b026178df Author: Abinaya Kalaiselvan Date: Mon Dec 19 11:08:44 2022 +0530 wifi: ath11k: Add tx ack signal support for management packets Add support to notify tx ack signal values for management packets to userspace through nl80211 interface. Advertise NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT flag to enable this feature and it will be used for data packets as well. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Abinaya Kalaiselvan Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221219053844.4084486-1-quic_mkenna@quicinc.com commit ca62297b2085b5b3168bd891ca24862242c635a1 Author: Ville Syrjälä Date: Tue Feb 28 23:36:10 2023 +0200 drm/edid: Fix csync detailed mode parsing Remove the bogus csync check and replace it with something that: - triggers for all forms of csync, not just the basic analog variant - actually populates the mode csync flags so that drivers can decide what to do with the mode Originally the code tried to outright reject csync, but that apparently broke some bogus LCD monitor that claimed to have a detailed mode that uses analog csync, despite also claiming the monitor only support separate sync: https://bugzilla.redhat.com/show_bug.cgi?id=540024 Potentially that monitor should just be quirked or something. Anyways, what we are dealing with now is some kind of funny i915 JSL machine with eDP where the panel claims to support a sensible 60Hz separate sync mode, and a 50Hz mode with bipolar analog csync. The 50Hz mode does not work so we want to not use it. Easiest way is to just correctly flag it as csync and the driver will reject it. TODO: or should we just reject any form of csync (or at least the analog variants) for digital display interfaces? v2: Grab digital csync polarity from hsync polarity bit (Jani) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8146 Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230228213610.26283-1-ville.syrjala@linux.intel.com commit 4ce0c8e7cc1c81c2123a7b44223b0bffec00cea8 Author: Tvrtko Ursulin Date: Tue Feb 28 10:13:07 2023 +0530 drm/i915/selftests: Fix live_requests for all engines After the abandonment of i915->kernel_context and since we have started to create per-gt engine->kernel_context, these tests need to be updated to instantiate the batch buffer VMA in the correct PPGTT for the context used to execute each spinner. v2(Tejas): - Clean commit message - Matt - Add BUG_ON to match vm v3(Tejas): - Fix dim checkpatch warnings Signed-off-by: Tvrtko Ursulin Signed-off-by: Tejas Upadhyay Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230228044307.191639-1-tejas.upadhyay@intel.com commit 5abaa6835f42db7a20ff57447d60303cd81495f8 Author: Thomas Zimmermann Date: Tue Feb 21 16:57:45 2023 +0100 drm/ast: Rename to_ast_private() to to_ast_device() The helper to_ast_private() now upcasts to struct ast_device. Rename it accordingly. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230221155745.27484-5-tzimmermann@suse.de commit 37b42cf904e2ed92a612aa09481385cc9eb2a6ce Author: Thomas Zimmermann Date: Tue Feb 21 16:57:44 2023 +0100 drm/ast: Rename struct ast_private to struct ast_device The data structure struct ast_private represents an AST device. Its name comes from the time when it was allocated and stored separately in struct drm_device.dev_private. The DRM device is now embedded, so rename struct ast_private to struct ast_device. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230221155745.27484-4-tzimmermann@suse.de commit faf67f640fa6c036d19727e294a2915e3fe5bf7c Author: Thomas Zimmermann Date: Tue Feb 21 16:57:43 2023 +0100 drm/ast: Rework definition of I/O read and write helpers Ast defines a number of I/O helpers for accessing hardware. Only 4 of the many generated functions are actually used. Replace the respective generator macros with those 4 functions. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230221155745.27484-3-tzimmermann@suse.de commit a38410860628909712ea6a2becd42bab56c70e9a Author: Thomas Zimmermann Date: Tue Feb 21 16:57:42 2023 +0100 drm/ast: Remove little-endianism from I/O helpers Replace one call to ast_io_write16() with two calls to ast_io_write8() in ast_set_index_reg(). The combined 16-bit-wide write of an index register and the corresponding data register only works on little- endian systems. Write both registers independent from each other. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230221155745.27484-2-tzimmermann@suse.de commit ba3f6db4afee3f4253dbe06f4f75f9ddc6c20b8f Author: Maíra Canal Date: Thu Feb 2 08:19:44 2023 -0300 drm/vc4: replace obj lookup steps with drm_gem_objects_lookup As vc4_cl_lookup_bos() performs the same steps as drm_gem_objects_lookup(), replace the open-coded implementation in vc4 to simply use the DRM function. Signed-off-by: Maíra Canal Reviewed-by: André Almeida Reviewed-by: Javier Martinez Canillas Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230202111943.111757-3-mcanal@igalia.com commit 47c07e46c86f310bed73b9c895155a49df3d5e71 Author: Maíra Canal Date: Thu Feb 2 08:19:43 2023 -0300 drm/vc4: replace drm_gem_dma_object for drm_gem_object in vc4_exec_info The array of BOs that are lookup at the start of exec doesn't need to be instantiated as drm_gem_dma_object, as it doesn't benefit from its attributes. So, simplify the code by replacing the array of drm_gem_dma_object for an array of drm_gem_object in the struct vc4_exec_info. Suggested-by: Melissa Wen Signed-off-by: Maíra Canal Reviewed-by: André Almeida Reviewed-by: Javier Martinez Canillas Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230202111943.111757-2-mcanal@igalia.com commit abd74d262b07f33d6c298f1b2fe03cfcdb3c72f7 Author: Matt Roper Date: Thu Feb 23 16:23:00 2023 -0800 drm/i915: Stop whitelisting CS_CTX_TIMESTAMP on Xe_HP platforms Xe_HP architecture already makes the CS_CTX_TIMESTAMP readable by userspace on all engines; there's no longer a need to add it to the software-managed whitelist for the non-RCS engines. Bspec: 45545 Signed-off-by: Matt Roper Acked-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20230224002300.3578985-2-matthew.d.roper@intel.com commit cebc13de7e704b1355bea208a9f9cdb042c74588 Author: Matt Roper Date: Thu Feb 23 16:22:59 2023 -0800 drm/i915: Whitelist COMMON_SLICE_CHICKEN3 for UMD access A recommended tuning setting for both gen12 and Xe_HP platforms requires that we grant userspace r/w access to the COMMON_SLICE_CHICKEN3 register. Bspec: 73993, 73994, 31870, 68331 Cc: Dongwon Kim Signed-off-by: Matt Roper Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20230224002300.3578985-1-matthew.d.roper@intel.com commit f4658f43450478240e2e758f0532d19f921f9a69 Author: Aric Cyr Date: Sun Feb 12 18:15:18 2023 -0500 drm/amd/display: Promote DAL to 3.2.224 This version brings along the following: - Correct DML calculation - Extend Freesync over Pcon support - Fixes in pstate hang and more - Code cleanup for dc_link.h and dc_link.c Acked-by: Qingqing Zhuo Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a03e3cb16dfdf4e39ed4ed80314256f9ba671ff0 Author: Aurabindo Pillai Date: Tue Feb 21 18:35:14 2023 -0500 drm/amd/display: fix clock sequence logic for DCN32 [Why&How] The newer commit sequence on DCN32 onwards did not finish clock optimization sequence since the newer sequence did not end up calling dc_post_update_surfaces_to_stream() which resets dc->optimized_required. Call this function before passing control on to the new commit sequence. Reviewed-by: Rodrigo Siqueira Acked-by: Qingqing Zhuo Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 32953485c558cecf08f33fbfa251e80e44cef981 Author: Aric Cyr Date: Wed Feb 8 19:51:42 2023 -0500 drm/amd/display: Do not update DRR while BW optimizations pending [why] While bandwidth optimizations are pending, it's possible a pstate change will occur. During this time, VSYNC handler should not also try to update DRR parameters causing pstate hang [how] Do not adjust DRR if optimize bandwidth is set. Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 82a10aff9428f1d190de55ef7971fdb84303cc7a Author: Aric Cyr Date: Sat Feb 11 10:03:22 2023 -0500 drm/amd/display: Only wait for blank completion if OTG active [why] If OTG is not active, waiting for blank completion will always fail and timeout resulting in unnecessary driver delays. [how] Check that OTG is enabled before waiting for blank. Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f3f8f16b10f8258f1836e1110099097490a1d6c1 Author: Samson Tam Date: Fri Jan 27 18:30:08 2023 -0500 drm/amd/display: enable DPG when disabling plane for phantom pipe [Why] In disable_dangling_plane, for phantom pipes, we enable OTG so disable programming gets the double buffer update. But this causes an underflow to occur. [How] Enable DPG prior to enabling OTG. Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b5fefd01e8367763840e032bf1537747905a1447 Author: Wenjing Liu Date: Tue Feb 14 14:11:00 2023 -0500 drm/amd/display: remove empty dc_link.c [why] We kept an empty dc_link.c file due to external build dependency. Now the last build dependency has been removed. We can safely delete this file. Reviewed-by: Rodrigo Siqueira Acked-by: Qingqing Zhuo Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 26a9f53198c955b15161da48cdb51041a38d5325 Author: Paul Hsieh Date: Fri Feb 10 12:00:16 2023 +0800 drm/amd/display: Correct DML calculation to align HW formula [Why] In 2560x1440@240p eDP panel, some use cases will enable MPC combine with RGB MPO then underflow happened. This case is not allowed from HW formula.  [How] Correct eDP, DP and DP2 output bpp calculation to align HW formula. Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Paul Hsieh Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e68d1e074d5e94b609de01a3ad3287d3d17721f2 Author: bobzhou Date: Mon Feb 27 15:30:54 2023 +0800 drm/amdgpu/vcn: fix compilation issue with legacy gcc This patch is used to fix following compilation issue with legacy gcc error: ‘for’ loop initial declarations are only allowed in C99 mode for (int i = 0; i < adev->vcn.num_vcn_inst; ++i) { Signed-off-by: bobzhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit fd234e7581162573742dfb8cc4dc0af3d3148138 Author: Felix Kuehling Date: Tue Nov 16 23:15:55 2021 -0500 drm/amdkfd: Implement DMA buf fd export from KFD Exports a DMA buf fd of a given KFD buffer handle. This is intended for being able to import KFD BOs into GEM contexts to leverage the amdgpu_bo_va API for more flexible virtual address mappings. It will also be used for the new upstreamable RDMA solution coming to UCX and RCCL. The corresponding user mode change (Thunk API and kfdtest) is here: https://github.com/fxkamd/ROCT-Thunk-Interface/commits/fxkamd/dmabuf Signed-off-by: Felix Kuehling Acked-by: Christian König Reviewed-by: Xiaogang Chen Signed-off-by: Alex Deucher commit 2d81c4cd78477e473dbdedd1dbfb67460fa53c58 Author: Felix Kuehling Date: Tue Nov 16 21:03:23 2021 -0500 drm/amdgpu: Generalize KFD dmabuf import Use proper amdgpu_gem_prime_import function to handle all kinds of imports. Remember the dmabuf reference to enable proper multi-GPU attachment to multiple VMs without erroneously re-exporting the underlying BO multiple times. Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher commit 7ae1dbe6547c39410d82156c96eaa9c8cf55e87a Author: Wenjing Liu Date: Mon Feb 6 17:58:52 2023 -0500 drm/amd/display: merge dc_link.h into dc.h and dc_types.h [why] Remove the need to include dc_link.h separately. dc.h should contain everything needed on DM side. [How] Merge dc_link.h into dc.h and dc_types.h so DM only needs to include dc.h to use all link public functions. Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1099238b966e9b291fca40d908d6a016ce758455 Author: Mustapha Ghaddar Date: Mon Feb 13 08:07:17 2023 -0500 drm/amd/display: Update BW ALLOCATION Function declaration [WHY & HOW] Update the declaration to give a better idea of what the function does. Reviewed-by: Wenjing Liu Acked-by: Qingqing Zhuo Signed-off-by: Mustapha Ghaddar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 627441f5a56e2ee119baf340b394cf4ec9c94251 Author: Aric Cyr Date: Sat Feb 11 12:56:23 2023 -0500 Revert "drm/amd/display: Fix FreeSync active bit issue" This reverts commit 6cfb6df2d645c00513ecf17832928e08979fa953. [Why & How] Original change causes black screen. Revert until fix is available. Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7bd571b274fd15e0e7dc3d79d104f32928010eff Author: Alvin Lee Date: Fri Feb 10 17:46:34 2023 -0500 drm/amd/display: DAL to program DISPCLK WDIVIDER if PMFW doesn't [Why & How] - If for any reason PMFW fails to set the expected (or valid) DISPCLK WDIVIDER, then DAL will program DENTIST DISPCLK WDIVIDER to correct for this issue Reviewed-by: Samson Tam Acked-by: Qingqing Zhuo Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6ed373b0d572cde539a461bf333661cb98595e63 Author: Sung Joon Kim Date: Fri Feb 10 14:39:49 2023 -0500 drm/amd/display: Extend Freesync over PCon support for more devices [why] More branch devices are able to support Freesync over PCon so include them in the list of supporting devices. [how] Add more compatible PCon devices in the whitelist for Freesync over Pcon. Reviewed-by: Harry Wentland Acked-by: Qingqing Zhuo Signed-off-by: Sung Joon Kim Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1e74c05b275cb4224f3f8c2240ab24486818a823 Author: Yihan Zhu Date: Fri Feb 3 10:56:04 2023 -0500 drm/amd/display: update pixel format in DP hw sequence [WHY] DP 420 formats do not light up because the pixel processing mode of the DP_FORMAT is misprogrammed [HOW] Added appropriate programming for DP pixel format Reviewed-by: Charlene Liu Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Yihan Zhu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9bb10b7aaec3b6278f9cc410c17dcaa129bbbbf0 Author: Ayush Gupta Date: Fri Feb 10 13:02:09 2023 -0500 drm/amd/display: populate subvp cmd info only for the top pipe [Why] System restart observed while changing the display resolution to 8k with extended mode. Sytem restart was caused by a page fault. [How] When the driver populates subvp info it did it for both the pipes using vblank which caused an outof bounds array access causing the page fault. added checks to allow the top pipe only to fix this issue. Co-authored-by: Ayush Gupta Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Ayush Gupta Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 504d3cae8b6718ab9c2fbef9e4cb56deb29ea9ee Author: Hersen Wu Date: Thu Feb 9 18:35:00 2023 -0500 drm/amd/display: dcn32/321 dsc_pg_control not executed properly [why] during boot up or resume from s3, hw default value of domain_power_forceon is 1. when program domain_power_gate to 1 to power down hw block, hw will not change to power off due to domain_power_forceon = 1. [how] enable_power_gating_plane(true) should be executed to set domain_power_forceon to 0 before dsc_pg_control. dsc_pg_control is already called by dcn3x_init_hw--> init_pipes--> dsc_pg_control. no need be programmed with dcn3x_init_hw one more time. to trigger dchub, dsc block power state change, need program dc_ip_request_cntl to notify hw block. Reviewed-by: Nevenko Stupar Acked-by: Qingqing Zhuo Signed-off-by: Hersen Wu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a06d565b4a1c032ff8a8d22ceb39c061443208d9 Author: Mustapha Ghaddar Date: Fri Feb 3 13:41:13 2023 -0500 drm/amd/display: Allocation at stream Enable [WHY & HOW] After we allocate BW at plug, we will de-alloc and allocate only what stream needs at stream_enable() [HOW] Introduce bw allocation check at link_enable() for DPIA links Reviewed-by: Wenjing Liu Acked-by: Qingqing Zhuo Signed-off-by: Mustapha Ghaddar Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 36951fc9460fce96bafd131ceb0f343cae6d3cb9 Author: Aric Cyr Date: Thu Feb 9 20:03:33 2023 -0500 Revert "drm/amd/display: Do not set DRR on pipe commit" This reverts commit 4f1b5e739dfd1edde33329e3f376733a131fb1ff. [Why & How] Original change causes a regression. Revert until fix is available. Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c32699caeca802cfa3416f798abcff719d1633f7 Author: Jasdeep Dhillon Date: Wed Jan 25 10:50:19 2023 -0500 drm/amd/display: Updating Video Format Fall Back Policy. [WHY] Adding 1920x1080 as fail safe mode for Video Format Fall Back Policy. Reviewed-by: Jerry Zuo Acked-by: Qingqing Zhuo Signed-off-by: Jasdeep Dhillon Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c69fc3d0de6ca79d946a2715f8745a1eae69c3d8 Author: Aric Cyr Date: Fri Feb 3 17:46:05 2023 -0500 drm/amd/display: Reduce CPU busy-waiting for long delays [WHY] udelay should not be used for long waits since it keeps CPU active, wasting power. [HOW] Use fsleep where acceptable to allow CPU cores to be parked by the scheduler. Reviewed-by: Wenjing Liu Acked-by: Qingqing Zhuo Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b4ceeffd13870b641a284ffb0f6fb4ffe19b0b14 Author: Alex Hung Date: Wed Jan 11 09:54:11 2023 -0700 drm/amd/display: fix shift-out-of-bounds in CalculateVMAndRowBytes [WHY] When PTEBufferSizeInRequests is zero, UBSAN reports the following warning because dml_log2 returns an unexpected negative value: shift exponent 4294966273 is too large for 32-bit type 'int' [HOW] In the case PTEBufferSizeInRequests is zero, skip the dml_log2() and assign the result directly. Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alex Hung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1e5d4d8eb8c0f15d90c50e7abd686c980e54e42e Author: Ryan Lin Date: Tue Feb 7 23:03:48 2023 +0800 drm/amd/display: Ext displays with dock can't recognized after resume [Why] Needs to set the default value of the LTTPR timeout after resume. [How] Set the default (3.2ms) timeout at resuming if the sink supports LTTPR Reviewed-by: Jerry Zuo Acked-by: Qingqing Zhuo Signed-off-by: Ryan Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 61d2a9bec406329ad57e2ecf8e33338a21057eec Author: Horatio Zhang Date: Fri Feb 24 13:55:44 2023 +0800 drm/amdgpu: fix ttm_bo calltrace warning in psp_hw_fini The call trace occurs when the amdgpu is removed after the mode1 reset. During mode1 reset, from suspend to resume, there is no need to reinitialize the ta firmware buffer which caused the bo pin_count increase redundantly. [ 489.885525] Call Trace: [ 489.885525] [ 489.885526] amdttm_bo_put+0x34/0x50 [amdttm] [ 489.885529] amdgpu_bo_free_kernel+0xe8/0x130 [amdgpu] [ 489.885620] psp_free_shared_bufs+0xb7/0x150 [amdgpu] [ 489.885720] psp_hw_fini+0xce/0x170 [amdgpu] [ 489.885815] amdgpu_device_fini_hw+0x2ff/0x413 [amdgpu] [ 489.885960] ? blocking_notifier_chain_unregister+0x56/0xb0 [ 489.885962] amdgpu_driver_unload_kms+0x51/0x60 [amdgpu] [ 489.886049] amdgpu_pci_remove+0x5a/0x140 [amdgpu] [ 489.886132] ? __pm_runtime_resume+0x60/0x90 [ 489.886134] pci_device_remove+0x3e/0xb0 [ 489.886135] __device_release_driver+0x1ab/0x2a0 [ 489.886137] driver_detach+0xf3/0x140 [ 489.886138] bus_remove_driver+0x6c/0xf0 [ 489.886140] driver_unregister+0x31/0x60 [ 489.886141] pci_unregister_driver+0x40/0x90 [ 489.886142] amdgpu_exit+0x15/0x451 [amdgpu] Signed-off-by: Horatio Zhang Signed-off-by: longlyao Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 1a80993ae37341c2017108d02975683076ace2a6 Author: Tom Rix Date: Fri Feb 24 11:45:19 2023 -0500 drm/amdgpu: remove unused variable ring building with gcc and W=1 reports drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c:81:29: error: variable ‘ring’ set but not used [-Werror=unused-but-set-variable] 81 | struct amdgpu_ring *ring; | ^~~~ ring is not used so remove it. Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit 60971b204c615a6881f50c3dc9a2182551282b94 Author: tiancyin Date: Wed Feb 8 14:10:04 2023 +0800 drm/amd/display: fix dm irq error message in gpu recover [Why] Variable adev->crtc_irq.num_types was initialized as the value of adev->mode_info.num_crtc at early_init stage, later at hw_init stage, the num_crtc changed due to the display pipe harvest on some SKUs, but the num_types was not updated accordingly, that cause below error in gpu recover. *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3 *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3 *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id :3 *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3 *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3 *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3 *ERROR* amdgpu_dm_set_pflip_irq_state: crtc is NULL at id :3 *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3 *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3 *ERROR* amdgpu_dm_set_vupdate_irq_state: crtc is NULL at id :3 [How] Defer the initialization of num_types to eliminate the error logs. Signed-off-by: tiancyin Reviewed-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 33759ce0ce8981c8d27b08927e894904b906e7db Author: Mario Limonciello Date: Sun Feb 19 23:04:04 2023 -0600 drm/amd: Fix initialization for nbio 7.5.1 A mistake has been made in the BIOS for some ASICs with NBIO 7.5.1 where some NBIO registers aren't properly setup. Ensure that they're set during initialization. Tested-by: Richard Gong Signed-off-by: Mario Limonciello Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 283947bbd5dd8885dbfbd86515276a9ce4a31251 Author: Harry Wentland Date: Thu Jan 12 11:55:25 2023 -0500 drm/amd/display: Format input and output CSC matrix Format the input and output CSC matrix so they look like 3x4 matrixes. This will make parsing them much easier and allows us to quickly spot potential mistakes. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: Vitaly.Prosyak@amd.com Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Reviewed-by: Leo Li Signed-off-by: Alex Deucher commit e47f1691adbcbba22b364888cb34686d6c7d1152 Author: Harry Wentland Date: Mon Dec 12 13:02:25 2022 -0500 drm/amd/display: Don't restrict bpc to 8 bpc This will let us pass the kms_hdr.bpc_switch IGT test. The reason the bpc restriction was required is historical. At one point in time we were not falling back to a lower bpc when we didn't have enough bandwidth for the maximum bpc reported by a display. This meant that we couldn't enable some high refresh modes unless we limitted the bpc. Starting with this patch the issue is fixed: commit cbd14ae7ea93 ("drm/amd/display: Fix incorrectly pruned modes with deep color") This patch implemented a fallback mechanism if mode validation failed at the max bpc. This means users now automatically get all modes that can be supported by at least 6 bpc. The driver will enable the mode with the highest possible bpc that is supported by the display. v2: - explain why this is no longer needed (Michel) - refer to commit that fixed bpc fallback (Michel) Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: Vitaly.Prosyak@amd.com Cc: Joshua Ashton Cc: dri-devel@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Cc: Michel Dänzer Reviewed-by: Joshua Ashton Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher commit 567172bbb4805a9d9e84e4621210212126703d04 Author: Candice Li Date: Fri Feb 24 12:15:57 2023 +0800 drm/amdgpu: Make umc_v8_10_convert_error_address static and remove unused variable Fixes following warnings: warning: no previous prototype for 'umc_v8_10_convert_error_address' warning: variable 'channel_index' set but not used Reported-by: kernel test robot Signed-off-by: Candice Li Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit ae256f95478e07d49dae5036bb83c09dfbd686d4 Author: Jose E. Marchesi Date: Tue Feb 28 10:51:29 2023 +0100 bpf, docs: Document BPF insn encoding in term of stored bytes [Changes from V4: - s/regs:16/regs:8 in figure.] [Changes from V3: - Back to src_reg and dst_reg, since they denote register numbers as opposed to the values stored in these registers.] [Changes from V2: - Use src and dst consistently in the document. - Use a more graphical depiction of the 128-bit instruction. - Remove `Where:' fragment. - Clarify that unused bits are reserved and shall be zeroed.] [Changes from V1: - Use rst literal blocks for figures. - Avoid using | in the basic instruction/pseudo instruction figure. - Rebased to today's bpf-next master branch.] This patch modifies instruction-set.rst so it documents the encoding of BPF instructions in terms of how the bytes are stored (be it in an ELF file or as bytes in a memory buffer to be loaded into the kernel or some other BPF consumer) as opposed to how the instruction looks like once loaded. This is hopefully easier to understand by implementors looking to generate and/or consume bytes conforming BPF instructions. The patch also clarifies that the unused bytes in a pseudo-instruction shall be cleared with zeros. Signed-off-by: Jose E. Marchesi Acked-by: Yonghong Song Acked-by: David Vernet Link: https://lore.kernel.org/r/87h6v6i0da.fsf_-_@oracle.com Signed-off-by: Alexei Starovoitov commit 30a2d8328d8ac1bb0a6bf73f4f4cf03f4f5977cc Author: David Vernet Date: Tue Feb 28 09:28:45 2023 -0600 bpf: Fix bpf_cgroup_from_id() doxygen header In commit 332ea1f697be ("bpf: Add bpf_cgroup_from_id() kfunc"), a new bpf_cgroup_from_id() kfunc was added which allows a BPF program to lookup and acquire a reference to a cgroup from a cgroup id. The commit's doxygen comment seems to have copy-pasted fields, which causes BPF kfunc helper documentation to fail to render: /helpers.c:2114: warning: Excess function parameter 'cgrp'... /helpers.c:2114: warning: Excess function parameter 'level'... /helpers.c:2114: warning: Excess function parameter 'level'... This patch fixes the doxygen header. Fixes: 332ea1f697be ("bpf: Add bpf_cgroup_from_id() kfunc") Signed-off-by: David Vernet Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20230228152845.294695-1-void@manifault.com Signed-off-by: Alexei Starovoitov commit e0106ac97886b6bc36c480de72562d3e70b3f8b1 Author: Thomas Zimmermann Date: Tue Feb 28 16:26:12 2023 +0100 Revert "drm/shmem-helper: Switch to reservation lock" This reverts commit 67b7836d4458790f1261e31fe0ce3250989784f0. The locking appears incomplete. A caller of SHMEM helper's pin function never acquires the dma-buf reservation lock. So we get WARNING: CPU: 3 PID: 967 at drivers/gpu/drm/drm_gem_shmem_helper.c:243 drm_gem_shmem_pin+0x42/0x90 [drm_shmem_helper] Signed-off-by: Thomas Zimmermann Acked-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20230228152612.19971-1-tzimmermann@suse.de commit 7364d60c26618d7465602ac86717a5a325b342f3 Author: Jiaxun Yang Date: Tue Feb 28 11:33:05 2023 +0000 bpf, mips: Implement R4000 workarounds for JIT For R4000 erratas around multiplication and division instructions, as our use of those instructions are always followed by mflo/mfhi instructions, the only issue we need care is "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0" Errata 28: "A double-word or a variable shift may give an incorrect result if executed while an integer multiplication is in progress." We just emit a mfhi $0 to ensure the operation is completed after every multiplication instruction according to workaround suggestion in the document. Signed-off-by: Jiaxun Yang Signed-off-by: Daniel Borkmann Reviewed-by: Philippe Mathieu-Daudé Acked-by: Johan Almbladh Link: https://lore.kernel.org/bpf/20230228113305.83751-3-jiaxun.yang@flygoat.com commit bbefef2f07080cd502a93cb1c529e1c8a6c4ac8e Author: Jiaxun Yang Date: Tue Feb 28 11:33:04 2023 +0000 bpf, mips: Implement DADDI workarounds for JIT For DADDI errata we just workaround by disable immediate operation for BPF_ADD / BPF_SUB to avoid generation of DADDIU. All other use cases in JIT won't cause overflow thus they are all safe. Signed-off-by: Jiaxun Yang Signed-off-by: Daniel Borkmann Reviewed-by: Philippe Mathieu-Daudé Acked-by: Johan Almbladh Link: https://lore.kernel.org/bpf/20230228113305.83751-2-jiaxun.yang@flygoat.com commit c8ee37bde4021a275d2e4f33bd48d54912bb00c4 Author: Yonghong Song Date: Mon Feb 27 14:49:43 2023 -0800 libbpf: Fix bpf_xdp_query() in old kernels Commit 04d58f1b26a4("libbpf: add API to get XDP/XSK supported features") added feature_flags to struct bpf_xdp_query_opts. If a user uses bpf_xdp_query_opts with feature_flags member, the bpf_xdp_query() will check whether 'netdev' family exists or not in the kernel. If it does not exist, the bpf_xdp_query() will return -ENOENT. But 'netdev' family does not exist in old kernels as it is introduced in the same patch set as Commit 04d58f1b26a4. So old kernel with newer libbpf won't work properly with bpf_xdp_query() api call. To fix this issue, if the return value of libbpf_netlink_resolve_genl_family_id() is -ENOENT, bpf_xdp_query() will just return 0, skipping the rest of xdp feature query. This preserves backward compatibility. Fixes: 04d58f1b26a4 ("libbpf: add API to get XDP/XSK supported features") Signed-off-by: Yonghong Song Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230227224943.1153459-1-yhs@fb.com commit 7416cbbc9fb9b09ba7664dc0f3176c567685a83c Author: Andi Shyti Date: Fri Feb 10 16:03:44 2023 +0100 drm/i915/gt: Rename dev_priv to i915 for private data naming consistency It has become common practice to refer to the drm_i915_private structures as "i915". However, there are still instances where they are referred to as "dev_priv". This inconsistency can make grepping for information more difficult and does not maintain a cohesive style throughout the code. Rename all the "dev_priv" structures in the gt/* directory to "i915". Signed-off-by: Andi Shyti Reviewed-by: Nirmoy Das Acked-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20230210150344.1066991-1-andi.shyti@linux.intel.com commit f9b9297b1facb636ee81f03be3658087067babc2 Author: Harry Wentland Date: Fri Jan 13 11:24:09 2023 -0500 drm/connector: print max_requested_bpc in state debugfs This is useful to understand the bpc defaults and support of a driver. Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: Vitaly.Prosyak@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: Jani Nikula Cc: dri-devel@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Reviewed-By: Joshua Ashton Link: https://patchwork.freedesktop.org/patch/msgid/20230113162428.33874-3-harry.wentland@amd.com commit 59466fe93f0ea85bbc9913647271c29de62cab4b Author: Harry Wentland Date: Fri Jan 13 11:24:08 2023 -0500 drm/display: Don't block HDR_OUTPUT_METADATA on unknown EOTF The EDID of an HDR display defines EOTFs that are supported by the display and can be set in the HDR metadata infoframe. Userspace is expected to read the EDID and set an appropriate HDR_OUTPUT_METADATA. In drm_parse_hdr_metadata_block the kernel reads the supported EOTFs from the EDID and stores them in the drm_connector->hdr_sink_metadata. While doing so it also filters the EOTFs to the EOTFs the kernel knows about. When an HDR_OUTPUT_METADATA is set it then checks to make sure the EOTF is a supported EOTF. In cases where the kernel doesn't know about a new EOTF this check will fail, even if the EDID advertises support. Since it is expected that userspace reads the EDID to understand what the display supports it doesn't make sense for DRM to block an HDR_OUTPUT_METADATA if it contains an EOTF the kernel doesn't understand. This comes with the added benefit of future-proofing metadata support. If the spec defines a new EOTF there is no need to update DRM and an compositor can immediately make use of it. Bug: https://gitlab.freedesktop.org/wayland/weston/-/issues/609 v2: Distinguish EOTFs defind in kernel and ones defined in EDID in the commit description (Pekka) v3: Rebase; drm_hdmi_infoframe_set_hdr_metadata moved to drm_hdmi_helper.c Signed-off-by: Harry Wentland Cc: Pekka Paalanen Cc: Sebastian Wick Cc: Vitaly.Prosyak@amd.com Cc: Uma Shankar Cc: Ville Syrjälä Cc: Joshua Ashton Cc: Jani Nikula Cc: dri-devel@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Acked-by: Pekka Paalanen Reviewed-By: Joshua Ashton Link: https://patchwork.freedesktop.org/patch/msgid/20230113162428.33874-2-harry.wentland@amd.com commit 0ec73817ca21f6ed4f2cca44b63e81a688c0ba0b Author: Ian Rogers Date: Wed Feb 22 21:53:06 2023 -0800 perf vendor events intel: Update icelakex to v1.19 Update icelakex perf json from v1.18 to v1.19. Based on: https://github.com/intel/perfmon/pull/58 perf JSON files created using: https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230223055306.296179-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b42d103bc02de484dc4aefe457ffcc35637b6754 Author: Ian Rogers Date: Wed Feb 22 21:53:05 2023 -0800 perf vendor events intel: Update alderlaken to v1.19 Update alderlaken perf json from v1.18 to v1.19. Based on: https://github.com/intel/perfmon/pull/58 perf JSON files created using: https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230223055306.296179-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b0365c147f7b2aeb500456601bf6a3e08133b178 Author: Ian Rogers Date: Wed Feb 22 21:53:04 2023 -0800 perf vendor events intel: Update alderlake to v1.19 Update alderlake perf json from v1.18 to v1.19. Based on: https://github.com/intel/perfmon/pull/58 perf JSON files created using: https://github.com/intel/perfmon/blob/main/scripts/create_perf_json.py Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xing Zhengjun Link: https://lore.kernel.org/r/20230223055306.296179-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0a504fa1a780332760f2a4369a1adc3ee9f620d0 Author: Ilya Leoshkevich Date: Tue Feb 21 00:49:58 2023 +0100 libbpf: Document bpf_{btf,link,map,prog}_get_info_by_fd() Replace the short informal description with the proper doc comments. Suggested-by: Andrii Nakryiko Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230220234958.764997-1-iii@linux.ibm.com commit 06943ae675945c762bb8d5edc93d203f2b041d8d Author: Puranjay Mohan Date: Thu Feb 23 09:53:46 2023 +0000 libbpf: Fix arm syscall regs spec in bpf_tracing.h The syscall register definitions for ARM in bpf_tracing.h doesn't define the fifth parameter for the syscalls. Because of this some KPROBES based selftests fail to compile for ARM architecture. Define the fifth parameter that is passed in the R5 register (uregs[4]). Fixes: 3a95c42d65d5 ("libbpf: Define arm syscall regs spec in bpf_tracing.h") Signed-off-by: Puranjay Mohan Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20230223095346.10129-1-puranjay12@gmail.com commit 11e456cae91e9044cb12c2b037b52c9b268925f7 Author: Rong Tao Date: Fri Feb 24 23:10:02 2023 +0800 selftests/bpf: Fix compilation errors: Assign a value to a constant Commit bc292ab00f6c("mm: introduce vma->vm_flags wrapper functions") turns the vm_flags into a const variable. Added bpf_find_vma test in commit f108662b27c9("selftests/bpf: Add tests for bpf_find_vma") to assign values to variables that declare const in find_vma_fail1.c programs, which is an error to the compiler and does not test BPF verifiers. It is better to replace 'const vm_flags_t vm_flags' with 'unsigned long vm_start' for testing. $ make -C tools/testing/selftests/bpf/ -j8 ... progs/find_vma_fail1.c:16:16: error: cannot assign to non-static data member 'vm_flags' with const-qualified type 'const vm_flags_t' (aka 'const unsigned long') vma->vm_flags |= 0x55; ~~~~~~~~~~~~~ ^ ../tools/testing/selftests/bpf/tools/include/vmlinux.h:1898:20: note: non-static data member 'vm_flags' declared const here const vm_flags_t vm_flags; ~~~~~~~~~~~`~~~~~~^~~~~~~~ Signed-off-by: Rong Tao Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/tencent_CB281722B3C1BD504C16CDE586CACC2BE706@qq.com commit c679bbd611c08b0559ffae079330bc4e5574696a Author: Luis Gerhorst Date: Mon Feb 27 16:08:54 2023 +0100 tools: bpftool: Remove invalid \' json escape RFC8259 ("The JavaScript Object Notation (JSON) Data Interchange Format") only specifies \", \\, \/, \b, \f, \n, \r, and \r as valid two-character escape sequences. This does not include \', which is not required in JSON because it exclusively uses double quotes as string separators. Solidus (/) may be escaped, but does not have to. Only reverse solidus (\), double quotes ("), and the control characters have to be escaped. Therefore, with this fix, bpftool correctly supports all valid two-character escape sequences (but still does not support characters that require multi-character escape sequences). Witout this fix, attempting to load a JSON file generated by bpftool using Python 3.10.6's default json.load() may fail with the error "Invalid \escape" if the file contains the invalid escaped single quote (\'). Fixes: b66e907cfee2 ("tools: bpftool: copy JSON writer from iproute2 repository") Signed-off-by: Luis Gerhorst Signed-off-by: Andrii Nakryiko Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20230227150853.16863-1-gerhorst@cs.fau.de commit 84c22fa83f9cb97061359f97d85f53a9ccde02c4 Author: Tiezhu Yang Date: Fri Feb 24 18:36:55 2023 +0800 selftests/bpf: Use __NR_prlimit64 instead of __NR_getrlimit in user_ringbuf test After commit 80d7da1cac62 ("asm-generic: Drop getrlimit and setrlimit syscalls from default list"), new architectures won't need to include getrlimit and setrlimit, they are superseded with prlimit64. In order to maintain compatibility for the new architectures, such as LoongArch which does not define __NR_getrlimit, it is better to use __NR_prlimit64 instead of __NR_getrlimit in user_ringbuf test to fix the following build error: TEST-OBJ [test_progs] user_ringbuf.test.o tools/testing/selftests/bpf/prog_tests/user_ringbuf.c: In function 'kick_kernel_cb': tools/testing/selftests/bpf/prog_tests/user_ringbuf.c:593:17: error: '__NR_getrlimit' undeclared (first use in this function) 593 | syscall(__NR_getrlimit); | ^~~~~~~~~~~~~~ tools/testing/selftests/bpf/prog_tests/user_ringbuf.c:593:17: note: each undeclared identifier is reported only once for each function it appears in make: *** [Makefile:573: tools/testing/selftests/bpf/user_ringbuf.test.o] Error 1 make: Leaving directory 'tools/testing/selftests/bpf' Signed-off-by: Tiezhu Yang Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1677235015-21717-4-git-send-email-yangtiezhu@loongson.cn commit 29c66ad1c3ad1698becf81182f73fb4bd50bceb2 Author: Tiezhu Yang Date: Fri Feb 24 18:36:53 2023 +0800 libbpf: Use struct user_pt_regs to define __PT_REGS_CAST() for LoongArch LoongArch provides struct user_pt_regs instead of struct pt_regs to userspace, use struct user_pt_regs to define __PT_REGS_CAST() to fix the following build error: CLNG-BPF [test_maps] loop1.bpf.o progs/loop1.c:22:9: error: incomplete definition of type 'struct pt_regs' m = PT_REGS_RC(ctx); ^~~~~~~~~~~~~~~ tools/testing/selftests/bpf/tools/include/bpf/bpf_tracing.h:493:41: note: expanded from macro 'PT_REGS_RC' #define PT_REGS_RC(x) (__PT_REGS_CAST(x)->__PT_RC_REG) ~~~~~~~~~~~~~~~~~^ tools/testing/selftests/bpf/tools/include/bpf/bpf_helper_defs.h:20:8: note: forward declaration of 'struct pt_regs' struct pt_regs; ^ 1 error generated. make: *** [Makefile:572: tools/testing/selftests/bpf/loop1.bpf.o] Error 1 make: Leaving directory 'tools/testing/selftests/bpf' Signed-off-by: Tiezhu Yang Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1677235015-21717-2-git-send-email-yangtiezhu@loongson.cn commit 5767dc9e2df70550552c856ebc4b8467767661f6 Author: Matt Roper Date: Tue Feb 21 12:18:36 2023 -0800 drm/i915/gen12: Update combo PHY init sequence The bspec was updated with a minor change to the 'DCC mode select' setting to be programmed during combo PHY initialization. v2: - Keep the opencoded rmw behavior instead of switching to intel_de_rmw(). We need to read from a _LN register, but write to the _GRP register to update all lanes. Bspec: 49291 Signed-off-by: Matt Roper Reviewed-by: Matt Atwood Link: https://patchwork.freedesktop.org/patch/msgid/20230221201836.2886794-1-matthew.d.roper@intel.com commit a8e47884f1906cd7440fafa056adc8817568e73e Author: Dom Cobley Date: Fri Jan 27 16:40:52 2023 +0100 drm/probe-helper: Cancel previous job before starting new one Currently we schedule a call to output_poll_execute from drm_kms_helper_poll_enable for 10s in future. Later we try to replace that in drm_helper_probe_single_connector_modes with a 0s schedule with delayed_event set. But as there is already a job in the queue this fails, and the immediate job we wanted with delayed_event set doesn't occur until 10s later. And that call acts as if connector state has changed, reprobing modes. This has a side effect of waking up a display that has been blanked. Make sure we cancel the old job before submitting the immediate one. Fixes: 162b6a57ac50 ("drm/probe-helper: don't lose hotplug event") Acked-by: Daniel Vetter Signed-off-by: Dom Cobley [Maxime: Switched to mod_delayed_work] Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20230127154052.452524-1-maxime@cerno.tech commit 1d5003d05f983eee28756896328e4949d9a97b7f Author: Hector Martin Date: Tue Feb 14 18:28:38 2023 +0900 wifi: brcmfmac: pcie: Add BCM4378B3 support BCM4378B3 is a new silicon revision of BCM4378 present on the Apple M2 13" MacBook Pro "kyushu". Its PCI revision number is 5. Signed-off-by: Hector Martin Reviewed-by: Julian Calaby Reviewed-by: Linus Walleij Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230214092838.17869-1-marcan@marcan.st commit 5b3ee9987f5856080509e62968f812961173d336 Author: Hector Martin Date: Tue Feb 14 18:24:23 2023 +0900 wifi: brcmfmac: common: Add support for external calibration blobs The calibration blob for a chip is normally stored in SROM and loaded internally by the firmware. However, Apple ARM64 platforms instead store it as part of platform configuration data, and provide it via the Apple Device Tree. We forward this into the Linux DT in the bootloader. Add support for taking this blob from the DT and loading it into the dongle. The loading mechanism is the same as used for the CLM and TxCap blobs. Reviewed-by: Linus Walleij Reviewed-by: Arend van Spriel Signed-off-by: Hector Martin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230214092423.15175-10-marcan@marcan.st commit 75102b7543ed87cf7d599a382e7340e572da6987 Author: Hector Martin Date: Tue Feb 14 18:24:22 2023 +0900 wifi: brcmfmac: pcie: Load and provide TxCap blobs These blobs are named .txcap_blob, and exist alongside the existing .clm_blob files. Use the existing firmware machinery to provide them to the core. Reviewed-by: Linus Walleij Reviewed-by: Arend van Spriel Signed-off-by: Hector Martin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230214092423.15175-9-marcan@marcan.st commit dd7e55401fec58a2d03e5fdcb0c6d20e8fbe450a Author: Hector Martin Date: Tue Feb 14 18:24:21 2023 +0900 wifi: brcmfmac: common: Add support for downloading TxCap blobs The TxCap blobs are additional data blobs used on Apple devices, and are uploaded analogously to CLM blobs. Add core support for doing this. Acked-by: Linus Walleij Reviewed-by: Arend van Spriel Signed-off-by: Hector Martin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230214092423.15175-8-marcan@marcan.st commit 117ace4014cce3fb78b40eb8028bb0f4fc37dd6f Author: Hector Martin Date: Tue Feb 14 18:24:20 2023 +0900 wifi: brcmfmac: pcie: Add IDs/properties for BCM4387 This chip is present on Apple M1 Pro/Max (t600x) platforms: * maldives (apple,j314s): MacBook Pro (14-inch, M1 Pro, 2021) * maldives (apple,j314c): MacBook Pro (14-inch, M1 Max, 2021) * madagascar (apple,j316s): MacBook Pro (16-inch, M1 Pro, 2021) * madagascar (apple,j316c): MacBook Pro (16-inch, M1 Max, 2021) Reviewed-by: Linus Walleij Reviewed-by: Arend van Spriel Signed-off-by: Hector Martin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230214092423.15175-7-marcan@marcan.st commit 89b89e52153fda2733562776c7c9d9d3ebf8dd6d Author: Hector Martin Date: Tue Feb 14 18:24:19 2023 +0900 wifi: brcmfmac: cfg80211: Pass the PMK in binary instead of hex Apparently the hex passphrase mechanism does not work on newer chips/firmware (e.g. BCM4387). It seems there was a simple way of passing it in binary all along, so use that and avoid the hexification. OpenBSD has been doing it like this from the beginning, so this should work on all chips. Also clear the structure before setting the PMK. This was leaking uninitialized stack contents to the device. Reviewed-by: Linus Walleij Reviewed-by: Arend van Spriel Signed-off-by: Hector Martin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230214092423.15175-6-marcan@marcan.st commit a96202acaea47fa8377088e0952bb63bd02a3bab Author: Hector Martin Date: Tue Feb 14 18:24:18 2023 +0900 wifi: brcmfmac: cfg80211: Add support for PMKID_V3 operations Add support for the new PMKID_V3 API, which allows performing PMKID mutations individually, instead of requiring the driver to keep track of the full list. This new API is required by at least BCM4387. Note that PMKID_V2 is not implemented yet. Reviewed-by: Linus Walleij Reviewed-by: Arend van Spriel Signed-off-by: Hector Martin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230214092423.15175-5-marcan@marcan.st commit d75ef1f81e42dfccfeb97952e2ab70376832cf7a Author: Hector Martin Date: Tue Feb 14 18:24:17 2023 +0900 wifi: brcmfmac: feature: Add support for setting feats based on WLC version The "wlc_ver" iovar returns information on the WLC and EPI versions. This can be used to determine whether the PMKID_V2 and _V3 features are supported. Reviewed-by: Linus Walleij Acked-by: Arend van Spriel Signed-off-by: Hector Martin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230214092423.15175-4-marcan@marcan.st commit 398ce273d6b16a57dee99e4054a2be37f0a958ed Author: Hector Martin Date: Tue Feb 14 18:24:16 2023 +0900 wifi: brcmfmac: cfg80211: Add support for scan params v2 This new API version is required for at least the BCM4387 firmware. Add support for it, with a fallback to the v1 API. Acked-by: Linus Walleij Reviewed-by: Arend van Spriel Signed-off-by: Hector Martin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230214092423.15175-3-marcan@marcan.st commit 098e0b105ce1047ad9984dc79287573e313b1232 Author: Hector Martin Date: Tue Feb 14 18:24:15 2023 +0900 wifi: brcmfmac: chip: Handle 1024-unit sizes for TCM blocks BCM4387 has trailing odd-sized blocks as part of TCM which have their size described as a multiple of 1024 instead of 8192. Handle this so we can compute the TCM size properly. Reviewed-by: Linus Walleij Reviewed-by: Arend van Spriel Signed-off-by: Hector Martin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230214092423.15175-2-marcan@marcan.st commit 3c7c07ca7ab144ef25402858078b27806322b752 Author: Hector Martin Date: Tue Feb 14 18:24:14 2023 +0900 wifi: brcmfmac: chip: Only disable D11 cores; handle an arbitrary number At least on BCM4387, the D11 cores are held in reset on cold startup and firmware expects to release reset itself. Just assert reset here and let firmware deassert it. Premature deassertion results in the firmware failing to initialize properly some of the time, with strange AXI bus errors. Also, BCM4387 has 3 cores, up from 2. The logic for handling that is in brcmf_chip_ai_resetcore(), but since we aren't using that any more, just handle it here. Reviewed-by: Linus Walleij Reviewed-by: Arend van Spriel Signed-off-by: Hector Martin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230214092423.15175-1-marcan@marcan.st commit ebf82988f844dd98e6b007cffcc5e95986056995 Author: Muna Sinada Date: Fri Feb 24 12:28:04 2023 +0200 wifi: ath11k: generate rx and tx mcs maps for supported HE mcs Generate rx and tx mcs maps in ath11k_mac_set_hemcsmap() and set them in supported mcs/nss for HE capabilities. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-00356-QCAHKSWPL_SILICONZ-1 Signed-off-by: Muna Sinada Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1666128501-12364-5-git-send-email-quic_msinada@quicinc.com commit 8077c1bbbc28e527fb29143c46f32c6a9d6cadf0 Author: Muna Sinada Date: Fri Feb 24 12:28:04 2023 +0200 wifi: ath11k: move HE MCS mapper to a separate function Move HE MCS mapper to a separate function and call new function in ath11k_mac_copy_he_cap(). Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-00356-QCAHKSWPL_SILICONZ-1 Signed-off-by: Muna Sinada Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1666128501-12364-4-git-send-email-quic_msinada@quicinc.com commit 38dfe775d0abf511341f37c1cb77b919a3ad410b Author: Muna Sinada Date: Fri Feb 24 12:28:04 2023 +0200 wifi: ath11k: push MU-MIMO params from hostapd to hardware In the previous behaviour only HE IE in management frames are changed regarding MU-MIMO configurations and not in hardware. Adding push of MU-MIMO configurations to the hardware as well. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-00356-QCAHKSWPL_SILICONZ-1 Co-developed-by: Anilkumar Kolli Signed-off-by: Anilkumar Kolli Signed-off-by: Muna Sinada Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1666128501-12364-3-git-send-email-quic_msinada@quicinc.com commit a96f10422e74cde27c100b321b127ec32ae75747 Author: Muna Sinada Date: Fri Feb 24 12:28:03 2023 +0200 wifi: ath11k: modify accessor macros to match index size HE PHY is only 11 bytes, therefore it should be using byte indexes instead of dword. Change corresponding macros to reflect this. Signed-off-by: Muna Sinada Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1666128501-12364-2-git-send-email-quic_msinada@quicinc.com commit 75c4a8154cb6c7239fb55d5550f481f6765fb83c Author: Fedor Pchelkin Date: Fri Feb 24 12:28:05 2023 +0200 wifi: ath6kl: reduce WARN to dev_dbg() in callback The warn is triggered on a known race condition, documented in the code above the test, that is correctly handled. Using WARN() hinders automated testing. Reducing severity. Fixes: de2070fc4aa7 ("ath6kl: Fix kernel panic on continuous driver load/unload") Reported-and-tested-by: syzbot+555908813b2ea35dae9a@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum Signed-off-by: Fedor Pchelkin Signed-off-by: Alexey Khoroshilov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230126182431.867984-1-pchelkin@ispras.ru commit ec52d77d077529f198fd874c550a26b9cc86a331 Author: John Keeping Date: Tue Jan 24 10:42:48 2023 +0000 wifi: brcmfmac: support CQM RSSI notification with older firmware Using the BCM4339 firmware from linux-firmware (version "BCM4339/2 wl0: Sep 5 2019 11:05:52 version 6.37.39.113 (r722271 CY)" from cypress/cyfmac4339-sdio.bin) the RSSI respose is only 4 bytes, which results in an error being logged. It seems that older devices send only the RSSI field and neither SNR nor noise is included. Handle this by accepting a 4 byte message and reading only the RSSI from it. Fixes: 7dd56ea45a66 ("brcmfmac: add support for CQM RSSI notifications") Signed-off-by: John Keeping Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230124104248.2917465-1-john@metanate.com commit 91918ce88d9fef408bb12c46a27c73d79b604c20 Author: Hector Martin Date: Tue Feb 14 17:00:34 2023 +0900 wifi: brcmfmac: pcie: Provide a buffer of random bytes to the device Newer Apple firmwares on chipsets without a hardware RNG require the host to provide a buffer of 256 random bytes to the device on initialization. This buffer is present immediately before NVRAM, suffixed by a footer containing a magic number and the buffer length. This won't affect chips/firmwares that do not use this feature, so do it unconditionally for all Apple platforms (those with an Apple OTP). Reviewed-by: Linus Walleij Signed-off-by: Hector Martin Reviewed-by: Julian Calaby Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230214080034.3828-3-marcan@marcan.st commit 0f485805d008aa56644f68179a7e6579fc1515e7 Author: Hector Martin Date: Tue Feb 14 17:00:33 2023 +0900 wifi: brcmfmac: acpi: Add support for fetching Apple ACPI properties On DT platforms, the module-instance and antenna-sku-info properties are passed in the DT. On ACPI platforms, module-instance is passed via the analogous Apple device property mechanism, while the antenna SKU info is instead obtained via an ACPI method that grabs it from non-volatile storage. Add support for this, to allow proper firmware selection on Apple platforms. Signed-off-by: Hector Martin Reviewed-by: Julian Calaby Acked-by: Linus Walleij Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230214080034.3828-2-marcan@marcan.st commit 67b7836d4458790f1261e31fe0ce3250989784f0 Author: Dmitry Osipenko Date: Mon Mar 21 03:35:41 2022 +0300 drm/shmem-helper: Switch to reservation lock Replace all drm-shmem locks with a GEM reservation lock. This makes locks consistent with dma-buf locking convention where importers are responsible for holding reservation lock for all operations performed over dma-bufs, preventing deadlock between dma-buf importers and exporters. Suggested-by: Daniel Vetter Acked-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/all/20230108210445.3948344-8-dmitry.osipenko@collabora.com/ commit 67fe7487fe8946f33009c7b5a7eafec535a7826b Author: Dmitry Osipenko Date: Thu May 5 02:06:00 2022 +0300 drm/shmem-helper: Don't use vmap_use_count for dma-bufs DMA-buf core has its own refcounting of vmaps, use it instead of drm-shmem counting. This change prepares drm-shmem for addition of memory shrinker support where drm-shmem will use a single dma-buf reservation lock for all operations performed over dma-bufs. Reviewed-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/all/20230108210445.3948344-7-dmitry.osipenko@collabora.com/ commit 3f6a1e22fae95a50a2e4815305931ed1da5c9a12 Author: Dmitry Osipenko Date: Wed Nov 16 23:56:33 2022 +0300 drm/shmem-helper: Switch to use drm_* debug helpers Ease debugging of a multi-GPU system by using drm_WARN_*() and drm_dbg_kms() helpers that print out DRM device name corresponding to shmem GEM. Reviewed-by: Thomas Zimmermann Suggested-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/all/20230108210445.3948344-6-dmitry.osipenko@collabora.com/ commit 3842d671d7556f33d5909d472954328201b8b530 Author: Dmitry Osipenko Date: Fri Nov 18 19:13:43 2022 +0300 drm/shmem-helper: Put booleans in the end of struct drm_gem_shmem_object Group all 1-bit boolean members of struct drm_gem_shmem_object in the end of the structure, allowing compiler to pack data better and making code to look more consistent. Reviewed-by: Thomas Zimmermann Suggested-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/all/20230108210445.3948344-5-dmitry.osipenko@collabora.com/ commit 7eabaa892d9c57ad9b2946f923d781e8a16f8e88 Author: Dmitry Osipenko Date: Wed Nov 16 17:07:50 2022 +0300 drm/gem: Add evict() callback to drm_gem_object_funcs Add new common evict() callback to drm_gem_object_funcs and corresponding drm_gem_object_evict() helper. This is a first step on a way to providing common GEM-shrinker API for DRM drivers. Reviewed-by: Thomas Zimmermann Suggested-by: Thomas Zimmermann Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/all/20230108210445.3948344-4-dmitry.osipenko@collabora.com/ commit 8ac752463390882a5e73d85b141b68d5c259652d Author: Xu Panda Date: Wed Dec 7 09:13:16 2022 +0800 drm/virtio: use strscpy() to instead of strncpy() The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Signed-off-by: Xu Panda Signed-off-by: Yang Yang Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/202212070913161959936@zte.com.cn commit c5a486af9df7a7180d0f19fd4b6c801da64a154e Author: Jani Nikula Date: Fri Feb 17 12:46:27 2023 +0200 drm/edid: parse Tiled Display Topology Data Block for DisplayID 2.0 Currently we only parse the Tiled Display Topology Data Block for DisplayID structure version 1.2, but not 2.0. The contents seem to be the same for both, so expand the parsing to structure version 2.0. Note that DisplayID spec version is not the same as DisplayID structure version; DisplayID 1.3 uses structure version 1.2, and DisplayID 2.0-2.1 use structure version 2.0. Lovely. Signed-off-by: Jani Nikula Reviewed-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20230217104627.1360015-1-jani.nikula@intel.com commit 217a8c63df30246f180760b1e1f3e57267efbb6a Author: Jani Nikula Date: Thu Feb 16 22:45:01 2023 +0200 drm/edid: update non-desktop use also from DisplayID Use the DisplayID 2.0 primary use case information to deduce whether this is a head-mounted display, and should not be used for desktop. Cc: Iaroslav Boliukin Cc: Dmitry Osipenko Signed-off-by: Jani Nikula Tested-by: Dmitry Osipenko # HTC VIVE Pro 2 Reviewed-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/de75b2edddd7d30216e4dd5699a064dc737688f5.1676580180.git.jani.nikula@intel.com commit b568e6bb49d49ef05fa3aa4bb294ae960e1d778a Author: Jani Nikula Date: Thu Feb 16 22:45:00 2023 +0200 drm/displayid: provide access to DisplayID version and primary use case The DisplayID structure version and primary use case are stored in the DisplayID Base Section. We should be checking them in a number of places when parsing the DisplayID blocks. Currently, we completely ignore the primary use case, and just look at the block tags without cross-checking against structure version. Store the version and primary use case in the DisplayID iterator, and provide accessors to them. In general, the information is needed when iterating the blocks, and this is a convenient place to both store and retrieve the information during parsing. Promote using accessors rather than users poking at the iterator directly. Cc: Iaroslav Boliukin Cc: Dmitry Osipenko Signed-off-by: Jani Nikula Tested-by: Dmitry Osipenko Reviewed-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/ad8a35c109f97ffe115e6b18e4a132b592f11089.1676580180.git.jani.nikula@intel.com commit 5631f6a0436ac30eecfb2e6fdcd0a517f90add8a Author: Jani Nikula Date: Thu Feb 16 22:44:59 2023 +0200 drm/displayid: return struct displayid_header from validate_displayid() Avoid figuring out the header pointer multiple times. Cc: Iaroslav Boliukin Cc: Dmitry Osipenko Signed-off-by: Jani Nikula Tested-by: Dmitry Osipenko Reviewed-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/e840c744d165608a41db5a5e2bd4b0205783c697.1676580180.git.jani.nikula@intel.com commit 5bacecc3c56131c31f18b23d366f2184328fd9cf Author: Jani Nikula Date: Thu Feb 16 22:44:58 2023 +0200 drm/displayid: add displayid_get_header() and check bounds better Add a helper to get a pointer to struct displayid_header. To be pedantic, add buffer overflow checks to not touch the base if that itself would overflow. Cc: Iaroslav Boliukin Cc: Dmitry Osipenko Signed-off-by: Jani Nikula Tested-by: Dmitry Osipenko Reviewed-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/4a03b3a5132642d3cdb6d4c2641422955a917292.1676580180.git.jani.nikula@intel.com commit c6a53c90e3be8b7e745a46c941631d0855648313 Author: Lucas De Marchi Date: Fri Feb 24 13:12:21 2023 -0800 drm/i915: Move MCR_REG define to i915_reg_defs.h Define MCR_REG() in the same header where i915_mcr_reg_t is defined, like i915_reg_t and _MMIO(). It's a more natural place for such a definition so it's not mixed with the registers for the platforms. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230224211221.1557268-1-lucas.demarchi@intel.com commit 68bfd65fb98d16239d14719a47cc1582510001de Merge: d0093aaefa35b 02d6a057c7bee Author: Martin KaFai Lau Date: Fri Feb 24 17:16:15 2023 -0800 Merge branch 'move SYS() macro to test_progs.h and run mptcp in a dedicated netns' Hangbin Liu says: ==================== As Martin suggested, let's move the SYS() macro to test_progs.h since a lot of programs are using it. After that, let's run mptcp in a dedicated netns to avoid user config influence. v3: fix fd redirect typo. Move SYS() macro into the test_progs.h v2: remove unneed close_cgroup_fd goto label. ==================== Signed-off-by: Martin KaFai Lau commit 02d6a057c7bee44902c843949de6bbd439e33092 Author: Hangbin Liu Date: Fri Feb 24 14:13:43 2023 +0800 selftests/bpf: run mptcp in a dedicated netns The current mptcp test is run in init netns. If the user or default system config disabled mptcp, the test will fail. Let's run the mptcp test in a dedicated netns to avoid none kernel default mptcp setting. Suggested-by: Martin KaFai Lau Signed-off-by: Hangbin Liu Acked-by: Matthieu Baerts Link: https://lore.kernel.org/r/20230224061343.506571-3-liuhangbin@gmail.com Signed-off-by: Martin KaFai Lau commit b61987d37cbee3c44e80304598c60b163553926b Author: Hangbin Liu Date: Fri Feb 24 14:13:42 2023 +0800 selftests/bpf: move SYS() macro into the test_progs.h A lot of tests defined SYS() macro to run system calls with goto label. Let's move this macro to test_progs.h and add configurable "goto_label" as the first arg. Suggested-by: Martin KaFai Lau Signed-off-by: Hangbin Liu Link: https://lore.kernel.org/r/20230224061343.506571-2-liuhangbin@gmail.com Signed-off-by: Martin KaFai Lau commit 1c388da529c8206818de6dd89b99ba21acc74f6b Author: Matt Roper Date: Thu Feb 23 17:20:09 2023 -0800 drm/i915/mtl: Add engine TLB invalidation MTL's primary GT can continue to use the same engine TLB invalidation programming as past Xe_HP-based platforms. However the media GT needs some special handling: * Invalidation registers on the media GT are singleton registers (unlike the primary GT where they are still MCR). * Since the GSC is now exposed as an engine, there's a new register to use for TLB invalidation. The offset is identical to the compute engine offset, but this is expected --- compute engines only exist on the primary GT while the GSC only exists on the media GT. * Although there's only a single GSC engine instance, it inexplicably uses bit 1 to request invalidations rather than bit 0. v2: - Add a 'regs == xelpmp_regs' condition to the GSC instance handling. If the registers change on a future platform, the GSC-specific handling is likely to change as well. (Andrzej) Cc: Tvrtko Ursulin Cc: Daniele Ceraolo Spurio Cc: Andrzej Hajda Signed-off-by: Matt Roper Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20230224012009.3594691-1-matthew.d.roper@intel.com commit 25c0e4062db43b790fbecf14d7cce6fc75fb3b26 Author: Maíra Canal Date: Thu Feb 9 09:44:48 2023 -0300 drm/v3d: Use drm_sched_job_add_syncobj_dependency() As v3d_job_add_deps() performs the same steps as drm_sched_job_add_syncobj_dependency(), replace the open-coded implementation in v3d in order to simply use the DRM function. Signed-off-by: Maíra Canal Reviewed-by: Melissa Wen Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230209124447.467867-6-mcanal@igalia.com commit 4636c4a5ea4258c34e44487798c83d5c79db4660 Author: Maíra Canal Date: Thu Feb 9 09:44:47 2023 -0300 drm/panfrost: Use drm_sched_job_add_syncobj_dependency() As panfrost_copy_in_sync() performs the same steps as drm_sched_job_add_syncobj_dependency(), replace the open-coded implementation in Panfrost in order to simply use the DRM function. Reviewed-by: Alyssa Rosenzweig Signed-off-by: Maíra Canal Reviewed-by: Steven Price Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230209124447.467867-5-mcanal@igalia.com commit c087bbb6d84e7a2e8dc834fe066d2a91360c0db6 Author: Maíra Canal Date: Thu Feb 9 09:44:44 2023 -0300 drm/sched: Create wrapper to add a syncobj dependency to job In order to add a syncobj's fence as a dependency to a job, it is necessary to call drm_syncobj_find_fence() to find the fence and then add the dependency with drm_sched_job_add_dependency(). So, wrap these steps in one single function, drm_sched_job_add_syncobj_dependency(). Reviewed-by: Christian König Reviewed-by: Luben Tuikov Signed-off-by: Maíra Canal Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20230209124447.467867-2-mcanal@igalia.com commit 0eb1173422f648a503a2ed1a8364f2d8bd7f690c Author: Rodrigo Vivi Date: Fri Feb 24 10:37:07 2023 -0500 drm/i915: Remove unused tmp assignment. These are left overs from the conversion towards intel_de_rmw. Fixes: aa80b2b12b89 ("drm/i915/display/panel: use intel_de_rmw if possible in panel related code") Cc: Andrzej Hajda Signed-off-by: Rodrigo Vivi Reviewed-by: Matt Roper Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20230224153707.813953-1-rodrigo.vivi@intel.com commit ba8ff971008cfaef6049df52a6058801202435d8 Author: Jonathan Cavitt Date: Thu Feb 23 10:39:54 2023 -0800 drm/i915/mtl: X-Tile support changes to client blits Refactor the supports_x_tiling and fast_blit_ok helper functions in the live client selftest to better reflect when XY_FAST_COPY_BLT supports X-tile and can be used. Bspec: 47982 Signed-off-by: Jonathan Cavitt Reviewed-by: Matt Roper Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20230223183954.1817632-1-jonathan.cavitt@intel.com commit da6198afb01df0dce47fde23b53183cc0009b6a2 Author: Matthew Auld Date: Tue Dec 20 11:27:36 2022 +0000 drm/i915/ttm: remove the virtualized start hack This was mostly needed to differentiate between mappable and non-mappable lmem, such that ttm would understand non-mappable -> mappable moves (or vice versa), and not just turn them into noops. We have since gained proper .intersects() and .compatible() hooks for the resource manager, which takes care of this for us. Signed-off-by: Matthew Auld Cc: Nirmoy Das Cc: Andrzej Hajda Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20221220112736.161642-1-matthew.auld@intel.com commit 957565a473a630a3d01932c7173860b33e7acdbd Author: Matthew Auld Date: Fri Jan 27 16:03:21 2023 +0000 drm/i915: probe lmem before the stolen portion At the very least, we have some tests that force the BAR size for testing purposes, which would result in different BAR size with stolen-lmem vs normal lmem, since the BAR is only resized as part of the normal lmem probing. Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Nirmoy Das Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20230127160321.374350-1-matthew.auld@intel.com commit d46746b8b13cbd377ffc733e465d25800459a31b Author: Ankit Nautiyal Date: Thu Feb 23 10:06:19 2023 +0530 drm/i915/dg2: Add HDMI pixel clock frequencies 267.30 and 319.89 MHz Add snps phy table values for HDMI pixel clocks 267.30 MHz and 319.89 MHz. Values are based on the Bspec algorithm for PLL programming for HDMI. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8008 Signed-off-by: Ankit Nautiyal Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20230223043619.3941382-1-ankit.k.nautiyal@intel.com commit cb42e8ede5b475c096e473b86c356b1158b4bc3b Author: Jouni Högander Date: Tue Feb 21 10:53:04 2023 +0200 drm/i915/psr: Use calculated io and fast wake lines Currently we are using hardcoded 7 for io and fast wake lines. According to Bspec io and fast wake times are both 42us for DISPLAY_VER >= 12 and 50us and 32us for older platforms. Calculate line counts for these and configure them into PSR2_CTL accordingly Use 45 us for the fast wake calculation as 42 seems to be too tight based on testing. Bspec: 49274, 4289 Cc: Mika Kahola Cc: José Roberto de Souza Fixes: 64cf40a125ff ("drm/i915/psr: Program default IO buffer Wake and Fast Wake") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7725 Signed-off-by: Jouni Högander Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20230221085304.3382297-1-jouni.hogander@intel.com commit 28013c35629647679e10cb1bbf36c3feec2af756 Author: Kalle Valo Date: Wed Feb 22 18:40:14 2023 +0200 wifi: ath12k: remove memset with byte count of 278528 Sparse warns: drivers/net/wireless/ath/ath12k/dp.c:1471:15: warning: memset with byte count of 278528 There's no need to use memset() here, instead call dma_alloc_coherent() with __GFP_ZERO. While at it, remove an extra line before the error handler. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230222164014.860-1-kvalo@kernel.org commit 4a51e66fe96dfde76894c4eb445ef1b14d312014 Author: Christophe JAILLET Date: Thu Feb 2 21:58:10 2023 +0100 wifi: wcn36xx: Slightly optimize PREPARE_HAL_BUF() In most (likely all) cases, INIT_HAL_MSG() is called before PREPARE_HAL_BUF(). In such cases calling memset() is useless because: msg_body.header.len = sizeof(msg_body) So, instead of writing twice the memory, we just have a sanity check to make sure that some potential trailing memory is zeroed. It even gives the opportunity to see that by itself and optimize it away. Signed-off-by: Christophe JAILLET Acked-by: Loic Poulain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/7d8ab7fee45222cdbaf80c507525f2d3941587c1.1675371372.git.christophe.jaillet@wanadoo.fr commit d5f7638eb5fed0eb12e45a127764c4111b11c50e Author: Andy Shevchenko Date: Mon Oct 24 05:34:14 2022 -0700 Input: matrix_keypad - replace header inclusions by forward declarations When the data structure is only referred by pointer, compiler may not need to see the contents of the data type. Thus, we may replace header inclusions by respective forward declarations. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220923184632.2157-2-andriy.shevchenko@linux.intel.com Signed-off-by: Dmitry Torokhov commit 9e03024ce27625e42d3a9a76af37f5369db652cd Author: Dmitry Torokhov Date: Thu Feb 23 22:11:21 2023 -0800 ARM: spitz: include header defining input event codes The board file for Sharp SL-Cxx00 Series of PDAs uses various KEY_* defines, but does not include the relevant header directly and instead relies on other headers to include it indirectly. With the upcoming cleanup of matrix_keypad.h this indirection is now broken and we should include the relevant header directly. Reported: Guenter Roeck Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/Y/U+3PZsbLw++SnG@google.com Signed-off-by: Dmitry Torokhov commit 0c3c99364361171f8cfeb8b66b1e6f4709919dc3 Author: Kun Liu Date: Tue Feb 21 16:39:51 2023 +0800 drm/amdgpu: added a sysfs interface for thermal throttling implement apu_thermal_cap r/w callback for vangogh Signed-off-by: Kun Liu Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit c3ed0e72c872901659ed0fef4b91eb6ab7dc6aad Author: Kun Liu Date: Tue Feb 21 16:31:18 2023 +0800 drm/amdgpu: added a sysfs interface for thermal throttling added a sysfs interface for thermal throttling, then userspace can get/update thermal limit Signed-off-by: Kun Liu Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 4f101d5710a84f334b05a96713000ce8dfd4d598 Author: Arthur Grillo Date: Fri Feb 17 15:14:09 2023 -0300 drm/amd/display: Remove unused local variables and function Remove a couple of local variables that are only set but never used, also remove an static utility function that is never used in consequence of the variable removal. This decrease the number of -Wunused-but-set-variable warnings. Acked-by: Christian König Signed-off-by: Arthur Grillo Signed-off-by: Alex Deucher commit 4d3ed6326449ddb1356544bf838024eb232dd315 Author: Arthur Grillo Date: Fri Feb 17 15:14:08 2023 -0300 drm/amd/display: Remove unused local variables Remove local variables that were just set but were never used. This decrease the number of -Wunused-but-set-variable warnings. Acked-by: Christian König Signed-off-by: Arthur Grillo Signed-off-by: Alex Deucher commit cb1b05287f3270e489a5169cb64083c291c6827d Author: Mark Hawrylak Date: Sun Feb 19 16:02:00 2023 +1100 drm/radeon: Fix eDP for single-display iMac11,2 Apple iMac11,2 (mid 2010) also with Radeon HD-4670 that has the same issue as iMac10,1 (late 2009) where the internal eDP panel stays dark on driver load. This patch treats iMac11,2 the same as iMac10,1, so the eDP panel stays active. Additional steps: Kernel boot parameter radeon.nomodeset=0 required to keep the eDP panel active. This patch is an extension of commit 564d8a2cf3ab ("drm/radeon: Fix eDP for single-display iMac10,1 (v2)") Link: https://lore.kernel.org/all/lsq.1507553064.833262317@decadent.org.uk/ Signed-off-by: Mark Hawrylak Signed-off-by: Alex Deucher commit 4fa01c6357d5f4ae80b1794c5ecb71c0c66cd528 Author: Thomas Weißschuh Date: Thu Feb 16 01:09:00 2023 +0000 drm/amdkfd: Make kobj_type structures constant Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definitions to prevent modification at runtime. Signed-off-by: Thomas Weißschuh Signed-off-by: Alex Deucher commit b2daaa9360610c584fbe8d7d5e8d1fdb99abc7ef Author: Thomas Weißschuh Date: Thu Feb 16 01:07:27 2023 +0000 drm/amdgpu: make kobj_type structures constant Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definitions to prevent modification at runtime. Reviewed-by: Christian König Signed-off-by: Thomas Weißschuh Signed-off-by: Alex Deucher commit 28d58468ad7d9630c83e4ab3dcc0b2953a276f7e Author: Jiapeng Chong Date: Fri Feb 17 15:44:49 2023 +0800 drm/amd/display: Modify mismatched function name No functional modification involved. drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_detection.c:1199: warning: expecting prototype for dc_link_detect_connection_type(). Prototype was for link_detect_connection_type() instead. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4103 Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit d24b77e444bef83155557ebf4c2b3c551f198926 Author: Hans de Goede Date: Wed Feb 15 12:38:33 2023 +0100 drm/amd/display: Pass proper parent for DM backlight device registration The parent for the backlight device should be the drm-connector object, not the PCI device. Userspace relies on this to be able to detect which backlight class device to use on hybrid gfx devices where there may be multiple native (raw) backlight devices registered. Specifically gnome-settings-daemon expects the parent device to have an "enabled" sysfs attribute (as drm_connector devices do) and tests that this returns "enabled" when read. This aligns the parent of the backlight device with i915, nouveau, radeon. Note that drivers/gpu/drm/amd/amdgpu/atombios_encoders.c also already uses the drm_connector as parent, only amdgpu_dm.c used the PCI device as parent before this change. Note this is marked as a RFC because I don't have hw to test, so this has only been compile tested! If someone can test this on actual hw which hits the changed code path that would be great. Link: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/issues/730 Signed-off-by: Hans de Goede Signed-off-by: Alex Deucher commit 82ea22256b9c1fe3f5a089733969f6539d92d9f0 Author: Ville Syrjälä Date: Mon Feb 20 17:17:31 2023 +0200 drm/i915: Drop useless intel_dp_has_audio() argument intel_dp_has_audio() has no need for the crtc_state, so don't pass it in. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230220151731.6852-2-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit 518b761a7b0e2bb2fac2518f041c71b461adf761 Author: Ville Syrjälä Date: Mon Feb 20 17:17:30 2023 +0200 drm/i915: Fix audio ELD handling for DP MST I forgot to call intel_audio_compute_config() on DP MST, which means ELD doesn't get populated and passed to the audio driver. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8097 Fixes: 5d986635e296 ("drm/i915/audio: Precompute the ELD") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230220151731.6852-1-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit d0093aaefa35b80990c05a424dad2396ba4549d7 Author: Tejun Heo Date: Wed Feb 22 15:29:58 2023 -1000 selftests/bpf: Add a test case for bpf_cgroup_from_id() Add a test case for bpf_cgroup_from_id. Signed-off-by: Tejun Heo Link: https://lore.kernel.org/r/Y/bBlt+tPozcQgws@slm.duckdns.org Signed-off-by: Alexei Starovoitov commit 332ea1f697be148bd5e66475d82b5ecc5084da65 Author: Tejun Heo Date: Wed Feb 22 15:29:12 2023 -1000 bpf: Add bpf_cgroup_from_id() kfunc cgroup ID is an userspace-visible 64bit value uniquely identifying a given cgroup. As the IDs are used widely, it's useful to be able to look up the matching cgroups. Add bpf_cgroup_from_id(). v2: Separate out selftest into its own patch as suggested by Alexei. Signed-off-by: Tejun Heo Link: https://lore.kernel.org/r/Y/bBaG96t0/gQl9/@slm.duckdns.org Signed-off-by: Alexei Starovoitov commit e7e12f6ec8bfb040e28ea7287c907c19477149e6 Author: Ville Syrjälä Date: Wed Jan 25 20:52:34 2023 +0200 drm/i915: Mask page table errors on gen2/3 with FBC FBC on gen2/3 seems to trigger page table errors. No visual artifacts are visible, and essentially the same FBC code works on gen4 so these seem entirely spurious. There are also hints in gen3 bspec indicating that certain bits in PGTBL_ER are just not wired up correctly in the hardware. Ideally we'd want to mask out only the bogus bits, but sadly there is no mask for PGTBL_ER, and instead we are forced to mask out all page table errors via EMR :( Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230125185234.21599-6-ville.syrjala@linux.intel.com Reviewed-by: Vinod Govindapillai commit 3687ce7517a1e81141191bf12e3e86840d6b9ed9 Author: Ville Syrjälä Date: Wed Jan 25 20:52:33 2023 +0200 drm/i915: Extract {i9xx,i965)_error_mask() Pull the EMR calculation into small helpers. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230125185234.21599-5-ville.syrjala@linux.intel.com Reviewed-by: Vinod Govindapillai commit d1e8959203f21aa577f2fef531109c9cf872d4b1 Author: Ville Syrjälä Date: Wed Jan 25 20:52:32 2023 +0200 drm/i915: Dump PGTBL_ER on gen2/3/4 error interrupt PGTBL_ER contains the individual reasons for the page table error interrupt. Dump it out. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230125185234.21599-4-ville.syrjala@linux.intel.com Reviewed-by: Vinod Govindapillai commit 839259b8afbb78bcd6d0b698e82cd4578a505ba4 Author: Ville Syrjälä Date: Wed Jan 25 20:52:31 2023 +0200 drm/i915: Undo rmw damage to gen3 error interrupt handler The gen2/gen3 irq code is supposed to be identical apart from the 32bit vs. 16bit access width. The recent change to intel_de_rmw() ruined that symmetry. Restore it to avoid needless mental gymnastics when comparing the two codepaths. And while at it remove the extra eir!=0 check that somehow ended up in the gen2 codepath only. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230125185234.21599-3-ville.syrjala@linux.intel.com Reviewed-by: Vinod Govindapillai commit 66560f33059ebe606cad7aef9c298a19d4f9e998 Author: Ville Syrjälä Date: Wed Jan 25 20:52:30 2023 +0200 drm/i915: Mark FIFO underrun disabled earlier At least on some platforms (tested on ctg) the way vgacon does screen blanking seems to flag constant FIFO underruns, which means we have to be prepared for them while the driver is loading. Currently there is a time window between drm_crtc_init() and intel_sanitize_fifo_underrun_reporting() during which FIFO underrun reporting is in fact marked as enabled. Thus we may end up mistakenly detecting these bogus underruns during driver init. Close the race by marking FIFO underrun reporting as disabled prior to even registering the crtc. intel_sanitize_fifo_underrun_reporting()/etc. will re-enable it later if needed. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230125185234.21599-2-ville.syrjala@linux.intel.com Reviewed-by: Vinod Govindapillai commit 5eba7426050755c96d4b9561432b18ca000a4fd4 Author: Ville Syrjälä Date: Wed Feb 22 17:14:54 2023 +0200 drm/i915/audio: Track audio state per-transcoder The audio logic lives in the transcoder rather than the pipe, so start tracking it like that. This is only really important for bigjoiner cases where tracking by pipe doesn't work at all since intel_audio_codec_{enable,disable}() won't even be called for the slave pipe. This means the state checker won't find the ELD for the slave pipe and gets upset. The PD->has_audio readout does currently work since that gets read out from the same transcoder for both pipes. For other cases this doesn't actually matter since it's only the normal pipe transcoders that are audio capable, whereas the more special transcoders (EDP/DSI) are not. v2: Fix kernel docs Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230222151454.24888-1-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8222 commit 95d39a0c64aa529adbff1bdafd391e83ad587602 Author: Matthew Auld Date: Wed Feb 8 14:53:19 2023 +0000 drm/radeon: handle NULL bo->resource in move callback The ttm bo now initially has NULL bo->resource, and leaves the driver the handle that. However it looks like we forgot to handle that for radeon. It looks like this will just null-ptr-deref in radeon_bo_move(), if bo->resource is NULL. Fix this by calling move_null(). Fixes: 180253782038 ("drm/ttm: stop allocating dummy resources during BO creation") Signed-off-by: Matthew Auld Cc: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230208145319.397235-4-matthew.auld@intel.com Reviewed-by: Christian König Signed-off-by: Christian König commit b129ff30acea495b1455cf8d6e1d86fdb87d22d4 Author: Matthew Auld Date: Wed Feb 8 14:53:17 2023 +0000 drm/qxl: handle NULL bo->resource in move callback The ttm bo now initially has NULL bo->resource, and leaves the driver the handle that. However it looks like we forgot to handle that for qxl. It looks like this will just null-ptr-deref in qxl_bo_move(), if bo->resource is NULL. Fix this by calling move_null() if the new resource is TTM_PL_SYSTEM, otherwise do the multi-hop sequence to ensure can safely call into ttm_bo_move_memcpy(), since it might also need to clear the memory. This should give the same behaviour as before. Fixes: 180253782038 ("drm/ttm: stop allocating dummy resources during BO creation") Signed-off-by: Matthew Auld Cc: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230208145319.397235-2-matthew.auld@intel.com Acked-by: Christian König Signed-off-by: Christian König commit c604d31950d10db45267bbcb9ce8f1dbc2bfa74e Author: Matthew Auld Date: Wed Feb 8 14:53:16 2023 +0000 drm/gem-vram: handle NULL bo->resource in move callback The ttm BO now initially has NULL bo->resource, and leaves the driver the handle that. However it looks like we forgot to handle that for ttm_bo_move_memcpy() users, like with vram-gem, since it just silently returns zero. This seems to then trigger warnings like: WARNING: CPU: 0 PID: 1 at drivers/gpu/drm/drm_gem_vram_helper.c:255 drm_gem_vram_offset (??:?) Fix this by calling move_null() if the new resource is TTM_PL_SYSTEM, otherwise do the multi-hop sequence to ensure can safely call into ttm_bo_move_memcpy(), since it might also need to clear the memory. This should give the same behaviour as before. While we are here let's also treat calling ttm_bo_move_memcpy() with NULL bo->resource as programmer error, where expectation is that upper layers should now handle it. Fixes: 180253782038 ("drm/ttm: stop allocating dummy resources during BO creation") Signed-off-by: Matthew Auld Cc: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230208145319.397235-1-matthew.auld@intel.com Acked-by: Christian König Signed-off-by: Christian König commit 746ce767128598711a00d8df5713d4c3b3d9e9a7 Author: Dave Thaler Date: Mon Feb 20 22:37:42 2023 +0000 bpf, docs: Add explanation of endianness Document the discussion from the email thread on the IETF bpf list, where it was explained that the raw format varies by endianness of the processor. Signed-off-by: Dave Thaler Acked-by: David Vernet Link: https://lore.kernel.org/r/20230220223742.1347-1-dthaler1968@googlemail.com Signed-off-by: Alexei Starovoitov commit 9fa02892857ae2b3b699630e5ede28f72106e7e7 Author: Stanislav Fomichev Date: Tue Feb 21 10:05:18 2023 -0800 selftests/bpf: Fix BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL for empty flow label Kernel's flow dissector continues to parse the packet when the (optional) IPv6 flow label is empty even when instructed to stop (via BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL). Do the same in our reference BPF reimplementation. Signed-off-by: Stanislav Fomichev Acked-by: Willem de Bruijn Link: https://lore.kernel.org/r/20230221180518.2139026-1-sdf@google.com Signed-off-by: Alexei Starovoitov commit d40c3847b485acc3522b62b020f77dcd38ca357f Author: Pu Lehui Date: Tue Feb 21 22:06:56 2023 +0800 riscv, bpf: Add kfunc support for RV64 This patch adds kernel function call support for RV64. Since the offset from RV64 kernel and module functions to bpf programs is almost within the range of s32, the current infrastructure of RV64 is already sufficient for kfunc, so let's turn it on. Suggested-by: Björn Töpel Signed-off-by: Pu Lehui Acked-by: Björn Töpel Link: https://lore.kernel.org/r/20230221140656.3480496-1-pulehui@huaweicloud.com Signed-off-by: Alexei Starovoitov commit df2ccc180a2e6f6e4343ebee99dcfab4f8af2816 Author: Ilya Leoshkevich Date: Mon Feb 20 17:37:56 2023 +0100 bpf: Check for helper calls in check_subprogs() The condition src_reg != BPF_PSEUDO_CALL && imm == BPF_FUNC_tail_call may be satisfied by a kfunc call. This would lead to unnecessarily setting has_tail_call. Use src_reg == 0 instead. Signed-off-by: Ilya Leoshkevich Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20230220163756.753713-1-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit bb035ef0cc91e115faa80187ac8886a7f1914d06 Author: Hengqi Chen Date: Sat Feb 18 10:53:17 2023 +0000 LoongArch: BPF: Support mixing bpf2bpf and tailcalls The current implementation already allow such mixing. Let's enable it in JIT. Signed-off-by: Hengqi Chen Link: https://lore.kernel.org/r/20230218105317.4139666-1-hengqi.chen@gmail.com Signed-off-by: Alexei Starovoitov commit b539a287baaa8501b3af4f7f99aba3c0b1d822f8 Author: Florent Revest Date: Fri Feb 17 16:18:32 2023 +0100 selftests/bpf: Fix cross compilation with CLANG_CROSS_FLAGS I cross-compile my BPF selftests with the following command: CLANG_CROSS_FLAGS="--target=aarch64-linux-gnu --sysroot=/sysroot/" \ make LLVM=1 CC=clang CROSS_COMPILE=aarch64-linux-gnu- SRCARCH=arm64 (Note the use of CLANG_CROSS_FLAGS to specify a custom sysroot instead of letting clang use gcc's default sysroot) However, CLANG_CROSS_FLAGS gets propagated to host tools builds (libbpf and bpftool) and because they reference it directly in their Makefiles, they end up cross-compiling host objects which results in linking errors. This patch ensures that CLANG_CROSS_FLAGS is reset if CROSS_COMPILE isn't set (for example when reaching a BPF host tool build). Signed-off-by: Florent Revest Link: https://lore.kernel.org/r/20230217151832.27784-1-revest@chromium.org Signed-off-by: Alexei Starovoitov commit 1f265d2aea0dff1f2f9ecd41f545d601869462c5 Author: Tiezhu Yang Date: Thu Feb 16 15:51:01 2023 +0800 selftests/bpf: Remove not used headers The following three uapi headers: tools/arch/arm64/include/uapi/asm/bpf_perf_event.h tools/arch/s390/include/uapi/asm/bpf_perf_event.h tools/arch/s390/include/uapi/asm/ptrace.h were introduced in commit 618e165b2a8e ("selftests/bpf: sync kernel headers and introduce arch support in Makefile"), they are not used any more after commit 720f228e8d31 ("bpf: fix broken BPF selftest build"), so remove them. Signed-off-by: Tiezhu Yang Link: https://lore.kernel.org/r/1676533861-27508-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Alexei Starovoitov commit 5d5de3a431d87ac51d43da8d796891d014975ab7 Author: Hou Tao Date: Thu Feb 16 10:48:21 2023 +0800 bpf: Only allocate one bpf_mem_cache for bpf_cpumask_ma The size of bpf_cpumask is fixed, so there is no need to allocate many bpf_mem_caches for bpf_cpumask_ma, just one bpf_mem_cache is enough. Also add comments for bpf_mem_alloc_init() in bpf_mem_alloc.h to prevent future miuse. Signed-off-by: Hou Tao Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20230216024821.2202916-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit dbd8d22863e83ee2834642e4cfd3bdacb8a1c975 Author: Kumar Kartikeya Dwivedi Date: Tue Feb 21 21:06:45 2023 +0100 bpf: Wrap register invalidation with a helper Typically, verifier should use env->allow_ptr_leaks when invaliding registers for users that don't have CAP_PERFMON or CAP_SYS_ADMIN to avoid leaking the pointer value. This is similar in spirit to c67cae551f0d ("bpf: Tighten ptr_to_btf_id checks."). In a lot of the existing checks, we know the capabilities are present, hence we don't do the check. Instead of being inconsistent in the application of the check, wrap the action of invalidating a register into a helper named 'mark_invalid_reg' and use it in a uniform fashion to replace open coded invalidation operations, so that the check is always made regardless of the call site and we don't have to remember whether it needs to be done or not for each case. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230221200646.2500777-7-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit da03e43a8c500fcfb11ac5eeb03c1b4a9c1dd958 Author: Kumar Kartikeya Dwivedi Date: Tue Feb 21 21:06:44 2023 +0100 bpf: Fix check_reg_type for PTR_TO_BTF_ID The current code does type matching for the case where reg->type is PTR_TO_BTF_ID or has the PTR_TRUSTED flag. However, this only needs to occur for non-MEM_ALLOC and non-MEM_PERCPU cases, but will include both as per the current code. The MEM_ALLOC case with or without PTR_TRUSTED needs to be handled specially by the code for type_is_alloc case, while MEM_PERCPU case must be ignored. Hence, to restore correct behavior and for clarity, explicitly list out the handled PTR_TO_BTF_ID types which should be handled for each case using a switch statement. Helpers currently only take: PTR_TO_BTF_ID PTR_TO_BTF_ID | PTR_TRUSTED PTR_TO_BTF_ID | MEM_RCU PTR_TO_BTF_ID | MEM_ALLOC PTR_TO_BTF_ID | MEM_PERCPU PTR_TO_BTF_ID | MEM_PERCPU | PTR_TRUSTED This fix was also described (for the MEM_ALLOC case) in [0]. [0]: https://lore.kernel.org/bpf/20221121160657.h6z7xuvedybp5y7s@apollo Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230221200646.2500777-6-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit 521d3c0a1730c29c96870919a7a115577e17f8c7 Author: Kumar Kartikeya Dwivedi Date: Tue Feb 21 21:06:43 2023 +0100 bpf: Remove unused MEM_ALLOC | PTR_TRUSTED checks The plan is to supposedly tag everything with PTR_TRUSTED eventually, however those changes should bring in their respective code, instead of leaving it around right now. It is arguable whether PTR_TRUSTED is required for all types, when it's only use case is making PTR_TO_BTF_ID a bit stronger, while all other types are trusted by default. Hence, just drop the two instances which do not occur in the verifier for now to avoid reader confusion. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230221200646.2500777-5-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit 0a09a2f933c73dc76ab0b72da6855f44342a8903 Author: Kumar Kartikeya Dwivedi Date: Tue Feb 21 21:06:42 2023 +0100 bpf: Annotate data races in bpf_local_storage There are a few cases where hlist_node is checked to be unhashed without holding the lock protecting its modification. In this case, one must use hlist_unhashed_lockless to avoid load tearing and KCSAN reports. Fix this by using lockless variant in places not protected by the lock. Since this is not prompted by any actual KCSAN reports but only from code review, I have not included a fixes tag. Cc: Martin KaFai Lau Cc: KP Singh Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20230221200646.2500777-4-memxor@gmail.com Signed-off-by: Alexei Starovoitov commit 0d1f7ff19d4f8a6da5a6b60d2afd1d34b5d5ebfc Author: Zong-Zhe Yang Date: Mon Feb 20 15:02:02 2023 +0800 wifi: rtw89: refine FW feature judgement on packet drop The newer chips use the newer firmware branches, e.g. v027, v029. And, those firmware branches are supposed to support packet drop when they are just branched out. The initial firmware branch used by each chip is as below. * 8852A: v009 * 8852C: v027 * 8852B: v027 So, only 8852A may use firmware which doesn't support packet drop at runtime. To save trivial positive listing in firmware feature table, we change to reverse judgment. Besides, rtw89_mac_ptk_drop_by_band_and_wait() missed to check firmware feature before calling rtw89_fw_h2c_pkt_drop(). We also fix it. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230220070202.29868-7-pkshih@realtek.com commit 357277e1afdae0f56d08846e818579f5a020709d Author: Ping-Ke Shih Date: Mon Feb 20 15:02:01 2023 +0800 wifi: rtw89: 8852b: enable hw_scan support This enables hw_scan for 8852b after firmware version 0.29.29.0. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230220070202.29868-6-pkshih@realtek.com commit 4f24d7aa575a3c01192faa7f4fb6a91c54f4ef47 Author: Po-Hao Huang Date: Mon Feb 20 15:02:00 2023 +0800 wifi: rtw89: 8852b: add channel encoding for hw_scan To obtain correct packet frequency for hw_scan, 52b needs to decode the channel index obtained from hardware. Change the driver related set channel part as well to make driver/firmware compatible. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230220070202.29868-5-pkshih@realtek.com commit bb9040b3ff970529ceaa20b064c113d5ffd5520f Author: Po-Hao Huang Date: Mon Feb 20 15:01:59 2023 +0800 wifi: rtw89: adjust channel encoding to common function Since the range of channel table is identical among ICs. Make channel encode/decode function common and not IC dependent. So all ICs with matching firmware that needs this kind of coding can use it directly. This patch doesn't change logic at all. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230220070202.29868-4-pkshih@realtek.com commit 31c416e69dbf416583d0d8245d91e7e82b7846b1 Author: Zong-Zhe Yang Date: Mon Feb 20 15:01:58 2023 +0800 wifi: rtw89: fw: configure CRASH_TRIGGER feature for 8852B RTL8852B firmware supports CRASH_TRIGGER feature from v0.29.29.0. After this is configured, debugfs fw_crash can support type 1 on RTL8852B to trigger firmware crash and verify L2 recovery through simulation. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230220070202.29868-3-pkshih@realtek.com commit aa4e055945462e645224795e174c25c82f6002ac Author: Chin-Yen Lee Date: Mon Feb 20 15:01:57 2023 +0800 wifi: rtw89: add tx_wake notify for 8852B 8852B has the same issue: management frames get stuck when wifi chip enters low ps mode, so we alse add notify wake function to trigger wifi chip wake before forwarding management frames. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230220070202.29868-2-pkshih@realtek.com commit ad0a677bce20c7fa2e8af3fd7f23c0686018202b Author: Martin Blumenstingl Date: Sat Feb 18 16:29:44 2023 +0100 wifi: rtw88: rtw8822c: Implement RTL8822CS (SDIO) efuse parsing The efuse of the SDIO RTL8822CS chip has only one known member: the mac address is at offset 0x16a. Add a struct rtw8822cs_efuse describing this and use it for copying the mac address when the SDIO bus is used. Signed-off-by: Martin Blumenstingl Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230218152944.48842-6-martin.blumenstingl@googlemail.com commit 9e688784b8a13515ee186d0ee1cfab12b6d05241 Author: Martin Blumenstingl Date: Sat Feb 18 16:29:43 2023 +0100 wifi: rtw88: rtw8822b: Implement RTL8822BS (SDIO) efuse parsing The efuse of the SDIO RTL8822BS chip has only one known member: the mac address is at offset 0x11a. Add a struct rtw8822bs_efuse describing this and use it for copying the mac address when the SDIO bus is used. Signed-off-by: Martin Blumenstingl Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230218152944.48842-5-martin.blumenstingl@googlemail.com commit 64e9d564653566812dfade36d20f1794407e6ca1 Author: Martin Blumenstingl Date: Sat Feb 18 16:29:42 2023 +0100 wifi: rtw88: rtw8821c: Implement RTL8821CS (SDIO) efuse parsing The efuse of the SDIO RTL8821CS chip has only one known member: the mac address is at offset 0x11a. Add a struct rtw8821cs_efuse describing this and use it for copying the mac address when the SDIO bus is used. Signed-off-by: Martin Blumenstingl Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230218152944.48842-4-martin.blumenstingl@googlemail.com commit 8599ea40582d49afe437badde76e31bd7429c607 Author: Martin Blumenstingl Date: Sat Feb 18 16:29:41 2023 +0100 wifi: rtw88: mac: Add SDIO HCI support in the TX/page table setup txdma_queue_mapping() and priority_queue_cfg() can use the first entry of each chip's rqpn_table and page_table. Add this mapping so data transmission is possible on SDIO based chipsets. Signed-off-by: Martin Blumenstingl Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230218152944.48842-3-martin.blumenstingl@googlemail.com commit 96c79da2e4d1a25e73916c656fe4ccf7fc8176ae Author: Martin Blumenstingl Date: Sat Feb 18 16:29:40 2023 +0100 wifi: rtw88: mac: Add support for the SDIO HCI in rtw_pwr_seq_parser() rtw_pwr_seq_parser() needs to know about the HCI bus interface mask for the SDIO bus so it can parse the chip state change sequences. Signed-off-by: Martin Blumenstingl Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230218152944.48842-2-martin.blumenstingl@googlemail.com commit b9b1e4fe2957f361c86e288ecf373dc7895cf7c7 Author: Bitterblue Smith Date: Fri Feb 17 20:49:12 2023 +0200 wifi: rtl8xxxu: Remove always true condition in rtl8xxxu_print_chipinfo Fix a new smatch warning: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:1580 rtl8xxxu_print_chipinfo() warn: always true condition '(priv->chip_cut <= 15) => (0-15 <= 15)' Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202302140753.71IgU77A-lkp@intel.com/ Fixes: 7b0ac469e331 ("wifi: rtl8xxxu: Recognise all possible chip cuts") Signed-off-by: Bitterblue Smith Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/68eff98b-a022-5a00-f330-adf623a35772@gmail.com commit c6aa9a9c47252ac7b07ed6d10459027e2f2a2de0 Author: Po-Hao Huang Date: Fri Feb 17 20:00:07 2023 +0800 wifi: rtw89: add RNR support for 6 GHz scan Since 6 GHz band has around 60 channels and more strict rules for active probing. Reduced neighbor report can be used to reduce the channels we scan and get specific target BSS info to probe for. Declare flag WIPHY_FLAG_SPLIT_SCAN_6GHZ so the scan request could be divided into two portions: legacy bands and 6 GHz bands. So RNR information from legacy bands could later be used when 6 GHz scan. When the scan flag NL80211_SCAN_FLAG_COLOCATED_6GHZ is set, cfg80211 will pass down a reduced channel set which contains PSCs and non-PSC with RNR info received in the 2 GHz/5 GHz band. This reduces the scan duration by allowing us to only scan for channels in which APs are currently operating. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230217120007.8835-1-pkshih@realtek.com commit db5e4b3645534bc8f8d6c24537e9564a62073ac8 Author: Jiapeng Chong Date: Fri Feb 17 17:25:29 2023 +0800 wifi: rtlwifi: rtl8192de: Remove the unused variable bcnfunc_enable Variable bcnfunc_enable is not effectively used, so delete it. drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c:1050:5: warning: variable 'bcnfunc_enable' set but not used. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4110 Signed-off-by: Jiapeng Chong Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230217092529.105899-1-jiapeng.chong@linux.alibaba.com commit 398eb19415ebb01ccc8e5bb75ff04cb760b01e05 Author: Ping-Ke Shih Date: Thu Feb 16 08:46:54 2023 +0800 wifi: rtl8xxxu: 8188e: parse single one element of RA report for station mode Intentionally parsing single one element of RA report by breaking loop causes a smatch warning: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188e.c:1678 rtl8188e_handle_ra_tx_report2() warn: ignoring unreachable code. With existing comments, it intends to process single one element for station mode, but it will parse more elements in AP mode if it's implemented. Implement program logic according to existing comment to avoid smatch warning, and also be usable for both AP and stations modes. Compile test only. Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202302142135.LCqUTVGY-lkp@intel.com/ Cc: Bitterblue Smith Signed-off-by: Ping-Ke Shih Tested-by: Bitterblue Smith Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230216004654.4642-1-pkshih@realtek.com commit 015bf4df8ea67080668ac8314e692076dea1ce6d Author: Christophe JAILLET Date: Wed Feb 15 13:34:37 2023 +0100 wifi: wfx: Remove some dead code wait_for_completion_timeout() can not return a <0 value. So simplify the logic and remove dead code. -ERESTARTSYS can not be returned by do_wait_for_common() for tasks with TASK_UNINTERRUPTIBLE, which is the case for wait_for_completion_timeout() Signed-off-by: Christophe JAILLET Reviewed-by: Jérôme Pouiller Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/809c4a645c8d1306c0d256345515865c40ec731c.1676464422.git.christophe.jaillet@wanadoo.fr commit 59e6ded57cc1b3b5117cef66dabe6d7977208ba0 Author: Lu jicong Date: Tue Feb 14 06:36:02 2023 +0000 wifi: rtlwifi: rtl8192ce: fix dealing empty EEPROM values On OpenWRT platform, RTL8192CE could be soldered on board, but not standard PCI module. In this case, some EEPROM values aren't programmed and left 0xff. Load default values when the EEPROM values are empty to avoid problems. Signed-off-by: Lu jicong Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230214063602.2257263-1-jiconglu58@gmail.com commit 60b7d62ba8cdbd073997bff0f1cdae8d844002c0 Author: Christian Marangi Date: Thu Feb 9 23:26:22 2023 +0100 wifi: ath11k: fix SAC bug on peer addition with sta band migration Fix sleep in atomic context warning detected by Smatch static checker analyzer. Following the locking pattern for peer_rhash_add lock tbl_mtx_lock mutex always even if sta is not transitioning to another band. This is peer_add function and a more secure locking should not cause performance regression. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1 Fixes: d673cb6fe6c0 ("wifi: ath11k: fix peer addition/deletion error on sta band migration") Reported-by: Dan Carpenter Signed-off-by: Christian Marangi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230209222622.1751-1-ansuelsmth@gmail.com commit 7c4c511f74ba65a18f0beeb9b2fc0e34f28ee79d Author: Jiapeng Chong Date: Tue Feb 7 13:24:10 2023 +0800 wifi: ath10k: Remove redundant assignment to changed_flags Variable changed_flags is assigned, but is not effectively used, so delete it. drivers/net/wireless/ath/ath10k/mac.c:6024:22: warning: parameter 'changed_flags' set but not used. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3963 Signed-off-by: Jiapeng Chong Reviewed-by: Simon Horman Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230207052410.26337-1-jiapeng.chong@linux.alibaba.com commit 8c68fe00344c01bfba95b9f978af0aa236a821f7 Author: Abhishek Kumar Date: Fri Feb 3 00:01:40 2023 +0000 wifi: ath10k: snoc: enable threaded napi on WCN3990 NAPI poll can be done in threaded context along with soft irq context. Threaded context can be scheduled efficiently, thus creating less of bottleneck during Rx processing. This patch is to enable threaded NAPI on ath10k driver. Based on testing, it was observed that on WCN3990, the CPU0 reaches 100% utilization when napi runs in softirq context. At the same time the other CPUs are at low consumption percentage. This does not allow device to reach its maximum throughput potential. After enabling threaded napi, CPU load is balanced across all CPUs and following improvments were observed: - UDP_RX increase by ~22-25% - TCP_RX increase by ~15% Here are some of the additional raw data with and without threaded napi: ================================================== udp_rx(Without threaded NAPI) 435.98+-5.16 : Channel 44 439.06+-0.66 : Channel 157 udp_rx(With threaded NAPI) 509.73+-41.03 : Channel 44 549.97+-7.62 : Channel 157 =================================================== udp_tx(Without threaded NAPI) 461.31+-0.69 : Channel 44 461.46+-0.78 : Channel 157 udp_tx(With threaded NAPI) 459.20+-0.77 : Channel 44 459.78+-1.08 : Channel 157 =================================================== tcp_rx(Without threaded NAPI) 472.63+-2.35 : Channel 44 469.29+-6.31 : Channel 157 tcp_rx(With threaded NAPI) 498.49+-2.44 : Channel 44 541.14+-40.65 : Channel 157 =================================================== tcp_tx(Without threaded NAPI) 317.34+-2.37 : Channel 44 317.01+-2.56 : Channel 157 tcp_tx(With threaded NAPI) 371.34+-2.36 : Channel 44 376.95+-9.40 : Channel 157 =================================================== Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.2.2-00696-QCAHLSWMTPL-1 Signed-off-by: Abhishek Kumar Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230203000116.v2.1.I5bb9c164a2d2025655dee810b983e01ecd81c14e@changeid commit 4c856ee12df85aabd437c3836ed9f68d94268358 Author: Dan Carpenter Date: Mon Feb 6 16:15:48 2023 +0300 wifi: ath5k: fix an off by one check in ath5k_eeprom_read_freq_list() This loop checks that i < max at the start of loop but then it does i++ which could put it past the end of the array. It's harmless to check again and prevent a potential out of bounds. Fixes: 1048643ea94d ("ath5k: Clean up eeprom parsing and add missing calibration data") Signed-off-by: Dan Carpenter Reviewed-by: Luis Chamberlain Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/Y+D9hPQrHfWBJhXz@kili commit 95c95251d0547b46d6571e4fbd51b42865c15a4a Author: Douglas Anderson Date: Wed Feb 1 08:54:43 2023 -0800 wifi: ath5k: Use platform_get_irq() to get the interrupt As of commit a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core"), we need to use platform_get_irq() instead of platform_get_resource() to get our IRQs because platform_get_resource() simply won't get them anymore. This was already fixed in several other Atheros WiFi drivers, apparently in response to Zeal Robot reports. An example of another fix is commit 9503a1fc123d ("ath9k: Use platform_get_irq() to get the interrupt"). ath5k seems to have been missed in this effort, though. Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core") Signed-off-by: Douglas Anderson Reviewed-by: Lad Prabhakar Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230201084131.v2.2.Ic4f8542b0588d7eb4bc6e322d4af3d2064e84ff0@changeid commit f117276638b7600b981b3fe28550823cfbe1ef23 Author: Douglas Anderson Date: Wed Feb 1 08:54:42 2023 -0800 wifi: ath11k: Use platform_get_irq() to get the interrupt As of commit a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core"), we need to use platform_get_irq() instead of platform_get_resource() to get our IRQs because platform_get_resource() simply won't get them anymore. This was already fixed in several other Atheros WiFi drivers, apparently in response to Zeal Robot reports. An example of another fix is commit 9503a1fc123d ("ath9k: Use platform_get_irq() to get the interrupt"). ath11k seems to have been missed in this effort, though. Without this change, WiFi wasn't coming up on my Qualcomm sc7280-based hardware. Specifically, "platform_get_resource(pdev, IORESOURCE_IRQ, i)" was failing even for i=0. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core") Fixes: 00402f49d26f ("ath11k: Add support for WCN6750 device") Signed-off-by: Douglas Anderson Tested-by: Jun Yu Reviewed-by: Lad Prabhakar Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230201084131.v2.1.I69cf3d56c97098287fe3a70084ee515098390b70@changeid commit 80e396586d0a94c42015dd9472176d89a3b0e4ca Author: Ramya Gnanasekar Date: Mon Jan 23 15:21:41 2023 +0530 wifi: ath12k: PCI ops for wakeup/release MHI Wakeup/release MHI is not needed before pci_read/write for QCN9274. Since wakeup & release MHI is enabled for all QCN9274 and WCN7850, below MHI assert is seen in QCN9274 [ 784.906613] BUG: sleeping function called from invalid context at drivers/bus/mhi/host/pm.c:989 [ 784.906633] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 0, name: swapper/3 [ 784.906637] preempt_count: 503, expected: 0 [ 784.906641] RCU nest depth: 0, expected: 0 [ 784.906644] 2 locks held by swapper/3/0: [ 784.906646] #0: ffff8ed348e429e0 (&ab->ce.ce_lock){+.-.}-{2:2}, at: ath12k_ce_recv_process_cb+0xb3/0x2f0 [ath12k] [ 784.906664] #1: ffff8ed348e491f0 (&srng->lock_key#3){+.-.}-{2:2}, at: ath12k_ce_recv_process_cb+0xfb/0x2f0 [ath12k] [ 784.906678] Preemption disabled at: [ 784.906680] [<0000000000000000>] 0x0 [ 784.906686] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G W O 6.1.0-rc2+ #3 [ 784.906688] Hardware name: Intel(R) Client Systems NUC8i7HVK/NUC8i7HVB, BIOS HNKBLi70.86A.0056.2019.0506.1527 05/06/2019 [ 784.906690] Call Trace: [ 784.906691] [ 784.906693] dump_stack_lvl+0x56/0x7b [ 784.906698] __might_resched+0x21c/0x270 [ 784.906704] __mhi_device_get_sync+0x7d/0x1c0 [mhi] [ 784.906714] mhi_device_get_sync+0xd/0x20 [mhi] [ 784.906719] ath12k_pci_write32+0x75/0x170 [ath12k] [ 784.906729] ath12k_hal_srng_access_end+0x55/0xc0 [ath12k] [ 784.906737] ath12k_ce_recv_process_cb+0x1f3/0x2f0 [ath12k] [ 784.906776] ? ath12k_pci_ce_tasklet+0x11/0x30 [ath12k] [ 784.906788] ath12k_pci_ce_tasklet+0x11/0x30 [ath12k] [ 784.906813] tasklet_action_common.isra.18+0xb7/0xe0 [ 784.906820] __do_softirq+0xd0/0x4c9 [ 784.906826] irq_exit_rcu+0x88/0xe0 [ 784.906828] common_interrupt+0xa5/0xc0 [ 784.906831] [ 784.906832] Adding function callbacks for MHI wakeup and release operations. QCN9274 does not need wakeup/release, function callbacks are initialized to NULL. In case of WCN7850, shadow registers are used to access rings. Since, shadow register's offset is less than ACCESS_ALWAYS_OFF, mhi_device_get_sync() or mhi_device_put() to wakeup and release mhi will not be called during service ring accesses. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0-03171-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: Ramya Gnanasekar Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230123095141.5310-1-quic_rgnanase@quicinc.com commit 95a389e2ff3212d866cc51c77d682d2934074eb8 Author: Ramya Gnanasekar Date: Sun Jan 22 07:19:36 2023 +0530 wifi: ath12k: Handle lock during peer_id find ath12k_peer_find_by_id() requires that the caller hold the ab->base_lock. Currently the WBM error path does not hold the lock and calling that function, leads to the following lockdep_assert()in QCN9274: [105162.160893] ------------[ cut here ]------------ [105162.160916] WARNING: CPU: 3 PID: 0 at drivers/net/wireless/ath/ath12k/peer.c:71 ath12k_peer_find_by_id+0x52/0x60 [ath12k] [105162.160933] Modules linked in: ath12k(O) qrtr_mhi qrtr mac80211 cfg80211 mhi qmi_helpers libarc4 nvme nvme_core [last unloaded: ath12k(O)] [105162.160967] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G W O 6.1.0-rc2+ #3 [105162.160972] Hardware name: Intel(R) Client Systems NUC8i7HVK/NUC8i7HVB, BIOS HNKBLi70.86A.0056.2019.0506.1527 05/06/2019 [105162.160977] RIP: 0010:ath12k_peer_find_by_id+0x52/0x60 [ath12k] [105162.160990] Code: 07 eb 0f 39 68 24 74 0a 48 8b 00 48 39 f8 75 f3 31 c0 5b 5d c3 48 8d bf b0 f2 00 00 be ff ff ff ff e8 22 20 c4 e2 85 c0 75 bf <0f> 0b eb bb 66 2e 0f 1f 84 00 00 00 00 00 41 54 4c 8d a7 98 f2 00 [105162.160996] RSP: 0018:ffffa223001acc60 EFLAGS: 00010246 [105162.161003] RAX: 0000000000000000 RBX: ffff9f0573940000 RCX: 0000000000000000 [105162.161008] RDX: 0000000000000001 RSI: ffffffffa3951c8e RDI: ffffffffa39a96d7 [105162.161013] RBP: 000000000000000a R08: 0000000000000000 R09: 0000000000000000 [105162.161017] R10: ffffa223001acb40 R11: ffffffffa3d57c60 R12: ffff9f057394f2e0 [105162.161022] R13: ffff9f0573940000 R14: ffff9f04ecd659c0 R15: ffff9f04d5a9b040 [105162.161026] FS: 0000000000000000(0000) GS:ffff9f0575600000(0000) knlGS:0000000000000000 [105162.161031] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [105162.161036] CR2: 00001d5c8277a008 CR3: 00000001e6224006 CR4: 00000000003706e0 [105162.161041] Call Trace: [105162.161046] [105162.161051] ath12k_dp_rx_process_wbm_err+0x6da/0xaf0 [ath12k] [105162.161072] ? ath12k_dp_rx_process_err+0x80e/0x15a0 [ath12k] [105162.161084] ? __lock_acquire+0x4ca/0x1a60 [105162.161104] ath12k_dp_service_srng+0x263/0x310 [ath12k] [105162.161120] ath12k_pci_ext_grp_napi_poll+0x1c/0x70 [ath12k] [105162.161133] __napi_poll+0x22/0x260 [105162.161141] net_rx_action+0x2f8/0x380 [105162.161153] __do_softirq+0xd0/0x4c9 [105162.161162] irq_exit_rcu+0x88/0xe0 [105162.161169] common_interrupt+0xa5/0xc0 [105162.161174] [105162.161179] [105162.161184] asm_common_interrupt+0x22/0x40 Handle spin lock/unlock in WBM error path to hold the necessary lock expected by ath12k_peer_find_by_id(). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0-03171-QCAHKSWPL_SILICONZ-1 Signed-off-by: Ramya Gnanasekar Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230122014936.3594-1-quic_rgnanase@quicinc.com commit 586dc36226dd748b197eea8642c087cae611129b Author: Randy Dunlap Date: Thu Feb 9 16:44:06 2023 -0800 Input: hp_sdc_rtc - mark an unused function as __maybe_unused When CONFIG_PROC_FS is not set, one procfs-related function is not used, causing a build error or warning. Mark this function as __maybe_unused to quieten the build. ../drivers/input/misc/hp_sdc_rtc.c:268:12: warning: 'hp_sdc_rtc_proc_show' defined but not used [-Wunused-function] 268 | static int hp_sdc_rtc_proc_show(struct seq_file *m, void *v) | ^~~~~~~~~~~~~~~~~~~~ Fixes: c18bd9a1ff47 ("hp_sdc_rtc: Don't use create_proc_read_entry()") Signed-off-by: Randy Dunlap Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230209010125.23690-1-rdunlap@infradead.org Signed-off-by: Dmitry Torokhov commit c6f3b684c2c4e8d4700fe8c4a173c0a70df6cc14 Author: Linus Walleij Date: Tue Feb 21 13:25:17 2023 -0800 dt-bindings: google,cros-ec-keyb: Fix spelling error The dependency had an obvious spelling error. Fix it. Signed-off-by: Linus Walleij Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230220135531.1987351-1-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit 4b665e1781e2cd64b3b9492e49156925ba02bfa9 Author: Gergo Koteles Date: Tue Feb 21 11:47:48 2023 -0800 Input: gpio-keys - add support for linux,input-value DTS property Allows setting the value of EV_ABS events from DTS. This property is included in the gpio-keys.yaml scheme, but was only implemented for gpio-keys-polled. Signed-off-by: Gergo Koteles Link: https://lore.kernel.org/r/3519a11b0ef5324a2befbd137cd2aa0cb8fd057d.1676850819.git.soyer@irl.hu Signed-off-by: Dmitry Torokhov commit 40e40fdfec3faf08951c2a600177e23f4d43fc32 Author: Jacky Bai Date: Tue Feb 21 11:41:45 2023 -0800 Input: bbnsm_pwrkey - add bbnsm power key support The ON/OFF logic inside the BBNSM allows for connecting directly into a PMIC or other voltage regulator device. The module has an button input signal and a wakeup request input signal. It also has two interrupts (set_pwr_off_irq and set_pwr_on_irq) and an active-low PMIC enable (pmic_en_b) output. Add the power key support for the ON/OFF button function found in BBNSM module. Signed-off-by: Jacky Bai Reviewed-by: Peng Fan Link: https://lore.kernel.org/r/20230215024117.3357341-2-ping.bai@nxp.com Signed-off-by: Dmitry Torokhov commit 992ed9d525609e2bcef9207c25fe2b1949f158f1 Author: Andrzej Hajda Date: Fri Feb 17 12:18:36 2023 +0100 drm/i915/display/power: use intel_de_rmw if possible The helper makes the code more compact and readable. Signed-off-by: Andrzej Hajda Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230217111836.864959-1-andrzej.hajda@intel.com commit ed35e2f2f0ded15df313ae6f8da21e85c8e1e493 Author: Günther Noack Date: Tue Feb 21 17:52:05 2023 +0100 landlock: Clarify documentation for the LANDLOCK_ACCESS_FS_REFER right Clarify the "refer" documentation by splitting up a big paragraph of text. - Call out specifically that the denial by default applies to ABI v1 as well. - Turn the three additional constraints for link/rename operations into bullet points, to give it more structure. Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20230221165205.4231-1-gnoack3000@gmail.com Signed-off-by: Mickaël Salaün commit 4d5a2cce47a8e1e7119a881a4714f0eee557c1cd Author: Jiri Slaby (SUSE) Date: Mon Oct 31 12:42:29 2022 +0100 drm/nouveau/kms/nv50: fix nv50_wndw_new_ prototype gcc-13 warns about mismatching types for enums. That revealed switched arguments of nv50_wndw_new_(): drivers/gpu/drm/nouveau/dispnv50/wndw.c:696:1: error: conflicting types for 'nv50_wndw_new_' due to enum/integer mismatch; have 'int(const struct nv50_wndw_func *, struct drm_device *, enum drm_plane_type, const char *, int, const u32 *, u32, enum nv50_disp_interlock_type, u32, struct nv50_wndw **)' drivers/gpu/drm/nouveau/dispnv50/wndw.h:36:5: note: previous declaration of 'nv50_wndw_new_' with type 'int(const struct nv50_wndw_func *, struct drm_device *, enum drm_plane_type, const char *, int, const u32 *, enum nv50_disp_interlock_type, u32, u32, struct nv50_wndw **)' It can be barely visible, but the declaration says about the parameters in the middle: enum nv50_disp_interlock_type, u32 interlock_data, u32 heads, While the definition states differently: u32 heads, enum nv50_disp_interlock_type interlock_type, u32 interlock_data, Unify/fix the declaration to match the definition. Fixes: 53e0a3e70de6 ("drm/nouveau/kms/nv50-: simplify tracking of channel interlocks") Cc: Martin Liska Cc: Ben Skeggs Cc: Karol Herbst Cc: Lyude Paul Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Jiri Slaby (SUSE) Signed-off-by: Karol Herbst Link: https://patchwork.freedesktop.org/patch/msgid/20221031114229.10289-1-jirislaby@kernel.org commit 9548fefcaf9ab61291c0bd427627aa773b19dc75 Author: Ville Syrjälä Date: Tue Feb 14 00:52:58 2023 +0200 drm/i915: Remove pointless register read We just wrote the EDP transcoder's VTOTAL register a few lines earlier, so instead of reading it back out again let's just generate the same value for the transocder B/C register. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230213225258.2127-13-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 1552dd6ef99fb54479afdd2fb84473b9655cad3c Author: Ville Syrjälä Date: Tue Feb 14 00:52:57 2023 +0200 drm/i915: Sprinkle some FIXMEs about TGL+ DSI transcoder timing mess The DSI code has some local hacks to program TRANS_VBLANK on TGL+ (ICL DSI transcoders didn't have this register). That will not work when we need to start using the delayed vblank (for DSB purposes). Too lazy to figure out what the is going on there, so just sprinkle FIXMEs in the hopes someone else will spot them eventually. v2: Only TRANS_{HBLANK,SET_CONTEXT_LATENCY} still no not exist for DSI transcoders, only TRANS_VBLANK Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230213225258.2127-12-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit 2846cf3fdb8b500e374efdcad3134633dcc5ce60 Author: Ville Syrjälä Date: Tue Feb 14 00:52:56 2023 +0200 drm/i915: Configure TRANS_SET_CONTEXT_LATENCY correctly on ADL+ On TGL VBLANK.VBLANK_START was the mechanism by which we can delay the pipe's internal vblank in relation to the transcoder's vblank. On ADL+ that no longer does anything. Instead we must now use the new TRANS_SET_CONTEXT_LATENCY register. Program it accordingly. And since VBLANK.VBLANK_START is no longer used by the hardware on ADL+ let's just zero it out to make it stand out in register dumps. Seeing the zeroed value should hopefully remind people to check the other register instead. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230213225258.2127-11-ville.syrjala@linux.intel.com Acked-by: Jani Nikula commit bfa5969e1144c8d0fbbe1a976601dcbc50549757 Author: Ville Syrjälä Date: Wed Jan 18 18:30:35 2023 +0200 drm/i915/dsb: Skip DSB command buffer setup if we have no LUTs If we have no LUTs to load there is no point in setting up the DSB command buffer. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230118163040.29808-9-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit e18b19740299285fb18ac1513dcaaf0fa40e140e Author: Ville Syrjälä Date: Wed Jan 18 18:30:34 2023 +0200 drm/i915/dsb: Nuke the DSB debug We'll be wanting to start the DSB from the vblank evasion critical section so printk()s are a big nono. Get rid of the debug print. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230118163040.29808-8-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit d5f84973acddbc6140cc82d74ae8f5b3e11c027f Author: Ville Syrjälä Date: Wed Jan 18 18:30:33 2023 +0200 drm/i915/dsb: Allow vblank synchronized DSB execution Allow the caller to ask for the DSB commands to execute during vblank. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230118163040.29808-7-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit 1f89b94bcfbf1d9ce7f26bb66d8ee0cd7ca7d6d7 Author: Ville Syrjälä Date: Wed Jan 18 18:30:28 2023 +0200 drm/i915/dsb: Define more DSB registers Add definitions for more DSB registers. Less annoying spec trawling when working on the DSB code. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230118163040.29808-2-ville.syrjala@linux.intel.com Reviewed-by: Animesh Manna commit fedee62781e3aed958be475af6e5dbea90cf232c Author: Ville Syrjälä Date: Tue Feb 14 00:52:53 2023 +0200 drm/i915/psr: Stop clobbering TRANS_SET_CONTEXT_LATENCY The PSR code has no business mucking around with the vblank delay. Currently nothing that depends on knowing the exact vblank start scanline (eg. vblank evasion) is aware of this and so will not work correctly. The w/a seems to be for pre-production hw only, so let's just nuke it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230213225258.2127-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit b1e286d30de818ca1f10eb090c9b99a7c1c26363 Author: Thomas Zimmermann Date: Thu Feb 9 16:41:07 2023 +0100 drm/tidss: Implement struct drm_plane_helper_funcs.atomic_enable Enable the primary plane for tidss hardware via atomic_enable. Atomic helpers invoke this callback only when the plane becomes active. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reviewed-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230209154107.30680-7-tzimmermann@suse.de commit e1174133a4682d7afe169c74bfad8ed390e818c3 Author: Thomas Zimmermann Date: Thu Feb 9 16:41:06 2023 +0100 drm/tidss: Remove return values from dispc_plane_{setup, enable}() Calls to dispc_plane_setup() and dispc_plane_enable() cannot fail. Remove the return value. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reviewed-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230209154107.30680-6-tzimmermann@suse.de commit 2a742fd1640574b80682669825274122e71141e7 Author: Thomas Zimmermann Date: Thu Feb 9 16:41:05 2023 +0100 drm/mgag200: Implement struct drm_plane_helper_funcs.atomic_enable Enable the primary plane for mgag200 hardware via atomic_enable. Atomic helpers invoke this callback only when the plane becomes active. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230209154107.30680-5-tzimmermann@suse.de commit b712b3830a327b171f0a00512aee5e84d45f6d36 Author: Thomas Zimmermann Date: Thu Feb 9 16:41:04 2023 +0100 drm/mgag200: Remove disable handling from atomic_update The primary plane has the atomic_disable helper set, so atomic_update won't be called if the plane gets disabled. Remove the respective branch from the helper. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230209154107.30680-4-tzimmermann@suse.de commit 8f85e4a1667fb12a2f0f83876ec68a75554ed5b3 Author: Thomas Zimmermann Date: Thu Feb 9 16:41:03 2023 +0100 drm/ast: Implement struct drm_plane_helper_funcs.atomic_enable Enable the primary plane for ast hardware via atomic_enable. Atomic helpers invoke this callback only when the plane becomes active. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230209154107.30680-3-tzimmermann@suse.de commit 169b9182f192e8725c8de5d7d77f00f6ae6c7fd4 Author: Thomas Zimmermann Date: Thu Feb 9 16:41:02 2023 +0100 drm/atomic-helper: Add atomic_enable plane-helper callback Add atomic_enable to struct drm_plane_helper_funcs. It enables a plane independently from updating the plane's content. As such, it is the inverse of the atomic_disable plane helper. Useful for hardware where plane enable state is independent from plane content. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230209154107.30680-2-tzimmermann@suse.de commit 1e84dadb2762cddbb5a1066713fc5fc6505e9f27 Author: Thomas Zimmermann Date: Thu Feb 9 14:55:09 2023 +0100 drm: Fix comment on mode parsing Do not claim that there's a default mode in the video= option parser. if no option string has been given, the parser does nothing. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20230209135509.7786-12-tzimmermann@suse.de commit 495e440b354203d286127f8515f67a7a711ab6ed Author: Thomas Zimmermann Date: Thu Feb 9 14:55:08 2023 +0100 drm: Include